function Pit(t,e){for(var r=0;r<e.length;r++){const n=e[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in t)){const a=Object.getOwnPropertyDescriptor(n,i);a&&Object.defineProperty(t,i,a.get?a:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var H3=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qh(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Dit(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var r=function n(){var i=!1;try{i=this instanceof n}catch{}return i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var gJ={exports:{}},b7={};/**
 * @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 z_e;function Lit(){if(z_e)return b7;z_e=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function r(n,i,a){var o=null;if(a!==void 0&&(o=""+a),i.key!==void 0&&(o=""+i.key),"key"in i){a={};for(var s in i)s!=="key"&&(a[s]=i[s])}else a=i;return i=a.ref,{$$typeof:t,type:n,key:o,ref:i!==void 0?i:null,props:a}}return b7.Fragment=e,b7.jsx=r,b7.jsxs=r,b7}var B_e;function Oit(){return B_e||(B_e=1,gJ.exports=Lit()),gJ.exports}var Ke=Oit(),yJ={exports:{}},Wh={};/**
 * @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 U_e;function Nit(){if(U_e)return Wh;U_e=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),o=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),b=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),B=Symbol.iterator;function V(yt){return yt===null||typeof yt!="object"?null:(yt=B&&yt[B]||yt["@@iterator"],typeof yt=="function"?yt:null)}var X={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ie=Object.assign,de={};function ae(yt,Vt,Er){this.props=yt,this.context=Vt,this.refs=de,this.updater=Er||X}ae.prototype.isReactComponent={},ae.prototype.setState=function(yt,Vt){if(typeof yt!="object"&&typeof yt!="function"&&yt!=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,yt,Vt,"setState")},ae.prototype.forceUpdate=function(yt){this.updater.enqueueForceUpdate(this,yt,"forceUpdate")};function U(){}U.prototype=ae.prototype;function ve(yt,Vt,Er){this.props=yt,this.context=Vt,this.refs=de,this.updater=Er||X}var Se=ve.prototype=new U;Se.constructor=ve,ie(Se,ae.prototype),Se.isPureReactComponent=!0;var Pe=Array.isArray,Me={H:null,A:null,T:null,S:null,V:null},Ie=Object.prototype.hasOwnProperty;function Ve(yt,Vt,Er,sr,or,Ar){return Er=Ar.ref,{$$typeof:t,type:yt,key:Vt,ref:Er!==void 0?Er:null,props:Ar}}function Ze(yt,Vt){return Ve(yt.type,Vt,void 0,void 0,void 0,yt.props)}function Je(yt){return typeof yt=="object"&&yt!==null&&yt.$$typeof===t}function nt(yt){var Vt={"=":"=0",":":"=2"};return"$"+yt.replace(/[=:]/g,function(Er){return Vt[Er]})}var ut=/\/+/g;function ht(yt,Vt){return typeof yt=="object"&&yt!==null&&yt.key!=null?nt(""+yt.key):Vt.toString(36)}function _t(){}function Dt(yt){switch(yt.status){case"fulfilled":return yt.value;case"rejected":throw yt.reason;default:switch(typeof yt.status=="string"?yt.then(_t,_t):(yt.status="pending",yt.then(function(Vt){yt.status==="pending"&&(yt.status="fulfilled",yt.value=Vt)},function(Vt){yt.status==="pending"&&(yt.status="rejected",yt.reason=Vt)})),yt.status){case"fulfilled":return yt.value;case"rejected":throw yt.reason}}throw yt}function qt(yt,Vt,Er,sr,or){var Ar=typeof yt;(Ar==="undefined"||Ar==="boolean")&&(yt=null);var Ir=!1;if(yt===null)Ir=!0;else switch(Ar){case"bigint":case"string":case"number":Ir=!0;break;case"object":switch(yt.$$typeof){case t:case e:Ir=!0;break;case L:return Ir=yt._init,qt(Ir(yt._payload),Vt,Er,sr,or)}}if(Ir)return or=or(yt),Ir=sr===""?"."+ht(yt,0):sr,Pe(or)?(Er="",Ir!=null&&(Er=Ir.replace(ut,"$&/")+"/"),qt(or,Vt,Er,"",function(Qn){return Qn})):or!=null&&(Je(or)&&(or=Ze(or,Er+(or.key==null||yt&&yt.key===or.key?"":(""+or.key).replace(ut,"$&/")+"/")+Ir)),Vt.push(or)),1;Ir=0;var _n=sr===""?".":sr+":";if(Pe(yt))for(var Un=0;Un<yt.length;Un++)sr=yt[Un],Ar=_n+ht(sr,Un),Ir+=qt(sr,Vt,Er,Ar,or);else if(Un=V(yt),typeof Un=="function")for(yt=Un.call(yt),Un=0;!(sr=yt.next()).done;)sr=sr.value,Ar=_n+ht(sr,Un++),Ir+=qt(sr,Vt,Er,Ar,or);else if(Ar==="object"){if(typeof yt.then=="function")return qt(Dt(yt),Vt,Er,sr,or);throw Vt=String(yt),Error("Objects are not valid as a React child (found: "+(Vt==="[object Object]"?"object with keys {"+Object.keys(yt).join(", ")+"}":Vt)+"). If you meant to render a collection of children, use an array instead.")}return Ir}function Lt(yt,Vt,Er){if(yt==null)return yt;var sr=[],or=0;return qt(yt,sr,"","",function(Ar){return Vt.call(Er,Ar,or++)}),sr}function dr(yt){if(yt._status===-1){var Vt=yt._result;Vt=Vt(),Vt.then(function(Er){(yt._status===0||yt._status===-1)&&(yt._status=1,yt._result=Er)},function(Er){(yt._status===0||yt._status===-1)&&(yt._status=2,yt._result=Er)}),yt._status===-1&&(yt._status=0,yt._result=Vt)}if(yt._status===1)return yt._result.default;throw yt._result}var Zt=typeof reportError=="function"?reportError:function(yt){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Vt=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof yt=="object"&&yt!==null&&typeof yt.message=="string"?String(yt.message):String(yt),error:yt});if(!window.dispatchEvent(Vt))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",yt);return}console.error(yt)};function Cr(){}return Wh.Children={map:Lt,forEach:function(yt,Vt,Er){Lt(yt,function(){Vt.apply(this,arguments)},Er)},count:function(yt){var Vt=0;return Lt(yt,function(){Vt++}),Vt},toArray:function(yt){return Lt(yt,function(Vt){return Vt})||[]},only:function(yt){if(!Je(yt))throw Error("React.Children.only expected to receive a single React element child.");return yt}},Wh.Component=ae,Wh.Fragment=r,Wh.Profiler=i,Wh.PureComponent=ve,Wh.StrictMode=n,Wh.Suspense=d,Wh.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Me,Wh.__COMPILER_RUNTIME={__proto__:null,c:function(yt){return Me.H.useMemoCache(yt)}},Wh.cache=function(yt){return function(){return yt.apply(null,arguments)}},Wh.cloneElement=function(yt,Vt,Er){if(yt==null)throw Error("The argument must be a React element, but you passed "+yt+".");var sr=ie({},yt.props),or=yt.key,Ar=void 0;if(Vt!=null)for(Ir in Vt.ref!==void 0&&(Ar=void 0),Vt.key!==void 0&&(or=""+Vt.key),Vt)!Ie.call(Vt,Ir)||Ir==="key"||Ir==="__self"||Ir==="__source"||Ir==="ref"&&Vt.ref===void 0||(sr[Ir]=Vt[Ir]);var Ir=arguments.length-2;if(Ir===1)sr.children=Er;else if(1<Ir){for(var _n=Array(Ir),Un=0;Un<Ir;Un++)_n[Un]=arguments[Un+2];sr.children=_n}return Ve(yt.type,or,void 0,void 0,Ar,sr)},Wh.createContext=function(yt){return yt={$$typeof:o,_currentValue:yt,_currentValue2:yt,_threadCount:0,Provider:null,Consumer:null},yt.Provider=yt,yt.Consumer={$$typeof:a,_context:yt},yt},Wh.createElement=function(yt,Vt,Er){var sr,or={},Ar=null;if(Vt!=null)for(sr in Vt.key!==void 0&&(Ar=""+Vt.key),Vt)Ie.call(Vt,sr)&&sr!=="key"&&sr!=="__self"&&sr!=="__source"&&(or[sr]=Vt[sr]);var Ir=arguments.length-2;if(Ir===1)or.children=Er;else if(1<Ir){for(var _n=Array(Ir),Un=0;Un<Ir;Un++)_n[Un]=arguments[Un+2];or.children=_n}if(yt&&yt.defaultProps)for(sr in Ir=yt.defaultProps,Ir)or[sr]===void 0&&(or[sr]=Ir[sr]);return Ve(yt,Ar,void 0,void 0,null,or)},Wh.createRef=function(){return{current:null}},Wh.forwardRef=function(yt){return{$$typeof:s,render:yt}},Wh.isValidElement=Je,Wh.lazy=function(yt){return{$$typeof:L,_payload:{_status:-1,_result:yt},_init:dr}},Wh.memo=function(yt,Vt){return{$$typeof:b,type:yt,compare:Vt===void 0?null:Vt}},Wh.startTransition=function(yt){var Vt=Me.T,Er={};Me.T=Er;try{var sr=yt(),or=Me.S;or!==null&&or(Er,sr),typeof sr=="object"&&sr!==null&&typeof sr.then=="function"&&sr.then(Cr,Zt)}catch(Ar){Zt(Ar)}finally{Me.T=Vt}},Wh.unstable_useCacheRefresh=function(){return Me.H.useCacheRefresh()},Wh.use=function(yt){return Me.H.use(yt)},Wh.useActionState=function(yt,Vt,Er){return Me.H.useActionState(yt,Vt,Er)},Wh.useCallback=function(yt,Vt){return Me.H.useCallback(yt,Vt)},Wh.useContext=function(yt){return Me.H.useContext(yt)},Wh.useDebugValue=function(){},Wh.useDeferredValue=function(yt,Vt){return Me.H.useDeferredValue(yt,Vt)},Wh.useEffect=function(yt,Vt,Er){var sr=Me.H;if(typeof Er=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return sr.useEffect(yt,Vt)},Wh.useId=function(){return Me.H.useId()},Wh.useImperativeHandle=function(yt,Vt,Er){return Me.H.useImperativeHandle(yt,Vt,Er)},Wh.useInsertionEffect=function(yt,Vt){return Me.H.useInsertionEffect(yt,Vt)},Wh.useLayoutEffect=function(yt,Vt){return Me.H.useLayoutEffect(yt,Vt)},Wh.useMemo=function(yt,Vt){return Me.H.useMemo(yt,Vt)},Wh.useOptimistic=function(yt,Vt){return Me.H.useOptimistic(yt,Vt)},Wh.useReducer=function(yt,Vt,Er){return Me.H.useReducer(yt,Vt,Er)},Wh.useRef=function(yt){return Me.H.useRef(yt)},Wh.useState=function(yt){return Me.H.useState(yt)},Wh.useSyncExternalStore=function(yt,Vt,Er){return Me.H.useSyncExternalStore(yt,Vt,Er)},Wh.useTransition=function(){return Me.H.useTransition()},Wh.version="19.1.1",Wh}var H_e;function zk(){return H_e||(H_e=1,yJ.exports=Nit()),yJ.exports}var ze=zk();const wi=Qh(ze),VG=Pit({__proto__:null,default:wi},[ze]);var bJ={exports:{}},x7={},xJ={exports:{}},_J={};/**
 * @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 j_e;function Fit(){return j_e||(j_e=1,(function(t){function e(Lt,dr){var Zt=Lt.length;Lt.push(dr);e:for(;0<Zt;){var Cr=Zt-1>>>1,yt=Lt[Cr];if(0<i(yt,dr))Lt[Cr]=dr,Lt[Zt]=yt,Zt=Cr;else break e}}function r(Lt){return Lt.length===0?null:Lt[0]}function n(Lt){if(Lt.length===0)return null;var dr=Lt[0],Zt=Lt.pop();if(Zt!==dr){Lt[0]=Zt;e:for(var Cr=0,yt=Lt.length,Vt=yt>>>1;Cr<Vt;){var Er=2*(Cr+1)-1,sr=Lt[Er],or=Er+1,Ar=Lt[or];if(0>i(sr,Zt))or<yt&&0>i(Ar,sr)?(Lt[Cr]=Ar,Lt[or]=Zt,Cr=or):(Lt[Cr]=sr,Lt[Er]=Zt,Cr=Er);else if(or<yt&&0>i(Ar,Zt))Lt[Cr]=Ar,Lt[or]=Zt,Cr=or;else break e}}return dr}function i(Lt,dr){var Zt=Lt.sortIndex-dr.sortIndex;return Zt!==0?Zt:Lt.id-dr.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;t.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();t.unstable_now=function(){return o.now()-s}}var d=[],b=[],L=1,B=null,V=3,X=!1,ie=!1,de=!1,ae=!1,U=typeof setTimeout=="function"?setTimeout:null,ve=typeof clearTimeout=="function"?clearTimeout:null,Se=typeof setImmediate<"u"?setImmediate:null;function Pe(Lt){for(var dr=r(b);dr!==null;){if(dr.callback===null)n(b);else if(dr.startTime<=Lt)n(b),dr.sortIndex=dr.expirationTime,e(d,dr);else break;dr=r(b)}}function Me(Lt){if(de=!1,Pe(Lt),!ie)if(r(d)!==null)ie=!0,Ie||(Ie=!0,ht());else{var dr=r(b);dr!==null&&qt(Me,dr.startTime-Lt)}}var Ie=!1,Ve=-1,Ze=5,Je=-1;function nt(){return ae?!0:!(t.unstable_now()-Je<Ze)}function ut(){if(ae=!1,Ie){var Lt=t.unstable_now();Je=Lt;var dr=!0;try{e:{ie=!1,de&&(de=!1,ve(Ve),Ve=-1),X=!0;var Zt=V;try{t:{for(Pe(Lt),B=r(d);B!==null&&!(B.expirationTime>Lt&&nt());){var Cr=B.callback;if(typeof Cr=="function"){B.callback=null,V=B.priorityLevel;var yt=Cr(B.expirationTime<=Lt);if(Lt=t.unstable_now(),typeof yt=="function"){B.callback=yt,Pe(Lt),dr=!0;break t}B===r(d)&&n(d),Pe(Lt)}else n(d);B=r(d)}if(B!==null)dr=!0;else{var Vt=r(b);Vt!==null&&qt(Me,Vt.startTime-Lt),dr=!1}}break e}finally{B=null,V=Zt,X=!1}dr=void 0}}finally{dr?ht():Ie=!1}}}var ht;if(typeof Se=="function")ht=function(){Se(ut)};else if(typeof MessageChannel<"u"){var _t=new MessageChannel,Dt=_t.port2;_t.port1.onmessage=ut,ht=function(){Dt.postMessage(null)}}else ht=function(){U(ut,0)};function qt(Lt,dr){Ve=U(function(){Lt(t.unstable_now())},dr)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(Lt){Lt.callback=null},t.unstable_forceFrameRate=function(Lt){0>Lt||125<Lt?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Ze=0<Lt?Math.floor(1e3/Lt):5},t.unstable_getCurrentPriorityLevel=function(){return V},t.unstable_next=function(Lt){switch(V){case 1:case 2:case 3:var dr=3;break;default:dr=V}var Zt=V;V=dr;try{return Lt()}finally{V=Zt}},t.unstable_requestPaint=function(){ae=!0},t.unstable_runWithPriority=function(Lt,dr){switch(Lt){case 1:case 2:case 3:case 4:case 5:break;default:Lt=3}var Zt=V;V=Lt;try{return dr()}finally{V=Zt}},t.unstable_scheduleCallback=function(Lt,dr,Zt){var Cr=t.unstable_now();switch(typeof Zt=="object"&&Zt!==null?(Zt=Zt.delay,Zt=typeof Zt=="number"&&0<Zt?Cr+Zt:Cr):Zt=Cr,Lt){case 1:var yt=-1;break;case 2:yt=250;break;case 5:yt=1073741823;break;case 4:yt=1e4;break;default:yt=5e3}return yt=Zt+yt,Lt={id:L++,callback:dr,priorityLevel:Lt,startTime:Zt,expirationTime:yt,sortIndex:-1},Zt>Cr?(Lt.sortIndex=Zt,e(b,Lt),r(d)===null&&Lt===r(b)&&(de?(ve(Ve),Ve=-1):de=!0,qt(Me,Zt-Cr))):(Lt.sortIndex=yt,e(d,Lt),ie||X||(ie=!0,Ie||(Ie=!0,ht()))),Lt},t.unstable_shouldYield=nt,t.unstable_wrapCallback=function(Lt){var dr=V;return function(){var Zt=V;V=dr;try{return Lt.apply(this,arguments)}finally{V=Zt}}}})(_J)),_J}var V_e;function zit(){return V_e||(V_e=1,xJ.exports=Fit()),xJ.exports}var wJ={exports:{}},Dw={};/**
 * @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 q_e;function Bit(){if(q_e)return Dw;q_e=1;var t=zk();function e(d){var b="https://react.dev/errors/"+d;if(1<arguments.length){b+="?args[]="+encodeURIComponent(arguments[1]);for(var L=2;L<arguments.length;L++)b+="&args[]="+encodeURIComponent(arguments[L])}return"Minified React error #"+d+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var n={d:{f:r,r:function(){throw Error(e(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},i=Symbol.for("react.portal");function a(d,b,L){var B=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:B==null?null:""+B,children:d,containerInfo:b,implementation:L}}var o=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function s(d,b){if(d==="font")return"";if(typeof b=="string")return b==="use-credentials"?b:""}return Dw.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,Dw.createPortal=function(d,b){var L=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!b||b.nodeType!==1&&b.nodeType!==9&&b.nodeType!==11)throw Error(e(299));return a(d,b,null,L)},Dw.flushSync=function(d){var b=o.T,L=n.p;try{if(o.T=null,n.p=2,d)return d()}finally{o.T=b,n.p=L,n.d.f()}},Dw.preconnect=function(d,b){typeof d=="string"&&(b?(b=b.crossOrigin,b=typeof b=="string"?b==="use-credentials"?b:"":void 0):b=null,n.d.C(d,b))},Dw.prefetchDNS=function(d){typeof d=="string"&&n.d.D(d)},Dw.preinit=function(d,b){if(typeof d=="string"&&b&&typeof b.as=="string"){var L=b.as,B=s(L,b.crossOrigin),V=typeof b.integrity=="string"?b.integrity:void 0,X=typeof b.fetchPriority=="string"?b.fetchPriority:void 0;L==="style"?n.d.S(d,typeof b.precedence=="string"?b.precedence:void 0,{crossOrigin:B,integrity:V,fetchPriority:X}):L==="script"&&n.d.X(d,{crossOrigin:B,integrity:V,fetchPriority:X,nonce:typeof b.nonce=="string"?b.nonce:void 0})}},Dw.preinitModule=function(d,b){if(typeof d=="string")if(typeof b=="object"&&b!==null){if(b.as==null||b.as==="script"){var L=s(b.as,b.crossOrigin);n.d.M(d,{crossOrigin:L,integrity:typeof b.integrity=="string"?b.integrity:void 0,nonce:typeof b.nonce=="string"?b.nonce:void 0})}}else b==null&&n.d.M(d)},Dw.preload=function(d,b){if(typeof d=="string"&&typeof b=="object"&&b!==null&&typeof b.as=="string"){var L=b.as,B=s(L,b.crossOrigin);n.d.L(d,L,{crossOrigin:B,integrity:typeof b.integrity=="string"?b.integrity:void 0,nonce:typeof b.nonce=="string"?b.nonce:void 0,type:typeof b.type=="string"?b.type:void 0,fetchPriority:typeof b.fetchPriority=="string"?b.fetchPriority:void 0,referrerPolicy:typeof b.referrerPolicy=="string"?b.referrerPolicy:void 0,imageSrcSet:typeof b.imageSrcSet=="string"?b.imageSrcSet:void 0,imageSizes:typeof b.imageSizes=="string"?b.imageSizes:void 0,media:typeof b.media=="string"?b.media:void 0})}},Dw.preloadModule=function(d,b){if(typeof d=="string")if(b){var L=s(b.as,b.crossOrigin);n.d.m(d,{as:typeof b.as=="string"&&b.as!=="script"?b.as:void 0,crossOrigin:L,integrity:typeof b.integrity=="string"?b.integrity:void 0})}else n.d.m(d)},Dw.requestFormReset=function(d){n.d.r(d)},Dw.unstable_batchedUpdates=function(d,b){return d(b)},Dw.useFormState=function(d,b,L){return o.H.useFormState(d,b,L)},Dw.useFormStatus=function(){return o.H.useHostTransitionStatus()},Dw.version="19.1.1",Dw}var G_e;function qW(){if(G_e)return wJ.exports;G_e=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),wJ.exports=Bit(),wJ.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 $_e;function Uit(){if($_e)return x7;$_e=1;var t=zit(),e=zk(),r=qW();function n(te){var ge="https://react.dev/errors/"+te;if(1<arguments.length){ge+="?args[]="+encodeURIComponent(arguments[1]);for(var qe=2;qe<arguments.length;qe++)ge+="&args[]="+encodeURIComponent(arguments[qe])}return"Minified React error #"+te+"; visit "+ge+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(te){return!(!te||te.nodeType!==1&&te.nodeType!==9&&te.nodeType!==11)}function a(te){var ge=te,qe=te;if(te.alternate)for(;ge.return;)ge=ge.return;else{te=ge;do ge=te,(ge.flags&4098)!==0&&(qe=ge.return),te=ge.return;while(te)}return ge.tag===3?qe:null}function o(te){if(te.tag===13){var ge=te.memoizedState;if(ge===null&&(te=te.alternate,te!==null&&(ge=te.memoizedState)),ge!==null)return ge.dehydrated}return null}function s(te){if(a(te)!==te)throw Error(n(188))}function d(te){var ge=te.alternate;if(!ge){if(ge=a(te),ge===null)throw Error(n(188));return ge!==te?null:te}for(var qe=te,ct=ge;;){var Xt=qe.return;if(Xt===null)break;var Tr=Xt.alternate;if(Tr===null){if(ct=Xt.return,ct!==null){qe=ct;continue}break}if(Xt.child===Tr.child){for(Tr=Xt.child;Tr;){if(Tr===qe)return s(Xt),te;if(Tr===ct)return s(Xt),ge;Tr=Tr.sibling}throw Error(n(188))}if(qe.return!==ct.return)qe=Xt,ct=Tr;else{for(var ri=!1,Gi=Xt.child;Gi;){if(Gi===qe){ri=!0,qe=Xt,ct=Tr;break}if(Gi===ct){ri=!0,ct=Xt,qe=Tr;break}Gi=Gi.sibling}if(!ri){for(Gi=Tr.child;Gi;){if(Gi===qe){ri=!0,qe=Tr,ct=Xt;break}if(Gi===ct){ri=!0,ct=Tr,qe=Xt;break}Gi=Gi.sibling}if(!ri)throw Error(n(189))}}if(qe.alternate!==ct)throw Error(n(190))}if(qe.tag!==3)throw Error(n(188));return qe.stateNode.current===qe?te:ge}function b(te){var ge=te.tag;if(ge===5||ge===26||ge===27||ge===6)return te;for(te=te.child;te!==null;){if(ge=b(te),ge!==null)return ge;te=te.sibling}return null}var L=Object.assign,B=Symbol.for("react.element"),V=Symbol.for("react.transitional.element"),X=Symbol.for("react.portal"),ie=Symbol.for("react.fragment"),de=Symbol.for("react.strict_mode"),ae=Symbol.for("react.profiler"),U=Symbol.for("react.provider"),ve=Symbol.for("react.consumer"),Se=Symbol.for("react.context"),Pe=Symbol.for("react.forward_ref"),Me=Symbol.for("react.suspense"),Ie=Symbol.for("react.suspense_list"),Ve=Symbol.for("react.memo"),Ze=Symbol.for("react.lazy"),Je=Symbol.for("react.activity"),nt=Symbol.for("react.memo_cache_sentinel"),ut=Symbol.iterator;function ht(te){return te===null||typeof te!="object"?null:(te=ut&&te[ut]||te["@@iterator"],typeof te=="function"?te:null)}var _t=Symbol.for("react.client.reference");function Dt(te){if(te==null)return null;if(typeof te=="function")return te.$$typeof===_t?null:te.displayName||te.name||null;if(typeof te=="string")return te;switch(te){case ie:return"Fragment";case ae:return"Profiler";case de:return"StrictMode";case Me:return"Suspense";case Ie:return"SuspenseList";case Je:return"Activity"}if(typeof te=="object")switch(te.$$typeof){case X:return"Portal";case Se:return(te.displayName||"Context")+".Provider";case ve:return(te._context.displayName||"Context")+".Consumer";case Pe:var ge=te.render;return te=te.displayName,te||(te=ge.displayName||ge.name||"",te=te!==""?"ForwardRef("+te+")":"ForwardRef"),te;case Ve:return ge=te.displayName||null,ge!==null?ge:Dt(te.type)||"Memo";case Ze:ge=te._payload,te=te._init;try{return Dt(te(ge))}catch{}}return null}var qt=Array.isArray,Lt=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,dr=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Zt={pending:!1,data:null,method:null,action:null},Cr=[],yt=-1;function Vt(te){return{current:te}}function Er(te){0>yt||(te.current=Cr[yt],Cr[yt]=null,yt--)}function sr(te,ge){yt++,Cr[yt]=te.current,te.current=ge}var or=Vt(null),Ar=Vt(null),Ir=Vt(null),_n=Vt(null);function Un(te,ge){switch(sr(Ir,ge),sr(Ar,te),sr(or,null),ge.nodeType){case 9:case 11:te=(te=ge.documentElement)&&(te=te.namespaceURI)?Ev(te):0;break;default:if(te=ge.tagName,ge=ge.namespaceURI)ge=Ev(ge),te=Cg(ge,te);else switch(te){case"svg":te=1;break;case"math":te=2;break;default:te=0}}Er(or),sr(or,te)}function Qn(){Er(or),Er(Ar),Er(Ir)}function Jn(te){te.memoizedState!==null&&sr(_n,te);var ge=or.current,qe=Cg(ge,te.type);ge!==qe&&(sr(Ar,te),sr(or,qe))}function Vn(te){Ar.current===te&&(Er(or),Er(Ar)),_n.current===te&&(Er(_n),oC._currentValue=Zt)}var jn=Object.prototype.hasOwnProperty,Lr=t.unstable_scheduleCallback,Yn=t.unstable_cancelCallback,On=t.unstable_shouldYield,Sn=t.unstable_requestPaint,bn=t.unstable_now,Mn=t.unstable_getCurrentPriorityLevel,gi=t.unstable_ImmediatePriority,Oi=t.unstable_UserBlockingPriority,Pa=t.unstable_NormalPriority,va=t.unstable_LowPriority,ti=t.unstable_IdlePriority,Tn=t.log,bi=t.unstable_setDisableYieldValue,Wn=null,Ei=null;function Ki(te){if(typeof Tn=="function"&&bi(te),Ei&&typeof Ei.setStrictMode=="function")try{Ei.setStrictMode(Wn,te)}catch{}}var sa=Math.clz32?Math.clz32:is,xa=Math.log,Qa=Math.LN2;function is(te){return te>>>=0,te===0?32:31-(xa(te)/Qa|0)|0}var go=256,Co=4194304;function Ko(te){var ge=te&42;if(ge!==0)return ge;switch(te&-te){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:case 262144:case 524288:case 1048576:case 2097152:return te&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return te&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return te}}function Zi(te,ge,qe){var ct=te.pendingLanes;if(ct===0)return 0;var Xt=0,Tr=te.suspendedLanes,ri=te.pingedLanes;te=te.warmLanes;var Gi=ct&134217727;return Gi!==0?(ct=Gi&~Tr,ct!==0?Xt=Ko(ct):(ri&=Gi,ri!==0?Xt=Ko(ri):qe||(qe=Gi&~te,qe!==0&&(Xt=Ko(qe))))):(Gi=ct&~Tr,Gi!==0?Xt=Ko(Gi):ri!==0?Xt=Ko(ri):qe||(qe=ct&~te,qe!==0&&(Xt=Ko(qe)))),Xt===0?0:ge!==0&&ge!==Xt&&(ge&Tr)===0&&(Tr=Xt&-Xt,qe=ge&-ge,Tr>=qe||Tr===32&&(qe&4194048)!==0)?ge:Xt}function za(te,ge){return(te.pendingLanes&~(te.suspendedLanes&~te.pingedLanes)&ge)===0}function Ss(te,ge){switch(te){case 1:case 2:case 4:case 8:case 64:return ge+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 ge+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 ba(){var te=go;return go<<=1,(go&4194048)===0&&(go=256),te}function po(){var te=Co;return Co<<=1,(Co&62914560)===0&&(Co=4194304),te}function Ys(te){for(var ge=[],qe=0;31>qe;qe++)ge.push(te);return ge}function $s(te,ge){te.pendingLanes|=ge,ge!==268435456&&(te.suspendedLanes=0,te.pingedLanes=0,te.warmLanes=0)}function Gs(te,ge,qe,ct,Xt,Tr){var ri=te.pendingLanes;te.pendingLanes=qe,te.suspendedLanes=0,te.pingedLanes=0,te.warmLanes=0,te.expiredLanes&=qe,te.entangledLanes&=qe,te.errorRecoveryDisabledLanes&=qe,te.shellSuspendCounter=0;var Gi=te.entanglements,co=te.expirationTimes,Ts=te.hiddenUpdates;for(qe=ri&~qe;0<qe;){var bl=31-sa(qe),Dl=1<<bl;Gi[bl]=0,co[bl]=-1;var Ls=Ts[bl];if(Ls!==null)for(Ts[bl]=null,bl=0;bl<Ls.length;bl++){var Es=Ls[bl];Es!==null&&(Es.lane&=-536870913)}qe&=~Dl}ct!==0&&Ns(te,ct,0),Tr!==0&&Xt===0&&te.tag!==0&&(te.suspendedLanes|=Tr&~(ri&~ge))}function Ns(te,ge,qe){te.pendingLanes|=ge,te.suspendedLanes&=~ge;var ct=31-sa(ge);te.entangledLanes|=ge,te.entanglements[ct]=te.entanglements[ct]|1073741824|qe&4194090}function Hl(te,ge){var qe=te.entangledLanes|=ge;for(te=te.entanglements;qe;){var ct=31-sa(qe),Xt=1<<ct;Xt&ge|te[ct]&ge&&(te[ct]|=ge),qe&=~Xt}}function nu(te){switch(te){case 2:te=1;break;case 8:te=4;break;case 32:te=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:te=128;break;case 268435456:te=134217728;break;default:te=0}return te}function su(te){return te&=-te,2<te?8<te?(te&134217727)!==0?32:268435456:8:2}function Mc(){var te=dr.p;return te!==0?te:(te=window.event,te===void 0?32:SI(te.type))}function da(te,ge){var qe=dr.p;try{return dr.p=te,ge()}finally{dr.p=qe}}var Xa=Math.random().toString(36).slice(2),Oo="__reactFiber$"+Xa,_s="__reactProps$"+Xa,nl="__reactContainer$"+Xa,vu="__reactEvents$"+Xa,zl="__reactListeners$"+Xa,jl="__reactHandles$"+Xa,Il="__reactResources$"+Xa,Js="__reactMarker$"+Xa;function Vl(te){delete te[Oo],delete te[_s],delete te[vu],delete te[zl],delete te[jl]}function zn(te){var ge=te[Oo];if(ge)return ge;for(var qe=te.parentNode;qe;){if(ge=qe[nl]||qe[Oo]){if(qe=ge.alternate,ge.child!==null||qe!==null&&qe.child!==null)for(te=I4(te);te!==null;){if(qe=te[Oo])return qe;te=I4(te)}return ge}te=qe,qe=te.parentNode}return null}function Ni(te){if(te=te[Oo]||te[nl]){var ge=te.tag;if(ge===5||ge===6||ge===13||ge===26||ge===27||ge===3)return te}return null}function Za(te){var ge=te.tag;if(ge===5||ge===26||ge===27||ge===6)return te.stateNode;throw Error(n(33))}function ts(te){var ge=te[Il];return ge||(ge=te[Il]={hoistableStyles:new Map,hoistableScripts:new Map}),ge}function ps(te){te[Js]=!0}var Mi=new Set,to={};function Dn(te,ge){ea(te,ge),ea(te+"Capture",ge)}function ea(te,ge){for(to[te]=ge,te=0;te<ge.length;te++)Mi.add(ge[te])}var pa=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]*$"),ja={},_a={};function Zs(te){return jn.call(_a,te)?!0:jn.call(ja,te)?!1:pa.test(te)?_a[te]=!0:(ja[te]=!0,!1)}function ks(te,ge,qe){if(Zs(ge))if(qe===null)te.removeAttribute(ge);else{switch(typeof qe){case"undefined":case"function":case"symbol":te.removeAttribute(ge);return;case"boolean":var ct=ge.toLowerCase().slice(0,5);if(ct!=="data-"&&ct!=="aria-"){te.removeAttribute(ge);return}}te.setAttribute(ge,""+qe)}}function el(te,ge,qe){if(qe===null)te.removeAttribute(ge);else{switch(typeof qe){case"undefined":case"function":case"symbol":case"boolean":te.removeAttribute(ge);return}te.setAttribute(ge,""+qe)}}function ol(te,ge,qe,ct){if(ct===null)te.removeAttribute(qe);else{switch(typeof ct){case"undefined":case"function":case"symbol":case"boolean":te.removeAttribute(qe);return}te.setAttributeNS(ge,qe,""+ct)}}var tl,il;function Gl(te){if(tl===void 0)try{throw Error()}catch(qe){var ge=qe.stack.trim().match(/\n( *(at )?)/);tl=ge&&ge[1]||"",il=-1<qe.stack.indexOf(`
    at`)?" (<anonymous>)":-1<qe.stack.indexOf("@")?"@unknown:0:0":""}return`
`+tl+te+il}var Qu=!1;function ic(te,ge){if(!te||Qu)return"";Qu=!0;var qe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var ct={DetermineComponentFrameRoot:function(){try{if(ge){var Dl=function(){throw Error()};if(Object.defineProperty(Dl.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Dl,[])}catch(Es){var Ls=Es}Reflect.construct(te,[],Dl)}else{try{Dl.call()}catch(Es){Ls=Es}te.call(Dl.prototype)}}else{try{throw Error()}catch(Es){Ls=Es}(Dl=te())&&typeof Dl.catch=="function"&&Dl.catch(function(){})}}catch(Es){if(Es&&Ls&&typeof Es.stack=="string")return[Es.stack,Ls.stack]}return[null,null]}};ct.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var Xt=Object.getOwnPropertyDescriptor(ct.DetermineComponentFrameRoot,"name");Xt&&Xt.configurable&&Object.defineProperty(ct.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var Tr=ct.DetermineComponentFrameRoot(),ri=Tr[0],Gi=Tr[1];if(ri&&Gi){var co=ri.split(`
`),Ts=Gi.split(`
`);for(Xt=ct=0;ct<co.length&&!co[ct].includes("DetermineComponentFrameRoot");)ct++;for(;Xt<Ts.length&&!Ts[Xt].includes("DetermineComponentFrameRoot");)Xt++;if(ct===co.length||Xt===Ts.length)for(ct=co.length-1,Xt=Ts.length-1;1<=ct&&0<=Xt&&co[ct]!==Ts[Xt];)Xt--;for(;1<=ct&&0<=Xt;ct--,Xt--)if(co[ct]!==Ts[Xt]){if(ct!==1||Xt!==1)do if(ct--,Xt--,0>Xt||co[ct]!==Ts[Xt]){var bl=`
`+co[ct].replace(" at new "," at ");return te.displayName&&bl.includes("<anonymous>")&&(bl=bl.replace("<anonymous>",te.displayName)),bl}while(1<=ct&&0<=Xt);break}}}finally{Qu=!1,Error.prepareStackTrace=qe}return(qe=te?te.displayName||te.name:"")?Gl(qe):""}function rf(te){switch(te.tag){case 26:case 27:case 5:return Gl(te.type);case 16:return Gl("Lazy");case 13:return Gl("Suspense");case 19:return Gl("SuspenseList");case 0:case 15:return ic(te.type,!1);case 11:return ic(te.type.render,!1);case 1:return ic(te.type,!0);case 31:return Gl("Activity");default:return""}}function Sd(te){try{var ge="";do ge+=rf(te),te=te.return;while(te);return ge}catch(qe){return`
Error generating stack: `+qe.message+`
`+qe.stack}}function yc(te){switch(typeof te){case"bigint":case"boolean":case"number":case"string":case"undefined":return te;case"object":return te;default:return""}}function ii(te){var ge=te.type;return(te=te.nodeName)&&te.toLowerCase()==="input"&&(ge==="checkbox"||ge==="radio")}function xh(te){var ge=ii(te)?"checked":"value",qe=Object.getOwnPropertyDescriptor(te.constructor.prototype,ge),ct=""+te[ge];if(!te.hasOwnProperty(ge)&&typeof qe<"u"&&typeof qe.get=="function"&&typeof qe.set=="function"){var Xt=qe.get,Tr=qe.set;return Object.defineProperty(te,ge,{configurable:!0,get:function(){return Xt.call(this)},set:function(ri){ct=""+ri,Tr.call(this,ri)}}),Object.defineProperty(te,ge,{enumerable:qe.enumerable}),{getValue:function(){return ct},setValue:function(ri){ct=""+ri},stopTracking:function(){te._valueTracker=null,delete te[ge]}}}}function pd(te){te._valueTracker||(te._valueTracker=xh(te))}function Ip(te){if(!te)return!1;var ge=te._valueTracker;if(!ge)return!0;var qe=ge.getValue(),ct="";return te&&(ct=ii(te)?te.checked?"true":"false":te.value),te=ct,te!==qe?(ge.setValue(te),!0):!1}function jf(te){if(te=te||(typeof document<"u"?document:void 0),typeof te>"u")return null;try{return te.activeElement||te.body}catch{return te.body}}var ih=/[\n"\\]/g;function Td(te){return te.replace(ih,function(ge){return"\\"+ge.charCodeAt(0).toString(16)+" "})}function Yc(te,ge,qe,ct,Xt,Tr,ri,Gi){te.name="",ri!=null&&typeof ri!="function"&&typeof ri!="symbol"&&typeof ri!="boolean"?te.type=ri:te.removeAttribute("type"),ge!=null?ri==="number"?(ge===0&&te.value===""||te.value!=ge)&&(te.value=""+yc(ge)):te.value!==""+yc(ge)&&(te.value=""+yc(ge)):ri!=="submit"&&ri!=="reset"||te.removeAttribute("value"),ge!=null?Tc(te,ri,yc(ge)):qe!=null?Tc(te,ri,yc(qe)):ct!=null&&te.removeAttribute("value"),Xt==null&&Tr!=null&&(te.defaultChecked=!!Tr),Xt!=null&&(te.checked=Xt&&typeof Xt!="function"&&typeof Xt!="symbol"),Gi!=null&&typeof Gi!="function"&&typeof Gi!="symbol"&&typeof Gi!="boolean"?te.name=""+yc(Gi):te.removeAttribute("name")}function ep(te,ge,qe,ct,Xt,Tr,ri,Gi){if(Tr!=null&&typeof Tr!="function"&&typeof Tr!="symbol"&&typeof Tr!="boolean"&&(te.type=Tr),ge!=null||qe!=null){if(!(Tr!=="submit"&&Tr!=="reset"||ge!=null))return;qe=qe!=null?""+yc(qe):"",ge=ge!=null?""+yc(ge):qe,Gi||ge===te.value||(te.value=ge),te.defaultValue=ge}ct=ct??Xt,ct=typeof ct!="function"&&typeof ct!="symbol"&&!!ct,te.checked=Gi?te.checked:!!ct,te.defaultChecked=!!ct,ri!=null&&typeof ri!="function"&&typeof ri!="symbol"&&typeof ri!="boolean"&&(te.name=ri)}function Tc(te,ge,qe){ge==="number"&&jf(te.ownerDocument)===te||te.defaultValue===""+qe||(te.defaultValue=""+qe)}function pf(te,ge,qe,ct){if(te=te.options,ge){ge={};for(var Xt=0;Xt<qe.length;Xt++)ge["$"+qe[Xt]]=!0;for(qe=0;qe<te.length;qe++)Xt=ge.hasOwnProperty("$"+te[qe].value),te[qe].selected!==Xt&&(te[qe].selected=Xt),Xt&&ct&&(te[qe].defaultSelected=!0)}else{for(qe=""+yc(qe),ge=null,Xt=0;Xt<te.length;Xt++){if(te[Xt].value===qe){te[Xt].selected=!0,ct&&(te[Xt].defaultSelected=!0);return}ge!==null||te[Xt].disabled||(ge=te[Xt])}ge!==null&&(ge.selected=!0)}}function Tf(te,ge,qe){if(ge!=null&&(ge=""+yc(ge),ge!==te.value&&(te.value=ge),qe==null)){te.defaultValue!==ge&&(te.defaultValue=ge);return}te.defaultValue=qe!=null?""+yc(qe):""}function T1(te,ge,qe,ct){if(ge==null){if(ct!=null){if(qe!=null)throw Error(n(92));if(qt(ct)){if(1<ct.length)throw Error(n(93));ct=ct[0]}qe=ct}qe==null&&(qe=""),ge=qe}qe=yc(ge),te.defaultValue=qe,ct=te.textContent,ct===qe&&ct!==""&&ct!==null&&(te.value=ct)}function eg(te,ge){if(ge){var qe=te.firstChild;if(qe&&qe===te.lastChild&&qe.nodeType===3){qe.nodeValue=ge;return}}te.textContent=ge}var Om=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 bE(te,ge,qe){var ct=ge.indexOf("--")===0;qe==null||typeof qe=="boolean"||qe===""?ct?te.setProperty(ge,""):ge==="float"?te.cssFloat="":te[ge]="":ct?te.setProperty(ge,qe):typeof qe!="number"||qe===0||Om.has(ge)?ge==="float"?te.cssFloat=qe:te[ge]=(""+qe).trim():te[ge]=qe+"px"}function tp(te,ge,qe){if(ge!=null&&typeof ge!="object")throw Error(n(62));if(te=te.style,qe!=null){for(var ct in qe)!qe.hasOwnProperty(ct)||ge!=null&&ge.hasOwnProperty(ct)||(ct.indexOf("--")===0?te.setProperty(ct,""):ct==="float"?te.cssFloat="":te[ct]="");for(var Xt in ge)ct=ge[Xt],ge.hasOwnProperty(Xt)&&qe[Xt]!==ct&&bE(te,Xt,ct)}else for(var Tr in ge)ge.hasOwnProperty(Tr)&&bE(te,Tr,ge[Tr])}function E1(te){if(te.indexOf("-")===-1)return!1;switch(te){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 tg=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"]]),ah=/^[\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 Ug(te){return ah.test(""+te)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":te}var Wp=null;function Hg(te){return te=te.target||te.srcElement||window,te.correspondingUseElement&&(te=te.correspondingUseElement),te.nodeType===3?te.parentNode:te}var G_=null,Jd=null;function pA(te){var ge=Ni(te);if(ge&&(te=ge.stateNode)){var qe=te[_s]||null;e:switch(te=ge.stateNode,ge.type){case"input":if(Yc(te,qe.value,qe.defaultValue,qe.defaultValue,qe.checked,qe.defaultChecked,qe.type,qe.name),ge=qe.name,qe.type==="radio"&&ge!=null){for(qe=te;qe.parentNode;)qe=qe.parentNode;for(qe=qe.querySelectorAll('input[name="'+Td(""+ge)+'"][type="radio"]'),ge=0;ge<qe.length;ge++){var ct=qe[ge];if(ct!==te&&ct.form===te.form){var Xt=ct[_s]||null;if(!Xt)throw Error(n(90));Yc(ct,Xt.value,Xt.defaultValue,Xt.defaultValue,Xt.checked,Xt.defaultChecked,Xt.type,Xt.name)}}for(ge=0;ge<qe.length;ge++)ct=qe[ge],ct.form===te.form&&Ip(ct)}break e;case"textarea":Tf(te,qe.value,qe.defaultValue);break e;case"select":ge=qe.value,ge!=null&&pf(te,!!qe.multiple,ge,!1)}}}var xE=!1;function lM(te,ge,qe){if(xE)return te(ge,qe);xE=!0;try{var ct=te(ge);return ct}finally{if(xE=!1,(G_!==null||Jd!==null)&&(yw(),G_&&(ge=G_,te=Jd,Jd=G_=null,pA(ge),te)))for(ge=0;ge<te.length;ge++)pA(te[ge])}}function n_(te,ge){var qe=te.stateNode;if(qe===null)return null;var ct=qe[_s]||null;if(ct===null)return null;qe=ct[ge];e:switch(ge){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(ct=!ct.disabled)||(te=te.type,ct=!(te==="button"||te==="input"||te==="select"||te==="textarea")),te=!ct;break e;default:te=!1}if(te)return null;if(qe&&typeof qe!="function")throw Error(n(231,ge,typeof qe));return qe}var rb=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),J2=!1;if(rb)try{var _g={};Object.defineProperty(_g,"passive",{get:function(){J2=!0}}),window.addEventListener("test",_g,_g),window.removeEventListener("test",_g,_g)}catch{J2=!1}var A1=null,Xw=null,vA=null;function wg(){if(vA)return vA;var te,ge=Xw,qe=ge.length,ct,Xt="value"in A1?A1.value:A1.textContent,Tr=Xt.length;for(te=0;te<qe&&ge[te]===Xt[te];te++);var ri=qe-te;for(ct=1;ct<=ri&&ge[qe-ct]===Xt[Tr-ct];ct++);return vA=Xt.slice(te,1<ct?1-ct:void 0)}function Pp(te){var ge=te.keyCode;return"charCode"in te?(te=te.charCode,te===0&&ge===13&&(te=13)):te=ge,te===10&&(te=13),32<=te||te===13?te:0}function jp(){return!0}function t0(){return!1}function vd(te){function ge(qe,ct,Xt,Tr,ri){this._reactName=qe,this._targetInst=Xt,this.type=ct,this.nativeEvent=Tr,this.target=ri,this.currentTarget=null;for(var Gi in te)te.hasOwnProperty(Gi)&&(qe=te[Gi],this[Gi]=qe?qe(Tr):Tr[Gi]);return this.isDefaultPrevented=(Tr.defaultPrevented!=null?Tr.defaultPrevented:Tr.returnValue===!1)?jp:t0,this.isPropagationStopped=t0,this}return L(ge.prototype,{preventDefault:function(){this.defaultPrevented=!0;var qe=this.nativeEvent;qe&&(qe.preventDefault?qe.preventDefault():typeof qe.returnValue!="unknown"&&(qe.returnValue=!1),this.isDefaultPrevented=jp)},stopPropagation:function(){var qe=this.nativeEvent;qe&&(qe.stopPropagation?qe.stopPropagation():typeof qe.cancelBubble!="unknown"&&(qe.cancelBubble=!0),this.isPropagationStopped=jp)},persist:function(){},isPersistent:jp}),ge}var Qd={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(te){return te.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},$_=vd(Qd),v0=L({},Qd,{view:0,detail:0}),mA=vd(v0),W_,ec,Nv,Wy=L({},v0,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Lb,button:0,buttons:0,relatedTarget:function(te){return te.relatedTarget===void 0?te.fromElement===te.srcElement?te.toElement:te.fromElement:te.relatedTarget},movementX:function(te){return"movementX"in te?te.movementX:(te!==Nv&&(Nv&&te.type==="mousemove"?(W_=te.screenX-Nv.screenX,ec=te.screenY-Nv.screenY):ec=W_=0,Nv=te),W_)},movementY:function(te){return"movementY"in te?te.movementY:ec}}),Pb=vd(Wy),gx=L({},Wy,{dataTransfer:0}),Yu=vd(gx),ov=L({},v0,{relatedTarget:0}),_E=vd(ov),Z5=L({},Qd,{animationName:0,elapsedTime:0,pseudoElement:0}),gA=vd(Z5),K5=L({},Qd,{clipboardData:function(te){return"clipboardData"in te?te.clipboardData:window.clipboardData}}),J5=vd(K5),wE=L({},Qd,{data:0}),Vp=vd(wE),i_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Db={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"},Q5={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function SE(te){var ge=this.nativeEvent;return ge.getModifierState?ge.getModifierState(te):(te=Q5[te])?!!ge[te]:!1}function Lb(){return SE}var yA=L({},v0,{key:function(te){if(te.key){var ge=i_[te.key]||te.key;if(ge!=="Unidentified")return ge}return te.type==="keypress"?(te=Pp(te),te===13?"Enter":String.fromCharCode(te)):te.type==="keydown"||te.type==="keyup"?Db[te.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Lb,charCode:function(te){return te.type==="keypress"?Pp(te):0},keyCode:function(te){return te.type==="keydown"||te.type==="keyup"?te.keyCode:0},which:function(te){return te.type==="keypress"?Pp(te):te.type==="keydown"||te.type==="keyup"?te.keyCode:0}}),TE=vd(yA),Qv=L({},Wy,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),dy=vd(Qv),uM=L({},v0,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Lb}),aT=vd(uM),bA=L({},Qd,{propertyName:0,elapsedTime:0,pseudoElement:0}),Y_=vd(bA),cM=L({},Wy,{deltaX:function(te){return"deltaX"in te?te.deltaX:"wheelDeltaX"in te?-te.wheelDeltaX:0},deltaY:function(te){return"deltaY"in te?te.deltaY:"wheelDeltaY"in te?-te.wheelDeltaY:"wheelDelta"in te?-te.wheelDelta:0},deltaZ:0,deltaMode:0}),fM=vd(cM),eR=L({},Qd,{newState:0,oldState:0}),a_=vd(eR),C1=[9,13,27,32],xA=rb&&"CompositionEvent"in window,Q2=null;rb&&"documentMode"in document&&(Q2=document.documentMode);var EE=rb&&"TextEvent"in window&&!Q2,Dp=rb&&(!xA||Q2&&8<Q2&&11>=Q2),m0=" ",jg=!1;function oT(te,ge){switch(te){case"keyup":return C1.indexOf(ge.keyCode)!==-1;case"keydown":return ge.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function sT(te){return te=te.detail,typeof te=="object"&&"data"in te?te.data:null}var yx=!1;function o_(te,ge){switch(te){case"compositionend":return sT(ge);case"keypress":return ge.which!==32?null:(jg=!0,m0);case"textInput":return te=ge.data,te===m0&&jg?null:te;default:return null}}function AE(te,ge){if(yx)return te==="compositionend"||!xA&&oT(te,ge)?(te=wg(),vA=Xw=A1=null,yx=!1,te):null;switch(te){case"paste":return null;case"keypress":if(!(ge.ctrlKey||ge.altKey||ge.metaKey)||ge.ctrlKey&&ge.altKey){if(ge.char&&1<ge.char.length)return ge.char;if(ge.which)return String.fromCharCode(ge.which)}return null;case"compositionend":return Dp&&ge.locale!=="ko"?null:ge.data;default:return null}}var hy={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 eS(te){var ge=te&&te.nodeName&&te.nodeName.toLowerCase();return ge==="input"?!!hy[te.type]:ge==="textarea"}function Nm(te,ge,qe,ct){G_?Jd?Jd.push(ct):Jd=[ct]:G_=ct,ge=xR(ge,"onChange"),0<ge.length&&(qe=new $_("onChange","change",null,qe,ct),te.push({event:qe,listeners:ge}))}var tS=null,X_=null;function dM(te){v6(te,0)}function CE(te){var ge=Za(te);if(Ip(ge))return te}function _A(te,ge){if(te==="change")return ge}var wA=!1;if(rb){var hM;if(rb){var s_="oninput"in document;if(!s_){var ME=document.createElement("div");ME.setAttribute("oninput","return;"),s_=typeof ME.oninput=="function"}hM=s_}else hM=!1;wA=hM&&(!document.documentMode||9<document.documentMode)}function mm(){tS&&(tS.detachEvent("onpropertychange",SA),X_=tS=null)}function SA(te){if(te.propertyName==="value"&&CE(X_)){var ge=[];Nm(ge,X_,te,Hg(te)),lM(dM,ge)}}function lT(te,ge,qe){te==="focusin"?(mm(),tS=ge,X_=qe,tS.attachEvent("onpropertychange",SA)):te==="focusout"&&mm()}function bx(te){if(te==="selectionchange"||te==="keyup"||te==="keydown")return CE(X_)}function Zw(te,ge){if(te==="click")return CE(ge)}function rS(te,ge){if(te==="input"||te==="change")return CE(ge)}function Yk(te,ge){return te===ge&&(te!==0||1/te===1/ge)||te!==te&&ge!==ge}var nb=typeof Object.is=="function"?Object.is:Yk;function Yy(te,ge){if(nb(te,ge))return!0;if(typeof te!="object"||te===null||typeof ge!="object"||ge===null)return!1;var qe=Object.keys(te),ct=Object.keys(ge);if(qe.length!==ct.length)return!1;for(ct=0;ct<qe.length;ct++){var Xt=qe[ct];if(!jn.call(ge,Xt)||!nb(te[Xt],ge[Xt]))return!1}return!0}function Fm(te){for(;te&&te.firstChild;)te=te.firstChild;return te}function pM(te,ge){var qe=Fm(te);te=0;for(var ct;qe;){if(qe.nodeType===3){if(ct=te+qe.textContent.length,te<=ge&&ct>=ge)return{node:qe,offset:ge-te};te=ct}e:{for(;qe;){if(qe.nextSibling){qe=qe.nextSibling;break e}qe=qe.parentNode}qe=void 0}qe=Fm(qe)}}function tR(te,ge){return te&&ge?te===ge?!0:te&&te.nodeType===3?!1:ge&&ge.nodeType===3?tR(te,ge.parentNode):"contains"in te?te.contains(ge):te.compareDocumentPosition?!!(te.compareDocumentPosition(ge)&16):!1:!1}function rR(te){te=te!=null&&te.ownerDocument!=null&&te.ownerDocument.defaultView!=null?te.ownerDocument.defaultView:window;for(var ge=jf(te.document);ge instanceof te.HTMLIFrameElement;){try{var qe=typeof ge.contentWindow.location.href=="string"}catch{qe=!1}if(qe)te=ge.contentWindow;else break;ge=jf(te.document)}return ge}function TA(te){var ge=te&&te.nodeName&&te.nodeName.toLowerCase();return ge&&(ge==="input"&&(te.type==="text"||te.type==="search"||te.type==="tel"||te.type==="url"||te.type==="password")||ge==="textarea"||te.contentEditable==="true")}var RE=rb&&"documentMode"in document&&11>=document.documentMode,Kw=null,Jw=null,Yo=null,al=!1;function Fs(te,ge,qe){var ct=qe.window===qe?qe.document:qe.nodeType===9?qe:qe.ownerDocument;al||Kw==null||Kw!==jf(ct)||(ct=Kw,"selectionStart"in ct&&TA(ct)?ct={start:ct.selectionStart,end:ct.selectionEnd}:(ct=(ct.ownerDocument&&ct.ownerDocument.defaultView||window).getSelection(),ct={anchorNode:ct.anchorNode,anchorOffset:ct.anchorOffset,focusNode:ct.focusNode,focusOffset:ct.focusOffset}),Yo&&Yy(Yo,ct)||(Yo=ct,ct=xR(Jw,"onSelect"),0<ct.length&&(ge=new $_("onSelect","select",null,ge,qe),te.push({event:ge,listeners:ct}),ge.target=Kw)))}function hu(te,ge){var qe={};return qe[te.toLowerCase()]=ge.toLowerCase(),qe["Webkit"+te]="webkit"+ge,qe["Moz"+te]="moz"+ge,qe}var Xc={animationend:hu("Animation","AnimationEnd"),animationiteration:hu("Animation","AnimationIteration"),animationstart:hu("Animation","AnimationStart"),transitionrun:hu("Transition","TransitionRun"),transitionstart:hu("Transition","TransitionStart"),transitioncancel:hu("Transition","TransitionCancel"),transitionend:hu("Transition","TransitionEnd")},Kc={},Vg={};rb&&(Vg=document.createElement("div").style,"AnimationEvent"in window||(delete Xc.animationend.animation,delete Xc.animationiteration.animation,delete Xc.animationstart.animation),"TransitionEvent"in window||delete Xc.transitionend.transition);function zh(te){if(Kc[te])return Kc[te];if(!Xc[te])return te;var ge=Xc[te],qe;for(qe in ge)if(ge.hasOwnProperty(qe)&&qe in Vg)return Kc[te]=ge[qe];return te}var py=zh("animationend"),kE=zh("animationiteration"),Vf=zh("animationstart"),IE=zh("transitionrun"),Z_=zh("transitionstart"),l_=zh("transitioncancel"),xx=zh("transitionend"),uT=new Map,Bh="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(" ");Bh.push("scrollEnd");function gm(te,ge){uT.set(te,ge),Dn(ge,[te])}var PE=new WeakMap;function Sg(te,ge){if(typeof te=="object"&&te!==null){var qe=PE.get(te);return qe!==void 0?qe:(ge={value:te,source:ge,stack:Sd(ge)},PE.set(te,ge),ge)}return{value:te,source:ge,stack:Sd(ge)}}var vy=[],_x=0,vM=0;function Qw(){for(var te=_x,ge=vM=_x=0;ge<te;){var qe=vy[ge];vy[ge++]=null;var ct=vy[ge];vy[ge++]=null;var Xt=vy[ge];vy[ge++]=null;var Tr=vy[ge];if(vy[ge++]=null,ct!==null&&Xt!==null){var ri=ct.pending;ri===null?Xt.next=Xt:(Xt.next=ri.next,ri.next=Xt),ct.pending=Xt}Tr!==0&&R1(qe,Xt,Tr)}}function M1(te,ge,qe,ct){vy[_x++]=te,vy[_x++]=ge,vy[_x++]=qe,vy[_x++]=ct,vM|=ct,te.lanes|=ct,te=te.alternate,te!==null&&(te.lanes|=ct)}function cT(te,ge,qe,ct){return M1(te,ge,qe,ct),fT(te)}function ib(te,ge){return M1(te,null,null,ge),fT(te)}function R1(te,ge,qe){te.lanes|=qe;var ct=te.alternate;ct!==null&&(ct.lanes|=qe);for(var Xt=!1,Tr=te.return;Tr!==null;)Tr.childLanes|=qe,ct=Tr.alternate,ct!==null&&(ct.childLanes|=qe),Tr.tag===22&&(te=Tr.stateNode,te===null||te._visibility&1||(Xt=!0)),te=Tr,Tr=Tr.return;return te.tag===3?(Tr=te.stateNode,Xt&&ge!==null&&(Xt=31-sa(qe),te=Tr.hiddenUpdates,ct=te[Xt],ct===null?te[Xt]=[ge]:ct.push(ge),ge.lane=qe|536870912),Tr):null}function fT(te){if(50<E_)throw E_=0,IT=null,Error(n(185));for(var ge=te.return;ge!==null;)te=ge,ge=te.return;return te.tag===3?te.stateNode:null}var r0={};function Xy(te,ge,qe,ct){this.tag=te,this.key=qe,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=ge,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=ct,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function g0(te,ge,qe,ct){return new Xy(te,ge,qe,ct)}function y0(te){return te=te.prototype,!(!te||!te.isReactComponent)}function Ch(te,ge){var qe=te.alternate;return qe===null?(qe=g0(te.tag,ge,te.key,te.mode),qe.elementType=te.elementType,qe.type=te.type,qe.stateNode=te.stateNode,qe.alternate=te,te.alternate=qe):(qe.pendingProps=ge,qe.type=te.type,qe.flags=0,qe.subtreeFlags=0,qe.deletions=null),qe.flags=te.flags&65011712,qe.childLanes=te.childLanes,qe.lanes=te.lanes,qe.child=te.child,qe.memoizedProps=te.memoizedProps,qe.memoizedState=te.memoizedState,qe.updateQueue=te.updateQueue,ge=te.dependencies,qe.dependencies=ge===null?null:{lanes:ge.lanes,firstContext:ge.firstContext},qe.sibling=te.sibling,qe.index=te.index,qe.ref=te.ref,qe.refCleanup=te.refCleanup,qe}function DE(te,ge){te.flags&=65011714;var qe=te.alternate;return qe===null?(te.childLanes=0,te.lanes=ge,te.child=null,te.subtreeFlags=0,te.memoizedProps=null,te.memoizedState=null,te.updateQueue=null,te.dependencies=null,te.stateNode=null):(te.childLanes=qe.childLanes,te.lanes=qe.lanes,te.child=qe.child,te.subtreeFlags=0,te.deletions=null,te.memoizedProps=qe.memoizedProps,te.memoizedState=qe.memoizedState,te.updateQueue=qe.updateQueue,te.type=qe.type,ge=qe.dependencies,te.dependencies=ge===null?null:{lanes:ge.lanes,firstContext:ge.firstContext}),te}function rg(te,ge,qe,ct,Xt,Tr){var ri=0;if(ct=te,typeof te=="function")y0(te)&&(ri=1);else if(typeof te=="string")ri=MR(te,qe,or.current)?26:te==="html"||te==="head"||te==="body"?27:5;else e:switch(te){case Je:return te=g0(31,qe,ge,Xt),te.elementType=Je,te.lanes=Tr,te;case ie:return e2(qe.children,Xt,Tr,ge);case de:ri=8,Xt|=24;break;case ae:return te=g0(12,qe,ge,Xt|2),te.elementType=ae,te.lanes=Tr,te;case Me:return te=g0(13,qe,ge,Xt),te.elementType=Me,te.lanes=Tr,te;case Ie:return te=g0(19,qe,ge,Xt),te.elementType=Ie,te.lanes=Tr,te;default:if(typeof te=="object"&&te!==null)switch(te.$$typeof){case U:case Se:ri=10;break e;case ve:ri=9;break e;case Pe:ri=11;break e;case Ve:ri=14;break e;case Ze:ri=16,ct=null;break e}ri=29,qe=Error(n(130,te===null?"null":typeof te,"")),ct=null}return ge=g0(ri,qe,ge,Xt),ge.elementType=te,ge.type=ct,ge.lanes=Tr,ge}function e2(te,ge,qe,ct){return te=g0(7,te,ct,ge),te.lanes=qe,te}function EA(te,ge,qe){return te=g0(6,te,null,ge),te.lanes=qe,te}function Zy(te,ge,qe){return ge=g0(4,te.children!==null?te.children:[],te.key,ge),ge.lanes=qe,ge.stateNode={containerInfo:te.containerInfo,pendingChildren:null,implementation:te.implementation},ge}var b0=[],zm=0,k1=null,my=0,gy=[],F0=0,em=null,tm=1,u_="";function Ob(te,ge){b0[zm++]=my,b0[zm++]=k1,k1=te,my=ge}function qg(te,ge,qe){gy[F0++]=tm,gy[F0++]=u_,gy[F0++]=em,em=te;var ct=tm;te=u_;var Xt=32-sa(ct)-1;ct&=~(1<<Xt),qe+=1;var Tr=32-sa(ge)+Xt;if(30<Tr){var ri=Xt-Xt%5;Tr=(ct&(1<<ri)-1).toString(32),ct>>=ri,Xt-=ri,tm=1<<32-sa(ge)+Xt|qe<<Xt|ct,u_=Tr+te}else tm=1<<Tr|qe<<Xt|ct,u_=te}function AA(te){te.return!==null&&(Ob(te,1),qg(te,1,0))}function z0(te){for(;te===k1;)k1=b0[--zm],b0[zm]=null,my=b0[--zm],b0[zm]=null;for(;te===em;)em=gy[--F0],gy[F0]=null,u_=gy[--F0],gy[F0]=null,tm=gy[--F0],gy[F0]=null}var ng=null,sv=null,qd=!1,Ky=null,B0=!1,t2=Error(n(519));function Jy(te){var ge=Error(n(418,""));throw K_(Sg(ge,te)),t2}function CA(te){var ge=te.stateNode,qe=te.type,ct=te.memoizedProps;switch(ge[Oo]=te,ge[_s]=ct,qe){case"dialog":Uh("cancel",ge),Uh("close",ge);break;case"iframe":case"object":case"embed":Uh("load",ge);break;case"video":case"audio":for(qe=0;qe<d3.length;qe++)Uh(d3[qe],ge);break;case"source":Uh("error",ge);break;case"img":case"image":case"link":Uh("error",ge),Uh("load",ge);break;case"details":Uh("toggle",ge);break;case"input":Uh("invalid",ge),ep(ge,ct.value,ct.defaultValue,ct.checked,ct.defaultChecked,ct.type,ct.name,!0),pd(ge);break;case"select":Uh("invalid",ge);break;case"textarea":Uh("invalid",ge),T1(ge,ct.value,ct.defaultValue,ct.children),pd(ge)}qe=ct.children,typeof qe!="string"&&typeof qe!="number"&&typeof qe!="bigint"||ge.textContent===""+qe||ct.suppressHydrationWarning===!0||_R(ge.textContent,qe)?(ct.popover!=null&&(Uh("beforetoggle",ge),Uh("toggle",ge)),ct.onScroll!=null&&Uh("scroll",ge),ct.onScrollEnd!=null&&Uh("scrollend",ge),ct.onClick!=null&&(ge.onclick=FM),ge=!0):ge=!1,ge||Jy(te)}function MA(te){for(ng=te.return;ng;)switch(ng.tag){case 5:case 13:B0=!1;return;case 27:case 3:B0=!0;return;default:ng=ng.return}}function c_(te){if(te!==ng)return!1;if(!qd)return MA(te),qd=!0,!1;var ge=te.tag,qe;if((qe=ge!==3&&ge!==27)&&((qe=ge===5)&&(qe=te.type,qe=!(qe!=="form"&&qe!=="button")||wR(te.type,te.memoizedProps)),qe=!qe),qe&&sv&&Jy(te),MA(te),ge===13){if(te=te.memoizedState,te=te!==null?te.dehydrated:null,!te)throw Error(n(317));e:{for(te=te.nextSibling,ge=0;te;){if(te.nodeType===8)if(qe=te.data,qe==="/$"){if(ge===0){sv=_w(te.nextSibling);break e}ge--}else qe!=="$"&&qe!=="$!"&&qe!=="$?"||ge++;te=te.nextSibling}sv=null}}else ge===27?(ge=sv,a1(te.type)?(te=dI,dI=null,sv=te):sv=ge):sv=ng?_w(te.stateNode.nextSibling):null;return!0}function LE(){sv=ng=null,qd=!1}function Rf(){var te=Ky;return te!==null&&(If===null?If=te:If.push.apply(If,te),Ky=null),te}function K_(te){Ky===null?Ky=[te]:Ky.push(te)}var dT=Vt(null),f_=null,Vi=null;function ab(te,ge,qe){sr(dT,ge._currentValue),ge._currentValue=qe}function wx(te){te._currentValue=dT.current,Er(dT)}function ob(te,ge,qe){for(;te!==null;){var ct=te.alternate;if((te.childLanes&ge)!==ge?(te.childLanes|=ge,ct!==null&&(ct.childLanes|=ge)):ct!==null&&(ct.childLanes&ge)!==ge&&(ct.childLanes|=ge),te===qe)break;te=te.return}}function eh(te,ge,qe,ct){var Xt=te.child;for(Xt!==null&&(Xt.return=te);Xt!==null;){var Tr=Xt.dependencies;if(Tr!==null){var ri=Xt.child;Tr=Tr.firstContext;e:for(;Tr!==null;){var Gi=Tr;Tr=Xt;for(var co=0;co<ge.length;co++)if(Gi.context===ge[co]){Tr.lanes|=qe,Gi=Tr.alternate,Gi!==null&&(Gi.lanes|=qe),ob(Tr.return,qe,te),ct||(ri=null);break e}Tr=Gi.next}}else if(Xt.tag===18){if(ri=Xt.return,ri===null)throw Error(n(341));ri.lanes|=qe,Tr=ri.alternate,Tr!==null&&(Tr.lanes|=qe),ob(ri,qe,te),ri=null}else ri=Xt.child;if(ri!==null)ri.return=Xt;else for(ri=Xt;ri!==null;){if(ri===te){ri=null;break}if(Xt=ri.sibling,Xt!==null){Xt.return=ri.return,ri=Xt;break}ri=ri.return}Xt=ri}}function Sx(te,ge,qe,ct){te=null;for(var Xt=ge,Tr=!1;Xt!==null;){if(!Tr){if((Xt.flags&524288)!==0)Tr=!0;else if((Xt.flags&262144)!==0)break}if(Xt.tag===10){var ri=Xt.alternate;if(ri===null)throw Error(n(387));if(ri=ri.memoizedProps,ri!==null){var Gi=Xt.type;nb(Xt.pendingProps.value,ri.value)||(te!==null?te.push(Gi):te=[Gi])}}else if(Xt===_n.current){if(ri=Xt.alternate,ri===null)throw Error(n(387));ri.memoizedState.memoizedState!==Xt.memoizedState.memoizedState&&(te!==null?te.push(oC):te=[oC])}Xt=Xt.return}te!==null&&eh(ge,te,qe,ct),ge.flags|=262144}function hT(te){for(te=te.firstContext;te!==null;){if(!nb(te.context._currentValue,te.memoizedValue))return!0;te=te.next}return!1}function J_(te){f_=te,Vi=null,te=te.dependencies,te!==null&&(te.firstContext=null)}function wv(te){return mM(f_,te)}function OE(te,ge){return f_===null&&J_(te),mM(te,ge)}function mM(te,ge){var qe=ge._currentValue;if(ge={context:ge,memoizedValue:qe,next:null},Vi===null){if(te===null)throw Error(n(308));Vi=ge,te.dependencies={lanes:0,firstContext:ge},te.flags|=524288}else Vi=Vi.next=ge;return qe}var nR=typeof AbortController<"u"?AbortController:function(){var te=[],ge=this.signal={aborted:!1,addEventListener:function(qe,ct){te.push(ct)}};this.abort=function(){ge.aborted=!0,te.forEach(function(qe){return qe()})}},Xk=t.unstable_scheduleCallback,Zk=t.unstable_NormalPriority,Sv={$$typeof:Se,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function gM(){return{controller:new nR,data:new Map,refCount:0}}function NE(te){te.refCount--,te.refCount===0&&Xk(Zk,function(){te.controller.abort()})}var pT=null,RA=0,Nd=0,sb=null;function Nb(te,ge){if(pT===null){var qe=pT=[];RA=0,Nd=lI(),sb={status:"pending",value:void 0,then:function(ct){qe.push(ct)}}}return RA++,ge.then(FE,FE),ge}function FE(){if(--RA===0&&pT!==null){sb!==null&&(sb.status="fulfilled");var te=pT;pT=null,Nd=0,sb=null;for(var ge=0;ge<te.length;ge++)(0,te[ge])()}}function Kk(te,ge){var qe=[],ct={status:"pending",value:null,reason:null,then:function(Xt){qe.push(Xt)}};return te.then(function(){ct.status="fulfilled",ct.value=ge;for(var Xt=0;Xt<qe.length;Xt++)(0,qe[Xt])(ge)},function(Xt){for(ct.status="rejected",ct.reason=Xt,Xt=0;Xt<qe.length;Xt++)(0,qe[Xt])(void 0)}),ct}var kA=Lt.S;Lt.S=function(te,ge){typeof ge=="object"&&ge!==null&&typeof ge.then=="function"&&Nb(te,ge),kA!==null&&kA(te,ge)};var Tx=Vt(null);function lb(){var te=Tx.current;return te!==null?te:Pd.pooledCache}function IA(te,ge){ge===null?sr(Tx,Tx.current):sr(Tx,ge.pool)}function vT(){var te=lb();return te===null?null:{parent:Sv._currentValue,pool:te}}var Qy=Error(n(460)),iR=Error(n(474)),d_=Error(n(542)),PA={then:function(){}};function zE(te){return te=te.status,te==="fulfilled"||te==="rejected"}function mT(){}function gT(te,ge,qe){switch(qe=te[qe],qe===void 0?te.push(ge):qe!==ge&&(ge.then(mT,mT),ge=qe),ge.status){case"fulfilled":return ge.value;case"rejected":throw te=ge.reason,Jk(te),te;default:if(typeof ge.status=="string")ge.then(mT,mT);else{if(te=Pd,te!==null&&100<te.shellSuspendCounter)throw Error(n(482));te=ge,te.status="pending",te.then(function(ct){if(ge.status==="pending"){var Xt=ge;Xt.status="fulfilled",Xt.value=ct}},function(ct){if(ge.status==="pending"){var Xt=ge;Xt.status="rejected",Xt.reason=ct}})}switch(ge.status){case"fulfilled":return ge.value;case"rejected":throw te=ge.reason,Jk(te),te}throw Fb=ge,Qy}}var Fb=null;function aR(){if(Fb===null)throw Error(n(459));var te=Fb;return Fb=null,te}function Jk(te){if(te===Qy||te===d_)throw Error(n(483))}var h_=!1;function yT(te){te.updateQueue={baseState:te.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ef(te,ge){te=te.updateQueue,ge.updateQueue===te&&(ge.updateQueue={baseState:te.baseState,firstBaseUpdate:te.firstBaseUpdate,lastBaseUpdate:te.lastBaseUpdate,shared:te.shared,callbacks:null})}function p_(te){return{lane:te,tag:0,payload:null,callback:null,next:null}}function Q_(te,ge,qe){var ct=te.updateQueue;if(ct===null)return null;if(ct=ct.shared,(Lp&2)!==0){var Xt=ct.pending;return Xt===null?ge.next=ge:(ge.next=Xt.next,Xt.next=ge),ct.pending=ge,ge=fT(te),R1(te,null,qe),ge}return M1(te,ct,ge,qe),fT(te)}function bT(te,ge,qe){if(ge=ge.updateQueue,ge!==null&&(ge=ge.shared,(qe&4194048)!==0)){var ct=ge.lanes;ct&=te.pendingLanes,qe|=ct,ge.lanes=qe,Hl(te,qe)}}function ub(te,ge){var qe=te.updateQueue,ct=te.alternate;if(ct!==null&&(ct=ct.updateQueue,qe===ct)){var Xt=null,Tr=null;if(qe=qe.firstBaseUpdate,qe!==null){do{var ri={lane:qe.lane,tag:qe.tag,payload:qe.payload,callback:null,next:null};Tr===null?Xt=Tr=ri:Tr=Tr.next=ri,qe=qe.next}while(qe!==null);Tr===null?Xt=Tr=ge:Tr=Tr.next=ge}else Xt=Tr=ge;qe={baseState:ct.baseState,firstBaseUpdate:Xt,lastBaseUpdate:Tr,shared:ct.shared,callbacks:ct.callbacks},te.updateQueue=qe;return}te=qe.lastBaseUpdate,te===null?qe.firstBaseUpdate=ge:te.next=ge,qe.lastBaseUpdate=ge}var DA=!1;function oh(){if(DA){var te=sb;if(te!==null)throw te}}function U0(te,ge,qe,ct){DA=!1;var Xt=te.updateQueue;h_=!1;var Tr=Xt.firstBaseUpdate,ri=Xt.lastBaseUpdate,Gi=Xt.shared.pending;if(Gi!==null){Xt.shared.pending=null;var co=Gi,Ts=co.next;co.next=null,ri===null?Tr=Ts:ri.next=Ts,ri=co;var bl=te.alternate;bl!==null&&(bl=bl.updateQueue,Gi=bl.lastBaseUpdate,Gi!==ri&&(Gi===null?bl.firstBaseUpdate=Ts:Gi.next=Ts,bl.lastBaseUpdate=co))}if(Tr!==null){var Dl=Xt.baseState;ri=0,bl=Ts=co=null,Gi=Tr;do{var Ls=Gi.lane&-536870913,Es=Ls!==Gi.lane;if(Es?(wf&Ls)===Ls:(ct&Ls)===Ls){Ls!==0&&Ls===Nd&&(DA=!0),bl!==null&&(bl=bl.next={lane:0,tag:Gi.tag,payload:Gi.payload,callback:null,next:null});e:{var qf=te,Ff=Gi;Ls=ge;var Bv=qe;switch(Ff.tag){case 1:if(qf=Ff.payload,typeof qf=="function"){Dl=qf.call(Bv,Dl,Ls);break e}Dl=qf;break e;case 3:qf.flags=qf.flags&-65537|128;case 0:if(qf=Ff.payload,Ls=typeof qf=="function"?qf.call(Bv,Dl,Ls):qf,Ls==null)break e;Dl=L({},Dl,Ls);break e;case 2:h_=!0}}Ls=Gi.callback,Ls!==null&&(te.flags|=64,Es&&(te.flags|=8192),Es=Xt.callbacks,Es===null?Xt.callbacks=[Ls]:Es.push(Ls))}else Es={lane:Ls,tag:Gi.tag,payload:Gi.payload,callback:Gi.callback,next:null},bl===null?(Ts=bl=Es,co=Dl):bl=bl.next=Es,ri|=Ls;if(Gi=Gi.next,Gi===null){if(Gi=Xt.shared.pending,Gi===null)break;Es=Gi,Gi=Es.next,Es.next=null,Xt.lastBaseUpdate=Es,Xt.shared.pending=null}}while(!0);bl===null&&(co=Dl),Xt.baseState=co,Xt.firstBaseUpdate=Ts,Xt.lastBaseUpdate=bl,Tr===null&&(Xt.shared.lanes=0),T_|=ri,te.lanes=ri,te.memoizedState=Dl}}function xT(te,ge){if(typeof te!="function")throw Error(n(191,te));te.call(ge)}function oR(te,ge){var qe=te.callbacks;if(qe!==null)for(te.callbacks=null,te=0;te<qe.length;te++)xT(qe[te],ge)}var nS=Vt(null),iS=Vt(0);function r2(te,ge){te=Yb,sr(iS,te),sr(nS,ge),Yb=te|ge.baseLanes}function yM(){sr(iS,Yb),sr(nS,nS.current)}function LA(){Yb=iS.current,Er(nS),Er(iS)}var Ex=0,Fd=null,Yp=null,Mh=null,BE=!1,n2=!1,ym=!1,Gg=0,I1=0,ig=null,sR=0;function th(){throw Error(n(321))}function rm(te,ge){if(ge===null)return!1;for(var qe=0;qe<ge.length&&qe<te.length;qe++)if(!nb(te[qe],ge[qe]))return!1;return!0}function v_(te,ge,qe,ct,Xt,Tr){return Ex=Tr,Fd=ge,ge.memoizedState=null,ge.updateQueue=null,ge.lanes=0,Lt.H=te===null||te.memoizedState===null?$A:JE,ym=!1,Tr=qe(ct,Xt),ym=!1,n2&&(Tr=zb(ge,qe,ct,Xt)),bM(te),Tr}function bM(te){Lt.H=s2;var ge=Yp!==null&&Yp.next!==null;if(Ex=0,Mh=Yp=Fd=null,BE=!1,I1=0,ig=null,ge)throw Error(n(300));te===null||H0||(te=te.dependencies,te!==null&&hT(te)&&(H0=!0))}function zb(te,ge,qe,ct){Fd=te;var Xt=0;do{if(n2&&(ig=null),I1=0,n2=!1,25<=Xt)throw Error(n(301));if(Xt+=1,Mh=Yp=null,te.updateQueue!=null){var Tr=te.updateQueue;Tr.lastEffect=null,Tr.events=null,Tr.stores=null,Tr.memoCache!=null&&(Tr.memoCache.index=0)}Lt.H=CM,Tr=ge(qe,ct)}while(n2);return Tr}function xM(){var te=Lt.H,ge=te.useState()[0];return ge=typeof ge.then=="function"?P1(ge):ge,te=te.useState()[0],(Yp!==null?Yp.memoizedState:null)!==te&&(Fd.flags|=1024),ge}function UE(){var te=Gg!==0;return Gg=0,te}function aS(te,ge,qe){ge.updateQueue=te.updateQueue,ge.flags&=-2053,te.lanes&=~qe}function x0(te){if(BE){for(te=te.memoizedState;te!==null;){var ge=te.queue;ge!==null&&(ge.pending=null),te=te.next}BE=!1}Ex=0,Mh=Yp=Fd=null,n2=!1,I1=Gg=0,ig=null}function yy(){var te={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Mh===null?Fd.memoizedState=Mh=te:Mh=Mh.next=te,Mh}function Xp(){if(Yp===null){var te=Fd.alternate;te=te!==null?te.memoizedState:null}else te=Yp.next;var ge=Mh===null?Fd.memoizedState:Mh.next;if(ge!==null)Mh=ge,Yp=te;else{if(te===null)throw Fd.alternate===null?Error(n(467)):Error(n(310));Yp=te,te={memoizedState:Yp.memoizedState,baseState:Yp.baseState,baseQueue:Yp.baseQueue,queue:Yp.queue,next:null},Mh===null?Fd.memoizedState=Mh=te:Mh=Mh.next=te}return Mh}function by(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function P1(te){var ge=I1;return I1+=1,ig===null&&(ig=[]),te=gT(ig,te,ge),ge=Fd,(Mh===null?ge.memoizedState:Mh.next)===null&&(ge=ge.alternate,Lt.H=ge===null||ge.memoizedState===null?$A:JE),te}function _M(te){if(te!==null&&typeof te=="object"){if(typeof te.then=="function")return P1(te);if(te.$$typeof===Se)return wv(te)}throw Error(n(438,String(te)))}function i2(te){var ge=null,qe=Fd.updateQueue;if(qe!==null&&(ge=qe.memoCache),ge==null){var ct=Fd.alternate;ct!==null&&(ct=ct.updateQueue,ct!==null&&(ct=ct.memoCache,ct!=null&&(ge={data:ct.data.map(function(Xt){return Xt.slice()}),index:0})))}if(ge==null&&(ge={data:[],index:0}),qe===null&&(qe=by(),Fd.updateQueue=qe),qe.memoCache=ge,qe=ge.data[ge.index],qe===void 0)for(qe=ge.data[ge.index]=Array(te),ct=0;ct<te;ct++)qe[ct]=nt;return ge.index++,qe}function ew(te,ge){return typeof ge=="function"?ge(te):ge}function oS(te){var ge=Xp();return HE(ge,Yp,te)}function HE(te,ge,qe){var ct=te.queue;if(ct===null)throw Error(n(311));ct.lastRenderedReducer=qe;var Xt=te.baseQueue,Tr=ct.pending;if(Tr!==null){if(Xt!==null){var ri=Xt.next;Xt.next=Tr.next,Tr.next=ri}ge.baseQueue=Xt=Tr,ct.pending=null}if(Tr=te.baseState,Xt===null)te.memoizedState=Tr;else{ge=Xt.next;var Gi=ri=null,co=null,Ts=ge,bl=!1;do{var Dl=Ts.lane&-536870913;if(Dl!==Ts.lane?(wf&Dl)===Dl:(Ex&Dl)===Dl){var Ls=Ts.revertLane;if(Ls===0)co!==null&&(co=co.next={lane:0,revertLane:0,action:Ts.action,hasEagerState:Ts.hasEagerState,eagerState:Ts.eagerState,next:null}),Dl===Nd&&(bl=!0);else if((Ex&Ls)===Ls){Ts=Ts.next,Ls===Nd&&(bl=!0);continue}else Dl={lane:0,revertLane:Ts.revertLane,action:Ts.action,hasEagerState:Ts.hasEagerState,eagerState:Ts.eagerState,next:null},co===null?(Gi=co=Dl,ri=Tr):co=co.next=Dl,Fd.lanes|=Ls,T_|=Ls;Dl=Ts.action,ym&&qe(Tr,Dl),Tr=Ts.hasEagerState?Ts.eagerState:qe(Tr,Dl)}else Ls={lane:Dl,revertLane:Ts.revertLane,action:Ts.action,hasEagerState:Ts.hasEagerState,eagerState:Ts.eagerState,next:null},co===null?(Gi=co=Ls,ri=Tr):co=co.next=Ls,Fd.lanes|=Dl,T_|=Dl;Ts=Ts.next}while(Ts!==null&&Ts!==ge);if(co===null?ri=Tr:co.next=Gi,!nb(Tr,te.memoizedState)&&(H0=!0,bl&&(qe=sb,qe!==null)))throw qe;te.memoizedState=Tr,te.baseState=ri,te.baseQueue=co,ct.lastRenderedState=Tr}return Xt===null&&(ct.lanes=0),[te.memoizedState,ct.dispatch]}function jE(te){var ge=Xp(),qe=ge.queue;if(qe===null)throw Error(n(311));qe.lastRenderedReducer=te;var ct=qe.dispatch,Xt=qe.pending,Tr=ge.memoizedState;if(Xt!==null){qe.pending=null;var ri=Xt=Xt.next;do Tr=te(Tr,ri.action),ri=ri.next;while(ri!==Xt);nb(Tr,ge.memoizedState)||(H0=!0),ge.memoizedState=Tr,ge.baseQueue===null&&(ge.baseState=Tr),qe.lastRenderedState=Tr}return[Tr,ct]}function VE(te,ge,qe){var ct=Fd,Xt=Xp(),Tr=qd;if(Tr){if(qe===void 0)throw Error(n(407));qe=qe()}else qe=ge();var ri=!nb((Yp||Xt).memoizedState,qe);ri&&(Xt.memoizedState=qe,H0=!0),Xt=Xt.queue;var Gi=qE.bind(null,ct,Xt,te);if(sS(2048,8,Gi,[te]),Xt.getSnapshot!==ge||ri||Mh!==null&&Mh.memoizedState.tag&1){if(ct.flags|=2048,_T(9,HA(),lR.bind(null,ct,Xt,qe,ge),null),Pd===null)throw Error(n(349));Tr||(Ex&124)!==0||tw(ct,ge,qe)}return qe}function tw(te,ge,qe){te.flags|=16384,te={getSnapshot:ge,value:qe},ge=Fd.updateQueue,ge===null?(ge=by(),Fd.updateQueue=ge,ge.stores=[te]):(qe=ge.stores,qe===null?ge.stores=[te]:qe.push(te))}function lR(te,ge,qe,ct){ge.value=qe,ge.getSnapshot=ct,OA(ge)&&NA(te)}function qE(te,ge,qe){return qe(function(){OA(ge)&&NA(te)})}function OA(te){var ge=te.getSnapshot;te=te.value;try{var qe=ge();return!nb(te,qe)}catch{return!0}}function NA(te){var ge=ib(te,2);ge!==null&&i1(ge,te,2)}function FA(te){var ge=yy();if(typeof te=="function"){var qe=te;if(te=qe(),ym){Ki(!0);try{qe()}finally{Ki(!1)}}}return ge.memoizedState=ge.baseState=te,ge.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ew,lastRenderedState:te},ge}function zA(te,ge,qe,ct){return te.baseState=qe,HE(te,Yp,typeof ct=="function"?ct:ew)}function Qk(te,ge,qe,ct,Xt){if(AM(te))throw Error(n(485));if(te=ge.action,te!==null){var Tr={payload:Xt,action:te,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(ri){Tr.listeners.push(ri)}};Lt.T!==null?qe(!0):Tr.isTransition=!1,ct(Tr),qe=ge.pending,qe===null?(Tr.next=ge.pending=Tr,uR(ge,Tr)):(Tr.next=qe.next,ge.pending=qe.next=Tr)}}function uR(te,ge){var qe=ge.action,ct=ge.payload,Xt=te.state;if(ge.isTransition){var Tr=Lt.T,ri={};Lt.T=ri;try{var Gi=qe(Xt,ct),co=Lt.S;co!==null&&co(ri,Gi),cR(te,ge,Gi)}catch(Ts){$E(te,ge,Ts)}finally{Lt.T=Tr}}else try{Tr=qe(Xt,ct),cR(te,ge,Tr)}catch(Ts){$E(te,ge,Ts)}}function cR(te,ge,qe){qe!==null&&typeof qe=="object"&&typeof qe.then=="function"?qe.then(function(ct){GE(te,ge,ct)},function(ct){return $E(te,ge,ct)}):GE(te,ge,qe)}function GE(te,ge,qe){ge.status="fulfilled",ge.value=qe,BA(ge),te.state=qe,ge=te.pending,ge!==null&&(qe=ge.next,qe===ge?te.pending=null:(qe=qe.next,ge.next=qe,uR(te,qe)))}function $E(te,ge,qe){var ct=te.pending;if(te.pending=null,ct!==null){ct=ct.next;do ge.status="rejected",ge.reason=qe,BA(ge),ge=ge.next;while(ge!==ct)}te.action=null}function BA(te){te=te.listeners;for(var ge=0;ge<te.length;ge++)(0,te[ge])()}function WE(te,ge){return ge}function fR(te,ge){if(qd){var qe=Pd.formState;if(qe!==null){e:{var ct=Fd;if(qd){if(sv){t:{for(var Xt=sv,Tr=B0;Xt.nodeType!==8;){if(!Tr){Xt=null;break t}if(Xt=_w(Xt.nextSibling),Xt===null){Xt=null;break t}}Tr=Xt.data,Xt=Tr==="F!"||Tr==="F"?Xt:null}if(Xt){sv=_w(Xt.nextSibling),ct=Xt.data==="F!";break e}}Jy(ct)}ct=!1}ct&&(ge=qe[0])}}return qe=yy(),qe.memoizedState=qe.baseState=ge,ct={pending:null,lanes:0,dispatch:null,lastRenderedReducer:WE,lastRenderedState:ge},qe.queue=ct,qe=TM.bind(null,Fd,ct),ct.dispatch=qe,ct=FA(!1),Tr=EM.bind(null,Fd,!1,ct.queue),ct=yy(),Xt={state:ge,dispatch:null,action:te,pending:null},ct.queue=Xt,qe=Qk.bind(null,Fd,Xt,Tr,qe),Xt.dispatch=qe,ct.memoizedState=te,[ge,qe,!1]}function UA(te){var ge=Xp();return dR(ge,Yp,te)}function dR(te,ge,qe){if(ge=HE(te,ge,WE)[0],te=oS(ew)[0],typeof ge=="object"&&ge!==null&&typeof ge.then=="function")try{var ct=P1(ge)}catch(ri){throw ri===Qy?d_:ri}else ct=ge;ge=Xp();var Xt=ge.queue,Tr=Xt.dispatch;return qe!==ge.memoizedState&&(Fd.flags|=2048,_T(9,HA(),wM.bind(null,Xt,qe),null)),[ct,Tr,te]}function wM(te,ge){te.action=ge}function Gd(te){var ge=Xp(),qe=Yp;if(qe!==null)return dR(ge,qe,te);Xp(),ge=ge.memoizedState,qe=Xp();var ct=qe.queue.dispatch;return qe.memoizedState=te,[ge,ct,!1]}function _T(te,ge,qe,ct){return te={tag:te,create:qe,deps:ct,inst:ge,next:null},ge=Fd.updateQueue,ge===null&&(ge=by(),Fd.updateQueue=ge),qe=ge.lastEffect,qe===null?ge.lastEffect=te.next=te:(ct=qe.next,qe.next=te,te.next=ct,ge.lastEffect=te),te}function HA(){return{destroy:void 0,resource:void 0}}function a2(){return Xp().memoizedState}function wT(te,ge,qe,ct){var Xt=yy();ct=ct===void 0?null:ct,Fd.flags|=te,Xt.memoizedState=_T(1|ge,HA(),qe,ct)}function sS(te,ge,qe,ct){var Xt=Xp();ct=ct===void 0?null:ct;var Tr=Xt.memoizedState.inst;Yp!==null&&ct!==null&&rm(ct,Yp.memoizedState.deps)?Xt.memoizedState=_T(ge,Tr,qe,ct):(Fd.flags|=te,Xt.memoizedState=_T(1|ge,Tr,qe,ct))}function jA(te,ge){wT(8390656,8,te,ge)}function D1(te,ge){sS(2048,8,te,ge)}function YE(te,ge){return sS(4,2,te,ge)}function o2(te,ge){return sS(4,4,te,ge)}function VA(te,ge){if(typeof ge=="function"){te=te();var qe=ge(te);return function(){typeof qe=="function"?qe():ge(null)}}if(ge!=null)return te=te(),ge.current=te,function(){ge.current=null}}function qA(te,ge,qe){qe=qe!=null?qe.concat([te]):null,sS(4,4,VA.bind(null,ge,te),qe)}function rw(){}function e1(te,ge){var qe=Xp();ge=ge===void 0?null:ge;var ct=qe.memoizedState;return ge!==null&&rm(ge,ct[1])?ct[0]:(qe.memoizedState=[te,ge],te)}function Ax(te,ge){var qe=Xp();ge=ge===void 0?null:ge;var ct=qe.memoizedState;if(ge!==null&&rm(ge,ct[1]))return ct[0];if(ct=te(),ym){Ki(!0);try{te()}finally{Ki(!1)}}return qe.memoizedState=[ct,ge],ct}function XE(te,ge,qe){return qe===void 0||(Ex&1073741824)!==0?te.memoizedState=ge:(te.memoizedState=qe,te=bS(),Fd.lanes|=te,T_|=te,qe)}function hR(te,ge,qe,ct){return nb(qe,ge)?qe:nS.current!==null?(te=XE(te,qe,ct),nb(te,ge)||(H0=!0),te):(Ex&42)===0?(H0=!0,te.memoizedState=qe):(te=bS(),Fd.lanes|=te,T_|=te,ge)}function ZE(te,ge,qe,ct,Xt){var Tr=dr.p;dr.p=Tr!==0&&8>Tr?Tr:8;var ri=Lt.T,Gi={};Lt.T=Gi,EM(te,!1,ge,qe);try{var co=Xt(),Ts=Lt.S;if(Ts!==null&&Ts(Gi,co),co!==null&&typeof co=="object"&&typeof co.then=="function"){var bl=Kk(co,ct);TT(te,ge,bl,bm(te))}else TT(te,ge,ct,bm(te))}catch(Dl){TT(te,ge,{then:function(){},status:"rejected",reason:Dl},bm())}finally{dr.p=Tr,Lt.T=ri}}function eI(){}function ST(te,ge,qe,ct){if(te.tag!==5)throw Error(n(476));var Xt=pR(te).queue;ZE(te,Xt,ge,Zt,qe===null?eI:function(){return KE(te),qe(ct)})}function pR(te){var ge=te.memoizedState;if(ge!==null)return ge;ge={memoizedState:Zt,baseState:Zt,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ew,lastRenderedState:Zt},next:null};var qe={};return ge.next={memoizedState:qe,baseState:qe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ew,lastRenderedState:qe},next:null},te.memoizedState=ge,te=te.alternate,te!==null&&(te.memoizedState=ge),ge}function KE(te){var ge=pR(te).next.queue;TT(te,ge,{},bm())}function GA(){return wv(oC)}function nw(){return Xp().memoizedState}function tI(){return Xp().memoizedState}function lS(te){for(var ge=te.return;ge!==null;){switch(ge.tag){case 24:case 3:var qe=bm();te=p_(qe);var ct=Q_(ge,te,qe);ct!==null&&(i1(ct,ge,qe),bT(ct,ge,qe)),ge={cache:gM()},te.payload=ge;return}ge=ge.return}}function SM(te,ge,qe){var ct=bm();qe={lane:ct,revertLane:0,action:qe,hasEagerState:!1,eagerState:null,next:null},AM(te)?rI(ge,qe):(qe=cT(te,ge,qe,ct),qe!==null&&(i1(qe,te,ct),t1(qe,ge,ct)))}function TM(te,ge,qe){var ct=bm();TT(te,ge,qe,ct)}function TT(te,ge,qe,ct){var Xt={lane:ct,revertLane:0,action:qe,hasEagerState:!1,eagerState:null,next:null};if(AM(te))rI(ge,Xt);else{var Tr=te.alternate;if(te.lanes===0&&(Tr===null||Tr.lanes===0)&&(Tr=ge.lastRenderedReducer,Tr!==null))try{var ri=ge.lastRenderedState,Gi=Tr(ri,qe);if(Xt.hasEagerState=!0,Xt.eagerState=Gi,nb(Gi,ri))return M1(te,ge,Xt,0),Pd===null&&Qw(),!1}catch{}finally{}if(qe=cT(te,ge,Xt,ct),qe!==null)return i1(qe,te,ct),t1(qe,ge,ct),!0}return!1}function EM(te,ge,qe,ct){if(ct={lane:2,revertLane:lI(),action:ct,hasEagerState:!1,eagerState:null,next:null},AM(te)){if(ge)throw Error(n(479))}else ge=cT(te,qe,ct,2),ge!==null&&i1(ge,te,2)}function AM(te){var ge=te.alternate;return te===Fd||ge!==null&&ge===Fd}function rI(te,ge){n2=BE=!0;var qe=te.pending;qe===null?ge.next=ge:(ge.next=qe.next,qe.next=ge),te.pending=ge}function t1(te,ge,qe){if((qe&4194048)!==0){var ct=ge.lanes;ct&=te.pendingLanes,qe|=ct,ge.lanes=qe,Hl(te,qe)}}var s2={readContext:wv,use:_M,useCallback:th,useContext:th,useEffect:th,useImperativeHandle:th,useLayoutEffect:th,useInsertionEffect:th,useMemo:th,useReducer:th,useRef:th,useState:th,useDebugValue:th,useDeferredValue:th,useTransition:th,useSyncExternalStore:th,useId:th,useHostTransitionStatus:th,useFormState:th,useActionState:th,useOptimistic:th,useMemoCache:th,useCacheRefresh:th},$A={readContext:wv,use:_M,useCallback:function(te,ge){return yy().memoizedState=[te,ge===void 0?null:ge],te},useContext:wv,useEffect:jA,useImperativeHandle:function(te,ge,qe){qe=qe!=null?qe.concat([te]):null,wT(4194308,4,VA.bind(null,ge,te),qe)},useLayoutEffect:function(te,ge){return wT(4194308,4,te,ge)},useInsertionEffect:function(te,ge){wT(4,2,te,ge)},useMemo:function(te,ge){var qe=yy();ge=ge===void 0?null:ge;var ct=te();if(ym){Ki(!0);try{te()}finally{Ki(!1)}}return qe.memoizedState=[ct,ge],ct},useReducer:function(te,ge,qe){var ct=yy();if(qe!==void 0){var Xt=qe(ge);if(ym){Ki(!0);try{qe(ge)}finally{Ki(!1)}}}else Xt=ge;return ct.memoizedState=ct.baseState=Xt,te={pending:null,lanes:0,dispatch:null,lastRenderedReducer:te,lastRenderedState:Xt},ct.queue=te,te=te.dispatch=SM.bind(null,Fd,te),[ct.memoizedState,te]},useRef:function(te){var ge=yy();return te={current:te},ge.memoizedState=te},useState:function(te){te=FA(te);var ge=te.queue,qe=TM.bind(null,Fd,ge);return ge.dispatch=qe,[te.memoizedState,qe]},useDebugValue:rw,useDeferredValue:function(te,ge){var qe=yy();return XE(qe,te,ge)},useTransition:function(){var te=FA(!1);return te=ZE.bind(null,Fd,te.queue,!0,!1),yy().memoizedState=te,[!1,te]},useSyncExternalStore:function(te,ge,qe){var ct=Fd,Xt=yy();if(qd){if(qe===void 0)throw Error(n(407));qe=qe()}else{if(qe=ge(),Pd===null)throw Error(n(349));(wf&124)!==0||tw(ct,ge,qe)}Xt.memoizedState=qe;var Tr={value:qe,getSnapshot:ge};return Xt.queue=Tr,jA(qE.bind(null,ct,Tr,te),[te]),ct.flags|=2048,_T(9,HA(),lR.bind(null,ct,Tr,qe,ge),null),qe},useId:function(){var te=yy(),ge=Pd.identifierPrefix;if(qd){var qe=u_,ct=tm;qe=(ct&~(1<<32-sa(ct)-1)).toString(32)+qe,ge="«"+ge+"R"+qe,qe=Gg++,0<qe&&(ge+="H"+qe.toString(32)),ge+="»"}else qe=sR++,ge="«"+ge+"r"+qe.toString(32)+"»";return te.memoizedState=ge},useHostTransitionStatus:GA,useFormState:fR,useActionState:fR,useOptimistic:function(te){var ge=yy();ge.memoizedState=ge.baseState=te;var qe={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return ge.queue=qe,ge=EM.bind(null,Fd,!0,qe),qe.dispatch=ge,[te,ge]},useMemoCache:i2,useCacheRefresh:function(){return yy().memoizedState=lS.bind(null,Fd)}},JE={readContext:wv,use:_M,useCallback:e1,useContext:wv,useEffect:D1,useImperativeHandle:qA,useInsertionEffect:YE,useLayoutEffect:o2,useMemo:Ax,useReducer:oS,useRef:a2,useState:function(){return oS(ew)},useDebugValue:rw,useDeferredValue:function(te,ge){var qe=Xp();return hR(qe,Yp.memoizedState,te,ge)},useTransition:function(){var te=oS(ew)[0],ge=Xp().memoizedState;return[typeof te=="boolean"?te:P1(te),ge]},useSyncExternalStore:VE,useId:nw,useHostTransitionStatus:GA,useFormState:UA,useActionState:UA,useOptimistic:function(te,ge){var qe=Xp();return zA(qe,Yp,te,ge)},useMemoCache:i2,useCacheRefresh:tI},CM={readContext:wv,use:_M,useCallback:e1,useContext:wv,useEffect:D1,useImperativeHandle:qA,useInsertionEffect:YE,useLayoutEffect:o2,useMemo:Ax,useReducer:jE,useRef:a2,useState:function(){return jE(ew)},useDebugValue:rw,useDeferredValue:function(te,ge){var qe=Xp();return Yp===null?XE(qe,te,ge):hR(qe,Yp.memoizedState,te,ge)},useTransition:function(){var te=jE(ew)[0],ge=Xp().memoizedState;return[typeof te=="boolean"?te:P1(te),ge]},useSyncExternalStore:VE,useId:nw,useHostTransitionStatus:GA,useFormState:Gd,useActionState:Gd,useOptimistic:function(te,ge){var qe=Xp();return Yp!==null?zA(qe,Yp,te,ge):(qe.baseState=te,[te,qe.queue.dispatch])},useMemoCache:i2,useCacheRefresh:tI},Tg=null,cb=0;function QE(te){var ge=cb;return cb+=1,Tg===null&&(Tg=[]),gT(Tg,te,ge)}function l2(te,ge){ge=ge.props.ref,te.ref=ge!==void 0?ge:null}function uS(te,ge){throw ge.$$typeof===B?Error(n(525)):(te=Object.prototype.toString.call(ge),Error(n(31,te==="[object Object]"?"object with keys {"+Object.keys(ge).join(", ")+"}":te)))}function iw(te){var ge=te._init;return ge(te._payload)}function MM(te){function ge(ss,Ho){if(te){var bs=ss.deletions;bs===null?(ss.deletions=[Ho],ss.flags|=16):bs.push(Ho)}}function qe(ss,Ho){if(!te)return null;for(;Ho!==null;)ge(ss,Ho),Ho=Ho.sibling;return null}function ct(ss){for(var Ho=new Map;ss!==null;)ss.key!==null?Ho.set(ss.key,ss):Ho.set(ss.index,ss),ss=ss.sibling;return Ho}function Xt(ss,Ho){return ss=Ch(ss,Ho),ss.index=0,ss.sibling=null,ss}function Tr(ss,Ho,bs){return ss.index=bs,te?(bs=ss.alternate,bs!==null?(bs=bs.index,bs<Ho?(ss.flags|=67108866,Ho):bs):(ss.flags|=67108866,Ho)):(ss.flags|=1048576,Ho)}function ri(ss){return te&&ss.alternate===null&&(ss.flags|=67108866),ss}function Gi(ss,Ho,bs,Cl){return Ho===null||Ho.tag!==6?(Ho=EA(bs,ss.mode,Cl),Ho.return=ss,Ho):(Ho=Xt(Ho,bs),Ho.return=ss,Ho)}function co(ss,Ho,bs,Cl){var Lc=bs.type;return Lc===ie?bl(ss,Ho,bs.props.children,Cl,bs.key):Ho!==null&&(Ho.elementType===Lc||typeof Lc=="object"&&Lc!==null&&Lc.$$typeof===Ze&&iw(Lc)===Ho.type)?(Ho=Xt(Ho,bs.props),l2(Ho,bs),Ho.return=ss,Ho):(Ho=rg(bs.type,bs.key,bs.props,null,ss.mode,Cl),l2(Ho,bs),Ho.return=ss,Ho)}function Ts(ss,Ho,bs,Cl){return Ho===null||Ho.tag!==4||Ho.stateNode.containerInfo!==bs.containerInfo||Ho.stateNode.implementation!==bs.implementation?(Ho=Zy(bs,ss.mode,Cl),Ho.return=ss,Ho):(Ho=Xt(Ho,bs.children||[]),Ho.return=ss,Ho)}function bl(ss,Ho,bs,Cl,Lc){return Ho===null||Ho.tag!==7?(Ho=e2(bs,ss.mode,Cl,Lc),Ho.return=ss,Ho):(Ho=Xt(Ho,bs),Ho.return=ss,Ho)}function Dl(ss,Ho,bs){if(typeof Ho=="string"&&Ho!==""||typeof Ho=="number"||typeof Ho=="bigint")return Ho=EA(""+Ho,ss.mode,bs),Ho.return=ss,Ho;if(typeof Ho=="object"&&Ho!==null){switch(Ho.$$typeof){case V:return bs=rg(Ho.type,Ho.key,Ho.props,null,ss.mode,bs),l2(bs,Ho),bs.return=ss,bs;case X:return Ho=Zy(Ho,ss.mode,bs),Ho.return=ss,Ho;case Ze:var Cl=Ho._init;return Ho=Cl(Ho._payload),Dl(ss,Ho,bs)}if(qt(Ho)||ht(Ho))return Ho=e2(Ho,ss.mode,bs,null),Ho.return=ss,Ho;if(typeof Ho.then=="function")return Dl(ss,QE(Ho),bs);if(Ho.$$typeof===Se)return Dl(ss,OE(ss,Ho),bs);uS(ss,Ho)}return null}function Ls(ss,Ho,bs,Cl){var Lc=Ho!==null?Ho.key:null;if(typeof bs=="string"&&bs!==""||typeof bs=="number"||typeof bs=="bigint")return Lc!==null?null:Gi(ss,Ho,""+bs,Cl);if(typeof bs=="object"&&bs!==null){switch(bs.$$typeof){case V:return bs.key===Lc?co(ss,Ho,bs,Cl):null;case X:return bs.key===Lc?Ts(ss,Ho,bs,Cl):null;case Ze:return Lc=bs._init,bs=Lc(bs._payload),Ls(ss,Ho,bs,Cl)}if(qt(bs)||ht(bs))return Lc!==null?null:bl(ss,Ho,bs,Cl,null);if(typeof bs.then=="function")return Ls(ss,Ho,QE(bs),Cl);if(bs.$$typeof===Se)return Ls(ss,Ho,OE(ss,bs),Cl);uS(ss,bs)}return null}function Es(ss,Ho,bs,Cl,Lc){if(typeof Cl=="string"&&Cl!==""||typeof Cl=="number"||typeof Cl=="bigint")return ss=ss.get(bs)||null,Gi(Ho,ss,""+Cl,Lc);if(typeof Cl=="object"&&Cl!==null){switch(Cl.$$typeof){case V:return ss=ss.get(Cl.key===null?bs:Cl.key)||null,co(Ho,ss,Cl,Lc);case X:return ss=ss.get(Cl.key===null?bs:Cl.key)||null,Ts(Ho,ss,Cl,Lc);case Ze:var kh=Cl._init;return Cl=kh(Cl._payload),Es(ss,Ho,bs,Cl,Lc)}if(qt(Cl)||ht(Cl))return ss=ss.get(bs)||null,bl(Ho,ss,Cl,Lc,null);if(typeof Cl.then=="function")return Es(ss,Ho,bs,QE(Cl),Lc);if(Cl.$$typeof===Se)return Es(ss,Ho,bs,OE(Ho,Cl),Lc);uS(Ho,Cl)}return null}function qf(ss,Ho,bs,Cl){for(var Lc=null,kh=null,vf=Ho,Gf=Ho=0,Ty=null;vf!==null&&Gf<bs.length;Gf++){vf.index>Gf?(Ty=vf,vf=null):Ty=vf.sibling;var Op=Ls(ss,vf,bs[Gf],Cl);if(Op===null){vf===null&&(vf=Ty);break}te&&vf&&Op.alternate===null&&ge(ss,vf),Ho=Tr(Op,Ho,Gf),kh===null?Lc=Op:kh.sibling=Op,kh=Op,vf=Ty}if(Gf===bs.length)return qe(ss,vf),qd&&Ob(ss,Gf),Lc;if(vf===null){for(;Gf<bs.length;Gf++)vf=Dl(ss,bs[Gf],Cl),vf!==null&&(Ho=Tr(vf,Ho,Gf),kh===null?Lc=vf:kh.sibling=vf,kh=vf);return qd&&Ob(ss,Gf),Lc}for(vf=ct(vf);Gf<bs.length;Gf++)Ty=Es(vf,ss,Gf,bs[Gf],Cl),Ty!==null&&(te&&Ty.alternate!==null&&vf.delete(Ty.key===null?Gf:Ty.key),Ho=Tr(Ty,Ho,Gf),kh===null?Lc=Ty:kh.sibling=Ty,kh=Ty);return te&&vf.forEach(function(zT){return ge(ss,zT)}),qd&&Ob(ss,Gf),Lc}function Ff(ss,Ho,bs,Cl){if(bs==null)throw Error(n(151));for(var Lc=null,kh=null,vf=Ho,Gf=Ho=0,Ty=null,Op=bs.next();vf!==null&&!Op.done;Gf++,Op=bs.next()){vf.index>Gf?(Ty=vf,vf=null):Ty=vf.sibling;var zT=Ls(ss,vf,Op.value,Cl);if(zT===null){vf===null&&(vf=Ty);break}te&&vf&&zT.alternate===null&&ge(ss,vf),Ho=Tr(zT,Ho,Gf),kh===null?Lc=zT:kh.sibling=zT,kh=zT,vf=Ty}if(Op.done)return qe(ss,vf),qd&&Ob(ss,Gf),Lc;if(vf===null){for(;!Op.done;Gf++,Op=bs.next())Op=Dl(ss,Op.value,Cl),Op!==null&&(Ho=Tr(Op,Ho,Gf),kh===null?Lc=Op:kh.sibling=Op,kh=Op);return qd&&Ob(ss,Gf),Lc}for(vf=ct(vf);!Op.done;Gf++,Op=bs.next())Op=Es(vf,ss,Gf,Op.value,Cl),Op!==null&&(te&&Op.alternate!==null&&vf.delete(Op.key===null?Gf:Op.key),Ho=Tr(Op,Ho,Gf),kh===null?Lc=Op:kh.sibling=Op,kh=Op);return te&&vf.forEach(function(PF){return ge(ss,PF)}),qd&&Ob(ss,Gf),Lc}function Bv(ss,Ho,bs,Cl){if(typeof bs=="object"&&bs!==null&&bs.type===ie&&bs.key===null&&(bs=bs.props.children),typeof bs=="object"&&bs!==null){switch(bs.$$typeof){case V:e:{for(var Lc=bs.key;Ho!==null;){if(Ho.key===Lc){if(Lc=bs.type,Lc===ie){if(Ho.tag===7){qe(ss,Ho.sibling),Cl=Xt(Ho,bs.props.children),Cl.return=ss,ss=Cl;break e}}else if(Ho.elementType===Lc||typeof Lc=="object"&&Lc!==null&&Lc.$$typeof===Ze&&iw(Lc)===Ho.type){qe(ss,Ho.sibling),Cl=Xt(Ho,bs.props),l2(Cl,bs),Cl.return=ss,ss=Cl;break e}qe(ss,Ho);break}else ge(ss,Ho);Ho=Ho.sibling}bs.type===ie?(Cl=e2(bs.props.children,ss.mode,Cl,bs.key),Cl.return=ss,ss=Cl):(Cl=rg(bs.type,bs.key,bs.props,null,ss.mode,Cl),l2(Cl,bs),Cl.return=ss,ss=Cl)}return ri(ss);case X:e:{for(Lc=bs.key;Ho!==null;){if(Ho.key===Lc)if(Ho.tag===4&&Ho.stateNode.containerInfo===bs.containerInfo&&Ho.stateNode.implementation===bs.implementation){qe(ss,Ho.sibling),Cl=Xt(Ho,bs.children||[]),Cl.return=ss,ss=Cl;break e}else{qe(ss,Ho);break}else ge(ss,Ho);Ho=Ho.sibling}Cl=Zy(bs,ss.mode,Cl),Cl.return=ss,ss=Cl}return ri(ss);case Ze:return Lc=bs._init,bs=Lc(bs._payload),Bv(ss,Ho,bs,Cl)}if(qt(bs))return qf(ss,Ho,bs,Cl);if(ht(bs)){if(Lc=ht(bs),typeof Lc!="function")throw Error(n(150));return bs=Lc.call(bs),Ff(ss,Ho,bs,Cl)}if(typeof bs.then=="function")return Bv(ss,Ho,QE(bs),Cl);if(bs.$$typeof===Se)return Bv(ss,Ho,OE(ss,bs),Cl);uS(ss,bs)}return typeof bs=="string"&&bs!==""||typeof bs=="number"||typeof bs=="bigint"?(bs=""+bs,Ho!==null&&Ho.tag===6?(qe(ss,Ho.sibling),Cl=Xt(Ho,bs),Cl.return=ss,ss=Cl):(qe(ss,Ho),Cl=EA(bs,ss.mode,Cl),Cl.return=ss,ss=Cl),ri(ss)):qe(ss,Ho)}return function(ss,Ho,bs,Cl){try{cb=0;var Lc=Bv(ss,Ho,bs,Cl);return Tg=null,Lc}catch(vf){if(vf===Qy||vf===d_)throw vf;var kh=g0(29,vf,null,ss.mode);return kh.lanes=Cl,kh.return=ss,kh}finally{}}}var u2=MM(!0),nI=MM(!1),lv=Vt(null),xy=null;function Bb(te){var ge=te.alternate;sr(nm,nm.current&1),sr(lv,te),xy===null&&(ge===null||nS.current!==null||ge.memoizedState!==null)&&(xy=te)}function RM(te){if(te.tag===22){if(sr(nm,nm.current),sr(lv,te),xy===null){var ge=te.alternate;ge!==null&&ge.memoizedState!==null&&(xy=te)}}else aw()}function aw(){sr(nm,nm.current),sr(lv,lv.current)}function Ub(te){Er(lv),xy===te&&(xy=null),Er(nm)}var nm=Vt(0);function m_(te){for(var ge=te;ge!==null;){if(ge.tag===13){var qe=ge.memoizedState;if(qe!==null&&(qe=qe.dehydrated,qe===null||qe.data==="$?"||hb(qe)))return ge}else if(ge.tag===19&&ge.memoizedProps.revealOrder!==void 0){if((ge.flags&128)!==0)return ge}else if(ge.child!==null){ge.child.return=ge,ge=ge.child;continue}if(ge===te)break;for(;ge.sibling===null;){if(ge.return===null||ge.return===te)return null;ge=ge.return}ge.sibling.return=ge.return,ge=ge.sibling}return null}function g_(te,ge,qe,ct){ge=te.memoizedState,qe=qe(ct,ge),qe=qe==null?ge:L({},ge,qe),te.memoizedState=qe,te.lanes===0&&(te.updateQueue.baseState=qe)}var _y={enqueueSetState:function(te,ge,qe){te=te._reactInternals;var ct=bm(),Xt=p_(ct);Xt.payload=ge,qe!=null&&(Xt.callback=qe),ge=Q_(te,Xt,ct),ge!==null&&(i1(ge,te,ct),bT(ge,te,ct))},enqueueReplaceState:function(te,ge,qe){te=te._reactInternals;var ct=bm(),Xt=p_(ct);Xt.tag=1,Xt.payload=ge,qe!=null&&(Xt.callback=qe),ge=Q_(te,Xt,ct),ge!==null&&(i1(ge,te,ct),bT(ge,te,ct))},enqueueForceUpdate:function(te,ge){te=te._reactInternals;var qe=bm(),ct=p_(qe);ct.tag=2,ge!=null&&(ct.callback=ge),ge=Q_(te,ct,qe),ge!==null&&(i1(ge,te,qe),bT(ge,te,qe))}};function e3(te,ge,qe,ct,Xt,Tr,ri){return te=te.stateNode,typeof te.shouldComponentUpdate=="function"?te.shouldComponentUpdate(ct,Tr,ri):ge.prototype&&ge.prototype.isPureReactComponent?!Yy(qe,ct)||!Yy(Xt,Tr):!0}function iI(te,ge,qe,ct){te=ge.state,typeof ge.componentWillReceiveProps=="function"&&ge.componentWillReceiveProps(qe,ct),typeof ge.UNSAFE_componentWillReceiveProps=="function"&&ge.UNSAFE_componentWillReceiveProps(qe,ct),ge.state!==te&&_y.enqueueReplaceState(ge,ge.state,null)}function y_(te,ge){var qe=ge;if("ref"in ge){qe={};for(var ct in ge)ct!=="ref"&&(qe[ct]=ge[ct])}if(te=te.defaultProps){qe===ge&&(qe=L({},qe));for(var Xt in te)qe[Xt]===void 0&&(qe[Xt]=te[Xt])}return qe}var ow=typeof reportError=="function"?reportError:function(te){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var ge=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof te=="object"&&te!==null&&typeof te.message=="string"?String(te.message):String(te),error:te});if(!window.dispatchEvent(ge))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",te);return}console.error(te)};function ET(te){ow(te)}function t3(te){console.error(te)}function aI(te){ow(te)}function WA(te,ge){try{var qe=te.onUncaughtError;qe(ge.value,{componentStack:ge.stack})}catch(ct){setTimeout(function(){throw ct})}}function n0(te,ge,qe){try{var ct=te.onCaughtError;ct(qe.value,{componentStack:qe.stack,errorBoundary:ge.tag===1?ge.stateNode:null})}catch(Xt){setTimeout(function(){throw Xt})}}function YA(te,ge,qe){return qe=p_(qe),qe.tag=3,qe.payload={element:null},qe.callback=function(){WA(te,ge)},qe}function vR(te){return te=p_(te),te.tag=3,te}function kM(te,ge,qe,ct){var Xt=qe.type.getDerivedStateFromError;if(typeof Xt=="function"){var Tr=ct.value;te.payload=function(){return Xt(Tr)},te.callback=function(){n0(ge,qe,ct)}}var ri=qe.stateNode;ri!==null&&typeof ri.componentDidCatch=="function"&&(te.callback=function(){n0(ge,qe,ct),typeof Xt!="function"&&(W0===null?W0=new Set([this]):W0.add(this));var Gi=ct.stack;this.componentDidCatch(ct.value,{componentStack:Gi!==null?Gi:""})})}function mR(te,ge,qe,ct,Xt){if(qe.flags|=32768,ct!==null&&typeof ct=="object"&&typeof ct.then=="function"){if(ge=qe.alternate,ge!==null&&Sx(ge,qe,Xt,!0),qe=lv.current,qe!==null){switch(qe.tag){case 13:return xy===null?Ce():qe.alternate===null&&am===0&&(am=3),qe.flags&=-257,qe.flags|=65536,qe.lanes=Xt,ct===PA?qe.flags|=16384:(ge=qe.updateQueue,ge===null?qe.updateQueue=new Set([ct]):ge.add(ct),Bs(te,ct,Xt)),!1;case 22:return qe.flags|=65536,ct===PA?qe.flags|=16384:(ge=qe.updateQueue,ge===null?(ge={transitions:null,markerInstances:null,retryQueue:new Set([ct])},qe.updateQueue=ge):(qe=ge.retryQueue,qe===null?ge.retryQueue=new Set([ct]):qe.add(ct)),Bs(te,ct,Xt)),!1}throw Error(n(435,qe.tag))}return Bs(te,ct,Xt),Ce(),!1}if(qd)return ge=lv.current,ge!==null?((ge.flags&65536)===0&&(ge.flags|=256),ge.flags|=65536,ge.lanes=Xt,ct!==t2&&(te=Error(n(422),{cause:ct}),K_(Sg(te,qe)))):(ct!==t2&&(ge=Error(n(423),{cause:ct}),K_(Sg(ge,qe))),te=te.current.alternate,te.flags|=65536,Xt&=-Xt,te.lanes|=Xt,ct=Sg(ct,qe),Xt=YA(te.stateNode,ct,Xt),ub(te,Xt),am!==4&&(am=2)),!1;var Tr=Error(n(520),{cause:ct});if(Tr=Sg(Tr,qe),Jp===null?Jp=[Tr]:Jp.push(Tr),am!==4&&(am=2),ge===null)return!0;ct=Sg(ct,qe),qe=ge;do{switch(qe.tag){case 3:return qe.flags|=65536,te=Xt&-Xt,qe.lanes|=te,te=YA(qe.stateNode,ct,te),ub(qe,te),!1;case 1:if(ge=qe.type,Tr=qe.stateNode,(qe.flags&128)===0&&(typeof ge.getDerivedStateFromError=="function"||Tr!==null&&typeof Tr.componentDidCatch=="function"&&(W0===null||!W0.has(Tr))))return qe.flags|=65536,Xt&=-Xt,qe.lanes|=Xt,Xt=vR(Xt),kM(Xt,te,qe,ct),ub(qe,Xt),!1}qe=qe.return}while(qe!==null);return!1}var cS=Error(n(461)),H0=!1;function uv(te,ge,qe,ct){ge.child=te===null?nI(ge,null,qe,ct):u2(ge,te.child,qe,ct)}function r1(te,ge,qe,ct,Xt){qe=qe.render;var Tr=ge.ref;if("ref"in ct){var ri={};for(var Gi in ct)Gi!=="ref"&&(ri[Gi]=ct[Gi])}else ri=ct;return J_(ge),ct=v_(te,ge,qe,ri,Tr,Xt),Gi=UE(),te!==null&&!H0?(aS(te,ge,Xt),V0(te,ge,Xt)):(qd&&Gi&&AA(ge),ge.flags|=1,uv(te,ge,ct,Xt),ge.child)}function n1(te,ge,qe,ct,Xt){if(te===null){var Tr=qe.type;return typeof Tr=="function"&&!y0(Tr)&&Tr.defaultProps===void 0&&qe.compare===null?(ge.tag=15,ge.type=Tr,r3(te,ge,Tr,ct,Xt)):(te=rg(qe.type,null,ct,ge,ge.mode,Xt),te.ref=ge.ref,te.return=ge,ge.child=te)}if(Tr=te.child,!jb(te,Xt)){var ri=Tr.memoizedProps;if(qe=qe.compare,qe=qe!==null?qe:Yy,qe(ri,ct)&&te.ref===ge.ref)return V0(te,ge,Xt)}return ge.flags|=1,te=Ch(Tr,ct),te.ref=ge.ref,te.return=ge,ge.child=te}function r3(te,ge,qe,ct,Xt){if(te!==null){var Tr=te.memoizedProps;if(Yy(Tr,ct)&&te.ref===ge.ref)if(H0=!1,ge.pendingProps=ct=Tr,jb(te,Xt))(te.flags&131072)!==0&&(H0=!0);else return ge.lanes=te.lanes,V0(te,ge,Xt)}return x_(te,ge,qe,ct,Xt)}function b_(te,ge,qe){var ct=ge.pendingProps,Xt=ct.children,Tr=te!==null?te.memoizedState:null;if(ct.mode==="hidden"){if((ge.flags&128)!==0){if(ct=Tr!==null?Tr.baseLanes|qe:qe,te!==null){for(Xt=ge.child=te.child,Tr=0;Xt!==null;)Tr=Tr|Xt.lanes|Xt.childLanes,Xt=Xt.sibling;ge.childLanes=Tr&~ct}else ge.childLanes=0,ge.child=null;return Cx(te,ge,ct,qe)}if((qe&536870912)!==0)ge.memoizedState={baseLanes:0,cachePool:null},te!==null&&IA(ge,Tr!==null?Tr.cachePool:null),Tr!==null?r2(ge,Tr):yM(),RM(ge);else return ge.lanes=ge.childLanes=536870912,Cx(te,ge,Tr!==null?Tr.baseLanes|qe:qe,qe)}else Tr!==null?(IA(ge,Tr.cachePool),r2(ge,Tr),aw(),ge.memoizedState=null):(te!==null&&IA(ge,null),yM(),aw());return uv(te,ge,Xt,qe),ge.child}function Cx(te,ge,qe,ct){var Xt=lb();return Xt=Xt===null?null:{parent:Sv._currentValue,pool:Xt},ge.memoizedState={baseLanes:qe,cachePool:Xt},te!==null&&IA(ge,null),yM(),RM(ge),te!==null&&Sx(te,ge,ct,!0),null}function nf(te,ge){var qe=ge.ref;if(qe===null)te!==null&&te.ref!==null&&(ge.flags|=4194816);else{if(typeof qe!="function"&&typeof qe!="object")throw Error(n(284));(te===null||te.ref!==qe)&&(ge.flags|=4194816)}}function x_(te,ge,qe,ct,Xt){return J_(ge),qe=v_(te,ge,qe,ct,void 0,Xt),ct=UE(),te!==null&&!H0?(aS(te,ge,Xt),V0(te,ge,Xt)):(qd&&ct&&AA(ge),ge.flags|=1,uv(te,ge,qe,Xt),ge.child)}function L1(te,ge,qe,ct,Xt,Tr){return J_(ge),ge.updateQueue=null,qe=zb(ge,ct,qe,Xt),bM(te),ct=UE(),te!==null&&!H0?(aS(te,ge,Tr),V0(te,ge,Tr)):(qd&&ct&&AA(ge),ge.flags|=1,uv(te,ge,qe,Tr),ge.child)}function _0(te,ge,qe,ct,Xt){if(J_(ge),ge.stateNode===null){var Tr=r0,ri=qe.contextType;typeof ri=="object"&&ri!==null&&(Tr=wv(ri)),Tr=new qe(ct,Tr),ge.memoizedState=Tr.state!==null&&Tr.state!==void 0?Tr.state:null,Tr.updater=_y,ge.stateNode=Tr,Tr._reactInternals=ge,Tr=ge.stateNode,Tr.props=ct,Tr.state=ge.memoizedState,Tr.refs={},yT(ge),ri=qe.contextType,Tr.context=typeof ri=="object"&&ri!==null?wv(ri):r0,Tr.state=ge.memoizedState,ri=qe.getDerivedStateFromProps,typeof ri=="function"&&(g_(ge,qe,ri,ct),Tr.state=ge.memoizedState),typeof qe.getDerivedStateFromProps=="function"||typeof Tr.getSnapshotBeforeUpdate=="function"||typeof Tr.UNSAFE_componentWillMount!="function"&&typeof Tr.componentWillMount!="function"||(ri=Tr.state,typeof Tr.componentWillMount=="function"&&Tr.componentWillMount(),typeof Tr.UNSAFE_componentWillMount=="function"&&Tr.UNSAFE_componentWillMount(),ri!==Tr.state&&_y.enqueueReplaceState(Tr,Tr.state,null),U0(ge,ct,Tr,Xt),oh(),Tr.state=ge.memoizedState),typeof Tr.componentDidMount=="function"&&(ge.flags|=4194308),ct=!0}else if(te===null){Tr=ge.stateNode;var Gi=ge.memoizedProps,co=y_(qe,Gi);Tr.props=co;var Ts=Tr.context,bl=qe.contextType;ri=r0,typeof bl=="object"&&bl!==null&&(ri=wv(bl));var Dl=qe.getDerivedStateFromProps;bl=typeof Dl=="function"||typeof Tr.getSnapshotBeforeUpdate=="function",Gi=ge.pendingProps!==Gi,bl||typeof Tr.UNSAFE_componentWillReceiveProps!="function"&&typeof Tr.componentWillReceiveProps!="function"||(Gi||Ts!==ri)&&iI(ge,Tr,ct,ri),h_=!1;var Ls=ge.memoizedState;Tr.state=Ls,U0(ge,ct,Tr,Xt),oh(),Ts=ge.memoizedState,Gi||Ls!==Ts||h_?(typeof Dl=="function"&&(g_(ge,qe,Dl,ct),Ts=ge.memoizedState),(co=h_||e3(ge,qe,co,ct,Ls,Ts,ri))?(bl||typeof Tr.UNSAFE_componentWillMount!="function"&&typeof Tr.componentWillMount!="function"||(typeof Tr.componentWillMount=="function"&&Tr.componentWillMount(),typeof Tr.UNSAFE_componentWillMount=="function"&&Tr.UNSAFE_componentWillMount()),typeof Tr.componentDidMount=="function"&&(ge.flags|=4194308)):(typeof Tr.componentDidMount=="function"&&(ge.flags|=4194308),ge.memoizedProps=ct,ge.memoizedState=Ts),Tr.props=ct,Tr.state=Ts,Tr.context=ri,ct=co):(typeof Tr.componentDidMount=="function"&&(ge.flags|=4194308),ct=!1)}else{Tr=ge.stateNode,Ef(te,ge),ri=ge.memoizedProps,bl=y_(qe,ri),Tr.props=bl,Dl=ge.pendingProps,Ls=Tr.context,Ts=qe.contextType,co=r0,typeof Ts=="object"&&Ts!==null&&(co=wv(Ts)),Gi=qe.getDerivedStateFromProps,(Ts=typeof Gi=="function"||typeof Tr.getSnapshotBeforeUpdate=="function")||typeof Tr.UNSAFE_componentWillReceiveProps!="function"&&typeof Tr.componentWillReceiveProps!="function"||(ri!==Dl||Ls!==co)&&iI(ge,Tr,ct,co),h_=!1,Ls=ge.memoizedState,Tr.state=Ls,U0(ge,ct,Tr,Xt),oh();var Es=ge.memoizedState;ri!==Dl||Ls!==Es||h_||te!==null&&te.dependencies!==null&&hT(te.dependencies)?(typeof Gi=="function"&&(g_(ge,qe,Gi,ct),Es=ge.memoizedState),(bl=h_||e3(ge,qe,bl,ct,Ls,Es,co)||te!==null&&te.dependencies!==null&&hT(te.dependencies))?(Ts||typeof Tr.UNSAFE_componentWillUpdate!="function"&&typeof Tr.componentWillUpdate!="function"||(typeof Tr.componentWillUpdate=="function"&&Tr.componentWillUpdate(ct,Es,co),typeof Tr.UNSAFE_componentWillUpdate=="function"&&Tr.UNSAFE_componentWillUpdate(ct,Es,co)),typeof Tr.componentDidUpdate=="function"&&(ge.flags|=4),typeof Tr.getSnapshotBeforeUpdate=="function"&&(ge.flags|=1024)):(typeof Tr.componentDidUpdate!="function"||ri===te.memoizedProps&&Ls===te.memoizedState||(ge.flags|=4),typeof Tr.getSnapshotBeforeUpdate!="function"||ri===te.memoizedProps&&Ls===te.memoizedState||(ge.flags|=1024),ge.memoizedProps=ct,ge.memoizedState=Es),Tr.props=ct,Tr.state=Es,Tr.context=co,ct=bl):(typeof Tr.componentDidUpdate!="function"||ri===te.memoizedProps&&Ls===te.memoizedState||(ge.flags|=4),typeof Tr.getSnapshotBeforeUpdate!="function"||ri===te.memoizedProps&&Ls===te.memoizedState||(ge.flags|=1024),ct=!1)}return Tr=ct,nf(te,ge),ct=(ge.flags&128)!==0,Tr||ct?(Tr=ge.stateNode,qe=ct&&typeof qe.getDerivedStateFromError!="function"?null:Tr.render(),ge.flags|=1,te!==null&&ct?(ge.child=u2(ge,te.child,null,Xt),ge.child=u2(ge,null,qe,Xt)):uv(te,ge,qe,Xt),ge.memoizedState=Tr.state,te=ge.child):te=V0(te,ge,Xt),te}function fS(te,ge,qe,ct){return LE(),ge.flags|=256,uv(te,ge,qe,ct),ge.child}var Hb={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Mx(te){return{baseLanes:te,cachePool:vT()}}function rp(te,ge,qe){return te=te!==null?te.childLanes&~qe:0,ge&&(te|=Xb),te}function n3(te,ge,qe){var ct=ge.pendingProps,Xt=!1,Tr=(ge.flags&128)!==0,ri;if((ri=Tr)||(ri=te!==null&&te.memoizedState===null?!1:(nm.current&2)!==0),ri&&(Xt=!0,ge.flags&=-129),ri=(ge.flags&32)!==0,ge.flags&=-33,te===null){if(qd){if(Xt?Bb(ge):aw(),qd){var Gi=sv,co;if(co=Gi){e:{for(co=Gi,Gi=B0;co.nodeType!==8;){if(!Gi){Gi=null;break e}if(co=_w(co.nextSibling),co===null){Gi=null;break e}}Gi=co}Gi!==null?(ge.memoizedState={dehydrated:Gi,treeContext:em!==null?{id:tm,overflow:u_}:null,retryLane:536870912,hydrationErrors:null},co=g0(18,null,null,0),co.stateNode=Gi,co.return=ge,ge.child=co,ng=ge,sv=null,co=!0):co=!1}co||Jy(ge)}if(Gi=ge.memoizedState,Gi!==null&&(Gi=Gi.dehydrated,Gi!==null))return hb(Gi)?ge.lanes=32:ge.lanes=536870912,null;Ub(ge)}return Gi=ct.children,ct=ct.fallback,Xt?(aw(),Xt=ge.mode,Gi=c2({mode:"hidden",children:Gi},Xt),ct=e2(ct,Xt,qe,null),Gi.return=ge,ct.return=ge,Gi.sibling=ct,ge.child=Gi,Xt=ge.child,Xt.memoizedState=Mx(qe),Xt.childLanes=rp(te,ri,qe),ge.memoizedState=Hb,ct):(Bb(ge),sw(ge,Gi))}if(co=te.memoizedState,co!==null&&(Gi=co.dehydrated,Gi!==null)){if(Tr)ge.flags&256?(Bb(ge),ge.flags&=-257,ge=j0(te,ge,qe)):ge.memoizedState!==null?(aw(),ge.child=te.child,ge.flags|=128,ge=null):(aw(),Xt=ct.fallback,Gi=ge.mode,ct=c2({mode:"visible",children:ct.children},Gi),Xt=e2(Xt,Gi,qe,null),Xt.flags|=2,ct.return=ge,Xt.return=ge,ct.sibling=Xt,ge.child=ct,u2(ge,te.child,null,qe),ct=ge.child,ct.memoizedState=Mx(qe),ct.childLanes=rp(te,ri,qe),ge.memoizedState=Hb,ge=Xt);else if(Bb(ge),hb(Gi)){if(ri=Gi.nextSibling&&Gi.nextSibling.dataset,ri)var Ts=ri.dgst;ri=Ts,ct=Error(n(419)),ct.stack="",ct.digest=ri,K_({value:ct,source:null,stack:null}),ge=j0(te,ge,qe)}else if(H0||Sx(te,ge,qe,!1),ri=(qe&te.childLanes)!==0,H0||ri){if(ri=Pd,ri!==null&&(ct=qe&-qe,ct=(ct&42)!==0?1:nu(ct),ct=(ct&(ri.suspendedLanes|qe))!==0?0:ct,ct!==0&&ct!==co.retryLane))throw co.retryLane=ct,ib(te,ct),i1(ri,te,ct),cS;Gi.data==="$?"||Ce(),ge=j0(te,ge,qe)}else Gi.data==="$?"?(ge.flags|=192,ge.child=te.child,ge=null):(te=co.treeContext,sv=_w(Gi.nextSibling),ng=ge,qd=!0,Ky=null,B0=!1,te!==null&&(gy[F0++]=tm,gy[F0++]=u_,gy[F0++]=em,tm=te.id,u_=te.overflow,em=ge),ge=sw(ge,ct.children),ge.flags|=4096);return ge}return Xt?(aw(),Xt=ct.fallback,Gi=ge.mode,co=te.child,Ts=co.sibling,ct=Ch(co,{mode:"hidden",children:ct.children}),ct.subtreeFlags=co.subtreeFlags&65011712,Ts!==null?Xt=Ch(Ts,Xt):(Xt=e2(Xt,Gi,qe,null),Xt.flags|=2),Xt.return=ge,ct.return=ge,ct.sibling=Xt,ge.child=ct,ct=Xt,Xt=ge.child,Gi=te.child.memoizedState,Gi===null?Gi=Mx(qe):(co=Gi.cachePool,co!==null?(Ts=Sv._currentValue,co=co.parent!==Ts?{parent:Ts,pool:Ts}:co):co=vT(),Gi={baseLanes:Gi.baseLanes|qe,cachePool:co}),Xt.memoizedState=Gi,Xt.childLanes=rp(te,ri,qe),ge.memoizedState=Hb,ct):(Bb(ge),qe=te.child,te=qe.sibling,qe=Ch(qe,{mode:"visible",children:ct.children}),qe.return=ge,qe.sibling=null,te!==null&&(ri=ge.deletions,ri===null?(ge.deletions=[te],ge.flags|=16):ri.push(te)),ge.child=qe,ge.memoizedState=null,qe)}function sw(te,ge){return ge=c2({mode:"visible",children:ge},te.mode),ge.return=te,te.child=ge}function c2(te,ge){return te=g0(22,te,null,ge),te.lanes=0,te.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},te}function j0(te,ge,qe){return u2(ge,te.child,null,qe),te=sw(ge,ge.pendingProps.children),te.flags|=2,ge.memoizedState=null,te}function w0(te,ge,qe){te.lanes|=ge;var ct=te.alternate;ct!==null&&(ct.lanes|=ge),ob(te.return,ge,qe)}function np(te,ge,qe,ct,Xt){var Tr=te.memoizedState;Tr===null?te.memoizedState={isBackwards:ge,rendering:null,renderingStartTime:0,last:ct,tail:qe,tailMode:Xt}:(Tr.isBackwards=ge,Tr.rendering=null,Tr.renderingStartTime=0,Tr.last=ct,Tr.tail=qe,Tr.tailMode=Xt)}function Rx(te,ge,qe){var ct=ge.pendingProps,Xt=ct.revealOrder,Tr=ct.tail;if(uv(te,ge,ct.children,qe),ct=nm.current,(ct&2)!==0)ct=ct&1|2,ge.flags|=128;else{if(te!==null&&(te.flags&128)!==0)e:for(te=ge.child;te!==null;){if(te.tag===13)te.memoizedState!==null&&w0(te,qe,ge);else if(te.tag===19)w0(te,qe,ge);else if(te.child!==null){te.child.return=te,te=te.child;continue}if(te===ge)break e;for(;te.sibling===null;){if(te.return===null||te.return===ge)break e;te=te.return}te.sibling.return=te.return,te=te.sibling}ct&=1}switch(sr(nm,ct),Xt){case"forwards":for(qe=ge.child,Xt=null;qe!==null;)te=qe.alternate,te!==null&&m_(te)===null&&(Xt=qe),qe=qe.sibling;qe=Xt,qe===null?(Xt=ge.child,ge.child=null):(Xt=qe.sibling,qe.sibling=null),np(ge,!1,Xt,qe,Tr);break;case"backwards":for(qe=null,Xt=ge.child,ge.child=null;Xt!==null;){if(te=Xt.alternate,te!==null&&m_(te)===null){ge.child=Xt;break}te=Xt.sibling,Xt.sibling=qe,qe=Xt,Xt=te}np(ge,!0,qe,null,Tr);break;case"together":np(ge,!1,null,null,void 0);break;default:ge.memoizedState=null}return ge.child}function V0(te,ge,qe){if(te!==null&&(ge.dependencies=te.dependencies),T_|=ge.lanes,(qe&ge.childLanes)===0)if(te!==null){if(Sx(te,ge,qe,!1),(qe&ge.childLanes)===0)return null}else return null;if(te!==null&&ge.child!==te.child)throw Error(n(153));if(ge.child!==null){for(te=ge.child,qe=Ch(te,te.pendingProps),ge.child=qe,qe.return=ge;te.sibling!==null;)te=te.sibling,qe=qe.sibling=Ch(te,te.pendingProps),qe.return=ge;qe.sibling=null}return ge.child}function jb(te,ge){return(te.lanes&ge)!==0?!0:(te=te.dependencies,!!(te!==null&&hT(te)))}function im(te,ge,qe){switch(ge.tag){case 3:Un(ge,ge.stateNode.containerInfo),ab(ge,Sv,te.memoizedState.cache),LE();break;case 27:case 5:Jn(ge);break;case 4:Un(ge,ge.stateNode.containerInfo);break;case 10:ab(ge,ge.type,ge.memoizedProps.value);break;case 13:var ct=ge.memoizedState;if(ct!==null)return ct.dehydrated!==null?(Bb(ge),ge.flags|=128,null):(qe&ge.child.childLanes)!==0?n3(te,ge,qe):(Bb(ge),te=V0(te,ge,qe),te!==null?te.sibling:null);Bb(ge);break;case 19:var Xt=(te.flags&128)!==0;if(ct=(qe&ge.childLanes)!==0,ct||(Sx(te,ge,qe,!1),ct=(qe&ge.childLanes)!==0),Xt){if(ct)return Rx(te,ge,qe);ge.flags|=128}if(Xt=ge.memoizedState,Xt!==null&&(Xt.rendering=null,Xt.tail=null,Xt.lastEffect=null),sr(nm,nm.current),ct)break;return null;case 22:case 23:return ge.lanes=0,b_(te,ge,qe);case 24:ab(ge,Sv,te.memoizedState.cache)}return V0(te,ge,qe)}function f2(te,ge,qe){if(te!==null)if(te.memoizedProps!==ge.pendingProps)H0=!0;else{if(!jb(te,qe)&&(ge.flags&128)===0)return H0=!1,im(te,ge,qe);H0=(te.flags&131072)!==0}else H0=!1,qd&&(ge.flags&1048576)!==0&&qg(ge,my,ge.index);switch(ge.lanes=0,ge.tag){case 16:e:{te=ge.pendingProps;var ct=ge.elementType,Xt=ct._init;if(ct=Xt(ct._payload),ge.type=ct,typeof ct=="function")y0(ct)?(te=y_(ct,te),ge.tag=1,ge=_0(null,ge,ct,te,qe)):(ge.tag=0,ge=x_(null,ge,ct,te,qe));else{if(ct!=null){if(Xt=ct.$$typeof,Xt===Pe){ge.tag=11,ge=r1(null,ge,ct,te,qe);break e}else if(Xt===Ve){ge.tag=14,ge=n1(null,ge,ct,te,qe);break e}}throw ge=Dt(ct)||ct,Error(n(306,ge,""))}}return ge;case 0:return x_(te,ge,ge.type,ge.pendingProps,qe);case 1:return ct=ge.type,Xt=y_(ct,ge.pendingProps),_0(te,ge,ct,Xt,qe);case 3:e:{if(Un(ge,ge.stateNode.containerInfo),te===null)throw Error(n(387));ct=ge.pendingProps;var Tr=ge.memoizedState;Xt=Tr.element,Ef(te,ge),U0(ge,ct,null,qe);var ri=ge.memoizedState;if(ct=ri.cache,ab(ge,Sv,ct),ct!==Tr.cache&&eh(ge,[Sv],qe,!0),oh(),ct=ri.element,Tr.isDehydrated)if(Tr={element:ct,isDehydrated:!1,cache:ri.cache},ge.updateQueue.baseState=Tr,ge.memoizedState=Tr,ge.flags&256){ge=fS(te,ge,ct,qe);break e}else if(ct!==Xt){Xt=Sg(Error(n(424)),ge),K_(Xt),ge=fS(te,ge,ct,qe);break e}else{switch(te=ge.stateNode.containerInfo,te.nodeType){case 9:te=te.body;break;default:te=te.nodeName==="HTML"?te.ownerDocument.body:te}for(sv=_w(te.firstChild),ng=ge,qd=!0,Ky=null,B0=!0,qe=nI(ge,null,ct,qe),ge.child=qe;qe;)qe.flags=qe.flags&-3|4096,qe=qe.sibling}else{if(LE(),ct===Xt){ge=V0(te,ge,qe);break e}uv(te,ge,ct,qe)}ge=ge.child}return ge;case 26:return nf(te,ge),te===null?(qe=mI(ge.type,null,ge.pendingProps,null))?ge.memoizedState=qe:qd||(qe=ge.type,te=ge.pendingProps,ct=C_(Ir.current).createElement(qe),ct[Oo]=ge,ct[_s]=te,X0(ct,qe,te),ps(ct),ge.stateNode=ct):ge.memoizedState=mI(ge.type,te.memoizedProps,ge.pendingProps,te.memoizedState),null;case 27:return Jn(ge),te===null&&qd&&(ct=ge.stateNode=hI(ge.type,ge.pendingProps,Ir.current),ng=ge,B0=!0,Xt=sv,a1(ge.type)?(dI=Xt,sv=_w(ct.firstChild)):sv=Xt),uv(te,ge,ge.pendingProps.children,qe),nf(te,ge),te===null&&(ge.flags|=4194304),ge.child;case 5:return te===null&&qd&&((Xt=ct=sv)&&(ct=k4(ct,ge.type,ge.pendingProps,B0),ct!==null?(ge.stateNode=ct,ng=ge,sv=_w(ct.firstChild),B0=!1,Xt=!0):Xt=!1),Xt||Jy(ge)),Jn(ge),Xt=ge.type,Tr=ge.pendingProps,ri=te!==null?te.memoizedProps:null,ct=Tr.children,wR(Xt,Tr)?ct=null:ri!==null&&wR(Xt,ri)&&(ge.flags|=32),ge.memoizedState!==null&&(Xt=v_(te,ge,xM,null,null,qe),oC._currentValue=Xt),nf(te,ge),uv(te,ge,ct,qe),ge.child;case 6:return te===null&&qd&&((te=qe=sv)&&(qe=TR(qe,ge.pendingProps,B0),qe!==null?(ge.stateNode=qe,ng=ge,sv=null,te=!0):te=!1),te||Jy(ge)),null;case 13:return n3(te,ge,qe);case 4:return Un(ge,ge.stateNode.containerInfo),ct=ge.pendingProps,te===null?ge.child=u2(ge,null,ct,qe):uv(te,ge,ct,qe),ge.child;case 11:return r1(te,ge,ge.type,ge.pendingProps,qe);case 7:return uv(te,ge,ge.pendingProps,qe),ge.child;case 8:return uv(te,ge,ge.pendingProps.children,qe),ge.child;case 12:return uv(te,ge,ge.pendingProps.children,qe),ge.child;case 10:return ct=ge.pendingProps,ab(ge,ge.type,ct.value),uv(te,ge,ct.children,qe),ge.child;case 9:return Xt=ge.type._context,ct=ge.pendingProps.children,J_(ge),Xt=wv(Xt),ct=ct(Xt),ge.flags|=1,uv(te,ge,ct,qe),ge.child;case 14:return n1(te,ge,ge.type,ge.pendingProps,qe);case 15:return r3(te,ge,ge.type,ge.pendingProps,qe);case 19:return Rx(te,ge,qe);case 31:return ct=ge.pendingProps,qe=ge.mode,ct={mode:ct.mode,children:ct.children},te===null?(qe=c2(ct,qe),qe.ref=ge.ref,ge.child=qe,qe.return=ge,ge=qe):(qe=Ch(te.child,ct),qe.ref=ge.ref,ge.child=qe,qe.return=ge,ge=qe),ge;case 22:return b_(te,ge,qe);case 24:return J_(ge),ct=wv(Sv),te===null?(Xt=lb(),Xt===null&&(Xt=Pd,Tr=gM(),Xt.pooledCache=Tr,Tr.refCount++,Tr!==null&&(Xt.pooledCacheLanes|=qe),Xt=Tr),ge.memoizedState={parent:ct,cache:Xt},yT(ge),ab(ge,Sv,Xt)):((te.lanes&qe)!==0&&(Ef(te,ge),U0(ge,null,null,qe),oh()),Xt=te.memoizedState,Tr=ge.memoizedState,Xt.parent!==ct?(Xt={parent:ct,cache:ct},ge.memoizedState=Xt,ge.lanes===0&&(ge.memoizedState=ge.updateQueue.baseState=Xt),ab(ge,Sv,ct)):(ct=Tr.cache,ab(ge,Sv,ct),ct!==Xt.cache&&eh(ge,[Sv],qe,!0))),uv(te,ge,ge.pendingProps.children,qe),ge.child;case 29:throw ge.pendingProps}throw Error(n(156,ge.tag))}function __(te){te.flags|=4}function AT(te,ge){if(ge.type!=="stylesheet"||(ge.state.loading&4)!==0)te.flags&=-16777217;else if(te.flags|=16777216,!Mg(ge)){if(ge=lv.current,ge!==null&&((wf&4194048)===wf?xy!==null:(wf&62914560)!==wf&&(wf&536870912)===0||ge!==xy))throw Fb=PA,iR;te.flags|=8192}}function d2(te,ge){ge!==null&&(te.flags|=4),te.flags&16384&&(ge=te.tag!==22?po():536870912,te.lanes|=ge,ip|=ge)}function CT(te,ge){if(!qd)switch(te.tailMode){case"hidden":ge=te.tail;for(var qe=null;ge!==null;)ge.alternate!==null&&(qe=ge),ge=ge.sibling;qe===null?te.tail=null:qe.sibling=null;break;case"collapsed":qe=te.tail;for(var ct=null;qe!==null;)qe.alternate!==null&&(ct=qe),qe=qe.sibling;ct===null?ge||te.tail===null?te.tail=null:te.tail.sibling=null:ct.sibling=null}}function Zp(te){var ge=te.alternate!==null&&te.alternate.child===te.child,qe=0,ct=0;if(ge)for(var Xt=te.child;Xt!==null;)qe|=Xt.lanes|Xt.childLanes,ct|=Xt.subtreeFlags&65011712,ct|=Xt.flags&65011712,Xt.return=te,Xt=Xt.sibling;else for(Xt=te.child;Xt!==null;)qe|=Xt.lanes|Xt.childLanes,ct|=Xt.subtreeFlags,ct|=Xt.flags,Xt.return=te,Xt=Xt.sibling;return te.subtreeFlags|=ct,te.childLanes=qe,ge}function XA(te,ge,qe){var ct=ge.pendingProps;switch(z0(ge),ge.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Zp(ge),null;case 1:return Zp(ge),null;case 3:return qe=ge.stateNode,ct=null,te!==null&&(ct=te.memoizedState.cache),ge.memoizedState.cache!==ct&&(ge.flags|=2048),wx(Sv),Qn(),qe.pendingContext&&(qe.context=qe.pendingContext,qe.pendingContext=null),(te===null||te.child===null)&&(c_(ge)?__(ge):te===null||te.memoizedState.isDehydrated&&(ge.flags&256)===0||(ge.flags|=1024,Rf())),Zp(ge),null;case 26:return qe=ge.memoizedState,te===null?(__(ge),qe!==null?(Zp(ge),AT(ge,qe)):(Zp(ge),ge.flags&=-16777217)):qe?qe!==te.memoizedState?(__(ge),Zp(ge),AT(ge,qe)):(Zp(ge),ge.flags&=-16777217):(te.memoizedProps!==ct&&__(ge),Zp(ge),ge.flags&=-16777217),null;case 27:Vn(ge),qe=Ir.current;var Xt=ge.type;if(te!==null&&ge.stateNode!=null)te.memoizedProps!==ct&&__(ge);else{if(!ct){if(ge.stateNode===null)throw Error(n(166));return Zp(ge),null}te=or.current,c_(ge)?CA(ge):(te=hI(Xt,ct,qe),ge.stateNode=te,__(ge))}return Zp(ge),null;case 5:if(Vn(ge),qe=ge.type,te!==null&&ge.stateNode!=null)te.memoizedProps!==ct&&__(ge);else{if(!ct){if(ge.stateNode===null)throw Error(n(166));return Zp(ge),null}if(te=or.current,c_(ge))CA(ge);else{switch(Xt=C_(Ir.current),te){case 1:te=Xt.createElementNS("http://www.w3.org/2000/svg",qe);break;case 2:te=Xt.createElementNS("http://www.w3.org/1998/Math/MathML",qe);break;default:switch(qe){case"svg":te=Xt.createElementNS("http://www.w3.org/2000/svg",qe);break;case"math":te=Xt.createElementNS("http://www.w3.org/1998/Math/MathML",qe);break;case"script":te=Xt.createElement("div"),te.innerHTML="<script><\/script>",te=te.removeChild(te.firstChild);break;case"select":te=typeof ct.is=="string"?Xt.createElement("select",{is:ct.is}):Xt.createElement("select"),ct.multiple?te.multiple=!0:ct.size&&(te.size=ct.size);break;default:te=typeof ct.is=="string"?Xt.createElement(qe,{is:ct.is}):Xt.createElement(qe)}}te[Oo]=ge,te[_s]=ct;e:for(Xt=ge.child;Xt!==null;){if(Xt.tag===5||Xt.tag===6)te.appendChild(Xt.stateNode);else if(Xt.tag!==4&&Xt.tag!==27&&Xt.child!==null){Xt.child.return=Xt,Xt=Xt.child;continue}if(Xt===ge)break e;for(;Xt.sibling===null;){if(Xt.return===null||Xt.return===ge)break e;Xt=Xt.return}Xt.sibling.return=Xt.return,Xt=Xt.sibling}ge.stateNode=te;e:switch(X0(te,qe,ct),qe){case"button":case"input":case"select":case"textarea":te=!!ct.autoFocus;break e;case"img":te=!0;break e;default:te=!1}te&&__(ge)}}return Zp(ge),ge.flags&=-16777217,null;case 6:if(te&&ge.stateNode!=null)te.memoizedProps!==ct&&__(ge);else{if(typeof ct!="string"&&ge.stateNode===null)throw Error(n(166));if(te=Ir.current,c_(ge)){if(te=ge.stateNode,qe=ge.memoizedProps,ct=null,Xt=ng,Xt!==null)switch(Xt.tag){case 27:case 5:ct=Xt.memoizedProps}te[Oo]=ge,te=!!(te.nodeValue===qe||ct!==null&&ct.suppressHydrationWarning===!0||_R(te.nodeValue,qe)),te||Jy(ge)}else te=C_(te).createTextNode(ct),te[Oo]=ge,ge.stateNode=te}return Zp(ge),null;case 13:if(ct=ge.memoizedState,te===null||te.memoizedState!==null&&te.memoizedState.dehydrated!==null){if(Xt=c_(ge),ct!==null&&ct.dehydrated!==null){if(te===null){if(!Xt)throw Error(n(318));if(Xt=ge.memoizedState,Xt=Xt!==null?Xt.dehydrated:null,!Xt)throw Error(n(317));Xt[Oo]=ge}else LE(),(ge.flags&128)===0&&(ge.memoizedState=null),ge.flags|=4;Zp(ge),Xt=!1}else Xt=Rf(),te!==null&&te.memoizedState!==null&&(te.memoizedState.hydrationErrors=Xt),Xt=!0;if(!Xt)return ge.flags&256?(Ub(ge),ge):(Ub(ge),null)}if(Ub(ge),(ge.flags&128)!==0)return ge.lanes=qe,ge;if(qe=ct!==null,te=te!==null&&te.memoizedState!==null,qe){ct=ge.child,Xt=null,ct.alternate!==null&&ct.alternate.memoizedState!==null&&ct.alternate.memoizedState.cachePool!==null&&(Xt=ct.alternate.memoizedState.cachePool.pool);var Tr=null;ct.memoizedState!==null&&ct.memoizedState.cachePool!==null&&(Tr=ct.memoizedState.cachePool.pool),Tr!==Xt&&(ct.flags|=2048)}return qe!==te&&qe&&(ge.child.flags|=8192),d2(ge,ge.updateQueue),Zp(ge),null;case 4:return Qn(),te===null&&h3(ge.stateNode.containerInfo),Zp(ge),null;case 10:return wx(ge.type),Zp(ge),null;case 19:if(Er(nm),Xt=ge.memoizedState,Xt===null)return Zp(ge),null;if(ct=(ge.flags&128)!==0,Tr=Xt.rendering,Tr===null)if(ct)CT(Xt,!1);else{if(am!==0||te!==null&&(te.flags&128)!==0)for(te=ge.child;te!==null;){if(Tr=m_(te),Tr!==null){for(ge.flags|=128,CT(Xt,!1),te=Tr.updateQueue,ge.updateQueue=te,d2(ge,te),ge.subtreeFlags=0,te=qe,qe=ge.child;qe!==null;)DE(qe,te),qe=qe.sibling;return sr(nm,nm.current&1|2),ge.child}te=te.sibling}Xt.tail!==null&&bn()>$0&&(ge.flags|=128,ct=!0,CT(Xt,!1),ge.lanes=4194304)}else{if(!ct)if(te=m_(Tr),te!==null){if(ge.flags|=128,ct=!0,te=te.updateQueue,ge.updateQueue=te,d2(ge,te),CT(Xt,!0),Xt.tail===null&&Xt.tailMode==="hidden"&&!Tr.alternate&&!qd)return Zp(ge),null}else 2*bn()-Xt.renderingStartTime>$0&&qe!==536870912&&(ge.flags|=128,ct=!0,CT(Xt,!1),ge.lanes=4194304);Xt.isBackwards?(Tr.sibling=ge.child,ge.child=Tr):(te=Xt.last,te!==null?te.sibling=Tr:ge.child=Tr,Xt.last=Tr)}return Xt.tail!==null?(ge=Xt.tail,Xt.rendering=ge,Xt.tail=ge.sibling,Xt.renderingStartTime=bn(),ge.sibling=null,te=nm.current,sr(nm,ct?te&1|2:te&1),ge):(Zp(ge),null);case 22:case 23:return Ub(ge),LA(),ct=ge.memoizedState!==null,te!==null?te.memoizedState!==null!==ct&&(ge.flags|=8192):ct&&(ge.flags|=8192),ct?(qe&536870912)!==0&&(ge.flags&128)===0&&(Zp(ge),ge.subtreeFlags&6&&(ge.flags|=8192)):Zp(ge),qe=ge.updateQueue,qe!==null&&d2(ge,qe.retryQueue),qe=null,te!==null&&te.memoizedState!==null&&te.memoizedState.cachePool!==null&&(qe=te.memoizedState.cachePool.pool),ct=null,ge.memoizedState!==null&&ge.memoizedState.cachePool!==null&&(ct=ge.memoizedState.cachePool.pool),ct!==qe&&(ge.flags|=2048),te!==null&&Er(Tx),null;case 24:return qe=null,te!==null&&(qe=te.memoizedState.cache),ge.memoizedState.cache!==qe&&(ge.flags|=2048),wx(Sv),Zp(ge),null;case 25:return null;case 30:return null}throw Error(n(156,ge.tag))}function dS(te,ge){switch(z0(ge),ge.tag){case 1:return te=ge.flags,te&65536?(ge.flags=te&-65537|128,ge):null;case 3:return wx(Sv),Qn(),te=ge.flags,(te&65536)!==0&&(te&128)===0?(ge.flags=te&-65537|128,ge):null;case 26:case 27:case 5:return Vn(ge),null;case 13:if(Ub(ge),te=ge.memoizedState,te!==null&&te.dehydrated!==null){if(ge.alternate===null)throw Error(n(340));LE()}return te=ge.flags,te&65536?(ge.flags=te&-65537|128,ge):null;case 19:return Er(nm),null;case 4:return Qn(),null;case 10:return wx(ge.type),null;case 22:case 23:return Ub(ge),LA(),te!==null&&Er(Tx),te=ge.flags,te&65536?(ge.flags=te&-65537|128,ge):null;case 24:return wx(Sv),null;case 25:return null;default:return null}}function lw(te,ge){switch(z0(ge),ge.tag){case 3:wx(Sv),Qn();break;case 26:case 27:case 5:Vn(ge);break;case 4:Qn();break;case 13:Ub(ge);break;case 19:Er(nm);break;case 10:wx(ge.type);break;case 22:case 23:Ub(ge),LA(),te!==null&&Er(Tx);break;case 24:wx(Sv)}}function hS(te,ge){try{var qe=ge.updateQueue,ct=qe!==null?qe.lastEffect:null;if(ct!==null){var Xt=ct.next;qe=Xt;do{if((qe.tag&te)===te){ct=void 0;var Tr=qe.create,ri=qe.inst;ct=Tr(),ri.destroy=ct}qe=qe.next}while(qe!==Xt)}}catch(Gi){zo(ge,ge.return,Gi)}}function Vb(te,ge,qe){try{var ct=ge.updateQueue,Xt=ct!==null?ct.lastEffect:null;if(Xt!==null){var Tr=Xt.next;ct=Tr;do{if((ct.tag&te)===te){var ri=ct.inst,Gi=ri.destroy;if(Gi!==void 0){ri.destroy=void 0,Xt=ge;var co=qe,Ts=Gi;try{Ts()}catch(bl){zo(Xt,co,bl)}}}ct=ct.next}while(ct!==Tr)}}catch(bl){zo(ge,ge.return,bl)}}function MT(te){var ge=te.updateQueue;if(ge!==null){var qe=te.stateNode;try{oR(ge,qe)}catch(ct){zo(te,te.return,ct)}}}function uw(te,ge,qe){qe.props=y_(te.type,te.memoizedProps),qe.state=te.memoizedState;try{qe.componentWillUnmount()}catch(ct){zo(te,ge,ct)}}function pS(te,ge){try{var qe=te.ref;if(qe!==null){switch(te.tag){case 26:case 27:case 5:var ct=te.stateNode;break;case 30:ct=te.stateNode;break;default:ct=te.stateNode}typeof qe=="function"?te.refCleanup=qe(ct):qe.current=ct}}catch(Xt){zo(te,ge,Xt)}}function cw(te,ge){var qe=te.ref,ct=te.refCleanup;if(qe!==null)if(typeof ct=="function")try{ct()}catch(Xt){zo(te,ge,Xt)}finally{te.refCleanup=null,te=te.alternate,te!=null&&(te.refCleanup=null)}else if(typeof qe=="function")try{qe(null)}catch(Xt){zo(te,ge,Xt)}else qe.current=null}function vS(te){var ge=te.type,qe=te.memoizedProps,ct=te.stateNode;try{e:switch(ge){case"button":case"input":case"select":case"textarea":qe.autoFocus&&ct.focus();break e;case"img":qe.src?ct.src=qe.src:qe.srcSet&&(ct.srcset=qe.srcSet)}}catch(Xt){zo(te,te.return,Xt)}}function i3(te,ge,qe){try{var ct=te.stateNode;RF(ct,te.type,qe,ge),ct[_s]=ge}catch(Xt){zo(te,te.return,Xt)}}function h2(te){return te.tag===5||te.tag===3||te.tag===26||te.tag===27&&a1(te.type)||te.tag===4}function fw(te){e:for(;;){for(;te.sibling===null;){if(te.return===null||h2(te.return))return null;te=te.return}for(te.sibling.return=te.return,te=te.sibling;te.tag!==5&&te.tag!==6&&te.tag!==18;){if(te.tag===27&&a1(te.type)||te.flags&2||te.child===null||te.tag===4)continue e;te.child.return=te,te=te.child}if(!(te.flags&2))return te.stateNode}}function qb(te,ge,qe){var ct=te.tag;if(ct===5||ct===6)te=te.stateNode,ge?(qe.nodeType===9?qe.body:qe.nodeName==="HTML"?qe.ownerDocument.body:qe).insertBefore(te,ge):(ge=qe.nodeType===9?qe.body:qe.nodeName==="HTML"?qe.ownerDocument.body:qe,ge.appendChild(te),qe=qe._reactRootContainer,qe!=null||ge.onclick!==null||(ge.onclick=FM));else if(ct!==4&&(ct===27&&a1(te.type)&&(qe=te.stateNode,ge=null),te=te.child,te!==null))for(qb(te,ge,qe),te=te.sibling;te!==null;)qb(te,ge,qe),te=te.sibling}function dw(te,ge,qe){var ct=te.tag;if(ct===5||ct===6)te=te.stateNode,ge?qe.insertBefore(te,ge):qe.appendChild(te);else if(ct!==4&&(ct===27&&a1(te.type)&&(qe=te.stateNode),te=te.child,te!==null))for(dw(te,ge,qe),te=te.sibling;te!==null;)dw(te,ge,qe),te=te.sibling}function w_(te){var ge=te.stateNode,qe=te.memoizedProps;try{for(var ct=te.type,Xt=ge.attributes;Xt.length;)ge.removeAttributeNode(Xt[0]);X0(ge,ct,qe),ge[Oo]=te,ge[_s]=qe}catch(Tr){zo(te,te.return,Tr)}}var q0=!1,Rh=!1,kx=!1,Gb=typeof WeakSet=="function"?WeakSet:Set,bp=null;function $g(te,ge){if(te=te.containerInfo,xw=T0,te=rR(te),TA(te)){if("selectionStart"in te)var qe={start:te.selectionStart,end:te.selectionEnd};else e:{qe=(qe=te.ownerDocument)&&qe.defaultView||window;var ct=qe.getSelection&&qe.getSelection();if(ct&&ct.rangeCount!==0){qe=ct.anchorNode;var Xt=ct.anchorOffset,Tr=ct.focusNode;ct=ct.focusOffset;try{qe.nodeType,Tr.nodeType}catch{qe=null;break e}var ri=0,Gi=-1,co=-1,Ts=0,bl=0,Dl=te,Ls=null;t:for(;;){for(var Es;Dl!==qe||Xt!==0&&Dl.nodeType!==3||(Gi=ri+Xt),Dl!==Tr||ct!==0&&Dl.nodeType!==3||(co=ri+ct),Dl.nodeType===3&&(ri+=Dl.nodeValue.length),(Es=Dl.firstChild)!==null;)Ls=Dl,Dl=Es;for(;;){if(Dl===te)break t;if(Ls===qe&&++Ts===Xt&&(Gi=ri),Ls===Tr&&++bl===ct&&(co=ri),(Es=Dl.nextSibling)!==null)break;Dl=Ls,Ls=Dl.parentNode}Dl=Es}qe=Gi===-1||co===-1?null:{start:Gi,end:co}}else qe=null}qe=qe||{start:0,end:0}}else qe=null;for(eC={focusedElem:te,selectionRange:qe},T0=!1,bp=ge;bp!==null;)if(ge=bp,te=ge.child,(ge.subtreeFlags&1024)!==0&&te!==null)te.return=ge,bp=te;else for(;bp!==null;){switch(ge=bp,Tr=ge.alternate,te=ge.flags,ge.tag){case 0:break;case 11:case 15:break;case 1:if((te&1024)!==0&&Tr!==null){te=void 0,qe=ge,Xt=Tr.memoizedProps,Tr=Tr.memoizedState,ct=qe.stateNode;try{var qf=y_(qe.type,Xt,qe.elementType===qe.type);te=ct.getSnapshotBeforeUpdate(qf,Tr),ct.__reactInternalSnapshotBeforeUpdate=te}catch(Ff){zo(qe,qe.return,Ff)}}break;case 3:if((te&1024)!==0){if(te=ge.stateNode.containerInfo,qe=te.nodeType,qe===9)M_(te);else if(qe===1)switch(te.nodeName){case"HEAD":case"HTML":case"BODY":M_(te);break;default:te.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((te&1024)!==0)throw Error(n(163))}if(te=ge.sibling,te!==null){te.return=ge.return,bp=te;break}bp=ge.return}}function Ix(te,ge,qe){var ct=qe.flags;switch(qe.tag){case 0:case 11:case 15:O1(te,qe),ct&4&&hS(5,qe);break;case 1:if(O1(te,qe),ct&4)if(te=qe.stateNode,ge===null)try{te.componentDidMount()}catch(ri){zo(qe,qe.return,ri)}else{var Xt=y_(qe.type,ge.memoizedProps);ge=ge.memoizedState;try{te.componentDidUpdate(Xt,ge,te.__reactInternalSnapshotBeforeUpdate)}catch(ri){zo(qe,qe.return,ri)}}ct&64&&MT(qe),ct&512&&pS(qe,qe.return);break;case 3:if(O1(te,qe),ct&64&&(te=qe.updateQueue,te!==null)){if(ge=null,qe.child!==null)switch(qe.child.tag){case 27:case 5:ge=qe.child.stateNode;break;case 1:ge=qe.child.stateNode}try{oR(te,ge)}catch(ri){zo(qe,qe.return,ri)}}break;case 27:ge===null&&ct&4&&w_(qe);case 26:case 5:O1(te,qe),ge===null&&ct&4&&vS(qe),ct&512&&pS(qe,qe.return);break;case 12:O1(te,qe);break;case 13:O1(te,qe),ct&4&&p2(te,qe),ct&64&&(te=qe.memoizedState,te!==null&&(te=te.dehydrated,te!==null&&(qe=Tv.bind(null,qe),tC(te,qe))));break;case 22:if(ct=qe.memoizedState!==null||q0,!ct){ge=ge!==null&&ge.memoizedState!==null||Rh,Xt=q0;var Tr=Rh;q0=ct,(Rh=ge)&&!Tr?S_(te,qe,(qe.subtreeFlags&8772)!==0):O1(te,qe),q0=Xt,Rh=Tr}break;case 30:break;default:O1(te,qe)}}function $d(te){var ge=te.alternate;ge!==null&&(te.alternate=null,$d(ge)),te.child=null,te.deletions=null,te.sibling=null,te.tag===5&&(ge=te.stateNode,ge!==null&&Vl(ge)),te.stateNode=null,te.return=null,te.dependencies=null,te.memoizedProps=null,te.memoizedState=null,te.pendingProps=null,te.stateNode=null,te.updateQueue=null}var kf=null,xp=!1;function Px(te,ge,qe){for(qe=qe.child;qe!==null;)RT(te,ge,qe),qe=qe.sibling}function RT(te,ge,qe){if(Ei&&typeof Ei.onCommitFiberUnmount=="function")try{Ei.onCommitFiberUnmount(Wn,qe)}catch{}switch(qe.tag){case 26:Rh||cw(qe,ge),Px(te,ge,qe),qe.memoizedState?qe.memoizedState.count--:qe.stateNode&&(qe=qe.stateNode,qe.parentNode.removeChild(qe));break;case 27:Rh||cw(qe,ge);var ct=kf,Xt=xp;a1(qe.type)&&(kf=qe.stateNode,xp=!1),Px(te,ge,qe),rC(qe.stateNode),kf=ct,xp=Xt;break;case 5:Rh||cw(qe,ge);case 6:if(ct=kf,Xt=xp,kf=null,Px(te,ge,qe),kf=ct,xp=Xt,kf!==null)if(xp)try{(kf.nodeType===9?kf.body:kf.nodeName==="HTML"?kf.ownerDocument.body:kf).removeChild(qe.stateNode)}catch(Tr){zo(qe,ge,Tr)}else try{kf.removeChild(qe.stateNode)}catch(Tr){zo(qe,ge,Tr)}break;case 18:kf!==null&&(xp?(te=kf,DT(te.nodeType===9?te.body:te.nodeName==="HTML"?te.ownerDocument.body:te,qe.stateNode),_3(te)):DT(kf,qe.stateNode));break;case 4:ct=kf,Xt=xp,kf=qe.stateNode.containerInfo,xp=!0,Px(te,ge,qe),kf=ct,xp=Xt;break;case 0:case 11:case 14:case 15:Rh||Vb(2,qe,ge),Rh||Vb(4,qe,ge),Px(te,ge,qe);break;case 1:Rh||(cw(qe,ge),ct=qe.stateNode,typeof ct.componentWillUnmount=="function"&&uw(qe,ge,ct)),Px(te,ge,qe);break;case 21:Px(te,ge,qe);break;case 22:Rh=(ct=Rh)||qe.memoizedState!==null,Px(te,ge,qe),Rh=ct;break;default:Px(te,ge,qe)}}function p2(te,ge){if(ge.memoizedState===null&&(te=ge.alternate,te!==null&&(te=te.memoizedState,te!==null&&(te=te.dehydrated,te!==null))))try{_3(te)}catch(qe){zo(ge,ge.return,qe)}}function mS(te){switch(te.tag){case 13:case 19:var ge=te.stateNode;return ge===null&&(ge=te.stateNode=new Gb),ge;case 22:return te=te.stateNode,ge=te._retryCache,ge===null&&(ge=te._retryCache=new Gb),ge;default:throw Error(n(435,te.tag))}}function kT(te,ge){var qe=mS(te);ge.forEach(function(ct){var Xt=Qf.bind(null,te,ct);qe.has(ct)||(qe.add(ct),ct.then(Xt,Xt))})}function G0(te,ge){var qe=ge.deletions;if(qe!==null)for(var ct=0;ct<qe.length;ct++){var Xt=qe[ct],Tr=te,ri=ge,Gi=ri;e:for(;Gi!==null;){switch(Gi.tag){case 27:if(a1(Gi.type)){kf=Gi.stateNode,xp=!1;break e}break;case 5:kf=Gi.stateNode,xp=!1;break e;case 3:case 4:kf=Gi.stateNode.containerInfo,xp=!0;break e}Gi=Gi.return}if(kf===null)throw Error(n(160));RT(Tr,ri,Xt),kf=null,xp=!1,Tr=Xt.alternate,Tr!==null&&(Tr.return=null),Xt.return=null}if(ge.subtreeFlags&13878)for(ge=ge.child;ge!==null;)ZA(ge,te),ge=ge.sibling}var Dx=null;function ZA(te,ge){var qe=te.alternate,ct=te.flags;switch(te.tag){case 0:case 11:case 14:case 15:G0(ge,te),ag(te),ct&4&&(Vb(3,te,te.return),hS(3,te),Vb(5,te,te.return));break;case 1:G0(ge,te),ag(te),ct&512&&(Rh||qe===null||cw(qe,qe.return)),ct&64&&q0&&(te=te.updateQueue,te!==null&&(ct=te.callbacks,ct!==null&&(qe=te.shared.hiddenCallbacks,te.shared.hiddenCallbacks=qe===null?ct:qe.concat(ct))));break;case 26:var Xt=Dx;if(G0(ge,te),ag(te),ct&512&&(Rh||qe===null||cw(qe,qe.return)),ct&4){var Tr=qe!==null?qe.memoizedState:null;if(ct=te.memoizedState,qe===null)if(ct===null)if(te.stateNode===null){e:{ct=te.type,qe=te.memoizedProps,Xt=Xt.ownerDocument||Xt;t:switch(ct){case"title":Tr=Xt.getElementsByTagName("title")[0],(!Tr||Tr[Js]||Tr[Oo]||Tr.namespaceURI==="http://www.w3.org/2000/svg"||Tr.hasAttribute("itemprop"))&&(Tr=Xt.createElement(ct),Xt.head.insertBefore(Tr,Xt.querySelector("head > title"))),X0(Tr,ct,qe),Tr[Oo]=te,ps(Tr),ct=Tr;break e;case"link":var ri=AR("link","href",Xt).get(ct+(qe.href||""));if(ri){for(var Gi=0;Gi<ri.length;Gi++)if(Tr=ri[Gi],Tr.getAttribute("href")===(qe.href==null||qe.href===""?null:qe.href)&&Tr.getAttribute("rel")===(qe.rel==null?null:qe.rel)&&Tr.getAttribute("title")===(qe.title==null?null:qe.title)&&Tr.getAttribute("crossorigin")===(qe.crossOrigin==null?null:qe.crossOrigin)){ri.splice(Gi,1);break t}}Tr=Xt.createElement(ct),X0(Tr,ct,qe),Xt.head.appendChild(Tr);break;case"meta":if(ri=AR("meta","content",Xt).get(ct+(qe.content||""))){for(Gi=0;Gi<ri.length;Gi++)if(Tr=ri[Gi],Tr.getAttribute("content")===(qe.content==null?null:""+qe.content)&&Tr.getAttribute("name")===(qe.name==null?null:qe.name)&&Tr.getAttribute("property")===(qe.property==null?null:qe.property)&&Tr.getAttribute("http-equiv")===(qe.httpEquiv==null?null:qe.httpEquiv)&&Tr.getAttribute("charset")===(qe.charSet==null?null:qe.charSet)){ri.splice(Gi,1);break t}}Tr=Xt.createElement(ct),X0(Tr,ct,qe),Xt.head.appendChild(Tr);break;default:throw Error(n(468,ct))}Tr[Oo]=te,ps(Tr),ct=Tr}te.stateNode=ct}else CR(Xt,te.type,te.stateNode);else te.stateNode=y6(Xt,ct,te.memoizedProps);else Tr!==ct?(Tr===null?qe.stateNode!==null&&(qe=qe.stateNode,qe.parentNode.removeChild(qe)):Tr.count--,ct===null?CR(Xt,te.type,te.stateNode):y6(Xt,ct,te.memoizedProps)):ct===null&&te.stateNode!==null&&i3(te,te.memoizedProps,qe.memoizedProps)}break;case 27:G0(ge,te),ag(te),ct&512&&(Rh||qe===null||cw(qe,qe.return)),qe!==null&&ct&4&&i3(te,te.memoizedProps,qe.memoizedProps);break;case 5:if(G0(ge,te),ag(te),ct&512&&(Rh||qe===null||cw(qe,qe.return)),te.flags&32){Xt=te.stateNode;try{eg(Xt,"")}catch(Es){zo(te,te.return,Es)}}ct&4&&te.stateNode!=null&&(Xt=te.memoizedProps,i3(te,Xt,qe!==null?qe.memoizedProps:Xt)),ct&1024&&(kx=!0);break;case 6:if(G0(ge,te),ag(te),ct&4){if(te.stateNode===null)throw Error(n(162));ct=te.memoizedProps,qe=te.stateNode;try{qe.nodeValue=ct}catch(Es){zo(te,te.return,Es)}}break;case 3:if(b3=null,Xt=Dx,Dx=Dd(ge.containerInfo),G0(ge,te),Dx=Xt,ag(te),ct&4&&qe!==null&&qe.memoizedState.isDehydrated)try{_3(ge.containerInfo)}catch(Es){zo(te,te.return,Es)}kx&&(kx=!1,gS(te));break;case 4:ct=Dx,Dx=Dd(te.stateNode.containerInfo),G0(ge,te),ag(te),Dx=ct;break;case 12:G0(ge,te),ag(te);break;case 13:G0(ge,te),ag(te),te.child.flags&8192&&te.memoizedState!==null!=(qe!==null&&qe.memoizedState!==null)&&(cv=bn()),ct&4&&(ct=te.updateQueue,ct!==null&&(te.updateQueue=null,kT(te,ct)));break;case 22:Xt=te.memoizedState!==null;var co=qe!==null&&qe.memoizedState!==null,Ts=q0,bl=Rh;if(q0=Ts||Xt,Rh=bl||co,G0(ge,te),Rh=bl,q0=Ts,ag(te),ct&8192)e:for(ge=te.stateNode,ge._visibility=Xt?ge._visibility&-2:ge._visibility|1,Xt&&(qe===null||co||q0||Rh||$b(te)),qe=null,ge=te;;){if(ge.tag===5||ge.tag===26){if(qe===null){co=qe=ge;try{if(Tr=co.stateNode,Xt)ri=Tr.style,typeof ri.setProperty=="function"?ri.setProperty("display","none","important"):ri.display="none";else{Gi=co.stateNode;var Dl=co.memoizedProps.style,Ls=Dl!=null&&Dl.hasOwnProperty("display")?Dl.display:null;Gi.style.display=Ls==null||typeof Ls=="boolean"?"":(""+Ls).trim()}}catch(Es){zo(co,co.return,Es)}}}else if(ge.tag===6){if(qe===null){co=ge;try{co.stateNode.nodeValue=Xt?"":co.memoizedProps}catch(Es){zo(co,co.return,Es)}}}else if((ge.tag!==22&&ge.tag!==23||ge.memoizedState===null||ge===te)&&ge.child!==null){ge.child.return=ge,ge=ge.child;continue}if(ge===te)break e;for(;ge.sibling===null;){if(ge.return===null||ge.return===te)break e;qe===ge&&(qe=null),ge=ge.return}qe===ge&&(qe=null),ge.sibling.return=ge.return,ge=ge.sibling}ct&4&&(ct=te.updateQueue,ct!==null&&(qe=ct.retryQueue,qe!==null&&(ct.retryQueue=null,kT(te,qe))));break;case 19:G0(ge,te),ag(te),ct&4&&(ct=te.updateQueue,ct!==null&&(te.updateQueue=null,kT(te,ct)));break;case 30:break;case 21:break;default:G0(ge,te),ag(te)}}function ag(te){var ge=te.flags;if(ge&2){try{for(var qe,ct=te.return;ct!==null;){if(h2(ct)){qe=ct;break}ct=ct.return}if(qe==null)throw Error(n(160));switch(qe.tag){case 27:var Xt=qe.stateNode,Tr=fw(te);dw(te,Tr,Xt);break;case 5:var ri=qe.stateNode;qe.flags&32&&(eg(ri,""),qe.flags&=-33);var Gi=fw(te);dw(te,Gi,ri);break;case 3:case 4:var co=qe.stateNode.containerInfo,Ts=fw(te);qb(te,Ts,co);break;default:throw Error(n(161))}}catch(bl){zo(te,te.return,bl)}te.flags&=-3}ge&4096&&(te.flags&=-4097)}function gS(te){if(te.subtreeFlags&1024)for(te=te.child;te!==null;){var ge=te;gS(ge),ge.tag===5&&ge.flags&1024&&ge.stateNode.reset(),te=te.sibling}}function O1(te,ge){if(ge.subtreeFlags&8772)for(ge=ge.child;ge!==null;)Ix(te,ge.alternate,ge),ge=ge.sibling}function $b(te){for(te=te.child;te!==null;){var ge=te;switch(ge.tag){case 0:case 11:case 14:case 15:Vb(4,ge,ge.return),$b(ge);break;case 1:cw(ge,ge.return);var qe=ge.stateNode;typeof qe.componentWillUnmount=="function"&&uw(ge,ge.return,qe),$b(ge);break;case 27:rC(ge.stateNode);case 26:case 5:cw(ge,ge.return),$b(ge);break;case 22:ge.memoizedState===null&&$b(ge);break;case 30:$b(ge);break;default:$b(ge)}te=te.sibling}}function S_(te,ge,qe){for(qe=qe&&(ge.subtreeFlags&8772)!==0,ge=ge.child;ge!==null;){var ct=ge.alternate,Xt=te,Tr=ge,ri=Tr.flags;switch(Tr.tag){case 0:case 11:case 15:S_(Xt,Tr,qe),hS(4,Tr);break;case 1:if(S_(Xt,Tr,qe),ct=Tr,Xt=ct.stateNode,typeof Xt.componentDidMount=="function")try{Xt.componentDidMount()}catch(Ts){zo(ct,ct.return,Ts)}if(ct=Tr,Xt=ct.updateQueue,Xt!==null){var Gi=ct.stateNode;try{var co=Xt.shared.hiddenCallbacks;if(co!==null)for(Xt.shared.hiddenCallbacks=null,Xt=0;Xt<co.length;Xt++)xT(co[Xt],Gi)}catch(Ts){zo(ct,ct.return,Ts)}}qe&&ri&64&&MT(Tr),pS(Tr,Tr.return);break;case 27:w_(Tr);case 26:case 5:S_(Xt,Tr,qe),qe&&ct===null&&ri&4&&vS(Tr),pS(Tr,Tr.return);break;case 12:S_(Xt,Tr,qe);break;case 13:S_(Xt,Tr,qe),qe&&ri&4&&p2(Xt,Tr);break;case 22:Tr.memoizedState===null&&S_(Xt,Tr,qe),pS(Tr,Tr.return);break;case 30:break;default:S_(Xt,Tr,qe)}ge=ge.sibling}}function IM(te,ge){var qe=null;te!==null&&te.memoizedState!==null&&te.memoizedState.cachePool!==null&&(qe=te.memoizedState.cachePool.pool),te=null,ge.memoizedState!==null&&ge.memoizedState.cachePool!==null&&(te=ge.memoizedState.cachePool.pool),te!==qe&&(te!=null&&te.refCount++,qe!=null&&NE(qe))}function v2(te,ge){te=null,ge.alternate!==null&&(te=ge.alternate.memoizedState.cache),ge=ge.memoizedState.cache,ge!==te&&(ge.refCount++,te!=null&&NE(te))}function Kp(te,ge,qe,ct){if(ge.subtreeFlags&10256)for(ge=ge.child;ge!==null;)PM(te,ge,qe,ct),ge=ge.sibling}function PM(te,ge,qe,ct){var Xt=ge.flags;switch(ge.tag){case 0:case 11:case 15:Kp(te,ge,qe,ct),Xt&2048&&hS(9,ge);break;case 1:Kp(te,ge,qe,ct);break;case 3:Kp(te,ge,qe,ct),Xt&2048&&(te=null,ge.alternate!==null&&(te=ge.alternate.memoizedState.cache),ge=ge.memoizedState.cache,ge!==te&&(ge.refCount++,te!=null&&NE(te)));break;case 12:if(Xt&2048){Kp(te,ge,qe,ct),te=ge.stateNode;try{var Tr=ge.memoizedProps,ri=Tr.id,Gi=Tr.onPostCommit;typeof Gi=="function"&&Gi(ri,ge.alternate===null?"mount":"update",te.passiveEffectDuration,-0)}catch(co){zo(ge,ge.return,co)}}else Kp(te,ge,qe,ct);break;case 13:Kp(te,ge,qe,ct);break;case 23:break;case 22:Tr=ge.stateNode,ri=ge.alternate,ge.memoizedState!==null?Tr._visibility&2?Kp(te,ge,qe,ct):Lx(te,ge):Tr._visibility&2?Kp(te,ge,qe,ct):(Tr._visibility|=2,hw(te,ge,qe,ct,(ge.subtreeFlags&10256)!==0)),Xt&2048&&IM(ri,ge);break;case 24:Kp(te,ge,qe,ct),Xt&2048&&v2(ge.alternate,ge);break;default:Kp(te,ge,qe,ct)}}function hw(te,ge,qe,ct,Xt){for(Xt=Xt&&(ge.subtreeFlags&10256)!==0,ge=ge.child;ge!==null;){var Tr=te,ri=ge,Gi=qe,co=ct,Ts=ri.flags;switch(ri.tag){case 0:case 11:case 15:hw(Tr,ri,Gi,co,Xt),hS(8,ri);break;case 23:break;case 22:var bl=ri.stateNode;ri.memoizedState!==null?bl._visibility&2?hw(Tr,ri,Gi,co,Xt):Lx(Tr,ri):(bl._visibility|=2,hw(Tr,ri,Gi,co,Xt)),Xt&&Ts&2048&&IM(ri.alternate,ri);break;case 24:hw(Tr,ri,Gi,co,Xt),Xt&&Ts&2048&&v2(ri.alternate,ri);break;default:hw(Tr,ri,Gi,co,Xt)}ge=ge.sibling}}function Lx(te,ge){if(ge.subtreeFlags&10256)for(ge=ge.child;ge!==null;){var qe=te,ct=ge,Xt=ct.flags;switch(ct.tag){case 22:Lx(qe,ct),Xt&2048&&IM(ct.alternate,ct);break;case 24:Lx(qe,ct),Xt&2048&&v2(ct.alternate,ct);break;default:Lx(qe,ct)}ge=ge.sibling}}var Bm=8192;function pw(te){if(te.subtreeFlags&Bm)for(te=te.child;te!==null;)DM(te),te=te.sibling}function DM(te){switch(te.tag){case 26:pw(te),te.flags&Bm&&te.memoizedState!==null&&O4(Dx,te.memoizedState,te.memoizedProps);break;case 5:pw(te);break;case 3:case 4:var ge=Dx;Dx=Dd(te.stateNode.containerInfo),pw(te),Dx=ge;break;case 22:te.memoizedState===null&&(ge=te.alternate,ge!==null&&ge.memoizedState!==null?(ge=Bm,Bm=16777216,pw(te),Bm=ge):pw(te));break;default:pw(te)}}function gR(te){var ge=te.alternate;if(ge!==null&&(te=ge.child,te!==null)){ge.child=null;do ge=te.sibling,te.sibling=null,te=ge;while(te!==null)}}function Fv(te){var ge=te.deletions;if((te.flags&16)!==0){if(ge!==null)for(var qe=0;qe<ge.length;qe++){var ct=ge[qe];bp=ct,mw(ct,te)}gR(te)}if(te.subtreeFlags&10256)for(te=te.child;te!==null;)yR(te),te=te.sibling}function yR(te){switch(te.tag){case 0:case 11:case 15:Fv(te),te.flags&2048&&Vb(9,te,te.return);break;case 3:Fv(te);break;case 12:Fv(te);break;case 22:var ge=te.stateNode;te.memoizedState!==null&&ge._visibility&2&&(te.return===null||te.return.tag!==13)?(ge._visibility&=-3,vw(te)):Fv(te);break;default:Fv(te)}}function vw(te){var ge=te.deletions;if((te.flags&16)!==0){if(ge!==null)for(var qe=0;qe<ge.length;qe++){var ct=ge[qe];bp=ct,mw(ct,te)}gR(te)}for(te=te.child;te!==null;){switch(ge=te,ge.tag){case 0:case 11:case 15:Vb(8,ge,ge.return),vw(ge);break;case 22:qe=ge.stateNode,qe._visibility&2&&(qe._visibility&=-3,vw(ge));break;default:vw(ge)}te=te.sibling}}function mw(te,ge){for(;bp!==null;){var qe=bp;switch(qe.tag){case 0:case 11:case 15:Vb(8,qe,ge);break;case 23:case 22:if(qe.memoizedState!==null&&qe.memoizedState.cachePool!==null){var ct=qe.memoizedState.cachePool.pool;ct!=null&&ct.refCount++}break;case 24:NE(qe.memoizedState.cache)}if(ct=qe.child,ct!==null)ct.return=qe,bp=ct;else e:for(qe=te;bp!==null;){ct=bp;var Xt=ct.sibling,Tr=ct.return;if($d(ct),ct===qe){bp=null;break e}if(Xt!==null){Xt.return=Tr,bp=Xt;break e}bp=Tr}}}var Eg={getCacheForType:function(te){var ge=wv(Sv),qe=ge.data.get(te);return qe===void 0&&(qe=te(),ge.data.set(te,qe)),qe}},KA=typeof WeakMap=="function"?WeakMap:Map,Lp=0,Pd=null,sh=null,wf=0,Ed=0,zv=null,Wb=!1,a3=!1,o3=!1,Yb=0,am=0,T_=0,gw=0,yS=0,Xb=0,ip=0,Jp=null,If=null,Wd=!1,cv=0,$0=1/0,fb=null,W0=null,S0=0,wy=null,fv=null,Zb=0,m2=0,s3=null,db=null,E_=0,IT=null;function bm(){if((Lp&2)!==0&&wf!==0)return wf&-wf;if(Lt.T!==null){var te=Nd;return te!==0?te:lI()}return Mc()}function bS(){Xb===0&&(Xb=(wf&536870912)===0||qd?ba():536870912);var te=lv.current;return te!==null&&(te.flags|=32),Xb}function i1(te,ge,qe){(te===Pd&&(Ed===2||Ed===9)||te.cancelPendingCommit!==null)&&(g2(te,0),Ox(te,wf,Xb,!1)),$s(te,qe),((Lp&2)===0||te!==Pd)&&(te===Pd&&((Lp&2)===0&&(gw|=qe),am===4&&Ox(te,wf,Xb,!1)),SS(te))}function l3(te,ge,qe){if((Lp&6)!==0)throw Error(n(327));var ct=!qe&&(ge&124)===0&&(ge&te.expiredLanes)===0||za(te,ge),Xt=ct?Kt(te,ge):Ne(te,ge,!0),Tr=ct;do{if(Xt===0){a3&&!ct&&Ox(te,ge,0,!1);break}else{if(qe=te.current.alternate,Tr&&!xS(qe)){Xt=Ne(te,ge,!1),Tr=!1;continue}if(Xt===2){if(Tr=ge,te.errorRecoveryDisabledLanes&Tr)var ri=0;else ri=te.pendingLanes&-536870913,ri=ri!==0?ri:ri&536870912?536870912:0;if(ri!==0){ge=ri;e:{var Gi=te;Xt=Jp;var co=Gi.current.memoizedState.isDehydrated;if(co&&(g2(Gi,ri).flags|=256),ri=Ne(Gi,ri,!1),ri!==2){if(o3&&!co){Gi.errorRecoveryDisabledLanes|=Tr,gw|=Tr,Xt=4;break e}Tr=If,If=Xt,Tr!==null&&(If===null?If=Tr:If.push.apply(If,Tr))}Xt=ri}if(Tr=!1,Xt!==2)continue}}if(Xt===1){g2(te,0),Ox(te,ge,0,!0);break}e:{switch(ct=te,Tr=Xt,Tr){case 0:case 1:throw Error(n(345));case 4:if((ge&4194048)!==ge)break;case 6:Ox(ct,ge,Xb,!Wb);break e;case 2:If=null;break;case 3:case 5:break;default:throw Error(n(329))}if((ge&62914560)===ge&&(Xt=cv+300-bn(),10<Xt)){if(Ox(ct,ge,Xb,!Wb),Zi(ct,0,!0)!==0)break e;ct.timeoutHandle=R4(u3.bind(null,ct,qe,If,fb,Wd,ge,Xb,gw,ip,Wb,Tr,2,-0,0),Xt);break e}u3(ct,qe,If,fb,Wd,ge,Xb,gw,ip,Wb,Tr,0,-0,0)}}break}while(!0);SS(te)}function u3(te,ge,qe,ct,Xt,Tr,ri,Gi,co,Ts,bl,Dl,Ls,Es){if(te.timeoutHandle=-1,Dl=ge.subtreeFlags,(Dl&8192||(Dl&16785408)===16785408)&&(Z0={stylesheets:null,count:0,unsuspend:L4},DM(ge),Dl=kF(),Dl!==null)){te.cancelPendingCommit=Dl(cu.bind(null,te,ge,Tr,qe,ct,Xt,ri,Gi,co,bl,1,Ls,Es)),Ox(te,Tr,ri,!Ts);return}cu(te,ge,Tr,qe,ct,Xt,ri,Gi,co)}function xS(te){for(var ge=te;;){var qe=ge.tag;if((qe===0||qe===11||qe===15)&&ge.flags&16384&&(qe=ge.updateQueue,qe!==null&&(qe=qe.stores,qe!==null)))for(var ct=0;ct<qe.length;ct++){var Xt=qe[ct],Tr=Xt.getSnapshot;Xt=Xt.value;try{if(!nb(Tr(),Xt))return!1}catch{return!1}}if(qe=ge.child,ge.subtreeFlags&16384&&qe!==null)qe.return=ge,ge=qe;else{if(ge===te)break;for(;ge.sibling===null;){if(ge.return===null||ge.return===te)return!0;ge=ge.return}ge.sibling.return=ge.return,ge=ge.sibling}}return!0}function Ox(te,ge,qe,ct){ge&=~yS,ge&=~gw,te.suspendedLanes|=ge,te.pingedLanes&=~ge,ct&&(te.warmLanes|=ge),ct=te.expirationTimes;for(var Xt=ge;0<Xt;){var Tr=31-sa(Xt),ri=1<<Tr;ct[Tr]=-1,Xt&=~ri}qe!==0&&Ns(te,qe,ge)}function yw(){return(Lp&6)===0?(bR(0),!1):!0}function PT(){if(sh!==null){if(Ed===0)var te=sh.return;else te=sh,Vi=f_=null,x0(te),Tg=null,cb=0,te=sh;for(;te!==null;)lw(te.alternate,te),te=te.return;sh=null}}function g2(te,ge){var qe=te.timeoutHandle;qe!==-1&&(te.timeoutHandle=-1,cI(qe)),qe=te.cancelPendingCommit,qe!==null&&(te.cancelPendingCommit=null,qe()),PT(),Pd=te,sh=qe=Ch(te.current,null),wf=ge,Ed=0,zv=null,Wb=!1,a3=za(te,ge),o3=!1,ip=Xb=yS=gw=T_=am=0,If=Jp=null,Wd=!1,(ge&8)!==0&&(ge|=ge&32);var ct=te.entangledLanes;if(ct!==0)for(te=te.entanglements,ct&=ge;0<ct;){var Xt=31-sa(ct),Tr=1<<Xt;ge|=te[Xt],ct&=~Tr}return Yb=ge,Qw(),qe}function c3(te,ge){Fd=null,Lt.H=s2,ge===Qy||ge===d_?(ge=aR(),Ed=3):ge===iR?(ge=aR(),Ed=4):Ed=ge===cS?8:ge!==null&&typeof ge=="object"&&typeof ge.then=="function"?6:1,zv=ge,sh===null&&(am=1,WA(te,Sg(ge,te.current)))}function y2(){var te=Lt.H;return Lt.H=s2,te===null?s2:te}function LM(){var te=Lt.A;return Lt.A=Eg,te}function Ce(){am=4,Wb||(wf&4194048)!==wf&&lv.current!==null||(a3=!0),(T_&134217727)===0&&(gw&134217727)===0||Pd===null||Ox(Pd,wf,Xb,!1)}function Ne(te,ge,qe){var ct=Lp;Lp|=2;var Xt=y2(),Tr=LM();(Pd!==te||wf!==ge)&&(fb=null,g2(te,ge)),ge=!1;var ri=am;e:do try{if(Ed!==0&&sh!==null){var Gi=sh,co=zv;switch(Ed){case 8:PT(),ri=6;break e;case 3:case 2:case 9:case 6:lv.current===null&&(ge=!0);var Ts=Ed;if(Ed=0,zv=null,vo(te,Gi,co,Ts),qe&&a3){ri=0;break e}break;default:Ts=Ed,Ed=0,zv=null,vo(te,Gi,co,Ts)}}Tt(),ri=am;break}catch(bl){c3(te,bl)}while(!0);return ge&&te.shellSuspendCounter++,Vi=f_=null,Lp=ct,Lt.H=Xt,Lt.A=Tr,sh===null&&(Pd=null,wf=0,Qw()),ri}function Tt(){for(;sh!==null;)pn(sh)}function Kt(te,ge){var qe=Lp;Lp|=2;var ct=y2(),Xt=LM();Pd!==te||wf!==ge?(fb=null,$0=bn()+500,g2(te,ge)):a3=za(te,ge);e:do try{if(Ed!==0&&sh!==null){ge=sh;var Tr=zv;t:switch(Ed){case 1:Ed=0,zv=null,vo(te,ge,Tr,1);break;case 2:case 9:if(zE(Tr)){Ed=0,zv=null,ta(ge);break}ge=function(){Ed!==2&&Ed!==9||Pd!==te||(Ed=7),SS(te)},Tr.then(ge,ge);break e;case 3:Ed=7;break e;case 4:Ed=5;break e;case 7:zE(Tr)?(Ed=0,zv=null,ta(ge)):(Ed=0,zv=null,vo(te,ge,Tr,7));break;case 5:var ri=null;switch(sh.tag){case 26:ri=sh.memoizedState;case 5:case 27:var Gi=sh;if(!ri||Mg(ri)){Ed=0,zv=null;var co=Gi.sibling;if(co!==null)sh=co;else{var Ts=Gi.return;Ts!==null?(sh=Ts,fs(Ts)):sh=null}break t}}Ed=0,zv=null,vo(te,ge,Tr,5);break;case 6:Ed=0,zv=null,vo(te,ge,Tr,6);break;case 8:PT(),am=6;break e;default:throw Error(n(462))}}Dr();break}catch(bl){c3(te,bl)}while(!0);return Vi=f_=null,Lt.H=ct,Lt.A=Xt,Lp=qe,sh!==null?0:(Pd=null,wf=0,Qw(),am)}function Dr(){for(;sh!==null&&!On();)pn(sh)}function pn(te){var ge=f2(te.alternate,te,Yb);te.memoizedProps=te.pendingProps,ge===null?fs(te):sh=ge}function ta(te){var ge=te,qe=ge.alternate;switch(ge.tag){case 15:case 0:ge=L1(qe,ge,ge.pendingProps,ge.type,void 0,wf);break;case 11:ge=L1(qe,ge,ge.pendingProps,ge.type.render,ge.ref,wf);break;case 5:x0(ge);default:lw(qe,ge),ge=sh=DE(ge,Yb),ge=f2(qe,ge,Yb)}te.memoizedProps=te.pendingProps,ge===null?fs(te):sh=ge}function vo(te,ge,qe,ct){Vi=f_=null,x0(ge),Tg=null,cb=0;var Xt=ge.return;try{if(mR(te,Xt,ge,qe,wf)){am=1,WA(te,Sg(qe,te.current)),sh=null;return}}catch(Tr){if(Xt!==null)throw sh=Xt,Tr;am=1,WA(te,Sg(qe,te.current)),sh=null;return}ge.flags&32768?(qd||ct===1?te=!0:a3||(wf&536870912)!==0?te=!1:(Wb=te=!0,(ct===2||ct===9||ct===3||ct===6)&&(ct=lv.current,ct!==null&&ct.tag===13&&(ct.flags|=16384))),xl(ge,te)):fs(ge)}function fs(te){var ge=te;do{if((ge.flags&32768)!==0){xl(ge,Wb);return}te=ge.return;var qe=XA(ge.alternate,ge,Yb);if(qe!==null){sh=qe;return}if(ge=ge.sibling,ge!==null){sh=ge;return}sh=ge=te}while(ge!==null);am===0&&(am=5)}function xl(te,ge){do{var qe=dS(te.alternate,te);if(qe!==null){qe.flags&=32767,sh=qe;return}if(qe=te.return,qe!==null&&(qe.flags|=32768,qe.subtreeFlags=0,qe.deletions=null),!ge&&(te=te.sibling,te!==null)){sh=te;return}sh=te=qe}while(te!==null);am=6,sh=null}function cu(te,ge,qe,ct,Xt,Tr,ri,Gi,co){te.cancelPendingCommit=null;do _S();while(S0!==0);if((Lp&6)!==0)throw Error(n(327));if(ge!==null){if(ge===te.current)throw Error(n(177));if(Tr=ge.lanes|ge.childLanes,Tr|=vM,Gs(te,qe,Tr,ri,Gi,co),te===Pd&&(sh=Pd=null,wf=0),fv=ge,wy=te,Zb=qe,m2=Tr,s3=Xt,db=ct,(ge.subtreeFlags&10256)!==0||(ge.flags&10256)!==0?(te.callbackNode=null,te.callbackPriority=0,_p(Pa,function(){return wS(),null})):(te.callbackNode=null,te.callbackPriority=0),ct=(ge.flags&13878)!==0,(ge.subtreeFlags&13878)!==0||ct){ct=Lt.T,Lt.T=null,Xt=dr.p,dr.p=2,ri=Lp,Lp|=4;try{$g(te,ge,qe)}finally{Lp=ri,dr.p=Xt,Lt.T=ct}}S0=1,$l(),bc(),md()}}function $l(){if(S0===1){S0=0;var te=wy,ge=fv,qe=(ge.flags&13878)!==0;if((ge.subtreeFlags&13878)!==0||qe){qe=Lt.T,Lt.T=null;var ct=dr.p;dr.p=2;var Xt=Lp;Lp|=4;try{ZA(ge,te);var Tr=eC,ri=rR(te.containerInfo),Gi=Tr.focusedElem,co=Tr.selectionRange;if(ri!==Gi&&Gi&&Gi.ownerDocument&&tR(Gi.ownerDocument.documentElement,Gi)){if(co!==null&&TA(Gi)){var Ts=co.start,bl=co.end;if(bl===void 0&&(bl=Ts),"selectionStart"in Gi)Gi.selectionStart=Ts,Gi.selectionEnd=Math.min(bl,Gi.value.length);else{var Dl=Gi.ownerDocument||document,Ls=Dl&&Dl.defaultView||window;if(Ls.getSelection){var Es=Ls.getSelection(),qf=Gi.textContent.length,Ff=Math.min(co.start,qf),Bv=co.end===void 0?Ff:Math.min(co.end,qf);!Es.extend&&Ff>Bv&&(ri=Bv,Bv=Ff,Ff=ri);var ss=pM(Gi,Ff),Ho=pM(Gi,Bv);if(ss&&Ho&&(Es.rangeCount!==1||Es.anchorNode!==ss.node||Es.anchorOffset!==ss.offset||Es.focusNode!==Ho.node||Es.focusOffset!==Ho.offset)){var bs=Dl.createRange();bs.setStart(ss.node,ss.offset),Es.removeAllRanges(),Ff>Bv?(Es.addRange(bs),Es.extend(Ho.node,Ho.offset)):(bs.setEnd(Ho.node,Ho.offset),Es.addRange(bs))}}}}for(Dl=[],Es=Gi;Es=Es.parentNode;)Es.nodeType===1&&Dl.push({element:Es,left:Es.scrollLeft,top:Es.scrollTop});for(typeof Gi.focus=="function"&&Gi.focus(),Gi=0;Gi<Dl.length;Gi++){var Cl=Dl[Gi];Cl.element.scrollLeft=Cl.left,Cl.element.scrollTop=Cl.top}}T0=!!xw,eC=xw=null}finally{Lp=Xt,dr.p=ct,Lt.T=qe}}te.current=ge,S0=2}}function bc(){if(S0===2){S0=0;var te=wy,ge=fv,qe=(ge.flags&8772)!==0;if((ge.subtreeFlags&8772)!==0||qe){qe=Lt.T,Lt.T=null;var ct=dr.p;dr.p=2;var Xt=Lp;Lp|=4;try{Ix(te,ge.alternate,ge)}finally{Lp=Xt,dr.p=ct,Lt.T=qe}}S0=3}}function md(){if(S0===4||S0===3){S0=0,Sn();var te=wy,ge=fv,qe=Zb,ct=db;(ge.subtreeFlags&10256)!==0||(ge.flags&10256)!==0?S0=5:(S0=0,fv=wy=null,Kb(te,te.pendingLanes));var Xt=te.pendingLanes;if(Xt===0&&(W0=null),su(qe),ge=ge.stateNode,Ei&&typeof Ei.onCommitFiberRoot=="function")try{Ei.onCommitFiberRoot(Wn,ge,void 0,(ge.current.flags&128)===128)}catch{}if(ct!==null){ge=Lt.T,Xt=dr.p,dr.p=2,Lt.T=null;try{for(var Tr=te.onRecoverableError,ri=0;ri<ct.length;ri++){var Gi=ct[ri];Tr(Gi.value,{componentStack:Gi.stack})}}finally{Lt.T=ge,dr.p=Xt}}(Zb&3)!==0&&_S(),SS(te),Xt=te.pendingLanes,(qe&4194090)!==0&&(Xt&42)!==0?te===IT?E_++:(E_=0,IT=te):E_=0,bR(0)}}function Kb(te,ge){(te.pooledCacheLanes&=ge)===0&&(ge=te.pooledCache,ge!=null&&(te.pooledCache=null,NE(ge)))}function _S(te){return $l(),bc(),md(),wS()}function wS(){if(S0!==5)return!1;var te=wy,ge=m2;m2=0;var qe=su(Zb),ct=Lt.T,Xt=dr.p;try{dr.p=32>qe?32:qe,Lt.T=null,qe=s3,s3=null;var Tr=wy,ri=Zb;if(S0=0,fv=wy=null,Zb=0,(Lp&6)!==0)throw Error(n(331));var Gi=Lp;if(Lp|=4,yR(Tr.current),PM(Tr,Tr.current,ri,qe),Lp=Gi,bR(0,!1),Ei&&typeof Ei.onPostCommitFiberRoot=="function")try{Ei.onPostCommitFiberRoot(Wn,Tr)}catch{}return!0}finally{dr.p=Xt,Lt.T=ct,Kb(te,ge)}}function Ps(te,ge,qe){ge=Sg(qe,ge),ge=YA(te.stateNode,ge,2),te=Q_(te,ge,2),te!==null&&($s(te,2),SS(te))}function zo(te,ge,qe){if(te.tag===3)Ps(te,te,qe);else for(;ge!==null;){if(ge.tag===3){Ps(ge,te,qe);break}else if(ge.tag===1){var ct=ge.stateNode;if(typeof ge.type.getDerivedStateFromError=="function"||typeof ct.componentDidCatch=="function"&&(W0===null||!W0.has(ct))){te=Sg(qe,te),qe=vR(2),ct=Q_(ge,qe,2),ct!==null&&(kM(qe,ct,ge,te),$s(ct,2),SS(ct));break}}ge=ge.return}}function Bs(te,ge,qe){var ct=te.pingCache;if(ct===null){ct=te.pingCache=new KA;var Xt=new Set;ct.set(ge,Xt)}else Xt=ct.get(ge),Xt===void 0&&(Xt=new Set,ct.set(ge,Xt));Xt.has(qe)||(o3=!0,Xt.add(qe),te=fu.bind(null,te,ge,qe),ge.then(te,te))}function fu(te,ge,qe){var ct=te.pingCache;ct!==null&&ct.delete(ge),te.pingedLanes|=te.suspendedLanes&qe,te.warmLanes&=~qe,Pd===te&&(wf&qe)===qe&&(am===4||am===3&&(wf&62914560)===wf&&300>bn()-cv?(Lp&2)===0&&g2(te,0):yS|=qe,ip===wf&&(ip=0)),SS(te)}function sf(te,ge){ge===0&&(ge=po()),te=ib(te,ge),te!==null&&($s(te,ge),SS(te))}function Tv(te){var ge=te.memoizedState,qe=0;ge!==null&&(qe=ge.retryLane),sf(te,qe)}function Qf(te,ge){var qe=0;switch(te.tag){case 13:var ct=te.stateNode,Xt=te.memoizedState;Xt!==null&&(qe=Xt.retryLane);break;case 19:ct=te.stateNode;break;case 22:ct=te.stateNode._retryCache;break;default:throw Error(n(314))}ct!==null&&ct.delete(ge),sf(te,qe)}function _p(te,ge){return Lr(te,ge)}var Ag=null,lh=null,A_=!1,JA=!1,oI=!1,f3=0;function SS(te){te!==lh&&te.next===null&&(lh===null?Ag=lh=te:lh=lh.next=te),JA=!0,A_||(A_=!0,QA())}function bR(te,ge){if(!oI&&JA){oI=!0;do for(var qe=!1,ct=Ag;ct!==null;){if(te!==0){var Xt=ct.pendingLanes;if(Xt===0)var Tr=0;else{var ri=ct.suspendedLanes,Gi=ct.pingedLanes;Tr=(1<<31-sa(42|te)+1)-1,Tr&=Xt&~(ri&~Gi),Tr=Tr&201326741?Tr&201326741|1:Tr?Tr|2:0}Tr!==0&&(qe=!0,f6(ct,Tr))}else Tr=wf,Tr=Zi(ct,ct===Pd?Tr:0,ct.cancelPendingCommit!==null||ct.timeoutHandle!==-1),(Tr&3)===0||za(ct,Tr)||(qe=!0,f6(ct,Tr));ct=ct.next}while(qe);oI=!1}}function AF(){TS()}function TS(){JA=A_=!1;var te=0;f3!==0&&(x2()&&(te=f3),f3=0);for(var ge=bn(),qe=null,ct=Ag;ct!==null;){var Xt=ct.next,Tr=ES(ct,ge);Tr===0?(ct.next=null,qe===null?Ag=Xt:qe.next=Xt,Xt===null&&(lh=qe)):(qe=ct,(te!==0||(Tr&3)!==0)&&(JA=!0)),ct=Xt}bR(te)}function ES(te,ge){for(var qe=te.suspendedLanes,ct=te.pingedLanes,Xt=te.expirationTimes,Tr=te.pendingLanes&-62914561;0<Tr;){var ri=31-sa(Tr),Gi=1<<ri,co=Xt[ri];co===-1?((Gi&qe)===0||(Gi&ct)!==0)&&(Xt[ri]=Ss(Gi,ge)):co<=ge&&(te.expiredLanes|=Gi),Tr&=~Gi}if(ge=Pd,qe=wf,qe=Zi(te,te===ge?qe:0,te.cancelPendingCommit!==null||te.timeoutHandle!==-1),ct=te.callbackNode,qe===0||te===ge&&(Ed===2||Ed===9)||te.cancelPendingCommit!==null)return ct!==null&&ct!==null&&Yn(ct),te.callbackNode=null,te.callbackPriority=0;if((qe&3)===0||za(te,qe)){if(ge=qe&-qe,ge===te.callbackPriority)return ge;switch(ct!==null&&Yn(ct),su(qe)){case 2:case 8:qe=Oi;break;case 32:qe=Pa;break;case 268435456:qe=ti;break;default:qe=Pa}return ct=sI.bind(null,te),qe=Lr(qe,ct),te.callbackPriority=ge,te.callbackNode=qe,ge}return ct!==null&&ct!==null&&Yn(ct),te.callbackPriority=2,te.callbackNode=null,2}function sI(te,ge){if(S0!==0&&S0!==5)return te.callbackNode=null,te.callbackPriority=0,null;var qe=te.callbackNode;if(_S()&&te.callbackNode!==qe)return null;var ct=wf;return ct=Zi(te,te===Pd?ct:0,te.cancelPendingCommit!==null||te.timeoutHandle!==-1),ct===0?null:(l3(te,ct,ge),ES(te,bn()),te.callbackNode!=null&&te.callbackNode===qe?sI.bind(null,te):null)}function f6(te,ge){if(_S())return null;l3(te,ge,!0)}function QA(){p3(function(){(Lp&6)!==0?Lr(gi,AF):TS()})}function lI(){return f3===0&&(f3=ba()),f3}function uI(te){return te==null||typeof te=="symbol"||typeof te=="boolean"?null:typeof te=="function"?te:Ug(""+te)}function d6(te,ge){var qe=ge.ownerDocument.createElement("input");return qe.name=ge.name,qe.value=ge.value,te.id&&qe.setAttribute("form",te.id),ge.parentNode.insertBefore(qe,ge),te=new FormData(te),qe.parentNode.removeChild(qe),te}function CF(te,ge,qe,ct,Xt){if(ge==="submit"&&qe&&qe.stateNode===Xt){var Tr=uI((Xt[_s]||null).action),ri=ct.submitter;ri&&(ge=(ge=ri[_s]||null)?uI(ge.formAction):ri.getAttribute("formAction"),ge!==null&&(Tr=ge,ri=null));var Gi=new $_("action","action",null,ct,Xt);te.push({event:Gi,listeners:[{instance:null,listener:function(){if(ct.defaultPrevented){if(f3!==0){var co=ri?d6(Xt,ri):new FormData(Xt);ST(qe,{pending:!0,data:co,method:Xt.method,action:Tr},null,co)}}else typeof Tr=="function"&&(Gi.preventDefault(),co=ri?d6(Xt,ri):new FormData(Xt),ST(qe,{pending:!0,data:co,method:Xt.method,action:Tr},Tr,co))},currentTarget:Xt}]})}}for(var A4=0;A4<Bh.length;A4++){var C4=Bh[A4],MF=C4.toLowerCase(),h6=C4[0].toUpperCase()+C4.slice(1);gm(MF,"on"+h6)}gm(py,"onAnimationEnd"),gm(kE,"onAnimationIteration"),gm(Vf,"onAnimationStart"),gm("dblclick","onDoubleClick"),gm("focusin","onFocus"),gm("focusout","onBlur"),gm(IE,"onTransitionRun"),gm(Z_,"onTransitionStart"),gm(l_,"onTransitionCancel"),gm(xx,"onTransitionEnd"),ea("onMouseEnter",["mouseout","mouseover"]),ea("onMouseLeave",["mouseout","mouseover"]),ea("onPointerEnter",["pointerout","pointerover"]),ea("onPointerLeave",["pointerout","pointerover"]),Dn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Dn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Dn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Dn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Dn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Dn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var d3="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(" "),p6=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(d3));function v6(te,ge){ge=(ge&4)!==0;for(var qe=0;qe<te.length;qe++){var ct=te[qe],Xt=ct.event;ct=ct.listeners;e:{var Tr=void 0;if(ge)for(var ri=ct.length-1;0<=ri;ri--){var Gi=ct[ri],co=Gi.instance,Ts=Gi.currentTarget;if(Gi=Gi.listener,co!==Tr&&Xt.isPropagationStopped())break e;Tr=Gi,Xt.currentTarget=Ts;try{Tr(Xt)}catch(bl){ow(bl)}Xt.currentTarget=null,Tr=co}else for(ri=0;ri<ct.length;ri++){if(Gi=ct[ri],co=Gi.instance,Ts=Gi.currentTarget,Gi=Gi.listener,co!==Tr&&Xt.isPropagationStopped())break e;Tr=Gi,Xt.currentTarget=Ts;try{Tr(Xt)}catch(bl){ow(bl)}Xt.currentTarget=null,Tr=co}}}}function Uh(te,ge){var qe=ge[vu];qe===void 0&&(qe=ge[vu]=new Set);var ct=te+"__bubble";qe.has(ct)||(NM(ge,te,2,!1),qe.add(ct))}function OM(te,ge,qe){var ct=0;ge&&(ct|=4),NM(qe,te,ct,ge)}var N1="_reactListening"+Math.random().toString(36).slice(2);function h3(te){if(!te[N1]){te[N1]=!0,Mi.forEach(function(qe){qe!=="selectionchange"&&(p6.has(qe)||OM(qe,!1,te),OM(qe,!0,te))});var ge=te.nodeType===9?te:te.ownerDocument;ge===null||ge[N1]||(ge[N1]=!0,OM("selectionchange",!1,ge))}}function NM(te,ge,qe,ct){switch(SI(ge)){case 2:var Xt=HM;break;case 8:Xt=sC;break;default:Xt=jM}qe=Xt.bind(null,ge,qe,te),Xt=void 0,!J2||ge!=="touchstart"&&ge!=="touchmove"&&ge!=="wheel"||(Xt=!0),ct?Xt!==void 0?te.addEventListener(ge,qe,{capture:!0,passive:Xt}):te.addEventListener(ge,qe,!0):Xt!==void 0?te.addEventListener(ge,qe,{passive:Xt}):te.addEventListener(ge,qe,!1)}function b2(te,ge,qe,ct,Xt){var Tr=ct;if((ge&1)===0&&(ge&2)===0&&ct!==null)e:for(;;){if(ct===null)return;var ri=ct.tag;if(ri===3||ri===4){var Gi=ct.stateNode.containerInfo;if(Gi===Xt)break;if(ri===4)for(ri=ct.return;ri!==null;){var co=ri.tag;if((co===3||co===4)&&ri.stateNode.containerInfo===Xt)return;ri=ri.return}for(;Gi!==null;){if(ri=zn(Gi),ri===null)return;if(co=ri.tag,co===5||co===6||co===26||co===27){ct=Tr=ri;continue e}Gi=Gi.parentNode}}ct=ct.return}lM(function(){var Ts=Tr,bl=Hg(qe),Dl=[];e:{var Ls=uT.get(te);if(Ls!==void 0){var Es=$_,qf=te;switch(te){case"keypress":if(Pp(qe)===0)break e;case"keydown":case"keyup":Es=TE;break;case"focusin":qf="focus",Es=_E;break;case"focusout":qf="blur",Es=_E;break;case"beforeblur":case"afterblur":Es=_E;break;case"click":if(qe.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Es=Pb;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Es=Yu;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Es=aT;break;case py:case kE:case Vf:Es=gA;break;case xx:Es=Y_;break;case"scroll":case"scrollend":Es=mA;break;case"wheel":Es=fM;break;case"copy":case"cut":case"paste":Es=J5;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Es=dy;break;case"toggle":case"beforetoggle":Es=a_}var Ff=(ge&4)!==0,Bv=!Ff&&(te==="scroll"||te==="scrollend"),ss=Ff?Ls!==null?Ls+"Capture":null:Ls;Ff=[];for(var Ho=Ts,bs;Ho!==null;){var Cl=Ho;if(bs=Cl.stateNode,Cl=Cl.tag,Cl!==5&&Cl!==26&&Cl!==27||bs===null||ss===null||(Cl=n_(Ho,ss),Cl!=null&&Ff.push(Af(Ho,Cl,bs))),Bv)break;Ho=Ho.return}0<Ff.length&&(Ls=new Es(Ls,qf,null,qe,bl),Dl.push({event:Ls,listeners:Ff}))}}if((ge&7)===0){e:{if(Ls=te==="mouseover"||te==="pointerover",Es=te==="mouseout"||te==="pointerout",Ls&&qe!==Wp&&(qf=qe.relatedTarget||qe.fromElement)&&(zn(qf)||qf[nl]))break e;if((Es||Ls)&&(Ls=bl.window===bl?bl:(Ls=bl.ownerDocument)?Ls.defaultView||Ls.parentWindow:window,Es?(qf=qe.relatedTarget||qe.toElement,Es=Ts,qf=qf?zn(qf):null,qf!==null&&(Bv=a(qf),Ff=qf.tag,qf!==Bv||Ff!==5&&Ff!==27&&Ff!==6)&&(qf=null)):(Es=null,qf=Ts),Es!==qf)){if(Ff=Pb,Cl="onMouseLeave",ss="onMouseEnter",Ho="mouse",(te==="pointerout"||te==="pointerover")&&(Ff=dy,Cl="onPointerLeave",ss="onPointerEnter",Ho="pointer"),Bv=Es==null?Ls:Za(Es),bs=qf==null?Ls:Za(qf),Ls=new Ff(Cl,Ho+"leave",Es,qe,bl),Ls.target=Bv,Ls.relatedTarget=bs,Cl=null,zn(bl)===Ts&&(Ff=new Ff(ss,Ho+"enter",qf,qe,bl),Ff.target=bs,Ff.relatedTarget=Bv,Cl=Ff),Bv=Cl,Es&&qf)t:{for(Ff=Es,ss=qf,Ho=0,bs=Ff;bs;bs=Sy(bs))Ho++;for(bs=0,Cl=ss;Cl;Cl=Sy(Cl))bs++;for(;0<Ho-bs;)Ff=Sy(Ff),Ho--;for(;0<bs-Ho;)ss=Sy(ss),bs--;for(;Ho--;){if(Ff===ss||ss!==null&&Ff===ss.alternate)break t;Ff=Sy(Ff),ss=Sy(ss)}Ff=null}else Ff=null;Es!==null&&i0(Dl,Ls,Es,Ff,!1),qf!==null&&Bv!==null&&i0(Dl,Bv,qf,Ff,!0)}}e:{if(Ls=Ts?Za(Ts):window,Es=Ls.nodeName&&Ls.nodeName.toLowerCase(),Es==="select"||Es==="input"&&Ls.type==="file")var Lc=_A;else if(eS(Ls))if(wA)Lc=rS;else{Lc=bx;var kh=lT}else Es=Ls.nodeName,!Es||Es.toLowerCase()!=="input"||Ls.type!=="checkbox"&&Ls.type!=="radio"?Ts&&E1(Ts.elementType)&&(Lc=_A):Lc=Zw;if(Lc&&(Lc=Lc(te,Ts))){Nm(Dl,Lc,qe,bl);break e}kh&&kh(te,Ls,Ts),te==="focusout"&&Ts&&Ls.type==="number"&&Ts.memoizedProps.value!=null&&Tc(Ls,"number",Ls.value)}switch(kh=Ts?Za(Ts):window,te){case"focusin":(eS(kh)||kh.contentEditable==="true")&&(Kw=kh,Jw=Ts,Yo=null);break;case"focusout":Yo=Jw=Kw=null;break;case"mousedown":al=!0;break;case"contextmenu":case"mouseup":case"dragend":al=!1,Fs(Dl,qe,bl);break;case"selectionchange":if(RE)break;case"keydown":case"keyup":Fs(Dl,qe,bl)}var vf;if(xA)e:{switch(te){case"compositionstart":var Gf="onCompositionStart";break e;case"compositionend":Gf="onCompositionEnd";break e;case"compositionupdate":Gf="onCompositionUpdate";break e}Gf=void 0}else yx?oT(te,qe)&&(Gf="onCompositionEnd"):te==="keydown"&&qe.keyCode===229&&(Gf="onCompositionStart");Gf&&(Dp&&qe.locale!=="ko"&&(yx||Gf!=="onCompositionStart"?Gf==="onCompositionEnd"&&yx&&(vf=wg()):(A1=bl,Xw="value"in A1?A1.value:A1.textContent,yx=!0)),kh=xR(Ts,Gf),0<kh.length&&(Gf=new Vp(Gf,te,null,qe,bl),Dl.push({event:Gf,listeners:kh}),vf?Gf.data=vf:(vf=sT(qe),vf!==null&&(Gf.data=vf)))),(vf=EE?o_(te,qe):AE(te,qe))&&(Gf=xR(Ts,"onBeforeInput"),0<Gf.length&&(kh=new Vp("onBeforeInput","beforeinput",null,qe,bl),Dl.push({event:kh,listeners:Gf}),kh.data=vf)),CF(Dl,te,Ts,qe,bl)}v6(Dl,ge)})}function Af(te,ge,qe){return{instance:te,listener:ge,currentTarget:qe}}function xR(te,ge){for(var qe=ge+"Capture",ct=[];te!==null;){var Xt=te,Tr=Xt.stateNode;if(Xt=Xt.tag,Xt!==5&&Xt!==26&&Xt!==27||Tr===null||(Xt=n_(te,qe),Xt!=null&&ct.unshift(Af(te,Xt,Tr)),Xt=n_(te,ge),Xt!=null&&ct.push(Af(te,Xt,Tr))),te.tag===3)return ct;te=te.return}return[]}function Sy(te){if(te===null)return null;do te=te.return;while(te&&te.tag!==5&&te.tag!==27);return te||null}function i0(te,ge,qe,ct,Xt){for(var Tr=ge._reactName,ri=[];qe!==null&&qe!==ct;){var Gi=qe,co=Gi.alternate,Ts=Gi.stateNode;if(Gi=Gi.tag,co!==null&&co===ct)break;Gi!==5&&Gi!==26&&Gi!==27||Ts===null||(co=Ts,Xt?(Ts=n_(qe,Tr),Ts!=null&&ri.unshift(Af(qe,Ts,co))):Xt||(Ts=n_(qe,Tr),Ts!=null&&ri.push(Af(qe,Ts,co)))),qe=qe.return}ri.length!==0&&te.push({event:ge,listeners:ri})}var m6=/\r\n?/g,bw=/\u0000|\uFFFD/g;function M4(te){return(typeof te=="string"?te:""+te).replace(m6,`
`).replace(bw,"")}function _R(te,ge){return ge=M4(ge),M4(te)===ge}function FM(){}function dv(te,ge,qe,ct,Xt,Tr){switch(qe){case"children":typeof ct=="string"?ge==="body"||ge==="textarea"&&ct===""||eg(te,ct):(typeof ct=="number"||typeof ct=="bigint")&&ge!=="body"&&eg(te,""+ct);break;case"className":el(te,"class",ct);break;case"tabIndex":el(te,"tabindex",ct);break;case"dir":case"role":case"viewBox":case"width":case"height":el(te,qe,ct);break;case"style":tp(te,ct,Tr);break;case"data":if(ge!=="object"){el(te,"data",ct);break}case"src":case"href":if(ct===""&&(ge!=="a"||qe!=="href")){te.removeAttribute(qe);break}if(ct==null||typeof ct=="function"||typeof ct=="symbol"||typeof ct=="boolean"){te.removeAttribute(qe);break}ct=Ug(""+ct),te.setAttribute(qe,ct);break;case"action":case"formAction":if(typeof ct=="function"){te.setAttribute(qe,"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 Tr=="function"&&(qe==="formAction"?(ge!=="input"&&dv(te,ge,"name",Xt.name,Xt,null),dv(te,ge,"formEncType",Xt.formEncType,Xt,null),dv(te,ge,"formMethod",Xt.formMethod,Xt,null),dv(te,ge,"formTarget",Xt.formTarget,Xt,null)):(dv(te,ge,"encType",Xt.encType,Xt,null),dv(te,ge,"method",Xt.method,Xt,null),dv(te,ge,"target",Xt.target,Xt,null)));if(ct==null||typeof ct=="symbol"||typeof ct=="boolean"){te.removeAttribute(qe);break}ct=Ug(""+ct),te.setAttribute(qe,ct);break;case"onClick":ct!=null&&(te.onclick=FM);break;case"onScroll":ct!=null&&Uh("scroll",te);break;case"onScrollEnd":ct!=null&&Uh("scrollend",te);break;case"dangerouslySetInnerHTML":if(ct!=null){if(typeof ct!="object"||!("__html"in ct))throw Error(n(61));if(qe=ct.__html,qe!=null){if(Xt.children!=null)throw Error(n(60));te.innerHTML=qe}}break;case"multiple":te.multiple=ct&&typeof ct!="function"&&typeof ct!="symbol";break;case"muted":te.muted=ct&&typeof ct!="function"&&typeof ct!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(ct==null||typeof ct=="function"||typeof ct=="boolean"||typeof ct=="symbol"){te.removeAttribute("xlink:href");break}qe=Ug(""+ct),te.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",qe);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":ct!=null&&typeof ct!="function"&&typeof ct!="symbol"?te.setAttribute(qe,""+ct):te.removeAttribute(qe);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":ct&&typeof ct!="function"&&typeof ct!="symbol"?te.setAttribute(qe,""):te.removeAttribute(qe);break;case"capture":case"download":ct===!0?te.setAttribute(qe,""):ct!==!1&&ct!=null&&typeof ct!="function"&&typeof ct!="symbol"?te.setAttribute(qe,ct):te.removeAttribute(qe);break;case"cols":case"rows":case"size":case"span":ct!=null&&typeof ct!="function"&&typeof ct!="symbol"&&!isNaN(ct)&&1<=ct?te.setAttribute(qe,ct):te.removeAttribute(qe);break;case"rowSpan":case"start":ct==null||typeof ct=="function"||typeof ct=="symbol"||isNaN(ct)?te.removeAttribute(qe):te.setAttribute(qe,ct);break;case"popover":Uh("beforetoggle",te),Uh("toggle",te),ks(te,"popover",ct);break;case"xlinkActuate":ol(te,"http://www.w3.org/1999/xlink","xlink:actuate",ct);break;case"xlinkArcrole":ol(te,"http://www.w3.org/1999/xlink","xlink:arcrole",ct);break;case"xlinkRole":ol(te,"http://www.w3.org/1999/xlink","xlink:role",ct);break;case"xlinkShow":ol(te,"http://www.w3.org/1999/xlink","xlink:show",ct);break;case"xlinkTitle":ol(te,"http://www.w3.org/1999/xlink","xlink:title",ct);break;case"xlinkType":ol(te,"http://www.w3.org/1999/xlink","xlink:type",ct);break;case"xmlBase":ol(te,"http://www.w3.org/XML/1998/namespace","xml:base",ct);break;case"xmlLang":ol(te,"http://www.w3.org/XML/1998/namespace","xml:lang",ct);break;case"xmlSpace":ol(te,"http://www.w3.org/XML/1998/namespace","xml:space",ct);break;case"is":ks(te,"is",ct);break;case"innerText":case"textContent":break;default:(!(2<qe.length)||qe[0]!=="o"&&qe[0]!=="O"||qe[1]!=="n"&&qe[1]!=="N")&&(qe=tg.get(qe)||qe,ks(te,qe,ct))}}function Y0(te,ge,qe,ct,Xt,Tr){switch(qe){case"style":tp(te,ct,Tr);break;case"dangerouslySetInnerHTML":if(ct!=null){if(typeof ct!="object"||!("__html"in ct))throw Error(n(61));if(qe=ct.__html,qe!=null){if(Xt.children!=null)throw Error(n(60));te.innerHTML=qe}}break;case"children":typeof ct=="string"?eg(te,ct):(typeof ct=="number"||typeof ct=="bigint")&&eg(te,""+ct);break;case"onScroll":ct!=null&&Uh("scroll",te);break;case"onScrollEnd":ct!=null&&Uh("scrollend",te);break;case"onClick":ct!=null&&(te.onclick=FM);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!to.hasOwnProperty(qe))e:{if(qe[0]==="o"&&qe[1]==="n"&&(Xt=qe.endsWith("Capture"),ge=qe.slice(2,Xt?qe.length-7:void 0),Tr=te[_s]||null,Tr=Tr!=null?Tr[qe]:null,typeof Tr=="function"&&te.removeEventListener(ge,Tr,Xt),typeof ct=="function")){typeof Tr!="function"&&Tr!==null&&(qe in te?te[qe]=null:te.hasAttribute(qe)&&te.removeAttribute(qe)),te.addEventListener(ge,ct,Xt);break e}qe in te?te[qe]=ct:ct===!0?te.setAttribute(qe,""):ks(te,qe,ct)}}}function X0(te,ge,qe){switch(ge){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Uh("error",te),Uh("load",te);var ct=!1,Xt=!1,Tr;for(Tr in qe)if(qe.hasOwnProperty(Tr)){var ri=qe[Tr];if(ri!=null)switch(Tr){case"src":ct=!0;break;case"srcSet":Xt=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n(137,ge));default:dv(te,ge,Tr,ri,qe,null)}}Xt&&dv(te,ge,"srcSet",qe.srcSet,qe,null),ct&&dv(te,ge,"src",qe.src,qe,null);return;case"input":Uh("invalid",te);var Gi=Tr=ri=Xt=null,co=null,Ts=null;for(ct in qe)if(qe.hasOwnProperty(ct)){var bl=qe[ct];if(bl!=null)switch(ct){case"name":Xt=bl;break;case"type":ri=bl;break;case"checked":co=bl;break;case"defaultChecked":Ts=bl;break;case"value":Tr=bl;break;case"defaultValue":Gi=bl;break;case"children":case"dangerouslySetInnerHTML":if(bl!=null)throw Error(n(137,ge));break;default:dv(te,ge,ct,bl,qe,null)}}ep(te,Tr,Gi,co,Ts,ri,Xt,!1),pd(te);return;case"select":Uh("invalid",te),ct=ri=Tr=null;for(Xt in qe)if(qe.hasOwnProperty(Xt)&&(Gi=qe[Xt],Gi!=null))switch(Xt){case"value":Tr=Gi;break;case"defaultValue":ri=Gi;break;case"multiple":ct=Gi;default:dv(te,ge,Xt,Gi,qe,null)}ge=Tr,qe=ri,te.multiple=!!ct,ge!=null?pf(te,!!ct,ge,!1):qe!=null&&pf(te,!!ct,qe,!0);return;case"textarea":Uh("invalid",te),Tr=Xt=ct=null;for(ri in qe)if(qe.hasOwnProperty(ri)&&(Gi=qe[ri],Gi!=null))switch(ri){case"value":ct=Gi;break;case"defaultValue":Xt=Gi;break;case"children":Tr=Gi;break;case"dangerouslySetInnerHTML":if(Gi!=null)throw Error(n(91));break;default:dv(te,ge,ri,Gi,qe,null)}T1(te,ct,Xt,Tr),pd(te);return;case"option":for(co in qe)if(qe.hasOwnProperty(co)&&(ct=qe[co],ct!=null))switch(co){case"selected":te.selected=ct&&typeof ct!="function"&&typeof ct!="symbol";break;default:dv(te,ge,co,ct,qe,null)}return;case"dialog":Uh("beforetoggle",te),Uh("toggle",te),Uh("cancel",te),Uh("close",te);break;case"iframe":case"object":Uh("load",te);break;case"video":case"audio":for(ct=0;ct<d3.length;ct++)Uh(d3[ct],te);break;case"image":Uh("error",te),Uh("load",te);break;case"details":Uh("toggle",te);break;case"embed":case"source":case"link":Uh("error",te),Uh("load",te);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Ts in qe)if(qe.hasOwnProperty(Ts)&&(ct=qe[Ts],ct!=null))switch(Ts){case"children":case"dangerouslySetInnerHTML":throw Error(n(137,ge));default:dv(te,ge,Ts,ct,qe,null)}return;default:if(E1(ge)){for(bl in qe)qe.hasOwnProperty(bl)&&(ct=qe[bl],ct!==void 0&&Y0(te,ge,bl,ct,qe,void 0));return}}for(Gi in qe)qe.hasOwnProperty(Gi)&&(ct=qe[Gi],ct!=null&&dv(te,ge,Gi,ct,qe,null))}function RF(te,ge,qe,ct){switch(ge){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var Xt=null,Tr=null,ri=null,Gi=null,co=null,Ts=null,bl=null;for(Es in qe){var Dl=qe[Es];if(qe.hasOwnProperty(Es)&&Dl!=null)switch(Es){case"checked":break;case"value":break;case"defaultValue":co=Dl;default:ct.hasOwnProperty(Es)||dv(te,ge,Es,null,ct,Dl)}}for(var Ls in ct){var Es=ct[Ls];if(Dl=qe[Ls],ct.hasOwnProperty(Ls)&&(Es!=null||Dl!=null))switch(Ls){case"type":Tr=Es;break;case"name":Xt=Es;break;case"checked":Ts=Es;break;case"defaultChecked":bl=Es;break;case"value":ri=Es;break;case"defaultValue":Gi=Es;break;case"children":case"dangerouslySetInnerHTML":if(Es!=null)throw Error(n(137,ge));break;default:Es!==Dl&&dv(te,ge,Ls,Es,ct,Dl)}}Yc(te,ri,Gi,co,Ts,bl,Tr,Xt);return;case"select":Es=ri=Gi=Ls=null;for(Tr in qe)if(co=qe[Tr],qe.hasOwnProperty(Tr)&&co!=null)switch(Tr){case"value":break;case"multiple":Es=co;default:ct.hasOwnProperty(Tr)||dv(te,ge,Tr,null,ct,co)}for(Xt in ct)if(Tr=ct[Xt],co=qe[Xt],ct.hasOwnProperty(Xt)&&(Tr!=null||co!=null))switch(Xt){case"value":Ls=Tr;break;case"defaultValue":Gi=Tr;break;case"multiple":ri=Tr;default:Tr!==co&&dv(te,ge,Xt,Tr,ct,co)}ge=Gi,qe=ri,ct=Es,Ls!=null?pf(te,!!qe,Ls,!1):!!ct!=!!qe&&(ge!=null?pf(te,!!qe,ge,!0):pf(te,!!qe,qe?[]:"",!1));return;case"textarea":Es=Ls=null;for(Gi in qe)if(Xt=qe[Gi],qe.hasOwnProperty(Gi)&&Xt!=null&&!ct.hasOwnProperty(Gi))switch(Gi){case"value":break;case"children":break;default:dv(te,ge,Gi,null,ct,Xt)}for(ri in ct)if(Xt=ct[ri],Tr=qe[ri],ct.hasOwnProperty(ri)&&(Xt!=null||Tr!=null))switch(ri){case"value":Ls=Xt;break;case"defaultValue":Es=Xt;break;case"children":break;case"dangerouslySetInnerHTML":if(Xt!=null)throw Error(n(91));break;default:Xt!==Tr&&dv(te,ge,ri,Xt,ct,Tr)}Tf(te,Ls,Es);return;case"option":for(var qf in qe)if(Ls=qe[qf],qe.hasOwnProperty(qf)&&Ls!=null&&!ct.hasOwnProperty(qf))switch(qf){case"selected":te.selected=!1;break;default:dv(te,ge,qf,null,ct,Ls)}for(co in ct)if(Ls=ct[co],Es=qe[co],ct.hasOwnProperty(co)&&Ls!==Es&&(Ls!=null||Es!=null))switch(co){case"selected":te.selected=Ls&&typeof Ls!="function"&&typeof Ls!="symbol";break;default:dv(te,ge,co,Ls,ct,Es)}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 Ff in qe)Ls=qe[Ff],qe.hasOwnProperty(Ff)&&Ls!=null&&!ct.hasOwnProperty(Ff)&&dv(te,ge,Ff,null,ct,Ls);for(Ts in ct)if(Ls=ct[Ts],Es=qe[Ts],ct.hasOwnProperty(Ts)&&Ls!==Es&&(Ls!=null||Es!=null))switch(Ts){case"children":case"dangerouslySetInnerHTML":if(Ls!=null)throw Error(n(137,ge));break;default:dv(te,ge,Ts,Ls,ct,Es)}return;default:if(E1(ge)){for(var Bv in qe)Ls=qe[Bv],qe.hasOwnProperty(Bv)&&Ls!==void 0&&!ct.hasOwnProperty(Bv)&&Y0(te,ge,Bv,void 0,ct,Ls);for(bl in ct)Ls=ct[bl],Es=qe[bl],!ct.hasOwnProperty(bl)||Ls===Es||Ls===void 0&&Es===void 0||Y0(te,ge,bl,Ls,ct,Es);return}}for(var ss in qe)Ls=qe[ss],qe.hasOwnProperty(ss)&&Ls!=null&&!ct.hasOwnProperty(ss)&&dv(te,ge,ss,null,ct,Ls);for(Dl in ct)Ls=ct[Dl],Es=qe[Dl],!ct.hasOwnProperty(Dl)||Ls===Es||Ls==null&&Es==null||dv(te,ge,Dl,Ls,ct,Es)}var xw=null,eC=null;function C_(te){return te.nodeType===9?te:te.ownerDocument}function Ev(te){switch(te){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Cg(te,ge){if(te===0)switch(ge){case"svg":return 1;case"math":return 2;default:return 0}return te===1&&ge==="foreignObject"?0:te}function wR(te,ge){return te==="textarea"||te==="noscript"||typeof ge.children=="string"||typeof ge.children=="number"||typeof ge.children=="bigint"||typeof ge.dangerouslySetInnerHTML=="object"&&ge.dangerouslySetInnerHTML!==null&&ge.dangerouslySetInnerHTML.__html!=null}var SR=null;function x2(){var te=window.event;return te&&te.type==="popstate"?te===SR?!1:(SR=te,!0):(SR=null,!1)}var R4=typeof setTimeout=="function"?setTimeout:void 0,cI=typeof clearTimeout=="function"?clearTimeout:void 0,fI=typeof Promise=="function"?Promise:void 0,p3=typeof queueMicrotask=="function"?queueMicrotask:typeof fI<"u"?function(te){return fI.resolve(null).then(te).catch(v3)}:R4;function v3(te){setTimeout(function(){throw te})}function a1(te){return te==="head"}function DT(te,ge){var qe=ge,ct=0,Xt=0;do{var Tr=qe.nextSibling;if(te.removeChild(qe),Tr&&Tr.nodeType===8)if(qe=Tr.data,qe==="/$"){if(0<ct&&8>ct){qe=ct;var ri=te.ownerDocument;if(qe&1&&rC(ri.documentElement),qe&2&&rC(ri.body),qe&4)for(qe=ri.head,rC(qe),ri=qe.firstChild;ri;){var Gi=ri.nextSibling,co=ri.nodeName;ri[Js]||co==="SCRIPT"||co==="STYLE"||co==="LINK"&&ri.rel.toLowerCase()==="stylesheet"||qe.removeChild(ri),ri=Gi}}if(Xt===0){te.removeChild(Tr),_3(ge);return}Xt--}else qe==="$"||qe==="$?"||qe==="$!"?Xt++:ct=qe.charCodeAt(0)-48;else ct=0;qe=Tr}while(qe);_3(ge)}function M_(te){var ge=te.firstChild;for(ge&&ge.nodeType===10&&(ge=ge.nextSibling);ge;){var qe=ge;switch(ge=ge.nextSibling,qe.nodeName){case"HTML":case"HEAD":case"BODY":M_(qe),Vl(qe);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(qe.rel.toLowerCase()==="stylesheet")continue}te.removeChild(qe)}}function k4(te,ge,qe,ct){for(;te.nodeType===1;){var Xt=qe;if(te.nodeName.toLowerCase()!==ge.toLowerCase()){if(!ct&&(te.nodeName!=="INPUT"||te.type!=="hidden"))break}else if(ct){if(!te[Js])switch(ge){case"meta":if(!te.hasAttribute("itemprop"))break;return te;case"link":if(Tr=te.getAttribute("rel"),Tr==="stylesheet"&&te.hasAttribute("data-precedence"))break;if(Tr!==Xt.rel||te.getAttribute("href")!==(Xt.href==null||Xt.href===""?null:Xt.href)||te.getAttribute("crossorigin")!==(Xt.crossOrigin==null?null:Xt.crossOrigin)||te.getAttribute("title")!==(Xt.title==null?null:Xt.title))break;return te;case"style":if(te.hasAttribute("data-precedence"))break;return te;case"script":if(Tr=te.getAttribute("src"),(Tr!==(Xt.src==null?null:Xt.src)||te.getAttribute("type")!==(Xt.type==null?null:Xt.type)||te.getAttribute("crossorigin")!==(Xt.crossOrigin==null?null:Xt.crossOrigin))&&Tr&&te.hasAttribute("async")&&!te.hasAttribute("itemprop"))break;return te;default:return te}}else if(ge==="input"&&te.type==="hidden"){var Tr=Xt.name==null?null:""+Xt.name;if(Xt.type==="hidden"&&te.getAttribute("name")===Tr)return te}else return te;if(te=_w(te.nextSibling),te===null)break}return null}function TR(te,ge,qe){if(ge==="")return null;for(;te.nodeType!==3;)if((te.nodeType!==1||te.nodeName!=="INPUT"||te.type!=="hidden")&&!qe||(te=_w(te.nextSibling),te===null))return null;return te}function hb(te){return te.data==="$!"||te.data==="$?"&&te.ownerDocument.readyState==="complete"}function tC(te,ge){var qe=te.ownerDocument;if(te.data!=="$?"||qe.readyState==="complete")ge();else{var ct=function(){ge(),qe.removeEventListener("DOMContentLoaded",ct)};qe.addEventListener("DOMContentLoaded",ct),te._reactRetry=ct}}function _w(te){for(;te!=null;te=te.nextSibling){var ge=te.nodeType;if(ge===1||ge===3)break;if(ge===8){if(ge=te.data,ge==="$"||ge==="$!"||ge==="$?"||ge==="F!"||ge==="F")break;if(ge==="/$")return null}}return te}var dI=null;function I4(te){te=te.previousSibling;for(var ge=0;te;){if(te.nodeType===8){var qe=te.data;if(qe==="$"||qe==="$!"||qe==="$?"){if(ge===0)return te;ge--}else qe==="/$"&&ge++}te=te.previousSibling}return null}function hI(te,ge,qe){switch(ge=C_(qe),te){case"html":if(te=ge.documentElement,!te)throw Error(n(452));return te;case"head":if(te=ge.head,!te)throw Error(n(453));return te;case"body":if(te=ge.body,!te)throw Error(n(454));return te;default:throw Error(n(451))}}function rC(te){for(var ge=te.attributes;ge.length;)te.removeAttributeNode(ge[0]);Vl(te)}var Jb=new Map,ww=new Set;function Dd(te){return typeof te.getRootNode=="function"?te.getRootNode():te.nodeType===9?te:te.ownerDocument}var _2=dr.d;dr.d={f:Nx,r:w2,D:P4,C:pI,L:vI,m:D4,X:g6,S:LT,M:ER};function Nx(){var te=_2.f(),ge=yw();return te||ge}function w2(te){var ge=Ni(te);ge!==null&&ge.tag===5&&ge.type==="form"?KE(ge):_2.r(te)}var m3=typeof document>"u"?null:document;function qp(te,ge,qe){var ct=m3;if(ct&&typeof ge=="string"&&ge){var Xt=Td(ge);Xt='link[rel="'+te+'"][href="'+Xt+'"]',typeof qe=="string"&&(Xt+='[crossorigin="'+qe+'"]'),ww.has(Xt)||(ww.add(Xt),te={rel:te,crossOrigin:qe,href:ge},ct.querySelector(Xt)===null&&(ge=ct.createElement("link"),X0(ge,"link",te),ps(ge),ct.head.appendChild(ge)))}}function P4(te){_2.D(te),qp("dns-prefetch",te,null)}function pI(te,ge){_2.C(te,ge),qp("preconnect",te,ge)}function vI(te,ge,qe){_2.L(te,ge,qe);var ct=m3;if(ct&&te&&ge){var Xt='link[rel="preload"][as="'+Td(ge)+'"]';ge==="image"&&qe&&qe.imageSrcSet?(Xt+='[imagesrcset="'+Td(qe.imageSrcSet)+'"]',typeof qe.imageSizes=="string"&&(Xt+='[imagesizes="'+Td(qe.imageSizes)+'"]')):Xt+='[href="'+Td(te)+'"]';var Tr=Xt;switch(ge){case"style":Tr=g3(te);break;case"script":Tr=y3(te)}Jb.has(Tr)||(te=L({rel:"preload",href:ge==="image"&&qe&&qe.imageSrcSet?void 0:te,as:ge},qe),Jb.set(Tr,te),ct.querySelector(Xt)!==null||ge==="style"&&ct.querySelector(nC(Tr))||ge==="script"&&ct.querySelector(zM(Tr))||(ge=ct.createElement("link"),X0(ge,"link",te),ps(ge),ct.head.appendChild(ge)))}}function D4(te,ge){_2.m(te,ge);var qe=m3;if(qe&&te){var ct=ge&&typeof ge.as=="string"?ge.as:"script",Xt='link[rel="modulepreload"][as="'+Td(ct)+'"][href="'+Td(te)+'"]',Tr=Xt;switch(ct){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":Tr=y3(te)}if(!Jb.has(Tr)&&(te=L({rel:"modulepreload",href:te},ge),Jb.set(Tr,te),qe.querySelector(Xt)===null)){switch(ct){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(qe.querySelector(zM(Tr)))return}ct=qe.createElement("link"),X0(ct,"link",te),ps(ct),qe.head.appendChild(ct)}}}function LT(te,ge,qe){_2.S(te,ge,qe);var ct=m3;if(ct&&te){var Xt=ts(ct).hoistableStyles,Tr=g3(te);ge=ge||"default";var ri=Xt.get(Tr);if(!ri){var Gi={loading:0,preload:null};if(ri=ct.querySelector(nC(Tr)))Gi.loading=5;else{te=L({rel:"stylesheet",href:te,"data-precedence":ge},qe),(qe=Jb.get(Tr))&&aC(te,qe);var co=ri=ct.createElement("link");ps(co),X0(co,"link",te),co._p=new Promise(function(Ts,bl){co.onload=Ts,co.onerror=bl}),co.addEventListener("load",function(){Gi.loading|=1}),co.addEventListener("error",function(){Gi.loading|=2}),Gi.loading|=4,yI(ri,ge,ct)}ri={type:"stylesheet",instance:ri,count:1,state:Gi},Xt.set(Tr,ri)}}}function g6(te,ge){_2.X(te,ge);var qe=m3;if(qe&&te){var ct=ts(qe).hoistableScripts,Xt=y3(te),Tr=ct.get(Xt);Tr||(Tr=qe.querySelector(zM(Xt)),Tr||(te=L({src:te,async:!0},ge),(ge=Jb.get(Xt))&&OT(te,ge),Tr=qe.createElement("script"),ps(Tr),X0(Tr,"link",te),qe.head.appendChild(Tr)),Tr={type:"script",instance:Tr,count:1,state:null},ct.set(Xt,Tr))}}function ER(te,ge){_2.M(te,ge);var qe=m3;if(qe&&te){var ct=ts(qe).hoistableScripts,Xt=y3(te),Tr=ct.get(Xt);Tr||(Tr=qe.querySelector(zM(Xt)),Tr||(te=L({src:te,async:!0,type:"module"},ge),(ge=Jb.get(Xt))&&OT(te,ge),Tr=qe.createElement("script"),ps(Tr),X0(Tr,"link",te),qe.head.appendChild(Tr)),Tr={type:"script",instance:Tr,count:1,state:null},ct.set(Xt,Tr))}}function mI(te,ge,qe,ct){var Xt=(Xt=Ir.current)?Dd(Xt):null;if(!Xt)throw Error(n(446));switch(te){case"meta":case"title":return null;case"style":return typeof qe.precedence=="string"&&typeof qe.href=="string"?(ge=g3(qe.href),qe=ts(Xt).hoistableStyles,ct=qe.get(ge),ct||(ct={type:"style",instance:null,count:0,state:null},qe.set(ge,ct)),ct):{type:"void",instance:null,count:0,state:null};case"link":if(qe.rel==="stylesheet"&&typeof qe.href=="string"&&typeof qe.precedence=="string"){te=g3(qe.href);var Tr=ts(Xt).hoistableStyles,ri=Tr.get(te);if(ri||(Xt=Xt.ownerDocument||Xt,ri={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},Tr.set(te,ri),(Tr=Xt.querySelector(nC(te)))&&!Tr._p&&(ri.instance=Tr,ri.state.loading=5),Jb.has(te)||(qe={rel:"preload",as:"style",href:qe.href,crossOrigin:qe.crossOrigin,integrity:qe.integrity,media:qe.media,hrefLang:qe.hrefLang,referrerPolicy:qe.referrerPolicy},Jb.set(te,qe),Tr||iC(Xt,te,qe,ri.state))),ge&&ct===null)throw Error(n(528,""));return ri}if(ge&&ct!==null)throw Error(n(529,""));return null;case"script":return ge=qe.async,qe=qe.src,typeof qe=="string"&&ge&&typeof ge!="function"&&typeof ge!="symbol"?(ge=y3(qe),qe=ts(Xt).hoistableScripts,ct=qe.get(ge),ct||(ct={type:"script",instance:null,count:0,state:null},qe.set(ge,ct)),ct):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,te))}}function g3(te){return'href="'+Td(te)+'"'}function nC(te){return'link[rel="stylesheet"]['+te+"]"}function gI(te){return L({},te,{"data-precedence":te.precedence,precedence:null})}function iC(te,ge,qe,ct){te.querySelector('link[rel="preload"][as="style"]['+ge+"]")?ct.loading=1:(ge=te.createElement("link"),ct.preload=ge,ge.addEventListener("load",function(){return ct.loading|=1}),ge.addEventListener("error",function(){return ct.loading|=2}),X0(ge,"link",qe),ps(ge),te.head.appendChild(ge))}function y3(te){return'[src="'+Td(te)+'"]'}function zM(te){return"script[async]"+te}function y6(te,ge,qe){if(ge.count++,ge.instance===null)switch(ge.type){case"style":var ct=te.querySelector('style[data-href~="'+Td(qe.href)+'"]');if(ct)return ge.instance=ct,ps(ct),ct;var Xt=L({},qe,{"data-href":qe.href,"data-precedence":qe.precedence,href:null,precedence:null});return ct=(te.ownerDocument||te).createElement("style"),ps(ct),X0(ct,"style",Xt),yI(ct,qe.precedence,te),ge.instance=ct;case"stylesheet":Xt=g3(qe.href);var Tr=te.querySelector(nC(Xt));if(Tr)return ge.state.loading|=4,ge.instance=Tr,ps(Tr),Tr;ct=gI(qe),(Xt=Jb.get(Xt))&&aC(ct,Xt),Tr=(te.ownerDocument||te).createElement("link"),ps(Tr);var ri=Tr;return ri._p=new Promise(function(Gi,co){ri.onload=Gi,ri.onerror=co}),X0(Tr,"link",ct),ge.state.loading|=4,yI(Tr,qe.precedence,te),ge.instance=Tr;case"script":return Tr=y3(qe.src),(Xt=te.querySelector(zM(Tr)))?(ge.instance=Xt,ps(Xt),Xt):(ct=qe,(Xt=Jb.get(Tr))&&(ct=L({},qe),OT(ct,Xt)),te=te.ownerDocument||te,Xt=te.createElement("script"),ps(Xt),X0(Xt,"link",ct),te.head.appendChild(Xt),ge.instance=Xt);case"void":return null;default:throw Error(n(443,ge.type))}else ge.type==="stylesheet"&&(ge.state.loading&4)===0&&(ct=ge.instance,ge.state.loading|=4,yI(ct,qe.precedence,te));return ge.instance}function yI(te,ge,qe){for(var ct=qe.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),Xt=ct.length?ct[ct.length-1]:null,Tr=Xt,ri=0;ri<ct.length;ri++){var Gi=ct[ri];if(Gi.dataset.precedence===ge)Tr=Gi;else if(Tr!==Xt)break}Tr?Tr.parentNode.insertBefore(te,Tr.nextSibling):(ge=qe.nodeType===9?qe.head:qe,ge.insertBefore(te,ge.firstChild))}function aC(te,ge){te.crossOrigin==null&&(te.crossOrigin=ge.crossOrigin),te.referrerPolicy==null&&(te.referrerPolicy=ge.referrerPolicy),te.title==null&&(te.title=ge.title)}function OT(te,ge){te.crossOrigin==null&&(te.crossOrigin=ge.crossOrigin),te.referrerPolicy==null&&(te.referrerPolicy=ge.referrerPolicy),te.integrity==null&&(te.integrity=ge.integrity)}var b3=null;function AR(te,ge,qe){if(b3===null){var ct=new Map,Xt=b3=new Map;Xt.set(qe,ct)}else Xt=b3,ct=Xt.get(qe),ct||(ct=new Map,Xt.set(qe,ct));if(ct.has(te))return ct;for(ct.set(te,null),qe=qe.getElementsByTagName(te),Xt=0;Xt<qe.length;Xt++){var Tr=qe[Xt];if(!(Tr[Js]||Tr[Oo]||te==="link"&&Tr.getAttribute("rel")==="stylesheet")&&Tr.namespaceURI!=="http://www.w3.org/2000/svg"){var ri=Tr.getAttribute(ge)||"";ri=te+ri;var Gi=ct.get(ri);Gi?Gi.push(Tr):ct.set(ri,[Tr])}}return ct}function CR(te,ge,qe){te=te.ownerDocument||te,te.head.insertBefore(qe,ge==="title"?te.querySelector("head > title"):null)}function MR(te,ge,qe){if(qe===1||ge.itemProp!=null)return!1;switch(te){case"meta":case"title":return!0;case"style":if(typeof ge.precedence!="string"||typeof ge.href!="string"||ge.href==="")break;return!0;case"link":if(typeof ge.rel!="string"||typeof ge.href!="string"||ge.href===""||ge.onLoad||ge.onError)break;switch(ge.rel){case"stylesheet":return te=ge.disabled,typeof ge.precedence=="string"&&te==null;default:return!0}case"script":if(ge.async&&typeof ge.async!="function"&&typeof ge.async!="symbol"&&!ge.onLoad&&!ge.onError&&ge.src&&typeof ge.src=="string")return!0}return!1}function Mg(te){return!(te.type==="stylesheet"&&(te.state.loading&3)===0)}var Z0=null;function L4(){}function O4(te,ge,qe){if(Z0===null)throw Error(n(475));var ct=Z0;if(ge.type==="stylesheet"&&(typeof qe.media!="string"||matchMedia(qe.media).matches!==!1)&&(ge.state.loading&4)===0){if(ge.instance===null){var Xt=g3(qe.href),Tr=te.querySelector(nC(Xt));if(Tr){te=Tr._p,te!==null&&typeof te=="object"&&typeof te.then=="function"&&(ct.count++,ct=AS.bind(ct),te.then(ct,ct)),ge.state.loading|=4,ge.instance=Tr,ps(Tr);return}Tr=te.ownerDocument||te,qe=gI(qe),(Xt=Jb.get(Xt))&&aC(qe,Xt),Tr=Tr.createElement("link"),ps(Tr);var ri=Tr;ri._p=new Promise(function(Gi,co){ri.onload=Gi,ri.onerror=co}),X0(Tr,"link",qe),ge.instance=Tr}ct.stylesheets===null&&(ct.stylesheets=new Map),ct.stylesheets.set(ge,te),(te=ge.state.preload)&&(ge.state.loading&3)===0&&(ct.count++,ge=AS.bind(ct),te.addEventListener("load",ge),te.addEventListener("error",ge))}}function kF(){if(Z0===null)throw Error(n(475));var te=Z0;return te.stylesheets&&te.count===0&&bI(te,te.stylesheets),0<te.count?function(ge){var qe=setTimeout(function(){if(te.stylesheets&&bI(te,te.stylesheets),te.unsuspend){var ct=te.unsuspend;te.unsuspend=null,ct()}},6e4);return te.unsuspend=ge,function(){te.unsuspend=null,clearTimeout(qe)}}:null}function AS(){if(this.count--,this.count===0){if(this.stylesheets)bI(this,this.stylesheets);else if(this.unsuspend){var te=this.unsuspend;this.unsuspend=null,te()}}}var RR=null;function bI(te,ge){te.stylesheets=null,te.unsuspend!==null&&(te.count++,RR=new Map,ge.forEach(N4,te),RR=null,AS.call(te))}function N4(te,ge){if(!(ge.state.loading&4)){var qe=RR.get(te);if(qe)var ct=qe.get(null);else{qe=new Map,RR.set(te,qe);for(var Xt=te.querySelectorAll("link[data-precedence],style[data-precedence]"),Tr=0;Tr<Xt.length;Tr++){var ri=Xt[Tr];(ri.nodeName==="LINK"||ri.getAttribute("media")!=="not all")&&(qe.set(ri.dataset.precedence,ri),ct=ri)}ct&&qe.set(null,ct)}Xt=ge.instance,ri=Xt.getAttribute("data-precedence"),Tr=qe.get(ri)||ct,Tr===ct&&qe.set(null,Xt),qe.set(ri,Xt),this.count++,ct=AS.bind(this),Xt.addEventListener("load",ct),Xt.addEventListener("error",ct),Tr?Tr.parentNode.insertBefore(Xt,Tr.nextSibling):(te=te.nodeType===9?te.head:te,te.insertBefore(Xt,te.firstChild)),ge.state.loading|=4}}var oC={$$typeof:Se,Provider:null,Consumer:null,_currentValue:Zt,_currentValue2:Zt,_threadCount:0};function b6(te,ge,qe,ct,Xt,Tr,ri,Gi){this.tag=1,this.containerInfo=te,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=Ys(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ys(0),this.hiddenUpdates=Ys(null),this.identifierPrefix=ct,this.onUncaughtError=Xt,this.onCaughtError=Tr,this.onRecoverableError=ri,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Gi,this.incompleteTransitions=new Map}function BM(te,ge,qe,ct,Xt,Tr,ri,Gi,co,Ts,bl,Dl){return te=new b6(te,ge,qe,ri,Gi,co,Ts,Dl),ge=1,Tr===!0&&(ge|=24),Tr=g0(3,null,null,ge),te.current=Tr,Tr.stateNode=te,ge=gM(),ge.refCount++,te.pooledCache=ge,ge.refCount++,Tr.memoizedState={element:ct,isDehydrated:qe,cache:ge},yT(Tr),te}function F4(te){return te?(te=r0,te):r0}function xI(te,ge,qe,ct,Xt,Tr){Xt=F4(Xt),ct.context===null?ct.context=Xt:ct.pendingContext=Xt,ct=p_(ge),ct.payload={element:qe},Tr=Tr===void 0?null:Tr,Tr!==null&&(ct.callback=Tr),qe=Q_(te,ct,ge),qe!==null&&(i1(qe,te,ge),bT(qe,te,ge))}function z4(te,ge){if(te=te.memoizedState,te!==null&&te.dehydrated!==null){var qe=te.retryLane;te.retryLane=qe!==0&&qe<ge?qe:ge}}function UM(te,ge){z4(te,ge),(te=te.alternate)&&z4(te,ge)}function x6(te){if(te.tag===13){var ge=ib(te,67108864);ge!==null&&i1(ge,te,67108864),UM(te,67108864)}}var T0=!0;function HM(te,ge,qe,ct){var Xt=Lt.T;Lt.T=null;var Tr=dr.p;try{dr.p=2,jM(te,ge,qe,ct)}finally{dr.p=Tr,Lt.T=Xt}}function sC(te,ge,qe,ct){var Xt=Lt.T;Lt.T=null;var Tr=dr.p;try{dr.p=8,jM(te,ge,qe,ct)}finally{dr.p=Tr,Lt.T=Xt}}function jM(te,ge,qe,ct){if(T0){var Xt=_I(ct);if(Xt===null)b2(te,ge,ct,kR,qe),PR(te,ct);else if(_6(Xt,te,ge,qe,ct))ct.stopPropagation();else if(PR(te,ct),ge&4&&-1<CS.indexOf(te)){for(;Xt!==null;){var Tr=Ni(Xt);if(Tr!==null)switch(Tr.tag){case 3:if(Tr=Tr.stateNode,Tr.current.memoizedState.isDehydrated){var ri=Ko(Tr.pendingLanes);if(ri!==0){var Gi=Tr;for(Gi.pendingLanes|=2,Gi.entangledLanes|=2;ri;){var co=1<<31-sa(ri);Gi.entanglements[1]|=co,ri&=~co}SS(Tr),(Lp&6)===0&&($0=bn()+500,bR(0))}}break;case 13:Gi=ib(Tr,2),Gi!==null&&i1(Gi,Tr,2),yw(),UM(Tr,2)}if(Tr=_I(ct),Tr===null&&b2(te,ge,ct,kR,qe),Tr===Xt)break;Xt=Tr}Xt!==null&&ct.stopPropagation()}else b2(te,ge,ct,null,qe)}}function _I(te){return te=Hg(te),wI(te)}var kR=null;function wI(te){if(kR=null,te=zn(te),te!==null){var ge=a(te);if(ge===null)te=null;else{var qe=ge.tag;if(qe===13){if(te=o(ge),te!==null)return te;te=null}else if(qe===3){if(ge.stateNode.current.memoizedState.isDehydrated)return ge.tag===3?ge.stateNode.containerInfo:null;te=null}else ge!==te&&(te=null)}}return kR=te,null}function SI(te){switch(te){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(Mn()){case gi:return 2;case Oi:return 8;case Pa:case va:return 32;case ti:return 268435456;default:return 32}default:return 32}}var IR=!1,S2=null,x3=null,NT=null,VM=new Map,qM=new Map,FT=[],CS="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 PR(te,ge){switch(te){case"focusin":case"focusout":S2=null;break;case"dragenter":case"dragleave":x3=null;break;case"mouseover":case"mouseout":NT=null;break;case"pointerover":case"pointerout":VM.delete(ge.pointerId);break;case"gotpointercapture":case"lostpointercapture":qM.delete(ge.pointerId)}}function GM(te,ge,qe,ct,Xt,Tr){return te===null||te.nativeEvent!==Tr?(te={blockedOn:ge,domEventName:qe,eventSystemFlags:ct,nativeEvent:Tr,targetContainers:[Xt]},ge!==null&&(ge=Ni(ge),ge!==null&&x6(ge)),te):(te.eventSystemFlags|=ct,ge=te.targetContainers,Xt!==null&&ge.indexOf(Xt)===-1&&ge.push(Xt),te)}function _6(te,ge,qe,ct,Xt){switch(ge){case"focusin":return S2=GM(S2,te,ge,qe,ct,Xt),!0;case"dragenter":return x3=GM(x3,te,ge,qe,ct,Xt),!0;case"mouseover":return NT=GM(NT,te,ge,qe,ct,Xt),!0;case"pointerover":var Tr=Xt.pointerId;return VM.set(Tr,GM(VM.get(Tr)||null,te,ge,qe,ct,Xt)),!0;case"gotpointercapture":return Tr=Xt.pointerId,qM.set(Tr,GM(qM.get(Tr)||null,te,ge,qe,ct,Xt)),!0}return!1}function w6(te){var ge=zn(te.target);if(ge!==null){var qe=a(ge);if(qe!==null){if(ge=qe.tag,ge===13){if(ge=o(qe),ge!==null){te.blockedOn=ge,da(te.priority,function(){if(qe.tag===13){var ct=bm();ct=nu(ct);var Xt=ib(qe,ct);Xt!==null&&i1(Xt,qe,ct),UM(qe,ct)}});return}}else if(ge===3&&qe.stateNode.current.memoizedState.isDehydrated){te.blockedOn=qe.tag===3?qe.stateNode.containerInfo:null;return}}}te.blockedOn=null}function TI(te){if(te.blockedOn!==null)return!1;for(var ge=te.targetContainers;0<ge.length;){var qe=_I(te.nativeEvent);if(qe===null){qe=te.nativeEvent;var ct=new qe.constructor(qe.type,qe);Wp=ct,qe.target.dispatchEvent(ct),Wp=null}else return ge=Ni(qe),ge!==null&&x6(ge),te.blockedOn=qe,!1;ge.shift()}return!0}function B4(te,ge,qe){TI(te)&&qe.delete(ge)}function EI(){IR=!1,S2!==null&&TI(S2)&&(S2=null),x3!==null&&TI(x3)&&(x3=null),NT!==null&&TI(NT)&&(NT=null),VM.forEach(B4),qM.forEach(B4)}function lC(te,ge){te.blockedOn===ge&&(te.blockedOn=null,IR||(IR=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,EI)))}var DR=null;function LR(te){DR!==te&&(DR=te,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){DR===te&&(DR=null);for(var ge=0;ge<te.length;ge+=3){var qe=te[ge],ct=te[ge+1],Xt=te[ge+2];if(typeof ct!="function"){if(wI(ct||qe)===null)continue;break}var Tr=Ni(qe);Tr!==null&&(te.splice(ge,3),ge-=3,ST(Tr,{pending:!0,data:Xt,method:qe.method,action:ct},ct,Xt))}}))}function _3(te){function ge(co){return lC(co,te)}S2!==null&&lC(S2,te),x3!==null&&lC(x3,te),NT!==null&&lC(NT,te),VM.forEach(ge),qM.forEach(ge);for(var qe=0;qe<FT.length;qe++){var ct=FT[qe];ct.blockedOn===te&&(ct.blockedOn=null)}for(;0<FT.length&&(qe=FT[0],qe.blockedOn===null);)w6(qe),qe.blockedOn===null&&FT.shift();if(qe=(te.ownerDocument||te).$$reactFormReplay,qe!=null)for(ct=0;ct<qe.length;ct+=3){var Xt=qe[ct],Tr=qe[ct+1],ri=Xt[_s]||null;if(typeof Tr=="function")ri||LR(qe);else if(ri){var Gi=null;if(Tr&&Tr.hasAttribute("formAction")){if(Xt=Tr,ri=Tr[_s]||null)Gi=ri.formAction;else if(wI(Xt)!==null)continue}else Gi=ri.action;typeof Gi=="function"?qe[ct+1]=Gi:(qe.splice(ct,3),ct-=3),LR(qe)}}}function U4(te){this._internalRoot=te}AI.prototype.render=U4.prototype.render=function(te){var ge=this._internalRoot;if(ge===null)throw Error(n(409));var qe=ge.current,ct=bm();xI(qe,ct,te,ge,null,null)},AI.prototype.unmount=U4.prototype.unmount=function(){var te=this._internalRoot;if(te!==null){this._internalRoot=null;var ge=te.containerInfo;xI(te.current,2,null,te,null,null),yw(),ge[nl]=null}};function AI(te){this._internalRoot=te}AI.prototype.unstable_scheduleHydration=function(te){if(te){var ge=Mc();te={blockedOn:null,target:te,priority:ge};for(var qe=0;qe<FT.length&&ge!==0&&ge<FT[qe].priority;qe++);FT.splice(qe,0,te),qe===0&&w6(te)}};var S6=e.version;if(S6!=="19.1.1")throw Error(n(527,S6,"19.1.1"));dr.findDOMNode=function(te){var ge=te._reactInternals;if(ge===void 0)throw typeof te.render=="function"?Error(n(188)):(te=Object.keys(te).join(","),Error(n(268,te)));return te=d(ge),te=te!==null?b(te):null,te=te===null?null:te.stateNode,te};var IF={bundleType:0,version:"19.1.1",rendererPackageName:"react-dom",currentDispatcherRef:Lt,reconcilerVersion:"19.1.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var CI=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!CI.isDisabled&&CI.supportsFiber)try{Wn=CI.inject(IF),Ei=CI}catch{}}return x7.createRoot=function(te,ge){if(!i(te))throw Error(n(299));var qe=!1,ct="",Xt=ET,Tr=t3,ri=aI,Gi=null;return ge!=null&&(ge.unstable_strictMode===!0&&(qe=!0),ge.identifierPrefix!==void 0&&(ct=ge.identifierPrefix),ge.onUncaughtError!==void 0&&(Xt=ge.onUncaughtError),ge.onCaughtError!==void 0&&(Tr=ge.onCaughtError),ge.onRecoverableError!==void 0&&(ri=ge.onRecoverableError),ge.unstable_transitionCallbacks!==void 0&&(Gi=ge.unstable_transitionCallbacks)),ge=BM(te,1,!1,null,null,qe,ct,Xt,Tr,ri,Gi,null),te[nl]=ge.current,h3(te),new U4(ge)},x7.hydrateRoot=function(te,ge,qe){if(!i(te))throw Error(n(299));var ct=!1,Xt="",Tr=ET,ri=t3,Gi=aI,co=null,Ts=null;return qe!=null&&(qe.unstable_strictMode===!0&&(ct=!0),qe.identifierPrefix!==void 0&&(Xt=qe.identifierPrefix),qe.onUncaughtError!==void 0&&(Tr=qe.onUncaughtError),qe.onCaughtError!==void 0&&(ri=qe.onCaughtError),qe.onRecoverableError!==void 0&&(Gi=qe.onRecoverableError),qe.unstable_transitionCallbacks!==void 0&&(co=qe.unstable_transitionCallbacks),qe.formState!==void 0&&(Ts=qe.formState)),ge=BM(te,1,!0,ge,qe??null,ct,Xt,Tr,ri,Gi,co,Ts),ge.context=F4(null),qe=ge.current,ct=bm(),ct=nu(ct),Xt=p_(ct),Xt.callback=null,Q_(qe,Xt,ct),qe=ct,ge.current.lanes=qe,$s(ge,qe),SS(ge),te[nl]=ge.current,h3(te),new AI(ge)},x7.version="19.1.1",x7}var W_e;function Hit(){if(W_e)return bJ.exports;W_e=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),bJ.exports=Uit(),bJ.exports}var jit=Hit();/**
 * react-router v7.9.2
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */var j7e=t=>{throw TypeError(t)},Vit=(t,e,r)=>e.has(t)||j7e("Cannot "+r),SJ=(t,e,r)=>(Vit(t,e,"read from private field"),r?r.call(t):e.get(t)),qit=(t,e,r)=>e.has(t)?j7e("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),Y_e="popstate";function Git(t={}){function e(n,i){let{pathname:a,search:o,hash:s}=n.location;return x9("",{pathname:a,search:o,hash:s},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(n,i){return typeof i=="string"?i:WP(i)}return Wit(e,r,null,t)}function Up(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function b1(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function $it(){return Math.random().toString(36).substring(2,10)}function X_e(t,e){return{usr:t.state,key:t.key,idx:e}}function x9(t,e,r=null,n){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof e=="string"?u4(e):e,state:r,key:e&&e.key||n||$it()}}function WP({pathname:t="/",search:e="",hash:r=""}){return e&&e!=="?"&&(t+=e.charAt(0)==="?"?e:"?"+e),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function u4(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substring(r),t=t.substring(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substring(n),t=t.substring(0,n)),t&&(e.pathname=t)}return e}function Wit(t,e,r,n={}){let{window:i=document.defaultView,v5Compat:a=!1}=n,o=i.history,s="POP",d=null,b=L();b==null&&(b=0,o.replaceState({...o.state,idx:b},""));function L(){return(o.state||{idx:null}).idx}function B(){s="POP";let ae=L(),U=ae==null?null:ae-b;b=ae,d&&d({action:s,location:de.location,delta:U})}function V(ae,U){s="PUSH";let ve=x9(de.location,ae,U);b=L()+1;let Se=X_e(ve,b),Pe=de.createHref(ve);try{o.pushState(Se,"",Pe)}catch(Me){if(Me instanceof DOMException&&Me.name==="DataCloneError")throw Me;i.location.assign(Pe)}a&&d&&d({action:s,location:de.location,delta:1})}function X(ae,U){s="REPLACE";let ve=x9(de.location,ae,U);b=L();let Se=X_e(ve,b),Pe=de.createHref(ve);o.replaceState(Se,"",Pe),a&&d&&d({action:s,location:de.location,delta:0})}function ie(ae){return V7e(ae)}let de={get action(){return s},get location(){return t(i,o)},listen(ae){if(d)throw new Error("A history only accepts one active listener");return i.addEventListener(Y_e,B),d=ae,()=>{i.removeEventListener(Y_e,B),d=null}},createHref(ae){return e(i,ae)},createURL:ie,encodeLocation(ae){let U=ie(ae);return{pathname:U.pathname,search:U.search,hash:U.hash}},push:V,replace:X,go(ae){return o.go(ae)}};return de}function V7e(t,e=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),Up(r,"No window.location.(origin|href) available to create URL");let n=typeof t=="string"?t:WP(t);return n=n.replace(/ $/,"%20"),!e&&n.startsWith("//")&&(n=r+n),new URL(n,r)}var wz,Z_e=class{constructor(t){if(qit(this,wz,new Map),t)for(let[e,r]of t)this.set(e,r)}get(t){if(SJ(this,wz).has(t))return SJ(this,wz).get(t);if(t.defaultValue!==void 0)return t.defaultValue;throw new Error("No value found for context")}set(t,e){SJ(this,wz).set(t,e)}};wz=new WeakMap;var Yit=new Set(["lazy","caseSensitive","path","id","index","children"]);function Xit(t){return Yit.has(t)}var Zit=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function Kit(t){return Zit.has(t)}function Jit(t){return t.index===!0}function _9(t,e,r=[],n={},i=!1){return t.map((a,o)=>{let s=[...r,String(o)],d=typeof a.id=="string"?a.id:s.join("-");if(Up(a.index!==!0||!a.children,"Cannot specify children on an index route"),Up(i||!n[d],`Found a route id collision on id "${d}".  Route id's must be globally unique within Data Router usages`),Jit(a)){let b={...a,...e(a),id:d};return n[d]=b,b}else{let b={...a,...e(a),id:d,children:void 0};return n[d]=b,a.children&&(b.children=_9(a.children,e,s,n,i)),b}})}function AP(t,e,r="/"){return $q(t,e,r,!1)}function $q(t,e,r,n){let i=typeof e=="string"?u4(e):e,a=tA(i.pathname||"/",r);if(a==null)return null;let o=q7e(t);eat(o);let s=null;for(let d=0;s==null&&d<o.length;++d){let b=fat(a);s=uat(o[d],b,n)}return s}function Qit(t,e){let{route:r,pathname:n,params:i}=t;return{id:r.id,pathname:n,params:i,data:e[r.id],loaderData:e[r.id],handle:r.handle}}function q7e(t,e=[],r=[],n="",i=!1){let a=(o,s,d=i,b)=>{let L={relativePath:b===void 0?o.path||"":b,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};if(L.relativePath.startsWith("/")){if(!L.relativePath.startsWith(n)&&d)return;Up(L.relativePath.startsWith(n),`Absolute route path "${L.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),L.relativePath=L.relativePath.slice(n.length)}let B=R5([n,L.relativePath]),V=r.concat(L);o.children&&o.children.length>0&&(Up(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${B}".`),q7e(o.children,e,V,B,d)),!(o.path==null&&!o.index)&&e.push({path:B,score:sat(B,o.index),routesMeta:V})};return t.forEach((o,s)=>{if(o.path===""||!o.path?.includes("?"))a(o,s);else for(let d of G7e(o.path))a(o,s,!0,d)}),e}function G7e(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,i=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return i?[a,""]:[a];let o=G7e(n.join("/")),s=[];return s.push(...o.map(d=>d===""?a:[a,d].join("/"))),i&&s.push(...o),s.map(d=>t.startsWith("/")&&d===""?"/":d)}function eat(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:lat(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var tat=/^:[\w-]+$/,rat=3,nat=2,iat=1,aat=10,oat=-2,K_e=t=>t==="*";function sat(t,e){let r=t.split("/"),n=r.length;return r.some(K_e)&&(n+=oat),e&&(n+=nat),r.filter(i=>!K_e(i)).reduce((i,a)=>i+(tat.test(a)?rat:a===""?iat:aat),n)}function lat(t,e){return t.length===e.length&&t.slice(0,-1).every((n,i)=>n===e[i])?t[t.length-1]-e[e.length-1]:0}function uat(t,e,r=!1){let{routesMeta:n}=t,i={},a="/",o=[];for(let s=0;s<n.length;++s){let d=n[s],b=s===n.length-1,L=a==="/"?e:e.slice(a.length)||"/",B=qG({path:d.relativePath,caseSensitive:d.caseSensitive,end:b},L),V=d.route;if(!B&&b&&r&&!n[n.length-1].route.index&&(B=qG({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},L)),!B)return null;Object.assign(i,B.params),o.push({params:i,pathname:R5([a,B.pathname]),pathnameBase:vat(R5([a,B.pathnameBase])),route:V}),B.pathnameBase!=="/"&&(a=R5([a,B.pathnameBase]))}return o}function qG(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,n]=cat(t.path,t.caseSensitive,t.end),i=e.match(r);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:n.reduce((b,{paramName:L,isOptional:B},V)=>{if(L==="*"){let ie=s[V]||"";o=a.slice(0,a.length-ie.length).replace(/(.)\/+$/,"$1")}const X=s[V];return B&&!X?b[L]=void 0:b[L]=(X||"").replace(/%2F/g,"/"),b},{}),pathname:a,pathnameBase:o,pattern:t}}function cat(t,e=!1,r=!0){b1(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let n=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,d)=>(n.push({paramName:s,isOptional:d!=null}),d?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(n.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}function fat(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return b1(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),t}}function tA(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}function dat({basename:t,pathname:e}){return e==="/"?t:R5([t,e])}function hat(t,e="/"){let{pathname:r,search:n="",hash:i=""}=typeof t=="string"?u4(t):t;return{pathname:r?r.startsWith("/")?r:pat(r,e):e,search:mat(n),hash:gat(i)}}function pat(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function TJ(t,e,r,n){return`Cannot include a '${t}' character in a manually specified \`to.${e}\` field [${JSON.stringify(n)}].  Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function $7e(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function GW(t){let e=$7e(t);return e.map((r,n)=>n===e.length-1?r.pathname:r.pathnameBase)}function $W(t,e,r,n=!1){let i;typeof t=="string"?i=u4(t):(i={...t},Up(!i.pathname||!i.pathname.includes("?"),TJ("?","pathname","search",i)),Up(!i.pathname||!i.pathname.includes("#"),TJ("#","pathname","hash",i)),Up(!i.search||!i.search.includes("#"),TJ("#","search","hash",i)));let a=t===""||i.pathname==="",o=a?"/":i.pathname,s;if(o==null)s=r;else{let B=e.length-1;if(!n&&o.startsWith("..")){let V=o.split("/");for(;V[0]==="..";)V.shift(),B-=1;i.pathname=V.join("/")}s=B>=0?e[B]:"/"}let d=hat(i,s),b=o&&o!=="/"&&o.endsWith("/"),L=(a||o===".")&&r.endsWith("/");return!d.pathname.endsWith("/")&&(b||L)&&(d.pathname+="/"),d}var R5=t=>t.join("/").replace(/\/\/+/g,"/"),vat=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),mat=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,gat=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,GG=class{constructor(t,e,r,n=!1){this.status=t,this.statusText=e||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function w9(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}var W7e=["POST","PUT","PATCH","DELETE"],yat=new Set(W7e),bat=["GET",...W7e],xat=new Set(bat),_at=new Set([301,302,303,307,308]),wat=new Set([307,308]),EJ={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Sat={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},_7={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Tat=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Mve=t=>Tat.test(t),Eat=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),Y7e="remix-router-transitions",X7e=Symbol("ResetLoaderData");function Aat(t){const e=t.window?t.window:typeof window<"u"?window:void 0,r=typeof e<"u"&&typeof e.document<"u"&&typeof e.document.createElement<"u";Up(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let n=t.hydrationRouteProperties||[],i=t.mapRouteProperties||Eat,a={},o=_9(t.routes,i,void 0,a),s,d=t.basename||"/";d.startsWith("/")||(d=`/${d}`);let b=t.dataStrategy||Iat,L={...t.future},B=null,V=new Set,X=null,ie=null,de=null,ae=t.hydrationData!=null,U=AP(o,t.history.location,d),ve=!1,Se=null,Pe;if(U==null&&!t.patchRoutesOnNavigation){let da=I3(404,{pathname:t.history.location.pathname}),{matches:Xa,route:Oo}=VH(o);Pe=!0,U=Xa,Se={[Oo.id]:da}}else if(U&&!t.hydrationData&&Hl(U,o,t.history.location.pathname).active&&(U=null),U)if(U.some(da=>da.route.lazy))Pe=!1;else if(!U.some(da=>Rve(da.route)))Pe=!0;else{let da=t.hydrationData?t.hydrationData.loaderData:null,Xa=t.hydrationData?t.hydrationData.errors:null;if(Xa){let Oo=U.findIndex(_s=>Xa[_s.route.id]!==void 0);Pe=U.slice(0,Oo+1).every(_s=>!Wde(_s.route,da,Xa))}else Pe=U.every(Oo=>!Wde(Oo.route,da,Xa))}else{Pe=!1,U=[];let da=Hl(null,o,t.history.location.pathname);da.active&&da.matches&&(ve=!0,U=da.matches)}let Me,Ie={historyAction:t.history.action,location:t.history.location,matches:U,initialized:Pe,navigation:EJ,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||Se,fetchers:new Map,blockers:new Map},Ve="POP",Ze=!1,Je,nt=!1,ut=new Map,ht=null,_t=!1,Dt=!1,qt=new Set,Lt=new Map,dr=0,Zt=-1,Cr=new Map,yt=new Set,Vt=new Map,Er=new Map,sr=new Set,or=new Map,Ar,Ir=null;function _n(){if(B=t.history.listen(({action:da,location:Xa,delta:Oo})=>{if(Ar){Ar(),Ar=void 0;return}b1(or.size===0||Oo!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs.  This can also happen if you are using createHashRouter and the user manually changes the URL.");let _s=ba({currentLocation:Ie.location,nextLocation:Xa,historyAction:da});if(_s&&Oo!=null){let nl=new Promise(vu=>{Ar=vu});t.history.go(Oo*-1),Ss(_s,{state:"blocked",location:Xa,proceed(){Ss(_s,{state:"proceeding",proceed:void 0,reset:void 0,location:Xa}),nl.then(()=>t.history.go(Oo))},reset(){let vu=new Map(Ie.blockers);vu.set(_s,_7),Jn({blockers:vu})}});return}return Yn(da,Xa)}),r){$at(e,ut);let da=()=>Wat(e,ut);e.addEventListener("pagehide",da),ht=()=>e.removeEventListener("pagehide",da)}return Ie.initialized||Yn("POP",Ie.location,{initialHydration:!0}),Me}function Un(){B&&B(),ht&&ht(),V.clear(),Je&&Je.abort(),Ie.fetchers.forEach((da,Xa)=>xa(Xa)),Ie.blockers.forEach((da,Xa)=>za(Xa))}function Qn(da){return V.add(da),()=>V.delete(da)}function Jn(da,Xa={}){da.matches&&(da.matches=da.matches.map(nl=>{let vu=a[nl.route.id],zl=nl.route;return zl.element!==vu.element||zl.errorElement!==vu.errorElement||zl.hydrateFallbackElement!==vu.hydrateFallbackElement?{...nl,route:vu}:nl})),Ie={...Ie,...da};let Oo=[],_s=[];Ie.fetchers.forEach((nl,vu)=>{nl.state==="idle"&&(sr.has(vu)?Oo.push(vu):_s.push(vu))}),sr.forEach(nl=>{!Ie.fetchers.has(nl)&&!Lt.has(nl)&&Oo.push(nl)}),[...V].forEach(nl=>nl(Ie,{deletedFetchers:Oo,viewTransitionOpts:Xa.viewTransitionOpts,flushSync:Xa.flushSync===!0})),Oo.forEach(nl=>xa(nl)),_s.forEach(nl=>Ie.fetchers.delete(nl))}function Vn(da,Xa,{flushSync:Oo}={}){let _s=Ie.actionData!=null&&Ie.navigation.formMethod!=null&&HS(Ie.navigation.formMethod)&&Ie.navigation.state==="loading"&&da.state?._isRedirect!==!0,nl;Xa.actionData?Object.keys(Xa.actionData).length>0?nl=Xa.actionData:nl=null:_s?nl=Ie.actionData:nl=null;let vu=Xa.loaderData?swe(Ie.loaderData,Xa.loaderData,Xa.matches||[],Xa.errors):Ie.loaderData,zl=Ie.blockers;zl.size>0&&(zl=new Map(zl),zl.forEach((Vl,zn)=>zl.set(zn,_7)));let jl=_t?!1:Ns(da,Xa.matches||Ie.matches),Il=Ze===!0||Ie.navigation.formMethod!=null&&HS(Ie.navigation.formMethod)&&da.state?._isRedirect!==!0;s&&(o=s,s=void 0),_t||Ve==="POP"||(Ve==="PUSH"?t.history.push(da,da.state):Ve==="REPLACE"&&t.history.replace(da,da.state));let Js;if(Ve==="POP"){let Vl=ut.get(Ie.location.pathname);Vl&&Vl.has(da.pathname)?Js={currentLocation:Ie.location,nextLocation:da}:ut.has(da.pathname)&&(Js={currentLocation:da,nextLocation:Ie.location})}else if(nt){let Vl=ut.get(Ie.location.pathname);Vl?Vl.add(da.pathname):(Vl=new Set([da.pathname]),ut.set(Ie.location.pathname,Vl)),Js={currentLocation:Ie.location,nextLocation:da}}Jn({...Xa,actionData:nl,loaderData:vu,historyAction:Ve,location:da,initialized:!0,navigation:EJ,revalidation:"idle",restoreScrollPosition:jl,preventScrollReset:Il,blockers:zl},{viewTransitionOpts:Js,flushSync:Oo===!0}),Ve="POP",Ze=!1,nt=!1,_t=!1,Dt=!1,Ir?.resolve(),Ir=null}async function jn(da,Xa){if(typeof da=="number"){t.history.go(da);return}let Oo=$de(Ie.location,Ie.matches,d,da,Xa?.fromRouteId,Xa?.relative),{path:_s,submission:nl,error:vu}=J_e(!1,Oo,Xa),zl=Ie.location,jl=x9(Ie.location,_s,Xa&&Xa.state);jl={...jl,...t.history.encodeLocation(jl)};let Il=Xa&&Xa.replace!=null?Xa.replace:void 0,Js="PUSH";Il===!0?Js="REPLACE":Il===!1||nl!=null&&HS(nl.formMethod)&&nl.formAction===Ie.location.pathname+Ie.location.search&&(Js="REPLACE");let Vl=Xa&&"preventScrollReset"in Xa?Xa.preventScrollReset===!0:void 0,zn=(Xa&&Xa.flushSync)===!0,Ni=ba({currentLocation:zl,nextLocation:jl,historyAction:Js});if(Ni){Ss(Ni,{state:"blocked",location:jl,proceed(){Ss(Ni,{state:"proceeding",proceed:void 0,reset:void 0,location:jl}),jn(da,Xa)},reset(){let Za=new Map(Ie.blockers);Za.set(Ni,_7),Jn({blockers:Za})}});return}await Yn(Js,jl,{submission:nl,pendingError:vu,preventScrollReset:Vl,replace:Xa&&Xa.replace,enableViewTransition:Xa&&Xa.viewTransition,flushSync:zn})}function Lr(){Ir||(Ir=Yat()),bi(),Jn({revalidation:"loading"});let da=Ir.promise;return Ie.navigation.state==="submitting"?da:Ie.navigation.state==="idle"?(Yn(Ie.historyAction,Ie.location,{startUninterruptedRevalidation:!0}),da):(Yn(Ve||Ie.historyAction,Ie.navigation.location,{overrideNavigation:Ie.navigation,enableViewTransition:nt===!0}),da)}async function Yn(da,Xa,Oo){Je&&Je.abort(),Je=null,Ve=da,_t=(Oo&&Oo.startUninterruptedRevalidation)===!0,Gs(Ie.location,Ie.matches),Ze=(Oo&&Oo.preventScrollReset)===!0,nt=(Oo&&Oo.enableViewTransition)===!0;let _s=s||o,nl=Oo&&Oo.overrideNavigation,vu=Oo?.initialHydration&&Ie.matches&&Ie.matches.length>0&&!ve?Ie.matches:AP(_s,Xa,d),zl=(Oo&&Oo.flushSync)===!0;if(vu&&Ie.initialized&&!Dt&&Bat(Ie.location,Xa)&&!(Oo&&Oo.submission&&HS(Oo.submission.formMethod))){Vn(Xa,{matches:vu},{flushSync:zl});return}let jl=Hl(vu,_s,Xa.pathname);if(jl.active&&jl.matches&&(vu=jl.matches),!vu){let{error:ps,notFoundMatches:Mi,route:to}=po(Xa.pathname);Vn(Xa,{matches:Mi,loaderData:{},errors:{[to.id]:ps}},{flushSync:zl});return}Je=new AbortController;let Il=fN(t.history,Xa,Je.signal,Oo&&Oo.submission),Js=t.getContext?await t.getContext():new Z_e,Vl;if(Oo&&Oo.pendingError)Vl=[CP(vu).route.id,{type:"error",error:Oo.pendingError}];else if(Oo&&Oo.submission&&HS(Oo.submission.formMethod)){let ps=await On(Il,Xa,Oo.submission,vu,Js,jl.active,Oo&&Oo.initialHydration===!0,{replace:Oo.replace,flushSync:zl});if(ps.shortCircuited)return;if(ps.pendingActionResult){let[Mi,to]=ps.pendingActionResult;if(ZT(to)&&w9(to.error)&&to.error.status===404){Je=null,Vn(Xa,{matches:ps.matches,loaderData:{},errors:{[Mi]:to.error}});return}}vu=ps.matches||vu,Vl=ps.pendingActionResult,nl=AJ(Xa,Oo.submission),zl=!1,jl.active=!1,Il=fN(t.history,Il.url,Il.signal)}let{shortCircuited:zn,matches:Ni,loaderData:Za,errors:ts}=await Sn(Il,Xa,vu,Js,jl.active,nl,Oo&&Oo.submission,Oo&&Oo.fetcherSubmission,Oo&&Oo.replace,Oo&&Oo.initialHydration===!0,zl,Vl);zn||(Je=null,Vn(Xa,{matches:Ni||vu,...lwe(Vl),loaderData:Za,errors:ts}))}async function On(da,Xa,Oo,_s,nl,vu,zl,jl={}){bi();let Il=qat(Xa,Oo);if(Jn({navigation:Il},{flushSync:jl.flushSync===!0}),vu){let zn=await nu(_s,Xa.pathname,da.signal);if(zn.type==="aborted")return{shortCircuited:!0};if(zn.type==="error"){if(zn.partialMatches.length===0){let{matches:Za,route:ts}=VH(o);return{matches:Za,pendingActionResult:[ts.id,{type:"error",error:zn.error}]}}let Ni=CP(zn.partialMatches).route.id;return{matches:zn.partialMatches,pendingActionResult:[Ni,{type:"error",error:zn.error}]}}else if(zn.matches)_s=zn.matches;else{let{notFoundMatches:Ni,error:Za,route:ts}=po(Xa.pathname);return{matches:Ni,pendingActionResult:[ts.id,{type:"error",error:Za}]}}}let Js,Vl=Wq(_s,Xa);if(!Vl.route.action&&!Vl.route.lazy)Js={type:"error",error:I3(405,{method:da.method,pathname:Xa.pathname,routeId:Vl.route.id})};else{let zn=IN(i,a,da,_s,Vl,zl?[]:n,nl),Ni=await ti(da,zn,nl,null);if(Js=Ni[Vl.route.id],!Js){for(let Za of _s)if(Ni[Za.route.id]){Js=Ni[Za.route.id];break}}if(da.signal.aborted)return{shortCircuited:!0}}if(WD(Js)){let zn;return jl&&jl.replace!=null?zn=jl.replace:zn=iwe(Js.response.headers.get("Location"),new URL(da.url),d)===Ie.location.pathname+Ie.location.search,await va(da,Js,!0,{submission:Oo,replace:zn}),{shortCircuited:!0}}if(ZT(Js)){let zn=CP(_s,Vl.route.id);return(jl&&jl.replace)!==!0&&(Ve="PUSH"),{matches:_s,pendingActionResult:[zn.route.id,Js,Vl.route.id]}}return{matches:_s,pendingActionResult:[Vl.route.id,Js]}}async function Sn(da,Xa,Oo,_s,nl,vu,zl,jl,Il,Js,Vl,zn){let Ni=vu||AJ(Xa,zl),Za=zl||jl||cwe(Ni),ts=!_t&&!Js;if(nl){if(ts){let il=bn(zn);Jn({navigation:Ni,...il!==void 0?{actionData:il}:{}},{flushSync:Vl})}let tl=await nu(Oo,Xa.pathname,da.signal);if(tl.type==="aborted")return{shortCircuited:!0};if(tl.type==="error"){if(tl.partialMatches.length===0){let{matches:Gl,route:Qu}=VH(o);return{matches:Gl,loaderData:{},errors:{[Qu.id]:tl.error}}}let il=CP(tl.partialMatches).route.id;return{matches:tl.partialMatches,loaderData:{},errors:{[il]:tl.error}}}else if(tl.matches)Oo=tl.matches;else{let{error:il,notFoundMatches:Gl,route:Qu}=po(Xa.pathname);return{matches:Gl,loaderData:{},errors:{[Qu.id]:il}}}}let ps=s||o,{dsMatches:Mi,revalidatingFetchers:to}=Q_e(da,_s,i,a,t.history,Ie,Oo,Za,Xa,Js?[]:n,Js===!0,Dt,qt,sr,Vt,yt,ps,d,t.patchRoutesOnNavigation!=null,zn);if(Zt=++dr,!t.dataStrategy&&!Mi.some(tl=>tl.shouldLoad)&&!Mi.some(tl=>tl.route.middleware&&tl.route.middleware.length>0)&&to.length===0){let tl=Co();return Vn(Xa,{matches:Oo,loaderData:{},errors:zn&&ZT(zn[1])?{[zn[0]]:zn[1].error}:null,...lwe(zn),...tl?{fetchers:new Map(Ie.fetchers)}:{}},{flushSync:Vl}),{shortCircuited:!0}}if(ts){let tl={};if(!nl){tl.navigation=Ni;let il=bn(zn);il!==void 0&&(tl.actionData=il)}to.length>0&&(tl.fetchers=Mn(to)),Jn(tl,{flushSync:Vl})}to.forEach(tl=>{is(tl.key),tl.controller&&Lt.set(tl.key,tl.controller)});let Dn=()=>to.forEach(tl=>is(tl.key));Je&&Je.signal.addEventListener("abort",Dn);let{loaderResults:ea,fetcherResults:pa}=await Tn(Mi,to,da,_s);if(da.signal.aborted)return{shortCircuited:!0};Je&&Je.signal.removeEventListener("abort",Dn),to.forEach(tl=>Lt.delete(tl.key));let ja=qH(ea);if(ja)return await va(da,ja.result,!0,{replace:Il}),{shortCircuited:!0};if(ja=qH(pa),ja)return yt.add(ja.key),await va(da,ja.result,!0,{replace:Il}),{shortCircuited:!0};let{loaderData:_a,errors:Zs}=owe(Ie,Oo,ea,zn,to,pa);Js&&Ie.errors&&(Zs={...Ie.errors,...Zs});let ks=Co(),el=Ko(Zt),ol=ks||el||to.length>0;return{matches:Oo,loaderData:_a,errors:Zs,...ol?{fetchers:new Map(Ie.fetchers)}:{}}}function bn(da){if(da&&!ZT(da[1]))return{[da[0]]:da[1].data};if(Ie.actionData)return Object.keys(Ie.actionData).length===0?null:Ie.actionData}function Mn(da){return da.forEach(Xa=>{let Oo=Ie.fetchers.get(Xa.key),_s=w7(void 0,Oo?Oo.data:void 0);Ie.fetchers.set(Xa.key,_s)}),new Map(Ie.fetchers)}async function gi(da,Xa,Oo,_s){is(da);let nl=(_s&&_s.flushSync)===!0,vu=s||o,zl=$de(Ie.location,Ie.matches,d,Oo,Xa,_s?.relative),jl=AP(vu,zl,d),Il=Hl(jl,vu,zl);if(Il.active&&Il.matches&&(jl=Il.matches),!jl){Ei(da,Xa,I3(404,{pathname:zl}),{flushSync:nl});return}let{path:Js,submission:Vl,error:zn}=J_e(!0,zl,_s);if(zn){Ei(da,Xa,zn,{flushSync:nl});return}let Ni=t.getContext?await t.getContext():new Z_e,Za=(_s&&_s.preventScrollReset)===!0;if(Vl&&HS(Vl.formMethod)){await Oi(da,Xa,Js,jl,Ni,Il.active,nl,Za,Vl);return}Vt.set(da,{routeId:Xa,path:Js}),await Pa(da,Xa,Js,jl,Ni,Il.active,nl,Za,Vl)}async function Oi(da,Xa,Oo,_s,nl,vu,zl,jl,Il){bi(),Vt.delete(da);let Js=Ie.fetchers.get(da);Wn(da,Gat(Il,Js),{flushSync:zl});let Vl=new AbortController,zn=fN(t.history,Oo,Vl.signal,Il);if(vu){let ic=await nu(_s,new URL(zn.url).pathname,zn.signal,da);if(ic.type==="aborted")return;if(ic.type==="error"){Ei(da,Xa,ic.error,{flushSync:zl});return}else if(ic.matches)_s=ic.matches;else{Ei(da,Xa,I3(404,{pathname:Oo}),{flushSync:zl});return}}let Ni=Wq(_s,Oo);if(!Ni.route.action&&!Ni.route.lazy){let ic=I3(405,{method:Il.formMethod,pathname:Oo,routeId:Xa});Ei(da,Xa,ic,{flushSync:zl});return}Lt.set(da,Vl);let Za=dr,ts=IN(i,a,zn,_s,Ni,n,nl),Mi=(await ti(zn,ts,nl,da))[Ni.route.id];if(zn.signal.aborted){Lt.get(da)===Vl&&Lt.delete(da);return}if(sr.has(da)){if(WD(Mi)||ZT(Mi)){Wn(da,dk(void 0));return}}else{if(WD(Mi))if(Lt.delete(da),Zt>Za){Wn(da,dk(void 0));return}else return yt.add(da),Wn(da,w7(Il)),va(zn,Mi,!1,{fetcherSubmission:Il,preventScrollReset:jl});if(ZT(Mi)){Ei(da,Xa,Mi.error);return}}let to=Ie.navigation.location||Ie.location,Dn=fN(t.history,to,Vl.signal),ea=s||o,pa=Ie.navigation.state!=="idle"?AP(ea,Ie.navigation.location,d):Ie.matches;Up(pa,"Didn't find any matches after fetcher action");let ja=++dr;Cr.set(da,ja);let _a=w7(Il,Mi.data);Ie.fetchers.set(da,_a);let{dsMatches:Zs,revalidatingFetchers:ks}=Q_e(Dn,nl,i,a,t.history,Ie,pa,Il,to,n,!1,Dt,qt,sr,Vt,yt,ea,d,t.patchRoutesOnNavigation!=null,[Ni.route.id,Mi]);ks.filter(ic=>ic.key!==da).forEach(ic=>{let rf=ic.key,Sd=Ie.fetchers.get(rf),yc=w7(void 0,Sd?Sd.data:void 0);Ie.fetchers.set(rf,yc),is(rf),ic.controller&&Lt.set(rf,ic.controller)}),Jn({fetchers:new Map(Ie.fetchers)});let el=()=>ks.forEach(ic=>is(ic.key));Vl.signal.addEventListener("abort",el);let{loaderResults:ol,fetcherResults:tl}=await Tn(Zs,ks,Dn,nl);if(Vl.signal.aborted)return;if(Vl.signal.removeEventListener("abort",el),Cr.delete(da),Lt.delete(da),ks.forEach(ic=>Lt.delete(ic.key)),Ie.fetchers.has(da)){let ic=dk(Mi.data);Ie.fetchers.set(da,ic)}let il=qH(ol);if(il)return va(Dn,il.result,!1,{preventScrollReset:jl});if(il=qH(tl),il)return yt.add(il.key),va(Dn,il.result,!1,{preventScrollReset:jl});let{loaderData:Gl,errors:Qu}=owe(Ie,pa,ol,void 0,ks,tl);Ko(ja),Ie.navigation.state==="loading"&&ja>Zt?(Up(Ve,"Expected pending action"),Je&&Je.abort(),Vn(Ie.navigation.location,{matches:pa,loaderData:Gl,errors:Qu,fetchers:new Map(Ie.fetchers)})):(Jn({errors:Qu,loaderData:swe(Ie.loaderData,Gl,pa,Qu),fetchers:new Map(Ie.fetchers)}),Dt=!1)}async function Pa(da,Xa,Oo,_s,nl,vu,zl,jl,Il){let Js=Ie.fetchers.get(da);Wn(da,w7(Il,Js?Js.data:void 0),{flushSync:zl});let Vl=new AbortController,zn=fN(t.history,Oo,Vl.signal);if(vu){let to=await nu(_s,new URL(zn.url).pathname,zn.signal,da);if(to.type==="aborted")return;if(to.type==="error"){Ei(da,Xa,to.error,{flushSync:zl});return}else if(to.matches)_s=to.matches;else{Ei(da,Xa,I3(404,{pathname:Oo}),{flushSync:zl});return}}let Ni=Wq(_s,Oo);Lt.set(da,Vl);let Za=dr,ts=IN(i,a,zn,_s,Ni,n,nl),Mi=(await ti(zn,ts,nl,da))[Ni.route.id];if(Lt.get(da)===Vl&&Lt.delete(da),!zn.signal.aborted){if(sr.has(da)){Wn(da,dk(void 0));return}if(WD(Mi))if(Zt>Za){Wn(da,dk(void 0));return}else{yt.add(da),await va(zn,Mi,!1,{preventScrollReset:jl});return}if(ZT(Mi)){Ei(da,Xa,Mi.error);return}Wn(da,dk(Mi.data))}}async function va(da,Xa,Oo,{submission:_s,fetcherSubmission:nl,preventScrollReset:vu,replace:zl}={}){Xa.response.headers.has("X-Remix-Revalidate")&&(Dt=!0);let jl=Xa.response.headers.get("Location");Up(jl,"Expected a Location header on the redirect Response"),jl=iwe(jl,new URL(da.url),d);let Il=x9(Ie.location,jl,{_isRedirect:!0});if(r){let ts=!1;if(Xa.response.headers.has("X-Remix-Reload-Document"))ts=!0;else if(Mve(jl)){const ps=V7e(jl,!0);ts=ps.origin!==e.location.origin||tA(ps.pathname,d)==null}if(ts){zl?e.location.replace(jl):e.location.assign(jl);return}}Je=null;let Js=zl===!0||Xa.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Vl,formAction:zn,formEncType:Ni}=Ie.navigation;!_s&&!nl&&Vl&&zn&&Ni&&(_s=cwe(Ie.navigation));let Za=_s||nl;if(wat.has(Xa.response.status)&&Za&&HS(Za.formMethod))await Yn(Js,Il,{submission:{...Za,formAction:jl},preventScrollReset:vu||Ze,enableViewTransition:Oo?nt:void 0});else{let ts=AJ(Il,_s);await Yn(Js,Il,{overrideNavigation:ts,fetcherSubmission:nl,preventScrollReset:vu||Ze,enableViewTransition:Oo?nt:void 0})}}async function ti(da,Xa,Oo,_s){let nl,vu={};try{nl=await Dat(b,da,Xa,_s,Oo,!1)}catch(zl){return Xa.filter(jl=>jl.shouldLoad).forEach(jl=>{vu[jl.route.id]={type:"error",error:zl}}),vu}if(da.signal.aborted)return vu;for(let[zl,jl]of Object.entries(nl))if(jat(jl)){let Il=jl.result;vu[zl]={type:"redirect",response:Fat(Il,da,zl,Xa,d)}}else vu[zl]=await Nat(jl);return vu}async function Tn(da,Xa,Oo,_s){let nl=ti(Oo,da,_s,null),vu=Promise.all(Xa.map(async Il=>{if(Il.matches&&Il.match&&Il.request&&Il.controller){let Vl=(await ti(Il.request,Il.matches,_s,Il.key))[Il.match.route.id];return{[Il.key]:Vl}}else return Promise.resolve({[Il.key]:{type:"error",error:I3(404,{pathname:Il.path})}})})),zl=await nl,jl=(await vu).reduce((Il,Js)=>Object.assign(Il,Js),{});return{loaderResults:zl,fetcherResults:jl}}function bi(){Dt=!0,Vt.forEach((da,Xa)=>{Lt.has(Xa)&&qt.add(Xa),is(Xa)})}function Wn(da,Xa,Oo={}){Ie.fetchers.set(da,Xa),Jn({fetchers:new Map(Ie.fetchers)},{flushSync:(Oo&&Oo.flushSync)===!0})}function Ei(da,Xa,Oo,_s={}){let nl=CP(Ie.matches,Xa);xa(da),Jn({errors:{[nl.route.id]:Oo},fetchers:new Map(Ie.fetchers)},{flushSync:(_s&&_s.flushSync)===!0})}function Ki(da){return Er.set(da,(Er.get(da)||0)+1),sr.has(da)&&sr.delete(da),Ie.fetchers.get(da)||Sat}function sa(da,Xa){is(da,Xa?.reason),Wn(da,dk(null))}function xa(da){let Xa=Ie.fetchers.get(da);Lt.has(da)&&!(Xa&&Xa.state==="loading"&&Cr.has(da))&&is(da),Vt.delete(da),Cr.delete(da),yt.delete(da),sr.delete(da),qt.delete(da),Ie.fetchers.delete(da)}function Qa(da){let Xa=(Er.get(da)||0)-1;Xa<=0?(Er.delete(da),sr.add(da)):Er.set(da,Xa),Jn({fetchers:new Map(Ie.fetchers)})}function is(da,Xa){let Oo=Lt.get(da);Oo&&(Oo.abort(Xa),Lt.delete(da))}function go(da){for(let Xa of da){let Oo=Ki(Xa),_s=dk(Oo.data);Ie.fetchers.set(Xa,_s)}}function Co(){let da=[],Xa=!1;for(let Oo of yt){let _s=Ie.fetchers.get(Oo);Up(_s,`Expected fetcher: ${Oo}`),_s.state==="loading"&&(yt.delete(Oo),da.push(Oo),Xa=!0)}return go(da),Xa}function Ko(da){let Xa=[];for(let[Oo,_s]of Cr)if(_s<da){let nl=Ie.fetchers.get(Oo);Up(nl,`Expected fetcher: ${Oo}`),nl.state==="loading"&&(is(Oo),Cr.delete(Oo),Xa.push(Oo))}return go(Xa),Xa.length>0}function Zi(da,Xa){let Oo=Ie.blockers.get(da)||_7;return or.get(da)!==Xa&&or.set(da,Xa),Oo}function za(da){Ie.blockers.delete(da),or.delete(da)}function Ss(da,Xa){let Oo=Ie.blockers.get(da)||_7;Up(Oo.state==="unblocked"&&Xa.state==="blocked"||Oo.state==="blocked"&&Xa.state==="blocked"||Oo.state==="blocked"&&Xa.state==="proceeding"||Oo.state==="blocked"&&Xa.state==="unblocked"||Oo.state==="proceeding"&&Xa.state==="unblocked",`Invalid blocker state transition: ${Oo.state} -> ${Xa.state}`);let _s=new Map(Ie.blockers);_s.set(da,Xa),Jn({blockers:_s})}function ba({currentLocation:da,nextLocation:Xa,historyAction:Oo}){if(or.size===0)return;or.size>1&&b1(!1,"A router only supports one blocker at a time");let _s=Array.from(or.entries()),[nl,vu]=_s[_s.length-1],zl=Ie.blockers.get(nl);if(!(zl&&zl.state==="proceeding")&&vu({currentLocation:da,nextLocation:Xa,historyAction:Oo}))return nl}function po(da){let Xa=I3(404,{pathname:da}),Oo=s||o,{matches:_s,route:nl}=VH(Oo);return{notFoundMatches:_s,route:nl,error:Xa}}function Ys(da,Xa,Oo){if(X=da,de=Xa,ie=Oo||null,!ae&&Ie.navigation===EJ){ae=!0;let _s=Ns(Ie.location,Ie.matches);_s!=null&&Jn({restoreScrollPosition:_s})}return()=>{X=null,de=null,ie=null}}function $s(da,Xa){return ie&&ie(da,Xa.map(_s=>Qit(_s,Ie.loaderData)))||da.key}function Gs(da,Xa){if(X&&de){let Oo=$s(da,Xa);X[Oo]=de()}}function Ns(da,Xa){if(X){let Oo=$s(da,Xa),_s=X[Oo];if(typeof _s=="number")return _s}return null}function Hl(da,Xa,Oo){if(t.patchRoutesOnNavigation)if(da){if(Object.keys(da[0].params).length>0)return{active:!0,matches:$q(Xa,Oo,d,!0)}}else return{active:!0,matches:$q(Xa,Oo,d,!0)||[]};return{active:!1,matches:null}}async function nu(da,Xa,Oo,_s){if(!t.patchRoutesOnNavigation)return{type:"success",matches:da};let nl=da;for(;;){let vu=s==null,zl=s||o,jl=a;try{await t.patchRoutesOnNavigation({signal:Oo,path:Xa,matches:nl,fetcherKey:_s,patch:(Vl,zn)=>{Oo.aborted||ewe(Vl,zn,zl,jl,i,!1)}})}catch(Vl){return{type:"error",error:Vl,partialMatches:nl}}finally{vu&&!Oo.aborted&&(o=[...o])}if(Oo.aborted)return{type:"aborted"};let Il=AP(zl,Xa,d);if(Il)return{type:"success",matches:Il};let Js=$q(zl,Xa,d,!0);if(!Js||nl.length===Js.length&&nl.every((Vl,zn)=>Vl.route.id===Js[zn].route.id))return{type:"success",matches:null};nl=Js}}function su(da){a={},s=_9(da,i,void 0,a)}function Mc(da,Xa,Oo=!1){let _s=s==null;ewe(da,Xa,s||o,a,i,Oo),_s&&(o=[...o],Jn({}))}return Me={get basename(){return d},get future(){return L},get state(){return Ie},get routes(){return o},get window(){return e},initialize:_n,subscribe:Qn,enableScrollRestoration:Ys,navigate:jn,fetch:gi,revalidate:Lr,createHref:da=>t.history.createHref(da),encodeLocation:da=>t.history.encodeLocation(da),getFetcher:Ki,resetFetcher:sa,deleteFetcher:Qa,dispose:Un,getBlocker:Zi,deleteBlocker:za,patchRoutes:Mc,_internalFetchControllers:Lt,_internalSetRoutes:su,_internalSetStateDoNotUseOrYouWillBreakYourApp(da){Jn(da)}},Me}function Cat(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function $de(t,e,r,n,i,a){let o,s;if(i){o=[];for(let b of e)if(o.push(b),b.route.id===i){s=b;break}}else o=e,s=e[e.length-1];let d=$W(n||".",GW(o),tA(t.pathname,r)||t.pathname,a==="path");if(n==null&&(d.search=t.search,d.hash=t.hash),(n==null||n===""||n===".")&&s){let b=kve(d.search);if(s.route.index&&!b)d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index";else if(!s.route.index&&b){let L=new URLSearchParams(d.search),B=L.getAll("index");L.delete("index"),B.filter(X=>X).forEach(X=>L.append("index",X));let V=L.toString();d.search=V?`?${V}`:""}}return r!=="/"&&(d.pathname=dat({basename:r,pathname:d.pathname})),WP(d)}function J_e(t,e,r){if(!r||!Cat(r))return{path:e};if(r.formMethod&&!Vat(r.formMethod))return{path:e,error:I3(405,{method:r.formMethod})};let n=()=>({path:e,error:I3(400,{type:"invalid-body"})}),a=(r.formMethod||"get").toUpperCase(),o=tze(e);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!HS(a))return n();let B=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((V,[X,ie])=>`${V}${X}=${ie}
`,""):String(r.body);return{path:e,submission:{formMethod:a,formAction:o,formEncType:r.formEncType,formData:void 0,json:void 0,text:B}}}else if(r.formEncType==="application/json"){if(!HS(a))return n();try{let B=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:e,submission:{formMethod:a,formAction:o,formEncType:r.formEncType,formData:void 0,json:B,text:void 0}}}catch{return n()}}}Up(typeof FormData=="function","FormData is not available in this environment");let s,d;if(r.formData)s=Xde(r.formData),d=r.formData;else if(r.body instanceof FormData)s=Xde(r.body),d=r.body;else if(r.body instanceof URLSearchParams)s=r.body,d=awe(s);else if(r.body==null)s=new URLSearchParams,d=new FormData;else try{s=new URLSearchParams(r.body),d=awe(s)}catch{return n()}let b={formMethod:a,formAction:o,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:d,json:void 0,text:void 0};if(HS(b.formMethod))return{path:e,submission:b};let L=u4(e);return t&&L.search&&kve(L.search)&&s.append("index",""),L.search=`?${s}`,{path:WP(L),submission:b}}function Q_e(t,e,r,n,i,a,o,s,d,b,L,B,V,X,ie,de,ae,U,ve,Se){let Pe=Se?ZT(Se[1])?Se[1].error:Se[1].data:void 0,Me=i.createURL(a.location),Ie=i.createURL(d),Ve;if(L&&a.errors){let _t=Object.keys(a.errors)[0];Ve=o.findIndex(Dt=>Dt.route.id===_t)}else if(Se&&ZT(Se[1])){let _t=Se[0];Ve=o.findIndex(Dt=>Dt.route.id===_t)-1}let Ze=Se?Se[1].statusCode:void 0,Je=Ze&&Ze>=400,nt={currentUrl:Me,currentParams:a.matches[0]?.params||{},nextUrl:Ie,nextParams:o[0].params,...s,actionResult:Pe,actionStatus:Ze},ut=o.map((_t,Dt)=>{let{route:qt}=_t,Lt=null;if(Ve!=null&&Dt>Ve?Lt=!1:qt.lazy?Lt=!0:Rve(qt)?L?Lt=Wde(qt,a.loaderData,a.errors):Mat(a.loaderData,a.matches[Dt],_t)&&(Lt=!0):Lt=!1,Lt!==null)return Yde(r,n,t,_t,b,e,Lt);let dr=Je?!1:B||Me.pathname+Me.search===Ie.pathname+Ie.search||Me.search!==Ie.search||Rat(a.matches[Dt],_t),Zt={...nt,defaultShouldRevalidate:dr},Cr=$G(_t,Zt);return Yde(r,n,t,_t,b,e,Cr,Zt)}),ht=[];return ie.forEach((_t,Dt)=>{if(L||!o.some(Er=>Er.route.id===_t.routeId)||X.has(Dt))return;let qt=a.fetchers.get(Dt),Lt=qt&&qt.state!=="idle"&&qt.data===void 0,dr=AP(ae,_t.path,U);if(!dr){if(ve&&Lt)return;ht.push({key:Dt,routeId:_t.routeId,path:_t.path,matches:null,match:null,request:null,controller:null});return}if(de.has(Dt))return;let Zt=Wq(dr,_t.path),Cr=new AbortController,yt=fN(i,_t.path,Cr.signal),Vt=null;if(V.has(Dt))V.delete(Dt),Vt=IN(r,n,yt,dr,Zt,b,e);else if(Lt)B&&(Vt=IN(r,n,yt,dr,Zt,b,e));else{let Er={...nt,defaultShouldRevalidate:Je?!1:B};$G(Zt,Er)&&(Vt=IN(r,n,yt,dr,Zt,b,e,Er))}Vt&&ht.push({key:Dt,routeId:_t.routeId,path:_t.path,matches:Vt,match:Zt,request:yt,controller:Cr})}),{dsMatches:ut,revalidatingFetchers:ht}}function Rve(t){return t.loader!=null||t.middleware!=null&&t.middleware.length>0}function Wde(t,e,r){if(t.lazy)return!0;if(!Rve(t))return!1;let n=e!=null&&t.id in e,i=r!=null&&r[t.id]!==void 0;return!n&&i?!1:typeof t.loader=="function"&&t.loader.hydrate===!0?!0:!n&&!i}function Mat(t,e,r){let n=!e||r.route.id!==e.route.id,i=!t.hasOwnProperty(r.route.id);return n||i}function Rat(t,e){let r=t.route.path;return t.pathname!==e.pathname||r!=null&&r.endsWith("*")&&t.params["*"]!==e.params["*"]}function $G(t,e){if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate(e);if(typeof r=="boolean")return r}return e.defaultShouldRevalidate}function ewe(t,e,r,n,i,a){let o;if(t){let b=n[t];Up(b,`No route found to patch children into: routeId = ${t}`),b.children||(b.children=[]),o=b.children}else o=r;let s=[],d=[];if(e.forEach(b=>{let L=o.find(B=>Z7e(b,B));L?d.push({existingRoute:L,newRoute:b}):s.push(b)}),s.length>0){let b=_9(s,i,[t||"_","patch",String(o?.length||"0")],n);o.push(...b)}if(a&&d.length>0)for(let b=0;b<d.length;b++){let{existingRoute:L,newRoute:B}=d[b],V=L,[X]=_9([B],i,[],{},!0);Object.assign(V,{element:X.element?X.element:V.element,errorElement:X.errorElement?X.errorElement:V.errorElement,hydrateFallbackElement:X.hydrateFallbackElement?X.hydrateFallbackElement:V.hydrateFallbackElement})}}function Z7e(t,e){return"id"in t&&"id"in e&&t.id===e.id?!0:t.index===e.index&&t.path===e.path&&t.caseSensitive===e.caseSensitive?(!t.children||t.children.length===0)&&(!e.children||e.children.length===0)?!0:t.children.every((r,n)=>e.children?.some(i=>Z7e(r,i))):!1}var twe=new WeakMap,K7e=({key:t,route:e,manifest:r,mapRouteProperties:n})=>{let i=r[e.id];if(Up(i,"No route found in manifest"),!i.lazy||typeof i.lazy!="object")return;let a=i.lazy[t];if(!a)return;let o=twe.get(i);o||(o={},twe.set(i,o));let s=o[t];if(s)return s;let d=(async()=>{let b=Xit(t),B=i[t]!==void 0&&t!=="hasErrorBoundary";if(b)b1(!b,"Route property "+t+" is not a supported lazy route property. This property will be ignored."),o[t]=Promise.resolve();else if(B)b1(!1,`Route "${i.id}" has a static property "${t}" defined. The lazy property will be ignored.`);else{let V=await a();V!=null&&(Object.assign(i,{[t]:V}),Object.assign(i,n(i)))}typeof i.lazy=="object"&&(i.lazy[t]=void 0,Object.values(i.lazy).every(V=>V===void 0)&&(i.lazy=void 0))})();return o[t]=d,d},rwe=new WeakMap;function kat(t,e,r,n,i){let a=r[t.id];if(Up(a,"No route found in manifest"),!t.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof t.lazy=="function"){let L=rwe.get(a);if(L)return{lazyRoutePromise:L,lazyHandlerPromise:L};let B=(async()=>{Up(typeof t.lazy=="function","No lazy route function found");let V=await t.lazy(),X={};for(let ie in V){let de=V[ie];if(de===void 0)continue;let ae=Kit(ie),ve=a[ie]!==void 0&&ie!=="hasErrorBoundary";ae?b1(!ae,"Route property "+ie+" is not a supported property to be returned from a lazy route function. This property will be ignored."):ve?b1(!ve,`Route "${a.id}" has a static property "${ie}" defined but its lazy function is also returning a value for this property. The lazy route property "${ie}" will be ignored.`):X[ie]=de}Object.assign(a,X),Object.assign(a,{...n(a),lazy:void 0})})();return rwe.set(a,B),B.catch(()=>{}),{lazyRoutePromise:B,lazyHandlerPromise:B}}let o=Object.keys(t.lazy),s=[],d;for(let L of o){if(i&&i.includes(L))continue;let B=K7e({key:L,route:t,manifest:r,mapRouteProperties:n});B&&(s.push(B),L===e&&(d=B))}let b=s.length>0?Promise.all(s).then(()=>{}):void 0;return b?.catch(()=>{}),d?.catch(()=>{}),{lazyRoutePromise:b,lazyHandlerPromise:d}}async function nwe(t){let e=t.matches.filter(i=>i.shouldLoad),r={};return(await Promise.all(e.map(i=>i.resolve()))).forEach((i,a)=>{r[e[a].route.id]=i}),r}async function Iat(t){return t.matches.some(e=>e.route.middleware)?J7e(t,()=>nwe(t)):nwe(t)}function J7e(t,e){return Pat(t,e,n=>n,Uat,r);function r(n,i,a){if(a)return Promise.resolve(Object.assign(a.value,{[i]:{type:"error",result:n}}));{let{matches:o}=t,s=Math.min(Math.max(o.findIndex(b=>b.route.id===i),0),Math.max(o.findIndex(b=>b.unstable_shouldCallHandler()),0)),d=CP(o,o[s].route.id).route.id;return Promise.resolve({[d]:{type:"error",result:n}})}}}async function Pat(t,e,r,n,i){let{matches:a,request:o,params:s,context:d}=t,b=a.flatMap(B=>B.route.middleware?B.route.middleware.map(V=>[B.route.id,V]):[]);return await Q7e({request:o,params:s,context:d},b,e,r,n,i)}async function Q7e(t,e,r,n,i,a,o=0){let{request:s}=t;if(s.signal.aborted)throw s.signal.reason??new Error(`Request aborted: ${s.method} ${s.url}`);let d=e[o];if(!d)return await r();let[b,L]=d,B,V=async()=>{if(B)throw new Error("You may only call `next()` once per middleware");try{return B={value:await Q7e(t,e,r,n,i,a,o+1)},B.value}catch(X){return B={value:await a(X,b,B)},B.value}};try{let X=await L(t,V),ie=X!=null?n(X):void 0;return i(ie)?ie:B?ie??B.value:(B={value:await V()},B.value)}catch(X){return await a(X,b,B)}}function eze(t,e,r,n,i){let a=K7e({key:"middleware",route:n.route,manifest:e,mapRouteProperties:t}),o=kat(n.route,HS(r.method)?"action":"loader",e,t,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function Yde(t,e,r,n,i,a,o,s=null){let d=!1,b=eze(t,e,r,n,i);return{...n,_lazyPromises:b,shouldLoad:o,unstable_shouldRevalidateArgs:s,unstable_shouldCallHandler(L){return d=!0,s?typeof L=="boolean"?$G(n,{...s,defaultShouldRevalidate:L}):$G(n,s):o},resolve(L){return d||o||L&&!HS(r.method)&&(n.route.lazy||n.route.loader)?Lat({request:r,match:n,lazyHandlerPromise:b?.handler,lazyRoutePromise:b?.route,handlerOverride:L,scopedContext:a}):Promise.resolve({type:"data",result:void 0})}}}function IN(t,e,r,n,i,a,o,s=null){return n.map(d=>d.route.id!==i.route.id?{...d,shouldLoad:!1,unstable_shouldRevalidateArgs:s,unstable_shouldCallHandler:()=>!1,_lazyPromises:eze(t,e,r,d,a),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Yde(t,e,r,d,a,o,!0,s))}async function Dat(t,e,r,n,i,a){r.some(b=>b._lazyPromises?.middleware)&&await Promise.all(r.map(b=>b._lazyPromises?.middleware));let o={request:e,params:r[0].params,context:i,matches:r},d=await t({...o,fetcherKey:n,runClientMiddleware:b=>{let L=o;return J7e(L,()=>b({...L,fetcherKey:n,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(r.flatMap(b=>[b._lazyPromises?.handler,b._lazyPromises?.route]))}catch{}return d}async function Lat({request:t,match:e,lazyHandlerPromise:r,lazyRoutePromise:n,handlerOverride:i,scopedContext:a}){let o,s,d=HS(t.method),b=d?"action":"loader",L=B=>{let V,X=new Promise((ae,U)=>V=U);s=()=>V(),t.signal.addEventListener("abort",s);let ie=ae=>typeof B!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${b}" [routeId: ${e.route.id}]`)):B({request:t,params:e.params,context:a},...ae!==void 0?[ae]:[]),de=(async()=>{try{return{type:"data",result:await(i?i(U=>ie(U)):ie())}}catch(ae){return{type:"error",result:ae}}})();return Promise.race([de,X])};try{let B=d?e.route.action:e.route.loader;if(r||n)if(B){let V,[X]=await Promise.all([L(B).catch(ie=>{V=ie}),r,n]);if(V!==void 0)throw V;o=X}else{await r;let V=d?e.route.action:e.route.loader;if(V)[o]=await Promise.all([L(V),n]);else if(b==="action"){let X=new URL(t.url),ie=X.pathname+X.search;throw I3(405,{method:t.method,pathname:ie,routeId:e.route.id})}else return{type:"data",result:void 0}}else if(B)o=await L(B);else{let V=new URL(t.url),X=V.pathname+V.search;throw I3(404,{pathname:X})}}catch(B){return{type:"error",result:B}}finally{s&&t.signal.removeEventListener("abort",s)}return o}async function Oat(t){let e=t.headers.get("Content-Type");return e&&/\bapplication\/json\b/.test(e)?t.body==null?null:t.json():t.text()}async function Nat(t){let{result:e,type:r}=t;if(rze(e)){let n;try{n=await Oat(e)}catch(i){return{type:"error",error:i}}return r==="error"?{type:"error",error:new GG(e.status,e.statusText,n),statusCode:e.status,headers:e.headers}:{type:"data",data:n,statusCode:e.status,headers:e.headers}}return r==="error"?uwe(e)?e.data instanceof Error?{type:"error",error:e.data,statusCode:e.init?.status,headers:e.init?.headers?new Headers(e.init.headers):void 0}:{type:"error",error:new GG(e.init?.status||500,void 0,e.data),statusCode:w9(e)?e.status:void 0,headers:e.init?.headers?new Headers(e.init.headers):void 0}:{type:"error",error:e,statusCode:w9(e)?e.status:void 0}:uwe(e)?{type:"data",data:e.data,statusCode:e.init?.status,headers:e.init?.headers?new Headers(e.init.headers):void 0}:{type:"data",data:e}}function Fat(t,e,r,n,i){let a=t.headers.get("Location");if(Up(a,"Redirects returned/thrown from loaders/actions must have a Location header"),!Mve(a)){let o=n.slice(0,n.findIndex(s=>s.route.id===r)+1);a=$de(new URL(e.url),o,i,a),t.headers.set("Location",a)}return t}function iwe(t,e,r){if(Mve(t)){let n=t,i=n.startsWith("//")?new URL(e.protocol+n):new URL(n),a=tA(i.pathname,r)!=null;if(i.origin===e.origin&&a)return i.pathname+i.search+i.hash}return t}function fN(t,e,r,n){let i=t.createURL(tze(e)).toString(),a={signal:r};if(n&&HS(n.formMethod)){let{formMethod:o,formEncType:s}=n;a.method=o.toUpperCase(),s==="application/json"?(a.headers=new Headers({"Content-Type":s}),a.body=JSON.stringify(n.json)):s==="text/plain"?a.body=n.text:s==="application/x-www-form-urlencoded"&&n.formData?a.body=Xde(n.formData):a.body=n.formData}return new Request(i,a)}function Xde(t){let e=new URLSearchParams;for(let[r,n]of t.entries())e.append(r,typeof n=="string"?n:n.name);return e}function awe(t){let e=new FormData;for(let[r,n]of t.entries())e.append(r,n);return e}function zat(t,e,r,n=!1,i=!1){let a={},o=null,s,d=!1,b={},L=r&&ZT(r[1])?r[1].error:void 0;return t.forEach(B=>{if(!(B.route.id in e))return;let V=B.route.id,X=e[V];if(Up(!WD(X),"Cannot handle redirect results in processLoaderData"),ZT(X)){let ie=X.error;if(L!==void 0&&(ie=L,L=void 0),o=o||{},i)o[V]=ie;else{let de=CP(t,V);o[de.route.id]==null&&(o[de.route.id]=ie)}n||(a[V]=X7e),d||(d=!0,s=w9(X.error)?X.error.status:500),X.headers&&(b[V]=X.headers)}else a[V]=X.data,X.statusCode&&X.statusCode!==200&&!d&&(s=X.statusCode),X.headers&&(b[V]=X.headers)}),L!==void 0&&r&&(o={[r[0]]:L},r[2]&&(a[r[2]]=void 0)),{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:b}}function owe(t,e,r,n,i,a){let{loaderData:o,errors:s}=zat(e,r,n);return i.filter(d=>!d.matches||d.matches.some(b=>b.shouldLoad)).forEach(d=>{let{key:b,match:L,controller:B}=d;if(B&&B.signal.aborted)return;let V=a[b];if(Up(V,"Did not find corresponding fetcher result"),ZT(V)){let X=CP(t.matches,L?.route.id);s&&s[X.route.id]||(s={...s,[X.route.id]:V.error}),t.fetchers.delete(b)}else if(WD(V))Up(!1,"Unhandled fetcher revalidation redirect");else{let X=dk(V.data);t.fetchers.set(b,X)}}),{loaderData:o,errors:s}}function swe(t,e,r,n){let i=Object.entries(e).filter(([,a])=>a!==X7e).reduce((a,[o,s])=>(a[o]=s,a),{});for(let a of r){let o=a.route.id;if(!e.hasOwnProperty(o)&&t.hasOwnProperty(o)&&a.route.loader&&(i[o]=t[o]),n&&n.hasOwnProperty(o))break}return i}function lwe(t){return t?ZT(t[1])?{actionData:{}}:{actionData:{[t[0]]:t[1].data}}:{}}function CP(t,e){return(e?t.slice(0,t.findIndex(n=>n.route.id===e)+1):[...t]).reverse().find(n=>n.route.hasErrorBoundary===!0)||t[0]}function VH(t){let e=t.length===1?t[0]:t.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function I3(t,{pathname:e,routeId:r,method:n,type:i,message:a}={}){let o="Unknown Server Error",s="Unknown @remix-run/router error";return t===400?(o="Bad Request",n&&e&&r?s=`You made a ${n} request to "${e}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:i==="invalid-body"&&(s="Unable to encode submission body")):t===403?(o="Forbidden",s=`Route "${r}" does not match URL "${e}"`):t===404?(o="Not Found",s=`No route matches URL "${e}"`):t===405&&(o="Method Not Allowed",n&&e&&r?s=`You made a ${n.toUpperCase()} request to "${e}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:n&&(s=`Invalid request method "${n.toUpperCase()}"`)),new GG(t||500,o,new Error(s),!0)}function qH(t){let e=Object.entries(t);for(let r=e.length-1;r>=0;r--){let[n,i]=e[r];if(WD(i))return{key:n,result:i}}}function tze(t){let e=typeof t=="string"?u4(t):t;return WP({...e,hash:""})}function Bat(t,e){return t.pathname!==e.pathname||t.search!==e.search?!1:t.hash===""?e.hash!=="":t.hash===e.hash?!0:e.hash!==""}function Uat(t){return t!=null&&typeof t=="object"&&Object.entries(t).every(([e,r])=>typeof e=="string"&&Hat(r))}function Hat(t){return t!=null&&typeof t=="object"&&"type"in t&&"result"in t&&(t.type==="data"||t.type==="error")}function jat(t){return rze(t.result)&&_at.has(t.result.status)}function ZT(t){return t.type==="error"}function WD(t){return(t&&t.type)==="redirect"}function uwe(t){return typeof t=="object"&&t!=null&&"type"in t&&"data"in t&&"init"in t&&t.type==="DataWithResponseInit"}function rze(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function Vat(t){return xat.has(t.toUpperCase())}function HS(t){return yat.has(t.toUpperCase())}function kve(t){return new URLSearchParams(t).getAll("index").some(e=>e==="")}function Wq(t,e){let r=typeof e=="string"?u4(e).search:e.search;if(t[t.length-1].route.index&&kve(r||""))return t[t.length-1];let n=$7e(t);return n[n.length-1]}function cwe(t){let{formMethod:e,formAction:r,formEncType:n,text:i,formData:a,json:o}=t;if(!(!e||!r||!n)){if(i!=null)return{formMethod:e,formAction:r,formEncType:n,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:e,formAction:r,formEncType:n,formData:a,json:void 0,text:void 0};if(o!==void 0)return{formMethod:e,formAction:r,formEncType:n,formData:void 0,json:o,text:void 0}}}function AJ(t,e){return e?{state:"loading",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function qat(t,e){return{state:"submitting",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function w7(t,e){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Gat(t,e){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e?e.data:void 0}}function dk(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function $at(t,e){try{let r=t.sessionStorage.getItem(Y7e);if(r){let n=JSON.parse(r);for(let[i,a]of Object.entries(n||{}))a&&Array.isArray(a)&&e.set(i,new Set(a||[]))}}catch{}}function Wat(t,e){if(e.size>0){let r={};for(let[n,i]of e)r[n]=[...i];try{t.sessionStorage.setItem(Y7e,JSON.stringify(r))}catch(n){b1(!1,`Failed to save applied view transitions in sessionStorage (${n}).`)}}}function Yat(){let t,e,r=new Promise((n,i)=>{t=async a=>{n(a);try{await r}catch{}},e=async a=>{i(a);try{await r}catch{}}});return{promise:r,resolve:t,reject:e}}var UL=ze.createContext(null);UL.displayName="DataRouter";var gB=ze.createContext(null);gB.displayName="DataRouterState";ze.createContext(!1);var Ive=ze.createContext({isTransitioning:!1});Ive.displayName="ViewTransition";var nze=ze.createContext(new Map);nze.displayName="Fetchers";var Xat=ze.createContext(null);Xat.displayName="Await";var QC=ze.createContext(null);QC.displayName="Navigation";var WW=ze.createContext(null);WW.displayName="Location";var eM=ze.createContext({outlet:null,matches:[],isDataRoute:!1});eM.displayName="Route";var Pve=ze.createContext(null);Pve.displayName="RouteError";function Zat(t,{relative:e}={}){Up(M8(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=ze.useContext(QC),{hash:i,pathname:a,search:o}=yB(t,{relative:e}),s=a;return r!=="/"&&(s=a==="/"?r:R5([r,a])),n.createHref({pathname:s,search:o,hash:i})}function M8(){return ze.useContext(WW)!=null}function Bk(){return Up(M8(),"useLocation() may be used only in the context of a <Router> component."),ze.useContext(WW).location}var ize="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function aze(t){ze.useContext(QC).static||ze.useLayoutEffect(t)}function c4(){let{isDataRoute:t}=ze.useContext(eM);return t?uot():Kat()}function Kat(){Up(M8(),"useNavigate() may be used only in the context of a <Router> component.");let t=ze.useContext(UL),{basename:e,navigator:r}=ze.useContext(QC),{matches:n}=ze.useContext(eM),{pathname:i}=Bk(),a=JSON.stringify(GW(n)),o=ze.useRef(!1);return aze(()=>{o.current=!0}),ze.useCallback((d,b={})=>{if(b1(o.current,ize),!o.current)return;if(typeof d=="number"){r.go(d);return}let L=$W(d,JSON.parse(a),i,b.relative==="path");t==null&&e!=="/"&&(L.pathname=L.pathname==="/"?e:R5([e,L.pathname])),(b.replace?r.replace:r.push)(L,b.state,b)},[e,r,a,i,t])}ze.createContext(null);function R8(){let{matches:t}=ze.useContext(eM),e=t[t.length-1];return e?e.params:{}}function yB(t,{relative:e}={}){let{matches:r}=ze.useContext(eM),{pathname:n}=Bk(),i=JSON.stringify(GW(r));return ze.useMemo(()=>$W(t,JSON.parse(i),n,e==="path"),[t,i,n,e])}function Jat(t,e,r,n,i){Up(M8(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=ze.useContext(QC),{matches:o}=ze.useContext(eM),s=o[o.length-1],d=s?s.params:{},b=s?s.pathname:"/",L=s?s.pathnameBase:"/",B=s&&s.route;{let ve=B&&B.path||"";oze(b,!B||ve.endsWith("*")||ve.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${b}" (under <Route path="${ve}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.

Please change the parent <Route path="${ve}"> to <Route path="${ve==="/"?"*":`${ve}/*`}">.`)}let V=Bk(),X;X=V;let ie=X.pathname||"/",de=ie;if(L!=="/"){let ve=L.replace(/^\//,"").split("/");de="/"+ie.replace(/^\//,"").split("/").slice(ve.length).join("/")}let ae=AP(t,{pathname:de});return b1(B||ae!=null,`No routes matched location "${X.pathname}${X.search}${X.hash}" `),b1(ae==null||ae[ae.length-1].route.element!==void 0||ae[ae.length-1].route.Component!==void 0||ae[ae.length-1].route.lazy!==void 0,`Matched leaf route at location "${X.pathname}${X.search}${X.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),not(ae&&ae.map(ve=>Object.assign({},ve,{params:Object.assign({},d,ve.params),pathname:R5([L,a.encodeLocation?a.encodeLocation(ve.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:ve.pathname]),pathnameBase:ve.pathnameBase==="/"?L:R5([L,a.encodeLocation?a.encodeLocation(ve.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:ve.pathnameBase])})),o,r,n,i)}function Qat(){let t=lot(),e=w9(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,n="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:n},a={padding:"2px 4px",backgroundColor:n},o=null;return console.error("Error handled by React Router default ErrorBoundary:",t),o=ze.createElement(ze.Fragment,null,ze.createElement("p",null,"💿 Hey developer 👋"),ze.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",ze.createElement("code",{style:a},"ErrorBoundary")," or"," ",ze.createElement("code",{style:a},"errorElement")," prop on your route.")),ze.createElement(ze.Fragment,null,ze.createElement("h2",null,"Unexpected Application Error!"),ze.createElement("h3",{style:{fontStyle:"italic"}},e),r?ze.createElement("pre",{style:i},r):null,o)}var eot=ze.createElement(Qat,null),tot=class extends ze.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||e.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){this.props.unstable_onError?this.props.unstable_onError(t,e):console.error("React Router caught the following error during render",t)}render(){return this.state.error!==void 0?ze.createElement(eM.Provider,{value:this.props.routeContext},ze.createElement(Pve.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function rot({routeContext:t,match:e,children:r}){let n=ze.useContext(UL);return n&&n.static&&n.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=e.route.id),ze.createElement(eM.Provider,{value:t},r)}function not(t,e=[],r=null,n=null,i=null){if(t==null){if(!r)return null;if(r.errors)t=r.matches;else if(e.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let a=t,o=r?.errors;if(o!=null){let b=a.findIndex(L=>L.route.id&&o?.[L.route.id]!==void 0);Up(b>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),a=a.slice(0,Math.min(a.length,b+1))}let s=!1,d=-1;if(r)for(let b=0;b<a.length;b++){let L=a[b];if((L.route.HydrateFallback||L.route.hydrateFallbackElement)&&(d=b),L.route.id){let{loaderData:B,errors:V}=r,X=L.route.loader&&!B.hasOwnProperty(L.route.id)&&(!V||V[L.route.id]===void 0);if(L.route.lazy||X){s=!0,d>=0?a=a.slice(0,d+1):a=[a[0]];break}}}return a.reduceRight((b,L,B)=>{let V,X=!1,ie=null,de=null;r&&(V=o&&L.route.id?o[L.route.id]:void 0,ie=L.route.errorElement||eot,s&&(d<0&&B===0?(oze("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),X=!0,de=null):d===B&&(X=!0,de=L.route.hydrateFallbackElement||null)));let ae=e.concat(a.slice(0,B+1)),U=()=>{let ve;return V?ve=ie:X?ve=de:L.route.Component?ve=ze.createElement(L.route.Component,null):L.route.element?ve=L.route.element:ve=b,ze.createElement(rot,{match:L,routeContext:{outlet:b,matches:ae,isDataRoute:r!=null},children:ve})};return r&&(L.route.ErrorBoundary||L.route.errorElement||B===0)?ze.createElement(tot,{location:r.location,revalidation:r.revalidation,component:ie,error:V,children:U(),routeContext:{outlet:null,matches:ae,isDataRoute:!0},unstable_onError:n}):U()},null)}function Dve(t){return`${t} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function iot(t){let e=ze.useContext(UL);return Up(e,Dve(t)),e}function aot(t){let e=ze.useContext(gB);return Up(e,Dve(t)),e}function oot(t){let e=ze.useContext(eM);return Up(e,Dve(t)),e}function Lve(t){let e=oot(t),r=e.matches[e.matches.length-1];return Up(r.route.id,`${t} can only be used on routes that contain a unique "id"`),r.route.id}function sot(){return Lve("useRouteId")}function lot(){let t=ze.useContext(Pve),e=aot("useRouteError"),r=Lve("useRouteError");return t!==void 0?t:e.errors?.[r]}function uot(){let{router:t}=iot("useNavigate"),e=Lve("useNavigate"),r=ze.useRef(!1);return aze(()=>{r.current=!0}),ze.useCallback(async(i,a={})=>{b1(r.current,ize),r.current&&(typeof i=="number"?t.navigate(i):await t.navigate(i,{fromRouteId:e,...a}))},[t,e])}var fwe={};function oze(t,e,r){!e&&!fwe[t]&&(fwe[t]=!0,b1(!1,r))}var dwe={};function hwe(t,e){!t&&!dwe[e]&&(dwe[e]=!0,console.warn(e))}function cot(t){let e={hasErrorBoundary:t.hasErrorBoundary||t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&(t.element&&b1(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(e,{element:ze.createElement(t.Component),Component:void 0})),t.HydrateFallback&&(t.hydrateFallbackElement&&b1(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(e,{hydrateFallbackElement:ze.createElement(t.HydrateFallback),HydrateFallback:void 0})),t.ErrorBoundary&&(t.errorElement&&b1(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(e,{errorElement:ze.createElement(t.ErrorBoundary),ErrorBoundary:void 0})),e}var fot=["HydrateFallback","hydrateFallbackElement"],dot=class{constructor(){this.status="pending",this.promise=new Promise((t,e)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",e(r))}})}};function hot({router:t,flushSync:e,unstable_onError:r}){let[n,i]=ze.useState(t.state),[a,o]=ze.useState(),[s,d]=ze.useState({isTransitioning:!1}),[b,L]=ze.useState(),[B,V]=ze.useState(),[X,ie]=ze.useState(),de=ze.useRef(new Map),ae=ze.useCallback(Me=>{i(Ie=>(Me.errors&&r&&Object.entries(Me.errors).forEach(([Ve,Ze])=>{Ie.errors?.[Ve]!==Ze&&r(Ze)}),Me))},[r]),U=ze.useCallback((Me,{deletedFetchers:Ie,flushSync:Ve,viewTransitionOpts:Ze})=>{Me.fetchers.forEach((nt,ut)=>{nt.data!==void 0&&de.current.set(ut,nt.data)}),Ie.forEach(nt=>de.current.delete(nt)),hwe(Ve===!1||e!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable.  Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let Je=t.window!=null&&t.window.document!=null&&typeof t.window.document.startViewTransition=="function";if(hwe(Ze==null||Je,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!Ze||!Je){e&&Ve?e(()=>ae(Me)):ze.startTransition(()=>ae(Me));return}if(e&&Ve){e(()=>{B&&(b&&b.resolve(),B.skipTransition()),d({isTransitioning:!0,flushSync:!0,currentLocation:Ze.currentLocation,nextLocation:Ze.nextLocation})});let nt=t.window.document.startViewTransition(()=>{e(()=>ae(Me))});nt.finished.finally(()=>{e(()=>{L(void 0),V(void 0),o(void 0),d({isTransitioning:!1})})}),e(()=>V(nt));return}B?(b&&b.resolve(),B.skipTransition(),ie({state:Me,currentLocation:Ze.currentLocation,nextLocation:Ze.nextLocation})):(o(Me),d({isTransitioning:!0,flushSync:!1,currentLocation:Ze.currentLocation,nextLocation:Ze.nextLocation}))},[t.window,e,B,b,ae]);ze.useLayoutEffect(()=>t.subscribe(U),[t,U]),ze.useEffect(()=>{s.isTransitioning&&!s.flushSync&&L(new dot)},[s]),ze.useEffect(()=>{if(b&&a&&t.window){let Me=a,Ie=b.promise,Ve=t.window.document.startViewTransition(async()=>{ze.startTransition(()=>ae(Me)),await Ie});Ve.finished.finally(()=>{L(void 0),V(void 0),o(void 0),d({isTransitioning:!1})}),V(Ve)}},[a,b,t.window,ae]),ze.useEffect(()=>{b&&a&&n.location.key===a.location.key&&b.resolve()},[b,B,n.location,a]),ze.useEffect(()=>{!s.isTransitioning&&X&&(o(X.state),d({isTransitioning:!0,flushSync:!1,currentLocation:X.currentLocation,nextLocation:X.nextLocation}),ie(void 0))},[s.isTransitioning,X]);let ve=ze.useMemo(()=>({createHref:t.createHref,encodeLocation:t.encodeLocation,go:Me=>t.navigate(Me),push:(Me,Ie,Ve)=>t.navigate(Me,{state:Ie,preventScrollReset:Ve?.preventScrollReset}),replace:(Me,Ie,Ve)=>t.navigate(Me,{replace:!0,state:Ie,preventScrollReset:Ve?.preventScrollReset})}),[t]),Se=t.basename||"/",Pe=ze.useMemo(()=>({router:t,navigator:ve,static:!1,basename:Se,unstable_onError:r}),[t,ve,Se,r]);return ze.createElement(ze.Fragment,null,ze.createElement(UL.Provider,{value:Pe},ze.createElement(gB.Provider,{value:n},ze.createElement(nze.Provider,{value:de.current},ze.createElement(Ive.Provider,{value:s},ze.createElement(mot,{basename:Se,location:n.location,navigationType:n.historyAction,navigator:ve},ze.createElement(pot,{routes:t.routes,future:t.future,state:n,unstable_onError:r})))))),null)}var pot=ze.memo(vot);function vot({routes:t,future:e,state:r,unstable_onError:n}){return Jat(t,void 0,r,n,e)}function sze({to:t,replace:e,state:r,relative:n}){Up(M8(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=ze.useContext(QC);b1(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:a}=ze.useContext(eM),{pathname:o}=Bk(),s=c4(),d=$W(t,GW(a),o,n==="path"),b=JSON.stringify(d);return ze.useEffect(()=>{s(JSON.parse(b),{replace:e,state:r,relative:n})},[s,b,n,e,r]),null}function mot({basename:t="/",children:e=null,location:r,navigationType:n="POP",navigator:i,static:a=!1}){Up(!M8(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let o=t.replace(/^\/*/,"/"),s=ze.useMemo(()=>({basename:o,navigator:i,static:a,future:{}}),[o,i,a]);typeof r=="string"&&(r=u4(r));let{pathname:d="/",search:b="",hash:L="",state:B=null,key:V="default"}=r,X=ze.useMemo(()=>{let ie=tA(d,o);return ie==null?null:{location:{pathname:ie,search:b,hash:L,state:B,key:V},navigationType:n}},[o,d,b,L,B,V,n]);return b1(X!=null,`<Router basename="${o}"> is not able to match the URL "${d}${b}${L}" because it does not start with the basename, so the <Router> won't render anything.`),X==null?null:ze.createElement(QC.Provider,{value:s},ze.createElement(WW.Provider,{children:e,value:X}))}var Yq="get",Xq="application/x-www-form-urlencoded";function YW(t){return t!=null&&typeof t.tagName=="string"}function got(t){return YW(t)&&t.tagName.toLowerCase()==="button"}function yot(t){return YW(t)&&t.tagName.toLowerCase()==="form"}function bot(t){return YW(t)&&t.tagName.toLowerCase()==="input"}function xot(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function _ot(t,e){return t.button===0&&(!e||e==="_self")&&!xot(t)}function Zde(t=""){return new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((e,r)=>{let n=t[r];return e.concat(Array.isArray(n)?n.map(i=>[r,i]):[[r,n]])},[]))}function wot(t,e){let r=Zde(t);return e&&e.forEach((n,i)=>{r.has(i)||e.getAll(i).forEach(a=>{r.append(i,a)})}),r}var GH=null;function Sot(){if(GH===null)try{new FormData(document.createElement("form"),0),GH=!1}catch{GH=!0}return GH}var Tot=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function CJ(t){return t!=null&&!Tot.has(t)?(b1(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Xq}"`),null):t}function Eot(t,e){let r,n,i,a,o;if(yot(t)){let s=t.getAttribute("action");n=s?tA(s,e):null,r=t.getAttribute("method")||Yq,i=CJ(t.getAttribute("enctype"))||Xq,a=new FormData(t)}else if(got(t)||bot(t)&&(t.type==="submit"||t.type==="image")){let s=t.form;if(s==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let d=t.getAttribute("formaction")||s.getAttribute("action");if(n=d?tA(d,e):null,r=t.getAttribute("formmethod")||s.getAttribute("method")||Yq,i=CJ(t.getAttribute("formenctype"))||CJ(s.getAttribute("enctype"))||Xq,a=new FormData(s,t),!Sot()){let{name:b,type:L,value:B}=t;if(L==="image"){let V=b?`${b}.`:"";a.append(`${V}x`,"0"),a.append(`${V}y`,"0")}else b&&a.append(b,B)}}else{if(YW(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Yq,n=null,i=Xq,o=t}return a&&i==="text/plain"&&(o=a,a=void 0),{action:n,method:r.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Ove(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function Aot(t,e,r){let n=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return n.pathname==="/"?n.pathname=`_root.${r}`:e&&tA(n.pathname,e)==="/"?n.pathname=`${e.replace(/\/$/,"")}/_root.${r}`:n.pathname=`${n.pathname.replace(/\/$/,"")}.${r}`,n}async function Cot(t,e){if(t.id in e)return e[t.id];try{let r=await import(t.module);return e[t.id]=r,r}catch(r){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Mot(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function Rot(t,e,r){let n=await Promise.all(t.map(async i=>{let a=e.routes[i.route.id];if(a){let o=await Cot(a,r);return o.links?o.links():[]}return[]}));return Dot(n.flat(1).filter(Mot).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function pwe(t,e,r,n,i,a){let o=(d,b)=>r[b]?d.route.id!==r[b].route.id:!0,s=(d,b)=>r[b].pathname!==d.pathname||r[b].route.path?.endsWith("*")&&r[b].params["*"]!==d.params["*"];return a==="assets"?e.filter((d,b)=>o(d,b)||s(d,b)):a==="data"?e.filter((d,b)=>{let L=n.routes[d.route.id];if(!L||!L.hasLoader)return!1;if(o(d,b)||s(d,b))return!0;if(d.route.shouldRevalidate){let B=d.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(t,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof B=="boolean")return B}return!0}):[]}function kot(t,e,{includeHydrateFallback:r}={}){return Iot(t.map(n=>{let i=e.routes[n.route.id];if(!i)return[];let a=[i.module];return i.clientActionModule&&(a=a.concat(i.clientActionModule)),i.clientLoaderModule&&(a=a.concat(i.clientLoaderModule)),r&&i.hydrateFallbackModule&&(a=a.concat(i.hydrateFallbackModule)),i.imports&&(a=a.concat(i.imports)),a}).flat(1))}function Iot(t){return[...new Set(t)]}function Pot(t){let e={},r=Object.keys(t).sort();for(let n of r)e[n]=t[n];return e}function Dot(t,e){let r=new Set;return new Set(e),t.reduce((n,i)=>{let a=JSON.stringify(Pot(i));return r.has(a)||(r.add(a),n.push({key:a,link:i})),n},[])}function lze(){let t=ze.useContext(UL);return Ove(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function Lot(){let t=ze.useContext(gB);return Ove(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var Nve=ze.createContext(void 0);Nve.displayName="FrameworkContext";function uze(){let t=ze.useContext(Nve);return Ove(t,"You must render this element inside a <HydratedRouter> element"),t}function Oot(t,e){let r=ze.useContext(Nve),[n,i]=ze.useState(!1),[a,o]=ze.useState(!1),{onFocus:s,onBlur:d,onMouseEnter:b,onMouseLeave:L,onTouchStart:B}=e,V=ze.useRef(null);ze.useEffect(()=>{if(t==="render"&&o(!0),t==="viewport"){let de=U=>{U.forEach(ve=>{o(ve.isIntersecting)})},ae=new IntersectionObserver(de,{threshold:.5});return V.current&&ae.observe(V.current),()=>{ae.disconnect()}}},[t]),ze.useEffect(()=>{if(n){let de=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(de)}}},[n]);let X=()=>{i(!0)},ie=()=>{i(!1),o(!1)};return r?t!=="intent"?[a,V,{}]:[a,V,{onFocus:S7(s,X),onBlur:S7(d,ie),onMouseEnter:S7(b,X),onMouseLeave:S7(L,ie),onTouchStart:S7(B,X)}]:[!1,V,{}]}function S7(t,e){return r=>{t&&t(r),r.defaultPrevented||e(r)}}function Not({page:t,...e}){let{router:r}=lze(),n=ze.useMemo(()=>AP(r.routes,t,r.basename),[r.routes,t,r.basename]);return n?ze.createElement(zot,{page:t,matches:n,...e}):null}function Fot(t){let{manifest:e,routeModules:r}=uze(),[n,i]=ze.useState([]);return ze.useEffect(()=>{let a=!1;return Rot(t,e,r).then(o=>{a||i(o)}),()=>{a=!0}},[t,e,r]),n}function zot({page:t,matches:e,...r}){let n=Bk(),{manifest:i,routeModules:a}=uze(),{basename:o}=lze(),{loaderData:s,matches:d}=Lot(),b=ze.useMemo(()=>pwe(t,e,d,i,n,"data"),[t,e,d,i,n]),L=ze.useMemo(()=>pwe(t,e,d,i,n,"assets"),[t,e,d,i,n]),B=ze.useMemo(()=>{if(t===n.pathname+n.search+n.hash)return[];let ie=new Set,de=!1;if(e.forEach(U=>{let ve=i.routes[U.route.id];!ve||!ve.hasLoader||(!b.some(Se=>Se.route.id===U.route.id)&&U.route.id in s&&a[U.route.id]?.shouldRevalidate||ve.hasClientLoader?de=!0:ie.add(U.route.id))}),ie.size===0)return[];let ae=Aot(t,o,"data");return de&&ie.size>0&&ae.searchParams.set("_routes",e.filter(U=>ie.has(U.route.id)).map(U=>U.route.id).join(",")),[ae.pathname+ae.search]},[o,s,n,i,b,e,t,a]),V=ze.useMemo(()=>kot(L,i),[L,i]),X=Fot(L);return ze.createElement(ze.Fragment,null,B.map(ie=>ze.createElement("link",{key:ie,rel:"prefetch",as:"fetch",href:ie,...r})),V.map(ie=>ze.createElement("link",{key:ie,rel:"modulepreload",href:ie,...r})),X.map(({key:ie,link:de})=>ze.createElement("link",{key:ie,nonce:r.nonce,...de})))}function Bot(...t){return e=>{t.forEach(r=>{typeof r=="function"?r(e):r!=null&&(r.current=e)})}}var cze=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{cze&&(window.__reactRouterVersion="7.9.2")}catch{}function Uot(t,e){return Aat({basename:e?.basename,getContext:e?.getContext,future:e?.future,history:Git({window:e?.window}),hydrationData:Hot(),routes:t,mapRouteProperties:cot,hydrationRouteProperties:fot,dataStrategy:e?.dataStrategy,patchRoutesOnNavigation:e?.patchRoutesOnNavigation,window:e?.window}).initialize()}function Hot(){let t=window?.__staticRouterHydrationData;return t&&t.errors&&(t={...t,errors:jot(t.errors)}),t}function jot(t){if(!t)return null;let e=Object.entries(t),r={};for(let[n,i]of e)if(i&&i.__type==="RouteErrorResponse")r[n]=new GG(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let a=window[i.__subType];if(typeof a=="function")try{let o=new a(i.message);o.stack="",r[n]=o}catch{}}if(r[n]==null){let a=new Error(i.message);a.stack="",r[n]=a}}else r[n]=i;return r}var fze=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,dze=ze.forwardRef(function({onClick:e,discover:r="render",prefetch:n="none",relative:i,reloadDocument:a,replace:o,state:s,target:d,to:b,preventScrollReset:L,viewTransition:B,...V},X){let{basename:ie}=ze.useContext(QC),de=typeof b=="string"&&fze.test(b),ae,U=!1;if(typeof b=="string"&&de&&(ae=b,cze))try{let Je=new URL(window.location.href),nt=b.startsWith("//")?new URL(Je.protocol+b):new URL(b),ut=tA(nt.pathname,ie);nt.origin===Je.origin&&ut!=null?b=ut+nt.search+nt.hash:U=!0}catch{b1(!1,`<Link to="${b}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let ve=Zat(b,{relative:i}),[Se,Pe,Me]=Oot(n,V),Ie=$ot(b,{replace:o,state:s,target:d,preventScrollReset:L,relative:i,viewTransition:B});function Ve(Je){e&&e(Je),Je.defaultPrevented||Ie(Je)}let Ze=ze.createElement("a",{...V,...Me,href:ae||ve,onClick:U||a?e:Ve,ref:Bot(X,Pe),target:d,"data-discover":!de&&r==="render"?"true":void 0});return Se&&!de?ze.createElement(ze.Fragment,null,Ze,ze.createElement(Not,{page:ve})):Ze});dze.displayName="Link";var Vot=ze.forwardRef(function({"aria-current":e="page",caseSensitive:r=!1,className:n="",end:i=!1,style:a,to:o,viewTransition:s,children:d,...b},L){let B=yB(o,{relative:b.relative}),V=Bk(),X=ze.useContext(gB),{navigator:ie,basename:de}=ze.useContext(QC),ae=X!=null&&Kot(B)&&s===!0,U=ie.encodeLocation?ie.encodeLocation(B).pathname:B.pathname,ve=V.pathname,Se=X&&X.navigation&&X.navigation.location?X.navigation.location.pathname:null;r||(ve=ve.toLowerCase(),Se=Se?Se.toLowerCase():null,U=U.toLowerCase()),Se&&de&&(Se=tA(Se,de)||Se);const Pe=U!=="/"&&U.endsWith("/")?U.length-1:U.length;let Me=ve===U||!i&&ve.startsWith(U)&&ve.charAt(Pe)==="/",Ie=Se!=null&&(Se===U||!i&&Se.startsWith(U)&&Se.charAt(U.length)==="/"),Ve={isActive:Me,isPending:Ie,isTransitioning:ae},Ze=Me?e:void 0,Je;typeof n=="function"?Je=n(Ve):Je=[n,Me?"active":null,Ie?"pending":null,ae?"transitioning":null].filter(Boolean).join(" ");let nt=typeof a=="function"?a(Ve):a;return ze.createElement(dze,{...b,"aria-current":Ze,className:Je,ref:L,style:nt,to:o,viewTransition:s},typeof d=="function"?d(Ve):d)});Vot.displayName="NavLink";var qot=ze.forwardRef(({discover:t="render",fetcherKey:e,navigate:r,reloadDocument:n,replace:i,state:a,method:o=Yq,action:s,onSubmit:d,relative:b,preventScrollReset:L,viewTransition:B,...V},X)=>{let ie=Xot(),de=Zot(s,{relative:b}),ae=o.toLowerCase()==="get"?"get":"post",U=typeof s=="string"&&fze.test(s),ve=Se=>{if(d&&d(Se),Se.defaultPrevented)return;Se.preventDefault();let Pe=Se.nativeEvent.submitter,Me=Pe?.getAttribute("formmethod")||o;ie(Pe||Se.currentTarget,{fetcherKey:e,method:Me,navigate:r,replace:i,state:a,relative:b,preventScrollReset:L,viewTransition:B})};return ze.createElement("form",{ref:X,method:ae,action:de,onSubmit:n?d:ve,...V,"data-discover":!U&&t==="render"?"true":void 0})});qot.displayName="Form";function Got(t){return`${t} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function hze(t){let e=ze.useContext(UL);return Up(e,Got(t)),e}function $ot(t,{target:e,replace:r,state:n,preventScrollReset:i,relative:a,viewTransition:o}={}){let s=c4(),d=Bk(),b=yB(t,{relative:a});return ze.useCallback(L=>{if(_ot(L,e)){L.preventDefault();let B=r!==void 0?r:WP(d)===WP(b);s(t,{replace:B,state:n,preventScrollReset:i,relative:a,viewTransition:o})}},[d,s,b,r,n,e,t,i,a,o])}function pze(t){b1(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let e=ze.useRef(Zde(t)),r=ze.useRef(!1),n=Bk(),i=ze.useMemo(()=>wot(n.search,r.current?null:e.current),[n.search]),a=c4(),o=ze.useCallback((s,d)=>{const b=Zde(typeof s=="function"?s(new URLSearchParams(i)):s);r.current=!0,a("?"+b,d)},[a,i]);return[i,o]}var Wot=0,Yot=()=>`__${String(++Wot)}__`;function Xot(){let{router:t}=hze("useSubmit"),{basename:e}=ze.useContext(QC),r=sot();return ze.useCallback(async(n,i={})=>{let{action:a,method:o,encType:s,formData:d,body:b}=Eot(n,e);if(i.navigate===!1){let L=i.fetcherKey||Yot();await t.fetch(L,r,i.action||a,{preventScrollReset:i.preventScrollReset,formData:d,body:b,formMethod:i.method||o,formEncType:i.encType||s,flushSync:i.flushSync})}else await t.navigate(i.action||a,{preventScrollReset:i.preventScrollReset,formData:d,body:b,formMethod:i.method||o,formEncType:i.encType||s,replace:i.replace,state:i.state,fromRouteId:r,flushSync:i.flushSync,viewTransition:i.viewTransition})},[t,e,r])}function Zot(t,{relative:e}={}){let{basename:r}=ze.useContext(QC),n=ze.useContext(eM);Up(n,"useFormAction must be used inside a RouteContext");let[i]=n.matches.slice(-1),a={...yB(t||".",{relative:e})},o=Bk();if(t==null){a.search=o.search;let s=new URLSearchParams(a.search),d=s.getAll("index");if(d.some(L=>L==="")){s.delete("index"),d.filter(B=>B).forEach(B=>s.append("index",B));let L=s.toString();a.search=L?`?${L}`:""}}return(!t||t===".")&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(a.pathname=a.pathname==="/"?r:R5([r,a.pathname])),WP(a)}function Kot(t,{relative:e}={}){let r=ze.useContext(Ive);Up(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=hze("useViewTransitionState"),i=yB(t,{relative:e});if(!r.isTransitioning)return!1;let a=tA(r.currentLocation.pathname,n)||r.currentLocation.pathname,o=tA(r.nextLocation.pathname,n)||r.nextLocation.pathname;return qG(i.pathname,o)!=null||qG(i.pathname,a)!=null}var k8=qW();const $H=Qh(k8);function Jot(t){return ze.createElement(hot,{flushSync:k8.flushSync,...t})}function kk(t,...e){const r=new URL(`https://mui.com/production-error/?code=${t}`);return e.forEach(n=>r.searchParams.append("args[]",n)),`Minified MUI error #${t}; visit ${r} for the full message.`}function Mr(){return Mr=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Mr.apply(null,arguments)}function Qot(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function est(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var tst=(function(){function t(r){var n=this;this._insertTag=function(i){var a;n.tags.length===0?n.insertionPoint?a=n.insertionPoint.nextSibling:n.prepend?a=n.container.firstChild:a=n.before:a=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(i,a),n.tags.push(i)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(n){n.forEach(this._insertTag)},e.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(est(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var a=Qot(i);try{a.insertRule(n,a.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(n));this.ctr++},e.flush=function(){this.tags.forEach(function(n){var i;return(i=n.parentNode)==null?void 0:i.removeChild(n)}),this.tags=[],this.ctr=0},t})(),Fw="-ms-",WG="-moz-",Im="-webkit-",vze="comm",Fve="rule",zve="decl",rst="@import",mze="@keyframes",nst="@layer",ist=Math.abs,XW=String.fromCharCode,ast=Object.assign;function ost(t,e){return z_(t,0)^45?(((e<<2^z_(t,0))<<2^z_(t,1))<<2^z_(t,2))<<2^z_(t,3):0}function gze(t){return t.trim()}function sst(t,e){return(t=e.exec(t))?t[0]:t}function Pm(t,e,r){return t.replace(e,r)}function Kde(t,e){return t.indexOf(e)}function z_(t,e){return t.charCodeAt(e)|0}function S9(t,e,r){return t.slice(e,r)}function v5(t){return t.length}function Bve(t){return t.length}function WH(t,e){return e.push(t),t}function lst(t,e){return t.map(e).join("")}var ZW=1,YN=1,yze=0,XS=0,wb=0,I8="";function KW(t,e,r,n,i,a,o){return{value:t,root:e,parent:r,type:n,props:i,children:a,line:ZW,column:YN,length:o,return:""}}function T7(t,e){return ast(KW("",null,null,"",null,null,0),t,{length:-t.length},e)}function ust(){return wb}function cst(){return wb=XS>0?z_(I8,--XS):0,YN--,wb===10&&(YN=1,ZW--),wb}function oE(){return wb=XS<yze?z_(I8,XS++):0,YN++,wb===10&&(YN=1,ZW++),wb}function k5(){return z_(I8,XS)}function Zq(){return XS}function bB(t,e){return S9(I8,t,e)}function T9(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function bze(t){return ZW=YN=1,yze=v5(I8=t),XS=0,[]}function xze(t){return I8="",t}function Kq(t){return gze(bB(XS-1,Jde(t===91?t+2:t===40?t+1:t)))}function fst(t){for(;(wb=k5())&&wb<33;)oE();return T9(t)>2||T9(wb)>3?"":" "}function dst(t,e){for(;--e&&oE()&&!(wb<48||wb>102||wb>57&&wb<65||wb>70&&wb<97););return bB(t,Zq()+(e<6&&k5()==32&&oE()==32))}function Jde(t){for(;oE();)switch(wb){case t:return XS;case 34:case 39:t!==34&&t!==39&&Jde(wb);break;case 40:t===41&&Jde(t);break;case 92:oE();break}return XS}function hst(t,e){for(;oE()&&t+wb!==57;)if(t+wb===84&&k5()===47)break;return"/*"+bB(e,XS-1)+"*"+XW(t===47?t:oE())}function pst(t){for(;!T9(k5());)oE();return bB(t,XS)}function vst(t){return xze(Jq("",null,null,null,[""],t=bze(t),0,[0],t))}function Jq(t,e,r,n,i,a,o,s,d){for(var b=0,L=0,B=o,V=0,X=0,ie=0,de=1,ae=1,U=1,ve=0,Se="",Pe=i,Me=a,Ie=n,Ve=Se;ae;)switch(ie=ve,ve=oE()){case 40:if(ie!=108&&z_(Ve,B-1)==58){Kde(Ve+=Pm(Kq(ve),"&","&\f"),"&\f")!=-1&&(U=-1);break}case 34:case 39:case 91:Ve+=Kq(ve);break;case 9:case 10:case 13:case 32:Ve+=fst(ie);break;case 92:Ve+=dst(Zq()-1,7);continue;case 47:switch(k5()){case 42:case 47:WH(mst(hst(oE(),Zq()),e,r),d);break;default:Ve+="/"}break;case 123*de:s[b++]=v5(Ve)*U;case 125*de:case 59:case 0:switch(ve){case 0:case 125:ae=0;case 59+L:U==-1&&(Ve=Pm(Ve,/\f/g,"")),X>0&&v5(Ve)-B&&WH(X>32?mwe(Ve+";",n,r,B-1):mwe(Pm(Ve," ","")+";",n,r,B-2),d);break;case 59:Ve+=";";default:if(WH(Ie=vwe(Ve,e,r,b,L,i,s,Se,Pe=[],Me=[],B),a),ve===123)if(L===0)Jq(Ve,e,Ie,Ie,Pe,a,B,s,Me);else switch(V===99&&z_(Ve,3)===110?100:V){case 100:case 108:case 109:case 115:Jq(t,Ie,Ie,n&&WH(vwe(t,Ie,Ie,0,0,i,s,Se,i,Pe=[],B),Me),i,Me,B,s,n?Pe:Me);break;default:Jq(Ve,Ie,Ie,Ie,[""],Me,0,s,Me)}}b=L=X=0,de=U=1,Se=Ve="",B=o;break;case 58:B=1+v5(Ve),X=ie;default:if(de<1){if(ve==123)--de;else if(ve==125&&de++==0&&cst()==125)continue}switch(Ve+=XW(ve),ve*de){case 38:U=L>0?1:(Ve+="\f",-1);break;case 44:s[b++]=(v5(Ve)-1)*U,U=1;break;case 64:k5()===45&&(Ve+=Kq(oE())),V=k5(),L=B=v5(Se=Ve+=pst(Zq())),ve++;break;case 45:ie===45&&v5(Ve)==2&&(de=0)}}return a}function vwe(t,e,r,n,i,a,o,s,d,b,L){for(var B=i-1,V=i===0?a:[""],X=Bve(V),ie=0,de=0,ae=0;ie<n;++ie)for(var U=0,ve=S9(t,B+1,B=ist(de=o[ie])),Se=t;U<X;++U)(Se=gze(de>0?V[U]+" "+ve:Pm(ve,/&\f/g,V[U])))&&(d[ae++]=Se);return KW(t,e,r,i===0?Fve:s,d,b,L)}function mst(t,e,r){return KW(t,e,r,vze,XW(ust()),S9(t,2,-2),0)}function mwe(t,e,r,n){return KW(t,e,r,zve,S9(t,0,n),S9(t,n+1,-1),n)}function PN(t,e){for(var r="",n=Bve(t),i=0;i<n;i++)r+=e(t[i],i,t,e)||"";return r}function gst(t,e,r,n){switch(t.type){case nst:if(t.children.length)break;case rst:case zve:return t.return=t.return||t.value;case vze:return"";case mze:return t.return=t.value+"{"+PN(t.children,n)+"}";case Fve:t.value=t.props.join(",")}return v5(r=PN(t.children,n))?t.return=t.value+"{"+r+"}":""}function yst(t){var e=Bve(t);return function(r,n,i,a){for(var o="",s=0;s<e;s++)o+=t[s](r,n,i,a)||"";return o}}function bst(t){return function(e){e.root||(e=e.return)&&t(e)}}function _ze(t){var e=Object.create(null);return function(r){return e[r]===void 0&&(e[r]=t(r)),e[r]}}var xst=function(e,r,n){for(var i=0,a=0;i=a,a=k5(),i===38&&a===12&&(r[n]=1),!T9(a);)oE();return bB(e,XS)},_st=function(e,r){var n=-1,i=44;do switch(T9(i)){case 0:i===38&&k5()===12&&(r[n]=1),e[n]+=xst(XS-1,r,n);break;case 2:e[n]+=Kq(i);break;case 4:if(i===44){e[++n]=k5()===58?"&\f":"",r[n]=e[n].length;break}default:e[n]+=XW(i)}while(i=oE());return e},wst=function(e,r){return xze(_st(bze(e),r))},gwe=new WeakMap,Sst=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var r=e.value,n=e.parent,i=e.column===n.column&&e.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(e.props.length===1&&r.charCodeAt(0)!==58&&!gwe.get(n))&&!i){gwe.set(e,!0);for(var a=[],o=wst(r,a),s=n.props,d=0,b=0;d<o.length;d++)for(var L=0;L<s.length;L++,b++)e.props[b]=a[d]?o[d].replace(/&\f/g,s[L]):s[L]+" "+o[d]}}},Tst=function(e){if(e.type==="decl"){var r=e.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(e.return="",e.value="")}};function wze(t,e){switch(ost(t,e)){case 5103:return Im+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Im+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return Im+t+WG+t+Fw+t+t;case 6828:case 4268:return Im+t+Fw+t+t;case 6165:return Im+t+Fw+"flex-"+t+t;case 5187:return Im+t+Pm(t,/(\w+).+(:[^]+)/,Im+"box-$1$2"+Fw+"flex-$1$2")+t;case 5443:return Im+t+Fw+"flex-item-"+Pm(t,/flex-|-self/,"")+t;case 4675:return Im+t+Fw+"flex-line-pack"+Pm(t,/align-content|flex-|-self/,"")+t;case 5548:return Im+t+Fw+Pm(t,"shrink","negative")+t;case 5292:return Im+t+Fw+Pm(t,"basis","preferred-size")+t;case 6060:return Im+"box-"+Pm(t,"-grow","")+Im+t+Fw+Pm(t,"grow","positive")+t;case 4554:return Im+Pm(t,/([^-])(transform)/g,"$1"+Im+"$2")+t;case 6187:return Pm(Pm(Pm(t,/(zoom-|grab)/,Im+"$1"),/(image-set)/,Im+"$1"),t,"")+t;case 5495:case 3959:return Pm(t,/(image-set\([^]*)/,Im+"$1$`$1");case 4968:return Pm(Pm(t,/(.+:)(flex-)?(.*)/,Im+"box-pack:$3"+Fw+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Im+t+t;case 4095:case 3583:case 4068:case 2532:return Pm(t,/(.+)-inline(.+)/,Im+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(v5(t)-1-e>6)switch(z_(t,e+1)){case 109:if(z_(t,e+4)!==45)break;case 102:return Pm(t,/(.+:)(.+)-([^]+)/,"$1"+Im+"$2-$3$1"+WG+(z_(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~Kde(t,"stretch")?wze(Pm(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(z_(t,e+1)!==115)break;case 6444:switch(z_(t,v5(t)-3-(~Kde(t,"!important")&&10))){case 107:return Pm(t,":",":"+Im)+t;case 101:return Pm(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Im+(z_(t,14)===45?"inline-":"")+"box$3$1"+Im+"$2$3$1"+Fw+"$2box$3")+t}break;case 5936:switch(z_(t,e+11)){case 114:return Im+t+Fw+Pm(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return Im+t+Fw+Pm(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return Im+t+Fw+Pm(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return Im+t+Fw+t+t}return t}var Est=function(e,r,n,i){if(e.length>-1&&!e.return)switch(e.type){case zve:e.return=wze(e.value,e.length);break;case mze:return PN([T7(e,{value:Pm(e.value,"@","@"+Im)})],i);case Fve:if(e.length)return lst(e.props,function(a){switch(sst(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return PN([T7(e,{props:[Pm(a,/:(read-\w+)/,":"+WG+"$1")]})],i);case"::placeholder":return PN([T7(e,{props:[Pm(a,/:(plac\w+)/,":"+Im+"input-$1")]}),T7(e,{props:[Pm(a,/:(plac\w+)/,":"+WG+"$1")]}),T7(e,{props:[Pm(a,/:(plac\w+)/,Fw+"input-$1")]})],i)}return""})}},Ast=[Est],Cst=function(e){var r=e.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(de){var ae=de.getAttribute("data-emotion");ae.indexOf(" ")!==-1&&(document.head.appendChild(de),de.setAttribute("data-s",""))})}var i=e.stylisPlugins||Ast,a={},o,s=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(de){for(var ae=de.getAttribute("data-emotion").split(" "),U=1;U<ae.length;U++)a[ae[U]]=!0;s.push(de)});var d,b=[Sst,Tst];{var L,B=[gst,bst(function(de){L.insert(de)})],V=yst(b.concat(i,B)),X=function(ae){return PN(vst(ae),V)};d=function(ae,U,ve,Se){L=ve,X(ae?ae+"{"+U.styles+"}":U.styles),Se&&(ie.inserted[U.name]=!0)}}var ie={key:r,sheet:new tst({key:r,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:d};return ie.sheet.hydrate(s),ie},MJ={exports:{}},Xm={};/** @license React v16.13.1
 * 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 ywe;function Mst(){if(ywe)return Xm;ywe=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,n=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,a=t?Symbol.for("react.profiler"):60114,o=t?Symbol.for("react.provider"):60109,s=t?Symbol.for("react.context"):60110,d=t?Symbol.for("react.async_mode"):60111,b=t?Symbol.for("react.concurrent_mode"):60111,L=t?Symbol.for("react.forward_ref"):60112,B=t?Symbol.for("react.suspense"):60113,V=t?Symbol.for("react.suspense_list"):60120,X=t?Symbol.for("react.memo"):60115,ie=t?Symbol.for("react.lazy"):60116,de=t?Symbol.for("react.block"):60121,ae=t?Symbol.for("react.fundamental"):60117,U=t?Symbol.for("react.responder"):60118,ve=t?Symbol.for("react.scope"):60119;function Se(Me){if(typeof Me=="object"&&Me!==null){var Ie=Me.$$typeof;switch(Ie){case e:switch(Me=Me.type,Me){case d:case b:case n:case a:case i:case B:return Me;default:switch(Me=Me&&Me.$$typeof,Me){case s:case L:case ie:case X:case o:return Me;default:return Ie}}case r:return Ie}}}function Pe(Me){return Se(Me)===b}return Xm.AsyncMode=d,Xm.ConcurrentMode=b,Xm.ContextConsumer=s,Xm.ContextProvider=o,Xm.Element=e,Xm.ForwardRef=L,Xm.Fragment=n,Xm.Lazy=ie,Xm.Memo=X,Xm.Portal=r,Xm.Profiler=a,Xm.StrictMode=i,Xm.Suspense=B,Xm.isAsyncMode=function(Me){return Pe(Me)||Se(Me)===d},Xm.isConcurrentMode=Pe,Xm.isContextConsumer=function(Me){return Se(Me)===s},Xm.isContextProvider=function(Me){return Se(Me)===o},Xm.isElement=function(Me){return typeof Me=="object"&&Me!==null&&Me.$$typeof===e},Xm.isForwardRef=function(Me){return Se(Me)===L},Xm.isFragment=function(Me){return Se(Me)===n},Xm.isLazy=function(Me){return Se(Me)===ie},Xm.isMemo=function(Me){return Se(Me)===X},Xm.isPortal=function(Me){return Se(Me)===r},Xm.isProfiler=function(Me){return Se(Me)===a},Xm.isStrictMode=function(Me){return Se(Me)===i},Xm.isSuspense=function(Me){return Se(Me)===B},Xm.isValidElementType=function(Me){return typeof Me=="string"||typeof Me=="function"||Me===n||Me===b||Me===a||Me===i||Me===B||Me===V||typeof Me=="object"&&Me!==null&&(Me.$$typeof===ie||Me.$$typeof===X||Me.$$typeof===o||Me.$$typeof===s||Me.$$typeof===L||Me.$$typeof===ae||Me.$$typeof===U||Me.$$typeof===ve||Me.$$typeof===de)},Xm.typeOf=Se,Xm}var bwe;function Rst(){return bwe||(bwe=1,MJ.exports=Mst()),MJ.exports}var RJ,xwe;function kst(){if(xwe)return RJ;xwe=1;var t=Rst(),e={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},n={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};a[t.ForwardRef]=n,a[t.Memo]=i;function o(ie){return t.isMemo(ie)?i:a[ie.$$typeof]||e}var s=Object.defineProperty,d=Object.getOwnPropertyNames,b=Object.getOwnPropertySymbols,L=Object.getOwnPropertyDescriptor,B=Object.getPrototypeOf,V=Object.prototype;function X(ie,de,ae){if(typeof de!="string"){if(V){var U=B(de);U&&U!==V&&X(ie,U,ae)}var ve=d(de);b&&(ve=ve.concat(b(de)));for(var Se=o(ie),Pe=o(de),Me=0;Me<ve.length;++Me){var Ie=ve[Me];if(!r[Ie]&&!(ae&&ae[Ie])&&!(Pe&&Pe[Ie])&&!(Se&&Se[Ie])){var Ve=L(de,Ie);try{s(ie,Ie,Ve)}catch{}}}}return ie}return RJ=X,RJ}kst();var Ist=!0;function Sze(t,e,r){var n="";return r.split(" ").forEach(function(i){t[i]!==void 0?e.push(t[i]+";"):i&&(n+=i+" ")}),n}var Uve=function(e,r,n){var i=e.key+"-"+r.name;(n===!1||Ist===!1)&&e.registered[i]===void 0&&(e.registered[i]=r.styles)},Hve=function(e,r,n){Uve(e,r,n);var i=e.key+"-"+r.name;if(e.inserted[r.name]===void 0){var a=r;do e.insert(r===a?"."+i:"",a,e.sheet,!0),a=a.next;while(a!==void 0)}};function Pst(t){for(var e=0,r,n=0,i=t.length;i>=4;++n,i-=4)r=t.charCodeAt(n)&255|(t.charCodeAt(++n)&255)<<8|(t.charCodeAt(++n)&255)<<16|(t.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,e=(r&65535)*1540483477+((r>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(n+2)&255)<<16;case 2:e^=(t.charCodeAt(n+1)&255)<<8;case 1:e^=t.charCodeAt(n)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var Dst={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Lst=/[A-Z]|^ms/g,Ost=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Tze=function(e){return e.charCodeAt(1)===45},_we=function(e){return e!=null&&typeof e!="boolean"},kJ=_ze(function(t){return Tze(t)?t:t.replace(Lst,"-$&").toLowerCase()}),wwe=function(e,r){switch(e){case"animation":case"animationName":if(typeof r=="string")return r.replace(Ost,function(n,i,a){return m5={name:i,styles:a,next:m5},i})}return Dst[e]!==1&&!Tze(e)&&typeof r=="number"&&r!==0?r+"px":r};function E9(t,e,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var i=r;if(i.anim===1)return m5={name:i.name,styles:i.styles,next:m5},i.name;var a=r;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)m5={name:o.name,styles:o.styles,next:m5},o=o.next;var s=a.styles+";";return s}return Nst(t,e,r)}case"function":{if(t!==void 0){var d=m5,b=r(t);return m5=d,E9(t,e,b)}break}}var L=r;if(e==null)return L;var B=e[L];return B!==void 0?B:L}function Nst(t,e,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=E9(t,e,r[i])+";";else for(var a in r){var o=r[a];if(typeof o!="object"){var s=o;e!=null&&e[s]!==void 0?n+=a+"{"+e[s]+"}":_we(s)&&(n+=kJ(a)+":"+wwe(a,s)+";")}else if(Array.isArray(o)&&typeof o[0]=="string"&&(e==null||e[o[0]]===void 0))for(var d=0;d<o.length;d++)_we(o[d])&&(n+=kJ(a)+":"+wwe(a,o[d])+";");else{var b=E9(t,e,o);switch(a){case"animation":case"animationName":{n+=kJ(a)+":"+b+";";break}default:n+=a+"{"+b+"}"}}}return n}var Swe=/label:\s*([^\s;{]+)\s*(;|$)/g,m5;function xB(t,e,r){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var n=!0,i="";m5=void 0;var a=t[0];if(a==null||a.raw===void 0)n=!1,i+=E9(r,e,a);else{var o=a;i+=o[0]}for(var s=1;s<t.length;s++)if(i+=E9(r,e,t[s]),n){var d=a;i+=d[s]}Swe.lastIndex=0;for(var b="",L;(L=Swe.exec(i))!==null;)b+="-"+L[1];var B=Pst(i)+b;return{name:B,styles:i,next:m5}}var Fst=function(e){return e()},Eze=VG.useInsertionEffect?VG.useInsertionEffect:!1,Aze=Eze||Fst,Twe=Eze||ze.useLayoutEffect,Cze=ze.createContext(typeof HTMLElement<"u"?Cst({key:"css"}):null);Cze.Provider;var jve=function(e){return ze.forwardRef(function(r,n){var i=ze.useContext(Cze);return e(r,i,n)})},_B=ze.createContext({}),Vve={}.hasOwnProperty,Qde="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",zst=function(e,r){var n={};for(var i in r)Vve.call(r,i)&&(n[i]=r[i]);return n[Qde]=e,n},Bst=function(e){var r=e.cache,n=e.serialized,i=e.isStringTag;return Uve(r,n,i),Aze(function(){return Hve(r,n,i)}),null},Ust=jve(function(t,e,r){var n=t.css;typeof n=="string"&&e.registered[n]!==void 0&&(n=e.registered[n]);var i=t[Qde],a=[n],o="";typeof t.className=="string"?o=Sze(e.registered,a,t.className):t.className!=null&&(o=t.className+" ");var s=xB(a,void 0,ze.useContext(_B));o+=e.key+"-"+s.name;var d={};for(var b in t)Vve.call(t,b)&&b!=="css"&&b!==Qde&&(d[b]=t[b]);return d.className=o,r&&(d.ref=r),ze.createElement(ze.Fragment,null,ze.createElement(Bst,{cache:e,serialized:s,isStringTag:typeof i=="string"}),ze.createElement(i,d))}),Hst=Ust,Ewe=function(e,r){var n=arguments;if(r==null||!Vve.call(r,"css"))return ze.createElement.apply(void 0,n);var i=n.length,a=new Array(i);a[0]=Hst,a[1]=zst(e,r);for(var o=2;o<i;o++)a[o]=n[o];return ze.createElement.apply(null,a)};(function(t){var e;e||(e=t.JSX||(t.JSX={}))})(Ewe||(Ewe={}));var jst=jve(function(t,e){var r=t.styles,n=xB([r],void 0,ze.useContext(_B)),i=ze.useRef();return Twe(function(){var a=e.key+"-global",o=new e.sheet.constructor({key:a,nonce:e.sheet.nonce,container:e.sheet.container,speedy:e.sheet.isSpeedy}),s=!1,d=document.querySelector('style[data-emotion="'+a+" "+n.name+'"]');return e.sheet.tags.length&&(o.before=e.sheet.tags[0]),d!==null&&(s=!0,d.setAttribute("data-emotion",a),o.hydrate([d])),i.current=[o,s],function(){o.flush()}},[e]),Twe(function(){var a=i.current,o=a[0],s=a[1];if(s){a[1]=!1;return}if(n.next!==void 0&&Hve(e,n.next,!0),o.tags.length){var d=o.tags[o.tags.length-1].nextElementSibling;o.before=d,o.flush()}e.insert("",n,o,!1)},[e,n.name]),null});function f4(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return xB(e)}function cA(){var t=f4.apply(void 0,arguments),e="animation-"+t.name;return{name:e,styles:"@keyframes "+e+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var Vst=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|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|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|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|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,qst=_ze(function(t){return Vst.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91}),Gst=qst,$st=function(e){return e!=="theme"},Awe=function(e){return typeof e=="string"&&e.charCodeAt(0)>96?Gst:$st},Cwe=function(e,r,n){var i;if(r){var a=r.shouldForwardProp;i=e.__emotion_forwardProp&&a?function(o){return e.__emotion_forwardProp(o)&&a(o)}:a}return typeof i!="function"&&n&&(i=e.__emotion_forwardProp),i},Wst=function(e){var r=e.cache,n=e.serialized,i=e.isStringTag;return Uve(r,n,i),Aze(function(){return Hve(r,n,i)}),null},Yst=function t(e,r){var n=e.__emotion_real===e,i=n&&e.__emotion_base||e,a,o;r!==void 0&&(a=r.label,o=r.target);var s=Cwe(e,r,n),d=s||Awe(i),b=!d("as");return function(){var L=arguments,B=n&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(a!==void 0&&B.push("label:"+a+";"),L[0]==null||L[0].raw===void 0)B.push.apply(B,L);else{var V=L[0];B.push(V[0]);for(var X=L.length,ie=1;ie<X;ie++)B.push(L[ie],V[ie])}var de=jve(function(ae,U,ve){var Se=b&&ae.as||i,Pe="",Me=[],Ie=ae;if(ae.theme==null){Ie={};for(var Ve in ae)Ie[Ve]=ae[Ve];Ie.theme=ze.useContext(_B)}typeof ae.className=="string"?Pe=Sze(U.registered,Me,ae.className):ae.className!=null&&(Pe=ae.className+" ");var Ze=xB(B.concat(Me),U.registered,Ie);Pe+=U.key+"-"+Ze.name,o!==void 0&&(Pe+=" "+o);var Je=b&&s===void 0?Awe(Se):d,nt={};for(var ut in ae)b&&ut==="as"||Je(ut)&&(nt[ut]=ae[ut]);return nt.className=Pe,ve&&(nt.ref=ve),ze.createElement(ze.Fragment,null,ze.createElement(Wst,{cache:U,serialized:Ze,isStringTag:typeof Se=="string"}),ze.createElement(Se,nt))});return de.displayName=a!==void 0?a:"Styled("+(typeof i=="string"?i:i.displayName||i.name||"Component")+")",de.defaultProps=e.defaultProps,de.__emotion_real=de,de.__emotion_base=i,de.__emotion_styles=B,de.__emotion_forwardProp=s,Object.defineProperty(de,"toString",{value:function(){return"."+o}}),de.withComponent=function(ae,U){var ve=t(ae,Mr({},r,U,{shouldForwardProp:Cwe(de,U,!0)}));return ve.apply(void 0,B)},de}},Xst=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],ehe=Yst.bind(null);Xst.forEach(function(t){ehe[t]=ehe(t)});var IJ={exports:{}},PJ,Mwe;function Zst(){if(Mwe)return PJ;Mwe=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return PJ=t,PJ}var DJ,Rwe;function Kst(){if(Rwe)return DJ;Rwe=1;var t=Zst();function e(){}function r(){}return r.resetWarningCache=e,DJ=function(){function n(o,s,d,b,L,B){if(B!==t){var V=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 V.name="Invariant Violation",V}}n.isRequired=n;function i(){return n}var a={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:e};return a.PropTypes=a,a},DJ}var kwe;function JW(){return kwe||(kwe=1,IJ.exports=Kst()()),IJ.exports}var Jst=JW();const cn=Qh(Jst);function Qst(t){return t==null||Object.keys(t).length===0}function Mze(t){const{styles:e,defaultTheme:r={}}=t,n=typeof e=="function"?i=>e(Qst(i)?r:i):e;return Ke.jsx(jst,{styles:n})}function Rze(t,e){return ehe(t,e)}function elt(t,e){Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))}const Iwe=[];function HP(t){return Iwe[0]=t,xB(Iwe)}var LJ={exports:{}},Dg={};/**
 * @license React
 * react-is.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 Pwe;function tlt(){if(Pwe)return Dg;Pwe=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),o=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),B=Symbol.for("react.lazy"),V=Symbol.for("react.view_transition"),X=Symbol.for("react.client.reference");function ie(de){if(typeof de=="object"&&de!==null){var ae=de.$$typeof;switch(ae){case t:switch(de=de.type,de){case r:case i:case n:case d:case b:case V:return de;default:switch(de=de&&de.$$typeof,de){case o:case s:case B:case L:return de;case a:return de;default:return ae}}case e:return ae}}}return Dg.ContextConsumer=a,Dg.ContextProvider=o,Dg.Element=t,Dg.ForwardRef=s,Dg.Fragment=r,Dg.Lazy=B,Dg.Memo=L,Dg.Portal=e,Dg.Profiler=i,Dg.StrictMode=n,Dg.Suspense=d,Dg.SuspenseList=b,Dg.isContextConsumer=function(de){return ie(de)===a},Dg.isContextProvider=function(de){return ie(de)===o},Dg.isElement=function(de){return typeof de=="object"&&de!==null&&de.$$typeof===t},Dg.isForwardRef=function(de){return ie(de)===s},Dg.isFragment=function(de){return ie(de)===r},Dg.isLazy=function(de){return ie(de)===B},Dg.isMemo=function(de){return ie(de)===L},Dg.isPortal=function(de){return ie(de)===e},Dg.isProfiler=function(de){return ie(de)===i},Dg.isStrictMode=function(de){return ie(de)===n},Dg.isSuspense=function(de){return ie(de)===d},Dg.isSuspenseList=function(de){return ie(de)===b},Dg.isValidElementType=function(de){return typeof de=="string"||typeof de=="function"||de===r||de===i||de===n||de===d||de===b||typeof de=="object"&&de!==null&&(de.$$typeof===B||de.$$typeof===L||de.$$typeof===o||de.$$typeof===a||de.$$typeof===s||de.$$typeof===X||de.getModuleId!==void 0)},Dg.typeOf=ie,Dg}var Dwe;function rlt(){return Dwe||(Dwe=1,LJ.exports=tlt()),LJ.exports}var kze=rlt();function _5(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function Ize(t){if(ze.isValidElement(t)||kze.isValidElementType(t)||!_5(t))return t;const e={};return Object.keys(t).forEach(r=>{e[r]=Ize(t[r])}),e}function Kx(t,e,r={clone:!0}){const n=r.clone?{...t}:t;return _5(t)&&_5(e)&&Object.keys(e).forEach(i=>{ze.isValidElement(e[i])||kze.isValidElementType(e[i])?n[i]=e[i]:_5(e[i])&&Object.prototype.hasOwnProperty.call(t,i)&&_5(t[i])?n[i]=Kx(t[i],e[i],r):r.clone?n[i]=_5(e[i])?Ize(e[i]):e[i]:n[i]=e[i]}),n}const nlt=t=>{const e=Object.keys(t).map(r=>({key:r,val:t[r]}))||[];return e.sort((r,n)=>r.val-n.val),e.reduce((r,n)=>({...r,[n.key]:n.val}),{})};function ilt(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5,...i}=t,a=nlt(e),o=Object.keys(a);function s(V){return`@media (min-width:${typeof e[V]=="number"?e[V]:V}${r})`}function d(V){return`@media (max-width:${(typeof e[V]=="number"?e[V]:V)-n/100}${r})`}function b(V,X){const ie=o.indexOf(X);return`@media (min-width:${typeof e[V]=="number"?e[V]:V}${r}) and (max-width:${(ie!==-1&&typeof e[o[ie]]=="number"?e[o[ie]]:X)-n/100}${r})`}function L(V){return o.indexOf(V)+1<o.length?b(V,o[o.indexOf(V)+1]):s(V)}function B(V){const X=o.indexOf(V);return X===0?s(o[1]):X===o.length-1?d(o[X]):b(V,o[o.indexOf(V)+1]).replace("@media","@media not all and")}return{keys:o,values:a,up:s,down:d,between:b,only:L,not:B,unit:r,...i}}function Lwe(t,e){if(!t.containerQueries)return e;const r=Object.keys(e).filter(n=>n.startsWith("@container")).sort((n,i)=>{const a=/min-width:\s*([0-9.]+)/;return+(n.match(a)?.[1]||0)-+(i.match(a)?.[1]||0)});return r.length?r.reduce((n,i)=>{const a=e[i];return delete n[i],n[i]=a,n},{...e}):e}function alt(t,e){return e==="@"||e.startsWith("@")&&(t.some(r=>e.startsWith(`@${r}`))||!!e.match(/^@\d/))}function olt(t,e){const r=e.match(/^@([^/]+)?\/?(.+)?$/);if(!r)return null;const[,n,i]=r,a=Number.isNaN(+n)?n||0:+n;return t.containerQueries(i).up(a)}function slt(t){const e=(a,o)=>a.replace("@media",o?`@container ${o}`:"@container");function r(a,o){a.up=(...s)=>e(t.breakpoints.up(...s),o),a.down=(...s)=>e(t.breakpoints.down(...s),o),a.between=(...s)=>e(t.breakpoints.between(...s),o),a.only=(...s)=>e(t.breakpoints.only(...s),o),a.not=(...s)=>{const d=e(t.breakpoints.not(...s),o);return d.includes("not all and")?d.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):d}}const n={},i=a=>(r(n,a),n);return r(i),{...t,containerQueries:i}}const llt={borderRadius:4};function jz(t,e){return e?Kx(t,e,{clone:!1}):t}const QW={xs:0,sm:600,md:900,lg:1200,xl:1536},Owe={keys:["xs","sm","md","lg","xl"],up:t=>`@media (min-width:${QW[t]}px)`},ult={containerQueries:t=>({up:e=>{let r=typeof e=="number"?e:QW[e]||e;return typeof r=="number"&&(r=`${r}px`),t?`@container ${t} (min-width:${r})`:`@container (min-width:${r})`}})};function $C(t,e,r){const n=t.theme||{};if(Array.isArray(e)){const a=n.breakpoints||Owe;return e.reduce((o,s,d)=>(o[a.up(a.keys[d])]=r(e[d]),o),{})}if(typeof e=="object"){const a=n.breakpoints||Owe;return Object.keys(e).reduce((o,s)=>{if(alt(a.keys,s)){const d=olt(n.containerQueries?n:ult,s);d&&(o[d]=r(e[s],s))}else if(Object.keys(a.values||QW).includes(s)){const d=a.up(s);o[d]=r(e[s],s)}else{const d=s;o[d]=e[d]}return o},{})}return r(e)}function Pze(t={}){return t.keys?.reduce((r,n)=>{const i=t.up(n);return r[i]={},r},{})||{}}function the(t,e){return t.reduce((r,n)=>{const i=r[n];return(!i||Object.keys(i).length===0)&&delete r[n],r},e)}function clt(t,...e){const r=Pze(t),n=[r,...e].reduce((i,a)=>Kx(i,a),{});return the(Object.keys(r),n)}function flt(t,e){if(typeof t!="object")return{};const r={},n=Object.keys(e);return Array.isArray(t)?n.forEach((i,a)=>{a<t.length&&(r[i]=!0)}):n.forEach(i=>{t[i]!=null&&(r[i]=!0)}),r}function OJ({values:t,breakpoints:e,base:r}){const n=r||flt(t,e),i=Object.keys(n);if(i.length===0)return t;let a;return i.reduce((o,s,d)=>(Array.isArray(t)?(o[s]=t[d]!=null?t[d]:t[a],a=d):typeof t=="object"?(o[s]=t[s]!=null?t[s]:t[a],a=s):o[s]=t,o),{})}function ys(t){if(typeof t!="string")throw new Error(kk(7));return t.charAt(0).toUpperCase()+t.slice(1)}function g5(t,e,r=!0){if(!e||typeof e!="string")return null;if(t&&t.vars&&r){const n=`vars.${e}`.split(".").reduce((i,a)=>i&&i[a]?i[a]:null,t);if(n!=null)return n}return e.split(".").reduce((n,i)=>n&&n[i]!=null?n[i]:null,t)}function YG(t,e,r,n=r){let i;return typeof t=="function"?i=t(r):Array.isArray(t)?i=t[r]||n:i=g5(t,r)||n,e&&(i=e(i,n,t)),i}function tb(t){const{prop:e,cssProperty:r=t.prop,themeKey:n,transform:i}=t,a=o=>{if(o[e]==null)return null;const s=o[e],d=o.theme,b=g5(d,n)||{};return $C(o,s,B=>{let V=YG(b,i,B);return B===V&&typeof B=="string"&&(V=YG(b,i,`${e}${B==="default"?"":ys(B)}`,B)),r===!1?V:{[r]:V}})};return a.propTypes={},a.filterProps=[e],a}function dlt(t){const e={};return r=>(e[r]===void 0&&(e[r]=t(r)),e[r])}const hlt={m:"margin",p:"padding"},plt={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Nwe={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},vlt=dlt(t=>{if(t.length>2)if(Nwe[t])t=Nwe[t];else return[t];const[e,r]=t.split(""),n=hlt[e],i=plt[r]||"";return Array.isArray(i)?i.map(a=>n+a):[n+i]}),qve=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Gve=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...qve,...Gve];function wB(t,e,r,n){const i=g5(t,e,!0)??r;return typeof i=="number"||typeof i=="string"?a=>typeof a=="string"?a:typeof i=="string"?i.startsWith("var(")&&a===0?0:i.startsWith("var(")&&a===1?i:`calc(${a} * ${i})`:i*a:Array.isArray(i)?a=>{if(typeof a=="string")return a;const o=Math.abs(a),s=i[o];return a>=0?s:typeof s=="number"?-s:typeof s=="string"&&s.startsWith("var(")?`calc(-1 * ${s})`:`-${s}`}:typeof i=="function"?i:()=>{}}function eY(t){return wB(t,"spacing",8)}function mL(t,e){return typeof e=="string"||e==null?e:t(e)}function mlt(t,e){return r=>t.reduce((n,i)=>(n[i]=mL(e,r),n),{})}function glt(t,e,r,n){if(!e.includes(r))return null;const i=vlt(r),a=mlt(i,n),o=t[r];return $C(t,o,a)}function Dze(t,e){const r=eY(t.theme);return Object.keys(t).map(n=>glt(t,e,n,r)).reduce(jz,{})}function h1(t){return Dze(t,qve)}h1.propTypes={};h1.filterProps=qve;function p1(t){return Dze(t,Gve)}p1.propTypes={};p1.filterProps=Gve;function Lze(t=8,e=eY({spacing:t})){if(t.mui)return t;const r=(...n)=>(n.length===0?[1]:n).map(a=>{const o=e(a);return typeof o=="number"?`${o}px`:o}).join(" ");return r.mui=!0,r}function tY(...t){const e=t.reduce((n,i)=>(i.filterProps.forEach(a=>{n[a]=i}),n),{}),r=n=>Object.keys(n).reduce((i,a)=>e[a]?jz(i,e[a](n)):i,{});return r.propTypes={},r.filterProps=t.reduce((n,i)=>n.concat(i.filterProps),[]),r}function N3(t){return typeof t!="number"?t:`${t}px solid`}function fA(t,e){return tb({prop:t,themeKey:"borders",transform:e})}const ylt=fA("border",N3),blt=fA("borderTop",N3),xlt=fA("borderRight",N3),_lt=fA("borderBottom",N3),wlt=fA("borderLeft",N3),Slt=fA("borderColor"),Tlt=fA("borderTopColor"),Elt=fA("borderRightColor"),Alt=fA("borderBottomColor"),Clt=fA("borderLeftColor"),Mlt=fA("outline",N3),Rlt=fA("outlineColor"),rY=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const e=wB(t.theme,"shape.borderRadius",4),r=n=>({borderRadius:mL(e,n)});return $C(t,t.borderRadius,r)}return null};rY.propTypes={};rY.filterProps=["borderRadius"];tY(ylt,blt,xlt,_lt,wlt,Slt,Tlt,Elt,Alt,Clt,rY,Mlt,Rlt);const nY=t=>{if(t.gap!==void 0&&t.gap!==null){const e=wB(t.theme,"spacing",8),r=n=>({gap:mL(e,n)});return $C(t,t.gap,r)}return null};nY.propTypes={};nY.filterProps=["gap"];const iY=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const e=wB(t.theme,"spacing",8),r=n=>({columnGap:mL(e,n)});return $C(t,t.columnGap,r)}return null};iY.propTypes={};iY.filterProps=["columnGap"];const aY=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const e=wB(t.theme,"spacing",8),r=n=>({rowGap:mL(e,n)});return $C(t,t.rowGap,r)}return null};aY.propTypes={};aY.filterProps=["rowGap"];const klt=tb({prop:"gridColumn"}),Ilt=tb({prop:"gridRow"}),Plt=tb({prop:"gridAutoFlow"}),Dlt=tb({prop:"gridAutoColumns"}),Llt=tb({prop:"gridAutoRows"}),Olt=tb({prop:"gridTemplateColumns"}),Nlt=tb({prop:"gridTemplateRows"}),Flt=tb({prop:"gridTemplateAreas"}),zlt=tb({prop:"gridArea"});tY(nY,iY,aY,klt,Ilt,Plt,Dlt,Llt,Olt,Nlt,Flt,zlt);function DN(t,e){return e==="grey"?e:t}const Blt=tb({prop:"color",themeKey:"palette",transform:DN}),Ult=tb({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:DN}),Hlt=tb({prop:"backgroundColor",themeKey:"palette",transform:DN});tY(Blt,Ult,Hlt);function QT(t){return t<=1&&t!==0?`${t*100}%`:t}const jlt=tb({prop:"width",transform:QT}),$ve=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){const e=r=>{const n=t.theme?.breakpoints?.values?.[r]||QW[r];return n?t.theme?.breakpoints?.unit!=="px"?{maxWidth:`${n}${t.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:QT(r)}};return $C(t,t.maxWidth,e)}return null};$ve.filterProps=["maxWidth"];const Vlt=tb({prop:"minWidth",transform:QT}),qlt=tb({prop:"height",transform:QT}),Glt=tb({prop:"maxHeight",transform:QT}),$lt=tb({prop:"minHeight",transform:QT});tb({prop:"size",cssProperty:"width",transform:QT});tb({prop:"size",cssProperty:"height",transform:QT});const Wlt=tb({prop:"boxSizing"});tY(jlt,$ve,Vlt,qlt,Glt,$lt,Wlt);const SB={border:{themeKey:"borders",transform:N3},borderTop:{themeKey:"borders",transform:N3},borderRight:{themeKey:"borders",transform:N3},borderBottom:{themeKey:"borders",transform:N3},borderLeft:{themeKey:"borders",transform:N3},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:N3},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:rY},color:{themeKey:"palette",transform:DN},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:DN},backgroundColor:{themeKey:"palette",transform:DN},p:{style:p1},pt:{style:p1},pr:{style:p1},pb:{style:p1},pl:{style:p1},px:{style:p1},py:{style:p1},padding:{style:p1},paddingTop:{style:p1},paddingRight:{style:p1},paddingBottom:{style:p1},paddingLeft:{style:p1},paddingX:{style:p1},paddingY:{style:p1},paddingInline:{style:p1},paddingInlineStart:{style:p1},paddingInlineEnd:{style:p1},paddingBlock:{style:p1},paddingBlockStart:{style:p1},paddingBlockEnd:{style:p1},m:{style:h1},mt:{style:h1},mr:{style:h1},mb:{style:h1},ml:{style:h1},mx:{style:h1},my:{style:h1},margin:{style:h1},marginTop:{style:h1},marginRight:{style:h1},marginBottom:{style:h1},marginLeft:{style:h1},marginX:{style:h1},marginY:{style:h1},marginInline:{style:h1},marginInlineStart:{style:h1},marginInlineEnd:{style:h1},marginBlock:{style:h1},marginBlockStart:{style:h1},marginBlockEnd:{style:h1},displayPrint:{cssProperty:!1,transform:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:nY},rowGap:{style:aY},columnGap:{style:iY},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:QT},maxWidth:{style:$ve},minWidth:{transform:QT},height:{transform:QT},maxHeight:{transform:QT},minHeight:{transform:QT},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function Ylt(...t){const e=t.reduce((n,i)=>n.concat(Object.keys(i)),[]),r=new Set(e);return t.every(n=>r.size===Object.keys(n).length)}function Xlt(t,e){return typeof t=="function"?t(e):t}function Zlt(){function t(r,n,i,a){const o={[r]:n,theme:i},s=a[r];if(!s)return{[r]:n};const{cssProperty:d=r,themeKey:b,transform:L,style:B}=s;if(n==null)return null;if(b==="typography"&&n==="inherit")return{[r]:n};const V=g5(i,b)||{};return B?B(o):$C(o,n,ie=>{let de=YG(V,L,ie);return ie===de&&typeof ie=="string"&&(de=YG(V,L,`${r}${ie==="default"?"":ys(ie)}`,ie)),d===!1?de:{[d]:de}})}function e(r){const{sx:n,theme:i={},nested:a}=r||{};if(!n)return null;const o=i.unstable_sxConfig??SB;function s(d){let b=d;if(typeof d=="function")b=d(i);else if(typeof d!="object")return d;if(!b)return null;const L=Pze(i.breakpoints),B=Object.keys(L);let V=L;return Object.keys(b).forEach(X=>{const ie=Xlt(b[X],i);if(ie!=null)if(typeof ie=="object")if(o[X])V=jz(V,t(X,ie,i,o));else{const de=$C({theme:i},ie,ae=>({[X]:ae}));Ylt(de,ie)?V[X]=e({sx:ie,theme:i,nested:!0}):V=jz(V,de)}else V=jz(V,t(X,ie,i,o))}),!a&&i.modularCssLayers?{"@layer sx":Lwe(i,the(B,V))}:Lwe(i,the(B,V))}return Array.isArray(n)?n.map(s):s(n)}return e}const YP=Zlt();YP.filterProps=["sx"];function Klt(t,e){const r=this;if(r.vars){if(!r.colorSchemes?.[t]||typeof r.getColorSchemeSelector!="function")return{};let n=r.getColorSchemeSelector(t);return n==="&"?e:((n.includes("data-")||n.includes("."))&&(n=`*:where(${n.replace(/\s*&$/,"")}) &`),{[n]:e})}return r.palette.mode===t?e:{}}function P8(t={},...e){const{breakpoints:r={},palette:n={},spacing:i,shape:a={},...o}=t,s=ilt(r),d=Lze(i);let b=Kx({breakpoints:s,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:d,shape:{...llt,...a}},o);return b=slt(b),b.applyStyles=Klt,b=e.reduce((L,B)=>Kx(L,B),b),b.unstable_sxConfig={...SB,...o?.unstable_sxConfig},b.unstable_sx=function(B){return YP({sx:B,theme:this})},b}function Jlt(t){return Object.keys(t).length===0}function oY(t=null){const e=ze.useContext(_B);return!e||Jlt(e)?t:e}const Qlt=P8();function TB(t=Qlt){return oY(t)}function NJ(t){const e=HP(t);return t!==e&&e.styles?(e.styles.match(/^@layer\s+[^{]*$/)||(e.styles=`@layer global{${e.styles}}`),e):t}function Oze({styles:t,themeId:e,defaultTheme:r={}}){const n=TB(r),i=e&&n[e]||n;let a=typeof t=="function"?t(i):t;return i.modularCssLayers&&(Array.isArray(a)?a=a.map(o=>NJ(typeof o=="function"?o(i):o)):a=NJ(a)),Ke.jsx(Mze,{styles:a})}const eut=t=>{const e={systemProps:{},otherProps:{}},r=t?.theme?.unstable_sxConfig??SB;return Object.keys(t).forEach(n=>{r[n]?e.systemProps[n]=t[n]:e.otherProps[n]=t[n]}),e};function sY(t){const{sx:e,...r}=t,{systemProps:n,otherProps:i}=eut(r);let a;return Array.isArray(e)?a=[n,...e]:typeof e=="function"?a=(...o)=>{const s=e(...o);return _5(s)?{...n,...s}:n}:a={...n,...e},{...i,sx:a}}const Fwe=t=>t,tut=()=>{let t=Fwe;return{configure(e){t=e},generate(e){return t(e)},reset(){t=Fwe}}},Nze=tut();function Fze(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(r=Fze(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function Vo(){for(var t,e,r=0,n="",i=arguments.length;r<i;r++)(t=arguments[r])&&(e=Fze(t))&&(n&&(n+=" "),n+=e);return n}function rut(t={}){const{themeId:e,defaultTheme:r,defaultClassName:n="MuiBox-root",generateClassName:i}=t,a=Rze("div",{shouldForwardProp:s=>s!=="theme"&&s!=="sx"&&s!=="as"})(YP);return ze.forwardRef(function(d,b){const L=TB(r),{className:B,component:V="div",...X}=sY(d);return Ke.jsx(a,{as:V,ref:b,className:Vo(B,i?i(n):n),theme:e&&L[e]||L,...X})})}const nut={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Al(t,e,r="Mui"){const n=nut[e];return n?`${r}-${n}`:`${Nze.generate(t)}-${e}`}function Ml(t,e,r="Mui"){const n={};return e.forEach(i=>{n[i]=Al(t,i,r)}),n}function zze(t){const{variants:e,...r}=t,n={variants:e,style:HP(r),isProcessed:!0};return n.style===r||e&&e.forEach(i=>{typeof i.style!="function"&&(i.style=HP(i.style))}),n}const iut=P8();function Qq(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}function YD(t,e){return e&&t&&typeof t=="object"&&t.styles&&!t.styles.startsWith("@layer")&&(t.styles=`@layer ${e}{${String(t.styles)}}`),t}function aut(t){return t?(e,r)=>r[t]:null}function out(t,e,r){t.theme=lut(t.theme)?r:t.theme[e]||t.theme}function eG(t,e,r){const n=typeof e=="function"?e(t):e;if(Array.isArray(n))return n.flatMap(i=>eG(t,i,r));if(Array.isArray(n?.variants)){let i;if(n.isProcessed)i=r?YD(n.style,r):n.style;else{const{variants:a,...o}=n;i=r?YD(HP(o),r):o}return Bze(t,n.variants,[i],r)}return n?.isProcessed?r?YD(HP(n.style),r):n.style:r?YD(HP(n),r):n}function Bze(t,e,r=[],n=void 0){let i;e:for(let a=0;a<e.length;a+=1){const o=e[a];if(typeof o.props=="function"){if(i??={...t,...t.ownerState,ownerState:t.ownerState},!o.props(i))continue}else for(const s in o.props)if(t[s]!==o.props[s]&&t.ownerState?.[s]!==o.props[s])continue e;typeof o.style=="function"?(i??={...t,...t.ownerState,ownerState:t.ownerState},r.push(n?YD(HP(o.style(i)),n):o.style(i))):r.push(n?YD(HP(o.style),n):o.style)}return r}function Uze(t={}){const{themeId:e,defaultTheme:r=iut,rootShouldForwardProp:n=Qq,slotShouldForwardProp:i=Qq}=t;function a(s){out(s,e,r)}return(s,d={})=>{elt(s,Ie=>Ie.filter(Ve=>Ve!==YP));const{name:b,slot:L,skipVariantsResolver:B,skipSx:V,overridesResolver:X=aut(cut(L)),...ie}=d,de=b&&b.startsWith("Mui")||L?"components":"custom",ae=B!==void 0?B:L&&L!=="Root"&&L!=="root"||!1,U=V||!1;let ve=Qq;L==="Root"||L==="root"?ve=n:L?ve=i:uut(s)&&(ve=void 0);const Se=Rze(s,{shouldForwardProp:ve,label:sut(),...ie}),Pe=Ie=>{if(Ie.__emotion_real===Ie)return Ie;if(typeof Ie=="function")return function(Ze){return eG(Ze,Ie,Ze.theme.modularCssLayers?de:void 0)};if(_5(Ie)){const Ve=zze(Ie);return function(Je){return Ve.variants?eG(Je,Ve,Je.theme.modularCssLayers?de:void 0):Je.theme.modularCssLayers?YD(Ve.style,de):Ve.style}}return Ie},Me=(...Ie)=>{const Ve=[],Ze=Ie.map(Pe),Je=[];if(Ve.push(a),b&&X&&Je.push(function(_t){const qt=_t.theme.components?.[b]?.styleOverrides;if(!qt)return null;const Lt={};for(const dr in qt)Lt[dr]=eG(_t,qt[dr],_t.theme.modularCssLayers?"theme":void 0);return X(_t,Lt)}),b&&!ae&&Je.push(function(_t){const qt=_t.theme?.components?.[b]?.variants;return qt?Bze(_t,qt,[],_t.theme.modularCssLayers?"theme":void 0):null}),U||Je.push(YP),Array.isArray(Ze[0])){const ht=Ze.shift(),_t=new Array(Ve.length).fill(""),Dt=new Array(Je.length).fill("");let qt;qt=[..._t,...ht,...Dt],qt.raw=[..._t,...ht.raw,...Dt],Ve.unshift(qt)}const nt=[...Ve,...Ze,...Je],ut=Se(...nt);return s.muiName&&(ut.muiName=s.muiName),ut};return Se.withConfig&&(Me.withConfig=Se.withConfig),Me}}function sut(t,e){return void 0}function lut(t){for(const e in t)return!1;return!0}function uut(t){return typeof t=="string"&&t.charCodeAt(0)>96}function cut(t){return t&&t.charAt(0).toLowerCase()+t.slice(1)}const gp=Uze();function gL(t,e,r=!1){const n={...e};for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)){const a=i;if(a==="components"||a==="slots")n[a]={...t[a],...n[a]};else if(a==="componentsProps"||a==="slotProps"){const o=t[a],s=e[a];if(!s)n[a]=o||{};else if(!o)n[a]=s;else{n[a]={...s};for(const d in o)if(Object.prototype.hasOwnProperty.call(o,d)){const b=d;n[a][b]=gL(o[b],s[b],r)}}}else a==="className"&&r&&e.className?n.className=Vo(t?.className,e?.className):a==="style"&&r&&e.style?n.style={...t?.style,...e?.style}:n[a]===void 0&&(n[a]=t[a])}return n}function Wve(t){const{theme:e,name:r,props:n}=t;return!e||!e.components||!e.components[r]||!e.components[r].defaultProps?n:gL(e.components[r].defaultProps,n)}function lY({props:t,name:e,defaultTheme:r,themeId:n}){let i=TB(r);return n&&(i=i[n]||i),Wve({theme:i,name:e,props:t})}const Ah=typeof window<"u"?ze.useLayoutEffect:ze.useEffect;function fut(t,e,r,n,i){const[a,o]=ze.useState(()=>i&&r?r(t).matches:n?n(t).matches:e);return Ah(()=>{if(!r)return;const s=r(t),d=()=>{o(s.matches)};return d(),s.addEventListener("change",d),()=>{s.removeEventListener("change",d)}},[t,r]),a}const dut={...VG},Hze=dut.useSyncExternalStore;function hut(t,e,r,n,i){const a=ze.useCallback(()=>e,[e]),o=ze.useMemo(()=>{if(i&&r)return()=>r(t).matches;if(n!==null){const{matches:L}=n(t);return()=>L}return a},[a,t,n,i,r]),[s,d]=ze.useMemo(()=>{if(r===null)return[a,()=>()=>{}];const L=r(t);return[()=>L.matches,B=>(L.addEventListener("change",B),()=>{L.removeEventListener("change",B)})]},[a,r,t]);return Hze(d,s,o)}function jze(t={}){const{themeId:e}=t;return function(n,i={}){let a=oY();a&&e&&(a=a[e]||a);const o=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:s=!1,matchMedia:d=o?window.matchMedia:null,ssrMatchMedia:b=null,noSsr:L=!1}=Wve({name:"MuiUseMediaQuery",props:i,theme:a});let B=typeof n=="function"?n(a):n;return B=B.replace(/^@media( ?)/m,""),B.includes("print")&&console.warn(["MUI: You have provided a `print` query to the `useMediaQuery` hook.","Using the print media query to modify print styles can lead to unexpected results.","Consider using the `displayPrint` field in the `sx` prop instead.","More information about `displayPrint` on our docs: https://mui.com/system/display/#display-in-print."].join(`
`)),(Hze!==void 0?hut:fut)(B,s,d,b,L)}}jze();function dN(t,e=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(t,r))}function Yve(t,e=0,r=1){return dN(t,e,r)}function put(t){t=t.slice(1);const e=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let r=t.match(e);return r&&r[0].length===1&&(r=r.map(n=>n+n)),r?`rgb${r.length===4?"a":""}(${r.map((n,i)=>i<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function XP(t){if(t.type)return t;if(t.charAt(0)==="#")return XP(put(t));const e=t.indexOf("("),r=t.substring(0,e);if(!["rgb","rgba","hsl","hsla","color"].includes(r))throw new Error(kk(9,t));let n=t.substring(e+1,t.length-1),i;if(r==="color"){if(n=n.split(" "),i=n.shift(),n.length===4&&n[3].charAt(0)==="/"&&(n[3]=n[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(i))throw new Error(kk(10,i))}else n=n.split(",");return n=n.map(a=>parseFloat(a)),{type:r,values:n,colorSpace:i}}const vut=t=>{const e=XP(t);return e.values.slice(0,3).map((r,n)=>e.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},Sz=(t,e)=>{try{return vut(t)}catch{return t}};function uY(t){const{type:e,colorSpace:r}=t;let{values:n}=t;return e.includes("rgb")?n=n.map((i,a)=>a<3?parseInt(i,10):i):e.includes("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),e.includes("color")?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${e}(${n})`}function Vze(t){t=XP(t);const{values:e}=t,r=e[0],n=e[1]/100,i=e[2]/100,a=n*Math.min(i,1-i),o=(b,L=(b+r/30)%12)=>i-a*Math.max(Math.min(L-3,9-L,1),-1);let s="rgb";const d=[Math.round(o(0)*255),Math.round(o(8)*255),Math.round(o(4)*255)];return t.type==="hsla"&&(s+="a",d.push(e[3])),uY({type:s,values:d})}function rhe(t){t=XP(t);let e=t.type==="hsl"||t.type==="hsla"?XP(Vze(t)).values:t.values;return e=e.map(r=>(t.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function mut(t,e){const r=rhe(t),n=rhe(e);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function Jx(t,e){return t=XP(t),e=Yve(e),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.type==="color"?t.values[3]=`/${e}`:t.values[3]=e,uY(t)}function sD(t,e,r){try{return Jx(t,e)}catch{return t}}function EB(t,e){if(t=XP(t),e=Yve(e),t.type.includes("hsl"))t.values[2]*=1-e;else if(t.type.includes("rgb")||t.type.includes("color"))for(let r=0;r<3;r+=1)t.values[r]*=1-e;return uY(t)}function vg(t,e,r){try{return EB(t,e)}catch{return t}}function AB(t,e){if(t=XP(t),e=Yve(e),t.type.includes("hsl"))t.values[2]+=(100-t.values[2])*e;else if(t.type.includes("rgb"))for(let r=0;r<3;r+=1)t.values[r]+=(255-t.values[r])*e;else if(t.type.includes("color"))for(let r=0;r<3;r+=1)t.values[r]+=(1-t.values[r])*e;return uY(t)}function mg(t,e,r){try{return AB(t,e)}catch{return t}}function A9(t,e=.15){return rhe(t)>.5?EB(t,e):AB(t,e)}function YH(t,e,r){try{return A9(t,e)}catch{return t}}const qze=ze.createContext(null);function Xve(){return ze.useContext(qze)}const gut=typeof Symbol=="function"&&Symbol.for,yut=gut?Symbol.for("mui.nested"):"__THEME_NESTED__";function but(t,e){return typeof e=="function"?e(t):{...t,...e}}function xut(t){const{children:e,theme:r}=t,n=Xve(),i=ze.useMemo(()=>{const a=n===null?{...r}:but(n,r);return a!=null&&(a[yut]=n!==null),a},[r,n]);return Ke.jsx(qze.Provider,{value:i,children:e})}const Gze=ze.createContext();function _ut({value:t,...e}){return Ke.jsx(Gze.Provider,{value:t??!0,...e})}const Kv=()=>ze.useContext(Gze)??!1,$ze=ze.createContext(void 0);function wut({value:t,children:e}){return Ke.jsx($ze.Provider,{value:t,children:e})}function Sut(t){const{theme:e,name:r,props:n}=t;if(!e||!e.components||!e.components[r])return n;const i=e.components[r];return i.defaultProps?gL(i.defaultProps,n,e.components.mergeClassNameAndStyle):!i.styleOverrides&&!i.variants?gL(i,n,e.components.mergeClassNameAndStyle):n}function Tut({props:t,name:e}){const r=ze.useContext($ze);return Sut({props:t,name:e,theme:{components:r}})}let zwe=0;function Eut(t){const[e,r]=ze.useState(t),n=t||e;return ze.useEffect(()=>{e==null&&(zwe+=1,r(`mui-${zwe}`))},[e]),n}const Aut={...VG},Bwe=Aut.useId;function Vd(t){if(Bwe!==void 0){const e=Bwe();return t??e}return Eut(t)}function Cut(t){const e=oY(),r=Vd()||"",{modularCssLayers:n}=t;let i="mui.global, mui.components, mui.theme, mui.custom, mui.sx";return!n||e!==null?i="":typeof n=="string"?i=n.replace(/mui(?!\.)/g,i):i=`@layer ${i};`,Ah(()=>{const a=document.querySelector("head");if(!a)return;const o=a.firstChild;if(i){if(o&&o.hasAttribute?.("data-mui-layer-order")&&o.getAttribute("data-mui-layer-order")===r)return;const s=document.createElement("style");s.setAttribute("data-mui-layer-order",r),s.textContent=i,a.prepend(s)}else a.querySelector(`style[data-mui-layer-order="${r}"]`)?.remove()},[i,r]),i?Ke.jsx(Oze,{styles:i}):null}const Uwe={};function Hwe(t,e,r,n=!1){return ze.useMemo(()=>{const i=t&&e[t]||e;if(typeof r=="function"){const a=r(i),o=t?{...e,[t]:a}:a;return n?()=>o:o}return t?{...e,[t]:r}:{...e,...r}},[t,e,r,n])}function Wze(t){const{children:e,theme:r,themeId:n}=t,i=oY(Uwe),a=Xve()||Uwe,o=Hwe(n,i,r),s=Hwe(n,a,r,!0),d=(n?o[n]:o).direction==="rtl",b=Cut(o);return Ke.jsx(xut,{theme:s,children:Ke.jsx(_B.Provider,{value:o,children:Ke.jsx(_ut,{value:d,children:Ke.jsxs(wut,{value:n?o[n].components:o.components,children:[b,e]})})})})}const jwe={theme:void 0};function Mut(t){let e,r;return function(i){let a=e;return(a===void 0||i.theme!==r)&&(jwe.theme=i.theme,a=zze(t(jwe)),e=a,r=i.theme),a}}const Zve="mode",Kve="color-scheme",Rut="data-color-scheme";function kut(t){const{defaultMode:e="system",defaultLightColorScheme:r="light",defaultDarkColorScheme:n="dark",modeStorageKey:i=Zve,colorSchemeStorageKey:a=Kve,attribute:o=Rut,colorSchemeNode:s="document.documentElement",nonce:d}=t||{};let b="",L=o;if(o==="class"&&(L=".%s"),o==="data"&&(L="[data-%s]"),L.startsWith(".")){const V=L.substring(1);b+=`${s}.classList.remove('${V}'.replace('%s', light), '${V}'.replace('%s', dark));
      ${s}.classList.add('${V}'.replace('%s', colorScheme));`}const B=L.match(/\[([^[\]]+)\]/);if(B){const[V,X]=B[1].split("=");X||(b+=`${s}.removeAttribute('${V}'.replace('%s', light));
      ${s}.removeAttribute('${V}'.replace('%s', dark));`),b+=`
      ${s}.setAttribute('${V}'.replace('%s', colorScheme), ${X?`${X}.replace('%s', colorScheme)`:'""'});`}else b+=`${s}.setAttribute('${L}', colorScheme);`;return Ke.jsx("script",{suppressHydrationWarning:!0,nonce:typeof window>"u"?d:"",dangerouslySetInnerHTML:{__html:`(function() {
try {
  let colorScheme = '';
  const mode = localStorage.getItem('${i}') || '${e}';
  const dark = localStorage.getItem('${a}-dark') || '${n}';
  const light = localStorage.getItem('${a}-light') || '${r}';
  if (mode === 'system') {
    // handle system mode
    const mql = window.matchMedia('(prefers-color-scheme: dark)');
    if (mql.matches) {
      colorScheme = dark
    } else {
      colorScheme = light
    }
  }
  if (mode === 'light') {
    colorScheme = light;
  }
  if (mode === 'dark') {
    colorScheme = dark;
  }
  if (colorScheme) {
    ${b}
  }
} catch(e){}})();`}},"mui-color-scheme-init")}function Iut(){}const Put=({key:t,storageWindow:e})=>(!e&&typeof window<"u"&&(e=window),{get(r){if(typeof window>"u")return;if(!e)return r;let n;try{n=e.localStorage.getItem(t)}catch{}return n||r},set:r=>{if(e)try{e.localStorage.setItem(t,r)}catch{}},subscribe:r=>{if(!e)return Iut;const n=i=>{const a=i.newValue;i.key===t&&r(a)};return e.addEventListener("storage",n),()=>{e.removeEventListener("storage",n)}}});function FJ(){}function Vwe(t){if(typeof window<"u"&&typeof window.matchMedia=="function"&&t==="system")return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Yze(t,e){if(t.mode==="light"||t.mode==="system"&&t.systemMode==="light")return e("light");if(t.mode==="dark"||t.mode==="system"&&t.systemMode==="dark")return e("dark")}function Dut(t){return Yze(t,e=>{if(e==="light")return t.lightColorScheme;if(e==="dark")return t.darkColorScheme})}function Lut(t){const{defaultMode:e="light",defaultLightColorScheme:r,defaultDarkColorScheme:n,supportedColorSchemes:i=[],modeStorageKey:a=Zve,colorSchemeStorageKey:o=Kve,storageWindow:s=typeof window>"u"?void 0:window,storageManager:d=Put,noSsr:b=!1}=t,L=i.join(","),B=i.length>1,V=ze.useMemo(()=>d?.({key:a,storageWindow:s}),[d,a,s]),X=ze.useMemo(()=>d?.({key:`${o}-light`,storageWindow:s}),[d,o,s]),ie=ze.useMemo(()=>d?.({key:`${o}-dark`,storageWindow:s}),[d,o,s]),[de,ae]=ze.useState(()=>{const Ze=V?.get(e)||e,Je=X?.get(r)||r,nt=ie?.get(n)||n;return{mode:Ze,systemMode:Vwe(Ze),lightColorScheme:Je,darkColorScheme:nt}}),[U,ve]=ze.useState(b||!B);ze.useEffect(()=>{ve(!0)},[]);const Se=Dut(de),Pe=ze.useCallback(Ze=>{ae(Je=>{if(Ze===Je.mode)return Je;const nt=Ze??e;return V?.set(nt),{...Je,mode:nt,systemMode:Vwe(nt)}})},[V,e]),Me=ze.useCallback(Ze=>{Ze?typeof Ze=="string"?Ze&&!L.includes(Ze)?console.error(`\`${Ze}\` does not exist in \`theme.colorSchemes\`.`):ae(Je=>{const nt={...Je};return Yze(Je,ut=>{ut==="light"&&(X?.set(Ze),nt.lightColorScheme=Ze),ut==="dark"&&(ie?.set(Ze),nt.darkColorScheme=Ze)}),nt}):ae(Je=>{const nt={...Je},ut=Ze.light===null?r:Ze.light,ht=Ze.dark===null?n:Ze.dark;return ut&&(L.includes(ut)?(nt.lightColorScheme=ut,X?.set(ut)):console.error(`\`${ut}\` does not exist in \`theme.colorSchemes\`.`)),ht&&(L.includes(ht)?(nt.darkColorScheme=ht,ie?.set(ht)):console.error(`\`${ht}\` does not exist in \`theme.colorSchemes\`.`)),nt}):ae(Je=>(X?.set(r),ie?.set(n),{...Je,lightColorScheme:r,darkColorScheme:n}))},[L,X,ie,r,n]),Ie=ze.useCallback(Ze=>{de.mode==="system"&&ae(Je=>{const nt=Ze?.matches?"dark":"light";return Je.systemMode===nt?Je:{...Je,systemMode:nt}})},[de.mode]),Ve=ze.useRef(Ie);return Ve.current=Ie,ze.useEffect(()=>{if(typeof window.matchMedia!="function"||!B)return;const Ze=(...nt)=>Ve.current(...nt),Je=window.matchMedia("(prefers-color-scheme: dark)");return Je.addListener(Ze),Ze(Je),()=>{Je.removeListener(Ze)}},[B]),ze.useEffect(()=>{if(B){const Ze=V?.subscribe(ut=>{(!ut||["light","dark","system"].includes(ut))&&Pe(ut||e)})||FJ,Je=X?.subscribe(ut=>{(!ut||L.match(ut))&&Me({light:ut})})||FJ,nt=ie?.subscribe(ut=>{(!ut||L.match(ut))&&Me({dark:ut})})||FJ;return()=>{Ze(),Je(),nt()}}},[Me,Pe,L,e,s,B,V,X,ie]),{...de,mode:U?de.mode:void 0,systemMode:U?de.systemMode:void 0,colorScheme:U?Se:void 0,setMode:Pe,setColorScheme:Me}}const Out="*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function Nut(t){const{themeId:e,theme:r={},modeStorageKey:n=Zve,colorSchemeStorageKey:i=Kve,disableTransitionOnChange:a=!1,defaultColorScheme:o,resolveTheme:s}=t,d={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},b=ze.createContext(void 0),L=()=>ze.useContext(b)||d,B={},V={};function X(U){const{children:ve,theme:Se,modeStorageKey:Pe=n,colorSchemeStorageKey:Me=i,disableTransitionOnChange:Ie=a,storageManager:Ve,storageWindow:Ze=typeof window>"u"?void 0:window,documentNode:Je=typeof document>"u"?void 0:document,colorSchemeNode:nt=typeof document>"u"?void 0:document.documentElement,disableNestedContext:ut=!1,disableStyleSheetGeneration:ht=!1,defaultMode:_t="system",forceThemeRerender:Dt=!1,noSsr:qt}=U,Lt=ze.useRef(!1),dr=Xve(),Zt=ze.useContext(b),Cr=!!Zt&&!ut,yt=ze.useMemo(()=>Se||(typeof r=="function"?r():r),[Se]),Vt=yt[e],Er=Vt||yt,{colorSchemes:sr=B,components:or=V,cssVarPrefix:Ar}=Er,Ir=Object.keys(sr).filter(Wn=>!!sr[Wn]).join(","),_n=ze.useMemo(()=>Ir.split(","),[Ir]),Un=typeof o=="string"?o:o.light,Qn=typeof o=="string"?o:o.dark,Jn=sr[Un]&&sr[Qn]?_t:sr[Er.defaultColorScheme]?.palette?.mode||Er.palette?.mode,{mode:Vn,setMode:jn,systemMode:Lr,lightColorScheme:Yn,darkColorScheme:On,colorScheme:Sn,setColorScheme:bn}=Lut({supportedColorSchemes:_n,defaultLightColorScheme:Un,defaultDarkColorScheme:Qn,modeStorageKey:Pe,colorSchemeStorageKey:Me,defaultMode:Jn,storageManager:Ve,storageWindow:Ze,noSsr:qt});let Mn=Vn,gi=Sn;Cr&&(Mn=Zt.mode,gi=Zt.colorScheme);let Oi=gi||Er.defaultColorScheme;Er.vars&&!Dt&&(Oi=Er.defaultColorScheme);const Pa=ze.useMemo(()=>{const Wn=Er.generateThemeVars?.()||Er.vars,Ei={...Er,components:or,colorSchemes:sr,cssVarPrefix:Ar,vars:Wn};if(typeof Ei.generateSpacing=="function"&&(Ei.spacing=Ei.generateSpacing()),Oi){const Ki=sr[Oi];Ki&&typeof Ki=="object"&&Object.keys(Ki).forEach(sa=>{Ki[sa]&&typeof Ki[sa]=="object"?Ei[sa]={...Ei[sa],...Ki[sa]}:Ei[sa]=Ki[sa]})}return s?s(Ei):Ei},[Er,Oi,or,sr,Ar]),va=Er.colorSchemeSelector;Ah(()=>{if(gi&&nt&&va&&va!=="media"){const Wn=va;let Ei=va;if(Wn==="class"&&(Ei=".%s"),Wn==="data"&&(Ei="[data-%s]"),Wn?.startsWith("data-")&&!Wn.includes("%s")&&(Ei=`[${Wn}="%s"]`),Ei.startsWith("."))nt.classList.remove(..._n.map(Ki=>Ei.substring(1).replace("%s",Ki))),nt.classList.add(Ei.substring(1).replace("%s",gi));else{const Ki=Ei.replace("%s",gi).match(/\[([^\]]+)\]/);if(Ki){const[sa,xa]=Ki[1].split("=");xa||_n.forEach(Qa=>{nt.removeAttribute(sa.replace(gi,Qa))}),nt.setAttribute(sa,xa?xa.replace(/"|'/g,""):"")}else nt.setAttribute(Ei,gi)}}},[gi,va,nt,_n]),ze.useEffect(()=>{let Wn;if(Ie&&Lt.current&&Je){const Ei=Je.createElement("style");Ei.appendChild(Je.createTextNode(Out)),Je.head.appendChild(Ei),window.getComputedStyle(Je.body),Wn=setTimeout(()=>{Je.head.removeChild(Ei)},1)}return()=>{clearTimeout(Wn)}},[gi,Ie,Je]),ze.useEffect(()=>(Lt.current=!0,()=>{Lt.current=!1}),[]);const ti=ze.useMemo(()=>({allColorSchemes:_n,colorScheme:gi,darkColorScheme:On,lightColorScheme:Yn,mode:Mn,setColorScheme:bn,setMode:jn,systemMode:Lr}),[_n,gi,On,Yn,Mn,bn,jn,Lr,Pa.colorSchemeSelector]);let Tn=!0;(ht||Er.cssVariables===!1||Cr&&dr?.cssVarPrefix===Ar)&&(Tn=!1);const bi=Ke.jsxs(ze.Fragment,{children:[Ke.jsx(Wze,{themeId:Vt?e:void 0,theme:Pa,children:ve}),Tn&&Ke.jsx(Mze,{styles:Pa.generateStyleSheets?.()||[]})]});return Cr?bi:Ke.jsx(b.Provider,{value:ti,children:bi})}const ie=typeof o=="string"?o:o.light,de=typeof o=="string"?o:o.dark;return{CssVarsProvider:X,useColorScheme:L,getInitColorSchemeScript:U=>kut({colorSchemeStorageKey:i,defaultLightColorScheme:ie,defaultDarkColorScheme:de,modeStorageKey:n,...U})}}function Fut(t=""){function e(...n){if(!n.length)return"";const i=n[0];return typeof i=="string"&&!i.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${t?`${t}-`:""}${i}${e(...n.slice(1))})`:`, ${i}`}return(n,...i)=>`var(--${t?`${t}-`:""}${n}${e(...i)})`}const qwe=(t,e,r,n=[])=>{let i=t;e.forEach((a,o)=>{o===e.length-1?Array.isArray(i)?i[Number(a)]=r:i&&typeof i=="object"&&(i[a]=r):i&&typeof i=="object"&&(i[a]||(i[a]=n.includes(a)?[]:{}),i=i[a])})},zut=(t,e,r)=>{function n(i,a=[],o=[]){Object.entries(i).forEach(([s,d])=>{(!r||r&&!r([...a,s]))&&d!=null&&(typeof d=="object"&&Object.keys(d).length>0?n(d,[...a,s],Array.isArray(d)?[...o,s]:o):e([...a,s],d,o))})}n(t)},But=(t,e)=>typeof e=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(n=>t.includes(n))||t[t.length-1].toLowerCase().includes("opacity")?e:`${e}px`:e;function zJ(t,e){const{prefix:r,shouldSkipGeneratingVar:n}=e||{},i={},a={},o={};return zut(t,(s,d,b)=>{if((typeof d=="string"||typeof d=="number")&&(!n||!n(s,d))){const L=`--${r?`${r}-`:""}${s.join("-")}`,B=But(s,d);Object.assign(i,{[L]:B}),qwe(a,s,`var(${L})`,b),qwe(o,s,`var(${L}, ${B})`,b)}},s=>s[0]==="vars"),{css:i,vars:a,varsWithDefaults:o}}function Uut(t,e={}){const{getSelector:r=U,disableCssColorScheme:n,colorSchemeSelector:i,enableContrastVars:a}=e,{colorSchemes:o={},components:s,defaultColorScheme:d="light",...b}=t,{vars:L,css:B,varsWithDefaults:V}=zJ(b,e);let X=V;const ie={},{[d]:de,...ae}=o;if(Object.entries(ae||{}).forEach(([Pe,Me])=>{const{vars:Ie,css:Ve,varsWithDefaults:Ze}=zJ(Me,e);X=Kx(X,Ze),ie[Pe]={css:Ve,vars:Ie}}),de){const{css:Pe,vars:Me,varsWithDefaults:Ie}=zJ(de,e);X=Kx(X,Ie),ie[d]={css:Pe,vars:Me}}function U(Pe,Me){let Ie=i;if(i==="class"&&(Ie=".%s"),i==="data"&&(Ie="[data-%s]"),i?.startsWith("data-")&&!i.includes("%s")&&(Ie=`[${i}="%s"]`),Pe){if(Ie==="media")return t.defaultColorScheme===Pe?":root":{[`@media (prefers-color-scheme: ${o[Pe]?.palette?.mode||Pe})`]:{":root":Me}};if(Ie)return t.defaultColorScheme===Pe?`:root, ${Ie.replace("%s",String(Pe))}`:Ie.replace("%s",String(Pe))}return":root"}return{vars:X,generateThemeVars:()=>{let Pe={...L};return Object.entries(ie).forEach(([,{vars:Me}])=>{Pe=Kx(Pe,Me)}),Pe},generateStyleSheets:()=>{const Pe=[],Me=t.defaultColorScheme||"light";function Ie(Je,nt){Object.keys(nt).length&&Pe.push(typeof Je=="string"?{[Je]:{...nt}}:Je)}Ie(r(void 0,{...B}),B);const{[Me]:Ve,...Ze}=ie;if(Ve){const{css:Je}=Ve,nt=o[Me]?.palette?.mode,ut=!n&&nt?{colorScheme:nt,...Je}:{...Je};Ie(r(Me,{...ut}),ut)}return Object.entries(Ze).forEach(([Je,{css:nt}])=>{const ut=o[Je]?.palette?.mode,ht=!n&&ut?{colorScheme:ut,...nt}:{...nt};Ie(r(Je,{...ht}),ht)}),a&&Pe.push({":root":{"--__l-threshold":"0.7","--__l":"clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)","--__a":"clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)"}}),Pe}}}function Hut(t){return function(r){return t==="media"?`@media (prefers-color-scheme: ${r})`:t?t.startsWith("data-")&&!t.includes("%s")?`[${t}="${r}"] &`:t==="class"?`.${r} &`:t==="data"?`[data-${r}] &`:`${t.replace("%s",r)} &`:"&"}}function Cs(t,e,r=void 0){const n={};for(const i in t){const a=t[i];let o="",s=!0;for(let d=0;d<a.length;d+=1){const b=a[d];b&&(o+=(s===!0?"":" ")+e(b),s=!1,r&&r[b]&&(o+=" "+r[b]))}n[i]=o}return n}const jut=P8(),Vut=gp("div",{name:"MuiContainer",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[`maxWidth${ys(String(r.maxWidth))}`],r.fixed&&e.fixed,r.disableGutters&&e.disableGutters]}}),qut=t=>lY({props:t,name:"MuiContainer",defaultTheme:jut}),Gut=(t,e)=>{const r=d=>Al(e,d),{classes:n,fixed:i,disableGutters:a,maxWidth:o}=t,s={root:["root",o&&`maxWidth${ys(String(o))}`,i&&"fixed",a&&"disableGutters"]};return Cs(s,r,n)};function $ut(t={}){const{createStyledComponent:e=Vut,useThemeProps:r=qut,componentName:n="MuiContainer"}=t,i=e(({theme:o,ownerState:s})=>({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",...!s.disableGutters&&{paddingLeft:o.spacing(2),paddingRight:o.spacing(2),[o.breakpoints.up("sm")]:{paddingLeft:o.spacing(3),paddingRight:o.spacing(3)}}}),({theme:o,ownerState:s})=>s.fixed&&Object.keys(o.breakpoints.values).reduce((d,b)=>{const L=b,B=o.breakpoints.values[L];return B!==0&&(d[o.breakpoints.up(L)]={maxWidth:`${B}${o.breakpoints.unit}`}),d},{}),({theme:o,ownerState:s})=>({...s.maxWidth==="xs"&&{[o.breakpoints.up("xs")]:{maxWidth:Math.max(o.breakpoints.values.xs,444)}},...s.maxWidth&&s.maxWidth!=="xs"&&{[o.breakpoints.up(s.maxWidth)]:{maxWidth:`${o.breakpoints.values[s.maxWidth]}${o.breakpoints.unit}`}}}));return ze.forwardRef(function(s,d){const b=r(s),{className:L,component:B="div",disableGutters:V=!1,fixed:X=!1,maxWidth:ie="lg",classes:de,...ae}=b,U={...b,component:B,disableGutters:V,fixed:X,maxWidth:ie},ve=Gut(U,n);return Ke.jsx(i,{as:B,ownerState:U,className:Vo(ve.root,L),ref:d,...ae})})}function LN(t,e){return ze.isValidElement(t)&&e.indexOf(t.type.muiName??t.type?._payload?.value?.muiName)!==-1}const Wut=(t,e)=>t.filter(r=>e.includes(r)),D8=(t,e,r)=>{const n=t.keys[0];Array.isArray(e)?e.forEach((i,a)=>{r((o,s)=>{a<=t.keys.length-1&&(a===0?Object.assign(o,s):o[t.up(t.keys[a])]=s)},i)}):e&&typeof e=="object"?(Object.keys(e).length>t.keys.length?t.keys:Wut(t.keys,Object.keys(e))).forEach(a=>{if(t.keys.includes(a)){const o=e[a];o!==void 0&&r((s,d)=>{n===a?Object.assign(s,d):s[t.up(a)]=d},o)}}):(typeof e=="number"||typeof e=="string")&&r((i,a)=>{Object.assign(i,a)},e)};function XG(t){return`--Grid-${t}Spacing`}function cY(t){return`--Grid-parent-${t}Spacing`}const Gwe="--Grid-columns",ON="--Grid-parent-columns",Yut=({theme:t,ownerState:e})=>{const r={};return D8(t.breakpoints,e.size,(n,i)=>{let a={};i==="grow"&&(a={flexBasis:0,flexGrow:1,maxWidth:"100%"}),i==="auto"&&(a={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),typeof i=="number"&&(a={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${i} / var(${ON}) - (var(${ON}) - ${i}) * (var(${cY("column")}) / var(${ON})))`}),n(r,a)}),r},Xut=({theme:t,ownerState:e})=>{const r={};return D8(t.breakpoints,e.offset,(n,i)=>{let a={};i==="auto"&&(a={marginLeft:"auto"}),typeof i=="number"&&(a={marginLeft:i===0?"0px":`calc(100% * ${i} / var(${ON}) + var(${cY("column")}) * ${i} / var(${ON}))`}),n(r,a)}),r},Zut=({theme:t,ownerState:e})=>{if(!e.container)return{};const r={[Gwe]:12};return D8(t.breakpoints,e.columns,(n,i)=>{const a=i??12;n(r,{[Gwe]:a,"> *":{[ON]:a}})}),r},Kut=({theme:t,ownerState:e})=>{if(!e.container)return{};const r={};return D8(t.breakpoints,e.rowSpacing,(n,i)=>{const a=typeof i=="string"?i:t.spacing?.(i);n(r,{[XG("row")]:a,"> *":{[cY("row")]:a}})}),r},Jut=({theme:t,ownerState:e})=>{if(!e.container)return{};const r={};return D8(t.breakpoints,e.columnSpacing,(n,i)=>{const a=typeof i=="string"?i:t.spacing?.(i);n(r,{[XG("column")]:a,"> *":{[cY("column")]:a}})}),r},Qut=({theme:t,ownerState:e})=>{if(!e.container)return{};const r={};return D8(t.breakpoints,e.direction,(n,i)=>{n(r,{flexDirection:i})}),r},ect=({ownerState:t})=>({minWidth:0,boxSizing:"border-box",...t.container&&{display:"flex",flexWrap:"wrap",...t.wrap&&t.wrap!=="wrap"&&{flexWrap:t.wrap},gap:`var(${XG("row")}) var(${XG("column")})`}}),tct=t=>{const e=[];return Object.entries(t).forEach(([r,n])=>{n!==!1&&n!==void 0&&e.push(`grid-${r}-${String(n)}`)}),e},rct=(t,e="xs")=>{function r(n){return n===void 0?!1:typeof n=="string"&&!Number.isNaN(Number(n))||typeof n=="number"&&n>0}if(r(t))return[`spacing-${e}-${String(t)}`];if(typeof t=="object"&&!Array.isArray(t)){const n=[];return Object.entries(t).forEach(([i,a])=>{r(a)&&n.push(`spacing-${i}-${String(a)}`)}),n}return[]},nct=t=>t===void 0?[]:typeof t=="object"?Object.entries(t).map(([e,r])=>`direction-${e}-${r}`):[`direction-xs-${String(t)}`];function ict(t,e){t.item!==void 0&&delete t.item,t.zeroMinWidth!==void 0&&delete t.zeroMinWidth,e.keys.forEach(r=>{t[r]!==void 0&&delete t[r]})}const act=P8(),oct=gp("div",{name:"MuiGrid",slot:"Root"});function sct(t){return lY({props:t,name:"MuiGrid",defaultTheme:act})}function lct(t={}){const{createStyledComponent:e=oct,useThemeProps:r=sct,useTheme:n=TB,componentName:i="MuiGrid"}=t,a=(b,L)=>{const{container:B,direction:V,spacing:X,wrap:ie,size:de}=b,ae={root:["root",B&&"container",ie!=="wrap"&&`wrap-xs-${String(ie)}`,...nct(V),...tct(de),...B?rct(X,L.breakpoints.keys[0]):[]]};return Cs(ae,U=>Al(i,U),{})};function o(b,L,B=()=>!0){const V={};return b===null||(Array.isArray(b)?b.forEach((X,ie)=>{X!==null&&B(X)&&L.keys[ie]&&(V[L.keys[ie]]=X)}):typeof b=="object"?Object.keys(b).forEach(X=>{const ie=b[X];ie!=null&&B(ie)&&(V[X]=ie)}):V[L.keys[0]]=b),V}const s=e(Zut,Jut,Kut,Yut,Qut,ect,Xut),d=ze.forwardRef(function(L,B){const V=n(),X=r(L),ie=sY(X);ict(ie,V.breakpoints);const{className:de,children:ae,columns:U=12,container:ve=!1,component:Se="div",direction:Pe="row",wrap:Me="wrap",size:Ie={},offset:Ve={},spacing:Ze=0,rowSpacing:Je=Ze,columnSpacing:nt=Ze,unstable_level:ut=0,...ht}=ie,_t=o(Ie,V.breakpoints,Vt=>Vt!==!1),Dt=o(Ve,V.breakpoints),qt=L.columns??(ut?void 0:U),Lt=L.spacing??(ut?void 0:Ze),dr=L.rowSpacing??L.spacing??(ut?void 0:Je),Zt=L.columnSpacing??L.spacing??(ut?void 0:nt),Cr={...ie,level:ut,columns:qt,container:ve,direction:Pe,wrap:Me,spacing:Lt,rowSpacing:dr,columnSpacing:Zt,size:_t,offset:Dt},yt=a(Cr,V);return Ke.jsx(s,{ref:B,as:Se,ownerState:Cr,className:Vo(yt.root,de),...ht,children:ze.Children.map(ae,Vt=>ze.isValidElement(Vt)&&LN(Vt,["Grid"])&&ve&&Vt.props.container?ze.cloneElement(Vt,{unstable_level:Vt.props?.unstable_level??ut+1}):Vt)})});return d.muiName="Grid",d}const uct=P8(),cct=gp("div",{name:"MuiStack",slot:"Root"});function fct(t){return lY({props:t,name:"MuiStack",defaultTheme:uct})}function dct(t,e){const r=ze.Children.toArray(t).filter(Boolean);return r.reduce((n,i,a)=>(n.push(i),a<r.length-1&&n.push(ze.cloneElement(e,{key:`separator-${a}`})),n),[])}const hct=t=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[t],pct=({ownerState:t,theme:e})=>{let r={display:"flex",flexDirection:"column",...$C({theme:e},OJ({values:t.direction,breakpoints:e.breakpoints.values}),n=>({flexDirection:n}))};if(t.spacing){const n=eY(e),i=Object.keys(e.breakpoints.values).reduce((d,b)=>((typeof t.spacing=="object"&&t.spacing[b]!=null||typeof t.direction=="object"&&t.direction[b]!=null)&&(d[b]=!0),d),{}),a=OJ({values:t.direction,base:i}),o=OJ({values:t.spacing,base:i});typeof a=="object"&&Object.keys(a).forEach((d,b,L)=>{if(!a[d]){const V=b>0?a[L[b-1]]:"column";a[d]=V}}),r=Kx(r,$C({theme:e},o,(d,b)=>t.useFlexGap?{gap:mL(n,d)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${hct(b?a[b]:t.direction)}`]:mL(n,d)}}))}return r=clt(e.breakpoints,r),r};function vct(t={}){const{createStyledComponent:e=cct,useThemeProps:r=fct,componentName:n="MuiStack"}=t,i=()=>Cs({root:["root"]},d=>Al(n,d),{}),a=e(pct);return ze.forwardRef(function(d,b){const L=r(d),B=sY(L),{component:V="div",direction:X="column",spacing:ie=0,divider:de,children:ae,className:U,useFlexGap:ve=!1,...Se}=B,Pe={direction:X,spacing:ie,useFlexGap:ve},Me=i();return Ke.jsx(a,{as:V,ownerState:Pe,ref:b,className:Vo(Me.root,U),...Se,children:de?dct(ae,de):ae})})}const Y3="$$material",C9={black:"#000",white:"#fff"},mct={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},uO={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},cO={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},E7={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},fO={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},dO={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},hO={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Xze(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:C9.white,default:C9.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const Zze=Xze();function Kze(){return{text:{primary:C9.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:C9.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const nhe=Kze();function $we(t,e,r,n){const i=n.light||n,a=n.dark||n*1.5;t[e]||(t.hasOwnProperty(r)?t[e]=t[r]:e==="light"?t.light=AB(t.main,i):e==="dark"&&(t.dark=EB(t.main,a)))}function Wwe(t,e,r,n,i){const a=i.light||i,o=i.dark||i*1.5;e[r]||(e.hasOwnProperty(n)?e[r]=e[n]:r==="light"?e.light=`color-mix(in ${t}, ${e.main}, #fff ${(a*100).toFixed(0)}%)`:r==="dark"&&(e.dark=`color-mix(in ${t}, ${e.main}, #000 ${(o*100).toFixed(0)}%)`))}function gct(t="light"){return t==="dark"?{main:fO[200],light:fO[50],dark:fO[400]}:{main:fO[700],light:fO[400],dark:fO[800]}}function yct(t="light"){return t==="dark"?{main:uO[200],light:uO[50],dark:uO[400]}:{main:uO[500],light:uO[300],dark:uO[700]}}function bct(t="light"){return t==="dark"?{main:cO[500],light:cO[300],dark:cO[700]}:{main:cO[700],light:cO[400],dark:cO[800]}}function xct(t="light"){return t==="dark"?{main:dO[400],light:dO[300],dark:dO[700]}:{main:dO[700],light:dO[500],dark:dO[900]}}function _ct(t="light"){return t==="dark"?{main:hO[400],light:hO[300],dark:hO[700]}:{main:hO[800],light:hO[500],dark:hO[900]}}function wct(t="light"){return t==="dark"?{main:E7[400],light:E7[300],dark:E7[700]}:{main:"#ed6c02",light:E7[500],dark:E7[900]}}function Sct(t){return`oklch(from ${t} var(--__l) 0 h / var(--__a))`}function Jve(t){const{mode:e="light",contrastThreshold:r=3,tonalOffset:n=.2,colorSpace:i,...a}=t,o=t.primary||gct(e),s=t.secondary||yct(e),d=t.error||bct(e),b=t.info||xct(e),L=t.success||_ct(e),B=t.warning||wct(e);function V(ae){return i?Sct(ae):mut(ae,nhe.text.primary)>=r?nhe.text.primary:Zze.text.primary}const X=({color:ae,name:U,mainShade:ve=500,lightShade:Se=300,darkShade:Pe=700})=>{if(ae={...ae},!ae.main&&ae[ve]&&(ae.main=ae[ve]),!ae.hasOwnProperty("main"))throw new Error(kk(11,U?` (${U})`:"",ve));if(typeof ae.main!="string")throw new Error(kk(12,U?` (${U})`:"",JSON.stringify(ae.main)));return i?(Wwe(i,ae,"light",Se,n),Wwe(i,ae,"dark",Pe,n)):($we(ae,"light",Se,n),$we(ae,"dark",Pe,n)),ae.contrastText||(ae.contrastText=V(ae.main)),ae};let ie;return e==="light"?ie=Xze():e==="dark"&&(ie=Kze()),Kx({common:{...C9},mode:e,primary:X({color:o,name:"primary"}),secondary:X({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:X({color:d,name:"error"}),warning:X({color:B,name:"warning"}),info:X({color:b,name:"info"}),success:X({color:L,name:"success"}),grey:mct,contrastThreshold:r,getContrastText:V,augmentColor:X,tonalOffset:n,...ie},a)}function Tct(t){const e={};return Object.entries(t).forEach(n=>{const[i,a]=n;typeof a=="object"&&(e[i]=`${a.fontStyle?`${a.fontStyle} `:""}${a.fontVariant?`${a.fontVariant} `:""}${a.fontWeight?`${a.fontWeight} `:""}${a.fontStretch?`${a.fontStretch} `:""}${a.fontSize||""}${a.lineHeight?`/${a.lineHeight} `:""}${a.fontFamily||""}`)}),e}function Ect(t,e){return{toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}},...e}}function Act(t){return Math.round(t*1e5)/1e5}const Ywe={textTransform:"uppercase"},Xwe='"Roboto", "Helvetica", "Arial", sans-serif';function Jze(t,e){const{fontFamily:r=Xwe,fontSize:n=14,fontWeightLight:i=300,fontWeightRegular:a=400,fontWeightMedium:o=500,fontWeightBold:s=700,htmlFontSize:d=16,allVariants:b,pxToRem:L,...B}=typeof e=="function"?e(t):e,V=n/14,X=L||(ae=>`${ae/d*V}rem`),ie=(ae,U,ve,Se,Pe)=>({fontFamily:r,fontWeight:ae,fontSize:X(U),lineHeight:ve,...r===Xwe?{letterSpacing:`${Act(Se/U)}em`}:{},...Pe,...b}),de={h1:ie(i,96,1.167,-1.5),h2:ie(i,60,1.2,-.5),h3:ie(a,48,1.167,0),h4:ie(a,34,1.235,.25),h5:ie(a,24,1.334,0),h6:ie(o,20,1.6,.15),subtitle1:ie(a,16,1.75,.15),subtitle2:ie(o,14,1.57,.1),body1:ie(a,16,1.5,.15),body2:ie(a,14,1.43,.15),button:ie(o,14,1.75,.4,Ywe),caption:ie(a,12,1.66,.4),overline:ie(a,12,2.66,1,Ywe),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Kx({htmlFontSize:d,pxToRem:X,fontFamily:r,fontSize:n,fontWeightLight:i,fontWeightRegular:a,fontWeightMedium:o,fontWeightBold:s,...de},B,{clone:!1})}const Cct=.2,Mct=.14,Rct=.12;function ay(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,${Cct})`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,${Mct})`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,${Rct})`].join(",")}const kct=["none",ay(0,2,1,-1,0,1,1,0,0,1,3,0),ay(0,3,1,-2,0,2,2,0,0,1,5,0),ay(0,3,3,-2,0,3,4,0,0,1,8,0),ay(0,2,4,-1,0,4,5,0,0,1,10,0),ay(0,3,5,-1,0,5,8,0,0,1,14,0),ay(0,3,5,-1,0,6,10,0,0,1,18,0),ay(0,4,5,-2,0,7,10,1,0,2,16,1),ay(0,5,5,-3,0,8,10,1,0,3,14,2),ay(0,5,6,-3,0,9,12,1,0,3,16,2),ay(0,6,6,-3,0,10,14,1,0,4,18,3),ay(0,6,7,-4,0,11,15,1,0,4,20,3),ay(0,7,8,-4,0,12,17,2,0,5,22,4),ay(0,7,8,-4,0,13,19,2,0,5,24,4),ay(0,7,9,-4,0,14,21,2,0,5,26,4),ay(0,8,9,-5,0,15,22,2,0,6,28,5),ay(0,8,10,-5,0,16,24,2,0,6,30,5),ay(0,8,11,-5,0,17,26,2,0,6,32,5),ay(0,9,11,-5,0,18,28,2,0,7,34,6),ay(0,9,12,-6,0,19,29,2,0,7,36,6),ay(0,10,13,-6,0,20,31,3,0,8,38,7),ay(0,10,13,-6,0,21,33,3,0,8,40,7),ay(0,10,14,-6,0,22,35,3,0,8,42,7),ay(0,11,14,-7,0,23,36,3,0,9,44,8),ay(0,11,15,-7,0,24,38,3,0,9,46,8)],Ict={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Qze={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Zwe(t){return`${Math.round(t)}ms`}function Pct(t){if(!t)return 0;const e=t/36;return Math.min(Math.round((4+15*e**.25+e/5)*10),3e3)}function Dct(t){const e={...Ict,...t.easing},r={...Qze,...t.duration};return{getAutoHeightDuration:Pct,create:(i=["all"],a={})=>{const{duration:o=r.standard,easing:s=e.easeInOut,delay:d=0,...b}=a;return(Array.isArray(i)?i:[i]).map(L=>`${L} ${typeof o=="string"?o:Zwe(o)} ${s} ${typeof d=="string"?d:Zwe(d)}`).join(",")},...t,easing:e,duration:r}}const Lct={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Oct(t){return _5(t)||typeof t>"u"||typeof t=="string"||typeof t=="boolean"||typeof t=="number"||Array.isArray(t)}function e9e(t={}){const e={...t};function r(n){const i=Object.entries(n);for(let a=0;a<i.length;a++){const[o,s]=i[a];!Oct(s)||o.startsWith("unstable_")?delete n[o]:_5(s)&&(n[o]={...s},r(n[o]))}}return r(e),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';

const theme = ${JSON.stringify(e,null,2)};

theme.breakpoints = createBreakpoints(theme.breakpoints || {});
theme.transitions = createTransitions(theme.transitions || {});

export default theme;`}function Kwe(t){return typeof t=="number"?`${(t*100).toFixed(0)}%`:`calc((${t}) * 100%)`}const Nct=t=>{if(!Number.isNaN(+t))return+t;const e=t.match(/\d*\.?\d+/g);if(!e)return 0;let r=0;for(let n=0;n<e.length;n+=1)r+=+e[n];return r};function Fct(t){Object.assign(t,{alpha(e,r){const n=this||t;return n.colorSpace?`oklch(from ${e} l c h / ${typeof r=="string"?`calc(${r})`:r})`:n.vars?`rgba(${e.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof r=="string"?`calc(${r})`:r})`:Jx(e,Nct(r))},lighten(e,r){const n=this||t;return n.colorSpace?`color-mix(in ${n.colorSpace}, ${e}, #fff ${Kwe(r)})`:AB(e,r)},darken(e,r){const n=this||t;return n.colorSpace?`color-mix(in ${n.colorSpace}, ${e}, #000 ${Kwe(r)})`:EB(e,r)}})}function ihe(t={},...e){const{breakpoints:r,mixins:n={},spacing:i,palette:a={},transitions:o={},typography:s={},shape:d,colorSpace:b,...L}=t;if(t.vars&&t.generateThemeVars===void 0)throw new Error(kk(20));const B=Jve({...a,colorSpace:b}),V=P8(t);let X=Kx(V,{mixins:Ect(V.breakpoints,n),palette:B,shadows:kct.slice(),typography:Jze(B,s),transitions:Dct(o),zIndex:{...Lct}});return X=Kx(X,L),X=e.reduce((ie,de)=>Kx(ie,de),X),X.unstable_sxConfig={...SB,...L?.unstable_sxConfig},X.unstable_sx=function(de){return YP({sx:de,theme:this})},X.toRuntimeSource=e9e,Fct(X),X}function ahe(t){let e;return t<1?e=5.11916*t**2:e=4.5*Math.log(t+1)+2,Math.round(e*10)/1e3}const zct=[...Array(25)].map((t,e)=>{if(e===0)return"none";const r=ahe(e);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function t9e(t){return{inputPlaceholder:t==="dark"?.5:.42,inputUnderline:t==="dark"?.7:.42,switchTrackDisabled:t==="dark"?.2:.12,switchTrack:t==="dark"?.3:.38}}function r9e(t){return t==="dark"?zct:[]}function Bct(t){const{palette:e={mode:"light"},opacity:r,overlays:n,colorSpace:i,...a}=t,o=Jve({...e,colorSpace:i});return{palette:o,opacity:{...t9e(o.mode),...r},overlays:n||r9e(o.mode),...a}}function Uct(t){return!!t[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!t[0].match(/sxConfig$/)||t[0]==="palette"&&!!t[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const Hct=t=>[...[...Array(25)].map((e,r)=>`--${t?`${t}-`:""}overlays-${r}`),`--${t?`${t}-`:""}palette-AppBar-darkBg`,`--${t?`${t}-`:""}palette-AppBar-darkColor`],jct=t=>(e,r)=>{const n=t.rootSelector||":root",i=t.colorSchemeSelector;let a=i;if(i==="class"&&(a=".%s"),i==="data"&&(a="[data-%s]"),i?.startsWith("data-")&&!i.includes("%s")&&(a=`[${i}="%s"]`),t.defaultColorScheme===e){if(e==="dark"){const o={};return Hct(t.cssVarPrefix).forEach(s=>{o[s]=r[s],delete r[s]}),a==="media"?{[n]:r,"@media (prefers-color-scheme: dark)":{[n]:o}}:a?{[a.replace("%s",e)]:o,[`${n}, ${a.replace("%s",e)}`]:r}:{[n]:{...r,...o}}}if(a&&a!=="media")return`${n}, ${a.replace("%s",String(e))}`}else if(e){if(a==="media")return{[`@media (prefers-color-scheme: ${String(e)})`]:{[n]:r}};if(a)return a.replace("%s",String(e))}return n};function Vct(t,e){e.forEach(r=>{t[r]||(t[r]={})})}function _l(t,e,r){!t[e]&&r&&(t[e]=r)}function Tz(t){return typeof t!="string"||!t.startsWith("hsl")?t:Vze(t)}function ZR(t,e){`${e}Channel`in t||(t[`${e}Channel`]=Sz(Tz(t[e])))}function qct(t){return typeof t=="number"?`${t}px`:typeof t=="string"||typeof t=="function"||Array.isArray(t)?t:"8px"}const i5=t=>{try{return t()}catch{}},Gct=(t="mui")=>Fut(t);function BJ(t,e,r,n,i){if(!r)return;r=r===!0?{}:r;const a=i==="dark"?"dark":"light";if(!n){e[i]=Bct({...r,palette:{mode:a,...r?.palette},colorSpace:t});return}const{palette:o,...s}=ihe({...n,palette:{mode:a,...r?.palette},colorSpace:t});return e[i]={...r,palette:o,opacity:{...t9e(a),...r?.opacity},overlays:r?.overlays||r9e(a)},s}function $ct(t={},...e){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:i=!1,cssVarPrefix:a="mui",nativeColor:o=!1,shouldSkipGeneratingVar:s=Uct,colorSchemeSelector:d=r.light&&r.dark?"media":void 0,rootSelector:b=":root",...L}=t,B=Object.keys(r)[0],V=n||(r.light&&B!=="light"?"light":B),X=Gct(a),{[V]:ie,light:de,dark:ae,...U}=r,ve={...U};let Se=ie;if((V==="dark"&&!("dark"in r)||V==="light"&&!("light"in r))&&(Se=!0),!Se)throw new Error(kk(21,V));let Pe;o&&(Pe="oklch");const Me=BJ(Pe,ve,Se,L,V);de&&!ve.light&&BJ(Pe,ve,de,void 0,"light"),ae&&!ve.dark&&BJ(Pe,ve,ae,void 0,"dark");let Ie={defaultColorScheme:V,...Me,cssVarPrefix:a,colorSchemeSelector:d,rootSelector:b,getCssVar:X,colorSchemes:ve,font:{...Tct(Me.typography),...Me.font},spacing:qct(L.spacing)};Object.keys(Ie.colorSchemes).forEach(ut=>{const ht=Ie.colorSchemes[ut].palette,_t=qt=>{const Lt=qt.split("-"),dr=Lt[1],Zt=Lt[2];return X(qt,ht[dr][Zt])};ht.mode==="light"&&(_l(ht.common,"background","#fff"),_l(ht.common,"onBackground","#000")),ht.mode==="dark"&&(_l(ht.common,"background","#000"),_l(ht.common,"onBackground","#fff"));function Dt(qt,Lt,dr){if(Pe){let Zt;return qt===sD&&(Zt=`transparent ${((1-dr)*100).toFixed(0)}%`),qt===vg&&(Zt=`#000 ${(dr*100).toFixed(0)}%`),qt===mg&&(Zt=`#fff ${(dr*100).toFixed(0)}%`),`color-mix(in ${Pe}, ${Lt}, ${Zt})`}return qt(Lt,dr)}if(Vct(ht,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),ht.mode==="light"){_l(ht.Alert,"errorColor",Dt(vg,ht.error.light,.6)),_l(ht.Alert,"infoColor",Dt(vg,ht.info.light,.6)),_l(ht.Alert,"successColor",Dt(vg,ht.success.light,.6)),_l(ht.Alert,"warningColor",Dt(vg,ht.warning.light,.6)),_l(ht.Alert,"errorFilledBg",_t("palette-error-main")),_l(ht.Alert,"infoFilledBg",_t("palette-info-main")),_l(ht.Alert,"successFilledBg",_t("palette-success-main")),_l(ht.Alert,"warningFilledBg",_t("palette-warning-main")),_l(ht.Alert,"errorFilledColor",i5(()=>ht.getContrastText(ht.error.main))),_l(ht.Alert,"infoFilledColor",i5(()=>ht.getContrastText(ht.info.main))),_l(ht.Alert,"successFilledColor",i5(()=>ht.getContrastText(ht.success.main))),_l(ht.Alert,"warningFilledColor",i5(()=>ht.getContrastText(ht.warning.main))),_l(ht.Alert,"errorStandardBg",Dt(mg,ht.error.light,.9)),_l(ht.Alert,"infoStandardBg",Dt(mg,ht.info.light,.9)),_l(ht.Alert,"successStandardBg",Dt(mg,ht.success.light,.9)),_l(ht.Alert,"warningStandardBg",Dt(mg,ht.warning.light,.9)),_l(ht.Alert,"errorIconColor",_t("palette-error-main")),_l(ht.Alert,"infoIconColor",_t("palette-info-main")),_l(ht.Alert,"successIconColor",_t("palette-success-main")),_l(ht.Alert,"warningIconColor",_t("palette-warning-main")),_l(ht.AppBar,"defaultBg",_t("palette-grey-100")),_l(ht.Avatar,"defaultBg",_t("palette-grey-400")),_l(ht.Button,"inheritContainedBg",_t("palette-grey-300")),_l(ht.Button,"inheritContainedHoverBg",_t("palette-grey-A100")),_l(ht.Chip,"defaultBorder",_t("palette-grey-400")),_l(ht.Chip,"defaultAvatarColor",_t("palette-grey-700")),_l(ht.Chip,"defaultIconColor",_t("palette-grey-700")),_l(ht.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),_l(ht.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),_l(ht.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),_l(ht.LinearProgress,"primaryBg",Dt(mg,ht.primary.main,.62)),_l(ht.LinearProgress,"secondaryBg",Dt(mg,ht.secondary.main,.62)),_l(ht.LinearProgress,"errorBg",Dt(mg,ht.error.main,.62)),_l(ht.LinearProgress,"infoBg",Dt(mg,ht.info.main,.62)),_l(ht.LinearProgress,"successBg",Dt(mg,ht.success.main,.62)),_l(ht.LinearProgress,"warningBg",Dt(mg,ht.warning.main,.62)),_l(ht.Skeleton,"bg",Pe?Dt(sD,ht.text.primary,.11):`rgba(${_t("palette-text-primaryChannel")} / 0.11)`),_l(ht.Slider,"primaryTrack",Dt(mg,ht.primary.main,.62)),_l(ht.Slider,"secondaryTrack",Dt(mg,ht.secondary.main,.62)),_l(ht.Slider,"errorTrack",Dt(mg,ht.error.main,.62)),_l(ht.Slider,"infoTrack",Dt(mg,ht.info.main,.62)),_l(ht.Slider,"successTrack",Dt(mg,ht.success.main,.62)),_l(ht.Slider,"warningTrack",Dt(mg,ht.warning.main,.62));const qt=Pe?Dt(vg,ht.background.default,.6825):YH(ht.background.default,.8);_l(ht.SnackbarContent,"bg",qt),_l(ht.SnackbarContent,"color",i5(()=>Pe?nhe.text.primary:ht.getContrastText(qt))),_l(ht.SpeedDialAction,"fabHoverBg",YH(ht.background.paper,.15)),_l(ht.StepConnector,"border",_t("palette-grey-400")),_l(ht.StepContent,"border",_t("palette-grey-400")),_l(ht.Switch,"defaultColor",_t("palette-common-white")),_l(ht.Switch,"defaultDisabledColor",_t("palette-grey-100")),_l(ht.Switch,"primaryDisabledColor",Dt(mg,ht.primary.main,.62)),_l(ht.Switch,"secondaryDisabledColor",Dt(mg,ht.secondary.main,.62)),_l(ht.Switch,"errorDisabledColor",Dt(mg,ht.error.main,.62)),_l(ht.Switch,"infoDisabledColor",Dt(mg,ht.info.main,.62)),_l(ht.Switch,"successDisabledColor",Dt(mg,ht.success.main,.62)),_l(ht.Switch,"warningDisabledColor",Dt(mg,ht.warning.main,.62)),_l(ht.TableCell,"border",Dt(mg,Dt(sD,ht.divider,1),.88)),_l(ht.Tooltip,"bg",Dt(sD,ht.grey[700],.92))}if(ht.mode==="dark"){_l(ht.Alert,"errorColor",Dt(mg,ht.error.light,.6)),_l(ht.Alert,"infoColor",Dt(mg,ht.info.light,.6)),_l(ht.Alert,"successColor",Dt(mg,ht.success.light,.6)),_l(ht.Alert,"warningColor",Dt(mg,ht.warning.light,.6)),_l(ht.Alert,"errorFilledBg",_t("palette-error-dark")),_l(ht.Alert,"infoFilledBg",_t("palette-info-dark")),_l(ht.Alert,"successFilledBg",_t("palette-success-dark")),_l(ht.Alert,"warningFilledBg",_t("palette-warning-dark")),_l(ht.Alert,"errorFilledColor",i5(()=>ht.getContrastText(ht.error.dark))),_l(ht.Alert,"infoFilledColor",i5(()=>ht.getContrastText(ht.info.dark))),_l(ht.Alert,"successFilledColor",i5(()=>ht.getContrastText(ht.success.dark))),_l(ht.Alert,"warningFilledColor",i5(()=>ht.getContrastText(ht.warning.dark))),_l(ht.Alert,"errorStandardBg",Dt(vg,ht.error.light,.9)),_l(ht.Alert,"infoStandardBg",Dt(vg,ht.info.light,.9)),_l(ht.Alert,"successStandardBg",Dt(vg,ht.success.light,.9)),_l(ht.Alert,"warningStandardBg",Dt(vg,ht.warning.light,.9)),_l(ht.Alert,"errorIconColor",_t("palette-error-main")),_l(ht.Alert,"infoIconColor",_t("palette-info-main")),_l(ht.Alert,"successIconColor",_t("palette-success-main")),_l(ht.Alert,"warningIconColor",_t("palette-warning-main")),_l(ht.AppBar,"defaultBg",_t("palette-grey-900")),_l(ht.AppBar,"darkBg",_t("palette-background-paper")),_l(ht.AppBar,"darkColor",_t("palette-text-primary")),_l(ht.Avatar,"defaultBg",_t("palette-grey-600")),_l(ht.Button,"inheritContainedBg",_t("palette-grey-800")),_l(ht.Button,"inheritContainedHoverBg",_t("palette-grey-700")),_l(ht.Chip,"defaultBorder",_t("palette-grey-700")),_l(ht.Chip,"defaultAvatarColor",_t("palette-grey-300")),_l(ht.Chip,"defaultIconColor",_t("palette-grey-300")),_l(ht.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),_l(ht.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),_l(ht.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),_l(ht.LinearProgress,"primaryBg",Dt(vg,ht.primary.main,.5)),_l(ht.LinearProgress,"secondaryBg",Dt(vg,ht.secondary.main,.5)),_l(ht.LinearProgress,"errorBg",Dt(vg,ht.error.main,.5)),_l(ht.LinearProgress,"infoBg",Dt(vg,ht.info.main,.5)),_l(ht.LinearProgress,"successBg",Dt(vg,ht.success.main,.5)),_l(ht.LinearProgress,"warningBg",Dt(vg,ht.warning.main,.5)),_l(ht.Skeleton,"bg",Pe?Dt(sD,ht.text.primary,.13):`rgba(${_t("palette-text-primaryChannel")} / 0.13)`),_l(ht.Slider,"primaryTrack",Dt(vg,ht.primary.main,.5)),_l(ht.Slider,"secondaryTrack",Dt(vg,ht.secondary.main,.5)),_l(ht.Slider,"errorTrack",Dt(vg,ht.error.main,.5)),_l(ht.Slider,"infoTrack",Dt(vg,ht.info.main,.5)),_l(ht.Slider,"successTrack",Dt(vg,ht.success.main,.5)),_l(ht.Slider,"warningTrack",Dt(vg,ht.warning.main,.5));const qt=Pe?Dt(mg,ht.background.default,.985):YH(ht.background.default,.98);_l(ht.SnackbarContent,"bg",qt),_l(ht.SnackbarContent,"color",i5(()=>Pe?Zze.text.primary:ht.getContrastText(qt))),_l(ht.SpeedDialAction,"fabHoverBg",YH(ht.background.paper,.15)),_l(ht.StepConnector,"border",_t("palette-grey-600")),_l(ht.StepContent,"border",_t("palette-grey-600")),_l(ht.Switch,"defaultColor",_t("palette-grey-300")),_l(ht.Switch,"defaultDisabledColor",_t("palette-grey-600")),_l(ht.Switch,"primaryDisabledColor",Dt(vg,ht.primary.main,.55)),_l(ht.Switch,"secondaryDisabledColor",Dt(vg,ht.secondary.main,.55)),_l(ht.Switch,"errorDisabledColor",Dt(vg,ht.error.main,.55)),_l(ht.Switch,"infoDisabledColor",Dt(vg,ht.info.main,.55)),_l(ht.Switch,"successDisabledColor",Dt(vg,ht.success.main,.55)),_l(ht.Switch,"warningDisabledColor",Dt(vg,ht.warning.main,.55)),_l(ht.TableCell,"border",Dt(vg,Dt(sD,ht.divider,1),.68)),_l(ht.Tooltip,"bg",Dt(sD,ht.grey[700],.92))}ZR(ht.background,"default"),ZR(ht.background,"paper"),ZR(ht.common,"background"),ZR(ht.common,"onBackground"),ZR(ht,"divider"),Object.keys(ht).forEach(qt=>{const Lt=ht[qt];qt!=="tonalOffset"&&Lt&&typeof Lt=="object"&&(Lt.main&&_l(ht[qt],"mainChannel",Sz(Tz(Lt.main))),Lt.light&&_l(ht[qt],"lightChannel",Sz(Tz(Lt.light))),Lt.dark&&_l(ht[qt],"darkChannel",Sz(Tz(Lt.dark))),Lt.contrastText&&_l(ht[qt],"contrastTextChannel",Sz(Tz(Lt.contrastText))),qt==="text"&&(ZR(ht[qt],"primary"),ZR(ht[qt],"secondary")),qt==="action"&&(Lt.active&&ZR(ht[qt],"active"),Lt.selected&&ZR(ht[qt],"selected")))})}),Ie=e.reduce((ut,ht)=>Kx(ut,ht),Ie);const Ve={prefix:a,disableCssColorScheme:i,shouldSkipGeneratingVar:s,getSelector:jct(Ie),enableContrastVars:o},{vars:Ze,generateThemeVars:Je,generateStyleSheets:nt}=Uut(Ie,Ve);return Ie.vars=Ze,Object.entries(Ie.colorSchemes[Ie.defaultColorScheme]).forEach(([ut,ht])=>{Ie[ut]=ht}),Ie.generateThemeVars=Je,Ie.generateStyleSheets=nt,Ie.generateSpacing=function(){return Lze(L.spacing,eY(this))},Ie.getColorSchemeSelector=Hut(d),Ie.spacing=Ie.generateSpacing(),Ie.shouldSkipGeneratingVar=s,Ie.unstable_sxConfig={...SB,...L?.unstable_sxConfig},Ie.unstable_sx=function(ht){return YP({sx:ht,theme:this})},Ie.toRuntimeSource=e9e,Ie}function Jwe(t,e,r){t.colorSchemes&&r&&(t.colorSchemes[e]={...r!==!0&&r,palette:Jve({...r===!0?{}:r.palette,mode:e})})}function fY(t={},...e){const{palette:r,cssVariables:n=!1,colorSchemes:i=r?void 0:{light:!0},defaultColorScheme:a=r?.mode,...o}=t,s=a||"light",d=i?.[s],b={...i,...r?{[s]:{...typeof d!="boolean"&&d,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in t))return ihe(t,...e);let L=r;"palette"in t||b[s]&&(b[s]!==!0?L=b[s].palette:s==="dark"&&(L={mode:"dark"}));const B=ihe({...t,palette:L},...e);return B.defaultColorScheme=s,B.colorSchemes=b,B.palette.mode==="light"&&(B.colorSchemes.light={...b.light!==!0&&b.light,palette:B.palette},Jwe(B,"dark",b.dark)),B.palette.mode==="dark"&&(B.colorSchemes.dark={...b.dark!==!0&&b.dark,palette:B.palette},Jwe(B,"light",b.light)),B}return!r&&!("light"in b)&&s==="light"&&(b.light=!0),$ct({...o,colorSchemes:b,defaultColorScheme:s,...typeof n!="boolean"&&n},...e)}function Wct(t){return String(t).match(/[\d.\-+]*\s*(.*)/)[1]||""}function Yct(t){return parseFloat(t)}const dY=fY();function cy(){const t=TB(dY);return t[Y3]||t}function yh({props:t,name:e}){return lY({props:t,name:e,defaultTheme:dY,themeId:Y3})}function hY(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const mx=t=>hY(t)&&t!=="classes",fa=Uze({themeId:Y3,defaultTheme:dY,rootShouldForwardProp:mx});function Xct({theme:t,...e}){const r=Y3 in t?t[Y3]:void 0;return Ke.jsx(Wze,{...e,themeId:r?Y3:void 0,theme:r||t})}const XH={colorSchemeStorageKey:"mui-color-scheme",defaultLightColorScheme:"light",defaultDarkColorScheme:"dark",modeStorageKey:"mui-mode"},{CssVarsProvider:Zct,useColorScheme:HL}=Nut({themeId:Y3,theme:()=>fY({cssVariables:!0}),colorSchemeStorageKey:XH.colorSchemeStorageKey,modeStorageKey:XH.modeStorageKey,defaultColorScheme:{light:XH.defaultLightColorScheme,dark:XH.defaultDarkColorScheme},resolveTheme:t=>{const e={...t,typography:Jze(t.palette,t.typography)};return e.unstable_sx=function(n){return YP({sx:n,theme:this})},e}}),Kct=Zct;function Jct({theme:t,...e}){const r=ze.useMemo(()=>{if(typeof t=="function")return t;const n=Y3 in t?t[Y3]:t;return"colorSchemes"in n?null:"vars"in n?t:{...t,vars:null}},[t]);return r?Ke.jsx(Xct,{theme:r,...e}):Ke.jsx(Kct,{theme:t,...e})}const Qct=Ml("MuiBox",["root"]),eft=fY(),Ul=rut({themeId:Y3,defaultTheme:eft,defaultClassName:Qct.root,generateClassName:Nze.generate});function tft(t){return Ke.jsx(Oze,{...t,defaultTheme:dY,themeId:Y3})}function Qve(t){return function(r){return Ke.jsx(tft,{styles:typeof t=="function"?n=>t({theme:n,...r}):t})}}function rft(){return sY}const yu=Mut;function Uu(t){return Tut(t)}function nft(t){return typeof t.main=="string"}function ift(t,e=[]){if(!nft(t))return!1;for(const r of e)if(!t.hasOwnProperty(r)||typeof t[r]!="string")return!1;return!0}function Yv(t=[]){return([,e])=>e&&ift(e,t)}function aft(t){return Al("MuiPaper",t)}Ml("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const oft=t=>{const{square:e,elevation:r,variant:n,classes:i}=t,a={root:["root",n,!e&&"rounded",n==="elevation"&&`elevation${r}`]};return Cs(a,aft,i)},sft=fa("div",{name:"MuiPaper",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[r.variant],!r.square&&e.rounded,r.variant==="elevation"&&e[`elevation${r.elevation}`]]}})(yu(({theme:t})=>({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow"),variants:[{props:({ownerState:e})=>!e.square,style:{borderRadius:t.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(t.vars||t).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),Gy=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiPaper"}),i=cy(),{className:a,component:o="div",elevation:s=1,square:d=!1,variant:b="elevation",...L}=n,B={...n,component:o,elevation:s,square:d,variant:b},V=oft(B);return Ke.jsx(sft,{as:o,ownerState:B,className:Vo(V.root,a),ref:r,...L,style:{...b==="elevation"&&{"--Paper-shadow":(i.vars||i).shadows[s],...i.vars&&{"--Paper-overlay":i.vars.overlays?.[s]},...!i.vars&&i.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${Jx("#fff",ahe(s))}, ${Jx("#fff",ahe(s))})`}},...L.style}})});function lft(t){return Al("MuiAppBar",t)}Ml("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const uft=t=>{const{color:e,position:r,classes:n}=t,i={root:["root",`color${ys(e)}`,`position${ys(r)}`]};return Cs(i,lft,n)},Qwe=(t,e)=>t?`${t?.replace(")","")}, ${e})`:e,cft=fa(Gy,{name:"MuiAppBar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[`position${ys(r.position)}`],e[`color${ys(r.color)}`]]}})(yu(({theme:t})=>({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0,variants:[{props:{position:"fixed"},style:{position:"fixed",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}}},{props:{position:"absolute"},style:{position:"absolute",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"sticky"},style:{position:"sticky",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"static"},style:{position:"static"}},{props:{position:"relative"},style:{position:"relative"}},{props:{color:"inherit"},style:{"--AppBar-color":"inherit"}},{props:{color:"default"},style:{"--AppBar-background":t.vars?t.vars.palette.AppBar.defaultBg:t.palette.grey[100],"--AppBar-color":t.vars?t.vars.palette.text.primary:t.palette.getContrastText(t.palette.grey[100]),...t.applyStyles("dark",{"--AppBar-background":t.vars?t.vars.palette.AppBar.defaultBg:t.palette.grey[900],"--AppBar-color":t.vars?t.vars.palette.text.primary:t.palette.getContrastText(t.palette.grey[900])})}},...Object.entries(t.palette).filter(Yv(["contrastText"])).map(([e])=>({props:{color:e},style:{"--AppBar-background":(t.vars??t).palette[e].main,"--AppBar-color":(t.vars??t).palette[e].contrastText}})),{props:e=>e.enableColorOnDark===!0&&!["inherit","transparent"].includes(e.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)"}},{props:e=>e.enableColorOnDark===!1&&!["inherit","transparent"].includes(e.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...t.applyStyles("dark",{backgroundColor:t.vars?Qwe(t.vars.palette.AppBar.darkBg,"var(--AppBar-background)"):null,color:t.vars?Qwe(t.vars.palette.AppBar.darkColor,"var(--AppBar-color)"):null})}},{props:{color:"transparent"},style:{"--AppBar-background":"transparent","--AppBar-color":"inherit",backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...t.applyStyles("dark",{backgroundImage:"none"})}}]}))),eme=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiAppBar"}),{className:i,color:a="primary",enableColorOnDark:o=!1,position:s="fixed",...d}=n,b={...n,color:a,position:s,enableColorOnDark:o},L=uft(b);return Ke.jsx(cft,{square:!0,component:"header",ownerState:b,elevation:4,className:Vo(L.root,i,s==="fixed"&&"mui-fixed"),ref:r,...d})}),ohe=typeof Qve({})=="function",fft=(t,e)=>({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%",...e&&!t.vars&&{colorScheme:t.palette.mode}}),dft=t=>({color:(t.vars||t).palette.text.primary,...t.typography.body1,backgroundColor:(t.vars||t).palette.background.default,"@media print":{backgroundColor:(t.vars||t).palette.common.white}}),n9e=(t,e=!1)=>{const r={};e&&t.colorSchemes&&typeof t.getColorSchemeSelector=="function"&&Object.entries(t.colorSchemes).forEach(([a,o])=>{const s=t.getColorSchemeSelector(a);s.startsWith("@")?r[s]={":root":{colorScheme:o.palette?.mode}}:r[s.replace(/\s*&/,"")]={colorScheme:o.palette?.mode}});let n={html:fft(t,e),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:t.typography.fontWeightBold},body:{margin:0,...dft(t),"&::backdrop":{backgroundColor:(t.vars||t).palette.background.default}},...r};const i=t.components?.MuiCssBaseline?.styleOverrides;return i&&(n=[n,i]),n},tG="mui-ecs",hft=t=>{const e=n9e(t,!1),r=Array.isArray(e)?e[0]:e;return!t.vars&&r&&(r.html[`:root:has(${tG})`]={colorScheme:t.palette.mode}),t.colorSchemes&&Object.entries(t.colorSchemes).forEach(([n,i])=>{const a=t.getColorSchemeSelector(n);a.startsWith("@")?r[a]={[`:root:not(:has(.${tG}))`]:{colorScheme:i.palette?.mode}}:r[a.replace(/\s*&/,"")]={[`&:not(:has(.${tG}))`]:{colorScheme:i.palette?.mode}}}),e},pft=Qve(ohe?({theme:t,enableColorScheme:e})=>n9e(t,e):({theme:t})=>hft(t));function i9e(t){const e=Uu({props:t,name:"MuiCssBaseline"}),{children:r,enableColorScheme:n=!1}=e;return Ke.jsxs(ze.Fragment,{children:[ohe&&Ke.jsx(pft,{enableColorScheme:n}),!ohe&&!n&&Ke.jsx("span",{className:tG,style:{display:"none"}}),r]})}function vft(t){return Al("MuiToolbar",t)}Ml("MuiToolbar",["root","gutters","regular","dense"]);const mft=t=>{const{classes:e,disableGutters:r,variant:n}=t;return Cs({root:["root",!r&&"gutters",n]},vft,e)},gft=fa("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,!r.disableGutters&&e.gutters,e[r.variant]]}})(yu(({theme:t})=>({position:"relative",display:"flex",alignItems:"center",variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:t.spacing(2),paddingRight:t.spacing(2),[t.breakpoints.up("sm")]:{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}}},{props:{variant:"dense"},style:{minHeight:48}},{props:{variant:"regular"},style:t.mixins.toolbar}]}))),CB=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiToolbar"}),{className:i,component:a="div",disableGutters:o=!1,variant:s="regular",...d}=n,b={...n,component:a,disableGutters:o,variant:s},L=mft(b);return Ke.jsx(gft,{as:a,className:Vo(L.root,i),ref:r,ownerState:b,...d})});function yft(t){return Al("MuiTypography",t)}const ZG=Ml("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]),bft={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},xft=rft(),_ft=t=>{const{align:e,gutterBottom:r,noWrap:n,paragraph:i,variant:a,classes:o}=t,s={root:["root",a,t.align!=="inherit"&&`align${ys(e)}`,r&&"gutterBottom",n&&"noWrap",i&&"paragraph"]};return Cs(s,yft,o)},wft=fa("span",{name:"MuiTypography",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.variant&&e[r.variant],r.align!=="inherit"&&e[`align${ys(r.align)}`],r.noWrap&&e.noWrap,r.gutterBottom&&e.gutterBottom,r.paragraph&&e.paragraph]}})(yu(({theme:t})=>({margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(t.typography).filter(([e,r])=>e!=="inherit"&&r&&typeof r=="object").map(([e,r])=>({props:{variant:e},style:r})),...Object.entries(t.palette).filter(Yv()).map(([e])=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}})),...Object.entries(t.palette?.text||{}).filter(([,e])=>typeof e=="string").map(([e])=>({props:{color:`text${ys(e)}`},style:{color:(t.vars||t).palette.text[e]}})),{props:({ownerState:e})=>e.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:e})=>e.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:e})=>e.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:e})=>e.paragraph,style:{marginBottom:16}}]}))),e2e={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Su=ze.forwardRef(function(e,r){const{color:n,...i}=Uu({props:e,name:"MuiTypography"}),a=!bft[n],o=xft({...i,...a&&{color:n}}),{align:s="inherit",className:d,component:b,gutterBottom:L=!1,noWrap:B=!1,paragraph:V=!1,variant:X="body1",variantMapping:ie=e2e,...de}=o,ae={...o,align:s,color:n,className:d,component:b,gutterBottom:L,noWrap:B,paragraph:V,variant:X,variantMapping:ie},U=b||(V?"p":ie[X]||e2e[X])||"span",ve=_ft(ae);return Ke.jsx(wft,{as:U,ref:r,className:Vo(ve.root,d),...de,ownerState:ae,style:{...s!=="inherit"&&{"--Typography-textAlign":s},...de.style}})});function she(...t){return t.reduce((e,r)=>r==null?e:function(...i){e.apply(this,i),r.apply(this,i)},()=>{})}function Sft(t){return Al("MuiSvgIcon",t)}Ml("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Tft=t=>{const{color:e,fontSize:r,classes:n}=t,i={root:["root",e!=="inherit"&&`color${ys(e)}`,`fontSize${ys(r)}`]};return Cs(i,Sft,n)},Eft=fa("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.color!=="inherit"&&e[`color${ys(r.color)}`],e[`fontSize${ys(r.fontSize)}`]]}})(yu(({theme:t})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:t.transitions?.create?.("fill",{duration:(t.vars??t).transitions?.duration?.shorter}),variants:[{props:e=>!e.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:t.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:t.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:t.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((t.vars??t).palette).filter(([,e])=>e&&e.main).map(([e])=>({props:{color:e},style:{color:(t.vars??t).palette?.[e]?.main}})),{props:{color:"action"},style:{color:(t.vars??t).palette?.action?.active}},{props:{color:"disabled"},style:{color:(t.vars??t).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),KG=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiSvgIcon"}),{children:i,className:a,color:o="inherit",component:s="svg",fontSize:d="medium",htmlColor:b,inheritViewBox:L=!1,titleAccess:B,viewBox:V="0 0 24 24",...X}=n,ie=ze.isValidElement(i)&&i.type==="svg",de={...n,color:o,component:s,fontSize:d,instanceFontSize:e.fontSize,inheritViewBox:L,viewBox:V,hasSvgAsChild:ie},ae={};L||(ae.viewBox=V);const U=Tft(de);return Ke.jsxs(Eft,{as:s,className:Vo(U.root,a),focusable:"false",color:b,"aria-hidden":B?void 0:!0,role:B?"img":void 0,ref:r,...ae,...X,...ie&&i.props,ownerState:de,children:[ie?i.props.children:i,B?Ke.jsx("title",{children:B}):null]})});KG.muiName="SvgIcon";function Hu(t,e){function r(n,i){return Ke.jsx(KG,{"data-testid":void 0,ref:i,...n,children:t})}return r.muiName=KG.muiName,ze.memo(ze.forwardRef(r))}function d4(t,e=166){let r;function n(...i){const a=()=>{t.apply(this,i)};clearTimeout(r),r=setTimeout(a,e)}return n.clear=()=>{clearTimeout(r)},n}function Lm(t){return t&&t.ownerDocument||document}function cE(t){return Lm(t).defaultView||window}function lhe(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function V_(t){const{controlled:e,default:r,name:n,state:i="value"}=t,{current:a}=ze.useRef(e!==void 0),[o,s]=ze.useState(r),d=a?e:o,b=ze.useCallback(L=>{a||s(L)},[]);return[d,b]}function vl(t){const e=ze.useRef(t);return Ah(()=>{e.current=t}),ze.useRef((...r)=>(0,e.current)(...r)).current}function id(...t){const e=ze.useRef(void 0),r=ze.useCallback(n=>{const i=t.map(a=>{if(a==null)return null;if(typeof a=="function"){const o=a,s=o(n);return typeof s=="function"?s:()=>{o(null)}}return a.current=n,()=>{a.current=null}});return()=>{i.forEach(a=>a?.())}},t);return ze.useMemo(()=>t.every(n=>n==null)?null:n=>{e.current&&(e.current(),e.current=void 0),n!=null&&(e.current=r(n))},t)}function Aft(t,e){const r=t.charCodeAt(2);return t[0]==="o"&&t[1]==="n"&&r>=65&&r<=90&&typeof e=="function"}function tme(t,e){if(!t)return e;function r(o,s){const d={};return Object.keys(s).forEach(b=>{Aft(b,s[b])&&typeof o[b]=="function"&&(d[b]=(...L)=>{o[b](...L),s[b](...L)})}),d}if(typeof t=="function"||typeof e=="function")return o=>{const s=typeof e=="function"?e(o):e,d=typeof t=="function"?t({...o,...s}):t,b=Vo(o?.className,s?.className,d?.className),L=r(d,s);return{...s,...d,...L,...!!b&&{className:b},...s?.style&&d?.style&&{style:{...s.style,...d.style}},...s?.sx&&d?.sx&&{sx:[...Array.isArray(s.sx)?s.sx:[s.sx],...Array.isArray(d.sx)?d.sx:[d.sx]]}}};const n=e,i=r(t,n),a=Vo(n?.className,t?.className);return{...e,...t,...i,...!!a&&{className:a},...n?.style&&t?.style&&{style:{...n.style,...t.style}},...n?.sx&&t?.sx&&{sx:[...Array.isArray(n.sx)?n.sx:[n.sx],...Array.isArray(t.sx)?t.sx:[t.sx]]}}}const L8=cn.oneOfType([cn.func,cn.object]);function ZP(t){try{return t.matches(":focus-visible")}catch{}return!1}const t2e={};function pE(t,e){const r=ze.useRef(t2e);return r.current===t2e&&(r.current=t(e)),r}class JG{static create(){return new JG}static use(){const e=pE(JG.create).current,[r,n]=ze.useState(!1);return e.shouldMount=r,e.setShouldMount=n,ze.useEffect(e.mountEffect,[r]),e}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=Mft(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};start(...e){this.mount().then(()=>this.ref.current?.start(...e))}stop(...e){this.mount().then(()=>this.ref.current?.stop(...e))}pulsate(...e){this.mount().then(()=>this.ref.current?.pulsate(...e))}}function Cft(){return JG.use()}function Mft(){let t,e;const r=new Promise((n,i)=>{t=n,e=i});return r.resolve=t,r.reject=e,r}function Ms(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)!==-1)continue;r[n]=t[n]}return r}function uhe(t,e){return uhe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},uhe(t,e)}function rme(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,uhe(t,e)}function Rft(t,e){return t.classList?!!e&&t.classList.contains(e):(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")!==-1}function kft(t,e){t.classList?t.classList.add(e):Rft(t,e)||(typeof t.className=="string"?t.className=t.className+" "+e:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+e))}function r2e(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function Ift(t,e){t.classList?t.classList.remove(e):typeof t.className=="string"?t.className=r2e(t.className,e):t.setAttribute("class",r2e(t.className&&t.className.baseVal||"",e))}const n2e={disabled:!1},QG=wi.createContext(null);var a9e=function(e){return e.scrollTop},Ez="unmounted",zD="exited",BD="entering",hN="entered",che="exiting",vE=(function(t){rme(e,t);function e(n,i){var a;a=t.call(this,n,i)||this;var o=i,s=o&&!o.isMounting?n.enter:n.appear,d;return a.appearStatus=null,n.in?s?(d=zD,a.appearStatus=BD):d=hN:n.unmountOnExit||n.mountOnEnter?d=Ez:d=zD,a.state={status:d},a.nextCallback=null,a}e.getDerivedStateFromProps=function(i,a){var o=i.in;return o&&a.status===Ez?{status:zD}:null};var r=e.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(i){var a=null;if(i!==this.props){var o=this.state.status;this.props.in?o!==BD&&o!==hN&&(a=BD):(o===BD||o===hN)&&(a=che)}this.updateStatus(!1,a)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var i=this.props.timeout,a,o,s;return a=o=s=i,i!=null&&typeof i!="number"&&(a=i.exit,o=i.enter,s=i.appear!==void 0?i.appear:o),{exit:a,enter:o,appear:s}},r.updateStatus=function(i,a){if(i===void 0&&(i=!1),a!==null)if(this.cancelNextCallback(),a===BD){if(this.props.unmountOnExit||this.props.mountOnEnter){var o=this.props.nodeRef?this.props.nodeRef.current:$H.findDOMNode(this);o&&a9e(o)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===zD&&this.setState({status:Ez})},r.performEnter=function(i){var a=this,o=this.props.enter,s=this.context?this.context.isMounting:i,d=this.props.nodeRef?[s]:[$H.findDOMNode(this),s],b=d[0],L=d[1],B=this.getTimeouts(),V=s?B.appear:B.enter;if(!i&&!o||n2e.disabled){this.safeSetState({status:hN},function(){a.props.onEntered(b)});return}this.props.onEnter(b,L),this.safeSetState({status:BD},function(){a.props.onEntering(b,L),a.onTransitionEnd(V,function(){a.safeSetState({status:hN},function(){a.props.onEntered(b,L)})})})},r.performExit=function(){var i=this,a=this.props.exit,o=this.getTimeouts(),s=this.props.nodeRef?void 0:$H.findDOMNode(this);if(!a||n2e.disabled){this.safeSetState({status:zD},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:che},function(){i.props.onExiting(s),i.onTransitionEnd(o.exit,function(){i.safeSetState({status:zD},function(){i.props.onExited(s)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(i,a){a=this.setNextCallback(a),this.setState(i,a)},r.setNextCallback=function(i){var a=this,o=!0;return this.nextCallback=function(s){o&&(o=!1,a.nextCallback=null,i(s))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},r.onTransitionEnd=function(i,a){this.setNextCallback(a);var o=this.props.nodeRef?this.props.nodeRef.current:$H.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!o||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var d=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],b=d[0],L=d[1];this.props.addEndListener(b,L)}i!=null&&setTimeout(this.nextCallback,i)},r.render=function(){var i=this.state.status;if(i===Ez)return null;var a=this.props,o=a.children;a.in,a.mountOnEnter,a.unmountOnExit,a.appear,a.enter,a.exit,a.timeout,a.addEndListener,a.onEnter,a.onEntering,a.onEntered,a.onExit,a.onExiting,a.onExited,a.nodeRef;var s=Ms(a,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return wi.createElement(QG.Provider,{value:null},typeof o=="function"?o(i,s):wi.cloneElement(wi.Children.only(o),s))},e})(wi.Component);vE.contextType=QG;vE.propTypes={};function pO(){}vE.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:pO,onEntering:pO,onEntered:pO,onExit:pO,onExiting:pO,onExited:pO};vE.UNMOUNTED=Ez;vE.EXITED=zD;vE.ENTERING=BD;vE.ENTERED=hN;vE.EXITING=che;var Pft=function(e,r){return e&&r&&r.split(" ").forEach(function(n){return kft(e,n)})},UJ=function(e,r){return e&&r&&r.split(" ").forEach(function(n){return Ift(e,n)})},nme=(function(t){rme(e,t);function e(){for(var n,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a))||this,n.appliedClasses={appear:{},enter:{},exit:{}},n.onEnter=function(s,d){var b=n.resolveArguments(s,d),L=b[0],B=b[1];n.removeClasses(L,"exit"),n.addClass(L,B?"appear":"enter","base"),n.props.onEnter&&n.props.onEnter(s,d)},n.onEntering=function(s,d){var b=n.resolveArguments(s,d),L=b[0],B=b[1],V=B?"appear":"enter";n.addClass(L,V,"active"),n.props.onEntering&&n.props.onEntering(s,d)},n.onEntered=function(s,d){var b=n.resolveArguments(s,d),L=b[0],B=b[1],V=B?"appear":"enter";n.removeClasses(L,V),n.addClass(L,V,"done"),n.props.onEntered&&n.props.onEntered(s,d)},n.onExit=function(s){var d=n.resolveArguments(s),b=d[0];n.removeClasses(b,"appear"),n.removeClasses(b,"enter"),n.addClass(b,"exit","base"),n.props.onExit&&n.props.onExit(s)},n.onExiting=function(s){var d=n.resolveArguments(s),b=d[0];n.addClass(b,"exit","active"),n.props.onExiting&&n.props.onExiting(s)},n.onExited=function(s){var d=n.resolveArguments(s),b=d[0];n.removeClasses(b,"exit"),n.addClass(b,"exit","done"),n.props.onExited&&n.props.onExited(s)},n.resolveArguments=function(s,d){return n.props.nodeRef?[n.props.nodeRef.current,s]:[s,d]},n.getClassNames=function(s){var d=n.props.classNames,b=typeof d=="string",L=b&&d?d+"-":"",B=b?""+L+s:d[s],V=b?B+"-active":d[s+"Active"],X=b?B+"-done":d[s+"Done"];return{baseClassName:B,activeClassName:V,doneClassName:X}},n}var r=e.prototype;return r.addClass=function(i,a,o){var s=this.getClassNames(a)[o+"ClassName"],d=this.getClassNames("enter"),b=d.doneClassName;a==="appear"&&o==="done"&&b&&(s+=" "+b),o==="active"&&i&&a9e(i),s&&(this.appliedClasses[a][o]=s,Pft(i,s))},r.removeClasses=function(i,a){var o=this.appliedClasses[a],s=o.base,d=o.active,b=o.done;this.appliedClasses[a]={},s&&UJ(i,s),d&&UJ(i,d),b&&UJ(i,b)},r.render=function(){var i=this.props;i.classNames;var a=Ms(i,["classNames"]);return wi.createElement(vE,Mr({},a,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e})(wi.Component);nme.defaultProps={classNames:""};nme.propTypes={};function Dft(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ime(t,e){var r=function(a){return e&&ze.isValidElement(a)?e(a):a},n=Object.create(null);return t&&ze.Children.map(t,function(i){return i}).forEach(function(i){n[i.key]=r(i)}),n}function Lft(t,e){t=t||{},e=e||{};function r(L){return L in e?e[L]:t[L]}var n=Object.create(null),i=[];for(var a in t)a in e?i.length&&(n[a]=i,i=[]):i.push(a);var o,s={};for(var d in e){if(n[d])for(o=0;o<n[d].length;o++){var b=n[d][o];s[n[d][o]]=r(b)}s[d]=r(d)}for(o=0;o<i.length;o++)s[i[o]]=r(i[o]);return s}function XD(t,e,r){return r[e]!=null?r[e]:t.props[e]}function Oft(t,e){return ime(t.children,function(r){return ze.cloneElement(r,{onExited:e.bind(null,r),in:!0,appear:XD(r,"appear",t),enter:XD(r,"enter",t),exit:XD(r,"exit",t)})})}function Nft(t,e,r){var n=ime(t.children),i=Lft(e,n);return Object.keys(i).forEach(function(a){var o=i[a];if(ze.isValidElement(o)){var s=a in e,d=a in n,b=e[a],L=ze.isValidElement(b)&&!b.props.in;d&&(!s||L)?i[a]=ze.cloneElement(o,{onExited:r.bind(null,o),in:!0,exit:XD(o,"exit",t),enter:XD(o,"enter",t)}):!d&&s&&!L?i[a]=ze.cloneElement(o,{in:!1}):d&&s&&ze.isValidElement(b)&&(i[a]=ze.cloneElement(o,{onExited:r.bind(null,o),in:b.props.in,exit:XD(o,"exit",t),enter:XD(o,"enter",t)}))}}),i}var Fft=Object.values||function(t){return Object.keys(t).map(function(e){return t[e]})},zft={component:"div",childFactory:function(e){return e}},MB=(function(t){rme(e,t);function e(n,i){var a;a=t.call(this,n,i)||this;var o=a.handleExited.bind(Dft(a));return a.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},a}var r=e.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},e.getDerivedStateFromProps=function(i,a){var o=a.children,s=a.handleExited,d=a.firstRender;return{children:d?Oft(i,s):Nft(i,o,s),firstRender:!1}},r.handleExited=function(i,a){var o=ime(this.props.children);i.key in o||(i.props.onExited&&i.props.onExited(a),this.mounted&&this.setState(function(s){var d=Mr({},s.children);return delete d[i.key],{children:d}}))},r.render=function(){var i=this.props,a=i.component,o=i.childFactory,s=Ms(i,["component","childFactory"]),d=this.state.contextValue,b=Fft(this.state.children).map(o);return delete s.appear,delete s.enter,delete s.exit,a===null?wi.createElement(QG.Provider,{value:d},b):wi.createElement(QG.Provider,{value:d},wi.createElement(a,s,b))},e})(wi.Component);MB.propTypes={};MB.defaultProps=zft;const Bft=[];function pY(t){ze.useEffect(t,Bft)}class vY{static create(){return new vY}currentId=null;start(e,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,r()},e)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function U2(){const t=pE(vY.create).current;return pY(t.disposeEffect),t}function Uft(t){const{className:e,classes:r,pulsate:n=!1,rippleX:i,rippleY:a,rippleSize:o,in:s,onExited:d,timeout:b}=t,[L,B]=ze.useState(!1),V=Vo(e,r.ripple,r.rippleVisible,n&&r.ripplePulsate),X={width:o,height:o,top:-(o/2)+a,left:-(o/2)+i},ie=Vo(r.child,L&&r.childLeaving,n&&r.childPulsate);return!s&&!L&&B(!0),ze.useEffect(()=>{if(!s&&d!=null){const de=setTimeout(d,b);return()=>{clearTimeout(de)}}},[d,s,b]),Ke.jsx("span",{className:V,style:X,children:Ke.jsx("span",{className:ie})})}const D3=Ml("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),fhe=550,Hft=80,jft=cA`
  0% {
    transform: scale(0);
    opacity: 0.1;
  }

  100% {
    transform: scale(1);
    opacity: 0.3;
  }
`,Vft=cA`
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
`,qft=cA`
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(0.92);
  }

  100% {
    transform: scale(1);
  }
`,Gft=fa("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),$ft=fa(Uft,{name:"MuiTouchRipple",slot:"Ripple"})`
  opacity: 0;
  position: absolute;

  &.${D3.rippleVisible} {
    opacity: 0.3;
    transform: scale(1);
    animation-name: ${jft};
    animation-duration: ${fhe}ms;
    animation-timing-function: ${({theme:t})=>t.transitions.easing.easeInOut};
  }

  &.${D3.ripplePulsate} {
    animation-duration: ${({theme:t})=>t.transitions.duration.shorter}ms;
  }

  & .${D3.child} {
    opacity: 1;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: currentColor;
  }

  & .${D3.childLeaving} {
    opacity: 0;
    animation-name: ${Vft};
    animation-duration: ${fhe}ms;
    animation-timing-function: ${({theme:t})=>t.transitions.easing.easeInOut};
  }

  & .${D3.childPulsate} {
    position: absolute;
    /* @noflip */
    left: 0px;
    top: 0;
    animation-name: ${qft};
    animation-duration: 2500ms;
    animation-timing-function: ${({theme:t})=>t.transitions.easing.easeInOut};
    animation-iteration-count: infinite;
    animation-delay: 200ms;
  }
`,Wft=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiTouchRipple"}),{center:i=!1,classes:a={},className:o,...s}=n,[d,b]=ze.useState([]),L=ze.useRef(0),B=ze.useRef(null);ze.useEffect(()=>{B.current&&(B.current(),B.current=null)},[d]);const V=ze.useRef(!1),X=U2(),ie=ze.useRef(null),de=ze.useRef(null),ae=ze.useCallback(Pe=>{const{pulsate:Me,rippleX:Ie,rippleY:Ve,rippleSize:Ze,cb:Je}=Pe;b(nt=>[...nt,Ke.jsx($ft,{classes:{ripple:Vo(a.ripple,D3.ripple),rippleVisible:Vo(a.rippleVisible,D3.rippleVisible),ripplePulsate:Vo(a.ripplePulsate,D3.ripplePulsate),child:Vo(a.child,D3.child),childLeaving:Vo(a.childLeaving,D3.childLeaving),childPulsate:Vo(a.childPulsate,D3.childPulsate)},timeout:fhe,pulsate:Me,rippleX:Ie,rippleY:Ve,rippleSize:Ze},L.current)]),L.current+=1,B.current=Je},[a]),U=ze.useCallback((Pe={},Me={},Ie=()=>{})=>{const{pulsate:Ve=!1,center:Ze=i||Me.pulsate,fakeElement:Je=!1}=Me;if(Pe?.type==="mousedown"&&V.current){V.current=!1;return}Pe?.type==="touchstart"&&(V.current=!0);const nt=Je?null:de.current,ut=nt?nt.getBoundingClientRect():{width:0,height:0,left:0,top:0};let ht,_t,Dt;if(Ze||Pe===void 0||Pe.clientX===0&&Pe.clientY===0||!Pe.clientX&&!Pe.touches)ht=Math.round(ut.width/2),_t=Math.round(ut.height/2);else{const{clientX:qt,clientY:Lt}=Pe.touches&&Pe.touches.length>0?Pe.touches[0]:Pe;ht=Math.round(qt-ut.left),_t=Math.round(Lt-ut.top)}if(Ze)Dt=Math.sqrt((2*ut.width**2+ut.height**2)/3),Dt%2===0&&(Dt+=1);else{const qt=Math.max(Math.abs((nt?nt.clientWidth:0)-ht),ht)*2+2,Lt=Math.max(Math.abs((nt?nt.clientHeight:0)-_t),_t)*2+2;Dt=Math.sqrt(qt**2+Lt**2)}Pe?.touches?ie.current===null&&(ie.current=()=>{ae({pulsate:Ve,rippleX:ht,rippleY:_t,rippleSize:Dt,cb:Ie})},X.start(Hft,()=>{ie.current&&(ie.current(),ie.current=null)})):ae({pulsate:Ve,rippleX:ht,rippleY:_t,rippleSize:Dt,cb:Ie})},[i,ae,X]),ve=ze.useCallback(()=>{U({},{pulsate:!0})},[U]),Se=ze.useCallback((Pe,Me)=>{if(X.clear(),Pe?.type==="touchend"&&ie.current){ie.current(),ie.current=null,X.start(0,()=>{Se(Pe,Me)});return}ie.current=null,b(Ie=>Ie.length>0?Ie.slice(1):Ie),B.current=Me},[X]);return ze.useImperativeHandle(r,()=>({pulsate:ve,start:U,stop:Se}),[ve,U,Se]),Ke.jsx(Gft,{className:Vo(D3.root,a.root,o),ref:de,...s,children:Ke.jsx(MB,{component:null,exit:!0,children:d})})});function Yft(t){return Al("MuiButtonBase",t)}const Xft=Ml("MuiButtonBase",["root","disabled","focusVisible"]),Zft=t=>{const{disabled:e,focusVisible:r,focusVisibleClassName:n,classes:i}=t,o=Cs({root:["root",e&&"disabled",r&&"focusVisible"]},Yft,i);return r&&n&&(o.root+=` ${n}`),o},Kft=fa("button",{name:"MuiButtonBase",slot:"Root"})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Xft.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),ZS=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiButtonBase"}),{action:i,centerRipple:a=!1,children:o,className:s,component:d="button",disabled:b=!1,disableRipple:L=!1,disableTouchRipple:B=!1,focusRipple:V=!1,focusVisibleClassName:X,LinkComponent:ie="a",onBlur:de,onClick:ae,onContextMenu:U,onDragLeave:ve,onFocus:Se,onFocusVisible:Pe,onKeyDown:Me,onKeyUp:Ie,onMouseDown:Ve,onMouseLeave:Ze,onMouseUp:Je,onTouchEnd:nt,onTouchMove:ut,onTouchStart:ht,tabIndex:_t=0,TouchRippleProps:Dt,touchRippleRef:qt,type:Lt,...dr}=n,Zt=ze.useRef(null),Cr=Cft(),yt=id(Cr.ref,qt),[Vt,Er]=ze.useState(!1);b&&Vt&&Er(!1),ze.useImperativeHandle(i,()=>({focusVisible:()=>{Er(!0),Zt.current.focus()}}),[]);const sr=Cr.shouldMount&&!L&&!b;ze.useEffect(()=>{Vt&&V&&!L&&Cr.pulsate()},[L,V,Vt,Cr]);const or=KR(Cr,"start",Ve,B),Ar=KR(Cr,"stop",U,B),Ir=KR(Cr,"stop",ve,B),_n=KR(Cr,"stop",Je,B),Un=KR(Cr,"stop",va=>{Vt&&va.preventDefault(),Ze&&Ze(va)},B),Qn=KR(Cr,"start",ht,B),Jn=KR(Cr,"stop",nt,B),Vn=KR(Cr,"stop",ut,B),jn=KR(Cr,"stop",va=>{ZP(va.target)||Er(!1),de&&de(va)},!1),Lr=vl(va=>{Zt.current||(Zt.current=va.currentTarget),ZP(va.target)&&(Er(!0),Pe&&Pe(va)),Se&&Se(va)}),Yn=()=>{const va=Zt.current;return d&&d!=="button"&&!(va.tagName==="A"&&va.href)},On=vl(va=>{V&&!va.repeat&&Vt&&va.key===" "&&Cr.stop(va,()=>{Cr.start(va)}),va.target===va.currentTarget&&Yn()&&va.key===" "&&va.preventDefault(),Me&&Me(va),va.target===va.currentTarget&&Yn()&&va.key==="Enter"&&!b&&(va.preventDefault(),ae&&ae(va))}),Sn=vl(va=>{V&&va.key===" "&&Vt&&!va.defaultPrevented&&Cr.stop(va,()=>{Cr.pulsate(va)}),Ie&&Ie(va),ae&&va.target===va.currentTarget&&Yn()&&va.key===" "&&!va.defaultPrevented&&ae(va)});let bn=d;bn==="button"&&(dr.href||dr.to)&&(bn=ie);const Mn={};bn==="button"?(Mn.type=Lt===void 0?"button":Lt,Mn.disabled=b):(!dr.href&&!dr.to&&(Mn.role="button"),b&&(Mn["aria-disabled"]=b));const gi=id(r,Zt),Oi={...n,centerRipple:a,component:d,disabled:b,disableRipple:L,disableTouchRipple:B,focusRipple:V,tabIndex:_t,focusVisible:Vt},Pa=Zft(Oi);return Ke.jsxs(Kft,{as:bn,className:Vo(Pa.root,s),ownerState:Oi,onBlur:jn,onClick:ae,onContextMenu:Ar,onFocus:Lr,onKeyDown:On,onKeyUp:Sn,onMouseDown:or,onMouseLeave:Un,onMouseUp:_n,onDragLeave:Ir,onTouchEnd:Jn,onTouchMove:Vn,onTouchStart:Qn,ref:gi,tabIndex:b?-1:_t,type:Lt,...Mn,...dr,children:[o,sr?Ke.jsx(Wft,{ref:yt,center:a,...Dt}):null]})});function KR(t,e,r,n=!1){return vl(i=>(r&&r(i),n||t[e](i),!0))}function Jft(t){return Al("MuiCircularProgress",t)}Ml("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const nP=44,dhe=cA`
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
`,hhe=cA`
  0% {
    stroke-dasharray: 1px, 200px;
    stroke-dashoffset: 0;
  }

  50% {
    stroke-dasharray: 100px, 200px;
    stroke-dashoffset: -15px;
  }

  100% {
    stroke-dasharray: 1px, 200px;
    stroke-dashoffset: -126px;
  }
`,Qft=typeof dhe!="string"?f4`
        animation: ${dhe} 1.4s linear infinite;
      `:null,edt=typeof hhe!="string"?f4`
        animation: ${hhe} 1.4s ease-in-out infinite;
      `:null,tdt=t=>{const{classes:e,variant:r,color:n,disableShrink:i}=t,a={root:["root",r,`color${ys(n)}`],svg:["svg"],circle:["circle",`circle${ys(r)}`,i&&"circleDisableShrink"]};return Cs(a,Jft,e)},rdt=fa("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[r.variant],e[`color${ys(r.color)}`]]}})(yu(({theme:t})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:t.transitions.create("transform")}},{props:{variant:"indeterminate"},style:Qft||{animation:`${dhe} 1.4s linear infinite`}},...Object.entries(t.palette).filter(Yv()).map(([e])=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}}))]}))),ndt=fa("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),idt=fa("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.circle,e[`circle${ys(r.variant)}`],r.disableShrink&&e.circleDisableShrink]}})(yu(({theme:t})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:t.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:e})=>e.variant==="indeterminate"&&!e.disableShrink,style:edt||{animation:`${hhe} 1.4s ease-in-out infinite`}}]}))),_1=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiCircularProgress"}),{className:i,color:a="primary",disableShrink:o=!1,size:s=40,style:d,thickness:b=3.6,value:L=0,variant:B="indeterminate",...V}=n,X={...n,color:a,disableShrink:o,size:s,thickness:b,value:L,variant:B},ie=tdt(X),de={},ae={},U={};if(B==="determinate"){const ve=2*Math.PI*((nP-b)/2);de.strokeDasharray=ve.toFixed(3),U["aria-valuenow"]=Math.round(L),de.strokeDashoffset=`${((100-L)/100*ve).toFixed(3)}px`,ae.transform="rotate(-90deg)"}return Ke.jsx(rdt,{className:Vo(ie.root,i),style:{width:s,height:s,...ae,...d},ownerState:X,ref:r,role:"progressbar",...U,...V,children:Ke.jsx(ndt,{className:ie.svg,ownerState:X,viewBox:`${nP/2} ${nP/2} ${nP} ${nP}`,children:Ke.jsx(idt,{className:ie.circle,style:de,ownerState:X,cx:nP,cy:nP,r:(nP-b)/2,fill:"none",strokeWidth:b})})})});function adt(t){return Al("MuiIconButton",t)}const phe=Ml("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),odt=t=>{const{classes:e,disabled:r,color:n,edge:i,size:a,loading:o}=t,s={root:["root",o&&"loading",r&&"disabled",n!=="default"&&`color${ys(n)}`,i&&`edge${ys(i)}`,`size${ys(a)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return Cs(s,adt,e)},sdt=fa(ZS,{name:"MuiIconButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.loading&&e.loading,r.color!=="default"&&e[`color${ys(r.color)}`],r.edge&&e[`edge${ys(r.edge)}`],e[`size${ys(r.size)}`]]}})(yu(({theme:t})=>({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":t.alpha((t.vars||t).palette.action.active,(t.vars||t).palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),yu(({theme:t})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(t.palette).filter(Yv()).map(([e])=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}})),...Object.entries(t.palette).filter(Yv()).map(([e])=>({props:{color:e},style:{"--IconButton-hoverBg":t.alpha((t.vars||t).palette[e].main,(t.vars||t).palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:t.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:t.typography.pxToRem(28)}}],[`&.${phe.disabled}`]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled},[`&.${phe.loading}`]:{color:"transparent"}}))),ldt=fa("span",{name:"MuiIconButton",slot:"LoadingIndicator"})(({theme:t})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(t.vars||t).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),Zf=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiIconButton"}),{edge:i=!1,children:a,className:o,color:s="default",disabled:d=!1,disableFocusRipple:b=!1,size:L="medium",id:B,loading:V=null,loadingIndicator:X,...ie}=n,de=Vd(B),ae=X??Ke.jsx(_1,{"aria-labelledby":de,color:"inherit",size:16}),U={...n,edge:i,color:s,disabled:d,disableFocusRipple:b,loading:V,loadingIndicator:ae,size:L},ve=odt(U);return Ke.jsxs(sdt,{id:V?de:B,className:Vo(ve.root,o),centerRipple:!0,focusRipple:!b,disabled:d||V,ref:r,...ie,ownerState:U,children:[typeof V=="boolean"&&Ke.jsx("span",{className:ve.loadingWrapper,style:{display:"contents"},children:Ke.jsx(ldt,{className:ve.loadingIndicator,ownerState:U,children:V&&ae})}),a]})});function h4(t){return parseInt(ze.version,10)>=19?t?.props?.ref||null:t?.ref||null}const ame=t=>t.scrollTop;function KP(t,e){const{timeout:r,easing:n,style:i={}}=t;return{duration:i.transitionDuration??(typeof r=="number"?r:r[e.mode]||0),easing:i.transitionTimingFunction??(typeof n=="object"?n[e.mode]:n),delay:i.transitionDelay}}function vhe(t){return`scale(${t}, ${t**2})`}const udt={entering:{opacity:1,transform:vhe(1)},entered:{opacity:1,transform:"none"}},HJ=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),yL=ze.forwardRef(function(e,r){const{addEndListener:n,appear:i=!0,children:a,easing:o,in:s,onEnter:d,onEntered:b,onEntering:L,onExit:B,onExited:V,onExiting:X,style:ie,timeout:de="auto",TransitionComponent:ae=vE,...U}=e,ve=U2(),Se=ze.useRef(),Pe=cy(),Me=ze.useRef(null),Ie=id(Me,h4(a),r),Ve=qt=>Lt=>{if(qt){const dr=Me.current;Lt===void 0?qt(dr):qt(dr,Lt)}},Ze=Ve(L),Je=Ve((qt,Lt)=>{ame(qt);const{duration:dr,delay:Zt,easing:Cr}=KP({style:ie,timeout:de,easing:o},{mode:"enter"});let yt;de==="auto"?(yt=Pe.transitions.getAutoHeightDuration(qt.clientHeight),Se.current=yt):yt=dr,qt.style.transition=[Pe.transitions.create("opacity",{duration:yt,delay:Zt}),Pe.transitions.create("transform",{duration:HJ?yt:yt*.666,delay:Zt,easing:Cr})].join(","),d&&d(qt,Lt)}),nt=Ve(b),ut=Ve(X),ht=Ve(qt=>{const{duration:Lt,delay:dr,easing:Zt}=KP({style:ie,timeout:de,easing:o},{mode:"exit"});let Cr;de==="auto"?(Cr=Pe.transitions.getAutoHeightDuration(qt.clientHeight),Se.current=Cr):Cr=Lt,qt.style.transition=[Pe.transitions.create("opacity",{duration:Cr,delay:dr}),Pe.transitions.create("transform",{duration:HJ?Cr:Cr*.666,delay:HJ?dr:dr||Cr*.333,easing:Zt})].join(","),qt.style.opacity=0,qt.style.transform=vhe(.75),B&&B(qt)}),_t=Ve(V),Dt=qt=>{de==="auto"&&ve.start(Se.current||0,qt),n&&n(Me.current,qt)};return Ke.jsx(ae,{appear:i,in:s,nodeRef:Me,onEnter:Je,onEntered:nt,onEntering:Ze,onExit:ht,onExited:_t,onExiting:ut,addEndListener:Dt,timeout:de==="auto"?null:de,...U,children:(qt,{ownerState:Lt,...dr})=>ze.cloneElement(a,{style:{opacity:0,transform:vhe(.75),visibility:qt==="exited"&&!s?"hidden":void 0,...udt[qt],...ie,...a.props.style},ref:Ie,...dr})})});yL&&(yL.muiSupportAuto=!0);var qS="top",rA="bottom",nA="right",GS="left",ome="auto",RB=[qS,rA,nA,GS],XN="start",M9="end",cdt="clippingParents",o9e="viewport",A7="popper",fdt="reference",i2e=RB.reduce(function(t,e){return t.concat([e+"-"+XN,e+"-"+M9])},[]),s9e=[].concat(RB,[ome]).reduce(function(t,e){return t.concat([e,e+"-"+XN,e+"-"+M9])},[]),ddt="beforeRead",hdt="read",pdt="afterRead",vdt="beforeMain",mdt="main",gdt="afterMain",ydt="beforeWrite",bdt="write",xdt="afterWrite",_dt=[ddt,hdt,pdt,vdt,mdt,gdt,ydt,bdt,xdt];function O5(t){return t?(t.nodeName||"").toLowerCase():null}function fE(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function bL(t){var e=fE(t).Element;return t instanceof e||t instanceof Element}function X3(t){var e=fE(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function sme(t){if(typeof ShadowRoot>"u")return!1;var e=fE(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function wdt(t){var e=t.state;Object.keys(e.elements).forEach(function(r){var n=e.styles[r]||{},i=e.attributes[r]||{},a=e.elements[r];!X3(a)||!O5(a)||(Object.assign(a.style,n),Object.keys(i).forEach(function(o){var s=i[o];s===!1?a.removeAttribute(o):a.setAttribute(o,s===!0?"":s)}))})}function Sdt(t){var e=t.state,r={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,r.popper),e.styles=r,e.elements.arrow&&Object.assign(e.elements.arrow.style,r.arrow),function(){Object.keys(e.elements).forEach(function(n){var i=e.elements[n],a=e.attributes[n]||{},o=Object.keys(e.styles.hasOwnProperty(n)?e.styles[n]:r[n]),s=o.reduce(function(d,b){return d[b]="",d},{});!X3(i)||!O5(i)||(Object.assign(i.style,s),Object.keys(a).forEach(function(d){i.removeAttribute(d)}))})}}const Tdt={name:"applyStyles",enabled:!0,phase:"write",fn:wdt,effect:Sdt,requires:["computeStyles"]};function I5(t){return t.split("-")[0]}var oL=Math.max,e$=Math.min,ZN=Math.round;function mhe(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function l9e(){return!/^((?!chrome|android).)*safari/i.test(mhe())}function KN(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!1);var n=t.getBoundingClientRect(),i=1,a=1;e&&X3(t)&&(i=t.offsetWidth>0&&ZN(n.width)/t.offsetWidth||1,a=t.offsetHeight>0&&ZN(n.height)/t.offsetHeight||1);var o=bL(t)?fE(t):window,s=o.visualViewport,d=!l9e()&&r,b=(n.left+(d&&s?s.offsetLeft:0))/i,L=(n.top+(d&&s?s.offsetTop:0))/a,B=n.width/i,V=n.height/a;return{width:B,height:V,top:L,right:b+B,bottom:L+V,left:b,x:b,y:L}}function lme(t){var e=KN(t),r=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-r)<=1&&(r=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:r,height:n}}function u9e(t,e){var r=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(r&&sme(r)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Ik(t){return fE(t).getComputedStyle(t)}function Edt(t){return["table","td","th"].indexOf(O5(t))>=0}function p4(t){return((bL(t)?t.ownerDocument:t.document)||window.document).documentElement}function mY(t){return O5(t)==="html"?t:t.assignedSlot||t.parentNode||(sme(t)?t.host:null)||p4(t)}function a2e(t){return!X3(t)||Ik(t).position==="fixed"?null:t.offsetParent}function Adt(t){var e=/firefox/i.test(mhe()),r=/Trident/i.test(mhe());if(r&&X3(t)){var n=Ik(t);if(n.position==="fixed")return null}var i=mY(t);for(sme(i)&&(i=i.host);X3(i)&&["html","body"].indexOf(O5(i))<0;){var a=Ik(i);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||e&&a.willChange==="filter"||e&&a.filter&&a.filter!=="none")return i;i=i.parentNode}return null}function kB(t){for(var e=fE(t),r=a2e(t);r&&Edt(r)&&Ik(r).position==="static";)r=a2e(r);return r&&(O5(r)==="html"||O5(r)==="body"&&Ik(r).position==="static")?e:r||Adt(t)||e}function ume(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Vz(t,e,r){return oL(t,e$(e,r))}function Cdt(t,e,r){var n=Vz(t,e,r);return n>r?r:n}function c9e(){return{top:0,right:0,bottom:0,left:0}}function f9e(t){return Object.assign({},c9e(),t)}function d9e(t,e){return e.reduce(function(r,n){return r[n]=t,r},{})}var Mdt=function(e,r){return e=typeof e=="function"?e(Object.assign({},r.rects,{placement:r.placement})):e,f9e(typeof e!="number"?e:d9e(e,RB))};function Rdt(t){var e,r=t.state,n=t.name,i=t.options,a=r.elements.arrow,o=r.modifiersData.popperOffsets,s=I5(r.placement),d=ume(s),b=[GS,nA].indexOf(s)>=0,L=b?"height":"width";if(!(!a||!o)){var B=Mdt(i.padding,r),V=lme(a),X=d==="y"?qS:GS,ie=d==="y"?rA:nA,de=r.rects.reference[L]+r.rects.reference[d]-o[d]-r.rects.popper[L],ae=o[d]-r.rects.reference[d],U=kB(a),ve=U?d==="y"?U.clientHeight||0:U.clientWidth||0:0,Se=de/2-ae/2,Pe=B[X],Me=ve-V[L]-B[ie],Ie=ve/2-V[L]/2+Se,Ve=Vz(Pe,Ie,Me),Ze=d;r.modifiersData[n]=(e={},e[Ze]=Ve,e.centerOffset=Ve-Ie,e)}}function kdt(t){var e=t.state,r=t.options,n=r.element,i=n===void 0?"[data-popper-arrow]":n;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||u9e(e.elements.popper,i)&&(e.elements.arrow=i))}const Idt={name:"arrow",enabled:!0,phase:"main",fn:Rdt,effect:kdt,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function JN(t){return t.split("-")[1]}var Pdt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ddt(t,e){var r=t.x,n=t.y,i=e.devicePixelRatio||1;return{x:ZN(r*i)/i||0,y:ZN(n*i)/i||0}}function o2e(t){var e,r=t.popper,n=t.popperRect,i=t.placement,a=t.variation,o=t.offsets,s=t.position,d=t.gpuAcceleration,b=t.adaptive,L=t.roundOffsets,B=t.isFixed,V=o.x,X=V===void 0?0:V,ie=o.y,de=ie===void 0?0:ie,ae=typeof L=="function"?L({x:X,y:de}):{x:X,y:de};X=ae.x,de=ae.y;var U=o.hasOwnProperty("x"),ve=o.hasOwnProperty("y"),Se=GS,Pe=qS,Me=window;if(b){var Ie=kB(r),Ve="clientHeight",Ze="clientWidth";if(Ie===fE(r)&&(Ie=p4(r),Ik(Ie).position!=="static"&&s==="absolute"&&(Ve="scrollHeight",Ze="scrollWidth")),Ie=Ie,i===qS||(i===GS||i===nA)&&a===M9){Pe=rA;var Je=B&&Ie===Me&&Me.visualViewport?Me.visualViewport.height:Ie[Ve];de-=Je-n.height,de*=d?1:-1}if(i===GS||(i===qS||i===rA)&&a===M9){Se=nA;var nt=B&&Ie===Me&&Me.visualViewport?Me.visualViewport.width:Ie[Ze];X-=nt-n.width,X*=d?1:-1}}var ut=Object.assign({position:s},b&&Pdt),ht=L===!0?Ddt({x:X,y:de},fE(r)):{x:X,y:de};if(X=ht.x,de=ht.y,d){var _t;return Object.assign({},ut,(_t={},_t[Pe]=ve?"0":"",_t[Se]=U?"0":"",_t.transform=(Me.devicePixelRatio||1)<=1?"translate("+X+"px, "+de+"px)":"translate3d("+X+"px, "+de+"px, 0)",_t))}return Object.assign({},ut,(e={},e[Pe]=ve?de+"px":"",e[Se]=U?X+"px":"",e.transform="",e))}function Ldt(t){var e=t.state,r=t.options,n=r.gpuAcceleration,i=n===void 0?!0:n,a=r.adaptive,o=a===void 0?!0:a,s=r.roundOffsets,d=s===void 0?!0:s,b={placement:I5(e.placement),variation:JN(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,o2e(Object.assign({},b,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:d})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,o2e(Object.assign({},b,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:d})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const Odt={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Ldt,data:{}};var ZH={passive:!0};function Ndt(t){var e=t.state,r=t.instance,n=t.options,i=n.scroll,a=i===void 0?!0:i,o=n.resize,s=o===void 0?!0:o,d=fE(e.elements.popper),b=[].concat(e.scrollParents.reference,e.scrollParents.popper);return a&&b.forEach(function(L){L.addEventListener("scroll",r.update,ZH)}),s&&d.addEventListener("resize",r.update,ZH),function(){a&&b.forEach(function(L){L.removeEventListener("scroll",r.update,ZH)}),s&&d.removeEventListener("resize",r.update,ZH)}}const Fdt={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Ndt,data:{}};var zdt={left:"right",right:"left",bottom:"top",top:"bottom"};function rG(t){return t.replace(/left|right|bottom|top/g,function(e){return zdt[e]})}var Bdt={start:"end",end:"start"};function s2e(t){return t.replace(/start|end/g,function(e){return Bdt[e]})}function cme(t){var e=fE(t),r=e.pageXOffset,n=e.pageYOffset;return{scrollLeft:r,scrollTop:n}}function fme(t){return KN(p4(t)).left+cme(t).scrollLeft}function Udt(t,e){var r=fE(t),n=p4(t),i=r.visualViewport,a=n.clientWidth,o=n.clientHeight,s=0,d=0;if(i){a=i.width,o=i.height;var b=l9e();(b||!b&&e==="fixed")&&(s=i.offsetLeft,d=i.offsetTop)}return{width:a,height:o,x:s+fme(t),y:d}}function Hdt(t){var e,r=p4(t),n=cme(t),i=(e=t.ownerDocument)==null?void 0:e.body,a=oL(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=oL(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-n.scrollLeft+fme(t),d=-n.scrollTop;return Ik(i||r).direction==="rtl"&&(s+=oL(r.clientWidth,i?i.clientWidth:0)-a),{width:a,height:o,x:s,y:d}}function dme(t){var e=Ik(t),r=e.overflow,n=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function h9e(t){return["html","body","#document"].indexOf(O5(t))>=0?t.ownerDocument.body:X3(t)&&dme(t)?t:h9e(mY(t))}function qz(t,e){var r;e===void 0&&(e=[]);var n=h9e(t),i=n===((r=t.ownerDocument)==null?void 0:r.body),a=fE(n),o=i?[a].concat(a.visualViewport||[],dme(n)?n:[]):n,s=e.concat(o);return i?s:s.concat(qz(mY(o)))}function ghe(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function jdt(t,e){var r=KN(t,!1,e==="fixed");return r.top=r.top+t.clientTop,r.left=r.left+t.clientLeft,r.bottom=r.top+t.clientHeight,r.right=r.left+t.clientWidth,r.width=t.clientWidth,r.height=t.clientHeight,r.x=r.left,r.y=r.top,r}function l2e(t,e,r){return e===o9e?ghe(Udt(t,r)):bL(e)?jdt(e,r):ghe(Hdt(p4(t)))}function Vdt(t){var e=qz(mY(t)),r=["absolute","fixed"].indexOf(Ik(t).position)>=0,n=r&&X3(t)?kB(t):t;return bL(n)?e.filter(function(i){return bL(i)&&u9e(i,n)&&O5(i)!=="body"}):[]}function qdt(t,e,r,n){var i=e==="clippingParents"?Vdt(t):[].concat(e),a=[].concat(i,[r]),o=a[0],s=a.reduce(function(d,b){var L=l2e(t,b,n);return d.top=oL(L.top,d.top),d.right=e$(L.right,d.right),d.bottom=e$(L.bottom,d.bottom),d.left=oL(L.left,d.left),d},l2e(t,o,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function p9e(t){var e=t.reference,r=t.element,n=t.placement,i=n?I5(n):null,a=n?JN(n):null,o=e.x+e.width/2-r.width/2,s=e.y+e.height/2-r.height/2,d;switch(i){case qS:d={x:o,y:e.y-r.height};break;case rA:d={x:o,y:e.y+e.height};break;case nA:d={x:e.x+e.width,y:s};break;case GS:d={x:e.x-r.width,y:s};break;default:d={x:e.x,y:e.y}}var b=i?ume(i):null;if(b!=null){var L=b==="y"?"height":"width";switch(a){case XN:d[b]=d[b]-(e[L]/2-r[L]/2);break;case M9:d[b]=d[b]+(e[L]/2-r[L]/2);break}}return d}function R9(t,e){e===void 0&&(e={});var r=e,n=r.placement,i=n===void 0?t.placement:n,a=r.strategy,o=a===void 0?t.strategy:a,s=r.boundary,d=s===void 0?cdt:s,b=r.rootBoundary,L=b===void 0?o9e:b,B=r.elementContext,V=B===void 0?A7:B,X=r.altBoundary,ie=X===void 0?!1:X,de=r.padding,ae=de===void 0?0:de,U=f9e(typeof ae!="number"?ae:d9e(ae,RB)),ve=V===A7?fdt:A7,Se=t.rects.popper,Pe=t.elements[ie?ve:V],Me=qdt(bL(Pe)?Pe:Pe.contextElement||p4(t.elements.popper),d,L,o),Ie=KN(t.elements.reference),Ve=p9e({reference:Ie,element:Se,placement:i}),Ze=ghe(Object.assign({},Se,Ve)),Je=V===A7?Ze:Ie,nt={top:Me.top-Je.top+U.top,bottom:Je.bottom-Me.bottom+U.bottom,left:Me.left-Je.left+U.left,right:Je.right-Me.right+U.right},ut=t.modifiersData.offset;if(V===A7&&ut){var ht=ut[i];Object.keys(nt).forEach(function(_t){var Dt=[nA,rA].indexOf(_t)>=0?1:-1,qt=[qS,rA].indexOf(_t)>=0?"y":"x";nt[_t]+=ht[qt]*Dt})}return nt}function Gdt(t,e){e===void 0&&(e={});var r=e,n=r.placement,i=r.boundary,a=r.rootBoundary,o=r.padding,s=r.flipVariations,d=r.allowedAutoPlacements,b=d===void 0?s9e:d,L=JN(n),B=L?s?i2e:i2e.filter(function(ie){return JN(ie)===L}):RB,V=B.filter(function(ie){return b.indexOf(ie)>=0});V.length===0&&(V=B);var X=V.reduce(function(ie,de){return ie[de]=R9(t,{placement:de,boundary:i,rootBoundary:a,padding:o})[I5(de)],ie},{});return Object.keys(X).sort(function(ie,de){return X[ie]-X[de]})}function $dt(t){if(I5(t)===ome)return[];var e=rG(t);return[s2e(t),e,s2e(e)]}function Wdt(t){var e=t.state,r=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var i=r.mainAxis,a=i===void 0?!0:i,o=r.altAxis,s=o===void 0?!0:o,d=r.fallbackPlacements,b=r.padding,L=r.boundary,B=r.rootBoundary,V=r.altBoundary,X=r.flipVariations,ie=X===void 0?!0:X,de=r.allowedAutoPlacements,ae=e.options.placement,U=I5(ae),ve=U===ae,Se=d||(ve||!ie?[rG(ae)]:$dt(ae)),Pe=[ae].concat(Se).reduce(function(or,Ar){return or.concat(I5(Ar)===ome?Gdt(e,{placement:Ar,boundary:L,rootBoundary:B,padding:b,flipVariations:ie,allowedAutoPlacements:de}):Ar)},[]),Me=e.rects.reference,Ie=e.rects.popper,Ve=new Map,Ze=!0,Je=Pe[0],nt=0;nt<Pe.length;nt++){var ut=Pe[nt],ht=I5(ut),_t=JN(ut)===XN,Dt=[qS,rA].indexOf(ht)>=0,qt=Dt?"width":"height",Lt=R9(e,{placement:ut,boundary:L,rootBoundary:B,altBoundary:V,padding:b}),dr=Dt?_t?nA:GS:_t?rA:qS;Me[qt]>Ie[qt]&&(dr=rG(dr));var Zt=rG(dr),Cr=[];if(a&&Cr.push(Lt[ht]<=0),s&&Cr.push(Lt[dr]<=0,Lt[Zt]<=0),Cr.every(function(or){return or})){Je=ut,Ze=!1;break}Ve.set(ut,Cr)}if(Ze)for(var yt=ie?3:1,Vt=function(Ar){var Ir=Pe.find(function(_n){var Un=Ve.get(_n);if(Un)return Un.slice(0,Ar).every(function(Qn){return Qn})});if(Ir)return Je=Ir,"break"},Er=yt;Er>0;Er--){var sr=Vt(Er);if(sr==="break")break}e.placement!==Je&&(e.modifiersData[n]._skip=!0,e.placement=Je,e.reset=!0)}}const Ydt={name:"flip",enabled:!0,phase:"main",fn:Wdt,requiresIfExists:["offset"],data:{_skip:!1}};function u2e(t,e,r){return r===void 0&&(r={x:0,y:0}),{top:t.top-e.height-r.y,right:t.right-e.width+r.x,bottom:t.bottom-e.height+r.y,left:t.left-e.width-r.x}}function c2e(t){return[qS,nA,rA,GS].some(function(e){return t[e]>=0})}function Xdt(t){var e=t.state,r=t.name,n=e.rects.reference,i=e.rects.popper,a=e.modifiersData.preventOverflow,o=R9(e,{elementContext:"reference"}),s=R9(e,{altBoundary:!0}),d=u2e(o,n),b=u2e(s,i,a),L=c2e(d),B=c2e(b);e.modifiersData[r]={referenceClippingOffsets:d,popperEscapeOffsets:b,isReferenceHidden:L,hasPopperEscaped:B},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":L,"data-popper-escaped":B})}const Zdt={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Xdt};function Kdt(t,e,r){var n=I5(t),i=[GS,qS].indexOf(n)>=0?-1:1,a=typeof r=="function"?r(Object.assign({},e,{placement:t})):r,o=a[0],s=a[1];return o=o||0,s=(s||0)*i,[GS,nA].indexOf(n)>=0?{x:s,y:o}:{x:o,y:s}}function Jdt(t){var e=t.state,r=t.options,n=t.name,i=r.offset,a=i===void 0?[0,0]:i,o=s9e.reduce(function(L,B){return L[B]=Kdt(B,e.rects,a),L},{}),s=o[e.placement],d=s.x,b=s.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=d,e.modifiersData.popperOffsets.y+=b),e.modifiersData[n]=o}const Qdt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Jdt};function eht(t){var e=t.state,r=t.name;e.modifiersData[r]=p9e({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}const tht={name:"popperOffsets",enabled:!0,phase:"read",fn:eht,data:{}};function rht(t){return t==="x"?"y":"x"}function nht(t){var e=t.state,r=t.options,n=t.name,i=r.mainAxis,a=i===void 0?!0:i,o=r.altAxis,s=o===void 0?!1:o,d=r.boundary,b=r.rootBoundary,L=r.altBoundary,B=r.padding,V=r.tether,X=V===void 0?!0:V,ie=r.tetherOffset,de=ie===void 0?0:ie,ae=R9(e,{boundary:d,rootBoundary:b,padding:B,altBoundary:L}),U=I5(e.placement),ve=JN(e.placement),Se=!ve,Pe=ume(U),Me=rht(Pe),Ie=e.modifiersData.popperOffsets,Ve=e.rects.reference,Ze=e.rects.popper,Je=typeof de=="function"?de(Object.assign({},e.rects,{placement:e.placement})):de,nt=typeof Je=="number"?{mainAxis:Je,altAxis:Je}:Object.assign({mainAxis:0,altAxis:0},Je),ut=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,ht={x:0,y:0};if(Ie){if(a){var _t,Dt=Pe==="y"?qS:GS,qt=Pe==="y"?rA:nA,Lt=Pe==="y"?"height":"width",dr=Ie[Pe],Zt=dr+ae[Dt],Cr=dr-ae[qt],yt=X?-Ze[Lt]/2:0,Vt=ve===XN?Ve[Lt]:Ze[Lt],Er=ve===XN?-Ze[Lt]:-Ve[Lt],sr=e.elements.arrow,or=X&&sr?lme(sr):{width:0,height:0},Ar=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:c9e(),Ir=Ar[Dt],_n=Ar[qt],Un=Vz(0,Ve[Lt],or[Lt]),Qn=Se?Ve[Lt]/2-yt-Un-Ir-nt.mainAxis:Vt-Un-Ir-nt.mainAxis,Jn=Se?-Ve[Lt]/2+yt+Un+_n+nt.mainAxis:Er+Un+_n+nt.mainAxis,Vn=e.elements.arrow&&kB(e.elements.arrow),jn=Vn?Pe==="y"?Vn.clientTop||0:Vn.clientLeft||0:0,Lr=(_t=ut?.[Pe])!=null?_t:0,Yn=dr+Qn-Lr-jn,On=dr+Jn-Lr,Sn=Vz(X?e$(Zt,Yn):Zt,dr,X?oL(Cr,On):Cr);Ie[Pe]=Sn,ht[Pe]=Sn-dr}if(s){var bn,Mn=Pe==="x"?qS:GS,gi=Pe==="x"?rA:nA,Oi=Ie[Me],Pa=Me==="y"?"height":"width",va=Oi+ae[Mn],ti=Oi-ae[gi],Tn=[qS,GS].indexOf(U)!==-1,bi=(bn=ut?.[Me])!=null?bn:0,Wn=Tn?va:Oi-Ve[Pa]-Ze[Pa]-bi+nt.altAxis,Ei=Tn?Oi+Ve[Pa]+Ze[Pa]-bi-nt.altAxis:ti,Ki=X&&Tn?Cdt(Wn,Oi,Ei):Vz(X?Wn:va,Oi,X?Ei:ti);Ie[Me]=Ki,ht[Me]=Ki-Oi}e.modifiersData[n]=ht}}const iht={name:"preventOverflow",enabled:!0,phase:"main",fn:nht,requiresIfExists:["offset"]};function aht(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function oht(t){return t===fE(t)||!X3(t)?cme(t):aht(t)}function sht(t){var e=t.getBoundingClientRect(),r=ZN(e.width)/t.offsetWidth||1,n=ZN(e.height)/t.offsetHeight||1;return r!==1||n!==1}function lht(t,e,r){r===void 0&&(r=!1);var n=X3(e),i=X3(e)&&sht(e),a=p4(e),o=KN(t,i,r),s={scrollLeft:0,scrollTop:0},d={x:0,y:0};return(n||!n&&!r)&&((O5(e)!=="body"||dme(a))&&(s=oht(e)),X3(e)?(d=KN(e,!0),d.x+=e.clientLeft,d.y+=e.clientTop):a&&(d.x=fme(a))),{x:o.left+s.scrollLeft-d.x,y:o.top+s.scrollTop-d.y,width:o.width,height:o.height}}function uht(t){var e=new Map,r=new Set,n=[];t.forEach(function(a){e.set(a.name,a)});function i(a){r.add(a.name);var o=[].concat(a.requires||[],a.requiresIfExists||[]);o.forEach(function(s){if(!r.has(s)){var d=e.get(s);d&&i(d)}}),n.push(a)}return t.forEach(function(a){r.has(a.name)||i(a)}),n}function cht(t){var e=uht(t);return _dt.reduce(function(r,n){return r.concat(e.filter(function(i){return i.phase===n}))},[])}function fht(t){var e;return function(){return e||(e=new Promise(function(r){Promise.resolve().then(function(){e=void 0,r(t())})})),e}}function dht(t){var e=t.reduce(function(r,n){var i=r[n.name];return r[n.name]=i?Object.assign({},i,n,{options:Object.assign({},i.options,n.options),data:Object.assign({},i.data,n.data)}):n,r},{});return Object.keys(e).map(function(r){return e[r]})}var f2e={placement:"bottom",modifiers:[],strategy:"absolute"};function d2e(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return!e.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function hht(t){t===void 0&&(t={});var e=t,r=e.defaultModifiers,n=r===void 0?[]:r,i=e.defaultOptions,a=i===void 0?f2e:i;return function(s,d,b){b===void 0&&(b=a);var L={placement:"bottom",orderedModifiers:[],options:Object.assign({},f2e,a),modifiersData:{},elements:{reference:s,popper:d},attributes:{},styles:{}},B=[],V=!1,X={state:L,setOptions:function(U){var ve=typeof U=="function"?U(L.options):U;de(),L.options=Object.assign({},a,L.options,ve),L.scrollParents={reference:bL(s)?qz(s):s.contextElement?qz(s.contextElement):[],popper:qz(d)};var Se=cht(dht([].concat(n,L.options.modifiers)));return L.orderedModifiers=Se.filter(function(Pe){return Pe.enabled}),ie(),X.update()},forceUpdate:function(){if(!V){var U=L.elements,ve=U.reference,Se=U.popper;if(d2e(ve,Se)){L.rects={reference:lht(ve,kB(Se),L.options.strategy==="fixed"),popper:lme(Se)},L.reset=!1,L.placement=L.options.placement,L.orderedModifiers.forEach(function(nt){return L.modifiersData[nt.name]=Object.assign({},nt.data)});for(var Pe=0;Pe<L.orderedModifiers.length;Pe++){if(L.reset===!0){L.reset=!1,Pe=-1;continue}var Me=L.orderedModifiers[Pe],Ie=Me.fn,Ve=Me.options,Ze=Ve===void 0?{}:Ve,Je=Me.name;typeof Ie=="function"&&(L=Ie({state:L,options:Ze,name:Je,instance:X})||L)}}}},update:fht(function(){return new Promise(function(ae){X.forceUpdate(),ae(L)})}),destroy:function(){de(),V=!0}};if(!d2e(s,d))return X;X.setOptions(b).then(function(ae){!V&&b.onFirstUpdate&&b.onFirstUpdate(ae)});function ie(){L.orderedModifiers.forEach(function(ae){var U=ae.name,ve=ae.options,Se=ve===void 0?{}:ve,Pe=ae.effect;if(typeof Pe=="function"){var Me=Pe({state:L,name:U,instance:X,options:Se}),Ie=function(){};B.push(Me||Ie)}})}function de(){B.forEach(function(ae){return ae()}),B=[]}return X}}var pht=[Fdt,tht,Odt,Tdt,Qdt,Ydt,iht,Idt,Zdt],vht=hht({defaultModifiers:pht});function P5(t){return typeof t=="string"}function v9e(t,e,r){return t===void 0||P5(t)?e:{...e,ownerState:{...e.ownerState,...r}}}function sL(t,e=[]){if(t===void 0)return{};const r={};return Object.keys(t).filter(n=>n.match(/^on[A-Z]/)&&typeof t[n]=="function"&&!e.includes(n)).forEach(n=>{r[n]=t[n]}),r}function h2e(t){if(t===void 0)return{};const e={};return Object.keys(t).filter(r=>!(r.match(/^on[A-Z]/)&&typeof t[r]=="function")).forEach(r=>{e[r]=t[r]}),e}function m9e(t){const{getSlotProps:e,additionalProps:r,externalSlotProps:n,externalForwardedProps:i,className:a}=t;if(!e){const X=Vo(r?.className,a,i?.className,n?.className),ie={...r?.style,...i?.style,...n?.style},de={...r,...i,...n};return X.length>0&&(de.className=X),Object.keys(ie).length>0&&(de.style=ie),{props:de,internalRef:void 0}}const o=sL({...i,...n}),s=h2e(n),d=h2e(i),b=e(o),L=Vo(b?.className,r?.className,a,i?.className,n?.className),B={...b?.style,...r?.style,...i?.style,...n?.style},V={...b,...r,...d,...s};return L.length>0&&(V.className=L),Object.keys(B).length>0&&(V.style=B),{props:V,internalRef:b.ref}}function Pk(t,e,r){return typeof t=="function"?t(e,r):t}function Kd(t){const{elementType:e,externalSlotProps:r,ownerState:n,skipResolvingSlotProps:i=!1,...a}=t,o=i?{}:Pk(r,n),{props:s,internalRef:d}=m9e({...a,externalSlotProps:o}),b=id(d,o?.ref,t.additionalProps?.ref);return v9e(e,{...s,ref:b},n)}function mht(t){return typeof t=="function"?t():t}const g9e=ze.forwardRef(function(e,r){const{children:n,container:i,disablePortal:a=!1}=e,[o,s]=ze.useState(null),d=id(ze.isValidElement(n)?h4(n):null,r);if(Ah(()=>{a||s(mht(i)||document.body)},[i,a]),Ah(()=>{if(o&&!a)return lhe(r,o),()=>{lhe(r,null)}},[r,o,a]),a){if(ze.isValidElement(n)){const b={ref:d};return ze.cloneElement(n,b)}return n}return o&&k8.createPortal(n,o)});function ght(t){return Al("MuiPopper",t)}Ml("MuiPopper",["root"]);function yht(t,e){if(e==="ltr")return t;switch(t){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return t}}function yhe(t){return typeof t=="function"?t():t}function bht(t){return t.nodeType!==void 0}const xht=t=>{const{classes:e}=t;return Cs({root:["root"]},ght,e)},_ht={},wht=ze.forwardRef(function(e,r){const{anchorEl:n,children:i,direction:a,disablePortal:o,modifiers:s,open:d,placement:b,popperOptions:L,popperRef:B,slotProps:V={},slots:X={},TransitionProps:ie,ownerState:de,...ae}=e,U=ze.useRef(null),ve=id(U,r),Se=ze.useRef(null),Pe=id(Se,B),Me=ze.useRef(Pe);Ah(()=>{Me.current=Pe},[Pe]),ze.useImperativeHandle(B,()=>Se.current,[]);const Ie=yht(b,a),[Ve,Ze]=ze.useState(Ie),[Je,nt]=ze.useState(yhe(n));ze.useEffect(()=>{Se.current&&Se.current.forceUpdate()}),ze.useEffect(()=>{n&&nt(yhe(n))},[n]),Ah(()=>{if(!Je||!d)return;const qt=Zt=>{Ze(Zt.placement)};let Lt=[{name:"preventOverflow",options:{altBoundary:o}},{name:"flip",options:{altBoundary:o}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:Zt})=>{qt(Zt)}}];s!=null&&(Lt=Lt.concat(s)),L&&L.modifiers!=null&&(Lt=Lt.concat(L.modifiers));const dr=vht(Je,U.current,{placement:Ie,...L,modifiers:Lt});return Me.current(dr),()=>{dr.destroy(),Me.current(null)}},[Je,o,s,d,L,Ie]);const ut={placement:Ve};ie!==null&&(ut.TransitionProps=ie);const ht=xht(e),_t=X.root??"div",Dt=Kd({elementType:_t,externalSlotProps:V.root,externalForwardedProps:ae,additionalProps:{role:"tooltip",ref:ve},ownerState:e,className:ht.root});return Ke.jsx(_t,{...Dt,children:typeof i=="function"?i(ut):i})}),Sht=ze.forwardRef(function(e,r){const{anchorEl:n,children:i,container:a,direction:o="ltr",disablePortal:s=!1,keepMounted:d=!1,modifiers:b,open:L,placement:B="bottom",popperOptions:V=_ht,popperRef:X,style:ie,transition:de=!1,slotProps:ae={},slots:U={},...ve}=e,[Se,Pe]=ze.useState(!0),Me=()=>{Pe(!1)},Ie=()=>{Pe(!0)};if(!d&&!L&&(!de||Se))return null;let Ve;if(a)Ve=a;else if(n){const nt=yhe(n);Ve=nt&&bht(nt)?Lm(nt).body:Lm(null).body}const Ze=!L&&d&&(!de||Se)?"none":void 0,Je=de?{in:L,onEnter:Me,onExited:Ie}:void 0;return Ke.jsx(g9e,{disablePortal:s,container:Ve,children:Ke.jsx(wht,{anchorEl:n,direction:o,disablePortal:s,modifiers:b,ref:r,open:de?!Se:L,placement:B,popperOptions:V,popperRef:X,slotProps:ae,slots:U,...ve,style:{position:"fixed",top:0,left:0,display:Ze,...ie},TransitionProps:Je,children:i})})}),Tht=fa(Sht,{name:"MuiPopper",slot:"Root"})({}),O8=ze.forwardRef(function(e,r){const n=Kv(),i=Uu({props:e,name:"MuiPopper"}),{anchorEl:a,component:o,components:s,componentsProps:d,container:b,disablePortal:L,keepMounted:B,modifiers:V,open:X,placement:ie,popperOptions:de,popperRef:ae,transition:U,slots:ve,slotProps:Se,...Pe}=i,Me=ve?.root??s?.Root,Ie={anchorEl:a,container:b,disablePortal:L,keepMounted:B,modifiers:V,open:X,placement:ie,popperOptions:de,popperRef:ae,transition:U,...Pe};return Ke.jsx(Tht,{as:o,direction:n?"rtl":"ltr",slots:{root:Me},slotProps:Se??d,...Ie,ref:r})});function Nu(t,e){const{className:r,elementType:n,ownerState:i,externalForwardedProps:a,internalForwardedProps:o,shouldForwardComponentProp:s=!1,...d}=e,{component:b,slots:L={[t]:void 0},slotProps:B={[t]:void 0},...V}=a,X=L[t]||n,ie=Pk(B[t],i),{props:{component:de,...ae},internalRef:U}=m9e({className:r,...d,externalForwardedProps:t==="root"?V:void 0,externalSlotProps:ie}),ve=id(U,ie?.ref,e.ref),Se=t==="root"?de||b:de,Pe=v9e(X,{...t==="root"&&!b&&!L[t]&&o,...t!=="root"&&!L[t]&&o,...ae,...Se&&!s&&{as:Se},...Se&&s&&{component:Se},ref:ve},i);return[X,Pe]}function Eht(t){return Al("MuiTooltip",t)}const v1=Ml("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);function Aht(t){return Math.round(t*1e5)/1e5}const Cht=t=>{const{classes:e,disableInteractive:r,arrow:n,touch:i,placement:a}=t,o={popper:["popper",!r&&"popperInteractive",n&&"popperArrow"],tooltip:["tooltip",n&&"tooltipArrow",i&&"touch",`tooltipPlacement${ys(a.split("-")[0])}`],arrow:["arrow"]};return Cs(o,Eht,e)},Mht=fa(O8,{name:"MuiTooltip",slot:"Popper",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.popper,!r.disableInteractive&&e.popperInteractive,r.arrow&&e.popperArrow,!r.open&&e.popperClose]}})(yu(({theme:t})=>({zIndex:(t.vars||t).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:e})=>!e.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:e})=>!e,style:{pointerEvents:"none"}},{props:({ownerState:e})=>e.arrow,style:{[`&[data-popper-placement*="bottom"] .${v1.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${v1.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${v1.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${v1.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:e})=>e.arrow&&!e.isRtl,style:{[`&[data-popper-placement*="right"] .${v1.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!!e.isRtl,style:{[`&[data-popper-placement*="right"] .${v1.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!e.isRtl,style:{[`&[data-popper-placement*="left"] .${v1.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!!e.isRtl,style:{[`&[data-popper-placement*="left"] .${v1.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}))),Rht=fa("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.tooltip,r.touch&&e.touch,r.arrow&&e.tooltipArrow,e[`tooltipPlacement${ys(r.placement.split("-")[0])}`]]}})(yu(({theme:t})=>({backgroundColor:t.vars?t.vars.palette.Tooltip.bg:t.alpha(t.palette.grey[700],.92),borderRadius:(t.vars||t).shape.borderRadius,color:(t.vars||t).palette.common.white,fontFamily:t.typography.fontFamily,padding:"4px 8px",fontSize:t.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:t.typography.fontWeightMedium,[`.${v1.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${v1.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${v1.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${v1.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:e})=>e.arrow,style:{position:"relative",margin:0}},{props:({ownerState:e})=>e.touch,style:{padding:"8px 16px",fontSize:t.typography.pxToRem(14),lineHeight:`${Aht(16/14)}em`,fontWeight:t.typography.fontWeightRegular}},{props:({ownerState:e})=>!e.isRtl,style:{[`.${v1.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${v1.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:e})=>!e.isRtl&&e.touch,style:{[`.${v1.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${v1.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:e})=>!!e.isRtl,style:{[`.${v1.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${v1.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:e})=>!!e.isRtl&&e.touch,style:{[`.${v1.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${v1.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:e})=>e.touch,style:{[`.${v1.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:e})=>e.touch,style:{[`.${v1.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),kht=fa("span",{name:"MuiTooltip",slot:"Arrow"})(yu(({theme:t})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:t.vars?t.vars.palette.Tooltip.bg:t.alpha(t.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let KH=!1;const p2e=new vY;let C7={x:0,y:0};function JH(t,e){return(r,...n)=>{e&&e(r,...n),t(r,...n)}}const Zh=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiTooltip"}),{arrow:i=!1,children:a,classes:o,components:s={},componentsProps:d={},describeChild:b=!1,disableFocusListener:L=!1,disableHoverListener:B=!1,disableInteractive:V=!1,disableTouchListener:X=!1,enterDelay:ie=100,enterNextDelay:de=0,enterTouchDelay:ae=700,followCursor:U=!1,id:ve,leaveDelay:Se=0,leaveTouchDelay:Pe=1500,onClose:Me,onOpen:Ie,open:Ve,placement:Ze="bottom",PopperComponent:Je,PopperProps:nt={},slotProps:ut={},slots:ht={},title:_t,TransitionComponent:Dt,TransitionProps:qt,...Lt}=n,dr=ze.isValidElement(a)?a:Ke.jsx("span",{children:a}),Zt=cy(),Cr=Kv(),[yt,Vt]=ze.useState(),[Er,sr]=ze.useState(null),or=ze.useRef(!1),Ar=V||U,Ir=U2(),_n=U2(),Un=U2(),Qn=U2(),[Jn,Vn]=V_({controlled:Ve,default:!1,name:"Tooltip",state:"open"});let jn=Jn;const Lr=Vd(ve),Yn=ze.useRef(),On=vl(()=>{Yn.current!==void 0&&(document.body.style.WebkitUserSelect=Yn.current,Yn.current=void 0),Qn.clear()});ze.useEffect(()=>On,[On]);const Sn=su=>{p2e.clear(),KH=!0,Vn(!0),Ie&&!jn&&Ie(su)},bn=vl(su=>{p2e.start(800+Se,()=>{KH=!1}),Vn(!1),Me&&jn&&Me(su),Ir.start(Zt.transitions.duration.shortest,()=>{or.current=!1})}),Mn=su=>{or.current&&su.type!=="touchstart"||(yt&&yt.removeAttribute("title"),_n.clear(),Un.clear(),ie||KH&&de?_n.start(KH?de:ie,()=>{Sn(su)}):Sn(su))},gi=su=>{_n.clear(),Un.start(Se,()=>{bn(su)})},[,Oi]=ze.useState(!1),Pa=su=>{ZP(su.target)||(Oi(!1),gi(su))},va=su=>{yt||Vt(su.currentTarget),ZP(su.target)&&(Oi(!0),Mn(su))},ti=su=>{or.current=!0;const Mc=dr.props;Mc.onTouchStart&&Mc.onTouchStart(su)},Tn=su=>{ti(su),Un.clear(),Ir.clear(),On(),Yn.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",Qn.start(ae,()=>{document.body.style.WebkitUserSelect=Yn.current,Mn(su)})},bi=su=>{dr.props.onTouchEnd&&dr.props.onTouchEnd(su),On(),Un.start(Pe,()=>{bn(su)})};ze.useEffect(()=>{if(!jn)return;function su(Mc){Mc.key==="Escape"&&bn(Mc)}return document.addEventListener("keydown",su),()=>{document.removeEventListener("keydown",su)}},[bn,jn]);const Wn=id(h4(dr),Vt,r);!_t&&_t!==0&&(jn=!1);const Ei=ze.useRef(),Ki=su=>{const Mc=dr.props;Mc.onMouseMove&&Mc.onMouseMove(su),C7={x:su.clientX,y:su.clientY},Ei.current&&Ei.current.update()},sa={},xa=typeof _t=="string";b?(sa.title=!jn&&xa&&!B?_t:null,sa["aria-describedby"]=jn?Lr:null):(sa["aria-label"]=xa?_t:null,sa["aria-labelledby"]=jn&&!xa?Lr:null);const Qa={...sa,...Lt,...dr.props,className:Vo(Lt.className,dr.props.className),onTouchStart:ti,ref:Wn,...U?{onMouseMove:Ki}:{}},is={};X||(Qa.onTouchStart=Tn,Qa.onTouchEnd=bi),B||(Qa.onMouseOver=JH(Mn,Qa.onMouseOver),Qa.onMouseLeave=JH(gi,Qa.onMouseLeave),Ar||(is.onMouseOver=Mn,is.onMouseLeave=gi)),L||(Qa.onFocus=JH(va,Qa.onFocus),Qa.onBlur=JH(Pa,Qa.onBlur),Ar||(is.onFocus=va,is.onBlur=Pa));const go={...n,isRtl:Cr,arrow:i,disableInteractive:Ar,placement:Ze,PopperComponentProp:Je,touch:or.current},Co=typeof ut.popper=="function"?ut.popper(go):ut.popper,Ko=ze.useMemo(()=>{let su=[{name:"arrow",enabled:!!Er,options:{element:Er,padding:4}}];return nt.popperOptions?.modifiers&&(su=su.concat(nt.popperOptions.modifiers)),Co?.popperOptions?.modifiers&&(su=su.concat(Co.popperOptions.modifiers)),{...nt.popperOptions,...Co?.popperOptions,modifiers:su}},[Er,nt.popperOptions,Co?.popperOptions]),Zi=Cht(go),za=typeof ut.transition=="function"?ut.transition(go):ut.transition,Ss={slots:{popper:s.Popper,transition:s.Transition??Dt,tooltip:s.Tooltip,arrow:s.Arrow,...ht},slotProps:{arrow:ut.arrow??d.arrow,popper:{...nt,...Co??d.popper},tooltip:ut.tooltip??d.tooltip,transition:{...qt,...za??d.transition}}},[ba,po]=Nu("popper",{elementType:Mht,externalForwardedProps:Ss,ownerState:go,className:Vo(Zi.popper,nt?.className)}),[Ys,$s]=Nu("transition",{elementType:yL,externalForwardedProps:Ss,ownerState:go}),[Gs,Ns]=Nu("tooltip",{elementType:Rht,className:Zi.tooltip,externalForwardedProps:Ss,ownerState:go}),[Hl,nu]=Nu("arrow",{elementType:kht,className:Zi.arrow,externalForwardedProps:Ss,ownerState:go,ref:sr});return Ke.jsxs(ze.Fragment,{children:[ze.cloneElement(dr,Qa),Ke.jsx(ba,{as:Je??O8,placement:Ze,anchorEl:U?{getBoundingClientRect:()=>({top:C7.y,left:C7.x,right:C7.x,bottom:C7.y,width:0,height:0})}:yt,popperRef:Ei,open:yt?jn:!1,id:Lr,transition:!0,...is,...po,popperOptions:Ko,children:({TransitionProps:su})=>Ke.jsx(Ys,{timeout:Zt.transitions.duration.shorter,...su,...$s,children:Ke.jsxs(Gs,{...Ns,children:[_t,i?Ke.jsx(Hl,{...nu}):null]})})})]})}),Iht=Hu(Ke.jsx("path",{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2M6 9h12v2H6zm8 5H6v-2h8zm4-6H6V6h12z"})),Pht=Hu(Ke.jsx("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6z"})),Dht=Hu(Ke.jsx("path",{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5M2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1m18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1M11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1m0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1M5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0z"})),Lht=Hu(Ke.jsx("path",{d:"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1"})),y9e=Hu(Ke.jsx("path",{d:"M7 14c-1.66 0-3 1.34-3 3 0 1.31-1.16 2-2 2 .92 1.22 2.49 2 4 2 2.21 0 4-1.79 4-4 0-1.66-1.34-3-3-3m13.71-9.37-1.34-1.34a.996.996 0 0 0-1.41 0L9 12.25 11.75 15l8.96-8.96c.39-.39.39-1.02 0-1.41"}));function Oht(t){return Al("MuiCollapse",t)}Ml("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const Nht=t=>{const{orientation:e,classes:r}=t,n={root:["root",`${e}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${e}`],wrapperInner:["wrapperInner",`${e}`]};return Cs(n,Oht,r)},Fht=fa("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[r.orientation],r.state==="entered"&&e.entered,r.state==="exited"&&!r.in&&r.collapsedSize==="0px"&&e.hidden]}})(yu(({theme:t})=>({height:0,overflow:"hidden",transition:t.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:t.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:e})=>e.state==="exited"&&!e.in&&e.collapsedSize==="0px",style:{visibility:"hidden"}}]}))),zht=fa("div",{name:"MuiCollapse",slot:"Wrapper"})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),Bht=fa("div",{name:"MuiCollapse",slot:"WrapperInner"})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),k9=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiCollapse"}),{addEndListener:i,children:a,className:o,collapsedSize:s="0px",component:d,easing:b,in:L,onEnter:B,onEntered:V,onEntering:X,onExit:ie,onExited:de,onExiting:ae,orientation:U="vertical",style:ve,timeout:Se=Qze.standard,TransitionComponent:Pe=vE,...Me}=n,Ie={...n,orientation:U,collapsedSize:s},Ve=Nht(Ie),Ze=cy(),Je=U2(),nt=ze.useRef(null),ut=ze.useRef(),ht=typeof s=="number"?`${s}px`:s,_t=U==="horizontal",Dt=_t?"width":"height",qt=ze.useRef(null),Lt=id(r,qt),dr=Ir=>_n=>{if(Ir){const Un=qt.current;_n===void 0?Ir(Un):Ir(Un,_n)}},Zt=()=>nt.current?nt.current[_t?"clientWidth":"clientHeight"]:0,Cr=dr((Ir,_n)=>{nt.current&&_t&&(nt.current.style.position="absolute"),Ir.style[Dt]=ht,B&&B(Ir,_n)}),yt=dr((Ir,_n)=>{const Un=Zt();nt.current&&_t&&(nt.current.style.position="");const{duration:Qn,easing:Jn}=KP({style:ve,timeout:Se,easing:b},{mode:"enter"});if(Se==="auto"){const Vn=Ze.transitions.getAutoHeightDuration(Un);Ir.style.transitionDuration=`${Vn}ms`,ut.current=Vn}else Ir.style.transitionDuration=typeof Qn=="string"?Qn:`${Qn}ms`;Ir.style[Dt]=`${Un}px`,Ir.style.transitionTimingFunction=Jn,X&&X(Ir,_n)}),Vt=dr((Ir,_n)=>{Ir.style[Dt]="auto",V&&V(Ir,_n)}),Er=dr(Ir=>{Ir.style[Dt]=`${Zt()}px`,ie&&ie(Ir)}),sr=dr(de),or=dr(Ir=>{const _n=Zt(),{duration:Un,easing:Qn}=KP({style:ve,timeout:Se,easing:b},{mode:"exit"});if(Se==="auto"){const Jn=Ze.transitions.getAutoHeightDuration(_n);Ir.style.transitionDuration=`${Jn}ms`,ut.current=Jn}else Ir.style.transitionDuration=typeof Un=="string"?Un:`${Un}ms`;Ir.style[Dt]=ht,Ir.style.transitionTimingFunction=Qn,ae&&ae(Ir)}),Ar=Ir=>{Se==="auto"&&Je.start(ut.current||0,Ir),i&&i(qt.current,Ir)};return Ke.jsx(Pe,{in:L,onEnter:Cr,onEntered:Vt,onEntering:yt,onExit:Er,onExited:sr,onExiting:or,addEndListener:Ar,nodeRef:qt,timeout:Se==="auto"?null:Se,...Me,children:(Ir,{ownerState:_n,...Un})=>Ke.jsx(Fht,{as:d,className:Vo(Ve.root,o,{entered:Ve.entered,exited:!L&&ht==="0px"&&Ve.hidden}[Ir]),style:{[_t?"minWidth":"minHeight"]:ht,...ve},ref:Lt,ownerState:{...Ie,state:Ir},...Un,children:Ke.jsx(zht,{ownerState:{...Ie,state:Ir},className:Ve.wrapper,ref:nt,children:Ke.jsx(Bht,{ownerState:{...Ie,state:Ir},className:Ve.wrapperInner,children:a})})})})});k9&&(k9.muiSupportAuto=!0);const b9e=ze.createContext({});function Uht(t){return Al("MuiAccordion",t)}const QH=Ml("MuiAccordion",["root","heading","rounded","expanded","disabled","gutters","region"]),Hht=t=>{const{classes:e,square:r,expanded:n,disabled:i,disableGutters:a}=t;return Cs({root:["root",!r&&"rounded",n&&"expanded",i&&"disabled",!a&&"gutters"],heading:["heading"],region:["region"]},Uht,e)},jht=fa(Gy,{name:"MuiAccordion",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[{[`& .${QH.region}`]:e.region},e.root,!r.square&&e.rounded,!r.disableGutters&&e.gutters]}})(yu(({theme:t})=>{const e={duration:t.transitions.duration.shortest};return{position:"relative",transition:t.transitions.create(["margin"],e),overflowAnchor:"none","&::before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:(t.vars||t).palette.divider,transition:t.transitions.create(["opacity","background-color"],e)},"&:first-of-type":{"&::before":{display:"none"}},[`&.${QH.expanded}`]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:"none"}}},[`&.${QH.disabled}`]:{backgroundColor:(t.vars||t).palette.action.disabledBackground}}}),yu(({theme:t})=>({variants:[{props:e=>!e.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(t.vars||t).shape.borderRadius,borderBottomRightRadius:(t.vars||t).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:e=>!e.disableGutters,style:{[`&.${QH.expanded}`]:{margin:"16px 0"}}}]}))),Vht=fa("h3",{name:"MuiAccordion",slot:"Heading"})({all:"unset"}),qht=fa("div",{name:"MuiAccordion",slot:"Region"})({}),bhe=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiAccordion"}),{children:i,className:a,defaultExpanded:o=!1,disabled:s=!1,disableGutters:d=!1,expanded:b,onChange:L,square:B=!1,slots:V={},slotProps:X={},TransitionComponent:ie,TransitionProps:de,...ae}=n,[U,ve]=V_({controlled:b,default:o,name:"Accordion",state:"expanded"}),Se=ze.useCallback(yt=>{ve(!U),L&&L(yt,!U)},[U,L,ve]),[Pe,...Me]=ze.Children.toArray(i),Ie=ze.useMemo(()=>({expanded:U,disabled:s,disableGutters:d,toggle:Se}),[U,s,d,Se]),Ve={...n,square:B,disabled:s,disableGutters:d,expanded:U},Ze=Hht(Ve),Je={transition:ie,...V},nt={transition:de,...X},ut={slots:Je,slotProps:nt},[ht,_t]=Nu("root",{elementType:jht,externalForwardedProps:{...ut,...ae},className:Vo(Ze.root,a),shouldForwardComponentProp:!0,ownerState:Ve,ref:r,additionalProps:{square:B}}),[Dt,qt]=Nu("heading",{elementType:Vht,externalForwardedProps:ut,className:Ze.heading,ownerState:Ve}),[Lt,dr]=Nu("transition",{elementType:k9,externalForwardedProps:ut,ownerState:Ve}),[Zt,Cr]=Nu("region",{elementType:qht,externalForwardedProps:ut,ownerState:Ve,className:Ze.region,additionalProps:{"aria-labelledby":Pe.props.id,id:Pe.props["aria-controls"],role:"region"}});return Ke.jsxs(ht,{..._t,children:[Ke.jsx(Dt,{...qt,children:Ke.jsx(b9e.Provider,{value:Ie,children:Pe})}),Ke.jsx(Lt,{in:U,timeout:"auto",...dr,children:Ke.jsx(Zt,{...Cr,children:Me})})]})});function Ght(t){return Al("MuiAccordionDetails",t)}Ml("MuiAccordionDetails",["root"]);const $ht=t=>{const{classes:e}=t;return Cs({root:["root"]},Ght,e)},Wht=fa("div",{name:"MuiAccordionDetails",slot:"Root"})(yu(({theme:t})=>({padding:t.spacing(1,2,2)}))),xhe=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiAccordionDetails"}),{className:i,...a}=n,o=n,s=$ht(o);return Ke.jsx(Wht,{className:Vo(s.root,i),ref:r,ownerState:o,...a})});function Yht(t){return Al("MuiAccordionSummary",t)}const yN=Ml("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"]),Xht=t=>{const{classes:e,expanded:r,disabled:n,disableGutters:i}=t;return Cs({root:["root",r&&"expanded",n&&"disabled",!i&&"gutters"],focusVisible:["focusVisible"],content:["content",r&&"expanded",!i&&"contentGutters"],expandIconWrapper:["expandIconWrapper",r&&"expanded"]},Yht,e)},Zht=fa(ZS,{name:"MuiAccordionSummary",slot:"Root"})(yu(({theme:t})=>{const e={duration:t.transitions.duration.shortest};return{display:"flex",width:"100%",minHeight:48,padding:t.spacing(0,2),transition:t.transitions.create(["min-height","background-color"],e),[`&.${yN.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${yN.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`&:hover:not(.${yN.disabled})`]:{cursor:"pointer"},variants:[{props:r=>!r.disableGutters,style:{[`&.${yN.expanded}`]:{minHeight:64}}}]}})),Kht=fa("span",{name:"MuiAccordionSummary",slot:"Content"})(yu(({theme:t})=>({display:"flex",textAlign:"start",flexGrow:1,margin:"12px 0",variants:[{props:e=>!e.disableGutters,style:{transition:t.transitions.create(["margin"],{duration:t.transitions.duration.shortest}),[`&.${yN.expanded}`]:{margin:"20px 0"}}}]}))),Jht=fa("span",{name:"MuiAccordionSummary",slot:"ExpandIconWrapper"})(yu(({theme:t})=>({display:"flex",color:(t.vars||t).palette.action.active,transform:"rotate(0deg)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shortest}),[`&.${yN.expanded}`]:{transform:"rotate(180deg)"}}))),_he=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiAccordionSummary"}),{children:i,className:a,expandIcon:o,focusVisibleClassName:s,onClick:d,slots:b,slotProps:L,...B}=n,{disabled:V=!1,disableGutters:X,expanded:ie,toggle:de}=ze.useContext(b9e),ae=nt=>{de&&de(nt),d&&d(nt)},U={...n,expanded:ie,disabled:V,disableGutters:X},ve=Xht(U),Se={slots:b,slotProps:L},[Pe,Me]=Nu("root",{ref:r,shouldForwardComponentProp:!0,className:Vo(ve.root,a),elementType:Zht,externalForwardedProps:{...Se,...B},ownerState:U,additionalProps:{focusRipple:!1,disableRipple:!0,disabled:V,"aria-expanded":ie,focusVisibleClassName:Vo(ve.focusVisible,s)},getSlotProps:nt=>({...nt,onClick:ut=>{nt.onClick?.(ut),ae(ut)}})}),[Ie,Ve]=Nu("content",{className:ve.content,elementType:Kht,externalForwardedProps:Se,ownerState:U}),[Ze,Je]=Nu("expandIconWrapper",{className:ve.expandIconWrapper,elementType:Jht,externalForwardedProps:Se,ownerState:U});return Ke.jsxs(Pe,{...Me,children:[Ke.jsx(Ie,{...Ve,children:i}),o&&Ke.jsx(Ze,{...Je,children:o})]})});function Qht(t){return Al("MuiAlert",t)}const v2e=Ml("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),ept=Hu(Ke.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"})),tpt=Hu(Ke.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"})),rpt=Hu(Ke.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),npt=Hu(Ke.jsx("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"})),x9e=Hu(Ke.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),ipt=t=>{const{variant:e,color:r,severity:n,classes:i}=t,a={root:["root",`color${ys(r||n)}`,`${e}${ys(r||n)}`,`${e}`],icon:["icon"],message:["message"],action:["action"]};return Cs(a,Qht,i)},apt=fa(Gy,{name:"MuiAlert",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[r.variant],e[`${r.variant}${ys(r.color||r.severity)}`]]}})(yu(({theme:t})=>{const e=t.palette.mode==="light"?t.darken:t.lighten,r=t.palette.mode==="light"?t.lighten:t.darken;return{...t.typography.body2,backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(t.palette).filter(Yv(["light"])).map(([n])=>({props:{colorSeverity:n,variant:"standard"},style:{color:t.vars?t.vars.palette.Alert[`${n}Color`]:e(t.palette[n].light,.6),backgroundColor:t.vars?t.vars.palette.Alert[`${n}StandardBg`]:r(t.palette[n].light,.9),[`& .${v2e.icon}`]:t.vars?{color:t.vars.palette.Alert[`${n}IconColor`]}:{color:t.palette[n].main}}})),...Object.entries(t.palette).filter(Yv(["light"])).map(([n])=>({props:{colorSeverity:n,variant:"outlined"},style:{color:t.vars?t.vars.palette.Alert[`${n}Color`]:e(t.palette[n].light,.6),border:`1px solid ${(t.vars||t).palette[n].light}`,[`& .${v2e.icon}`]:t.vars?{color:t.vars.palette.Alert[`${n}IconColor`]}:{color:t.palette[n].main}}})),...Object.entries(t.palette).filter(Yv(["dark"])).map(([n])=>({props:{colorSeverity:n,variant:"filled"},style:{fontWeight:t.typography.fontWeightMedium,...t.vars?{color:t.vars.palette.Alert[`${n}FilledColor`],backgroundColor:t.vars.palette.Alert[`${n}FilledBg`]}:{backgroundColor:t.palette.mode==="dark"?t.palette[n].dark:t.palette[n].main,color:t.palette.getContrastText(t.palette[n].main)}}}))]}})),opt=fa("div",{name:"MuiAlert",slot:"Icon"})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),spt=fa("div",{name:"MuiAlert",slot:"Message"})({padding:"8px 0",minWidth:0,overflow:"auto"}),lpt=fa("div",{name:"MuiAlert",slot:"Action"})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),m2e={success:Ke.jsx(ept,{fontSize:"inherit"}),warning:Ke.jsx(tpt,{fontSize:"inherit"}),error:Ke.jsx(rpt,{fontSize:"inherit"}),info:Ke.jsx(npt,{fontSize:"inherit"})},qw=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiAlert"}),{action:i,children:a,className:o,closeText:s="Close",color:d,components:b={},componentsProps:L={},icon:B,iconMapping:V=m2e,onClose:X,role:ie="alert",severity:de="success",slotProps:ae={},slots:U={},variant:ve="standard",...Se}=n,Pe={...n,color:d,severity:de,variant:ve,colorSeverity:d||de},Me=ipt(Pe),Ie={slots:{closeButton:b.CloseButton,closeIcon:b.CloseIcon,...U},slotProps:{...L,...ae}},[Ve,Ze]=Nu("root",{ref:r,shouldForwardComponentProp:!0,className:Vo(Me.root,o),elementType:apt,externalForwardedProps:{...Ie,...Se},ownerState:Pe,additionalProps:{role:ie,elevation:0}}),[Je,nt]=Nu("icon",{className:Me.icon,elementType:opt,externalForwardedProps:Ie,ownerState:Pe}),[ut,ht]=Nu("message",{className:Me.message,elementType:spt,externalForwardedProps:Ie,ownerState:Pe}),[_t,Dt]=Nu("action",{className:Me.action,elementType:lpt,externalForwardedProps:Ie,ownerState:Pe}),[qt,Lt]=Nu("closeButton",{elementType:Zf,externalForwardedProps:Ie,ownerState:Pe}),[dr,Zt]=Nu("closeIcon",{elementType:x9e,externalForwardedProps:Ie,ownerState:Pe});return Ke.jsxs(Ve,{...Ze,children:[B!==!1?Ke.jsx(Je,{...nt,children:B||V[de]||m2e[de]}):null,Ke.jsx(ut,{...ht,children:a}),i!=null?Ke.jsx(_t,{...Dt,children:i}):null,i==null&&X?Ke.jsx(_t,{...Dt,children:Ke.jsx(qt,{size:"small","aria-label":s,title:s,color:"inherit",onClick:X,...Lt,children:Ke.jsx(dr,{fontSize:"small",...Zt})})}):null]})}),hme=t=>{const e=ze.useRef({});return ze.useEffect(()=>{e.current=t}),e.current};function g2e({array1:t,array2:e,parser:r=n=>n}){return t&&e&&t.length===e.length&&t.every((n,i)=>r(n)===r(e[i]))}function y2e(t){return t.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function upt(t={}){const{ignoreAccents:e=!0,ignoreCase:r=!0,limit:n,matchFrom:i="any",stringify:a,trim:o=!1}=t;return(s,{inputValue:d,getOptionLabel:b})=>{let L=o?d.trim():d;r&&(L=L.toLowerCase()),e&&(L=y2e(L));const B=L?s.filter(V=>{let X=(a||b)(V);return r&&(X=X.toLowerCase()),e&&(X=y2e(X)),i==="start"?X.startsWith(L):X.includes(L)}):s;return typeof n=="number"?B.slice(0,n):B}}const cpt=upt(),b2e=5,fpt=t=>t.current!==null&&t.current.parentElement?.contains(document.activeElement),dpt=[];function x2e(t,e,r,n){if(e||t==null||n)return"";const i=r(t);return typeof i=="string"?i:""}function hpt(t){const{unstable_isActiveElementInListbox:e=fpt,unstable_classNamePrefix:r="Mui",autoComplete:n=!1,autoHighlight:i=!1,autoSelect:a=!1,blurOnSelect:o=!1,clearOnBlur:s=!t.freeSolo,clearOnEscape:d=!1,componentName:b="useAutocomplete",defaultValue:L=t.multiple?dpt:null,disableClearable:B=!1,disableCloseOnSelect:V=!1,disabled:X,disabledItemsFocusable:ie=!1,disableListWrap:de=!1,filterOptions:ae=cpt,filterSelectedOptions:U=!1,freeSolo:ve=!1,getOptionDisabled:Se,getOptionKey:Pe,getOptionLabel:Me=Mi=>Mi.label??Mi,groupBy:Ie,handleHomeEndKeys:Ve=!t.freeSolo,id:Ze,includeInputInList:Je=!1,inputValue:nt,isOptionEqualToValue:ut=(Mi,to)=>Mi===to,multiple:ht=!1,onChange:_t,onClose:Dt,onHighlightChange:qt,onInputChange:Lt,onOpen:dr,open:Zt,openOnFocus:Cr=!1,options:yt,readOnly:Vt=!1,renderValue:Er,selectOnFocus:sr=!t.freeSolo,value:or}=t,Ar=Vd(Ze);let Ir=Me;Ir=Mi=>{const to=Me(Mi);return typeof to!="string"?String(to):to};const _n=ze.useRef(!1),Un=ze.useRef(!0),Qn=ze.useRef(null),Jn=ze.useRef(null),[Vn,jn]=ze.useState(null),[Lr,Yn]=ze.useState(-1),On=i?0:-1,Sn=ze.useRef(On),bn=ze.useRef(x2e(L??or,ht,Ir)).current,[Mn,gi]=V_({controlled:or,default:L,name:b}),[Oi,Pa]=V_({controlled:nt,default:bn,name:b,state:"inputValue"}),[va,ti]=ze.useState(!1),Tn=ze.useCallback((Mi,to,Dn)=>{if(!(ht?Mn.length<to.length:to!==null)&&!s)return;const pa=x2e(to,ht,Ir,Er);Oi!==pa&&(Pa(pa),Lt&&Lt(Mi,pa,Dn))},[Ir,Oi,ht,Lt,Pa,s,Mn,Er]),[bi,Wn]=V_({controlled:Zt,default:!1,name:b,state:"open"}),[Ei,Ki]=ze.useState(!0),sa=!ht&&Mn!=null&&Oi===Ir(Mn),xa=bi&&!Vt,Qa=xa?ae(yt.filter(Mi=>!(U&&(ht?Mn:[Mn]).some(to=>to!==null&&ut(Mi,to)))),{inputValue:sa&&Ei?"":Oi,getOptionLabel:Ir}):[],is=hme({filteredOptions:Qa,value:Mn,inputValue:Oi});ze.useEffect(()=>{const Mi=Mn!==is.value;va&&!Mi||ve&&!Mi||Tn(null,Mn,"reset")},[Mn,Tn,va,is.value,ve]);const go=bi&&Qa.length>0&&!Vt,Co=vl(Mi=>{if(Mi===-1)Qn.current.focus();else{const to=Er?"data-item-index":"data-tag-index";Vn.querySelector(`[${to}="${Mi}"]`).focus()}});ze.useEffect(()=>{ht&&Lr>Mn.length-1&&(Yn(-1),Co(-1))},[Mn,ht,Lr,Co]);function Ko(Mi,to){if(!Jn.current||Mi<0||Mi>=Qa.length)return-1;let Dn=Mi;for(;;){const ea=Jn.current.querySelector(`[data-option-index="${Dn}"]`),pa=ie?!1:!ea||ea.disabled||ea.getAttribute("aria-disabled")==="true";if(ea&&ea.hasAttribute("tabindex")&&!pa)return Dn;if(to==="next"?Dn=(Dn+1)%Qa.length:Dn=(Dn-1+Qa.length)%Qa.length,Dn===Mi)return-1}}const Zi=vl(({event:Mi,index:to,reason:Dn})=>{if(Sn.current=to,to===-1?Qn.current.removeAttribute("aria-activedescendant"):Qn.current.setAttribute("aria-activedescendant",`${Ar}-option-${to}`),qt&&["mouse","keyboard","touch"].includes(Dn)&&qt(Mi,to===-1?null:Qa[to],Dn),!Jn.current)return;const ea=Jn.current.querySelector(`[role="option"].${r}-focused`);ea&&(ea.classList.remove(`${r}-focused`),ea.classList.remove(`${r}-focusVisible`));let pa=Jn.current;if(Jn.current.getAttribute("role")!=="listbox"&&(pa=Jn.current.parentElement.querySelector('[role="listbox"]')),!pa)return;if(to===-1){pa.scrollTop=0;return}const ja=Jn.current.querySelector(`[data-option-index="${to}"]`);if(ja&&(ja.classList.add(`${r}-focused`),Dn==="keyboard"&&ja.classList.add(`${r}-focusVisible`),pa.scrollHeight>pa.clientHeight&&Dn!=="mouse"&&Dn!=="touch")){const _a=ja,Zs=pa.clientHeight+pa.scrollTop,ks=_a.offsetTop+_a.offsetHeight;ks>Zs?pa.scrollTop=ks-pa.clientHeight:_a.offsetTop-_a.offsetHeight*(Ie?1.3:0)<pa.scrollTop&&(pa.scrollTop=_a.offsetTop-_a.offsetHeight*(Ie?1.3:0))}}),za=vl(({event:Mi,diff:to,direction:Dn="next",reason:ea})=>{if(!xa)return;const ja=Ko((()=>{const _a=Qa.length-1;if(to==="reset")return On;if(to==="start")return 0;if(to==="end")return _a;const Zs=Sn.current+to;return Zs<0?Zs===-1&&Je?-1:de&&Sn.current!==-1||Math.abs(to)>1?0:_a:Zs>_a?Zs===_a+1&&Je?-1:de||Math.abs(to)>1?_a:0:Zs})(),Dn);if(Zi({index:ja,reason:ea,event:Mi}),n&&to!=="reset")if(ja===-1)Qn.current.value=Oi;else{const _a=Ir(Qa[ja]);Qn.current.value=_a,_a.toLowerCase().indexOf(Oi.toLowerCase())===0&&Oi.length>0&&Qn.current.setSelectionRange(Oi.length,_a.length)}}),Ss=!g2e({array1:is.filteredOptions,array2:Qa,parser:Ir}),ba=()=>{const Mi=(to,Dn)=>{const ea=to?Ir(to):"",pa=Dn?Ir(Dn):"";return ea===pa};if(Sn.current!==-1&&!g2e({array1:is.filteredOptions,array2:Qa,parser:Ir})&&is.inputValue===Oi&&(ht?Mn.length===is.value.length&&is.value.every((to,Dn)=>Ir(Mn[Dn])===Ir(to)):Mi(is.value,Mn))){const to=is.filteredOptions[Sn.current];if(to)return Qa.findIndex(Dn=>Ir(Dn)===Ir(to))}return-1},po=ze.useCallback(()=>{if(!xa)return;const Mi=ba();if(Mi!==-1){Sn.current=Mi;return}const to=ht?Mn[0]:Mn;if(Qa.length===0||to==null){za({diff:"reset"});return}if(Jn.current){if(to!=null){const Dn=Qa[Sn.current];if(ht&&Dn&&Mn.findIndex(pa=>ut(Dn,pa))!==-1)return;const ea=Qa.findIndex(pa=>ut(pa,to));ea===-1?za({diff:"reset"}):Zi({index:ea});return}if(Sn.current>=Qa.length-1){Zi({index:Qa.length-1});return}Zi({index:Sn.current})}},[Qa.length,ht?!1:Mn,U,za,Zi,xa,Oi,ht]),Ys=vl(Mi=>{lhe(Jn,Mi),Mi&&po()});ze.useEffect(()=>{Ss&&po()},[po,Ss]);const $s=Mi=>{bi||(Wn(!0),Ki(!0),dr&&dr(Mi))},Gs=(Mi,to)=>{bi&&(Wn(!1),Dt&&Dt(Mi,to))},Ns=(Mi,to,Dn,ea)=>{if(ht){if(Mn.length===to.length&&Mn.every((pa,ja)=>pa===to[ja]))return}else if(Mn===to)return;_t&&_t(Mi,to,Dn,ea),gi(to)},Hl=ze.useRef(!1),nu=(Mi,to,Dn="selectOption",ea="options")=>{let pa=Dn,ja=to;if(ht){ja=Array.isArray(Mn)?Mn.slice():[];const _a=ja.findIndex(Zs=>ut(to,Zs));_a===-1?ja.push(to):ea!=="freeSolo"&&(ja.splice(_a,1),pa="removeOption")}Tn(Mi,ja,pa),Ns(Mi,ja,pa,{option:to}),!V&&(!Mi||!Mi.ctrlKey&&!Mi.metaKey)&&Gs(Mi,pa),(o===!0||o==="touch"&&Hl.current||o==="mouse"&&!Hl.current)&&Qn.current.blur()};function su(Mi,to){if(Mi===-1)return-1;let Dn=Mi;for(;;){if(to==="next"&&Dn===Mn.length||to==="previous"&&Dn===-1)return-1;const ea=Er?"data-item-index":"data-tag-index",pa=Vn.querySelector(`[${ea}="${Dn}"]`);if(!pa||!pa.hasAttribute("tabindex")||pa.disabled||pa.getAttribute("aria-disabled")==="true")Dn+=to==="next"?1:-1;else return Dn}}const Mc=(Mi,to)=>{if(!ht)return;Oi===""&&Gs(Mi,"toggleInput");let Dn=Lr;Lr===-1?Oi===""&&to==="previous"&&(Dn=Mn.length-1):(Dn+=to==="next"?1:-1,Dn<0&&(Dn=0),Dn===Mn.length&&(Dn=-1)),Dn=su(Dn,to),Yn(Dn),Co(Dn)},da=Mi=>{_n.current=!0,Pa(""),Lt&&Lt(Mi,"","clear"),Ns(Mi,ht?[]:null,"clear")},Xa=Mi=>to=>{if(Mi.onKeyDown&&Mi.onKeyDown(to),!to.defaultMuiPrevented&&(Lr!==-1&&!["ArrowLeft","ArrowRight"].includes(to.key)&&(Yn(-1),Co(-1)),to.which!==229))switch(to.key){case"Home":xa&&Ve&&(to.preventDefault(),za({diff:"start",direction:"next",reason:"keyboard",event:to}));break;case"End":xa&&Ve&&(to.preventDefault(),za({diff:"end",direction:"previous",reason:"keyboard",event:to}));break;case"PageUp":to.preventDefault(),za({diff:-b2e,direction:"previous",reason:"keyboard",event:to}),$s(to);break;case"PageDown":to.preventDefault(),za({diff:b2e,direction:"next",reason:"keyboard",event:to}),$s(to);break;case"ArrowDown":to.preventDefault(),za({diff:1,direction:"next",reason:"keyboard",event:to}),$s(to);break;case"ArrowUp":to.preventDefault(),za({diff:-1,direction:"previous",reason:"keyboard",event:to}),$s(to);break;case"ArrowLeft":!ht&&Er?Co(0):Mc(to,"previous");break;case"ArrowRight":!ht&&Er?Co(-1):Mc(to,"next");break;case"Enter":if(Sn.current!==-1&&xa){const Dn=Qa[Sn.current],ea=Se?Se(Dn):!1;if(to.preventDefault(),ea)return;nu(to,Dn,"selectOption"),n&&Qn.current.setSelectionRange(Qn.current.value.length,Qn.current.value.length)}else ve&&Oi!==""&&sa===!1&&(ht&&to.preventDefault(),nu(to,Oi,"createOption","freeSolo"));break;case"Escape":xa?(to.preventDefault(),to.stopPropagation(),Gs(to,"escape")):d&&(Oi!==""||ht&&Mn.length>0||Er)&&(to.preventDefault(),to.stopPropagation(),da(to));break;case"Backspace":if(ht&&!Vt&&Oi===""&&Mn.length>0){const Dn=Lr===-1?Mn.length-1:Lr,ea=Mn.slice();ea.splice(Dn,1),Ns(to,ea,"removeOption",{option:Mn[Dn]})}!ht&&Er&&!Vt&&(gi(null),Co(-1));break;case"Delete":if(ht&&!Vt&&Oi===""&&Mn.length>0&&Lr!==-1){const Dn=Lr,ea=Mn.slice();ea.splice(Dn,1),Ns(to,ea,"removeOption",{option:Mn[Dn]})}!ht&&Er&&!Vt&&(gi(null),Co(-1));break}},Oo=Mi=>{ti(!0),Cr&&!_n.current&&$s(Mi)},_s=Mi=>{if(e(Jn)){Qn.current.focus();return}ti(!1),Un.current=!0,_n.current=!1,a&&Sn.current!==-1&&xa?nu(Mi,Qa[Sn.current],"blur"):a&&ve&&Oi!==""?nu(Mi,Oi,"blur","freeSolo"):s&&Tn(Mi,Mn,"blur"),Gs(Mi,"blur")},nl=Mi=>{const to=Mi.target.value;Oi!==to&&(Pa(to),Ki(!1),Lt&&Lt(Mi,to,"input")),to===""?!B&&!ht&&Ns(Mi,null,"clear"):$s(Mi)},vu=Mi=>{const to=Number(Mi.currentTarget.getAttribute("data-option-index"));Sn.current!==to&&Zi({event:Mi,index:to,reason:"mouse"})},zl=Mi=>{Zi({event:Mi,index:Number(Mi.currentTarget.getAttribute("data-option-index")),reason:"touch"}),Hl.current=!0},jl=Mi=>{const to=Number(Mi.currentTarget.getAttribute("data-option-index"));nu(Mi,Qa[to],"selectOption"),Hl.current=!1},Il=Mi=>to=>{const Dn=Mn.slice();Dn.splice(Mi,1),Ns(to,Dn,"removeOption",{option:Mn[Mi]})},Js=Mi=>{Ns(Mi,null,"removeOption",{option:Mn})},Vl=Mi=>{bi?Gs(Mi,"toggleInput"):$s(Mi)},zn=Mi=>{Mi.currentTarget.contains(Mi.target)&&Mi.target.getAttribute("id")!==Ar&&Mi.preventDefault()},Ni=Mi=>{Mi.currentTarget.contains(Mi.target)&&(Qn.current.focus(),sr&&Un.current&&Qn.current.selectionEnd-Qn.current.selectionStart===0&&Qn.current.select(),Un.current=!1)},Za=Mi=>{!X&&(Oi===""||!bi)&&Vl(Mi)};let ts=ve&&Oi.length>0;ts=ts||(ht?Mn.length>0:Mn!==null);let ps=Qa;return Ie&&(ps=Qa.reduce((Mi,to,Dn)=>{const ea=Ie(to);return Mi.length>0&&Mi[Mi.length-1].group===ea?Mi[Mi.length-1].options.push(to):Mi.push({key:Dn,index:Dn,group:ea,options:[to]}),Mi},[])),X&&va&&_s(),{getRootProps:(Mi={})=>({...Mi,onKeyDown:Xa(Mi),onMouseDown:zn,onClick:Ni}),getInputLabelProps:()=>({id:`${Ar}-label`,htmlFor:Ar}),getInputProps:()=>({id:Ar,value:Oi,onBlur:_s,onFocus:Oo,onChange:nl,onMouseDown:Za,"aria-activedescendant":xa?"":null,"aria-autocomplete":n?"both":"list","aria-controls":go?`${Ar}-listbox`:void 0,"aria-expanded":go,autoComplete:"off",ref:Qn,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:X}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:da}),getItemProps:({index:Mi=0}={})=>({...ht&&{key:Mi},...Er?{"data-item-index":Mi}:{"data-tag-index":Mi},tabIndex:-1,...!Vt&&{onDelete:ht?Il(Mi):Js}}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:Vl}),getTagProps:({index:Mi})=>({key:Mi,"data-tag-index":Mi,tabIndex:-1,...!Vt&&{onDelete:Il(Mi)}}),getListboxProps:()=>({role:"listbox",id:`${Ar}-listbox`,"aria-labelledby":`${Ar}-label`,ref:Ys,onMouseDown:Mi=>{Mi.preventDefault()}}),getOptionProps:({index:Mi,option:to})=>{const Dn=(ht?Mn:[Mn]).some(pa=>pa!=null&&ut(to,pa)),ea=Se?Se(to):!1;return{key:Pe?.(to)??Ir(to),tabIndex:-1,role:"option",id:`${Ar}-option-${Mi}`,onMouseMove:vu,onClick:jl,onTouchStart:zl,"data-option-index":Mi,"aria-disabled":ea,"aria-selected":Dn}},id:Ar,inputValue:Oi,value:Mn,dirty:ts,expanded:xa&&Vn,popupOpen:xa,focused:va||Lr!==-1,anchorEl:Vn,setAnchorEl:jn,focusedItem:Lr,focusedTag:Lr,groupedOptions:ps}}function ppt(t){return Al("MuiListSubheader",t)}Ml("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const vpt=t=>{const{classes:e,color:r,disableGutters:n,inset:i,disableSticky:a}=t,o={root:["root",r!=="default"&&`color${ys(r)}`,!n&&"gutters",i&&"inset",!a&&"sticky"]};return Cs(o,ppt,e)},mpt=fa("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.color!=="default"&&e[`color${ys(r.color)}`],!r.disableGutters&&e.gutters,r.inset&&e.inset,!r.disableSticky&&e.sticky]}})(yu(({theme:t})=>({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(t.vars||t).palette.text.secondary,fontFamily:t.typography.fontFamily,fontWeight:t.typography.fontWeightMedium,fontSize:t.typography.pxToRem(14),variants:[{props:{color:"primary"},style:{color:(t.vars||t).palette.primary.main}},{props:{color:"inherit"},style:{color:"inherit"}},{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:72}},{props:({ownerState:e})=>!e.disableSticky,style:{position:"sticky",top:0,zIndex:1,backgroundColor:(t.vars||t).palette.background.paper}}]}))),whe=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiListSubheader"}),{className:i,color:a="default",component:o="li",disableGutters:s=!1,disableSticky:d=!1,inset:b=!1,...L}=n,B={...n,color:a,component:o,disableGutters:s,disableSticky:d,inset:b},V=vpt(B);return Ke.jsx(mpt,{as:o,className:Vo(V.root,i),ref:r,ownerState:B,...L})});whe&&(whe.muiSkipListHighlight=!0);const gpt=Hu(Ke.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}));function ypt(t){return Al("MuiChip",t)}const $p=Ml("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),bpt=t=>{const{classes:e,disabled:r,size:n,color:i,iconColor:a,onDelete:o,clickable:s,variant:d}=t,b={root:["root",d,r&&"disabled",`size${ys(n)}`,`color${ys(i)}`,s&&"clickable",s&&`clickableColor${ys(i)}`,o&&"deletable",o&&`deletableColor${ys(i)}`,`${d}${ys(i)}`],label:["label",`label${ys(n)}`],avatar:["avatar",`avatar${ys(n)}`,`avatarColor${ys(i)}`],icon:["icon",`icon${ys(n)}`,`iconColor${ys(a)}`],deleteIcon:["deleteIcon",`deleteIcon${ys(n)}`,`deleteIconColor${ys(i)}`,`deleteIcon${ys(d)}Color${ys(i)}`]};return Cs(b,ypt,e)},xpt=fa("div",{name:"MuiChip",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t,{color:n,iconColor:i,clickable:a,onDelete:o,size:s,variant:d}=r;return[{[`& .${$p.avatar}`]:e.avatar},{[`& .${$p.avatar}`]:e[`avatar${ys(s)}`]},{[`& .${$p.avatar}`]:e[`avatarColor${ys(n)}`]},{[`& .${$p.icon}`]:e.icon},{[`& .${$p.icon}`]:e[`icon${ys(s)}`]},{[`& .${$p.icon}`]:e[`iconColor${ys(i)}`]},{[`& .${$p.deleteIcon}`]:e.deleteIcon},{[`& .${$p.deleteIcon}`]:e[`deleteIcon${ys(s)}`]},{[`& .${$p.deleteIcon}`]:e[`deleteIconColor${ys(n)}`]},{[`& .${$p.deleteIcon}`]:e[`deleteIcon${ys(d)}Color${ys(n)}`]},e.root,e[`size${ys(s)}`],e[`color${ys(n)}`],a&&e.clickable,a&&n!=="default"&&e[`clickableColor${ys(n)})`],o&&e.deletable,o&&n!=="default"&&e[`deletableColor${ys(n)}`],e[d],e[`${d}${ys(n)}`]]}})(yu(({theme:t})=>{const e=t.palette.mode==="light"?t.palette.grey[700]:t.palette.grey[300];return{maxWidth:"100%",fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,lineHeight:1.5,color:(t.vars||t).palette.text.primary,backgroundColor:(t.vars||t).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:t.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${$p.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${$p.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:t.vars?t.vars.palette.Chip.defaultAvatarColor:e,fontSize:t.typography.pxToRem(12)},[`& .${$p.avatarColorPrimary}`]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.dark},[`& .${$p.avatarColorSecondary}`]:{color:(t.vars||t).palette.secondary.contrastText,backgroundColor:(t.vars||t).palette.secondary.dark},[`& .${$p.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:t.typography.pxToRem(10)},[`& .${$p.icon}`]:{marginLeft:5,marginRight:-6},[`& .${$p.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:t.alpha((t.vars||t).palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:t.alpha((t.vars||t).palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${$p.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${$p.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(t.palette).filter(Yv(["contrastText"])).map(([r])=>({props:{color:r},style:{backgroundColor:(t.vars||t).palette[r].main,color:(t.vars||t).palette[r].contrastText,[`& .${$p.deleteIcon}`]:{color:t.alpha((t.vars||t).palette[r].contrastText,.7),"&:hover, &:active":{color:(t.vars||t).palette[r].contrastText}}}})),{props:r=>r.iconColor===r.color,style:{[`& .${$p.icon}`]:{color:t.vars?t.vars.palette.Chip.defaultIconColor:e}}},{props:r=>r.iconColor===r.color&&r.color!=="default",style:{[`& .${$p.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${$p.focusVisible}`]:{backgroundColor:t.alpha((t.vars||t).palette.action.selected,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.focusOpacity}`)}}},...Object.entries(t.palette).filter(Yv(["dark"])).map(([r])=>({props:{color:r,onDelete:!0},style:{[`&.${$p.focusVisible}`]:{background:(t.vars||t).palette[r].dark}}})),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:t.alpha((t.vars||t).palette.action.selected,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.hoverOpacity}`)},[`&.${$p.focusVisible}`]:{backgroundColor:t.alpha((t.vars||t).palette.action.selected,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.focusOpacity}`)},"&:active":{boxShadow:(t.vars||t).shadows[1]}}},...Object.entries(t.palette).filter(Yv(["dark"])).map(([r])=>({props:{color:r,clickable:!0},style:{[`&:hover, &.${$p.focusVisible}`]:{backgroundColor:(t.vars||t).palette[r].dark}}})),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:t.vars?`1px solid ${t.vars.palette.Chip.defaultBorder}`:`1px solid ${t.palette.mode==="light"?t.palette.grey[400]:t.palette.grey[700]}`,[`&.${$p.clickable}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${$p.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`& .${$p.avatar}`]:{marginLeft:4},[`& .${$p.avatarSmall}`]:{marginLeft:2},[`& .${$p.icon}`]:{marginLeft:4},[`& .${$p.iconSmall}`]:{marginLeft:2},[`& .${$p.deleteIcon}`]:{marginRight:5},[`& .${$p.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(t.palette).filter(Yv()).map(([r])=>({props:{variant:"outlined",color:r},style:{color:(t.vars||t).palette[r].main,border:`1px solid ${t.alpha((t.vars||t).palette[r].main,.7)}`,[`&.${$p.clickable}:hover`]:{backgroundColor:t.alpha((t.vars||t).palette[r].main,(t.vars||t).palette.action.hoverOpacity)},[`&.${$p.focusVisible}`]:{backgroundColor:t.alpha((t.vars||t).palette[r].main,(t.vars||t).palette.action.focusOpacity)},[`& .${$p.deleteIcon}`]:{color:t.alpha((t.vars||t).palette[r].main,.7),"&:hover, &:active":{color:(t.vars||t).palette[r].main}}}}))]}})),_pt=fa("span",{name:"MuiChip",slot:"Label",overridesResolver:(t,e)=>{const{ownerState:r}=t,{size:n}=r;return[e.label,e[`label${ys(n)}`]]}})({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap",variants:[{props:{variant:"outlined"},style:{paddingLeft:11,paddingRight:11}},{props:{size:"small"},style:{paddingLeft:8,paddingRight:8}},{props:{size:"small",variant:"outlined"},style:{paddingLeft:7,paddingRight:7}}]});function _2e(t){return t.key==="Backspace"||t.key==="Delete"}const Eb=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiChip"}),{avatar:i,className:a,clickable:o,color:s="default",component:d,deleteIcon:b,disabled:L=!1,icon:B,label:V,onClick:X,onDelete:ie,onKeyDown:de,onKeyUp:ae,size:U="medium",variant:ve="filled",tabIndex:Se,skipFocusWhenDisabled:Pe=!1,slots:Me={},slotProps:Ie={},...Ve}=n,Ze=ze.useRef(null),Je=id(Ze,r),nt=Ir=>{Ir.stopPropagation(),ie&&ie(Ir)},ut=Ir=>{Ir.currentTarget===Ir.target&&_2e(Ir)&&Ir.preventDefault(),de&&de(Ir)},ht=Ir=>{Ir.currentTarget===Ir.target&&ie&&_2e(Ir)&&ie(Ir),ae&&ae(Ir)},_t=o!==!1&&X?!0:o,Dt=_t||ie?ZS:d||"div",qt={...n,component:Dt,disabled:L,size:U,color:s,iconColor:ze.isValidElement(B)&&B.props.color||s,onDelete:!!ie,clickable:_t,variant:ve},Lt=bpt(qt),dr=Dt===ZS?{component:d||"div",focusVisibleClassName:Lt.focusVisible,...ie&&{disableRipple:!0}}:{};let Zt=null;ie&&(Zt=b&&ze.isValidElement(b)?ze.cloneElement(b,{className:Vo(b.props.className,Lt.deleteIcon),onClick:nt}):Ke.jsx(gpt,{className:Lt.deleteIcon,onClick:nt}));let Cr=null;i&&ze.isValidElement(i)&&(Cr=ze.cloneElement(i,{className:Vo(Lt.avatar,i.props.className)}));let yt=null;B&&ze.isValidElement(B)&&(yt=ze.cloneElement(B,{className:Vo(Lt.icon,B.props.className)}));const Vt={slots:Me,slotProps:Ie},[Er,sr]=Nu("root",{elementType:xpt,externalForwardedProps:{...Vt,...Ve},ownerState:qt,shouldForwardComponentProp:!0,ref:Je,className:Vo(Lt.root,a),additionalProps:{disabled:_t&&L?!0:void 0,tabIndex:Pe&&L?-1:Se,...dr},getSlotProps:Ir=>({...Ir,onClick:_n=>{Ir.onClick?.(_n),X?.(_n)},onKeyDown:_n=>{Ir.onKeyDown?.(_n),ut(_n)},onKeyUp:_n=>{Ir.onKeyUp?.(_n),ht(_n)}})}),[or,Ar]=Nu("label",{elementType:_pt,externalForwardedProps:Vt,ownerState:qt,className:Lt.label});return Ke.jsxs(Er,{as:Dt,...sr,children:[Cr||yt,Ke.jsx(or,{...Ar,children:V}),Zt]})});function ej(t){return parseInt(t,10)||0}const wpt={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function Spt(t){for(const e in t)return!1;return!0}function w2e(t){return Spt(t)||t.outerHeightStyle===0&&!t.overflowing}const Tpt=ze.forwardRef(function(e,r){const{onChange:n,maxRows:i,minRows:a=1,style:o,value:s,...d}=e,{current:b}=ze.useRef(s!=null),L=ze.useRef(null),B=id(r,L),V=ze.useRef(null),X=ze.useRef(null),ie=ze.useCallback(()=>{const Se=L.current,Pe=X.current;if(!Se||!Pe)return;const Ie=cE(Se).getComputedStyle(Se);if(Ie.width==="0px")return{outerHeightStyle:0,overflowing:!1};Pe.style.width=Ie.width,Pe.value=Se.value||e.placeholder||"x",Pe.value.slice(-1)===`
`&&(Pe.value+=" ");const Ve=Ie.boxSizing,Ze=ej(Ie.paddingBottom)+ej(Ie.paddingTop),Je=ej(Ie.borderBottomWidth)+ej(Ie.borderTopWidth),nt=Pe.scrollHeight;Pe.value="x";const ut=Pe.scrollHeight;let ht=nt;a&&(ht=Math.max(Number(a)*ut,ht)),i&&(ht=Math.min(Number(i)*ut,ht)),ht=Math.max(ht,ut);const _t=ht+(Ve==="border-box"?Ze+Je:0),Dt=Math.abs(ht-nt)<=1;return{outerHeightStyle:_t,overflowing:Dt}},[i,a,e.placeholder]),de=vl(()=>{const Se=L.current,Pe=ie();if(!Se||!Pe||w2e(Pe))return!1;const Me=Pe.outerHeightStyle;return V.current!=null&&V.current!==Me}),ae=ze.useCallback(()=>{const Se=L.current,Pe=ie();if(!Se||!Pe||w2e(Pe))return;const Me=Pe.outerHeightStyle;V.current!==Me&&(V.current=Me,Se.style.height=`${Me}px`),Se.style.overflow=Pe.overflowing?"hidden":""},[ie]),U=ze.useRef(-1);Ah(()=>{const Se=d4(ae),Pe=L?.current;if(!Pe)return;const Me=cE(Pe);Me.addEventListener("resize",Se);let Ie;return typeof ResizeObserver<"u"&&(Ie=new ResizeObserver(()=>{de()&&(Ie.unobserve(Pe),cancelAnimationFrame(U.current),ae(),U.current=requestAnimationFrame(()=>{Ie.observe(Pe)}))}),Ie.observe(Pe)),()=>{Se.clear(),cancelAnimationFrame(U.current),Me.removeEventListener("resize",Se),Ie&&Ie.disconnect()}},[ie,ae,de]),Ah(()=>{ae()});const ve=Se=>{b||ae();const Pe=Se.target,Me=Pe.value.length,Ie=Pe.value.endsWith(`
`),Ve=Pe.selectionStart===Me;Ie&&Ve&&Pe.setSelectionRange(Me,Me),n&&n(Se)};return Ke.jsxs(ze.Fragment,{children:[Ke.jsx("textarea",{value:s,onChange:ve,ref:B,rows:a,style:o,...d}),Ke.jsx("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:X,tabIndex:-1,style:{...wpt.shadow,...o,paddingTop:0,paddingBottom:0}})]})});function v4({props:t,states:e,muiFormControl:r}){return e.reduce((n,i)=>(n[i]=t[i],r&&typeof t[i]>"u"&&(n[i]=r[i]),n),{})}const gY=ze.createContext(void 0);function W2(){return ze.useContext(gY)}function S2e(t){return t!=null&&!(Array.isArray(t)&&t.length===0)}function t$(t,e=!1){return t&&(S2e(t.value)&&t.value!==""||e&&S2e(t.defaultValue)&&t.defaultValue!=="")}function Ept(t){return t.startAdornment}function Apt(t){return Al("MuiInputBase",t)}const B_=Ml("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var T2e;const yY=(t,e)=>{const{ownerState:r}=t;return[e.root,r.formControl&&e.formControl,r.startAdornment&&e.adornedStart,r.endAdornment&&e.adornedEnd,r.error&&e.error,r.size==="small"&&e.sizeSmall,r.multiline&&e.multiline,r.color&&e[`color${ys(r.color)}`],r.fullWidth&&e.fullWidth,r.hiddenLabel&&e.hiddenLabel]},bY=(t,e)=>{const{ownerState:r}=t;return[e.input,r.size==="small"&&e.inputSizeSmall,r.multiline&&e.inputMultiline,r.type==="search"&&e.inputTypeSearch,r.startAdornment&&e.inputAdornedStart,r.endAdornment&&e.inputAdornedEnd,r.hiddenLabel&&e.inputHiddenLabel]},Cpt=t=>{const{classes:e,color:r,disabled:n,error:i,endAdornment:a,focused:o,formControl:s,fullWidth:d,hiddenLabel:b,multiline:L,readOnly:B,size:V,startAdornment:X,type:ie}=t,de={root:["root",`color${ys(r)}`,n&&"disabled",i&&"error",d&&"fullWidth",o&&"focused",s&&"formControl",V&&V!=="medium"&&`size${ys(V)}`,L&&"multiline",X&&"adornedStart",a&&"adornedEnd",b&&"hiddenLabel",B&&"readOnly"],input:["input",n&&"disabled",ie==="search"&&"inputTypeSearch",L&&"inputMultiline",V==="small"&&"inputSizeSmall",b&&"inputHiddenLabel",X&&"inputAdornedStart",a&&"inputAdornedEnd",B&&"readOnly"]};return Cs(de,Apt,e)},xY=fa("div",{name:"MuiInputBase",slot:"Root",overridesResolver:yY})(yu(({theme:t})=>({...t.typography.body1,color:(t.vars||t).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${B_.disabled}`]:{color:(t.vars||t).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:e})=>e.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:e,size:r})=>e.multiline&&r==="small",style:{paddingTop:1}},{props:({ownerState:e})=>e.fullWidth,style:{width:"100%"}}]}))),_Y=fa("input",{name:"MuiInputBase",slot:"Input",overridesResolver:bY})(yu(({theme:t})=>{const e=t.palette.mode==="light",r={color:"currentColor",...t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:e?.42:.5},transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})},n={opacity:"0 !important"},i=t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:e?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${B_.formControl} &`]:{"&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus::-ms-input-placeholder":i},[`&.${B_.disabled}`]:{opacity:1,WebkitTextFillColor:(t.vars||t).palette.text.disabled},variants:[{props:({ownerState:a})=>!a.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:a})=>a.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),E2e=Qve({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),IB=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiInputBase"}),{"aria-describedby":i,autoComplete:a,autoFocus:o,className:s,color:d,components:b={},componentsProps:L={},defaultValue:B,disabled:V,disableInjectingGlobalStyles:X,endAdornment:ie,error:de,fullWidth:ae=!1,id:U,inputComponent:ve="input",inputProps:Se={},inputRef:Pe,margin:Me,maxRows:Ie,minRows:Ve,multiline:Ze=!1,name:Je,onBlur:nt,onChange:ut,onClick:ht,onFocus:_t,onKeyDown:Dt,onKeyUp:qt,placeholder:Lt,readOnly:dr,renderSuffix:Zt,rows:Cr,size:yt,slotProps:Vt={},slots:Er={},startAdornment:sr,type:or="text",value:Ar,...Ir}=n,_n=Se.value!=null?Se.value:Ar,{current:Un}=ze.useRef(_n!=null),Qn=ze.useRef(),Jn=ze.useCallback(Qa=>{},[]),Vn=id(Qn,Pe,Se.ref,Jn),[jn,Lr]=ze.useState(!1),Yn=W2(),On=v4({props:n,muiFormControl:Yn,states:["color","disabled","error","hiddenLabel","size","required","filled"]});On.focused=Yn?Yn.focused:jn,ze.useEffect(()=>{!Yn&&V&&jn&&(Lr(!1),nt&&nt())},[Yn,V,jn,nt]);const Sn=Yn&&Yn.onFilled,bn=Yn&&Yn.onEmpty,Mn=ze.useCallback(Qa=>{t$(Qa)?Sn&&Sn():bn&&bn()},[Sn,bn]);Ah(()=>{Un&&Mn({value:_n})},[_n,Mn,Un]);const gi=Qa=>{_t&&_t(Qa),Se.onFocus&&Se.onFocus(Qa),Yn&&Yn.onFocus?Yn.onFocus(Qa):Lr(!0)},Oi=Qa=>{nt&&nt(Qa),Se.onBlur&&Se.onBlur(Qa),Yn&&Yn.onBlur?Yn.onBlur(Qa):Lr(!1)},Pa=(Qa,...is)=>{if(!Un){const go=Qa.target||Qn.current;if(go==null)throw new Error(kk(1));Mn({value:go.value})}Se.onChange&&Se.onChange(Qa,...is),ut&&ut(Qa,...is)};ze.useEffect(()=>{Mn(Qn.current)},[]);const va=Qa=>{Qn.current&&Qa.currentTarget===Qa.target&&Qn.current.focus(),ht&&ht(Qa)};let ti=ve,Tn=Se;Ze&&ti==="input"&&(Cr?Tn={type:void 0,minRows:Cr,maxRows:Cr,...Tn}:Tn={type:void 0,maxRows:Ie,minRows:Ve,...Tn},ti=Tpt);const bi=Qa=>{Mn(Qa.animationName==="mui-auto-fill-cancel"?Qn.current:{value:"x"})};ze.useEffect(()=>{Yn&&Yn.setAdornedStart(!!sr)},[Yn,sr]);const Wn={...n,color:On.color||"primary",disabled:On.disabled,endAdornment:ie,error:On.error,focused:On.focused,formControl:Yn,fullWidth:ae,hiddenLabel:On.hiddenLabel,multiline:Ze,size:On.size,startAdornment:sr,type:or},Ei=Cpt(Wn),Ki=Er.root||b.Root||xY,sa=Vt.root||L.root||{},xa=Er.input||b.Input||_Y;return Tn={...Tn,...Vt.input??L.input},Ke.jsxs(ze.Fragment,{children:[!X&&typeof E2e=="function"&&(T2e||(T2e=Ke.jsx(E2e,{}))),Ke.jsxs(Ki,{...sa,ref:r,onClick:va,...Ir,...!P5(Ki)&&{ownerState:{...Wn,...sa.ownerState}},className:Vo(Ei.root,sa.className,s,dr&&"MuiInputBase-readOnly"),children:[sr,Ke.jsx(gY.Provider,{value:null,children:Ke.jsx(xa,{"aria-invalid":On.error,"aria-describedby":i,autoComplete:a,autoFocus:o,defaultValue:B,disabled:On.disabled,id:U,onAnimationStart:bi,name:Je,placeholder:Lt,readOnly:dr,required:On.required,rows:Cr,value:_n,onKeyDown:Dt,onKeyUp:qt,type:or,...Tn,...!P5(xa)&&{as:ti,ownerState:{...Wn,...Tn.ownerState}},ref:Vn,className:Vo(Ei.input,Tn.className,dr&&"MuiInputBase-readOnly"),onBlur:Oi,onChange:Pa,onFocus:gi})}),ie,Zt?Zt({...On,startAdornment:sr}):null]})]})});function Mpt(t){return Al("MuiInput",t)}const MP={...B_,...Ml("MuiInput",["root","underline","input"])};function Rpt(t){return Al("MuiOutlinedInput",t)}const k3={...B_,...Ml("MuiOutlinedInput",["root","notchedOutline","input"])};function kpt(t){return Al("MuiFilledInput",t)}const KT={...B_,...Ml("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},_9e=Hu(Ke.jsx("path",{d:"M7 10l5 5 5-5z"}));function Ipt(t){return Al("MuiAutocomplete",t)}const pp=Ml("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]);var A2e,C2e;const Ppt=t=>{const{classes:e,disablePortal:r,expanded:n,focused:i,fullWidth:a,hasClearIcon:o,hasPopupIcon:s,inputFocused:d,popupOpen:b,size:L}=t,B={root:["root",n&&"expanded",i&&"focused",a&&"fullWidth",o&&"hasClearIcon",s&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",d&&"inputFocused"],tag:["tag",`tagSize${ys(L)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",b&&"popupIndicatorOpen"],popper:["popper",r&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return Cs(B,Ipt,e)},Dpt=fa("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t,{fullWidth:n,hasClearIcon:i,hasPopupIcon:a,inputFocused:o,size:s}=r;return[{[`& .${pp.tag}`]:e.tag},{[`& .${pp.tag}`]:e[`tagSize${ys(s)}`]},{[`& .${pp.inputRoot}`]:e.inputRoot},{[`& .${pp.input}`]:e.input},{[`& .${pp.input}`]:o&&e.inputFocused},e.root,n&&e.fullWidth,a&&e.hasPopupIcon,i&&e.hasClearIcon]}})({[`&.${pp.focused} .${pp.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${pp.clearIndicator}`]:{visibility:"visible"}},[`& .${pp.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${pp.inputRoot}`]:{[`.${pp.hasPopupIcon}&, .${pp.hasClearIcon}&`]:{paddingRight:30},[`.${pp.hasPopupIcon}.${pp.hasClearIcon}&`]:{paddingRight:56},[`& .${pp.input}`]:{width:0,minWidth:30}},[`& .${MP.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${MP.root}.${B_.sizeSmall}`]:{[`& .${MP.input}`]:{padding:"2px 4px 3px 0"}},[`& .${k3.root}`]:{padding:9,[`.${pp.hasPopupIcon}&, .${pp.hasClearIcon}&`]:{paddingRight:39},[`.${pp.hasPopupIcon}.${pp.hasClearIcon}&`]:{paddingRight:65},[`& .${pp.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${pp.endAdornment}`]:{right:9}},[`& .${k3.root}.${B_.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${pp.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${KT.root}`]:{paddingTop:19,paddingLeft:8,[`.${pp.hasPopupIcon}&, .${pp.hasClearIcon}&`]:{paddingRight:39},[`.${pp.hasPopupIcon}.${pp.hasClearIcon}&`]:{paddingRight:65},[`& .${KT.input}`]:{padding:"7px 4px"},[`& .${pp.endAdornment}`]:{right:9}},[`& .${KT.root}.${B_.sizeSmall}`]:{paddingBottom:1,[`& .${KT.input}`]:{padding:"2.5px 4px"}},[`& .${B_.hiddenLabel}`]:{paddingTop:8},[`& .${KT.root}.${B_.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${pp.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${KT.root}.${B_.hiddenLabel}.${B_.sizeSmall}`]:{[`& .${pp.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${pp.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${pp.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${pp.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${pp.inputRoot}`]:{flexWrap:"wrap"}}}]}),Lpt=fa("div",{name:"MuiAutocomplete",slot:"EndAdornment"})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),Opt=fa(Zf,{name:"MuiAutocomplete",slot:"ClearIndicator"})({marginRight:-2,padding:4,visibility:"hidden"}),Npt=fa(Zf,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.popupIndicator,r.popupOpen&&e.popupIndicatorOpen]}})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),Fpt=fa(O8,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[{[`& .${pp.option}`]:e.option},e.popper,r.disablePortal&&e.popperDisablePortal]}})(yu(({theme:t})=>({zIndex:(t.vars||t).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]}))),zpt=fa(Gy,{name:"MuiAutocomplete",slot:"Paper"})(yu(({theme:t})=>({...t.typography.body1,overflow:"auto"}))),Bpt=fa("div",{name:"MuiAutocomplete",slot:"Loading"})(yu(({theme:t})=>({color:(t.vars||t).palette.text.secondary,padding:"14px 16px"}))),Upt=fa("div",{name:"MuiAutocomplete",slot:"NoOptions"})(yu(({theme:t})=>({color:(t.vars||t).palette.text.secondary,padding:"14px 16px"}))),Hpt=fa("ul",{name:"MuiAutocomplete",slot:"Listbox"})(yu(({theme:t})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${pp.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[t.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${pp.focused}`]:{backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${pp.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:t.alpha((t.vars||t).palette.primary.main,(t.vars||t).palette.action.selectedOpacity),[`&.${pp.focused}`]:{backgroundColor:t.alpha((t.vars||t).palette.primary.main,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:(t.vars||t).palette.action.selected}},[`&.${pp.focusVisible}`]:{backgroundColor:t.alpha((t.vars||t).palette.primary.main,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.focusOpacity}`)}}}}))),jpt=fa(whe,{name:"MuiAutocomplete",slot:"GroupLabel"})(yu(({theme:t})=>({backgroundColor:(t.vars||t).palette.background.paper,top:-8}))),Vpt=fa("ul",{name:"MuiAutocomplete",slot:"GroupUl"})({padding:0,[`& .${pp.option}`]:{paddingLeft:24}}),N8=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiAutocomplete"}),{autoComplete:i=!1,autoHighlight:a=!1,autoSelect:o=!1,blurOnSelect:s=!1,ChipProps:d,className:b,clearIcon:L=A2e||(A2e=Ke.jsx(x9e,{fontSize:"small"})),clearOnBlur:B=!n.freeSolo,clearOnEscape:V=!1,clearText:X="Clear",closeText:ie="Close",componentsProps:de,defaultValue:ae=n.multiple?[]:null,disableClearable:U=!1,disableCloseOnSelect:ve=!1,disabled:Se=!1,disabledItemsFocusable:Pe=!1,disableListWrap:Me=!1,disablePortal:Ie=!1,filterOptions:Ve,filterSelectedOptions:Ze=!1,forcePopupIcon:Je="auto",freeSolo:nt=!1,fullWidth:ut=!1,getLimitTagsText:ht=il=>`+${il}`,getOptionDisabled:_t,getOptionKey:Dt,getOptionLabel:qt,isOptionEqualToValue:Lt,groupBy:dr,handleHomeEndKeys:Zt=!n.freeSolo,id:Cr,includeInputInList:yt=!1,inputValue:Vt,limitTags:Er=-1,ListboxComponent:sr,ListboxProps:or,loading:Ar=!1,loadingText:Ir="Loading…",multiple:_n=!1,noOptionsText:Un="No options",onChange:Qn,onClose:Jn,onHighlightChange:Vn,onInputChange:jn,onOpen:Lr,open:Yn,openOnFocus:On=!1,openText:Sn="Open",options:bn,PaperComponent:Mn,PopperComponent:gi,popupIcon:Oi=C2e||(C2e=Ke.jsx(_9e,{})),readOnly:Pa=!1,renderGroup:va,renderInput:ti,renderOption:Tn,renderTags:bi,renderValue:Wn,selectOnFocus:Ei=!n.freeSolo,size:Ki="medium",slots:sa={},slotProps:xa={},value:Qa,...is}=n,{getRootProps:go,getInputProps:Co,getInputLabelProps:Ko,getPopupIndicatorProps:Zi,getClearProps:za,getItemProps:Ss,getListboxProps:ba,getOptionProps:po,value:Ys,dirty:$s,expanded:Gs,id:Ns,popupOpen:Hl,focused:nu,focusedItem:su,anchorEl:Mc,setAnchorEl:da,inputValue:Xa,groupedOptions:Oo}=hpt({...n,componentName:"Autocomplete"}),_s=!U&&!Se&&$s&&!Pa,nl=(!nt||Je===!0)&&Je!==!1,{onMouseDown:vu}=Co(),{ref:zl,...jl}=ba(),Js=qt||(il=>il.label??il),Vl={...n,disablePortal:Ie,expanded:Gs,focused:nu,fullWidth:ut,getOptionLabel:Js,hasClearIcon:_s,hasPopupIcon:nl,inputFocused:su===-1,popupOpen:Hl,size:Ki},zn=Ppt(Vl),Ni={slots:{paper:Mn,popper:gi,...sa},slotProps:{chip:d,listbox:or,...de,...xa}},[Za,ts]=Nu("listbox",{elementType:Hpt,externalForwardedProps:Ni,ownerState:Vl,className:zn.listbox,additionalProps:jl,ref:zl}),[ps,Mi]=Nu("paper",{elementType:Gy,externalForwardedProps:Ni,ownerState:Vl,className:zn.paper}),[to,Dn]=Nu("popper",{elementType:O8,externalForwardedProps:Ni,ownerState:Vl,className:zn.popper,additionalProps:{disablePortal:Ie,style:{width:Mc?Mc.clientWidth:null},role:"presentation",anchorEl:Mc,open:Hl}});let ea;const pa=il=>({className:zn.tag,disabled:Se,...Ss(il)});if(_n?Ys.length>0&&(bi?ea=bi(Ys,pa,Vl):Wn?ea=Wn(Ys,pa,Vl):ea=Ys.map((il,Gl)=>{const{key:Qu,...ic}=pa({index:Gl});return Ke.jsx(Eb,{label:Js(il),size:Ki,...ic,...Ni.slotProps.chip},Qu)})):Wn&&Ys!=null&&(ea=Wn(Ys,pa,Vl)),Er>-1&&Array.isArray(ea)){const il=ea.length-Er;!nu&&il>0&&(ea=ea.splice(0,Er),ea.push(Ke.jsx("span",{className:zn.tag,children:ht(il)},ea.length)))}const _a=va||(il=>Ke.jsxs("li",{children:[Ke.jsx(jpt,{className:zn.groupLabel,ownerState:Vl,component:"div",children:il.group}),Ke.jsx(Vpt,{className:zn.groupUl,ownerState:Vl,children:il.children})]},il.key)),ks=Tn||((il,Gl)=>{const{key:Qu,...ic}=il;return Ke.jsx("li",{...ic,children:Js(Gl)},Qu)}),el=(il,Gl)=>{const Qu=po({option:il,index:Gl});return ks({...Qu,className:zn.option},il,{selected:Qu["aria-selected"],index:Gl,inputValue:Xa},Vl)},ol=Ni.slotProps.clearIndicator,tl=Ni.slotProps.popupIndicator;return Ke.jsxs(ze.Fragment,{children:[Ke.jsx(Dpt,{ref:r,className:Vo(zn.root,b),ownerState:Vl,...go(is),children:ti({id:Ns,disabled:Se,fullWidth:!0,size:Ki==="small"?"small":void 0,InputLabelProps:Ko(),InputProps:{ref:da,className:zn.inputRoot,startAdornment:ea,onMouseDown:il=>{il.target===il.currentTarget&&vu(il)},...(_s||nl)&&{endAdornment:Ke.jsxs(Lpt,{className:zn.endAdornment,ownerState:Vl,children:[_s?Ke.jsx(Opt,{...za(),"aria-label":X,title:X,ownerState:Vl,...ol,className:Vo(zn.clearIndicator,ol?.className),children:L}):null,nl?Ke.jsx(Npt,{...Zi(),disabled:Se,"aria-label":Hl?ie:Sn,title:Hl?ie:Sn,ownerState:Vl,...tl,className:Vo(zn.popupIndicator,tl?.className),children:Oi}):null]})}},inputProps:{className:zn.input,disabled:Se,readOnly:Pa,...Co()}})}),Mc?Ke.jsx(Fpt,{as:to,...Dn,children:Ke.jsxs(zpt,{as:ps,...Mi,children:[Ar&&Oo.length===0?Ke.jsx(Bpt,{className:zn.loading,ownerState:Vl,children:Ir}):null,Oo.length===0&&!nt&&!Ar?Ke.jsx(Upt,{className:zn.noOptions,ownerState:Vl,role:"presentation",onMouseDown:il=>{il.preventDefault()},children:Un}):null,Oo.length>0?Ke.jsx(Za,{as:sr,...ts,children:Oo.map((il,Gl)=>dr?_a({key:il.key,group:il.group,children:il.options.map((Qu,ic)=>el(Qu,il.index+ic))}):el(il,Gl))}):null]})}):null]})}),qpt=Hu(Ke.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}));function Gpt(t){return Al("MuiAvatar",t)}Ml("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const $pt=t=>{const{classes:e,variant:r,colorDefault:n}=t;return Cs({root:["root",r,n&&"colorDefault"],img:["img"],fallback:["fallback"]},Gpt,e)},Wpt=fa("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[r.variant],r.colorDefault&&e.colorDefault]}})(yu(({theme:t})=>({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(t.vars||t).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:{color:(t.vars||t).palette.background.default,...t.vars?{backgroundColor:t.vars.palette.Avatar.defaultBg}:{backgroundColor:t.palette.grey[400],...t.applyStyles("dark",{backgroundColor:t.palette.grey[600]})}}}]}))),Ypt=fa("img",{name:"MuiAvatar",slot:"Img"})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),Xpt=fa(qpt,{name:"MuiAvatar",slot:"Fallback"})({width:"75%",height:"75%"});function Zpt({crossOrigin:t,referrerPolicy:e,src:r,srcSet:n}){const[i,a]=ze.useState(!1);return ze.useEffect(()=>{if(!r&&!n)return;a(!1);let o=!0;const s=new Image;return s.onload=()=>{o&&a("loaded")},s.onerror=()=>{o&&a("error")},s.crossOrigin=t,s.referrerPolicy=e,s.src=r,n&&(s.srcset=n),()=>{o=!1}},[t,e,r,n]),i}const w9e=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiAvatar"}),{alt:i,children:a,className:o,component:s="div",slots:d={},slotProps:b={},imgProps:L,sizes:B,src:V,srcSet:X,variant:ie="circular",...de}=n;let ae=null;const U={...n,component:s,variant:ie},ve=Zpt({...L,...typeof b.img=="function"?b.img(U):b.img,src:V,srcSet:X}),Se=V||X,Pe=Se&&ve!=="error";U.colorDefault=!Pe,delete U.ownerState;const Me=$pt(U),[Ie,Ve]=Nu("root",{ref:r,className:Vo(Me.root,o),elementType:Wpt,externalForwardedProps:{slots:d,slotProps:b,component:s,...de},ownerState:U}),[Ze,Je]=Nu("img",{className:Me.img,elementType:Ypt,externalForwardedProps:{slots:d,slotProps:{img:{...L,...b.img}}},additionalProps:{alt:i,src:V,srcSet:X,sizes:B},ownerState:U}),[nt,ut]=Nu("fallback",{className:Me.fallback,elementType:Xpt,externalForwardedProps:{slots:d,slotProps:b},shouldForwardComponentProp:!0,ownerState:U});return Pe?ae=Ke.jsx(Ze,{...Je}):a||a===0?ae=a:Se&&i?ae=i[0]:ae=Ke.jsx(nt,{...ut}),Ke.jsx(Ie,{...Ve,children:ae})}),Kpt={entering:{opacity:1},entered:{opacity:1}},xL=ze.forwardRef(function(e,r){const n=cy(),i={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:a,appear:o=!0,children:s,easing:d,in:b,onEnter:L,onEntered:B,onEntering:V,onExit:X,onExited:ie,onExiting:de,style:ae,timeout:U=i,TransitionComponent:ve=vE,...Se}=e,Pe=ze.useRef(null),Me=id(Pe,h4(s),r),Ie=Dt=>qt=>{if(Dt){const Lt=Pe.current;qt===void 0?Dt(Lt):Dt(Lt,qt)}},Ve=Ie(V),Ze=Ie((Dt,qt)=>{ame(Dt);const Lt=KP({style:ae,timeout:U,easing:d},{mode:"enter"});Dt.style.webkitTransition=n.transitions.create("opacity",Lt),Dt.style.transition=n.transitions.create("opacity",Lt),L&&L(Dt,qt)}),Je=Ie(B),nt=Ie(de),ut=Ie(Dt=>{const qt=KP({style:ae,timeout:U,easing:d},{mode:"exit"});Dt.style.webkitTransition=n.transitions.create("opacity",qt),Dt.style.transition=n.transitions.create("opacity",qt),X&&X(Dt)}),ht=Ie(ie),_t=Dt=>{a&&a(Pe.current,Dt)};return Ke.jsx(ve,{appear:o,in:b,nodeRef:Pe,onEnter:Ze,onEntered:Je,onEntering:Ve,onExit:ut,onExited:ht,onExiting:nt,addEndListener:_t,timeout:U,...Se,children:(Dt,{ownerState:qt,...Lt})=>ze.cloneElement(s,{style:{opacity:0,visibility:Dt==="exited"&&!b?"hidden":void 0,...Kpt[Dt],...ae,...s.props.style},ref:Me,...Lt})})});function Jpt(t){return Al("MuiBackdrop",t)}Ml("MuiBackdrop",["root","invisible"]);const Qpt=t=>{const{classes:e,invisible:r}=t;return Cs({root:["root",r&&"invisible"]},Jpt,e)},evt=fa("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.invisible&&e.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),S9e=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiBackdrop"}),{children:i,className:a,component:o="div",invisible:s=!1,open:d,components:b={},componentsProps:L={},slotProps:B={},slots:V={},TransitionComponent:X,transitionDuration:ie,...de}=n,ae={...n,component:o,invisible:s},U=Qpt(ae),ve={transition:X,root:b.Root,...V},Se={...L,...B},Pe={component:o,slots:ve,slotProps:Se},[Me,Ie]=Nu("root",{elementType:evt,externalForwardedProps:Pe,className:Vo(U.root,a),ownerState:ae}),[Ve,Ze]=Nu("transition",{elementType:xL,externalForwardedProps:Pe,ownerState:ae});return Ke.jsx(Ve,{in:d,timeout:ie,...de,...Ze,children:Ke.jsx(Me,{"aria-hidden":!0,...Ie,classes:U,ref:r,children:i})})});function tvt(t){const{badgeContent:e,invisible:r=!1,max:n=99,showZero:i=!1}=t,a=hme({badgeContent:e,max:n});let o=r;r===!1&&e===0&&!i&&(o=!0);const{badgeContent:s,max:d=n}=o?a:t,b=s&&Number(s)>d?`${d}+`:s;return{badgeContent:s,invisible:o,max:d,displayValue:b}}function rvt(t){return Al("MuiBadge",t)}const iP=Ml("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),jJ=10,VJ=4,nvt=t=>{const{color:e,anchorOrigin:r,invisible:n,overlap:i,variant:a,classes:o={}}=t,s={root:["root"],badge:["badge",a,n&&"invisible",`anchorOrigin${ys(r.vertical)}${ys(r.horizontal)}`,`anchorOrigin${ys(r.vertical)}${ys(r.horizontal)}${ys(i)}`,`overlap${ys(i)}`,e!=="default"&&`color${ys(e)}`]};return Cs(s,rvt,o)},ivt=fa("span",{name:"MuiBadge",slot:"Root"})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),avt=fa("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.badge,e[r.variant],e[`anchorOrigin${ys(r.anchorOrigin.vertical)}${ys(r.anchorOrigin.horizontal)}${ys(r.overlap)}`],r.color!=="default"&&e[`color${ys(r.color)}`],r.invisible&&e.invisible]}})(yu(({theme:t})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:t.typography.fontFamily,fontWeight:t.typography.fontWeightMedium,fontSize:t.typography.pxToRem(12),minWidth:jJ*2,lineHeight:1,padding:"0 6px",height:jJ*2,borderRadius:jJ,zIndex:1,transition:t.transitions.create("transform",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.enteringScreen}),variants:[...Object.entries(t.palette).filter(Yv(["contrastText"])).map(([e])=>({props:{color:e},style:{backgroundColor:(t.vars||t).palette[e].main,color:(t.vars||t).palette[e].contrastText}})),{props:{variant:"dot"},style:{borderRadius:VJ,height:VJ*2,minWidth:VJ*2,padding:0}},{props:({ownerState:e})=>e.anchorOrigin.vertical==="top"&&e.anchorOrigin.horizontal==="right"&&e.overlap==="rectangular",style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${iP.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:e})=>e.anchorOrigin.vertical==="bottom"&&e.anchorOrigin.horizontal==="right"&&e.overlap==="rectangular",style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${iP.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:e})=>e.anchorOrigin.vertical==="top"&&e.anchorOrigin.horizontal==="left"&&e.overlap==="rectangular",style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${iP.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:e})=>e.anchorOrigin.vertical==="bottom"&&e.anchorOrigin.horizontal==="left"&&e.overlap==="rectangular",style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${iP.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:e})=>e.anchorOrigin.vertical==="top"&&e.anchorOrigin.horizontal==="right"&&e.overlap==="circular",style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${iP.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:e})=>e.anchorOrigin.vertical==="bottom"&&e.anchorOrigin.horizontal==="right"&&e.overlap==="circular",style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${iP.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:e})=>e.anchorOrigin.vertical==="top"&&e.anchorOrigin.horizontal==="left"&&e.overlap==="circular",style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${iP.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:e})=>e.anchorOrigin.vertical==="bottom"&&e.anchorOrigin.horizontal==="left"&&e.overlap==="circular",style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${iP.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:t.transitions.create("transform",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.leavingScreen})}}]})));function M2e(t){return{vertical:t?.vertical??"top",horizontal:t?.horizontal??"right"}}const T9e=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiBadge"}),{anchorOrigin:i,className:a,classes:o,component:s,components:d={},componentsProps:b={},children:L,overlap:B="rectangular",color:V="default",invisible:X=!1,max:ie=99,badgeContent:de,slots:ae,slotProps:U,showZero:ve=!1,variant:Se="standard",...Pe}=n,{badgeContent:Me,invisible:Ie,max:Ve,displayValue:Ze}=tvt({max:ie,invisible:X,badgeContent:de,showZero:ve}),Je=hme({anchorOrigin:M2e(i),color:V,overlap:B,variant:Se,badgeContent:de}),nt=Ie||Me==null&&Se!=="dot",{color:ut=V,overlap:ht=B,anchorOrigin:_t,variant:Dt=Se}=nt?Je:n,qt=M2e(_t),Lt=Dt!=="dot"?Ze:void 0,dr={...n,badgeContent:Me,invisible:nt,max:Ve,displayValue:Lt,showZero:ve,anchorOrigin:qt,color:ut,overlap:ht,variant:Dt},Zt=nvt(dr),Cr={slots:{root:ae?.root??d.Root,badge:ae?.badge??d.Badge},slotProps:{root:U?.root??b.root,badge:U?.badge??b.badge}},[yt,Vt]=Nu("root",{elementType:ivt,externalForwardedProps:{...Cr,...Pe},ownerState:dr,className:Vo(Zt.root,a),ref:r,additionalProps:{as:s}}),[Er,sr]=Nu("badge",{elementType:avt,externalForwardedProps:Cr,ownerState:dr,className:Zt.badge});return Ke.jsxs(yt,{...Vt,children:[L,Ke.jsx(Er,{...sr,children:Lt})]})}),ovt=Hu(Ke.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})),svt=fa(ZS,{name:"MuiBreadcrumbCollapsed"})(yu(({theme:t})=>({display:"flex",marginLeft:`calc(${t.spacing(1)} * 0.5)`,marginRight:`calc(${t.spacing(1)} * 0.5)`,...t.palette.mode==="light"?{backgroundColor:t.palette.grey[100],color:t.palette.grey[700]}:{backgroundColor:t.palette.grey[700],color:t.palette.grey[100]},borderRadius:2,"&:hover, &:focus":{...t.palette.mode==="light"?{backgroundColor:t.palette.grey[200]}:{backgroundColor:t.palette.grey[600]}},"&:active":{boxShadow:t.shadows[0],...t.palette.mode==="light"?{backgroundColor:A9(t.palette.grey[200],.12)}:{backgroundColor:A9(t.palette.grey[600],.12)}}}))),lvt=fa(ovt)({width:24,height:16});function uvt(t){const{slots:e={},slotProps:r={},...n}=t,i=t;return Ke.jsx("li",{children:Ke.jsx(svt,{focusRipple:!0,...n,ownerState:i,children:Ke.jsx(lvt,{as:e.CollapsedIcon,ownerState:i,...r.collapsedIcon})})})}function cvt(t){return Al("MuiBreadcrumbs",t)}const fvt=Ml("MuiBreadcrumbs",["root","ol","li","separator"]),dvt=t=>{const{classes:e}=t;return Cs({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},cvt,e)},hvt=fa(Su,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(t,e)=>[{[`& .${fvt.li}`]:e.li},e.root]})({}),pvt=fa("ol",{name:"MuiBreadcrumbs",slot:"Ol"})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),vvt=fa("li",{name:"MuiBreadcrumbs",slot:"Separator"})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function mvt(t,e,r,n){return t.reduce((i,a,o)=>(o<t.length-1?i=i.concat(a,Ke.jsx(vvt,{"aria-hidden":!0,className:e,ownerState:n,children:r},`separator-${o}`)):i.push(a),i),[])}const gvt=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiBreadcrumbs"}),{children:i,className:a,component:o="nav",slots:s={},slotProps:d={},expandText:b="Show path",itemsAfterCollapse:L=1,itemsBeforeCollapse:B=1,maxItems:V=8,separator:X="/",...ie}=n,[de,ae]=ze.useState(!1),U={...n,component:o,expanded:de,expandText:b,itemsAfterCollapse:L,itemsBeforeCollapse:B,maxItems:V,separator:X},ve=dvt(U),Se=Kd({elementType:s.CollapsedIcon,externalSlotProps:d.collapsedIcon,ownerState:U}),Pe=ze.useRef(null),Me=Ve=>{const Ze=()=>{ae(!0);const Je=Pe.current.querySelector("a[href],button,[tabindex]");Je&&Je.focus()};return B+L>=Ve.length?Ve:[...Ve.slice(0,B),Ke.jsx(uvt,{"aria-label":b,slots:{CollapsedIcon:s.CollapsedIcon},slotProps:{collapsedIcon:Se},onClick:Ze},"ellipsis"),...Ve.slice(Ve.length-L,Ve.length)]},Ie=ze.Children.toArray(i).filter(Ve=>ze.isValidElement(Ve)).map((Ve,Ze)=>Ke.jsx("li",{className:ve.li,children:Ve},`child-${Ze}`));return Ke.jsx(hvt,{ref:r,component:o,color:"textSecondary",className:Vo(ve.root,a),ownerState:U,...ie,children:Ke.jsx(pvt,{className:ve.ol,ref:Pe,ownerState:U,children:mvt(de||V&&Ie.length<=V?Ie:Me(Ie),ve.separator,X,U)})})});function yvt(t){return Al("MuiButton",t)}const lD=Ml("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),bvt=ze.createContext({}),xvt=ze.createContext(void 0),_vt=t=>{const{color:e,disableElevation:r,fullWidth:n,size:i,variant:a,loading:o,loadingPosition:s,classes:d}=t,b={root:["root",o&&"loading",a,`${a}${ys(e)}`,`size${ys(i)}`,`${a}Size${ys(i)}`,`color${ys(e)}`,r&&"disableElevation",n&&"fullWidth",o&&`loadingPosition${ys(s)}`],startIcon:["icon","startIcon",`iconSize${ys(i)}`],endIcon:["icon","endIcon",`iconSize${ys(i)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},L=Cs(b,yvt,d);return{...d,...L}},E9e=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],wvt=fa(ZS,{shouldForwardProp:t=>mx(t)||t==="classes",name:"MuiButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[r.variant],e[`${r.variant}${ys(r.color)}`],e[`size${ys(r.size)}`],e[`${r.variant}Size${ys(r.size)}`],r.color==="inherit"&&e.colorInherit,r.disableElevation&&e.disableElevation,r.fullWidth&&e.fullWidth,r.loading&&e.loading]}})(yu(({theme:t})=>{const e=t.palette.mode==="light"?t.palette.grey[300]:t.palette.grey[800],r=t.palette.mode==="light"?t.palette.grey.A100:t.palette.grey[700];return{...t.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${lD.disabled}`]:{color:(t.vars||t).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(t.vars||t).shadows[2],"&:hover":{boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2]}},"&:active":{boxShadow:(t.vars||t).shadows[8]},[`&.${lD.focusVisible}`]:{boxShadow:(t.vars||t).shadows[6]},[`&.${lD.disabled}`]:{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${lD.disabled}`]:{border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(t.palette).filter(Yv()).map(([n])=>({props:{color:n},style:{"--variant-textColor":(t.vars||t).palette[n].main,"--variant-outlinedColor":(t.vars||t).palette[n].main,"--variant-outlinedBorder":t.alpha((t.vars||t).palette[n].main,.5),"--variant-containedColor":(t.vars||t).palette[n].contrastText,"--variant-containedBg":(t.vars||t).palette[n].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(t.vars||t).palette[n].dark,"--variant-textBg":t.alpha((t.vars||t).palette[n].main,(t.vars||t).palette.action.hoverOpacity),"--variant-outlinedBorder":(t.vars||t).palette[n].main,"--variant-outlinedBg":t.alpha((t.vars||t).palette[n].main,(t.vars||t).palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":t.vars?t.vars.palette.Button.inheritContainedBg:e,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":t.vars?t.vars.palette.Button.inheritContainedHoverBg:r,"--variant-textBg":t.alpha((t.vars||t).palette.text.primary,(t.vars||t).palette.action.hoverOpacity),"--variant-outlinedBg":t.alpha((t.vars||t).palette.text.primary,(t.vars||t).palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:t.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:t.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:t.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:t.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:t.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:t.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${lD.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${lD.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:t.transitions.create(["background-color","box-shadow","border-color"],{duration:t.transitions.duration.short}),[`&.${lD.loading}`]:{color:"transparent"}}}]}})),Svt=fa("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.startIcon,r.loading&&e.startIconLoadingStart,e[`iconSize${ys(r.size)}`]]}})(({theme:t})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...E9e]})),Tvt=fa("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.endIcon,r.loading&&e.endIconLoadingEnd,e[`iconSize${ys(r.size)}`]]}})(({theme:t})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...E9e]})),Evt=fa("span",{name:"MuiButton",slot:"LoadingIndicator"})(({theme:t})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(t.vars||t).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),R2e=fa("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),Id=ze.forwardRef(function(e,r){const n=ze.useContext(bvt),i=ze.useContext(xvt),a=gL(n,e),o=Uu({props:a,name:"MuiButton"}),{children:s,color:d="primary",component:b="button",className:L,disabled:B=!1,disableElevation:V=!1,disableFocusRipple:X=!1,endIcon:ie,focusVisibleClassName:de,fullWidth:ae=!1,id:U,loading:ve=null,loadingIndicator:Se,loadingPosition:Pe="center",size:Me="medium",startIcon:Ie,type:Ve,variant:Ze="text",...Je}=o,nt=Vd(U),ut=Se??Ke.jsx(_1,{"aria-labelledby":nt,color:"inherit",size:16}),ht={...o,color:d,component:b,disabled:B,disableElevation:V,disableFocusRipple:X,fullWidth:ae,loading:ve,loadingIndicator:ut,loadingPosition:Pe,size:Me,type:Ve,variant:Ze},_t=_vt(ht),Dt=(Ie||ve&&Pe==="start")&&Ke.jsx(Svt,{className:_t.startIcon,ownerState:ht,children:Ie||Ke.jsx(R2e,{className:_t.loadingIconPlaceholder,ownerState:ht})}),qt=(ie||ve&&Pe==="end")&&Ke.jsx(Tvt,{className:_t.endIcon,ownerState:ht,children:ie||Ke.jsx(R2e,{className:_t.loadingIconPlaceholder,ownerState:ht})}),Lt=i||"",dr=typeof ve=="boolean"?Ke.jsx("span",{className:_t.loadingWrapper,style:{display:"contents"},children:ve&&Ke.jsx(Evt,{className:_t.loadingIndicator,ownerState:ht,children:ut})}):null;return Ke.jsxs(wvt,{ownerState:ht,className:Vo(n.className,_t.root,L,Lt),component:b,disabled:B||ve,focusRipple:!X,focusVisibleClassName:Vo(_t.focusVisible,de),ref:r,type:Ve,id:ve?nt:U,...Je,classes:_t,children:[Dt,Pe!=="end"&&dr,s,Pe==="end"&&dr,qt]})});function Avt(t){return Al("MuiCard",t)}Ml("MuiCard",["root"]);const Cvt=t=>{const{classes:e}=t;return Cs({root:["root"]},Avt,e)},Mvt=fa(Gy,{name:"MuiCard",slot:"Root"})({overflow:"hidden"}),Rvt=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiCard"}),{className:i,raised:a=!1,...o}=n,s={...n,raised:a},d=Cvt(s);return Ke.jsx(Mvt,{className:Vo(d.root,i),elevation:a?8:void 0,ref:r,ownerState:s,...o})});function kvt(t){return Al("MuiCardContent",t)}Ml("MuiCardContent",["root"]);const Ivt=t=>{const{classes:e}=t;return Cs({root:["root"]},kvt,e)},Pvt=fa("div",{name:"MuiCardContent",slot:"Root"})({padding:16,"&:last-child":{paddingBottom:24}}),Dvt=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiCardContent"}),{className:i,component:a="div",...o}=n,s={...n,component:a},d=Ivt(s);return Ke.jsx(Pvt,{as:a,className:Vo(d.root,i),ownerState:s,ref:r,...o})});function Lvt(t){return Al("MuiCardHeader",t)}const r$=Ml("MuiCardHeader",["root","avatar","action","content","title","subheader"]),Ovt=t=>{const{classes:e}=t;return Cs({root:["root"],avatar:["avatar"],action:["action"],content:["content"],title:["title"],subheader:["subheader"]},Lvt,e)},Nvt=fa("div",{name:"MuiCardHeader",slot:"Root",overridesResolver:(t,e)=>[{[`& .${r$.title}`]:e.title},{[`& .${r$.subheader}`]:e.subheader},e.root]})({display:"flex",alignItems:"center",padding:16}),Fvt=fa("div",{name:"MuiCardHeader",slot:"Avatar"})({display:"flex",flex:"0 0 auto",marginRight:16}),zvt=fa("div",{name:"MuiCardHeader",slot:"Action"})({flex:"0 0 auto",alignSelf:"flex-start",marginTop:-4,marginRight:-8,marginBottom:-4}),Bvt=fa("div",{name:"MuiCardHeader",slot:"Content"})({flex:"1 1 auto",[`.${ZG.root}:where(& .${r$.title})`]:{display:"block"},[`.${ZG.root}:where(& .${r$.subheader})`]:{display:"block"}}),Uvt=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiCardHeader"}),{action:i,avatar:a,component:o="div",disableTypography:s=!1,subheader:d,subheaderTypographyProps:b,title:L,titleTypographyProps:B,slots:V={},slotProps:X={},...ie}=n,de={...n,component:o,disableTypography:s},ae=Ovt(de),U={slots:V,slotProps:{title:B,subheader:b,...X}};let ve=L;const[Se,Pe]=Nu("title",{className:ae.title,elementType:Su,externalForwardedProps:U,ownerState:de,additionalProps:{variant:a?"body2":"h5",component:"span"}});ve!=null&&ve.type!==Su&&!s&&(ve=Ke.jsx(Se,{...Pe,children:ve}));let Me=d;const[Ie,Ve]=Nu("subheader",{className:ae.subheader,elementType:Su,externalForwardedProps:U,ownerState:de,additionalProps:{variant:a?"body2":"body1",color:"textSecondary",component:"span"}});Me!=null&&Me.type!==Su&&!s&&(Me=Ke.jsx(Ie,{...Ve,children:Me}));const[Ze,Je]=Nu("root",{ref:r,className:ae.root,elementType:Nvt,externalForwardedProps:{...U,...ie,component:o},ownerState:de}),[nt,ut]=Nu("avatar",{className:ae.avatar,elementType:Fvt,externalForwardedProps:U,ownerState:de}),[ht,_t]=Nu("content",{className:ae.content,elementType:Bvt,externalForwardedProps:U,ownerState:de}),[Dt,qt]=Nu("action",{className:ae.action,elementType:zvt,externalForwardedProps:U,ownerState:de});return Ke.jsxs(Ze,{...Je,children:[a&&Ke.jsx(nt,{...ut,children:a}),Ke.jsxs(ht,{..._t,children:[ve,Me]}),i&&Ke.jsx(Dt,{...qt,children:i})]})});function Hvt(t){return Al("PrivateSwitchBase",t)}Ml("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const jvt=t=>{const{classes:e,checked:r,disabled:n,edge:i}=t,a={root:["root",r&&"checked",n&&"disabled",i&&`edge${ys(i)}`],input:["input"]};return Cs(a,Hvt,e)},Vvt=fa(ZS,{name:"MuiSwitchBase"})({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:t,ownerState:e})=>t==="start"&&e.size!=="small",style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:t,ownerState:e})=>t==="end"&&e.size!=="small",style:{marginRight:-12}}]}),qvt=fa("input",{name:"MuiSwitchBase",shouldForwardProp:mx})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),pme=ze.forwardRef(function(e,r){const{autoFocus:n,checked:i,checkedIcon:a,defaultChecked:o,disabled:s,disableFocusRipple:d=!1,edge:b=!1,icon:L,id:B,inputProps:V,inputRef:X,name:ie,onBlur:de,onChange:ae,onFocus:U,readOnly:ve,required:Se=!1,tabIndex:Pe,type:Me,value:Ie,slots:Ve={},slotProps:Ze={},...Je}=e,[nt,ut]=V_({controlled:i,default:!!o,name:"SwitchBase",state:"checked"}),ht=W2(),_t=Ar=>{U&&U(Ar),ht&&ht.onFocus&&ht.onFocus(Ar)},Dt=Ar=>{de&&de(Ar),ht&&ht.onBlur&&ht.onBlur(Ar)},qt=Ar=>{if(Ar.nativeEvent.defaultPrevented)return;const Ir=Ar.target.checked;ut(Ir),ae&&ae(Ar,Ir)};let Lt=s;ht&&typeof Lt>"u"&&(Lt=ht.disabled);const dr=Me==="checkbox"||Me==="radio",Zt={...e,checked:nt,disabled:Lt,disableFocusRipple:d,edge:b},Cr=jvt(Zt),yt={slots:Ve,slotProps:{input:V,...Ze}},[Vt,Er]=Nu("root",{ref:r,elementType:Vvt,className:Cr.root,shouldForwardComponentProp:!0,externalForwardedProps:{...yt,component:"span",...Je},getSlotProps:Ar=>({...Ar,onFocus:Ir=>{Ar.onFocus?.(Ir),_t(Ir)},onBlur:Ir=>{Ar.onBlur?.(Ir),Dt(Ir)}}),ownerState:Zt,additionalProps:{centerRipple:!0,focusRipple:!d,disabled:Lt,role:void 0,tabIndex:null}}),[sr,or]=Nu("input",{ref:X,elementType:qvt,className:Cr.input,externalForwardedProps:yt,getSlotProps:Ar=>({...Ar,onChange:Ir=>{Ar.onChange?.(Ir),qt(Ir)}}),ownerState:Zt,additionalProps:{autoFocus:n,checked:i,defaultChecked:o,disabled:Lt,id:dr?B:void 0,name:ie,readOnly:ve,required:Se,tabIndex:Pe,type:Me,...Me==="checkbox"&&Ie===void 0?{}:{value:Ie}}});return Ke.jsxs(Vt,{...Er,children:[Ke.jsx(sr,{...or}),nt?a:L]})}),Gvt=Hu(Ke.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"})),$vt=Hu(Ke.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})),Wvt=Hu(Ke.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}));function Yvt(t){return Al("MuiCheckbox",t)}const qJ=Ml("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),Xvt=t=>{const{classes:e,indeterminate:r,color:n,size:i}=t,a={root:["root",r&&"indeterminate",`color${ys(n)}`,`size${ys(i)}`]},o=Cs(a,Yvt,e);return{...e,...o}},Zvt=fa(pme,{shouldForwardProp:t=>mx(t)||t==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.indeterminate&&e.indeterminate,e[`size${ys(r.size)}`],r.color!=="default"&&e[`color${ys(r.color)}`]]}})(yu(({theme:t})=>({color:(t.vars||t).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:t.alpha((t.vars||t).palette.action.active,(t.vars||t).palette.action.hoverOpacity)}}},...Object.entries(t.palette).filter(Yv()).map(([e])=>({props:{color:e,disableRipple:!1},style:{"&:hover":{backgroundColor:t.alpha((t.vars||t).palette[e].main,(t.vars||t).palette.action.hoverOpacity)}}})),...Object.entries(t.palette).filter(Yv()).map(([e])=>({props:{color:e},style:{[`&.${qJ.checked}, &.${qJ.indeterminate}`]:{color:(t.vars||t).palette[e].main},[`&.${qJ.disabled}`]:{color:(t.vars||t).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),Kvt=Ke.jsx($vt,{}),Jvt=Ke.jsx(Gvt,{}),Qvt=Ke.jsx(Wvt,{}),n$=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiCheckbox"}),{checkedIcon:i=Kvt,color:a="primary",icon:o=Jvt,indeterminate:s=!1,indeterminateIcon:d=Qvt,inputProps:b,size:L="medium",disableRipple:B=!1,className:V,slots:X={},slotProps:ie={},...de}=n,ae=s?d:o,U=s?d:i,ve={...n,disableRipple:B,color:a,indeterminate:s,size:L},Se=Xvt(ve),Pe=ie.input??b,[Me,Ie]=Nu("root",{ref:r,elementType:Zvt,className:Vo(Se.root,V),shouldForwardComponentProp:!0,externalForwardedProps:{slots:X,slotProps:ie,...de},ownerState:ve,additionalProps:{type:"checkbox",icon:ze.cloneElement(ae,{fontSize:ae.props.fontSize??L}),checkedIcon:ze.cloneElement(U,{fontSize:U.props.fontSize??L}),disableRipple:B,slots:X,slotProps:{input:tme(typeof Pe=="function"?Pe(ve):Pe,{"data-indeterminate":s})}}});return Ke.jsx(Me,{...Ie,classes:Se})});function k2e(t){return t.substring(2).toLowerCase()}function emt(t,e){return e.documentElement.clientWidth<t.clientX||e.documentElement.clientHeight<t.clientY}function vme(t){const{children:e,disableReactTree:r=!1,mouseEvent:n="onClick",onClickAway:i,touchEvent:a="onTouchEnd"}=t,o=ze.useRef(!1),s=ze.useRef(null),d=ze.useRef(!1),b=ze.useRef(!1);ze.useEffect(()=>(setTimeout(()=>{d.current=!0},0),()=>{d.current=!1}),[]);const L=id(h4(e),s),B=vl(ie=>{const de=b.current;b.current=!1;const ae=Lm(s.current);if(!d.current||!s.current||"clientX"in ie&&emt(ie,ae))return;if(o.current){o.current=!1;return}let U;ie.composedPath?U=ie.composedPath().includes(s.current):U=!ae.documentElement.contains(ie.target)||s.current.contains(ie.target),!U&&(r||!de)&&i(ie)}),V=ie=>de=>{b.current=!0;const ae=e.props[ie];ae&&ae(de)},X={ref:L};return a!==!1&&(X[a]=V(a)),ze.useEffect(()=>{if(a!==!1){const ie=k2e(a),de=Lm(s.current),ae=()=>{o.current=!0};return de.addEventListener(ie,B),de.addEventListener("touchmove",ae),()=>{de.removeEventListener(ie,B),de.removeEventListener("touchmove",ae)}}},[B,a]),n!==!1&&(X[n]=V(n)),ze.useEffect(()=>{if(n!==!1){const ie=k2e(n),de=Lm(s.current);return de.addEventListener(ie,B),()=>{de.removeEventListener(ie,B)}}},[B,n]),ze.cloneElement(e,X)}const jP=$ut({createStyledComponent:fa("div",{name:"MuiContainer",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[`maxWidth${ys(String(r.maxWidth))}`],r.fixed&&e.fixed,r.disableGutters&&e.disableGutters]}}),useThemeProps:t=>Uu({props:t,name:"MuiContainer"})});function A9e(t=window){const e=t.document.documentElement.clientWidth;return t.innerWidth-e}function tmt(t){const e=Lm(t);return e.body===t?cE(t).innerWidth>e.documentElement.clientWidth:t.scrollHeight>t.clientHeight}function Gz(t,e){e?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")}function I2e(t){return parseInt(cE(t).getComputedStyle(t).paddingRight,10)||0}function rmt(t){const r=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(t.tagName),n=t.tagName==="INPUT"&&t.getAttribute("type")==="hidden";return r||n}function P2e(t,e,r,n,i){const a=[e,r,...n];[].forEach.call(t.children,o=>{const s=!a.includes(o),d=!rmt(o);s&&d&&Gz(o,i)})}function GJ(t,e){let r=-1;return t.some((n,i)=>e(n)?(r=i,!0):!1),r}function nmt(t,e){const r=[],n=t.container;if(!e.disableScrollLock){if(tmt(n)){const o=A9e(cE(n));r.push({value:n.style.paddingRight,property:"padding-right",el:n}),n.style.paddingRight=`${I2e(n)+o}px`;const s=Lm(n).querySelectorAll(".mui-fixed");[].forEach.call(s,d=>{r.push({value:d.style.paddingRight,property:"padding-right",el:d}),d.style.paddingRight=`${I2e(d)+o}px`})}let a;if(n.parentNode instanceof DocumentFragment)a=Lm(n).body;else{const o=n.parentElement,s=cE(n);a=o?.nodeName==="HTML"&&s.getComputedStyle(o).overflowY==="scroll"?o:n}r.push({value:a.style.overflow,property:"overflow",el:a},{value:a.style.overflowX,property:"overflow-x",el:a},{value:a.style.overflowY,property:"overflow-y",el:a}),a.style.overflow="hidden"}return()=>{r.forEach(({value:a,el:o,property:s})=>{a?o.style.setProperty(s,a):o.style.removeProperty(s)})}}function imt(t){const e=[];return[].forEach.call(t.children,r=>{r.getAttribute("aria-hidden")==="true"&&e.push(r)}),e}class amt{constructor(){this.modals=[],this.containers=[]}add(e,r){let n=this.modals.indexOf(e);if(n!==-1)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&Gz(e.modalRef,!1);const i=imt(r);P2e(r,e.mount,e.modalRef,i,!0);const a=GJ(this.containers,o=>o.container===r);return a!==-1?(this.containers[a].modals.push(e),n):(this.containers.push({modals:[e],container:r,restore:null,hiddenSiblings:i}),n)}mount(e,r){const n=GJ(this.containers,a=>a.modals.includes(e)),i=this.containers[n];i.restore||(i.restore=nmt(i,r))}remove(e,r=!0){const n=this.modals.indexOf(e);if(n===-1)return n;const i=GJ(this.containers,o=>o.modals.includes(e)),a=this.containers[i];if(a.modals.splice(a.modals.indexOf(e),1),this.modals.splice(n,1),a.modals.length===0)a.restore&&a.restore(),e.modalRef&&Gz(e.modalRef,r),P2e(a.container,e.mount,e.modalRef,a.hiddenSiblings,!1),this.containers.splice(i,1);else{const o=a.modals[a.modals.length-1];o.modalRef&&Gz(o.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}const omt=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function smt(t){const e=parseInt(t.getAttribute("tabindex")||"",10);return Number.isNaN(e)?t.contentEditable==="true"||(t.nodeName==="AUDIO"||t.nodeName==="VIDEO"||t.nodeName==="DETAILS")&&t.getAttribute("tabindex")===null?0:t.tabIndex:e}function lmt(t){if(t.tagName!=="INPUT"||t.type!=="radio"||!t.name)return!1;const e=n=>t.ownerDocument.querySelector(`input[type="radio"]${n}`);let r=e(`[name="${t.name}"]:checked`);return r||(r=e(`[name="${t.name}"]`)),r!==t}function umt(t){return!(t.disabled||t.tagName==="INPUT"&&t.type==="hidden"||lmt(t))}function cmt(t){const e=[],r=[];return Array.from(t.querySelectorAll(omt)).forEach((n,i)=>{const a=smt(n);a===-1||!umt(n)||(a===0?e.push(n):r.push({documentOrder:i,tabIndex:a,node:n}))}),r.sort((n,i)=>n.tabIndex===i.tabIndex?n.documentOrder-i.documentOrder:n.tabIndex-i.tabIndex).map(n=>n.node).concat(e)}function fmt(){return!0}function mme(t){const{children:e,disableAutoFocus:r=!1,disableEnforceFocus:n=!1,disableRestoreFocus:i=!1,getTabbable:a=cmt,isEnabled:o=fmt,open:s}=t,d=ze.useRef(!1),b=ze.useRef(null),L=ze.useRef(null),B=ze.useRef(null),V=ze.useRef(null),X=ze.useRef(!1),ie=ze.useRef(null),de=id(h4(e),ie),ae=ze.useRef(null);ze.useEffect(()=>{!s||!ie.current||(X.current=!r)},[r,s]),ze.useEffect(()=>{if(!s||!ie.current)return;const Se=Lm(ie.current);return ie.current.contains(Se.activeElement)||(ie.current.hasAttribute("tabIndex")||ie.current.setAttribute("tabIndex","-1"),X.current&&ie.current.focus()),()=>{i||(B.current&&B.current.focus&&(d.current=!0,B.current.focus()),B.current=null)}},[s]),ze.useEffect(()=>{if(!s||!ie.current)return;const Se=Lm(ie.current),Pe=Ve=>{ae.current=Ve,!(n||!o()||Ve.key!=="Tab")&&Se.activeElement===ie.current&&Ve.shiftKey&&(d.current=!0,L.current&&L.current.focus())},Me=()=>{const Ve=ie.current;if(Ve===null)return;if(!Se.hasFocus()||!o()||d.current){d.current=!1;return}if(Ve.contains(Se.activeElement)||n&&Se.activeElement!==b.current&&Se.activeElement!==L.current)return;if(Se.activeElement!==V.current)V.current=null;else if(V.current!==null)return;if(!X.current)return;let Ze=[];if((Se.activeElement===b.current||Se.activeElement===L.current)&&(Ze=a(ie.current)),Ze.length>0){const Je=!!(ae.current?.shiftKey&&ae.current?.key==="Tab"),nt=Ze[0],ut=Ze[Ze.length-1];typeof nt!="string"&&typeof ut!="string"&&(Je?ut.focus():nt.focus())}else Ve.focus()};Se.addEventListener("focusin",Me),Se.addEventListener("keydown",Pe,!0);const Ie=setInterval(()=>{Se.activeElement&&Se.activeElement.tagName==="BODY"&&Me()},50);return()=>{clearInterval(Ie),Se.removeEventListener("focusin",Me),Se.removeEventListener("keydown",Pe,!0)}},[r,n,i,o,s,a]);const U=Se=>{B.current===null&&(B.current=Se.relatedTarget),X.current=!0,V.current=Se.target;const Pe=e.props.onFocus;Pe&&Pe(Se)},ve=Se=>{B.current===null&&(B.current=Se.relatedTarget),X.current=!0};return Ke.jsxs(ze.Fragment,{children:[Ke.jsx("div",{tabIndex:s?0:-1,onFocus:ve,ref:b,"data-testid":"sentinelStart"}),ze.cloneElement(e,{ref:de,onFocus:U}),Ke.jsx("div",{tabIndex:s?0:-1,onFocus:ve,ref:L,"data-testid":"sentinelEnd"})]})}function dmt(t){return typeof t=="function"?t():t}function hmt(t){return t?t.props.hasOwnProperty("in"):!1}const D2e=()=>{},tj=new amt;function pmt(t){const{container:e,disableEscapeKeyDown:r=!1,disableScrollLock:n=!1,closeAfterTransition:i=!1,onTransitionEnter:a,onTransitionExited:o,children:s,onClose:d,open:b,rootRef:L}=t,B=ze.useRef({}),V=ze.useRef(null),X=ze.useRef(null),ie=id(X,L),[de,ae]=ze.useState(!b),U=hmt(s);let ve=!0;(t["aria-hidden"]==="false"||t["aria-hidden"]===!1)&&(ve=!1);const Se=()=>Lm(V.current),Pe=()=>(B.current.modalRef=X.current,B.current.mount=V.current,B.current),Me=()=>{tj.mount(Pe(),{disableScrollLock:n}),X.current&&(X.current.scrollTop=0)},Ie=vl(()=>{const qt=dmt(e)||Se().body;tj.add(Pe(),qt),X.current&&Me()}),Ve=()=>tj.isTopModal(Pe()),Ze=vl(qt=>{V.current=qt,qt&&(b&&Ve()?Me():X.current&&Gz(X.current,ve))}),Je=ze.useCallback(()=>{tj.remove(Pe(),ve)},[ve]);ze.useEffect(()=>()=>{Je()},[Je]),ze.useEffect(()=>{b?Ie():(!U||!i)&&Je()},[b,Je,U,i,Ie]);const nt=qt=>Lt=>{qt.onKeyDown?.(Lt),!(Lt.key!=="Escape"||Lt.which===229||!Ve())&&(r||(Lt.stopPropagation(),d&&d(Lt,"escapeKeyDown")))},ut=qt=>Lt=>{qt.onClick?.(Lt),Lt.target===Lt.currentTarget&&d&&d(Lt,"backdropClick")};return{getRootProps:(qt={})=>{const Lt=sL(t);delete Lt.onTransitionEnter,delete Lt.onTransitionExited;const dr={...Lt,...qt};return{role:"presentation",...dr,onKeyDown:nt(dr),ref:ie}},getBackdropProps:(qt={})=>{const Lt=qt;return{"aria-hidden":!0,...Lt,onClick:ut(Lt),open:b}},getTransitionProps:()=>{const qt=()=>{ae(!1),a&&a()},Lt=()=>{ae(!0),o&&o(),i&&Je()};return{onEnter:she(qt,s?.props.onEnter??D2e),onExited:she(Lt,s?.props.onExited??D2e)}},rootRef:ie,portalRef:Ze,isTopModal:Ve,exited:de,hasTransition:U}}function vmt(t){return Al("MuiModal",t)}Ml("MuiModal",["root","hidden","backdrop"]);const mmt=t=>{const{open:e,exited:r,classes:n}=t;return Cs({root:["root",!e&&r&&"hidden"],backdrop:["backdrop"]},vmt,n)},gmt=fa("div",{name:"MuiModal",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,!r.open&&r.exited&&e.hidden]}})(yu(({theme:t})=>({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:e})=>!e.open&&e.exited,style:{visibility:"hidden"}}]}))),ymt=fa(S9e,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),gme=ze.forwardRef(function(e,r){const n=Uu({name:"MuiModal",props:e}),{BackdropComponent:i=ymt,BackdropProps:a,classes:o,className:s,closeAfterTransition:d=!1,children:b,container:L,component:B,components:V={},componentsProps:X={},disableAutoFocus:ie=!1,disableEnforceFocus:de=!1,disableEscapeKeyDown:ae=!1,disablePortal:U=!1,disableRestoreFocus:ve=!1,disableScrollLock:Se=!1,hideBackdrop:Pe=!1,keepMounted:Me=!1,onClose:Ie,onTransitionEnter:Ve,onTransitionExited:Ze,open:Je,slotProps:nt={},slots:ut={},theme:ht,..._t}=n,Dt={...n,closeAfterTransition:d,disableAutoFocus:ie,disableEnforceFocus:de,disableEscapeKeyDown:ae,disablePortal:U,disableRestoreFocus:ve,disableScrollLock:Se,hideBackdrop:Pe,keepMounted:Me},{getRootProps:qt,getBackdropProps:Lt,getTransitionProps:dr,portalRef:Zt,isTopModal:Cr,exited:yt,hasTransition:Vt}=pmt({...Dt,rootRef:r}),Er={...Dt,exited:yt},sr=mmt(Er),or={};if(b.props.tabIndex===void 0&&(or.tabIndex="-1"),Vt){const{onEnter:Jn,onExited:Vn}=dr();or.onEnter=Jn,or.onExited=Vn}const Ar={slots:{root:V.Root,backdrop:V.Backdrop,...ut},slotProps:{...X,...nt}},[Ir,_n]=Nu("root",{ref:r,elementType:gmt,externalForwardedProps:{...Ar,..._t,component:B},getSlotProps:qt,ownerState:Er,className:Vo(s,sr?.root,!Er.open&&Er.exited&&sr?.hidden)}),[Un,Qn]=Nu("backdrop",{ref:a?.ref,elementType:i,externalForwardedProps:Ar,shouldForwardComponentProp:!0,additionalProps:a,getSlotProps:Jn=>Lt({...Jn,onClick:Vn=>{Jn?.onClick&&Jn.onClick(Vn)}}),className:Vo(a?.className,sr?.backdrop),ownerState:Er});return!Me&&!Je&&(!Vt||yt)?null:Ke.jsx(g9e,{ref:Zt,container:L,disablePortal:U,children:Ke.jsxs(Ir,{..._n,children:[!Pe&&i?Ke.jsx(Un,{...Qn}):null,Ke.jsx(mme,{disableEnforceFocus:de,disableAutoFocus:ie,disableRestoreFocus:ve,isEnabled:Cr,open:Je,children:ze.cloneElement(b,or)})]})})});function bmt(t){return Al("MuiDialog",t)}const $z=Ml("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),C9e=ze.createContext({}),xmt=fa(S9e,{name:"MuiDialog",slot:"Backdrop",overrides:(t,e)=>e.backdrop})({zIndex:-1}),_mt=t=>{const{classes:e,scroll:r,maxWidth:n,fullWidth:i,fullScreen:a}=t,o={root:["root"],container:["container",`scroll${ys(r)}`],paper:["paper",`paperScroll${ys(r)}`,`paperWidth${ys(String(n))}`,i&&"paperFullWidth",a&&"paperFullScreen"]};return Cs(o,bmt,e)},wmt=fa(gme,{name:"MuiDialog",slot:"Root"})({"@media print":{position:"absolute !important"}}),Smt=fa("div",{name:"MuiDialog",slot:"Container",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.container,e[`scroll${ys(r.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),Tmt=fa(Gy,{name:"MuiDialog",slot:"Paper",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.paper,e[`scrollPaper${ys(r.scroll)}`],e[`paperWidth${ys(String(r.maxWidth))}`],r.fullWidth&&e.paperFullWidth,r.fullScreen&&e.paperFullScreen]}})(yu(({theme:t})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:e})=>!e.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:t.breakpoints.unit==="px"?Math.max(t.breakpoints.values.xs,444):`max(${t.breakpoints.values.xs}${t.breakpoints.unit}, 444px)`,[`&.${$z.paperScrollBody}`]:{[t.breakpoints.down(Math.max(t.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(t.breakpoints.values).filter(e=>e!=="xs").map(e=>({props:{maxWidth:e},style:{maxWidth:`${t.breakpoints.values[e]}${t.breakpoints.unit}`,[`&.${$z.paperScrollBody}`]:{[t.breakpoints.down(t.breakpoints.values[e]+64)]:{maxWidth:"calc(100% - 64px)"}}}})),{props:({ownerState:e})=>e.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:e})=>e.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${$z.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),iA=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiDialog"}),i=cy(),a={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{"aria-describedby":o,"aria-labelledby":s,"aria-modal":d=!0,BackdropComponent:b,BackdropProps:L,children:B,className:V,disableEscapeKeyDown:X=!1,fullScreen:ie=!1,fullWidth:de=!1,maxWidth:ae="sm",onClick:U,onClose:ve,open:Se,PaperComponent:Pe=Gy,PaperProps:Me={},scroll:Ie="paper",slots:Ve={},slotProps:Ze={},TransitionComponent:Je=xL,transitionDuration:nt=a,TransitionProps:ut,...ht}=n,_t={...n,disableEscapeKeyDown:X,fullScreen:ie,fullWidth:de,maxWidth:ae,scroll:Ie},Dt=_mt(_t),qt=ze.useRef(),Lt=Lr=>{qt.current=Lr.target===Lr.currentTarget},dr=Lr=>{U&&U(Lr),qt.current&&(qt.current=null,ve&&ve(Lr,"backdropClick"))},Zt=Vd(s),Cr=ze.useMemo(()=>({titleId:Zt}),[Zt]),yt={transition:Je,...Ve},Vt={transition:ut,paper:Me,backdrop:L,...Ze},Er={slots:yt,slotProps:Vt},[sr,or]=Nu("root",{elementType:wmt,shouldForwardComponentProp:!0,externalForwardedProps:Er,ownerState:_t,className:Vo(Dt.root,V),ref:r}),[Ar,Ir]=Nu("backdrop",{elementType:xmt,shouldForwardComponentProp:!0,externalForwardedProps:Er,ownerState:_t}),[_n,Un]=Nu("paper",{elementType:Tmt,shouldForwardComponentProp:!0,externalForwardedProps:Er,ownerState:_t,className:Vo(Dt.paper,Me.className)}),[Qn,Jn]=Nu("container",{elementType:Smt,externalForwardedProps:Er,ownerState:_t,className:Dt.container}),[Vn,jn]=Nu("transition",{elementType:xL,externalForwardedProps:Er,ownerState:_t,additionalProps:{appear:!0,in:Se,timeout:nt,role:"presentation"}});return Ke.jsx(sr,{closeAfterTransition:!0,slots:{backdrop:Ar},slotProps:{backdrop:{transitionDuration:nt,as:b,...Ir}},disableEscapeKeyDown:X,onClose:ve,open:Se,onClick:dr,...or,...ht,children:Ke.jsx(Vn,{...jn,children:Ke.jsx(Qn,{onMouseDown:Lt,...Jn,children:Ke.jsx(_n,{as:Pe,elevation:24,role:"dialog","aria-describedby":o,"aria-labelledby":Zt,"aria-modal":d,...Un,children:Ke.jsx(C9e.Provider,{value:Cr,children:B})})})})})});function Emt(t){return Al("MuiDialogActions",t)}Ml("MuiDialogActions",["root","spacing"]);const Amt=t=>{const{classes:e,disableSpacing:r}=t;return Cs({root:["root",!r&&"spacing"]},Emt,e)},Cmt=fa("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,!r.disableSpacing&&e.spacing]}})({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto",variants:[{props:({ownerState:t})=>!t.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),WC=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiDialogActions"}),{className:i,disableSpacing:a=!1,...o}=n,s={...n,disableSpacing:a},d=Amt(s);return Ke.jsx(Cmt,{className:Vo(d.root,i),ownerState:s,ref:r,...o})});function Mmt(t){return Al("MuiDialogContent",t)}Ml("MuiDialogContent",["root","dividers"]);function Rmt(t){return Al("MuiDialogTitle",t)}const kmt=Ml("MuiDialogTitle",["root"]),Imt=t=>{const{classes:e,dividers:r}=t;return Cs({root:["root",r&&"dividers"]},Mmt,e)},Pmt=fa("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.dividers&&e.dividers]}})(yu(({theme:t})=>({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px",variants:[{props:({ownerState:e})=>e.dividers,style:{padding:"16px 24px",borderTop:`1px solid ${(t.vars||t).palette.divider}`,borderBottom:`1px solid ${(t.vars||t).palette.divider}`}},{props:({ownerState:e})=>!e.dividers,style:{[`.${kmt.root} + &`]:{paddingTop:0}}}]}))),aA=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiDialogContent"}),{className:i,dividers:a=!1,...o}=n,s={...n,dividers:a},d=Imt(s);return Ke.jsx(Pmt,{className:Vo(d.root,i),ownerState:s,ref:r,...o})});function Dmt(t){return Al("MuiDialogContentText",t)}Ml("MuiDialogContentText",["root"]);const Lmt=t=>{const{classes:e}=t,n=Cs({root:["root"]},Dmt,e);return{...e,...n}},Omt=fa(Su,{shouldForwardProp:t=>mx(t)||t==="classes",name:"MuiDialogContentText",slot:"Root"})({}),wY=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiDialogContentText"}),{children:i,className:a,...o}=n,s=Lmt(o);return Ke.jsx(Omt,{component:"p",variant:"body1",color:"textSecondary",ref:r,ownerState:o,className:Vo(s.root,a),...n,classes:s})}),Nmt=t=>{const{classes:e}=t;return Cs({root:["root"]},Rmt,e)},Fmt=fa(Su,{name:"MuiDialogTitle",slot:"Root"})({padding:"16px 24px",flex:"0 0 auto"}),YC=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiDialogTitle"}),{className:i,id:a,...o}=n,s=n,d=Nmt(s),{titleId:b=a}=ze.useContext(C9e);return Ke.jsx(Fmt,{component:"h2",className:Vo(d.root,i),ownerState:s,ref:r,variant:"h6",id:a??b,...o})});function zmt(t){return Al("MuiDivider",t)}const L2e=Ml("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),Bmt=t=>{const{absolute:e,children:r,classes:n,flexItem:i,light:a,orientation:o,textAlign:s,variant:d}=t;return Cs({root:["root",e&&"absolute",d,a&&"light",o==="vertical"&&"vertical",i&&"flexItem",r&&"withChildren",r&&o==="vertical"&&"withChildrenVertical",s==="right"&&o!=="vertical"&&"textAlignRight",s==="left"&&o!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",o==="vertical"&&"wrapperVertical"]},zmt,n)},Umt=fa("div",{name:"MuiDivider",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.absolute&&e.absolute,e[r.variant],r.light&&e.light,r.orientation==="vertical"&&e.vertical,r.flexItem&&e.flexItem,r.children&&e.withChildren,r.children&&r.orientation==="vertical"&&e.withChildrenVertical,r.textAlign==="right"&&r.orientation!=="vertical"&&e.textAlignRight,r.textAlign==="left"&&r.orientation!=="vertical"&&e.textAlignLeft]}})(yu(({theme:t})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{light:!0},style:{borderColor:t.alpha((t.vars||t).palette.divider,.08)}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:t.spacing(2),marginRight:t.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:t.spacing(1),marginBottom:t.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:e})=>!!e.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:e})=>e.children&&e.orientation!=="vertical",style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(t.vars||t).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:e})=>e.orientation==="vertical"&&e.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(t.vars||t).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:e})=>e.textAlign==="right"&&e.orientation!=="vertical",style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:e})=>e.textAlign==="left"&&e.orientation!=="vertical",style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]}))),Hmt=fa("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.wrapper,r.orientation==="vertical"&&e.wrapperVertical]}})(yu(({theme:t})=>({display:"inline-block",paddingLeft:`calc(${t.spacing(1)} * 1.2)`,paddingRight:`calc(${t.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${t.spacing(1)} * 1.2)`,paddingBottom:`calc(${t.spacing(1)} * 1.2)`}}]}))),oA=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiDivider"}),{absolute:i=!1,children:a,className:o,orientation:s="horizontal",component:d=a||s==="vertical"?"div":"hr",flexItem:b=!1,light:L=!1,role:B=d!=="hr"?"separator":void 0,textAlign:V="center",variant:X="fullWidth",...ie}=n,de={...n,absolute:i,component:d,flexItem:b,light:L,orientation:s,role:B,textAlign:V,variant:X},ae=Bmt(de);return Ke.jsx(Umt,{as:d,className:Vo(ae.root,o),role:B,ref:r,ownerState:de,"aria-orientation":B==="separator"&&(d!=="hr"||s==="vertical")?s:void 0,...ie,children:a?Ke.jsx(Hmt,{className:ae.wrapper,ownerState:de,children:a}):null})});oA&&(oA.muiSkipListHighlight=!0);function jmt(t,e,r){const n=e.getBoundingClientRect(),i=r&&r.getBoundingClientRect(),a=cE(e);let o;if(e.fakeTransform)o=e.fakeTransform;else{const b=a.getComputedStyle(e);o=b.getPropertyValue("-webkit-transform")||b.getPropertyValue("transform")}let s=0,d=0;if(o&&o!=="none"&&typeof o=="string"){const b=o.split("(")[1].split(")")[0].split(",");s=parseInt(b[4],10),d=parseInt(b[5],10)}return t==="left"?i?`translateX(${i.right+s-n.left}px)`:`translateX(${a.innerWidth+s-n.left}px)`:t==="right"?i?`translateX(-${n.right-i.left-s}px)`:`translateX(-${n.left+n.width-s}px)`:t==="up"?i?`translateY(${i.bottom+d-n.top}px)`:`translateY(${a.innerHeight+d-n.top}px)`:i?`translateY(-${n.top-i.top+n.height-d}px)`:`translateY(-${n.top+n.height-d}px)`}function Vmt(t){return typeof t=="function"?t():t}function rj(t,e,r){const n=Vmt(r),i=jmt(t,e,n);i&&(e.style.webkitTransform=i,e.style.transform=i)}const qmt=ze.forwardRef(function(e,r){const n=cy(),i={enter:n.transitions.easing.easeOut,exit:n.transitions.easing.sharp},a={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:o,appear:s=!0,children:d,container:b,direction:L="down",easing:B=i,in:V,onEnter:X,onEntered:ie,onEntering:de,onExit:ae,onExited:U,onExiting:ve,style:Se,timeout:Pe=a,TransitionComponent:Me=vE,...Ie}=e,Ve=ze.useRef(null),Ze=id(h4(d),Ve,r),Je=Zt=>Cr=>{Zt&&(Cr===void 0?Zt(Ve.current):Zt(Ve.current,Cr))},nt=Je((Zt,Cr)=>{rj(L,Zt,b),ame(Zt),X&&X(Zt,Cr)}),ut=Je((Zt,Cr)=>{const yt=KP({timeout:Pe,style:Se,easing:B},{mode:"enter"});Zt.style.webkitTransition=n.transitions.create("-webkit-transform",{...yt}),Zt.style.transition=n.transitions.create("transform",{...yt}),Zt.style.webkitTransform="none",Zt.style.transform="none",de&&de(Zt,Cr)}),ht=Je(ie),_t=Je(ve),Dt=Je(Zt=>{const Cr=KP({timeout:Pe,style:Se,easing:B},{mode:"exit"});Zt.style.webkitTransition=n.transitions.create("-webkit-transform",Cr),Zt.style.transition=n.transitions.create("transform",Cr),rj(L,Zt,b),ae&&ae(Zt)}),qt=Je(Zt=>{Zt.style.webkitTransition="",Zt.style.transition="",U&&U(Zt)}),Lt=Zt=>{o&&o(Ve.current,Zt)},dr=ze.useCallback(()=>{Ve.current&&rj(L,Ve.current,b)},[L,b]);return ze.useEffect(()=>{if(V||L==="down"||L==="right")return;const Zt=d4(()=>{Ve.current&&rj(L,Ve.current,b)}),Cr=cE(Ve.current);return Cr.addEventListener("resize",Zt),()=>{Zt.clear(),Cr.removeEventListener("resize",Zt)}},[L,V,b]),ze.useEffect(()=>{V||dr()},[V,dr]),Ke.jsx(Me,{nodeRef:Ve,onEnter:nt,onEntered:ht,onEntering:ut,onExit:Dt,onExited:qt,onExiting:_t,addEndListener:Lt,appear:s,in:V,timeout:Pe,...Ie,children:(Zt,{ownerState:Cr,...yt})=>ze.cloneElement(d,{ref:Ze,style:{visibility:Zt==="exited"&&!V?"hidden":void 0,...Se,...d.props.style},...yt})})});function Gmt(t){return Al("MuiDrawer",t)}Ml("MuiDrawer",["root","docked","paper","anchorLeft","anchorRight","anchorTop","anchorBottom","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const M9e=(t,e)=>{const{ownerState:r}=t;return[e.root,(r.variant==="permanent"||r.variant==="persistent")&&e.docked,e.modal]},$mt=t=>{const{classes:e,anchor:r,variant:n}=t,i={root:["root",`anchor${ys(r)}`],docked:[(n==="permanent"||n==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${ys(r)}`,n!=="temporary"&&`paperAnchorDocked${ys(r)}`]};return Cs(i,Gmt,e)},Wmt=fa(gme,{name:"MuiDrawer",slot:"Root",overridesResolver:M9e})(yu(({theme:t})=>({zIndex:(t.vars||t).zIndex.drawer}))),Ymt=fa("div",{shouldForwardProp:mx,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:M9e})({flex:"0 0 auto"}),Xmt=fa(Gy,{name:"MuiDrawer",slot:"Paper",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.paper,e[`paperAnchor${ys(r.anchor)}`],r.variant!=="temporary"&&e[`paperAnchorDocked${ys(r.anchor)}`]]}})(yu(({theme:t})=>({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(t.vars||t).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0,variants:[{props:{anchor:"left"},style:{left:0}},{props:{anchor:"top"},style:{top:0,left:0,right:0,height:"auto",maxHeight:"100%"}},{props:{anchor:"right"},style:{right:0}},{props:{anchor:"bottom"},style:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"}},{props:({ownerState:e})=>e.anchor==="left"&&e.variant!=="temporary",style:{borderRight:`1px solid ${(t.vars||t).palette.divider}`}},{props:({ownerState:e})=>e.anchor==="top"&&e.variant!=="temporary",style:{borderBottom:`1px solid ${(t.vars||t).palette.divider}`}},{props:({ownerState:e})=>e.anchor==="right"&&e.variant!=="temporary",style:{borderLeft:`1px solid ${(t.vars||t).palette.divider}`}},{props:({ownerState:e})=>e.anchor==="bottom"&&e.variant!=="temporary",style:{borderTop:`1px solid ${(t.vars||t).palette.divider}`}}]}))),R9e={left:"right",right:"left",top:"down",bottom:"up"};function Zmt(t){return["left","right"].includes(t)}function Kmt({direction:t},e){return t==="rtl"&&Zmt(e)?R9e[e]:e}const Jmt=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiDrawer"}),i=cy(),a=Kv(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{anchor:s="left",BackdropProps:d,children:b,className:L,elevation:B=16,hideBackdrop:V=!1,ModalProps:{BackdropProps:X,...ie}={},onClose:de,open:ae=!1,PaperProps:U={},SlideProps:ve,TransitionComponent:Se,transitionDuration:Pe=o,variant:Me="temporary",slots:Ie={},slotProps:Ve={},...Ze}=n,Je=ze.useRef(!1);ze.useEffect(()=>{Je.current=!0},[]);const nt=Kmt({direction:a?"rtl":"ltr"},s),ht={...n,anchor:s,elevation:B,open:ae,variant:Me,...Ze},_t=$mt(ht),Dt={slots:{transition:Se,...Ie},slotProps:{paper:U,transition:ve,...Ve,backdrop:tme(Ve.backdrop||{...d,...X},{transitionDuration:Pe})}},[qt,Lt]=Nu("root",{ref:r,elementType:Wmt,className:Vo(_t.root,_t.modal,L),shouldForwardComponentProp:!0,ownerState:ht,externalForwardedProps:{...Dt,...Ze,...ie},additionalProps:{open:ae,onClose:de,hideBackdrop:V,slots:{backdrop:Dt.slots.backdrop},slotProps:{backdrop:Dt.slotProps.backdrop}}}),[dr,Zt]=Nu("paper",{elementType:Xmt,shouldForwardComponentProp:!0,className:Vo(_t.paper,U.className),ownerState:ht,externalForwardedProps:Dt,additionalProps:{elevation:Me==="temporary"?B:0,square:!0,...Me==="temporary"&&{role:"dialog","aria-modal":"true"}}}),[Cr,yt]=Nu("docked",{elementType:Ymt,ref:r,className:Vo(_t.root,_t.docked,L),ownerState:ht,externalForwardedProps:Dt,additionalProps:Ze}),[Vt,Er]=Nu("transition",{elementType:qmt,ownerState:ht,externalForwardedProps:Dt,additionalProps:{in:ae,direction:R9e[nt],timeout:Pe,appear:Je.current}}),sr=Ke.jsx(dr,{...Zt,children:b});if(Me==="permanent")return Ke.jsx(Cr,{...yt,children:sr});const or=Ke.jsx(Vt,{...Er,children:sr});return Me==="persistent"?Ke.jsx(Cr,{...yt,children:or}):Ke.jsx(qt,{...Lt,children:or})}),Qmt=t=>{const{classes:e,disableUnderline:r,startAdornment:n,endAdornment:i,size:a,hiddenLabel:o,multiline:s}=t,d={root:["root",!r&&"underline",n&&"adornedStart",i&&"adornedEnd",a==="small"&&`size${ys(a)}`,o&&"hiddenLabel",s&&"multiline"],input:["input"]},b=Cs(d,kpt,e);return{...e,...b}},egt=fa(xY,{shouldForwardProp:t=>mx(t)||t==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[...yY(t,e),!r.disableUnderline&&e.underline]}})(yu(({theme:t})=>{const e=t.palette.mode==="light",r=e?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",n=e?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",i=e?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",a=e?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:t.vars?t.vars.palette.FilledInput.bg:n,borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),"&:hover":{backgroundColor:t.vars?t.vars.palette.FilledInput.hoverBg:i,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:n}},[`&.${KT.focused}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:n},[`&.${KT.disabled}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:a},variants:[{props:({ownerState:o})=>!o.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${KT.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${KT.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${t.vars?t.alpha(t.vars.palette.common.onBackground,t.vars.opacity.inputUnderline):r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${KT.disabled}, .${KT.error}):before`]:{borderBottom:`1px solid ${(t.vars||t).palette.text.primary}`},[`&.${KT.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(t.palette).filter(Yv()).map(([o])=>({props:{disableUnderline:!1,color:o},style:{"&::after":{borderBottom:`2px solid ${(t.vars||t).palette[o]?.main}`}}})),{props:({ownerState:o})=>o.startAdornment,style:{paddingLeft:12}},{props:({ownerState:o})=>o.endAdornment,style:{paddingRight:12}},{props:({ownerState:o})=>o.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:o,size:s})=>o.multiline&&s==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:o})=>o.multiline&&o.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:o})=>o.multiline&&o.hiddenLabel&&o.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),tgt=fa(_Y,{name:"MuiFilledInput",slot:"Input",overridesResolver:bY})(yu(({theme:t})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...t.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}},{props:({ownerState:e})=>e.hiddenLabel&&e.size==="small",style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:e})=>e.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),SY=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiFilledInput"}),{disableUnderline:i=!1,components:a={},componentsProps:o,fullWidth:s=!1,hiddenLabel:d,inputComponent:b="input",multiline:L=!1,slotProps:B,slots:V={},type:X="text",...ie}=n,de={...n,disableUnderline:i,fullWidth:s,inputComponent:b,multiline:L,type:X},ae=Qmt(n),U={root:{ownerState:de},input:{ownerState:de}},ve=B??o?Kx(U,B??o):U,Se=V.root??a.Root??egt,Pe=V.input??a.Input??tgt;return Ke.jsx(IB,{slots:{root:Se,input:Pe},slotProps:ve,fullWidth:s,inputComponent:b,multiline:L,ref:r,type:X,...ie,classes:ae})});SY.muiName="Input";function rgt(t){return Al("MuiFormControl",t)}Ml("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const ngt=t=>{const{classes:e,margin:r,fullWidth:n}=t,i={root:["root",r!=="none"&&`margin${ys(r)}`,n&&"fullWidth"]};return Cs(i,rgt,e)},igt=fa("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[`margin${ys(r.margin)}`],r.fullWidth&&e.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),j5=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiFormControl"}),{children:i,className:a,color:o="primary",component:s="div",disabled:d=!1,error:b=!1,focused:L,fullWidth:B=!1,hiddenLabel:V=!1,margin:X="none",required:ie=!1,size:de="medium",variant:ae="outlined",...U}=n,ve={...n,color:o,component:s,disabled:d,error:b,fullWidth:B,hiddenLabel:V,margin:X,required:ie,size:de,variant:ae},Se=ngt(ve),[Pe,Me]=ze.useState(()=>{let qt=!1;return i&&ze.Children.forEach(i,Lt=>{if(!LN(Lt,["Input","Select"]))return;const dr=LN(Lt,["Select"])?Lt.props.input:Lt;dr&&Ept(dr.props)&&(qt=!0)}),qt}),[Ie,Ve]=ze.useState(()=>{let qt=!1;return i&&ze.Children.forEach(i,Lt=>{LN(Lt,["Input","Select"])&&(t$(Lt.props,!0)||t$(Lt.props.inputProps,!0))&&(qt=!0)}),qt}),[Ze,Je]=ze.useState(!1);d&&Ze&&Je(!1);const nt=L!==void 0&&!d?L:Ze;let ut;ze.useRef(!1);const ht=ze.useCallback(()=>{Ve(!0)},[]),_t=ze.useCallback(()=>{Ve(!1)},[]),Dt=ze.useMemo(()=>({adornedStart:Pe,setAdornedStart:Me,color:o,disabled:d,error:b,filled:Ie,focused:nt,fullWidth:B,hiddenLabel:V,size:de,onBlur:()=>{Je(!1)},onFocus:()=>{Je(!0)},onEmpty:_t,onFilled:ht,registerEffect:ut,required:ie,variant:ae}),[Pe,o,d,b,Ie,nt,B,V,ut,_t,ht,ie,de,ae]);return Ke.jsx(gY.Provider,{value:Dt,children:Ke.jsx(igt,{as:s,ownerState:ve,className:Vo(Se.root,a),ref:r,...U,children:i})})});function agt(t){return Al("MuiFormControlLabel",t)}const bN=Ml("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),ogt=t=>{const{classes:e,disabled:r,labelPlacement:n,error:i,required:a}=t,o={root:["root",r&&"disabled",`labelPlacement${ys(n)}`,i&&"error",a&&"required"],label:["label",r&&"disabled"],asterisk:["asterisk",i&&"error"]};return Cs(o,agt,e)},sgt=fa("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[{[`& .${bN.label}`]:e.label},e.root,e[`labelPlacement${ys(r.labelPlacement)}`]]}})(yu(({theme:t})=>({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${bN.disabled}`]:{cursor:"default"},[`& .${bN.label}`]:{[`&.${bN.disabled}`]:{color:(t.vars||t).palette.text.disabled}},variants:[{props:{labelPlacement:"start"},style:{flexDirection:"row-reverse",marginRight:-11}},{props:{labelPlacement:"top"},style:{flexDirection:"column-reverse"}},{props:{labelPlacement:"bottom"},style:{flexDirection:"column"}},{props:({labelPlacement:e})=>e==="start"||e==="top"||e==="bottom",style:{marginLeft:16}}]}))),lgt=fa("span",{name:"MuiFormControlLabel",slot:"Asterisk"})(yu(({theme:t})=>({[`&.${bN.error}`]:{color:(t.vars||t).palette.error.main}}))),F8=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiFormControlLabel"}),{checked:i,className:a,componentsProps:o={},control:s,disabled:d,disableTypography:b,inputRef:L,label:B,labelPlacement:V="end",name:X,onChange:ie,required:de,slots:ae={},slotProps:U={},value:ve,...Se}=n,Pe=W2(),Me=d??s.props.disabled??Pe?.disabled,Ie=de??s.props.required,Ve={disabled:Me,required:Ie};["checked","name","onChange","value","inputRef"].forEach(qt=>{typeof s.props[qt]>"u"&&typeof n[qt]<"u"&&(Ve[qt]=n[qt])});const Ze=v4({props:n,muiFormControl:Pe,states:["error"]}),Je={...n,disabled:Me,labelPlacement:V,required:Ie,error:Ze.error},nt=ogt(Je),ut={slots:ae,slotProps:{...o,...U}},[ht,_t]=Nu("typography",{elementType:Su,externalForwardedProps:ut,ownerState:Je});let Dt=B;return Dt!=null&&Dt.type!==Su&&!b&&(Dt=Ke.jsx(ht,{component:"span",..._t,className:Vo(nt.label,_t?.className),children:Dt})),Ke.jsxs(sgt,{className:Vo(nt.root,a),ownerState:Je,ref:r,...Se,children:[ze.cloneElement(s,Ve),Ie?Ke.jsxs("div",{children:[Dt,Ke.jsxs(lgt,{ownerState:Je,"aria-hidden":!0,className:nt.asterisk,children:[" ","*"]})]}):Dt]})});function ugt(t){return Al("MuiFormGroup",t)}Ml("MuiFormGroup",["root","row","error"]);const cgt=t=>{const{classes:e,row:r,error:n}=t;return Cs({root:["root",r&&"row",n&&"error"]},ugt,e)},fgt=fa("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.row&&e.row]}})({display:"flex",flexDirection:"column",flexWrap:"wrap",variants:[{props:{row:!0},style:{flexDirection:"row"}}]}),k9e=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiFormGroup"}),{className:i,row:a=!1,...o}=n,s=W2(),d=v4({props:n,muiFormControl:s,states:["error"]}),b={...n,row:a,error:d.error},L=cgt(b);return Ke.jsx(fgt,{className:Vo(L.root,i),ownerState:b,ref:r,...o})});function dgt(t){return Al("MuiFormHelperText",t)}const O2e=Ml("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var N2e;const hgt=t=>{const{classes:e,contained:r,size:n,disabled:i,error:a,filled:o,focused:s,required:d}=t,b={root:["root",i&&"disabled",a&&"error",n&&`size${ys(n)}`,r&&"contained",s&&"focused",o&&"filled",d&&"required"]};return Cs(b,dgt,e)},pgt=fa("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.size&&e[`size${ys(r.size)}`],r.contained&&e.contained,r.filled&&e.filled]}})(yu(({theme:t})=>({color:(t.vars||t).palette.text.secondary,...t.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${O2e.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${O2e.error}`]:{color:(t.vars||t).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:e})=>e.contained,style:{marginLeft:14,marginRight:14}}]}))),w1=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiFormHelperText"}),{children:i,className:a,component:o="p",disabled:s,error:d,filled:b,focused:L,margin:B,required:V,variant:X,...ie}=n,de=W2(),ae=v4({props:n,muiFormControl:de,states:["variant","size","disabled","error","filled","focused","required"]}),U={...n,component:o,contained:ae.variant==="filled"||ae.variant==="outlined",variant:ae.variant,size:ae.size,disabled:ae.disabled,error:ae.error,filled:ae.filled,focused:ae.focused,required:ae.required};delete U.ownerState;const ve=hgt(U);return Ke.jsx(pgt,{as:o,className:Vo(ve.root,a),ref:r,...ie,ownerState:U,children:i===" "?N2e||(N2e=Ke.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):i})});function vgt(t){return Al("MuiFormLabel",t)}const Wz=Ml("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),mgt=t=>{const{classes:e,color:r,focused:n,disabled:i,error:a,filled:o,required:s}=t,d={root:["root",`color${ys(r)}`,i&&"disabled",a&&"error",o&&"filled",n&&"focused",s&&"required"],asterisk:["asterisk",a&&"error"]};return Cs(d,vgt,e)},ggt=fa("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.color==="secondary"&&e.colorSecondary,r.filled&&e.filled]}})(yu(({theme:t})=>({color:(t.vars||t).palette.text.secondary,...t.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(t.palette).filter(Yv()).map(([e])=>({props:{color:e},style:{[`&.${Wz.focused}`]:{color:(t.vars||t).palette[e].main}}})),{props:{},style:{[`&.${Wz.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${Wz.error}`]:{color:(t.vars||t).palette.error.main}}}]}))),ygt=fa("span",{name:"MuiFormLabel",slot:"Asterisk"})(yu(({theme:t})=>({[`&.${Wz.error}`]:{color:(t.vars||t).palette.error.main}}))),z8=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiFormLabel"}),{children:i,className:a,color:o,component:s="label",disabled:d,error:b,filled:L,focused:B,required:V,...X}=n,ie=W2(),de=v4({props:n,muiFormControl:ie,states:["color","required","focused","disabled","error","filled"]}),ae={...n,color:de.color||"primary",component:s,disabled:de.disabled,error:de.error,filled:de.filled,focused:de.focused,required:de.required},U=mgt(ae);return Ke.jsxs(ggt,{as:s,ownerState:ae,className:Vo(U.root,a),ref:r,...X,children:[i,de.required&&Ke.jsxs(ygt,{ownerState:ae,"aria-hidden":!0,className:U.asterisk,children:[" ","*"]})]})}),Ov=lct({createStyledComponent:fa("div",{name:"MuiGrid",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.container&&e.container]}}),componentName:"MuiGrid",useThemeProps:t=>Uu({props:t,name:"MuiGrid"}),useTheme:cy}),bgt=t=>{const{classes:e,disableUnderline:r}=t,i=Cs({root:["root",!r&&"underline"],input:["input"]},Mpt,e);return{...e,...i}},xgt=fa(xY,{shouldForwardProp:t=>mx(t)||t==="classes",name:"MuiInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[...yY(t,e),!r.disableUnderline&&e.underline]}})(yu(({theme:t})=>{let r=t.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(r=t.alpha(t.vars.palette.common.onBackground,t.vars.opacity.inputUnderline)),{position:"relative",variants:[{props:({ownerState:n})=>n.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:n})=>!n.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${MP.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${MP.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${MP.disabled}, .${MP.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${MP.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(t.palette).filter(Yv()).map(([n])=>({props:{color:n,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(t.vars||t).palette[n].main}`}}}))]}})),_gt=fa(_Y,{name:"MuiInput",slot:"Input",overridesResolver:bY})({}),TY=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiInput"}),{disableUnderline:i=!1,components:a={},componentsProps:o,fullWidth:s=!1,inputComponent:d="input",multiline:b=!1,slotProps:L,slots:B={},type:V="text",...X}=n,ie=bgt(n),ae={root:{ownerState:{disableUnderline:i}}},U=L??o?Kx(L??o,ae):ae,ve=B.root??a.Root??xgt,Se=B.input??a.Input??_gt;return Ke.jsx(IB,{slots:{root:ve,input:Se},slotProps:U,fullWidth:s,inputComponent:d,multiline:b,ref:r,type:V,...X,classes:ie})});TY.muiName="Input";function wgt(t){return Al("MuiInputAdornment",t)}const She=Ml("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var F2e;const Sgt=(t,e)=>{const{ownerState:r}=t;return[e.root,e[`position${ys(r.position)}`],r.disablePointerEvents===!0&&e.disablePointerEvents,e[r.variant]]},Tgt=t=>{const{classes:e,disablePointerEvents:r,hiddenLabel:n,position:i,size:a,variant:o}=t,s={root:["root",r&&"disablePointerEvents",i&&`position${ys(i)}`,o,n&&"hiddenLabel",a&&`size${ys(a)}`]};return Cs(s,wgt,e)},Egt=fa("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:Sgt})(yu(({theme:t})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(t.vars||t).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${She.positionStart}&:not(.${She.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),PB=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiInputAdornment"}),{children:i,className:a,component:o="div",disablePointerEvents:s=!1,disableTypography:d=!1,position:b,variant:L,...B}=n,V=W2()||{};let X=L;L&&V.variant,V&&!X&&(X=V.variant);const ie={...n,hiddenLabel:V.hiddenLabel,size:V.size,disablePointerEvents:s,position:b,variant:X},de=Tgt(ie);return Ke.jsx(gY.Provider,{value:null,children:Ke.jsx(Egt,{as:o,ownerState:ie,className:Vo(de.root,a),ref:r,...B,children:typeof i=="string"&&!d?Ke.jsx(Su,{color:"textSecondary",children:i}):Ke.jsxs(ze.Fragment,{children:[b==="start"?F2e||(F2e=Ke.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):null,i]})})})});function Agt(t){return Al("MuiInputLabel",t)}Ml("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const Cgt=t=>{const{classes:e,formControl:r,size:n,shrink:i,disableAnimation:a,variant:o,required:s}=t,d={root:["root",r&&"formControl",!a&&"animated",i&&"shrink",n&&n!=="medium"&&`size${ys(n)}`,o],asterisk:[s&&"asterisk"]},b=Cs(d,Agt,e);return{...e,...b}},Mgt=fa(z8,{shouldForwardProp:t=>mx(t)||t==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[{[`& .${Wz.asterisk}`]:e.asterisk},e.root,r.formControl&&e.formControl,r.size==="small"&&e.sizeSmall,r.shrink&&e.shrink,!r.disableAnimation&&e.animated,r.focused&&e.focused,e[r.variant]]}})(yu(({theme:t})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:e})=>e.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:e})=>e.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:e})=>!e.disableAnimation,style:{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:e,ownerState:r})=>e==="filled"&&r.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:e,ownerState:r,size:n})=>e==="filled"&&r.shrink&&n==="small",style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:e,ownerState:r})=>e==="outlined"&&r.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),jL=ze.forwardRef(function(e,r){const n=Uu({name:"MuiInputLabel",props:e}),{disableAnimation:i=!1,margin:a,shrink:o,variant:s,className:d,...b}=n,L=W2();let B=o;typeof B>"u"&&L&&(B=L.filled||L.focused||L.adornedStart);const V=v4({props:n,muiFormControl:L,states:["size","variant","required","focused"]}),X={...n,disableAnimation:i,formControl:L,shrink:B,size:V.size,variant:V.variant,required:V.required,focused:V.focused},ie=Cgt(X);return Ke.jsx(Mgt,{"data-shrink":B,ref:r,className:Vo(ie.root,d),...b,ownerState:X,classes:ie})});function Rgt(t){return Al("MuiLinearProgress",t)}Ml("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","bar1","bar2","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);const The=4,Ehe=cA`
  0% {
    left: -35%;
    right: 100%;
  }

  60% {
    left: 100%;
    right: -90%;
  }

  100% {
    left: 100%;
    right: -90%;
  }
`,kgt=typeof Ehe!="string"?f4`
        animation: ${Ehe} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
      `:null,Ahe=cA`
  0% {
    left: -200%;
    right: 100%;
  }

  60% {
    left: 107%;
    right: -8%;
  }

  100% {
    left: 107%;
    right: -8%;
  }
`,Igt=typeof Ahe!="string"?f4`
        animation: ${Ahe} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;
      `:null,Che=cA`
  0% {
    opacity: 1;
    background-position: 0 -23px;
  }

  60% {
    opacity: 0;
    background-position: 0 -23px;
  }

  100% {
    opacity: 1;
    background-position: -200px -23px;
  }
`,Pgt=typeof Che!="string"?f4`
        animation: ${Che} 3s infinite linear;
      `:null,Dgt=t=>{const{classes:e,variant:r,color:n}=t,i={root:["root",`color${ys(n)}`,r],dashed:["dashed",`dashedColor${ys(n)}`],bar1:["bar","bar1",`barColor${ys(n)}`,(r==="indeterminate"||r==="query")&&"bar1Indeterminate",r==="determinate"&&"bar1Determinate",r==="buffer"&&"bar1Buffer"],bar2:["bar","bar2",r!=="buffer"&&`barColor${ys(n)}`,r==="buffer"&&`color${ys(n)}`,(r==="indeterminate"||r==="query")&&"bar2Indeterminate",r==="buffer"&&"bar2Buffer"]};return Cs(i,Rgt,e)},yme=(t,e)=>t.vars?t.vars.palette.LinearProgress[`${e}Bg`]:t.palette.mode==="light"?t.lighten(t.palette[e].main,.62):t.darken(t.palette[e].main,.5),Lgt=fa("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[`color${ys(r.color)}`],e[r.variant]]}})(yu(({theme:t})=>({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},variants:[...Object.entries(t.palette).filter(Yv()).map(([e])=>({props:{color:e},style:{backgroundColor:yme(t,e)}})),{props:({ownerState:e})=>e.color==="inherit"&&e.variant!=="buffer",style:{"&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}}},{props:{variant:"buffer"},style:{backgroundColor:"transparent"}},{props:{variant:"query"},style:{transform:"rotate(180deg)"}}]}))),Ogt=fa("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.dashed,e[`dashedColor${ys(r.color)}`]]}})(yu(({theme:t})=>({position:"absolute",marginTop:0,height:"100%",width:"100%",backgroundSize:"10px 10px",backgroundPosition:"0 -23px",variants:[{props:{color:"inherit"},style:{opacity:.3,backgroundImage:"radial-gradient(currentColor 0%, currentColor 16%, transparent 42%)"}},...Object.entries(t.palette).filter(Yv()).map(([e])=>{const r=yme(t,e);return{props:{color:e},style:{backgroundImage:`radial-gradient(${r} 0%, ${r} 16%, transparent 42%)`}}})]})),Pgt||{animation:`${Che} 3s infinite linear`}),Ngt=fa("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.bar,e.bar1,e[`barColor${ys(r.color)}`],(r.variant==="indeterminate"||r.variant==="query")&&e.bar1Indeterminate,r.variant==="determinate"&&e.bar1Determinate,r.variant==="buffer"&&e.bar1Buffer]}})(yu(({theme:t})=>({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[{props:{color:"inherit"},style:{backgroundColor:"currentColor"}},...Object.entries(t.palette).filter(Yv()).map(([e])=>({props:{color:e},style:{backgroundColor:(t.vars||t).palette[e].main}})),{props:{variant:"determinate"},style:{transition:`transform .${The}s linear`}},{props:{variant:"buffer"},style:{zIndex:1,transition:`transform .${The}s linear`}},{props:({ownerState:e})=>e.variant==="indeterminate"||e.variant==="query",style:{width:"auto"}},{props:({ownerState:e})=>e.variant==="indeterminate"||e.variant==="query",style:kgt||{animation:`${Ehe} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`}}]}))),Fgt=fa("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.bar,e.bar2,e[`barColor${ys(r.color)}`],(r.variant==="indeterminate"||r.variant==="query")&&e.bar2Indeterminate,r.variant==="buffer"&&e.bar2Buffer]}})(yu(({theme:t})=>({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[...Object.entries(t.palette).filter(Yv()).map(([e])=>({props:{color:e},style:{"--LinearProgressBar2-barColor":(t.vars||t).palette[e].main}})),{props:({ownerState:e})=>e.variant!=="buffer"&&e.color!=="inherit",style:{backgroundColor:"var(--LinearProgressBar2-barColor, currentColor)"}},{props:({ownerState:e})=>e.variant!=="buffer"&&e.color==="inherit",style:{backgroundColor:"currentColor"}},{props:{color:"inherit"},style:{opacity:.3}},...Object.entries(t.palette).filter(Yv()).map(([e])=>({props:{color:e,variant:"buffer"},style:{backgroundColor:yme(t,e),transition:`transform .${The}s linear`}})),{props:({ownerState:e})=>e.variant==="indeterminate"||e.variant==="query",style:{width:"auto"}},{props:({ownerState:e})=>e.variant==="indeterminate"||e.variant==="query",style:Igt||{animation:`${Ahe} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`}}]}))),zgt=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiLinearProgress"}),{className:i,color:a="primary",value:o,valueBuffer:s,variant:d="indeterminate",...b}=n,L={...n,color:a,variant:d},B=Dgt(L),V=Kv(),X={},ie={bar1:{},bar2:{}};if((d==="determinate"||d==="buffer")&&o!==void 0){X["aria-valuenow"]=Math.round(o),X["aria-valuemin"]=0,X["aria-valuemax"]=100;let de=o-100;V&&(de=-de),ie.bar1.transform=`translateX(${de}%)`}if(d==="buffer"&&s!==void 0){let de=(s||0)-100;V&&(de=-de),ie.bar2.transform=`translateX(${de}%)`}return Ke.jsxs(Lgt,{className:Vo(B.root,i),ownerState:L,role:"progressbar",...X,ref:r,...b,children:[d==="buffer"?Ke.jsx(Ogt,{className:B.dashed,ownerState:L}):null,Ke.jsx(Ngt,{className:B.bar1,ownerState:L,style:ie.bar1}),d==="determinate"?null:Ke.jsx(Fgt,{className:B.bar2,ownerState:L,style:ie.bar2})]})});function Bgt(t){return Al("MuiLink",t)}const Ugt=Ml("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),Hgt=({theme:t,ownerState:e})=>{const r=e.color;if("colorSpace"in t&&t.colorSpace){const a=g5(t,`palette.${r}.main`)||g5(t,`palette.${r}`)||e.color;return t.alpha(a,.4)}const n=g5(t,`palette.${r}.main`,!1)||g5(t,`palette.${r}`,!1)||e.color,i=g5(t,`palette.${r}.mainChannel`)||g5(t,`palette.${r}Channel`);return"vars"in t&&i?`rgba(${i} / 0.4)`:Jx(n,.4)},z2e={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},jgt=t=>{const{classes:e,component:r,focusVisible:n,underline:i}=t,a={root:["root",`underline${ys(i)}`,r==="button"&&"button",n&&"focusVisible"]};return Cs(a,Bgt,e)},Vgt=fa(Su,{name:"MuiLink",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[`underline${ys(r.underline)}`],r.component==="button"&&e.button]}})(yu(({theme:t})=>({variants:[{props:{underline:"none"},style:{textDecoration:"none"}},{props:{underline:"hover"},style:{textDecoration:"none","&:hover":{textDecoration:"underline"}}},{props:{underline:"always"},style:{textDecoration:"underline","&:hover":{textDecorationColor:"inherit"}}},{props:({underline:e,ownerState:r})=>e==="always"&&r.color!=="inherit",style:{textDecorationColor:"var(--Link-underlineColor)"}},{props:({underline:e,ownerState:r})=>e==="always"&&r.color==="inherit",style:t.colorSpace?{textDecorationColor:t.alpha("currentColor",.4)}:null},...Object.entries(t.palette).filter(Yv()).map(([e])=>({props:{underline:"always",color:e},style:{"--Link-underlineColor":t.alpha((t.vars||t).palette[e].main,.4)}})),{props:{underline:"always",color:"textPrimary"},style:{"--Link-underlineColor":t.alpha((t.vars||t).palette.text.primary,.4)}},{props:{underline:"always",color:"textSecondary"},style:{"--Link-underlineColor":t.alpha((t.vars||t).palette.text.secondary,.4)}},{props:{underline:"always",color:"textDisabled"},style:{"--Link-underlineColor":(t.vars||t).palette.text.disabled}},{props:{component:"button"},style:{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Ugt.focusVisible}`]:{outline:"auto"}}}]}))),B2e=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiLink"}),i=cy(),{className:a,color:o="primary",component:s="a",onBlur:d,onFocus:b,TypographyClasses:L,underline:B="always",variant:V="inherit",sx:X,...ie}=n,[de,ae]=ze.useState(!1),U=Me=>{ZP(Me.target)||ae(!1),d&&d(Me)},ve=Me=>{ZP(Me.target)&&ae(!0),b&&b(Me)},Se={...n,color:o,component:s,focusVisible:de,underline:B,variant:V},Pe=jgt(Se);return Ke.jsx(Vgt,{color:o,className:Vo(Pe.root,a),classes:L,component:s,onBlur:U,onFocus:ve,ref:r,ownerState:Se,variant:V,...ie,sx:[...z2e[o]===void 0?[{color:o}]:[],...Array.isArray(X)?X:[X]],style:{...ie.style,...B==="always"&&o!=="inherit"&&!z2e[o]&&{"--Link-underlineColor":Hgt({theme:i,ownerState:Se})}}})}),Z3=ze.createContext({});function qgt(t){return Al("MuiList",t)}Ml("MuiList",["root","padding","dense","subheader"]);const Ggt=t=>{const{classes:e,disablePadding:r,dense:n,subheader:i}=t;return Cs({root:["root",!r&&"padding",n&&"dense",i&&"subheader"]},qgt,e)},$gt=fa("ul",{name:"MuiList",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,!r.disablePadding&&e.padding,r.dense&&e.dense,r.subheader&&e.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:t})=>!t.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:t})=>t.subheader,style:{paddingTop:0}}]}),B8=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiList"}),{children:i,className:a,component:o="ul",dense:s=!1,disablePadding:d=!1,subheader:b,...L}=n,B=ze.useMemo(()=>({dense:s}),[s]),V={...n,component:o,dense:s,disablePadding:d},X=Ggt(V);return Ke.jsx(Z3.Provider,{value:B,children:Ke.jsxs($gt,{as:o,className:Vo(X.root,a),ref:r,ownerState:V,...L,children:[b,i]})})});function Wgt(t){return Al("MuiListItem",t)}Ml("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);function Ygt(t){return Al("MuiListItemButton",t)}const pN=Ml("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),Xgt=(t,e)=>{const{ownerState:r}=t;return[e.root,r.dense&&e.dense,r.alignItems==="flex-start"&&e.alignItemsFlexStart,r.divider&&e.divider,!r.disableGutters&&e.gutters]},Zgt=t=>{const{alignItems:e,classes:r,dense:n,disabled:i,disableGutters:a,divider:o,selected:s}=t,b=Cs({root:["root",n&&"dense",!a&&"gutters",o&&"divider",i&&"disabled",e==="flex-start"&&"alignItemsFlexStart",s&&"selected"]},Ygt,r);return{...r,...b}},Kgt=fa(ZS,{shouldForwardProp:t=>mx(t)||t==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:Xgt})(yu(({theme:t})=>({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${pN.selected}`]:{backgroundColor:t.alpha((t.vars||t).palette.primary.main,(t.vars||t).palette.action.selectedOpacity),[`&.${pN.focusVisible}`]:{backgroundColor:t.alpha((t.vars||t).palette.primary.main,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.focusOpacity}`)}},[`&.${pN.selected}:hover`]:{backgroundColor:t.alpha((t.vars||t).palette.primary.main,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:t.alpha((t.vars||t).palette.primary.main,(t.vars||t).palette.action.selectedOpacity)}},[`&.${pN.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${pN.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},variants:[{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.dense,style:{paddingTop:4,paddingBottom:4}}]}))),DP=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiListItemButton"}),{alignItems:i="center",autoFocus:a=!1,component:o="div",children:s,dense:d=!1,disableGutters:b=!1,divider:L=!1,focusVisibleClassName:B,selected:V=!1,className:X,...ie}=n,de=ze.useContext(Z3),ae=ze.useMemo(()=>({dense:d||de.dense||!1,alignItems:i,disableGutters:b}),[i,de.dense,d,b]),U=ze.useRef(null);Ah(()=>{a&&U.current&&U.current.focus()},[a]);const ve={...n,alignItems:i,dense:ae.dense,disableGutters:b,divider:L,selected:V},Se=Zgt(ve),Pe=id(U,r);return Ke.jsx(Z3.Provider,{value:ae,children:Ke.jsx(Kgt,{ref:Pe,href:ie.href||ie.to,component:(ie.href||ie.to)&&o==="div"?"button":o,focusVisibleClassName:Vo(Se.focusVisible,B),ownerState:ve,className:Vo(Se.root,X),...ie,classes:Se,children:s})})});function Jgt(t){return Al("MuiListItemSecondaryAction",t)}Ml("MuiListItemSecondaryAction",["root","disableGutters"]);const Qgt=t=>{const{disableGutters:e,classes:r}=t;return Cs({root:["root",e&&"disableGutters"]},Jgt,r)},e0t=fa("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.disableGutters&&e.disableGutters]}})({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)",variants:[{props:({ownerState:t})=>t.disableGutters,style:{right:0}}]}),bme=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiListItemSecondaryAction"}),{className:i,...a}=n,o=ze.useContext(Z3),s={...n,disableGutters:o.disableGutters},d=Qgt(s);return Ke.jsx(e0t,{className:Vo(d.root,i),ownerState:s,ref:r,...a})});bme.muiName="ListItemSecondaryAction";const t0t=(t,e)=>{const{ownerState:r}=t;return[e.root,r.dense&&e.dense,r.alignItems==="flex-start"&&e.alignItemsFlexStart,r.divider&&e.divider,!r.disableGutters&&e.gutters,!r.disablePadding&&e.padding,r.hasSecondaryAction&&e.secondaryAction]},r0t=t=>{const{alignItems:e,classes:r,dense:n,disableGutters:i,disablePadding:a,divider:o,hasSecondaryAction:s}=t;return Cs({root:["root",n&&"dense",!i&&"gutters",!a&&"padding",o&&"divider",e==="flex-start"&&"alignItemsFlexStart",s&&"secondaryAction"],container:["container"]},Wgt,r)},n0t=fa("div",{name:"MuiListItem",slot:"Root",overridesResolver:t0t})(yu(({theme:t})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>!e.disablePadding&&e.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:e})=>!e.disablePadding&&!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>!e.disablePadding&&!!e.secondaryAction,style:{paddingRight:48}},{props:({ownerState:e})=>!!e.secondaryAction,style:{[`& > .${pN.root}`]:{paddingRight:48}}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>e.button,style:{transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}}},{props:({ownerState:e})=>e.hasSecondaryAction,style:{paddingRight:48}}]}))),i0t=fa("li",{name:"MuiListItem",slot:"Container"})({position:"relative"}),xk=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiListItem"}),{alignItems:i="center",children:a,className:o,component:s,components:d={},componentsProps:b={},ContainerComponent:L="li",ContainerProps:{className:B,...V}={},dense:X=!1,disableGutters:ie=!1,disablePadding:de=!1,divider:ae=!1,secondaryAction:U,slotProps:ve={},slots:Se={},...Pe}=n,Me=ze.useContext(Z3),Ie=ze.useMemo(()=>({dense:X||Me.dense||!1,alignItems:i,disableGutters:ie}),[i,Me.dense,X,ie]),Ve=ze.useRef(null),Ze=ze.Children.toArray(a),Je=Ze.length&&LN(Ze[Ze.length-1],["ListItemSecondaryAction"]),nt={...n,alignItems:i,dense:Ie.dense,disableGutters:ie,disablePadding:de,divider:ae,hasSecondaryAction:Je},ut=r0t(nt),ht=id(Ve,r),_t=Se.root||d.Root||n0t,Dt=ve.root||b.root||{},qt={className:Vo(ut.root,Dt.className,o),...Pe};let Lt=s||"li";return Je?(Lt=!qt.component&&!s?"div":Lt,L==="li"&&(Lt==="li"?Lt="div":qt.component==="li"&&(qt.component="div")),Ke.jsx(Z3.Provider,{value:Ie,children:Ke.jsxs(i0t,{as:L,className:Vo(ut.container,B),ref:ht,ownerState:nt,...V,children:[Ke.jsx(_t,{...Dt,...!P5(_t)&&{as:Lt,ownerState:{...nt,...Dt.ownerState}},...qt,children:Ze}),Ze.pop()]})})):Ke.jsx(Z3.Provider,{value:Ie,children:Ke.jsxs(_t,{...Dt,as:Lt,ref:ht,...!P5(_t)&&{ownerState:{...nt,...Dt.ownerState}},...qt,children:[Ze,U&&Ke.jsx(bme,{children:U})]})})});function a0t(t){return Al("MuiListItemAvatar",t)}Ml("MuiListItemAvatar",["root","alignItemsFlexStart"]);const o0t=t=>{const{alignItems:e,classes:r}=t;return Cs({root:["root",e==="flex-start"&&"alignItemsFlexStart"]},a0t,r)},s0t=fa("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.alignItems==="flex-start"&&e.alignItemsFlexStart]}})({minWidth:56,flexShrink:0,variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}),l0t=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiListItemAvatar"}),{className:i,...a}=n,o=ze.useContext(Z3),s={...n,alignItems:o.alignItems},d=o0t(s);return Ke.jsx(s0t,{className:Vo(d.root,i),ownerState:s,ref:r,...a})});function u0t(t){return Al("MuiListItemIcon",t)}const U2e=Ml("MuiListItemIcon",["root","alignItemsFlexStart"]),c0t=t=>{const{alignItems:e,classes:r}=t;return Cs({root:["root",e==="flex-start"&&"alignItemsFlexStart"]},u0t,r)},f0t=fa("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.alignItems==="flex-start"&&e.alignItemsFlexStart]}})(yu(({theme:t})=>({minWidth:56,color:(t.vars||t).palette.action.active,flexShrink:0,display:"inline-flex",variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}))),jS=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiListItemIcon"}),{className:i,...a}=n,o=ze.useContext(Z3),s={...n,alignItems:o.alignItems},d=c0t(s);return Ke.jsx(f0t,{className:Vo(d.root,i),ownerState:s,ref:r,...a})});function d0t(t){return Al("MuiListItemText",t)}const ZD=Ml("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),h0t=t=>{const{classes:e,inset:r,primary:n,secondary:i,dense:a}=t;return Cs({root:["root",r&&"inset",a&&"dense",n&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},d0t,e)},p0t=fa("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[{[`& .${ZD.primary}`]:e.primary},{[`& .${ZD.secondary}`]:e.secondary},e.root,r.inset&&e.inset,r.primary&&r.secondary&&e.multiline,r.dense&&e.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${ZG.root}:where(& .${ZD.primary})`]:{display:"block"},[`.${ZG.root}:where(& .${ZD.secondary})`]:{display:"block"},variants:[{props:({ownerState:t})=>t.primary&&t.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:t})=>t.inset,style:{paddingLeft:56}}]}),Uw=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiListItemText"}),{children:i,className:a,disableTypography:o=!1,inset:s=!1,primary:d,primaryTypographyProps:b,secondary:L,secondaryTypographyProps:B,slots:V={},slotProps:X={},...ie}=n,{dense:de}=ze.useContext(Z3);let ae=d??i,U=L;const ve={...n,disableTypography:o,inset:s,primary:!!ae,secondary:!!U,dense:de},Se=h0t(ve),Pe={slots:V,slotProps:{primary:b,secondary:B,...X}},[Me,Ie]=Nu("root",{className:Vo(Se.root,a),elementType:p0t,externalForwardedProps:{...Pe,...ie},ownerState:ve,ref:r}),[Ve,Ze]=Nu("primary",{className:Se.primary,elementType:Su,externalForwardedProps:Pe,ownerState:ve}),[Je,nt]=Nu("secondary",{className:Se.secondary,elementType:Su,externalForwardedProps:Pe,ownerState:ve});return ae!=null&&ae.type!==Su&&!o&&(ae=Ke.jsx(Ve,{variant:de?"body2":"body1",component:Ze?.variant?void 0:"span",...Ze,children:ae})),U!=null&&U.type!==Su&&!o&&(U=Ke.jsx(Je,{variant:"body2",color:"textSecondary",...nt,children:U})),Ke.jsxs(Me,{...Ie,children:[ae,U]})});function $J(t,e,r){return t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:r?null:t.firstChild}function H2e(t,e,r){return t===e?r?t.firstChild:t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:r?null:t.lastChild}function I9e(t,e){if(e===void 0)return!0;let r=t.innerText;return r===void 0&&(r=t.textContent),r=r.trim().toLowerCase(),r.length===0?!1:e.repeating?r[0]===e.keys[0]:r.startsWith(e.keys.join(""))}function M7(t,e,r,n,i,a){let o=!1,s=i(t,e,e?r:!1);for(;s;){if(s===t.firstChild){if(o)return!1;o=!0}const d=n?!1:s.disabled||s.getAttribute("aria-disabled")==="true";if(!s.hasAttribute("tabindex")||!I9e(s,a)||d)s=i(t,s,r);else return s.focus(),!0}return!1}const EY=ze.forwardRef(function(e,r){const{actions:n,autoFocus:i=!1,autoFocusItem:a=!1,children:o,className:s,disabledItemsFocusable:d=!1,disableListWrap:b=!1,onKeyDown:L,variant:B="selectedMenu",...V}=e,X=ze.useRef(null),ie=ze.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Ah(()=>{i&&X.current.focus()},[i]),ze.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(Se,{direction:Pe})=>{const Me=!X.current.style.width;if(Se.clientHeight<X.current.clientHeight&&Me){const Ie=`${A9e(cE(Se))}px`;X.current.style[Pe==="rtl"?"paddingLeft":"paddingRight"]=Ie,X.current.style.width=`calc(100% + ${Ie})`}return X.current}}),[]);const de=Se=>{const Pe=X.current,Me=Se.key;if(Se.ctrlKey||Se.metaKey||Se.altKey){L&&L(Se);return}const Ve=Lm(Pe).activeElement;if(Me==="ArrowDown")Se.preventDefault(),M7(Pe,Ve,b,d,$J);else if(Me==="ArrowUp")Se.preventDefault(),M7(Pe,Ve,b,d,H2e);else if(Me==="Home")Se.preventDefault(),M7(Pe,null,b,d,$J);else if(Me==="End")Se.preventDefault(),M7(Pe,null,b,d,H2e);else if(Me.length===1){const Ze=ie.current,Je=Me.toLowerCase(),nt=performance.now();Ze.keys.length>0&&(nt-Ze.lastTime>500?(Ze.keys=[],Ze.repeating=!0,Ze.previousKeyMatched=!0):Ze.repeating&&Je!==Ze.keys[0]&&(Ze.repeating=!1)),Ze.lastTime=nt,Ze.keys.push(Je);const ut=Ve&&!Ze.repeating&&I9e(Ve,Ze);Ze.previousKeyMatched&&(ut||M7(Pe,Ve,!1,d,$J,Ze))?Se.preventDefault():Ze.previousKeyMatched=!1}L&&L(Se)},ae=id(X,r);let U=-1;ze.Children.forEach(o,(Se,Pe)=>{if(!ze.isValidElement(Se)){U===Pe&&(U+=1,U>=o.length&&(U=-1));return}Se.props.disabled||(B==="selectedMenu"&&Se.props.selected||U===-1)&&(U=Pe),U===Pe&&(Se.props.disabled||Se.props.muiSkipListHighlight||Se.type.muiSkipListHighlight)&&(U+=1,U>=o.length&&(U=-1))});const ve=ze.Children.map(o,(Se,Pe)=>{if(Pe===U){const Me={};return a&&(Me.autoFocus=!0),Se.props.tabIndex===void 0&&B==="selectedMenu"&&(Me.tabIndex=0),ze.cloneElement(Se,Me)}return Se});return Ke.jsx(B8,{role:"menu",ref:ae,className:s,onKeyDown:de,tabIndex:i?0:-1,...V,children:ve})});function v0t(t){return Al("MuiPopover",t)}Ml("MuiPopover",["root","paper"]);function j2e(t,e){let r=0;return typeof e=="number"?r=e:e==="center"?r=t.height/2:e==="bottom"&&(r=t.height),r}function V2e(t,e){let r=0;return typeof e=="number"?r=e:e==="center"?r=t.width/2:e==="right"&&(r=t.width),r}function q2e(t){return[t.horizontal,t.vertical].map(e=>typeof e=="number"?`${e}px`:e).join(" ")}function nj(t){return typeof t=="function"?t():t}const m0t=t=>{const{classes:e}=t;return Cs({root:["root"],paper:["paper"]},v0t,e)},g0t=fa(gme,{name:"MuiPopover",slot:"Root"})({}),P9e=fa(Gy,{name:"MuiPopover",slot:"Paper"})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),y0t=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiPopover"}),{action:i,anchorEl:a,anchorOrigin:o={vertical:"top",horizontal:"left"},anchorPosition:s,anchorReference:d="anchorEl",children:b,className:L,container:B,elevation:V=8,marginThreshold:X=16,open:ie,PaperProps:de={},slots:ae={},slotProps:U={},transformOrigin:ve={vertical:"top",horizontal:"left"},TransitionComponent:Se,transitionDuration:Pe="auto",TransitionProps:Me={},disableScrollLock:Ie=!1,...Ve}=n,Ze=ze.useRef(),Je={...n,anchorOrigin:o,anchorReference:d,elevation:V,marginThreshold:X,transformOrigin:ve,TransitionComponent:Se,transitionDuration:Pe,TransitionProps:Me},nt=m0t(Je),ut=ze.useCallback(()=>{if(d==="anchorPosition")return s;const Jn=nj(a),jn=(Jn&&Jn.nodeType===1?Jn:Lm(Ze.current).body).getBoundingClientRect();return{top:jn.top+j2e(jn,o.vertical),left:jn.left+V2e(jn,o.horizontal)}},[a,o.horizontal,o.vertical,s,d]),ht=ze.useCallback(Jn=>({vertical:j2e(Jn,ve.vertical),horizontal:V2e(Jn,ve.horizontal)}),[ve.horizontal,ve.vertical]),_t=ze.useCallback(Jn=>{const Vn={width:Jn.offsetWidth,height:Jn.offsetHeight},jn=ht(Vn);if(d==="none")return{top:null,left:null,transformOrigin:q2e(jn)};const Lr=ut();let Yn=Lr.top-jn.vertical,On=Lr.left-jn.horizontal;const Sn=Yn+Vn.height,bn=On+Vn.width,Mn=cE(nj(a)),gi=Mn.innerHeight-X,Oi=Mn.innerWidth-X;if(X!==null&&Yn<X){const Pa=Yn-X;Yn-=Pa,jn.vertical+=Pa}else if(X!==null&&Sn>gi){const Pa=Sn-gi;Yn-=Pa,jn.vertical+=Pa}if(X!==null&&On<X){const Pa=On-X;On-=Pa,jn.horizontal+=Pa}else if(bn>Oi){const Pa=bn-Oi;On-=Pa,jn.horizontal+=Pa}return{top:`${Math.round(Yn)}px`,left:`${Math.round(On)}px`,transformOrigin:q2e(jn)}},[a,d,ut,ht,X]),[Dt,qt]=ze.useState(ie),Lt=ze.useCallback(()=>{const Jn=Ze.current;if(!Jn)return;const Vn=_t(Jn);Vn.top!==null&&Jn.style.setProperty("top",Vn.top),Vn.left!==null&&(Jn.style.left=Vn.left),Jn.style.transformOrigin=Vn.transformOrigin,qt(!0)},[_t]);ze.useEffect(()=>(Ie&&window.addEventListener("scroll",Lt),()=>window.removeEventListener("scroll",Lt)),[a,Ie,Lt]);const dr=()=>{Lt()},Zt=()=>{qt(!1)};ze.useEffect(()=>{ie&&Lt()}),ze.useImperativeHandle(i,()=>ie?{updatePosition:()=>{Lt()}}:null,[ie,Lt]),ze.useEffect(()=>{if(!ie)return;const Jn=d4(()=>{Lt()}),Vn=cE(nj(a));return Vn.addEventListener("resize",Jn),()=>{Jn.clear(),Vn.removeEventListener("resize",Jn)}},[a,ie,Lt]);let Cr=Pe;const yt={slots:{transition:Se,...ae},slotProps:{transition:Me,paper:de,...U}},[Vt,Er]=Nu("transition",{elementType:yL,externalForwardedProps:yt,ownerState:Je,getSlotProps:Jn=>({...Jn,onEntering:(Vn,jn)=>{Jn.onEntering?.(Vn,jn),dr()},onExited:Vn=>{Jn.onExited?.(Vn),Zt()}}),additionalProps:{appear:!0,in:ie}});Pe==="auto"&&!Vt.muiSupportAuto&&(Cr=void 0);const sr=B||(a?Lm(nj(a)).body:void 0),[or,{slots:Ar,slotProps:Ir,..._n}]=Nu("root",{ref:r,elementType:g0t,externalForwardedProps:{...yt,...Ve},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:ae.backdrop},slotProps:{backdrop:tme(typeof U.backdrop=="function"?U.backdrop(Je):U.backdrop,{invisible:!0})},container:sr,open:ie},ownerState:Je,className:Vo(nt.root,L)}),[Un,Qn]=Nu("paper",{ref:Ze,className:nt.paper,elementType:P9e,externalForwardedProps:yt,shouldForwardComponentProp:!0,additionalProps:{elevation:V,style:Dt?void 0:{opacity:0}},ownerState:Je});return Ke.jsx(or,{..._n,...!P5(or)&&{slots:Ar,slotProps:Ir,disableScrollLock:Ie},children:Ke.jsx(Vt,{...Er,timeout:Cr,children:Ke.jsx(Un,{...Qn,children:b})})})});function b0t(t){return Al("MuiMenu",t)}Ml("MuiMenu",["root","paper","list"]);const x0t={vertical:"top",horizontal:"right"},_0t={vertical:"top",horizontal:"left"},w0t=t=>{const{classes:e}=t;return Cs({root:["root"],paper:["paper"],list:["list"]},b0t,e)},S0t=fa(y0t,{shouldForwardProp:t=>mx(t)||t==="classes",name:"MuiMenu",slot:"Root"})({}),T0t=fa(P9e,{name:"MuiMenu",slot:"Paper"})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),E0t=fa(EY,{name:"MuiMenu",slot:"List"})({outline:0}),xme=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiMenu"}),{autoFocus:i=!0,children:a,className:o,disableAutoFocusItem:s=!1,MenuListProps:d={},onClose:b,open:L,PaperProps:B={},PopoverClasses:V,transitionDuration:X="auto",TransitionProps:{onEntering:ie,...de}={},variant:ae="selectedMenu",slots:U={},slotProps:ve={},...Se}=n,Pe=Kv(),Me={...n,autoFocus:i,disableAutoFocusItem:s,MenuListProps:d,onEntering:ie,PaperProps:B,transitionDuration:X,TransitionProps:de,variant:ae},Ie=w0t(Me),Ve=i&&!s&&L,Ze=ze.useRef(null),Je=(Cr,yt)=>{Ze.current&&Ze.current.adjustStyleForScrollbar(Cr,{direction:Pe?"rtl":"ltr"}),ie&&ie(Cr,yt)},nt=Cr=>{Cr.key==="Tab"&&(Cr.preventDefault(),b&&b(Cr,"tabKeyDown"))};let ut=-1;ze.Children.map(a,(Cr,yt)=>{ze.isValidElement(Cr)&&(Cr.props.disabled||(ae==="selectedMenu"&&Cr.props.selected||ut===-1)&&(ut=yt))});const ht={slots:U,slotProps:{list:d,transition:de,paper:B,...ve}},_t=Kd({elementType:U.root,externalSlotProps:ve.root,ownerState:Me,className:[Ie.root,o]}),[Dt,qt]=Nu("paper",{className:Ie.paper,elementType:T0t,externalForwardedProps:ht,shouldForwardComponentProp:!0,ownerState:Me}),[Lt,dr]=Nu("list",{className:Vo(Ie.list,d.className),elementType:E0t,shouldForwardComponentProp:!0,externalForwardedProps:ht,getSlotProps:Cr=>({...Cr,onKeyDown:yt=>{nt(yt),Cr.onKeyDown?.(yt)}}),ownerState:Me}),Zt=typeof ht.slotProps.transition=="function"?ht.slotProps.transition(Me):ht.slotProps.transition;return Ke.jsx(S0t,{onClose:b,anchorOrigin:{vertical:"bottom",horizontal:Pe?"right":"left"},transformOrigin:Pe?x0t:_0t,slots:{root:U.root,paper:Dt,backdrop:U.backdrop,...U.transition&&{transition:U.transition}},slotProps:{root:_t,paper:qt,backdrop:typeof ve.backdrop=="function"?ve.backdrop(Me):ve.backdrop,transition:{...Zt,onEntering:(...Cr)=>{Je(...Cr),Zt?.onEntering?.(...Cr)}}},open:L,ref:r,transitionDuration:X,ownerState:Me,...Se,classes:V,children:Ke.jsx(Lt,{actions:Ze,autoFocus:i&&(ut===-1||s),autoFocusItem:Ve,variant:ae,...dr,children:a})})});function A0t(t){return Al("MuiMenuItem",t)}const R7=Ml("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),C0t=(t,e)=>{const{ownerState:r}=t;return[e.root,r.dense&&e.dense,r.divider&&e.divider,!r.disableGutters&&e.gutters]},M0t=t=>{const{disabled:e,dense:r,divider:n,disableGutters:i,selected:a,classes:o}=t,d=Cs({root:["root",r&&"dense",e&&"disabled",!i&&"gutters",n&&"divider",a&&"selected"]},A0t,o);return{...o,...d}},R0t=fa(ZS,{shouldForwardProp:t=>mx(t)||t==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:C0t})(yu(({theme:t})=>({...t.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${R7.selected}`]:{backgroundColor:t.alpha((t.vars||t).palette.primary.main,(t.vars||t).palette.action.selectedOpacity),[`&.${R7.focusVisible}`]:{backgroundColor:t.alpha((t.vars||t).palette.primary.main,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.focusOpacity}`)}},[`&.${R7.selected}:hover`]:{backgroundColor:t.alpha((t.vars||t).palette.primary.main,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:t.alpha((t.vars||t).palette.primary.main,(t.vars||t).palette.action.selectedOpacity)}},[`&.${R7.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${R7.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`& + .${L2e.root}`]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},[`& + .${L2e.inset}`]:{marginLeft:52},[`& .${ZD.root}`]:{marginTop:0,marginBottom:0},[`& .${ZD.inset}`]:{paddingLeft:36},[`& .${U2e.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>!e.dense,style:{[t.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...t.typography.body2,[`& .${U2e.root} svg`]:{fontSize:"1.25rem"}}}]}))),Xx=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiMenuItem"}),{autoFocus:i=!1,component:a="li",dense:o=!1,divider:s=!1,disableGutters:d=!1,focusVisibleClassName:b,role:L="menuitem",tabIndex:B,className:V,...X}=n,ie=ze.useContext(Z3),de=ze.useMemo(()=>({dense:o||ie.dense||!1,disableGutters:d}),[ie.dense,o,d]),ae=ze.useRef(null);Ah(()=>{i&&ae.current&&ae.current.focus()},[i]);const U={...n,dense:de.dense,divider:s,disableGutters:d},ve=M0t(n),Se=id(ae,r);let Pe;return n.disabled||(Pe=B!==void 0?B:-1),Ke.jsx(Z3.Provider,{value:de,children:Ke.jsx(R0t,{ref:Se,role:L,tabIndex:Pe,component:a,focusVisibleClassName:Vo(ve.focusVisible,b),className:Vo(ve.root,V),...X,ownerState:U,classes:ve})})});function k0t(t){return Al("MuiNativeSelect",t)}const _me=Ml("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),I0t=t=>{const{classes:e,variant:r,disabled:n,multiple:i,open:a,error:o}=t,s={select:["select",r,n&&"disabled",i&&"multiple",o&&"error"],icon:["icon",`icon${ys(r)}`,a&&"iconOpen",n&&"disabled"]};return Cs(s,k0t,e)},D9e=fa("select",{name:"MuiNativeSelect"})(({theme:t})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${_me.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(t.vars||t).palette.background.paper},variants:[{props:({ownerState:e})=>e.variant!=="filled"&&e.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(t.vars||t).shape.borderRadius,"&:focus":{borderRadius:(t.vars||t).shape.borderRadius},"&&&":{paddingRight:32}}}]})),P0t=fa(D9e,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:mx,overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.select,e[r.variant],r.error&&e.error,{[`&.${_me.multiple}`]:e.multiple}]}})({}),L9e=fa("svg",{name:"MuiNativeSelect"})(({theme:t})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${_me.disabled}`]:{color:(t.vars||t).palette.action.disabled},variants:[{props:({ownerState:e})=>e.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),D0t=fa(L9e,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.icon,r.variant&&e[`icon${ys(r.variant)}`],r.open&&e.iconOpen]}})({}),L0t=ze.forwardRef(function(e,r){const{className:n,disabled:i,error:a,IconComponent:o,inputRef:s,variant:d="standard",...b}=e,L={...e,disabled:i,variant:d,error:a},B=I0t(L);return Ke.jsxs(ze.Fragment,{children:[Ke.jsx(P0t,{ownerState:L,className:Vo(B.select,n),disabled:i,ref:s||r,...b}),e.multiple?null:Ke.jsx(D0t,{as:o,ownerState:L,className:B.icon})]})});var G2e;const O0t=fa("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:mx})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),N0t=fa("legend",{name:"MuiNotchedOutlined",shouldForwardProp:mx})(yu(({theme:t})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:e})=>!e.withLabel,style:{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})}},{props:({ownerState:e})=>e.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:e})=>e.withLabel&&e.notched,style:{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})}}]})));function F0t(t){const{children:e,classes:r,className:n,label:i,notched:a,...o}=t,s=i!=null&&i!=="",d={...t,notched:a,withLabel:s};return Ke.jsx(O0t,{"aria-hidden":!0,className:n,ownerState:d,...o,children:Ke.jsx(N0t,{ownerState:d,children:s?Ke.jsx("span",{children:i}):G2e||(G2e=Ke.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"}))})})}const z0t=t=>{const{classes:e}=t,n=Cs({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Rpt,e);return{...e,...n}},B0t=fa(xY,{shouldForwardProp:t=>mx(t)||t==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:yY})(yu(({theme:t})=>{const e=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(t.vars||t).shape.borderRadius,[`&:hover .${k3.notchedOutline}`]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{[`&:hover .${k3.notchedOutline}`]:{borderColor:t.vars?t.alpha(t.vars.palette.common.onBackground,.23):e}},[`&.${k3.focused} .${k3.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(t.palette).filter(Yv()).map(([r])=>({props:{color:r},style:{[`&.${k3.focused} .${k3.notchedOutline}`]:{borderColor:(t.vars||t).palette[r].main}}})),{props:{},style:{[`&.${k3.error} .${k3.notchedOutline}`]:{borderColor:(t.vars||t).palette.error.main},[`&.${k3.disabled} .${k3.notchedOutline}`]:{borderColor:(t.vars||t).palette.action.disabled}}},{props:({ownerState:r})=>r.startAdornment,style:{paddingLeft:14}},{props:({ownerState:r})=>r.endAdornment,style:{paddingRight:14}},{props:({ownerState:r})=>r.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:r,size:n})=>r.multiline&&n==="small",style:{padding:"8.5px 14px"}}]}})),U0t=fa(F0t,{name:"MuiOutlinedInput",slot:"NotchedOutline"})(yu(({theme:t})=>{const e=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:t.vars?t.alpha(t.vars.palette.common.onBackground,.23):e}})),H0t=fa(_Y,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:bY})(yu(({theme:t})=>({padding:"16.5px 14px",...!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},...t.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:e})=>e.multiline,style:{padding:0}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}}]}))),AY=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiOutlinedInput"}),{components:i={},fullWidth:a=!1,inputComponent:o="input",label:s,multiline:d=!1,notched:b,slots:L={},slotProps:B={},type:V="text",...X}=n,ie=z0t(n),de=W2(),ae=v4({props:n,muiFormControl:de,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),U={...n,color:ae.color||"primary",disabled:ae.disabled,error:ae.error,focused:ae.focused,formControl:de,fullWidth:a,hiddenLabel:ae.hiddenLabel,multiline:d,size:ae.size,type:V},ve=L.root??i.Root??B0t,Se=L.input??i.Input??H0t,[Pe,Me]=Nu("notchedOutline",{elementType:U0t,className:ie.notchedOutline,shouldForwardComponentProp:!0,ownerState:U,externalForwardedProps:{slots:L,slotProps:B},additionalProps:{label:s!=null&&s!==""&&ae.required?Ke.jsxs(ze.Fragment,{children:[s," ","*"]}):s}});return Ke.jsx(IB,{slots:{root:ve,input:Se},slotProps:B,renderSuffix:Ie=>Ke.jsx(Pe,{...Me,notched:typeof b<"u"?b:!!(Ie.startAdornment||Ie.filled||Ie.focused)}),fullWidth:a,inputComponent:o,multiline:d,ref:r,type:V,...X,classes:{...ie,notchedOutline:null}})});AY.muiName="Input";const j0t=Hu(Ke.jsx("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"})),V0t=Hu(Ke.jsx("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"})),q0t=Hu(Ke.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),G0t=Hu(Ke.jsx("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"})),$0t=fa("span",{name:"MuiRadioButtonIcon",shouldForwardProp:mx})({position:"relative",display:"flex"}),W0t=fa(q0t,{name:"MuiRadioButtonIcon"})({transform:"scale(1)"}),Y0t=fa(G0t,{name:"MuiRadioButtonIcon"})(yu(({theme:t})=>({left:0,position:"absolute",transform:"scale(0)",transition:t.transitions.create("transform",{easing:t.transitions.easing.easeIn,duration:t.transitions.duration.shortest}),variants:[{props:{checked:!0},style:{transform:"scale(1)",transition:t.transitions.create("transform",{easing:t.transitions.easing.easeOut,duration:t.transitions.duration.shortest})}}]})));function O9e(t){const{checked:e=!1,classes:r={},fontSize:n}=t,i={...t,checked:e};return Ke.jsxs($0t,{className:r.root,ownerState:i,children:[Ke.jsx(W0t,{fontSize:n,className:r.background,ownerState:i}),Ke.jsx(Y0t,{fontSize:n,className:r.dot,ownerState:i})]})}const N9e=ze.createContext(void 0);function X0t(){return ze.useContext(N9e)}function Z0t(t){return Al("MuiRadio",t)}const $2e=Ml("MuiRadio",["root","checked","disabled","colorPrimary","colorSecondary","sizeSmall"]),K0t=t=>{const{classes:e,color:r,size:n}=t,i={root:["root",`color${ys(r)}`,n!=="medium"&&`size${ys(n)}`]};return{...e,...Cs(i,Z0t,e)}},J0t=fa(pme,{shouldForwardProp:t=>mx(t)||t==="classes",name:"MuiRadio",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.size!=="medium"&&e[`size${ys(r.size)}`],e[`color${ys(r.color)}`]]}})(yu(({theme:t})=>({color:(t.vars||t).palette.text.secondary,[`&.${$2e.disabled}`]:{color:(t.vars||t).palette.action.disabled},variants:[{props:{color:"default",disabled:!1,disableRipple:!1},style:{"&:hover":{backgroundColor:t.alpha((t.vars||t).palette.action.active,(t.vars||t).palette.action.hoverOpacity)}}},...Object.entries(t.palette).filter(Yv()).map(([e])=>({props:{color:e,disabled:!1,disableRipple:!1},style:{"&:hover":{backgroundColor:t.alpha((t.vars||t).palette[e].main,(t.vars||t).palette.action.hoverOpacity)}}})),...Object.entries(t.palette).filter(Yv()).map(([e])=>({props:{color:e,disabled:!1},style:{[`&.${$2e.checked}`]:{color:(t.vars||t).palette[e].main}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]})));function Q0t(t,e){return typeof e=="object"&&e!==null?t===e:String(t)===String(e)}const eyt=Ke.jsx(O9e,{checked:!0}),tyt=Ke.jsx(O9e,{}),ryt=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiRadio"}),{checked:i,checkedIcon:a=eyt,color:o="primary",icon:s=tyt,name:d,onChange:b,size:L="medium",className:B,disabled:V,disableRipple:X=!1,slots:ie={},slotProps:de={},inputProps:ae,...U}=n,ve=W2();let Se=V;ve&&typeof Se>"u"&&(Se=ve.disabled),Se??=!1;const Pe={...n,disabled:Se,disableRipple:X,color:o,size:L},Me=K0t(Pe),Ie=X0t();let Ve=i;const Ze=she(b,Ie&&Ie.onChange);let Je=d;Ie&&(typeof Ve>"u"&&(Ve=Q0t(Ie.value,n.value)),typeof Je>"u"&&(Je=Ie.name));const nt=de.input??ae,[ut,ht]=Nu("root",{ref:r,elementType:J0t,className:Vo(Me.root,B),shouldForwardComponentProp:!0,externalForwardedProps:{slots:ie,slotProps:de,...U},getSlotProps:_t=>({..._t,onChange:(Dt,...qt)=>{_t.onChange?.(Dt,...qt),Ze(Dt,...qt)}}),ownerState:Pe,additionalProps:{type:"radio",icon:ze.cloneElement(s,{fontSize:s.props.fontSize??L}),checkedIcon:ze.cloneElement(a,{fontSize:a.props.fontSize??L}),disabled:Se,name:Je,checked:Ve,slots:ie,slotProps:{input:typeof nt=="function"?nt(Pe):nt}}});return Ke.jsx(ut,{...ht,classes:Me})});function nyt(t){return Al("MuiRadioGroup",t)}Ml("MuiRadioGroup",["root","row","error"]);const iyt=t=>{const{classes:e,row:r,error:n}=t;return Cs({root:["root",r&&"row",n&&"error"]},nyt,e)},ayt=ze.forwardRef(function(e,r){const{actions:n,children:i,className:a,defaultValue:o,name:s,onChange:d,value:b,...L}=e,B=ze.useRef(null),V=iyt(e),[X,ie]=V_({controlled:b,default:o,name:"RadioGroup"});ze.useImperativeHandle(n,()=>({focus:()=>{let ve=B.current.querySelector("input:not(:disabled):checked");ve||(ve=B.current.querySelector("input:not(:disabled)")),ve&&ve.focus()}}),[]);const de=id(r,B),ae=Vd(s),U=ze.useMemo(()=>({name:ae,onChange(ve){ie(ve.target.value),d&&d(ve,ve.target.value)},value:X}),[ae,d,ie,X]);return Ke.jsx(N9e.Provider,{value:U,children:Ke.jsx(k9e,{role:"radiogroup",ref:de,className:Vo(V.root,a),...L,children:i})})}),F9e={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function z9e(t){return Al("MuiSelect",t)}const k7=Ml("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var W2e;const oyt=fa(D9e,{name:"MuiSelect",slot:"Select",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[{[`&.${k7.select}`]:e.select},{[`&.${k7.select}`]:e[r.variant]},{[`&.${k7.error}`]:e.error},{[`&.${k7.multiple}`]:e.multiple}]}})({[`&.${k7.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),syt=fa(L9e,{name:"MuiSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.icon,r.variant&&e[`icon${ys(r.variant)}`],r.open&&e.iconOpen]}})({}),lyt=fa("input",{shouldForwardProp:t=>hY(t)&&t!=="classes",name:"MuiSelect",slot:"NativeInput"})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function Y2e(t,e){return typeof e=="object"&&e!==null?t===e:String(t)===String(e)}function uyt(t){return t==null||typeof t=="string"&&!t.trim()}const cyt=t=>{const{classes:e,variant:r,disabled:n,multiple:i,open:a,error:o}=t,s={select:["select",r,n&&"disabled",i&&"multiple",o&&"error"],icon:["icon",`icon${ys(r)}`,a&&"iconOpen",n&&"disabled"],nativeInput:["nativeInput"]};return Cs(s,z9e,e)},fyt=ze.forwardRef(function(e,r){const{"aria-describedby":n,"aria-label":i,autoFocus:a,autoWidth:o,children:s,className:d,defaultOpen:b,defaultValue:L,disabled:B,displayEmpty:V,error:X=!1,IconComponent:ie,inputRef:de,labelId:ae,MenuProps:U={},multiple:ve,name:Se,onBlur:Pe,onChange:Me,onClose:Ie,onFocus:Ve,onOpen:Ze,open:Je,readOnly:nt,renderValue:ut,required:ht,SelectDisplayProps:_t={},tabIndex:Dt,type:qt,value:Lt,variant:dr="standard",...Zt}=e,[Cr,yt]=V_({controlled:Lt,default:L,name:"Select"}),[Vt,Er]=V_({controlled:Je,default:b,name:"Select"}),sr=ze.useRef(null),or=ze.useRef(null),[Ar,Ir]=ze.useState(null),{current:_n}=ze.useRef(Je!=null),[Un,Qn]=ze.useState(),Jn=id(r,de),Vn=ze.useCallback(Ko=>{or.current=Ko,Ko&&Ir(Ko)},[]),jn=Ar?.parentNode;ze.useImperativeHandle(Jn,()=>({focus:()=>{or.current.focus()},node:sr.current,value:Cr}),[Cr]),ze.useEffect(()=>{b&&Vt&&Ar&&!_n&&(Qn(o?null:jn.clientWidth),or.current.focus())},[Ar,o]),ze.useEffect(()=>{a&&or.current.focus()},[a]),ze.useEffect(()=>{if(!ae)return;const Ko=Lm(or.current).getElementById(ae);if(Ko){const Zi=()=>{getSelection().isCollapsed&&or.current.focus()};return Ko.addEventListener("click",Zi),()=>{Ko.removeEventListener("click",Zi)}}},[ae]);const Lr=(Ko,Zi)=>{Ko?Ze&&Ze(Zi):Ie&&Ie(Zi),_n||(Qn(o?null:jn.clientWidth),Er(Ko))},Yn=Ko=>{Ko.button===0&&(Ko.preventDefault(),or.current.focus(),Lr(!0,Ko))},On=Ko=>{Lr(!1,Ko)},Sn=ze.Children.toArray(s),bn=Ko=>{const Zi=Sn.find(za=>za.props.value===Ko.target.value);Zi!==void 0&&(yt(Zi.props.value),Me&&Me(Ko,Zi))},Mn=Ko=>Zi=>{let za;if(Zi.currentTarget.hasAttribute("tabindex")){if(ve){za=Array.isArray(Cr)?Cr.slice():[];const Ss=Cr.indexOf(Ko.props.value);Ss===-1?za.push(Ko.props.value):za.splice(Ss,1)}else za=Ko.props.value;if(Ko.props.onClick&&Ko.props.onClick(Zi),Cr!==za&&(yt(za),Me)){const Ss=Zi.nativeEvent||Zi,ba=new Ss.constructor(Ss.type,Ss);Object.defineProperty(ba,"target",{writable:!0,value:{value:za,name:Se}}),Me(ba,Ko)}ve||Lr(!1,Zi)}},gi=Ko=>{nt||[" ","ArrowUp","ArrowDown","Enter"].includes(Ko.key)&&(Ko.preventDefault(),Lr(!0,Ko))},Oi=Ar!==null&&Vt,Pa=Ko=>{!Oi&&Pe&&(Object.defineProperty(Ko,"target",{writable:!0,value:{value:Cr,name:Se}}),Pe(Ko))};delete Zt["aria-invalid"];let va,ti;const Tn=[];let bi=!1;(t$({value:Cr})||V)&&(ut?va=ut(Cr):bi=!0);const Wn=Sn.map(Ko=>{if(!ze.isValidElement(Ko))return null;let Zi;if(ve){if(!Array.isArray(Cr))throw new Error(kk(2));Zi=Cr.some(za=>Y2e(za,Ko.props.value)),Zi&&bi&&Tn.push(Ko.props.children)}else Zi=Y2e(Cr,Ko.props.value),Zi&&bi&&(ti=Ko.props.children);return ze.cloneElement(Ko,{"aria-selected":Zi?"true":"false",onClick:Mn(Ko),onKeyUp:za=>{za.key===" "&&za.preventDefault(),Ko.props.onKeyUp&&Ko.props.onKeyUp(za)},role:"option",selected:Zi,value:void 0,"data-value":Ko.props.value})});bi&&(ve?Tn.length===0?va=null:va=Tn.reduce((Ko,Zi,za)=>(Ko.push(Zi),za<Tn.length-1&&Ko.push(", "),Ko),[]):va=ti);let Ei=Un;!o&&_n&&Ar&&(Ei=jn.clientWidth);let Ki;typeof Dt<"u"?Ki=Dt:Ki=B?null:0;const sa=_t.id||(Se?`mui-component-select-${Se}`:void 0),xa={...e,variant:dr,value:Cr,open:Oi,error:X},Qa=cyt(xa),is={...U.PaperProps,...typeof U.slotProps?.paper=="function"?U.slotProps.paper(xa):U.slotProps?.paper},go={...U.MenuListProps,...typeof U.slotProps?.list=="function"?U.slotProps.list(xa):U.slotProps?.list},Co=Vd();return Ke.jsxs(ze.Fragment,{children:[Ke.jsx(oyt,{as:"div",ref:Vn,tabIndex:Ki,role:"combobox","aria-controls":Oi?Co:void 0,"aria-disabled":B?"true":void 0,"aria-expanded":Oi?"true":"false","aria-haspopup":"listbox","aria-label":i,"aria-labelledby":[ae,sa].filter(Boolean).join(" ")||void 0,"aria-describedby":n,"aria-required":ht?"true":void 0,"aria-invalid":X?"true":void 0,onKeyDown:gi,onMouseDown:B||nt?null:Yn,onBlur:Pa,onFocus:Ve,..._t,ownerState:xa,className:Vo(_t.className,Qa.select,d),id:sa,children:uyt(va)?W2e||(W2e=Ke.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):va}),Ke.jsx(lyt,{"aria-invalid":X,value:Array.isArray(Cr)?Cr.join(","):Cr,name:Se,ref:sr,"aria-hidden":!0,onChange:bn,tabIndex:-1,disabled:B,className:Qa.nativeInput,autoFocus:a,required:ht,...Zt,ownerState:xa}),Ke.jsx(syt,{as:ie,className:Qa.icon,ownerState:xa}),Ke.jsx(xme,{id:`menu-${Se||""}`,anchorEl:jn,open:Oi,onClose:On,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...U,slotProps:{...U.slotProps,list:{"aria-labelledby":ae,role:"listbox","aria-multiselectable":ve?"true":void 0,disableListWrap:!0,id:Co,...go},paper:{...is,style:{minWidth:Ei,...is!=null?is.style:null}}},children:Wn})]})}),dyt=t=>{const{classes:e}=t,n=Cs({root:["root"]},z9e,e);return{...e,...n}},wme={name:"MuiSelect",slot:"Root",shouldForwardProp:t=>mx(t)&&t!=="variant"},hyt=fa(TY,wme)(""),pyt=fa(AY,wme)(""),vyt=fa(SY,wme)(""),m4=ze.forwardRef(function(e,r){const n=Uu({name:"MuiSelect",props:e}),{autoWidth:i=!1,children:a,classes:o={},className:s,defaultOpen:d=!1,displayEmpty:b=!1,IconComponent:L=_9e,id:B,input:V,inputProps:X,label:ie,labelId:de,MenuProps:ae,multiple:U=!1,native:ve=!1,onClose:Se,onOpen:Pe,open:Me,renderValue:Ie,SelectDisplayProps:Ve,variant:Ze="outlined",...Je}=n,nt=ve?L0t:fyt,ut=W2(),ht=v4({props:n,muiFormControl:ut,states:["variant","error"]}),_t=ht.variant||Ze,Dt={...n,variant:_t,classes:o},qt=dyt(Dt),{root:Lt,...dr}=qt,Zt=V||{standard:Ke.jsx(hyt,{ownerState:Dt}),outlined:Ke.jsx(pyt,{label:ie,ownerState:Dt}),filled:Ke.jsx(vyt,{ownerState:Dt})}[_t],Cr=id(r,h4(Zt));return Ke.jsx(ze.Fragment,{children:ze.cloneElement(Zt,{inputComponent:nt,inputProps:{children:a,error:ht.error,IconComponent:L,variant:_t,type:void 0,multiple:U,...ve?{id:B}:{autoWidth:i,defaultOpen:d,displayEmpty:b,labelId:de,MenuProps:ae,onClose:Se,onOpen:Pe,open:Me,renderValue:Ie,SelectDisplayProps:{id:B,...Ve}},...X,classes:X?Kx(dr,X.classes):dr,...V?V.props.inputProps:{}},...(U&&ve||b)&&_t==="outlined"?{notched:!0}:{},ref:Cr,className:Vo(Zt.props.className,s,qt.root),...!V&&{variant:_t},...Je})})});m4.muiName="Select";function myt(t){return Al("MuiSkeleton",t)}Ml("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);const gyt=t=>{const{classes:e,variant:r,animation:n,hasChildren:i,width:a,height:o}=t;return Cs({root:["root",r,n,i&&"withChildren",i&&!a&&"fitContent",i&&!o&&"heightAuto"]},myt,e)},Mhe=cA`
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }

  100% {
    opacity: 1;
  }
`,Rhe=cA`
  0% {
    transform: translateX(-100%);
  }

  50% {
    /* +0.5s of delay between each loop */
    transform: translateX(100%);
  }

  100% {
    transform: translateX(100%);
  }
`,yyt=typeof Mhe!="string"?f4`
        animation: ${Mhe} 2s ease-in-out 0.5s infinite;
      `:null,byt=typeof Rhe!="string"?f4`
        &::after {
          animation: ${Rhe} 2s linear 0.5s infinite;
        }
      `:null,xyt=fa("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[r.variant],r.animation!==!1&&e[r.animation],r.hasChildren&&e.withChildren,r.hasChildren&&!r.width&&e.fitContent,r.hasChildren&&!r.height&&e.heightAuto]}})(yu(({theme:t})=>{const e=Wct(t.shape.borderRadius)||"px",r=Yct(t.shape.borderRadius);return{display:"block",backgroundColor:t.vars?t.vars.palette.Skeleton.bg:t.alpha(t.palette.text.primary,t.palette.mode==="light"?.11:.13),height:"1.2em",variants:[{props:{variant:"text"},style:{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${r}${e}/${Math.round(r/.6*10)/10}${e}`,"&:empty:before":{content:'"\\00a0"'}}},{props:{variant:"circular"},style:{borderRadius:"50%"}},{props:{variant:"rounded"},style:{borderRadius:(t.vars||t).shape.borderRadius}},{props:({ownerState:n})=>n.hasChildren,style:{"& > *":{visibility:"hidden"}}},{props:({ownerState:n})=>n.hasChildren&&!n.width,style:{maxWidth:"fit-content"}},{props:({ownerState:n})=>n.hasChildren&&!n.height,style:{height:"auto"}},{props:{animation:"pulse"},style:yyt||{animation:`${Mhe} 2s ease-in-out 0.5s infinite`}},{props:{animation:"wave"},style:{position:"relative",overflow:"hidden",WebkitMaskImage:"-webkit-radial-gradient(white, black)","&::after":{background:`linear-gradient(
                90deg,
                transparent,
                ${(t.vars||t).palette.action.hover},
                transparent
              )`,content:'""',position:"absolute",transform:"translateX(-100%)",bottom:0,left:0,right:0,top:0}}},{props:{animation:"wave"},style:byt||{"&::after":{animation:`${Rhe} 2s linear 0.5s infinite`}}}]}})),_yt=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiSkeleton"}),{animation:i="pulse",className:a,component:o="span",height:s,style:d,variant:b="text",width:L,...B}=n,V={...n,animation:i,component:o,variant:b,hasChildren:!!B.children},X=gyt(V);return Ke.jsx(xyt,{as:o,ref:r,className:Vo(X.root,a),ownerState:V,...B,style:{width:L,height:s,...d}})});function wyt(t,e,r=(n,i)=>n===i){return t.length===e.length&&t.every((n,i)=>r(n,e[i]))}const Syt=2;function vO(t,e,r,n,i){return r===1?Math.min(t+e,i):Math.max(t-e,n)}function B9e(t,e){return t-e}function X2e(t,e){const{index:r}=t.reduce((n,i,a)=>{const o=Math.abs(e-i);return n===null||o<n.distance||o===n.distance?{distance:o,index:a}:n},null)??{};return r}function ij(t,e){if(e.current!==void 0&&t.changedTouches){const r=t;for(let n=0;n<r.changedTouches.length;n+=1){const i=r.changedTouches[n];if(i.identifier===e.current)return{x:i.clientX,y:i.clientY}}return!1}return{x:t.clientX,y:t.clientY}}function i$(t,e,r){return(t-e)*100/(r-e)}function Tyt(t,e,r){return(r-e)*t+e}function Eyt(t){if(Math.abs(t)<1){const r=t.toExponential().split("e-"),n=r[0].split(".")[1];return(n?n.length:0)+parseInt(r[1],10)}const e=t.toString().split(".")[1];return e?e.length:0}function Ayt(t,e,r){const n=Math.round((t-r)/e)*e+r;return Number(n.toFixed(Eyt(e)))}function Z2e({values:t,newValue:e,index:r}){const n=t.slice();return n[r]=e,n.sort(B9e)}function aj({sliderRef:t,activeIndex:e,setActive:r}){const n=Lm(t.current);(!t.current?.contains(n.activeElement)||Number(n?.activeElement?.getAttribute("data-index"))!==e)&&t.current?.querySelector(`[type="range"][data-index="${e}"]`).focus(),r&&r(e)}function oj(t,e){return typeof t=="number"&&typeof e=="number"?t===e:typeof t=="object"&&typeof e=="object"?wyt(t,e):!1}const Cyt={horizontal:{offset:t=>({left:`${t}%`}),leap:t=>({width:`${t}%`})},"horizontal-reverse":{offset:t=>({right:`${t}%`}),leap:t=>({width:`${t}%`})},vertical:{offset:t=>({bottom:`${t}%`}),leap:t=>({height:`${t}%`})}},Myt=t=>t;let sj;function K2e(){return sj===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?sj=CSS.supports("touch-action","none"):sj=!0),sj}function Ryt(t){const{"aria-labelledby":e,defaultValue:r,disabled:n=!1,disableSwap:i=!1,isRtl:a=!1,marks:o=!1,max:s=100,min:d=0,name:b,onChange:L,onChangeCommitted:B,orientation:V="horizontal",rootRef:X,scale:ie=Myt,step:de=1,shiftStep:ae=10,tabIndex:U,value:ve}=t,Se=ze.useRef(void 0),[Pe,Me]=ze.useState(-1),[Ie,Ve]=ze.useState(-1),[Ze,Je]=ze.useState(!1),nt=ze.useRef(0),ut=ze.useRef(null),[ht,_t]=V_({controlled:ve,default:r??d,name:"Slider"}),Dt=L&&((bi,Wn,Ei)=>{const Ki=bi.nativeEvent||bi,sa=new Ki.constructor(Ki.type,Ki);Object.defineProperty(sa,"target",{writable:!0,value:{value:Wn,name:b}}),ut.current=Wn,L(sa,Wn,Ei)}),qt=Array.isArray(ht);let Lt=qt?ht.slice().sort(B9e):[ht];Lt=Lt.map(bi=>bi==null?d:dN(bi,d,s));const dr=o===!0&&de!==null?[...Array(Math.floor((s-d)/de)+1)].map((bi,Wn)=>({value:d+de*Wn})):o||[],Zt=dr.map(bi=>bi.value),[Cr,yt]=ze.useState(-1),Vt=ze.useRef(null),Er=id(X,Vt),sr=bi=>Wn=>{const Ei=Number(Wn.currentTarget.getAttribute("data-index"));ZP(Wn.target)&&yt(Ei),Ve(Ei),bi?.onFocus?.(Wn)},or=bi=>Wn=>{ZP(Wn.target)||yt(-1),Ve(-1),bi?.onBlur?.(Wn)},Ar=(bi,Wn)=>{const Ei=Number(bi.currentTarget.getAttribute("data-index")),Ki=Lt[Ei],sa=Zt.indexOf(Ki);let xa=Wn;if(dr&&de==null){const Qa=Zt[Zt.length-1];xa>=Qa?xa=Qa:xa<=Zt[0]?xa=Zt[0]:xa=xa<Ki?Zt[sa-1]:Zt[sa+1]}if(xa=dN(xa,d,s),qt){i&&(xa=dN(xa,Lt[Ei-1]||-1/0,Lt[Ei+1]||1/0));const Qa=xa;xa=Z2e({values:Lt,newValue:xa,index:Ei});let is=Ei;i||(is=xa.indexOf(Qa)),aj({sliderRef:Vt,activeIndex:is})}_t(xa),yt(Ei),Dt&&!oj(xa,ht)&&Dt(bi,xa,Ei),B&&B(bi,ut.current??xa)},Ir=bi=>Wn=>{if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(Wn.key)){Wn.preventDefault();const Ei=Number(Wn.currentTarget.getAttribute("data-index")),Ki=Lt[Ei];let sa=null;if(de!=null){const xa=Wn.shiftKey?ae:de;switch(Wn.key){case"ArrowUp":sa=vO(Ki,xa,1,d,s);break;case"ArrowRight":sa=vO(Ki,xa,a?-1:1,d,s);break;case"ArrowDown":sa=vO(Ki,xa,-1,d,s);break;case"ArrowLeft":sa=vO(Ki,xa,a?1:-1,d,s);break;case"PageUp":sa=vO(Ki,ae,1,d,s);break;case"PageDown":sa=vO(Ki,ae,-1,d,s);break;case"Home":sa=d;break;case"End":sa=s;break}}else if(dr){const xa=Zt[Zt.length-1],Qa=Zt.indexOf(Ki),is=[a?"ArrowRight":"ArrowLeft","ArrowDown","PageDown","Home"],go=[a?"ArrowLeft":"ArrowRight","ArrowUp","PageUp","End"];is.includes(Wn.key)?Qa===0?sa=Zt[0]:sa=Zt[Qa-1]:go.includes(Wn.key)&&(Qa===Zt.length-1?sa=xa:sa=Zt[Qa+1])}sa!=null&&Ar(Wn,sa)}bi?.onKeyDown?.(Wn)};Ah(()=>{n&&Vt.current.contains(document.activeElement)&&document.activeElement?.blur()},[n]),n&&Pe!==-1&&Me(-1),n&&Cr!==-1&&yt(-1);const _n=bi=>Wn=>{bi.onChange?.(Wn),Ar(Wn,Wn.target.valueAsNumber)},Un=ze.useRef(void 0);let Qn=V;a&&V==="horizontal"&&(Qn+="-reverse");const Jn=({finger:bi,move:Wn=!1})=>{const{current:Ei}=Vt,{width:Ki,height:sa,bottom:xa,left:Qa}=Ei.getBoundingClientRect();let is;Qn.startsWith("vertical")?is=(xa-bi.y)/sa:is=(bi.x-Qa)/Ki,Qn.includes("-reverse")&&(is=1-is);let go;if(go=Tyt(is,d,s),de)go=Ayt(go,de,d);else{const Ko=X2e(Zt,go);go=Zt[Ko]}go=dN(go,d,s);let Co=0;if(qt){Wn?Co=Un.current:Co=X2e(Lt,go),i&&(go=dN(go,Lt[Co-1]||-1/0,Lt[Co+1]||1/0));const Ko=go;go=Z2e({values:Lt,newValue:go,index:Co}),i&&Wn||(Co=go.indexOf(Ko),Un.current=Co)}return{newValue:go,activeIndex:Co}},Vn=vl(bi=>{const Wn=ij(bi,Se);if(!Wn)return;if(nt.current+=1,bi.type==="mousemove"&&bi.buttons===0){jn(bi);return}const{newValue:Ei,activeIndex:Ki}=Jn({finger:Wn,move:!0});aj({sliderRef:Vt,activeIndex:Ki,setActive:Me}),_t(Ei),!Ze&&nt.current>Syt&&Je(!0),Dt&&!oj(Ei,ht)&&Dt(bi,Ei,Ki)}),jn=vl(bi=>{const Wn=ij(bi,Se);if(Je(!1),!Wn)return;const{newValue:Ei}=Jn({finger:Wn,move:!0});Me(-1),bi.type==="touchend"&&Ve(-1),B&&B(bi,ut.current??Ei),Se.current=void 0,Yn()}),Lr=vl(bi=>{if(n)return;K2e()||bi.preventDefault();const Wn=bi.changedTouches[0];Wn!=null&&(Se.current=Wn.identifier);const Ei=ij(bi,Se);if(Ei!==!1){const{newValue:sa,activeIndex:xa}=Jn({finger:Ei});aj({sliderRef:Vt,activeIndex:xa,setActive:Me}),_t(sa),Dt&&!oj(sa,ht)&&Dt(bi,sa,xa)}nt.current=0;const Ki=Lm(Vt.current);Ki.addEventListener("touchmove",Vn,{passive:!0}),Ki.addEventListener("touchend",jn,{passive:!0})}),Yn=ze.useCallback(()=>{const bi=Lm(Vt.current);bi.removeEventListener("mousemove",Vn),bi.removeEventListener("mouseup",jn),bi.removeEventListener("touchmove",Vn),bi.removeEventListener("touchend",jn)},[jn,Vn]);ze.useEffect(()=>{const{current:bi}=Vt;return bi.addEventListener("touchstart",Lr,{passive:K2e()}),()=>{bi.removeEventListener("touchstart",Lr),Yn()}},[Yn,Lr]),ze.useEffect(()=>{n&&Yn()},[n,Yn]);const On=bi=>Wn=>{if(bi.onMouseDown?.(Wn),n||Wn.defaultPrevented||Wn.button!==0)return;Wn.preventDefault();const Ei=ij(Wn,Se);if(Ei!==!1){const{newValue:sa,activeIndex:xa}=Jn({finger:Ei});aj({sliderRef:Vt,activeIndex:xa,setActive:Me}),_t(sa),Dt&&!oj(sa,ht)&&Dt(Wn,sa,xa)}nt.current=0;const Ki=Lm(Vt.current);Ki.addEventListener("mousemove",Vn,{passive:!0}),Ki.addEventListener("mouseup",jn)},Sn=i$(qt?Lt[0]:d,d,s),bn=i$(Lt[Lt.length-1],d,s)-Sn,Mn=(bi={})=>{const Wn=sL(bi),Ei={onMouseDown:On(Wn||{})},Ki={...Wn,...Ei};return{...bi,ref:Er,...Ki}},gi=bi=>Wn=>{bi.onMouseOver?.(Wn);const Ei=Number(Wn.currentTarget.getAttribute("data-index"));Ve(Ei)},Oi=bi=>Wn=>{bi.onMouseLeave?.(Wn),Ve(-1)},Pa=(bi={})=>{const Wn=sL(bi),Ei={onMouseOver:gi(Wn||{}),onMouseLeave:Oi(Wn||{})};return{...bi,...Wn,...Ei}},va=bi=>({pointerEvents:Pe!==-1&&Pe!==bi?"none":void 0});let ti;return V==="vertical"&&(ti=a?"vertical-rl":"vertical-lr"),{active:Pe,axis:Qn,axisProps:Cyt,dragging:Ze,focusedThumbIndex:Cr,getHiddenInputProps:(bi={})=>{const Wn=sL(bi),Ei={onChange:_n(Wn||{}),onFocus:sr(Wn||{}),onBlur:or(Wn||{}),onKeyDown:Ir(Wn||{})},Ki={...Wn,...Ei};return{tabIndex:U,"aria-labelledby":e,"aria-orientation":V,"aria-valuemax":ie(s),"aria-valuemin":ie(d),name:b,type:"range",min:t.min,max:t.max,step:t.step===null&&t.marks?"any":t.step??void 0,disabled:n,...bi,...Ki,style:{...F9e,direction:a?"rtl":"ltr",width:"100%",height:"100%",writingMode:ti}}},getRootProps:Mn,getThumbProps:Pa,marks:dr,open:Ie,range:qt,rootRef:Er,trackLeap:bn,trackOffset:Sn,values:Lt,getThumbStyle:va}}const kyt=t=>!t||!P5(t);function Iyt(t){return Al("MuiSlider",t)}const j3=Ml("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),Pyt=t=>{const{open:e}=t;return{offset:Vo(e&&j3.valueLabelOpen),circle:j3.valueLabelCircle,label:j3.valueLabelLabel}};function Dyt(t){const{children:e,className:r,value:n}=t,i=Pyt(t);return e?ze.cloneElement(e,{className:e.props.className},Ke.jsxs(ze.Fragment,{children:[e.props.children,Ke.jsx("span",{className:Vo(i.offset,r),"aria-hidden":!0,children:Ke.jsx("span",{className:i.circle,children:Ke.jsx("span",{className:i.label,children:n})})})]})):null}function J2e(t){return t}const Lyt=fa("span",{name:"MuiSlider",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[`color${ys(r.color)}`],r.size!=="medium"&&e[`size${ys(r.size)}`],r.marked&&e.marked,r.orientation==="vertical"&&e.vertical,r.track==="inverted"&&e.trackInverted,r.track===!1&&e.trackFalse]}})(yu(({theme:t})=>({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${j3.disabled}`]:{pointerEvents:"none",cursor:"default",color:(t.vars||t).palette.grey[400]},[`&.${j3.dragging}`]:{[`& .${j3.thumb}, & .${j3.track}`]:{transition:"none"}},variants:[...Object.entries(t.palette).filter(Yv()).map(([e])=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}))),Oyt=fa("span",{name:"MuiSlider",slot:"Rail"})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),Nyt=fa("span",{name:"MuiSlider",slot:"Track"})(yu(({theme:t})=>({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:t.transitions.create(["left","width","bottom","height"],{duration:t.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.entries(t.palette).filter(Yv()).map(([e])=>({props:{color:e,track:"inverted"},style:{...t.vars?{backgroundColor:t.vars.palette.Slider[`${e}Track`],borderColor:t.vars.palette.Slider[`${e}Track`]}:{backgroundColor:t.lighten(t.palette[e].main,.62),borderColor:t.lighten(t.palette[e].main,.62),...t.applyStyles("dark",{backgroundColor:t.darken(t.palette[e].main,.5)}),...t.applyStyles("dark",{borderColor:t.darken(t.palette[e].main,.5)})}}}))]}))),Fyt=fa("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.thumb,e[`thumbColor${ys(r.color)}`],r.size!=="medium"&&e[`thumbSize${ys(r.size)}`]]}})(yu(({theme:t})=>({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:t.transitions.create(["box-shadow","left","bottom"],{duration:t.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(t.vars||t).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${j3.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}},...Object.entries(t.palette).filter(Yv()).map(([e])=>({props:{color:e},style:{[`&:hover, &.${j3.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${t.alpha((t.vars||t).palette[e].main,.16)}`,"@media (hover: none)":{boxShadow:"none"}},[`&.${j3.active}`]:{boxShadow:`0px 0px 0px 14px ${t.alpha((t.vars||t).palette[e].main,.16)}`}}}))]}))),zyt=fa(Dyt,{name:"MuiSlider",slot:"ValueLabel"})(yu(({theme:t})=>({zIndex:1,whiteSpace:"nowrap",...t.typography.body2,fontWeight:500,transition:t.transitions.create(["transform"],{duration:t.transitions.duration.shortest}),position:"absolute",backgroundColor:(t.vars||t).palette.grey[600],borderRadius:2,color:(t.vars||t).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${j3.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},[`&.${j3.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:t.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]}))),Byt=fa("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:t=>hY(t)&&t!=="markActive",overridesResolver:(t,e)=>{const{markActive:r}=t;return[e.mark,r&&e.markActive]}})(yu(({theme:t})=>({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(t.vars||t).palette.background.paper,opacity:.8}}]}))),Uyt=fa("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:t=>hY(t)&&t!=="markLabelActive"})(yu(({theme:t})=>({...t.typography.body2,color:(t.vars||t).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(t.vars||t).palette.text.primary}}]}))),Hyt=t=>{const{disabled:e,dragging:r,marked:n,orientation:i,track:a,classes:o,color:s,size:d}=t,b={root:["root",e&&"disabled",r&&"dragging",n&&"marked",i==="vertical"&&"vertical",a==="inverted"&&"trackInverted",a===!1&&"trackFalse",s&&`color${ys(s)}`,d&&`size${ys(d)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",e&&"disabled",d&&`thumbSize${ys(d)}`,s&&`thumbColor${ys(s)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Cs(b,Iyt,o)},jyt=({children:t})=>t,Sme=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiSlider"}),i=Kv(),{"aria-label":a,"aria-valuetext":o,"aria-labelledby":s,component:d="span",components:b={},componentsProps:L={},color:B="primary",classes:V,className:X,disableSwap:ie=!1,disabled:de=!1,getAriaLabel:ae,getAriaValueText:U,marks:ve=!1,max:Se=100,min:Pe=0,name:Me,onChange:Ie,onChangeCommitted:Ve,orientation:Ze="horizontal",shiftStep:Je=10,size:nt="medium",step:ut=1,scale:ht=J2e,slotProps:_t,slots:Dt,tabIndex:qt,track:Lt="normal",value:dr,valueLabelDisplay:Zt="off",valueLabelFormat:Cr=J2e,...yt}=n,Vt={...n,isRtl:i,max:Se,min:Pe,classes:V,disabled:de,disableSwap:ie,orientation:Ze,marks:ve,color:B,size:nt,step:ut,shiftStep:Je,scale:ht,track:Lt,valueLabelDisplay:Zt,valueLabelFormat:Cr},{axisProps:Er,getRootProps:sr,getHiddenInputProps:or,getThumbProps:Ar,open:Ir,active:_n,axis:Un,focusedThumbIndex:Qn,range:Jn,dragging:Vn,marks:jn,values:Lr,trackOffset:Yn,trackLeap:On,getThumbStyle:Sn}=Ryt({...Vt,rootRef:r});Vt.marked=jn.length>0&&jn.some($s=>$s.label),Vt.dragging=Vn,Vt.focusedThumbIndex=Qn;const bn=Hyt(Vt),Mn=Dt?.root??b.Root??Lyt,gi=Dt?.rail??b.Rail??Oyt,Oi=Dt?.track??b.Track??Nyt,Pa=Dt?.thumb??b.Thumb??Fyt,va=Dt?.valueLabel??b.ValueLabel??zyt,ti=Dt?.mark??b.Mark??Byt,Tn=Dt?.markLabel??b.MarkLabel??Uyt,bi=Dt?.input??b.Input??"input",Wn=_t?.root??L.root,Ei=_t?.rail??L.rail,Ki=_t?.track??L.track,sa=_t?.thumb??L.thumb,xa=_t?.valueLabel??L.valueLabel,Qa=_t?.mark??L.mark,is=_t?.markLabel??L.markLabel,go=_t?.input??L.input,Co=Kd({elementType:Mn,getSlotProps:sr,externalSlotProps:Wn,externalForwardedProps:yt,additionalProps:{...kyt(Mn)&&{as:d}},ownerState:{...Vt,...Wn?.ownerState},className:[bn.root,X]}),Ko=Kd({elementType:gi,externalSlotProps:Ei,ownerState:Vt,className:bn.rail}),Zi=Kd({elementType:Oi,externalSlotProps:Ki,additionalProps:{style:{...Er[Un].offset(Yn),...Er[Un].leap(On)}},ownerState:{...Vt,...Ki?.ownerState},className:bn.track}),za=Kd({elementType:Pa,getSlotProps:Ar,externalSlotProps:sa,ownerState:{...Vt,...sa?.ownerState},className:bn.thumb}),Ss=Kd({elementType:va,externalSlotProps:xa,ownerState:{...Vt,...xa?.ownerState},className:bn.valueLabel}),ba=Kd({elementType:ti,externalSlotProps:Qa,ownerState:Vt,className:bn.mark}),po=Kd({elementType:Tn,externalSlotProps:is,ownerState:Vt,className:bn.markLabel}),Ys=Kd({elementType:bi,getSlotProps:or,externalSlotProps:go,ownerState:Vt});return Ke.jsxs(Mn,{...Co,children:[Ke.jsx(gi,{...Ko}),Ke.jsx(Oi,{...Zi}),jn.filter($s=>$s.value>=Pe&&$s.value<=Se).map(($s,Gs)=>{const Ns=i$($s.value,Pe,Se),Hl=Er[Un].offset(Ns);let nu;return Lt===!1?nu=Lr.includes($s.value):nu=Lt==="normal"&&(Jn?$s.value>=Lr[0]&&$s.value<=Lr[Lr.length-1]:$s.value<=Lr[0])||Lt==="inverted"&&(Jn?$s.value<=Lr[0]||$s.value>=Lr[Lr.length-1]:$s.value>=Lr[0]),Ke.jsxs(ze.Fragment,{children:[Ke.jsx(ti,{"data-index":Gs,...ba,...!P5(ti)&&{markActive:nu},style:{...Hl,...ba.style},className:Vo(ba.className,nu&&bn.markActive)}),$s.label!=null?Ke.jsx(Tn,{"aria-hidden":!0,"data-index":Gs,...po,...!P5(Tn)&&{markLabelActive:nu},style:{...Hl,...po.style},className:Vo(bn.markLabel,po.className,nu&&bn.markLabelActive),children:$s.label}):null]},Gs)}),Lr.map(($s,Gs)=>{const Ns=i$($s,Pe,Se),Hl=Er[Un].offset(Ns),nu=Zt==="off"?jyt:va;return Ke.jsx(nu,{...!P5(nu)&&{valueLabelFormat:Cr,valueLabelDisplay:Zt,value:typeof Cr=="function"?Cr(ht($s),Gs):Cr,index:Gs,open:Ir===Gs||_n===Gs||Zt==="on",disabled:de},...Ss,children:Ke.jsx(Pa,{"data-index":Gs,...za,className:Vo(bn.thumb,za.className,_n===Gs&&bn.active,Qn===Gs&&bn.focusVisible),style:{...Hl,...Sn(Gs),...za.style},children:Ke.jsx(bi,{"data-index":Gs,"aria-label":ae?ae(Gs):a,"aria-valuenow":ht($s),"aria-labelledby":s,"aria-valuetext":U?U(ht($s),Gs):o,value:Lr[Gs],...Ys})})},Gs)})]})});function Vyt(t={}){const{autoHideDuration:e=null,disableWindowBlurListener:r=!1,onClose:n,open:i,resumeHideDuration:a}=t,o=U2();ze.useEffect(()=>{if(!i)return;function U(ve){ve.defaultPrevented||ve.key==="Escape"&&n?.(ve,"escapeKeyDown")}return document.addEventListener("keydown",U),()=>{document.removeEventListener("keydown",U)}},[i,n]);const s=vl((U,ve)=>{n?.(U,ve)}),d=vl(U=>{!n||U==null||o.start(U,()=>{s(null,"timeout")})});ze.useEffect(()=>(i&&d(e),o.clear),[i,e,d,o]);const b=U=>{n?.(U,"clickaway")},L=o.clear,B=ze.useCallback(()=>{e!=null&&d(a??e*.5)},[e,a,d]),V=U=>ve=>{const Se=U.onBlur;Se?.(ve),B()},X=U=>ve=>{const Se=U.onFocus;Se?.(ve),L()},ie=U=>ve=>{const Se=U.onMouseEnter;Se?.(ve),L()},de=U=>ve=>{const Se=U.onMouseLeave;Se?.(ve),B()};return ze.useEffect(()=>{if(!r&&i)return window.addEventListener("focus",B),window.addEventListener("blur",L),()=>{window.removeEventListener("focus",B),window.removeEventListener("blur",L)}},[r,i,B,L]),{getRootProps:(U={})=>{const ve={...sL(t),...sL(U)};return{role:"presentation",...U,...ve,onBlur:V(ve),onFocus:X(ve),onMouseEnter:ie(ve),onMouseLeave:de(ve)}},onClickAway:b}}function qyt(t){return Al("MuiSnackbarContent",t)}Ml("MuiSnackbarContent",["root","message","action"]);const Gyt=t=>{const{classes:e}=t;return Cs({root:["root"],action:["action"],message:["message"]},qyt,e)},$yt=fa(Gy,{name:"MuiSnackbarContent",slot:"Root"})(yu(({theme:t})=>{const e=t.palette.mode==="light"?.8:.98;return{...t.typography.body2,color:t.vars?t.vars.palette.SnackbarContent.color:t.palette.getContrastText(A9(t.palette.background.default,e)),backgroundColor:t.vars?t.vars.palette.SnackbarContent.bg:A9(t.palette.background.default,e),display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",flexGrow:1,[t.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}}})),Wyt=fa("div",{name:"MuiSnackbarContent",slot:"Message"})({padding:"8px 0"}),Yyt=fa("div",{name:"MuiSnackbarContent",slot:"Action"})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),Xyt=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiSnackbarContent"}),{action:i,className:a,message:o,role:s="alert",...d}=n,b=n,L=Gyt(b);return Ke.jsxs($yt,{role:s,elevation:6,className:Vo(L.root,a),ownerState:b,ref:r,...d,children:[Ke.jsx(Wyt,{className:L.message,ownerState:b,children:o}),i?Ke.jsx(Yyt,{className:L.action,ownerState:b,children:i}):null]})});function Zyt(t){return Al("MuiSnackbar",t)}Ml("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const Kyt=t=>{const{classes:e,anchorOrigin:r}=t,n={root:["root",`anchorOrigin${ys(r.vertical)}${ys(r.horizontal)}`]};return Cs(n,Zyt,e)},Jyt=fa("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[`anchorOrigin${ys(r.anchorOrigin.vertical)}${ys(r.anchorOrigin.horizontal)}`]]}})(yu(({theme:t})=>({zIndex:(t.vars||t).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center",variants:[{props:({ownerState:e})=>e.anchorOrigin.vertical==="top",style:{top:8,[t.breakpoints.up("sm")]:{top:24}}},{props:({ownerState:e})=>e.anchorOrigin.vertical!=="top",style:{bottom:8,[t.breakpoints.up("sm")]:{bottom:24}}},{props:({ownerState:e})=>e.anchorOrigin.horizontal==="left",style:{justifyContent:"flex-start",[t.breakpoints.up("sm")]:{left:24,right:"auto"}}},{props:({ownerState:e})=>e.anchorOrigin.horizontal==="right",style:{justifyContent:"flex-end",[t.breakpoints.up("sm")]:{right:24,left:"auto"}}},{props:({ownerState:e})=>e.anchorOrigin.horizontal==="center",style:{[t.breakpoints.up("sm")]:{left:"50%",right:"auto",transform:"translateX(-50%)"}}}]}))),CY=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiSnackbar"}),i=cy(),a={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{action:o,anchorOrigin:{vertical:s,horizontal:d}={vertical:"bottom",horizontal:"left"},autoHideDuration:b=null,children:L,className:B,ClickAwayListenerProps:V,ContentProps:X,disableWindowBlurListener:ie=!1,message:de,onBlur:ae,onClose:U,onFocus:ve,onMouseEnter:Se,onMouseLeave:Pe,open:Me,resumeHideDuration:Ie,slots:Ve={},slotProps:Ze={},TransitionComponent:Je,transitionDuration:nt=a,TransitionProps:{onEnter:ut,onExited:ht,..._t}={},...Dt}=n,qt={...n,anchorOrigin:{vertical:s,horizontal:d},autoHideDuration:b,disableWindowBlurListener:ie,TransitionComponent:Je,transitionDuration:nt},Lt=Kyt(qt),{getRootProps:dr,onClickAway:Zt}=Vyt({...qt}),[Cr,yt]=ze.useState(!0),Vt=Lr=>{yt(!0),ht&&ht(Lr)},Er=(Lr,Yn)=>{yt(!1),ut&&ut(Lr,Yn)},sr={slots:{transition:Je,...Ve},slotProps:{content:X,clickAwayListener:V,transition:_t,...Ze}},[or,Ar]=Nu("root",{ref:r,className:[Lt.root,B],elementType:Jyt,getSlotProps:dr,externalForwardedProps:{...sr,...Dt},ownerState:qt}),[Ir,{ownerState:_n,...Un}]=Nu("clickAwayListener",{elementType:vme,externalForwardedProps:sr,getSlotProps:Lr=>({onClickAway:(...Yn)=>{const On=Yn[0];Lr.onClickAway?.(...Yn),!On?.defaultMuiPrevented&&Zt(...Yn)}}),ownerState:qt}),[Qn,Jn]=Nu("content",{elementType:Xyt,shouldForwardComponentProp:!0,externalForwardedProps:sr,additionalProps:{message:de,action:o},ownerState:qt}),[Vn,jn]=Nu("transition",{elementType:yL,externalForwardedProps:sr,getSlotProps:Lr=>({onEnter:(...Yn)=>{Lr.onEnter?.(...Yn),Er(...Yn)},onExited:(...Yn)=>{Lr.onExited?.(...Yn),Vt(...Yn)}}),additionalProps:{appear:!0,in:Me,timeout:nt,direction:s==="top"?"down":"up"},ownerState:qt});return!Me&&Cr?null:Ke.jsx(Ir,{...Un,...Ve.clickAwayListener&&{ownerState:_n},children:Ke.jsx(or,{...Ar,children:Ke.jsx(Vn,{...jn,children:L||Ke.jsx(Qn,{...Jn})})})})}),Tme=vct({createStyledComponent:fa("div",{name:"MuiStack",slot:"Root"}),useThemeProps:t=>Uu({props:t,name:"MuiStack"})}),DB=ze.createContext({}),MY=ze.createContext({});function Qyt(t){return Al("MuiStep",t)}Ml("MuiStep",["root","horizontal","vertical","alternativeLabel","completed"]);const e1t=t=>{const{classes:e,orientation:r,alternativeLabel:n,completed:i}=t;return Cs({root:["root",r,n&&"alternativeLabel",i&&"completed"]},Qyt,e)},t1t=fa("div",{name:"MuiStep",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[r.orientation],r.alternativeLabel&&e.alternativeLabel,r.completed&&e.completed]}})({variants:[{props:{orientation:"horizontal"},style:{paddingLeft:8,paddingRight:8}},{props:{alternativeLabel:!0},style:{flex:1,position:"relative"}}]}),r1t=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiStep"}),{active:i,children:a,className:o,component:s="div",completed:d,disabled:b,expanded:L=!1,index:B,last:V,...X}=n,{activeStep:ie,connector:de,alternativeLabel:ae,orientation:U,nonLinear:ve}=ze.useContext(DB);let[Se=!1,Pe=!1,Me=!1]=[i,d,b];ie===B?Se=i!==void 0?i:!0:!ve&&ie>B?Pe=d!==void 0?d:!0:!ve&&ie<B&&(Me=b!==void 0?b:!0);const Ie=ze.useMemo(()=>({index:B,last:V,expanded:L,icon:B+1,active:Se,completed:Pe,disabled:Me}),[B,V,L,Se,Pe,Me]),Ve={...n,active:Se,orientation:U,alternativeLabel:ae,completed:Pe,disabled:Me,expanded:L,component:s},Ze=e1t(Ve),Je=Ke.jsxs(t1t,{as:s,className:Vo(Ze.root,o),ref:r,ownerState:Ve,...X,children:[de&&ae&&B!==0?de:null,a]});return Ke.jsx(MY.Provider,{value:Ie,children:de&&!ae&&B!==0?Ke.jsxs(ze.Fragment,{children:[de,Je]}):Je})}),n1t=Hu(Ke.jsx("path",{d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z"})),i1t=Hu(Ke.jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}));function a1t(t){return Al("MuiStepIcon",t)}const WJ=Ml("MuiStepIcon",["root","active","completed","error","text"]);var Q2e;const o1t=t=>{const{classes:e,active:r,completed:n,error:i}=t;return Cs({root:["root",r&&"active",n&&"completed",i&&"error"],text:["text"]},a1t,e)},YJ=fa(KG,{name:"MuiStepIcon",slot:"Root"})(yu(({theme:t})=>({display:"block",transition:t.transitions.create("color",{duration:t.transitions.duration.shortest}),color:(t.vars||t).palette.text.disabled,[`&.${WJ.completed}`]:{color:(t.vars||t).palette.primary.main},[`&.${WJ.active}`]:{color:(t.vars||t).palette.primary.main},[`&.${WJ.error}`]:{color:(t.vars||t).palette.error.main}}))),s1t=fa("text",{name:"MuiStepIcon",slot:"Text"})(yu(({theme:t})=>({fill:(t.vars||t).palette.primary.contrastText,fontSize:t.typography.caption.fontSize,fontFamily:t.typography.fontFamily}))),l1t=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiStepIcon"}),{active:i=!1,className:a,completed:o=!1,error:s=!1,icon:d,...b}=n,L={...n,active:i,completed:o,error:s},B=o1t(L);if(typeof d=="number"||typeof d=="string"){const V=Vo(a,B.root);return s?Ke.jsx(YJ,{as:i1t,className:V,ref:r,ownerState:L,...b}):o?Ke.jsx(YJ,{as:n1t,className:V,ref:r,ownerState:L,...b}):Ke.jsxs(YJ,{className:V,ref:r,ownerState:L,...b,children:[Q2e||(Q2e=Ke.jsx("circle",{cx:"12",cy:"12",r:"12"})),Ke.jsx(s1t,{className:B.text,x:"12",y:"12",textAnchor:"middle",dominantBaseline:"central",ownerState:L,children:d})]})}return d});function u1t(t){return Al("MuiStepLabel",t)}const LP=Ml("MuiStepLabel",["root","horizontal","vertical","label","active","completed","error","disabled","iconContainer","alternativeLabel","labelContainer"]),c1t=t=>{const{classes:e,orientation:r,active:n,completed:i,error:a,disabled:o,alternativeLabel:s}=t;return Cs({root:["root",r,a&&"error",o&&"disabled",s&&"alternativeLabel"],label:["label",n&&"active",i&&"completed",a&&"error",o&&"disabled",s&&"alternativeLabel"],iconContainer:["iconContainer",n&&"active",i&&"completed",a&&"error",o&&"disabled",s&&"alternativeLabel"],labelContainer:["labelContainer",s&&"alternativeLabel"]},u1t,e)},f1t=fa("span",{name:"MuiStepLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[r.orientation]]}})({display:"flex",alignItems:"center",[`&.${LP.alternativeLabel}`]:{flexDirection:"column"},[`&.${LP.disabled}`]:{cursor:"default"},variants:[{props:{orientation:"vertical"},style:{textAlign:"left",padding:"8px 0"}}]}),d1t=fa("span",{name:"MuiStepLabel",slot:"Label"})(yu(({theme:t})=>({...t.typography.body2,display:"block",transition:t.transitions.create("color",{duration:t.transitions.duration.shortest}),[`&.${LP.active}`]:{color:(t.vars||t).palette.text.primary,fontWeight:500},[`&.${LP.completed}`]:{color:(t.vars||t).palette.text.primary,fontWeight:500},[`&.${LP.alternativeLabel}`]:{marginTop:16},[`&.${LP.error}`]:{color:(t.vars||t).palette.error.main}}))),h1t=fa("span",{name:"MuiStepLabel",slot:"IconContainer"})({flexShrink:0,display:"flex",paddingRight:8,[`&.${LP.alternativeLabel}`]:{paddingRight:0}}),p1t=fa("span",{name:"MuiStepLabel",slot:"LabelContainer"})(yu(({theme:t})=>({width:"100%",color:(t.vars||t).palette.text.secondary,[`&.${LP.alternativeLabel}`]:{textAlign:"center"}}))),U9e=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiStepLabel"}),{children:i,className:a,componentsProps:o={},error:s=!1,icon:d,optional:b,slots:L={},slotProps:B={},StepIconComponent:V,StepIconProps:X,...ie}=n,{alternativeLabel:de,orientation:ae}=ze.useContext(DB),{active:U,disabled:ve,completed:Se,icon:Pe}=ze.useContext(MY),Me=d||Pe;let Ie=V;Me&&!Ie&&(Ie=l1t);const Ve={...n,active:U,alternativeLabel:de,completed:Se,disabled:ve,error:s,orientation:ae},Ze=c1t(Ve),Je={slots:L,slotProps:{stepIcon:X,...o,...B}},[nt,ut]=Nu("root",{elementType:f1t,externalForwardedProps:{...Je,...ie},ownerState:Ve,ref:r,className:Vo(Ze.root,a)}),[ht,_t]=Nu("label",{elementType:d1t,externalForwardedProps:Je,ownerState:Ve}),[Dt,qt]=Nu("stepIcon",{elementType:Ie,externalForwardedProps:Je,ownerState:Ve});return Ke.jsxs(nt,{...ut,children:[Me||Dt?Ke.jsx(h1t,{className:Ze.iconContainer,ownerState:Ve,children:Ke.jsx(Dt,{completed:Se,active:U,error:s,icon:Me,...qt})}):null,Ke.jsxs(p1t,{className:Ze.labelContainer,ownerState:Ve,children:[i?Ke.jsx(ht,{..._t,className:Vo(Ze.label,_t?.className),children:i}):null,b]})]})});U9e.muiName="StepLabel";function v1t(t){return Al("MuiStepButton",t)}const eSe=Ml("MuiStepButton",["root","horizontal","vertical","touchRipple"]),m1t=t=>{const{classes:e,orientation:r}=t;return Cs({root:["root",r],touchRipple:["touchRipple"]},v1t,e)},g1t=fa(ZS,{name:"MuiStepButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[{[`& .${eSe.touchRipple}`]:e.touchRipple},e.root,e[r.orientation]]}})({width:"100%",padding:"24px 16px",margin:"-24px -16px",boxSizing:"content-box",[`& .${eSe.touchRipple}`]:{color:"rgba(0, 0, 0, 0.3)"},variants:[{props:{orientation:"vertical"},style:{justifyContent:"flex-start",padding:"8px",margin:"-8px"}}]}),y1t=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiStepButton"}),{children:i,className:a,icon:o,optional:s,...d}=n,{disabled:b,active:L}=ze.useContext(MY),{orientation:B}=ze.useContext(DB),V={...n,orientation:B},X=m1t(V),ie={icon:o,optional:s},de=LN(i,["StepLabel"])?ze.cloneElement(i,ie):Ke.jsx(U9e,{...ie,children:i});return Ke.jsx(g1t,{focusRipple:!0,disabled:b,TouchRippleProps:{className:X.touchRipple},className:Vo(X.root,a),ref:r,ownerState:V,"aria-current":L?"step":void 0,...d,children:de})});function b1t(t){return Al("MuiStepConnector",t)}Ml("MuiStepConnector",["root","horizontal","vertical","alternativeLabel","active","completed","disabled","line","lineHorizontal","lineVertical"]);const x1t=t=>{const{classes:e,orientation:r,alternativeLabel:n,active:i,completed:a,disabled:o}=t,s={root:["root",r,n&&"alternativeLabel",i&&"active",a&&"completed",o&&"disabled"],line:["line",`line${ys(r)}`]};return Cs(s,b1t,e)},_1t=fa("div",{name:"MuiStepConnector",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[r.orientation],r.alternativeLabel&&e.alternativeLabel,r.completed&&e.completed]}})({flex:"1 1 auto",variants:[{props:{orientation:"vertical"},style:{marginLeft:12}},{props:{alternativeLabel:!0},style:{position:"absolute",top:12,left:"calc(-50% + 20px)",right:"calc(50% + 20px)"}}]}),w1t=fa("span",{name:"MuiStepConnector",slot:"Line",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.line,e[`line${ys(r.orientation)}`]]}})(yu(({theme:t})=>{const e=t.palette.mode==="light"?t.palette.grey[400]:t.palette.grey[600];return{display:"block",borderColor:t.vars?t.vars.palette.StepConnector.border:e,variants:[{props:{orientation:"horizontal"},style:{borderTopStyle:"solid",borderTopWidth:1}},{props:{orientation:"vertical"},style:{borderLeftStyle:"solid",borderLeftWidth:1,minHeight:24}}]}})),S1t=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiStepConnector"}),{className:i,...a}=n,{alternativeLabel:o,orientation:s="horizontal"}=ze.useContext(DB),{active:d,disabled:b,completed:L}=ze.useContext(MY),B={...n,alternativeLabel:o,orientation:s,active:d,completed:L,disabled:b},V=x1t(B);return Ke.jsx(_1t,{className:Vo(V.root,i),ref:r,ownerState:B,...a,children:Ke.jsx(w1t,{className:V.line,ownerState:B})})});function T1t(t){return Al("MuiStepper",t)}Ml("MuiStepper",["root","horizontal","vertical","nonLinear","alternativeLabel"]);const E1t=t=>{const{orientation:e,nonLinear:r,alternativeLabel:n,classes:i}=t;return Cs({root:["root",e,r&&"nonLinear",n&&"alternativeLabel"]},T1t,i)},A1t=fa("div",{name:"MuiStepper",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[r.orientation],r.alternativeLabel&&e.alternativeLabel,r.nonLinear&&e.nonLinear]}})({display:"flex",variants:[{props:{orientation:"horizontal"},style:{flexDirection:"row",alignItems:"center"}},{props:{orientation:"vertical"},style:{flexDirection:"column"}},{props:{alternativeLabel:!0},style:{alignItems:"flex-start"}}]}),C1t=Ke.jsx(S1t,{}),M1t=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiStepper"}),{activeStep:i=0,alternativeLabel:a=!1,children:o,className:s,component:d="div",connector:b=C1t,nonLinear:L=!1,orientation:B="horizontal",...V}=n,X={...n,nonLinear:L,alternativeLabel:a,orientation:B,component:d},ie=E1t(X),de=ze.Children.toArray(o).filter(Boolean),ae=de.map((ve,Se)=>ze.cloneElement(ve,{index:Se,last:Se+1===de.length,...ve.props})),U=ze.useMemo(()=>({activeStep:i,alternativeLabel:a,connector:b,nonLinear:L,orientation:B}),[i,a,b,L,B]);return Ke.jsx(DB.Provider,{value:U,children:Ke.jsx(A1t,{as:d,ownerState:X,className:Vo(ie.root,s),ref:r,...V,children:ae})})});function R1t(t){return Al("MuiSwitch",t)}const L2=Ml("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),k1t=t=>{const{classes:e,edge:r,size:n,color:i,checked:a,disabled:o}=t,s={root:["root",r&&`edge${ys(r)}`,`size${ys(n)}`],switchBase:["switchBase",`color${ys(i)}`,a&&"checked",o&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},d=Cs(s,R1t,e);return{...e,...d}},I1t=fa("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.edge&&e[`edge${ys(r.edge)}`],e[`size${ys(r.size)}`]]}})({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${L2.thumb}`]:{width:16,height:16},[`& .${L2.switchBase}`]:{padding:4,[`&.${L2.checked}`]:{transform:"translateX(16px)"}}}}]}),P1t=fa(pme,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.switchBase,{[`& .${L2.input}`]:e.input},r.color!=="default"&&e[`color${ys(r.color)}`]]}})(yu(({theme:t})=>({position:"absolute",top:0,left:0,zIndex:1,color:t.vars?t.vars.palette.Switch.defaultColor:`${t.palette.mode==="light"?t.palette.common.white:t.palette.grey[300]}`,transition:t.transitions.create(["left","transform"],{duration:t.transitions.duration.shortest}),[`&.${L2.checked}`]:{transform:"translateX(20px)"},[`&.${L2.disabled}`]:{color:t.vars?t.vars.palette.Switch.defaultDisabledColor:`${t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[600]}`},[`&.${L2.checked} + .${L2.track}`]:{opacity:.5},[`&.${L2.disabled} + .${L2.track}`]:{opacity:t.vars?t.vars.opacity.switchTrackDisabled:`${t.palette.mode==="light"?.12:.2}`},[`& .${L2.input}`]:{left:"-100%",width:"300%"}})),yu(({theme:t})=>({"&:hover":{backgroundColor:t.alpha((t.vars||t).palette.action.active,(t.vars||t).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(t.palette).filter(Yv(["light"])).map(([e])=>({props:{color:e},style:{[`&.${L2.checked}`]:{color:(t.vars||t).palette[e].main,"&:hover":{backgroundColor:t.alpha((t.vars||t).palette[e].main,(t.vars||t).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${L2.disabled}`]:{color:t.vars?t.vars.palette.Switch[`${e}DisabledColor`]:`${t.palette.mode==="light"?t.lighten(t.palette[e].main,.62):t.darken(t.palette[e].main,.55)}`}},[`&.${L2.checked} + .${L2.track}`]:{backgroundColor:(t.vars||t).palette[e].main}}}))]}))),D1t=fa("span",{name:"MuiSwitch",slot:"Track"})(yu(({theme:t})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:t.transitions.create(["opacity","background-color"],{duration:t.transitions.duration.shortest}),backgroundColor:t.vars?t.vars.palette.common.onBackground:`${t.palette.mode==="light"?t.palette.common.black:t.palette.common.white}`,opacity:t.vars?t.vars.opacity.switchTrack:`${t.palette.mode==="light"?.38:.3}`}))),L1t=fa("span",{name:"MuiSwitch",slot:"Thumb"})(yu(({theme:t})=>({boxShadow:(t.vars||t).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}))),I9=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiSwitch"}),{className:i,color:a="primary",edge:o=!1,size:s="medium",sx:d,slots:b={},slotProps:L={},...B}=n,V={...n,color:a,edge:o,size:s},X=k1t(V),ie={slots:b,slotProps:L},[de,ae]=Nu("root",{className:Vo(X.root,i),elementType:I1t,externalForwardedProps:ie,ownerState:V,additionalProps:{sx:d}}),[U,ve]=Nu("thumb",{className:X.thumb,elementType:L1t,externalForwardedProps:ie,ownerState:V}),Se=Ke.jsx(U,{...ve}),[Pe,Me]=Nu("track",{className:X.track,elementType:D1t,externalForwardedProps:ie,ownerState:V});return Ke.jsxs(de,{...ae,children:[Ke.jsx(P1t,{type:"checkbox",icon:Se,checkedIcon:Se,ref:r,ownerState:V,...B,classes:{...X,root:X.switchBase},slots:{...b.switchBase&&{root:b.switchBase},...b.input&&{input:b.input}},slotProps:{...L.switchBase&&{root:typeof L.switchBase=="function"?L.switchBase(V):L.switchBase},input:{role:"switch"},...L.input&&{input:typeof L.input=="function"?L.input(V):L.input}}}),Ke.jsx(Pe,{...Me})]})});function O1t(t){return Al("MuiTab",t)}const C3=Ml("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper","icon"]),N1t=t=>{const{classes:e,textColor:r,fullWidth:n,wrapped:i,icon:a,label:o,selected:s,disabled:d}=t,b={root:["root",a&&o&&"labelIcon",`textColor${ys(r)}`,n&&"fullWidth",i&&"wrapped",s&&"selected",d&&"disabled"],icon:["iconWrapper","icon"]};return Cs(b,O1t,e)},F1t=fa(ZS,{name:"MuiTab",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.label&&r.icon&&e.labelIcon,e[`textColor${ys(r.textColor)}`],r.fullWidth&&e.fullWidth,r.wrapped&&e.wrapped,{[`& .${C3.iconWrapper}`]:e.iconWrapper},{[`& .${C3.icon}`]:e.icon}]}})(yu(({theme:t})=>({...t.typography.button,maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center",lineHeight:1.25,variants:[{props:({ownerState:e})=>e.label&&(e.iconPosition==="top"||e.iconPosition==="bottom"),style:{flexDirection:"column"}},{props:({ownerState:e})=>e.label&&e.iconPosition!=="top"&&e.iconPosition!=="bottom",style:{flexDirection:"row"}},{props:({ownerState:e})=>e.icon&&e.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:e,iconPosition:r})=>e.icon&&e.label&&r==="top",style:{[`& > .${C3.icon}`]:{marginBottom:6}}},{props:({ownerState:e,iconPosition:r})=>e.icon&&e.label&&r==="bottom",style:{[`& > .${C3.icon}`]:{marginTop:6}}},{props:({ownerState:e,iconPosition:r})=>e.icon&&e.label&&r==="start",style:{[`& > .${C3.icon}`]:{marginRight:t.spacing(1)}}},{props:({ownerState:e,iconPosition:r})=>e.icon&&e.label&&r==="end",style:{[`& > .${C3.icon}`]:{marginLeft:t.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${C3.selected}`]:{opacity:1},[`&.${C3.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(t.vars||t).palette.text.secondary,[`&.${C3.selected}`]:{color:(t.vars||t).palette.primary.main},[`&.${C3.disabled}`]:{color:(t.vars||t).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(t.vars||t).palette.text.secondary,[`&.${C3.selected}`]:{color:(t.vars||t).palette.secondary.main},[`&.${C3.disabled}`]:{color:(t.vars||t).palette.text.disabled}}},{props:({ownerState:e})=>e.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"}},{props:({ownerState:e})=>e.wrapped,style:{fontSize:t.typography.pxToRem(12)}}]}))),QN=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiTab"}),{className:i,disabled:a=!1,disableFocusRipple:o=!1,fullWidth:s,icon:d,iconPosition:b="top",indicator:L,label:B,onChange:V,onClick:X,onFocus:ie,selected:de,selectionFollowsFocus:ae,textColor:U="inherit",value:ve,wrapped:Se=!1,...Pe}=n,Me={...n,disabled:a,disableFocusRipple:o,selected:de,icon:!!d,iconPosition:b,label:!!B,fullWidth:s,textColor:U,wrapped:Se},Ie=N1t(Me),Ve=d&&B&&ze.isValidElement(d)?ze.cloneElement(d,{className:Vo(Ie.icon,d.props.className)}):d,Ze=nt=>{!de&&V&&V(nt,ve),X&&X(nt)},Je=nt=>{ae&&!de&&V&&V(nt,ve),ie&&ie(nt)};return Ke.jsxs(F1t,{focusRipple:!o,className:Vo(Ie.root,i),ref:r,role:"tab","aria-selected":de,disabled:a,onClick:Ze,onFocus:Je,ownerState:Me,tabIndex:de?0:-1,...Pe,children:[b==="top"||b==="start"?Ke.jsxs(ze.Fragment,{children:[Ve,B]}):Ke.jsxs(ze.Fragment,{children:[B,Ve]}),L]})}),H9e=ze.createContext();function z1t(t){return Al("MuiTable",t)}Ml("MuiTable",["root","stickyHeader"]);const B1t=t=>{const{classes:e,stickyHeader:r}=t;return Cs({root:["root",r&&"stickyHeader"]},z1t,e)},U1t=fa("table",{name:"MuiTable",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.stickyHeader&&e.stickyHeader]}})(yu(({theme:t})=>({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":{...t.typography.body2,padding:t.spacing(2),color:(t.vars||t).palette.text.secondary,textAlign:"left",captionSide:"bottom"},variants:[{props:({ownerState:e})=>e.stickyHeader,style:{borderCollapse:"separate"}}]}))),tSe="table",H1t=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiTable"}),{className:i,component:a=tSe,padding:o="normal",size:s="medium",stickyHeader:d=!1,...b}=n,L={...n,component:a,padding:o,size:s,stickyHeader:d},B=B1t(L),V=ze.useMemo(()=>({padding:o,size:s,stickyHeader:d}),[o,s,d]);return Ke.jsx(H9e.Provider,{value:V,children:Ke.jsx(U1t,{as:a,role:a===tSe?null:"table",ref:r,className:Vo(B.root,i),ownerState:L,...b})})}),RY=ze.createContext();function j1t(t){return Al("MuiTableBody",t)}Ml("MuiTableBody",["root"]);const V1t=t=>{const{classes:e}=t;return Cs({root:["root"]},j1t,e)},q1t=fa("tbody",{name:"MuiTableBody",slot:"Root"})({display:"table-row-group"}),G1t={variant:"body"},rSe="tbody",$1t=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiTableBody"}),{className:i,component:a=rSe,...o}=n,s={...n,component:a},d=V1t(s);return Ke.jsx(RY.Provider,{value:G1t,children:Ke.jsx(q1t,{className:Vo(d.root,i),as:a,ref:r,role:a===rSe?null:"rowgroup",ownerState:s,...o})})});function W1t(t){return Al("MuiTableCell",t)}const Y1t=Ml("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),X1t=t=>{const{classes:e,variant:r,align:n,padding:i,size:a,stickyHeader:o}=t,s={root:["root",r,o&&"stickyHeader",n!=="inherit"&&`align${ys(n)}`,i!=="normal"&&`padding${ys(i)}`,`size${ys(a)}`]};return Cs(s,W1t,e)},Z1t=fa("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[r.variant],e[`size${ys(r.size)}`],r.padding!=="normal"&&e[`padding${ys(r.padding)}`],r.align!=="inherit"&&e[`align${ys(r.align)}`],r.stickyHeader&&e.stickyHeader]}})(yu(({theme:t})=>({...t.typography.body2,display:"table-cell",verticalAlign:"inherit",borderBottom:t.vars?`1px solid ${t.vars.palette.TableCell.border}`:`1px solid
    ${t.palette.mode==="light"?t.lighten(t.alpha(t.palette.divider,1),.88):t.darken(t.alpha(t.palette.divider,1),.68)}`,textAlign:"left",padding:16,variants:[{props:{variant:"head"},style:{color:(t.vars||t).palette.text.primary,lineHeight:t.typography.pxToRem(24),fontWeight:t.typography.fontWeightMedium}},{props:{variant:"body"},style:{color:(t.vars||t).palette.text.primary}},{props:{variant:"footer"},style:{color:(t.vars||t).palette.text.secondary,lineHeight:t.typography.pxToRem(21),fontSize:t.typography.pxToRem(12)}},{props:{size:"small"},style:{padding:"6px 16px",[`&.${Y1t.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}}},{props:{padding:"checkbox"},style:{width:48,padding:"0 0 0 4px"}},{props:{padding:"none"},style:{padding:0}},{props:{align:"left"},style:{textAlign:"left"}},{props:{align:"center"},style:{textAlign:"center"}},{props:{align:"right"},style:{textAlign:"right",flexDirection:"row-reverse"}},{props:{align:"justify"},style:{textAlign:"justify"}},{props:({ownerState:e})=>e.stickyHeader,style:{position:"sticky",top:0,zIndex:2,backgroundColor:(t.vars||t).palette.background.default}}]}))),e8=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiTableCell"}),{align:i="inherit",className:a,component:o,padding:s,scope:d,size:b,sortDirection:L,variant:B,...V}=n,X=ze.useContext(H9e),ie=ze.useContext(RY),de=ie&&ie.variant==="head";let ae;o?ae=o:ae=de?"th":"td";let U=d;ae==="td"?U=void 0:!U&&de&&(U="col");const ve=B||ie&&ie.variant,Se={...n,align:i,component:ae,padding:s||(X&&X.padding?X.padding:"normal"),size:b||(X&&X.size?X.size:"medium"),sortDirection:L,stickyHeader:ve==="head"&&X&&X.stickyHeader,variant:ve},Pe=X1t(Se);let Me=null;return L&&(Me=L==="asc"?"ascending":"descending"),Ke.jsx(Z1t,{as:ae,ref:r,className:Vo(Pe.root,a),"aria-sort":Me,scope:U,ownerState:Se,...V})});function K1t(t){return Al("MuiTableHead",t)}Ml("MuiTableHead",["root"]);const J1t=t=>{const{classes:e}=t;return Cs({root:["root"]},K1t,e)},Q1t=fa("thead",{name:"MuiTableHead",slot:"Root"})({display:"table-header-group"}),ebt={variant:"head"},nSe="thead",tbt=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiTableHead"}),{className:i,component:a=nSe,...o}=n,s={...n,component:a},d=J1t(s);return Ke.jsx(RY.Provider,{value:ebt,children:Ke.jsx(Q1t,{as:a,className:Vo(d.root,i),ref:r,role:a===nSe?null:"rowgroup",ownerState:s,...o})})}),j9e=Hu(Ke.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"})),V9e=Hu(Ke.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}));function rbt(t){return Al("MuiTablePaginationActions",t)}Ml("MuiTablePaginationActions",["root"]);const nbt=t=>{const{classes:e}=t;return Cs({root:["root"]},rbt,e)},ibt=fa("div",{name:"MuiTablePaginationActions",slot:"Root"})({}),abt=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiTablePaginationActions"}),{backIconButtonProps:i,className:a,count:o,disabled:s=!1,getItemAriaLabel:d,nextIconButtonProps:b,onPageChange:L,page:B,rowsPerPage:V,showFirstButton:X,showLastButton:ie,slots:de={},slotProps:ae={},...U}=n,ve=Kv(),Pe=nbt(n),Me=Ar=>{L(Ar,0)},Ie=Ar=>{L(Ar,B-1)},Ve=Ar=>{L(Ar,B+1)},Ze=Ar=>{L(Ar,Math.max(0,Math.ceil(o/V)-1))},Je=de.firstButton??Zf,nt=de.lastButton??Zf,ut=de.nextButton??Zf,ht=de.previousButton??Zf,_t=de.firstButtonIcon??j0t,Dt=de.lastButtonIcon??V0t,qt=de.nextButtonIcon??V9e,Lt=de.previousButtonIcon??j9e,dr=ve?nt:Je,Zt=ve?ut:ht,Cr=ve?ht:ut,yt=ve?Je:nt,Vt=ve?ae.lastButton:ae.firstButton,Er=ve?ae.nextButton:ae.previousButton,sr=ve?ae.previousButton:ae.nextButton,or=ve?ae.firstButton:ae.lastButton;return Ke.jsxs(ibt,{ref:r,className:Vo(Pe.root,a),...U,children:[X&&Ke.jsx(dr,{onClick:Me,disabled:s||B===0,"aria-label":d("first",B),title:d("first",B),...Vt,children:ve?Ke.jsx(Dt,{...ae.lastButtonIcon}):Ke.jsx(_t,{...ae.firstButtonIcon})}),Ke.jsx(Zt,{onClick:Ie,disabled:s||B===0,color:"inherit","aria-label":d("previous",B),title:d("previous",B),...Er??i,children:ve?Ke.jsx(qt,{...ae.nextButtonIcon}):Ke.jsx(Lt,{...ae.previousButtonIcon})}),Ke.jsx(Cr,{onClick:Ve,disabled:s||(o!==-1?B>=Math.ceil(o/V)-1:!1),color:"inherit","aria-label":d("next",B),title:d("next",B),...sr??b,children:ve?Ke.jsx(Lt,{...ae.previousButtonIcon}):Ke.jsx(qt,{...ae.nextButtonIcon})}),ie&&Ke.jsx(yt,{onClick:Ze,disabled:s||B>=Math.ceil(o/V)-1,"aria-label":d("last",B),title:d("last",B),...or,children:ve?Ke.jsx(_t,{...ae.firstButtonIcon}):Ke.jsx(Dt,{...ae.lastButtonIcon})})]})});function obt(t){return Al("MuiTablePagination",t)}const lL=Ml("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]);var iSe;const sbt=fa(e8,{name:"MuiTablePagination",slot:"Root"})(yu(({theme:t})=>({overflow:"auto",color:(t.vars||t).palette.text.primary,fontSize:t.typography.pxToRem(14),"&:last-child":{padding:0}}))),lbt=fa(CB,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(t,e)=>({[`& .${lL.actions}`]:e.actions,...e.toolbar})})(yu(({theme:t})=>({minHeight:52,paddingRight:2,[`${t.breakpoints.up("xs")} and (orientation: landscape)`]:{minHeight:52},[t.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},[`& .${lL.actions}`]:{flexShrink:0,marginLeft:20}}))),ubt=fa("div",{name:"MuiTablePagination",slot:"Spacer"})({flex:"1 1 100%"}),cbt=fa("p",{name:"MuiTablePagination",slot:"SelectLabel"})(yu(({theme:t})=>({...t.typography.body2,flexShrink:0}))),fbt=fa(m4,{name:"MuiTablePagination",slot:"Select",overridesResolver:(t,e)=>({[`& .${lL.selectIcon}`]:e.selectIcon,[`& .${lL.select}`]:e.select,...e.input,...e.selectRoot})})({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8,[`& .${lL.select}`]:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"}}),dbt=fa(Xx,{name:"MuiTablePagination",slot:"MenuItem"})({}),hbt=fa("p",{name:"MuiTablePagination",slot:"DisplayedRows"})(yu(({theme:t})=>({...t.typography.body2,flexShrink:0})));function pbt({from:t,to:e,count:r}){return`${t}–${e} of ${r!==-1?r:`more than ${e}`}`}function vbt(t){return`Go to ${t} page`}const mbt=t=>{const{classes:e}=t;return Cs({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},obt,e)},gbt=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiTablePagination"}),{ActionsComponent:i=abt,backIconButtonProps:a,colSpan:o,component:s=e8,count:d,disabled:b=!1,getItemAriaLabel:L=vbt,labelDisplayedRows:B=pbt,labelRowsPerPage:V="Rows per page:",nextIconButtonProps:X,onPageChange:ie,onRowsPerPageChange:de,page:ae,rowsPerPage:U,rowsPerPageOptions:ve=[10,25,50,100],SelectProps:Se={},showFirstButton:Pe=!1,showLastButton:Me=!1,slotProps:Ie={},slots:Ve={},...Ze}=n,Je=n,nt=mbt(Je),ut=Ie?.select??Se,ht=ut.native?"option":dbt;let _t;(s===e8||s==="td")&&(_t=o||1e3);const Dt=Vd(ut.id),qt=Vd(ut.labelId),Lt=()=>d===-1?(ae+1)*U:U===-1?d:Math.min(d,(ae+1)*U),dr={slots:Ve,slotProps:Ie},[Zt,Cr]=Nu("root",{ref:r,className:nt.root,elementType:sbt,externalForwardedProps:{...dr,component:s,...Ze},ownerState:Je,additionalProps:{colSpan:_t}}),[yt,Vt]=Nu("toolbar",{className:nt.toolbar,elementType:lbt,externalForwardedProps:dr,ownerState:Je}),[Er,sr]=Nu("spacer",{className:nt.spacer,elementType:ubt,externalForwardedProps:dr,ownerState:Je}),[or,Ar]=Nu("selectLabel",{className:nt.selectLabel,elementType:cbt,externalForwardedProps:dr,ownerState:Je,additionalProps:{id:qt}}),[Ir,_n]=Nu("select",{className:nt.select,elementType:fbt,externalForwardedProps:dr,ownerState:Je}),[Un,Qn]=Nu("menuItem",{className:nt.menuItem,elementType:ht,externalForwardedProps:dr,ownerState:Je}),[Jn,Vn]=Nu("displayedRows",{className:nt.displayedRows,elementType:hbt,externalForwardedProps:dr,ownerState:Je});return Ke.jsx(Zt,{...Cr,children:Ke.jsxs(yt,{...Vt,children:[Ke.jsx(Er,{...sr}),ve.length>1&&Ke.jsx(or,{...Ar,children:V}),ve.length>1&&Ke.jsx(Ir,{variant:"standard",...!ut.variant&&{input:iSe||(iSe=Ke.jsx(IB,{}))},value:U,onChange:de,id:Dt,labelId:qt,...ut,classes:{...ut.classes,root:Vo(nt.input,nt.selectRoot,(ut.classes||{}).root),select:Vo(nt.select,(ut.classes||{}).select),icon:Vo(nt.selectIcon,(ut.classes||{}).icon)},disabled:b,..._n,children:ve.map(jn=>ze.createElement(Un,{...Qn,key:jn.label?jn.label:jn,value:jn.value?jn.value:jn},jn.label?jn.label:jn))}),Ke.jsx(Jn,{...Vn,children:B({from:d===0?0:ae*U+1,to:Lt(),count:d===-1?-1:d,page:ae})}),Ke.jsx(i,{className:nt.actions,backIconButtonProps:a,count:d,nextIconButtonProps:X,onPageChange:ie,page:ae,rowsPerPage:U,showFirstButton:Pe,showLastButton:Me,slotProps:Ie.actions,slots:Ve.actions,getItemAriaLabel:L,disabled:b})]})})});function ybt(t){return Al("MuiTableRow",t)}const aSe=Ml("MuiTableRow",["root","selected","hover","head","footer"]),bbt=t=>{const{classes:e,selected:r,hover:n,head:i,footer:a}=t;return Cs({root:["root",r&&"selected",n&&"hover",i&&"head",a&&"footer"]},ybt,e)},xbt=fa("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.head&&e.head,r.footer&&e.footer]}})(yu(({theme:t})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${aSe.hover}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${aSe.selected}`]:{backgroundColor:t.alpha((t.vars||t).palette.primary.main,(t.vars||t).palette.action.selectedOpacity),"&:hover":{backgroundColor:t.alpha((t.vars||t).palette.primary.main,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.hoverOpacity}`)}}}))),oSe="tr",kY=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiTableRow"}),{className:i,component:a=oSe,hover:o=!1,selected:s=!1,...d}=n,b=ze.useContext(RY),L={...n,component:a,hover:o,selected:s,head:b&&b.variant==="head",footer:b&&b.variant==="footer"},B=bbt(L);return Ke.jsx(xbt,{as:a,ref:r,className:Vo(B.root,i),role:a===oSe?null:"row",ownerState:L,...d})});function _bt(t){return(1+Math.sin(Math.PI*t-Math.PI/2))/2}function wbt(t,e,r,n={},i=()=>{}){const{ease:a=_bt,duration:o=300}=n;let s=null;const d=e[t];let b=!1;const L=()=>{b=!0},B=V=>{if(b){i(new Error("Animation cancelled"));return}s===null&&(s=V);const X=Math.min(1,(V-s)/o);if(e[t]=a(X)*(r-d)+d,X>=1){requestAnimationFrame(()=>{i(null)});return}requestAnimationFrame(B)};return d===r?(i(new Error("Element already at target position")),L):(requestAnimationFrame(B),L)}const Sbt={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function Tbt(t){const{onChange:e,...r}=t,n=ze.useRef(),i=ze.useRef(null),a=()=>{n.current=i.current.offsetHeight-i.current.clientHeight};return Ah(()=>{const o=d4(()=>{const d=n.current;a(),d!==n.current&&e(n.current)}),s=cE(i.current);return s.addEventListener("resize",o),()=>{o.clear(),s.removeEventListener("resize",o)}},[e]),ze.useEffect(()=>{a(),e(n.current)},[e]),Ke.jsx("div",{style:Sbt,...r,ref:i})}function Ebt(t){return Al("MuiTabScrollButton",t)}const Abt=Ml("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),Cbt=t=>{const{classes:e,orientation:r,disabled:n}=t;return Cs({root:["root",r,n&&"disabled"]},Ebt,e)},Mbt=fa(ZS,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.orientation&&e[r.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${Abt.disabled}`]:{opacity:0},variants:[{props:{orientation:"vertical"},style:{width:"100%",height:40,"& svg":{transform:"var(--TabScrollButton-svgRotate)"}}}]}),Rbt=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiTabScrollButton"}),{className:i,slots:a={},slotProps:o={},direction:s,orientation:d,disabled:b,...L}=n,B=Kv(),V={isRtl:B,...n},X=Cbt(V),ie=a.StartScrollButtonIcon??j9e,de=a.EndScrollButtonIcon??V9e,ae=Kd({elementType:ie,externalSlotProps:o.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:V}),U=Kd({elementType:de,externalSlotProps:o.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:V});return Ke.jsx(Mbt,{component:"div",className:Vo(X.root,i),ref:r,role:null,ownerState:V,tabIndex:null,...L,style:{...L.style,...d==="vertical"&&{"--TabScrollButton-svgRotate":`rotate(${B?-90:90}deg)`}},children:s==="left"?Ke.jsx(ie,{...ae}):Ke.jsx(de,{...U})})});function kbt(t){return Al("MuiTabs",t)}const nG=Ml("MuiTabs",["root","vertical","list","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),sSe=(t,e)=>t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:t.firstChild,lSe=(t,e)=>t===e?t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:t.lastChild,lj=(t,e,r)=>{let n=!1,i=r(t,e);for(;i;){if(i===t.firstChild){if(n)return;n=!0}const a=i.disabled||i.getAttribute("aria-disabled")==="true";if(!i.hasAttribute("tabindex")||a)i=r(t,i);else{i.focus();return}}},Ibt=t=>{const{vertical:e,fixed:r,hideScrollbar:n,scrollableX:i,scrollableY:a,centered:o,scrollButtonsHideMobile:s,classes:d}=t;return Cs({root:["root",e&&"vertical"],scroller:["scroller",r&&"fixed",n&&"hideScrollbar",i&&"scrollableX",a&&"scrollableY"],list:["list","flexContainer",e&&"flexContainerVertical",e&&"vertical",o&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",s&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[n&&"hideScrollbar"]},kbt,d)},Pbt=fa("div",{name:"MuiTabs",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[{[`& .${nG.scrollButtons}`]:e.scrollButtons},{[`& .${nG.scrollButtons}`]:r.scrollButtonsHideMobile&&e.scrollButtonsHideMobile},e.root,r.vertical&&e.vertical]}})(yu(({theme:t})=>({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.scrollButtonsHideMobile,style:{[`& .${nG.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}}}]}))),Dbt=fa("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.scroller,r.fixed&&e.fixed,r.hideScrollbar&&e.hideScrollbar,r.scrollableX&&e.scrollableX,r.scrollableY&&e.scrollableY]}})({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap",variants:[{props:({ownerState:t})=>t.fixed,style:{overflowX:"hidden",width:"100%"}},{props:({ownerState:t})=>t.hideScrollbar,style:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},{props:({ownerState:t})=>t.scrollableX,style:{overflowX:"auto",overflowY:"hidden"}},{props:({ownerState:t})=>t.scrollableY,style:{overflowY:"auto",overflowX:"hidden"}}]}),Lbt=fa("div",{name:"MuiTabs",slot:"List",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.list,e.flexContainer,r.vertical&&e.flexContainerVertical,r.centered&&e.centered]}})({display:"flex",variants:[{props:({ownerState:t})=>t.vertical,style:{flexDirection:"column"}},{props:({ownerState:t})=>t.centered,style:{justifyContent:"center"}}]}),Obt=fa("span",{name:"MuiTabs",slot:"Indicator"})(yu(({theme:t})=>({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create(),variants:[{props:{indicatorColor:"primary"},style:{backgroundColor:(t.vars||t).palette.primary.main}},{props:{indicatorColor:"secondary"},style:{backgroundColor:(t.vars||t).palette.secondary.main}},{props:({ownerState:e})=>e.vertical,style:{height:"100%",width:2,right:0}}]}))),Nbt=fa(Tbt)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),uSe={},LB=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiTabs"}),i=cy(),a=Kv(),{"aria-label":o,"aria-labelledby":s,action:d,centered:b=!1,children:L,className:B,component:V="div",allowScrollButtonsMobile:X=!1,indicatorColor:ie="primary",onChange:de,orientation:ae="horizontal",ScrollButtonComponent:U,scrollButtons:ve="auto",selectionFollowsFocus:Se,slots:Pe={},slotProps:Me={},TabIndicatorProps:Ie={},TabScrollButtonProps:Ve={},textColor:Ze="primary",value:Je,variant:nt="standard",visibleScrollbar:ut=!1,...ht}=n,_t=nt==="scrollable",Dt=ae==="vertical",qt=Dt?"scrollTop":"scrollLeft",Lt=Dt?"top":"left",dr=Dt?"bottom":"right",Zt=Dt?"clientHeight":"clientWidth",Cr=Dt?"height":"width",yt={...n,component:V,allowScrollButtonsMobile:X,indicatorColor:ie,orientation:ae,vertical:Dt,scrollButtons:ve,textColor:Ze,variant:nt,visibleScrollbar:ut,fixed:!_t,hideScrollbar:_t&&!ut,scrollableX:_t&&!Dt,scrollableY:_t&&Dt,centered:b&&!_t,scrollButtonsHideMobile:!X},Vt=Ibt(yt),Er=Kd({elementType:Pe.StartScrollButtonIcon,externalSlotProps:Me.startScrollButtonIcon,ownerState:yt}),sr=Kd({elementType:Pe.EndScrollButtonIcon,externalSlotProps:Me.endScrollButtonIcon,ownerState:yt}),[or,Ar]=ze.useState(!1),[Ir,_n]=ze.useState(uSe),[Un,Qn]=ze.useState(!1),[Jn,Vn]=ze.useState(!1),[jn,Lr]=ze.useState(!1),[Yn,On]=ze.useState({overflow:"hidden",scrollbarWidth:0}),Sn=new Map,bn=ze.useRef(null),Mn=ze.useRef(null),gi={slots:Pe,slotProps:{indicator:Ie,scrollButton:Ve,...Me}},Oi=()=>{const da=bn.current;let Xa;if(da){const _s=da.getBoundingClientRect();Xa={clientWidth:da.clientWidth,scrollLeft:da.scrollLeft,scrollTop:da.scrollTop,scrollWidth:da.scrollWidth,top:_s.top,bottom:_s.bottom,left:_s.left,right:_s.right}}let Oo;if(da&&Je!==!1){const _s=Mn.current.children;if(_s.length>0){const nl=_s[Sn.get(Je)];Oo=nl?nl.getBoundingClientRect():null}}return{tabsMeta:Xa,tabMeta:Oo}},Pa=vl(()=>{const{tabsMeta:da,tabMeta:Xa}=Oi();let Oo=0,_s;Dt?(_s="top",Xa&&da&&(Oo=Xa.top-da.top+da.scrollTop)):(_s=a?"right":"left",Xa&&da&&(Oo=(a?-1:1)*(Xa[_s]-da[_s]+da.scrollLeft)));const nl={[_s]:Oo,[Cr]:Xa?Xa[Cr]:0};if(typeof Ir[_s]!="number"||typeof Ir[Cr]!="number")_n(nl);else{const vu=Math.abs(Ir[_s]-nl[_s]),zl=Math.abs(Ir[Cr]-nl[Cr]);(vu>=1||zl>=1)&&_n(nl)}}),va=(da,{animation:Xa=!0}={})=>{Xa?wbt(qt,bn.current,da,{duration:i.transitions.duration.standard}):bn.current[qt]=da},ti=da=>{let Xa=bn.current[qt];Dt?Xa+=da:Xa+=da*(a?-1:1),va(Xa)},Tn=()=>{const da=bn.current[Zt];let Xa=0;const Oo=Array.from(Mn.current.children);for(let _s=0;_s<Oo.length;_s+=1){const nl=Oo[_s];if(Xa+nl[Zt]>da){_s===0&&(Xa=da);break}Xa+=nl[Zt]}return Xa},bi=()=>{ti(-1*Tn())},Wn=()=>{ti(Tn())},[Ei,{onChange:Ki,...sa}]=Nu("scrollbar",{className:Vo(Vt.scrollableX,Vt.hideScrollbar),elementType:Nbt,shouldForwardComponentProp:!0,externalForwardedProps:gi,ownerState:yt}),xa=ze.useCallback(da=>{Ki?.(da),On({overflow:null,scrollbarWidth:da})},[Ki]),[Qa,is]=Nu("scrollButtons",{className:Vo(Vt.scrollButtons,Ve.className),elementType:Rbt,externalForwardedProps:gi,ownerState:yt,additionalProps:{orientation:ae,slots:{StartScrollButtonIcon:Pe.startScrollButtonIcon||Pe.StartScrollButtonIcon,EndScrollButtonIcon:Pe.endScrollButtonIcon||Pe.EndScrollButtonIcon},slotProps:{startScrollButtonIcon:Er,endScrollButtonIcon:sr}}}),go=()=>{const da={};da.scrollbarSizeListener=_t?Ke.jsx(Ei,{...sa,onChange:xa}):null;const Oo=_t&&(ve==="auto"&&(Un||Jn)||ve===!0);return da.scrollButtonStart=Oo?Ke.jsx(Qa,{direction:a?"right":"left",onClick:bi,disabled:!Un,...is}):null,da.scrollButtonEnd=Oo?Ke.jsx(Qa,{direction:a?"left":"right",onClick:Wn,disabled:!Jn,...is}):null,da},Co=vl(da=>{const{tabsMeta:Xa,tabMeta:Oo}=Oi();if(!(!Oo||!Xa)){if(Oo[Lt]<Xa[Lt]){const _s=Xa[qt]+(Oo[Lt]-Xa[Lt]);va(_s,{animation:da})}else if(Oo[dr]>Xa[dr]){const _s=Xa[qt]+(Oo[dr]-Xa[dr]);va(_s,{animation:da})}}}),Ko=vl(()=>{_t&&ve!==!1&&Lr(!jn)});ze.useEffect(()=>{const da=d4(()=>{bn.current&&Pa()});let Xa;const Oo=vu=>{vu.forEach(zl=>{zl.removedNodes.forEach(jl=>{Xa?.unobserve(jl)}),zl.addedNodes.forEach(jl=>{Xa?.observe(jl)})}),da(),Ko()},_s=cE(bn.current);_s.addEventListener("resize",da);let nl;return typeof ResizeObserver<"u"&&(Xa=new ResizeObserver(da),Array.from(Mn.current.children).forEach(vu=>{Xa.observe(vu)})),typeof MutationObserver<"u"&&(nl=new MutationObserver(Oo),nl.observe(Mn.current,{childList:!0})),()=>{da.clear(),_s.removeEventListener("resize",da),nl?.disconnect(),Xa?.disconnect()}},[Pa,Ko]),ze.useEffect(()=>{const da=Array.from(Mn.current.children),Xa=da.length;if(typeof IntersectionObserver<"u"&&Xa>0&&_t&&ve!==!1){const Oo=da[0],_s=da[Xa-1],nl={root:bn.current,threshold:.99},vu=Js=>{Qn(!Js[0].isIntersecting)},zl=new IntersectionObserver(vu,nl);zl.observe(Oo);const jl=Js=>{Vn(!Js[0].isIntersecting)},Il=new IntersectionObserver(jl,nl);return Il.observe(_s),()=>{zl.disconnect(),Il.disconnect()}}},[_t,ve,jn,L?.length]),ze.useEffect(()=>{Ar(!0)},[]),ze.useEffect(()=>{Pa()}),ze.useEffect(()=>{Co(uSe!==Ir)},[Co,Ir]),ze.useImperativeHandle(d,()=>({updateIndicator:Pa,updateScrollButtons:Ko}),[Pa,Ko]);const[Zi,za]=Nu("indicator",{className:Vo(Vt.indicator,Ie.className),elementType:Obt,externalForwardedProps:gi,ownerState:yt,additionalProps:{style:Ir}}),Ss=Ke.jsx(Zi,{...za});let ba=0;const po=ze.Children.map(L,da=>{if(!ze.isValidElement(da))return null;const Xa=da.props.value===void 0?ba:da.props.value;Sn.set(Xa,ba);const Oo=Xa===Je;return ba+=1,ze.cloneElement(da,{fullWidth:nt==="fullWidth",indicator:Oo&&!or&&Ss,selected:Oo,selectionFollowsFocus:Se,onChange:de,textColor:Ze,value:Xa,...ba===1&&Je===!1&&!da.props.tabIndex?{tabIndex:0}:{}})}),Ys=da=>{if(da.altKey||da.shiftKey||da.ctrlKey||da.metaKey)return;const Xa=Mn.current,Oo=Lm(Xa).activeElement;if(Oo.getAttribute("role")!=="tab")return;let nl=ae==="horizontal"?"ArrowLeft":"ArrowUp",vu=ae==="horizontal"?"ArrowRight":"ArrowDown";switch(ae==="horizontal"&&a&&(nl="ArrowRight",vu="ArrowLeft"),da.key){case nl:da.preventDefault(),lj(Xa,Oo,lSe);break;case vu:da.preventDefault(),lj(Xa,Oo,sSe);break;case"Home":da.preventDefault(),lj(Xa,null,sSe);break;case"End":da.preventDefault(),lj(Xa,null,lSe);break}},$s=go(),[Gs,Ns]=Nu("root",{ref:r,className:Vo(Vt.root,B),elementType:Pbt,externalForwardedProps:{...gi,...ht,component:V},ownerState:yt}),[Hl,nu]=Nu("scroller",{ref:bn,className:Vt.scroller,elementType:Dbt,externalForwardedProps:gi,ownerState:yt,additionalProps:{style:{overflow:Yn.overflow,[Dt?`margin${a?"Left":"Right"}`:"marginBottom"]:ut?void 0:-Yn.scrollbarWidth}}}),[su,Mc]=Nu("list",{ref:Mn,className:Vo(Vt.list,Vt.flexContainer),elementType:Lbt,externalForwardedProps:gi,ownerState:yt,getSlotProps:da=>({...da,onKeyDown:Xa=>{Ys(Xa),da.onKeyDown?.(Xa)}})});return Ke.jsxs(Gs,{...Ns,children:[$s.scrollButtonStart,$s.scrollbarSizeListener,Ke.jsxs(Hl,{...nu,children:[Ke.jsx(su,{"aria-label":o,"aria-labelledby":s,"aria-orientation":ae==="vertical"?"vertical":null,role:"tablist",...Mc,children:po}),or&&Ss]}),$s.scrollButtonEnd]})});function Fbt(t){return Al("MuiTextField",t)}Ml("MuiTextField",["root"]);const zbt={standard:TY,filled:SY,outlined:AY},Bbt=t=>{const{classes:e}=t;return Cs({root:["root"]},Fbt,e)},Ubt=fa(j5,{name:"MuiTextField",slot:"Root"})({}),zg=ze.forwardRef(function(e,r){const n=Uu({props:e,name:"MuiTextField"}),{autoComplete:i,autoFocus:a=!1,children:o,className:s,color:d="primary",defaultValue:b,disabled:L=!1,error:B=!1,FormHelperTextProps:V,fullWidth:X=!1,helperText:ie,id:de,InputLabelProps:ae,inputProps:U,InputProps:ve,inputRef:Se,label:Pe,maxRows:Me,minRows:Ie,multiline:Ve=!1,name:Ze,onBlur:Je,onChange:nt,onFocus:ut,placeholder:ht,required:_t=!1,rows:Dt,select:qt=!1,SelectProps:Lt,slots:dr={},slotProps:Zt={},type:Cr,value:yt,variant:Vt="outlined",...Er}=n,sr={...n,autoFocus:a,color:d,disabled:L,error:B,fullWidth:X,multiline:Ve,required:_t,select:qt,variant:Vt},or=Bbt(sr),Ar=Vd(de),Ir=ie&&Ar?`${Ar}-helper-text`:void 0,_n=Pe&&Ar?`${Ar}-label`:void 0,Un=zbt[Vt],Qn={slots:dr,slotProps:{input:ve,inputLabel:ae,htmlInput:U,formHelperText:V,select:Lt,...Zt}},Jn={},Vn=Qn.slotProps.inputLabel;Vt==="outlined"&&(Vn&&typeof Vn.shrink<"u"&&(Jn.notched=Vn.shrink),Jn.label=Pe),qt&&((!Lt||!Lt.native)&&(Jn.id=void 0),Jn["aria-describedby"]=void 0);const[jn,Lr]=Nu("root",{elementType:Ubt,shouldForwardComponentProp:!0,externalForwardedProps:{...Qn,...Er},ownerState:sr,className:Vo(or.root,s),ref:r,additionalProps:{disabled:L,error:B,fullWidth:X,required:_t,color:d,variant:Vt}}),[Yn,On]=Nu("input",{elementType:Un,externalForwardedProps:Qn,additionalProps:Jn,ownerState:sr}),[Sn,bn]=Nu("inputLabel",{elementType:jL,externalForwardedProps:Qn,ownerState:sr}),[Mn,gi]=Nu("htmlInput",{elementType:"input",externalForwardedProps:Qn,ownerState:sr}),[Oi,Pa]=Nu("formHelperText",{elementType:w1,externalForwardedProps:Qn,ownerState:sr}),[va,ti]=Nu("select",{elementType:m4,externalForwardedProps:Qn,ownerState:sr}),Tn=Ke.jsx(Yn,{"aria-describedby":Ir,autoComplete:i,autoFocus:a,defaultValue:b,fullWidth:X,multiline:Ve,name:Ze,rows:Dt,maxRows:Me,minRows:Ie,type:Cr,value:yt,id:Ar,inputRef:Se,onBlur:Je,onChange:nt,onFocus:ut,placeholder:ht,inputProps:gi,slots:{input:dr.htmlInput?Mn:void 0},...On});return Ke.jsxs(jn,{...Lr,children:[Pe!=null&&Pe!==""&&Ke.jsx(Sn,{htmlFor:Ar,id:_n,...bn,children:Pe}),qt?Ke.jsx(va,{"aria-describedby":Ir,id:Ar,labelId:_n,value:yt,input:Tn,...ti,children:o}):Tn,ie&&Ke.jsx(Oi,{id:Ir,...Pa,children:ie})]})});function Hbt(t){return Al("MuiToggleButton",t)}const XJ=Ml("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"]),jbt=ze.createContext({}),Vbt=ze.createContext(void 0);function qbt(t,e){return e===void 0||t===void 0?!1:Array.isArray(e)?e.includes(t):t===e}const Gbt=t=>{const{classes:e,fullWidth:r,selected:n,disabled:i,size:a,color:o}=t,s={root:["root",n&&"selected",i&&"disabled",r&&"fullWidth",`size${ys(a)}`,o]};return Cs(s,Hbt,e)},$bt=fa(ZS,{name:"MuiToggleButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[`size${ys(r.size)}`]]}})(yu(({theme:t})=>({...t.typography.button,borderRadius:(t.vars||t).shape.borderRadius,padding:11,border:`1px solid ${(t.vars||t).palette.divider}`,color:(t.vars||t).palette.action.active,[`&.${XJ.disabled}`]:{color:(t.vars||t).palette.action.disabled,border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`},"&:hover":{textDecoration:"none",backgroundColor:t.alpha((t.vars||t).palette.text.primary,(t.vars||t).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[{props:{color:"standard"},style:{[`&.${XJ.selected}`]:{color:(t.vars||t).palette.text.primary,backgroundColor:t.alpha((t.vars||t).palette.text.primary,(t.vars||t).palette.action.selectedOpacity),"&:hover":{backgroundColor:t.alpha((t.vars||t).palette.text.primary,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:t.alpha((t.vars||t).palette.text.primary,(t.vars||t).palette.action.selectedOpacity)}}}}},...Object.entries(t.palette).filter(Yv()).map(([e])=>({props:{color:e},style:{[`&.${XJ.selected}`]:{color:(t.vars||t).palette[e].main,backgroundColor:t.alpha((t.vars||t).palette[e].main,(t.vars||t).palette.action.selectedOpacity),"&:hover":{backgroundColor:t.alpha((t.vars||t).palette[e].main,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:t.alpha((t.vars||t).palette[e].main,(t.vars||t).palette.action.selectedOpacity)}}}}})),{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{padding:7,fontSize:t.typography.pxToRem(13)}},{props:{size:"large"},style:{padding:15,fontSize:t.typography.pxToRem(15)}}]}))),Wbt=ze.forwardRef(function(e,r){const{value:n,...i}=ze.useContext(jbt),a=ze.useContext(Vbt),o=gL({...i,selected:qbt(e.value,n)},e),s=Uu({props:o,name:"MuiToggleButton"}),{children:d,className:b,color:L="standard",disabled:B=!1,disableFocusRipple:V=!1,fullWidth:X=!1,onChange:ie,onClick:de,selected:ae,size:U="medium",value:ve,...Se}=s,Pe={...s,color:L,disabled:B,disableFocusRipple:V,fullWidth:X,size:U},Me=Gbt(Pe),Ie=Ze=>{de&&(de(Ze,ve),Ze.defaultPrevented)||ie&&ie(Ze,ve)},Ve=a||"";return Ke.jsx($bt,{className:Vo(i.className,Me.root,b,Ve),disabled:B,focusRipple:!V,ref:r,onClick:Ie,onChange:ie,value:ve,ownerState:Pe,"aria-pressed":ae,...Se,children:d})}),IY=jze({themeId:Y3}),Ybt=Hu(Ke.jsx("path",{d:"m1 9 2 2c4.97-4.97 13.03-4.97 18 0l2-2C16.93 2.93 7.08 2.93 1 9m8 8 3 3 3-3c-1.65-1.66-4.34-1.66-6 0m-4-4 2 2c2.76-2.76 7.24-2.76 10 0l2-2C15.14 9.14 8.87 9.14 5 13"})),Xbt=Hu(Ke.jsx("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M17 13l-5 5-5-5h3V9h4v4z"})),Zbt=Hu(Ke.jsx("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"})),Kbt=Hu(Ke.jsx("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8m0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4z"})),Jbt=Hu(Ke.jsx("path",{d:"M10 6.35V4.26c-.8.21-1.55.54-2.23.96l1.46 1.46c.25-.12.5-.24.77-.33m-7.14-.94 2.36 2.36C4.45 8.99 4 10.44 4 12c0 2.21.91 4.2 2.36 5.64L4 20h6v-6l-2.24 2.24C6.68 15.15 6 13.66 6 12c0-1 .25-1.94.68-2.77l8.08 8.08c-.25.13-.5.25-.77.34v2.09c.8-.21 1.55-.54 2.23-.96l2.36 2.36 1.27-1.27L4.14 4.14zM20 4h-6v6l2.24-2.24C17.32 8.85 18 10.34 18 12c0 1-.25 1.94-.68 2.77l1.46 1.46C19.55 15.01 20 13.56 20 12c0-2.21-.91-4.2-2.36-5.64z"})),cSe=t=>{let e;const r=new Set,n=(b,L)=>{const B=typeof b=="function"?b(e):b;if(!Object.is(B,e)){const V=e;e=L??(typeof B!="object"||B===null)?B:Object.assign({},e,B),r.forEach(X=>X(e,V))}},i=()=>e,s={setState:n,getState:i,getInitialState:()=>d,subscribe:b=>(r.add(b),()=>r.delete(b))},d=e=t(n,i,s);return s},q9e=(t=>t?cSe(t):cSe),Qbt=t=>t;function ext(t,e=Qbt){const r=wi.useSyncExternalStore(t.subscribe,wi.useCallback(()=>e(t.getState()),[t,e]),wi.useCallback(()=>e(t.getInitialState()),[t,e]));return wi.useDebugValue(r),r}const fSe=t=>{const e=q9e(t),r=n=>ext(e,n);return Object.assign(r,e),r},PY=(t=>t?fSe(t):fSe);function G9e(t,e){return function(){return t.apply(e,arguments)}}const{toString:txt}=Object.prototype,{getPrototypeOf:Eme}=Object,{iterator:DY,toStringTag:$9e}=Symbol,LY=(t=>e=>{const r=txt.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),tM=t=>(t=t.toLowerCase(),e=>LY(e)===t),OY=t=>e=>typeof e===t,{isArray:U8}=Array,t8=OY("undefined");function OB(t){return t!==null&&!t8(t)&&t.constructor!==null&&!t8(t.constructor)&&$S(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const W9e=tM("ArrayBuffer");function rxt(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&W9e(t.buffer),e}const nxt=OY("string"),$S=OY("function"),Y9e=OY("number"),NB=t=>t!==null&&typeof t=="object",ixt=t=>t===!0||t===!1,iG=t=>{if(LY(t)!=="object")return!1;const e=Eme(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!($9e in t)&&!(DY in t)},axt=t=>{if(!NB(t)||OB(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},oxt=tM("Date"),sxt=tM("File"),lxt=tM("Blob"),uxt=tM("FileList"),cxt=t=>NB(t)&&$S(t.pipe),fxt=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||$S(t.append)&&((e=LY(t))==="formdata"||e==="object"&&$S(t.toString)&&t.toString()==="[object FormData]"))},dxt=tM("URLSearchParams"),[hxt,pxt,vxt,mxt]=["ReadableStream","Request","Response","Headers"].map(tM),gxt=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function FB(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,i;if(typeof t!="object"&&(t=[t]),U8(t))for(n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else{if(OB(t))return;const a=r?Object.getOwnPropertyNames(t):Object.keys(t),o=a.length;let s;for(n=0;n<o;n++)s=a[n],e.call(null,t[s],s,t)}}function X9e(t,e){if(OB(t))return null;e=e.toLowerCase();const r=Object.keys(t);let n=r.length,i;for(;n-- >0;)if(i=r[n],e===i.toLowerCase())return i;return null}const KD=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Z9e=t=>!t8(t)&&t!==KD;function khe(){const{caseless:t,skipUndefined:e}=Z9e(this)&&this||{},r={},n=(i,a)=>{const o=t&&X9e(r,a)||a;iG(r[o])&&iG(i)?r[o]=khe(r[o],i):iG(i)?r[o]=khe({},i):U8(i)?r[o]=i.slice():(!e||!t8(i))&&(r[o]=i)};for(let i=0,a=arguments.length;i<a;i++)arguments[i]&&FB(arguments[i],n);return r}const yxt=(t,e,r,{allOwnKeys:n}={})=>(FB(e,(i,a)=>{r&&$S(i)?t[a]=G9e(i,r):t[a]=i},{allOwnKeys:n}),t),bxt=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),xxt=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},_xt=(t,e,r,n)=>{let i,a,o;const s={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),a=i.length;a-- >0;)o=i[a],(!n||n(o,t,e))&&!s[o]&&(e[o]=t[o],s[o]=!0);t=r!==!1&&Eme(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},wxt=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return n!==-1&&n===r},Sxt=t=>{if(!t)return null;if(U8(t))return t;let e=t.length;if(!Y9e(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},Txt=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Eme(Uint8Array)),Ext=(t,e)=>{const n=(t&&t[DY]).call(t);let i;for(;(i=n.next())&&!i.done;){const a=i.value;e.call(t,a[0],a[1])}},Axt=(t,e)=>{let r;const n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},Cxt=tM("HTMLFormElement"),Mxt=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),dSe=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),Rxt=tM("RegExp"),K9e=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};FB(r,(i,a)=>{let o;(o=e(i,a,t))!==!1&&(n[a]=o||i)}),Object.defineProperties(t,n)},kxt=t=>{K9e(t,(e,r)=>{if($S(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=t[r];if($S(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Ixt=(t,e)=>{const r={},n=i=>{i.forEach(a=>{r[a]=!0})};return U8(t)?n(t):n(String(t).split(e)),r},Pxt=()=>{},Dxt=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function Lxt(t){return!!(t&&$S(t.append)&&t[$9e]==="FormData"&&t[DY])}const Oxt=t=>{const e=new Array(10),r=(n,i)=>{if(NB(n)){if(e.indexOf(n)>=0)return;if(OB(n))return n;if(!("toJSON"in n)){e[i]=n;const a=U8(n)?[]:{};return FB(n,(o,s)=>{const d=r(o,i+1);!t8(d)&&(a[s]=d)}),e[i]=void 0,a}}return n};return r(t,0)},Nxt=tM("AsyncFunction"),Fxt=t=>t&&(NB(t)||$S(t))&&$S(t.then)&&$S(t.catch),J9e=((t,e)=>t?setImmediate:e?((r,n)=>(KD.addEventListener("message",({source:i,data:a})=>{i===KD&&a===r&&n.length&&n.shift()()},!1),i=>{n.push(i),KD.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",$S(KD.postMessage)),zxt=typeof queueMicrotask<"u"?queueMicrotask.bind(KD):typeof process<"u"&&process.nextTick||J9e,Bxt=t=>t!=null&&$S(t[DY]),Ks={isArray:U8,isArrayBuffer:W9e,isBuffer:OB,isFormData:fxt,isArrayBufferView:rxt,isString:nxt,isNumber:Y9e,isBoolean:ixt,isObject:NB,isPlainObject:iG,isEmptyObject:axt,isReadableStream:hxt,isRequest:pxt,isResponse:vxt,isHeaders:mxt,isUndefined:t8,isDate:oxt,isFile:sxt,isBlob:lxt,isRegExp:Rxt,isFunction:$S,isStream:cxt,isURLSearchParams:dxt,isTypedArray:Txt,isFileList:uxt,forEach:FB,merge:khe,extend:yxt,trim:gxt,stripBOM:bxt,inherits:xxt,toFlatObject:_xt,kindOf:LY,kindOfTest:tM,endsWith:wxt,toArray:Sxt,forEachEntry:Ext,matchAll:Axt,isHTMLForm:Cxt,hasOwnProperty:dSe,hasOwnProp:dSe,reduceDescriptors:K9e,freezeMethods:kxt,toObjectSet:Ixt,toCamelCase:Mxt,noop:Pxt,toFiniteNumber:Dxt,findKey:X9e,global:KD,isContextDefined:Z9e,isSpecCompliantForm:Lxt,toJSONObject:Oxt,isAsyncFn:Nxt,isThenable:Fxt,setImmediate:J9e,asap:zxt,isIterable:Bxt};function Oh(t,e,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}Ks.inherits(Oh,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:Ks.toJSONObject(this.config),code:this.code,status:this.status}}});const Q9e=Oh.prototype,eBe={};["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(t=>{eBe[t]={value:t}});Object.defineProperties(Oh,eBe);Object.defineProperty(Q9e,"isAxiosError",{value:!0});Oh.from=(t,e,r,n,i,a)=>{const o=Object.create(Q9e);Ks.toFlatObject(t,o,function(L){return L!==Error.prototype},b=>b!=="isAxiosError");const s=t&&t.message?t.message:"Error",d=e==null&&t?t.code:e;return Oh.call(o,s,d,r,n,i),t&&o.cause==null&&Object.defineProperty(o,"cause",{value:t,configurable:!0}),o.name=t&&t.name||"Error",a&&Object.assign(o,a),o};const Uxt=null;function Ihe(t){return Ks.isPlainObject(t)||Ks.isArray(t)}function tBe(t){return Ks.endsWith(t,"[]")?t.slice(0,-2):t}function hSe(t,e,r){return t?t.concat(e).map(function(i,a){return i=tBe(i),!r&&a?"["+i+"]":i}).join(r?".":""):e}function Hxt(t){return Ks.isArray(t)&&!t.some(Ihe)}const jxt=Ks.toFlatObject(Ks,{},null,function(e){return/^is[A-Z]/.test(e)});function NY(t,e,r){if(!Ks.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=Ks.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(de,ae){return!Ks.isUndefined(ae[de])});const n=r.metaTokens,i=r.visitor||L,a=r.dots,o=r.indexes,d=(r.Blob||typeof Blob<"u"&&Blob)&&Ks.isSpecCompliantForm(e);if(!Ks.isFunction(i))throw new TypeError("visitor must be a function");function b(ie){if(ie===null)return"";if(Ks.isDate(ie))return ie.toISOString();if(Ks.isBoolean(ie))return ie.toString();if(!d&&Ks.isBlob(ie))throw new Oh("Blob is not supported. Use a Buffer instead.");return Ks.isArrayBuffer(ie)||Ks.isTypedArray(ie)?d&&typeof Blob=="function"?new Blob([ie]):Buffer.from(ie):ie}function L(ie,de,ae){let U=ie;if(ie&&!ae&&typeof ie=="object"){if(Ks.endsWith(de,"{}"))de=n?de:de.slice(0,-2),ie=JSON.stringify(ie);else if(Ks.isArray(ie)&&Hxt(ie)||(Ks.isFileList(ie)||Ks.endsWith(de,"[]"))&&(U=Ks.toArray(ie)))return de=tBe(de),U.forEach(function(Se,Pe){!(Ks.isUndefined(Se)||Se===null)&&e.append(o===!0?hSe([de],Pe,a):o===null?de:de+"[]",b(Se))}),!1}return Ihe(ie)?!0:(e.append(hSe(ae,de,a),b(ie)),!1)}const B=[],V=Object.assign(jxt,{defaultVisitor:L,convertValue:b,isVisitable:Ihe});function X(ie,de){if(!Ks.isUndefined(ie)){if(B.indexOf(ie)!==-1)throw Error("Circular reference detected in "+de.join("."));B.push(ie),Ks.forEach(ie,function(U,ve){(!(Ks.isUndefined(U)||U===null)&&i.call(e,U,Ks.isString(ve)?ve.trim():ve,de,V))===!0&&X(U,de?de.concat(ve):[ve])}),B.pop()}}if(!Ks.isObject(t))throw new TypeError("data must be an object");return X(t),e}function pSe(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function Ame(t,e){this._pairs=[],t&&NY(t,this,e)}const rBe=Ame.prototype;rBe.append=function(e,r){this._pairs.push([e,r])};rBe.toString=function(e){const r=e?function(n){return e.call(this,n,pSe)}:pSe;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function Vxt(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function nBe(t,e,r){if(!e)return t;const n=r&&r.encode||Vxt;Ks.isFunction(r)&&(r={serialize:r});const i=r&&r.serialize;let a;if(i?a=i(e,r):a=Ks.isURLSearchParams(e)?e.toString():new Ame(e,r).toString(n),a){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+a}return t}class vSe{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Ks.forEach(this.handlers,function(n){n!==null&&e(n)})}}const iBe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},qxt=typeof URLSearchParams<"u"?URLSearchParams:Ame,Gxt=typeof FormData<"u"?FormData:null,$xt=typeof Blob<"u"?Blob:null,Wxt={isBrowser:!0,classes:{URLSearchParams:qxt,FormData:Gxt,Blob:$xt},protocols:["http","https","file","blob","url","data"]},Cme=typeof window<"u"&&typeof document<"u",Phe=typeof navigator=="object"&&navigator||void 0,Yxt=Cme&&(!Phe||["ReactNative","NativeScript","NS"].indexOf(Phe.product)<0),Xxt=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Zxt=Cme&&window.location.href||"http://localhost",Kxt=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Cme,hasStandardBrowserEnv:Yxt,hasStandardBrowserWebWorkerEnv:Xxt,navigator:Phe,origin:Zxt},Symbol.toStringTag,{value:"Module"})),jw={...Kxt,...Wxt};function Jxt(t,e){return NY(t,new jw.classes.URLSearchParams,{visitor:function(r,n,i,a){return jw.isNode&&Ks.isBuffer(r)?(this.append(n,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...e})}function Qxt(t){return Ks.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function e_t(t){const e={},r=Object.keys(t);let n;const i=r.length;let a;for(n=0;n<i;n++)a=r[n],e[a]=t[a];return e}function aBe(t){function e(r,n,i,a){let o=r[a++];if(o==="__proto__")return!0;const s=Number.isFinite(+o),d=a>=r.length;return o=!o&&Ks.isArray(i)?i.length:o,d?(Ks.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!s):((!i[o]||!Ks.isObject(i[o]))&&(i[o]=[]),e(r,n,i[o],a)&&Ks.isArray(i[o])&&(i[o]=e_t(i[o])),!s)}if(Ks.isFormData(t)&&Ks.isFunction(t.entries)){const r={};return Ks.forEachEntry(t,(n,i)=>{e(Qxt(n),i,r,0)}),r}return null}function t_t(t,e,r){if(Ks.isString(t))try{return(e||JSON.parse)(t),Ks.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}const zB={transitional:iBe,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,a=Ks.isObject(e);if(a&&Ks.isHTMLForm(e)&&(e=new FormData(e)),Ks.isFormData(e))return i?JSON.stringify(aBe(e)):e;if(Ks.isArrayBuffer(e)||Ks.isBuffer(e)||Ks.isStream(e)||Ks.isFile(e)||Ks.isBlob(e)||Ks.isReadableStream(e))return e;if(Ks.isArrayBufferView(e))return e.buffer;if(Ks.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Jxt(e,this.formSerializer).toString();if((s=Ks.isFileList(e))||n.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return NY(s?{"files[]":e}:e,d&&new d,this.formSerializer)}}return a||i?(r.setContentType("application/json",!1),t_t(e)):e}],transformResponse:[function(e){const r=this.transitional||zB.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(Ks.isResponse(e)||Ks.isReadableStream(e))return e;if(e&&Ks.isString(e)&&(n&&!this.responseType||i)){const o=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(e,this.parseReviver)}catch(s){if(o)throw s.name==="SyntaxError"?Oh.from(s,Oh.ERR_BAD_RESPONSE,this,null,this.response):s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:jw.classes.FormData,Blob:jw.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ks.forEach(["delete","get","head","post","put","patch"],t=>{zB.headers[t]={}});const r_t=Ks.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"]),n_t=t=>{const e={};let r,n,i;return t&&t.split(`
`).forEach(function(o){i=o.indexOf(":"),r=o.substring(0,i).trim().toLowerCase(),n=o.substring(i+1).trim(),!(!r||e[r]&&r_t[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e},mSe=Symbol("internals");function I7(t){return t&&String(t).trim().toLowerCase()}function aG(t){return t===!1||t==null?t:Ks.isArray(t)?t.map(aG):String(t)}function i_t(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}const a_t=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function ZJ(t,e,r,n,i){if(Ks.isFunction(n))return n.call(this,e,r);if(i&&(e=r),!!Ks.isString(e)){if(Ks.isString(n))return e.indexOf(n)!==-1;if(Ks.isRegExp(n))return n.test(e)}}function o_t(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function s_t(t,e){const r=Ks.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(i,a,o){return this[n].call(this,e,i,a,o)},configurable:!0})})}let WS=class{constructor(e){e&&this.set(e)}set(e,r,n){const i=this;function a(s,d,b){const L=I7(d);if(!L)throw new Error("header name must be a non-empty string");const B=Ks.findKey(i,L);(!B||i[B]===void 0||b===!0||b===void 0&&i[B]!==!1)&&(i[B||d]=aG(s))}const o=(s,d)=>Ks.forEach(s,(b,L)=>a(b,L,d));if(Ks.isPlainObject(e)||e instanceof this.constructor)o(e,r);else if(Ks.isString(e)&&(e=e.trim())&&!a_t(e))o(n_t(e),r);else if(Ks.isObject(e)&&Ks.isIterable(e)){let s={},d,b;for(const L of e){if(!Ks.isArray(L))throw TypeError("Object iterator must return a key-value pair");s[b=L[0]]=(d=s[b])?Ks.isArray(d)?[...d,L[1]]:[d,L[1]]:L[1]}o(s,r)}else e!=null&&a(r,e,n);return this}get(e,r){if(e=I7(e),e){const n=Ks.findKey(this,e);if(n){const i=this[n];if(!r)return i;if(r===!0)return i_t(i);if(Ks.isFunction(r))return r.call(this,i,n);if(Ks.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=I7(e),e){const n=Ks.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||ZJ(this,this[n],n,r)))}return!1}delete(e,r){const n=this;let i=!1;function a(o){if(o=I7(o),o){const s=Ks.findKey(n,o);s&&(!r||ZJ(n,n[s],s,r))&&(delete n[s],i=!0)}}return Ks.isArray(e)?e.forEach(a):a(e),i}clear(e){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const a=r[n];(!e||ZJ(this,this[a],a,e,!0))&&(delete this[a],i=!0)}return i}normalize(e){const r=this,n={};return Ks.forEach(this,(i,a)=>{const o=Ks.findKey(n,a);if(o){r[o]=aG(i),delete r[a];return}const s=e?o_t(a):String(a).trim();s!==a&&delete r[a],r[s]=aG(i),n[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return Ks.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=e&&Ks.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){const n=new this(e);return r.forEach(i=>n.set(i)),n}static accessor(e){const n=(this[mSe]=this[mSe]={accessors:{}}).accessors,i=this.prototype;function a(o){const s=I7(o);n[s]||(s_t(i,o),n[s]=!0)}return Ks.isArray(e)?e.forEach(a):a(e),this}};WS.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Ks.reduceDescriptors(WS.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}});Ks.freezeMethods(WS);function KJ(t,e){const r=this||zB,n=e||r,i=WS.from(n.headers);let a=n.data;return Ks.forEach(t,function(s){a=s.call(r,a,i.normalize(),e?e.status:void 0)}),i.normalize(),a}function oBe(t){return!!(t&&t.__CANCEL__)}function H8(t,e,r){Oh.call(this,t??"canceled",Oh.ERR_CANCELED,e,r),this.name="CanceledError"}Ks.inherits(H8,Oh,{__CANCEL__:!0});function sBe(t,e,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new Oh("Request failed with status code "+r.status,[Oh.ERR_BAD_REQUEST,Oh.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function l_t(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function u_t(t,e){t=t||10;const r=new Array(t),n=new Array(t);let i=0,a=0,o;return e=e!==void 0?e:1e3,function(d){const b=Date.now(),L=n[a];o||(o=b),r[i]=d,n[i]=b;let B=a,V=0;for(;B!==i;)V+=r[B++],B=B%t;if(i=(i+1)%t,i===a&&(a=(a+1)%t),b-o<e)return;const X=L&&b-L;return X?Math.round(V*1e3/X):void 0}}function c_t(t,e){let r=0,n=1e3/e,i,a;const o=(b,L=Date.now())=>{r=L,i=null,a&&(clearTimeout(a),a=null),t(...b)};return[(...b)=>{const L=Date.now(),B=L-r;B>=n?o(b,L):(i=b,a||(a=setTimeout(()=>{a=null,o(i)},n-B)))},()=>i&&o(i)]}const a$=(t,e,r=3)=>{let n=0;const i=u_t(50,250);return c_t(a=>{const o=a.loaded,s=a.lengthComputable?a.total:void 0,d=o-n,b=i(d),L=o<=s;n=o;const B={loaded:o,total:s,progress:s?o/s:void 0,bytes:d,rate:b||void 0,estimated:b&&s&&L?(s-o)/b:void 0,event:a,lengthComputable:s!=null,[e?"download":"upload"]:!0};t(B)},r)},gSe=(t,e)=>{const r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},ySe=t=>(...e)=>Ks.asap(()=>t(...e)),f_t=jw.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,jw.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(jw.origin),jw.navigator&&/(msie|trident)/i.test(jw.navigator.userAgent)):()=>!0,d_t=jw.hasStandardBrowserEnv?{write(t,e,r,n,i,a){const o=[t+"="+encodeURIComponent(e)];Ks.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),Ks.isString(n)&&o.push("path="+n),Ks.isString(i)&&o.push("domain="+i),a===!0&&o.push("secure"),document.cookie=o.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function h_t(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function p_t(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function lBe(t,e,r){let n=!h_t(e);return t&&(n||r==!1)?p_t(t,e):e}const bSe=t=>t instanceof WS?{...t}:t;function _L(t,e){e=e||{};const r={};function n(b,L,B,V){return Ks.isPlainObject(b)&&Ks.isPlainObject(L)?Ks.merge.call({caseless:V},b,L):Ks.isPlainObject(L)?Ks.merge({},L):Ks.isArray(L)?L.slice():L}function i(b,L,B,V){if(Ks.isUndefined(L)){if(!Ks.isUndefined(b))return n(void 0,b,B,V)}else return n(b,L,B,V)}function a(b,L){if(!Ks.isUndefined(L))return n(void 0,L)}function o(b,L){if(Ks.isUndefined(L)){if(!Ks.isUndefined(b))return n(void 0,b)}else return n(void 0,L)}function s(b,L,B){if(B in e)return n(b,L);if(B in t)return n(void 0,b)}const d={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(b,L,B)=>i(bSe(b),bSe(L),B,!0)};return Ks.forEach(Object.keys({...t,...e}),function(L){const B=d[L]||i,V=B(t[L],e[L],L);Ks.isUndefined(V)&&B!==s||(r[L]=V)}),r}const uBe=t=>{const e=_L({},t);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:a,headers:o,auth:s}=e;if(e.headers=o=WS.from(o),e.url=nBe(lBe(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),s&&o.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),Ks.isFormData(r)){if(jw.hasStandardBrowserEnv||jw.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(Ks.isFunction(r.getHeaders)){const d=r.getHeaders(),b=["content-type","content-length"];Object.entries(d).forEach(([L,B])=>{b.includes(L.toLowerCase())&&o.set(L,B)})}}if(jw.hasStandardBrowserEnv&&(n&&Ks.isFunction(n)&&(n=n(e)),n||n!==!1&&f_t(e.url))){const d=i&&a&&d_t.read(a);d&&o.set(i,d)}return e},v_t=typeof XMLHttpRequest<"u",m_t=v_t&&function(t){return new Promise(function(r,n){const i=uBe(t);let a=i.data;const o=WS.from(i.headers).normalize();let{responseType:s,onUploadProgress:d,onDownloadProgress:b}=i,L,B,V,X,ie;function de(){X&&X(),ie&&ie(),i.cancelToken&&i.cancelToken.unsubscribe(L),i.signal&&i.signal.removeEventListener("abort",L)}let ae=new XMLHttpRequest;ae.open(i.method.toUpperCase(),i.url,!0),ae.timeout=i.timeout;function U(){if(!ae)return;const Se=WS.from("getAllResponseHeaders"in ae&&ae.getAllResponseHeaders()),Me={data:!s||s==="text"||s==="json"?ae.responseText:ae.response,status:ae.status,statusText:ae.statusText,headers:Se,config:t,request:ae};sBe(function(Ve){r(Ve),de()},function(Ve){n(Ve),de()},Me),ae=null}"onloadend"in ae?ae.onloadend=U:ae.onreadystatechange=function(){!ae||ae.readyState!==4||ae.status===0&&!(ae.responseURL&&ae.responseURL.indexOf("file:")===0)||setTimeout(U)},ae.onabort=function(){ae&&(n(new Oh("Request aborted",Oh.ECONNABORTED,t,ae)),ae=null)},ae.onerror=function(Pe){const Me=Pe&&Pe.message?Pe.message:"Network Error",Ie=new Oh(Me,Oh.ERR_NETWORK,t,ae);Ie.event=Pe||null,n(Ie),ae=null},ae.ontimeout=function(){let Pe=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const Me=i.transitional||iBe;i.timeoutErrorMessage&&(Pe=i.timeoutErrorMessage),n(new Oh(Pe,Me.clarifyTimeoutError?Oh.ETIMEDOUT:Oh.ECONNABORTED,t,ae)),ae=null},a===void 0&&o.setContentType(null),"setRequestHeader"in ae&&Ks.forEach(o.toJSON(),function(Pe,Me){ae.setRequestHeader(Me,Pe)}),Ks.isUndefined(i.withCredentials)||(ae.withCredentials=!!i.withCredentials),s&&s!=="json"&&(ae.responseType=i.responseType),b&&([V,ie]=a$(b,!0),ae.addEventListener("progress",V)),d&&ae.upload&&([B,X]=a$(d),ae.upload.addEventListener("progress",B),ae.upload.addEventListener("loadend",X)),(i.cancelToken||i.signal)&&(L=Se=>{ae&&(n(!Se||Se.type?new H8(null,t,ae):Se),ae.abort(),ae=null)},i.cancelToken&&i.cancelToken.subscribe(L),i.signal&&(i.signal.aborted?L():i.signal.addEventListener("abort",L)));const ve=l_t(i.url);if(ve&&jw.protocols.indexOf(ve)===-1){n(new Oh("Unsupported protocol "+ve+":",Oh.ERR_BAD_REQUEST,t));return}ae.send(a||null)})},g_t=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let n=new AbortController,i;const a=function(b){if(!i){i=!0,s();const L=b instanceof Error?b:this.reason;n.abort(L instanceof Oh?L:new H8(L instanceof Error?L.message:L))}};let o=e&&setTimeout(()=>{o=null,a(new Oh(`timeout ${e} of ms exceeded`,Oh.ETIMEDOUT))},e);const s=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(b=>{b.unsubscribe?b.unsubscribe(a):b.removeEventListener("abort",a)}),t=null)};t.forEach(b=>b.addEventListener("abort",a));const{signal:d}=n;return d.unsubscribe=()=>Ks.asap(s),d}},y_t=function*(t,e){let r=t.byteLength;if(r<e){yield t;return}let n=0,i;for(;n<r;)i=n+e,yield t.slice(n,i),n=i},b_t=async function*(t,e){for await(const r of x_t(t))yield*y_t(r,e)},x_t=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:r,value:n}=await e.read();if(r)break;yield n}}finally{await e.cancel()}},xSe=(t,e,r,n)=>{const i=b_t(t,e);let a=0,o,s=d=>{o||(o=!0,n&&n(d))};return new ReadableStream({async pull(d){try{const{done:b,value:L}=await i.next();if(b){s(),d.close();return}let B=L.byteLength;if(r){let V=a+=B;r(V)}d.enqueue(new Uint8Array(L))}catch(b){throw s(b),b}},cancel(d){return s(d),i.return()}},{highWaterMark:2})},_Se=64*1024,{isFunction:uj}=Ks,__t=(({Request:t,Response:e})=>({Request:t,Response:e}))(Ks.global),{ReadableStream:wSe,TextEncoder:SSe}=Ks.global,TSe=(t,...e)=>{try{return!!t(...e)}catch{return!1}},w_t=t=>{t=Ks.merge.call({skipUndefined:!0},__t,t);const{fetch:e,Request:r,Response:n}=t,i=e?uj(e):typeof fetch=="function",a=uj(r),o=uj(n);if(!i)return!1;const s=i&&uj(wSe),d=i&&(typeof SSe=="function"?(ie=>de=>ie.encode(de))(new SSe):async ie=>new Uint8Array(await new r(ie).arrayBuffer())),b=a&&s&&TSe(()=>{let ie=!1;const de=new r(jw.origin,{body:new wSe,method:"POST",get duplex(){return ie=!0,"half"}}).headers.has("Content-Type");return ie&&!de}),L=o&&s&&TSe(()=>Ks.isReadableStream(new n("").body)),B={stream:L&&(ie=>ie.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(ie=>{!B[ie]&&(B[ie]=(de,ae)=>{let U=de&&de[ie];if(U)return U.call(de);throw new Oh(`Response type '${ie}' is not supported`,Oh.ERR_NOT_SUPPORT,ae)})});const V=async ie=>{if(ie==null)return 0;if(Ks.isBlob(ie))return ie.size;if(Ks.isSpecCompliantForm(ie))return(await new r(jw.origin,{method:"POST",body:ie}).arrayBuffer()).byteLength;if(Ks.isArrayBufferView(ie)||Ks.isArrayBuffer(ie))return ie.byteLength;if(Ks.isURLSearchParams(ie)&&(ie=ie+""),Ks.isString(ie))return(await d(ie)).byteLength},X=async(ie,de)=>{const ae=Ks.toFiniteNumber(ie.getContentLength());return ae??V(de)};return async ie=>{let{url:de,method:ae,data:U,signal:ve,cancelToken:Se,timeout:Pe,onDownloadProgress:Me,onUploadProgress:Ie,responseType:Ve,headers:Ze,withCredentials:Je="same-origin",fetchOptions:nt}=uBe(ie),ut=e||fetch;Ve=Ve?(Ve+"").toLowerCase():"text";let ht=g_t([ve,Se&&Se.toAbortSignal()],Pe),_t=null;const Dt=ht&&ht.unsubscribe&&(()=>{ht.unsubscribe()});let qt;try{if(Ie&&b&&ae!=="get"&&ae!=="head"&&(qt=await X(Ze,U))!==0){let Vt=new r(de,{method:"POST",body:U,duplex:"half"}),Er;if(Ks.isFormData(U)&&(Er=Vt.headers.get("content-type"))&&Ze.setContentType(Er),Vt.body){const[sr,or]=gSe(qt,a$(ySe(Ie)));U=xSe(Vt.body,_Se,sr,or)}}Ks.isString(Je)||(Je=Je?"include":"omit");const Lt=a&&"credentials"in r.prototype,dr={...nt,signal:ht,method:ae.toUpperCase(),headers:Ze.normalize().toJSON(),body:U,duplex:"half",credentials:Lt?Je:void 0};_t=a&&new r(de,dr);let Zt=await(a?ut(_t,nt):ut(de,dr));const Cr=L&&(Ve==="stream"||Ve==="response");if(L&&(Me||Cr&&Dt)){const Vt={};["status","statusText","headers"].forEach(Ar=>{Vt[Ar]=Zt[Ar]});const Er=Ks.toFiniteNumber(Zt.headers.get("content-length")),[sr,or]=Me&&gSe(Er,a$(ySe(Me),!0))||[];Zt=new n(xSe(Zt.body,_Se,sr,()=>{or&&or(),Dt&&Dt()}),Vt)}Ve=Ve||"text";let yt=await B[Ks.findKey(B,Ve)||"text"](Zt,ie);return!Cr&&Dt&&Dt(),await new Promise((Vt,Er)=>{sBe(Vt,Er,{data:yt,headers:WS.from(Zt.headers),status:Zt.status,statusText:Zt.statusText,config:ie,request:_t})})}catch(Lt){throw Dt&&Dt(),Lt&&Lt.name==="TypeError"&&/Load failed|fetch/i.test(Lt.message)?Object.assign(new Oh("Network Error",Oh.ERR_NETWORK,ie,_t),{cause:Lt.cause||Lt}):Oh.from(Lt,Lt&&Lt.code,ie,_t)}}},S_t=new Map,cBe=t=>{let e=t?t.env:{};const{fetch:r,Request:n,Response:i}=e,a=[n,i,r];let o=a.length,s=o,d,b,L=S_t;for(;s--;)d=a[s],b=L.get(d),b===void 0&&L.set(d,b=s?new Map:w_t(e)),L=b;return b};cBe();const Dhe={http:Uxt,xhr:m_t,fetch:{get:cBe}};Ks.forEach(Dhe,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const ESe=t=>`- ${t}`,T_t=t=>Ks.isFunction(t)||t===null||t===!1,fBe={getAdapter:(t,e)=>{t=Ks.isArray(t)?t:[t];const{length:r}=t;let n,i;const a={};for(let o=0;o<r;o++){n=t[o];let s;if(i=n,!T_t(n)&&(i=Dhe[(s=String(n)).toLowerCase()],i===void 0))throw new Oh(`Unknown adapter '${s}'`);if(i&&(Ks.isFunction(i)||(i=i.get(e))))break;a[s||"#"+o]=i}if(!i){const o=Object.entries(a).map(([d,b])=>`adapter ${d} `+(b===!1?"is not supported by the environment":"is not available in the build"));let s=r?o.length>1?`since :
`+o.map(ESe).join(`
`):" "+ESe(o[0]):"as no adapter specified";throw new Oh("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return i},adapters:Dhe};function JJ(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new H8(null,t)}function ASe(t){return JJ(t),t.headers=WS.from(t.headers),t.data=KJ.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),fBe.getAdapter(t.adapter||zB.adapter,t)(t).then(function(n){return JJ(t),n.data=KJ.call(t,t.transformResponse,n),n.headers=WS.from(n.headers),n},function(n){return oBe(n)||(JJ(t),n&&n.response&&(n.response.data=KJ.call(t,t.transformResponse,n.response),n.response.headers=WS.from(n.response.headers))),Promise.reject(n)})}const dBe="1.12.2",FY={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{FY[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const CSe={};FY.transitional=function(e,r,n){function i(a,o){return"[Axios v"+dBe+"] Transitional option '"+a+"'"+o+(n?". "+n:"")}return(a,o,s)=>{if(e===!1)throw new Oh(i(o," has been removed"+(r?" in "+r:"")),Oh.ERR_DEPRECATED);return r&&!CSe[o]&&(CSe[o]=!0,console.warn(i(o," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(a,o,s):!0}};FY.spelling=function(e){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function E_t(t,e,r){if(typeof t!="object")throw new Oh("options must be an object",Oh.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let i=n.length;for(;i-- >0;){const a=n[i],o=e[a];if(o){const s=t[a],d=s===void 0||o(s,a,t);if(d!==!0)throw new Oh("option "+a+" must be "+d,Oh.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Oh("Unknown option "+a,Oh.ERR_BAD_OPTION)}}const oG={assertOptions:E_t,validators:FY},a5=oG.validators;let uL=class{constructor(e){this.defaults=e||{},this.interceptors={request:new vSe,response:new vSe}}async request(e,r){try{return await this._request(e,r)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const a=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?a&&!String(n.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(n.stack+=`
`+a):n.stack=a}catch{}}throw n}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=_L(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:a}=r;n!==void 0&&oG.assertOptions(n,{silentJSONParsing:a5.transitional(a5.boolean),forcedJSONParsing:a5.transitional(a5.boolean),clarifyTimeoutError:a5.transitional(a5.boolean)},!1),i!=null&&(Ks.isFunction(i)?r.paramsSerializer={serialize:i}:oG.assertOptions(i,{encode:a5.function,serialize:a5.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),oG.assertOptions(r,{baseUrl:a5.spelling("baseURL"),withXsrfToken:a5.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=a&&Ks.merge(a.common,a[r.method]);a&&Ks.forEach(["delete","get","head","post","put","patch","common"],ie=>{delete a[ie]}),r.headers=WS.concat(o,a);const s=[];let d=!0;this.interceptors.request.forEach(function(de){typeof de.runWhen=="function"&&de.runWhen(r)===!1||(d=d&&de.synchronous,s.unshift(de.fulfilled,de.rejected))});const b=[];this.interceptors.response.forEach(function(de){b.push(de.fulfilled,de.rejected)});let L,B=0,V;if(!d){const ie=[ASe.bind(this),void 0];for(ie.unshift(...s),ie.push(...b),V=ie.length,L=Promise.resolve(r);B<V;)L=L.then(ie[B++],ie[B++]);return L}V=s.length;let X=r;for(;B<V;){const ie=s[B++],de=s[B++];try{X=ie(X)}catch(ae){de.call(this,ae);break}}try{L=ASe.call(this,X)}catch(ie){return Promise.reject(ie)}for(B=0,V=b.length;B<V;)L=L.then(b[B++],b[B++]);return L}getUri(e){e=_L(this.defaults,e);const r=lBe(e.baseURL,e.url,e.allowAbsoluteUrls);return nBe(r,e.params,e.paramsSerializer)}};Ks.forEach(["delete","get","head","options"],function(e){uL.prototype[e]=function(r,n){return this.request(_L(n||{},{method:e,url:r,data:(n||{}).data}))}});Ks.forEach(["post","put","patch"],function(e){function r(n){return function(a,o,s){return this.request(_L(s||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}uL.prototype[e]=r(),uL.prototype[e+"Form"]=r(!0)});let A_t=class hBe{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(a){r=a});const n=this;this.promise.then(i=>{if(!n._listeners)return;let a=n._listeners.length;for(;a-- >0;)n._listeners[a](i);n._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(s=>{n.subscribe(s),a=s}).then(i);return o.cancel=function(){n.unsubscribe(a)},o},e(function(a,o,s){n.reason||(n.reason=new H8(a,o,s),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const e=new AbortController,r=n=>{e.abort(n)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new hBe(function(i){e=i}),cancel:e}}};function C_t(t){return function(r){return t.apply(null,r)}}function M_t(t){return Ks.isObject(t)&&t.isAxiosError===!0}const Lhe={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};Object.entries(Lhe).forEach(([t,e])=>{Lhe[e]=t});function pBe(t){const e=new uL(t),r=G9e(uL.prototype.request,e);return Ks.extend(r,uL.prototype,e,{allOwnKeys:!0}),Ks.extend(r,e,null,{allOwnKeys:!0}),r.create=function(i){return pBe(_L(t,i))},r}const Q1=pBe(zB);Q1.Axios=uL;Q1.CanceledError=H8;Q1.CancelToken=A_t;Q1.isCancel=oBe;Q1.VERSION=dBe;Q1.toFormData=NY;Q1.AxiosError=Oh;Q1.Cancel=Q1.CanceledError;Q1.all=function(e){return Promise.all(e)};Q1.spread=C_t;Q1.isAxiosError=M_t;Q1.mergeConfig=_L;Q1.AxiosHeaders=WS;Q1.formToJSON=t=>aBe(Ks.isHTMLForm(t)?new FormData(t):t);Q1.getAdapter=fBe.getAdapter;Q1.HttpStatusCode=Lhe;Q1.default=Q1;const{Axios:Xwr,AxiosError:Zwr,CanceledError:Kwr,isCancel:Jwr,CancelToken:Qwr,VERSION:e2r,all:t2r,Cancel:r2r,isAxiosError:n2r,spread:i2r,toFormData:a2r,AxiosHeaders:o2r,HttpStatusCode:s2r,formToJSON:l2r,getAdapter:u2r,mergeConfig:c2r}=Q1;new TextEncoder;const R_t=4096;function vBe(t,e,r){let n=e;const i=n+r,a=[];let o="";for(;n<i;){const s=t[n++];if((s&128)===0)a.push(s);else if((s&224)===192){const d=t[n++]&63;a.push((s&31)<<6|d)}else if((s&240)===224){const d=t[n++]&63,b=t[n++]&63;a.push((s&31)<<12|d<<6|b)}else if((s&248)===240){const d=t[n++]&63,b=t[n++]&63,L=t[n++]&63;let B=(s&7)<<18|d<<12|b<<6|L;B>65535&&(B-=65536,a.push(B>>>10&1023|55296),B=56320|B&1023),a.push(B)}else a.push(s);a.length>=R_t&&(o+=String.fromCharCode(...a),a.length=0)}return a.length>0&&(o+=String.fromCharCode(...a)),o}const k_t=new TextDecoder,I_t=200;function P_t(t,e,r){const n=t.subarray(e,e+r);return k_t.decode(n)}function D_t(t,e,r){return r>I_t?P_t(t,e,r):vBe(t,e,r)}class cj{constructor(e,r){this.type=e,this.data=r}}class YT extends Error{constructor(e){super(e);const r=Object.create(YT.prototype);Object.setPrototypeOf(this,r),Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:YT.name})}}const P7=4294967295;function L_t(t,e,r){const n=Math.floor(r/4294967296),i=r;t.setUint32(e,n),t.setUint32(e+4,i)}function mBe(t,e){const r=t.getInt32(e),n=t.getUint32(e+4);return r*4294967296+n}function O_t(t,e){const r=t.getUint32(e),n=t.getUint32(e+4);return r*4294967296+n}const N_t=-1,F_t=4294967296-1,z_t=17179869184-1;function B_t({sec:t,nsec:e}){if(t>=0&&e>=0&&t<=z_t)if(e===0&&t<=F_t){const r=new Uint8Array(4);return new DataView(r.buffer).setUint32(0,t),r}else{const r=t/4294967296,n=t&4294967295,i=new Uint8Array(8),a=new DataView(i.buffer);return a.setUint32(0,e<<2|r&3),a.setUint32(4,n),i}else{const r=new Uint8Array(12),n=new DataView(r.buffer);return n.setUint32(0,e),L_t(n,4,t),r}}function U_t(t){const e=t.getTime(),r=Math.floor(e/1e3),n=(e-r*1e3)*1e6,i=Math.floor(n/1e9);return{sec:r+i,nsec:n-i*1e9}}function H_t(t){if(t instanceof Date){const e=U_t(t);return B_t(e)}else return null}function j_t(t){const e=new DataView(t.buffer,t.byteOffset,t.byteLength);switch(t.byteLength){case 4:return{sec:e.getUint32(0),nsec:0};case 8:{const r=e.getUint32(0),n=e.getUint32(4),i=(r&3)*4294967296+n,a=r>>>2;return{sec:i,nsec:a}}case 12:{const r=mBe(e,4),n=e.getUint32(0);return{sec:r,nsec:n}}default:throw new YT(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${t.length}`)}}function V_t(t){const e=j_t(t);return new Date(e.sec*1e3+e.nsec/1e6)}const q_t={type:N_t,encode:H_t,decode:V_t};class Ohe{constructor(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(q_t)}register({type:e,encode:r,decode:n}){if(e>=0)this.encoders[e]=r,this.decoders[e]=n;else{const i=-1-e;this.builtInEncoders[i]=r,this.builtInDecoders[i]=n}}tryToEncode(e,r){for(let n=0;n<this.builtInEncoders.length;n++){const i=this.builtInEncoders[n];if(i!=null){const a=i(e,r);if(a!=null){const o=-1-n;return new cj(o,a)}}}for(let n=0;n<this.encoders.length;n++){const i=this.encoders[n];if(i!=null){const a=i(e,r);if(a!=null){const o=n;return new cj(o,a)}}}return e instanceof cj?e:null}decode(e,r,n){const i=r<0?this.builtInDecoders[-1-r]:this.decoders[r];return i?i(e,r,n):new cj(r,e)}}Ohe.defaultCodec=new Ohe;function G_t(t){return t instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer}function MSe(t){return t instanceof Uint8Array?t:ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):G_t(t)?new Uint8Array(t):Uint8Array.from(t)}function QJ(t){return`${t<0?"-":""}0x${Math.abs(t).toString(16).padStart(2,"0")}`}const $_t=16,W_t=16;class Y_t{constructor(e=$_t,r=W_t){this.hit=0,this.miss=0,this.maxKeyLength=e,this.maxLengthPerKey=r,this.caches=[];for(let n=0;n<this.maxKeyLength;n++)this.caches.push([])}canBeCached(e){return e>0&&e<=this.maxKeyLength}find(e,r,n){const i=this.caches[n-1];e:for(const a of i){const o=a.bytes;for(let s=0;s<n;s++)if(o[s]!==e[r+s])continue e;return a.str}return null}store(e,r){const n=this.caches[e.length-1],i={bytes:e,str:r};n.length>=this.maxLengthPerKey?n[Math.random()*n.length|0]=i:n.push(i)}decode(e,r,n){const i=this.find(e,r,n);if(i!=null)return this.hit++,i;this.miss++;const a=vBe(e,r,n),o=Uint8Array.prototype.slice.call(e,r,r+n);return this.store(o,a),a}}const Nhe="array",Yz="map_key",gBe="map_value",X_t=t=>{if(typeof t=="string"||typeof t=="number")return t;throw new YT("The type of key must be string or number but "+typeof t)};class Z_t{constructor(){this.stack=[],this.stackHeadPosition=-1}get length(){return this.stackHeadPosition+1}top(){return this.stack[this.stackHeadPosition]}pushArrayState(e){const r=this.getUninitializedStateFromPool();r.type=Nhe,r.position=0,r.size=e,r.array=new Array(e)}pushMapState(e){const r=this.getUninitializedStateFromPool();r.type=Yz,r.readCount=0,r.size=e,r.map={}}getUninitializedStateFromPool(){if(this.stackHeadPosition++,this.stackHeadPosition===this.stack.length){const e={type:void 0,size:0,array:void 0,position:0,readCount:0,map:void 0,key:null};this.stack.push(e)}return this.stack[this.stackHeadPosition]}release(e){if(this.stack[this.stackHeadPosition]!==e)throw new Error("Invalid stack state. Released state is not on top of the stack.");if(e.type===Nhe){const n=e;n.size=0,n.array=void 0,n.position=0,n.type=void 0}if(e.type===Yz||e.type===gBe){const n=e;n.size=0,n.map=void 0,n.readCount=0,n.type=void 0}this.stackHeadPosition--}reset(){this.stack.length=0,this.stackHeadPosition=-1}}const D7=-1,Mme=new DataView(new ArrayBuffer(0)),K_t=new Uint8Array(Mme.buffer);try{Mme.getInt8(0)}catch(t){if(!(t instanceof RangeError))throw new Error("This module is not supported in the current JavaScript engine because DataView does not throw RangeError on out-of-bounds access")}const RSe=new RangeError("Insufficient data"),J_t=new Y_t;let Q_t=class yBe{constructor(e){this.totalPos=0,this.pos=0,this.view=Mme,this.bytes=K_t,this.headByte=D7,this.stack=new Z_t,this.entered=!1,this.extensionCodec=e?.extensionCodec??Ohe.defaultCodec,this.context=e?.context,this.useBigInt64=e?.useBigInt64??!1,this.rawStrings=e?.rawStrings??!1,this.maxStrLength=e?.maxStrLength??P7,this.maxBinLength=e?.maxBinLength??P7,this.maxArrayLength=e?.maxArrayLength??P7,this.maxMapLength=e?.maxMapLength??P7,this.maxExtLength=e?.maxExtLength??P7,this.keyDecoder=e?.keyDecoder!==void 0?e.keyDecoder:J_t,this.mapKeyConverter=e?.mapKeyConverter??X_t}clone(){return new yBe({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,rawStrings:this.rawStrings,maxStrLength:this.maxStrLength,maxBinLength:this.maxBinLength,maxArrayLength:this.maxArrayLength,maxMapLength:this.maxMapLength,maxExtLength:this.maxExtLength,keyDecoder:this.keyDecoder})}reinitializeState(){this.totalPos=0,this.headByte=D7,this.stack.reset()}setBuffer(e){const r=MSe(e);this.bytes=r,this.view=new DataView(r.buffer,r.byteOffset,r.byteLength),this.pos=0}appendBuffer(e){if(this.headByte===D7&&!this.hasRemaining(1))this.setBuffer(e);else{const r=this.bytes.subarray(this.pos),n=MSe(e),i=new Uint8Array(r.length+n.length);i.set(r),i.set(n,r.length),this.setBuffer(i)}}hasRemaining(e){return this.view.byteLength-this.pos>=e}createExtraByteError(e){const{view:r,pos:n}=this;return new RangeError(`Extra ${r.byteLength-n} of ${r.byteLength} byte(s) found at buffer[${e}]`)}decode(e){if(this.entered)return this.clone().decode(e);try{this.entered=!0,this.reinitializeState(),this.setBuffer(e);const r=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return r}finally{this.entered=!1}}*decodeMulti(e){if(this.entered){yield*this.clone().decodeMulti(e);return}try{for(this.entered=!0,this.reinitializeState(),this.setBuffer(e);this.hasRemaining(1);)yield this.doDecodeSync()}finally{this.entered=!1}}async decodeAsync(e){if(this.entered)return this.clone().decodeAsync(e);try{this.entered=!0;let r=!1,n;for await(const s of e){if(r)throw this.entered=!1,this.createExtraByteError(this.totalPos);this.appendBuffer(s);try{n=this.doDecodeSync(),r=!0}catch(d){if(!(d instanceof RangeError))throw d}this.totalPos+=this.pos}if(r){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return n}const{headByte:i,pos:a,totalPos:o}=this;throw new RangeError(`Insufficient data in parsing ${QJ(i)} at ${o} (${a} in the current buffer)`)}finally{this.entered=!1}}decodeArrayStream(e){return this.decodeMultiAsync(e,!0)}decodeStream(e){return this.decodeMultiAsync(e,!1)}async*decodeMultiAsync(e,r){if(this.entered){yield*this.clone().decodeMultiAsync(e,r);return}try{this.entered=!0;let n=r,i=-1;for await(const a of e){if(r&&i===0)throw this.createExtraByteError(this.totalPos);this.appendBuffer(a),n&&(i=this.readArraySize(),n=!1,this.complete());try{for(;yield this.doDecodeSync(),--i!==0;);}catch(o){if(!(o instanceof RangeError))throw o}this.totalPos+=this.pos}}finally{this.entered=!1}}doDecodeSync(){e:for(;;){const e=this.readHeadByte();let r;if(e>=224)r=e-256;else if(e<192)if(e<128)r=e;else if(e<144){const i=e-128;if(i!==0){this.pushMapState(i),this.complete();continue e}else r={}}else if(e<160){const i=e-144;if(i!==0){this.pushArrayState(i),this.complete();continue e}else r=[]}else{const i=e-160;r=this.decodeString(i,0)}else if(e===192)r=null;else if(e===194)r=!1;else if(e===195)r=!0;else if(e===202)r=this.readF32();else if(e===203)r=this.readF64();else if(e===204)r=this.readU8();else if(e===205)r=this.readU16();else if(e===206)r=this.readU32();else if(e===207)this.useBigInt64?r=this.readU64AsBigInt():r=this.readU64();else if(e===208)r=this.readI8();else if(e===209)r=this.readI16();else if(e===210)r=this.readI32();else if(e===211)this.useBigInt64?r=this.readI64AsBigInt():r=this.readI64();else if(e===217){const i=this.lookU8();r=this.decodeString(i,1)}else if(e===218){const i=this.lookU16();r=this.decodeString(i,2)}else if(e===219){const i=this.lookU32();r=this.decodeString(i,4)}else if(e===220){const i=this.readU16();if(i!==0){this.pushArrayState(i),this.complete();continue e}else r=[]}else if(e===221){const i=this.readU32();if(i!==0){this.pushArrayState(i),this.complete();continue e}else r=[]}else if(e===222){const i=this.readU16();if(i!==0){this.pushMapState(i),this.complete();continue e}else r={}}else if(e===223){const i=this.readU32();if(i!==0){this.pushMapState(i),this.complete();continue e}else r={}}else if(e===196){const i=this.lookU8();r=this.decodeBinary(i,1)}else if(e===197){const i=this.lookU16();r=this.decodeBinary(i,2)}else if(e===198){const i=this.lookU32();r=this.decodeBinary(i,4)}else if(e===212)r=this.decodeExtension(1,0);else if(e===213)r=this.decodeExtension(2,0);else if(e===214)r=this.decodeExtension(4,0);else if(e===215)r=this.decodeExtension(8,0);else if(e===216)r=this.decodeExtension(16,0);else if(e===199){const i=this.lookU8();r=this.decodeExtension(i,1)}else if(e===200){const i=this.lookU16();r=this.decodeExtension(i,2)}else if(e===201){const i=this.lookU32();r=this.decodeExtension(i,4)}else throw new YT(`Unrecognized type byte: ${QJ(e)}`);this.complete();const n=this.stack;for(;n.length>0;){const i=n.top();if(i.type===Nhe)if(i.array[i.position]=r,i.position++,i.position===i.size)r=i.array,n.release(i);else continue e;else if(i.type===Yz){if(r==="__proto__")throw new YT("The key __proto__ is not allowed");i.key=this.mapKeyConverter(r),i.type=gBe;continue e}else if(i.map[i.key]=r,i.readCount++,i.readCount===i.size)r=i.map,n.release(i);else{i.key=null,i.type=Yz;continue e}}return r}}readHeadByte(){return this.headByte===D7&&(this.headByte=this.readU8()),this.headByte}complete(){this.headByte=D7}readArraySize(){const e=this.readHeadByte();switch(e){case 220:return this.readU16();case 221:return this.readU32();default:{if(e<160)return e-144;throw new YT(`Unrecognized array type byte: ${QJ(e)}`)}}}pushMapState(e){if(e>this.maxMapLength)throw new YT(`Max length exceeded: map length (${e}) > maxMapLengthLength (${this.maxMapLength})`);this.stack.pushMapState(e)}pushArrayState(e){if(e>this.maxArrayLength)throw new YT(`Max length exceeded: array length (${e}) > maxArrayLength (${this.maxArrayLength})`);this.stack.pushArrayState(e)}decodeString(e,r){return!this.rawStrings||this.stateIsMapKey()?this.decodeUtf8String(e,r):this.decodeBinary(e,r)}decodeUtf8String(e,r){if(e>this.maxStrLength)throw new YT(`Max length exceeded: UTF-8 byte length (${e}) > maxStrLength (${this.maxStrLength})`);if(this.bytes.byteLength<this.pos+r+e)throw RSe;const n=this.pos+r;let i;return this.stateIsMapKey()&&this.keyDecoder?.canBeCached(e)?i=this.keyDecoder.decode(this.bytes,n,e):i=D_t(this.bytes,n,e),this.pos+=r+e,i}stateIsMapKey(){return this.stack.length>0?this.stack.top().type===Yz:!1}decodeBinary(e,r){if(e>this.maxBinLength)throw new YT(`Max length exceeded: bin length (${e}) > maxBinLength (${this.maxBinLength})`);if(!this.hasRemaining(e+r))throw RSe;const n=this.pos+r,i=this.bytes.subarray(n,n+e);return this.pos+=r+e,i}decodeExtension(e,r){if(e>this.maxExtLength)throw new YT(`Max length exceeded: ext length (${e}) > maxExtLength (${this.maxExtLength})`);const n=this.view.getInt8(this.pos+r),i=this.decodeBinary(e,r+1);return this.extensionCodec.decode(i,n,this.context)}lookU8(){return this.view.getUint8(this.pos)}lookU16(){return this.view.getUint16(this.pos)}lookU32(){return this.view.getUint32(this.pos)}readU8(){const e=this.view.getUint8(this.pos);return this.pos++,e}readI8(){const e=this.view.getInt8(this.pos);return this.pos++,e}readU16(){const e=this.view.getUint16(this.pos);return this.pos+=2,e}readI16(){const e=this.view.getInt16(this.pos);return this.pos+=2,e}readU32(){const e=this.view.getUint32(this.pos);return this.pos+=4,e}readI32(){const e=this.view.getInt32(this.pos);return this.pos+=4,e}readU64(){const e=O_t(this.view,this.pos);return this.pos+=8,e}readI64(){const e=mBe(this.view,this.pos);return this.pos+=8,e}readU64AsBigInt(){const e=this.view.getBigUint64(this.pos);return this.pos+=8,e}readI64AsBigInt(){const e=this.view.getBigInt64(this.pos);return this.pos+=8,e}readF32(){const e=this.view.getFloat32(this.pos);return this.pos+=4,e}readF64(){const e=this.view.getFloat64(this.pos);return this.pos+=8,e}};function ewt(t,e){return new Q_t(e).decode(t)}const twt={float32:Float32Array,float64:Float64Array,int8:Int8Array,int16:Int16Array,int32:Int32Array,int64:BigInt64Array,uint8:Uint8Array,uint16:Uint16Array,uint32:Uint32Array,uint64:BigUint64Array};function rwt(t,e){if(t)try{const r=ewt(t)[0][e],n=twt[r.dtype];if(!n)throw new Error(`Unsupported dtype: ${r.dtype}`);return new n(r.data.slice().buffer)}catch(r){console.error(`Failed to decode ${e}:`,r);return}}const Jv=Q1.create({}),nwt=async t=>{const{data:e}=await Jv.get(`/api/rooms/${t}/figures`);return e},iwt=async(t,e)=>{const{data:r}=await Jv.get(`/api/rooms/${t}/figures/${e}`);return r},bBe=async(t,e=0)=>{const{data:r}=await Jv.get(`/api/rooms/${t}/frames/${e}/metadata`);return r},xBe=async t=>{const{data:e}=await Jv.get(`/api/rooms/${t}/geometries`);return e},o$=async(t,e)=>{const{data:r}=await Jv.get(`/api/rooms/${t}/geometries/${e}`);return r},Rme=async(t,e,r,n,i)=>{const{data:a}=await Jv.post(`/api/rooms/${t}/geometries`,{key:r,type:n,data:i,clientId:e});return a},awt=async(t,e)=>{const{data:r}=await Jv.delete(`/api/rooms/${t}/geometries/${e}`);return r},owt=async t=>{const{data:e}=await Jv.get(`/api/rooms/${t}/geometries/schemas`);return e},kSe=async t=>{const{data:e}=await Jv.get(`/api/rooms/${t}/selections`);return e},ISe=async(t,e,r)=>{const{data:n}=await Jv.put(`/api/rooms/${t}/selections/${e}`,{indices:r});return n},PSe=async(t,e,r)=>{const{data:n}=await Jv.put(`/api/rooms/${t}/selections/groups/${e}`,r);return n},DSe=async(t,e)=>{const{data:r}=await Jv.delete(`/api/rooms/${t}/selections/groups/${e}`);return r},_Be=async(t,e)=>{const{data:r}=await Jv.post(`/api/rooms/${t}/selections/groups/${e}/load`);return r},swt=async t=>{const{data:e}=await Jv.get(`/api/rooms/${t}/bookmarks`);return e},lwt=async(t,e,r)=>{const{data:n}=await Jv.put(`/api/rooms/${t}/bookmarks/${e}`,{label:r});return n},uwt=async(t,e)=>{const{data:r}=await Jv.delete(`/api/rooms/${t}/bookmarks/${e}`);return r},cwt=async(t,e,r)=>{const{data:n}=await Jv.post(`/api/rooms/${t}/join`,e,{signal:r});return n},fwt=async(t,e)=>{const{data:r}=await Jv.get(`/api/rooms/${t}`,{signal:e});return r},dwt=async(t,e)=>{const{data:r}=await Jv.get(`/api/rooms/${t}/schema/${e}`);return r},hwt=async(t,e,r,n)=>{const{data:i}=await Jv.get(`/api/rooms/${t}/extensions/${r}/${n}/data`,{params:{userId:e}});return i},pwt=async t=>{const{roomId:e,userId:r,category:n,extension:i,data:a}=t,{data:o}=await Jv.post(`/api/rooms/${e}/extensions/${n}/${i}/submit`,{userId:r,data:a});return o},ly=async(t,e,r,n)=>{const i=new URLSearchParams;i.append("indices",e.toString()),r&&r.length>0&&i.append("keys",r.join(","));const{data:a}=await Jv.get(`/api/rooms/${t}/frames?${i.toString()}`,{signal:n,responseType:"arraybuffer"}),o={};for(const s of r){const d=rwt(a,s);d!==void 0&&(o[s]=d)}return Object.keys(o).length>0?o:null},kme=async t=>{const e=t?`?search=${encodeURIComponent(t)}`:"",{data:r}=await Jv.get(`/api/rooms${e}`);return r},vwt=async t=>{const{data:e}=await Jv.get(`/api/rooms/${t}`);return e},sG=async(t,e)=>{const{data:r}=await Jv.patch(`/api/rooms/${t}`,e);return r},wBe=async(t,e={})=>{const{data:r}=await Jv.post(`/api/rooms/${t}/duplicate`,e);return r},SBe=async()=>{const{data:t}=await Jv.get("/api/rooms/default");return t},TBe=async t=>{const{data:e}=await Jv.put("/api/rooms/default",{roomId:t});return e},mwt=async(t,e)=>{const r=new URLSearchParams;t&&r.append("path",t),e&&r.append("search",e);const n=r.toString()?`?${r.toString()}`:"",{data:i}=await Jv.get(`/api/file-browser/list${n}`);return i},gwt=async t=>{const{data:e}=await Jv.post("/api/file-browser/load",t);return e},EBe=async()=>{try{return await Jv.get("/api/file-browser/list"),{enabled:!0}}catch{return{enabled:!1}}},ywt=async t=>{const{data:e}=await Jv.post("/api/file-browser/create-room-from-file",t);return e},bwt=(t,e)=>{const r=[],n=[];return t.keys.forEach(i=>{const a=t.metadata[i];if(!a)return;const o=a.shape&&a.shape.length>0&&a.shape[0]===e,[s]=i.split("."),d={key:i,metadata:a,category:o?"per-particle":"global",prefix:s||"other",enabled:!1};o?r.push(d):n.push(d)}),{perParticle:r,global:n}},xwt=async()=>{const{data:t}=await Jv.post("/api/shutdown");return t},Fhe=t=>Object.entries(t).filter(([e,r])=>r.type==="Curve"&&r.data?.active!==!1).map(([e,r])=>e),zhe=t=>t.length===0?null:t.includes("curve")?"curve":t[0],rh=PY((t,e)=>({roomId:null,userId:null,clientId:null,isConnected:!1,currentFrame:0,frameCount:0,isLoading:!1,skipFrames:1,selection:null,selections:{},selectionGroups:{},activeSelectionGroup:null,frame_selection:null,frameSelectionEnabled:!1,bookmarks:null,playing:!1,chatOpen:!1,joinToken:null,geometries:{},geometryDefaults:{},isDrawing:!1,drawingPointerPosition:null,drawingIsValid:!1,metadataLock:!1,geometryFetchingStates:{},synchronizedMode:!0,showInfoBoxes:!1,hoveredGeometryInstance:null,particleCount:0,curveLength:0,activeCurveForDrawing:null,attachedCameraKey:null,pathtracingNeedsUpdate:!1,curveRefs:{},setConnected:r=>t({isConnected:r}),setRoomId:r=>t({roomId:r}),setUserId:r=>t({userId:r}),setClientId:r=>t({clientId:r}),setCurrentFrame:r=>t({currentFrame:r}),setFrameCount:r=>t(n=>{const i=n.currentFrame>=r?0:n.currentFrame;return{frameCount:r,currentFrame:i}}),setLoading:r=>t({isLoading:r}),setSkipFrames:r=>t({skipFrames:r}),setSelections:r=>{t({selections:r})},updateSelectionForGeometry:(r,n)=>{const i=e().roomId;i&&(t(a=>({selections:{...a.selections,[r]:n},selection:r==="particles"?n:a.selection})),ISe(i,r,n).catch(a=>{console.error(`Failed to update selection for ${r}:`,a)}))},setSelectionGroups:r=>t({selectionGroups:r}),setActiveSelectionGroup:r=>t({activeSelectionGroup:r}),loadSelectionGroup:r=>{const n=e().roomId;n&&_Be(n,r).catch(i=>{console.error(`Failed to load selection group ${r}:`,i)})},setFrameSelection:r=>t({frame_selection:r}),setFrameSelectionEnabled:r=>t({frameSelectionEnabled:r}),setBookmarks:r=>t({bookmarks:r}),setPlaying:r=>t({playing:r}),setChatOpen:r=>t({chatOpen:r}),setJoinToken:r=>t({joinToken:r}),setGeometries:r=>t({geometries:r}),setGeometryDefaults:r=>t({geometryDefaults:r}),updateGeometry:(r,n)=>t(i=>({geometries:{...i.geometries,[r]:n}})),removeGeometry:r=>t(n=>{const{[r]:i,...a}=n.geometries;let o=n.activeCurveForDrawing;if(n.activeCurveForDrawing===r){const s=Fhe(a);o=zhe(s)}return{geometries:a,activeCurveForDrawing:o}}),setIsDrawing:r=>t({isDrawing:r}),setDrawingPointerPosition:r=>t({drawingPointerPosition:r}),setDrawingIsValid:r=>t({drawingIsValid:r}),setMetadataLock:r=>t({metadataLock:r}),setGeometryFetching:(r,n)=>t(i=>({geometryFetchingStates:{...i.geometryFetchingStates,[r]:n}})),removeGeometryFetching:r=>t(n=>{const i={...n.geometryFetchingStates};return delete i[r],{geometryFetchingStates:i}}),getIsFetching:()=>{const r=e(),{geometries:n,geometryFetchingStates:i}=r;return Object.entries(i).some(([a,o])=>{const d=n[a]?.data?.active!==!1;return o&&d})},setSynchronizedMode:r=>t({synchronizedMode:r}),updateSelections:(r,n,i)=>{const a=e(),o=a.roomId;if(!o)return;const s=a.selections[r]||[],d=new Set(s).has(n);let b;if(i){const L=new Set(s);d?L.delete(n):L.add(n),b=Array.from(L)}else d?b=[]:b=[n];t(L=>({selections:{...L.selections,[r]:b}})),ISe(o,r,b).catch(L=>{console.error(`Failed to update selection for ${r}:`,L)})},addBookmark:(r,n)=>{const i=e().roomId;if(!i)return;const a=n||`Bookmark ${r}`;t(o=>({bookmarks:{...o.bookmarks||{},[r]:a}})),lwt(i,r,a).catch(o=>{console.error(`Failed to set bookmark at frame ${r}:`,o),t(s=>{if(!s.bookmarks)return s;const{[r]:d,...b}=s.bookmarks;return{bookmarks:b}})})},deleteBookmark:r=>{const n=e().roomId;if(!n)return;const{bookmarks:i}=e();if(!i||!(r in i))return;const a=i[r];t(o=>{if(!o.bookmarks)return o;const{[r]:s,...d}=o.bookmarks;return{bookmarks:d}}),uwt(n,r).catch(o=>{console.error(`Failed to delete bookmark at frame ${r}:`,o),t(s=>({bookmarks:{...s.bookmarks||{},[r]:a}}))})},toggleInfoBoxes:()=>t(r=>({showInfoBoxes:!r.showInfoBoxes})),setHoveredGeometryInstance:(r,n)=>{t(r===null||n===null?{hoveredGeometryInstance:null}:{hoveredGeometryInstance:{geometryKey:r,instanceId:n}})},setParticleCount:r=>t({particleCount:r}),setCurveLength:r=>t({curveLength:r}),setActiveCurveForDrawing:r=>t({activeCurveForDrawing:r}),toggleDrawingMode:async r=>{const n=e(),{geometries:i,activeCurveForDrawing:a,isDrawing:o,roomId:s,clientId:d}=n,b=Fhe(i);if(b.length===0){if(!s){console.warn("Cannot create curve: no room ID");return}console.log("No curves found, creating default curve named 'curve'"),t(L=>({geometries:{...L.geometries,curve:{type:"Curve",data:{position:[]}}},activeCurveForDrawing:"curve",isDrawing:!0}));try{await Rme(s,d,"curve","Curve",{position:[]}),console.log("Default curve created successfully");const L=await o$(s,"curve");console.log("Fetched validated curve data:",L.geometry),t(B=>({geometries:{...B.geometries,curve:L.geometry}})),r&&s&&r.invalidateQueries({queryKey:["geometries",s,"list"]})}catch(L){console.error("Error creating default curve:",L),t(B=>{const{curve:V,...X}=B.geometries;return{geometries:X,activeCurveForDrawing:null,isDrawing:!1}})}return}if(b.length===1){const L=b[0];t(a?{isDrawing:!o}:{activeCurveForDrawing:L,isDrawing:!o});return}if(!a||!b.includes(a)){const L=zhe(b);t({activeCurveForDrawing:L,isDrawing:!0})}else t({isDrawing:!o})},attachToCamera:r=>{const{geometries:n}=e(),i=n[r];if(!i||i.type!=="Camera"){console.warn(`Cannot attach to camera '${r}': not found or not a Camera`);return}console.log(`Attaching to camera: ${r}`),t({attachedCameraKey:r})},detachFromCamera:()=>{console.log("Detaching from camera"),t({attachedCameraKey:null})},registerCurveRef:(r,n)=>{t(i=>({curveRefs:{...i.curveRefs,[r]:n}}))},unregisterCurveRef:r=>{t(n=>{const{[r]:i,...a}=n.curveRefs;return{curveRefs:a}})},requestPathtracingUpdate:()=>{t({pathtracingNeedsUpdate:!0})},clearPathtracingUpdate:()=>{t({pathtracingNeedsUpdate:!1})}}));var Az={exports:{}};/**
 * @license
 * Lodash <https://lodash.com/>
 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
 * Released under MIT license <https://lodash.com/license>
 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 */var _wt=Az.exports,LSe;function wwt(){return LSe||(LSe=1,(function(t,e){(function(){var r,n="4.17.21",i=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",o="Expected a function",s="Invalid `variable` option passed into `_.template`",d="__lodash_hash_undefined__",b=500,L="__lodash_placeholder__",B=1,V=2,X=4,ie=1,de=2,ae=1,U=2,ve=4,Se=8,Pe=16,Me=32,Ie=64,Ve=128,Ze=256,Je=512,nt=30,ut="...",ht=800,_t=16,Dt=1,qt=2,Lt=3,dr=1/0,Zt=9007199254740991,Cr=17976931348623157e292,yt=NaN,Vt=4294967295,Er=Vt-1,sr=Vt>>>1,or=[["ary",Ve],["bind",ae],["bindKey",U],["curry",Se],["curryRight",Pe],["flip",Je],["partial",Me],["partialRight",Ie],["rearg",Ze]],Ar="[object Arguments]",Ir="[object Array]",_n="[object AsyncFunction]",Un="[object Boolean]",Qn="[object Date]",Jn="[object DOMException]",Vn="[object Error]",jn="[object Function]",Lr="[object GeneratorFunction]",Yn="[object Map]",On="[object Number]",Sn="[object Null]",bn="[object Object]",Mn="[object Promise]",gi="[object Proxy]",Oi="[object RegExp]",Pa="[object Set]",va="[object String]",ti="[object Symbol]",Tn="[object Undefined]",bi="[object WeakMap]",Wn="[object WeakSet]",Ei="[object ArrayBuffer]",Ki="[object DataView]",sa="[object Float32Array]",xa="[object Float64Array]",Qa="[object Int8Array]",is="[object Int16Array]",go="[object Int32Array]",Co="[object Uint8Array]",Ko="[object Uint8ClampedArray]",Zi="[object Uint16Array]",za="[object Uint32Array]",Ss=/\b__p \+= '';/g,ba=/\b(__p \+=) '' \+/g,po=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ys=/&(?:amp|lt|gt|quot|#39);/g,$s=/[&<>"']/g,Gs=RegExp(Ys.source),Ns=RegExp($s.source),Hl=/<%-([\s\S]+?)%>/g,nu=/<%([\s\S]+?)%>/g,su=/<%=([\s\S]+?)%>/g,Mc=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,da=/^\w*$/,Xa=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Oo=/[\\^$.*+?()[\]{}|]/g,_s=RegExp(Oo.source),nl=/^\s+/,vu=/\s/,zl=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,jl=/\{\n\/\* \[wrapped with (.+)\] \*/,Il=/,? & /,Js=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Vl=/[()=,{}\[\]\/\s]/,zn=/\\(\\)?/g,Ni=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Za=/\w*$/,ts=/^[-+]0x[0-9a-f]+$/i,ps=/^0b[01]+$/i,Mi=/^\[object .+?Constructor\]$/,to=/^0o[0-7]+$/i,Dn=/^(?:0|[1-9]\d*)$/,ea=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,pa=/($^)/,ja=/['\n\r\u2028\u2029\\]/g,_a="\\ud800-\\udfff",Zs="\\u0300-\\u036f",ks="\\ufe20-\\ufe2f",el="\\u20d0-\\u20ff",ol=Zs+ks+el,tl="\\u2700-\\u27bf",il="a-z\\xdf-\\xf6\\xf8-\\xff",Gl="\\xac\\xb1\\xd7\\xf7",Qu="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ic="\\u2000-\\u206f",rf=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Sd="A-Z\\xc0-\\xd6\\xd8-\\xde",yc="\\ufe0e\\ufe0f",ii=Gl+Qu+ic+rf,xh="['’]",pd="["+_a+"]",Ip="["+ii+"]",jf="["+ol+"]",ih="\\d+",Td="["+tl+"]",Yc="["+il+"]",ep="[^"+_a+ii+ih+tl+il+Sd+"]",Tc="\\ud83c[\\udffb-\\udfff]",pf="(?:"+jf+"|"+Tc+")",Tf="[^"+_a+"]",T1="(?:\\ud83c[\\udde6-\\uddff]){2}",eg="[\\ud800-\\udbff][\\udc00-\\udfff]",Om="["+Sd+"]",bE="\\u200d",tp="(?:"+Yc+"|"+ep+")",E1="(?:"+Om+"|"+ep+")",tg="(?:"+xh+"(?:d|ll|m|re|s|t|ve))?",ah="(?:"+xh+"(?:D|LL|M|RE|S|T|VE))?",Ug=pf+"?",Wp="["+yc+"]?",Hg="(?:"+bE+"(?:"+[Tf,T1,eg].join("|")+")"+Wp+Ug+")*",G_="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Jd="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",pA=Wp+Ug+Hg,xE="(?:"+[Td,T1,eg].join("|")+")"+pA,lM="(?:"+[Tf+jf+"?",jf,T1,eg,pd].join("|")+")",n_=RegExp(xh,"g"),rb=RegExp(jf,"g"),J2=RegExp(Tc+"(?="+Tc+")|"+lM+pA,"g"),_g=RegExp([Om+"?"+Yc+"+"+tg+"(?="+[Ip,Om,"$"].join("|")+")",E1+"+"+ah+"(?="+[Ip,Om+tp,"$"].join("|")+")",Om+"?"+tp+"+"+tg,Om+"+"+ah,Jd,G_,ih,xE].join("|"),"g"),A1=RegExp("["+bE+_a+ol+yc+"]"),Xw=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,vA=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],wg=-1,Pp={};Pp[sa]=Pp[xa]=Pp[Qa]=Pp[is]=Pp[go]=Pp[Co]=Pp[Ko]=Pp[Zi]=Pp[za]=!0,Pp[Ar]=Pp[Ir]=Pp[Ei]=Pp[Un]=Pp[Ki]=Pp[Qn]=Pp[Vn]=Pp[jn]=Pp[Yn]=Pp[On]=Pp[bn]=Pp[Oi]=Pp[Pa]=Pp[va]=Pp[bi]=!1;var jp={};jp[Ar]=jp[Ir]=jp[Ei]=jp[Ki]=jp[Un]=jp[Qn]=jp[sa]=jp[xa]=jp[Qa]=jp[is]=jp[go]=jp[Yn]=jp[On]=jp[bn]=jp[Oi]=jp[Pa]=jp[va]=jp[ti]=jp[Co]=jp[Ko]=jp[Zi]=jp[za]=!0,jp[Vn]=jp[jn]=jp[bi]=!1;var t0={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",Ĳ:"IJ",ĳ:"ij",Œ:"Oe",œ:"oe",ŉ:"'n",ſ:"s"},vd={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Qd={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},$_={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},v0=parseFloat,mA=parseInt,W_=typeof H3=="object"&&H3&&H3.Object===Object&&H3,ec=typeof self=="object"&&self&&self.Object===Object&&self,Nv=W_||ec||Function("return this")(),Wy=e&&!e.nodeType&&e,Pb=Wy&&!0&&t&&!t.nodeType&&t,gx=Pb&&Pb.exports===Wy,Yu=gx&&W_.process,ov=(function(){try{var Yo=Pb&&Pb.require&&Pb.require("util").types;return Yo||Yu&&Yu.binding&&Yu.binding("util")}catch{}})(),_E=ov&&ov.isArrayBuffer,Z5=ov&&ov.isDate,gA=ov&&ov.isMap,K5=ov&&ov.isRegExp,J5=ov&&ov.isSet,wE=ov&&ov.isTypedArray;function Vp(Yo,al,Fs){switch(Fs.length){case 0:return Yo.call(al);case 1:return Yo.call(al,Fs[0]);case 2:return Yo.call(al,Fs[0],Fs[1]);case 3:return Yo.call(al,Fs[0],Fs[1],Fs[2])}return Yo.apply(al,Fs)}function i_(Yo,al,Fs,hu){for(var Xc=-1,Kc=Yo==null?0:Yo.length;++Xc<Kc;){var Vg=Yo[Xc];al(hu,Vg,Fs(Vg),Yo)}return hu}function Db(Yo,al){for(var Fs=-1,hu=Yo==null?0:Yo.length;++Fs<hu&&al(Yo[Fs],Fs,Yo)!==!1;);return Yo}function Q5(Yo,al){for(var Fs=Yo==null?0:Yo.length;Fs--&&al(Yo[Fs],Fs,Yo)!==!1;);return Yo}function SE(Yo,al){for(var Fs=-1,hu=Yo==null?0:Yo.length;++Fs<hu;)if(!al(Yo[Fs],Fs,Yo))return!1;return!0}function Lb(Yo,al){for(var Fs=-1,hu=Yo==null?0:Yo.length,Xc=0,Kc=[];++Fs<hu;){var Vg=Yo[Fs];al(Vg,Fs,Yo)&&(Kc[Xc++]=Vg)}return Kc}function yA(Yo,al){var Fs=Yo==null?0:Yo.length;return!!Fs&&C1(Yo,al,0)>-1}function TE(Yo,al,Fs){for(var hu=-1,Xc=Yo==null?0:Yo.length;++hu<Xc;)if(Fs(al,Yo[hu]))return!0;return!1}function Qv(Yo,al){for(var Fs=-1,hu=Yo==null?0:Yo.length,Xc=Array(hu);++Fs<hu;)Xc[Fs]=al(Yo[Fs],Fs,Yo);return Xc}function dy(Yo,al){for(var Fs=-1,hu=al.length,Xc=Yo.length;++Fs<hu;)Yo[Xc+Fs]=al[Fs];return Yo}function uM(Yo,al,Fs,hu){var Xc=-1,Kc=Yo==null?0:Yo.length;for(hu&&Kc&&(Fs=Yo[++Xc]);++Xc<Kc;)Fs=al(Fs,Yo[Xc],Xc,Yo);return Fs}function aT(Yo,al,Fs,hu){var Xc=Yo==null?0:Yo.length;for(hu&&Xc&&(Fs=Yo[--Xc]);Xc--;)Fs=al(Fs,Yo[Xc],Xc,Yo);return Fs}function bA(Yo,al){for(var Fs=-1,hu=Yo==null?0:Yo.length;++Fs<hu;)if(al(Yo[Fs],Fs,Yo))return!0;return!1}var Y_=Dp("length");function cM(Yo){return Yo.split("")}function fM(Yo){return Yo.match(Js)||[]}function eR(Yo,al,Fs){var hu;return Fs(Yo,function(Xc,Kc,Vg){if(al(Xc,Kc,Vg))return hu=Kc,!1}),hu}function a_(Yo,al,Fs,hu){for(var Xc=Yo.length,Kc=Fs+(hu?1:-1);hu?Kc--:++Kc<Xc;)if(al(Yo[Kc],Kc,Yo))return Kc;return-1}function C1(Yo,al,Fs){return al===al?Yk(Yo,al,Fs):a_(Yo,Q2,Fs)}function xA(Yo,al,Fs,hu){for(var Xc=Fs-1,Kc=Yo.length;++Xc<Kc;)if(hu(Yo[Xc],al))return Xc;return-1}function Q2(Yo){return Yo!==Yo}function EE(Yo,al){var Fs=Yo==null?0:Yo.length;return Fs?sT(Yo,al)/Fs:yt}function Dp(Yo){return function(al){return al==null?r:al[Yo]}}function m0(Yo){return function(al){return Yo==null?r:Yo[al]}}function jg(Yo,al,Fs,hu,Xc){return Xc(Yo,function(Kc,Vg,zh){Fs=hu?(hu=!1,Kc):al(Fs,Kc,Vg,zh)}),Fs}function oT(Yo,al){var Fs=Yo.length;for(Yo.sort(al);Fs--;)Yo[Fs]=Yo[Fs].value;return Yo}function sT(Yo,al){for(var Fs,hu=-1,Xc=Yo.length;++hu<Xc;){var Kc=al(Yo[hu]);Kc!==r&&(Fs=Fs===r?Kc:Fs+Kc)}return Fs}function yx(Yo,al){for(var Fs=-1,hu=Array(Yo);++Fs<Yo;)hu[Fs]=al(Fs);return hu}function o_(Yo,al){return Qv(al,function(Fs){return[Fs,Yo[Fs]]})}function AE(Yo){return Yo&&Yo.slice(0,pM(Yo)+1).replace(nl,"")}function hy(Yo){return function(al){return Yo(al)}}function eS(Yo,al){return Qv(al,function(Fs){return Yo[Fs]})}function Nm(Yo,al){return Yo.has(al)}function tS(Yo,al){for(var Fs=-1,hu=Yo.length;++Fs<hu&&C1(al,Yo[Fs],0)>-1;);return Fs}function X_(Yo,al){for(var Fs=Yo.length;Fs--&&C1(al,Yo[Fs],0)>-1;);return Fs}function dM(Yo,al){for(var Fs=Yo.length,hu=0;Fs--;)Yo[Fs]===al&&++hu;return hu}var CE=m0(t0),_A=m0(vd);function wA(Yo){return"\\"+$_[Yo]}function hM(Yo,al){return Yo==null?r:Yo[al]}function s_(Yo){return A1.test(Yo)}function ME(Yo){return Xw.test(Yo)}function mm(Yo){for(var al,Fs=[];!(al=Yo.next()).done;)Fs.push(al.value);return Fs}function SA(Yo){var al=-1,Fs=Array(Yo.size);return Yo.forEach(function(hu,Xc){Fs[++al]=[Xc,hu]}),Fs}function lT(Yo,al){return function(Fs){return Yo(al(Fs))}}function bx(Yo,al){for(var Fs=-1,hu=Yo.length,Xc=0,Kc=[];++Fs<hu;){var Vg=Yo[Fs];(Vg===al||Vg===L)&&(Yo[Fs]=L,Kc[Xc++]=Fs)}return Kc}function Zw(Yo){var al=-1,Fs=Array(Yo.size);return Yo.forEach(function(hu){Fs[++al]=hu}),Fs}function rS(Yo){var al=-1,Fs=Array(Yo.size);return Yo.forEach(function(hu){Fs[++al]=[hu,hu]}),Fs}function Yk(Yo,al,Fs){for(var hu=Fs-1,Xc=Yo.length;++hu<Xc;)if(Yo[hu]===al)return hu;return-1}function nb(Yo,al,Fs){for(var hu=Fs+1;hu--;)if(Yo[hu]===al)return hu;return hu}function Yy(Yo){return s_(Yo)?rR(Yo):Y_(Yo)}function Fm(Yo){return s_(Yo)?TA(Yo):cM(Yo)}function pM(Yo){for(var al=Yo.length;al--&&vu.test(Yo.charAt(al)););return al}var tR=m0(Qd);function rR(Yo){for(var al=J2.lastIndex=0;J2.test(Yo);)++al;return al}function TA(Yo){return Yo.match(J2)||[]}function RE(Yo){return Yo.match(_g)||[]}var Kw=(function Yo(al){al=al==null?Nv:Jw.defaults(Nv.Object(),al,Jw.pick(Nv,vA));var Fs=al.Array,hu=al.Date,Xc=al.Error,Kc=al.Function,Vg=al.Math,zh=al.Object,py=al.RegExp,kE=al.String,Vf=al.TypeError,IE=Fs.prototype,Z_=Kc.prototype,l_=zh.prototype,xx=al["__core-js_shared__"],uT=Z_.toString,Bh=l_.hasOwnProperty,gm=0,PE=(function(){var Ge=/[^.]+$/.exec(xx&&xx.keys&&xx.keys.IE_PROTO||"");return Ge?"Symbol(src)_1."+Ge:""})(),Sg=l_.toString,vy=uT.call(zh),_x=Nv._,vM=py("^"+uT.call(Bh).replace(Oo,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Qw=gx?al.Buffer:r,M1=al.Symbol,cT=al.Uint8Array,ib=Qw?Qw.allocUnsafe:r,R1=lT(zh.getPrototypeOf,zh),fT=zh.create,r0=l_.propertyIsEnumerable,Xy=IE.splice,g0=M1?M1.isConcatSpreadable:r,y0=M1?M1.iterator:r,Ch=M1?M1.toStringTag:r,DE=(function(){try{var Ge=_0(zh,"defineProperty");return Ge({},"",{}),Ge}catch{}})(),rg=al.clearTimeout!==Nv.clearTimeout&&al.clearTimeout,e2=hu&&hu.now!==Nv.Date.now&&hu.now,EA=al.setTimeout!==Nv.setTimeout&&al.setTimeout,Zy=Vg.ceil,b0=Vg.floor,zm=zh.getOwnPropertySymbols,k1=Qw?Qw.isBuffer:r,my=al.isFinite,gy=IE.join,F0=lT(zh.keys,zh),em=Vg.max,tm=Vg.min,u_=hu.now,Ob=al.parseInt,qg=Vg.random,AA=IE.reverse,z0=_0(al,"DataView"),ng=_0(al,"Map"),sv=_0(al,"Promise"),qd=_0(al,"Set"),Ky=_0(al,"WeakMap"),B0=_0(zh,"create"),t2=Ky&&new Ky,Jy={},CA=kx(z0),MA=kx(ng),c_=kx(sv),LE=kx(qd),Rf=kx(Ky),K_=M1?M1.prototype:r,dT=K_?K_.valueOf:r,f_=K_?K_.toString:r;function Vi(Ge){if(Cg(Ge)&&!Af(Ge)&&!(Ge instanceof eh)){if(Ge instanceof ob)return Ge;if(Bh.call(Ge,"__wrapped__"))return bp(Ge)}return new ob(Ge)}var ab=(function(){function Ge(){}return function(ft){if(!Ev(ft))return{};if(fT)return fT(ft);Ge.prototype=ft;var ur=new Ge;return Ge.prototype=r,ur}})();function wx(){}function ob(Ge,ft){this.__wrapped__=Ge,this.__actions__=[],this.__chain__=!!ft,this.__index__=0,this.__values__=r}Vi.templateSettings={escape:Hl,evaluate:nu,interpolate:su,variable:"",imports:{_:Vi}},Vi.prototype=wx.prototype,Vi.prototype.constructor=Vi,ob.prototype=ab(wx.prototype),ob.prototype.constructor=ob;function eh(Ge){this.__wrapped__=Ge,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Vt,this.__views__=[]}function Sx(){var Ge=new eh(this.__wrapped__);return Ge.__actions__=Tg(this.__actions__),Ge.__dir__=this.__dir__,Ge.__filtered__=this.__filtered__,Ge.__iteratees__=Tg(this.__iteratees__),Ge.__takeCount__=this.__takeCount__,Ge.__views__=Tg(this.__views__),Ge}function hT(){if(this.__filtered__){var Ge=new eh(this);Ge.__dir__=-1,Ge.__filtered__=!0}else Ge=this.clone(),Ge.__dir__*=-1;return Ge}function J_(){var Ge=this.__wrapped__.value(),ft=this.__dir__,ur=Af(Ge),fn=ft<0,mi=ur?Ge.length:0,la=n3(0,mi,this.__views__),lo=la.start,Lo=la.end,ds=Lo-lo,Ll=fn?Lo:lo-1,Nl=this.__iteratees__,Kl=Nl.length,vc=0,lf=tm(ds,this.__takeCount__);if(!ur||!fn&&mi==ds&&lf==ds)return eI(Ge,this.__actions__);var ad=[];e:for(;ds--&&vc<lf;){Ll+=ft;for(var _h=-1,od=Ge[Ll];++_h<Kl;){var ap=Nl[_h],Gp=ap.iteratee,T2=ap.type,R_=Gp(od);if(T2==qt)od=R_;else if(!R_){if(T2==Dt)continue e;break e}}ad[vc++]=od}return ad}eh.prototype=ab(wx.prototype),eh.prototype.constructor=eh;function wv(Ge){var ft=-1,ur=Ge==null?0:Ge.length;for(this.clear();++ft<ur;){var fn=Ge[ft];this.set(fn[0],fn[1])}}function OE(){this.__data__=B0?B0(null):{},this.size=0}function mM(Ge){var ft=this.has(Ge)&&delete this.__data__[Ge];return this.size-=ft?1:0,ft}function nR(Ge){var ft=this.__data__;if(B0){var ur=ft[Ge];return ur===d?r:ur}return Bh.call(ft,Ge)?ft[Ge]:r}function Xk(Ge){var ft=this.__data__;return B0?ft[Ge]!==r:Bh.call(ft,Ge)}function Zk(Ge,ft){var ur=this.__data__;return this.size+=this.has(Ge)?0:1,ur[Ge]=B0&&ft===r?d:ft,this}wv.prototype.clear=OE,wv.prototype.delete=mM,wv.prototype.get=nR,wv.prototype.has=Xk,wv.prototype.set=Zk;function Sv(Ge){var ft=-1,ur=Ge==null?0:Ge.length;for(this.clear();++ft<ur;){var fn=Ge[ft];this.set(fn[0],fn[1])}}function gM(){this.__data__=[],this.size=0}function NE(Ge){var ft=this.__data__,ur=Ef(ft,Ge);if(ur<0)return!1;var fn=ft.length-1;return ur==fn?ft.pop():Xy.call(ft,ur,1),--this.size,!0}function pT(Ge){var ft=this.__data__,ur=Ef(ft,Ge);return ur<0?r:ft[ur][1]}function RA(Ge){return Ef(this.__data__,Ge)>-1}function Nd(Ge,ft){var ur=this.__data__,fn=Ef(ur,Ge);return fn<0?(++this.size,ur.push([Ge,ft])):ur[fn][1]=ft,this}Sv.prototype.clear=gM,Sv.prototype.delete=NE,Sv.prototype.get=pT,Sv.prototype.has=RA,Sv.prototype.set=Nd;function sb(Ge){var ft=-1,ur=Ge==null?0:Ge.length;for(this.clear();++ft<ur;){var fn=Ge[ft];this.set(fn[0],fn[1])}}function Nb(){this.size=0,this.__data__={hash:new wv,map:new(ng||Sv),string:new wv}}function FE(Ge){var ft=x_(this,Ge).delete(Ge);return this.size-=ft?1:0,ft}function Kk(Ge){return x_(this,Ge).get(Ge)}function kA(Ge){return x_(this,Ge).has(Ge)}function Tx(Ge,ft){var ur=x_(this,Ge),fn=ur.size;return ur.set(Ge,ft),this.size+=ur.size==fn?0:1,this}sb.prototype.clear=Nb,sb.prototype.delete=FE,sb.prototype.get=Kk,sb.prototype.has=kA,sb.prototype.set=Tx;function lb(Ge){var ft=-1,ur=Ge==null?0:Ge.length;for(this.__data__=new sb;++ft<ur;)this.add(Ge[ft])}function IA(Ge){return this.__data__.set(Ge,d),this}function vT(Ge){return this.__data__.has(Ge)}lb.prototype.add=lb.prototype.push=IA,lb.prototype.has=vT;function Qy(Ge){var ft=this.__data__=new Sv(Ge);this.size=ft.size}function iR(){this.__data__=new Sv,this.size=0}function d_(Ge){var ft=this.__data__,ur=ft.delete(Ge);return this.size=ft.size,ur}function PA(Ge){return this.__data__.get(Ge)}function zE(Ge){return this.__data__.has(Ge)}function mT(Ge,ft){var ur=this.__data__;if(ur instanceof Sv){var fn=ur.__data__;if(!ng||fn.length<i-1)return fn.push([Ge,ft]),this.size=++ur.size,this;ur=this.__data__=new sb(fn)}return ur.set(Ge,ft),this.size=ur.size,this}Qy.prototype.clear=iR,Qy.prototype.delete=d_,Qy.prototype.get=PA,Qy.prototype.has=zE,Qy.prototype.set=mT;function gT(Ge,ft){var ur=Af(Ge),fn=!ur&&b2(Ge),mi=!ur&&!fn&&bw(Ge),la=!ur&&!fn&&!mi&&tC(Ge),lo=ur||fn||mi||la,Lo=lo?yx(Ge.length,kE):[],ds=Lo.length;for(var Ll in Ge)(ft||Bh.call(Ge,Ll))&&!(lo&&(Ll=="length"||mi&&(Ll=="offset"||Ll=="parent")||la&&(Ll=="buffer"||Ll=="byteLength"||Ll=="byteOffset")||jb(Ll,ds)))&&Lo.push(Ll);return Lo}function Fb(Ge){var ft=Ge.length;return ft?Ge[UA(0,ft-1)]:r}function aR(Ge,ft){return w_(Tg(Ge),oh(ft,0,Ge.length))}function Jk(Ge){return w_(Tg(Ge))}function h_(Ge,ft,ur){(ur!==r&&!N1(Ge[ft],ur)||ur===r&&!(ft in Ge))&&ub(Ge,ft,ur)}function yT(Ge,ft,ur){var fn=Ge[ft];(!(Bh.call(Ge,ft)&&N1(fn,ur))||ur===r&&!(ft in Ge))&&ub(Ge,ft,ur)}function Ef(Ge,ft){for(var ur=Ge.length;ur--;)if(N1(Ge[ur][0],ft))return ur;return-1}function p_(Ge,ft,ur,fn){return r2(Ge,function(mi,la,lo){ft(fn,mi,ur(mi),lo)}),fn}function Q_(Ge,ft){return Ge&&cb(ft,Mg(ft),Ge)}function bT(Ge,ft){return Ge&&cb(ft,Z0(ft),Ge)}function ub(Ge,ft,ur){ft=="__proto__"&&DE?DE(Ge,ft,{configurable:!0,enumerable:!0,value:ur,writable:!0}):Ge[ft]=ur}function DA(Ge,ft){for(var ur=-1,fn=ft.length,mi=Fs(fn),la=Ge==null;++ur<fn;)mi[ur]=la?r:aC(Ge,ft[ur]);return mi}function oh(Ge,ft,ur){return Ge===Ge&&(ur!==r&&(Ge=Ge<=ur?Ge:ur),ft!==r&&(Ge=Ge>=ft?Ge:ft)),Ge}function U0(Ge,ft,ur,fn,mi,la){var lo,Lo=ft&B,ds=ft&V,Ll=ft&X;if(ur&&(lo=mi?ur(Ge,fn,mi,la):ur(Ge)),lo!==r)return lo;if(!Ev(Ge))return Ge;var Nl=Af(Ge);if(Nl){if(lo=j0(Ge),!Lo)return Tg(Ge,lo)}else{var Kl=rp(Ge),vc=Kl==jn||Kl==Lr;if(bw(Ge))return TM(Ge,Lo);if(Kl==bn||Kl==Ar||vc&&!mi){if(lo=ds||vc?{}:w0(Ge),!Lo)return ds?l2(Ge,bT(lo,Ge)):QE(Ge,Q_(lo,Ge))}else{if(!jp[Kl])return mi?Ge:{};lo=np(Ge,Kl,Lo)}}la||(la=new Qy);var lf=la.get(Ge);if(lf)return lf;la.set(Ge,lo),k4(Ge)?Ge.forEach(function(od){lo.add(U0(od,ft,ur,od,Ge,la))}):wR(Ge)&&Ge.forEach(function(od,ap){lo.set(ap,U0(od,ft,ur,ap,Ge,la))});var ad=Ll?ds?n1:r1:ds?Z0:Mg,_h=Nl?r:ad(Ge);return Db(_h||Ge,function(od,ap){_h&&(ap=od,od=Ge[ap]),yT(lo,ap,U0(od,ft,ur,ap,Ge,la))}),lo}function xT(Ge){var ft=Mg(Ge);return function(ur){return oR(ur,Ge,ft)}}function oR(Ge,ft,ur){var fn=ur.length;if(Ge==null)return!fn;for(Ge=zh(Ge);fn--;){var mi=ur[fn],la=ft[mi],lo=Ge[mi];if(lo===r&&!(mi in Ge)||!la(lo))return!1}return!0}function nS(Ge,ft,ur){if(typeof Ge!="function")throw new Vf(o);return h2(function(){Ge.apply(r,ur)},ft)}function iS(Ge,ft,ur,fn){var mi=-1,la=yA,lo=!0,Lo=Ge.length,ds=[],Ll=ft.length;if(!Lo)return ds;ur&&(ft=Qv(ft,hy(ur))),fn?(la=TE,lo=!1):ft.length>=i&&(la=Nm,lo=!1,ft=new lb(ft));e:for(;++mi<Lo;){var Nl=Ge[mi],Kl=ur==null?Nl:ur(Nl);if(Nl=fn||Nl!==0?Nl:0,lo&&Kl===Kl){for(var vc=Ll;vc--;)if(ft[vc]===Kl)continue e;ds.push(Nl)}else la(ft,Kl,fn)||ds.push(Nl)}return ds}var r2=MM(ym),yM=MM(Gg,!0);function LA(Ge,ft){var ur=!0;return r2(Ge,function(fn,mi,la){return ur=!!ft(fn,mi,la),ur}),ur}function Ex(Ge,ft,ur){for(var fn=-1,mi=Ge.length;++fn<mi;){var la=Ge[fn],lo=ft(la);if(lo!=null&&(Lo===r?lo===lo&&!hb(lo):ur(lo,Lo)))var Lo=lo,ds=la}return ds}function Fd(Ge,ft,ur,fn){var mi=Ge.length;for(ur=Dd(ur),ur<0&&(ur=-ur>mi?0:mi+ur),fn=fn===r||fn>mi?mi:Dd(fn),fn<0&&(fn+=mi),fn=ur>fn?0:_2(fn);ur<fn;)Ge[ur++]=ft;return Ge}function Yp(Ge,ft){var ur=[];return r2(Ge,function(fn,mi,la){ft(fn,mi,la)&&ur.push(fn)}),ur}function Mh(Ge,ft,ur,fn,mi){var la=-1,lo=Ge.length;for(ur||(ur=V0),mi||(mi=[]);++la<lo;){var Lo=Ge[la];ft>0&&ur(Lo)?ft>1?Mh(Lo,ft-1,ur,fn,mi):dy(mi,Lo):fn||(mi[mi.length]=Lo)}return mi}var BE=u2(),n2=u2(!0);function ym(Ge,ft){return Ge&&BE(Ge,ft,Mg)}function Gg(Ge,ft){return Ge&&n2(Ge,ft,Mg)}function I1(Ge,ft){return Lb(ft,function(ur){return xw(Ge[ur])})}function ig(Ge,ft){ft=nw(ft,Ge);for(var ur=0,fn=ft.length;Ge!=null&&ur<fn;)Ge=Ge[Rh(ft[ur++])];return ur&&ur==fn?Ge:r}function sR(Ge,ft,ur){var fn=ft(Ge);return Af(Ge)?fn:dy(fn,ur(Ge))}function th(Ge){return Ge==null?Ge===r?Tn:Sn:Ch&&Ch in zh(Ge)?fS(Ge):MT(Ge)}function rm(Ge,ft){return Ge>ft}function v_(Ge,ft){return Ge!=null&&Bh.call(Ge,ft)}function bM(Ge,ft){return Ge!=null&&ft in zh(Ge)}function zb(Ge,ft,ur){return Ge>=tm(ft,ur)&&Ge<em(ft,ur)}function xM(Ge,ft,ur){for(var fn=ur?TE:yA,mi=Ge[0].length,la=Ge.length,lo=la,Lo=Fs(la),ds=1/0,Ll=[];lo--;){var Nl=Ge[lo];lo&&ft&&(Nl=Qv(Nl,hy(ft))),ds=tm(Nl.length,ds),Lo[lo]=!ur&&(ft||mi>=120&&Nl.length>=120)?new lb(lo&&Nl):r}Nl=Ge[0];var Kl=-1,vc=Lo[0];e:for(;++Kl<mi&&Ll.length<ds;){var lf=Nl[Kl],ad=ft?ft(lf):lf;if(lf=ur||lf!==0?lf:0,!(vc?Nm(vc,ad):fn(Ll,ad,ur))){for(lo=la;--lo;){var _h=Lo[lo];if(!(_h?Nm(_h,ad):fn(Ge[lo],ad,ur)))continue e}vc&&vc.push(ad),Ll.push(lf)}}return Ll}function UE(Ge,ft,ur,fn){return ym(Ge,function(mi,la,lo){ft(fn,ur(mi),la,lo)}),fn}function aS(Ge,ft,ur){ft=nw(ft,Ge),Ge=pS(Ge,ft);var fn=Ge==null?Ge:Ge[Rh(Bm(ft))];return fn==null?r:Vp(fn,Ge,ur)}function x0(Ge){return Cg(Ge)&&th(Ge)==Ar}function yy(Ge){return Cg(Ge)&&th(Ge)==Ei}function Xp(Ge){return Cg(Ge)&&th(Ge)==Qn}function by(Ge,ft,ur,fn,mi){return Ge===ft?!0:Ge==null||ft==null||!Cg(Ge)&&!Cg(ft)?Ge!==Ge&&ft!==ft:P1(Ge,ft,ur,fn,by,mi)}function P1(Ge,ft,ur,fn,mi,la){var lo=Af(Ge),Lo=Af(ft),ds=lo?Ir:rp(Ge),Ll=Lo?Ir:rp(ft);ds=ds==Ar?bn:ds,Ll=Ll==Ar?bn:Ll;var Nl=ds==bn,Kl=Ll==bn,vc=ds==Ll;if(vc&&bw(Ge)){if(!bw(ft))return!1;lo=!0,Nl=!1}if(vc&&!Nl)return la||(la=new Qy),lo||tC(Ge)?mR(Ge,ft,ur,fn,mi,la):cS(Ge,ft,ds,ur,fn,mi,la);if(!(ur&ie)){var lf=Nl&&Bh.call(Ge,"__wrapped__"),ad=Kl&&Bh.call(ft,"__wrapped__");if(lf||ad){var _h=lf?Ge.value():Ge,od=ad?ft.value():ft;return la||(la=new Qy),mi(_h,od,ur,fn,la)}}return vc?(la||(la=new Qy),H0(Ge,ft,ur,fn,mi,la)):!1}function _M(Ge){return Cg(Ge)&&rp(Ge)==Yn}function i2(Ge,ft,ur,fn){var mi=ur.length,la=mi,lo=!fn;if(Ge==null)return!la;for(Ge=zh(Ge);mi--;){var Lo=ur[mi];if(lo&&Lo[2]?Lo[1]!==Ge[Lo[0]]:!(Lo[0]in Ge))return!1}for(;++mi<la;){Lo=ur[mi];var ds=Lo[0],Ll=Ge[ds],Nl=Lo[1];if(lo&&Lo[2]){if(Ll===r&&!(ds in Ge))return!1}else{var Kl=new Qy;if(fn)var vc=fn(Ll,Nl,ds,Ge,ft,Kl);if(!(vc===r?by(Nl,Ll,ie|de,fn,Kl):vc))return!1}}return!0}function ew(Ge){if(!Ev(Ge)||d2(Ge))return!1;var ft=xw(Ge)?vM:Mi;return ft.test(kx(Ge))}function oS(Ge){return Cg(Ge)&&th(Ge)==Oi}function HE(Ge){return Cg(Ge)&&rp(Ge)==Pa}function jE(Ge){return Cg(Ge)&&C_(Ge.length)&&!!Pp[th(Ge)]}function VE(Ge){return typeof Ge=="function"?Ge:Ge==null?Es:typeof Ge=="object"?Af(Ge)?FA(Ge[0],Ge[1]):NA(Ge):Op(Ge)}function tw(Ge){if(!Zp(Ge))return F0(Ge);var ft=[];for(var ur in zh(Ge))Bh.call(Ge,ur)&&ur!="constructor"&&ft.push(ur);return ft}function lR(Ge){if(!Ev(Ge))return Vb(Ge);var ft=Zp(Ge),ur=[];for(var fn in Ge)fn=="constructor"&&(ft||!Bh.call(Ge,fn))||ur.push(fn);return ur}function qE(Ge,ft){return Ge<ft}function OA(Ge,ft){var ur=-1,fn=Sy(Ge)?Fs(Ge.length):[];return r2(Ge,function(mi,la,lo){fn[++ur]=ft(mi,la,lo)}),fn}function NA(Ge){var ft=L1(Ge);return ft.length==1&&ft[0][2]?dS(ft[0][0],ft[0][1]):function(ur){return ur===Ge||i2(ur,Ge,ft)}}function FA(Ge,ft){return f2(Ge)&&XA(ft)?dS(Rh(Ge),ft):function(ur){var fn=aC(ur,Ge);return fn===r&&fn===ft?b3(ur,Ge):by(ft,fn,ie|de)}}function zA(Ge,ft,ur,fn,mi){Ge!==ft&&BE(ft,function(la,lo){if(mi||(mi=new Qy),Ev(la))Qk(Ge,ft,lo,ur,zA,fn,mi);else{var Lo=fn?fn(vS(Ge,lo),la,lo+"",Ge,ft,mi):r;Lo===r&&(Lo=la),h_(Ge,lo,Lo)}},Z0)}function Qk(Ge,ft,ur,fn,mi,la,lo){var Lo=vS(Ge,ur),ds=vS(ft,ur),Ll=lo.get(ds);if(Ll){h_(Ge,ur,Ll);return}var Nl=la?la(Lo,ds,ur+"",Ge,ft,lo):r,Kl=Nl===r;if(Kl){var vc=Af(ds),lf=!vc&&bw(ds),ad=!vc&&!lf&&tC(ds);Nl=ds,vc||lf||ad?Af(Lo)?Nl=Lo:i0(Lo)?Nl=Tg(Lo):lf?(Kl=!1,Nl=TM(ds,!0)):ad?(Kl=!1,Nl=t1(ds,!0)):Nl=[]:a1(ds)||b2(ds)?(Nl=Lo,b2(Lo)?Nl=w2(Lo):(!Ev(Lo)||xw(Lo))&&(Nl=w0(ds))):Kl=!1}Kl&&(lo.set(ds,Nl),mi(Nl,ds,fn,la,lo),lo.delete(ds)),h_(Ge,ur,Nl)}function uR(Ge,ft){var ur=Ge.length;if(ur)return ft+=ft<0?ur:0,jb(ft,ur)?Ge[ft]:r}function cR(Ge,ft,ur){ft.length?ft=Qv(ft,function(la){return Af(la)?function(lo){return ig(lo,la.length===1?la[0]:la)}:la}):ft=[Es];var fn=-1;ft=Qv(ft,hy(nf()));var mi=OA(Ge,function(la,lo,Lo){var ds=Qv(ft,function(Ll){return Ll(la)});return{criteria:ds,index:++fn,value:la}});return oT(mi,function(la,lo){return $A(la,lo,ur)})}function GE(Ge,ft){return $E(Ge,ft,function(ur,fn){return b3(Ge,fn)})}function $E(Ge,ft,ur){for(var fn=-1,mi=ft.length,la={};++fn<mi;){var lo=ft[fn],Lo=ig(Ge,lo);ur(Lo,lo)&&a2(la,nw(lo,Ge),Lo)}return la}function BA(Ge){return function(ft){return ig(ft,Ge)}}function WE(Ge,ft,ur,fn){var mi=fn?xA:C1,la=-1,lo=ft.length,Lo=Ge;for(Ge===ft&&(ft=Tg(ft)),ur&&(Lo=Qv(Ge,hy(ur)));++la<lo;)for(var ds=0,Ll=ft[la],Nl=ur?ur(Ll):Ll;(ds=mi(Lo,Nl,ds,fn))>-1;)Lo!==Ge&&Xy.call(Lo,ds,1),Xy.call(Ge,ds,1);return Ge}function fR(Ge,ft){for(var ur=Ge?ft.length:0,fn=ur-1;ur--;){var mi=ft[ur];if(ur==fn||mi!==la){var la=mi;jb(mi)?Xy.call(Ge,mi,1):XE(Ge,mi)}}return Ge}function UA(Ge,ft){return Ge+b0(qg()*(ft-Ge+1))}function dR(Ge,ft,ur,fn){for(var mi=-1,la=em(Zy((ft-Ge)/(ur||1)),0),lo=Fs(la);la--;)lo[fn?la:++mi]=Ge,Ge+=ur;return lo}function wM(Ge,ft){var ur="";if(!Ge||ft<1||ft>Zt)return ur;do ft%2&&(ur+=Ge),ft=b0(ft/2),ft&&(Ge+=Ge);while(ft);return ur}function Gd(Ge,ft){return fw(uw(Ge,ft,Es),Ge+"")}function _T(Ge){return Fb(sC(Ge))}function HA(Ge,ft){var ur=sC(Ge);return w_(ur,oh(ft,0,ur.length))}function a2(Ge,ft,ur,fn){if(!Ev(Ge))return Ge;ft=nw(ft,Ge);for(var mi=-1,la=ft.length,lo=la-1,Lo=Ge;Lo!=null&&++mi<la;){var ds=Rh(ft[mi]),Ll=ur;if(ds==="__proto__"||ds==="constructor"||ds==="prototype")return Ge;if(mi!=lo){var Nl=Lo[ds];Ll=fn?fn(Nl,ds,Lo):r,Ll===r&&(Ll=Ev(Nl)?Nl:jb(ft[mi+1])?[]:{})}yT(Lo,ds,Ll),Lo=Lo[ds]}return Ge}var wT=t2?function(Ge,ft){return t2.set(Ge,ft),Ge}:Es,sS=DE?function(Ge,ft){return DE(Ge,"toString",{configurable:!0,enumerable:!1,value:Ts(ft),writable:!0})}:Es;function jA(Ge){return w_(sC(Ge))}function D1(Ge,ft,ur){var fn=-1,mi=Ge.length;ft<0&&(ft=-ft>mi?0:mi+ft),ur=ur>mi?mi:ur,ur<0&&(ur+=mi),mi=ft>ur?0:ur-ft>>>0,ft>>>=0;for(var la=Fs(mi);++fn<mi;)la[fn]=Ge[fn+ft];return la}function YE(Ge,ft){var ur;return r2(Ge,function(fn,mi,la){return ur=ft(fn,mi,la),!ur}),!!ur}function o2(Ge,ft,ur){var fn=0,mi=Ge==null?fn:Ge.length;if(typeof ft=="number"&&ft===ft&&mi<=sr){for(;fn<mi;){var la=fn+mi>>>1,lo=Ge[la];lo!==null&&!hb(lo)&&(ur?lo<=ft:lo<ft)?fn=la+1:mi=la}return mi}return VA(Ge,ft,Es,ur)}function VA(Ge,ft,ur,fn){var mi=0,la=Ge==null?0:Ge.length;if(la===0)return 0;ft=ur(ft);for(var lo=ft!==ft,Lo=ft===null,ds=hb(ft),Ll=ft===r;mi<la;){var Nl=b0((mi+la)/2),Kl=ur(Ge[Nl]),vc=Kl!==r,lf=Kl===null,ad=Kl===Kl,_h=hb(Kl);if(lo)var od=fn||ad;else Ll?od=ad&&(fn||vc):Lo?od=ad&&vc&&(fn||!lf):ds?od=ad&&vc&&!lf&&(fn||!_h):lf||_h?od=!1:od=fn?Kl<=ft:Kl<ft;od?mi=Nl+1:la=Nl}return tm(la,Er)}function qA(Ge,ft){for(var ur=-1,fn=Ge.length,mi=0,la=[];++ur<fn;){var lo=Ge[ur],Lo=ft?ft(lo):lo;if(!ur||!N1(Lo,ds)){var ds=Lo;la[mi++]=lo===0?0:lo}}return la}function rw(Ge){return typeof Ge=="number"?Ge:hb(Ge)?yt:+Ge}function e1(Ge){if(typeof Ge=="string")return Ge;if(Af(Ge))return Qv(Ge,e1)+"";if(hb(Ge))return f_?f_.call(Ge):"";var ft=Ge+"";return ft=="0"&&1/Ge==-dr?"-0":ft}function Ax(Ge,ft,ur){var fn=-1,mi=yA,la=Ge.length,lo=!0,Lo=[],ds=Lo;if(ur)lo=!1,mi=TE;else if(la>=i){var Ll=ft?null:aI(Ge);if(Ll)return Zw(Ll);lo=!1,mi=Nm,ds=new lb}else ds=ft?[]:Lo;e:for(;++fn<la;){var Nl=Ge[fn],Kl=ft?ft(Nl):Nl;if(Nl=ur||Nl!==0?Nl:0,lo&&Kl===Kl){for(var vc=ds.length;vc--;)if(ds[vc]===Kl)continue e;ft&&ds.push(Kl),Lo.push(Nl)}else mi(ds,Kl,ur)||(ds!==Lo&&ds.push(Kl),Lo.push(Nl))}return Lo}function XE(Ge,ft){return ft=nw(ft,Ge),Ge=pS(Ge,ft),Ge==null||delete Ge[Rh(Bm(ft))]}function hR(Ge,ft,ur,fn){return a2(Ge,ft,ur(ig(Ge,ft)),fn)}function ZE(Ge,ft,ur,fn){for(var mi=Ge.length,la=fn?mi:-1;(fn?la--:++la<mi)&&ft(Ge[la],la,Ge););return ur?D1(Ge,fn?0:la,fn?la+1:mi):D1(Ge,fn?la+1:0,fn?mi:la)}function eI(Ge,ft){var ur=Ge;return ur instanceof eh&&(ur=ur.value()),uM(ft,function(fn,mi){return mi.func.apply(mi.thisArg,dy([fn],mi.args))},ur)}function ST(Ge,ft,ur){var fn=Ge.length;if(fn<2)return fn?Ax(Ge[0]):[];for(var mi=-1,la=Fs(fn);++mi<fn;)for(var lo=Ge[mi],Lo=-1;++Lo<fn;)Lo!=mi&&(la[mi]=iS(la[mi]||lo,Ge[Lo],ft,ur));return Ax(Mh(la,1),ft,ur)}function pR(Ge,ft,ur){for(var fn=-1,mi=Ge.length,la=ft.length,lo={};++fn<mi;){var Lo=fn<la?ft[fn]:r;ur(lo,Ge[fn],Lo)}return lo}function KE(Ge){return i0(Ge)?Ge:[]}function GA(Ge){return typeof Ge=="function"?Ge:Es}function nw(Ge,ft){return Af(Ge)?Ge:f2(Ge,ft)?[Ge]:q0(qp(Ge))}var tI=Gd;function lS(Ge,ft,ur){var fn=Ge.length;return ur=ur===r?fn:ur,!ft&&ur>=fn?Ge:D1(Ge,ft,ur)}var SM=rg||function(Ge){return Nv.clearTimeout(Ge)};function TM(Ge,ft){if(ft)return Ge.slice();var ur=Ge.length,fn=ib?ib(ur):new Ge.constructor(ur);return Ge.copy(fn),fn}function TT(Ge){var ft=new Ge.constructor(Ge.byteLength);return new cT(ft).set(new cT(Ge)),ft}function EM(Ge,ft){var ur=ft?TT(Ge.buffer):Ge.buffer;return new Ge.constructor(ur,Ge.byteOffset,Ge.byteLength)}function AM(Ge){var ft=new Ge.constructor(Ge.source,Za.exec(Ge));return ft.lastIndex=Ge.lastIndex,ft}function rI(Ge){return dT?zh(dT.call(Ge)):{}}function t1(Ge,ft){var ur=ft?TT(Ge.buffer):Ge.buffer;return new Ge.constructor(ur,Ge.byteOffset,Ge.length)}function s2(Ge,ft){if(Ge!==ft){var ur=Ge!==r,fn=Ge===null,mi=Ge===Ge,la=hb(Ge),lo=ft!==r,Lo=ft===null,ds=ft===ft,Ll=hb(ft);if(!Lo&&!Ll&&!la&&Ge>ft||la&&lo&&ds&&!Lo&&!Ll||fn&&lo&&ds||!ur&&ds||!mi)return 1;if(!fn&&!la&&!Ll&&Ge<ft||Ll&&ur&&mi&&!fn&&!la||Lo&&ur&&mi||!lo&&mi||!ds)return-1}return 0}function $A(Ge,ft,ur){for(var fn=-1,mi=Ge.criteria,la=ft.criteria,lo=mi.length,Lo=ur.length;++fn<lo;){var ds=s2(mi[fn],la[fn]);if(ds){if(fn>=Lo)return ds;var Ll=ur[fn];return ds*(Ll=="desc"?-1:1)}}return Ge.index-ft.index}function JE(Ge,ft,ur,fn){for(var mi=-1,la=Ge.length,lo=ur.length,Lo=-1,ds=ft.length,Ll=em(la-lo,0),Nl=Fs(ds+Ll),Kl=!fn;++Lo<ds;)Nl[Lo]=ft[Lo];for(;++mi<lo;)(Kl||mi<la)&&(Nl[ur[mi]]=Ge[mi]);for(;Ll--;)Nl[Lo++]=Ge[mi++];return Nl}function CM(Ge,ft,ur,fn){for(var mi=-1,la=Ge.length,lo=-1,Lo=ur.length,ds=-1,Ll=ft.length,Nl=em(la-Lo,0),Kl=Fs(Nl+Ll),vc=!fn;++mi<Nl;)Kl[mi]=Ge[mi];for(var lf=mi;++ds<Ll;)Kl[lf+ds]=ft[ds];for(;++lo<Lo;)(vc||mi<la)&&(Kl[lf+ur[lo]]=Ge[mi++]);return Kl}function Tg(Ge,ft){var ur=-1,fn=Ge.length;for(ft||(ft=Fs(fn));++ur<fn;)ft[ur]=Ge[ur];return ft}function cb(Ge,ft,ur,fn){var mi=!ur;ur||(ur={});for(var la=-1,lo=ft.length;++la<lo;){var Lo=ft[la],ds=fn?fn(ur[Lo],Ge[Lo],Lo,ur,Ge):r;ds===r&&(ds=Ge[Lo]),mi?ub(ur,Lo,ds):yT(ur,Lo,ds)}return ur}function QE(Ge,ft){return cb(Ge,Hb(Ge),ft)}function l2(Ge,ft){return cb(Ge,Mx(Ge),ft)}function uS(Ge,ft){return function(ur,fn){var mi=Af(ur)?i_:p_,la=ft?ft():{};return mi(ur,Ge,nf(fn,2),la)}}function iw(Ge){return Gd(function(ft,ur){var fn=-1,mi=ur.length,la=mi>1?ur[mi-1]:r,lo=mi>2?ur[2]:r;for(la=Ge.length>3&&typeof la=="function"?(mi--,la):r,lo&&im(ur[0],ur[1],lo)&&(la=mi<3?r:la,mi=1),ft=zh(ft);++fn<mi;){var Lo=ur[fn];Lo&&Ge(ft,Lo,fn,la)}return ft})}function MM(Ge,ft){return function(ur,fn){if(ur==null)return ur;if(!Sy(ur))return Ge(ur,fn);for(var mi=ur.length,la=ft?mi:-1,lo=zh(ur);(ft?la--:++la<mi)&&fn(lo[la],la,lo)!==!1;);return ur}}function u2(Ge){return function(ft,ur,fn){for(var mi=-1,la=zh(ft),lo=fn(ft),Lo=lo.length;Lo--;){var ds=lo[Ge?Lo:++mi];if(ur(la[ds],ds,la)===!1)break}return ft}}function nI(Ge,ft,ur){var fn=ft&ae,mi=Bb(Ge);function la(){var lo=this&&this!==Nv&&this instanceof la?mi:Ge;return lo.apply(fn?ur:this,arguments)}return la}function lv(Ge){return function(ft){ft=qp(ft);var ur=s_(ft)?Fm(ft):r,fn=ur?ur[0]:ft.charAt(0),mi=ur?lS(ur,1).join(""):ft.slice(1);return fn[Ge]()+mi}}function xy(Ge){return function(ft){return uM(Xt(S2(ft).replace(n_,"")),Ge,"")}}function Bb(Ge){return function(){var ft=arguments;switch(ft.length){case 0:return new Ge;case 1:return new Ge(ft[0]);case 2:return new Ge(ft[0],ft[1]);case 3:return new Ge(ft[0],ft[1],ft[2]);case 4:return new Ge(ft[0],ft[1],ft[2],ft[3]);case 5:return new Ge(ft[0],ft[1],ft[2],ft[3],ft[4]);case 6:return new Ge(ft[0],ft[1],ft[2],ft[3],ft[4],ft[5]);case 7:return new Ge(ft[0],ft[1],ft[2],ft[3],ft[4],ft[5],ft[6])}var ur=ab(Ge.prototype),fn=Ge.apply(ur,ft);return Ev(fn)?fn:ur}}function RM(Ge,ft,ur){var fn=Bb(Ge);function mi(){for(var la=arguments.length,lo=Fs(la),Lo=la,ds=Cx(mi);Lo--;)lo[Lo]=arguments[Lo];var Ll=la<3&&lo[0]!==ds&&lo[la-1]!==ds?[]:bx(lo,ds);if(la-=Ll.length,la<ur)return ET(Ge,ft,nm,mi.placeholder,r,lo,Ll,r,r,ur-la);var Nl=this&&this!==Nv&&this instanceof mi?fn:Ge;return Vp(Nl,this,lo)}return mi}function aw(Ge){return function(ft,ur,fn){var mi=zh(ft);if(!Sy(ft)){var la=nf(ur,3);ft=Mg(ft),ur=function(Lo){return la(mi[Lo],Lo,mi)}}var lo=Ge(ft,ur,fn);return lo>-1?mi[la?ft[lo]:lo]:r}}function Ub(Ge){return uv(function(ft){var ur=ft.length,fn=ur,mi=ob.prototype.thru;for(Ge&&ft.reverse();fn--;){var la=ft[fn];if(typeof la!="function")throw new Vf(o);if(mi&&!lo&&b_(la)=="wrapper")var lo=new ob([],!0)}for(fn=lo?fn:ur;++fn<ur;){la=ft[fn];var Lo=b_(la),ds=Lo=="wrapper"?r3(la):r;ds&&AT(ds[0])&&ds[1]==(Ve|Se|Me|Ze)&&!ds[4].length&&ds[9]==1?lo=lo[b_(ds[0])].apply(lo,ds[3]):lo=la.length==1&&AT(la)?lo[Lo]():lo.thru(la)}return function(){var Ll=arguments,Nl=Ll[0];if(lo&&Ll.length==1&&Af(Nl))return lo.plant(Nl).value();for(var Kl=0,vc=ur?ft[Kl].apply(this,Ll):Nl;++Kl<ur;)vc=ft[Kl].call(this,vc);return vc}})}function nm(Ge,ft,ur,fn,mi,la,lo,Lo,ds,Ll){var Nl=ft&Ve,Kl=ft&ae,vc=ft&U,lf=ft&(Se|Pe),ad=ft&Je,_h=vc?r:Bb(Ge);function od(){for(var ap=arguments.length,Gp=Fs(ap),T2=ap;T2--;)Gp[T2]=arguments[T2];if(lf)var R_=Cx(od),E2=dM(Gp,R_);if(fn&&(Gp=JE(Gp,fn,mi,lf)),la&&(Gp=CM(Gp,la,lo,lf)),ap-=E2,lf&&ap<Ll){var Ey=bx(Gp,R_);return ET(Ge,ft,nm,od.placeholder,ur,Gp,Ey,Lo,ds,Ll-ap)}var MS=Kl?ur:this,w3=vc?MS[Ge]:Ge;return ap=Gp.length,Lo?Gp=cw(Gp,Lo):ad&&ap>1&&Gp.reverse(),Nl&&ds<ap&&(Gp.length=ds),this&&this!==Nv&&this instanceof od&&(w3=_h||Bb(w3)),w3.apply(MS,Gp)}return od}function m_(Ge,ft){return function(ur,fn){return UE(ur,Ge,ft(fn),{})}}function g_(Ge,ft){return function(ur,fn){var mi;if(ur===r&&fn===r)return ft;if(ur!==r&&(mi=ur),fn!==r){if(mi===r)return fn;typeof ur=="string"||typeof fn=="string"?(ur=e1(ur),fn=e1(fn)):(ur=rw(ur),fn=rw(fn)),mi=Ge(ur,fn)}return mi}}function _y(Ge){return uv(function(ft){return ft=Qv(ft,hy(nf())),Gd(function(ur){var fn=this;return Ge(ft,function(mi){return Vp(mi,fn,ur)})})})}function e3(Ge,ft){ft=ft===r?" ":e1(ft);var ur=ft.length;if(ur<2)return ur?wM(ft,Ge):ft;var fn=wM(ft,Zy(Ge/Yy(ft)));return s_(ft)?lS(Fm(fn),0,Ge).join(""):fn.slice(0,Ge)}function iI(Ge,ft,ur,fn){var mi=ft&ae,la=Bb(Ge);function lo(){for(var Lo=-1,ds=arguments.length,Ll=-1,Nl=fn.length,Kl=Fs(Nl+ds),vc=this&&this!==Nv&&this instanceof lo?la:Ge;++Ll<Nl;)Kl[Ll]=fn[Ll];for(;ds--;)Kl[Ll++]=arguments[++Lo];return Vp(vc,mi?ur:this,Kl)}return lo}function y_(Ge){return function(ft,ur,fn){return fn&&typeof fn!="number"&&im(ft,ur,fn)&&(ur=fn=r),ft=ww(ft),ur===r?(ur=ft,ft=0):ur=ww(ur),fn=fn===r?ft<ur?1:-1:ww(fn),dR(ft,ur,fn,Ge)}}function ow(Ge){return function(ft,ur){return typeof ft=="string"&&typeof ur=="string"||(ft=Nx(ft),ur=Nx(ur)),Ge(ft,ur)}}function ET(Ge,ft,ur,fn,mi,la,lo,Lo,ds,Ll){var Nl=ft&Se,Kl=Nl?lo:r,vc=Nl?r:lo,lf=Nl?la:r,ad=Nl?r:la;ft|=Nl?Me:Ie,ft&=~(Nl?Ie:Me),ft&ve||(ft&=-4);var _h=[Ge,ft,mi,lf,Kl,ad,vc,Lo,ds,Ll],od=ur.apply(r,_h);return AT(Ge)&&i3(od,_h),od.placeholder=fn,qb(od,Ge,ft)}function t3(Ge){var ft=Vg[Ge];return function(ur,fn){if(ur=Nx(ur),fn=fn==null?0:tm(Dd(fn),292),fn&&my(ur)){var mi=(qp(ur)+"e").split("e"),la=ft(mi[0]+"e"+(+mi[1]+fn));return mi=(qp(la)+"e").split("e"),+(mi[0]+"e"+(+mi[1]-fn))}return ft(ur)}}var aI=qd&&1/Zw(new qd([,-0]))[1]==dr?function(Ge){return new qd(Ge)}:Lc;function WA(Ge){return function(ft){var ur=rp(ft);return ur==Yn?SA(ft):ur==Pa?rS(ft):o_(ft,Ge(ft))}}function n0(Ge,ft,ur,fn,mi,la,lo,Lo){var ds=ft&U;if(!ds&&typeof Ge!="function")throw new Vf(o);var Ll=fn?fn.length:0;if(Ll||(ft&=-97,fn=mi=r),lo=lo===r?lo:em(Dd(lo),0),Lo=Lo===r?Lo:Dd(Lo),Ll-=mi?mi.length:0,ft&Ie){var Nl=fn,Kl=mi;fn=mi=r}var vc=ds?r:r3(Ge),lf=[Ge,ft,ur,fn,mi,Nl,Kl,la,lo,Lo];if(vc&&hS(lf,vc),Ge=lf[0],ft=lf[1],ur=lf[2],fn=lf[3],mi=lf[4],Lo=lf[9]=lf[9]===r?ds?0:Ge.length:em(lf[9]-Ll,0),!Lo&&ft&(Se|Pe)&&(ft&=-25),!ft||ft==ae)var ad=nI(Ge,ft,ur);else ft==Se||ft==Pe?ad=RM(Ge,ft,Lo):(ft==Me||ft==(ae|Me))&&!mi.length?ad=iI(Ge,ft,ur,fn):ad=nm.apply(r,lf);var _h=vc?wT:i3;return qb(_h(ad,lf),Ge,ft)}function YA(Ge,ft,ur,fn){return Ge===r||N1(Ge,l_[ur])&&!Bh.call(fn,ur)?ft:Ge}function vR(Ge,ft,ur,fn,mi,la){return Ev(Ge)&&Ev(ft)&&(la.set(ft,Ge),zA(Ge,ft,r,vR,la),la.delete(ft)),Ge}function kM(Ge){return a1(Ge)?r:Ge}function mR(Ge,ft,ur,fn,mi,la){var lo=ur&ie,Lo=Ge.length,ds=ft.length;if(Lo!=ds&&!(lo&&ds>Lo))return!1;var Ll=la.get(Ge),Nl=la.get(ft);if(Ll&&Nl)return Ll==ft&&Nl==Ge;var Kl=-1,vc=!0,lf=ur&de?new lb:r;for(la.set(Ge,ft),la.set(ft,Ge);++Kl<Lo;){var ad=Ge[Kl],_h=ft[Kl];if(fn)var od=lo?fn(_h,ad,Kl,ft,Ge,la):fn(ad,_h,Kl,Ge,ft,la);if(od!==r){if(od)continue;vc=!1;break}if(lf){if(!bA(ft,function(ap,Gp){if(!Nm(lf,Gp)&&(ad===ap||mi(ad,ap,ur,fn,la)))return lf.push(Gp)})){vc=!1;break}}else if(!(ad===_h||mi(ad,_h,ur,fn,la))){vc=!1;break}}return la.delete(Ge),la.delete(ft),vc}function cS(Ge,ft,ur,fn,mi,la,lo){switch(ur){case Ki:if(Ge.byteLength!=ft.byteLength||Ge.byteOffset!=ft.byteOffset)return!1;Ge=Ge.buffer,ft=ft.buffer;case Ei:return!(Ge.byteLength!=ft.byteLength||!la(new cT(Ge),new cT(ft)));case Un:case Qn:case On:return N1(+Ge,+ft);case Vn:return Ge.name==ft.name&&Ge.message==ft.message;case Oi:case va:return Ge==ft+"";case Yn:var Lo=SA;case Pa:var ds=fn&ie;if(Lo||(Lo=Zw),Ge.size!=ft.size&&!ds)return!1;var Ll=lo.get(Ge);if(Ll)return Ll==ft;fn|=de,lo.set(Ge,ft);var Nl=mR(Lo(Ge),Lo(ft),fn,mi,la,lo);return lo.delete(Ge),Nl;case ti:if(dT)return dT.call(Ge)==dT.call(ft)}return!1}function H0(Ge,ft,ur,fn,mi,la){var lo=ur&ie,Lo=r1(Ge),ds=Lo.length,Ll=r1(ft),Nl=Ll.length;if(ds!=Nl&&!lo)return!1;for(var Kl=ds;Kl--;){var vc=Lo[Kl];if(!(lo?vc in ft:Bh.call(ft,vc)))return!1}var lf=la.get(Ge),ad=la.get(ft);if(lf&&ad)return lf==ft&&ad==Ge;var _h=!0;la.set(Ge,ft),la.set(ft,Ge);for(var od=lo;++Kl<ds;){vc=Lo[Kl];var ap=Ge[vc],Gp=ft[vc];if(fn)var T2=lo?fn(Gp,ap,vc,ft,Ge,la):fn(ap,Gp,vc,Ge,ft,la);if(!(T2===r?ap===Gp||mi(ap,Gp,ur,fn,la):T2)){_h=!1;break}od||(od=vc=="constructor")}if(_h&&!od){var R_=Ge.constructor,E2=ft.constructor;R_!=E2&&"constructor"in Ge&&"constructor"in ft&&!(typeof R_=="function"&&R_ instanceof R_&&typeof E2=="function"&&E2 instanceof E2)&&(_h=!1)}return la.delete(Ge),la.delete(ft),_h}function uv(Ge){return fw(uw(Ge,r,ag),Ge+"")}function r1(Ge){return sR(Ge,Mg,Hb)}function n1(Ge){return sR(Ge,Z0,Mx)}var r3=t2?function(Ge){return t2.get(Ge)}:Lc;function b_(Ge){for(var ft=Ge.name+"",ur=Jy[ft],fn=Bh.call(Jy,ft)?ur.length:0;fn--;){var mi=ur[fn],la=mi.func;if(la==null||la==Ge)return mi.name}return ft}function Cx(Ge){var ft=Bh.call(Vi,"placeholder")?Vi:Ge;return ft.placeholder}function nf(){var Ge=Vi.iteratee||qf;return Ge=Ge===qf?VE:Ge,arguments.length?Ge(arguments[0],arguments[1]):Ge}function x_(Ge,ft){var ur=Ge.__data__;return __(ft)?ur[typeof ft=="string"?"string":"hash"]:ur.map}function L1(Ge){for(var ft=Mg(Ge),ur=ft.length;ur--;){var fn=ft[ur],mi=Ge[fn];ft[ur]=[fn,mi,XA(mi)]}return ft}function _0(Ge,ft){var ur=hM(Ge,ft);return ew(ur)?ur:r}function fS(Ge){var ft=Bh.call(Ge,Ch),ur=Ge[Ch];try{Ge[Ch]=r;var fn=!0}catch{}var mi=Sg.call(Ge);return fn&&(ft?Ge[Ch]=ur:delete Ge[Ch]),mi}var Hb=zm?function(Ge){return Ge==null?[]:(Ge=zh(Ge),Lb(zm(Ge),function(ft){return r0.call(Ge,ft)}))}:T6,Mx=zm?function(Ge){for(var ft=[];Ge;)dy(ft,Hb(Ge)),Ge=R1(Ge);return ft}:T6,rp=th;(z0&&rp(new z0(new ArrayBuffer(1)))!=Ki||ng&&rp(new ng)!=Yn||sv&&rp(sv.resolve())!=Mn||qd&&rp(new qd)!=Pa||Ky&&rp(new Ky)!=bi)&&(rp=function(Ge){var ft=th(Ge),ur=ft==bn?Ge.constructor:r,fn=ur?kx(ur):"";if(fn)switch(fn){case CA:return Ki;case MA:return Yn;case c_:return Mn;case LE:return Pa;case Rf:return bi}return ft});function n3(Ge,ft,ur){for(var fn=-1,mi=ur.length;++fn<mi;){var la=ur[fn],lo=la.size;switch(la.type){case"drop":Ge+=lo;break;case"dropRight":ft-=lo;break;case"take":ft=tm(ft,Ge+lo);break;case"takeRight":Ge=em(Ge,ft-lo);break}}return{start:Ge,end:ft}}function sw(Ge){var ft=Ge.match(jl);return ft?ft[1].split(Il):[]}function c2(Ge,ft,ur){ft=nw(ft,Ge);for(var fn=-1,mi=ft.length,la=!1;++fn<mi;){var lo=Rh(ft[fn]);if(!(la=Ge!=null&&ur(Ge,lo)))break;Ge=Ge[lo]}return la||++fn!=mi?la:(mi=Ge==null?0:Ge.length,!!mi&&C_(mi)&&jb(lo,mi)&&(Af(Ge)||b2(Ge)))}function j0(Ge){var ft=Ge.length,ur=new Ge.constructor(ft);return ft&&typeof Ge[0]=="string"&&Bh.call(Ge,"index")&&(ur.index=Ge.index,ur.input=Ge.input),ur}function w0(Ge){return typeof Ge.constructor=="function"&&!Zp(Ge)?ab(R1(Ge)):{}}function np(Ge,ft,ur){var fn=Ge.constructor;switch(ft){case Ei:return TT(Ge);case Un:case Qn:return new fn(+Ge);case Ki:return EM(Ge,ur);case sa:case xa:case Qa:case is:case go:case Co:case Ko:case Zi:case za:return t1(Ge,ur);case Yn:return new fn;case On:case va:return new fn(Ge);case Oi:return AM(Ge);case Pa:return new fn;case ti:return rI(Ge)}}function Rx(Ge,ft){var ur=ft.length;if(!ur)return Ge;var fn=ur-1;return ft[fn]=(ur>1?"& ":"")+ft[fn],ft=ft.join(ur>2?", ":" "),Ge.replace(zl,`{
/* [wrapped with `+ft+`] */
`)}function V0(Ge){return Af(Ge)||b2(Ge)||!!(g0&&Ge&&Ge[g0])}function jb(Ge,ft){var ur=typeof Ge;return ft=ft??Zt,!!ft&&(ur=="number"||ur!="symbol"&&Dn.test(Ge))&&Ge>-1&&Ge%1==0&&Ge<ft}function im(Ge,ft,ur){if(!Ev(ur))return!1;var fn=typeof ft;return(fn=="number"?Sy(ur)&&jb(ft,ur.length):fn=="string"&&ft in ur)?N1(ur[ft],Ge):!1}function f2(Ge,ft){if(Af(Ge))return!1;var ur=typeof Ge;return ur=="number"||ur=="symbol"||ur=="boolean"||Ge==null||hb(Ge)?!0:da.test(Ge)||!Mc.test(Ge)||ft!=null&&Ge in zh(ft)}function __(Ge){var ft=typeof Ge;return ft=="string"||ft=="number"||ft=="symbol"||ft=="boolean"?Ge!=="__proto__":Ge===null}function AT(Ge){var ft=b_(Ge),ur=Vi[ft];if(typeof ur!="function"||!(ft in eh.prototype))return!1;if(Ge===ur)return!0;var fn=r3(ur);return!!fn&&Ge===fn[0]}function d2(Ge){return!!PE&&PE in Ge}var CT=xx?xw:E6;function Zp(Ge){var ft=Ge&&Ge.constructor,ur=typeof ft=="function"&&ft.prototype||l_;return Ge===ur}function XA(Ge){return Ge===Ge&&!Ev(Ge)}function dS(Ge,ft){return function(ur){return ur==null?!1:ur[Ge]===ft&&(ft!==r||Ge in zh(ur))}}function lw(Ge){var ft=TS(Ge,function(fn){return ur.size===b&&ur.clear(),fn}),ur=ft.cache;return ft}function hS(Ge,ft){var ur=Ge[1],fn=ft[1],mi=ur|fn,la=mi<(ae|U|Ve),lo=fn==Ve&&ur==Se||fn==Ve&&ur==Ze&&Ge[7].length<=ft[8]||fn==(Ve|Ze)&&ft[7].length<=ft[8]&&ur==Se;if(!(la||lo))return Ge;fn&ae&&(Ge[2]=ft[2],mi|=ur&ae?0:ve);var Lo=ft[3];if(Lo){var ds=Ge[3];Ge[3]=ds?JE(ds,Lo,ft[4]):Lo,Ge[4]=ds?bx(Ge[3],L):ft[4]}return Lo=ft[5],Lo&&(ds=Ge[5],Ge[5]=ds?CM(ds,Lo,ft[6]):Lo,Ge[6]=ds?bx(Ge[5],L):ft[6]),Lo=ft[7],Lo&&(Ge[7]=Lo),fn&Ve&&(Ge[8]=Ge[8]==null?ft[8]:tm(Ge[8],ft[8])),Ge[9]==null&&(Ge[9]=ft[9]),Ge[0]=ft[0],Ge[1]=mi,Ge}function Vb(Ge){var ft=[];if(Ge!=null)for(var ur in zh(Ge))ft.push(ur);return ft}function MT(Ge){return Sg.call(Ge)}function uw(Ge,ft,ur){return ft=em(ft===r?Ge.length-1:ft,0),function(){for(var fn=arguments,mi=-1,la=em(fn.length-ft,0),lo=Fs(la);++mi<la;)lo[mi]=fn[ft+mi];mi=-1;for(var Lo=Fs(ft+1);++mi<ft;)Lo[mi]=fn[mi];return Lo[ft]=ur(lo),Vp(Ge,this,Lo)}}function pS(Ge,ft){return ft.length<2?Ge:ig(Ge,D1(ft,0,-1))}function cw(Ge,ft){for(var ur=Ge.length,fn=tm(ft.length,ur),mi=Tg(Ge);fn--;){var la=ft[fn];Ge[fn]=jb(la,ur)?mi[la]:r}return Ge}function vS(Ge,ft){if(!(ft==="constructor"&&typeof Ge[ft]=="function")&&ft!="__proto__")return Ge[ft]}var i3=dw(wT),h2=EA||function(Ge,ft){return Nv.setTimeout(Ge,ft)},fw=dw(sS);function qb(Ge,ft,ur){var fn=ft+"";return fw(Ge,Rx(fn,Gb(sw(fn),ur)))}function dw(Ge){var ft=0,ur=0;return function(){var fn=u_(),mi=_t-(fn-ur);if(ur=fn,mi>0){if(++ft>=ht)return arguments[0]}else ft=0;return Ge.apply(r,arguments)}}function w_(Ge,ft){var ur=-1,fn=Ge.length,mi=fn-1;for(ft=ft===r?fn:ft;++ur<ft;){var la=UA(ur,mi),lo=Ge[la];Ge[la]=Ge[ur],Ge[ur]=lo}return Ge.length=ft,Ge}var q0=lw(function(Ge){var ft=[];return Ge.charCodeAt(0)===46&&ft.push(""),Ge.replace(Xa,function(ur,fn,mi,la){ft.push(mi?la.replace(zn,"$1"):fn||ur)}),ft});function Rh(Ge){if(typeof Ge=="string"||hb(Ge))return Ge;var ft=Ge+"";return ft=="0"&&1/Ge==-dr?"-0":ft}function kx(Ge){if(Ge!=null){try{return uT.call(Ge)}catch{}try{return Ge+""}catch{}}return""}function Gb(Ge,ft){return Db(or,function(ur){var fn="_."+ur[0];ft&ur[1]&&!yA(Ge,fn)&&Ge.push(fn)}),Ge.sort()}function bp(Ge){if(Ge instanceof eh)return Ge.clone();var ft=new ob(Ge.__wrapped__,Ge.__chain__);return ft.__actions__=Tg(Ge.__actions__),ft.__index__=Ge.__index__,ft.__values__=Ge.__values__,ft}function $g(Ge,ft,ur){(ur?im(Ge,ft,ur):ft===r)?ft=1:ft=em(Dd(ft),0);var fn=Ge==null?0:Ge.length;if(!fn||ft<1)return[];for(var mi=0,la=0,lo=Fs(Zy(fn/ft));mi<fn;)lo[la++]=D1(Ge,mi,mi+=ft);return lo}function Ix(Ge){for(var ft=-1,ur=Ge==null?0:Ge.length,fn=0,mi=[];++ft<ur;){var la=Ge[ft];la&&(mi[fn++]=la)}return mi}function $d(){var Ge=arguments.length;if(!Ge)return[];for(var ft=Fs(Ge-1),ur=arguments[0],fn=Ge;fn--;)ft[fn-1]=arguments[fn];return dy(Af(ur)?Tg(ur):[ur],Mh(ft,1))}var kf=Gd(function(Ge,ft){return i0(Ge)?iS(Ge,Mh(ft,1,i0,!0)):[]}),xp=Gd(function(Ge,ft){var ur=Bm(ft);return i0(ur)&&(ur=r),i0(Ge)?iS(Ge,Mh(ft,1,i0,!0),nf(ur,2)):[]}),Px=Gd(function(Ge,ft){var ur=Bm(ft);return i0(ur)&&(ur=r),i0(Ge)?iS(Ge,Mh(ft,1,i0,!0),r,ur):[]});function RT(Ge,ft,ur){var fn=Ge==null?0:Ge.length;return fn?(ft=ur||ft===r?1:Dd(ft),D1(Ge,ft<0?0:ft,fn)):[]}function p2(Ge,ft,ur){var fn=Ge==null?0:Ge.length;return fn?(ft=ur||ft===r?1:Dd(ft),ft=fn-ft,D1(Ge,0,ft<0?0:ft)):[]}function mS(Ge,ft){return Ge&&Ge.length?ZE(Ge,nf(ft,3),!0,!0):[]}function kT(Ge,ft){return Ge&&Ge.length?ZE(Ge,nf(ft,3),!0):[]}function G0(Ge,ft,ur,fn){var mi=Ge==null?0:Ge.length;return mi?(ur&&typeof ur!="number"&&im(Ge,ft,ur)&&(ur=0,fn=mi),Fd(Ge,ft,ur,fn)):[]}function Dx(Ge,ft,ur){var fn=Ge==null?0:Ge.length;if(!fn)return-1;var mi=ur==null?0:Dd(ur);return mi<0&&(mi=em(fn+mi,0)),a_(Ge,nf(ft,3),mi)}function ZA(Ge,ft,ur){var fn=Ge==null?0:Ge.length;if(!fn)return-1;var mi=fn-1;return ur!==r&&(mi=Dd(ur),mi=ur<0?em(fn+mi,0):tm(mi,fn-1)),a_(Ge,nf(ft,3),mi,!0)}function ag(Ge){var ft=Ge==null?0:Ge.length;return ft?Mh(Ge,1):[]}function gS(Ge){var ft=Ge==null?0:Ge.length;return ft?Mh(Ge,dr):[]}function O1(Ge,ft){var ur=Ge==null?0:Ge.length;return ur?(ft=ft===r?1:Dd(ft),Mh(Ge,ft)):[]}function $b(Ge){for(var ft=-1,ur=Ge==null?0:Ge.length,fn={};++ft<ur;){var mi=Ge[ft];fn[mi[0]]=mi[1]}return fn}function S_(Ge){return Ge&&Ge.length?Ge[0]:r}function IM(Ge,ft,ur){var fn=Ge==null?0:Ge.length;if(!fn)return-1;var mi=ur==null?0:Dd(ur);return mi<0&&(mi=em(fn+mi,0)),C1(Ge,ft,mi)}function v2(Ge){var ft=Ge==null?0:Ge.length;return ft?D1(Ge,0,-1):[]}var Kp=Gd(function(Ge){var ft=Qv(Ge,KE);return ft.length&&ft[0]===Ge[0]?xM(ft):[]}),PM=Gd(function(Ge){var ft=Bm(Ge),ur=Qv(Ge,KE);return ft===Bm(ur)?ft=r:ur.pop(),ur.length&&ur[0]===Ge[0]?xM(ur,nf(ft,2)):[]}),hw=Gd(function(Ge){var ft=Bm(Ge),ur=Qv(Ge,KE);return ft=typeof ft=="function"?ft:r,ft&&ur.pop(),ur.length&&ur[0]===Ge[0]?xM(ur,r,ft):[]});function Lx(Ge,ft){return Ge==null?"":gy.call(Ge,ft)}function Bm(Ge){var ft=Ge==null?0:Ge.length;return ft?Ge[ft-1]:r}function pw(Ge,ft,ur){var fn=Ge==null?0:Ge.length;if(!fn)return-1;var mi=fn;return ur!==r&&(mi=Dd(ur),mi=mi<0?em(fn+mi,0):tm(mi,fn-1)),ft===ft?nb(Ge,ft,mi):a_(Ge,Q2,mi,!0)}function DM(Ge,ft){return Ge&&Ge.length?uR(Ge,Dd(ft)):r}var gR=Gd(Fv);function Fv(Ge,ft){return Ge&&Ge.length&&ft&&ft.length?WE(Ge,ft):Ge}function yR(Ge,ft,ur){return Ge&&Ge.length&&ft&&ft.length?WE(Ge,ft,nf(ur,2)):Ge}function vw(Ge,ft,ur){return Ge&&Ge.length&&ft&&ft.length?WE(Ge,ft,r,ur):Ge}var mw=uv(function(Ge,ft){var ur=Ge==null?0:Ge.length,fn=DA(Ge,ft);return fR(Ge,Qv(ft,function(mi){return jb(mi,ur)?+mi:mi}).sort(s2)),fn});function Eg(Ge,ft){var ur=[];if(!(Ge&&Ge.length))return ur;var fn=-1,mi=[],la=Ge.length;for(ft=nf(ft,3);++fn<la;){var lo=Ge[fn];ft(lo,fn,Ge)&&(ur.push(lo),mi.push(fn))}return fR(Ge,mi),ur}function KA(Ge){return Ge==null?Ge:AA.call(Ge)}function Lp(Ge,ft,ur){var fn=Ge==null?0:Ge.length;return fn?(ur&&typeof ur!="number"&&im(Ge,ft,ur)?(ft=0,ur=fn):(ft=ft==null?0:Dd(ft),ur=ur===r?fn:Dd(ur)),D1(Ge,ft,ur)):[]}function Pd(Ge,ft){return o2(Ge,ft)}function sh(Ge,ft,ur){return VA(Ge,ft,nf(ur,2))}function wf(Ge,ft){var ur=Ge==null?0:Ge.length;if(ur){var fn=o2(Ge,ft);if(fn<ur&&N1(Ge[fn],ft))return fn}return-1}function Ed(Ge,ft){return o2(Ge,ft,!0)}function zv(Ge,ft,ur){return VA(Ge,ft,nf(ur,2),!0)}function Wb(Ge,ft){var ur=Ge==null?0:Ge.length;if(ur){var fn=o2(Ge,ft,!0)-1;if(N1(Ge[fn],ft))return fn}return-1}function a3(Ge){return Ge&&Ge.length?qA(Ge):[]}function o3(Ge,ft){return Ge&&Ge.length?qA(Ge,nf(ft,2)):[]}function Yb(Ge){var ft=Ge==null?0:Ge.length;return ft?D1(Ge,1,ft):[]}function am(Ge,ft,ur){return Ge&&Ge.length?(ft=ur||ft===r?1:Dd(ft),D1(Ge,0,ft<0?0:ft)):[]}function T_(Ge,ft,ur){var fn=Ge==null?0:Ge.length;return fn?(ft=ur||ft===r?1:Dd(ft),ft=fn-ft,D1(Ge,ft<0?0:ft,fn)):[]}function gw(Ge,ft){return Ge&&Ge.length?ZE(Ge,nf(ft,3),!1,!0):[]}function yS(Ge,ft){return Ge&&Ge.length?ZE(Ge,nf(ft,3)):[]}var Xb=Gd(function(Ge){return Ax(Mh(Ge,1,i0,!0))}),ip=Gd(function(Ge){var ft=Bm(Ge);return i0(ft)&&(ft=r),Ax(Mh(Ge,1,i0,!0),nf(ft,2))}),Jp=Gd(function(Ge){var ft=Bm(Ge);return ft=typeof ft=="function"?ft:r,Ax(Mh(Ge,1,i0,!0),r,ft)});function If(Ge){return Ge&&Ge.length?Ax(Ge):[]}function Wd(Ge,ft){return Ge&&Ge.length?Ax(Ge,nf(ft,2)):[]}function cv(Ge,ft){return ft=typeof ft=="function"?ft:r,Ge&&Ge.length?Ax(Ge,r,ft):[]}function $0(Ge){if(!(Ge&&Ge.length))return[];var ft=0;return Ge=Lb(Ge,function(ur){if(i0(ur))return ft=em(ur.length,ft),!0}),yx(ft,function(ur){return Qv(Ge,Dp(ur))})}function fb(Ge,ft){if(!(Ge&&Ge.length))return[];var ur=$0(Ge);return ft==null?ur:Qv(ur,function(fn){return Vp(ft,r,fn)})}var W0=Gd(function(Ge,ft){return i0(Ge)?iS(Ge,ft):[]}),S0=Gd(function(Ge){return ST(Lb(Ge,i0))}),wy=Gd(function(Ge){var ft=Bm(Ge);return i0(ft)&&(ft=r),ST(Lb(Ge,i0),nf(ft,2))}),fv=Gd(function(Ge){var ft=Bm(Ge);return ft=typeof ft=="function"?ft:r,ST(Lb(Ge,i0),r,ft)}),Zb=Gd($0);function m2(Ge,ft){return pR(Ge||[],ft||[],yT)}function s3(Ge,ft){return pR(Ge||[],ft||[],a2)}var db=Gd(function(Ge){var ft=Ge.length,ur=ft>1?Ge[ft-1]:r;return ur=typeof ur=="function"?(Ge.pop(),ur):r,fb(Ge,ur)});function E_(Ge){var ft=Vi(Ge);return ft.__chain__=!0,ft}function IT(Ge,ft){return ft(Ge),Ge}function bm(Ge,ft){return ft(Ge)}var bS=uv(function(Ge){var ft=Ge.length,ur=ft?Ge[0]:0,fn=this.__wrapped__,mi=function(la){return DA(la,Ge)};return ft>1||this.__actions__.length||!(fn instanceof eh)||!jb(ur)?this.thru(mi):(fn=fn.slice(ur,+ur+(ft?1:0)),fn.__actions__.push({func:bm,args:[mi],thisArg:r}),new ob(fn,this.__chain__).thru(function(la){return ft&&!la.length&&la.push(r),la}))});function i1(){return E_(this)}function l3(){return new ob(this.value(),this.__chain__)}function u3(){this.__values__===r&&(this.__values__=Jb(this.value()));var Ge=this.__index__>=this.__values__.length,ft=Ge?r:this.__values__[this.__index__++];return{done:Ge,value:ft}}function xS(){return this}function Ox(Ge){for(var ft,ur=this;ur instanceof wx;){var fn=bp(ur);fn.__index__=0,fn.__values__=r,ft?mi.__wrapped__=fn:ft=fn;var mi=fn;ur=ur.__wrapped__}return mi.__wrapped__=Ge,ft}function yw(){var Ge=this.__wrapped__;if(Ge instanceof eh){var ft=Ge;return this.__actions__.length&&(ft=new eh(this)),ft=ft.reverse(),ft.__actions__.push({func:bm,args:[KA],thisArg:r}),new ob(ft,this.__chain__)}return this.thru(KA)}function PT(){return eI(this.__wrapped__,this.__actions__)}var g2=uS(function(Ge,ft,ur){Bh.call(Ge,ur)?++Ge[ur]:ub(Ge,ur,1)});function c3(Ge,ft,ur){var fn=Af(Ge)?SE:LA;return ur&&im(Ge,ft,ur)&&(ft=r),fn(Ge,nf(ft,3))}function y2(Ge,ft){var ur=Af(Ge)?Lb:Yp;return ur(Ge,nf(ft,3))}var LM=aw(Dx),Ce=aw(ZA);function Ne(Ge,ft){return Mh(cu(Ge,ft),1)}function Tt(Ge,ft){return Mh(cu(Ge,ft),dr)}function Kt(Ge,ft,ur){return ur=ur===r?1:Dd(ur),Mh(cu(Ge,ft),ur)}function Dr(Ge,ft){var ur=Af(Ge)?Db:r2;return ur(Ge,nf(ft,3))}function pn(Ge,ft){var ur=Af(Ge)?Q5:yM;return ur(Ge,nf(ft,3))}var ta=uS(function(Ge,ft,ur){Bh.call(Ge,ur)?Ge[ur].push(ft):ub(Ge,ur,[ft])});function vo(Ge,ft,ur,fn){Ge=Sy(Ge)?Ge:sC(Ge),ur=ur&&!fn?Dd(ur):0;var mi=Ge.length;return ur<0&&(ur=em(mi+ur,0)),TR(Ge)?ur<=mi&&Ge.indexOf(ft,ur)>-1:!!mi&&C1(Ge,ft,ur)>-1}var fs=Gd(function(Ge,ft,ur){var fn=-1,mi=typeof ft=="function",la=Sy(Ge)?Fs(Ge.length):[];return r2(Ge,function(lo){la[++fn]=mi?Vp(ft,lo,ur):aS(lo,ft,ur)}),la}),xl=uS(function(Ge,ft,ur){ub(Ge,ur,ft)});function cu(Ge,ft){var ur=Af(Ge)?Qv:OA;return ur(Ge,nf(ft,3))}function $l(Ge,ft,ur,fn){return Ge==null?[]:(Af(ft)||(ft=ft==null?[]:[ft]),ur=fn?r:ur,Af(ur)||(ur=ur==null?[]:[ur]),cR(Ge,ft,ur))}var bc=uS(function(Ge,ft,ur){Ge[ur?0:1].push(ft)},function(){return[[],[]]});function md(Ge,ft,ur){var fn=Af(Ge)?uM:jg,mi=arguments.length<3;return fn(Ge,nf(ft,4),ur,mi,r2)}function Kb(Ge,ft,ur){var fn=Af(Ge)?aT:jg,mi=arguments.length<3;return fn(Ge,nf(ft,4),ur,mi,yM)}function _S(Ge,ft){var ur=Af(Ge)?Lb:Yp;return ur(Ge,ES(nf(ft,3)))}function wS(Ge){var ft=Af(Ge)?Fb:_T;return ft(Ge)}function Ps(Ge,ft,ur){(ur?im(Ge,ft,ur):ft===r)?ft=1:ft=Dd(ft);var fn=Af(Ge)?aR:HA;return fn(Ge,ft)}function zo(Ge){var ft=Af(Ge)?Jk:jA;return ft(Ge)}function Bs(Ge){if(Ge==null)return 0;if(Sy(Ge))return TR(Ge)?Yy(Ge):Ge.length;var ft=rp(Ge);return ft==Yn||ft==Pa?Ge.size:tw(Ge).length}function fu(Ge,ft,ur){var fn=Af(Ge)?bA:YE;return ur&&im(Ge,ft,ur)&&(ft=r),fn(Ge,nf(ft,3))}var sf=Gd(function(Ge,ft){if(Ge==null)return[];var ur=ft.length;return ur>1&&im(Ge,ft[0],ft[1])?ft=[]:ur>2&&im(ft[0],ft[1],ft[2])&&(ft=[ft[0]]),cR(Ge,Mh(ft,1),[])}),Tv=e2||function(){return Nv.Date.now()};function Qf(Ge,ft){if(typeof ft!="function")throw new Vf(o);return Ge=Dd(Ge),function(){if(--Ge<1)return ft.apply(this,arguments)}}function _p(Ge,ft,ur){return ft=ur?r:ft,ft=Ge&&ft==null?Ge.length:ft,n0(Ge,Ve,r,r,r,r,ft)}function Ag(Ge,ft){var ur;if(typeof ft!="function")throw new Vf(o);return Ge=Dd(Ge),function(){return--Ge>0&&(ur=ft.apply(this,arguments)),Ge<=1&&(ft=r),ur}}var lh=Gd(function(Ge,ft,ur){var fn=ae;if(ur.length){var mi=bx(ur,Cx(lh));fn|=Me}return n0(Ge,fn,ft,ur,mi)}),A_=Gd(function(Ge,ft,ur){var fn=ae|U;if(ur.length){var mi=bx(ur,Cx(A_));fn|=Me}return n0(ft,fn,Ge,ur,mi)});function JA(Ge,ft,ur){ft=ur?r:ft;var fn=n0(Ge,Se,r,r,r,r,r,ft);return fn.placeholder=JA.placeholder,fn}function oI(Ge,ft,ur){ft=ur?r:ft;var fn=n0(Ge,Pe,r,r,r,r,r,ft);return fn.placeholder=oI.placeholder,fn}function f3(Ge,ft,ur){var fn,mi,la,lo,Lo,ds,Ll=0,Nl=!1,Kl=!1,vc=!0;if(typeof Ge!="function")throw new Vf(o);ft=Nx(ft)||0,Ev(ur)&&(Nl=!!ur.leading,Kl="maxWait"in ur,la=Kl?em(Nx(ur.maxWait)||0,ft):la,vc="trailing"in ur?!!ur.trailing:vc);function lf(Ey){var MS=fn,w3=mi;return fn=mi=r,Ll=Ey,lo=Ge.apply(w3,MS),lo}function ad(Ey){return Ll=Ey,Lo=h2(ap,ft),Nl?lf(Ey):lo}function _h(Ey){var MS=Ey-ds,w3=Ey-Ll,NU=ft-MS;return Kl?tm(NU,la-w3):NU}function od(Ey){var MS=Ey-ds,w3=Ey-Ll;return ds===r||MS>=ft||MS<0||Kl&&w3>=la}function ap(){var Ey=Tv();if(od(Ey))return Gp(Ey);Lo=h2(ap,_h(Ey))}function Gp(Ey){return Lo=r,vc&&fn?lf(Ey):(fn=mi=r,lo)}function T2(){Lo!==r&&SM(Lo),Ll=0,fn=ds=mi=Lo=r}function R_(){return Lo===r?lo:Gp(Tv())}function E2(){var Ey=Tv(),MS=od(Ey);if(fn=arguments,mi=this,ds=Ey,MS){if(Lo===r)return ad(ds);if(Kl)return SM(Lo),Lo=h2(ap,ft),lf(ds)}return Lo===r&&(Lo=h2(ap,ft)),lo}return E2.cancel=T2,E2.flush=R_,E2}var SS=Gd(function(Ge,ft){return nS(Ge,1,ft)}),bR=Gd(function(Ge,ft,ur){return nS(Ge,Nx(ft)||0,ur)});function AF(Ge){return n0(Ge,Je)}function TS(Ge,ft){if(typeof Ge!="function"||ft!=null&&typeof ft!="function")throw new Vf(o);var ur=function(){var fn=arguments,mi=ft?ft.apply(this,fn):fn[0],la=ur.cache;if(la.has(mi))return la.get(mi);var lo=Ge.apply(this,fn);return ur.cache=la.set(mi,lo)||la,lo};return ur.cache=new(TS.Cache||sb),ur}TS.Cache=sb;function ES(Ge){if(typeof Ge!="function")throw new Vf(o);return function(){var ft=arguments;switch(ft.length){case 0:return!Ge.call(this);case 1:return!Ge.call(this,ft[0]);case 2:return!Ge.call(this,ft[0],ft[1]);case 3:return!Ge.call(this,ft[0],ft[1],ft[2])}return!Ge.apply(this,ft)}}function sI(Ge){return Ag(2,Ge)}var f6=tI(function(Ge,ft){ft=ft.length==1&&Af(ft[0])?Qv(ft[0],hy(nf())):Qv(Mh(ft,1),hy(nf()));var ur=ft.length;return Gd(function(fn){for(var mi=-1,la=tm(fn.length,ur);++mi<la;)fn[mi]=ft[mi].call(this,fn[mi]);return Vp(Ge,this,fn)})}),QA=Gd(function(Ge,ft){var ur=bx(ft,Cx(QA));return n0(Ge,Me,r,ft,ur)}),lI=Gd(function(Ge,ft){var ur=bx(ft,Cx(lI));return n0(Ge,Ie,r,ft,ur)}),uI=uv(function(Ge,ft){return n0(Ge,Ze,r,r,r,ft)});function d6(Ge,ft){if(typeof Ge!="function")throw new Vf(o);return ft=ft===r?ft:Dd(ft),Gd(Ge,ft)}function CF(Ge,ft){if(typeof Ge!="function")throw new Vf(o);return ft=ft==null?0:em(Dd(ft),0),Gd(function(ur){var fn=ur[ft],mi=lS(ur,0,ft);return fn&&dy(mi,fn),Vp(Ge,this,mi)})}function A4(Ge,ft,ur){var fn=!0,mi=!0;if(typeof Ge!="function")throw new Vf(o);return Ev(ur)&&(fn="leading"in ur?!!ur.leading:fn,mi="trailing"in ur?!!ur.trailing:mi),f3(Ge,ft,{leading:fn,maxWait:ft,trailing:mi})}function C4(Ge){return _p(Ge,1)}function MF(Ge,ft){return QA(GA(ft),Ge)}function h6(){if(!arguments.length)return[];var Ge=arguments[0];return Af(Ge)?Ge:[Ge]}function d3(Ge){return U0(Ge,X)}function p6(Ge,ft){return ft=typeof ft=="function"?ft:r,U0(Ge,X,ft)}function v6(Ge){return U0(Ge,B|X)}function Uh(Ge,ft){return ft=typeof ft=="function"?ft:r,U0(Ge,B|X,ft)}function OM(Ge,ft){return ft==null||oR(Ge,ft,Mg(ft))}function N1(Ge,ft){return Ge===ft||Ge!==Ge&&ft!==ft}var h3=ow(rm),NM=ow(function(Ge,ft){return Ge>=ft}),b2=x0((function(){return arguments})())?x0:function(Ge){return Cg(Ge)&&Bh.call(Ge,"callee")&&!r0.call(Ge,"callee")},Af=Fs.isArray,xR=_E?hy(_E):yy;function Sy(Ge){return Ge!=null&&C_(Ge.length)&&!xw(Ge)}function i0(Ge){return Cg(Ge)&&Sy(Ge)}function m6(Ge){return Ge===!0||Ge===!1||Cg(Ge)&&th(Ge)==Un}var bw=k1||E6,M4=Z5?hy(Z5):Xp;function _R(Ge){return Cg(Ge)&&Ge.nodeType===1&&!a1(Ge)}function FM(Ge){if(Ge==null)return!0;if(Sy(Ge)&&(Af(Ge)||typeof Ge=="string"||typeof Ge.splice=="function"||bw(Ge)||tC(Ge)||b2(Ge)))return!Ge.length;var ft=rp(Ge);if(ft==Yn||ft==Pa)return!Ge.size;if(Zp(Ge))return!tw(Ge).length;for(var ur in Ge)if(Bh.call(Ge,ur))return!1;return!0}function dv(Ge,ft){return by(Ge,ft)}function Y0(Ge,ft,ur){ur=typeof ur=="function"?ur:r;var fn=ur?ur(Ge,ft):r;return fn===r?by(Ge,ft,r,ur):!!fn}function X0(Ge){if(!Cg(Ge))return!1;var ft=th(Ge);return ft==Vn||ft==Jn||typeof Ge.message=="string"&&typeof Ge.name=="string"&&!a1(Ge)}function RF(Ge){return typeof Ge=="number"&&my(Ge)}function xw(Ge){if(!Ev(Ge))return!1;var ft=th(Ge);return ft==jn||ft==Lr||ft==_n||ft==gi}function eC(Ge){return typeof Ge=="number"&&Ge==Dd(Ge)}function C_(Ge){return typeof Ge=="number"&&Ge>-1&&Ge%1==0&&Ge<=Zt}function Ev(Ge){var ft=typeof Ge;return Ge!=null&&(ft=="object"||ft=="function")}function Cg(Ge){return Ge!=null&&typeof Ge=="object"}var wR=gA?hy(gA):_M;function SR(Ge,ft){return Ge===ft||i2(Ge,ft,L1(ft))}function x2(Ge,ft,ur){return ur=typeof ur=="function"?ur:r,i2(Ge,ft,L1(ft),ur)}function R4(Ge){return v3(Ge)&&Ge!=+Ge}function cI(Ge){if(CT(Ge))throw new Xc(a);return ew(Ge)}function fI(Ge){return Ge===null}function p3(Ge){return Ge==null}function v3(Ge){return typeof Ge=="number"||Cg(Ge)&&th(Ge)==On}function a1(Ge){if(!Cg(Ge)||th(Ge)!=bn)return!1;var ft=R1(Ge);if(ft===null)return!0;var ur=Bh.call(ft,"constructor")&&ft.constructor;return typeof ur=="function"&&ur instanceof ur&&uT.call(ur)==vy}var DT=K5?hy(K5):oS;function M_(Ge){return eC(Ge)&&Ge>=-Zt&&Ge<=Zt}var k4=J5?hy(J5):HE;function TR(Ge){return typeof Ge=="string"||!Af(Ge)&&Cg(Ge)&&th(Ge)==va}function hb(Ge){return typeof Ge=="symbol"||Cg(Ge)&&th(Ge)==ti}var tC=wE?hy(wE):jE;function _w(Ge){return Ge===r}function dI(Ge){return Cg(Ge)&&rp(Ge)==bi}function I4(Ge){return Cg(Ge)&&th(Ge)==Wn}var hI=ow(qE),rC=ow(function(Ge,ft){return Ge<=ft});function Jb(Ge){if(!Ge)return[];if(Sy(Ge))return TR(Ge)?Fm(Ge):Tg(Ge);if(y0&&Ge[y0])return mm(Ge[y0]());var ft=rp(Ge),ur=ft==Yn?SA:ft==Pa?Zw:sC;return ur(Ge)}function ww(Ge){if(!Ge)return Ge===0?Ge:0;if(Ge=Nx(Ge),Ge===dr||Ge===-dr){var ft=Ge<0?-1:1;return ft*Cr}return Ge===Ge?Ge:0}function Dd(Ge){var ft=ww(Ge),ur=ft%1;return ft===ft?ur?ft-ur:ft:0}function _2(Ge){return Ge?oh(Dd(Ge),0,Vt):0}function Nx(Ge){if(typeof Ge=="number")return Ge;if(hb(Ge))return yt;if(Ev(Ge)){var ft=typeof Ge.valueOf=="function"?Ge.valueOf():Ge;Ge=Ev(ft)?ft+"":ft}if(typeof Ge!="string")return Ge===0?Ge:+Ge;Ge=AE(Ge);var ur=ps.test(Ge);return ur||to.test(Ge)?mA(Ge.slice(2),ur?2:8):ts.test(Ge)?yt:+Ge}function w2(Ge){return cb(Ge,Z0(Ge))}function m3(Ge){return Ge?oh(Dd(Ge),-Zt,Zt):Ge===0?Ge:0}function qp(Ge){return Ge==null?"":e1(Ge)}var P4=iw(function(Ge,ft){if(Zp(ft)||Sy(ft)){cb(ft,Mg(ft),Ge);return}for(var ur in ft)Bh.call(ft,ur)&&yT(Ge,ur,ft[ur])}),pI=iw(function(Ge,ft){cb(ft,Z0(ft),Ge)}),vI=iw(function(Ge,ft,ur,fn){cb(ft,Z0(ft),Ge,fn)}),D4=iw(function(Ge,ft,ur,fn){cb(ft,Mg(ft),Ge,fn)}),LT=uv(DA);function g6(Ge,ft){var ur=ab(Ge);return ft==null?ur:Q_(ur,ft)}var ER=Gd(function(Ge,ft){Ge=zh(Ge);var ur=-1,fn=ft.length,mi=fn>2?ft[2]:r;for(mi&&im(ft[0],ft[1],mi)&&(fn=1);++ur<fn;)for(var la=ft[ur],lo=Z0(la),Lo=-1,ds=lo.length;++Lo<ds;){var Ll=lo[Lo],Nl=Ge[Ll];(Nl===r||N1(Nl,l_[Ll])&&!Bh.call(Ge,Ll))&&(Ge[Ll]=la[Ll])}return Ge}),mI=Gd(function(Ge){return Ge.push(r,vR),Vp(AS,r,Ge)});function g3(Ge,ft){return eR(Ge,nf(ft,3),ym)}function nC(Ge,ft){return eR(Ge,nf(ft,3),Gg)}function gI(Ge,ft){return Ge==null?Ge:BE(Ge,nf(ft,3),Z0)}function iC(Ge,ft){return Ge==null?Ge:n2(Ge,nf(ft,3),Z0)}function y3(Ge,ft){return Ge&&ym(Ge,nf(ft,3))}function zM(Ge,ft){return Ge&&Gg(Ge,nf(ft,3))}function y6(Ge){return Ge==null?[]:I1(Ge,Mg(Ge))}function yI(Ge){return Ge==null?[]:I1(Ge,Z0(Ge))}function aC(Ge,ft,ur){var fn=Ge==null?r:ig(Ge,ft);return fn===r?ur:fn}function OT(Ge,ft){return Ge!=null&&c2(Ge,ft,v_)}function b3(Ge,ft){return Ge!=null&&c2(Ge,ft,bM)}var AR=m_(function(Ge,ft,ur){ft!=null&&typeof ft.toString!="function"&&(ft=Sg.call(ft)),Ge[ft]=ur},Ts(Es)),CR=m_(function(Ge,ft,ur){ft!=null&&typeof ft.toString!="function"&&(ft=Sg.call(ft)),Bh.call(Ge,ft)?Ge[ft].push(ur):Ge[ft]=[ur]},nf),MR=Gd(aS);function Mg(Ge){return Sy(Ge)?gT(Ge):tw(Ge)}function Z0(Ge){return Sy(Ge)?gT(Ge,!0):lR(Ge)}function L4(Ge,ft){var ur={};return ft=nf(ft,3),ym(Ge,function(fn,mi,la){ub(ur,ft(fn,mi,la),fn)}),ur}function O4(Ge,ft){var ur={};return ft=nf(ft,3),ym(Ge,function(fn,mi,la){ub(ur,mi,ft(fn,mi,la))}),ur}var kF=iw(function(Ge,ft,ur){zA(Ge,ft,ur)}),AS=iw(function(Ge,ft,ur,fn){zA(Ge,ft,ur,fn)}),RR=uv(function(Ge,ft){var ur={};if(Ge==null)return ur;var fn=!1;ft=Qv(ft,function(la){return la=nw(la,Ge),fn||(fn=la.length>1),la}),cb(Ge,n1(Ge),ur),fn&&(ur=U0(ur,B|V|X,kM));for(var mi=ft.length;mi--;)XE(ur,ft[mi]);return ur});function bI(Ge,ft){return oC(Ge,ES(nf(ft)))}var N4=uv(function(Ge,ft){return Ge==null?{}:GE(Ge,ft)});function oC(Ge,ft){if(Ge==null)return{};var ur=Qv(n1(Ge),function(fn){return[fn]});return ft=nf(ft),$E(Ge,ur,function(fn,mi){return ft(fn,mi[0])})}function b6(Ge,ft,ur){ft=nw(ft,Ge);var fn=-1,mi=ft.length;for(mi||(mi=1,Ge=r);++fn<mi;){var la=Ge==null?r:Ge[Rh(ft[fn])];la===r&&(fn=mi,la=ur),Ge=xw(la)?la.call(Ge):la}return Ge}function BM(Ge,ft,ur){return Ge==null?Ge:a2(Ge,ft,ur)}function F4(Ge,ft,ur,fn){return fn=typeof fn=="function"?fn:r,Ge==null?Ge:a2(Ge,ft,ur,fn)}var xI=WA(Mg),z4=WA(Z0);function UM(Ge,ft,ur){var fn=Af(Ge),mi=fn||bw(Ge)||tC(Ge);if(ft=nf(ft,4),ur==null){var la=Ge&&Ge.constructor;mi?ur=fn?new la:[]:Ev(Ge)?ur=xw(la)?ab(R1(Ge)):{}:ur={}}return(mi?Db:ym)(Ge,function(lo,Lo,ds){return ft(ur,lo,Lo,ds)}),ur}function x6(Ge,ft){return Ge==null?!0:XE(Ge,ft)}function T0(Ge,ft,ur){return Ge==null?Ge:hR(Ge,ft,GA(ur))}function HM(Ge,ft,ur,fn){return fn=typeof fn=="function"?fn:r,Ge==null?Ge:hR(Ge,ft,GA(ur),fn)}function sC(Ge){return Ge==null?[]:eS(Ge,Mg(Ge))}function jM(Ge){return Ge==null?[]:eS(Ge,Z0(Ge))}function _I(Ge,ft,ur){return ur===r&&(ur=ft,ft=r),ur!==r&&(ur=Nx(ur),ur=ur===ur?ur:0),ft!==r&&(ft=Nx(ft),ft=ft===ft?ft:0),oh(Nx(Ge),ft,ur)}function kR(Ge,ft,ur){return ft=ww(ft),ur===r?(ur=ft,ft=0):ur=ww(ur),Ge=Nx(Ge),zb(Ge,ft,ur)}function wI(Ge,ft,ur){if(ur&&typeof ur!="boolean"&&im(Ge,ft,ur)&&(ft=ur=r),ur===r&&(typeof ft=="boolean"?(ur=ft,ft=r):typeof Ge=="boolean"&&(ur=Ge,Ge=r)),Ge===r&&ft===r?(Ge=0,ft=1):(Ge=ww(Ge),ft===r?(ft=Ge,Ge=0):ft=ww(ft)),Ge>ft){var fn=Ge;Ge=ft,ft=fn}if(ur||Ge%1||ft%1){var mi=qg();return tm(Ge+mi*(ft-Ge+v0("1e-"+((mi+"").length-1))),ft)}return UA(Ge,ft)}var SI=xy(function(Ge,ft,ur){return ft=ft.toLowerCase(),Ge+(ur?IR(ft):ft)});function IR(Ge){return ct(qp(Ge).toLowerCase())}function S2(Ge){return Ge=qp(Ge),Ge&&Ge.replace(ea,CE).replace(rb,"")}function x3(Ge,ft,ur){Ge=qp(Ge),ft=e1(ft);var fn=Ge.length;ur=ur===r?fn:oh(Dd(ur),0,fn);var mi=ur;return ur-=ft.length,ur>=0&&Ge.slice(ur,mi)==ft}function NT(Ge){return Ge=qp(Ge),Ge&&Ns.test(Ge)?Ge.replace($s,_A):Ge}function VM(Ge){return Ge=qp(Ge),Ge&&_s.test(Ge)?Ge.replace(Oo,"\\$&"):Ge}var qM=xy(function(Ge,ft,ur){return Ge+(ur?"-":"")+ft.toLowerCase()}),FT=xy(function(Ge,ft,ur){return Ge+(ur?" ":"")+ft.toLowerCase()}),CS=lv("toLowerCase");function PR(Ge,ft,ur){Ge=qp(Ge),ft=Dd(ft);var fn=ft?Yy(Ge):0;if(!ft||fn>=ft)return Ge;var mi=(ft-fn)/2;return e3(b0(mi),ur)+Ge+e3(Zy(mi),ur)}function GM(Ge,ft,ur){Ge=qp(Ge),ft=Dd(ft);var fn=ft?Yy(Ge):0;return ft&&fn<ft?Ge+e3(ft-fn,ur):Ge}function _6(Ge,ft,ur){Ge=qp(Ge),ft=Dd(ft);var fn=ft?Yy(Ge):0;return ft&&fn<ft?e3(ft-fn,ur)+Ge:Ge}function w6(Ge,ft,ur){return ur||ft==null?ft=0:ft&&(ft=+ft),Ob(qp(Ge).replace(nl,""),ft||0)}function TI(Ge,ft,ur){return(ur?im(Ge,ft,ur):ft===r)?ft=1:ft=Dd(ft),wM(qp(Ge),ft)}function B4(){var Ge=arguments,ft=qp(Ge[0]);return Ge.length<3?ft:ft.replace(Ge[1],Ge[2])}var EI=xy(function(Ge,ft,ur){return Ge+(ur?"_":"")+ft.toLowerCase()});function lC(Ge,ft,ur){return ur&&typeof ur!="number"&&im(Ge,ft,ur)&&(ft=ur=r),ur=ur===r?Vt:ur>>>0,ur?(Ge=qp(Ge),Ge&&(typeof ft=="string"||ft!=null&&!DT(ft))&&(ft=e1(ft),!ft&&s_(Ge))?lS(Fm(Ge),0,ur):Ge.split(ft,ur)):[]}var DR=xy(function(Ge,ft,ur){return Ge+(ur?" ":"")+ct(ft)});function LR(Ge,ft,ur){return Ge=qp(Ge),ur=ur==null?0:oh(Dd(ur),0,Ge.length),ft=e1(ft),Ge.slice(ur,ur+ft.length)==ft}function _3(Ge,ft,ur){var fn=Vi.templateSettings;ur&&im(Ge,ft,ur)&&(ft=r),Ge=qp(Ge),ft=vI({},ft,fn,YA);var mi=vI({},ft.imports,fn.imports,YA),la=Mg(mi),lo=eS(mi,la),Lo,ds,Ll=0,Nl=ft.interpolate||pa,Kl="__p += '",vc=py((ft.escape||pa).source+"|"+Nl.source+"|"+(Nl===su?Ni:pa).source+"|"+(ft.evaluate||pa).source+"|$","g"),lf="//# sourceURL="+(Bh.call(ft,"sourceURL")?(ft.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++wg+"]")+`
`;Ge.replace(vc,function(od,ap,Gp,T2,R_,E2){return Gp||(Gp=T2),Kl+=Ge.slice(Ll,E2).replace(ja,wA),ap&&(Lo=!0,Kl+=`' +
__e(`+ap+`) +
'`),R_&&(ds=!0,Kl+=`';
`+R_+`;
__p += '`),Gp&&(Kl+=`' +
((__t = (`+Gp+`)) == null ? '' : __t) +
'`),Ll=E2+od.length,od}),Kl+=`';
`;var ad=Bh.call(ft,"variable")&&ft.variable;if(!ad)Kl=`with (obj) {
`+Kl+`
}
`;else if(Vl.test(ad))throw new Xc(s);Kl=(ds?Kl.replace(Ss,""):Kl).replace(ba,"$1").replace(po,"$1;"),Kl="function("+(ad||"obj")+`) {
`+(ad?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(Lo?", __e = _.escape":"")+(ds?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+Kl+`return __p
}`;var _h=Tr(function(){return Kc(la,lf+"return "+Kl).apply(r,lo)});if(_h.source=Kl,X0(_h))throw _h;return _h}function U4(Ge){return qp(Ge).toLowerCase()}function AI(Ge){return qp(Ge).toUpperCase()}function S6(Ge,ft,ur){if(Ge=qp(Ge),Ge&&(ur||ft===r))return AE(Ge);if(!Ge||!(ft=e1(ft)))return Ge;var fn=Fm(Ge),mi=Fm(ft),la=tS(fn,mi),lo=X_(fn,mi)+1;return lS(fn,la,lo).join("")}function IF(Ge,ft,ur){if(Ge=qp(Ge),Ge&&(ur||ft===r))return Ge.slice(0,pM(Ge)+1);if(!Ge||!(ft=e1(ft)))return Ge;var fn=Fm(Ge),mi=X_(fn,Fm(ft))+1;return lS(fn,0,mi).join("")}function CI(Ge,ft,ur){if(Ge=qp(Ge),Ge&&(ur||ft===r))return Ge.replace(nl,"");if(!Ge||!(ft=e1(ft)))return Ge;var fn=Fm(Ge),mi=tS(fn,Fm(ft));return lS(fn,mi).join("")}function te(Ge,ft){var ur=nt,fn=ut;if(Ev(ft)){var mi="separator"in ft?ft.separator:mi;ur="length"in ft?Dd(ft.length):ur,fn="omission"in ft?e1(ft.omission):fn}Ge=qp(Ge);var la=Ge.length;if(s_(Ge)){var lo=Fm(Ge);la=lo.length}if(ur>=la)return Ge;var Lo=ur-Yy(fn);if(Lo<1)return fn;var ds=lo?lS(lo,0,Lo).join(""):Ge.slice(0,Lo);if(mi===r)return ds+fn;if(lo&&(Lo+=ds.length-Lo),DT(mi)){if(Ge.slice(Lo).search(mi)){var Ll,Nl=ds;for(mi.global||(mi=py(mi.source,qp(Za.exec(mi))+"g")),mi.lastIndex=0;Ll=mi.exec(Nl);)var Kl=Ll.index;ds=ds.slice(0,Kl===r?Lo:Kl)}}else if(Ge.indexOf(e1(mi),Lo)!=Lo){var vc=ds.lastIndexOf(mi);vc>-1&&(ds=ds.slice(0,vc))}return ds+fn}function ge(Ge){return Ge=qp(Ge),Ge&&Gs.test(Ge)?Ge.replace(Ys,tR):Ge}var qe=xy(function(Ge,ft,ur){return Ge+(ur?" ":"")+ft.toUpperCase()}),ct=lv("toUpperCase");function Xt(Ge,ft,ur){return Ge=qp(Ge),ft=ur?r:ft,ft===r?ME(Ge)?RE(Ge):fM(Ge):Ge.match(ft)||[]}var Tr=Gd(function(Ge,ft){try{return Vp(Ge,r,ft)}catch(ur){return X0(ur)?ur:new Xc(ur)}}),ri=uv(function(Ge,ft){return Db(ft,function(ur){ur=Rh(ur),ub(Ge,ur,lh(Ge[ur],Ge))}),Ge});function Gi(Ge){var ft=Ge==null?0:Ge.length,ur=nf();return Ge=ft?Qv(Ge,function(fn){if(typeof fn[1]!="function")throw new Vf(o);return[ur(fn[0]),fn[1]]}):[],Gd(function(fn){for(var mi=-1;++mi<ft;){var la=Ge[mi];if(Vp(la[0],this,fn))return Vp(la[1],this,fn)}})}function co(Ge){return xT(U0(Ge,B))}function Ts(Ge){return function(){return Ge}}function bl(Ge,ft){return Ge==null||Ge!==Ge?ft:Ge}var Dl=Ub(),Ls=Ub(!0);function Es(Ge){return Ge}function qf(Ge){return VE(typeof Ge=="function"?Ge:U0(Ge,B))}function Ff(Ge){return NA(U0(Ge,B))}function Bv(Ge,ft){return FA(Ge,U0(ft,B))}var ss=Gd(function(Ge,ft){return function(ur){return aS(ur,Ge,ft)}}),Ho=Gd(function(Ge,ft){return function(ur){return aS(Ge,ur,ft)}});function bs(Ge,ft,ur){var fn=Mg(ft),mi=I1(ft,fn);ur==null&&!(Ev(ft)&&(mi.length||!fn.length))&&(ur=ft,ft=Ge,Ge=this,mi=I1(ft,Mg(ft)));var la=!(Ev(ur)&&"chain"in ur)||!!ur.chain,lo=xw(Ge);return Db(mi,function(Lo){var ds=ft[Lo];Ge[Lo]=ds,lo&&(Ge.prototype[Lo]=function(){var Ll=this.__chain__;if(la||Ll){var Nl=Ge(this.__wrapped__),Kl=Nl.__actions__=Tg(this.__actions__);return Kl.push({func:ds,args:arguments,thisArg:Ge}),Nl.__chain__=Ll,Nl}return ds.apply(Ge,dy([this.value()],arguments))})}),Ge}function Cl(){return Nv._===this&&(Nv._=_x),this}function Lc(){}function kh(Ge){return Ge=Dd(Ge),Gd(function(ft){return uR(ft,Ge)})}var vf=_y(Qv),Gf=_y(SE),Ty=_y(bA);function Op(Ge){return f2(Ge)?Dp(Rh(Ge)):BA(Ge)}function zT(Ge){return function(ft){return Ge==null?r:ig(Ge,ft)}}var PF=y_(),PU=y_(!0);function T6(){return[]}function E6(){return!1}function BZ(){return{}}function UZ(){return""}function HZ(){return!0}function jZ(Ge,ft){if(Ge=Dd(Ge),Ge<1||Ge>Zt)return[];var ur=Vt,fn=tm(Ge,Vt);ft=nf(ft),Ge-=Vt;for(var mi=yx(fn,ft);++ur<Ge;)ft(ur);return mi}function VZ(Ge){return Af(Ge)?Qv(Ge,Rh):hb(Ge)?[Ge]:Tg(q0(qp(Ge)))}function OR(Ge){var ft=++gm;return qp(Ge)+ft}var MI=g_(function(Ge,ft){return Ge+ft},0),DF=t3("ceil"),DU=g_(function(Ge,ft){return Ge/ft},1),$M=t3("floor");function A6(Ge){return Ge&&Ge.length?Ex(Ge,Es,rm):r}function LF(Ge,ft){return Ge&&Ge.length?Ex(Ge,nf(ft,2),rm):r}function qZ(Ge){return EE(Ge,Es)}function GZ(Ge,ft){return EE(Ge,nf(ft,2))}function $Z(Ge){return Ge&&Ge.length?Ex(Ge,Es,qE):r}function RI(Ge,ft){return Ge&&Ge.length?Ex(Ge,nf(ft,2),qE):r}var OF=g_(function(Ge,ft){return Ge*ft},1),LU=t3("round"),WZ=g_(function(Ge,ft){return Ge-ft},0);function YZ(Ge){return Ge&&Ge.length?sT(Ge,Es):0}function OU(Ge,ft){return Ge&&Ge.length?sT(Ge,nf(ft,2)):0}return Vi.after=Qf,Vi.ary=_p,Vi.assign=P4,Vi.assignIn=pI,Vi.assignInWith=vI,Vi.assignWith=D4,Vi.at=LT,Vi.before=Ag,Vi.bind=lh,Vi.bindAll=ri,Vi.bindKey=A_,Vi.castArray=h6,Vi.chain=E_,Vi.chunk=$g,Vi.compact=Ix,Vi.concat=$d,Vi.cond=Gi,Vi.conforms=co,Vi.constant=Ts,Vi.countBy=g2,Vi.create=g6,Vi.curry=JA,Vi.curryRight=oI,Vi.debounce=f3,Vi.defaults=ER,Vi.defaultsDeep=mI,Vi.defer=SS,Vi.delay=bR,Vi.difference=kf,Vi.differenceBy=xp,Vi.differenceWith=Px,Vi.drop=RT,Vi.dropRight=p2,Vi.dropRightWhile=mS,Vi.dropWhile=kT,Vi.fill=G0,Vi.filter=y2,Vi.flatMap=Ne,Vi.flatMapDeep=Tt,Vi.flatMapDepth=Kt,Vi.flatten=ag,Vi.flattenDeep=gS,Vi.flattenDepth=O1,Vi.flip=AF,Vi.flow=Dl,Vi.flowRight=Ls,Vi.fromPairs=$b,Vi.functions=y6,Vi.functionsIn=yI,Vi.groupBy=ta,Vi.initial=v2,Vi.intersection=Kp,Vi.intersectionBy=PM,Vi.intersectionWith=hw,Vi.invert=AR,Vi.invertBy=CR,Vi.invokeMap=fs,Vi.iteratee=qf,Vi.keyBy=xl,Vi.keys=Mg,Vi.keysIn=Z0,Vi.map=cu,Vi.mapKeys=L4,Vi.mapValues=O4,Vi.matches=Ff,Vi.matchesProperty=Bv,Vi.memoize=TS,Vi.merge=kF,Vi.mergeWith=AS,Vi.method=ss,Vi.methodOf=Ho,Vi.mixin=bs,Vi.negate=ES,Vi.nthArg=kh,Vi.omit=RR,Vi.omitBy=bI,Vi.once=sI,Vi.orderBy=$l,Vi.over=vf,Vi.overArgs=f6,Vi.overEvery=Gf,Vi.overSome=Ty,Vi.partial=QA,Vi.partialRight=lI,Vi.partition=bc,Vi.pick=N4,Vi.pickBy=oC,Vi.property=Op,Vi.propertyOf=zT,Vi.pull=gR,Vi.pullAll=Fv,Vi.pullAllBy=yR,Vi.pullAllWith=vw,Vi.pullAt=mw,Vi.range=PF,Vi.rangeRight=PU,Vi.rearg=uI,Vi.reject=_S,Vi.remove=Eg,Vi.rest=d6,Vi.reverse=KA,Vi.sampleSize=Ps,Vi.set=BM,Vi.setWith=F4,Vi.shuffle=zo,Vi.slice=Lp,Vi.sortBy=sf,Vi.sortedUniq=a3,Vi.sortedUniqBy=o3,Vi.split=lC,Vi.spread=CF,Vi.tail=Yb,Vi.take=am,Vi.takeRight=T_,Vi.takeRightWhile=gw,Vi.takeWhile=yS,Vi.tap=IT,Vi.throttle=A4,Vi.thru=bm,Vi.toArray=Jb,Vi.toPairs=xI,Vi.toPairsIn=z4,Vi.toPath=VZ,Vi.toPlainObject=w2,Vi.transform=UM,Vi.unary=C4,Vi.union=Xb,Vi.unionBy=ip,Vi.unionWith=Jp,Vi.uniq=If,Vi.uniqBy=Wd,Vi.uniqWith=cv,Vi.unset=x6,Vi.unzip=$0,Vi.unzipWith=fb,Vi.update=T0,Vi.updateWith=HM,Vi.values=sC,Vi.valuesIn=jM,Vi.without=W0,Vi.words=Xt,Vi.wrap=MF,Vi.xor=S0,Vi.xorBy=wy,Vi.xorWith=fv,Vi.zip=Zb,Vi.zipObject=m2,Vi.zipObjectDeep=s3,Vi.zipWith=db,Vi.entries=xI,Vi.entriesIn=z4,Vi.extend=pI,Vi.extendWith=vI,bs(Vi,Vi),Vi.add=MI,Vi.attempt=Tr,Vi.camelCase=SI,Vi.capitalize=IR,Vi.ceil=DF,Vi.clamp=_I,Vi.clone=d3,Vi.cloneDeep=v6,Vi.cloneDeepWith=Uh,Vi.cloneWith=p6,Vi.conformsTo=OM,Vi.deburr=S2,Vi.defaultTo=bl,Vi.divide=DU,Vi.endsWith=x3,Vi.eq=N1,Vi.escape=NT,Vi.escapeRegExp=VM,Vi.every=c3,Vi.find=LM,Vi.findIndex=Dx,Vi.findKey=g3,Vi.findLast=Ce,Vi.findLastIndex=ZA,Vi.findLastKey=nC,Vi.floor=$M,Vi.forEach=Dr,Vi.forEachRight=pn,Vi.forIn=gI,Vi.forInRight=iC,Vi.forOwn=y3,Vi.forOwnRight=zM,Vi.get=aC,Vi.gt=h3,Vi.gte=NM,Vi.has=OT,Vi.hasIn=b3,Vi.head=S_,Vi.identity=Es,Vi.includes=vo,Vi.indexOf=IM,Vi.inRange=kR,Vi.invoke=MR,Vi.isArguments=b2,Vi.isArray=Af,Vi.isArrayBuffer=xR,Vi.isArrayLike=Sy,Vi.isArrayLikeObject=i0,Vi.isBoolean=m6,Vi.isBuffer=bw,Vi.isDate=M4,Vi.isElement=_R,Vi.isEmpty=FM,Vi.isEqual=dv,Vi.isEqualWith=Y0,Vi.isError=X0,Vi.isFinite=RF,Vi.isFunction=xw,Vi.isInteger=eC,Vi.isLength=C_,Vi.isMap=wR,Vi.isMatch=SR,Vi.isMatchWith=x2,Vi.isNaN=R4,Vi.isNative=cI,Vi.isNil=p3,Vi.isNull=fI,Vi.isNumber=v3,Vi.isObject=Ev,Vi.isObjectLike=Cg,Vi.isPlainObject=a1,Vi.isRegExp=DT,Vi.isSafeInteger=M_,Vi.isSet=k4,Vi.isString=TR,Vi.isSymbol=hb,Vi.isTypedArray=tC,Vi.isUndefined=_w,Vi.isWeakMap=dI,Vi.isWeakSet=I4,Vi.join=Lx,Vi.kebabCase=qM,Vi.last=Bm,Vi.lastIndexOf=pw,Vi.lowerCase=FT,Vi.lowerFirst=CS,Vi.lt=hI,Vi.lte=rC,Vi.max=A6,Vi.maxBy=LF,Vi.mean=qZ,Vi.meanBy=GZ,Vi.min=$Z,Vi.minBy=RI,Vi.stubArray=T6,Vi.stubFalse=E6,Vi.stubObject=BZ,Vi.stubString=UZ,Vi.stubTrue=HZ,Vi.multiply=OF,Vi.nth=DM,Vi.noConflict=Cl,Vi.noop=Lc,Vi.now=Tv,Vi.pad=PR,Vi.padEnd=GM,Vi.padStart=_6,Vi.parseInt=w6,Vi.random=wI,Vi.reduce=md,Vi.reduceRight=Kb,Vi.repeat=TI,Vi.replace=B4,Vi.result=b6,Vi.round=LU,Vi.runInContext=Yo,Vi.sample=wS,Vi.size=Bs,Vi.snakeCase=EI,Vi.some=fu,Vi.sortedIndex=Pd,Vi.sortedIndexBy=sh,Vi.sortedIndexOf=wf,Vi.sortedLastIndex=Ed,Vi.sortedLastIndexBy=zv,Vi.sortedLastIndexOf=Wb,Vi.startCase=DR,Vi.startsWith=LR,Vi.subtract=WZ,Vi.sum=YZ,Vi.sumBy=OU,Vi.template=_3,Vi.times=jZ,Vi.toFinite=ww,Vi.toInteger=Dd,Vi.toLength=_2,Vi.toLower=U4,Vi.toNumber=Nx,Vi.toSafeInteger=m3,Vi.toString=qp,Vi.toUpper=AI,Vi.trim=S6,Vi.trimEnd=IF,Vi.trimStart=CI,Vi.truncate=te,Vi.unescape=ge,Vi.uniqueId=OR,Vi.upperCase=qe,Vi.upperFirst=ct,Vi.each=Dr,Vi.eachRight=pn,Vi.first=S_,bs(Vi,(function(){var Ge={};return ym(Vi,function(ft,ur){Bh.call(Vi.prototype,ur)||(Ge[ur]=ft)}),Ge})(),{chain:!1}),Vi.VERSION=n,Db(["bind","bindKey","curry","curryRight","partial","partialRight"],function(Ge){Vi[Ge].placeholder=Vi}),Db(["drop","take"],function(Ge,ft){eh.prototype[Ge]=function(ur){ur=ur===r?1:em(Dd(ur),0);var fn=this.__filtered__&&!ft?new eh(this):this.clone();return fn.__filtered__?fn.__takeCount__=tm(ur,fn.__takeCount__):fn.__views__.push({size:tm(ur,Vt),type:Ge+(fn.__dir__<0?"Right":"")}),fn},eh.prototype[Ge+"Right"]=function(ur){return this.reverse()[Ge](ur).reverse()}}),Db(["filter","map","takeWhile"],function(Ge,ft){var ur=ft+1,fn=ur==Dt||ur==Lt;eh.prototype[Ge]=function(mi){var la=this.clone();return la.__iteratees__.push({iteratee:nf(mi,3),type:ur}),la.__filtered__=la.__filtered__||fn,la}}),Db(["head","last"],function(Ge,ft){var ur="take"+(ft?"Right":"");eh.prototype[Ge]=function(){return this[ur](1).value()[0]}}),Db(["initial","tail"],function(Ge,ft){var ur="drop"+(ft?"":"Right");eh.prototype[Ge]=function(){return this.__filtered__?new eh(this):this[ur](1)}}),eh.prototype.compact=function(){return this.filter(Es)},eh.prototype.find=function(Ge){return this.filter(Ge).head()},eh.prototype.findLast=function(Ge){return this.reverse().find(Ge)},eh.prototype.invokeMap=Gd(function(Ge,ft){return typeof Ge=="function"?new eh(this):this.map(function(ur){return aS(ur,Ge,ft)})}),eh.prototype.reject=function(Ge){return this.filter(ES(nf(Ge)))},eh.prototype.slice=function(Ge,ft){Ge=Dd(Ge);var ur=this;return ur.__filtered__&&(Ge>0||ft<0)?new eh(ur):(Ge<0?ur=ur.takeRight(-Ge):Ge&&(ur=ur.drop(Ge)),ft!==r&&(ft=Dd(ft),ur=ft<0?ur.dropRight(-ft):ur.take(ft-Ge)),ur)},eh.prototype.takeRightWhile=function(Ge){return this.reverse().takeWhile(Ge).reverse()},eh.prototype.toArray=function(){return this.take(Vt)},ym(eh.prototype,function(Ge,ft){var ur=/^(?:filter|find|map|reject)|While$/.test(ft),fn=/^(?:head|last)$/.test(ft),mi=Vi[fn?"take"+(ft=="last"?"Right":""):ft],la=fn||/^find/.test(ft);mi&&(Vi.prototype[ft]=function(){var lo=this.__wrapped__,Lo=fn?[1]:arguments,ds=lo instanceof eh,Ll=Lo[0],Nl=ds||Af(lo),Kl=function(ap){var Gp=mi.apply(Vi,dy([ap],Lo));return fn&&vc?Gp[0]:Gp};Nl&&ur&&typeof Ll=="function"&&Ll.length!=1&&(ds=Nl=!1);var vc=this.__chain__,lf=!!this.__actions__.length,ad=la&&!vc,_h=ds&&!lf;if(!la&&Nl){lo=_h?lo:new eh(this);var od=Ge.apply(lo,Lo);return od.__actions__.push({func:bm,args:[Kl],thisArg:r}),new ob(od,vc)}return ad&&_h?Ge.apply(this,Lo):(od=this.thru(Kl),ad?fn?od.value()[0]:od.value():od)})}),Db(["pop","push","shift","sort","splice","unshift"],function(Ge){var ft=IE[Ge],ur=/^(?:push|sort|unshift)$/.test(Ge)?"tap":"thru",fn=/^(?:pop|shift)$/.test(Ge);Vi.prototype[Ge]=function(){var mi=arguments;if(fn&&!this.__chain__){var la=this.value();return ft.apply(Af(la)?la:[],mi)}return this[ur](function(lo){return ft.apply(Af(lo)?lo:[],mi)})}}),ym(eh.prototype,function(Ge,ft){var ur=Vi[ft];if(ur){var fn=ur.name+"";Bh.call(Jy,fn)||(Jy[fn]=[]),Jy[fn].push({name:ft,func:ur})}}),Jy[nm(r,U).name]=[{name:"wrapper",func:r}],eh.prototype.clone=Sx,eh.prototype.reverse=hT,eh.prototype.value=J_,Vi.prototype.at=bS,Vi.prototype.chain=i1,Vi.prototype.commit=l3,Vi.prototype.next=u3,Vi.prototype.plant=Ox,Vi.prototype.reverse=yw,Vi.prototype.toJSON=Vi.prototype.valueOf=Vi.prototype.value=PT,Vi.prototype.first=Vi.prototype.head,y0&&(Vi.prototype[y0]=xS),Vi}),Jw=Kw();Pb?((Pb.exports=Jw)._=Jw,Wy._=Jw):Nv._=Jw}).call(_wt)})(Az,Az.exports)),Az.exports}var VL=wwt();const N5=Object.create(null);N5.open="0";N5.close="1";N5.ping="2";N5.pong="3";N5.message="4";N5.upgrade="5";N5.noop="6";const lG=Object.create(null);Object.keys(N5).forEach(t=>{lG[N5[t]]=t});const Bhe={type:"error",data:"parser error"},ABe=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",CBe=typeof ArrayBuffer=="function",MBe=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,Ime=({type:t,data:e},r,n)=>ABe&&e instanceof Blob?r?n(e):OSe(e,n):CBe&&(e instanceof ArrayBuffer||MBe(e))?r?n(e):OSe(new Blob([e]),n):n(N5[t]+(e||"")),OSe=(t,e)=>{const r=new FileReader;return r.onload=function(){const n=r.result.split(",")[1];e("b"+(n||""))},r.readAsDataURL(t)};function NSe(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let eQ;function Swt(t,e){if(ABe&&t.data instanceof Blob)return t.data.arrayBuffer().then(NSe).then(e);if(CBe&&(t.data instanceof ArrayBuffer||MBe(t.data)))return e(NSe(t.data));Ime(t,!1,r=>{eQ||(eQ=new TextEncoder),e(eQ.encode(r))})}const FSe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Cz=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<FSe.length;t++)Cz[FSe.charCodeAt(t)]=t;const Twt=t=>{let e=t.length*.75,r=t.length,n,i=0,a,o,s,d;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const b=new ArrayBuffer(e),L=new Uint8Array(b);for(n=0;n<r;n+=4)a=Cz[t.charCodeAt(n)],o=Cz[t.charCodeAt(n+1)],s=Cz[t.charCodeAt(n+2)],d=Cz[t.charCodeAt(n+3)],L[i++]=a<<2|o>>4,L[i++]=(o&15)<<4|s>>2,L[i++]=(s&3)<<6|d&63;return b},Ewt=typeof ArrayBuffer=="function",Pme=(t,e)=>{if(typeof t!="string")return{type:"message",data:RBe(t,e)};const r=t.charAt(0);return r==="b"?{type:"message",data:Awt(t.substring(1),e)}:lG[r]?t.length>1?{type:lG[r],data:t.substring(1)}:{type:lG[r]}:Bhe},Awt=(t,e)=>{if(Ewt){const r=Twt(t);return RBe(r,e)}else return{base64:!0,data:t}},RBe=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},kBe="",Cwt=(t,e)=>{const r=t.length,n=new Array(r);let i=0;t.forEach((a,o)=>{Ime(a,!1,s=>{n[o]=s,++i===r&&e(n.join(kBe))})})},Mwt=(t,e)=>{const r=t.split(kBe),n=[];for(let i=0;i<r.length;i++){const a=Pme(r[i],e);if(n.push(a),a.type==="error")break}return n};function Rwt(){return new TransformStream({transform(t,e){Swt(t,r=>{const n=r.length;let i;if(n<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,n);else if(n<65536){i=new Uint8Array(3);const a=new DataView(i.buffer);a.setUint8(0,126),a.setUint16(1,n)}else{i=new Uint8Array(9);const a=new DataView(i.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(n))}t.data&&typeof t.data!="string"&&(i[0]|=128),e.enqueue(i),e.enqueue(r)})}})}let tQ;function fj(t){return t.reduce((e,r)=>e+r.length,0)}function dj(t,e){if(t[0].length===e)return t.shift();const r=new Uint8Array(e);let n=0;for(let i=0;i<e;i++)r[i]=t[0][n++],n===t[0].length&&(t.shift(),n=0);return t.length&&n<t[0].length&&(t[0]=t[0].slice(n)),r}function kwt(t,e){tQ||(tQ=new TextDecoder);const r=[];let n=0,i=-1,a=!1;return new TransformStream({transform(o,s){for(r.push(o);;){if(n===0){if(fj(r)<1)break;const d=dj(r,1);a=(d[0]&128)===128,i=d[0]&127,i<126?n=3:i===126?n=1:n=2}else if(n===1){if(fj(r)<2)break;const d=dj(r,2);i=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),n=3}else if(n===2){if(fj(r)<8)break;const d=dj(r,8),b=new DataView(d.buffer,d.byteOffset,d.length),L=b.getUint32(0);if(L>Math.pow(2,21)-1){s.enqueue(Bhe);break}i=L*Math.pow(2,32)+b.getUint32(4),n=3}else{if(fj(r)<i)break;const d=dj(r,i);s.enqueue(Pme(a?d:tQ.decode(d),e)),n=0}if(i===0||i>t){s.enqueue(Bhe);break}}}})}const IBe=4;function Ab(t){if(t)return Iwt(t)}function Iwt(t){for(var e in Ab.prototype)t[e]=Ab.prototype[e];return t}Ab.prototype.on=Ab.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};Ab.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this};Ab.prototype.off=Ab.prototype.removeListener=Ab.prototype.removeAllListeners=Ab.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+t];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var n,i=0;i<r.length;i++)if(n=r[i],n===e||n.fn===e){r.splice(i,1);break}return r.length===0&&delete this._callbacks["$"+t],this};Ab.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(r){r=r.slice(0);for(var n=0,i=r.length;n<i;++n)r[n].apply(this,e)}return this};Ab.prototype.emitReserved=Ab.prototype.emit;Ab.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};Ab.prototype.hasListeners=function(t){return!!this.listeners(t).length};const zY=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,r)=>r(e,0),F3=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Pwt="arraybuffer";function PBe(t,...e){return e.reduce((r,n)=>(t.hasOwnProperty(n)&&(r[n]=t[n]),r),{})}const Dwt=F3.setTimeout,Lwt=F3.clearTimeout;function BY(t,e){e.useNativeTimers?(t.setTimeoutFn=Dwt.bind(F3),t.clearTimeoutFn=Lwt.bind(F3)):(t.setTimeoutFn=F3.setTimeout.bind(F3),t.clearTimeoutFn=F3.clearTimeout.bind(F3))}const Owt=1.33;function Nwt(t){return typeof t=="string"?Fwt(t):Math.ceil((t.byteLength||t.size)*Owt)}function Fwt(t){let e=0,r=0;for(let n=0,i=t.length;n<i;n++)e=t.charCodeAt(n),e<128?r+=1:e<2048?r+=2:e<55296||e>=57344?r+=3:(n++,r+=4);return r}function DBe(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function zwt(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}function Bwt(t){let e={},r=t.split("&");for(let n=0,i=r.length;n<i;n++){let a=r[n].split("=");e[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return e}class Uwt extends Error{constructor(e,r,n){super(e),this.description=r,this.context=n,this.type="TransportError"}}class Dme extends Ab{constructor(e){super(),this.writable=!1,BY(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,r,n){return super.emitReserved("error",new Uwt(e,r,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const r=Pme(e,this.socket.binaryType);this.onPacket(r)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,r={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(r)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const r=zwt(e);return r.length?"?"+r:""}}class Hwt extends Dme{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const r=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let n=0;this._polling&&(n++,this.once("pollComplete",function(){--n||r()})),this.writable||(n++,this.once("drain",function(){--n||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const r=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};Mwt(e,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,Cwt(e,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=DBe()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(e,r)}}let LBe=!1;try{LBe=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const jwt=LBe;function Vwt(){}class qwt extends Hwt{constructor(e){if(super(e),typeof location<"u"){const r=location.protocol==="https:";let n=location.port;n||(n=r?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,r){const n=this.request({method:"POST",data:e});n.on("success",r),n.on("error",(i,a)=>{this.onError("xhr post error",i,a)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(r,n)=>{this.onError("xhr poll error",r,n)}),this.pollXhr=e}}let NN=class uG extends Ab{constructor(e,r,n){super(),this.createRequest=e,BY(this,n),this._opts=n,this._method=n.method||"GET",this._uri=r,this._data=n.data!==void 0?n.data:null,this._create()}_create(){var e;const r=PBe(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;const n=this._xhr=this.createRequest(r);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&n.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var i;n.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(n.getResponseHeader("set-cookie"))),n.readyState===4&&(n.status===200||n.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof n.status=="number"?n.status:0)},0))},n.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=uG.requestsCount++,uG.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Vwt,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete uG.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};NN.requestsCount=0;NN.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",zSe);else if(typeof addEventListener=="function"){const t="onpagehide"in F3?"pagehide":"unload";addEventListener(t,zSe,!1)}}function zSe(){for(let t in NN.requests)NN.requests.hasOwnProperty(t)&&NN.requests[t].abort()}const Gwt=(function(){const t=OBe({xdomain:!1});return t&&t.responseType!==null})();class $wt extends qwt{constructor(e){super(e);const r=e&&e.forceBase64;this.supportsBinary=Gwt&&!r}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new NN(OBe,this.uri(),e)}}function OBe(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||jwt))return new XMLHttpRequest}catch{}if(!e)try{return new F3[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const NBe=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Wwt extends Dme{get name(){return"websocket"}doOpen(){const e=this.uri(),r=this.opts.protocols,n=NBe?{}:PBe(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,r,n)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let r=0;r<e.length;r++){const n=e[r],i=r===e.length-1;Ime(n,this.supportsBinary,a=>{try{this.doWrite(n,a)}catch{}i&&zY(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=DBe()),this.supportsBinary||(r.b64=1),this.createUri(e,r)}}const rQ=F3.WebSocket||F3.MozWebSocket;class Ywt extends Wwt{createSocket(e,r,n){return NBe?new rQ(e,r,n):r?new rQ(e,r):new rQ(e)}doWrite(e,r){this.ws.send(r)}}class Xwt extends Dme{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const r=kwt(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(r).getReader(),i=Rwt();i.readable.pipeTo(e.writable),this._writer=i.writable.getWriter();const a=()=>{n.read().then(({done:s,value:d})=>{s||(this.onPacket(d),a())}).catch(s=>{})};a();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let r=0;r<e.length;r++){const n=e[r],i=r===e.length-1;this._writer.write(n).then(()=>{i&&zY(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const Zwt={websocket:Ywt,webtransport:Xwt,polling:$wt},Kwt=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Jwt=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Uhe(t){if(t.length>8e3)throw"URI too long";const e=t,r=t.indexOf("["),n=t.indexOf("]");r!=-1&&n!=-1&&(t=t.substring(0,r)+t.substring(r,n).replace(/:/g,";")+t.substring(n,t.length));let i=Kwt.exec(t||""),a={},o=14;for(;o--;)a[Jwt[o]]=i[o]||"";return r!=-1&&n!=-1&&(a.source=e,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=Qwt(a,a.path),a.queryKey=e2t(a,a.query),a}function Qwt(t,e){const r=/\/{2,9}/g,n=e.replace(r,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&n.splice(0,1),e.slice(-1)=="/"&&n.splice(n.length-1,1),n}function e2t(t,e){const r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,i,a){i&&(r[i]=a)}),r}const Hhe=typeof addEventListener=="function"&&typeof removeEventListener=="function",cG=[];Hhe&&addEventListener("offline",()=>{cG.forEach(t=>t())},!1);class VP extends Ab{constructor(e,r){if(super(),this.binaryType=Pwt,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(r=e,e=null),e){const n=Uhe(e);r.hostname=n.host,r.secure=n.protocol==="https"||n.protocol==="wss",r.port=n.port,n.query&&(r.query=n.query)}else r.host&&(r.hostname=Uhe(r.host).host);BY(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(n=>{const i=n.prototype.name;this.transports.push(i),this._transportsByName[i]=n}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Bwt(this.opts.query)),Hhe&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},cG.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const r=Object.assign({},this.opts.query);r.EIO=IBe,r.transport=e,this.id&&(r.sid=this.id);const n=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const e=this.opts.rememberUpgrade&&VP.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const r=this.createTransport(e);r.open(),this.setTransport(r)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",VP.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const r=new Error("server error");r.code=e.data,this._onError(r);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let n=0;n<this.writeBuffer.length;n++){const i=this.writeBuffer[n].data;if(i&&(r+=Nwt(i)),n>0&&r>this._maxPayload)return this.writeBuffer.slice(0,n);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,zY(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,r,n){return this._sendPacket("message",e,r,n),this}send(e,r,n){return this._sendPacket("message",e,r,n),this}_sendPacket(e,r,n,i){if(typeof r=="function"&&(i=r,r=void 0),typeof n=="function"&&(i=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const a={type:e,data:r,options:n};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),i&&this.once("flush",i),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),e()},n=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}_onError(e){if(VP.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Hhe&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const n=cG.indexOf(this._offlineEventListener);n!==-1&&cG.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,r),this.writeBuffer=[],this._prevBufferLen=0}}}VP.protocol=IBe;class t2t extends VP{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let r=this.createTransport(e),n=!1;VP.priorWebsocketSuccess=!1;const i=()=>{n||(r.send([{type:"ping",data:"probe"}]),r.once("packet",B=>{if(!n)if(B.type==="pong"&&B.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;VP.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(L(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const V=new Error("probe error");V.transport=r.name,this.emitReserved("upgradeError",V)}}))};function a(){n||(n=!0,L(),r.close(),r=null)}const o=B=>{const V=new Error("probe error: "+B);V.transport=r.name,a(),this.emitReserved("upgradeError",V)};function s(){o("transport closed")}function d(){o("socket closed")}function b(B){r&&B.name!==r.name&&a()}const L=()=>{r.removeListener("open",i),r.removeListener("error",o),r.removeListener("close",s),this.off("close",d),this.off("upgrading",b)};r.once("open",i),r.once("error",o),r.once("close",s),this.once("close",d),this.once("upgrading",b),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{n||r.open()},200):r.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const r=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&r.push(e[n]);return r}}let r2t=class extends t2t{constructor(e,r={}){const n=typeof e=="object"?e:r;(!n.transports||n.transports&&typeof n.transports[0]=="string")&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map(i=>Zwt[i]).filter(i=>!!i)),super(e,n)}};function n2t(t,e="",r){let n=t;r=r||typeof location<"u"&&location,t==null&&(t=r.protocol+"//"+r.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=r.protocol+t:t=r.host+t),/^(https?|wss?):\/\//.test(t)||(typeof r<"u"?t=r.protocol+"//"+t:t="https://"+t),n=Uhe(t)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const a=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+a+":"+n.port+e,n.href=n.protocol+"://"+a+(r&&r.port===n.port?"":":"+n.port),n}const i2t=typeof ArrayBuffer=="function",a2t=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,FBe=Object.prototype.toString,o2t=typeof Blob=="function"||typeof Blob<"u"&&FBe.call(Blob)==="[object BlobConstructor]",s2t=typeof File=="function"||typeof File<"u"&&FBe.call(File)==="[object FileConstructor]";function Lme(t){return i2t&&(t instanceof ArrayBuffer||a2t(t))||o2t&&t instanceof Blob||s2t&&t instanceof File}function fG(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let r=0,n=t.length;r<n;r++)if(fG(t[r]))return!0;return!1}if(Lme(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return fG(t.toJSON(),!0);for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&fG(t[r]))return!0;return!1}function l2t(t){const e=[],r=t.data,n=t;return n.data=jhe(r,e),n.attachments=e.length,{packet:n,buffers:e}}function jhe(t,e){if(!t)return t;if(Lme(t)){const r={_placeholder:!0,num:e.length};return e.push(t),r}else if(Array.isArray(t)){const r=new Array(t.length);for(let n=0;n<t.length;n++)r[n]=jhe(t[n],e);return r}else if(typeof t=="object"&&!(t instanceof Date)){const r={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=jhe(t[n],e));return r}return t}function u2t(t,e){return t.data=Vhe(t.data,e),delete t.attachments,t}function Vhe(t,e){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let r=0;r<t.length;r++)t[r]=Vhe(t[r],e);else if(typeof t=="object")for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=Vhe(t[r],e));return t}const c2t=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],f2t=5;var bv;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(bv||(bv={}));class d2t{constructor(e){this.replacer=e}encode(e){return(e.type===bv.EVENT||e.type===bv.ACK)&&fG(e)?this.encodeAsBinary({type:e.type===bv.EVENT?bv.BINARY_EVENT:bv.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let r=""+e.type;return(e.type===bv.BINARY_EVENT||e.type===bv.BINARY_ACK)&&(r+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(r+=e.nsp+","),e.id!=null&&(r+=e.id),e.data!=null&&(r+=JSON.stringify(e.data,this.replacer)),r}encodeAsBinary(e){const r=l2t(e),n=this.encodeAsString(r.packet),i=r.buffers;return i.unshift(n),i}}function BSe(t){return Object.prototype.toString.call(t)==="[object Object]"}class Ome extends Ab{constructor(e){super(),this.reviver=e}add(e){let r;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(e);const n=r.type===bv.BINARY_EVENT;n||r.type===bv.BINARY_ACK?(r.type=n?bv.EVENT:bv.ACK,this.reconstructor=new h2t(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(Lme(e)||e.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(e),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let r=0;const n={type:Number(e.charAt(0))};if(bv[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===bv.BINARY_EVENT||n.type===bv.BINARY_ACK){const a=r+1;for(;e.charAt(++r)!=="-"&&r!=e.length;);const o=e.substring(a,r);if(o!=Number(o)||e.charAt(r)!=="-")throw new Error("Illegal attachments");n.attachments=Number(o)}if(e.charAt(r+1)==="/"){const a=r+1;for(;++r&&!(e.charAt(r)===","||r===e.length););n.nsp=e.substring(a,r)}else n.nsp="/";const i=e.charAt(r+1);if(i!==""&&Number(i)==i){const a=r+1;for(;++r;){const o=e.charAt(r);if(o==null||Number(o)!=o){--r;break}if(r===e.length)break}n.id=Number(e.substring(a,r+1))}if(e.charAt(++r)){const a=this.tryParse(e.substr(r));if(Ome.isPayloadValid(n.type,a))n.data=a;else throw new Error("invalid payload")}return n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,r){switch(e){case bv.CONNECT:return BSe(r);case bv.DISCONNECT:return r===void 0;case bv.CONNECT_ERROR:return typeof r=="string"||BSe(r);case bv.EVENT:case bv.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&c2t.indexOf(r[0])===-1);case bv.ACK:case bv.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class h2t{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const r=u2t(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const p2t=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Ome,Encoder:d2t,get PacketType(){return bv},protocol:f2t},Symbol.toStringTag,{value:"Module"}));function CC(t,e,r){return t.on(e,r),function(){t.off(e,r)}}const v2t=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class zBe extends Ab{constructor(e,r,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=r,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[CC(e,"open",this.onopen.bind(this)),CC(e,"packet",this.onpacket.bind(this)),CC(e,"error",this.onerror.bind(this)),CC(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...r){var n,i,a;if(v2t.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(r.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;const o={type:bv.EVENT,data:r};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const L=this.ids++,B=r.pop();this._registerAckCallback(L,B),o.id=L}const s=(i=(n=this.io.engine)===null||n===void 0?void 0:n.transport)===null||i===void 0?void 0:i.writable,d=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!s||(d?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(e,r){var n;const i=(n=this.flags.timeout)!==null&&n!==void 0?n:this._opts.ackTimeout;if(i===void 0){this.acks[e]=r;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let s=0;s<this.sendBuffer.length;s++)this.sendBuffer[s].id===e&&this.sendBuffer.splice(s,1);r.call(this,new Error("operation has timed out"))},i),o=(...s)=>{this.io.clearTimeoutFn(a),r.apply(this,s)};o.withError=!0,this.acks[e]=o}emitWithAck(e,...r){return new Promise((n,i)=>{const a=(o,s)=>o?i(o):n(s);a.withError=!0,r.push(a),this.emit(e,...r)})}_addToQueue(e){let r;typeof e[e.length-1]=="function"&&(r=e.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((i,...a)=>n!==this._queue[0]?void 0:(i!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(i)):(this._queue.shift(),r&&r(null,...a)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const r=this._queue[0];r.pending&&!e||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:bv.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(n=>String(n.id)===e)){const n=this.acks[e];delete this.acks[e],n.withError&&n.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case bv.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case bv.EVENT:case bv.BINARY_EVENT:this.onevent(e);break;case bv.ACK:case bv.BINARY_ACK:this.onack(e);break;case bv.DISCONNECT:this.ondisconnect();break;case bv.CONNECT_ERROR:this.destroy();const n=new Error(e.data.message);n.data=e.data.data,this.emitReserved("connect_error",n);break}}onevent(e){const r=e.data||[];e.id!=null&&r.push(this.ack(e.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const n of r)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const r=this;let n=!1;return function(...i){n||(n=!0,r.packet({type:bv.ACK,id:e,data:i}))}}onack(e){const r=this.acks[e.id];typeof r=="function"&&(delete this.acks[e.id],r.withError&&e.data.unshift(null),r.apply(this,e.data))}onconnect(e,r){this.id=e,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:bv.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const r=this._anyListeners;for(let n=0;n<r.length;n++)if(e===r[n])return r.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const r=this._anyOutgoingListeners;for(let n=0;n<r.length;n++)if(e===r[n])return r.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const r=this._anyOutgoingListeners.slice();for(const n of r)n.apply(this,e.data)}}}function j8(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}j8.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),r=Math.floor(e*this.jitter*t);t=(Math.floor(e*10)&1)==0?t-r:t+r}return Math.min(t,this.max)|0};j8.prototype.reset=function(){this.attempts=0};j8.prototype.setMin=function(t){this.ms=t};j8.prototype.setMax=function(t){this.max=t};j8.prototype.setJitter=function(t){this.jitter=t};class qhe extends Ab{constructor(e,r){var n;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(r=e,e=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,BY(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((n=r.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new j8({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=e;const i=r.parser||p2t;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var r;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(r=this.backoff)===null||r===void 0||r.setMin(e),this)}randomizationFactor(e){var r;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(r=this.backoff)===null||r===void 0||r.setJitter(e),this)}reconnectionDelayMax(e){var r;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(r=this.backoff)===null||r===void 0||r.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new r2t(this.uri,this.opts);const r=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const i=CC(r,"open",function(){n.onopen(),e&&e()}),a=s=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",s),e?e(s):this.maybeReconnectOnOpen()},o=CC(r,"error",a);if(this._timeout!==!1){const s=this._timeout,d=this.setTimeoutFn(()=>{i(),a(new Error("timeout")),r.close()},s);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(i),this.subs.push(o),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(CC(e,"ping",this.onping.bind(this)),CC(e,"data",this.ondata.bind(this)),CC(e,"error",this.onerror.bind(this)),CC(e,"close",this.onclose.bind(this)),CC(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(r){this.onclose("parse error",r)}}ondecoded(e){zY(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,r){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new zBe(this,e,r),this.nsps[e]=n),n}_destroy(e){const r=Object.keys(this.nsps);for(const n of r)if(this.nsps[n].active)return;this._close()}_packet(e){const r=this.encoder.encode(e);for(let n=0;n<r.length;n++)this.engine.write(r[n],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,r){var n;this.cleanup(),(n=this.engine)===null||n===void 0||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(i=>{i?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",i)):e.onreconnect()}))},r);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const L7={};function dG(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const r=n2t(t,e.path||"/socket.io"),n=r.source,i=r.id,a=r.path,o=L7[i]&&a in L7[i].nsps,s=e.forceNew||e["force new connection"]||e.multiplex===!1||o;let d;return s?d=new qhe(n,e):(L7[i]||(L7[i]=new qhe(n,e)),d=L7[i]),r.query&&!e.query&&(e.query=r.queryKey),d.socket(r.path,e)}Object.assign(dG,{Manager:qhe,Socket:zBe,io:dG,connect:dG});const m2t=void 0,Yf=dG(m2t,{autoConnect:!1}),g2t=()=>{const[t,e]=ze.useState("idle"),r=ze.useRef(null),n=ze.useRef(null),i=ze.useCallback(()=>{t!=="requesting"&&(e("requesting"),Yf.emit("request_presenter_token",o=>{o.success?e("presenting"):console.warn("Presenter mode request denied")}))},[Yf,t]),a=ze.useCallback(()=>{t==="presenting"&&(Yf.emit("release_presenter_token"),e("idle"))},[t,Yf]);return ze.useEffect(()=>(t==="presenting"&&(n.current=setInterval(()=>{console.log("Sending presenter heartbeat..."),Yf.emit("request_presenter_token",o=>{o.success||(console.error("Presenter heartbeat failed. Releasing presenter mode."),e("idle"))})},3e3)),()=>{n.current&&(clearInterval(n.current),n.current=null)}),[t,Yf]),ze.useEffect(()=>{const o=s=>{console.log("Presenter update received:",s),r.current&&clearTimeout(r.current),s.presenterSid===null?e("idle"):(e("locked"),r.current=setTimeout(()=>{console.warn("No presenter update received for 5 seconds. Reverting to idle."),e("idle")},5e3))};return Yf.on("presenter_update",o),()=>{Yf.off("presenter_update",o),r.current&&clearTimeout(r.current),t==="presenting"&&Yf.emit("release_presenter_token")}},[Yf,t]),{requestPresenterMode:i,releasePresenterMode:a,presenterMode:t}},UY=()=>{const{setCurrentFrame:t}=rh();return ze.useCallback(e=>{t(e),Yf.emit("set_frame_atomic",{frame:e},r=>{r&&!r.success&&console.error(`Failed to set frame: ${r.error}${r.message?` - ${r.message}`:""}`)})},[t])},y2t=({selectedFrames:t,frameCount:e,currentFrame:r,containerWidth:n})=>{ze.useEffect(()=>{console.log("Selected frames updated:",t),console.log("Container width:",n)},[t,n]);const i=a=>e<=1?"0%":`${a/(e-1)*100}%`;return!t||t.length===0||n===0?null:(console.log("Rendering",t.length,"selection markers"),Ke.jsx(Ul,{sx:{position:"absolute",top:"50%",left:0,right:0,transform:"translateY(-50%)",height:8,pointerEvents:"none",zIndex:0},children:t.map(a=>{const o=a===r,s=i(a);return Ke.jsx(Ul,{sx:{position:"absolute",left:s,transform:"translateX(-50%)",width:2,height:"100%",backgroundColor:o?"secondary.main":"primary.main",opacity:o?.5:.25,pointerEvents:"none"}},a)})}))},b2t=Hu(Ke.jsx("path",{d:"M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2"})),x2t=ze.memo(({frame:t,label:e,position:r,isCurrentFrame:n,onBookmarkClick:i,onBookmarkDelete:a,onBookmarkEdit:o})=>{const[s,d]=ze.useState(!1),[b,L]=ze.useState(e),B=()=>{d(!0),L(e)},V=()=>{const ie=b.trim();ie&&ie!==e&&o&&o(t,ie),d(!1)},X=()=>{d(!1)};return s?Ke.jsx(vme,{onClickAway:V,children:Ke.jsx(Ul,{sx:{position:"absolute",left:r,transform:"translateX(-50%)",top:"-8px",pointerEvents:"auto",zIndex:10},children:Ke.jsx(zg,{value:b,onChange:ie=>L(ie.target.value),onKeyDown:ie=>{ie.key==="Enter"?V():ie.key==="Escape"&&X(),ie.stopPropagation()},autoFocus:!0,size:"small",sx:{width:"150px","& .MuiInputBase-input":{fontSize:"0.875rem",padding:"4px 8px"},backgroundColor:"background.paper"}})})}):Ke.jsx(Zh,{title:Ke.jsxs(Ul,{children:[Ke.jsx(Ul,{sx:{fontWeight:"bold",mb:.5},children:e}),Ke.jsxs(Ul,{sx:{fontSize:"0.75rem",opacity:.8},children:["Frame: ",t]}),Ke.jsx(Ul,{sx:{fontSize:"0.7rem",opacity:.6,mt:.5,fontStyle:"italic"},children:"Double-click to edit, Shift+Click to delete"})]}),arrow:!0,placement:"top",enterDelay:300,enterNextDelay:300,children:Ke.jsx(Ul,{onClick:ie=>{ie.shiftKey?(ie.preventDefault(),ie.stopPropagation(),a?.(t)):i?.(t,e)},onDoubleClick:ie=>{ie.preventDefault(),ie.stopPropagation(),B()},sx:{position:"absolute",left:r,transform:"translateX(-50%)",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s ease",pointerEvents:"auto","&:hover":{transform:"translateX(-50%) scale(1.2)"}},children:Ke.jsx(b2t,{sx:{fontSize:20,color:n?"secondary.main":"primary.main","& path":{fill:"none",stroke:"currentColor",strokeWidth:1.5},filter:n?"drop-shadow(0 0 4px rgba(156, 39, 176, 0.6))":"drop-shadow(0 1px 2px rgba(0,0,0,0.2))",transition:"color 0.2s ease"}})})})}),_2t=({bookmarks:t,frameCount:e,currentFrame:r,containerWidth:n,onBookmarkClick:i,onBookmarkDelete:a,onBookmarkEdit:o})=>{ze.useEffect(()=>{console.log("Bookmarks updated:",t),console.log("Bookmark container width:",n)},[t,n]);const s=ze.useMemo(()=>t?Object.entries(t).map(([b,L])=>({frame:parseInt(b),label:L})):[],[t]),d=b=>e<=1?"0%":`${b/(e-1)*100}%`;return!t||s.length===0||n===0?null:Ke.jsx(Ul,{sx:{position:"absolute",top:"-20px",left:0,right:0,height:16,pointerEvents:"none",zIndex:2},children:s.map(({frame:b,label:L})=>Ke.jsx(x2t,{frame:b,label:L,position:d(b),isCurrentFrame:b===r,onBookmarkClick:i,onBookmarkDelete:a,onBookmarkEdit:o},b))})},w2t=ze.memo(_2t),S2t=({selectedFrames:t,frameCount:e,containerWidth:r,enabled:n,currentFrame:i,disabled:a=!1})=>{ze.useEffect(()=>{console.log("SelectionTrackOverlay:",{selectedFrames:t,enabled:n,containerWidth:r,currentFrame:i})},[t,n,r,i]);const o=B=>e<=1?0:B/(e-1)*100;if(r===0)return null;if(!n){const B=[{start:0,end:i,selected:!0},{start:i,end:e-1,selected:!1}];return Ke.jsx(Ul,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0,pointerEvents:"none",zIndex:1},children:B.map((V,X)=>{const ie=o(V.start),ae=X===B.length-1?e-1:B[X+1].start,ve=o(ae)-ie;return ve<=0?null:Ke.jsx(Ul,{sx:{position:"absolute",left:`${ie}%`,width:`${ve}%`,top:"50%",transform:"translateY(-50%)",height:4,backgroundColor:a?"action.disabledBackground":V.selected?"primary.main":"action.disabledBackground",borderRadius:"2px"}},X)})})}if(!t||t.length===0)return null;const s=t.map(B=>{const V=Math.max(0,B-.5),X=Math.min(e-1,B+.5);return[V,X]}).sort((B,V)=>B[0]-V[0]),d=[];s.forEach(([B,V])=>{if(d.length===0)d.push([B,V]);else{const X=d[d.length-1];B<=X[1]?X[1]=Math.max(X[1],V):d.push([B,V])}});const b=[];let L=0;return d.forEach(([B,V])=>{B>L&&b.push({start:L,end:B,selected:!1}),b.push({start:B,end:V,selected:!0}),L=V}),L<e-1&&b.push({start:L,end:e-1,selected:!1}),Ke.jsx(Ul,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0,pointerEvents:"none",zIndex:1},children:b.map((B,V)=>{const X=o(B.start),de=o(B.end)-X;return Ke.jsx(Ul,{sx:{position:"absolute",left:`${X}%`,width:`${de}%`,top:"50%",transform:"translateY(-50%)",height:4,backgroundColor:a?"action.disabledBackground":B.selected?"primary.main":"grey.400",borderRadius:"2px"}},V)})})},T2t=()=>{const[t,e]=ze.useState(!1),[r,n]=ze.useState("0"),i=ze.useRef(null),[a,o]=ze.useState(0),s=ze.useRef(null),d=ze.useRef(!1),{currentFrame:b,setCurrentFrame:L,frameCount:B,isConnected:V,isLoading:X,skipFrames:ie,setSkipFrames:de,frame_selection:ae,bookmarks:U,addBookmark:ve,deleteBookmark:Se,frameSelectionEnabled:Pe,setFrameSelectionEnabled:Me,synchronizedMode:Ie,setSynchronizedMode:Ve,getIsFetching:Ze}=rh(),{requestPresenterMode:Je,releasePresenterMode:nt,presenterMode:ut}=g2t(),ht=UY(),_t=Ir=>{if(!Pe||!ae||ae.length===0)return Ir;let _n=ae[0],Un=Math.abs(Ir-_n);for(const Qn of ae){const Jn=Math.abs(Ir-Qn);Jn<Un&&(Un=Jn,_n=Qn)}return _n},Dt=ze.useMemo(()=>VL.throttle(Ir=>{ut==="presenting"&&Yf.emit("set_frame_continuous",{frame:Ir})},100),[ut]),qt=(Ir,_n)=>{const Un=_t(_n);if(L(Un),d.current){Dt(Un);return}s.current?(clearTimeout(s.current),s.current=null,d.current=!0,Je()):(Yf.emit("set_frame_atomic",{frame:Un},Qn=>{Qn&&!Qn.success&&console.error(`Failed to set frame: ${Qn.error} - ${Qn.message}`)}),s.current=setTimeout(()=>{s.current=null},150))},Lt=()=>{s.current&&(clearTimeout(s.current),s.current=null),d.current&&(Dt.flush(),nt()),d.current=!1};ze.useEffect(()=>{const Ir=()=>{i.current&&o(i.current.offsetWidth)};return Ir(),window.addEventListener("resize",Ir),()=>window.removeEventListener("resize",Ir)},[]),ze.useEffect(()=>()=>{s.current&&clearTimeout(s.current),d.current&&nt()},[nt]);const dr={"@keyframes pulse":{"0%":{opacity:1},"50%":{opacity:.5},"100%":{opacity:1}},animation:"pulse 1.5s ease-in-out infinite"},Zt={"& .MuiInputBase-input":{textAlign:"center",fontSize:"0.875rem",padding:"4px 8px"},"& .MuiInputLabel-root":{fontSize:"0.75rem"}},Cr=()=>{e(!0),n(b.toString())},yt=Ir=>{n(Ir.target.value)},Vt=()=>{const Ir=parseInt(r,10);!isNaN(Ir)&&Ir>=0&&Ir<=B-1?ht(Ir):n(b.toString()),e(!1)},Er=Ir=>{Ir.key==="Enter"?Vt():Ir.key==="Escape"&&(n(b.toString()),e(!1))},sr=()=>{Vt()},or=Ir=>{const _n=parseInt(Ir.target.value,10);!isNaN(_n)&&_n>0&&de(_n)},Ar=()=>X?Ke.jsx(Xbt,{sx:{color:"#1976d2",fontSize:22,...dr}}):V?Ke.jsx(Ybt,{sx:{color:"#4caf50",fontSize:22}}):Ke.jsx(Ul,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:Ke.jsx(_1,{size:20})});return Ke.jsxs(Ul,{sx:{padding:"5px 10px",backgroundColor:"background.paper",borderTop:"1px solid",borderColor:"divider",boxShadow:"0 -2px 8px rgba(0,0,0,0.1)",display:"flex",alignItems:"center",gap:4,flexShrink:0,zIndex:Ir=>Ir.zIndex.drawer+1},children:[Ke.jsx(Ul,{sx:{minWidth:"100px",cursor:"pointer"},onClick:Cr,children:t?Ke.jsx(zg,{value:r,onChange:yt,onKeyDown:Er,onBlur:sr,size:"small",variant:"outlined",autoFocus:!0,sx:{width:"80px","& .MuiInputBase-input":{textAlign:"center",fontSize:"0.875rem"}}}):Ke.jsxs(Su,{variant:"body2",sx:{textAlign:"center",padding:"8px",borderRadius:"4px","&:hover":{backgroundColor:"action.hover"}},children:[b," / ",B-1]})}),Ke.jsxs(Ul,{ref:i,sx:{flexGrow:1,position:"relative"},children:[Ke.jsx(w2t,{bookmarks:U,frameCount:B,currentFrame:b,containerWidth:a,onBookmarkClick:ht,onBookmarkDelete:Se,onBookmarkEdit:ve}),Ke.jsx(S2t,{selectedFrames:ae,frameCount:B,containerWidth:a,enabled:Pe,currentFrame:b,disabled:ut==="locked"}),!Pe&&Ke.jsx(y2t,{selectedFrames:ae,frameCount:B,currentFrame:b,containerWidth:a}),Ke.jsx(Sme,{orientation:"horizontal",value:b,onChange:qt,onMouseUp:Lt,onMouseDown:()=>{d.current=!1},disabled:ut==="locked",max:B-1,"aria-label":"Frame Progress",valueLabelDisplay:"auto",sx:{position:"relative",top:"2px","& .MuiSlider-thumb":{transition:"none !important",zIndex:2},"& .MuiSlider-track":{transition:"none !important",display:"none"},"& .MuiSlider-rail":{transition:"none !important",display:"none"}}})]}),Ke.jsxs(Ul,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:"120px"},children:[Ke.jsx(zg,{variant:"outlined",size:"small",label:"Skip",value:ie,onChange:or,type:"number",slotProps:{htmlInput:{min:1}},sx:{...Zt,width:80}}),ae&&ae.length>0&&Ke.jsx(Zh,{title:Pe?"Disable frame selection filter":"Enable frame selection filter",children:Ke.jsx(Zf,{size:"small",onClick:()=>Me(!Pe),sx:{color:Pe?"primary.main":"text.secondary","&:hover":{backgroundColor:"action.hover"}},children:Ke.jsx(Zbt,{fontSize:"small"})})}),Ke.jsx(Zh,{title:Ie?"Synchronized mode enabled - playback waits for all active geometries to finish loading":"Synchronized mode disabled - playback uses fixed FPS",children:Ke.jsx(Zf,{size:"small",onClick:()=>Ve(!Ie),sx:{color:Ie?"primary.main":"text.secondary",...Ze()&&Ie?dr:{},"&:hover":{backgroundColor:"action.hover"}},children:Ie?Ke.jsx(Kbt,{fontSize:"small"}):Ke.jsx(Jbt,{fontSize:"small"})})}),Ar()]})]})},E2t=({drawerWidth:t,navItems:e,selectedItem:r,onItemClick:n})=>Ke.jsxs(Jmt,{variant:"permanent",sx:{width:t,flexShrink:0,"& .MuiDrawer-paper":{width:t,boxSizing:"border-box"}},children:[Ke.jsx(CB,{}),Ke.jsx(Ul,{sx:{overflow:"auto"},children:Ke.jsx(B8,{children:e.map(i=>Ke.jsx(xk,{disablePadding:!0,children:Ke.jsx(Zh,{title:i.description,placement:"right",children:Ke.jsx(DP,{onClick:()=>n(i.name),selected:r===i.name,sx:{justifyContent:"center",p:2},children:Ke.jsx(jS,{sx:{minWidth:0},children:i.icon})})})},i.name))})})]}),BBe=Hu(Ke.jsx("path",{d:"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z"}));var nQ,USe;function UBe(){if(USe)return nQ;USe=1;var t=typeof H3=="object"&&H3&&H3.Object===Object&&H3;return nQ=t,nQ}var iQ,HSe;function Y2(){if(HSe)return iQ;HSe=1;var t=UBe(),e=typeof self=="object"&&self&&self.Object===Object&&self,r=t||e||Function("return this")();return iQ=r,iQ}var aQ,jSe;function V8(){if(jSe)return aQ;jSe=1;var t=Y2(),e=t.Symbol;return aQ=e,aQ}var oQ,VSe;function A2t(){if(VSe)return oQ;VSe=1;var t=V8(),e=Object.prototype,r=e.hasOwnProperty,n=e.toString,i=t?t.toStringTag:void 0;function a(o){var s=r.call(o,i),d=o[i];try{o[i]=void 0;var b=!0}catch{}var L=n.call(o);return b&&(s?o[i]=d:delete o[i]),L}return oQ=a,oQ}var sQ,qSe;function C2t(){if(qSe)return sQ;qSe=1;var t=Object.prototype,e=t.toString;function r(n){return e.call(n)}return sQ=r,sQ}var lQ,GSe;function g4(){if(GSe)return lQ;GSe=1;var t=V8(),e=A2t(),r=C2t(),n="[object Null]",i="[object Undefined]",a=t?t.toStringTag:void 0;function o(s){return s==null?s===void 0?i:n:a&&a in Object(s)?e(s):r(s)}return lQ=o,lQ}var uQ,$Se;function mE(){if($Se)return uQ;$Se=1;function t(e){return e!=null&&typeof e=="object"}return uQ=t,uQ}var cQ,WSe;function q8(){if(WSe)return cQ;WSe=1;var t=g4(),e=mE(),r="[object Symbol]";function n(i){return typeof i=="symbol"||e(i)&&t(i)==r}return cQ=n,cQ}var fQ,YSe;function M2t(){if(YSe)return fQ;YSe=1;var t=q8();function e(r,n,i){for(var a=-1,o=r.length;++a<o;){var s=r[a],d=n(s);if(d!=null&&(b===void 0?d===d&&!t(d):i(d,b)))var b=d,L=s}return L}return fQ=e,fQ}var dQ,XSe;function R2t(){if(XSe)return dQ;XSe=1;function t(e,r){return e>r}return dQ=t,dQ}var hQ,ZSe;function k2t(){if(ZSe)return hQ;ZSe=1;function t(){this.__data__=[],this.size=0}return hQ=t,hQ}var pQ,KSe;function BB(){if(KSe)return pQ;KSe=1;function t(e,r){return e===r||e!==e&&r!==r}return pQ=t,pQ}var vQ,JSe;function HY(){if(JSe)return vQ;JSe=1;var t=BB();function e(r,n){for(var i=r.length;i--;)if(t(r[i][0],n))return i;return-1}return vQ=e,vQ}var mQ,QSe;function I2t(){if(QSe)return mQ;QSe=1;var t=HY(),e=Array.prototype,r=e.splice;function n(i){var a=this.__data__,o=t(a,i);if(o<0)return!1;var s=a.length-1;return o==s?a.pop():r.call(a,o,1),--this.size,!0}return mQ=n,mQ}var gQ,eTe;function P2t(){if(eTe)return gQ;eTe=1;var t=HY();function e(r){var n=this.__data__,i=t(n,r);return i<0?void 0:n[i][1]}return gQ=e,gQ}var yQ,tTe;function D2t(){if(tTe)return yQ;tTe=1;var t=HY();function e(r){return t(this.__data__,r)>-1}return yQ=e,yQ}var bQ,rTe;function L2t(){if(rTe)return bQ;rTe=1;var t=HY();function e(r,n){var i=this.__data__,a=t(i,r);return a<0?(++this.size,i.push([r,n])):i[a][1]=n,this}return bQ=e,bQ}var xQ,nTe;function jY(){if(nTe)return xQ;nTe=1;var t=k2t(),e=I2t(),r=P2t(),n=D2t(),i=L2t();function a(o){var s=-1,d=o==null?0:o.length;for(this.clear();++s<d;){var b=o[s];this.set(b[0],b[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,xQ=a,xQ}var _Q,iTe;function O2t(){if(iTe)return _Q;iTe=1;var t=jY();function e(){this.__data__=new t,this.size=0}return _Q=e,_Q}var wQ,aTe;function N2t(){if(aTe)return wQ;aTe=1;function t(e){var r=this.__data__,n=r.delete(e);return this.size=r.size,n}return wQ=t,wQ}var SQ,oTe;function F2t(){if(oTe)return SQ;oTe=1;function t(e){return this.__data__.get(e)}return SQ=t,SQ}var TQ,sTe;function z2t(){if(sTe)return TQ;sTe=1;function t(e){return this.__data__.has(e)}return TQ=t,TQ}var EQ,lTe;function gE(){if(lTe)return EQ;lTe=1;function t(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}return EQ=t,EQ}var AQ,uTe;function UB(){if(uTe)return AQ;uTe=1;var t=g4(),e=gE(),r="[object AsyncFunction]",n="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function o(s){if(!e(s))return!1;var d=t(s);return d==n||d==i||d==r||d==a}return AQ=o,AQ}var CQ,cTe;function B2t(){if(cTe)return CQ;cTe=1;var t=Y2(),e=t["__core-js_shared__"];return CQ=e,CQ}var MQ,fTe;function U2t(){if(fTe)return MQ;fTe=1;var t=B2t(),e=(function(){var n=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function r(n){return!!e&&e in n}return MQ=r,MQ}var RQ,dTe;function HBe(){if(dTe)return RQ;dTe=1;var t=Function.prototype,e=t.toString;function r(n){if(n!=null){try{return e.call(n)}catch{}try{return n+""}catch{}}return""}return RQ=r,RQ}var kQ,hTe;function H2t(){if(hTe)return kQ;hTe=1;var t=UB(),e=U2t(),r=gE(),n=HBe(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,o=Function.prototype,s=Object.prototype,d=o.toString,b=s.hasOwnProperty,L=RegExp("^"+d.call(b).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function B(V){if(!r(V)||e(V))return!1;var X=t(V)?L:a;return X.test(n(V))}return kQ=B,kQ}var IQ,pTe;function j2t(){if(pTe)return IQ;pTe=1;function t(e,r){return e?.[r]}return IQ=t,IQ}var PQ,vTe;function qL(){if(vTe)return PQ;vTe=1;var t=H2t(),e=j2t();function r(n,i){var a=e(n,i);return t(a)?a:void 0}return PQ=r,PQ}var DQ,mTe;function Nme(){if(mTe)return DQ;mTe=1;var t=qL(),e=Y2(),r=t(e,"Map");return DQ=r,DQ}var LQ,gTe;function VY(){if(gTe)return LQ;gTe=1;var t=qL(),e=t(Object,"create");return LQ=e,LQ}var OQ,yTe;function V2t(){if(yTe)return OQ;yTe=1;var t=VY();function e(){this.__data__=t?t(null):{},this.size=0}return OQ=e,OQ}var NQ,bTe;function q2t(){if(bTe)return NQ;bTe=1;function t(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}return NQ=t,NQ}var FQ,xTe;function G2t(){if(xTe)return FQ;xTe=1;var t=VY(),e="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function i(a){var o=this.__data__;if(t){var s=o[a];return s===e?void 0:s}return n.call(o,a)?o[a]:void 0}return FQ=i,FQ}var zQ,_Te;function $2t(){if(_Te)return zQ;_Te=1;var t=VY(),e=Object.prototype,r=e.hasOwnProperty;function n(i){var a=this.__data__;return t?a[i]!==void 0:r.call(a,i)}return zQ=n,zQ}var BQ,wTe;function W2t(){if(wTe)return BQ;wTe=1;var t=VY(),e="__lodash_hash_undefined__";function r(n,i){var a=this.__data__;return this.size+=this.has(n)?0:1,a[n]=t&&i===void 0?e:i,this}return BQ=r,BQ}var UQ,STe;function Y2t(){if(STe)return UQ;STe=1;var t=V2t(),e=q2t(),r=G2t(),n=$2t(),i=W2t();function a(o){var s=-1,d=o==null?0:o.length;for(this.clear();++s<d;){var b=o[s];this.set(b[0],b[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,UQ=a,UQ}var HQ,TTe;function X2t(){if(TTe)return HQ;TTe=1;var t=Y2t(),e=jY(),r=Nme();function n(){this.size=0,this.__data__={hash:new t,map:new(r||e),string:new t}}return HQ=n,HQ}var jQ,ETe;function Z2t(){if(ETe)return jQ;ETe=1;function t(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}return jQ=t,jQ}var VQ,ATe;function qY(){if(ATe)return VQ;ATe=1;var t=Z2t();function e(r,n){var i=r.__data__;return t(n)?i[typeof n=="string"?"string":"hash"]:i.map}return VQ=e,VQ}var qQ,CTe;function K2t(){if(CTe)return qQ;CTe=1;var t=qY();function e(r){var n=t(this,r).delete(r);return this.size-=n?1:0,n}return qQ=e,qQ}var GQ,MTe;function J2t(){if(MTe)return GQ;MTe=1;var t=qY();function e(r){return t(this,r).get(r)}return GQ=e,GQ}var $Q,RTe;function Q2t(){if(RTe)return $Q;RTe=1;var t=qY();function e(r){return t(this,r).has(r)}return $Q=e,$Q}var WQ,kTe;function eSt(){if(kTe)return WQ;kTe=1;var t=qY();function e(r,n){var i=t(this,r),a=i.size;return i.set(r,n),this.size+=i.size==a?0:1,this}return WQ=e,WQ}var YQ,ITe;function Fme(){if(ITe)return YQ;ITe=1;var t=X2t(),e=K2t(),r=J2t(),n=Q2t(),i=eSt();function a(o){var s=-1,d=o==null?0:o.length;for(this.clear();++s<d;){var b=o[s];this.set(b[0],b[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,YQ=a,YQ}var XQ,PTe;function tSt(){if(PTe)return XQ;PTe=1;var t=jY(),e=Nme(),r=Fme(),n=200;function i(a,o){var s=this.__data__;if(s instanceof t){var d=s.__data__;if(!e||d.length<n-1)return d.push([a,o]),this.size=++s.size,this;s=this.__data__=new r(d)}return s.set(a,o),this.size=s.size,this}return XQ=i,XQ}var ZQ,DTe;function GY(){if(DTe)return ZQ;DTe=1;var t=jY(),e=O2t(),r=N2t(),n=F2t(),i=z2t(),a=tSt();function o(s){var d=this.__data__=new t(s);this.size=d.size}return o.prototype.clear=e,o.prototype.delete=r,o.prototype.get=n,o.prototype.has=i,o.prototype.set=a,ZQ=o,ZQ}var KQ,LTe;function rSt(){if(LTe)return KQ;LTe=1;var t="__lodash_hash_undefined__";function e(r){return this.__data__.set(r,t),this}return KQ=e,KQ}var JQ,OTe;function nSt(){if(OTe)return JQ;OTe=1;function t(e){return this.__data__.has(e)}return JQ=t,JQ}var QQ,NTe;function jBe(){if(NTe)return QQ;NTe=1;var t=Fme(),e=rSt(),r=nSt();function n(i){var a=-1,o=i==null?0:i.length;for(this.__data__=new t;++a<o;)this.add(i[a])}return n.prototype.add=n.prototype.push=e,n.prototype.has=r,QQ=n,QQ}var eee,FTe;function iSt(){if(FTe)return eee;FTe=1;function t(e,r){for(var n=-1,i=e==null?0:e.length;++n<i;)if(r(e[n],n,e))return!0;return!1}return eee=t,eee}var tee,zTe;function VBe(){if(zTe)return tee;zTe=1;function t(e,r){return e.has(r)}return tee=t,tee}var ree,BTe;function qBe(){if(BTe)return ree;BTe=1;var t=jBe(),e=iSt(),r=VBe(),n=1,i=2;function a(o,s,d,b,L,B){var V=d&n,X=o.length,ie=s.length;if(X!=ie&&!(V&&ie>X))return!1;var de=B.get(o),ae=B.get(s);if(de&&ae)return de==s&&ae==o;var U=-1,ve=!0,Se=d&i?new t:void 0;for(B.set(o,s),B.set(s,o);++U<X;){var Pe=o[U],Me=s[U];if(b)var Ie=V?b(Me,Pe,U,s,o,B):b(Pe,Me,U,o,s,B);if(Ie!==void 0){if(Ie)continue;ve=!1;break}if(Se){if(!e(s,function(Ve,Ze){if(!r(Se,Ze)&&(Pe===Ve||L(Pe,Ve,d,b,B)))return Se.push(Ze)})){ve=!1;break}}else if(!(Pe===Me||L(Pe,Me,d,b,B))){ve=!1;break}}return B.delete(o),B.delete(s),ve}return ree=a,ree}var nee,UTe;function GBe(){if(UTe)return nee;UTe=1;var t=Y2(),e=t.Uint8Array;return nee=e,nee}var iee,HTe;function $Be(){if(HTe)return iee;HTe=1;function t(e){var r=-1,n=Array(e.size);return e.forEach(function(i,a){n[++r]=[a,i]}),n}return iee=t,iee}var aee,jTe;function zme(){if(jTe)return aee;jTe=1;function t(e){var r=-1,n=Array(e.size);return e.forEach(function(i){n[++r]=i}),n}return aee=t,aee}var oee,VTe;function aSt(){if(VTe)return oee;VTe=1;var t=V8(),e=GBe(),r=BB(),n=qBe(),i=$Be(),a=zme(),o=1,s=2,d="[object Boolean]",b="[object Date]",L="[object Error]",B="[object Map]",V="[object Number]",X="[object RegExp]",ie="[object Set]",de="[object String]",ae="[object Symbol]",U="[object ArrayBuffer]",ve="[object DataView]",Se=t?t.prototype:void 0,Pe=Se?Se.valueOf:void 0;function Me(Ie,Ve,Ze,Je,nt,ut,ht){switch(Ze){case ve:if(Ie.byteLength!=Ve.byteLength||Ie.byteOffset!=Ve.byteOffset)return!1;Ie=Ie.buffer,Ve=Ve.buffer;case U:return!(Ie.byteLength!=Ve.byteLength||!ut(new e(Ie),new e(Ve)));case d:case b:case V:return r(+Ie,+Ve);case L:return Ie.name==Ve.name&&Ie.message==Ve.message;case X:case de:return Ie==Ve+"";case B:var _t=i;case ie:var Dt=Je&o;if(_t||(_t=a),Ie.size!=Ve.size&&!Dt)return!1;var qt=ht.get(Ie);if(qt)return qt==Ve;Je|=s,ht.set(Ie,Ve);var Lt=n(_t(Ie),_t(Ve),Je,nt,ut,ht);return ht.delete(Ie),Lt;case ae:if(Pe)return Pe.call(Ie)==Pe.call(Ve)}return!1}return oee=Me,oee}var see,qTe;function Bme(){if(qTe)return see;qTe=1;function t(e,r){for(var n=-1,i=r.length,a=e.length;++n<i;)e[a+n]=r[n];return e}return see=t,see}var lee,GTe;function Rb(){if(GTe)return lee;GTe=1;var t=Array.isArray;return lee=t,lee}var uee,$Te;function WBe(){if($Te)return uee;$Te=1;var t=Bme(),e=Rb();function r(n,i,a){var o=i(n);return e(n)?o:t(o,a(n))}return uee=r,uee}var cee,WTe;function YBe(){if(WTe)return cee;WTe=1;function t(e,r){for(var n=-1,i=e==null?0:e.length,a=0,o=[];++n<i;){var s=e[n];r(s,n,e)&&(o[a++]=s)}return o}return cee=t,cee}var fee,YTe;function XBe(){if(YTe)return fee;YTe=1;function t(){return[]}return fee=t,fee}var dee,XTe;function Ume(){if(XTe)return dee;XTe=1;var t=YBe(),e=XBe(),r=Object.prototype,n=r.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(o){return o==null?[]:(o=Object(o),t(i(o),function(s){return n.call(o,s)}))}:e;return dee=a,dee}var hee,ZTe;function oSt(){if(ZTe)return hee;ZTe=1;function t(e,r){for(var n=-1,i=Array(e);++n<e;)i[n]=r(n);return i}return hee=t,hee}var pee,KTe;function sSt(){if(KTe)return pee;KTe=1;var t=g4(),e=mE(),r="[object Arguments]";function n(i){return e(i)&&t(i)==r}return pee=n,pee}var vee,JTe;function HB(){if(JTe)return vee;JTe=1;var t=sSt(),e=mE(),r=Object.prototype,n=r.hasOwnProperty,i=r.propertyIsEnumerable,a=t((function(){return arguments})())?t:function(o){return e(o)&&n.call(o,"callee")&&!i.call(o,"callee")};return vee=a,vee}var Mz={exports:{}},mee,QTe;function lSt(){if(QTe)return mee;QTe=1;function t(){return!1}return mee=t,mee}Mz.exports;var eEe;function jB(){return eEe||(eEe=1,(function(t,e){var r=Y2(),n=lSt(),i=e&&!e.nodeType&&e,a=i&&!0&&t&&!t.nodeType&&t,o=a&&a.exports===i,s=o?r.Buffer:void 0,d=s?s.isBuffer:void 0,b=d||n;t.exports=b})(Mz,Mz.exports)),Mz.exports}var gee,tEe;function G8(){if(tEe)return gee;tEe=1;var t=9007199254740991,e=/^(?:0|[1-9]\d*)$/;function r(n,i){var a=typeof n;return i=i??t,!!i&&(a=="number"||a!="symbol"&&e.test(n))&&n>-1&&n%1==0&&n<i}return gee=r,gee}var yee,rEe;function Hme(){if(rEe)return yee;rEe=1;var t=9007199254740991;function e(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=t}return yee=e,yee}var bee,nEe;function uSt(){if(nEe)return bee;nEe=1;var t=g4(),e=Hme(),r=mE(),n="[object Arguments]",i="[object Array]",a="[object Boolean]",o="[object Date]",s="[object Error]",d="[object Function]",b="[object Map]",L="[object Number]",B="[object Object]",V="[object RegExp]",X="[object Set]",ie="[object String]",de="[object WeakMap]",ae="[object ArrayBuffer]",U="[object DataView]",ve="[object Float32Array]",Se="[object Float64Array]",Pe="[object Int8Array]",Me="[object Int16Array]",Ie="[object Int32Array]",Ve="[object Uint8Array]",Ze="[object Uint8ClampedArray]",Je="[object Uint16Array]",nt="[object Uint32Array]",ut={};ut[ve]=ut[Se]=ut[Pe]=ut[Me]=ut[Ie]=ut[Ve]=ut[Ze]=ut[Je]=ut[nt]=!0,ut[n]=ut[i]=ut[ae]=ut[a]=ut[U]=ut[o]=ut[s]=ut[d]=ut[b]=ut[L]=ut[B]=ut[V]=ut[X]=ut[ie]=ut[de]=!1;function ht(_t){return r(_t)&&e(_t.length)&&!!ut[t(_t)]}return bee=ht,bee}var xee,iEe;function jme(){if(iEe)return xee;iEe=1;function t(e){return function(r){return e(r)}}return xee=t,xee}var Rz={exports:{}};Rz.exports;var aEe;function Vme(){return aEe||(aEe=1,(function(t,e){var r=UBe(),n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===n,o=a&&r.process,s=(function(){try{var d=i&&i.require&&i.require("util").types;return d||o&&o.binding&&o.binding("util")}catch{}})();t.exports=s})(Rz,Rz.exports)),Rz.exports}var _ee,oEe;function $Y(){if(oEe)return _ee;oEe=1;var t=uSt(),e=jme(),r=Vme(),n=r&&r.isTypedArray,i=n?e(n):t;return _ee=i,_ee}var wee,sEe;function ZBe(){if(sEe)return wee;sEe=1;var t=oSt(),e=HB(),r=Rb(),n=jB(),i=G8(),a=$Y(),o=Object.prototype,s=o.hasOwnProperty;function d(b,L){var B=r(b),V=!B&&e(b),X=!B&&!V&&n(b),ie=!B&&!V&&!X&&a(b),de=B||V||X||ie,ae=de?t(b.length,String):[],U=ae.length;for(var ve in b)(L||s.call(b,ve))&&!(de&&(ve=="length"||X&&(ve=="offset"||ve=="parent")||ie&&(ve=="buffer"||ve=="byteLength"||ve=="byteOffset")||i(ve,U)))&&ae.push(ve);return ae}return wee=d,wee}var See,lEe;function WY(){if(lEe)return See;lEe=1;var t=Object.prototype;function e(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||t;return r===i}return See=e,See}var Tee,uEe;function KBe(){if(uEe)return Tee;uEe=1;function t(e,r){return function(n){return e(r(n))}}return Tee=t,Tee}var Eee,cEe;function cSt(){if(cEe)return Eee;cEe=1;var t=KBe(),e=t(Object.keys,Object);return Eee=e,Eee}var Aee,fEe;function qme(){if(fEe)return Aee;fEe=1;var t=WY(),e=cSt(),r=Object.prototype,n=r.hasOwnProperty;function i(a){if(!t(a))return e(a);var o=[];for(var s in Object(a))n.call(a,s)&&s!="constructor"&&o.push(s);return o}return Aee=i,Aee}var Cee,dEe;function Uk(){if(dEe)return Cee;dEe=1;var t=UB(),e=Hme();function r(n){return n!=null&&e(n.length)&&!t(n)}return Cee=r,Cee}var Mee,hEe;function Hk(){if(hEe)return Mee;hEe=1;var t=ZBe(),e=qme(),r=Uk();function n(i){return r(i)?t(i):e(i)}return Mee=n,Mee}var Ree,pEe;function JBe(){if(pEe)return Ree;pEe=1;var t=WBe(),e=Ume(),r=Hk();function n(i){return t(i,r,e)}return Ree=n,Ree}var kee,vEe;function fSt(){if(vEe)return kee;vEe=1;var t=JBe(),e=1,r=Object.prototype,n=r.hasOwnProperty;function i(a,o,s,d,b,L){var B=s&e,V=t(a),X=V.length,ie=t(o),de=ie.length;if(X!=de&&!B)return!1;for(var ae=X;ae--;){var U=V[ae];if(!(B?U in o:n.call(o,U)))return!1}var ve=L.get(a),Se=L.get(o);if(ve&&Se)return ve==o&&Se==a;var Pe=!0;L.set(a,o),L.set(o,a);for(var Me=B;++ae<X;){U=V[ae];var Ie=a[U],Ve=o[U];if(d)var Ze=B?d(Ve,Ie,U,o,a,L):d(Ie,Ve,U,a,o,L);if(!(Ze===void 0?Ie===Ve||b(Ie,Ve,s,d,L):Ze)){Pe=!1;break}Me||(Me=U=="constructor")}if(Pe&&!Me){var Je=a.constructor,nt=o.constructor;Je!=nt&&"constructor"in a&&"constructor"in o&&!(typeof Je=="function"&&Je instanceof Je&&typeof nt=="function"&&nt instanceof nt)&&(Pe=!1)}return L.delete(a),L.delete(o),Pe}return kee=i,kee}var Iee,mEe;function dSt(){if(mEe)return Iee;mEe=1;var t=qL(),e=Y2(),r=t(e,"DataView");return Iee=r,Iee}var Pee,gEe;function hSt(){if(gEe)return Pee;gEe=1;var t=qL(),e=Y2(),r=t(e,"Promise");return Pee=r,Pee}var Dee,yEe;function QBe(){if(yEe)return Dee;yEe=1;var t=qL(),e=Y2(),r=t(e,"Set");return Dee=r,Dee}var Lee,bEe;function eUe(){if(bEe)return Lee;bEe=1;var t=qL(),e=Y2(),r=t(e,"WeakMap");return Lee=r,Lee}var Oee,xEe;function GL(){if(xEe)return Oee;xEe=1;var t=dSt(),e=Nme(),r=hSt(),n=QBe(),i=eUe(),a=g4(),o=HBe(),s="[object Map]",d="[object Object]",b="[object Promise]",L="[object Set]",B="[object WeakMap]",V="[object DataView]",X=o(t),ie=o(e),de=o(r),ae=o(n),U=o(i),ve=a;return(t&&ve(new t(new ArrayBuffer(1)))!=V||e&&ve(new e)!=s||r&&ve(r.resolve())!=b||n&&ve(new n)!=L||i&&ve(new i)!=B)&&(ve=function(Se){var Pe=a(Se),Me=Pe==d?Se.constructor:void 0,Ie=Me?o(Me):"";if(Ie)switch(Ie){case X:return V;case ie:return s;case de:return b;case ae:return L;case U:return B}return Pe}),Oee=ve,Oee}var Nee,_Ee;function pSt(){if(_Ee)return Nee;_Ee=1;var t=GY(),e=qBe(),r=aSt(),n=fSt(),i=GL(),a=Rb(),o=jB(),s=$Y(),d=1,b="[object Arguments]",L="[object Array]",B="[object Object]",V=Object.prototype,X=V.hasOwnProperty;function ie(de,ae,U,ve,Se,Pe){var Me=a(de),Ie=a(ae),Ve=Me?L:i(de),Ze=Ie?L:i(ae);Ve=Ve==b?B:Ve,Ze=Ze==b?B:Ze;var Je=Ve==B,nt=Ze==B,ut=Ve==Ze;if(ut&&o(de)){if(!o(ae))return!1;Me=!0,Je=!1}if(ut&&!Je)return Pe||(Pe=new t),Me||s(de)?e(de,ae,U,ve,Se,Pe):r(de,ae,Ve,U,ve,Se,Pe);if(!(U&d)){var ht=Je&&X.call(de,"__wrapped__"),_t=nt&&X.call(ae,"__wrapped__");if(ht||_t){var Dt=ht?de.value():de,qt=_t?ae.value():ae;return Pe||(Pe=new t),Se(Dt,qt,U,ve,Pe)}}return ut?(Pe||(Pe=new t),n(de,ae,U,ve,Se,Pe)):!1}return Nee=ie,Nee}var Fee,wEe;function Gme(){if(wEe)return Fee;wEe=1;var t=pSt(),e=mE();function r(n,i,a,o,s){return n===i?!0:n==null||i==null||!e(n)&&!e(i)?n!==n&&i!==i:t(n,i,a,o,r,s)}return Fee=r,Fee}var zee,SEe;function vSt(){if(SEe)return zee;SEe=1;var t=GY(),e=Gme(),r=1,n=2;function i(a,o,s,d){var b=s.length,L=b,B=!d;if(a==null)return!L;for(a=Object(a);b--;){var V=s[b];if(B&&V[2]?V[1]!==a[V[0]]:!(V[0]in a))return!1}for(;++b<L;){V=s[b];var X=V[0],ie=a[X],de=V[1];if(B&&V[2]){if(ie===void 0&&!(X in a))return!1}else{var ae=new t;if(d)var U=d(ie,de,X,a,o,ae);if(!(U===void 0?e(de,ie,r|n,d,ae):U))return!1}}return!0}return zee=i,zee}var Bee,TEe;function tUe(){if(TEe)return Bee;TEe=1;var t=gE();function e(r){return r===r&&!t(r)}return Bee=e,Bee}var Uee,EEe;function mSt(){if(EEe)return Uee;EEe=1;var t=tUe(),e=Hk();function r(n){for(var i=e(n),a=i.length;a--;){var o=i[a],s=n[o];i[a]=[o,s,t(s)]}return i}return Uee=r,Uee}var Hee,AEe;function rUe(){if(AEe)return Hee;AEe=1;function t(e,r){return function(n){return n==null?!1:n[e]===r&&(r!==void 0||e in Object(n))}}return Hee=t,Hee}var jee,CEe;function gSt(){if(CEe)return jee;CEe=1;var t=vSt(),e=mSt(),r=rUe();function n(i){var a=e(i);return a.length==1&&a[0][2]?r(a[0][0],a[0][1]):function(o){return o===i||t(o,i,a)}}return jee=n,jee}var Vee,MEe;function $me(){if(MEe)return Vee;MEe=1;var t=Rb(),e=q8(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(a,o){if(t(a))return!1;var s=typeof a;return s=="number"||s=="symbol"||s=="boolean"||a==null||e(a)?!0:n.test(a)||!r.test(a)||o!=null&&a in Object(o)}return Vee=i,Vee}var qee,REe;function ySt(){if(REe)return qee;REe=1;var t=Fme(),e="Expected a function";function r(n,i){if(typeof n!="function"||i!=null&&typeof i!="function")throw new TypeError(e);var a=function(){var o=arguments,s=i?i.apply(this,o):o[0],d=a.cache;if(d.has(s))return d.get(s);var b=n.apply(this,o);return a.cache=d.set(s,b)||d,b};return a.cache=new(r.Cache||t),a}return r.Cache=t,qee=r,qee}var Gee,kEe;function bSt(){if(kEe)return Gee;kEe=1;var t=ySt(),e=500;function r(n){var i=t(n,function(o){return a.size===e&&a.clear(),o}),a=i.cache;return i}return Gee=r,Gee}var $ee,IEe;function nUe(){if(IEe)return $ee;IEe=1;var t=bSt(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=t(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(e,function(o,s,d,b){a.push(d?b.replace(r,"$1"):s||o)}),a});return $ee=n,$ee}var Wee,PEe;function $8(){if(PEe)return Wee;PEe=1;function t(e,r){for(var n=-1,i=e==null?0:e.length,a=Array(i);++n<i;)a[n]=r(e[n],n,e);return a}return Wee=t,Wee}var Yee,DEe;function iUe(){if(DEe)return Yee;DEe=1;var t=V8(),e=$8(),r=Rb(),n=q8(),i=t?t.prototype:void 0,a=i?i.toString:void 0;function o(s){if(typeof s=="string")return s;if(r(s))return e(s,o)+"";if(n(s))return a?a.call(s):"";var d=s+"";return d=="0"&&1/s==-1/0?"-0":d}return Yee=o,Yee}var Xee,LEe;function W8(){if(LEe)return Xee;LEe=1;var t=iUe();function e(r){return r==null?"":t(r)}return Xee=e,Xee}var Zee,OEe;function VB(){if(OEe)return Zee;OEe=1;var t=Rb(),e=$me(),r=nUe(),n=W8();function i(a,o){return t(a)?a:e(a,o)?[a]:r(n(a))}return Zee=i,Zee}var Kee,NEe;function $L(){if(NEe)return Kee;NEe=1;var t=q8();function e(r){if(typeof r=="string"||t(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return Kee=e,Kee}var Jee,FEe;function Wme(){if(FEe)return Jee;FEe=1;var t=VB(),e=$L();function r(n,i){i=t(i,n);for(var a=0,o=i.length;n!=null&&a<o;)n=n[e(i[a++])];return a&&a==o?n:void 0}return Jee=r,Jee}var Qee,zEe;function aUe(){if(zEe)return Qee;zEe=1;var t=Wme();function e(r,n,i){var a=r==null?void 0:t(r,n);return a===void 0?i:a}return Qee=e,Qee}var ete,BEe;function xSt(){if(BEe)return ete;BEe=1;function t(e,r){return e!=null&&r in Object(e)}return ete=t,ete}var tte,UEe;function oUe(){if(UEe)return tte;UEe=1;var t=VB(),e=HB(),r=Rb(),n=G8(),i=Hme(),a=$L();function o(s,d,b){d=t(d,s);for(var L=-1,B=d.length,V=!1;++L<B;){var X=a(d[L]);if(!(V=s!=null&&b(s,X)))break;s=s[X]}return V||++L!=B?V:(B=s==null?0:s.length,!!B&&i(B)&&n(X,B)&&(r(s)||e(s)))}return tte=o,tte}var rte,HEe;function _St(){if(HEe)return rte;HEe=1;var t=xSt(),e=oUe();function r(n,i){return n!=null&&e(n,i,t)}return rte=r,rte}var nte,jEe;function wSt(){if(jEe)return nte;jEe=1;var t=Gme(),e=aUe(),r=_St(),n=$me(),i=tUe(),a=rUe(),o=$L(),s=1,d=2;function b(L,B){return n(L)&&i(B)?a(o(L),B):function(V){var X=e(V,L);return X===void 0&&X===B?r(V,L):t(B,X,s|d)}}return nte=b,nte}var ite,VEe;function YY(){if(VEe)return ite;VEe=1;function t(e){return e}return ite=t,ite}var ate,qEe;function SSt(){if(qEe)return ate;qEe=1;function t(e){return function(r){return r?.[e]}}return ate=t,ate}var ote,GEe;function TSt(){if(GEe)return ote;GEe=1;var t=Wme();function e(r){return function(n){return t(n,r)}}return ote=e,ote}var ste,$Ee;function ESt(){if($Ee)return ste;$Ee=1;var t=SSt(),e=TSt(),r=$me(),n=$L();function i(a){return r(a)?t(n(a)):e(a)}return ste=i,ste}var lte,WEe;function y4(){if(WEe)return lte;WEe=1;var t=gSt(),e=wSt(),r=YY(),n=Rb(),i=ESt();function a(o){return typeof o=="function"?o:o==null?r:typeof o=="object"?n(o)?e(o[0],o[1]):t(o):i(o)}return lte=a,lte}var ute,YEe;function ASt(){if(YEe)return ute;YEe=1;var t=M2t(),e=R2t(),r=y4();function n(i,a){return i&&i.length?t(i,r(a,2),e):void 0}return ute=n,ute}var CSt=ASt();const Yme=Qh(CSt);var cte,XEe;function MSt(){if(XEe)return cte;XEe=1;var t=qme(),e=GL(),r=HB(),n=Rb(),i=Uk(),a=jB(),o=WY(),s=$Y(),d="[object Map]",b="[object Set]",L=Object.prototype,B=L.hasOwnProperty;function V(X){if(X==null)return!0;if(i(X)&&(n(X)||typeof X=="string"||typeof X.splice=="function"||a(X)||s(X)||r(X)))return!X.length;var ie=e(X);if(ie==d||ie==b)return!X.size;if(o(X))return!t(X).length;for(var de in X)if(B.call(X,de))return!1;return!0}return cte=V,cte}var RSt=MSt();const Eh=Qh(RSt);var fte,ZEe;function sUe(){if(ZEe)return fte;ZEe=1;function t(e,r,n,i){var a=-1,o=e==null?0:e.length;for(i&&o&&(n=e[++a]);++a<o;)n=r(n,e[a],a,e);return n}return fte=t,fte}var dte,KEe;function kSt(){if(KEe)return dte;KEe=1;function t(e){return function(r){return e?.[r]}}return dte=t,dte}var hte,JEe;function ISt(){if(JEe)return hte;JEe=1;var t=kSt(),e={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",Ĳ:"IJ",ĳ:"ij",Œ:"Oe",œ:"oe",ŉ:"'n",ſ:"s"},r=t(e);return hte=r,hte}var pte,QEe;function PSt(){if(QEe)return pte;QEe=1;var t=ISt(),e=W8(),r=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,n="\\u0300-\\u036f",i="\\ufe20-\\ufe2f",a="\\u20d0-\\u20ff",o=n+i+a,s="["+o+"]",d=RegExp(s,"g");function b(L){return L=e(L),L&&L.replace(r,t).replace(d,"")}return pte=b,pte}var vte,e3e;function DSt(){if(e3e)return vte;e3e=1;var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function e(r){return r.match(t)||[]}return vte=e,vte}var mte,t3e;function LSt(){if(t3e)return mte;t3e=1;var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function e(r){return t.test(r)}return mte=e,mte}var gte,r3e;function OSt(){if(r3e)return gte;r3e=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=e+r+n,a="\\u2700-\\u27bf",o="a-z\\xdf-\\xf6\\xf8-\\xff",s="\\xac\\xb1\\xd7\\xf7",d="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",b="\\u2000-\\u206f",L=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",B="A-Z\\xc0-\\xd6\\xd8-\\xde",V="\\ufe0e\\ufe0f",X=s+d+b+L,ie="['’]",de="["+X+"]",ae="["+i+"]",U="\\d+",ve="["+a+"]",Se="["+o+"]",Pe="[^"+t+X+U+a+o+B+"]",Me="\\ud83c[\\udffb-\\udfff]",Ie="(?:"+ae+"|"+Me+")",Ve="[^"+t+"]",Ze="(?:\\ud83c[\\udde6-\\uddff]){2}",Je="[\\ud800-\\udbff][\\udc00-\\udfff]",nt="["+B+"]",ut="\\u200d",ht="(?:"+Se+"|"+Pe+")",_t="(?:"+nt+"|"+Pe+")",Dt="(?:"+ie+"(?:d|ll|m|re|s|t|ve))?",qt="(?:"+ie+"(?:D|LL|M|RE|S|T|VE))?",Lt=Ie+"?",dr="["+V+"]?",Zt="(?:"+ut+"(?:"+[Ve,Ze,Je].join("|")+")"+dr+Lt+")*",Cr="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",yt="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Vt=dr+Lt+Zt,Er="(?:"+[ve,Ze,Je].join("|")+")"+Vt,sr=RegExp([nt+"?"+Se+"+"+Dt+"(?="+[de,nt,"$"].join("|")+")",_t+"+"+qt+"(?="+[de,nt+ht,"$"].join("|")+")",nt+"?"+ht+"+"+Dt,nt+"+"+qt,yt,Cr,U,Er].join("|"),"g");function or(Ar){return Ar.match(sr)||[]}return gte=or,gte}var yte,n3e;function NSt(){if(n3e)return yte;n3e=1;var t=DSt(),e=LSt(),r=W8(),n=OSt();function i(a,o,s){return a=r(a),o=s?void 0:o,o===void 0?e(a)?n(a):t(a):a.match(o)||[]}return yte=i,yte}var bte,i3e;function FSt(){if(i3e)return bte;i3e=1;var t=sUe(),e=PSt(),r=NSt(),n="['’]",i=RegExp(n,"g");function a(o){return function(s){return t(r(e(s).replace(i,"")),o,"")}}return bte=a,bte}var xte,a3e;function lUe(){if(a3e)return xte;a3e=1;function t(e,r,n){var i=-1,a=e.length;r<0&&(r=-r>a?0:a+r),n=n>a?a:n,n<0&&(n+=a),a=r>n?0:n-r>>>0,r>>>=0;for(var o=Array(a);++i<a;)o[i]=e[i+r];return o}return xte=t,xte}var _te,o3e;function zSt(){if(o3e)return _te;o3e=1;var t=lUe();function e(r,n,i){var a=r.length;return i=i===void 0?a:i,!n&&i>=a?r:t(r,n,i)}return _te=e,_te}var wte,s3e;function uUe(){if(s3e)return wte;s3e=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=e+r+n,a="\\ufe0e\\ufe0f",o="\\u200d",s=RegExp("["+o+t+i+a+"]");function d(b){return s.test(b)}return wte=d,wte}var Ste,l3e;function BSt(){if(l3e)return Ste;l3e=1;function t(e){return e.split("")}return Ste=t,Ste}var Tte,u3e;function USt(){if(u3e)return Tte;u3e=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=e+r+n,a="\\ufe0e\\ufe0f",o="["+t+"]",s="["+i+"]",d="\\ud83c[\\udffb-\\udfff]",b="(?:"+s+"|"+d+")",L="[^"+t+"]",B="(?:\\ud83c[\\udde6-\\uddff]){2}",V="[\\ud800-\\udbff][\\udc00-\\udfff]",X="\\u200d",ie=b+"?",de="["+a+"]?",ae="(?:"+X+"(?:"+[L,B,V].join("|")+")"+de+ie+")*",U=de+ie+ae,ve="(?:"+[L+s+"?",s,B,V,o].join("|")+")",Se=RegExp(d+"(?="+d+")|"+ve+U,"g");function Pe(Me){return Me.match(Se)||[]}return Tte=Pe,Tte}var Ete,c3e;function HSt(){if(c3e)return Ete;c3e=1;var t=BSt(),e=uUe(),r=USt();function n(i){return e(i)?r(i):t(i)}return Ete=n,Ete}var Ate,f3e;function jSt(){if(f3e)return Ate;f3e=1;var t=zSt(),e=uUe(),r=HSt(),n=W8();function i(a){return function(o){o=n(o);var s=e(o)?r(o):void 0,d=s?s[0]:o.charAt(0),b=s?t(s,1).join(""):o.slice(1);return d[a]()+b}}return Ate=i,Ate}var Cte,d3e;function VSt(){if(d3e)return Cte;d3e=1;var t=jSt(),e=t("toUpperCase");return Cte=e,Cte}var Mte,h3e;function qSt(){if(h3e)return Mte;h3e=1;var t=FSt(),e=VSt(),r=t(function(n,i,a){return n+(a?" ":"")+e(i)});return Mte=r,Mte}var GSt=qSt();const Xme=Qh(GSt);var $St=Hk();const WSt=Qh($St);var Rte,p3e;function YSt(){if(p3e)return Rte;p3e=1;var t=Math.ceil,e=Math.max;function r(n,i,a,o){for(var s=-1,d=e(t((i-n)/(a||1)),0),b=Array(d);d--;)b[o?d:++s]=n,n+=a;return b}return Rte=r,Rte}var kte,v3e;function cUe(){if(v3e)return kte;v3e=1;var t=BB(),e=Uk(),r=G8(),n=gE();function i(a,o,s){if(!n(s))return!1;var d=typeof o;return(d=="number"?e(s)&&r(o,s.length):d=="string"&&o in s)?t(s[o],a):!1}return kte=i,kte}var Ite,m3e;function XSt(){if(m3e)return Ite;m3e=1;var t=/\s/;function e(r){for(var n=r.length;n--&&t.test(r.charAt(n)););return n}return Ite=e,Ite}var Pte,g3e;function ZSt(){if(g3e)return Pte;g3e=1;var t=XSt(),e=/^\s+/;function r(n){return n&&n.slice(0,t(n)+1).replace(e,"")}return Pte=r,Pte}var Dte,y3e;function fUe(){if(y3e)return Dte;y3e=1;var t=ZSt(),e=gE(),r=q8(),n=NaN,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt;function d(b){if(typeof b=="number")return b;if(r(b))return n;if(e(b)){var L=typeof b.valueOf=="function"?b.valueOf():b;b=e(L)?L+"":L}if(typeof b!="string")return b===0?b:+b;b=t(b);var B=a.test(b);return B||o.test(b)?s(b.slice(2),B?2:8):i.test(b)?n:+b}return Dte=d,Dte}var Lte,b3e;function dUe(){if(b3e)return Lte;b3e=1;var t=fUe(),e=1/0,r=17976931348623157e292;function n(i){if(!i)return i===0?i:0;if(i=t(i),i===e||i===-e){var a=i<0?-1:1;return a*r}return i===i?i:0}return Lte=n,Lte}var Ote,x3e;function KSt(){if(x3e)return Ote;x3e=1;var t=YSt(),e=cUe(),r=dUe();function n(i){return function(a,o,s){return s&&typeof s!="number"&&e(a,o,s)&&(o=s=void 0),a=r(a),o===void 0?(o=a,a=0):o=r(o),s=s===void 0?a<o?1:-1:r(s),t(a,o,s,i)}}return Ote=n,Ote}var Nte,_3e;function JSt(){if(_3e)return Nte;_3e=1;var t=KSt(),e=t();return Nte=e,Nte}var QSt=JSt();const XY=Qh(QSt);var eTt=aUe();const fx=Qh(eTt);var Fte,w3e;function tTt(){if(w3e)return Fte;w3e=1;var t=Object.prototype,e=t.hasOwnProperty;function r(n,i){return n!=null&&e.call(n,i)}return Fte=r,Fte}var zte,S3e;function rTt(){if(S3e)return zte;S3e=1;var t=tTt(),e=oUe();function r(n,i){return n!=null&&e(n,i,t)}return zte=r,zte}var nTt=rTt();const hUe=Qh(nTt);var Bte,T3e;function iTt(){if(T3e)return Bte;T3e=1;var t=y4(),e=Uk(),r=Hk();function n(i){return function(a,o,s){var d=Object(a);if(!e(a)){var b=t(o,3);a=r(a),o=function(B){return b(d[B],B,d)}}var L=i(a,o,s);return L>-1?d[b?a[L]:L]:void 0}}return Bte=n,Bte}var Ute,E3e;function pUe(){if(E3e)return Ute;E3e=1;function t(e,r,n,i){for(var a=e.length,o=n+(i?1:-1);i?o--:++o<a;)if(r(e[o],o,e))return o;return-1}return Ute=t,Ute}var Hte,A3e;function qB(){if(A3e)return Hte;A3e=1;var t=dUe();function e(r){var n=t(r),i=n%1;return n===n?i?n-i:n:0}return Hte=e,Hte}var jte,C3e;function aTt(){if(C3e)return jte;C3e=1;var t=pUe(),e=y4(),r=qB(),n=Math.max;function i(a,o,s){var d=a==null?0:a.length;if(!d)return-1;var b=s==null?0:r(s);return b<0&&(b=n(d+b,0)),t(a,e(o,3),b)}return jte=i,jte}var Vte,M3e;function oTt(){if(M3e)return Vte;M3e=1;var t=iTt(),e=aTt(),r=t(e);return Vte=r,Vte}var sTt=oTt();const vUe=Qh(sTt);var lTt=Rb();const mUe=Qh(lTt);var qte,R3e;function uTt(){if(R3e)return qte;R3e=1;function t(e){return e!==e}return qte=t,qte}var Gte,k3e;function cTt(){if(k3e)return Gte;k3e=1;function t(e,r,n){for(var i=n-1,a=e.length;++i<a;)if(e[i]===r)return i;return-1}return Gte=t,Gte}var $te,I3e;function gUe(){if(I3e)return $te;I3e=1;var t=pUe(),e=uTt(),r=cTt();function n(i,a,o){return a===a?r(i,a,o):t(i,e,o)}return $te=n,$te}var Wte,P3e;function fTt(){if(P3e)return Wte;P3e=1;var t=g4(),e=Rb(),r=mE(),n="[object String]";function i(a){return typeof a=="string"||!e(a)&&r(a)&&t(a)==n}return Wte=i,Wte}var Yte,D3e;function dTt(){if(D3e)return Yte;D3e=1;var t=$8();function e(r,n){return t(n,function(i){return r[i]})}return Yte=e,Yte}var Xte,L3e;function hTt(){if(L3e)return Xte;L3e=1;var t=dTt(),e=Hk();function r(n){return n==null?[]:t(n,e(n))}return Xte=r,Xte}var Zte,O3e;function pTt(){if(O3e)return Zte;O3e=1;var t=gUe(),e=Uk(),r=fTt(),n=qB(),i=hTt(),a=Math.max;function o(s,d,b,L){s=e(s)?s:i(s),b=b&&!L?n(b):0;var B=s.length;return b<0&&(b=a(B+b,0)),r(s)?b<=B&&s.indexOf(d,b)>-1:!!B&&t(s,d,b)>-1}return Zte=o,Zte}var vTt=pTt();const yUe=Qh(vTt);var hj={exports:{}},Kte={},JR={},uD={},Jte={},Qte={},ere={},N3e;function s$(){return N3e||(N3e=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends e{constructor(ve){if(super(),!t.IDENTIFIER.test(ve))throw new Error("CodeGen: name must be a valid identifier");this.str=ve}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=r;class n extends e{constructor(ve){super(),this._items=typeof ve=="string"?[ve]:ve}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const ve=this._items[0];return ve===""||ve==='""'}get str(){var ve;return(ve=this._str)!==null&&ve!==void 0?ve:this._str=this._items.reduce((Se,Pe)=>`${Se}${Pe}`,"")}get names(){var ve;return(ve=this._names)!==null&&ve!==void 0?ve:this._names=this._items.reduce((Se,Pe)=>(Pe instanceof r&&(Se[Pe.str]=(Se[Pe.str]||0)+1),Se),{})}}t._Code=n,t.nil=new n("");function i(U,...ve){const Se=[U[0]];let Pe=0;for(;Pe<ve.length;)s(Se,ve[Pe]),Se.push(U[++Pe]);return new n(Se)}t._=i;const a=new n("+");function o(U,...ve){const Se=[X(U[0])];let Pe=0;for(;Pe<ve.length;)Se.push(a),s(Se,ve[Pe]),Se.push(a,X(U[++Pe]));return d(Se),new n(Se)}t.str=o;function s(U,ve){ve instanceof n?U.push(...ve._items):ve instanceof r?U.push(ve):U.push(B(ve))}t.addCodeArg=s;function d(U){let ve=1;for(;ve<U.length-1;){if(U[ve]===a){const Se=b(U[ve-1],U[ve+1]);if(Se!==void 0){U.splice(ve-1,3,Se);continue}U[ve++]="+"}ve++}}function b(U,ve){if(ve==='""')return U;if(U==='""')return ve;if(typeof U=="string")return ve instanceof r||U[U.length-1]!=='"'?void 0:typeof ve!="string"?`${U.slice(0,-1)}${ve}"`:ve[0]==='"'?U.slice(0,-1)+ve.slice(1):void 0;if(typeof ve=="string"&&ve[0]==='"'&&!(U instanceof r))return`"${U}${ve.slice(1)}`}function L(U,ve){return ve.emptyStr()?U:U.emptyStr()?ve:o`${U}${ve}`}t.strConcat=L;function B(U){return typeof U=="number"||typeof U=="boolean"||U===null?U:X(Array.isArray(U)?U.join(","):U)}function V(U){return new n(X(U))}t.stringify=V;function X(U){return JSON.stringify(U).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=X;function ie(U){return typeof U=="string"&&t.IDENTIFIER.test(U)?new n(`.${U}`):i`[${U}]`}t.getProperty=ie;function de(U){if(typeof U=="string"&&t.IDENTIFIER.test(U))return new n(`${U}`);throw new Error(`CodeGen: invalid export name: ${U}, use explicit $id name mapping`)}t.getEsmExportName=de;function ae(U){return new n(U.toString())}t.regexpCode=ae})(ere)),ere}var tre={},F3e;function z3e(){return F3e||(F3e=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const e=s$();class r extends Error{constructor(b){super(`CodeGen: "code" for ${b} not defined`),this.value=b.value}}var n;(function(d){d[d.Started=0]="Started",d[d.Completed=1]="Completed"})(n||(t.UsedValueState=n={})),t.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class i{constructor({prefixes:b,parent:L}={}){this._names={},this._prefixes=b,this._parent=L}toName(b){return b instanceof e.Name?b:this.name(b)}name(b){return new e.Name(this._newName(b))}_newName(b){const L=this._names[b]||this._nameGroup(b);return`${b}${L.index++}`}_nameGroup(b){var L,B;if(!((B=(L=this._parent)===null||L===void 0?void 0:L._prefixes)===null||B===void 0)&&B.has(b)||this._prefixes&&!this._prefixes.has(b))throw new Error(`CodeGen: prefix "${b}" is not allowed in this scope`);return this._names[b]={prefix:b,index:0}}}t.Scope=i;class a extends e.Name{constructor(b,L){super(L),this.prefix=b}setValue(b,{property:L,itemIndex:B}){this.value=b,this.scopePath=(0,e._)`.${new e.Name(L)}[${B}]`}}t.ValueScopeName=a;const o=(0,e._)`\n`;class s extends i{constructor(b){super(b),this._values={},this._scope=b.scope,this.opts={...b,_n:b.lines?o:e.nil}}get(){return this._scope}name(b){return new a(b,this._newName(b))}value(b,L){var B;if(L.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const V=this.toName(b),{prefix:X}=V,ie=(B=L.key)!==null&&B!==void 0?B:L.ref;let de=this._values[X];if(de){const ve=de.get(ie);if(ve)return ve}else de=this._values[X]=new Map;de.set(ie,V);const ae=this._scope[X]||(this._scope[X]=[]),U=ae.length;return ae[U]=L.ref,V.setValue(L,{property:X,itemIndex:U}),V}getValue(b,L){const B=this._values[b];if(B)return B.get(L)}scopeRefs(b,L=this._values){return this._reduceValues(L,B=>{if(B.scopePath===void 0)throw new Error(`CodeGen: name "${B}" has no value`);return(0,e._)`${b}${B.scopePath}`})}scopeCode(b=this._values,L,B){return this._reduceValues(b,V=>{if(V.value===void 0)throw new Error(`CodeGen: name "${V}" has no value`);return V.value.code},L,B)}_reduceValues(b,L,B={},V){let X=e.nil;for(const ie in b){const de=b[ie];if(!de)continue;const ae=B[ie]=B[ie]||new Map;de.forEach(U=>{if(ae.has(U))return;ae.set(U,n.Started);let ve=L(U);if(ve){const Se=this.opts.es5?t.varKinds.var:t.varKinds.const;X=(0,e._)`${X}${Se} ${U} = ${ve};${this.opts._n}`}else if(ve=V?.(U))X=(0,e._)`${X}${ve}${this.opts._n}`;else throw new r(U);ae.set(U,n.Completed)})}return X}}t.ValueScope=s})(tre)),tre}var B3e;function kp(){return B3e||(B3e=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const e=s$(),r=z3e();var n=s$();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return n.Name}});var i=z3e();Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class a{optimizeNodes(){return this}optimizeNames(or,Ar){return this}}class o extends a{constructor(or,Ar,Ir){super(),this.varKind=or,this.name=Ar,this.rhs=Ir}render({es5:or,_n:Ar}){const Ir=or?r.varKinds.var:this.varKind,_n=this.rhs===void 0?"":` = ${this.rhs}`;return`${Ir} ${this.name}${_n};`+Ar}optimizeNames(or,Ar){if(or[this.name.str])return this.rhs&&(this.rhs=Dt(this.rhs,or,Ar)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class s extends a{constructor(or,Ar,Ir){super(),this.lhs=or,this.rhs=Ar,this.sideEffects=Ir}render({_n:or}){return`${this.lhs} = ${this.rhs};`+or}optimizeNames(or,Ar){if(!(this.lhs instanceof e.Name&&!or[this.lhs.str]&&!this.sideEffects))return this.rhs=Dt(this.rhs,or,Ar),this}get names(){const or=this.lhs instanceof e.Name?{}:{...this.lhs.names};return _t(or,this.rhs)}}class d extends s{constructor(or,Ar,Ir,_n){super(or,Ir,_n),this.op=Ar}render({_n:or}){return`${this.lhs} ${this.op}= ${this.rhs};`+or}}class b extends a{constructor(or){super(),this.label=or,this.names={}}render({_n:or}){return`${this.label}:`+or}}class L extends a{constructor(or){super(),this.label=or,this.names={}}render({_n:or}){return`break${this.label?` ${this.label}`:""};`+or}}class B extends a{constructor(or){super(),this.error=or}render({_n:or}){return`throw ${this.error};`+or}get names(){return this.error.names}}class V extends a{constructor(or){super(),this.code=or}render({_n:or}){return`${this.code};`+or}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(or,Ar){return this.code=Dt(this.code,or,Ar),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class X extends a{constructor(or=[]){super(),this.nodes=or}render(or){return this.nodes.reduce((Ar,Ir)=>Ar+Ir.render(or),"")}optimizeNodes(){const{nodes:or}=this;let Ar=or.length;for(;Ar--;){const Ir=or[Ar].optimizeNodes();Array.isArray(Ir)?or.splice(Ar,1,...Ir):Ir?or[Ar]=Ir:or.splice(Ar,1)}return or.length>0?this:void 0}optimizeNames(or,Ar){const{nodes:Ir}=this;let _n=Ir.length;for(;_n--;){const Un=Ir[_n];Un.optimizeNames(or,Ar)||(qt(or,Un.names),Ir.splice(_n,1))}return Ir.length>0?this:void 0}get names(){return this.nodes.reduce((or,Ar)=>ht(or,Ar.names),{})}}class ie extends X{render(or){return"{"+or._n+super.render(or)+"}"+or._n}}class de extends X{}class ae extends ie{}ae.kind="else";class U extends ie{constructor(or,Ar){super(Ar),this.condition=or}render(or){let Ar=`if(${this.condition})`+super.render(or);return this.else&&(Ar+="else "+this.else.render(or)),Ar}optimizeNodes(){super.optimizeNodes();const or=this.condition;if(or===!0)return this.nodes;let Ar=this.else;if(Ar){const Ir=Ar.optimizeNodes();Ar=this.else=Array.isArray(Ir)?new ae(Ir):Ir}if(Ar)return or===!1?Ar instanceof U?Ar:Ar.nodes:this.nodes.length?this:new U(Lt(or),Ar instanceof U?[Ar]:Ar.nodes);if(!(or===!1||!this.nodes.length))return this}optimizeNames(or,Ar){var Ir;if(this.else=(Ir=this.else)===null||Ir===void 0?void 0:Ir.optimizeNames(or,Ar),!!(super.optimizeNames(or,Ar)||this.else))return this.condition=Dt(this.condition,or,Ar),this}get names(){const or=super.names;return _t(or,this.condition),this.else&&ht(or,this.else.names),or}}U.kind="if";class ve extends ie{}ve.kind="for";class Se extends ve{constructor(or){super(),this.iteration=or}render(or){return`for(${this.iteration})`+super.render(or)}optimizeNames(or,Ar){if(super.optimizeNames(or,Ar))return this.iteration=Dt(this.iteration,or,Ar),this}get names(){return ht(super.names,this.iteration.names)}}class Pe extends ve{constructor(or,Ar,Ir,_n){super(),this.varKind=or,this.name=Ar,this.from=Ir,this.to=_n}render(or){const Ar=or.es5?r.varKinds.var:this.varKind,{name:Ir,from:_n,to:Un}=this;return`for(${Ar} ${Ir}=${_n}; ${Ir}<${Un}; ${Ir}++)`+super.render(or)}get names(){const or=_t(super.names,this.from);return _t(or,this.to)}}class Me extends ve{constructor(or,Ar,Ir,_n){super(),this.loop=or,this.varKind=Ar,this.name=Ir,this.iterable=_n}render(or){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(or)}optimizeNames(or,Ar){if(super.optimizeNames(or,Ar))return this.iterable=Dt(this.iterable,or,Ar),this}get names(){return ht(super.names,this.iterable.names)}}class Ie extends ie{constructor(or,Ar,Ir){super(),this.name=or,this.args=Ar,this.async=Ir}render(or){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(or)}}Ie.kind="func";class Ve extends X{render(or){return"return "+super.render(or)}}Ve.kind="return";class Ze extends ie{render(or){let Ar="try"+super.render(or);return this.catch&&(Ar+=this.catch.render(or)),this.finally&&(Ar+=this.finally.render(or)),Ar}optimizeNodes(){var or,Ar;return super.optimizeNodes(),(or=this.catch)===null||or===void 0||or.optimizeNodes(),(Ar=this.finally)===null||Ar===void 0||Ar.optimizeNodes(),this}optimizeNames(or,Ar){var Ir,_n;return super.optimizeNames(or,Ar),(Ir=this.catch)===null||Ir===void 0||Ir.optimizeNames(or,Ar),(_n=this.finally)===null||_n===void 0||_n.optimizeNames(or,Ar),this}get names(){const or=super.names;return this.catch&&ht(or,this.catch.names),this.finally&&ht(or,this.finally.names),or}}class Je extends ie{constructor(or){super(),this.error=or}render(or){return`catch(${this.error})`+super.render(or)}}Je.kind="catch";class nt extends ie{render(or){return"finally"+super.render(or)}}nt.kind="finally";class ut{constructor(or,Ar={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...Ar,_n:Ar.lines?`
`:""},this._extScope=or,this._scope=new r.Scope({parent:or}),this._nodes=[new de]}toString(){return this._root.render(this.opts)}name(or){return this._scope.name(or)}scopeName(or){return this._extScope.name(or)}scopeValue(or,Ar){const Ir=this._extScope.value(or,Ar);return(this._values[Ir.prefix]||(this._values[Ir.prefix]=new Set)).add(Ir),Ir}getScopeValue(or,Ar){return this._extScope.getValue(or,Ar)}scopeRefs(or){return this._extScope.scopeRefs(or,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(or,Ar,Ir,_n){const Un=this._scope.toName(Ar);return Ir!==void 0&&_n&&(this._constants[Un.str]=Ir),this._leafNode(new o(or,Un,Ir)),Un}const(or,Ar,Ir){return this._def(r.varKinds.const,or,Ar,Ir)}let(or,Ar,Ir){return this._def(r.varKinds.let,or,Ar,Ir)}var(or,Ar,Ir){return this._def(r.varKinds.var,or,Ar,Ir)}assign(or,Ar,Ir){return this._leafNode(new s(or,Ar,Ir))}add(or,Ar){return this._leafNode(new d(or,t.operators.ADD,Ar))}code(or){return typeof or=="function"?or():or!==e.nil&&this._leafNode(new V(or)),this}object(...or){const Ar=["{"];for(const[Ir,_n]of or)Ar.length>1&&Ar.push(","),Ar.push(Ir),(Ir!==_n||this.opts.es5)&&(Ar.push(":"),(0,e.addCodeArg)(Ar,_n));return Ar.push("}"),new e._Code(Ar)}if(or,Ar,Ir){if(this._blockNode(new U(or)),Ar&&Ir)this.code(Ar).else().code(Ir).endIf();else if(Ar)this.code(Ar).endIf();else if(Ir)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(or){return this._elseNode(new U(or))}else(){return this._elseNode(new ae)}endIf(){return this._endBlockNode(U,ae)}_for(or,Ar){return this._blockNode(or),Ar&&this.code(Ar).endFor(),this}for(or,Ar){return this._for(new Se(or),Ar)}forRange(or,Ar,Ir,_n,Un=this.opts.es5?r.varKinds.var:r.varKinds.let){const Qn=this._scope.toName(or);return this._for(new Pe(Un,Qn,Ar,Ir),()=>_n(Qn))}forOf(or,Ar,Ir,_n=r.varKinds.const){const Un=this._scope.toName(or);if(this.opts.es5){const Qn=Ar instanceof e.Name?Ar:this.var("_arr",Ar);return this.forRange("_i",0,(0,e._)`${Qn}.length`,Jn=>{this.var(Un,(0,e._)`${Qn}[${Jn}]`),Ir(Un)})}return this._for(new Me("of",_n,Un,Ar),()=>Ir(Un))}forIn(or,Ar,Ir,_n=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(or,(0,e._)`Object.keys(${Ar})`,Ir);const Un=this._scope.toName(or);return this._for(new Me("in",_n,Un,Ar),()=>Ir(Un))}endFor(){return this._endBlockNode(ve)}label(or){return this._leafNode(new b(or))}break(or){return this._leafNode(new L(or))}return(or){const Ar=new Ve;if(this._blockNode(Ar),this.code(or),Ar.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Ve)}try(or,Ar,Ir){if(!Ar&&!Ir)throw new Error('CodeGen: "try" without "catch" and "finally"');const _n=new Ze;if(this._blockNode(_n),this.code(or),Ar){const Un=this.name("e");this._currNode=_n.catch=new Je(Un),Ar(Un)}return Ir&&(this._currNode=_n.finally=new nt,this.code(Ir)),this._endBlockNode(Je,nt)}throw(or){return this._leafNode(new B(or))}block(or,Ar){return this._blockStarts.push(this._nodes.length),or&&this.code(or).endBlock(Ar),this}endBlock(or){const Ar=this._blockStarts.pop();if(Ar===void 0)throw new Error("CodeGen: not in self-balancing block");const Ir=this._nodes.length-Ar;if(Ir<0||or!==void 0&&Ir!==or)throw new Error(`CodeGen: wrong number of nodes: ${Ir} vs ${or} expected`);return this._nodes.length=Ar,this}func(or,Ar=e.nil,Ir,_n){return this._blockNode(new Ie(or,Ar,Ir)),_n&&this.code(_n).endFunc(),this}endFunc(){return this._endBlockNode(Ie)}optimize(or=1){for(;or-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(or){return this._currNode.nodes.push(or),this}_blockNode(or){this._currNode.nodes.push(or),this._nodes.push(or)}_endBlockNode(or,Ar){const Ir=this._currNode;if(Ir instanceof or||Ar&&Ir instanceof Ar)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${Ar?`${or.kind}/${Ar.kind}`:or.kind}"`)}_elseNode(or){const Ar=this._currNode;if(!(Ar instanceof U))throw new Error('CodeGen: "else" without "if"');return this._currNode=Ar.else=or,this}get _root(){return this._nodes[0]}get _currNode(){const or=this._nodes;return or[or.length-1]}set _currNode(or){const Ar=this._nodes;Ar[Ar.length-1]=or}}t.CodeGen=ut;function ht(sr,or){for(const Ar in or)sr[Ar]=(sr[Ar]||0)+(or[Ar]||0);return sr}function _t(sr,or){return or instanceof e._CodeOrName?ht(sr,or.names):sr}function Dt(sr,or,Ar){if(sr instanceof e.Name)return Ir(sr);if(!_n(sr))return sr;return new e._Code(sr._items.reduce((Un,Qn)=>(Qn instanceof e.Name&&(Qn=Ir(Qn)),Qn instanceof e._Code?Un.push(...Qn._items):Un.push(Qn),Un),[]));function Ir(Un){const Qn=Ar[Un.str];return Qn===void 0||or[Un.str]!==1?Un:(delete or[Un.str],Qn)}function _n(Un){return Un instanceof e._Code&&Un._items.some(Qn=>Qn instanceof e.Name&&or[Qn.str]===1&&Ar[Qn.str]!==void 0)}}function qt(sr,or){for(const Ar in or)sr[Ar]=(sr[Ar]||0)-(or[Ar]||0)}function Lt(sr){return typeof sr=="boolean"||typeof sr=="number"||sr===null?!sr:(0,e._)`!${Er(sr)}`}t.not=Lt;const dr=Vt(t.operators.AND);function Zt(...sr){return sr.reduce(dr)}t.and=Zt;const Cr=Vt(t.operators.OR);function yt(...sr){return sr.reduce(Cr)}t.or=yt;function Vt(sr){return(or,Ar)=>or===e.nil?Ar:Ar===e.nil?or:(0,e._)`${Er(or)} ${sr} ${Er(Ar)}`}function Er(sr){return sr instanceof e.Name?sr:(0,e._)`(${sr})`}})(Qte)),Qte}var Ap={},U3e;function pm(){if(U3e)return Ap;U3e=1,Object.defineProperty(Ap,"__esModule",{value:!0}),Ap.checkStrictMode=Ap.getErrorPath=Ap.Type=Ap.useFunc=Ap.setEvaluated=Ap.evaluatedPropsToName=Ap.mergeEvaluated=Ap.eachItem=Ap.unescapeJsonPointer=Ap.escapeJsonPointer=Ap.escapeFragment=Ap.unescapeFragment=Ap.schemaRefOrVal=Ap.schemaHasRulesButRef=Ap.schemaHasRules=Ap.checkUnknownRules=Ap.alwaysValidSchema=Ap.toHash=void 0;const t=kp(),e=s$();function r(Me){const Ie={};for(const Ve of Me)Ie[Ve]=!0;return Ie}Ap.toHash=r;function n(Me,Ie){return typeof Ie=="boolean"?Ie:Object.keys(Ie).length===0?!0:(i(Me,Ie),!a(Ie,Me.self.RULES.all))}Ap.alwaysValidSchema=n;function i(Me,Ie=Me.schema){const{opts:Ve,self:Ze}=Me;if(!Ve.strictSchema||typeof Ie=="boolean")return;const Je=Ze.RULES.keywords;for(const nt in Ie)Je[nt]||Pe(Me,`unknown keyword: "${nt}"`)}Ap.checkUnknownRules=i;function a(Me,Ie){if(typeof Me=="boolean")return!Me;for(const Ve in Me)if(Ie[Ve])return!0;return!1}Ap.schemaHasRules=a;function o(Me,Ie){if(typeof Me=="boolean")return!Me;for(const Ve in Me)if(Ve!=="$ref"&&Ie.all[Ve])return!0;return!1}Ap.schemaHasRulesButRef=o;function s({topSchemaRef:Me,schemaPath:Ie},Ve,Ze,Je){if(!Je){if(typeof Ve=="number"||typeof Ve=="boolean")return Ve;if(typeof Ve=="string")return(0,t._)`${Ve}`}return(0,t._)`${Me}${Ie}${(0,t.getProperty)(Ze)}`}Ap.schemaRefOrVal=s;function d(Me){return B(decodeURIComponent(Me))}Ap.unescapeFragment=d;function b(Me){return encodeURIComponent(L(Me))}Ap.escapeFragment=b;function L(Me){return typeof Me=="number"?`${Me}`:Me.replace(/~/g,"~0").replace(/\//g,"~1")}Ap.escapeJsonPointer=L;function B(Me){return Me.replace(/~1/g,"/").replace(/~0/g,"~")}Ap.unescapeJsonPointer=B;function V(Me,Ie){if(Array.isArray(Me))for(const Ve of Me)Ie(Ve);else Ie(Me)}Ap.eachItem=V;function X({mergeNames:Me,mergeToName:Ie,mergeValues:Ve,resultToName:Ze}){return(Je,nt,ut,ht)=>{const _t=ut===void 0?nt:ut instanceof t.Name?(nt instanceof t.Name?Me(Je,nt,ut):Ie(Je,nt,ut),ut):nt instanceof t.Name?(Ie(Je,ut,nt),nt):Ve(nt,ut);return ht===t.Name&&!(_t instanceof t.Name)?Ze(Je,_t):_t}}Ap.mergeEvaluated={props:X({mergeNames:(Me,Ie,Ve)=>Me.if((0,t._)`${Ve} !== true && ${Ie} !== undefined`,()=>{Me.if((0,t._)`${Ie} === true`,()=>Me.assign(Ve,!0),()=>Me.assign(Ve,(0,t._)`${Ve} || {}`).code((0,t._)`Object.assign(${Ve}, ${Ie})`))}),mergeToName:(Me,Ie,Ve)=>Me.if((0,t._)`${Ve} !== true`,()=>{Ie===!0?Me.assign(Ve,!0):(Me.assign(Ve,(0,t._)`${Ve} || {}`),de(Me,Ve,Ie))}),mergeValues:(Me,Ie)=>Me===!0?!0:{...Me,...Ie},resultToName:ie}),items:X({mergeNames:(Me,Ie,Ve)=>Me.if((0,t._)`${Ve} !== true && ${Ie} !== undefined`,()=>Me.assign(Ve,(0,t._)`${Ie} === true ? true : ${Ve} > ${Ie} ? ${Ve} : ${Ie}`)),mergeToName:(Me,Ie,Ve)=>Me.if((0,t._)`${Ve} !== true`,()=>Me.assign(Ve,Ie===!0?!0:(0,t._)`${Ve} > ${Ie} ? ${Ve} : ${Ie}`)),mergeValues:(Me,Ie)=>Me===!0?!0:Math.max(Me,Ie),resultToName:(Me,Ie)=>Me.var("items",Ie)})};function ie(Me,Ie){if(Ie===!0)return Me.var("props",!0);const Ve=Me.var("props",(0,t._)`{}`);return Ie!==void 0&&de(Me,Ve,Ie),Ve}Ap.evaluatedPropsToName=ie;function de(Me,Ie,Ve){Object.keys(Ve).forEach(Ze=>Me.assign((0,t._)`${Ie}${(0,t.getProperty)(Ze)}`,!0))}Ap.setEvaluated=de;const ae={};function U(Me,Ie){return Me.scopeValue("func",{ref:Ie,code:ae[Ie.code]||(ae[Ie.code]=new e._Code(Ie.code))})}Ap.useFunc=U;var ve;(function(Me){Me[Me.Num=0]="Num",Me[Me.Str=1]="Str"})(ve||(Ap.Type=ve={}));function Se(Me,Ie,Ve){if(Me instanceof t.Name){const Ze=Ie===ve.Num;return Ve?Ze?(0,t._)`"[" + ${Me} + "]"`:(0,t._)`"['" + ${Me} + "']"`:Ze?(0,t._)`"/" + ${Me}`:(0,t._)`"/" + ${Me}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return Ve?(0,t.getProperty)(Me).toString():"/"+L(Me)}Ap.getErrorPath=Se;function Pe(Me,Ie,Ve=Me.opts.strictSchema){if(Ve){if(Ie=`strict mode: ${Ie}`,Ve===!0)throw new Error(Ie);Me.self.logger.warn(Ie)}}return Ap.checkStrictMode=Pe,Ap}var pj={},H3e;function b4(){if(H3e)return pj;H3e=1,Object.defineProperty(pj,"__esModule",{value:!0});const t=kp(),e={data:new t.Name("data"),valCxt:new t.Name("valCxt"),instancePath:new t.Name("instancePath"),parentData:new t.Name("parentData"),parentDataProperty:new t.Name("parentDataProperty"),rootData:new t.Name("rootData"),dynamicAnchors:new t.Name("dynamicAnchors"),vErrors:new t.Name("vErrors"),errors:new t.Name("errors"),this:new t.Name("this"),self:new t.Name("self"),scope:new t.Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")};return pj.default=e,pj}var j3e;function ZY(){return j3e||(j3e=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const e=kp(),r=pm(),n=b4();t.keywordError={message:({keyword:ae})=>(0,e.str)`must pass "${ae}" keyword validation`},t.keyword$DataError={message:({keyword:ae,schemaType:U})=>U?(0,e.str)`"${ae}" keyword must be ${U} ($data)`:(0,e.str)`"${ae}" keyword is invalid ($data)`};function i(ae,U=t.keywordError,ve,Se){const{it:Pe}=ae,{gen:Me,compositeRule:Ie,allErrors:Ve}=Pe,Ze=B(ae,U,ve);Se??(Ie||Ve)?d(Me,Ze):b(Pe,(0,e._)`[${Ze}]`)}t.reportError=i;function a(ae,U=t.keywordError,ve){const{it:Se}=ae,{gen:Pe,compositeRule:Me,allErrors:Ie}=Se,Ve=B(ae,U,ve);d(Pe,Ve),Me||Ie||b(Se,n.default.vErrors)}t.reportExtraError=a;function o(ae,U){ae.assign(n.default.errors,U),ae.if((0,e._)`${n.default.vErrors} !== null`,()=>ae.if(U,()=>ae.assign((0,e._)`${n.default.vErrors}.length`,U),()=>ae.assign(n.default.vErrors,null)))}t.resetErrorsCount=o;function s({gen:ae,keyword:U,schemaValue:ve,data:Se,errsCount:Pe,it:Me}){if(Pe===void 0)throw new Error("ajv implementation error");const Ie=ae.name("err");ae.forRange("i",Pe,n.default.errors,Ve=>{ae.const(Ie,(0,e._)`${n.default.vErrors}[${Ve}]`),ae.if((0,e._)`${Ie}.instancePath === undefined`,()=>ae.assign((0,e._)`${Ie}.instancePath`,(0,e.strConcat)(n.default.instancePath,Me.errorPath))),ae.assign((0,e._)`${Ie}.schemaPath`,(0,e.str)`${Me.errSchemaPath}/${U}`),Me.opts.verbose&&(ae.assign((0,e._)`${Ie}.schema`,ve),ae.assign((0,e._)`${Ie}.data`,Se))})}t.extendErrors=s;function d(ae,U){const ve=ae.const("err",U);ae.if((0,e._)`${n.default.vErrors} === null`,()=>ae.assign(n.default.vErrors,(0,e._)`[${ve}]`),(0,e._)`${n.default.vErrors}.push(${ve})`),ae.code((0,e._)`${n.default.errors}++`)}function b(ae,U){const{gen:ve,validateName:Se,schemaEnv:Pe}=ae;Pe.$async?ve.throw((0,e._)`new ${ae.ValidationError}(${U})`):(ve.assign((0,e._)`${Se}.errors`,U),ve.return(!1))}const L={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function B(ae,U,ve){const{createErrors:Se}=ae.it;return Se===!1?(0,e._)`{}`:V(ae,U,ve)}function V(ae,U,ve={}){const{gen:Se,it:Pe}=ae,Me=[X(Pe,ve),ie(ae,ve)];return de(ae,U,Me),Se.object(...Me)}function X({errorPath:ae},{instancePath:U}){const ve=U?(0,e.str)`${ae}${(0,r.getErrorPath)(U,r.Type.Str)}`:ae;return[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,ve)]}function ie({keyword:ae,it:{errSchemaPath:U}},{schemaPath:ve,parentSchema:Se}){let Pe=Se?U:(0,e.str)`${U}/${ae}`;return ve&&(Pe=(0,e.str)`${Pe}${(0,r.getErrorPath)(ve,r.Type.Str)}`),[L.schemaPath,Pe]}function de(ae,{params:U,message:ve},Se){const{keyword:Pe,data:Me,schemaValue:Ie,it:Ve}=ae,{opts:Ze,propertyName:Je,topSchemaRef:nt,schemaPath:ut}=Ve;Se.push([L.keyword,Pe],[L.params,typeof U=="function"?U(ae):U||(0,e._)`{}`]),Ze.messages&&Se.push([L.message,typeof ve=="function"?ve(ae):ve]),Ze.verbose&&Se.push([L.schema,Ie],[L.parentSchema,(0,e._)`${nt}${ut}`],[n.default.data,Me]),Je&&Se.push([L.propertyName,Je])}})(Jte)),Jte}var V3e;function mTt(){if(V3e)return uD;V3e=1,Object.defineProperty(uD,"__esModule",{value:!0}),uD.boolOrEmptySchema=uD.topBoolOrEmptySchema=void 0;const t=ZY(),e=kp(),r=b4(),n={message:"boolean schema is false"};function i(s){const{gen:d,schema:b,validateName:L}=s;b===!1?o(s,!1):typeof b=="object"&&b.$async===!0?d.return(r.default.data):(d.assign((0,e._)`${L}.errors`,null),d.return(!0))}uD.topBoolOrEmptySchema=i;function a(s,d){const{gen:b,schema:L}=s;L===!1?(b.var(d,!1),o(s)):b.var(d,!0)}uD.boolOrEmptySchema=a;function o(s,d){const{gen:b,data:L}=s,B={gen:b,keyword:"false schema",data:L,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:s};(0,t.reportError)(B,n,void 0,d)}return uD}var L_={},cD={},q3e;function bUe(){if(q3e)return cD;q3e=1,Object.defineProperty(cD,"__esModule",{value:!0}),cD.getRules=cD.isJSONType=void 0;const t=["string","number","integer","boolean","null","object","array"],e=new Set(t);function r(i){return typeof i=="string"&&e.has(i)}cD.isJSONType=r;function n(){const i={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...i,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},i.number,i.string,i.array,i.object],post:{rules:[]},all:{},keywords:{}}}return cD.getRules=n,cD}var QR={},G3e;function xUe(){if(G3e)return QR;G3e=1,Object.defineProperty(QR,"__esModule",{value:!0}),QR.shouldUseRule=QR.shouldUseGroup=QR.schemaHasRulesForType=void 0;function t({schema:n,self:i},a){const o=i.RULES.types[a];return o&&o!==!0&&e(n,o)}QR.schemaHasRulesForType=t;function e(n,i){return i.rules.some(a=>r(n,a))}QR.shouldUseGroup=e;function r(n,i){var a;return n[i.keyword]!==void 0||((a=i.definition.implements)===null||a===void 0?void 0:a.some(o=>n[o]!==void 0))}return QR.shouldUseRule=r,QR}var $3e;function l$(){if($3e)return L_;$3e=1,Object.defineProperty(L_,"__esModule",{value:!0}),L_.reportTypeError=L_.checkDataTypes=L_.checkDataType=L_.coerceAndCheckDataType=L_.getJSONTypes=L_.getSchemaTypes=L_.DataType=void 0;const t=bUe(),e=xUe(),r=ZY(),n=kp(),i=pm();var a;(function(ve){ve[ve.Correct=0]="Correct",ve[ve.Wrong=1]="Wrong"})(a||(L_.DataType=a={}));function o(ve){const Se=s(ve.type);if(Se.includes("null")){if(ve.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!Se.length&&ve.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');ve.nullable===!0&&Se.push("null")}return Se}L_.getSchemaTypes=o;function s(ve){const Se=Array.isArray(ve)?ve:ve?[ve]:[];if(Se.every(t.isJSONType))return Se;throw new Error("type must be JSONType or JSONType[]: "+Se.join(","))}L_.getJSONTypes=s;function d(ve,Se){const{gen:Pe,data:Me,opts:Ie}=ve,Ve=L(Se,Ie.coerceTypes),Ze=Se.length>0&&!(Ve.length===0&&Se.length===1&&(0,e.schemaHasRulesForType)(ve,Se[0]));if(Ze){const Je=ie(Se,Me,Ie.strictNumbers,a.Wrong);Pe.if(Je,()=>{Ve.length?B(ve,Se,Ve):ae(ve)})}return Ze}L_.coerceAndCheckDataType=d;const b=new Set(["string","number","integer","boolean","null"]);function L(ve,Se){return Se?ve.filter(Pe=>b.has(Pe)||Se==="array"&&Pe==="array"):[]}function B(ve,Se,Pe){const{gen:Me,data:Ie,opts:Ve}=ve,Ze=Me.let("dataType",(0,n._)`typeof ${Ie}`),Je=Me.let("coerced",(0,n._)`undefined`);Ve.coerceTypes==="array"&&Me.if((0,n._)`${Ze} == 'object' && Array.isArray(${Ie}) && ${Ie}.length == 1`,()=>Me.assign(Ie,(0,n._)`${Ie}[0]`).assign(Ze,(0,n._)`typeof ${Ie}`).if(ie(Se,Ie,Ve.strictNumbers),()=>Me.assign(Je,Ie))),Me.if((0,n._)`${Je} !== undefined`);for(const ut of Pe)(b.has(ut)||ut==="array"&&Ve.coerceTypes==="array")&&nt(ut);Me.else(),ae(ve),Me.endIf(),Me.if((0,n._)`${Je} !== undefined`,()=>{Me.assign(Ie,Je),V(ve,Je)});function nt(ut){switch(ut){case"string":Me.elseIf((0,n._)`${Ze} == "number" || ${Ze} == "boolean"`).assign(Je,(0,n._)`"" + ${Ie}`).elseIf((0,n._)`${Ie} === null`).assign(Je,(0,n._)`""`);return;case"number":Me.elseIf((0,n._)`${Ze} == "boolean" || ${Ie} === null
              || (${Ze} == "string" && ${Ie} && ${Ie} == +${Ie})`).assign(Je,(0,n._)`+${Ie}`);return;case"integer":Me.elseIf((0,n._)`${Ze} === "boolean" || ${Ie} === null
              || (${Ze} === "string" && ${Ie} && ${Ie} == +${Ie} && !(${Ie} % 1))`).assign(Je,(0,n._)`+${Ie}`);return;case"boolean":Me.elseIf((0,n._)`${Ie} === "false" || ${Ie} === 0 || ${Ie} === null`).assign(Je,!1).elseIf((0,n._)`${Ie} === "true" || ${Ie} === 1`).assign(Je,!0);return;case"null":Me.elseIf((0,n._)`${Ie} === "" || ${Ie} === 0 || ${Ie} === false`),Me.assign(Je,null);return;case"array":Me.elseIf((0,n._)`${Ze} === "string" || ${Ze} === "number"
              || ${Ze} === "boolean" || ${Ie} === null`).assign(Je,(0,n._)`[${Ie}]`)}}}function V({gen:ve,parentData:Se,parentDataProperty:Pe},Me){ve.if((0,n._)`${Se} !== undefined`,()=>ve.assign((0,n._)`${Se}[${Pe}]`,Me))}function X(ve,Se,Pe,Me=a.Correct){const Ie=Me===a.Correct?n.operators.EQ:n.operators.NEQ;let Ve;switch(ve){case"null":return(0,n._)`${Se} ${Ie} null`;case"array":Ve=(0,n._)`Array.isArray(${Se})`;break;case"object":Ve=(0,n._)`${Se} && typeof ${Se} == "object" && !Array.isArray(${Se})`;break;case"integer":Ve=Ze((0,n._)`!(${Se} % 1) && !isNaN(${Se})`);break;case"number":Ve=Ze();break;default:return(0,n._)`typeof ${Se} ${Ie} ${ve}`}return Me===a.Correct?Ve:(0,n.not)(Ve);function Ze(Je=n.nil){return(0,n.and)((0,n._)`typeof ${Se} == "number"`,Je,Pe?(0,n._)`isFinite(${Se})`:n.nil)}}L_.checkDataType=X;function ie(ve,Se,Pe,Me){if(ve.length===1)return X(ve[0],Se,Pe,Me);let Ie;const Ve=(0,i.toHash)(ve);if(Ve.array&&Ve.object){const Ze=(0,n._)`typeof ${Se} != "object"`;Ie=Ve.null?Ze:(0,n._)`!${Se} || ${Ze}`,delete Ve.null,delete Ve.array,delete Ve.object}else Ie=n.nil;Ve.number&&delete Ve.integer;for(const Ze in Ve)Ie=(0,n.and)(Ie,X(Ze,Se,Pe,Me));return Ie}L_.checkDataTypes=ie;const de={message:({schema:ve})=>`must be ${ve}`,params:({schema:ve,schemaValue:Se})=>typeof ve=="string"?(0,n._)`{type: ${ve}}`:(0,n._)`{type: ${Se}}`};function ae(ve){const Se=U(ve);(0,r.reportError)(Se,de)}L_.reportTypeError=ae;function U(ve){const{gen:Se,data:Pe,schema:Me}=ve,Ie=(0,i.schemaRefOrVal)(ve,Me,"type");return{gen:Se,keyword:"type",data:Pe,schema:Me.type,schemaCode:Ie,schemaValue:Ie,parentSchema:Me,params:{},it:ve}}return L_}var O7={},W3e;function gTt(){if(W3e)return O7;W3e=1,Object.defineProperty(O7,"__esModule",{value:!0}),O7.assignDefaults=void 0;const t=kp(),e=pm();function r(i,a){const{properties:o,items:s}=i.schema;if(a==="object"&&o)for(const d in o)n(i,d,o[d].default);else a==="array"&&Array.isArray(s)&&s.forEach((d,b)=>n(i,b,d.default))}O7.assignDefaults=r;function n(i,a,o){const{gen:s,compositeRule:d,data:b,opts:L}=i;if(o===void 0)return;const B=(0,t._)`${b}${(0,t.getProperty)(a)}`;if(d){(0,e.checkStrictMode)(i,`default is ignored for: ${B}`);return}let V=(0,t._)`${B} === undefined`;L.useDefaults==="empty"&&(V=(0,t._)`${V} || ${B} === null || ${B} === ""`),s.if(V,(0,t._)`${B} = ${(0,t.stringify)(o)}`)}return O7}var pC={},gg={},Y3e;function rM(){if(Y3e)return gg;Y3e=1,Object.defineProperty(gg,"__esModule",{value:!0}),gg.validateUnion=gg.validateArray=gg.usePattern=gg.callValidateCode=gg.schemaProperties=gg.allSchemaProperties=gg.noPropertyInData=gg.propertyInData=gg.isOwnProperty=gg.hasPropFunc=gg.reportMissingProp=gg.checkMissingProp=gg.checkReportMissingProp=void 0;const t=kp(),e=pm(),r=b4(),n=pm();function i(ve,Se){const{gen:Pe,data:Me,it:Ie}=ve;Pe.if(L(Pe,Me,Se,Ie.opts.ownProperties),()=>{ve.setParams({missingProperty:(0,t._)`${Se}`},!0),ve.error()})}gg.checkReportMissingProp=i;function a({gen:ve,data:Se,it:{opts:Pe}},Me,Ie){return(0,t.or)(...Me.map(Ve=>(0,t.and)(L(ve,Se,Ve,Pe.ownProperties),(0,t._)`${Ie} = ${Ve}`)))}gg.checkMissingProp=a;function o(ve,Se){ve.setParams({missingProperty:Se},!0),ve.error()}gg.reportMissingProp=o;function s(ve){return ve.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}gg.hasPropFunc=s;function d(ve,Se,Pe){return(0,t._)`${s(ve)}.call(${Se}, ${Pe})`}gg.isOwnProperty=d;function b(ve,Se,Pe,Me){const Ie=(0,t._)`${Se}${(0,t.getProperty)(Pe)} !== undefined`;return Me?(0,t._)`${Ie} && ${d(ve,Se,Pe)}`:Ie}gg.propertyInData=b;function L(ve,Se,Pe,Me){const Ie=(0,t._)`${Se}${(0,t.getProperty)(Pe)} === undefined`;return Me?(0,t.or)(Ie,(0,t.not)(d(ve,Se,Pe))):Ie}gg.noPropertyInData=L;function B(ve){return ve?Object.keys(ve).filter(Se=>Se!=="__proto__"):[]}gg.allSchemaProperties=B;function V(ve,Se){return B(Se).filter(Pe=>!(0,e.alwaysValidSchema)(ve,Se[Pe]))}gg.schemaProperties=V;function X({schemaCode:ve,data:Se,it:{gen:Pe,topSchemaRef:Me,schemaPath:Ie,errorPath:Ve},it:Ze},Je,nt,ut){const ht=ut?(0,t._)`${ve}, ${Se}, ${Me}${Ie}`:Se,_t=[[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,Ve)],[r.default.parentData,Ze.parentData],[r.default.parentDataProperty,Ze.parentDataProperty],[r.default.rootData,r.default.rootData]];Ze.opts.dynamicRef&&_t.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const Dt=(0,t._)`${ht}, ${Pe.object(..._t)}`;return nt!==t.nil?(0,t._)`${Je}.call(${nt}, ${Dt})`:(0,t._)`${Je}(${Dt})`}gg.callValidateCode=X;const ie=(0,t._)`new RegExp`;function de({gen:ve,it:{opts:Se}},Pe){const Me=Se.unicodeRegExp?"u":"",{regExp:Ie}=Se.code,Ve=Ie(Pe,Me);return ve.scopeValue("pattern",{key:Ve.toString(),ref:Ve,code:(0,t._)`${Ie.code==="new RegExp"?ie:(0,n.useFunc)(ve,Ie)}(${Pe}, ${Me})`})}gg.usePattern=de;function ae(ve){const{gen:Se,data:Pe,keyword:Me,it:Ie}=ve,Ve=Se.name("valid");if(Ie.allErrors){const Je=Se.let("valid",!0);return Ze(()=>Se.assign(Je,!1)),Je}return Se.var(Ve,!0),Ze(()=>Se.break()),Ve;function Ze(Je){const nt=Se.const("len",(0,t._)`${Pe}.length`);Se.forRange("i",0,nt,ut=>{ve.subschema({keyword:Me,dataProp:ut,dataPropType:e.Type.Num},Ve),Se.if((0,t.not)(Ve),Je)})}}gg.validateArray=ae;function U(ve){const{gen:Se,schema:Pe,keyword:Me,it:Ie}=ve;if(!Array.isArray(Pe))throw new Error("ajv implementation error");if(Pe.some(nt=>(0,e.alwaysValidSchema)(Ie,nt))&&!Ie.opts.unevaluated)return;const Ze=Se.let("valid",!1),Je=Se.name("_valid");Se.block(()=>Pe.forEach((nt,ut)=>{const ht=ve.subschema({keyword:Me,schemaProp:ut,compositeRule:!0},Je);Se.assign(Ze,(0,t._)`${Ze} || ${Je}`),ve.mergeValidEvaluated(ht,Je)||Se.if((0,t.not)(Ze))})),ve.result(Ze,()=>ve.reset(),()=>ve.error(!0))}return gg.validateUnion=U,gg}var X3e;function yTt(){if(X3e)return pC;X3e=1,Object.defineProperty(pC,"__esModule",{value:!0}),pC.validateKeywordUsage=pC.validSchemaType=pC.funcKeywordCode=pC.macroKeywordCode=void 0;const t=kp(),e=b4(),r=rM(),n=ZY();function i(V,X){const{gen:ie,keyword:de,schema:ae,parentSchema:U,it:ve}=V,Se=X.macro.call(ve.self,ae,U,ve),Pe=b(ie,de,Se);ve.opts.validateSchema!==!1&&ve.self.validateSchema(Se,!0);const Me=ie.name("valid");V.subschema({schema:Se,schemaPath:t.nil,errSchemaPath:`${ve.errSchemaPath}/${de}`,topSchemaRef:Pe,compositeRule:!0},Me),V.pass(Me,()=>V.error(!0))}pC.macroKeywordCode=i;function a(V,X){var ie;const{gen:de,keyword:ae,schema:U,parentSchema:ve,$data:Se,it:Pe}=V;d(Pe,X);const Me=!Se&&X.compile?X.compile.call(Pe.self,U,ve,Pe):X.validate,Ie=b(de,ae,Me),Ve=de.let("valid");V.block$data(Ve,Ze),V.ok((ie=X.valid)!==null&&ie!==void 0?ie:Ve);function Ze(){if(X.errors===!1)ut(),X.modifying&&o(V),ht(()=>V.error());else{const _t=X.async?Je():nt();X.modifying&&o(V),ht(()=>s(V,_t))}}function Je(){const _t=de.let("ruleErrs",null);return de.try(()=>ut((0,t._)`await `),Dt=>de.assign(Ve,!1).if((0,t._)`${Dt} instanceof ${Pe.ValidationError}`,()=>de.assign(_t,(0,t._)`${Dt}.errors`),()=>de.throw(Dt))),_t}function nt(){const _t=(0,t._)`${Ie}.errors`;return de.assign(_t,null),ut(t.nil),_t}function ut(_t=X.async?(0,t._)`await `:t.nil){const Dt=Pe.opts.passContext?e.default.this:e.default.self,qt=!("compile"in X&&!Se||X.schema===!1);de.assign(Ve,(0,t._)`${_t}${(0,r.callValidateCode)(V,Ie,Dt,qt)}`,X.modifying)}function ht(_t){var Dt;de.if((0,t.not)((Dt=X.valid)!==null&&Dt!==void 0?Dt:Ve),_t)}}pC.funcKeywordCode=a;function o(V){const{gen:X,data:ie,it:de}=V;X.if(de.parentData,()=>X.assign(ie,(0,t._)`${de.parentData}[${de.parentDataProperty}]`))}function s(V,X){const{gen:ie}=V;ie.if((0,t._)`Array.isArray(${X})`,()=>{ie.assign(e.default.vErrors,(0,t._)`${e.default.vErrors} === null ? ${X} : ${e.default.vErrors}.concat(${X})`).assign(e.default.errors,(0,t._)`${e.default.vErrors}.length`),(0,n.extendErrors)(V)},()=>V.error())}function d({schemaEnv:V},X){if(X.async&&!V.$async)throw new Error("async keyword in sync schema")}function b(V,X,ie){if(ie===void 0)throw new Error(`keyword "${X}" failed to compile`);return V.scopeValue("keyword",typeof ie=="function"?{ref:ie}:{ref:ie,code:(0,t.stringify)(ie)})}function L(V,X,ie=!1){return!X.length||X.some(de=>de==="array"?Array.isArray(V):de==="object"?V&&typeof V=="object"&&!Array.isArray(V):typeof V==de||ie&&typeof V>"u")}pC.validSchemaType=L;function B({schema:V,opts:X,self:ie,errSchemaPath:de},ae,U){if(Array.isArray(ae.keyword)?!ae.keyword.includes(U):ae.keyword!==U)throw new Error("ajv implementation error");const ve=ae.dependencies;if(ve?.some(Se=>!Object.prototype.hasOwnProperty.call(V,Se)))throw new Error(`parent schema must have dependencies of ${U}: ${ve.join(",")}`);if(ae.validateSchema&&!ae.validateSchema(V[U])){const Pe=`keyword "${U}" value is invalid at path "${de}": `+ie.errorsText(ae.validateSchema.errors);if(X.validateSchema==="log")ie.logger.error(Pe);else throw new Error(Pe)}}return pC.validateKeywordUsage=B,pC}var ek={},Z3e;function bTt(){if(Z3e)return ek;Z3e=1,Object.defineProperty(ek,"__esModule",{value:!0}),ek.extendSubschemaMode=ek.extendSubschemaData=ek.getSubschema=void 0;const t=kp(),e=pm();function r(a,{keyword:o,schemaProp:s,schema:d,schemaPath:b,errSchemaPath:L,topSchemaRef:B}){if(o!==void 0&&d!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(o!==void 0){const V=a.schema[o];return s===void 0?{schema:V,schemaPath:(0,t._)`${a.schemaPath}${(0,t.getProperty)(o)}`,errSchemaPath:`${a.errSchemaPath}/${o}`}:{schema:V[s],schemaPath:(0,t._)`${a.schemaPath}${(0,t.getProperty)(o)}${(0,t.getProperty)(s)}`,errSchemaPath:`${a.errSchemaPath}/${o}/${(0,e.escapeFragment)(s)}`}}if(d!==void 0){if(b===void 0||L===void 0||B===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:d,schemaPath:b,topSchemaRef:B,errSchemaPath:L}}throw new Error('either "keyword" or "schema" must be passed')}ek.getSubschema=r;function n(a,o,{dataProp:s,dataPropType:d,data:b,dataTypes:L,propertyName:B}){if(b!==void 0&&s!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:V}=o;if(s!==void 0){const{errorPath:ie,dataPathArr:de,opts:ae}=o,U=V.let("data",(0,t._)`${o.data}${(0,t.getProperty)(s)}`,!0);X(U),a.errorPath=(0,t.str)`${ie}${(0,e.getErrorPath)(s,d,ae.jsPropertySyntax)}`,a.parentDataProperty=(0,t._)`${s}`,a.dataPathArr=[...de,a.parentDataProperty]}if(b!==void 0){const ie=b instanceof t.Name?b:V.let("data",b,!0);X(ie),B!==void 0&&(a.propertyName=B)}L&&(a.dataTypes=L);function X(ie){a.data=ie,a.dataLevel=o.dataLevel+1,a.dataTypes=[],o.definedProperties=new Set,a.parentData=o.data,a.dataNames=[...o.dataNames,ie]}}ek.extendSubschemaData=n;function i(a,{jtdDiscriminator:o,jtdMetadata:s,compositeRule:d,createErrors:b,allErrors:L}){d!==void 0&&(a.compositeRule=d),b!==void 0&&(a.createErrors=b),L!==void 0&&(a.allErrors=L),a.jtdDiscriminator=o,a.jtdMetadata=s}return ek.extendSubschemaMode=i,ek}var R2={},rre,K3e;function _Ue(){return K3e||(K3e=1,rre=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,i,a;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!t(e[i],r[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(a=Object.keys(e),n=a.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[i]))return!1;for(i=n;i--!==0;){var o=a[i];if(!t(e[o],r[o]))return!1}return!0}return e!==e&&r!==r}),rre}var nre={exports:{}},J3e;function xTt(){if(J3e)return nre.exports;J3e=1;var t=nre.exports=function(n,i,a){typeof i=="function"&&(a=i,i={}),a=i.cb||a;var o=typeof a=="function"?a:a.pre||function(){},s=a.post||function(){};e(i,o,s,n,"",n)};t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function e(n,i,a,o,s,d,b,L,B,V){if(o&&typeof o=="object"&&!Array.isArray(o)){i(o,s,d,b,L,B,V);for(var X in o){var ie=o[X];if(Array.isArray(ie)){if(X in t.arrayKeywords)for(var de=0;de<ie.length;de++)e(n,i,a,ie[de],s+"/"+X+"/"+de,d,s,X,o,de)}else if(X in t.propsKeywords){if(ie&&typeof ie=="object")for(var ae in ie)e(n,i,a,ie[ae],s+"/"+X+"/"+r(ae),d,s,X,o,ae)}else(X in t.keywords||n.allKeys&&!(X in t.skipKeywords))&&e(n,i,a,ie,s+"/"+X,d,s,X,o)}a(o,s,d,b,L,B,V)}}function r(n){return n.replace(/~/g,"~0").replace(/\//g,"~1")}return nre.exports}var Q3e;function KY(){if(Q3e)return R2;Q3e=1,Object.defineProperty(R2,"__esModule",{value:!0}),R2.getSchemaRefs=R2.resolveUrl=R2.normalizeId=R2._getFullPath=R2.getFullPath=R2.inlineRef=void 0;const t=pm(),e=_Ue(),r=xTt(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function i(de,ae=!0){return typeof de=="boolean"?!0:ae===!0?!o(de):ae?s(de)<=ae:!1}R2.inlineRef=i;const a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function o(de){for(const ae in de){if(a.has(ae))return!0;const U=de[ae];if(Array.isArray(U)&&U.some(o)||typeof U=="object"&&o(U))return!0}return!1}function s(de){let ae=0;for(const U in de){if(U==="$ref")return 1/0;if(ae++,!n.has(U)&&(typeof de[U]=="object"&&(0,t.eachItem)(de[U],ve=>ae+=s(ve)),ae===1/0))return 1/0}return ae}function d(de,ae="",U){U!==!1&&(ae=B(ae));const ve=de.parse(ae);return b(de,ve)}R2.getFullPath=d;function b(de,ae){return de.serialize(ae).split("#")[0]+"#"}R2._getFullPath=b;const L=/#\/?$/;function B(de){return de?de.replace(L,""):""}R2.normalizeId=B;function V(de,ae,U){return U=B(U),de.resolve(ae,U)}R2.resolveUrl=V;const X=/^[a-z_][-a-z0-9._]*$/i;function ie(de,ae){if(typeof de=="boolean")return{};const{schemaId:U,uriResolver:ve}=this.opts,Se=B(de[U]||ae),Pe={"":Se},Me=d(ve,Se,!1),Ie={},Ve=new Set;return r(de,{allKeys:!0},(nt,ut,ht,_t)=>{if(_t===void 0)return;const Dt=Me+ut;let qt=Pe[_t];typeof nt[U]=="string"&&(qt=Lt.call(this,nt[U])),dr.call(this,nt.$anchor),dr.call(this,nt.$dynamicAnchor),Pe[ut]=qt;function Lt(Zt){const Cr=this.opts.uriResolver.resolve;if(Zt=B(qt?Cr(qt,Zt):Zt),Ve.has(Zt))throw Je(Zt);Ve.add(Zt);let yt=this.refs[Zt];return typeof yt=="string"&&(yt=this.refs[yt]),typeof yt=="object"?Ze(nt,yt.schema,Zt):Zt!==B(Dt)&&(Zt[0]==="#"?(Ze(nt,Ie[Zt],Zt),Ie[Zt]=nt):this.refs[Zt]=Dt),Zt}function dr(Zt){if(typeof Zt=="string"){if(!X.test(Zt))throw new Error(`invalid anchor "${Zt}"`);Lt.call(this,`#${Zt}`)}}}),Ie;function Ze(nt,ut,ht){if(ut!==void 0&&!e(nt,ut))throw Je(ht)}function Je(nt){return new Error(`reference "${nt}" resolves to more than one schema`)}}return R2.getSchemaRefs=ie,R2}var eAe;function JY(){if(eAe)return JR;eAe=1,Object.defineProperty(JR,"__esModule",{value:!0}),JR.getData=JR.KeywordCxt=JR.validateFunctionCode=void 0;const t=mTt(),e=l$(),r=xUe(),n=l$(),i=gTt(),a=yTt(),o=bTt(),s=kp(),d=b4(),b=KY(),L=pm(),B=ZY();function V(Vn){if(Me(Vn)&&(Ve(Vn),Pe(Vn))){ae(Vn);return}X(Vn,()=>(0,t.topBoolOrEmptySchema)(Vn))}JR.validateFunctionCode=V;function X({gen:Vn,validateName:jn,schema:Lr,schemaEnv:Yn,opts:On},Sn){On.code.es5?Vn.func(jn,(0,s._)`${d.default.data}, ${d.default.valCxt}`,Yn.$async,()=>{Vn.code((0,s._)`"use strict"; ${ve(Lr,On)}`),de(Vn,On),Vn.code(Sn)}):Vn.func(jn,(0,s._)`${d.default.data}, ${ie(On)}`,Yn.$async,()=>Vn.code(ve(Lr,On)).code(Sn))}function ie(Vn){return(0,s._)`{${d.default.instancePath}="", ${d.default.parentData}, ${d.default.parentDataProperty}, ${d.default.rootData}=${d.default.data}${Vn.dynamicRef?(0,s._)`, ${d.default.dynamicAnchors}={}`:s.nil}}={}`}function de(Vn,jn){Vn.if(d.default.valCxt,()=>{Vn.var(d.default.instancePath,(0,s._)`${d.default.valCxt}.${d.default.instancePath}`),Vn.var(d.default.parentData,(0,s._)`${d.default.valCxt}.${d.default.parentData}`),Vn.var(d.default.parentDataProperty,(0,s._)`${d.default.valCxt}.${d.default.parentDataProperty}`),Vn.var(d.default.rootData,(0,s._)`${d.default.valCxt}.${d.default.rootData}`),jn.dynamicRef&&Vn.var(d.default.dynamicAnchors,(0,s._)`${d.default.valCxt}.${d.default.dynamicAnchors}`)},()=>{Vn.var(d.default.instancePath,(0,s._)`""`),Vn.var(d.default.parentData,(0,s._)`undefined`),Vn.var(d.default.parentDataProperty,(0,s._)`undefined`),Vn.var(d.default.rootData,d.default.data),jn.dynamicRef&&Vn.var(d.default.dynamicAnchors,(0,s._)`{}`)})}function ae(Vn){const{schema:jn,opts:Lr,gen:Yn}=Vn;X(Vn,()=>{Lr.$comment&&jn.$comment&&_t(Vn),nt(Vn),Yn.let(d.default.vErrors,null),Yn.let(d.default.errors,0),Lr.unevaluated&&U(Vn),Ze(Vn),Dt(Vn)})}function U(Vn){const{gen:jn,validateName:Lr}=Vn;Vn.evaluated=jn.const("evaluated",(0,s._)`${Lr}.evaluated`),jn.if((0,s._)`${Vn.evaluated}.dynamicProps`,()=>jn.assign((0,s._)`${Vn.evaluated}.props`,(0,s._)`undefined`)),jn.if((0,s._)`${Vn.evaluated}.dynamicItems`,()=>jn.assign((0,s._)`${Vn.evaluated}.items`,(0,s._)`undefined`))}function ve(Vn,jn){const Lr=typeof Vn=="object"&&Vn[jn.schemaId];return Lr&&(jn.code.source||jn.code.process)?(0,s._)`/*# sourceURL=${Lr} */`:s.nil}function Se(Vn,jn){if(Me(Vn)&&(Ve(Vn),Pe(Vn))){Ie(Vn,jn);return}(0,t.boolOrEmptySchema)(Vn,jn)}function Pe({schema:Vn,self:jn}){if(typeof Vn=="boolean")return!Vn;for(const Lr in Vn)if(jn.RULES.all[Lr])return!0;return!1}function Me(Vn){return typeof Vn.schema!="boolean"}function Ie(Vn,jn){const{schema:Lr,gen:Yn,opts:On}=Vn;On.$comment&&Lr.$comment&&_t(Vn),ut(Vn),ht(Vn);const Sn=Yn.const("_errs",d.default.errors);Ze(Vn,Sn),Yn.var(jn,(0,s._)`${Sn} === ${d.default.errors}`)}function Ve(Vn){(0,L.checkUnknownRules)(Vn),Je(Vn)}function Ze(Vn,jn){if(Vn.opts.jtd)return Lt(Vn,[],!1,jn);const Lr=(0,e.getSchemaTypes)(Vn.schema),Yn=(0,e.coerceAndCheckDataType)(Vn,Lr);Lt(Vn,Lr,!Yn,jn)}function Je(Vn){const{schema:jn,errSchemaPath:Lr,opts:Yn,self:On}=Vn;jn.$ref&&Yn.ignoreKeywordsWithRef&&(0,L.schemaHasRulesButRef)(jn,On.RULES)&&On.logger.warn(`$ref: keywords ignored in schema at path "${Lr}"`)}function nt(Vn){const{schema:jn,opts:Lr}=Vn;jn.default!==void 0&&Lr.useDefaults&&Lr.strictSchema&&(0,L.checkStrictMode)(Vn,"default is ignored in the schema root")}function ut(Vn){const jn=Vn.schema[Vn.opts.schemaId];jn&&(Vn.baseId=(0,b.resolveUrl)(Vn.opts.uriResolver,Vn.baseId,jn))}function ht(Vn){if(Vn.schema.$async&&!Vn.schemaEnv.$async)throw new Error("async schema in sync schema")}function _t({gen:Vn,schemaEnv:jn,schema:Lr,errSchemaPath:Yn,opts:On}){const Sn=Lr.$comment;if(On.$comment===!0)Vn.code((0,s._)`${d.default.self}.logger.log(${Sn})`);else if(typeof On.$comment=="function"){const bn=(0,s.str)`${Yn}/$comment`,Mn=Vn.scopeValue("root",{ref:jn.root});Vn.code((0,s._)`${d.default.self}.opts.$comment(${Sn}, ${bn}, ${Mn}.schema)`)}}function Dt(Vn){const{gen:jn,schemaEnv:Lr,validateName:Yn,ValidationError:On,opts:Sn}=Vn;Lr.$async?jn.if((0,s._)`${d.default.errors} === 0`,()=>jn.return(d.default.data),()=>jn.throw((0,s._)`new ${On}(${d.default.vErrors})`)):(jn.assign((0,s._)`${Yn}.errors`,d.default.vErrors),Sn.unevaluated&&qt(Vn),jn.return((0,s._)`${d.default.errors} === 0`))}function qt({gen:Vn,evaluated:jn,props:Lr,items:Yn}){Lr instanceof s.Name&&Vn.assign((0,s._)`${jn}.props`,Lr),Yn instanceof s.Name&&Vn.assign((0,s._)`${jn}.items`,Yn)}function Lt(Vn,jn,Lr,Yn){const{gen:On,schema:Sn,data:bn,allErrors:Mn,opts:gi,self:Oi}=Vn,{RULES:Pa}=Oi;if(Sn.$ref&&(gi.ignoreKeywordsWithRef||!(0,L.schemaHasRulesButRef)(Sn,Pa))){On.block(()=>_n(Vn,"$ref",Pa.all.$ref.definition));return}gi.jtd||Zt(Vn,jn),On.block(()=>{for(const ti of Pa.rules)va(ti);va(Pa.post)});function va(ti){(0,r.shouldUseGroup)(Sn,ti)&&(ti.type?(On.if((0,n.checkDataType)(ti.type,bn,gi.strictNumbers)),dr(Vn,ti),jn.length===1&&jn[0]===ti.type&&Lr&&(On.else(),(0,n.reportTypeError)(Vn)),On.endIf()):dr(Vn,ti),Mn||On.if((0,s._)`${d.default.errors} === ${Yn||0}`))}}function dr(Vn,jn){const{gen:Lr,schema:Yn,opts:{useDefaults:On}}=Vn;On&&(0,i.assignDefaults)(Vn,jn.type),Lr.block(()=>{for(const Sn of jn.rules)(0,r.shouldUseRule)(Yn,Sn)&&_n(Vn,Sn.keyword,Sn.definition,jn.type)})}function Zt(Vn,jn){Vn.schemaEnv.meta||!Vn.opts.strictTypes||(Cr(Vn,jn),Vn.opts.allowUnionTypes||yt(Vn,jn),Vt(Vn,Vn.dataTypes))}function Cr(Vn,jn){if(jn.length){if(!Vn.dataTypes.length){Vn.dataTypes=jn;return}jn.forEach(Lr=>{sr(Vn.dataTypes,Lr)||Ar(Vn,`type "${Lr}" not allowed by context "${Vn.dataTypes.join(",")}"`)}),or(Vn,jn)}}function yt(Vn,jn){jn.length>1&&!(jn.length===2&&jn.includes("null"))&&Ar(Vn,"use allowUnionTypes to allow union type keyword")}function Vt(Vn,jn){const Lr=Vn.self.RULES.all;for(const Yn in Lr){const On=Lr[Yn];if(typeof On=="object"&&(0,r.shouldUseRule)(Vn.schema,On)){const{type:Sn}=On.definition;Sn.length&&!Sn.some(bn=>Er(jn,bn))&&Ar(Vn,`missing type "${Sn.join(",")}" for keyword "${Yn}"`)}}}function Er(Vn,jn){return Vn.includes(jn)||jn==="number"&&Vn.includes("integer")}function sr(Vn,jn){return Vn.includes(jn)||jn==="integer"&&Vn.includes("number")}function or(Vn,jn){const Lr=[];for(const Yn of Vn.dataTypes)sr(jn,Yn)?Lr.push(Yn):jn.includes("integer")&&Yn==="number"&&Lr.push("integer");Vn.dataTypes=Lr}function Ar(Vn,jn){const Lr=Vn.schemaEnv.baseId+Vn.errSchemaPath;jn+=` at "${Lr}" (strictTypes)`,(0,L.checkStrictMode)(Vn,jn,Vn.opts.strictTypes)}class Ir{constructor(jn,Lr,Yn){if((0,a.validateKeywordUsage)(jn,Lr,Yn),this.gen=jn.gen,this.allErrors=jn.allErrors,this.keyword=Yn,this.data=jn.data,this.schema=jn.schema[Yn],this.$data=Lr.$data&&jn.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,L.schemaRefOrVal)(jn,this.schema,Yn,this.$data),this.schemaType=Lr.schemaType,this.parentSchema=jn.schema,this.params={},this.it=jn,this.def=Lr,this.$data)this.schemaCode=jn.gen.const("vSchema",Jn(this.$data,jn));else if(this.schemaCode=this.schemaValue,!(0,a.validSchemaType)(this.schema,Lr.schemaType,Lr.allowUndefined))throw new Error(`${Yn} value must be ${JSON.stringify(Lr.schemaType)}`);("code"in Lr?Lr.trackErrors:Lr.errors!==!1)&&(this.errsCount=jn.gen.const("_errs",d.default.errors))}result(jn,Lr,Yn){this.failResult((0,s.not)(jn),Lr,Yn)}failResult(jn,Lr,Yn){this.gen.if(jn),Yn?Yn():this.error(),Lr?(this.gen.else(),Lr(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(jn,Lr){this.failResult((0,s.not)(jn),void 0,Lr)}fail(jn){if(jn===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(jn),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(jn){if(!this.$data)return this.fail(jn);const{schemaCode:Lr}=this;this.fail((0,s._)`${Lr} !== undefined && (${(0,s.or)(this.invalid$data(),jn)})`)}error(jn,Lr,Yn){if(Lr){this.setParams(Lr),this._error(jn,Yn),this.setParams({});return}this._error(jn,Yn)}_error(jn,Lr){(jn?B.reportExtraError:B.reportError)(this,this.def.error,Lr)}$dataError(){(0,B.reportError)(this,this.def.$dataError||B.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,B.resetErrorsCount)(this.gen,this.errsCount)}ok(jn){this.allErrors||this.gen.if(jn)}setParams(jn,Lr){Lr?Object.assign(this.params,jn):this.params=jn}block$data(jn,Lr,Yn=s.nil){this.gen.block(()=>{this.check$data(jn,Yn),Lr()})}check$data(jn=s.nil,Lr=s.nil){if(!this.$data)return;const{gen:Yn,schemaCode:On,schemaType:Sn,def:bn}=this;Yn.if((0,s.or)((0,s._)`${On} === undefined`,Lr)),jn!==s.nil&&Yn.assign(jn,!0),(Sn.length||bn.validateSchema)&&(Yn.elseIf(this.invalid$data()),this.$dataError(),jn!==s.nil&&Yn.assign(jn,!1)),Yn.else()}invalid$data(){const{gen:jn,schemaCode:Lr,schemaType:Yn,def:On,it:Sn}=this;return(0,s.or)(bn(),Mn());function bn(){if(Yn.length){if(!(Lr instanceof s.Name))throw new Error("ajv implementation error");const gi=Array.isArray(Yn)?Yn:[Yn];return(0,s._)`${(0,n.checkDataTypes)(gi,Lr,Sn.opts.strictNumbers,n.DataType.Wrong)}`}return s.nil}function Mn(){if(On.validateSchema){const gi=jn.scopeValue("validate$data",{ref:On.validateSchema});return(0,s._)`!${gi}(${Lr})`}return s.nil}}subschema(jn,Lr){const Yn=(0,o.getSubschema)(this.it,jn);(0,o.extendSubschemaData)(Yn,this.it,jn),(0,o.extendSubschemaMode)(Yn,jn);const On={...this.it,...Yn,items:void 0,props:void 0};return Se(On,Lr),On}mergeEvaluated(jn,Lr){const{it:Yn,gen:On}=this;Yn.opts.unevaluated&&(Yn.props!==!0&&jn.props!==void 0&&(Yn.props=L.mergeEvaluated.props(On,jn.props,Yn.props,Lr)),Yn.items!==!0&&jn.items!==void 0&&(Yn.items=L.mergeEvaluated.items(On,jn.items,Yn.items,Lr)))}mergeValidEvaluated(jn,Lr){const{it:Yn,gen:On}=this;if(Yn.opts.unevaluated&&(Yn.props!==!0||Yn.items!==!0))return On.if(Lr,()=>this.mergeEvaluated(jn,s.Name)),!0}}JR.KeywordCxt=Ir;function _n(Vn,jn,Lr,Yn){const On=new Ir(Vn,Lr,jn);"code"in Lr?Lr.code(On,Yn):On.$data&&Lr.validate?(0,a.funcKeywordCode)(On,Lr):"macro"in Lr?(0,a.macroKeywordCode)(On,Lr):(Lr.compile||Lr.validate)&&(0,a.funcKeywordCode)(On,Lr)}const Un=/^\/(?:[^~]|~0|~1)*$/,Qn=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Jn(Vn,{dataLevel:jn,dataNames:Lr,dataPathArr:Yn}){let On,Sn;if(Vn==="")return d.default.rootData;if(Vn[0]==="/"){if(!Un.test(Vn))throw new Error(`Invalid JSON-pointer: ${Vn}`);On=Vn,Sn=d.default.rootData}else{const Oi=Qn.exec(Vn);if(!Oi)throw new Error(`Invalid JSON-pointer: ${Vn}`);const Pa=+Oi[1];if(On=Oi[2],On==="#"){if(Pa>=jn)throw new Error(gi("property/index",Pa));return Yn[jn-Pa]}if(Pa>jn)throw new Error(gi("data",Pa));if(Sn=Lr[jn-Pa],!On)return Sn}let bn=Sn;const Mn=On.split("/");for(const Oi of Mn)Oi&&(Sn=(0,s._)`${Sn}${(0,s.getProperty)((0,L.unescapeJsonPointer)(Oi))}`,bn=(0,s._)`${bn} && ${Sn}`);return bn;function gi(Oi,Pa){return`Cannot access ${Oi} ${Pa} levels up, current level is ${jn}`}}return JR.getData=Jn,JR}var vj={},tAe;function Zme(){if(tAe)return vj;tAe=1,Object.defineProperty(vj,"__esModule",{value:!0});class t extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return vj.default=t,vj}var mj={},rAe;function QY(){if(rAe)return mj;rAe=1,Object.defineProperty(mj,"__esModule",{value:!0});const t=KY();class e extends Error{constructor(n,i,a,o){super(o||`can't resolve reference ${a} from id ${i}`),this.missingRef=(0,t.resolveUrl)(n,i,a),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(n,this.missingRef))}}return mj.default=e,mj}var qT={},nAe;function Kme(){if(nAe)return qT;nAe=1,Object.defineProperty(qT,"__esModule",{value:!0}),qT.resolveSchema=qT.getCompilingSchema=qT.resolveRef=qT.compileSchema=qT.SchemaEnv=void 0;const t=kp(),e=Zme(),r=b4(),n=KY(),i=pm(),a=JY();class o{constructor(U){var ve;this.refs={},this.dynamicAnchors={};let Se;typeof U.schema=="object"&&(Se=U.schema),this.schema=U.schema,this.schemaId=U.schemaId,this.root=U.root||this,this.baseId=(ve=U.baseId)!==null&&ve!==void 0?ve:(0,n.normalizeId)(Se?.[U.schemaId||"$id"]),this.schemaPath=U.schemaPath,this.localRefs=U.localRefs,this.meta=U.meta,this.$async=Se?.$async,this.refs={}}}qT.SchemaEnv=o;function s(ae){const U=L.call(this,ae);if(U)return U;const ve=(0,n.getFullPath)(this.opts.uriResolver,ae.root.baseId),{es5:Se,lines:Pe}=this.opts.code,{ownProperties:Me}=this.opts,Ie=new t.CodeGen(this.scope,{es5:Se,lines:Pe,ownProperties:Me});let Ve;ae.$async&&(Ve=Ie.scopeValue("Error",{ref:e.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));const Ze=Ie.scopeName("validate");ae.validateName=Ze;const Je={gen:Ie,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:Ie.scopeValue("schema",this.opts.code.source===!0?{ref:ae.schema,code:(0,t.stringify)(ae.schema)}:{ref:ae.schema}),validateName:Ze,ValidationError:Ve,schema:ae.schema,schemaEnv:ae,rootId:ve,baseId:ae.baseId||ve,schemaPath:t.nil,errSchemaPath:ae.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,t._)`""`,opts:this.opts,self:this};let nt;try{this._compilations.add(ae),(0,a.validateFunctionCode)(Je),Ie.optimize(this.opts.code.optimize);const ut=Ie.toString();nt=`${Ie.scopeRefs(r.default.scope)}return ${ut}`,this.opts.code.process&&(nt=this.opts.code.process(nt,ae));const _t=new Function(`${r.default.self}`,`${r.default.scope}`,nt)(this,this.scope.get());if(this.scope.value(Ze,{ref:_t}),_t.errors=null,_t.schema=ae.schema,_t.schemaEnv=ae,ae.$async&&(_t.$async=!0),this.opts.code.source===!0&&(_t.source={validateName:Ze,validateCode:ut,scopeValues:Ie._values}),this.opts.unevaluated){const{props:Dt,items:qt}=Je;_t.evaluated={props:Dt instanceof t.Name?void 0:Dt,items:qt instanceof t.Name?void 0:qt,dynamicProps:Dt instanceof t.Name,dynamicItems:qt instanceof t.Name},_t.source&&(_t.source.evaluated=(0,t.stringify)(_t.evaluated))}return ae.validate=_t,ae}catch(ut){throw delete ae.validate,delete ae.validateName,nt&&this.logger.error("Error compiling schema, function code:",nt),ut}finally{this._compilations.delete(ae)}}qT.compileSchema=s;function d(ae,U,ve){var Se;ve=(0,n.resolveUrl)(this.opts.uriResolver,U,ve);const Pe=ae.refs[ve];if(Pe)return Pe;let Me=V.call(this,ae,ve);if(Me===void 0){const Ie=(Se=ae.localRefs)===null||Se===void 0?void 0:Se[ve],{schemaId:Ve}=this.opts;Ie&&(Me=new o({schema:Ie,schemaId:Ve,root:ae,baseId:U}))}if(Me!==void 0)return ae.refs[ve]=b.call(this,Me)}qT.resolveRef=d;function b(ae){return(0,n.inlineRef)(ae.schema,this.opts.inlineRefs)?ae.schema:ae.validate?ae:s.call(this,ae)}function L(ae){for(const U of this._compilations)if(B(U,ae))return U}qT.getCompilingSchema=L;function B(ae,U){return ae.schema===U.schema&&ae.root===U.root&&ae.baseId===U.baseId}function V(ae,U){let ve;for(;typeof(ve=this.refs[U])=="string";)U=ve;return ve||this.schemas[U]||X.call(this,ae,U)}function X(ae,U){const ve=this.opts.uriResolver.parse(U),Se=(0,n._getFullPath)(this.opts.uriResolver,ve);let Pe=(0,n.getFullPath)(this.opts.uriResolver,ae.baseId,void 0);if(Object.keys(ae.schema).length>0&&Se===Pe)return de.call(this,ve,ae);const Me=(0,n.normalizeId)(Se),Ie=this.refs[Me]||this.schemas[Me];if(typeof Ie=="string"){const Ve=X.call(this,ae,Ie);return typeof Ve?.schema!="object"?void 0:de.call(this,ve,Ve)}if(typeof Ie?.schema=="object"){if(Ie.validate||s.call(this,Ie),Me===(0,n.normalizeId)(U)){const{schema:Ve}=Ie,{schemaId:Ze}=this.opts,Je=Ve[Ze];return Je&&(Pe=(0,n.resolveUrl)(this.opts.uriResolver,Pe,Je)),new o({schema:Ve,schemaId:Ze,root:ae,baseId:Pe})}return de.call(this,ve,Ie)}}qT.resolveSchema=X;const ie=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function de(ae,{baseId:U,schema:ve,root:Se}){var Pe;if(((Pe=ae.fragment)===null||Pe===void 0?void 0:Pe[0])!=="/")return;for(const Ve of ae.fragment.slice(1).split("/")){if(typeof ve=="boolean")return;const Ze=ve[(0,i.unescapeFragment)(Ve)];if(Ze===void 0)return;ve=Ze;const Je=typeof ve=="object"&&ve[this.opts.schemaId];!ie.has(Ve)&&Je&&(U=(0,n.resolveUrl)(this.opts.uriResolver,U,Je))}let Me;if(typeof ve!="boolean"&&ve.$ref&&!(0,i.schemaHasRulesButRef)(ve,this.RULES)){const Ve=(0,n.resolveUrl)(this.opts.uriResolver,U,ve.$ref);Me=X.call(this,Se,Ve)}const{schemaId:Ie}=this.opts;if(Me=Me||new o({schema:ve,schemaId:Ie,root:Se,baseId:U}),Me.schema!==Me.root.schema)return Me}return qT}const _Tt="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",wTt="Meta-schema for $data reference (JSON AnySchema extension proposal)",STt="object",TTt=["$data"],ETt={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},ATt=!1,CTt={$id:_Tt,description:wTt,type:STt,required:TTt,properties:ETt,additionalProperties:ATt};var gj={},N7={exports:{}},ire,iAe;function wUe(){if(iAe)return ire;iAe=1;const t=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),e=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function r(V){let X="",ie=0,de=0;for(de=0;de<V.length;de++)if(ie=V[de].charCodeAt(0),ie!==48){if(!(ie>=48&&ie<=57||ie>=65&&ie<=70||ie>=97&&ie<=102))return"";X+=V[de];break}for(de+=1;de<V.length;de++){if(ie=V[de].charCodeAt(0),!(ie>=48&&ie<=57||ie>=65&&ie<=70||ie>=97&&ie<=102))return"";X+=V[de]}return X}const n=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function i(V){return V.length=0,!0}function a(V,X,ie){if(V.length){const de=r(V);if(de!=="")X.push(de);else return ie.error=!0,!1;V.length=0}return!0}function o(V){let X=0;const ie={error:!1,address:"",zone:""},de=[],ae=[];let U=!1,ve=!1,Se=a;for(let Pe=0;Pe<V.length;Pe++){const Me=V[Pe];if(!(Me==="["||Me==="]"))if(Me===":"){if(U===!0&&(ve=!0),!Se(ae,de,ie))break;if(++X>7){ie.error=!0;break}Pe>0&&V[Pe-1]===":"&&(U=!0),de.push(":");continue}else if(Me==="%"){if(!Se(ae,de,ie))break;Se=i}else{ae.push(Me);continue}}return ae.length&&(Se===i?ie.zone=ae.join(""):ve?de.push(ae.join("")):de.push(r(ae))),ie.address=de.join(""),ie}function s(V){if(d(V,":")<2)return{host:V,isIPV6:!1};const X=o(V);if(X.error)return{host:V,isIPV6:!1};{let ie=X.address,de=X.address;return X.zone&&(ie+="%"+X.zone,de+="%25"+X.zone),{host:ie,isIPV6:!0,escapedHost:de}}}function d(V,X){let ie=0;for(let de=0;de<V.length;de++)V[de]===X&&ie++;return ie}function b(V){let X=V;const ie=[];let de=-1,ae=0;for(;ae=X.length;){if(ae===1){if(X===".")break;if(X==="/"){ie.push("/");break}else{ie.push(X);break}}else if(ae===2){if(X[0]==="."){if(X[1]===".")break;if(X[1]==="/"){X=X.slice(2);continue}}else if(X[0]==="/"&&(X[1]==="."||X[1]==="/")){ie.push("/");break}}else if(ae===3&&X==="/.."){ie.length!==0&&ie.pop(),ie.push("/");break}if(X[0]==="."){if(X[1]==="."){if(X[2]==="/"){X=X.slice(3);continue}}else if(X[1]==="/"){X=X.slice(2);continue}}else if(X[0]==="/"&&X[1]==="."){if(X[2]==="/"){X=X.slice(2);continue}else if(X[2]==="."&&X[3]==="/"){X=X.slice(3),ie.length!==0&&ie.pop();continue}}if((de=X.indexOf("/",1))===-1){ie.push(X);break}else ie.push(X.slice(0,de)),X=X.slice(de)}return ie.join("")}function L(V,X){const ie=X!==!0?escape:unescape;return V.scheme!==void 0&&(V.scheme=ie(V.scheme)),V.userinfo!==void 0&&(V.userinfo=ie(V.userinfo)),V.host!==void 0&&(V.host=ie(V.host)),V.path!==void 0&&(V.path=ie(V.path)),V.query!==void 0&&(V.query=ie(V.query)),V.fragment!==void 0&&(V.fragment=ie(V.fragment)),V}function B(V){const X=[];if(V.userinfo!==void 0&&(X.push(V.userinfo),X.push("@")),V.host!==void 0){let ie=unescape(V.host);if(!e(ie)){const de=s(ie);de.isIPV6===!0?ie=`[${de.escapedHost}]`:ie=V.host}X.push(ie)}return(typeof V.port=="number"||typeof V.port=="string")&&(X.push(":"),X.push(String(V.port))),X.length?X.join(""):void 0}return ire={nonSimpleDomain:n,recomposeAuthority:B,normalizeComponentEncoding:L,removeDotSegments:b,isIPv4:e,isUUID:t,normalizeIPv6:s,stringArrayToHexStripped:r},ire}var are,aAe;function MTt(){if(aAe)return are;aAe=1;const{isUUID:t}=wUe(),e=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,r=["http","https","ws","wss","urn","urn:uuid"];function n(Me){return r.indexOf(Me)!==-1}function i(Me){return Me.secure===!0?!0:Me.secure===!1?!1:Me.scheme?Me.scheme.length===3&&(Me.scheme[0]==="w"||Me.scheme[0]==="W")&&(Me.scheme[1]==="s"||Me.scheme[1]==="S")&&(Me.scheme[2]==="s"||Me.scheme[2]==="S"):!1}function a(Me){return Me.host||(Me.error=Me.error||"HTTP URIs must have a host."),Me}function o(Me){const Ie=String(Me.scheme).toLowerCase()==="https";return(Me.port===(Ie?443:80)||Me.port==="")&&(Me.port=void 0),Me.path||(Me.path="/"),Me}function s(Me){return Me.secure=i(Me),Me.resourceName=(Me.path||"/")+(Me.query?"?"+Me.query:""),Me.path=void 0,Me.query=void 0,Me}function d(Me){if((Me.port===(i(Me)?443:80)||Me.port==="")&&(Me.port=void 0),typeof Me.secure=="boolean"&&(Me.scheme=Me.secure?"wss":"ws",Me.secure=void 0),Me.resourceName){const[Ie,Ve]=Me.resourceName.split("?");Me.path=Ie&&Ie!=="/"?Ie:void 0,Me.query=Ve,Me.resourceName=void 0}return Me.fragment=void 0,Me}function b(Me,Ie){if(!Me.path)return Me.error="URN can not be parsed",Me;const Ve=Me.path.match(e);if(Ve){const Ze=Ie.scheme||Me.scheme||"urn";Me.nid=Ve[1].toLowerCase(),Me.nss=Ve[2];const Je=`${Ze}:${Ie.nid||Me.nid}`,nt=Pe(Je);Me.path=void 0,nt&&(Me=nt.parse(Me,Ie))}else Me.error=Me.error||"URN can not be parsed.";return Me}function L(Me,Ie){if(Me.nid===void 0)throw new Error("URN without nid cannot be serialized");const Ve=Ie.scheme||Me.scheme||"urn",Ze=Me.nid.toLowerCase(),Je=`${Ve}:${Ie.nid||Ze}`,nt=Pe(Je);nt&&(Me=nt.serialize(Me,Ie));const ut=Me,ht=Me.nss;return ut.path=`${Ze||Ie.nid}:${ht}`,Ie.skipEscape=!0,ut}function B(Me,Ie){const Ve=Me;return Ve.uuid=Ve.nss,Ve.nss=void 0,!Ie.tolerant&&(!Ve.uuid||!t(Ve.uuid))&&(Ve.error=Ve.error||"UUID is not valid."),Ve}function V(Me){const Ie=Me;return Ie.nss=(Me.uuid||"").toLowerCase(),Ie}const X={scheme:"http",domainHost:!0,parse:a,serialize:o},ie={scheme:"https",domainHost:X.domainHost,parse:a,serialize:o},de={scheme:"ws",domainHost:!0,parse:s,serialize:d},ae={scheme:"wss",domainHost:de.domainHost,parse:de.parse,serialize:de.serialize},Se={http:X,https:ie,ws:de,wss:ae,urn:{scheme:"urn",parse:b,serialize:L,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:B,serialize:V,skipNormalize:!0}};Object.setPrototypeOf(Se,null);function Pe(Me){return Me&&(Se[Me]||Se[Me.toLowerCase()])||void 0}return are={wsIsSecure:i,SCHEMES:Se,isValidSchemeName:n,getSchemeHandler:Pe},are}var oAe;function RTt(){if(oAe)return N7.exports;oAe=1;const{normalizeIPv6:t,removeDotSegments:e,recomposeAuthority:r,normalizeComponentEncoding:n,isIPv4:i,nonSimpleDomain:a}=wUe(),{SCHEMES:o,getSchemeHandler:s}=MTt();function d(ae,U){return typeof ae=="string"?ae=V(ie(ae,U),U):typeof ae=="object"&&(ae=ie(V(ae,U),U)),ae}function b(ae,U,ve){const Se=ve?Object.assign({scheme:"null"},ve):{scheme:"null"},Pe=L(ie(ae,Se),ie(U,Se),Se,!0);return Se.skipEscape=!0,V(Pe,Se)}function L(ae,U,ve,Se){const Pe={};return Se||(ae=ie(V(ae,ve),ve),U=ie(V(U,ve),ve)),ve=ve||{},!ve.tolerant&&U.scheme?(Pe.scheme=U.scheme,Pe.userinfo=U.userinfo,Pe.host=U.host,Pe.port=U.port,Pe.path=e(U.path||""),Pe.query=U.query):(U.userinfo!==void 0||U.host!==void 0||U.port!==void 0?(Pe.userinfo=U.userinfo,Pe.host=U.host,Pe.port=U.port,Pe.path=e(U.path||""),Pe.query=U.query):(U.path?(U.path[0]==="/"?Pe.path=e(U.path):((ae.userinfo!==void 0||ae.host!==void 0||ae.port!==void 0)&&!ae.path?Pe.path="/"+U.path:ae.path?Pe.path=ae.path.slice(0,ae.path.lastIndexOf("/")+1)+U.path:Pe.path=U.path,Pe.path=e(Pe.path)),Pe.query=U.query):(Pe.path=ae.path,U.query!==void 0?Pe.query=U.query:Pe.query=ae.query),Pe.userinfo=ae.userinfo,Pe.host=ae.host,Pe.port=ae.port),Pe.scheme=ae.scheme),Pe.fragment=U.fragment,Pe}function B(ae,U,ve){return typeof ae=="string"?(ae=unescape(ae),ae=V(n(ie(ae,ve),!0),{...ve,skipEscape:!0})):typeof ae=="object"&&(ae=V(n(ae,!0),{...ve,skipEscape:!0})),typeof U=="string"?(U=unescape(U),U=V(n(ie(U,ve),!0),{...ve,skipEscape:!0})):typeof U=="object"&&(U=V(n(U,!0),{...ve,skipEscape:!0})),ae.toLowerCase()===U.toLowerCase()}function V(ae,U){const ve={host:ae.host,scheme:ae.scheme,userinfo:ae.userinfo,port:ae.port,path:ae.path,query:ae.query,nid:ae.nid,nss:ae.nss,uuid:ae.uuid,fragment:ae.fragment,reference:ae.reference,resourceName:ae.resourceName,secure:ae.secure,error:""},Se=Object.assign({},U),Pe=[],Me=s(Se.scheme||ve.scheme);Me&&Me.serialize&&Me.serialize(ve,Se),ve.path!==void 0&&(Se.skipEscape?ve.path=unescape(ve.path):(ve.path=escape(ve.path),ve.scheme!==void 0&&(ve.path=ve.path.split("%3A").join(":")))),Se.reference!=="suffix"&&ve.scheme&&Pe.push(ve.scheme,":");const Ie=r(ve);if(Ie!==void 0&&(Se.reference!=="suffix"&&Pe.push("//"),Pe.push(Ie),ve.path&&ve.path[0]!=="/"&&Pe.push("/")),ve.path!==void 0){let Ve=ve.path;!Se.absolutePath&&(!Me||!Me.absolutePath)&&(Ve=e(Ve)),Ie===void 0&&Ve[0]==="/"&&Ve[1]==="/"&&(Ve="/%2F"+Ve.slice(2)),Pe.push(Ve)}return ve.query!==void 0&&Pe.push("?",ve.query),ve.fragment!==void 0&&Pe.push("#",ve.fragment),Pe.join("")}const X=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function ie(ae,U){const ve=Object.assign({},U),Se={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let Pe=!1;ve.reference==="suffix"&&(ve.scheme?ae=ve.scheme+":"+ae:ae="//"+ae);const Me=ae.match(X);if(Me){if(Se.scheme=Me[1],Se.userinfo=Me[3],Se.host=Me[4],Se.port=parseInt(Me[5],10),Se.path=Me[6]||"",Se.query=Me[7],Se.fragment=Me[8],isNaN(Se.port)&&(Se.port=Me[5]),Se.host)if(i(Se.host)===!1){const Ze=t(Se.host);Se.host=Ze.host.toLowerCase(),Pe=Ze.isIPV6}else Pe=!0;Se.scheme===void 0&&Se.userinfo===void 0&&Se.host===void 0&&Se.port===void 0&&Se.query===void 0&&!Se.path?Se.reference="same-document":Se.scheme===void 0?Se.reference="relative":Se.fragment===void 0?Se.reference="absolute":Se.reference="uri",ve.reference&&ve.reference!=="suffix"&&ve.reference!==Se.reference&&(Se.error=Se.error||"URI is not a "+ve.reference+" reference.");const Ie=s(ve.scheme||Se.scheme);if(!ve.unicodeSupport&&(!Ie||!Ie.unicodeSupport)&&Se.host&&(ve.domainHost||Ie&&Ie.domainHost)&&Pe===!1&&a(Se.host))try{Se.host=URL.domainToASCII(Se.host.toLowerCase())}catch(Ve){Se.error=Se.error||"Host's domain name can not be converted to ASCII: "+Ve}(!Ie||Ie&&!Ie.skipNormalize)&&(ae.indexOf("%")!==-1&&(Se.scheme!==void 0&&(Se.scheme=unescape(Se.scheme)),Se.host!==void 0&&(Se.host=unescape(Se.host))),Se.path&&(Se.path=escape(unescape(Se.path))),Se.fragment&&(Se.fragment=encodeURI(decodeURIComponent(Se.fragment)))),Ie&&Ie.parse&&Ie.parse(Se,ve)}else Se.error=Se.error||"URI can not be parsed.";return Se}const de={SCHEMES:o,normalize:d,resolve:b,resolveComponent:L,equal:B,serialize:V,parse:ie};return N7.exports=de,N7.exports.default=de,N7.exports.fastUri=de,N7.exports}var sAe;function kTt(){if(sAe)return gj;sAe=1,Object.defineProperty(gj,"__esModule",{value:!0});const t=RTt();return t.code='require("ajv/dist/runtime/uri").default',gj.default=t,gj}var lAe;function ITt(){return lAe||(lAe=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=JY();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var r=kp();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=Zme(),i=QY(),a=bUe(),o=Kme(),s=kp(),d=KY(),b=l$(),L=pm(),B=CTt,V=kTt(),X=(yt,Vt)=>new RegExp(yt,Vt);X.code="new RegExp";const ie=["removeAdditional","useDefaults","coerceTypes"],de=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),ae={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},U={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},ve=200;function Se(yt){var Vt,Er,sr,or,Ar,Ir,_n,Un,Qn,Jn,Vn,jn,Lr,Yn,On,Sn,bn,Mn,gi,Oi,Pa,va,ti,Tn,bi;const Wn=yt.strict,Ei=(Vt=yt.code)===null||Vt===void 0?void 0:Vt.optimize,Ki=Ei===!0||Ei===void 0?1:Ei||0,sa=(sr=(Er=yt.code)===null||Er===void 0?void 0:Er.regExp)!==null&&sr!==void 0?sr:X,xa=(or=yt.uriResolver)!==null&&or!==void 0?or:V.default;return{strictSchema:(Ir=(Ar=yt.strictSchema)!==null&&Ar!==void 0?Ar:Wn)!==null&&Ir!==void 0?Ir:!0,strictNumbers:(Un=(_n=yt.strictNumbers)!==null&&_n!==void 0?_n:Wn)!==null&&Un!==void 0?Un:!0,strictTypes:(Jn=(Qn=yt.strictTypes)!==null&&Qn!==void 0?Qn:Wn)!==null&&Jn!==void 0?Jn:"log",strictTuples:(jn=(Vn=yt.strictTuples)!==null&&Vn!==void 0?Vn:Wn)!==null&&jn!==void 0?jn:"log",strictRequired:(Yn=(Lr=yt.strictRequired)!==null&&Lr!==void 0?Lr:Wn)!==null&&Yn!==void 0?Yn:!1,code:yt.code?{...yt.code,optimize:Ki,regExp:sa}:{optimize:Ki,regExp:sa},loopRequired:(On=yt.loopRequired)!==null&&On!==void 0?On:ve,loopEnum:(Sn=yt.loopEnum)!==null&&Sn!==void 0?Sn:ve,meta:(bn=yt.meta)!==null&&bn!==void 0?bn:!0,messages:(Mn=yt.messages)!==null&&Mn!==void 0?Mn:!0,inlineRefs:(gi=yt.inlineRefs)!==null&&gi!==void 0?gi:!0,schemaId:(Oi=yt.schemaId)!==null&&Oi!==void 0?Oi:"$id",addUsedSchema:(Pa=yt.addUsedSchema)!==null&&Pa!==void 0?Pa:!0,validateSchema:(va=yt.validateSchema)!==null&&va!==void 0?va:!0,validateFormats:(ti=yt.validateFormats)!==null&&ti!==void 0?ti:!0,unicodeRegExp:(Tn=yt.unicodeRegExp)!==null&&Tn!==void 0?Tn:!0,int32range:(bi=yt.int32range)!==null&&bi!==void 0?bi:!0,uriResolver:xa}}class Pe{constructor(Vt={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,Vt=this.opts={...Vt,...Se(Vt)};const{es5:Er,lines:sr}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:de,es5:Er,lines:sr}),this.logger=ht(Vt.logger);const or=Vt.validateFormats;Vt.validateFormats=!1,this.RULES=(0,a.getRules)(),Me.call(this,ae,Vt,"NOT SUPPORTED"),Me.call(this,U,Vt,"DEPRECATED","warn"),this._metaOpts=nt.call(this),Vt.formats&&Ze.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),Vt.keywords&&Je.call(this,Vt.keywords),typeof Vt.meta=="object"&&this.addMetaSchema(Vt.meta),Ve.call(this),Vt.validateFormats=or}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:Vt,meta:Er,schemaId:sr}=this.opts;let or=B;sr==="id"&&(or={...B},or.id=or.$id,delete or.$id),Er&&Vt&&this.addMetaSchema(or,or[sr],!1)}defaultMeta(){const{meta:Vt,schemaId:Er}=this.opts;return this.opts.defaultMeta=typeof Vt=="object"?Vt[Er]||Vt:void 0}validate(Vt,Er){let sr;if(typeof Vt=="string"){if(sr=this.getSchema(Vt),!sr)throw new Error(`no schema with key or ref "${Vt}"`)}else sr=this.compile(Vt);const or=sr(Er);return"$async"in sr||(this.errors=sr.errors),or}compile(Vt,Er){const sr=this._addSchema(Vt,Er);return sr.validate||this._compileSchemaEnv(sr)}compileAsync(Vt,Er){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:sr}=this.opts;return or.call(this,Vt,Er);async function or(Jn,Vn){await Ar.call(this,Jn.$schema);const jn=this._addSchema(Jn,Vn);return jn.validate||Ir.call(this,jn)}async function Ar(Jn){Jn&&!this.getSchema(Jn)&&await or.call(this,{$ref:Jn},!0)}async function Ir(Jn){try{return this._compileSchemaEnv(Jn)}catch(Vn){if(!(Vn instanceof i.default))throw Vn;return _n.call(this,Vn),await Un.call(this,Vn.missingSchema),Ir.call(this,Jn)}}function _n({missingSchema:Jn,missingRef:Vn}){if(this.refs[Jn])throw new Error(`AnySchema ${Jn} is loaded but ${Vn} cannot be resolved`)}async function Un(Jn){const Vn=await Qn.call(this,Jn);this.refs[Jn]||await Ar.call(this,Vn.$schema),this.refs[Jn]||this.addSchema(Vn,Jn,Er)}async function Qn(Jn){const Vn=this._loading[Jn];if(Vn)return Vn;try{return await(this._loading[Jn]=sr(Jn))}finally{delete this._loading[Jn]}}}addSchema(Vt,Er,sr,or=this.opts.validateSchema){if(Array.isArray(Vt)){for(const Ir of Vt)this.addSchema(Ir,void 0,sr,or);return this}let Ar;if(typeof Vt=="object"){const{schemaId:Ir}=this.opts;if(Ar=Vt[Ir],Ar!==void 0&&typeof Ar!="string")throw new Error(`schema ${Ir} must be string`)}return Er=(0,d.normalizeId)(Er||Ar),this._checkUnique(Er),this.schemas[Er]=this._addSchema(Vt,sr,Er,or,!0),this}addMetaSchema(Vt,Er,sr=this.opts.validateSchema){return this.addSchema(Vt,Er,!0,sr),this}validateSchema(Vt,Er){if(typeof Vt=="boolean")return!0;let sr;if(sr=Vt.$schema,sr!==void 0&&typeof sr!="string")throw new Error("$schema must be a string");if(sr=sr||this.opts.defaultMeta||this.defaultMeta(),!sr)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const or=this.validate(sr,Vt);if(!or&&Er){const Ar="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(Ar);else throw new Error(Ar)}return or}getSchema(Vt){let Er;for(;typeof(Er=Ie.call(this,Vt))=="string";)Vt=Er;if(Er===void 0){const{schemaId:sr}=this.opts,or=new o.SchemaEnv({schema:{},schemaId:sr});if(Er=o.resolveSchema.call(this,or,Vt),!Er)return;this.refs[Vt]=Er}return Er.validate||this._compileSchemaEnv(Er)}removeSchema(Vt){if(Vt instanceof RegExp)return this._removeAllSchemas(this.schemas,Vt),this._removeAllSchemas(this.refs,Vt),this;switch(typeof Vt){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const Er=Ie.call(this,Vt);return typeof Er=="object"&&this._cache.delete(Er.schema),delete this.schemas[Vt],delete this.refs[Vt],this}case"object":{const Er=Vt;this._cache.delete(Er);let sr=Vt[this.opts.schemaId];return sr&&(sr=(0,d.normalizeId)(sr),delete this.schemas[sr],delete this.refs[sr]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(Vt){for(const Er of Vt)this.addKeyword(Er);return this}addKeyword(Vt,Er){let sr;if(typeof Vt=="string")sr=Vt,typeof Er=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),Er.keyword=sr);else if(typeof Vt=="object"&&Er===void 0){if(Er=Vt,sr=Er.keyword,Array.isArray(sr)&&!sr.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Dt.call(this,sr,Er),!Er)return(0,L.eachItem)(sr,Ar=>qt.call(this,Ar)),this;dr.call(this,Er);const or={...Er,type:(0,b.getJSONTypes)(Er.type),schemaType:(0,b.getJSONTypes)(Er.schemaType)};return(0,L.eachItem)(sr,or.type.length===0?Ar=>qt.call(this,Ar,or):Ar=>or.type.forEach(Ir=>qt.call(this,Ar,or,Ir))),this}getKeyword(Vt){const Er=this.RULES.all[Vt];return typeof Er=="object"?Er.definition:!!Er}removeKeyword(Vt){const{RULES:Er}=this;delete Er.keywords[Vt],delete Er.all[Vt];for(const sr of Er.rules){const or=sr.rules.findIndex(Ar=>Ar.keyword===Vt);or>=0&&sr.rules.splice(or,1)}return this}addFormat(Vt,Er){return typeof Er=="string"&&(Er=new RegExp(Er)),this.formats[Vt]=Er,this}errorsText(Vt=this.errors,{separator:Er=", ",dataVar:sr="data"}={}){return!Vt||Vt.length===0?"No errors":Vt.map(or=>`${sr}${or.instancePath} ${or.message}`).reduce((or,Ar)=>or+Er+Ar)}$dataMetaSchema(Vt,Er){const sr=this.RULES.all;Vt=JSON.parse(JSON.stringify(Vt));for(const or of Er){const Ar=or.split("/").slice(1);let Ir=Vt;for(const _n of Ar)Ir=Ir[_n];for(const _n in sr){const Un=sr[_n];if(typeof Un!="object")continue;const{$data:Qn}=Un.definition,Jn=Ir[_n];Qn&&Jn&&(Ir[_n]=Cr(Jn))}}return Vt}_removeAllSchemas(Vt,Er){for(const sr in Vt){const or=Vt[sr];(!Er||Er.test(sr))&&(typeof or=="string"?delete Vt[sr]:or&&!or.meta&&(this._cache.delete(or.schema),delete Vt[sr]))}}_addSchema(Vt,Er,sr,or=this.opts.validateSchema,Ar=this.opts.addUsedSchema){let Ir;const{schemaId:_n}=this.opts;if(typeof Vt=="object")Ir=Vt[_n];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof Vt!="boolean")throw new Error("schema must be object or boolean")}let Un=this._cache.get(Vt);if(Un!==void 0)return Un;sr=(0,d.normalizeId)(Ir||sr);const Qn=d.getSchemaRefs.call(this,Vt,sr);return Un=new o.SchemaEnv({schema:Vt,schemaId:_n,meta:Er,baseId:sr,localRefs:Qn}),this._cache.set(Un.schema,Un),Ar&&!sr.startsWith("#")&&(sr&&this._checkUnique(sr),this.refs[sr]=Un),or&&this.validateSchema(Vt,!0),Un}_checkUnique(Vt){if(this.schemas[Vt]||this.refs[Vt])throw new Error(`schema with key or id "${Vt}" already exists`)}_compileSchemaEnv(Vt){if(Vt.meta?this._compileMetaSchema(Vt):o.compileSchema.call(this,Vt),!Vt.validate)throw new Error("ajv implementation error");return Vt.validate}_compileMetaSchema(Vt){const Er=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,Vt)}finally{this.opts=Er}}}Pe.ValidationError=n.default,Pe.MissingRefError=i.default,t.default=Pe;function Me(yt,Vt,Er,sr="error"){for(const or in yt){const Ar=or;Ar in Vt&&this.logger[sr](`${Er}: option ${or}. ${yt[Ar]}`)}}function Ie(yt){return yt=(0,d.normalizeId)(yt),this.schemas[yt]||this.refs[yt]}function Ve(){const yt=this.opts.schemas;if(yt)if(Array.isArray(yt))this.addSchema(yt);else for(const Vt in yt)this.addSchema(yt[Vt],Vt)}function Ze(){for(const yt in this.opts.formats){const Vt=this.opts.formats[yt];Vt&&this.addFormat(yt,Vt)}}function Je(yt){if(Array.isArray(yt)){this.addVocabulary(yt);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const Vt in yt){const Er=yt[Vt];Er.keyword||(Er.keyword=Vt),this.addKeyword(Er)}}function nt(){const yt={...this.opts};for(const Vt of ie)delete yt[Vt];return yt}const ut={log(){},warn(){},error(){}};function ht(yt){if(yt===!1)return ut;if(yt===void 0)return console;if(yt.log&&yt.warn&&yt.error)return yt;throw new Error("logger must implement log, warn and error methods")}const _t=/^[a-z_$][a-z0-9_$:-]*$/i;function Dt(yt,Vt){const{RULES:Er}=this;if((0,L.eachItem)(yt,sr=>{if(Er.keywords[sr])throw new Error(`Keyword ${sr} is already defined`);if(!_t.test(sr))throw new Error(`Keyword ${sr} has invalid name`)}),!!Vt&&Vt.$data&&!("code"in Vt||"validate"in Vt))throw new Error('$data keyword must have "code" or "validate" function')}function qt(yt,Vt,Er){var sr;const or=Vt?.post;if(Er&&or)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:Ar}=this;let Ir=or?Ar.post:Ar.rules.find(({type:Un})=>Un===Er);if(Ir||(Ir={type:Er,rules:[]},Ar.rules.push(Ir)),Ar.keywords[yt]=!0,!Vt)return;const _n={keyword:yt,definition:{...Vt,type:(0,b.getJSONTypes)(Vt.type),schemaType:(0,b.getJSONTypes)(Vt.schemaType)}};Vt.before?Lt.call(this,Ir,_n,Vt.before):Ir.rules.push(_n),Ar.all[yt]=_n,(sr=Vt.implements)===null||sr===void 0||sr.forEach(Un=>this.addKeyword(Un))}function Lt(yt,Vt,Er){const sr=yt.rules.findIndex(or=>or.keyword===Er);sr>=0?yt.rules.splice(sr,0,Vt):(yt.rules.push(Vt),this.logger.warn(`rule ${Er} is not defined`))}function dr(yt){let{metaSchema:Vt}=yt;Vt!==void 0&&(yt.$data&&this.opts.$data&&(Vt=Cr(Vt)),yt.validateSchema=this.compile(Vt,!0))}const Zt={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Cr(yt){return{anyOf:[yt,Zt]}}})(Kte)),Kte}var yj={},bj={},xj={},uAe;function PTt(){if(uAe)return xj;uAe=1,Object.defineProperty(xj,"__esModule",{value:!0});const t={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return xj.default=t,xj}var aP={},cAe;function DTt(){if(cAe)return aP;cAe=1,Object.defineProperty(aP,"__esModule",{value:!0}),aP.callRef=aP.getValidate=void 0;const t=QY(),e=rM(),r=kp(),n=b4(),i=Kme(),a=pm(),o={keyword:"$ref",schemaType:"string",code(b){const{gen:L,schema:B,it:V}=b,{baseId:X,schemaEnv:ie,validateName:de,opts:ae,self:U}=V,{root:ve}=ie;if((B==="#"||B==="#/")&&X===ve.baseId)return Pe();const Se=i.resolveRef.call(U,ve,X,B);if(Se===void 0)throw new t.default(V.opts.uriResolver,X,B);if(Se instanceof i.SchemaEnv)return Me(Se);return Ie(Se);function Pe(){if(ie===ve)return d(b,de,ie,ie.$async);const Ve=L.scopeValue("root",{ref:ve});return d(b,(0,r._)`${Ve}.validate`,ve,ve.$async)}function Me(Ve){const Ze=s(b,Ve);d(b,Ze,Ve,Ve.$async)}function Ie(Ve){const Ze=L.scopeValue("schema",ae.code.source===!0?{ref:Ve,code:(0,r.stringify)(Ve)}:{ref:Ve}),Je=L.name("valid"),nt=b.subschema({schema:Ve,dataTypes:[],schemaPath:r.nil,topSchemaRef:Ze,errSchemaPath:B},Je);b.mergeEvaluated(nt),b.ok(Je)}}};function s(b,L){const{gen:B}=b;return L.validate?B.scopeValue("validate",{ref:L.validate}):(0,r._)`${B.scopeValue("wrapper",{ref:L})}.validate`}aP.getValidate=s;function d(b,L,B,V){const{gen:X,it:ie}=b,{allErrors:de,schemaEnv:ae,opts:U}=ie,ve=U.passContext?n.default.this:r.nil;V?Se():Pe();function Se(){if(!ae.$async)throw new Error("async schema referenced by sync schema");const Ve=X.let("valid");X.try(()=>{X.code((0,r._)`await ${(0,e.callValidateCode)(b,L,ve)}`),Ie(L),de||X.assign(Ve,!0)},Ze=>{X.if((0,r._)`!(${Ze} instanceof ${ie.ValidationError})`,()=>X.throw(Ze)),Me(Ze),de||X.assign(Ve,!1)}),b.ok(Ve)}function Pe(){b.result((0,e.callValidateCode)(b,L,ve),()=>Ie(L),()=>Me(L))}function Me(Ve){const Ze=(0,r._)`${Ve}.errors`;X.assign(n.default.vErrors,(0,r._)`${n.default.vErrors} === null ? ${Ze} : ${n.default.vErrors}.concat(${Ze})`),X.assign(n.default.errors,(0,r._)`${n.default.vErrors}.length`)}function Ie(Ve){var Ze;if(!ie.opts.unevaluated)return;const Je=(Ze=B?.validate)===null||Ze===void 0?void 0:Ze.evaluated;if(ie.props!==!0)if(Je&&!Je.dynamicProps)Je.props!==void 0&&(ie.props=a.mergeEvaluated.props(X,Je.props,ie.props));else{const nt=X.var("props",(0,r._)`${Ve}.evaluated.props`);ie.props=a.mergeEvaluated.props(X,nt,ie.props,r.Name)}if(ie.items!==!0)if(Je&&!Je.dynamicItems)Je.items!==void 0&&(ie.items=a.mergeEvaluated.items(X,Je.items,ie.items));else{const nt=X.var("items",(0,r._)`${Ve}.evaluated.items`);ie.items=a.mergeEvaluated.items(X,nt,ie.items,r.Name)}}}return aP.callRef=d,aP.default=o,aP}var fAe;function LTt(){if(fAe)return bj;fAe=1,Object.defineProperty(bj,"__esModule",{value:!0});const t=PTt(),e=DTt(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",t.default,e.default];return bj.default=r,bj}var _j={},wj={},dAe;function OTt(){if(dAe)return wj;dAe=1,Object.defineProperty(wj,"__esModule",{value:!0});const t=kp(),e=t.operators,r={maximum:{okStr:"<=",ok:e.LTE,fail:e.GT},minimum:{okStr:">=",ok:e.GTE,fail:e.LT},exclusiveMaximum:{okStr:"<",ok:e.LT,fail:e.GTE},exclusiveMinimum:{okStr:">",ok:e.GT,fail:e.LTE}},n={message:({keyword:a,schemaCode:o})=>(0,t.str)`must be ${r[a].okStr} ${o}`,params:({keyword:a,schemaCode:o})=>(0,t._)`{comparison: ${r[a].okStr}, limit: ${o}}`},i={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(a){const{keyword:o,data:s,schemaCode:d}=a;a.fail$data((0,t._)`${s} ${r[o].fail} ${d} || isNaN(${s})`)}};return wj.default=i,wj}var Sj={},hAe;function NTt(){if(hAe)return Sj;hAe=1,Object.defineProperty(Sj,"__esModule",{value:!0});const t=kp(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:n})=>(0,t.str)`must be multiple of ${n}`,params:({schemaCode:n})=>(0,t._)`{multipleOf: ${n}}`},code(n){const{gen:i,data:a,schemaCode:o,it:s}=n,d=s.opts.multipleOfPrecision,b=i.let("res"),L=d?(0,t._)`Math.abs(Math.round(${b}) - ${b}) > 1e-${d}`:(0,t._)`${b} !== parseInt(${b})`;n.fail$data((0,t._)`(${o} === 0 || (${b} = ${a}/${o}, ${L}))`)}};return Sj.default=r,Sj}var Tj={},Ej={},pAe;function FTt(){if(pAe)return Ej;pAe=1,Object.defineProperty(Ej,"__esModule",{value:!0});function t(e){const r=e.length;let n=0,i=0,a;for(;i<r;)n++,a=e.charCodeAt(i++),a>=55296&&a<=56319&&i<r&&(a=e.charCodeAt(i),(a&64512)===56320&&i++);return n}return Ej.default=t,t.code='require("ajv/dist/runtime/ucs2length").default',Ej}var vAe;function zTt(){if(vAe)return Tj;vAe=1,Object.defineProperty(Tj,"__esModule",{value:!0});const t=kp(),e=pm(),r=FTt(),i={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:a,schemaCode:o}){const s=a==="maxLength"?"more":"fewer";return(0,t.str)`must NOT have ${s} than ${o} characters`},params:({schemaCode:a})=>(0,t._)`{limit: ${a}}`},code(a){const{keyword:o,data:s,schemaCode:d,it:b}=a,L=o==="maxLength"?t.operators.GT:t.operators.LT,B=b.opts.unicode===!1?(0,t._)`${s}.length`:(0,t._)`${(0,e.useFunc)(a.gen,r.default)}(${s})`;a.fail$data((0,t._)`${B} ${L} ${d}`)}};return Tj.default=i,Tj}var Aj={},mAe;function BTt(){if(mAe)return Aj;mAe=1,Object.defineProperty(Aj,"__esModule",{value:!0});const t=rM(),e=kp(),n={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,e.str)`must match pattern "${i}"`,params:({schemaCode:i})=>(0,e._)`{pattern: ${i}}`},code(i){const{data:a,$data:o,schema:s,schemaCode:d,it:b}=i,L=b.opts.unicodeRegExp?"u":"",B=o?(0,e._)`(new RegExp(${d}, ${L}))`:(0,t.usePattern)(i,s);i.fail$data((0,e._)`!${B}.test(${a})`)}};return Aj.default=n,Aj}var Cj={},gAe;function UTt(){if(gAe)return Cj;gAe=1,Object.defineProperty(Cj,"__esModule",{value:!0});const t=kp(),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:i}){const a=n==="maxProperties"?"more":"fewer";return(0,t.str)`must NOT have ${a} than ${i} properties`},params:({schemaCode:n})=>(0,t._)`{limit: ${n}}`},code(n){const{keyword:i,data:a,schemaCode:o}=n,s=i==="maxProperties"?t.operators.GT:t.operators.LT;n.fail$data((0,t._)`Object.keys(${a}).length ${s} ${o}`)}};return Cj.default=r,Cj}var Mj={},yAe;function HTt(){if(yAe)return Mj;yAe=1,Object.defineProperty(Mj,"__esModule",{value:!0});const t=rM(),e=kp(),r=pm(),i={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:a}})=>(0,e.str)`must have required property '${a}'`,params:({params:{missingProperty:a}})=>(0,e._)`{missingProperty: ${a}}`},code(a){const{gen:o,schema:s,schemaCode:d,data:b,$data:L,it:B}=a,{opts:V}=B;if(!L&&s.length===0)return;const X=s.length>=V.loopRequired;if(B.allErrors?ie():de(),V.strictRequired){const ve=a.parentSchema.properties,{definedProperties:Se}=a.it;for(const Pe of s)if(ve?.[Pe]===void 0&&!Se.has(Pe)){const Me=B.schemaEnv.baseId+B.errSchemaPath,Ie=`required property "${Pe}" is not defined at "${Me}" (strictRequired)`;(0,r.checkStrictMode)(B,Ie,B.opts.strictRequired)}}function ie(){if(X||L)a.block$data(e.nil,ae);else for(const ve of s)(0,t.checkReportMissingProp)(a,ve)}function de(){const ve=o.let("missing");if(X||L){const Se=o.let("valid",!0);a.block$data(Se,()=>U(ve,Se)),a.ok(Se)}else o.if((0,t.checkMissingProp)(a,s,ve)),(0,t.reportMissingProp)(a,ve),o.else()}function ae(){o.forOf("prop",d,ve=>{a.setParams({missingProperty:ve}),o.if((0,t.noPropertyInData)(o,b,ve,V.ownProperties),()=>a.error())})}function U(ve,Se){a.setParams({missingProperty:ve}),o.forOf(ve,d,()=>{o.assign(Se,(0,t.propertyInData)(o,b,ve,V.ownProperties)),o.if((0,e.not)(Se),()=>{a.error(),o.break()})},e.nil)}}};return Mj.default=i,Mj}var Rj={},bAe;function jTt(){if(bAe)return Rj;bAe=1,Object.defineProperty(Rj,"__esModule",{value:!0});const t=kp(),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:i}){const a=n==="maxItems"?"more":"fewer";return(0,t.str)`must NOT have ${a} than ${i} items`},params:({schemaCode:n})=>(0,t._)`{limit: ${n}}`},code(n){const{keyword:i,data:a,schemaCode:o}=n,s=i==="maxItems"?t.operators.GT:t.operators.LT;n.fail$data((0,t._)`${a}.length ${s} ${o}`)}};return Rj.default=r,Rj}var kj={},Ij={},xAe;function Jme(){if(xAe)return Ij;xAe=1,Object.defineProperty(Ij,"__esModule",{value:!0});const t=_Ue();return t.code='require("ajv/dist/runtime/equal").default',Ij.default=t,Ij}var _Ae;function VTt(){if(_Ae)return kj;_Ae=1,Object.defineProperty(kj,"__esModule",{value:!0});const t=l$(),e=kp(),r=pm(),n=Jme(),a={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:o,j:s}})=>(0,e.str)`must NOT have duplicate items (items ## ${s} and ${o} are identical)`,params:({params:{i:o,j:s}})=>(0,e._)`{i: ${o}, j: ${s}}`},code(o){const{gen:s,data:d,$data:b,schema:L,parentSchema:B,schemaCode:V,it:X}=o;if(!b&&!L)return;const ie=s.let("valid"),de=B.items?(0,t.getSchemaTypes)(B.items):[];o.block$data(ie,ae,(0,e._)`${V} === false`),o.ok(ie);function ae(){const Pe=s.let("i",(0,e._)`${d}.length`),Me=s.let("j");o.setParams({i:Pe,j:Me}),s.assign(ie,!0),s.if((0,e._)`${Pe} > 1`,()=>(U()?ve:Se)(Pe,Me))}function U(){return de.length>0&&!de.some(Pe=>Pe==="object"||Pe==="array")}function ve(Pe,Me){const Ie=s.name("item"),Ve=(0,t.checkDataTypes)(de,Ie,X.opts.strictNumbers,t.DataType.Wrong),Ze=s.const("indices",(0,e._)`{}`);s.for((0,e._)`;${Pe}--;`,()=>{s.let(Ie,(0,e._)`${d}[${Pe}]`),s.if(Ve,(0,e._)`continue`),de.length>1&&s.if((0,e._)`typeof ${Ie} == "string"`,(0,e._)`${Ie} += "_"`),s.if((0,e._)`typeof ${Ze}[${Ie}] == "number"`,()=>{s.assign(Me,(0,e._)`${Ze}[${Ie}]`),o.error(),s.assign(ie,!1).break()}).code((0,e._)`${Ze}[${Ie}] = ${Pe}`)})}function Se(Pe,Me){const Ie=(0,r.useFunc)(s,n.default),Ve=s.name("outer");s.label(Ve).for((0,e._)`;${Pe}--;`,()=>s.for((0,e._)`${Me} = ${Pe}; ${Me}--;`,()=>s.if((0,e._)`${Ie}(${d}[${Pe}], ${d}[${Me}])`,()=>{o.error(),s.assign(ie,!1).break(Ve)})))}}};return kj.default=a,kj}var Pj={},wAe;function qTt(){if(wAe)return Pj;wAe=1,Object.defineProperty(Pj,"__esModule",{value:!0});const t=kp(),e=pm(),r=Jme(),i={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:a})=>(0,t._)`{allowedValue: ${a}}`},code(a){const{gen:o,data:s,$data:d,schemaCode:b,schema:L}=a;d||L&&typeof L=="object"?a.fail$data((0,t._)`!${(0,e.useFunc)(o,r.default)}(${s}, ${b})`):a.fail((0,t._)`${L} !== ${s}`)}};return Pj.default=i,Pj}var Dj={},SAe;function GTt(){if(SAe)return Dj;SAe=1,Object.defineProperty(Dj,"__esModule",{value:!0});const t=kp(),e=pm(),r=Jme(),i={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:a})=>(0,t._)`{allowedValues: ${a}}`},code(a){const{gen:o,data:s,$data:d,schema:b,schemaCode:L,it:B}=a;if(!d&&b.length===0)throw new Error("enum must have non-empty array");const V=b.length>=B.opts.loopEnum;let X;const ie=()=>X??(X=(0,e.useFunc)(o,r.default));let de;if(V||d)de=o.let("valid"),a.block$data(de,ae);else{if(!Array.isArray(b))throw new Error("ajv implementation error");const ve=o.const("vSchema",L);de=(0,t.or)(...b.map((Se,Pe)=>U(ve,Pe)))}a.pass(de);function ae(){o.assign(de,!1),o.forOf("v",L,ve=>o.if((0,t._)`${ie()}(${s}, ${ve})`,()=>o.assign(de,!0).break()))}function U(ve,Se){const Pe=b[Se];return typeof Pe=="object"&&Pe!==null?(0,t._)`${ie()}(${s}, ${ve}[${Se}])`:(0,t._)`${s} === ${Pe}`}}};return Dj.default=i,Dj}var TAe;function $Tt(){if(TAe)return _j;TAe=1,Object.defineProperty(_j,"__esModule",{value:!0});const t=OTt(),e=NTt(),r=zTt(),n=BTt(),i=UTt(),a=HTt(),o=jTt(),s=VTt(),d=qTt(),b=GTt(),L=[t.default,e.default,r.default,n.default,i.default,a.default,o.default,s.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},d.default,b.default];return _j.default=L,_j}var Lj={},mO={},EAe;function SUe(){if(EAe)return mO;EAe=1,Object.defineProperty(mO,"__esModule",{value:!0}),mO.validateAdditionalItems=void 0;const t=kp(),e=pm(),n={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:a}})=>(0,t.str)`must NOT have more than ${a} items`,params:({params:{len:a}})=>(0,t._)`{limit: ${a}}`},code(a){const{parentSchema:o,it:s}=a,{items:d}=o;if(!Array.isArray(d)){(0,e.checkStrictMode)(s,'"additionalItems" is ignored when "items" is not an array of schemas');return}i(a,d)}};function i(a,o){const{gen:s,schema:d,data:b,keyword:L,it:B}=a;B.items=!0;const V=s.const("len",(0,t._)`${b}.length`);if(d===!1)a.setParams({len:o.length}),a.pass((0,t._)`${V} <= ${o.length}`);else if(typeof d=="object"&&!(0,e.alwaysValidSchema)(B,d)){const ie=s.var("valid",(0,t._)`${V} <= ${o.length}`);s.if((0,t.not)(ie),()=>X(ie)),a.ok(ie)}function X(ie){s.forRange("i",o.length,V,de=>{a.subschema({keyword:L,dataProp:de,dataPropType:e.Type.Num},ie),B.allErrors||s.if((0,t.not)(ie),()=>s.break())})}}return mO.validateAdditionalItems=i,mO.default=n,mO}var Oj={},gO={},AAe;function TUe(){if(AAe)return gO;AAe=1,Object.defineProperty(gO,"__esModule",{value:!0}),gO.validateTuple=void 0;const t=kp(),e=pm(),r=rM(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(a){const{schema:o,it:s}=a;if(Array.isArray(o))return i(a,"additionalItems",o);s.items=!0,!(0,e.alwaysValidSchema)(s,o)&&a.ok((0,r.validateArray)(a))}};function i(a,o,s=a.schema){const{gen:d,parentSchema:b,data:L,keyword:B,it:V}=a;de(b),V.opts.unevaluated&&s.length&&V.items!==!0&&(V.items=e.mergeEvaluated.items(d,s.length,V.items));const X=d.name("valid"),ie=d.const("len",(0,t._)`${L}.length`);s.forEach((ae,U)=>{(0,e.alwaysValidSchema)(V,ae)||(d.if((0,t._)`${ie} > ${U}`,()=>a.subschema({keyword:B,schemaProp:U,dataProp:U},X)),a.ok(X))});function de(ae){const{opts:U,errSchemaPath:ve}=V,Se=s.length,Pe=Se===ae.minItems&&(Se===ae.maxItems||ae[o]===!1);if(U.strictTuples&&!Pe){const Me=`"${B}" is ${Se}-tuple, but minItems or maxItems/${o} are not specified or different at path "${ve}"`;(0,e.checkStrictMode)(V,Me,U.strictTuples)}}}return gO.validateTuple=i,gO.default=n,gO}var CAe;function WTt(){if(CAe)return Oj;CAe=1,Object.defineProperty(Oj,"__esModule",{value:!0});const t=TUe(),e={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,t.validateTuple)(r,"items")};return Oj.default=e,Oj}var Nj={},MAe;function YTt(){if(MAe)return Nj;MAe=1,Object.defineProperty(Nj,"__esModule",{value:!0});const t=kp(),e=pm(),r=rM(),n=SUe(),a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:o}})=>(0,t.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,t._)`{limit: ${o}}`},code(o){const{schema:s,parentSchema:d,it:b}=o,{prefixItems:L}=d;b.items=!0,!(0,e.alwaysValidSchema)(b,s)&&(L?(0,n.validateAdditionalItems)(o,L):o.ok((0,r.validateArray)(o)))}};return Nj.default=a,Nj}var Fj={},RAe;function XTt(){if(RAe)return Fj;RAe=1,Object.defineProperty(Fj,"__esModule",{value:!0});const t=kp(),e=pm(),n={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:i,max:a}})=>a===void 0?(0,t.str)`must contain at least ${i} valid item(s)`:(0,t.str)`must contain at least ${i} and no more than ${a} valid item(s)`,params:({params:{min:i,max:a}})=>a===void 0?(0,t._)`{minContains: ${i}}`:(0,t._)`{minContains: ${i}, maxContains: ${a}}`},code(i){const{gen:a,schema:o,parentSchema:s,data:d,it:b}=i;let L,B;const{minContains:V,maxContains:X}=s;b.opts.next?(L=V===void 0?1:V,B=X):L=1;const ie=a.const("len",(0,t._)`${d}.length`);if(i.setParams({min:L,max:B}),B===void 0&&L===0){(0,e.checkStrictMode)(b,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(B!==void 0&&L>B){(0,e.checkStrictMode)(b,'"minContains" > "maxContains" is always invalid'),i.fail();return}if((0,e.alwaysValidSchema)(b,o)){let Se=(0,t._)`${ie} >= ${L}`;B!==void 0&&(Se=(0,t._)`${Se} && ${ie} <= ${B}`),i.pass(Se);return}b.items=!0;const de=a.name("valid");B===void 0&&L===1?U(de,()=>a.if(de,()=>a.break())):L===0?(a.let(de,!0),B!==void 0&&a.if((0,t._)`${d}.length > 0`,ae)):(a.let(de,!1),ae()),i.result(de,()=>i.reset());function ae(){const Se=a.name("_valid"),Pe=a.let("count",0);U(Se,()=>a.if(Se,()=>ve(Pe)))}function U(Se,Pe){a.forRange("i",0,ie,Me=>{i.subschema({keyword:"contains",dataProp:Me,dataPropType:e.Type.Num,compositeRule:!0},Se),Pe()})}function ve(Se){a.code((0,t._)`${Se}++`),B===void 0?a.if((0,t._)`${Se} >= ${L}`,()=>a.assign(de,!0).break()):(a.if((0,t._)`${Se} > ${B}`,()=>a.assign(de,!1).break()),L===1?a.assign(de,!0):a.if((0,t._)`${Se} >= ${L}`,()=>a.assign(de,!0)))}}};return Fj.default=n,Fj}var ore={},kAe;function ZTt(){return kAe||(kAe=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const e=kp(),r=pm(),n=rM();t.error={message:({params:{property:d,depsCount:b,deps:L}})=>{const B=b===1?"property":"properties";return(0,e.str)`must have ${B} ${L} when property ${d} is present`},params:({params:{property:d,depsCount:b,deps:L,missingProperty:B}})=>(0,e._)`{property: ${d},
    missingProperty: ${B},
    depsCount: ${b},
    deps: ${L}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(d){const[b,L]=a(d);o(d,b),s(d,L)}};function a({schema:d}){const b={},L={};for(const B in d){if(B==="__proto__")continue;const V=Array.isArray(d[B])?b:L;V[B]=d[B]}return[b,L]}function o(d,b=d.schema){const{gen:L,data:B,it:V}=d;if(Object.keys(b).length===0)return;const X=L.let("missing");for(const ie in b){const de=b[ie];if(de.length===0)continue;const ae=(0,n.propertyInData)(L,B,ie,V.opts.ownProperties);d.setParams({property:ie,depsCount:de.length,deps:de.join(", ")}),V.allErrors?L.if(ae,()=>{for(const U of de)(0,n.checkReportMissingProp)(d,U)}):(L.if((0,e._)`${ae} && (${(0,n.checkMissingProp)(d,de,X)})`),(0,n.reportMissingProp)(d,X),L.else())}}t.validatePropertyDeps=o;function s(d,b=d.schema){const{gen:L,data:B,keyword:V,it:X}=d,ie=L.name("valid");for(const de in b)(0,r.alwaysValidSchema)(X,b[de])||(L.if((0,n.propertyInData)(L,B,de,X.opts.ownProperties),()=>{const ae=d.subschema({keyword:V,schemaProp:de},ie);d.mergeValidEvaluated(ae,ie)},()=>L.var(ie,!0)),d.ok(ie))}t.validateSchemaDeps=s,t.default=i})(ore)),ore}var zj={},IAe;function KTt(){if(IAe)return zj;IAe=1,Object.defineProperty(zj,"__esModule",{value:!0});const t=kp(),e=pm(),n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:i})=>(0,t._)`{propertyName: ${i.propertyName}}`},code(i){const{gen:a,schema:o,data:s,it:d}=i;if((0,e.alwaysValidSchema)(d,o))return;const b=a.name("valid");a.forIn("key",s,L=>{i.setParams({propertyName:L}),i.subschema({keyword:"propertyNames",data:L,dataTypes:["string"],propertyName:L,compositeRule:!0},b),a.if((0,t.not)(b),()=>{i.error(!0),d.allErrors||a.break()})}),i.ok(b)}};return zj.default=n,zj}var Bj={},PAe;function EUe(){if(PAe)return Bj;PAe=1,Object.defineProperty(Bj,"__esModule",{value:!0});const t=rM(),e=kp(),r=b4(),n=pm(),a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:o})=>(0,e._)`{additionalProperty: ${o.additionalProperty}}`},code(o){const{gen:s,schema:d,parentSchema:b,data:L,errsCount:B,it:V}=o;if(!B)throw new Error("ajv implementation error");const{allErrors:X,opts:ie}=V;if(V.props=!0,ie.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(V,d))return;const de=(0,t.allSchemaProperties)(b.properties),ae=(0,t.allSchemaProperties)(b.patternProperties);U(),o.ok((0,e._)`${B} === ${r.default.errors}`);function U(){s.forIn("key",L,Ie=>{!de.length&&!ae.length?Pe(Ie):s.if(ve(Ie),()=>Pe(Ie))})}function ve(Ie){let Ve;if(de.length>8){const Ze=(0,n.schemaRefOrVal)(V,b.properties,"properties");Ve=(0,t.isOwnProperty)(s,Ze,Ie)}else de.length?Ve=(0,e.or)(...de.map(Ze=>(0,e._)`${Ie} === ${Ze}`)):Ve=e.nil;return ae.length&&(Ve=(0,e.or)(Ve,...ae.map(Ze=>(0,e._)`${(0,t.usePattern)(o,Ze)}.test(${Ie})`))),(0,e.not)(Ve)}function Se(Ie){s.code((0,e._)`delete ${L}[${Ie}]`)}function Pe(Ie){if(ie.removeAdditional==="all"||ie.removeAdditional&&d===!1){Se(Ie);return}if(d===!1){o.setParams({additionalProperty:Ie}),o.error(),X||s.break();return}if(typeof d=="object"&&!(0,n.alwaysValidSchema)(V,d)){const Ve=s.name("valid");ie.removeAdditional==="failing"?(Me(Ie,Ve,!1),s.if((0,e.not)(Ve),()=>{o.reset(),Se(Ie)})):(Me(Ie,Ve),X||s.if((0,e.not)(Ve),()=>s.break()))}}function Me(Ie,Ve,Ze){const Je={keyword:"additionalProperties",dataProp:Ie,dataPropType:n.Type.Str};Ze===!1&&Object.assign(Je,{compositeRule:!0,createErrors:!1,allErrors:!1}),o.subschema(Je,Ve)}}};return Bj.default=a,Bj}var Uj={},DAe;function JTt(){if(DAe)return Uj;DAe=1,Object.defineProperty(Uj,"__esModule",{value:!0});const t=JY(),e=rM(),r=pm(),n=EUe(),i={keyword:"properties",type:"object",schemaType:"object",code(a){const{gen:o,schema:s,parentSchema:d,data:b,it:L}=a;L.opts.removeAdditional==="all"&&d.additionalProperties===void 0&&n.default.code(new t.KeywordCxt(L,n.default,"additionalProperties"));const B=(0,e.allSchemaProperties)(s);for(const ae of B)L.definedProperties.add(ae);L.opts.unevaluated&&B.length&&L.props!==!0&&(L.props=r.mergeEvaluated.props(o,(0,r.toHash)(B),L.props));const V=B.filter(ae=>!(0,r.alwaysValidSchema)(L,s[ae]));if(V.length===0)return;const X=o.name("valid");for(const ae of V)ie(ae)?de(ae):(o.if((0,e.propertyInData)(o,b,ae,L.opts.ownProperties)),de(ae),L.allErrors||o.else().var(X,!0),o.endIf()),a.it.definedProperties.add(ae),a.ok(X);function ie(ae){return L.opts.useDefaults&&!L.compositeRule&&s[ae].default!==void 0}function de(ae){a.subschema({keyword:"properties",schemaProp:ae,dataProp:ae},X)}}};return Uj.default=i,Uj}var Hj={},LAe;function QTt(){if(LAe)return Hj;LAe=1,Object.defineProperty(Hj,"__esModule",{value:!0});const t=rM(),e=kp(),r=pm(),n=pm(),i={keyword:"patternProperties",type:"object",schemaType:"object",code(a){const{gen:o,schema:s,data:d,parentSchema:b,it:L}=a,{opts:B}=L,V=(0,t.allSchemaProperties)(s),X=V.filter(Pe=>(0,r.alwaysValidSchema)(L,s[Pe]));if(V.length===0||X.length===V.length&&(!L.opts.unevaluated||L.props===!0))return;const ie=B.strictSchema&&!B.allowMatchingProperties&&b.properties,de=o.name("valid");L.props!==!0&&!(L.props instanceof e.Name)&&(L.props=(0,n.evaluatedPropsToName)(o,L.props));const{props:ae}=L;U();function U(){for(const Pe of V)ie&&ve(Pe),L.allErrors?Se(Pe):(o.var(de,!0),Se(Pe),o.if(de))}function ve(Pe){for(const Me in ie)new RegExp(Pe).test(Me)&&(0,r.checkStrictMode)(L,`property ${Me} matches pattern ${Pe} (use allowMatchingProperties)`)}function Se(Pe){o.forIn("key",d,Me=>{o.if((0,e._)`${(0,t.usePattern)(a,Pe)}.test(${Me})`,()=>{const Ie=X.includes(Pe);Ie||a.subschema({keyword:"patternProperties",schemaProp:Pe,dataProp:Me,dataPropType:n.Type.Str},de),L.opts.unevaluated&&ae!==!0?o.assign((0,e._)`${ae}[${Me}]`,!0):!Ie&&!L.allErrors&&o.if((0,e.not)(de),()=>o.break())})})}}};return Hj.default=i,Hj}var jj={},OAe;function eEt(){if(OAe)return jj;OAe=1,Object.defineProperty(jj,"__esModule",{value:!0});const t=pm(),e={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:n,schema:i,it:a}=r;if((0,t.alwaysValidSchema)(a,i)){r.fail();return}const o=n.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),r.failResult(o,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return jj.default=e,jj}var Vj={},NAe;function tEt(){if(NAe)return Vj;NAe=1,Object.defineProperty(Vj,"__esModule",{value:!0});const e={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:rM().validateUnion,error:{message:"must match a schema in anyOf"}};return Vj.default=e,Vj}var qj={},FAe;function rEt(){if(FAe)return qj;FAe=1,Object.defineProperty(qj,"__esModule",{value:!0});const t=kp(),e=pm(),n={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:i})=>(0,t._)`{passingSchemas: ${i.passing}}`},code(i){const{gen:a,schema:o,parentSchema:s,it:d}=i;if(!Array.isArray(o))throw new Error("ajv implementation error");if(d.opts.discriminator&&s.discriminator)return;const b=o,L=a.let("valid",!1),B=a.let("passing",null),V=a.name("_valid");i.setParams({passing:B}),a.block(X),i.result(L,()=>i.reset(),()=>i.error(!0));function X(){b.forEach((ie,de)=>{let ae;(0,e.alwaysValidSchema)(d,ie)?a.var(V,!0):ae=i.subschema({keyword:"oneOf",schemaProp:de,compositeRule:!0},V),de>0&&a.if((0,t._)`${V} && ${L}`).assign(L,!1).assign(B,(0,t._)`[${B}, ${de}]`).else(),a.if(V,()=>{a.assign(L,!0),a.assign(B,de),ae&&i.mergeEvaluated(ae,t.Name)})})}}};return qj.default=n,qj}var Gj={},zAe;function nEt(){if(zAe)return Gj;zAe=1,Object.defineProperty(Gj,"__esModule",{value:!0});const t=pm(),e={keyword:"allOf",schemaType:"array",code(r){const{gen:n,schema:i,it:a}=r;if(!Array.isArray(i))throw new Error("ajv implementation error");const o=n.name("valid");i.forEach((s,d)=>{if((0,t.alwaysValidSchema)(a,s))return;const b=r.subschema({keyword:"allOf",schemaProp:d},o);r.ok(o),r.mergeEvaluated(b)})}};return Gj.default=e,Gj}var $j={},BAe;function iEt(){if(BAe)return $j;BAe=1,Object.defineProperty($j,"__esModule",{value:!0});const t=kp(),e=pm(),n={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:a})=>(0,t.str)`must match "${a.ifClause}" schema`,params:({params:a})=>(0,t._)`{failingKeyword: ${a.ifClause}}`},code(a){const{gen:o,parentSchema:s,it:d}=a;s.then===void 0&&s.else===void 0&&(0,e.checkStrictMode)(d,'"if" without "then" and "else" is ignored');const b=i(d,"then"),L=i(d,"else");if(!b&&!L)return;const B=o.let("valid",!0),V=o.name("_valid");if(X(),a.reset(),b&&L){const de=o.let("ifClause");a.setParams({ifClause:de}),o.if(V,ie("then",de),ie("else",de))}else b?o.if(V,ie("then")):o.if((0,t.not)(V),ie("else"));a.pass(B,()=>a.error(!0));function X(){const de=a.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},V);a.mergeEvaluated(de)}function ie(de,ae){return()=>{const U=a.subschema({keyword:de},V);o.assign(B,V),a.mergeValidEvaluated(U,B),ae?o.assign(ae,(0,t._)`${de}`):a.setParams({ifClause:de})}}}};function i(a,o){const s=a.schema[o];return s!==void 0&&!(0,e.alwaysValidSchema)(a,s)}return $j.default=n,$j}var Wj={},UAe;function aEt(){if(UAe)return Wj;UAe=1,Object.defineProperty(Wj,"__esModule",{value:!0});const t=pm(),e={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:n,it:i}){n.if===void 0&&(0,t.checkStrictMode)(i,`"${r}" without "if" is ignored`)}};return Wj.default=e,Wj}var HAe;function oEt(){if(HAe)return Lj;HAe=1,Object.defineProperty(Lj,"__esModule",{value:!0});const t=SUe(),e=WTt(),r=TUe(),n=YTt(),i=XTt(),a=ZTt(),o=KTt(),s=EUe(),d=JTt(),b=QTt(),L=eEt(),B=tEt(),V=rEt(),X=nEt(),ie=iEt(),de=aEt();function ae(U=!1){const ve=[L.default,B.default,V.default,X.default,ie.default,de.default,o.default,s.default,a.default,d.default,b.default];return U?ve.push(e.default,n.default):ve.push(t.default,r.default),ve.push(i.default),ve}return Lj.default=ae,Lj}var Yj={},Xj={},jAe;function sEt(){if(jAe)return Xj;jAe=1,Object.defineProperty(Xj,"__esModule",{value:!0});const t=kp(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:n})=>(0,t.str)`must match format "${n}"`,params:({schemaCode:n})=>(0,t._)`{format: ${n}}`},code(n,i){const{gen:a,data:o,$data:s,schema:d,schemaCode:b,it:L}=n,{opts:B,errSchemaPath:V,schemaEnv:X,self:ie}=L;if(!B.validateFormats)return;s?de():ae();function de(){const U=a.scopeValue("formats",{ref:ie.formats,code:B.code.formats}),ve=a.const("fDef",(0,t._)`${U}[${b}]`),Se=a.let("fType"),Pe=a.let("format");a.if((0,t._)`typeof ${ve} == "object" && !(${ve} instanceof RegExp)`,()=>a.assign(Se,(0,t._)`${ve}.type || "string"`).assign(Pe,(0,t._)`${ve}.validate`),()=>a.assign(Se,(0,t._)`"string"`).assign(Pe,ve)),n.fail$data((0,t.or)(Me(),Ie()));function Me(){return B.strictSchema===!1?t.nil:(0,t._)`${b} && !${Pe}`}function Ie(){const Ve=X.$async?(0,t._)`(${ve}.async ? await ${Pe}(${o}) : ${Pe}(${o}))`:(0,t._)`${Pe}(${o})`,Ze=(0,t._)`(typeof ${Pe} == "function" ? ${Ve} : ${Pe}.test(${o}))`;return(0,t._)`${Pe} && ${Pe} !== true && ${Se} === ${i} && !${Ze}`}}function ae(){const U=ie.formats[d];if(!U){Me();return}if(U===!0)return;const[ve,Se,Pe]=Ie(U);ve===i&&n.pass(Ve());function Me(){if(B.strictSchema===!1){ie.logger.warn(Ze());return}throw new Error(Ze());function Ze(){return`unknown format "${d}" ignored in schema at path "${V}"`}}function Ie(Ze){const Je=Ze instanceof RegExp?(0,t.regexpCode)(Ze):B.code.formats?(0,t._)`${B.code.formats}${(0,t.getProperty)(d)}`:void 0,nt=a.scopeValue("formats",{key:d,ref:Ze,code:Je});return typeof Ze=="object"&&!(Ze instanceof RegExp)?[Ze.type||"string",Ze.validate,(0,t._)`${nt}.validate`]:["string",Ze,nt]}function Ve(){if(typeof U=="object"&&!(U instanceof RegExp)&&U.async){if(!X.$async)throw new Error("async format in sync schema");return(0,t._)`await ${Pe}(${o})`}return typeof Se=="function"?(0,t._)`${Pe}(${o})`:(0,t._)`${Pe}.test(${o})`}}}};return Xj.default=r,Xj}var VAe;function lEt(){if(VAe)return Yj;VAe=1,Object.defineProperty(Yj,"__esModule",{value:!0});const e=[sEt().default];return Yj.default=e,Yj}var fD={},qAe;function uEt(){return qAe||(qAe=1,Object.defineProperty(fD,"__esModule",{value:!0}),fD.contentVocabulary=fD.metadataVocabulary=void 0,fD.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],fD.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),fD}var GAe;function cEt(){if(GAe)return yj;GAe=1,Object.defineProperty(yj,"__esModule",{value:!0});const t=LTt(),e=$Tt(),r=oEt(),n=lEt(),i=uEt(),a=[t.default,e.default,(0,r.default)(),n.default,i.metadataVocabulary,i.contentVocabulary];return yj.default=a,yj}var Zj={},F7={},$Ae;function fEt(){if($Ae)return F7;$Ae=1,Object.defineProperty(F7,"__esModule",{value:!0}),F7.DiscrError=void 0;var t;return(function(e){e.Tag="tag",e.Mapping="mapping"})(t||(F7.DiscrError=t={})),F7}var WAe;function dEt(){if(WAe)return Zj;WAe=1,Object.defineProperty(Zj,"__esModule",{value:!0});const t=kp(),e=fEt(),r=Kme(),n=QY(),i=pm(),o={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:s,tagName:d}})=>s===e.DiscrError.Tag?`tag "${d}" must be string`:`value of tag "${d}" must be in oneOf`,params:({params:{discrError:s,tag:d,tagName:b}})=>(0,t._)`{error: ${s}, tag: ${b}, tagValue: ${d}}`},code(s){const{gen:d,data:b,schema:L,parentSchema:B,it:V}=s,{oneOf:X}=B;if(!V.opts.discriminator)throw new Error("discriminator: requires discriminator option");const ie=L.propertyName;if(typeof ie!="string")throw new Error("discriminator: requires propertyName");if(L.mapping)throw new Error("discriminator: mapping is not supported");if(!X)throw new Error("discriminator: requires oneOf keyword");const de=d.let("valid",!1),ae=d.const("tag",(0,t._)`${b}${(0,t.getProperty)(ie)}`);d.if((0,t._)`typeof ${ae} == "string"`,()=>U(),()=>s.error(!1,{discrError:e.DiscrError.Tag,tag:ae,tagName:ie})),s.ok(de);function U(){const Pe=Se();d.if(!1);for(const Me in Pe)d.elseIf((0,t._)`${ae} === ${Me}`),d.assign(de,ve(Pe[Me]));d.else(),s.error(!1,{discrError:e.DiscrError.Mapping,tag:ae,tagName:ie}),d.endIf()}function ve(Pe){const Me=d.name("valid"),Ie=s.subschema({keyword:"oneOf",schemaProp:Pe},Me);return s.mergeEvaluated(Ie,t.Name),Me}function Se(){var Pe;const Me={},Ie=Ze(B);let Ve=!0;for(let ut=0;ut<X.length;ut++){let ht=X[ut];if(ht?.$ref&&!(0,i.schemaHasRulesButRef)(ht,V.self.RULES)){const Dt=ht.$ref;if(ht=r.resolveRef.call(V.self,V.schemaEnv.root,V.baseId,Dt),ht instanceof r.SchemaEnv&&(ht=ht.schema),ht===void 0)throw new n.default(V.opts.uriResolver,V.baseId,Dt)}const _t=(Pe=ht?.properties)===null||Pe===void 0?void 0:Pe[ie];if(typeof _t!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${ie}"`);Ve=Ve&&(Ie||Ze(ht)),Je(_t,ut)}if(!Ve)throw new Error(`discriminator: "${ie}" must be required`);return Me;function Ze({required:ut}){return Array.isArray(ut)&&ut.includes(ie)}function Je(ut,ht){if(ut.const)nt(ut.const,ht);else if(ut.enum)for(const _t of ut.enum)nt(_t,ht);else throw new Error(`discriminator: "properties/${ie}" must have "const" or "enum"`)}function nt(ut,ht){if(typeof ut!="string"||ut in Me)throw new Error(`discriminator: "${ie}" values must be unique strings`);Me[ut]=ht}}}};return Zj.default=o,Zj}const hEt="http://json-schema.org/draft-07/schema#",pEt="http://json-schema.org/draft-07/schema#",vEt="Core schema meta-schema",mEt={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},gEt=["object","boolean"],yEt={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},bEt={$schema:hEt,$id:pEt,title:vEt,definitions:mEt,type:gEt,properties:yEt,default:!0};var YAe;function AUe(){return YAe||(YAe=1,(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;const r=ITt(),n=cEt(),i=dEt(),a=bEt,o=["/properties"],s="http://json-schema.org/draft-07/schema";class d extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(ie=>this.addVocabulary(ie)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const ie=this.opts.$data?this.$dataMetaSchema(a,o):a;this.addMetaSchema(ie,s,!1),this.refs["http://json-schema.org/schema"]=s}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}}e.Ajv=d,t.exports=e=d,t.exports.Ajv=d,Object.defineProperty(e,"__esModule",{value:!0}),e.default=d;var b=JY();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return b.KeywordCxt}});var L=kp();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return L._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return L.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return L.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return L.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return L.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return L.CodeGen}});var B=Zme();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return B.default}});var V=QY();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return V.default}})})(hj,hj.exports)),hj.exports}var xEt=AUe();const _Et=Qh(xEt);var Kj={exports:{}},sre={},XAe;function wEt(){return XAe||(XAe=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0;function e(Je,nt){return{validate:Je,compare:nt}}t.fullFormats={date:e(a,o),time:e(d,b),"date-time":e(B,V),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:de,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:Ze,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:U,int32:{type:"number",validate:Pe},int64:{type:"number",validate:Me},float:{type:"number",validate:Ie},double:{type:"number",validate:Ie},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:e(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,o),time:e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,b),"date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,V),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},t.formatNames=Object.keys(t.fullFormats);function r(Je){return Je%4===0&&(Je%100!==0||Je%400===0)}const n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function a(Je){const nt=n.exec(Je);if(!nt)return!1;const ut=+nt[1],ht=+nt[2],_t=+nt[3];return ht>=1&&ht<=12&&_t>=1&&_t<=(ht===2&&r(ut)?29:i[ht])}function o(Je,nt){if(Je&&nt)return Je>nt?1:Je<nt?-1:0}const s=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function d(Je,nt){const ut=s.exec(Je);if(!ut)return!1;const ht=+ut[1],_t=+ut[2],Dt=+ut[3],qt=ut[5];return(ht<=23&&_t<=59&&Dt<=59||ht===23&&_t===59&&Dt===60)&&(!nt||qt!=="")}function b(Je,nt){if(!(Je&&nt))return;const ut=s.exec(Je),ht=s.exec(nt);if(ut&&ht)return Je=ut[1]+ut[2]+ut[3]+(ut[4]||""),nt=ht[1]+ht[2]+ht[3]+(ht[4]||""),Je>nt?1:Je<nt?-1:0}const L=/t|\s/i;function B(Je){const nt=Je.split(L);return nt.length===2&&a(nt[0])&&d(nt[1],!0)}function V(Je,nt){if(!(Je&&nt))return;const[ut,ht]=Je.split(L),[_t,Dt]=nt.split(L),qt=o(ut,_t);if(qt!==void 0)return qt||b(ht,Dt)}const X=/\/|:/,ie=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function de(Je){return X.test(Je)&&ie.test(Je)}const ae=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function U(Je){return ae.lastIndex=0,ae.test(Je)}const ve=-2147483648,Se=2**31-1;function Pe(Je){return Number.isInteger(Je)&&Je<=Se&&Je>=ve}function Me(Je){return Number.isInteger(Je)}function Ie(){return!0}const Ve=/[^\\]\\Z/;function Ze(Je){if(Ve.test(Je))return!1;try{return new RegExp(Je),!0}catch{return!1}}})(sre)),sre}var lre={},ZAe;function SEt(){return ZAe||(ZAe=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const e=AUe(),r=kp(),n=r.operators,i={formatMaximum:{okStr:"<=",ok:n.LTE,fail:n.GT},formatMinimum:{okStr:">=",ok:n.GTE,fail:n.LT},formatExclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},formatExclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},a={message:({keyword:s,schemaCode:d})=>r.str`should be ${i[s].okStr} ${d}`,params:({keyword:s,schemaCode:d})=>r._`{comparison: ${i[s].okStr}, limit: ${d}}`};t.formatLimitDefinition={keyword:Object.keys(i),type:"string",schemaType:"string",$data:!0,error:a,code(s){const{gen:d,data:b,schemaCode:L,keyword:B,it:V}=s,{opts:X,self:ie}=V;if(!X.validateFormats)return;const de=new e.KeywordCxt(V,ie.RULES.all.format.definition,"format");de.$data?ae():U();function ae(){const Se=d.scopeValue("formats",{ref:ie.formats,code:X.code.formats}),Pe=d.const("fmt",r._`${Se}[${de.schemaCode}]`);s.fail$data(r.or(r._`typeof ${Pe} != "object"`,r._`${Pe} instanceof RegExp`,r._`typeof ${Pe}.compare != "function"`,ve(Pe)))}function U(){const Se=de.schema,Pe=ie.formats[Se];if(!Pe||Pe===!0)return;if(typeof Pe!="object"||Pe instanceof RegExp||typeof Pe.compare!="function")throw new Error(`"${B}": format "${Se}" does not define "compare" function`);const Me=d.scopeValue("formats",{key:Se,ref:Pe,code:X.code.formats?r._`${X.code.formats}${r.getProperty(Se)}`:void 0});s.fail$data(ve(Me))}function ve(Se){return r._`${Se}.compare(${b}, ${L}) ${i[B].fail} 0`}},dependencies:["format"]};const o=s=>(s.addKeyword(t.formatLimitDefinition),s);t.default=o})(lre)),lre}var KAe;function TEt(){return KAe||(KAe=1,(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=wEt(),n=SEt(),i=kp(),a=new i.Name("fullFormats"),o=new i.Name("fastFormats"),s=(b,L={keywords:!0})=>{if(Array.isArray(L))return d(b,L,r.fullFormats,a),b;const[B,V]=L.mode==="fast"?[r.fastFormats,o]:[r.fullFormats,a],X=L.formats||r.formatNames;return d(b,X,B,V),L.keywords&&n.default(b),b};s.get=(b,L="full")=>{const V=(L==="fast"?r.fastFormats:r.fullFormats)[b];if(!V)throw new Error(`Unknown format "${b}"`);return V};function d(b,L,B,V){var X,ie;(X=(ie=b.opts.code).formats)!==null&&X!==void 0||(ie.formats=i._`require("ajv-formats/dist/formats").${V}`);for(const de of L)b.addFormat(de,B[de])}t.exports=e=s,Object.defineProperty(e,"__esModule",{value:!0}),e.default=s})(Kj,Kj.exports)),Kj.exports}var EEt=TEt();const AEt=Qh(EEt);var ure,JAe;function CEt(){if(JAe)return ure;JAe=1;function t(e){return function(r,n,i){for(var a=-1,o=Object(r),s=i(r),d=s.length;d--;){var b=s[e?d:++a];if(n(o[b],b,o)===!1)break}return r}}return ure=t,ure}var cre,QAe;function CUe(){if(QAe)return cre;QAe=1;var t=CEt(),e=t();return cre=e,cre}var fre,eCe;function MEt(){if(eCe)return fre;eCe=1;var t=CUe(),e=Hk();function r(n,i){return n&&t(n,i,e)}return fre=r,fre}var dre,tCe;function REt(){if(tCe)return dre;tCe=1;var t=Uk();function e(r,n){return function(i,a){if(i==null)return i;if(!t(i))return r(i,a);for(var o=i.length,s=n?o:-1,d=Object(i);(n?s--:++s<o)&&a(d[s],s,d)!==!1;);return i}}return dre=e,dre}var hre,rCe;function Qme(){if(rCe)return hre;rCe=1;var t=MEt(),e=REt(),r=e(t);return hre=r,hre}var pre,nCe;function kEt(){if(nCe)return pre;nCe=1;var t=Qme();function e(r,n){var i=[];return t(r,function(a,o,s){n(a,o,s)&&i.push(a)}),i}return pre=e,pre}var vre,iCe;function IEt(){if(iCe)return vre;iCe=1;var t=YBe(),e=kEt(),r=y4(),n=Rb();function i(a,o){var s=n(a)?t:e;return s(a,r(o,3))}return vre=i,vre}var PEt=IEt();const aCe=Qh(PEt);var mre,oCe;function DEt(){if(oCe)return mre;oCe=1;var t=Gme();function e(r,n){return t(r,n)}return mre=e,mre}var LEt=DEt();const ege=Qh(LEt);var gre,sCe;function MUe(){if(sCe)return gre;sCe=1;var t=qL(),e=(function(){try{var r=t(Object,"defineProperty");return r({},"",{}),r}catch{}})();return gre=e,gre}var yre,lCe;function tge(){if(lCe)return yre;lCe=1;var t=MUe();function e(r,n,i){n=="__proto__"&&t?t(r,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[n]=i}return yre=e,yre}var bre,uCe;function RUe(){if(uCe)return bre;uCe=1;var t=tge(),e=BB();function r(n,i,a){(a!==void 0&&!e(n[i],a)||a===void 0&&!(i in n))&&t(n,i,a)}return bre=r,bre}var kz={exports:{}};kz.exports;var cCe;function kUe(){return cCe||(cCe=1,(function(t,e){var r=Y2(),n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===n,o=a?r.Buffer:void 0,s=o?o.allocUnsafe:void 0;function d(b,L){if(L)return b.slice();var B=b.length,V=s?s(B):new b.constructor(B);return b.copy(V),V}t.exports=d})(kz,kz.exports)),kz.exports}var xre,fCe;function rge(){if(fCe)return xre;fCe=1;var t=GBe();function e(r){var n=new r.constructor(r.byteLength);return new t(n).set(new t(r)),n}return xre=e,xre}var _re,dCe;function IUe(){if(dCe)return _re;dCe=1;var t=rge();function e(r,n){var i=n?t(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.length)}return _re=e,_re}var wre,hCe;function GB(){if(hCe)return wre;hCe=1;function t(e,r){var n=-1,i=e.length;for(r||(r=Array(i));++n<i;)r[n]=e[n];return r}return wre=t,wre}var Sre,pCe;function eX(){if(pCe)return Sre;pCe=1;var t=gE(),e=Object.create,r=(function(){function n(){}return function(i){if(!t(i))return{};if(e)return e(i);n.prototype=i;var a=new n;return n.prototype=void 0,a}})();return Sre=r,Sre}var Tre,vCe;function nge(){if(vCe)return Tre;vCe=1;var t=KBe(),e=t(Object.getPrototypeOf,Object);return Tre=e,Tre}var Ere,mCe;function PUe(){if(mCe)return Ere;mCe=1;var t=eX(),e=nge(),r=WY();function n(i){return typeof i.constructor=="function"&&!r(i)?t(e(i)):{}}return Ere=n,Ere}var Are,gCe;function DUe(){if(gCe)return Are;gCe=1;var t=Uk(),e=mE();function r(n){return e(n)&&t(n)}return Are=r,Are}var Cre,yCe;function ige(){if(yCe)return Cre;yCe=1;var t=g4(),e=nge(),r=mE(),n="[object Object]",i=Function.prototype,a=Object.prototype,o=i.toString,s=a.hasOwnProperty,d=o.call(Object);function b(L){if(!r(L)||t(L)!=n)return!1;var B=e(L);if(B===null)return!0;var V=s.call(B,"constructor")&&B.constructor;return typeof V=="function"&&V instanceof V&&o.call(V)==d}return Cre=b,Cre}var Mre,bCe;function LUe(){if(bCe)return Mre;bCe=1;function t(e,r){if(!(r==="constructor"&&typeof e[r]=="function")&&r!="__proto__")return e[r]}return Mre=t,Mre}var Rre,xCe;function age(){if(xCe)return Rre;xCe=1;var t=tge(),e=BB(),r=Object.prototype,n=r.hasOwnProperty;function i(a,o,s){var d=a[o];(!(n.call(a,o)&&e(d,s))||s===void 0&&!(o in a))&&t(a,o,s)}return Rre=i,Rre}var kre,_Ce;function Y8(){if(_Ce)return kre;_Ce=1;var t=age(),e=tge();function r(n,i,a,o){var s=!a;a||(a={});for(var d=-1,b=i.length;++d<b;){var L=i[d],B=o?o(a[L],n[L],L,a,n):void 0;B===void 0&&(B=n[L]),s?e(a,L,B):t(a,L,B)}return a}return kre=r,kre}var Ire,wCe;function OEt(){if(wCe)return Ire;wCe=1;function t(e){var r=[];if(e!=null)for(var n in Object(e))r.push(n);return r}return Ire=t,Ire}var Pre,SCe;function NEt(){if(SCe)return Pre;SCe=1;var t=gE(),e=WY(),r=OEt(),n=Object.prototype,i=n.hasOwnProperty;function a(o){if(!t(o))return r(o);var s=e(o),d=[];for(var b in o)b=="constructor"&&(s||!i.call(o,b))||d.push(b);return d}return Pre=a,Pre}var Dre,TCe;function $B(){if(TCe)return Dre;TCe=1;var t=ZBe(),e=NEt(),r=Uk();function n(i){return r(i)?t(i,!0):e(i)}return Dre=n,Dre}var Lre,ECe;function FEt(){if(ECe)return Lre;ECe=1;var t=Y8(),e=$B();function r(n){return t(n,e(n))}return Lre=r,Lre}var Ore,ACe;function zEt(){if(ACe)return Ore;ACe=1;var t=RUe(),e=kUe(),r=IUe(),n=GB(),i=PUe(),a=HB(),o=Rb(),s=DUe(),d=jB(),b=UB(),L=gE(),B=ige(),V=$Y(),X=LUe(),ie=FEt();function de(ae,U,ve,Se,Pe,Me,Ie){var Ve=X(ae,ve),Ze=X(U,ve),Je=Ie.get(Ze);if(Je){t(ae,ve,Je);return}var nt=Me?Me(Ve,Ze,ve+"",ae,U,Ie):void 0,ut=nt===void 0;if(ut){var ht=o(Ze),_t=!ht&&d(Ze),Dt=!ht&&!_t&&V(Ze);nt=Ze,ht||_t||Dt?o(Ve)?nt=Ve:s(Ve)?nt=n(Ve):_t?(ut=!1,nt=e(Ze,!0)):Dt?(ut=!1,nt=r(Ze,!0)):nt=[]:B(Ze)||a(Ze)?(nt=Ve,a(Ve)?nt=ie(Ve):(!L(Ve)||b(Ve))&&(nt=i(Ze))):ut=!1}ut&&(Ie.set(Ze,nt),Pe(nt,Ze,Se,Me,Ie),Ie.delete(Ze)),t(ae,ve,nt)}return Ore=de,Ore}var Nre,CCe;function BEt(){if(CCe)return Nre;CCe=1;var t=GY(),e=RUe(),r=CUe(),n=zEt(),i=gE(),a=$B(),o=LUe();function s(d,b,L,B,V){d!==b&&r(b,function(X,ie){if(V||(V=new t),i(X))n(d,b,ie,L,s,B,V);else{var de=B?B(o(d,ie),X,ie+"",d,b,V):void 0;de===void 0&&(de=X),e(d,ie,de)}},a)}return Nre=s,Nre}var Fre,MCe;function oge(){if(MCe)return Fre;MCe=1;function t(e,r,n){switch(n.length){case 0:return e.call(r);case 1:return e.call(r,n[0]);case 2:return e.call(r,n[0],n[1]);case 3:return e.call(r,n[0],n[1],n[2])}return e.apply(r,n)}return Fre=t,Fre}var zre,RCe;function OUe(){if(RCe)return zre;RCe=1;var t=oge(),e=Math.max;function r(n,i,a){return i=e(i===void 0?n.length-1:i,0),function(){for(var o=arguments,s=-1,d=e(o.length-i,0),b=Array(d);++s<d;)b[s]=o[i+s];s=-1;for(var L=Array(i+1);++s<i;)L[s]=o[s];return L[i]=a(b),t(n,this,L)}}return zre=r,zre}var Bre,kCe;function UEt(){if(kCe)return Bre;kCe=1;function t(e){return function(){return e}}return Bre=t,Bre}var Ure,ICe;function HEt(){if(ICe)return Ure;ICe=1;var t=UEt(),e=MUe(),r=YY(),n=e?function(i,a){return e(i,"toString",{configurable:!0,enumerable:!1,value:t(a),writable:!0})}:r;return Ure=n,Ure}var Hre,PCe;function NUe(){if(PCe)return Hre;PCe=1;var t=800,e=16,r=Date.now;function n(i){var a=0,o=0;return function(){var s=r(),d=e-(s-o);if(o=s,d>0){if(++a>=t)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return Hre=n,Hre}var jre,DCe;function sge(){if(DCe)return jre;DCe=1;var t=HEt(),e=NUe(),r=e(t);return jre=r,jre}var Vre,LCe;function FUe(){if(LCe)return Vre;LCe=1;var t=YY(),e=OUe(),r=sge();function n(i,a){return r(e(i,a,t),i+"")}return Vre=n,Vre}var qre,OCe;function jEt(){if(OCe)return qre;OCe=1;var t=FUe(),e=cUe();function r(n){return t(function(i,a){var o=-1,s=a.length,d=s>1?a[s-1]:void 0,b=s>2?a[2]:void 0;for(d=n.length>3&&typeof d=="function"?(s--,d):void 0,b&&e(a[0],a[1],b)&&(d=s<3?void 0:d,s=1),i=Object(i);++o<s;){var L=a[o];L&&n(i,L,o,d)}return i})}return qre=r,qre}var Gre,NCe;function VEt(){if(NCe)return Gre;NCe=1;var t=BEt(),e=jEt(),r=e(function(n,i,a){t(n,i,a)});return Gre=r,Gre}var qEt=VEt();const Zv=Qh(qEt);var $re,FCe;function lge(){if(FCe)return $re;FCe=1;function t(e,r){for(var n=-1,i=e==null?0:e.length;++n<i&&r(e[n],n,e)!==!1;);return e}return $re=t,$re}var Wre,zCe;function zUe(){if(zCe)return Wre;zCe=1;var t=Y8(),e=Hk();function r(n,i){return n&&t(i,e(i),n)}return Wre=r,Wre}var Yre,BCe;function GEt(){if(BCe)return Yre;BCe=1;var t=Y8(),e=$B();function r(n,i){return n&&t(i,e(i),n)}return Yre=r,Yre}var Xre,UCe;function $Et(){if(UCe)return Xre;UCe=1;var t=Y8(),e=Ume();function r(n,i){return t(n,e(n),i)}return Xre=r,Xre}var Zre,HCe;function BUe(){if(HCe)return Zre;HCe=1;var t=Bme(),e=nge(),r=Ume(),n=XBe(),i=Object.getOwnPropertySymbols,a=i?function(o){for(var s=[];o;)t(s,r(o)),o=e(o);return s}:n;return Zre=a,Zre}var Kre,jCe;function WEt(){if(jCe)return Kre;jCe=1;var t=Y8(),e=BUe();function r(n,i){return t(n,e(n),i)}return Kre=r,Kre}var Jre,VCe;function UUe(){if(VCe)return Jre;VCe=1;var t=WBe(),e=BUe(),r=$B();function n(i){return t(i,r,e)}return Jre=n,Jre}var Qre,qCe;function YEt(){if(qCe)return Qre;qCe=1;var t=Object.prototype,e=t.hasOwnProperty;function r(n){var i=n.length,a=new n.constructor(i);return i&&typeof n[0]=="string"&&e.call(n,"index")&&(a.index=n.index,a.input=n.input),a}return Qre=r,Qre}var ene,GCe;function XEt(){if(GCe)return ene;GCe=1;var t=rge();function e(r,n){var i=n?t(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.byteLength)}return ene=e,ene}var tne,$Ce;function ZEt(){if($Ce)return tne;$Ce=1;var t=/\w*$/;function e(r){var n=new r.constructor(r.source,t.exec(r));return n.lastIndex=r.lastIndex,n}return tne=e,tne}var rne,WCe;function KEt(){if(WCe)return rne;WCe=1;var t=V8(),e=t?t.prototype:void 0,r=e?e.valueOf:void 0;function n(i){return r?Object(r.call(i)):{}}return rne=n,rne}var nne,YCe;function JEt(){if(YCe)return nne;YCe=1;var t=rge(),e=XEt(),r=ZEt(),n=KEt(),i=IUe(),a="[object Boolean]",o="[object Date]",s="[object Map]",d="[object Number]",b="[object RegExp]",L="[object Set]",B="[object String]",V="[object Symbol]",X="[object ArrayBuffer]",ie="[object DataView]",de="[object Float32Array]",ae="[object Float64Array]",U="[object Int8Array]",ve="[object Int16Array]",Se="[object Int32Array]",Pe="[object Uint8Array]",Me="[object Uint8ClampedArray]",Ie="[object Uint16Array]",Ve="[object Uint32Array]";function Ze(Je,nt,ut){var ht=Je.constructor;switch(nt){case X:return t(Je);case a:case o:return new ht(+Je);case ie:return e(Je,ut);case de:case ae:case U:case ve:case Se:case Pe:case Me:case Ie:case Ve:return i(Je,ut);case s:return new ht;case d:case B:return new ht(Je);case b:return r(Je);case L:return new ht;case V:return n(Je)}}return nne=Ze,nne}var ine,XCe;function QEt(){if(XCe)return ine;XCe=1;var t=GL(),e=mE(),r="[object Map]";function n(i){return e(i)&&t(i)==r}return ine=n,ine}var ane,ZCe;function e3t(){if(ZCe)return ane;ZCe=1;var t=QEt(),e=jme(),r=Vme(),n=r&&r.isMap,i=n?e(n):t;return ane=i,ane}var one,KCe;function t3t(){if(KCe)return one;KCe=1;var t=GL(),e=mE(),r="[object Set]";function n(i){return e(i)&&t(i)==r}return one=n,one}var sne,JCe;function r3t(){if(JCe)return sne;JCe=1;var t=t3t(),e=jme(),r=Vme(),n=r&&r.isSet,i=n?e(n):t;return sne=i,sne}var lne,QCe;function tX(){if(QCe)return lne;QCe=1;var t=GY(),e=lge(),r=age(),n=zUe(),i=GEt(),a=kUe(),o=GB(),s=$Et(),d=WEt(),b=JBe(),L=UUe(),B=GL(),V=YEt(),X=JEt(),ie=PUe(),de=Rb(),ae=jB(),U=e3t(),ve=gE(),Se=r3t(),Pe=Hk(),Me=$B(),Ie=1,Ve=2,Ze=4,Je="[object Arguments]",nt="[object Array]",ut="[object Boolean]",ht="[object Date]",_t="[object Error]",Dt="[object Function]",qt="[object GeneratorFunction]",Lt="[object Map]",dr="[object Number]",Zt="[object Object]",Cr="[object RegExp]",yt="[object Set]",Vt="[object String]",Er="[object Symbol]",sr="[object WeakMap]",or="[object ArrayBuffer]",Ar="[object DataView]",Ir="[object Float32Array]",_n="[object Float64Array]",Un="[object Int8Array]",Qn="[object Int16Array]",Jn="[object Int32Array]",Vn="[object Uint8Array]",jn="[object Uint8ClampedArray]",Lr="[object Uint16Array]",Yn="[object Uint32Array]",On={};On[Je]=On[nt]=On[or]=On[Ar]=On[ut]=On[ht]=On[Ir]=On[_n]=On[Un]=On[Qn]=On[Jn]=On[Lt]=On[dr]=On[Zt]=On[Cr]=On[yt]=On[Vt]=On[Er]=On[Vn]=On[jn]=On[Lr]=On[Yn]=!0,On[_t]=On[Dt]=On[sr]=!1;function Sn(bn,Mn,gi,Oi,Pa,va){var ti,Tn=Mn&Ie,bi=Mn&Ve,Wn=Mn&Ze;if(gi&&(ti=Pa?gi(bn,Oi,Pa,va):gi(bn)),ti!==void 0)return ti;if(!ve(bn))return bn;var Ei=de(bn);if(Ei){if(ti=V(bn),!Tn)return o(bn,ti)}else{var Ki=B(bn),sa=Ki==Dt||Ki==qt;if(ae(bn))return a(bn,Tn);if(Ki==Zt||Ki==Je||sa&&!Pa){if(ti=bi||sa?{}:ie(bn),!Tn)return bi?d(bn,i(ti,bn)):s(bn,n(ti,bn))}else{if(!On[Ki])return Pa?bn:{};ti=X(bn,Ki,Tn)}}va||(va=new t);var xa=va.get(bn);if(xa)return xa;va.set(bn,ti),Se(bn)?bn.forEach(function(go){ti.add(Sn(go,Mn,gi,go,bn,va))}):U(bn)&&bn.forEach(function(go,Co){ti.set(Co,Sn(go,Mn,gi,Co,bn,va))});var Qa=Wn?bi?L:b:bi?Me:Pe,is=Ei?void 0:Qa(bn);return e(is||bn,function(go,Co){is&&(Co=go,go=bn[Co]),r(ti,Co,Sn(go,Mn,gi,Co,bn,va))}),ti}return lne=Sn,lne}var une,eMe;function n3t(){if(eMe)return une;eMe=1;var t=tX(),e=1,r=4;function n(i){return t(i,e|r)}return une=n,une}var i3t=n3t();const Xz=Qh(i3t);var cne={},tMe;function a3t(){return tMe||(tMe=1,(function(t){t.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendAll:"assignInAll",extendAllWith:"assignInAllWith",extendWith:"assignInWith",first:"head",conforms:"conformsTo",matches:"isMatch",property:"get",__:"placeholder",F:"stubFalse",T:"stubTrue",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",dropLast:"dropRight",dropLastWhile:"dropRightWhile",equals:"isEqual",identical:"eq",indexBy:"keyBy",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",pluck:"map",prop:"get",propEq:"matchesProperty",propOr:"getOr",props:"at",symmetricDifference:"xor",symmetricDifferenceBy:"xorBy",symmetricDifferenceWith:"xorWith",takeLast:"takeRight",takeLastWhile:"takeRightWhile",unapply:"rest",unnest:"flatten",useWith:"overArgs",where:"conformsTo",whereEq:"isMatch",zipObj:"zipObject"},t.aryMethod={1:["assignAll","assignInAll","attempt","castArray","ceil","create","curry","curryRight","defaultsAll","defaultsDeepAll","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","mergeAll","methodOf","mixin","nthArg","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words","zipAll"],2:["add","after","ary","assign","assignAllWith","assignIn","assignInAllWith","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","conformsTo","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","defaultTo","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","mergeAllWith","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","propertyOf","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","findFrom","findIndexFrom","findLastFrom","findLastIndexFrom","getOr","includesFrom","indexOfFrom","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","lastIndexOfFrom","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","rangeStep","rangeStepRight","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],4:["fill","setWith","updateWith"]},t.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},t.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},t.iterateeRearg={mapKeys:[1],reduceRight:[1,0]},t.methodRearg={assignInAllWith:[1,0],assignInWith:[1,2,0],assignAllWith:[1,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],rangeStep:[1,2,0],rangeStepRight:[1,2,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},t.methodSpread={assignAll:{start:0},assignAllWith:{start:0},assignInAll:{start:0},assignInAllWith:{start:0},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{start:0},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},t.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},t.realToAlias=(function(){var e=Object.prototype.hasOwnProperty,r=t.aliasToReal,n={};for(var i in r){var a=r[i];e.call(n,a)?n[a].push(i):n[a]=[i]}return n})(),t.remap={assignAll:"assign",assignAllWith:"assignWith",assignInAll:"assignIn",assignInAllWith:"assignInWith",curryN:"curry",curryRightN:"curryRight",defaultsAll:"defaults",defaultsDeepAll:"defaultsDeep",findFrom:"find",findIndexFrom:"findIndex",findLastFrom:"findLast",findLastIndexFrom:"findLastIndex",getOr:"get",includesFrom:"includes",indexOfFrom:"indexOf",invokeArgs:"invoke",invokeArgsMap:"invokeMap",lastIndexOfFrom:"lastIndexOf",mergeAll:"merge",mergeAllWith:"mergeWith",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",propertyOf:"get",rangeStep:"range",rangeStepRight:"rangeRight",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart",zipAll:"zip"},t.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},t.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}})(cne)),cne}var fne,rMe;function uge(){return rMe||(rMe=1,fne={}),fne}var dne,nMe;function o3t(){if(nMe)return dne;nMe=1;var t=a3t(),e=uge(),r=Array.prototype.push;function n(L,B){return B==2?function(V,X){return L.apply(void 0,arguments)}:function(V){return L.apply(void 0,arguments)}}function i(L,B){return B==2?function(V,X){return L(V,X)}:function(V){return L(V)}}function a(L){for(var B=L?L.length:0,V=Array(B);B--;)V[B]=L[B];return V}function o(L){return function(B){return L({},B)}}function s(L,B){return function(){for(var V=arguments.length,X=V-1,ie=Array(V);V--;)ie[V]=arguments[V];var de=ie[B],ae=ie.slice(0,B);return de&&r.apply(ae,de),B!=X&&r.apply(ae,ie.slice(B+1)),L.apply(this,ae)}}function d(L,B){return function(){var V=arguments.length;if(V){for(var X=Array(V);V--;)X[V]=arguments[V];var ie=X[0]=B.apply(void 0,X);return L.apply(void 0,X),ie}}}function b(L,B,V,X){var ie=typeof B=="function",de=B===Object(B);if(de&&(X=V,V=B,B=void 0),V==null)throw new TypeError;X||(X={});var ae={cap:"cap"in X?X.cap:!0,curry:"curry"in X?X.curry:!0,fixed:"fixed"in X?X.fixed:!0,immutable:"immutable"in X?X.immutable:!0,rearg:"rearg"in X?X.rearg:!0},U=ie?V:e,ve="curry"in X&&X.curry,Se="fixed"in X&&X.fixed,Pe="rearg"in X&&X.rearg,Me=ie?V.runInContext():void 0,Ie=ie?V:{ary:L.ary,assign:L.assign,clone:L.clone,curry:L.curry,forEach:L.forEach,isArray:L.isArray,isError:L.isError,isFunction:L.isFunction,isWeakMap:L.isWeakMap,iteratee:L.iteratee,keys:L.keys,rearg:L.rearg,toInteger:L.toInteger,toPath:L.toPath},Ve=Ie.ary,Ze=Ie.assign,Je=Ie.clone,nt=Ie.curry,ut=Ie.forEach,ht=Ie.isArray,_t=Ie.isError,Dt=Ie.isFunction,qt=Ie.isWeakMap,Lt=Ie.keys,dr=Ie.rearg,Zt=Ie.toInteger,Cr=Ie.toPath,yt=Lt(t.aryMethod),Vt={castArray:function(On){return function(){var Sn=arguments[0];return ht(Sn)?On(a(Sn)):On.apply(void 0,arguments)}},iteratee:function(On){return function(){var Sn=arguments[0],bn=arguments[1],Mn=On(Sn,bn),gi=Mn.length;return ae.cap&&typeof bn=="number"?(bn=bn>2?bn-2:1,gi&&gi<=bn?Mn:i(Mn,bn)):Mn}},mixin:function(On){return function(Sn){var bn=this;if(!Dt(bn))return On(bn,Object(Sn));var Mn=[];return ut(Lt(Sn),function(gi){Dt(Sn[gi])&&Mn.push([gi,bn.prototype[gi]])}),On(bn,Object(Sn)),ut(Mn,function(gi){var Oi=gi[1];Dt(Oi)?bn.prototype[gi[0]]=Oi:delete bn.prototype[gi[0]]}),bn}},nthArg:function(On){return function(Sn){var bn=Sn<0?1:Zt(Sn)+1;return nt(On(Sn),bn)}},rearg:function(On){return function(Sn,bn){var Mn=bn?bn.length:0;return nt(On(Sn,bn),Mn)}},runInContext:function(On){return function(Sn){return b(L,On(Sn),X)}}};function Er(On,Sn){if(ae.cap){var bn=t.iterateeRearg[On];if(bn)return Jn(Sn,bn);var Mn=!ie&&t.iterateeAry[On];if(Mn)return Qn(Sn,Mn)}return Sn}function sr(On,Sn,bn){return ve||ae.curry&&bn>1?nt(Sn,bn):Sn}function or(On,Sn,bn){if(ae.fixed&&(Se||!t.skipFixed[On])){var Mn=t.methodSpread[On],gi=Mn&&Mn.start;return gi===void 0?Ve(Sn,bn):s(Sn,gi)}return Sn}function Ar(On,Sn,bn){return ae.rearg&&bn>1&&(Pe||!t.skipRearg[On])?dr(Sn,t.methodRearg[On]||t.aryRearg[bn]):Sn}function Ir(On,Sn){Sn=Cr(Sn);for(var bn=-1,Mn=Sn.length,gi=Mn-1,Oi=Je(Object(On)),Pa=Oi;Pa!=null&&++bn<Mn;){var va=Sn[bn],ti=Pa[va];ti!=null&&!(Dt(ti)||_t(ti)||qt(ti))&&(Pa[va]=Je(bn==gi?ti:Object(ti))),Pa=Pa[va]}return Oi}function _n(On){return Lr.runInContext.convert(On)(void 0)}function Un(On,Sn){var bn=t.aliasToReal[On]||On,Mn=t.remap[bn]||bn,gi=X;return function(Oi){var Pa=ie?Me:Ie,va=ie?Me[Mn]:Sn,ti=Ze(Ze({},gi),Oi);return b(Pa,bn,va,ti)}}function Qn(On,Sn){return Vn(On,function(bn){return typeof bn=="function"?i(bn,Sn):bn})}function Jn(On,Sn){return Vn(On,function(bn){var Mn=Sn.length;return n(dr(i(bn,Mn),Sn),Mn)})}function Vn(On,Sn){return function(){var bn=arguments.length;if(!bn)return On();for(var Mn=Array(bn);bn--;)Mn[bn]=arguments[bn];var gi=ae.rearg?0:bn-1;return Mn[gi]=Sn(Mn[gi]),On.apply(void 0,Mn)}}function jn(On,Sn,bn){var Mn,gi=t.aliasToReal[On]||On,Oi=Sn,Pa=Vt[gi];return Pa?Oi=Pa(Sn):ae.immutable&&(t.mutate.array[gi]?Oi=d(Sn,a):t.mutate.object[gi]?Oi=d(Sn,o(Sn)):t.mutate.set[gi]&&(Oi=d(Sn,Ir))),ut(yt,function(va){return ut(t.aryMethod[va],function(ti){if(gi==ti){var Tn=t.methodSpread[gi],bi=Tn&&Tn.afterRearg;return Mn=bi?or(gi,Ar(gi,Oi,va),va):Ar(gi,or(gi,Oi,va),va),Mn=Er(gi,Mn),Mn=sr(gi,Mn,va),!1}}),!Mn}),Mn||(Mn=Oi),Mn==Sn&&(Mn=ve?nt(Mn,1):function(){return Sn.apply(this,arguments)}),Mn.convert=Un(gi,Sn),Mn.placeholder=Sn.placeholder=bn,Mn}if(!de)return jn(B,V,U);var Lr=V,Yn=[];return ut(yt,function(On){ut(t.aryMethod[On],function(Sn){var bn=Lr[t.remap[Sn]||Sn];bn&&Yn.push([Sn,jn(Sn,bn,Lr)])})}),ut(Lt(Lr),function(On){var Sn=Lr[On];if(typeof Sn=="function"){for(var bn=Yn.length;bn--;)if(Yn[bn][0]==On)return;Sn.convert=Un(On,Sn),Yn.push([On,Sn])}}),ut(Yn,function(On){Lr[On[0]]=On[1]}),Lr.convert=_n,Lr.placeholder=Lr,ut(Lt(Lr),function(On){ut(t.realToAlias[On]||[],function(Sn){Lr[Sn]=Lr[On]})}),Lr}return dne=b,dne}var hne,iMe;function HUe(){if(iMe)return hne;iMe=1;var t=eUe(),e=t&&new t;return hne=e,hne}var pne,aMe;function jUe(){if(aMe)return pne;aMe=1;var t=YY(),e=HUe(),r=e?function(n,i){return e.set(n,i),n}:t;return pne=r,pne}var vne,oMe;function rX(){if(oMe)return vne;oMe=1;var t=eX(),e=gE();function r(n){return function(){var i=arguments;switch(i.length){case 0:return new n;case 1:return new n(i[0]);case 2:return new n(i[0],i[1]);case 3:return new n(i[0],i[1],i[2]);case 4:return new n(i[0],i[1],i[2],i[3]);case 5:return new n(i[0],i[1],i[2],i[3],i[4]);case 6:return new n(i[0],i[1],i[2],i[3],i[4],i[5]);case 7:return new n(i[0],i[1],i[2],i[3],i[4],i[5],i[6])}var a=t(n.prototype),o=n.apply(a,i);return e(o)?o:a}}return vne=r,vne}var mne,sMe;function s3t(){if(sMe)return mne;sMe=1;var t=rX(),e=Y2(),r=1;function n(i,a,o){var s=a&r,d=t(i);function b(){var L=this&&this!==e&&this instanceof b?d:i;return L.apply(s?o:this,arguments)}return b}return mne=n,mne}var gne,lMe;function VUe(){if(lMe)return gne;lMe=1;var t=Math.max;function e(r,n,i,a){for(var o=-1,s=r.length,d=i.length,b=-1,L=n.length,B=t(s-d,0),V=Array(L+B),X=!a;++b<L;)V[b]=n[b];for(;++o<d;)(X||o<s)&&(V[i[o]]=r[o]);for(;B--;)V[b++]=r[o++];return V}return gne=e,gne}var yne,uMe;function qUe(){if(uMe)return yne;uMe=1;var t=Math.max;function e(r,n,i,a){for(var o=-1,s=r.length,d=-1,b=i.length,L=-1,B=n.length,V=t(s-b,0),X=Array(V+B),ie=!a;++o<V;)X[o]=r[o];for(var de=o;++L<B;)X[de+L]=n[L];for(;++d<b;)(ie||o<s)&&(X[de+i[d]]=r[o++]);return X}return yne=e,yne}var bne,cMe;function l3t(){if(cMe)return bne;cMe=1;function t(e,r){for(var n=e.length,i=0;n--;)e[n]===r&&++i;return i}return bne=t,bne}var xne,fMe;function cge(){if(fMe)return xne;fMe=1;function t(){}return xne=t,xne}var _ne,dMe;function fge(){if(dMe)return _ne;dMe=1;var t=eX(),e=cge(),r=4294967295;function n(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=r,this.__views__=[]}return n.prototype=t(e.prototype),n.prototype.constructor=n,_ne=n,_ne}var wne,hMe;function GUe(){if(hMe)return wne;hMe=1;function t(){}return wne=t,wne}var Sne,pMe;function $Ue(){if(pMe)return Sne;pMe=1;var t=HUe(),e=GUe(),r=t?function(n){return t.get(n)}:e;return Sne=r,Sne}var Tne,vMe;function u3t(){if(vMe)return Tne;vMe=1;var t={};return Tne=t,Tne}var Ene,mMe;function c3t(){if(mMe)return Ene;mMe=1;var t=u3t(),e=Object.prototype,r=e.hasOwnProperty;function n(i){for(var a=i.name+"",o=t[a],s=r.call(t,a)?o.length:0;s--;){var d=o[s],b=d.func;if(b==null||b==i)return d.name}return a}return Ene=n,Ene}var Ane,gMe;function WUe(){if(gMe)return Ane;gMe=1;var t=eX(),e=cge();function r(n,i){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!i,this.__index__=0,this.__values__=void 0}return r.prototype=t(e.prototype),r.prototype.constructor=r,Ane=r,Ane}var Cne,yMe;function f3t(){if(yMe)return Cne;yMe=1;var t=fge(),e=WUe(),r=GB();function n(i){if(i instanceof t)return i.clone();var a=new e(i.__wrapped__,i.__chain__);return a.__actions__=r(i.__actions__),a.__index__=i.__index__,a.__values__=i.__values__,a}return Cne=n,Cne}var Mne,bMe;function d3t(){if(bMe)return Mne;bMe=1;var t=fge(),e=WUe(),r=cge(),n=Rb(),i=mE(),a=f3t(),o=Object.prototype,s=o.hasOwnProperty;function d(b){if(i(b)&&!n(b)&&!(b instanceof t)){if(b instanceof e)return b;if(s.call(b,"__wrapped__"))return a(b)}return new e(b)}return d.prototype=r.prototype,d.prototype.constructor=d,Mne=d,Mne}var Rne,xMe;function h3t(){if(xMe)return Rne;xMe=1;var t=fge(),e=$Ue(),r=c3t(),n=d3t();function i(a){var o=r(a),s=n[o];if(typeof s!="function"||!(o in t.prototype))return!1;if(a===s)return!0;var d=e(s);return!!d&&a===d[0]}return Rne=i,Rne}var kne,_Me;function YUe(){if(_Me)return kne;_Me=1;var t=jUe(),e=NUe(),r=e(t);return kne=r,kne}var Ine,wMe;function p3t(){if(wMe)return Ine;wMe=1;var t=/\{\n\/\* \[wrapped with (.+)\] \*/,e=/,? & /;function r(n){var i=n.match(t);return i?i[1].split(e):[]}return Ine=r,Ine}var Pne,SMe;function v3t(){if(SMe)return Pne;SMe=1;var t=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function e(r,n){var i=n.length;if(!i)return r;var a=i-1;return n[a]=(i>1?"& ":"")+n[a],n=n.join(i>2?", ":" "),r.replace(t,`{
/* [wrapped with `+n+`] */
`)}return Pne=e,Pne}var Dne,TMe;function XUe(){if(TMe)return Dne;TMe=1;var t=gUe();function e(r,n){var i=r==null?0:r.length;return!!i&&t(r,n,0)>-1}return Dne=e,Dne}var Lne,EMe;function m3t(){if(EMe)return Lne;EMe=1;var t=lge(),e=XUe(),r=1,n=2,i=8,a=16,o=32,s=64,d=128,b=256,L=512,B=[["ary",d],["bind",r],["bindKey",n],["curry",i],["curryRight",a],["flip",L],["partial",o],["partialRight",s],["rearg",b]];function V(X,ie){return t(B,function(de){var ae="_."+de[0];ie&de[1]&&!e(X,ae)&&X.push(ae)}),X.sort()}return Lne=V,Lne}var One,AMe;function ZUe(){if(AMe)return One;AMe=1;var t=p3t(),e=v3t(),r=sge(),n=m3t();function i(a,o,s){var d=o+"";return r(a,e(d,n(t(d),s)))}return One=i,One}var Nne,CMe;function KUe(){if(CMe)return Nne;CMe=1;var t=h3t(),e=YUe(),r=ZUe(),n=4,i=8,a=32,o=64;function s(d,b,L,B,V,X,ie,de,ae,U){var ve=b&i,Se=ve?ie:void 0,Pe=ve?void 0:ie,Me=ve?X:void 0,Ie=ve?void 0:X;b|=ve?a:o,b&=~(ve?o:a),b&n||(b&=-4);var Ve=[d,b,V,Me,Se,Ie,Pe,de,ae,U],Ze=L.apply(void 0,Ve);return t(d)&&e(Ze,Ve),Ze.placeholder=B,r(Ze,d,b)}return Nne=s,Nne}var Fne,MMe;function JUe(){if(MMe)return Fne;MMe=1;function t(e){var r=e;return r.placeholder}return Fne=t,Fne}var zne,RMe;function g3t(){if(RMe)return zne;RMe=1;var t=GB(),e=G8(),r=Math.min;function n(i,a){for(var o=i.length,s=r(a.length,o),d=t(i);s--;){var b=a[s];i[s]=e(b,o)?d[b]:void 0}return i}return zne=n,zne}var Bne,kMe;function dge(){if(kMe)return Bne;kMe=1;var t="__lodash_placeholder__";function e(r,n){for(var i=-1,a=r.length,o=0,s=[];++i<a;){var d=r[i];(d===n||d===t)&&(r[i]=t,s[o++]=i)}return s}return Bne=e,Bne}var Une,IMe;function QUe(){if(IMe)return Une;IMe=1;var t=VUe(),e=qUe(),r=l3t(),n=rX(),i=KUe(),a=JUe(),o=g3t(),s=dge(),d=Y2(),b=1,L=2,B=8,V=16,X=128,ie=512;function de(ae,U,ve,Se,Pe,Me,Ie,Ve,Ze,Je){var nt=U&X,ut=U&b,ht=U&L,_t=U&(B|V),Dt=U&ie,qt=ht?void 0:n(ae);function Lt(){for(var dr=arguments.length,Zt=Array(dr),Cr=dr;Cr--;)Zt[Cr]=arguments[Cr];if(_t)var yt=a(Lt),Vt=r(Zt,yt);if(Se&&(Zt=t(Zt,Se,Pe,_t)),Me&&(Zt=e(Zt,Me,Ie,_t)),dr-=Vt,_t&&dr<Je){var Er=s(Zt,yt);return i(ae,U,de,Lt.placeholder,ve,Zt,Er,Ve,Ze,Je-dr)}var sr=ut?ve:this,or=ht?sr[ae]:ae;return dr=Zt.length,Ve?Zt=o(Zt,Ve):Dt&&dr>1&&Zt.reverse(),nt&&Ze<dr&&(Zt.length=Ze),this&&this!==d&&this instanceof Lt&&(or=qt||n(or)),or.apply(sr,Zt)}return Lt}return Une=de,Une}var Hne,PMe;function y3t(){if(PMe)return Hne;PMe=1;var t=oge(),e=rX(),r=QUe(),n=KUe(),i=JUe(),a=dge(),o=Y2();function s(d,b,L){var B=e(d);function V(){for(var X=arguments.length,ie=Array(X),de=X,ae=i(V);de--;)ie[de]=arguments[de];var U=X<3&&ie[0]!==ae&&ie[X-1]!==ae?[]:a(ie,ae);if(X-=U.length,X<L)return n(d,b,r,V.placeholder,void 0,ie,U,void 0,void 0,L-X);var ve=this&&this!==o&&this instanceof V?B:d;return t(ve,this,ie)}return V}return Hne=s,Hne}var jne,DMe;function b3t(){if(DMe)return jne;DMe=1;var t=oge(),e=rX(),r=Y2(),n=1;function i(a,o,s,d){var b=o&n,L=e(a);function B(){for(var V=-1,X=arguments.length,ie=-1,de=d.length,ae=Array(de+X),U=this&&this!==r&&this instanceof B?L:a;++ie<de;)ae[ie]=d[ie];for(;X--;)ae[ie++]=arguments[++V];return t(U,b?s:this,ae)}return B}return jne=i,jne}var Vne,LMe;function x3t(){if(LMe)return Vne;LMe=1;var t=VUe(),e=qUe(),r=dge(),n="__lodash_placeholder__",i=1,a=2,o=4,s=8,d=128,b=256,L=Math.min;function B(V,X){var ie=V[1],de=X[1],ae=ie|de,U=ae<(i|a|d),ve=de==d&&ie==s||de==d&&ie==b&&V[7].length<=X[8]||de==(d|b)&&X[7].length<=X[8]&&ie==s;if(!(U||ve))return V;de&i&&(V[2]=X[2],ae|=ie&i?0:o);var Se=X[3];if(Se){var Pe=V[3];V[3]=Pe?t(Pe,Se,X[4]):Se,V[4]=Pe?r(V[3],n):X[4]}return Se=X[5],Se&&(Pe=V[5],V[5]=Pe?e(Pe,Se,X[6]):Se,V[6]=Pe?r(V[5],n):X[6]),Se=X[7],Se&&(V[7]=Se),de&d&&(V[8]=V[8]==null?X[8]:L(V[8],X[8])),V[9]==null&&(V[9]=X[9]),V[0]=X[0],V[1]=ae,V}return Vne=B,Vne}var qne,OMe;function hge(){if(OMe)return qne;OMe=1;var t=jUe(),e=s3t(),r=y3t(),n=QUe(),i=b3t(),a=$Ue(),o=x3t(),s=YUe(),d=ZUe(),b=qB(),L="Expected a function",B=1,V=2,X=8,ie=16,de=32,ae=64,U=Math.max;function ve(Se,Pe,Me,Ie,Ve,Ze,Je,nt){var ut=Pe&V;if(!ut&&typeof Se!="function")throw new TypeError(L);var ht=Ie?Ie.length:0;if(ht||(Pe&=-97,Ie=Ve=void 0),Je=Je===void 0?Je:U(b(Je),0),nt=nt===void 0?nt:b(nt),ht-=Ve?Ve.length:0,Pe&ae){var _t=Ie,Dt=Ve;Ie=Ve=void 0}var qt=ut?void 0:a(Se),Lt=[Se,Pe,Me,Ie,Ve,_t,Dt,Ze,Je,nt];if(qt&&o(Lt,qt),Se=Lt[0],Pe=Lt[1],Me=Lt[2],Ie=Lt[3],Ve=Lt[4],nt=Lt[9]=Lt[9]===void 0?ut?0:Se.length:U(Lt[9]-ht,0),!nt&&Pe&(X|ie)&&(Pe&=-25),!Pe||Pe==B)var dr=e(Se,Pe,Me);else Pe==X||Pe==ie?dr=r(Se,Pe,nt):(Pe==de||Pe==(B|de))&&!Ve.length?dr=i(Se,Pe,Me,Ie):dr=n.apply(void 0,Lt);var Zt=qt?t:s;return d(Zt(dr,Lt),Se,Pe)}return qne=ve,qne}var Gne,NMe;function _3t(){if(NMe)return Gne;NMe=1;var t=hge(),e=128;function r(n,i,a){return i=a?void 0:i,i=n&&i==null?n.length:i,t(n,e,void 0,void 0,void 0,void 0,i)}return Gne=r,Gne}var $ne,FMe;function w3t(){if(FMe)return $ne;FMe=1;var t=tX(),e=4;function r(n){return t(n,e)}return $ne=r,$ne}var Wne,zMe;function S3t(){if(zMe)return Wne;zMe=1;var t=hge(),e=8;function r(n,i,a){i=a?void 0:i;var o=t(n,e,void 0,void 0,void 0,void 0,void 0,i);return o.placeholder=r.placeholder,o}return r.placeholder={},Wne=r,Wne}var Yne,BMe;function T3t(){if(BMe)return Yne;BMe=1;var t=g4(),e=mE(),r=ige(),n="[object DOMException]",i="[object Error]";function a(o){if(!e(o))return!1;var s=t(o);return s==i||s==n||typeof o.message=="string"&&typeof o.name=="string"&&!r(o)}return Yne=a,Yne}var Xne,UMe;function E3t(){if(UMe)return Xne;UMe=1;var t=GL(),e=mE(),r="[object WeakMap]";function n(i){return e(i)&&t(i)==r}return Xne=n,Xne}var Zne,HMe;function A3t(){if(HMe)return Zne;HMe=1;var t=tX(),e=y4(),r=1;function n(i){return e(typeof i=="function"?i:t(i,r))}return Zne=n,Zne}var Kne,jMe;function C3t(){if(jMe)return Kne;jMe=1;var t=V8(),e=HB(),r=Rb(),n=t?t.isConcatSpreadable:void 0;function i(a){return r(a)||e(a)||!!(n&&a&&a[n])}return Kne=i,Kne}var Jne,VMe;function eHe(){if(VMe)return Jne;VMe=1;var t=Bme(),e=C3t();function r(n,i,a,o,s){var d=-1,b=n.length;for(a||(a=e),s||(s=[]);++d<b;){var L=n[d];i>0&&a(L)?i>1?r(L,i-1,a,o,s):t(s,L):o||(s[s.length]=L)}return s}return Jne=r,Jne}var Qne,qMe;function M3t(){if(qMe)return Qne;qMe=1;var t=eHe();function e(r){var n=r==null?0:r.length;return n?t(r,1):[]}return Qne=e,Qne}var eie,GMe;function tHe(){if(GMe)return eie;GMe=1;var t=M3t(),e=OUe(),r=sge();function n(i){return r(e(i,void 0,t),i+"")}return eie=n,eie}var tie,$Me;function R3t(){if($Me)return tie;$Me=1;var t=hge(),e=tHe(),r=256,n=e(function(i,a){return t(i,r,void 0,void 0,void 0,a)});return tie=n,tie}var rie,WMe;function k3t(){if(WMe)return rie;WMe=1;var t=$8(),e=GB(),r=Rb(),n=q8(),i=nUe(),a=$L(),o=W8();function s(d){return r(d)?t(d,a):n(d)?[d]:e(i(o(d)))}return rie=s,rie}var nie,YMe;function I3t(){return YMe||(YMe=1,nie={ary:_3t(),assign:zUe(),clone:w3t(),curry:S3t(),forEach:lge(),isArray:Rb(),isError:T3t(),isFunction:UB(),isWeakMap:E3t(),iteratee:A3t(),keys:qme(),rearg:R3t(),toInteger:qB(),toPath:k3t()}),nie}var iie,XMe;function rHe(){if(XMe)return iie;XMe=1;var t=o3t(),e=I3t();function r(n,i,a){return t(e,n,i,a)}return iie=r,iie}var aie,ZMe;function P3t(){if(ZMe)return aie;ZMe=1;var t=age(),e=VB(),r=G8(),n=gE(),i=$L();function a(o,s,d,b){if(!n(o))return o;s=e(s,o);for(var L=-1,B=s.length,V=B-1,X=o;X!=null&&++L<B;){var ie=i(s[L]),de=d;if(ie==="__proto__"||ie==="constructor"||ie==="prototype")return o;if(L!=V){var ae=X[ie];de=b?b(ae,ie,X):void 0,de===void 0&&(de=n(ae)?ae:r(s[L+1])?[]:{})}t(X,ie,de),X=X[ie]}return o}return aie=a,aie}var oie,KMe;function D3t(){if(KMe)return oie;KMe=1;var t=P3t();function e(r,n,i){return r==null?r:t(r,n,i)}return oie=e,oie}var sie,JMe;function L3t(){if(JMe)return sie;JMe=1;var t=rHe(),e=t("set",D3t());return e.placeholder=uge(),sie=e,sie}var O3t=L3t();const N3t=Qh(O3t);var lie,QMe;function nHe(){if(QMe)return lie;QMe=1;function t(e){var r=e==null?0:e.length;return r?e[r-1]:void 0}return lie=t,lie}var uie,e5e;function F3t(){if(e5e)return uie;e5e=1;var t=Wme(),e=lUe();function r(n,i){return i.length<2?n:t(n,e(i,0,-1))}return uie=r,uie}var cie,t5e;function pge(){if(t5e)return cie;t5e=1;var t=VB(),e=nHe(),r=F3t(),n=$L();function i(a,o){return o=t(o,a),a=r(a,o),a==null||delete a[n(e(o))]}return cie=i,cie}var fie,r5e;function z3t(){if(r5e)return fie;r5e=1;var t=pge();function e(r,n){return r==null?!0:t(r,n)}return fie=e,fie}var die,n5e;function B3t(){if(n5e)return die;n5e=1;var t=rHe(),e=t("unset",z3t());return e.placeholder=uge(),die=e,die}var U3t=B3t();const H3t=Qh(U3t);var j3t=UB();const V3t=Qh(j3t);var hie,i5e;function q3t(){if(i5e)return hie;i5e=1;var t=pge(),e=G8(),r=Array.prototype,n=r.splice;function i(a,o){for(var s=a?o.length:0,d=s-1;s--;){var b=o[s];if(s==d||b!==L){var L=b;e(b)?n.call(a,b,1):t(a,b)}}return a}return hie=i,hie}var pie,a5e;function G3t(){if(a5e)return pie;a5e=1;var t=y4(),e=q3t();function r(n,i){var a=[];if(!(n&&n.length))return a;var o=-1,s=[],d=n.length;for(i=t(i,3);++o<d;){var b=n[o];i(b,o,n)&&(a.push(b),s.push(o))}return e(n,s),a}return pie=r,pie}G3t();var vie,o5e;function $3t(){if(o5e)return vie;o5e=1;function t(e,r,n){return e===e&&(n!==void 0&&(e=e<=n?e:n),r!==void 0&&(e=e>=r?e:r)),e}return vie=t,vie}var mie,s5e;function W3t(){if(s5e)return mie;s5e=1;var t=$3t(),e=iUe(),r=qB(),n=W8();function i(a,o,s){a=n(a),o=e(o);var d=a.length;s=s===void 0?d:t(r(s),0,d);var b=s;return s-=o.length,s>=0&&a.slice(s,b)==o}return mie=i,mie}W3t();nHe();var gie,l5e;function Y3t(){if(l5e)return gie;l5e=1;function t(e,r,n,i,a){return a(e,function(o,s,d){n=i?(i=!1,o):r(n,o,s,d)}),n}return gie=t,gie}var yie,u5e;function X3t(){if(u5e)return yie;u5e=1;var t=sUe(),e=Qme(),r=y4(),n=Y3t(),i=Rb();function a(o,s,d){var b=i(o)?t:n,L=arguments.length<3;return b(o,r(s,4),d,L,e)}return yie=a,yie}var Z3t=X3t();const c5e=Qh(Z3t);var bie,f5e;function K3t(){if(f5e)return bie;f5e=1;var t=$8();function e(r,n){return t(n,function(i){return[i,r[i]]})}return bie=e,bie}var xie,d5e;function J3t(){if(d5e)return xie;d5e=1;function t(e){var r=-1,n=Array(e.size);return e.forEach(function(i){n[++r]=[i,i]}),n}return xie=t,xie}var _ie,h5e;function Q3t(){if(h5e)return _ie;h5e=1;var t=K3t(),e=GL(),r=$Be(),n=J3t(),i="[object Map]",a="[object Set]";function o(s){return function(d){var b=e(d);return b==i?r(d):b==a?n(d):t(d,s(d))}}return _ie=o,_ie}var wie,p5e;function eAt(){if(p5e)return wie;p5e=1;var t=Q3t(),e=Hk(),r=t(e);return wie=r,wie}var tAt=eAt();const rAt=Qh(tAt),hG="additionalProperties",pG="required",nAt=(t,e)=>{const r={};return t.filter(n=>{const i=e(n);return Object.prototype.hasOwnProperty.call(r,i)?!1:(r[i]=!0,!0)})};class iAt{constructor(e){this.findOption=e,this.schemaObject=r=>{const n=this.properties(r),i={type:"object",properties:n,additionalProperties:this.findOption(n)(hG)},a=this.findOption(n)(pG);return a.length>0&&(i.required=a),i},this.properties=r=>{const n={};return Object.keys(r).reduce((i,a)=>(i[a]=this.property(r[a]),i),n)},this.property=r=>{switch(typeof r){case"string":return{type:"string"};case"boolean":return{type:"boolean"};case"number":return Number.isInteger(r)?{type:"integer"}:{type:"number"};case"object":return r==null?{type:"null"}:this.schemaObjectOrArray(r);default:return{}}},this.schemaObjectOrArray=r=>r instanceof Array?this.schemaArray(r):this.schemaObject(r),this.schemaArray=r=>{if(r.length>0){const n=r.map(this.property),i=nAt(n,a=>JSON.stringify(a));return i.length===1?{type:"array",items:i[0]}:{type:"array",items:{oneOf:i}}}else return{type:"array",items:{}}}}}const iHe=(t,e={})=>{const r=i=>a=>{switch(a){case hG:return Object.prototype.hasOwnProperty.call(e,hG)?e[hG]:!0;case pG:return Object.prototype.hasOwnProperty.call(e,pG)?e[pG](i):Object.keys(i);default:return}};return new iAt(r).schemaObject(t)},vge=new Set,aHe=(t,e)=>e<=1?t:t+e.toString(),aAt=(t,e)=>{const r=aHe(t,e);return!vge.has(r)},Ghe=t=>{t===void 0&&(t="undefined");let e=0;for(;!aAt(t,e);)e++;const r=aHe(t,e);return vge.add(r),r},$he=t=>vge.delete(t),X8=(t,e)=>{let r=t;return!Eh(t)&&!Eh(e)&&!e.startsWith("[")&&(r=t+"."),Eh(r)?e:Eh(e)?r:`${r}${e}`},oHe=t=>{const n=t.replace(/(anyOf|allOf|oneOf)\/[\d]+\//g,"").replace(/(then|else)\//g,"").split("/").map(WB),a=n[0]==="#"||n[0]===""?2:1;return XY(a,n.length,2).map(o=>n[o])},u$=t=>t?.replace(/~/g,"~0").replace(/\//g,"~1"),WB=t=>t?.replace(/~1/g,"/").replace(/~0/,"~"),sHe=t=>`/properties/${t.split(".").map(e=>u$(e)).join("/properties/")}`,Sie=(t,e)=>{if(e&&typeof e.title=="string")return e.title;if(typeof t.scope=="string"){const r=t.scope,n=WB(r.substr(r.lastIndexOf("/")+1));return Xme(n)}return""},oAt=(t,e)=>{const r=t.label;if(typeof r=="boolean")return Jj(Sie(t,e),r);if(typeof r=="string")return Jj(r,!0);if(typeof r=="object"){const n=typeof r.text=="string"?r.text:Sie(t,e),i=typeof r.show=="boolean"?r.show:!0;return Jj(n,i)}return Jj(Sie(t,e),!0)},Jj=(t,e)=>({text:t,show:e}),vG=(t,e)=>Eh(e)?t:e.split(".").reduce((n,i)=>{if(!(!n||!Object.prototype.hasOwnProperty.call(n,i)))return n[i]},t),sAt=t=>t==="#"||t===void 0||t==="",KS=(t,e,r)=>{const n=e?.split("/").map(WB);return mG(t,n,r)},mG=(t,e,r)=>{if(typeof t?.$ref=="string"&&(t=KS(r,t.$ref,r)),!e||e.length===0)return t;if(Eh(t))return;const[n,...i]=e;if(sAt(n))return mG(t,i,r);const a=fx(t,n),o=mG(a,i,r);if(o)return o;if(n==="properties"||n==="items"){let s;const d=[].concat(t.oneOf??[],t.allOf??[],t.anyOf??[],t.then??[],t.else??[]);for(const b of d)if(s=mG(b,[n,...i],r),s)break;return s}};var F5;(function(t){t.HIDE="HIDE",t.SHOW="SHOW",t.ENABLE="ENABLE",t.DISABLE="DISABLE"})(F5||(F5={}));const Whe=(t,e)=>{if(fAt(t)){if(cHe(t)&&t.scope.endsWith(sHe(e)))return t;if(t.options?.detail)return Whe(t.options.detail,e)}if(mge(t))for(const r of t.elements){const n=Whe(r,e);if(n!==void 0)return n}},lHe=(t,e)=>{if(!cHe(t))return e??"";const r=oHe(t.scope);return Eh(r)?e??"":X8(e,r.join("."))},uHe=t=>typeof t=="object"&&t!==null&&typeof t.i18n=="string",lAt=t=>t.type==="Group",mge=t=>t.elements!==void 0,uAt=t=>!!t&&typeof t=="object",cHe=t=>uAt(t)&&typeof t.scope=="string",cAt=t=>!!t&&typeof t=="object",fAt=t=>t.type==="Control",dAt=t=>t.type==="OR",hAt=t=>t.type==="AND",pAt=t=>t.type==="LEAF",vAt=t=>hUe(t,"schema"),mAt=t=>hUe(t,"validate")&&typeof t.validate=="function",Tie=(t,e)=>lHe(t,e),Yhe=(t,e,r,n,i)=>{if(hAt(r))return r.conditions.reduce((a,o)=>a&&Yhe(t,e,o,n,i),!0);if(dAt(r))return r.conditions.reduce((a,o)=>a||Yhe(t,e,o,n,i),!1);if(pAt(r))return vG(t,Tie(r,n))===r.expectedValue;if(vAt(r)){const a=vG(t,Tie(r,n));return r.failWhenUndefined&&a===void 0?!1:i.validate(r.schema,a)}else if(mAt(r)){const o={data:vG(t,Tie(r,n)),fullData:t,path:n,uischemaElement:e};return r.validate(o)}else return!0},fHe=(t,e,r,n)=>{const i=t.rule.condition;return Yhe(e,t,i,r,n)},gAt=(t,e,r=void 0,n)=>{const i=fHe(t,e,r,n);switch(t.rule.effect){case F5.HIDE:return!i;case F5.SHOW:return i;default:return!0}},yAt=(t,e,r=void 0,n)=>{const i=fHe(t,e,r,n);switch(t.rule.effect){case F5.DISABLE:return!i;case F5.ENABLE:return i;default:return!0}},gge=t=>!!(t.rule&&(t.rule.effect===F5.SHOW||t.rule.effect===F5.HIDE)),bAt=t=>!!(t.rule&&(t.rule.effect===F5.ENABLE||t.rule.effect===F5.DISABLE)),Z8=(t,e,r=void 0,n)=>t.rule?gAt(t,e,r,n):!0,xAt=(t,e,r=void 0,n)=>t.rule?yAt(t,e,r,n):!0,_At=t=>{if(t&&typeof t=="object"&&"properties"in t&&t.properties)return vUe(Object.keys(t.properties),e=>{const r=t.properties[e];return r&&typeof r=="object"&&"type"in r&&(r.type==="string"||r.type==="number"||r.type==="integer")})},P9=t=>!!t&&Object.prototype.hasOwnProperty.call(t,"oneOf")&&t.oneOf&&t.oneOf.every(e=>e.const!==void 0),dHe=t=>!!t&&typeof t=="object"&&(Object.prototype.hasOwnProperty.call(t,"enum")||Object.prototype.hasOwnProperty.call(t,"const")),wAt=(t,e)=>{const r=t.toISOString();return e==="date-time"?r:e==="date"?r.split("T")[0]:e==="time"?r.split("T")[1].split(".")[0]:r},U_=(t,e)=>yUe(cL(t),e),cL=t=>{if(Eh(t))return[];if(!Eh(t.type)&&typeof t.type=="string")return[t.type];if(mUe(t.type))return t.type;if(!Eh(t.properties)||!Eh(t.additionalProperties))return["object"];if(!Eh(t.items))return["array"];if(!Eh(t.enum)){const e=new Set;return t.enum.forEach(r=>{typeof r=="string"?e.add("string"):cL(r).forEach(n=>e.add(n))}),Array.from(e)}if(!Eh(t.allOf)){const e=vUe(t.allOf,r=>cL(r).length!==0);if(e)return cL(e)}return[]},JS={schema:KS,data:vG},SAt=t=>oHe(t.scope).join("."),yge={compose:X8,fromScoped:SAt},TAt=t=>{const e=new _Et({allErrors:!0,verbose:!0,strict:!1,addUsedSchema:!1,...t});return AEt(e),e},tk=(t,e)=>t===void 0?[]:t(e)?[]:t.errors,EAt="YYYY-MM-DD",AAt="HH:mm:ss",CAt="YYYY-MM-DDTHH:mm:ss.sssZ",MAt=t=>{switch(t.keyword){case"required":case"dependencies":return t.params.missingProperty;case"additionalProperties":return t.params.additionalProperty;default:return}},Xhe=t=>{let e=t.dataPath||t.instancePath||"";e=e.replace(/\//g,".");const r=MAt(t);return r!==void 0&&!e.endsWith(r)&&(e=`${e}.${r}`),e=e.replace(/^./,""),e=WB(e),e},RAt=(t,e,r)=>n=>{const i=aCe(n,a=>a.keyword==="oneOf"||a.keyword==="anyOf").map(a=>Xhe(a));return aCe(n,a=>{if(IAt.indexOf(a.keyword)!==-1&&!P9(a.parentSchema))return!1;const o=Xhe(a);let s=r(o);const d=a.parentSchema;return s&&!kAt(d)&&!P9(d)&&i.findIndex(b=>t.startsWith(b))!==-1&&(s=s&&ege(d,e)),s})},kAt=t=>t?.type==="object"||!!t?.properties,IAt=["additionalProperties","allOf","anyOf","oneOf"],hHe=t=>t==null?"":t.join(`
`),pHe=t=>({type:t,elements:[]}),gG=t=>({type:"Control",scope:t}),PAt=(t,e)=>{if(!Eh(t)&&!mge(t)){const r=pHe(e);return r.elements.push(t),r}return t},DAt=(t,e)=>{if(!Eh(e)){const r=Xme(e);if(lAt(t))t.label=r;else{const n={type:"Label",text:r};t.elements.push(n)}}},LAt=t=>!Eh(t)&&(!Eh(t.oneOf)||!Eh(t.anyOf)||!Eh(t.allOf)),Zhe=(t,e,r,n,i,a)=>{if(!Eh(t)&&t.$ref!==void 0)return Zhe(KS(a,t.$ref,a),e,r,n,i,a);if(LAt(t)){const s=gG(r);return e.push(s),s}const o=cL(t);if(o.length===0)return null;if(o.length>1){const s=gG(r);return e.push(s),s}if(r==="#"&&o[0]==="object"){const s=pHe(i);if(e.push(s),t.properties&&WSt(t.properties).length>1&&DAt(s,n),!Eh(t.properties)){const d=r+"/properties";Object.keys(t.properties).map(b=>{let L=t.properties[b];const B=`${d}/${u$(b)}`;L.$ref!==void 0&&(L=KS(a,L.$ref,a)),Zhe(L,s.elements,B,b,i,a)})}return s}switch(o[0]){case"object":case"array":case"string":case"number":case"integer":case"null":case"boolean":{const s=gG(r);return e.push(s),s}default:throw new Error("Unknown type: "+JSON.stringify(t))}},vHe=(t,e="VerticalLayout",r="#",n=t)=>PAt(Zhe(t,[],r,"",e,n),e),wL={jsonSchema:iHe,uiSchema:vHe,controlElement:gG},bge="jsonforms/INIT",xge="jsonforms/UPDATE_CORE",_ge="jsonforms/SET_AJV",wge="jsonforms/UPDATE",Sge="jsonforms/UPDATE_ERRORS",OAt="jsonforms/VALIDATE",mHe="jsonforms/ADD_RENDERER",gHe="jsonforms/REMOVE_RENDERER",yHe="jsonforms/ADD_CELL",bHe="jsonforms/REMOVE_CELL",Tge="jsonforms/SET_CONFIG",xHe="jsonforms/ADD_UI_SCHEMA",_He="jsonforms/REMOVE_UI_SCHEMA",Ege="jsonforms/SET_SCHEMA",Age="jsonforms/SET_UISCHEMA",Cge="jsonforms/SET_VALIDATION_MODE",Mge="jsonforms/SET_LOCALE",Rge="jsonforms/SET_TRANSLATOR",kge="jsonforms/UPDATE_I18N",wHe="jsonforms/ADD_DEFAULT_DATA",SHe="jsonforms/REMOVE_DEFAULT_DATA",NAt=t=>{if(!("type"in t)||typeof t.type!="string")return!1;switch(t.type){case"ADD":return"values"in t&&Array.isArray(t.values)&&t.values.length>0;case"REMOVE":return"indices"in t&&Array.isArray(t.indices)&&t.indices.length>0&&t.indices.every(e=>typeof e=="number");case"MOVE":return"moves"in t&&Array.isArray(t.moves)&&t.moves.length>0&&t.moves.every(e=>typeof e=="object"&&e!==null&&"from"in e&&"to"in e&&typeof e.from=="number"&&typeof e.to=="number");default:return!1}},FAt=(t,e=iHe(t),r,n)=>({type:bge,data:t,schema:e,uischema:typeof r=="object"?r:vHe(e),options:n}),zAt=(t,e,r,n)=>({type:xge,data:t,schema:e,uischema:r,options:n}),BAt=(t,e)=>({type:wHe,schemaPath:t,data:e}),UAt=t=>({type:SHe,schemaPath:t}),HAt=t=>({type:_ge,ajv:t}),NC=(t,e,r)=>({type:wge,path:t,updater:e,context:r}),jAt=t=>({type:Sge,errors:t}),VAt=(t,e)=>({type:mHe,tester:t,renderer:e}),qAt=(t,e)=>({type:yHe,tester:t,cell:e}),GAt=(t,e)=>({type:bHe,tester:t,cell:e}),$At=(t,e)=>({type:gHe,tester:t,renderer:e}),WAt=t=>({type:Tge,config:t}),YAt=t=>({type:Cge,validationMode:t}),XAt=(t,e)=>({type:xHe,tester:t,uischema:e}),ZAt=t=>({type:_He,tester:t}),KAt=t=>({type:Mge,locale:t}),JAt=t=>({type:Ege,schema:t}),QAt=(t,e)=>({type:Rge,translator:t,errorTranslator:e}),eCt=(t,e,r)=>({type:kge,locale:t,translator:e,errorTranslator:r}),tCt=t=>({type:Age,uischema:t});var yO=Object.freeze({__proto__:null,INIT:bge,UPDATE_CORE:xge,SET_AJV:_ge,UPDATE_DATA:wge,UPDATE_ERRORS:Sge,VALIDATE:OAt,ADD_RENDERER:mHe,REMOVE_RENDERER:gHe,ADD_CELL:yHe,REMOVE_CELL:bHe,SET_CONFIG:Tge,ADD_UI_SCHEMA:xHe,REMOVE_UI_SCHEMA:_He,SET_SCHEMA:Ege,SET_UISCHEMA:Age,SET_VALIDATION_MODE:Cge,SET_LOCALE:Mge,SET_TRANSLATOR:Rge,UPDATE_I18N:kge,ADD_DEFAULT_DATA:wHe,REMOVE_DEFAULT_DATA:SHe,isUpdateArrayContext:NAt,init:FAt,updateCore:zAt,registerDefaultData:BAt,unregisterDefaultData:UAt,setAjv:HAt,update:NC,updateErrors:jAt,registerRenderer:VAt,registerCell:qAt,unregisterCell:GAt,unregisterRenderer:$At,setConfig:WAt,setValidationMode:YAt,registerUISchema:XAt,unregisterUISchema:ZAt,setLocale:KAt,setSchema:JAt,setTranslator:QAt,updateI18n:eCt,setUISchema:tCt});const rCt={restrict:!1,trim:!1,showUnfocusedDescription:!1,hideRequiredAsterisk:!1},v5e=(t={})=>Zv({},rCt,t),m5e=(t=v5e(),e)=>{switch(e.type){case Tge:return v5e(e.config);default:return t}},nCt={data:{},schema:{},uischema:void 0,errors:[],validator:void 0,ajv:void 0,validationMode:"ValidateAndShow",additionalErrors:[]},g5e=(t,e)=>e&&iCt(e.options)?e.options.validationMode:t.validationMode,iCt=t=>t?t.validationMode!==void 0:!1,aCt=t=>t?t.additionalErrors!==void 0:!1,y5e=(t,e)=>e&&aCt(e.options)?e.options.additionalErrors:t.additionalErrors,b5e=(t,e)=>{if(e){if(oCt(e.options))return e.options.ajv;if(e.options!==void 0&&V3t(e.options.compile))return e.options}return t.ajv?t.ajv:TAt()},oCt=t=>t?t.ajv!==void 0:!1,Eie=(t=nCt,e)=>{switch(e.type){case bge:{const r=b5e(t,e),n=g5e(t,e),i=n==="NoValidation"?void 0:r.compile(e.schema),a=tk(i,e.data),o=y5e(t,e);return{...t,data:e.data,schema:e.schema,uischema:e.uischema,additionalErrors:o,errors:a,validator:i,ajv:r,validationMode:n}}case xge:{const r=b5e(t,e),n=g5e(t,e);let i=t.validator,a=t.errors;t.schema!==e.schema||t.validationMode!==n||t.ajv!==r?(i=n==="NoValidation"?void 0:r.compile(e.schema),a=tk(i,e.data)):t.data!==e.data&&(a=tk(i,e.data));const o=y5e(t,e);return t.data!==e.data||t.schema!==e.schema||t.uischema!==e.uischema||t.ajv!==r||t.errors!==a||t.validator!==i||t.validationMode!==n||t.additionalErrors!==o?{...t,data:e.data,schema:e.schema,uischema:e.uischema,ajv:r,errors:ege(a,t.errors)?t.errors:a,validator:i,validationMode:n,additionalErrors:o}:t}case _ge:{const r=e.ajv,n=t.validationMode==="NoValidation"?void 0:r.compile(t.schema),i=tk(n,t.data);return{...t,validator:n,errors:i}}case Ege:{const n=e.schema&&t.ajv&&t.validationMode!=="NoValidation"?t.ajv.compile(e.schema):t.validator,i=tk(n,t.data);return{...t,validator:n,schema:e.schema,errors:i}}case Age:return{...t,uischema:e.uischema};case wge:{if(e.path===void 0||e.path===null)return t;if(e.path===""){const r=e.updater(Xz(t.data)),n=tk(t.validator,r);return{...t,data:r,errors:n}}else{const r=fx(t.data,e.path),n=e.updater(Xz(r));let i;n!==void 0?i=N3t(e.path,n,t.data===void 0?{}:t.data):i=H3t(e.path,t.data===void 0?{}:t.data);const a=tk(t.validator,i);return{...t,data:i,errors:a}}}case Sge:return{...t,errors:e.errors};case Cge:{if(t.validationMode===e.validationMode)return t;if(e.validationMode==="NoValidation"){const r=tk(void 0,t.data);return{...t,errors:r,validationMode:e.validationMode}}if(t.validationMode==="NoValidation"){const r=t.ajv.compile(t.schema),n=tk(r,t.data);return{...t,validator:r,errors:n,validationMode:e.validationMode}}return{...t,validationMode:e.validationMode}}default:return t}};var zw;(function(t){t.addTooltip="addTooltip",t.addAriaLabel="addAriaLabel",t.removeTooltip="removeTooltip",t.upAriaLabel="upAriaLabel",t.downAriaLabel="downAriaLabel",t.noSelection="noSelection",t.removeAriaLabel="removeAriaLabel",t.noDataMessage="noDataMessage",t.deleteDialogTitle="deleteDialogTitle",t.deleteDialogMessage="deleteDialogMessage",t.deleteDialogAccept="deleteDialogAccept",t.deleteDialogDecline="deleteDialogDecline",t.up="up",t.down="down"})(zw||(zw={}));const sCt=[{key:zw.addTooltip,default:t=>t?`Add to ${t}`:"Add"},{key:zw.addAriaLabel,default:t=>t?`Add to ${t} button`:"Add button"},{key:zw.removeTooltip,default:()=>"Delete"},{key:zw.removeAriaLabel,default:()=>"Delete button"},{key:zw.upAriaLabel,default:()=>"Move item up"},{key:zw.up,default:()=>"Up"},{key:zw.down,default:()=>"Down"},{key:zw.downAriaLabel,default:()=>"Move item down"},{key:zw.noDataMessage,default:()=>"No data"},{key:zw.noSelection,default:()=>"No selection"},{key:zw.deleteDialogTitle,default:()=>"Confirm Deletion"},{key:zw.deleteDialogMessage,default:()=>"Are you sure you want to delete the selected entry?"},{key:zw.deleteDialogAccept,default:()=>"Yes"},{key:zw.deleteDialogDecline,default:()=>"No"}];var xN;(function(t){t.clearDialogTitle="clearDialogTitle",t.clearDialogMessage="clearDialogMessage",t.clearDialogAccept="clearDialogAccept",t.clearDialogDecline="clearDialogDecline"})(xN||(xN={}));xN.clearDialogTitle,xN.clearDialogMessage,xN.clearDialogAccept,xN.clearDialogDecline;const Ige=(t,e)=>uHe(e)?e.i18n:t?.i18n??void 0,lCt=t=>t?.split(".").filter(e=>!/^\d+$/.test(e)).join(".")||"root",sA=(t,e,r)=>Ige(t,e)??lCt(r),c$=(t,e,r,n)=>`${sA(t,e,r)}.${n}`,uCt=(t,e)=>`${t}.${e}`,Pge=(t,e)=>e,Dge=(t,e,r)=>{const n=c$(t.parentSchema,r,Xhe(t),`error.${t.keyword}`),i=e(n,void 0,{error:t});if(i!==void 0)return i;const a=e(`error.${t.keyword}`,void 0,{error:t});if(a!==void 0)return a;const o=e(t.message,void 0,{error:t});return o!==void 0?o:t.keyword==="required"&&t.message?.startsWith("must have required property")?e("is a required property","is a required property",{error:t}):t.message},Lge=(t,e,r,n,i,a)=>{if(t.length>0&&r){const o=c$(n,i,a,"error.custom"),s=r(o,void 0,{schema:n,uischema:i,path:a,errors:t});if(s!==void 0)return s}return hHe(t.map(o=>e(o,r,i)))},Oge=(t,e)=>{if(t.label===!1||(t.label===void 0||t.label===null||t.label===!0)&&!uHe(t))return;const r=typeof t.label=="string"?t.label:JSON.stringify(t.label),n=Ige(void 0,t),i=typeof n=="string"?`${n}.label`:r;return e(i,r,{uischema:t})},cCt=(t,e,r,n)=>{const i={};return e.forEach(a=>{const o=uCt(r,a.key);i[a.key]=t(o,a.default(n))}),i},fCt=t=>t===void 0?Pge:t.translate,dCt=t=>t===void 0?Dge:t.translateError,XC=()=>t=>fCt(fx(t,"jsonforms.i18n")),Nge=()=>t=>dCt(fx(t,"jsonforms.i18n")),_N={locale:"en",translate:Pge,translateError:Dge},x5e=(t=_N,e)=>{switch(e.type){case kge:{const r=e.locale??_N.locale,n=e.translator??_N.translate,i=e.errorTranslator??_N.translateError;return r!==t.locale||n!==t.translate||i!==t.translateError?{...t,locale:r,translate:n,translateError:i}:t}case Rge:return{...t,translate:e.translator??Pge,translateError:e.errorTranslator??Dge};case Mge:return{...t,locale:e.locale??navigator.languages[0]};default:return t}},f$=-1,Zz=t=>!Eh(t)&&t.scope!==void 0,Qx=t=>(e,r,n)=>{if(Eh(e)||!Zz(e)||Eh(r))return!1;const i=e.scope;if(Eh(i))return!1;let a=r;return U_(r,"object")&&(a=KS(r,i,n?.rootSchema)),a===void 0?!1:t(a,n?.rootSchema)},Fge=(t,e)=>(r,n,i)=>{if(Eh(r)||!Zz(r))return!1;const a=r.scope;let o=n;return U_(n,"object")&&(o=KS(n,a,i?.rootSchema)),o=fx(o,t),o===void 0?!1:e(o,i?.rootSchema)},JP=t=>Qx(e=>!Eh(e)&&U_(e,t)),zge=t=>Qx(e=>!Eh(e)&&e.format===t&&U_(e,"string")),Qm=t=>e=>!Eh(e)&&e.type===t,nM=(t,e)=>r=>{if(Eh(r))return!1;const n=r.options;return!Eh(n)&&n[t]===e},vm=(...t)=>(e,r,n)=>t.reduce((i,a)=>i&&a(e,r,n),!0),K8=(...t)=>(e,r,n)=>t.reduce((i,a)=>i||a(e,r,n),!1),bh=(t,e)=>(r,n,i)=>e(r,n,i)?t:f$,hCt=(t,e)=>(r,n,i)=>{const a=e(r,n,i);return a===f$?f$:a+t},nX=vm(Qm("Control"),JP("boolean")),pCt=vm(Qm("Control"),JP("object")),vCt=vm(Qm("Control"),Qx(t=>Object.prototype.hasOwnProperty.call(t,"allOf"))),mCt=vm(Qm("Control"),Qx(t=>Object.prototype.hasOwnProperty.call(t,"anyOf"))),gCt=vm(Qm("Control"),Qx(t=>Object.prototype.hasOwnProperty.call(t,"oneOf"))),Bge=vm(Qm("Control"),Qx(t=>dHe(t))),Uge=vm(Qm("Control"),Qx(t=>P9(t))),THe=vm(Qm("Control"),JP("integer")),EHe=vm(Qm("Control"),JP("number")),AHe=vm(Qm("Control"),JP("string"));vm(Qm("Control"),nM("multi",!0));const Hge=vm(Qm("Control"),K8(zge("date"),nM("format","date"))),jge=vm(Qm("Control"),K8(zge("time"),nM("format","time"))),yCt=vm(Qm("Control"),K8(zge("date-time"),nM("format","date-time"))),CHe=vm(Qx((t,e)=>U_(t,"array")&&!Array.isArray(KS(t,"items",e))),Fge("items",(t,e)=>{const r=t.$ref?KS(e,t.$ref,e):t;return U_(r,"object")})),bCt=vm(Qm("Control"),CHe),Iz=(t,e,r)=>{if(mUe(t))return c5e(t,(n,i)=>n||Iz(i,e,r),!1);if(e(t))return!0;if(t.$ref){const n=KS(r,t.$ref,r);if(n&&!n.$ref)return Iz(n,e,r)}return t.items?Iz(t.items,e,r):t.properties?c5e(rAt(t.properties),(n,[i,a])=>n||Iz(a,e,r),!1):!1},xCt=(t,e,r)=>{if(!Qm("Control")(t,e,r))return!1;const n=t.scope,i=KS(e,n,r?.rootSchema??e);let a=0;if(i!==void 0&&i.items!==void 0){if(Iz(i.items,o=>o===e||o.$ref!==void 0?!1:!!(o.anyOf||o.allOf||o.oneOf&&!P9(o)||U_(o,"object")&&(a++,a===2)||U_(o,"array")),r?.rootSchema))return!0;if(t.options&&t.options.detail){if(typeof t.options.detail=="string")return t.options.detail.toUpperCase()!=="DEFAULT";if(typeof t.options.detail=="object"&&t.options.detail.type)return!0}}return!1},_Ct=vm(Qm("Control"),Qx((t,e)=>cL(t).length!==0&&!Array.isArray(KS(t,"items",e))),Fge("items",(t,e)=>{const r=t.$ref?KS(e,t.$ref,e):t,n=cL(r);return n.length===1&&yUe(["integer","number","boolean","string"],n[0])})),wCt=vm(Qm("Control"),K8(JP("number"),JP("integer")),Qx(t=>Object.prototype.hasOwnProperty.call(t,"maximum")&&Object.prototype.hasOwnProperty.call(t,"minimum")&&Object.prototype.hasOwnProperty.call(t,"default")),nM("slider",!0)),SCt=vm(Qm("Control"),JP("integer"),nM("format",!0)),TCt=t=>t.type==="Categorization",ECt=t=>t.type==="Category",MHe=t=>Eh(t.elements)?!1:t.elements.map(e=>TCt(e)?MHe(e):ECt(e)).reduce((e,r)=>e&&r,!0),ACt=t=>MHe(t),RHe=t=>(e,r,n)=>{const i=Yme(t,a=>a.tester(e,r,n));if(i!==void 0&&i.tester(e,r,n)!==f$)return i.uischema},iX=(t,e,r,n,i="VerticalLayout",a,o)=>{if(a&&a.options&&a.options.detail){if(typeof a.options.detail=="string"){if(a.options.detail.toUpperCase()==="GENERATE")return typeof i=="function"?i():wL.uiSchema(e,i,void 0,o)}else if(typeof a.options.detail=="object"&&a.options.detail.type&&typeof a.options.detail.type=="string")return a.options.detail}const s=RHe(t)(e,r,n);return s===void 0?typeof i=="function"?i():wL.uiSchema(e,i,"#",o):s},_5e=(t,e,r)=>r(t,e),kHe=(t,e,r)=>n=>{const i=n.errors??[],a=n.additionalErrors??[];return RAt(t,e,r)(n.validationMode==="ValidateAndHide"?a:[...i,...a])},IHe=(t,e)=>kHe(t,e,r=>r===t),CCt=(t,e)=>kHe(t,e,r=>r.startsWith(t+".")),PHe=(t,e)=>r=>IHe(t,e)(r.jsonforms.core),MCt=(t,e)=>r=>CCt(t,e)(r.jsonforms.core),YB=t=>ICt(fx(t,"jsonforms.core")),D9=t=>PCt(fx(t,"jsonforms.core")),RCt=t=>DCt(fx(t,"jsonforms.core")),J8=t=>LCt(fx(t,"jsonforms.core")),DHe=t=>fx(t,"jsonforms.renderers"),LHe=t=>fx(t,"jsonforms.cells"),kCt=t=>fx(t,"jsonforms.uischemas"),ICt=t=>fx(t,"data"),PCt=t=>fx(t,"schema"),DCt=t=>fx(t,"uischema"),LCt=t=>fx(t,"ajv"),SL=t=>t.jsonforms.config,Vge=(t,e,r,n,i,a)=>t?.jsonforms?.readonly?!1:r&&bAt(r)?xAt(r,i,e?.path,J8(t)):typeof r?.options?.readonly=="boolean"?!r.options.readonly:typeof r?.options?.readOnly=="boolean"?!r.options.readOnly:typeof a?.readonly=="boolean"?!a.readonly:typeof a?.readOnly=="boolean"?!a.readOnly:n?.readOnly===!0?!1:typeof e?.enabled=="boolean"?e.enabled:!0,OHe=(t,e,r)=>{const n=e+r;if(n<0||n>=t.length)return;const i=[e,n].sort((a,o)=>a-o);t.splice(i[0],2,t[i[1]],t[i[0]])},NHe=(t,e)=>{OHe(t,e,-1)},FHe=(t,e)=>{OHe(t,e,1)},OCt=(t,e,r)=>{const n=e.split("/"),i=WB(n[n.length-1]),o=n.slice(0,n.length-2).join("/"),s=JS.schema(t,o,r);return s!==void 0&&s.required!==void 0&&s.required.indexOf(i)!==-1},zHe=(t,e,r)=>`${t??""}${e&&!r?"*":""}`,XB=(t,e)=>t&&!e,Sk=(t,e)=>{const r=BHe(t,e);return r===void 0?{}:r},BHe=(t,e)=>{const r=typeof t.$ref=="string"?JS.schema(e,t.$ref,e):t;if(r.default!==void 0)return w5e(r,e);if(U_(r,"string"))return r.format==="date-time"||r.format==="date"||r.format==="time"?wAt(new Date,r.format):"";if(U_(r,"integer")||U_(r,"number"))return 0;if(U_(r,"boolean"))return!1;if(U_(r,"array"))return[];if(U_(r,"object"))return w5e(r,e);if(U_(r,"null"))return null;const n=["oneOf","anyOf","allOf"];for(const i of n)if(t[i]&&Array.isArray(t[i])){const a=NCt(t[i],e);if(a!==void 0)return a}},NCt=(t,e)=>{if(t.length>0)for(const r of t){const n=BHe(r,e);if(n!==void 0)return n}},w5e=(t,e)=>{if(U_(t,"object")&&t.default===void 0){const r={};for(const n in t.properties){const i=t.properties[n],a=i.$ref?JS.schema(e,i.$ref,e):i;a&&a.default!==void 0&&(r[n]=Xz(a.default))}return t.allOf&&Array.isArray(t.allOf)&&t.allOf.forEach(n=>{if(n&&n.properties)for(const i in n.properties){const a=n.properties[i],o=a.$ref?JS.schema(e,a.$ref,e):a;o&&o.default!==void 0&&(r[i]=Xz(o.default))}}),r}return Xz(t.default)},dE=(t,e,r,n)=>e===void 0||e!==void 0&&!t||!n&&!r,r8=(t,e,r)=>{let n=typeof t=="string"?t:JSON.stringify(t);return e&&(r?n=e(`${r}.${n}`,n):n=e(n,n)),{label:n,value:t}},aX=(t,e,r)=>{let n=t.title??(typeof t.const=="string"?t.const:JSON.stringify(t.const));return e&&(t.i18n?n=e(t.i18n,n):r?n=e(`${r}.${n}`,n):n=e(n,n)),{label:n,value:t.const}},Q8=(t,e)=>{const{uischema:r}=e,n=YB(t),i=lHe(r,e.path),a=e.visible===void 0||gge(r)?Z8(r,n,e.path,J8(t)):e.visible,o=r,s=e.id,d=D9(t),b=o.scope!==void 0&&OCt(e.schema,o.scope,d),L=JS.schema(e.schema||d,o.scope,d),B=PHe(i,L)(t),V=L!==void 0?L.description:"",X=JS.data(n,i),ie=oAt(r,L),de=ie.show?ie.text:"",ae=SL(t),U=Vge(t,e,r,L||d,n,ae),ve=L??d,Se=XC()(t),Pe=Nge()(t),Me=sA(ve,r,i),Ie=Se(c$(ve,r,i,"label"),de,{schema:ve,uischema:r,path:i,errors:B}),Ve=Se(c$(ve,r,i,"description"),V,{schema:ve,uischema:r,path:i,errors:B}),Ze=Lge(B,Pe,Se,ve,r,i);return{data:X,description:Ve,errors:Ze,label:Ie,visible:a,enabled:U,id:s,path:i,required:b,uischema:r,schema:ve,config:SL(t),cells:e.cells||t.jsonforms.cells,rootSchema:d,i18nKeyPrefix:Me}},FCt=t=>({handleChange(e,r){t(NC(e,()=>r))}}),zCt=(t,e)=>{const r=Q8(t,e),n=e.options||r.schema.enum?.map(i=>r8(i,XC()(t),sA(r.schema,r.uischema,r.path)))||r.schema.const&&[r8(r.schema.const,XC()(t),sA(r.schema,r.uischema,r.path))];return{...r,options:n}},BCt=(t,e)=>{const r=Q8(t,e),n=e.options||r.schema.oneOf?.map(i=>aX(i,XC()(t),sA(r.schema,r.uischema,r.path)));return{...r,options:n}},UCt=(t,e)=>{const r=Q8(t,e);let n=r.schema.items;n=n&&n.$ref?KS(r.rootSchema,n.$ref,r.rootSchema):n;const i=e.options||n?.oneOf&&n.oneOf.map(a=>aX(a,t.jsonforms.i18n?.translate,sA(r.schema,r.uischema,r.path)))||n?.enum?.map(a=>r8(a,t.jsonforms.i18n?.translate,sA(r.schema,r.uischema,r.path)));return{...r,options:i}},HCt=(t,e)=>{const{schema:r,path:n,uischema:i,childLabelProp:a,index:o}=e,s=X8(n,`${o}`),d=jHe(YB(t),s,a,r,D9(t),t.jsonforms.i18n.translate,i);return{...e,childLabel:d}},UHe=(t,e)=>{const{...r}=Q8(t,e);return{...r,uischemas:t.jsonforms.uischemas}},jCt=t=>({addItem:(e,r)=>()=>{t(NC(e,n=>n==null?[r]:(n.push(r),n),{type:"ADD",values:[r]}))},removeItems:(e,r)=>()=>{t(NC(e,n=>(r.sort((i,a)=>i-a).reverse().forEach(i=>n.splice(i,1)),n),{type:"REMOVE",indices:r}))},moveUp:(e,r)=>()=>{t(NC(e,n=>(NHe(n,r),n),{type:"MOVE",moves:[{from:r,to:r-1}]}))},moveDown:(e,r)=>()=>{t(NC(e,n=>(FHe(n,r),n),{type:"MOVE",moves:[{from:r,to:r+1}]}))}}),VCt=t=>({addItem:(e,r)=>{t(NC(e,n=>n==null?[r]:(n.push(r),n)))},removeItem:(e,r)=>{t(NC(e,n=>{const i=n.indexOf(r);return n.splice(i,1),n}))}}),HHe={visible:!0,enabled:!0,path:"",direction:"column"},qCt=t=>t.type==="HorizontalLayout"?"row":t.type==="VerticalLayout"?"column":HHe.direction,GCt=(t,e)=>{const r=YB(t),{uischema:n}=e,i=e.visible===void 0||gge(n)?Z8(e.uischema,r,e.path,J8(t)):e.visible,a=JS.data(r,e.path),o=SL(t),s=Vge(t,e,n,void 0,r,o),d=XC()(t),b=cAt(n)?Oge(n,d):void 0;return{...HHe,renderers:e.renderers||DHe(t),cells:e.cells||LHe(t),visible:i,enabled:s,path:e.path,data:a,uischema:e.uischema,schema:e.schema,direction:e.direction??qCt(n),config:o,label:b}},$Ct=(t,e)=>({renderers:e.renderers||fx(t.jsonforms,"renderers"),cells:e.cells||fx(t.jsonforms,"cells"),schema:e.schema||D9(t),rootSchema:D9(t),uischema:e.uischema||RCt(t),path:e.path,enabled:e.enabled,config:SL(t)}),qge=(t,e,r)=>{const{data:n,schema:i,rootSchema:a,i18nKeyPrefix:o,label:s,...d}=Q8(t,e),b=t.jsonforms.core.ajv,L=["required","additionalProperties","type","enum","const"],B=X=>!X||X.length===0||!X.find(ie=>L.indexOf(ie.keyword)!==-1);let V;for(let X=0;X<i[r]?.length;X++)try{let ie=i[r][X];ie.$ref&&(ie=JS.schema(a,ie.$ref,a));const de=b.compile(ie);if(de(n),B(de.errors)){V=X;break}}catch{console.debug("Combinator subschema is not self contained, can't hand it over to AJV")}return{data:n,schema:i,rootSchema:a,...d,i18nKeyPrefix:o,label:s,indexOfFittingSchema:V,uischemas:kCt(t)}},WCt=(t,e)=>qge(t,e,"allOf"),YCt=(t,e)=>qge(t,e,"anyOf"),XCt=(t,e)=>qge(t,e,"oneOf"),ZCt=(t,e)=>{const{path:r,schema:n,uischema:i,errors:a,label:o,...s}=UHe(t,e),d=JS.schema(n,"items",s.rootSchema),b=XC()(t),L=Lge(MCt(r,d)(t),Nge()(t),b,void 0,void 0,void 0),B=a+(a.length>0&&L.length>0?`
`:"")+L;return{...s,label:o,path:r,uischema:i,schema:d,arraySchema:n,data:s.data?s.data.length:0,errors:B,minItems:n.minItems}},KCt=(t,e)=>{const{uischema:r}=e,n=e.visible===void 0||gge(r)?Z8(e.uischema,YB(t),e.path,J8(t)):e.visible,i=r.text,a=XC()(t),o=Ige(void 0,r),s=o?`${o}.text`:i??"";return{text:a(s,i,{uischema:r}),visible:n,config:SL(t),renderers:e.renderers||DHe(t),cells:e.cells||LHe(t),uischema:r}},jHe=(t,e,r,n,i,a,o)=>{const s=JS.data(t,e);if(r||(r=_At(n)),!r)return"";const d=fx(s,r);if(d===void 0)return"";const b=JS.schema(n,"#"+sHe(r),i);let L;if(dHe(b))L=r8(d,a,sA(b,Whe(o,r),e+"."+r));else if(P9(b)){const V=b.oneOf.find(X=>ege(X.const,d));V&&(L=aX(V,a,sA(V,void 0,e+"."+r)))}return L?L.label:d},oX=(t,e)=>{const{id:r,schema:n,path:i,uischema:a,renderers:o,cells:s}=e,d=YB(t),b=e.visible!==void 0?e.visible:Z8(a,d,void 0,J8(t)),L=D9(t),B=SL(t);let V;t.jsonforms.readonly===!0?V=!1:typeof e.enabled=="boolean"?V=e.enabled:V=Vge(t,e,a,n||L,d,B);const X=XC()(t),ie=Nge()(t),de=Lge(PHe(i,n)(t),ie,X,n,a,i),ae=Eh(de);return{data:JS.data(d,i),visible:b,enabled:V,id:r,path:i,errors:de,isValid:ae,schema:n,uischema:a,config:SL(t),rootSchema:L,renderers:o,cells:s}},JCt=(t,e)=>{const r=oX(t,e),{renderers:n,cells:i,...a}=e;return{...r,...a,cells:i||t.jsonforms.cells||[]}},QCt=(t,e)=>{const r=oX(t,e),n=e.options||r.schema.enum?.map(i=>r8(i,XC()(t),sA(r.schema,r.uischema,r.path)))||r.schema.const&&[r8(r.schema.const,XC()(t),sA(r.schema,r.uischema,r.path))];return{...r,options:n}},eMt=(t,e)=>{const r=oX(t,e),n=e.options||r.schema.oneOf?.map(i=>aX(i,XC()(t),sA(r.schema,r.uischema,r.path)));return{...r,options:n}},Gge=(t,e,r,n,i,a)=>t.map((o,s)=>{const d=o.$ref&&JS.schema(e,o.$ref,e),b=d??o;return{schema:b,uischema:iX(a,b,n.scope,i,void 0,n,e),label:o.title??d?.title??`${r}-${s}`}});var Aie,S5e;function tMt(){if(S5e)return Aie;S5e=1;var t=Y2(),e=function(){return t.Date.now()};return Aie=e,Aie}var Cie,T5e;function rMt(){if(T5e)return Cie;T5e=1;var t=gE(),e=tMt(),r=fUe(),n="Expected a function",i=Math.max,a=Math.min;function o(s,d,b){var L,B,V,X,ie,de,ae=0,U=!1,ve=!1,Se=!0;if(typeof s!="function")throw new TypeError(n);d=r(d)||0,t(b)&&(U=!!b.leading,ve="maxWait"in b,V=ve?i(r(b.maxWait)||0,d):V,Se="trailing"in b?!!b.trailing:Se);function Pe(_t){var Dt=L,qt=B;return L=B=void 0,ae=_t,X=s.apply(qt,Dt),X}function Me(_t){return ae=_t,ie=setTimeout(Ze,d),U?Pe(_t):X}function Ie(_t){var Dt=_t-de,qt=_t-ae,Lt=d-Dt;return ve?a(Lt,V-qt):Lt}function Ve(_t){var Dt=_t-de,qt=_t-ae;return de===void 0||Dt>=d||Dt<0||ve&&qt>=V}function Ze(){var _t=e();if(Ve(_t))return Je(_t);ie=setTimeout(Ze,Ie(_t))}function Je(_t){return ie=void 0,Se&&L?Pe(_t):(L=B=void 0,X)}function nt(){ie!==void 0&&clearTimeout(ie),ae=0,L=de=B=ie=void 0}function ut(){return ie===void 0?X:Je(e())}function ht(){var _t=e(),Dt=Ve(_t);if(L=arguments,B=this,de=_t,Dt){if(ie===void 0)return Me(de);if(ve)return clearTimeout(ie),ie=setTimeout(Ze,d),Pe(de)}return ie===void 0&&(ie=setTimeout(Ze,d)),X}return ht.cancel=nt,ht.flush=ut,ht}return Cie=o,Cie}var nMt=rMt();const VHe=Qh(nMt);class iMt extends wi.Component{constructor(e){super(e)}}class aMt extends iMt{constructor(e){super(e),this.handleChange=r=>{this.setState({value:r}),this.updateData(r)},this.onFocus=()=>{this.setState({isFocused:!0})},this.onBlur=()=>{this.setState({isFocused:!1})},this.updateData=r=>{this.props.handleChange(this.props.path,r)},this.state={value:e.data?e.data:"",isFocused:!1}}}class qHe extends ze.Component{render(){return wi.createElement("div",{style:{color:"red"}},"No applicable ",this.props.type," found.")}}const oMt={data:{},schema:{},uischema:void 0,errors:[],additionalErrors:[],validator:void 0,ajv:void 0},GHe=wi.createContext({core:oMt,renderers:[]}),sMt=(t,e)=>{const r=ze.useRef(!0);ze.useEffect(()=>{if(r.current){r.current=!1;return}t()},e)},lMt=({children:t,initState:e,onChange:r,middleware:n})=>{const{data:i,schema:a,uischema:o,ajv:s,validationMode:d,additionalErrors:b}=e.core,L=ze.useRef(n??_5e);L.current=n??_5e;const[B,V]=ze.useState(()=>L.current(e.core,yO.init(i,a,o,{ajv:s,validationMode:d,additionalErrors:b}),Eie));ze.useEffect(()=>V(Me=>L.current(Me,yO.updateCore(i,a,o,{ajv:s,validationMode:d,additionalErrors:b}),Eie)),[i,a,o,s,d,b]);const[X,ie]=ze.useReducer(m5e,void 0,()=>m5e(void 0,yO.setConfig(e.config)));sMt(()=>{ie(yO.setConfig(e.config))},[e.config]);const[de,ae]=ze.useReducer(x5e,void 0,()=>x5e(e.i18n,yO.updateI18n(e.i18n?.locale,e.i18n?.translate,e.i18n?.translateError)));ze.useEffect(()=>{ae(yO.updateI18n(e.i18n?.locale,e.i18n?.translate,e.i18n?.translateError))},[e.i18n?.locale,e.i18n?.translate,e.i18n?.translateError]);const U=ze.useCallback(Me=>{V(Ie=>L.current(Ie,Me,Eie))},[]),ve=ze.useMemo(()=>({core:B,renderers:e.renderers,cells:e.cells,config:X,uischemas:e.uischemas,readonly:e.readonly,i18n:de,dispatch:U}),[B,e.renderers,e.cells,X,e.uischemas,e.readonly,de]),Se=ze.useRef(r);ze.useEffect(()=>{Se.current=r},[r]);const Pe=ze.useCallback(VHe((...Me)=>Se.current?.(...Me),10),[]);return ze.useEffect(()=>{Pe({data:B.data,errors:B.errors})},[B.data,B.errors]),wi.createElement(GHe.Provider,{value:ve},t)},sX=()=>ze.useContext(GHe),uMt=(t,e)=>ZCt({jsonforms:{...t}},e),cMt=(t,e)=>GCt({jsonforms:{...t}},e),fMt=(t,e)=>Q8({jsonforms:{...t}},e),dMt=(t,e)=>{const r=zCt({jsonforms:{...t}},e),n=ze.useMemo(()=>r.options,[e.options,r.schema,t.i18n?.translate]);return{...r,options:n}},hMt=(t,e)=>{const r=BCt({jsonforms:{...t}},e),n=ze.useMemo(()=>r.options,[e.options,r.schema,t.i18n?.translate]);return{...r,options:n}},pMt=(t,e)=>{const r=UCt({jsonforms:{...t}},e),n=ze.useMemo(()=>r.options,[r.schema,t.i18n?.translate]);return{...r,options:n}},vMt=(t,e)=>UHe({jsonforms:{...t}},e),mMt=(t,e)=>({...WCt({jsonforms:{...t}},e)}),QS=t=>ze.useMemo(()=>FCt(t),[t]),gMt=(t,e)=>{const r=YCt({jsonforms:{...t}},e),n=QS(t.dispatch);return{...r,...n}},yMt=(t,e)=>{const r=XCt({jsonforms:{...t}},e),n=QS(t.dispatch);return{...r,...n}},bMt=(t,e)=>$Ct({jsonforms:{...t}},e),xMt=t=>({...QS(t),...ze.useMemo(()=>jCt(t),[t])}),_Mt=(t,e)=>HCt({jsonforms:{...t}},e),wMt=(t,e)=>oX({jsonforms:{...t}},e),SMt=(t,e)=>{const r=QCt({jsonforms:{...t}},e),n=ze.useMemo(()=>r.options,[e.options,r.schema,t.i18n?.translate]);return{...r,options:n}},TMt=(t,e)=>{const r=eMt({jsonforms:{...t}},e),n=ze.useMemo(()=>r.options,[e.options,r.schema,t.i18n?.translate]);return{...r,options:n}},EMt=(t,e)=>JCt({jsonforms:{...t}},e),AMt=t=>({...QS(t),...ze.useMemo(()=>VCt(t),[t])}),CMt=(t,e)=>KCt({jsonforms:{...t}},e),t_=t=>function(r){const n=sX();return wi.createElement(t,{ctx:n,props:r})},MMt=t=>function({ctx:r,props:n}){const i=bMt(r,n);return wi.createElement(t,{...n,...i})},RMt=t=>function({ctx:r,props:n}){const i=fMt(r,n),a=QS(r.dispatch);return wi.createElement(t,{...n,...i,...a})},kMt=t=>function({ctx:r,props:n}){const i=cMt(r,n);return wi.createElement(t,{...n,...i})},IMt=t=>function({ctx:r,props:n}){const i=yMt(r,n),a=QS(r.dispatch);return wi.createElement(t,{...n,...i,...a})},PMt=t=>function({ctx:r,props:n}){const i=gMt(r,n),a=QS(r.dispatch);return wi.createElement(t,{...n,...i,...a})},DMt=t=>function({ctx:r,props:n}){const i=mMt(r,n),a=QS(r.dispatch);return wi.createElement(t,{...n,...i,...a})},LMt=t=>function({ctx:r,props:n}){const i=vMt(r,n);return wi.createElement(t,{...n,...i})},OMt=t=>function({ctx:r,props:n}){const i=uMt(r,n),a=xMt(r.dispatch);return wi.createElement(t,{...n,...i,...a})},NMt=t=>function({ctx:r,props:n}){const i=_Mt(r,n);return wi.createElement(t,{...n,...i})},FMt=t=>function({ctx:r,props:n}){const i=wMt(r,n),a=QS(r.dispatch);return wi.createElement(t,{...n,...a,...i})},zMt=t=>function({ctx:r,props:n}){const i=EMt(r,n),a=QS(r.dispatch);return wi.createElement(t,{...n,...a,...i})},BMt=t=>function({ctx:r,props:n}){const i=SMt(r,n),a=QS(r.dispatch);return wi.createElement(t,{...n,...a,...i})},UMt=t=>function({ctx:r,props:n}){const i=dMt(r,n),a=QS(r.dispatch);return wi.createElement(t,{...n,...a,...i})},HMt=t=>function({ctx:r,props:n}){const i=TMt(r,n),a=QS(r.dispatch);return wi.createElement(t,{...n,...a,...i})},jMt=t=>function({ctx:r,props:n}){const i=hMt(r,n),a=QS(r.dispatch);return wi.createElement(t,{...n,...a,...i})},VMt=t=>function({ctx:r,props:n}){const i=pMt(r,n),a=AMt(r.dispatch);return wi.createElement(t,{...n,...a,...i})},qMt=t=>function({ctx:r,props:n}){const i=CMt(r,n);return wi.createElement(t,{...n,...i})},$He=(t,e=!0)=>t_(MMt(e?wi.memo(t):t)),$w=(t,e=!0)=>t_(RMt(e?wi.memo(t):t)),ZB=(t,e=!0)=>t_(kMt(e?wi.memo(t):t)),GMt=(t,e=!0)=>t_(IMt(e?wi.memo(t):t)),$Mt=(t,e=!0)=>t_(PMt(e?wi.memo(t):t)),WMt=(t,e=!0)=>t_(DMt(e?wi.memo(t):t)),YMt=(t,e=!0)=>t_(LMt(e?wi.memo(t):t)),$ge=(t,e=!0)=>t_(OMt(e?wi.memo(t):t)),XMt=(t,e=!0)=>t_(NMt(e?wi.memo(t):t)),x4=(t,e=!0)=>t_(FMt(e?wi.memo(t):t)),ZMt=(t,e=!0)=>t_(zMt(e?wi.memo(t):t)),KMt=(t,e=!0)=>t_(BMt(e?wi.memo(t):t)),WHe=(t,e=!0)=>t_(UMt(e?wi.memo(t):t)),JMt=(t,e=!0)=>t_(HMt(e?wi.memo(t):t)),YHe=(t,e=!0)=>t_(jMt(e?wi.memo(t):t)),QMt=(t,e=!0)=>t_(VMt(e?wi.memo(t):t)),e5t=(t,e=!0)=>t_(qMt(e?wi.memo(t):t)),jk=t=>function(r){const n=sX(),i=n.i18n?.locale??_N.locale,a=n.i18n?.translate??_N.translate;return wi.createElement(t,{...r,locale:i,t:a})},Wge=t=>function(r){const n=ze.useMemo(()=>cCt(r.t,sCt,r.i18nKeyPrefix,r.label),[r.t,r.i18nKeyPrefix,r.label]);return wi.createElement(t,{...r,translations:n})};class XHe extends wi.Component{constructor(e){super(e),this.state={id:Zz(e.uischema)?Ghe(e.uischema.scope):void 0}}componentWillUnmount(){Zz(this.props.uischema)&&$he(this.state.id)}componentDidUpdate(e){e.schema!==this.props.schema&&($he(this.state.id),this.setState({id:Zz(this.props.uischema)?Ghe(this.props.uischema.scope):void 0}))}render(){const{schema:e,rootSchema:r,uischema:n,path:i,enabled:a,renderers:o,cells:s,config:d}=this.props;return wi.createElement(t5t,{uischema:n,schema:e,rootSchema:r,path:i,enabled:a,renderers:o,cells:s,id:this.state.id,config:d})}}const t5t=wi.memo(function(e){const r=ze.useMemo(()=>({rootSchema:e.rootSchema,config:e.config}),[e.rootSchema,e.config]),n=ze.useMemo(()=>Yme(e.renderers,i=>i.tester(e.uischema,e.schema,r)),[e.renderers,e.uischema,e.schema,r]);if(n===void 0||n.tester(e.uischema,e.schema,r)===-1)return wi.createElement(qHe,{type:"renderer"});{const i=n.renderer;return wi.createElement(i,{uischema:e.uischema,schema:e.schema,path:e.path,enabled:e.enabled,renderers:e.renderers,cells:e.cells,id:e.id})}});class r5t extends XHe{constructor(e){super(e)}}const z5=$He(XHe);$He(r5t);const Yge=t=>{const{ajv:e,data:r,schema:n,uischema:i,renderers:a,cells:o,onChange:s,config:d,uischemas:b,readonly:L,validationMode:B,i18n:V,additionalErrors:X,middleware:ie}=t,de=ze.useMemo(()=>n!==void 0?n:wL.jsonSchema(r),[n,r]),ae=ze.useMemo(()=>typeof i=="object"?i:wL.uiSchema(de,void 0,void 0,de),[i,de]);return wi.createElement(lMt,{initState:{core:{ajv:e,data:r,schema:de,uischema:ae,validationMode:B,additionalErrors:X},config:d,uischemas:b,renderers:a,cells:o,readonly:L,i18n:V},onChange:s,middleware:ie},wi.createElement(z5,null))},n5t=({uischema:t,schema:e,rootSchema:r,path:n,cells:i,id:a,enabled:o,renderers:s,config:d})=>{const b=ze.useMemo(()=>({rootSchema:r,config:d}),[r,d]),L=ze.useMemo(()=>Yme(i,B=>B.tester(t,e,b)),[i,t,e,b]);if(L===void 0||L.tester(t,e,b)===-1)return wi.createElement(qHe,{type:"cell"});{const B=L.cell;return wi.createElement(B,{uischema:t,schema:e,enabled:o,path:n,id:a,renderers:s,cells:i})}},E5e=ZMt(n5t);var Mie,A5e;function i5t(){if(A5e)return Mie;A5e=1;var t=ige();function e(r){return t(r)?void 0:r}return Mie=e,Mie}var Rie,C5e;function a5t(){if(C5e)return Rie;C5e=1;var t=$8(),e=tX(),r=pge(),n=VB(),i=Y8(),a=i5t(),o=tHe(),s=UUe(),d=1,b=2,L=4,B=o(function(V,X){var ie={};if(V==null)return ie;var de=!1;X=t(X,function(U){return U=n(U,V),de||(de=U.length>1),U}),i(V,s(V),ie),de&&(ie=e(ie,d|b|L,a));for(var ae=X.length;ae--;)r(ie,X[ae]);return ie});return Rie=B,Rie}var o5t=a5t();const s5t=Qh(o5t);var kie,M5e;function l5t(){if(M5e)return kie;M5e=1;function t(e,r,n){for(var i=-1,a=e==null?0:e.length;++i<a;)if(n(r,e[i]))return!0;return!1}return kie=t,kie}var Iie,R5e;function u5t(){if(R5e)return Iie;R5e=1;var t=QBe(),e=GUe(),r=zme(),n=1/0,i=t&&1/r(new t([,-0]))[1]==n?function(a){return new t(a)}:e;return Iie=i,Iie}var Pie,k5e;function c5t(){if(k5e)return Pie;k5e=1;var t=jBe(),e=XUe(),r=l5t(),n=VBe(),i=u5t(),a=zme(),o=200;function s(d,b,L){var B=-1,V=e,X=d.length,ie=!0,de=[],ae=de;if(L)ie=!1,V=r;else if(X>=o){var U=b?null:i(d);if(U)return a(U);ie=!1,V=n,ae=new t}else ae=b?[]:de;e:for(;++B<X;){var ve=d[B],Se=b?b(ve):ve;if(ve=L||ve!==0?ve:0,ie&&Se===Se){for(var Pe=ae.length;Pe--;)if(ae[Pe]===Se)continue e;b&&ae.push(Se),de.push(ve)}else V(ae,Se,L)||(ae!==de&&ae.push(Se),de.push(ve))}return de}return Pie=s,Pie}var Die,I5e;function f5t(){if(I5e)return Die;I5e=1;var t=eHe(),e=FUe(),r=c5t(),n=DUe(),i=e(function(a){return r(t(a,1,n,!0))});return Die=i,Die}var d5t=f5t();const h5t=Qh(d5t),eF=Hu(Ke.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"})),ZHe=Hu(Ke.jsx("path",{d:"m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z"})),KHe=Hu(Ke.jsx("path",{d:"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8z"})),lX=Hu(Ke.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"})),JHe=Hu(Ke.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}));var yG={exports:{}},p5t=yG.exports,P5e;function v5t(){return P5e||(P5e=1,(function(t,e){(function(r,n){t.exports=n()})(p5t,(function(){var r=1e3,n=6e4,i=36e5,a="millisecond",o="second",s="minute",d="hour",b="day",L="week",B="month",V="quarter",X="year",ie="date",de="Invalid Date",ae=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,U=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,ve={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},Se=function(_t,Dt,qt){var Lt=String(_t);return!Lt||Lt.length>=Dt?_t:""+Array(Dt+1-Lt.length).join(qt)+_t},Pe={s:Se,z:function(_t){var Dt=-_t.utcOffset(),qt=Math.abs(Dt),Lt=Math.floor(qt/60),dr=qt%60;return(Dt<=0?"+":"-")+Se(Lt,2,"0")+":"+Se(dr,2,"0")},m:function _t(Dt,qt){if(Dt.date()<qt.date())return-_t(qt,Dt);var Lt=12*(qt.year()-Dt.year())+(qt.month()-Dt.month()),dr=Dt.clone().add(Lt,B),Zt=qt-dr<0,Cr=Dt.clone().add(Lt+(Zt?-1:1),B);return+(-(Lt+(qt-dr)/(Zt?dr-Cr:Cr-dr))||0)},a:function(_t){return _t<0?Math.ceil(_t)||0:Math.floor(_t)},p:function(_t){return{M:B,y:X,w:L,d:b,D:ie,h:d,m:s,s:o,ms:a,Q:V}[_t]||String(_t||"").toLowerCase().replace(/s$/,"")},u:function(_t){return _t===void 0}},Me="en",Ie={};Ie[Me]=ve;var Ve=function(_t){return _t instanceof ut},Ze=function(_t,Dt,qt){var Lt;if(!_t)return Me;if(typeof _t=="string")Ie[_t]&&(Lt=_t),Dt&&(Ie[_t]=Dt,Lt=_t);else{var dr=_t.name;Ie[dr]=_t,Lt=dr}return!qt&&Lt&&(Me=Lt),Lt||!qt&&Me},Je=function(_t,Dt){if(Ve(_t))return _t.clone();var qt=typeof Dt=="object"?Dt:{};return qt.date=_t,qt.args=arguments,new ut(qt)},nt=Pe;nt.l=Ze,nt.i=Ve,nt.w=function(_t,Dt){return Je(_t,{locale:Dt.$L,utc:Dt.$u,x:Dt.$x,$offset:Dt.$offset})};var ut=(function(){function _t(qt){this.$L=Ze(qt.locale,null,!0),this.parse(qt)}var Dt=_t.prototype;return Dt.parse=function(qt){this.$d=(function(Lt){var dr=Lt.date,Zt=Lt.utc;if(dr===null)return new Date(NaN);if(nt.u(dr))return new Date;if(dr instanceof Date)return new Date(dr);if(typeof dr=="string"&&!/Z$/i.test(dr)){var Cr=dr.match(ae);if(Cr){var yt=Cr[2]-1||0,Vt=(Cr[7]||"0").substring(0,3);return Zt?new Date(Date.UTC(Cr[1],yt,Cr[3]||1,Cr[4]||0,Cr[5]||0,Cr[6]||0,Vt)):new Date(Cr[1],yt,Cr[3]||1,Cr[4]||0,Cr[5]||0,Cr[6]||0,Vt)}}return new Date(dr)})(qt),this.$x=qt.x||{},this.init()},Dt.init=function(){var qt=this.$d;this.$y=qt.getFullYear(),this.$M=qt.getMonth(),this.$D=qt.getDate(),this.$W=qt.getDay(),this.$H=qt.getHours(),this.$m=qt.getMinutes(),this.$s=qt.getSeconds(),this.$ms=qt.getMilliseconds()},Dt.$utils=function(){return nt},Dt.isValid=function(){return this.$d.toString()!==de},Dt.isSame=function(qt,Lt){var dr=Je(qt);return this.startOf(Lt)<=dr&&dr<=this.endOf(Lt)},Dt.isAfter=function(qt,Lt){return Je(qt)<this.startOf(Lt)},Dt.isBefore=function(qt,Lt){return this.endOf(Lt)<Je(qt)},Dt.$g=function(qt,Lt,dr){return nt.u(qt)?this[Lt]:this.set(dr,qt)},Dt.unix=function(){return Math.floor(this.valueOf()/1e3)},Dt.valueOf=function(){return this.$d.getTime()},Dt.startOf=function(qt,Lt){var dr=this,Zt=!!nt.u(Lt)||Lt,Cr=nt.p(qt),yt=function(Un,Qn){var Jn=nt.w(dr.$u?Date.UTC(dr.$y,Qn,Un):new Date(dr.$y,Qn,Un),dr);return Zt?Jn:Jn.endOf(b)},Vt=function(Un,Qn){return nt.w(dr.toDate()[Un].apply(dr.toDate("s"),(Zt?[0,0,0,0]:[23,59,59,999]).slice(Qn)),dr)},Er=this.$W,sr=this.$M,or=this.$D,Ar="set"+(this.$u?"UTC":"");switch(Cr){case X:return Zt?yt(1,0):yt(31,11);case B:return Zt?yt(1,sr):yt(0,sr+1);case L:var Ir=this.$locale().weekStart||0,_n=(Er<Ir?Er+7:Er)-Ir;return yt(Zt?or-_n:or+(6-_n),sr);case b:case ie:return Vt(Ar+"Hours",0);case d:return Vt(Ar+"Minutes",1);case s:return Vt(Ar+"Seconds",2);case o:return Vt(Ar+"Milliseconds",3);default:return this.clone()}},Dt.endOf=function(qt){return this.startOf(qt,!1)},Dt.$set=function(qt,Lt){var dr,Zt=nt.p(qt),Cr="set"+(this.$u?"UTC":""),yt=(dr={},dr[b]=Cr+"Date",dr[ie]=Cr+"Date",dr[B]=Cr+"Month",dr[X]=Cr+"FullYear",dr[d]=Cr+"Hours",dr[s]=Cr+"Minutes",dr[o]=Cr+"Seconds",dr[a]=Cr+"Milliseconds",dr)[Zt],Vt=Zt===b?this.$D+(Lt-this.$W):Lt;if(Zt===B||Zt===X){var Er=this.clone().set(ie,1);Er.$d[yt](Vt),Er.init(),this.$d=Er.set(ie,Math.min(this.$D,Er.daysInMonth())).$d}else yt&&this.$d[yt](Vt);return this.init(),this},Dt.set=function(qt,Lt){return this.clone().$set(qt,Lt)},Dt.get=function(qt){return this[nt.p(qt)]()},Dt.add=function(qt,Lt){var dr,Zt=this;qt=Number(qt);var Cr=nt.p(Lt),yt=function(sr){var or=Je(Zt);return nt.w(or.date(or.date()+Math.round(sr*qt)),Zt)};if(Cr===B)return this.set(B,this.$M+qt);if(Cr===X)return this.set(X,this.$y+qt);if(Cr===b)return yt(1);if(Cr===L)return yt(7);var Vt=(dr={},dr[s]=n,dr[d]=i,dr[o]=r,dr)[Cr]||1,Er=this.$d.getTime()+qt*Vt;return nt.w(Er,this)},Dt.subtract=function(qt,Lt){return this.add(-1*qt,Lt)},Dt.format=function(qt){var Lt=this,dr=this.$locale();if(!this.isValid())return dr.invalidDate||de;var Zt=qt||"YYYY-MM-DDTHH:mm:ssZ",Cr=nt.z(this),yt=this.$H,Vt=this.$m,Er=this.$M,sr=dr.weekdays,or=dr.months,Ar=function(Qn,Jn,Vn,jn){return Qn&&(Qn[Jn]||Qn(Lt,Zt))||Vn[Jn].substr(0,jn)},Ir=function(Qn){return nt.s(yt%12||12,Qn,"0")},_n=dr.meridiem||function(Qn,Jn,Vn){var jn=Qn<12?"AM":"PM";return Vn?jn.toLowerCase():jn},Un={YY:String(this.$y).slice(-2),YYYY:this.$y,M:Er+1,MM:nt.s(Er+1,2,"0"),MMM:Ar(dr.monthsShort,Er,or,3),MMMM:Ar(or,Er),D:this.$D,DD:nt.s(this.$D,2,"0"),d:String(this.$W),dd:Ar(dr.weekdaysMin,this.$W,sr,2),ddd:Ar(dr.weekdaysShort,this.$W,sr,3),dddd:sr[this.$W],H:String(yt),HH:nt.s(yt,2,"0"),h:Ir(1),hh:Ir(2),a:_n(yt,Vt,!0),A:_n(yt,Vt,!1),m:String(Vt),mm:nt.s(Vt,2,"0"),s:String(this.$s),ss:nt.s(this.$s,2,"0"),SSS:nt.s(this.$ms,3,"0"),Z:Cr};return Zt.replace(U,(function(Qn,Jn){return Jn||Un[Qn]||Cr.replace(":","")}))},Dt.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},Dt.diff=function(qt,Lt,dr){var Zt,Cr=nt.p(Lt),yt=Je(qt),Vt=(yt.utcOffset()-this.utcOffset())*n,Er=this-yt,sr=nt.m(this,yt);return sr=(Zt={},Zt[X]=sr/12,Zt[B]=sr,Zt[V]=sr/3,Zt[L]=(Er-Vt)/6048e5,Zt[b]=(Er-Vt)/864e5,Zt[d]=Er/i,Zt[s]=Er/n,Zt[o]=Er/r,Zt)[Cr]||Er,dr?sr:nt.a(sr)},Dt.daysInMonth=function(){return this.endOf(B).$D},Dt.$locale=function(){return Ie[this.$L]},Dt.locale=function(qt,Lt){if(!qt)return this.$L;var dr=this.clone(),Zt=Ze(qt,Lt,!0);return Zt&&(dr.$L=Zt),dr},Dt.clone=function(){return nt.w(this.$d,this)},Dt.toDate=function(){return new Date(this.valueOf())},Dt.toJSON=function(){return this.isValid()?this.toISOString():null},Dt.toISOString=function(){return this.$d.toISOString()},Dt.toString=function(){return this.$d.toUTCString()},_t})(),ht=ut.prototype;return Je.prototype=ht,[["$ms",a],["$s",o],["$m",s],["$H",d],["$W",b],["$M",B],["$y",X],["$D",ie]].forEach((function(_t){ht[_t[1]]=function(Dt){return this.$g(Dt,_t[0],_t[1])}})),Je.extend=function(_t,Dt){return _t.$i||(_t(Dt,ut,Je),_t.$i=!0),Je},Je.locale=Ze,Je.isDayjs=Ve,Je.unix=function(_t){return Je(1e3*_t)},Je.en=Ie[Me],Je.Ls=Ie,Je.p={},Je}))})(yG)),yG.exports}var m5t=v5t();const K1=Qh(m5t);var bG={exports:{}},g5t=bG.exports,D5e;function y5t(){return D5e||(D5e=1,(function(t,e){(function(r,n){t.exports=n()})(g5t,(function(){var r={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},n=/(\[[^[]*\])|([-:/.()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d\d/,a=/\d\d?/,o=/\d*[^\s\d-_:/()]+/,s={},d=function(de){return(de=+de)+(de>68?1900:2e3)},b=function(de){return function(ae){this[de]=+ae}},L=[/[+-]\d\d:?(\d\d)?|Z/,function(de){(this.zone||(this.zone={})).offset=(function(ae){if(!ae||ae==="Z")return 0;var U=ae.match(/([+-]|\d\d)/g),ve=60*U[1]+(+U[2]||0);return ve===0?0:U[0]==="+"?-ve:ve})(de)}],B=function(de){var ae=s[de];return ae&&(ae.indexOf?ae:ae.s.concat(ae.f))},V=function(de,ae){var U,ve=s.meridiem;if(ve){for(var Se=1;Se<=24;Se+=1)if(de.indexOf(ve(Se,0,ae))>-1){U=Se>12;break}}else U=de===(ae?"pm":"PM");return U},X={A:[o,function(de){this.afternoon=V(de,!1)}],a:[o,function(de){this.afternoon=V(de,!0)}],S:[/\d/,function(de){this.milliseconds=100*+de}],SS:[i,function(de){this.milliseconds=10*+de}],SSS:[/\d{3}/,function(de){this.milliseconds=+de}],s:[a,b("seconds")],ss:[a,b("seconds")],m:[a,b("minutes")],mm:[a,b("minutes")],H:[a,b("hours")],h:[a,b("hours")],HH:[a,b("hours")],hh:[a,b("hours")],D:[a,b("day")],DD:[i,b("day")],Do:[o,function(de){var ae=s.ordinal,U=de.match(/\d+/);if(this.day=U[0],ae)for(var ve=1;ve<=31;ve+=1)ae(ve).replace(/\[|\]/g,"")===de&&(this.day=ve)}],M:[a,b("month")],MM:[i,b("month")],MMM:[o,function(de){var ae=B("months"),U=(B("monthsShort")||ae.map((function(ve){return ve.substr(0,3)}))).indexOf(de)+1;if(U<1)throw new Error;this.month=U%12||U}],MMMM:[o,function(de){var ae=B("months").indexOf(de)+1;if(ae<1)throw new Error;this.month=ae%12||ae}],Y:[/[+-]?\d+/,b("year")],YY:[i,function(de){this.year=d(de)}],YYYY:[/\d{4}/,b("year")],Z:L,ZZ:L};function ie(de){var ae,U;ae=de,U=s&&s.formats;for(var ve=(de=ae.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(Je,nt,ut){var ht=ut&&ut.toUpperCase();return nt||U[ut]||r[ut]||U[ht].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(_t,Dt,qt){return Dt||qt.slice(1)}))}))).match(n),Se=ve.length,Pe=0;Pe<Se;Pe+=1){var Me=ve[Pe],Ie=X[Me],Ve=Ie&&Ie[0],Ze=Ie&&Ie[1];ve[Pe]=Ze?{regex:Ve,parser:Ze}:Me.replace(/^\[|\]$/g,"")}return function(Je){for(var nt={},ut=0,ht=0;ut<Se;ut+=1){var _t=ve[ut];if(typeof _t=="string")ht+=_t.length;else{var Dt=_t.regex,qt=_t.parser,Lt=Je.substr(ht),dr=Dt.exec(Lt)[0];qt.call(nt,dr),Je=Je.replace(dr,"")}}return(function(Zt){var Cr=Zt.afternoon;if(Cr!==void 0){var yt=Zt.hours;Cr?yt<12&&(Zt.hours+=12):yt===12&&(Zt.hours=0),delete Zt.afternoon}})(nt),nt}}return function(de,ae,U){U.p.customParseFormat=!0,de&&de.parseTwoDigitYear&&(d=de.parseTwoDigitYear);var ve=ae.prototype,Se=ve.parse;ve.parse=function(Pe){var Me=Pe.date,Ie=Pe.utc,Ve=Pe.args;this.$u=Ie;var Ze=Ve[1];if(typeof Ze=="string"){var Je=Ve[2]===!0,nt=Ve[3]===!0,ut=Je||nt,ht=Ve[2];nt&&(ht=Ve[2]),s=this.$locale(),!Je&&ht&&(s=U.Ls[ht]),this.$d=(function(Lt,dr,Zt){try{if(["x","X"].indexOf(dr)>-1)return new Date((dr==="X"?1e3:1)*Lt);var Cr=ie(dr)(Lt),yt=Cr.year,Vt=Cr.month,Er=Cr.day,sr=Cr.hours,or=Cr.minutes,Ar=Cr.seconds,Ir=Cr.milliseconds,_n=Cr.zone,Un=new Date,Qn=Er||(yt||Vt?1:Un.getDate()),Jn=yt||Un.getFullYear(),Vn=0;yt&&!Vt||(Vn=Vt>0?Vt-1:Un.getMonth());var jn=sr||0,Lr=or||0,Yn=Ar||0,On=Ir||0;return _n?new Date(Date.UTC(Jn,Vn,Qn,jn,Lr,Yn,On+60*_n.offset*1e3)):Zt?new Date(Date.UTC(Jn,Vn,Qn,jn,Lr,Yn,On)):new Date(Jn,Vn,Qn,jn,Lr,Yn,On)}catch{return new Date("")}})(Me,Ze,Ie),this.init(),ht&&ht!==!0&&(this.$L=this.locale(ht).$L),ut&&Me!=this.format(Ze)&&(this.$d=new Date("")),s={}}else if(Ze instanceof Array)for(var _t=Ze.length,Dt=1;Dt<=_t;Dt+=1){Ve[1]=Ze[Dt-1];var qt=U.apply(this,Ve);if(qt.isValid()){this.$d=qt.$d,this.$L=qt.$L,this.init();break}Dt===_t&&(this.$d=new Date(""))}else Se.call(this,Pe)}}}))})(bG)),bG.exports}var b5t=y5t();const QHe=Qh(b5t),Xge=Hu(Ke.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}));var Lie,L5e;function x5t(){if(L5e)return Lie;L5e=1;var t=Qme(),e=Uk();function r(n,i){var a=-1,o=e(n)?Array(n.length):[];return t(n,function(s,d,b){o[++a]=i(s,d,b)}),o}return Lie=r,Lie}var Oie,O5e;function _5t(){if(O5e)return Oie;O5e=1;var t=$8(),e=y4(),r=x5t(),n=Rb();function i(a,o){var s=n(a)?t:r;return s(a,e(o,3))}return Oie=i,Oie}var w5t=_5t();const eje=Qh(w5t),S5t=["localeText"],Khe=ze.createContext(null),uX=function(e){const{localeText:r}=e,n=Ms(e,S5t),{utils:i,localeText:a}=ze.useContext(Khe)??{utils:void 0,localeText:void 0},o=yh({props:n,name:"MuiLocalizationProvider"}),{children:s,dateAdapter:d,dateFormats:b,dateLibInstance:L,adapterLocale:B,localeText:V}=o,X=ze.useMemo(()=>Mr({},V,a,r),[V,a,r]),ie=ze.useMemo(()=>{if(!d)return i||null;const U=new d({locale:B,formats:b,instance:L});if(!U.isMUIAdapter)throw new Error(["MUI X: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join(`
`));return U},[d,B,b,L,i]),de=ze.useMemo(()=>ie?{minDate:ie.date("1900-01-01T00:00:00.000"),maxDate:ie.date("2099-12-31T00:00:00.000")}:null,[ie]),ae=ze.useMemo(()=>({utils:ie,defaultDates:de,localeText:X}),[de,ie,X]);return Ke.jsx(Khe.Provider,{value:ae,children:s})},T5t=t=>({components:{MuiLocalizationProvider:{defaultProps:{localeText:Mr({},t)}}}}),tF=t=>{const{utils:e,formatKey:r,contextTranslation:n,propsTranslation:i}=t;return a=>{const o=a!==null&&e.isValid(a)?e.format(a,r):null;return(i??n)(a,e,o)}},tje={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"Open previous view",openNextView:"Open next view",calendarViewSwitchingButtonAriaLabel:t=>t==="year"?"year view is open, switch to calendar view":"calendar view is open, switch to year view",start:"Start",end:"End",startDate:"Start date",startTime:"Start time",endDate:"End date",endTime:"End time",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerToolbarTitle:"Select date",dateTimePickerToolbarTitle:"Select date & time",timePickerToolbarTitle:"Select time",dateRangePickerToolbarTitle:"Select date range",clockLabelText:(t,e,r,n)=>`Select ${t}. ${!n&&(e===null||!r.isValid(e))?"No time selected":`Selected time is ${n??r.format(e,"fullTime")}`}`,hoursClockNumberText:t=>`${t} hours`,minutesClockNumberText:t=>`${t} minutes`,secondsClockNumberText:t=>`${t} seconds`,selectViewText:t=>`Select ${t}`,calendarWeekNumberHeaderLabel:"Week number",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:t=>`Week ${t}`,calendarWeekNumberText:t=>`${t}`,openDatePickerDialogue:(t,e,r)=>r||t!==null&&e.isValid(t)?`Choose date, selected date is ${r??e.format(t,"fullDate")}`:"Choose date",openTimePickerDialogue:(t,e,r)=>r||t!==null&&e.isValid(t)?`Choose time, selected time is ${r??e.format(t,"fullTime")}`:"Choose time",fieldClearLabel:"Clear",timeTableLabel:"pick time",dateTableLabel:"pick date",fieldYearPlaceholder:t=>"Y".repeat(t.digitAmount),fieldMonthPlaceholder:t=>t.contentType==="letter"?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:t=>t.contentType==="letter"?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa",year:"Year",month:"Month",day:"Day",weekDay:"Week day",hours:"Hours",minutes:"Minutes",seconds:"Seconds",meridiem:"Meridiem",empty:"Empty"},E5t=tje;T5t(tje);const WL=()=>{const t=ze.useContext(Khe);if(t===null)throw new Error(["MUI X: Can not find the date and time pickers localization context.","It looks like you forgot to wrap your component in LocalizationProvider.","This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package"].join(`
`));if(t.utils===null)throw new Error(["MUI X: Can not find the date and time pickers adapter from its localization context.","It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider."].join(`
`));const e=ze.useMemo(()=>Mr({},E5t,t.localeText),[t.localeText]);return ze.useMemo(()=>Mr({},t,{localeText:e}),[t,e])},yp=()=>WL().utils,YL=()=>WL().defaultDates,XL=t=>{const e=yp(),r=ze.useRef(void 0);return r.current===void 0&&(r.current=e.date(void 0,t)),r.current},kb=()=>WL().localeText,A5t=Hu(Ke.jsx("path",{d:"M7 10l5 5 5-5z"})),C5t=Hu(Ke.jsx("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"})),M5t=Hu(Ke.jsx("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})),rje=Hu(Ke.jsx("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"})),R5t=Hu(Ke.jsxs(ze.Fragment,{children:[Ke.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),Ke.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})),k5t=Hu(Ke.jsx("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"})),I5t=Hu(Ke.jsxs(ze.Fragment,{children:[Ke.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),Ke.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})),P5t=Hu(Ke.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}));function D5t(t){return Al("MuiPickersArrowSwitcher",t)}Ml("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);const L5t=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId"],O5t=["ownerState"],N5t=["ownerState"],F5t=fa("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"flex"}),z5t=fa("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(t,e)=>e.spacer})(({theme:t})=>({width:t.spacing(3)})),N5e=fa(Zf,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(t,e)=>e.button})({variants:[{props:{hidden:!0},style:{visibility:"hidden"}}]}),B5t=t=>{const{classes:e}=t;return Cs({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},D5t,e)},nje=ze.forwardRef(function(e,r){const n=Kv(),i=yh({props:e,name:"MuiPickersArrowSwitcher"}),{children:a,className:o,slots:s,slotProps:d,isNextDisabled:b,isNextHidden:L,onGoToNext:B,nextLabel:V,isPreviousDisabled:X,isPreviousHidden:ie,onGoToPrevious:de,previousLabel:ae,labelId:U}=i,ve=Ms(i,L5t),Se=i,Pe=B5t(Se),Me={isDisabled:b,isHidden:L,goTo:B,label:V},Ie={isDisabled:X,isHidden:ie,goTo:de,label:ae},Ve=s?.previousIconButton??N5e,Ze=Kd({elementType:Ve,externalSlotProps:d?.previousIconButton,additionalProps:{size:"medium",title:Ie.label,"aria-label":Ie.label,disabled:Ie.isDisabled,edge:"end",onClick:Ie.goTo},ownerState:Mr({},Se,{hidden:Ie.isHidden}),className:Vo(Pe.button,Pe.previousIconButton)}),Je=s?.nextIconButton??N5e,nt=Kd({elementType:Je,externalSlotProps:d?.nextIconButton,additionalProps:{size:"medium",title:Me.label,"aria-label":Me.label,disabled:Me.isDisabled,edge:"start",onClick:Me.goTo},ownerState:Mr({},Se,{hidden:Me.isHidden}),className:Vo(Pe.button,Pe.nextIconButton)}),ut=s?.leftArrowIcon??C5t,ht=Kd({elementType:ut,externalSlotProps:d?.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:Se,className:Pe.leftArrowIcon}),_t=Ms(ht,O5t),Dt=s?.rightArrowIcon??M5t,qt=Kd({elementType:Dt,externalSlotProps:d?.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:Se,className:Pe.rightArrowIcon}),Lt=Ms(qt,N5t);return Ke.jsxs(F5t,Mr({ref:r,className:Vo(Pe.root,o),ownerState:Se},ve,{children:[Ke.jsx(Ve,Mr({},Ze,{children:n?Ke.jsx(Dt,Mr({},Lt)):Ke.jsx(ut,Mr({},_t))})),a?Ke.jsx(Su,{variant:"subtitle1",component:"span",id:U,children:a}):Ke.jsx(z5t,{className:Pe.spacer,ownerState:Se}),Ke.jsx(Je,Mr({},nt,{children:n?Ke.jsx(ut,Mr({},_t)):Ke.jsx(Dt,Mr({},Lt))}))]}))}),w5=(t,e)=>t.length!==e.length?!1:e.every(r=>t.includes(r)),Zge=({openTo:t,defaultOpenTo:e,views:r,defaultViews:n})=>{const i=r??n;let a;if(t!=null)a=t;else if(i.includes(e))a=e;else if(i.length>0)a=i[0];else throw new Error("MUI X: The `views` prop must contain at least one view.");return{views:i,openTo:a}},ije=["hours","minutes","seconds"],n8=t=>ije.includes(t),Pz=t=>ije.includes(t)||t==="meridiem",U5t=(t,e)=>t?e.getHours(t)>=12?"pm":"am":null,L9=(t,e,r)=>r&&(t>=12?"pm":"am")!==e?e==="am"?t-12:t+12:t,H5t=(t,e,r,n)=>{const i=L9(n.getHours(t),e,r);return n.setHours(t,i)},F5e=(t,e)=>e.getHours(t)*3600+e.getMinutes(t)*60+e.getSeconds(t),KB=(t,e)=>(r,n)=>t?e.isAfter(r,n):F5e(r,e)>F5e(n,e),d$=(t,{format:e,views:r,ampm:n})=>{if(e!=null)return e;const i=t.formats;return w5(r,["hours"])?n?`${i.hours12h} ${i.meridiem}`:i.hours24h:w5(r,["minutes"])?i.minutes:w5(r,["seconds"])?i.seconds:w5(r,["minutes","seconds"])?`${i.minutes}:${i.seconds}`:w5(r,["hours","minutes","seconds"])?n?`${i.hours12h}:${i.minutes}:${i.seconds} ${i.meridiem}`:`${i.hours24h}:${i.minutes}:${i.seconds}`:n?`${i.hours12h}:${i.minutes} ${i.meridiem}`:`${i.hours24h}:${i.minutes}`};function JB({onChange:t,onViewChange:e,openTo:r,view:n,views:i,autoFocus:a,focusedView:o,onFocusedViewChange:s}){const d=ze.useRef(r),b=ze.useRef(i),L=ze.useRef(i.includes(r)?r:i[0]),[B,V]=V_({name:"useViews",state:"view",controlled:n,default:L.current}),X=ze.useRef(a?B:null),[ie,de]=V_({name:"useViews",state:"focusedView",controlled:o,default:X.current});ze.useEffect(()=>{(d.current&&d.current!==r||b.current&&b.current.some(Ve=>!i.includes(Ve)))&&(V(i.includes(r)?r:i[0]),b.current=i,d.current=r)},[r,V,B,i]);const ae=i.indexOf(B),U=i[ae-1]??null,ve=i[ae+1]??null,Se=vl((Ve,Ze)=>{de(Ze?Ve:Je=>Ve===Je?null:Je),s?.(Ve,Ze)}),Pe=vl(Ve=>{Se(Ve,!0),Ve!==B&&(V(Ve),e&&e(Ve))}),Me=vl(()=>{ve&&Pe(ve)}),Ie=vl((Ve,Ze,Je)=>{const nt=Ze==="finish",ut=Je?i.indexOf(Je)<i.length-1:!!ve;if(t(Ve,nt&&ut?"partial":Ze,Je),Je&&Je!==B){const _t=i[i.indexOf(Je)+1];_t&&Pe(_t)}else nt&&Me()});return{view:B,setView:Pe,focusedView:ie,setFocusedView:Se,nextView:ve,previousView:U,defaultView:i.includes(r)?r:i[0],goToNextView:Me,setValueAndGoToNextView:Ie}}function j5t(t,{disableFuture:e,maxDate:r,timezone:n}){const i=yp();return ze.useMemo(()=>{const a=i.date(void 0,n),o=i.startOfMonth(e&&i.isBefore(a,r)?a:r);return!i.isAfter(o,t)},[e,r,t,i,n])}function V5t(t,{disablePast:e,minDate:r,timezone:n}){const i=yp();return ze.useMemo(()=>{const a=i.date(void 0,n),o=i.startOfMonth(e&&i.isAfter(a,r)?a:r);return!i.isBefore(o,t)},[e,r,t,i,n])}function cX(t,e,r,n){const i=yp(),a=U5t(t,i),o=ze.useCallback(s=>{const d=t==null?null:H5t(t,s,!!e,i);r(d,n??"partial")},[e,t,r,n,i]);return{meridiemMode:a,handleMeridiemChange:o}}const O9=36,fX=2,dX=320,q5t=280,hX=336,aje=232,Dz=48,pX=fa("div")({overflow:"hidden",width:dX,maxHeight:hX,display:"flex",flexDirection:"column",margin:"0 auto"});function G5t(t){return Al("MuiTimeClock",t)}Ml("MuiTimeClock",["root","arrowSwitcher"]);const i8=220,Tk=36,N9={x:i8/2,y:i8/2},oje={x:N9.x,y:0},$5t=oje.x-N9.x,W5t=oje.y-N9.y,Y5t=t=>t*(180/Math.PI),sje=(t,e,r)=>{const n=e-N9.x,i=r-N9.y,a=Math.atan2($5t,W5t)-Math.atan2(n,i);let o=Y5t(a);o=Math.round(o/t)*t,o%=360;const s=Math.floor(o/t)||0,d=n**2+i**2,b=Math.sqrt(d);return{value:s,distance:b}},X5t=(t,e,r=1)=>{const n=r*6;let{value:i}=sje(n,t,e);return i=i*r%60,i},Z5t=(t,e,r)=>{const{value:n,distance:i}=sje(30,t,e);let a=n||12;return r?a%=12:i<i8/2-Tk&&(a+=12,a%=24),a};function K5t(t){return Al("MuiClockPointer",t)}Ml("MuiClockPointer",["root","thumb"]);const J5t=["className","hasSelected","isInner","type","viewValue"],Q5t=t=>{const{classes:e}=t;return Cs({root:["root"],thumb:["thumb"]},K5t,e)},eRt=fa("div",{name:"MuiClockPointer",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>({width:2,backgroundColor:(t.vars||t).palette.primary.main,position:"absolute",left:"calc(50% - 1px)",bottom:"50%",transformOrigin:"center bottom 0px",variants:[{props:{shouldAnimate:!0},style:{transition:t.transitions.create(["transform","height"])}}]})),tRt=fa("div",{name:"MuiClockPointer",slot:"Thumb",overridesResolver:(t,e)=>e.thumb})(({theme:t})=>({width:4,height:4,backgroundColor:(t.vars||t).palette.primary.contrastText,borderRadius:"50%",position:"absolute",top:-21,left:`calc(50% - ${Tk/2}px)`,border:`${(Tk-4)/2}px solid ${(t.vars||t).palette.primary.main}`,boxSizing:"content-box",variants:[{props:{hasSelected:!0},style:{backgroundColor:(t.vars||t).palette.primary.main}}]}));function rRt(t){const e=yh({props:t,name:"MuiClockPointer"}),{className:r,isInner:n,type:i,viewValue:a}=e,o=Ms(e,J5t),s=ze.useRef(i);ze.useEffect(()=>{s.current=i},[i]);const d=Mr({},e,{shouldAnimate:s.current!==i}),b=Q5t(d),L=()=>{let V=360/(i==="hours"?12:60)*a;return i==="hours"&&a>12&&(V-=360),{height:Math.round((n?.26:.4)*i8),transform:`rotateZ(${V}deg)`}};return Ke.jsx(eRt,Mr({style:L(),className:Vo(b.root,r),ownerState:d},o,{children:Ke.jsx(tRt,{ownerState:d,className:b.thumb})}))}function nRt(t){return Al("MuiClock",t)}Ml("MuiClock",["root","clock","wrapper","squareMask","pin","amButton","pmButton","meridiemText","selected"]);const h$=(t,e,r)=>{let n=e;return n=t.setHours(n,t.getHours(r)),n=t.setMinutes(n,t.getMinutes(r)),n=t.setSeconds(n,t.getSeconds(r)),n=t.setMilliseconds(n,t.getMilliseconds(r)),n},Kz=({date:t,disableFuture:e,disablePast:r,maxDate:n,minDate:i,isDateDisabled:a,utils:o,timezone:s})=>{const d=h$(o,o.date(void 0,s),t);r&&o.isBefore(i,d)&&(i=d),e&&o.isAfter(n,d)&&(n=d);let b=t,L=t;for(o.isBefore(t,i)&&(b=i,L=null),o.isAfter(t,n)&&(L&&(L=n),b=null);b||L;){if(b&&o.isAfter(b,n)&&(b=null),L&&o.isBefore(L,i)&&(L=null),b){if(!a(b))return b;b=o.addDays(b,1)}if(L){if(!a(L))return L;L=o.addDays(L,-1)}}return null},iRt=(t,e)=>e==null||!t.isValid(e)?null:e,Gw=(t,e,r)=>e==null||!t.isValid(e)?r:e,aRt=(t,e,r)=>!t.isValid(e)&&e!=null&&!t.isValid(r)&&r!=null?!0:t.isEqual(e,r),Kge=(t,e)=>{const n=[t.startOfYear(e)];for(;n.length<12;){const i=n[n.length-1];n.push(t.addMonths(i,1))}return n},Jge=(t,e,r)=>r==="date"?t.startOfDay(t.date(void 0,e)):t.date(void 0,e),FC=(t,e)=>{const r=t.setHours(t.date(),e==="am"?2:14);return t.format(r,"meridiem")},oRt=["year","month","day"],a8=t=>oRt.includes(t),F9=(t,{format:e,views:r},n)=>{if(e!=null)return e;const i=t.formats;return w5(r,["year"])?i.year:w5(r,["month"])?i.month:w5(r,["day"])?i.dayOfMonth:w5(r,["month","year"])?`${i.month} ${i.year}`:w5(r,["day","month"])?`${i.month} ${i.dayOfMonth}`:n?/en/.test(t.getCurrentLocaleCode())?i.normalDateWithWeekday:i.normalDate:i.keyboardDate},sRt=(t,e)=>{const r=t.startOfWeek(e);return[0,1,2,3,4,5,6].map(n=>t.addDays(r,n))},lRt=t=>{const{classes:e,meridiemMode:r}=t;return Cs({root:["root"],clock:["clock"],wrapper:["wrapper"],squareMask:["squareMask"],pin:["pin"],amButton:["amButton",r==="am"&&"selected"],pmButton:["pmButton",r==="pm"&&"selected"],meridiemText:["meridiemText"]},nRt,e)},uRt=fa("div",{name:"MuiClock",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>({display:"flex",justifyContent:"center",alignItems:"center",margin:t.spacing(2)})),cRt=fa("div",{name:"MuiClock",slot:"Clock",overridesResolver:(t,e)=>e.clock})({backgroundColor:"rgba(0,0,0,.07)",borderRadius:"50%",height:220,width:220,flexShrink:0,position:"relative",pointerEvents:"none"}),fRt=fa("div",{name:"MuiClock",slot:"Wrapper",overridesResolver:(t,e)=>e.wrapper})({"&:focus":{outline:"none"}}),dRt=fa("div",{name:"MuiClock",slot:"SquareMask",overridesResolver:(t,e)=>e.squareMask})({width:"100%",height:"100%",position:"absolute",pointerEvents:"auto",outline:0,touchAction:"none",userSelect:"none",variants:[{props:{disabled:!1},style:{"@media (pointer: fine)":{cursor:"pointer",borderRadius:"50%"},"&:active":{cursor:"move"}}}]}),hRt=fa("div",{name:"MuiClock",slot:"Pin",overridesResolver:(t,e)=>e.pin})(({theme:t})=>({width:6,height:6,borderRadius:"50%",backgroundColor:(t.vars||t).palette.primary.main,position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"})),lje=(t,e)=>({zIndex:1,bottom:8,paddingLeft:4,paddingRight:4,width:Tk,variants:[{props:{meridiemMode:e},style:{backgroundColor:(t.vars||t).palette.primary.main,color:(t.vars||t).palette.primary.contrastText,"&:hover":{backgroundColor:(t.vars||t).palette.primary.light}}}]}),pRt=fa(Zf,{name:"MuiClock",slot:"AmButton",overridesResolver:(t,e)=>e.amButton})(({theme:t})=>Mr({},lje(t,"am"),{position:"absolute",left:8})),vRt=fa(Zf,{name:"MuiClock",slot:"PmButton",overridesResolver:(t,e)=>e.pmButton})(({theme:t})=>Mr({},lje(t,"pm"),{position:"absolute",right:8})),z5e=fa(Su,{name:"MuiClock",slot:"meridiemText",overridesResolver:(t,e)=>e.meridiemText})({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});function mRt(t){const e=yh({props:t,name:"MuiClock"}),{ampm:r,ampmInClock:n,autoFocus:i,children:a,value:o,handleMeridiemChange:s,isTimeDisabled:d,meridiemMode:b,minutesStep:L=1,onChange:B,selectedId:V,type:X,viewValue:ie,viewRange:[de,ae],disabled:U=!1,readOnly:ve,className:Se}=e,Pe=e,Me=yp(),Ie=kb(),Ve=ze.useRef(!1),Ze=lRt(Pe),Je=d(ie,X),nt=!r&&X==="hours"&&(ie<1||ie>12),ut=(sr,or)=>{U||ve||d(sr,X)||B(sr,or)},ht=(sr,or)=>{let{offsetX:Ar,offsetY:Ir}=sr;if(Ar===void 0){const Un=sr.target.getBoundingClientRect();Ar=sr.changedTouches[0].clientX-Un.left,Ir=sr.changedTouches[0].clientY-Un.top}const _n=X==="seconds"||X==="minutes"?X5t(Ar,Ir,L):Z5t(Ar,Ir,!!r);ut(_n,or)},_t=sr=>{Ve.current=!0,ht(sr,"shallow")},Dt=sr=>{Ve.current&&(ht(sr,"finish"),Ve.current=!1),sr.preventDefault()},qt=sr=>{sr.buttons>0&&ht(sr.nativeEvent,"shallow")},Lt=sr=>{Ve.current&&(Ve.current=!1),ht(sr.nativeEvent,"finish")},dr=ze.useMemo(()=>X==="hours"?!0:ie%5===0,[X,ie]),Zt=X==="minutes"?L:1,Cr=ze.useRef(null);Ah(()=>{i&&Cr.current.focus()},[i]);const yt=sr=>Math.max(de,Math.min(ae,sr)),Vt=sr=>(sr+(ae+1))%(ae+1),Er=sr=>{if(!Ve.current)switch(sr.key){case"Home":ut(de,"partial"),sr.preventDefault();break;case"End":ut(ae,"partial"),sr.preventDefault();break;case"ArrowUp":ut(Vt(ie+Zt),"partial"),sr.preventDefault();break;case"ArrowDown":ut(Vt(ie-Zt),"partial"),sr.preventDefault();break;case"PageUp":ut(yt(ie+5),"partial"),sr.preventDefault();break;case"PageDown":ut(yt(ie-5),"partial"),sr.preventDefault();break;case"Enter":case" ":ut(ie,"finish"),sr.preventDefault();break}};return Ke.jsxs(uRt,{className:Vo(Ze.root,Se),children:[Ke.jsxs(cRt,{className:Ze.clock,children:[Ke.jsx(dRt,{onTouchMove:_t,onTouchStart:_t,onTouchEnd:Dt,onMouseUp:Lt,onMouseMove:qt,ownerState:{disabled:U},className:Ze.squareMask}),!Je&&Ke.jsxs(ze.Fragment,{children:[Ke.jsx(hRt,{className:Ze.pin}),o!=null&&Ke.jsx(rRt,{type:X,viewValue:ie,isInner:nt,hasSelected:dr})]}),Ke.jsx(fRt,{"aria-activedescendant":V,"aria-label":Ie.clockLabelText(X,o,Me,o==null?null:Me.format(o,"fullTime")),ref:Cr,role:"listbox",onKeyDown:Er,tabIndex:0,className:Ze.wrapper,children:a})]}),r&&n&&Ke.jsxs(ze.Fragment,{children:[Ke.jsx(pRt,{onClick:ve?void 0:()=>s("am"),disabled:U||b===null,ownerState:Pe,className:Ze.amButton,title:FC(Me,"am"),children:Ke.jsx(z5e,{variant:"caption",className:Ze.meridiemText,children:FC(Me,"am")})}),Ke.jsx(vRt,{disabled:U||b===null,onClick:ve?void 0:()=>s("pm"),ownerState:Pe,className:Ze.pmButton,title:FC(Me,"pm"),children:Ke.jsx(z5e,{variant:"caption",className:Ze.meridiemText,children:FC(Me,"pm")})})]})]})}function gRt(t){return Al("MuiClockNumber",t)}const Qj=Ml("MuiClockNumber",["root","selected","disabled"]),yRt=["className","disabled","index","inner","label","selected"],bRt=t=>{const{classes:e,selected:r,disabled:n}=t;return Cs({root:["root",r&&"selected",n&&"disabled"]},gRt,e)},xRt=fa("span",{name:"MuiClockNumber",slot:"Root",overridesResolver:(t,e)=>[e.root,{[`&.${Qj.disabled}`]:e.disabled},{[`&.${Qj.selected}`]:e.selected}]})(({theme:t})=>({height:Tk,width:Tk,position:"absolute",left:`calc((100% - ${Tk}px) / 2)`,display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",color:(t.vars||t).palette.text.primary,fontFamily:t.typography.fontFamily,"&:focused":{backgroundColor:(t.vars||t).palette.background.paper},[`&.${Qj.selected}`]:{color:(t.vars||t).palette.primary.contrastText},[`&.${Qj.disabled}`]:{pointerEvents:"none",color:(t.vars||t).palette.text.disabled},variants:[{props:{inner:!0},style:Mr({},t.typography.body2,{color:(t.vars||t).palette.text.secondary})}]}));function uje(t){const e=yh({props:t,name:"MuiClockNumber"}),{className:r,disabled:n,index:i,inner:a,label:o,selected:s}=e,d=Ms(e,yRt),b=e,L=bRt(b),B=i%12/12*Math.PI*2-Math.PI/2,V=(i8-Tk-2)/2*(a?.65:1),X=Math.round(Math.cos(B)*V),ie=Math.round(Math.sin(B)*V);return Ke.jsx(xRt,Mr({className:Vo(L.root,r),"aria-disabled":n?!0:void 0,"aria-selected":s?!0:void 0,role:"option",style:{transform:`translate(${X}px, ${ie+(i8-Tk)/2}px`},ownerState:b},d,{children:o}))}const _Rt=({ampm:t,value:e,getClockNumberText:r,isDisabled:n,selectedId:i,utils:a})=>{const o=e?a.getHours(e):null,s=[],d=t?1:0,b=t?12:23,L=B=>o===null?!1:t?B===12?o===12||o===0:o===B||o-12===B:o===B;for(let B=d;B<=b;B+=1){let V=B.toString();B===0&&(V="00");const X=!t&&(B===0||B>12);V=a.formatNumber(V);const ie=L(B);s.push(Ke.jsx(uje,{id:ie?i:void 0,index:B,inner:X,selected:ie,disabled:n(B),label:V,"aria-label":r(V)},B))}return s},B5e=({utils:t,value:e,isDisabled:r,getClockNumberText:n,selectedId:i})=>{const a=t.formatNumber;return[[5,a("05")],[10,a("10")],[15,a("15")],[20,a("20")],[25,a("25")],[30,a("30")],[35,a("35")],[40,a("40")],[45,a("45")],[50,a("50")],[55,a("55")],[0,a("00")]].map(([o,s],d)=>{const b=o===e;return Ke.jsx(uje,{label:s,id:b?i:void 0,index:d+1,inner:!1,disabled:r(o),selected:b,"aria-label":n(s)},o)})},Qge=({timezone:t,value:e,defaultValue:r,referenceDate:n,onChange:i,valueManager:a})=>{const o=yp(),s=ze.useRef(r),d=e??s.current??a.emptyValue,b=ze.useMemo(()=>a.getTimezone(o,d),[o,a,d]),L=vl(ie=>b==null?ie:a.setTimezone(o,b,ie));let B;t?B=t:b?B=b:n?B=o.getTimezone(n):B="default";const V=ze.useMemo(()=>a.setTimezone(o,B,d),[a,o,B,d]),X=vl((ie,...de)=>{const ae=L(ie);i?.(ae,...de)});return{value:V,handleValueChange:X,timezone:B}},rF=({name:t,timezone:e,value:r,defaultValue:n,referenceDate:i,onChange:a,valueManager:o})=>{const[s,d]=V_({name:t,state:"value",controlled:r,default:n??o.emptyValue}),b=vl((L,...B)=>{d(L),a?.(L,...B)});return Qge({timezone:e,value:s,defaultValue:void 0,referenceDate:i,onChange:b,valueManager:o})},IC={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},wRt=t=>Math.max(...t.map(e=>IC[e.type]??1)),z7=(t,e,r)=>{if(e===IC.year)return t.startOfYear(r);if(e===IC.month)return t.startOfMonth(r);if(e===IC.day)return t.startOfDay(r);let n=r;return e<IC.minutes&&(n=t.setMinutes(n,0)),e<IC.seconds&&(n=t.setSeconds(n,0)),e<IC.milliseconds&&(n=t.setMilliseconds(n,0)),n},SRt=({props:t,utils:e,granularity:r,timezone:n,getTodayDate:i})=>{let a=i?i():z7(e,r,Jge(e,n));t.minDate!=null&&e.isAfterDay(t.minDate,a)&&(a=z7(e,r,t.minDate)),t.maxDate!=null&&e.isBeforeDay(t.maxDate,a)&&(a=z7(e,r,t.maxDate));const o=KB(t.disableIgnoringDatePartForTimeValidation??!1,e);return t.minTime!=null&&o(t.minTime,a)&&(a=z7(e,r,t.disableIgnoringDatePartForTimeValidation?t.minTime:h$(e,a,t.minTime))),t.maxTime!=null&&o(a,t.maxTime)&&(a=z7(e,r,t.disableIgnoringDatePartForTimeValidation?t.maxTime:h$(e,a,t.maxTime))),a},cje=(t,e)=>{const r=t.formatTokenMap[e];if(r==null)throw new Error([`MUI X: The token "${e}" is not supported by the Date and Time Pickers.`,"Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported."].join(`
`));return typeof r=="string"?{type:r,contentType:r==="meridiem"?"letter":"digit",maxLength:void 0}:{type:r.sectionType,contentType:r.contentType,maxLength:r.maxLength}},TRt=t=>{switch(t){case"ArrowUp":return 1;case"ArrowDown":return-1;case"PageUp":return 5;case"PageDown":return-5;default:return 0}},vX=(t,e)=>{const r=[],n=t.date(void 0,"default"),i=t.startOfWeek(n),a=t.endOfWeek(n);let o=i;for(;t.isBefore(o,a);)r.push(o),o=t.addDays(o,1);return r.map(s=>t.formatByString(s,e))},fje=(t,e,r,n)=>{switch(r){case"month":return Kge(t,t.date(void 0,e)).map(i=>t.formatByString(i,n));case"weekDay":return vX(t,n);case"meridiem":{const i=t.date(void 0,e);return[t.startOfDay(i),t.endOfDay(i)].map(a=>t.formatByString(a,n))}default:return[]}},U5e="s",ERt=["0","1","2","3","4","5","6","7","8","9"],ARt=t=>{const e=t.date(void 0);return t.formatByString(t.setSeconds(e,0),U5e)==="0"?ERt:Array.from({length:10}).map((n,i)=>t.formatByString(t.setSeconds(e,i),U5e))},TL=(t,e)=>{if(e[0]==="0")return t;const r=[];let n="";for(let i=0;i<t.length;i+=1){n+=t[i];const a=e.indexOf(n);a>-1&&(r.push(a.toString()),n="")}return r.join("")},e0e=(t,e)=>e[0]==="0"?t:t.split("").map(r=>e[Number(r)]).join(""),H5e=(t,e)=>{const r=TL(t,e);return r!==" "&&!Number.isNaN(Number(r))},dje=(t,e)=>{let r=t;for(r=Number(r).toString();r.length<e;)r=`0${r}`;return r},hje=(t,e,r,n,i)=>{if(i.type==="day"&&i.contentType==="digit-with-letter"){const o=t.setDate(r.longestMonth,e);return t.formatByString(o,i.format)}let a=e.toString();return i.hasLeadingZerosInInput&&(a=dje(a,i.maxLength)),e0e(a,n)},CRt=(t,e,r,n,i,a,o,s)=>{const d=TRt(n),b=n==="Home",L=n==="End",B=r.value===""||b||L,V=()=>{const ie=i[r.type]({currentDate:o,format:r.format,contentType:r.contentType}),de=ve=>hje(t,ve,ie,a,r),ae=r.type==="minutes"&&s?.minutesStep?s.minutesStep:1;let U;if(B){if(r.type==="year"&&!L&&!b)return t.formatByString(t.date(void 0,e),r.format);d>0||b?U=ie.minimum:U=ie.maximum}else U=parseInt(TL(r.value,a),10)+d*ae;return U%ae!==0&&((d<0||b)&&(U+=ae-(ae+U)%ae),(d>0||L)&&(U-=U%ae)),U>ie.maximum?de(ie.minimum+(U-ie.maximum-1)%(ie.maximum-ie.minimum+1)):U<ie.minimum?de(ie.maximum-(ie.minimum-U-1)%(ie.maximum-ie.minimum+1)):de(U)},X=()=>{const ie=fje(t,e,r.type,r.format);if(ie.length===0)return r.value;if(B)return d>0||b?ie[0]:ie[ie.length-1];const U=((ie.indexOf(r.value)+d)%ie.length+ie.length)%ie.length;return ie[U]};return r.contentType==="digit"||r.contentType==="digit-with-letter"?V():X()},t0e=(t,e,r)=>{let n=t.value||t.placeholder;const i=e==="non-input"?t.hasLeadingZerosInFormat:t.hasLeadingZerosInInput;return e==="non-input"&&t.hasLeadingZerosInInput&&!t.hasLeadingZerosInFormat&&(n=Number(TL(n,r)).toString()),["input-rtl","input-ltr"].includes(e)&&t.contentType==="digit"&&!i&&n.length===1&&(n=`${n}‎`),e==="input-rtl"&&(n=`⁨${n}⁩`),n},j5e=(t,e,r,n)=>t.formatByString(t.parse(e,r),n),MRt=(t,e)=>t.formatByString(t.date(void 0,"system"),e).length===4,pje=(t,e,r,n)=>{if(e!=="digit")return!1;const i=t.date(void 0,"default");switch(r){case"year":return t.lib==="dayjs"&&n==="YY"?!0:t.formatByString(t.setYear(i,1),n).startsWith("0");case"month":return t.formatByString(t.startOfYear(i),n).length>1;case"day":return t.formatByString(t.startOfMonth(i),n).length>1;case"weekDay":return t.formatByString(t.startOfWeek(i),n).length>1;case"hours":return t.formatByString(t.setHours(i,1),n).length>1;case"minutes":return t.formatByString(t.setMinutes(i,1),n).length>1;case"seconds":return t.formatByString(t.setSeconds(i,1),n).length>1;default:throw new Error("Invalid section type")}},RRt=(t,e,r)=>{const n=e.some(d=>d.type==="day"),i=[],a=[];for(let d=0;d<e.length;d+=1){const b=e[d];n&&b.type==="weekDay"||(i.push(b.format),a.push(t0e(b,"non-input",r)))}const o=i.join(" "),s=a.join(" ");return t.parse(s,o)},kRt=t=>t.map(e=>`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`).join(""),IRt=(t,e,r)=>{const i=t.map(a=>{const o=t0e(a,r?"input-rtl":"input-ltr",e);return`${a.startSeparator}${o}${a.endSeparator}`}).join("");return r?`⁦${i}⁩`:i},PRt=(t,e,r)=>{const n=t.date(void 0,r),i=t.endOfYear(n),a=t.endOfDay(n),{maxDaysInMonth:o,longestMonth:s}=Kge(t,n).reduce((d,b)=>{const L=t.getDaysInMonth(b);return L>d.maxDaysInMonth?{maxDaysInMonth:L,longestMonth:b}:d},{maxDaysInMonth:0,longestMonth:null});return{year:({format:d})=>({minimum:0,maximum:MRt(t,d)?9999:99}),month:()=>({minimum:1,maximum:t.getMonth(i)+1}),day:({currentDate:d})=>({minimum:1,maximum:d!=null&&t.isValid(d)?t.getDaysInMonth(d):o,longestMonth:s}),weekDay:({format:d,contentType:b})=>{if(b==="digit"){const L=vX(t,d).map(Number);return{minimum:Math.min(...L),maximum:Math.max(...L)}}return{minimum:1,maximum:7}},hours:({format:d})=>{const b=t.getHours(a);return TL(t.formatByString(t.endOfDay(n),d),e)!==b.toString()?{minimum:1,maximum:Number(TL(t.formatByString(t.startOfDay(n),d),e))}:{minimum:0,maximum:b}},minutes:()=>({minimum:0,maximum:t.getMinutes(a)}),seconds:()=>({minimum:0,maximum:t.getSeconds(a)}),meridiem:()=>({minimum:0,maximum:1}),empty:()=>({minimum:0,maximum:0})}},DRt=(t,e,r,n)=>{switch(e.type){case"year":return t.setYear(n,t.getYear(r));case"month":return t.setMonth(n,t.getMonth(r));case"weekDay":{const i=vX(t,e.format),a=t.formatByString(r,e.format),o=i.indexOf(a),d=i.indexOf(e.value)-o;return t.addDays(r,d)}case"day":return t.setDate(n,t.getDate(r));case"meridiem":{const i=t.getHours(r)<12,a=t.getHours(n);return i&&a>=12?t.addHours(n,-12):!i&&a<12?t.addHours(n,12):n}case"hours":return t.setHours(n,t.getHours(r));case"minutes":return t.setMinutes(n,t.getMinutes(r));case"seconds":return t.setSeconds(n,t.getSeconds(r));default:return n}},V5e={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8,empty:9},q5e=(t,e,r,n,i)=>[...r].sort((a,o)=>V5e[a.type]-V5e[o.type]).reduce((a,o)=>!i||o.modified?DRt(t,o,e,a):a,n),LRt=()=>navigator.userAgent.toLowerCase().includes("android"),ORt=(t,e)=>{const r={};if(!e)return t.forEach((d,b)=>{const L=b===0?null:b-1,B=b===t.length-1?null:b+1;r[b]={leftIndex:L,rightIndex:B}}),{neighbors:r,startIndex:0,endIndex:t.length-1};const n={},i={};let a=0,o=0,s=t.length-1;for(;s>=0;){o=t.findIndex((d,b)=>b>=a&&d.endSeparator?.includes(" ")&&d.endSeparator!==" / "),o===-1&&(o=t.length-1);for(let d=o;d>=a;d-=1)i[d]=s,n[s]=d,s-=1;a=o+1}return t.forEach((d,b)=>{const L=i[b],B=L===0?null:n[L-1],V=L===t.length-1?null:n[L+1];r[b]={leftIndex:B,rightIndex:V}}),{neighbors:r,startIndex:n[0],endIndex:n[t.length-1]}},Jhe=(t,e)=>{if(t==null)return null;if(t==="all")return"all";if(typeof t=="string"){const r=e.findIndex(n=>n.type===t);return r===-1?null:r}return t},NRt=(t,e)=>{if(t.value)switch(t.type){case"month":{if(t.contentType==="digit")return e.format(e.setMonth(e.date(),Number(t.value)-1),"month");const r=e.parse(t.value,t.format);return r?e.format(r,"month"):void 0}case"day":return t.contentType==="digit"?e.format(e.setDate(e.startOfYear(e.date()),Number(t.value)),"dayOfMonthFull"):t.value;case"weekDay":return;default:return}},FRt=(t,e)=>{if(t.value)switch(t.type){case"weekDay":return t.contentType==="letter"?void 0:Number(t.value);case"meridiem":{const r=e.parse(`01:00 ${t.value}`,`${e.formats.hours12h}:${e.formats.minutes} ${t.format}`);return r?e.getHours(r)>=12?1:0:void 0}case"day":return t.contentType==="digit-with-letter"?parseInt(t.value,10):Number(t.value);case"month":{if(t.contentType==="digit")return Number(t.value);const r=e.parse(t.value,t.format);return r?e.getMonth(r)+1:void 0}default:return t.contentType!=="letter"?Number(t.value):void 0}},zRt=["value","referenceDate"],S1={emptyValue:null,getTodayValue:Jge,getInitialReferenceValue:t=>{let{value:e,referenceDate:r}=t,n=Ms(t,zRt);return e!=null&&n.utils.isValid(e)?e:r??SRt(n)},cleanValue:iRt,areValuesEqual:aRt,isSameError:(t,e)=>t===e,hasError:t=>t!=null,defaultErrorState:null,getTimezone:(t,e)=>e==null||!t.isValid(e)?null:t.getTimezone(e),setTimezone:(t,e,r)=>r==null?null:t.setTimezone(r,e)},r0e={updateReferenceValue:(t,e,r)=>e==null||!t.isValid(e)?r:e,getSectionsFromValue:(t,e,r,n)=>!t.isValid(e)&&!!r?r:n(e),getV7HiddenInputValueFromSections:kRt,getV6InputValueFromSections:IRt,getActiveDateManager:(t,e)=>({date:e.value,referenceDate:e.referenceValue,getSections:r=>r,getNewValuesFromNewActiveDate:r=>({value:r,referenceValue:r==null||!t.isValid(r)?e.referenceValue:r})}),parseValueStr:(t,e,r)=>r(t.trim(),e)},n0e=({value:t,referenceDate:e,utils:r,props:n,timezone:i})=>{const a=ze.useMemo(()=>S1.getInitialReferenceValue({value:t,utils:r,props:n,referenceDate:e,granularity:IC.day,timezone:i,getTodayDate:()=>Jge(r,i,"date")}),[]);return t??a},BRt=["ampm","ampmInClock","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","showViewSwitcher","onChange","view","views","openTo","onViewChange","focusedView","onFocusedViewChange","className","disabled","readOnly","timezone"],URt=t=>{const{classes:e}=t;return Cs({root:["root"],arrowSwitcher:["arrowSwitcher"]},G5t,e)},HRt=fa(pX,{name:"MuiTimeClock",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"flex",flexDirection:"column",position:"relative"}),jRt=fa(nje,{name:"MuiTimeClock",slot:"ArrowSwitcher",overridesResolver:(t,e)=>e.arrowSwitcher})({position:"absolute",right:12,top:15}),VRt=["hours","minutes"],qRt=ze.forwardRef(function(e,r){const n=yp(),i=yh({props:e,name:"MuiTimeClock"}),{ampm:a=n.is12HourCycleInCurrentLocale(),ampmInClock:o=!1,autoFocus:s,slots:d,slotProps:b,value:L,defaultValue:B,referenceDate:V,disableIgnoringDatePartForTimeValidation:X=!1,maxTime:ie,minTime:de,disableFuture:ae,disablePast:U,minutesStep:ve=1,shouldDisableTime:Se,showViewSwitcher:Pe,onChange:Me,view:Ie,views:Ve=VRt,openTo:Ze,onViewChange:Je,focusedView:nt,onFocusedViewChange:ut,className:ht,disabled:_t,readOnly:Dt,timezone:qt}=i,Lt=Ms(i,BRt),{value:dr,handleValueChange:Zt,timezone:Cr}=rF({name:"TimeClock",timezone:qt,value:L,defaultValue:B,referenceDate:V,onChange:Me,valueManager:S1}),yt=n0e({value:dr,referenceDate:V,utils:n,props:i,timezone:Cr}),Vt=kb(),Er=XL(Cr),{view:sr,setView:or,previousView:Ar,nextView:Ir,setValueAndGoToNextView:_n}=JB({view:Ie,views:Ve,openTo:Ze,onViewChange:Je,onChange:Zt,focusedView:nt,onFocusedViewChange:ut}),{meridiemMode:Un,handleMeridiemChange:Qn}=cX(yt,a,_n),Jn=ze.useCallback((On,Sn)=>{const bn=KB(X,n),Mn=Sn==="hours"||Sn==="minutes"&&Ve.includes("seconds"),gi=({start:Pa,end:va})=>!(de&&bn(de,va)||ie&&bn(Pa,ie)||ae&&bn(Pa,Er)||U&&bn(Er,Mn?va:Pa)),Oi=(Pa,va=1)=>{if(Pa%va!==0)return!1;if(Se)switch(Sn){case"hours":return!Se(n.setHours(yt,Pa),"hours");case"minutes":return!Se(n.setMinutes(yt,Pa),"minutes");case"seconds":return!Se(n.setSeconds(yt,Pa),"seconds");default:return!1}return!0};switch(Sn){case"hours":{const Pa=L9(On,Un,a),va=n.setHours(yt,Pa);if(n.getHours(va)!==Pa)return!0;const ti=n.setSeconds(n.setMinutes(va,0),0),Tn=n.setSeconds(n.setMinutes(va,59),59);return!gi({start:ti,end:Tn})||!Oi(Pa)}case"minutes":{const Pa=n.setMinutes(yt,On),va=n.setSeconds(Pa,0),ti=n.setSeconds(Pa,59);return!gi({start:va,end:ti})||!Oi(On,ve)}case"seconds":{const Pa=n.setSeconds(yt,On);return!gi({start:Pa,end:Pa})||!Oi(On)}default:throw new Error("not supported")}},[a,yt,X,ie,Un,de,ve,Se,n,ae,U,Er,Ve]),Vn=Vd(),jn=ze.useMemo(()=>{switch(sr){case"hours":{const On=(Mn,gi)=>{const Oi=L9(Mn,Un,a);_n(n.setHours(yt,Oi),gi,"hours")},Sn=n.getHours(yt);let bn;return a?Sn>12?bn=[12,23]:bn=[0,11]:bn=[0,23],{onChange:On,viewValue:Sn,children:_Rt({value:dr,utils:n,ampm:a,getClockNumberText:Vt.hoursClockNumberText,isDisabled:Mn=>_t||Jn(Mn,"hours"),selectedId:Vn}),viewRange:bn}}case"minutes":{const On=n.getMinutes(yt);return{viewValue:On,onChange:(bn,Mn)=>{_n(n.setMinutes(yt,bn),Mn,"minutes")},children:B5e({utils:n,value:On,getClockNumberText:Vt.minutesClockNumberText,isDisabled:bn=>_t||Jn(bn,"minutes"),selectedId:Vn}),viewRange:[0,59]}}case"seconds":{const On=n.getSeconds(yt);return{viewValue:On,onChange:(bn,Mn)=>{_n(n.setSeconds(yt,bn),Mn,"seconds")},children:B5e({utils:n,value:On,getClockNumberText:Vt.secondsClockNumberText,isDisabled:bn=>_t||Jn(bn,"seconds"),selectedId:Vn}),viewRange:[0,59]}}default:throw new Error("You must provide the type for ClockView")}},[sr,n,dr,a,Vt.hoursClockNumberText,Vt.minutesClockNumberText,Vt.secondsClockNumberText,Un,_n,yt,Jn,Vn,_t]),Lr=i,Yn=URt(Lr);return Ke.jsxs(HRt,Mr({ref:r,className:Vo(Yn.root,ht),ownerState:Lr},Lt,{children:[Ke.jsx(mRt,Mr({autoFocus:s??!!nt,ampmInClock:o&&Ve.includes("hours"),value:dr,type:sr,ampm:a,minutesStep:ve,isTimeDisabled:Jn,meridiemMode:Un,handleMeridiemChange:Qn,selectedId:Vn,disabled:_t,readOnly:Dt},jn)),Pe&&Ke.jsx(jRt,{className:Yn.arrowSwitcher,slots:d,slotProps:b,onGoToPrevious:()=>or(Ar),isPreviousDisabled:!Ar,previousLabel:Vt.openPreviousView,onGoToNext:()=>or(Ir),isNextDisabled:!Ir,nextLabel:Vt.openNextView,ownerState:Lr})]}))});function GRt(t){return Al("MuiDigitalClock",t)}const $Rt=Ml("MuiDigitalClock",["root","list","item"]);function vN(t,e){return Array.isArray(e)?e.every(r=>t.indexOf(r)!==-1):t.indexOf(e)!==-1}const WRt=(t,e)=>r=>{(r.key==="Enter"||r.key===" ")&&(t(r),r.preventDefault(),r.stopPropagation())},N2=(t=document)=>{const e=t.activeElement;return e?e.shadowRoot?N2(e.shadowRoot):e:null},p$=t=>Array.from(t.children).indexOf(N2(document)),i0e="@media (pointer: fine)",YRt=["ampm","timeStep","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","onChange","view","openTo","onViewChange","focusedView","onFocusedViewChange","className","disabled","readOnly","views","skipDisabled","timezone"],XRt=t=>{const{classes:e}=t;return Cs({root:["root"],list:["list"],item:["item"]},GRt,e)},ZRt=fa(pX,{name:"MuiDigitalClock",slot:"Root",overridesResolver:(t,e)=>e.root})({overflowY:"auto",width:"100%","@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"auto"},maxHeight:aje,variants:[{props:{alreadyRendered:!0},style:{"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"smooth"}}}]}),KRt=fa(EY,{name:"MuiDigitalClock",slot:"List",overridesResolver:(t,e)=>e.list})({padding:0}),JRt=fa(Xx,{name:"MuiDigitalClock",slot:"Item",overridesResolver:(t,e)=>e.item})(({theme:t})=>({padding:"8px 16px",margin:"2px 4px","&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Jx(t.palette.primary.main,t.palette.action.hoverOpacity)},"&.Mui-selected":{backgroundColor:(t.vars||t).palette.primary.main,color:(t.vars||t).palette.primary.contrastText,"&:focus-visible, &:hover":{backgroundColor:(t.vars||t).palette.primary.dark}},"&.Mui-focusVisible":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.focusOpacity})`:Jx(t.palette.primary.main,t.palette.action.focusOpacity)}})),QRt=ze.forwardRef(function(e,r){const n=yp(),i=ze.useRef(null),a=id(r,i),o=ze.useRef(null),s=yh({props:e,name:"MuiDigitalClock"}),{ampm:d=n.is12HourCycleInCurrentLocale(),timeStep:b=30,autoFocus:L,slots:B,slotProps:V,value:X,defaultValue:ie,referenceDate:de,disableIgnoringDatePartForTimeValidation:ae=!1,maxTime:U,minTime:ve,disableFuture:Se,disablePast:Pe,minutesStep:Me=1,shouldDisableTime:Ie,onChange:Ve,view:Ze,openTo:Je,onViewChange:nt,focusedView:ut,onFocusedViewChange:ht,className:_t,disabled:Dt,readOnly:qt,views:Lt=["hours"],skipDisabled:dr=!1,timezone:Zt}=s,Cr=Ms(s,YRt),{value:yt,handleValueChange:Vt,timezone:Er}=rF({name:"DigitalClock",timezone:Zt,value:X,defaultValue:ie,referenceDate:de,onChange:Ve,valueManager:S1}),sr=kb(),or=XL(Er),Ar=ze.useMemo(()=>Mr({},s,{alreadyRendered:!!i.current}),[s]),Ir=XRt(Ar),_n=B?.digitalClockItem??JRt,Un=Kd({elementType:_n,externalSlotProps:V?.digitalClockItem,ownerState:{},className:Ir.item}),Qn=n0e({value:yt,referenceDate:de,utils:n,props:s,timezone:Er}),Jn=vl(bn=>Vt(bn,"finish","hours")),{setValueAndGoToNextView:Vn}=JB({view:Ze,views:Lt,openTo:Je,onViewChange:nt,onChange:Jn,focusedView:ut,onFocusedViewChange:ht}),jn=vl(bn=>{Vn(bn,"finish")});ze.useEffect(()=>{if(i.current===null)return;const bn=i.current.querySelector('[role="listbox"] [role="option"][tabindex="0"], [role="listbox"] [role="option"][aria-selected="true"]');if(!bn)return;const Mn=bn.offsetTop;(L||ut)&&bn.focus(),i.current.scrollTop=Mn-4});const Lr=ze.useCallback(bn=>{const Mn=KB(ae,n),gi=()=>!(ve&&Mn(ve,bn)||U&&Mn(bn,U)||Se&&Mn(bn,or)||Pe&&Mn(or,bn)),Oi=()=>n.getMinutes(bn)%Me!==0?!1:Ie?!Ie(bn,"hours"):!0;return!gi()||!Oi()},[ae,n,ve,U,Se,or,Pe,Me,Ie]),Yn=ze.useMemo(()=>{const bn=[];let gi=n.startOfDay(Qn);for(;n.isSameDay(Qn,gi);)bn.push(gi),gi=n.addMinutes(gi,b);return bn},[Qn,b,n]),On=Yn.findIndex(bn=>n.isEqual(bn,Qn)),Sn=bn=>{switch(bn.key){case"PageUp":{const Mn=p$(o.current)-5,gi=o.current.children,Oi=Math.max(0,Mn),Pa=gi[Oi];Pa&&Pa.focus(),bn.preventDefault();break}case"PageDown":{const Mn=p$(o.current)+5,gi=o.current.children,Oi=Math.min(gi.length-1,Mn),Pa=gi[Oi];Pa&&Pa.focus(),bn.preventDefault();break}}};return Ke.jsx(ZRt,Mr({ref:a,className:Vo(Ir.root,_t),ownerState:Ar},Cr,{children:Ke.jsx(KRt,{ref:o,role:"listbox","aria-label":sr.timePickerToolbarTitle,className:Ir.list,onKeyDown:Sn,children:Yn.map((bn,Mn)=>{if(dr&&Lr(bn))return null;const gi=n.isEqual(bn,yt),Oi=n.format(bn,d?"fullTime12h":"fullTime24h"),Pa=On===Mn||On===-1&&Mn===0?0:-1;return Ke.jsx(_n,Mr({onClick:()=>!qt&&jn(bn),selected:gi,disabled:Dt||Lr(bn),disableRipple:qt,role:"option","aria-disabled":qt,"aria-selected":gi,tabIndex:Pa},Un,{children:Oi}),`${bn.valueOf()}-${Oi}`)})})}))});function ekt(t){return Al("MuiMultiSectionDigitalClock",t)}const G5e=Ml("MuiMultiSectionDigitalClock",["root"]);function tkt(t){return Al("MuiMultiSectionDigitalClockSection",t)}const rkt=Ml("MuiMultiSectionDigitalClockSection",["root","item"]),nkt=["autoFocus","onChange","className","disabled","readOnly","items","active","slots","slotProps","skipDisabled"],ikt=t=>{const{classes:e}=t;return Cs({root:["root"],item:["item"]},tkt,e)},akt=fa(EY,{name:"MuiMultiSectionDigitalClockSection",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>({maxHeight:aje,width:56,padding:0,overflow:"hidden","@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"auto"},"@media (pointer: fine)":{"&:hover":{overflowY:"auto"}},"@media (pointer: none), (pointer: coarse)":{overflowY:"auto"},"&:not(:first-of-type)":{borderLeft:`1px solid ${(t.vars||t).palette.divider}`},"&::after":{display:"block",content:'""',height:"calc(100% - 40px - 6px)"},variants:[{props:{alreadyRendered:!0},style:{"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"smooth"}}}]})),okt=fa(Xx,{name:"MuiMultiSectionDigitalClockSection",slot:"Item",overridesResolver:(t,e)=>e.item})(({theme:t})=>({padding:8,margin:"2px 4px",width:Dz,justifyContent:"center","&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Jx(t.palette.primary.main,t.palette.action.hoverOpacity)},"&.Mui-selected":{backgroundColor:(t.vars||t).palette.primary.main,color:(t.vars||t).palette.primary.contrastText,"&:focus-visible, &:hover":{backgroundColor:(t.vars||t).palette.primary.dark}},"&.Mui-focusVisible":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.focusOpacity})`:Jx(t.palette.primary.main,t.palette.action.focusOpacity)}})),skt=ze.forwardRef(function(e,r){const n=ze.useRef(null),i=id(r,n),a=ze.useRef(null),o=yh({props:e,name:"MuiMultiSectionDigitalClockSection"}),{autoFocus:s,onChange:d,className:b,disabled:L,readOnly:B,items:V,active:X,slots:ie,slotProps:de,skipDisabled:ae}=o,U=Ms(o,nkt),ve=ze.useMemo(()=>Mr({},o,{alreadyRendered:!!n.current}),[o]),Se=ikt(ve),Pe=ie?.digitalClockSectionItem??okt;ze.useEffect(()=>{if(n.current===null)return;const Ve=n.current.querySelector('[role="option"][tabindex="0"], [role="option"][aria-selected="true"]');if(X&&s&&Ve&&Ve.focus(),!Ve||a.current===Ve)return;a.current=Ve;const Ze=Ve.offsetTop;n.current.scrollTop=Ze-4});const Me=V.findIndex(Ve=>Ve.isFocused(Ve.value)),Ie=Ve=>{switch(Ve.key){case"PageUp":{const Ze=p$(n.current)-5,Je=n.current.children,nt=Math.max(0,Ze),ut=Je[nt];ut&&ut.focus(),Ve.preventDefault();break}case"PageDown":{const Ze=p$(n.current)+5,Je=n.current.children,nt=Math.min(Je.length-1,Ze),ut=Je[nt];ut&&ut.focus(),Ve.preventDefault();break}}};return Ke.jsx(akt,Mr({ref:i,className:Vo(Se.root,b),ownerState:ve,autoFocusItem:s&&X,role:"listbox",onKeyDown:Ie},U,{children:V.map((Ve,Ze)=>{const Je=Ve.isDisabled?.(Ve.value),nt=L||Je;if(ae&&nt)return null;const ut=Ve.isSelected(Ve.value),ht=Me===Ze||Me===-1&&Ze===0?0:-1;return Ke.jsx(Pe,Mr({onClick:()=>!B&&d(Ve.value),selected:ut,disabled:nt,disableRipple:B,role:"option","aria-disabled":B||nt||void 0,"aria-label":Ve.ariaLabel,"aria-selected":ut,tabIndex:ht,className:Se.item},de?.digitalClockSectionItem,{children:Ve.label}),Ve.label)})}))}),lkt=({now:t,value:e,utils:r,ampm:n,isDisabled:i,resolveAriaLabel:a,timeStep:o,valueOrReferenceDate:s})=>{const d=e?r.getHours(e):null,b=[],L=(X,ie)=>{const de=ie??d;return de===null?!1:n?X===12?de===12||de===0:de===X||de-12===X:de===X},B=X=>L(X,r.getHours(s)),V=n?11:23;for(let X=0;X<=V;X+=o){let ie=r.format(r.setHours(t,X),n?"hours12h":"hours24h");const de=a(parseInt(ie,10).toString());ie=r.formatNumber(ie),b.push({value:X,label:ie,isSelected:L,isDisabled:i,isFocused:B,ariaLabel:de})}return b},$5e=({value:t,utils:e,isDisabled:r,timeStep:n,resolveLabel:i,resolveAriaLabel:a,hasValue:o=!0})=>{const s=b=>t===null?!1:o&&t===b,d=b=>t===b;return[...Array.from({length:Math.ceil(60/n)},(b,L)=>{const B=n*L;return{value:B,label:e.formatNumber(i(B)),isDisabled:r,isSelected:s,isFocused:d,ariaLabel:a(B.toString())}})]},ukt=["ampm","timeSteps","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","onChange","view","views","openTo","onViewChange","focusedView","onFocusedViewChange","className","disabled","readOnly","skipDisabled","timezone"],ckt=t=>{const{classes:e}=t;return Cs({root:["root"]},ekt,e)},fkt=fa(pX,{name:"MuiMultiSectionDigitalClock",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>({display:"flex",flexDirection:"row",width:"100%",borderBottom:`1px solid ${(t.vars||t).palette.divider}`})),dkt=ze.forwardRef(function(e,r){const n=yp(),i=Kv(),a=yh({props:e,name:"MuiMultiSectionDigitalClock"}),{ampm:o=n.is12HourCycleInCurrentLocale(),timeSteps:s,autoFocus:d,slots:b,slotProps:L,value:B,defaultValue:V,referenceDate:X,disableIgnoringDatePartForTimeValidation:ie=!1,maxTime:de,minTime:ae,disableFuture:U,disablePast:ve,minutesStep:Se=1,shouldDisableTime:Pe,onChange:Me,view:Ie,views:Ve=["hours","minutes"],openTo:Ze,onViewChange:Je,focusedView:nt,onFocusedViewChange:ut,className:ht,disabled:_t,readOnly:Dt,skipDisabled:qt=!1,timezone:Lt}=a,dr=Ms(a,ukt),{value:Zt,handleValueChange:Cr,timezone:yt}=rF({name:"MultiSectionDigitalClock",timezone:Lt,value:B,defaultValue:V,referenceDate:X,onChange:Me,valueManager:S1}),Vt=kb(),Er=XL(yt),sr=ze.useMemo(()=>Mr({hours:1,minutes:5,seconds:5},s),[s]),or=n0e({value:Zt,referenceDate:X,utils:n,props:a,timezone:yt}),Ar=vl((gi,Oi,Pa)=>Cr(gi,Oi,Pa)),Ir=ze.useMemo(()=>!o||!Ve.includes("hours")||Ve.includes("meridiem")?Ve:[...Ve,"meridiem"],[o,Ve]),{view:_n,setValueAndGoToNextView:Un,focusedView:Qn}=JB({view:Ie,views:Ir,openTo:Ze,onViewChange:Je,onChange:Ar,focusedView:nt,onFocusedViewChange:ut}),Jn=vl(gi=>{Un(gi,"finish","meridiem")}),{meridiemMode:Vn,handleMeridiemChange:jn}=cX(or,o,Jn,"finish"),Lr=ze.useCallback((gi,Oi)=>{const Pa=KB(ie,n),va=Oi==="hours"||Oi==="minutes"&&Ir.includes("seconds"),ti=({start:bi,end:Wn})=>!(ae&&Pa(ae,Wn)||de&&Pa(bi,de)||U&&Pa(bi,Er)||ve&&Pa(Er,va?Wn:bi)),Tn=(bi,Wn=1)=>{if(bi%Wn!==0)return!1;if(Pe)switch(Oi){case"hours":return!Pe(n.setHours(or,bi),"hours");case"minutes":return!Pe(n.setMinutes(or,bi),"minutes");case"seconds":return!Pe(n.setSeconds(or,bi),"seconds");default:return!1}return!0};switch(Oi){case"hours":{const bi=L9(gi,Vn,o),Wn=n.setHours(or,bi);if(n.getHours(Wn)!==bi)return!0;const Ei=n.setSeconds(n.setMinutes(Wn,0),0),Ki=n.setSeconds(n.setMinutes(Wn,59),59);return!ti({start:Ei,end:Ki})||!Tn(bi)}case"minutes":{const bi=n.setMinutes(or,gi),Wn=n.setSeconds(bi,0),Ei=n.setSeconds(bi,59);return!ti({start:Wn,end:Ei})||!Tn(gi,Se)}case"seconds":{const bi=n.setSeconds(or,gi);return!ti({start:bi,end:bi})||!Tn(gi)}default:throw new Error("not supported")}},[o,or,ie,de,Vn,ae,Se,Pe,n,U,ve,Er,Ir]),Yn=ze.useCallback(gi=>{switch(gi){case"hours":return{onChange:Oi=>{const Pa=L9(Oi,Vn,o);Un(n.setHours(or,Pa),"finish","hours")},items:lkt({now:Er,value:Zt,ampm:o,utils:n,isDisabled:Oi=>Lr(Oi,"hours"),timeStep:sr.hours,resolveAriaLabel:Vt.hoursClockNumberText,valueOrReferenceDate:or})};case"minutes":return{onChange:Oi=>{Un(n.setMinutes(or,Oi),"finish","minutes")},items:$5e({value:n.getMinutes(or),utils:n,isDisabled:Oi=>Lr(Oi,"minutes"),resolveLabel:Oi=>n.format(n.setMinutes(Er,Oi),"minutes"),timeStep:sr.minutes,hasValue:!!Zt,resolveAriaLabel:Vt.minutesClockNumberText})};case"seconds":return{onChange:Oi=>{Un(n.setSeconds(or,Oi),"finish","seconds")},items:$5e({value:n.getSeconds(or),utils:n,isDisabled:Oi=>Lr(Oi,"seconds"),resolveLabel:Oi=>n.format(n.setSeconds(Er,Oi),"seconds"),timeStep:sr.seconds,hasValue:!!Zt,resolveAriaLabel:Vt.secondsClockNumberText})};case"meridiem":{const Oi=FC(n,"am"),Pa=FC(n,"pm");return{onChange:jn,items:[{value:"am",label:Oi,isSelected:()=>!!Zt&&Vn==="am",isFocused:()=>!!or&&Vn==="am",ariaLabel:Oi},{value:"pm",label:Pa,isSelected:()=>!!Zt&&Vn==="pm",isFocused:()=>!!or&&Vn==="pm",ariaLabel:Pa}]}}default:throw new Error(`Unknown view: ${gi} found.`)}},[Er,Zt,o,n,sr.hours,sr.minutes,sr.seconds,Vt.hoursClockNumberText,Vt.minutesClockNumberText,Vt.secondsClockNumberText,Vn,Un,or,Lr,jn]),On=ze.useMemo(()=>{if(!i)return Ir;const gi=Ir.filter(Oi=>Oi!=="meridiem");return gi.reverse(),Ir.includes("meridiem")&&gi.push("meridiem"),gi},[i,Ir]),Sn=ze.useMemo(()=>Ir.reduce((gi,Oi)=>Mr({},gi,{[Oi]:Yn(Oi)}),{}),[Ir,Yn]),bn=a,Mn=ckt(bn);return Ke.jsx(fkt,Mr({ref:r,className:Vo(Mn.root,ht),ownerState:bn,role:"group"},dr,{children:On.map(gi=>Ke.jsx(skt,{items:Sn[gi].items,onChange:Sn[gi].onChange,active:_n===gi,autoFocus:d||Qn===gi,disabled:_t,readOnly:Dt,slots:b,slotProps:L,skipDisabled:qt,"aria-label":Vt.selectViewText(gi)},gi))}))});function hkt(t){return Al("MuiPickersDay",t)}const dD=Ml("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),pkt=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today","isFirstVisibleCell","isLastVisibleCell"],vkt=t=>{const{selected:e,disableMargin:r,disableHighlightToday:n,today:i,disabled:a,outsideCurrentMonth:o,showDaysOutsideCurrentMonth:s,classes:d}=t,b=o&&!s;return Cs({root:["root",e&&!b&&"selected",a&&"disabled",!r&&"dayWithMargin",!n&&i&&"today",o&&s&&"dayOutsideMonth",b&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},hkt,d)},vje=({theme:t})=>Mr({},t.typography.caption,{width:O9,height:O9,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:t.transitions.create("background-color",{duration:t.transitions.duration.short}),color:(t.vars||t).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Jx(t.palette.primary.main,t.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.focusOpacity})`:Jx(t.palette.primary.main,t.palette.action.focusOpacity),[`&.${dD.selected}`]:{willChange:"background-color",backgroundColor:(t.vars||t).palette.primary.dark}},[`&.${dD.selected}`]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.main,fontWeight:t.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(t.vars||t).palette.primary.dark}},[`&.${dD.disabled}:not(.${dD.selected})`]:{color:(t.vars||t).palette.text.disabled},[`&.${dD.disabled}&.${dD.selected}`]:{opacity:.6},variants:[{props:{disableMargin:!1},style:{margin:`0 ${fX}px`}},{props:{outsideCurrentMonth:!0,showDaysOutsideCurrentMonth:!0},style:{color:(t.vars||t).palette.text.secondary}},{props:{disableHighlightToday:!1,today:!0},style:{[`&:not(.${dD.selected})`]:{border:`1px solid ${(t.vars||t).palette.text.secondary}`}}}]}),mje=(t,e)=>{const{ownerState:r}=t;return[e.root,!r.disableMargin&&e.dayWithMargin,!r.disableHighlightToday&&r.today&&e.today,!r.outsideCurrentMonth&&r.showDaysOutsideCurrentMonth&&e.dayOutsideMonth,r.outsideCurrentMonth&&!r.showDaysOutsideCurrentMonth&&e.hiddenDaySpacingFiller]},mkt=fa(ZS,{name:"MuiPickersDay",slot:"Root",overridesResolver:mje})(vje),gkt=fa("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:mje})(({theme:t})=>Mr({},vje({theme:t}),{opacity:0,pointerEvents:"none"})),B7=()=>{},ykt=ze.forwardRef(function(e,r){const n=yh({props:e,name:"MuiPickersDay"}),{autoFocus:i=!1,className:a,day:o,disabled:s=!1,disableHighlightToday:d=!1,disableMargin:b=!1,isAnimating:L,onClick:B,onDaySelect:V,onFocus:X=B7,onBlur:ie=B7,onKeyDown:de=B7,onMouseDown:ae=B7,onMouseEnter:U=B7,outsideCurrentMonth:ve,selected:Se=!1,showDaysOutsideCurrentMonth:Pe=!1,children:Me,today:Ie=!1}=n,Ve=Ms(n,pkt),Ze=Mr({},n,{autoFocus:i,disabled:s,disableHighlightToday:d,disableMargin:b,selected:Se,showDaysOutsideCurrentMonth:Pe,today:Ie}),Je=vkt(Ze),nt=yp(),ut=ze.useRef(null),ht=id(ut,r);Ah(()=>{i&&!s&&!L&&!ve&&ut.current.focus()},[i,s,L,ve]);const _t=qt=>{ae(qt),ve&&qt.preventDefault()},Dt=qt=>{s||V(o),ve&&qt.currentTarget.focus(),B&&B(qt)};return ve&&!Pe?Ke.jsx(gkt,{className:Vo(Je.root,Je.hiddenDaySpacingFiller,a),ownerState:Ze,role:Ve.role}):Ke.jsx(mkt,Mr({className:Vo(Je.root,a),ref:ht,centerRipple:!0,disabled:s,tabIndex:Se?0:-1,onKeyDown:qt=>de(qt,o),onFocus:qt=>X(qt,o),onBlur:qt=>ie(qt,o),onMouseEnter:qt=>U(qt,o),onClick:Dt,onMouseDown:_t},Ve,{ownerState:Ze,children:Me||nt.format(o,"dayOfMonth")}))}),bkt=ze.memo(ykt),nF=({props:t,value:e,timezone:r,adapter:n})=>{if(e===null)return null;const{shouldDisableDate:i,shouldDisableMonth:a,shouldDisableYear:o,disablePast:s,disableFuture:d}=t,b=n.utils.date(void 0,r),L=Gw(n.utils,t.minDate,n.defaultDates.minDate),B=Gw(n.utils,t.maxDate,n.defaultDates.maxDate);switch(!0){case!n.utils.isValid(e):return"invalidDate";case!!(i&&i(e)):return"shouldDisableDate";case!!(a&&a(e)):return"shouldDisableMonth";case!!(o&&o(e)):return"shouldDisableYear";case!!(d&&n.utils.isAfterDay(e,b)):return"disableFuture";case!!(s&&n.utils.isBeforeDay(e,b)):return"disablePast";case!!(L&&n.utils.isBeforeDay(e,L)):return"minDate";case!!(B&&n.utils.isAfterDay(e,B)):return"maxDate";default:return null}};nF.valueManager=S1;const QB=({adapter:t,value:e,timezone:r,props:n})=>{if(e===null)return null;const{minTime:i,maxTime:a,minutesStep:o,shouldDisableTime:s,disableIgnoringDatePartForTimeValidation:d=!1,disablePast:b,disableFuture:L}=n,B=t.utils.date(void 0,r),V=KB(d,t.utils);switch(!0){case!t.utils.isValid(e):return"invalidDate";case!!(i&&V(i,e)):return"minTime";case!!(a&&V(e,a)):return"maxTime";case!!(L&&t.utils.isAfter(e,B)):return"disableFuture";case!!(b&&t.utils.isBefore(e,B)):return"disablePast";case!!(s&&s(e,"hours")):return"shouldDisableTime-hours";case!!(s&&s(e,"minutes")):return"shouldDisableTime-minutes";case!!(s&&s(e,"seconds")):return"shouldDisableTime-seconds";case!!(o&&t.utils.getMinutes(e)%o!==0):return"minutesStep";default:return null}};QB.valueManager=S1;const mX=({adapter:t,value:e,timezone:r,props:n})=>{const i=nF({adapter:t,value:e,timezone:r,props:n});return i!==null?i:QB({adapter:t,value:e,timezone:r,props:n})};mX.valueManager=S1;const Qhe=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],epe=["disablePast","disableFuture","minTime","maxTime","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],gje=["minDateTime","maxDateTime"],xkt=[...Qhe,...epe,...gje],iF=t=>xkt.reduce((e,r)=>(t.hasOwnProperty(r)&&(e[r]=t[r]),e),{});function yje(t){const{props:e,validator:r,value:n,timezone:i,onError:a}=t,o=WL(),s=ze.useRef(r.valueManager.defaultErrorState),d=r({adapter:o,value:n,timezone:i,props:e}),b=r.valueManager.hasError(d);ze.useEffect(()=>{a&&!r.valueManager.isSameError(d,s.current)&&a(d,n),s.current=d},[r,a,d,n]);const L=vl(B=>r({adapter:o,value:B,timezone:i,props:e}));return{validationError:d,hasValidationError:b,getValidationErrorForNewValue:L}}const _kt=({utils:t,format:e})=>{let r=10,n=e,i=t.expandFormat(e);for(;i!==n;)if(n=i,i=t.expandFormat(n),r-=1,r<0)throw new Error("MUI X: The format expansion seems to be in an infinite loop. Please open an issue with the format passed to the picker component.");return i},wkt=({utils:t,expandedFormat:e})=>{const r=[],{start:n,end:i}=t.escapedCharacters,a=new RegExp(`(\\${n}[^\\${i}]*\\${i})+`,"g");let o=null;for(;o=a.exec(e);)r.push({start:o.index,end:a.lastIndex-1});return r},Skt=(t,e,r,n)=>{switch(r.type){case"year":return e.fieldYearPlaceholder({digitAmount:t.formatByString(t.date(void 0,"default"),n).length,format:n});case"month":return e.fieldMonthPlaceholder({contentType:r.contentType,format:n});case"day":return e.fieldDayPlaceholder({format:n});case"weekDay":return e.fieldWeekDayPlaceholder({contentType:r.contentType,format:n});case"hours":return e.fieldHoursPlaceholder({format:n});case"minutes":return e.fieldMinutesPlaceholder({format:n});case"seconds":return e.fieldSecondsPlaceholder({format:n});case"meridiem":return e.fieldMeridiemPlaceholder({format:n});default:return n}},Tkt=({utils:t,date:e,shouldRespectLeadingZeros:r,localeText:n,localizedDigits:i,now:a,token:o,startSeparator:s})=>{if(o==="")throw new Error("MUI X: Should not call `commitToken` with an empty token");const d=cje(t,o),b=pje(t,d.contentType,d.type,o),L=r?b:d.contentType==="digit",B=e!=null&&t.isValid(e);let V=B?t.formatByString(e,o):"",X=null;if(L)if(b)X=V===""?t.formatByString(a,o).length:V.length;else{if(d.maxLength==null)throw new Error(`MUI X: The token ${o} should have a 'maxDigitNumber' property on it's adapter`);X=d.maxLength,B&&(V=e0e(dje(TL(V,i),X),i))}return Mr({},d,{format:o,maxLength:X,value:V,placeholder:Skt(t,n,d,o),hasLeadingZerosInFormat:b,hasLeadingZerosInInput:L,startSeparator:s,endSeparator:"",modified:!1})},Ekt=t=>{const{utils:e,expandedFormat:r,escapedParts:n}=t,i=e.date(void 0),a=[];let o="";const s=Object.keys(e.formatTokenMap).sort((X,ie)=>ie.length-X.length),d=/^([a-zA-Z]+)/,b=new RegExp(`^(${s.join("|")})*$`),L=new RegExp(`^(${s.join("|")})`),B=X=>n.find(ie=>ie.start<=X&&ie.end>=X);let V=0;for(;V<r.length;){const X=B(V),ie=X!=null,de=d.exec(r.slice(V))?.[1];if(!ie&&de!=null&&b.test(de)){let ae=de;for(;ae.length>0;){const U=L.exec(ae)[1];ae=ae.slice(U.length),a.push(Tkt(Mr({},t,{now:i,token:U,startSeparator:o}))),o=""}V+=de.length}else{const ae=r[V];ie&&X?.start===V||X?.end===V||(a.length===0?o+=ae:a[a.length-1].endSeparator+=ae),V+=1}}return a.length===0&&o.length>0&&a.push({type:"empty",contentType:"letter",maxLength:null,format:"",value:"",placeholder:"",hasLeadingZerosInFormat:!1,hasLeadingZerosInInput:!1,startSeparator:o,endSeparator:"",modified:!1}),a},Akt=({isRtl:t,formatDensity:e,sections:r})=>r.map(n=>{const i=a=>{let o=a;return t&&o!==null&&o.includes(" ")&&(o=`⁩${o}⁦`),e==="spacious"&&["/",".","-"].includes(o)&&(o=` ${o} `),o};return n.startSeparator=i(n.startSeparator),n.endSeparator=i(n.endSeparator),n}),W5e=t=>{let e=_kt(t);t.isRtl&&t.enableAccessibleFieldDOMStructure&&(e=e.split(" ").reverse().join(" "));const r=wkt(Mr({},t,{expandedFormat:e})),n=Ekt(Mr({},t,{expandedFormat:e,escapedParts:r}));return Akt(Mr({},t,{sections:n}))},Ckt=t=>{const e=yp(),r=kb(),n=WL(),i=Kv(),{valueManager:a,fieldValueManager:o,valueType:s,validator:d,internalProps:b,internalProps:{value:L,defaultValue:B,referenceDate:V,onChange:X,format:ie,formatDensity:de="dense",selectedSections:ae,onSelectedSectionsChange:U,shouldRespectLeadingZeros:ve=!1,timezone:Se,enableAccessibleFieldDOMStructure:Pe=!1}}=t,{timezone:Me,value:Ie,handleValueChange:Ve}=Qge({timezone:Se,value:L,defaultValue:B,referenceDate:V,onChange:X,valueManager:a}),Ze=ze.useMemo(()=>ARt(e),[e]),Je=ze.useMemo(()=>PRt(e,Ze,Me),[e,Ze,Me]),nt=ze.useCallback((Ar,Ir=null)=>o.getSectionsFromValue(e,Ar,Ir,_n=>W5e({utils:e,localeText:r,localizedDigits:Ze,format:ie,date:_n,formatDensity:de,shouldRespectLeadingZeros:ve,enableAccessibleFieldDOMStructure:Pe,isRtl:i})),[o,ie,r,Ze,i,ve,e,de,Pe]),[ut,ht]=ze.useState(()=>{const Ar=nt(Ie),Ir={sections:Ar,value:Ie,referenceValue:a.emptyValue,tempValueStrAndroid:null},_n=wRt(Ar),Un=a.getInitialReferenceValue({referenceDate:V,value:Ie,utils:e,props:b,granularity:_n,timezone:Me});return Mr({},Ir,{referenceValue:Un})}),[_t,Dt]=V_({controlled:ae,default:null,name:"useField",state:"selectedSections"}),qt=Ar=>{Dt(Ar),U?.(Ar)},Lt=ze.useMemo(()=>Jhe(_t,ut.sections),[_t,ut.sections]),dr=Lt==="all"?0:Lt,Zt=({value:Ar,referenceValue:Ir,sections:_n})=>{if(ht(Qn=>Mr({},Qn,{sections:_n,value:Ar,referenceValue:Ir,tempValueStrAndroid:null})),a.areValuesEqual(e,ut.value,Ar))return;const Un={validationError:d({adapter:n,value:Ar,timezone:Me,props:b})};Ve(Ar,Un)},Cr=(Ar,Ir)=>{const _n=[...ut.sections];return _n[Ar]=Mr({},_n[Ar],{value:Ir,modified:!0}),_n},yt=()=>{Zt({value:a.emptyValue,referenceValue:ut.referenceValue,sections:nt(a.emptyValue)})},Vt=()=>{if(dr==null)return;const Ar=ut.sections[dr],Ir=o.getActiveDateManager(e,ut,Ar),Un=Ir.getSections(ut.sections).filter(jn=>jn.value!=="").length===(Ar.value===""?0:1),Qn=Cr(dr,""),Jn=Un?null:e.getInvalidDate(),Vn=Ir.getNewValuesFromNewActiveDate(Jn);Zt(Mr({},Vn,{sections:Qn}))},Er=Ar=>{const Ir=(Qn,Jn)=>{const Vn=e.parse(Qn,ie);if(Vn==null||!e.isValid(Vn))return null;const jn=W5e({utils:e,localeText:r,localizedDigits:Ze,format:ie,date:Vn,formatDensity:de,shouldRespectLeadingZeros:ve,enableAccessibleFieldDOMStructure:Pe,isRtl:i});return q5e(e,Vn,jn,Jn,!1)},_n=o.parseValueStr(Ar,ut.referenceValue,Ir),Un=o.updateReferenceValue(e,_n,ut.referenceValue);Zt({value:_n,referenceValue:Un,sections:nt(_n,ut.sections)})},sr=({activeSection:Ar,newSectionValue:Ir,shouldGoToNextSection:_n})=>{_n&&dr<ut.sections.length-1&&qt(dr+1);const Un=o.getActiveDateManager(e,ut,Ar),Qn=Cr(dr,Ir),Jn=Un.getSections(Qn),Vn=RRt(e,Jn,Ze);let jn,Lr;if(Vn!=null&&e.isValid(Vn)){const Yn=q5e(e,Vn,Jn,Un.referenceDate,!0);jn=Un.getNewValuesFromNewActiveDate(Yn),Lr=!0}else jn=Un.getNewValuesFromNewActiveDate(Vn),Lr=(Vn!=null&&!e.isValid(Vn))!=(Un.date!=null&&!e.isValid(Un.date));return Lr?Zt(Mr({},jn,{sections:Qn})):ht(Yn=>Mr({},Yn,jn,{sections:Qn,tempValueStrAndroid:null}))},or=Ar=>ht(Ir=>Mr({},Ir,{tempValueStrAndroid:Ar}));return ze.useEffect(()=>{const Ar=nt(ut.value);ht(Ir=>Mr({},Ir,{sections:Ar}))},[ie,e.locale,i]),ze.useEffect(()=>{let Ar;a.areValuesEqual(e,ut.value,Ie)?Ar=a.getTimezone(e,ut.value)!==a.getTimezone(e,Ie):Ar=!0,Ar&&ht(Ir=>Mr({},Ir,{value:Ie,referenceValue:o.updateReferenceValue(e,Ie,Ir.referenceValue),sections:nt(Ie)}))},[Ie]),{state:ut,activeSectionIndex:dr,parsedSelectedSections:Lt,setSelectedSections:qt,clearValue:yt,clearActiveSection:Vt,updateSectionValue:sr,updateValueFromValueStr:Er,setTempAndroidValueStr:or,getSectionsFromValue:nt,sectionsValueBoundaries:Je,localizedDigits:Ze,timezone:Me}},Mkt=5e3,bO=t=>t.saveQuery!=null,Rkt=({sections:t,updateSectionValue:e,sectionsValueBoundaries:r,localizedDigits:n,setTempAndroidValueStr:i,timezone:a})=>{const o=yp(),[s,d]=ze.useState(null),b=vl(()=>d(null));ze.useEffect(()=>{s!=null&&t[s.sectionIndex]?.type!==s.sectionType&&b()},[t,s,b]),ze.useEffect(()=>{if(s!=null){const ie=setTimeout(()=>b(),Mkt);return()=>{clearTimeout(ie)}}return()=>{}},[s,b]);const L=({keyPressed:ie,sectionIndex:de},ae,U)=>{const ve=ie.toLowerCase(),Se=t[de];if(s!=null&&(!U||U(s.value))&&s.sectionIndex===de){const Me=`${s.value}${ve}`,Ie=ae(Me,Se);if(!bO(Ie))return d({sectionIndex:de,value:Me,sectionType:Se.type}),Ie}const Pe=ae(ve,Se);return bO(Pe)&&!Pe.saveQuery?(b(),null):(d({sectionIndex:de,value:ve,sectionType:Se.type}),bO(Pe)?null:Pe)},B=ie=>{const de=(ve,Se,Pe)=>{const Me=Se.filter(Ie=>Ie.toLowerCase().startsWith(Pe));return Me.length===0?{saveQuery:!1}:{sectionValue:Me[0],shouldGoToNextSection:Me.length===1}},ae=(ve,Se,Pe,Me)=>{const Ie=Ve=>fje(o,a,Se.type,Ve);if(Se.contentType==="letter")return de(Se.format,Ie(Se.format),ve);if(Pe&&Me!=null&&cje(o,Pe).contentType==="letter"){const Ve=Ie(Pe),Ze=de(Pe,Ve,ve);return bO(Ze)?{saveQuery:!1}:Mr({},Ze,{sectionValue:Me(Ze.sectionValue,Ve)})}return{saveQuery:!1}};return L(ie,(ve,Se)=>{switch(Se.type){case"month":{const Pe=Me=>j5e(o,Me,o.formats.month,Se.format);return ae(ve,Se,o.formats.month,Pe)}case"weekDay":{const Pe=(Me,Ie)=>Ie.indexOf(Me).toString();return ae(ve,Se,o.formats.weekday,Pe)}case"meridiem":return ae(ve,Se);default:return{saveQuery:!1}}})},V=ie=>{const de=(U,ve)=>{const Se=TL(U,n),Pe=Number(Se),Me=r[ve.type]({currentDate:null,format:ve.format,contentType:ve.contentType});if(Pe>Me.maximum)return{saveQuery:!1};if(Pe<Me.minimum)return{saveQuery:!0};const Ie=Pe*10>Me.maximum||Se.length===Me.maximum.toString().length;return{sectionValue:hje(o,Pe,Me,n,ve),shouldGoToNextSection:Ie}};return L(ie,(U,ve)=>{if(ve.contentType==="digit"||ve.contentType==="digit-with-letter")return de(U,ve);if(ve.type==="month"){pje(o,"digit","month","MM");const Se=de(U,{type:ve.type,format:"MM",hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(bO(Se))return Se;const Pe=j5e(o,Se.sectionValue,"MM",ve.format);return Mr({},Se,{sectionValue:Pe})}if(ve.type==="weekDay"){const Se=de(U,ve);if(bO(Se))return Se;const Pe=vX(o,ve.format)[Number(Se.sectionValue)-1];return Mr({},Se,{sectionValue:Pe})}return{saveQuery:!1}},U=>H5e(U,n))};return{applyCharacterEditing:vl(ie=>{const de=t[ie.sectionIndex],U=H5e(ie.keyPressed,n)?V(Mr({},ie,{keyPressed:e0e(ie.keyPressed,n)})):B(ie);if(U==null){i(null);return}e({activeSection:de,newSectionValue:U.sectionValue,shouldGoToNextSection:U.shouldGoToNextSection})}),resetCharacterQuery:b}},kkt=t=>{const{internalProps:{disabled:e,readOnly:r=!1},forwardedProps:{sectionListRef:n,onBlur:i,onClick:a,onFocus:o,onInput:s,onPaste:d,focused:b,autoFocus:L=!1},fieldValueManager:B,applyCharacterEditing:V,resetCharacterQuery:X,setSelectedSections:ie,parsedSelectedSections:de,state:ae,clearActiveSection:U,clearValue:ve,updateSectionValue:Se,updateValueFromValueStr:Pe,sectionOrder:Me,areAllSectionsEmpty:Ie,sectionsValueBoundaries:Ve}=t,Ze=ze.useRef(null),Je=id(n,Ze),nt=kb(),ut=yp(),ht=Vd(),[_t,Dt]=ze.useState(!1),qt=ze.useMemo(()=>({syncSelectionToDOM:()=>{if(!Ze.current)return;const Lr=document.getSelection();if(!Lr)return;if(de==null){Lr.rangeCount>0&&Ze.current.getRoot().contains(Lr.getRangeAt(0).startContainer)&&Lr.removeAllRanges(),_t&&Ze.current.getRoot().blur();return}if(!Ze.current.getRoot().contains(N2(document)))return;const Yn=new window.Range;let On;de==="all"?On=Ze.current.getRoot():ae.sections[de].type==="empty"?On=Ze.current.getSectionContainer(de):On=Ze.current.getSectionContent(de),Yn.selectNodeContents(On),On.focus(),Lr.removeAllRanges(),Lr.addRange(Yn)},getActiveSectionIndexFromDOM:()=>{const Lr=N2(document);return!Lr||!Ze.current||!Ze.current.getRoot().contains(Lr)?null:Ze.current.getSectionIndexFromDOMElement(Lr)},focusField:(Lr=0)=>{if(!Ze.current||qt.getActiveSectionIndexFromDOM()!=null)return;const Yn=Jhe(Lr,ae.sections);Dt(!0),Ze.current.getSectionContent(Yn).focus()},setSelectedSections:Lr=>{if(!Ze.current)return;const Yn=Jhe(Lr,ae.sections);Dt((Yn==="all"?0:Yn)!==null),ie(Lr)},isFieldFocused:()=>{const Lr=N2(document);return!!Ze.current&&Ze.current.getRoot().contains(Lr)}}),[de,ie,ae.sections,_t]),Lt=vl(Lr=>{if(!Ze.current)return;const Yn=ae.sections[Lr];Ze.current.getSectionContent(Lr).innerHTML=Yn.value||Yn.placeholder,qt.syncSelectionToDOM()}),dr=vl((Lr,...Yn)=>{Lr.isDefaultPrevented()||!Ze.current||(Dt(!0),a?.(Lr,...Yn),de==="all"?setTimeout(()=>{const On=document.getSelection().getRangeAt(0).startOffset;if(On===0){ie(Me.startIndex);return}let Sn=0,bn=0;for(;bn<On&&Sn<ae.sections.length;){const Mn=ae.sections[Sn];Sn+=1,bn+=`${Mn.startSeparator}${Mn.value||Mn.placeholder}${Mn.endSeparator}`.length}ie(Sn-1)}):_t?Ze.current.getRoot().contains(Lr.target)||ie(Me.startIndex):(Dt(!0),ie(Me.startIndex)))}),Zt=vl(Lr=>{if(s?.(Lr),!Ze.current||de!=="all")return;const On=Lr.target.textContent??"";Ze.current.getRoot().innerHTML=ae.sections.map(Sn=>`${Sn.startSeparator}${Sn.value||Sn.placeholder}${Sn.endSeparator}`).join(""),qt.syncSelectionToDOM(),On.length===0||On.charCodeAt(0)===10?(X(),ve(),ie("all")):On.length>1?Pe(On):(de==="all"&&ie(0),V({keyPressed:On,sectionIndex:0}))}),Cr=vl(Lr=>{if(d?.(Lr),r||de!=="all"){Lr.preventDefault();return}const Yn=Lr.clipboardData.getData("text");Lr.preventDefault(),X(),Pe(Yn)}),yt=vl((...Lr)=>{if(o?.(...Lr),_t||!Ze.current)return;Dt(!0),Ze.current.getSectionIndexFromDOMElement(N2(document))!=null||ie(Me.startIndex)}),Vt=vl((...Lr)=>{i?.(...Lr),setTimeout(()=>{if(!Ze.current)return;const Yn=N2(document);!Ze.current.getRoot().contains(Yn)&&(Dt(!1),ie(null))})}),Er=vl(Lr=>Yn=>{Yn.isDefaultPrevented()||ie(Lr)}),sr=vl(Lr=>{Lr.preventDefault()}),or=vl(Lr=>()=>{ie(Lr)}),Ar=vl(Lr=>{if(Lr.preventDefault(),r||e||typeof de!="number")return;const Yn=ae.sections[de],On=Lr.clipboardData.getData("text"),Sn=/^[a-zA-Z]+$/.test(On),bn=/^[0-9]+$/.test(On),Mn=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(On);Yn.contentType==="letter"&&Sn||Yn.contentType==="digit"&&bn||Yn.contentType==="digit-with-letter"&&Mn?(X(),Se({activeSection:Yn,newSectionValue:On,shouldGoToNextSection:!0})):!Sn&&!bn&&(X(),Pe(On))}),Ir=vl(Lr=>{Lr.preventDefault(),Lr.dataTransfer.dropEffect="none"}),_n=vl(Lr=>{if(!Ze.current)return;const Yn=Lr.target,On=Yn.textContent??"",Sn=Ze.current.getSectionIndexFromDOMElement(Yn),bn=ae.sections[Sn];if(r||!Ze.current){Lt(Sn);return}if(On.length===0){if(bn.value===""){Lt(Sn);return}const Mn=Lr.nativeEvent.inputType;if(Mn==="insertParagraph"||Mn==="insertLineBreak"){Lt(Sn);return}X(),U();return}V({keyPressed:On,sectionIndex:Sn}),Lt(Sn)});Ah(()=>{if(!(!_t||!Ze.current)){if(de==="all")Ze.current.getRoot().focus();else if(typeof de=="number"){const Lr=Ze.current.getSectionContent(de);Lr&&Lr.focus()}}},[de,_t]);const Un=ze.useMemo(()=>ae.sections.reduce((Lr,Yn)=>(Lr[Yn.type]=Ve[Yn.type]({currentDate:null,contentType:Yn.contentType,format:Yn.format}),Lr),{}),[Ve,ae.sections]),Qn=de==="all",Jn=ze.useMemo(()=>ae.sections.map((Lr,Yn)=>{const On=!Qn&&!e&&!r;return{container:{"data-sectionindex":Yn,onClick:Er(Yn)},content:{tabIndex:Qn||Yn>0?-1:0,contentEditable:!Qn&&!e&&!r,role:"spinbutton",id:`${ht}-${Lr.type}`,"aria-labelledby":`${ht}-${Lr.type}`,"aria-readonly":r,"aria-valuenow":FRt(Lr,ut),"aria-valuemin":Un[Lr.type].minimum,"aria-valuemax":Un[Lr.type].maximum,"aria-valuetext":Lr.value?NRt(Lr,ut):nt.empty,"aria-label":nt[Lr.type],"aria-disabled":e,spellCheck:On?!1:void 0,autoCapitalize:On?"off":void 0,autoCorrect:On?"off":void 0,[parseInt(ze.version,10)>=17?"enterKeyHint":"enterkeyhint"]:On?"next":void 0,children:Lr.value||Lr.placeholder,onInput:_n,onPaste:Ar,onFocus:or(Yn),onDragOver:Ir,onMouseUp:sr,inputMode:Lr.contentType==="letter"?"text":"numeric"},before:{children:Lr.startSeparator},after:{children:Lr.endSeparator}}}),[ae.sections,or,Ar,Ir,_n,Er,sr,e,r,Qn,nt,ut,Un,ht]),Vn=vl(Lr=>{Pe(Lr.target.value)}),jn=ze.useMemo(()=>Ie?"":B.getV7HiddenInputValueFromSections(ae.sections),[Ie,ae.sections,B]);return ze.useEffect(()=>{if(Ze.current==null)throw new Error(["MUI X: The `sectionListRef` prop has not been initialized by `PickersSectionList`","You probably tried to pass a component to the `textField` slot that contains an `<input />` element instead of a `PickersSectionList`.","","If you want to keep using an `<input />` HTML element for the editing, please remove the `enableAccessibleFieldDOMStructure` prop from your picker or field component:","","<DatePicker slots={{ textField: MyCustomTextField }} />","","Learn more about the field accessible DOM structure on the MUI documentation: https://mui.com/x/react-date-pickers/fields/#fields-to-edit-a-single-element"].join(`
`));L&&Ze.current&&Ze.current.getSectionContent(Me.startIndex).focus()},[]),{interactions:qt,returnedValue:{autoFocus:L,readOnly:r,focused:b??_t,sectionListRef:Je,onBlur:Vt,onClick:dr,onFocus:yt,onInput:Zt,onPaste:Cr,enableAccessibleFieldDOMStructure:!0,elements:Jn,tabIndex:de===0?-1:0,contentEditable:Qn,value:jn,onChange:Vn,areAllSectionsEmpty:Ie}}},wN=t=>t.replace(/[\u2066\u2067\u2068\u2069]/g,""),Ikt=(t,e,r)=>{let n=0,i=r?1:0;const a=[];for(let o=0;o<t.length;o+=1){const s=t[o],d=t0e(s,r?"input-rtl":"input-ltr",e),b=`${s.startSeparator}${d}${s.endSeparator}`,L=wN(b).length,B=b.length,V=wN(d),X=i+(V===""?0:d.indexOf(V[0]))+s.startSeparator.length,ie=X+V.length;a.push(Mr({},s,{start:n,end:n+L,startInInput:X,endInInput:ie})),n+=L,i+=B}return a},Pkt=t=>{const e=Kv(),r=ze.useRef(void 0),n=ze.useRef(void 0),{forwardedProps:{onFocus:i,onClick:a,onPaste:o,onBlur:s,inputRef:d,placeholder:b},internalProps:{readOnly:L=!1,disabled:B=!1},parsedSelectedSections:V,activeSectionIndex:X,state:ie,fieldValueManager:de,valueManager:ae,applyCharacterEditing:U,resetCharacterQuery:ve,updateSectionValue:Se,updateValueFromValueStr:Pe,clearActiveSection:Me,clearValue:Ie,setTempAndroidValueStr:Ve,setSelectedSections:Ze,getSectionsFromValue:Je,areAllSectionsEmpty:nt,localizedDigits:ut}=t,ht=ze.useRef(null),_t=id(d,ht),Dt=ze.useMemo(()=>Ikt(ie.sections,ut,e),[ie.sections,ut,e]),qt=ze.useMemo(()=>({syncSelectionToDOM:()=>{if(!ht.current)return;if(V==null){ht.current.scrollLeft&&(ht.current.scrollLeft=0);return}if(ht.current!==N2(document))return;const _n=ht.current.scrollTop;if(V==="all")ht.current.select();else{const Un=Dt[V],Qn=Un.type==="empty"?Un.startInInput-Un.startSeparator.length:Un.startInInput,Jn=Un.type==="empty"?Un.endInInput+Un.endSeparator.length:Un.endInInput;(Qn!==ht.current.selectionStart||Jn!==ht.current.selectionEnd)&&ht.current===N2(document)&&ht.current.setSelectionRange(Qn,Jn),clearTimeout(n.current),n.current=setTimeout(()=>{ht.current&&ht.current===N2(document)&&ht.current.selectionStart===ht.current.selectionEnd&&(ht.current.selectionStart!==Qn||ht.current.selectionEnd!==Jn)&&qt.syncSelectionToDOM()})}ht.current.scrollTop=_n},getActiveSectionIndexFromDOM:()=>{const _n=ht.current.selectionStart??0,Un=ht.current.selectionEnd??0;if(_n===0&&Un===0)return null;const Qn=_n<=Dt[0].startInInput?1:Dt.findIndex(Jn=>Jn.startInInput-Jn.startSeparator.length>_n);return Qn===-1?Dt.length-1:Qn-1},focusField:(_n=0)=>{N2(document)!==ht.current&&(ht.current?.focus(),Ze(_n))},setSelectedSections:_n=>Ze(_n),isFieldFocused:()=>ht.current===N2(document)}),[ht,V,Dt,Ze]),Lt=()=>{const _n=ht.current.selectionStart??0;let Un;_n<=Dt[0].startInInput||_n>=Dt[Dt.length-1].endInInput?Un=1:Un=Dt.findIndex(Jn=>Jn.startInInput-Jn.startSeparator.length>_n);const Qn=Un===-1?Dt.length-1:Un-1;Ze(Qn)},dr=vl((..._n)=>{i?.(..._n);const Un=ht.current;clearTimeout(r.current),r.current=setTimeout(()=>{!Un||Un!==ht.current||X==null&&(Un.value.length&&Number(Un.selectionEnd)-Number(Un.selectionStart)===Un.value.length?Ze("all"):Lt())})}),Zt=vl((_n,...Un)=>{_n.isDefaultPrevented()||(a?.(_n,...Un),Lt())}),Cr=vl(_n=>{if(o?.(_n),_n.preventDefault(),L||B)return;const Un=_n.clipboardData.getData("text");if(typeof V=="number"){const Qn=ie.sections[V],Jn=/^[a-zA-Z]+$/.test(Un),Vn=/^[0-9]+$/.test(Un),jn=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(Un);if(Qn.contentType==="letter"&&Jn||Qn.contentType==="digit"&&Vn||Qn.contentType==="digit-with-letter"&&jn){ve(),Se({activeSection:Qn,newSectionValue:Un,shouldGoToNextSection:!0});return}if(Jn||Vn)return}ve(),Pe(Un)}),yt=vl((..._n)=>{s?.(..._n),Ze(null)}),Vt=vl(_n=>{if(L)return;const Un=_n.target.value;if(Un===""){ve(),Ie();return}const Qn=_n.nativeEvent.data,Jn=Qn&&Qn.length>1,Vn=Jn?Qn:Un,jn=wN(Vn);if(V==="all"&&Ze(X),X==null||Jn){Pe(Jn?Qn:jn);return}let Lr;if(V==="all"&&jn.length===1)Lr=jn;else{const Yn=wN(de.getV6InputValueFromSections(Dt,ut,e));let On=-1,Sn=-1;for(let Oi=0;Oi<Yn.length;Oi+=1)On===-1&&Yn[Oi]!==jn[Oi]&&(On=Oi),Sn===-1&&Yn[Yn.length-Oi-1]!==jn[jn.length-Oi-1]&&(Sn=Oi);const bn=Dt[X];if(On<bn.start||Yn.length-Sn-1>bn.end)return;const gi=jn.length-Yn.length+bn.end-wN(bn.endSeparator||"").length;Lr=jn.slice(bn.start+wN(bn.startSeparator||"").length,gi)}if(Lr.length===0){LRt()&&Ve(Vn),ve(),Me();return}U({keyPressed:Lr,sectionIndex:X})}),Er=ze.useMemo(()=>b!==void 0?b:de.getV6InputValueFromSections(Je(ae.emptyValue),ut,e),[b,de,Je,ae.emptyValue,ut,e]),sr=ze.useMemo(()=>ie.tempValueStrAndroid??de.getV6InputValueFromSections(ie.sections,ut,e),[ie.sections,de,ie.tempValueStrAndroid,ut,e]);ze.useEffect(()=>(ht.current&&ht.current===N2(document)&&Ze("all"),()=>{clearTimeout(r.current),clearTimeout(n.current)}),[]);const or=ze.useMemo(()=>X==null||ie.sections[X].contentType==="letter"?"text":"numeric",[X,ie.sections]),Ir=!(ht.current&&ht.current===N2(document))&&nt;return{interactions:qt,returnedValue:{readOnly:L,onBlur:yt,onClick:Zt,onFocus:dr,onPaste:Cr,inputRef:_t,enableAccessibleFieldDOMStructure:!1,placeholder:Er,inputMode:or,autoComplete:"off",value:Ir?"":sr,onChange:Vt}}},a0e=t=>{const e=yp(),{internalProps:r,internalProps:{unstableFieldRef:n,minutesStep:i,enableAccessibleFieldDOMStructure:a=!1,disabled:o=!1,readOnly:s=!1},forwardedProps:{onKeyDown:d,error:b,clearable:L,onClear:B},fieldValueManager:V,valueManager:X,validator:ie}=t,de=Kv(),ae=Ckt(t),{state:U,activeSectionIndex:ve,parsedSelectedSections:Se,setSelectedSections:Pe,clearValue:Me,clearActiveSection:Ie,updateSectionValue:Ve,setTempAndroidValueStr:Ze,sectionsValueBoundaries:Je,localizedDigits:nt,timezone:ut}=ae,ht=Rkt({sections:U.sections,updateSectionValue:Ve,sectionsValueBoundaries:Je,localizedDigits:nt,setTempAndroidValueStr:Ze,timezone:ut}),{resetCharacterQuery:_t}=ht,Dt=X.areValuesEqual(e,U.value,X.emptyValue),qt=a?kkt:Pkt,Lt=ze.useMemo(()=>ORt(U.sections,de&&!a),[U.sections,de,a]),{returnedValue:dr,interactions:Zt}=qt(Mr({},t,ae,ht,{areAllSectionsEmpty:Dt,sectionOrder:Lt})),Cr=vl(Ar=>{if(d?.(Ar),!o)switch(!0){case((Ar.ctrlKey||Ar.metaKey)&&String.fromCharCode(Ar.keyCode)==="A"&&!Ar.shiftKey&&!Ar.altKey):{Ar.preventDefault(),Pe("all");break}case Ar.key==="ArrowRight":{if(Ar.preventDefault(),Se==null)Pe(Lt.startIndex);else if(Se==="all")Pe(Lt.endIndex);else{const Ir=Lt.neighbors[Se].rightIndex;Ir!==null&&Pe(Ir)}break}case Ar.key==="ArrowLeft":{if(Ar.preventDefault(),Se==null)Pe(Lt.endIndex);else if(Se==="all")Pe(Lt.startIndex);else{const Ir=Lt.neighbors[Se].leftIndex;Ir!==null&&Pe(Ir)}break}case Ar.key==="Delete":{if(Ar.preventDefault(),s)break;Se==null||Se==="all"?Me():Ie(),_t();break}case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(Ar.key):{if(Ar.preventDefault(),s||ve==null)break;Se==="all"&&Pe(ve);const Ir=U.sections[ve],_n=V.getActiveDateManager(e,U,Ir),Un=CRt(e,ut,Ir,Ar.key,Je,nt,_n.date,{minutesStep:i});Ve({activeSection:Ir,newSectionValue:Un,shouldGoToNextSection:!1});break}}});Ah(()=>{Zt.syncSelectionToDOM()});const{hasValidationError:yt}=yje({props:r,validator:ie,timezone:ut,value:U.value,onError:r.onError}),Vt=ze.useMemo(()=>b!==void 0?b:yt,[yt,b]);ze.useEffect(()=>{!Vt&&ve==null&&_t()},[U.referenceValue,ve,Vt]),ze.useEffect(()=>{U.tempValueStrAndroid!=null&&ve!=null&&(_t(),Ie())},[U.sections]),ze.useImperativeHandle(n,()=>({getSections:()=>U.sections,getActiveSectionIndex:Zt.getActiveSectionIndexFromDOM,setSelectedSections:Zt.setSelectedSections,focusField:Zt.focusField,isFieldFocused:Zt.isFieldFocused}));const Er=vl((Ar,...Ir)=>{Ar.preventDefault(),B?.(Ar,...Ir),Me(),Zt.isFieldFocused()?Pe(Lt.startIndex):Zt.focusField(0)}),sr={onKeyDown:Cr,onClear:Er,error:Vt,clearable:!!(L&&!Dt&&!s&&!o)},or={disabled:o,readOnly:s};return Mr({},t.forwardedProps,sr,or,dr)},Dkt=["clearable","onClear","InputProps","sx","slots","slotProps"],Lkt=["ownerState"],o0e=t=>{const e=kb(),{clearable:r,onClear:n,InputProps:i,sx:a,slots:o,slotProps:s}=t,d=Ms(t,Dkt),b=o?.clearButton??Zf,L=Kd({elementType:b,externalSlotProps:s?.clearButton,ownerState:{},className:"clearButton",additionalProps:{title:e.fieldClearLabel}}),B=Ms(L,Lkt),V=o?.clearIcon??P5t,X=Kd({elementType:V,externalSlotProps:s?.clearIcon,ownerState:{}});return Mr({},d,{InputProps:Mr({},i,{endAdornment:Ke.jsxs(ze.Fragment,{children:[r&&Ke.jsx(PB,{position:"end",sx:{marginRight:i?.endAdornment?-1:-1.5},children:Ke.jsx(b,Mr({},B,{onClick:n,children:Ke.jsx(V,Mr({fontSize:"small"},X))}))}),i?.endAdornment]})}),sx:[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(a)?a:[a]]})},Okt=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef","enableAccessibleFieldDOMStructure","disabled","readOnly","dateSeparator"],s0e=(t,e)=>ze.useMemo(()=>{const r=Mr({},t),n={},i=a=>{r.hasOwnProperty(a)&&(n[a]=r[a],delete r[a])};return Okt.forEach(i),e==="date"?Qhe.forEach(i):e==="time"?epe.forEach(i):e==="date-time"&&(Qhe.forEach(i),epe.forEach(i),gje.forEach(i)),{forwardedProps:r,internalProps:n}},[t,e]),Nkt=ze.createContext(null);function bje(t){const{contextValue:e,localeText:r,children:n}=t;return Ke.jsx(Nkt.Provider,{value:e,children:Ke.jsx(uX,{localeText:r,children:n})})}const Fkt=t=>{const e=yp(),r=YL();return Mr({},t,{disablePast:t.disablePast??!1,disableFuture:t.disableFuture??!1,format:t.format??e.formats.keyboardDate,minDate:Gw(e,t.minDate,r.minDate),maxDate:Gw(e,t.maxDate,r.maxDate)})},zkt=t=>{const e=yp(),n=t.ampm??e.is12HourCycleInCurrentLocale()?e.formats.fullTime12h:e.formats.fullTime24h;return Mr({},t,{disablePast:t.disablePast??!1,disableFuture:t.disableFuture??!1,format:t.format??n})},Bkt=t=>{const e=yp(),r=YL(),i=t.ampm??e.is12HourCycleInCurrentLocale()?e.formats.keyboardDateTime12h:e.formats.keyboardDateTime24h;return Mr({},t,{disablePast:t.disablePast??!1,disableFuture:t.disableFuture??!1,format:t.format??i,disableIgnoringDatePartForTimeValidation:!!(t.minDateTime||t.maxDateTime),minDate:Gw(e,t.minDateTime??t.minDate,r.minDate),maxDate:Gw(e,t.maxDateTime??t.maxDate,r.maxDate),minTime:t.minDateTime??t.minTime,maxTime:t.maxDateTime??t.maxTime})},Ukt=t=>{const e=Fkt(t),{forwardedProps:r,internalProps:n}=s0e(e,"date");return a0e({forwardedProps:r,internalProps:n,valueManager:S1,fieldValueManager:r0e,validator:nF,valueType:"date"})};function Hkt(t){return Al("MuiPickersTextField",t)}Ml("MuiPickersTextField",["root","focused","disabled","error","required"]);function jkt(t){return Al("MuiPickersInputBase",t)}const FN=Ml("MuiPickersInputBase",["root","focused","disabled","error","notchedOutline","sectionContent","sectionBefore","sectionAfter","adornedStart","adornedEnd","input"]);function Vkt(t){return Al("MuiPickersSectionList",t)}const U7=Ml("MuiPickersSectionList",["root","section","sectionContent"]),qkt=["slots","slotProps","elements","sectionListRef"],xje=fa("div",{name:"MuiPickersSectionList",slot:"Root",overridesResolver:(t,e)=>e.root})({direction:"ltr /*! @noflip */",outline:"none"}),_je=fa("span",{name:"MuiPickersSectionList",slot:"Section",overridesResolver:(t,e)=>e.section})({}),wje=fa("span",{name:"MuiPickersSectionList",slot:"SectionSeparator",overridesResolver:(t,e)=>e.sectionSeparator})({whiteSpace:"pre"}),Sje=fa("span",{name:"MuiPickersSectionList",slot:"SectionContent",overridesResolver:(t,e)=>e.sectionContent})({outline:"none"}),Gkt=t=>{const{classes:e}=t;return Cs({root:["root"],section:["section"],sectionContent:["sectionContent"]},Vkt,e)};function $kt(t){const{slots:e,slotProps:r,element:n,classes:i}=t,a=e?.section??_je,o=Kd({elementType:a,externalSlotProps:r?.section,externalForwardedProps:n.container,className:i.section,ownerState:{}}),s=e?.sectionContent??Sje,d=Kd({elementType:s,externalSlotProps:r?.sectionContent,externalForwardedProps:n.content,additionalProps:{suppressContentEditableWarning:!0},className:i.sectionContent,ownerState:{}}),b=e?.sectionSeparator??wje,L=Kd({elementType:b,externalSlotProps:r?.sectionSeparator,externalForwardedProps:n.before,ownerState:{position:"before"}}),B=Kd({elementType:b,externalSlotProps:r?.sectionSeparator,externalForwardedProps:n.after,ownerState:{position:"after"}});return Ke.jsxs(a,Mr({},o,{children:[Ke.jsx(b,Mr({},L)),Ke.jsx(s,Mr({},d)),Ke.jsx(b,Mr({},B))]}))}const Wkt=ze.forwardRef(function(e,r){const n=yh({props:e,name:"MuiPickersSectionList"}),{slots:i,slotProps:a,elements:o,sectionListRef:s}=n,d=Ms(n,qkt),b=Gkt(n),L=ze.useRef(null),B=id(r,L),V=de=>{if(!L.current)throw new Error(`MUI X: Cannot call sectionListRef.${de} before the mount of the component.`);return L.current};ze.useImperativeHandle(s,()=>({getRoot(){return V("getRoot")},getSectionContainer(de){return V("getSectionContainer").querySelector(`.${U7.section}[data-sectionindex="${de}"]`)},getSectionContent(de){return V("getSectionContent").querySelector(`.${U7.section}[data-sectionindex="${de}"] .${U7.sectionContent}`)},getSectionIndexFromDOMElement(de){const ae=V("getSectionIndexFromDOMElement");if(de==null||!ae.contains(de))return null;let U=null;return de.classList.contains(U7.section)?U=de:de.classList.contains(U7.sectionContent)&&(U=de.parentElement),U==null?null:Number(U.dataset.sectionindex)}}));const X=i?.root??xje,ie=Kd({elementType:X,externalSlotProps:a?.root,externalForwardedProps:d,additionalProps:{ref:B,suppressContentEditableWarning:!0},className:b.root,ownerState:{}});return Ke.jsx(X,Mr({},ie,{children:ie.contentEditable?o.map(({content:de,before:ae,after:U})=>`${ae.children}${de.children}${U.children}`).join(""):Ke.jsx(ze.Fragment,{children:o.map((de,ae)=>Ke.jsx($kt,{slots:i,slotProps:a,element:de,classes:b},ae))})}))}),Ykt=["elements","areAllSectionsEmpty","defaultValue","label","value","onChange","id","autoFocus","endAdornment","startAdornment","renderSuffix","slots","slotProps","contentEditable","tabIndex","onInput","onPaste","onKeyDown","fullWidth","name","readOnly","inputProps","inputRef","sectionListRef"],Xkt=t=>Math.round(t*1e5)/1e5,gX=fa("div",{name:"MuiPickersInputBase",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>Mr({},t.typography.body1,{color:(t.vars||t).palette.text.primary,cursor:"text",padding:0,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",boxSizing:"border-box",letterSpacing:`${Xkt(.15/16)}em`,variants:[{props:{fullWidth:!0},style:{width:"100%"}}]})),l0e=fa(xje,{name:"MuiPickersInputBase",slot:"SectionsContainer",overridesResolver:(t,e)=>e.sectionsContainer})(({theme:t})=>({padding:"4px 0 5px",fontFamily:t.typography.fontFamily,fontSize:"inherit",lineHeight:"1.4375em",flexGrow:1,outline:"none",display:"flex",flexWrap:"nowrap",overflow:"hidden",letterSpacing:"inherit",width:"182px",variants:[{props:{isRtl:!0},style:{textAlign:"right /*! @noflip */"}},{props:{size:"small"},style:{paddingTop:1}},{props:{adornedStart:!1,focused:!1,filled:!1},style:{color:"currentColor",opacity:0}},{props:({adornedStart:e,focused:r,filled:n,label:i})=>!e&&!r&&!n&&i==null,style:t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:t.palette.mode==="light"?.42:.5}}]})),Zkt=fa(_je,{name:"MuiPickersInputBase",slot:"Section",overridesResolver:(t,e)=>e.section})(({theme:t})=>({fontFamily:t.typography.fontFamily,fontSize:"inherit",letterSpacing:"inherit",lineHeight:"1.4375em",display:"inline-block",whiteSpace:"nowrap"})),Kkt=fa(Sje,{name:"MuiPickersInputBase",slot:"SectionContent",overridesResolver:(t,e)=>e.content})(({theme:t})=>({fontFamily:t.typography.fontFamily,lineHeight:"1.4375em",letterSpacing:"inherit",width:"fit-content",outline:"none"})),Jkt=fa(wje,{name:"MuiPickersInputBase",slot:"Separator",overridesResolver:(t,e)=>e.separator})(()=>({whiteSpace:"pre",letterSpacing:"inherit"})),Qkt=fa("input",{name:"MuiPickersInputBase",slot:"Input",overridesResolver:(t,e)=>e.hiddenInput})(Mr({},F9e)),eIt=t=>{const{focused:e,disabled:r,error:n,classes:i,fullWidth:a,readOnly:o,color:s,size:d,endAdornment:b,startAdornment:L}=t,B={root:["root",e&&!r&&"focused",r&&"disabled",o&&"readOnly",n&&"error",a&&"fullWidth",`color${ys(s)}`,d==="small"&&"inputSizeSmall",!!L&&"adornedStart",!!b&&"adornedEnd"],notchedOutline:["notchedOutline"],input:["input"],sectionsContainer:["sectionsContainer"],sectionContent:["sectionContent"],sectionBefore:["sectionBefore"],sectionAfter:["sectionAfter"]};return Cs(B,jkt,i)},u0e=ze.forwardRef(function(e,r){const n=yh({props:e,name:"MuiPickersInputBase"}),{elements:i,areAllSectionsEmpty:a,value:o,onChange:s,id:d,endAdornment:b,startAdornment:L,renderSuffix:B,slots:V,slotProps:X,contentEditable:ie,tabIndex:de,onInput:ae,onPaste:U,onKeyDown:ve,name:Se,readOnly:Pe,inputProps:Me,inputRef:Ie,sectionListRef:Ve}=n,Ze=Ms(n,Ykt),Je=ze.useRef(null),nt=id(r,Je),ut=id(Me?.ref,Ie),ht=Kv(),_t=W2();if(!_t)throw new Error("MUI X: PickersInputBase should always be used inside a PickersTextField component");const Dt=yt=>{if(_t.disabled){yt.stopPropagation();return}_t.onFocus?.(yt)};ze.useEffect(()=>{_t&&_t.setAdornedStart(!!L)},[_t,L]),ze.useEffect(()=>{_t&&(a?_t.onEmpty():_t.onFilled())},[_t,a]);const qt=Mr({},n,_t,{isRtl:ht}),Lt=eIt(qt),dr=V?.root||gX,Zt=Kd({elementType:dr,externalSlotProps:X?.root,externalForwardedProps:Ze,additionalProps:{"aria-invalid":_t.error,ref:nt},className:Lt.root,ownerState:qt}),Cr=V?.input||l0e;return Ke.jsxs(dr,Mr({},Zt,{children:[L,Ke.jsx(Wkt,{sectionListRef:Ve,elements:i,contentEditable:ie,tabIndex:de,className:Lt.sectionsContainer,onFocus:Dt,onBlur:_t.onBlur,onInput:ae,onPaste:U,onKeyDown:ve,slots:{root:Cr,section:Zkt,sectionContent:Kkt,sectionSeparator:Jkt},slotProps:{root:{ownerState:qt},sectionContent:{className:FN.sectionContent},sectionSeparator:({position:yt})=>({className:yt==="before"?FN.sectionBefore:FN.sectionAfter})}}),b,B?B(Mr({},_t)):null,Ke.jsx(Qkt,Mr({name:Se,className:Lt.input,value:o,onChange:s,id:d,"aria-hidden":"true",tabIndex:-1,readOnly:Pe,required:_t.required,disabled:_t.disabled},Me,{ref:ut}))]}))});function tIt(t){return Al("MuiPickersOutlinedInput",t)}const vC=Mr({},FN,Ml("MuiPickersOutlinedInput",["root","notchedOutline","input"])),rIt=["children","className","label","notched","shrink"],nIt=fa("fieldset",{name:"MuiPickersOutlinedInput",slot:"NotchedOutline",overridesResolver:(t,e)=>e.notchedOutline})(({theme:t})=>{const e=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%",borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:e}}),Y5e=fa("span")(({theme:t})=>({fontFamily:t.typography.fontFamily,fontSize:"inherit"})),iIt=fa("legend")(({theme:t})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:{withLabel:!1},style:{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})}},{props:{withLabel:!0},style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:{withLabel:!0,notched:!0},style:{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})}}]}));function aIt(t){const{className:e,label:r}=t,n=Ms(t,rIt),i=r!=null&&r!=="",a=Mr({},t,{withLabel:i});return Ke.jsx(nIt,Mr({"aria-hidden":!0,className:e},n,{ownerState:a,children:Ke.jsx(iIt,{ownerState:a,children:i?Ke.jsx(Y5e,{children:r}):Ke.jsx(Y5e,{className:"notranslate",children:"​"})})}))}const oIt=["label","autoFocus","ownerState","notched"],sIt=fa(gX,{name:"MuiPickersOutlinedInput",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>{const e=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{padding:"0 14px",borderRadius:(t.vars||t).shape.borderRadius,[`&:hover .${vC.notchedOutline}`]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{[`&:hover .${vC.notchedOutline}`]:{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:e}},[`&.${vC.focused} .${vC.notchedOutline}`]:{borderStyle:"solid",borderWidth:2},[`&.${vC.disabled}`]:{[`& .${vC.notchedOutline}`]:{borderColor:(t.vars||t).palette.action.disabled},"*":{color:(t.vars||t).palette.action.disabled}},[`&.${vC.error} .${vC.notchedOutline}`]:{borderColor:(t.vars||t).palette.error.main},variants:Object.keys((t.vars??t).palette).filter(r=>(t.vars??t).palette[r]?.main??!1).map(r=>({props:{color:r},style:{[`&.${vC.focused}:not(.${vC.error}) .${vC.notchedOutline}`]:{borderColor:(t.vars||t).palette[r].main}}}))}}),lIt=fa(l0e,{name:"MuiPickersOutlinedInput",slot:"SectionsContainer",overridesResolver:(t,e)=>e.sectionsContainer})({padding:"16.5px 0",variants:[{props:{size:"small"},style:{padding:"8.5px 0"}}]}),uIt=t=>{const{classes:e}=t,n=Cs({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},tIt,e);return Mr({},e,n)},Tje=ze.forwardRef(function(e,r){const n=yh({props:e,name:"MuiPickersOutlinedInput"}),{label:i,ownerState:a,notched:o}=n,s=Ms(n,oIt),d=W2(),b=Mr({},n,a,d,{color:d?.color||"primary"}),L=uIt(b);return Ke.jsx(u0e,Mr({slots:{root:sIt,input:lIt},renderSuffix:B=>Ke.jsx(aIt,{shrink:!!(o||B.adornedStart||B.focused||B.filled),notched:!!(o||B.adornedStart||B.focused||B.filled),className:L.notchedOutline,label:i!=null&&i!==""&&d?.required?Ke.jsxs(ze.Fragment,{children:[i," ","*"]}):i,ownerState:b})},s,{label:i,classes:L,ref:r}))});Tje.muiName="Input";function cIt(t){return Al("MuiPickersFilledInput",t)}const hD=Mr({},FN,Ml("MuiPickersFilledInput",["root","underline","input"])),fIt=["label","autoFocus","disableUnderline","ownerState"],dIt=fa(gX,{name:"MuiPickersFilledInput",slot:"Root",overridesResolver:(t,e)=>e.root,shouldForwardProp:t=>Qq(t)&&t!=="disableUnderline"})(({theme:t})=>{const e=t.palette.mode==="light",r=e?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",n=e?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",i=e?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",a=e?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:n,borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),"&:hover":{backgroundColor:t.vars?t.vars.palette.FilledInput.hoverBg:i,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:n}},[`&.${hD.focused}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:n},[`&.${hD.disabled}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:a},variants:[...Object.keys((t.vars??t).palette).filter(o=>(t.vars??t).palette[o].main).map(o=>({props:{color:o,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(t.vars||t).palette[o]?.main}`}}})),{props:{disableUnderline:!1},style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${hD.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${hD.error}`]:{"&:before, &:after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`:r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${hD.disabled}, .${hD.error}):before`]:{borderBottom:`1px solid ${(t.vars||t).palette.text.primary}`},[`&.${hD.disabled}:before`]:{borderBottomStyle:"dotted"}}},{props:({startAdornment:o})=>!!o,style:{paddingLeft:12}},{props:({endAdornment:o})=>!!o,style:{paddingRight:12}}]}}),hIt=fa(l0e,{name:"MuiPickersFilledInput",slot:"sectionsContainer",overridesResolver:(t,e)=>e.sectionsContainer})({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({startAdornment:t})=>!!t,style:{paddingLeft:0}},{props:({endAdornment:t})=>!!t,style:{paddingRight:0}},{props:{hiddenLabel:!0},style:{paddingTop:16,paddingBottom:17}},{props:{hiddenLabel:!0,size:"small"},style:{paddingTop:8,paddingBottom:9}}]}),pIt=t=>{const{classes:e,disableUnderline:r}=t,i=Cs({root:["root",!r&&"underline"],input:["input"]},cIt,e);return Mr({},e,i)},Eje=ze.forwardRef(function(e,r){const n=yh({props:e,name:"MuiPickersFilledInput"}),{label:i,disableUnderline:a=!1,ownerState:o}=n,s=Ms(n,fIt),d=W2(),b=Mr({},n,o,d,{color:d?.color||"primary"}),L=pIt(b);return Ke.jsx(u0e,Mr({slots:{root:dIt,input:hIt},slotProps:{root:{disableUnderline:a}}},s,{label:i,classes:L,ref:r}))});Eje.muiName="Input";function vIt(t){return Al("MuiPickersFilledInput",t)}const H7=Mr({},FN,Ml("MuiPickersInput",["root","input"])),mIt=["label","autoFocus","disableUnderline","ownerState"],gIt=fa(gX,{name:"MuiPickersInput",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>{let r=t.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(r=`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`),{"label + &":{marginTop:16},variants:[...Object.keys((t.vars??t).palette).filter(n=>(t.vars??t).palette[n].main).map(n=>({props:{color:n},style:{"&::after":{borderBottom:`2px solid ${(t.vars||t).palette[n].main}`}}})),{props:{disableUnderline:!1},style:{"&::after":{background:"red",left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${H7.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${H7.error}`]:{"&:before, &:after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${H7.disabled}, .${H7.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${H7.disabled}:before`]:{borderBottomStyle:"dotted"}}}]}}),yIt=t=>{const{classes:e,disableUnderline:r}=t,i=Cs({root:["root",!r&&"underline"],input:["input"]},vIt,e);return Mr({},e,i)},Aje=ze.forwardRef(function(e,r){const n=yh({props:e,name:"MuiPickersInput"}),{label:i,disableUnderline:a=!1,ownerState:o}=n,s=Ms(n,mIt),d=W2(),b=Mr({},n,o,d,{disableUnderline:a,color:d?.color||"primary"}),L=yIt(b);return Ke.jsx(u0e,Mr({slots:{root:gIt}},s,{label:i,classes:L,ref:r}))});Aje.muiName="Input";const bIt=["onFocus","onBlur","className","color","disabled","error","variant","required","InputProps","inputProps","inputRef","sectionListRef","elements","areAllSectionsEmpty","onClick","onKeyDown","onKeyUp","onPaste","onInput","endAdornment","startAdornment","tabIndex","contentEditable","focused","value","onChange","fullWidth","id","name","helperText","FormHelperTextProps","label","InputLabelProps"],xIt={standard:Aje,filled:Eje,outlined:Tje},_It=fa(j5,{name:"MuiPickersTextField",slot:"Root",overridesResolver:(t,e)=>e.root})({maxWidth:"100%"}),wIt=t=>{const{focused:e,disabled:r,classes:n,required:i}=t;return Cs({root:["root",e&&!r&&"focused",r&&"disabled",i&&"required"]},Hkt,n)},c0e=ze.forwardRef(function(e,r){const n=yh({props:e,name:"MuiPickersTextField"}),{onFocus:i,onBlur:a,className:o,color:s="primary",disabled:d=!1,error:b=!1,variant:L="outlined",required:B=!1,InputProps:V,inputProps:X,inputRef:ie,sectionListRef:de,elements:ae,areAllSectionsEmpty:U,onClick:ve,onKeyDown:Se,onKeyUp:Pe,onPaste:Me,onInput:Ie,endAdornment:Ve,startAdornment:Ze,tabIndex:Je,contentEditable:nt,focused:ut,value:ht,onChange:_t,fullWidth:Dt,id:qt,name:Lt,helperText:dr,FormHelperTextProps:Zt,label:Cr,InputLabelProps:yt}=n,Vt=Ms(n,bIt),Er=ze.useRef(null),sr=id(r,Er),or=Vd(qt),Ar=dr&&or?`${or}-helper-text`:void 0,Ir=Cr&&or?`${or}-label`:void 0,_n=Mr({},n,{color:s,disabled:d,error:b,focused:ut,required:B,variant:L}),Un=wIt(_n),Qn=xIt[L];return Ke.jsxs(_It,Mr({className:Vo(Un.root,o),ref:sr,focused:ut,onFocus:i,onBlur:a,disabled:d,variant:L,error:b,color:s,fullWidth:Dt,required:B,ownerState:_n},Vt,{children:[Ke.jsx(jL,Mr({htmlFor:or,id:Ir},yt,{children:Cr})),Ke.jsx(Qn,Mr({elements:ae,areAllSectionsEmpty:U,onClick:ve,onKeyDown:Se,onKeyUp:Pe,onInput:Ie,onPaste:Me,endAdornment:Ve,startAdornment:Ze,tabIndex:Je,contentEditable:nt,value:ht,onChange:_t,id:or,fullWidth:Dt,inputProps:X,inputRef:ie,sectionListRef:de,label:Cr,name:Lt,role:"group","aria-labelledby":Ir,"aria-describedby":Ar,"aria-live":Ar?"polite":void 0},V)),dr&&Ke.jsx(w1,Mr({id:Ar},Zt,{children:dr}))]}))}),SIt=["enableAccessibleFieldDOMStructure"],TIt=["InputProps","readOnly"],EIt=["onPaste","onKeyDown","inputMode","readOnly","InputProps","inputProps","inputRef"],f0e=t=>{let{enableAccessibleFieldDOMStructure:e}=t,r=Ms(t,SIt);if(e){const{InputProps:B,readOnly:V}=r,X=Ms(r,TIt);return Mr({},X,{InputProps:Mr({},B??{},{readOnly:V})})}const{onPaste:n,onKeyDown:i,inputMode:a,readOnly:o,InputProps:s,inputProps:d,inputRef:b}=r,L=Ms(r,EIt);return Mr({},L,{InputProps:Mr({},s??{},{readOnly:o}),inputProps:Mr({},d??{},{inputMode:a,onPaste:n,onKeyDown:i,ref:b})})},AIt=["slots","slotProps","InputProps","inputProps"],Cje=ze.forwardRef(function(e,r){const n=yh({props:e,name:"MuiDateField"}),{slots:i,slotProps:a,InputProps:o,inputProps:s}=n,d=Ms(n,AIt),b=n,L=i?.textField??(e.enableAccessibleFieldDOMStructure?c0e:zg),B=Kd({elementType:L,externalSlotProps:a?.textField,externalForwardedProps:d,additionalProps:{ref:r},ownerState:b});B.inputProps=Mr({},s,B.inputProps),B.InputProps=Mr({},o,B.InputProps);const V=Ukt(B),X=f0e(V),ie=o0e(Mr({},X,{slots:i,slotProps:a}));return Ke.jsx(L,Mr({},ie))}),CIt=t=>{const e=zkt(t),{forwardedProps:r,internalProps:n}=s0e(e,"time");return a0e({forwardedProps:r,internalProps:n,valueManager:S1,fieldValueManager:r0e,validator:QB,valueType:"time"})},MIt=["slots","slotProps","InputProps","inputProps"],Mje=ze.forwardRef(function(e,r){const n=yh({props:e,name:"MuiTimeField"}),{slots:i,slotProps:a,InputProps:o,inputProps:s}=n,d=Ms(n,MIt),b=n,L=i?.textField??(e.enableAccessibleFieldDOMStructure?c0e:zg),B=Kd({elementType:L,externalSlotProps:a?.textField,externalForwardedProps:d,ownerState:b,additionalProps:{ref:r}});B.inputProps=Mr({},s,B.inputProps),B.InputProps=Mr({},o,B.InputProps);const V=CIt(B),X=f0e(V),ie=o0e(Mr({},X,{slots:i,slotProps:a}));return Ke.jsx(L,Mr({},ie))}),RIt=t=>{const e=Bkt(t),{forwardedProps:r,internalProps:n}=s0e(e,"date-time");return a0e({forwardedProps:r,internalProps:n,valueManager:S1,fieldValueManager:r0e,validator:mX,valueType:"date-time"})},kIt=["slots","slotProps","InputProps","inputProps"],Rje=ze.forwardRef(function(e,r){const n=yh({props:e,name:"MuiDateTimeField"}),{slots:i,slotProps:a,InputProps:o,inputProps:s}=n,d=Ms(n,kIt),b=n,L=i?.textField??(e.enableAccessibleFieldDOMStructure?c0e:zg),B=Kd({elementType:L,externalSlotProps:a?.textField,externalForwardedProps:d,ownerState:b,additionalProps:{ref:r}});B.inputProps=Mr({},s,B.inputProps),B.InputProps=Mr({},o,B.InputProps);const V=RIt(B),X=f0e(V),ie=o0e(Mr({},X,{slots:i,slotProps:a}));return Ke.jsx(L,Mr({},ie))}),kje=({shouldDisableDate:t,shouldDisableMonth:e,shouldDisableYear:r,minDate:n,maxDate:i,disableFuture:a,disablePast:o,timezone:s})=>{const d=WL();return ze.useCallback(b=>nF({adapter:d,value:b,timezone:s,props:{shouldDisableDate:t,shouldDisableMonth:e,shouldDisableYear:r,minDate:n,maxDate:i,disableFuture:a,disablePast:o}})!==null,[d,t,e,r,n,i,a,o,s])},IIt=(t,e,r)=>(n,i)=>{switch(i.type){case"changeMonth":return Mr({},n,{slideDirection:i.direction,currentMonth:i.newMonth,isMonthSwitchingAnimating:!t});case"changeMonthTimezone":{const a=i.newTimezone;if(r.getTimezone(n.currentMonth)===a)return n;let o=r.setTimezone(n.currentMonth,a);return r.getMonth(o)!==r.getMonth(n.currentMonth)&&(o=r.setMonth(o,r.getMonth(n.currentMonth))),Mr({},n,{currentMonth:o})}case"finishMonthSwitchingAnimation":return Mr({},n,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(n.focusedDay!=null&&i.focusedDay!=null&&r.isSameDay(i.focusedDay,n.focusedDay))return n;const a=i.focusedDay!=null&&!e&&!r.isSameMonth(n.currentMonth,i.focusedDay);return Mr({},n,{focusedDay:i.focusedDay,isMonthSwitchingAnimating:a&&!t&&!i.withoutMonthSwitchingAnimation,currentMonth:a?r.startOfMonth(i.focusedDay):n.currentMonth,slideDirection:i.focusedDay!=null&&r.isAfterDay(i.focusedDay,n.currentMonth)?"left":"right"})}default:throw new Error("missing support")}},PIt=t=>{const{value:e,referenceDate:r,disableFuture:n,disablePast:i,disableSwitchToMonthOnDayFocus:a=!1,maxDate:o,minDate:s,onMonthChange:d,reduceAnimations:b,shouldDisableDate:L,timezone:B}=t,V=yp(),X=ze.useRef(IIt(!!b,a,V)).current,ie=ze.useMemo(()=>S1.getInitialReferenceValue({value:e,utils:V,timezone:B,props:t,referenceDate:r,granularity:IC.day}),[r,B]),[de,ae]=ze.useReducer(X,{isMonthSwitchingAnimating:!1,focusedDay:ie,currentMonth:V.startOfMonth(ie),slideDirection:"left"});ze.useEffect(()=>{ae({type:"changeMonthTimezone",newTimezone:V.getTimezone(ie)})},[ie,V]);const U=ze.useCallback(Ie=>{ae(Mr({type:"changeMonth"},Ie)),d&&d(Ie.newMonth)},[d]),ve=ze.useCallback(Ie=>{const Ve=Ie;V.isSameMonth(Ve,de.currentMonth)||U({newMonth:V.startOfMonth(Ve),direction:V.isAfterDay(Ve,de.currentMonth)?"left":"right"})},[de.currentMonth,U,V]),Se=kje({shouldDisableDate:L,minDate:s,maxDate:o,disableFuture:n,disablePast:i,timezone:B}),Pe=ze.useCallback(()=>{ae({type:"finishMonthSwitchingAnimation"})},[]),Me=vl((Ie,Ve)=>{Se(Ie)||ae({type:"changeFocusedDay",focusedDay:Ie,withoutMonthSwitchingAnimation:Ve})});return{referenceDate:ie,calendarState:de,changeMonth:ve,changeFocusedDay:Me,isDateDisabled:Se,onMonthSwitchingAnimationEnd:Pe,handleChangeMonth:U}},DIt=t=>Al("MuiPickersFadeTransitionGroup",t);Ml("MuiPickersFadeTransitionGroup",["root"]);const LIt=t=>{const{classes:e}=t;return Cs({root:["root"]},DIt,e)},OIt=fa(MB,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"block",position:"relative"});function Ije(t){const e=yh({props:t,name:"MuiPickersFadeTransitionGroup"}),{children:r,className:n,reduceAnimations:i,transKey:a}=e,o=LIt(e),s=cy();return i?r:Ke.jsx(OIt,{className:Vo(o.root,n),children:Ke.jsx(xL,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:s.transitions.duration.enteringScreen,enter:s.transitions.duration.enteringScreen,exit:0},children:r},a)})}const NIt=t=>Al("MuiPickersSlideTransition",t),M3=Ml("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),FIt=["children","className","reduceAnimations","slideDirection","transKey","classes"],zIt=t=>{const{classes:e,slideDirection:r}=t,n={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${r}`],exitActive:[`slideExitActiveLeft-${r}`]};return Cs(n,NIt,e)},BIt=fa(MB,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(t,e)=>[e.root,{[`.${M3["slideEnter-left"]}`]:e["slideEnter-left"]},{[`.${M3["slideEnter-right"]}`]:e["slideEnter-right"]},{[`.${M3.slideEnterActive}`]:e.slideEnterActive},{[`.${M3.slideExit}`]:e.slideExit},{[`.${M3["slideExitActiveLeft-left"]}`]:e["slideExitActiveLeft-left"]},{[`.${M3["slideExitActiveLeft-right"]}`]:e["slideExitActiveLeft-right"]}]})(({theme:t})=>{const e=t.transitions.create("transform",{duration:t.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${M3["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${M3["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${M3.slideEnterActive}`]:{transform:"translate(0%)",transition:e},[`& .${M3.slideExit}`]:{transform:"translate(0%)"},[`& .${M3["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:e,zIndex:0},[`& .${M3["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:e,zIndex:0}}});function UIt(t){const e=yh({props:t,name:"MuiPickersSlideTransition"}),{children:r,className:n,reduceAnimations:i,transKey:a}=e,o=Ms(e,FIt),s=zIt(e),d=cy();if(i)return Ke.jsx("div",{className:Vo(s.root,n),children:r});const b={exit:s.exit,enterActive:s.enterActive,enter:s.enter,exitActive:s.exitActive};return Ke.jsx(BIt,{className:Vo(s.root,n),childFactory:L=>ze.cloneElement(L,{classNames:b}),role:"presentation",children:Ke.jsx(nme,Mr({mountOnEnter:!0,unmountOnExit:!0,timeout:d.transitions.duration.complex,classNames:b},o,{children:r}),a)})}const HIt=t=>Al("MuiDayCalendar",t);Ml("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);const jIt=["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],VIt=["ownerState"],qIt=t=>{const{classes:e}=t;return Cs({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},HIt,e)},Pje=(O9+fX*2)*6,GIt=fa("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(t,e)=>e.root})({}),$It=fa("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(t,e)=>e.header})({display:"flex",justifyContent:"center",alignItems:"center"}),WIt=fa(Su,{name:"MuiDayCalendar",slot:"WeekDayLabel",overridesResolver:(t,e)=>e.weekDayLabel})(({theme:t})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(t.vars||t).palette.text.secondary})),YIt=fa(Su,{name:"MuiDayCalendar",slot:"WeekNumberLabel",overridesResolver:(t,e)=>e.weekNumberLabel})(({theme:t})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:t.palette.text.disabled})),XIt=fa(Su,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(t,e)=>e.weekNumber})(({theme:t})=>Mr({},t.typography.caption,{width:O9,height:O9,padding:0,margin:`0 ${fX}px`,color:t.palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),ZIt=fa("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(t,e)=>e.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:Pje}),KIt=fa(UIt,{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(t,e)=>e.slideTransition})({minHeight:Pje}),JIt=fa("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(t,e)=>e.monthContainer})({overflow:"hidden"}),QIt=fa("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(t,e)=>e.weekContainer})({margin:`${fX}px 0`,display:"flex",justifyContent:"center"});function ePt(t){let{parentProps:e,day:r,focusableDay:n,selectedDays:i,isDateDisabled:a,currentMonthNumber:o,isViewFocused:s}=t,d=Ms(t,jIt);const{disabled:b,disableHighlightToday:L,isMonthSwitchingAnimating:B,showDaysOutsideCurrentMonth:V,slots:X,slotProps:ie,timezone:de}=e,ae=yp(),U=XL(de),ve=n!==null&&ae.isSameDay(r,n),Se=i.some(ht=>ae.isSameDay(ht,r)),Pe=ae.isSameDay(r,U),Me=X?.day??bkt,Ie=Kd({elementType:Me,externalSlotProps:ie?.day,additionalProps:Mr({disableHighlightToday:L,showDaysOutsideCurrentMonth:V,role:"gridcell",isAnimating:B,"data-timestamp":ae.toJsDate(r).valueOf()},d),ownerState:Mr({},e,{day:r,selected:Se})}),Ve=Ms(Ie,VIt),Ze=ze.useMemo(()=>b||a(r),[b,a,r]),Je=ze.useMemo(()=>ae.getMonth(r)!==o,[ae,r,o]),nt=ze.useMemo(()=>{const ht=ae.startOfMonth(ae.setMonth(r,o));return V?ae.isSameDay(r,ae.startOfWeek(ht)):ae.isSameDay(r,ht)},[o,r,V,ae]),ut=ze.useMemo(()=>{const ht=ae.endOfMonth(ae.setMonth(r,o));return V?ae.isSameDay(r,ae.endOfWeek(ht)):ae.isSameDay(r,ht)},[o,r,V,ae]);return Ke.jsx(Me,Mr({},Ve,{day:r,disabled:Ze,autoFocus:s&&ve,today:Pe,outsideCurrentMonth:Je,isFirstVisibleCell:nt,isLastVisibleCell:ut,selected:Se,tabIndex:ve?0:-1,"aria-selected":Se,"aria-current":Pe?"date":void 0}))}function tPt(t){const e=yh({props:t,name:"MuiDayCalendar"}),r=yp(),{onFocusedDayChange:n,className:i,currentMonth:a,selectedDays:o,focusedDay:s,loading:d,onSelectedDaysChange:b,onMonthSwitchingAnimationEnd:L,readOnly:B,reduceAnimations:V,renderLoading:X=()=>Ke.jsx("span",{children:"..."}),slideDirection:ie,TransitionProps:de,disablePast:ae,disableFuture:U,minDate:ve,maxDate:Se,shouldDisableDate:Pe,shouldDisableMonth:Me,shouldDisableYear:Ie,dayOfWeekFormatter:Ve=Sn=>r.format(Sn,"weekdayShort").charAt(0).toUpperCase(),hasFocus:Ze,onFocusedViewChange:Je,gridLabelId:nt,displayWeekNumber:ut,fixedWeekNumber:ht,autoFocus:_t,timezone:Dt}=e,qt=XL(Dt),Lt=qIt(e),dr=Kv(),Zt=kje({shouldDisableDate:Pe,shouldDisableMonth:Me,shouldDisableYear:Ie,minDate:ve,maxDate:Se,disablePast:ae,disableFuture:U,timezone:Dt}),Cr=kb(),[yt,Vt]=V_({name:"DayCalendar",state:"hasFocus",controlled:Ze,default:_t??!1}),[Er,sr]=ze.useState(()=>s||qt),or=vl(Sn=>{B||b(Sn)}),Ar=Sn=>{Zt(Sn)||(n(Sn),sr(Sn),Je?.(!0),Vt(!0))},Ir=vl((Sn,bn)=>{switch(Sn.key){case"ArrowUp":Ar(r.addDays(bn,-7)),Sn.preventDefault();break;case"ArrowDown":Ar(r.addDays(bn,7)),Sn.preventDefault();break;case"ArrowLeft":{const Mn=r.addDays(bn,dr?1:-1),gi=r.addMonths(bn,dr?1:-1),Oi=Kz({utils:r,date:Mn,minDate:dr?Mn:r.startOfMonth(gi),maxDate:dr?r.endOfMonth(gi):Mn,isDateDisabled:Zt,timezone:Dt});Ar(Oi||Mn),Sn.preventDefault();break}case"ArrowRight":{const Mn=r.addDays(bn,dr?-1:1),gi=r.addMonths(bn,dr?-1:1),Oi=Kz({utils:r,date:Mn,minDate:dr?r.startOfMonth(gi):Mn,maxDate:dr?Mn:r.endOfMonth(gi),isDateDisabled:Zt,timezone:Dt});Ar(Oi||Mn),Sn.preventDefault();break}case"Home":Ar(r.startOfWeek(bn)),Sn.preventDefault();break;case"End":Ar(r.endOfWeek(bn)),Sn.preventDefault();break;case"PageUp":Ar(r.addMonths(bn,1)),Sn.preventDefault();break;case"PageDown":Ar(r.addMonths(bn,-1)),Sn.preventDefault();break}}),_n=vl((Sn,bn)=>Ar(bn)),Un=vl((Sn,bn)=>{yt&&r.isSameDay(Er,bn)&&Je?.(!1)}),Qn=r.getMonth(a),Jn=r.getYear(a),Vn=ze.useMemo(()=>o.filter(Sn=>!!Sn).map(Sn=>r.startOfDay(Sn)),[r,o]),jn=`${Jn}-${Qn}`,Lr=ze.useMemo(()=>ze.createRef(),[jn]),Yn=ze.useMemo(()=>{const Sn=r.startOfMonth(a),bn=r.endOfMonth(a);return Zt(Er)||r.isAfterDay(Er,bn)||r.isBeforeDay(Er,Sn)?Kz({utils:r,date:Er,minDate:Sn,maxDate:bn,disablePast:ae,disableFuture:U,isDateDisabled:Zt,timezone:Dt}):Er},[a,U,ae,Er,Zt,r,Dt]),On=ze.useMemo(()=>{const Sn=r.getWeekArray(a);let bn=r.addMonths(a,1);for(;ht&&Sn.length<ht;){const Mn=r.getWeekArray(bn),gi=r.isSameDay(Sn[Sn.length-1][0],Mn[0][0]);Mn.slice(gi?1:0).forEach(Oi=>{Sn.length<ht&&Sn.push(Oi)}),bn=r.addMonths(bn,1)}return Sn},[a,ht,r]);return Ke.jsxs(GIt,{role:"grid","aria-labelledby":nt,className:Lt.root,children:[Ke.jsxs($It,{role:"row",className:Lt.header,children:[ut&&Ke.jsx(YIt,{variant:"caption",role:"columnheader","aria-label":Cr.calendarWeekNumberHeaderLabel,className:Lt.weekNumberLabel,children:Cr.calendarWeekNumberHeaderText}),sRt(r,qt).map((Sn,bn)=>Ke.jsx(WIt,{variant:"caption",role:"columnheader","aria-label":r.format(Sn,"weekday"),className:Lt.weekDayLabel,children:Ve(Sn)},bn.toString()))]}),d?Ke.jsx(ZIt,{className:Lt.loadingContainer,children:X()}):Ke.jsx(KIt,Mr({transKey:jn,onExited:L,reduceAnimations:V,slideDirection:ie,className:Vo(i,Lt.slideTransition)},de,{nodeRef:Lr,children:Ke.jsx(JIt,{ref:Lr,role:"rowgroup",className:Lt.monthContainer,children:On.map((Sn,bn)=>Ke.jsxs(QIt,{role:"row",className:Lt.weekContainer,"aria-rowindex":bn+1,children:[ut&&Ke.jsx(XIt,{className:Lt.weekNumber,role:"rowheader","aria-label":Cr.calendarWeekNumberAriaLabelText(r.getWeekNumber(Sn[0])),children:Cr.calendarWeekNumberText(r.getWeekNumber(Sn[0]))}),Sn.map((Mn,gi)=>Ke.jsx(ePt,{parentProps:e,day:Mn,selectedDays:Vn,focusableDay:Yn,onKeyDown:Ir,onFocus:_n,onBlur:Un,onDaySelect:or,isDateDisabled:Zt,currentMonthNumber:Qn,isViewFocused:yt,"aria-colindex":gi+1},Mn.toString()))]},`week-${Sn[0]}`))})}))]})}function rPt(t){return Al("MuiPickersMonth",t)}const eV=Ml("MuiPickersMonth",["root","monthButton","disabled","selected"]),nPt=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","aria-label","monthsPerRow","slots","slotProps"],iPt=t=>{const{disabled:e,selected:r,classes:n}=t;return Cs({root:["root"],monthButton:["monthButton",e&&"disabled",r&&"selected"]},rPt,n)},aPt=fa("div",{name:"MuiPickersMonth",slot:"Root",overridesResolver:(t,e)=>[e.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{monthsPerRow:4},style:{flexBasis:"25%"}}]}),oPt=fa("button",{name:"MuiPickersMonth",slot:"MonthButton",overridesResolver:(t,e)=>[e.monthButton,{[`&.${eV.disabled}`]:e.disabled},{[`&.${eV.selected}`]:e.selected}]})(({theme:t})=>Mr({color:"unset",backgroundColor:"transparent",border:0,outline:0},t.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:Jx(t.palette.action.active,t.palette.action.hoverOpacity)},"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:Jx(t.palette.action.active,t.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${eV.disabled}`]:{color:(t.vars||t).palette.text.secondary},[`&.${eV.selected}`]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.main,"&:focus, &:hover":{backgroundColor:(t.vars||t).palette.primary.dark}}})),sPt=ze.memo(function(e){const r=yh({props:e,name:"MuiPickersMonth"}),{autoFocus:n,className:i,children:a,disabled:o,selected:s,value:d,tabIndex:b,onClick:L,onKeyDown:B,onFocus:V,onBlur:X,"aria-current":ie,"aria-label":de,slots:ae,slotProps:U}=r,ve=Ms(r,nPt),Se=ze.useRef(null),Pe=iPt(r);Ah(()=>{n&&Se.current?.focus()},[n]);const Me=ae?.monthButton??oPt,Ie=Kd({elementType:Me,externalSlotProps:U?.monthButton,additionalProps:{children:a,disabled:o,tabIndex:b,ref:Se,type:"button",role:"radio","aria-current":ie,"aria-checked":s,"aria-label":de,onClick:Ve=>L(Ve,d),onKeyDown:Ve=>B(Ve,d),onFocus:Ve=>V(Ve,d),onBlur:Ve=>X(Ve,d)},ownerState:r,className:Pe.monthButton});return Ke.jsx(aPt,Mr({className:Vo(Pe.root,i),ownerState:r},ve,{children:Ke.jsx(Me,Mr({},Ie))}))});function lPt(t){return Al("MuiMonthCalendar",t)}Ml("MuiMonthCalendar",["root"]);const uPt=["className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"],cPt=t=>{const{classes:e}=t;return Cs({root:["root"]},lPt,e)};function fPt(t,e){const r=yp(),n=YL(),i=yh({props:t,name:e});return Mr({disableFuture:!1,disablePast:!1},i,{minDate:Gw(r,i.minDate,n.minDate),maxDate:Gw(r,i.maxDate,n.maxDate)})}const dPt=fa("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"flex",flexWrap:"wrap",alignContent:"stretch",padding:"0 4px",width:dX,boxSizing:"border-box"}),hPt=ze.forwardRef(function(e,r){const n=fPt(e,"MuiMonthCalendar"),{className:i,value:a,defaultValue:o,referenceDate:s,disabled:d,disableFuture:b,disablePast:L,maxDate:B,minDate:V,onChange:X,shouldDisableMonth:ie,readOnly:de,autoFocus:ae=!1,onMonthFocus:U,hasFocus:ve,onFocusedViewChange:Se,monthsPerRow:Pe=3,timezone:Me,gridLabelId:Ie,slots:Ve,slotProps:Ze}=n,Je=Ms(n,uPt),{value:nt,handleValueChange:ut,timezone:ht}=rF({name:"MonthCalendar",timezone:Me,value:a,defaultValue:o,referenceDate:s,onChange:X,valueManager:S1}),_t=XL(ht),Dt=Kv(),qt=yp(),Lt=ze.useMemo(()=>S1.getInitialReferenceValue({value:nt,utils:qt,props:n,timezone:ht,referenceDate:s,granularity:IC.month}),[]),dr=n,Zt=cPt(dr),Cr=ze.useMemo(()=>qt.getMonth(_t),[qt,_t]),yt=ze.useMemo(()=>nt!=null?qt.getMonth(nt):null,[nt,qt]),[Vt,Er]=ze.useState(()=>yt||qt.getMonth(Lt)),[sr,or]=V_({name:"MonthCalendar",state:"hasFocus",controlled:ve,default:ae??!1}),Ar=vl(jn=>{or(jn),Se&&Se(jn)}),Ir=ze.useCallback(jn=>{const Lr=qt.startOfMonth(L&&qt.isAfter(_t,V)?_t:V),Yn=qt.startOfMonth(b&&qt.isBefore(_t,B)?_t:B),On=qt.startOfMonth(jn);return qt.isBefore(On,Lr)||qt.isAfter(On,Yn)?!0:ie?ie(On):!1},[b,L,B,V,_t,ie,qt]),_n=vl((jn,Lr)=>{if(de)return;const Yn=qt.setMonth(nt??Lt,Lr);ut(Yn)}),Un=vl(jn=>{Ir(qt.setMonth(nt??Lt,jn))||(Er(jn),Ar(!0),U&&U(jn))});ze.useEffect(()=>{Er(jn=>yt!==null&&jn!==yt?yt:jn)},[yt]);const Qn=vl((jn,Lr)=>{switch(jn.key){case"ArrowUp":Un((12+Lr-3)%12),jn.preventDefault();break;case"ArrowDown":Un((12+Lr+3)%12),jn.preventDefault();break;case"ArrowLeft":Un((12+Lr+(Dt?1:-1))%12),jn.preventDefault();break;case"ArrowRight":Un((12+Lr+(Dt?-1:1))%12),jn.preventDefault();break}}),Jn=vl((jn,Lr)=>{Un(Lr)}),Vn=vl((jn,Lr)=>{Vt===Lr&&Ar(!1)});return Ke.jsx(dPt,Mr({ref:r,className:Vo(Zt.root,i),ownerState:dr,role:"radiogroup","aria-labelledby":Ie},Je,{children:Kge(qt,nt??Lt).map(jn=>{const Lr=qt.getMonth(jn),Yn=qt.format(jn,"monthShort"),On=qt.format(jn,"month"),Sn=Lr===yt,bn=d||Ir(jn);return Ke.jsx(sPt,{selected:Sn,value:Lr,onClick:_n,onKeyDown:Qn,autoFocus:sr&&Lr===Vt,disabled:bn,tabIndex:Lr===Vt&&!bn?0:-1,onFocus:Jn,onBlur:Vn,"aria-current":Cr===Lr?"date":void 0,"aria-label":On,monthsPerRow:Pe,slots:Ve,slotProps:Ze,children:Yn},Yn)})}))});function pPt(t){return Al("MuiPickersYear",t)}const tV=Ml("MuiPickersYear",["root","yearButton","selected","disabled"]),vPt=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","yearsPerRow","slots","slotProps"],mPt=t=>{const{disabled:e,selected:r,classes:n}=t;return Cs({root:["root"],yearButton:["yearButton",e&&"disabled",r&&"selected"]},pPt,n)},gPt=fa("div",{name:"MuiPickersYear",slot:"Root",overridesResolver:(t,e)=>[e.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{yearsPerRow:4},style:{flexBasis:"25%"}}]}),yPt=fa("button",{name:"MuiPickersYear",slot:"YearButton",overridesResolver:(t,e)=>[e.yearButton,{[`&.${tV.disabled}`]:e.disabled},{[`&.${tV.selected}`]:e.selected}]})(({theme:t})=>Mr({color:"unset",backgroundColor:"transparent",border:0,outline:0},t.typography.subtitle1,{margin:"6px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.focusOpacity})`:Jx(t.palette.action.active,t.palette.action.focusOpacity)},"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:Jx(t.palette.action.active,t.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${tV.disabled}`]:{color:(t.vars||t).palette.text.secondary},[`&.${tV.selected}`]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.main,"&:focus, &:hover":{backgroundColor:(t.vars||t).palette.primary.dark}}})),bPt=ze.memo(function(e){const r=yh({props:e,name:"MuiPickersYear"}),{autoFocus:n,className:i,children:a,disabled:o,selected:s,value:d,tabIndex:b,onClick:L,onKeyDown:B,onFocus:V,onBlur:X,"aria-current":ie,slots:de,slotProps:ae}=r,U=Ms(r,vPt),ve=ze.useRef(null),Se=mPt(r);Ah(()=>{n&&ve.current?.focus()},[n]);const Pe=de?.yearButton??yPt,Me=Kd({elementType:Pe,externalSlotProps:ae?.yearButton,additionalProps:{children:a,disabled:o,tabIndex:b,ref:ve,type:"button",role:"radio","aria-current":ie,"aria-checked":s,onClick:Ie=>L(Ie,d),onKeyDown:Ie=>B(Ie,d),onFocus:Ie=>V(Ie,d),onBlur:Ie=>X(Ie,d)},ownerState:r,className:Se.yearButton});return Ke.jsx(gPt,Mr({className:Vo(Se.root,i),ownerState:r},U,{children:Ke.jsx(Pe,Mr({},Me))}))});function xPt(t){return Al("MuiYearCalendar",t)}Ml("MuiYearCalendar",["root"]);const _Pt=["autoFocus","className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"],wPt=t=>{const{classes:e}=t;return Cs({root:["root"]},xPt,e)};function SPt(t,e){const r=yp(),n=YL(),i=yh({props:t,name:e});return Mr({disablePast:!1,disableFuture:!1},i,{yearsPerRow:i.yearsPerRow??3,minDate:Gw(r,i.minDate,n.minDate),maxDate:Gw(r,i.maxDate,n.maxDate)})}const TPt=fa("div",{name:"MuiYearCalendar",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",width:dX,maxHeight:q5t,boxSizing:"border-box",position:"relative"}),EPt=ze.forwardRef(function(e,r){const n=SPt(e,"MuiYearCalendar"),{autoFocus:i,className:a,value:o,defaultValue:s,referenceDate:d,disabled:b,disableFuture:L,disablePast:B,maxDate:V,minDate:X,onChange:ie,readOnly:de,shouldDisableYear:ae,onYearFocus:U,hasFocus:ve,onFocusedViewChange:Se,yearsOrder:Pe="asc",yearsPerRow:Me,timezone:Ie,gridLabelId:Ve,slots:Ze,slotProps:Je}=n,nt=Ms(n,_Pt),{value:ut,handleValueChange:ht,timezone:_t}=rF({name:"YearCalendar",timezone:Ie,value:o,defaultValue:s,referenceDate:d,onChange:ie,valueManager:S1}),Dt=XL(_t),qt=Kv(),Lt=yp(),dr=ze.useMemo(()=>S1.getInitialReferenceValue({value:ut,utils:Lt,props:n,timezone:_t,referenceDate:d,granularity:IC.year}),[]),Zt=n,Cr=wPt(Zt),yt=ze.useMemo(()=>Lt.getYear(Dt),[Lt,Dt]),Vt=ze.useMemo(()=>ut!=null?Lt.getYear(ut):null,[ut,Lt]),[Er,sr]=ze.useState(()=>Vt||Lt.getYear(dr)),[or,Ar]=V_({name:"YearCalendar",state:"hasFocus",controlled:ve,default:i??!1}),Ir=vl(Mn=>{Ar(Mn),Se&&Se(Mn)}),_n=ze.useCallback(Mn=>{if(B&&Lt.isBeforeYear(Mn,Dt)||L&&Lt.isAfterYear(Mn,Dt)||X&&Lt.isBeforeYear(Mn,X)||V&&Lt.isAfterYear(Mn,V))return!0;if(!ae)return!1;const gi=Lt.startOfYear(Mn);return ae(gi)},[L,B,V,X,Dt,ae,Lt]),Un=vl((Mn,gi)=>{if(de)return;const Oi=Lt.setYear(ut??dr,gi);ht(Oi)}),Qn=vl(Mn=>{_n(Lt.setYear(ut??dr,Mn))||(sr(Mn),Ir(!0),U?.(Mn))});ze.useEffect(()=>{sr(Mn=>Vt!==null&&Mn!==Vt?Vt:Mn)},[Vt]);const Jn=Pe!=="desc"?Me*1:Me*-1,Vn=qt&&Pe==="asc"||!qt&&Pe==="desc"?-1:1,jn=vl((Mn,gi)=>{switch(Mn.key){case"ArrowUp":Qn(gi-Jn),Mn.preventDefault();break;case"ArrowDown":Qn(gi+Jn),Mn.preventDefault();break;case"ArrowLeft":Qn(gi-Vn),Mn.preventDefault();break;case"ArrowRight":Qn(gi+Vn),Mn.preventDefault();break}}),Lr=vl((Mn,gi)=>{Qn(gi)}),Yn=vl((Mn,gi)=>{Er===gi&&Ir(!1)}),On=ze.useRef(null),Sn=id(r,On);ze.useEffect(()=>{if(i||On.current===null)return;const Mn=On.current.querySelector('[tabindex="0"]');if(!Mn)return;const gi=Mn.offsetHeight,Oi=Mn.offsetTop,Pa=On.current.clientHeight,va=On.current.scrollTop,ti=Oi+gi;gi>Pa||Oi<va||(On.current.scrollTop=ti-Pa/2-gi/2)},[i]);const bn=Lt.getYearRange([X,V]);return Pe==="desc"&&bn.reverse(),Ke.jsx(TPt,Mr({ref:Sn,className:Vo(Cr.root,a),ownerState:Zt,role:"radiogroup","aria-labelledby":Ve},nt,{children:bn.map(Mn=>{const gi=Lt.getYear(Mn),Oi=gi===Vt,Pa=b||_n(Mn);return Ke.jsx(bPt,{selected:Oi,value:gi,onClick:Un,onKeyDown:jn,autoFocus:or&&gi===Er,disabled:Pa,tabIndex:gi===Er&&!Pa?0:-1,onFocus:Lr,onBlur:Yn,"aria-current":yt===gi?"date":void 0,yearsPerRow:Me,slots:Ze,slotProps:Je,children:Lt.format(Mn,"year")},Lt.format(Mn,"year"))})}))}),APt=t=>Al("MuiPickersCalendarHeader",t),CPt=Ml("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]),MPt=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","timezone","format"],RPt=["ownerState"],kPt=t=>{const{classes:e}=t;return Cs({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},APt,e)},IPt=fa("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"flex",alignItems:"center",marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),PPt=fa("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(t,e)=>e.labelContainer})(({theme:t})=>Mr({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},t.typography.body1,{fontWeight:t.typography.fontWeightMedium})),DPt=fa("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(t,e)=>e.label})({marginRight:6}),LPt=fa(Zf,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(t,e)=>e.switchViewButton})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${CPt.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),OPt=fa(A5t,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(t,e)=>e.switchViewIcon})(({theme:t})=>({willChange:"transform",transition:t.transitions.create("transform"),transform:"rotate(0deg)"})),NPt=ze.forwardRef(function(e,r){const n=kb(),i=yp(),a=yh({props:e,name:"MuiPickersCalendarHeader"}),{slots:o,slotProps:s,currentMonth:d,disabled:b,disableFuture:L,disablePast:B,maxDate:V,minDate:X,onMonthChange:ie,onViewChange:de,view:ae,reduceAnimations:U,views:ve,labelId:Se,className:Pe,timezone:Me,format:Ie=`${i.formats.month} ${i.formats.year}`}=a,Ve=Ms(a,MPt),Ze=a,Je=kPt(a),nt=o?.switchViewButton??LPt,ut=Kd({elementType:nt,externalSlotProps:s?.switchViewButton,additionalProps:{size:"small","aria-label":n.calendarViewSwitchingButtonAriaLabel(ae)},ownerState:Ze,className:Je.switchViewButton}),ht=o?.switchViewIcon??OPt,_t=Kd({elementType:ht,externalSlotProps:s?.switchViewIcon,ownerState:Ze,className:Je.switchViewIcon}),Dt=Ms(_t,RPt),qt=()=>ie(i.addMonths(d,1),"left"),Lt=()=>ie(i.addMonths(d,-1),"right"),dr=j5t(d,{disableFuture:L,maxDate:V,timezone:Me}),Zt=V5t(d,{disablePast:B,minDate:X,timezone:Me}),Cr=()=>{if(!(ve.length===1||!de||b))if(ve.length===2)de(ve.find(Vt=>Vt!==ae)||ve[0]);else{const Vt=ve.indexOf(ae)!==0?0:1;de(ve[Vt])}};if(ve.length===1&&ve[0]==="year")return null;const yt=i.formatByString(d,Ie);return Ke.jsxs(IPt,Mr({},Ve,{ownerState:Ze,className:Vo(Je.root,Pe),ref:r,children:[Ke.jsxs(PPt,{role:"presentation",onClick:Cr,ownerState:Ze,"aria-live":"polite",className:Je.labelContainer,children:[Ke.jsx(Ije,{reduceAnimations:U,transKey:yt,children:Ke.jsx(DPt,{id:Se,ownerState:Ze,className:Je.label,children:yt})}),ve.length>1&&!b&&Ke.jsx(nt,Mr({},ut,{children:Ke.jsx(ht,Mr({},Dt))}))]}),Ke.jsx(xL,{in:ae==="day",appear:!U,enter:!U,children:Ke.jsx(nje,{slots:o,slotProps:s,onGoToPrevious:Lt,isPreviousDisabled:Zt,previousLabel:n.previousMonth,onGoToNext:qt,isNextDisabled:dr,nextLabel:n.nextMonth})})]}))}),FPt="@media (prefers-reduced-motion: reduce)",zN=typeof navigator<"u"&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),X5e=zN&&zN[1]?parseInt(zN[1],10):null,Z5e=zN&&zN[2]?parseInt(zN[2],10):null,zPt=X5e&&X5e<10||Z5e&&Z5e<13||!1,Dje=()=>IY(FPt,{defaultMatches:!1})||zPt,BPt=t=>Al("MuiDateCalendar",t);Ml("MuiDateCalendar",["root","viewTransitionContainer"]);const UPt=["autoFocus","onViewChange","value","defaultValue","referenceDate","disableFuture","disablePast","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsOrder","yearsPerRow","monthsPerRow","timezone"],HPt=t=>{const{classes:e}=t;return Cs({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},BPt,e)};function jPt(t,e){const r=yp(),n=YL(),i=Dje(),a=yh({props:t,name:e});return Mr({},a,{loading:a.loading??!1,disablePast:a.disablePast??!1,disableFuture:a.disableFuture??!1,openTo:a.openTo??"day",views:a.views??["year","day"],reduceAnimations:a.reduceAnimations??i,renderLoading:a.renderLoading??(()=>Ke.jsx("span",{children:"..."})),minDate:Gw(r,a.minDate,n.minDate),maxDate:Gw(r,a.maxDate,n.maxDate)})}const VPt=fa(pX,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"flex",flexDirection:"column",height:hX}),qPt=fa(Ije,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(t,e)=>e.viewTransitionContainer})({}),GPt=ze.forwardRef(function(e,r){const n=yp(),i=Vd(),a=jPt(e,"MuiDateCalendar"),{autoFocus:o,onViewChange:s,value:d,defaultValue:b,referenceDate:L,disableFuture:B,disablePast:V,onChange:X,onYearChange:ie,onMonthChange:de,reduceAnimations:ae,shouldDisableDate:U,shouldDisableMonth:ve,shouldDisableYear:Se,view:Pe,views:Me,openTo:Ie,className:Ve,disabled:Ze,readOnly:Je,minDate:nt,maxDate:ut,disableHighlightToday:ht,focusedView:_t,onFocusedViewChange:Dt,showDaysOutsideCurrentMonth:qt,fixedWeekNumber:Lt,dayOfWeekFormatter:dr,slots:Zt,slotProps:Cr,loading:yt,renderLoading:Vt,displayWeekNumber:Er,yearsOrder:sr,yearsPerRow:or,monthsPerRow:Ar,timezone:Ir}=a,_n=Ms(a,UPt),{value:Un,handleValueChange:Qn,timezone:Jn}=rF({name:"DateCalendar",timezone:Ir,value:d,defaultValue:b,referenceDate:L,onChange:X,valueManager:S1}),{view:Vn,setView:jn,focusedView:Lr,setFocusedView:Yn,goToNextView:On,setValueAndGoToNextView:Sn}=JB({view:Pe,views:Me,openTo:Ie,onChange:Qn,onViewChange:s,autoFocus:o,focusedView:_t,onFocusedViewChange:Dt}),{referenceDate:bn,calendarState:Mn,changeFocusedDay:gi,changeMonth:Oi,handleChangeMonth:Pa,isDateDisabled:va,onMonthSwitchingAnimationEnd:ti}=PIt({value:Un,referenceDate:L,reduceAnimations:ae,onMonthChange:de,minDate:nt,maxDate:ut,shouldDisableDate:U,disablePast:V,disableFuture:B,timezone:Jn}),Tn=Ze&&Un||nt,bi=Ze&&Un||ut,Wn=`${i}-grid-label`,Ei=Lr!==null,Ki=Zt?.calendarHeader??NPt,sa=Kd({elementType:Ki,externalSlotProps:Cr?.calendarHeader,additionalProps:{views:Me,view:Vn,currentMonth:Mn.currentMonth,onViewChange:jn,onMonthChange:(ba,po)=>Pa({newMonth:ba,direction:po}),minDate:Tn,maxDate:bi,disabled:Ze,disablePast:V,disableFuture:B,reduceAnimations:ae,timezone:Jn,labelId:Wn},ownerState:a}),xa=vl(ba=>{const po=n.startOfMonth(ba),Ys=n.endOfMonth(ba),$s=va(ba)?Kz({utils:n,date:ba,minDate:n.isBefore(nt,po)?po:nt,maxDate:n.isAfter(ut,Ys)?Ys:ut,disablePast:V,disableFuture:B,isDateDisabled:va,timezone:Jn}):ba;$s?(Sn($s,"finish"),de?.(po)):(On(),Oi(po)),gi($s,!0)}),Qa=vl(ba=>{const po=n.startOfYear(ba),Ys=n.endOfYear(ba),$s=va(ba)?Kz({utils:n,date:ba,minDate:n.isBefore(nt,po)?po:nt,maxDate:n.isAfter(ut,Ys)?Ys:ut,disablePast:V,disableFuture:B,isDateDisabled:va,timezone:Jn}):ba;$s?(Sn($s,"finish"),ie?.($s)):(On(),Oi(po)),gi($s,!0)}),is=vl(ba=>Qn(ba&&h$(n,ba,Un??bn),"finish",Vn));ze.useEffect(()=>{Un!=null&&n.isValid(Un)&&Oi(Un)},[Un]);const go=a,Co=HPt(go),Ko={disablePast:V,disableFuture:B,maxDate:ut,minDate:nt},Zi={disableHighlightToday:ht,readOnly:Je,disabled:Ze,timezone:Jn,gridLabelId:Wn,slots:Zt,slotProps:Cr},za=ze.useRef(Vn);ze.useEffect(()=>{za.current!==Vn&&(Lr===za.current&&Yn(Vn,!0),za.current=Vn)},[Lr,Yn,Vn]);const Ss=ze.useMemo(()=>[Un],[Un]);return Ke.jsxs(VPt,Mr({ref:r,className:Vo(Co.root,Ve),ownerState:go},_n,{children:[Ke.jsx(Ki,Mr({},sa,{slots:Zt,slotProps:Cr})),Ke.jsx(qPt,{reduceAnimations:ae,className:Co.viewTransitionContainer,transKey:Vn,ownerState:go,children:Ke.jsxs("div",{children:[Vn==="year"&&Ke.jsx(EPt,Mr({},Ko,Zi,{value:Un,onChange:Qa,shouldDisableYear:Se,hasFocus:Ei,onFocusedViewChange:ba=>Yn("year",ba),yearsOrder:sr,yearsPerRow:or,referenceDate:bn})),Vn==="month"&&Ke.jsx(hPt,Mr({},Ko,Zi,{hasFocus:Ei,className:Ve,value:Un,onChange:xa,shouldDisableMonth:ve,onFocusedViewChange:ba=>Yn("month",ba),monthsPerRow:Ar,referenceDate:bn})),Vn==="day"&&Ke.jsx(tPt,Mr({},Mn,Ko,Zi,{onMonthSwitchingAnimationEnd:ti,onFocusedDayChange:gi,reduceAnimations:ae,selectedDays:Ss,onSelectedDaysChange:is,shouldDisableDate:U,shouldDisableMonth:ve,shouldDisableYear:Se,hasFocus:Ei,onFocusedViewChange:ba=>Yn("day",ba),showDaysOutsideCurrentMonth:qt,fixedWeekNumber:Lt,dayOfWeekFormatter:dr,displayWeekNumber:Er,loading:yt,renderLoading:Vt}))]})})]}))});function Lje(t){return Al("MuiPickersToolbar",t)}const $Pt=Ml("MuiPickersToolbar",["root","content"]),WPt=["children","className","toolbarTitle","hidden","titleId","isLandscape","classes","landscapeDirection"],YPt=t=>{const{classes:e}=t;return Cs({root:["root"],content:["content"]},Lje,e)},XPt=fa("div",{name:"MuiPickersToolbar",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:t.spacing(2,3),variants:[{props:{isLandscape:!0},style:{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"}}]})),ZPt=fa("div",{name:"MuiPickersToolbar",slot:"Content",overridesResolver:(t,e)=>e.content})({display:"flex",flexWrap:"wrap",width:"100%",flex:1,justifyContent:"space-between",alignItems:"center",flexDirection:"row",variants:[{props:{isLandscape:!0},style:{justifyContent:"flex-start",alignItems:"flex-start",flexDirection:"column"}},{props:{isLandscape:!0,landscapeDirection:"row"},style:{flexDirection:"row"}}]}),d0e=ze.forwardRef(function(e,r){const n=yh({props:e,name:"MuiPickersToolbar"}),{children:i,className:a,toolbarTitle:o,hidden:s,titleId:d}=n,b=Ms(n,WPt),L=n,B=YPt(L);return s?null:Ke.jsxs(XPt,Mr({ref:r,className:Vo(B.root,a),ownerState:L},b,{children:[Ke.jsx(Su,{color:"text.secondary",variant:"overline",id:d,children:o}),Ke.jsx(ZPt,{className:B.content,ownerState:L,children:i})]}))});function KPt(t){return Al("MuiDatePickerToolbar",t)}Ml("MuiDatePickerToolbar",["root","title"]);const JPt=["value","isLandscape","onChange","toolbarFormat","toolbarPlaceholder","views","className","onViewChange","view"],QPt=t=>{const{classes:e}=t;return Cs({root:["root"],title:["title"]},KPt,e)},e4t=fa(d0e,{name:"MuiDatePickerToolbar",slot:"Root",overridesResolver:(t,e)=>e.root})({}),t4t=fa(Su,{name:"MuiDatePickerToolbar",slot:"Title",overridesResolver:(t,e)=>e.title})({variants:[{props:{isLandscape:!0},style:{margin:"auto 16px auto auto"}}]}),r4t=ze.forwardRef(function(e,r){const n=yh({props:e,name:"MuiDatePickerToolbar"}),{value:i,isLandscape:a,toolbarFormat:o,toolbarPlaceholder:s="––",views:d,className:b}=n,L=Ms(n,JPt),B=yp(),V=kb(),X=QPt(n),ie=ze.useMemo(()=>{if(!i)return s;const ae=F9(B,{format:o,views:d},!0);return B.formatByString(i,ae)},[i,o,s,B,d]),de=n;return Ke.jsx(e4t,Mr({ref:r,toolbarTitle:V.datePickerToolbarTitle,isLandscape:a,className:Vo(X.root,b)},L,{children:Ke.jsx(t4t,{variant:"h4",align:a?"left":"center",ownerState:de,className:X.title,children:ie})}))});function Oje(t,e){const r=yp(),n=YL(),i=yh({props:t,name:e}),a=ze.useMemo(()=>i.localeText?.toolbarTitle==null?i.localeText:Mr({},i.localeText,{datePickerToolbarTitle:i.localeText.toolbarTitle}),[i.localeText]);return Mr({},i,{localeText:a},Zge({views:i.views,openTo:i.openTo,defaultViews:["year","day"],defaultOpenTo:"day"}),{disableFuture:i.disableFuture??!1,disablePast:i.disablePast??!1,minDate:Gw(r,i.minDate,n.minDate),maxDate:Gw(r,i.maxDate,n.maxDate),slots:Mr({toolbar:r4t},i.slots)})}function n4t(t){return Al("MuiPickersPopper",t)}Ml("MuiPickersPopper",["root","paper"]);const i4t=["PaperComponent","popperPlacement","ownerState","children","paperSlotProps","paperClasses","onPaperClick","onPaperTouchStart"],a4t=t=>{const{classes:e}=t;return Cs({root:["root"],paper:["paper"]},n4t,e)},o4t=fa(O8,{name:"MuiPickersPopper",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>({zIndex:t.zIndex.modal})),s4t=fa(Gy,{name:"MuiPickersPopper",slot:"Paper",overridesResolver:(t,e)=>e.paper})({outline:0,transformOrigin:"top center",variants:[{props:({placement:t})=>["top","top-start","top-end"].includes(t),style:{transformOrigin:"bottom center"}}]});function l4t(t,e){return e.documentElement.clientWidth<t.clientX||e.documentElement.clientHeight<t.clientY}function u4t(t,e){const r=ze.useRef(!1),n=ze.useRef(!1),i=ze.useRef(null),a=ze.useRef(!1);ze.useEffect(()=>{if(!t)return;function d(){a.current=!0}return document.addEventListener("mousedown",d,!0),document.addEventListener("touchstart",d,!0),()=>{document.removeEventListener("mousedown",d,!0),document.removeEventListener("touchstart",d,!0),a.current=!1}},[t]);const o=vl(d=>{if(!a.current)return;const b=n.current;n.current=!1;const L=Lm(i.current);if(!i.current||"clientX"in d&&l4t(d,L))return;if(r.current){r.current=!1;return}let B;d.composedPath?B=d.composedPath().indexOf(i.current)>-1:B=!L.documentElement.contains(d.target)||i.current.contains(d.target),!B&&!b&&e(d)}),s=()=>{n.current=!0};return ze.useEffect(()=>{if(t){const d=Lm(i.current),b=()=>{r.current=!0};return d.addEventListener("touchstart",o),d.addEventListener("touchmove",b),()=>{d.removeEventListener("touchstart",o),d.removeEventListener("touchmove",b)}}},[t,o]),ze.useEffect(()=>{if(t){const d=Lm(i.current);return d.addEventListener("click",o),()=>{d.removeEventListener("click",o),n.current=!1}}},[t,o]),[i,s,s]}const c4t=ze.forwardRef((t,e)=>{const{PaperComponent:r,popperPlacement:n,ownerState:i,children:a,paperSlotProps:o,paperClasses:s,onPaperClick:d,onPaperTouchStart:b}=t,L=Ms(t,i4t),B=Mr({},i,{placement:n}),V=Kd({elementType:r,externalSlotProps:o,additionalProps:{tabIndex:-1,elevation:8,ref:e},className:s,ownerState:B});return Ke.jsx(r,Mr({},L,V,{onClick:X=>{d(X),V.onClick?.(X)},onTouchStart:X=>{b(X),V.onTouchStart?.(X)},ownerState:B,children:a}))});function f4t(t){const e=yh({props:t,name:"MuiPickersPopper"}),{anchorEl:r,children:n,containerRef:i=null,shouldRestoreFocus:a,onBlur:o,onDismiss:s,open:d,role:b,placement:L,slots:B,slotProps:V,reduceAnimations:X}=e;ze.useEffect(()=>{function qt(Lt){d&&Lt.key==="Escape"&&s()}return document.addEventListener("keydown",qt),()=>{document.removeEventListener("keydown",qt)}},[s,d]);const ie=ze.useRef(null);ze.useEffect(()=>{b==="tooltip"||a&&!a()||(d?ie.current=N2(document):ie.current&&ie.current instanceof HTMLElement&&setTimeout(()=>{ie.current instanceof HTMLElement&&ie.current.focus()}))},[d,b,a]);const[de,ae,U]=u4t(d,o??s),ve=ze.useRef(null),Se=id(ve,i),Pe=id(Se,de),Me=e,Ie=a4t(Me),Ve=Dje(),Ze=X??Ve,Je=qt=>{qt.key==="Escape"&&(qt.stopPropagation(),s())},nt=B?.desktopTransition??Ze?xL:yL,ut=B?.desktopTrapFocus??mme,ht=B?.desktopPaper??s4t,_t=B?.popper??o4t,Dt=Kd({elementType:_t,externalSlotProps:V?.popper,additionalProps:{transition:!0,role:b,open:d,anchorEl:r,placement:L,onKeyDown:Je},className:Ie.root,ownerState:e});return Ke.jsx(_t,Mr({},Dt,{children:({TransitionProps:qt,placement:Lt})=>Ke.jsx(ut,Mr({open:d,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:b==="tooltip",isEnabled:()=>!0},V?.desktopTrapFocus,{children:Ke.jsx(nt,Mr({},qt,V?.desktopTransition,{children:Ke.jsx(c4t,{PaperComponent:ht,ownerState:Me,popperPlacement:Lt,ref:Pe,onPaperClick:ae,onPaperTouchStart:U,paperClasses:Ie.paper,paperSlotProps:V?.desktopPaper,children:n})}))}))}))}const d4t=({open:t,onOpen:e,onClose:r})=>{const n=ze.useRef(typeof t=="boolean").current,[i,a]=ze.useState(!1);ze.useEffect(()=>{if(n){if(typeof t!="boolean")throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");a(t)}},[n,t]);const o=ze.useCallback(s=>{n||a(s),s&&e&&e(),!s&&r&&r()},[n,e,r]);return{isOpen:i,setIsOpen:o}},h4t=t=>{const{action:e,hasChanged:r,dateState:n,isControlled:i}=t,a=!i&&!n.hasBeenModifiedSinceMount;return e.name==="setValueFromField"?!0:e.name==="setValueFromAction"?a&&["accept","today","clear"].includes(e.pickerAction)?!0:r(n.lastPublishedValue):e.name==="setValueFromView"&&e.selectionState!=="shallow"||e.name==="setValueFromShortcut"?a?!0:r(n.lastPublishedValue):!1},p4t=t=>{const{action:e,hasChanged:r,dateState:n,isControlled:i,closeOnSelect:a}=t,o=!i&&!n.hasBeenModifiedSinceMount;return e.name==="setValueFromAction"?o&&["accept","today","clear"].includes(e.pickerAction)?!0:r(n.lastCommittedValue):e.name==="setValueFromView"&&e.selectionState==="finish"&&a?o?!0:r(n.lastCommittedValue):e.name==="setValueFromShortcut"?e.changeImportance==="accept"&&r(n.lastCommittedValue):!1},v4t=t=>{const{action:e,closeOnSelect:r}=t;return e.name==="setValueFromAction"?!0:e.name==="setValueFromView"?e.selectionState==="finish"&&r:e.name==="setValueFromShortcut"?e.changeImportance==="accept":!1},m4t=({props:t,valueManager:e,valueType:r,wrapperVariant:n,validator:i})=>{const{onAccept:a,onChange:o,value:s,defaultValue:d,closeOnSelect:b=n==="desktop",timezone:L,referenceDate:B}=t,{current:V}=ze.useRef(d),{current:X}=ze.useRef(s!==void 0),[ie,de]=ze.useState(L),ae=yp(),U=WL(),{isOpen:ve,setIsOpen:Se}=d4t(t),{timezone:Pe,value:Me,handleValueChange:Ie}=Qge({timezone:L,value:s,defaultValue:V,referenceDate:B,onChange:o,valueManager:e}),[Ve,Ze]=ze.useState(()=>{let Qn;return Me!==void 0?Qn=Me:V!==void 0?Qn=V:Qn=e.emptyValue,{draft:Qn,lastPublishedValue:Qn,lastCommittedValue:Qn,lastControlledValue:s,hasBeenModifiedSinceMount:!1}}),Je=e.getTimezone(ae,Ve.draft);ie!==L&&(de(L),L&&Je&&L!==Je&&Ze(Qn=>Mr({},Qn,{draft:e.setTimezone(ae,L,Qn.draft)})));const{getValidationErrorForNewValue:nt}=yje({props:t,validator:i,timezone:Pe,value:Ve.draft,onError:t.onError}),ut=vl(Qn=>{const Jn={action:Qn,dateState:Ve,hasChanged:Sn=>!e.areValuesEqual(ae,Qn.value,Sn),isControlled:X,closeOnSelect:b},Vn=h4t(Jn),jn=p4t(Jn),Lr=v4t(Jn);Ze(Sn=>Mr({},Sn,{draft:Qn.value,lastPublishedValue:Vn?Qn.value:Sn.lastPublishedValue,lastCommittedValue:jn?Qn.value:Sn.lastCommittedValue,hasBeenModifiedSinceMount:!0}));let Yn=null;const On=()=>(Yn||(Yn={validationError:Qn.name==="setValueFromField"?Qn.context.validationError:nt(Qn.value)},Qn.name==="setValueFromShortcut"&&(Yn.shortcut=Qn.shortcut)),Yn);Vn&&Ie(Qn.value,On()),jn&&a&&a(Qn.value,On()),Lr&&Se(!1)});if(Ve.lastControlledValue!==s){const Qn=e.areValuesEqual(ae,Ve.draft,Me);Ze(Jn=>Mr({},Jn,{lastControlledValue:s},Qn?{}:{lastCommittedValue:Me,lastPublishedValue:Me,draft:Me,hasBeenModifiedSinceMount:!0}))}const ht=vl(()=>{ut({value:e.emptyValue,name:"setValueFromAction",pickerAction:"clear"})}),_t=vl(()=>{ut({value:Ve.lastPublishedValue,name:"setValueFromAction",pickerAction:"accept"})}),Dt=vl(()=>{ut({value:Ve.lastPublishedValue,name:"setValueFromAction",pickerAction:"dismiss"})}),qt=vl(()=>{ut({value:Ve.lastCommittedValue,name:"setValueFromAction",pickerAction:"cancel"})}),Lt=vl(()=>{ut({value:e.getTodayValue(ae,Pe,r),name:"setValueFromAction",pickerAction:"today"})}),dr=vl(Qn=>{Qn.preventDefault(),Se(!0)}),Zt=vl(Qn=>{Qn?.preventDefault(),Se(!1)}),Cr=vl((Qn,Jn="partial")=>ut({name:"setValueFromView",value:Qn,selectionState:Jn})),yt=vl((Qn,Jn,Vn)=>ut({name:"setValueFromShortcut",value:Qn,changeImportance:Jn,shortcut:Vn})),Vt=vl((Qn,Jn)=>ut({name:"setValueFromField",value:Qn,context:Jn})),Er={onClear:ht,onAccept:_t,onDismiss:Dt,onCancel:qt,onSetToday:Lt,onOpen:dr,onClose:Zt},sr={value:Ve.draft,onChange:Vt},or=ze.useMemo(()=>e.cleanValue(ae,Ve.draft),[ae,e,Ve.draft]),Ar={value:or,onChange:Cr,onClose:Zt,open:ve},_n=Mr({},Er,{value:or,onChange:Cr,onSelectShortcut:yt,isValid:Qn=>{const Jn=i({adapter:U,value:Qn,timezone:Pe,props:t});return!e.hasError(Jn)}}),Un=ze.useMemo(()=>({onOpen:dr,onClose:Zt,open:ve}),[ve,Zt,dr]);return{open:ve,fieldProps:sr,viewProps:Ar,layoutProps:_n,actions:Er,contextValue:Un}},g4t=["className","sx"],y4t=({props:t,propsFromPickerValue:e,additionalViewProps:r,autoFocusView:n,rendererInterceptor:i,fieldRef:a})=>{const{onChange:o,open:s,onClose:d}=e,{view:b,views:L,openTo:B,onViewChange:V,viewRenderers:X,timezone:ie}=t,de=Ms(t,g4t),{view:ae,setView:U,defaultView:ve,focusedView:Se,setFocusedView:Pe,setValueAndGoToNextView:Me}=JB({view:b,views:L,openTo:B,onChange:o,onViewChange:V,autoFocus:n}),{hasUIView:Ie,viewModeLookup:Ve}=ze.useMemo(()=>L.reduce((Dt,qt)=>{let Lt;return X[qt]!=null?Lt="UI":Lt="field",Dt.viewModeLookup[qt]=Lt,Lt==="UI"&&(Dt.hasUIView=!0),Dt},{hasUIView:!1,viewModeLookup:{}}),[X,L]),Ze=ze.useMemo(()=>L.reduce((Dt,qt)=>X[qt]!=null&&n8(qt)?Dt+1:Dt,0),[X,L]),Je=Ve[ae],nt=vl(()=>Je==="UI"),[ut,ht]=ze.useState(Je==="UI"?ae:null);return ut!==ae&&Ve[ae]==="UI"&&ht(ae),Ah(()=>{Je==="field"&&s&&(d(),setTimeout(()=>{a?.current?.setSelectedSections(ae),a?.current?.focusField(ae)}))},[ae]),Ah(()=>{if(!s)return;let Dt=ae;Je==="field"&&ut!=null&&(Dt=ut),Dt!==ve&&Ve[Dt]==="UI"&&Ve[ve]==="UI"&&(Dt=ve),Dt!==ae&&U(Dt),Pe(Dt,!0)},[s]),{hasUIView:Ie,shouldRestoreFocus:nt,layoutProps:{views:L,view:ut,onViewChange:U},renderCurrentView:()=>{if(ut==null)return null;const Dt=X[ut];if(Dt==null)return null;const qt=Mr({},de,r,e,{views:L,timezone:ie,onChange:Me,view:ut,onViewChange:U,focusedView:Se,onFocusedViewChange:Pe,showViewSwitcher:Ze>1,timeViewsCount:Ze});return i?i(X,ut,qt):Dt(qt)}}};function K5e(){return typeof window>"u"?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?Math.abs(window.screen.orientation.angle)===90?"landscape":"portrait":window.orientation&&Math.abs(Number(window.orientation))===90?"landscape":"portrait"}const b4t=(t,e)=>{const[r,n]=ze.useState(K5e);return Ah(()=>{const a=()=>{n(K5e())};return window.addEventListener("orientationchange",a),()=>{window.removeEventListener("orientationchange",a)}},[]),vN(t,["hours","minutes","seconds"])?!1:(e||r)==="landscape"},x4t=({props:t,propsFromPickerValue:e,propsFromPickerViews:r,wrapperVariant:n})=>{const{orientation:i}=t,a=b4t(r.views,i),o=Kv();return{layoutProps:Mr({},r,e,{isLandscape:a,isRtl:o,wrapperVariant:n,disabled:t.disabled,readOnly:t.readOnly})}};function _4t(t){const{props:e,pickerValueResponse:r}=t;return ze.useMemo(()=>({value:r.viewProps.value,open:r.open,disabled:e.disabled??!1,readOnly:e.readOnly??!1}),[r.viewProps.value,r.open,e.disabled,e.readOnly])}const Nje=({props:t,valueManager:e,valueType:r,wrapperVariant:n,additionalViewProps:i,validator:a,autoFocusView:o,rendererInterceptor:s,fieldRef:d})=>{const b=m4t({props:t,valueManager:e,valueType:r,wrapperVariant:n,validator:a}),L=y4t({props:t,additionalViewProps:i,autoFocusView:o,fieldRef:d,propsFromPickerValue:b.viewProps,rendererInterceptor:s}),B=x4t({props:t,wrapperVariant:n,propsFromPickerValue:b.layoutProps,propsFromPickerViews:L.layoutProps}),V=_4t({props:t,pickerValueResponse:b});return{open:b.open,actions:b.actions,fieldProps:b.fieldProps,renderCurrentView:L.renderCurrentView,hasUIView:L.hasUIView,shouldRestoreFocus:L.shouldRestoreFocus,layoutProps:B.layoutProps,contextValue:b.contextValue,ownerState:V}};function Fje(t){return Al("MuiPickersLayout",t)}const MC=Ml("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","tabs","shortcuts"]),w4t=["onAccept","onClear","onCancel","onSetToday","actions"];function S4t(t){const{onAccept:e,onClear:r,onCancel:n,onSetToday:i,actions:a}=t,o=Ms(t,w4t),s=kb();if(a==null||a.length===0)return null;const d=a?.map(b=>{switch(b){case"clear":return Ke.jsx(Id,{onClick:r,children:s.clearButtonLabel},b);case"cancel":return Ke.jsx(Id,{onClick:n,children:s.cancelButtonLabel},b);case"accept":return Ke.jsx(Id,{onClick:e,children:s.okButtonLabel},b);case"today":return Ke.jsx(Id,{onClick:i,children:s.todayButtonLabel},b);default:return null}});return Ke.jsx(WC,Mr({},o,{children:d}))}const T4t=["items","changeImportance","isLandscape","onChange","isValid"],E4t=["getValue"];function A4t(t){const{items:e,changeImportance:r="accept",onChange:n,isValid:i}=t,a=Ms(t,T4t);if(e==null||e.length===0)return null;const o=e.map(s=>{let{getValue:d}=s,b=Ms(s,E4t);const L=d({isValid:i});return Mr({},b,{label:b.label,onClick:()=>{n(L,r,b)},disabled:!i(L)})});return Ke.jsx(B8,Mr({dense:!0,sx:[{maxHeight:hX,maxWidth:200,overflow:"auto"},...Array.isArray(a.sx)?a.sx:[a.sx]]},a,{children:o.map(s=>Ke.jsx(xk,{children:Ke.jsx(Eb,Mr({},s))},s.id??s.label))}))}function C4t(t){return t.view!==null}const M4t=t=>{const{classes:e,isLandscape:r}=t;return Cs({root:["root",r&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]},Fje,e)},zje=t=>{const{wrapperVariant:e,onAccept:r,onClear:n,onCancel:i,onSetToday:a,view:o,views:s,onViewChange:d,value:b,onChange:L,onSelectShortcut:B,isValid:V,isLandscape:X,disabled:ie,readOnly:de,children:ae,slots:U,slotProps:ve}=t,Se=M4t(t),Pe=U?.actionBar??S4t,Me=Kd({elementType:Pe,externalSlotProps:ve?.actionBar,additionalProps:{onAccept:r,onClear:n,onCancel:i,onSetToday:a,actions:e==="desktop"?[]:["cancel","accept"]},className:Se.actionBar,ownerState:Mr({},t,{wrapperVariant:e})}),Ie=Ke.jsx(Pe,Mr({},Me)),Ve=U?.toolbar,Ze=Kd({elementType:Ve,externalSlotProps:ve?.toolbar,additionalProps:{isLandscape:X,onChange:L,value:b,view:o,onViewChange:d,views:s,disabled:ie,readOnly:de},className:Se.toolbar,ownerState:Mr({},t,{wrapperVariant:e})}),Je=C4t(Ze)&&Ve?Ke.jsx(Ve,Mr({},Ze)):null,nt=ae,ut=U?.tabs,ht=o&&ut?Ke.jsx(ut,Mr({view:o,onViewChange:d,className:Se.tabs},ve?.tabs)):null,_t=U?.shortcuts??A4t,Dt=Kd({elementType:_t,externalSlotProps:ve?.shortcuts,additionalProps:{isValid:V,isLandscape:X,onChange:B},className:Se.shortcuts,ownerState:{isValid:V,isLandscape:X,onChange:B,wrapperVariant:e}}),qt=o&&_t?Ke.jsx(_t,Mr({},Dt)):null;return{toolbar:Je,content:nt,tabs:ht,actionBar:Ie,shortcuts:qt}},R4t=t=>{const{isLandscape:e,classes:r}=t;return Cs({root:["root",e&&"landscape"],contentWrapper:["contentWrapper"]},Fje,r)},Bje=fa("div",{name:"MuiPickersLayout",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${MC.actionBar}`]:{gridColumn:"1 / 4",gridRow:3},variants:[{props:{isLandscape:!0},style:{[`& .${MC.toolbar}`]:{gridColumn:1,gridRow:"2 / 3"},[`.${MC.shortcuts}`]:{gridColumn:"2 / 4",gridRow:1}}},{props:{isLandscape:!0,isRtl:!0},style:{[`& .${MC.toolbar}`]:{gridColumn:3}}},{props:{isLandscape:!1},style:{[`& .${MC.toolbar}`]:{gridColumn:"2 / 4",gridRow:1},[`& .${MC.shortcuts}`]:{gridColumn:1,gridRow:"2 / 3"}}},{props:{isLandscape:!1,isRtl:!0},style:{[`& .${MC.shortcuts}`]:{gridColumn:3}}}]}),Uje=fa("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(t,e)=>e.contentWrapper})({gridColumn:2,gridRow:2,display:"flex",flexDirection:"column"}),Hje=ze.forwardRef(function(e,r){const n=yh({props:e,name:"MuiPickersLayout"}),{toolbar:i,content:a,tabs:o,actionBar:s,shortcuts:d}=zje(n),{sx:b,className:L,isLandscape:B,wrapperVariant:V}=n,X=R4t(n);return Ke.jsxs(Bje,{ref:r,sx:b,className:Vo(X.root,L),ownerState:n,children:[B?d:i,B?i:d,Ke.jsx(Uje,{className:X.contentWrapper,children:V==="desktop"?Ke.jsxs(ze.Fragment,{children:[a,o]}):Ke.jsxs(ze.Fragment,{children:[o,a]})}),s]})}),k4t=["props","getOpenDialogAriaText"],I4t=["ownerState"],P4t=["ownerState"],h0e=t=>{let{props:e,getOpenDialogAriaText:r}=t,n=Ms(t,k4t);const{slots:i,slotProps:a,className:o,sx:s,format:d,formatDensity:b,enableAccessibleFieldDOMStructure:L,selectedSections:B,onSelectedSectionsChange:V,timezone:X,name:ie,label:de,inputRef:ae,readOnly:U,disabled:ve,autoFocus:Se,localeText:Pe,reduceAnimations:Me}=e,Ie=ze.useRef(null),Ve=ze.useRef(null),Ze=Vd(),Je=a?.toolbar?.hidden??!1,{open:nt,actions:ut,hasUIView:ht,layoutProps:_t,renderCurrentView:Dt,shouldRestoreFocus:qt,fieldProps:Lt,contextValue:dr,ownerState:Zt}=Nje(Mr({},n,{props:e,fieldRef:Ve,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"desktop"})),Cr=i.inputAdornment??PB,yt=Kd({elementType:Cr,externalSlotProps:a?.inputAdornment,additionalProps:{position:"end"},ownerState:e}),Vt=Ms(yt,I4t),Er=i.openPickerButton??Zf,sr=Kd({elementType:Er,externalSlotProps:a?.openPickerButton,additionalProps:{disabled:ve||U,onClick:nt?ut.onClose:ut.onOpen,"aria-label":r(Lt.value),edge:Vt.position},ownerState:e}),or=Ms(sr,P4t),Ar=i.openPickerIcon,Ir=Kd({elementType:Ar,externalSlotProps:a?.openPickerIcon,ownerState:Zt}),_n=i.field,Un=Kd({elementType:_n,externalSlotProps:a?.field,additionalProps:Mr({},Lt,Je&&{id:Ze},{readOnly:U,disabled:ve,className:o,sx:s,format:d,formatDensity:b,enableAccessibleFieldDOMStructure:L,selectedSections:B,onSelectedSectionsChange:V,timezone:X,label:de,name:ie,autoFocus:Se&&!e.open,focused:nt?!0:void 0},ae?{inputRef:ae}:{}),ownerState:e});ht&&(Un.InputProps=Mr({},Un.InputProps,{ref:Ie},!e.disableOpenPicker&&{[`${Vt.position}Adornment`]:Ke.jsx(Cr,Mr({},Vt,{children:Ke.jsx(Er,Mr({},or,{children:Ke.jsx(Ar,Mr({},Ir))}))}))}));const Qn=Mr({textField:i.textField,clearIcon:i.clearIcon,clearButton:i.clearButton},Un.slots),Jn=i.layout??Hje;let Vn=Ze;Je&&(de?Vn=`${Ze}-label`:Vn=void 0);const jn=Mr({},a,{toolbar:Mr({},a?.toolbar,{titleId:Ze}),popper:Mr({"aria-labelledby":Vn},a?.popper)}),Lr=id(Ve,Un.unstableFieldRef);return{renderPicker:()=>Ke.jsxs(bje,{contextValue:dr,localeText:Pe,children:[Ke.jsx(_n,Mr({},Un,{slots:Qn,slotProps:jn,unstableFieldRef:Lr})),Ke.jsx(f4t,Mr({role:"dialog",placement:"bottom-start",anchorEl:Ie.current},ut,{open:nt,slots:i,slotProps:jn,shouldRestoreFocus:qt,reduceAnimations:Me,children:Ke.jsx(Jn,Mr({},_t,jn?.layout,{slots:i,slotProps:jn,children:Dt()}))}))]})}},K3=({view:t,onViewChange:e,views:r,focusedView:n,onFocusedViewChange:i,value:a,defaultValue:o,referenceDate:s,onChange:d,className:b,classes:L,disableFuture:B,disablePast:V,minDate:X,maxDate:ie,shouldDisableDate:de,shouldDisableMonth:ae,shouldDisableYear:U,reduceAnimations:ve,onMonthChange:Se,monthsPerRow:Pe,onYearChange:Me,yearsOrder:Ie,yearsPerRow:Ve,slots:Ze,slotProps:Je,loading:nt,renderLoading:ut,disableHighlightToday:ht,readOnly:_t,disabled:Dt,showDaysOutsideCurrentMonth:qt,dayOfWeekFormatter:Lt,sx:dr,autoFocus:Zt,fixedWeekNumber:Cr,displayWeekNumber:yt,timezone:Vt})=>Ke.jsx(GPt,{view:t,onViewChange:e,views:r.filter(a8),focusedView:n&&a8(n)?n:null,onFocusedViewChange:i,value:a,defaultValue:o,referenceDate:s,onChange:d,className:b,classes:L,disableFuture:B,disablePast:V,minDate:X,maxDate:ie,shouldDisableDate:de,shouldDisableMonth:ae,shouldDisableYear:U,reduceAnimations:ve,onMonthChange:Se,monthsPerRow:Pe,onYearChange:Me,yearsOrder:Ie,yearsPerRow:Ve,slots:Ze,slotProps:Je,loading:nt,renderLoading:ut,disableHighlightToday:ht,readOnly:_t,disabled:Dt,showDaysOutsideCurrentMonth:qt,dayOfWeekFormatter:Lt,sx:dr,autoFocus:Zt,fixedWeekNumber:Cr,displayWeekNumber:yt,timezone:Vt}),jje=ze.forwardRef(function(e,r){const n=kb(),i=yp(),a=Oje(e,"MuiDesktopDatePicker"),o=Mr({day:K3,month:K3,year:K3},a.viewRenderers),s=Mr({},a,{viewRenderers:o,format:F9(i,a,!1),yearsPerRow:a.yearsPerRow??4,slots:Mr({openPickerIcon:rje,field:Cje},a.slots),slotProps:Mr({},a.slotProps,{field:b=>Mr({},Pk(a.slotProps?.field,b),iF(a),{ref:r}),toolbar:Mr({hidden:!0},a.slotProps?.toolbar)})}),{renderPicker:d}=h0e({props:s,valueManager:S1,valueType:"date",getOpenDialogAriaText:tF({utils:i,formatKey:"fullDate",contextTranslation:n.openDatePickerDialogue,propsTranslation:s.localeText?.openDatePickerDialogue}),validator:nF});return d()});jje.propTypes={autoFocus:cn.bool,className:cn.string,closeOnSelect:cn.bool,dayOfWeekFormatter:cn.func,defaultValue:cn.object,disabled:cn.bool,disableFuture:cn.bool,disableHighlightToday:cn.bool,disableOpenPicker:cn.bool,disablePast:cn.bool,displayWeekNumber:cn.bool,enableAccessibleFieldDOMStructure:cn.any,fixedWeekNumber:cn.number,format:cn.string,formatDensity:cn.oneOf(["dense","spacious"]),inputRef:L8,label:cn.node,loading:cn.bool,localeText:cn.object,maxDate:cn.object,minDate:cn.object,monthsPerRow:cn.oneOf([3,4]),name:cn.string,onAccept:cn.func,onChange:cn.func,onClose:cn.func,onError:cn.func,onMonthChange:cn.func,onOpen:cn.func,onSelectedSectionsChange:cn.func,onViewChange:cn.func,onYearChange:cn.func,open:cn.bool,openTo:cn.oneOf(["day","month","year"]),orientation:cn.oneOf(["landscape","portrait"]),readOnly:cn.bool,reduceAnimations:cn.bool,referenceDate:cn.object,renderLoading:cn.func,selectedSections:cn.oneOfType([cn.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),cn.number]),shouldDisableDate:cn.func,shouldDisableMonth:cn.func,shouldDisableYear:cn.func,showDaysOutsideCurrentMonth:cn.bool,slotProps:cn.object,slots:cn.object,sx:cn.oneOfType([cn.arrayOf(cn.oneOfType([cn.func,cn.object,cn.bool])),cn.func,cn.object]),timezone:cn.string,value:cn.object,view:cn.oneOf(["day","month","year"]),viewRenderers:cn.shape({day:cn.func,month:cn.func,year:cn.func}),views:cn.arrayOf(cn.oneOf(["day","month","year"]).isRequired),yearsOrder:cn.oneOf(["asc","desc"]),yearsPerRow:cn.oneOf([3,4])};const D4t=fa(iA)({[`& .${$z.container}`]:{outline:0},[`& .${$z.paper}`]:{outline:0,minWidth:dX}}),L4t=fa(aA)({"&:first-of-type":{padding:0}});function O4t(t){const{children:e,onDismiss:r,open:n,slots:i,slotProps:a}=t,o=i?.dialog??D4t,s=i?.mobileTransition??xL;return Ke.jsx(o,Mr({open:n,onClose:r},a?.dialog,{TransitionComponent:s,TransitionProps:a?.mobileTransition,PaperComponent:i?.mobilePaper,PaperProps:a?.mobilePaper,children:Ke.jsx(L4t,{children:e})}))}const N4t=["props","getOpenDialogAriaText"],p0e=t=>{let{props:e,getOpenDialogAriaText:r}=t,n=Ms(t,N4t);const{slots:i,slotProps:a,className:o,sx:s,format:d,formatDensity:b,enableAccessibleFieldDOMStructure:L,selectedSections:B,onSelectedSectionsChange:V,timezone:X,name:ie,label:de,inputRef:ae,readOnly:U,disabled:ve,localeText:Se}=e,Pe=ze.useRef(null),Me=Vd(),Ie=a?.toolbar?.hidden??!1,{open:Ve,actions:Ze,layoutProps:Je,renderCurrentView:nt,fieldProps:ut,contextValue:ht}=Nje(Mr({},n,{props:e,fieldRef:Pe,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"mobile"})),_t=i.field,Dt=Kd({elementType:_t,externalSlotProps:a?.field,additionalProps:Mr({},ut,Ie&&{id:Me},!(ve||U)&&{onClick:Ze.onOpen,onKeyDown:WRt(Ze.onOpen)},{readOnly:U??!0,disabled:ve,className:o,sx:s,format:d,formatDensity:b,enableAccessibleFieldDOMStructure:L,selectedSections:B,onSelectedSectionsChange:V,timezone:X,label:de,name:ie},ae?{inputRef:ae}:{}),ownerState:e});Dt.inputProps=Mr({},Dt.inputProps,{"aria-label":r(ut.value)});const qt=Mr({textField:i.textField},Dt.slots),Lt=i.layout??Hje;let dr=Me;Ie&&(de?dr=`${Me}-label`:dr=void 0);const Zt=Mr({},a,{toolbar:Mr({},a?.toolbar,{titleId:Me}),mobilePaper:Mr({"aria-labelledby":dr},a?.mobilePaper)}),Cr=id(Pe,Dt.unstableFieldRef);return{renderPicker:()=>Ke.jsxs(bje,{contextValue:ht,localeText:Se,children:[Ke.jsx(_t,Mr({},Dt,{slots:qt,slotProps:Zt,unstableFieldRef:Cr})),Ke.jsx(O4t,Mr({},Ze,{open:Ve,slots:i,slotProps:Zt,children:Ke.jsx(Lt,Mr({},Je,Zt?.layout,{slots:i,slotProps:Zt,children:nt()}))}))]})}},Vje=ze.forwardRef(function(e,r){const n=kb(),i=yp(),a=Oje(e,"MuiMobileDatePicker"),o=Mr({day:K3,month:K3,year:K3},a.viewRenderers),s=Mr({},a,{viewRenderers:o,format:F9(i,a,!1),slots:Mr({field:Cje},a.slots),slotProps:Mr({},a.slotProps,{field:b=>Mr({},Pk(a.slotProps?.field,b),iF(a),{ref:r}),toolbar:Mr({hidden:!1},a.slotProps?.toolbar)})}),{renderPicker:d}=p0e({props:s,valueManager:S1,valueType:"date",getOpenDialogAriaText:tF({utils:i,formatKey:"fullDate",contextTranslation:n.openDatePickerDialogue,propsTranslation:s.localeText?.openDatePickerDialogue}),validator:nF});return d()});Vje.propTypes={autoFocus:cn.bool,className:cn.string,closeOnSelect:cn.bool,dayOfWeekFormatter:cn.func,defaultValue:cn.object,disabled:cn.bool,disableFuture:cn.bool,disableHighlightToday:cn.bool,disableOpenPicker:cn.bool,disablePast:cn.bool,displayWeekNumber:cn.bool,enableAccessibleFieldDOMStructure:cn.any,fixedWeekNumber:cn.number,format:cn.string,formatDensity:cn.oneOf(["dense","spacious"]),inputRef:L8,label:cn.node,loading:cn.bool,localeText:cn.object,maxDate:cn.object,minDate:cn.object,monthsPerRow:cn.oneOf([3,4]),name:cn.string,onAccept:cn.func,onChange:cn.func,onClose:cn.func,onError:cn.func,onMonthChange:cn.func,onOpen:cn.func,onSelectedSectionsChange:cn.func,onViewChange:cn.func,onYearChange:cn.func,open:cn.bool,openTo:cn.oneOf(["day","month","year"]),orientation:cn.oneOf(["landscape","portrait"]),readOnly:cn.bool,reduceAnimations:cn.bool,referenceDate:cn.object,renderLoading:cn.func,selectedSections:cn.oneOfType([cn.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),cn.number]),shouldDisableDate:cn.func,shouldDisableMonth:cn.func,shouldDisableYear:cn.func,showDaysOutsideCurrentMonth:cn.bool,slotProps:cn.object,slots:cn.object,sx:cn.oneOfType([cn.arrayOf(cn.oneOfType([cn.func,cn.object,cn.bool])),cn.func,cn.object]),timezone:cn.string,value:cn.object,view:cn.oneOf(["day","month","year"]),viewRenderers:cn.shape({day:cn.func,month:cn.func,year:cn.func}),views:cn.arrayOf(cn.oneOf(["day","month","year"]).isRequired),yearsOrder:cn.oneOf(["asc","desc"]),yearsPerRow:cn.oneOf([3,4])};const F4t=["desktopModeMediaQuery"],z4t=ze.forwardRef(function(e,r){const n=yh({props:e,name:"MuiDatePicker"}),{desktopModeMediaQuery:i=i0e}=n,a=Ms(n,F4t);return IY(i,{defaultMatches:!0})?Ke.jsx(jje,Mr({ref:r},a)):Ke.jsx(Vje,Mr({ref:r},a))});function B4t(t){return Al("MuiPickersToolbarText",t)}const tpe=Ml("MuiPickersToolbarText",["root","selected"]),U4t=["className","selected","value"],H4t=t=>{const{classes:e,selected:r}=t;return Cs({root:["root",r&&"selected"]},B4t,e)},j4t=fa(Su,{name:"MuiPickersToolbarText",slot:"Root",overridesResolver:(t,e)=>[e.root,{[`&.${tpe.selected}`]:e.selected}]})(({theme:t})=>({transition:t.transitions.create("color"),color:(t.vars||t).palette.text.secondary,[`&.${tpe.selected}`]:{color:(t.vars||t).palette.text.primary}})),v0e=ze.forwardRef(function(e,r){const n=yh({props:e,name:"MuiPickersToolbarText"}),{className:i,value:a}=n,o=Ms(n,U4t),s=H4t(n);return Ke.jsx(j4t,Mr({ref:r,className:Vo(s.root,i),component:"span"},o,{children:a}))}),V4t=["align","className","selected","typographyClassName","value","variant","width"],q4t=t=>{const{classes:e}=t;return Cs({root:["root"]},Lje,e)},G4t=fa(Id,{name:"MuiPickersToolbarButton",slot:"Root",overridesResolver:(t,e)=>e.root})({padding:0,minWidth:16,textTransform:"none"}),XT=ze.forwardRef(function(e,r){const n=yh({props:e,name:"MuiPickersToolbarButton"}),{align:i,className:a,selected:o,typographyClassName:s,value:d,variant:b,width:L}=n,B=Ms(n,V4t),V=q4t(n);return Ke.jsx(G4t,Mr({variant:"text",ref:r,className:Vo(V.root,a)},L?{sx:{width:L}}:{},B,{children:Ke.jsx(v0e,{align:i,className:s,variant:b,value:d,selected:o})}))});function $4t(t){return Al("MuiTimePickerToolbar",t)}const Jz=Ml("MuiTimePickerToolbar",["root","separator","hourMinuteLabel","hourMinuteLabelLandscape","hourMinuteLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]),W4t=["ampm","ampmInClock","value","isLandscape","onChange","view","onViewChange","views","disabled","readOnly","className"],Y4t=t=>{const{isLandscape:e,classes:r,isRtl:n}=t;return Cs({root:["root"],separator:["separator"],hourMinuteLabel:["hourMinuteLabel",e&&"hourMinuteLabelLandscape",n&&"hourMinuteLabelReverse"],ampmSelection:["ampmSelection",e&&"ampmLandscape"],ampmLabel:["ampmLabel"]},$4t,r)},X4t=fa(d0e,{name:"MuiTimePickerToolbar",slot:"Root",overridesResolver:(t,e)=>e.root})({}),Z4t=fa(v0e,{name:"MuiTimePickerToolbar",slot:"Separator",overridesResolver:(t,e)=>e.separator})({outline:0,margin:"0 4px 0 2px",cursor:"default"}),K4t=fa("div",{name:"MuiTimePickerToolbar",slot:"HourMinuteLabel",overridesResolver:(t,e)=>[{[`&.${Jz.hourMinuteLabelLandscape}`]:e.hourMinuteLabelLandscape,[`&.${Jz.hourMinuteLabelReverse}`]:e.hourMinuteLabelReverse},e.hourMinuteLabel]})({display:"flex",justifyContent:"flex-end",alignItems:"flex-end",variants:[{props:{isRtl:!0},style:{flexDirection:"row-reverse"}},{props:{isLandscape:!0},style:{marginTop:"auto"}}]}),J4t=fa("div",{name:"MuiTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(t,e)=>[{[`.${Jz.ampmLabel}`]:e.ampmLabel},{[`&.${Jz.ampmLandscape}`]:e.ampmLandscape},e.ampmSelection]})({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12,[`& .${Jz.ampmLabel}`]:{fontSize:17},variants:[{props:{isLandscape:!0},style:{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",flexBasis:"100%"}}]});function Q4t(t){const e=yh({props:t,name:"MuiTimePickerToolbar"}),{ampm:r,ampmInClock:n,value:i,isLandscape:a,onChange:o,view:s,onViewChange:d,views:b,disabled:L,readOnly:B,className:V}=e,X=Ms(e,W4t),ie=yp(),de=kb(),ae=Kv(),U=!!(r&&!n&&b.includes("hours")),{meridiemMode:ve,handleMeridiemChange:Se}=cX(i,r,o),Pe=Ze=>r?ie.format(Ze,"hours12h"):ie.format(Ze,"hours24h"),Me=Mr({},e,{isRtl:ae}),Ie=Y4t(Me),Ve=Ke.jsx(Z4t,{tabIndex:-1,value:":",variant:"h3",selected:!1,className:Ie.separator});return Ke.jsxs(X4t,Mr({landscapeDirection:"row",toolbarTitle:de.timePickerToolbarTitle,isLandscape:a,ownerState:Me,className:Vo(Ie.root,V)},X,{children:[Ke.jsxs(K4t,{className:Ie.hourMinuteLabel,ownerState:Me,children:[vN(b,"hours")&&Ke.jsx(XT,{tabIndex:-1,variant:"h3",onClick:()=>d("hours"),selected:s==="hours",value:i?Pe(i):"--"}),vN(b,["hours","minutes"])&&Ve,vN(b,"minutes")&&Ke.jsx(XT,{tabIndex:-1,variant:"h3",onClick:()=>d("minutes"),selected:s==="minutes",value:i?ie.format(i,"minutes"):"--"}),vN(b,["minutes","seconds"])&&Ve,vN(b,"seconds")&&Ke.jsx(XT,{variant:"h3",onClick:()=>d("seconds"),selected:s==="seconds",value:i?ie.format(i,"seconds"):"--"})]}),U&&Ke.jsxs(J4t,{className:Ie.ampmSelection,ownerState:Me,children:[Ke.jsx(XT,{disableRipple:!0,variant:"subtitle2",selected:ve==="am",typographyClassName:Ie.ampmLabel,value:FC(ie,"am"),onClick:B?void 0:()=>Se("am"),disabled:L}),Ke.jsx(XT,{disableRipple:!0,variant:"subtitle2",selected:ve==="pm",typographyClassName:Ie.ampmLabel,value:FC(ie,"pm"),onClick:B?void 0:()=>Se("pm"),disabled:L})]})]}))}function qje(t,e){const r=yp(),n=yh({props:t,name:e}),i=n.ampm??r.is12HourCycleInCurrentLocale(),a=ze.useMemo(()=>n.localeText?.toolbarTitle==null?n.localeText:Mr({},n.localeText,{timePickerToolbarTitle:n.localeText.toolbarTitle}),[n.localeText]);return Mr({},n,{ampm:i,localeText:a},Zge({views:n.views,openTo:n.openTo,defaultViews:["hours","minutes"],defaultOpenTo:"hours"}),{disableFuture:n.disableFuture??!1,disablePast:n.disablePast??!1,slots:Mr({toolbar:Q4t},n.slots),slotProps:Mr({},n.slotProps,{toolbar:Mr({ampm:i,ampmInClock:n.ampmInClock},n.slotProps?.toolbar)})})}const BN=({view:t,onViewChange:e,focusedView:r,onFocusedViewChange:n,views:i,value:a,defaultValue:o,referenceDate:s,onChange:d,className:b,classes:L,disableFuture:B,disablePast:V,minTime:X,maxTime:ie,shouldDisableTime:de,minutesStep:ae,ampm:U,ampmInClock:ve,slots:Se,slotProps:Pe,readOnly:Me,disabled:Ie,sx:Ve,autoFocus:Ze,showViewSwitcher:Je,disableIgnoringDatePartForTimeValidation:nt,timezone:ut})=>Ke.jsx(qRt,{view:t,onViewChange:e,focusedView:r&&n8(r)?r:null,onFocusedViewChange:n,views:i.filter(n8),value:a,defaultValue:o,referenceDate:s,onChange:d,className:b,classes:L,disableFuture:B,disablePast:V,minTime:X,maxTime:ie,shouldDisableTime:de,minutesStep:ae,ampm:U,ampmInClock:ve,slots:Se,slotProps:Pe,readOnly:Me,disabled:Ie,sx:Ve,autoFocus:Ze,showViewSwitcher:Je,disableIgnoringDatePartForTimeValidation:nt,timezone:ut}),Gje=({view:t,onViewChange:e,focusedView:r,onFocusedViewChange:n,views:i,value:a,defaultValue:o,referenceDate:s,onChange:d,className:b,classes:L,disableFuture:B,disablePast:V,minTime:X,maxTime:ie,shouldDisableTime:de,minutesStep:ae,ampm:U,slots:ve,slotProps:Se,readOnly:Pe,disabled:Me,sx:Ie,autoFocus:Ve,disableIgnoringDatePartForTimeValidation:Ze,timeSteps:Je,skipDisabled:nt,timezone:ut})=>Ke.jsx(QRt,{view:t,onViewChange:e,focusedView:r,onFocusedViewChange:n,views:i.filter(n8),value:a,defaultValue:o,referenceDate:s,onChange:d,className:b,classes:L,disableFuture:B,disablePast:V,minTime:X,maxTime:ie,shouldDisableTime:de,minutesStep:ae,ampm:U,slots:ve,slotProps:Se,readOnly:Pe,disabled:Me,sx:Ie,autoFocus:Ve,disableIgnoringDatePartForTimeValidation:Ze,timeStep:Je?.minutes,skipDisabled:nt,timezone:ut}),v$=({view:t,onViewChange:e,focusedView:r,onFocusedViewChange:n,views:i,value:a,defaultValue:o,referenceDate:s,onChange:d,className:b,classes:L,disableFuture:B,disablePast:V,minTime:X,maxTime:ie,shouldDisableTime:de,minutesStep:ae,ampm:U,slots:ve,slotProps:Se,readOnly:Pe,disabled:Me,sx:Ie,autoFocus:Ve,disableIgnoringDatePartForTimeValidation:Ze,timeSteps:Je,skipDisabled:nt,timezone:ut})=>Ke.jsx(dkt,{view:t,onViewChange:e,focusedView:r,onFocusedViewChange:n,views:i.filter(n8),value:a,defaultValue:o,referenceDate:s,onChange:d,className:b,classes:L,disableFuture:B,disablePast:V,minTime:X,maxTime:ie,shouldDisableTime:de,minutesStep:ae,ampm:U,slots:ve,slotProps:Se,readOnly:Pe,disabled:Me,sx:Ie,autoFocus:Ve,disableIgnoringDatePartForTimeValidation:Ze,timeSteps:Je,skipDisabled:nt,timezone:ut}),eDt=["views","format"],$je=(t,e,r)=>{let{views:n,format:i}=e,a=Ms(e,eDt);if(i)return i;const o=[],s=[];if(n.forEach(L=>{n8(L)?s.push(L):a8(L)&&o.push(L)}),s.length===0)return F9(t,Mr({views:o},a),!1);if(o.length===0)return d$(t,Mr({views:s},a));const d=d$(t,Mr({views:s},a));return`${F9(t,Mr({views:o},a),!1)} ${d}`},tDt=(t,e,r)=>r?e.filter(n=>!Pz(n)||n==="hours"):t?[...e,"meridiem"]:e,rDt=(t,e)=>1440/((t.hours??1)*(t.minutes??5))<=e;function Wje({thresholdToRenderTimeInASingleColumn:t,ampm:e,timeSteps:r,views:n}){const i=t??24,a=Mr({hours:1,minutes:5,seconds:5},r),o=rDt(a,i);return{thresholdToRenderTimeInASingleColumn:i,timeSteps:a,shouldRenderTimeInASingleColumn:o,views:tDt(e,n,o)}}const Yje=ze.forwardRef(function(e,r){const n=kb(),i=yp(),a=qje(e,"MuiDesktopTimePicker"),{shouldRenderTimeInASingleColumn:o,views:s,timeSteps:d}=Wje(a),b=o?Gje:v$,L=Mr({hours:b,minutes:b,seconds:b,meridiem:b},a.viewRenderers),B=a.ampmInClock??!0,V=o?[]:["accept"],ie=L.hours?.name===v$.name?s:s.filter(U=>U!=="meridiem"),de=Mr({},a,{ampmInClock:B,timeSteps:d,viewRenderers:L,format:d$(i,a),views:o?["hours"]:ie,slots:Mr({field:Mje,openPickerIcon:R5t},a.slots),slotProps:Mr({},a.slotProps,{field:U=>Mr({},Pk(a.slotProps?.field,U),iF(a),{ref:r}),toolbar:Mr({hidden:!0,ampmInClock:B},a.slotProps?.toolbar),actionBar:Mr({actions:V},a.slotProps?.actionBar)})}),{renderPicker:ae}=h0e({props:de,valueManager:S1,valueType:"time",getOpenDialogAriaText:tF({utils:i,formatKey:"fullTime",contextTranslation:n.openTimePickerDialogue,propsTranslation:de.localeText?.openTimePickerDialogue}),validator:QB});return ae()});Yje.propTypes={ampm:cn.bool,ampmInClock:cn.bool,autoFocus:cn.bool,className:cn.string,closeOnSelect:cn.bool,defaultValue:cn.object,disabled:cn.bool,disableFuture:cn.bool,disableIgnoringDatePartForTimeValidation:cn.bool,disableOpenPicker:cn.bool,disablePast:cn.bool,enableAccessibleFieldDOMStructure:cn.any,format:cn.string,formatDensity:cn.oneOf(["dense","spacious"]),inputRef:L8,label:cn.node,localeText:cn.object,maxTime:cn.object,minTime:cn.object,minutesStep:cn.number,name:cn.string,onAccept:cn.func,onChange:cn.func,onClose:cn.func,onError:cn.func,onOpen:cn.func,onSelectedSectionsChange:cn.func,onViewChange:cn.func,open:cn.bool,openTo:cn.oneOf(["hours","meridiem","minutes","seconds"]),orientation:cn.oneOf(["landscape","portrait"]),readOnly:cn.bool,reduceAnimations:cn.bool,referenceDate:cn.object,selectedSections:cn.oneOfType([cn.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),cn.number]),shouldDisableTime:cn.func,skipDisabled:cn.bool,slotProps:cn.object,slots:cn.object,sx:cn.oneOfType([cn.arrayOf(cn.oneOfType([cn.func,cn.object,cn.bool])),cn.func,cn.object]),thresholdToRenderTimeInASingleColumn:cn.number,timeSteps:cn.shape({hours:cn.number,minutes:cn.number,seconds:cn.number}),timezone:cn.string,value:cn.object,view:cn.oneOf(["hours","meridiem","minutes","seconds"]),viewRenderers:cn.shape({hours:cn.func,meridiem:cn.func,minutes:cn.func,seconds:cn.func}),views:cn.arrayOf(cn.oneOf(["hours","minutes","seconds"]).isRequired)};const Xje=ze.forwardRef(function(e,r){const n=kb(),i=yp(),a=qje(e,"MuiMobileTimePicker"),o=Mr({hours:BN,minutes:BN,seconds:BN},a.viewRenderers),s=a.ampmInClock??!1,d=Mr({},a,{ampmInClock:s,viewRenderers:o,format:d$(i,a),slots:Mr({field:Mje},a.slots),slotProps:Mr({},a.slotProps,{field:L=>Mr({},Pk(a.slotProps?.field,L),iF(a),{ref:r}),toolbar:Mr({hidden:!1,ampmInClock:s},a.slotProps?.toolbar)})}),{renderPicker:b}=p0e({props:d,valueManager:S1,valueType:"time",getOpenDialogAriaText:tF({utils:i,formatKey:"fullTime",contextTranslation:n.openTimePickerDialogue,propsTranslation:d.localeText?.openTimePickerDialogue}),validator:QB});return b()});Xje.propTypes={ampm:cn.bool,ampmInClock:cn.bool,autoFocus:cn.bool,className:cn.string,closeOnSelect:cn.bool,defaultValue:cn.object,disabled:cn.bool,disableFuture:cn.bool,disableIgnoringDatePartForTimeValidation:cn.bool,disableOpenPicker:cn.bool,disablePast:cn.bool,enableAccessibleFieldDOMStructure:cn.any,format:cn.string,formatDensity:cn.oneOf(["dense","spacious"]),inputRef:L8,label:cn.node,localeText:cn.object,maxTime:cn.object,minTime:cn.object,minutesStep:cn.number,name:cn.string,onAccept:cn.func,onChange:cn.func,onClose:cn.func,onError:cn.func,onOpen:cn.func,onSelectedSectionsChange:cn.func,onViewChange:cn.func,open:cn.bool,openTo:cn.oneOf(["hours","minutes","seconds"]),orientation:cn.oneOf(["landscape","portrait"]),readOnly:cn.bool,reduceAnimations:cn.bool,referenceDate:cn.object,selectedSections:cn.oneOfType([cn.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),cn.number]),shouldDisableTime:cn.func,slotProps:cn.object,slots:cn.object,sx:cn.oneOfType([cn.arrayOf(cn.oneOfType([cn.func,cn.object,cn.bool])),cn.func,cn.object]),timezone:cn.string,value:cn.object,view:cn.oneOf(["hours","minutes","seconds"]),viewRenderers:cn.shape({hours:cn.func,minutes:cn.func,seconds:cn.func}),views:cn.arrayOf(cn.oneOf(["hours","minutes","seconds"]).isRequired)};const nDt=["desktopModeMediaQuery"],iDt=ze.forwardRef(function(e,r){const n=yh({props:e,name:"MuiTimePicker"}),{desktopModeMediaQuery:i=i0e}=n,a=Ms(n,nDt);return IY(i,{defaultMatches:!0})?Ke.jsx(Yje,Mr({ref:r},a)):Ke.jsx(Xje,Mr({ref:r},a))});function aDt(t){return Al("MuiDateTimePickerTabs",t)}Ml("MuiDateTimePickerTabs",["root"]);const oDt=t=>a8(t)?"date":"time",sDt=t=>t==="date"?"day":"hours",lDt=t=>{const{classes:e}=t;return Cs({root:["root"]},aDt,e)},uDt=fa(LB,{name:"MuiDateTimePickerTabs",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>({boxShadow:`0 -1px 0 0 inset ${(t.vars||t).palette.divider}`,"&:last-child":{boxShadow:`0 1px 0 0 inset ${(t.vars||t).palette.divider}`,[`& .${nG.indicator}`]:{bottom:"auto",top:0}}})),cDt=function(e){const r=yh({props:e,name:"MuiDateTimePickerTabs"}),{dateIcon:n=Ke.jsx(k5t,{}),onViewChange:i,timeIcon:a=Ke.jsx(I5t,{}),view:o,hidden:s=typeof window>"u"||window.innerHeight<667,className:d,sx:b}=r,L=kb(),B=lDt(r),V=(X,ie)=>{i(sDt(ie))};return s?null:Ke.jsxs(uDt,{ownerState:r,variant:"fullWidth",value:oDt(o),onChange:V,className:Vo(d,B.root),sx:b,children:[Ke.jsx(QN,{value:"date","aria-label":L.dateTableLabel,icon:Ke.jsx(ze.Fragment,{children:n})}),Ke.jsx(QN,{value:"time","aria-label":L.timeTableLabel,icon:Ke.jsx(ze.Fragment,{children:a})})]})};function fDt(t){return Al("MuiDateTimePickerToolbar",t)}const Nie=Ml("MuiDateTimePickerToolbar",["root","dateContainer","timeContainer","timeDigitsContainer","separator","timeLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]),dDt=["ampm","ampmInClock","value","onChange","view","isLandscape","onViewChange","toolbarFormat","toolbarPlaceholder","views","disabled","readOnly","toolbarVariant","toolbarTitle","className"],hDt=t=>{const{classes:e,isLandscape:r,isRtl:n}=t;return Cs({root:["root"],dateContainer:["dateContainer"],timeContainer:["timeContainer",n&&"timeLabelReverse"],timeDigitsContainer:["timeDigitsContainer",n&&"timeLabelReverse"],separator:["separator"],ampmSelection:["ampmSelection",r&&"ampmLandscape"],ampmLabel:["ampmLabel"]},fDt,e)},pDt=fa(d0e,{name:"MuiDateTimePickerToolbar",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>({paddingLeft:16,paddingRight:16,justifyContent:"space-around",position:"relative",variants:[{props:{toolbarVariant:"desktop"},style:{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,[`& .${$Pt.content} .${tpe.selected}`]:{color:(t.vars||t).palette.primary.main,fontWeight:t.typography.fontWeightBold}}},{props:{toolbarVariant:"desktop",isLandscape:!0},style:{borderRight:`1px solid ${(t.vars||t).palette.divider}`}},{props:{toolbarVariant:"desktop",isLandscape:!1},style:{paddingLeft:24,paddingRight:0}}]})),vDt=fa("div",{name:"MuiDateTimePickerToolbar",slot:"DateContainer",overridesResolver:(t,e)=>e.dateContainer})({display:"flex",flexDirection:"column",alignItems:"flex-start"}),mDt=fa("div",{name:"MuiDateTimePickerToolbar",slot:"TimeContainer",overridesResolver:(t,e)=>e.timeContainer})({display:"flex",flexDirection:"row",variants:[{props:{isRtl:!0},style:{flexDirection:"row-reverse"}},{props:{toolbarVariant:"desktop",isLandscape:!1},style:{gap:9,marginRight:4,alignSelf:"flex-end"}},{props:({isLandscape:t,toolbarVariant:e})=>t&&e!=="desktop",style:{flexDirection:"column"}},{props:({isLandscape:t,toolbarVariant:e,isRtl:r})=>t&&e!=="desktop"&&r,style:{flexDirection:"column-reverse"}}]}),gDt=fa("div",{name:"MuiDateTimePickerToolbar",slot:"TimeDigitsContainer",overridesResolver:(t,e)=>e.timeDigitsContainer})({display:"flex",variants:[{props:{isRtl:!0},style:{flexDirection:"row-reverse"}},{props:{toolbarVariant:"desktop"},style:{gap:1.5}}]}),J5e=fa(v0e,{name:"MuiDateTimePickerToolbar",slot:"Separator",overridesResolver:(t,e)=>e.separator})({margin:"0 4px 0 2px",cursor:"default",variants:[{props:{toolbarVariant:"desktop"},style:{margin:0}}]}),yDt=fa("div",{name:"MuiDateTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(t,e)=>[{[`.${Nie.ampmLabel}`]:e.ampmLabel},{[`&.${Nie.ampmLandscape}`]:e.ampmLandscape},e.ampmSelection]})({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12,[`& .${Nie.ampmLabel}`]:{fontSize:17},variants:[{props:{isLandscape:!0},style:{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",width:"100%"}}]});function bDt(t){const e=yh({props:t,name:"MuiDateTimePickerToolbar"}),{ampm:r,ampmInClock:n,value:i,onChange:a,view:o,isLandscape:s,onViewChange:d,toolbarFormat:b,toolbarPlaceholder:L="––",views:B,disabled:V,readOnly:X,toolbarVariant:ie="mobile",toolbarTitle:de,className:ae}=e,U=Ms(e,dDt),ve=Kv(),Se=Mr({},e,{isRtl:ve}),Pe=yp(),{meridiemMode:Me,handleMeridiemChange:Ie}=cX(i,r,a),Ve=!!(r&&!n),Ze=ie==="desktop",Je=kb(),nt=hDt(Se),ut=de??Je.dateTimePickerToolbarTitle,ht=Dt=>r?Pe.format(Dt,"hours12h"):Pe.format(Dt,"hours24h"),_t=ze.useMemo(()=>i?b?Pe.formatByString(i,b):Pe.format(i,"shortDate"):L,[i,b,L,Pe]);return Ke.jsxs(pDt,Mr({isLandscape:s,className:Vo(nt.root,ae),toolbarTitle:ut},U,{ownerState:Se,children:[Ke.jsxs(vDt,{className:nt.dateContainer,ownerState:Se,children:[B.includes("year")&&Ke.jsx(XT,{tabIndex:-1,variant:"subtitle1",onClick:()=>d("year"),selected:o==="year",value:i?Pe.format(i,"year"):"–"}),B.includes("day")&&Ke.jsx(XT,{tabIndex:-1,variant:Ze?"h5":"h4",onClick:()=>d("day"),selected:o==="day",value:_t})]}),Ke.jsxs(mDt,{className:nt.timeContainer,ownerState:Se,children:[Ke.jsxs(gDt,{className:nt.timeDigitsContainer,ownerState:Se,children:[B.includes("hours")&&Ke.jsxs(ze.Fragment,{children:[Ke.jsx(XT,{variant:Ze?"h5":"h3",width:Ze&&!s?Dz:void 0,onClick:()=>d("hours"),selected:o==="hours",value:i?ht(i):"--"}),Ke.jsx(J5e,{variant:Ze?"h5":"h3",value:":",className:nt.separator,ownerState:Se}),Ke.jsx(XT,{variant:Ze?"h5":"h3",width:Ze&&!s?Dz:void 0,onClick:()=>d("minutes"),selected:o==="minutes"||!B.includes("minutes")&&o==="hours",value:i?Pe.format(i,"minutes"):"--",disabled:!B.includes("minutes")})]}),B.includes("seconds")&&Ke.jsxs(ze.Fragment,{children:[Ke.jsx(J5e,{variant:Ze?"h5":"h3",value:":",className:nt.separator,ownerState:Se}),Ke.jsx(XT,{variant:Ze?"h5":"h3",width:Ze&&!s?Dz:void 0,onClick:()=>d("seconds"),selected:o==="seconds",value:i?Pe.format(i,"seconds"):"--"})]})]}),Ve&&!Ze&&Ke.jsxs(yDt,{className:nt.ampmSelection,ownerState:Se,children:[Ke.jsx(XT,{variant:"subtitle2",selected:Me==="am",typographyClassName:nt.ampmLabel,value:FC(Pe,"am"),onClick:X?void 0:()=>Ie("am"),disabled:V}),Ke.jsx(XT,{variant:"subtitle2",selected:Me==="pm",typographyClassName:nt.ampmLabel,value:FC(Pe,"pm"),onClick:X?void 0:()=>Ie("pm"),disabled:V})]}),r&&Ze&&Ke.jsx(XT,{variant:"h5",onClick:()=>d("meridiem"),selected:o==="meridiem",value:i&&Me?FC(Pe,Me):"--",width:Dz})]})]}))}function Zje(t,e){const r=yp(),n=YL(),i=yh({props:t,name:e}),a=i.ampm??r.is12HourCycleInCurrentLocale(),o=ze.useMemo(()=>i.localeText?.toolbarTitle==null?i.localeText:Mr({},i.localeText,{dateTimePickerToolbarTitle:i.localeText.toolbarTitle}),[i.localeText]);return Mr({},i,Zge({views:i.views,openTo:i.openTo,defaultViews:["year","day","hours","minutes"],defaultOpenTo:"day"}),{ampm:a,localeText:o,orientation:i.orientation??"portrait",disableIgnoringDatePartForTimeValidation:i.disableIgnoringDatePartForTimeValidation??!!(i.minDateTime||i.maxDateTime||i.disablePast||i.disableFuture),disableFuture:i.disableFuture??!1,disablePast:i.disablePast??!1,minDate:Gw(r,i.minDateTime??i.minDate,n.minDate),maxDate:Gw(r,i.maxDateTime??i.maxDate,n.maxDate),minTime:i.minDateTime??i.minTime,maxTime:i.maxDateTime??i.maxTime,slots:Mr({toolbar:bDt,tabs:cDt},i.slots),slotProps:Mr({},i.slotProps,{toolbar:Mr({ampm:a},i.slotProps?.toolbar)})})}const xDt=ze.forwardRef(function(e,r){const n=Kv(),{toolbar:i,tabs:a,content:o,actionBar:s,shortcuts:d}=zje(e),{sx:b,className:L,isLandscape:B,classes:V}=e,X=s&&(s.props.actions?.length??0)>0,ie=Mr({},e,{isRtl:n});return Ke.jsxs(Bje,{ref:r,className:Vo(MC.root,V?.root,L),sx:[{[`& .${MC.tabs}`]:{gridRow:4,gridColumn:"1 / 4"},[`& .${MC.actionBar}`]:{gridRow:5}},...Array.isArray(b)?b:[b]],ownerState:ie,children:[B?d:i,B?i:d,Ke.jsxs(Uje,{className:Vo(MC.contentWrapper,V?.contentWrapper),sx:{display:"grid"},children:[o,a,X&&Ke.jsx(oA,{sx:{gridRow:3,gridColumn:"1 / 4"}})]}),s]})}),_Dt=["openTo","focusedView","timeViewsCount"],wDt=function(e,r,n){const{openTo:i,focusedView:a,timeViewsCount:o}=n,s=Ms(n,_Dt),d=Mr({},s,{autoFocus:!1,focusedView:null,sx:[{[`&.${G5e.root}`]:{borderBottom:0},[`&.${G5e.root}, .${rkt.root}, &.${$Rt.root}`]:{maxHeight:hX}}]}),b=Pz(r);return Ke.jsxs(ze.Fragment,{children:[e[b?"day":r]?.(Mr({},n,{view:b?"day":r,focusedView:a&&a8(a)?a:null,views:n.views.filter(a8),sx:[{gridColumn:1},...d.sx]})),o>0&&Ke.jsxs(ze.Fragment,{children:[Ke.jsx(oA,{orientation:"vertical",sx:{gridColumn:2}}),e[b?r:"hours"]?.(Mr({},d,{view:b?r:"hours",focusedView:a&&Pz(a)?a:null,openTo:Pz(i)?i:"hours",views:n.views.filter(Pz),sx:[{gridColumn:3},...d.sx]}))]})]})},Kje=ze.forwardRef(function(e,r){const n=kb(),i=yp(),a=Zje(e,"MuiDesktopDateTimePicker"),{shouldRenderTimeInASingleColumn:o,thresholdToRenderTimeInASingleColumn:s,views:d,timeSteps:b}=Wje(a),L=o?Gje:v$,B=Mr({day:K3,month:K3,year:K3,hours:L,minutes:L,seconds:L,meridiem:L},a.viewRenderers),V=a.ampmInClock??!0,ie=B.hours?.name===v$.name?d:d.filter(ve=>ve!=="meridiem"),de=o?[]:["accept"],ae=Mr({},a,{viewRenderers:B,format:$je(i,a),views:ie,yearsPerRow:a.yearsPerRow??4,ampmInClock:V,timeSteps:b,thresholdToRenderTimeInASingleColumn:s,shouldRenderTimeInASingleColumn:o,slots:Mr({field:Rje,layout:xDt,openPickerIcon:rje},a.slots),slotProps:Mr({},a.slotProps,{field:ve=>Mr({},Pk(a.slotProps?.field,ve),iF(a),{ref:r}),toolbar:Mr({hidden:!0,ampmInClock:V,toolbarVariant:"desktop"},a.slotProps?.toolbar),tabs:Mr({hidden:!0},a.slotProps?.tabs),actionBar:ve=>Mr({actions:de},Pk(a.slotProps?.actionBar,ve))})}),{renderPicker:U}=h0e({props:ae,valueManager:S1,valueType:"date-time",getOpenDialogAriaText:tF({utils:i,formatKey:"fullDate",contextTranslation:n.openDatePickerDialogue,propsTranslation:ae.localeText?.openDatePickerDialogue}),validator:mX,rendererInterceptor:wDt});return U()});Kje.propTypes={ampm:cn.bool,ampmInClock:cn.bool,autoFocus:cn.bool,className:cn.string,closeOnSelect:cn.bool,dayOfWeekFormatter:cn.func,defaultValue:cn.object,disabled:cn.bool,disableFuture:cn.bool,disableHighlightToday:cn.bool,disableIgnoringDatePartForTimeValidation:cn.bool,disableOpenPicker:cn.bool,disablePast:cn.bool,displayWeekNumber:cn.bool,enableAccessibleFieldDOMStructure:cn.any,fixedWeekNumber:cn.number,format:cn.string,formatDensity:cn.oneOf(["dense","spacious"]),inputRef:L8,label:cn.node,loading:cn.bool,localeText:cn.object,maxDate:cn.object,maxDateTime:cn.object,maxTime:cn.object,minDate:cn.object,minDateTime:cn.object,minTime:cn.object,minutesStep:cn.number,monthsPerRow:cn.oneOf([3,4]),name:cn.string,onAccept:cn.func,onChange:cn.func,onClose:cn.func,onError:cn.func,onMonthChange:cn.func,onOpen:cn.func,onSelectedSectionsChange:cn.func,onViewChange:cn.func,onYearChange:cn.func,open:cn.bool,openTo:cn.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),orientation:cn.oneOf(["landscape","portrait"]),readOnly:cn.bool,reduceAnimations:cn.bool,referenceDate:cn.object,renderLoading:cn.func,selectedSections:cn.oneOfType([cn.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),cn.number]),shouldDisableDate:cn.func,shouldDisableMonth:cn.func,shouldDisableTime:cn.func,shouldDisableYear:cn.func,showDaysOutsideCurrentMonth:cn.bool,skipDisabled:cn.bool,slotProps:cn.object,slots:cn.object,sx:cn.oneOfType([cn.arrayOf(cn.oneOfType([cn.func,cn.object,cn.bool])),cn.func,cn.object]),thresholdToRenderTimeInASingleColumn:cn.number,timeSteps:cn.shape({hours:cn.number,minutes:cn.number,seconds:cn.number}),timezone:cn.string,value:cn.object,view:cn.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),viewRenderers:cn.shape({day:cn.func,hours:cn.func,meridiem:cn.func,minutes:cn.func,month:cn.func,seconds:cn.func,year:cn.func}),views:cn.arrayOf(cn.oneOf(["day","hours","minutes","month","seconds","year"]).isRequired),yearsOrder:cn.oneOf(["asc","desc"]),yearsPerRow:cn.oneOf([3,4])};const Jje=ze.forwardRef(function(e,r){const n=kb(),i=yp(),a=Zje(e,"MuiMobileDateTimePicker"),o=Mr({day:K3,month:K3,year:K3,hours:BN,minutes:BN,seconds:BN},a.viewRenderers),s=a.ampmInClock??!1,d=Mr({},a,{viewRenderers:o,format:$je(i,a),ampmInClock:s,slots:Mr({field:Rje},a.slots),slotProps:Mr({},a.slotProps,{field:L=>Mr({},Pk(a.slotProps?.field,L),iF(a),{ref:r}),toolbar:Mr({hidden:!1,ampmInClock:s},a.slotProps?.toolbar),tabs:Mr({hidden:!1},a.slotProps?.tabs)})}),{renderPicker:b}=p0e({props:d,valueManager:S1,valueType:"date-time",getOpenDialogAriaText:tF({utils:i,formatKey:"fullDate",contextTranslation:n.openDatePickerDialogue,propsTranslation:d.localeText?.openDatePickerDialogue}),validator:mX});return b()});Jje.propTypes={ampm:cn.bool,ampmInClock:cn.bool,autoFocus:cn.bool,className:cn.string,closeOnSelect:cn.bool,dayOfWeekFormatter:cn.func,defaultValue:cn.object,disabled:cn.bool,disableFuture:cn.bool,disableHighlightToday:cn.bool,disableIgnoringDatePartForTimeValidation:cn.bool,disableOpenPicker:cn.bool,disablePast:cn.bool,displayWeekNumber:cn.bool,enableAccessibleFieldDOMStructure:cn.any,fixedWeekNumber:cn.number,format:cn.string,formatDensity:cn.oneOf(["dense","spacious"]),inputRef:L8,label:cn.node,loading:cn.bool,localeText:cn.object,maxDate:cn.object,maxDateTime:cn.object,maxTime:cn.object,minDate:cn.object,minDateTime:cn.object,minTime:cn.object,minutesStep:cn.number,monthsPerRow:cn.oneOf([3,4]),name:cn.string,onAccept:cn.func,onChange:cn.func,onClose:cn.func,onError:cn.func,onMonthChange:cn.func,onOpen:cn.func,onSelectedSectionsChange:cn.func,onViewChange:cn.func,onYearChange:cn.func,open:cn.bool,openTo:cn.oneOf(["day","hours","minutes","month","seconds","year"]),orientation:cn.oneOf(["landscape","portrait"]),readOnly:cn.bool,reduceAnimations:cn.bool,referenceDate:cn.object,renderLoading:cn.func,selectedSections:cn.oneOfType([cn.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),cn.number]),shouldDisableDate:cn.func,shouldDisableMonth:cn.func,shouldDisableTime:cn.func,shouldDisableYear:cn.func,showDaysOutsideCurrentMonth:cn.bool,slotProps:cn.object,slots:cn.object,sx:cn.oneOfType([cn.arrayOf(cn.oneOfType([cn.func,cn.object,cn.bool])),cn.func,cn.object]),timezone:cn.string,value:cn.object,view:cn.oneOf(["day","hours","minutes","month","seconds","year"]),viewRenderers:cn.shape({day:cn.func,hours:cn.func,minutes:cn.func,month:cn.func,seconds:cn.func,year:cn.func}),views:cn.arrayOf(cn.oneOf(["day","hours","minutes","month","seconds","year"]).isRequired),yearsOrder:cn.oneOf(["asc","desc"]),yearsPerRow:cn.oneOf([3,4])};const SDt=["desktopModeMediaQuery"],TDt=ze.forwardRef(function(e,r){const n=yh({props:e,name:"MuiDateTimePicker"}),{desktopModeMediaQuery:i=i0e}=n,a=Ms(n,SDt);return IY(i,{defaultMatches:!0})?Ke.jsx(Kje,Mr({ref:r},a)):Ke.jsx(Jje,Mr({ref:r},a))});var xG={exports:{}},EDt=xG.exports,Q5e;function ADt(){return Q5e||(Q5e=1,(function(t,e){(function(r,n){t.exports=n()})(EDt,(function(){var r="week",n="year";return function(i,a,o){var s=a.prototype;s.week=function(d){if(d===void 0&&(d=null),d!==null)return this.add(7*(d-this.week()),"day");var b=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var L=o(this).startOf(n).add(1,n).date(b),B=o(this).endOf(r);if(L.isBefore(B))return 1}var V=o(this).startOf(n).date(b).startOf(r).subtract(1,"millisecond"),X=this.diff(V,r,!0);return X<0?o(this).startOf("week").week():Math.ceil(X)},s.weeks=function(d){return d===void 0&&(d=null),this.week(d)}}}))})(xG)),xG.exports}var CDt=ADt();const MDt=Qh(CDt);var _G={exports:{}},RDt=_G.exports,eRe;function kDt(){return eRe||(eRe=1,(function(t,e){(function(r,n){t.exports=n()})(RDt,(function(){var r={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(n,i,a){var o=i.prototype,s=o.format;a.en.formats=r,o.format=function(d){d===void 0&&(d="YYYY-MM-DDTHH:mm:ssZ");var b=this.$locale().formats,L=(function(B,V){return B.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(X,ie,de){var ae=de&&de.toUpperCase();return ie||V[de]||r[de]||V[ae].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(U,ve,Se){return ve||Se.slice(1)}))}))})(d,b===void 0?{}:b);return s.call(this,L)}}}))})(_G)),_G.exports}var IDt=kDt();const PDt=Qh(IDt);var wG={exports:{}},DDt=wG.exports,tRe;function LDt(){return tRe||(tRe=1,(function(t,e){(function(r,n){t.exports=n()})(DDt,(function(){return function(r,n,i){n.prototype.isBetween=function(a,o,s,d){var b=i(a),L=i(o),B=(d=d||"()")[0]==="(",V=d[1]===")";return(B?this.isAfter(b,s):!this.isBefore(b,s))&&(V?this.isBefore(L,s):!this.isAfter(L,s))||(B?this.isBefore(b,s):!this.isAfter(b,s))&&(V?this.isAfter(L,s):!this.isBefore(L,s))}}}))})(wG)),wG.exports}var ODt=LDt();const NDt=Qh(ODt);var SG={exports:{}},FDt=SG.exports,rRe;function zDt(){return rRe||(rRe=1,(function(t,e){(function(r,n){t.exports=n()})(FDt,(function(){return function(r,n,i){var a=n.prototype,o=a.format;i.en.ordinal=function(s){var d=["th","st","nd","rd"],b=s%100;return"["+s+(d[(b-20)%10]||d[b]||d[0])+"]"},a.format=function(s){var d=this,b=this.$locale();if(!this.isValid())return o.bind(this)(s);var L=this.$utils(),B=(s||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(V){switch(V){case"Q":return Math.ceil((d.$M+1)/3);case"Do":return b.ordinal(d.$D);case"gggg":return d.weekYear();case"GGGG":return d.isoWeekYear();case"wo":return b.ordinal(d.week(),"W");case"w":case"ww":return L.s(d.week(),V==="w"?1:2,"0");case"W":case"WW":return L.s(d.isoWeek(),V==="W"?1:2,"0");case"k":case"kk":return L.s(String(d.$H===0?24:d.$H),V==="k"?1:2,"0");case"X":return Math.floor(d.$d.getTime()/1e3);case"x":return d.$d.getTime();case"z":return"["+d.offsetName()+"]";case"zzz":return"["+d.offsetName("long")+"]";default:return V}}));return o.bind(this)(B)}}}))})(SG)),SG.exports}var BDt=zDt();const UDt=Qh(BDt);K1.extend(PDt);K1.extend(MDt);K1.extend(NDt);K1.extend(UDt);const HDt={YY:"year",YYYY:{sectionType:"year",contentType:"digit",maxLength:4},M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMM:{sectionType:"month",contentType:"letter"},MMMM:{sectionType:"month",contentType:"letter"},D:{sectionType:"day",contentType:"digit",maxLength:2},DD:"day",Do:{sectionType:"day",contentType:"digit-with-letter"},d:{sectionType:"weekDay",contentType:"digit",maxLength:2},dd:{sectionType:"weekDay",contentType:"letter"},ddd:{sectionType:"weekDay",contentType:"letter"},dddd:{sectionType:"weekDay",contentType:"letter"},A:"meridiem",a:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},jDt={year:"YYYY",month:"MMMM",monthShort:"MMM",dayOfMonth:"D",dayOfMonthFull:"Do",weekday:"dddd",weekdayShort:"dd",hours24h:"HH",hours12h:"hh",meridiem:"A",minutes:"mm",seconds:"ss",fullDate:"ll",keyboardDate:"L",shortDate:"MMM D",normalDate:"D MMMM",normalDateWithWeekday:"ddd, MMM D",fullTime:"LT",fullTime12h:"hh:mm A",fullTime24h:"HH:mm",keyboardDateTime:"L LT",keyboardDateTime12h:"L hh:mm A",keyboardDateTime24h:"L HH:mm"},Fie=["Missing UTC plugin","To be able to use UTC or timezones, you have to enable the `utc` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-utc"].join(`
`),nRe=["Missing timezone plugin","To be able to use timezones, you have to enable both the `utc` and the `timezone` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-timezone"].join(`
`),VDt=(t,e)=>e?(...r)=>t(...r).locale(e):t;class m0e{constructor({locale:e,formats:r}={}){this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="dayjs",this.dayjs=void 0,this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"[",end:"]"},this.formatTokenMap=HDt,this.setLocaleToValue=n=>{const i=this.getCurrentLocaleCode();return i===n.locale()?n:n.locale(i)},this.hasUTCPlugin=()=>typeof K1.utc<"u",this.hasTimezonePlugin=()=>typeof K1.tz<"u",this.isSame=(n,i,a)=>{const o=this.setTimezone(i,this.getTimezone(n));return n.format(a)===o.format(a)},this.cleanTimezone=n=>{switch(n){case"default":return;case"system":return K1.tz.guess();default:return n}},this.createSystemDate=n=>{if(this.hasUTCPlugin()&&this.hasTimezonePlugin()){const i=K1.tz.guess();return i!=="UTC"?K1.tz(n,i):K1(n)}return K1(n)},this.createUTCDate=n=>{if(!this.hasUTCPlugin())throw new Error(Fie);return K1.utc(n)},this.createTZDate=(n,i)=>{if(!this.hasUTCPlugin())throw new Error(Fie);if(!this.hasTimezonePlugin())throw new Error(nRe);const a=n!==void 0&&!n.endsWith("Z");return K1(n).tz(this.cleanTimezone(i),a)},this.getLocaleFormats=()=>{const n=K1.Ls,i=this.locale||"en";let a=n[i];return a===void 0&&(a=n.en),a.formats},this.adjustOffset=n=>{if(!this.hasTimezonePlugin())return n;const i=this.getTimezone(n);if(i!=="UTC"){const a=n.tz(this.cleanTimezone(i),!0);if(a.$offset===(n.$offset??0))return n;n.$offset=a.$offset}return n},this.date=(n,i="default")=>{if(n===null)return null;let a;return i==="UTC"?a=this.createUTCDate(n):i==="system"||i==="default"&&!this.hasTimezonePlugin()?a=this.createSystemDate(n):a=this.createTZDate(n,i),this.locale===void 0?a:a.locale(this.locale)},this.getInvalidDate=()=>K1(new Date("Invalid date")),this.getTimezone=n=>{if(this.hasTimezonePlugin()){const i=n.$x?.$timezone;if(i)return i}return this.hasUTCPlugin()&&n.isUTC()?"UTC":"system"},this.setTimezone=(n,i)=>{if(this.getTimezone(n)===i)return n;if(i==="UTC"){if(!this.hasUTCPlugin())throw new Error(Fie);return n.utc()}if(i==="system")return n.local();if(!this.hasTimezonePlugin()){if(i==="default")return n;throw new Error(nRe)}return K1.tz(n,this.cleanTimezone(i))},this.toJsDate=n=>n.toDate(),this.parse=(n,i)=>n===""?null:this.dayjs(n,i,this.locale,!0),this.getCurrentLocaleCode=()=>this.locale||"en",this.is12HourCycleInCurrentLocale=()=>/A|a/.test(this.getLocaleFormats().LT||""),this.expandFormat=n=>{const i=this.getLocaleFormats(),a=o=>o.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(s,d,b)=>d||b.slice(1));return n.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(o,s,d)=>{const b=d&&d.toUpperCase();return s||i[d]||a(i[b])})},this.isValid=n=>n==null?!1:n.isValid(),this.format=(n,i)=>this.formatByString(n,this.formats[i]),this.formatByString=(n,i)=>this.dayjs(n).format(i),this.formatNumber=n=>n,this.isEqual=(n,i)=>n===null&&i===null?!0:n===null||i===null?!1:n.toDate().getTime()===i.toDate().getTime(),this.isSameYear=(n,i)=>this.isSame(n,i,"YYYY"),this.isSameMonth=(n,i)=>this.isSame(n,i,"YYYY-MM"),this.isSameDay=(n,i)=>this.isSame(n,i,"YYYY-MM-DD"),this.isSameHour=(n,i)=>n.isSame(i,"hour"),this.isAfter=(n,i)=>n>i,this.isAfterYear=(n,i)=>this.hasUTCPlugin()?!this.isSameYear(n,i)&&n.utc()>i.utc():n.isAfter(i,"year"),this.isAfterDay=(n,i)=>this.hasUTCPlugin()?!this.isSameDay(n,i)&&n.utc()>i.utc():n.isAfter(i,"day"),this.isBefore=(n,i)=>n<i,this.isBeforeYear=(n,i)=>this.hasUTCPlugin()?!this.isSameYear(n,i)&&n.utc()<i.utc():n.isBefore(i,"year"),this.isBeforeDay=(n,i)=>this.hasUTCPlugin()?!this.isSameDay(n,i)&&n.utc()<i.utc():n.isBefore(i,"day"),this.isWithinRange=(n,[i,a])=>n>=i&&n<=a,this.startOfYear=n=>this.adjustOffset(n.startOf("year")),this.startOfMonth=n=>this.adjustOffset(n.startOf("month")),this.startOfWeek=n=>this.adjustOffset(this.setLocaleToValue(n).startOf("week")),this.startOfDay=n=>this.adjustOffset(n.startOf("day")),this.endOfYear=n=>this.adjustOffset(n.endOf("year")),this.endOfMonth=n=>this.adjustOffset(n.endOf("month")),this.endOfWeek=n=>this.adjustOffset(this.setLocaleToValue(n).endOf("week")),this.endOfDay=n=>this.adjustOffset(n.endOf("day")),this.addYears=(n,i)=>this.adjustOffset(i<0?n.subtract(Math.abs(i),"year"):n.add(i,"year")),this.addMonths=(n,i)=>this.adjustOffset(i<0?n.subtract(Math.abs(i),"month"):n.add(i,"month")),this.addWeeks=(n,i)=>this.adjustOffset(i<0?n.subtract(Math.abs(i),"week"):n.add(i,"week")),this.addDays=(n,i)=>this.adjustOffset(i<0?n.subtract(Math.abs(i),"day"):n.add(i,"day")),this.addHours=(n,i)=>this.adjustOffset(i<0?n.subtract(Math.abs(i),"hour"):n.add(i,"hour")),this.addMinutes=(n,i)=>this.adjustOffset(i<0?n.subtract(Math.abs(i),"minute"):n.add(i,"minute")),this.addSeconds=(n,i)=>this.adjustOffset(i<0?n.subtract(Math.abs(i),"second"):n.add(i,"second")),this.getYear=n=>n.year(),this.getMonth=n=>n.month(),this.getDate=n=>n.date(),this.getHours=n=>n.hour(),this.getMinutes=n=>n.minute(),this.getSeconds=n=>n.second(),this.getMilliseconds=n=>n.millisecond(),this.setYear=(n,i)=>this.adjustOffset(n.set("year",i)),this.setMonth=(n,i)=>this.adjustOffset(n.set("month",i)),this.setDate=(n,i)=>this.adjustOffset(n.set("date",i)),this.setHours=(n,i)=>this.adjustOffset(n.set("hour",i)),this.setMinutes=(n,i)=>this.adjustOffset(n.set("minute",i)),this.setSeconds=(n,i)=>this.adjustOffset(n.set("second",i)),this.setMilliseconds=(n,i)=>this.adjustOffset(n.set("millisecond",i)),this.getDaysInMonth=n=>n.daysInMonth(),this.getWeekArray=n=>{const i=this.startOfWeek(this.startOfMonth(n)),a=this.endOfWeek(this.endOfMonth(n));let o=0,s=i;const d=[];for(;s<a;){const b=Math.floor(o/7);d[b]=d[b]||[],d[b].push(s),s=this.addDays(s,1),o+=1}return d},this.getWeekNumber=n=>n.week(),this.getYearRange=([n,i])=>{const a=this.startOfYear(n),o=this.endOfYear(i),s=[];let d=a;for(;this.isBefore(d,o);)s.push(d),d=this.addYears(d,1);return s},this.dayjs=VDt(K1,e),this.locale=e,this.formats=Mr({},jDt,r),K1.extend(QHe)}getDayOfWeek(e){return e.day()+1}}const o8=Hu(Ke.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"})),qDt=({schema:t,rootSchema:e,visible:r,renderers:n,cells:i,path:a,uischemas:o,uischema:s})=>{const d=RHe(o)(t,s.scope,a);if(!r)return null;if(d)return wi.createElement(z5,{schema:t,uischema:d,path:a,renderers:n,cells:i});const b=Gge(t.allOf,e,"allOf",s,a,o);return wi.createElement(wi.Fragment,null,b.map((L,B)=>wi.createElement(z5,{key:B,schema:L.schema,uischema:L.uischema,path:a,renderers:n,cells:i})))},GDt=bh(3,vCt);var $Dt=WMt(qDt);class Qje extends wi.Component{render(){const{schema:e,combinatorKeyword:r,path:n,rootSchema:i}=this.props,a=s5t(e,r),o=wL.uiSchema(a,"VerticalLayout",void 0,i);let s=!1;return o!==null&&mge(o)&&(s=o.elements.length>0),s?wi.createElement(z5,{schema:a,path:n,uischema:o}):null}}const eVe=({open:t,handleClose:e,confirm:r,cancel:n,id:i})=>wi.createElement(iA,{open:t,onClose:e,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description"},wi.createElement(YC,{id:"alert-dialog-title"},"Clear form?"),wi.createElement(aA,null,wi.createElement(wY,{id:"alert-dialog-description"},"Your data will be cleared if you navigate away from this tab. Do you want to proceed?")),wi.createElement(WC,null,wi.createElement(Id,{onClick:n,color:"primary"},"No"),wi.createElement(Id,{onClick:r,color:"primary",autoFocus:!0,id:`${i}-confirm-yes`},"Yes"))),WDt=({handleChange:t,schema:e,rootSchema:r,indexOfFittingSchema:n,visible:i,path:a,renderers:o,cells:s,uischema:d,uischemas:b,id:L,data:B})=>{const[V,X]=ze.useState(n||0),[ie,de]=ze.useState(!1),[ae,U]=ze.useState(0),ve=ze.useCallback(()=>de(!1),[de]),Se=ze.useCallback((Ze,Je)=>{Eh(B)||typeof B==typeof Sk(Ve[Je].schema,r)?X(Je):(U(Je),de(!0))},[de,X,B]),Pe=Ze=>{t(a,Sk(Ve[Ze].schema,r)),X(Ze)},Me=ze.useCallback(()=>{Pe(ae),de(!1)},[t,Sk,ae]),Ie="anyOf",Ve=Gge(e.anyOf,r,Ie,d,a,b);return i?wi.createElement(wi.Fragment,null,wi.createElement(Qje,{schema:e,combinatorKeyword:Ie,path:a,rootSchema:r}),wi.createElement(LB,{value:V,onChange:Se},Ve.map(Ze=>wi.createElement(QN,{key:Ze.label,label:Ze.label}))),Ve.map((Ze,Je)=>V===Je&&wi.createElement(z5,{key:Je,schema:Ze.schema,uischema:Ze.uischema,path:a,renderers:o,cells:s})),wi.createElement(eVe,{cancel:ve,confirm:Me,id:"anyOf-"+L,open:ie,handleClose:ve})):null},YDt=bh(3,mCt);var XDt=$Mt(WDt);const ZDt=fa(e8)({borderBottom:"none"}),z9=({children:t,...e})=>wi.createElement(ZDt,{...e},t),KDt=fa(T9e)(({theme:t})=>({color:t.palette.error.main})),tVe=({errorMessages:t,id:e})=>wi.createElement(Zh,{id:e,title:t},wi.createElement(KDt,{badgeContent:t.split(`
`).length},wi.createElement(JHe,{color:"inherit"}))),JDt={paddingLeft:0,paddingRight:0},QDt=wi.memo(function({numColumns:e,errors:r,label:n,description:i,path:a,addItem:o,schema:s,enabled:d,translations:b,rootSchema:L,disableAdd:B}){return wi.createElement(kY,null,wi.createElement(z9,{colSpan:e},wi.createElement(Tme,null,wi.createElement(Ov,{container:!0,justifyContent:"flex-start",alignItems:"center",spacing:2},wi.createElement(Ov,{item:!0},wi.createElement(Su,{variant:"h6"},n)),wi.createElement(Ov,{item:!0},r.length!==0&&wi.createElement(Ov,{item:!0},wi.createElement(tVe,{id:"tooltip-validation",errorMessages:r})))),i&&wi.createElement(w1,null,i))),d&&!B?wi.createElement(z9,{align:"right",style:JDt},wi.createElement(Zh,{id:"tooltip-add",title:b.addTooltip,placement:"bottom"},wi.createElement(Zf,{"aria-label":b.addAriaLabel,onClick:o(a,Sk(s,L)),size:"large"},wi.createElement(lX,null)))):null)}),iRe={fixedCell:{width:"150px",height:"50px",paddingLeft:0,paddingRight:0,textAlign:"center"},fixedCellSmall:{width:"50px",height:"50px",paddingLeft:0,paddingRight:0,textAlign:"center"}},rVe=(t,e,r,n,i)=>{if(e.type==="object")return nVe(e).map(a=>{const o=yge.compose(r,a),s={propName:a,schema:e,title:e.properties?.[a]?.title??Xme(a),rowPath:r,cellPath:o,enabled:n,cells:i};return wi.createElement(t,{key:o,...s})});{const a={schema:e,rowPath:r,cellPath:r,enabled:n};return wi.createElement(t,{key:r,...a})}},nVe=t=>t.type==="object"&&typeof t.properties=="object"?Object.keys(t.properties).filter(e=>t.properties[e].type!=="array"):[""],eLt=({numColumns:t,translations:e})=>wi.createElement(kY,null,wi.createElement(z9,{colSpan:t},wi.createElement(Su,{align:"center"},e.noDataMessage))),tLt=wi.memo(function({title:e}){return wi.createElement(e8,null,e)}),rLt=(t,e)=>{const r=e.rowPath+(e.schema.type==="object"?"."+e.propName:""),n=hHe(h5t(IHe(r,e.schema)(t.core).map(i=>i.message)));return{rowPath:e.rowPath,propName:e.propName,schema:e.schema,rootSchema:t.core.schema,errors:n,path:r,enabled:e.enabled,cells:e.cells||t.cells,renderers:e.renderers||t.renderers}},aRe=t=>({type:"Control",scope:t,label:!1}),nLt=wi.memo(function({path:e,propName:r,schema:n,rootSchema:i,errors:a,enabled:o,renderers:s,cells:d,isValid:b}){return wi.createElement(z9,null,n.properties?wi.createElement(E5e,{schema:JS.schema(n,`#/properties/${u$(r)}`,i),uischema:aRe(`#/properties/${u$(r)}`),path:e,enabled:o,renderers:s,cells:d}):wi.createElement(E5e,{schema:n,uischema:aRe("#"),path:e,enabled:o,renderers:s,cells:d}),wi.createElement(w1,{error:!b},!b&&a))}),iLt=t=>{const e=sX(),r=rLt(e,t),n=Eh(r.errors);return wi.createElement(nLt,{...r,isValid:n})},aLt=({childPath:t,schema:e,rowIndex:r,openDeleteDialog:n,moveUpCreator:i,moveDownCreator:a,enableUp:o,enableDown:s,showSortButtons:d,enabled:b,cells:L,path:B,translations:V,disableRemove:X})=>{const ie=ze.useMemo(()=>i(B,r),[i,B,r]),de=ze.useMemo(()=>a(B,r),[a,B,r]);return wi.createElement(kY,{key:t,hover:!0},rVe(iLt,e,t,b,L),b?wi.createElement(z9,{style:d?iRe.fixedCell:iRe.fixedCellSmall},wi.createElement(Ov,{container:!0,direction:"row",justifyContent:"flex-end",alignItems:"center"},d?wi.createElement(ze.Fragment,null,wi.createElement(Ov,{item:!0},wi.createElement(Zh,{id:"tooltip-up",title:V.up,placement:"bottom",open:o?void 0:!1},wi.createElement(Zf,{"aria-label":V.upAriaLabel,onClick:ie,disabled:!o,size:"large"},wi.createElement(KHe,null)))),wi.createElement(Ov,{item:!0},wi.createElement(Zh,{id:"tooltip-down",title:V.down,placement:"bottom",open:s?void 0:!1},wi.createElement(Zf,{"aria-label":V.downAriaLabel,onClick:de,disabled:!s,size:"large"},wi.createElement(ZHe,null))))):null,X?null:wi.createElement(Ov,{item:!0},wi.createElement(Zh,{id:"tooltip-remove",title:V.removeTooltip,placement:"bottom"},wi.createElement(Zf,{"aria-label":V.removeAriaLabel,onClick:()=>n(t,r),size:"large"},wi.createElement(eF,null)))))):null)},oLt=wi.memo(aLt),sLt=({data:t,path:e,schema:r,openDeleteDialog:n,moveUp:i,moveDown:a,uischema:o,config:s,enabled:d,cells:b,translations:L,disableRemove:B})=>{if(t===0)return wi.createElement(eLt,{numColumns:nVe(r).length+1,translations:L});const X=Zv({},s,o.options);return wi.createElement(wi.Fragment,null,XY(t).map(ie=>{const de=yge.compose(e,`${ie}`);return wi.createElement(oLt,{key:de,childPath:de,rowIndex:ie,schema:r,openDeleteDialog:n,moveUpCreator:i,moveDownCreator:a,enableUp:ie!==0,enableDown:ie!==t-1,showSortButtons:X.showSortButtons||X.showArrayTableSortButtons,enabled:d,cells:b,path:e,translations:L,disableRemove:B})}))};class lLt extends wi.Component{constructor(){super(...arguments),this.addItem=(e,r)=>this.props.addItem(e,r)}render(){const{label:e,description:r,path:n,schema:i,rootSchema:a,uischema:o,errors:s,openDeleteDialog:d,visible:b,enabled:L,cells:B,translations:V,disableAdd:X,disableRemove:ie,config:de}=this.props,ae=Zv({},de,o.options),U=X||ae.disableAdd,ve=ie||ae.disableRemove,Se=o,Pe=i.type==="object",Me=Pe?rVe(tLt,i,n,L,B):void 0;return b?wi.createElement(H1t,null,wi.createElement(tbt,null,wi.createElement(QDt,{errors:s,label:e,description:r,addItem:this.addItem,numColumns:Pe?Me.length:1,path:n,uischema:Se,schema:i,rootSchema:a,enabled:L,translations:V,disableAdd:U}),Pe&&wi.createElement(kY,null,Me,L?wi.createElement(e8,null):null)),wi.createElement($1t,null,wi.createElement(sLt,{openDeleteDialog:d,translations:V,...this.props,disableRemove:ve}))):null}}const uLt=wi.memo(function({open:e,onClose:r,onConfirm:n,onCancel:i,title:a,message:o,acceptText:s,declineText:d}){return wi.createElement(iA,{open:e,keepMounted:!0,onClose:r,"aria-labelledby":"alert-dialog-confirmdelete-title","aria-describedby":"alert-dialog-confirmdelete-description"},wi.createElement(YC,{id:"alert-dialog-confirmdelete-title"},a),wi.createElement(aA,null,wi.createElement(wY,{id:"alert-dialog-confirmdelete-description"},o)),wi.createElement(WC,null,wi.createElement(Id,{onClick:i,color:"primary"},d),wi.createElement(Id,{onClick:n,color:"primary"},s)))}),cLt=t=>{const[e,r]=ze.useState(!1),[n,i]=ze.useState(void 0),[a,o]=ze.useState(void 0),{removeItems:s,visible:d,translations:b}=t,L=ze.useCallback((ie,de)=>{r(!0),i(ie),o(de)},[r,i,o]),B=ze.useCallback(()=>r(!1),[r]),V=ze.useCallback(()=>{const ie=n.substring(0,n.lastIndexOf("."));s(ie,[a])(),r(!1)},[r,n,a]),X=ze.useCallback(()=>r(!1),[r]);return d?wi.createElement(wi.Fragment,null,wi.createElement(lLt,{...t,openDeleteDialog:L,translations:b}),wi.createElement(uLt,{open:e,onCancel:B,onConfirm:V,onClose:X,acceptText:b.deleteDialogAccept,declineText:b.deleteDialogDecline,title:b.deleteDialogTitle,message:b.deleteDialogMessage})):null},fLt=bh(3,K8(bCt,_Ct));var dLt=$ge(jk(Wge(cLt)));const eT=()=>{const[t,e]=ze.useState(!1),r=ze.useCallback(()=>e(!0),[]),n=ze.useCallback(()=>e(!1),[]);return[t,r,n]},iVe=t=>{const{description:e,errors:r,visible:n,required:i,label:a,data:o,className:s,id:d,enabled:b,uischema:L,path:B,handleChange:V,options:X,config:ie,getOptionLabel:de,renderOption:ae,filterOptions:U,isValid:ve}=t,Se=Zv({},ie,L.options),[Pe,Me]=wi.useState(o??""),[Ie,Ve,Ze]=eT(),Je=X.find(_t=>_t.value===o)??null,nt=!dE(n,e,Ie,Se.showUnfocusedDescription),ut=nt?e:ve?null:r,ht=nt&&!ve?r:null;return n?wi.createElement(wi.Fragment,null,wi.createElement(N8,{className:s,id:d,disabled:!b,value:Je,onChange:(_t,Dt)=>{V(B,Dt?.value)},inputValue:Pe,onInputChange:(_t,Dt)=>{Me(Dt)},autoHighlight:!0,autoComplete:!0,fullWidth:!0,options:X,getOptionLabel:de||(_t=>_t?.label),freeSolo:!1,renderInput:_t=>wi.createElement(zg,{label:a,type:"text",inputProps:_t.inputProps,inputRef:_t.InputProps.ref,autoFocus:Se.focus,disabled:!b,..._t,id:d,required:i&&!Se.hideRequiredAsterisk,error:!ve,fullWidth:!Se.trim,InputLabelProps:o?{shrink:!0}:void 0,onFocus:Ve,onBlur:Ze,focused:Ie}),renderOption:ae,filterOptions:U}),wi.createElement(w1,{error:!ve&&!nt},ut),wi.createElement(w1,{error:!ve},ht)):null},g0e=wi.memo(function(e){const{data:r,className:n,id:i,enabled:a,uischema:o,path:s,handleChange:d,config:b,inputProps:L}=e,B=Zv({},b,o.options),V=Zv({},L,{autoFocus:!!B.focus}),X=!!r;return wi.createElement(n$,{checked:X,onChange:(ie,de)=>d(s,de),className:n,id:i,disabled:!a,inputProps:V})});K1.extend(QHe);const y0e=(t,e,r)=>n=>{if(!n)e(t,void 0);else if(n.toString()!=="Invalid Date"){const i=aVe(n,r);e(t,i)}},b0e=(t,e,r,n,i,a)=>o=>{const s=K1(o.target.value,r),d=aVe(s,n);d.toString()==="Invalid Date"?(e(t,void 0),i()):e(t,d),a()},aVe=(t,e)=>{let r=t.format(e);const n=e.indexOf("YYYY");if(t.year()<1e3&&n!==-1){const i=r.slice(0,n),a=r.slice(n);t.year()>=100?r=[i,0,a].join(""):t.year()>=10?r=[i,0,0,a].join(""):t.year()>=1&&(r=[i,0,0,0,a].join(""))}return r},x0e=(t,e)=>{if(!t)return null;const r=K1(t,e);return r.toString()==="Invalid Date"?null:r},hLt=(t,e,r,n,i,a)=>t.map((o,s)=>wi.createElement(Ov,{item:!0,key:`${r}-${s}`,xs:!0},wi.createElement(z5,{uischema:o,schema:e,path:r,enabled:n,renderers:i,cells:a}))),pLt=({visible:t,elements:e,schema:r,path:n,enabled:i,direction:a,renderers:o,cells:s})=>Eh(e)||!t?null:wi.createElement(Ov,{container:!0,direction:a,spacing:a==="row"?2:0},hLt(e,r,n,i,o,s)),eU=wi.memo(pLt),oVe=t=>function(r){const n=sX(),i=J8({jsonforms:{...n}});return wi.createElement(t,{...r,ajv:i})},oRe={standard:TY,filled:SY,outlined:AY},sVe="outlined";function lVe(){const{variant:t=sVe}=yh({props:{},name:"MuiTextField"});return t}function ZL(){const t=lVe();return oRe[t]??oRe[sVe]}const vLt=t=>t.target.value,KL=(t,e,r,n,i=vLt,a=300,o=!1,s=!1)=>{const[d,b]=ze.useState(r??e);ze.useEffect(()=>{b(r??e)},[r]);const L=ze.useCallback(VHe(X=>t(n,X),a),[t,n,a]);ze.useEffect(()=>{!s&&o&&L.flush()},[s,o,L]);const B=ze.useCallback(X=>{const ie=i(X);b(ie??e),L(ie)},[L,i]),V=ze.useCallback(()=>{b(e),t(n,void 0)},[e,t,n]);return[d,B,V]},mLt={"enum.none":"None"},gLt=t=>t===""?void 0:parseInt(t,10),yLt=t=>gLt(t.target.value),uVe=wi.memo(function(e){const[r,n,i]=eT(),{data:a,className:o,id:s,enabled:d,uischema:b,isValid:L,path:B,handleChange:V,config:X,label:ie}=e,de=ZL(),ae={step:"1"},U=Zv({},X,b.options),[ve,Se]=KL(V,"",a,B,yLt,void 0,!0,r);return wi.createElement(de,{label:ie,type:"number",value:ve,onFocus:n,onBlur:i,onChange:Se,className:o,id:s,disabled:!d,autoFocus:U.focus,inputProps:ae,fullWidth:!0,error:!L})}),bLt=t=>t===""?void 0:parseFloat(t),xLt=t=>bLt(t.target.value),cVe=wi.memo(function(e){const[r,n,i]=eT(),{data:a,className:o,id:s,enabled:d,uischema:b,isValid:L,path:B,handleChange:V,config:X,label:ie}=e,de=ZL(),ae={step:"0.1"},U=Zv({},X,b.options),[ve,Se]=KL(V,"",a,B,xLt,void 0,!0,r);return wi.createElement(de,{type:"number",label:ie,value:ve,onChange:Se,onFocus:n,onBlur:i,className:o,id:s,disabled:!d,autoFocus:U.focus,inputProps:ae,fullWidth:!0,error:!L})}),_Lt=wi.memo(function(e){const[r,n,i]=eT(),{className:a,id:o,enabled:s,uischema:d,isValid:b,path:L,handleChange:B,schema:V,config:X,label:ie}=e,de=ZL(),ae=V.maxLength,U=Zv({},X,d.options);let ve;U.restrict?ve={maxLength:ae}:ve={};const Se=e.toFormatted(e.data),Pe=ze.useCallback(Ve=>e.fromFormatted(Ve.currentTarget.value),[e.fromFormatted]),[Me,Ie]=KL(B,"",Se,L,Pe,void 0,!0,r);return wi.createElement(de,{type:"text",value:Me,onChange:Ie,onFocus:n,onBlur:i,className:a,id:o,label:ie,disabled:!s,autoFocus:U.focus,multiline:U.multi,fullWidth:!U.trim||ae===void 0,inputProps:ve,error:!b})}),wLt=t=>t.target.value===""?void 0:t.target.value,fVe=wi.memo(function(e){const[r,n,i]=eT(),[a,o]=ze.useState(!1),{data:s,config:d,className:b,id:L,enabled:B,uischema:V,isValid:X,path:ie,handleChange:de,schema:ae,muiInputProps:U,label:ve,inputComponent:Se}=e,Pe=ZL(),Me=ae.maxLength,Ie=Zv({},d,V.options);let Ve;Ie.restrict?Ve={maxLength:Me}:Ve={},Ve=Zv(Ve,U),Ie.trim&&Me!==void 0&&(Ve.size=Me);const[Ze,Je,nt]=KL(de,"",s,ie,wLt,void 0,!0,r),ut=()=>o(!0),ht=()=>o(!1),_t=cy(),Dt={background:_t.jsonforms?.input?.delete?.background||_t.palette.background.default,borderRadius:"50%"};return wi.createElement(Pe,{label:ve,type:Ie.format==="password"?"password":"text",value:Ze,onChange:Je,className:b,onBlur:i,onFocus:n,id:L,disabled:!B,autoFocus:Ie.focus,multiline:Ie.multi,fullWidth:!Ie.trim||Me===void 0,inputProps:Ve,error:!X,onPointerEnter:ut,onPointerLeave:ht,endAdornment:wi.createElement(PB,{position:"end",style:{display:!a||!B||s===void 0?"none":"flex",position:"absolute",right:0}},wi.createElement(Zf,{"aria-label":"Clear input field",onClick:nt,size:"large"},wi.createElement(Xge,{style:Dt}))),inputComponent:Se})}),SLt=wi.memo(function(e){const{data:r,className:n,id:i,enabled:a,uischema:o,isValid:s,path:d,handleChange:b,config:L,label:B}=e,V=ZL(),X=Zv({},L,o.options),[ie,de]=KL(b,"",r,d);return wi.createElement(V,{type:"time",value:ie,onChange:de,className:n,id:i,label:B,disabled:!a,autoFocus:X.focus,fullWidth:!0,error:!s})}),yX=wi.memo(function(e){const{data:r,className:n,id:i,enabled:a,schema:o,uischema:s,isValid:d,path:b,handleChange:L,options:B,config:V,label:X,t:ie,multiple:de}=e,ae=Zv({},V,s.options),U=ze.useMemo(()=>ie("enum.none",mLt["enum.none"],{schema:o,uischema:s,path:b}),[ie,o,s,b]);return wi.createElement(m4,{className:n,id:i,label:X,disabled:!a,autoFocus:ae.focus,value:r!==void 0?r:"",onChange:ve=>L(b,ve.target.value||void 0),fullWidth:!0,multiple:de||!1,error:!d},[wi.createElement(Xx,{value:"",key:"jsonforms.enum.none"},wi.createElement("em",null,U))].concat(B.map(ve=>wi.createElement(Xx,{value:ve.value,key:ve.value},ve.label))))}),dVe=wi.memo(function(e){const{data:r,className:n,id:i,enabled:a,uischema:o,path:s,handleChange:d,config:b,inputProps:L}=e,B=Zv({},b,o.options),V=Zv({},L,{autoFocus:!!B.focus}),X=!!r;return wi.createElement(I9,{checked:X,onChange:(ie,de)=>d(s,de),className:n,id:i,disabled:!a,inputProps:V})}),TLt=({config:t,id:e,schema:r,visible:n,errors:i,description:a,label:o,required:s,path:d,options:b,data:L,addItem:B,removeItem:V,handleChange:X,...ie})=>{const[de,ae,U]=eT(),ve=i.length===0,Se=Zv({},t,ie.uischema.options),Pe=!dE(n,a,de,Se.showUnfocusedDescription);return n?wi.createElement(j5,{component:"fieldset",fullWidth:!Se.trim,onFocus:ae,onBlur:U},wi.createElement(z8,{error:!ve,component:"legend",required:XB(s,Se.hideRequiredAsterisk)},o),wi.createElement(k9e,{row:!0},b.map((Me,Ie)=>{const Ve=yge.compose(d,`${Ie}`),Ze=L?.includes(Me.value)?Me.value:void 0;return wi.createElement(F8,{id:e+"-label-"+Me.value,key:Me.value,control:wi.createElement(g0e,{id:e+"-"+Me.value,key:"checkbox-"+Me.value,isValid:Eh(i),path:Ve,handleChange:(Je,nt)=>nt?B(d,Me.value):V(d,Me.value),data:Ze,errors:i,schema:r,visible:n,...ie}),label:Me.label})})),wi.createElement(w1,{error:!ve},ve?Pe?a:null:i)):null},ELt=t=>t.oneOf!==void 0&&t.oneOf.length>0&&t.oneOf.every(e=>e.const!==void 0),ALt=t=>t.type==="string"&&t.enum!==void 0,CLt=bh(5,vm(Qm("Control"),vm(Qx(t=>U_(t,"array")&&!Array.isArray(t.items)&&t.uniqueItems===!0),Fge("items",(t,e)=>{const r=t.$ref?KS(e,t.$ref,e):t;return ELt(r)||ALt(r)}))));var MLt=QMt(TLt);const RLt=({renderers:t,cells:e,uischemas:r,schema:n,label:i,path:a,visible:o,enabled:s,uischema:d,rootSchema:b})=>{const L=ze.useMemo(()=>iX(r,n,d.scope,a,()=>Eh(a)?wL.uiSchema(n,"VerticalLayout",void 0,b):{...wL.uiSchema(n,"Group",void 0,b),label:i},d,b),[r,n,d.scope,a,i,d,b]);return o?wi.createElement(z5,{visible:o,enabled:s,schema:n,uischema:L,path:a,renderers:t,cells:e}):null},kLt=bh(2,pCt);var ILt=YMt(RLt);const PLt=({handleChange:t,schema:e,path:r,renderers:n,cells:i,rootSchema:a,id:o,visible:s,indexOfFittingSchema:d,uischema:b,uischemas:L,data:B})=>{const[V,X]=ze.useState(!1),[ie,de]=ze.useState(d||0),[ae,U]=ze.useState(0),ve=ze.useCallback(()=>X(!1),[X]),Se=ze.useCallback(()=>{X(!1)},[X]),Pe=ze.useMemo(()=>Gge(e.oneOf,a,"oneOf",b,r,L),[e,a,b,r,L]),Me=Ze=>{t(r,Sk(Pe[Ze].schema,a)),de(Ze)},Ie=ze.useCallback(()=>{Me(ae),X(!1)},[t,Sk,ae]),Ve=ze.useCallback((Ze,Je)=>{U(Je),Eh(B)?Me(Je):X(!0)},[X,de,B]);return s?wi.createElement(wi.Fragment,null,wi.createElement(Qje,{schema:e,combinatorKeyword:"oneOf",path:r,rootSchema:a}),wi.createElement(LB,{value:ie,onChange:Ve},Pe.map(Ze=>wi.createElement(QN,{key:Ze.label,label:Ze.label}))),Pe.map((Ze,Je)=>ie===Je&&wi.createElement(z5,{key:Je,schema:Ze.schema,uischema:Ze.uischema,path:r,renderers:n,cells:i})),wi.createElement(eVe,{cancel:Se,confirm:Ie,id:"oneOf-"+o,open:V,handleClose:ve})):null},DLt=bh(3,gCt);var LLt=GMt(PLt);const OLt=bh(1,Qm("Label")),NLt=({text:t,visible:e})=>e?wi.createElement(Su,{variant:"h6"},t):null;var FLt=e5t(NLt);const hVe=wi.memo(function({label:e,description:r,errors:n,addItem:i,path:a,enabled:o,createDefault:s,translations:d,disableAdd:b}){return wi.createElement(CB,{disableGutters:!0},wi.createElement(Tme,null,wi.createElement(Ov,{container:!0,alignItems:"center",justifyContent:"space-between"},wi.createElement(Ov,{item:!0},wi.createElement(Ov,{container:!0,justifyContent:"flex-start",alignItems:"center",spacing:2},wi.createElement(Ov,{item:!0},wi.createElement(Su,{variant:"h6"},e)),wi.createElement(Ov,{item:!0},n.length!==0&&wi.createElement(Ov,{item:!0},wi.createElement(tVe,{id:"tooltip-validation",errorMessages:n}))))),o&&!b&&wi.createElement(Ov,{item:!0},wi.createElement(Ov,{container:!0},wi.createElement(Ov,{item:!0},wi.createElement(Zh,{id:"tooltip-add",title:d.addTooltip,placement:"bottom"},wi.createElement(Zf,{"aria-label":d.addTooltip,onClick:i(a,s()),size:"large"},wi.createElement(lX,null))))))),r&&wi.createElement(w1,null,r)))}),zLt=({index:t,childLabel:e,selected:r,enabled:n,handleSelect:i,removeItem:a,path:o,translations:s,disableRemove:d})=>wi.createElement(DP,{selected:r,onClick:i(t)},wi.createElement(l0t,null,wi.createElement(w9e,{"aria-label":"Index"},t+1)),wi.createElement(Uw,{primary:e}),n&&!d&&wi.createElement(bme,null,wi.createElement(Zh,{id:"tooltip-remove",title:s.removeTooltip,placement:"bottom"},wi.createElement(Zf,{"aria-label":s.removeAriaLabel,onClick:a(o,t),size:"large"},wi.createElement(eF,null)))));var BLt=XMt(zLt);const ULt=({uischemas:t,schema:e,uischema:r,path:n,enabled:i,errors:a,visible:o,label:s,required:d,removeItems:b,addItem:L,data:B,renderers:V,cells:X,config:ie,rootSchema:de,description:ae,disableAdd:U,disableRemove:ve,translations:Se})=>{const[Pe,Me]=ze.useState(void 0),Ie=ze.useCallback((_t,Dt)=>()=>{b(_t,[Dt])(),Pe===Dt?Me(void 0):Pe>Dt&&Me(Pe-1)},[b,Me]),Ve=ze.useCallback(_t=>()=>Me(_t),[Me]),Ze=ze.useCallback(()=>Sk(e,de),[Sk]),Je=ze.useMemo(()=>iX(t,e,r.scope,n,void 0,r,de),[t,e,r.scope,n,r,de]),nt=Zv({},ie,r.options),ut=U||nt.disableAdd,ht=ve||nt.disableRemove;return wi.useEffect(()=>{Me(void 0)},[e]),o?wi.createElement(wi.Fragment,null,wi.createElement(hVe,{translations:Se,label:zHe(s,d,nt.hideRequiredAsterisk),description:ae,errors:a,path:n,enabled:i,addItem:L,createDefault:Ze,disableAdd:ut}),wi.createElement(Ov,{container:!0,direction:"row",spacing:2},wi.createElement(Ov,{item:!0,xs:3},wi.createElement(B8,null,B>0?eje(XY(B),_t=>wi.createElement(BLt,{index:_t,path:n,schema:e,enabled:i,handleSelect:Ve,removeItem:Ie,selected:Pe===_t,key:_t,uischema:Je,childLabelProp:nt.elementLabelProp,translations:Se,disableRemove:ht})):wi.createElement("p",null,Se.noDataMessage))),wi.createElement(Ov,{item:!0,xs:!0},Pe!==void 0?wi.createElement(z5,{renderers:V,cells:X,visible:o,schema:e,uischema:Je,path:X8(n,`${Pe}`)}):wi.createElement(Su,{variant:"h6"},Se.noSelection)))):null},HLt=bh(4,vm(Qm("ListWithDetail"),CHe));var jLt=$ge(jk(Wge(ULt)));const aF=t=>{const[e,r,n]=eT(),{id:i,description:a,errors:o,label:s,uischema:d,visible:b,required:L,config:B,input:V}=t,X=lVe(),ie=o.length===0,de=Zv({},B,d.options),ae=!dE(b,a,e,de.showUnfocusedDescription),U=ae?a:ie?null:o,ve=ae&&!ie?o:null,Se=V;return b?wi.createElement(j5,{fullWidth:!de.trim,onFocus:r,onBlur:n,variant:X,id:i},wi.createElement(jL,{htmlFor:i+"-input",error:!ie,required:XB(L,de.hideRequiredAsterisk)},s),wi.createElement(Se,{...t,id:i+"-input",isValid:ie,visible:b}),wi.createElement(w1,{error:!ie&&!ae},U),wi.createElement(w1,{error:!ie},ve)):null},pVe=t=>t.find(e=>e.enum!==void 0&&(e.type==="string"||e.type===void 0)),vVe=t=>t.find(e=>e.type==="string"&&e.enum===void 0),VLt=t=>{const[e,r,n]=eT(),{data:i,config:a,className:o,id:s,enabled:d,uischema:b,isValid:L,path:B,handleChange:V,schema:X,label:ie}=t,de=ZL(),ae=pVe(X.anyOf),ve=vVe(X.anyOf).maxLength,Se=ze.useMemo(()=>Zv({},a,b.options),[a,b.options]),Pe=ze.useMemo(()=>{let Ze={};return Se.restrict&&(Ze={maxLength:ve}),Se.trim&&ve!==void 0&&(Ze.size=ve),Ze.list=t.id+"datalist",Ze},[Se,t.id]),[Me,Ie]=KL(V,"",i,B,void 0,void 0,!0,e),Ve=wi.createElement("datalist",{id:t.id+"datalist"},ae.enum.map(Ze=>wi.createElement("option",{value:Ze,key:Ze})));return wi.createElement(de,{type:"text",value:Me,onChange:Ie,onFocus:r,onBlur:n,className:o,id:s,label:ie,disabled:!d,autoFocus:Se.focus,fullWidth:!Se.trim||ve===void 0,inputProps:Pe,error:!L,endAdornment:Ve})};class qLt extends aMt{render(){return wi.createElement(aF,{...this.props,input:VLt})}}const GLt=t=>{const e=pVe(t),r=vVe(t),i=t.filter(a=>a!==e||a!==r).find(a=>a.type&&a.type!=="string");return e&&r&&!i},$Lt=vm(Qm("Control"),Qx(t=>Object.prototype.hasOwnProperty.call(t,"anyOf")&&GLt(t.anyOf))),WLt=bh(5,$Lt);var YLt=$w(qLt);const XLt=({data:t,visible:e,label:r,id:n,enabled:i,uischema:a,schema:o,rootSchema:s,handleChange:d,errors:b,path:L,config:B,description:V})=>{const X=b.length===0,ie=Zv({},B,a.options),de=!dE(e,V,!1,ie.showUnfocusedDescription),ae=!de&&!dE(e,V,!0,!0),U=de?V:X?null:b,ve=de&&!X?b:null,Se=[],Pe=`${n}-tip`,Me=`${n}-help1`,Ie=`${n}-help2`;ae&&Se.push(Pe),U&&Se.push(Me),ve&&Se.push(Ie);const Ve=Se.join(" ");return e?wi.createElement(wi.Fragment,null,wi.createElement(Zh,{id:Pe,title:ae?V:""},wi.createElement(F8,{label:r,id:n,control:wi.createElement(g0e,{id:`${n}-input`,isValid:Eh(b),data:t,enabled:i,visible:e,path:L,uischema:a,schema:o,rootSchema:s,handleChange:d,errors:b,config:B,inputProps:{"aria-describedby":Ve}})})),wi.createElement(w1,{id:Me,error:!X&&!de},U),wi.createElement(w1,{id:Ie,error:!X},ve)):null},ZLt=bh(2,nX);var KLt=$w(XLt);const JLt=({data:t,visible:e,label:r,id:n,enabled:i,uischema:a,schema:o,rootSchema:s,handleChange:d,errors:b,path:L,config:B,description:V})=>{const X=b.length===0,ie=Zv({},B,a.options),de=!dE(e,V,!1,ie.showUnfocusedDescription),ae=!de&&!dE(e,V,!0,!0),U=de?V:X?null:b,ve=de&&!X?b:null,Se=[],Pe=`${n}-tip`,Me=`${n}-help1`,Ie=`${n}-help2`;ae&&Se.push(Pe),U&&Se.push(Me),ve&&Se.push(Ie);const Ve=Se.join(" ");return e?wi.createElement(wi.Fragment,null,wi.createElement(Zh,{id:Pe,title:ae?V:""},wi.createElement(F8,{label:r,id:n,control:wi.createElement(dVe,{id:`${n}-input`,isValid:Eh(b),data:t,enabled:i,visible:e,path:L,uischema:a,schema:o,rootSchema:s,handleChange:d,errors:b,config:B,inputProps:{"aria-describedby":Ve}})})),wi.createElement(w1,{id:Me,error:!X&&!de},U),wi.createElement(w1,{id:Ie,error:!X},ve)):null},QLt=bh(3,vm(nX,nM("toggle",!0)));var e6t=$w(JLt);const t6t=t=>{const[e,r,n]=eT(),{description:i,id:a,errors:o,label:s,uischema:d,visible:b,enabled:L,required:B,path:V,handleChange:X,data:ie,config:de}=t,ae=o.length===0,U=Zv({},de,d.options),ve=!dE(b,i,e,U.showUnfocusedDescription),[Se,Pe]=ze.useState(0),[Me,Ie]=ze.useState(!1),Ve=U.dateFormat??"YYYY-MM-DD",Ze=U.dateSaveFormat??EAt,Je=U.views??["year","day"],nt=ve?i:ae?null:o,ut=ve&&!ae?o:null,ht=ze.useCallback(()=>Pe(Lt=>Lt+1),[]),_t=ze.useMemo(()=>y0e(V,X,Ze),[V,X,Ze]),Dt=ze.useMemo(()=>b0e(V,X,Ve,Ze,ht,n),[V,X,Ve,Ze,ht]),qt=x0e(ie,Ze);return b?wi.createElement(uX,{dateAdapter:m0e},wi.createElement(z4t,{open:Me,onOpen:()=>Ie(!0),onClose:()=>Ie(!1),key:Se,label:s,value:qt,onAccept:_t,format:Ve,views:Je,disabled:!L,slotProps:{actionBar:({wrapperVariant:Lt})=>({actions:Lt==="desktop"?[]:["clear","cancel","accept"]}),textField:{id:a+"-input",required:B&&!U.hideRequiredAsterisk,autoFocus:U.focus,error:!ae,fullWidth:!U.trim,inputProps:{type:"text"},InputLabelProps:ie?{shrink:!0}:void 0,onFocus:r,onBlur:Dt}}}),wi.createElement(w1,{error:!ae&&!ve},nt),wi.createElement(w1,{error:!ae},ut)):null},r6t=bh(4,Hge);var n6t=$w(t6t);const i6t=t=>{const[e,r,n]=eT(),{id:i,description:a,errors:o,label:s,uischema:d,visible:b,enabled:L,required:B,path:V,handleChange:X,data:ie,config:de}=t,ae=Zv({},de,d.options),U=o.length===0,ve=!dE(b,a,e,ae.showUnfocusedDescription),Se=ae.dateTimeFormat??"YYYY-MM-DD HH:mm",Pe=ae.dateTimeSaveFormat??CAt,[Me,Ie]=ze.useState(0),[Ve,Ze]=ze.useState(!1),Je=ae.views??["year","day","hours","minutes"],nt=ve?a:U?null:o,ut=ve&&!U?o:null,ht=ze.useCallback(()=>Ie(Lt=>Lt+1),[]),_t=ze.useMemo(()=>y0e(V,X,Pe),[V,X,Pe]),Dt=ze.useMemo(()=>b0e(V,X,Se,Pe,ht,n),[V,X,Se,Pe,ht]),qt=x0e(ie,Pe);return b?wi.createElement(uX,{dateAdapter:m0e},wi.createElement(TDt,{open:Ve,onOpen:()=>Ze(!0),onClose:()=>Ze(!1),key:Me,label:s,value:qt,onAccept:_t,format:Se,ampm:!!ae.ampm,views:Je,disabled:!L,slotProps:{actionBar:({wrapperVariant:Lt})=>({actions:Lt==="desktop"?[]:["clear","cancel","accept"]}),textField:{id:i+"-input",required:B&&!ae.hideRequiredAsterisk,autoFocus:ae.focus,error:!U,fullWidth:!ae.trim,inputProps:{type:"text"},InputLabelProps:ie?{shrink:!0}:void 0,onFocus:r,onBlur:Dt}}}),wi.createElement(w1,{error:!U&&!ve},nt),wi.createElement(w1,{error:!U},ut)):null},a6t=bh(2,yCt);var o6t=$w(i6t);const s6t=t=>{const{config:e,uischema:r,errors:n}=t,i=Zv({},e,r.options),a=n.length===0;return i.autocomplete===!1?wi.createElement(aF,{...t,input:yX}):wi.createElement(iVe,{...t,isValid:a})},l6t=bh(2,Bge);var u6t=WHe(jk(wi.memo(s6t)),!1);const c6t=t=>wi.createElement(aF,{...t,input:uVe}),f6t=bh(2,THe);var d6t=$w(c6t);const h6t=t=>{const[e,r,n]=eT(),{id:i,errors:a,label:o,schema:s,description:d,enabled:b,visible:L,required:B,path:V,handleChange:X,data:ie,config:de}=t,ae=a.length===0,U=Zv({},de,t.uischema.options),[ve,Se]=KL(X,"",ie,V,void 0,void 0,!0,e),Pe=U.format??s.format,Me=!dE(L,d,e,U.showUnfocusedDescription);return L?wi.createElement(zg,{required:XB(B,U.hideRequiredAsterisk),id:i+"-input",label:o,type:Pe,error:!ae,disabled:!b,fullWidth:!U.trim,onFocus:r,onBlur:n,helperText:ae?Me?d:null:a,InputLabelProps:{shrink:!0},value:ve,onChange:Se}):null},p6t=bh(2,K8(Hge,jge));var v6t=$w(h6t);const m6t=t=>wi.createElement(aF,{...t,input:cVe}),g6t=bh(2,EHe);var y6t=$w(m6t);const b6t=t=>{const{config:e,uischema:r,errors:n}=t,i=Zv({},e,r.options),a=n.length===0;return i.autocomplete===!1?wi.createElement(aF,{...t,input:yX}):wi.createElement(iVe,{...t,isValid:a})},x6t=bh(5,Uge);var _6t=YHe(jk(wi.memo(b6t)),!1);const mVe=t=>{const[e,r,n]=eT(),{config:i,label:a,required:o,description:s,errors:d,data:b,visible:L,options:B,handleChange:V,path:X,enabled:ie}=t,de=d.length===0,ae=Zv({},i,t.uischema.options),U=!dE(L,s,e,ae.showUnfocusedDescription);return L?wi.createElement(j5,{component:"fieldset",fullWidth:!ae.trim,onFocus:r,onBlur:n},wi.createElement(z8,{error:!de,component:"legend",required:XB(o,ae.hideRequiredAsterisk)},a),wi.createElement(ayt,{value:t.data??"",row:!0},B.map(ve=>wi.createElement(F8,{value:ve.value,key:ve.label,control:wi.createElement(ryt,{checked:b===ve.value,onChange:()=>V(X,ve.value)}),label:ve.label,disabled:!ie}))),wi.createElement(w1,{error:!de},de?U?s:null:d)):null},w6t=t=>wi.createElement(mVe,{...t}),S6t=bh(20,vm(Uge,nM("format","radio")));var T6t=YHe(w6t);const E6t=t=>wi.createElement(mVe,{...t}),A6t=bh(20,vm(Bge,nM("format","radio")));var C6t=WHe(E6t);const M6t=t=>{const[e,r,n]=eT(),{id:i,data:a,description:o,enabled:s,errors:d,label:b,schema:L,handleChange:B,visible:V,path:X,required:ie,config:de}=t,ae=d.length===0,U=Zv({},de,t.uischema.options),ve={whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",width:"100%"},Se={display:"flex"},Pe={flexGrow:"1"},Me={marginTop:"7px"},Ie=!dE(V,o,e,U.showUnfocusedDescription),Ve=ze.useCallback((Ze,Je)=>B(X,Number(Je)),[X,B]);return V?wi.createElement(j5,{fullWidth:!U.trim,onFocus:r,onBlur:n,id:i},wi.createElement(z8,{htmlFor:i,error:!ae,component:"legend",required:XB(ie,U.hideRequiredAsterisk)},wi.createElement(Su,{id:i+"-typo",style:ve,variant:"caption"},b)),wi.createElement("div",{style:Se},wi.createElement(Su,{style:Pe,variant:"caption",align:"left"},L.minimum),wi.createElement(Su,{style:Pe,variant:"caption",align:"right"},L.maximum)),wi.createElement(Sme,{style:Me,min:L.minimum,max:L.maximum,value:Number(a||L.default),onChange:Ve,id:i+"-input",disabled:!s,step:L.multipleOf||1}),wi.createElement(w1,{error:!ae},ae?Ie?o:null:d)):null},R6t=bh(4,wCt);var k6t=$w(M6t);const I6t=t=>wi.createElement(aF,{...t,input:fVe}),P6t=bh(1,AHe);var D6t=$w(I6t);const L6t=t=>{const[e,r,n]=eT(),{id:i,description:a,errors:o,label:s,uischema:d,visible:b,enabled:L,required:B,path:V,handleChange:X,data:ie,config:de}=t,ae=Zv({},de,d.options),U=o.length===0,[ve,Se]=ze.useState(0),[Pe,Me]=ze.useState(!1),Ie=!dE(b,a,e,ae.showUnfocusedDescription),Ve=ae.timeFormat??"HH:mm",Ze=ae.timeSaveFormat??AAt,Je=ae.views??["hours","minutes"],nt=Ie?a:U?null:o,ut=Ie&&!U?o:null,ht=ze.useCallback(()=>Se(Lt=>Lt+1),[]),_t=ze.useMemo(()=>y0e(V,X,Ze),[V,X,Ze]),Dt=ze.useMemo(()=>b0e(V,X,Ve,Ze,ht,n),[V,X,Ve,Ze,ht]),qt=x0e(ie,Ze);return b?wi.createElement(uX,{dateAdapter:m0e},wi.createElement(iDt,{open:Pe,onOpen:()=>Me(!0),onClose:()=>Me(!1),key:ve,label:s,value:qt,onAccept:_t,format:Ve,ampm:!!ae.ampm,views:Je,disabled:!L,slotProps:{actionBar:({wrapperVariant:Lt})=>({actions:Lt==="desktop"?[]:["clear","cancel","accept"]}),textField:{id:i+"-input",required:B&&!ae.hideRequiredAsterisk,autoFocus:ae.focus,error:!U,fullWidth:!ae.trim,inputProps:{type:"text"},InputLabelProps:ie?{shrink:!0}:void 0,onFocus:r,onBlur:Dt}}}),wi.createElement(w1,{error:!U&&!Ie},nt),wi.createElement(w1,{error:!U},ut)):null},O6t=bh(4,jge);var N6t=$w(L6t);const zie={float:"right"},F6t=t=>{const[e]=ze.useState(Ghe("expand-panel"));ze.useEffect(()=>()=>{$he(e)},[e]);const{enabled:r,childLabel:n,childPath:i,index:a,expanded:o,moveDown:s,moveUp:d,enableMoveDown:b,enableMoveUp:L,handleExpansion:B,removeItems:V,path:X,rootSchema:ie,schema:de,uischema:ae,uischemas:U,renderers:ve,cells:Se,config:Pe,translations:Me,disableRemove:Ie}=t,Ve=ze.useMemo(()=>iX(U,de,ae.scope,X,void 0,ae,ie),[U,de,ae.scope,X,ae,ie]),Ze=Zv({},Pe,ae.options),Je=Ze.showSortButtons||Ze.showArrayLayoutSortButtons;return wi.createElement(bhe,{"aria-labelledby":e,expanded:o,onChange:B(i)},wi.createElement(_he,{expandIcon:wi.createElement(o8,null)},wi.createElement(Ov,{container:!0,alignItems:"center"},wi.createElement(Ov,{item:!0,xs:7,md:9},wi.createElement(Ov,{container:!0,alignItems:"center"},wi.createElement(Ov,{item:!0,xs:2,md:1},wi.createElement(w9e,{"aria-label":"Index"},a+1)),wi.createElement(Ov,{item:!0,xs:10,md:11},wi.createElement("span",{id:e},n)))),wi.createElement(Ov,{item:!0,xs:5,md:3},wi.createElement(Ov,{container:!0,justifyContent:"flex-end"},wi.createElement(Ov,{item:!0},wi.createElement(Ov,{container:!0,direction:"row",justifyContent:"center",alignItems:"center"},Je&&r?wi.createElement(ze.Fragment,null,wi.createElement(Ov,{item:!0},wi.createElement(Zh,{id:"tooltip-up",title:Me.up,placement:"bottom",open:L?void 0:!1},wi.createElement(Zf,{onClick:d(X,a),style:zie,disabled:!L,"aria-label":Me.upAriaLabel,size:"large"},wi.createElement(KHe,null)))),wi.createElement(Ov,{item:!0},wi.createElement(Zh,{id:"tooltip-down",title:Me.down,placement:"bottom",open:b?void 0:!1},wi.createElement(Zf,{onClick:s(X,a),style:zie,disabled:!b,"aria-label":Me.downAriaLabel,size:"large"},wi.createElement(ZHe,null))))):"",r&&!Ie&&wi.createElement(Ov,{item:!0},wi.createElement(Zh,{id:"tooltip-remove",title:Me.removeTooltip,placement:"bottom"},wi.createElement(Zf,{onClick:V(X,[a]),style:zie,"aria-label":Me.removeAriaLabel,size:"large"},wi.createElement(eF,null)))))))))),wi.createElement(xhe,null,wi.createElement(z5,{enabled:r,schema:de,uischema:Ve,path:i,key:i,renderers:ve,cells:Se})))},z6t=wi.memo(F6t),B6t=t=>({removeItems:ze.useCallback((e,r)=>n=>{n.stopPropagation(),t(NC(e,i=>(r.sort().reverse().forEach(a=>i.splice(a,1)),i),{type:"REMOVE",indices:r}))},[t]),moveUp:ze.useCallback((e,r)=>n=>{n.stopPropagation(),t(NC(e,i=>(NHe(i,r),i),{type:"MOVE",moves:[{from:r,to:r-1}]}))},[t]),moveDown:ze.useCallback((e,r)=>n=>{n.stopPropagation(),t(NC(e,i=>(FHe(i,r),i),{type:"MOVE",moves:[{from:r,to:r+1}]}))},[t])}),U6t=t=>function({ctx:r,props:n}){const i=B6t(r.dispatch),{childLabelProp:a,schema:o,uischema:s,rootSchema:d,path:b,index:L,uischemas:B}=n,V=X8(b,`${L}`),X=ze.useMemo(()=>jHe(r.core.data,V,a,o,d,r.i18n.translate,s),[r.core.data,V,a,o,d,r.i18n.translate,s]);return wi.createElement(t,{...n,...i,childLabel:X,childPath:V,uischemas:B})},H6t=t=>t_(U6t(t));var j6t=H6t(z6t);const V6t=bh(1,Qm("Group")),q6t={marginBottom:"10px"},G6t=wi.memo(function({visible:e,enabled:r,uischema:n,label:i,...a}){const o=n;return e?wi.createElement(Rvt,{style:q6t},!Eh(i)&&wi.createElement(Uvt,{title:i}),wi.createElement(Dvt,null,wi.createElement(eU,{...a,visible:e,enabled:r,elements:o.elements}))):null}),$6t=({uischema:t,schema:e,path:r,visible:n,enabled:i,renderers:a,cells:o,direction:s,label:d})=>{const b=t;return wi.createElement(G6t,{elements:b.elements,schema:e,path:r,direction:s,visible:n,enabled:i,uischema:t,renderers:a,cells:o,label:d})};var W6t=ZB($6t);const Y6t=hCt(1,V6t),X6t=bh(2,Qm("HorizontalLayout")),Z6t=({uischema:t,renderers:e,cells:r,schema:n,path:i,enabled:a,visible:o})=>{const d={elements:t.elements,schema:n,path:i,enabled:a,direction:"row",visible:o};return wi.createElement(eU,{...d,renderers:e,cells:r})};var K6t=ZB(Z6t);const J6t=bh(1,Qm("VerticalLayout")),Q6t=({uischema:t,schema:e,path:r,enabled:n,visible:i,renderers:a,cells:o})=>{const d={elements:t.elements,schema:e,path:r,enabled:n,direction:"column",visible:i};return wi.createElement(eU,{...d,renderers:a,cells:o})};var eOt=ZB(Q6t);const tOt=vm(Qm("Categorization"),t=>{const e=t;return e.elements&&e.elements.reduce((r,n)=>r&&n.type==="Category",!0)}),rOt=bh(1,tOt),nOt=t=>{const{data:e,path:r,renderers:n,cells:i,schema:a,uischema:o,visible:s,enabled:d,selected:b,onChange:L,ajv:B,t:V}=t,X=o,[ie,de]=ze.useState(o),[ae,U]=ze.useState(b??0),ve=ze.useMemo(()=>X.elements.filter(Ve=>Z8(Ve,e,void 0,B)),[X,e,B]);X!==ie&&(U(0),de(X));const Se=ae>=X.elements.length?0:ae,Pe={elements:ve[Se]?ve[Se].elements:[],schema:a,path:r,direction:"column",enabled:d,visible:s,renderers:n,cells:i},Me=(Ve,Ze)=>{L&&L(Ze,Se),U(Ze)},Ie=ze.useMemo(()=>ve.map(Ve=>Oge(Ve,V)),[ve,V]);return s?wi.createElement(wi.Fragment,null,wi.createElement(eme,{position:"static"},wi.createElement(LB,{value:Se,onChange:Me,textColor:"inherit",indicatorColor:"secondary",variant:"scrollable"},ve.map((Ve,Ze)=>wi.createElement(QN,{key:Ze,label:Ie[Ze]})))),wi.createElement("div",{style:{marginTop:"0.5em"}},wi.createElement(eU,{...Pe,key:Se}))):null};var iOt=oVe(jk(ZB(nOt)));const aOt=t=>{const[e,r]=ze.useState(!1),n=ze.useCallback(()=>Sk(t.schema,t.rootSchema),[t.schema]),i=ze.useCallback(ut=>(ht,_t)=>{r(_t?ut:!1)},[]),a=ut=>e===X8(t.path,`${ut}`),{enabled:o,data:s,path:d,schema:b,uischema:L,errors:B,addItem:V,renderers:X,cells:ie,label:de,required:ae,rootSchema:U,config:ve,uischemas:Se,description:Pe,disableAdd:Me,disableRemove:Ie,translations:Ve}=t,Ze=Zv({},ve,t.uischema.options),Je=Me||Ze.disableAdd,nt=Ie||Ze.disableRemove;return wi.createElement("div",null,wi.createElement(hVe,{translations:Ve,label:zHe(de,ae,Ze.hideRequiredAsterisk),description:Pe,errors:B,path:d,enabled:o,addItem:V,createDefault:n,disableAdd:Je}),wi.createElement("div",null,s>0?eje(XY(s),ut=>wi.createElement(j6t,{enabled:o,index:ut,expanded:a(ut),schema:b,path:d,handleExpansion:i,uischema:L,renderers:X,cells:ie,key:ut,rootSchema:U,enableMoveUp:ut!=0,enableMoveDown:ut<s-1,config:ve,childLabelProp:Ze.elementLabelProp,uischemas:Se,translations:Ve,disableRemove:nt})):wi.createElement("p",null,Ve.noDataMessage)))},oOt=wi.memo(aOt),sOt=({visible:t,addItem:e,translations:r,...n})=>{const i=ze.useCallback((a,o)=>e(a,o),[e]);return t?wi.createElement(oOt,{translations:r,visible:t,addItem:i,...n}):null},lOt=bh(4,xCt);var uOt=$ge(jk(Wge(sOt)));const cOt=t=>wi.createElement(g0e,{...t}),fOt=bh(2,nX);var dOt=x4(cOt);const hOt=t=>wi.createElement(dVe,{...t}),pOt=bh(3,vm(nX,nM("toggle",!0)));var vOt=x4(hOt);const mOt=t=>{const{data:e,className:r,id:n,enabled:i,uischema:a,path:o,handleChange:s,config:d,label:b}=t,L=ZL(),B=Zv({},d,a.options);return wi.createElement(L,{type:"date",value:e||"",onChange:V=>s(o,V.target.value),className:r,id:n,label:b,disabled:!i,autoFocus:B.focus,fullWidth:!0})},gOt=bh(2,Hge);var yOt=x4(mOt);const bOt=t=>wi.createElement(yX,{...t}),xOt=bh(2,Bge);var _Ot=KMt(jk(wi.memo(bOt)),!1);const wOt=t=>wi.createElement(uVe,{...t}),SOt=bh(2,THe);var TOt=x4(wOt);const EOt=t=>wi.createElement(cVe,{...t}),AOt=bh(2,EHe);var COt=x4(EOt);const MOt=t=>wi.createElement(_Lt,{...t}),ROt=bh(4,SCt);var kOt=x4(MOt);const IOt=t=>wi.createElement(yX,{...t}),POt=bh(2,Uge);var DOt=JMt(jk(wi.memo(IOt)),!1);const LOt=t=>wi.createElement(fVe,{...t}),OOt=bh(1,AHe);var NOt=x4(LOt);const FOt=t=>wi.createElement(SLt,{...t}),zOt=bh(2,jge);var BOt=x4(FOt);const UOt=bh(2,vm(Qm("Categorization"),ACt,nM("variant","stepper"))),HOt=t=>{const[e,r]=ze.useState(0),n=Ie=>{r(Ie)},{data:i,path:a,renderers:o,schema:s,uischema:d,visible:b,cells:L,config:B,ajv:V,t:X}=t,ie=d,de=Zv({},B,d.options),ae={textAlign:"right",width:"100%",margin:"1em auto"},U={float:"right"},ve={marginRight:"1em"},Se=ze.useMemo(()=>ie.elements.filter(Ie=>Z8(Ie,i,void 0,V)),[ie,i,V]),Pe={elements:Se[e].elements,schema:s,path:a,direction:"column",visible:b,renderers:o,cells:L},Me=ze.useMemo(()=>Se.map(Ie=>Oge(Ie,X)),[Se,X]);return b?wi.createElement(wi.Fragment,null,wi.createElement(M1t,{activeStep:e,nonLinear:!0},Se.map((Ie,Ve)=>wi.createElement(r1t,{key:Me[Ve]},wi.createElement(y1t,{onClick:()=>n(Ve)},Me[Ve])))),wi.createElement("div",null,wi.createElement(eU,{...Pe})),de.showNavButtons?wi.createElement("div",{style:ae},wi.createElement(Id,{style:U,variant:"contained",color:"primary",disabled:e>=Se.length-1,onClick:()=>n(e+1)},"Next"),wi.createElement(Id,{style:ve,color:"secondary",variant:"contained",disabled:e<=0,onClick:()=>n(e-1)},"Previous")):wi.createElement(wi.Fragment,null)):null};var jOt=oVe(jk(ZB(HOt)));const VOt=[{tester:fLt,renderer:dLt},{tester:ZLt,renderer:KLt},{tester:QLt,renderer:e6t},{tester:p6t,renderer:v6t},{tester:l6t,renderer:u6t},{tester:f6t,renderer:d6t},{tester:g6t,renderer:y6t},{tester:P6t,renderer:D6t},{tester:a6t,renderer:o6t},{tester:r6t,renderer:n6t},{tester:O6t,renderer:N6t},{tester:R6t,renderer:k6t},{tester:kLt,renderer:ILt},{tester:GDt,renderer:$Dt},{tester:YDt,renderer:XDt},{tester:DLt,renderer:LLt},{tester:A6t,renderer:C6t},{tester:S6t,renderer:T6t},{tester:x6t,renderer:_6t},{tester:Y6t,renderer:W6t},{tester:X6t,renderer:K6t},{tester:J6t,renderer:eOt},{tester:rOt,renderer:iOt},{tester:UOt,renderer:jOt},{tester:lOt,renderer:uOt},{tester:OLt,renderer:FLt},{tester:HLt,renderer:jLt},{tester:WLt,renderer:YLt},{tester:CLt,renderer:MLt}],_0e=[{tester:fOt,cell:dOt},{tester:pOt,cell:vOt},{tester:gOt,cell:yOt},{tester:xOt,cell:_Ot},{tester:SOt,cell:TOt},{tester:AOt,cell:COt},{tester:ROt,cell:kOt},{tester:POt,cell:DOt},{tester:OOt,cell:NOt},{tester:zOt,cell:BOt}];var gVe=Symbol.for("immer-nothing"),sRe=Symbol.for("immer-draftable"),hE=Symbol.for("immer-state");function LC(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var s8=Object.getPrototypeOf;function l8(t){return!!t&&!!t[hE]}function EL(t){return t?yVe(t)||Array.isArray(t)||!!t[sRe]||!!t.constructor?.[sRe]||tU(t)||xX(t):!1}var qOt=Object.prototype.constructor.toString();function yVe(t){if(!t||typeof t!="object")return!1;const e=s8(t);if(e===null)return!0;const r=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===qOt}function m$(t,e){bX(t)===0?Reflect.ownKeys(t).forEach(r=>{e(r,t[r],t)}):t.forEach((r,n)=>e(n,r,t))}function bX(t){const e=t[hE];return e?e.type_:Array.isArray(t)?1:tU(t)?2:xX(t)?3:0}function rpe(t,e){return bX(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function bVe(t,e,r){const n=bX(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function GOt(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}function tU(t){return t instanceof Map}function xX(t){return t instanceof Set}function UD(t){return t.copy_||t.base_}function npe(t,e){if(tU(t))return new Map(t);if(xX(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const r=yVe(t);if(e===!0||e==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(t);delete n[hE];let i=Reflect.ownKeys(n);for(let a=0;a<i.length;a++){const o=i[a],s=n[o];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(n[o]={configurable:!0,writable:!0,enumerable:s.enumerable,value:t[o]})}return Object.create(s8(t),n)}else{const n=s8(t);if(n!==null&&r)return{...t};const i=Object.create(n);return Object.assign(i,t)}}function w0e(t,e=!1){return _X(t)||l8(t)||!EL(t)||(bX(t)>1&&Object.defineProperties(t,{set:{value:rV},add:{value:rV},clear:{value:rV},delete:{value:rV}}),Object.freeze(t),e&&Object.values(t).forEach(r=>w0e(r,!0))),t}function rV(){LC(2)}function _X(t){return Object.isFrozen(t)}var $Ot={};function AL(t){const e=$Ot[t];return e||LC(0,t),e}var B9;function xVe(){return B9}function WOt(t,e){return{drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function lRe(t,e){e&&(AL("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function ipe(t){ape(t),t.drafts_.forEach(YOt),t.drafts_=null}function ape(t){t===B9&&(B9=t.parent_)}function uRe(t){return B9=WOt(B9,t)}function YOt(t){const e=t[hE];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function cRe(t,e){e.unfinalizedDrafts_=e.drafts_.length;const r=e.drafts_[0];return t!==void 0&&t!==r?(r[hE].modified_&&(ipe(e),LC(4)),EL(t)&&(t=g$(e,t),e.parent_||y$(e,t)),e.patches_&&AL("Patches").generateReplacementPatches_(r[hE].base_,t,e.patches_,e.inversePatches_)):t=g$(e,r,[]),ipe(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==gVe?t:void 0}function g$(t,e,r){if(_X(e))return e;const n=e[hE];if(!n)return m$(e,(i,a)=>fRe(t,n,e,i,a,r)),e;if(n.scope_!==t)return e;if(!n.modified_)return y$(t,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const i=n.copy_;let a=i,o=!1;n.type_===3&&(a=new Set(i),i.clear(),o=!0),m$(a,(s,d)=>fRe(t,n,i,s,d,r,o)),y$(t,i,!1),r&&t.patches_&&AL("Patches").generatePatches_(n,r,t.patches_,t.inversePatches_)}return n.copy_}function fRe(t,e,r,n,i,a,o){if(l8(i)){const s=a&&e&&e.type_!==3&&!rpe(e.assigned_,n)?a.concat(n):void 0,d=g$(t,i,s);if(bVe(r,n,d),l8(d))t.canAutoFreeze_=!1;else return}else o&&r.add(i);if(EL(i)&&!_X(i)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;g$(t,i),(!e||!e.scope_.parent_)&&typeof n!="symbol"&&(tU(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&y$(t,i)}}function y$(t,e,r=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&w0e(e,r)}function XOt(t,e){const r=Array.isArray(t),n={type_:r?1:0,scope_:e?e.scope_:xVe(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,a=S0e;r&&(i=[n],a=U9);const{revoke:o,proxy:s}=Proxy.revocable(i,a);return n.draft_=s,n.revoke_=o,s}var S0e={get(t,e){if(e===hE)return t;const r=UD(t);if(!rpe(r,e))return ZOt(t,r,e);const n=r[e];return t.finalized_||!EL(n)?n:n===Bie(t.base_,e)?(Uie(t),t.copy_[e]=spe(n,t)):n},has(t,e){return e in UD(t)},ownKeys(t){return Reflect.ownKeys(UD(t))},set(t,e,r){const n=_Ve(UD(t),e);if(n?.set)return n.set.call(t.draft_,r),!0;if(!t.modified_){const i=Bie(UD(t),e),a=i?.[hE];if(a&&a.base_===r)return t.copy_[e]=r,t.assigned_[e]=!1,!0;if(GOt(r,i)&&(r!==void 0||rpe(t.base_,e)))return!0;Uie(t),ope(t)}return t.copy_[e]===r&&(r!==void 0||e in t.copy_)||Number.isNaN(r)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=r,t.assigned_[e]=!0),!0},deleteProperty(t,e){return Bie(t.base_,e)!==void 0||e in t.base_?(t.assigned_[e]=!1,Uie(t),ope(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const r=UD(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.type_!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty(){LC(11)},getPrototypeOf(t){return s8(t.base_)},setPrototypeOf(){LC(12)}},U9={};m$(S0e,(t,e)=>{U9[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}});U9.deleteProperty=function(t,e){return U9.set.call(this,t,e,void 0)};U9.set=function(t,e,r){return S0e.set.call(this,t[0],e,r,t[0])};function Bie(t,e){const r=t[hE];return(r?UD(r):t)[e]}function ZOt(t,e,r){const n=_Ve(e,r);return n?"value"in n?n.value:n.get?.call(t.draft_):void 0}function _Ve(t,e){if(!(e in t))return;let r=s8(t);for(;r;){const n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=s8(r)}}function ope(t){t.modified_||(t.modified_=!0,t.parent_&&ope(t.parent_))}function Uie(t){t.copy_||(t.copy_=npe(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var KOt=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,r,n)=>{if(typeof e=="function"&&typeof r!="function"){const a=r;r=e;const o=this;return function(d=a,...b){return o.produce(d,L=>r.call(this,L,...b))}}typeof r!="function"&&LC(6),n!==void 0&&typeof n!="function"&&LC(7);let i;if(EL(e)){const a=uRe(this),o=spe(e,void 0);let s=!0;try{i=r(o),s=!1}finally{s?ipe(a):ape(a)}return lRe(a,n),cRe(i,a)}else if(!e||typeof e!="object"){if(i=r(e),i===void 0&&(i=e),i===gVe&&(i=void 0),this.autoFreeze_&&w0e(i,!0),n){const a=[],o=[];AL("Patches").generateReplacementPatches_(e,i,a,o),n(a,o)}return i}else LC(1,e)},this.produceWithPatches=(e,r)=>{if(typeof e=="function")return(o,...s)=>this.produceWithPatches(o,d=>e(d,...s));let n,i;return[this.produce(e,r,(o,s)=>{n=o,i=s}),n,i]},typeof t?.autoFreeze=="boolean"&&this.setAutoFreeze(t.autoFreeze),typeof t?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(t.useStrictShallowCopy)}createDraft(t){EL(t)||LC(8),l8(t)&&(t=JOt(t));const e=uRe(this),r=spe(t,void 0);return r[hE].isManual_=!0,ape(e),r}finishDraft(t,e){const r=t&&t[hE];(!r||!r.isManual_)&&LC(9);const{scope_:n}=r;return lRe(n,e),cRe(void 0,n)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}applyPatches(t,e){let r;for(r=e.length-1;r>=0;r--){const i=e[r];if(i.path.length===0&&i.op==="replace"){t=i.value;break}}r>-1&&(e=e.slice(r+1));const n=AL("Patches").applyPatches_;return l8(t)?n(t,e):this.produce(t,i=>n(i,e))}};function spe(t,e){const r=tU(t)?AL("MapSet").proxyMap_(t,e):xX(t)?AL("MapSet").proxySet_(t,e):XOt(t,e);return(e?e.scope_:xVe()).drafts_.push(r),r}function JOt(t){return l8(t)||LC(10,t),wVe(t)}function wVe(t){if(!EL(t)||_X(t))return t;const e=t[hE];let r;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,r=npe(t,e.scope_.immer_.useStrictShallowCopy_)}else r=npe(t,!0);return m$(r,(n,i)=>{bVe(r,n,wVe(i))}),e&&(e.finalized_=!1),r}var QOt=new KOt,eNt=QOt.produce;const tNt=t=>(e,r,n)=>(n.setState=(i,a,...o)=>{const s=typeof i=="function"?eNt(i):i;return e(s,a,...o)},t(n.setState,r,n)),SVe=tNt,b$=PY()(SVe(t=>({selectedCategory:null,selectedExtensions:{},setSelectedCategory:e=>{t(r=>{r.selectedCategory=e})},setSelectedExtension:(e,r)=>{t(n=>{n.selectedExtensions[e]=r})}})));var JL=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},rNt={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},nNt=class{#t=rNt;#e=!1;setTimeoutProvider(t){this.#t=t}setTimeout(t,e){return this.#t.setTimeout(t,e)}clearTimeout(t){this.#t.clearTimeout(t)}setInterval(t,e){return this.#t.setInterval(t,e)}clearInterval(t){this.#t.clearInterval(t)}},JD=new nNt;function iNt(t){setTimeout(t,0)}var CL=typeof window>"u"||"Deno"in globalThis;function Bw(){}function aNt(t,e){return typeof t=="function"?t(e):t}function lpe(t){return typeof t=="number"&&t>=0&&t!==1/0}function TVe(t,e){return Math.max(t+(e||0)-Date.now(),0)}function qP(t,e){return typeof t=="function"?t(e):t}function L3(t,e){return typeof t=="function"?t(e):t}function dRe(t,e){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:o,stale:s}=t;if(o){if(n){if(e.queryHash!==T0e(o,e.options))return!1}else if(!H9(e.queryKey,o))return!1}if(r!=="all"){const d=e.isActive();if(r==="active"&&!d||r==="inactive"&&d)return!1}return!(typeof s=="boolean"&&e.isStale()!==s||i&&i!==e.state.fetchStatus||a&&!a(e))}function hRe(t,e){const{exact:r,status:n,predicate:i,mutationKey:a}=t;if(a){if(!e.options.mutationKey)return!1;if(r){if(ML(e.options.mutationKey)!==ML(a))return!1}else if(!H9(e.options.mutationKey,a))return!1}return!(n&&e.state.status!==n||i&&!i(e))}function T0e(t,e){return(e?.queryKeyHashFn||ML)(t)}function ML(t){return JSON.stringify(t,(e,r)=>upe(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function H9(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(r=>H9(t[r],e[r])):!1}var oNt=Object.prototype.hasOwnProperty;function E0e(t,e){if(t===e)return t;const r=pRe(t)&&pRe(e);if(!r&&!(upe(t)&&upe(e)))return e;const i=(r?t:Object.keys(t)).length,a=r?e:Object.keys(e),o=a.length,s=r?new Array(o):{};let d=0;for(let b=0;b<o;b++){const L=r?b:a[b],B=t[L],V=e[L];if(B===V){s[L]=B,(r?b<i:oNt.call(t,L))&&d++;continue}if(B===null||V===null||typeof B!="object"||typeof V!="object"){s[L]=V;continue}const X=E0e(B,V);s[L]=X,X===B&&d++}return i===o&&d===i?t:s}function j9(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const r in t)if(t[r]!==e[r])return!1;return!0}function pRe(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function upe(t){if(!vRe(t))return!1;const e=t.constructor;if(e===void 0)return!0;const r=e.prototype;return!(!vRe(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function vRe(t){return Object.prototype.toString.call(t)==="[object Object]"}function sNt(t){return new Promise(e=>{JD.setTimeout(e,t)})}function cpe(t,e,r){return typeof r.structuralSharing=="function"?r.structuralSharing(t,e):r.structuralSharing!==!1?E0e(t,e):e}function D0(t){return t}function lNt(t,e,r=0){const n=[...t,e];return r&&n.length>r?n.slice(1):n}function uNt(t,e,r=0){const n=[e,...t];return r&&n.length>r?n.slice(0,-1):n}var A0e=Symbol();function EVe(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===A0e?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function AVe(t,e){return typeof t=="function"?t(...e):!!t}var cNt=class extends JL{#t;#e;#r;constructor(){super(),this.#r=t=>{if(!CL&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#e||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#r=t,this.#e?.(),this.#e=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#t!==t&&(this.#t=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},C0e=new cNt;function fpe(){let t,e;const r=new Promise((i,a)=>{t=i,e=a});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),t(i)},r.reject=i=>{n({status:"rejected",reason:i}),e(i)},r}var fNt=iNt;function dNt(){let t=[],e=0,r=s=>{s()},n=s=>{s()},i=fNt;const a=s=>{e?t.push(s):i(()=>{r(s)})},o=()=>{const s=t;t=[],s.length&&i(()=>{n(()=>{s.forEach(d=>{r(d)})})})};return{batch:s=>{let d;e++;try{d=s()}finally{e--,e||o()}return d},batchCalls:s=>(...d)=>{a(()=>{s(...d)})},schedule:a,setNotifyFunction:s=>{r=s},setBatchNotifyFunction:s=>{n=s},setScheduler:s=>{i=s}}}var g1=dNt(),hNt=class extends JL{#t=!0;#e;#r;constructor(){super(),this.#r=t=>{if(!CL&&window.addEventListener){const e=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#e||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#r=t,this.#e?.(),this.#e=t(this.setOnline.bind(this))}setOnline(t){this.#t!==t&&(this.#t=t,this.listeners.forEach(r=>{r(t)}))}isOnline(){return this.#t}},x$=new hNt;function pNt(t){return Math.min(1e3*2**t,3e4)}function CVe(t){return(t??"online")==="online"?x$.isOnline():!0}var dpe=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function MVe(t){let e=!1,r=0,n;const i=fpe(),a=()=>i.status!=="pending",o=de=>{if(!a()){const ae=new dpe(de);V(ae),t.onCancel?.(ae)}},s=()=>{e=!0},d=()=>{e=!1},b=()=>C0e.isFocused()&&(t.networkMode==="always"||x$.isOnline())&&t.canRun(),L=()=>CVe(t.networkMode)&&t.canRun(),B=de=>{a()||(n?.(),i.resolve(de))},V=de=>{a()||(n?.(),i.reject(de))},X=()=>new Promise(de=>{n=ae=>{(a()||b())&&de(ae)},t.onPause?.()}).then(()=>{n=void 0,a()||t.onContinue?.()}),ie=()=>{if(a())return;let de;const ae=r===0?t.initialPromise:void 0;try{de=ae??t.fn()}catch(U){de=Promise.reject(U)}Promise.resolve(de).then(B).catch(U=>{if(a())return;const ve=t.retry??(CL?0:3),Se=t.retryDelay??pNt,Pe=typeof Se=="function"?Se(r,U):Se,Me=ve===!0||typeof ve=="number"&&r<ve||typeof ve=="function"&&ve(r,U);if(e||!Me){V(U);return}r++,t.onFail?.(r,U),sNt(Pe).then(()=>b()?void 0:X()).then(()=>{e?V(U):ie()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(n?.(),i),cancelRetry:s,continueRetry:d,canStart:L,start:()=>(L()?ie():X().then(ie),i)}}var RVe=class{#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),lpe(this.gcTime)&&(this.#t=JD.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(CL?1/0:300*1e3))}clearGcTimeout(){this.#t&&(JD.clearTimeout(this.#t),this.#t=void 0)}},vNt=class extends RVe{#t;#e;#r;#i;#n;#a;#s;constructor(t){super(),this.#s=!1,this.#a=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#i=t.client,this.#r=this.#i.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#t=mRe(this.options),this.state=t.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#n?.promise}setOptions(t){if(this.options={...this.#a,...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const e=mRe(this.options);e.data!==void 0&&(this.setData(e.data,{updatedAt:e.dataUpdatedAt,manual:!0}),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(t,e){const r=cpe(this.state.data,t,this.options);return this.#o({data:r,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),r}setState(t,e){this.#o({type:"setState",state:t,setStateOptions:e})}cancel(t){const e=this.#n?.promise;return this.#n?.cancel(t),e?e.then(Bw).catch(Bw):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#t)}isActive(){return this.observers.some(t=>L3(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===A0e||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>qP(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!TVe(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),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:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(t,e){if(this.state.fetchStatus!=="idle"&&this.#n?.status()!=="rejected"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(t&&this.setOptions(t),!this.options.queryFn){const s=this.observers.find(d=>d.options.queryFn);s&&this.setOptions(s.options)}const r=new AbortController,n=s=>{Object.defineProperty(s,"signal",{enumerable:!0,get:()=>(this.#s=!0,r.signal)})},i=()=>{const s=EVe(this.options,e),b=(()=>{const L={client:this.#i,queryKey:this.queryKey,meta:this.meta};return n(L),L})();return this.#s=!1,this.options.persister?this.options.persister(s,b,this):s(b)},o=(()=>{const s={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return n(s),s})();this.options.behavior?.onFetch(o,this),this.#e=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#o({type:"fetch",meta:o.fetchOptions?.meta}),this.#n=MVe({initialPromise:e?.initialPromise,fn:o.fetchFn,onCancel:s=>{s instanceof dpe&&s.revert&&this.setState({...this.#e,fetchStatus:"idle"}),r.abort()},onFail:(s,d)=>{this.#o({type:"failed",failureCount:s,error:d})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{const s=await this.#n.start();if(s===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(s),this.#r.config.onSuccess?.(s,this),this.#r.config.onSettled?.(s,this.state.error,this),s}catch(s){if(s instanceof dpe){if(s.silent)return this.#n.promise;if(s.revert){if(this.state.data===void 0)throw s;return this.state.data}}throw this.#o({type:"error",error:s}),this.#r.config.onError?.(s,this),this.#r.config.onSettled?.(this.state.data,s,this),s}finally{this.scheduleGc()}}#o(t){const e=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...kVe(r.data,this.options),fetchMeta:t.meta??null};case"success":const n={...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#e=t.manual?n:void 0,n;case"error":const i=t.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=e(this.state),g1.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:t})})}};function kVe(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:CVe(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function mRe(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,r=e!==void 0,n=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var wX=class extends JL{constructor(t,e){super(),this.options=e,this.#t=t,this.#o=null,this.#s=fpe(),this.bindMethods(),this.setOptions(e)}#t;#e=void 0;#r=void 0;#i=void 0;#n;#a;#s;#o;#h;#f;#d;#u;#c;#l;#v=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),gRe(this.#e,this.options)?this.#p():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return hpe(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return hpe(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#_(),this.#e.removeObserver(this)}setOptions(t){const e=this.options,r=this.#e;if(this.options=this.#t.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof L3(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#e.setOptions(this.options),e._defaulted&&!j9(this.options,e)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const n=this.hasListeners();n&&yRe(this.#e,r,this.options,e)&&this.#p(),this.updateResult(),n&&(this.#e!==r||L3(this.options.enabled,this.#e)!==L3(e.enabled,this.#e)||qP(this.options.staleTime,this.#e)!==qP(e.staleTime,this.#e))&&this.#m();const i=this.#g();n&&(this.#e!==r||L3(this.options.enabled,this.#e)!==L3(e.enabled,this.#e)||i!==this.#l)&&this.#y(i)}getOptimisticResult(t){const e=this.#t.getQueryCache().build(this.#t,t),r=this.createResult(e,t);return gNt(this,r)&&(this.#i=r,this.#a=this.options,this.#n=this.#e.state),r}getCurrentResult(){return this.#i}trackResult(t,e){return new Proxy(t,{get:(r,n)=>(this.trackProp(n),e?.(n),n==="promise"&&!this.options.experimental_prefetchInRender&&this.#s.status==="pending"&&this.#s.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(r,n))})}trackProp(t){this.#v.add(t)}getCurrentQuery(){return this.#e}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#t.defaultQueryOptions(t),r=this.#t.getQueryCache().build(this.#t,e);return r.fetch().then(()=>this.createResult(r,e))}fetch(t){return this.#p({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#p(t){this.#w();let e=this.#e.fetch(this.options,t);return t?.throwOnError||(e=e.catch(Bw)),e}#m(){this.#x();const t=qP(this.options.staleTime,this.#e);if(CL||this.#i.isStale||!lpe(t))return;const r=TVe(this.#i.dataUpdatedAt,t)+1;this.#u=JD.setTimeout(()=>{this.#i.isStale||this.updateResult()},r)}#g(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#y(t){this.#_(),this.#l=t,!(CL||L3(this.options.enabled,this.#e)===!1||!lpe(this.#l)||this.#l===0)&&(this.#c=JD.setInterval(()=>{(this.options.refetchIntervalInBackground||C0e.isFocused())&&this.#p()},this.#l))}#b(){this.#m(),this.#y(this.#g())}#x(){this.#u&&(JD.clearTimeout(this.#u),this.#u=void 0)}#_(){this.#c&&(JD.clearInterval(this.#c),this.#c=void 0)}createResult(t,e){const r=this.#e,n=this.options,i=this.#i,a=this.#n,o=this.#a,d=t!==r?t.state:this.#r,{state:b}=t;let L={...b},B=!1,V;if(e._optimisticResults){const Ze=this.hasListeners(),Je=!Ze&&gRe(t,e),nt=Ze&&yRe(t,r,e,n);(Je||nt)&&(L={...L,...kVe(b.data,t.options)}),e._optimisticResults==="isRestoring"&&(L.fetchStatus="idle")}let{error:X,errorUpdatedAt:ie,status:de}=L;V=L.data;let ae=!1;if(e.placeholderData!==void 0&&V===void 0&&de==="pending"){let Ze;i?.isPlaceholderData&&e.placeholderData===o?.placeholderData?(Ze=i.data,ae=!0):Ze=typeof e.placeholderData=="function"?e.placeholderData(this.#d?.state.data,this.#d):e.placeholderData,Ze!==void 0&&(de="success",V=cpe(i?.data,Ze,e),B=!0)}if(e.select&&V!==void 0&&!ae)if(i&&V===a?.data&&e.select===this.#h)V=this.#f;else try{this.#h=e.select,V=e.select(V),V=cpe(i?.data,V,e),this.#f=V,this.#o=null}catch(Ze){this.#o=Ze}this.#o&&(X=this.#o,V=this.#f,ie=Date.now(),de="error");const U=L.fetchStatus==="fetching",ve=de==="pending",Se=de==="error",Pe=ve&&U,Me=V!==void 0,Ve={status:de,fetchStatus:L.fetchStatus,isPending:ve,isSuccess:de==="success",isError:Se,isInitialLoading:Pe,isLoading:Pe,data:V,dataUpdatedAt:L.dataUpdatedAt,error:X,errorUpdatedAt:ie,failureCount:L.fetchFailureCount,failureReason:L.fetchFailureReason,errorUpdateCount:L.errorUpdateCount,isFetched:L.dataUpdateCount>0||L.errorUpdateCount>0,isFetchedAfterMount:L.dataUpdateCount>d.dataUpdateCount||L.errorUpdateCount>d.errorUpdateCount,isFetching:U,isRefetching:U&&!ve,isLoadingError:Se&&!Me,isPaused:L.fetchStatus==="paused",isPlaceholderData:B,isRefetchError:Se&&Me,isStale:M0e(t,e),refetch:this.refetch,promise:this.#s,isEnabled:L3(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const Ze=ut=>{Ve.status==="error"?ut.reject(Ve.error):Ve.data!==void 0&&ut.resolve(Ve.data)},Je=()=>{const ut=this.#s=Ve.promise=fpe();Ze(ut)},nt=this.#s;switch(nt.status){case"pending":t.queryHash===r.queryHash&&Ze(nt);break;case"fulfilled":(Ve.status==="error"||Ve.data!==nt.value)&&Je();break;case"rejected":(Ve.status!=="error"||Ve.error!==nt.reason)&&Je();break}}return Ve}updateResult(){const t=this.#i,e=this.createResult(this.#e,this.options);if(this.#n=this.#e.state,this.#a=this.options,this.#n.data!==void 0&&(this.#d=this.#e),j9(e,t))return;this.#i=e;const r=()=>{if(!t)return!0;const{notifyOnChangeProps:n}=this.options,i=typeof n=="function"?n():n;if(i==="all"||!i&&!this.#v.size)return!0;const a=new Set(i??this.#v);return this.options.throwOnError&&a.add("error"),Object.keys(this.#i).some(o=>{const s=o;return this.#i[s]!==t[s]&&a.has(s)})};this.#S({listeners:r()})}#w(){const t=this.#t.getQueryCache().build(this.#t,this.options);if(t===this.#e)return;const e=this.#e;this.#e=t,this.#r=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#S(t){g1.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#i)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function mNt(t,e){return L3(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function gRe(t,e){return mNt(t,e)||t.state.data!==void 0&&hpe(t,e,e.refetchOnMount)}function hpe(t,e,r){if(L3(e.enabled,t)!==!1&&qP(e.staleTime,t)!=="static"){const n=typeof r=="function"?r(t):r;return n==="always"||n!==!1&&M0e(t,e)}return!1}function yRe(t,e,r,n){return(t!==e||L3(n.enabled,t)===!1)&&(!r.suspense||t.state.status!=="error")&&M0e(t,r)}function M0e(t,e){return L3(e.enabled,t)!==!1&&t.isStaleByTime(qP(e.staleTime,t))}function gNt(t,e){return!j9(t.getCurrentResult(),e)}function _$(t){return{onFetch:(e,r)=>{const n=e.options,i=e.fetchOptions?.meta?.fetchMore?.direction,a=e.state.data?.pages||[],o=e.state.data?.pageParams||[];let s={pages:[],pageParams:[]},d=0;const b=async()=>{let L=!1;const B=ie=>{Object.defineProperty(ie,"signal",{enumerable:!0,get:()=>(e.signal.aborted?L=!0:e.signal.addEventListener("abort",()=>{L=!0}),e.signal)})},V=EVe(e.options,e.fetchOptions),X=async(ie,de,ae)=>{if(L)return Promise.reject();if(de==null&&ie.pages.length)return Promise.resolve(ie);const ve=(()=>{const Ie={client:e.client,queryKey:e.queryKey,pageParam:de,direction:ae?"backward":"forward",meta:e.options.meta};return B(Ie),Ie})(),Se=await V(ve),{maxPages:Pe}=e.options,Me=ae?uNt:lNt;return{pages:Me(ie.pages,Se,Pe),pageParams:Me(ie.pageParams,de,Pe)}};if(i&&a.length){const ie=i==="backward",de=ie?IVe:ppe,ae={pages:a,pageParams:o},U=de(n,ae);s=await X(ae,U,ie)}else{const ie=t??a.length;do{const de=d===0?o[0]??n.initialPageParam:ppe(n,s);if(d>0&&de==null)break;s=await X(s,de),d++}while(d<ie)}return s};e.options.persister?e.fetchFn=()=>e.options.persister?.(b,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},r):e.fetchFn=b}}}function ppe(t,{pages:e,pageParams:r}){const n=e.length-1;return e.length>0?t.getNextPageParam(e[n],e,r[n],r):void 0}function IVe(t,{pages:e,pageParams:r}){return e.length>0?t.getPreviousPageParam?.(e[0],e,r[0],r):void 0}function yNt(t,e){return e?ppe(t,e)!=null:!1}function bNt(t,e){return!e||!t.getPreviousPageParam?!1:IVe(t,e)!=null}var xNt=class extends wX{constructor(t,e){super(t,e)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(t){super.setOptions({...t,behavior:_$()})}getOptimisticResult(t){return t.behavior=_$(),super.getOptimisticResult(t)}fetchNextPage(t){return this.fetch({...t,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(t){return this.fetch({...t,meta:{fetchMore:{direction:"backward"}}})}createResult(t,e){const{state:r}=t,n=super.createResult(t,e),{isFetching:i,isRefetching:a,isError:o,isRefetchError:s}=n,d=r.fetchMeta?.fetchMore?.direction,b=o&&d==="forward",L=i&&d==="forward",B=o&&d==="backward",V=i&&d==="backward";return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:yNt(e,r.data),hasPreviousPage:bNt(e,r.data),isFetchNextPageError:b,isFetchingNextPage:L,isFetchPreviousPageError:B,isFetchingPreviousPage:V,isRefetchError:s&&!b&&!B,isRefetching:a&&!L&&!V}}},_Nt=class extends RVe{#t;#e;#r;#i;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#r=t.mutationCache,this.#e=[],this.state=t.state||PVe(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(e=>e!==t),this.scheduleGc(),this.#r.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#r.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(t){const e=()=>{this.#n({type:"continue"})},r={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=MVe({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(a,o)=>{this.#n({type:"failed",failureCount:a,error:o})},onPause:()=>{this.#n({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#r.canRun(this)});const n=this.state.status==="pending",i=!this.#i.canStart();try{if(n)e();else{this.#n({type:"pending",variables:t,isPaused:i}),await this.#r.config.onMutate?.(t,this,r);const o=await this.options.onMutate?.(t,r);o!==this.state.context&&this.#n({type:"pending",context:o,variables:t,isPaused:i})}const a=await this.#i.start();return await this.#r.config.onSuccess?.(a,t,this.state.context,this,r),await this.options.onSuccess?.(a,t,this.state.context,r),await this.#r.config.onSettled?.(a,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(a,null,t,this.state.context,r),this.#n({type:"success",data:a}),a}catch(a){try{throw await this.#r.config.onError?.(a,t,this.state.context,this,r),await this.options.onError?.(a,t,this.state.context,r),await this.#r.config.onSettled?.(void 0,a,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(void 0,a,t,this.state.context,r),a}finally{this.#n({type:"error",error:a})}}finally{this.#r.runNext(this)}}#n(t){const e=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=e(this.state),g1.batch(()=>{this.#e.forEach(r=>{r.onMutationUpdate(t)}),this.#r.notify({mutation:this,type:"updated",action:t})})}};function PVe(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var wNt=class extends JL{constructor(t={}){super(),this.config=t,this.#t=new Set,this.#e=new Map,this.#r=0}#t;#e;#r;build(t,e,r){const n=new _Nt({client:t,mutationCache:this,mutationId:++this.#r,options:t.defaultMutationOptions(e),state:r});return this.add(n),n}add(t){this.#t.add(t);const e=nV(t);if(typeof e=="string"){const r=this.#e.get(e);r?r.push(t):this.#e.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#t.delete(t)){const e=nV(t);if(typeof e=="string"){const r=this.#e.get(e);if(r)if(r.length>1){const n=r.indexOf(t);n!==-1&&r.splice(n,1)}else r[0]===t&&this.#e.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=nV(t);if(typeof e=="string"){const n=this.#e.get(e)?.find(i=>i.state.status==="pending");return!n||n===t}else return!0}runNext(t){const e=nV(t);return typeof e=="string"?this.#e.get(e)?.find(n=>n!==t&&n.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){g1.batch(()=>{this.#t.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#t.clear(),this.#e.clear()})}getAll(){return Array.from(this.#t)}find(t){const e={exact:!0,...t};return this.getAll().find(r=>hRe(e,r))}findAll(t={}){return this.getAll().filter(e=>hRe(t,e))}notify(t){g1.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(e=>e.state.isPaused);return g1.batch(()=>Promise.all(t.map(e=>e.continue().catch(Bw))))}};function nV(t){return t.options.scope?.id}var SNt=class extends JL{#t;#e=void 0;#r;#i;constructor(e,r){super(),this.#t=e,this.setOptions(r),this.bindMethods(),this.#n()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){const r=this.options;this.options=this.#t.defaultMutationOptions(e),j9(this.options,r)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),r?.mutationKey&&this.options.mutationKey&&ML(r.mutationKey)!==ML(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(e){this.#n(),this.#a(e)}getCurrentResult(){return this.#e}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#n(),this.#a()}mutate(e,r){return this.#i=r,this.#r?.removeObserver(this),this.#r=this.#t.getMutationCache().build(this.#t,this.options),this.#r.addObserver(this),this.#r.execute(e)}#n(){const e=this.#r?.state??PVe();this.#e={...e,isPending:e.status==="pending",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset}}#a(e){g1.batch(()=>{if(this.#i&&this.hasListeners()){const r=this.#e.variables,n=this.#e.context,i={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};e?.type==="success"?(this.#i.onSuccess?.(e.data,r,n,i),this.#i.onSettled?.(e.data,null,r,n,i)):e?.type==="error"&&(this.#i.onError?.(e.error,r,n,i),this.#i.onSettled?.(void 0,e.error,r,n,i))}this.listeners.forEach(r=>{r(this.#e)})})}};function bRe(t,e){const r=new Set(e);return t.filter(n=>!r.has(n))}function TNt(t,e,r){const n=t.slice(0);return n[e]=r,n}var ENt=class extends JL{#t;#e;#r;#i;#n;#a;#s;#o;#h=[];constructor(t,e,r){super(),this.#t=t,this.#i=r,this.#r=[],this.#n=[],this.#e=[],this.setQueries(e)}onSubscribe(){this.listeners.size===1&&this.#n.forEach(t=>{t.subscribe(e=>{this.#c(t,e)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#n.forEach(t=>{t.destroy()})}setQueries(t,e){this.#r=t,this.#i=e,g1.batch(()=>{const r=this.#n,n=this.#u(this.#r);this.#h=n,n.forEach(L=>L.observer.setOptions(L.defaultedQueryOptions));const i=n.map(L=>L.observer),a=i.map(L=>L.getCurrentResult()),o=r.length!==i.length,s=i.some((L,B)=>L!==r[B]),d=o||s,b=d?!0:a.some((L,B)=>{const V=this.#e[B];return!V||!j9(L,V)});!d&&!b||(d&&(this.#n=i),this.#e=a,this.hasListeners()&&(d&&(bRe(r,i).forEach(L=>{L.destroy()}),bRe(i,r).forEach(L=>{L.subscribe(B=>{this.#c(L,B)})})),this.#l()))})}getCurrentResult(){return this.#e}getQueries(){return this.#n.map(t=>t.getCurrentQuery())}getObservers(){return this.#n}getOptimisticResult(t,e){const r=this.#u(t),n=r.map(i=>i.observer.getOptimisticResult(i.defaultedQueryOptions));return[n,i=>this.#d(i??n,e),()=>this.#f(n,r)]}#f(t,e){return e.map((r,n)=>{const i=t[n];return r.defaultedQueryOptions.notifyOnChangeProps?i:r.observer.trackResult(i,a=>{e.forEach(o=>{o.observer.trackProp(a)})})})}#d(t,e){return e?((!this.#a||this.#e!==this.#o||e!==this.#s)&&(this.#s=e,this.#o=this.#e,this.#a=E0e(this.#a,e(t))),this.#a):t}#u(t){const e=new Map(this.#n.map(n=>[n.options.queryHash,n])),r=[];return t.forEach(n=>{const i=this.#t.defaultQueryOptions(n),a=e.get(i.queryHash);a?r.push({defaultedQueryOptions:i,observer:a}):r.push({defaultedQueryOptions:i,observer:new wX(this.#t,i)})}),r}#c(t,e){const r=this.#n.indexOf(t);r!==-1&&(this.#e=TNt(this.#e,r,e),this.#l())}#l(){if(this.hasListeners()){const t=this.#a,e=this.#f(this.#e,this.#h),r=this.#d(e,this.#i?.combine);t!==r&&g1.batch(()=>{this.listeners.forEach(n=>{n(this.#e)})})}}},ANt=class extends JL{constructor(t={}){super(),this.config=t,this.#t=new Map}#t;build(t,e,r){const n=e.queryKey,i=e.queryHash??T0e(n,e);let a=this.get(i);return a||(a=new vNt({client:t,queryKey:n,queryHash:i,options:t.defaultQueryOptions(e),state:r,defaultOptions:t.getQueryDefaults(n)}),this.add(a)),a}add(t){this.#t.has(t.queryHash)||(this.#t.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#t.get(t.queryHash);e&&(t.destroy(),e===t&&this.#t.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){g1.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#t.get(t)}getAll(){return[...this.#t.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(r=>dRe(e,r))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(r=>dRe(t,r)):e}notify(t){g1.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){g1.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){g1.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},CNt=class{#t;#e;#r;#i;#n;#a;#s;#o;constructor(t={}){this.#t=t.queryCache||new ANt,this.#e=t.mutationCache||new wNt,this.#r=t.defaultOptions||{},this.#i=new Map,this.#n=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#s=C0e.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#t.onFocus())}),this.#o=x$.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#t.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#s?.(),this.#s=void 0,this.#o?.(),this.#o=void 0)}isFetching(t){return this.#t.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#e.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#t.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),r=this.#t.build(this,e),n=r.state.data;return n===void 0?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime(qP(e.staleTime,r))&&this.prefetchQuery(e),Promise.resolve(n))}getQueriesData(t){return this.#t.findAll(t).map(({queryKey:e,state:r})=>{const n=r.data;return[e,n]})}setQueryData(t,e,r){const n=this.defaultQueryOptions({queryKey:t}),a=this.#t.get(n.queryHash)?.state.data,o=aNt(e,a);if(o!==void 0)return this.#t.build(this,n).setData(o,{...r,manual:!0})}setQueriesData(t,e,r){return g1.batch(()=>this.#t.findAll(t).map(({queryKey:n})=>[n,this.setQueryData(n,e,r)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#t.get(e.queryHash)?.state}removeQueries(t){const e=this.#t;g1.batch(()=>{e.findAll(t).forEach(r=>{e.remove(r)})})}resetQueries(t,e){const r=this.#t;return g1.batch(()=>(r.findAll(t).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const r={revert:!0,...e},n=g1.batch(()=>this.#t.findAll(t).map(i=>i.cancel(r)));return Promise.all(n).then(Bw).catch(Bw)}invalidateQueries(t,e={}){return g1.batch(()=>(this.#t.findAll(t).forEach(r=>{r.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,e={}){const r={...e,cancelRefetch:e.cancelRefetch??!0},n=g1.batch(()=>this.#t.findAll(t).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,r);return r.throwOnError||(a=a.catch(Bw)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(Bw)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const r=this.#t.build(this,e);return r.isStaleByTime(qP(e.staleTime,r))?r.fetch(e):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Bw).catch(Bw)}fetchInfiniteQuery(t){return t.behavior=_$(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Bw).catch(Bw)}ensureInfiniteQueryData(t){return t.behavior=_$(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return x$.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#t}getMutationCache(){return this.#e}getDefaultOptions(){return this.#r}setDefaultOptions(t){this.#r=t}setQueryDefaults(t,e){this.#i.set(ML(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#i.values()],r={};return e.forEach(n=>{H9(t,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(t,e){this.#n.set(ML(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#n.values()],r={};return e.forEach(n=>{H9(t,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#r.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=T0e(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===A0e&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#r.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#t.clear(),this.#e.clear()}},DVe=ze.createContext(void 0),iM=t=>{const e=ze.useContext(DVe);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},MNt=({client:t,children:e})=>(ze.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),Ke.jsx(DVe.Provider,{value:t,children:e})),LVe=ze.createContext(!1),OVe=()=>ze.useContext(LVe);LVe.Provider;function RNt(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var kNt=ze.createContext(RNt()),NVe=()=>ze.useContext(kNt),FVe=(t,e)=>{(t.suspense||t.throwOnError||t.experimental_prefetchInRender)&&(e.isReset()||(t.retryOnMount=!1))},zVe=t=>{ze.useEffect(()=>{t.clearReset()},[t])},BVe=({result:t,errorResetBoundary:e,throwOnError:r,query:n,suspense:i})=>t.isError&&!e.isReset()&&!t.isFetching&&n&&(i&&t.data===void 0||AVe(r,[t.error,n])),UVe=t=>{if(t.suspense){const r=i=>i==="static"?i:Math.max(i??1e3,1e3),n=t.staleTime;t.staleTime=typeof n=="function"?(...i)=>r(n(...i)):r(n),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},HVe=(t,e)=>t.isLoading&&t.isFetching&&!e,vpe=(t,e)=>t?.suspense&&e.isPending,w$=(t,e,r)=>e.fetchOptimistic(t).catch(()=>{r.clearReset()});function INt({queries:t,...e},r){const n=iM(),i=OVe(),a=NVe(),o=ze.useMemo(()=>t.map(de=>{const ae=n.defaultQueryOptions(de);return ae._optimisticResults=i?"isRestoring":"optimistic",ae}),[t,n,i]);o.forEach(de=>{UVe(de),FVe(de,a)}),zVe(a);const[s]=ze.useState(()=>new ENt(n,o,e)),[d,b,L]=s.getOptimisticResult(o,e.combine),B=!i&&e.subscribed!==!1;ze.useSyncExternalStore(ze.useCallback(de=>B?s.subscribe(g1.batchCalls(de)):Bw,[s,B]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),ze.useEffect(()=>{s.setQueries(o,e)},[o,e,s]);const X=d.some((de,ae)=>vpe(o[ae],de))?d.flatMap((de,ae)=>{const U=o[ae];if(U){const ve=new wX(n,U);if(vpe(U,de))return w$(U,ve,a);HVe(de,i)&&w$(U,ve,a)}return[]}):[];if(X.length>0)throw Promise.all(X);const ie=d.find((de,ae)=>{const U=o[ae];return U&&BVe({result:de,errorResetBoundary:a,throwOnError:U.throwOnError,query:n.getQueryCache().get(U.queryHash),suspense:U.suspense})});if(ie?.error)throw ie.error;return b(L())}function jVe(t,e,r){const n=OVe(),i=NVe(),a=iM(),o=a.defaultQueryOptions(t);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o),o._optimisticResults=n?"isRestoring":"optimistic",UVe(o),FVe(o,i),zVe(i);const s=!a.getQueryCache().get(o.queryHash),[d]=ze.useState(()=>new e(a,o)),b=d.getOptimisticResult(o),L=!n&&t.subscribed!==!1;if(ze.useSyncExternalStore(ze.useCallback(B=>{const V=L?d.subscribe(g1.batchCalls(B)):Bw;return d.updateResult(),V},[d,L]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),ze.useEffect(()=>{d.setOptions(o)},[o,d]),vpe(o,b))throw w$(o,d,i);if(BVe({result:b,errorResetBoundary:i,throwOnError:o.throwOnError,query:a.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw b.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,b),o.experimental_prefetchInRender&&!CL&&HVe(b,n)&&(s?w$(o,d,i):a.getQueryCache().get(o.queryHash)?.promise)?.catch(Bw).finally(()=>{d.updateResult()}),o.notifyOnChangeProps?b:d.trackResult(b)}function _v(t,e){return jVe(t,wX)}function RL(t,e){const r=iM(),[n]=ze.useState(()=>new SNt(r,t));ze.useEffect(()=>{n.setOptions(t)},[n,t]);const i=ze.useSyncExternalStore(ze.useCallback(o=>n.subscribe(g1.batchCalls(o)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),a=ze.useCallback((o,s)=>{n.mutate(o,s).catch(Bw)},[n]);if(i.error&&AVe(n.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}function PNt(t,e){return jVe(t,xNt)}const VVe=(t,e)=>_v({queryKey:["schemas",t,e],queryFn:()=>dwt(t,e),enabled:!!t&&!!e}),Ek=(t,e,r,n)=>_v({queryKey:["extensionData",t,e,r,n],queryFn:async()=>{const a=await hwt(t,e,r,n);return console.log(`Fetched extension ${r}/${n} data:`,a),a.data},initialData:{studio_lighting:{ambient_light:.35,key_light:.7,fill_light:.4,rim_light:.5,hemisphere_light:.3,background_color:"default"},camera:{camera:"PerspectiveCamera",show_crosshair:!1,far_plane:300,near_plane:1}}[n]||void 0,staleTime:1/0,enabled:!!t&&!!e&&!!r&&!!n}),qVe=()=>{const t=iM();return RL({mutationFn:async e=>pwt(e),onSuccess:(e,r)=>{console.log("Extension submitted successfully:",e);const{roomId:n,userId:i,category:a,extension:o,data:s}=r,d=["extensionData",n,i,a,o];t.setQueryData(d,s)},onError:e=>{console.error("Error submitting extension:",e)}})},R0e=(t,e=0)=>_v({queryKey:["metadata",t,e],queryFn:()=>bBe(t,e),enabled:!!t,staleTime:1e3*60*5}),DNt=Hu(Ke.jsx("path",{d:"M20 6h-4V4c0-1.11-.89-2-2-2h-4c-1.11 0-2 .89-2 2v2H4c-1.11 0-1.99.89-1.99 2L2 19c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2m-6 0h-4V4h4z"})),LNt=Hu(Ke.jsx("path",{d:"M4 6H2v14c0 1.1.9 2 2 2h14v-2H4zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-1 9h-4v4h-2v-4H9V9h4V5h2v4h4z"})),ONt=Hu(Ke.jsx("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96"})),NNt=Hu(Ke.jsx("path",{d:"M8 5v14l11-7z"})),GVe=({metadata:t})=>Ke.jsxs(Tme,{direction:"row",spacing:1,sx:{mb:2},flexWrap:"wrap",gap:1,children:[t.provider==="celery"?Ke.jsx(Eb,{icon:Ke.jsx(ONt,{}),label:"Server-side",color:"primary",size:"small"}):Ke.jsx(Eb,{icon:Ke.jsx(DNt,{}),label:`${t.provider} worker${t.provider!==1?"s":""}`,color:t.provider>0?"success":"default",size:"small"}),t.progressingWorkers>0&&Ke.jsx(Eb,{icon:Ke.jsx(NNt,{}),label:`${t.progressingWorkers} running`,color:"info",size:"small"}),t.queueLength>0&&Ke.jsx(Eb,{icon:Ke.jsx(LNt,{}),label:`${t.queueLength} queued`,color:"warning",size:"small"})]}),k0e=Hu(Ke.jsx("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"})),FNt=({data:t,handleChange:e,path:r,label:n,schema:i,required:a})=>{const o=t??i.default??"#000000";return Ke.jsxs(Ul,{sx:{marginBottom:2},children:[Ke.jsxs(Ul,{sx:{display:"flex",alignItems:"center",gap:1},children:[Ke.jsx(z8,{required:a,children:n}),i.description&&Ke.jsx(Zh,{title:i.description,placement:"top",children:Ke.jsx(Zf,{size:"small",sx:{padding:.5},children:Ke.jsx(k0e,{fontSize:"small"})})})]}),Ke.jsxs(Ul,{sx:{display:"flex",alignItems:"center",gap:2,marginTop:1},children:[Ke.jsx("input",{type:"color",value:o,onChange:s=>e(r,s.target.value),style:{width:"40px",height:"40px",border:"none",background:"none",cursor:"pointer",borderRadius:"4px"}}),Ke.jsx("code",{children:o})]})]})},zNt=bh(5,Qx(t=>t?.format==="color"&&t.type==="string")),BNt=$w(FNt),UNt=({data:t,handleChange:e,path:r,label:n,schema:i,required:a})=>{const o=Number(t??i.default??i.minimum??0),s=i.step||.1;return Ke.jsxs(Ul,{sx:{marginBottom:2},children:[Ke.jsxs(Ul,{sx:{display:"flex",alignItems:"center",gap:1},children:[Ke.jsx(z8,{required:a,children:n}),i.description&&Ke.jsx(Zh,{title:i.description,placement:"top",children:Ke.jsx(Zf,{size:"small",sx:{padding:.5},children:Ke.jsx(k0e,{fontSize:"small"})})})]}),Ke.jsxs(Ul,{sx:{display:"flex",alignItems:"center",gap:2,paddingX:1},children:[Ke.jsx(Sme,{value:o,onChange:(d,b)=>e(r,b),min:i.minimum,max:i.maximum,step:s,"aria-labelledby":"input-slider"}),Ke.jsx(Su,{sx:{minWidth:35},children:o})]})]})},HNt=bh(5,Qx(t=>t?.format==="range"&&(t.type==="number"||t.type==="integer"))),jNt=$w(UNt),VNt=({data:t,handleChange:e,path:r,label:n,schema:i,required:a,errors:o})=>{const s=i.enum||[],d=t??i.default??"",L=typeof d=="string"&&d.startsWith("#")&&d.length===7?d:"#000000";return Ke.jsx(Ul,{sx:{marginBottom:2},children:Ke.jsxs(Ul,{sx:{display:"flex",gap:1,alignItems:"flex-start"},children:[Ke.jsx(N8,{freeSolo:!0,options:s,value:d,inputValue:d,onChange:(B,V)=>{e(r,V||"")},onInputChange:(B,V,X)=>{X==="input"&&e(r,V)},renderInput:B=>Ke.jsx(zg,{...B,label:n,required:a,error:!!o,helperText:o}),fullWidth:!0}),Ke.jsx("input",{type:"color",value:L,onChange:B=>e(r,B.target.value),style:{width:"50px",height:"40px",marginTop:"8px",border:"1px solid rgba(0, 0, 0, 0.23)",borderRadius:"4px",cursor:"pointer"},title:"Pick color"})]})})},qNt=bh(10,vm(Qx(t=>t?.hasOwnProperty("x-dynamic-enum")),Qx(t=>t?.["x-color-picker"]===!0))),GNt=$w(VNt),$Nt=Hu(Ke.jsx("path",{d:"M10 10.02h5V21h-5zM17 21h3c1.1 0 2-.9 2-2v-9h-5zm3-18H5c-1.1 0-2 .9-2 2v3h19V5c0-1.1-.9-2-2-2M3 19c0 1.1.9 2 2 2h3V10H3z"})),I0e=Hu(Ke.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}));function $Ve({valueType:t,supportsArrayEdit:e=!0,onEditArray:r,onClear:n}){return Ke.jsxs(Ul,{sx:{display:"flex",gap:.5,alignItems:"center",ml:1},children:[e&&r&&Ke.jsx(Zh,{title:t==="string"?"Edit as table":"Edit in table",children:Ke.jsx(Zf,{size:"small",onClick:r,color:"primary",children:Ke.jsx($Nt,{fontSize:"small"})})}),(t==="array"||t==="number")&&n&&Ke.jsx(Zh,{title:"Clear and switch back to dropdown",children:Ke.jsx(Zf,{size:"small",onClick:n,color:"error",children:Ke.jsx(I0e,{fontSize:"small"})})})]})}const WNt=parseInt(ze.version,10),of=t=>{if(WNt>=19){const e=r=>t(r,r.ref??null);return e.displayName=t.displayName??t.name,e}return ze.forwardRef(t)},Bg=Hu,xRe=Bg(Ke.jsx("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"})),_Re=Bg(Ke.jsx("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"})),wRe=Bg(Ke.jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})),SRe=Bg(Ke.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"})),YNt=Bg(Ke.jsx("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"})),TRe=Bg(Ke.jsx("path",{d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61z"})),XNt=Bg(Ke.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}));Bg(Ke.jsx("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}));Bg(Ke.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}));const ZNt=Bg(Ke.jsx("path",{d:"M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z"})),KNt=Bg(Ke.jsx("rect",{width:"1",height:"24",x:"11.5",rx:"0.5"})),JNt=Bg(Ke.jsx("path",{d:"M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z"})),QNt=Bg(Ke.jsx("path",{d:"M21,8H3V4h18V8z M21,10H3v4h18V10z M21,16H3v4h18V16z"})),e8t=Bg(Ke.jsx("path",{d:"M4 18h17v-6H4v6zM4 5v6h17V5H4z"})),t8t=Bg(Ke.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})),ERe=Bg(Ke.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),ARe=Bg(Ke.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"})),r8t=Bg(Ke.jsx("path",{d:"M19 13H5v-2h14v2z"})),n8t=Bg(Ke.jsx("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"})),CRe=Bg(Ke.jsx("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})),MRe=Bg(Ke.jsx("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})),i8t=Bg(Ke.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})),a8t=Bg(Ke.jsx("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"})),o8t=Bg(Ke.jsx("g",{children:Ke.jsx("path",{d:"M14.67,5v14H9.33V5H14.67z M15.67,19H21V5h-5.33V19z M8.33,19V5H3v14H8.33z"})})),RRe=Bg(Ke.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"}));Bg(Ke.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}));const s8t=Bg(Ke.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"})),l8t=Bg(Ke.jsx("path",{d:"M5 20h14v-2H5zM19 9h-4V3H9v6H5l7 7z"})),WVe=ze.createContext(void 0),Cu=()=>{const t=ze.useContext(WVe);if(!t)throw new Error("MUI X: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.");return t},u8t=["sortingOrder"],c8t=ze.memo(function(e){const{sortingOrder:r}=e,n=Ms(e,u8t),i=Cu(),[a]=r,o=a==="asc"?i.slots.columnSortedAscendingIcon:i.slots.columnSortedDescendingIcon;return o?Ke.jsx(o,Mr({},n)):null}),YVe=ze.createContext(void 0);function wd(){const t=ze.useContext(YVe);if(t===void 0)throw new Error(["MUI X: Could not find the Data Grid context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join(`
`));return t}const f8t=new TextEncoder;let TG=2*1024,Qz=new ArrayBuffer(TG),Hie=new Uint8Array(Qz),pD=new Int32Array(Qz);const d8t=h8t;function h8t(t){const e=t.length*2;e>TG&&(TG=e+(4-e%4),Qz=new ArrayBuffer(TG),Hie=new Uint8Array(Qz),pD=new Int32Array(Qz));const r=f8t.encodeInto(t,Hie).written,n=0,i=r|0;let a=0,o=(n+i|0)+374761393|0;if(i<16)for(;(a+3|0)<i;a=a+4|0)o=Math.imul(mC(o+Math.imul(pD[a]|0,3266489917)|0,17)|0,668265263);else{let s=n+606290984|0,d=n+2246822519|0,b=n,L=n-2654435761|0;for(;(a+15|0)<i;a=a+16|0)s=Math.imul(mC(s+Math.imul(pD[a+0|0]|0,2246822519)|0,13)|0,2654435761),d=Math.imul(mC(d+Math.imul(pD[a+4|0]|0,2246822519)|0,13)|0,2654435761),b=Math.imul(mC(b+Math.imul(pD[a+8|0]|0,2246822519)|0,13)|0,2654435761),L=Math.imul(mC(L+Math.imul(pD[a+12|0]|0,2246822519)|0,13)|0,2654435761);for(o=(((mC(s,1)|0+mC(d,7)|0)+mC(b,12)|0)+mC(L,18)|0)+i|0;(a+3|0)<i;a=a+4|0)o=Math.imul(mC(o+Math.imul(pD[a]|0,3266489917)|0,17)|0,668265263)}for(;a<i;a=a+1|0)o=Math.imul(mC(o+Math.imul(Hie[a]|0,374761393)|0,11)|0,2654435761);return o=Math.imul(o^o>>>15,2246822519),o=Math.imul(o^o>>>13,3266489917),((o^o>>>16)>>>0).toString()}function mC(t,e){return t<<e|t>>>32-e}const XVe={values:{xs:0,sm:600,md:900,lg:1200,xl:1536},up:t=>{const e=XVe.values;return`@media (min-width:${typeof e[t]=="number"?e[t]:t}px)`}},ZVe={spacingUnit:"--DataGrid-t-spacing-unit",colors:{border:{base:"--DataGrid-t-color-border-base"},foreground:{base:"--DataGrid-t-color-foreground-base",muted:"--DataGrid-t-color-foreground-muted",accent:"--DataGrid-t-color-foreground-accent",disabled:"--DataGrid-t-color-foreground-disabled",error:"--DataGrid-t-color-foreground-error"},background:{base:"--DataGrid-t-color-background-base",overlay:"--DataGrid-t-color-background-overlay",backdrop:"--DataGrid-t-color-background-backdrop"},interactive:{hover:"--DataGrid-t-color-interactive-hover",hoverOpacity:"--DataGrid-t-color-interactive-hover-opacity",focus:"--DataGrid-t-color-interactive-focus",focusOpacity:"--DataGrid-t-color-interactive-focus-opacity",disabled:"--DataGrid-t-color-interactive-disabled",disabledOpacity:"--DataGrid-t-color-interactive-disabled-opacity",selected:"--DataGrid-t-color-interactive-selected",selectedOpacity:"--DataGrid-t-color-interactive-selected-opacity"}},header:{background:{base:"--DataGrid-t-header-background-base"}},cell:{background:{pinned:"--DataGrid-t-cell-background-pinned"}},radius:{base:"--DataGrid-t-radius-base"},typography:{font:{body:"--DataGrid-t-typography-font-body",small:"--DataGrid-t-typography-font-small",large:"--DataGrid-t-typography-font-large"},fontFamily:{base:"--DataGrid-t-typography-font-family-base"},fontWeight:{light:"--DataGrid-t-typography-font-weight-light",regular:"--DataGrid-t-typography-font-weight-regular",medium:"--DataGrid-t-typography-font-weight-medium",bold:"--DataGrid-t-typography-font-weight-bold"}},transitions:{easing:{easeIn:"--DataGrid-t-transition-easing-ease-in",easeOut:"--DataGrid-t-transition-easing-ease-out",easeInOut:"--DataGrid-t-transition-easing-ease-in-out"},duration:{short:"--DataGrid-t-transition-duration-short",base:"--DataGrid-t-transition-duration-base",long:"--DataGrid-t-transition-duration-long"}},shadows:{base:"--DataGrid-t-shadow-base",overlay:"--DataGrid-t-shadow-overlay"},zIndex:{panel:"--DataGrid-t-z-index-panel",menu:"--DataGrid-t-z-index-menu"}},p8t=KVe(ZVe),Bu=Mr({breakpoints:XVe,spacing:v8t,transition:m8t,keys:ZVe},p8t);function v8t(t,e,r,n){return t===void 0?gC(1):e===void 0?gC(t):r===void 0?gC(t)+" "+gC(e):n===void 0?gC(t)+" "+gC(e)+" "+gC(r):gC(t)+" "+gC(e)+" "+gC(r)+" "+gC(n)}function gC(t){return t===0?"0":`calc(var(--DataGrid-t-spacing-unit) * ${t})`}function m8t(t,e){const{duration:r=Bu.transitions.duration.base,easing:n=Bu.transitions.easing.easeInOut,delay:i=0}=e??{};return t.map(a=>`${a} ${r} ${n} ${i}ms`).join(", ")}function KVe(t){if(typeof t=="string")return`var(${t})`;const e={};for(const r in t)Object.hasOwn(t,r)&&(e[r]=KVe(t[r]));return e}function g8t(){const t=cy();return ze.useMemo(()=>{const e=d8t(w8t(t)),r=y8t(t);return{id:e,variables:r}},[t])}function y8t(t){const e=x8t(t),r=(t.vars||t).palette.DataGrid,n=r?.bg??(t.palette.mode==="dark"?`color-mix(in srgb, ${(t.vars||t).palette.background.paper} 95%, #fff)`:(t.vars||t).palette.background.paper),i=r?.headerBg??n,a=r?.pinnedBg??n,o=t.vars?`rgba(${t.vars.palette.background.defaultChannel} / ${t.vars.palette.action.disabledOpacity})`:Jx(t.palette.background.default,t.palette.action.disabledOpacity),s=t.palette.mode==="dark"?`color-mix(in srgb, ${(t.vars||t).palette.background.paper} 90%, #fff)`:(t.vars||t).palette.background.paper,d=t.vars?`rgb(${t.vars.palette.primary.mainChannel})`:t.palette.primary.main,b=b8t(t),L=t.vars?.font?.body2??jie(t.typography.body2),B=t.vars?.font?.caption??jie(t.typography.caption),V=t.vars?.font?.body1??jie(t.typography.body1),X=Bu.keys;return{[X.spacingUnit]:t.vars?t.vars.spacing??t.spacing(1):t.spacing(1),[X.colors.border.base]:e,[X.colors.background.base]:n,[X.colors.background.overlay]:s,[X.colors.background.backdrop]:o,[X.colors.foreground.base]:(t.vars||t).palette.text.primary,[X.colors.foreground.muted]:(t.vars||t).palette.text.secondary,[X.colors.foreground.accent]:(t.vars||t).palette.primary.dark,[X.colors.foreground.disabled]:(t.vars||t).palette.text.disabled,[X.colors.foreground.error]:(t.vars||t).palette.error.dark,[X.colors.interactive.hover]:(t.vars||t).palette.action.hover,[X.colors.interactive.hoverOpacity]:(t.vars||t).palette.action.hoverOpacity,[X.colors.interactive.focus]:kRe((t.vars||t).palette.primary.main),[X.colors.interactive.focusOpacity]:(t.vars||t).palette.action.focusOpacity,[X.colors.interactive.disabled]:kRe((t.vars||t).palette.action.disabled),[X.colors.interactive.disabledOpacity]:(t.vars||t).palette.action.disabledOpacity,[X.colors.interactive.selected]:d,[X.colors.interactive.selectedOpacity]:(t.vars||t).palette.action.selectedOpacity,[X.header.background.base]:i,[X.cell.background.pinned]:a,[X.radius.base]:b,[X.typography.fontFamily.base]:t.typography.fontFamily,[X.typography.fontWeight.light]:t.typography.fontWeightLight,[X.typography.fontWeight.regular]:t.typography.fontWeightRegular,[X.typography.fontWeight.medium]:t.typography.fontWeightMedium,[X.typography.fontWeight.bold]:t.typography.fontWeightBold,[X.typography.font.body]:L,[X.typography.font.small]:B,[X.typography.font.large]:V,[X.transitions.easing.easeIn]:t.transitions.easing.easeIn,[X.transitions.easing.easeOut]:t.transitions.easing.easeOut,[X.transitions.easing.easeInOut]:t.transitions.easing.easeInOut,[X.transitions.duration.short]:`${t.transitions.duration.shorter}ms`,[X.transitions.duration.base]:`${t.transitions.duration.short}ms`,[X.transitions.duration.long]:`${t.transitions.duration.standard}ms`,[X.shadows.base]:(t.vars||t).shadows[2],[X.shadows.overlay]:(t.vars||t).shadows[8],[X.zIndex.panel]:(t.vars||t).zIndex.modal,[X.zIndex.menu]:(t.vars||t).zIndex.modal}}function b8t(t){return t.vars?t.vars.shape.borderRadius:typeof t.shape.borderRadius=="number"?`${t.shape.borderRadius}px`:t.shape.borderRadius}function x8t(t){return t.vars?t.vars.palette.TableCell.border:t.palette.mode==="light"?AB(Jx(t.palette.divider,1),.88):EB(Jx(t.palette.divider,1),.68)}function _8t(t,e){return`rgba(from ${t} r g b / ${e})`}function kRe(t){return _8t(t,1)}function jie(t){if(!t)return;const e=typeof t.fontSize=="number"?`${t.fontSize}px`:t.fontSize;return`${t.fontWeight} ${e} / ${t.lineHeight} ${t.fontFamily}`}function w8t(t){const e=new WeakSet;return JSON.stringify(t,(r,n)=>{if(typeof window<"u"&&n===window||typeof document<"u"&&n===document)return n.toString();if(n!==null&&typeof n=="object"){if(ze.isValidElement(n)||e.has(n))return null;e.add(n)}return n})}const S8t=["id","label","labelId","material","disabled","slotProps","onChange","onKeyDown","onOpen","onClose","size","style","fullWidth"],T8t=["onRowsPerPageChange","material","disabled"],E8t=["material"],A8t=["autoFocus","label","fullWidth","slotProps","className","material"],C8t=["material"],M8t=["material"],R8t=["material"],k8t=["material"],I8t=["material"],P8t=["material"],D8t=["material"],L8t=["material"],O8t=["material"],N8t=["material","label","className"],F8t=["material"],z8t=["inert","iconStart","iconEnd","children","material"],B8t=["slotProps","material"],U8t=["id","multiple","freeSolo","options","getOptionLabel","isOptionEqualToValue","value","onChange","label","placeholder","slotProps","material"],H8t=["key"],j8t=["inputProps","InputProps","InputLabelProps"],V8t=["slotProps","material"],q8t=["ref","open","children","className","clickAwayTouchEvent","clickAwayMouseEvent","flip","focusTrap","onExited","onClickAway","onDidShow","onDidHide","id","target","transition","placement","material"],G8t=["native"],$8t=["children","value","active"],W8t=["items","value","material"],IRe=fa(PB)(({theme:t})=>({[`&.${She.positionEnd} .${phe.sizeSmall}`]:{marginRight:t.spacing(-.75)}})),JVe=fa(F8,{shouldForwardProp:t=>t!=="fullWidth"})(({theme:t})=>({gap:t.spacing(.5),margin:0,overflow:"hidden",[`& .${bN.label}`]:{fontSize:t.typography.pxToRem(14),overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},variants:[{props:{fullWidth:!0},style:{width:"100%"}}]})),PRe=fa(n$,{shouldForwardProp:t=>t!=="density"})(({theme:t})=>({variants:[{props:{density:"compact"},style:{padding:t.spacing(.5)}}]})),Y8t=fa(Uw)({[`& .${ZD.primary}`]:{overflowX:"clip",textOverflow:"ellipsis",maxWidth:"300px"}}),X8t=of(function(e,r){const{id:n,label:i,labelId:a,material:o,disabled:s,slotProps:d,onChange:b,onKeyDown:L,onOpen:B,onClose:V,size:X,style:ie,fullWidth:de}=e,ae=Ms(e,S8t),U={PaperProps:{onKeyDown:L}};return V&&(U.onClose=V),Ke.jsxs(j5,{size:X,fullWidth:de,style:ie,disabled:s,ref:r,children:[Ke.jsx(jL,{id:a,htmlFor:n,shrink:!0,variant:"outlined",children:i}),Ke.jsx(m4,Mr({id:n,labelId:a,label:i,displayEmpty:!0,onChange:b,variant:"outlined"},ae,{notched:!0,inputProps:d?.htmlInput,onOpen:B,MenuProps:U,size:X},o))]})}),Z8t=fa(gbt)(({theme:t})=>({[`& .${lL.selectLabel}`]:{display:"none",[t.breakpoints.up("sm")]:{display:"block"}},[`& .${lL.input}`]:{display:"none",[t.breakpoints.up("sm")]:{display:"inline-flex"}}})),K8t=of(function(e,r){const{onRowsPerPageChange:n,material:i,disabled:a}=e,o=Ms(e,T8t),s=ze.useMemo(()=>{if(a)return{backIconButtonProps:{disabled:!0},nextIconButtonProps:{disabled:!0}}},[a]),d=wd(),b=Cu(),{estimatedRowCount:L}=b;return Ke.jsx(Z8t,Mr({component:"div",onRowsPerPageChange:vl(B=>{n?.(Number(B.target.value))}),labelRowsPerPage:d.current.getLocaleText("paginationRowsPerPage"),labelDisplayedRows:B=>d.current.getLocaleText("paginationDisplayedRows")(Mr({},B,{estimated:L})),getItemAriaLabel:d.current.getLocaleText("paginationItemAriaLabel")},s,o,i,{ref:r}))}),J8t=of(function(e,r){const{material:n}=e,i=Ms(e,E8t);return Ke.jsx(T9e,Mr({},i,n,{ref:r}))}),Q8t=of(function(e,r){const{autoFocus:n,label:i,fullWidth:a,slotProps:o,className:s,material:d}=e,b=Ms(e,A8t),L=ze.useRef(null),B=id(L,r),V=ze.useRef(null);return ze.useEffect(()=>{n?L.current?.querySelector("input")?.focus({preventScroll:!0}):n===!1&&V.current&&V.current.stop({})},[n]),i?Ke.jsx(JVe,{className:s,control:Ke.jsx(PRe,Mr({},b,d,{inputProps:o?.htmlInput,ref:B,touchRippleRef:V})),label:i,fullWidth:a}):Ke.jsx(PRe,Mr({},b,d,{className:Vo(s,d?.className),inputProps:o?.htmlInput,ref:B,touchRippleRef:V}))}),eFt=of(function(e,r){const{material:n}=e,i=Ms(e,C8t);return Ke.jsx(_1,Mr({},i,n,{ref:r}))}),tFt=of(function(e,r){const{material:n}=e,i=Ms(e,M8t);return Ke.jsx(oA,Mr({},i,n,{ref:r}))}),rFt=of(function(e,r){const{material:n}=e,i=Ms(e,R8t);return Ke.jsx(zgt,Mr({},i,n,{ref:r}))}),nFt=of(function(e,r){const{material:n}=e,i=Ms(e,k8t);return Ke.jsx(Id,Mr({},i,n,{ref:r}))}),iFt=fa(Wbt)(({theme:t})=>({gap:t.spacing(1),border:0})),aFt=of(function(e,r){const{material:n}=e,i=Ms(e,I8t);return Ke.jsx(iFt,Mr({size:"small",color:"primary"},i,n,{ref:r}))}),oFt=of(function(e,r){const{material:n}=e,i=Ms(e,P8t);return Ke.jsx(Eb,Mr({},i,n,{ref:r}))}),sFt=of(function(e,r){const{material:n}=e,i=Ms(e,D8t);return Ke.jsx(Zf,Mr({},i,n,{ref:r}))}),lFt=of(function(e,r){const{material:n}=e,i=Ms(e,L8t);return Ke.jsx(Zh,Mr({},i,n,{ref:r}))}),uFt=of(function(e,r){const{material:n}=e,i=Ms(e,O8t);return Ke.jsx(_yt,Mr({},i,n,{ref:r}))}),cFt=of(function(e,r){const{material:n,label:i,className:a}=e,o=Ms(e,N8t);return i?Ke.jsx(JVe,{className:a,control:Ke.jsx(I9,Mr({},o,n,{ref:r})),label:i}):Ke.jsx(I9,Mr({},o,n,{className:a,ref:r}))}),fFt=of(function(e,r){const{material:n}=e,i=Ms(e,F8t);return Ke.jsx(EY,Mr({},i,n,{ref:r}))});function dFt(t){const{inert:e,iconStart:r,iconEnd:n,children:i,material:a}=t,o=Ms(t,z8t);return e&&(o.disableRipple=!0),ze.createElement(Xx,Mr({},o,a),[r&&Ke.jsx(jS,{children:r},"1"),Ke.jsx(Y8t,{children:i},"2"),n&&Ke.jsx(jS,{children:n},"3")])}function hFt(t){const{slotProps:e,material:r}=t,n=Ms(t,B8t);return Ke.jsx(zg,Mr({variant:"outlined"},n,r,{inputProps:e?.htmlInput,InputProps:P0e(e?.input),InputLabelProps:Mr({shrink:!0},e?.inputLabel)}))}function pFt(t){const e=Cu(),{id:r,multiple:n,freeSolo:i,options:a,getOptionLabel:o,isOptionEqualToValue:s,value:d,onChange:b,label:L,placeholder:B,slotProps:V,material:X}=t,ie=Ms(t,U8t);return Ke.jsx(N8,Mr({id:r,multiple:n,freeSolo:i,options:a,getOptionLabel:o,isOptionEqualToValue:s,value:d,onChange:b,renderTags:(de,ae)=>de.map((U,ve)=>{const Se=ae({index:ve}),{key:Pe}=Se,Me=Ms(Se,H8t);return Ke.jsx(Eb,Mr({variant:"outlined",size:"small",label:typeof U=="string"?U:o?.(U)},Me),Pe)}),renderInput:de=>{const{inputProps:ae,InputProps:U,InputLabelProps:ve}=de,Se=Ms(de,j8t);return Ke.jsx(zg,Mr({},Se,{label:L,placeholder:B,inputProps:ae,InputProps:P0e(U,!1),InputLabelProps:Mr({shrink:!0},ve)},V?.textField,e.slotProps?.baseTextField))}},ie,X))}function vFt(t){return Ke.jsx(IB,Mr({},P0e(t)))}function P0e(t,e=!0){if(!t)return;const{slotProps:r,material:n}=t,a=Ms(t,V8t);e&&(a.startAdornment&&(a.startAdornment=Ke.jsx(IRe,{position:"start",children:a.startAdornment})),a.endAdornment&&(a.endAdornment=Ke.jsx(IRe,{position:"end",children:a.endAdornment})));for(const o in n)Object.hasOwn(n,o)&&(a[o]=n[o]);return r?.htmlInput&&(a.inputProps?a.inputProps=Mr({},a.inputProps,r?.htmlInput):a.inputProps=r?.htmlInput),a}const mFt={"bottom-start":"top left","bottom-end":"top right"};function gFt(t){const{open:e,children:r,className:n,flip:i,onExited:a,onDidShow:o,onDidHide:s,id:d,target:b,transition:L,placement:B,material:V}=t,X=Ms(t,q8t),ie=ze.useMemo(()=>{const ae=[{name:"preventOverflow",options:{padding:8}}];return i&&ae.push({name:"flip",enabled:!0,options:{rootBoundary:"document"}}),(o||s)&&ae.push({name:"isPlaced",enabled:!0,phase:"main",fn:()=>{o?.()},effect:()=>()=>{s?.()}}),ae},[i,o,s]);let de;if(!L)de=DRe(t,r);else{const ae=U=>ve=>{U&&U(),a&&a(ve)};de=U=>DRe(t,Ke.jsx(yL,Mr({},U.TransitionProps,{style:{transformOrigin:mFt[U.placement]},onExited:ae(U.TransitionProps?.onExited),children:Ke.jsx(Gy,{children:r})})))}return Ke.jsx(O8,Mr({id:d,className:n,open:e,anchorEl:b,transition:L,placement:B,modifiers:ie},X,V,{children:de}))}function DRe(t,e){return bFt(t,yFt(t,e))}function yFt(t,e){return t.onClickAway===void 0?e:Ke.jsx(vme,{onClickAway:t.onClickAway,touchEvent:t.clickAwayTouchEvent,mouseEvent:t.clickAwayMouseEvent,children:e})}function bFt(t,e){return t.focusTrap===void 0?e:Ke.jsx(mme,{open:!0,disableEnforceFocus:!0,disableAutoFocus:!0,children:Ke.jsx("div",{tabIndex:-1,children:e})})}function xFt(t){let{native:e}=t,r=Ms(t,G8t);return e?Ke.jsx("option",Mr({},r)):Ke.jsx(Xx,Mr({},r))}const _Ft=fa(LB,{name:"MuiDataGrid",slot:"Tabs"})(({theme:t})=>({borderBottom:`1px solid ${t.palette.divider}`})),wFt=fa(QN,{name:"MuiDataGrid",slot:"Tab"})({flex:1,minWidth:"fit-content"}),SFt=fa("div",{name:"MuiDataGrid",slot:"TabPanel"})({flex:1,display:"flex",flexDirection:"column",overflow:"hidden"});function TFt(t){const{children:e,active:r}=t,n=Ms(t,$8t);return Ke.jsx(SFt,Mr({role:"tabpanel",style:{display:r?"flex":"none"}},n,{children:e}))}function EFt(t){let{items:e,value:r,material:n}=t,i=Ms(t,W8t);const a=Vd(),o=`${a}-tab-${r}`,s=`${a}-tabpanel-${r}`;return Ke.jsxs(ze.Fragment,{children:[Ke.jsx(_Ft,Mr({},i,{value:r,variant:"scrollable",scrollButtons:"auto"},n,{children:e.map(d=>Ke.jsx(wFt,{value:d.value,label:d.label,id:o,"aria-controls":s},d.value))})),e.map(d=>Ke.jsx(TFt,{value:d.value,active:r===d.value,id:s,"aria-labelledby":o,children:d.children},d.value))]})}const AFt={booleanCellTrueIcon:MRe,booleanCellFalseIcon:ERe,columnMenuIcon:t8t,openFilterButtonIcon:YNt,filterPanelDeleteIcon:ERe,columnFilteredIcon:TRe,columnSelectorIcon:ZNt,columnUnsortedIcon:c8t,columnSortedAscendingIcon:xRe,columnSortedDescendingIcon:_Re,columnResizeIcon:KNt,densityCompactIcon:JNt,densityStandardIcon:QNt,densityComfortableIcon:e8t,exportIcon:l8t,moreActionsIcon:i8t,treeDataCollapseIcon:SRe,treeDataExpandIcon:wRe,groupingCriteriaCollapseIcon:SRe,groupingCriteriaExpandIcon:wRe,detailPanelExpandIcon:ARe,detailPanelCollapseIcon:r8t,rowReorderIcon:CRe,quickFilterIcon:XNt,quickFilterClearIcon:RRe,columnMenuHideIcon:a8t,columnMenuSortAscendingIcon:xRe,columnMenuSortDescendingIcon:_Re,columnMenuUnsortIcon:null,columnMenuFilterIcon:TRe,columnMenuManageColumnsIcon:o8t,columnMenuClearIcon:RRe,loadIcon:n8t,filterPanelAddIcon:ARe,filterPanelRemoveAllIcon:s8t,columnReorderIcon:CRe,menuItemCheckIcon:MRe},CFt={baseAutocomplete:pFt,baseBadge:J8t,baseCheckbox:Q8t,baseChip:oFt,baseCircularProgress:eFt,baseDivider:tFt,baseInput:vFt,baseLinearProgress:rFt,baseMenuList:fFt,baseMenuItem:dFt,baseTextField:hFt,baseButton:nFt,baseIconButton:sFt,baseToggleButton:aFt,baseTooltip:lFt,baseTabs:EFt,basePagination:K8t,basePopper:gFt,baseSelect:X8t,baseSelectOption:xFt,baseSkeleton:uFt,baseSwitch:cFt},MFt=Mr({},CFt,AFt);var S$=Symbol("NOT_FOUND");function RFt(t,e=`expected a function, instead received ${typeof t}`){if(typeof t!="function")throw new TypeError(e)}function kFt(t,e=`expected an object, instead received ${typeof t}`){if(typeof t!="object")throw new TypeError(e)}function IFt(t,e="expected all items to be functions, instead received the following types: "){if(!t.every(r=>typeof r=="function")){const r=t.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${e}[${r}]`)}}var LRe=t=>Array.isArray(t)?t:[t];function PFt(t){const e=Array.isArray(t[0])?t[0]:t;return IFt(e,"createSelector expects all input-selectors to be functions, but received the following types: "),e}function DFt(t,e){const r=[],{length:n}=t;for(let i=0;i<n;i++)r.push(t[i].apply(null,e));return r}function LFt(t){let e;return{get(r){return e&&t(e.key,r)?e.value:S$},put(r,n){e={key:r,value:n}},getEntries(){return e?[e]:[]},clear(){e=void 0}}}function OFt(t,e){let r=[];function n(s){const d=r.findIndex(b=>e(s,b.key));if(d>-1){const b=r[d];return d>0&&(r.splice(d,1),r.unshift(b)),b.value}return S$}function i(s,d){n(s)===S$&&(r.unshift({key:s,value:d}),r.length>t&&r.pop())}function a(){return r}function o(){r=[]}return{get:n,put:i,getEntries:a,clear:o}}var NFt=(t,e)=>t===e;function FFt(t){return function(r,n){if(r===null||n===null||r.length!==n.length)return!1;const{length:i}=r;for(let a=0;a<i;a++)if(!t(r[a],n[a]))return!1;return!0}}function D0e(t,e){const r=typeof e=="object"?e:{equalityCheck:e},{equalityCheck:n=NFt,maxSize:i=1,resultEqualityCheck:a}=r,o=FFt(n);let s=0;const d=i<=1?LFt(o):OFt(i,o);function b(){let L=d.get(arguments);if(L===S$){if(L=t.apply(null,arguments),s++,a){const V=d.getEntries().find(X=>a(X.value,L));V&&(L=V.value,s!==0&&s--)}d.put(arguments,L)}return L}return b.clearCache=()=>{d.clear(),b.resetResultsCount()},b.resultsCount=()=>s,b.resetResultsCount=()=>{s=0},b}var zFt=class{constructor(t){this.value=t}deref(){return this.value}},BFt=typeof WeakRef<"u"?WeakRef:zFt,UFt=0,ORe=1;function iV(){return{s:UFt,v:void 0,o:null,p:null}}function QVe(t,e={}){let r=iV();const{resultEqualityCheck:n}=e;let i,a=0;function o(){let s=r;const{length:d}=arguments;for(let B=0,V=d;B<V;B++){const X=arguments[B];if(typeof X=="function"||typeof X=="object"&&X!==null){let ie=s.o;ie===null&&(s.o=ie=new WeakMap);const de=ie.get(X);de===void 0?(s=iV(),ie.set(X,s)):s=de}else{let ie=s.p;ie===null&&(s.p=ie=new Map);const de=ie.get(X);de===void 0?(s=iV(),ie.set(X,s)):s=de}}const b=s;let L;if(s.s===ORe)L=s.v;else if(L=t.apply(null,arguments),a++,n){const B=i?.deref?.()??i;B!=null&&n(B,L)&&(L=B,a!==0&&a--),i=typeof L=="object"&&L!==null||typeof L=="function"?new BFt(L):L}return b.s=ORe,b.v=L,L}return o.clearCache=()=>{r=iV(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function eqe(t,...e){const r=typeof t=="function"?{memoize:t,memoizeOptions:e}:t,n=(...i)=>{let a=0,o=0,s,d={},b=i.pop();typeof b=="object"&&(d=b,b=i.pop()),RFt(b,`createSelector expects an output function after the inputs, but received: [${typeof b}]`);const L={...r,...d},{memoize:B,memoizeOptions:V=[],argsMemoize:X=QVe,argsMemoizeOptions:ie=[]}=L,de=LRe(V),ae=LRe(ie),U=PFt(i),ve=B(function(){return a++,b.apply(null,arguments)},...de),Se=X(function(){o++;const Me=DFt(U,arguments);return s=ve.apply(null,Me),s},...ae);return Object.assign(Se,{resultFunc:b,memoizedResultFunc:ve,dependencies:U,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>s,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:B,argsMemoize:X})};return Object.assign(n,{withTypes:()=>n}),n}var HFt=eqe(QVe),jFt=Object.assign((t,e=HFt)=>{kFt(t,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof t}`);const r=Object.keys(t),n=r.map(a=>t[a]);return e(n,(...a)=>a.reduce((o,s,d)=>(o[r[d]]=s,o),{}))},{withTypes:()=>jFt});const VFt=eqe({memoize:D0e,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),EG=(t,e,r,n,i,a,...o)=>{if(o.length>0)throw new Error("Unsupported number of selectors");let s;if(t&&e&&r&&n&&i&&a)s=(d,b,L,B)=>{const V=t(d,b,L,B),X=e(d,b,L,B),ie=r(d,b,L,B),de=n(d,b,L,B),ae=i(d,b,L,B);return a(V,X,ie,de,ae,b,L,B)};else if(t&&e&&r&&n&&i)s=(d,b,L,B)=>{const V=t(d,b,L,B),X=e(d,b,L,B),ie=r(d,b,L,B),de=n(d,b,L,B);return i(V,X,ie,de,b,L,B)};else if(t&&e&&r&&n)s=(d,b,L,B)=>{const V=t(d,b,L,B),X=e(d,b,L,B),ie=r(d,b,L,B);return n(V,X,ie,b,L,B)};else if(t&&e&&r)s=(d,b,L,B)=>{const V=t(d,b,L,B),X=e(d,b,L,B);return r(V,X,b,L,B)};else if(t&&e)s=(d,b,L,B)=>{const V=t(d,b,L,B);return e(V,b,L,B)};else if(t)s=t;else throw new Error("Missing arguments");return s},tqe=(...t)=>{const e=new WeakMap;let r=1;const n=t[t.length-1],i=t.length-1||1,a=Math.max(n.length-i,0);if(a>3)throw new Error("Unsupported number of arguments");return(s,d,b,L)=>{let B=s.__cacheKey__;B||(B={id:r},s.__cacheKey__=B,r+=1);let V=e.get(B);if(!V){const X=t.length===1?[ae=>ae,n]:t;let ie=t;const de=[void 0,void 0,void 0];switch(a){case 0:break;case 1:{ie=[...X.slice(0,-1),()=>de[0],n];break}case 2:{ie=[...X.slice(0,-1),()=>de[0],()=>de[1],n];break}case 3:{ie=[...X.slice(0,-1),()=>de[0],()=>de[1],()=>de[2],n];break}default:throw new Error("Unsupported number of arguments")}V=VFt(...ie),V.selectorArgs=de,e.set(B,V)}switch(a){case 3:V.selectorArgs[2]=L;case 2:V.selectorArgs[1]=b;case 1:V.selectorArgs[0]=d}switch(a){case 0:return V(s);case 1:return V(s,d);case 2:return V(s,d,b);case 3:return V(s,d,b,L);default:throw new Error("unreachable")}}};var Vie={exports:{}},qie={},Gie={exports:{}},$ie={};/**
 * @license React
 * use-sync-external-store-shim.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 NRe;function qFt(){if(NRe)return $ie;NRe=1;var t=zk();function e(B,V){return B===V&&(B!==0||1/B===1/V)||B!==B&&V!==V}var r=typeof Object.is=="function"?Object.is:e,n=t.useState,i=t.useEffect,a=t.useLayoutEffect,o=t.useDebugValue;function s(B,V){var X=V(),ie=n({inst:{value:X,getSnapshot:V}}),de=ie[0].inst,ae=ie[1];return a(function(){de.value=X,de.getSnapshot=V,d(de)&&ae({inst:de})},[B,X,V]),i(function(){return d(de)&&ae({inst:de}),B(function(){d(de)&&ae({inst:de})})},[B]),o(X),X}function d(B){var V=B.getSnapshot;B=B.value;try{var X=V();return!r(B,X)}catch{return!0}}function b(B,V){return V()}var L=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?b:s;return $ie.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:L,$ie}var FRe;function rqe(){return FRe||(FRe=1,Gie.exports=qFt()),Gie.exports}/**
 * @license React
 * use-sync-external-store-shim/with-selector.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 zRe;function GFt(){if(zRe)return qie;zRe=1;var t=zk(),e=rqe();function r(b,L){return b===L&&(b!==0||1/b===1/L)||b!==b&&L!==L}var n=typeof Object.is=="function"?Object.is:r,i=e.useSyncExternalStore,a=t.useRef,o=t.useEffect,s=t.useMemo,d=t.useDebugValue;return qie.useSyncExternalStoreWithSelector=function(b,L,B,V,X){var ie=a(null);if(ie.current===null){var de={hasValue:!1,value:null};ie.current=de}else de=ie.current;ie=s(function(){function U(Ie){if(!ve){if(ve=!0,Se=Ie,Ie=V(Ie),X!==void 0&&de.hasValue){var Ve=de.value;if(X(Ve,Ie))return Pe=Ve}return Pe=Ie}if(Ve=Pe,n(Se,Ie))return Ve;var Ze=V(Ie);return X!==void 0&&X(Ve,Ze)?(Se=Ie,Ve):(Se=Ie,Pe=Ze)}var ve=!1,Se,Pe,Me=B===void 0?null:B;return[function(){return U(L())},Me===null?void 0:function(){return U(Me())}]},[L,B,V,X]);var ae=i(b,ie[0],ie[1]);return o(function(){de.hasValue=!0,de.value=ae},[ae]),d(ae),ae},qie}var BRe;function $Ft(){return BRe||(BRe=1,Vie.exports=GFt()),Vie.exports}var nqe=$Ft();const WFt=Qh(nqe);function p5(t,e,r,n,i){const a=o=>e(o,r,n,i);return nqe.useSyncExternalStoreWithSelector(t.subscribe,t.getSnapshot,t.getSnapshot,a)}const YFt=()=>{};function T$(t,e,r){const n=pE(XFt,{store:t,selector:e}).current;n.effect=r,pY(n.onMount)}function XFt(t){const{store:e,selector:r}=t;let n=r(e.state);const i={effect:YFt,dispose:null,subscribe:()=>{i.dispose??=e.subscribe(a=>{const o=r(a);i.effect(n,o),n=o})},onMount:()=>(i.subscribe(),()=>{i.dispose?.(),i.dispose=null})};return i.subscribe(),i}class SX{static create(e){return new SX(e)}constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){this.state=e,this.updateTick+=1;const r=this.updateTick,n=this.listeners.values();let i;for(;i=n.next(),!i.done;){if(r!==this.updateTick)return;const a=i.value;a(e)}}update(e){for(const r in e)if(!Object.is(this.state[r],e[r])){this.setState(Mr({},this.state,e));return}}set(e,r){Object.is(this.state[e],r)||this.setState(Mr({},this.state,{[e]:r}))}}const pc=(...t)=>{const e=EG(...t);return(n,i,a,o)=>e(L0e(n),i,a,o)},av=(...t)=>{const e=tqe(...t);return(n,i,a,o)=>e(L0e(n),i,a,o)},e0=t=>(e,r)=>t(L0e(e),r);function L0e(t){return"current"in t?t.current.state:t}const p0=e0(t=>t.dimensions),O0e=pc(p0,t=>t.columnsTotalWidth),ZFt=pc(p0,t=>t.rowHeight);pc(p0,t=>t.contentSize.height);const iqe=pc(p0,t=>t.hasScrollX),aqe=pc(p0,t=>t.hasScrollY),oqe=pc(p0,t=>t.columnsTotalWidth<t.viewportOuterSize.width),KFt=pc(p0,t=>t.headerHeight),JFt=pc(p0,t=>t.groupHeaderHeight);pc(p0,t=>t.headerFilterHeight);const QFt=pc(p0,t=>t.hasScrollX?t.scrollbarSize:0),sqe=pc(p0,t=>t.hasScrollY?t.scrollbarSize:0),e7t=pc(p0,QFt,(t,e)=>{const r=t.viewportOuterSize.height-t.minimumSize.height>0;return!(e===0&&!r)}),N0e=e0(t=>t.rowsMeta),aM=e0(t=>t.rows),oF=pc(aM,t=>t.totalRowCount),t7t=pc(aM,t=>t.loading),r7t=pc(aM,t=>t.totalTopLevelRowCount),V3=pc(aM,t=>t.dataRowIdToModelLookup);pc(V3,(t,e)=>t[e]);const Sb=pc(aM,t=>t.tree),D5=pc(Sb,(t,e)=>t[e]),n7t=pc(aM,t=>t.groupsToFetch),i7t=pc(aM,t=>t.groupingName),URe=pc(aM,t=>t.treeDepths),rU=av(aM,t=>{const e=Object.entries(t.treeDepths);return e.length===0?1:(e.filter(([,r])=>r>0).map(([r])=>Number(r)).sort((r,n)=>n-r)[0]??0)+1}),QD=pc(aM,t=>t.dataRowIds),a7t=av(QD,V3,(t,e)=>t.reduce((r,n)=>(e[n]&&r.push(e[n]),r),[])),o7t=pc(aM,t=>t?.additionalRowGroups),sF=av(o7t,t=>{const e=t?.pinnedRows;return{bottom:e?.bottom?.map(r=>({id:r.id,model:r.model??{}}))??[],top:e?.top?.map(r=>({id:r.id,model:r.model??{}}))??[]}}),lqe=pc(sF,t=>(t?.top?.length||0)+(t?.bottom?.length||0)),jy="auto-generated-group-node-root",kL=Symbol("mui.id_autogenerated"),s7t=()=>({type:"group",id:jy,depth:-1,groupingField:null,groupingKey:null,isAutoGenerated:!0,children:[],childrenFromPath:{},childrenExpanded:!0,parent:null});function l7t(t,e,r="A row was provided without id in the rows prop:"){if(t==null)throw new Error(["MUI X: The Data Grid component requires all rows to have a unique `id` property.","Alternatively, you can use the `getRowId` prop to specify a custom id for each row.",r,JSON.stringify(e)].join(`
`))}const TX=(t,e,r)=>{const n=e?e(t):t.id;return l7t(n,t,r),n},u7t=(t,e,r)=>{const n=e.field;if(!e||!e.valueGetter)return t[n];const i=t[e.field];return e.valueGetter(i,t,e,r)},AG=({rows:t,getRowId:e,loading:r,rowCount:n})=>{const i={type:"full",rows:[]},a={};for(let o=0;o<t.length;o+=1){const s=t[o],d=TX(s,e);a[d]=s,i.rows.push(d)}return{rowsBeforePartialUpdates:t,loadingPropBeforePartialUpdates:r,rowCountPropBeforePartialUpdates:n,updates:i,dataRowIdToModelLookup:a}},uqe=({tree:t,rowCountProp:e=0})=>{const r=t[jy];return Math.max(e,r.children.length+(r.footerId==null?0:1))},cqe=({apiRef:t,rowCountProp:e=0,loadingProp:r,previousTree:n,previousTreeDepths:i,previousGroupsToFetch:a})=>{const o=t.current.caches.rows,{tree:s,treeDepths:d,dataRowIds:b,groupingName:L,groupsToFetch:B=[]}=t.current.applyStrategyProcessor("rowTreeCreation",{previousTree:n,previousTreeDepths:i,updates:o.updates,dataRowIdToModelLookup:o.dataRowIdToModelLookup,previousGroupsToFetch:a}),V=t.current.unstable_applyPipeProcessors("hydrateRows",{tree:s,treeDepths:d,dataRowIds:b,dataRowIdToModelLookup:o.dataRowIdToModelLookup});return t.current.caches.rows.updates={type:"partial",actions:{insert:[],modify:[],remove:[]},idToActionLookup:{}},Mr({},V,{totalRowCount:Math.max(e,V.dataRowIds.length),totalTopLevelRowCount:uqe({tree:V.tree,rowCountProp:e}),groupingName:L,loading:r,groupsToFetch:B})},fqe=t=>kL in t,u8=t=>t.type==="skeletonRow"||t.type==="footer"||t.type==="group"&&t.isAutoGenerated||t.type==="pinnedRow"&&t.isAutoGenerated,F0e=(t,e,r,n)=>{const i=t[e];if(i.type!=="group")return[];const a=[];for(let o=0;o<i.children.length;o+=1){const s=i.children[o];if((!r||!u8(t[s]))&&a.push(s),n)continue;const d=F0e(t,s,r,n);for(let b=0;b<d.length;b+=1)a.push(d[b])}return!r&&i.footerId!=null&&a.push(i.footerId),a},HRe=({previousCache:t,getRowId:e,updates:r,groupKeys:n})=>{if(t.updates.type==="full")throw new Error("MUI X: Unable to prepare a partial update if a full update is not applied yet.");const i=new Map;r.forEach(b=>{const L=TX(b,e,"A row was provided without id when calling updateRows():");i.has(L)?i.set(L,Mr({},i.get(L),b)):i.set(L,b)});const a={type:"partial",actions:{insert:[...t.updates.actions.insert??[]],modify:[...t.updates.actions.modify??[]],remove:[...t.updates.actions.remove??[]]},idToActionLookup:Mr({},t.updates.idToActionLookup),groupKeys:n},o=Mr({},t.dataRowIdToModelLookup),s={insert:{},modify:{},remove:{}};i.forEach((b,L)=>{const B=a.idToActionLookup[L];if(b._action==="delete"){if(B==="remove"||!o[L])return;B!=null&&(s[B][L]=!0),a.actions.remove.push(L),delete o[L];return}const V=o[L];if(V){B==="remove"?(s.remove[L]=!0,a.actions.modify.push(L)):B==null&&a.actions.modify.push(L),o[L]=Mr({},V,b);return}B==="remove"?(s.remove[L]=!0,a.actions.insert.push(L)):B==null&&a.actions.insert.push(L),o[L]=b});const d=Object.keys(s);for(let b=0;b<d.length;b+=1){const L=d[b],B=s[L];Object.keys(B).length>0&&(a.actions[L]=a.actions[L].filter(V=>!B[V]))}return{dataRowIdToModelLookup:o,updates:a,rowsBeforePartialUpdates:t.rowsBeforePartialUpdates,loadingPropBeforePartialUpdates:t.loadingPropBeforePartialUpdates,rowCountPropBeforePartialUpdates:t.rowCountPropBeforePartialUpdates}},dqe="var(--DataGrid-overlayHeight, calc(var(--height) * 2))";function jRe(t,e,r){const n=[];return e.forEach(i=>{const a=TX(i,r,"A row was provided without id when calling updateRows():");if(D5(t,a)?.type==="pinnedRow"){const s=t.current.caches.pinnedRows,d=s.idLookup[a];d&&(s.idLookup[a]=Mr({},d,i))}else n.push(i)}),n}const hqe=(t,e,r)=>typeof t=="number"&&t>0?t:e,c7t=Object.is;function pqe(t,e){if(t===e)return!0;if(!(t instanceof Object)||!(e instanceof Object))return!1;let r=0,n=0;for(const i in t)if(r+=1,!c7t(t[i],e[i])||!(i in e))return!1;for(const i in e)n+=1;return r===n}function Vk(t){return ze.memo(t,pqe)}const f7t={noRowsLabel:"No rows",noResultsOverlayLabel:"No results found.",noColumnsOverlayLabel:"No columns",noColumnsOverlayManageColumns:"Manage columns",emptyPivotOverlayLabel:"Add fields to rows, columns, and values to create a pivot table",toolbarDensity:"Density",toolbarDensityLabel:"Density",toolbarDensityCompact:"Compact",toolbarDensityStandard:"Standard",toolbarDensityComfortable:"Comfortable",toolbarColumns:"Columns",toolbarColumnsLabel:"Select columns",toolbarFilters:"Filters",toolbarFiltersLabel:"Show filters",toolbarFiltersTooltipHide:"Hide filters",toolbarFiltersTooltipShow:"Show filters",toolbarFiltersTooltipActive:t=>t!==1?`${t} active filters`:`${t} active filter`,toolbarQuickFilterPlaceholder:"Search…",toolbarQuickFilterLabel:"Search",toolbarQuickFilterDeleteIconLabel:"Clear",toolbarExport:"Export",toolbarExportLabel:"Export",toolbarExportCSV:"Download as CSV",toolbarExportPrint:"Print",toolbarExportExcel:"Download as Excel",toolbarPivot:"Pivot",toolbarCharts:"Charts",toolbarAssistant:"AI Assistant",columnsManagementSearchTitle:"Search",columnsManagementNoColumns:"No columns",columnsManagementShowHideAllText:"Show/Hide All",columnsManagementReset:"Reset",columnsManagementDeleteIconLabel:"Clear",filterPanelAddFilter:"Add filter",filterPanelRemoveAll:"Remove all",filterPanelDeleteIconLabel:"Delete",filterPanelLogicOperator:"Logic operator",filterPanelOperator:"Operator",filterPanelOperatorAnd:"And",filterPanelOperatorOr:"Or",filterPanelColumns:"Columns",filterPanelInputLabel:"Value",filterPanelInputPlaceholder:"Filter value",filterOperatorContains:"contains",filterOperatorDoesNotContain:"does not contain",filterOperatorEquals:"equals",filterOperatorDoesNotEqual:"does not equal",filterOperatorStartsWith:"starts with",filterOperatorEndsWith:"ends with",filterOperatorIs:"is",filterOperatorNot:"is not",filterOperatorAfter:"is after",filterOperatorOnOrAfter:"is on or after",filterOperatorBefore:"is before",filterOperatorOnOrBefore:"is on or before",filterOperatorIsEmpty:"is empty",filterOperatorIsNotEmpty:"is not empty",filterOperatorIsAnyOf:"is any of","filterOperator=":"=","filterOperator!=":"!=","filterOperator>":">","filterOperator>=":">=","filterOperator<":"<","filterOperator<=":"<=",headerFilterOperatorContains:"Contains",headerFilterOperatorDoesNotContain:"Does not contain",headerFilterOperatorEquals:"Equals",headerFilterOperatorDoesNotEqual:"Does not equal",headerFilterOperatorStartsWith:"Starts with",headerFilterOperatorEndsWith:"Ends with",headerFilterOperatorIs:"Is",headerFilterOperatorNot:"Is not",headerFilterOperatorAfter:"Is after",headerFilterOperatorOnOrAfter:"Is on or after",headerFilterOperatorBefore:"Is before",headerFilterOperatorOnOrBefore:"Is on or before",headerFilterOperatorIsEmpty:"Is empty",headerFilterOperatorIsNotEmpty:"Is not empty",headerFilterOperatorIsAnyOf:"Is any of","headerFilterOperator=":"Equals","headerFilterOperator!=":"Not equals","headerFilterOperator>":"Greater than","headerFilterOperator>=":"Greater than or equal to","headerFilterOperator<":"Less than","headerFilterOperator<=":"Less than or equal to",headerFilterClear:"Clear filter",filterValueAny:"any",filterValueTrue:"true",filterValueFalse:"false",columnMenuLabel:"Menu",columnMenuAriaLabel:t=>`${t} column menu`,columnMenuShowColumns:"Show columns",columnMenuManageColumns:"Manage columns",columnMenuFilter:"Filter",columnMenuHideColumn:"Hide column",columnMenuUnsort:"Unsort",columnMenuSortAsc:"Sort by ASC",columnMenuSortDesc:"Sort by DESC",columnMenuManagePivot:"Manage pivot",columnMenuManageCharts:"Manage charts",columnHeaderFiltersTooltipActive:t=>t!==1?`${t} active filters`:`${t} active filter`,columnHeaderFiltersLabel:"Show filters",columnHeaderSortIconLabel:"Sort",footerRowSelected:t=>t!==1?`${t.toLocaleString()} rows selected`:`${t.toLocaleString()} row selected`,footerTotalRows:"Total Rows:",footerTotalVisibleRows:(t,e)=>`${t.toLocaleString()} of ${e.toLocaleString()}`,checkboxSelectionHeaderName:"Checkbox selection",checkboxSelectionSelectAllRows:"Select all rows",checkboxSelectionUnselectAllRows:"Unselect all rows",checkboxSelectionSelectRow:"Select row",checkboxSelectionUnselectRow:"Unselect row",booleanCellTrueLabel:"yes",booleanCellFalseLabel:"no",actionsCellMore:"more",pinToLeft:"Pin to left",pinToRight:"Pin to right",unpin:"Unpin",treeDataGroupingHeaderName:"Group",treeDataExpand:"see children",treeDataCollapse:"hide children",groupingColumnHeaderName:"Group",groupColumn:t=>`Group by ${t}`,unGroupColumn:t=>`Stop grouping by ${t}`,detailPanelToggle:"Detail panel toggle",expandDetailPanel:"Expand",collapseDetailPanel:"Collapse",paginationRowsPerPage:"Rows per page:",paginationDisplayedRows:({from:t,to:e,count:r,estimated:n})=>{if(!n)return`${t}–${e} of ${r!==-1?r:`more than ${e}`}`;const i=n&&n>e?`around ${n}`:`more than ${e}`;return`${t}–${e} of ${r!==-1?r:i}`},paginationItemAriaLabel:t=>t==="first"?"Go to first page":t==="last"?"Go to last page":t==="next"?"Go to next page":"Go to previous page",rowReorderingHeaderName:"Row reordering",aggregationMenuItemHeader:"Aggregation",aggregationFunctionLabelNone:"none",aggregationFunctionLabelSum:"sum",aggregationFunctionLabelAvg:"avg",aggregationFunctionLabelMin:"min",aggregationFunctionLabelMax:"max",aggregationFunctionLabelSize:"size",pivotToggleLabel:"Pivot",pivotRows:"Rows",pivotColumns:"Columns",pivotValues:"Values",pivotCloseButton:"Close pivot settings",pivotSearchButton:"Search fields",pivotSearchControlPlaceholder:"Search fields",pivotSearchControlLabel:"Search fields",pivotSearchControlClear:"Clear search",pivotNoFields:"No fields",pivotMenuMoveUp:"Move up",pivotMenuMoveDown:"Move down",pivotMenuMoveToTop:"Move to top",pivotMenuMoveToBottom:"Move to bottom",pivotMenuRows:"Rows",pivotMenuColumns:"Columns",pivotMenuValues:"Values",pivotMenuOptions:"Field options",pivotMenuAddToRows:"Add to Rows",pivotMenuAddToColumns:"Add to Columns",pivotMenuAddToValues:"Add to Values",pivotMenuRemove:"Remove",pivotDragToRows:"Drag here to create rows",pivotDragToColumns:"Drag here to create columns",pivotDragToValues:"Drag here to create values",pivotYearColumnHeaderName:"(Year)",pivotQuarterColumnHeaderName:"(Quarter)",chartsNoCharts:"There are no charts available",chartsChartNotSelected:"Select a chart type to configure its options",chartsTabChart:"Chart",chartsTabFields:"Fields",chartsTabCustomize:"Customize",chartsCloseButton:"Close charts configuration",chartsSyncButtonLabel:"Sync chart",chartsSearchPlaceholder:"Search fields",chartsSearchLabel:"Search fields",chartsSearchClear:"Clear search",chartsNoFields:"No fields",chartsFieldBlocked:"This field cannot be added to any section",chartsCategories:"Categories",chartsSeries:"Series",chartsMenuAddToDimensions:t=>`Add to ${t}`,chartsMenuAddToValues:t=>`Add to ${t}`,chartsMenuMoveUp:"Move up",chartsMenuMoveDown:"Move down",chartsMenuMoveToTop:"Move to top",chartsMenuMoveToBottom:"Move to bottom",chartsMenuOptions:"Field options",chartsMenuRemove:"Remove",chartsDragToDimensions:t=>`Drag here to use column as ${t}`,chartsDragToValues:t=>`Drag here to use column as ${t}`,aiAssistantPanelTitle:"AI Assistant",aiAssistantPanelClose:"Close AI Assistant",aiAssistantPanelNewConversation:"New conversation",aiAssistantPanelConversationHistory:"Conversation history",aiAssistantPanelEmptyConversation:"No prompt history",aiAssistantSuggestions:"Suggestions",promptFieldLabel:"Prompt",promptFieldPlaceholder:"Type a prompt…",promptFieldPlaceholderWithRecording:"Type or record a prompt…",promptFieldPlaceholderListening:"Listening for prompt…",promptFieldSpeechRecognitionNotSupported:"Speech recognition is not supported in this browser",promptFieldSend:"Send",promptFieldRecord:"Record",promptFieldStopRecording:"Stop recording",promptRerun:"Run again",promptProcessing:"Processing…",promptAppliedChanges:"Applied changes",promptChangeGroupDescription:t=>`Group by ${t}`,promptChangeAggregationLabel:(t,e)=>`${t} (${e})`,promptChangeAggregationDescription:(t,e)=>`Aggregate ${t} (${e})`,promptChangeFilterLabel:(t,e,r)=>e==="is any of"?`${t} is any of: ${r}`:`${t} ${e} ${r}`,promptChangeFilterDescription:(t,e,r)=>e==="is any of"?`Filter where ${t} is any of: ${r}`:`Filter where ${t} ${e} ${r}`,promptChangeSortDescription:(t,e)=>`Sort by ${t} (${e})`,promptChangePivotEnableLabel:"Pivot",promptChangePivotEnableDescription:"Enable pivot",promptChangePivotColumnsLabel:t=>`Columns (${t})`,promptChangePivotColumnsDescription:(t,e)=>`${t}${e?` (${e})`:""}`,promptChangePivotRowsLabel:t=>`Rows (${t})`,promptChangePivotValuesLabel:t=>`Values (${t})`,promptChangePivotValuesDescription:(t,e)=>`${t} (${e})`};function Fh(t){return Al("MuiDataGrid",t)}const Bi=Ml("MuiDataGrid",["aiAssistantPanel","aiAssistantPanelHeader","aiAssistantPanelTitleContainer","aiAssistantPanelTitle","aiAssistantPanelBody","aiAssistantPanelEmptyText","aiAssistantPanelFooter","aiAssistantPanelConversation","aiAssistantPanelConversationList","aiAssistantPanelConversationTitle","aiAssistantPanelSuggestions","aiAssistantPanelSuggestionsList","aiAssistantPanelSuggestionsItem","aiAssistantPanelSuggestionsLabel","actionsCell","aggregationColumnHeader","aggregationColumnHeader--alignLeft","aggregationColumnHeader--alignCenter","aggregationColumnHeader--alignRight","aggregationColumnHeaderLabel","aggregationRowOverlayWrapper","autoHeight","autosizing","mainContent","withSidePanel","booleanCell","cell--editable","cell--editing","cell--flex","cell--textCenter","cell--textLeft","cell--textRight","cell--rangeTop","cell--rangeBottom","cell--rangeLeft","cell--rangeRight","cell--pinnedLeft","cell--pinnedRight","cell--selectionMode","cell","cellCheckbox","cellEmpty","cellSkeleton","cellOffsetLeft","checkboxInput","collapsible","collapsibleTrigger","collapsibleIcon","collapsiblePanel","columnHeader","columnHeader--alignCenter","columnHeader--alignLeft","columnHeader--alignRight","columnHeader--dragging","columnHeader--moving","columnHeader--numeric","columnHeader--sortable","columnHeader--sorted","columnHeader--filtered","columnHeader--pinnedLeft","columnHeader--pinnedRight","columnHeader--last","columnHeader--siblingFocused","columnHeader--filter","columnHeaderFilterInput","columnHeaderFilterOperatorLabel","columnHeaderCheckbox","columnHeaderDraggableContainer","columnHeaderTitle","columnHeaderTitleContainer","columnHeaderTitleContainerContent","columnHeader--filledGroup","columnHeader--emptyGroup","columnHeaders","columnSeparator--resizable","columnSeparator--resizing","columnSeparator--sideLeft","columnSeparator--sideRight","columnSeparator","columnsManagement","columnsManagementRow","columnsManagementHeader","columnsManagementSearchInput","columnsManagementFooter","columnsManagementScrollArea","columnsManagementEmptyText","container--top","container--bottom","detailPanel","detailPanelToggleCell","detailPanelToggleCell--expanded","footerCell","panel","panelHeader","panelWrapper","panelContent","panelFooter","paper","editBooleanCell","editInputCell","filler","filler--borderBottom","filler--pinnedLeft","filler--pinnedRight","filterForm","filterFormDeleteIcon","filterFormLogicOperatorInput","filterFormColumnInput","filterFormOperatorInput","filterFormValueInput","filterIcon","footerContainer","headerFilterRow","iconButtonContainer","iconSeparator","main","main--hasPinnedRight","main--hiddenContent","menu","menuIcon","menuIconButton","menuOpen","menuList","overlay","overlayWrapper","overlayWrapperInner","root","root--densityStandard","root--densityComfortable","root--densityCompact","root--disableUserSelection","root--noToolbar","row","row--editable","row--editing","row--firstVisible","row--lastVisible","row--dragging","row--dropAbove","row--dropBelow","row--beingDragged","row--dynamicHeight","row--detailPanelExpanded","row--borderBottom","rowReorderCellPlaceholder","rowCount","rowReorderCellContainer","rowReorderCell","rowReorderCell--draggable","rowReorderIcon","rowSkeleton","scrollArea--left","scrollArea--right","scrollArea--up","scrollArea--down","scrollArea","scrollbar","scrollbar--vertical","scrollbar--horizontal","scrollbarFiller","scrollbarFiller--pinnedRight","selectedRowCount","sortButton","sortIcon","shadowScrollArea","sidebar","sidebarHeader","toolbarContainer","toolbar","toolbarLabel","toolbarDivider","toolbarFilterList","toolbarQuickFilter","toolbarQuickFilterTrigger","toolbarQuickFilterControl","virtualScroller","virtualScroller--hasScrollX","virtualScrollerContent","virtualScrollerContent--overflowed","virtualScrollerRenderZone","withVerticalBorder","withBorderColor","cell--withRightBorder","cell--withLeftBorder","columnHeader--withRightBorder","columnHeader--withLeftBorder","treeDataGroupingCell","treeDataGroupingCellToggle","treeDataGroupingCellLoadingContainer","groupingCriteriaCell","groupingCriteriaCellToggle","groupingCriteriaCellLoadingContainer","pinnedRows","pinnedRows--top","pinnedRows--bottom","pivotPanelAvailableFields","pivotPanelField","pivotPanelField--sorted","pivotPanelFieldActionContainer","pivotPanelFieldCheckbox","pivotPanelFieldDragIcon","pivotPanelFieldList","pivotPanelFieldName","pivotPanelHeader","pivotPanelPlaceholder","pivotPanelScrollArea","pivotPanelSearchContainer","pivotPanelSection","pivotPanelSectionTitle","pivotPanelSections","pivotPanelSwitch","pivotPanelSwitchLabel","prompt","promptContent","promptText","promptFeedback","promptChangeList","promptChangesToggle","promptChangesToggleIcon","promptIcon","promptIconContainer","promptError","promptAction"]);let BC=(function(t){return t.DataGrid="DataGrid",t.DataGridPro="DataGridPro",t.DataGridPremium="DataGridPremium",t})({});const VRe=1e3;class d7t{timeouts=new Map;cleanupTimeout=VRe;constructor(e=VRe){this.cleanupTimeout=e}register(e,r,n){this.timeouts||(this.timeouts=new Map);const i=setTimeout(()=>{typeof r=="function"&&r(),this.timeouts.delete(n.cleanupToken)},this.cleanupTimeout);this.timeouts.set(n.cleanupToken,i)}unregister(e){const r=this.timeouts.get(e.cleanupToken);r&&(this.timeouts.delete(e.cleanupToken),clearTimeout(r))}reset(){this.timeouts&&(this.timeouts.forEach((e,r)=>{this.unregister({cleanupToken:r})}),this.timeouts=void 0)}}class h7t{registry=new FinalizationRegistry(e=>{typeof e=="function"&&e()});register(e,r,n){this.registry.register(e,r,n)}unregister(e){this.registry.unregister(e)}reset(){}}class z0e{static create(){return new z0e}}const aV={current:v7t()};let qRe=0;function sc(t,e,r,n){const i=ze.useState(z0e.create)[0],a=ze.useRef(null),o=ze.useRef(null);o.current=r;const s=ze.useRef(null);if(!a.current&&o.current){const d=(b,L,B)=>{L.defaultMuiPrevented||o.current?.(b,L,B)};a.current=t.current.subscribeEvent(e,d,n),qRe+=1,s.current={cleanupToken:qRe},aV.current.register(i,()=>{a.current?.(),a.current=null,s.current=null},s.current)}else!o.current&&a.current&&(a.current(),a.current=null,s.current&&(aV.current.unregister(s.current),s.current=null));ze.useEffect(()=>{if(!a.current&&o.current){const d=(b,L,B)=>{L.defaultMuiPrevented||o.current?.(b,L,B)};a.current=t.current.subscribeEvent(e,d,n)}return s.current&&aV.current&&(aV.current.unregister(s.current),s.current=null),()=>{a.current?.(),a.current=null}},[t,e,n])}const p7t={isFirst:!0};function Zm(t,e,r){sc(t,e,r,p7t)}function v7t(){return typeof FinalizationRegistry<"u"?new h7t:new d7t}var vqe=rqe();const m7t=Object.is,mqe=pqe,g7t=(t,e)=>t===e?!0:t.length===e.length&&t.every((r,n)=>r===e[n]),y7t=(t,e)=>{let r=Object.is;return e instanceof Array?r=g7t:e instanceof Object&&(r=mqe),r(t,e)},b7t=()=>({state:null,equals:null,selector:null,args:void 0}),GRe=[],x7t=()=>null;function wl(t,e,r=void 0,n=m7t){const i=pE(b7t),a=i.current.selector!==null,[o,s]=ze.useState(a?null:e(t,r));i.current.state=o,i.current.equals=n,i.current.selector=e;const d=i.current.args;if(i.current.args=r,a&&!y7t(d,r)){const B=i.current.selector(t,i.current.args);i.current.equals(i.current.state,B)||(i.current.state=B,s(B))}const b=ze.useCallback(()=>(i.current.subscription||(i.current.subscription=t.current.store.subscribe(()=>{const B=i.current.selector(t,i.current.args);i.current.equals(i.current.state,B)||(i.current.state=B,s(B))})),null),GRe),L=ze.useCallback(()=>(i.current.subscription||b(),()=>{i.current.subscription&&(i.current.subscription(),i.current.subscription=void 0)}),GRe);return vqe.useSyncExternalStore(L,b,x7t),o}const _7t=.7,w7t=1.3,S7t={compact:_7t,comfortable:w7t,standard:1},SN=e0(t=>t.density),nU=pc(SN,t=>S7t[t]);function V5(t){throw new Error("Failed assertion: should not be rendered")}const T7t=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","isValidating","debounceMs","isProcessingProps","onValueChange","slotProps"],E7t=t=>{const{classes:e}=t;return Cs({root:["editInputCell"]},Fh,e)},A7t=fa(V5,{name:"MuiDataGrid",slot:"EditInputCell"})({font:Bu.typography.font.body,padding:"1px 0","& input":{padding:"0 16px",height:"100%"}}),C7t=of((t,e)=>{const r=Cu(),{id:n,value:i,field:a,colDef:o,hasFocus:s,debounceMs:d=200,isProcessingProps:b,onValueChange:L,slotProps:B}=t,V=Ms(t,T7t),X=wd(),ie=ze.useRef(null),[de,ae]=ze.useState(i),U=E7t(r),ve=ze.useCallback(async Pe=>{const Me=Pe.target.value,Ie=X.current.getColumn(a);let Ve=Me;Ie.valueParser&&(Ve=Ie.valueParser(Me,X.current.getRow(n),Ie,X)),ae(Ve),X.current.setEditCellValue({id:n,field:a,value:Ve,debounceMs:d,unstable_skipValueParser:!0},Pe),L&&await L(Pe,Me)},[X,d,a,n,L]),Se=X.current.unstable_getEditCellMeta(n,a);return ze.useEffect(()=>{Se?.changeReason!=="debouncedSetEditCellValue"&&ae(i)},[Se,i]),Ah(()=>{s&&ie.current.focus()},[s]),Ke.jsx(A7t,Mr({as:r.slots.baseInput,inputRef:ie,className:U.root,ownerState:r,fullWidth:!0,type:o.type==="number"?o.type:"text",value:de??"",onChange:ve,endAdornment:b?Ke.jsx(r.slots.loadIcon,{fontSize:"small",color:"action"}):void 0},V,B?.root,{ref:e}))}),M7t=t=>Ke.jsx(C7t,Mr({},t)),gqe=(t,e)=>e&&t.length>1?[t[0]]:t,$Re=(t,e)=>r=>Mr({},r,{sorting:Mr({},r.sorting,{sortModel:gqe(t,e)})}),R7t=t=>t==="desc",k7t=(t,e)=>{const r=e.current.getColumn(t.field);if(!r||t.sort===null)return null;let n;return r.getSortComparator?n=r.getSortComparator(t.sort):n=R7t(t.sort)?(...a)=>-1*r.sortComparator(...a):r.sortComparator,n?{getSortCellParams:a=>({id:a,field:r.field,rowNode:D5(e,a),value:e.current.getCellValue(a,r.field),api:e.current}),comparator:n}:null},I7t=(t,e,r)=>t.reduce((n,i,a)=>{if(n!==0)return n;const o=e.params[a],s=r.params[a];return n=i.comparator(o.value,s.value,o,s),n},0),P7t=(t,e)=>{const r=t.map(n=>k7t(n,e)).filter(n=>!!n);return r.length===0?null:n=>n.map(i=>({node:i,params:r.map(a=>a.getSortCellParams(i.id))})).sort((i,a)=>I7t(r,i,a)).map(i=>i.node.id)},WRe=(t,e)=>{const r=t.indexOf(e);return!e||r===-1||r+1===t.length?t[0]:t[r+1]},B0e=(t,e)=>t==null&&e!=null?-1:e==null&&t!=null?1:t==null&&e==null?0:null,D7t=new Intl.Collator,L7t=(t,e)=>{const r=B0e(t,e);return r!==null?r:typeof t=="string"?D7t.compare(t.toString(),e.toString()):t-e},yqe=(t,e)=>{const r=B0e(t,e);return r!==null?r:Number(t)-Number(e)},bqe=(t,e)=>{const r=B0e(t,e);return r!==null?r:t>e?1:t<e?-1:0},O7t=["item","applyValue","type","apiRef","focusElementRef","tabIndex","disabled","isFilterActive","slotProps","clearButton","headerFilterMenu"];function z3(t){const{item:e,applyValue:r,type:n,apiRef:i,focusElementRef:a,tabIndex:o,disabled:s,slotProps:d,clearButton:b,headerFilterMenu:L}=t,B=Ms(t,O7t),V=d?.root,X=U2(),[ie,de]=ze.useState(Wie(e.value)),[ae,U]=ze.useState(!1),ve=Vd(),Se=Cu(),Pe=ze.useCallback(Me=>{const Ie=Wie(Me.target.value);de(Ie),U(!0),X.start(Se.filterDebounceMs,()=>{const Ve=Mr({},e,{value:n==="number"&&!Number.isNaN(Number(Ie))?Number(Ie):Ie,fromInput:ve});r(Ve),U(!1)})},[X,Se.filterDebounceMs,e,n,ve,r]);return ze.useEffect(()=>{(e.fromInput!==ve||e.value==null)&&de(Wie(e.value))},[ve,e]),Ke.jsxs(ze.Fragment,{children:[Ke.jsx(Se.slots.baseTextField,Mr({id:ve,label:i.current.getLocaleText("filterPanelInputLabel"),placeholder:i.current.getLocaleText("filterPanelInputPlaceholder"),value:ie??"",onChange:Pe,type:n||"text",disabled:s,slotProps:Mr({},V?.slotProps,{input:Mr({endAdornment:ae?Ke.jsx(Se.slots.loadIcon,{fontSize:"small",color:"action"}):null},V?.slotProps?.input),htmlInput:Mr({tabIndex:o},V?.slotProps?.htmlInput)}),inputRef:a},Se.slotProps?.baseTextField,B,V)),L,b]})}function Wie(t){if(!(t==null||t===""))return String(t)}function N7t(t){return typeof t=="number"&&!Number.isNaN(t)}function F7t(t){return typeof t=="function"}function U0e(t){return typeof t=="object"&&t!==null}function z7t(){try{const t="__some_random_key_you_are_not_going_to_use__";return window.localStorage.setItem(t,t),window.localStorage.removeItem(t),!0}catch{return!1}}function E$(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}const fL=(t,e,r)=>Math.max(e,Math.min(r,t));function B7t(t){return()=>{let e=t+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}}function U7t(t){const e=B7t(t);return(r,n)=>r+(n-r)*e()}function xqe(t){return typeof structuredClone=="function"?structuredClone(t):JSON.parse(JSON.stringify(t))}const RP=(t,e)=>r=>{t&&e(r)};function _qe(t){const{item:e,applyValue:r,type:n,apiRef:i,focusElementRef:a,slotProps:o}=t,s=Vd(),[d,b]=ze.useState([]),[L,B]=ze.useState(e.value||[]),V=Cu();ze.useEffect(()=>{const ae=e.value??[];B(ae.map(String))},[e.value]);const X=ze.useCallback((ae,U)=>{B(U.map(String)),r(Mr({},e,{value:[...U.map(ve=>n==="number"?Number(ve):ve)]}))},[r,e,n]),ie=ze.useCallback((ae,U)=>{b(U===""?[]:[U])},[b]),de=V.slots.baseAutocomplete;return Ke.jsx(de,Mr({multiple:!0,freeSolo:!0,options:d,id:s,value:L,onChange:X,onInputChange:ie,label:i.current.getLocaleText("filterPanelInputLabel"),placeholder:i.current.getLocaleText("filterPanelInputPlaceholder"),slotProps:{textField:{type:n||"text",inputRef:a}}},o?.root))}var B5=(function(t){return t.Cell="cell",t.Row="row",t})(B5||{}),$v=(function(t){return t.Edit="edit",t.View="view",t})($v||{}),Lg=(function(t){return t.Edit="edit",t.View="view",t})(Lg||{}),F2=(function(t){return t.And="and",t.Or="or",t})(F2||{});class H7t{constructor(e){this.data=e.ids}has(e){return this.data.has(e)}select(e){this.data.add(e)}unselect(e){this.data.delete(e)}}class j7t{constructor(e){this.data=e.ids}has(e){return!this.data.has(e)}select(e){this.data.delete(e)}unselect(e){this.data.add(e)}}const kP=t=>t.type==="include"?new H7t(t):new j7t(t);var hk=(function(t){return t.enterKeyDown="enterKeyDown",t.cellDoubleClick="cellDoubleClick",t.printableKeyDown="printableKeyDown",t.deleteKeyDown="deleteKeyDown",t.pasteKeyDown="pasteKeyDown",t})(hk||{}),EC=(function(t){return t.cellFocusOut="cellFocusOut",t.escapeKeyDown="escapeKeyDown",t.enterKeyDown="enterKeyDown",t.tabKeyDown="tabKeyDown",t.shiftTabKeyDown="shiftTabKeyDown",t})(EC||{}),wP=(function(t){return t.enterKeyDown="enterKeyDown",t.cellDoubleClick="cellDoubleClick",t.printableKeyDown="printableKeyDown",t.deleteKeyDown="deleteKeyDown",t})(wP||{}),f5=(function(t){return t.rowFocusOut="rowFocusOut",t.escapeKeyDown="escapeKeyDown",t.enterKeyDown="enterKeyDown",t.tabKeyDown="tabKeyDown",t.shiftTabKeyDown="shiftTabKeyDown",t})(f5||{});function wqe(t){return t.field!==void 0}const Sqe={filteredRowsLookup:{},filteredChildrenCountLookup:{},filteredDescendantCountLookup:{}},V9=()=>({items:[],logicOperator:F2.And,quickFilterValues:[],quickFilterLogicOperator:F2.And});function Tqe(t){return{current:t.current.getPublicApi()}}let y5=(function(t){return t.LEFT="left",t.RIGHT="right",t})({});const A$={left:[],right:[]},Eqe=e0(t=>t.isRtl),Aqe=e0(t=>t.props.listView??!1),Cqe=e0(t=>t.listViewColumn),UC=e0(t=>t.columns),L5=pc(UC,t=>t.orderedFields),qk=pc(UC,t=>t.lookup),J3=av(L5,qk,(t,e)=>t.map(r=>e[r])),q3=pc(UC,t=>t.columnVisibilityModel),V7t=pc(UC,t=>t.initialColumnVisibilityModel),uy=av(J3,q3,Aqe,Cqe,(t,e,r,n)=>r&&n?[n]:t.filter(i=>e[i.field]!==!1)),iU=av(uy,t=>t.map(e=>e.field)),H0e=e0(t=>t.pinnedColumns);av(H0e,L5,Eqe,(t,e,r)=>Mqe(t,e,r));const EX=av(UC,H0e,iU,Eqe,Aqe,(t,e,r,n,i)=>{if(i)return A$;const a=Mqe(e,r,n);return{left:a.left.map(s=>t.lookup[s]),right:a.right.map(s=>t.lookup[s])}});function Mqe(t,e,r){if(!Array.isArray(t.left)&&!Array.isArray(t.right)||t.left?.length===0&&t.right?.length===0)return A$;const n=(s,d)=>Array.isArray(s)?s.filter(b=>d.includes(b)):[],i=n(t.left,e),a=e.filter(s=>!i.includes(s)),o=n(t.right,a);return r?{left:o,right:i}:{left:i,right:o}}const QL=av(uy,t=>{const e=[];let r=0;for(let n=0;n<t.length;n+=1)e.push(r),r+=t[n].computedWidth;return e}),Rqe=av(J3,t=>t.filter(e=>e.filterable)),q7t=av(J3,t=>t.reduce((e,r)=>(r.filterable&&(e[r.field]=r),e),{})),G7t=av(J3,t=>t.some(e=>e.colSpan!==void 0));let j7;function $7t(){if(j7!==void 0)return j7;try{j7=new Function("return true")()}catch{j7=!1}return j7}const mpe=(t,e)=>{const r=Mr({},t);if(r.id==null&&(r.id=Math.round(Math.random()*1e5)),r.operator==null){const n=qk(e)[r.field];r.operator=n&&n.filterOperators[0].value}return r},j0e=(t,e,r)=>{const n=t.items.length>1;let i;n&&e?i=[t.items[0]]:i=t.items;const a=n&&i.some(s=>s.id==null);return i.some(s=>s.operator==null)||a?Mr({},t,{items:i.map(s=>mpe(s,r))}):t.items!==i?Mr({},t,{items:i}):t},YRe=(t,e,r)=>n=>Mr({},n,{filterModel:j0e(t,e,r)}),q9=t=>typeof t=="string"?t.normalize("NFD").replace(/[\u0300-\u036f]/g,""):t,kqe=(t,e,r)=>{if(!t.field||!t.operator)return null;const n=r.current.getColumn(t.field);if(!n)return null;let i;if(n.valueParser){const B=n.valueParser;i=Array.isArray(t.value)?t.value?.map(V=>B(V,void 0,n,r)):B(t.value,void 0,n,r)}else i=t.value;const{ignoreDiacritics:a}=r.current.rootProps;a&&(i=q9(i));const o=Mr({},t,{value:i}),s=n.filterOperators;if(!s?.length)throw new Error(`MUI X: No filter operators found for column '${n.field}'.`);const d=s.find(B=>B.value===o.operator);if(!d)throw new Error(`MUI X: No filter operator found for column '${n.field}' and operator value '${o.operator}'.`);const b=Tqe(r),L=d.getApplyFilterFn(o,n);return typeof L!="function"?null:{item:o,fn:B=>{let V=e(B,n);return a&&(V=q9(V)),L(V,B,n,b)}}};let XRe=1;const W7t=(t,e,r,n)=>{const{items:i}=t,a=i.map(d=>kqe(d,e,r)).filter(d=>!!d);if(a.length===0)return null;if(n||!$7t())return(d,b)=>{const L={};for(let B=0;B<a.length;B+=1){const V=a[B];(!b||b(V.item.field))&&(L[V.item.id]=V.fn(d))}return L};const o=new Function("appliers","row","shouldApplyFilter",`"use strict";
${a.map((d,b)=>`const shouldApply${b} = !shouldApplyFilter || shouldApplyFilter(${JSON.stringify(d.item.field)});`).join(`
`)}

const result$$ = {
${a.map((d,b)=>`  ${JSON.stringify(String(d.item.id))}: !shouldApply${b} ? false : appliers[${b}].fn(row),`).join(`
`)}
};

return result$$;`.replaceAll("$$",String(XRe)));return XRe+=1,(d,b)=>o(a,d,b)},Iqe=t=>t.quickFilterExcludeHiddenColumns??!0,Y7t=(t,e,r)=>{const n=t.quickFilterValues?.filter(Boolean)??[];if(n.length===0)return null;const i=L5(r),a=q3(r);let o;Iqe(t)?o=i.filter(L=>a[L]!==!1):o=i;const s=[],{ignoreDiacritics:d}=r.current.rootProps,b=Tqe(r);return o.forEach(L=>{const B=r.current.getColumn(L),V=B?.getApplyQuickFilterFn;V&&s.push({column:B,appliers:n.map(X=>{const ie=d?q9(X):X;return{fn:V(ie,B,b)}})})}),function(B,V){const X={};e:for(let ie=0;ie<n.length;ie+=1){const de=n[ie];for(let ae=0;ae<s.length;ae+=1){const{column:U,appliers:ve}=s[ae],{field:Se}=U;if(V&&!V(Se))continue;const Pe=ve[ie];let Me=e(B,U);if(Pe.fn===null)continue;if(d&&(Me=q9(Me)),Pe.fn(Me,B,U,b)){X[de]=!0;continue e}}X[de]=!1}return X}},X7t=(t,e,r,n)=>{const i=W7t(t,e,r,n),a=Y7t(t,e,r);return function(s,d,b){b.passingFilterItems=i?.(s,d)??null,b.passingQuickFilterValues=a?.(s,d)??null}},ZRe=t=>t!=null,Z7t=(t,e,r,n)=>(t.cleanedFilterItems||(t.cleanedFilterItems=n.filter(i=>kqe(i,e,r)!==null)),t.cleanedFilterItems),K7t=(t,e,r,n,i,a)=>{const o=Z7t(a,n,i,r.items),s=t.filter(ZRe),d=e.filter(ZRe);if(s.length>0){const b=B=>s.some(V=>V[B.id]);if((r.logicOperator??V9().logicOperator)===F2.And){if(!o.every(b))return!1}else if(!o.some(b))return!1}if(d.length>0&&r.quickFilterValues!=null){const b=B=>d.some(V=>V[B]);if((r.quickFilterLogicOperator??V9().quickFilterLogicOperator)===F2.And){if(!r.quickFilterValues.every(b))return!1}else if(!r.quickFilterValues.some(b))return!1}return!0},J7t=t=>{if(!t)return null;const e=new RegExp(E$(t),"i");return(r,n,i,a)=>{let o=a.current.getRowFormattedValue(n,i);return a.current.ignoreDiacritics&&(o=q9(o)),o!=null?e.test(o.toString()):!1}},KRe=(t,e)=>r=>{if(!r.value)return null;const n=t?r.value:r.value.trim(),i=new RegExp(E$(n),"i");return a=>{if(a==null)return e;const o=i.test(String(a));return e?!o:o}},JRe=(t,e)=>r=>{if(!r.value)return null;const n=t?r.value:r.value.trim(),i=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return a=>{if(a==null)return e;const o=i.compare(n,a.toString())===0;return e?!o:o}},QRe=t=>()=>e=>{const r=e===""||e==null;return t?!r:r},Q7t=(t=!1)=>[{value:"contains",getApplyFilterFn:KRe(t,!1),InputComponent:z3},{value:"doesNotContain",getApplyFilterFn:KRe(t,!0),InputComponent:z3},{value:"equals",getApplyFilterFn:JRe(t,!1),InputComponent:z3},{value:"doesNotEqual",getApplyFilterFn:JRe(t,!0),InputComponent:z3},{value:"startsWith",getApplyFilterFn:e=>{if(!e.value)return null;const r=t?e.value:e.value.trim(),n=new RegExp(`^${E$(r)}.*$`,"i");return i=>i!=null?n.test(i.toString()):!1},InputComponent:z3},{value:"endsWith",getApplyFilterFn:e=>{if(!e.value)return null;const r=t?e.value:e.value.trim(),n=new RegExp(`.*${E$(r)}$`,"i");return i=>i!=null?n.test(i.toString()):!1},InputComponent:z3},{value:"isEmpty",getApplyFilterFn:QRe(!1),requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:QRe(!0),requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:e=>{if(!Array.isArray(e.value)||e.value.length===0)return null;const r=t?e.value:e.value.map(i=>i.trim()),n=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return i=>i!=null?r.some(a=>n.compare(a,i.toString()||"")===0):!1},InputComponent:_qe}],HC={width:100,minWidth:50,maxWidth:1/0,hideable:!0,sortable:!0,resizable:!0,filterable:!0,groupable:!0,pinnable:!0,aggregable:!0,chartable:!0,editable:!1,sortComparator:L7t,type:"string",align:"left",filterOperators:Q7t(),renderEditCell:M7t,getApplyQuickFilterFn:J7t};function Pqe(t){return t.key.length===1&&!t.ctrlKey&&!t.metaKey}const C$=t=>t.indexOf("Arrow")===0||t.indexOf("Page")===0||t===" "||t==="Home"||t==="End",ezt=t=>!!t.key,Dqe=t=>t==="Tab"||t==="Escape";function Lqe(t){return(t.ctrlKey||t.metaKey)&&String.fromCharCode(t.keyCode)==="V"&&!t.shiftKey&&!t.altKey}function tzt(t){return(t.ctrlKey||t.metaKey)&&String.fromCharCode(t.keyCode)==="C"&&!t.shiftKey&&!t.altKey}const Oqe=ze.createContext(void 0),AX=()=>{const t=ze.useContext(Oqe);if(t===void 0)throw new Error(["MUI X: Could not find the Data Grid configuration context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join(`
`));return t},rzt="MuiDataGridVariables",V0e=ze.createContext({className:"unset",tag:Ke.jsx("style",{href:"/unset"})});function Nqe(){return ze.useContext(V0e).className}function nzt(){return ze.useContext(V0e)}function izt(t){const e=AX(),r=Cu(),n=e.hooks.useCSSVariables(),i=ze.useMemo(()=>{const a=`${rzt}-${n.id}`,o=`.${a}{${azt(n.variables)}}`,s=Ke.jsx("style",{href:`/${a}`,nonce:r.nonce,children:o});return{className:a,tag:s}},[r.nonce,n]);return Ke.jsx(V0e.Provider,{value:i,children:t.children})}function azt(t){let e="";for(const r in t)Object.hasOwn(t,r)&&t[r]!==void 0&&(e+=`${r}:${t[r]};`);return e}const ozt=["open","target","onClose","children","position","className","onExited"],szt=t=>{const{classes:e}=t;return Cs({root:["menu"]},Fh,e)},lzt=fa(V5,{name:"MuiDataGrid",slot:"Menu"})({zIndex:Bu.zIndex.menu,[`& .${Bi.menuList}`]:{outline:0}});function CX(t){const{open:e,target:r,onClose:n,children:i,position:a,className:o,onExited:s}=t,d=Ms(t,ozt),b=wd(),L=Cu(),B=szt(L),V=Nqe(),X=ze.useRef(null);Ah(()=>{e?X.current=document.activeElement instanceof HTMLElement?document.activeElement:null:(X.current?.focus?.(),X.current=null)},[e]),ze.useEffect(()=>{const ae=e?"menuOpen":"menuClose";b.current.publishEvent(ae,{target:r})},[b,e,r]);const ie=ae=>{ae.target&&(r===ae.target||r?.contains(ae.target))||n(ae)},de=ae=>{Dqe(ae.key)&&n(ae)};return Ke.jsx(lzt,Mr({as:L.slots.basePopper,className:Vo(B.root,o,V),ownerState:L,open:e,target:r,transition:!0,placement:a,onClickAway:ie,onExited:s,clickAwayMouseEvent:"onMouseDown",onKeyDown:de},d,L.slotProps?.basePopper,{children:i}))}const uzt=["api","colDef","id","hasFocus","isEditable","field","value","formattedValue","row","rowNode","cellMode","tabIndex","position","focusElementRef"],czt=t=>typeof t.getActions=="function";function fzt(t){const{colDef:e,id:r,hasFocus:n,tabIndex:i,position:a="bottom-end",focusElementRef:o}=t,s=Ms(t,uzt),[d,b]=ze.useState(-1),[L,B]=ze.useState(!1),V=wd(),X=ze.useRef(null),ie=ze.useRef(null),de=ze.useRef(!1),ae=ze.useRef({}),U=Kv(),ve=Vd(),Se=Vd(),Pe=Cu();if(!czt(e))throw new Error("MUI X: Missing the `getActions` property in the `GridColDef`.");const Me=e.getActions(V.current.getRowParams(r)),Ie=Me.filter(Lt=>!Lt.props.showInMenu),Ve=Me.filter(Lt=>Lt.props.showInMenu),Ze=Ie.length+(Ve.length?1:0);ze.useLayoutEffect(()=>{n||Object.entries(ae.current).forEach(([Lt,dr])=>{dr?.stop({},()=>{delete ae.current[Lt]})})},[n]),ze.useEffect(()=>{if(d<0||!X.current||d>=X.current.children.length)return;X.current.children[d].focus({preventScroll:!0})},[d]),ze.useEffect(()=>{n||(b(-1),de.current=!1)},[n]),ze.useImperativeHandle(o,()=>({focus(){if(!de.current){const Lt=Me.findIndex(dr=>!dr.props.disabled);b(Lt)}}}),[Me]),ze.useEffect(()=>{d>=Ze&&b(Ze-1)},[d,Ze]);const Je=()=>{B(!0),b(Ze-1),de.current=!0},nt=()=>{B(!1)},ut=Lt=>{Lt.stopPropagation(),Lt.preventDefault(),L?nt():Je()},ht=Lt=>dr=>{ae.current[Lt]=dr},_t=(Lt,dr)=>Zt=>{b(Lt),de.current=!0,dr&&dr(Zt)},Dt=Lt=>{if(Ze<=1)return;const dr=(Cr,yt)=>{if(Cr<0||Cr>Me.length)return Cr;const Er=(yt==="left"?-1:1)*(U?-1:1);return Me[Cr+Er]?.props.disabled?dr(Cr+Er,yt):Cr+Er};let Zt=d;Lt.key==="ArrowRight"?Zt=dr(d,"right"):Lt.key==="ArrowLeft"&&(Zt=dr(d,"left")),!(Zt<0||Zt>=Ze)&&Zt!==d&&(Lt.preventDefault(),Lt.stopPropagation(),b(Zt))},qt=Ze>0?{role:"menu",onKeyDown:Dt}:void 0;return Ke.jsxs("div",Mr({ref:X,tabIndex:-1,className:Bi.actionsCell},qt,s,{children:[Ie.map((Lt,dr)=>ze.cloneElement(Lt,{key:dr,touchRippleRef:ht(dr),onClick:_t(dr,Lt.props.onClick),tabIndex:d===dr?i:-1})),Ve.length>0&&Se&&Ke.jsx(Pe.slots.baseIconButton,Mr({ref:ie,id:Se,"aria-label":V.current.getLocaleText("actionsCellMore"),"aria-haspopup":"menu","aria-expanded":L,"aria-controls":L?ve:void 0,role:"menuitem",size:"small",onClick:ut,touchRippleRef:ht(Se),tabIndex:d===Ie.length?i:-1},Pe.slotProps?.baseIconButton,{children:Ke.jsx(Pe.slots.moreActionsIcon,{fontSize:"small"})})),Ve.length>0&&Ke.jsx(CX,{open:L,target:ie.current,position:a,onClose:nt,children:Ke.jsx(Pe.slots.baseMenuList,{id:ve,className:Bi.menuList,"aria-labelledby":Se,autoFocusItem:!0,children:Ve.map((Lt,dr)=>ze.cloneElement(Lt,{key:dr,closeMenu:nt}))})})]}))}const dzt=t=>Ke.jsx(fzt,Mr({},t)),MX="actions",hzt=Mr({},HC,{sortable:!1,filterable:!1,aggregable:!1,chartable:!1,width:100,display:"flex",align:"center",headerAlign:"center",headerName:"",disableColumnMenu:!0,disableExport:!0,renderCell:dzt,getApplyQuickFilterFn:()=>null}),pzt="__tree_data_group__",Fqe="__row_group_by_columns_group__",q0e="__detail_panel_toggle__";let Nh=(function(t){return t[t.NONE=0]="NONE",t[t.LEFT=1]="LEFT",t[t.RIGHT=2]="RIGHT",t[t.VIRTUAL=3]="VIRTUAL",t})({});const vzt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","hasFocus","tabIndex","hideDescendantCount"],mzt=t=>{const{classes:e}=t;return Cs({root:["booleanCell"]},Fh,e)};function gzt(t){const{value:e,rowNode:r}=t,n=Ms(t,vzt),i=wd(),a=Cu(),o={classes:a.classes},s=mzt(o),b=wl(i,rU)>0&&r.type==="group"&&a.treeData===!1,L=ze.useMemo(()=>e?a.slots.booleanCellTrueIcon:a.slots.booleanCellFalseIcon,[a.slots.booleanCellFalseIcon,a.slots.booleanCellTrueIcon,e]);return b&&e===void 0?null:Ke.jsx(L,Mr({fontSize:"small",className:s.root,titleAccess:i.current.getLocaleText(e?"booleanCellTrueLabel":"booleanCellFalseLabel"),"data-value":!!e},n))}const yzt=ze.memo(gzt),bzt=t=>t.field!==Fqe&&u8(t.rowNode)?"":Ke.jsx(yzt,Mr({},t)),xzt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange"],_zt=t=>{const{classes:e}=t;return Cs({root:["editBooleanCell"]},Fh,e)};function wzt(t){const{id:e,value:r,field:n,className:i,hasFocus:a,onValueChange:o}=t,s=Ms(t,xzt),d=wd(),b=ze.useRef(null),L=Vd(),[B,V]=ze.useState(r),X=Cu(),ie={classes:X.classes},de=_zt(ie),ae=ze.useCallback(async U=>{const ve=U.target.checked;o&&await o(U,ve),V(ve),await d.current.setEditCellValue({id:e,field:n,value:ve},U)},[d,n,e,o]);return ze.useEffect(()=>{V(r)},[r]),Ah(()=>{a&&b.current.focus()},[a]),Ke.jsx("label",Mr({htmlFor:L,className:Vo(de.root,i)},s,{children:Ke.jsx(X.slots.baseCheckbox,Mr({id:L,inputRef:b,checked:!!B,onChange:ae,size:"small"},X.slotProps?.baseCheckbox))}))}const Szt=t=>Ke.jsx(wzt,Mr({},t)),Tzt=["item","applyValue","apiRef","focusElementRef","isFilterActive","headerFilterMenu","clearButton","tabIndex","slotProps"];function Ezt(t){const{item:e,applyValue:r,apiRef:n,focusElementRef:i,headerFilterMenu:a,clearButton:o,tabIndex:s,slotProps:d}=t,b=Ms(t,Tzt),[L,B]=ze.useState(CG(e.value)),V=Cu(),X=Vd(),ie=Vd(),de=V.slotProps?.baseSelect||{},ae=de.native??!1,U=V.slotProps?.baseSelectOption||{},ve=ze.useCallback(Me=>{const Ie=CG(Me.target.value);B(Ie),r(Mr({},e,{value:Ie}))},[r,e]);ze.useEffect(()=>{B(CG(e.value))},[e.value]);const Se=d?.root.label??n.current.getLocaleText("filterPanelInputLabel"),Pe=d?.root.slotProps;return Ke.jsxs(ze.Fragment,{children:[Ke.jsxs(V.slots.baseSelect,Mr({fullWidth:!0,labelId:X,id:ie,label:Se,value:L===void 0?"":String(L),onChange:ve,native:ae,slotProps:{htmlInput:Mr({ref:i,tabIndex:s},Pe?.htmlInput)}},de,b,d?.root,{children:[Ke.jsx(V.slots.baseSelectOption,Mr({},U,{native:ae,value:"",children:n.current.getLocaleText("filterValueAny")})),Ke.jsx(V.slots.baseSelectOption,Mr({},U,{native:ae,value:"true",children:n.current.getLocaleText("filterValueTrue")})),Ke.jsx(V.slots.baseSelectOption,Mr({},U,{native:ae,value:"false",children:n.current.getLocaleText("filterValueFalse")}))]})),a,o]})}function CG(t){if(String(t).toLowerCase()==="true")return!0;if(String(t).toLowerCase()==="false")return!1}const Azt=()=>[{value:"is",getApplyFilterFn:t=>{const e=CG(t.value);return e===void 0?null:r=>!!r===e},InputComponent:Ezt}],Czt=(t,e,r,n)=>t?n.current.getLocaleText("booleanCellTrueLabel"):n.current.getLocaleText("booleanCellFalseLabel"),Mzt=t=>{switch(t.toLowerCase().trim()){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case"null":case"undefined":return!1;default:return}},zqe=Mr({},HC,{type:"boolean",display:"flex",align:"center",headerAlign:"center",renderCell:bzt,renderEditCell:Szt,sortComparator:yqe,valueFormatter:Czt,filterOperators:Azt(),getApplyQuickFilterFn:()=>null,aggregable:!1,chartable:!1,pastedValueParser:t=>Mzt(t)});function RX(t){for(const e in t)return!1;return!0}const Bqe=e0(t=>t.sorting),aU=pc(Bqe,t=>t.sortedRows),G0e=av(aU,V3,Sb,(t,e,r)=>t.reduce((n,i)=>{const a=e[i];if(a)n.push({id:i,model:a});else{const o=r[i];o&&u8(o)&&n.push({id:i,model:{[kL]:i}})}return n},[])),P3=pc(Bqe,t=>t.sortModel),Rzt=av(P3,t=>t.reduce((r,n,i)=>(r[n.field]={sortDirection:n.sort,sortIndex:t.length>1?i+1:void 0},r),{}));av(aU,t=>t.reduce((e,r,n)=>(e[r]=n,e),Object.create(null)));const kX=e0(t=>t.filter),lx=pc(kX,t=>t.filterModel),Uqe=pc(lx,t=>t.quickFilterValues),kzt=e0(t=>t.visibleRowsLookup),lF=pc(kX,t=>t.filteredRowsLookup);pc(kX,t=>t.filteredChildrenCountLookup);pc(kX,t=>t.filteredDescendantCountLookup);const e6=av(kzt,G0e,(t,e)=>RX(t)?e:e.filter(r=>t[r.id]!==!1)),dL=av(e6,t=>t.map(e=>e.id)),$0e=av(lF,G0e,(t,e)=>RX(t)?e:e.filter(r=>t[r.id]!==!1)),Hqe=av($0e,t=>t.map(e=>e.id));av(dL,Sb,(t,e)=>{const r={};let n=0;return t.reduce((i,a)=>{const o=e[a];return r[o.depth]||(r[o.depth]=0),o.depth>n&&(r[o.depth]=0),n=o.depth,r[o.depth]+=1,i[a]=r[o.depth],i},{})});const Izt=av($0e,Sb,rU,(t,e,r)=>r<2?[t]:t.reduce((n,i)=>{const a=e[i.id]?.depth;return a===void 0||(n[a]||(n[a]=[]),n[a].push(i)),n},[[]])),jqe=pc(Izt,t=>t[0]??[]),W0e=pc(e6,t=>t.length),Y0e=pc(jqe,t=>t.length),Vqe=pc($0e,t=>t.length);pc(Vqe,Y0e,(t,e)=>t-e);const X0e=av(lx,qk,(t,e)=>t.items?.filter(r=>{if(!r.field)return!1;const n=e[r.field];if(!n?.filterOperators||n?.filterOperators?.length===0)return!1;const i=n.filterOperators.find(a=>a.value===r.operator);return i?!i.InputComponent||r.value!=null&&r.value?.toString()!=="":!1})),Pzt=av(X0e,t=>t.reduce((r,n)=>(r[n.field]?r[n.field].push(n):r[n.field]=[n],r),{}));av(dL,t=>t.reduce((e,r,n)=>(e[r]=n,e),Object.create(null)));const RC=e0(t=>t.rowSelection),oU=av(RC,kP),IX=pc(RC,Vqe,(t,e)=>t.type==="include"?t.ids.size:e-t.ids.size),qqe=av(RC,V3,QD,(t,e,r)=>{const n=new Map;if(t.type==="include")for(const i of t.ids)n.set(i,e[i]);else for(let i=0;i<r.length;i+=1){const a=r[i];t.ids.has(a)||n.set(a,e[a])}return n});function Gqe(t,e){const r=Sb(t),n=aU(t),i=lF(t),a=r[e];if(!a||a.type!=="group")return[];const o=[],s=n.findIndex(d=>d===e)+1;for(let d=s;d<n.length&&r[n[d]]?.depth>a.depth;d+=1){const b=n[d];i[b]!==!1&&t.current.isRowSelectable(b)&&o.push(b)}return o}const Dzt=pc(Sb,lF,oU,(t,e,r,{groupId:n,autoSelectParents:i})=>{const a=t[n];if(!a||a.type!=="group"||r.has(n))return{isIndeterminate:!1,isChecked:r.has(n)};let o=!1,s=!1;const d=b=>{if(e[b]===!1||o&&s)return;const L=t[b];L?.type==="group"&&L.children.forEach(d),r.has(b)?o=!0:s=!0};return d(n),{isIndeterminate:o&&s,isChecked:i?o&&!s:!1}});function Z0e(t){return t.signature===BC.DataGrid?t.checkboxSelection&&t.disableMultipleRowSelection!==!0:!t.disableMultipleRowSelection}const Lzt=(t,e)=>{const r=[];let n=e;for(;n!=null&&n!==jy;){const i=t[n];if(!i)return r;r.push(n),n=i.parent}return r},Ozt=(t,e,r)=>{const n=t[r];if(!n)return[];const i=n.parent;return i==null?[]:t[i].children.filter(o=>o!==r&&e[o]!==!1)},V7=(t,e,r,n,i,a,o=oU(t))=>{const s=lF(t),d=new Set([]);if(!(!n&&!i||s[r]===!1)&&(n&&e[r]?.type==="group"&&Gqe(t,r).forEach(B=>{a(B),d.add(B)}),i)){const b=V=>{if(!o.has(V)&&!d.has(V))return!1;const X=e[V];return X?X.type!=="group"?!0:X.children.every(b):!1},L=V=>{const X=Ozt(e,s,V);if(X.length===0||X.every(b)){const de=e[V]?.parent;de!=null&&de!==jy&&t.current.isRowSelectable(de)&&(a(de),d.add(de),L(de))}},B=e[r];if(!B||B.parent===jy)return;L(r)}},eke=(t,e,r,n,i,a)=>{const o=oU(t);!i&&!n||(i&&Lzt(e,r).forEach(d=>{o.has(d)&&a(d)}),n&&e[r]?.type==="group"&&Gqe(t,r).forEach(b=>{a(b)}))},Nzt=["field","id","formattedValue","row","rowNode","colDef","isEditable","cellMode","hasFocus","tabIndex","api"],Fzt=t=>{const{classes:e}=t;return Cs({root:["checkboxInput"]},Fh,e)},zzt=of(function(e,r){const{field:n,id:i,rowNode:a,tabIndex:o}=e,s=Ms(e,Nzt),d=wd(),b=Cu(),L={classes:b.classes},B=Fzt(L),V=ve=>{const Se={value:ve.target.checked,id:i};d.current.publishEvent("rowSelectionCheckboxChange",Se,ve)};ze.useLayoutEffect(()=>{if(o===0){const ve=d.current.getCellElement(i,n);ve&&(ve.tabIndex=-1)}},[d,o,i,n]);const X=ze.useCallback(ve=>{ve.key===" "&&ve.stopPropagation()},[]),ie=d.current.isRowSelectable(i),{isIndeterminate:de,isChecked:ae}=wl(d,Dzt,{groupId:i,autoSelectParents:b.rowSelectionPropagation?.parents??!1});if(a.type==="footer"||a.type==="pinnedRow")return null;const U=d.current.getLocaleText(ae&&!de?"checkboxSelectionUnselectRow":"checkboxSelectionSelectRow");return Ke.jsx(b.slots.baseCheckbox,Mr({tabIndex:o,checked:ae&&!de,onChange:V,className:B.root,slotProps:{htmlInput:{"aria-label":U,name:"select_row"}},onKeyDown:X,indeterminate:de,disabled:!ie},b.slotProps?.baseCheckbox,s,{ref:r}))}),Bzt=zzt,PX=e0(t=>t.focus),BS=pc(PX,t=>t.cell),Uzt=pc(PX,t=>t.columnHeader);pc(PX,t=>t.columnHeaderFilter);const M$=pc(PX,t=>t.columnGroupHeader),DX=e0(t=>t.tabIndex),K0e=pc(DX,t=>t.cell),$qe=pc(DX,t=>t.columnHeader);pc(DX,t=>t.columnHeaderFilter);const Hzt=pc(DX,t=>t.columnGroupHeader),jzt=100,Vzt=t=>t?0:100,Wqe=(t,e,r)=>e>0&&t>0?Math.ceil(t/e):t===-1?r+2:0,Yqe=t=>({page:0,pageSize:t?0:100}),qzt=(t,e=0)=>e===0?t:Math.max(Math.min(t,e-1),0),Xqe=(t,e)=>{if(e===BC.DataGrid&&t>jzt)throw new Error(["MUI X: `pageSize` cannot exceed 100 in the MIT version of the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join(`
`))},Gzt=-1,uF=e0(t=>t.pagination),Zqe=pc(uF,t=>t.enabled&&t.paginationMode==="client"),Yx=pc(uF,t=>t.paginationModel),TN=pc(uF,t=>t.rowCount),Lz=pc(uF,t=>t.meta),$zt=pc(Yx,t=>t.page),Kqe=pc(Yx,t=>t.pageSize),Jqe=pc(Yx,TN,(t,e)=>Wqe(e,t.pageSize,t.page)),J0e=av(Zqe,Yx,Sb,rU,e6,jqe,(t,e,r,n,i,a)=>{if(!t)return null;const o=a.length,s=Math.min(e.pageSize*e.page,o-1),d=e.pageSize===Gzt?o-1:Math.min(s+e.pageSize-1,o-1);if(s===-1||d===-1)return null;if(n<2)return{firstRowIndex:s,lastRowIndex:d};const b=a[s],L=d-s+1,B=i.findIndex(ie=>ie.id===b.id);let V=B,X=0;for(;V<i.length&&X<=L;){const ie=i[V],de=r[ie.id]?.depth;de===void 0?V+=1:((X<L||de>0)&&(V+=1),de===0&&(X+=1))}return{firstRowIndex:B,lastRowIndex:V-1}}),Wzt=av(e6,J0e,(t,e)=>e?t.slice(e.firstRowIndex,e.lastRowIndex+1):[]),Qqe=av(dL,J0e,(t,e)=>e?t.slice(e.firstRowIndex,e.lastRowIndex+1):[]),sU=av(Zqe,J0e,Wzt,e6,(t,e,r,n)=>t?{rows:r,range:e,rowIdToIndexMap:r.reduce((i,a,o)=>(i.set(a.id,o),i),new Map)}:{rows:n,range:n.length===0?null:{firstRowIndex:0,lastRowIndex:n.length-1},rowIdToIndexMap:n.reduce((i,a,o)=>(i.set(a.id,o),i),new Map)}),Yzt=["field","colDef"],Xzt=t=>{const{classes:e}=t;return Cs({root:["checkboxInput"]},Fh,e)},Zzt=of(function(e,r){const n=Ms(e,Yzt),[,i]=ze.useState(!1),a=wd(),o=Cu(),s={classes:o.classes},d=Xzt(s),b=wl(a,$qe),L=wl(a,RC),B=wl(a,dL),V=wl(a,Qqe),X=ze.useMemo(()=>{const Ve=o.isRowSelectable;if(typeof Ve!="function"||L.type==="exclude")return L;const Ze={type:"include",ids:new Set};for(const Je of L.ids)o.keepNonExistentRowsSelected&&Ze.ids.add(Je),a.current.getRow(Je)&&Ve(a.current.getRowParams(Je))&&Ze.ids.add(Je);return Ze},[a,o.isRowSelectable,o.keepNonExistentRowsSelected,L]),ie=ze.useMemo(()=>{const Ve=!o.pagination||!o.checkboxSelectionVisibleOnly||o.paginationMode==="server"?B:V,Ze=new Set;for(let Je=0;Je<Ve.length;Je+=1){const nt=Ve[Je];a.current.getRow(nt)&&a.current.isRowSelectable(nt)&&Ze.add(nt)}return Ze},[a,o.pagination,o.paginationMode,o.checkboxSelectionVisibleOnly,V,B]),de=ze.useMemo(()=>{const Ve=kP(X);let Ze=0;for(const Je of ie)Ve.has(Je)&&(Ze+=1);return Ze},[X,ie]),ae=ze.useMemo(()=>{if(de===0)return!1;const Ve=kP(X);for(const Ze of ie)if(!Ve.has(Ze))return!0;return!1},[de,X,ie]),U=de>0,ve=Ve=>{const Ze={value:Ve.target.checked};a.current.publishEvent("headerSelectionCheckboxChange",Ze)},Se=b!==null&&b.field===e.field?0:-1;ze.useLayoutEffect(()=>{const Ve=a.current.getColumnHeaderElement(e.field);Se===0&&Ve&&(Ve.tabIndex=-1)},[Se,a,e.field]);const Pe=ze.useCallback(Ve=>{Ve.key===" "&&a.current.publishEvent("headerSelectionCheckboxChange",{value:!U})},[a,U]),Me=ze.useCallback(()=>{i(Ve=>!Ve)},[]);ze.useEffect(()=>a.current.subscribeEvent("rowSelectionChange",Me),[a,Me]);const Ie=a.current.getLocaleText(U&&!ae?"checkboxSelectionUnselectAllRows":"checkboxSelectionSelectAllRows");return Ke.jsx(o.slots.baseCheckbox,Mr({indeterminate:ae,checked:U&&!ae,onChange:ve,className:d.root,slotProps:{htmlInput:{"aria-label":Ie,name:"select_all_rows"}},tabIndex:Se,onKeyDown:Pe,disabled:!Z0e(o)},o.slotProps?.baseCheckbox,n,{ref:r}))}),c8=e0((t,e)=>kL in e?e[kL]:t.props.getRowId?t.props.getRowId(e):e.id),SC="__check__",cF=Mr({},zqe,{type:"custom",field:SC,width:50,resizable:!1,sortable:!1,filterable:!1,aggregable:!1,chartable:!1,disableColumnMenu:!0,disableReorder:!0,disableExport:!0,getApplyQuickFilterFn:()=>null,display:"flex",valueGetter:(t,e,r,n)=>{const i=c8(n,e);return n.current.isRowSelected(i)},rowSpanValueGetter:(t,e,r,n)=>c8(n,e),renderHeader:t=>Ke.jsx(Zzt,Mr({},t)),renderCell:t=>Ke.jsx(Bzt,Mr({},t))}),Kzt=["item","applyValue","type","apiRef","focusElementRef","slotProps","isFilterActive","headerFilterMenu","clearButton","tabIndex","disabled"];function tke(t,e){if(t==null)return"";const r=new Date(t);return Number.isNaN(r.getTime())?"":e==="date"?r.toISOString().substring(0,10):e==="datetime-local"?(r.setMinutes(r.getMinutes()-r.getTimezoneOffset()),r.toISOString().substring(0,19)):r.toISOString().substring(0,10)}function xO(t){const{item:e,applyValue:r,type:n,apiRef:i,focusElementRef:a,slotProps:o,headerFilterMenu:s,clearButton:d,tabIndex:b,disabled:L}=t,B=Ms(t,Kzt),V=o?.root.slotProps,X=U2(),[ie,de]=ze.useState(()=>tke(e.value,n)),[ae,U]=ze.useState(!1),ve=Vd(),Se=Cu(),Pe=ze.useCallback(Me=>{X.clear();const Ie=Me.target.value;de(Ie),U(!0),X.start(Se.filterDebounceMs,()=>{const Ve=new Date(Ie);r(Mr({},e,{value:Number.isNaN(Ve.getTime())?void 0:Ve})),U(!1)})},[r,e,Se.filterDebounceMs,X]);return ze.useEffect(()=>{const Me=tke(e.value,n);de(Me)},[e.value,n]),Ke.jsxs(ze.Fragment,{children:[Ke.jsx(Se.slots.baseTextField,Mr({fullWidth:!0,id:ve,label:i.current.getLocaleText("filterPanelInputLabel"),placeholder:i.current.getLocaleText("filterPanelInputPlaceholder"),value:ie,onChange:Pe,type:n||"text",disabled:L,inputRef:a,slotProps:Mr({},V,{input:Mr({endAdornment:ae?Ke.jsx(Se.slots.loadIcon,{fontSize:"small",color:"action"}):null},V?.input),htmlInput:Mr({max:n==="datetime-local"?"9999-12-31T23:59":"9999-12-31",tabIndex:b},V?.htmlInput)})},Se.slotProps?.baseTextField,B,o?.root)),s,d]})}function _O(t,e,r,n){if(!t.value)return null;const i=new Date(t.value);r?i.setSeconds(0,0):(i.setMinutes(i.getMinutes()+i.getTimezoneOffset()),i.setHours(0,0,0,0));const a=i.getTime();return o=>{if(!o)return!1;if(n)return e(o.getTime(),a);const s=new Date(o);return r?s.setSeconds(0,0):s.setHours(0,0,0,0),e(s.getTime(),a)}}const eGe=t=>[{value:"is",getApplyFilterFn:e=>_O(e,(r,n)=>r===n,t),InputComponent:xO,InputComponentProps:{type:t?"datetime-local":"date"}},{value:"not",getApplyFilterFn:e=>_O(e,(r,n)=>r!==n,t),InputComponent:xO,InputComponentProps:{type:t?"datetime-local":"date"}},{value:"after",getApplyFilterFn:e=>_O(e,(r,n)=>r>n,t),InputComponent:xO,InputComponentProps:{type:t?"datetime-local":"date"}},{value:"onOrAfter",getApplyFilterFn:e=>_O(e,(r,n)=>r>=n,t),InputComponent:xO,InputComponentProps:{type:t?"datetime-local":"date"}},{value:"before",getApplyFilterFn:e=>_O(e,(r,n)=>r<n,t,!t),InputComponent:xO,InputComponentProps:{type:t?"datetime-local":"date"}},{value:"onOrBefore",getApplyFilterFn:e=>_O(e,(r,n)=>r<=n,t),InputComponent:xO,InputComponentProps:{type:t?"datetime-local":"date"}},{value:"isEmpty",getApplyFilterFn:()=>e=>e==null,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>e=>e!=null,requiresFilterValue:!1}],Jzt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","inputProps","isValidating","isProcessingProps","onValueChange","slotProps"],Qzt=fa(V5)({fontSize:"inherit"}),e9t=t=>{const{classes:e}=t;return Cs({root:["editInputCell"]},Fh,e)};function t9t(t){const{id:e,value:r,field:n,colDef:i,hasFocus:a,onValueChange:o,slotProps:s}=t,d=Ms(t,Jzt),b=i.type==="dateTime",L=wd(),B=ze.useRef(null),V=ze.useMemo(()=>{let Pe;r==null?Pe=null:r instanceof Date?Pe=r:Pe=new Date((r??"").toString());let Me;return Pe==null||Number.isNaN(Pe.getTime())?Me="":Me=new Date(Pe.getTime()-Pe.getTimezoneOffset()*60*1e3).toISOString().substr(0,b?16:10),{parsed:Pe,formatted:Me}},[r,b]),[X,ie]=ze.useState(V),de=Cu(),ae={classes:de.classes},U=e9t(ae),ve=ze.useCallback(Pe=>{if(Pe==="")return null;const[Me,Ie]=Pe.split("T"),[Ve,Ze,Je]=Me.split("-"),nt=new Date;if(nt.setFullYear(Number(Ve),Number(Ze)-1,Number(Je)),nt.setHours(0,0,0,0),Ie){const[ut,ht]=Ie.split(":");nt.setHours(Number(ut),Number(ht),0,0)}return nt},[]),Se=ze.useCallback(async Pe=>{const Me=Pe.target.value,Ie=ve(Me);o&&await o(Pe,Ie),ie({parsed:Ie,formatted:Me}),L.current.setEditCellValue({id:e,field:n,value:Ie},Pe)},[L,n,e,o,ve]);return ze.useEffect(()=>{ie(Pe=>V.parsed!==Pe.parsed&&V.parsed?.getTime()!==Pe.parsed?.getTime()?V:Pe)},[V]),Ah(()=>{a&&B.current.focus()},[a]),Ke.jsx(Qzt,Mr({as:de.slots.baseInput,inputRef:B,fullWidth:!0,className:U.root,type:b?"datetime-local":"date",value:X.formatted,onChange:Se},d,s?.root,{slotProps:{htmlInput:Mr({max:b?"9999-12-31T23:59":"9999-12-31"},s?.root?.slotProps?.htmlInput)}}))}const tGe=t=>Ke.jsx(t9t,Mr({},t));function rGe({value:t,columnType:e,rowId:r,field:n}){if(!(t instanceof Date))throw new Error([`MUI X: \`${e}\` column type only accepts \`Date\` objects as values.`,"Use `valueGetter` to transform the value into a `Date` object.",`Row ID: ${r}, field: "${n}".`].join(`
`))}const r9t=(t,e,r,n)=>{if(!t)return"";const i=c8(n,e);return fqe(e)&&!(t instanceof Date)?t:(rGe({value:t,columnType:"date",rowId:i,field:r.field}),t.toLocaleDateString())},n9t=(t,e,r,n)=>{if(!t)return"";const i=c8(n,e);return fqe(e)&&!(t instanceof Date)?t:(rGe({value:t,columnType:"dateTime",rowId:i,field:r.field}),t.toLocaleString())},i9t=Mr({},HC,{type:"date",sortComparator:bqe,valueFormatter:r9t,filterOperators:eGe(),renderEditCell:tGe,pastedValueParser:t=>new Date(t)}),a9t=Mr({},HC,{type:"dateTime",sortComparator:bqe,valueFormatter:n9t,filterOperators:eGe(!0),renderEditCell:tGe,pastedValueParser:t=>new Date(t)}),SP=t=>t==null?null:Number(t),o9t=t=>t==null||Number.isNaN(t)||t===""?null:e=>SP(e)===SP(t),s9t=()=>[{value:"=",getApplyFilterFn:t=>t.value==null||Number.isNaN(t.value)?null:e=>SP(e)===t.value,InputComponent:z3,InputComponentProps:{type:"number"}},{value:"!=",getApplyFilterFn:t=>t.value==null||Number.isNaN(t.value)?null:e=>SP(e)!==t.value,InputComponent:z3,InputComponentProps:{type:"number"}},{value:">",getApplyFilterFn:t=>t.value==null||Number.isNaN(t.value)?null:e=>e==null?!1:SP(e)>t.value,InputComponent:z3,InputComponentProps:{type:"number"}},{value:">=",getApplyFilterFn:t=>t.value==null||Number.isNaN(t.value)?null:e=>e==null?!1:SP(e)>=t.value,InputComponent:z3,InputComponentProps:{type:"number"}},{value:"<",getApplyFilterFn:t=>t.value==null||Number.isNaN(t.value)?null:e=>e==null?!1:SP(e)<t.value,InputComponent:z3,InputComponentProps:{type:"number"}},{value:"<=",getApplyFilterFn:t=>t.value==null||Number.isNaN(t.value)?null:e=>e==null?!1:SP(e)<=t.value,InputComponent:z3,InputComponentProps:{type:"number"}},{value:"isEmpty",getApplyFilterFn:()=>t=>t==null,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>t=>t!=null,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:t=>!Array.isArray(t.value)||t.value.length===0?null:e=>e!=null&&t.value.includes(Number(e)),InputComponent:_qe,InputComponentProps:{type:"number"}}],l9t=Mr({},HC,{type:"number",align:"right",headerAlign:"right",sortComparator:yqe,valueParser:t=>t===""?null:Number(t),valueFormatter:t=>N7t(t)?t.toLocaleString():t||"",filterOperators:s9t(),getApplyQuickFilterFn:o9t});function G9(t){return t?.type==="singleSelect"}function IL(t,e){if(t)return typeof t.valueOptions=="function"?t.valueOptions(Mr({field:t.field},e)):t.valueOptions}function R$(t,e,r){if(e===void 0)return;const n=e.find(i=>{const a=r(i);return String(a)===String(t)});return r(n)}const u9t=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange","initialOpen","slotProps"];function c9t(t){return"key"in t&&!!t.key}function f9t(t){const e=Cu(),{id:r,value:n,field:i,row:a,colDef:o,hasFocus:s,error:d,onValueChange:b,initialOpen:L=e.editMode===B5.Cell,slotProps:B}=t,V=Ms(t,u9t),X=wd(),ie=ze.useRef(null),de=ze.useRef(null),[ae,U]=ze.useState(L),Se=(e.slotProps?.baseSelect||{}).native??!1;if(Ah(()=>{s&&de.current?.focus()},[s]),!G9(o))return null;const Pe=IL(o,{id:r,row:a});if(!Pe)return null;const Me=o.getOptionValue,Ie=o.getOptionLabel,Ve=async nt=>{if(!G9(o)||!Pe)return;U(!1);const ut=nt.target,ht=R$(ut.value,Pe,Me);b&&await b(nt,ht),await X.current.setEditCellValue({id:r,field:i,value:ht},nt)},Ze=(nt,ut)=>{if(e.editMode===B5.Row){U(!1);return}if(ut==="backdropClick"||nt.key==="Escape"){const ht=X.current.getCellParams(r,i);X.current.publishEvent("cellEditStop",Mr({},ht,{reason:nt.key==="Escape"?EC.escapeKeyDown:EC.cellFocusOut}))}},Je=nt=>{c9t(nt)&&nt.key==="Enter"||U(!0)};return!Pe||!o?null:Ke.jsx(e.slots.baseSelect,Mr({ref:ie,value:n,onChange:Ve,open:ae,onOpen:Je,onClose:Ze,error:d,native:Se,fullWidth:!0,slotProps:{htmlInput:{ref:de}}},V,B?.root,e.slotProps?.baseSelect,{children:Pe.map(nt=>{const ut=Me(nt);return ze.createElement(e.slots.baseSelectOption,Mr({},e.slotProps?.baseSelectOption||{},{native:Se,key:ut,value:ut}),Ie(nt))})}))}const d9t=t=>Ke.jsx(f9t,Mr({},t)),h9t=["item","applyValue","type","apiRef","focusElementRef","tabIndex","isFilterActive","clearButton","headerFilterMenu","slotProps"],p9t=({column:t,OptionComponent:e,getOptionLabel:r,getOptionValue:n,isSelectNative:i,baseSelectOptionProps:a})=>["",...IL(t)||[]].map(s=>{const d=n(s);let b=r(s);return b===""&&(b=" "),ze.createElement(e,Mr({},a,{native:i,key:d,value:d}),b)});function rke(t){const{item:e,applyValue:r,type:n,apiRef:i,focusElementRef:a,tabIndex:o,clearButton:s,headerFilterMenu:d,slotProps:b}=t,L=Ms(t,h9t),B=e.value??"",V=Vd(),X=Vd(),ie=Cu(),de=ie.slotProps?.baseSelect?.native??!1,ae=i.current.getColumn(e.field),U=ae.getOptionValue,ve=ae.getOptionLabel,Se=ze.useMemo(()=>IL(ae),[ae]),Pe=ze.useCallback(Ie=>{let Ve=Ie.target.value;Ve=R$(Ve,Se,U),r(Mr({},e,{value:Ve}))},[Se,U,r,e]);if(!ae||!G9(ae))return null;const Me=b?.root.label??i.current.getLocaleText("filterPanelInputLabel");return Ke.jsxs(ze.Fragment,{children:[Ke.jsx(ie.slots.baseSelect,Mr({fullWidth:!0,id:V,label:Me,labelId:X,value:B,onChange:Pe,slotProps:{htmlInput:Mr({tabIndex:o,ref:a,type:n||"text",placeholder:b?.root.placeholder??i.current.getLocaleText("filterPanelInputPlaceholder")},b?.root.slotProps?.htmlInput)},native:de},ie.slotProps?.baseSelect,L,b?.root,{children:p9t({column:ae,OptionComponent:ie.slots.baseSelectOption,getOptionLabel:ve,getOptionValue:U,isSelectNative:de,baseSelectOptionProps:ie.slotProps?.baseSelectOption})})),d,s]})}const v9t=["item","applyValue","type","apiRef","focusElementRef","slotProps"];function m9t(t){const{item:e,applyValue:r,type:n,apiRef:i,focusElementRef:a,slotProps:o}=t,s=Ms(t,v9t),d=Vd(),b=Cu(),L=i.current.getColumn(e.field),B=L.getOptionValue,V=L.getOptionLabel,X=ze.useCallback((ve,Se)=>B(ve)===B(Se),[B]),ie=ze.useMemo(()=>IL(L)||[],[L]),de=ze.useMemo(()=>Array.isArray(e.value)?e.value.reduce((ve,Se)=>{const Pe=ie.find(Me=>B(Me)===Se);return Pe!=null&&ve.push(Pe),ve},[]):[],[B,e.value,ie]),ae=ze.useCallback((ve,Se)=>{r(Mr({},e,{value:Se.map(B)}))},[r,e,B]);if(!L||!G9(L))return null;const U=b.slots.baseAutocomplete;return Ke.jsx(U,Mr({multiple:!0,options:ie,isOptionEqualToValue:X,id:d,value:de,onChange:ae,getOptionLabel:V,label:i.current.getLocaleText("filterPanelInputLabel"),placeholder:i.current.getLocaleText("filterPanelInputPlaceholder"),slotProps:{textField:{type:n||"text",inputRef:a}}},s,o?.root))}const wO=t=>t==null||!U0e(t)?t:t.value,g9t=()=>[{value:"is",getApplyFilterFn:t=>t.value==null||t.value===""?null:e=>wO(e)===wO(t.value),InputComponent:rke},{value:"not",getApplyFilterFn:t=>t.value==null||t.value===""?null:e=>wO(e)!==wO(t.value),InputComponent:rke},{value:"isAnyOf",getApplyFilterFn:t=>{if(!Array.isArray(t.value)||t.value.length===0)return null;const e=t.value.map(wO);return r=>e.includes(wO(r))},InputComponent:m9t}],y9t=t=>typeof t[0]=="object",b9t=t=>U0e(t)?t.value:t,x9t=t=>U0e(t)?t.label:String(t),_9t=Mr({},HC,{type:"singleSelect",getOptionLabel:x9t,getOptionValue:b9t,valueFormatter(t,e,r,n){const i=c8(n,e);if(!G9(r))return"";const a=IL(r,{id:i,row:e});if(t==null)return"";if(!a)return t;if(!y9t(a))return r.getOptionLabel(t);const o=a.find(s=>r.getOptionValue(s)===t);return o?r.getOptionLabel(o):""},renderEditCell:d9t,filterOperators:g9t(),pastedValueParser:(t,e,r)=>{const n=r,i=IL(n)||[],a=n.getOptionValue;if(i.find(s=>a(s)===t))return t}}),w9t="string",S9t=()=>({string:HC,number:l9t,date:i9t,dateTime:a9t,boolean:zqe,singleSelect:_9t,[MX]:hzt,custom:HC}),Q0e=e0(t=>t.headerFiltering),T9t=pc(Q0e,t=>t?.enabled??!1),E9t=pc(Q0e,t=>t.editing),A9t=pc(Q0e,t=>t.menuOpen),LX=e0(t=>t.columnGrouping),nGe=av(LX,t=>t?.unwrappedGroupingModel??{}),iGe=av(LX,t=>t?.lookup??{}),C9t=av(LX,t=>t?.headerStructure??[]),lU=pc(LX,t=>t?.maxDepth??0),aGe=["maxWidth","minWidth","width","flex"],Yie=S9t();function M9t({initialFreeSpace:t,totalFlexUnits:e,flexColumns:r}){const n=new Set(r.map(o=>o.field)),i={all:{},frozenFields:[],freeze:o=>{const s=i.all[o];s&&s.frozen!==!0&&(i.all[o].frozen=!0,i.frozenFields.push(o))}};function a(){if(i.frozenFields.length===n.size)return;const o={min:{},max:{}};let s=t,d=e,b=0;i.frozenFields.forEach(L=>{s-=i.all[L].computedWidth,d-=i.all[L].flex});for(let L=0;L<r.length;L+=1){const B=r[L];if(i.all[B.field]&&i.all[B.field].frozen===!0)continue;let X=s/d*B.flex;X<B.minWidth?(b+=B.minWidth-X,X=B.minWidth,o.min[B.field]=!0):X>B.maxWidth&&(b+=B.maxWidth-X,X=B.maxWidth,o.max[B.field]=!0),i.all[B.field]={frozen:!1,computedWidth:X,flex:B.flex}}b<0?Object.keys(o.max).forEach(L=>{i.freeze(L)}):b>0?Object.keys(o.min).forEach(L=>{i.freeze(L)}):r.forEach(({field:L})=>{i.freeze(L)}),a()}return a(),i.all}const gpe=(t,e)=>{const r={};let n=0,i=0;const a=[];t.orderedFields.forEach(d=>{let b=t.lookup[d],L=0,B=!1;t.columnVisibilityModel[d]!==!1&&(b.flex&&b.flex>0?(n+=b.flex,B=!0):L=fL(b.width||HC.width,b.minWidth||HC.minWidth,b.maxWidth||HC.maxWidth),i+=L),b.computedWidth!==L&&(b=Mr({},b,{computedWidth:L})),B&&a.push(b),r[d]=b});const o=e===void 0?0:e.viewportOuterSize.width-(e.hasScrollY?e.scrollbarSize:0),s=Math.max(o-i,0);if(n>0&&o>0){const d=M9t({initialFreeSpace:s,totalFlexUnits:n,flexColumns:a});Object.keys(d).forEach(b=>{r[b]=Mr({},r[b],{computedWidth:d[b].computedWidth})})}return Mr({},t,{lookup:r})},R9t=(t,e)=>{if(!e)return t;const{orderedFields:r=[],dimensions:n={}}=e,i=Object.keys(n);if(i.length===0&&r.length===0)return t;const a={},o=[];for(let L=0;L<r.length;L+=1){const B=r[L];t.lookup[B]&&(a[B]=!0,o.push(B))}const s=o.length===0?t.orderedFields:[...o,...t.orderedFields.filter(L=>!a[L])],d=Mr({},t.lookup);for(let L=0;L<i.length;L+=1){const B=i[L],V=Mr({},d[B],{hasBeenResized:!0});Object.entries(n[B]).forEach(([X,ie])=>{V[X]=ie===-1?1/0:ie}),d[B]=V}return Mr({},t,{orderedFields:s,lookup:d})};function Xie(t){let e=Yie[w9t];return t&&Yie[t]&&(e=Yie[t]),e}const mN=({apiRef:t,columnsToUpsert:e,initialState:r,columnVisibilityModel:n=q3(t),keepOnlyColumnsToUpsert:i=!1,updateInitialVisibilityModel:a=!1})=>{const o=!t.current.state.columns;let s;if(o)s={orderedFields:[],lookup:{},columnVisibilityModel:n,initialColumnVisibilityModel:n};else{const B=UC(t);s={orderedFields:i?[]:[...B.orderedFields],lookup:Mr({},B.lookup),columnVisibilityModel:n,initialColumnVisibilityModel:a?n:B.initialColumnVisibilityModel}}const d={};if(i&&!o)for(const B in s.lookup)Object.prototype.hasOwnProperty.call(s.lookup,B)&&(d[B]=!1);e.forEach(B=>{const{field:V}=B;d[V]=!0;let X=s.lookup[V];X==null?(X=Mr({},Xie(B.type),{field:V,hasBeenResized:!1}),s.orderedFields.push(V)):i&&s.orderedFields.push(V),X&&X.type!==B.type&&(X=Mr({},Xie(B.type),{field:V}));let ie=X.hasBeenResized;aGe.forEach(de=>{B[de]!==void 0&&(ie=!0,B[de]===-1&&(B[de]=1/0))}),s.lookup[V]=gL(X,Mr({},Xie(B.type),B,{hasBeenResized:ie}))}),i&&!o&&Object.keys(s.lookup).forEach(B=>{d[B]||delete s.lookup[B]});const b=t.current.unstable_applyPipeProcessors("hydrateColumns",s),L=R9t(b,r);return gpe(L,t.current.getRootDimensions?.()??void 0)};function uU(t,e){if(e.listView)return 0;const r=nU(t),n=lU(t),i=T9t(t),a=Math.floor(e.columnHeaderHeight*r),o=Math.floor((e.columnGroupHeaderHeight??e.columnHeaderHeight)*r),s=i?Math.floor((e.headerFilterHeight??e.columnHeaderHeight)*r):0;return a+o*n+s}const k$=1,oGe=1.5,k9t=t=>{const{scrollDirection:e,classes:r}=t,n={root:["scrollArea",`scrollArea--${e}`]};return Cs(n,Fh,r)},I9t=gp("div",{name:"MuiDataGrid",slot:"ScrollArea",overridesResolver:(t,e)=>[{[`&.${Bi["scrollArea--left"]}`]:e["scrollArea--left"]},{[`&.${Bi["scrollArea--right"]}`]:e["scrollArea--right"]},{[`&.${Bi["scrollArea--up"]}`]:e["scrollArea--up"]},{[`&.${Bi["scrollArea--down"]}`]:e["scrollArea--down"]},e.scrollArea]})(()=>({position:"absolute",zIndex:101,[`&.${Bi["scrollArea--left"]}`]:{top:0,left:0,width:20,bottom:0},[`&.${Bi["scrollArea--right"]}`]:{top:0,right:0,width:20,bottom:0},[`&.${Bi["scrollArea--up"]}`]:{top:0,left:0,right:0,height:20},[`&.${Bi["scrollArea--down"]}`]:{bottom:0,left:0,right:0,height:20}})),P9t=pc(p0,(t,e)=>e==="left"?t.leftPinnedWidth:e==="right"?t.rightPinnedWidth+(t.hasScrollX?t.scrollbarSize:0):0);function D9t(t){const e=wd(),[r,n]=ze.useState("none");return sc(e,"columnHeaderDragStart",()=>n("horizontal")),sc(e,"columnHeaderDragEnd",()=>n("none")),sc(e,"rowDragStart",()=>n("vertical")),sc(e,"rowDragEnd",()=>n("none")),r==="none"?null:r==="horizontal"?Ke.jsx(L9t,Mr({},t)):Ke.jsx(O9t,Mr({},t))}function L9t(t){const{scrollDirection:e,scrollPosition:r}=t,n=ze.useRef(null),i=wd(),a=U2(),o=wl(i,nU),s=wl(i,O0e),d=wl(i,P9t,e),b=()=>{const de=p0(i);if(e==="left")return r.current.left>0;if(e==="right"){const ae=s-de.viewportInnerSize.width;return r.current.left<ae}return!1},L=Cu(),B=uU(i,L),V=Math.floor(L.columnHeaderHeight*o),X=Mr({height:V,top:B-V},e==="left"?{left:d}:{},e==="right"?{right:d}:{}),ie=vl(de=>{let ae;if(de.preventDefault(),e==="left")ae=de.clientX-n.current.getBoundingClientRect().right;else if(e==="right")ae=Math.max(1,de.clientX-n.current.getBoundingClientRect().left);else throw new Error("MUI X: Wrong drag direction");ae=(ae-k$)*oGe+k$,a.start(0,()=>{i.current.scroll({left:r.current.left+ae,top:r.current.top})})});return Ke.jsx(sGe,Mr({},t,{ref:n,getCanScrollMore:b,style:X,handleDragOver:ie}))}function O9t(t){const{scrollDirection:e,scrollPosition:r}=t,n=ze.useRef(null),i=wd(),a=U2(),o=wl(i,N0e),s=()=>{const V=p0(i);if(e==="up")return r.current.top>0;if(e==="down"){const ie=(o.currentPageTotalHeight||0)-V.viewportInnerSize.height-(V.hasScrollX?V.scrollbarSize:0);return r.current.top<ie}return!1},d=Cu(),b=uU(i,d),L={top:e==="up"?b:void 0,bottom:e==="down"?0:void 0},B=vl(V=>{let X;if(V.preventDefault(),e==="up")X=V.clientY-n.current.getBoundingClientRect().bottom;else if(e==="down")X=Math.max(1,V.clientY-n.current.getBoundingClientRect().top);else throw new Error("MUI X: Wrong drag direction");X=(X-k$)*oGe+k$,a.start(0,()=>{i.current.scroll({left:r.current.left,top:r.current.top+X})})});return Ke.jsx(sGe,Mr({},t,{ref:n,getCanScrollMore:s,style:L,handleDragOver:B}))}const sGe=of(function(e,r){const{scrollDirection:n,getCanScrollMore:i,style:a,handleDragOver:o}=e,s=wd(),[d,b]=ze.useState(i),L=Cu(),B=Mr({},L,{scrollDirection:n}),V=k9t(B);return sc(s,"scrollPositionChange",()=>{b(i)}),d?Ke.jsx(I9t,{ref:r,className:V.root,ownerState:B,onDragOver:o,style:a}):null}),oV=Vk(D9t),lGe=ze.createContext(void 0);function tT(){const t=ze.useContext(lGe);if(t===void 0)throw new Error(["MUI X: Could not find the Data Grid private context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join(`
`));return t}const N9t=()=>{},F9t=(t,e)=>{const r=ze.useRef(!1);Ah(()=>r.current||!t?N9t:(r.current=!0,e()),[r.current||t])};function nh(t,e,r){const n=ze.useRef(!0);Ah(()=>{n.current=!1,t.current.register(r,e)},[t,r,e]),n.current&&t.current.register(r,e)}function r_(t,e){const r=ze.useRef(null);if(r.current)return r.current;const n=t.current.getLogger(e);return r.current=n,n}const uGe=(t,e,r,n,i)=>{const a=r_(t,"useNativeEventListener");Zm(t,"rootMount",()=>{const o=e();if(!(!o||!r))return a.debug(`Binding native ${r} event`),o.addEventListener(r,n,i),()=>{a.debug(`Clearing native ${r} event`),o.removeEventListener(r,n,i)}})};function t6(t){const e=ze.useRef(!0);e.current&&(e.current=!1,t())}const cGe=e0(t=>t.pivoting),PL=pc(cGe,t=>t?.active),z9t=new Map,eye=pc(cGe,t=>t?.initialColumns||z9t),fGe=(t,e)=>{const r=wl(t,oF),n=wl(t,W0e),i=wl(t,lqe),a=wl(t,uy),o=r===0&&i===0,s=wl(t,t7t),d=wl(t,PL),b=!s&&o,L=!s&&r>0&&n===0,B=!s&&a.length===0,V=b&&d;let X=null,ie=null;return b&&(X="noRowsOverlay"),B&&(X="noColumnsOverlay"),V&&(X="emptyPivotOverlay"),L&&(X="noResultsOverlay"),s&&(X="loadingOverlay",ie=e.slotProps?.loadingOverlay?.[o?"noRowsVariant":"variant"]??(o?"skeleton":"linear-progress")),{overlayType:X,loadingOverlayVariant:ie}},MG=e0(t=>t.columnMenu);function B9t(){const t=tT(),e=Cu(),r=wl(t,uy),n=wl(t,Pzt),i=wl(t,Rzt),a=wl(t,$qe),o=wl(t,()=>K0e(t)===null),s=wl(t,Hzt),d=wl(t,Uzt),b=wl(t,M$),L=wl(t,lU),B=wl(t,MG),V=wl(t,q3),X=wl(t,C9t),ie=!(s===null&&a===null&&o),de=t.current.columnHeadersContainerRef;return Ke.jsx(e.slots.columnHeaders,Mr({ref:de,visibleColumns:r,filterColumnLookup:n,sortColumnLookup:i,columnHeaderTabIndexState:a,columnGroupHeaderTabIndexState:s,columnHeaderFocus:d,columnGroupHeaderFocus:b,headerGroupingMaxDepth:L,columnMenuState:B,columnVisibility:V,columnGroupsHeaderStructure:X,hasOtherElementInTabSequence:ie},e.slotProps?.columnHeaders))}const U9t=Vk(B9t),H9t=gp("div")({position:"absolute",top:"var(--DataGrid-headersTotalHeight)",left:0,width:"calc(100% - (var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize)))"}),j9t=gp("div",{name:"MuiDataGrid",slot:"Main",overridesResolver:(t,e)=>{const{ownerState:r,loadingOverlayVariant:n,overlayType:i}=t,a=n==="skeleton"||i==="noColumnsOverlay";return[e.main,r.hasPinnedRight&&e["main--hasPinnedRight"],a&&e["main--hiddenContent"]]}})({flexGrow:1,position:"relative",overflow:"hidden",display:"flex",flexDirection:"column"}),V9t=of((t,e)=>{const{ownerState:r}=t,n=Cu(),a=AX().hooks.useGridAriaAttributes();return Ke.jsxs(j9t,Mr({ownerState:r,className:t.className,tabIndex:-1},a,n.slotProps?.main,{ref:e,children:[Ke.jsx(H9t,{role:"presentation","data-id":"gridPanelAnchor"}),t.children]}))}),q9t=()=>Cs({root:["topContainer"]},Fh,{}),G9t=gp("div")({position:"sticky",zIndex:40,top:0});function $9t(t){const e=q9t();return Ke.jsx(G9t,Mr({},t,{className:Vo(e.root,Bi["container--top"]),role:"presentation"}))}const W9t=(t,e)=>{const{classes:r}=t;return Cs({root:["virtualScrollerContent",e&&"virtualScrollerContent--overflowed"]},Fh,r)},Y9t=gp("div",{name:"MuiDataGrid",slot:"VirtualScrollerContent",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.virtualScrollerContent,r.overflowedContent&&e["virtualScrollerContent--overflowed"]]}})({}),X9t=of(function(e,r){const n=Cu(),i=!n.autoHeight&&e.style?.minHeight==="auto",a=W9t(n,i),o={classes:n.classes,overflowedContent:i};return Ke.jsx(Y9t,Mr({},e,{ownerState:o,className:Vo(a.root,e.className),ref:r}))}),Z9t=gp("div")({display:"flex",flexDirection:"row",width:"var(--DataGrid-rowWidth)",boxSizing:"border-box"}),dGe=gp("div")({position:"sticky",height:"100%",boxSizing:"border-box",borderTop:"1px solid var(--rowBorderColor)",backgroundColor:Bu.cell.background.pinned}),K9t=gp(dGe)({left:0}),J9t=gp(dGe)({right:0}),Q9t=gp("div")({flexGrow:1,borderTop:"1px solid var(--rowBorderColor)"});function eBt({rowsLength:t}){const e=wd(),{viewportOuterSize:r,minimumSize:n,hasScrollX:i,hasScrollY:a,scrollbarSize:o,leftPinnedWidth:s,rightPinnedWidth:d}=wl(e,p0),b=i?o:0,L=r.height-n.height>0;return b===0&&!L?null:Ke.jsxs(Z9t,{className:Bi.filler,role:"presentation",style:{height:b,"--rowBorderColor":t===0?"transparent":"var(--DataGrid-rowBorderColor)"},children:[s>0&&Ke.jsx(K9t,{className:Bi["filler--pinnedLeft"],style:{width:s}}),Ke.jsx(Q9t,{}),d>0&&Ke.jsx(J9t,{className:Bi["filler--pinnedRight"],style:{width:d+(a?o:0)}})]})}const tBt=Vk(eBt),rBt=["className"],nBt=t=>{const{classes:e}=t;return Cs({root:["virtualScrollerRenderZone"]},Fh,e)},iBt=gp("div",{name:"MuiDataGrid",slot:"VirtualScrollerRenderZone"})({position:"absolute",display:"flex",flexDirection:"column"}),aBt=of(function(e,r){const{className:n}=e,i=Ms(e,rBt),a=tT(),o=Cu(),s=nBt(o),d=a.current.virtualizer.api.useVirtualization().getters.getOffsetTop();return Ke.jsx(iBt,Mr({className:Vo(s.root,n),ownerState:o,style:{transform:`translate3d(0, ${d}px, 0)`}},i,{ref:r}))}),oBt={includeHeaders:!0,includeOutliers:!1,outliersFactor:1.5,expand:!1,disableColumnVirtualization:!0},ux=e0(t=>t.editRows),hGe=pc(ux,(t,{rowId:e,editMode:r})=>r===B5.Row&&!!t[e]),sBt=pc(ux,(t,{rowId:e,field:r})=>t[e]?.[r]??null),DL=e0(t=>t.preferencePanel),lBt=pc(DL,(t,e)=>!!(t.open&&t.labelId===e));var H2=(function(t){return t.filters="filters",t.columns="columns",t.aiAssistant="aiAssistant",t})(H2||{});const uBt={},cBt={initialize:fBt,use:dBt,selectors:uBt};function fBt(t){return{colspanMap:new Map}}function dBt(t,e,r){const n=e.colspan?.getColspan,i=()=>{t.state.colspanMap=new Map},a=(s,d)=>t.state.colspanMap.get(s)?.[d],o=vl(n?(s,d,b,L)=>{for(let B=d;B<b;B+=1){const V=hBt(t.state.colspanMap,B,s,d,b,L,n);V.colSpan>1&&(B+=V.colSpan-1)}}:()=>{});return r.calculateColSpan=o,{resetColSpan:i,getCellColSpanInfo:a,calculateColSpan:o}}function hBt(t,e,r,n,i,a,o){const s=a.length,d=a[e],b=o(r,d,e);if(!b||b===1)return Zie(t,r,e,{spannedByColSpan:!1,cellProps:{colSpan:1,width:d.computedWidth}}),{colSpan:1};let L=d.computedWidth;for(let B=1;B<b;B+=1){const V=e+B;if(V>=n&&V<i){const X=a[V];L+=X.computedWidth,Zie(t,r,e+B,{spannedByColSpan:!0,rightVisibleCellIndex:Math.min(e+b,s-1),leftVisibleCellIndex:e})}Zie(t,r,e,{spannedByColSpan:!1,cellProps:{colSpan:b,width:L}})}return{colSpan:b}}function Zie(t,e,r,n){let i=t.get(e);i||(i={},t.set(e,i)),i[r]=n}function pBt(t,e=166){let r,n;const i=()=>{r=void 0,t(...n)};function a(...o){n=o,r===void 0&&(r=setTimeout(i,e))}return a.clear=()=>{clearTimeout(r),r=void 0},a}function Q3(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;if(Array.isArray(t)){const i=t.length;if(i!==e.length)return!1;for(let a=0;a<i;a+=1)if(!Q3(t[a],e[a]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;const i=Array.from(t.entries());for(let a=0;a<i.length;a+=1)if(!e.has(i[a][0]))return!1;for(let a=0;a<i.length;a+=1){const o=i[a];if(!Q3(o[1],e.get(o[0])))return!1}return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;const i=Array.from(t.entries());for(let a=0;a<i.length;a+=1)if(!e.has(i[a][0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(e)){const i=t.length;if(i!==e.length)return!1;for(let a=0;a<i;a+=1)if(t[a]!==e[a])return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();const r=Object.keys(t),n=r.length;if(n!==Object.keys(e).length)return!1;for(let i=0;i<n;i+=1)if(!Object.prototype.hasOwnProperty.call(e,r[i]))return!1;for(let i=0;i<n;i+=1){const a=r[i];if(!Q3(t[a],e[a]))return!1}return!0}return t!==t&&e!==e}function eL(t,e){return Math.round(t*10**e)/10**e}const mk={EMPTY:{width:0,height:0},equals:(t,e)=>t.width===e.width&&t.height===e.height},vBt={EMPTY:{top:[],bottom:[]}},mBt={EMPTY:{left:[],right:[]}};let Hy=(function(t){return t[t.NONE=0]="NONE",t[t.UP=1]="UP",t[t.DOWN=2]="DOWN",t[t.LEFT=3]="LEFT",t[t.RIGHT=4]="RIGHT",t})({});(function(t){function e(r,n){return r===0&&n===0?Hy.NONE:Math.abs(n)>=Math.abs(r)?n>0?Hy.DOWN:Hy.UP:r>0?Hy.RIGHT:Hy.LEFT}t.forDelta=e})(Hy||(Hy={}));const gBt={isReady:!1,root:mk.EMPTY,viewportOuterSize:mk.EMPTY,viewportInnerSize:mk.EMPTY,contentSize:mk.EMPTY,minimumSize:mk.EMPTY,hasScrollX:!1,hasScrollY:!1,scrollbarSize:0,rowWidth:0,rowHeight:0,columnsTotalWidth:0,leftPinnedWidth:0,rightPinnedWidth:0,topContainerHeight:0,bottomContainerHeight:0},UN={rootSize:t=>t.rootSize,dimensions:t=>t.dimensions,rowHeight:t=>t.dimensions.rowHeight,contentHeight:t=>t.dimensions.contentSize.height,rowsMeta:t=>t.rowsMeta,columnPositions:tqe((t,e)=>{const r=[];let n=0;for(let i=0;i<e.length;i+=1)r.push(n),n+=e[i].computedWidth;return r}),needsHorizontalScrollbar:t=>t.dimensions.viewportOuterSize.width>0&&t.dimensions.columnsTotalWidth>t.dimensions.viewportOuterSize.width},US={initialize:yBt,use:bBt,selectors:UN};function yBt(t){const e=Mr({},gBt,t.dimensions),{rowCount:r}=t,{rowHeight:n}=e,i={currentPageTotalHeight:r*n,positions:Array.from({length:r},(o,s)=>s*n),pinnedTopRowsTotalHeight:0,pinnedBottomRowsTotalHeight:0},a=new Map;return{rootSize:mk.EMPTY,dimensions:e,rowsMeta:i,rowHeights:a}}function bBt(t,e,r){const n=ze.useRef(!0),{refs:i,dimensions:{rowHeight:a,columnsTotalWidth:o,leftPinnedWidth:s,rightPinnedWidth:d,topPinnedHeight:b,bottomPinnedHeight:L},onResize:B}=e,V=i.container.current,X=ze.useCallback(()=>{if(n.current)return;const Se=UN.rootSize(t.state),Pe=UN.rowsMeta(t.state),Me=wBt(V,e.dimensions.scrollbarSize),Ie=b+Pe.pinnedTopRowsTotalHeight,Ve=L+Pe.pinnedBottomRowsTotalHeight,Ze={width:o,height:eL(Pe.currentPageTotalHeight,1)};let Je,nt,ut=!1,ht=!1;if(e.autoHeight)ht=!1,ut=Math.round(o)>Math.round(Se.width),Je={width:Se.width,height:Ie+Ve+Ze.height},nt={width:Math.max(0,Je.width-(ht?Me:0)),height:Math.max(0,Je.height-(ut?Me:0))};else{Je={width:Se.width,height:Se.height},nt={width:Math.max(0,Je.width),height:Math.max(0,Je.height-Ie-Ve)};const dr=Ze,Zt=nt,Cr=dr.width>Zt.width,yt=dr.height>Zt.height;(Cr||yt)&&(ht=yt,ut=dr.width+(ht?Me:0)>Zt.width,ut&&(ht=dr.height+Me>Zt.height)),ht&&(nt.width-=Me),ut&&(nt.height-=Me)}e.disableHorizontalScroll&&(ut=!1),e.disableVerticalScroll&&(ht=!1);const _t=Math.max(Je.width,o+(ht?Me:0)),Dt={width:o,height:Ie+Ze.height+Ve},qt={isReady:!0,root:Se,viewportOuterSize:Je,viewportInnerSize:nt,contentSize:Ze,minimumSize:Dt,hasScrollX:ut,hasScrollY:ht,scrollbarSize:Me,rowWidth:_t,rowHeight:a,columnsTotalWidth:o,leftPinnedWidth:s,rightPinnedWidth:d,topContainerHeight:Ie,bottomContainerHeight:Ve},Lt=t.state.dimensions;Q3(Lt,qt)||(t.update({dimensions:qt}),B?.(qt.root))},[t,V,e.dimensions.scrollbarSize,e.autoHeight,e.disableHorizontalScroll,e.disableVerticalScroll,B,a,o,s,d,b,L]),{resizeThrottleMs:ie}=e,de=vl(X),ae=ze.useMemo(()=>ie>0?pBt(de,ie):void 0,[ie,de]);ze.useEffect(()=>ae?.clear,[ae]);const U=vl(Se=>{t.state.rootSize=Se,n.current||!ae?(n.current=!1,X()):ae()});Ah(()=>_Bt(V,t,U),[V,t,U]),Ah(X,[X]);const ve=xBt(t,e,X);return{updateDimensions:X,debouncedUpdateDimensions:ae,rowsMeta:ve}}function xBt(t,e,r){const n=t.state.rowHeights,{rows:i,getRowHeight:a,getRowSpacing:o,getEstimatedRowHeight:s}=e,d=ze.useRef(-1),b=ze.useRef(!1),L=ze.useRef(!1),B=e.pinnedRows,V=p5(t,UN.rowHeight),X=vl(nt=>{let ut=n.get(nt);return ut===void 0&&(ut={content:t.state.dimensions.rowHeight,spacingTop:0,spacingBottom:0,detail:0,autoHeight:!1,needsFirstMeasurement:!0},n.set(nt,ut)),ut}),{applyRowHeight:ie}=e,de=ze.useCallback(nt=>{const ut=UN.dimensions(t.state),ht=ut.rowHeight,_t=X(nt.id);if(!a)_t.content=ht,_t.needsFirstMeasurement=!1;else{const Dt=a(nt);if(Dt==="auto"){if(_t.needsFirstMeasurement){const qt=s?s(nt):ht;_t.content=qt??ht}b.current=!0,_t.autoHeight=!0}else _t.content=Dt??ut.rowHeight,_t.needsFirstMeasurement=!1,_t.autoHeight=!1}if(o){const Dt=o(nt);_t.spacingTop=Dt.top??0,_t.spacingBottom=Dt.bottom??0}else _t.spacingTop=0,_t.spacingBottom=0;return ie?.(_t,nt),_t},[t,a,X,s,V,o,ie]),ae=ze.useCallback(()=>{b.current=!1;const nt=B?.top.reduce((Lt,dr)=>{const Zt=de(dr);return Lt+Zt.content+Zt.spacingTop+Zt.spacingBottom+Zt.detail},0)??0,ut=B?.bottom.reduce((Lt,dr)=>{const Zt=de(dr);return Lt+Zt.content+Zt.spacingTop+Zt.spacingBottom+Zt.detail},0)??0,ht=[],_t=i.reduce((Lt,dr)=>{ht.push(Lt);const Zt=de(dr),Cr=Zt.content+Zt.spacingTop+Zt.spacingBottom+Zt.detail;return Lt+Cr},0);b.current||(d.current=1/0);const Dt=nt!==t.state.rowsMeta.pinnedTopRowsTotalHeight||ut!==t.state.rowsMeta.pinnedBottomRowsTotalHeight||_t!==t.state.rowsMeta.currentPageTotalHeight,qt={currentPageTotalHeight:_t,positions:ht,pinnedTopRowsTotalHeight:nt,pinnedBottomRowsTotalHeight:ut};t.set("rowsMeta",qt),Dt&&r(),L.current=!0},[t,B,i,de,r]),U=vl(ae),ve=nt=>n.get(nt)?.content??UN.rowHeight(t.state),Se=(nt,ut)=>{const ht=X(nt),_t=ht.content!==ut;ht.needsFirstMeasurement=!1,ht.content=ut,L.current&&=!_t},Pe=nt=>n.get(nt)?.autoHeight??!1,Me=()=>d.current,Ie=nt=>{b.current&&nt>d.current&&(d.current=nt)},Ve=()=>{n.clear(),ae()},Ze=pE(()=>typeof ResizeObserver>"u"?void 0:new ResizeObserver(nt=>{for(let ut=0;ut<nt.length;ut+=1){const ht=nt[ut],_t=ht.borderBoxSize&&ht.borderBoxSize.length>0?ht.borderBoxSize[0].blockSize:ht.contentRect.height,Dt=ht.target.__mui_id;if(e.focusedVirtualCell?.()?.id===Dt&&_t===0)return;Se(Dt,_t)}L.current||requestAnimationFrame(()=>{U()})})).current,Je=(nt,ut)=>(nt.__mui_id=ut,Ze?.observe(nt),()=>Ze?.unobserve(nt));return Ah(()=>{ae()},[ae]),{getRowHeight:ve,setLastMeasuredRowIndex:Ie,storeRowHeightMeasurement:Se,hydrateRowsMeta:ae,observeRowHeight:Je,rowHasAutoHeight:Pe,getRowHeightEntry:X,getLastMeasuredRowIndex:Me,resetRowHeights:Ve}}function _Bt(t,e,r){if(!t)return;const n=t.getBoundingClientRect(),i={width:eL(n.width,1),height:eL(n.height,1)};if((e.state.rootSize===mk.EMPTY||!mk.equals(i,e.state.rootSize))&&r(i),typeof ResizeObserver>"u")return;const a=new ResizeObserver(([o])=>{if(!o)return;const s={width:eL(o.contentRect.width,1),height:eL(o.contentRect.height,1)};mk.equals(s,e.state.rootSize)||r(s)});return a.observe(t),()=>{a.disconnect()}}const nke=new WeakMap;function wBt(t,e){if(e!==void 0)return e;if(t===null)return 0;const r=nke.get(t);if(r!==void 0)return r;const i=Lm(t).createElement("div");i.style.width="99px",i.style.height="99px",i.style.position="absolute",i.style.overflow="scroll",i.className="scrollDiv",t.appendChild(i);const a=i.offsetWidth-i.clientWidth;return t.removeChild(i),nke.set(t,a),a}const SBt=typeof navigator<"u"?navigator.userAgent.toLowerCase():"empty",TBt=SBt.includes("firefox"),Kie=typeof window<"u"&&/jsdom|HappyDOM/.test(window.navigator.userAgent),HN=(t,e,r)=>Math.max(e,Math.min(r,t)),Jie=50,ike={top:0,left:0},EBt=Object.freeze(new Map),I$={firstRowIndex:0,lastRowIndex:0,firstColumnIndex:0,lastColumnIndex:0},RG={renderContext:EG(t=>t.virtualization.renderContext),enabledForRows:EG(t=>t.virtualization.enabledForRows),enabledForColumns:EG(t=>t.virtualization.enabledForColumns)},pGe={initialize:ABt,use:CBt,selectors:RG};function ABt(t){return{virtualization:Mr({enabled:!Kie,enabledForRows:!Kie,enabledForColumns:!Kie,renderContext:I$},t.initialState?.virtualization),getters:null}}function CBt(t,e,r){const{refs:n,dimensions:{rowHeight:i,columnsTotalWidth:a},virtualization:{isRtl:o=!1,rowBufferPx:s=150,columnBufferPx:d=150},colspan:b,initialState:L,rows:B,range:V,columns:X,pinnedRows:ie=vBt.EMPTY,pinnedColumns:de=mBt.EMPTY,minimalContentHeight:ae,autoHeight:U,onWheel:ve,onTouchMove:Se,onRenderContextChange:Pe,onScrollChange:Me,scrollReset:Ie,renderRow:Ve,renderInfiniteLoadingTrigger:Ze}=e,Je=p5(t,US.selectors.needsHorizontalScrollbar),nt=ie.bottom.length>0,[ut,ht]=ze.useState(EBt),[,_t]=ze.useState(0),Dt=ze.useRef(!1),qt=p5(t,RG.renderContext),Lt=p5(t,RG.enabledForRows),dr=p5(t,RG.enabledForColumns),Zt=p5(t,US.selectors.rowsMeta),Cr=p5(t,US.selectors.contentHeight),yt=ze.useRef(L?.scroll??ike),Vt=ze.useRef(!1),Er=ze.useRef(ike),sr=ze.useRef(I$),or=U2(),Ar=ze.useRef(void 0),Ir=pE(()=>kBt(o,s,d,i*15,Jie*6)).current,_n=ze.useCallback(va=>{lke(va,t.state.virtualization.renderContext)||t.set("virtualization",Mr({},t.state.virtualization,{renderContext:va}));const ti=US.selectors.dimensions(t.state).isReady,Tn=va.firstRowIndex!==sr.current.firstRowIndex||va.lastRowIndex!==sr.current.lastRowIndex;ti&&Tn&&(sr.current=va,Pe?.(va)),Er.current=yt.current},[t,Pe]),Un=vl(()=>{const va=n.scroller.current;if(!va)return;const ti=US.selectors.dimensions(t.state),Tn=Math.ceil(ti.contentSize.height-ti.viewportInnerSize.height),bi=Math.ceil(ti.contentSize.width-ti.viewportInnerSize.width),Wn={top:HN(va.scrollTop,0,Tn),left:o?HN(va.scrollLeft,-bi,0):HN(va.scrollLeft,0,bi)},Ei=Wn.left-yt.current.left,Ki=Wn.top-yt.current.top,sa=Ei!==0||Ki!==0;yt.current=Wn;const xa=sa?Hy.forDelta(Ei,Ki):Hy.NONE,Qa=Math.abs(yt.current.top-Er.current.top),is=Math.abs(yt.current.left-Er.current.left),go=Qa>=i||is>=Jie,Co=Ir.direction!==xa;if(!(go||Co))return qt;if(Co)switch(xa){case Hy.NONE:case Hy.LEFT:case Hy.RIGHT:Ar.current=void 0;break;default:Ar.current=qt;break}Ir.direction=xa,Ir.buffer=mGe(o,xa,s,d,i*15,Jie*6);const Zi=ake(t,e,r,Lt,dr),za=oke(Zi,yt.current,Ir);return lke(za,qt)||(k8.flushSync(()=>{_n(za)}),or.start(1e3,Un)),za}),Qn=vl(()=>{if(!US.selectors.dimensions(t.state).isReady&&(Lt||dr))return;const va=ake(t,e,r,Lt,dr),ti=oke(va,yt.current,Ir);Ar.current=void 0,_n(ti)}),Jn=vl(()=>{if(Vt.current){Vt.current=!1;return}const va=Un();va&&Me?.(yt.current,va)}),Vn=()=>Zt.positions[qt.firstRowIndex]??0,jn=(va={},ti)=>{if(!va.rows&&!V)return[];let Tn=qt;va.renderContext&&(Tn=va.renderContext,Tn.firstColumnIndex=qt.firstColumnIndex,Tn.lastColumnIndex=qt.lastColumnIndex);const bi=!nt&&va.position===void 0||nt&&va.position==="bottom",Wn=va.position!==void 0;let Ei;switch(va.position){case"top":Ei=0;break;case"bottom":Ei=ie.top.length+B.length;break;case void 0:default:Ei=ie.top.length;break}const Ki=va.rows??B,sa=Tn.firstRowIndex,xa=Math.min(Tn.lastRowIndex,Ki.length),Qa=va.rows?uke(0,va.rows.length):uke(sa,xa);let is=-1;const go=e.focusedVirtualCell?.();!Wn&&go&&(go.rowIndex<sa&&(Qa.unshift(go.rowIndex),is=go.rowIndex),go.rowIndex>xa&&(Qa.push(go.rowIndex),is=go.rowIndex));const Co=[],Ko=US.selectors.columnPositions(t.state,X);return Qa.forEach(Zi=>{const{id:za,model:Ss}=Ki[Zi];if(ti&&!ti[za])return;const ba=(V?.firstRowIndex||0)+Ei+Zi;if(b?.enabled){const _s=de.left.length,nl=X.length-de.right.length;r.calculateColSpan(za,_s,nl,X),de.left.length>0&&r.calculateColSpan(za,0,de.left.length,X),de.right.length>0&&r.calculateColSpan(za,X.length-de.right.length,X.length,X)}const po=r.rowsMeta.rowHasAutoHeight(za)?"auto":r.rowsMeta.getRowHeight(za);let Ys=!1;va.position===void 0&&(Ys=Zi===0);let $s=!1;const Gs=Zi===Ki.length-1;if(bi)if(Wn)$s=Gs;else{const _s=B.length-1;Zi===_s&&($s=!0)}let Ns=Tn;Ar.current&&Zi>=Ar.current.firstRowIndex&&Zi<Ar.current.lastRowIndex&&(Ns=Ar.current);const Hl=Zi===is,nu=go?.rowIndex===ba,su=vGe(Ko,Ns,de.left.length),Mc=Gs&&va.position==="top",da=Ns.firstColumnIndex,Xa=Ns.lastColumnIndex;if(Co.push(Ve({id:za,model:Ss,rowIndex:ba,offsetLeft:su,columnsTotalWidth:a,baseRowHeight:po,firstColumnIndex:da,lastColumnIndex:Xa,focusedColumnIndex:nu?go.columnIndex:void 0,isFirstVisible:Ys,isLastVisible:$s,isVirtualFocusRow:Hl,showBottomBorder:Mc})),Hl)return;const Oo=ut.get(za);Oo&&Co.push(Oo),va.position===void 0&&Gs&&Co.push(Ze(za))}),Co},Lr=ze.useMemo(()=>({overflowX:Je?void 0:"hidden",overflowY:U?"hidden":void 0}),[Je,U]),Yn=ze.useMemo(()=>{const va={width:Je?a:"auto",flexBasis:Cr,flexShrink:0};return va.flexBasis===0&&(va.flexBasis=ae),va},[a,Cr,Je,ae]),On=ze.useRef(null),Sn=ze.useCallback(va=>{va&&On.current?.(a,Cr)},[a,Cr]);Ah(()=>{Dt.current&&Qn()},[dr,Lt,Qn]),Ah(()=>{n.scroller.current&&(n.scroller.current.scrollLeft=0)},[n.scroller,Ie]),F9t(qt!==I$,()=>{if(Me?.(yt.current,qt),Dt.current=!0,L?.scroll&&n.scroller.current){const va=n.scroller.current,{top:ti,left:Tn}=L.scroll,bi={top:!(ti>0),left:!(Tn>0)};!bi.left&&a&&(va.scrollLeft=Tn,bi.left=!0,Vt.current=!0),!bi.top&&Cr&&(va.scrollTop=ti,Vt.current=!0),(!bi.top||!bi.left)&&(On.current=(Wn,Ei)=>{!bi.left&&Wn&&(va.scrollLeft=Tn,bi.left=!0,Vt.current=!0),!bi.top&&Ei&&(va.scrollTop=ti,bi.top=!0,Vt.current=!0),bi.left&&bi.top&&(On.current=null)})}}),T$(t,US.selectors.dimensions,Qn);const bn=va=>ti=>{ti&&n[va].current!==ti&&(n[va].current=ti,_t(Tn=>Tn+1))},Mn={setPanels:ht,getOffsetTop:Vn,getRows:jn,getContainerProps:()=>({ref:bn("container")}),getScrollerProps:()=>({ref:bn("scroller"),onScroll:Jn,onWheel:ve,onTouchMove:Se,style:Lr,role:"presentation",tabIndex:TBt?-1:void 0}),getContentProps:()=>({ref:Sn,style:Yn,role:"presentation"}),getScrollbarVerticalProps:()=>({ref:bn("scrollbarVertical"),scrollPosition:yt}),getScrollbarHorizontalProps:()=>({ref:bn("scrollbarHorizontal"),scrollPosition:yt}),getScrollAreaProps:()=>({scrollPosition:yt})};return t6(()=>{t.state=Mr({},t.state,{getters:Mn})}),ze.useEffect(()=>{t.update({getters:Mn})},Object.values(Mn)),{getters:Mn,useVirtualization:()=>p5(t,va=>va),setPanels:ht,forceUpdateRenderContext:Qn,getCellColSpanInfo:()=>{throw new Error("Unimplemented: colspan feature is required")},calculateColSpan:()=>{throw new Error("Unimplemented: colspan feature is required")},getHiddenCellsOrigin:()=>{throw new Error("Unimplemented: rowspan feature is required")}}}function ake(t,e,r,n,i){const a=US.selectors.dimensions(t.state),o=e.rows,s=e.range,d=e.columns,b=r.getHiddenCellsOrigin(),L=e.rows.at(-1)?.id,B=d.at(-1);return{api:r,enabledForRows:n,enabledForColumns:i,autoHeight:e.autoHeight,rowBufferPx:e.virtualization.rowBufferPx,columnBufferPx:e.virtualization.columnBufferPx,leftPinnedWidth:a.leftPinnedWidth,columnsTotalWidth:a.columnsTotalWidth,viewportInnerWidth:a.viewportInnerSize.width,viewportInnerHeight:a.viewportInnerSize.height,lastRowHeight:L!==void 0?r.rowsMeta.getRowHeight(L):0,lastColumnWidth:B?.computedWidth??0,rowsMeta:US.selectors.rowsMeta(t.state),columnPositions:US.selectors.columnPositions(t.state,e.columns),rows:o,range:s,pinnedColumns:e.pinnedColumns,columns:d,hiddenCellsOriginMap:b,virtualizeColumnsWithAutoRowHeight:e.virtualizeColumnsWithAutoRowHeight}}function oke(t,e,r){const n={firstRowIndex:0,lastRowIndex:t.rows.length,firstColumnIndex:0,lastColumnIndex:t.columns.length},{top:i,left:a}=e,o=Math.abs(a)+t.leftPinnedWidth;if(t.enabledForRows){let d=Math.min(ske(t,i,{atStart:!0,lastPosition:t.rowsMeta.positions[t.rowsMeta.positions.length-1]+t.lastRowHeight}),t.rowsMeta.positions.length-1);const b=t.hiddenCellsOriginMap[d];if(b){const B=Math.min(...Object.values(b));d=Math.min(d,B)}const L=t.autoHeight?d+t.rows.length:ske(t,i+t.viewportInnerHeight);n.firstRowIndex=d,n.lastRowIndex=L}if(t.enabledForColumns){let d=0,b=t.columnPositions.length,L=!1;const[B,V]=ype({firstIndex:n.firstRowIndex,lastIndex:n.lastRowIndex,minFirstIndex:0,maxLastIndex:t.rows.length,bufferBefore:r.buffer.rowBefore,bufferAfter:r.buffer.rowAfter,positions:t.rowsMeta.positions,lastSize:t.lastRowHeight});if(!t.virtualizeColumnsWithAutoRowHeight)for(let X=B;X<V&&!L;X+=1){const ie=t.rows[X];L=t.api.rowsMeta.rowHasAutoHeight(ie.id)}(!L||t.virtualizeColumnsWithAutoRowHeight)&&(d=QP(o,t.columnPositions,{atStart:!0,lastPosition:t.columnsTotalWidth}),b=QP(o+t.viewportInnerWidth,t.columnPositions)),n.firstColumnIndex=d,n.lastColumnIndex=b}return MBt(t,n,r)}function ske(t,e,r){const n=t.api.rowsMeta.getLastMeasuredRowIndex();let i=n===1/0;t.range?.lastRowIndex&&!i&&(i=n>=t.range.lastRowIndex);const a=HN(n-(t.range?.firstRowIndex||0),0,t.rowsMeta.positions.length);return i||t.rowsMeta.positions[a]>=e?QP(e,t.rowsMeta.positions,r):RBt(e,t.rowsMeta.positions,a,r)}function MBt(t,e,r){const[n,i]=ype({firstIndex:e.firstRowIndex,lastIndex:e.lastRowIndex,minFirstIndex:0,maxLastIndex:t.rows.length,bufferBefore:r.buffer.rowBefore,bufferAfter:r.buffer.rowAfter,positions:t.rowsMeta.positions,lastSize:t.lastRowHeight}),[a,o]=ype({firstIndex:e.firstColumnIndex,lastIndex:e.lastColumnIndex,minFirstIndex:t.pinnedColumns?.left.length??0,maxLastIndex:t.columns.length-(t.pinnedColumns?.right.length??0),bufferBefore:r.buffer.columnBefore,bufferAfter:r.buffer.columnAfter,positions:t.columnPositions,lastSize:t.lastColumnWidth}),s=IBt({api:t.api,firstColumnToRender:a,firstRowToRender:n,lastRowToRender:i,visibleRows:t.rows});return{firstRowIndex:n,lastRowIndex:i,firstColumnIndex:s,lastColumnIndex:o}}function QP(t,e,r=void 0,n=0,i=e.length){if(e.length<=0)return-1;if(n>=i)return n;const a=n+Math.floor((i-n)/2),o=e[a];let s;if(r?.atStart){const d=(a===e.length-1?r.lastPosition:e[a+1])-o;s=t-d<o}else s=t<=o;return s?QP(t,e,r,n,a):QP(t,e,r,a+1,i)}function RBt(t,e,r,n=void 0){let i=1;for(;r<e.length&&Math.abs(e[r])<t;)r+=i,i*=2;return QP(t,e,n,Math.floor(r/2),Math.min(r,e.length))}function ype({firstIndex:t,lastIndex:e,bufferBefore:r,bufferAfter:n,minFirstIndex:i,maxLastIndex:a,positions:o,lastSize:s}){const d=o[t]-r,b=o[e]+n,L=QP(d,o,{atStart:!0,lastPosition:o[o.length-1]+s}),B=QP(b,o);return[HN(L,i,a),HN(B,i,a)]}function lke(t,e){return t===e?!0:t.firstRowIndex===e.firstRowIndex&&t.lastRowIndex===e.lastRowIndex&&t.firstColumnIndex===e.firstColumnIndex&&t.lastColumnIndex===e.lastColumnIndex}function vGe(t,e,r){const n=(t[e.firstColumnIndex]??0)-(t[r]??0);return Math.abs(n)}function mGe(t,e,r,n,i,a){if(t)switch(e){case Hy.LEFT:e=Hy.RIGHT;break;case Hy.RIGHT:e=Hy.LEFT;break}switch(e){case Hy.NONE:return{rowAfter:r,rowBefore:r,columnAfter:n,columnBefore:n};case Hy.LEFT:return{rowAfter:0,rowBefore:0,columnAfter:0,columnBefore:a};case Hy.RIGHT:return{rowAfter:0,rowBefore:0,columnAfter:a,columnBefore:0};case Hy.UP:return{rowAfter:0,rowBefore:i,columnAfter:0,columnBefore:0};case Hy.DOWN:return{rowAfter:i,rowBefore:0,columnAfter:0,columnBefore:0};default:throw new Error("unreachable")}}function kBt(t,e,r,n,i){return{direction:Hy.NONE,buffer:mGe(t,Hy.NONE,e,r,n,i)}}function uke(t,e){return Array.from({length:e-t}).map((r,n)=>t+n)}function IBt({api:t,firstColumnToRender:e,firstRowToRender:r,lastRowToRender:n,visibleRows:i}){let a=e,o=!1;for(;!o&&a>=0;){o=!0;for(let s=r;s<n;s+=1)if(i[s]){const b=i[s].id,L=t.getCellColSpanInfo(b,a);if(L&&L.spannedByColSpan&&L.leftVisibleCellIndex<a){a=L.leftVisibleCellIndex,o=!1;break}}}return a}const PBt={},DBt={initialize:LBt,use:OBt,selectors:PBt};function LBt(t){return{}}function OBt(t,e,r){return{getViewportPageSize:()=>{const i=US.selectors.dimensions(t.state);if(!i.isReady)return 0;if(e.getRowHeight){const o=pGe.selectors.renderContext(t.state),s=o.lastRowIndex-o.firstRowIndex;return Math.min(s-1,e.rows.length)}const a=Math.floor(i.viewportInnerSize.height/i.rowHeight);return Math.min(a,e.rows.length)}}}const NBt={firstRowIndex:0,lastRowIndex:0},FBt={spannedCells:{},hiddenCells:{},hiddenCellOriginMap:{}},gGe={state:t=>t.rowSpanning,hiddenCells:t=>t.rowSpanning.caches.hiddenCells,spannedCells:t=>t.rowSpanning.caches.spannedCells,hiddenCellsOriginMap:t=>t.rowSpanning.caches.hiddenCellOriginMap},f8={initialize:zBt,use:BBt,selectors:gGe};function zBt(t){return{rowSpanning:t.initialState?.rowSpanning??{caches:FBt,processedRange:NBt}}}function BBt(t,e,r){return{getHiddenCellsOrigin:()=>gGe.hiddenCellsOriginMap(t.state)}}const cke=[US,pGe,cBt,f8,DBt],UBt=t=>{const e=pE(()=>new SX(cke.map(n=>n.initialize(t)).reduce((n,i)=>Object.assign(n,i),{}))).current,r={};for(const n of cke)Object.assign(r,n.use(e,t,r));return{store:e,api:r}},HBt=typeof window<"u"&&/jsdom|HappyDOM/.test(window.navigator.userAgent),e9=!HBt,jBt=(t,e)=>{const{disableVirtualization:r,autoHeight:n}=e;return Mr({},t,{virtualization:{enabled:!r&&e9,enabledForColumns:!r&&e9,enabledForRows:!r&&!n&&e9,renderContext:I$}})};function VBt(t,e){const{virtualizer:r}=t.current,{autoHeight:n,disableVirtualization:i}=e,a=b=>{b&&=e9,r.store.set("virtualization",Mr({},r.store.state.virtualization,{enabled:b,enabledForColumns:b,enabledForRows:b&&!n}))};nh(t,{unstable_setVirtualization:a,unstable_setColumnVirtualization:b=>{b&&=e9,r.store.set("virtualization",Mr({},r.store.state.virtualization,{enabledForColumns:b}))}},"public");const d=r.api.forceUpdateRenderContext;t.current.register("private",{updateRenderContext:d}),Zm(t,"sortedRowsSet",d),Zm(t,"paginationModelChange",d),Zm(t,"columnsChange",d),ze.useEffect(()=>{a(!e.disableVirtualization)},[i,n])}const OX=e0(t=>t.virtualization);pc(OX,t=>t.enabled);const qBt=pc(OX,t=>t.enabledForColumns);pc(OX,t=>t.enabledForRows);const yGe=pc(OX,t=>t.renderContext),GBt=e0(t=>t.virtualization.renderContext.firstColumnIndex),$Bt=e0(t=>t.virtualization.renderContext.lastColumnIndex),WBt=av(GBt,$Bt,(t,e)=>({firstColumnIndex:t,lastColumnIndex:e}));function YBt(t){return JSON.stringify([t.filterModel,t.sortModel,t.start,t.end])}class XBt{constructor({ttl:e=3e5,getKey:r=YBt}){this.cache={},this.ttl=e,this.getKey=r}set(e,r){const n=this.getKey(e),i=Date.now()+this.ttl;this.cache[n]={value:r,expiry:i}}get(e){const r=this.getKey(e),n=this.cache[r];if(n){if(Date.now()>n.expiry){delete this.cache[r];return}return n.value}}clear(){this.cache={}}}class ZBt extends Error{constructor(e){super(e.message),this.name="GridGetRowsError",this.params=e.params,this.cause=e.cause}}class KBt extends Error{constructor(e){super(e.message),this.name="GridUpdateRowError",this.params=e.params,this.cause=e.cause}}const JBt=(t,e)=>{const{classes:r}=t,n={root:["scrollbar",`scrollbar--${e}`],content:["scrollbarContent"]};return Cs(n,Fh,r)},tye=gp("div")({position:"absolute",display:"inline-block",zIndex:60,"&:hover":{zIndex:70},"--size":"calc(max(var(--DataGrid-scrollbarSize), 14px))"}),QBt=gp(tye)({width:"var(--size)",height:"calc(var(--DataGrid-hasScrollY) * (100% - var(--DataGrid-headersTotalHeight) - var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize)))",overflowY:"auto",overflowX:"hidden",outline:0,"& > div":{width:"var(--size)"},top:"var(--DataGrid-headersTotalHeight)",right:0}),eUt=gp(tye)({width:"calc(var(--DataGrid-hasScrollX) * (100% - var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize)))",height:"var(--size)",overflowY:"hidden",overflowX:"auto",outline:0,"& > div":{height:"var(--size)"},bottom:0}),tUt=gp(tye)({width:"var(--size)",height:"var(--size)",right:0,bottom:0,overflow:"scroll"}),fke=of(function(e,r){const n=tT(),i=Cu(),a=ze.useRef(!1),o=ze.useRef(0),s=ze.useRef(null),d=JBt(i,e.position),b=wl(n,p0),L=e.position==="vertical"?"height":"width",B=e.position==="vertical"?"scrollTop":"scrollLeft",V=e.position==="vertical"?"top":"left",X=e.position==="horizontal"?b.minimumSize.width:b.minimumSize.height-b.headersTotalHeight,ie=vl(()=>{const ve=s.current,Se=e.scrollPosition.current;if(ve&&Se[V]!==o.current){if(o.current=Se[V],a.current){a.current=!1;return}a.current=!0,ve[B]=Se[V]}}),de=vl(()=>{const ve=n.current.virtualScrollerRef.current,Se=s.current;if(Se){if(a.current){a.current=!1;return}a.current=!0,ve[B]=Se[B]}});pY(()=>{const ve=n.current.virtualScrollerRef.current,Se=s.current,Pe={passive:!0};return ve.addEventListener("scroll",ie,Pe),Se.addEventListener("scroll",de,Pe),()=>{ve.removeEventListener("scroll",ie,Pe),Se.removeEventListener("scroll",de,Pe)}});const ae=e.position==="vertical"?QBt:eUt,U=ze.useMemo(()=>({[L]:`${X}px`}),[L,X]);return Ke.jsx(ae,{ref:id(r,s),className:d.root,tabIndex:-1,"aria-hidden":"true",onFocus:ve=>{ve.target.blur()},children:Ke.jsx("div",{className:d.content,style:U})})}),rUt=gp("div")(({theme:t})=>({position:"absolute",inset:0,pointerEvents:"none",transition:Bu.transition(["box-shadow"],{duration:Bu.transitions.duration.short}),"--length":t.palette.mode==="dark"?"8px":"6px","--length-inverse":"calc(var(--length) * -1)","--opacity":t.palette.mode==="dark"?"0.7":"0.18","--blur":"var(--length)","--spread":"calc(var(--length) * -1)","--color-start":"rgba(0, 0, 0, calc(var(--hasScrollStart) * var(--opacity)))","--color-end":"rgba(0, 0, 0, calc(var(--hasScrollEnd) * var(--opacity)))",variants:[{props:{position:"vertical"},style:{top:"var(--DataGrid-topContainerHeight)",bottom:"calc(var(--DataGrid-bottomContainerHeight) + var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize))",boxShadow:"inset 0 var(--length) var(--blur) var(--spread) var(--color-start), inset 0 var(--length-inverse) var(--blur) var(--spread) var(--color-end)"}},{props:{position:"horizontal"},style:{left:"var(--DataGrid-leftPinnedWidth)",right:"calc(var(--DataGrid-rightPinnedWidth) + var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize))",boxShadow:"inset var(--length) 0 var(--blur) var(--spread) var(--color-start), inset var(--length-inverse) 0 var(--blur) var(--spread) var(--color-end)"}}]}));function dke(t){const{position:e}=t,n={classes:Cu().classes,position:e},i=ze.useRef(null),a=tT(),o=wl(a,iqe),s=wl(a,aqe),d=wl(a,sF),b=wl(a,H0e),L=e==="vertical"?s&&d?.bottom?.length>0:o&&b?.right?.length!==void 0&&b?.right?.length>0,B=Kv(),V=ze.useCallback(de=>{if(!i.current)return;const ae=Math.abs(Math.round(de)),U=p0(a),ve=Math.round(U.contentSize[e==="vertical"?"height":"width"]-U.viewportInnerSize[e==="vertical"?"height":"width"]),Se=e==="vertical"?d?.top?.length>0:b?.left?.length!==void 0&&b?.left?.length>0,Pe=e==="vertical"?d?.bottom?.length>0:b?.right?.length!==void 0&&b?.right?.length>0,Me=B?ae<ve:ae>0,Ie=B?ae>0:ae<ve;i.current.style.setProperty("--hasScrollStart",Se&&Me?"1":"0"),i.current.style.setProperty("--hasScrollEnd",Pe&&Ie?"1":"0")},[d,b,B,e,a]),X=de=>{V(de[e==="vertical"?"top":"left"])},ie=()=>{e==="horizontal"&&V(a.current.virtualScrollerRef?.current?.scrollLeft||0)};return sc(a,"scrollPositionChange",X),sc(a,"columnResizeStop",ie),ze.useEffect(()=>{V((e==="horizontal"?a.current.virtualScrollerRef?.current?.scrollLeft:a.current.virtualScrollerRef?.current?.scrollTop)??0)},[V,a,e]),Ke.jsx(rUt,{ownerState:n,ref:i,style:{"--hasScrollStart":0,"--hasScrollEnd":L?"1":"0"}})}const nUt=gp("div",{name:"MuiDataGrid",slot:"OverlayWrapper",shouldForwardProp:t=>t!=="overlayType"&&t!=="loadingOverlayVariant"&&t!=="right"})(({overlayType:t,loadingOverlayVariant:e,right:r})=>e!=="skeleton"?{position:"sticky",top:"var(--DataGrid-headersTotalHeight)",left:0,right:`${r}px`,width:0,height:0,zIndex:t==="loadingOverlay"?5:4}:{}),iUt=gp("div",{name:"MuiDataGrid",slot:"OverlayWrapperInner",shouldForwardProp:t=>t!=="overlayType"&&t!=="loadingOverlayVariant"})({}),aUt=t=>{const{classes:e}=t;return Cs({root:["overlayWrapper"],inner:["overlayWrapperInner"]},Fh,e)};function oUt(t){const e=wd(),r=Cu(),n=wl(e,p0);let i=Math.max(n.viewportOuterSize.height-n.topContainerHeight-n.bottomContainerHeight-(n.hasScrollX?n.scrollbarSize:0),0);i===0&&(i=dqe);const a=aUt(Mr({},t,{classes:r.classes}));return Ke.jsx(nUt,Mr({className:a.root},t,{right:n.columnsTotalWidth-n.viewportOuterSize.width,children:Ke.jsx(iUt,Mr({className:a.inner,style:{height:i,width:n.viewportOuterSize.width}},t))}))}const sUt=t=>{const{classes:e,hasScrollX:r,hasPinnedRight:n,loadingOverlayVariant:i,overlayType:a}=t;return Cs({root:["main",n&&"main--hasPinnedRight",(i==="skeleton"||a==="noColumnsOverlay")&&"main--hiddenContent"],scroller:["virtualScroller",r&&"virtualScroller--hasScrollX"]},Fh,e)},lUt=gp("div",{name:"MuiDataGrid",slot:"VirtualScroller",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.virtualScroller,r.hasScrollX&&e["virtualScroller--hasScrollX"]]}})({position:"relative",height:"100%",flexGrow:1,overflow:"scroll",scrollbarWidth:"none",display:"flex",flexDirection:"column","&::-webkit-scrollbar":{display:"none"},"@media print":{overflow:"hidden"},zIndex:0}),uUt=t=>t.current.state.dimensions.rightPinnedWidth>0;function cUt(t){const e=tT(),r=Cu(),n=wl(e,aqe),i=wl(e,iqe),a=wl(e,uUt),o=wl(e,e7t),{overlayType:s,loadingOverlayVariant:d}=fGe(e,r),b=r.slots?.[s],L={classes:r.classes,hasScrollX:i,hasPinnedRight:a,overlayType:s,loadingOverlayVariant:d},B=sUt(L),V=e.current.virtualizer.api.useVirtualization().getters,{getContainerProps:X,getScrollerProps:ie,getContentProps:de,getScrollbarVerticalProps:ae,getScrollbarHorizontalProps:U,getRows:ve,getScrollAreaProps:Se}=V,Pe=ve(void 0,Sb(e));return Ke.jsxs(V9t,Mr({className:B.root},X(),{ownerState:L,children:[Ke.jsx(oV,Mr({scrollDirection:"left"},Se())),Ke.jsx(oV,Mr({scrollDirection:"right"},Se())),Ke.jsx(oV,Mr({scrollDirection:"up"},Se())),Ke.jsx(oV,Mr({scrollDirection:"down"},Se())),Ke.jsxs(lUt,Mr({className:B.scroller},ie(),{ownerState:L,children:[Ke.jsxs($9t,{children:[!r.listView&&Ke.jsx(U9t,{}),Ke.jsx(r.slots.pinnedRows,{position:"top",virtualScroller:V})]}),s&&Ke.jsx(oUt,{overlayType:s,loadingOverlayVariant:d,children:Ke.jsx(b,Mr({},r.slotProps?.[s]))}),Ke.jsx(X9t,Mr({},de(),{children:Ke.jsxs(aBt,{role:"rowgroup",children:[Pe,Ke.jsx(r.slots.detailPanels,{virtualScroller:V})]})})),o&&Ke.jsx(tBt,{rowsLength:Pe.length}),Ke.jsx(r.slots.bottomContainer,{children:Ke.jsx(r.slots.pinnedRows,{position:"bottom",virtualScroller:V})})]})),i&&Ke.jsxs(ze.Fragment,{children:[r.pinnedColumnsSectionSeparator?.endsWith("shadow")&&Ke.jsx(dke,{position:"horizontal"}),Ke.jsx(fke,Mr({position:"horizontal"},U()))]}),n&&Ke.jsxs(ze.Fragment,{children:[r.pinnedRowsSectionSeparator?.endsWith("shadow")&&Ke.jsx(dke,{position:"vertical"}),Ke.jsx(fke,Mr({position:"vertical"},ae()))]}),i&&n&&Ke.jsx(tUt,{"aria-hidden":"true"}),t.children]}))}function fUt(){const t=Cu();return t.hideFooter?null:Ke.jsx(t.slots.footer,Mr({},t.slotProps?.footer))}let Qie;function rye(){return Qie===void 0&&document.createElement("div").focus({get preventScroll(){return Qie=!0,!1}}),Qie}function dUt({defaultSlots:t,slots:e}){const r=e;if(!r||Object.keys(r).length===0)return t;const n=Mr({},t);return Object.keys(r).forEach(i=>{const a=i;r[a]!==void 0&&(n[a]=r[a])}),n}const hUt=t=>{const e=t.match(/^__row_group_by_columns_group_(.*)__$/);return e?e[1]:null},pUt=t=>t===Fqe||hUt(t)!==null,bGe=(t,e)=>{if(t)if(e){if(t===Nh.LEFT)return"right";if(t===Nh.RIGHT)return"left"}else{if(t===Nh.LEFT)return"left";if(t===Nh.RIGHT)return"right"}};function NX(t,e,r,n){const i=bGe(r,e);return!i||n===void 0||(t[i]=n),t}const vUt=["column","row","rowId","rowNode","align","children","colIndex","width","className","style","colSpan","disableDragEvents","isNotVisible","pinnedOffset","pinnedPosition","showRightBorder","showLeftBorder","onClick","onDoubleClick","onMouseDown","onMouseUp","onMouseOver","onKeyDown","onKeyUp","onDragEnter","onDragOver"],mUt=["changeReason","unstable_updateValueOnRender"];Nh.LEFT+"",y5.LEFT,Nh.RIGHT+"",y5.RIGHT,Nh.NONE+"",Nh.VIRTUAL+"";const gUt=t=>{const{align:e,showLeftBorder:r,showRightBorder:n,pinnedPosition:i,isEditable:a,isSelected:o,isSelectionMode:s,classes:d}=t,b={root:["cell",`cell--text${ys(e)}`,o&&"selected",a&&"cell--editable",r&&"cell--withLeftBorder",n&&"cell--withRightBorder",i===Nh.LEFT&&"cell--pinnedLeft",i===Nh.RIGHT&&"cell--pinnedRight",s&&!a&&"cell--selectionMode"]};return Cs(b,Fh,d)},yUt=of(function(e,r){const{column:n,row:i,rowId:a,rowNode:o,align:s,colIndex:d,width:b,className:L,style:B,colSpan:V,disableDragEvents:X,isNotVisible:ie,pinnedOffset:de,pinnedPosition:ae,showRightBorder:U,showLeftBorder:ve,onClick:Se,onDoubleClick:Pe,onMouseDown:Me,onMouseUp:Ie,onMouseOver:Ve,onKeyDown:Ze,onKeyUp:Je,onDragEnter:nt,onDragOver:ut}=e,ht=Ms(e,vUt),_t=tT(),Dt=Cu(),qt=Kv(),Lt=n.field,dr=wl(_t,sBt,{rowId:a,field:Lt}),Cr=AX().hooks.useCellAggregationResult(a,Lt),yt=dr?$v.Edit:$v.View,{value:Vt,formattedValue:Er}=Cr||{},sr=_t.current.getCellParamsForRow(a,Lt,i,{colDef:n,cellMode:yt,rowNode:o,tabIndex:wl(_t,()=>{const Co=K0e(_t);return Co&&Co.field===Lt&&Co.id===a?0:-1}),hasFocus:wl(_t,()=>{const Co=BS(_t);return Co?.id===a&&Co.field===Lt}),value:Vt,formattedValue:Er});sr.api=_t.current;const or=wl(_t,()=>_t.current.unstable_applyPipeProcessors("isCellSelected",!1,{id:a,field:Lt})),Ar=_t.current.virtualizer.store,Ir=p5(Ar,f8.selectors.hiddenCells),_n=p5(Ar,f8.selectors.spannedCells),{hasFocus:Un,isEditable:Qn=!1,value:Jn}=sr,Vn=n.type==="actions"&&"getActions"in n&&typeof n.getActions=="function"&&n.getActions(_t.current.getRowParams(a)).some(Co=>!Co.props.disabled),jn=(yt==="view"||!Qn)&&!Vn?sr.tabIndex:-1,{classes:Lr,getCellClassName:Yn}=Dt,Sn=[wl(_t,()=>_t.current.unstable_applyPipeProcessors("cellClassName",[],{id:a,field:Lt}).filter(Boolean).join(" "))];n.cellClassName&&Sn.push(typeof n.cellClassName=="function"?n.cellClassName(sr):n.cellClassName),n.display==="flex"&&Sn.push(Bi["cell--flex"]),Yn&&Sn.push(Yn(sr));const bn=sr.formattedValue??Jn,Mn=ze.useRef(null),gi=id(r,Mn),Oi=ze.useRef(null),Pa=Dt.cellSelection??!1,va={align:s,showLeftBorder:ve,showRightBorder:U,isEditable:Qn,classes:Dt.classes,pinnedPosition:ae,isSelected:or,isSelectionMode:Pa},ti=gUt(va),Tn=ze.useCallback(Co=>Ko=>{const Zi=_t.current.getCellParams(a,Lt||"");_t.current.publishEvent(Co,Zi,Ko),Ie&&Ie(Ko)},[_t,Lt,Ie,a]),bi=ze.useCallback(Co=>Ko=>{const Zi=_t.current.getCellParams(a,Lt||"");_t.current.publishEvent(Co,Zi,Ko),Me&&Me(Ko)},[_t,Lt,Me,a]),Wn=ze.useCallback((Co,Ko)=>Zi=>{if(!_t.current.getRow(a))return;const za=_t.current.getCellParams(a,Lt||"");_t.current.publishEvent(Co,za,Zi),Ko&&Ko(Zi)},[_t,Lt,a]),Ei=Ir[a]?.[d]??!1,Ki=_n[a]?.[d]??1,sa=ze.useMemo(()=>{if(ie)return{padding:0,opacity:0,width:0,height:0,border:0};const Co=NX(Mr({"--width":`${b}px`},B),qt,ae,de),Ko=ae===Nh.LEFT,Zi=ae===Nh.RIGHT;return Ki>1&&(Co.height=`calc(var(--height) * ${Ki})`,Co.zIndex=10,(Ko||Zi)&&(Co.zIndex=40)),Co},[b,ie,B,de,ae,qt,Ki]);if(ze.useEffect(()=>{if(!Un||yt===$v.Edit)return;const Co=Lm(_t.current.rootElementRef.current);if(Mn.current&&!Mn.current.contains(Co.activeElement)){const Ko=Mn.current.querySelector('[tabindex="0"]'),Zi=Oi.current||Ko||Mn.current;if(rye())Zi.focus({preventScroll:!0});else{const za=_t.current.getScrollPosition();Zi.focus(),_t.current.scroll(za)}}},[Un,yt,_t]),Ei)return Ke.jsx("div",{"data-colindex":d,role:"presentation",style:Mr({width:"var(--width)"},sa)});let xa=ht.onFocus,Qa,is;if(dr===null&&n.renderCell&&(Qa=n.renderCell(sr)),dr!==null&&n.renderEditCell){const Co=_t.current.getRowWithUpdatedValues(a,n.field),Ko=Ms(dr,mUt),Zi=n.valueFormatter?n.valueFormatter(dr.value,Co,n,_t):sr.formattedValue,za=Mr({},sr,{row:Co,formattedValue:Zi},Ko);Qa=n.renderEditCell(za),Sn.push(Bi["cell--editing"]),Sn.push(Lr?.["cell--editing"])}if(Qa===void 0){const Co=bn?.toString();Qa=Co,is=Co}ze.isValidElement(Qa)&&Vn&&(Qa=ze.cloneElement(Qa,{focusElementRef:Oi}));const go=X?null:{onDragEnter:Wn("cellDragEnter",nt),onDragOver:Wn("cellDragOver",ut)};return Ke.jsx("div",Mr({className:Vo(ti.root,Sn,L),role:"gridcell","data-field":Lt,"data-colindex":d,"aria-colindex":d+1,"aria-colspan":V,"aria-rowspan":Ki,style:sa,title:is,tabIndex:jn,onClick:Wn("cellClick",Se),onDoubleClick:Wn("cellDoubleClick",Pe),onMouseOver:Wn("cellMouseOver",Ve),onMouseDown:bi("cellMouseDown"),onMouseUp:Tn("cellMouseUp"),onKeyDown:Wn("cellKeyDown",Ze),onKeyUp:Wn("cellKeyUp",Je)},go,ht,{onFocus:xa,ref:gi,children:Qa}))}),bUt=Vk(yUt),xUt=["label","icon","showInMenu","onClick"],_Ut=["label","icon","showInMenu","onClick","closeMenuOnClick","closeMenu"],hke=of((t,e)=>{const r=Cu();if(!t.showInMenu){const{label:L,icon:B,onClick:V}=t,X=Ms(t,xUt),ie=de=>{V?.(de)};return Ke.jsx(r.slots.baseIconButton,Mr({size:"small",role:"menuitem","aria-label":L},X,{onClick:ie},r.slotProps?.baseIconButton,{ref:e,children:ze.cloneElement(B,{fontSize:"small"})}))}const{label:n,icon:i,onClick:a,closeMenuOnClick:o=!0,closeMenu:s}=t,d=Ms(t,_Ut),b=L=>{a?.(L),o&&s?.()};return Ke.jsx(r.slots.baseMenuItem,Mr({ref:e},d,{onClick:b,iconStart:i,children:n}))}),wUt=["field","type","align","width","height","empty","style","className"],pke="1.3em",SUt="1.2em",vke=[40,80],TUt={number:[40,60],string:[40,80],date:[40,60],dateTime:[60,80],singleSelect:[40,80]},EUt=t=>{const{align:e,classes:r,empty:n}=t,i={root:["cell","cellSkeleton",`cell--text${e?ys(e):"Left"}`,n&&"cellEmpty"]};return Cs(i,Fh,r)},AUt=U7t(12345);function CUt(t){const{field:e,type:r,align:n,width:i,height:a,empty:o=!1,style:s,className:d}=t,b=Ms(t,wUt),L=Cu(),B={classes:L.classes,align:n,empty:o},V=EUt(B),X=ze.useMemo(()=>{if(r==="boolean"||r==="actions")return{variant:"circular",width:pke,height:pke};const[de,ae]=r?TUt[r]??vke:vke;return{variant:"text",width:`${Math.round(AUt(de,ae))}%`,height:SUt}},[r]);return Ke.jsx("div",Mr({"data-field":e,className:Vo(V.root,d),style:Mr({height:a,maxWidth:i,minWidth:i},s)},b,{children:!o&&Ke.jsx(L.slots.baseSkeleton,Mr({},X))}))}const MUt=Vk(CUt),RUt=10,sV=-5,SO=1,mke={width:3,rx:1.5,x:10.5},kUt="/* emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason */",IUt=t=>t.current.state.dimensions.hasScrollX&&(!t.current.state.dimensions.hasScrollY||t.current.state.dimensions.scrollbarSize===0),PUt=fa("div",{name:"MuiDataGrid",slot:"Root",overridesResolver:(t,e)=>[e.root,{[`&.${Bi.autoHeight}`]:e.autoHeight},{[`&.${Bi.autosizing}`]:e.autosizing},{[`&.${Bi["root--densityStandard"]}`]:e["root--densityStandard"]},{[`&.${Bi["root--densityComfortable"]}`]:e["root--densityComfortable"]},{[`&.${Bi["root--densityCompact"]}`]:e["root--densityCompact"]},{[`&.${Bi["root--disableUserSelection"]}`]:e["root--disableUserSelection"]},{[`&.${Bi["root--noToolbar"]}`]:e["root--noToolbar"]},{[`&.${Bi.withVerticalBorder}`]:e.withVerticalBorder},{[`& .${Bi.actionsCell}`]:e.actionsCell},{[`& .${Bi.booleanCell}`]:e.booleanCell},{[`& .${Bi.cell}`]:e.cell},{[`& .${Bi["cell--editable"]}`]:e["cell--editable"]},{[`& .${Bi["cell--editing"]}`]:e["cell--editing"]},{[`& .${Bi["cell--flex"]}`]:e["cell--flex"]},{[`& .${Bi["cell--pinnedLeft"]}`]:e["cell--pinnedLeft"]},{[`& .${Bi["cell--pinnedRight"]}`]:e["cell--pinnedRight"]},{[`& .${Bi["cell--rangeBottom"]}`]:e["cell--rangeBottom"]},{[`& .${Bi["cell--rangeLeft"]}`]:e["cell--rangeLeft"]},{[`& .${Bi["cell--rangeRight"]}`]:e["cell--rangeRight"]},{[`& .${Bi["cell--rangeTop"]}`]:e["cell--rangeTop"]},{[`& .${Bi["cell--selectionMode"]}`]:e["cell--selectionMode"]},{[`& .${Bi["cell--textCenter"]}`]:e["cell--textCenter"]},{[`& .${Bi["cell--textLeft"]}`]:e["cell--textLeft"]},{[`& .${Bi["cell--textRight"]}`]:e["cell--textRight"]},{[`& .${Bi["cell--withLeftBorder"]}`]:e["cell--withLeftBorder"]},{[`& .${Bi["cell--withRightBorder"]}`]:e["cell--withRightBorder"]},{[`& .${Bi.cellCheckbox}`]:e.cellCheckbox},{[`& .${Bi.cellEmpty}`]:e.cellEmpty},{[`& .${Bi.cellOffsetLeft}`]:e.cellOffsetLeft},{[`& .${Bi.cellSkeleton}`]:e.cellSkeleton},{[`& .${Bi.checkboxInput}`]:e.checkboxInput},{[`& .${Bi.columnHeader}`]:e.columnHeader},{[`& .${Bi["columnHeader--alignCenter"]}`]:e["columnHeader--alignCenter"]},{[`& .${Bi["columnHeader--alignLeft"]}`]:e["columnHeader--alignLeft"]},{[`& .${Bi["columnHeader--alignRight"]}`]:e["columnHeader--alignRight"]},{[`& .${Bi["columnHeader--dragging"]}`]:e["columnHeader--dragging"]},{[`& .${Bi["columnHeader--emptyGroup"]}`]:e["columnHeader--emptyGroup"]},{[`& .${Bi["columnHeader--filledGroup"]}`]:e["columnHeader--filledGroup"]},{[`& .${Bi["columnHeader--filtered"]}`]:e["columnHeader--filtered"]},{[`& .${Bi["columnHeader--last"]}`]:e["columnHeader--last"]},{[`& .${Bi["columnHeader--moving"]}`]:e["columnHeader--moving"]},{[`& .${Bi["columnHeader--numeric"]}`]:e["columnHeader--numeric"]},{[`& .${Bi["columnHeader--pinnedLeft"]}`]:e["columnHeader--pinnedLeft"]},{[`& .${Bi["columnHeader--pinnedRight"]}`]:e["columnHeader--pinnedRight"]},{[`& .${Bi["columnHeader--siblingFocused"]}`]:e["columnHeader--siblingFocused"]},{[`& .${Bi["columnHeader--sortable"]}`]:e["columnHeader--sortable"]},{[`& .${Bi["columnHeader--sorted"]}`]:e["columnHeader--sorted"]},{[`& .${Bi["columnHeader--withLeftBorder"]}`]:e["columnHeader--withLeftBorder"]},{[`& .${Bi["columnHeader--withRightBorder"]}`]:e["columnHeader--withRightBorder"]},{[`& .${Bi.columnHeaderCheckbox}`]:e.columnHeaderCheckbox},{[`& .${Bi.columnHeaderDraggableContainer}`]:e.columnHeaderDraggableContainer},{[`& .${Bi.columnHeaderTitleContainer}`]:e.columnHeaderTitleContainer},{[`& .${Bi.columnHeaderTitleContainerContent}`]:e.columnHeaderTitleContainerContent},{[`& .${Bi.columnSeparator}`]:e.columnSeparator},{[`& .${Bi["columnSeparator--resizable"]}`]:e["columnSeparator--resizable"]},{[`& .${Bi["columnSeparator--resizing"]}`]:e["columnSeparator--resizing"]},{[`& .${Bi["columnSeparator--sideLeft"]}`]:e["columnSeparator--sideLeft"]},{[`& .${Bi["columnSeparator--sideRight"]}`]:e["columnSeparator--sideRight"]},{[`& .${Bi["container--bottom"]}`]:e["container--bottom"]},{[`& .${Bi["container--top"]}`]:e["container--top"]},{[`& .${Bi.detailPanelToggleCell}`]:e.detailPanelToggleCell},{[`& .${Bi["detailPanelToggleCell--expanded"]}`]:e["detailPanelToggleCell--expanded"]},{[`& .${Bi.editBooleanCell}`]:e.editBooleanCell},{[`& .${Bi.filterIcon}`]:e.filterIcon},{[`& .${Bi["filler--borderBottom"]}`]:e["filler--borderBottom"]},{[`& .${Bi["filler--pinnedLeft"]}`]:e["filler--pinnedLeft"]},{[`& .${Bi["filler--pinnedRight"]}`]:e["filler--pinnedRight"]},{[`& .${Bi.groupingCriteriaCell}`]:e.groupingCriteriaCell},{[`& .${Bi.groupingCriteriaCellLoadingContainer}`]:e.groupingCriteriaCellLoadingContainer},{[`& .${Bi.groupingCriteriaCellToggle}`]:e.groupingCriteriaCellToggle},{[`& .${Bi.headerFilterRow}`]:e.headerFilterRow},{[`& .${Bi.iconSeparator}`]:e.iconSeparator},{[`& .${Bi.menuIcon}`]:e.menuIcon},{[`& .${Bi.menuIconButton}`]:e.menuIconButton},{[`& .${Bi.menuList}`]:e.menuList},{[`& .${Bi.menuOpen}`]:e.menuOpen},{[`& .${Bi.overlayWrapperInner}`]:e.overlayWrapperInner},{[`& .${Bi.pinnedRows}`]:e.pinnedRows},{[`& .${Bi["pinnedRows--bottom"]}`]:e["pinnedRows--bottom"]},{[`& .${Bi["pinnedRows--top"]}`]:e["pinnedRows--top"]},{[`& .${Bi.row}`]:e.row},{[`& .${Bi["row--borderBottom"]}`]:e["row--borderBottom"]},{[`& .${Bi["row--detailPanelExpanded"]}`]:e["row--detailPanelExpanded"]},{[`& .${Bi["row--dragging"]}`]:e["row--dragging"]},{[`& .${Bi["row--dynamicHeight"]}`]:e["row--dynamicHeight"]},{[`& .${Bi["row--editable"]}`]:e["row--editable"]},{[`& .${Bi["row--editing"]}`]:e["row--editing"]},{[`& .${Bi["row--firstVisible"]}`]:e["row--firstVisible"]},{[`& .${Bi["row--lastVisible"]}`]:e["row--lastVisible"]},{[`& .${Bi.rowReorderCell}`]:e.rowReorderCell},{[`& .${Bi["rowReorderCell--draggable"]}`]:e["rowReorderCell--draggable"]},{[`& .${Bi.rowReorderCellContainer}`]:e.rowReorderCellContainer},{[`& .${Bi.rowReorderCellPlaceholder}`]:e.rowReorderCellPlaceholder},{[`& .${Bi.rowSkeleton}`]:e.rowSkeleton},{[`& .${Bi.scrollbar}`]:e.scrollbar},{[`& .${Bi["scrollbar--horizontal"]}`]:e["scrollbar--horizontal"]},{[`& .${Bi["scrollbar--vertical"]}`]:e["scrollbar--vertical"]},{[`& .${Bi.scrollbarFiller}`]:e.scrollbarFiller},{[`& .${Bi["scrollbarFiller--pinnedRight"]}`]:e["scrollbarFiller--pinnedRight"]},{[`& .${Bi.sortIcon}`]:e.sortIcon},{[`& .${Bi.treeDataGroupingCell}`]:e.treeDataGroupingCell},{[`& .${Bi.treeDataGroupingCellLoadingContainer}`]:e.treeDataGroupingCellLoadingContainer},{[`& .${Bi.treeDataGroupingCellToggle}`]:e.treeDataGroupingCellToggle},{[`& .${Bi.withBorderColor}`]:e.withBorderColor},{[`& .${Bi["row--dropAbove"]}`]:e["row--dropAbove"]},{[`& .${Bi["row--dropBelow"]}`]:e["row--dropBelow"]},{[`& .${Bi["row--beingDragged"]}`]:e["row--beingDragged"]}]})(()=>{const t=tT(),e=wl(t,IUt),r=Bu.colors.background.base,n=Bu.header.background.base,i=Bu.cell.background.pinned,a=DUt(Bu.colors.interactive.hover),o=Bu.colors.interactive.hoverOpacity,s=Bu.colors.interactive.selected,d=Bu.colors.interactive.selectedOpacity,b=s,L=`calc(${d} + ${o})`,B=oP(r,a,o),V=oP(r,s,d),X=oP(r,b,L),ie=oP(i,a,o),de=oP(i,s,d),ae=oP(i,b,L),U=Ve=>({[`& .${Bi["cell--pinnedLeft"]}, & .${Bi["cell--pinnedRight"]}`]:{backgroundColor:Ve,"&.Mui-selected":{backgroundColor:oP(Ve,V,d),"&:hover":{backgroundColor:oP(Ve,X,L)}}}}),ve=U(ie),Se=U(de),Pe=U(ae),Me={backgroundColor:V,"&:hover":{backgroundColor:X,"@media (hover: none)":{backgroundColor:V}}};return{"--unstable_DataGrid-radius":Bu.radius.base,"--unstable_DataGrid-headWeight":Bu.typography.fontWeight.medium,"--DataGrid-rowBorderColor":Bu.colors.border.base,"--DataGrid-cellOffsetMultiplier":2,"--DataGrid-width":"0px","--DataGrid-hasScrollX":"0","--DataGrid-hasScrollY":"0","--DataGrid-scrollbarSize":"10px","--DataGrid-rowWidth":"0px","--DataGrid-columnsTotalWidth":"0px","--DataGrid-leftPinnedWidth":"0px","--DataGrid-rightPinnedWidth":"0px","--DataGrid-headerHeight":"0px","--DataGrid-headersTotalHeight":"0px","--DataGrid-topContainerHeight":"0px","--DataGrid-bottomContainerHeight":"0px",flex:1,boxSizing:"border-box",position:"relative",borderWidth:"1px",borderStyle:"solid",borderColor:Bu.colors.border.base,borderRadius:"var(--unstable_DataGrid-radius)",backgroundColor:Bu.colors.background.base,color:Bu.colors.foreground.base,font:Bu.typography.font.body,outline:"none",height:"100%",display:"flex",minWidth:0,minHeight:0,flexDirection:"column",overflow:"hidden",overflowAnchor:"none",transform:"translate(0, 0)",[`.${Bi.main} > *:first-child${kUt}`]:{borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"},[`&.${Bi.autoHeight}`]:{height:"auto"},[`&.${Bi.autosizing}`]:{[`& .${Bi.columnHeaderTitleContainerContent} > *`]:{overflow:"visible !important"},"@media (hover: hover)":{[`& .${Bi.menuIcon}`]:{width:"0 !important",visibility:"hidden !important"}},[`& .${Bi.cell}`]:{overflow:"visible !important",whiteSpace:"nowrap",minWidth:"max-content !important",maxWidth:"max-content !important"},[`& .${Bi.groupingCriteriaCell}`]:{width:"unset"},[`& .${Bi.treeDataGroupingCell}`]:{width:"unset"}},[`&.${Bi.withSidePanel}`]:{flexDirection:"row"},[`& .${Bi.mainContent}`]:{display:"flex",flexDirection:"column",overflow:"hidden",flex:1},[`& .${Bi.columnHeader}, & .${Bi.cell}`]:{WebkitTapHighlightColor:"transparent",padding:"0 10px",boxSizing:"border-box"},[`& .${Bi.columnHeader}:focus-within, & .${Bi.cell}:focus-within`]:{outline:`solid ${xGe(Bu.colors.interactive.focus,.5)} ${SO}px`,outlineOffset:SO*-1},[`& .${Bi.columnHeader}:focus, & .${Bi.cell}:focus`]:{outline:`solid ${Bu.colors.interactive.focus} ${SO}px`,outlineOffset:SO*-1},[`& .${Bi.columnHeader}:focus,
      & .${Bi["columnHeader--withLeftBorder"]},
      & .${Bi["columnHeader--withRightBorder"]},
      & .${Bi["columnHeader--siblingFocused"]}
      `]:{[`& .${Bi.columnSeparator}`]:{opacity:0},"@media (hover: none)":{[`& .${Bi["columnSeparator--resizable"]}`]:{opacity:1}},[`& .${Bi["columnSeparator--resizable"]}:hover`]:{opacity:1}},[`&.${Bi["root--noToolbar"]} [aria-rowindex="1"] [aria-colindex="1"]`]:{borderTopLeftRadius:"calc(var(--unstable_DataGrid-radius) - 1px)"},[`&.${Bi["root--noToolbar"]} [aria-rowindex="1"] .${Bi["columnHeader--last"]}`]:{borderTopRightRadius:e?"calc(var(--unstable_DataGrid-radius) - 1px)":void 0},[`& .${Bi.columnHeaderCheckbox}, & .${Bi.cellCheckbox}`]:{padding:0,justifyContent:"center",alignItems:"center"},[`& .${Bi.columnHeader}`]:{position:"relative",display:"flex",alignItems:"center",backgroundColor:n},[`& .${Bi["columnHeader--filter"]}`]:{paddingTop:8,paddingBottom:8,paddingRight:5,minHeight:"min-content",overflow:"hidden"},[`& .${Bi["virtualScroller--hasScrollX"]} .${Bi["columnHeader--last"]}`]:{overflow:"hidden"},[`& .${Bi["pivotPanelField--sorted"]} .${Bi.iconButtonContainer},
      & .${Bi["columnHeader--sorted"]} .${Bi.iconButtonContainer},
      & .${Bi["columnHeader--filtered"]} .${Bi.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${Bi.pivotPanelField}:not(.${Bi["pivotPanelField--sorted"]}) .${Bi.sortButton},
      & .${Bi.columnHeader}:not(.${Bi["columnHeader--sorted"]}) .${Bi.sortButton}`]:{opacity:0,transition:Bu.transition(["opacity"],{duration:Bu.transitions.duration.short})},[`& .${Bi.columnHeaderTitleContainer}`]:{display:"flex",alignItems:"center",gap:Bu.spacing(.25),minWidth:0,flex:1,whiteSpace:"nowrap",overflow:"hidden"},[`& .${Bi.columnHeaderTitleContainerContent}`]:{overflow:"hidden",display:"flex",alignItems:"center"},[`& .${Bi["columnHeader--filledGroup"]} .${Bi.columnHeaderTitleContainer}`]:{borderBottomWidth:"1px",borderBottomStyle:"solid",boxSizing:"border-box"},[`& .${Bi.sortIcon}, & .${Bi.filterIcon}`]:{fontSize:"inherit"},[`& .${Bi["columnHeader--sortable"]}`]:{cursor:"pointer"},[`& .${Bi["columnHeader--alignCenter"]} .${Bi.columnHeaderTitleContainer}`]:{justifyContent:"center"},[`& .${Bi["columnHeader--alignRight"]} .${Bi.columnHeaderDraggableContainer}, & .${Bi["columnHeader--alignRight"]} .${Bi.columnHeaderTitleContainer}`]:{flexDirection:"row-reverse"},[`& .${Bi["columnHeader--alignCenter"]} .${Bi.menuIcon}`]:{marginLeft:"auto"},[`& .${Bi["columnHeader--alignRight"]} .${Bi.menuIcon}`]:{marginRight:"auto",marginLeft:-5},[`& .${Bi["columnHeader--moving"]}`]:{backgroundColor:B},[`& .${Bi["columnHeader--pinnedLeft"]}, & .${Bi["columnHeader--pinnedRight"]}`]:{position:"sticky",zIndex:40,background:Bu.header.background.base},[`& .${Bi.columnSeparator}`]:{position:"absolute",overflow:"hidden",zIndex:30,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",maxWidth:RUt,color:Bu.colors.border.base},[`& .${Bi.columnHeaders}`]:{width:"var(--DataGrid-rowWidth)",backgroundColor:n},"@media (hover: hover)":{[`& .${Bi.columnHeader}:hover`]:{[`& .${Bi.menuIcon}`]:{width:"auto",visibility:"visible"},[`& .${Bi.iconButtonContainer}`]:{visibility:"visible",width:"auto"}},[`& .${Bi.columnHeader}:not(.${Bi["columnHeader--sorted"]}):hover .${Bi.sortButton},
        & .${Bi.pivotPanelField}:not(.${Bi["pivotPanelField--sorted"]}):hover .${Bi.sortButton},
        & .${Bi.pivotPanelField}:not(.${Bi["pivotPanelField--sorted"]}) .${Bi.sortButton}:focus-visible`]:{opacity:.5}},"@media (hover: none)":{[`& .${Bi.columnHeader} .${Bi.menuIcon}`]:{width:"auto",visibility:"visible"},[`& .${Bi.columnHeader}:focus,
        & .${Bi["columnHeader--siblingFocused"]}`]:{[`.${Bi["columnSeparator--resizable"]}`]:{color:Bu.colors.foreground.accent}},[`& .${Bi.pivotPanelField}:not(.${Bi["pivotPanelField--sorted"]}) .${Bi.sortButton}`]:{opacity:.5}},[`& .${Bi["columnHeader--withLeftBorder"]} .${Bi["columnSeparator--sideLeft"]}:not(.${Bi["columnSeparator--resizable"]}), & .${Bi["columnHeader--withRightBorder"]} .${Bi["columnSeparator--sideRight"]}:not(.${Bi["columnSeparator--resizable"]})`]:{display:"none"},[`& .${Bi["columnSeparator--sideLeft"]}`]:{left:sV},[`& .${Bi["columnSeparator--sideRight"]}`]:{right:sV},[`& .${Bi["columnHeader--withRightBorder"]} .${Bi["columnSeparator--sideLeft"]}`]:{left:sV-.5},[`& .${Bi["columnHeader--withRightBorder"]} .${Bi["columnSeparator--sideRight"]}`]:{right:sV-.5},[`& .${Bi["columnSeparator--resizable"]}`]:{cursor:"col-resize",touchAction:"none",[`&.${Bi["columnSeparator--resizing"]}`]:{color:Bu.colors.foreground.accent},"@media (hover: none)":{[`& .${Bi.iconSeparator} rect`]:mke},"@media (hover: hover)":{"&:hover":{color:Bu.colors.foreground.accent,[`& .${Bi.iconSeparator} rect`]:mke}},"& svg":{pointerEvents:"none"}},[`& .${Bi.iconSeparator}`]:{color:"inherit",transition:Bu.transition(["color","width"],{duration:Bu.transitions.duration.short})},[`& .${Bi.menuIcon}`]:{width:0,visibility:"hidden",fontSize:20,marginRight:-5,display:"flex",alignItems:"center"},[`.${Bi.menuOpen}`]:{visibility:"visible",width:"auto"},[`& .${Bi.headerFilterRow}`]:{[`& .${Bi.columnHeader}, & .${Bi.scrollbarFiller}`]:{boxSizing:"border-box",borderBottom:"1px solid var(--DataGrid-rowBorderColor)"}},[`& .${Bi["row--borderBottom"]} .${Bi.columnHeader},
      & .${Bi["row--borderBottom"]} .${Bi.filler},
      & .${Bi["row--borderBottom"]} .${Bi.scrollbarFiller}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`& .${Bi["row--borderBottom"]} .${Bi.cell}`]:{borderBottom:"1px solid var(--rowBorderColor)"},[`.${Bi.row}`]:{display:"flex",width:"var(--DataGrid-rowWidth)",breakInside:"avoid","--rowBorderColor":"var(--DataGrid-rowBorderColor)",[`&.${Bi["row--firstVisible"]}`]:{"--rowBorderColor":"transparent"},"&:hover":{backgroundColor:B,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Bi.rowSkeleton}:hover`]:{backgroundColor:"transparent"},"&.Mui-selected":Me},[`& .${Bi.cell}`]:{flex:"0 0 auto",height:"var(--height)",width:"var(--width)",lineHeight:"calc(var(--height) - 1px)",boxSizing:"border-box",borderTop:"1px solid var(--rowBorderColor)",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis","&.Mui-selected":Me},[`& .${Bi["virtualScrollerContent--overflowed"]} .${Bi["row--lastVisible"]} .${Bi.cell}`]:{borderTopColor:"transparent"},[`& .${Bi.pinnedRows} .${Bi.row}, .${Bi.aggregationRowOverlayWrapper} .${Bi.row}`]:{backgroundColor:i,"&:hover":{backgroundColor:ie}},[`& .${Bi["pinnedRows--top"]} :first-of-type`]:{[`& .${Bi.cell}, .${Bi.scrollbarFiller}`]:{borderTop:"none"}},[`&.${Bi["root--disableUserSelection"]}`]:{userSelect:"none"},[`& .${Bi["row--dynamicHeight"]} > .${Bi.cell}`]:{whiteSpace:"initial",lineHeight:"inherit"},[`& .${Bi.cellEmpty}`]:{flex:1,padding:0,height:"unset"},[`& .${Bi.cell}.${Bi["cell--selectionMode"]}`]:{cursor:"default"},[`& .${Bi.cell}.${Bi["cell--editing"]}`]:{padding:1,display:"flex",boxShadow:Bu.shadows.base,backgroundColor:Bu.colors.background.overlay,"&:focus-within":{outline:`${SO}px solid ${Bu.colors.interactive.focus}`,outlineOffset:SO*-1}},[`& .${Bi["cell--editing"]}`]:{"& .MuiInputBase-root":{height:"100%"}},[`& .${Bi["row--editing"]}`]:{boxShadow:Bu.shadows.base},[`& .${Bi["row--editing"]} .${Bi.cell}`]:{boxShadow:"none",backgroundColor:Bu.colors.background.overlay},[`& .${Bi.editBooleanCell}`]:{display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center"},[`& .${Bi.booleanCell}[data-value="true"]`]:{color:Bu.colors.foreground.muted},[`& .${Bi.booleanCell}[data-value="false"]`]:{color:Bu.colors.foreground.disabled},[`& .${Bi.actionsCell}`]:{display:"inline-flex",alignItems:"center",gridGap:Bu.spacing(1)},[`& .${Bi.rowReorderCell}`]:{display:"inline-flex",flex:1,alignItems:"center",justifyContent:"center",opacity:Bu.colors.interactive.disabledOpacity},[`& .${Bi["rowReorderCell--draggable"]}`]:{cursor:"grab",opacity:1},[`& .${Bi.rowReorderCellContainer}`]:{padding:0,display:"flex",alignItems:"stretch"},[`.${Bi.withBorderColor}`]:{borderColor:Bu.colors.border.base},[`& .${Bi["cell--withLeftBorder"]}, & .${Bi["columnHeader--withLeftBorder"]}`]:{borderLeftColor:"var(--DataGrid-rowBorderColor)",borderLeftWidth:"1px",borderLeftStyle:"solid"},[`& .${Bi["cell--withRightBorder"]}, & .${Bi["columnHeader--withRightBorder"]}`]:{borderRightColor:"var(--DataGrid-rowBorderColor)",borderRightWidth:"1px",borderRightStyle:"solid"},[`& .${Bi["cell--flex"]}`]:{display:"flex",alignItems:"center",lineHeight:"inherit"},[`& .${Bi["cell--textLeft"]}`]:{textAlign:"left",justifyContent:"flex-start"},[`& .${Bi["cell--textRight"]}`]:{textAlign:"right",justifyContent:"flex-end"},[`& .${Bi["cell--textCenter"]}`]:{textAlign:"center",justifyContent:"center"},[`& .${Bi["cell--pinnedLeft"]}, & .${Bi["cell--pinnedRight"]}`]:{position:"sticky",zIndex:30,background:Bu.cell.background.pinned,"&.Mui-selected":{backgroundColor:de}},[`& .${Bi.row}`]:{"&:hover":ve,"&.Mui-selected":Se,"&.Mui-selected:hover":Pe},[`& .${Bi.cellOffsetLeft}`]:{flex:"0 0 auto",display:"inline-block"},[`& .${Bi.cellSkeleton}`]:{flex:"0 0 auto",height:"100%",display:"inline-flex",alignItems:"center"},[`& .${Bi.columnHeaderDraggableContainer}`]:{display:"flex",width:"100%",height:"100%"},[`& .${Bi.rowReorderCellPlaceholder}`]:{display:"none"},[`& .${Bi["columnHeader--dragging"]}`]:{background:Bu.colors.background.overlay,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:Bu.colors.interactive.disabledOpacity},[`& .${Bi["row--dragging"]}`]:{background:Bu.colors.background.overlay,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",border:"1px solid var(--DataGrid-rowBorderColor)",color:Bu.colors.foreground.base,transform:"translateZ(0)",[`& .${Bi.rowReorderCellPlaceholder}`]:{padding:"0 6px",display:"flex"}},[`& .${Bi.treeDataGroupingCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${Bi.treeDataGroupingCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:Bu.spacing(2)},[`& .${Bi.treeDataGroupingCellLoadingContainer}, .${Bi.groupingCriteriaCellLoadingContainer}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},[`& .${Bi.groupingCriteriaCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${Bi.groupingCriteriaCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:Bu.spacing(2)},[`& .${Bi.columnHeaders} .${Bi.scrollbarFiller}`]:{backgroundColor:n},[`.${Bi.scrollbarFiller}`]:{minWidth:"calc(var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize))",alignSelf:"stretch",backgroundColor:n,[`&.${Bi["scrollbarFiller--pinnedRight"]}`]:{position:"sticky",zIndex:40,right:0}},[`& .${Bi.filler}`]:{flex:"1 0 auto"},[`& .${Bi["filler--borderBottom"]}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`& .${Bi.columnHeaders} .${Bi.filler}`]:{backgroundColor:n},[`& .${Bi["main--hiddenContent"]}`]:{[`& .${Bi.virtualScrollerContent}`]:{position:"fixed",visibility:"hidden"},[`& .${Bi.pinnedRows}`]:{display:"none"}},[`& .${Bi["row--dropAbove"]}`]:{position:"relative","&::before":{pointerEvents:"none",content:'""',position:"absolute",top:0,left:0,width:"100%",height:"2px",backgroundColor:Bu.colors.interactive.selected}},[`& .${Bi["row--dropBelow"]}`]:{position:"relative","&::after":{zIndex:100,pointerEvents:"none",content:'""',position:"absolute",bottom:"-2px",left:0,width:"100%",height:"2px",backgroundColor:Bu.colors.interactive.selected},[`&.${Bi["row--lastVisible"]}`]:{"&::after":{bottom:"calc(var(--DataGrid-hasScrollY) * 0px + (1 - var(--DataGrid-hasScrollY)) * -2px)"}}},[`& .${Bi["row--beingDragged"]}`]:{color:Bu.colors.foreground.disabled,"&:hover":{backgroundColor:"transparent"}}}});function xGe(t,e){return`rgba(from ${t} r g b / ${e})`}function DUt(t){return xGe(t,1)}function oP(t,e,r){return`color-mix(in srgb,${t}, ${e} calc(${r} * 100%))`}const LUt=()=>()=>{},OUt=()=>!1,NUt=()=>!0,FUt=()=>vqe.useSyncExternalStore(LUt,OUt,NUt),_Ge=ze.createContext(void 0);function nye(){const t=ze.useContext(_Ge);if(t===void 0)throw new Error("MUI X: Missing context.");return t}function zUt({children:t}){const e=ze.useRef(null),r=ze.useRef(null),n=ze.useRef(null),i=ze.useMemo(()=>({columnsPanelTriggerRef:e,filterPanelTriggerRef:r,aiAssistantPanelTriggerRef:n}),[]);return Ke.jsx(_Ge.Provider,{value:i,children:t})}function BUt(){const t=wd(),e=wl(t,J3),r=Cu(),n=wl(t,DL),{columnsPanelTriggerRef:i,filterPanelTriggerRef:a,aiAssistantPanelTriggerRef:o}=nye(),s=t.current.unstable_applyPipeProcessors("preferencePanel",null,n.openedPanelValue??H2.filters);let d=null;switch(n.openedPanelValue){case H2.filters:d=a.current;break;case H2.columns:d=i.current;break;case H2.aiAssistant:d=o.current;break}return Ke.jsx(r.slots.panel,Mr({id:n.panelId,open:e.length>0&&n.open,"aria-labelledby":n.labelId,target:d,onClose:()=>t.current.hidePreferences()},r.slotProps?.panel,{children:s}))}function UUt(){const t=Cu();return Ke.jsxs(ze.Fragment,{children:[Ke.jsx(BUt,{}),t.showToolbar&&Ke.jsx(t.slots.toolbar,Mr({},t.slotProps?.toolbar))]})}const HUt=["className","children","sidePanel"],jUt=(t,e)=>{const{autoHeight:r,classes:n,showCellVerticalBorder:i}=t,a={root:["root",r&&"autoHeight",`root--density${ys(e)}`,t.slots.toolbar===null&&"root--noToolbar","withBorderColor",i&&"withVerticalBorder"]};return Cs(a,Fh,n)},VUt=of(function(e,r){const n=Cu(),{className:i,children:a,sidePanel:o}=e,s=Ms(e,HUt),d=tT(),b=wl(d,SN),L=d.current.rootElementRef,B=ze.useCallback(U=>{U!==null&&d.current.publishEvent("rootMount",U)},[d]),V=id(L,r,B),X=n,ie=jUt(X,b),de=nzt();return FUt()?null:Ke.jsxs(PUt,Mr({className:Vo(ie.root,i,de.className,o&&Bi.withSidePanel),ownerState:X},s,{ref:V,children:[Ke.jsxs("div",{className:Bi.mainContent,role:"presentation",children:[Ke.jsx(UUt,{}),Ke.jsx(cUt,{children:a}),Ke.jsx(fUt,{})]}),o,de.tag]}))}),qUt=Vk(VUt),GUt=["className"],$Ut=t=>{const{classes:e}=t;return Cs({root:["footerContainer","withBorderColor"]},Fh,e)},WUt=gp("div",{name:"MuiDataGrid",slot:"FooterContainer"})({display:"flex",justifyContent:"space-between",alignItems:"center",minHeight:52,borderTop:"1px solid"}),YUt=of(function(e,r){const{className:n}=e,i=Ms(e,GUt),a=Cu(),o=$Ut(a);return Ke.jsx(WUt,Mr({className:Vo(o.root,n),ownerState:a},i,{ref:r}))}),XUt=["className"],ZUt=t=>{const{classes:e}=t;return Cs({root:["overlay"]},Fh,e)},KUt=gp("div",{name:"MuiDataGrid",slot:"Overlay"})({width:"100%",height:"100%",display:"flex",gap:Bu.spacing(1),flexDirection:"column",alignSelf:"center",alignItems:"center",justifyContent:"center",textAlign:"center",textWrap:"balance",backgroundColor:Bu.colors.background.backdrop}),FX=of(function(e,r){const{className:n}=e,i=Ms(e,XUt),a=Cu(),o=ZUt(a);return Ke.jsx(KUt,Mr({className:Vo(o.root,n),ownerState:a},i,{ref:r}))});function q5(t,e,r,n={}){return typeof e=="function"?e(r,n):e?(e.props.className&&(r.className=JUt(e.props.className,r.className)),(e.props.style||r.style)&&(r.style=Mr({},r.style,e.props.style)),ze.cloneElement(e,r)):ze.createElement(t,r)}function JUt(t,e){return!t||!e?t||e:`${t} ${e}`}const wGe=ze.createContext(void 0);function QUt(){const t=ze.useContext(wGe);if(t===void 0)throw new Error("MUI X: Missing context. Toolbar subcomponents must be placed within a <Toolbar /> component.");return t}function eHt(t,e){if(!t.ref.current||!e.ref.current)return 0;const r=t.ref.current.compareDocumentPosition(e.ref.current);return r?r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS?1:0:0}const tHt=["render","className"],rHt=t=>{const{classes:e}=t;return Cs({root:["toolbar"]},Fh,e)},nHt=gp("div",{name:"MuiDataGrid",slot:"Toolbar"})({flex:0,display:"flex",alignItems:"center",justifyContent:"end",gap:Bu.spacing(.25),padding:Bu.spacing(.75),minHeight:52,boxSizing:"border-box",borderBottom:`1px solid ${Bu.colors.border.base}`}),iHt=of(function(e,r){const{render:n,className:i}=e,a=Ms(e,tHt),o=Cu(),s=rHt(o),[d,b]=ze.useState(null),[L,B]=ze.useState([]),V=ze.useCallback(()=>L.sort(eHt),[L]),X=ze.useCallback((Me,Ie,Ve=!0)=>{let Ze=Me;const Je=V(),nt=Je.length;for(let ut=0;ut<nt;ut+=1){if(Ze+=Ie,Ze>=nt){if(!Ve)return-1;Ze=0}else if(Ze<0){if(!Ve)return-1;Ze=nt-1}if(!Je[Ze].ref.current?.disabled&&Je[Ze].ref.current?.ariaDisabled!=="true")return Ze}return-1},[V]),ie=ze.useCallback((Me,Ie)=>{B(Ve=>[...Ve,{id:Me,ref:Ie}])},[]),de=ze.useCallback(Me=>{B(Ie=>Ie.filter(Ve=>Ve.id!==Me))},[]),ae=ze.useCallback(Me=>{if(!d)return;const Ie=V(),Ve=Ie.findIndex(Je=>Je.id===d);let Ze=-1;if(Me.key==="ArrowRight"?(Me.preventDefault(),Ze=X(Ve,1)):Me.key==="ArrowLeft"?(Me.preventDefault(),Ze=X(Ve,-1)):Me.key==="Home"?(Me.preventDefault(),Ze=X(-1,1,!1)):Me.key==="End"&&(Me.preventDefault(),Ze=X(Ie.length,-1,!1)),Ze>=0&&Ze<Ie.length){const Je=Ie[Ze];b(Je.id),Je.ref.current?.focus()}},[V,d,X]),U=ze.useCallback(Me=>{d!==Me&&b(Me)},[d,b]),ve=ze.useCallback(Me=>{const Ie=V(),Ve=Ie.findIndex(Je=>Je.id===Me),Ze=X(Ve,1);if(Ze>=0&&Ze<Ie.length){const Je=Ie[Ze];b(Je.id),Je.ref.current?.focus()}},[V,X]);ze.useEffect(()=>{const Me=V();if(Me.length>0){if(!d){b(Me[0].id);return}const Ie=Me.findIndex(Ve=>Ve.id===d);if(Me[Ie]){if(Ie===-1){const Ve=Me[Ie];Ve&&(b(Ve.id),Ve.ref.current?.focus())}}else{const Ve=Me[Me.length-1];Ve&&(b(Ve.id),Ve.ref.current?.focus())}}},[V,X]);const Se=ze.useMemo(()=>({focusableItemId:d,registerItem:ie,unregisterItem:de,onItemKeyDown:ae,onItemFocus:U,onItemDisabled:ve}),[d,ie,de,ae,U,ve]),Pe=q5(nHt,n,Mr({role:"toolbar","aria-orientation":"horizontal","aria-label":o.label||void 0,className:Vo(s.root,i)},a,{ref:r}));return Ke.jsx(wGe.Provider,{value:Se,children:Pe})}),aHt=["render","onKeyDown","onFocus","disabled","aria-disabled"],kG=of(function(e,r){const{render:n,onKeyDown:i,onFocus:a,disabled:o,"aria-disabled":s}=e,d=Ms(e,aHt),b=Vd(),L=Cu(),B=ze.useRef(null),V=id(B,r),{focusableItemId:X,registerItem:ie,unregisterItem:de,onItemKeyDown:ae,onItemFocus:U,onItemDisabled:ve}=QUt(),Se=Ze=>{ae(Ze),i?.(Ze)},Pe=Ze=>{U(b),a?.(Ze)};ze.useEffect(()=>(ie(b,B),()=>de(b)),[]);const Me=ze.useRef(o);ze.useEffect(()=>{Me.current!==o&&o===!0&&ve(b,o),Me.current=o},[o,b,ve]);const Ie=ze.useRef(s);ze.useEffect(()=>{Ie.current!==s&&s===!0&&ve(b,!0),Ie.current=s},[s,b,ve]);const Ve=q5(L.slots.baseIconButton,n,Mr({},L.slotProps?.baseIconButton,{tabIndex:X===b?0:-1},d,{disabled:o,"aria-disabled":s,onKeyDown:Se,onFocus:Pe,ref:V}));return Ke.jsx(ze.Fragment,{children:Ve})}),oHt=t=>{const{classes:e,open:r}=t;return Cs({root:["menuIcon",r&&"menuOpen"],button:["menuIconButton"]},Fh,e)},sHt=ze.memo(t=>{const{colDef:e,open:r,columnMenuId:n,columnMenuButtonId:i,iconButtonRef:a}=t,o=wd(),s=Cu(),d=Mr({},t,{classes:s.classes}),b=oHt(d),L=ze.useCallback(V=>{V.preventDefault(),V.stopPropagation(),o.current.toggleColumnMenu(e.field)},[o,e.field]),B=e.headerName??e.field;return Ke.jsx("div",{className:b.root,children:Ke.jsx(s.slots.baseTooltip,Mr({title:o.current.getLocaleText("columnMenuLabel"),enterDelay:1e3},s.slotProps?.baseTooltip,{children:Ke.jsx(s.slots.baseIconButton,Mr({ref:a,tabIndex:-1,className:b.button,"aria-label":o.current.getLocaleText("columnMenuAriaLabel")(B),size:"small",onClick:L,"aria-haspopup":"menu","aria-expanded":r,"aria-controls":r?n:void 0,id:i},s.slotProps?.baseIconButton,{children:Ke.jsx(s.slots.columnMenuIcon,{fontSize:"inherit"})}))}))})});function lHt({columnMenuId:t,columnMenuButtonId:e,ContentComponent:r,contentComponentProps:n,field:i,open:a,target:o,onExited:s}){const d=wd(),b=d.current.getColumn(i),L=vl(B=>{B&&(B.stopPropagation(),o?.contains(B.target))||d.current.hideColumnMenu()});return!o||!b?null:Ke.jsx(CX,{position:`bottom-${b.align==="right"?"start":"end"}`,open:a,target:o,onClose:L,onExited:s,children:Ke.jsx(r,Mr({colDef:b,hideMenu:L,open:a,id:t,labelledby:e},n))})}function uHt(t){return t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth}function P$(t,e){return t.closest(`.${e}`)}function Gk(t){return t.replace(/["\\]/g,"\\$&")}function cHt(t,e){return t.querySelector(`[role="columnheader"][data-field="${Gk(e)}"]`)}function SGe(t){return`.${Bi.row}[data-id="${Gk(String(t))}"]`}function fHt(t,e){return t.querySelector(SGe(e))}function dHt(t,{id:e,field:r}){const n=SGe(e),i=`.${Bi.cell}[data-field="${Gk(r)}"]`,a=`${n} ${i}`;return t.querySelector(a)}function cU(t){return t.target.nodeType===1&&!t.currentTarget.contains(t.target)}function hHt(t){return t.getAttribute("data-field")}function pHt(t,e){return t.querySelector(`[data-field="${Gk(e)}"]`)}function vHt(t){return t.getAttribute("data-fields").slice(2,-2).split("-|-")}function mHt(t,e){return Array.from(t.querySelectorAll(`[data-fields*="|-${Gk(e)}-|"]`)??[])}function gHt(t,e){if(!P$(t,Bi.root))throw new Error("MUI X: The root element is not found.");const n=t.getAttribute("aria-colindex");if(!n)return[];const i=Number(n)-1,a=[];return e.virtualScrollerRef?.current?(AGe(e).forEach(o=>{const s=o.getAttribute("data-id");if(!s)return;let d=i;const b=e.unstable_getCellColSpanInfo(s,i);b&&b.spannedByColSpan&&(d=b.leftVisibleCellIndex);const L=o.querySelector(`[data-colindex="${d}"]`);L&&a.push(L)}),a):[]}function gke(t,e){return t.rootElementRef.current.querySelector(`.${Bi[e]}`)}const TGe=({api:t,colIndex:e,position:r,filterFn:n})=>{if(e===null)return[];const i=[];return AGe(t).forEach(a=>{a.getAttribute("data-id")&&a.querySelectorAll(`.${Bi[r==="left"?"cell--pinnedLeft":"cell--pinnedRight"]}`).forEach(s=>{const d=fF(s);d!==null&&n(d)&&i.push(s)})}),i};function yHt(t,e,r){const n=fF(e);return TGe({api:t,colIndex:n,position:r?"right":"left",filterFn:i=>r?i<n:i>n})}function bHt(t,e,r){const n=fF(e);return TGe({api:t,colIndex:n,position:r?"left":"right",filterFn:i=>r?i>n:i<n})}const EGe=({api:t,colIndex:e,position:r,filterFn:n})=>{if(!t.columnHeadersContainerRef?.current)return[];if(e===null)return[];const i=[];return t.columnHeadersContainerRef.current.querySelectorAll(`.${Bi[r==="left"?"columnHeader--pinnedLeft":"columnHeader--pinnedRight"]}`).forEach(a=>{const o=fF(a);o!==null&&n(o,a)&&i.push(a)}),i};function xHt(t,e,r){const n=fF(e);return EGe({api:t,position:r?"right":"left",colIndex:n,filterFn:i=>r?i<n:i>n})}function _Ht(t,e,r){const n=fF(e);return EGe({api:t,position:r?"left":"right",colIndex:n,filterFn:(i,a)=>a.classList.contains(Bi["columnHeader--last"])?!1:r?i>n:i<n})}function wHt(t,e){return t.columnHeadersContainerRef.current.querySelector(`:scope > div > [data-field="${Gk(e)}"][role="columnheader"]`)}function SHt(t,e){const r=t.virtualScrollerRef.current;return Array.from(r.querySelectorAll(`:scope > div > div > div > [data-field="${Gk(e)}"][role="gridcell"]`))}function AGe(t){return t.virtualScrollerRef.current.querySelectorAll(`:scope > div > div > .${Bi.row}`)}function fF(t){const e=t.getAttribute("aria-colindex");return e?Number(e)-1:null}const THt=["className","aria-label"],EHt=t=>{const{classes:e}=t;return Cs({root:["columnHeaderTitle"]},Fh,e)},AHt=gp("div",{name:"MuiDataGrid",slot:"ColumnHeaderTitle"})({textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontWeight:"var(--unstable_DataGrid-headWeight)",lineHeight:"normal"}),CHt=of(function(e,r){const{className:n}=e,i=Ms(e,THt),a=Cu(),o=EHt(a);return Ke.jsx(AHt,Mr({className:Vo(o.root,n),ownerState:a},i,{ref:r}))});function MHt(t){const{label:e,description:r}=t,n=Cu(),i=ze.useRef(null),[a,o]=ze.useState(""),s=ze.useCallback(()=>{if(!r&&i?.current){const d=uHt(i.current);o(d?e:"")}},[r,e]);return Ke.jsx(n.slots.baseTooltip,Mr({title:r||a},n.slotProps?.baseTooltip,{children:Ke.jsx(CHt,{onMouseOver:s,ref:i,children:e})}))}const RHt=["resizable","resizing","height","side"];var iye=(function(t){return t.Left="left",t.Right="right",t})(iye||{});const kHt=t=>{const{resizable:e,resizing:r,classes:n,side:i}=t,a={root:["columnSeparator",e&&"columnSeparator--resizable",r&&"columnSeparator--resizing",i&&`columnSeparator--side${ys(i)}`],icon:["iconSeparator"]};return Cs(a,Fh,n)};function IHt(t){const{height:e,side:r=iye.Right}=t,n=Ms(t,RHt),i=Cu(),a=Mr({},t,{side:r,classes:i.classes}),o=kHt(a),s=ze.useCallback(d=>{d.preventDefault(),d.stopPropagation()},[]);return Ke.jsx("div",Mr({className:o.root,style:{minHeight:e}},n,{onClick:s,children:Ke.jsx(i.slots.columnResizeIcon,{className:o.icon})}))}const PHt=ze.memo(IHt),DHt=["classes","columnMenuOpen","colIndex","height","isResizing","sortDirection","hasFocus","tabIndex","separatorSide","isDraggable","headerComponent","description","elementId","width","columnMenuIconButton","columnMenu","columnTitleIconButtons","headerClassName","label","resizable","draggableContainerProps","columnHeaderSeparatorProps","style"],CGe=of(function(e,r){const{classes:n,colIndex:i,height:a,isResizing:o,sortDirection:s,tabIndex:d,separatorSide:b,isDraggable:L,headerComponent:B,description:V,width:X,columnMenuIconButton:ie=null,columnMenu:de=null,columnTitleIconButtons:ae=null,headerClassName:U,label:ve,resizable:Se,draggableContainerProps:Pe,columnHeaderSeparatorProps:Me,style:Ie}=e,Ve=Ms(e,DHt),Ze=Cu(),Je=ze.useRef(null),nt=id(Je,r);let ut="none";return s!=null&&(ut=s==="asc"?"ascending":"descending"),Ke.jsxs("div",Mr({className:Vo(n.root,U),style:Mr({},Ie,{width:X}),role:"columnheader",tabIndex:d,"aria-colindex":i+1,"aria-sort":ut},Ve,{ref:nt,children:[Ke.jsxs("div",Mr({className:n.draggableContainer,draggable:L,role:"presentation"},Pe,{children:[Ke.jsxs("div",{className:n.titleContainer,role:"presentation",children:[Ke.jsx("div",{className:n.titleContainerContent,children:B!==void 0?B:Ke.jsx(MHt,{label:ve,description:V,columnWidth:X})}),ae]}),ie]})),Ke.jsx(PHt,Mr({resizable:!Ze.disableColumnResize&&!!Se,resizing:o,height:a,side:b},Me)),de]}))}),LHt=t=>{const{disableColumnSorting:e}=Cu(),{colDef:r,classes:n,isDragging:i,sortDirection:a,showRightBorder:o,showLeftBorder:s,filterItemsCounter:d,pinnedPosition:b,isSiblingFocused:L}=t,B=r.sortable&&!e,V=a!=null,X=d!=null&&d>0,ie=r.type==="number",de={root:["columnHeader",r.headerAlign==="left"&&"columnHeader--alignLeft",r.headerAlign==="center"&&"columnHeader--alignCenter",r.headerAlign==="right"&&"columnHeader--alignRight",B&&"columnHeader--sortable",i&&"columnHeader--moving",V&&"columnHeader--sorted",X&&"columnHeader--filtered",ie&&"columnHeader--numeric","withBorderColor",o&&"columnHeader--withRightBorder",s&&"columnHeader--withLeftBorder",b===Nh.LEFT&&"columnHeader--pinnedLeft",b===Nh.RIGHT&&"columnHeader--pinnedRight",L&&"columnHeader--siblingFocused"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer"],titleContainerContent:["columnHeaderTitleContainerContent"]};return Cs(de,Fh,n)};function OHt(t){const{colDef:e,columnMenuOpen:r,colIndex:n,headerHeight:i,isResizing:a,isLast:o,sortDirection:s,sortIndex:d,filterItemsCounter:b,hasFocus:L,tabIndex:B,disableReorder:V,separatorSide:X,showLeftBorder:ie,showRightBorder:de,pinnedPosition:ae,pinnedOffset:U}=t,ve=tT(),Se=Cu(),Pe=Kv(),Me=ze.useRef(null),Ie=Vd(),Ve=Vd(),Ze=ze.useRef(null),[Je,nt]=ze.useState(r),ut=ze.useMemo(()=>!Se.disableColumnReorder&&!V&&!e.disableReorder,[Se.disableColumnReorder,V,e.disableReorder]);let ht;e.renderHeader&&(ht=e.renderHeader(ve.current.getColumnHeaderParams(e.field)));const _t=Mr({},t,{classes:Se.classes,showRightBorder:de,showLeftBorder:ie}),Dt=LHt(_t),qt=ze.useCallback(Un=>Qn=>{cU(Qn)||ve.current.publishEvent(Un,ve.current.getColumnHeaderParams(e.field),Qn)},[ve,e.field]),Lt=ze.useMemo(()=>({onClick:qt("columnHeaderClick"),onContextMenu:qt("columnHeaderContextMenu"),onDoubleClick:qt("columnHeaderDoubleClick"),onMouseOver:qt("columnHeaderOver"),onMouseOut:qt("columnHeaderOut"),onMouseEnter:qt("columnHeaderEnter"),onMouseLeave:qt("columnHeaderLeave"),onKeyDown:qt("columnHeaderKeyDown"),onFocus:qt("columnHeaderFocus"),onBlur:qt("columnHeaderBlur")}),[qt]),dr=ze.useMemo(()=>ut?{onDragStart:qt("columnHeaderDragStart"),onDragEnter:qt("columnHeaderDragEnter"),onDragOver:qt("columnHeaderDragOver"),onDragEndCapture:qt("columnHeaderDragEnd")}:{},[ut,qt]),Zt=ze.useMemo(()=>({onMouseDown:qt("columnSeparatorMouseDown"),onDoubleClick:qt("columnSeparatorDoubleClick")}),[qt]);ze.useEffect(()=>{Je||nt(r)},[Je,r]);const Cr=ze.useCallback(()=>{nt(!1)},[]),yt=!Se.disableColumnMenu&&!e.disableColumnMenu&&Ke.jsx(sHt,{colDef:e,columnMenuId:Ie,columnMenuButtonId:Ve,open:Je,iconButtonRef:Ze}),Vt=Ke.jsx(lHt,{columnMenuId:Ie,columnMenuButtonId:Ve,field:e.field,open:r,target:Ze.current,ContentComponent:Se.slots.columnMenu,contentComponentProps:Se.slotProps?.columnMenu,onExited:Cr}),Er=e.sortingOrder??Se.sortingOrder,sr=(e.sortable||s!=null)&&!e.hideSortIcons&&!Se.disableColumnSorting,or=Ke.jsxs(ze.Fragment,{children:[!Se.disableColumnFilter&&Ke.jsx(Se.slots.columnHeaderFilterIconButton,Mr({field:e.field,counter:b},Se.slotProps?.columnHeaderFilterIconButton)),sr&&Ke.jsx(Se.slots.columnHeaderSortIcon,Mr({field:e.field,direction:s,index:d,sortingOrder:Er,disabled:!e.sortable},Se.slotProps?.columnHeaderSortIcon))]});ze.useLayoutEffect(()=>{const Un=ve.current.state.columnMenu;if(L&&!Un.open){const Jn=Me.current.querySelector('[tabindex="0"]')||Me.current;if(!Jn)return;if(rye())Jn.focus({preventScroll:!0});else{const Vn=ve.current.getScrollPosition();Jn.focus(),ve.current.scroll(Vn)}}},[ve,L]);const Ar=typeof e.headerClassName=="function"?e.headerClassName({field:e.field,colDef:e}):e.headerClassName,Ir=e.headerName??e.field,_n=ze.useMemo(()=>NX(Mr({},t.style),Pe,ae,U),[ae,U,t.style,Pe]);return Ke.jsx(CGe,Mr({ref:Me,classes:Dt,columnMenuOpen:r,colIndex:n,height:i,isResizing:a,sortDirection:s,hasFocus:L,tabIndex:B,separatorSide:X,isDraggable:ut,headerComponent:ht,description:e.description,elementId:e.field,width:e.computedWidth,columnMenuIconButton:yt,columnTitleIconButtons:or,headerClassName:Vo(Ar,o&&Bi["columnHeader--last"]),label:Ir,resizable:!Se.disableColumnResize&&!!e.resizable,"data-field":e.field,columnMenu:Vt,draggableContainerProps:dr,columnHeaderSeparatorProps:Zt,style:_n},Lt))}const NHt=Vk(OHt),FHt=["className"],zHt=t=>{const{classes:e}=t;return Cs({root:["iconButtonContainer"]},Fh,e)},BHt=gp("div",{name:"MuiDataGrid",slot:"IconButtonContainer"})(()=>({display:"flex",visibility:"hidden",width:0})),MGe=of(function(e,r){const{className:n}=e,i=Ms(e,FHt),a=Cu(),o=zHt(a);return Ke.jsx(BHt,Mr({className:Vo(o.root,n),ownerState:a},i,{ref:r}))}),UHt=["direction","index","sortingOrder","disabled","className"],HHt=t=>{const{classes:e}=t;return Cs({root:["sortButton"],icon:["sortIcon"]},Fh,e)},jHt=gp(V5,{name:"MuiDataGrid",slot:"SortButton"})({transition:Bu.transition(["opacity"],{duration:Bu.transitions.duration.short,easing:Bu.transitions.easing.easeInOut})});function VHt(t,e,r,n){let i;const a={};return e==="asc"?i=t.columnSortedAscendingIcon:e==="desc"?i=t.columnSortedDescendingIcon:(i=t.columnUnsortedIcon,a.sortingOrder=n),i?Ke.jsx(i,Mr({fontSize:"small",className:r},a)):null}function qHt(t){const{direction:e,index:r,sortingOrder:n,disabled:i,className:a}=t,o=Ms(t,UHt),s=wd(),d=Cu(),b=Mr({},t,{classes:d.classes}),L=HHt(b),B=VHt(d.slots,e,L.icon,n);if(!B)return null;const V=Ke.jsx(jHt,Mr({as:d.slots.baseIconButton,ownerState:b,"aria-label":s.current.getLocaleText("columnHeaderSortIconLabel"),title:s.current.getLocaleText("columnHeaderSortIconLabel"),size:"small",disabled:i,className:Vo(L.root,a)},d.slotProps?.baseIconButton,o,{children:B}));return Ke.jsxs(ze.Fragment,{children:[r!=null&&Ke.jsx(d.slots.baseBadge,{badgeContent:r,color:"default",overlap:"circular",children:V}),r==null&&V]})}function GHt(t){return Ke.jsx(MGe,{children:Ke.jsx(qHt,Mr({},t,{tabIndex:-1}))})}const $Ht=ze.memo(GHt),WHt=t=>{const{classes:e}=t;return Cs({icon:["filterIcon"]},Fh,e)};function YHt(t){return t.counter?Ke.jsx(XHt,Mr({},t)):null}function XHt(t){const{counter:e,field:r,onClick:n}=t,i=wd(),a=Cu(),o=Mr({},t,{classes:a.classes}),s=WHt(o),d=Vd(),b=wl(i,lBt,d),L=Vd(),B=ze.useCallback(X=>{X.preventDefault(),X.stopPropagation();const{open:ie,openedPanelValue:de}=DL(i);ie&&de===H2.filters?i.current.hideFilterPanel():i.current.showFilterPanel(void 0,L,d),n&&n(i.current.getColumnHeaderParams(r),X)},[i,r,n,L,d]);if(!e)return null;const V=Ke.jsx(a.slots.baseIconButton,Mr({id:d,onClick:B,"aria-label":i.current.getLocaleText("columnHeaderFiltersLabel"),size:"small",tabIndex:-1,"aria-haspopup":"menu","aria-expanded":b,"aria-controls":b?L:void 0},a.slotProps?.baseIconButton,{children:Ke.jsx(a.slots.columnFilteredIcon,{className:s.icon,fontSize:"small"})}));return Ke.jsx(a.slots.baseTooltip,Mr({title:i.current.getLocaleText("columnHeaderFiltersTooltipActive")(e),enterDelay:1e3},a.slotProps?.baseTooltip,{children:Ke.jsxs(MGe,{children:[e>1&&Ke.jsx(a.slots.baseBadge,{badgeContent:e,color:"default",children:V}),e===1&&V]})}))}const ZHt=["hideMenu","colDef","id","labelledby","className","children","open"],KHt=fa(V5)(()=>({minWidth:248}));function yke(t){t.currentTarget.contains(t.target)&&t.stopPropagation()}const JHt=of(function(e,r){const{hideMenu:n,id:i,labelledby:a,className:o,children:s,open:d}=e,b=Ms(e,ZHt),L=Cu(),B=ze.useCallback(V=>{V.key==="Tab"&&V.preventDefault(),Dqe(V.key)&&n(V)},[n]);return Ke.jsx(KHt,Mr({as:L.slots.baseMenuList,id:i,className:Vo(Bi.menuList,o),"aria-labelledby":a,onKeyDown:B,onWheel:yke,onTouchMove:yke,autoFocus:d},b,{ref:r,children:s}))}),QHt=["displayOrder"],ejt=t=>{const e=tT(),r=Cu(),{defaultSlots:n,defaultSlotProps:i,slots:a={},slotProps:o={},hideMenu:s,colDef:d,addDividers:b=!0}=t,L=ze.useMemo(()=>Mr({},n,a),[n,a]),B=ze.useMemo(()=>{if(!o||Object.keys(o).length===0)return i;const ie=Mr({},o);return Object.entries(i).forEach(([de,ae])=>{ie[de]=Mr({},ae,o[de]||{})}),ie},[i,o]),V=e.current.unstable_applyPipeProcessors("columnMenu",[],t.colDef),X=ze.useMemo(()=>{const ie=Object.keys(n);return Object.keys(a).filter(de=>!ie.includes(de))},[a,n]);return ze.useMemo(()=>{const ae=Array.from(new Set([...V,...X])).filter(U=>L[U]!=null).sort((U,ve)=>{const Se=B[U],Pe=B[ve],Me=Number.isFinite(Se?.displayOrder)?Se.displayOrder:100,Ie=Number.isFinite(Pe?.displayOrder)?Pe.displayOrder:100;return Me-Ie});return ae.reduce((U,ve,Se)=>{let Pe={colDef:d,onClick:s};const Me=B[ve];if(Me){const Ie=Ms(Me,QHt);Pe=Mr({},Pe,Ie)}return b&&Se!==ae.length-1?[...U,[L[ve],Pe],[r.slots.baseDivider,{}]]:[...U,[L[ve],Pe]]},[])},[b,d,V,s,L,B,X,r.slots.baseDivider])};function tjt(t){const{colDef:e,onClick:r}=t,n=wd(),i=Cu(),s=uy(n).filter(b=>b.disableColumnMenu!==!0).length===1,d=ze.useCallback(b=>{s||(n.current.setColumnVisibility(e.field,!1),r(b))},[n,e.field,r,s]);return i.disableColumnSelector||e.hideable===!1?null:Ke.jsx(i.slots.baseMenuItem,{onClick:d,disabled:s,iconStart:Ke.jsx(i.slots.columnMenuHideIcon,{fontSize:"small"}),children:n.current.getLocaleText("columnMenuHideColumn")})}function rjt(t){const{onClick:e}=t,r=wd(),n=Cu(),i=ze.useCallback(a=>{e(a),r.current.showPreferences(H2.columns)},[r,e]);return n.disableColumnSelector?null:Ke.jsx(n.slots.baseMenuItem,{onClick:i,iconStart:Ke.jsx(n.slots.columnMenuManageColumnsIcon,{fontSize:"small"}),children:r.current.getLocaleText("columnMenuManageColumns")})}function njt(t){return Ke.jsxs(ze.Fragment,{children:[Ke.jsx(tjt,Mr({},t)),Ke.jsx(rjt,Mr({},t))]})}function ijt(t){const{colDef:e,onClick:r}=t,n=wd(),i=Cu(),a=ze.useCallback(o=>{r(o),n.current.showFilterPanel(e.field)},[n,e.field,r]);return i.disableColumnFilter||!e.filterable?null:Ke.jsx(i.slots.baseMenuItem,{onClick:a,iconStart:Ke.jsx(i.slots.columnMenuFilterIcon,{fontSize:"small"}),children:n.current.getLocaleText("columnMenuFilter")})}function ajt(t){const{colDef:e,onClick:r}=t,n=wd(),i=wl(n,P3),a=Cu(),o=ze.useMemo(()=>e?i.find(B=>B.field===e.field)?.sort:null,[e,i]),s=e.sortingOrder??a.sortingOrder,d=ze.useCallback(L=>{r(L);const B=L.currentTarget.getAttribute("data-value")||null,V=a.multipleColumnsSortingMode==="always";n.current.sortColumn(e.field,B===o?null:B,V)},[n,e,r,o,a.multipleColumnsSortingMode]);if(a.disableColumnSorting||!e||!e.sortable||!s.some(L=>!!L))return null;const b=L=>{const B=n.current.getLocaleText(L);return typeof B=="function"?B(e):B};return Ke.jsxs(ze.Fragment,{children:[s.includes("asc")&&o!=="asc"?Ke.jsx(a.slots.baseMenuItem,{onClick:d,"data-value":"asc",iconStart:Ke.jsx(a.slots.columnMenuSortAscendingIcon,{fontSize:"small"}),children:b("columnMenuSortAsc")}):null,s.includes("desc")&&o!=="desc"?Ke.jsx(a.slots.baseMenuItem,{onClick:d,"data-value":"desc",iconStart:Ke.jsx(a.slots.columnMenuSortDescendingIcon,{fontSize:"small"}),children:b("columnMenuSortDesc")}):null,s.includes(null)&&o!=null?Ke.jsx(a.slots.baseMenuItem,{onClick:d,iconStart:a.slots.columnMenuUnsortIcon?Ke.jsx(a.slots.columnMenuUnsortIcon,{fontSize:"small"}):Ke.jsx("span",{}),children:n.current.getLocaleText("columnMenuUnsort")}):null]})}const ojt=["defaultSlots","defaultSlotProps","slots","slotProps"],sjt={columnMenuSortItem:ajt,columnMenuFilterItem:ijt,columnMenuColumnsItem:njt},ljt={columnMenuSortItem:{displayOrder:10},columnMenuFilterItem:{displayOrder:20},columnMenuColumnsItem:{displayOrder:30}},ujt=of(function(e,r){const{defaultSlots:n,defaultSlotProps:i,slots:a,slotProps:o}=e,s=Ms(e,ojt),d=ejt(Mr({},s,{defaultSlots:n,defaultSlotProps:i,slots:a,slotProps:o}));return Ke.jsx(JHt,Mr({},s,{ref:r,children:d.map(([b,L],B)=>Ke.jsx(b,Mr({},L),B))}))}),cjt=of(function(e,r){return Ke.jsx(ujt,Mr({},e,{ref:r,defaultSlots:sjt,defaultSlotProps:ljt}))}),fjt=["className"],djt=t=>{const{classes:e}=t;return Cs({root:["panelWrapper"]},Fh,e)},hjt=fa("div",{name:"MuiDataGrid",slot:"PanelWrapper"})({display:"flex",flexDirection:"column",flex:1,"&:focus":{outline:0}}),RGe=of(function(e,r){const{className:n}=e,i=Ms(e,fjt),a=Cu(),o=djt(a);return Ke.jsx(hjt,Mr({tabIndex:-1,className:Vo(o.root,n),ownerState:a},i,{ref:r}))});function pjt(t){const e=Cu();return Ke.jsx(RGe,Mr({},t,{children:Ke.jsx(e.slots.columnsManagement,Mr({},e.slotProps?.columnsManagement))}))}const vjt=["children","className","classes","onClose"],mjt=Ml("MuiDataGrid",["panel","paper"]),gjt=fa(V5,{name:"MuiDataGrid",slot:"panel"})({zIndex:Bu.zIndex.panel}),yjt=fa("div",{name:"MuiDataGrid",slot:"panelContent"})({backgroundColor:Bu.colors.background.overlay,borderRadius:Bu.radius.base,boxShadow:Bu.shadows.overlay,display:"flex",maxWidth:`calc(100vw - ${Bu.spacing(2)})`,overflow:"auto"}),bjt=of((t,e)=>{const{children:r,className:n,onClose:i}=t,a=Ms(t,vjt),o=wd(),s=Cu(),d=mjt,[b,L]=ze.useState(!1),B=Nqe(),V=vl(()=>L(!0)),X=vl(()=>L(!1)),ie=vl(()=>{i?.()}),de=vl(ve=>{ve.key==="Escape"&&i?.()}),[ae,U]=ze.useState(null);return ze.useEffect(()=>{const ve=o.current.rootElementRef?.current?.querySelector('[data-id="gridPanelAnchor"]');ve&&U(ve)},[o]),ae?Ke.jsx(gjt,Mr({as:s.slots.basePopper,ownerState:s,placement:"bottom-end",className:Vo(d.panel,n,B),flip:!0,onDidShow:V,onDidHide:X,onClickAway:ie,clickAwayMouseEvent:"onPointerUp",clickAwayTouchEvent:!1,focusTrap:!0},a,s.slotProps?.basePopper,{target:t.target??ae,ref:e,children:Ke.jsx(yjt,{className:d.paper,ownerState:s,onKeyDown:de,children:b&&r})})):null}),xjt=["className"],_jt=t=>{const{classes:e}=t;return Cs({root:["panelContent"]},Fh,e)},wjt=gp("div",{name:"MuiDataGrid",slot:"PanelContent"})({display:"flex",flexDirection:"column",overflow:"auto",flex:"1 1",maxHeight:400,padding:Bu.spacing(2.5,1.5,2,1),gap:Bu.spacing(2.5)});function Sjt(t){const{className:e}=t,r=Ms(t,xjt),n=Cu(),i=_jt(n);return Ke.jsx(wjt,Mr({className:Vo(i.root,e),ownerState:n},r))}const Tjt=["className"],Ejt=t=>{const{classes:e}=t;return Cs({root:["panelFooter"]},Fh,e)},Ajt=fa("div",{name:"MuiDataGrid",slot:"PanelFooter"})({padding:Bu.spacing(1),display:"flex",justifyContent:"space-between",borderTop:`1px solid ${Bu.colors.border.base}`});function Cjt(t){const{className:e}=t,r=Ms(t,Tjt),n=Cu(),i=Ejt(n);return Ke.jsx(Ajt,Mr({className:Vo(i.root,e),ownerState:n},r))}const Mjt=["item","hasMultipleFilters","deleteFilter","applyFilterChanges","showMultiFilterOperators","disableMultiFilterOperator","applyMultiFilterOperatorChanges","focusElementRef","logicOperators","columnsSort","filterColumns","deleteIconProps","logicOperatorInputProps","operatorInputProps","columnInputProps","valueInputProps","readOnly","children"],Rjt=["InputComponentProps"],kjt=t=>{const{classes:e}=t;return Cs({root:["filterForm"],deleteIcon:["filterFormDeleteIcon"],logicOperatorInput:["filterFormLogicOperatorInput"],columnInput:["filterFormColumnInput"],operatorInput:["filterFormOperatorInput"],valueInput:["filterFormValueInput"]},Fh,e)},Ijt=fa("div",{name:"MuiDataGrid",slot:"FilterForm"})({display:"flex",gap:Bu.spacing(1.5)}),Pjt=fa("div",{name:"MuiDataGrid",slot:"FilterFormDeleteIcon"})({flexShrink:0,display:"flex",justifyContent:"center",alignItems:"center"}),Djt=fa("div",{name:"MuiDataGrid",slot:"FilterFormLogicOperatorInput"})({minWidth:75,justifyContent:"end"}),Ljt=fa("div",{name:"MuiDataGrid",slot:"FilterFormColumnInput"})({width:150}),Ojt=fa("div",{name:"MuiDataGrid",slot:"FilterFormOperatorInput"})({width:150}),Njt=fa("div",{name:"MuiDataGrid",slot:"FilterFormValueInput"})({width:190}),Fjt=t=>{switch(t){case F2.And:return"filterPanelOperatorAnd";case F2.Or:return"filterPanelOperatorOr";default:throw new Error("MUI X: Invalid `logicOperator` property in the `GridFilterPanel`.")}},q7=t=>t.headerName||t.field,bke=new Intl.Collator,xke=of(function(e,r){const{item:n,hasMultipleFilters:i,deleteFilter:a,applyFilterChanges:o,showMultiFilterOperators:s,disableMultiFilterOperator:d,applyMultiFilterOperatorChanges:b,focusElementRef:L,logicOperators:B=[F2.And,F2.Or],columnsSort:V,filterColumns:X,deleteIconProps:ie={},logicOperatorInputProps:de={},operatorInputProps:ae={},columnInputProps:U={},valueInputProps:ve={},readOnly:Se}=e,Pe=Ms(e,Mjt),Me=wd(),Ie=wl(Me,qk),Ve=wl(Me,Rqe),Ze=wl(Me,lx),Je=Vd(),nt=Vd(),ut=Vd(),ht=Vd(),_t=Cu(),Dt=kjt(_t),qt=ze.useRef(null),Lt=ze.useRef(null),dr=Ze.logicOperator??F2.And,Zt=i&&B.length>0,yt=(_t.slotProps?.baseSelect||{}).native??!1,Vt=_t.slotProps?.baseSelectOption||{},{InputComponentProps:Er}=ve,sr=Ms(ve,Rjt),or=wl(Me,PL),Ar=wl(Me,eye),{filteredColumns:Ir,selectedField:_n}=ze.useMemo(()=>{let On=n.field;const Sn=Ie[n.field].filterable===!1?Ie[n.field]:null;if(Sn)return{filteredColumns:[Sn],selectedField:On};if(or)return{filteredColumns:Ve.filter(Mn=>Ar.get(Mn.field)!==void 0),selectedField:On};if(X===void 0||typeof X!="function")return{filteredColumns:Ve,selectedField:On};const bn=X({field:n.field,columns:Ve,currentFilters:Ze?.items||[]});return{filteredColumns:Ve.filter(Mn=>{const gi=bn.includes(Mn.field);return Mn.field===n.field&&!gi&&(On=void 0),gi}),selectedField:On}},[n.field,Ie,or,X,Ve,Ze?.items,Ar]),Un=ze.useMemo(()=>{switch(V){case"asc":return Ir.sort((On,Sn)=>bke.compare(q7(On),q7(Sn)));case"desc":return Ir.sort((On,Sn)=>-bke.compare(q7(On),q7(Sn)));default:return Ir}},[Ir,V]),Qn=n.field?Me.current.getColumn(n.field):null,Jn=ze.useMemo(()=>!n.operator||!Qn?null:Qn.filterOperators?.find(On=>On.value===n.operator),[n,Qn]),Vn=ze.useCallback(On=>{const Sn=On.target.value,bn=Me.current.getColumn(Sn);if(bn.field===Qn.field)return;const Mn=bn.filterOperators.find(Pa=>Pa.value===n.operator)||bn.filterOperators[0];let Oi=!Mn.InputComponent||Mn.InputComponent!==Jn?.InputComponent||bn.type!==Qn.type?void 0:n.value;if(bn.type==="singleSelect"&&Oi!==void 0){const Pa=bn,va=IL(Pa);Array.isArray(Oi)?Oi=Oi.filter(ti=>R$(ti,va,Pa?.getOptionValue)!==void 0):R$(n.value,va,Pa?.getOptionValue)===void 0&&(Oi=void 0)}o(Mr({},n,{field:Sn,operator:Mn.value,value:Oi}))},[Me,o,n,Qn,Jn]),jn=ze.useCallback(On=>{const Sn=On.target.value,bn=Qn?.filterOperators.find(gi=>gi.value===Sn),Mn=!bn?.InputComponent||bn?.InputComponent!==Jn?.InputComponent;o(Mr({},n,{operator:Sn,value:Mn?void 0:n.value}))},[o,n,Qn,Jn]),Lr=ze.useCallback(On=>{const Sn=On.target.value===F2.And.toString()?F2.And:F2.Or;b(Sn)},[b]),Yn=()=>{a(n)};return ze.useImperativeHandle(L,()=>({focus:()=>{Jn?.InputComponent?qt?.current?.focus():Lt.current.focus()}}),[Jn]),Ke.jsxs(Ijt,Mr({className:Dt.root,"data-id":n.id,ownerState:_t},Pe,{ref:r,children:[Ke.jsx(Pjt,Mr({},ie,{className:Vo(Dt.deleteIcon,ie.className),ownerState:_t,children:Ke.jsx(_t.slots.baseIconButton,Mr({"aria-label":Me.current.getLocaleText("filterPanelDeleteIconLabel"),title:Me.current.getLocaleText("filterPanelDeleteIconLabel"),onClick:Yn,size:"small",disabled:Se},_t.slotProps?.baseIconButton,{children:Ke.jsx(_t.slots.filterPanelDeleteIcon,{fontSize:"small"})}))})),Ke.jsx(Djt,Mr({as:_t.slots.baseSelect,sx:[Zt?{display:"flex"}:{display:"none"},s?{visibility:"visible"}:{visibility:"hidden"},de.sx],className:Vo(Dt.logicOperatorInput,de.className),ownerState:_t},de,{size:"small",slotProps:{htmlInput:{"aria-label":Me.current.getLocaleText("filterPanelLogicOperator")}},value:dr??"",onChange:Lr,disabled:!!d||B.length===1,native:yt},_t.slotProps?.baseSelect,{children:B.map(On=>ze.createElement(_t.slots.baseSelectOption,Mr({},Vt,{native:yt,key:On.toString(),value:On.toString()}),Me.current.getLocaleText(Fjt(On))))})),Ke.jsx(Ljt,Mr({as:_t.slots.baseSelect},U,{className:Vo(Dt.columnInput,U.className),ownerState:_t,size:"small",labelId:nt,id:Je,label:Me.current.getLocaleText("filterPanelColumns"),value:_n??"",onChange:Vn,native:yt,disabled:Se},_t.slotProps?.baseSelect,{children:Un.map(On=>ze.createElement(_t.slots.baseSelectOption,Mr({},Vt,{native:yt,key:On.field,value:On.field}),q7(On)))})),Ke.jsx(Ojt,Mr({as:_t.slots.baseSelect,size:"small"},ae,{className:Vo(Dt.operatorInput,ae.className),ownerState:_t,labelId:ht,label:Me.current.getLocaleText("filterPanelOperator"),id:ut,value:n.operator,onChange:jn,native:yt,inputRef:Lt,disabled:Se},_t.slotProps?.baseSelect,{children:Qn?.filterOperators?.map(On=>ze.createElement(_t.slots.baseSelectOption,Mr({},Vt,{native:yt,key:On.value,value:On.value}),On.label||Me.current.getLocaleText(`filterOperator${ys(On.value)}`)))})),Ke.jsx(Njt,Mr({},sr,{className:Vo(Dt.valueInput,sr.className),ownerState:_t,children:Jn?.InputComponent?Ke.jsx(Jn.InputComponent,Mr({apiRef:Me,item:n,applyValue:o,focusElementRef:qt,disabled:Se,slotProps:{root:{size:"small"}}},Jn.InputComponentProps,Er),n.field):null}))]}))}),zjt=["logicOperators","columnsSort","filterFormProps","getColumnForNewFilter","children","disableAddFilterButton","disableRemoveAllButton"],_ke=t=>({field:t.field,operator:t.filterOperators[0].value,id:Math.round(Math.random()*1e5)}),Bjt=of(function(e,r){const n=wd(),i=Cu(),a=wl(n,lx),o=wl(n,Rqe),s=wl(n,q7t),d=ze.useRef(null),b=ze.useRef(null),{logicOperators:L=[F2.And,F2.Or],columnsSort:B,filterFormProps:V,getColumnForNewFilter:X,disableAddFilterButton:ie=!1,disableRemoveAllButton:de=!1}=e,ae=Ms(e,zjt),U=n.current.upsertFilterItem,ve=ze.useCallback(ht=>{n.current.setFilterLogicOperator(ht)},[n]),Se=ze.useCallback(()=>{let ht;if(X&&typeof X=="function"){const _t=X({currentFilters:a?.items||[],columns:o});if(_t===null)return null;ht=o.find(({field:Dt})=>Dt===_t)}else ht=o.find(_t=>_t.filterOperators?.length);return ht?_ke(ht):null},[a?.items,o,X]),Pe=ze.useCallback(()=>{if(X===void 0||typeof X!="function")return Se();const ht=a.items.length?a.items:[Se()].filter(Boolean),_t=X({currentFilters:ht,columns:o});if(_t===null)return null;const Dt=o.find(({field:qt})=>qt===_t);return Dt?_ke(Dt):null},[a.items,o,X,Se]),Me=ze.useMemo(()=>a.items.length?a.items:(b.current||(b.current=Se()),b.current?[b.current]:[]),[a.items,Se]),Ie=Me.length>1,{readOnlyFilters:Ve,validFilters:Ze}=ze.useMemo(()=>Me.reduce((ht,_t)=>(s[_t.field]?ht.validFilters.push(_t):ht.readOnlyFilters.push(_t),ht),{readOnlyFilters:[],validFilters:[]}),[Me,s]),Je=ze.useCallback(()=>{const ht=Pe();ht&&n.current.upsertFilterItems([...Me,ht])},[n,Pe,Me]),nt=ze.useCallback(ht=>{const _t=Ze.length===1;n.current.deleteFilterItem(ht),_t&&n.current.hideFilterPanel()},[n,Ze.length]),ut=ze.useCallback(()=>Ze.length===1&&Ze[0].value===void 0?(n.current.deleteFilterItem(Ze[0]),n.current.hideFilterPanel()):n.current.setFilterModel(Mr({},a,{items:Ve}),"removeAllFilterItems"),[n,Ve,a,Ze]);return ze.useEffect(()=>{L.length>0&&a.logicOperator&&!L.includes(a.logicOperator)&&ve(L[0])},[L,ve,a.logicOperator]),ze.useEffect(()=>{Ze.length>0&&d.current.focus()},[Ze.length]),Ke.jsxs(RGe,Mr({},ae,{ref:r,children:[Ke.jsxs(Sjt,{children:[Ve.map((ht,_t)=>Ke.jsx(xke,Mr({item:ht,applyFilterChanges:U,deleteFilter:nt,hasMultipleFilters:Ie,showMultiFilterOperators:_t>0,disableMultiFilterOperator:_t!==1,applyMultiFilterOperatorChanges:ve,focusElementRef:null,readOnly:!0,logicOperators:L,columnsSort:B},V),ht.id==null?_t:ht.id)),Ze.map((ht,_t)=>Ke.jsx(xke,Mr({item:ht,applyFilterChanges:U,deleteFilter:nt,hasMultipleFilters:Ie,showMultiFilterOperators:Ve.length+_t>0,disableMultiFilterOperator:Ve.length+_t!==1,applyMultiFilterOperatorChanges:ve,focusElementRef:_t===Ze.length-1?d:null,logicOperators:L,columnsSort:B},V),ht.id==null?_t+Ve.length:ht.id))]}),!i.disableMultipleColumnsFiltering&&!(ie&&de)?Ke.jsxs(Cjt,{children:[ie?Ke.jsx("span",{}):Ke.jsx(i.slots.baseButton,Mr({onClick:Je,startIcon:Ke.jsx(i.slots.filterPanelAddIcon,{})},i.slotProps?.baseButton,{children:n.current.getLocaleText("filterPanelAddFilter")})),!de&&Ze.length>0?Ke.jsx(i.slots.baseButton,Mr({onClick:ut,startIcon:Ke.jsx(i.slots.filterPanelRemoveAllIcon,{})},i.slotProps?.baseButton,{children:n.current.getLocaleText("filterPanelRemoveAll")})):null]}):null]}))}),Ujt=(t,e)=>{const r=new Set(Object.keys(t).filter(a=>t[a]===!1)),n=new Set(Object.keys(e).filter(a=>e[a]===!1));if(r.size!==n.size)return!1;let i=!0;return r.forEach(a=>{n.has(a)||(i=!1)}),i},Hjt=(t,e)=>(t.headerName||t.field).toLowerCase().indexOf(e)>-1,jjt=["children"],Vjt=cA({from:{opacity:0},to:{opacity:1}}),qjt=cA({"from, to":{"--scrollable":'" "'}}),Gjt=gp("div",{name:"MuiDataGrid",slot:"ShadowScrollArea"})`
  flex: 1;
  display: flex;
  flex-direction: column;
  animation: ${qjt};
  animation-timeline: --scroll-timeline;
  animation-fill-mode: none;
  box-sizing: border-box;
  overflow: auto;
  scrollbar-width: thin;
  scroll-timeline: --scroll-timeline block;

  &::before,
  &::after {
    content: '';
    flex-shrink: 0;
    display: block;
    position: sticky;
    left: 0;
    width: 100%;
    height: 4px;
    animation: ${Vjt} linear both;
    animation-timeline: --scroll-timeline;

    // Custom property toggle trick:
    // - Detects if the element is scrollable
    // - https://css-tricks.com/the-css-custom-property-toggle-trick/
    --visibility-scrollable: var(--scrollable) visible;
    --visibility-not-scrollable: hidden;
    visibility: var(--visibility-scrollable, var(--visibility-not-scrollable));
  }

  &::before {
    top: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 0, transparent 100%);
    animation-range: 0 4px;
  }

  &::after {
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.05) 0, transparent 100%);
    animation-direction: reverse;
    animation-range: calc(100% - 4px) 100%;
  }
`,$jt=of(function(e,r){const{children:n}=e,i=Ms(e,jjt);return Ke.jsx(Gjt,Mr({},i,{ref:r,children:n}))}),Wjt=t=>{const{classes:e}=t;return Cs({root:["columnsManagement"],header:["columnsManagementHeader"],searchInput:["columnsManagementSearchInput"],footer:["columnsManagementFooter"],row:["columnsManagementRow"]},Fh,e)},wke=new Intl.Collator;function Yjt(t){const e=wd(),r=ze.useRef(null),n=wl(e,V7t),i=wl(e,q3),a=Cu(),[o,s]=ze.useState(""),d=Wjt(a),b=wl(e,J3),L=wl(e,PL),B=wl(e,eye),V=ze.useMemo(()=>L?Array.from(B.values()):b,[L,B,b]),{sort:X,searchPredicate:ie=Hjt,autoFocusSearchField:de=!0,disableShowHideToggle:ae=!1,disableResetButton:U=!1,toggleAllMode:ve="all",getTogglableColumns:Se,searchInputProps:Pe,searchDebounceMs:Me=a.columnFilterDebounceMs}=t,Ie=ze.useMemo(()=>d4(yt=>{s(yt)},Me??150),[Me]),Ve=ze.useMemo(()=>Ujt(i,n),[i,n]),Ze=ze.useMemo(()=>{switch(X){case"asc":return[...V].sort((yt,Vt)=>wke.compare(yt.headerName||yt.field,Vt.headerName||Vt.field));case"desc":return[...V].sort((yt,Vt)=>-wke.compare(yt.headerName||yt.field,Vt.headerName||Vt.field));default:return V}},[V,X]),Je=yt=>{const{name:Vt}=yt.target;e.current.setColumnVisibility(Vt,i[Vt]===!1)},nt=ze.useMemo(()=>{const yt=Se?Se(Ze):null,Vt=yt?Ze.filter(({field:Er})=>yt.includes(Er)):Ze;return o?Vt.filter(Er=>ie(Er,o.toLowerCase())):Vt},[Ze,o,ie,Se]),ut=ze.useCallback(yt=>{const Vt=q3(e),Er=Mr({},Vt),sr=Se?Se(V):null;return(ve==="filteredOnly"?nt:V).forEach(or=>{or.hideable&&(sr==null||sr.includes(or.field))&&(yt?delete Er[or.field]:Er[or.field]=!1)}),e.current.setColumnVisibilityModel(Er)},[e,V,Se,ve,nt]),ht=ze.useCallback(yt=>{Ie(yt.target.value)},[Ie]),_t=ze.useMemo(()=>nt.filter(yt=>yt.hideable),[nt]),Dt=ze.useMemo(()=>_t.every(yt=>i[yt.field]==null||i[yt.field]!==!1),[i,_t]),qt=ze.useMemo(()=>_t.every(yt=>i[yt.field]===!1),[i,_t]),Lt=ze.useRef(null);ze.useEffect(()=>{de?r.current?.focus():Lt.current&&typeof Lt.current.focus=="function"&&Lt.current.focus()},[de]);let dr=!1;const Zt=yt=>dr===!1&&yt.hideable!==!1?(dr=!0,!0):!1,Cr=ze.useCallback(()=>{s(""),r.current&&(r.current.value="",r.current.focus())},[]);return Ke.jsxs(ze.Fragment,{children:[Ke.jsx(Kjt,{className:d.header,ownerState:a,children:Ke.jsx(Jjt,Mr({as:a.slots.baseTextField,ownerState:a,placeholder:e.current.getLocaleText("columnsManagementSearchTitle"),inputRef:r,className:d.searchInput,onChange:ht,size:"small",type:"search",slotProps:{input:{startAdornment:Ke.jsx(a.slots.quickFilterIcon,{fontSize:"small"}),endAdornment:Ke.jsx(a.slots.baseIconButton,Mr({size:"small","aria-label":e.current.getLocaleText("columnsManagementDeleteIconLabel"),style:o?{visibility:"visible"}:{visibility:"hidden"},tabIndex:-1,onClick:Cr,edge:"end"},a.slotProps?.baseIconButton,{children:Ke.jsx(a.slots.quickFilterClearIcon,{fontSize:"small"})}))},htmlInput:{"aria-label":e.current.getLocaleText("columnsManagementSearchTitle")}},autoComplete:"off",fullWidth:!0},a.slotProps?.baseTextField,Pe))}),Ke.jsx(Zjt,{ownerState:a,children:Ke.jsxs(Xjt,{className:d.root,ownerState:a,children:[nt.map(yt=>Ke.jsx(tVt,Mr({as:a.slots.baseCheckbox,className:d.row,disabled:yt.hideable===!1||L,checked:i[yt.field]!==!1,onChange:Je,name:yt.field,inputRef:Zt(yt)?Lt:void 0,label:yt.headerName||yt.field,density:"compact",fullWidth:!0},a.slotProps?.baseCheckbox),yt.field)),nt.length===0&&Ke.jsx(eVt,{ownerState:a,children:e.current.getLocaleText("columnsManagementNoColumns")})]})}),!ae||!U?Ke.jsxs(Qjt,{ownerState:a,className:d.footer,children:[ae?Ke.jsx("span",{}):Ke.jsx(a.slots.baseCheckbox,Mr({disabled:_t.length===0||L,checked:Dt,indeterminate:!Dt&&!qt,onChange:()=>ut(!Dt),name:e.current.getLocaleText("columnsManagementShowHideAllText"),label:e.current.getLocaleText("columnsManagementShowHideAllText"),density:"compact"},a.slotProps?.baseCheckbox)),U?null:Ke.jsx(a.slots.baseButton,Mr({onClick:()=>e.current.setColumnVisibilityModel(n),disabled:Ve||L},a.slotProps?.baseButton,{children:e.current.getLocaleText("columnsManagementReset")}))]}):null]})}const Xjt=fa("div",{name:"MuiDataGrid",slot:"ColumnsManagement"})({display:"flex",flexDirection:"column",padding:Bu.spacing(.5,1.5)}),Zjt=fa($jt,{name:"MuiDataGrid",slot:"ColumnsManagementScrollArea"})({maxHeight:300}),Kjt=fa("div",{name:"MuiDataGrid",slot:"ColumnsManagementHeader"})({padding:Bu.spacing(1.5,2),borderBottom:`1px solid ${Bu.colors.border.base}`}),Jjt=fa(V5,{name:"MuiDataGrid",slot:"ColumnsManagementSearchInput"})({[`& .${B_.input}::-webkit-search-decoration,
      & .${B_.input}::-webkit-search-cancel-button,
      & .${B_.input}::-webkit-search-results-button,
      & .${B_.input}::-webkit-search-results-decoration`]:{display:"none"}}),Qjt=fa("div",{name:"MuiDataGrid",slot:"ColumnsManagementFooter"})({padding:Bu.spacing(1,1,1,1.5),display:"flex",justifyContent:"space-between",borderTop:`1px solid ${Bu.colors.border.base}`}),eVt=fa("div",{name:"MuiDataGrid",slot:"ColumnsManagementEmptyText"})({padding:Bu.spacing(1,0),alignSelf:"center",font:Bu.typography.font.body}),tVt=fa(V5,{name:"MuiDataGrid",slot:"ColumnsManagementRow"})({}),rVt=of(function(e,r){const{children:n,slotProps:i={}}=e,a=i.button||{},o=i.tooltip||{},s=wd(),d=Cu(),b=Vd(),L=Vd(),[B,V]=ze.useState(!1),X=ze.useRef(null),ie=id(r,X),de=U=>{V(ve=>!ve),a.onClick?.(U)},ae=()=>V(!1);return n==null?null:Ke.jsxs(ze.Fragment,{children:[Ke.jsx(d.slots.baseTooltip,Mr({title:s.current.getLocaleText("toolbarExportLabel"),enterDelay:1e3},d.slotProps?.baseTooltip,o,{children:Ke.jsx(d.slots.baseButton,Mr({size:"small",startIcon:Ke.jsx(d.slots.exportIcon,{}),"aria-expanded":B,"aria-label":s.current.getLocaleText("toolbarExportLabel"),"aria-haspopup":"menu","aria-controls":B?L:void 0,id:b},d.slotProps?.baseButton,a,{onClick:de,ref:ie,children:s.current.getLocaleText("toolbarExport")}))})),Ke.jsx(CX,{open:B,target:X.current,onClose:ae,position:"bottom-end",children:Ke.jsx(d.slots.baseMenuList,{id:L,className:Bi.menuList,"aria-labelledby":b,autoFocusItem:B,children:ze.Children.map(n,U=>ze.isValidElement(U)?ze.cloneElement(U,{hideMenu:ae}):U)})})]})}),nVt=["hideMenu","options"],iVt=["hideMenu","options"],aVt=["csvOptions","printOptions","excelOptions"];function oVt(t){const e=wd(),r=Cu(),{hideMenu:n,options:i}=t,a=Ms(t,nVt);return Ke.jsx(r.slots.baseMenuItem,Mr({onClick:()=>{e.current.exportDataAsCsv(i),n?.()}},a,{children:e.current.getLocaleText("toolbarExportCSV")}))}function sVt(t){const e=wd(),r=Cu(),{hideMenu:n,options:i}=t,a=Ms(t,iVt);return Ke.jsx(r.slots.baseMenuItem,Mr({onClick:()=>{e.current.exportDataAsPrint(i),n?.()}},a,{children:e.current.getLocaleText("toolbarExportPrint")}))}of(function(e,r){const n=e,{csvOptions:i={},printOptions:a={},excelOptions:o}=n,s=Ms(n,aVt),b=wd().current.unstable_applyPipeProcessors("exportMenu",[],{excelOptions:o,csvOptions:i,printOptions:a}).sort((L,B)=>L.componentName>B.componentName?1:-1);return b.length===0?null:Ke.jsx(rVt,Mr({},s,{ref:r,children:b.map((L,B)=>ze.cloneElement(L.component,{key:B}))}))});const kGe=ze.createContext(void 0);function aye(){const t=ze.useContext(kGe);if(t===void 0)throw new Error("MUI X: Missing context. Quick Filter subcomponents must be placed within a <QuickFilter /> component.");return t}const lVt=["render","className","parser","formatter","debounceMs","defaultExpanded","expanded","onExpandedChange"],uVt=t=>t.split(" ").filter(e=>e!==""),cVt=t=>t.join(" ");function fVt(t){const e=Cu(),{render:r,className:n,parser:i=uVt,formatter:a=cVt,debounceMs:o=e.filterDebounceMs,defaultExpanded:s,expanded:d,onExpandedChange:b}=t,L=Ms(t,lVt),B=wd(),V=ze.useRef(null),X=ze.useRef(null),ie=wl(B,Uqe),[de,ae]=ze.useState(a(ie??[])),[U,ve]=ze.useState(s??de.length>0),Se=d??U,Pe=ze.useMemo(()=>({value:de,expanded:Se}),[de,Se]),Me=typeof n=="function"?n(Pe):n,Ie=ze.useRef(null),Ve=Vd(),Ze=ze.useCallback(dr=>{b&&b(dr),d===void 0&&ve(dr)},[b,d]),Je=ze.useRef(ie);ze.useEffect(()=>{Q3(Je.current,ie)||(Je.current=ie,ae(dr=>Q3(i(dr),ie)?dr:a(ie??[])))},[ie,a,i]);const nt=ze.useRef(!0),ut=ze.useRef(Se);ze.useEffect(()=>{if(nt.current){nt.current=!1;return}ut.current!==Se&&(Se?requestAnimationFrame(()=>{V.current?.focus({preventScroll:!0})}):X.current?.focus({preventScroll:!0}),ut.current=Se)},[Se]);const ht=ze.useMemo(()=>d4(dr=>{const Zt=i(dr);Je.current=Zt,B.current.setQuickFilterValues(Zt)},o),[B,o,i]);ze.useEffect(()=>ht.clear,[ht]);const _t=ze.useCallback(dr=>{const Zt=dr.target.value;ae(Zt),ht(Zt)},[ht]),Dt=ze.useCallback(()=>{ae(""),B.current.setQuickFilterValues([]),V.current?.focus()},[B,V]),qt=ze.useMemo(()=>({controlRef:V,triggerRef:X,state:Pe,controlId:Ve,clearValue:Dt,onValueChange:_t,onExpandedChange:Ze}),[Ve,Pe,_t,Dt,Ze]);Ah(()=>{Ie.current&&X.current&&Ie.current.style.setProperty("--trigger-width",`${X.current?.offsetWidth}px`)},[]);const Lt=q5("div",r,Mr({className:Me},L,{ref:Ie}),Pe);return Ke.jsx(kGe.Provider,{value:qt,children:Lt})}const dVt=["render","className","slotProps","onKeyDown","onChange"],hVt=of(function(e,r){const{render:n,className:i,slotProps:a,onKeyDown:o,onChange:s}=e,d=Ms(e,dVt),b=Cu(),{state:L,controlId:B,controlRef:V,onValueChange:X,onExpandedChange:ie,clearValue:de}=aye(),ae=typeof i=="function"?i(L):i,U=id(V,r),ve=Ie=>{Ie.key==="Escape"&&(L.value===""?ie(!1):de()),o?.(Ie)},Se=Ie=>{L.value===""&&ie(!1),a?.htmlInput?.onBlur?.(Ie)},Pe=Ie=>{L.expanded||ie(!0),X(Ie),s?.(Ie)},Me=q5(b.slots.baseTextField,n,Mr({},b.slotProps?.baseTextField,{slotProps:Mr({htmlInput:Mr({role:"searchbox",id:B,tabIndex:L.expanded?void 0:-1},a?.htmlInput,{onBlur:Se})},a),value:L.value,className:ae},d,{onChange:Pe,onKeyDown:ve,ref:U}),L);return Ke.jsx(ze.Fragment,{children:Me})}),pVt=["render","className","onClick"],vVt=of(function(e,r){const{render:n,className:i,onClick:a}=e,o=Ms(e,pVt),s=Cu(),{state:d,clearValue:b}=aye(),L=typeof i=="function"?i(d):i,B=X=>{b(),a?.(X)},V=q5(s.slots.baseIconButton,n,Mr({},s.slotProps?.baseIconButton,{className:L,tabIndex:-1},o,{onClick:B,ref:r}),d);return Ke.jsx(ze.Fragment,{children:V})}),mVt=["render","className","onClick"],gVt=of(function(e,r){const{render:n,className:i,onClick:a}=e,o=Ms(e,mVt),s=Cu(),{state:d,controlId:b,onExpandedChange:L,triggerRef:B}=aye(),V=typeof i=="function"?i(d):i,X=id(B,r),ie=ae=>{L(!d.expanded),a?.(ae)},de=q5(s.slots.baseButton,n,Mr({},s.slotProps?.baseButton,{className:V,"aria-controls":b,"aria-expanded":d.expanded},o,{onClick:ie,ref:X}),d);return Ke.jsx(ze.Fragment,{children:de})}),yVt=["quickFilterParser","quickFilterFormatter","debounceMs","className","slotProps"],bVt=["ref","slotProps"],xVt=t=>{const{classes:e}=t;return Cs({root:["toolbarQuickFilter"],trigger:["toolbarQuickFilterTrigger"],control:["toolbarQuickFilterControl"]},Fh,e)},_Vt=gp("div",{name:"MuiDataGrid",slot:"ToolbarQuickFilter"})({display:"grid",alignItems:"center"}),wVt=gp(kG,{name:"MuiDataGrid",slot:"ToolbarQuickFilterTrigger"})(({ownerState:t})=>({gridArea:"1 / 1",width:"min-content",height:"min-content",zIndex:1,opacity:t.expanded?0:1,pointerEvents:t.expanded?"none":"auto",transition:Bu.transition(["opacity"])})),SVt=gp(t=>{throw new Error("Failed assertion: should not be rendered")},{name:"MuiDataGrid",slot:"ToolbarQuickFilterControl"})(({ownerState:t})=>({gridArea:"1 / 1",overflowX:"clip",width:t.expanded?260:"var(--trigger-width)",opacity:t.expanded?1:0,transition:Bu.transition(["width","opacity"])}));function TVt(t){const e=wd(),r=Cu(),n={classes:r.classes,expanded:!1},i=xVt(n),{quickFilterParser:a,quickFilterFormatter:o,debounceMs:s,className:d,slotProps:b}=t,L=Ms(t,yVt);return Ke.jsx(fVt,{parser:a,formatter:o,debounceMs:s,render:(B,V)=>{const X=Mr({},n,{expanded:V.expanded});return Ke.jsxs(_Vt,Mr({},B,{className:Vo(i.root,d),children:[Ke.jsx(gVt,{render:ie=>Ke.jsx(r.slots.baseTooltip,{title:e.current.getLocaleText("toolbarQuickFilterLabel"),enterDelay:0,children:Ke.jsx(wVt,Mr({className:i.trigger},ie,{ownerState:X,color:"default","aria-disabled":V.expanded,children:Ke.jsx(r.slots.quickFilterIcon,{fontSize:"small"})}))})}),Ke.jsx(hVt,{render:ie=>{let{ref:de,slotProps:ae}=ie,U=Ms(ie,bVt);return Ke.jsx(SVt,Mr({as:r.slots.baseTextField,className:i.control,ownerState:X,inputRef:de,"aria-label":e.current.getLocaleText("toolbarQuickFilterLabel"),placeholder:e.current.getLocaleText("toolbarQuickFilterPlaceholder"),size:"small",slotProps:Mr({input:Mr({startAdornment:Ke.jsx(r.slots.quickFilterIcon,{fontSize:"small"}),endAdornment:U.value?Ke.jsx(vVt,{render:Ke.jsx(r.slots.baseIconButton,{size:"small",edge:"end","aria-label":e.current.getLocaleText("toolbarQuickFilterDeleteIconLabel"),children:Ke.jsx(r.slots.quickFilterClearIcon,{fontSize:"small"})})}):null},ae?.input)},ae)},r.slotProps?.baseTextField,U,b?.root,L))}})]}))}})}const EVt=["render","className","onClick","onPointerUp"],AVt=of(function(e,r){const{render:n,className:i,onClick:a,onPointerUp:o}=e,s=Ms(e,EVt),d=Cu(),b=Vd(),L=Vd(),B=wd(),V=wl(B,DL),X=V.open&&V.openedPanelValue===H2.filters,de=wl(B,X0e).length,ae={open:X,filterCount:de},U=typeof i=="function"?i(ae):i,{filterPanelTriggerRef:ve}=nye(),Se=id(r,ve),Pe=Ve=>{X?B.current.hidePreferences():B.current.showPreferences(H2.filters,L,b),a?.(Ve)},Me=Ve=>{X&&Ve.stopPropagation(),o?.(Ve)},Ie=q5(d.slots.baseButton,n,Mr({},d.slotProps?.baseButton,{id:b,"aria-haspopup":"true","aria-expanded":X?"true":void 0,"aria-controls":X?L:void 0,onClick:Pe,onPointerUp:Me,className:U},s,{ref:Se}),ae);return Ke.jsx(ze.Fragment,{children:Ie})}),CVt=["render","className","onClick","onPointerUp"],MVt=of(function(e,r){const{render:n,className:i,onClick:a,onPointerUp:o}=e,s=Ms(e,CVt),d=Cu(),b=Vd(),L=Vd(),B=wd(),V=wl(B,DL),X=V.open&&V.openedPanelValue===H2.columns,ie={open:X},de=typeof i=="function"?i(ie):i,{columnsPanelTriggerRef:ae}=nye(),U=id(r,ae),ve=Me=>{X?B.current.hidePreferences():B.current.showPreferences(H2.columns,L,b),a?.(Me)},Se=Me=>{X&&Me.stopPropagation(),o?.(Me)},Pe=q5(d.slots.baseButton,n,Mr({},d.slotProps?.baseButton,{id:b,"aria-haspopup":"true","aria-expanded":X?"true":void 0,"aria-controls":X?L:void 0,className:de},s,{onPointerUp:Se,onClick:ve,ref:U}),ie);return Ke.jsx(ze.Fragment,{children:Pe})}),RVt=["render","options","onClick"],kVt=of(function(e,r){const{render:n,options:i,onClick:a}=e,o=Ms(e,RVt),s=Cu(),d=wd(),b=B=>{d.current.exportDataAsCsv(i),a?.(B)},L=q5(s.slots.baseButton,n,Mr({},s.slotProps?.baseButton,{onClick:b},o,{ref:r}));return Ke.jsx(ze.Fragment,{children:L})}),IVt=["render","options","onClick"],PVt=of(function(e,r){const{render:n,options:i,onClick:a}=e,o=Ms(e,IVt),s=Cu(),d=wd(),b=B=>{d.current.exportDataAsPrint(i),a?.(B)},L=q5(s.slots.baseButton,n,Mr({},s.slotProps?.baseButton,{onClick:b},o,{ref:r}));return Ke.jsx(ze.Fragment,{children:L})}),DVt=["className"],LVt=["className"],OVt=["showQuickFilter","quickFilterProps","csvOptions","printOptions","additionalItems","additionalExportMenuItems"],IGe=t=>{const{classes:e}=t;return Cs({divider:["toolbarDivider"],label:["toolbarLabel"]},Fh,e)},NVt=gp(V5,{name:"MuiDataGrid",slot:"ToolbarDivider"})({height:"50%",margin:Bu.spacing(0,.5)}),FVt=gp("span",{name:"MuiDataGrid",slot:"ToolbarLabel"})({flex:1,font:Bu.typography.font.large,fontWeight:Bu.typography.fontWeight.medium,margin:Bu.spacing(0,.5),textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"});function Ske(t){const e=Ms(t,DVt),r=Cu(),n=IGe(r);return Ke.jsx(NVt,Mr({as:r.slots.baseDivider,orientation:"vertical",className:n.divider},e))}function zVt(t){const e=Ms(t,LVt),r=Cu(),n=IGe(r);return Ke.jsx(FVt,Mr({className:n.label},e))}function BVt(t){const{showQuickFilter:e=!0,quickFilterProps:r,csvOptions:n,printOptions:i,additionalItems:a,additionalExportMenuItems:o}=t,s=Ms(t,OVt),d=wd(),b=Cu(),[L,B]=ze.useState(!1),V=ze.useRef(null),X=Vd(),ie=Vd(),de=!n?.disableToolbarButton||!i?.disableToolbarButton||o,ae=()=>B(!1);return Ke.jsxs(iHt,Mr({},s,{children:[b.label&&Ke.jsx(zVt,{children:b.label}),!b.disableColumnSelector&&Ke.jsx(b.slots.baseTooltip,{title:d.current.getLocaleText("toolbarColumns"),children:Ke.jsx(MVt,{render:Ke.jsx(kG,{}),children:Ke.jsx(b.slots.columnSelectorIcon,{fontSize:"small"})})}),!b.disableColumnFilter&&Ke.jsx(b.slots.baseTooltip,{title:d.current.getLocaleText("toolbarFilters"),children:Ke.jsx(AVt,{render:(U,ve)=>Ke.jsx(kG,Mr({},U,{color:ve.filterCount>0?"primary":"default",children:Ke.jsx(b.slots.baseBadge,{badgeContent:ve.filterCount,color:"primary",variant:"dot",children:Ke.jsx(b.slots.openFilterButtonIcon,{fontSize:"small"})})}))})}),a,de&&(!b.disableColumnFilter||!b.disableColumnSelector)&&Ke.jsx(Ske,{}),de&&Ke.jsxs(ze.Fragment,{children:[Ke.jsx(b.slots.baseTooltip,{title:d.current.getLocaleText("toolbarExport"),disableInteractive:L,children:Ke.jsx(kG,{ref:V,id:ie,"aria-controls":X,"aria-haspopup":"true","aria-expanded":L?"true":void 0,onClick:()=>B(!L),children:Ke.jsx(b.slots.exportIcon,{fontSize:"small"})})}),Ke.jsx(CX,{target:V.current,open:L,onClose:ae,position:"bottom-end",children:Ke.jsxs(b.slots.baseMenuList,Mr({id:X,"aria-labelledby":ie,autoFocusItem:!0},b.slotProps?.baseMenuList,{children:[!i?.disableToolbarButton&&Ke.jsx(PVt,{render:Ke.jsx(b.slots.baseMenuItem,Mr({},b.slotProps?.baseMenuItem)),options:i,onClick:ae,children:d.current.getLocaleText("toolbarExportPrint")}),!n?.disableToolbarButton&&Ke.jsx(kVt,{render:Ke.jsx(b.slots.baseMenuItem,Mr({},b.slotProps?.baseMenuItem)),options:n,onClick:ae,children:d.current.getLocaleText("toolbarExportCSV")}),o?.(ae)]}))})]}),e&&Ke.jsxs(ze.Fragment,{children:[Ke.jsx(Ske,{}),Ke.jsx(TVt,Mr({},r))]})]}))}const UVt=["className","selectedRowCount"],HVt=t=>{const{classes:e}=t;return Cs({root:["selectedRowCount"]},Fh,e)},jVt=gp("div",{name:"MuiDataGrid",slot:"SelectedRowCount"})({alignItems:"center",display:"flex",margin:Bu.spacing(0,2),visibility:"hidden",width:0,height:0,[Bu.breakpoints.up("sm")]:{visibility:"visible",width:"auto",height:"auto"}}),VVt=of(function(e,r){const{className:n,selectedRowCount:i}=e,a=Ms(e,UVt),o=wd(),s=Cu(),d=HVt(s),b=o.current.getLocaleText("footerRowSelected")(i);return Ke.jsx(jVt,Mr({className:Vo(d.root,n),ownerState:s},a,{ref:r,children:b}))}),qVt=of(function(e,r){const n=wd(),i=Cu(),a=wl(n,r7t),o=wl(n,IX),s=wl(n,Y0e),d=!i.hideFooterSelectedRowCount&&o>0?Ke.jsx(VVt,{selectedRowCount:o}):Ke.jsx("div",{}),b=!i.hideFooterRowCount&&!i.pagination?Ke.jsx(i.slots.footerRowCount,Mr({},i.slotProps?.footerRowCount,{rowCount:a,visibleRowCount:s})):null,L=i.pagination&&!i.hideFooterPagination&&i.slots.pagination&&Ke.jsx(i.slots.pagination,Mr({},i.slotProps?.pagination));return Ke.jsxs(YUt,Mr({},e,{ref:r,children:[d,b,L]}))}),t9=(t,e,r,n,i,a)=>{let o;switch(t){case Nh.LEFT:o=n[r];break;case Nh.RIGHT:o=i-n[r]-e+a;break;default:o=void 0;break}return Number.isNaN(o)&&(o=void 0),o},D$=(t,e,r,n,i,a)=>{const o=e===r-1;return a?.startsWith("border")&&t===Nh.LEFT&&o?!0:n?t===Nh.LEFT?!0:t===Nh.RIGHT?!o:!o||i:!1},L$=(t,e,r,n)=>n?.startsWith("border")?t===Nh.RIGHT&&e===0:r&&t===Nh.RIGHT&&e===0,GVt=["skeletonRowsCount","visibleColumns","showFirstRowBorder"],$Vt=gp("div",{name:"MuiDataGrid",slot:"SkeletonLoadingOverlay"})({minWidth:"100%",width:"max-content",height:"100%",overflow:"clip"}),WVt=t=>{const{classes:e}=t;return Cs({root:["skeletonLoadingOverlay"]},Fh,e)},Tke=t=>parseInt(t.getAttribute("data-colindex"),10),YVt=of(function(e,r){const n=Cu(),{slots:i}=n,a=Kv(),o=WVt({classes:n.classes}),s=ze.useRef(null),d=id(s,r),b=wd(),L=wl(b,p0),B=wl(b,O0e),V=wl(b,QL),X=ze.useMemo(()=>V.filter(Ze=>Ze<=B).length,[B,V]),{skeletonRowsCount:ie,visibleColumns:de,showFirstRowBorder:ae}=e,U=Ms(e,GVt),ve=wl(b,uy),Se=ze.useMemo(()=>ve.slice(0,X),[ve,X]),Pe=wl(b,EX),Me=ze.useCallback(Ze=>{if(Pe.left.findIndex(Je=>Je.field===Ze)!==-1)return Nh.LEFT;if(Pe.right.findIndex(Je=>Je.field===Ze)!==-1)return Nh.RIGHT},[Pe.left,Pe.right]),Ie=ze.useMemo(()=>{const Ze=[];for(let Je=0;Je<ie;Je+=1){const nt=[];for(let ut=0;ut<Se.length;ut+=1){const ht=Se[ut],_t=Me(ht.field),Dt=_t===Nh.LEFT,qt=_t===Nh.RIGHT,Lt=bGe(_t,a),dr=Lt?Pe[Lt].length:Se.length-Pe.left.length-Pe.right.length,Zt=Lt?Pe[Lt].findIndex(Vn=>Vn.field===ht.field):ut-Pe.left.length,Cr=L.hasScrollY?L.scrollbarSize:0,yt=NX({},a,_t,t9(_t,ht.computedWidth,ut,V,L.columnsTotalWidth,Cr)),Vt=L.columnsTotalWidth<L.viewportOuterSize.width,Er=D$(_t,Zt,dr,n.showCellVerticalBorder,Vt,n.pinnedColumnsSectionSeparator),sr=L$(_t,Zt,n.showCellVerticalBorder,n.pinnedColumnsSectionSeparator),or=ut===Se.length-1,Ar=qt&&Zt===0,Ir=Ar&&Vt,_n=or&&!Ar&&Vt,Un=L.viewportOuterSize.width-L.columnsTotalWidth,Qn=Math.max(0,Un),Jn=Ke.jsx(i.skeletonCell,{width:Qn,empty:!0},`skeleton-filler-column-${Je}`);Ir&&nt.push(Jn),nt.push(Ke.jsx(i.skeletonCell,{field:ht.field,type:ht.type,align:ht.align,width:"var(--width)",height:L.rowHeight,"data-colindex":ut,empty:de&&!de.has(ht.field),className:Vo(Dt&&Bi["cell--pinnedLeft"],qt&&Bi["cell--pinnedRight"],Er&&Bi["cell--withRightBorder"],sr&&Bi["cell--withLeftBorder"]),style:Mr({"--width":`${ht.computedWidth}px`},yt)},`skeleton-column-${Je}-${ht.field}`)),_n&&nt.push(Jn)}Ze.push(Ke.jsx("div",{className:Vo(Bi.row,Bi.rowSkeleton,Je===0&&!ae&&Bi["row--firstVisible"]),children:nt},`skeleton-row-${Je}`))}return Ze},[ie,Se,Me,a,Pe,L.hasScrollY,L.scrollbarSize,L.columnsTotalWidth,L.viewportOuterSize.width,L.rowHeight,V,n.showCellVerticalBorder,n.pinnedColumnsSectionSeparator,i,de,ae]);return sc(b,"columnResize",Ze=>{const{colDef:Je,width:nt}=Ze,ut=s.current?.querySelectorAll(`[data-field="${Gk(Je.field)}"]`);if(!ut)throw new Error("MUI X: Expected skeleton cells to be defined with `data-field` attribute.");const ht=Se.findIndex(Zt=>Zt.field===Je.field),_t=Me(Je.field),Dt=_t===Nh.LEFT,qt=_t===Nh.RIGHT,Lt=getComputedStyle(ut[0]).getPropertyValue("--width"),dr=parseInt(Lt,10)-nt;ut&&ut.forEach(Zt=>{Zt.style.setProperty("--width",`${nt}px`)}),Dt&&s.current?.querySelectorAll(`.${Bi["cell--pinnedLeft"]}`)?.forEach(Cr=>{Tke(Cr)>ht&&(Cr.style.left=`${parseInt(getComputedStyle(Cr).left,10)-dr}px`)}),qt&&s.current?.querySelectorAll(`.${Bi["cell--pinnedRight"]}`)?.forEach(Cr=>{Tke(Cr)<ht&&(Cr.style.right=`${parseInt(getComputedStyle(Cr).right,10)+dr}px`)})}),Ke.jsx($Vt,Mr({className:o.root},U,{ref:d,children:Ie}))}),XVt=of(function(e,r){const n=wd(),i=wl(n,p0),a=i?.viewportInnerSize.height??0,o=Math.ceil(a/i.rowHeight);return Ke.jsx(YVt,Mr({},e,{skeletonRowsCount:o,ref:r}))}),ZVt=["variant","noRowsVariant","style"],KVt={"circular-progress":{component:t=>t.slots.baseCircularProgress,style:{}},"linear-progress":{component:t=>t.slots.baseLinearProgress,style:{display:"block"}},skeleton:{component:()=>XVt,style:{display:"block"}}},JVt=of(function(e,r){const{variant:n="linear-progress",noRowsVariant:i="skeleton",style:a}=e,o=Ms(e,ZVt),s=wd(),d=Cu(),b=wl(s,oF),L=KVt[b===0?i:n],B=L.component(d);return Ke.jsx(FX,Mr({style:Mr({},L.style,a)},o,{ref:r,children:Ke.jsx(B,{})}))}),QVt=of(function(e,r){const i=wd().current.getLocaleText("noRowsLabel");return Ke.jsx(FX,Mr({},e,{ref:r,children:i}))}),eqt=of(function(e,r){const n=Cu(),i=wd(),a=wl(i,L5),o=()=>{i.current.showPreferences(H2.columns)},s=!n.disableColumnSelector&&a.length>0;return Ke.jsxs(FX,Mr({},e,{ref:r,children:[i.current.getLocaleText("noColumnsOverlayLabel"),s&&Ke.jsx(n.slots.baseButton,Mr({size:"small"},n.slotProps?.baseButton,{onClick:o,children:i.current.getLocaleText("noColumnsOverlayManageColumns")}))]}))}),tqt=fa(V5)({maxHeight:"calc(100% + 1px)",flexGrow:1});function rqt(){const t=wd(),e=Cu(),r=wl(t,Yx),n=wl(t,TN),i=wl(t,Jqe),{paginationMode:a,loading:o}=e,s=n===-1&&a==="server"&&o,d=ze.useMemo(()=>Math.max(0,i-1),[i]),b=ze.useMemo(()=>n===-1||r.page<=d?r.page:d,[d,r.page,n]),L=ze.useCallback(ie=>{t.current.setPageSize(ie)},[t]),B=ze.useCallback((ie,de)=>{t.current.setPage(de)},[t]),X=(ie=>{for(let de=0;de<e.pageSizeOptions.length;de+=1){const ae=e.pageSizeOptions[de];if(typeof ae=="number"){if(ae===ie)return!0}else if(ae.value===ie)return!0}return!1})(r.pageSize)?e.pageSizeOptions:[];return Ke.jsx(tqt,Mr({as:e.slots.basePagination,count:n,page:b,rowsPerPageOptions:X,rowsPerPage:r.pageSize,onPageChange:B,onRowsPerPageChange:L,disabled:s},e.slotProps?.basePagination))}const nqt=["className","rowCount","visibleRowCount"],iqt=t=>{const{classes:e}=t;return Cs({root:["rowCount"]},Fh,e)},aqt=gp("div",{name:"MuiDataGrid",slot:"RowCount"})({alignItems:"center",display:"flex",margin:Bu.spacing(0,2)}),oqt=of(function(e,r){const{className:n,rowCount:i,visibleRowCount:a}=e,o=Ms(e,nqt),s=wd(),d=Cu(),b=iqt(d);if(i===0)return null;const L=a<i?s.current.getLocaleText("footerTotalVisibleRows")(a,i):i.toLocaleString();return Ke.jsxs(aqt,Mr({className:Vo(b.root,n),ownerState:d},o,{ref:r,children:[s.current.getLocaleText("footerTotalRows")," ",L]}))});function sqt(t,e){return Cs(e,Fh,t)}const jN=(t,e)=>sU(t),PGe=(t,e)=>wl(t,sU),lqt=e0(t=>t.rowReorder),uqt=pc(lqt,t=>t?.isActive??!1),cqt=["selected","rowId","row","index","style","rowHeight","className","visibleColumns","pinnedColumns","offsetLeft","columnsTotalWidth","firstColumnIndex","lastColumnIndex","focusedColumnIndex","isFirstVisible","isLastVisible","isNotVisible","showBottomBorder","scrollbarWidth","gridHasFiller","onClick","onDoubleClick","onMouseEnter","onMouseLeave","onMouseOut","onMouseOver"],fqt=pc(ux,(t,{rowReordering:e,treeData:r})=>!e||r?!1:!!RX(t)),dqt=of(function(e,r){const{selected:n,rowId:i,row:a,index:o,style:s,rowHeight:d,className:b,visibleColumns:L,pinnedColumns:B,offsetLeft:V,columnsTotalWidth:X,firstColumnIndex:ie,lastColumnIndex:de,focusedColumnIndex:ae,isFirstVisible:U,isLastVisible:ve,isNotVisible:Se,showBottomBorder:Pe,scrollbarWidth:Me,gridHasFiller:Ie,onClick:Ve,onDoubleClick:Ze,onMouseEnter:Je,onMouseLeave:nt,onMouseOut:ut,onMouseOver:ht}=e,_t=Ms(e,cqt),Dt=tT(),qt=AX(),Lt=ze.useRef(null),dr=Cu(),Zt=PGe(Dt),Cr=wl(Dt,P3),yt=wl(Dt,QL),Vt=dr.rowReordering,Er=dr.treeData,sr=wl(Dt,fqt,{rowReordering:Vt,treeData:Er}),or=wl(Dt,uqt),Ar=id(Lt,r),Ir=D5(Dt,i),_n=wl(Dt,hGe,{rowId:i,editMode:dr.editMode}),Un=dr.editMode===B5.Row,Qn=ae!==void 0,Jn=Qn&&ae>=B.left.length&&ae<ie,Vn=Qn&&ae<L.length-B.right.length&&ae>=de,jn=sqt(dr.classes,{root:["row",n&&"selected",Un&&"row--editable",_n&&"row--editing",U&&"row--firstVisible",ve&&"row--lastVisible",Pe&&"row--borderBottom",d==="auto"&&"row--dynamicHeight"]}),Lr=qt.hooks.useGridRowAriaAttributes();ze.useLayoutEffect(()=>{if(Zt.range){const sa=Dt.current.getRowIndexRelativeToVisibleRows(i);sa!==void 0&&Dt.current.unstable_setLastMeasuredRowIndex(sa)}if(Lt.current&&d==="auto")return Dt.current.observeRowHeight(Lt.current,i)},[Dt,Zt.range,d,i]);const Yn=ze.useCallback((sa,xa)=>Qa=>{cU(Qa)||Dt.current.getRow(i)&&(Dt.current.publishEvent(sa,Dt.current.getRowParams(i),Qa),xa&&xa(Qa))},[Dt,i]),On=ze.useCallback(sa=>{const Qa=P$(sa.target,Bi.cell)?.getAttribute("data-field");Qa&&(Qa===cF.field||Qa===q0e||Qa==="__reorder__"||Dt.current.getCellMode(i,Qa)===$v.Edit||Dt.current.getColumn(Qa)?.type===MX)||Yn("rowClick",Ve)(sa)},[Dt,Ve,Yn,i]),{slots:Sn,slotProps:bn,disableColumnReorder:Mn}=dr,gi=wl(Dt,()=>Mr({},Dt.current.getRowHeightEntry(i)),void 0,mqe),Oi=ze.useMemo(()=>{if(Se)return{opacity:0,width:0,height:0};const sa=Mr({},s,{maxHeight:d==="auto"?"none":d,minHeight:d,"--height":typeof d=="number"?`${d}px`:d});if(gi.spacingTop){const xa=dr.rowSpacingType==="border"?"borderTopWidth":"marginTop";sa[xa]=gi.spacingTop}if(gi.spacingBottom){const xa=dr.rowSpacingType==="border"?"borderBottomWidth":"marginBottom";let Qa=sa[xa];typeof Qa!="number"&&(Qa=parseInt(Qa||"0",10)),Qa+=gi.spacingBottom,sa[xa]=Qa}return sa},[Se,d,s,gi,dr.rowSpacingType]);if(!Ir)return null;const Pa=Dt.current.unstable_applyPipeProcessors("rowClassName",[],i),va=Lr(Ir,o);if(typeof dr.getRowClassName=="function"){const sa=o-(Zt.range?.firstRowIndex||0),xa=Mr({},Dt.current.getRowParams(i),{isFirstVisible:sa===0,isLastVisible:sa===Zt.rows.length-1,indexRelativeToCurrentPage:sa});Pa.push(dr.getRowClassName(xa))}const ti=(sa,xa,Qa,is,go=Nh.NONE)=>{const Co=Dt.current.unstable_getCellColSpanInfo(i,Qa);if(Co?.spannedByColSpan)return null;const Ko=Co?.cellProps.width??sa.computedWidth,Zi=Co?.cellProps.colSpan??1,za=t9(go,sa.computedWidth,Qa,yt,X,Me);if(Ir.type==="skeletonRow")return Ke.jsx(Sn.skeletonCell,{type:sa.type,width:Ko,height:d,field:sa.field,align:sa.align},sa.field);const Ss=sa.field==="__reorder__",ba=!(Mn||sa.disableReorder),po=sr&&!Cr.length,Ys=!(ba||Ss&&po||or),$s=go===Nh.VIRTUAL,Gs=L$(go,xa,dr.showCellVerticalBorder,dr.pinnedColumnsSectionSeparator),Ns=D$(go,xa,is,dr.showCellVerticalBorder,Ie,dr.pinnedColumnsSectionSeparator);return Ke.jsx(Sn.cell,Mr({column:sa,width:Ko,rowId:i,align:sa.align||"left",colIndex:Qa,colSpan:Zi,disableDragEvents:Ys,isNotVisible:$s,pinnedOffset:za,pinnedPosition:go,showLeftBorder:Gs,showRightBorder:Ns,row:a,rowNode:Ir},bn?.cell),sa.field)},Tn=B.left.map((sa,xa)=>ti(sa,xa,xa,B.left.length,Nh.LEFT)),bi=B.right.map((sa,xa)=>{const Qa=L.length-B.right.length+xa;return ti(sa,xa,Qa,B.right.length,Nh.RIGHT)}),Wn=L.length-B.left.length-B.right.length,Ei=[];Jn&&Ei.push(ti(L[ae],ae-B.left.length,ae,Wn,Nh.VIRTUAL));for(let sa=ie;sa<de;sa+=1){const xa=L[sa],Qa=sa-B.left.length;xa&&Ei.push(ti(xa,Qa,sa,Wn))}Vn&&Ei.push(ti(L[ae],ae-B.left.length,ae,Wn,Nh.VIRTUAL));const Ki=a?{onClick:On,onDoubleClick:Yn("rowDoubleClick",Ze),onMouseEnter:Yn("rowMouseEnter",Je),onMouseLeave:Yn("rowMouseLeave",nt),onMouseOut:Yn("rowMouseOut",ut),onMouseOver:Yn("rowMouseOver",ht)}:null;return Ke.jsxs("div",Mr({"data-id":i,"data-rowindex":o,role:"row",className:Vo(...Pa,jn.root,b),style:Oi},va,Ki,_t,{ref:Ar,children:[Tn,Ke.jsx("div",{role:"presentation",className:Bi.cellOffsetLeft,style:{width:V}}),Ei,Ke.jsx("div",{role:"presentation",className:Vo(Bi.cell,Bi.cellEmpty)}),bi]}))}),hqt=Vk(dqt),pqt=()=>{const t=tT(),e=Cu(),r=wl(t,uy),n=wl(t,W0e),i=wl(t,lU),a=wl(t,lqe),o=e["aria-label"],s=e["aria-labelledby"];return{role:"grid","aria-label":!o&&!s&&e.label?e.label:o,"aria-labelledby":s,"aria-colcount":r.length,"aria-rowcount":i+1+a+n,"aria-multiselectable":Z0e(e)}},vqt=()=>{const t=tT(),e=wl(t,lU);return ze.useCallback((r,n)=>{const i={},a=n+e+2;return i["aria-rowindex"]=a,r&&t.current.isRowSelectable(r.id)&&(i["aria-selected"]=t.current.isRowSelected(r.id)),i},[t,e])},mqt=t=>({setRowIndex:ze.useCallback((r,n)=>{const i=D5(t,r);if(!i)throw new Error(`MUI X: No row with id #${r} found.`);if(i.parent!==jy)throw new Error("MUI X: The row reordering do not support reordering of grouped rows yet.");if(i.type!=="leaf")throw new Error("MUI X: The row reordering do not support reordering of footer or grouping rows.");t.current.setState(a=>{const o=Sb(t)[jy],s=o.children,d=s.findIndex(L=>L===r);if(d===-1||d===n)return a;const b=[...s];return b.splice(n,0,b.splice(d,1)[0]),Mr({},a,{rows:Mr({},a.rows,{tree:Mr({},a.rows.tree,{[jy]:Mr({},o,{children:b})})})})}),t.current.publishEvent("rowsSet")},[t])}),gqt=t=>{const e=ze.useCallback((i,a)=>{const o=t.current.getColumn(a),s=t.current.getRow(i);if(!s)throw new Error(`No row with id #${i} found`);return!o||!o.valueGetter?s[a]:o.valueGetter(s[o.field],s,o,t)},[t]),r=ze.useCallback((i,a)=>u7t(i,a,t),[t]),n=ze.useCallback((i,a)=>{const o=r(i,a);return!a||!a.valueFormatter?o:a.valueFormatter(o,i,a,t)},[t,r]);return{getCellValue:e,getRowValue:r,getRowFormattedValue:n}};function yqt({privateApiRef:t,configuration:e,props:r,children:n}){const i=ze.useRef(t.current.getPublicApi());return Ke.jsx(Oqe.Provider,{value:e,children:Ke.jsx(WVe.Provider,{value:r,children:Ke.jsx(lGe.Provider,{value:t,children:Ke.jsx(YVe.Provider,{value:i,children:Ke.jsx(zUt,{children:Ke.jsx(izt,{children:n})})})})})})}const bqt=t=>{const e=ze.useRef(null),r=ze.useRef(null),n=ze.useRef(null),i=ze.useRef(null),a=ze.useRef(null),o=ze.useRef(null);t.current.register("public",{rootElementRef:e}),t.current.register("private",{mainElementRef:r,virtualScrollerRef:n,virtualScrollbarVerticalRef:i,virtualScrollbarHorizontalRef:a,columnHeadersContainerRef:o})},xqt=t=>{const e=Kv();t.current.state.isRtl===void 0&&(t.current.state.isRtl=e);const r=ze.useRef(!0);ze.useEffect(()=>{r.current?r.current=!1:t.current.setState(n=>Mr({},n,{isRtl:e}))},[t,e])},_qt=z7t()&&window.localStorage.getItem("DEBUG")!=null,Oz=()=>{},wqt={debug:Oz,info:Oz,warn:Oz,error:Oz},Eke=["debug","info","warn","error"];function Ake(t,e,r=console){const n=Eke.indexOf(e);if(n===-1)throw new Error(`MUI X: Log level ${e} not recognized.`);return Eke.reduce((a,o,s)=>(s>=n?a[o]=(...d)=>{const[b,...L]=d;r[o](`MUI X: ${t} - ${b}`,...L)}:a[o]=Oz,a),{})}const Sqt=(t,e)=>{const r=ze.useCallback(n=>_qt?Ake(n,"debug",e.logger):e.logLevel?Ake(n,e.logLevel.toString(),e.logger):wqt,[e.logLevel,e.logger]);nh(t,{getLogger:r},"private")},Tqt=(t,e)=>{const r=ze.useCallback(n=>{if(e.localeText[n]==null)throw new Error(`Missing translation for key ${n}.`);return e.localeText[n]},[e.localeText]);t.current.register("public",{getLocaleText:r})};function $9(t){"@babel/helpers - typeof";return $9=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$9(t)}function Eqt(t,e){if($9(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if($9(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function d8(t){var e=Eqt(t,"string");return $9(e)=="symbol"?e:e+""}const Aqt=t=>{const e=ze.useRef({}),r=ze.useRef(!1),n=ze.useCallback(B=>{r.current||!B||(r.current=!0,Object.values(B.appliers).forEach(V=>{V()}),r.current=!1)},[]),i=ze.useCallback((B,V,X)=>{e.current[B]||(e.current[B]={processors:new Map,processorsAsArray:[],appliers:{},processorsUpdated:!1});const ie=e.current[B];return ie.processors.get(V)!==X&&(ie.processors.set(V,X),ie.processorsAsArray=Array.from(e.current[B].processors.values()).filter(ae=>ae!==null),ie.processorsUpdated=!0),()=>{e.current[B].processors.set(V,null),e.current[B].processorsAsArray=Array.from(e.current[B].processors.values()).filter(ae=>ae!==null)}},[]),a=ze.useCallback((B,V,X)=>(e.current[B]||(e.current[B]={processors:new Map,processorsAsArray:[],appliers:{},processorsUpdated:!1}),e.current[B].appliers[V]=X,()=>{const ie=e.current[B].appliers,de=Ms(ie,[V].map(d8));e.current[B].appliers=de}),[]),o=ze.useCallback(B=>{n(e.current[B])},[n]),s=ze.useCallback(()=>{for(const B in e.current){if(!Object.prototype.hasOwnProperty.call(e.current,B))continue;const V=e.current[B];V.processorsUpdated&&(V.processorsUpdated=!1,n(V))}},[n]),d=ze.useCallback((...B)=>{const[V,X,ie]=B;if(!e.current[V])return X;const de=e.current[V].processorsAsArray;let ae=X;for(let U=0;U<de.length;U+=1)ae=de[U](ae,ie);return ae},[]),b={registerPipeProcessor:i,registerPipeApplier:a,requestPipeProcessorsApplication:o,runAppliersForPendingProcessors:s},L={unstable_applyPipeProcessors:d};nh(t,b,"private"),nh(t,L,"public")},O0=(t,e,r,n=!0)=>{const i=ze.useRef(null),a=ze.useRef(`mui-${Math.round(Math.random()*1e9)}`),o=ze.useCallback(()=>{i.current=t.current.registerPipeProcessor(e,a.current,r)},[t,r,e]);t6(()=>{n&&o()});const s=ze.useRef(!0);ze.useEffect(()=>(s.current?s.current=!1:n&&o(),()=>{i.current&&(i.current(),i.current=null)}),[o,n])},oye=(t,e,r)=>{const n=ze.useRef(null),i=ze.useRef(`mui-${Math.round(Math.random()*1e9)}`),a=ze.useCallback(()=>{n.current=t.current.registerPipeApplier(e,i.current,r)},[t,r,e]);t6(()=>{a()});const o=ze.useRef(!0);ze.useEffect(()=>(o.current?o.current=!1:a(),()=>{n.current&&(n.current(),n.current=null)}),[a])};let gk=(function(t){return t.DataSource="dataSource",t.RowTree="rowTree",t})({});const W9=(t,e,r,n)=>{const i=ze.useCallback(()=>{t.current.registerStrategyProcessor(e,r,n)},[t,n,r,e]);t6(()=>{i()});const a=ze.useRef(!0);ze.useEffect(()=>{a.current?a.current=!1:i()},[i])},LL="none",Cke={dataSourceRowsUpdate:gk.DataSource,rowTreeCreation:gk.RowTree,filtering:gk.RowTree,sorting:gk.RowTree,visibleRowsLookupCreation:gk.RowTree},Cqt=t=>{const e=ze.useRef(new Map),r=ze.useRef({}),n=ze.useCallback((d,b,L)=>{const B=()=>{const ie=r.current[b],de=Ms(ie,[d].map(d8));r.current[b]=de};r.current[b]||(r.current[b]={});const V=r.current[b],X=V[d];return V[d]=L,!X||X===L||d===t.current.getActiveStrategy(Cke[b])&&t.current.publishEvent("activeStrategyProcessorChange",b),B},[t]),i=ze.useCallback((d,b)=>{const L=t.current.getActiveStrategy(Cke[d]);if(L==null)throw new Error("Can't apply a strategy processor before defining an active strategy");const B=r.current[d];if(!B||!B[L])throw new Error(`No processor found for processor "${d}" on strategy "${L}"`);const V=B[L];return V(b)},[t]),a=ze.useCallback(d=>Array.from(e.current.entries()).find(([,B])=>B.group!==d?!1:B.isAvailable())?.[0]??LL,[]),o=ze.useCallback((d,b,L)=>{e.current.set(b,{group:d,isAvailable:L}),t.current.publishEvent("strategyAvailabilityChange")},[t]);nh(t,{registerStrategyProcessor:n,applyStrategyProcessor:i,getActiveStrategy:a,setStrategyAvailability:o},"private")},Mqt=t=>{const e=ze.useRef({}),r=ze.useCallback(s=>{e.current[s.stateId]=s},[]),n=ze.useCallback((s,d)=>{let b;if(F7t(s)?b=s(t.current.state):b=s,t.current.state===b)return!1;const L={current:{state:b}};let B=!1;const V=[];if(Object.keys(e.current).forEach(X=>{const ie=e.current[X],de=ie.stateSelector(t),ae=ie.stateSelector(L);ae!==de&&(V.push({stateId:ie.stateId,hasPropChanged:ae!==ie.propModel}),ie.propModel!==void 0&&ae!==ie.propModel&&(B=!0))}),V.length>1)throw new Error(`You're not allowed to update several sub-state in one transaction. You already updated ${V[0].stateId}, therefore, you're not allowed to update ${V.map(X=>X.stateId).join(", ")} in the same transaction.`);if(B||(t.current.state=b,t.current.publishEvent("stateChange",b),t.current.store.update(b)),V.length===1){const{stateId:X,hasPropChanged:ie}=V[0],de=e.current[X],ae=de.stateSelector(L);de.propOnChange&&ie&&de.propOnChange(ae,{reason:d,api:t.current}),B||t.current.publishEvent(de.changeEvent,ae,{reason:d})}return!B},[t]),i=ze.useCallback((s,d,b)=>t.current.setState(L=>Mr({},L,{[s]:d(L[s])}),b),[t]),a={setState:n},o={updateControlState:i,registerControlState:r};nh(t,a,"public"),nh(t,o,"private")},Rqt=(t,e)=>Mr({},t,{props:{listView:e.listView,getRowId:e.getRowId}}),kqt=(t,e)=>{ze.useEffect(()=>{t.current.setState(r=>Mr({},r,{props:{listView:e.listView,getRowId:e.getRowId}}))},[t,e.listView,e.getRowId])},Iqt=(t,e)=>{bqt(t),kqt(t,e),xqt(t),Sqt(t,e),Mqt(t),Aqt(t),Cqt(t),Tqt(t,e),t.current.register("private",{rootProps:e})},Pqt=pc(BS,yGe,sU,uy,(t,e,r,n)=>{if(!t)return!1;const i=r.rowIdToIndexMap.get(t.id),a=n.slice(e.firstColumnIndex,e.lastColumnIndex).findIndex(s=>s.field===t.field);return!(i!==void 0&&a!==-1&&i>=e.firstRowIndex&&i<=e.lastRowIndex)}),Dqt=av(Pqt,uy,sU,BS,(t,e,r,n)=>{if(!t)return null;const i=r.rowIdToIndexMap.get(n.id);if(i===void 0)return null;const a=e.findIndex(o=>o.field===n.field);return a===-1?null:Mr({},n,{rowIndex:i,columnIndex:a})}),O$={autoHeight:!1,autoPageSize:!1,autosizeOnMount:!1,checkboxSelection:!1,checkboxSelectionVisibleOnly:!1,clipboardCopyCellDelimiter:"	",columnBufferPx:150,columnFilterDebounceMs:150,columnHeaderHeight:56,disableAutosize:!1,disableColumnFilter:!1,disableColumnMenu:!1,disableColumnReorder:!1,disableColumnResize:!1,disableColumnSelector:!1,disableColumnSorting:!1,disableDensitySelector:!1,disableEval:!1,disableMultipleColumnsFiltering:!1,disableMultipleColumnsSorting:!1,disableMultipleRowSelection:!1,disableRowSelectionOnClick:!1,disableRowSelectionExcludeModel:!1,disableVirtualization:!1,editMode:B5.Cell,filterDebounceMs:150,filterMode:"client",hideFooter:!1,hideFooterPagination:!1,hideFooterRowCount:!1,hideFooterSelectedRowCount:!1,ignoreDiacritics:!1,ignoreValueFormatterDuringExport:!1,keepColumnPositionIfDraggedOutside:!1,keepNonExistentRowsSelected:!1,loading:!1,logger:console,logLevel:"error",pageSizeOptions:[25,50,100],pagination:!1,paginationMode:"client",resizeThrottleMs:60,rowBufferPx:150,rowHeight:52,rows:[],rowSelection:!0,rowSpacingType:"margin",rowSpanning:!1,showCellVerticalBorder:!1,showColumnVerticalBorder:!1,showToolbar:!1,sortingMode:"client",sortingOrder:["asc","desc",null],throttleRowsMs:0,virtualizeColumnsWithAutoRowHeight:!1};function Lqt(t){return t}const Oqt=pc(uy,QL,(t,e)=>{const r=t.length;return r===0?0:eL(e[r-1]+t[r-1].computedWidth,1)}),Nqt=()=>D0e((t,e,r,n,i)=>Mr({},t,{headerHeight:e,groupHeaderHeight:r,headerFilterHeight:n,headersTotalHeight:i}),{maxSize:1});function Fqt(t,e){const r=Kv(),{listView:n}=e,i=wl(t,uy),a=wl(t,sF),o=EX(t),s=wl(t,oU),d=yt=>s.has(yt)&&t.current.isRowSelectable(yt),b=PGe(t),L=wl(t,G7t),B=wl(t,sqe),V=wl(t,oqe),{autoHeight:X}=e,ie=n,de=wl(t,nU),ae=hqe(e.rowHeight,O$.rowHeight),U=Math.floor(ae*de),ve=Math.floor(e.columnHeaderHeight*de),Se=Math.floor((e.columnGroupHeaderHeight??e.columnHeaderHeight)*de),Pe=Math.floor((e.headerFilterHeight??e.columnHeaderHeight)*de),Me=wl(t,Oqt),Ie=uU(t,e),Ve=o.left.reduce((yt,Vt)=>yt+Vt.computedWidth,0),Ze=o.right.reduce((yt,Vt)=>yt+Vt.computedWidth,0),Je=fGe(t,e),nt={rowHeight:U,headerHeight:ve,columnsTotalWidth:Me,leftPinnedWidth:Ve,rightPinnedWidth:Ze,topPinnedHeight:Ie,bottomPinnedHeight:0,scrollbarSize:e.scrollbarSize},ut=pE(Nqt).current,ht=wl(t,oF),_t=wl(t,uF),Dt=Math.min(_t.enabled?_t.paginationModel.pageSize:ht,ht),{getRowHeight:qt,getEstimatedRowHeight:Lt,getRowSpacing:dr}=e,Zt=wl(t,Dqt),Cr=UBt({refs:{container:t.current.mainElementRef,scroller:t.current.virtualScrollerRef,scrollbarVertical:t.current.virtualScrollbarVerticalRef,scrollbarHorizontal:t.current.virtualScrollbarHorizontalRef},dimensions:nt,virtualization:{isRtl:r,rowBufferPx:e.rowBufferPx,columnBufferPx:e.columnBufferPx},colspan:{enabled:L,getColspan:(yt,Vt)=>{if(typeof Vt.colSpan=="function"){const Er=t.current.getRow(yt),sr=t.current.getRowValue(Er,Vt);return Vt.colSpan(sr,Er,Vt,t)??0}return Vt.colSpan??1}},initialState:{scroll:e.initialState?.scroll,rowSpanning:t.current.state.rowSpanning,virtualization:t.current.state.virtualization},rows:b.rows,range:b.range,rowCount:Dt,columns:i,pinnedRows:a,pinnedColumns:o,autoHeight:X,disableHorizontalScroll:n,disableVerticalScroll:Je.overlayType==="noColumnsOverlay"||Je.loadingOverlayVariant==="skeleton",minimalContentHeight:dqe,getRowHeight:ze.useMemo(()=>{if(qt)return yt=>qt(Mr({},yt,{densityFactor:de}))},[qt,de]),getEstimatedRowHeight:ze.useMemo(()=>Lt?yt=>Lt(Mr({},yt,{densityFactor:de})):void 0,[Lt,de]),getRowSpacing:ze.useMemo(()=>dr?yt=>{const Vt=b.rowIdToIndexMap.get(yt.id)??-1,Er={isFirstVisible:Vt===0,isLastVisible:Vt===b.rows.length-1,indexRelativeToCurrentPage:Vt};return dr(Mr({},yt,Er,{indexRelativeToCurrentPage:t.current.getRowIndexRelativeToVisibleRows(yt.id)}))}:void 0,[t,dr,b.rows,b.rowIdToIndexMap]),applyRowHeight:vl((yt,Vt)=>t.current.unstable_applyPipeProcessors("rowHeight",yt,Vt)),virtualizeColumnsWithAutoRowHeight:e.virtualizeColumnsWithAutoRowHeight,focusedVirtualCell:vl(()=>Zt),resizeThrottleMs:e.resizeThrottleMs,onResize:vl(yt=>t.current.publishEvent("resize",yt)),onWheel:vl(yt=>{t.current.publishEvent("virtualScrollerWheel",{},yt)}),onTouchMove:vl(yt=>{t.current.publishEvent("virtualScrollerTouchMove",{},yt)}),onRenderContextChange:vl(yt=>{t.current.publishEvent("renderedRowsIntervalChange",yt)}),onScrollChange:(yt,Vt)=>{t.current.publishEvent("scrollPositionChange",{top:yt.top,left:yt.left,renderContext:Vt})},scrollReset:ie,renderRow:yt=>Ke.jsx(e.slots.row,Mr({row:yt.model,rowId:yt.id,index:yt.rowIndex,selected:d(yt.id),offsetLeft:yt.offsetLeft,columnsTotalWidth:Me,rowHeight:yt.baseRowHeight,pinnedColumns:o,visibleColumns:i,firstColumnIndex:yt.firstColumnIndex,lastColumnIndex:yt.lastColumnIndex,focusedColumnIndex:yt.focusedColumnIndex,isFirstVisible:yt.isFirstVisible,isLastVisible:yt.isLastVisible,isNotVisible:yt.isVirtualFocusRow,showBottomBorder:yt.showBottomBorder,scrollbarWidth:B,gridHasFiller:V},e.slotProps?.row),yt.id),renderInfiniteLoadingTrigger:yt=>t.current.getInfiniteLoadingTriggerElement?.({lastRowId:yt})});t6(()=>{t.current.store.state.dimensions=ut(Cr.store.state.dimensions,ve,Se,Pe,Ie),t.current.store.state.rowsMeta=Cr.store.state.rowsMeta,t.current.store.state.virtualization=Cr.store.state.virtualization}),T$(Cr.store,US.selectors.dimensions,(yt,Vt)=>{t.current.setState(Er=>Mr({},Er,{dimensions:ut(Vt,ve,Se,Pe,Ie)}))}),T$(Cr.store,Lqt,(yt,Vt)=>{Vt.rowsMeta!==t.current.state.rowsMeta&&t.current.setState(Er=>Mr({},Er,{rowsMeta:Vt.rowsMeta})),Vt.virtualization!==t.current.state.virtualization&&t.current.setState(Er=>Mr({},Er,{virtualization:Vt.virtualization}))}),t.current.register("private",{virtualizer:Cr})}const ox=(t,e,r,n)=>{const i=ze.useRef(n),a=ze.useRef(!1);n!==i.current&&(a.current=!1,i.current=n),a.current||(e.current.state=t(e.current.state,r,e),a.current=!0)};function bpe(t,e){if(t==null)return"";const r=typeof t=="string"?t:`${t}`;if(e.shouldAppendQuotes||e.escapeFormulas){const n=r.replace(/"/g,'""');return e.escapeFormulas&&["=","+","-","@","	","\r"].includes(n[0])?`"'${n}"`:[e.delimiter,`
`,"\r",'"'].some(i=>r.includes(i))?`"${n}"`:n}return r}const DGe=(t,e)=>{const{csvOptions:r,ignoreValueFormatter:n}=e;let i;if(n){const a=t.colDef.type;a==="number"?i=String(t.value):a==="date"||a==="dateTime"?i=t.value?.toISOString():typeof t.value?.toString=="function"?i=t.value.toString():i=t.value}else i=t.formattedValue;return bpe(i,r)};class xpe{rowString="";isEmpty=!0;constructor(e){this.options=e}addValue(e){this.isEmpty||(this.rowString+=this.options.csvOptions.delimiter),typeof this.options.sanitizeCellValue=="function"?this.rowString+=this.options.sanitizeCellValue(e,this.options.csvOptions):this.rowString+=e,this.isEmpty=!1}getRowString(){return this.rowString}}const zqt=({id:t,columns:e,getCellParams:r,csvOptions:n,ignoreValueFormatter:i})=>{const a=new xpe({csvOptions:n});return e.forEach(o=>{const s=r(t,o.field);a.addValue(DGe(s,{ignoreValueFormatter:i,csvOptions:n}))}),a.getRowString()};function Bqt(t){const{columns:e,rowIds:r,csvOptions:n,ignoreValueFormatter:i,apiRef:a}=t,o=r.reduce((B,V)=>`${B}${zqt({id:V,columns:e,getCellParams:a.current.getCellParams,ignoreValueFormatter:i,csvOptions:n})}\r
`,"").trim();if(!n.includeHeaders)return o;const s=e.filter(B=>B.field!==cF.field),d=[];if(n.includeColumnGroupsHeaders){const B=a.current.getAllGroupDetails();let V=0;const X=s.reduce((ie,de)=>{const ae=a.current.getColumnGroupPath(de.field);return ie[de.field]=ae,V=Math.max(V,ae.length),ie},{});for(let ie=0;ie<V;ie+=1){const de=new xpe({csvOptions:n,sanitizeCellValue:bpe});d.push(de),s.forEach(ae=>{const U=(X[ae.field]||[])[ie],ve=B[U];de.addValue(ve?ve.headerName||ve.groupId:"")})}}const b=new xpe({csvOptions:n,sanitizeCellValue:bpe});return s.forEach(B=>{b.addValue(B.headerName||B.field)}),d.push(b),`${`${d.map(B=>B.getRowString()).join(`\r
`)}\r
`}${o}`.trim()}function Mke(t){const e=document.createElement("span");e.style.whiteSpace="pre",e.style.userSelect="all",e.style.opacity="0px",e.textContent=t,document.body.appendChild(e);const r=document.createRange();r.selectNode(e);const n=window.getSelection();n.removeAllRanges(),n.addRange(r);try{document.execCommand("copy")}finally{document.body.removeChild(e)}}function Uqt(t){navigator.clipboard?navigator.clipboard.writeText(t).catch(()=>{Mke(t)}):Mke(t)}function Hqt(t){return!!(window.getSelection()?.toString()||t&&(t.selectionEnd||0)-(t.selectionStart||0)>0)}const jqt=(t,e)=>{const r=e.ignoreValueFormatterDuringExport,n=(typeof r=="object"?r?.clipboardExport:r)||!1,i=e.clipboardCopyCellDelimiter,a=ze.useCallback(o=>{if(!tzt(o)||Hqt(o.target))return;let s="";if(IX(t)>0)s=t.current.getDataAsCsv({includeHeaders:!1,delimiter:i,shouldAppendQuotes:!1,escapeFormulas:!1});else{const b=BS(t);if(b){const L=t.current.getCellParams(b.id,b.field);s=DGe(L,{csvOptions:{delimiter:i,shouldAppendQuotes:!1,escapeFormulas:!1},ignoreValueFormatter:n})}}s=t.current.unstable_applyPipeProcessors("clipboardCopy",s),s&&(Uqt(s),t.current.publishEvent("clipboardCopy",s))},[t,n,i]);uGe(t,()=>t.current.rootElementRef.current,"keydown",a),Zm(t,"clipboardCopy",e.onClipboardCopy)},Vqt=t=>Mr({},t,{columnMenu:{open:!1}}),qqt=t=>{const e=r_(t,"useGridColumnMenu"),r=ze.useCallback(o=>{const s=MG(t),d={open:!0,field:o};(d.open!==s.open||d.field!==s.field)&&(t.current.setState(L=>L.columnMenu.open&&L.columnMenu.field===o?L:(e.debug("Opening Column Menu"),Mr({},L,{columnMenu:{open:!0,field:o}}))),t.current.hidePreferences())},[t,e]),n=ze.useCallback(()=>{const o=MG(t);if(o.field){const b=qk(t),L=q3(t),B=L5(t);let V=o.field;if(b[V]||(V=B[0]),L[V]===!1){const X=B.filter(de=>de===V?!0:L[de]!==!1),ie=X.indexOf(V);V=X[ie+1]||X[ie-1]}t.current.setColumnHeaderFocus(V)}const s={open:!1,field:void 0};(s.open!==o.open||s.field!==o.field)&&t.current.setState(b=>(e.debug("Hiding Column Menu"),Mr({},b,{columnMenu:s})))},[t,e]),i=ze.useCallback(o=>{e.debug("Toggle Column Menu");const s=MG(t);!s.open||s.field!==o?r(o):n()},[t,e,r,n]);nh(t,{showColumnMenu:r,hideColumnMenu:n,toggleColumnMenu:i},"public"),sc(t,"columnResizeStart",n),sc(t,"virtualScrollerWheel",t.current.hideColumnMenu),sc(t,"virtualScrollerTouchMove",t.current.hideColumnMenu)},Gqt=(t,e,r)=>{r.current.caches.columns={lastColumnsProp:e.columns};const n=mN({apiRef:r,columnsToUpsert:e.columns,initialState:e.initialState?.columns,columnVisibilityModel:e.columnVisibilityModel??e.initialState?.columns?.columnVisibilityModel??{},keepOnlyColumnsToUpsert:!0});return Mr({},t,{columns:n,pinnedColumns:t.pinnedColumns??A$})};function $qt(t,e){const r=r_(t,"useGridColumns");t.current.registerControlState({stateId:"visibleColumns",propModel:e.columnVisibilityModel,propOnChange:e.onColumnVisibilityModelChange,stateSelector:q3,changeEvent:"columnVisibilityModelChange"});const n=ze.useCallback(Ze=>{r.debug("Updating columns state."),t.current.setState(Wqt(Ze)),t.current.publishEvent("columnsChange",Ze.orderedFields)},[r,t]),i=ze.useCallback(Ze=>qk(t)[Ze],[t]),a=ze.useCallback(()=>J3(t),[t]),o=ze.useCallback(()=>uy(t),[t]),s=ze.useCallback((Ze,Je=!0)=>(Je?uy(t):J3(t)).findIndex(ut=>ut.field===Ze),[t]),d=ze.useCallback(Ze=>{const Je=s(Ze);return QL(t)[Je]},[t,s]),b=ze.useCallback(Ze=>{q3(t)!==Ze&&(t.current.setState(nt=>Mr({},nt,{columns:mN({apiRef:t,columnsToUpsert:[],initialState:void 0,columnVisibilityModel:Ze,keepOnlyColumnsToUpsert:!1})})),t.current.updateRenderContext?.())},[t]),L=ze.useCallback(Ze=>{let Je=Ze;if(PL(t)){const ut=[],ht=[],_t=eye(t);if(Ze.forEach(Dt=>{_t.has(Dt.field)?ut.push(Dt):ht.push(Dt)}),ut.length>0&&t.current.updateNonPivotColumns(ut),ht.length===0)return;Je=ht}const nt=mN({apiRef:t,columnsToUpsert:Je,initialState:void 0,keepOnlyColumnsToUpsert:!1,updateInitialVisibilityModel:!0});n(nt)},[t,n]),B=ze.useCallback((Ze,Je)=>{const nt=q3(t),ut=nt[Ze]??!0;if(Je!==ut){const ht=Mr({},nt,{[Ze]:Je});t.current.setColumnVisibilityModel(ht)}},[t]),V=ze.useCallback(Ze=>L5(t).findIndex(nt=>nt===Ze),[t]),X=ze.useCallback((Ze,Je)=>{const nt=L5(t),ut=V(Ze);if(ut===Je)return;r.debug(`Moving column ${Ze} to index ${Je}`);const ht=[...nt],_t=ht.splice(ut,1)[0];ht.splice(Je,0,_t),n(Mr({},UC(t),{orderedFields:ht}));const Dt={column:t.current.getColumn(Ze),targetIndex:t.current.getColumnIndexRelativeToVisibleColumns(Ze),oldIndex:ut};t.current.publishEvent("columnIndexChange",Dt)},[t,r,n,V]),ie=ze.useCallback((Ze,Je)=>{r.debug(`Updating column ${Ze} width to ${Je}`);const nt=UC(t),ut=nt.lookup[Ze],ht=Mr({},ut,{width:Je,hasBeenResized:!0});n(gpe(Mr({},nt,{lookup:Mr({},nt.lookup,{[Ze]:ht})}),t.current.getRootDimensions())),t.current.publishEvent("columnWidthChange",{element:t.current.getColumnHeaderElement(Ze),colDef:ht,width:Je})},[t,r,n]),de={getColumn:i,getAllColumns:a,getColumnIndex:s,getColumnPosition:d,getVisibleColumns:o,getColumnIndexRelativeToVisibleColumns:V,updateColumns:L,setColumnVisibilityModel:b,setColumnVisibility:B,setColumnWidth:ie},ae={setColumnIndex:X};nh(t,de,"public"),nh(t,ae,e.signature===BC.DataGrid?"private":"public");const U=ze.useCallback((Ze,Je)=>{const nt={},ut=q3(t);(!Je.exportOnlyDirtyModels||e.columnVisibilityModel!=null||Object.keys(e.initialState?.columns?.columnVisibilityModel??{}).length>0||Object.keys(ut).length>0)&&(nt.columnVisibilityModel=ut),nt.orderedFields=L5(t);const _t=J3(t),Dt={};return _t.forEach(qt=>{if(qt.hasBeenResized){const Lt={};aGe.forEach(dr=>{let Zt=qt[dr];Zt===1/0&&(Zt=-1),Lt[dr]=Zt}),Dt[qt.field]=Lt}}),Object.keys(Dt).length>0&&(nt.dimensions=Dt),Mr({},Ze,{columns:nt})},[t,e.columnVisibilityModel,e.initialState?.columns]),ve=ze.useCallback((Ze,Je)=>{const nt=Je.stateToRestore.columns,ut=nt?.columnVisibilityModel;if(nt==null)return Ze;const ht=mN({apiRef:t,columnsToUpsert:[],initialState:nt,columnVisibilityModel:ut,keepOnlyColumnsToUpsert:!1});return nt!=null&&t.current.setState(_t=>Mr({},_t,{columns:Mr({},_t.columns,{lookup:ht.lookup,orderedFields:ht.orderedFields,initialColumnVisibilityModel:ht.initialColumnVisibilityModel})})),ut!=null&&t.current.setState(_t=>Mr({},_t,{columns:Mr({},_t.columns,{columnVisibilityModel:ut})})),nt!=null&&t.current.publishEvent("columnsChange",ht.orderedFields),Ze},[t]),Se=ze.useCallback((Ze,Je)=>{if(Je===H2.columns){const nt=e.slots.columnsPanel;return Ke.jsx(nt,Mr({},e.slotProps?.columnsPanel))}return Ze},[e.slots.columnsPanel,e.slotProps?.columnsPanel]),Pe=ze.useCallback(Ze=>{const Je=PL(t);return e.disableColumnSelector||Je?Ze:[...Ze,"columnMenuColumnsItem"]},[e.disableColumnSelector,t]);O0(t,"columnMenu",Pe),O0(t,"exportState",U),O0(t,"restoreState",ve),O0(t,"preferencePanel",Se);const Me=ze.useRef(null);sc(t,"viewportInnerSizeChange",Ze=>{if(Me.current!==Ze.width){if(Me.current=Ze.width,!uy(t).some(nt=>nt.flex&&nt.flex>0))return;n(gpe(UC(t),t.current.getRootDimensions()))}});const Ve=ze.useCallback(()=>{r.info("Columns pipe processing have changed, regenerating the columns");const Ze=mN({apiRef:t,columnsToUpsert:[],initialState:void 0,keepOnlyColumnsToUpsert:!1});n(Ze)},[t,r,n]);oye(t,"hydrateColumns",Ve),ze.useEffect(()=>{if(t.current.caches.columns.lastColumnsProp===e.columns)return;t.current.caches.columns.lastColumnsProp=e.columns,r.info(`GridColumns have changed, new length ${e.columns.length}`);const Ze=mN({apiRef:t,initialState:void 0,columnsToUpsert:e.columns,keepOnlyColumnsToUpsert:!0,updateInitialVisibilityModel:!0,columnVisibilityModel:e.columnVisibilityModel});n(Ze)},[r,t,n,e.columns,e.columnVisibilityModel]),ze.useEffect(()=>{e.columnVisibilityModel!==void 0&&t.current.setColumnVisibilityModel(e.columnVisibilityModel)},[t,r,e.columnVisibilityModel])}function Wqt(t){return e=>Mr({},e,{columns:t})}const Yqt=(t,e)=>Mr({},t,{density:e.initialState?.density??e.density??"standard"}),Xqt=(t,e)=>{const r=r_(t,"useDensity");t.current.registerControlState({stateId:"density",propModel:e.density,propOnChange:e.onDensityChange,stateSelector:SN,changeEvent:"densityChange"});const i={setDensity:vl(s=>{SN(t)!==s&&(r.debug(`Set grid density to ${s}`),t.current.setState(b=>Mr({},b,{density:s})))})};nh(t,i,"public");const a=ze.useCallback((s,d)=>{const b=SN(t);return!d.exportOnlyDirtyModels||e.density!=null||e.initialState?.density!=null?Mr({},s,{density:b}):s},[t,e.density,e.initialState?.density]),o=ze.useCallback((s,d)=>{const b=d.stateToRestore?.density?d.stateToRestore.density:SN(t);return t.current.setState(L=>Mr({},L,{density:b})),s},[t]);O0(t,"exportState",a),O0(t,"restoreState",o),ze.useEffect(()=>{e.density&&t.current.setDensity(e.density)},[t,e.density])};function Zqt(t,e="csv",r=document.title||"untitled"){const n=`${r}.${e}`;if("download"in HTMLAnchorElement.prototype){const i=URL.createObjectURL(t),a=document.createElement("a");a.href=i,a.download=n,a.click(),setTimeout(()=>{URL.revokeObjectURL(i)});return}throw new Error("MUI X: exportAs not supported.")}const LGe=({apiRef:t,options:e})=>{const r=J3(t);return e.fields?e.fields.reduce((i,a)=>{const o=r.find(s=>s.field===a);return o&&i.push(o),i},[]):(e.allColumns?r:uy(t)).filter(i=>i.disableExport!==!0)},OGe=({apiRef:t})=>{const e=Hqe(t),r=Sb(t),n=IX(t),i=e.filter(d=>r[d].type!=="footer"),a=sF(t),o=a?.top?.map(d=>d.id)||[],s=a?.bottom?.map(d=>d.id)||[];if(i.unshift(...o),i.push(...s),n>0){const d=qqe(t);return i.filter(b=>d.has(b))}return i},Kqt=(t,e)=>{const r=r_(t,"useGridCsvExport"),n=e.ignoreValueFormatterDuringExport,i=(typeof n=="object"?n?.csvExport:n)||!1,a=ze.useCallback((b={})=>{r.debug("Get data as CSV");const L=LGe({apiRef:t,options:b}),V=(b.getRowsToExport??OGe)({apiRef:t});return Bqt({columns:L,rowIds:V,csvOptions:{delimiter:b.delimiter||",",shouldAppendQuotes:b.shouldAppendQuotes??!0,includeHeaders:b.includeHeaders??!0,includeColumnGroupsHeaders:b.includeColumnGroupsHeaders??!0,escapeFormulas:b.escapeFormulas??!0},ignoreValueFormatter:i,apiRef:t})},[r,t,i]),o=ze.useCallback(b=>{r.debug("Export data as CSV");const L=a(b),B=new Blob([b?.utf8WithBom?new Uint8Array([239,187,191]):"",L],{type:"text/csv"});Zqt(B,"csv",b?.fileName)},[r,a]);nh(t,{getDataAsCsv:a,exportDataAsCsv:o},"public");const d=ze.useCallback((b,L)=>L.csvOptions?.disableToolbarButton?b:[...b,{component:Ke.jsx(oVt,{options:L.csvOptions}),componentName:"csvExport"}],[]);O0(t,"exportMenu",d)};function Jqt(t,e){const r=[],n=e.querySelectorAll("style, link[rel='stylesheet']");for(let i=0;i<n.length;i+=1){const a=n[i];if(a.tagName==="STYLE"){const o=t.createElement(a.tagName),s=a.sheet;if(s){let d="";for(let b=0;b<s.cssRules.length;b+=1)typeof s.cssRules[b].cssText=="string"&&(d+=`${s.cssRules[b].cssText}\r
`);o.appendChild(t.createTextNode(d)),t.head.appendChild(o)}}else if(a.getAttribute("href")){const o=t.createElement(a.tagName);for(let s=0;s<a.attributes.length;s+=1){const d=a.attributes[s];d&&o.setAttribute(d.nodeName,d.nodeValue||"")}r.push(new Promise(s=>{o.addEventListener("load",()=>s())})),t.head.appendChild(o)}}return r}const IG=(t,e,r)=>{let n=t.paginationModel;const i=t.rowCount,a=r?.pageSize??n.pageSize,o=r?.page??n.page,s=Wqe(i,a,o);r&&(r?.page!==n.page||r?.pageSize!==n.pageSize)&&(n=r);const d=a===-1?0:qzt(n.page,s);return d!==n.page&&(n=Mr({},n,{page:d})),Xqe(n.pageSize,e),n},Qqt=(t,e)=>{const r=r_(t,"useGridPaginationModel"),n=wl(t,nU),i=ze.useRef(lx(t)),a=Math.floor(e.rowHeight*n);t.current.registerControlState({stateId:"paginationModel",propModel:e.paginationModel,propOnChange:e.onPaginationModelChange,stateSelector:Yx,changeEvent:"paginationModelChange"});const o=ze.useCallback(ve=>{const Se=Yx(t);ve!==Se.page&&(r.debug(`Setting page to ${ve}`),t.current.setPaginationModel({page:ve,pageSize:Se.pageSize}))},[t,r]),s=ze.useCallback(ve=>{const Se=Yx(t);ve!==Se.pageSize&&(r.debug(`Setting page size to ${ve}`),t.current.setPaginationModel({pageSize:ve,page:Se.page}))},[t,r]),d=ze.useCallback(ve=>{const Se=Yx(t);ve!==Se&&(r.debug("Setting 'paginationModel' to",ve),t.current.setState(Pe=>Mr({},Pe,{pagination:Mr({},Pe.pagination,{paginationModel:IG(Pe.pagination,e.signature,ve)})}),"setPaginationModel"))},[t,r,e.signature]);nh(t,{setPage:o,setPageSize:s,setPaginationModel:d},"public");const L=ze.useCallback((ve,Se)=>{const Pe=Yx(t);return!Se.exportOnlyDirtyModels||e.paginationModel!=null||e.initialState?.pagination?.paginationModel!=null||Pe.page!==0&&Pe.pageSize!==Vzt(e.autoPageSize)?Mr({},ve,{pagination:Mr({},ve.pagination,{paginationModel:Pe})}):ve},[t,e.paginationModel,e.initialState?.pagination?.paginationModel,e.autoPageSize]),B=ze.useCallback((ve,Se)=>{const Pe=Se.stateToRestore.pagination?.paginationModel?Mr({},Yqe(e.autoPageSize),Se.stateToRestore.pagination?.paginationModel):Yx(t);return t.current.setState(Me=>Mr({},Me,{pagination:Mr({},Me.pagination,{paginationModel:IG(Me.pagination,e.signature,Pe)})}),"stateRestorePreProcessing"),ve},[t,e.autoPageSize,e.signature]);O0(t,"exportState",L),O0(t,"restoreState",B);const V=()=>{const ve=Yx(t);t.current.virtualScrollerRef?.current&&t.current.scrollToIndexes({rowIndex:ve.page*ve.pageSize})},X=ze.useCallback(()=>{if(!e.autoPageSize)return;const ve=t.current.getRootDimensions(),Se=Math.max(1,Math.floor(ve.viewportInnerSize.height/a));t.current.setPageSize(Se)},[t,e.autoPageSize,a]),ie=ze.useCallback(ve=>{if(ve==null)return;const Se=Yx(t);if(Se.page===0)return;const Pe=Jqe(t);Se.page>Pe-1&&t.current.setPage(Math.max(0,Pe-1))},[t]),de=ze.useCallback(()=>{Yx(t).page!==0&&t.current.setPage(0),t.current.getScrollPosition().top!==0&&t.current.scroll({top:0})},[t]),ae=ze.useCallback(ve=>{const Se=Mr({},ve,{items:X0e(t)});Q3(Se,i.current)||(i.current=Se,de())},[t,de]);sc(t,"viewportInnerSizeChange",X),sc(t,"paginationModelChange",V),sc(t,"rowCountChange",ie),sc(t,"sortModelChange",de),sc(t,"filterModelChange",ae);const U=ze.useRef(!0);ze.useEffect(()=>{if(U.current){U.current=!1;return}e.pagination&&t.current.setState(ve=>Mr({},ve,{pagination:Mr({},ve.pagination,{paginationModel:IG(ve.pagination,e.signature,e.paginationModel)})}))},[t,e.paginationModel,e.signature,e.pagination]),ze.useEffect(()=>{t.current.setState(ve=>{const Se=e.pagination===!0;return ve.pagination.paginationMode===e.paginationMode&&ve.pagination.enabled===Se?ve:Mr({},ve,{pagination:Mr({},ve.pagination,{paginationMode:e.paginationMode,enabled:Se})})})},[t,e.paginationMode,e.pagination]),ze.useEffect(X,[X])};function eGt(){return new Promise(t=>{requestAnimationFrame(()=>{t()})})}function tGt(t){const e=document.createElement("iframe");return e.style.position="absolute",e.style.width="0px",e.style.height="0px",e.title=t||document.title,e}const rGt=(t,e)=>{const r=t.current.rootElementRef.current!==null,n=r_(t,"useGridPrintExport"),i=ze.useRef(null),a=ze.useRef(null),o=ze.useRef({}),s=ze.useRef([]),d=ze.useRef(null);ze.useEffect(()=>{i.current=Lm(t.current.rootElementRef.current)},[t,r]);const b=ze.useCallback((ae,U,ve)=>new Promise(Se=>{const Pe=LGe({apiRef:t,options:{fields:ae,allColumns:U}}).map(Ve=>Ve.field),Me=J3(t),Ie={};Me.forEach(Ve=>{Ie[Ve.field]=Pe.includes(Ve.field)}),ve&&(Ie[cF.field]=!0),t.current.setColumnVisibilityModel(Ie),Se()}),[t]),L=ze.useCallback(ae=>{const ve=ae({apiRef:t}).reduce((Se,Pe)=>{const Me=t.current.getRow(Pe);return Me[kL]||Se.push(Me),Se},[]);t.current.setRows(ve)},[t]),B=ze.useCallback((ae,U)=>{const ve=Mr({copyStyles:!0,hideToolbar:!1,hideFooter:!1,includeCheckboxes:!1},U),Se=ae.contentDocument;if(!Se)return;const Pe=N0e(t),Me=t.current.rootElementRef.current,Ie=Me.cloneNode(!0),Ve=Ie.querySelector(`.${Bi.main}`);Ve.style.overflow="visible",Ie.style.contain="size";let Ze=Me.querySelector(`.${Bi.toolbar}`)?.offsetHeight||0,Je=Me.querySelector(`.${Bi.footerContainer}`)?.offsetHeight||0;const nt=Ie.querySelector(`.${Bi.footerContainer}`);ve.hideToolbar&&(Ie.querySelector(`.${Bi.toolbar}`)?.remove(),Ze=0),ve.hideFooter&&nt&&(nt.remove(),Je=0);const ut=Pe.currentPageTotalHeight+uU(t,e)+Ze+Je;Ie.style.height=`${ut}px`,Ie.style.boxSizing="content-box",!ve.hideFooter&&nt&&(nt.style.position="absolute",nt.style.width="100%",nt.style.top=`${ut-Je}px`);const ht=document.createElement("div");ht.appendChild(Ie),Se.body.style.marginTop="0px",Se.body.innerHTML=ht.innerHTML;const _t=typeof ve.pageStyle=="function"?ve.pageStyle():ve.pageStyle;if(typeof _t=="string"){const qt=Se.createElement("style");qt.appendChild(Se.createTextNode(_t)),Se.head.appendChild(qt)}ve.bodyClassName&&Se.body.classList.add(...ve.bodyClassName.split(" "));let Dt=[];if(ve.copyStyles){const qt=Me.getRootNode(),Lt=qt.constructor.name==="ShadowRoot"?qt:i.current;Dt=Jqt(Se,Lt)}Promise.all(Dt).then(()=>{ae.contentWindow.print()})},[t,i,e]),V=ze.useCallback(ae=>{i.current.body.removeChild(ae),t.current.restoreState(a.current||{}),a.current?.columns?.columnVisibilityModel||t.current.setColumnVisibilityModel(o.current),t.current.setState(U=>Mr({},U,{virtualization:d.current})),t.current.setRows(s.current),a.current=null,o.current={},s.current=[]},[t]),ie={exportDataAsPrint:ze.useCallback(async ae=>{if(n.debug("Export data as Print"),!t.current.rootElementRef.current)throw new Error("MUI X: No grid root element available.");if(a.current=t.current.exportState(),o.current=q3(t),s.current=t.current.getSortedRows().filter(ve=>!ve[kL]),e.pagination){const Se={page:0,pageSize:W0e(t)};t.current.setState(Pe=>Mr({},Pe,{pagination:Mr({},Pe.pagination,{paginationModel:IG(Pe.pagination,"DataGridPro",Se)})}))}d.current=t.current.state.virtualization,t.current.unstable_setVirtualization(!1),await b(ae?.fields,ae?.allColumns,ae?.includeCheckboxes),L(ae?.getRowsToExport??OGe),await eGt();const U=tGt(ae?.fileName);U.onload=()=>{B(U,ae),U.contentWindow.matchMedia("print").addEventListener("change",Se=>{Se.matches===!1&&V(U)})},i.current.body.appendChild(U)},[e,n,t,B,V,b,L])};nh(t,ie,"public");const de=ze.useCallback((ae,U)=>U.printOptions?.disableToolbarButton?ae:[...ae,{component:Ke.jsx(sVt,{options:U.printOptions}),componentName:"printExport"}],[]);O0(t,"exportMenu",de)},nGt=(t,e,r)=>{const n=e.filterModel??e.initialState?.filter?.filterModel??V9();return Mr({},t,{filter:Mr({filterModel:j0e(n,e.disableMultipleColumnsFiltering,r)},Sqe),visibleRowsLookup:{}})},iGt=t=>t.filteredRowsLookup;function Rke(t,e){return t.current.applyStrategyProcessor("visibleRowsLookupCreation",{tree:e.rows.tree,filteredRowsLookup:e.filter.filteredRowsLookup})}function aGt(){return D0e(Object.values)}const oGt=(t,e,r)=>{const n=r_(t,"useGridFilter");t.current.registerControlState({stateId:"filter",propModel:e.filterModel,propOnChange:e.onFilterModelChange,stateSelector:lx,changeEvent:"filterModelChange"});const i=ze.useCallback(()=>{t.current.setState(Je=>{const nt=lx(t),ut=t.current.getFilterState(nt),ht=Mr({},Je,{filter:Mr({},Je.filter,ut)}),_t=Rke(t,ht);return Mr({},ht,{visibleRowsLookup:_t})}),t.current.publishEvent("filteredRowsSet")},[t]),a=ze.useCallback((Je,nt)=>nt==null||nt.filterable===!1||e.disableColumnFilter?Je:[...Je,"columnMenuFilterItem"],[e.disableColumnFilter]),o=ze.useCallback(Je=>{const nt=lx(t),ut=[...nt.items],ht=ut.findIndex(_t=>_t.id===Je.id);ht===-1?ut.push(Je):ut[ht]=Je,t.current.setFilterModel(Mr({},nt,{items:ut}),"upsertFilterItem")},[t]),s=ze.useCallback(Je=>{const nt=lx(t),ut=[...nt.items];Je.forEach(ht=>{const _t=ut.findIndex(Dt=>Dt.id===ht.id);_t===-1?ut.push(ht):ut[_t]=ht}),t.current.setFilterModel(Mr({},nt,{items:ut}),"upsertFilterItems")},[t]),d=ze.useCallback(Je=>{const nt=lx(t),ut=nt.items.filter(ht=>ht.id!==Je.id);ut.length!==nt.items.length&&t.current.setFilterModel(Mr({},nt,{items:ut}),"deleteFilterItem")},[t]),b=ze.useCallback((Je,nt,ut)=>{if(n.debug("Displaying filter panel"),Je){const ht=lx(t),_t=ht.items.filter(dr=>{if(dr.value!==void 0)return!(Array.isArray(dr.value)&&dr.value.length===0);const Cr=t.current.getColumn(dr.field).filterOperators?.find(Vt=>Vt.value===dr.operator);return!(typeof Cr?.requiresFilterValue>"u"?!0:Cr?.requiresFilterValue)});let Dt;const qt=_t.find(dr=>dr.field===Je),Lt=t.current.getColumn(Je);qt?Dt=_t:e.disableMultipleColumnsFiltering?Dt=[mpe({field:Je,operator:Lt.filterOperators[0].value},t)]:Dt=[..._t,mpe({field:Je,operator:Lt.filterOperators[0].value},t)],t.current.setFilterModel(Mr({},ht,{items:Dt}))}t.current.showPreferences(H2.filters,nt,ut)},[t,n,e.disableMultipleColumnsFiltering]),L=ze.useCallback(()=>{n.debug("Hiding filter panel"),t.current.hidePreferences()},[t,n]),B=ze.useCallback(Je=>{const nt=lx(t);nt.logicOperator!==Je&&t.current.setFilterModel(Mr({},nt,{logicOperator:Je}),"changeLogicOperator")},[t]),V=ze.useCallback(Je=>{const nt=lx(t);Q3(nt.quickFilterValues,Je)||t.current.setFilterModel(Mr({},nt,{quickFilterValues:[...Je]}))},[t]),X=ze.useCallback((Je,nt)=>{lx(t)!==Je&&(n.debug("Setting filter model"),t.current.updateControlState("filter",YRe(Je,e.disableMultipleColumnsFiltering,t),nt),t.current.unstable_applyFilters())},[t,n,e.disableMultipleColumnsFiltering]),ie=ze.useCallback(Je=>{const nt=j0e(Je,e.disableMultipleColumnsFiltering,t),ut=r.hooks.useFilterValueGetter(t,e),ht=e.filterMode==="client"?X7t(nt,ut,t,e.disableEval):null,_t=t.current.applyStrategyProcessor("filtering",{isRowMatchingFilters:ht,filterModel:nt??V9(),filterValueGetter:ut});return Mr({},_t,{filterModel:nt})},[t,r.hooks,e]),de={setFilterLogicOperator:B,unstable_applyFilters:i,deleteFilterItem:d,upsertFilterItem:o,upsertFilterItems:s,setFilterModel:X,showFilterPanel:b,hideFilterPanel:L,setQuickFilterValues:V,ignoreDiacritics:e.ignoreDiacritics,getFilterState:ie};nh(t,de,"public");const ae=ze.useCallback((Je,nt)=>{const ut=lx(t);return ut.items.forEach(_t=>{delete _t.fromInput}),!nt.exportOnlyDirtyModels||e.filterModel!=null||e.initialState?.filter?.filterModel!=null||!Q3(ut,V9())?Mr({},Je,{filter:{filterModel:ut}}):Je},[t,e.filterModel,e.initialState?.filter?.filterModel]),U=ze.useCallback((Je,nt)=>{const ut=nt.stateToRestore.filter?.filterModel;return ut==null?Je:(t.current.updateControlState("filter",YRe(ut,e.disableMultipleColumnsFiltering,t),"restoreState"),Mr({},Je,{callbacks:[...Je.callbacks,t.current.unstable_applyFilters]}))},[t,e.disableMultipleColumnsFiltering]),ve=ze.useCallback((Je,nt)=>{if(nt===H2.filters){const ut=e.slots.filterPanel;return Ke.jsx(ut,Mr({},e.slotProps?.filterPanel))}return Je},[e.slots.filterPanel,e.slotProps?.filterPanel]),{getRowId:Se}=e,Pe=pE(aGt),Me=ze.useCallback(Je=>{if(e.filterMode!=="client"||!Je.isRowMatchingFilters||!Je.filterModel.items.length&&!Je.filterModel.quickFilterValues?.length)return Sqe;const nt=V3(t),ut={},{isRowMatchingFilters:ht}=Je,_t={},Dt={passingFilterItems:null,passingQuickFilterValues:null},qt=Pe.current(t.current.state.rows.dataRowIdToModelLookup);for(let Zt=0;Zt<qt.length;Zt+=1){const Cr=qt[Zt],yt=Se?Se(Cr):Cr.id;ht(Cr,void 0,Dt);const Vt=K7t([Dt.passingFilterItems],[Dt.passingQuickFilterValues],Je.filterModel,Je.filterValueGetter,t,_t);Vt||(ut[yt]=Vt)}const Lt="auto-generated-group-footer-root";return nt[Lt]&&(ut[Lt]=!0),{filteredRowsLookup:ut,filteredChildrenCountLookup:{},filteredDescendantCountLookup:{}}},[t,e.filterMode,Se,Pe]);O0(t,"columnMenu",a),O0(t,"exportState",ae),O0(t,"restoreState",U),O0(t,"preferencePanel",ve),W9(t,LL,"filtering",Me),W9(t,LL,"visibleRowsLookupCreation",iGt);const Ie=ze.useCallback(()=>{n.debug("onColUpdated - GridColumns changed, applying filters");const Je=lx(t),nt=qk(t),ut=Je.items.filter(ht=>ht.field&&nt[ht.field]);ut.length<Je.items.length&&t.current.setFilterModel(Mr({},Je,{items:ut}))},[t,n]),Ve=ze.useCallback(Je=>{Je==="filtering"&&t.current.unstable_applyFilters()},[t]),Ze=ze.useCallback(()=>{t.current.setState(Je=>Mr({},Je,{visibleRowsLookup:Rke(t,Je)}))},[t]);sc(t,"rowsSet",i),sc(t,"columnsChange",Ie),sc(t,"activeStrategyProcessorChange",Ve),sc(t,"rowExpansionChange",Ze),sc(t,"columnVisibilityModelChange",()=>{const Je=lx(t);Je.quickFilterValues?.length&&Iqe(Je)&&i()}),t6(()=>{i()}),Ah(()=>{e.filterModel!==void 0&&t.current.setFilterModel(e.filterModel)},[t,n,e.filterModel])},sGt=t=>Mr({},t,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},tabIndex:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}),lGt=(t,e)=>{const r=r_(t,"useGridFocus"),n=ze.useRef(null),i=t.current.rootElementRef.current!==null,a=ze.useCallback((Ze,Je)=>{Ze&&t.current.getRow(Ze.id)&&t.current.publishEvent("cellFocusOut",t.current.getCellParams(Ze.id,Ze.field),Je)},[t]),o=ze.useCallback((Ze,Je)=>{const nt=BS(t);nt?.id===Ze&&nt?.field===Je||(t.current.setState(ut=>(r.debug(`Focusing on cell with id=${Ze} and field=${Je}`),Mr({},ut,{tabIndex:{cell:{id:Ze,field:Je},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},focus:{cell:{id:Ze,field:Je},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))),t.current.getRow(Ze)&&(nt&&a(nt,{}),t.current.publishEvent("cellFocusIn",t.current.getCellParams(Ze,Je))))},[t,r,a]),s=ze.useCallback((Ze,Je={})=>{const nt=BS(t);a(nt,Je),t.current.setState(ut=>(r.debug(`Focusing on column header with colIndex=${Ze}`),Mr({},ut,{tabIndex:{columnHeader:{field:Ze},columnHeaderFilter:null,cell:null,columnGroupHeader:null},focus:{columnHeader:{field:Ze},columnHeaderFilter:null,cell:null,columnGroupHeader:null}})))},[t,r,a]),d=ze.useCallback((Ze,Je={})=>{const nt=BS(t);a(nt,Je),t.current.setState(ut=>(r.debug(`Focusing on column header filter with colIndex=${Ze}`),Mr({},ut,{tabIndex:{columnHeader:null,columnHeaderFilter:{field:Ze},cell:null,columnGroupHeader:null},focus:{columnHeader:null,columnHeaderFilter:{field:Ze},cell:null,columnGroupHeader:null}})))},[t,r,a]),b=ze.useCallback((Ze,Je,nt={})=>{const ut=BS(t);ut&&t.current.publishEvent("cellFocusOut",t.current.getCellParams(ut.id,ut.field),nt),t.current.setState(ht=>Mr({},ht,{tabIndex:{columnGroupHeader:{field:Ze,depth:Je},columnHeader:null,columnHeaderFilter:null,cell:null},focus:{columnGroupHeader:{field:Ze,depth:Je},columnHeader:null,columnHeaderFilter:null,cell:null}}))},[t]),L=ze.useCallback(()=>M$(t),[t]),B=ze.useCallback((Ze,Je,nt)=>{let ut=t.current.getColumnIndex(Je);const ht=uy(t),_t=jN(t,{pagination:e.pagination,paginationMode:e.paginationMode}),Dt=sF(t),qt=[].concat(Dt.top||[],_t.rows,Dt.bottom||[]);let Lt=qt.findIndex(yt=>yt.id===Ze);nt==="right"?ut+=1:nt==="left"?ut-=1:Lt+=1,ut>=ht.length?(Lt+=1,Lt<qt.length&&(ut=0)):ut<0&&(Lt-=1,Lt>=0&&(ut=ht.length-1)),Lt=fL(Lt,0,qt.length-1);const dr=qt[Lt];if(!dr)return;const Zt=t.current.unstable_getCellColSpanInfo(dr.id,ut);Zt&&Zt.spannedByColSpan&&(nt==="left"||nt==="below"?ut=Zt.leftVisibleCellIndex:nt==="right"&&(ut=Zt.rightVisibleCellIndex)),ut=fL(ut,0,ht.length-1);const Cr=ht[ut];t.current.setCellFocus(dr.id,Cr.field)},[t,e.pagination,e.paginationMode]),V=ze.useCallback(({id:Ze,field:Je})=>{t.current.setCellFocus(Ze,Je)},[t]),X=ze.useCallback((Ze,Je)=>{Je.key==="Enter"||Je.key==="Tab"||Je.key==="Shift"||C$(Je.key)||t.current.setCellFocus(Ze.id,Ze.field)},[t]),ie=ze.useCallback(({field:Ze},Je)=>{Je.target===Je.currentTarget&&t.current.setColumnHeaderFocus(Ze,Je)},[t]),de=ze.useCallback(({fields:Ze,depth:Je},nt)=>{if(nt.target!==nt.currentTarget)return;const ut=M$(t);ut!==null&&ut.depth===Je&&Ze.includes(ut.field)||t.current.setColumnGroupHeaderFocus(Ze[0],Je,nt)},[t]),ae=ze.useCallback((Ze,Je)=>{Je.relatedTarget?.getAttribute("class")?.includes(Bi.columnHeader)||(r.debug("Clearing focus"),t.current.setState(nt=>Mr({},nt,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})))},[r,t]),U=ze.useCallback(Ze=>{n.current=Ze},[]),ve=ze.useCallback(Ze=>{const Je=n.current;n.current=null;const nt=BS(t);if(!t.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:Ze,cell:Je}))return;if(!nt){Je&&t.current.setCellFocus(Je.id,Je.field);return}Je?.id===nt.id&&Je?.field===nt.field||t.current.getCellElement(nt.id,nt.field)?.contains(Ze.target)||(Je?t.current.setCellFocus(Je.id,Je.field):(t.current.setState(_t=>Mr({},_t,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})),a(nt,Ze)))},[t,a]),Se=ze.useCallback(Ze=>{if(Ze.cellMode==="view")return;const Je=BS(t);(Je?.id!==Ze.id||Je?.field!==Ze.field)&&t.current.setCellFocus(Ze.id,Ze.field)},[t]),Pe=ze.useCallback(()=>{const Ze=BS(t);if(Ze&&!t.current.getRow(Ze.id)){const Je=Ze.id;let nt=null;if(typeof Je<"u"){const ut=t.current.getRowElement(Je),ht=ut?.dataset.rowindex?Number(ut?.dataset.rowindex):0,_t=jN(t,{pagination:e.pagination,paginationMode:e.paginationMode});nt=_t.rows[fL(ht,0,_t.rows.length-1)]?.id??null}t.current.setState(ut=>Mr({},ut,{focus:{cell:nt===null?null:{id:nt,field:Ze.field},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))}},[t,e.pagination,e.paginationMode]),Me=vl(()=>{const Ze=BS(t);if(!Ze)return;const Je=jN(t,{pagination:e.pagination,paginationMode:e.paginationMode});if(Je.rows.find(ht=>ht.id===Ze.id)||Je.rows.length===0)return;const ut=uy(t);t.current.setState(ht=>Mr({},ht,{tabIndex:{cell:{id:Je.rows[0].id,field:ut[0].field},columnGroupHeader:null,columnHeader:null,columnHeaderFilter:null}}))}),Ie={setCellFocus:o,setColumnHeaderFocus:s,setColumnHeaderFilterFocus:d},Ve={moveFocusToRelativeCell:B,setColumnGroupHeaderFocus:b,getColumnGroupHeaderFocus:L};nh(t,Ie,"public"),nh(t,Ve,"private"),ze.useEffect(()=>{const Ze=Lm(t.current.rootElementRef.current);return Ze.addEventListener("mouseup",ve),()=>{Ze.removeEventListener("mouseup",ve)}},[t,i,ve]),sc(t,"columnHeaderBlur",ae),sc(t,"cellDoubleClick",V),sc(t,"cellMouseDown",U),sc(t,"cellKeyDown",X),sc(t,"cellModeChange",Se),sc(t,"columnHeaderFocus",ie),sc(t,"columnGroupHeaderFocus",de),sc(t,"rowsSet",Pe),sc(t,"paginationModelChange",Me)},eae=({currentColIndex:t,firstColIndex:e,lastColIndex:r,isRtl:n})=>{if(n){if(t<r)return t+1}else if(!n&&t>e)return t-1;return null},tae=({currentColIndex:t,firstColIndex:e,lastColIndex:r,isRtl:n})=>{if(n){if(t>e)return t-1}else if(!n&&t<r)return t+1;return null};function uGt(t,e,r,n){const i=f8.selectors.hiddenCells(t.current.virtualizer.store.state);if(!i[e]?.[r])return e;const a=Hqe(t);let o=a.indexOf(e)+(n==="down"?1:-1);for(;o>=0&&o<a.length;){const s=a[o];if(!i[s]?.[r])return s;o+=n==="down"?1:-1}return e}const cGt=av(sU,sF,(t,e)=>(e.top||[]).concat(t.rows,e.bottom||[])),fGt=(t,e)=>{const r=r_(t,"useGridKeyboardNavigation"),n=Kv(),i=ze.useCallback(()=>cGt(t),[t]),a=e.signature!=="DataGrid"&&e.headerFilters,o=ze.useCallback((ae,U,ve="left",Se="up")=>{const Pe=e6(t),Me=t.current.unstable_getCellColSpanInfo(U,ae);Me&&Me.spannedByColSpan&&(ve==="left"?ae=Me.leftVisibleCellIndex:ve==="right"&&(ae=Me.rightVisibleCellIndex));const Ie=iU(t)[ae],Ve=uGt(t,U,ae,Se),Ze=Pe.findIndex(Je=>Je.id===Ve);r.debug(`Navigating to cell row ${Ze}, col ${ae}`),t.current.scrollToIndexes({colIndex:ae,rowIndex:Ze}),t.current.setCellFocus(Ve,Ie)},[t,r]),s=ze.useCallback((ae,U)=>{r.debug(`Navigating to header col ${ae}`),t.current.scrollToIndexes({colIndex:ae});const ve=t.current.getVisibleColumns()[ae].field;t.current.setColumnHeaderFocus(ve,U)},[t,r]),d=ze.useCallback((ae,U)=>{r.debug(`Navigating to header filter col ${ae}`),t.current.scrollToIndexes({colIndex:ae});const ve=t.current.getVisibleColumns()[ae].field;t.current.setColumnHeaderFilterFocus(ve,U)},[t,r]),b=ze.useCallback((ae,U,ve)=>{r.debug(`Navigating to header col ${ae}`),t.current.scrollToIndexes({colIndex:ae});const{field:Se}=t.current.getVisibleColumns()[ae];t.current.setColumnGroupHeaderFocus(Se,U,ve)},[t,r]),L=ze.useCallback(ae=>i()[ae]?.id,[i]),B=ze.useCallback((ae,U)=>{const ve=U.currentTarget.querySelector(`.${Bi.columnHeaderTitleContainerContent}`);if(!!ve&&ve.contains(U.target)&&ae.field!==cF.field)return;const Pe=i(),Me=t.current.getViewportPageSize(),Ie=ae.field?t.current.getColumnIndex(ae.field):0,Ve=Pe.length>0?0:null,Ze=Pe.length-1,Je=0,nt=uy(t).length-1,ut=lU(t);let ht=!0;switch(U.key){case"ArrowDown":{a?d(Ie,U):Ve!==null&&o(Ie,L(Ve));break}case"ArrowRight":{const _t=tae({currentColIndex:Ie,firstColIndex:Je,lastColIndex:nt,isRtl:n});_t!==null&&s(_t,U);break}case"ArrowLeft":{const _t=eae({currentColIndex:Ie,firstColIndex:Je,lastColIndex:nt,isRtl:n});_t!==null&&s(_t,U);break}case"ArrowUp":{ut>0&&b(Ie,ut-1,U);break}case"PageDown":{Ve!==null&&Ze!==null&&o(Ie,L(Math.min(Ve+Me,Ze)));break}case"Home":{s(Je,U);break}case"End":{s(nt,U);break}case"Enter":{(U.ctrlKey||U.metaKey)&&t.current.toggleColumnMenu(ae.field);break}case" ":break;default:ht=!1}ht&&U.preventDefault()},[t,i,a,d,o,L,n,s,b]),V=ze.useCallback((ae,U)=>{const ve=E9t(t)===ae.field,Se=A9t(t)===ae.field;if(ve||Se||!C$(U.key))return;const Pe=i(),Me=t.current.getViewportPageSize(),Ie=ae.field?t.current.getColumnIndex(ae.field):0,Ve=0,Ze=Pe.length-1,Je=0,nt=uy(t).length-1;let ut=!0;switch(U.key){case"ArrowDown":{const ht=L(Ve);ht!=null&&o(Ie,ht);break}case"ArrowRight":{const ht=tae({currentColIndex:Ie,firstColIndex:Je,lastColIndex:nt,isRtl:n});ht!==null&&d(ht,U);break}case"ArrowLeft":{const ht=eae({currentColIndex:Ie,firstColIndex:Je,lastColIndex:nt,isRtl:n});ht!==null?d(ht,U):t.current.setColumnHeaderFilterFocus(ae.field,U);break}case"ArrowUp":{s(Ie,U);break}case"PageDown":{Ze!==null&&o(Ie,L(Math.min(Ve+Me,Ze)));break}case"Home":{d(Je,U);break}case"End":{d(nt,U);break}case" ":break;default:ut=!1}ut&&U.preventDefault()},[t,i,d,n,s,o,L]),X=ze.useCallback((ae,U)=>{const ve=M$(t);if(ve===null)return;const{field:Se,depth:Pe}=ve,{fields:Me,depth:Ie,maxDepth:Ve}=ae,Ze=i(),Je=t.current.getViewportPageSize(),nt=t.current.getColumnIndex(Se),ut=Se?t.current.getColumnIndex(Se):0,ht=0,_t=Ze.length-1,Dt=0,qt=uy(t).length-1;let Lt=!0;switch(U.key){case"ArrowDown":{Ie===Ve-1?s(nt,U):b(nt,Pe+1,U);break}case"ArrowUp":{Ie>0&&b(nt,Pe-1,U);break}case"ArrowRight":{const dr=Me.length-Me.indexOf(Se)-1;nt+dr+1<=qt&&b(nt+dr+1,Pe,U);break}case"ArrowLeft":{const dr=Me.indexOf(Se);nt-dr-1>=Dt&&b(nt-dr-1,Pe,U);break}case"PageDown":{_t!==null&&o(ut,L(Math.min(ht+Je,_t)));break}case"Home":{b(Dt,Pe,U);break}case"End":{b(qt,Pe,U);break}case" ":break;default:Lt=!1}Lt&&U.preventDefault()},[t,i,s,b,o,L]),ie=ze.useCallback((ae,U)=>{if(cU(U))return;const ve=t.current.getCellParams(ae.id,ae.field);if(ve.cellMode===$v.Edit||!C$(U.key)||!t.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:U,cell:ve}))return;const Pe=i();if(Pe.length===0)return;const Me=t.current.getViewportPageSize(),Ie=ae.field?t.current.getColumnIndex(ae.field):0,Ve=Pe.findIndex(_t=>_t.id===ae.id),Ze=0,Je=Pe.length-1,nt=0,ut=uy(t).length-1;let ht=!0;switch(U.key){case"ArrowDown":{Ve<Je&&o(Ie,L(Ve+1),n?"right":"left","down");break}case"ArrowUp":{Ve>Ze?o(Ie,L(Ve-1)):a?d(Ie,U):s(Ie,U);break}case"ArrowRight":{const _t=tae({currentColIndex:Ie,firstColIndex:nt,lastColIndex:ut,isRtl:n});_t!==null&&o(_t,L(Ve),n?"left":"right");break}case"ArrowLeft":{const _t=eae({currentColIndex:Ie,firstColIndex:nt,lastColIndex:ut,isRtl:n});_t!==null&&o(_t,L(Ve),n?"right":"left");break}case"Tab":{U.shiftKey&&Ie>nt?o(Ie-1,L(Ve),"left"):!U.shiftKey&&Ie<ut&&o(Ie+1,L(Ve),"right");break}case" ":{if(ae.field===q0e)break;const Dt=ae.colDef;if(Dt&&(Dt.field===pzt||pUt(Dt.field)))break;!U.shiftKey&&Ve<Je&&o(Ie,L(Math.min(Ve+Me,Je)));break}case"PageDown":{Ve<Je&&o(Ie,L(Math.min(Ve+Me,Je)));break}case"PageUp":{const _t=Math.max(Ve-Me,Ze);_t!==Ve&&_t>=Ze?o(Ie,L(_t)):s(Ie,U);break}case"Home":{U.ctrlKey||U.metaKey||U.shiftKey?o(nt,L(Ze)):o(nt,L(Ve));break}case"End":{U.ctrlKey||U.metaKey||U.shiftKey?o(ut,L(Je)):o(ut,L(Ve));break}default:ht=!1}ht&&U.preventDefault()},[t,i,n,o,L,a,d,s]),de=ze.useCallback((ae,{event:U})=>U.key===" "?!1:ae,[]);O0(t,"canStartEditing",de),sc(t,"columnHeaderKeyDown",B),sc(t,"headerFilterKeyDown",V),sc(t,"columnGroupHeaderKeyDown",X),sc(t,"cellKeyDown",ie)},dGt=(t,e)=>{const r=r_(t,"useGridRowCount"),n=wl(t,Y0e),i=wl(t,TN),a=wl(t,Lz),o=wl(t,Yx),s=pE(()=>Yx(t).pageSize);t.current.registerControlState({stateId:"paginationRowCount",propModel:e.rowCount,propOnChange:e.onRowCountChange,stateSelector:TN,changeEvent:"rowCountChange"});const b={setRowCount:ze.useCallback(ie=>{i!==ie&&(r.debug("Setting 'rowCount' to",ie),t.current.setState(de=>Mr({},de,{pagination:Mr({},de.pagination,{rowCount:ie})})))},[t,r,i])};nh(t,b,"public");const L=ze.useCallback((ie,de)=>{const ae=TN(t);return!de.exportOnlyDirtyModels||e.rowCount!=null||e.initialState?.pagination?.rowCount!=null?Mr({},ie,{pagination:Mr({},ie.pagination,{rowCount:ae})}):ie},[t,e.rowCount,e.initialState?.pagination?.rowCount]),B=ze.useCallback((ie,de)=>{const ae=de.stateToRestore.pagination?.rowCount?de.stateToRestore.pagination.rowCount:TN(t);return t.current.setState(U=>Mr({},U,{pagination:Mr({},U.pagination,{rowCount:ae})})),ie},[t]);O0(t,"exportState",L),O0(t,"restoreState",B);const V=ze.useCallback(ie=>{e.paginationMode==="client"||!s.current||ie.pageSize!==s.current&&(s.current=ie.pageSize,i===-1&&t.current.setPage(0))},[e.paginationMode,s,i,t]);sc(t,"paginationModelChange",V),ze.useEffect(()=>{e.paginationMode==="client"?t.current.setRowCount(n):e.rowCount!=null&&t.current.setRowCount(e.rowCount)},[t,e.paginationMode,n,e.rowCount]);const X=a.hasNextPage===!1;ze.useEffect(()=>{X&&i===-1&&t.current.setRowCount(o.pageSize*o.page+n)},[t,n,X,i,o])},hGt=(t,e)=>{const r=r_(t,"useGridPaginationMeta"),n=wl(t,Lz);t.current.registerControlState({stateId:"paginationMeta",propModel:e.paginationMeta,propOnChange:e.onPaginationMetaChange,stateSelector:Lz,changeEvent:"paginationMetaChange"});const a={setPaginationMeta:ze.useCallback(d=>{n!==d&&(r.debug("Setting 'paginationMeta' to",d),t.current.setState(b=>Mr({},b,{pagination:Mr({},b.pagination,{meta:d})})))},[t,r,n])};nh(t,a,"public");const o=ze.useCallback((d,b)=>{const L=Lz(t);return!b.exportOnlyDirtyModels||e.paginationMeta!=null||e.initialState?.pagination?.meta!=null?Mr({},d,{pagination:Mr({},d.pagination,{meta:L})}):d},[t,e.paginationMeta,e.initialState?.pagination?.meta]),s=ze.useCallback((d,b)=>{const L=b.stateToRestore.pagination?.meta?b.stateToRestore.pagination.meta:Lz(t);return t.current.setState(B=>Mr({},B,{pagination:Mr({},B.pagination,{meta:L})})),d},[t]);O0(t,"exportState",o),O0(t,"restoreState",s),ze.useEffect(()=>{e.paginationMeta&&t.current.setPaginationMeta(e.paginationMeta)},[t,e.paginationMeta])},pGt=(t,e)=>{const r=Mr({},Yqe(e.autoPageSize),e.paginationModel??e.initialState?.pagination?.paginationModel);Xqe(r.pageSize,e.signature);const n=e.rowCount??e.initialState?.pagination?.rowCount??(e.paginationMode==="client"?t.rows?.totalRowCount:void 0),i=e.paginationMeta??e.initialState?.pagination?.meta??{};return Mr({},t,{pagination:Mr({},t.pagination,{paginationModel:r,rowCount:n,meta:i,enabled:e.pagination===!0,paginationMode:e.paginationMode})})},vGt=(t,e)=>{hGt(t,e),Qqt(t,e),dGt(t,e)},mGt=(t,e)=>Mr({},t,{preferencePanel:e.initialState?.preferencePanel??{open:!1}}),gGt=(t,e)=>{const r=r_(t,"useGridPreferencesPanel"),n=ze.useCallback(()=>{t.current.setState(s=>{if(!s.preferencePanel.open)return s;r.debug("Hiding Preferences Panel");const d=DL(t);return t.current.publishEvent("preferencePanelClose",{openedPanelValue:d.openedPanelValue}),Mr({},s,{preferencePanel:{open:!1}})})},[t,r]),i=ze.useCallback((s,d,b)=>{r.debug("Opening Preferences Panel"),t.current.setState(L=>Mr({},L,{preferencePanel:Mr({},L.preferencePanel,{open:!0,openedPanelValue:s,panelId:d,labelId:b})})),t.current.publishEvent("preferencePanelOpen",{openedPanelValue:s})},[r,t]);nh(t,{showPreferences:i,hidePreferences:n},"public");const a=ze.useCallback((s,d)=>{const b=DL(t);return!d.exportOnlyDirtyModels||e.initialState?.preferencePanel!=null||b.open?Mr({},s,{preferencePanel:b}):s},[t,e.initialState?.preferencePanel]),o=ze.useCallback((s,d)=>{const b=d.stateToRestore.preferencePanel;return b!=null&&t.current.setState(L=>Mr({},L,{preferencePanel:b})),s},[t]);O0(t,"exportState",a),O0(t,"restoreState",o)},_pe=t=>{switch(t.type){case"boolean":return!1;case"date":case"dateTime":case"number":return;case"singleSelect":return null;case"string":default:return""}},yGt=["id","field"],bGt=["id","field"],xGt=(t,e)=>{const[r,n]=ze.useState({}),i=ze.useRef(r),a=ze.useRef({}),{processRowUpdate:o,onProcessRowUpdateError:s,cellModesModel:d,onCellModesModelChange:b}=e,L=qt=>(...Lt)=>{e.editMode===B5.Cell&&qt(...Lt)},B=ze.useCallback((qt,Lt)=>{const dr=t.current.getCellParams(qt,Lt);if(!t.current.isCellEditable(dr))throw new Error(`MUI X: The cell with id=${qt} and field=${Lt} is not editable.`)},[t]),V=ze.useCallback((qt,Lt,dr)=>{if(t.current.getCellMode(qt,Lt)!==dr)throw new Error(`MUI X: The cell with id=${qt} and field=${Lt} is not in ${dr} mode.`)},[t]),X=ze.useCallback((qt,Lt)=>{if(!qt.isEditable||qt.cellMode===$v.Edit)return;const dr=Mr({},qt,{reason:hk.cellDoubleClick});t.current.publishEvent("cellEditStart",dr,Lt)},[t]),ie=ze.useCallback((qt,Lt)=>{if(qt.cellMode===$v.View||t.current.getCellMode(qt.id,qt.field)===$v.View)return;const dr=Mr({},qt,{reason:EC.cellFocusOut});t.current.publishEvent("cellEditStop",dr,Lt)},[t]),de=ze.useCallback((qt,Lt)=>{if(qt.cellMode===$v.Edit){if(Lt.which===229)return;let dr;if(Lt.key==="Escape"?dr=EC.escapeKeyDown:Lt.key==="Enter"?dr=EC.enterKeyDown:Lt.key==="Tab"&&(dr=Lt.shiftKey?EC.shiftTabKeyDown:EC.tabKeyDown,Lt.preventDefault()),dr){const Zt=Mr({},qt,{reason:dr});t.current.publishEvent("cellEditStop",Zt,Lt)}}else if(qt.isEditable){let dr;if(!t.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:Lt,cellParams:qt,editMode:"cell"}))return;if(Pqe(Lt)?dr=hk.printableKeyDown:Lqe(Lt)?dr=hk.pasteKeyDown:Lt.key==="Enter"?dr=hk.enterKeyDown:(Lt.key==="Backspace"||Lt.key==="Delete")&&(dr=hk.deleteKeyDown),dr){const Cr=Mr({},qt,{reason:dr,key:Lt.key});t.current.publishEvent("cellEditStart",Cr,Lt)}}},[t]),ae=ze.useCallback(qt=>{const{id:Lt,field:dr,reason:Zt}=qt,Cr={id:Lt,field:dr};(Zt===hk.printableKeyDown||Zt===hk.deleteKeyDown||Zt===hk.pasteKeyDown)&&(Cr.deleteValue=!0),t.current.startCellEditMode(Cr)},[t]),U=ze.useCallback(qt=>{const{id:Lt,field:dr,reason:Zt}=qt;t.current.runPendingEditCellValueMutation(Lt,dr);let Cr;Zt===EC.enterKeyDown?Cr="below":Zt===EC.tabKeyDown?Cr="right":Zt===EC.shiftTabKeyDown&&(Cr="left");const yt=Zt==="escapeKeyDown";t.current.stopCellEditMode({id:Lt,field:dr,ignoreModifications:yt,cellToFocusAfter:Cr})},[t]),ve=qt=>async(...Lt)=>{if(qt){const{id:dr,field:Zt}=Lt[0];t.current.state.editRows[dr][Zt]?.error||qt(...Lt)}};sc(t,"cellDoubleClick",L(X)),sc(t,"cellFocusOut",L(ie)),sc(t,"cellKeyDown",L(de)),sc(t,"cellEditStart",L(ae)),sc(t,"cellEditStop",L(U)),Zm(t,"cellEditStart",e.onCellEditStart),Zm(t,"cellEditStop",ve(e.onCellEditStop));const Se=ze.useCallback((qt,Lt)=>{const dr=ux(t);return dr[qt]&&dr[qt][Lt]?$v.Edit:$v.View},[t]),Pe=vl(qt=>{const Lt=qt!==e.cellModesModel;b&&Lt&&b(qt,{api:t.current}),!(e.cellModesModel&&Lt)&&(n(qt),i.current=qt,t.current.publishEvent("cellModesModelChange",qt))}),Me=ze.useCallback((qt,Lt,dr)=>{const Zt=Mr({},i.current);if(dr!==null)Zt[qt]=Mr({},Zt[qt],{[Lt]:Mr({},dr)});else{const Cr=Zt[qt],yt=Ms(Cr,[Lt].map(d8));Zt[qt]=yt,Object.keys(Zt[qt]).length===0&&delete Zt[qt]}Pe(Zt)},[Pe]),Ie=ze.useCallback((qt,Lt,dr)=>{t.current.setState(Zt=>{const Cr=Mr({},Zt.editRows);return dr!==null?Cr[qt]=Mr({},Cr[qt],{[Lt]:Mr({},dr)}):(delete Cr[qt][Lt],Object.keys(Cr[qt]).length===0&&delete Cr[qt]),Mr({},Zt,{editRows:Cr})})},[t]),Ve=ze.useCallback(qt=>{const{id:Lt,field:dr}=qt,Zt=Ms(qt,yGt);B(Lt,dr),V(Lt,dr,$v.View),Me(Lt,dr,Mr({mode:$v.Edit},Zt))},[B,V,Me]),Ze=vl(async qt=>{const{id:Lt,field:dr,deleteValue:Zt,initialValue:Cr}=qt,yt=t.current.getCellValue(Lt,dr);let Vt=yt;Zt?Vt=_pe(t.current.getColumn(dr)):Cr&&(Vt=Cr);const Er=t.current.getColumn(dr),sr=!!Er.preProcessEditCellProps&&Zt;let or={value:Vt,error:!1,isProcessingProps:sr};if(Ie(Lt,dr,or),t.current.setCellFocus(Lt,dr),sr&&(or=await Promise.resolve(Er.preProcessEditCellProps({id:Lt,row:t.current.getRow(Lt),props:or,hasChanged:Vt!==yt})),t.current.getCellMode(Lt,dr)===$v.Edit)){const Ar=ux(t);Ie(Lt,dr,Mr({},or,{value:Ar[Lt][dr].value,isProcessingProps:!1}))}}),Je=ze.useCallback(qt=>{const{id:Lt,field:dr}=qt,Zt=Ms(qt,bGt);V(Lt,dr,$v.Edit),Me(Lt,dr,Mr({mode:$v.View},Zt))},[V,Me]),nt=vl(async qt=>{const{id:Lt,field:dr,ignoreModifications:Zt,cellToFocusAfter:Cr="none"}=qt;V(Lt,dr,$v.Edit),t.current.runPendingEditCellValueMutation(Lt,dr);const yt=()=>{Ie(Lt,dr,null),Me(Lt,dr,null),Cr!=="none"&&t.current.moveFocusToRelativeCell(Lt,dr,Cr)};if(Zt){yt();return}const Vt=ux(t),{error:Er,isProcessingProps:sr}=Vt[Lt][dr],or=t.current.getRow(Lt);if(Er||sr){a.current[Lt][dr].mode=$v.Edit,Me(Lt,dr,{mode:$v.Edit});return}const Ar=t.current.getRowWithUpdatedValuesFromCellEditing(Lt,dr);if(e.dataSource?.updateRow){if(Q3(or,Ar)){yt();return}const Ir=()=>{a.current[Lt][dr].mode=$v.Edit,Me(Lt,dr,{mode:$v.Edit})},_n={rowId:Lt,updatedRow:Ar,previousRow:or};try{await t.current.dataSource.editRow(_n),yt()}catch{Ir()}}else if(o){const Ir=_n=>{a.current[Lt][dr].mode=$v.Edit,Me(Lt,dr,{mode:$v.Edit}),s&&s(_n)};try{Promise.resolve(o(Ar,or,{rowId:Lt})).then(_n=>{t.current.updateRows([_n]),yt()}).catch(Ir)}catch(_n){Ir(_n)}}else t.current.updateRows([Ar]),yt()}),ut=ze.useCallback(async qt=>{const{id:Lt,field:dr,value:Zt,debounceMs:Cr,unstable_skipValueParser:yt}=qt;B(Lt,dr),V(Lt,dr,$v.Edit);const Vt=t.current.getColumn(dr),Er=t.current.getRow(Lt);let sr=Zt;Vt.valueParser&&!yt&&(sr=Vt.valueParser(Zt,Er,Vt,t));let or=ux(t),Ar=Mr({},or[Lt][dr],{value:sr,changeReason:Cr?"debouncedSetEditCellValue":"setEditCellValue"});if(Vt.preProcessEditCellProps){const Ir=Zt!==or[Lt][dr].value;Ar=Mr({},Ar,{isProcessingProps:!0}),Ie(Lt,dr,Ar),Ar=await Promise.resolve(Vt.preProcessEditCellProps({id:Lt,row:Er,props:Ar,hasChanged:Ir}))}return t.current.getCellMode(Lt,dr)===$v.View?!1:(or=ux(t),Ar=Mr({},Ar,{isProcessingProps:!1}),Ar.value=Vt.preProcessEditCellProps?or[Lt][dr].value:sr,Ie(Lt,dr,Ar),or=ux(t),!or[Lt]?.[dr]?.error)},[t,B,V,Ie]),ht=ze.useCallback((qt,Lt)=>{const dr=t.current.getColumn(Lt),Zt=ux(t),Cr=t.current.getRow(qt);if(!Zt[qt]||!Zt[qt][Lt])return t.current.getRow(qt);const{value:yt}=Zt[qt][Lt];return dr.valueSetter?dr.valueSetter(yt,Cr,dr,t):Mr({},Cr,{[Lt]:yt})},[t]),_t={getCellMode:Se,startCellEditMode:Ve,stopCellEditMode:Je},Dt={setCellEditingEditCellValue:ut,getRowWithUpdatedValuesFromCellEditing:ht};nh(t,_t,"public"),nh(t,Dt,"private"),ze.useEffect(()=>{d&&Pe(d)},[d,Pe]),Ah(()=>{const qt=V3(t),Lt=a.current;a.current=xqe(r),Object.entries(r).forEach(([dr,Zt])=>{Object.entries(Zt).forEach(([Cr,yt])=>{const Vt=Lt[dr]?.[Cr]?.mode||$v.View,Er=qt[dr]?t.current.getRowId(qt[dr]):dr;yt.mode===$v.Edit&&Vt===$v.View?Ze(Mr({id:Er,field:Cr},yt)):yt.mode===$v.View&&Vt===$v.Edit&&nt(Mr({id:Er,field:Cr},yt))})})},[t,r,Ze,nt])},_Gt=["id"],wGt=["id"],SGt=(t,e)=>{const[r,n]=ze.useState({}),i=ze.useRef(r),a=ze.useRef({}),o=ze.useRef({}),s=ze.useRef(void 0),d=ze.useRef(null),{processRowUpdate:b,onProcessRowUpdateError:L,rowModesModel:B,onRowModesModelChange:V}=e,X=yt=>(...Vt)=>{e.editMode===B5.Row&&yt(...Vt)},ie=ze.useCallback((yt,Vt)=>{const Er=t.current.getCellParams(yt,Vt);if(!t.current.isCellEditable(Er))throw new Error(`MUI X: The cell with id=${yt} and field=${Vt} is not editable.`)},[t]),de=ze.useCallback((yt,Vt)=>{if(t.current.getRowMode(yt)!==Vt)throw new Error(`MUI X: The row with id=${yt} is not in ${Vt} mode.`)},[t]),ae=ze.useCallback(yt=>{const Vt=ux(t);return Object.values(Vt[yt]).some(Er=>Er.error)},[t]),U=ze.useCallback((yt,Vt)=>{if(!yt.isEditable||t.current.getRowMode(yt.id)===Lg.Edit)return;const Er=t.current.getRowParams(yt.id),sr=Mr({},Er,{field:yt.field,reason:wP.cellDoubleClick});t.current.publishEvent("rowEditStart",sr,Vt)},[t]),ve=ze.useCallback(yt=>{d.current=yt},[]),Se=ze.useCallback((yt,Vt)=>{yt.isEditable&&t.current.getRowMode(yt.id)!==Lg.View&&(d.current=null,s.current=setTimeout(()=>{if(d.current?.id!==yt.id){if(!t.current.getRow(yt.id)||t.current.getRowMode(yt.id)===Lg.View||ae(yt.id))return;const Er=t.current.getRowParams(yt.id),sr=Mr({},Er,{field:yt.field,reason:f5.rowFocusOut});t.current.publishEvent("rowEditStop",sr,Vt)}}))},[t,ae]);ze.useEffect(()=>()=>{clearTimeout(s.current)},[]);const Pe=ze.useCallback((yt,Vt)=>{if(yt.cellMode===Lg.Edit){if(Vt.which===229)return;let Er;if(Vt.key==="Escape")Er=f5.escapeKeyDown;else if(Vt.key==="Enter")Er=f5.enterKeyDown;else if(Vt.key==="Tab"){const sr=iU(t).filter(or=>t.current.getColumn(or).type===MX?!0:t.current.isCellEditable(t.current.getCellParams(yt.id,or)));if(Vt.shiftKey?yt.field===sr[0]&&(Er=f5.shiftTabKeyDown):yt.field===sr[sr.length-1]&&(Er=f5.tabKeyDown),Vt.preventDefault(),!Er){const or=sr.findIndex(Ir=>Ir===yt.field),Ar=sr[Vt.shiftKey?or-1:or+1];t.current.setCellFocus(yt.id,Ar)}}if(Er){if(Er!==f5.escapeKeyDown&&ae(yt.id))return;const sr=Mr({},t.current.getRowParams(yt.id),{reason:Er,field:yt.field});t.current.publishEvent("rowEditStop",sr,Vt)}}else if(yt.isEditable){let Er;if(!t.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:Vt,cellParams:yt,editMode:"row"}))return;if(Pqe(Vt)||Lqe(Vt)?Er=wP.printableKeyDown:Vt.key==="Enter"?Er=wP.enterKeyDown:(Vt.key==="Backspace"||Vt.key==="Delete")&&(Er=wP.deleteKeyDown),Er){const or=t.current.getRowParams(yt.id),Ar=Mr({},or,{field:yt.field,reason:Er});t.current.publishEvent("rowEditStart",Ar,Vt)}}},[t,ae]),Me=ze.useCallback(yt=>{const{id:Vt,field:Er,reason:sr}=yt,or={id:Vt,fieldToFocus:Er};(sr===wP.printableKeyDown||sr===wP.deleteKeyDown)&&(or.deleteValue=!!Er),t.current.startRowEditMode(or)},[t]),Ie=ze.useCallback(yt=>{const{id:Vt,reason:Er,field:sr}=yt;t.current.runPendingEditCellValueMutation(Vt);let or;Er===f5.enterKeyDown?or="below":Er===f5.tabKeyDown?or="right":Er===f5.shiftTabKeyDown&&(or="left");const Ar=Er==="escapeKeyDown";t.current.stopRowEditMode({id:Vt,ignoreModifications:Ar,field:sr,cellToFocusAfter:or})},[t]);sc(t,"cellDoubleClick",X(U)),sc(t,"cellFocusIn",X(ve)),sc(t,"cellFocusOut",X(Se)),sc(t,"cellKeyDown",X(Pe)),sc(t,"rowEditStart",X(Me)),sc(t,"rowEditStop",X(Ie)),Zm(t,"rowEditStart",e.onRowEditStart),Zm(t,"rowEditStop",e.onRowEditStop);const Ve=ze.useCallback(yt=>hGe(t,{rowId:yt,editMode:e.editMode})?Lg.Edit:Lg.View,[t,e.editMode]),Ze=vl(yt=>{const Vt=yt!==e.rowModesModel;V&&Vt&&V(yt,{api:t.current}),!(e.rowModesModel&&Vt)&&(n(yt),i.current=yt,t.current.publishEvent("rowModesModelChange",yt))}),Je=ze.useCallback((yt,Vt)=>{const Er=Mr({},i.current);Vt!==null?Er[yt]=Mr({},Vt):delete Er[yt],Ze(Er)},[Ze]),nt=ze.useCallback((yt,Vt)=>{t.current.setState(Er=>{const sr=Mr({},Er.editRows);return Vt!==null?sr[yt]=Vt:delete sr[yt],Mr({},Er,{editRows:sr})})},[t]),ut=ze.useCallback((yt,Vt,Er)=>{t.current.setState(sr=>{const or=Mr({},sr.editRows);return Er!==null?or[yt]=Mr({},or[yt],{[Vt]:Mr({},Er)}):(delete or[yt][Vt],Object.keys(or[yt]).length===0&&delete or[yt]),Mr({},sr,{editRows:or})})},[t]),ht=ze.useCallback(yt=>{const{id:Vt}=yt,Er=Ms(yt,_Gt);de(Vt,Lg.View),Je(Vt,Mr({mode:Lg.Edit},Er))},[de,Je]),_t=vl(yt=>{const{id:Vt,fieldToFocus:Er,deleteValue:sr,initialValue:or}=yt,Ar=t.current.getRow(Vt),Ir=J3(t),_n=Ir.reduce((Un,Qn)=>{const Jn=Qn.field;if(!t.current.getCellParams(Vt,Jn).isEditable)return Un;const jn=t.current.getColumn(Jn);let Lr=t.current.getCellValue(Vt,Jn);return Er===Jn&&(sr||or)&&(sr?Lr=_pe(jn):or&&(Lr=or)),Un[Jn]={value:Lr,error:!1,isProcessingProps:jn.editable&&!!jn.preProcessEditCellProps&&sr},Un},{});o.current[Vt]=Ar,nt(Vt,_n),Er&&t.current.setCellFocus(Vt,Er),Ir.filter(Un=>t.current.getCellParams(Vt,Un.field).isEditable&&Un.editable&&!!Un.preProcessEditCellProps&&sr).forEach(Un=>{const Qn=Un.field,Jn=t.current.getCellValue(Vt,Qn),Vn=sr?_pe(Un):or??Jn;Promise.resolve(Un.preProcessEditCellProps({id:Vt,row:Ar,props:_n[Qn],hasChanged:Vn!==Jn})).then(jn=>{if(t.current.getRowMode(Vt)===Lg.Edit){const Lr=ux(t);ut(Vt,Qn,Mr({},jn,{value:Lr[Vt][Qn].value,isProcessingProps:!1}))}})})}),Dt=ze.useCallback(yt=>{const{id:Vt}=yt,Er=Ms(yt,wGt);de(Vt,Lg.Edit),Je(Vt,Mr({mode:Lg.View},Er))},[de,Je]),qt=vl(async yt=>{const{id:Vt,ignoreModifications:Er,field:sr,cellToFocusAfter:or="none"}=yt;t.current.runPendingEditCellValueMutation(Vt);const Ar=()=>{or!=="none"&&sr&&t.current.moveFocusToRelativeCell(Vt,sr,or),nt(Vt,null),Je(Vt,null),delete o.current[Vt]};if(Er){Ar();return}const Ir=ux(t),_n=o.current[Vt];if(Object.values(Ir[Vt]).some(Jn=>Jn.isProcessingProps)){a.current[Vt].mode=Lg.Edit;return}if(ae(Vt)){a.current[Vt].mode=Lg.Edit,Je(Vt,{mode:Lg.Edit});return}const Qn=t.current.getRowWithUpdatedValuesFromRowEditing(Vt);if(e.dataSource?.updateRow){if(Q3(_n,Qn)){Ar();return}const Jn=()=>{a.current[Vt].mode=Lg.Edit,Je(Vt,{mode:Lg.Edit})},Vn={rowId:Vt,updatedRow:Qn,previousRow:_n};try{await t.current.dataSource.editRow(Vn),Ar()}catch{Jn()}}else if(b){const Jn=Vn=>{a.current[Vt]&&(a.current[Vt].mode=Lg.Edit,Je(Vt,{mode:Lg.Edit})),L&&L(Vn)};try{Promise.resolve(b(Qn,_n,{rowId:Vt})).then(Vn=>{t.current.updateRows([Vn]),Ar()}).catch(Jn)}catch(Vn){Jn(Vn)}}else t.current.updateRows([Qn]),Ar()}),Lt=ze.useCallback(yt=>{const{id:Vt,field:Er,value:sr,debounceMs:or,unstable_skipValueParser:Ar}=yt;ie(Vt,Er);const Ir=t.current.getColumn(Er),_n=t.current.getRow(Vt);let Un=sr;Ir.valueParser&&!Ar&&(Un=Ir.valueParser(sr,_n,Ir,t));let Qn=ux(t),Jn=Mr({},Qn[Vt][Er],{value:Un,changeReason:or?"debouncedSetEditCellValue":"setEditCellValue"});return Ir.preProcessEditCellProps||ut(Vt,Er,Jn),new Promise(Vn=>{const jn=[];if(Ir.preProcessEditCellProps){const Lr=Jn.value!==Qn[Vt][Er].value;Jn=Mr({},Jn,{isProcessingProps:!0}),ut(Vt,Er,Jn);const Yn=Qn[Vt],On=Ms(Yn,[Er].map(d8)),Sn=Promise.resolve(Ir.preProcessEditCellProps({id:Vt,row:_n,props:Jn,hasChanged:Lr,otherFieldsProps:On})).then(bn=>{if(t.current.getRowMode(Vt)===Lg.View){Vn(!1);return}Qn=ux(t),bn=Mr({},bn,{isProcessingProps:!1}),bn.value=Ir.preProcessEditCellProps?Qn[Vt][Er].value:Un,ut(Vt,Er,bn)});jn.push(Sn)}Object.entries(Qn[Vt]).forEach(([Lr,Yn])=>{if(Lr===Er)return;const On=t.current.getColumn(Lr);if(!On.preProcessEditCellProps)return;Yn=Mr({},Yn,{isProcessingProps:!0}),ut(Vt,Lr,Yn),Qn=ux(t);const Sn=Qn[Vt],bn=Ms(Sn,[Lr].map(d8)),Mn=Promise.resolve(On.preProcessEditCellProps({id:Vt,row:_n,props:Yn,hasChanged:!1,otherFieldsProps:bn})).then(gi=>{if(t.current.getRowMode(Vt)===Lg.View){Vn(!1);return}gi=Mr({},gi,{isProcessingProps:!1}),ut(Vt,Lr,gi)});jn.push(Mn)}),Promise.all(jn).then(()=>{t.current.getRowMode(Vt)===Lg.Edit?(Qn=ux(t),Vn(!Qn[Vt][Er].error)):Vn(!1)})})},[t,ie,ut]),dr=ze.useCallback(yt=>{const Vt=ux(t),Er=t.current.getRow(yt);if(!Vt[yt])return t.current.getRow(yt);let sr=Mr({},o.current[yt],Er);return Object.entries(Vt[yt]).forEach(([or,Ar])=>{const Ir=t.current.getColumn(or);Ir?.valueSetter?sr=Ir.valueSetter(Ar.value,sr,Ir,t):sr[or]=Ar.value}),sr},[t]),Zt={getRowMode:Ve,startRowEditMode:ht,stopRowEditMode:Dt},Cr={setRowEditingEditCellValue:Lt,getRowWithUpdatedValuesFromRowEditing:dr};nh(t,Zt,"public"),nh(t,Cr,"private"),ze.useEffect(()=>{B&&Ze(B)},[B,Ze]),Ah(()=>{const yt=V3(t),Vt=a.current;a.current=xqe(r);const Er=new Set([...Object.keys(r),...Object.keys(Vt)]);Array.from(Er).forEach(sr=>{const or=r[sr]??{mode:Lg.View},Ar=Vt[sr]?.mode||Lg.View,Ir=yt[sr]?t.current.getRowId(yt[sr]):sr;or.mode===Lg.Edit&&Ar===Lg.View?_t(Mr({id:Ir},or)):or.mode===Lg.View&&Ar===Lg.Edit&&qt(Mr({id:Ir},or))})},[t,r,_t,qt])},TGt=t=>Mr({},t,{editRows:{}}),EGt=(t,e)=>{xGt(t,e),SGt(t,e);const r=ze.useRef({}),{isCellEditable:n}=e,i=ze.useCallback(V=>u8(V.rowNode)||!V.colDef.editable||!V.colDef.renderEditCell?!1:n?n(V):!0,[n]),a=(V,X,ie,de)=>{if(!ie){de();return}if(r.current[V]||(r.current[V]={}),r.current[V][X]){const[ve]=r.current[V][X];clearTimeout(ve)}const ae=()=>{const[ve]=r.current[V][X];clearTimeout(ve),de(),delete r.current[V][X]},U=setTimeout(()=>{de(),delete r.current[V][X]},ie);r.current[V][X]=[U,ae]};ze.useEffect(()=>{const V=r.current;return()=>{Object.entries(V).forEach(([X,ie])=>{Object.keys(ie).forEach(de=>{const[ae]=V[X][de];clearTimeout(ae),delete V[X][de]})})}},[]);const o=ze.useCallback((V,X)=>{if(r.current[V]){if(!X)Object.keys(r.current[V]).forEach(ie=>{const[,de]=r.current[V][ie];de()});else if(r.current[V][X]){const[,ie]=r.current[V][X];ie()}}},[]),s=ze.useCallback(V=>{const{id:X,field:ie,debounceMs:de}=V;return new Promise(ae=>{a(X,ie,de,async()=>{const U=e.editMode===B5.Row?t.current.setRowEditingEditCellValue:t.current.setCellEditingEditCellValue;if(t.current.getCellMode(X,ie)===$v.Edit){const ve=await U(V);ae(ve)}})})},[t,e.editMode]),d=ze.useCallback((V,X)=>e.editMode===B5.Cell?t.current.getRowWithUpdatedValuesFromCellEditing(V,X):t.current.getRowWithUpdatedValuesFromRowEditing(V),[t,e.editMode]),b=ze.useCallback((V,X)=>ux(t)[V]?.[X]??null,[t]),L={isCellEditable:i,setEditCellValue:s,getRowWithUpdatedValues:d,unstable_getEditCellMeta:b},B={runPendingEditCellValueMutation:o};nh(t,L,"public"),nh(t,B,"private")},AGt=(t,e,r)=>{const n=!!e.dataSource;return r.current.caches.rows=AG({rows:n?[]:e.rows,getRowId:e.getRowId,loading:e.loading,rowCount:e.rowCount}),Mr({},t,{rows:cqe({apiRef:r,rowCountProp:e.rowCount,loadingProp:n?!0:e.loading,previousTree:null,previousTreeDepths:null})})},CGt=(t,e,r)=>{const n=r_(t,"useGridRows"),i=ze.useRef(Date.now()),a=ze.useRef(e.rowCount),o=U2(),{setRowIndex:s}=r.hooks.useGridRowsOverridableMethods(t,e),d=ze.useCallback(Zt=>{const Cr=V3(t)[Zt];if(Cr)return Cr;const yt=D5(t,Zt);return yt&&u8(yt)?{[kL]:Zt}:null},[t]),b=ze.useCallback(Zt=>c8(t,Zt),[t]),L=ze.useCallback(({cache:Zt,throttle:Cr})=>{const yt=()=>{i.current=Date.now(),t.current.setState(Er=>Mr({},Er,{rows:cqe({apiRef:t,rowCountProp:e.rowCount,loadingProp:e.loading,previousTree:Sb(t),previousTreeDepths:URe(t),previousGroupsToFetch:n7t(t)})})),t.current.publishEvent("rowsSet")};if(o.clear(),t.current.caches.rows=Zt,!Cr){yt();return}const Vt=e.throttleRowsMs-(Date.now()-i.current);if(Vt>0){o.start(Vt,yt);return}yt()},[e.throttleRowsMs,e.rowCount,e.loading,t,o]),B=ze.useCallback(Zt=>{if(n.debug(`Updating all rows, new length ${Zt.length}`),PL(t)){t.current.updateNonPivotRows(Zt,!1);return}const Cr=AG({rows:Zt,getRowId:e.getRowId,loading:e.loading,rowCount:e.rowCount}),yt=t.current.caches.rows;Cr.rowsBeforePartialUpdates=yt.rowsBeforePartialUpdates,L({cache:Cr,throttle:!0})},[n,e.getRowId,e.loading,e.rowCount,L,t]),V=ze.useCallback(Zt=>{if(e.signature===BC.DataGrid&&Zt.length>1)throw new Error(["MUI X: You cannot update several rows at once in `apiRef.current.updateRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join(`
`));if(PL(t)){t.current.updateNonPivotRows(Zt);return}const Cr=jRe(t,Zt,e.getRowId),yt=HRe({updates:Cr,getRowId:e.getRowId,previousCache:t.current.caches.rows});L({cache:yt,throttle:!0})},[e.signature,e.getRowId,L,t]),X=ze.useCallback((Zt,Cr)=>{const yt=jRe(t,Zt,e.getRowId),Vt=HRe({updates:yt,getRowId:e.getRowId,previousCache:t.current.caches.rows,groupKeys:Cr??[]});L({cache:Vt,throttle:!1})},[e.getRowId,L,t]),ie=ze.useCallback(Zt=>{n.debug(`Setting loading to ${Zt}`),t.current.setState(Cr=>Mr({},Cr,{rows:Mr({},Cr.rows,{loading:Zt})})),t.current.caches.rows.loadingPropBeforePartialUpdates=Zt},[t,n]),de=ze.useCallback(()=>{const Zt=QD(t),Cr=V3(t);return new Map(Zt.map(yt=>[yt,Cr[yt]??{}]))},[t]),ae=ze.useCallback(()=>oF(t),[t]),U=ze.useCallback(()=>QD(t),[t]),ve=ze.useCallback(Zt=>{const{rowIdToIndexMap:Cr}=jN(t);return Cr.get(Zt)},[t]),Se=ze.useCallback((Zt,Cr)=>{const yt=D5(t,Zt);if(!yt)throw new Error(`MUI X: No row with id #${Zt} found.`);if(yt.type!=="group")throw new Error("MUI X: Only group nodes can be expanded or collapsed.");const Vt=Mr({},yt,{childrenExpanded:Cr});t.current.setState(Er=>Mr({},Er,{rows:Mr({},Er.rows,{tree:Mr({},Er.rows.tree,{[Zt]:Vt})})})),t.current.publishEvent("rowExpansionChange",Vt)},[t]),Pe=ze.useCallback(()=>{const Zt=Mr({},Sb(t)),Cr=yt=>{const Vt=Zt[yt];Vt?.type==="group"&&(Zt[yt]=Mr({},Vt,{childrenExpanded:!0}),Vt.children.forEach(Cr))};Cr(jy),t.current.setState(yt=>Mr({},yt,{rows:Mr({},yt.rows,{tree:Zt})})),t.current.publishEvent("rowExpansionChange",Zt[jy])},[t]),Me=ze.useCallback(()=>{const Zt=Mr({},Sb(t)),Cr=yt=>{const Vt=Zt[yt];Vt?.type==="group"&&(Zt[yt]=Mr({},Vt,{childrenExpanded:!1}),Vt.children.forEach(Cr))};Cr(jy),t.current.setState(yt=>Mr({},yt,{rows:Mr({},yt.rows,{tree:Zt})})),t.current.publishEvent("rowExpansionChange",Zt[jy])},[t]),Ie=ze.useCallback(Zt=>D5(t,Zt)??null,[t]),Ve=ze.useCallback(({skipAutoGeneratedRows:Zt=!0,groupId:Cr,applySorting:yt,applyFiltering:Vt,directChildrenOnly:Er=!1})=>{const sr=Sb(t);let or;if(yt){const Ar=sr[Cr];if(!Ar)return[];const Ir=aU(t);or=[];const _n=Ir.findIndex(Un=>Un===Cr)+1;for(let Un=_n;Un<Ir.length&&(Er?sr[Ir[Un]].depth===Ar.depth+1:sr[Ir[Un]].depth>Ar.depth);Un+=1){const Qn=Ir[Un];(!Zt||!u8(sr[Qn]))&&or.push(Qn)}}else or=F0e(sr,Cr,Zt,Er);if(Vt){const Ar=lF(t);or=RX(Ar)?or:or.filter(Ir=>Ar[Ir]!==!1)}return or},[t]),Ze=ze.useCallback((Zt,Cr)=>{if(e.signature===BC.DataGrid&&Cr.length>1)throw new Error(["MUI X: You cannot replace rows using `apiRef.current.unstable_replaceRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join(`
`));if(Cr.length===0)return;if(rU(t)>1)throw new Error("`apiRef.current.unstable_replaceRows` is not compatible with tree data and row grouping");const Vt=Mr({},Sb(t)),Er=Mr({},V3(t)),sr=Vt[jy],or=[...sr.children],Ar=new Set;for(let _n=0;_n<Cr.length;_n+=1){const Un=Cr[_n],Qn=TX(Un,e.getRowId,"A row was provided without id when calling replaceRows()."),[Jn]=or.splice(Zt+_n,1,Qn);Ar.has(Jn)||(delete Er[Jn],delete Vt[Jn]);const Vn={id:Qn,depth:0,parent:jy,type:"leaf",groupingKey:null};Er[Qn]=Un,Vt[Qn]=Vn,Ar.add(Qn)}Vt[jy]=Mr({},sr,{children:or});const Ir=or.filter(_n=>Vt[_n]?.type==="leaf");t.current.caches.rows.dataRowIdToModelLookup=Er,t.current.setState(_n=>Mr({},_n,{rows:Mr({},_n.rows,{loading:e.loading,totalRowCount:Math.max(e.rowCount||0,or.length),dataRowIdToModelLookup:Er,dataRowIds:Ir,tree:Vt})})),t.current.publishEvent("rowsSet")},[t,e.signature,e.getRowId,e.loading,e.rowCount]),Je={getRow:d,setLoading:ie,getRowId:b,getRowModels:de,getRowsCount:ae,getAllRowIds:U,setRows:B,updateRows:V,getRowNode:Ie,getRowIndexRelativeToVisibleRows:ve,unstable_replaceRows:Ze},nt={setRowIndex:s,setRowChildrenExpansion:Se,getRowGroupChildren:Ve,expandAllRows:Pe,collapseAllRows:Me},ut={updateNestedRows:X},ht=ze.useCallback(()=>{n.info("Row grouping pre-processing have changed, regenerating the row tree");let Zt;t.current.caches.rows.rowsBeforePartialUpdates===e.rows?Zt=Mr({},t.current.caches.rows,{updates:{type:"full",rows:QD(t)}}):Zt=AG({rows:e.rows,getRowId:e.getRowId,loading:e.loading,rowCount:e.rowCount}),L({cache:Zt,throttle:!1})},[n,t,e.rows,e.getRowId,e.loading,e.rowCount,L]),_t=pE(()=>e.dataSource),Dt=ze.useCallback(Zt=>{if(e.dataSource&&e.dataSource!==_t.current){_t.current=e.dataSource;return}Zt==="rowTreeCreation"&&ht()},[ht,_t,e.dataSource]),qt=ze.useCallback(()=>{t.current.getActiveStrategy(gk.RowTree)!==i7t(t)&&ht()},[t,ht]);sc(t,"activeStrategyProcessorChange",Dt),sc(t,"strategyAvailabilityChange",qt);const Lt=ze.useCallback(()=>{t.current.setState(Zt=>{const Cr=t.current.unstable_applyPipeProcessors("hydrateRows",{tree:Sb(t),treeDepths:URe(t),dataRowIds:QD(t),dataRowIdToModelLookup:V3(t)});return Mr({},Zt,{rows:Mr({},Zt.rows,Cr,{totalTopLevelRowCount:uqe({tree:Cr.tree,rowCountProp:e.rowCount})})})}),t.current.publishEvent("rowsSet")},[t,e.rowCount]);oye(t,"hydrateRows",Lt),nh(t,Je,"public"),nh(t,nt,e.signature===BC.DataGrid?"private":"public"),nh(t,ut,"private");const dr=ze.useRef(!0);ze.useEffect(()=>{if(dr.current){dr.current=!1;return}let Zt=!1;e.rowCount!==a.current&&(Zt=!0,a.current=e.rowCount);const Cr=e.dataSource?a7t(t):e.rows,yt=t.current.caches.rows.rowsBeforePartialUpdates===Cr,Vt=t.current.caches.rows.loadingPropBeforePartialUpdates===e.loading,Er=t.current.caches.rows.rowCountPropBeforePartialUpdates===e.rowCount;yt&&(Vt||(t.current.setState(sr=>Mr({},sr,{rows:Mr({},sr.rows,{loading:e.loading})})),t.current.caches.rows.loadingPropBeforePartialUpdates=e.loading),Er||(t.current.setState(sr=>Mr({},sr,{rows:Mr({},sr.rows,{totalRowCount:Math.max(e.rowCount||0,sr.rows.totalRowCount),totalTopLevelRowCount:Math.max(e.rowCount||0,sr.rows.totalTopLevelRowCount)})})),t.current.caches.rows.rowCountPropBeforePartialUpdates=e.rowCount),!Zt)||(n.debug(`Updating all rows, new length ${Cr?.length}`),L({cache:AG({rows:Cr,getRowId:e.getRowId,loading:e.loading,rowCount:e.rowCount}),throttle:!1}))},[e.rows,e.rowCount,e.getRowId,e.loading,e.dataSource,n,L,t])},MGt=t=>{const e={[jy]:Mr({},s7t(),{children:t})};for(let r=0;r<t.length;r+=1){const n=t[r];e[n]={id:n,depth:0,parent:jy,type:"leaf",groupingKey:null}}return{groupingName:LL,tree:e,treeDepths:{0:t.length},dataRowIds:t}},RGt=({previousTree:t,actions:e})=>{const r=Mr({},t),n={};for(let o=0;o<e.remove.length;o+=1){const s=e.remove[o];n[s]=!0,delete r[s]}for(let o=0;o<e.insert.length;o+=1){const s=e.insert[o];r[s]={id:s,depth:0,parent:jy,type:"leaf",groupingKey:null}}const i=r[jy];let a=[...i.children,...e.insert];return Object.values(n).length&&(a=a.filter(o=>!n[o])),r[jy]=Mr({},i,{children:a}),{groupingName:LL,tree:r,treeDepths:{0:a.length},dataRowIds:a}},kGt=t=>t.updates.type==="full"?MGt(t.updates.rows):RGt({previousTree:t.previousTree,actions:t.updates.actions}),IGt=t=>{W9(t,LL,"rowTreeCreation",kGt)};class kke extends Error{}function PGt(t,e,r){const n=ze.useCallback(X=>({field:X,colDef:t.current.getColumn(X)}),[t]),i=ze.useCallback(X=>{const ie=t.current.getRow(X);if(!ie)throw new kke(`No row with id #${X} found`);return{id:X,columns:t.current.getAllColumns(),row:ie}},[t]),a=ze.useCallback((X,ie,de,{cellMode:ae,colDef:U,hasFocus:ve,rowNode:Se,tabIndex:Pe,value:Me,formattedValue:Ie})=>{let Ve=de[ie];Me!==void 0?Ve=Me:U?.valueGetter&&(Ve=U.valueGetter(Ve,de,U,t));let Ze=Ve;Ie!==void 0?Ze=Ie:U?.valueFormatter&&(Ze=U.valueFormatter(Ve,de,U,t));const Je={id:X,field:ie,row:de,rowNode:Se,colDef:U,cellMode:ae,hasFocus:ve,tabIndex:Pe,value:Ve,formattedValue:Ze,isEditable:!1,api:t.current};return Je.isEditable=U&&t.current.isCellEditable(Je),Je},[t]),o=ze.useCallback((X,ie)=>{const de=t.current.getRow(X),ae=D5(t,X);if(!de||!ae)throw new kke(`No row with id #${X} found`);const U=BS(t),ve=K0e(t),Se=t.current.getCellMode(X,ie);return t.current.getCellParamsForRow(X,ie,de,{colDef:e.listView&&e.listViewColumn?.field===ie?Cqe(t):t.current.getColumn(ie),rowNode:ae,hasFocus:U!==null&&U.field===ie&&U.id===X,tabIndex:ve&&ve.field===ie&&ve.id===X?0:-1,cellMode:Se})},[t,e.listView,e.listViewColumn?.field]),s=ze.useCallback(X=>t.current.rootElementRef.current?cHt(t.current.rootElementRef.current,X):null,[t]),d=ze.useCallback(X=>t.current.rootElementRef.current?fHt(t.current.rootElementRef.current,X):null,[t]),b=ze.useCallback((X,ie)=>t.current.rootElementRef.current?dHt(t.current.rootElementRef.current,{id:X,field:ie}):null,[t]),L=r.hooks.useGridParamsOverridableMethods(t),B={getCellValue:L.getCellValue,getCellParams:o,getCellElement:b,getRowValue:L.getRowValue,getRowFormattedValue:L.getRowFormattedValue,getRowParams:i,getRowElement:d,getColumnHeaderParams:n,getColumnHeaderElement:s},V={getCellParamsForRow:a};nh(t,B,"public"),nh(t,V,"private")}const r9={type:"include",ids:new Set},DGt=(t,e)=>Mr({},t,{rowSelection:e.rowSelection?e.rowSelectionModel??r9:r9}),LGt=(t,e)=>{const r=r_(t,"useGridSelection"),n=ze.useCallback(yt=>(...Vt)=>{e.rowSelection&&yt(...Vt)},[e.rowSelection]),i=wl(t,rU)>1,a=e.signature!==BC.DataGrid&&(e.rowSelectionPropagation?.parents||e.rowSelectionPropagation?.descendants)&&i,o=ze.useMemo(()=>e.rowSelectionModel,[e.rowSelectionModel]),s=ze.useRef(null);t.current.registerControlState({stateId:"rowSelection",propModel:o,propOnChange:e.onRowSelectionModelChange,stateSelector:RC,changeEvent:"rowSelectionChange"});const{checkboxSelection:d,disableRowSelectionOnClick:b,isRowSelectable:L}=e,B=Z0e(e),V=wl(t,Sb),X=ze.useCallback(yt=>{let Vt=yt;const Er=s.current??yt,sr=t.current.isRowSelected(yt);if(sr){const or=dL(t),Ar=or.findIndex(_n=>_n===Er),Ir=or.findIndex(_n=>_n===Vt);if(Ar===Ir)return;Ar>Ir?Vt=or[Ir+1]:Vt=or[Ir-1]}s.current=yt,t.current.selectRowRange({startId:Er,endId:Vt},!sr)},[t]),ie=vl(()=>e.pagination&&e.checkboxSelectionVisibleOnly&&e.paginationMode==="client"?Qqe(t):dL(t)),de=ze.useCallback((yt,Vt)=>{if(e.signature===BC.DataGrid&&!B&&(yt.type!=="include"||yt.ids.size>1))throw new Error(["MUI X: `rowSelectionModel` can only contain 1 item in DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock multiple selection."].join(`
`));RC(t)!==yt&&(r.debug("Setting selection model"),t.current.setState(sr=>Mr({},sr,{rowSelection:e.rowSelection?yt:r9}),Vt))},[t,r,e.rowSelection,e.signature,B]),ae=ze.useCallback(yt=>oU(t).has(yt),[t]),U=ze.useCallback(yt=>{if(e.rowSelection===!1||L&&!L(t.current.getRowParams(yt)))return!1;const Vt=D5(t,yt);return!(Vt?.type==="footer"||Vt?.type==="pinnedRow")},[t,e.rowSelection,L]),ve=ze.useCallback(()=>qqe(t),[t]),Se=ze.useCallback((yt,Vt=!0,Er=!1)=>{if(t.current.isRowSelectable(yt))if(s.current=yt,Er){r.debug(`Setting selection for row ${yt}`);const sr={type:"include",ids:new Set},or=Ar=>{sr.ids.add(Ar)};Vt&&(or(yt),a&&V7(t,V,yt,e.rowSelectionPropagation?.descendants??!1,e.rowSelectionPropagation?.parents??!1,or)),t.current.setRowSelectionModel(sr,"singleRowSelection")}else{r.debug(`Toggling selection for row ${yt}`);const sr=RC(t),or={type:sr.type,ids:new Set(sr.ids)},Ar=kP(or);Ar.unselect(yt);const Ir=Qn=>{Ar.select(Qn)},_n=Qn=>{Ar.unselect(Qn)};Vt?(Ir(yt),a&&V7(t,V,yt,e.rowSelectionPropagation?.descendants??!1,e.rowSelectionPropagation?.parents??!1,Ir)):a&&eke(t,V,yt,e.rowSelectionPropagation?.descendants??!1,e.rowSelectionPropagation?.parents??!1,_n),(or.type==="include"&&or.ids.size<2||B)&&t.current.setRowSelectionModel(or,"singleRowSelection")}},[t,r,a,V,e.rowSelectionPropagation?.descendants,e.rowSelectionPropagation?.parents,B]),Pe=ze.useCallback((yt,Vt=!0,Er=!1)=>{if(r.debug("Setting selection for several rows"),e.rowSelection===!1)return;const sr=new Set;for(let _n=0;_n<yt.length;_n+=1){const Un=yt[_n];t.current.isRowSelectable(Un)&&sr.add(Un)}const or=RC(t);let Ar;if(Er){if(Ar={type:"include",ids:sr},Vt){const _n=kP(Ar);if(a){const Un=Qn=>{_n.select(Qn)};for(const Qn of sr)V7(t,V,Qn,e.rowSelectionPropagation?.descendants??!1,e.rowSelectionPropagation?.parents??!1,Un)}}else Ar.ids=new Set;if(or.type===Ar.type&&Ar.ids.size===or.ids.size&&Array.from(Ar.ids).every(_n=>or.ids.has(_n)))return}else{Ar={type:or.type,ids:new Set(or.ids)};const _n=kP(Ar),Un=Jn=>{_n.select(Jn)},Qn=Jn=>{_n.unselect(Jn)};for(const Jn of sr)Vt?(_n.select(Jn),a&&V7(t,V,Jn,e.rowSelectionPropagation?.descendants??!1,e.rowSelectionPropagation?.parents??!1,Un)):(Qn(Jn),a&&eke(t,V,Jn,e.rowSelectionPropagation?.descendants??!1,e.rowSelectionPropagation?.parents??!1,Qn))}(Ar.type==="include"&&Ar.ids.size<2||B)&&t.current.setRowSelectionModel(Ar,"multipleRowsSelection")},[r,a,B,t,V,e.rowSelectionPropagation?.descendants,e.rowSelectionPropagation?.parents,e.rowSelection]),Me=ze.useCallback(yt=>{if(!i||!a||yt.ids.size===0&&yt.type==="include")return yt;const Vt={type:yt.type,ids:new Set(yt.ids)},Er=kP(Vt),sr=or=>{Er.select(or)};for(const or of yt.ids)V7(t,V,or,e.rowSelectionPropagation?.descendants??!1,e.rowSelectionPropagation?.parents??!1,sr,Er);return Vt},[t,V,e.rowSelectionPropagation?.descendants,e.rowSelectionPropagation?.parents,i,a]),Ie=ze.useCallback(({startId:yt,endId:Vt},Er=!0,sr=!1)=>{if(!t.current.getRow(yt)||!t.current.getRow(Vt))return;r.debug(`Expanding selection from row ${yt} to row ${Vt}`);const or=dL(t),Ar=or.indexOf(yt),Ir=or.indexOf(Vt),[_n,Un]=Ar>Ir?[Ir,Ar]:[Ar,Ir],Qn=or.slice(_n,Un+1);t.current.selectRows(Qn,Er,sr)},[t,r]),Ve={selectRow:Se,setRowSelectionModel:de,getSelectedRows:ve,isRowSelected:ae,isRowSelectable:U},Ze={selectRows:Pe,selectRowRange:Ie,getPropagatedRowSelectionModel:Me};nh(t,Ve,"public"),nh(t,Ze,e.signature===BC.DataGrid?"private":"public");const Je=ze.useRef(!0),nt=ze.useCallback((yt=!1)=>{if(Je.current)return;const Vt=RC(t),Er=V3(t),sr=Sb(t),or=lF(t),Ar=Jn=>e.filterMode==="server"?!Er[Jn]:!sr[Jn]||or[Jn]===!1,Ir={type:Vt.type,ids:new Set(Vt.ids)},_n=kP(Ir);let Un=!1;for(const Jn of Vt.ids){if(Ar(Jn)){if(e.keepNonExistentRowsSelected)continue;_n.unselect(Jn),Un=!0;continue}if(!e.rowSelectionPropagation?.parents)continue;const Vn=V[Jn];if(Vn?.type==="group"){if(Vn.isAutoGenerated){_n.unselect(Jn),Un=!0;continue}Vn.children.every(Lr=>or[Lr]===!1)||(_n.unselect(Jn),Un=!0)}}const Qn=i&&e.rowSelectionPropagation?.parents&&(Ir.ids.size>0||Ir.type==="exclude");if(Un||Qn&&!yt)if(Qn)if(Ir.type==="exclude"){const Jn=ie(),Vn=[];for(let jn=0;jn<Jn.length;jn+=1){const Lr=Jn[jn];(e.keepNonExistentRowsSelected||!Ar(Lr))&&_n.has(Lr)&&Vn.push(Lr)}t.current.selectRows(Vn,!0,!0)}else t.current.selectRows(Array.from(Ir.ids),!0,!0);else t.current.setRowSelectionModel(Ir,"multipleRowsSelection")},[t,i,e.rowSelectionPropagation?.parents,e.keepNonExistentRowsSelected,e.filterMode,V,ie]),ut=ze.useCallback((yt,Vt)=>{const Er=Vt.metaKey||Vt.ctrlKey,sr=!d&&!Er&&!ezt(Vt),or=!B||sr,Ar=t.current.isRowSelected(yt),Un=IX(t)>1&&or||!Ar;t.current.selectRow(yt,Un,or)},[t,B,d]),ht=ze.useCallback((yt,Vt)=>{if(b)return;const Er=Vt.target.closest(`.${Bi.cell}`)?.getAttribute("data-field");Er===cF.field||Er===q0e||Er&&t.current.getColumn(Er)?.type===MX||D5(t,yt.id).type==="pinnedRow"||(Vt.shiftKey&&B?X(yt.id):ut(yt.id,Vt))},[b,B,t,X,ut]),_t=ze.useCallback((yt,Vt)=>{B&&Vt.shiftKey&&window.getSelection()?.removeAllRanges()},[B]),Dt=ze.useCallback((yt,Vt)=>{B&&Vt.nativeEvent.shiftKey?X(yt.id):t.current.selectRow(yt.id,yt.value,!B)},[t,X,B]),qt=ze.useCallback(yt=>{const Vt=lx(t),Er=Uqe(t),sr=Vt.items.length>0||Er?.some(or=>or.length);!e.isRowSelectable&&!e.checkboxSelectionVisibleOnly&&(!i||e.rowSelectionPropagation?.descendants)&&!sr&&!e.disableRowSelectionExcludeModel?t.current.setRowSelectionModel({type:yt?"exclude":"include",ids:new Set},"multipleRowsSelection"):t.current.selectRows(ie(),yt)},[t,ie,e.checkboxSelectionVisibleOnly,e.isRowSelectable,e.rowSelectionPropagation?.descendants,e.disableRowSelectionExcludeModel,i]),Lt=ze.useCallback(yt=>{qt(yt.value)},[qt]),dr=ze.useCallback((yt,Vt)=>{if(t.current.getCellMode(yt.id,yt.field)!==$v.Edit&&!cU(Vt)){if(C$(Vt.key)&&Vt.shiftKey){const Er=BS(t);if(Er&&Er.id!==yt.id){Vt.preventDefault();const sr=t.current.isRowSelected(Er.id);if(!B){t.current.selectRow(Er.id,!sr,!0);return}const or=t.current.getRowIndexRelativeToVisibleRows(Er.id),Ar=t.current.getRowIndexRelativeToVisibleRows(yt.id);let Ir,_n;or>Ar?sr?(Ir=Ar,_n=or-1):(Ir=Ar,_n=or):sr?(Ir=or+1,_n=Ar):(Ir=or,_n=Ar);const Un=jN(t),Qn=[];for(let Jn=Ir;Jn<=_n;Jn+=1)Qn.push(Un.rows[Jn].id);t.current.selectRows(Qn,!sr);return}}if(Vt.key===" "&&Vt.shiftKey){Vt.preventDefault(),ut(yt.id,Vt);return}String.fromCharCode(Vt.keyCode)==="A"&&(Vt.ctrlKey||Vt.metaKey)&&(Vt.preventDefault(),qt(!0))}},[t,B,ut,qt]),Zt=vl(()=>{if(!e.rowSelection){t.current.setRowSelectionModel(r9);return}if(o===void 0)return;if(!a||!i||o.type==="include"&&o.ids.size===0){t.current.setRowSelectionModel(o);return}const yt=t.current.getPropagatedRowSelectionModel(o);if(yt.type!==o.type||yt.ids.size!==o.ids.size||!Array.from(o.ids).every(Vt=>yt.ids.has(Vt))){t.current.setRowSelectionModel(yt);return}t.current.setRowSelectionModel(o)});sc(t,"sortedRowsSet",n(()=>nt(!0))),sc(t,"filteredRowsSet",n(()=>nt())),sc(t,"rowClick",n(ht)),sc(t,"rowSelectionCheckboxChange",n(Dt)),sc(t,"headerSelectionCheckboxChange",Lt),sc(t,"cellMouseDown",n(_t)),sc(t,"cellKeyDown",n(dr)),ze.useEffect(()=>{Zt()},[t,o,e.rowSelection,Zt]);const Cr=o!=null;ze.useEffect(()=>{if(Cr||!e.rowSelection||typeof U!="function")return;const yt=RC(t);if(yt.type!=="include")return;const Vt=new Set;for(const Er of yt.ids)U(Er)&&Vt.add(Er);Vt.size<yt.ids.size&&t.current.setRowSelectionModel({type:yt.type,ids:Vt})},[t,U,Cr,e.rowSelection]),ze.useEffect(()=>{if(!e.rowSelection||Cr)return;const yt=RC(t);!B&&(yt.type==="include"&&yt.ids.size>1||yt.type==="exclude")&&t.current.setRowSelectionModel(r9)},[t,B,d,Cr,e.rowSelection]),ze.useEffect(()=>{n(nt)},[nt,n]),ze.useEffect(()=>{Je.current&&(Je.current=!1)},[])},OGt=t=>{const{classes:e}=t;return ze.useMemo(()=>Cs({cellCheckbox:["cellCheckbox"],columnHeaderCheckbox:["columnHeaderCheckbox"]},Fh,e),[e])},NGt=(t,e)=>{const r={classes:e.classes},n=OGt(r),i=ze.useCallback(a=>{const o=Mr({},cF,{cellClassName:n.cellCheckbox,headerClassName:n.columnHeaderCheckbox,headerName:t.current.getLocaleText("checkboxSelectionHeaderName")}),s=e.checkboxSelection,d=a.lookup[SC]!=null;return s&&!d?(a.lookup[SC]=o,a.orderedFields=[SC,...a.orderedFields]):!s&&d?(delete a.lookup[SC],a.orderedFields=a.orderedFields.filter(b=>b!==SC)):s&&d&&(a.lookup[SC]=Mr({},o,a.lookup[SC]),e.columns.some(b=>b.field===SC)||(a.orderedFields=[SC,...a.orderedFields.filter(b=>b!==SC)])),a},[t,n,e.columns,e.checkboxSelection]);O0(t,"hydrateColumns",i)},FGt=(t,e)=>{const r=e.sortModel??e.initialState?.sorting?.sortModel??[];return Mr({},t,{sorting:{sortModel:gqe(r,e.disableMultipleColumnsSorting),sortedRows:[]}})},zGt=(t,e)=>{const r=r_(t,"useGridSorting");t.current.registerControlState({stateId:"sortModel",propModel:e.sortModel,propOnChange:e.onSortModelChange,stateSelector:P3,changeEvent:"sortModelChange"});const n=ze.useCallback((Me,Ie)=>{const Ve=P3(t),Ze=Ve.findIndex(nt=>nt.field===Me);let Je=[...Ve];return Ze>-1?Ie?.sort==null?Je.splice(Ze,1):Je.splice(Ze,1,Ie):Je=[...Ve,Ie],Je},[t]),i=ze.useCallback((Me,Ie)=>{const Ze=P3(t).find(Je=>Je.field===Me.field);if(Ze){const Je=Ie===void 0?WRe(Me.sortingOrder??e.sortingOrder,Ze.sort):Ie;return Je===void 0?void 0:Mr({},Ze,{sort:Je})}return{field:Me.field,sort:Ie===void 0?WRe(Me.sortingOrder??e.sortingOrder):Ie}},[t,e.sortingOrder]),a=ze.useCallback((Me,Ie)=>Ie==null||Ie.sortable===!1||e.disableColumnSorting?Me:(Ie.sortingOrder||e.sortingOrder).some(Ze=>!!Ze)?[...Me,"columnMenuSortItem"]:Me,[e.sortingOrder,e.disableColumnSorting]),o=ze.useCallback(()=>{t.current.setState(Me=>{if(e.sortingMode==="server")return r.debug("Skipping sorting rows as sortingMode = server"),Mr({},Me,{sorting:Mr({},Me.sorting,{sortedRows:F0e(Sb(t),jy,!1)})});const Ie=P3(t),Ve=P7t(Ie,t),Ze=t.current.applyStrategyProcessor("sorting",{sortRowList:Ve});return Mr({},Me,{sorting:Mr({},Me.sorting,{sortedRows:Ze})})}),t.current.publishEvent("sortedRowsSet")},[t,r,e.sortingMode]),s=ze.useCallback(Me=>{P3(t)!==Me&&(r.debug("Setting sort model"),t.current.setState($Re(Me,e.disableMultipleColumnsSorting)),t.current.applySorting())},[t,r,e.disableMultipleColumnsSorting]),d=ze.useCallback((Me,Ie,Ve)=>{const Ze=t.current.getColumn(Me),Je=i(Ze,Ie);let nt;!Ve||e.disableMultipleColumnsSorting?nt=Je?.sort==null?[]:[Je]:nt=n(Ze.field,Je),t.current.setSortModel(nt)},[t,n,i,e.disableMultipleColumnsSorting]),b=ze.useCallback(()=>P3(t),[t]),L=ze.useCallback(()=>G0e(t).map(Ie=>Ie.model),[t]),B=ze.useCallback(()=>aU(t),[t]),V=ze.useCallback(Me=>t.current.getSortedRowIds()[Me],[t]);nh(t,{getSortModel:b,getSortedRows:L,getSortedRowIds:B,getRowIdFromRowIndex:V,setSortModel:s,sortColumn:d,applySorting:o},"public");const ie=ze.useCallback((Me,Ie)=>{const Ve=P3(t);return!Ie.exportOnlyDirtyModels||e.sortModel!=null||e.initialState?.sorting?.sortModel!=null||Ve.length>0?Mr({},Me,{sorting:{sortModel:Ve}}):Me},[t,e.sortModel,e.initialState?.sorting?.sortModel]),de=ze.useCallback((Me,Ie)=>{const Ve=Ie.stateToRestore.sorting?.sortModel;return Ve==null?Me:(t.current.setState($Re(Ve,e.disableMultipleColumnsSorting)),Mr({},Me,{callbacks:[...Me.callbacks,t.current.applySorting]}))},[t,e.disableMultipleColumnsSorting]),ae=ze.useCallback(Me=>{const Ie=Sb(t),Ve=Ie[jy],Ze=Me.sortRowList?Me.sortRowList(Ve.children.map(Je=>Ie[Je])):[...Ve.children];return Ve.footerId!=null&&Ze.push(Ve.footerId),Ze},[t]);O0(t,"exportState",ie),O0(t,"restoreState",de),W9(t,LL,"sorting",ae);const U=ze.useCallback(({field:Me,colDef:Ie},Ve)=>{if(!Ie.sortable||e.disableColumnSorting)return;const Ze=e.multipleColumnsSortingMode==="always"||Ve.shiftKey||Ve.metaKey||Ve.ctrlKey;d(Me,void 0,Ze)},[d,e.disableColumnSorting,e.multipleColumnsSortingMode]),ve=ze.useCallback(({field:Me,colDef:Ie},Ve)=>{!Ie.sortable||e.disableColumnSorting||Ve.key==="Enter"&&!Ve.ctrlKey&&!Ve.metaKey&&d(Me,void 0,e.multipleColumnsSortingMode==="always"||Ve.shiftKey)},[d,e.disableColumnSorting,e.multipleColumnsSortingMode]),Se=ze.useCallback(()=>{const Me=P3(t),Ie=qk(t);if(Me.length>0){const Ve=Me.filter(Ze=>Ie[Ze.field]);Ve.length<Me.length&&t.current.setSortModel(Ve)}},[t]),Pe=ze.useCallback(Me=>{Me==="sorting"&&t.current.applySorting()},[t]);O0(t,"columnMenu",a),sc(t,"columnHeaderClick",U),sc(t,"columnHeaderKeyDown",ve),sc(t,"rowsSet",t.current.applySorting),sc(t,"columnsChange",Se),sc(t,"activeStrategyProcessorChange",Pe),t6(()=>{t.current.applySorting()}),Ah(()=>{e.sortModel!==void 0&&t.current.setSortModel(e.sortModel)},[t,e.sortModel])};function Ike(t){const{containerSize:e,scrollPosition:r,elementSize:n,elementOffset:i}=t,a=i+n;if(n>e)return i;if(a-e>r)return a-e;if(i<r)return i}const BGt=(t,e)=>{const r=Kv(),n=r_(t,"useGridScroll"),i=t.current.columnHeadersContainerRef,a=t.current.virtualScrollerRef,o=wl(t,e6),s=ze.useCallback(B=>{const V=p0(t),X=oF(t),ie=uy(t);if(!(B.rowIndex==null)&&X===0||ie.length===0)return!1;n.debug(`Scrolling to cell at row ${B.rowIndex}, col: ${B.colIndex} `);let ae={};if(B.colIndex!==void 0){const U=QL(t);let ve;if(typeof B.rowIndex<"u"){const Se=o[B.rowIndex]?.id,Pe=t.current.unstable_getCellColSpanInfo(Se,B.colIndex);Pe&&!Pe.spannedByColSpan&&(ve=Pe.cellProps.width)}typeof ve>"u"&&(ve=ie[B.colIndex].computedWidth),ae.left=Ike({containerSize:V.viewportOuterSize.width,scrollPosition:Math.abs(a.current.scrollLeft),elementSize:ve,elementOffset:U[B.colIndex]})}if(B.rowIndex!==void 0){const U=N0e(t),ve=$zt(t),Se=Kqe(t),Pe=e.pagination?B.rowIndex-ve*Se:B.rowIndex,Me=U.positions[Pe+1]?U.positions[Pe+1]-U.positions[Pe]:U.currentPageTotalHeight-U.positions[Pe];ae.top=Ike({containerSize:V.viewportInnerSize.height,scrollPosition:a.current.scrollTop,elementSize:Me,elementOffset:U.positions[Pe]})}return ae=t.current.unstable_applyPipeProcessors("scrollToIndexes",ae,B),typeof ae.left<"u"||typeof ae.top<"u"?(t.current.scroll(ae),!0):!1},[n,t,a,e.pagination,o]),d=ze.useCallback(B=>{if(a.current&&B.left!==void 0&&i.current){const V=r?-1:1;i.current.scrollLeft=B.left,a.current.scrollLeft=V*B.left,n.debug(`Scrolling left: ${B.left}`)}a.current&&B.top!==void 0&&(a.current.scrollTop=B.top,n.debug(`Scrolling top: ${B.top}`)),n.debug("Scrolling, updating container, and viewport")},[a,r,i,n]),b=ze.useCallback(()=>a?.current?{top:a.current.scrollTop,left:a.current.scrollLeft}:{top:0,left:0},[a]);nh(t,{scroll:d,scrollToIndexes:s,getScrollPosition:b},"public")};function UGt(t,e){Zm(t,"columnHeaderClick",e.onColumnHeaderClick),Zm(t,"columnHeaderContextMenu",e.onColumnHeaderContextMenu),Zm(t,"columnHeaderDoubleClick",e.onColumnHeaderDoubleClick),Zm(t,"columnHeaderOver",e.onColumnHeaderOver),Zm(t,"columnHeaderOut",e.onColumnHeaderOut),Zm(t,"columnHeaderEnter",e.onColumnHeaderEnter),Zm(t,"columnHeaderLeave",e.onColumnHeaderLeave),Zm(t,"cellClick",e.onCellClick),Zm(t,"cellDoubleClick",e.onCellDoubleClick),Zm(t,"cellKeyDown",e.onCellKeyDown),Zm(t,"preferencePanelClose",e.onPreferencePanelClose),Zm(t,"preferencePanelOpen",e.onPreferencePanelOpen),Zm(t,"menuOpen",e.onMenuOpen),Zm(t,"menuClose",e.onMenuClose),Zm(t,"rowDoubleClick",e.onRowDoubleClick),Zm(t,"rowClick",e.onRowClick),Zm(t,"stateChange",e.onStateChange)}const G7={width:0,height:0},HGt={isReady:!1,root:G7,viewportOuterSize:G7,viewportInnerSize:G7,contentSize:G7,minimumSize:G7,hasScrollX:!1,hasScrollY:!1,scrollbarSize:0,headerHeight:0,groupHeaderHeight:0,headerFilterHeight:0,rowWidth:0,rowHeight:0,columnsTotalWidth:0,leftPinnedWidth:0,rightPinnedWidth:0,headersTotalHeight:0,topContainerHeight:0,bottomContainerHeight:0},jGt=(t,e,r)=>{const n=HGt,i=nU(r);return Mr({},t,{dimensions:Mr({},n,GGt(e,r,i,EX(r)))})},VGt=pc(uy,QL,(t,e)=>{const r=t.length;return r===0?0:eL(e[r-1]+t[r-1].computedWidth,1)});function qGt(t,e){const r=t.current.virtualizer,n=r.api.updateDimensions,i=r.api.getViewportPageSize,o={getRootDimensions:ze.useCallback(()=>p0(t),[t])},s={updateDimensions:n,getViewportPageSize:i};nh(t,o,"public"),nh(t,s,"private"),Zm(t,"rootMount",b=>{Pke(b,p0(t))}),Zm(t,"debouncedResize",e.onResize),T$(t.current.store,b=>b.dimensions,(b,L)=>{t.current.rootElementRef.current&&Pke(t.current.rootElementRef.current,L),$Gt(L.viewportInnerSize,b.viewportInnerSize)||t.current.publishEvent("viewportInnerSizeChange",L.viewportInnerSize),t.current.publishEvent("debouncedResize",L.root)})}function Pke(t,e){const r=(n,i)=>t.style.setProperty(n,i);r("--DataGrid-hasScrollX",`${Number(e.hasScrollX)}`),r("--DataGrid-hasScrollY",`${Number(e.hasScrollY)}`),r("--DataGrid-scrollbarSize",`${e.scrollbarSize}px`),r("--DataGrid-rowWidth",`${e.rowWidth}px`),r("--DataGrid-columnsTotalWidth",`${e.columnsTotalWidth}px`),r("--DataGrid-leftPinnedWidth",`${e.leftPinnedWidth}px`),r("--DataGrid-rightPinnedWidth",`${e.rightPinnedWidth}px`),r("--DataGrid-headerHeight",`${e.headerHeight}px`),r("--DataGrid-headersTotalHeight",`${e.headersTotalHeight}px`),r("--DataGrid-topContainerHeight",`${e.topContainerHeight}px`),r("--DataGrid-bottomContainerHeight",`${e.bottomContainerHeight}px`),r("--height",`${e.rowHeight}px`)}function GGt(t,e,r,n){const i=hqe(t.rowHeight,O$.rowHeight);return{rowHeight:Math.floor(i*r),headerHeight:Math.floor(t.columnHeaderHeight*r),groupHeaderHeight:Math.floor((t.columnGroupHeaderHeight??t.columnHeaderHeight)*r),headerFilterHeight:Math.floor((t.headerFilterHeight??t.columnHeaderHeight)*r),columnsTotalWidth:VGt(e),headersTotalHeight:uU(e,t),leftPinnedWidth:n.left.reduce((a,o)=>a+o.computedWidth,0),rightPinnedWidth:n.right.reduce((a,o)=>a+o.computedWidth,0)}}function $Gt(t,e){return t.width===e.width&&t.height===e.height}const WGt=(t,e,r)=>{const n=ZFt(r),i=oF(r),a=uF(r),o=Math.min(a.enabled?a.paginationModel.pageSize:i,i);return Mr({},t,{rowsMeta:{currentPageTotalHeight:o*n,positions:Array.from({length:o},(s,d)=>d*n),pinnedTopRowsTotalHeight:0,pinnedBottomRowsTotalHeight:0}})},YGt=(t,e)=>{const r=t.current.virtualizer,{getRowHeight:n,setLastMeasuredRowIndex:i,storeRowHeightMeasurement:a,resetRowHeights:o,hydrateRowsMeta:s,observeRowHeight:d,rowHasAutoHeight:b,getRowHeightEntry:L,getLastMeasuredRowIndex:B}=r.api.rowsMeta;oye(t,"rowHeight",s);const V={unstable_getRowHeight:n,unstable_setLastMeasuredRowIndex:i,unstable_storeRowHeightMeasurement:a,resetRowHeights:o},X={hydrateRowsMeta:s,observeRowHeight:d,rowHasAutoHeight:b,getRowHeightEntry:L,getLastMeasuredRowIndex:B};nh(t,V,"public"),nh(t,X,"private")},XGt=t=>{const e=ze.useCallback((i={})=>t.current.unstable_applyPipeProcessors("exportState",{},i),[t]),r=ze.useCallback(i=>{t.current.unstable_applyPipeProcessors("restoreState",{callbacks:[]},{stateToRestore:i}).callbacks.forEach(o=>{o()})},[t]);nh(t,{exportState:e,restoreState:r},"public")},ZGt=t=>{const e=t.current.virtualizer,r=e.api.resetColSpan,n=e.api.getCellColSpanInfo,i=e.api.calculateColSpan,a={unstable_getCellColSpanInfo:n},o={resetColSpan:r,calculateColSpan:i};nh(t,a,"public"),nh(t,o,"private"),sc(t,"columnOrderChange",r)},NGe=(t,e,r)=>{if(wqe(t)){if(r[t.field]!==void 0)throw new Error(["MUI X: columnGroupingModel contains duplicated field",`column field ${t.field} occurs two times in the grouping model:`,`- ${r[t.field].join(" > ")}`,`- ${e.join(" > ")}`].join(`
`));r[t.field]=e;return}const{groupId:n,children:i}=t;i.forEach(a=>{NGe(a,[...e,n],r)})},wpe=t=>{if(!t)return{};const e={};return t.forEach(r=>{NGe(r,[],e)}),e},Spe=(t,e,r)=>{const n=d=>e[d]??[],i=[],a=Math.max(0,...t.map(d=>n(d).length)),o=(d,b,L)=>{const B=n(d),V=n(b);for(let X=0;X<=L;X+=1)if(B[X]!==V[X])return!1;return!0},s=(d,b)=>{const L=r?.left,B=r?.right,V=!!L?.includes(d),X=!!L?.includes(b),ie=!!B?.includes(d),de=!!B?.includes(b);return V!==X||ie!==de};for(let d=0;d<a;d+=1){const b=[];for(let L=0;L<t.length;L+=1){const B=t[L],V=n(B)[d]??null;if(b.length===0){b.push({columnFields:[B],groupId:V});continue}const X=b[b.length-1],ie=X.columnFields[X.columnFields.length-1];X.groupId!==V||!o(ie,B,d)||s(ie,B)?b.push({columnFields:[B],groupId:V}):X.columnFields.push(B)}i.push(b)}return i},KGt=["groupId","children"],sye=t=>{const e={};for(let r=0;r<t.length;r+=1){const n=t[r];if(wqe(n))continue;const{groupId:i,children:a}=n,o=Ms(n,KGt);if(!i)throw new Error("MUI X: An element of the columnGroupingModel does not have either `field` or `groupId`.");const s=Mr({},o,{groupId:i}),d=sye(a);if(d[i]!==void 0||e[i]!==void 0)throw new Error(`MUI X: The groupId ${i} is used multiple times in the columnGroupingModel.`);Object.assign(e,d),e[i]=s}return e},JGt=(t,e,r)=>{if(r.current.caches.columnGrouping={lastColumnGroupingModel:e.columnGroupingModel},!e.columnGroupingModel)return t;const n=L5(r),i=iU(r),a=sye(e.columnGroupingModel??[]),o=wpe(e.columnGroupingModel??[]),s=Spe(n,o,r.current.state.pinnedColumns??{}),d=i.length===0?0:Math.max(...i.map(b=>o[b]?.length??0));return Mr({},t,{columnGrouping:{lookup:a,unwrappedGroupingModel:o,headerStructure:s,maxDepth:d}})},QGt=(t,e)=>{const r=ze.useCallback(s=>nGe(t)[s]??[],[t]),n=ze.useCallback(()=>iGe(t),[t]);nh(t,{getColumnGroupPath:r,getAllGroupDetails:n},"public");const a=ze.useCallback(()=>{const s=wpe(e.columnGroupingModel??[]);t.current.setState(d=>{const b=d.columns?.orderedFields??[],L=d.pinnedColumns??{},B=Spe(b,s,L);return Mr({},d,{columnGrouping:Mr({},d.columnGrouping,{headerStructure:B})})})},[t,e.columnGroupingModel]),o=ze.useCallback(s=>{t.current.caches.columnGrouping.lastColumnGroupingModel=s;const d=t.current.getPinnedColumns?.()??{},b=L5(t),L=iU(t),B=sye(s??[]),V=wpe(s??[]),X=Spe(b,V,d),ie=L.length===0?0:Math.max(...L.map(de=>V[de]?.length??0));t.current.setState(de=>Mr({},de,{columnGrouping:{lookup:B,unwrappedGroupingModel:V,headerStructure:X,maxDepth:ie}}))},[t]);sc(t,"columnIndexChange",a),sc(t,"columnsChange",()=>{o(e.columnGroupingModel)}),sc(t,"columnVisibilityModelChange",()=>{o(e.columnGroupingModel)}),ze.useEffect(()=>{e.columnGroupingModel!==t.current.caches.columnGrouping.lastColumnGroupingModel&&o(e.columnGroupingModel)},[t,o,e.columnGroupingModel])};function e$t(){let t,e;const r=new Promise((n,i)=>{t=n,e=i});return r.resolve=t,r.reject=e,r}function Dke(t,e){if(e!==void 0&&t.changedTouches){for(let r=0;r<t.changedTouches.length;r+=1){const n=t.changedTouches[r];if(n.identifier===e)return{x:n.clientX,y:n.clientY}}return!1}return{x:t.clientX,y:t.clientY}}function Lke(t,e,r,n){let i=t;return n==="Right"?i+=e-r.left:i+=r.right-e,Math.round(i)}function t$t(t,e,r){return r==="Left"?t-e.left:e.right-t}function r$t(t){return t==="Right"?"Left":"Right"}function n$t(t,e){const r=t.classList.contains(Bi["columnSeparator--sideRight"])?"Right":"Left";return e?r$t(r):r}function Oke(t,e){return e===y5.LEFT?t?"--DataGrid-rightPinnedWidth":"--DataGrid-leftPinnedWidth":t?"--DataGrid-leftPinnedWidth":"--DataGrid-rightPinnedWidth"}function Nke(t,e,r){return r===y5.LEFT?e?t.rightPinnedWidth:t.leftPinnedWidth:e?t.leftPinnedWidth:t.rightPinnedWidth}function Fke(t){t.preventDefault(),t.stopImmediatePropagation()}function i$t(t){const e=ze.useRef(void 0),r=()=>qBt(t),n=wl(t,r);return ze.useEffect(()=>{e.current&&n===!1&&(e.current.resolve(),e.current=void 0)}),()=>{if(!e.current){if(r()===!1)return Promise.resolve();e.current=e$t()}return e.current}}function a$t(t,e){if(t.length<4)return t;const r=t.slice();r.sort((s,d)=>s-d);const n=r[Math.floor(r.length*.25)],i=r[Math.floor(r.length*.75)-1],a=i-n,o=a<5?5:a*e;return r.filter(s=>s>n-o&&s<i+o)}function o$t(t,e,r){const n={},i=t.current.rootElementRef.current;return i.classList.add(Bi.autosizing),r.forEach(a=>{const s=SHt(t.current,a.field).map(ie=>ie.getBoundingClientRect().width??0),d=e.includeOutliers?s:a$t(s,e.outliersFactor);if(e.includeHeaders){const ie=wHt(t.current,a.field);if(ie){const de=ie.querySelector(`.${Bi.columnHeaderTitle}`),ae=ie.querySelector(`.${Bi.columnHeaderTitleContainerContent}`),U=ie.querySelector(`.${Bi.iconButtonContainer}`),ve=ie.querySelector(`.${Bi.menuIcon}`),Se=de??ae,Pe=window.getComputedStyle(ie,null),Me=parseInt(Pe.paddingLeft,10)+parseInt(Pe.paddingRight,10),Ve=Se.scrollWidth+1+Me+(U?.clientWidth??0)+(ve?.clientWidth??0);d.push(Ve)}}const b=a.minWidth!==-1/0&&a.minWidth!==void 0,L=a.maxWidth!==1/0&&a.maxWidth!==void 0,B=b?a.minWidth:0,V=L?a.maxWidth:1/0,X=d.length===0?0:Math.max(...d);n[a.field]=fL(X,B,V)}),i.classList.remove(Bi.autosizing),n}const s$t=t=>Mr({},t,{columnResize:{resizingColumnField:""}});function l$t(){return{colDef:void 0,initialColWidth:0,initialTotalWidth:0,previousMouseClickEvent:void 0,columnHeaderElement:void 0,headerFilterElement:void 0,groupHeaderElements:[],cellElements:[],leftPinnedCellsAfter:[],rightPinnedCellsBefore:[],fillerLeft:void 0,fillerRight:void 0,leftPinnedHeadersAfter:[],rightPinnedHeadersBefore:[]}}const u$t=(t,e)=>{const r=Kv(),n=r_(t,"useGridColumnResize"),i=pE(l$t).current,a=ze.useRef(null),o=ze.useRef(null),s=U2(),d=ze.useRef(void 0),b=Je=>{n.debug(`Updating width to ${Je} for col ${i.colDef.field}`);const nt=i.columnHeaderElement.offsetWidth,ut=Je-nt,ht=Je-i.initialColWidth;if(ht>0){const Lt=i.initialTotalWidth+ht;t.current.rootElementRef?.current?.style.setProperty("--DataGrid-rowWidth",`${Lt}px`)}i.colDef.computedWidth=Je,i.colDef.width=Je,i.colDef.flex=0,i.columnHeaderElement.style.width=`${Je}px`;const _t=i.headerFilterElement;_t&&(_t.style.width=`${Je}px`),i.groupHeaderElements.forEach(Lt=>{const dr=Lt;let Zt;dr.getAttribute("aria-colspan")==="1"?Zt=`${Je}px`:Zt=`${dr.offsetWidth+ut}px`,dr.style.width=Zt}),i.cellElements.forEach(Lt=>{const dr=Lt;let Zt;dr.getAttribute("aria-colspan")==="1"?Zt=`${Je}px`:Zt=`${dr.offsetWidth+ut}px`,dr.style.setProperty("--width",Zt)});const Dt=p0(t),qt=t.current.unstable_applyPipeProcessors("isColumnPinned",!1,i.colDef.field);qt===y5.LEFT&&(TO(i.fillerLeft,"width",ut),i.leftPinnedCellsAfter.forEach(Lt=>{TO(Lt,"left",ut)}),i.leftPinnedHeadersAfter.forEach(Lt=>{TO(Lt,"left",ut)}),t.current.rootElementRef?.current?.style.setProperty(Oke(r,qt),`${Nke(Dt,r,qt)+ht}px`)),qt===y5.RIGHT&&(TO(i.fillerRight,"width",ut),i.rightPinnedCellsBefore.forEach(Lt=>{TO(Lt,"right",ut)}),i.rightPinnedHeadersBefore.forEach(Lt=>{TO(Lt,"right",ut)}),t.current.rootElementRef?.current?.style.setProperty(Oke(r,qt),`${Nke(Dt,r,qt)+ht}px`))},L=Je=>{if(U(),i.previousMouseClickEvent){const nt=i.previousMouseClickEvent,ut=nt.timeStamp,ht=nt.clientX,_t=nt.clientY;if(Je.timeStamp-ut<300&&Je.clientX===ht&&Je.clientY===_t){i.previousMouseClickEvent=void 0,t.current.publishEvent("columnResizeStop",null,Je);return}}if(i.colDef){t.current.setColumnWidth(i.colDef.field,i.colDef.width),n.debug(`Updating col ${i.colDef.field} with new width: ${i.colDef.width}`);const nt=UC(t);i.groupHeaderElements.forEach(ut=>{const ht=vHt(ut),_t=ut,qt=`${ht.reduce((Lt,dr)=>nt.columnVisibilityModel[dr]!==!1?Lt+nt.lookup[dr].computedWidth:Lt,0)}px`;_t.style.width=qt})}s.start(0,()=>{t.current.publishEvent("columnResizeStop",null,Je)})},B=(Je,nt,ut)=>{const ht=t.current.rootElementRef.current;i.initialColWidth=Je.computedWidth,i.initialTotalWidth=t.current.getRootDimensions().rowWidth,i.colDef=Je,i.columnHeaderElement=pHt(t.current.columnHeadersContainerRef.current,Je.field);const _t=ht.querySelector(`.${Bi.headerFilterRow} [data-field="${Gk(Je.field)}"]`);_t&&(i.headerFilterElement=_t),i.groupHeaderElements=mHt(t.current.columnHeadersContainerRef?.current,Je.field),i.cellElements=gHt(i.columnHeaderElement,t.current),i.fillerLeft=gke(t.current,r?"filler--pinnedRight":"filler--pinnedLeft"),i.fillerRight=gke(t.current,r?"filler--pinnedLeft":"filler--pinnedRight");const Dt=t.current.unstable_applyPipeProcessors("isColumnPinned",!1,i.colDef.field);i.leftPinnedCellsAfter=Dt!==y5.LEFT?[]:yHt(t.current,i.columnHeaderElement,r),i.rightPinnedCellsBefore=Dt!==y5.RIGHT?[]:bHt(t.current,i.columnHeaderElement,r),i.leftPinnedHeadersAfter=Dt!==y5.LEFT?[]:xHt(t.current,i.columnHeaderElement,r),i.rightPinnedHeadersBefore=Dt!==y5.RIGHT?[]:_Ht(t.current,i.columnHeaderElement,r),o.current=n$t(nt,r),a.current=t$t(ut,i.columnHeaderElement.getBoundingClientRect(),o.current)},V=vl(L),X=vl(Je=>{if(Je.buttons===0){V(Je);return}let nt=Lke(a.current,Je.clientX,i.columnHeaderElement.getBoundingClientRect(),o.current);nt=fL(nt,i.colDef.minWidth,i.colDef.maxWidth),b(nt);const ut={element:i.columnHeaderElement,colDef:i.colDef,width:nt};t.current.publishEvent("columnResize",ut,Je)}),ie=vl(Je=>{Dke(Je,d.current)&&L(Je)}),de=vl(Je=>{const nt=Dke(Je,d.current);if(!nt)return;if(Je.type==="mousemove"&&Je.buttons===0){ie(Je);return}let ut=Lke(a.current,nt.x,i.columnHeaderElement.getBoundingClientRect(),o.current);ut=fL(ut,i.colDef.minWidth,i.colDef.maxWidth),b(ut);const ht={element:i.columnHeaderElement,colDef:i.colDef,width:ut};t.current.publishEvent("columnResize",ht,Je)}),ae=vl(Je=>{const nt=P$(Je.target,Bi["columnSeparator--resizable"]);if(!nt)return;const ut=Je.changedTouches[0];ut!=null&&(d.current=ut.identifier);const ht=P$(Je.target,Bi.columnHeader),_t=hHt(ht),Dt=t.current.getColumn(_t);n.debug(`Start Resize on col ${Dt.field}`),t.current.publishEvent("columnResizeStart",{field:_t},Je),B(Dt,nt,ut.clientX);const qt=Lm(Je.currentTarget);qt.addEventListener("touchmove",de),qt.addEventListener("touchend",ie)}),U=ze.useCallback(()=>{const Je=Lm(t.current.rootElementRef.current);Je.body.style.removeProperty("cursor"),Je.removeEventListener("mousemove",X),Je.removeEventListener("mouseup",V),Je.removeEventListener("touchmove",de),Je.removeEventListener("touchend",ie),setTimeout(()=>{Je.removeEventListener("click",Fke,!0)},100),i.columnHeaderElement&&(i.columnHeaderElement.style.pointerEvents="unset")},[t,i,X,V,de,ie]),ve=ze.useCallback(({field:Je})=>{t.current.setState(nt=>Mr({},nt,{columnResize:Mr({},nt.columnResize,{resizingColumnField:Je})}))},[t]),Se=ze.useCallback(()=>{t.current.setState(Je=>Mr({},Je,{columnResize:Mr({},Je.columnResize,{resizingColumnField:""})}))},[t]),Pe=vl(({colDef:Je},nt)=>{if(nt.button!==0||!nt.currentTarget.classList.contains(Bi["columnSeparator--resizable"]))return;nt.preventDefault(),n.debug(`Start Resize on col ${Je.field}`),t.current.publishEvent("columnResizeStart",{field:Je.field},nt),B(Je,nt.currentTarget,nt.clientX);const ut=Lm(t.current.rootElementRef.current);ut.body.style.cursor="col-resize",i.previousMouseClickEvent=nt.nativeEvent,ut.addEventListener("mousemove",X),ut.addEventListener("mouseup",V),ut.addEventListener("click",Fke,!0)}),Me=vl((Je,nt)=>{if(e.disableAutosize||nt.button!==0)return;const ut=t.current.state.columns.lookup[Je.field];ut.resizable!==!1&&t.current.autosizeColumns(Mr({},e.autosizeOptions,{disableColumnVirtualization:!1,columns:[ut.field]}))}),Ie=i$t(t),Ve=ze.useRef(!1),Ze=ze.useCallback(async Je=>{if(!t.current.rootElementRef?.current||Ve.current)return;Ve.current=!0;const ut=UC(t),ht=Mr({},oBt,Je,{columns:Je?.columns??ut.orderedFields});ht.columns=ht.columns.filter(Dt=>ut.columnVisibilityModel[Dt]!==!1);const _t=ht.columns.map(Dt=>t.current.state.columns.lookup[Dt]);try{!e.disableVirtualization&&ht.disableColumnVirtualization&&(t.current.unstable_setColumnVirtualization(!1),await Ie());const Dt=o$t(t,ht,_t),qt=_t.map(Lt=>Mr({},Lt,{width:Dt[Lt.field],computedWidth:Dt[Lt.field],flex:0}));if(ht.expand){const dr=ut.orderedFields.map(Vt=>ut.lookup[Vt]).filter(Vt=>ut.columnVisibilityModel[Vt.field]!==!1).reduce((Vt,Er)=>Vt+(Dt[Er.field]??Er.computedWidth??Er.width),0),yt=t.current.getRootDimensions().viewportInnerSize.width-dr;if(yt>0){const Vt=yt/(qt.length||1);qt.forEach(Er=>{Er.width+=Vt,Er.computedWidth+=Vt})}}t.current.updateColumns(qt),qt.forEach((Lt,dr)=>{if(Lt.width!==_t[dr].width){const Zt=Lt.width;t.current.publishEvent("columnWidthChange",{element:t.current.getColumnHeaderElement(Lt.field),colDef:Lt,width:Zt})}})}finally{e.disableVirtualization||t.current.unstable_setColumnVirtualization(!0),Ve.current=!1}},[t,Ie,e.disableVirtualization]);ze.useEffect(()=>U,[U]),pY(()=>{e.autosizeOnMount&&Promise.resolve().then(()=>{t.current.autosizeColumns(e.autosizeOptions)})}),uGe(t,()=>t.current.columnHeadersContainerRef?.current,"touchstart",ae,{passive:!0}),nh(t,{autosizeColumns:Ze},"public"),sc(t,"columnResizeStop",Se),sc(t,"columnResizeStart",ve),sc(t,"columnSeparatorMouseDown",Pe),sc(t,"columnSeparatorDoubleClick",Me),Zm(t,"columnResize",e.onColumnResize),Zm(t,"columnWidthChange",e.onColumnWidthChange)};function TO(t,e,r){t&&(t.style[e]=`${Math.round(parseFloat(t.style[e]))+r}px`)}function c$t(t,e){return t.firstRowIndex>=e.firstRowIndex&&t.lastRowIndex<=e.lastRowIndex?null:t.firstRowIndex>=e.firstRowIndex&&t.lastRowIndex>e.lastRowIndex?{firstRowIndex:e.lastRowIndex,lastRowIndex:t.lastRowIndex}:t.firstRowIndex<e.firstRowIndex&&t.lastRowIndex<=e.lastRowIndex?{firstRowIndex:t.firstRowIndex,lastRowIndex:e.firstRowIndex-1}:t}function zke(t){return t.firstRowIndex!==0||t.lastRowIndex!==0}const rae=(t,e,r)=>{if(!t)return null;let n=t[e.field];const i=e.rowSpanValueGetter??e.valueGetter;return i&&(n=i(n,t,e,r)),n},FGe={spannedCells:{},hiddenCells:{},hiddenCellOriginMap:{}},f$t={firstRowIndex:0,lastRowIndex:0},IP={caches:FGe,processedRange:f$t},Bke=20,zGe=(t,e,r,n,i,a)=>{const o=t.current.virtualizer,s=a?IP:f8.selectors.state(o.store.state),d=Mr({},s.caches.spannedCells),b=Mr({},s.caches.hiddenCells),L=Mr({},s.caches.hiddenCellOriginMap),B={firstRowIndex:Math.min(s.processedRange.firstRowIndex,i.firstRowIndex),lastRowIndex:Math.max(s.processedRange.lastRowIndex,i.lastRowIndex)};return e.forEach((V,X)=>{for(let ie=i.firstRowIndex;ie<i.lastRowIndex;ie+=1){const de=r[ie];if(b[de.id]?.[X])continue;const ae=rae(de.model,V,t);if(ae==null)continue;let U=de.id,ve=ie,Se=0;const Pe=[];if(ie===i.firstRowIndex){let Ie=ie-1,Ve=r[Ie];for(;Ie>=n.firstRowIndex&&Ve&&rae(Ve.model,V,t)===ae;){const Ze=r[Ie+1];b[Ze.id]?b[Ze.id][X]=!0:b[Ze.id]={[X]:!0},Pe.push(ie),Se+=1,U=Ve.id,ve=Ie,Ie-=1,Ve=r[Ie]}}Pe.forEach(Ie=>{L[Ie]?L[Ie][X]=ve:L[Ie]={[X]:ve}});let Me=ie+1;for(;Me<=n.lastRowIndex&&r[Me]&&rae(r[Me].model,V,t)===ae;){const Ie=r[Me];b[Ie.id]?b[Ie.id][X]=!0:b[Ie.id]={[X]:!0},L[Me]?L[Me][X]=ve:L[Me]={[X]:ve},Me+=1,Se+=1}Se>0&&(d[U]?d[U][X]=Se+1:d[U]={[X]:Se+1})}}),{caches:{spannedCells:d,hiddenCells:b,hiddenCellOriginMap:L},processedRange:B}},d$t=(t,e)=>{const r=QD(e).length;if(t.pagination){const n=Kqe(e);let i=Bke;return n>0&&(i=n-1),{firstRowIndex:0,lastRowIndex:Math.min(i,r)}}return{firstRowIndex:0,lastRowIndex:Math.min(Bke,r)}},h$t=(t,e,r)=>{if(!e.rowSpanning)return Mr({},t,{rowSpanning:IP});const n=t.rows.dataRowIds||[],i=t.columns.orderedFields||[],a=t.rows.dataRowIdToModelLookup,o=t.columns.lookup,s=!!t.filter.filterModel.items.length||!!t.filter.filterModel.quickFilterValues?.length;if(!n.length||!i.length||!a||!o||s)return Mr({},t,{rowSpanning:IP});const d=d$t(e,r),b=n.map(V=>({id:V,model:a[V]})),L=i.map(V=>o[V]),B=zGe(r,L,b,d,d,!0);return Mr({},t,{rowSpanning:B})},p$t=(t,e)=>{const r=t.current.virtualizer.store,n=ze.useCallback((a,o=!1)=>{const{range:s,rows:d}=jN(t);if(o&&r.getSnapshot().rowSpanning!==IP&&r.set("rowSpanning",IP),s===null||!zke(a))return;const b=o?IP:f8.selectors.state(r.state),L=c$t({firstRowIndex:a.firstRowIndex,lastRowIndex:Math.min(a.lastRowIndex,s.lastRowIndex-s.firstRowIndex+1)},b.processedRange);if(L===null)return;const B=uy(t),V=zGe(t,B,d,s,L,o),X=Object.keys(V.caches.spannedCells).length,ie=Object.keys(V.caches.hiddenCells).length,de=Object.keys(b.caches.spannedCells).length,ae=Object.keys(b.caches.hiddenCells).length;!(o||X!==de||ie!==ae)||X===0&&de===0||r.set("rowSpanning",V)},[t,r]),i=ze.useCallback(()=>{const a=yGe(t);zke(a)&&n(a,!0)},[t,n]);sc(t,"renderedRowsIntervalChange",RP(e.rowSpanning,n)),sc(t,"sortedRowsSet",RP(e.rowSpanning,i)),sc(t,"paginationModelChange",RP(e.rowSpanning,i)),sc(t,"filteredRowsSet",RP(e.rowSpanning,i)),sc(t,"columnsChange",RP(e.rowSpanning,i)),ze.useEffect(()=>{e.rowSpanning?r.state.rowSpanning.caches===FGe&&i():r.state.rowSpanning!==IP&&r.set("rowSpanning",IP)},[t,r,i,e.rowSpanning])},v$t=(t,e,r)=>Mr({},t,{listViewColumn:e.listViewColumn?Mr({},e.listViewColumn,{computedWidth:Tpe(r)}):void 0});function m$t(t,e){const r=()=>{t.current.setState(a=>a.listViewColumn?Mr({},a,{listViewColumn:Mr({},a.listViewColumn,{computedWidth:Tpe(t)})}):a)},n=ze.useRef(null);sc(t,"viewportInnerSizeChange",a=>{n.current!==a.width&&(n.current=a.width,r())}),sc(t,"columnVisibilityModelChange",r),Ah(()=>{const a=e.listViewColumn;a&&t.current.setState(o=>Mr({},o,{listViewColumn:Mr({},a,{computedWidth:Tpe(t)})}))},[t,e.listViewColumn]),ze.useEffect(()=>{e.listView&&e.listViewColumn},[e.listView,e.listViewColumn])}function Tpe(t){return p0(t).viewportInnerSize.width}const g$t=pc(lx,P3,Yx,(t,e,r)=>({groupKeys:[],paginationModel:r,sortModel:e,filterModel:t,start:r.page*r.pageSize,end:r.page*r.pageSize+r.pageSize-1}));let $7=(function(t){return t.Default="set-new-rows",t.LazyLoading="replace-row-range",t})({});class nae{constructor(e){this.chunkSize=e}getCacheKeys=e=>{if(this.chunkSize<1||typeof e.start!="number")return[e];const r=[];for(let n=e.start;n<=e.end;n+=this.chunkSize){const i=Math.min(n+this.chunkSize-1,e.end);r.push(Mr({},e,{start:n,end:i}))}return r};splitResponse=(e,r)=>{const n=this.getCacheKeys(e);if(n.length===1)return new Map([[e,r]]);const i=new Map;return n.forEach(a=>{const o=a.end===e.end,s=Mr({},r,{pageInfo:Mr({},r.pageInfo,{hasNextPage:r.pageInfo?.hasNextPage!==void 0&&!o?!0:r.pageInfo?.hasNextPage,nextCursor:r.pageInfo?.nextCursor!==void 0&&!o?r.rows[a.end+1].id:r.pageInfo?.nextCursor}),rows:typeof a.start!="number"||typeof e.start!="number"?r.rows:r.rows.slice(a.start-e.start,a.end-e.start+1)});i.set(a,s)}),i};static mergeResponses=e=>e.length===1?e[0]:e.reduce((r,n)=>({rows:[...r.rows,...n.rows],rowCount:n.rowCount,pageInfo:n.pageInfo}),{rows:[],rowCount:0,pageInfo:{}})}const y$t=["skipCache"],b$t={clear:()=>{},get:()=>{},set:()=>{}};function Uke(t,e={}){return t===null?b$t:t??new XBt(e)}const x$t=(t,e,r={})=>{const n=ze.useCallback(()=>{t.current.setStrategyAvailability(gk.DataSource,$7.Default,e.dataSource?()=>!0:()=>!1)},[t,e.dataSource]),[i,a]=ze.useState(!1),o=wl(t,Yx),s=ze.useRef(0),d=e.onDataSourceError,b=pE(()=>{if(!e.pagination)return new nae(o.pageSize);const Me=e.pageSizeOptions.map(Ve=>typeof Ve=="number"?Ve:Ve.value).sort((Ve,Ze)=>Ve-Ze),Ie=Math.min(o.pageSize,Me[0]);return new nae(Ie)}).current,[L,B]=ze.useState(()=>Uke(e.dataSourceCache,r.cacheOptions)),V=ze.useCallback(async(Me,Ie)=>{const Ve=e.dataSource?.getRows;if(!Ve)return;if(Me&&Me!==jy&&e.signature!=="DataGrid"){r.fetchRowChildren?.([Me]);return}r.clearDataSourceState?.();const Ze=Ie||{},{skipCache:Je}=Ze,nt=Ms(Ze,y$t),ut=Mr({},g$t(t),t.current.unstable_applyPipeProcessors("getRowsParams",{}),nt),_t=b.getCacheKeys(ut).map(qt=>L.get(qt));if(!Je&&_t.every(qt=>qt!==void 0)){t.current.applyStrategyProcessor("dataSourceRowsUpdate",{response:nae.mergeResponses(_t),fetchParams:ut});return}(i||t.current.getRowsCount()===0)&&t.current.setLoading(!0);const Dt=s.current+1;s.current=Dt;try{const qt=await Ve(ut);b.splitResponse(ut,qt).forEach((dr,Zt)=>L.set(Zt,dr)),s.current===Dt&&t.current.applyStrategyProcessor("dataSourceRowsUpdate",{response:qt,fetchParams:ut})}catch(qt){s.current===Dt&&(t.current.applyStrategyProcessor("dataSourceRowsUpdate",{error:qt,fetchParams:ut}),typeof d=="function"&&d(new ZBt({message:qt?.message,params:ut,cause:qt})))}finally{i&&s.current===Dt&&t.current.setLoading(!1)}},[b,L,t,i,e.dataSource?.getRows,d,r,e.signature]),X=ze.useCallback(()=>{a(t.current.getActiveStrategy(gk.DataSource)===$7.Default)},[t]),ie=ze.useCallback(Me=>{if("error"in Me){t.current.setRows([]);return}const{response:Ie}=Me;Ie.rowCount!==void 0&&t.current.setRowCount(Ie.rowCount),t.current.setRows(Ie.rows),t.current.unstable_applyPipeProcessors("processDataSourceRows",{params:Me.fetchParams,response:Ie},!0)},[t]),de=e.dataSource?.updateRow,ae=r.handleEditRow,U=ze.useCallback(async Me=>{if(de)try{const Ie=await de(Me);return typeof ae=="function"?(ae(Me,Ie),Ie):(t.current.updateNestedRows([Ie],[]),Ie&&!Q3(Ie,Me.previousRow)&&t.current.dataSource.cache.clear(),Ie)}catch(Ie){throw typeof d=="function"&&d(new KBt({message:Ie?.message,params:Me,cause:Ie})),Ie}},[t,de,d,ae]),ve={dataSource:{fetchRows:V,cache:L,editRow:U}},Se=ze.useMemo(()=>d4(V,0),[V]),Pe=ze.useRef(!0);return ze.useEffect(()=>{if(Pe.current){Pe.current=!1;return}if(e.dataSourceCache===void 0)return;const Me=Uke(e.dataSourceCache,r.cacheOptions);B(Ie=>Ie!==Me?Me:Ie)},[e.dataSourceCache,r.cacheOptions]),ze.useEffect(()=>{const Me=t.current.getActiveStrategy(gk.DataSource);if(!(Me!==$7.Default&&Me!==$7.LazyLoading))return e.dataSource&&(t.current.dataSource.cache.clear(),t.current.dataSource.fetchRows()),()=>{s.current+=1}},[t,e.dataSource]),{api:{public:ve},debouncedFetchRows:Se,strategyProcessor:{strategyName:$7.Default,group:"dataSourceRowsUpdate",processor:ie},setStrategyAvailability:n,cacheChunkManager:b,cache:L,events:{strategyAvailabilityChange:X,sortModelChange:RP(i,()=>Se()),filterModelChange:RP(i,()=>Se()),paginationModelChange:RP(i,()=>Se())}}},_$t=(t,e)=>{const{api:r,strategyProcessor:n,events:i,setStrategyAvailability:a}=x$t(t,e);nh(t,r.public,"public"),W9(t,n.strategyName,n.group,n.processor),Object.entries(i).forEach(([o,s])=>{sc(t,o,s)}),ze.useEffect(()=>{a()},[a])},w$t=(t,e,r)=>{Iqt(t,e),NGt(t,e),IGt(t),ox(Rqt,t,e),ox(DGt,t,e),ox(Gqt,t,e),ox(AGt,t,e),ox(pGt,t,e),ox(TGt,t,e),ox(sGt,t,e),ox(FGt,t,e),ox(mGt,t,e),ox(nGt,t,e),ox(h$t,t,e),ox(Yqt,t,e),ox(s$t,t,e),ox(Vqt,t,e),ox(JGt,t,e),ox(jBt,t,e),ox(jGt,t,e),ox(WGt,t,e),ox(v$t,t,e),Fqt(t,e),fGt(t,e),LGt(t,e),$qt(t,e),CGt(t,e,r),p$t(t,e),PGt(t,e,r),ZGt(t),QGt(t,e),EGt(t,e),lGt(t,e),gGt(t,e),oGt(t,e,r),zGt(t,e),Xqt(t,e),u$t(t,e),vGt(t,e),YGt(t),BGt(t,e),qqt(t),Kqt(t,e),rGt(t,e),jqt(t,e),qGt(t,e),UGt(t,e),XGt(t),VBt(t,e),m$t(t,e),_$t(t,e),ze.useEffect(()=>{t.current.runAppliersForPendingProcessors()})},S$t=t=>{const{classes:e,headerAlign:r,isDragging:n,isLastColumn:i,showLeftBorder:a,showRightBorder:o,groupId:s,pinnedPosition:d}=t,b={root:["columnHeader",r==="left"&&"columnHeader--alignLeft",r==="center"&&"columnHeader--alignCenter",r==="right"&&"columnHeader--alignRight",n&&"columnHeader--moving",o&&"columnHeader--withRightBorder",a&&"columnHeader--withLeftBorder","withBorderColor",s===null?"columnHeader--emptyGroup":"columnHeader--filledGroup",d===Nh.LEFT&&"columnHeader--pinnedLeft",d===Nh.RIGHT&&"columnHeader--pinnedRight",i&&"columnHeader--last"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer","withBorderColor"],titleContainerContent:["columnHeaderTitleContainerContent"]};return Cs(b,Fh,e)};function T$t(t){const{groupId:e,width:r,depth:n,maxDepth:i,fields:a,height:o,colIndex:s,hasFocus:d,tabIndex:b,isLastColumn:L,pinnedPosition:B,pinnedOffset:V}=t,X=Cu(),ie=Kv(),de=ze.useRef(null),ae=wd(),U=wl(ae,iGe),ve=e?U[e]:{},{headerName:Se=e??"",description:Pe="",headerAlign:Me=void 0}=ve;let Ie;const Ve=e&&U[e]?.renderHeaderGroup,Ze=ze.useMemo(()=>({groupId:e,headerName:Se,description:Pe,depth:n,maxDepth:i,fields:a,colIndex:s,isLastColumn:L}),[e,Se,Pe,n,i,a,s,L]);e&&Ve&&(Ie=Ve(Ze));const Je=Mr({},t,{classes:X.classes,headerAlign:Me,depth:n,isDragging:!1}),nt=Se??e,ut=Vd(),ht=e===null?`empty-group-cell-${ut}`:e,_t=S$t(Je);ze.useLayoutEffect(()=>{if(d){const Cr=de.current.querySelector('[tabindex="0"]')||de.current;if(!Cr)return;if(rye())Cr.focus({preventScroll:!0});else{const yt=ae.current.getScrollPosition();Cr.focus(),ae.current.scroll(yt)}}},[ae,d]);const Dt=ze.useCallback(Zt=>Cr=>{cU(Cr)||ae.current.publishEvent(Zt,Ze,Cr)},[ae,Ze]),qt=ze.useMemo(()=>({onKeyDown:Dt("columnGroupHeaderKeyDown"),onFocus:Dt("columnGroupHeaderFocus"),onBlur:Dt("columnGroupHeaderBlur")}),[Dt]),Lt=typeof ve.headerClassName=="function"?ve.headerClassName(Ze):ve.headerClassName,dr=ze.useMemo(()=>NX(Mr({},t.style),ie,B,V),[B,V,t.style,ie]);return Ke.jsx(CGe,Mr({ref:de,classes:_t,columnMenuOpen:!1,colIndex:s,height:o,isResizing:!1,sortDirection:null,hasFocus:!1,tabIndex:b,isDraggable:!1,headerComponent:Ie,headerClassName:Lt,description:Pe,elementId:ht,width:r,columnMenuIconButton:null,columnTitleIconButtons:null,resizable:!1,label:nt,"aria-colspan":a.length,"data-fields":`|-${a.join("-|-")}-|`,style:dr},qt))}const Hke={root:Bi.scrollbarFiller,pinnedRight:Bi["scrollbarFiller--pinnedRight"]};function E$t({pinnedRight:t}){return Ke.jsx("div",{role:"presentation",className:Vo(Hke.root,t&&Hke.pinnedRight)})}const jke=fa("div",{name:"MuiDataGrid",slot:"ColumnHeaderRow"})({display:"flex"}),A$t=t=>{const{visibleColumns:e,sortColumnLookup:r,filterColumnLookup:n,columnHeaderTabIndexState:i,columnGroupHeaderTabIndexState:a,columnHeaderFocus:o,columnGroupHeaderFocus:s,headerGroupingMaxDepth:d,columnMenuState:b,columnVisibility:L,columnGroupsHeaderStructure:B,hasOtherElementInTabSequence:V}=t,[X,ie]=ze.useState(""),[de,ae]=ze.useState(""),U=tT(),ve=Cu(),Se=wl(U,nGe),Pe=wl(U,QL),Me=wl(U,WBt),Ie=wl(U,EX),Ve=wl(U,qk),Ze=vGe(Pe,Me,Ie.left.length),Je=wl(U,O0e),nt=wl(U,oqe),ut=wl(U,KFt),ht=wl(U,JFt),_t=wl(U,sqe),Dt=ze.useCallback(Ir=>ae(Ir.field),[]),qt=ze.useCallback(()=>ae(""),[]),Lt=ze.useCallback(Ir=>ie(Ir.field),[]),dr=ze.useCallback(()=>ie(""),[]),Zt=ze.useMemo(()=>Ie.left.length?{firstColumnIndex:0,lastColumnIndex:Ie.left.length}:null,[Ie.left.length]),Cr=ze.useMemo(()=>Ie.right.length?{firstColumnIndex:e.length-Ie.right.length,lastColumnIndex:e.length}:null,[Ie.right.length,e.length]);sc(U,"columnResizeStart",Dt),sc(U,"columnResizeStop",qt),sc(U,"columnHeaderDragStart",Lt),sc(U,"columnHeaderDragEndNative",dr);const yt=Ir=>{const{renderContext:_n=Me}=Ir||{},Un=_n.firstColumnIndex,Qn=Math.min(_n.lastColumnIndex,e.length);return{renderedColumns:e.slice(Un,Qn),firstColumnToRender:Un,lastColumnToRender:Qn}},Vt=(Ir,_n,Un,Qn=!1)=>{const Jn=Ir?.position===Nh.RIGHT,Vn=Ir?.position===void 0,jn=Ie.right.length>0&&Jn||Ie.right.length===0&&Vn,Lr=Ze-Un;return Ke.jsxs(ze.Fragment,{children:[Vn&&Ke.jsx("div",{role:"presentation",style:{width:Lr}}),_n,Vn&&Ke.jsx("div",{role:"presentation",className:Vo(Bi.filler,Qn&&Bi["filler--borderBottom"])}),jn&&Ke.jsx(E$t,{pinnedRight:Jn})]})},Er=(Ir,_n={})=>{const{renderedColumns:Un,firstColumnToRender:Qn}=yt(Ir),Jn=[];for(let Vn=0;Vn<Un.length;Vn+=1){const jn=Un[Vn],Lr=Qn+Vn,Yn=Lr===0,On=i!==null&&i.field===jn.field||Yn&&!V?0:-1,Sn=o!==null&&o.field===jn.field,bn=b.open&&b.field===jn.field,Mn=Ir?.position,gi=t9(Mn,jn.computedWidth,Lr,Pe,Je,_t),Oi=Mn===Nh.RIGHT?Un[Vn-1]:Un[Vn+1],Pa=Oi?o!==null&&o.field===Oi.field:!1,va=Vn,ti=Un.length,Tn=L$(Mn,va,ve.showColumnVerticalBorder,ve.pinnedColumnsSectionSeparator),bi=D$(Mn,va,ti,ve.showColumnVerticalBorder,nt,ve.pinnedColumnsSectionSeparator);Jn.push(Ke.jsx(NHt,Mr({},r[jn.field],{columnMenuOpen:bn,filterItemsCounter:n[jn.field]&&n[jn.field].length,headerHeight:ut,isDragging:jn.field===X,colDef:jn,colIndex:Lr,isResizing:de===jn.field,isLast:Lr===Pe.length-1,hasFocus:Sn,tabIndex:On,pinnedPosition:Mn,pinnedOffset:gi,isSiblingFocused:Pa,showLeftBorder:Tn,showRightBorder:bi},_n),jn.field))}return Vt(Ir,Jn,0)},sr=()=>Ke.jsxs(jke,{role:"row","aria-rowindex":d+1,ownerState:ve,className:Bi["row--borderBottom"],style:{height:ut},children:[Zt&&Er({position:Nh.LEFT,renderContext:Zt},{disableReorder:!0}),Er({renderContext:Me}),Cr&&Er({position:Nh.RIGHT,renderContext:Cr},{disableReorder:!0,separatorSide:iye.Left})]}),or=({depth:Ir,params:_n})=>{const Un=yt(_n);if(Un.renderedColumns.length===0)return null;const{firstColumnToRender:Qn,lastColumnToRender:Jn}=Un,Vn=B[Ir],jn=e[Qn].field,Lr=Se[jn]?.[Ir]??null,Yn=Vn.findIndex(({groupId:Tn,columnFields:bi})=>Tn===Lr&&bi.includes(jn)),On=e[Jn-1].field,Sn=Se[On]?.[Ir]??null,bn=Vn.findIndex(({groupId:Tn,columnFields:bi})=>Tn===Sn&&bi.includes(On)),Mn=Vn.slice(Yn,bn+1).map(Tn=>Mr({},Tn,{columnFields:Tn.columnFields.filter(bi=>L[bi]!==!1)})).filter(Tn=>Tn.columnFields.length>0),gi=Mn[0].columnFields.indexOf(jn),Pa=Mn[0].columnFields.slice(0,gi).reduce((Tn,bi)=>{const Wn=Ve[bi];return Tn+(Wn.computedWidth??0)},0);let va=Qn;const ti=Mn.map(({groupId:Tn,columnFields:bi},Wn)=>{const Ei=s!==null&&s.depth===Ir&&bi.includes(s.field),Ki=a!==null&&a.depth===Ir&&bi.includes(a.field)?0:-1,sa={width:bi.reduce((go,Co)=>go+Ve[Co].computedWidth,0),fields:bi,colIndex:va},xa=_n.position,Qa=t9(xa,sa.width,va,Pe,Je,_t);va+=bi.length;let is=Wn;return xa===Nh.LEFT&&(is=va-1),Ke.jsx(T$t,{groupId:Tn,width:sa.width,fields:sa.fields,colIndex:sa.colIndex,depth:Ir,isLastColumn:Wn===Mn.length-1,maxDepth:d,height:ht,hasFocus:Ei,tabIndex:Ki,pinnedPosition:xa,pinnedOffset:Qa,showLeftBorder:L$(xa,is,ve.showColumnVerticalBorder,ve.pinnedColumnsSectionSeparator),showRightBorder:D$(xa,is,Mn.length,ve.showColumnVerticalBorder,nt,ve.pinnedColumnsSectionSeparator)},Wn)});return Vt(_n,ti,Pa)};return{renderContext:Me,leftRenderContext:Zt,rightRenderContext:Cr,pinnedColumns:Ie,visibleColumns:e,columnPositions:Pe,getFillers:Vt,getColumnHeadersRow:sr,getColumnsToRender:yt,getColumnGroupHeadersRows:()=>{if(d===0)return null;const Ir=[];for(let _n=0;_n<d;_n+=1)Ir.push(Ke.jsxs(jke,{role:"row","aria-rowindex":_n+1,ownerState:ve,style:{height:ht},children:[Zt&&or({depth:_n,params:{position:Nh.LEFT,renderContext:Zt,maxLastColumn:Zt.lastColumnIndex}}),or({depth:_n,params:{renderContext:Me}}),Cr&&or({depth:_n,params:{position:Nh.RIGHT,renderContext:Cr,maxLastColumn:Cr.lastColumnIndex}})]},_n));return Ir},getPinnedCellOffset:t9,isDragging:!!X,getInnerProps:()=>({role:"rowgroup"})}},C$t=["className"],M$t=t=>{const{classes:e}=t;return Cs({root:["columnHeaders"]},Fh,e)},R$t=gp("div",{name:"MuiDataGrid",slot:"ColumnHeaders"})({display:"flex",flexDirection:"column",borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"}),k$t=of(function(e,r){const{className:n}=e,i=Ms(e,C$t),a=Cu(),o=M$t(a);return Ke.jsx(R$t,Mr({className:Vo(o.root,n),ownerState:a},i,{role:"presentation",ref:r}))}),I$t=["className","visibleColumns","sortColumnLookup","filterColumnLookup","columnHeaderTabIndexState","columnGroupHeaderTabIndexState","columnHeaderFocus","columnGroupHeaderFocus","headerGroupingMaxDepth","columnMenuState","columnVisibility","columnGroupsHeaderStructure","hasOtherElementInTabSequence"],P$t=of(function(e,r){const{visibleColumns:n,sortColumnLookup:i,filterColumnLookup:a,columnHeaderTabIndexState:o,columnGroupHeaderTabIndexState:s,columnHeaderFocus:d,columnGroupHeaderFocus:b,headerGroupingMaxDepth:L,columnMenuState:B,columnVisibility:V,columnGroupsHeaderStructure:X,hasOtherElementInTabSequence:ie}=e,de=Ms(e,I$t),{getInnerProps:ae,getColumnHeadersRow:U,getColumnGroupHeadersRows:ve}=A$t({visibleColumns:n,sortColumnLookup:i,filterColumnLookup:a,columnHeaderTabIndexState:o,columnGroupHeaderTabIndexState:s,columnHeaderFocus:d,columnGroupHeaderFocus:b,headerGroupingMaxDepth:L,columnMenuState:B,columnVisibility:V,columnGroupsHeaderStructure:X,hasOtherElementInTabSequence:ie});return Ke.jsxs(k$t,Mr({},de,ae(),{ref:r,children:[ve(),U()]}))}),D$t=Vk(P$t);function L$t(t){return null}function O$t(t){return null}const N$t=of(function(e,r){const i=wd().current.getLocaleText("noResultsOverlayLabel");return Ke.jsx(FX,Mr({},e,{ref:r,children:i}))}),F$t=()=>Cs({root:["bottomContainer"]},Fh,{}),z$t=gp("div")({position:"sticky",zIndex:40,bottom:"calc(var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize))"});function B$t(t){const e=F$t();return Ke.jsx(z$t,Mr({},t,{className:Vo(e.root,Bi["container--bottom"]),role:"presentation"}))}const U$t=Mr({},MFt,{cell:bUt,skeletonCell:MUt,columnHeaderFilterIconButton:YHt,columnHeaderSortIcon:$Ht,columnMenu:cjt,columnHeaders:D$t,detailPanels:L$t,bottomContainer:B$t,footer:qVt,footerRowCount:oqt,toolbar:BVt,pinnedRows:O$t,loadingOverlay:JVt,noResultsOverlay:N$t,noRowsOverlay:QVt,noColumnsOverlay:eqt,pagination:rqt,filterPanel:Bjt,columnsPanel:pjt,columnsManagement:Yjt,panel:bjt,row:hqt}),H$t={disableMultipleColumnsFiltering:!0,disableMultipleColumnsSorting:!0,throttleRowsMs:void 0,hideFooterRowCount:!1,pagination:!0,checkboxSelectionVisibleOnly:!1,disableColumnReorder:!0,keepColumnPositionIfDraggedOutside:!1,signature:"DataGrid",listView:!1},j$t=t=>Mr({},H$t,t.dataSource?{filterMode:"server",sortingMode:"server",paginationMode:"server"}:{}),V$t=U$t,q$t=t=>{const e=cy(),r=ze.useMemo(()=>Wve({props:t,theme:e,name:"MuiDataGrid"}),[e,t]),n=ze.useMemo(()=>Mr({},f7t,r.localeText),[r.localeText]),i=ze.useMemo(()=>dUt({defaultSlots:V$t,slots:r.slots}),[r.slots]),a=ze.useMemo(()=>Object.keys(O$).reduce((o,s)=>(o[s]=r[s]??O$[s],o),{}),[r]);return ze.useMemo(()=>Mr({},r,a,{localeText:n,slots:i},j$t(r)),[r,n,i,a])};class G$t{maxListeners=20;warnOnce=!1;events={};on(e,r,n={}){let i=this.events[e];i||(i={highPriority:new Map,regular:new Map},this.events[e]=i),n.isFirst?i.highPriority.set(r,!0):i.regular.set(r,!0)}removeListener(e,r){this.events[e]&&(this.events[e].regular.delete(r),this.events[e].highPriority.delete(r))}removeAllListeners(){this.events={}}emit(e,...r){const n=this.events[e];if(!n)return;const i=Array.from(n.highPriority.keys()),a=Array.from(n.regular.keys());for(let o=i.length-1;o>=0;o-=1){const s=i[o];n.highPriority.has(s)&&s.apply(this,r)}for(let o=0;o<a.length;o+=1){const s=a[o];n.regular.has(s)&&s.apply(this,r)}}once(e,r){const n=this;this.on(e,function i(...a){n.removeListener(e,i),r.apply(n,a)})}}const BGe=Symbol("mui.api_private"),$$t=t=>t.isPropagationStopped!==void 0;let Vke=0;function W$t(t){const e=t.current?.[BGe];if(e)return e;const r={},n={state:r,store:SX.create(r),instanceId:{id:Vke}};return Vke+=1,n.getPublicApi=()=>t.current,n.register=(i,a)=>{Object.keys(a).forEach(o=>{const s=a[o],d=n[o];if(d?.spying===!0?d.target=s:n[o]=s,i==="public"){const b=t.current,L=b[o];L?.spying===!0?L.target=s:b[o]=s}})},n.register("private",{caches:{},eventManager:new G$t}),n}function Y$t(t){return{get state(){return t.current.state},get store(){return t.current.store},get instanceId(){return t.current.instanceId},[BGe]:t.current}}function X$t(t,e){const r=ze.useRef(null),n=ze.useRef(null);n.current||(n.current=W$t(r)),r.current||(r.current=Y$t(n));const i=ze.useCallback((...o)=>{const[s,d,b={}]=o;if(b.defaultMuiPrevented=!1,$$t(b)&&b.isPropagationStopped())return;const L=e.signature===BC.DataGridPro||e.signature===BC.DataGridPremium?{api:n.current.getPublicApi()}:{};n.current.eventManager.emit(s,d,b,L)},[n,e.signature]),a=ze.useCallback((o,s,d)=>{n.current.eventManager.on(o,s,d);const b=n.current;return()=>{b.eventManager.removeListener(o,s)}},[n]);return nh(n,{subscribeEvent:a,publishEvent:i},"public"),t&&!t.current?.state&&(t.current=r.current),ze.useImperativeHandle(t,()=>r.current,[r]),ze.useEffect(()=>{const o=n.current;return()=>{o.publishEvent("unmount")}},[n]),n}const qke={hooks:{useCSSVariables:g8t,useGridAriaAttributes:pqt,useGridRowAriaAttributes:vqt,useGridRowsOverridableMethods:mqt,useGridParamsOverridableMethods:gqt,useCellAggregationResult:()=>null,useFilterValueGetter:t=>t.current.getRowValue}},UGe=function(e,r){const n=q$t(e),i=X$t(n.apiRef,n);return w$t(i,n,qke),Ke.jsx(yqt,{privateApiRef:i,configuration:qke,props:n,children:Ke.jsx(qUt,Mr({className:n.className,style:n.style,sx:n.sx},n.slotProps?.root,{ref:r}))})},zX=ze.memo(of(UGe));UGe.propTypes={apiRef:cn.shape({current:cn.object}),"aria-label":cn.string,"aria-labelledby":cn.string,autoHeight:cn.bool,autoPageSize:cn.bool,autosizeOnMount:cn.bool,autosizeOptions:cn.shape({columns:cn.arrayOf(cn.string),disableColumnVirtualization:cn.bool,expand:cn.bool,includeHeaders:cn.bool,includeOutliers:cn.bool,outliersFactor:cn.number}),cellModesModel:cn.object,checkboxSelection:cn.bool,classes:cn.object,className:cn.string,clipboardCopyCellDelimiter:cn.string,columnBufferPx:cn.number,columnFilterDebounceMs:cn.number,columnGroupHeaderHeight:cn.number,columnGroupingModel:cn.arrayOf(cn.object),columnHeaderHeight:cn.number,columns:cn.arrayOf(cn.object).isRequired,columnVisibilityModel:cn.object,dataSource:cn.shape({getRows:cn.func.isRequired,updateRow:cn.func}),dataSourceCache:cn.shape({clear:cn.func.isRequired,get:cn.func.isRequired,set:cn.func.isRequired}),density:cn.oneOf(["comfortable","compact","standard"]),disableAutosize:cn.bool,disableColumnFilter:cn.bool,disableColumnMenu:cn.bool,disableColumnResize:cn.bool,disableColumnSelector:cn.bool,disableColumnSorting:cn.bool,disableDensitySelector:cn.bool,disableEval:cn.bool,disableMultipleRowSelection:cn.bool,disableRowSelectionExcludeModel:cn.bool,disableRowSelectionOnClick:cn.bool,disableVirtualization:cn.bool,editMode:cn.oneOf(["cell","row"]),estimatedRowCount:cn.number,experimentalFeatures:cn.shape({warnIfFocusStateIsNotSynced:cn.bool}),filterDebounceMs:cn.number,filterMode:cn.oneOf(["client","server"]),filterModel:cn.shape({items:cn.arrayOf(cn.shape({field:cn.string.isRequired,id:cn.oneOfType([cn.number,cn.string]),operator:cn.string.isRequired,value:cn.any})).isRequired,logicOperator:cn.oneOf(["and","or"]),quickFilterExcludeHiddenColumns:cn.bool,quickFilterLogicOperator:cn.oneOf(["and","or"]),quickFilterValues:cn.array}),getCellClassName:cn.func,getDetailPanelContent:cn.func,getEstimatedRowHeight:cn.func,getRowClassName:cn.func,getRowHeight:cn.func,getRowId:cn.func,getRowSpacing:cn.func,hideFooter:cn.bool,hideFooterPagination:cn.bool,hideFooterSelectedRowCount:cn.bool,ignoreDiacritics:cn.bool,ignoreValueFormatterDuringExport:cn.oneOfType([cn.shape({clipboardExport:cn.bool,csvExport:cn.bool}),cn.bool]),initialState:cn.object,isCellEditable:cn.func,isRowSelectable:cn.func,keepNonExistentRowsSelected:cn.bool,label:cn.string,loading:cn.bool,localeText:cn.object,logger:cn.shape({debug:cn.func.isRequired,error:cn.func.isRequired,info:cn.func.isRequired,warn:cn.func.isRequired}),logLevel:cn.oneOf(["debug","error","info","warn",!1]),nonce:cn.string,onCellClick:cn.func,onCellDoubleClick:cn.func,onCellEditStart:cn.func,onCellEditStop:cn.func,onCellKeyDown:cn.func,onCellModesModelChange:cn.func,onClipboardCopy:cn.func,onColumnHeaderClick:cn.func,onColumnHeaderContextMenu:cn.func,onColumnHeaderDoubleClick:cn.func,onColumnHeaderEnter:cn.func,onColumnHeaderLeave:cn.func,onColumnHeaderOut:cn.func,onColumnHeaderOver:cn.func,onColumnOrderChange:cn.func,onColumnResize:cn.func,onColumnVisibilityModelChange:cn.func,onColumnWidthChange:cn.func,onDataSourceError:cn.func,onDensityChange:cn.func,onFilterModelChange:cn.func,onMenuClose:cn.func,onMenuOpen:cn.func,onPaginationMetaChange:cn.func,onPaginationModelChange:cn.func,onPreferencePanelClose:cn.func,onPreferencePanelOpen:cn.func,onProcessRowUpdateError:cn.func,onResize:cn.func,onRowClick:cn.func,onRowCountChange:cn.func,onRowDoubleClick:cn.func,onRowEditStart:cn.func,onRowEditStop:cn.func,onRowModesModelChange:cn.func,onRowSelectionModelChange:cn.func,onSortModelChange:cn.func,onStateChange:cn.func,pageSizeOptions:cn.arrayOf(cn.oneOfType([cn.number,cn.shape({label:cn.string.isRequired,value:cn.number.isRequired})]).isRequired),pagination:cn.oneOf([!0]),paginationMeta:cn.shape({hasNextPage:cn.bool}),paginationMode:cn.oneOf(["client","server"]),paginationModel:cn.shape({page:cn.number.isRequired,pageSize:cn.number.isRequired}),processRowUpdate:cn.func,resizeThrottleMs:cn.number,rowBufferPx:cn.number,rowCount:cn.number,rowHeight:cn.number,rowModesModel:cn.object,rows:cn.arrayOf(cn.object),rowSelection:cn.bool,rowSelectionModel:cn.shape({ids:cn.instanceOf(Set).isRequired,type:cn.oneOf(["exclude","include"]).isRequired}),rowSpacingType:cn.oneOf(["border","margin"]),rowSpanning:cn.bool,scrollbarSize:cn.number,showCellVerticalBorder:cn.bool,showColumnVerticalBorder:cn.bool,showToolbar:cn.bool,slotProps:cn.object,slots:cn.object,sortingMode:cn.oneOf(["client","server"]),sortingOrder:cn.arrayOf(cn.oneOf(["asc","desc"])),sortModel:cn.arrayOf(cn.shape({field:cn.string.isRequired,sort:cn.oneOf(["asc","desc"])})),style:cn.object,sx:cn.oneOfType([cn.arrayOf(cn.oneOfType([cn.func,cn.object,cn.bool])),cn.func,cn.object]),virtualizeColumnsWithAutoRowHeight:cn.bool};const Z$t=Hu(Ke.jsx("path",{d:"M19 2h-4.18C14.4.84 13.3 0 12 0S9.6.84 9.18 2H5c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1m7 18H5V4h2v3h10V4h2z"}));function fU(t){return{position:{dimensions:3,columnLabels:["X","Y","Z"],supportsSingleValue:!1,defaultValue:0},direction:{dimensions:3,columnLabels:["X","Y","Z"],supportsSingleValue:!1,defaultValue:0},color:{dimensions:3,columnLabels:["R","G","B"],valueRange:[0,1],supportsSingleValue:!1,defaultValue:.5},radius:{dimensions:1,columnLabels:["Radius"],valueRange:[0,1/0],supportsSingleValue:!0,defaultValue:1},scale:{dimensions:1,columnLabels:["Scale"],valueRange:[0,1/0],supportsSingleValue:!0,defaultValue:1},rotation:{dimensions:3,columnLabels:["X","Y","Z"],supportsSingleValue:!1,defaultValue:0},generic:{dimensions:1,columnLabels:["Value"],supportsSingleValue:!0,defaultValue:0}}[t]}function K$t(t){const e=t.toLowerCase();return e.includes("position")?"position":e.includes("direction")?"direction":e.includes("color")||e.includes("colour")?"color":e.includes("radius")||e.includes("size")?"radius":e.includes("scale")?"scale":e.includes("rotation")||e.includes("rotate")?"rotation":"generic"}function iae(t,e){const r=fU(e);if(Array.isArray(t)&&Array.isArray(t[0]))return t;if(Array.isArray(t)){const n=t;if(n.length===r.dimensions)return[n];const i=[];for(let a=0;a<n.length;a+=r.dimensions)i.push(n.slice(a,a+r.dimensions));return i}return typeof t=="number"?[Array(r.dimensions).fill(t)]:[Array(r.dimensions).fill(r.defaultValue)]}function J$t(t,e){const r=fU(e);return t.length===0?r.supportsSingleValue?r.defaultValue:[]:t.length===1&&r.supportsSingleValue?r.dimensions===1?t[0][0]:t[0]:r.dimensions===1?t.map(n=>n[0]):e==="position"||e==="direction"?t:t.length===1?t[0]:t}function Gke(t,e){const r=[],n=fU(e);return t.forEach((i,a)=>{i.length!==n.dimensions&&r.push(`Row ${a+1} has ${i.length} values, expected ${n.dimensions}`),n.valueRange&&i.forEach((o,s)=>{(o<n.valueRange[0]||o>n.valueRange[1])&&r.push(`Row ${a+1}, ${n.columnLabels[s]}: value ${o} outside range [${n.valueRange[0]}, ${n.valueRange[1]}]`)})}),{valid:r.length===0,errors:r}}function $ke(t,e){const r=fU(t);return e&&e.length>0?[...e[e.length-1]]:Array(r.dimensions).fill(r.defaultValue)}function Q$t(t){try{const e=JSON.parse(t);if(Array.isArray(e))return e}catch{const e=t.trim().split(`
`),r=[];for(const n of e){const a=(n.includes("	")?n.split("	"):n.split(",")).map(o=>parseFloat(o.trim())).filter(o=>!isNaN(o));a.length>0&&r.push(a)}if(r.length>0)return r}return null}function Wke(t){return[{position:[0,0,0],direction:[0,1,0],color:[1,0,0],radius:[1],scale:[1],rotation:[0,0,0],generic:[0]}[t]]}function Yke({open:t,value:e,fieldType:r,fieldLabel:n,enumOptions:i,onSave:a,onCancel:o,onFetchFromServer:s}){const d=fU(r),[b,L]=ze.useState(()=>typeof e=="string"?e:null),[B,V]=ze.useState(()=>typeof e=="string"?Wke(r):iae(e,r)),[X,ie]=ze.useState({type:"include",ids:new Set}),[de,ae]=ze.useState(!1),[U,ve]=ze.useState(""),[Se,Pe]=ze.useState([]),[Me,Ie]=ze.useState(!1);ze.useEffect(()=>{if(t){L(typeof e=="string"?e:null);const Zt=typeof e=="string"?Wke(r):iae(e,r);V(Zt),ie({type:"include",ids:new Set}),ae(!1),ve(""),Pe([]),Ie(!1)}},[t,e,r]);const Ve=d.supportsSingleValue&&B.length===1;ze.useEffect(()=>{const Zt=Gke(B,r);Pe(Zt.errors)},[B,r]);const Ze=ze.useMemo(()=>B.map((Zt,Cr)=>{const yt={id:Cr};return Zt.forEach((Vt,Er)=>{yt[`col${Er}`]=Vt}),yt}),[B]),Je=ze.useMemo(()=>{const Zt=[{field:"id",headerName:"#",width:60,editable:!1,valueGetter:(Cr,yt)=>yt.id+1}];for(let Cr=0;Cr<d.dimensions;Cr++)Zt.push({field:`col${Cr}`,headerName:d.columnLabels[Cr]||`Col ${Cr+1}`,width:120,editable:!0,type:"number",valueGetter:(yt,Vt)=>Vt[`col${Cr}`]});return Zt},[d]),nt=ze.useCallback(Zt=>{const Cr=Zt.id,yt=[...B],Vt=[];for(let Er=0;Er<d.dimensions;Er++){const sr=Zt[`col${Er}`];Vt.push(typeof sr=="number"?sr:d.defaultValue)}return yt[Cr]=Vt,V(yt),Zt},[B,d]),ut=ze.useCallback(()=>{const Zt=$ke(r,B);V([...B,Zt])},[B,r]),ht=ze.useCallback(()=>{if(X.ids.size===0)return;const Zt=B.filter((Cr,yt)=>!X.ids.has(yt));Zt.length===0&&Zt.push($ke(r)),V(Zt),ie({type:"include",ids:new Set})},[B,X,r]),_t=ze.useCallback(()=>{if(Ve){const Zt=Array(5).fill(B[0]).map(Cr=>[...Cr]);V(Zt)}else V([B[0]])},[B,Ve]),Dt=ze.useCallback(async()=>{try{const Zt=await navigator.clipboard.readText(),Cr=Q$t(Zt);if(!Cr){Pe(["Could not parse clipboard data. Expected CSV, TSV, or JSON format."]);return}if(Cr.filter(Vt=>Vt.length!==d.dimensions).length>0){Pe([`Pasted data has invalid dimensions. Expected ${d.dimensions} columns per row.`]);return}V(Cr),Pe([])}catch{Pe(["Failed to read clipboard. Please check browser permissions."])}},[d.dimensions]),qt=ze.useCallback(()=>{const Zt=Gke(B,r);if(!Zt.valid){Pe(Zt.errors);return}const Cr=J$t(B,r);a(Cr)},[B,r,a]),Lt=ze.useCallback(()=>{U&&a(U)},[U,a]),dr=ze.useCallback(async()=>{if(!(!b||!s)){Ie(!0),Pe([]);try{const Zt=await s(b),Cr=iae(Zt,r);V(Cr)}catch(Zt){Pe([`Failed to load data from server: ${Zt instanceof Error?Zt.message:"Unknown error"}`])}finally{Ie(!1)}}},[b,s,r]);return Ke.jsxs(iA,{open:t,onClose:o,maxWidth:"md",fullWidth:!0,PaperProps:{sx:{height:"80vh"}},children:[Ke.jsx(YC,{children:Ke.jsxs(Ul,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:2},children:[Ke.jsxs(Su,{variant:"h6",children:["Edit ",n]}),Ke.jsxs(Ul,{sx:{display:"flex",gap:1},children:[b&&s&&!de&&Ke.jsx(Id,{size:"small",variant:"outlined",onClick:dr,disabled:Me,startIcon:Me?Ke.jsx(_1,{size:16}):void 0,children:Me?"Loading...":`Load "${b}"`}),Ke.jsx(Id,{size:"small",onClick:()=>ae(!de),children:de?"Edit Table":"Switch to Dropdown"})]})]})}),Ke.jsxs(aA,{dividers:!0,children:[Se.length>0&&Ke.jsx(qw,{severity:"error",sx:{mb:2},onClose:()=>Pe([]),children:Se.map((Zt,Cr)=>Ke.jsx("div",{children:Zt},Cr))}),de?Ke.jsxs(Ul,{sx:{p:2},children:[Ke.jsx(Su,{variant:"body2",sx:{mb:2},children:"Select a dynamic value from the dropdown to replace the current array data:"}),Ke.jsx(N8,{options:i,value:U,onChange:(Zt,Cr)=>ve(Cr||""),renderInput:Zt=>Ke.jsx(zg,{...Zt,label:"Select Value",placeholder:"e.g., arrays.positions"}),freeSolo:!0,fullWidth:!0}),d.supportsSingleValue&&Ke.jsx(qw,{severity:"info",sx:{mt:2},children:"Note: You can also enter a single numeric value instead of selecting from the dropdown."})]}):Ke.jsxs(Ul,{sx:{display:"flex",flexDirection:"column",gap:2,height:"calc(80vh - 200px)"},children:[Ke.jsx(Ul,{sx:{flex:1,minHeight:0},children:Ke.jsx(zX,{rows:Ze,columns:Je,processRowUpdate:nt,onProcessRowUpdateError:Zt=>{console.error("Row update error:",Zt),Pe(["Failed to update row. Please check your input."])},checkboxSelection:!0,rowSelectionModel:X,onRowSelectionModelChange:Zt=>{ie(Zt)},sx:{"& .MuiDataGrid-cell:focus":{outline:"none"},"& .MuiDataGrid-cell:focus-within":{outline:"2px solid #1976d2"}}},B.length)}),Ke.jsxs(Ul,{sx:{display:"flex",gap:1,alignItems:"center",flexWrap:"wrap"},children:[Ke.jsx(Id,{size:"small",startIcon:Ke.jsx(lX,{}),onClick:ut,variant:"outlined",children:"Add Row"}),X.ids.size>0&&Ke.jsxs(Id,{size:"small",startIcon:Ke.jsx(eF,{}),onClick:ht,color:"error",variant:"outlined",children:["Delete Selected (",X.ids.size,")"]}),Ke.jsx(Zh,{title:"Paste data from clipboard (CSV, TSV, or JSON)",children:Ke.jsx(Id,{size:"small",startIcon:Ke.jsx(Z$t,{}),onClick:Dt,variant:"outlined",children:"Paste"})}),d.supportsSingleValue&&Ke.jsx(Ul,{sx:{ml:"auto"},children:Ke.jsx(Eb,{label:Ve?"Single Value (applies to all)":"Per Instance",color:Ve?"primary":"default",size:"small",onClick:_t,sx:{cursor:"pointer"}})})]})]})]}),Ke.jsxs(WC,{sx:{p:2},children:[Ke.jsx(Id,{onClick:o,children:"Cancel"}),de?Ke.jsx(Id,{onClick:Lt,variant:"contained",disabled:!U,children:"Switch to Dropdown"}):Ke.jsxs(Id,{onClick:qt,variant:"contained",disabled:Se.length>0,children:["Save (",B.length," ",B.length===1?"row":"rows",")"]})]})]})}const HGe=t=>typeof t!="string"?!1:/^#[0-9A-Fa-f]{3}$|^#[0-9A-Fa-f]{6}$/.test(t),ZC=t=>typeof t!="string"?!1:!HGe(t),Xke=t=>{if(!HGe(t))return null;const e=t.replace("#","");let r,n,i;return e.length===3?(r=parseInt(e[0]+e[0],16),n=parseInt(e[1]+e[1],16),i=parseInt(e[2]+e[2],16)):(r=parseInt(e.slice(0,2),16),n=parseInt(e.slice(2,4),16),i=parseInt(e.slice(4,6),16)),[r/255,n/255,i/255]},eWt=({value:t,label:e,required:r,errors:n,onEdit:i,onClear:a})=>{const o=Array.isArray(t)?JSON.stringify(t):String(t),s=typeof t=="number"?"number":"array";return Ke.jsxs(Ul,{sx:{display:"flex",alignItems:"flex-start",gap:1,marginBottom:2},children:[Ke.jsx(zg,{fullWidth:!0,label:e,value:o,disabled:!0,required:r,error:!!n,helperText:n||"Static value (click edit to modify)",sx:{"& .MuiInputBase-input.Mui-disabled":{WebkitTextFillColor:"rgba(0, 0, 0, 0.6)",fontFamily:"monospace"}}}),Ke.jsx($Ve,{valueType:s,onEditArray:i,onClear:a})]})},tWt=({data:t,handleChange:e,path:r,label:n,schema:i,required:a,errors:o,visible:s})=>{const d=i["x-features"]||[],b=d.includes("color-picker"),L=d.includes("free-solo");d.includes("dynamic-atom-props");const B=i.enum||[],V=Array.isArray(t)||typeof t=="number",[X,ie]=ze.useState(!1),{roomId:de,currentFrame:ae,clientId:U}=rh(),ve=K$t(r),Se=typeof t=="string"&&ZC(t),{data:Pe,refetch:Me,isFetching:Ie}=_v({queryKey:["frame",de,ae,t],queryFn:({signal:Dt})=>ly(de,ae,[t],Dt),enabled:!1,placeholderData:D0}),Ve=ze.useCallback(()=>{ie(!0)},[]),Ze=ze.useCallback(Dt=>{e(r,Dt),ie(!1)},[e,r]),Je=ze.useCallback(()=>{e(r,"")},[e,r]),nt=ze.useCallback(async()=>{const Dt=await Me();if(Dt.data&&typeof t=="string"){const qt=Dt.data[t];if(qt)return Array.from(qt)}throw new Error("No data returned from server")},[Me,t]);if(V)return Ke.jsxs(Ke.Fragment,{children:[Ke.jsx(eWt,{value:t,label:n||"",required:a,errors:o,onEdit:Ve,onClear:Je}),Ke.jsx(Yke,{open:X,value:t,fieldType:ve,fieldLabel:n||r,enumOptions:B,onSave:Ze,onCancel:()=>ie(!1),onFetchFromServer:Se?nt:void 0})]});if(!s)return null;const ut=t??i.default??"",_t=typeof ut=="string"&&ut.startsWith("#")&&ut.length===7?ut:"#000000";return Ke.jsxs(Ke.Fragment,{children:[Ke.jsx(Ul,{sx:{marginBottom:2},children:Ke.jsxs(Ul,{sx:{display:"flex",gap:1,alignItems:"flex-start"},children:[Ke.jsx(N8,{freeSolo:L,options:B,value:ut,inputValue:typeof ut=="string"?ut:"",getOptionLabel:Dt=>typeof Dt=="string"?Dt:Array.isArray(Dt)?JSON.stringify(Dt):String(Dt),onChange:(Dt,qt)=>{e(r,qt||"")},onInputChange:(Dt,qt,Lt)=>{Lt==="input"&&L&&e(r,qt)},renderInput:Dt=>Ke.jsx(zg,{...Dt,label:n,required:a,error:!!o,helperText:o}),fullWidth:!0}),b&&Ke.jsx("input",{type:"color",value:_t,onChange:Dt=>e(r,Dt.target.value),style:{width:"50px",height:"40px",marginTop:"8px",border:"1px solid rgba(0, 0, 0, 0.23)",borderRadius:"4px",cursor:"pointer"},title:"Pick color"}),Ke.jsx($Ve,{valueType:"string",onEditArray:Ve})]})}),Ke.jsx(Yke,{open:X,value:t,fieldType:ve,fieldLabel:n||r,enumOptions:B,onSave:Ze,onCancel:()=>ie(!1),onFetchFromServer:Se?nt:void 0})]})},rWt=bh(10,vm(Qx(t=>t["x-custom-type"]==="dynamic-enum"),Qm("Control"))),nWt=$w(tWt),jGe=(t,e,r,n=!0)=>_v({queryKey:["properties","available",t,e],queryFn:async()=>{if(!t)throw new Error("Room ID is required");const i=await bBe(t,e);return bwt(i,r)},enabled:n&&!!t&&r>0,staleTime:300*1e3,placeholderData:D0}),iWt=(t,e,r,n=!0)=>INt({queries:r.map(i=>({queryKey:["property","value",t,e,i],queryFn:async()=>{if(!t)throw new Error("Room ID is required");const a=await ly(t,e,[i]);return{key:i,value:a?.[i]}},enabled:n&&!!t&&r.length>0,staleTime:1e3,placeholderData:D0}))}),aWt=Hu(Ke.jsx("path",{d:"M22 5v2h-3v3h-2V7h-3V5h3V2h2v3zm-3 14H5V5h6V3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-6h-2zm-4-6v4h2v-4zm-4 4h2V9h-2zm-2 0v-6H7v6z"})),oWt=Hu(Ke.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2M9 17H7v-5h2zm4 0h-2v-3h2zm0-5h-2v-2h2zm4 5h-2V7h2z"})),VGe=Hu(Ke.jsx("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"})),sWt=Hu(Ke.jsx("path",{d:"m22.7 19-9.1-9.1c.9-2.3.4-5-1.5-6.9-2-2-5-2.4-7.4-1.3L9 6 6 9 1.6 4.7C.4 7.1.9 10.1 2.9 12.1c1.9 1.9 4.6 2.4 6.9 1.5l9.1 9.1c.4.4 1 .4 1.4 0l2.3-2.3c.5-.4.5-1.1.1-1.4"})),lWt=Hu([Ke.jsx("circle",{cx:"12",cy:"12",r:"3.2"},"0"),Ke.jsx("path",{d:"M9 2 7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5"},"1")]),uWt=Hu(Ke.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"})),cWt=Hu([Ke.jsx("path",{d:"m12 2-5.5 9h11z"},"0"),Ke.jsx("circle",{cx:"17.5",cy:"17.5",r:"4.5"},"1"),Ke.jsx("path",{d:"M3 13.5h8v8H3z"},"2")]),fWt=Hu(Ke.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})),Zke=Hu(Ke.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"})),lye=Hu(Ke.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"})),uye=Hu(Ke.jsx("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"})),Kke=Hu(Ke.jsx("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"})),dWt=Hu(Ke.jsx("path",{d:"M5 15H3v4c0 1.1.9 2 2 2h4v-2H5zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2zm14-2h-4v2h4v4h2V5c0-1.1-.9-2-2-2m0 16h-4v2h4c1.1 0 2-.9 2-2v-4h-2zM12 9c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"})),Jke=Hu(Ke.jsx("path",{d:"M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"})),qGe=Hu(Ke.jsx("path",{d:"M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2m0 12H4V8h16z"})),hWt=Hu(Ke.jsx("path",{d:"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"})),pWt=Hu(Ke.jsx("path",{d:"M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm7 7V3.5L18.5 9z"})),vWt=Hu(Ke.jsx("path",{d:"M3 13h2v-2H3zm0 4h2v-2H3zm0-8h2V7H3zm4 4h14v-2H7zm0 4h14v-2H7zM7 7v2h14V7z"})),mWt=Hu(Ke.jsx("path",{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7m0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5"})),n9=Hu(Ke.jsx("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1z"})),GGe=Hu(Ke.jsx("path",{d:"M12 17c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m6-9h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6h1.9c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m0 12H6V10h12z"})),gWt=Hu(Ke.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"})),yWt=Hu(Ke.jsx("path",{d:"M13 3h-2v10h2zm4.83 2.17-1.42 1.42C17.99 7.86 19 9.81 19 12c0 3.87-3.13 7-7 7s-7-3.13-7-7c0-2.19 1.01-4.14 2.58-5.42L6.17 5.17C4.23 6.82 3 9.26 3 12c0 4.97 4.03 9 9 9s9-4.03 9-9c0-2.74-1.23-5.18-3.17-6.83"})),$Ge=Hu(Ke.jsx("path",{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5m0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"})),WGe=Hu(Ke.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"})),YGe=Hu(Ke.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"})),bWt=Hu(Ke.jsx("path",{d:"M2.01 21 23 12 2.01 3 2 10l15 2-15 2z"})),xWt=Hu(Ke.jsx("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"})),Epe=Hu(Ke.jsx("path",{d:"M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"})),XGe=Hu(Ke.jsx("path",{d:"m22 9.24-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28z"})),_Wt=Hu(Ke.jsx("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"})),wWt=Hu(Ke.jsx("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}));function SWt({perParticleProps:t,globalProps:e,selectedKeys:r,onToggle:n,onClearAll:i}){const[a,o]=ze.useState(""),[s,d]=ze.useState(!0),[b,L]=ze.useState(!0),B=ze.useMemo(()=>{if(!a)return t;const X=a.toLowerCase();return t.filter(ie=>ie.key.toLowerCase().includes(X))},[t,a]),V=ze.useMemo(()=>{if(!a)return e;const X=a.toLowerCase();return e.filter(ie=>ie.key.toLowerCase().includes(X))},[e,a]);return Ke.jsxs(Ul,{sx:{p:1},children:[Ke.jsx(zg,{fullWidth:!0,size:"small",placeholder:"Search properties...",value:a,onChange:X=>o(X.target.value),slotProps:{input:{startAdornment:Ke.jsx(YGe,{sx:{mr:1,color:"text.secondary"}})}},sx:{mb:1}}),Ke.jsxs(Ul,{sx:{mb:1,display:"flex",gap:1,flexWrap:"wrap"},children:[Ke.jsx(Eb,{label:`${r.length} selected`,size:"small",color:"primary"}),Ke.jsx(Eb,{label:`${t.length} per-particle`,size:"small"}),Ke.jsx(Eb,{label:`${e.length} global`,size:"small"}),r.length>0&&Ke.jsx(Eb,{label:"Clear all",size:"small",onDelete:i,deleteIcon:Ke.jsx(I0e,{})})]}),Ke.jsxs(B8,{dense:!0,children:[Ke.jsx(xk,{children:Ke.jsxs(DP,{onClick:()=>d(!s),children:[Ke.jsx(Uw,{primary:Ke.jsx(Su,{variant:"subtitle2",children:"Per-Particle Properties"})}),s?Ke.jsx(Kke,{}):Ke.jsx(o8,{})]})}),Ke.jsx(k9,{in:s,timeout:"auto",unmountOnExit:!0,children:B.map(X=>Ke.jsx(xk,{dense:!0,children:Ke.jsxs(DP,{onClick:()=>n(X.key),children:[Ke.jsx(jS,{children:Ke.jsx(n$,{edge:"start",checked:r.includes(X.key),tabIndex:-1,disableRipple:!0})}),Ke.jsx(Uw,{primary:X.key,secondary:`${X.metadata.dtype} [${X.metadata.shape.join(" × ")}]`,slotProps:{primary:{sx:{fontFamily:"monospace",fontSize:"0.85rem"}}}})]})},X.key))}),Ke.jsx(xk,{children:Ke.jsxs(DP,{onClick:()=>L(!b),children:[Ke.jsx(Uw,{primary:Ke.jsx(Su,{variant:"subtitle2",children:"Global Properties"})}),b?Ke.jsx(Kke,{}):Ke.jsx(o8,{})]})}),Ke.jsx(k9,{in:b,timeout:"auto",unmountOnExit:!0,children:V.map(X=>Ke.jsx(xk,{dense:!0,children:Ke.jsxs(DP,{onClick:()=>n(X.key),children:[Ke.jsx(jS,{children:Ke.jsx(n$,{edge:"start",checked:r.includes(X.key),tabIndex:-1,disableRipple:!0})}),Ke.jsx(Uw,{primary:X.key,secondary:`${X.metadata.dtype} [${X.metadata.shape.join(" × ")}]`,slotProps:{primary:{sx:{fontFamily:"monospace",fontSize:"0.85rem"}}}})]})},X.key))})]})]})}const TWt=({data:t,handleChange:e,path:r,label:n,errors:i})=>{const{roomId:a,particleCount:o,currentFrame:s}=rh(),{data:d,isLoading:b,isError:L}=jGe(a||void 0,s,o),B=ze.useMemo(()=>t||[],[t]),V=ze.useCallback(ie=>{const de=new Set(B);de.has(ie)?de.delete(ie):de.add(ie),e(r,Array.from(de))},[B,e,r]),X=ze.useCallback(()=>{e(r,[])},[e,r]);return a?!d&&b?Ke.jsx(Gy,{variant:"outlined",sx:{mb:2,p:2},children:Ke.jsxs(Ul,{sx:{display:"flex",justifyContent:"center",alignItems:"center",gap:2},children:[Ke.jsx(_1,{size:24}),Ke.jsx(Su,{children:"Loading properties..."})]})}):L?Ke.jsx(Gy,{variant:"outlined",sx:{mb:2,p:2},children:Ke.jsx(qw,{severity:"error",children:"Failed to load property metadata"})}):Ke.jsxs(Gy,{variant:"outlined",sx:{mb:2,overflow:"hidden"},children:[Ke.jsxs(Ul,{sx:{p:2,bgcolor:"action.hover"},children:[Ke.jsx(Su,{variant:"subtitle2",fontWeight:"bold",children:n||"Property Inspector"}),Ke.jsx(Su,{variant:"caption",color:"text.secondary",children:"Select properties to display in InfoBoxes (press 'i' to toggle)"})]}),Ke.jsx(oA,{}),Ke.jsx(Ul,{sx:{maxHeight:400,overflow:"auto"},children:Ke.jsx(SWt,{perParticleProps:d?.perParticle||[],globalProps:d?.global||[],selectedKeys:B,onToggle:V,onClearAll:X})}),i&&Ke.jsx(qw,{severity:"error",sx:{m:1},children:i})]}):Ke.jsx(Gy,{variant:"outlined",sx:{mb:2,p:2},children:Ke.jsx(qw,{severity:"info",children:"Property Inspector requires an active room connection"})})},EWt=bh(10,vm(Qx(t=>t["x-custom-type"]==="property-inspector"),Qm("Control"))),AWt=$w(TWt),cye=[...VOt,{tester:rWt,renderer:nWt},{tester:EWt,renderer:AWt},{tester:qNt,renderer:GNt},{tester:zNt,renderer:BNt},{tester:HNt,renderer:jNt}],fye=(t,e,r)=>{const n=JSON.parse(JSON.stringify(t)),i=a=>{if(a&&typeof a=="object"){if(a["x-custom-type"]==="dynamic-enum"&&Array.isArray(a["x-features"])&&a["x-features"].includes("dynamic-atom-props")&&e?.keys&&(a.enum=e.keys),a["x-custom-type"]==="dynamic-enum"&&Array.isArray(a["x-features"])&&a["x-features"].includes("dynamic-geometries")&&r){const o=a["x-geometry-filter"],s=Object.keys(r).filter(d=>o?r[d]?.type===o:!0);a.enum=s}Object.keys(a).forEach(o=>{i(a[o])})}};return i(n),n},CWt=({panelTitle:t})=>{const{roomId:e,userId:r,geometries:n}=rh(),[i,a]=ze.useState({}),o=ze.useRef(!0);if(!e||!r)return Ke.jsx(Su,{sx:{p:2},children:"Joining room..."});const{selectedExtensions:s,setSelectedExtension:d}=b$(),b=s[t]||null,{data:L,isLoading:B,isError:V}=VVe(e,t),{data:X,isLoading:ie}=R0e(e),{data:de,isLoading:ae,isError:U}=Ek(e,r,t,b||"");ze.useEffect(()=>{!ae&&de!==void 0&&(a(de??{}),o.current=!0)},[ae,de,b]);const{mutate:ve,isPending:Se}=qVe(),Pe=ze.useMemo(()=>VL.debounce(nt=>{!b||!e||!r||ve({roomId:e,userId:r,category:t,extension:b,data:nt})},100),[b,e,r,t,ve]);ze.useEffect(()=>()=>{Pe.cancel()},[Pe]);const Me=ze.useCallback(({data:nt})=>{const ut=nt??{};if(o.current){o.current=!1;return}a(ut),t==="settings"&&Pe(ut)},[t,Pe]),Ie=nt=>{d(t,nt.target.value||null)},Ve=()=>{!b||!e||!r||ve({roomId:e,userId:r,category:t,extension:b,data:i})},Ze=ze.useMemo(()=>{const nt=L?.[b??""]?.schema;return nt?fye(nt,X,n):null},[L,b,X,n]),Je=ze.useMemo(()=>Object.keys(L||{}),[L]);return B||ie?Ke.jsx(Ul,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:Ke.jsx(_1,{})}):V||U?Ke.jsx(Su,{color:"error",sx:{p:2},children:"Failed to load configuration."}):Ke.jsxs(Ul,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[Ke.jsx(Su,{variant:"h6",sx:{p:2,pb:1,flexShrink:0},children:t}),Ke.jsx(oA,{}),Ke.jsxs(Ul,{sx:{p:2,pb:12,flexGrow:1,overflowY:"auto"},children:[Ke.jsxs(j5,{fullWidth:!0,sx:{mb:2},children:[Ke.jsxs(jL,{id:"panel-select-label",children:[t," Method"]}),Ke.jsx(m4,{labelId:"panel-select-label",value:b||"",label:`${t} Method`,onChange:Ie,children:Je.map(nt=>Ke.jsx(Xx,{value:nt,children:nt},nt))})]}),b&&L&&L[b]&&Ke.jsx(GVe,{metadata:L[b]}),Ze&&Ke.jsxs(Ke.Fragment,{children:[t!=="settings"&&Ke.jsx(Id,{variant:"contained",startIcon:Ke.jsx(BBe,{}),onClick:Ve,disabled:Se||ae,fullWidth:!0,color:"primary",sx:{mb:2},children:Se?"Running...":"Run Extension"}),ae?Ke.jsx(_1,{}):Ke.jsx(Yge,{schema:Ze,data:i,renderers:cye,cells:_0e,onChange:Me},b)]})]})]})},dye=PY()(SVe(t=>({mode:"list",selectedKey:null,formData:{},selectedType:null,searchFilter:"",setMode:e=>{t(r=>{r.mode=e})},setSelectedKey:e=>{t(r=>{r.selectedKey=e})},setFormData:e=>{t(r=>{r.formData=e})},setSelectedType:e=>{t(r=>{r.selectedType=e})},setSearchFilter:e=>{t(r=>{r.searchFilter=e})},resetForm:()=>{t(e=>{e.formData={},e.selectedKey=null,e.selectedType=null,e.mode="list"})}}))),MWt=t=>_v({queryKey:["geometries",t,"list"],queryFn:()=>xBe(t),enabled:!!t,staleTime:3e4}),RWt=(t,e)=>_v({queryKey:["geometries",t,"detail",e],queryFn:()=>o$(t,e),enabled:!!t&&!!e,staleTime:3e4}),kWt=t=>_v({queryKey:["geometries",t,"schemas"],queryFn:()=>owt(t),enabled:!!t,staleTime:3e5}),ZGe=()=>{const t=iM();return RL({mutationFn:({roomId:e,clientId:r,key:n,geometryType:i,geometryData:a})=>Rme(e,r,n,i,a),onSuccess:(e,r)=>{t.invalidateQueries({queryKey:["geometries",r.roomId,"list"]}),t.invalidateQueries({queryKey:["geometries",r.roomId,"detail",r.key]})}})},IWt=()=>{const t=iM();return RL({mutationFn:({roomId:e,key:r})=>awt(e,r),onSuccess:(e,r)=>{t.removeQueries({queryKey:["geometries",r.roomId,"detail",r.key]}),t.invalidateQueries({queryKey:["geometries",r.roomId,"list"]})}})},PWt=({open:t,geometryKey:e,onConfirm:r,onCancel:n})=>Ke.jsxs(iA,{open:t,onClose:n,children:[Ke.jsx(YC,{children:"Delete Geometry"}),Ke.jsx(aA,{children:Ke.jsxs(wY,{children:['Are you sure you want to delete the geometry "',e,'"? This action cannot be undone.']})}),Ke.jsxs(WC,{children:[Ke.jsx(Id,{onClick:n,children:"Cancel"}),Ke.jsx(Id,{onClick:r,color:"error",variant:"contained",children:"Delete"})]})]}),DWt=({geometries:t})=>{const{roomId:e,geometries:r,activeCurveForDrawing:n,setActiveCurveForDrawing:i,attachedCameraKey:a,attachToCamera:o,detachFromCamera:s}=rh(),{setMode:d,setSelectedKey:b,searchFilter:L,setSearchFilter:B}=dye(),[V,X]=ze.useState(!1),[ie,de]=ze.useState(null),{mutate:ae}=IWt(),{mutate:U}=ZGe(),ve=ut=>{b(ut),d("edit")},Se=ut=>{de(ut),X(!0)},Pe=()=>{ie&&e&&ae({roomId:e,key:ie}),X(!1),de(null)},Me=()=>{X(!1),de(null)},Ie=(ut,ht)=>{const _t=r[ut];!_t||!e||U({roomId:e,clientId:null,key:ut,geometryType:_t.type,geometryData:{active:!ht}})},Ve=(ut,ht)=>{ht==="Curve"?i(n===ut?null:ut):ht==="Camera"&&(a===ut?s():o(ut))},Ze=[{field:"key",headerName:"Key",flex:1,minWidth:150},{field:"type",headerName:"Type",flex:1,minWidth:120},{field:"selection",headerName:"Active",width:70,renderCell:ut=>{const ht=ut.row.type,_t=ht==="Curve";if(!_t&&!(ht==="Camera"))return null;const qt=_t?n===ut.row.key:a===ut.row.key,Lt=_t?qt?"Deselect this curve for drawing":"Select this curve for drawing":qt?"Detach from this camera":"Attach to this camera";return Ke.jsx(Zh,{title:Lt,children:Ke.jsx(Zf,{size:"small",onClick:dr=>{dr.stopPropagation(),Ve(ut.row.key,ht)},color:qt?"primary":"default",children:qt?Ke.jsx($Ge,{}):Ke.jsx(WGe,{})})})}},{field:"active",headerName:"Visible",width:80,renderCell:ut=>{const ht=ut.row.active!==!1;return Ke.jsx(I9,{checked:ht,onChange:_t=>{_t.stopPropagation(),Ie(ut.row.key,ht)},onClick:_t=>{_t.stopPropagation()},size:"small"})}},{field:"actions",type:"actions",headerName:"Actions",width:100,getActions:ut=>[Ke.jsx(hke,{icon:Ke.jsx(uye,{}),label:"Edit",onClick:()=>ve(ut.row.key),showInMenu:!1}),Ke.jsx(hke,{icon:Ke.jsx(eF,{}),label:"Delete",onClick:()=>Se(ut.row.key),showInMenu:!1})]}],nt=ze.useMemo(()=>{if(!L)return t;const ut=L.toLowerCase();return t.filter(ht=>ht.key.toLowerCase().includes(ut)||ht.type.toLowerCase().includes(ut))},[t,L]).map((ut,ht)=>({id:ht,key:ut.key,type:ut.type,active:r[ut.key]?.data?.active!==!1}));return Ke.jsxs(Ul,{sx:{height:"100%",display:"flex",flexDirection:"column"},children:[Ke.jsx(Ul,{sx:{p:2,pb:1},children:Ke.jsx(zg,{fullWidth:!0,size:"small",placeholder:"Search geometries...",value:L,onChange:ut=>B(ut.target.value),slotProps:{input:{startAdornment:Ke.jsx(PB,{position:"start",children:Ke.jsx(YGe,{})})}}})}),Ke.jsx(Ul,{sx:{flexGrow:1,px:2,pb:2},children:Ke.jsx(zX,{rows:nt,columns:Ze,density:"compact",disableRowSelectionOnClick:!0,sx:{border:"1px solid rgba(0, 0, 0, 0.12)","& .MuiDataGrid-cell:focus":{outline:"none"},"& .MuiDataGrid-row:hover":{cursor:"pointer"}},onRowClick:ut=>ve(ut.row.key)})}),Ke.jsx(PWt,{open:V,geometryKey:ie,onConfirm:Pe,onCancel:Me})]})};function $k(t,e,r){if(!r||Object.keys(r).length===0)return t;const n=r[e];return n?VL.merge({},n,t):t}const LWt=()=>{const{roomId:t,geometries:e,geometryDefaults:r}=rh(),n=null,{mode:i,selectedKey:a,selectedType:o,formData:s,setMode:d,setSelectedType:b,setFormData:L,resetForm:B}=dye(),[V,X]=ze.useState(""),[ie,de]=ze.useState(!0),[ae,U]=ze.useState(null),[ve,Se]=ze.useState(!1),[Pe,Me]=ze.useState(!1),Ie=ze.useRef(!1),{data:Ve,isLoading:Ze,isError:Je}=kWt(t),{data:nt,isLoading:ut}=R0e(t),{data:ht,isLoading:_t,isError:Dt}=RWt(t,i==="edit"?a:null),{mutate:qt,isPending:Lt}=ZGe(),dr=ze.useMemo(()=>Ve?.schemas?Ve.schemas:{},[Ve]),Zt=ze.useMemo(()=>Object.keys(dr),[dr]);ze.useEffect(()=>{i==="edit"&&ht&&(Ie.current=!1,X(ht.key),b(ht.geometry.type),L(ht.geometry.data||{}),de(ht.geometry.data?.active!==!1),Me(!0),setTimeout(()=>{Ie.current=!0},500))},[i,ht,L,b]);const Cr=ze.useCallback(()=>{if(i==="create"&&V.trim()&&o&&r&&!Pe){const _n=$k({},o,r);L(_n),Me(!0),Ie.current=!0}},[i,V,o,r,Pe,L]),yt=ze.useCallback(()=>{V.trim()&&o&&Cr()},[V,o,Cr]),Vt=_n=>{const Un=_n.target.value;b(Un),U(null)},Er=({data:_n})=>{L(_n??{})},sr=ze.useCallback(()=>{!t||!V.trim()||!o||(U(null),Se(!0),qt({roomId:t,clientId:n,key:V.trim(),geometryType:o,geometryData:{...s,active:ie}},{onSuccess:()=>{Se(!1)},onError:_n=>{Se(!1),U(_n.message||"Failed to save geometry")}}))},[t,n,V,o,s,ie,qt]),or=ze.useMemo(()=>VL.debounce(sr,250),[sr]);ze.useEffect(()=>{if(!(!Ie.current||i==="create"&&(!V.trim()||!o)))return or(),()=>{or.cancel()}},[s,V,o,ie,i,or]);const Ar=()=>{B(),U(null),Me(!1),X(""),Ie.current=!1},Ir=ze.useMemo(()=>!o||!dr[o]?null:fye(dr[o],nt,e),[o,dr,nt,e]);return Ze||ut?Ke.jsx(Ul,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:Ke.jsx(_1,{})}):Je?Ke.jsxs(Ul,{sx:{p:2},children:[Ke.jsx(Su,{color:"error",children:"Failed to load geometry schemas."}),Ke.jsx(Id,{onClick:Ar,sx:{mt:2},children:"Back to List"})]}):i==="edit"&&(_t||Dt)?Ke.jsxs(Ul,{sx:{p:2},children:[_t&&Ke.jsx(_1,{}),Dt&&Ke.jsxs(Ke.Fragment,{children:[Ke.jsx(Su,{color:"error",children:"Failed to load geometry."}),Ke.jsx(Id,{onClick:Ar,sx:{mt:2},children:"Back to List"})]})]}):Ke.jsxs(Ul,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[Ke.jsxs(Ul,{sx:{p:2,borderBottom:"1px solid rgba(0, 0, 0, 0.12)"},children:[Ke.jsxs(Ul,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[Ke.jsx(Id,{startIcon:Ke.jsx(VGe,{}),onClick:Ar,children:"Back to List"}),ve&&Ke.jsx(Eb,{label:"Saving...",size:"small",color:"primary",sx:{ml:2}})]}),Ke.jsx(Su,{variant:"h6",children:i==="create"?"Create Geometry":"Edit Geometry"})]}),Ke.jsxs(Ul,{sx:{p:2,pb:12,flexGrow:1,overflowY:"auto"},children:[ae&&Ke.jsx(qw,{severity:"error",sx:{mb:2},onClose:()=>U(null),children:ae}),Ke.jsx(zg,{fullWidth:!0,label:"Key",value:V,onChange:_n=>X(_n.target.value),onBlur:yt,disabled:Pe,sx:{mb:2},required:!0,helperText:!Pe&&i==="create"?"Enter a unique name for this geometry":""}),Ke.jsxs(j5,{fullWidth:!0,sx:{mb:2},required:!0,children:[Ke.jsx(jL,{children:"Type"}),Ke.jsx(m4,{value:o||"",label:"Type",onChange:Vt,onBlur:yt,disabled:Pe,children:Zt.map(_n=>Ke.jsx(Xx,{value:_n,children:_n},_n))})]}),Ke.jsx(F8,{control:Ke.jsx(I9,{checked:ie,onChange:_n=>de(_n.target.checked)}),label:"Active (visible in scene)",sx:{mb:2}}),Ir&&Ke.jsxs(Ke.Fragment,{children:[Ke.jsx(Su,{variant:"subtitle2",sx:{mb:2},children:"Geometry Data"}),Ke.jsx(Yge,{schema:Ir,data:s,renderers:cye,cells:_0e,onChange:Er})]}),Ke.jsx(Ul,{sx:{mt:3},children:Ke.jsx(Id,{variant:"outlined",onClick:Ar,fullWidth:!0,children:"Close"})})]})]})},OWt=()=>{const{roomId:t}=rh(),{mode:e,setMode:r,resetForm:n}=dye(),{data:i,isLoading:a,isError:o}=MWt(t),s=ze.useMemo(()=>{if(!i?.geometries||!Array.isArray(i.geometries))return[];const b=rh.getState().geometries;return i.geometries.map(L=>({key:L,type:b[L]?.type||"unknown"}))},[i]),d=()=>{n(),r("create")};return t?a?Ke.jsx(Ul,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:Ke.jsx(_1,{})}):o?Ke.jsx(Su,{color:"error",sx:{p:2},children:"Failed to load geometries."}):Ke.jsxs(Ul,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[e==="list"&&Ke.jsxs(Ke.Fragment,{children:[Ke.jsx(Su,{variant:"h6",sx:{p:2,pb:1,flexShrink:0},children:"Geometries"}),Ke.jsx(oA,{}),Ke.jsx(Ul,{sx:{p:2},children:Ke.jsx(Id,{variant:"contained",startIcon:Ke.jsx(lX,{}),onClick:d,fullWidth:!0,children:"Add Geometry"})}),Ke.jsx(Ul,{sx:{flexGrow:1,minHeight:0},children:Ke.jsx(DWt,{geometries:s})})]}),(e==="create"||e==="edit")&&Ke.jsx(LWt,{})]}):Ke.jsx(Su,{sx:{p:2},children:"Joining room..."})};function NWt(){const{roomId:t,userId:e,selections:r,selectionGroups:n,activeSelectionGroup:i,updateSelectionForGeometry:a,geometries:o}=rh(),[s,d]=ze.useState(""),[b,L]=ze.useState(null),[B,V]=ze.useState(""),[X,ie]=ze.useState(!1),[de,ae]=ze.useState(null),[U,ve]=ze.useState(!1),[Se,Pe]=ze.useState({open:!1,message:"",severity:"success"}),[Me,Ie]=ze.useState({}),Ve=ze.useRef(!0),Ze=ze.useRef(null),Je="selections",{selectedExtensions:nt,setSelectedExtension:ut}=b$(),ht=nt[Je]||null,{data:_t,isLoading:Dt,isError:qt}=VVe(t,Je),{data:Lt,isLoading:dr}=R0e(t),{data:Zt,isLoading:Cr,isError:yt}=Ek(t,e,Je,ht||"");ze.useEffect(()=>{!Cr&&Zt!==void 0&&(Ie(Zt??{}),Ve.current=!0)},[Cr,Zt,ht]);const{mutate:Vt,isPending:Er}=qVe(),sr=ze.useMemo(()=>VL.debounce(Mn=>{!ht||!t||!e||Vt({roomId:t,userId:e,category:Je,extension:ht,data:Mn})},100),[ht,t,e,Vt]);ze.useEffect(()=>()=>{sr.cancel()},[sr]);const or=ze.useCallback(({data:Mn})=>{const gi=Mn??{};if(Ve.current){Ve.current=!1;return}Ie(gi)},[sr]),Ar=Mn=>{ut(Je,Mn.target.value||null)},Ir=()=>{!ht||!t||!e||Vt({roomId:t,userId:e,category:Je,extension:ht,data:Me})},_n=ze.useMemo(()=>{const Mn=_t?.[ht??""]?.schema;return Mn?fye(Mn,Lt,o):null},[_t,ht,Lt,o]),Un=ze.useMemo(()=>Object.keys(_t||{}),[_t]),Qn=ze.useMemo(()=>{const Mn=new Set;return Object.keys(r).forEach(gi=>{r[gi]&&r[gi].length>0&&Mn.add(gi)}),Object.values(n).forEach(gi=>{Object.keys(gi).forEach(Oi=>{gi[Oi]&&gi[Oi].length>0&&Mn.add(Oi)})}),Array.from(Mn).sort()},[r,n]),Jn=ze.useMemo(()=>{const Mn=[],gi={};return Qn.forEach(Pa=>{gi[Pa]=r[Pa]?.length||0}),Mn.push({id:"current",name:"",isCurrent:!0,isActive:!1,selections:gi,rawData:r}),Object.keys(n).sort().forEach(Pa=>{const va=n[Pa],ti={};Qn.forEach(Tn=>{ti[Tn]=va[Tn]?.length||0}),Mn.push({id:Pa,name:Pa,isCurrent:!1,isActive:i===Pa,selections:ti,rawData:va})}),Mn},[r,n,i,Qn]),Vn=ze.useMemo(()=>{const Mn=[{field:"name",headerName:"Name",width:200,flex:1,renderCell:gi=>{const Oi=gi.row;if(Oi.isCurrent)return Ke.jsx(Ul,{sx:{display:"flex",alignItems:"center",gap:1,width:"100%",height:"100%"},children:Ke.jsx(zg,{size:"small",fullWidth:!0,placeholder:"Type name to save...",value:s,onChange:va=>d(va.target.value),onKeyDown:va=>{va.key==="Enter"&&s.trim()&&Lr()},onBlur:()=>{s.trim()&&Lr()},disabled:U||!jn,sx:{"& .MuiInputBase-root":{fontSize:"0.875rem"}}})});const Pa=b===Oi.id;return Ke.jsxs(Ul,{sx:{display:"flex",alignItems:"center",gap:1,width:"100%",height:"100%"},children:[Oi.isActive?Ke.jsx($Ge,{sx:{color:"success.main"},fontSize:"small"}):Ke.jsx(WGe,{sx:{color:"action.disabled"},fontSize:"small"}),Pa?Ke.jsx(zg,{size:"small",fullWidth:!0,autoFocus:!0,value:B,onChange:va=>V(va.target.value),onKeyDown:va=>{va.key==="Enter"?Yn(Oi.id):va.key==="Escape"&&L(null)},onBlur:()=>Yn(Oi.id),sx:{"& .MuiInputBase-root":{fontSize:"0.875rem"}}}):Ke.jsx(Su,{sx:{fontWeight:Oi.isActive?"bold":"normal",fontSize:"0.875rem",flex:1},onDoubleClick:()=>{L(Oi.id),V(Oi.name)},children:Oi.name})]})}}];return Qn.forEach(gi=>{Mn.push({field:gi,headerName:gi,width:100,align:"center",headerAlign:"center",renderCell:Oi=>{const Pa=Oi.row,va=Pa.selections[gi]||0;if(va===0)return Ke.jsx(Ul,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:Ke.jsx(Su,{sx:{color:"text.disabled",fontSize:"0.875rem"},children:"-"})});let ti="default";return Pa.isCurrent?ti="primary":Pa.isActive&&(ti="success"),Ke.jsx(Ul,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:Ke.jsx(Eb,{label:va,size:"small",color:ti})})}})}),Mn.push({field:"actions",headerName:"Actions",width:100,sortable:!1,renderCell:gi=>{const Oi=gi.row;return Oi.isCurrent?Ke.jsx(Ul,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:Ke.jsx(Zh,{title:"Clear all current selections",children:Ke.jsx("span",{children:Ke.jsx(Zf,{size:"small",onClick:Pa=>{Pa.stopPropagation(),Sn()},disabled:!jn||U,children:Ke.jsx(I0e,{fontSize:"small"})})})})}):Ke.jsxs(Ul,{sx:{display:"flex",alignItems:"center",justifyContent:"center",gap:.5,height:"100%"},children:[Ke.jsx(Zh,{title:"Edit name",children:Ke.jsx(Zf,{size:"small",onClick:Pa=>{Pa.stopPropagation(),L(Oi.id),V(Oi.name)},disabled:U,children:Ke.jsx(uye,{fontSize:"small"})})}),Ke.jsx(Zh,{title:"Delete group",children:Ke.jsx(Zf,{size:"small",onClick:Pa=>{Pa.stopPropagation(),ae(Oi.id),ie(!0)},disabled:U,children:Ke.jsx(eF,{fontSize:"small"})})})]})}}),Mn},[Qn,s,b,B,U]),jn=ze.useMemo(()=>Object.values(r).some(Mn=>Mn&&Mn.length>0),[r]),Lr=ze.useCallback(async()=>{if(!(!t||!s.trim())){if(n[s.trim()]){Pe({open:!0,message:`Group "${s.trim()}" already exists`,severity:"error"});return}ve(!0);try{await PSe(t,s.trim(),r),d(""),Pe({open:!0,message:`Group "${s.trim()}" saved`,severity:"success"})}catch(Mn){console.error("Failed to save selection group:",Mn),Pe({open:!0,message:"Failed to save selection group",severity:"error"})}finally{ve(!1)}}},[t,s,r,n]),Yn=ze.useCallback(async Mn=>{if(!t||!B.trim()||B.trim()===Mn){L(null);return}if(n[B.trim()]&&B.trim()!==Mn){Pe({open:!0,message:`Group "${B.trim()}" already exists`,severity:"error"}),L(null);return}ve(!0);try{await DSe(t,Mn),await PSe(t,B.trim(),n[Mn]),L(null),Pe({open:!0,message:`Group renamed to "${B.trim()}"`,severity:"success"})}catch(gi){console.error("Failed to rename group:",gi),Pe({open:!0,message:"Failed to rename group",severity:"error"}),L(null)}finally{ve(!1)}},[t,B,n]),On=ze.useCallback(async Mn=>{const gi=Mn.row;if(!(gi.isCurrent||b)&&t){ve(!0);try{await _Be(t,gi.id)}catch(Oi){console.error("Failed to load selection group:",Oi),Pe({open:!0,message:`Failed to load group "${gi.name}"`,severity:"error"})}finally{ve(!1)}}},[t,b]),Sn=ze.useCallback(()=>{jn&&Qn.forEach(Mn=>{r[Mn]&&r[Mn].length>0&&a(Mn,[])})},[jn,Qn,r,a]),bn=ze.useCallback(async()=>{if(!(!t||!de)){ve(!0),ie(!1);try{await DSe(t,de),Pe({open:!0,message:`Group "${de}" deleted`,severity:"success"})}catch(Mn){console.error("Failed to delete group:",Mn),Pe({open:!0,message:`Failed to delete group "${de}"`,severity:"error"})}finally{ve(!1),ae(null)}}},[t,de]);return!t||!e?Ke.jsx(Su,{sx:{p:2},children:"Joining room..."}):Dt||dr?Ke.jsx(Ul,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:Ke.jsx(_1,{})}):qt||yt?Ke.jsx(Su,{color:"error",sx:{p:2},children:"Failed to load configuration."}):Ke.jsxs(Ul,{sx:{height:"100%",width:"100%",display:"flex",flexDirection:"column"},children:[Ke.jsx(Su,{variant:"h6",sx:{p:2,pb:1},children:"Selections"}),Ke.jsx(oA,{}),Ke.jsxs(Ul,{ref:Ze,sx:{flexGrow:1,overflowY:"auto",overscrollBehavior:"contain",p:2},children:[Ke.jsxs(bhe,{defaultExpanded:!0,children:[Ke.jsx(_he,{expandIcon:Ke.jsx(o8,{}),children:Ke.jsx(Su,{variant:"subtitle1",fontWeight:"medium",children:"Selection Tools"})}),Ke.jsxs(xhe,{children:[Ke.jsxs(j5,{fullWidth:!0,sx:{mb:2},children:[Ke.jsx(jL,{id:"panel-select-label",children:"Selection Method"}),Ke.jsx(m4,{labelId:"panel-select-label",value:ht||"",label:"Selection Method",onChange:Ar,children:Un.map(Mn=>Ke.jsx(Xx,{value:Mn,children:Mn},Mn))})]}),ht&&_t&&_t[ht]&&Ke.jsx(GVe,{metadata:_t[ht]}),_n&&Ke.jsxs(Ke.Fragment,{children:[Ke.jsx(Id,{variant:"contained",startIcon:Ke.jsx(BBe,{}),onClick:Ir,disabled:Er||Cr,fullWidth:!0,color:"primary",sx:{mb:2},children:Er?"Running...":"Run Extension"}),Cr?Ke.jsx(_1,{}):Ke.jsx(Yge,{schema:_n,data:Me,renderers:cye,cells:_0e,onChange:or},ht)]})]})]}),Ke.jsxs(bhe,{defaultExpanded:!0,sx:{mt:2},children:[Ke.jsx(_he,{expandIcon:Ke.jsx(o8,{}),children:Ke.jsx(Su,{variant:"subtitle1",fontWeight:"medium",children:"Selection Groups"})}),Ke.jsx(xhe,{sx:{p:0},children:Ke.jsx(Ul,{sx:{height:400,width:"100%"},children:Ke.jsx(zX,{rows:Jn,columns:Vn,disableRowSelectionOnClick:!0,disableColumnMenu:!0,hideFooter:!0,onRowClick:On,getRowClassName:Mn=>Mn.row.isCurrent?"current-selection-row":Mn.row.isActive?"active-group-row":"",sx:{"& .MuiDataGrid-columnHeaders":{minHeight:"48px !important",maxHeight:"48px !important"},"& .MuiDataGrid-columnHeader":{padding:"8px"},"& .current-selection-row":{bgcolor:"rgba(33, 150, 243, 0.08)",borderTop:"2px solid",borderTopColor:"primary.main","&:hover":{bgcolor:"rgba(33, 150, 243, 0.12)"}},"& .active-group-row":{bgcolor:"rgba(76, 175, 80, 0.08)","&:hover":{bgcolor:"rgba(76, 175, 80, 0.12)"}},"& .MuiDataGrid-row":{cursor:"pointer"},"& .MuiDataGrid-row.current-selection-row":{cursor:"default"}}})})})]})]}),Ke.jsxs(iA,{open:X,onClose:()=>ie(!1),children:[Ke.jsx(YC,{children:"Delete Selection Group"}),Ke.jsx(aA,{children:Ke.jsxs(wY,{children:['Are you sure you want to delete the group "',de,'"? This action cannot be undone.']})}),Ke.jsxs(WC,{children:[Ke.jsx(Id,{onClick:()=>ie(!1),children:"Cancel"}),Ke.jsx(Id,{onClick:bn,color:"error",variant:"contained",children:"Delete"})]})]}),Ke.jsx(CY,{open:Se.open,autoHideDuration:3e3,onClose:()=>Pe({...Se,open:!1}),anchorOrigin:{vertical:"top",horizontal:"center"},children:Ke.jsx(qw,{severity:Se.severity,onClose:()=>Pe({...Se,open:!1}),children:Se.message})})]})}const FWt=[{name:"settings",icon:Ke.jsx(xWt,{}),schemaType:"settings",description:"Application settings"},{name:"selections",icon:Ke.jsx(dWt,{}),schemaType:"selections",description:"Selection tools and groups"},{name:"modifiers",icon:Ke.jsx(sWt,{}),schemaType:"modifiers",description:"Modifier tools"},{name:"analysis",icon:Ke.jsx(oWt,{}),schemaType:"analysis",description:"Analysis tools"},{name:"geometries",icon:Ke.jsx(cWt,{}),schemaType:"geometries",description:"Manage geometries"}],Qke=60,zWt=240,BWt=500,UWt=600,HWt=550,jWt=()=>{const t=b$(i=>i.selectedCategory),e=b$(i=>i.setSelectedCategory),r=i=>{e(t===i?null:i)},n=t==="geometries"?UWt:t==="selections"?HWt:t==="settings"?BWt:zWt;return Ke.jsxs(Ke.Fragment,{children:[Ke.jsx(E2t,{drawerWidth:Qke,navItems:FWt,selectedItem:t,onItemClick:r}),t&&Ke.jsx(Ul,{component:"aside",sx:{position:"fixed",left:Qke,top:64,width:n,height:"calc(100vh - 64px)",zIndex:i=>i.zIndex.drawer,borderRight:"1px solid rgba(0, 0, 0, 0.12)",bgcolor:"background.paper",boxShadow:2},children:t==="geometries"?Ke.jsx(OWt,{}):t==="selections"?Ke.jsx(NWt,{}):Ke.jsx(CWt,{panelTitle:t},t)},t)]})};function VWt(t){return new Promise((e,r)=>{t.toBlob(n=>{n?e(n):r(new Error("Failed to create blob from canvas"))},"image/png")})}async function qWt(t,e,r,n){const i=new FormData;i.append("file",e,`screenshot_${Date.now()}.png`),i.append("format","png"),i.append("width",r.toString()),i.append("height",n.toString());const a=await fetch(`/api/rooms/${t}/screenshots/upload`,{method:"POST",body:i});if(!a.ok){const o=await a.json().catch(()=>({error:"Upload failed"}));throw new Error(o.error||`Upload failed: ${a.statusText}`)}return a.json()}async function GWt(t,e){const r=await VWt(t);return qWt(e,r,t.width,t.height)}function $Wt(){const{roomId:t}=R8(),e=c4(),{userId:r}=rh(),[n,i]=ze.useState(null),[a,o]=ze.useState(null),[s,d]=ze.useState(!1),[b,L]=ze.useState(!1),[B,V]=ze.useState(!1),[X,ie]=ze.useState({newRoomId:"",description:"",error:null}),[de,ae]=ze.useState(!1),[U,ve]=ze.useState({open:!1,message:"",severity:"success"}),[Se,Pe]=ze.useState(!1),{data:Me}=Ek(t||"",r||"","settings","camera"),{data:Ie=[]}=_v({queryKey:["rooms"],queryFn:kme,refetchInterval:5e3});ze.useEffect(()=>{if(t&&Ie.length>0){const Er=Ie.find(sr=>sr.id===t);Er&&o(Er)}},[t,Ie]),ze.useEffect(()=>{(async()=>{const sr=await EBe();L(sr.enabled)})()},[]);const Ve=!!n,Ze=async Er=>{if(i(Er.currentTarget),t)try{const[sr,or]=await Promise.all([vwt(t),SBe()]);o(sr),d(or.roomId===t)}catch(sr){console.error("Failed to fetch room details:",sr)}},Je=()=>{i(null)},nt=async()=>{if(!(!t||!a)){try{await sG(t,{locked:!a.locked}),o({...a,locked:!a.locked}),ve({open:!0,message:a.locked?"Room unlocked":"Room locked",severity:"success"})}catch{ve({open:!0,message:"Failed to update lock status",severity:"error"})}Je()}},ut=async()=>{if(t){try{await TBe(s?null:t),d(!s),ve({open:!0,message:s?"Default room cleared":"Set as default room",severity:"success"})}catch{ve({open:!0,message:"Failed to update default room",severity:"error"})}Je()}},ht=Er=>Er?Ie.some(sr=>sr.id===Er)?"A room with this ID already exists":/^[a-zA-Z0-9_-]+$/.test(Er)?null:"Room ID can only contain letters, numbers, hyphens, and underscores":null,_t=()=>{ie({newRoomId:"",description:`Copy of ${a?.description||t||"room"}`,error:null}),V(!0),Je()},Dt=()=>{V(!1),ie({newRoomId:"",description:"",error:null})},qt=async()=>{if(!t)return;const Er=ht(X.newRoomId);if(Er){ie({...X,error:Er});return}try{const sr=await wBe(t,{newRoomId:X.newRoomId||void 0,description:X.description});Dt();const or=crypto.randomUUID();e(`/rooms/${sr.roomId}/${or}`)}catch(sr){const or=sr instanceof Error?sr.message:"Failed to duplicate room";ie({...X,error:or})}},Lt=()=>{e("/rooms"),Je()},dr=()=>{e("/file-browser"),Je()},Zt=()=>{ae(!0),Je()},Cr=()=>{ae(!1)},yt=async()=>{ae(!1),xwt().catch(()=>{})},Vt=async()=>{if(!t){ve({open:!0,message:"No room ID available",severity:"error"});return}if(!Me?.preserve_drawing_buffer){ve({open:!0,message:"Enable 'preserve_drawing_buffer' in Camera settings first",severity:"error"});return}Pe(!0),Je();try{const Er=document.querySelector("canvas");if(!Er)throw new Error("Canvas element not found");const sr=await GWt(Er,t);ve({open:!0,message:"Screenshot saved successfully",severity:"success"})}catch(Er){ve({open:!0,message:`Screenshot failed: ${Er instanceof Error?Er.message:"Unknown error"}`,severity:"error"})}finally{Pe(!1)}};return t?Ke.jsxs(Ke.Fragment,{children:[a?.metadataLocked&&!a?.locked&&Ke.jsx(Eb,{icon:Ke.jsx(n9,{}),label:"Uploading",color:"warning",size:"small",sx:{mr:1}}),a?.locked&&Ke.jsx(Eb,{icon:Ke.jsx(n9,{}),label:"Locked",color:"error",size:"small",sx:{mr:1}}),s&&Ke.jsx(Eb,{icon:Ke.jsx(Epe,{}),label:"Default",color:"primary",size:"small",sx:{mr:1}}),Ke.jsx(Zh,{title:"Room menu",children:Ke.jsx(Zf,{color:"inherit","aria-label":"room menu",onClick:Ze,children:Ke.jsx(gWt,{})})}),Ke.jsxs(xme,{anchorEl:n,open:Ve,onClose:Je,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:[Ke.jsxs(Xx,{onClick:nt,children:[Ke.jsx(jS,{children:a?.locked?Ke.jsx(GGe,{}):Ke.jsx(n9,{})}),Ke.jsx(Uw,{children:a?.locked?"Unlock Room":"Lock Room"})]}),Ke.jsxs(Xx,{onClick:ut,children:[Ke.jsx(jS,{children:s?Ke.jsx(XGe,{}):Ke.jsx(Epe,{})}),Ke.jsx(Uw,{children:s?"Remove as Default":"Set as Default"})]}),Ke.jsxs(Xx,{onClick:_t,children:[Ke.jsx(jS,{children:Ke.jsx(lye,{})}),Ke.jsx(Uw,{children:"Duplicate Room"})]}),Ke.jsxs(Xx,{onClick:Vt,disabled:Se,children:[Ke.jsx(jS,{children:Se?Ke.jsx(_1,{size:20}):Ke.jsx(lWt,{})}),Ke.jsx(Uw,{children:"Take Screenshot"})]}),Ke.jsxs(Xx,{onClick:Lt,children:[Ke.jsx(jS,{children:Ke.jsx(vWt,{})}),Ke.jsx(Uw,{children:"Go to Room List"})]}),b&&Ke.jsxs(Xx,{onClick:dr,children:[Ke.jsx(jS,{children:Ke.jsx(qGe,{})}),Ke.jsx(Uw,{children:"Open File Browser"})]}),Ke.jsxs(Xx,{onClick:Zt,children:[Ke.jsx(jS,{children:Ke.jsx(yWt,{})}),Ke.jsx(Uw,{children:"Close ZnDraw"})]})]}),Ke.jsxs(iA,{open:de,onClose:Cr,maxWidth:"xs",fullWidth:!0,children:[Ke.jsx(YC,{children:"Shutdown Server?"}),Ke.jsx(aA,{children:Ke.jsx(Su,{variant:"body2",color:"text.secondary",sx:{mt:1},children:"This will close the ZnDraw server for all connected users. Are you sure?"})}),Ke.jsxs(WC,{children:[Ke.jsx(Id,{onClick:Cr,children:"Cancel"}),Ke.jsx(Id,{onClick:yt,variant:"contained",color:"error",children:"Shutdown"})]})]}),Ke.jsxs(iA,{open:B,onClose:Dt,maxWidth:"sm",fullWidth:!0,children:[Ke.jsx(YC,{children:"Duplicate Room"}),Ke.jsxs(aA,{children:[Ke.jsxs(Su,{variant:"body2",color:"text.secondary",sx:{mb:3,mt:1},children:["Duplicating: ",a?.description||t]}),Ke.jsx(zg,{margin:"dense",label:"New Room ID (optional)",type:"text",fullWidth:!0,variant:"outlined",value:X.newRoomId,onChange:Er=>{const sr=Er.target.value;ie({...X,newRoomId:sr,error:ht(sr)})},helperText:X.error||"Leave empty to auto-generate a unique ID",error:!!X.error,sx:{mb:2}}),Ke.jsx(zg,{autoFocus:!0,margin:"dense",label:"Description for new room",type:"text",fullWidth:!0,variant:"outlined",value:X.description,onChange:Er=>ie({...X,description:Er.target.value})})]}),Ke.jsxs(WC,{children:[Ke.jsx(Id,{onClick:Dt,children:"Cancel"}),Ke.jsx(Id,{onClick:qt,variant:"contained",disabled:!!X.error,children:"Duplicate"})]})]}),Ke.jsx(CY,{open:U.open,autoHideDuration:4e3,onClose:()=>ve({...U,open:!1}),anchorOrigin:{vertical:"top",horizontal:"center"},children:Ke.jsx(qw,{onClose:()=>ve({...U,open:!1}),severity:U.severity,sx:{width:"100%"},children:U.message})})]}):null}const _k=PY((t,e)=>({openWindows:{},_zIndexCounter:100,openWindow:r=>{const n=e()._zIndexCounter+1,i=Object.keys(e().openWindows).length,a=`window-${Date.now()}`,o=document.querySelector(".drag-boundary-container"),s=o?.clientWidth||window.innerWidth,d=o?.clientHeight||window.innerHeight,b=500,L=400,B=20,V=s-b-B-i*30,X=d-L-B-i*30;t(ie=>({openWindows:{...ie.openWindows,[a]:{id:a,figureKey:r,x:Math.max(B,V),y:Math.max(B,X),width:b,height:L,zIndex:n}},_zIndexCounter:n}))},closeWindow:r=>{t(n=>{const{[r]:i,...a}=n.openWindows;return{openWindows:a}})},changeFigureInWindow:(r,n)=>{t(i=>i.openWindows[r]?{openWindows:{...i.openWindows,[r]:{...i.openWindows[r],figureKey:n}}}:i)},updateWindowState:(r,n)=>{t(i=>({openWindows:{...i.openWindows,[r]:{...i.openWindows[r],...n}}}))},bringToFront:r=>{const n=e().openWindows[r];if(!n)return;const i=e()._zIndexCounter+1;n.zIndex!==i-1&&t(a=>({openWindows:{...a.openWindows,[r]:{...n,zIndex:i}},_zIndexCounter:i}))}}));function KGe(t){if(!t)return null;const e={};for(const[r,n]of Object.entries(t))e[parseInt(r,10)]=n;return e}const WWt=()=>{const{setConnected:t,setFrameCount:e,setCurrentFrame:r,setFrameSelection:n,setSelections:i,setSelectionGroups:a,setActiveSelectionGroup:o,setBookmarks:s,roomId:d,userId:b,joinToken:L,setGeometries:B,updateGeometry:V,removeGeometry:X,setActiveCurveForDrawing:ie}=rh(),de=iM(),{openWindow:ae}=_k();ze.useEffect(()=>{if(!L){console.warn("No join token available, cannot connect socket.");return}async function U(){console.log("Socket connected and joining room:",d,b),t(!0)}function ve(){console.log("Socket disconnected"),t(!1)}function Se(Zt){Zt&&typeof Zt.count=="number"?e(Zt.count):console.error("Invalid len_frames data:",Zt)}function Pe(Zt){const{frame:Cr}=Zt;r(Cr)}function Me(Zt){const{roomId:Cr,userId:yt,category:Vt,extension:Er}=Zt;de.invalidateQueries({queryKey:["extensionData",Cr,yt,Vt,Er]}),console.log(`Invalidated extension data for user ${yt}, category ${Vt}, extension ${Er} in room ${Cr}`)}function Ie(Zt){const{roomId:Cr,category:yt}=Zt;de.invalidateQueries({queryKey:["schemas",Cr,yt]}),console.log(`Invalidated schemas for category ${yt} in room ${Cr}`)}function Ve(Zt){const{roomId:Cr,category:yt,extension:Vt,queueLength:Er,idleWorkers:sr,progressingWorkers:or}=Zt;de.setQueryData(["schemas",Cr,yt],Ar=>!Ar||!Ar[Vt]?Ar:{...Ar,[Vt]:{...Ar[Vt],queueLength:Er,idleWorkers:sr,progressingWorkers:or}}),de.invalidateQueries({queryKey:["jobs",Cr]}),console.log(`Queue updated for ${yt}/${Vt}: ${Er} queued, ${sr} idle, ${or} progressing`)}function Ze(Zt){console.log(Zt),n(Zt.indices||null)}async function Je(Zt){if(d)try{console.log("Received bookmarks:invalidate event:",Zt);const Cr=await swt(d),yt=KGe(Cr.bookmarks);s(yt),console.log("Updated bookmarks from server:",yt)}catch(Cr){console.error("Error fetching bookmarks after invalidation:",Cr)}}function nt(Zt){const{roomId:Cr,operation:yt,affectedIndex:Vt,affectedFrom:Er}=Zt;console.log("Invalidating frame cache:",{roomId:Cr,operation:yt,affectedIndex:Vt,affectedFrom:Er}),de.invalidateQueries({predicate:sr=>{const[or,Ar,Ir]=sr.queryKey;return or!=="frame"||Ar!==Cr||typeof Ir!="number"?!1:yt==="replace"?Ir===Vt:yt==="delete"||yt==="insert"||yt==="bulk_replace"?Ir>=Er:!1}})}function ut(Zt){de.setQueryData(["chat",d],Cr=>{if(!Cr)return Cr;const yt=[...Cr.pages],Vt=yt.length-1;return Vt>=0&&(yt[Vt]={...yt[Vt],messages:[...yt[Vt].messages,Zt],metadata:{...yt[Vt].metadata,totalCount:yt[Vt].metadata.totalCount+1}}),{...Cr,pages:yt}})}function ht(Zt){de.setQueryData(["chat",d],Cr=>{if(!Cr)return Cr;const yt=Cr.pages.map(Vt=>({...Vt,messages:Vt.messages.map(Er=>Er.id===Zt.id?Zt:Er)}));return{...Cr,pages:yt}})}async function _t(Zt){if(d)try{const Cr=Zt?.operation||"set";if(Cr==="delete"){const{key:yt}=Zt;if(!yt){console.warn("Delete operation received without key");return}console.log(`Deleting geometry: ${yt}`),X(yt),de.removeQueries({queryKey:["geometries",d,"detail",yt]}),de.invalidateQueries({queryKey:["geometries",d,"list"]}),console.log(`Removed geometry ${yt} from store and cache`)}else if(Cr==="set")if(Zt&&Zt.key){const{key:yt}=Zt;console.log(`Updating specific geometry: ${yt}`),de.invalidateQueries({queryKey:["geometries",d,"detail",yt]});try{const Vt=await o$(d,yt);V(yt,Vt.geometry),console.log(`Updated geometry ${yt}:`,Vt.geometry),!rh.getState().activeCurveForDrawing&&Vt.geometry.type==="Curve"&&Vt.geometry.data?.active!==!1&&(console.log(`Auto-selecting newly created curve (no curve was selected): ${yt}`),ie(yt))}catch(Vt){console.error(`Error fetching geometry ${yt}:`,Vt)}}else{console.log("No specific key provided, refetching all geometries"),de.invalidateQueries({queryKey:["geometries",d,"list"]});const Vt=(await xBe(d)).geometries||[];console.log("Received geometry keys:",Vt);const Er=Vt.map(async Ar=>{try{const Ir=await o$(d,Ar);return{key:Ar,geometry:Ir.geometry}}catch(Ir){return console.error(`Error fetching geometry ${Ar}:`,Ir),null}}),sr=await Promise.all(Er),or={};sr.forEach(Ar=>{Ar&&Ar.geometry&&(or[Ar.key]=Ar.geometry)}),console.log("Received updated geometries:",or),B(or)}}catch(Cr){console.error("Error handling geometry invalidation:",Cr)}}function Dt(Zt){if(console.log(`Received invalidation for figure: ${Zt.key}, operation: ${Zt.operation}`),!Zt.key)return;const Cr=Zt.operation||"set";if(Cr==="delete")de.removeQueries({queryKey:["figures",d,"detail",Zt.key]}),Object.entries(_k.getState().openWindows).filter(([Vt,Er])=>Er.figureKey===Zt.key).map(([Vt])=>Vt).forEach(Vt=>{console.log(`Closing window ${Vt} for deleted figure: ${Zt.key}`),_k.getState().closeWindow(Vt)}),de.invalidateQueries({queryKey:["figures",d,"list"]});else if(Cr==="set"){de.invalidateQueries({queryKey:["figures",d,"detail",Zt.key]}),de.invalidateQueries({queryKey:["figures",d,"list"]});const yt=_k.getState().openWindows,Vt=Object.values(yt).some(or=>or.figureKey===Zt.key),Er=Object.keys(yt).length,sr=5;Vt?console.log(`Window already open for figure: ${Zt.key}, not opening a new one`):Er<sr?(console.log(`Popping up new window for figure: ${Zt.key} (${Er+1}/${sr})`),ae(Zt.key)):console.log(`Not opening window for figure: ${Zt.key} - maximum of ${sr} windows already open`)}}async function qt(Zt){if(d)try{console.log("Received invalidate:selection event:",Zt);const Cr=await kSe(d);i(Cr.selections),a(Cr.groups),o(Cr.activeGroup),console.log("Updated selections from server:",Cr)}catch(Cr){console.error("Error fetching selections after invalidation:",Cr)}}async function Lt(Zt){if(d)try{console.log("Received invalidate:selection_groups event:",Zt);const Cr=await kSe(d);a(Cr.groups),o(Cr.activeGroup),console.log("Updated selection groups from server:",Cr.groups)}catch(Cr){console.error("Error fetching selection groups after invalidation:",Cr)}}function dr(Zt){console.error("Socket connection error:",Zt)}return Yf.on("disconnect",ve),Yf.on("connect",U),Yf.on("connect_error",dr),Yf.on("len_frames",Se),Yf.on("frame_update",Pe),Yf.on("invalidate",Me),Yf.on("invalidate:schema",Ie),Yf.on("queue:update",Ve),Yf.on("frame_selection:update",Ze),Yf.on("bookmarks:invalidate",Je),Yf.on("frames:invalidate",nt),Yf.on("chat:message:new",ut),Yf.on("chat:message:updated",ht),Yf.on("invalidate:geometry",_t),Yf.on("invalidate:figure",Dt),Yf.on("invalidate:selection",qt),Yf.on("invalidate:selection_groups",Lt),Yf.auth={token:L},Yf.connect(),()=>{Yf.off("connect",U),Yf.off("disconnect",ve),Yf.off("len_frames",Se),Yf.off("frame_update",Pe),Yf.off("invalidate",Me),Yf.off("invalidate:schema",Ie),Yf.off("queue:update",Ve),Yf.off("frame_selection:update",Ze),Yf.off("bookmarks:invalidate",Je),Yf.off("frames:invalidate",nt),Yf.off("chat:message:new",ut),Yf.off("chat:message:updated",ht),Yf.off("invalidate:geometry",_t),Yf.off("invalidate:figure",Dt),Yf.off("invalidate:selection",qt),Yf.off("invalidate:selection_groups",Lt),Yf.disconnect()}},[L,d,b,t,e,r,de,s,i,a,o,n,B,V,X,ie,ae])},YWt=t=>{const[e,r]=ze.useState(!1),n=ze.useCallback(async()=>new Promise(o=>{Yf.emit("request_presenter_token",s=>{const d=s?.success===!0;r(d),d||console.error("Failed to acquire presenter token:",s?.reason),o(d)})}),[]),i=ze.useCallback(()=>{e&&(Yf.emit("release_presenter_token"),r(!1))},[e]),a=ze.useCallback(o=>{e?Yf.emit("set_frame_continuous",{frame:o}):t(o)},[e,t]);return{hasToken:e,requestToken:n,releaseToken:i,setFrame:a}},XWt=()=>{const{currentFrame:t,setCurrentFrame:e,frameCount:r,frame_selection:n,frameSelectionEnabled:i,playing:a,setPlaying:o,skipFrames:s,synchronizedMode:d,getIsFetching:b,addBookmark:L,bookmarks:B}=rh(),V=UY(),{requestToken:X,releaseToken:ie,setFrame:de}=YWt(V),ae=ze.useCallback(()=>i&&n&&n.length>0?[...n].sort((Ze,Je)=>Ze-Je):Array.from({length:r},(Ze,Je)=>Je),[i,n,r]),U=ze.useCallback(Ze=>{e(Ze),de(Ze)},[e,de]),ve=ze.useCallback(()=>{a&&(ie(),o(!1));const Ze=ae(),Je=Ze.indexOf(t);Je>0?V(Ze[Je-1]):V(Ze[Ze.length-1])},[t,ae,V,a,o,ie]),Se=ze.useCallback(()=>{a&&(ie(),o(!1));const Ze=ae(),Je=Ze.indexOf(t);Je<Ze.length-1?V(Ze[Je+1]):V(Ze[0])},[t,ae,V,a,o,ie]),Pe=ze.useCallback(async()=>{const Ze=ae(),Je=t===Ze[Ze.length-1];a?(ie(),o(!1)):await X()&&(Je&&U(Ze[0]),o(!0))},[a,o,t,ae,X,ie,U]),Me=ze.useCallback(()=>{L(t)},[L,t]),Ie=ze.useCallback(()=>{if(!B)return;a&&(ie(),o(!1));const Ze=Object.keys(B).map(Number).sort((nt,ut)=>nt-ut);if(Ze.length===0)return;const Je=Ze.reverse().find(nt=>nt<t);V(Je!==void 0?Je:Ze[0])},[B,t,V,a,o,ie]),Ve=ze.useCallback(()=>{if(!B)return;a&&(ie(),o(!1));const Ze=Object.keys(B).map(Number).sort((nt,ut)=>nt-ut);if(Ze.length===0)return;const Je=Ze.find(nt=>nt>t);V(Je!==void 0?Je:Ze[0])},[B,t,V,a,o,ie]);ze.useEffect(()=>{if(!a)return;const Ze=setInterval(()=>{if(d&&b())return;const Je=ae(),nt=Je.indexOf(t),ut=Je.length-1,ht=nt+s;ht<ut?U(Je[ht]):nt<ut?U(Je[ut]):(ie(),o(!1))},33);return()=>clearInterval(Ze)},[a,t,ae,U,o,s,ie,d,b]),ze.useEffect(()=>()=>{a&&ie()},[]),ze.useEffect(()=>{const Ze=Je=>{const nt=Je.target;if(!(nt.tagName==="INPUT"||nt.tagName==="TEXTAREA"||nt.isContentEditable)){if(Je.shiftKey&&Je.key==="ArrowLeft"){Je.preventDefault(),Ie();return}if(Je.shiftKey&&Je.key==="ArrowRight"){Je.preventDefault(),Ve();return}switch(Je.key){case"ArrowLeft":Je.preventDefault(),ve();break;case"ArrowRight":Je.preventDefault(),Se();break;case" ":Je.preventDefault(),Pe();break;case"b":case"B":Je.preventDefault(),Me();break}}};return window.addEventListener("keydown",Ze),()=>{window.removeEventListener("keydown",Ze)}},[ve,Se,Pe,Me,Ie,Ve])};/**
 * @license
 * Copyright 2010-2025 Three.js Authors
 * SPDX-License-Identifier: MIT
 */const dF="180",HD={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},jD={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},JGe=0,Ape=1,QGe=2,ZWt=3,e$e=0,BX=1,i9=2,AC=3,dx=0,x1=1,Zx=2,V2=0,Ak=1,N$=2,Cpe=3,Mpe=4,t$e=5,PP=100,r$e=101,n$e=102,i$e=103,a$e=104,o$e=200,s$e=201,l$e=202,u$e=203,F$=204,z$=205,c$e=206,f$e=207,d$e=208,h$e=209,p$e=210,v$e=211,m$e=212,g$e=213,y$e=214,B$=0,U$=1,H$=2,OL=3,j$=4,V$=5,q$=6,G$=7,dU=0,b$e=1,x$e=2,jC=0,_$e=1,w$e=2,S$e=3,UX=4,T$e=5,E$e=6,A$e=7,Rpe="attached",C$e="detached",e4=300,U5=301,t4=302,r4=303,Y9=304,hF=306,sE=1e3,Ng=1001,X9=1002,Mp=1003,hye=1004,KWt=1004,EN=1005,JWt=1005,vp=1006,a9=1007,QWt=1007,E5=1008,$$=1008,e_=1009,h8=1010,hU=1011,NL=1012,GP=1013,q2=1014,mp=1015,Og=1016,HX=1017,jX=1018,p8=1020,pye=35902,vye=35899,mye=1021,gye=1022,Rp=1023,v8=1026,m8=1027,Dk=1028,pF=1029,pU=1030,vF=1031,eYt=1032,FL=1033,o9=33776,s9=33777,l9=33778,u9=33779,W$=35840,Y$=35841,X$=35842,Z$=35843,K$=36196,J$=37492,Q$=37496,eW=37808,tW=37809,rW=37810,nW=37811,iW=37812,aW=37813,oW=37814,sW=37815,lW=37816,uW=37817,cW=37818,fW=37819,dW=37820,hW=37821,pW=36492,vW=36494,mW=36495,gW=36283,yW=36284,bW=36285,xW=36286,M$e=2200,R$e=2201,k$e=2202,Z9=2300,_W=2301,PG=2302,tL=2400,rL=2401,K9=2402,VX=2500,yye=2501,tYt=0,rYt=1,nYt=2,I$e=3200,P$e=3201,iYt=3202,aYt=3203,_4=0,D$e=1,yk="",H_="srgb",KC="srgb-linear",J9="linear",yg="srgb",oYt=0,VD=7680,sYt=7681,lYt=7682,uYt=7683,cYt=34055,fYt=34056,dYt=5386,hYt=512,pYt=513,vYt=514,mYt=515,gYt=516,yYt=517,bYt=518,kpe=519,L$e=512,O$e=513,N$e=514,bye=515,F$e=516,z$e=517,B$e=518,U$e=519,Q9=35044,qX=35048,xYt=35040,_Yt=35045,wYt=35049,SYt=35041,TYt=35046,EYt=35050,AYt=35042,CYt="100",Ipe="300 es",tE=2e3,g8=2001,MYt={COMPUTE:"compute",RENDER:"render"},RYt={PERSPECTIVE:"perspective",LINEAR:"linear",FLAT:"flat"},kYt={NORMAL:"normal",CENTROID:"centroid",SAMPLE:"sample",FIRST:"first",EITHER:"either"};let G5=class{addEventListener(e,r){this._listeners===void 0&&(this._listeners={});const n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(r)===-1&&n[e].push(r)}hasEventListener(e,r){const n=this._listeners;return n===void 0?!1:n[e]!==void 0&&n[e].indexOf(r)!==-1}removeEventListener(e,r){const n=this._listeners;if(n===void 0)return;const i=n[e];if(i!==void 0){const a=i.indexOf(r);a!==-1&&i.splice(a,1)}}dispatchEvent(e){const r=this._listeners;if(r===void 0)return;const n=r[e.type];if(n!==void 0){e.target=this;const i=n.slice(0);for(let a=0,o=i.length;a<o;a++)i[a].call(this,e);e.target=null}}};const Lw=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let eIe=1234567;const hL=Math.PI/180,y8=180/Math.PI;function lE(){const t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,r=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(Lw[t&255]+Lw[t>>8&255]+Lw[t>>16&255]+Lw[t>>24&255]+"-"+Lw[e&255]+Lw[e>>8&255]+"-"+Lw[e>>16&15|64]+Lw[e>>24&255]+"-"+Lw[r&63|128]+Lw[r>>8&255]+"-"+Lw[r>>16&255]+Lw[r>>24&255]+Lw[n&255]+Lw[n>>8&255]+Lw[n>>16&255]+Lw[n>>24&255]).toLowerCase()}function Od(t,e,r){return Math.max(e,Math.min(r,t))}function xye(t,e){return(t%e+e)%e}function IYt(t,e,r,n,i){return n+(t-e)*(i-n)/(r-e)}function PYt(t,e,r){return t!==e?(r-t)/(e-t):0}function c9(t,e,r){return(1-r)*t+r*e}function DYt(t,e,r,n){return c9(t,e,1-Math.exp(-r*n))}function LYt(t,e=1){return e-Math.abs(xye(t,e*2)-e)}function OYt(t,e,r){return t<=e?0:t>=r?1:(t=(t-e)/(r-e),t*t*(3-2*t))}function NYt(t,e,r){return t<=e?0:t>=r?1:(t=(t-e)/(r-e),t*t*t*(t*(t*6-15)+10))}function FYt(t,e){return t+Math.floor(Math.random()*(e-t+1))}function zYt(t,e){return t+Math.random()*(e-t)}function BYt(t){return t*(.5-Math.random())}function UYt(t){t!==void 0&&(eIe=t);let e=eIe+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function HYt(t){return t*hL}function jYt(t){return t*y8}function VYt(t){return(t&t-1)===0&&t!==0}function qYt(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function GYt(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}function $Yt(t,e,r,n,i){const a=Math.cos,o=Math.sin,s=a(r/2),d=o(r/2),b=a((e+n)/2),L=o((e+n)/2),B=a((e-n)/2),V=o((e-n)/2),X=a((n-e)/2),ie=o((n-e)/2);switch(i){case"XYX":t.set(s*L,d*B,d*V,s*b);break;case"YZY":t.set(d*V,s*L,d*B,s*b);break;case"ZXZ":t.set(d*B,d*V,s*L,s*b);break;case"XZX":t.set(s*L,d*ie,d*X,s*b);break;case"YXY":t.set(d*X,s*L,d*ie,s*b);break;case"ZYZ":t.set(d*ie,d*X,s*L,s*b);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}function z2(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return t/4294967295;case Uint16Array:return t/65535;case Uint8Array:return t/255;case Int32Array:return Math.max(t/2147483647,-1);case Int16Array:return Math.max(t/32767,-1);case Int8Array:return Math.max(t/127,-1);default:throw new Error("Invalid component type.")}}function Lh(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return Math.round(t*4294967295);case Uint16Array:return Math.round(t*65535);case Uint8Array:return Math.round(t*255);case Int32Array:return Math.round(t*2147483647);case Int16Array:return Math.round(t*32767);case Int8Array:return Math.round(t*127);default:throw new Error("Invalid component type.")}}const _ye={DEG2RAD:hL,RAD2DEG:y8,generateUUID:lE,clamp:Od,euclideanModulo:xye,mapLinear:IYt,inverseLerp:PYt,lerp:c9,damp:DYt,pingpong:LYt,smoothstep:OYt,smootherstep:NYt,randInt:FYt,randFloat:zYt,randFloatSpread:BYt,seededRandom:UYt,degToRad:HYt,radToDeg:jYt,isPowerOfTwo:VYt,ceilPowerOfTwo:qYt,floorPowerOfTwo:GYt,setQuaternionFromProperEuler:$Yt,normalize:Lh,denormalize:z2};class sl{constructor(e=0,r=0){sl.prototype.isVector2=!0,this.x=e,this.y=r}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,r){return this.x=e,this.y=r,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,r){switch(e){case 0:this.x=r;break;case 1:this.y=r;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,r){return this.x=e.x+r.x,this.y=e.y+r.y,this}addScaledVector(e,r){return this.x+=e.x*r,this.y+=e.y*r,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,r){return this.x=e.x-r.x,this.y=e.y-r.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const r=this.x,n=this.y,i=e.elements;return this.x=i[0]*r+i[3]*n+i[6],this.y=i[1]*r+i[4]*n+i[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,r){return this.x=Od(this.x,e.x,r.x),this.y=Od(this.y,e.y,r.y),this}clampScalar(e,r){return this.x=Od(this.x,e,r),this.y=Od(this.y,e,r),this}clampLength(e,r){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Od(n,e,r))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const r=Math.sqrt(this.lengthSq()*e.lengthSq());if(r===0)return Math.PI/2;const n=this.dot(e)/r;return Math.acos(Od(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const r=this.x-e.x,n=this.y-e.y;return r*r+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,r){return this.x+=(e.x-this.x)*r,this.y+=(e.y-this.y)*r,this}lerpVectors(e,r,n){return this.x=e.x+(r.x-e.x)*n,this.y=e.y+(r.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,r=0){return this.x=e[r],this.y=e[r+1],this}toArray(e=[],r=0){return e[r]=this.x,e[r+1]=this.y,e}fromBufferAttribute(e,r){return this.x=e.getX(r),this.y=e.getY(r),this}rotateAround(e,r){const n=Math.cos(r),i=Math.sin(r),a=this.x-e.x,o=this.y-e.y;return this.x=a*n-o*i+e.x,this.y=a*i+o*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class fh{constructor(e=0,r=0,n=0,i=1){this.isQuaternion=!0,this._x=e,this._y=r,this._z=n,this._w=i}static slerpFlat(e,r,n,i,a,o,s){let d=n[i+0],b=n[i+1],L=n[i+2],B=n[i+3];const V=a[o+0],X=a[o+1],ie=a[o+2],de=a[o+3];if(s===0){e[r+0]=d,e[r+1]=b,e[r+2]=L,e[r+3]=B;return}if(s===1){e[r+0]=V,e[r+1]=X,e[r+2]=ie,e[r+3]=de;return}if(B!==de||d!==V||b!==X||L!==ie){let ae=1-s;const U=d*V+b*X+L*ie+B*de,ve=U>=0?1:-1,Se=1-U*U;if(Se>Number.EPSILON){const Me=Math.sqrt(Se),Ie=Math.atan2(Me,U*ve);ae=Math.sin(ae*Ie)/Me,s=Math.sin(s*Ie)/Me}const Pe=s*ve;if(d=d*ae+V*Pe,b=b*ae+X*Pe,L=L*ae+ie*Pe,B=B*ae+de*Pe,ae===1-s){const Me=1/Math.sqrt(d*d+b*b+L*L+B*B);d*=Me,b*=Me,L*=Me,B*=Me}}e[r]=d,e[r+1]=b,e[r+2]=L,e[r+3]=B}static multiplyQuaternionsFlat(e,r,n,i,a,o){const s=n[i],d=n[i+1],b=n[i+2],L=n[i+3],B=a[o],V=a[o+1],X=a[o+2],ie=a[o+3];return e[r]=s*ie+L*B+d*X-b*V,e[r+1]=d*ie+L*V+b*B-s*X,e[r+2]=b*ie+L*X+s*V-d*B,e[r+3]=L*ie-s*B-d*V-b*X,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,r,n,i){return this._x=e,this._y=r,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,r=!0){const n=e._x,i=e._y,a=e._z,o=e._order,s=Math.cos,d=Math.sin,b=s(n/2),L=s(i/2),B=s(a/2),V=d(n/2),X=d(i/2),ie=d(a/2);switch(o){case"XYZ":this._x=V*L*B+b*X*ie,this._y=b*X*B-V*L*ie,this._z=b*L*ie+V*X*B,this._w=b*L*B-V*X*ie;break;case"YXZ":this._x=V*L*B+b*X*ie,this._y=b*X*B-V*L*ie,this._z=b*L*ie-V*X*B,this._w=b*L*B+V*X*ie;break;case"ZXY":this._x=V*L*B-b*X*ie,this._y=b*X*B+V*L*ie,this._z=b*L*ie+V*X*B,this._w=b*L*B-V*X*ie;break;case"ZYX":this._x=V*L*B-b*X*ie,this._y=b*X*B+V*L*ie,this._z=b*L*ie-V*X*B,this._w=b*L*B+V*X*ie;break;case"YZX":this._x=V*L*B+b*X*ie,this._y=b*X*B+V*L*ie,this._z=b*L*ie-V*X*B,this._w=b*L*B-V*X*ie;break;case"XZY":this._x=V*L*B-b*X*ie,this._y=b*X*B-V*L*ie,this._z=b*L*ie+V*X*B,this._w=b*L*B+V*X*ie;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return r===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,r){const n=r/2,i=Math.sin(n);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const r=e.elements,n=r[0],i=r[4],a=r[8],o=r[1],s=r[5],d=r[9],b=r[2],L=r[6],B=r[10],V=n+s+B;if(V>0){const X=.5/Math.sqrt(V+1);this._w=.25/X,this._x=(L-d)*X,this._y=(a-b)*X,this._z=(o-i)*X}else if(n>s&&n>B){const X=2*Math.sqrt(1+n-s-B);this._w=(L-d)/X,this._x=.25*X,this._y=(i+o)/X,this._z=(a+b)/X}else if(s>B){const X=2*Math.sqrt(1+s-n-B);this._w=(a-b)/X,this._x=(i+o)/X,this._y=.25*X,this._z=(d+L)/X}else{const X=2*Math.sqrt(1+B-n-s);this._w=(o-i)/X,this._x=(a+b)/X,this._y=(d+L)/X,this._z=.25*X}return this._onChangeCallback(),this}setFromUnitVectors(e,r){let n=e.dot(r)+1;return n<1e-8?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*r.z-e.z*r.y,this._y=e.z*r.x-e.x*r.z,this._z=e.x*r.y-e.y*r.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Od(this.dot(e),-1,1)))}rotateTowards(e,r){const n=this.angleTo(e);if(n===0)return this;const i=Math.min(1,r/n);return this.slerp(e,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,r){const n=e._x,i=e._y,a=e._z,o=e._w,s=r._x,d=r._y,b=r._z,L=r._w;return this._x=n*L+o*s+i*b-a*d,this._y=i*L+o*d+a*s-n*b,this._z=a*L+o*b+n*d-i*s,this._w=o*L-n*s-i*d-a*b,this._onChangeCallback(),this}slerp(e,r){if(r===0)return this;if(r===1)return this.copy(e);const n=this._x,i=this._y,a=this._z,o=this._w;let s=o*e._w+n*e._x+i*e._y+a*e._z;if(s<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,s=-s):this.copy(e),s>=1)return this._w=o,this._x=n,this._y=i,this._z=a,this;const d=1-s*s;if(d<=Number.EPSILON){const X=1-r;return this._w=X*o+r*this._w,this._x=X*n+r*this._x,this._y=X*i+r*this._y,this._z=X*a+r*this._z,this.normalize(),this}const b=Math.sqrt(d),L=Math.atan2(b,s),B=Math.sin((1-r)*L)/b,V=Math.sin(r*L)/b;return this._w=o*B+this._w*V,this._x=n*B+this._x*V,this._y=i*B+this._y*V,this._z=a*B+this._z*V,this._onChangeCallback(),this}slerpQuaternions(e,r,n){return this.copy(e).slerp(r,n)}random(){const e=2*Math.PI*Math.random(),r=2*Math.PI*Math.random(),n=Math.random(),i=Math.sqrt(1-n),a=Math.sqrt(n);return this.set(i*Math.sin(e),i*Math.cos(e),a*Math.sin(r),a*Math.cos(r))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,r=0){return this._x=e[r],this._y=e[r+1],this._z=e[r+2],this._w=e[r+3],this._onChangeCallback(),this}toArray(e=[],r=0){return e[r]=this._x,e[r+1]=this._y,e[r+2]=this._z,e[r+3]=this._w,e}fromBufferAttribute(e,r){return this._x=e.getX(r),this._y=e.getY(r),this._z=e.getZ(r),this._w=e.getW(r),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class oi{constructor(e=0,r=0,n=0){oi.prototype.isVector3=!0,this.x=e,this.y=r,this.z=n}set(e,r,n){return n===void 0&&(n=this.z),this.x=e,this.y=r,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,r){switch(e){case 0:this.x=r;break;case 1:this.y=r;break;case 2:this.z=r;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,r){return this.x=e.x+r.x,this.y=e.y+r.y,this.z=e.z+r.z,this}addScaledVector(e,r){return this.x+=e.x*r,this.y+=e.y*r,this.z+=e.z*r,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,r){return this.x=e.x-r.x,this.y=e.y-r.y,this.z=e.z-r.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,r){return this.x=e.x*r.x,this.y=e.y*r.y,this.z=e.z*r.z,this}applyEuler(e){return this.applyQuaternion(tIe.setFromEuler(e))}applyAxisAngle(e,r){return this.applyQuaternion(tIe.setFromAxisAngle(e,r))}applyMatrix3(e){const r=this.x,n=this.y,i=this.z,a=e.elements;return this.x=a[0]*r+a[3]*n+a[6]*i,this.y=a[1]*r+a[4]*n+a[7]*i,this.z=a[2]*r+a[5]*n+a[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const r=this.x,n=this.y,i=this.z,a=e.elements,o=1/(a[3]*r+a[7]*n+a[11]*i+a[15]);return this.x=(a[0]*r+a[4]*n+a[8]*i+a[12])*o,this.y=(a[1]*r+a[5]*n+a[9]*i+a[13])*o,this.z=(a[2]*r+a[6]*n+a[10]*i+a[14])*o,this}applyQuaternion(e){const r=this.x,n=this.y,i=this.z,a=e.x,o=e.y,s=e.z,d=e.w,b=2*(o*i-s*n),L=2*(s*r-a*i),B=2*(a*n-o*r);return this.x=r+d*b+o*B-s*L,this.y=n+d*L+s*b-a*B,this.z=i+d*B+a*L-o*b,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const r=this.x,n=this.y,i=this.z,a=e.elements;return this.x=a[0]*r+a[4]*n+a[8]*i,this.y=a[1]*r+a[5]*n+a[9]*i,this.z=a[2]*r+a[6]*n+a[10]*i,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,r){return this.x=Od(this.x,e.x,r.x),this.y=Od(this.y,e.y,r.y),this.z=Od(this.z,e.z,r.z),this}clampScalar(e,r){return this.x=Od(this.x,e,r),this.y=Od(this.y,e,r),this.z=Od(this.z,e,r),this}clampLength(e,r){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Od(n,e,r))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,r){return this.x+=(e.x-this.x)*r,this.y+=(e.y-this.y)*r,this.z+=(e.z-this.z)*r,this}lerpVectors(e,r,n){return this.x=e.x+(r.x-e.x)*n,this.y=e.y+(r.y-e.y)*n,this.z=e.z+(r.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,r){const n=e.x,i=e.y,a=e.z,o=r.x,s=r.y,d=r.z;return this.x=i*d-a*s,this.y=a*o-n*d,this.z=n*s-i*o,this}projectOnVector(e){const r=e.lengthSq();if(r===0)return this.set(0,0,0);const n=e.dot(this)/r;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return aae.copy(this).projectOnVector(e),this.sub(aae)}reflect(e){return this.sub(aae.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const r=Math.sqrt(this.lengthSq()*e.lengthSq());if(r===0)return Math.PI/2;const n=this.dot(e)/r;return Math.acos(Od(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const r=this.x-e.x,n=this.y-e.y,i=this.z-e.z;return r*r+n*n+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,r,n){const i=Math.sin(r)*e;return this.x=i*Math.sin(n),this.y=Math.cos(r)*e,this.z=i*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,r,n){return this.x=e*Math.sin(r),this.y=n,this.z=e*Math.cos(r),this}setFromMatrixPosition(e){const r=e.elements;return this.x=r[12],this.y=r[13],this.z=r[14],this}setFromMatrixScale(e){const r=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=r,this.y=n,this.z=i,this}setFromMatrixColumn(e,r){return this.fromArray(e.elements,r*4)}setFromMatrix3Column(e,r){return this.fromArray(e.elements,r*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,r=0){return this.x=e[r],this.y=e[r+1],this.z=e[r+2],this}toArray(e=[],r=0){return e[r]=this.x,e[r+1]=this.y,e[r+2]=this.z,e}fromBufferAttribute(e,r){return this.x=e.getX(r),this.y=e.getY(r),this.z=e.getZ(r),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,r=Math.random()*2-1,n=Math.sqrt(1-r*r);return this.x=n*Math.cos(e),this.y=r,this.z=n*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const aae=new oi,tIe=new fh;class gh{constructor(e,r,n,i,a,o,s,d,b){gh.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,r,n,i,a,o,s,d,b)}set(e,r,n,i,a,o,s,d,b){const L=this.elements;return L[0]=e,L[1]=i,L[2]=s,L[3]=r,L[4]=a,L[5]=d,L[6]=n,L[7]=o,L[8]=b,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const r=this.elements,n=e.elements;return r[0]=n[0],r[1]=n[1],r[2]=n[2],r[3]=n[3],r[4]=n[4],r[5]=n[5],r[6]=n[6],r[7]=n[7],r[8]=n[8],this}extractBasis(e,r,n){return e.setFromMatrix3Column(this,0),r.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const r=e.elements;return this.set(r[0],r[4],r[8],r[1],r[5],r[9],r[2],r[6],r[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,r){const n=e.elements,i=r.elements,a=this.elements,o=n[0],s=n[3],d=n[6],b=n[1],L=n[4],B=n[7],V=n[2],X=n[5],ie=n[8],de=i[0],ae=i[3],U=i[6],ve=i[1],Se=i[4],Pe=i[7],Me=i[2],Ie=i[5],Ve=i[8];return a[0]=o*de+s*ve+d*Me,a[3]=o*ae+s*Se+d*Ie,a[6]=o*U+s*Pe+d*Ve,a[1]=b*de+L*ve+B*Me,a[4]=b*ae+L*Se+B*Ie,a[7]=b*U+L*Pe+B*Ve,a[2]=V*de+X*ve+ie*Me,a[5]=V*ae+X*Se+ie*Ie,a[8]=V*U+X*Pe+ie*Ve,this}multiplyScalar(e){const r=this.elements;return r[0]*=e,r[3]*=e,r[6]*=e,r[1]*=e,r[4]*=e,r[7]*=e,r[2]*=e,r[5]*=e,r[8]*=e,this}determinant(){const e=this.elements,r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],d=e[6],b=e[7],L=e[8];return r*o*L-r*s*b-n*a*L+n*s*d+i*a*b-i*o*d}invert(){const e=this.elements,r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],d=e[6],b=e[7],L=e[8],B=L*o-s*b,V=s*d-L*a,X=b*a-o*d,ie=r*B+n*V+i*X;if(ie===0)return this.set(0,0,0,0,0,0,0,0,0);const de=1/ie;return e[0]=B*de,e[1]=(i*b-L*n)*de,e[2]=(s*n-i*o)*de,e[3]=V*de,e[4]=(L*r-i*d)*de,e[5]=(i*a-s*r)*de,e[6]=X*de,e[7]=(n*d-b*r)*de,e[8]=(o*r-n*a)*de,this}transpose(){let e;const r=this.elements;return e=r[1],r[1]=r[3],r[3]=e,e=r[2],r[2]=r[6],r[6]=e,e=r[5],r[5]=r[7],r[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const r=this.elements;return e[0]=r[0],e[1]=r[3],e[2]=r[6],e[3]=r[1],e[4]=r[4],e[5]=r[7],e[6]=r[2],e[7]=r[5],e[8]=r[8],this}setUvTransform(e,r,n,i,a,o,s){const d=Math.cos(a),b=Math.sin(a);return this.set(n*d,n*b,-n*(d*o+b*s)+o+e,-i*b,i*d,-i*(-b*o+d*s)+s+r,0,0,1),this}scale(e,r){return this.premultiply(oae.makeScale(e,r)),this}rotate(e){return this.premultiply(oae.makeRotation(-e)),this}translate(e,r){return this.premultiply(oae.makeTranslation(e,r)),this}makeTranslation(e,r){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,r,0,0,1),this}makeRotation(e){const r=Math.cos(e),n=Math.sin(e);return this.set(r,-n,0,n,r,0,0,0,1),this}makeScale(e,r){return this.set(e,0,0,0,r,0,0,0,1),this}equals(e){const r=this.elements,n=e.elements;for(let i=0;i<9;i++)if(r[i]!==n[i])return!1;return!0}fromArray(e,r=0){for(let n=0;n<9;n++)this.elements[n]=e[n+r];return this}toArray(e=[],r=0){const n=this.elements;return e[r]=n[0],e[r+1]=n[1],e[r+2]=n[2],e[r+3]=n[3],e[r+4]=n[4],e[r+5]=n[5],e[r+6]=n[6],e[r+7]=n[7],e[r+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const oae=new gh;function H$e(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}const WYt={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function AN(t,e){return new WYt[t](e)}function eB(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function j$e(){const t=eB("canvas");return t.style.display="block",t}const rIe={};function tB(t){t in rIe||(rIe[t]=!0,console.warn(t))}function YYt(t,e,r){return new Promise(function(n,i){function a(){switch(t.clientWaitSync(e,t.SYNC_FLUSH_COMMANDS_BIT,0)){case t.WAIT_FAILED:i();break;case t.TIMEOUT_EXPIRED:setTimeout(a,r);break;default:n()}}setTimeout(a,r)})}const nIe=new gh().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),iIe=new gh().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function XYt(){const t={enabled:!0,workingColorSpace:KC,spaces:{},convert:function(i,a,o){return this.enabled===!1||a===o||!a||!o||(this.spaces[a].transfer===yg&&(i.r=Ck(i.r),i.g=Ck(i.g),i.b=Ck(i.b)),this.spaces[a].primaries!==this.spaces[o].primaries&&(i.applyMatrix3(this.spaces[a].toXYZ),i.applyMatrix3(this.spaces[o].fromXYZ)),this.spaces[o].transfer===yg&&(i.r=VN(i.r),i.g=VN(i.g),i.b=VN(i.b))),i},workingToColorSpace:function(i,a){return this.convert(i,this.workingColorSpace,a)},colorSpaceToWorking:function(i,a){return this.convert(i,a,this.workingColorSpace)},getPrimaries:function(i){return this.spaces[i].primaries},getTransfer:function(i){return i===yk?J9:this.spaces[i].transfer},getToneMappingMode:function(i){return this.spaces[i].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(i,a=this.workingColorSpace){return i.fromArray(this.spaces[a].luminanceCoefficients)},define:function(i){Object.assign(this.spaces,i)},_getMatrix:function(i,a,o){return i.copy(this.spaces[a].toXYZ).multiply(this.spaces[o].fromXYZ)},_getDrawingBufferColorSpace:function(i){return this.spaces[i].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(i=this.workingColorSpace){return this.spaces[i].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(i,a){return tB("THREE.ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),t.workingToColorSpace(i,a)},toWorkingColorSpace:function(i,a){return tB("THREE.ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),t.colorSpaceToWorking(i,a)}},e=[.64,.33,.3,.6,.15,.06],r=[.2126,.7152,.0722],n=[.3127,.329];return t.define({[KC]:{primaries:e,whitePoint:n,transfer:J9,toXYZ:nIe,fromXYZ:iIe,luminanceCoefficients:r,workingColorSpaceConfig:{unpackColorSpace:H_},outputColorSpaceConfig:{drawingBufferColorSpace:H_}},[H_]:{primaries:e,whitePoint:n,transfer:yg,toXYZ:nIe,fromXYZ:iIe,luminanceCoefficients:r,outputColorSpaceConfig:{drawingBufferColorSpace:H_}}}),t}const xv=XYt();function Ck(t){return t<.04045?t*.0773993808:Math.pow(t*.9478672986+.0521327014,2.4)}function VN(t){return t<.0031308?t*12.92:1.055*Math.pow(t,.41666)-.055}let EO;class V$e{static getDataURL(e,r="image/png"){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{EO===void 0&&(EO=eB("canvas")),EO.width=e.width,EO.height=e.height;const i=EO.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),n=EO}return n.toDataURL(r)}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const r=eB("canvas");r.width=e.width,r.height=e.height;const n=r.getContext("2d");n.drawImage(e,0,0,e.width,e.height);const i=n.getImageData(0,0,e.width,e.height),a=i.data;for(let o=0;o<a.length;o++)a[o]=Ck(a[o]/255)*255;return n.putImageData(i,0,0),r}else if(e.data){const r=e.data.slice(0);for(let n=0;n<r.length;n++)r instanceof Uint8Array||r instanceof Uint8ClampedArray?r[n]=Math.floor(Ck(r[n]/255)*255):r[n]=Ck(r[n]);return{data:r,width:e.width,height:e.height}}else return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}let ZYt=0;class wk{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:ZYt++}),this.uuid=lE(),this.data=e,this.dataReady=!0,this.version=0}getSize(e){const r=this.data;return typeof HTMLVideoElement<"u"&&r instanceof HTMLVideoElement?e.set(r.videoWidth,r.videoHeight,0):r instanceof VideoFrame?e.set(r.displayHeight,r.displayWidth,0):r!==null?e.set(r.width,r.height,r.depth||0):e.set(0,0,0),e}set needsUpdate(e){e===!0&&this.version++}toJSON(e){const r=e===void 0||typeof e=="string";if(!r&&e.images[this.uuid]!==void 0)return e.images[this.uuid];const n={uuid:this.uuid,url:""},i=this.data;if(i!==null){let a;if(Array.isArray(i)){a=[];for(let o=0,s=i.length;o<s;o++)i[o].isDataTexture?a.push(sae(i[o].image)):a.push(sae(i[o]))}else a=sae(i);n.url=a}return r||(e.images[this.uuid]=n),n}}function sae(t){return typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap?V$e.getDataURL(t):t.data?{data:Array.from(t.data),width:t.width,height:t.height,type:t.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}let KYt=0;const lae=new oi;class Fg extends G5{constructor(e=Fg.DEFAULT_IMAGE,r=Fg.DEFAULT_MAPPING,n=Ng,i=Ng,a=vp,o=E5,s=Rp,d=e_,b=Fg.DEFAULT_ANISOTROPY,L=yk){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:KYt++}),this.uuid=lE(),this.name="",this.source=new wk(e),this.mipmaps=[],this.mapping=r,this.channel=0,this.wrapS=n,this.wrapT=i,this.magFilter=a,this.minFilter=o,this.anisotropy=b,this.format=s,this.internalFormat=null,this.type=d,this.offset=new sl(0,0),this.repeat=new sl(1,1),this.center=new sl(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new gh,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=L,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(e&&e.depth&&e.depth>1),this.pmremVersion=0}get width(){return this.source.getSize(lae).x}get height(){return this.source.getSize(lae).y}get depth(){return this.source.getSize(lae).z}get image(){return this.source.data}set image(e=null){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(e,r){this.updateRanges.push({start:e,count:r})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.renderTarget=e.renderTarget,this.isRenderTargetTexture=e.isRenderTargetTexture,this.isArrayTexture=e.isArrayTexture,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}setValues(e){for(const r in e){const n=e[r];if(n===void 0){console.warn(`THREE.Texture.setValues(): parameter '${r}' has value of undefined.`);continue}const i=this[r];if(i===void 0){console.warn(`THREE.Texture.setValues(): property '${r}' does not exist.`);continue}i&&n&&i.isVector2&&n.isVector2||i&&n&&i.isVector3&&n.isVector3||i&&n&&i.isMatrix3&&n.isMatrix3?i.copy(n):this[r]=n}}toJSON(e){const r=e===void 0||typeof e=="string";if(!r&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];const n={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(n.userData=this.userData),r||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==e4)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case sE:e.x=e.x-Math.floor(e.x);break;case Ng:e.x=e.x<0?0:1;break;case X9:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case sE:e.y=e.y-Math.floor(e.y);break;case Ng:e.y=e.y<0?0:1;break;case X9:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}}Fg.DEFAULT_IMAGE=null;Fg.DEFAULT_MAPPING=e4;Fg.DEFAULT_ANISOTROPY=1;class dh{constructor(e=0,r=0,n=0,i=1){dh.prototype.isVector4=!0,this.x=e,this.y=r,this.z=n,this.w=i}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,r,n,i){return this.x=e,this.y=r,this.z=n,this.w=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,r){switch(e){case 0:this.x=r;break;case 1:this.y=r;break;case 2:this.z=r;break;case 3:this.w=r;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,r){return this.x=e.x+r.x,this.y=e.y+r.y,this.z=e.z+r.z,this.w=e.w+r.w,this}addScaledVector(e,r){return this.x+=e.x*r,this.y+=e.y*r,this.z+=e.z*r,this.w+=e.w*r,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,r){return this.x=e.x-r.x,this.y=e.y-r.y,this.z=e.z-r.z,this.w=e.w-r.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const r=this.x,n=this.y,i=this.z,a=this.w,o=e.elements;return this.x=o[0]*r+o[4]*n+o[8]*i+o[12]*a,this.y=o[1]*r+o[5]*n+o[9]*i+o[13]*a,this.z=o[2]*r+o[6]*n+o[10]*i+o[14]*a,this.w=o[3]*r+o[7]*n+o[11]*i+o[15]*a,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const r=Math.sqrt(1-e.w*e.w);return r<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/r,this.y=e.y/r,this.z=e.z/r),this}setAxisAngleFromRotationMatrix(e){let r,n,i,a;const d=e.elements,b=d[0],L=d[4],B=d[8],V=d[1],X=d[5],ie=d[9],de=d[2],ae=d[6],U=d[10];if(Math.abs(L-V)<.01&&Math.abs(B-de)<.01&&Math.abs(ie-ae)<.01){if(Math.abs(L+V)<.1&&Math.abs(B+de)<.1&&Math.abs(ie+ae)<.1&&Math.abs(b+X+U-3)<.1)return this.set(1,0,0,0),this;r=Math.PI;const Se=(b+1)/2,Pe=(X+1)/2,Me=(U+1)/2,Ie=(L+V)/4,Ve=(B+de)/4,Ze=(ie+ae)/4;return Se>Pe&&Se>Me?Se<.01?(n=0,i=.707106781,a=.707106781):(n=Math.sqrt(Se),i=Ie/n,a=Ve/n):Pe>Me?Pe<.01?(n=.707106781,i=0,a=.707106781):(i=Math.sqrt(Pe),n=Ie/i,a=Ze/i):Me<.01?(n=.707106781,i=.707106781,a=0):(a=Math.sqrt(Me),n=Ve/a,i=Ze/a),this.set(n,i,a,r),this}let ve=Math.sqrt((ae-ie)*(ae-ie)+(B-de)*(B-de)+(V-L)*(V-L));return Math.abs(ve)<.001&&(ve=1),this.x=(ae-ie)/ve,this.y=(B-de)/ve,this.z=(V-L)/ve,this.w=Math.acos((b+X+U-1)/2),this}setFromMatrixPosition(e){const r=e.elements;return this.x=r[12],this.y=r[13],this.z=r[14],this.w=r[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,r){return this.x=Od(this.x,e.x,r.x),this.y=Od(this.y,e.y,r.y),this.z=Od(this.z,e.z,r.z),this.w=Od(this.w,e.w,r.w),this}clampScalar(e,r){return this.x=Od(this.x,e,r),this.y=Od(this.y,e,r),this.z=Od(this.z,e,r),this.w=Od(this.w,e,r),this}clampLength(e,r){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Od(n,e,r))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,r){return this.x+=(e.x-this.x)*r,this.y+=(e.y-this.y)*r,this.z+=(e.z-this.z)*r,this.w+=(e.w-this.w)*r,this}lerpVectors(e,r,n){return this.x=e.x+(r.x-e.x)*n,this.y=e.y+(r.y-e.y)*n,this.z=e.z+(r.z-e.z)*n,this.w=e.w+(r.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,r=0){return this.x=e[r],this.y=e[r+1],this.z=e[r+2],this.w=e[r+3],this}toArray(e=[],r=0){return e[r]=this.x,e[r+1]=this.y,e[r+2]=this.z,e[r+3]=this.w,e}fromBufferAttribute(e,r){return this.x=e.getX(r),this.y=e.getY(r),this.z=e.getZ(r),this.w=e.getW(r),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class wye extends G5{constructor(e=1,r=1,n={}){super(),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:vp,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},n),this.isRenderTarget=!0,this.width=e,this.height=r,this.depth=n.depth,this.scissor=new dh(0,0,e,r),this.scissorTest=!1,this.viewport=new dh(0,0,e,r);const i={width:e,height:r,depth:n.depth},a=new Fg(i);this.textures=[];const o=n.count;for(let s=0;s<o;s++)this.textures[s]=a.clone(),this.textures[s].isRenderTargetTexture=!0,this.textures[s].renderTarget=this;this._setTextureOptions(n),this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.resolveDepthBuffer=n.resolveDepthBuffer,this.resolveStencilBuffer=n.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=n.depthTexture,this.samples=n.samples,this.multiview=n.multiview}_setTextureOptions(e={}){const r={minFilter:vp,generateMipmaps:!1,flipY:!1,internalFormat:null};e.mapping!==void 0&&(r.mapping=e.mapping),e.wrapS!==void 0&&(r.wrapS=e.wrapS),e.wrapT!==void 0&&(r.wrapT=e.wrapT),e.wrapR!==void 0&&(r.wrapR=e.wrapR),e.magFilter!==void 0&&(r.magFilter=e.magFilter),e.minFilter!==void 0&&(r.minFilter=e.minFilter),e.format!==void 0&&(r.format=e.format),e.type!==void 0&&(r.type=e.type),e.anisotropy!==void 0&&(r.anisotropy=e.anisotropy),e.colorSpace!==void 0&&(r.colorSpace=e.colorSpace),e.flipY!==void 0&&(r.flipY=e.flipY),e.generateMipmaps!==void 0&&(r.generateMipmaps=e.generateMipmaps),e.internalFormat!==void 0&&(r.internalFormat=e.internalFormat);for(let n=0;n<this.textures.length;n++)this.textures[n].setValues(r)}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}set depthTexture(e){this._depthTexture!==null&&(this._depthTexture.renderTarget=null),e!==null&&(e.renderTarget=this),this._depthTexture=e}get depthTexture(){return this._depthTexture}setSize(e,r,n=1){if(this.width!==e||this.height!==r||this.depth!==n){this.width=e,this.height=r,this.depth=n;for(let i=0,a=this.textures.length;i<a;i++)this.textures[i].image.width=e,this.textures[i].image.height=r,this.textures[i].image.depth=n,this.textures[i].isArrayTexture=this.textures[i].image.depth>1;this.dispose()}this.viewport.set(0,0,e,r),this.scissor.set(0,0,e,r)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let r=0,n=e.textures.length;r<n;r++){this.textures[r]=e.textures[r].clone(),this.textures[r].isRenderTargetTexture=!0,this.textures[r].renderTarget=this;const i=Object.assign({},e.textures[r].image);this.textures[r].source=new wk(i)}return this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.resolveDepthBuffer=e.resolveDepthBuffer,this.resolveStencilBuffer=e.resolveStencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class cx extends wye{constructor(e=1,r=1,n={}){super(e,r,n),this.isWebGLRenderTarget=!0}}class vU extends Fg{constructor(e=null,r=1,n=1,i=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:r,height:n,depth:i},this.magFilter=Mp,this.minFilter=Mp,this.wrapR=Ng,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class q$e extends cx{constructor(e=1,r=1,n=1,i={}){super(e,r,i),this.isWebGLArrayRenderTarget=!0,this.depth=n,this.texture=new vU(null,e,r,n),this._setTextureOptions(i),this.texture.isRenderTargetTexture=!0}}class GX extends Fg{constructor(e=null,r=1,n=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:r,height:n,depth:i},this.magFilter=Mp,this.minFilter=Mp,this.wrapR=Ng,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class JYt extends cx{constructor(e=1,r=1,n=1,i={}){super(e,r,i),this.isWebGL3DRenderTarget=!0,this.depth=n,this.texture=new GX(null,e,r,n),this._setTextureOptions(i),this.texture.isRenderTargetTexture=!0}}class xg{constructor(e=new oi(1/0,1/0,1/0),r=new oi(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=r}set(e,r){return this.min.copy(e),this.max.copy(r),this}setFromArray(e){this.makeEmpty();for(let r=0,n=e.length;r<n;r+=3)this.expandByPoint(yC.fromArray(e,r));return this}setFromBufferAttribute(e){this.makeEmpty();for(let r=0,n=e.count;r<n;r++)this.expandByPoint(yC.fromBufferAttribute(e,r));return this}setFromPoints(e){this.makeEmpty();for(let r=0,n=e.length;r<n;r++)this.expandByPoint(e[r]);return this}setFromCenterAndSize(e,r){const n=yC.copy(r).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e,r=!1){return this.makeEmpty(),this.expandByObject(e,r)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,r=!1){e.updateWorldMatrix(!1,!1);const n=e.geometry;if(n!==void 0){const a=n.getAttribute("position");if(r===!0&&a!==void 0&&e.isInstancedMesh!==!0)for(let o=0,s=a.count;o<s;o++)e.isMesh===!0?e.getVertexPosition(o,yC):yC.fromBufferAttribute(a,o),yC.applyMatrix4(e.matrixWorld),this.expandByPoint(yC);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),lV.copy(e.boundingBox)):(n.boundingBox===null&&n.computeBoundingBox(),lV.copy(n.boundingBox)),lV.applyMatrix4(e.matrixWorld),this.union(lV)}const i=e.children;for(let a=0,o=i.length;a<o;a++)this.expandByObject(i[a],r);return this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,r){return r.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,yC),yC.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let r,n;return e.normal.x>0?(r=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(r=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(r+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(r+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(r+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(r+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),r<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(W7),uV.subVectors(this.max,W7),AO.subVectors(e.a,W7),CO.subVectors(e.b,W7),MO.subVectors(e.c,W7),sP.subVectors(CO,AO),lP.subVectors(MO,CO),vD.subVectors(AO,MO);let r=[0,-sP.z,sP.y,0,-lP.z,lP.y,0,-vD.z,vD.y,sP.z,0,-sP.x,lP.z,0,-lP.x,vD.z,0,-vD.x,-sP.y,sP.x,0,-lP.y,lP.x,0,-vD.y,vD.x,0];return!uae(r,AO,CO,MO,uV)||(r=[1,0,0,0,1,0,0,0,1],!uae(r,AO,CO,MO,uV))?!1:(cV.crossVectors(sP,lP),r=[cV.x,cV.y,cV.z],uae(r,AO,CO,MO,uV))}clampPoint(e,r){return r.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,yC).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(yC).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(rk[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),rk[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),rk[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),rk[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),rk[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),rk[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),rk[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),rk[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(rk),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}}const rk=[new oi,new oi,new oi,new oi,new oi,new oi,new oi,new oi],yC=new oi,lV=new xg,AO=new oi,CO=new oi,MO=new oi,sP=new oi,lP=new oi,vD=new oi,W7=new oi,uV=new oi,cV=new oi,mD=new oi;function uae(t,e,r,n,i){for(let a=0,o=t.length-3;a<=o;a+=3){mD.fromArray(t,a);const s=i.x*Math.abs(mD.x)+i.y*Math.abs(mD.y)+i.z*Math.abs(mD.z),d=e.dot(mD),b=r.dot(mD),L=n.dot(mD);if(Math.max(-Math.max(d,b,L),Math.min(d,b,L))>s)return!1}return!0}const QYt=new xg,Y7=new oi,cae=new oi;let Mb=class{constructor(e=new oi,r=-1){this.isSphere=!0,this.center=e,this.radius=r}set(e,r){return this.center.copy(e),this.radius=r,this}setFromPoints(e,r){const n=this.center;r!==void 0?n.copy(r):QYt.setFromPoints(e).getCenter(n);let i=0;for(let a=0,o=e.length;a<o;a++)i=Math.max(i,n.distanceToSquared(e[a]));return this.radius=Math.sqrt(i),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const r=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=r*r}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,r){const n=this.center.distanceToSquared(e);return r.copy(e),n>this.radius*this.radius&&(r.sub(this.center).normalize(),r.multiplyScalar(this.radius).add(this.center)),r}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;Y7.subVectors(e,this.center);const r=Y7.lengthSq();if(r>this.radius*this.radius){const n=Math.sqrt(r),i=(n-this.radius)*.5;this.center.addScaledVector(Y7,i/n),this.radius+=i}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(cae.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Y7.copy(e.center).add(cae)),this.expandByPoint(Y7.copy(e.center).sub(cae))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}};const nk=new oi,fae=new oi,fV=new oi,uP=new oi,dae=new oi,dV=new oi,hae=new oi;class r6{constructor(e=new oi,r=new oi(0,0,-1)){this.origin=e,this.direction=r}set(e,r){return this.origin.copy(e),this.direction.copy(r),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,r){return r.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,nk)),this}closestPointToPoint(e,r){r.subVectors(e,this.origin);const n=r.dot(this.direction);return n<0?r.copy(this.origin):r.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const r=nk.subVectors(e,this.origin).dot(this.direction);return r<0?this.origin.distanceToSquared(e):(nk.copy(this.origin).addScaledVector(this.direction,r),nk.distanceToSquared(e))}distanceSqToSegment(e,r,n,i){fae.copy(e).add(r).multiplyScalar(.5),fV.copy(r).sub(e).normalize(),uP.copy(this.origin).sub(fae);const a=e.distanceTo(r)*.5,o=-this.direction.dot(fV),s=uP.dot(this.direction),d=-uP.dot(fV),b=uP.lengthSq(),L=Math.abs(1-o*o);let B,V,X,ie;if(L>0)if(B=o*d-s,V=o*s-d,ie=a*L,B>=0)if(V>=-ie)if(V<=ie){const de=1/L;B*=de,V*=de,X=B*(B+o*V+2*s)+V*(o*B+V+2*d)+b}else V=a,B=Math.max(0,-(o*V+s)),X=-B*B+V*(V+2*d)+b;else V=-a,B=Math.max(0,-(o*V+s)),X=-B*B+V*(V+2*d)+b;else V<=-ie?(B=Math.max(0,-(-o*a+s)),V=B>0?-a:Math.min(Math.max(-a,-d),a),X=-B*B+V*(V+2*d)+b):V<=ie?(B=0,V=Math.min(Math.max(-a,-d),a),X=V*(V+2*d)+b):(B=Math.max(0,-(o*a+s)),V=B>0?a:Math.min(Math.max(-a,-d),a),X=-B*B+V*(V+2*d)+b);else V=o>0?-a:a,B=Math.max(0,-(o*V+s)),X=-B*B+V*(V+2*d)+b;return n&&n.copy(this.origin).addScaledVector(this.direction,B),i&&i.copy(fae).addScaledVector(fV,V),X}intersectSphere(e,r){nk.subVectors(e.center,this.origin);const n=nk.dot(this.direction),i=nk.dot(nk)-n*n,a=e.radius*e.radius;if(i>a)return null;const o=Math.sqrt(a-i),s=n-o,d=n+o;return d<0?null:s<0?this.at(d,r):this.at(s,r)}intersectsSphere(e){return e.radius<0?!1:this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const r=e.normal.dot(this.direction);if(r===0)return e.distanceToPoint(this.origin)===0?0:null;const n=-(this.origin.dot(e.normal)+e.constant)/r;return n>=0?n:null}intersectPlane(e,r){const n=this.distanceToPlane(e);return n===null?null:this.at(n,r)}intersectsPlane(e){const r=e.distanceToPoint(this.origin);return r===0||e.normal.dot(this.direction)*r<0}intersectBox(e,r){let n,i,a,o,s,d;const b=1/this.direction.x,L=1/this.direction.y,B=1/this.direction.z,V=this.origin;return b>=0?(n=(e.min.x-V.x)*b,i=(e.max.x-V.x)*b):(n=(e.max.x-V.x)*b,i=(e.min.x-V.x)*b),L>=0?(a=(e.min.y-V.y)*L,o=(e.max.y-V.y)*L):(a=(e.max.y-V.y)*L,o=(e.min.y-V.y)*L),n>o||a>i||((a>n||isNaN(n))&&(n=a),(o<i||isNaN(i))&&(i=o),B>=0?(s=(e.min.z-V.z)*B,d=(e.max.z-V.z)*B):(s=(e.max.z-V.z)*B,d=(e.min.z-V.z)*B),n>d||s>i)||((s>n||n!==n)&&(n=s),(d<i||i!==i)&&(i=d),i<0)?null:this.at(n>=0?n:i,r)}intersectsBox(e){return this.intersectBox(e,nk)!==null}intersectTriangle(e,r,n,i,a){dae.subVectors(r,e),dV.subVectors(n,e),hae.crossVectors(dae,dV);let o=this.direction.dot(hae),s;if(o>0){if(i)return null;s=1}else if(o<0)s=-1,o=-o;else return null;uP.subVectors(this.origin,e);const d=s*this.direction.dot(dV.crossVectors(uP,dV));if(d<0)return null;const b=s*this.direction.dot(dae.cross(uP));if(b<0||d+b>o)return null;const L=-s*uP.dot(hae);return L<0?null:this.at(L/o,a)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class Rc{constructor(e,r,n,i,a,o,s,d,b,L,B,V,X,ie,de,ae){Rc.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,r,n,i,a,o,s,d,b,L,B,V,X,ie,de,ae)}set(e,r,n,i,a,o,s,d,b,L,B,V,X,ie,de,ae){const U=this.elements;return U[0]=e,U[4]=r,U[8]=n,U[12]=i,U[1]=a,U[5]=o,U[9]=s,U[13]=d,U[2]=b,U[6]=L,U[10]=B,U[14]=V,U[3]=X,U[7]=ie,U[11]=de,U[15]=ae,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new Rc().fromArray(this.elements)}copy(e){const r=this.elements,n=e.elements;return r[0]=n[0],r[1]=n[1],r[2]=n[2],r[3]=n[3],r[4]=n[4],r[5]=n[5],r[6]=n[6],r[7]=n[7],r[8]=n[8],r[9]=n[9],r[10]=n[10],r[11]=n[11],r[12]=n[12],r[13]=n[13],r[14]=n[14],r[15]=n[15],this}copyPosition(e){const r=this.elements,n=e.elements;return r[12]=n[12],r[13]=n[13],r[14]=n[14],this}setFromMatrix3(e){const r=e.elements;return this.set(r[0],r[3],r[6],0,r[1],r[4],r[7],0,r[2],r[5],r[8],0,0,0,0,1),this}extractBasis(e,r,n){return e.setFromMatrixColumn(this,0),r.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,r,n){return this.set(e.x,r.x,n.x,0,e.y,r.y,n.y,0,e.z,r.z,n.z,0,0,0,0,1),this}extractRotation(e){const r=this.elements,n=e.elements,i=1/RO.setFromMatrixColumn(e,0).length(),a=1/RO.setFromMatrixColumn(e,1).length(),o=1/RO.setFromMatrixColumn(e,2).length();return r[0]=n[0]*i,r[1]=n[1]*i,r[2]=n[2]*i,r[3]=0,r[4]=n[4]*a,r[5]=n[5]*a,r[6]=n[6]*a,r[7]=0,r[8]=n[8]*o,r[9]=n[9]*o,r[10]=n[10]*o,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,this}makeRotationFromEuler(e){const r=this.elements,n=e.x,i=e.y,a=e.z,o=Math.cos(n),s=Math.sin(n),d=Math.cos(i),b=Math.sin(i),L=Math.cos(a),B=Math.sin(a);if(e.order==="XYZ"){const V=o*L,X=o*B,ie=s*L,de=s*B;r[0]=d*L,r[4]=-d*B,r[8]=b,r[1]=X+ie*b,r[5]=V-de*b,r[9]=-s*d,r[2]=de-V*b,r[6]=ie+X*b,r[10]=o*d}else if(e.order==="YXZ"){const V=d*L,X=d*B,ie=b*L,de=b*B;r[0]=V+de*s,r[4]=ie*s-X,r[8]=o*b,r[1]=o*B,r[5]=o*L,r[9]=-s,r[2]=X*s-ie,r[6]=de+V*s,r[10]=o*d}else if(e.order==="ZXY"){const V=d*L,X=d*B,ie=b*L,de=b*B;r[0]=V-de*s,r[4]=-o*B,r[8]=ie+X*s,r[1]=X+ie*s,r[5]=o*L,r[9]=de-V*s,r[2]=-o*b,r[6]=s,r[10]=o*d}else if(e.order==="ZYX"){const V=o*L,X=o*B,ie=s*L,de=s*B;r[0]=d*L,r[4]=ie*b-X,r[8]=V*b+de,r[1]=d*B,r[5]=de*b+V,r[9]=X*b-ie,r[2]=-b,r[6]=s*d,r[10]=o*d}else if(e.order==="YZX"){const V=o*d,X=o*b,ie=s*d,de=s*b;r[0]=d*L,r[4]=de-V*B,r[8]=ie*B+X,r[1]=B,r[5]=o*L,r[9]=-s*L,r[2]=-b*L,r[6]=X*B+ie,r[10]=V-de*B}else if(e.order==="XZY"){const V=o*d,X=o*b,ie=s*d,de=s*b;r[0]=d*L,r[4]=-B,r[8]=b*L,r[1]=V*B+de,r[5]=o*L,r[9]=X*B-ie,r[2]=ie*B-X,r[6]=s*L,r[10]=de*B+V}return r[3]=0,r[7]=0,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,this}makeRotationFromQuaternion(e){return this.compose(eXt,e,tXt)}lookAt(e,r,n){const i=this.elements;return GT.subVectors(e,r),GT.lengthSq()===0&&(GT.z=1),GT.normalize(),cP.crossVectors(n,GT),cP.lengthSq()===0&&(Math.abs(n.z)===1?GT.x+=1e-4:GT.z+=1e-4,GT.normalize(),cP.crossVectors(n,GT)),cP.normalize(),hV.crossVectors(GT,cP),i[0]=cP.x,i[4]=hV.x,i[8]=GT.x,i[1]=cP.y,i[5]=hV.y,i[9]=GT.y,i[2]=cP.z,i[6]=hV.z,i[10]=GT.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,r){const n=e.elements,i=r.elements,a=this.elements,o=n[0],s=n[4],d=n[8],b=n[12],L=n[1],B=n[5],V=n[9],X=n[13],ie=n[2],de=n[6],ae=n[10],U=n[14],ve=n[3],Se=n[7],Pe=n[11],Me=n[15],Ie=i[0],Ve=i[4],Ze=i[8],Je=i[12],nt=i[1],ut=i[5],ht=i[9],_t=i[13],Dt=i[2],qt=i[6],Lt=i[10],dr=i[14],Zt=i[3],Cr=i[7],yt=i[11],Vt=i[15];return a[0]=o*Ie+s*nt+d*Dt+b*Zt,a[4]=o*Ve+s*ut+d*qt+b*Cr,a[8]=o*Ze+s*ht+d*Lt+b*yt,a[12]=o*Je+s*_t+d*dr+b*Vt,a[1]=L*Ie+B*nt+V*Dt+X*Zt,a[5]=L*Ve+B*ut+V*qt+X*Cr,a[9]=L*Ze+B*ht+V*Lt+X*yt,a[13]=L*Je+B*_t+V*dr+X*Vt,a[2]=ie*Ie+de*nt+ae*Dt+U*Zt,a[6]=ie*Ve+de*ut+ae*qt+U*Cr,a[10]=ie*Ze+de*ht+ae*Lt+U*yt,a[14]=ie*Je+de*_t+ae*dr+U*Vt,a[3]=ve*Ie+Se*nt+Pe*Dt+Me*Zt,a[7]=ve*Ve+Se*ut+Pe*qt+Me*Cr,a[11]=ve*Ze+Se*ht+Pe*Lt+Me*yt,a[15]=ve*Je+Se*_t+Pe*dr+Me*Vt,this}multiplyScalar(e){const r=this.elements;return r[0]*=e,r[4]*=e,r[8]*=e,r[12]*=e,r[1]*=e,r[5]*=e,r[9]*=e,r[13]*=e,r[2]*=e,r[6]*=e,r[10]*=e,r[14]*=e,r[3]*=e,r[7]*=e,r[11]*=e,r[15]*=e,this}determinant(){const e=this.elements,r=e[0],n=e[4],i=e[8],a=e[12],o=e[1],s=e[5],d=e[9],b=e[13],L=e[2],B=e[6],V=e[10],X=e[14],ie=e[3],de=e[7],ae=e[11],U=e[15];return ie*(+a*d*B-i*b*B-a*s*V+n*b*V+i*s*X-n*d*X)+de*(+r*d*X-r*b*V+a*o*V-i*o*X+i*b*L-a*d*L)+ae*(+r*b*B-r*s*X-a*o*B+n*o*X+a*s*L-n*b*L)+U*(-i*s*L-r*d*B+r*s*V+i*o*B-n*o*V+n*d*L)}transpose(){const e=this.elements;let r;return r=e[1],e[1]=e[4],e[4]=r,r=e[2],e[2]=e[8],e[8]=r,r=e[6],e[6]=e[9],e[9]=r,r=e[3],e[3]=e[12],e[12]=r,r=e[7],e[7]=e[13],e[13]=r,r=e[11],e[11]=e[14],e[14]=r,this}setPosition(e,r,n){const i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=r,i[14]=n),this}invert(){const e=this.elements,r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],d=e[6],b=e[7],L=e[8],B=e[9],V=e[10],X=e[11],ie=e[12],de=e[13],ae=e[14],U=e[15],ve=B*ae*b-de*V*b+de*d*X-s*ae*X-B*d*U+s*V*U,Se=ie*V*b-L*ae*b-ie*d*X+o*ae*X+L*d*U-o*V*U,Pe=L*de*b-ie*B*b+ie*s*X-o*de*X-L*s*U+o*B*U,Me=ie*B*d-L*de*d-ie*s*V+o*de*V+L*s*ae-o*B*ae,Ie=r*ve+n*Se+i*Pe+a*Me;if(Ie===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const Ve=1/Ie;return e[0]=ve*Ve,e[1]=(de*V*a-B*ae*a-de*i*X+n*ae*X+B*i*U-n*V*U)*Ve,e[2]=(s*ae*a-de*d*a+de*i*b-n*ae*b-s*i*U+n*d*U)*Ve,e[3]=(B*d*a-s*V*a-B*i*b+n*V*b+s*i*X-n*d*X)*Ve,e[4]=Se*Ve,e[5]=(L*ae*a-ie*V*a+ie*i*X-r*ae*X-L*i*U+r*V*U)*Ve,e[6]=(ie*d*a-o*ae*a-ie*i*b+r*ae*b+o*i*U-r*d*U)*Ve,e[7]=(o*V*a-L*d*a+L*i*b-r*V*b-o*i*X+r*d*X)*Ve,e[8]=Pe*Ve,e[9]=(ie*B*a-L*de*a-ie*n*X+r*de*X+L*n*U-r*B*U)*Ve,e[10]=(o*de*a-ie*s*a+ie*n*b-r*de*b-o*n*U+r*s*U)*Ve,e[11]=(L*s*a-o*B*a-L*n*b+r*B*b+o*n*X-r*s*X)*Ve,e[12]=Me*Ve,e[13]=(L*de*i-ie*B*i+ie*n*V-r*de*V-L*n*ae+r*B*ae)*Ve,e[14]=(ie*s*i-o*de*i-ie*n*d+r*de*d+o*n*ae-r*s*ae)*Ve,e[15]=(o*B*i-L*s*i+L*n*d-r*B*d-o*n*V+r*s*V)*Ve,this}scale(e){const r=this.elements,n=e.x,i=e.y,a=e.z;return r[0]*=n,r[4]*=i,r[8]*=a,r[1]*=n,r[5]*=i,r[9]*=a,r[2]*=n,r[6]*=i,r[10]*=a,r[3]*=n,r[7]*=i,r[11]*=a,this}getMaxScaleOnAxis(){const e=this.elements,r=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],i=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(r,n,i))}makeTranslation(e,r,n){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,r,0,0,1,n,0,0,0,1),this}makeRotationX(e){const r=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,r,-n,0,0,n,r,0,0,0,0,1),this}makeRotationY(e){const r=Math.cos(e),n=Math.sin(e);return this.set(r,0,n,0,0,1,0,0,-n,0,r,0,0,0,0,1),this}makeRotationZ(e){const r=Math.cos(e),n=Math.sin(e);return this.set(r,-n,0,0,n,r,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,r){const n=Math.cos(r),i=Math.sin(r),a=1-n,o=e.x,s=e.y,d=e.z,b=a*o,L=a*s;return this.set(b*o+n,b*s-i*d,b*d+i*s,0,b*s+i*d,L*s+n,L*d-i*o,0,b*d-i*s,L*d+i*o,a*d*d+n,0,0,0,0,1),this}makeScale(e,r,n){return this.set(e,0,0,0,0,r,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,r,n,i,a,o){return this.set(1,n,a,0,e,1,o,0,r,i,1,0,0,0,0,1),this}compose(e,r,n){const i=this.elements,a=r._x,o=r._y,s=r._z,d=r._w,b=a+a,L=o+o,B=s+s,V=a*b,X=a*L,ie=a*B,de=o*L,ae=o*B,U=s*B,ve=d*b,Se=d*L,Pe=d*B,Me=n.x,Ie=n.y,Ve=n.z;return i[0]=(1-(de+U))*Me,i[1]=(X+Pe)*Me,i[2]=(ie-Se)*Me,i[3]=0,i[4]=(X-Pe)*Ie,i[5]=(1-(V+U))*Ie,i[6]=(ae+ve)*Ie,i[7]=0,i[8]=(ie+Se)*Ve,i[9]=(ae-ve)*Ve,i[10]=(1-(V+de))*Ve,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,r,n){const i=this.elements;let a=RO.set(i[0],i[1],i[2]).length();const o=RO.set(i[4],i[5],i[6]).length(),s=RO.set(i[8],i[9],i[10]).length();this.determinant()<0&&(a=-a),e.x=i[12],e.y=i[13],e.z=i[14],bC.copy(this);const b=1/a,L=1/o,B=1/s;return bC.elements[0]*=b,bC.elements[1]*=b,bC.elements[2]*=b,bC.elements[4]*=L,bC.elements[5]*=L,bC.elements[6]*=L,bC.elements[8]*=B,bC.elements[9]*=B,bC.elements[10]*=B,r.setFromRotationMatrix(bC),n.x=a,n.y=o,n.z=s,this}makePerspective(e,r,n,i,a,o,s=tE,d=!1){const b=this.elements,L=2*a/(r-e),B=2*a/(n-i),V=(r+e)/(r-e),X=(n+i)/(n-i);let ie,de;if(d)ie=a/(o-a),de=o*a/(o-a);else if(s===tE)ie=-(o+a)/(o-a),de=-2*o*a/(o-a);else if(s===g8)ie=-o/(o-a),de=-o*a/(o-a);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+s);return b[0]=L,b[4]=0,b[8]=V,b[12]=0,b[1]=0,b[5]=B,b[9]=X,b[13]=0,b[2]=0,b[6]=0,b[10]=ie,b[14]=de,b[3]=0,b[7]=0,b[11]=-1,b[15]=0,this}makeOrthographic(e,r,n,i,a,o,s=tE,d=!1){const b=this.elements,L=2/(r-e),B=2/(n-i),V=-(r+e)/(r-e),X=-(n+i)/(n-i);let ie,de;if(d)ie=1/(o-a),de=o/(o-a);else if(s===tE)ie=-2/(o-a),de=-(o+a)/(o-a);else if(s===g8)ie=-1/(o-a),de=-a/(o-a);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+s);return b[0]=L,b[4]=0,b[8]=0,b[12]=V,b[1]=0,b[5]=B,b[9]=0,b[13]=X,b[2]=0,b[6]=0,b[10]=ie,b[14]=de,b[3]=0,b[7]=0,b[11]=0,b[15]=1,this}equals(e){const r=this.elements,n=e.elements;for(let i=0;i<16;i++)if(r[i]!==n[i])return!1;return!0}fromArray(e,r=0){for(let n=0;n<16;n++)this.elements[n]=e[n+r];return this}toArray(e=[],r=0){const n=this.elements;return e[r]=n[0],e[r+1]=n[1],e[r+2]=n[2],e[r+3]=n[3],e[r+4]=n[4],e[r+5]=n[5],e[r+6]=n[6],e[r+7]=n[7],e[r+8]=n[8],e[r+9]=n[9],e[r+10]=n[10],e[r+11]=n[11],e[r+12]=n[12],e[r+13]=n[13],e[r+14]=n[14],e[r+15]=n[15],e}}const RO=new oi,bC=new Rc,eXt=new oi(0,0,0),tXt=new oi(1,1,1),cP=new oi,hV=new oi,GT=new oi,aIe=new Rc,oIe=new fh;class $2{constructor(e=0,r=0,n=0,i=$2.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=r,this._z=n,this._order=i}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,r,n,i=this._order){return this._x=e,this._y=r,this._z=n,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,r=this._order,n=!0){const i=e.elements,a=i[0],o=i[4],s=i[8],d=i[1],b=i[5],L=i[9],B=i[2],V=i[6],X=i[10];switch(r){case"XYZ":this._y=Math.asin(Od(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-L,X),this._z=Math.atan2(-o,a)):(this._x=Math.atan2(V,b),this._z=0);break;case"YXZ":this._x=Math.asin(-Od(L,-1,1)),Math.abs(L)<.9999999?(this._y=Math.atan2(s,X),this._z=Math.atan2(d,b)):(this._y=Math.atan2(-B,a),this._z=0);break;case"ZXY":this._x=Math.asin(Od(V,-1,1)),Math.abs(V)<.9999999?(this._y=Math.atan2(-B,X),this._z=Math.atan2(-o,b)):(this._y=0,this._z=Math.atan2(d,a));break;case"ZYX":this._y=Math.asin(-Od(B,-1,1)),Math.abs(B)<.9999999?(this._x=Math.atan2(V,X),this._z=Math.atan2(d,a)):(this._x=0,this._z=Math.atan2(-o,b));break;case"YZX":this._z=Math.asin(Od(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(-L,b),this._y=Math.atan2(-B,a)):(this._x=0,this._y=Math.atan2(s,X));break;case"XZY":this._z=Math.asin(-Od(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(V,b),this._y=Math.atan2(s,a)):(this._x=Math.atan2(-L,X),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+r)}return this._order=r,n===!0&&this._onChangeCallback(),this}setFromQuaternion(e,r,n){return aIe.makeRotationFromQuaternion(e),this.setFromRotationMatrix(aIe,r,n)}setFromVector3(e,r=this._order){return this.set(e.x,e.y,e.z,r)}reorder(e){return oIe.setFromEuler(this),this.setFromQuaternion(oIe,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],r=0){return e[r]=this._x,e[r+1]=this._y,e[r+2]=this._z,e[r+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}$2.DEFAULT_ORDER="XYZ";class b8{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!==0}}let rXt=0;const sIe=new oi,kO=new fh,ik=new Rc,pV=new oi,X7=new oi,nXt=new oi,iXt=new fh,lIe=new oi(1,0,0),uIe=new oi(0,1,0),cIe=new oi(0,0,1),fIe={type:"added"},aXt={type:"removed"},IO={type:"childadded",child:null},pae={type:"childremoved",child:null};class Hp extends G5{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:rXt++}),this.uuid=lE(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Hp.DEFAULT_UP.clone();const e=new oi,r=new $2,n=new fh,i=new oi(1,1,1);function a(){n.setFromEuler(r,!1)}function o(){r.setFromQuaternion(n,void 0,!1)}r._onChange(a),n._onChange(o),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:r},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:i},modelViewMatrix:{value:new Rc},normalMatrix:{value:new gh}}),this.matrix=new Rc,this.matrixWorld=new Rc,this.matrixAutoUpdate=Hp.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=Hp.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new b8,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,r){this.quaternion.setFromAxisAngle(e,r)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,r){return kO.setFromAxisAngle(e,r),this.quaternion.multiply(kO),this}rotateOnWorldAxis(e,r){return kO.setFromAxisAngle(e,r),this.quaternion.premultiply(kO),this}rotateX(e){return this.rotateOnAxis(lIe,e)}rotateY(e){return this.rotateOnAxis(uIe,e)}rotateZ(e){return this.rotateOnAxis(cIe,e)}translateOnAxis(e,r){return sIe.copy(e).applyQuaternion(this.quaternion),this.position.add(sIe.multiplyScalar(r)),this}translateX(e){return this.translateOnAxis(lIe,e)}translateY(e){return this.translateOnAxis(uIe,e)}translateZ(e){return this.translateOnAxis(cIe,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(ik.copy(this.matrixWorld).invert())}lookAt(e,r,n){e.isVector3?pV.copy(e):pV.set(e,r,n);const i=this.parent;this.updateWorldMatrix(!0,!1),X7.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?ik.lookAt(X7,pV,this.up):ik.lookAt(pV,X7,this.up),this.quaternion.setFromRotationMatrix(ik),i&&(ik.extractRotation(i.matrixWorld),kO.setFromRotationMatrix(ik),this.quaternion.premultiply(kO.invert()))}add(e){if(arguments.length>1){for(let r=0;r<arguments.length;r++)this.add(arguments[r]);return this}return e===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(e.removeFromParent(),e.parent=this,this.children.push(e),e.dispatchEvent(fIe),IO.child=e,this.dispatchEvent(IO),IO.child=null):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.remove(arguments[n]);return this}const r=this.children.indexOf(e);return r!==-1&&(e.parent=null,this.children.splice(r,1),e.dispatchEvent(aXt),pae.child=e,this.dispatchEvent(pae),pae.child=null),this}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),ik.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),ik.multiply(e.parent.matrixWorld)),e.applyMatrix4(ik),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(fIe),IO.child=e,this.dispatchEvent(IO),IO.child=null,this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,r){if(this[e]===r)return this;for(let n=0,i=this.children.length;n<i;n++){const o=this.children[n].getObjectByProperty(e,r);if(o!==void 0)return o}}getObjectsByProperty(e,r,n=[]){this[e]===r&&n.push(this);const i=this.children;for(let a=0,o=i.length;a<o;a++)i[a].getObjectsByProperty(e,r,n);return n}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(X7,e,nXt),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(X7,iXt,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const r=this.matrixWorld.elements;return e.set(r[8],r[9],r[10]).normalize()}raycast(){}traverse(e){e(this);const r=this.children;for(let n=0,i=r.length;n<i;n++)r[n].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);const r=this.children;for(let n=0,i=r.length;n<i;n++)r[n].traverseVisible(e)}traverseAncestors(e){const r=this.parent;r!==null&&(e(r),r.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,e=!0);const r=this.children;for(let n=0,i=r.length;n<i;n++)r[n].updateMatrixWorld(e)}updateWorldMatrix(e,r){const n=this.parent;if(e===!0&&n!==null&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),r===!0){const i=this.children;for(let a=0,o=i.length;a<o;a++)i[a].updateWorldMatrix(!1,!0)}}toJSON(e){const r=e===void 0||typeof e=="string",n={};r&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},n.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});const i={};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.castShadow===!0&&(i.castShadow=!0),this.receiveShadow===!0&&(i.receiveShadow=!0),this.visible===!1&&(i.visible=!1),this.frustumCulled===!1&&(i.frustumCulled=!1),this.renderOrder!==0&&(i.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(i.type="BatchedMesh",i.perObjectFrustumCulled=this.perObjectFrustumCulled,i.sortObjects=this.sortObjects,i.drawRanges=this._drawRanges,i.reservedRanges=this._reservedRanges,i.geometryInfo=this._geometryInfo.map(s=>({...s,boundingBox:s.boundingBox?s.boundingBox.toJSON():void 0,boundingSphere:s.boundingSphere?s.boundingSphere.toJSON():void 0})),i.instanceInfo=this._instanceInfo.map(s=>({...s})),i.availableInstanceIds=this._availableInstanceIds.slice(),i.availableGeometryIds=this._availableGeometryIds.slice(),i.nextIndexStart=this._nextIndexStart,i.nextVertexStart=this._nextVertexStart,i.geometryCount=this._geometryCount,i.maxInstanceCount=this._maxInstanceCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.matricesTexture=this._matricesTexture.toJSON(e),i.indirectTexture=this._indirectTexture.toJSON(e),this._colorsTexture!==null&&(i.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(i.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(i.boundingBox=this.boundingBox.toJSON()));function a(s,d){return s[d.uuid]===void 0&&(s[d.uuid]=d.toJSON(e)),d.uuid}if(this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(i.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=a(e.geometries,this.geometry);const s=this.geometry.parameters;if(s!==void 0&&s.shapes!==void 0){const d=s.shapes;if(Array.isArray(d))for(let b=0,L=d.length;b<L;b++){const B=d[b];a(e.shapes,B)}else a(e.shapes,d)}}if(this.isSkinnedMesh&&(i.bindMode=this.bindMode,i.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(a(e.skeletons,this.skeleton),i.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const s=[];for(let d=0,b=this.material.length;d<b;d++)s.push(a(e.materials,this.material[d]));i.material=s}else i.material=a(e.materials,this.material);if(this.children.length>0){i.children=[];for(let s=0;s<this.children.length;s++)i.children.push(this.children[s].toJSON(e).object)}if(this.animations.length>0){i.animations=[];for(let s=0;s<this.animations.length;s++){const d=this.animations[s];i.animations.push(a(e.animations,d))}}if(r){const s=o(e.geometries),d=o(e.materials),b=o(e.textures),L=o(e.images),B=o(e.shapes),V=o(e.skeletons),X=o(e.animations),ie=o(e.nodes);s.length>0&&(n.geometries=s),d.length>0&&(n.materials=d),b.length>0&&(n.textures=b),L.length>0&&(n.images=L),B.length>0&&(n.shapes=B),V.length>0&&(n.skeletons=V),X.length>0&&(n.animations=X),ie.length>0&&(n.nodes=ie)}return n.object=i,n;function o(s){const d=[];for(const b in s){const L=s[b];delete L.metadata,d.push(L)}return d}}clone(e){return new this.constructor().copy(this,e)}copy(e,r=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),r===!0)for(let n=0;n<e.children.length;n++){const i=e.children[n];this.add(i.clone())}return this}}Hp.DEFAULT_UP=new oi(0,1,0);Hp.DEFAULT_MATRIX_AUTO_UPDATE=!0;Hp.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const xC=new oi,ak=new oi,vae=new oi,ok=new oi,PO=new oi,DO=new oi,dIe=new oi,mae=new oi,gae=new oi,yae=new oi,bae=new dh,xae=new dh,_ae=new dh;class Tb{constructor(e=new oi,r=new oi,n=new oi){this.a=e,this.b=r,this.c=n}static getNormal(e,r,n,i){i.subVectors(n,r),xC.subVectors(e,r),i.cross(xC);const a=i.lengthSq();return a>0?i.multiplyScalar(1/Math.sqrt(a)):i.set(0,0,0)}static getBarycoord(e,r,n,i,a){xC.subVectors(i,r),ak.subVectors(n,r),vae.subVectors(e,r);const o=xC.dot(xC),s=xC.dot(ak),d=xC.dot(vae),b=ak.dot(ak),L=ak.dot(vae),B=o*b-s*s;if(B===0)return a.set(0,0,0),null;const V=1/B,X=(b*d-s*L)*V,ie=(o*L-s*d)*V;return a.set(1-X-ie,ie,X)}static containsPoint(e,r,n,i){return this.getBarycoord(e,r,n,i,ok)===null?!1:ok.x>=0&&ok.y>=0&&ok.x+ok.y<=1}static getInterpolation(e,r,n,i,a,o,s,d){return this.getBarycoord(e,r,n,i,ok)===null?(d.x=0,d.y=0,"z"in d&&(d.z=0),"w"in d&&(d.w=0),null):(d.setScalar(0),d.addScaledVector(a,ok.x),d.addScaledVector(o,ok.y),d.addScaledVector(s,ok.z),d)}static getInterpolatedAttribute(e,r,n,i,a,o){return bae.setScalar(0),xae.setScalar(0),_ae.setScalar(0),bae.fromBufferAttribute(e,r),xae.fromBufferAttribute(e,n),_ae.fromBufferAttribute(e,i),o.setScalar(0),o.addScaledVector(bae,a.x),o.addScaledVector(xae,a.y),o.addScaledVector(_ae,a.z),o}static isFrontFacing(e,r,n,i){return xC.subVectors(n,r),ak.subVectors(e,r),xC.cross(ak).dot(i)<0}set(e,r,n){return this.a.copy(e),this.b.copy(r),this.c.copy(n),this}setFromPointsAndIndices(e,r,n,i){return this.a.copy(e[r]),this.b.copy(e[n]),this.c.copy(e[i]),this}setFromAttributeAndIndices(e,r,n,i){return this.a.fromBufferAttribute(e,r),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,i),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return xC.subVectors(this.c,this.b),ak.subVectors(this.a,this.b),xC.cross(ak).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Tb.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,r){return Tb.getBarycoord(e,this.a,this.b,this.c,r)}getInterpolation(e,r,n,i,a){return Tb.getInterpolation(e,this.a,this.b,this.c,r,n,i,a)}containsPoint(e){return Tb.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Tb.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,r){const n=this.a,i=this.b,a=this.c;let o,s;PO.subVectors(i,n),DO.subVectors(a,n),mae.subVectors(e,n);const d=PO.dot(mae),b=DO.dot(mae);if(d<=0&&b<=0)return r.copy(n);gae.subVectors(e,i);const L=PO.dot(gae),B=DO.dot(gae);if(L>=0&&B<=L)return r.copy(i);const V=d*B-L*b;if(V<=0&&d>=0&&L<=0)return o=d/(d-L),r.copy(n).addScaledVector(PO,o);yae.subVectors(e,a);const X=PO.dot(yae),ie=DO.dot(yae);if(ie>=0&&X<=ie)return r.copy(a);const de=X*b-d*ie;if(de<=0&&b>=0&&ie<=0)return s=b/(b-ie),r.copy(n).addScaledVector(DO,s);const ae=L*ie-X*B;if(ae<=0&&B-L>=0&&X-ie>=0)return dIe.subVectors(a,i),s=(B-L)/(B-L+(X-ie)),r.copy(i).addScaledVector(dIe,s);const U=1/(ae+de+V);return o=de*U,s=V*U,r.copy(n).addScaledVector(PO,o).addScaledVector(DO,s)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const G$e={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},fP={h:0,s:0,l:0},vV={h:0,s:0,l:0};function wae(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*6*(2/3-r):t}class Wu{constructor(e,r,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,r,n)}set(e,r,n){if(r===void 0&&n===void 0){const i=e;i&&i.isColor?this.copy(i):typeof i=="number"?this.setHex(i):typeof i=="string"&&this.setStyle(i)}else this.setRGB(e,r,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,r=H_){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,xv.colorSpaceToWorking(this,r),this}setRGB(e,r,n,i=xv.workingColorSpace){return this.r=e,this.g=r,this.b=n,xv.colorSpaceToWorking(this,i),this}setHSL(e,r,n,i=xv.workingColorSpace){if(e=xye(e,1),r=Od(r,0,1),n=Od(n,0,1),r===0)this.r=this.g=this.b=n;else{const a=n<=.5?n*(1+r):n+r-n*r,o=2*n-a;this.r=wae(o,a,e+1/3),this.g=wae(o,a,e),this.b=wae(o,a,e-1/3)}return xv.colorSpaceToWorking(this,i),this}setStyle(e,r=H_){function n(a){a!==void 0&&parseFloat(a)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(e)){let a;const o=i[1],s=i[2];switch(o){case"rgb":case"rgba":if(a=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return n(a[4]),this.setRGB(Math.min(255,parseInt(a[1],10))/255,Math.min(255,parseInt(a[2],10))/255,Math.min(255,parseInt(a[3],10))/255,r);if(a=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return n(a[4]),this.setRGB(Math.min(100,parseInt(a[1],10))/100,Math.min(100,parseInt(a[2],10))/100,Math.min(100,parseInt(a[3],10))/100,r);break;case"hsl":case"hsla":if(a=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return n(a[4]),this.setHSL(parseFloat(a[1])/360,parseFloat(a[2])/100,parseFloat(a[3])/100,r);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){const a=i[1],o=a.length;if(o===3)return this.setRGB(parseInt(a.charAt(0),16)/15,parseInt(a.charAt(1),16)/15,parseInt(a.charAt(2),16)/15,r);if(o===6)return this.setHex(parseInt(a,16),r);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,r);return this}setColorName(e,r=H_){const n=G$e[e.toLowerCase()];return n!==void 0?this.setHex(n,r):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Ck(e.r),this.g=Ck(e.g),this.b=Ck(e.b),this}copyLinearToSRGB(e){return this.r=VN(e.r),this.g=VN(e.g),this.b=VN(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=H_){return xv.workingToColorSpace(Ow.copy(this),e),Math.round(Od(Ow.r*255,0,255))*65536+Math.round(Od(Ow.g*255,0,255))*256+Math.round(Od(Ow.b*255,0,255))}getHexString(e=H_){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,r=xv.workingColorSpace){xv.workingToColorSpace(Ow.copy(this),r);const n=Ow.r,i=Ow.g,a=Ow.b,o=Math.max(n,i,a),s=Math.min(n,i,a);let d,b;const L=(s+o)/2;if(s===o)d=0,b=0;else{const B=o-s;switch(b=L<=.5?B/(o+s):B/(2-o-s),o){case n:d=(i-a)/B+(i<a?6:0);break;case i:d=(a-n)/B+2;break;case a:d=(n-i)/B+4;break}d/=6}return e.h=d,e.s=b,e.l=L,e}getRGB(e,r=xv.workingColorSpace){return xv.workingToColorSpace(Ow.copy(this),r),e.r=Ow.r,e.g=Ow.g,e.b=Ow.b,e}getStyle(e=H_){xv.workingToColorSpace(Ow.copy(this),e);const r=Ow.r,n=Ow.g,i=Ow.b;return e!==H_?`color(${e} ${r.toFixed(3)} ${n.toFixed(3)} ${i.toFixed(3)})`:`rgb(${Math.round(r*255)},${Math.round(n*255)},${Math.round(i*255)})`}offsetHSL(e,r,n){return this.getHSL(fP),this.setHSL(fP.h+e,fP.s+r,fP.l+n)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,r){return this.r=e.r+r.r,this.g=e.g+r.g,this.b=e.b+r.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,r){return this.r+=(e.r-this.r)*r,this.g+=(e.g-this.g)*r,this.b+=(e.b-this.b)*r,this}lerpColors(e,r,n){return this.r=e.r+(r.r-e.r)*n,this.g=e.g+(r.g-e.g)*n,this.b=e.b+(r.b-e.b)*n,this}lerpHSL(e,r){this.getHSL(fP),e.getHSL(vV);const n=c9(fP.h,vV.h,r),i=c9(fP.s,vV.s,r),a=c9(fP.l,vV.l,r);return this.setHSL(n,i,a),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const r=this.r,n=this.g,i=this.b,a=e.elements;return this.r=a[0]*r+a[3]*n+a[6]*i,this.g=a[1]*r+a[4]*n+a[7]*i,this.b=a[2]*r+a[5]*n+a[8]*i,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,r=0){return this.r=e[r],this.g=e[r+1],this.b=e[r+2],this}toArray(e=[],r=0){return e[r]=this.r,e[r+1]=this.g,e[r+2]=this.b,e}fromBufferAttribute(e,r){return this.r=e.getX(r),this.g=e.getY(r),this.b=e.getZ(r),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const Ow=new Wu;Wu.NAMES=G$e;let oXt=0;class q_ extends G5{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:oXt++}),this.uuid=lE(),this.name="",this.type="Material",this.blending=Ak,this.side=dx,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=F$,this.blendDst=z$,this.blendEquation=PP,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new Wu(0,0,0),this.blendAlpha=0,this.depthFunc=OL,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=kpe,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=VD,this.stencilZFail=VD,this.stencilZPass=VD,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const r in e){const n=e[r];if(n===void 0){console.warn(`THREE.Material: parameter '${r}' has value of undefined.`);continue}const i=this[r];if(i===void 0){console.warn(`THREE.Material: '${r}' is not a property of THREE.${this.type}.`);continue}i&&i.isColor?i.set(n):i&&i.isVector3&&n&&n.isVector3?i.copy(n):this[r]=n}}toJSON(e){const r=e===void 0||typeof e=="string";r&&(e={textures:{},images:{}});const n={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(n.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(n.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),this.dispersion!==void 0&&(n.dispersion=this.dispersion),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(n.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapRotation!==void 0&&(n.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==Ak&&(n.blending=this.blending),this.side!==dx&&(n.side=this.side),this.vertexColors===!0&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=!0),this.blendSrc!==F$&&(n.blendSrc=this.blendSrc),this.blendDst!==z$&&(n.blendDst=this.blendDst),this.blendEquation!==PP&&(n.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(n.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(n.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==OL&&(n.depthFunc=this.depthFunc),this.depthTest===!1&&(n.depthTest=this.depthTest),this.depthWrite===!1&&(n.depthWrite=this.depthWrite),this.colorWrite===!1&&(n.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(n.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==kpe&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==VD&&(n.stencilFail=this.stencilFail),this.stencilZFail!==VD&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==VD&&(n.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(n.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaHash===!0&&(n.alphaHash=!0),this.alphaToCoverage===!0&&(n.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=!0),this.forceSinglePass===!0&&(n.forceSinglePass=!0),this.wireframe===!0&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=!0),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData);function i(a){const o=[];for(const s in a){const d=a[s];delete d.metadata,o.push(d)}return o}if(r){const a=i(e.textures),o=i(e.images);a.length>0&&(n.textures=a),o.length>0&&(n.images=o)}return n}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const r=e.clippingPlanes;let n=null;if(r!==null){const i=r.length;n=new Array(i);for(let a=0;a!==i;++a)n[a]=r[a].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}class dA extends q_{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Wu(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new $2,this.combine=dU,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const bk=sXt();function sXt(){const t=new ArrayBuffer(4),e=new Float32Array(t),r=new Uint32Array(t),n=new Uint32Array(512),i=new Uint32Array(512);for(let d=0;d<256;++d){const b=d-127;b<-27?(n[d]=0,n[d|256]=32768,i[d]=24,i[d|256]=24):b<-14?(n[d]=1024>>-b-14,n[d|256]=1024>>-b-14|32768,i[d]=-b-1,i[d|256]=-b-1):b<=15?(n[d]=b+15<<10,n[d|256]=b+15<<10|32768,i[d]=13,i[d|256]=13):b<128?(n[d]=31744,n[d|256]=64512,i[d]=24,i[d|256]=24):(n[d]=31744,n[d|256]=64512,i[d]=13,i[d|256]=13)}const a=new Uint32Array(2048),o=new Uint32Array(64),s=new Uint32Array(64);for(let d=1;d<1024;++d){let b=d<<13,L=0;for(;(b&8388608)===0;)b<<=1,L-=8388608;b&=-8388609,L+=947912704,a[d]=b|L}for(let d=1024;d<2048;++d)a[d]=939524096+(d-1024<<13);for(let d=1;d<31;++d)o[d]=d<<23;o[31]=1199570944,o[32]=2147483648;for(let d=33;d<63;++d)o[d]=2147483648+(d-32<<23);o[63]=3347054592;for(let d=1;d<64;++d)d!==32&&(s[d]=1024);return{floatView:e,uint32View:r,baseTable:n,shiftTable:i,mantissaTable:a,exponentTable:o,offsetTable:s}}function NS(t){Math.abs(t)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),t=Od(t,-65504,65504),bk.floatView[0]=t;const e=bk.uint32View[0],r=e>>23&511;return bk.baseTable[r]+((e&8388607)>>bk.shiftTable[r])}function Nz(t){const e=t>>10;return bk.uint32View[0]=bk.mantissaTable[bk.offsetTable[e]+(t&1023)]+bk.exponentTable[e],bk.floatView[0]}class Vw{static toHalfFloat(e){return NS(e)}static fromHalfFloat(e){return Nz(e)}}const bb=new oi,mV=new sl;let lXt=0;class Kh{constructor(e,r,n=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:lXt++}),this.name="",this.array=e,this.itemSize=r,this.count=e!==void 0?e.length/r:0,this.normalized=n,this.usage=Q9,this.updateRanges=[],this.gpuType=mp,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,r){this.updateRanges.push({start:e,count:r})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,r,n){e*=this.itemSize,n*=r.itemSize;for(let i=0,a=this.itemSize;i<a;i++)this.array[e+i]=r.array[n+i];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let r=0,n=this.count;r<n;r++)mV.fromBufferAttribute(this,r),mV.applyMatrix3(e),this.setXY(r,mV.x,mV.y);else if(this.itemSize===3)for(let r=0,n=this.count;r<n;r++)bb.fromBufferAttribute(this,r),bb.applyMatrix3(e),this.setXYZ(r,bb.x,bb.y,bb.z);return this}applyMatrix4(e){for(let r=0,n=this.count;r<n;r++)bb.fromBufferAttribute(this,r),bb.applyMatrix4(e),this.setXYZ(r,bb.x,bb.y,bb.z);return this}applyNormalMatrix(e){for(let r=0,n=this.count;r<n;r++)bb.fromBufferAttribute(this,r),bb.applyNormalMatrix(e),this.setXYZ(r,bb.x,bb.y,bb.z);return this}transformDirection(e){for(let r=0,n=this.count;r<n;r++)bb.fromBufferAttribute(this,r),bb.transformDirection(e),this.setXYZ(r,bb.x,bb.y,bb.z);return this}set(e,r=0){return this.array.set(e,r),this}getComponent(e,r){let n=this.array[e*this.itemSize+r];return this.normalized&&(n=z2(n,this.array)),n}setComponent(e,r,n){return this.normalized&&(n=Lh(n,this.array)),this.array[e*this.itemSize+r]=n,this}getX(e){let r=this.array[e*this.itemSize];return this.normalized&&(r=z2(r,this.array)),r}setX(e,r){return this.normalized&&(r=Lh(r,this.array)),this.array[e*this.itemSize]=r,this}getY(e){let r=this.array[e*this.itemSize+1];return this.normalized&&(r=z2(r,this.array)),r}setY(e,r){return this.normalized&&(r=Lh(r,this.array)),this.array[e*this.itemSize+1]=r,this}getZ(e){let r=this.array[e*this.itemSize+2];return this.normalized&&(r=z2(r,this.array)),r}setZ(e,r){return this.normalized&&(r=Lh(r,this.array)),this.array[e*this.itemSize+2]=r,this}getW(e){let r=this.array[e*this.itemSize+3];return this.normalized&&(r=z2(r,this.array)),r}setW(e,r){return this.normalized&&(r=Lh(r,this.array)),this.array[e*this.itemSize+3]=r,this}setXY(e,r,n){return e*=this.itemSize,this.normalized&&(r=Lh(r,this.array),n=Lh(n,this.array)),this.array[e+0]=r,this.array[e+1]=n,this}setXYZ(e,r,n,i){return e*=this.itemSize,this.normalized&&(r=Lh(r,this.array),n=Lh(n,this.array),i=Lh(i,this.array)),this.array[e+0]=r,this.array[e+1]=n,this.array[e+2]=i,this}setXYZW(e,r,n,i,a){return e*=this.itemSize,this.normalized&&(r=Lh(r,this.array),n=Lh(n,this.array),i=Lh(i,this.array),a=Lh(a,this.array)),this.array[e+0]=r,this.array[e+1]=n,this.array[e+2]=i,this.array[e+3]=a,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(e.name=this.name),this.usage!==Q9&&(e.usage=this.usage),e}}class uXt extends Kh{constructor(e,r,n){super(new Int8Array(e),r,n)}}class cXt extends Kh{constructor(e,r,n){super(new Uint8Array(e),r,n)}}class fXt extends Kh{constructor(e,r,n){super(new Uint8ClampedArray(e),r,n)}}class dXt extends Kh{constructor(e,r,n){super(new Int16Array(e),r,n)}}class Sye extends Kh{constructor(e,r,n){super(new Uint16Array(e),r,n)}}class hXt extends Kh{constructor(e,r,n){super(new Int32Array(e),r,n)}}class Tye extends Kh{constructor(e,r,n){super(new Uint32Array(e),r,n)}}class pXt extends Kh{constructor(e,r,n){super(new Uint16Array(e),r,n),this.isFloat16BufferAttribute=!0}getX(e){let r=Nz(this.array[e*this.itemSize]);return this.normalized&&(r=z2(r,this.array)),r}setX(e,r){return this.normalized&&(r=Lh(r,this.array)),this.array[e*this.itemSize]=NS(r),this}getY(e){let r=Nz(this.array[e*this.itemSize+1]);return this.normalized&&(r=z2(r,this.array)),r}setY(e,r){return this.normalized&&(r=Lh(r,this.array)),this.array[e*this.itemSize+1]=NS(r),this}getZ(e){let r=Nz(this.array[e*this.itemSize+2]);return this.normalized&&(r=z2(r,this.array)),r}setZ(e,r){return this.normalized&&(r=Lh(r,this.array)),this.array[e*this.itemSize+2]=NS(r),this}getW(e){let r=Nz(this.array[e*this.itemSize+3]);return this.normalized&&(r=z2(r,this.array)),r}setW(e,r){return this.normalized&&(r=Lh(r,this.array)),this.array[e*this.itemSize+3]=NS(r),this}setXY(e,r,n){return e*=this.itemSize,this.normalized&&(r=Lh(r,this.array),n=Lh(n,this.array)),this.array[e+0]=NS(r),this.array[e+1]=NS(n),this}setXYZ(e,r,n,i){return e*=this.itemSize,this.normalized&&(r=Lh(r,this.array),n=Lh(n,this.array),i=Lh(i,this.array)),this.array[e+0]=NS(r),this.array[e+1]=NS(n),this.array[e+2]=NS(i),this}setXYZW(e,r,n,i,a){return e*=this.itemSize,this.normalized&&(r=Lh(r,this.array),n=Lh(n,this.array),i=Lh(i,this.array),a=Lh(a,this.array)),this.array[e+0]=NS(r),this.array[e+1]=NS(n),this.array[e+2]=NS(i),this.array[e+3]=NS(a),this}}class Dc extends Kh{constructor(e,r,n){super(new Float32Array(e),r,n)}}let vXt=0;const R3=new Rc,Sae=new Hp,LO=new oi,$T=new xg,Z7=new xg,$x=new oi;class Jf extends G5{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:vXt++}),this.uuid=lE(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(H$e(e)?Tye:Sye)(e,1):this.index=e,this}setIndirect(e){return this.indirect=e,this}getIndirect(){return this.indirect}getAttribute(e){return this.attributes[e]}setAttribute(e,r){return this.attributes[e]=r,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,r,n=0){this.groups.push({start:e,count:r,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,r){this.drawRange.start=e,this.drawRange.count=r}applyMatrix4(e){const r=this.attributes.position;r!==void 0&&(r.applyMatrix4(e),r.needsUpdate=!0);const n=this.attributes.normal;if(n!==void 0){const a=new gh().getNormalMatrix(e);n.applyNormalMatrix(a),n.needsUpdate=!0}const i=this.attributes.tangent;return i!==void 0&&(i.transformDirection(e),i.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return R3.makeRotationFromQuaternion(e),this.applyMatrix4(R3),this}rotateX(e){return R3.makeRotationX(e),this.applyMatrix4(R3),this}rotateY(e){return R3.makeRotationY(e),this.applyMatrix4(R3),this}rotateZ(e){return R3.makeRotationZ(e),this.applyMatrix4(R3),this}translate(e,r,n){return R3.makeTranslation(e,r,n),this.applyMatrix4(R3),this}scale(e,r,n){return R3.makeScale(e,r,n),this.applyMatrix4(R3),this}lookAt(e){return Sae.lookAt(e),Sae.updateMatrix(),this.applyMatrix4(Sae.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(LO).negate(),this.translate(LO.x,LO.y,LO.z),this}setFromPoints(e){const r=this.getAttribute("position");if(r===void 0){const n=[];for(let i=0,a=e.length;i<a;i++){const o=e[i];n.push(o.x,o.y,o.z||0)}this.setAttribute("position",new Dc(n,3))}else{const n=Math.min(e.length,r.count);for(let i=0;i<n;i++){const a=e[i];r.setXYZ(i,a.x,a.y,a.z||0)}e.length>r.count&&console.warn("THREE.BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),r.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new xg);const e=this.attributes.position,r=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new oi(-1/0,-1/0,-1/0),new oi(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),r)for(let n=0,i=r.length;n<i;n++){const a=r[n];$T.setFromBufferAttribute(a),this.morphTargetsRelative?($x.addVectors(this.boundingBox.min,$T.min),this.boundingBox.expandByPoint($x),$x.addVectors(this.boundingBox.max,$T.max),this.boundingBox.expandByPoint($x)):(this.boundingBox.expandByPoint($T.min),this.boundingBox.expandByPoint($T.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Mb);const e=this.attributes.position,r=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new oi,1/0);return}if(e){const n=this.boundingSphere.center;if($T.setFromBufferAttribute(e),r)for(let a=0,o=r.length;a<o;a++){const s=r[a];Z7.setFromBufferAttribute(s),this.morphTargetsRelative?($x.addVectors($T.min,Z7.min),$T.expandByPoint($x),$x.addVectors($T.max,Z7.max),$T.expandByPoint($x)):($T.expandByPoint(Z7.min),$T.expandByPoint(Z7.max))}$T.getCenter(n);let i=0;for(let a=0,o=e.count;a<o;a++)$x.fromBufferAttribute(e,a),i=Math.max(i,n.distanceToSquared($x));if(r)for(let a=0,o=r.length;a<o;a++){const s=r[a],d=this.morphTargetsRelative;for(let b=0,L=s.count;b<L;b++)$x.fromBufferAttribute(s,b),d&&(LO.fromBufferAttribute(e,b),$x.add(LO)),i=Math.max(i,n.distanceToSquared($x))}this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const e=this.index,r=this.attributes;if(e===null||r.position===void 0||r.normal===void 0||r.uv===void 0){console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const n=r.position,i=r.normal,a=r.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new Kh(new Float32Array(4*n.count),4));const o=this.getAttribute("tangent"),s=[],d=[];for(let Ze=0;Ze<n.count;Ze++)s[Ze]=new oi,d[Ze]=new oi;const b=new oi,L=new oi,B=new oi,V=new sl,X=new sl,ie=new sl,de=new oi,ae=new oi;function U(Ze,Je,nt){b.fromBufferAttribute(n,Ze),L.fromBufferAttribute(n,Je),B.fromBufferAttribute(n,nt),V.fromBufferAttribute(a,Ze),X.fromBufferAttribute(a,Je),ie.fromBufferAttribute(a,nt),L.sub(b),B.sub(b),X.sub(V),ie.sub(V);const ut=1/(X.x*ie.y-ie.x*X.y);isFinite(ut)&&(de.copy(L).multiplyScalar(ie.y).addScaledVector(B,-X.y).multiplyScalar(ut),ae.copy(B).multiplyScalar(X.x).addScaledVector(L,-ie.x).multiplyScalar(ut),s[Ze].add(de),s[Je].add(de),s[nt].add(de),d[Ze].add(ae),d[Je].add(ae),d[nt].add(ae))}let ve=this.groups;ve.length===0&&(ve=[{start:0,count:e.count}]);for(let Ze=0,Je=ve.length;Ze<Je;++Ze){const nt=ve[Ze],ut=nt.start,ht=nt.count;for(let _t=ut,Dt=ut+ht;_t<Dt;_t+=3)U(e.getX(_t+0),e.getX(_t+1),e.getX(_t+2))}const Se=new oi,Pe=new oi,Me=new oi,Ie=new oi;function Ve(Ze){Me.fromBufferAttribute(i,Ze),Ie.copy(Me);const Je=s[Ze];Se.copy(Je),Se.sub(Me.multiplyScalar(Me.dot(Je))).normalize(),Pe.crossVectors(Ie,Je);const ut=Pe.dot(d[Ze])<0?-1:1;o.setXYZW(Ze,Se.x,Se.y,Se.z,ut)}for(let Ze=0,Je=ve.length;Ze<Je;++Ze){const nt=ve[Ze],ut=nt.start,ht=nt.count;for(let _t=ut,Dt=ut+ht;_t<Dt;_t+=3)Ve(e.getX(_t+0)),Ve(e.getX(_t+1)),Ve(e.getX(_t+2))}}computeVertexNormals(){const e=this.index,r=this.getAttribute("position");if(r!==void 0){let n=this.getAttribute("normal");if(n===void 0)n=new Kh(new Float32Array(r.count*3),3),this.setAttribute("normal",n);else for(let V=0,X=n.count;V<X;V++)n.setXYZ(V,0,0,0);const i=new oi,a=new oi,o=new oi,s=new oi,d=new oi,b=new oi,L=new oi,B=new oi;if(e)for(let V=0,X=e.count;V<X;V+=3){const ie=e.getX(V+0),de=e.getX(V+1),ae=e.getX(V+2);i.fromBufferAttribute(r,ie),a.fromBufferAttribute(r,de),o.fromBufferAttribute(r,ae),L.subVectors(o,a),B.subVectors(i,a),L.cross(B),s.fromBufferAttribute(n,ie),d.fromBufferAttribute(n,de),b.fromBufferAttribute(n,ae),s.add(L),d.add(L),b.add(L),n.setXYZ(ie,s.x,s.y,s.z),n.setXYZ(de,d.x,d.y,d.z),n.setXYZ(ae,b.x,b.y,b.z)}else for(let V=0,X=r.count;V<X;V+=3)i.fromBufferAttribute(r,V+0),a.fromBufferAttribute(r,V+1),o.fromBufferAttribute(r,V+2),L.subVectors(o,a),B.subVectors(i,a),L.cross(B),n.setXYZ(V+0,L.x,L.y,L.z),n.setXYZ(V+1,L.x,L.y,L.z),n.setXYZ(V+2,L.x,L.y,L.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let r=0,n=e.count;r<n;r++)$x.fromBufferAttribute(e,r),$x.normalize(),e.setXYZ(r,$x.x,$x.y,$x.z)}toNonIndexed(){function e(s,d){const b=s.array,L=s.itemSize,B=s.normalized,V=new b.constructor(d.length*L);let X=0,ie=0;for(let de=0,ae=d.length;de<ae;de++){s.isInterleavedBufferAttribute?X=d[de]*s.data.stride+s.offset:X=d[de]*L;for(let U=0;U<L;U++)V[ie++]=b[X++]}return new Kh(V,L,B)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const r=new Jf,n=this.index.array,i=this.attributes;for(const s in i){const d=i[s],b=e(d,n);r.setAttribute(s,b)}const a=this.morphAttributes;for(const s in a){const d=[],b=a[s];for(let L=0,B=b.length;L<B;L++){const V=b[L],X=e(V,n);d.push(X)}r.morphAttributes[s]=d}r.morphTargetsRelative=this.morphTargetsRelative;const o=this.groups;for(let s=0,d=o.length;s<d;s++){const b=o[s];r.addGroup(b.start,b.count,b.materialIndex)}return r}toJSON(){const e={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),this.parameters!==void 0){const d=this.parameters;for(const b in d)d[b]!==void 0&&(e[b]=d[b]);return e}e.data={attributes:{}};const r=this.index;r!==null&&(e.data.index={type:r.array.constructor.name,array:Array.prototype.slice.call(r.array)});const n=this.attributes;for(const d in n){const b=n[d];e.data.attributes[d]=b.toJSON(e.data)}const i={};let a=!1;for(const d in this.morphAttributes){const b=this.morphAttributes[d],L=[];for(let B=0,V=b.length;B<V;B++){const X=b[B];L.push(X.toJSON(e.data))}L.length>0&&(i[d]=L,a=!0)}a&&(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const s=this.boundingSphere;return s!==null&&(e.data.boundingSphere=s.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const r={};this.name=e.name;const n=e.index;n!==null&&this.setIndex(n.clone());const i=e.attributes;for(const b in i){const L=i[b];this.setAttribute(b,L.clone(r))}const a=e.morphAttributes;for(const b in a){const L=[],B=a[b];for(let V=0,X=B.length;V<X;V++)L.push(B[V].clone(r));this.morphAttributes[b]=L}this.morphTargetsRelative=e.morphTargetsRelative;const o=e.groups;for(let b=0,L=o.length;b<L;b++){const B=o[b];this.addGroup(B.start,B.count,B.materialIndex)}const s=e.boundingBox;s!==null&&(this.boundingBox=s.clone());const d=e.boundingSphere;return d!==null&&(this.boundingSphere=d.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}const hIe=new Rc,gD=new r6,gV=new Mb,pIe=new oi,yV=new oi,bV=new oi,xV=new oi,Tae=new oi,_V=new oi,vIe=new oi,wV=new oi;class hc extends Hp{constructor(e=new Jf,r=new dA){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=r,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(e,r){return super.copy(e,r),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){const r=this.geometry.morphAttributes,n=Object.keys(r);if(n.length>0){const i=r[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let a=0,o=i.length;a<o;a++){const s=i[a].name||String(a);this.morphTargetInfluences.push(0),this.morphTargetDictionary[s]=a}}}}getVertexPosition(e,r){const n=this.geometry,i=n.attributes.position,a=n.morphAttributes.position,o=n.morphTargetsRelative;r.fromBufferAttribute(i,e);const s=this.morphTargetInfluences;if(a&&s){_V.set(0,0,0);for(let d=0,b=a.length;d<b;d++){const L=s[d],B=a[d];L!==0&&(Tae.fromBufferAttribute(B,e),o?_V.addScaledVector(Tae,L):_V.addScaledVector(Tae.sub(r),L))}r.add(_V)}return r}raycast(e,r){const n=this.geometry,i=this.material,a=this.matrixWorld;i!==void 0&&(n.boundingSphere===null&&n.computeBoundingSphere(),gV.copy(n.boundingSphere),gV.applyMatrix4(a),gD.copy(e.ray).recast(e.near),!(gV.containsPoint(gD.origin)===!1&&(gD.intersectSphere(gV,pIe)===null||gD.origin.distanceToSquared(pIe)>(e.far-e.near)**2))&&(hIe.copy(a).invert(),gD.copy(e.ray).applyMatrix4(hIe),!(n.boundingBox!==null&&gD.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,r,gD)))}_computeIntersections(e,r,n){let i;const a=this.geometry,o=this.material,s=a.index,d=a.attributes.position,b=a.attributes.uv,L=a.attributes.uv1,B=a.attributes.normal,V=a.groups,X=a.drawRange;if(s!==null)if(Array.isArray(o))for(let ie=0,de=V.length;ie<de;ie++){const ae=V[ie],U=o[ae.materialIndex],ve=Math.max(ae.start,X.start),Se=Math.min(s.count,Math.min(ae.start+ae.count,X.start+X.count));for(let Pe=ve,Me=Se;Pe<Me;Pe+=3){const Ie=s.getX(Pe),Ve=s.getX(Pe+1),Ze=s.getX(Pe+2);i=SV(this,U,e,n,b,L,B,Ie,Ve,Ze),i&&(i.faceIndex=Math.floor(Pe/3),i.face.materialIndex=ae.materialIndex,r.push(i))}}else{const ie=Math.max(0,X.start),de=Math.min(s.count,X.start+X.count);for(let ae=ie,U=de;ae<U;ae+=3){const ve=s.getX(ae),Se=s.getX(ae+1),Pe=s.getX(ae+2);i=SV(this,o,e,n,b,L,B,ve,Se,Pe),i&&(i.faceIndex=Math.floor(ae/3),r.push(i))}}else if(d!==void 0)if(Array.isArray(o))for(let ie=0,de=V.length;ie<de;ie++){const ae=V[ie],U=o[ae.materialIndex],ve=Math.max(ae.start,X.start),Se=Math.min(d.count,Math.min(ae.start+ae.count,X.start+X.count));for(let Pe=ve,Me=Se;Pe<Me;Pe+=3){const Ie=Pe,Ve=Pe+1,Ze=Pe+2;i=SV(this,U,e,n,b,L,B,Ie,Ve,Ze),i&&(i.faceIndex=Math.floor(Pe/3),i.face.materialIndex=ae.materialIndex,r.push(i))}}else{const ie=Math.max(0,X.start),de=Math.min(d.count,X.start+X.count);for(let ae=ie,U=de;ae<U;ae+=3){const ve=ae,Se=ae+1,Pe=ae+2;i=SV(this,o,e,n,b,L,B,ve,Se,Pe),i&&(i.faceIndex=Math.floor(ae/3),r.push(i))}}}}function mXt(t,e,r,n,i,a,o,s){let d;if(e.side===x1?d=n.intersectTriangle(o,a,i,!0,s):d=n.intersectTriangle(i,a,o,e.side===dx,s),d===null)return null;wV.copy(s),wV.applyMatrix4(t.matrixWorld);const b=r.ray.origin.distanceTo(wV);return b<r.near||b>r.far?null:{distance:b,point:wV.clone(),object:t}}function SV(t,e,r,n,i,a,o,s,d,b){t.getVertexPosition(s,yV),t.getVertexPosition(d,bV),t.getVertexPosition(b,xV);const L=mXt(t,e,r,n,yV,bV,xV,vIe);if(L){const B=new oi;Tb.getBarycoord(vIe,yV,bV,xV,B),i&&(L.uv=Tb.getInterpolatedAttribute(i,s,d,b,B,new sl)),a&&(L.uv1=Tb.getInterpolatedAttribute(a,s,d,b,B,new sl)),o&&(L.normal=Tb.getInterpolatedAttribute(o,s,d,b,B,new oi),L.normal.dot(n.direction)>0&&L.normal.multiplyScalar(-1));const V={a:s,b:d,c:b,normal:new oi,materialIndex:0};Tb.getNormal(yV,bV,xV,V.normal),L.face=V,L.barycoord=B}return L}class Hw extends Jf{constructor(e=1,r=1,n=1,i=1,a=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:r,depth:n,widthSegments:i,heightSegments:a,depthSegments:o};const s=this;i=Math.floor(i),a=Math.floor(a),o=Math.floor(o);const d=[],b=[],L=[],B=[];let V=0,X=0;ie("z","y","x",-1,-1,n,r,e,o,a,0),ie("z","y","x",1,-1,n,r,-e,o,a,1),ie("x","z","y",1,1,e,n,r,i,o,2),ie("x","z","y",1,-1,e,n,-r,i,o,3),ie("x","y","z",1,-1,e,r,n,i,a,4),ie("x","y","z",-1,-1,e,r,-n,i,a,5),this.setIndex(d),this.setAttribute("position",new Dc(b,3)),this.setAttribute("normal",new Dc(L,3)),this.setAttribute("uv",new Dc(B,2));function ie(de,ae,U,ve,Se,Pe,Me,Ie,Ve,Ze,Je){const nt=Pe/Ve,ut=Me/Ze,ht=Pe/2,_t=Me/2,Dt=Ie/2,qt=Ve+1,Lt=Ze+1;let dr=0,Zt=0;const Cr=new oi;for(let yt=0;yt<Lt;yt++){const Vt=yt*ut-_t;for(let Er=0;Er<qt;Er++){const sr=Er*nt-ht;Cr[de]=sr*ve,Cr[ae]=Vt*Se,Cr[U]=Dt,b.push(Cr.x,Cr.y,Cr.z),Cr[de]=0,Cr[ae]=0,Cr[U]=Ie>0?1:-1,L.push(Cr.x,Cr.y,Cr.z),B.push(Er/Ve),B.push(1-yt/Ze),dr+=1}}for(let yt=0;yt<Ze;yt++)for(let Vt=0;Vt<Ve;Vt++){const Er=V+Vt+qt*yt,sr=V+Vt+qt*(yt+1),or=V+(Vt+1)+qt*(yt+1),Ar=V+(Vt+1)+qt*yt;d.push(Er,sr,Ar),d.push(sr,or,Ar),Zt+=6}s.addGroup(X,Zt,Je),X+=Zt,V+=dr}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Hw(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function x8(t){const e={};for(const r in t){e[r]={};for(const n in t[r]){const i=t[r][n];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture||i.isQuaternion)?i.isRenderTargetTexture?(console.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[r][n]=null):e[r][n]=i.clone():Array.isArray(i)?e[r][n]=i.slice():e[r][n]=i}}return e}function D2(t){const e={};for(let r=0;r<t.length;r++){const n=x8(t[r]);for(const i in n)e[i]=n[i]}return e}function gXt(t){const e=[];for(let r=0;r<t.length;r++)e.push(t[r].clone());return e}function $$e(t){const e=t.getRenderTarget();return e===null?t.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:xv.workingColorSpace}const wW={clone:x8,merge:D2};var yXt=`void main() {
	gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
}`,bXt=`void main() {
	gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
}`;class eb extends q_{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=yXt,this.fragmentShader=bXt,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={clipCullDistance:!1,multiDraw:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,e!==void 0&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=x8(e.uniforms),this.uniformsGroups=gXt(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){const r=super.toJSON(e);r.glslVersion=this.glslVersion,r.uniforms={};for(const i in this.uniforms){const o=this.uniforms[i].value;o&&o.isTexture?r.uniforms[i]={type:"t",value:o.toJSON(e).uuid}:o&&o.isColor?r.uniforms[i]={type:"c",value:o.getHex()}:o&&o.isVector2?r.uniforms[i]={type:"v2",value:o.toArray()}:o&&o.isVector3?r.uniforms[i]={type:"v3",value:o.toArray()}:o&&o.isVector4?r.uniforms[i]={type:"v4",value:o.toArray()}:o&&o.isMatrix3?r.uniforms[i]={type:"m3",value:o.toArray()}:o&&o.isMatrix4?r.uniforms[i]={type:"m4",value:o.toArray()}:r.uniforms[i]={value:o}}Object.keys(this.defines).length>0&&(r.defines=this.defines),r.vertexShader=this.vertexShader,r.fragmentShader=this.fragmentShader,r.lights=this.lights,r.clipping=this.clipping;const n={};for(const i in this.extensions)this.extensions[i]===!0&&(n[i]=!0);return Object.keys(n).length>0&&(r.extensions=n),r}}let $X=class extends Hp{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Rc,this.projectionMatrix=new Rc,this.projectionMatrixInverse=new Rc,this.coordinateSystem=tE,this._reversedDepth=!1}get reversedDepth(){return this._reversedDepth}copy(e,r){return super.copy(e,r),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,r){super.updateWorldMatrix(e,r),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}};const dP=new oi,mIe=new sl,gIe=new sl;class sy extends $X{constructor(e=50,r=1,n=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=i,this.focus=10,this.aspect=r,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,r){return super.copy(e,r),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const r=.5*this.getFilmHeight()/e;this.fov=y8*2*Math.atan(r),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(hL*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return y8*2*Math.atan(Math.tan(hL*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,r,n){dP.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),r.set(dP.x,dP.y).multiplyScalar(-e/dP.z),dP.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(dP.x,dP.y).multiplyScalar(-e/dP.z)}getViewSize(e,r){return this.getViewBounds(e,mIe,gIe),r.subVectors(gIe,mIe)}setViewOffset(e,r,n,i,a,o){this.aspect=e/r,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=r,this.view.offsetX=n,this.view.offsetY=i,this.view.width=a,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let r=e*Math.tan(hL*.5*this.fov)/this.zoom,n=2*r,i=this.aspect*n,a=-.5*i;const o=this.view;if(this.view!==null&&this.view.enabled){const d=o.fullWidth,b=o.fullHeight;a+=o.offsetX*i/d,r-=o.offsetY*n/b,i*=o.width/d,n*=o.height/b}const s=this.filmOffset;s!==0&&(a+=e*s/this.getFilmWidth()),this.projectionMatrix.makePerspective(a,a+i,r,r-n,e,this.far,this.coordinateSystem,this.reversedDepth),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const r=super.toJSON(e);return r.object.fov=this.fov,r.object.zoom=this.zoom,r.object.near=this.near,r.object.far=this.far,r.object.focus=this.focus,r.object.aspect=this.aspect,this.view!==null&&(r.object.view=Object.assign({},this.view)),r.object.filmGauge=this.filmGauge,r.object.filmOffset=this.filmOffset,r}}const OO=-90,NO=1;class W$e extends Hp{constructor(e,r,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const i=new sy(OO,NO,e,r);i.layers=this.layers,this.add(i);const a=new sy(OO,NO,e,r);a.layers=this.layers,this.add(a);const o=new sy(OO,NO,e,r);o.layers=this.layers,this.add(o);const s=new sy(OO,NO,e,r);s.layers=this.layers,this.add(s);const d=new sy(OO,NO,e,r);d.layers=this.layers,this.add(d);const b=new sy(OO,NO,e,r);b.layers=this.layers,this.add(b)}updateCoordinateSystem(){const e=this.coordinateSystem,r=this.children.concat(),[n,i,a,o,s,d]=r;for(const b of r)this.remove(b);if(e===tE)n.up.set(0,1,0),n.lookAt(1,0,0),i.up.set(0,1,0),i.lookAt(-1,0,0),a.up.set(0,0,-1),a.lookAt(0,1,0),o.up.set(0,0,1),o.lookAt(0,-1,0),s.up.set(0,1,0),s.lookAt(0,0,1),d.up.set(0,1,0),d.lookAt(0,0,-1);else if(e===g8)n.up.set(0,-1,0),n.lookAt(-1,0,0),i.up.set(0,-1,0),i.lookAt(1,0,0),a.up.set(0,0,1),a.lookAt(0,1,0),o.up.set(0,0,-1),o.lookAt(0,-1,0),s.up.set(0,-1,0),s.lookAt(0,0,1),d.up.set(0,-1,0),d.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const b of r)this.add(b),b.updateMatrixWorld()}update(e,r){this.parent===null&&this.updateMatrixWorld();const{renderTarget:n,activeMipmapLevel:i}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[a,o,s,d,b,L]=this.children,B=e.getRenderTarget(),V=e.getActiveCubeFace(),X=e.getActiveMipmapLevel(),ie=e.xr.enabled;e.xr.enabled=!1;const de=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0,i),e.render(r,a),e.setRenderTarget(n,1,i),e.render(r,o),e.setRenderTarget(n,2,i),e.render(r,s),e.setRenderTarget(n,3,i),e.render(r,d),e.setRenderTarget(n,4,i),e.render(r,b),n.texture.generateMipmaps=de,e.setRenderTarget(n,5,i),e.render(r,L),e.setRenderTarget(B,V,X),e.xr.enabled=ie,n.texture.needsPMREMUpdate=!0}}class mU extends Fg{constructor(e=[],r=U5,n,i,a,o,s,d,b,L){super(e,r,n,i,a,o,s,d,b,L),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class Eye extends cx{constructor(e=1,r={}){super(e,e,r),this.isWebGLCubeRenderTarget=!0;const n={width:e,height:e,depth:1},i=[n,n,n,n,n,n];this.texture=new mU(i),this._setTextureOptions(r),this.texture.isRenderTargetTexture=!0}fromEquirectangularTexture(e,r){this.texture.type=r.type,this.texture.colorSpace=r.colorSpace,this.texture.generateMipmaps=r.generateMipmaps,this.texture.minFilter=r.minFilter,this.texture.magFilter=r.magFilter;const n={uniforms:{tEquirect:{value:null}},vertexShader:`

				varying vec3 vWorldDirection;

				vec3 transformDirection( in vec3 dir, in mat4 matrix ) {

					return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );

				}

				void main() {

					vWorldDirection = transformDirection( position, modelMatrix );

					#include <begin_vertex>
					#include <project_vertex>

				}
			`,fragmentShader:`

				uniform sampler2D tEquirect;

				varying vec3 vWorldDirection;

				#include <common>

				void main() {

					vec3 direction = normalize( vWorldDirection );

					vec2 sampleUV = equirectUv( direction );

					gl_FragColor = texture2D( tEquirect, sampleUV );

				}
			`},i=new Hw(5,5,5),a=new eb({name:"CubemapFromEquirect",uniforms:x8(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:x1,blending:V2});a.uniforms.tEquirect.value=r;const o=new hc(i,a),s=r.minFilter;return r.minFilter===E5&&(r.minFilter=vp),new W$e(1,10,this).update(e,o),r.minFilter=s,o.geometry.dispose(),o.material.dispose(),this}clear(e,r=!0,n=!0,i=!0){const a=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(r,n,i);e.setRenderTarget(a)}}class CN extends Hp{constructor(){super(),this.isGroup=!0,this.type="Group"}}const xXt={type:"move"};class DG{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new CN,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new CN,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new oi,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new oi),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new CN,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new oi,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new oi),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const r=this._hand;if(r)for(const n of e.hand.values())this._getHandJoint(r,n)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,r,n){let i=null,a=null,o=null;const s=this._targetRay,d=this._grip,b=this._hand;if(e&&r.session.visibilityState!=="visible-blurred"){if(b&&e.hand){o=!0;for(const de of e.hand.values()){const ae=r.getJointPose(de,n),U=this._getHandJoint(b,de);ae!==null&&(U.matrix.fromArray(ae.transform.matrix),U.matrix.decompose(U.position,U.rotation,U.scale),U.matrixWorldNeedsUpdate=!0,U.jointRadius=ae.radius),U.visible=ae!==null}const L=b.joints["index-finger-tip"],B=b.joints["thumb-tip"],V=L.position.distanceTo(B.position),X=.02,ie=.005;b.inputState.pinching&&V>X+ie?(b.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!b.inputState.pinching&&V<=X-ie&&(b.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else d!==null&&e.gripSpace&&(a=r.getPose(e.gripSpace,n),a!==null&&(d.matrix.fromArray(a.transform.matrix),d.matrix.decompose(d.position,d.rotation,d.scale),d.matrixWorldNeedsUpdate=!0,a.linearVelocity?(d.hasLinearVelocity=!0,d.linearVelocity.copy(a.linearVelocity)):d.hasLinearVelocity=!1,a.angularVelocity?(d.hasAngularVelocity=!0,d.angularVelocity.copy(a.angularVelocity)):d.hasAngularVelocity=!1));s!==null&&(i=r.getPose(e.targetRaySpace,n),i===null&&a!==null&&(i=a),i!==null&&(s.matrix.fromArray(i.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),s.matrixWorldNeedsUpdate=!0,i.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(i.linearVelocity)):s.hasLinearVelocity=!1,i.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(i.angularVelocity)):s.hasAngularVelocity=!1,this.dispatchEvent(xXt)))}return s!==null&&(s.visible=i!==null),d!==null&&(d.visible=a!==null),b!==null&&(b.visible=o!==null),this}_getHandJoint(e,r){if(e.joints[r.jointName]===void 0){const n=new CN;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[r.jointName]=n,e.add(n)}return e.joints[r.jointName]}}class WX{constructor(e,r=25e-5){this.isFogExp2=!0,this.name="",this.color=new Wu(e),this.density=r}clone(){return new WX(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class gU{constructor(e,r=1,n=1e3){this.isFog=!0,this.name="",this.color=new Wu(e),this.near=r,this.far=n}clone(){return new gU(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class mF extends Hp{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new $2,this.environmentIntensity=1,this.environmentRotation=new $2,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,r){return super.copy(e,r),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const r=super.toJSON(e);return this.fog!==null&&(r.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(r.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(r.object.backgroundIntensity=this.backgroundIntensity),r.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(r.object.environmentIntensity=this.environmentIntensity),r.object.environmentRotation=this.environmentRotation.toArray(),r}}class YX{constructor(e,r){this.isInterleavedBuffer=!0,this.array=e,this.stride=r,this.count=e!==void 0?e.length/r:0,this.usage=Q9,this.updateRanges=[],this.version=0,this.uuid=lE()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,r){this.updateRanges.push({start:e,count:r})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,r,n){e*=this.stride,n*=r.stride;for(let i=0,a=this.stride;i<a;i++)this.array[e+i]=r.array[n+i];return this}set(e,r=0){return this.array.set(e,r),this}clone(e){e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=lE()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const r=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),n=new this.constructor(r,this.stride);return n.setUsage(this.usage),n}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=lE()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}const k2=new oi;class rE{constructor(e,r,n,i=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=r,this.offset=n,this.normalized=i}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let r=0,n=this.data.count;r<n;r++)k2.fromBufferAttribute(this,r),k2.applyMatrix4(e),this.setXYZ(r,k2.x,k2.y,k2.z);return this}applyNormalMatrix(e){for(let r=0,n=this.count;r<n;r++)k2.fromBufferAttribute(this,r),k2.applyNormalMatrix(e),this.setXYZ(r,k2.x,k2.y,k2.z);return this}transformDirection(e){for(let r=0,n=this.count;r<n;r++)k2.fromBufferAttribute(this,r),k2.transformDirection(e),this.setXYZ(r,k2.x,k2.y,k2.z);return this}getComponent(e,r){let n=this.array[e*this.data.stride+this.offset+r];return this.normalized&&(n=z2(n,this.array)),n}setComponent(e,r,n){return this.normalized&&(n=Lh(n,this.array)),this.data.array[e*this.data.stride+this.offset+r]=n,this}setX(e,r){return this.normalized&&(r=Lh(r,this.array)),this.data.array[e*this.data.stride+this.offset]=r,this}setY(e,r){return this.normalized&&(r=Lh(r,this.array)),this.data.array[e*this.data.stride+this.offset+1]=r,this}setZ(e,r){return this.normalized&&(r=Lh(r,this.array)),this.data.array[e*this.data.stride+this.offset+2]=r,this}setW(e,r){return this.normalized&&(r=Lh(r,this.array)),this.data.array[e*this.data.stride+this.offset+3]=r,this}getX(e){let r=this.data.array[e*this.data.stride+this.offset];return this.normalized&&(r=z2(r,this.array)),r}getY(e){let r=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(r=z2(r,this.array)),r}getZ(e){let r=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(r=z2(r,this.array)),r}getW(e){let r=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(r=z2(r,this.array)),r}setXY(e,r,n){return e=e*this.data.stride+this.offset,this.normalized&&(r=Lh(r,this.array),n=Lh(n,this.array)),this.data.array[e+0]=r,this.data.array[e+1]=n,this}setXYZ(e,r,n,i){return e=e*this.data.stride+this.offset,this.normalized&&(r=Lh(r,this.array),n=Lh(n,this.array),i=Lh(i,this.array)),this.data.array[e+0]=r,this.data.array[e+1]=n,this.data.array[e+2]=i,this}setXYZW(e,r,n,i,a){return e=e*this.data.stride+this.offset,this.normalized&&(r=Lh(r,this.array),n=Lh(n,this.array),i=Lh(i,this.array),a=Lh(a,this.array)),this.data.array[e+0]=r,this.data.array[e+1]=n,this.data.array[e+2]=i,this.data.array[e+3]=a,this}clone(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const r=[];for(let n=0;n<this.count;n++){const i=n*this.data.stride+this.offset;for(let a=0;a<this.itemSize;a++)r.push(this.data.array[i+a])}return new Kh(new this.array.constructor(r),this.itemSize,this.normalized)}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new rE(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const r=[];for(let n=0;n<this.count;n++){const i=n*this.data.stride+this.offset;for(let a=0;a<this.itemSize;a++)r.push(this.data.array[i+a])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:r,normalized:this.normalized}}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}class Aye extends q_{constructor(e){super(),this.isSpriteMaterial=!0,this.type="SpriteMaterial",this.color=new Wu(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}let FO;const K7=new oi,zO=new oi,BO=new oi,UO=new sl,J7=new sl,Y$e=new Rc,TV=new oi,Q7=new oi,EV=new oi,yIe=new sl,Eae=new sl,bIe=new sl;class X$e extends Hp{constructor(e=new Aye){if(super(),this.isSprite=!0,this.type="Sprite",FO===void 0){FO=new Jf;const r=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),n=new YX(r,5);FO.setIndex([0,1,2,0,2,3]),FO.setAttribute("position",new rE(n,3,0,!1)),FO.setAttribute("uv",new rE(n,2,3,!1))}this.geometry=FO,this.material=e,this.center=new sl(.5,.5),this.count=1}raycast(e,r){e.camera===null&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),zO.setFromMatrixScale(this.matrixWorld),Y$e.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),BO.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&this.material.sizeAttenuation===!1&&zO.multiplyScalar(-BO.z);const n=this.material.rotation;let i,a;n!==0&&(a=Math.cos(n),i=Math.sin(n));const o=this.center;AV(TV.set(-.5,-.5,0),BO,o,zO,i,a),AV(Q7.set(.5,-.5,0),BO,o,zO,i,a),AV(EV.set(.5,.5,0),BO,o,zO,i,a),yIe.set(0,0),Eae.set(1,0),bIe.set(1,1);let s=e.ray.intersectTriangle(TV,Q7,EV,!1,K7);if(s===null&&(AV(Q7.set(-.5,.5,0),BO,o,zO,i,a),Eae.set(0,1),s=e.ray.intersectTriangle(TV,EV,Q7,!1,K7),s===null))return;const d=e.ray.origin.distanceTo(K7);d<e.near||d>e.far||r.push({distance:d,point:K7.clone(),uv:Tb.getInterpolation(K7,TV,Q7,EV,yIe,Eae,bIe,new sl),face:null,object:this})}copy(e,r){return super.copy(e,r),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function AV(t,e,r,n,i,a){UO.subVectors(t,r).addScalar(.5).multiply(n),i!==void 0?(J7.x=a*UO.x-i*UO.y,J7.y=i*UO.x+a*UO.y):J7.copy(UO),t.copy(e),t.x+=J7.x,t.y+=J7.y,t.applyMatrix4(Y$e)}const CV=new oi,xIe=new oi;class Z$e extends Hp{constructor(){super(),this.isLOD=!0,this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const r=e.levels;for(let n=0,i=r.length;n<i;n++){const a=r[n];this.addLevel(a.object.clone(),a.distance,a.hysteresis)}return this.autoUpdate=e.autoUpdate,this}addLevel(e,r=0,n=0){r=Math.abs(r);const i=this.levels;let a;for(a=0;a<i.length&&!(r<i[a].distance);a++);return i.splice(a,0,{distance:r,hysteresis:n,object:e}),this.add(e),this}removeLevel(e){const r=this.levels;for(let n=0;n<r.length;n++)if(r[n].distance===e){const i=r.splice(n,1);return this.remove(i[0].object),!0}return!1}getCurrentLevel(){return this._currentLevel}getObjectForDistance(e){const r=this.levels;if(r.length>0){let n,i;for(n=1,i=r.length;n<i;n++){let a=r[n].distance;if(r[n].object.visible&&(a-=a*r[n].hysteresis),e<a)break}return r[n-1].object}return null}raycast(e,r){if(this.levels.length>0){CV.setFromMatrixPosition(this.matrixWorld);const i=e.ray.origin.distanceTo(CV);this.getObjectForDistance(i).raycast(e,r)}}update(e){const r=this.levels;if(r.length>1){CV.setFromMatrixPosition(e.matrixWorld),xIe.setFromMatrixPosition(this.matrixWorld);const n=CV.distanceTo(xIe)/e.zoom;r[0].object.visible=!0;let i,a;for(i=1,a=r.length;i<a;i++){let o=r[i].distance;if(r[i].object.visible&&(o-=o*r[i].hysteresis),n>=o)r[i-1].object.visible=!1,r[i].object.visible=!0;else break}for(this._currentLevel=i-1;i<a;i++)r[i].object.visible=!1}}toJSON(e){const r=super.toJSON(e);this.autoUpdate===!1&&(r.object.autoUpdate=!1),r.object.levels=[];const n=this.levels;for(let i=0,a=n.length;i<a;i++){const o=n[i];r.object.levels.push({object:o.object.uuid,distance:o.distance,hysteresis:o.hysteresis})}return r}}const _Ie=new oi,wIe=new dh,SIe=new dh,_Xt=new oi,TIe=new Rc,MV=new oi,Aae=new Mb,EIe=new Rc,Cae=new r6;class K$e extends hc{constructor(e,r){super(e,r),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=Rpe,this.bindMatrix=new Rc,this.bindMatrixInverse=new Rc,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const e=this.geometry;this.boundingBox===null&&(this.boundingBox=new xg),this.boundingBox.makeEmpty();const r=e.getAttribute("position");for(let n=0;n<r.count;n++)this.getVertexPosition(n,MV),this.boundingBox.expandByPoint(MV)}computeBoundingSphere(){const e=this.geometry;this.boundingSphere===null&&(this.boundingSphere=new Mb),this.boundingSphere.makeEmpty();const r=e.getAttribute("position");for(let n=0;n<r.count;n++)this.getVertexPosition(n,MV),this.boundingSphere.expandByPoint(MV)}copy(e,r){return super.copy(e,r),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}raycast(e,r){const n=this.material,i=this.matrixWorld;n!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),Aae.copy(this.boundingSphere),Aae.applyMatrix4(i),e.ray.intersectsSphere(Aae)!==!1&&(EIe.copy(i).invert(),Cae.copy(e.ray).applyMatrix4(EIe),!(this.boundingBox!==null&&Cae.intersectsBox(this.boundingBox)===!1)&&this._computeIntersections(e,r,Cae)))}getVertexPosition(e,r){return super.getVertexPosition(e,r),this.applyBoneTransform(e,r),r}bind(e,r){this.skeleton=e,r===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),r=this.matrixWorld),this.bindMatrix.copy(r),this.bindMatrixInverse.copy(r).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new dh,r=this.geometry.attributes.skinWeight;for(let n=0,i=r.count;n<i;n++){e.fromBufferAttribute(r,n);const a=1/e.manhattanLength();a!==1/0?e.multiplyScalar(a):e.set(1,0,0,0),r.setXYZW(n,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode===Rpe?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===C$e?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(e,r){const n=this.skeleton,i=this.geometry;wIe.fromBufferAttribute(i.attributes.skinIndex,e),SIe.fromBufferAttribute(i.attributes.skinWeight,e),_Ie.copy(r).applyMatrix4(this.bindMatrix),r.set(0,0,0);for(let a=0;a<4;a++){const o=SIe.getComponent(a);if(o!==0){const s=wIe.getComponent(a);TIe.multiplyMatrices(n.bones[s].matrixWorld,n.boneInverses[s]),r.addScaledVector(_Xt.copy(_Ie).applyMatrix4(TIe),o)}}return r.applyMatrix4(this.bindMatrixInverse)}}class Cye extends Hp{constructor(){super(),this.isBone=!0,this.type="Bone"}}class $y extends Fg{constructor(e=null,r=1,n=1,i,a,o,s,d,b=Mp,L=Mp,B,V){super(null,o,s,d,b,L,i,a,B,V),this.isDataTexture=!0,this.image={data:e,width:r,height:n},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const AIe=new Rc,wXt=new Rc;class XX{constructor(e=[],r=[]){this.uuid=lE(),this.bones=e.slice(0),this.boneInverses=r,this.boneMatrices=null,this.boneTexture=null,this.init()}init(){const e=this.bones,r=this.boneInverses;if(this.boneMatrices=new Float32Array(e.length*16),r.length===0)this.calculateInverses();else if(e.length!==r.length){console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let n=0,i=this.bones.length;n<i;n++)this.boneInverses.push(new Rc)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,r=this.bones.length;e<r;e++){const n=new Rc;this.bones[e]&&n.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(n)}}pose(){for(let e=0,r=this.bones.length;e<r;e++){const n=this.bones[e];n&&n.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,r=this.bones.length;e<r;e++){const n=this.bones[e];n&&(n.parent&&n.parent.isBone?(n.matrix.copy(n.parent.matrixWorld).invert(),n.matrix.multiply(n.matrixWorld)):n.matrix.copy(n.matrixWorld),n.matrix.decompose(n.position,n.quaternion,n.scale))}}update(){const e=this.bones,r=this.boneInverses,n=this.boneMatrices,i=this.boneTexture;for(let a=0,o=e.length;a<o;a++){const s=e[a]?e[a].matrixWorld:wXt;AIe.multiplyMatrices(s,r[a]),AIe.toArray(n,a*16)}i!==null&&(i.needsUpdate=!0)}clone(){return new XX(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(this.bones.length*4);e=Math.ceil(e/4)*4,e=Math.max(e,4);const r=new Float32Array(e*e*4);r.set(this.boneMatrices);const n=new $y(r,e,e,Rp,mp);return n.needsUpdate=!0,this.boneMatrices=r,this.boneTexture=n,this}getBoneByName(e){for(let r=0,n=this.bones.length;r<n;r++){const i=this.bones[r];if(i.name===e)return i}}dispose(){this.boneTexture!==null&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,r){this.uuid=e.uuid;for(let n=0,i=e.bones.length;n<i;n++){const a=e.bones[n];let o=r[a];o===void 0&&(console.warn("THREE.Skeleton: No bone found with UUID:",a),o=new Cye),this.bones.push(o),this.boneInverses.push(new Rc().fromArray(e.boneInverses[n]))}return this.init(),this}toJSON(){const e={metadata:{version:4.7,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;const r=this.bones,n=this.boneInverses;for(let i=0,a=r.length;i<a;i++){const o=r[i];e.bones.push(o.uuid);const s=n[i];e.boneInverses.push(s.toArray())}return e}}class _8 extends Kh{constructor(e,r,n,i=1){super(e,r,n),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=i}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){const e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}const HO=new Rc,CIe=new Rc,RV=[],MIe=new xg,SXt=new Rc,ez=new hc,tz=new Mb;class J$e extends hc{constructor(e,r,n){super(e,r),this.isInstancedMesh=!0,this.instanceMatrix=new _8(new Float32Array(n*16),16),this.instanceColor=null,this.morphTexture=null,this.count=n,this.boundingBox=null,this.boundingSphere=null;for(let i=0;i<n;i++)this.setMatrixAt(i,SXt)}computeBoundingBox(){const e=this.geometry,r=this.count;this.boundingBox===null&&(this.boundingBox=new xg),e.boundingBox===null&&e.computeBoundingBox(),this.boundingBox.makeEmpty();for(let n=0;n<r;n++)this.getMatrixAt(n,HO),MIe.copy(e.boundingBox).applyMatrix4(HO),this.boundingBox.union(MIe)}computeBoundingSphere(){const e=this.geometry,r=this.count;this.boundingSphere===null&&(this.boundingSphere=new Mb),e.boundingSphere===null&&e.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let n=0;n<r;n++)this.getMatrixAt(n,HO),tz.copy(e.boundingSphere).applyMatrix4(HO),this.boundingSphere.union(tz)}copy(e,r){return super.copy(e,r),this.instanceMatrix.copy(e.instanceMatrix),e.morphTexture!==null&&(this.morphTexture=e.morphTexture.clone()),e.instanceColor!==null&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}getColorAt(e,r){r.fromArray(this.instanceColor.array,e*3)}getMatrixAt(e,r){r.fromArray(this.instanceMatrix.array,e*16)}getMorphAt(e,r){const n=r.morphTargetInfluences,i=this.morphTexture.source.data.data,a=n.length+1,o=e*a+1;for(let s=0;s<n.length;s++)n[s]=i[o+s]}raycast(e,r){const n=this.matrixWorld,i=this.count;if(ez.geometry=this.geometry,ez.material=this.material,ez.material!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),tz.copy(this.boundingSphere),tz.applyMatrix4(n),e.ray.intersectsSphere(tz)!==!1))for(let a=0;a<i;a++){this.getMatrixAt(a,HO),CIe.multiplyMatrices(n,HO),ez.matrixWorld=CIe,ez.raycast(e,RV);for(let o=0,s=RV.length;o<s;o++){const d=RV[o];d.instanceId=a,d.object=this,r.push(d)}RV.length=0}}setColorAt(e,r){this.instanceColor===null&&(this.instanceColor=new _8(new Float32Array(this.instanceMatrix.count*3).fill(1),3)),r.toArray(this.instanceColor.array,e*3)}setMatrixAt(e,r){r.toArray(this.instanceMatrix.array,e*16)}setMorphAt(e,r){const n=r.morphTargetInfluences,i=n.length+1;this.morphTexture===null&&(this.morphTexture=new $y(new Float32Array(i*this.count),i,this.count,Dk,mp));const a=this.morphTexture.source.data.data;let o=0;for(let b=0;b<n.length;b++)o+=n[b];const s=this.geometry.morphTargetsRelative?1:1-o,d=i*e;a[d]=s,a.set(n,d+1)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"}),this.morphTexture!==null&&(this.morphTexture.dispose(),this.morphTexture=null)}}const Mae=new oi,TXt=new oi,EXt=new gh;let PC=class{constructor(e=new oi(1,0,0),r=0){this.isPlane=!0,this.normal=e,this.constant=r}set(e,r){return this.normal.copy(e),this.constant=r,this}setComponents(e,r,n,i){return this.normal.set(e,r,n),this.constant=i,this}setFromNormalAndCoplanarPoint(e,r){return this.normal.copy(e),this.constant=-r.dot(this.normal),this}setFromCoplanarPoints(e,r,n){const i=Mae.subVectors(n,r).cross(TXt.subVectors(e,r)).normalize();return this.setFromNormalAndCoplanarPoint(i,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,r){return r.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,r){const n=e.delta(Mae),i=this.normal.dot(n);if(i===0)return this.distanceToPoint(e.start)===0?r.copy(e.start):null;const a=-(e.start.dot(this.normal)+this.constant)/i;return a<0||a>1?null:r.copy(e.start).addScaledVector(n,a)}intersectsLine(e){const r=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return r<0&&n>0||n<0&&r>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,r){const n=r||EXt.getNormalMatrix(e),i=this.coplanarPoint(Mae).applyMatrix4(e),a=this.normal.applyMatrix3(n).normalize();return this.constant=-i.dot(a),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}};const yD=new Mb,AXt=new sl(.5,.5),kV=new oi;class gF{constructor(e=new PC,r=new PC,n=new PC,i=new PC,a=new PC,o=new PC){this.planes=[e,r,n,i,a,o]}set(e,r,n,i,a,o){const s=this.planes;return s[0].copy(e),s[1].copy(r),s[2].copy(n),s[3].copy(i),s[4].copy(a),s[5].copy(o),this}copy(e){const r=this.planes;for(let n=0;n<6;n++)r[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e,r=tE,n=!1){const i=this.planes,a=e.elements,o=a[0],s=a[1],d=a[2],b=a[3],L=a[4],B=a[5],V=a[6],X=a[7],ie=a[8],de=a[9],ae=a[10],U=a[11],ve=a[12],Se=a[13],Pe=a[14],Me=a[15];if(i[0].setComponents(b-o,X-L,U-ie,Me-ve).normalize(),i[1].setComponents(b+o,X+L,U+ie,Me+ve).normalize(),i[2].setComponents(b+s,X+B,U+de,Me+Se).normalize(),i[3].setComponents(b-s,X-B,U-de,Me-Se).normalize(),n)i[4].setComponents(d,V,ae,Pe).normalize(),i[5].setComponents(b-d,X-V,U-ae,Me-Pe).normalize();else if(i[4].setComponents(b-d,X-V,U-ae,Me-Pe).normalize(),r===tE)i[5].setComponents(b+d,X+V,U+ae,Me+Pe).normalize();else if(r===g8)i[5].setComponents(d,V,ae,Pe).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+r);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),yD.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const r=e.geometry;r.boundingSphere===null&&r.computeBoundingSphere(),yD.copy(r.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(yD)}intersectsSprite(e){yD.center.set(0,0,0);const r=AXt.distanceTo(e.center);return yD.radius=.7071067811865476+r,yD.applyMatrix4(e.matrixWorld),this.intersectsSphere(yD)}intersectsSphere(e){const r=this.planes,n=e.center,i=-e.radius;for(let a=0;a<6;a++)if(r[a].distanceToPoint(n)<i)return!1;return!0}intersectsBox(e){const r=this.planes;for(let n=0;n<6;n++){const i=r[n];if(kV.x=i.normal.x>0?e.max.x:e.min.x,kV.y=i.normal.y>0?e.max.y:e.min.y,kV.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(kV)<0)return!1}return!0}containsPoint(e){const r=this.planes;for(let n=0;n<6;n++)if(r[n].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}const o5=new Rc,s5=new gF;class ZX{constructor(){this.coordinateSystem=tE}intersectsObject(e,r){if(!r.isArrayCamera||r.cameras.length===0)return!1;for(let n=0;n<r.cameras.length;n++){const i=r.cameras[n];if(o5.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse),s5.setFromProjectionMatrix(o5,i.coordinateSystem,i.reversedDepth),s5.intersectsObject(e))return!0}return!1}intersectsSprite(e,r){if(!r||!r.cameras||r.cameras.length===0)return!1;for(let n=0;n<r.cameras.length;n++){const i=r.cameras[n];if(o5.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse),s5.setFromProjectionMatrix(o5,i.coordinateSystem,i.reversedDepth),s5.intersectsSprite(e))return!0}return!1}intersectsSphere(e,r){if(!r||!r.cameras||r.cameras.length===0)return!1;for(let n=0;n<r.cameras.length;n++){const i=r.cameras[n];if(o5.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse),s5.setFromProjectionMatrix(o5,i.coordinateSystem,i.reversedDepth),s5.intersectsSphere(e))return!0}return!1}intersectsBox(e,r){if(!r||!r.cameras||r.cameras.length===0)return!1;for(let n=0;n<r.cameras.length;n++){const i=r.cameras[n];if(o5.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse),s5.setFromProjectionMatrix(o5,i.coordinateSystem,i.reversedDepth),s5.intersectsBox(e))return!0}return!1}containsPoint(e,r){if(!r||!r.cameras||r.cameras.length===0)return!1;for(let n=0;n<r.cameras.length;n++){const i=r.cameras[n];if(o5.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse),s5.setFromProjectionMatrix(o5,i.coordinateSystem,i.reversedDepth),s5.containsPoint(e))return!0}return!1}clone(){return new ZX}}function Rae(t,e){return t-e}function CXt(t,e){return t.z-e.z}function MXt(t,e){return e.z-t.z}class RXt{constructor(){this.index=0,this.pool=[],this.list=[]}push(e,r,n,i){const a=this.pool,o=this.list;this.index>=a.length&&a.push({start:-1,count:-1,z:-1,index:-1});const s=a[this.index];o.push(s),this.index++,s.start=e,s.count=r,s.z=n,s.index=i}reset(){this.list.length=0,this.index=0}}const LS=new Rc,kXt=new Wu(1,1,1),RIe=new gF,IXt=new ZX,IV=new xg,bD=new Mb,rz=new oi,kIe=new oi,PXt=new oi,kae=new RXt,Nw=new hc,PV=[];function DXt(t,e,r=0){const n=e.itemSize;if(t.isInterleavedBufferAttribute||t.array.constructor!==e.array.constructor){const i=t.count;for(let a=0;a<i;a++)for(let o=0;o<n;o++)e.setComponent(a+r,o,t.getComponent(a,o))}else e.array.set(t.array,r*n);e.needsUpdate=!0}function xD(t,e){if(t.constructor!==e.constructor){const r=Math.min(t.length,e.length);for(let n=0;n<r;n++)e[n]=t[n]}else{const r=Math.min(t.length,e.length);e.set(new t.constructor(t.buffer,0,r))}}class Q$e extends hc{constructor(e,r,n=r*2,i){super(new Jf,i),this.isBatchedMesh=!0,this.perObjectFrustumCulled=!0,this.sortObjects=!0,this.boundingBox=null,this.boundingSphere=null,this.customSort=null,this._instanceInfo=[],this._geometryInfo=[],this._availableInstanceIds=[],this._availableGeometryIds=[],this._nextIndexStart=0,this._nextVertexStart=0,this._geometryCount=0,this._visibilityChanged=!0,this._geometryInitialized=!1,this._maxInstanceCount=e,this._maxVertexCount=r,this._maxIndexCount=n,this._multiDrawCounts=new Int32Array(e),this._multiDrawStarts=new Int32Array(e),this._multiDrawCount=0,this._multiDrawInstances=null,this._matricesTexture=null,this._indirectTexture=null,this._colorsTexture=null,this._initMatricesTexture(),this._initIndirectTexture()}get maxInstanceCount(){return this._maxInstanceCount}get instanceCount(){return this._instanceInfo.length-this._availableInstanceIds.length}get unusedVertexCount(){return this._maxVertexCount-this._nextVertexStart}get unusedIndexCount(){return this._maxIndexCount-this._nextIndexStart}_initMatricesTexture(){let e=Math.sqrt(this._maxInstanceCount*4);e=Math.ceil(e/4)*4,e=Math.max(e,4);const r=new Float32Array(e*e*4),n=new $y(r,e,e,Rp,mp);this._matricesTexture=n}_initIndirectTexture(){let e=Math.sqrt(this._maxInstanceCount);e=Math.ceil(e);const r=new Uint32Array(e*e),n=new $y(r,e,e,pF,q2);this._indirectTexture=n}_initColorsTexture(){let e=Math.sqrt(this._maxInstanceCount);e=Math.ceil(e);const r=new Float32Array(e*e*4).fill(1),n=new $y(r,e,e,Rp,mp);n.colorSpace=xv.workingColorSpace,this._colorsTexture=n}_initializeGeometry(e){const r=this.geometry,n=this._maxVertexCount,i=this._maxIndexCount;if(this._geometryInitialized===!1){for(const a in e.attributes){const o=e.getAttribute(a),{array:s,itemSize:d,normalized:b}=o,L=new s.constructor(n*d),B=new Kh(L,d,b);r.setAttribute(a,B)}if(e.getIndex()!==null){const a=n>65535?new Uint32Array(i):new Uint16Array(i);r.setIndex(new Kh(a,1))}this._geometryInitialized=!0}}_validateGeometry(e){const r=this.geometry;if(!!e.getIndex()!=!!r.getIndex())throw new Error('THREE.BatchedMesh: All geometries must consistently have "index".');for(const n in r.attributes){if(!e.hasAttribute(n))throw new Error(`THREE.BatchedMesh: Added geometry missing "${n}". All geometries must have consistent attributes.`);const i=e.getAttribute(n),a=r.getAttribute(n);if(i.itemSize!==a.itemSize||i.normalized!==a.normalized)throw new Error("THREE.BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}validateInstanceId(e){const r=this._instanceInfo;if(e<0||e>=r.length||r[e].active===!1)throw new Error(`THREE.BatchedMesh: Invalid instanceId ${e}. Instance is either out of range or has been deleted.`)}validateGeometryId(e){const r=this._geometryInfo;if(e<0||e>=r.length||r[e].active===!1)throw new Error(`THREE.BatchedMesh: Invalid geometryId ${e}. Geometry is either out of range or has been deleted.`)}setCustomSort(e){return this.customSort=e,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new xg);const e=this.boundingBox,r=this._instanceInfo;e.makeEmpty();for(let n=0,i=r.length;n<i;n++){if(r[n].active===!1)continue;const a=r[n].geometryIndex;this.getMatrixAt(n,LS),this.getBoundingBoxAt(a,IV).applyMatrix4(LS),e.union(IV)}}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Mb);const e=this.boundingSphere,r=this._instanceInfo;e.makeEmpty();for(let n=0,i=r.length;n<i;n++){if(r[n].active===!1)continue;const a=r[n].geometryIndex;this.getMatrixAt(n,LS),this.getBoundingSphereAt(a,bD).applyMatrix4(LS),e.union(bD)}}addInstance(e){if(this._instanceInfo.length>=this.maxInstanceCount&&this._availableInstanceIds.length===0)throw new Error("THREE.BatchedMesh: Maximum item count reached.");const n={visible:!0,active:!0,geometryIndex:e};let i=null;this._availableInstanceIds.length>0?(this._availableInstanceIds.sort(Rae),i=this._availableInstanceIds.shift(),this._instanceInfo[i]=n):(i=this._instanceInfo.length,this._instanceInfo.push(n));const a=this._matricesTexture;LS.identity().toArray(a.image.data,i*16),a.needsUpdate=!0;const o=this._colorsTexture;return o&&(kXt.toArray(o.image.data,i*4),o.needsUpdate=!0),this._visibilityChanged=!0,i}addGeometry(e,r=-1,n=-1){this._initializeGeometry(e),this._validateGeometry(e);const i={vertexStart:-1,vertexCount:-1,reservedVertexCount:-1,indexStart:-1,indexCount:-1,reservedIndexCount:-1,start:-1,count:-1,boundingBox:null,boundingSphere:null,active:!0},a=this._geometryInfo;i.vertexStart=this._nextVertexStart,i.reservedVertexCount=r===-1?e.getAttribute("position").count:r;const o=e.getIndex();if(o!==null&&(i.indexStart=this._nextIndexStart,i.reservedIndexCount=n===-1?o.count:n),i.indexStart!==-1&&i.indexStart+i.reservedIndexCount>this._maxIndexCount||i.vertexStart+i.reservedVertexCount>this._maxVertexCount)throw new Error("THREE.BatchedMesh: Reserved space request exceeds the maximum buffer size.");let d;return this._availableGeometryIds.length>0?(this._availableGeometryIds.sort(Rae),d=this._availableGeometryIds.shift(),a[d]=i):(d=this._geometryCount,this._geometryCount++,a.push(i)),this.setGeometryAt(d,e),this._nextIndexStart=i.indexStart+i.reservedIndexCount,this._nextVertexStart=i.vertexStart+i.reservedVertexCount,d}setGeometryAt(e,r){if(e>=this._geometryCount)throw new Error("THREE.BatchedMesh: Maximum geometry count reached.");this._validateGeometry(r);const n=this.geometry,i=n.getIndex()!==null,a=n.getIndex(),o=r.getIndex(),s=this._geometryInfo[e];if(i&&o.count>s.reservedIndexCount||r.attributes.position.count>s.reservedVertexCount)throw new Error("THREE.BatchedMesh: Reserved space not large enough for provided geometry.");const d=s.vertexStart,b=s.reservedVertexCount;s.vertexCount=r.getAttribute("position").count;for(const L in n.attributes){const B=r.getAttribute(L),V=n.getAttribute(L);DXt(B,V,d);const X=B.itemSize;for(let ie=B.count,de=b;ie<de;ie++){const ae=d+ie;for(let U=0;U<X;U++)V.setComponent(ae,U,0)}V.needsUpdate=!0,V.addUpdateRange(d*X,b*X)}if(i){const L=s.indexStart,B=s.reservedIndexCount;s.indexCount=r.getIndex().count;for(let V=0;V<o.count;V++)a.setX(L+V,d+o.getX(V));for(let V=o.count,X=B;V<X;V++)a.setX(L+V,d);a.needsUpdate=!0,a.addUpdateRange(L,s.reservedIndexCount)}return s.start=i?s.indexStart:s.vertexStart,s.count=i?s.indexCount:s.vertexCount,s.boundingBox=null,r.boundingBox!==null&&(s.boundingBox=r.boundingBox.clone()),s.boundingSphere=null,r.boundingSphere!==null&&(s.boundingSphere=r.boundingSphere.clone()),this._visibilityChanged=!0,e}deleteGeometry(e){const r=this._geometryInfo;if(e>=r.length||r[e].active===!1)return this;const n=this._instanceInfo;for(let i=0,a=n.length;i<a;i++)n[i].active&&n[i].geometryIndex===e&&this.deleteInstance(i);return r[e].active=!1,this._availableGeometryIds.push(e),this._visibilityChanged=!0,this}deleteInstance(e){return this.validateInstanceId(e),this._instanceInfo[e].active=!1,this._availableInstanceIds.push(e),this._visibilityChanged=!0,this}optimize(){let e=0,r=0;const n=this._geometryInfo,i=n.map((o,s)=>s).sort((o,s)=>n[o].vertexStart-n[s].vertexStart),a=this.geometry;for(let o=0,s=n.length;o<s;o++){const d=i[o],b=n[d];if(b.active!==!1){if(a.index!==null){if(b.indexStart!==r){const{indexStart:L,vertexStart:B,reservedIndexCount:V}=b,X=a.index,ie=X.array,de=e-B;for(let ae=L;ae<L+V;ae++)ie[ae]=ie[ae]+de;X.array.copyWithin(r,L,L+V),X.addUpdateRange(r,V),b.indexStart=r}r+=b.reservedIndexCount}if(b.vertexStart!==e){const{vertexStart:L,reservedVertexCount:B}=b,V=a.attributes;for(const X in V){const ie=V[X],{array:de,itemSize:ae}=ie;de.copyWithin(e*ae,L*ae,(L+B)*ae),ie.addUpdateRange(e*ae,B*ae)}b.vertexStart=e}e+=b.reservedVertexCount,b.start=a.index?b.indexStart:b.vertexStart,this._nextIndexStart=a.index?b.indexStart+b.reservedIndexCount:0,this._nextVertexStart=b.vertexStart+b.reservedVertexCount}}return this}getBoundingBoxAt(e,r){if(e>=this._geometryCount)return null;const n=this.geometry,i=this._geometryInfo[e];if(i.boundingBox===null){const a=new xg,o=n.index,s=n.attributes.position;for(let d=i.start,b=i.start+i.count;d<b;d++){let L=d;o&&(L=o.getX(L)),a.expandByPoint(rz.fromBufferAttribute(s,L))}i.boundingBox=a}return r.copy(i.boundingBox),r}getBoundingSphereAt(e,r){if(e>=this._geometryCount)return null;const n=this.geometry,i=this._geometryInfo[e];if(i.boundingSphere===null){const a=new Mb;this.getBoundingBoxAt(e,IV),IV.getCenter(a.center);const o=n.index,s=n.attributes.position;let d=0;for(let b=i.start,L=i.start+i.count;b<L;b++){let B=b;o&&(B=o.getX(B)),rz.fromBufferAttribute(s,B),d=Math.max(d,a.center.distanceToSquared(rz))}a.radius=Math.sqrt(d),i.boundingSphere=a}return r.copy(i.boundingSphere),r}setMatrixAt(e,r){this.validateInstanceId(e);const n=this._matricesTexture,i=this._matricesTexture.image.data;return r.toArray(i,e*16),n.needsUpdate=!0,this}getMatrixAt(e,r){return this.validateInstanceId(e),r.fromArray(this._matricesTexture.image.data,e*16)}setColorAt(e,r){return this.validateInstanceId(e),this._colorsTexture===null&&this._initColorsTexture(),r.toArray(this._colorsTexture.image.data,e*4),this._colorsTexture.needsUpdate=!0,this}getColorAt(e,r){return this.validateInstanceId(e),r.fromArray(this._colorsTexture.image.data,e*4)}setVisibleAt(e,r){return this.validateInstanceId(e),this._instanceInfo[e].visible===r?this:(this._instanceInfo[e].visible=r,this._visibilityChanged=!0,this)}getVisibleAt(e){return this.validateInstanceId(e),this._instanceInfo[e].visible}setGeometryIdAt(e,r){return this.validateInstanceId(e),this.validateGeometryId(r),this._instanceInfo[e].geometryIndex=r,this}getGeometryIdAt(e){return this.validateInstanceId(e),this._instanceInfo[e].geometryIndex}getGeometryRangeAt(e,r={}){this.validateGeometryId(e);const n=this._geometryInfo[e];return r.vertexStart=n.vertexStart,r.vertexCount=n.vertexCount,r.reservedVertexCount=n.reservedVertexCount,r.indexStart=n.indexStart,r.indexCount=n.indexCount,r.reservedIndexCount=n.reservedIndexCount,r.start=n.start,r.count=n.count,r}setInstanceCount(e){const r=this._availableInstanceIds,n=this._instanceInfo;for(r.sort(Rae);r[r.length-1]===n.length-1;)n.pop(),r.pop();if(e<n.length)throw new Error(`BatchedMesh: Instance ids outside the range ${e} are being used. Cannot shrink instance count.`);const i=new Int32Array(e),a=new Int32Array(e);xD(this._multiDrawCounts,i),xD(this._multiDrawStarts,a),this._multiDrawCounts=i,this._multiDrawStarts=a,this._maxInstanceCount=e;const o=this._indirectTexture,s=this._matricesTexture,d=this._colorsTexture;o.dispose(),this._initIndirectTexture(),xD(o.image.data,this._indirectTexture.image.data),s.dispose(),this._initMatricesTexture(),xD(s.image.data,this._matricesTexture.image.data),d&&(d.dispose(),this._initColorsTexture(),xD(d.image.data,this._colorsTexture.image.data))}setGeometrySize(e,r){const n=[...this._geometryInfo].filter(s=>s.active);if(Math.max(...n.map(s=>s.vertexStart+s.reservedVertexCount))>e)throw new Error(`BatchedMesh: Geometry vertex values are being used outside the range ${r}. Cannot shrink further.`);if(this.geometry.index&&Math.max(...n.map(d=>d.indexStart+d.reservedIndexCount))>r)throw new Error(`BatchedMesh: Geometry index values are being used outside the range ${r}. Cannot shrink further.`);const a=this.geometry;a.dispose(),this._maxVertexCount=e,this._maxIndexCount=r,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new Jf,this._initializeGeometry(a));const o=this.geometry;a.index&&xD(a.index.array,o.index.array);for(const s in a.attributes)xD(a.attributes[s].array,o.attributes[s].array)}raycast(e,r){const n=this._instanceInfo,i=this._geometryInfo,a=this.matrixWorld,o=this.geometry;Nw.material=this.material,Nw.geometry.index=o.index,Nw.geometry.attributes=o.attributes,Nw.geometry.boundingBox===null&&(Nw.geometry.boundingBox=new xg),Nw.geometry.boundingSphere===null&&(Nw.geometry.boundingSphere=new Mb);for(let s=0,d=n.length;s<d;s++){if(!n[s].visible||!n[s].active)continue;const b=n[s].geometryIndex,L=i[b];Nw.geometry.setDrawRange(L.start,L.count),this.getMatrixAt(s,Nw.matrixWorld).premultiply(a),this.getBoundingBoxAt(b,Nw.geometry.boundingBox),this.getBoundingSphereAt(b,Nw.geometry.boundingSphere),Nw.raycast(e,PV);for(let B=0,V=PV.length;B<V;B++){const X=PV[B];X.object=this,X.batchId=s,r.push(X)}PV.length=0}Nw.material=null,Nw.geometry.index=null,Nw.geometry.attributes={},Nw.geometry.setDrawRange(0,1/0)}copy(e){return super.copy(e),this.geometry=e.geometry.clone(),this.perObjectFrustumCulled=e.perObjectFrustumCulled,this.sortObjects=e.sortObjects,this.boundingBox=e.boundingBox!==null?e.boundingBox.clone():null,this.boundingSphere=e.boundingSphere!==null?e.boundingSphere.clone():null,this._geometryInfo=e._geometryInfo.map(r=>({...r,boundingBox:r.boundingBox!==null?r.boundingBox.clone():null,boundingSphere:r.boundingSphere!==null?r.boundingSphere.clone():null})),this._instanceInfo=e._instanceInfo.map(r=>({...r})),this._availableInstanceIds=e._availableInstanceIds.slice(),this._availableGeometryIds=e._availableGeometryIds.slice(),this._nextIndexStart=e._nextIndexStart,this._nextVertexStart=e._nextVertexStart,this._geometryCount=e._geometryCount,this._maxInstanceCount=e._maxInstanceCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._indirectTexture=e._indirectTexture.clone(),this._indirectTexture.image.data=this._indirectTexture.image.data.slice(),this._matricesTexture=e._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.data.slice(),this._colorsTexture!==null&&(this._colorsTexture=e._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.data.slice()),this}dispose(){this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._indirectTexture.dispose(),this._indirectTexture=null,this._colorsTexture!==null&&(this._colorsTexture.dispose(),this._colorsTexture=null)}onBeforeRender(e,r,n,i,a){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const o=i.getIndex(),s=o===null?1:o.array.BYTES_PER_ELEMENT,d=this._instanceInfo,b=this._multiDrawStarts,L=this._multiDrawCounts,B=this._geometryInfo,V=this.perObjectFrustumCulled,X=this._indirectTexture,ie=X.image.data,de=n.isArrayCamera?IXt:RIe;V&&!n.isArrayCamera&&(LS.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse).multiply(this.matrixWorld),RIe.setFromProjectionMatrix(LS,n.coordinateSystem,n.reversedDepth));let ae=0;if(this.sortObjects){LS.copy(this.matrixWorld).invert(),rz.setFromMatrixPosition(n.matrixWorld).applyMatrix4(LS),kIe.set(0,0,-1).transformDirection(n.matrixWorld).transformDirection(LS);for(let Se=0,Pe=d.length;Se<Pe;Se++)if(d[Se].visible&&d[Se].active){const Me=d[Se].geometryIndex;this.getMatrixAt(Se,LS),this.getBoundingSphereAt(Me,bD).applyMatrix4(LS);let Ie=!1;if(V&&(Ie=!de.intersectsSphere(bD,n)),!Ie){const Ve=B[Me],Ze=PXt.subVectors(bD.center,rz).dot(kIe);kae.push(Ve.start,Ve.count,Ze,Se)}}const U=kae.list,ve=this.customSort;ve===null?U.sort(a.transparent?MXt:CXt):ve.call(this,U,n);for(let Se=0,Pe=U.length;Se<Pe;Se++){const Me=U[Se];b[ae]=Me.start*s,L[ae]=Me.count,ie[ae]=Me.index,ae++}kae.reset()}else for(let U=0,ve=d.length;U<ve;U++)if(d[U].visible&&d[U].active){const Se=d[U].geometryIndex;let Pe=!1;if(V&&(this.getMatrixAt(U,LS),this.getBoundingSphereAt(Se,bD).applyMatrix4(LS),Pe=!de.intersectsSphere(bD,n)),!Pe){const Me=B[Se];b[ae]=Me.start*s,L[ae]=Me.count,ie[ae]=U,ae++}}X.needsUpdate=!0,this._multiDrawCount=ae,this._visibilityChanged=!1}onBeforeShadow(e,r,n,i,a,o){this.onBeforeRender(e,null,i,a,o)}}class Ww extends q_{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new Wu(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}}const SW=new oi,TW=new oi,IIe=new Rc,nz=new r6,DV=new Mb,Iae=new oi,PIe=new oi;let Cp=class extends Hp{constructor(e=new Jf,r=new Ww){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=r,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(e,r){return super.copy(e,r),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(e.index===null){const r=e.attributes.position,n=[0];for(let i=1,a=r.count;i<a;i++)SW.fromBufferAttribute(r,i-1),TW.fromBufferAttribute(r,i),n[i]=n[i-1],n[i]+=SW.distanceTo(TW);e.setAttribute("lineDistance",new Dc(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,r){const n=this.geometry,i=this.matrixWorld,a=e.params.Line.threshold,o=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),DV.copy(n.boundingSphere),DV.applyMatrix4(i),DV.radius+=a,e.ray.intersectsSphere(DV)===!1)return;IIe.copy(i).invert(),nz.copy(e.ray).applyMatrix4(IIe);const s=a/((this.scale.x+this.scale.y+this.scale.z)/3),d=s*s,b=this.isLineSegments?2:1,L=n.index,V=n.attributes.position;if(L!==null){const X=Math.max(0,o.start),ie=Math.min(L.count,o.start+o.count);for(let de=X,ae=ie-1;de<ae;de+=b){const U=L.getX(de),ve=L.getX(de+1),Se=LV(this,e,nz,d,U,ve,de);Se&&r.push(Se)}if(this.isLineLoop){const de=L.getX(ie-1),ae=L.getX(X),U=LV(this,e,nz,d,de,ae,ie-1);U&&r.push(U)}}else{const X=Math.max(0,o.start),ie=Math.min(V.count,o.start+o.count);for(let de=X,ae=ie-1;de<ae;de+=b){const U=LV(this,e,nz,d,de,de+1,de);U&&r.push(U)}if(this.isLineLoop){const de=LV(this,e,nz,d,ie-1,X,ie-1);de&&r.push(de)}}}updateMorphTargets(){const r=this.geometry.morphAttributes,n=Object.keys(r);if(n.length>0){const i=r[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let a=0,o=i.length;a<o;a++){const s=i[a].name||String(a);this.morphTargetInfluences.push(0),this.morphTargetDictionary[s]=a}}}}};function LV(t,e,r,n,i,a,o){const s=t.geometry.attributes.position;if(SW.fromBufferAttribute(s,i),TW.fromBufferAttribute(s,a),r.distanceSqToSegment(SW,TW,Iae,PIe)>n)return;Iae.applyMatrix4(t.matrixWorld);const b=e.ray.origin.distanceTo(Iae);if(!(b<e.near||b>e.far))return{distance:b,point:PIe.clone().applyMatrix4(t.matrixWorld),index:o,face:null,faceIndex:null,barycoord:null,object:t}}const DIe=new oi,LIe=new oi;class $5 extends Cp{constructor(e,r){super(e,r),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.index===null){const r=e.attributes.position,n=[];for(let i=0,a=r.count;i<a;i+=2)DIe.fromBufferAttribute(r,i),LIe.fromBufferAttribute(r,i+1),n[i]=i===0?0:n[i-1],n[i+1]=n[i]+DIe.distanceTo(LIe);e.setAttribute("lineDistance",new Dc(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class eWe extends Cp{constructor(e,r){super(e,r),this.isLineLoop=!0,this.type="LineLoop"}}class Mye extends q_{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new Wu(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}const OIe=new Rc,Ppe=new r6,OV=new Mb,NV=new oi;class tWe extends Hp{constructor(e=new Jf,r=new Mye){super(),this.isPoints=!0,this.type="Points",this.geometry=e,this.material=r,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(e,r){return super.copy(e,r),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}raycast(e,r){const n=this.geometry,i=this.matrixWorld,a=e.params.Points.threshold,o=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),OV.copy(n.boundingSphere),OV.applyMatrix4(i),OV.radius+=a,e.ray.intersectsSphere(OV)===!1)return;OIe.copy(i).invert(),Ppe.copy(e.ray).applyMatrix4(OIe);const s=a/((this.scale.x+this.scale.y+this.scale.z)/3),d=s*s,b=n.index,B=n.attributes.position;if(b!==null){const V=Math.max(0,o.start),X=Math.min(b.count,o.start+o.count);for(let ie=V,de=X;ie<de;ie++){const ae=b.getX(ie);NV.fromBufferAttribute(B,ae),NIe(NV,ae,d,i,e,r,this)}}else{const V=Math.max(0,o.start),X=Math.min(B.count,o.start+o.count);for(let ie=V,de=X;ie<de;ie++)NV.fromBufferAttribute(B,ie),NIe(NV,ie,d,i,e,r,this)}}updateMorphTargets(){const r=this.geometry.morphAttributes,n=Object.keys(r);if(n.length>0){const i=r[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let a=0,o=i.length;a<o;a++){const s=i[a].name||String(a);this.morphTargetInfluences.push(0),this.morphTargetDictionary[s]=a}}}}}function NIe(t,e,r,n,i,a,o){const s=Ppe.distanceSqToPoint(t);if(s<r){const d=new oi;Ppe.closestPointToPoint(t,d),d.applyMatrix4(n);const b=i.ray.origin.distanceTo(d);if(b<i.near||b>i.far)return;a.push({distance:b,distanceToRay:Math.sqrt(s),point:d,index:e,face:null,faceIndex:null,barycoord:null,object:o})}}class rWe extends Fg{constructor(e,r,n,i,a=vp,o=vp,s,d,b){super(e,r,n,i,a,o,s,d,b),this.isVideoTexture=!0,this.generateMipmaps=!1,this._requestVideoFrameCallbackId=0;const L=this;function B(){L.needsUpdate=!0,L._requestVideoFrameCallbackId=e.requestVideoFrameCallback(B)}"requestVideoFrameCallback"in e&&(this._requestVideoFrameCallbackId=e.requestVideoFrameCallback(B))}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}dispose(){this._requestVideoFrameCallbackId!==0&&this.source.data.cancelVideoFrameCallback(this._requestVideoFrameCallbackId),super.dispose()}}class LXt extends rWe{constructor(e,r,n,i,a,o,s,d){super({},e,r,n,i,a,o,s,d),this.isVideoFrameTexture=!0}update(){}clone(){return new this.constructor().copy(this)}setFrame(e){this.image=e,this.needsUpdate=!0}}class OXt extends Fg{constructor(e,r){super({width:e,height:r}),this.isFramebufferTexture=!0,this.magFilter=Mp,this.minFilter=Mp,this.generateMipmaps=!1,this.needsUpdate=!0}}class KX extends Fg{constructor(e,r,n,i,a,o,s,d,b,L,B,V){super(null,o,s,d,b,L,i,a,B,V),this.isCompressedTexture=!0,this.image={width:r,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class NXt extends KX{constructor(e,r,n,i,a,o){super(e,r,n,a,o),this.isCompressedArrayTexture=!0,this.image.depth=i,this.wrapR=Ng,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class FXt extends KX{constructor(e,r,n){super(void 0,e[0].width,e[0].height,r,n,U5),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class zXt extends Fg{constructor(e,r,n,i,a,o,s,d,b){super(e,r,n,i,a,o,s,d,b),this.isCanvasTexture=!0,this.needsUpdate=!0}}class Rye extends Fg{constructor(e,r,n=q2,i,a,o,s=Mp,d=Mp,b,L=v8,B=1){if(L!==v8&&L!==m8)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");const V={width:e,height:r,depth:B};super(V,i,a,o,s,d,L,n,b),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.source=new wk(Object.assign({},e.image)),this.compareFunction=e.compareFunction,this}toJSON(e){const r=super.toJSON(e);return this.compareFunction!==null&&(r.compareFunction=this.compareFunction),r}}class kye extends Fg{constructor(e=null){super(),this.sourceTexture=e,this.isExternalTexture=!0}copy(e){return super.copy(e),this.sourceTexture=e.sourceTexture,this}}class JX extends Jf{constructor(e=1,r=1,n=4,i=8,a=1){super(),this.type="CapsuleGeometry",this.parameters={radius:e,height:r,capSegments:n,radialSegments:i,heightSegments:a},r=Math.max(0,r),n=Math.max(1,Math.floor(n)),i=Math.max(3,Math.floor(i)),a=Math.max(1,Math.floor(a));const o=[],s=[],d=[],b=[],L=r/2,B=Math.PI/2*e,V=r,X=2*B+V,ie=n*2+a,de=i+1,ae=new oi,U=new oi;for(let ve=0;ve<=ie;ve++){let Se=0,Pe=0,Me=0,Ie=0;if(ve<=n){const Je=ve/n,nt=Je*Math.PI/2;Pe=-L-e*Math.cos(nt),Me=e*Math.sin(nt),Ie=-e*Math.cos(nt),Se=Je*B}else if(ve<=n+a){const Je=(ve-n)/a;Pe=-L+Je*r,Me=e,Ie=0,Se=B+Je*V}else{const Je=(ve-n-a)/n,nt=Je*Math.PI/2;Pe=L+e*Math.sin(nt),Me=e*Math.cos(nt),Ie=e*Math.sin(nt),Se=B+V+Je*B}const Ve=Math.max(0,Math.min(1,Se/X));let Ze=0;ve===0?Ze=.5/i:ve===ie&&(Ze=-.5/i);for(let Je=0;Je<=i;Je++){const nt=Je/i,ut=nt*Math.PI*2,ht=Math.sin(ut),_t=Math.cos(ut);U.x=-Me*_t,U.y=Pe,U.z=Me*ht,s.push(U.x,U.y,U.z),ae.set(-Me*_t,Ie,Me*ht),ae.normalize(),d.push(ae.x,ae.y,ae.z),b.push(nt+Ze,Ve)}if(ve>0){const Je=(ve-1)*de;for(let nt=0;nt<i;nt++){const ut=Je+nt,ht=Je+nt+1,_t=ve*de+nt,Dt=ve*de+nt+1;o.push(ut,ht,_t),o.push(ht,Dt,_t)}}}this.setIndex(o),this.setAttribute("position",new Dc(s,3)),this.setAttribute("normal",new Dc(d,3)),this.setAttribute("uv",new Dc(b,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new JX(e.radius,e.height,e.capSegments,e.radialSegments,e.heightSegments)}}class QX extends Jf{constructor(e=1,r=32,n=0,i=Math.PI*2){super(),this.type="CircleGeometry",this.parameters={radius:e,segments:r,thetaStart:n,thetaLength:i},r=Math.max(3,r);const a=[],o=[],s=[],d=[],b=new oi,L=new sl;o.push(0,0,0),s.push(0,0,1),d.push(.5,.5);for(let B=0,V=3;B<=r;B++,V+=3){const X=n+B/r*i;b.x=e*Math.cos(X),b.y=e*Math.sin(X),o.push(b.x,b.y,b.z),s.push(0,0,1),L.x=(o[V]/e+1)/2,L.y=(o[V+1]/e+1)/2,d.push(L.x,L.y)}for(let B=1;B<=r;B++)a.push(B,B+1,0);this.setIndex(a),this.setAttribute("position",new Dc(o,3)),this.setAttribute("normal",new Dc(s,3)),this.setAttribute("uv",new Dc(d,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new QX(e.radius,e.segments,e.thetaStart,e.thetaLength)}}class Wx extends Jf{constructor(e=1,r=1,n=1,i=32,a=1,o=!1,s=0,d=Math.PI*2){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:r,height:n,radialSegments:i,heightSegments:a,openEnded:o,thetaStart:s,thetaLength:d};const b=this;i=Math.floor(i),a=Math.floor(a);const L=[],B=[],V=[],X=[];let ie=0;const de=[],ae=n/2;let U=0;ve(),o===!1&&(e>0&&Se(!0),r>0&&Se(!1)),this.setIndex(L),this.setAttribute("position",new Dc(B,3)),this.setAttribute("normal",new Dc(V,3)),this.setAttribute("uv",new Dc(X,2));function ve(){const Pe=new oi,Me=new oi;let Ie=0;const Ve=(r-e)/n;for(let Ze=0;Ze<=a;Ze++){const Je=[],nt=Ze/a,ut=nt*(r-e)+e;for(let ht=0;ht<=i;ht++){const _t=ht/i,Dt=_t*d+s,qt=Math.sin(Dt),Lt=Math.cos(Dt);Me.x=ut*qt,Me.y=-nt*n+ae,Me.z=ut*Lt,B.push(Me.x,Me.y,Me.z),Pe.set(qt,Ve,Lt).normalize(),V.push(Pe.x,Pe.y,Pe.z),X.push(_t,1-nt),Je.push(ie++)}de.push(Je)}for(let Ze=0;Ze<i;Ze++)for(let Je=0;Je<a;Je++){const nt=de[Je][Ze],ut=de[Je+1][Ze],ht=de[Je+1][Ze+1],_t=de[Je][Ze+1];(e>0||Je!==0)&&(L.push(nt,ut,_t),Ie+=3),(r>0||Je!==a-1)&&(L.push(ut,ht,_t),Ie+=3)}b.addGroup(U,Ie,0),U+=Ie}function Se(Pe){const Me=ie,Ie=new sl,Ve=new oi;let Ze=0;const Je=Pe===!0?e:r,nt=Pe===!0?1:-1;for(let ht=1;ht<=i;ht++)B.push(0,ae*nt,0),V.push(0,nt,0),X.push(.5,.5),ie++;const ut=ie;for(let ht=0;ht<=i;ht++){const Dt=ht/i*d+s,qt=Math.cos(Dt),Lt=Math.sin(Dt);Ve.x=Je*Lt,Ve.y=ae*nt,Ve.z=Je*qt,B.push(Ve.x,Ve.y,Ve.z),V.push(0,nt,0),Ie.x=qt*.5+.5,Ie.y=Lt*.5*nt+.5,X.push(Ie.x,Ie.y),ie++}for(let ht=0;ht<i;ht++){const _t=Me+ht,Dt=ut+ht;Pe===!0?L.push(Dt,Dt+1,_t):L.push(Dt+1,Dt,_t),Ze+=3}b.addGroup(U,Ze,Pe===!0?1:2),U+=Ze}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Wx(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class yF extends Wx{constructor(e=1,r=1,n=32,i=1,a=!1,o=0,s=Math.PI*2){super(0,e,r,n,i,a,o,s),this.type="ConeGeometry",this.parameters={radius:e,height:r,radialSegments:n,heightSegments:i,openEnded:a,thetaStart:o,thetaLength:s}}static fromJSON(e){return new yF(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class w4 extends Jf{constructor(e=[],r=[],n=1,i=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:r,radius:n,detail:i};const a=[],o=[];s(i),b(n),L(),this.setAttribute("position",new Dc(a,3)),this.setAttribute("normal",new Dc(a.slice(),3)),this.setAttribute("uv",new Dc(o,2)),i===0?this.computeVertexNormals():this.normalizeNormals();function s(ve){const Se=new oi,Pe=new oi,Me=new oi;for(let Ie=0;Ie<r.length;Ie+=3)X(r[Ie+0],Se),X(r[Ie+1],Pe),X(r[Ie+2],Me),d(Se,Pe,Me,ve)}function d(ve,Se,Pe,Me){const Ie=Me+1,Ve=[];for(let Ze=0;Ze<=Ie;Ze++){Ve[Ze]=[];const Je=ve.clone().lerp(Pe,Ze/Ie),nt=Se.clone().lerp(Pe,Ze/Ie),ut=Ie-Ze;for(let ht=0;ht<=ut;ht++)ht===0&&Ze===Ie?Ve[Ze][ht]=Je:Ve[Ze][ht]=Je.clone().lerp(nt,ht/ut)}for(let Ze=0;Ze<Ie;Ze++)for(let Je=0;Je<2*(Ie-Ze)-1;Je++){const nt=Math.floor(Je/2);Je%2===0?(V(Ve[Ze][nt+1]),V(Ve[Ze+1][nt]),V(Ve[Ze][nt])):(V(Ve[Ze][nt+1]),V(Ve[Ze+1][nt+1]),V(Ve[Ze+1][nt]))}}function b(ve){const Se=new oi;for(let Pe=0;Pe<a.length;Pe+=3)Se.x=a[Pe+0],Se.y=a[Pe+1],Se.z=a[Pe+2],Se.normalize().multiplyScalar(ve),a[Pe+0]=Se.x,a[Pe+1]=Se.y,a[Pe+2]=Se.z}function L(){const ve=new oi;for(let Se=0;Se<a.length;Se+=3){ve.x=a[Se+0],ve.y=a[Se+1],ve.z=a[Se+2];const Pe=ae(ve)/2/Math.PI+.5,Me=U(ve)/Math.PI+.5;o.push(Pe,1-Me)}ie(),B()}function B(){for(let ve=0;ve<o.length;ve+=6){const Se=o[ve+0],Pe=o[ve+2],Me=o[ve+4],Ie=Math.max(Se,Pe,Me),Ve=Math.min(Se,Pe,Me);Ie>.9&&Ve<.1&&(Se<.2&&(o[ve+0]+=1),Pe<.2&&(o[ve+2]+=1),Me<.2&&(o[ve+4]+=1))}}function V(ve){a.push(ve.x,ve.y,ve.z)}function X(ve,Se){const Pe=ve*3;Se.x=e[Pe+0],Se.y=e[Pe+1],Se.z=e[Pe+2]}function ie(){const ve=new oi,Se=new oi,Pe=new oi,Me=new oi,Ie=new sl,Ve=new sl,Ze=new sl;for(let Je=0,nt=0;Je<a.length;Je+=9,nt+=6){ve.set(a[Je+0],a[Je+1],a[Je+2]),Se.set(a[Je+3],a[Je+4],a[Je+5]),Pe.set(a[Je+6],a[Je+7],a[Je+8]),Ie.set(o[nt+0],o[nt+1]),Ve.set(o[nt+2],o[nt+3]),Ze.set(o[nt+4],o[nt+5]),Me.copy(ve).add(Se).add(Pe).divideScalar(3);const ut=ae(Me);de(Ie,nt+0,ve,ut),de(Ve,nt+2,Se,ut),de(Ze,nt+4,Pe,ut)}}function de(ve,Se,Pe,Me){Me<0&&ve.x===1&&(o[Se]=ve.x-1),Pe.x===0&&Pe.z===0&&(o[Se]=Me/2/Math.PI+.5)}function ae(ve){return Math.atan2(ve.z,-ve.x)}function U(ve){return Math.atan2(-ve.y,Math.sqrt(ve.x*ve.x+ve.z*ve.z))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new w4(e.vertices,e.indices,e.radius,e.details)}}class eZ extends w4{constructor(e=1,r=0){const n=(1+Math.sqrt(5))/2,i=1/n,a=[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-i,-n,0,-i,n,0,i,-n,0,i,n,-i,-n,0,-i,n,0,i,-n,0,i,n,0,-n,0,-i,n,0,-i,-n,0,i,n,0,i],o=[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9];super(a,o,e,r),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:r}}static fromJSON(e){return new eZ(e.radius,e.detail)}}const FV=new oi,zV=new oi,Pae=new oi,BV=new Tb;class nWe extends Jf{constructor(e=null,r=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:e,thresholdAngle:r},e!==null){const i=Math.pow(10,4),a=Math.cos(hL*r),o=e.getIndex(),s=e.getAttribute("position"),d=o?o.count:s.count,b=[0,0,0],L=["a","b","c"],B=new Array(3),V={},X=[];for(let ie=0;ie<d;ie+=3){o?(b[0]=o.getX(ie),b[1]=o.getX(ie+1),b[2]=o.getX(ie+2)):(b[0]=ie,b[1]=ie+1,b[2]=ie+2);const{a:de,b:ae,c:U}=BV;if(de.fromBufferAttribute(s,b[0]),ae.fromBufferAttribute(s,b[1]),U.fromBufferAttribute(s,b[2]),BV.getNormal(Pae),B[0]=`${Math.round(de.x*i)},${Math.round(de.y*i)},${Math.round(de.z*i)}`,B[1]=`${Math.round(ae.x*i)},${Math.round(ae.y*i)},${Math.round(ae.z*i)}`,B[2]=`${Math.round(U.x*i)},${Math.round(U.y*i)},${Math.round(U.z*i)}`,!(B[0]===B[1]||B[1]===B[2]||B[2]===B[0]))for(let ve=0;ve<3;ve++){const Se=(ve+1)%3,Pe=B[ve],Me=B[Se],Ie=BV[L[ve]],Ve=BV[L[Se]],Ze=`${Pe}_${Me}`,Je=`${Me}_${Pe}`;Je in V&&V[Je]?(Pae.dot(V[Je].normal)<=a&&(X.push(Ie.x,Ie.y,Ie.z),X.push(Ve.x,Ve.y,Ve.z)),V[Je]=null):Ze in V||(V[Ze]={index0:b[ve],index1:b[Se],normal:Pae.clone()})}}for(const ie in V)if(V[ie]){const{index0:de,index1:ae}=V[ie];FV.fromBufferAttribute(s,de),zV.fromBufferAttribute(s,ae),X.push(FV.x,FV.y,FV.z),X.push(zV.x,zV.y,zV.z)}this.setAttribute("position",new Dc(X,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}let oM=class{constructor(){this.type="Curve",this.arcLengthDivisions=200,this.needsUpdate=!1,this.cacheArcLengths=null}getPoint(){console.warn("THREE.Curve: .getPoint() not implemented.")}getPointAt(e,r){const n=this.getUtoTmapping(e);return this.getPoint(n,r)}getPoints(e=5){const r=[];for(let n=0;n<=e;n++)r.push(this.getPoint(n/e));return r}getSpacedPoints(e=5){const r=[];for(let n=0;n<=e;n++)r.push(this.getPointAt(n/e));return r}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const r=[];let n,i=this.getPoint(0),a=0;r.push(0);for(let o=1;o<=e;o++)n=this.getPoint(o/e),a+=n.distanceTo(i),r.push(a),i=n;return this.cacheArcLengths=r,r}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,r=null){const n=this.getLengths();let i=0;const a=n.length;let o;r?o=r:o=e*n[a-1];let s=0,d=a-1,b;for(;s<=d;)if(i=Math.floor(s+(d-s)/2),b=n[i]-o,b<0)s=i+1;else if(b>0)d=i-1;else{d=i;break}if(i=d,n[i]===o)return i/(a-1);const L=n[i],V=n[i+1]-L,X=(o-L)/V;return(i+X)/(a-1)}getTangent(e,r){let i=e-1e-4,a=e+1e-4;i<0&&(i=0),a>1&&(a=1);const o=this.getPoint(i),s=this.getPoint(a),d=r||(o.isVector2?new sl:new oi);return d.copy(s).sub(o).normalize(),d}getTangentAt(e,r){const n=this.getUtoTmapping(e);return this.getTangent(n,r)}computeFrenetFrames(e,r=!1){const n=new oi,i=[],a=[],o=[],s=new oi,d=new Rc;for(let X=0;X<=e;X++){const ie=X/e;i[X]=this.getTangentAt(ie,new oi)}a[0]=new oi,o[0]=new oi;let b=Number.MAX_VALUE;const L=Math.abs(i[0].x),B=Math.abs(i[0].y),V=Math.abs(i[0].z);L<=b&&(b=L,n.set(1,0,0)),B<=b&&(b=B,n.set(0,1,0)),V<=b&&n.set(0,0,1),s.crossVectors(i[0],n).normalize(),a[0].crossVectors(i[0],s),o[0].crossVectors(i[0],a[0]);for(let X=1;X<=e;X++){if(a[X]=a[X-1].clone(),o[X]=o[X-1].clone(),s.crossVectors(i[X-1],i[X]),s.length()>Number.EPSILON){s.normalize();const ie=Math.acos(Od(i[X-1].dot(i[X]),-1,1));a[X].applyMatrix4(d.makeRotationAxis(s,ie))}o[X].crossVectors(i[X],a[X])}if(r===!0){let X=Math.acos(Od(a[0].dot(a[e]),-1,1));X/=e,i[0].dot(s.crossVectors(a[0],a[e]))>0&&(X=-X);for(let ie=1;ie<=e;ie++)a[ie].applyMatrix4(d.makeRotationAxis(i[ie],X*ie)),o[ie].crossVectors(i[ie],a[ie])}return{tangents:i,normals:a,binormals:o}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.7,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}};class tZ extends oM{constructor(e=0,r=0,n=1,i=1,a=0,o=Math.PI*2,s=!1,d=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=r,this.xRadius=n,this.yRadius=i,this.aStartAngle=a,this.aEndAngle=o,this.aClockwise=s,this.aRotation=d}getPoint(e,r=new sl){const n=r,i=Math.PI*2;let a=this.aEndAngle-this.aStartAngle;const o=Math.abs(a)<Number.EPSILON;for(;a<0;)a+=i;for(;a>i;)a-=i;a<Number.EPSILON&&(o?a=0:a=i),this.aClockwise===!0&&!o&&(a===i?a=-i:a=a-i);const s=this.aStartAngle+e*a;let d=this.aX+this.xRadius*Math.cos(s),b=this.aY+this.yRadius*Math.sin(s);if(this.aRotation!==0){const L=Math.cos(this.aRotation),B=Math.sin(this.aRotation),V=d-this.aX,X=b-this.aY;d=V*L-X*B+this.aX,b=V*B+X*L+this.aY}return n.set(d,b)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){const e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}}class iWe extends tZ{constructor(e,r,n,i,a,o){super(e,r,n,n,i,a,o),this.isArcCurve=!0,this.type="ArcCurve"}}function Iye(){let t=0,e=0,r=0,n=0;function i(a,o,s,d){t=a,e=s,r=-3*a+3*o-2*s-d,n=2*a-2*o+s+d}return{initCatmullRom:function(a,o,s,d,b){i(o,s,b*(s-a),b*(d-o))},initNonuniformCatmullRom:function(a,o,s,d,b,L,B){let V=(o-a)/b-(s-a)/(b+L)+(s-o)/L,X=(s-o)/L-(d-o)/(L+B)+(d-s)/B;V*=L,X*=L,i(o,s,V,X)},calc:function(a){const o=a*a,s=o*a;return t+e*a+r*o+n*s}}}const UV=new oi,Dae=new Iye,Lae=new Iye,Oae=new Iye;class Pye extends oM{constructor(e=[],r=!1,n="centripetal",i=.5){super(),this.isCatmullRomCurve3=!0,this.type="CatmullRomCurve3",this.points=e,this.closed=r,this.curveType=n,this.tension=i}getPoint(e,r=new oi){const n=r,i=this.points,a=i.length,o=(a-(this.closed?0:1))*e;let s=Math.floor(o),d=o-s;this.closed?s+=s>0?0:(Math.floor(Math.abs(s)/a)+1)*a:d===0&&s===a-1&&(s=a-2,d=1);let b,L;this.closed||s>0?b=i[(s-1)%a]:(UV.subVectors(i[0],i[1]).add(i[0]),b=UV);const B=i[s%a],V=i[(s+1)%a];if(this.closed||s+2<a?L=i[(s+2)%a]:(UV.subVectors(i[a-1],i[a-2]).add(i[a-1]),L=UV),this.curveType==="centripetal"||this.curveType==="chordal"){const X=this.curveType==="chordal"?.5:.25;let ie=Math.pow(b.distanceToSquared(B),X),de=Math.pow(B.distanceToSquared(V),X),ae=Math.pow(V.distanceToSquared(L),X);de<1e-4&&(de=1),ie<1e-4&&(ie=de),ae<1e-4&&(ae=de),Dae.initNonuniformCatmullRom(b.x,B.x,V.x,L.x,ie,de,ae),Lae.initNonuniformCatmullRom(b.y,B.y,V.y,L.y,ie,de,ae),Oae.initNonuniformCatmullRom(b.z,B.z,V.z,L.z,ie,de,ae)}else this.curveType==="catmullrom"&&(Dae.initCatmullRom(b.x,B.x,V.x,L.x,this.tension),Lae.initCatmullRom(b.y,B.y,V.y,L.y,this.tension),Oae.initCatmullRom(b.z,B.z,V.z,L.z,this.tension));return n.set(Dae.calc(d),Lae.calc(d),Oae.calc(d)),n}copy(e){super.copy(e),this.points=[];for(let r=0,n=e.points.length;r<n;r++){const i=e.points[r];this.points.push(i.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}toJSON(){const e=super.toJSON();e.points=[];for(let r=0,n=this.points.length;r<n;r++){const i=this.points[r];e.points.push(i.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let r=0,n=e.points.length;r<n;r++){const i=e.points[r];this.points.push(new oi().fromArray(i))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function FIe(t,e,r,n,i){const a=(n-e)*.5,o=(i-r)*.5,s=t*t,d=t*s;return(2*r-2*n+a+o)*d+(-3*r+3*n-2*a-o)*s+a*t+r}function BXt(t,e){const r=1-t;return r*r*e}function UXt(t,e){return 2*(1-t)*t*e}function HXt(t,e){return t*t*e}function f9(t,e,r,n){return BXt(t,e)+UXt(t,r)+HXt(t,n)}function jXt(t,e){const r=1-t;return r*r*r*e}function VXt(t,e){const r=1-t;return 3*r*r*t*e}function qXt(t,e){return 3*(1-t)*t*t*e}function GXt(t,e){return t*t*t*e}function d9(t,e,r,n,i){return jXt(t,e)+VXt(t,r)+qXt(t,n)+GXt(t,i)}class Dye extends oM{constructor(e=new sl,r=new sl,n=new sl,i=new sl){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=r,this.v2=n,this.v3=i}getPoint(e,r=new sl){const n=r,i=this.v0,a=this.v1,o=this.v2,s=this.v3;return n.set(d9(e,i.x,a.x,o.x,s.x),d9(e,i.y,a.y,o.y,s.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class aWe extends oM{constructor(e=new oi,r=new oi,n=new oi,i=new oi){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=e,this.v1=r,this.v2=n,this.v3=i}getPoint(e,r=new oi){const n=r,i=this.v0,a=this.v1,o=this.v2,s=this.v3;return n.set(d9(e,i.x,a.x,o.x,s.x),d9(e,i.y,a.y,o.y,s.y),d9(e,i.z,a.z,o.z,s.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class Lye extends oM{constructor(e=new sl,r=new sl){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=r}getPoint(e,r=new sl){const n=r;return e===1?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,r){return this.getPoint(e,r)}getTangent(e,r=new sl){return r.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,r){return this.getTangent(e,r)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class oWe extends oM{constructor(e=new oi,r=new oi){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=e,this.v2=r}getPoint(e,r=new oi){const n=r;return e===1?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,r){return this.getPoint(e,r)}getTangent(e,r=new oi){return r.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,r){return this.getTangent(e,r)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class Oye extends oM{constructor(e=new sl,r=new sl,n=new sl){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=r,this.v2=n}getPoint(e,r=new sl){const n=r,i=this.v0,a=this.v1,o=this.v2;return n.set(f9(e,i.x,a.x,o.x),f9(e,i.y,a.y,o.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class Nye extends oM{constructor(e=new oi,r=new oi,n=new oi){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=e,this.v1=r,this.v2=n}getPoint(e,r=new oi){const n=r,i=this.v0,a=this.v1,o=this.v2;return n.set(f9(e,i.x,a.x,o.x),f9(e,i.y,a.y,o.y),f9(e,i.z,a.z,o.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class Fye extends oM{constructor(e=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=e}getPoint(e,r=new sl){const n=r,i=this.points,a=(i.length-1)*e,o=Math.floor(a),s=a-o,d=i[o===0?o:o-1],b=i[o],L=i[o>i.length-2?i.length-1:o+1],B=i[o>i.length-3?i.length-1:o+2];return n.set(FIe(s,d.x,b.x,L.x,B.x),FIe(s,d.y,b.y,L.y,B.y)),n}copy(e){super.copy(e),this.points=[];for(let r=0,n=e.points.length;r<n;r++){const i=e.points[r];this.points.push(i.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let r=0,n=this.points.length;r<n;r++){const i=this.points[r];e.points.push(i.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let r=0,n=e.points.length;r<n;r++){const i=e.points[r];this.points.push(new sl().fromArray(i))}return this}}var EW=Object.freeze({__proto__:null,ArcCurve:iWe,CatmullRomCurve3:Pye,CubicBezierCurve:Dye,CubicBezierCurve3:aWe,EllipseCurve:tZ,LineCurve:Lye,LineCurve3:oWe,QuadraticBezierCurve:Oye,QuadraticBezierCurve3:Nye,SplineCurve:Fye});class sWe extends oM{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(e){this.curves.push(e)}closePath(){const e=this.curves[0].getPoint(0),r=this.curves[this.curves.length-1].getPoint(1);if(!e.equals(r)){const n=e.isVector2===!0?"LineCurve":"LineCurve3";this.curves.push(new EW[n](r,e))}return this}getPoint(e,r){const n=e*this.getLength(),i=this.getCurveLengths();let a=0;for(;a<i.length;){if(i[a]>=n){const o=i[a]-n,s=this.curves[a],d=s.getLength(),b=d===0?0:1-o/d;return s.getPointAt(b,r)}a++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let r=0;for(let n=0,i=this.curves.length;n<i;n++)r+=this.curves[n].getLength(),e.push(r);return this.cacheLengths=e,e}getSpacedPoints(e=40){const r=[];for(let n=0;n<=e;n++)r.push(this.getPoint(n/e));return this.autoClose&&r.push(r[0]),r}getPoints(e=12){const r=[];let n;for(let i=0,a=this.curves;i<a.length;i++){const o=a[i],s=o.isEllipseCurve?e*2:o.isLineCurve||o.isLineCurve3?1:o.isSplineCurve?e*o.points.length:e,d=o.getPoints(s);for(let b=0;b<d.length;b++){const L=d[b];n&&n.equals(L)||(r.push(L),n=L)}}return this.autoClose&&r.length>1&&!r[r.length-1].equals(r[0])&&r.push(r[0]),r}copy(e){super.copy(e),this.curves=[];for(let r=0,n=e.curves.length;r<n;r++){const i=e.curves[r];this.curves.push(i.clone())}return this.autoClose=e.autoClose,this}toJSON(){const e=super.toJSON();e.autoClose=this.autoClose,e.curves=[];for(let r=0,n=this.curves.length;r<n;r++){const i=this.curves[r];e.curves.push(i.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.autoClose=e.autoClose,this.curves=[];for(let r=0,n=e.curves.length;r<n;r++){const i=e.curves[r];this.curves.push(new EW[i.type]().fromJSON(i))}return this}}class AW extends sWe{constructor(e){super(),this.type="Path",this.currentPoint=new sl,e&&this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let r=1,n=e.length;r<n;r++)this.lineTo(e[r].x,e[r].y);return this}moveTo(e,r){return this.currentPoint.set(e,r),this}lineTo(e,r){const n=new Lye(this.currentPoint.clone(),new sl(e,r));return this.curves.push(n),this.currentPoint.set(e,r),this}quadraticCurveTo(e,r,n,i){const a=new Oye(this.currentPoint.clone(),new sl(e,r),new sl(n,i));return this.curves.push(a),this.currentPoint.set(n,i),this}bezierCurveTo(e,r,n,i,a,o){const s=new Dye(this.currentPoint.clone(),new sl(e,r),new sl(n,i),new sl(a,o));return this.curves.push(s),this.currentPoint.set(a,o),this}splineThru(e){const r=[this.currentPoint.clone()].concat(e),n=new Fye(r);return this.curves.push(n),this.currentPoint.copy(e[e.length-1]),this}arc(e,r,n,i,a,o){const s=this.currentPoint.x,d=this.currentPoint.y;return this.absarc(e+s,r+d,n,i,a,o),this}absarc(e,r,n,i,a,o){return this.absellipse(e,r,n,n,i,a,o),this}ellipse(e,r,n,i,a,o,s,d){const b=this.currentPoint.x,L=this.currentPoint.y;return this.absellipse(e+b,r+L,n,i,a,o,s,d),this}absellipse(e,r,n,i,a,o,s,d){const b=new tZ(e,r,n,i,a,o,s,d);if(this.curves.length>0){const B=b.getPoint(0);B.equals(this.currentPoint)||this.lineTo(B.x,B.y)}this.curves.push(b);const L=b.getPoint(1);return this.currentPoint.copy(L),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class pL extends AW{constructor(e){super(e),this.uuid=lE(),this.type="Shape",this.holes=[]}getPointsHoles(e){const r=[];for(let n=0,i=this.holes.length;n<i;n++)r[n]=this.holes[n].getPoints(e);return r}extractPoints(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}}copy(e){super.copy(e),this.holes=[];for(let r=0,n=e.holes.length;r<n;r++){const i=e.holes[r];this.holes.push(i.clone())}return this}toJSON(){const e=super.toJSON();e.uuid=this.uuid,e.holes=[];for(let r=0,n=this.holes.length;r<n;r++){const i=this.holes[r];e.holes.push(i.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.uuid=e.uuid,this.holes=[];for(let r=0,n=e.holes.length;r<n;r++){const i=e.holes[r];this.holes.push(new AW().fromJSON(i))}return this}}function $Xt(t,e,r=2){const n=e&&e.length,i=n?e[0]*r:t.length;let a=lWe(t,0,i,r,!0);const o=[];if(!a||a.next===a.prev)return o;let s,d,b;if(n&&(a=KXt(t,e,a,r)),t.length>80*r){s=1/0,d=1/0;let L=-1/0,B=-1/0;for(let V=r;V<i;V+=r){const X=t[V],ie=t[V+1];X<s&&(s=X),ie<d&&(d=ie),X>L&&(L=X),ie>B&&(B=ie)}b=Math.max(L-s,B-d),b=b!==0?32767/b:0}return rB(a,o,r,s,d,b,0),o}function lWe(t,e,r,n,i){let a;if(i===lZt(t,e,r,n)>0)for(let o=e;o<r;o+=n)a=zIe(o/n|0,t[o],t[o+1],a);else for(let o=r-n;o>=e;o-=n)a=zIe(o/n|0,t[o],t[o+1],a);return a&&w8(a,a.next)&&(iB(a),a=a.next),a}function zL(t,e){if(!t)return t;e||(e=t);let r=t,n;do if(n=!1,!r.steiner&&(w8(r,r.next)||qy(r.prev,r,r.next)===0)){if(iB(r),r=e=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==e);return e}function rB(t,e,r,n,i,a,o){if(!t)return;!o&&a&&rZt(t,n,i,a);let s=t;for(;t.prev!==t.next;){const d=t.prev,b=t.next;if(a?YXt(t,n,i,a):WXt(t)){e.push(d.i,t.i,b.i),iB(t),t=b.next,s=b.next;continue}if(t=b,t===s){o?o===1?(t=XXt(zL(t),e),rB(t,e,r,n,i,a,2)):o===2&&ZXt(t,e,r,n,i,a):rB(zL(t),e,r,n,i,a,1);break}}}function WXt(t){const e=t.prev,r=t,n=t.next;if(qy(e,r,n)>=0)return!1;const i=e.x,a=r.x,o=n.x,s=e.y,d=r.y,b=n.y,L=Math.min(i,a,o),B=Math.min(s,d,b),V=Math.max(i,a,o),X=Math.max(s,d,b);let ie=n.next;for(;ie!==e;){if(ie.x>=L&&ie.x<=V&&ie.y>=B&&ie.y<=X&&Fz(i,s,a,d,o,b,ie.x,ie.y)&&qy(ie.prev,ie,ie.next)>=0)return!1;ie=ie.next}return!0}function YXt(t,e,r,n){const i=t.prev,a=t,o=t.next;if(qy(i,a,o)>=0)return!1;const s=i.x,d=a.x,b=o.x,L=i.y,B=a.y,V=o.y,X=Math.min(s,d,b),ie=Math.min(L,B,V),de=Math.max(s,d,b),ae=Math.max(L,B,V),U=Dpe(X,ie,e,r,n),ve=Dpe(de,ae,e,r,n);let Se=t.prevZ,Pe=t.nextZ;for(;Se&&Se.z>=U&&Pe&&Pe.z<=ve;){if(Se.x>=X&&Se.x<=de&&Se.y>=ie&&Se.y<=ae&&Se!==i&&Se!==o&&Fz(s,L,d,B,b,V,Se.x,Se.y)&&qy(Se.prev,Se,Se.next)>=0||(Se=Se.prevZ,Pe.x>=X&&Pe.x<=de&&Pe.y>=ie&&Pe.y<=ae&&Pe!==i&&Pe!==o&&Fz(s,L,d,B,b,V,Pe.x,Pe.y)&&qy(Pe.prev,Pe,Pe.next)>=0))return!1;Pe=Pe.nextZ}for(;Se&&Se.z>=U;){if(Se.x>=X&&Se.x<=de&&Se.y>=ie&&Se.y<=ae&&Se!==i&&Se!==o&&Fz(s,L,d,B,b,V,Se.x,Se.y)&&qy(Se.prev,Se,Se.next)>=0)return!1;Se=Se.prevZ}for(;Pe&&Pe.z<=ve;){if(Pe.x>=X&&Pe.x<=de&&Pe.y>=ie&&Pe.y<=ae&&Pe!==i&&Pe!==o&&Fz(s,L,d,B,b,V,Pe.x,Pe.y)&&qy(Pe.prev,Pe,Pe.next)>=0)return!1;Pe=Pe.nextZ}return!0}function XXt(t,e){let r=t;do{const n=r.prev,i=r.next.next;!w8(n,i)&&cWe(n,r,r.next,i)&&nB(n,i)&&nB(i,n)&&(e.push(n.i,r.i,i.i),iB(r),iB(r.next),r=t=i),r=r.next}while(r!==t);return zL(r)}function ZXt(t,e,r,n,i,a){let o=t;do{let s=o.next.next;for(;s!==o.prev;){if(o.i!==s.i&&aZt(o,s)){let d=fWe(o,s);o=zL(o,o.next),d=zL(d,d.next),rB(o,e,r,n,i,a,0),rB(d,e,r,n,i,a,0);return}s=s.next}o=o.next}while(o!==t)}function KXt(t,e,r,n){const i=[];for(let a=0,o=e.length;a<o;a++){const s=e[a]*n,d=a<o-1?e[a+1]*n:t.length,b=lWe(t,s,d,n,!1);b===b.next&&(b.steiner=!0),i.push(iZt(b))}i.sort(JXt);for(let a=0;a<i.length;a++)r=QXt(i[a],r);return r}function JXt(t,e){let r=t.x-e.x;if(r===0&&(r=t.y-e.y,r===0)){const n=(t.next.y-t.y)/(t.next.x-t.x),i=(e.next.y-e.y)/(e.next.x-e.x);r=n-i}return r}function QXt(t,e){const r=eZt(t,e);if(!r)return e;const n=fWe(r,t);return zL(n,n.next),zL(r,r.next)}function eZt(t,e){let r=e;const n=t.x,i=t.y;let a=-1/0,o;if(w8(t,r))return r;do{if(w8(t,r.next))return r.next;if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){const B=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(B<=n&&B>a&&(a=B,o=r.x<r.next.x?r:r.next,B===n))return o}r=r.next}while(r!==e);if(!o)return null;const s=o,d=o.x,b=o.y;let L=1/0;r=o;do{if(n>=r.x&&r.x>=d&&n!==r.x&&uWe(i<b?n:a,i,d,b,i<b?a:n,i,r.x,r.y)){const B=Math.abs(i-r.y)/(n-r.x);nB(r,t)&&(B<L||B===L&&(r.x>o.x||r.x===o.x&&tZt(o,r)))&&(o=r,L=B)}r=r.next}while(r!==s);return o}function tZt(t,e){return qy(t.prev,t,e.prev)<0&&qy(e.next,t,t.next)<0}function rZt(t,e,r,n){let i=t;do i.z===0&&(i.z=Dpe(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,nZt(i)}function nZt(t){let e,r=1;do{let n=t,i;t=null;let a=null;for(e=0;n;){e++;let o=n,s=0;for(let b=0;b<r&&(s++,o=o.nextZ,!!o);b++);let d=r;for(;s>0||d>0&&o;)s!==0&&(d===0||!o||n.z<=o.z)?(i=n,n=n.nextZ,s--):(i=o,o=o.nextZ,d--),a?a.nextZ=i:t=i,i.prevZ=a,a=i;n=o}a.nextZ=null,r*=2}while(e>1);return t}function Dpe(t,e,r,n,i){return t=(t-r)*i|0,e=(e-n)*i|0,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t|e<<1}function iZt(t){let e=t,r=t;do(e.x<r.x||e.x===r.x&&e.y<r.y)&&(r=e),e=e.next;while(e!==t);return r}function uWe(t,e,r,n,i,a,o,s){return(i-o)*(e-s)>=(t-o)*(a-s)&&(t-o)*(n-s)>=(r-o)*(e-s)&&(r-o)*(a-s)>=(i-o)*(n-s)}function Fz(t,e,r,n,i,a,o,s){return!(t===o&&e===s)&&uWe(t,e,r,n,i,a,o,s)}function aZt(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!oZt(t,e)&&(nB(t,e)&&nB(e,t)&&sZt(t,e)&&(qy(t.prev,t,e.prev)||qy(t,e.prev,e))||w8(t,e)&&qy(t.prev,t,t.next)>0&&qy(e.prev,e,e.next)>0)}function qy(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function w8(t,e){return t.x===e.x&&t.y===e.y}function cWe(t,e,r,n){const i=jV(qy(t,e,r)),a=jV(qy(t,e,n)),o=jV(qy(r,n,t)),s=jV(qy(r,n,e));return!!(i!==a&&o!==s||i===0&&HV(t,r,e)||a===0&&HV(t,n,e)||o===0&&HV(r,t,n)||s===0&&HV(r,e,n))}function HV(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function jV(t){return t>0?1:t<0?-1:0}function oZt(t,e){let r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&cWe(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}function nB(t,e){return qy(t.prev,t,t.next)<0?qy(t,e,t.next)>=0&&qy(t,t.prev,e)>=0:qy(t,e,t.prev)<0||qy(t,t.next,e)<0}function sZt(t,e){let r=t,n=!1;const i=(t.x+e.x)/2,a=(t.y+e.y)/2;do r.y>a!=r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next;while(r!==t);return n}function fWe(t,e){const r=Lpe(t.i,t.x,t.y),n=Lpe(e.i,e.x,e.y),i=t.next,a=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function zIe(t,e,r,n){const i=Lpe(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function iB(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Lpe(t,e,r){return{i:t,x:e,y:r,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function lZt(t,e,r,n){let i=0;for(let a=e,o=r-n;a<r;a+=n)i+=(t[o]-t[a])*(t[a+1]+t[o+1]),o=a;return i}class uZt{static triangulate(e,r,n=2){return $Xt(e,r,n)}}class zC{static area(e){const r=e.length;let n=0;for(let i=r-1,a=0;a<r;i=a++)n+=e[i].x*e[a].y-e[a].x*e[i].y;return n*.5}static isClockWise(e){return zC.area(e)<0}static triangulateShape(e,r){const n=[],i=[],a=[];BIe(e),UIe(n,e);let o=e.length;r.forEach(BIe);for(let d=0;d<r.length;d++)i.push(o),o+=r[d].length,UIe(n,r[d]);const s=uZt.triangulate(n,i);for(let d=0;d<s.length;d+=3)a.push(s.slice(d,d+3));return a}}function BIe(t){const e=t.length;e>2&&t[e-1].equals(t[0])&&t.pop()}function UIe(t,e){for(let r=0;r<e.length;r++)t.push(e[r].x),t.push(e[r].y)}class rZ extends Jf{constructor(e=new pL([new sl(.5,.5),new sl(-.5,.5),new sl(-.5,-.5),new sl(.5,-.5)]),r={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:r},e=Array.isArray(e)?e:[e];const n=this,i=[],a=[];for(let s=0,d=e.length;s<d;s++){const b=e[s];o(b)}this.setAttribute("position",new Dc(i,3)),this.setAttribute("uv",new Dc(a,2)),this.computeVertexNormals();function o(s){const d=[],b=r.curveSegments!==void 0?r.curveSegments:12,L=r.steps!==void 0?r.steps:1,B=r.depth!==void 0?r.depth:1;let V=r.bevelEnabled!==void 0?r.bevelEnabled:!0,X=r.bevelThickness!==void 0?r.bevelThickness:.2,ie=r.bevelSize!==void 0?r.bevelSize:X-.1,de=r.bevelOffset!==void 0?r.bevelOffset:0,ae=r.bevelSegments!==void 0?r.bevelSegments:3;const U=r.extrudePath,ve=r.UVGenerator!==void 0?r.UVGenerator:cZt;let Se,Pe=!1,Me,Ie,Ve,Ze;U&&(Se=U.getSpacedPoints(L),Pe=!0,V=!1,Me=U.computeFrenetFrames(L,!1),Ie=new oi,Ve=new oi,Ze=new oi),V||(ae=0,X=0,ie=0,de=0);const Je=s.extractPoints(b);let nt=Je.shape;const ut=Je.holes;if(!zC.isClockWise(nt)){nt=nt.reverse();for(let Yn=0,On=ut.length;Yn<On;Yn++){const Sn=ut[Yn];zC.isClockWise(Sn)&&(ut[Yn]=Sn.reverse())}}function _t(Yn){const Sn=10000000000000001e-36;let bn=Yn[0];for(let Mn=1;Mn<=Yn.length;Mn++){const gi=Mn%Yn.length,Oi=Yn[gi],Pa=Oi.x-bn.x,va=Oi.y-bn.y,ti=Pa*Pa+va*va,Tn=Math.max(Math.abs(Oi.x),Math.abs(Oi.y),Math.abs(bn.x),Math.abs(bn.y)),bi=Sn*Tn*Tn;if(ti<=bi){Yn.splice(gi,1),Mn--;continue}bn=Oi}}_t(nt),ut.forEach(_t);const Dt=ut.length,qt=nt;for(let Yn=0;Yn<Dt;Yn++){const On=ut[Yn];nt=nt.concat(On)}function Lt(Yn,On,Sn){return On||console.error("THREE.ExtrudeGeometry: vec does not exist"),Yn.clone().addScaledVector(On,Sn)}const dr=nt.length;function Zt(Yn,On,Sn){let bn,Mn,gi;const Oi=Yn.x-On.x,Pa=Yn.y-On.y,va=Sn.x-Yn.x,ti=Sn.y-Yn.y,Tn=Oi*Oi+Pa*Pa,bi=Oi*ti-Pa*va;if(Math.abs(bi)>Number.EPSILON){const Wn=Math.sqrt(Tn),Ei=Math.sqrt(va*va+ti*ti),Ki=On.x-Pa/Wn,sa=On.y+Oi/Wn,xa=Sn.x-ti/Ei,Qa=Sn.y+va/Ei,is=((xa-Ki)*ti-(Qa-sa)*va)/(Oi*ti-Pa*va);bn=Ki+Oi*is-Yn.x,Mn=sa+Pa*is-Yn.y;const go=bn*bn+Mn*Mn;if(go<=2)return new sl(bn,Mn);gi=Math.sqrt(go/2)}else{let Wn=!1;Oi>Number.EPSILON?va>Number.EPSILON&&(Wn=!0):Oi<-Number.EPSILON?va<-Number.EPSILON&&(Wn=!0):Math.sign(Pa)===Math.sign(ti)&&(Wn=!0),Wn?(bn=-Pa,Mn=Oi,gi=Math.sqrt(Tn)):(bn=Oi,Mn=Pa,gi=Math.sqrt(Tn/2))}return new sl(bn/gi,Mn/gi)}const Cr=[];for(let Yn=0,On=qt.length,Sn=On-1,bn=Yn+1;Yn<On;Yn++,Sn++,bn++)Sn===On&&(Sn=0),bn===On&&(bn=0),Cr[Yn]=Zt(qt[Yn],qt[Sn],qt[bn]);const yt=[];let Vt,Er=Cr.concat();for(let Yn=0,On=Dt;Yn<On;Yn++){const Sn=ut[Yn];Vt=[];for(let bn=0,Mn=Sn.length,gi=Mn-1,Oi=bn+1;bn<Mn;bn++,gi++,Oi++)gi===Mn&&(gi=0),Oi===Mn&&(Oi=0),Vt[bn]=Zt(Sn[bn],Sn[gi],Sn[Oi]);yt.push(Vt),Er=Er.concat(Vt)}let sr;if(ae===0)sr=zC.triangulateShape(qt,ut);else{const Yn=[],On=[];for(let Sn=0;Sn<ae;Sn++){const bn=Sn/ae,Mn=X*Math.cos(bn*Math.PI/2),gi=ie*Math.sin(bn*Math.PI/2)+de;for(let Oi=0,Pa=qt.length;Oi<Pa;Oi++){const va=Lt(qt[Oi],Cr[Oi],gi);Qn(va.x,va.y,-Mn),bn===0&&Yn.push(va)}for(let Oi=0,Pa=Dt;Oi<Pa;Oi++){const va=ut[Oi];Vt=yt[Oi];const ti=[];for(let Tn=0,bi=va.length;Tn<bi;Tn++){const Wn=Lt(va[Tn],Vt[Tn],gi);Qn(Wn.x,Wn.y,-Mn),bn===0&&ti.push(Wn)}bn===0&&On.push(ti)}}sr=zC.triangulateShape(Yn,On)}const or=sr.length,Ar=ie+de;for(let Yn=0;Yn<dr;Yn++){const On=V?Lt(nt[Yn],Er[Yn],Ar):nt[Yn];Pe?(Ve.copy(Me.normals[0]).multiplyScalar(On.x),Ie.copy(Me.binormals[0]).multiplyScalar(On.y),Ze.copy(Se[0]).add(Ve).add(Ie),Qn(Ze.x,Ze.y,Ze.z)):Qn(On.x,On.y,0)}for(let Yn=1;Yn<=L;Yn++)for(let On=0;On<dr;On++){const Sn=V?Lt(nt[On],Er[On],Ar):nt[On];Pe?(Ve.copy(Me.normals[Yn]).multiplyScalar(Sn.x),Ie.copy(Me.binormals[Yn]).multiplyScalar(Sn.y),Ze.copy(Se[Yn]).add(Ve).add(Ie),Qn(Ze.x,Ze.y,Ze.z)):Qn(Sn.x,Sn.y,B/L*Yn)}for(let Yn=ae-1;Yn>=0;Yn--){const On=Yn/ae,Sn=X*Math.cos(On*Math.PI/2),bn=ie*Math.sin(On*Math.PI/2)+de;for(let Mn=0,gi=qt.length;Mn<gi;Mn++){const Oi=Lt(qt[Mn],Cr[Mn],bn);Qn(Oi.x,Oi.y,B+Sn)}for(let Mn=0,gi=ut.length;Mn<gi;Mn++){const Oi=ut[Mn];Vt=yt[Mn];for(let Pa=0,va=Oi.length;Pa<va;Pa++){const ti=Lt(Oi[Pa],Vt[Pa],bn);Pe?Qn(ti.x,ti.y+Se[L-1].y,Se[L-1].x+Sn):Qn(ti.x,ti.y,B+Sn)}}}Ir(),_n();function Ir(){const Yn=i.length/3;if(V){let On=0,Sn=dr*On;for(let bn=0;bn<or;bn++){const Mn=sr[bn];Jn(Mn[2]+Sn,Mn[1]+Sn,Mn[0]+Sn)}On=L+ae*2,Sn=dr*On;for(let bn=0;bn<or;bn++){const Mn=sr[bn];Jn(Mn[0]+Sn,Mn[1]+Sn,Mn[2]+Sn)}}else{for(let On=0;On<or;On++){const Sn=sr[On];Jn(Sn[2],Sn[1],Sn[0])}for(let On=0;On<or;On++){const Sn=sr[On];Jn(Sn[0]+dr*L,Sn[1]+dr*L,Sn[2]+dr*L)}}n.addGroup(Yn,i.length/3-Yn,0)}function _n(){const Yn=i.length/3;let On=0;Un(qt,On),On+=qt.length;for(let Sn=0,bn=ut.length;Sn<bn;Sn++){const Mn=ut[Sn];Un(Mn,On),On+=Mn.length}n.addGroup(Yn,i.length/3-Yn,1)}function Un(Yn,On){let Sn=Yn.length;for(;--Sn>=0;){const bn=Sn;let Mn=Sn-1;Mn<0&&(Mn=Yn.length-1);for(let gi=0,Oi=L+ae*2;gi<Oi;gi++){const Pa=dr*gi,va=dr*(gi+1),ti=On+bn+Pa,Tn=On+Mn+Pa,bi=On+Mn+va,Wn=On+bn+va;Vn(ti,Tn,bi,Wn)}}}function Qn(Yn,On,Sn){d.push(Yn),d.push(On),d.push(Sn)}function Jn(Yn,On,Sn){jn(Yn),jn(On),jn(Sn);const bn=i.length/3,Mn=ve.generateTopUV(n,i,bn-3,bn-2,bn-1);Lr(Mn[0]),Lr(Mn[1]),Lr(Mn[2])}function Vn(Yn,On,Sn,bn){jn(Yn),jn(On),jn(bn),jn(On),jn(Sn),jn(bn);const Mn=i.length/3,gi=ve.generateSideWallUV(n,i,Mn-6,Mn-3,Mn-2,Mn-1);Lr(gi[0]),Lr(gi[1]),Lr(gi[3]),Lr(gi[1]),Lr(gi[2]),Lr(gi[3])}function jn(Yn){i.push(d[Yn*3+0]),i.push(d[Yn*3+1]),i.push(d[Yn*3+2])}function Lr(Yn){a.push(Yn.x),a.push(Yn.y)}}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON(),r=this.parameters.shapes,n=this.parameters.options;return fZt(r,n,e)}static fromJSON(e,r){const n=[];for(let a=0,o=e.shapes.length;a<o;a++){const s=r[e.shapes[a]];n.push(s)}const i=e.options.extrudePath;return i!==void 0&&(e.options.extrudePath=new EW[i.type]().fromJSON(i)),new rZ(n,e.options)}}const cZt={generateTopUV:function(t,e,r,n,i){const a=e[r*3],o=e[r*3+1],s=e[n*3],d=e[n*3+1],b=e[i*3],L=e[i*3+1];return[new sl(a,o),new sl(s,d),new sl(b,L)]},generateSideWallUV:function(t,e,r,n,i,a){const o=e[r*3],s=e[r*3+1],d=e[r*3+2],b=e[n*3],L=e[n*3+1],B=e[n*3+2],V=e[i*3],X=e[i*3+1],ie=e[i*3+2],de=e[a*3],ae=e[a*3+1],U=e[a*3+2];return Math.abs(s-L)<Math.abs(o-b)?[new sl(o,1-d),new sl(b,1-B),new sl(V,1-ie),new sl(de,1-U)]:[new sl(s,1-d),new sl(L,1-B),new sl(X,1-ie),new sl(ae,1-U)]}};function fZt(t,e,r){if(r.shapes=[],Array.isArray(t))for(let n=0,i=t.length;n<i;n++){const a=t[n];r.shapes.push(a.uuid)}else r.shapes.push(t.uuid);return r.options=Object.assign({},e),e.extrudePath!==void 0&&(r.options.extrudePath=e.extrudePath.toJSON()),r}class yU extends w4{constructor(e=1,r=0){const n=(1+Math.sqrt(5))/2,i=[-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1],a=[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1];super(i,a,e,r),this.type="IcosahedronGeometry",this.parameters={radius:e,detail:r}}static fromJSON(e){return new yU(e.radius,e.detail)}}class nZ extends Jf{constructor(e=[new sl(0,-.5),new sl(.5,0),new sl(0,.5)],r=12,n=0,i=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:e,segments:r,phiStart:n,phiLength:i},r=Math.floor(r),i=Od(i,0,Math.PI*2);const a=[],o=[],s=[],d=[],b=[],L=1/r,B=new oi,V=new sl,X=new oi,ie=new oi,de=new oi;let ae=0,U=0;for(let ve=0;ve<=e.length-1;ve++)switch(ve){case 0:ae=e[ve+1].x-e[ve].x,U=e[ve+1].y-e[ve].y,X.x=U*1,X.y=-ae,X.z=U*0,de.copy(X),X.normalize(),d.push(X.x,X.y,X.z);break;case e.length-1:d.push(de.x,de.y,de.z);break;default:ae=e[ve+1].x-e[ve].x,U=e[ve+1].y-e[ve].y,X.x=U*1,X.y=-ae,X.z=U*0,ie.copy(X),X.x+=de.x,X.y+=de.y,X.z+=de.z,X.normalize(),d.push(X.x,X.y,X.z),de.copy(ie)}for(let ve=0;ve<=r;ve++){const Se=n+ve*L*i,Pe=Math.sin(Se),Me=Math.cos(Se);for(let Ie=0;Ie<=e.length-1;Ie++){B.x=e[Ie].x*Pe,B.y=e[Ie].y,B.z=e[Ie].x*Me,o.push(B.x,B.y,B.z),V.x=ve/r,V.y=Ie/(e.length-1),s.push(V.x,V.y);const Ve=d[3*Ie+0]*Pe,Ze=d[3*Ie+1],Je=d[3*Ie+0]*Me;b.push(Ve,Ze,Je)}}for(let ve=0;ve<r;ve++)for(let Se=0;Se<e.length-1;Se++){const Pe=Se+ve*e.length,Me=Pe,Ie=Pe+e.length,Ve=Pe+e.length+1,Ze=Pe+1;a.push(Me,Ie,Ze),a.push(Ve,Ze,Ie)}this.setIndex(a),this.setAttribute("position",new Dc(o,3)),this.setAttribute("uv",new Dc(s,2)),this.setAttribute("normal",new Dc(b,3))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new nZ(e.points,e.segments,e.phiStart,e.phiLength)}}class O3 extends w4{constructor(e=1,r=0){const n=[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],i=[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2];super(n,i,e,r),this.type="OctahedronGeometry",this.parameters={radius:e,detail:r}}static fromJSON(e){return new O3(e.radius,e.detail)}}class j_ extends Jf{constructor(e=1,r=1,n=1,i=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:r,widthSegments:n,heightSegments:i};const a=e/2,o=r/2,s=Math.floor(n),d=Math.floor(i),b=s+1,L=d+1,B=e/s,V=r/d,X=[],ie=[],de=[],ae=[];for(let U=0;U<L;U++){const ve=U*V-o;for(let Se=0;Se<b;Se++){const Pe=Se*B-a;ie.push(Pe,-ve,0),de.push(0,0,1),ae.push(Se/s),ae.push(1-U/d)}}for(let U=0;U<d;U++)for(let ve=0;ve<s;ve++){const Se=ve+b*U,Pe=ve+b*(U+1),Me=ve+1+b*(U+1),Ie=ve+1+b*U;X.push(Se,Pe,Ie),X.push(Pe,Me,Ie)}this.setIndex(X),this.setAttribute("position",new Dc(ie,3)),this.setAttribute("normal",new Dc(de,3)),this.setAttribute("uv",new Dc(ae,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new j_(e.width,e.height,e.widthSegments,e.heightSegments)}}class iZ extends Jf{constructor(e=.5,r=1,n=32,i=1,a=0,o=Math.PI*2){super(),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:r,thetaSegments:n,phiSegments:i,thetaStart:a,thetaLength:o},n=Math.max(3,n),i=Math.max(1,i);const s=[],d=[],b=[],L=[];let B=e;const V=(r-e)/i,X=new oi,ie=new sl;for(let de=0;de<=i;de++){for(let ae=0;ae<=n;ae++){const U=a+ae/n*o;X.x=B*Math.cos(U),X.y=B*Math.sin(U),d.push(X.x,X.y,X.z),b.push(0,0,1),ie.x=(X.x/r+1)/2,ie.y=(X.y/r+1)/2,L.push(ie.x,ie.y)}B+=V}for(let de=0;de<i;de++){const ae=de*(n+1);for(let U=0;U<n;U++){const ve=U+ae,Se=ve,Pe=ve+n+1,Me=ve+n+2,Ie=ve+1;s.push(Se,Pe,Ie),s.push(Pe,Me,Ie)}}this.setIndex(s),this.setAttribute("position",new Dc(d,3)),this.setAttribute("normal",new Dc(b,3)),this.setAttribute("uv",new Dc(L,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new iZ(e.innerRadius,e.outerRadius,e.thetaSegments,e.phiSegments,e.thetaStart,e.thetaLength)}}class aZ extends Jf{constructor(e=new pL([new sl(0,.5),new sl(-.5,-.5),new sl(.5,-.5)]),r=12){super(),this.type="ShapeGeometry",this.parameters={shapes:e,curveSegments:r};const n=[],i=[],a=[],o=[];let s=0,d=0;if(Array.isArray(e)===!1)b(e);else for(let L=0;L<e.length;L++)b(e[L]),this.addGroup(s,d,L),s+=d,d=0;this.setIndex(n),this.setAttribute("position",new Dc(i,3)),this.setAttribute("normal",new Dc(a,3)),this.setAttribute("uv",new Dc(o,2));function b(L){const B=i.length/3,V=L.extractPoints(r);let X=V.shape;const ie=V.holes;zC.isClockWise(X)===!1&&(X=X.reverse());for(let ae=0,U=ie.length;ae<U;ae++){const ve=ie[ae];zC.isClockWise(ve)===!0&&(ie[ae]=ve.reverse())}const de=zC.triangulateShape(X,ie);for(let ae=0,U=ie.length;ae<U;ae++){const ve=ie[ae];X=X.concat(ve)}for(let ae=0,U=X.length;ae<U;ae++){const ve=X[ae];i.push(ve.x,ve.y,0),a.push(0,0,1),o.push(ve.x,ve.y)}for(let ae=0,U=de.length;ae<U;ae++){const ve=de[ae],Se=ve[0]+B,Pe=ve[1]+B,Me=ve[2]+B;n.push(Se,Pe,Me),d+=3}}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON(),r=this.parameters.shapes;return dZt(r,e)}static fromJSON(e,r){const n=[];for(let i=0,a=e.shapes.length;i<a;i++){const o=r[e.shapes[i]];n.push(o)}return new aZ(n,e.curveSegments)}}function dZt(t,e){if(e.shapes=[],Array.isArray(t))for(let r=0,n=t.length;r<n;r++){const i=t[r];e.shapes.push(i.uuid)}else e.shapes.push(t.uuid);return e}class n6 extends Jf{constructor(e=1,r=32,n=16,i=0,a=Math.PI*2,o=0,s=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:r,heightSegments:n,phiStart:i,phiLength:a,thetaStart:o,thetaLength:s},r=Math.max(3,Math.floor(r)),n=Math.max(2,Math.floor(n));const d=Math.min(o+s,Math.PI);let b=0;const L=[],B=new oi,V=new oi,X=[],ie=[],de=[],ae=[];for(let U=0;U<=n;U++){const ve=[],Se=U/n;let Pe=0;U===0&&o===0?Pe=.5/r:U===n&&d===Math.PI&&(Pe=-.5/r);for(let Me=0;Me<=r;Me++){const Ie=Me/r;B.x=-e*Math.cos(i+Ie*a)*Math.sin(o+Se*s),B.y=e*Math.cos(o+Se*s),B.z=e*Math.sin(i+Ie*a)*Math.sin(o+Se*s),ie.push(B.x,B.y,B.z),V.copy(B).normalize(),de.push(V.x,V.y,V.z),ae.push(Ie+Pe,1-Se),ve.push(b++)}L.push(ve)}for(let U=0;U<n;U++)for(let ve=0;ve<r;ve++){const Se=L[U][ve+1],Pe=L[U][ve],Me=L[U+1][ve],Ie=L[U+1][ve+1];(U!==0||o>0)&&X.push(Se,Pe,Ie),(U!==n-1||d<Math.PI)&&X.push(Pe,Me,Ie)}this.setIndex(X),this.setAttribute("position",new Dc(ie,3)),this.setAttribute("normal",new Dc(de,3)),this.setAttribute("uv",new Dc(ae,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new n6(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class oZ extends w4{constructor(e=1,r=0){const n=[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],i=[2,1,0,0,3,2,1,3,0,2,3,1];super(n,i,e,r),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:r}}static fromJSON(e){return new oZ(e.radius,e.detail)}}class OP extends Jf{constructor(e=1,r=.4,n=12,i=48,a=Math.PI*2){super(),this.type="TorusGeometry",this.parameters={radius:e,tube:r,radialSegments:n,tubularSegments:i,arc:a},n=Math.floor(n),i=Math.floor(i);const o=[],s=[],d=[],b=[],L=new oi,B=new oi,V=new oi;for(let X=0;X<=n;X++)for(let ie=0;ie<=i;ie++){const de=ie/i*a,ae=X/n*Math.PI*2;B.x=(e+r*Math.cos(ae))*Math.cos(de),B.y=(e+r*Math.cos(ae))*Math.sin(de),B.z=r*Math.sin(ae),s.push(B.x,B.y,B.z),L.x=e*Math.cos(de),L.y=e*Math.sin(de),V.subVectors(B,L).normalize(),d.push(V.x,V.y,V.z),b.push(ie/i),b.push(X/n)}for(let X=1;X<=n;X++)for(let ie=1;ie<=i;ie++){const de=(i+1)*X+ie-1,ae=(i+1)*(X-1)+ie-1,U=(i+1)*(X-1)+ie,ve=(i+1)*X+ie;o.push(de,ae,ve),o.push(ae,U,ve)}this.setIndex(o),this.setAttribute("position",new Dc(s,3)),this.setAttribute("normal",new Dc(d,3)),this.setAttribute("uv",new Dc(b,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new OP(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)}}class sZ extends Jf{constructor(e=1,r=.4,n=64,i=8,a=2,o=3){super(),this.type="TorusKnotGeometry",this.parameters={radius:e,tube:r,tubularSegments:n,radialSegments:i,p:a,q:o},n=Math.floor(n),i=Math.floor(i);const s=[],d=[],b=[],L=[],B=new oi,V=new oi,X=new oi,ie=new oi,de=new oi,ae=new oi,U=new oi;for(let Se=0;Se<=n;++Se){const Pe=Se/n*a*Math.PI*2;ve(Pe,a,o,e,X),ve(Pe+.01,a,o,e,ie),ae.subVectors(ie,X),U.addVectors(ie,X),de.crossVectors(ae,U),U.crossVectors(de,ae),de.normalize(),U.normalize();for(let Me=0;Me<=i;++Me){const Ie=Me/i*Math.PI*2,Ve=-r*Math.cos(Ie),Ze=r*Math.sin(Ie);B.x=X.x+(Ve*U.x+Ze*de.x),B.y=X.y+(Ve*U.y+Ze*de.y),B.z=X.z+(Ve*U.z+Ze*de.z),d.push(B.x,B.y,B.z),V.subVectors(B,X).normalize(),b.push(V.x,V.y,V.z),L.push(Se/n),L.push(Me/i)}}for(let Se=1;Se<=n;Se++)for(let Pe=1;Pe<=i;Pe++){const Me=(i+1)*(Se-1)+(Pe-1),Ie=(i+1)*Se+(Pe-1),Ve=(i+1)*Se+Pe,Ze=(i+1)*(Se-1)+Pe;s.push(Me,Ie,Ze),s.push(Ie,Ve,Ze)}this.setIndex(s),this.setAttribute("position",new Dc(d,3)),this.setAttribute("normal",new Dc(b,3)),this.setAttribute("uv",new Dc(L,2));function ve(Se,Pe,Me,Ie,Ve){const Ze=Math.cos(Se),Je=Math.sin(Se),nt=Me/Pe*Se,ut=Math.cos(nt);Ve.x=Ie*(2+ut)*.5*Ze,Ve.y=Ie*(2+ut)*Je*.5,Ve.z=Ie*Math.sin(nt)*.5}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new sZ(e.radius,e.tube,e.tubularSegments,e.radialSegments,e.p,e.q)}}class lZ extends Jf{constructor(e=new Nye(new oi(-1,-1,0),new oi(-1,1,0),new oi(1,1,0)),r=64,n=1,i=8,a=!1){super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:r,radius:n,radialSegments:i,closed:a};const o=e.computeFrenetFrames(r,a);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;const s=new oi,d=new oi,b=new sl;let L=new oi;const B=[],V=[],X=[],ie=[];de(),this.setIndex(ie),this.setAttribute("position",new Dc(B,3)),this.setAttribute("normal",new Dc(V,3)),this.setAttribute("uv",new Dc(X,2));function de(){for(let Se=0;Se<r;Se++)ae(Se);ae(a===!1?r:0),ve(),U()}function ae(Se){L=e.getPointAt(Se/r,L);const Pe=o.normals[Se],Me=o.binormals[Se];for(let Ie=0;Ie<=i;Ie++){const Ve=Ie/i*Math.PI*2,Ze=Math.sin(Ve),Je=-Math.cos(Ve);d.x=Je*Pe.x+Ze*Me.x,d.y=Je*Pe.y+Ze*Me.y,d.z=Je*Pe.z+Ze*Me.z,d.normalize(),V.push(d.x,d.y,d.z),s.x=L.x+n*d.x,s.y=L.y+n*d.y,s.z=L.z+n*d.z,B.push(s.x,s.y,s.z)}}function U(){for(let Se=1;Se<=r;Se++)for(let Pe=1;Pe<=i;Pe++){const Me=(i+1)*(Se-1)+(Pe-1),Ie=(i+1)*Se+(Pe-1),Ve=(i+1)*Se+Pe,Ze=(i+1)*(Se-1)+Pe;ie.push(Me,Ie,Ze),ie.push(Ie,Ve,Ze)}}function ve(){for(let Se=0;Se<=r;Se++)for(let Pe=0;Pe<=i;Pe++)b.x=Se/r,b.y=Pe/i,X.push(b.x,b.y)}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON();return e.path=this.parameters.path.toJSON(),e}static fromJSON(e){return new lZ(new EW[e.path.type]().fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}class zye extends Jf{constructor(e=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:e},e!==null){const r=[],n=new Set,i=new oi,a=new oi;if(e.index!==null){const o=e.attributes.position,s=e.index;let d=e.groups;d.length===0&&(d=[{start:0,count:s.count,materialIndex:0}]);for(let b=0,L=d.length;b<L;++b){const B=d[b],V=B.start,X=B.count;for(let ie=V,de=V+X;ie<de;ie+=3)for(let ae=0;ae<3;ae++){const U=s.getX(ie+ae),ve=s.getX(ie+(ae+1)%3);i.fromBufferAttribute(o,U),a.fromBufferAttribute(o,ve),HIe(i,a,n)===!0&&(r.push(i.x,i.y,i.z),r.push(a.x,a.y,a.z))}}}else{const o=e.attributes.position;for(let s=0,d=o.count/3;s<d;s++)for(let b=0;b<3;b++){const L=3*s+b,B=3*s+(b+1)%3;i.fromBufferAttribute(o,L),a.fromBufferAttribute(o,B),HIe(i,a,n)===!0&&(r.push(i.x,i.y,i.z),r.push(a.x,a.y,a.z))}}this.setAttribute("position",new Dc(r,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}function HIe(t,e,r){const n=`${t.x},${t.y},${t.z}-${e.x},${e.y},${e.z}`,i=`${e.x},${e.y},${e.z}-${t.x},${t.y},${t.z}`;return r.has(n)===!0||r.has(i)===!0?!1:(r.add(n),r.add(i),!0)}var jIe=Object.freeze({__proto__:null,BoxGeometry:Hw,CapsuleGeometry:JX,CircleGeometry:QX,ConeGeometry:yF,CylinderGeometry:Wx,DodecahedronGeometry:eZ,EdgesGeometry:nWe,ExtrudeGeometry:rZ,IcosahedronGeometry:yU,LatheGeometry:nZ,OctahedronGeometry:O3,PlaneGeometry:j_,PolyhedronGeometry:w4,RingGeometry:iZ,ShapeGeometry:aZ,SphereGeometry:n6,TetrahedronGeometry:oZ,TorusGeometry:OP,TorusKnotGeometry:sZ,TubeGeometry:lZ,WireframeGeometry:zye});class dWe extends q_{constructor(e){super(),this.isShadowMaterial=!0,this.type="ShadowMaterial",this.color=new Wu(0),this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.fog=e.fog,this}}class hWe extends eb{constructor(e){super(e),this.isRawShaderMaterial=!0,this.type="RawShaderMaterial"}}class Bye extends q_{constructor(e){super(),this.isMeshStandardMaterial=!0,this.type="MeshStandardMaterial",this.defines={STANDARD:""},this.color=new Wu(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Wu(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=_4,this.normalScale=new sl(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new $2,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class pWe extends Bye{constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new sl(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return Od(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(r){this.ior=(1+.4*r)/(1-.4*r)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new Wu(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new Wu(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new Wu(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._dispersion=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(e)}get anisotropy(){return this._anisotropy}set anisotropy(e){this._anisotropy>0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get dispersion(){return this._dispersion}set dispersion(e){this._dispersion>0!=e>0&&this.version++,this._dispersion=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.dispersion=e.dispersion,this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class vWe extends q_{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Wu(16777215),this.specular=new Wu(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Wu(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=_4,this.normalScale=new sl(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new $2,this.combine=dU,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class mWe extends q_{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Wu(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Wu(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=_4,this.normalScale=new sl(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}class gWe extends q_{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=_4,this.normalScale=new sl(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}class yWe extends q_{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Wu(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Wu(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=_4,this.normalScale=new sl(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new $2,this.combine=dU,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class uZ extends q_{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=I$e,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class Uye extends q_{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}class bWe extends q_{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Wu(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=_4,this.normalScale=new sl(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this.fog=e.fog,this}}class xWe extends Ww{constructor(e){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}function nL(t,e){return!t||t.constructor===e?t:typeof e.BYTES_PER_ELEMENT=="number"?new e(t):Array.prototype.slice.call(t)}function _We(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function wWe(t){function e(i,a){return t[i]-t[a]}const r=t.length,n=new Array(r);for(let i=0;i!==r;++i)n[i]=i;return n.sort(e),n}function Ope(t,e,r){const n=t.length,i=new t.constructor(n);for(let a=0,o=0;o!==n;++a){const s=r[a]*e;for(let d=0;d!==e;++d)i[o++]=t[s+d]}return i}function Hye(t,e,r,n){let i=1,a=t[0];for(;a!==void 0&&a[n]===void 0;)a=t[i++];if(a===void 0)return;let o=a[n];if(o!==void 0)if(Array.isArray(o))do o=a[n],o!==void 0&&(e.push(a.time),r.push(...o)),a=t[i++];while(a!==void 0);else if(o.toArray!==void 0)do o=a[n],o!==void 0&&(e.push(a.time),o.toArray(r,r.length)),a=t[i++];while(a!==void 0);else do o=a[n],o!==void 0&&(e.push(a.time),r.push(o)),a=t[i++];while(a!==void 0)}function hZt(t,e,r,n,i=30){const a=t.clone();a.name=e;const o=[];for(let d=0;d<a.tracks.length;++d){const b=a.tracks[d],L=b.getValueSize(),B=[],V=[];for(let X=0;X<b.times.length;++X){const ie=b.times[X]*i;if(!(ie<r||ie>=n)){B.push(b.times[X]);for(let de=0;de<L;++de)V.push(b.values[X*L+de])}}B.length!==0&&(b.times=nL(B,b.times.constructor),b.values=nL(V,b.values.constructor),o.push(b))}a.tracks=o;let s=1/0;for(let d=0;d<a.tracks.length;++d)s>a.tracks[d].times[0]&&(s=a.tracks[d].times[0]);for(let d=0;d<a.tracks.length;++d)a.tracks[d].shift(-1*s);return a.resetDuration(),a}function pZt(t,e=0,r=t,n=30){n<=0&&(n=30);const i=r.tracks.length,a=e/n;for(let o=0;o<i;++o){const s=r.tracks[o],d=s.ValueTypeName;if(d==="bool"||d==="string")continue;const b=t.tracks.find(function(U){return U.name===s.name&&U.ValueTypeName===d});if(b===void 0)continue;let L=0;const B=s.getValueSize();s.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(L=B/3);let V=0;const X=b.getValueSize();b.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(V=X/3);const ie=s.times.length-1;let de;if(a<=s.times[0]){const U=L,ve=B-L;de=s.values.slice(U,ve)}else if(a>=s.times[ie]){const U=ie*B+L,ve=U+B-L;de=s.values.slice(U,ve)}else{const U=s.createInterpolant(),ve=L,Se=B-L;U.evaluate(a),de=U.resultBuffer.slice(ve,Se)}d==="quaternion"&&new fh().fromArray(de).normalize().conjugate().toArray(de);const ae=b.times.length;for(let U=0;U<ae;++U){const ve=U*X+V;if(d==="quaternion")fh.multiplyQuaternionsFlat(b.values,ve,de,0,b.values,ve);else{const Se=X-V*2;for(let Pe=0;Pe<Se;++Pe)b.values[ve+Pe]-=de[Pe]}}}return t.blendMode=yye,t}class vZt{static convertArray(e,r){return nL(e,r)}static isTypedArray(e){return _We(e)}static getKeyframeOrder(e){return wWe(e)}static sortedArray(e,r,n){return Ope(e,r,n)}static flattenJSON(e,r,n,i){Hye(e,r,n,i)}static subclip(e,r,n,i,a=30){return hZt(e,r,n,i,a)}static makeClipAdditive(e,r=0,n=e,i=30){return pZt(e,r,n,i)}}class bU{constructor(e,r,n,i){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=i!==void 0?i:new r.constructor(n),this.sampleValues=r,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(e){const r=this.parameterPositions;let n=this._cachedIndex,i=r[n],a=r[n-1];e:{t:{let o;r:{n:if(!(e<i)){for(let s=n+2;;){if(i===void 0){if(e<a)break n;return n=r.length,this._cachedIndex=n,this.copySampleValue_(n-1)}if(n===s)break;if(a=i,i=r[++n],e<i)break t}o=r.length;break r}if(!(e>=a)){const s=r[1];e<s&&(n=2,a=s);for(let d=n-2;;){if(a===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(n===d)break;if(i=a,a=r[--n-1],e>=a)break t}o=n,n=0;break r}break e}for(;n<o;){const s=n+o>>>1;e<r[s]?o=s:n=s+1}if(i=r[n],a=r[n-1],a===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(i===void 0)return n=r.length,this._cachedIndex=n,this.copySampleValue_(n-1)}this._cachedIndex=n,this.intervalChanged_(n,a,i)}return this.interpolate_(n,a,e,i)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const r=this.resultBuffer,n=this.sampleValues,i=this.valueSize,a=e*i;for(let o=0;o!==i;++o)r[o]=n[a+o];return r}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class SWe extends bU{constructor(e,r,n,i){super(e,r,n,i),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:tL,endingEnd:tL}}intervalChanged_(e,r,n){const i=this.parameterPositions;let a=e-2,o=e+1,s=i[a],d=i[o];if(s===void 0)switch(this.getSettings_().endingStart){case rL:a=e,s=2*r-n;break;case K9:a=i.length-2,s=r+i[a]-i[a+1];break;default:a=e,s=n}if(d===void 0)switch(this.getSettings_().endingEnd){case rL:o=e,d=2*n-r;break;case K9:o=1,d=n+i[1]-i[0];break;default:o=e-1,d=r}const b=(n-r)*.5,L=this.valueSize;this._weightPrev=b/(r-s),this._weightNext=b/(d-n),this._offsetPrev=a*L,this._offsetNext=o*L}interpolate_(e,r,n,i){const a=this.resultBuffer,o=this.sampleValues,s=this.valueSize,d=e*s,b=d-s,L=this._offsetPrev,B=this._offsetNext,V=this._weightPrev,X=this._weightNext,ie=(n-r)/(i-r),de=ie*ie,ae=de*ie,U=-V*ae+2*V*de-V*ie,ve=(1+V)*ae+(-1.5-2*V)*de+(-.5+V)*ie+1,Se=(-1-X)*ae+(1.5+X)*de+.5*ie,Pe=X*ae-X*de;for(let Me=0;Me!==s;++Me)a[Me]=U*o[L+Me]+ve*o[b+Me]+Se*o[d+Me]+Pe*o[B+Me];return a}}class jye extends bU{constructor(e,r,n,i){super(e,r,n,i)}interpolate_(e,r,n,i){const a=this.resultBuffer,o=this.sampleValues,s=this.valueSize,d=e*s,b=d-s,L=(n-r)/(i-r),B=1-L;for(let V=0;V!==s;++V)a[V]=o[b+V]*B+o[d+V]*L;return a}}class TWe extends bU{constructor(e,r,n,i){super(e,r,n,i)}interpolate_(e){return this.copySampleValue_(e-1)}}class hA{constructor(e,r,n,i){if(e===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(r===void 0||r.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=nL(r,this.TimeBufferType),this.values=nL(n,this.ValueBufferType),this.setInterpolation(i||this.DefaultInterpolation)}static toJSON(e){const r=e.constructor;let n;if(r.toJSON!==this.toJSON)n=r.toJSON(e);else{n={name:e.name,times:nL(e.times,Array),values:nL(e.values,Array)};const i=e.getInterpolation();i!==e.DefaultInterpolation&&(n.interpolation=i)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new TWe(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new jye(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new SWe(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let r;switch(e){case Z9:r=this.InterpolantFactoryMethodDiscrete;break;case _W:r=this.InterpolantFactoryMethodLinear;break;case PG:r=this.InterpolantFactoryMethodSmooth;break}if(r===void 0){const n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(e!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(n);return console.warn("THREE.KeyframeTrack:",n),this}return this.createInterpolant=r,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Z9;case this.InterpolantFactoryMethodLinear:return _W;case this.InterpolantFactoryMethodSmooth:return PG}}getValueSize(){return this.values.length/this.times.length}shift(e){if(e!==0){const r=this.times;for(let n=0,i=r.length;n!==i;++n)r[n]+=e}return this}scale(e){if(e!==1){const r=this.times;for(let n=0,i=r.length;n!==i;++n)r[n]*=e}return this}trim(e,r){const n=this.times,i=n.length;let a=0,o=i-1;for(;a!==i&&n[a]<e;)++a;for(;o!==-1&&n[o]>r;)--o;if(++o,a!==0||o!==i){a>=o&&(o=Math.max(o,1),a=o-1);const s=this.getValueSize();this.times=n.slice(a,o),this.values=this.values.slice(a*s,o*s)}return this}validate(){let e=!0;const r=this.getValueSize();r-Math.floor(r)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const n=this.times,i=this.values,a=n.length;a===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let s=0;s!==a;s++){const d=n[s];if(typeof d=="number"&&isNaN(d)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,s,d),e=!1;break}if(o!==null&&o>d){console.error("THREE.KeyframeTrack: Out of order keys.",this,s,d,o),e=!1;break}o=d}if(i!==void 0&&_We(i))for(let s=0,d=i.length;s!==d;++s){const b=i[s];if(isNaN(b)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,s,b),e=!1;break}}return e}optimize(){const e=this.times.slice(),r=this.values.slice(),n=this.getValueSize(),i=this.getInterpolation()===PG,a=e.length-1;let o=1;for(let s=1;s<a;++s){let d=!1;const b=e[s],L=e[s+1];if(b!==L&&(s!==1||b!==e[0]))if(i)d=!0;else{const B=s*n,V=B-n,X=B+n;for(let ie=0;ie!==n;++ie){const de=r[B+ie];if(de!==r[V+ie]||de!==r[X+ie]){d=!0;break}}}if(d){if(s!==o){e[o]=e[s];const B=s*n,V=o*n;for(let X=0;X!==n;++X)r[V+X]=r[B+X]}++o}}if(a>0){e[o]=e[a];for(let s=a*n,d=o*n,b=0;b!==n;++b)r[d+b]=r[s+b];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=r.slice(0,o*n)):(this.times=e,this.values=r),this}clone(){const e=this.times.slice(),r=this.values.slice(),n=this.constructor,i=new n(this.name,e,r);return i.createInterpolant=this.createInterpolant,i}}hA.prototype.ValueTypeName="";hA.prototype.TimeBufferType=Float32Array;hA.prototype.ValueBufferType=Float32Array;hA.prototype.DefaultInterpolation=_W;class i6 extends hA{constructor(e,r,n){super(e,r,n)}}i6.prototype.ValueTypeName="bool";i6.prototype.ValueBufferType=Array;i6.prototype.DefaultInterpolation=Z9;i6.prototype.InterpolantFactoryMethodLinear=void 0;i6.prototype.InterpolantFactoryMethodSmooth=void 0;class Vye extends hA{constructor(e,r,n,i){super(e,r,n,i)}}Vye.prototype.ValueTypeName="color";class aB extends hA{constructor(e,r,n,i){super(e,r,n,i)}}aB.prototype.ValueTypeName="number";class EWe extends bU{constructor(e,r,n,i){super(e,r,n,i)}interpolate_(e,r,n,i){const a=this.resultBuffer,o=this.sampleValues,s=this.valueSize,d=(n-r)/(i-r);let b=e*s;for(let L=b+s;b!==L;b+=4)fh.slerpFlat(a,0,o,b-s,o,b,d);return a}}class xU extends hA{constructor(e,r,n,i){super(e,r,n,i)}InterpolantFactoryMethodLinear(e){return new EWe(this.times,this.values,this.getValueSize(),e)}}xU.prototype.ValueTypeName="quaternion";xU.prototype.InterpolantFactoryMethodSmooth=void 0;class a6 extends hA{constructor(e,r,n){super(e,r,n)}}a6.prototype.ValueTypeName="string";a6.prototype.ValueBufferType=Array;a6.prototype.DefaultInterpolation=Z9;a6.prototype.InterpolantFactoryMethodLinear=void 0;a6.prototype.InterpolantFactoryMethodSmooth=void 0;class oB extends hA{constructor(e,r,n,i){super(e,r,n,i)}}oB.prototype.ValueTypeName="vector";class sB{constructor(e="",r=-1,n=[],i=VX){this.name=e,this.tracks=n,this.duration=r,this.blendMode=i,this.uuid=lE(),this.userData={},this.duration<0&&this.resetDuration()}static parse(e){const r=[],n=e.tracks,i=1/(e.fps||1);for(let o=0,s=n.length;o!==s;++o)r.push(gZt(n[o]).scale(i));const a=new this(e.name,e.duration,r,e.blendMode);return a.uuid=e.uuid,a.userData=JSON.parse(e.userData||"{}"),a}static toJSON(e){const r=[],n=e.tracks,i={name:e.name,duration:e.duration,tracks:r,uuid:e.uuid,blendMode:e.blendMode,userData:JSON.stringify(e.userData)};for(let a=0,o=n.length;a!==o;++a)r.push(hA.toJSON(n[a]));return i}static CreateFromMorphTargetSequence(e,r,n,i){const a=r.length,o=[];for(let s=0;s<a;s++){let d=[],b=[];d.push((s+a-1)%a,s,(s+1)%a),b.push(0,1,0);const L=wWe(d);d=Ope(d,1,L),b=Ope(b,1,L),!i&&d[0]===0&&(d.push(a),b.push(b[0])),o.push(new aB(".morphTargetInfluences["+r[s].name+"]",d,b).scale(1/n))}return new this(e,-1,o)}static findByName(e,r){let n=e;if(!Array.isArray(e)){const i=e;n=i.geometry&&i.geometry.animations||i.animations}for(let i=0;i<n.length;i++)if(n[i].name===r)return n[i];return null}static CreateClipsFromMorphTargetSequences(e,r,n){const i={},a=/^([\w-]*?)([\d]+)$/;for(let s=0,d=e.length;s<d;s++){const b=e[s],L=b.name.match(a);if(L&&L.length>1){const B=L[1];let V=i[B];V||(i[B]=V=[]),V.push(b)}}const o=[];for(const s in i)o.push(this.CreateFromMorphTargetSequence(s,i[s],r,n));return o}static parseAnimation(e,r){if(console.warn("THREE.AnimationClip: parseAnimation() is deprecated and will be removed with r185"),!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const n=function(B,V,X,ie,de){if(X.length!==0){const ae=[],U=[];Hye(X,ae,U,ie),ae.length!==0&&de.push(new B(V,ae,U))}},i=[],a=e.name||"default",o=e.fps||30,s=e.blendMode;let d=e.length||-1;const b=e.hierarchy||[];for(let B=0;B<b.length;B++){const V=b[B].keys;if(!(!V||V.length===0))if(V[0].morphTargets){const X={};let ie;for(ie=0;ie<V.length;ie++)if(V[ie].morphTargets)for(let de=0;de<V[ie].morphTargets.length;de++)X[V[ie].morphTargets[de]]=-1;for(const de in X){const ae=[],U=[];for(let ve=0;ve!==V[ie].morphTargets.length;++ve){const Se=V[ie];ae.push(Se.time),U.push(Se.morphTarget===de?1:0)}i.push(new aB(".morphTargetInfluence["+de+"]",ae,U))}d=X.length*o}else{const X=".bones["+r[B].name+"]";n(oB,X+".position",V,"pos",i),n(xU,X+".quaternion",V,"rot",i),n(oB,X+".scale",V,"scl",i)}}return i.length===0?null:new this(a,d,i,s)}resetDuration(){const e=this.tracks;let r=0;for(let n=0,i=e.length;n!==i;++n){const a=this.tracks[n];r=Math.max(r,a.times[a.times.length-1])}return this.duration=r,this}trim(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let r=0;r<this.tracks.length;r++)e=e&&this.tracks[r].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){const e=[];for(let n=0;n<this.tracks.length;n++)e.push(this.tracks[n].clone());const r=new this.constructor(this.name,this.duration,e,this.blendMode);return r.userData=JSON.parse(JSON.stringify(this.userData)),r}toJSON(){return this.constructor.toJSON(this)}}function mZt(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return aB;case"vector":case"vector2":case"vector3":case"vector4":return oB;case"color":return Vye;case"quaternion":return xU;case"bool":case"boolean":return i6;case"string":return a6}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+t)}function gZt(t){if(t.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const e=mZt(t.type);if(t.times===void 0){const r=[],n=[];Hye(t.keys,r,n,"value"),t.times=r,t.values=n}return e.parse!==void 0?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)}const A5={enabled:!1,files:{},add:function(t,e){this.enabled!==!1&&(this.files[t]=e)},get:function(t){if(this.enabled!==!1)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}};class cZ{constructor(e,r,n){const i=this;let a=!1,o=0,s=0,d;const b=[];this.onStart=void 0,this.onLoad=e,this.onProgress=r,this.onError=n,this.abortController=new AbortController,this.itemStart=function(L){s++,a===!1&&i.onStart!==void 0&&i.onStart(L,o,s),a=!0},this.itemEnd=function(L){o++,i.onProgress!==void 0&&i.onProgress(L,o,s),o===s&&(a=!1,i.onLoad!==void 0&&i.onLoad())},this.itemError=function(L){i.onError!==void 0&&i.onError(L)},this.resolveURL=function(L){return d?d(L):L},this.setURLModifier=function(L){return d=L,this},this.addHandler=function(L,B){return b.push(L,B),this},this.removeHandler=function(L){const B=b.indexOf(L);return B!==-1&&b.splice(B,2),this},this.getHandler=function(L){for(let B=0,V=b.length;B<V;B+=2){const X=b[B],ie=b[B+1];if(X.global&&(X.lastIndex=0),X.test(L))return ie}return null},this.abort=function(){return this.abortController.abort(),this.abortController=new AbortController,this}}}const AWe=new cZ;class X2{constructor(e){this.manager=e!==void 0?e:AWe,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,r){const n=this;return new Promise(function(i,a){n.load(e,i,r,a)})}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}abort(){return this}}X2.DEFAULT_MATERIAL_NAME="__DEFAULT";const sk={};class yZt extends Error{constructor(e,r){super(e),this.response=r}}class uE extends X2{constructor(e){super(e),this.mimeType="",this.responseType="",this._abortController=new AbortController}load(e,r,n,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const a=A5.get(`file:${e}`);if(a!==void 0)return this.manager.itemStart(e),setTimeout(()=>{r&&r(a),this.manager.itemEnd(e)},0),a;if(sk[e]!==void 0){sk[e].push({onLoad:r,onProgress:n,onError:i});return}sk[e]=[],sk[e].push({onLoad:r,onProgress:n,onError:i});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin",signal:typeof AbortSignal.any=="function"?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal}),s=this.mimeType,d=this.responseType;fetch(o).then(b=>{if(b.status===200||b.status===0){if(b.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||b.body===void 0||b.body.getReader===void 0)return b;const L=sk[e],B=b.body.getReader(),V=b.headers.get("X-File-Size")||b.headers.get("Content-Length"),X=V?parseInt(V):0,ie=X!==0;let de=0;const ae=new ReadableStream({start(U){ve();function ve(){B.read().then(({done:Se,value:Pe})=>{if(Se)U.close();else{de+=Pe.byteLength;const Me=new ProgressEvent("progress",{lengthComputable:ie,loaded:de,total:X});for(let Ie=0,Ve=L.length;Ie<Ve;Ie++){const Ze=L[Ie];Ze.onProgress&&Ze.onProgress(Me)}U.enqueue(Pe),ve()}},Se=>{U.error(Se)})}}});return new Response(ae)}else throw new yZt(`fetch for "${b.url}" responded with ${b.status}: ${b.statusText}`,b)}).then(b=>{switch(d){case"arraybuffer":return b.arrayBuffer();case"blob":return b.blob();case"document":return b.text().then(L=>new DOMParser().parseFromString(L,s));case"json":return b.json();default:if(s==="")return b.text();{const B=/charset="?([^;"\s]*)"?/i.exec(s),V=B&&B[1]?B[1].toLowerCase():void 0,X=new TextDecoder(V);return b.arrayBuffer().then(ie=>X.decode(ie))}}}).then(b=>{A5.add(`file:${e}`,b);const L=sk[e];delete sk[e];for(let B=0,V=L.length;B<V;B++){const X=L[B];X.onLoad&&X.onLoad(b)}}).catch(b=>{const L=sk[e];if(L===void 0)throw this.manager.itemError(e),b;delete sk[e];for(let B=0,V=L.length;B<V;B++){const X=L[B];X.onError&&X.onError(b)}this.manager.itemError(e)}).finally(()=>{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}}class bZt extends X2{constructor(e){super(e)}load(e,r,n,i){const a=this,o=new uE(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(s){try{r(a.parse(JSON.parse(s)))}catch(d){i?i(d):console.error(d),a.manager.itemError(e)}},n,i)}parse(e){const r=[];for(let n=0;n<e.length;n++){const i=sB.parse(e[n]);r.push(i)}return r}}class xZt extends X2{constructor(e){super(e)}load(e,r,n,i){const a=this,o=[],s=new KX,d=new uE(this.manager);d.setPath(this.path),d.setResponseType("arraybuffer"),d.setRequestHeader(this.requestHeader),d.setWithCredentials(a.withCredentials);let b=0;function L(B){d.load(e[B],function(V){const X=a.parse(V,!0);o[B]={width:X.width,height:X.height,format:X.format,mipmaps:X.mipmaps},b+=1,b===6&&(X.mipmapCount===1&&(s.minFilter=vp),s.image=o,s.format=X.format,s.needsUpdate=!0,r&&r(s))},n,i)}if(Array.isArray(e))for(let B=0,V=e.length;B<V;++B)L(B);else d.load(e,function(B){const V=a.parse(B,!0);if(V.isCubemap){const X=V.mipmaps.length/V.mipmapCount;for(let ie=0;ie<X;ie++){o[ie]={mipmaps:[]};for(let de=0;de<V.mipmapCount;de++)o[ie].mipmaps.push(V.mipmaps[ie*V.mipmapCount+de]),o[ie].format=V.format,o[ie].width=V.width,o[ie].height=V.height}s.image=o}else s.image.width=V.width,s.image.height=V.height,s.mipmaps=V.mipmaps;V.mipmapCount===1&&(s.minFilter=vp),s.format=V.format,s.needsUpdate=!0,r&&r(s)},n,i);return s}}const jO=new WeakMap;class lB extends X2{constructor(e){super(e)}load(e,r,n,i){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const a=this,o=A5.get(`image:${e}`);if(o!==void 0){if(o.complete===!0)a.manager.itemStart(e),setTimeout(function(){r&&r(o),a.manager.itemEnd(e)},0);else{let B=jO.get(o);B===void 0&&(B=[],jO.set(o,B)),B.push({onLoad:r,onError:i})}return o}const s=eB("img");function d(){L(),r&&r(this);const B=jO.get(this)||[];for(let V=0;V<B.length;V++){const X=B[V];X.onLoad&&X.onLoad(this)}jO.delete(this),a.manager.itemEnd(e)}function b(B){L(),i&&i(B),A5.remove(`image:${e}`);const V=jO.get(this)||[];for(let X=0;X<V.length;X++){const ie=V[X];ie.onError&&ie.onError(B)}jO.delete(this),a.manager.itemError(e),a.manager.itemEnd(e)}function L(){s.removeEventListener("load",d,!1),s.removeEventListener("error",b,!1)}return s.addEventListener("load",d,!1),s.addEventListener("error",b,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(s.crossOrigin=this.crossOrigin),A5.add(`image:${e}`,s),a.manager.itemStart(e),s.src=e,s}}class CWe extends X2{constructor(e){super(e)}load(e,r,n,i){const a=new mU;a.colorSpace=H_;const o=new lB(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);let s=0;function d(b){o.load(e[b],function(L){a.images[b]=L,s++,s===6&&(a.needsUpdate=!0,r&&r(a))},void 0,i)}for(let b=0;b<e.length;++b)d(b);return a}}class qye extends X2{constructor(e){super(e)}load(e,r,n,i){const a=this,o=new $y,s=new uE(this.manager);return s.setResponseType("arraybuffer"),s.setRequestHeader(this.requestHeader),s.setPath(this.path),s.setWithCredentials(a.withCredentials),s.load(e,function(d){let b;try{b=a.parse(d)}catch(L){if(i!==void 0)i(L);else{console.error(L);return}}b.image!==void 0?o.image=b.image:b.data!==void 0&&(o.image.width=b.width,o.image.height=b.height,o.image.data=b.data),o.wrapS=b.wrapS!==void 0?b.wrapS:Ng,o.wrapT=b.wrapT!==void 0?b.wrapT:Ng,o.magFilter=b.magFilter!==void 0?b.magFilter:vp,o.minFilter=b.minFilter!==void 0?b.minFilter:vp,o.anisotropy=b.anisotropy!==void 0?b.anisotropy:1,b.colorSpace!==void 0&&(o.colorSpace=b.colorSpace),b.flipY!==void 0&&(o.flipY=b.flipY),b.format!==void 0&&(o.format=b.format),b.type!==void 0&&(o.type=b.type),b.mipmaps!==void 0&&(o.mipmaps=b.mipmaps,o.minFilter=E5),b.mipmapCount===1&&(o.minFilter=vp),b.generateMipmaps!==void 0&&(o.generateMipmaps=b.generateMipmaps),o.needsUpdate=!0,r&&r(o,b)},n,i),o}}class _Zt extends X2{constructor(e){super(e)}load(e,r,n,i){const a=new Fg,o=new lB(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,function(s){a.image=s,a.needsUpdate=!0,r!==void 0&&r(a)},n,i),a}}class S4 extends Hp{constructor(e,r=1){super(),this.isLight=!0,this.type="Light",this.color=new Wu(e),this.intensity=r}dispose(){}copy(e,r){return super.copy(e,r),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const r=super.toJSON(e);return r.object.color=this.color.getHex(),r.object.intensity=this.intensity,this.groundColor!==void 0&&(r.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(r.object.distance=this.distance),this.angle!==void 0&&(r.object.angle=this.angle),this.decay!==void 0&&(r.object.decay=this.decay),this.penumbra!==void 0&&(r.object.penumbra=this.penumbra),this.shadow!==void 0&&(r.object.shadow=this.shadow.toJSON()),this.target!==void 0&&(r.object.target=this.target.uuid),r}}class MWe extends S4{constructor(e,r,n){super(e,n),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(Hp.DEFAULT_UP),this.updateMatrix(),this.groundColor=new Wu(r)}copy(e,r){return super.copy(e,r),this.groundColor.copy(e.groundColor),this}}const Nae=new Rc,VIe=new oi,qIe=new oi;class Gye{constructor(e){this.camera=e,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new sl(512,512),this.mapType=e_,this.map=null,this.mapPass=null,this.matrix=new Rc,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new gF,this._frameExtents=new sl(1,1),this._viewportCount=1,this._viewports=[new dh(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const r=this.camera,n=this.matrix;VIe.setFromMatrixPosition(e.matrixWorld),r.position.copy(VIe),qIe.setFromMatrixPosition(e.target.matrixWorld),r.lookAt(qIe),r.updateMatrixWorld(),Nae.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Nae,r.coordinateSystem,r.reversedDepth),r.reversedDepth?n.set(.5,0,0,.5,0,.5,0,.5,0,0,1,0,0,0,0,1):n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(Nae)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.intensity=e.intensity,this.bias=e.bias,this.radius=e.radius,this.autoUpdate=e.autoUpdate,this.needsUpdate=e.needsUpdate,this.normalBias=e.normalBias,this.blurSamples=e.blurSamples,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const e={};return this.intensity!==1&&(e.intensity=this.intensity),this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class wZt extends Gye{constructor(){super(new sy(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1,this.aspect=1}updateMatrices(e){const r=this.camera,n=y8*2*e.angle*this.focus,i=this.mapSize.width/this.mapSize.height*this.aspect,a=e.distance||r.far;(n!==r.fov||i!==r.aspect||a!==r.far)&&(r.fov=n,r.aspect=i,r.far=a,r.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class RWe extends S4{constructor(e,r,n=0,i=Math.PI/3,a=0,o=2){super(e,r),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(Hp.DEFAULT_UP),this.updateMatrix(),this.target=new Hp,this.distance=n,this.angle=i,this.penumbra=a,this.decay=o,this.map=null,this.shadow=new wZt}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,r){return super.copy(e,r),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}const GIe=new Rc,iz=new oi,Fae=new oi;class SZt extends Gye{constructor(){super(new sy(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new sl(4,2),this._viewportCount=6,this._viewports=[new dh(2,1,1,1),new dh(0,1,1,1),new dh(3,1,1,1),new dh(1,1,1,1),new dh(3,0,1,1),new dh(1,0,1,1)],this._cubeDirections=[new oi(1,0,0),new oi(-1,0,0),new oi(0,0,1),new oi(0,0,-1),new oi(0,1,0),new oi(0,-1,0)],this._cubeUps=[new oi(0,1,0),new oi(0,1,0),new oi(0,1,0),new oi(0,1,0),new oi(0,0,1),new oi(0,0,-1)]}updateMatrices(e,r=0){const n=this.camera,i=this.matrix,a=e.distance||n.far;a!==n.far&&(n.far=a,n.updateProjectionMatrix()),iz.setFromMatrixPosition(e.matrixWorld),n.position.copy(iz),Fae.copy(n.position),Fae.add(this._cubeDirections[r]),n.up.copy(this._cubeUps[r]),n.lookAt(Fae),n.updateMatrixWorld(),i.makeTranslation(-iz.x,-iz.y,-iz.z),GIe.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(GIe,n.coordinateSystem,n.reversedDepth)}}class kWe extends S4{constructor(e,r,n=0,i=2){super(e,r),this.isPointLight=!0,this.type="PointLight",this.distance=n,this.decay=i,this.shadow=new SZt}get power(){return this.intensity*4*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,r){return super.copy(e,r),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class VC extends $X{constructor(e=-1,r=1,n=1,i=-1,a=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=r,this.top=n,this.bottom=i,this.near=a,this.far=o,this.updateProjectionMatrix()}copy(e,r){return super.copy(e,r),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,r,n,i,a,o){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=r,this.view.offsetX=n,this.view.offsetY=i,this.view.width=a,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),r=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,i=(this.top+this.bottom)/2;let a=n-e,o=n+e,s=i+r,d=i-r;if(this.view!==null&&this.view.enabled){const b=(this.right-this.left)/this.view.fullWidth/this.zoom,L=(this.top-this.bottom)/this.view.fullHeight/this.zoom;a+=b*this.view.offsetX,o=a+b*this.view.width,s-=L*this.view.offsetY,d=s-L*this.view.height}this.projectionMatrix.makeOrthographic(a,o,s,d,this.near,this.far,this.coordinateSystem,this.reversedDepth),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const r=super.toJSON(e);return r.object.zoom=this.zoom,r.object.left=this.left,r.object.right=this.right,r.object.top=this.top,r.object.bottom=this.bottom,r.object.near=this.near,r.object.far=this.far,this.view!==null&&(r.object.view=Object.assign({},this.view)),r}}class TZt extends Gye{constructor(){super(new VC(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class IWe extends S4{constructor(e,r){super(e,r),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Hp.DEFAULT_UP),this.updateMatrix(),this.target=new Hp,this.shadow=new TZt}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class PWe extends S4{constructor(e,r){super(e,r),this.isAmbientLight=!0,this.type="AmbientLight"}}class DWe extends S4{constructor(e,r,n=10,i=10){super(e,r),this.isRectAreaLight=!0,this.type="RectAreaLight",this.width=n,this.height=i}get power(){return this.intensity*this.width*this.height*Math.PI}set power(e){this.intensity=e/(this.width*this.height*Math.PI)}copy(e){return super.copy(e),this.width=e.width,this.height=e.height,this}toJSON(e){const r=super.toJSON(e);return r.object.width=this.width,r.object.height=this.height,r}}class LWe{constructor(){this.isSphericalHarmonics3=!0,this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new oi)}set(e){for(let r=0;r<9;r++)this.coefficients[r].copy(e[r]);return this}zero(){for(let e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this}getAt(e,r){const n=e.x,i=e.y,a=e.z,o=this.coefficients;return r.copy(o[0]).multiplyScalar(.282095),r.addScaledVector(o[1],.488603*i),r.addScaledVector(o[2],.488603*a),r.addScaledVector(o[3],.488603*n),r.addScaledVector(o[4],1.092548*(n*i)),r.addScaledVector(o[5],1.092548*(i*a)),r.addScaledVector(o[6],.315392*(3*a*a-1)),r.addScaledVector(o[7],1.092548*(n*a)),r.addScaledVector(o[8],.546274*(n*n-i*i)),r}getIrradianceAt(e,r){const n=e.x,i=e.y,a=e.z,o=this.coefficients;return r.copy(o[0]).multiplyScalar(.886227),r.addScaledVector(o[1],2*.511664*i),r.addScaledVector(o[2],2*.511664*a),r.addScaledVector(o[3],2*.511664*n),r.addScaledVector(o[4],2*.429043*n*i),r.addScaledVector(o[5],2*.429043*i*a),r.addScaledVector(o[6],.743125*a*a-.247708),r.addScaledVector(o[7],2*.429043*n*a),r.addScaledVector(o[8],.429043*(n*n-i*i)),r}add(e){for(let r=0;r<9;r++)this.coefficients[r].add(e.coefficients[r]);return this}addScaledSH(e,r){for(let n=0;n<9;n++)this.coefficients[n].addScaledVector(e.coefficients[n],r);return this}scale(e){for(let r=0;r<9;r++)this.coefficients[r].multiplyScalar(e);return this}lerp(e,r){for(let n=0;n<9;n++)this.coefficients[n].lerp(e.coefficients[n],r);return this}equals(e){for(let r=0;r<9;r++)if(!this.coefficients[r].equals(e.coefficients[r]))return!1;return!0}copy(e){return this.set(e.coefficients)}clone(){return new this.constructor().copy(this)}fromArray(e,r=0){const n=this.coefficients;for(let i=0;i<9;i++)n[i].fromArray(e,r+i*3);return this}toArray(e=[],r=0){const n=this.coefficients;for(let i=0;i<9;i++)n[i].toArray(e,r+i*3);return e}static getBasisAt(e,r){const n=e.x,i=e.y,a=e.z;r[0]=.282095,r[1]=.488603*i,r[2]=.488603*a,r[3]=.488603*n,r[4]=1.092548*n*i,r[5]=1.092548*i*a,r[6]=.315392*(3*a*a-1),r[7]=1.092548*n*a,r[8]=.546274*(n*n-i*i)}}class OWe extends S4{constructor(e=new LWe,r=1){super(void 0,r),this.isLightProbe=!0,this.sh=e}copy(e){return super.copy(e),this.sh.copy(e.sh),this}fromJSON(e){return this.intensity=e.intensity,this.sh.fromArray(e.sh),this}toJSON(e){const r=super.toJSON(e);return r.object.sh=this.sh.toArray(),r}}class fZ extends X2{constructor(e){super(e),this.textures={}}load(e,r,n,i){const a=this,o=new uE(a.manager);o.setPath(a.path),o.setRequestHeader(a.requestHeader),o.setWithCredentials(a.withCredentials),o.load(e,function(s){try{r(a.parse(JSON.parse(s)))}catch(d){i?i(d):console.error(d),a.manager.itemError(e)}},n,i)}parse(e){const r=this.textures;function n(a){return r[a]===void 0&&console.warn("THREE.MaterialLoader: Undefined texture",a),r[a]}const i=this.createMaterialFromType(e.type);if(e.uuid!==void 0&&(i.uuid=e.uuid),e.name!==void 0&&(i.name=e.name),e.color!==void 0&&i.color!==void 0&&i.color.setHex(e.color),e.roughness!==void 0&&(i.roughness=e.roughness),e.metalness!==void 0&&(i.metalness=e.metalness),e.sheen!==void 0&&(i.sheen=e.sheen),e.sheenColor!==void 0&&(i.sheenColor=new Wu().setHex(e.sheenColor)),e.sheenRoughness!==void 0&&(i.sheenRoughness=e.sheenRoughness),e.emissive!==void 0&&i.emissive!==void 0&&i.emissive.setHex(e.emissive),e.specular!==void 0&&i.specular!==void 0&&i.specular.setHex(e.specular),e.specularIntensity!==void 0&&(i.specularIntensity=e.specularIntensity),e.specularColor!==void 0&&i.specularColor!==void 0&&i.specularColor.setHex(e.specularColor),e.shininess!==void 0&&(i.shininess=e.shininess),e.clearcoat!==void 0&&(i.clearcoat=e.clearcoat),e.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=e.clearcoatRoughness),e.dispersion!==void 0&&(i.dispersion=e.dispersion),e.iridescence!==void 0&&(i.iridescence=e.iridescence),e.iridescenceIOR!==void 0&&(i.iridescenceIOR=e.iridescenceIOR),e.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=e.iridescenceThicknessRange),e.transmission!==void 0&&(i.transmission=e.transmission),e.thickness!==void 0&&(i.thickness=e.thickness),e.attenuationDistance!==void 0&&(i.attenuationDistance=e.attenuationDistance),e.attenuationColor!==void 0&&i.attenuationColor!==void 0&&i.attenuationColor.setHex(e.attenuationColor),e.anisotropy!==void 0&&(i.anisotropy=e.anisotropy),e.anisotropyRotation!==void 0&&(i.anisotropyRotation=e.anisotropyRotation),e.fog!==void 0&&(i.fog=e.fog),e.flatShading!==void 0&&(i.flatShading=e.flatShading),e.blending!==void 0&&(i.blending=e.blending),e.combine!==void 0&&(i.combine=e.combine),e.side!==void 0&&(i.side=e.side),e.shadowSide!==void 0&&(i.shadowSide=e.shadowSide),e.opacity!==void 0&&(i.opacity=e.opacity),e.transparent!==void 0&&(i.transparent=e.transparent),e.alphaTest!==void 0&&(i.alphaTest=e.alphaTest),e.alphaHash!==void 0&&(i.alphaHash=e.alphaHash),e.depthFunc!==void 0&&(i.depthFunc=e.depthFunc),e.depthTest!==void 0&&(i.depthTest=e.depthTest),e.depthWrite!==void 0&&(i.depthWrite=e.depthWrite),e.colorWrite!==void 0&&(i.colorWrite=e.colorWrite),e.blendSrc!==void 0&&(i.blendSrc=e.blendSrc),e.blendDst!==void 0&&(i.blendDst=e.blendDst),e.blendEquation!==void 0&&(i.blendEquation=e.blendEquation),e.blendSrcAlpha!==void 0&&(i.blendSrcAlpha=e.blendSrcAlpha),e.blendDstAlpha!==void 0&&(i.blendDstAlpha=e.blendDstAlpha),e.blendEquationAlpha!==void 0&&(i.blendEquationAlpha=e.blendEquationAlpha),e.blendColor!==void 0&&i.blendColor!==void 0&&i.blendColor.setHex(e.blendColor),e.blendAlpha!==void 0&&(i.blendAlpha=e.blendAlpha),e.stencilWriteMask!==void 0&&(i.stencilWriteMask=e.stencilWriteMask),e.stencilFunc!==void 0&&(i.stencilFunc=e.stencilFunc),e.stencilRef!==void 0&&(i.stencilRef=e.stencilRef),e.stencilFuncMask!==void 0&&(i.stencilFuncMask=e.stencilFuncMask),e.stencilFail!==void 0&&(i.stencilFail=e.stencilFail),e.stencilZFail!==void 0&&(i.stencilZFail=e.stencilZFail),e.stencilZPass!==void 0&&(i.stencilZPass=e.stencilZPass),e.stencilWrite!==void 0&&(i.stencilWrite=e.stencilWrite),e.wireframe!==void 0&&(i.wireframe=e.wireframe),e.wireframeLinewidth!==void 0&&(i.wireframeLinewidth=e.wireframeLinewidth),e.wireframeLinecap!==void 0&&(i.wireframeLinecap=e.wireframeLinecap),e.wireframeLinejoin!==void 0&&(i.wireframeLinejoin=e.wireframeLinejoin),e.rotation!==void 0&&(i.rotation=e.rotation),e.linewidth!==void 0&&(i.linewidth=e.linewidth),e.dashSize!==void 0&&(i.dashSize=e.dashSize),e.gapSize!==void 0&&(i.gapSize=e.gapSize),e.scale!==void 0&&(i.scale=e.scale),e.polygonOffset!==void 0&&(i.polygonOffset=e.polygonOffset),e.polygonOffsetFactor!==void 0&&(i.polygonOffsetFactor=e.polygonOffsetFactor),e.polygonOffsetUnits!==void 0&&(i.polygonOffsetUnits=e.polygonOffsetUnits),e.dithering!==void 0&&(i.dithering=e.dithering),e.alphaToCoverage!==void 0&&(i.alphaToCoverage=e.alphaToCoverage),e.premultipliedAlpha!==void 0&&(i.premultipliedAlpha=e.premultipliedAlpha),e.forceSinglePass!==void 0&&(i.forceSinglePass=e.forceSinglePass),e.visible!==void 0&&(i.visible=e.visible),e.toneMapped!==void 0&&(i.toneMapped=e.toneMapped),e.userData!==void 0&&(i.userData=e.userData),e.vertexColors!==void 0&&(typeof e.vertexColors=="number"?i.vertexColors=e.vertexColors>0:i.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const a in e.uniforms){const o=e.uniforms[a];switch(i.uniforms[a]={},o.type){case"t":i.uniforms[a].value=n(o.value);break;case"c":i.uniforms[a].value=new Wu().setHex(o.value);break;case"v2":i.uniforms[a].value=new sl().fromArray(o.value);break;case"v3":i.uniforms[a].value=new oi().fromArray(o.value);break;case"v4":i.uniforms[a].value=new dh().fromArray(o.value);break;case"m3":i.uniforms[a].value=new gh().fromArray(o.value);break;case"m4":i.uniforms[a].value=new Rc().fromArray(o.value);break;default:i.uniforms[a].value=o.value}}if(e.defines!==void 0&&(i.defines=e.defines),e.vertexShader!==void 0&&(i.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(i.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(i.glslVersion=e.glslVersion),e.extensions!==void 0)for(const a in e.extensions)i.extensions[a]=e.extensions[a];if(e.lights!==void 0&&(i.lights=e.lights),e.clipping!==void 0&&(i.clipping=e.clipping),e.size!==void 0&&(i.size=e.size),e.sizeAttenuation!==void 0&&(i.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(i.map=n(e.map)),e.matcap!==void 0&&(i.matcap=n(e.matcap)),e.alphaMap!==void 0&&(i.alphaMap=n(e.alphaMap)),e.bumpMap!==void 0&&(i.bumpMap=n(e.bumpMap)),e.bumpScale!==void 0&&(i.bumpScale=e.bumpScale),e.normalMap!==void 0&&(i.normalMap=n(e.normalMap)),e.normalMapType!==void 0&&(i.normalMapType=e.normalMapType),e.normalScale!==void 0){let a=e.normalScale;Array.isArray(a)===!1&&(a=[a,a]),i.normalScale=new sl().fromArray(a)}return e.displacementMap!==void 0&&(i.displacementMap=n(e.displacementMap)),e.displacementScale!==void 0&&(i.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(i.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(i.roughnessMap=n(e.roughnessMap)),e.metalnessMap!==void 0&&(i.metalnessMap=n(e.metalnessMap)),e.emissiveMap!==void 0&&(i.emissiveMap=n(e.emissiveMap)),e.emissiveIntensity!==void 0&&(i.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(i.specularMap=n(e.specularMap)),e.specularIntensityMap!==void 0&&(i.specularIntensityMap=n(e.specularIntensityMap)),e.specularColorMap!==void 0&&(i.specularColorMap=n(e.specularColorMap)),e.envMap!==void 0&&(i.envMap=n(e.envMap)),e.envMapRotation!==void 0&&i.envMapRotation.fromArray(e.envMapRotation),e.envMapIntensity!==void 0&&(i.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(i.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(i.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(i.lightMap=n(e.lightMap)),e.lightMapIntensity!==void 0&&(i.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(i.aoMap=n(e.aoMap)),e.aoMapIntensity!==void 0&&(i.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(i.gradientMap=n(e.gradientMap)),e.clearcoatMap!==void 0&&(i.clearcoatMap=n(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(i.clearcoatRoughnessMap=n(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(i.clearcoatNormalMap=n(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(i.clearcoatNormalScale=new sl().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(i.iridescenceMap=n(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(i.iridescenceThicknessMap=n(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(i.transmissionMap=n(e.transmissionMap)),e.thicknessMap!==void 0&&(i.thicknessMap=n(e.thicknessMap)),e.anisotropyMap!==void 0&&(i.anisotropyMap=n(e.anisotropyMap)),e.sheenColorMap!==void 0&&(i.sheenColorMap=n(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(i.sheenRoughnessMap=n(e.sheenRoughnessMap)),i}setTextures(e){return this.textures=e,this}createMaterialFromType(e){return fZ.createMaterialFromType(e)}static createMaterialFromType(e){const r={ShadowMaterial:dWe,SpriteMaterial:Aye,RawShaderMaterial:hWe,ShaderMaterial:eb,PointsMaterial:Mye,MeshPhysicalMaterial:pWe,MeshStandardMaterial:Bye,MeshPhongMaterial:vWe,MeshToonMaterial:mWe,MeshNormalMaterial:gWe,MeshLambertMaterial:yWe,MeshDepthMaterial:uZ,MeshDistanceMaterial:Uye,MeshBasicMaterial:dA,MeshMatcapMaterial:bWe,LineDashedMaterial:xWe,LineBasicMaterial:Ww,Material:q_};return new r[e]}}class Npe{static extractUrlBase(e){const r=e.lastIndexOf("/");return r===-1?"./":e.slice(0,r+1)}static resolveURL(e,r){return typeof e!="string"||e===""?"":(/^https?:\/\//i.test(r)&&/^\//.test(e)&&(r=r.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:r+e)}}class $ye extends Jf{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}toJSON(){const e=super.toJSON();return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}class NWe extends X2{constructor(e){super(e)}load(e,r,n,i){const a=this,o=new uE(a.manager);o.setPath(a.path),o.setRequestHeader(a.requestHeader),o.setWithCredentials(a.withCredentials),o.load(e,function(s){try{r(a.parse(JSON.parse(s)))}catch(d){i?i(d):console.error(d),a.manager.itemError(e)}},n,i)}parse(e){const r={},n={};function i(X,ie){if(r[ie]!==void 0)return r[ie];const ae=X.interleavedBuffers[ie],U=a(X,ae.buffer),ve=AN(ae.type,U),Se=new YX(ve,ae.stride);return Se.uuid=ae.uuid,r[ie]=Se,Se}function a(X,ie){if(n[ie]!==void 0)return n[ie];const ae=X.arrayBuffers[ie],U=new Uint32Array(ae).buffer;return n[ie]=U,U}const o=e.isInstancedBufferGeometry?new $ye:new Jf,s=e.data.index;if(s!==void 0){const X=AN(s.type,s.array);o.setIndex(new Kh(X,1))}const d=e.data.attributes;for(const X in d){const ie=d[X];let de;if(ie.isInterleavedBufferAttribute){const ae=i(e.data,ie.data);de=new rE(ae,ie.itemSize,ie.offset,ie.normalized)}else{const ae=AN(ie.type,ie.array),U=ie.isInstancedBufferAttribute?_8:Kh;de=new U(ae,ie.itemSize,ie.normalized)}ie.name!==void 0&&(de.name=ie.name),ie.usage!==void 0&&de.setUsage(ie.usage),o.setAttribute(X,de)}const b=e.data.morphAttributes;if(b)for(const X in b){const ie=b[X],de=[];for(let ae=0,U=ie.length;ae<U;ae++){const ve=ie[ae];let Se;if(ve.isInterleavedBufferAttribute){const Pe=i(e.data,ve.data);Se=new rE(Pe,ve.itemSize,ve.offset,ve.normalized)}else{const Pe=AN(ve.type,ve.array);Se=new Kh(Pe,ve.itemSize,ve.normalized)}ve.name!==void 0&&(Se.name=ve.name),de.push(Se)}o.morphAttributes[X]=de}e.data.morphTargetsRelative&&(o.morphTargetsRelative=!0);const B=e.data.groups||e.data.drawcalls||e.data.offsets;if(B!==void 0)for(let X=0,ie=B.length;X!==ie;++X){const de=B[X];o.addGroup(de.start,de.count,de.materialIndex)}const V=e.data.boundingSphere;return V!==void 0&&(o.boundingSphere=new Mb().fromJSON(V)),e.name&&(o.name=e.name),e.userData&&(o.userData=e.userData),o}}class EZt extends X2{constructor(e){super(e)}load(e,r,n,i){const a=this,o=this.path===""?Npe.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||o;const s=new uE(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,function(d){let b=null;try{b=JSON.parse(d)}catch(B){i!==void 0&&i(B),console.error("THREE:ObjectLoader: Can't parse "+e+".",B.message);return}const L=b.metadata;if(L===void 0||L.type===void 0||L.type.toLowerCase()==="geometry"){i!==void 0&&i(new Error("THREE.ObjectLoader: Can't load "+e)),console.error("THREE.ObjectLoader: Can't load "+e);return}a.parse(b,r)},n,i)}async loadAsync(e,r){const n=this,i=this.path===""?Npe.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||i;const a=new uE(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials);const o=await a.loadAsync(e,r),s=JSON.parse(o),d=s.metadata;if(d===void 0||d.type===void 0||d.type.toLowerCase()==="geometry")throw new Error("THREE.ObjectLoader: Can't load "+e);return await n.parseAsync(s)}parse(e,r){const n=this.parseAnimations(e.animations),i=this.parseShapes(e.shapes),a=this.parseGeometries(e.geometries,i),o=this.parseImages(e.images,function(){r!==void 0&&r(b)}),s=this.parseTextures(e.textures,o),d=this.parseMaterials(e.materials,s),b=this.parseObject(e.object,a,d,s,n),L=this.parseSkeletons(e.skeletons,b);if(this.bindSkeletons(b,L),this.bindLightTargets(b),r!==void 0){let B=!1;for(const V in o)if(o[V].data instanceof HTMLImageElement){B=!0;break}B===!1&&r(b)}return b}async parseAsync(e){const r=this.parseAnimations(e.animations),n=this.parseShapes(e.shapes),i=this.parseGeometries(e.geometries,n),a=await this.parseImagesAsync(e.images),o=this.parseTextures(e.textures,a),s=this.parseMaterials(e.materials,o),d=this.parseObject(e.object,i,s,o,r),b=this.parseSkeletons(e.skeletons,d);return this.bindSkeletons(d,b),this.bindLightTargets(d),d}parseShapes(e){const r={};if(e!==void 0)for(let n=0,i=e.length;n<i;n++){const a=new pL().fromJSON(e[n]);r[a.uuid]=a}return r}parseSkeletons(e,r){const n={},i={};if(r.traverse(function(a){a.isBone&&(i[a.uuid]=a)}),e!==void 0)for(let a=0,o=e.length;a<o;a++){const s=new XX().fromJSON(e[a],i);n[s.uuid]=s}return n}parseGeometries(e,r){const n={};if(e!==void 0){const i=new NWe;for(let a=0,o=e.length;a<o;a++){let s;const d=e[a];switch(d.type){case"BufferGeometry":case"InstancedBufferGeometry":s=i.parse(d);break;default:d.type in jIe?s=jIe[d.type].fromJSON(d,r):console.warn(`THREE.ObjectLoader: Unsupported geometry type "${d.type}"`)}s.uuid=d.uuid,d.name!==void 0&&(s.name=d.name),d.userData!==void 0&&(s.userData=d.userData),n[d.uuid]=s}}return n}parseMaterials(e,r){const n={},i={};if(e!==void 0){const a=new fZ;a.setTextures(r);for(let o=0,s=e.length;o<s;o++){const d=e[o];n[d.uuid]===void 0&&(n[d.uuid]=a.parse(d)),i[d.uuid]=n[d.uuid]}}return i}parseAnimations(e){const r={};if(e!==void 0)for(let n=0;n<e.length;n++){const i=e[n],a=sB.parse(i);r[a.uuid]=a}return r}parseImages(e,r){const n=this,i={};let a;function o(d){return n.manager.itemStart(d),a.load(d,function(){n.manager.itemEnd(d)},void 0,function(){n.manager.itemError(d),n.manager.itemEnd(d)})}function s(d){if(typeof d=="string"){const b=d,L=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(b)?b:n.resourcePath+b;return o(L)}else return d.data?{data:AN(d.type,d.data),width:d.width,height:d.height}:null}if(e!==void 0&&e.length>0){const d=new cZ(r);a=new lB(d),a.setCrossOrigin(this.crossOrigin);for(let b=0,L=e.length;b<L;b++){const B=e[b],V=B.url;if(Array.isArray(V)){const X=[];for(let ie=0,de=V.length;ie<de;ie++){const ae=V[ie],U=s(ae);U!==null&&(U instanceof HTMLImageElement?X.push(U):X.push(new $y(U.data,U.width,U.height)))}i[B.uuid]=new wk(X)}else{const X=s(B.url);i[B.uuid]=new wk(X)}}}return i}async parseImagesAsync(e){const r=this,n={};let i;async function a(o){if(typeof o=="string"){const s=o,d=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(s)?s:r.resourcePath+s;return await i.loadAsync(d)}else return o.data?{data:AN(o.type,o.data),width:o.width,height:o.height}:null}if(e!==void 0&&e.length>0){i=new lB(this.manager),i.setCrossOrigin(this.crossOrigin);for(let o=0,s=e.length;o<s;o++){const d=e[o],b=d.url;if(Array.isArray(b)){const L=[];for(let B=0,V=b.length;B<V;B++){const X=b[B],ie=await a(X);ie!==null&&(ie instanceof HTMLImageElement?L.push(ie):L.push(new $y(ie.data,ie.width,ie.height)))}n[d.uuid]=new wk(L)}else{const L=await a(d.url);n[d.uuid]=new wk(L)}}}return n}parseTextures(e,r){function n(a,o){return typeof a=="number"?a:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",a),o[a])}const i={};if(e!==void 0)for(let a=0,o=e.length;a<o;a++){const s=e[a];s.image===void 0&&console.warn('THREE.ObjectLoader: No "image" specified for',s.uuid),r[s.image]===void 0&&console.warn("THREE.ObjectLoader: Undefined image",s.image);const d=r[s.image],b=d.data;let L;Array.isArray(b)?(L=new mU,b.length===6&&(L.needsUpdate=!0)):(b&&b.data?L=new $y:L=new Fg,b&&(L.needsUpdate=!0)),L.source=d,L.uuid=s.uuid,s.name!==void 0&&(L.name=s.name),s.mapping!==void 0&&(L.mapping=n(s.mapping,AZt)),s.channel!==void 0&&(L.channel=s.channel),s.offset!==void 0&&L.offset.fromArray(s.offset),s.repeat!==void 0&&L.repeat.fromArray(s.repeat),s.center!==void 0&&L.center.fromArray(s.center),s.rotation!==void 0&&(L.rotation=s.rotation),s.wrap!==void 0&&(L.wrapS=n(s.wrap[0],$Ie),L.wrapT=n(s.wrap[1],$Ie)),s.format!==void 0&&(L.format=s.format),s.internalFormat!==void 0&&(L.internalFormat=s.internalFormat),s.type!==void 0&&(L.type=s.type),s.colorSpace!==void 0&&(L.colorSpace=s.colorSpace),s.minFilter!==void 0&&(L.minFilter=n(s.minFilter,WIe)),s.magFilter!==void 0&&(L.magFilter=n(s.magFilter,WIe)),s.anisotropy!==void 0&&(L.anisotropy=s.anisotropy),s.flipY!==void 0&&(L.flipY=s.flipY),s.generateMipmaps!==void 0&&(L.generateMipmaps=s.generateMipmaps),s.premultiplyAlpha!==void 0&&(L.premultiplyAlpha=s.premultiplyAlpha),s.unpackAlignment!==void 0&&(L.unpackAlignment=s.unpackAlignment),s.compareFunction!==void 0&&(L.compareFunction=s.compareFunction),s.userData!==void 0&&(L.userData=s.userData),i[s.uuid]=L}return i}parseObject(e,r,n,i,a){let o;function s(V){return r[V]===void 0&&console.warn("THREE.ObjectLoader: Undefined geometry",V),r[V]}function d(V){if(V!==void 0){if(Array.isArray(V)){const X=[];for(let ie=0,de=V.length;ie<de;ie++){const ae=V[ie];n[ae]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",ae),X.push(n[ae])}return X}return n[V]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",V),n[V]}}function b(V){return i[V]===void 0&&console.warn("THREE.ObjectLoader: Undefined texture",V),i[V]}let L,B;switch(e.type){case"Scene":o=new mF,e.background!==void 0&&(Number.isInteger(e.background)?o.background=new Wu(e.background):o.background=b(e.background)),e.environment!==void 0&&(o.environment=b(e.environment)),e.fog!==void 0&&(e.fog.type==="Fog"?o.fog=new gU(e.fog.color,e.fog.near,e.fog.far):e.fog.type==="FogExp2"&&(o.fog=new WX(e.fog.color,e.fog.density)),e.fog.name!==""&&(o.fog.name=e.fog.name)),e.backgroundBlurriness!==void 0&&(o.backgroundBlurriness=e.backgroundBlurriness),e.backgroundIntensity!==void 0&&(o.backgroundIntensity=e.backgroundIntensity),e.backgroundRotation!==void 0&&o.backgroundRotation.fromArray(e.backgroundRotation),e.environmentIntensity!==void 0&&(o.environmentIntensity=e.environmentIntensity),e.environmentRotation!==void 0&&o.environmentRotation.fromArray(e.environmentRotation);break;case"PerspectiveCamera":o=new sy(e.fov,e.aspect,e.near,e.far),e.focus!==void 0&&(o.focus=e.focus),e.zoom!==void 0&&(o.zoom=e.zoom),e.filmGauge!==void 0&&(o.filmGauge=e.filmGauge),e.filmOffset!==void 0&&(o.filmOffset=e.filmOffset),e.view!==void 0&&(o.view=Object.assign({},e.view));break;case"OrthographicCamera":o=new VC(e.left,e.right,e.top,e.bottom,e.near,e.far),e.zoom!==void 0&&(o.zoom=e.zoom),e.view!==void 0&&(o.view=Object.assign({},e.view));break;case"AmbientLight":o=new PWe(e.color,e.intensity);break;case"DirectionalLight":o=new IWe(e.color,e.intensity),o.target=e.target||"";break;case"PointLight":o=new kWe(e.color,e.intensity,e.distance,e.decay);break;case"RectAreaLight":o=new DWe(e.color,e.intensity,e.width,e.height);break;case"SpotLight":o=new RWe(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay),o.target=e.target||"";break;case"HemisphereLight":o=new MWe(e.color,e.groundColor,e.intensity);break;case"LightProbe":o=new OWe().fromJSON(e);break;case"SkinnedMesh":L=s(e.geometry),B=d(e.material),o=new K$e(L,B),e.bindMode!==void 0&&(o.bindMode=e.bindMode),e.bindMatrix!==void 0&&o.bindMatrix.fromArray(e.bindMatrix),e.skeleton!==void 0&&(o.skeleton=e.skeleton);break;case"Mesh":L=s(e.geometry),B=d(e.material),o=new hc(L,B);break;case"InstancedMesh":L=s(e.geometry),B=d(e.material);const V=e.count,X=e.instanceMatrix,ie=e.instanceColor;o=new J$e(L,B,V),o.instanceMatrix=new _8(new Float32Array(X.array),16),ie!==void 0&&(o.instanceColor=new _8(new Float32Array(ie.array),ie.itemSize));break;case"BatchedMesh":L=s(e.geometry),B=d(e.material),o=new Q$e(e.maxInstanceCount,e.maxVertexCount,e.maxIndexCount,B),o.geometry=L,o.perObjectFrustumCulled=e.perObjectFrustumCulled,o.sortObjects=e.sortObjects,o._drawRanges=e.drawRanges,o._reservedRanges=e.reservedRanges,o._geometryInfo=e.geometryInfo.map(de=>{let ae=null,U=null;return de.boundingBox!==void 0&&(ae=new xg().fromJSON(de.boundingBox)),de.boundingSphere!==void 0&&(U=new Mb().fromJSON(de.boundingSphere)),{...de,boundingBox:ae,boundingSphere:U}}),o._instanceInfo=e.instanceInfo,o._availableInstanceIds=e._availableInstanceIds,o._availableGeometryIds=e._availableGeometryIds,o._nextIndexStart=e.nextIndexStart,o._nextVertexStart=e.nextVertexStart,o._geometryCount=e.geometryCount,o._maxInstanceCount=e.maxInstanceCount,o._maxVertexCount=e.maxVertexCount,o._maxIndexCount=e.maxIndexCount,o._geometryInitialized=e.geometryInitialized,o._matricesTexture=b(e.matricesTexture.uuid),o._indirectTexture=b(e.indirectTexture.uuid),e.colorsTexture!==void 0&&(o._colorsTexture=b(e.colorsTexture.uuid)),e.boundingSphere!==void 0&&(o.boundingSphere=new Mb().fromJSON(e.boundingSphere)),e.boundingBox!==void 0&&(o.boundingBox=new xg().fromJSON(e.boundingBox));break;case"LOD":o=new Z$e;break;case"Line":o=new Cp(s(e.geometry),d(e.material));break;case"LineLoop":o=new eWe(s(e.geometry),d(e.material));break;case"LineSegments":o=new $5(s(e.geometry),d(e.material));break;case"PointCloud":case"Points":o=new tWe(s(e.geometry),d(e.material));break;case"Sprite":o=new X$e(d(e.material));break;case"Group":o=new CN;break;case"Bone":o=new Cye;break;default:o=new Hp}if(o.uuid=e.uuid,e.name!==void 0&&(o.name=e.name),e.matrix!==void 0?(o.matrix.fromArray(e.matrix),e.matrixAutoUpdate!==void 0&&(o.matrixAutoUpdate=e.matrixAutoUpdate),o.matrixAutoUpdate&&o.matrix.decompose(o.position,o.quaternion,o.scale)):(e.position!==void 0&&o.position.fromArray(e.position),e.rotation!==void 0&&o.rotation.fromArray(e.rotation),e.quaternion!==void 0&&o.quaternion.fromArray(e.quaternion),e.scale!==void 0&&o.scale.fromArray(e.scale)),e.up!==void 0&&o.up.fromArray(e.up),e.castShadow!==void 0&&(o.castShadow=e.castShadow),e.receiveShadow!==void 0&&(o.receiveShadow=e.receiveShadow),e.shadow&&(e.shadow.intensity!==void 0&&(o.shadow.intensity=e.shadow.intensity),e.shadow.bias!==void 0&&(o.shadow.bias=e.shadow.bias),e.shadow.normalBias!==void 0&&(o.shadow.normalBias=e.shadow.normalBias),e.shadow.radius!==void 0&&(o.shadow.radius=e.shadow.radius),e.shadow.mapSize!==void 0&&o.shadow.mapSize.fromArray(e.shadow.mapSize),e.shadow.camera!==void 0&&(o.shadow.camera=this.parseObject(e.shadow.camera))),e.visible!==void 0&&(o.visible=e.visible),e.frustumCulled!==void 0&&(o.frustumCulled=e.frustumCulled),e.renderOrder!==void 0&&(o.renderOrder=e.renderOrder),e.userData!==void 0&&(o.userData=e.userData),e.layers!==void 0&&(o.layers.mask=e.layers),e.children!==void 0){const V=e.children;for(let X=0;X<V.length;X++)o.add(this.parseObject(V[X],r,n,i,a))}if(e.animations!==void 0){const V=e.animations;for(let X=0;X<V.length;X++){const ie=V[X];o.animations.push(a[ie])}}if(e.type==="LOD"){e.autoUpdate!==void 0&&(o.autoUpdate=e.autoUpdate);const V=e.levels;for(let X=0;X<V.length;X++){const ie=V[X],de=o.getObjectByProperty("uuid",ie.object);de!==void 0&&o.addLevel(de,ie.distance,ie.hysteresis)}}return o}bindSkeletons(e,r){Object.keys(r).length!==0&&e.traverse(function(n){if(n.isSkinnedMesh===!0&&n.skeleton!==void 0){const i=r[n.skeleton];i===void 0?console.warn("THREE.ObjectLoader: No skeleton found with UUID:",n.skeleton):n.bind(i,n.bindMatrix)}})}bindLightTargets(e){e.traverse(function(r){if(r.isDirectionalLight||r.isSpotLight){const n=r.target,i=e.getObjectByProperty("uuid",n);i!==void 0?r.target=i:r.target=new Hp}})}}const AZt={UVMapping:e4,CubeReflectionMapping:U5,CubeRefractionMapping:t4,EquirectangularReflectionMapping:r4,EquirectangularRefractionMapping:Y9,CubeUVReflectionMapping:hF},$Ie={RepeatWrapping:sE,ClampToEdgeWrapping:Ng,MirroredRepeatWrapping:X9},WIe={NearestFilter:Mp,NearestMipmapNearestFilter:hye,NearestMipmapLinearFilter:EN,LinearFilter:vp,LinearMipmapNearestFilter:a9,LinearMipmapLinearFilter:E5},zae=new WeakMap;class CZt extends X2{constructor(e){super(e),this.isImageBitmapLoader=!0,typeof createImageBitmap>"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"},this._abortController=new AbortController}setOptions(e){return this.options=e,this}load(e,r,n,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const a=this,o=A5.get(`image-bitmap:${e}`);if(o!==void 0){if(a.manager.itemStart(e),o.then){o.then(b=>{if(zae.has(o)===!0)i&&i(zae.get(o)),a.manager.itemError(e),a.manager.itemEnd(e);else return r&&r(b),a.manager.itemEnd(e),b});return}return setTimeout(function(){r&&r(o),a.manager.itemEnd(e)},0),o}const s={};s.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",s.headers=this.requestHeader,s.signal=typeof AbortSignal.any=="function"?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal;const d=fetch(e,s).then(function(b){return b.blob()}).then(function(b){return createImageBitmap(b,Object.assign(a.options,{colorSpaceConversion:"none"}))}).then(function(b){return A5.add(`image-bitmap:${e}`,b),r&&r(b),a.manager.itemEnd(e),b}).catch(function(b){i&&i(b),zae.set(d,b),A5.remove(`image-bitmap:${e}`),a.manager.itemError(e),a.manager.itemEnd(e)});A5.add(`image-bitmap:${e}`,d),a.manager.itemStart(e)}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}}let VV;class Wye{static getContext(){return VV===void 0&&(VV=new(window.AudioContext||window.webkitAudioContext)),VV}static setContext(e){VV=e}}class MZt extends X2{constructor(e){super(e)}load(e,r,n,i){const a=this,o=new uE(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(d){try{const b=d.slice(0);Wye.getContext().decodeAudioData(b,function(B){r(B)}).catch(s)}catch(b){s(b)}},n,i);function s(d){i?i(d):console.error(d),a.manager.itemError(e)}}}const YIe=new Rc,XIe=new Rc,_D=new Rc;class RZt{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new sy,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new sy,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){const r=this._cache;if(r.focus!==e.focus||r.fov!==e.fov||r.aspect!==e.aspect*this.aspect||r.near!==e.near||r.far!==e.far||r.zoom!==e.zoom||r.eyeSep!==this.eyeSep){r.focus=e.focus,r.fov=e.fov,r.aspect=e.aspect*this.aspect,r.near=e.near,r.far=e.far,r.zoom=e.zoom,r.eyeSep=this.eyeSep,_D.copy(e.projectionMatrix);const i=r.eyeSep/2,a=i*r.near/r.focus,o=r.near*Math.tan(hL*r.fov*.5)/r.zoom;let s,d;XIe.elements[12]=-i,YIe.elements[12]=i,s=-o*r.aspect+a,d=o*r.aspect+a,_D.elements[0]=2*r.near/(d-s),_D.elements[8]=(d+s)/(d-s),this.cameraL.projectionMatrix.copy(_D),s=-o*r.aspect-a,d=o*r.aspect-a,_D.elements[0]=2*r.near/(d-s),_D.elements[8]=(d+s)/(d-s),this.cameraR.projectionMatrix.copy(_D)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(XIe),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(YIe)}}class FWe extends sy{constructor(e=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=e}}class dZ{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=performance.now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const r=performance.now();e=(r-this.oldTime)/1e3,this.oldTime=r,this.elapsedTime+=e}return e}}const wD=new oi,Bae=new fh,kZt=new oi,SD=new oi,TD=new oi;class IZt extends Hp{constructor(){super(),this.type="AudioListener",this.context=Wye.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new dZ}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);const r=this.context.listener;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(wD,Bae,kZt),SD.set(0,0,-1).applyQuaternion(Bae),TD.set(0,1,0).applyQuaternion(Bae),r.positionX){const n=this.context.currentTime+this.timeDelta;r.positionX.linearRampToValueAtTime(wD.x,n),r.positionY.linearRampToValueAtTime(wD.y,n),r.positionZ.linearRampToValueAtTime(wD.z,n),r.forwardX.linearRampToValueAtTime(SD.x,n),r.forwardY.linearRampToValueAtTime(SD.y,n),r.forwardZ.linearRampToValueAtTime(SD.z,n),r.upX.linearRampToValueAtTime(TD.x,n),r.upY.linearRampToValueAtTime(TD.y,n),r.upZ.linearRampToValueAtTime(TD.z,n)}else r.setPosition(wD.x,wD.y,wD.z),r.setOrientation(SD.x,SD.y,SD.z,TD.x,TD.y,TD.z)}}class zWe extends Hp{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(this.isPlaying===!0){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+e;const r=this.context.createBufferSource();return r.buffer=this.buffer,r.loop=this.loop,r.loopStart=this.loopStart,r.loopEnd=this.loopEnd,r.onended=this.onEnded.bind(this),r.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=r,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(e=0){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this._progress=0,this.source!==null&&(this.source.stop(this.context.currentTime+e),this.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,r=this.filters.length;e<r;e++)this.filters[e-1].connect(this.filters[e]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this._connected=!0,this}disconnect(){if(this._connected!==!1){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let e=1,r=this.filters.length;e<r;e++)this.filters[e-1].disconnect(this.filters[e]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this._connected=!1,this}}getFilters(){return this.filters}setFilters(e){return e||(e=[]),this._connected===!0?(this.disconnect(),this.filters=e.slice(),this.connect()):this.filters=e.slice(),this}setDetune(e){return this.detune=e,this.isPlaying===!0&&this.source.detune!==void 0&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(e){return this.setFilters(e?[e]:[])}setPlaybackRate(e){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.playbackRate=e,this.isPlaying===!0&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=!1,this._progress=0}getLoop(){return this.hasPlaybackControl===!1?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop}setLoop(e){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.loop=e,this.isPlaying===!0&&(this.source.loop=this.loop),this}setLoopStart(e){return this.loopStart=e,this}setLoopEnd(e){return this.loopEnd=e,this}getVolume(){return this.gain.gain.value}setVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}copy(e,r){return super.copy(e,r),e.sourceType!=="buffer"?(console.warn("THREE.Audio: Audio source type cannot be copied."),this):(this.autoplay=e.autoplay,this.buffer=e.buffer,this.detune=e.detune,this.loop=e.loop,this.loopStart=e.loopStart,this.loopEnd=e.loopEnd,this.offset=e.offset,this.duration=e.duration,this.playbackRate=e.playbackRate,this.hasPlaybackControl=e.hasPlaybackControl,this.sourceType=e.sourceType,this.filters=e.filters.slice(),this)}clone(e){return new this.constructor(this.listener).copy(this,e)}}const ED=new oi,ZIe=new fh,PZt=new oi,AD=new oi;class DZt extends zWe{constructor(e){super(e),this.panner=this.context.createPanner(),this.panner.panningModel="HRTF",this.panner.connect(this.gain)}connect(){return super.connect(),this.panner.connect(this.gain),this}disconnect(){return super.disconnect(),this.panner.disconnect(this.gain),this}getOutput(){return this.panner}getRefDistance(){return this.panner.refDistance}setRefDistance(e){return this.panner.refDistance=e,this}getRolloffFactor(){return this.panner.rolloffFactor}setRolloffFactor(e){return this.panner.rolloffFactor=e,this}getDistanceModel(){return this.panner.distanceModel}setDistanceModel(e){return this.panner.distanceModel=e,this}getMaxDistance(){return this.panner.maxDistance}setMaxDistance(e){return this.panner.maxDistance=e,this}setDirectionalCone(e,r,n){return this.panner.coneInnerAngle=e,this.panner.coneOuterAngle=r,this.panner.coneOuterGain=n,this}updateMatrixWorld(e){if(super.updateMatrixWorld(e),this.hasPlaybackControl===!0&&this.isPlaying===!1)return;this.matrixWorld.decompose(ED,ZIe,PZt),AD.set(0,0,1).applyQuaternion(ZIe);const r=this.panner;if(r.positionX){const n=this.context.currentTime+this.listener.timeDelta;r.positionX.linearRampToValueAtTime(ED.x,n),r.positionY.linearRampToValueAtTime(ED.y,n),r.positionZ.linearRampToValueAtTime(ED.z,n),r.orientationX.linearRampToValueAtTime(AD.x,n),r.orientationY.linearRampToValueAtTime(AD.y,n),r.orientationZ.linearRampToValueAtTime(AD.z,n)}else r.setPosition(ED.x,ED.y,ED.z),r.setOrientation(AD.x,AD.y,AD.z)}}class LZt{constructor(e,r=2048){this.analyser=e.context.createAnalyser(),this.analyser.fftSize=r,this.data=new Uint8Array(this.analyser.frequencyBinCount),e.getOutput().connect(this.analyser)}getFrequencyData(){return this.analyser.getByteFrequencyData(this.data),this.data}getAverageFrequency(){let e=0;const r=this.getFrequencyData();for(let n=0;n<r.length;n++)e+=r[n];return e/r.length}}class BWe{constructor(e,r,n){this.binding=e,this.valueSize=n;let i,a,o;switch(r){case"quaternion":i=this._slerp,a=this._slerpAdditive,o=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(n*6),this._workIndex=5;break;case"string":case"bool":i=this._select,a=this._select,o=this._setAdditiveIdentityOther,this.buffer=new Array(n*5);break;default:i=this._lerp,a=this._lerpAdditive,o=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(n*5)}this._mixBufferRegion=i,this._mixBufferRegionAdditive=a,this._setIdentity=o,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(e,r){const n=this.buffer,i=this.valueSize,a=e*i+i;let o=this.cumulativeWeight;if(o===0){for(let s=0;s!==i;++s)n[a+s]=n[s];o=r}else{o+=r;const s=r/o;this._mixBufferRegion(n,a,0,s,i)}this.cumulativeWeight=o}accumulateAdditive(e){const r=this.buffer,n=this.valueSize,i=n*this._addIndex;this.cumulativeWeightAdditive===0&&this._setIdentity(),this._mixBufferRegionAdditive(r,i,0,e,n),this.cumulativeWeightAdditive+=e}apply(e){const r=this.valueSize,n=this.buffer,i=e*r+r,a=this.cumulativeWeight,o=this.cumulativeWeightAdditive,s=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,a<1){const d=r*this._origIndex;this._mixBufferRegion(n,i,d,1-a,r)}o>0&&this._mixBufferRegionAdditive(n,i,this._addIndex*r,1,r);for(let d=r,b=r+r;d!==b;++d)if(n[d]!==n[d+r]){s.setValue(n,i);break}}saveOriginalState(){const e=this.binding,r=this.buffer,n=this.valueSize,i=n*this._origIndex;e.getValue(r,i);for(let a=n,o=i;a!==o;++a)r[a]=r[i+a%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,r=e+this.valueSize;for(let n=e;n<r;n++)this.buffer[n]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){const e=this._origIndex*this.valueSize,r=this._addIndex*this.valueSize;for(let n=0;n<this.valueSize;n++)this.buffer[r+n]=this.buffer[e+n]}_select(e,r,n,i,a){if(i>=.5)for(let o=0;o!==a;++o)e[r+o]=e[n+o]}_slerp(e,r,n,i){fh.slerpFlat(e,r,e,r,e,n,i)}_slerpAdditive(e,r,n,i,a){const o=this._workIndex*a;fh.multiplyQuaternionsFlat(e,o,e,r,e,n),fh.slerpFlat(e,r,e,r,e,o,i)}_lerp(e,r,n,i,a){const o=1-i;for(let s=0;s!==a;++s){const d=r+s;e[d]=e[d]*o+e[n+s]*i}}_lerpAdditive(e,r,n,i,a){for(let o=0;o!==a;++o){const s=r+o;e[s]=e[s]+e[n+o]*i}}}const Yye="\\[\\]\\.:\\/",OZt=new RegExp("["+Yye+"]","g"),Xye="[^"+Yye+"]",NZt="[^"+Yye.replace("\\.","")+"]",FZt=/((?:WC+[\/:])*)/.source.replace("WC",Xye),zZt=/(WCOD+)?/.source.replace("WCOD",NZt),BZt=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Xye),UZt=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Xye),HZt=new RegExp("^"+FZt+zZt+BZt+UZt+"$"),jZt=["material","materials","bones","map"];class VZt{constructor(e,r,n){const i=n||Wv.parseTrackName(r);this._targetGroup=e,this._bindings=e.subscribe_(r,i)}getValue(e,r){this.bind();const n=this._targetGroup.nCachedObjects_,i=this._bindings[n];i!==void 0&&i.getValue(e,r)}setValue(e,r){const n=this._bindings;for(let i=this._targetGroup.nCachedObjects_,a=n.length;i!==a;++i)n[i].setValue(e,r)}bind(){const e=this._bindings;for(let r=this._targetGroup.nCachedObjects_,n=e.length;r!==n;++r)e[r].bind()}unbind(){const e=this._bindings;for(let r=this._targetGroup.nCachedObjects_,n=e.length;r!==n;++r)e[r].unbind()}}class Wv{constructor(e,r,n){this.path=r,this.parsedPath=n||Wv.parseTrackName(r),this.node=Wv.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,r,n){return e&&e.isAnimationObjectGroup?new Wv.Composite(e,r,n):new Wv(e,r,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(OZt,"")}static parseTrackName(e){const r=HZt.exec(e);if(r===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const n={nodeName:r[2],objectName:r[3],objectIndex:r[4],propertyName:r[5],propertyIndex:r[6]},i=n.nodeName&&n.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){const a=n.nodeName.substring(i+1);jZt.indexOf(a)!==-1&&(n.nodeName=n.nodeName.substring(0,i),n.objectName=a)}if(n.propertyName===null||n.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,r){if(r===void 0||r===""||r==="."||r===-1||r===e.name||r===e.uuid)return e;if(e.skeleton){const n=e.skeleton.getBoneByName(r);if(n!==void 0)return n}if(e.children){const n=function(a){for(let o=0;o<a.length;o++){const s=a[o];if(s.name===r||s.uuid===r)return s;const d=n(s.children);if(d)return d}return null},i=n(e.children);if(i)return i}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,r){e[r]=this.targetObject[this.propertyName]}_getValue_array(e,r){const n=this.resolvedProperty;for(let i=0,a=n.length;i!==a;++i)e[r++]=n[i]}_getValue_arrayElement(e,r){e[r]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,r){this.resolvedProperty.toArray(e,r)}_setValue_direct(e,r){this.targetObject[this.propertyName]=e[r]}_setValue_direct_setNeedsUpdate(e,r){this.targetObject[this.propertyName]=e[r],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,r){this.targetObject[this.propertyName]=e[r],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,r){const n=this.resolvedProperty;for(let i=0,a=n.length;i!==a;++i)n[i]=e[r++]}_setValue_array_setNeedsUpdate(e,r){const n=this.resolvedProperty;for(let i=0,a=n.length;i!==a;++i)n[i]=e[r++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,r){const n=this.resolvedProperty;for(let i=0,a=n.length;i!==a;++i)n[i]=e[r++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,r){this.resolvedProperty[this.propertyIndex]=e[r]}_setValue_arrayElement_setNeedsUpdate(e,r){this.resolvedProperty[this.propertyIndex]=e[r],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,r){this.resolvedProperty[this.propertyIndex]=e[r],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,r){this.resolvedProperty.fromArray(e,r)}_setValue_fromArray_setNeedsUpdate(e,r){this.resolvedProperty.fromArray(e,r),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,r){this.resolvedProperty.fromArray(e,r),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,r){this.bind(),this.getValue(e,r)}_setValue_unbound(e,r){this.bind(),this.setValue(e,r)}bind(){let e=this.node;const r=this.parsedPath,n=r.objectName,i=r.propertyName;let a=r.propertyIndex;if(e||(e=Wv.findNode(this.rootNode,r.nodeName),this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e){console.warn("THREE.PropertyBinding: No target node found for track: "+this.path+".");return}if(n){let b=r.objectIndex;switch(n){case"materials":if(!e.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.materials){console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}e=e.material.materials;break;case"bones":if(!e.skeleton){console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}e=e.skeleton.bones;for(let L=0;L<e.length;L++)if(e[L].name===b){b=L;break}break;case"map":if("map"in e){e=e.map;break}if(!e.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.map){console.error("THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);return}e=e.material.map;break;default:if(e[n]===void 0){console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);return}e=e[n]}if(b!==void 0){if(e[b]===void 0){console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);return}e=e[b]}}const o=e[i];if(o===void 0){const b=r.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+b+"."+i+" but it wasn't found.",e);return}let s=this.Versioning.None;this.targetObject=e,e.isMaterial===!0?s=this.Versioning.NeedsUpdate:e.isObject3D===!0&&(s=this.Versioning.MatrixWorldNeedsUpdate);let d=this.BindingType.Direct;if(a!==void 0){if(i==="morphTargetInfluences"){if(!e.geometry){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(!e.geometry.morphAttributes){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}e.morphTargetDictionary[a]!==void 0&&(a=e.morphTargetDictionary[a])}d=this.BindingType.ArrayElement,this.resolvedProperty=o,this.propertyIndex=a}else o.fromArray!==void 0&&o.toArray!==void 0?(d=this.BindingType.HasFromToArray,this.resolvedProperty=o):Array.isArray(o)?(d=this.BindingType.EntireArray,this.resolvedProperty=o):this.propertyName=i;this.getValue=this.GetterByBindingType[d],this.setValue=this.SetterByBindingTypeAndVersioning[d][s]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}Wv.Composite=VZt;Wv.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3};Wv.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2};Wv.prototype.GetterByBindingType=[Wv.prototype._getValue_direct,Wv.prototype._getValue_array,Wv.prototype._getValue_arrayElement,Wv.prototype._getValue_toArray];Wv.prototype.SetterByBindingTypeAndVersioning=[[Wv.prototype._setValue_direct,Wv.prototype._setValue_direct_setNeedsUpdate,Wv.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Wv.prototype._setValue_array,Wv.prototype._setValue_array_setNeedsUpdate,Wv.prototype._setValue_array_setMatrixWorldNeedsUpdate],[Wv.prototype._setValue_arrayElement,Wv.prototype._setValue_arrayElement_setNeedsUpdate,Wv.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Wv.prototype._setValue_fromArray,Wv.prototype._setValue_fromArray_setNeedsUpdate,Wv.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class qZt{constructor(){this.isAnimationObjectGroup=!0,this.uuid=lE(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;const e={};this._indicesByUUID=e;for(let n=0,i=arguments.length;n!==i;++n)e[arguments[n].uuid]=n;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};const r=this;this.stats={objects:{get total(){return r._objects.length},get inUse(){return this.total-r.nCachedObjects_}},get bindingsPerObject(){return r._bindings.length}}}add(){const e=this._objects,r=this._indicesByUUID,n=this._paths,i=this._parsedPaths,a=this._bindings,o=a.length;let s,d=e.length,b=this.nCachedObjects_;for(let L=0,B=arguments.length;L!==B;++L){const V=arguments[L],X=V.uuid;let ie=r[X];if(ie===void 0){ie=d++,r[X]=ie,e.push(V);for(let de=0,ae=o;de!==ae;++de)a[de].push(new Wv(V,n[de],i[de]))}else if(ie<b){s=e[ie];const de=--b,ae=e[de];r[ae.uuid]=ie,e[ie]=ae,r[X]=de,e[de]=V;for(let U=0,ve=o;U!==ve;++U){const Se=a[U],Pe=Se[de];let Me=Se[ie];Se[ie]=Pe,Me===void 0&&(Me=new Wv(V,n[U],i[U])),Se[de]=Me}}else e[ie]!==s&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=b}remove(){const e=this._objects,r=this._indicesByUUID,n=this._bindings,i=n.length;let a=this.nCachedObjects_;for(let o=0,s=arguments.length;o!==s;++o){const d=arguments[o],b=d.uuid,L=r[b];if(L!==void 0&&L>=a){const B=a++,V=e[B];r[V.uuid]=L,e[L]=V,r[b]=B,e[B]=d;for(let X=0,ie=i;X!==ie;++X){const de=n[X],ae=de[B],U=de[L];de[L]=ae,de[B]=U}}}this.nCachedObjects_=a}uncache(){const e=this._objects,r=this._indicesByUUID,n=this._bindings,i=n.length;let a=this.nCachedObjects_,o=e.length;for(let s=0,d=arguments.length;s!==d;++s){const b=arguments[s],L=b.uuid,B=r[L];if(B!==void 0)if(delete r[L],B<a){const V=--a,X=e[V],ie=--o,de=e[ie];r[X.uuid]=B,e[B]=X,r[de.uuid]=V,e[V]=de,e.pop();for(let ae=0,U=i;ae!==U;++ae){const ve=n[ae],Se=ve[V],Pe=ve[ie];ve[B]=Se,ve[V]=Pe,ve.pop()}}else{const V=--o,X=e[V];V>0&&(r[X.uuid]=B),e[B]=X,e.pop();for(let ie=0,de=i;ie!==de;++ie){const ae=n[ie];ae[B]=ae[V],ae.pop()}}}this.nCachedObjects_=a}subscribe_(e,r){const n=this._bindingsIndicesByPath;let i=n[e];const a=this._bindings;if(i!==void 0)return a[i];const o=this._paths,s=this._parsedPaths,d=this._objects,b=d.length,L=this.nCachedObjects_,B=new Array(b);i=a.length,n[e]=i,o.push(e),s.push(r),a.push(B);for(let V=L,X=d.length;V!==X;++V){const ie=d[V];B[V]=new Wv(ie,e,r)}return B}unsubscribe_(e){const r=this._bindingsIndicesByPath,n=r[e];if(n!==void 0){const i=this._paths,a=this._parsedPaths,o=this._bindings,s=o.length-1,d=o[s],b=e[s];r[b]=n,o[n]=d,o.pop(),a[n]=a[s],a.pop(),i[n]=i[s],i.pop()}}}class UWe{constructor(e,r,n=null,i=r.blendMode){this._mixer=e,this._clip=r,this._localRoot=n,this.blendMode=i;const a=r.tracks,o=a.length,s=new Array(o),d={endingStart:tL,endingEnd:tL};for(let b=0;b!==o;++b){const L=a[b].createInterpolant(null);s[b]=L,L.settings=d}this._interpolantSettings=d,this._interpolants=s,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=R$e,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,r){return this.loop=e,this.repetitions=r,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,r,n=!1){if(e.fadeOut(r),this.fadeIn(r),n===!0){const i=this._clip.duration,a=e._clip.duration,o=a/i,s=i/a;e.warp(1,o,r),this.warp(s,1,r)}return this}crossFadeTo(e,r,n=!1){return e.crossFadeFrom(this,r,n)}stopFading(){const e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,r,n){const i=this._mixer,a=i.time,o=this.timeScale;let s=this._timeScaleInterpolant;s===null&&(s=i._lendControlInterpolant(),this._timeScaleInterpolant=s);const d=s.parameterPositions,b=s.sampleValues;return d[0]=a,d[1]=a+n,b[0]=e/o,b[1]=r/o,this}stopWarping(){const e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,r,n,i){if(!this.enabled){this._updateWeight(e);return}const a=this._startTime;if(a!==null){const d=(e-a)*n;d<0||n===0?r=0:(this._startTime=null,r=n*d)}r*=this._updateTimeScale(e);const o=this._updateTime(r),s=this._updateWeight(e);if(s>0){const d=this._interpolants,b=this._propertyBindings;switch(this.blendMode){case yye:for(let L=0,B=d.length;L!==B;++L)d[L].evaluate(o),b[L].accumulateAdditive(s);break;case VX:default:for(let L=0,B=d.length;L!==B;++L)d[L].evaluate(o),b[L].accumulate(i,s)}}}_updateWeight(e){let r=0;if(this.enabled){r=this.weight;const n=this._weightInterpolant;if(n!==null){const i=n.evaluate(e)[0];r*=i,e>n.parameterPositions[1]&&(this.stopFading(),i===0&&(this.enabled=!1))}}return this._effectiveWeight=r,r}_updateTimeScale(e){let r=0;if(!this.paused){r=this.timeScale;const n=this._timeScaleInterpolant;if(n!==null){const i=n.evaluate(e)[0];r*=i,e>n.parameterPositions[1]&&(this.stopWarping(),r===0?this.paused=!0:this.timeScale=r)}}return this._effectiveTimeScale=r,r}_updateTime(e){const r=this._clip.duration,n=this.loop;let i=this.time+e,a=this._loopCount;const o=n===k$e;if(e===0)return a===-1?i:o&&(a&1)===1?r-i:i;if(n===M$e){a===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(i>=r)i=r;else if(i<0)i=0;else{this.time=i;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(a===-1&&(e>=0?(a=0,this._setEndings(!0,this.repetitions===0,o)):this._setEndings(this.repetitions===0,!0,o)),i>=r||i<0){const s=Math.floor(i/r);i-=r*s,a+=Math.abs(s);const d=this.repetitions-a;if(d<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,i=e>0?r:0,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(d===1){const b=e<0;this._setEndings(b,!b,o)}else this._setEndings(!1,!1,o);this._loopCount=a,this.time=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:s})}}else this.time=i;if(o&&(a&1)===1)return r-i}return i}_setEndings(e,r,n){const i=this._interpolantSettings;n?(i.endingStart=rL,i.endingEnd=rL):(e?i.endingStart=this.zeroSlopeAtStart?rL:tL:i.endingStart=K9,r?i.endingEnd=this.zeroSlopeAtEnd?rL:tL:i.endingEnd=K9)}_scheduleFading(e,r,n){const i=this._mixer,a=i.time;let o=this._weightInterpolant;o===null&&(o=i._lendControlInterpolant(),this._weightInterpolant=o);const s=o.parameterPositions,d=o.sampleValues;return s[0]=a,d[0]=r,s[1]=a+e,d[1]=n,this}}const GZt=new Float32Array(1);class $Zt extends G5{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,r){const n=e._localRoot||this._root,i=e._clip.tracks,a=i.length,o=e._propertyBindings,s=e._interpolants,d=n.uuid,b=this._bindingsByRootAndName;let L=b[d];L===void 0&&(L={},b[d]=L);for(let B=0;B!==a;++B){const V=i[B],X=V.name;let ie=L[X];if(ie!==void 0)++ie.referenceCount,o[B]=ie;else{if(ie=o[B],ie!==void 0){ie._cacheIndex===null&&(++ie.referenceCount,this._addInactiveBinding(ie,d,X));continue}const de=r&&r._propertyBindings[B].binding.parsedPath;ie=new BWe(Wv.create(n,X,de),V.ValueTypeName,V.getValueSize()),++ie.referenceCount,this._addInactiveBinding(ie,d,X),o[B]=ie}s[B].resultBuffer=ie.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const n=(e._localRoot||this._root).uuid,i=e._clip.uuid,a=this._actionsByClip[i];this._bindAction(e,a&&a.knownActions[0]),this._addInactiveAction(e,i,n)}const r=e._propertyBindings;for(let n=0,i=r.length;n!==i;++n){const a=r[n];a.useCount++===0&&(this._lendBinding(a),a.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const r=e._propertyBindings;for(let n=0,i=r.length;n!==i;++n){const a=r[n];--a.useCount===0&&(a.restoreOriginalState(),this._takeBackBinding(a))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const r=e._cacheIndex;return r!==null&&r<this._nActiveActions}_addInactiveAction(e,r,n){const i=this._actions,a=this._actionsByClip;let o=a[r];if(o===void 0)o={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,a[r]=o;else{const s=o.knownActions;e._byClipCacheIndex=s.length,s.push(e)}e._cacheIndex=i.length,i.push(e),o.actionByRoot[n]=e}_removeInactiveAction(e){const r=this._actions,n=r[r.length-1],i=e._cacheIndex;n._cacheIndex=i,r[i]=n,r.pop(),e._cacheIndex=null;const a=e._clip.uuid,o=this._actionsByClip,s=o[a],d=s.knownActions,b=d[d.length-1],L=e._byClipCacheIndex;b._byClipCacheIndex=L,d[L]=b,d.pop(),e._byClipCacheIndex=null;const B=s.actionByRoot,V=(e._localRoot||this._root).uuid;delete B[V],d.length===0&&delete o[a],this._removeInactiveBindingsForAction(e)}_removeInactiveBindingsForAction(e){const r=e._propertyBindings;for(let n=0,i=r.length;n!==i;++n){const a=r[n];--a.referenceCount===0&&this._removeInactiveBinding(a)}}_lendAction(e){const r=this._actions,n=e._cacheIndex,i=this._nActiveActions++,a=r[i];e._cacheIndex=i,r[i]=e,a._cacheIndex=n,r[n]=a}_takeBackAction(e){const r=this._actions,n=e._cacheIndex,i=--this._nActiveActions,a=r[i];e._cacheIndex=i,r[i]=e,a._cacheIndex=n,r[n]=a}_addInactiveBinding(e,r,n){const i=this._bindingsByRootAndName,a=this._bindings;let o=i[r];o===void 0&&(o={},i[r]=o),o[n]=e,e._cacheIndex=a.length,a.push(e)}_removeInactiveBinding(e){const r=this._bindings,n=e.binding,i=n.rootNode.uuid,a=n.path,o=this._bindingsByRootAndName,s=o[i],d=r[r.length-1],b=e._cacheIndex;d._cacheIndex=b,r[b]=d,r.pop(),delete s[a],Object.keys(s).length===0&&delete o[i]}_lendBinding(e){const r=this._bindings,n=e._cacheIndex,i=this._nActiveBindings++,a=r[i];e._cacheIndex=i,r[i]=e,a._cacheIndex=n,r[n]=a}_takeBackBinding(e){const r=this._bindings,n=e._cacheIndex,i=--this._nActiveBindings,a=r[i];e._cacheIndex=i,r[i]=e,a._cacheIndex=n,r[n]=a}_lendControlInterpolant(){const e=this._controlInterpolants,r=this._nActiveControlInterpolants++;let n=e[r];return n===void 0&&(n=new jye(new Float32Array(2),new Float32Array(2),1,GZt),n.__cacheIndex=r,e[r]=n),n}_takeBackControlInterpolant(e){const r=this._controlInterpolants,n=e.__cacheIndex,i=--this._nActiveControlInterpolants,a=r[i];e.__cacheIndex=i,r[i]=e,a.__cacheIndex=n,r[n]=a}clipAction(e,r,n){const i=r||this._root,a=i.uuid;let o=typeof e=="string"?sB.findByName(i,e):e;const s=o!==null?o.uuid:e,d=this._actionsByClip[s];let b=null;if(n===void 0&&(o!==null?n=o.blendMode:n=VX),d!==void 0){const B=d.actionByRoot[a];if(B!==void 0&&B.blendMode===n)return B;b=d.knownActions[0],o===null&&(o=b._clip)}if(o===null)return null;const L=new UWe(this,o,r,n);return this._bindAction(L,b),this._addInactiveAction(L,s,a),L}existingAction(e,r){const n=r||this._root,i=n.uuid,a=typeof e=="string"?sB.findByName(n,e):e,o=a?a.uuid:e,s=this._actionsByClip[o];return s!==void 0&&s.actionByRoot[i]||null}stopAllAction(){const e=this._actions,r=this._nActiveActions;for(let n=r-1;n>=0;--n)e[n].stop();return this}update(e){e*=this.timeScale;const r=this._actions,n=this._nActiveActions,i=this.time+=e,a=Math.sign(e),o=this._accuIndex^=1;for(let b=0;b!==n;++b)r[b]._update(i,e,a,o);const s=this._bindings,d=this._nActiveBindings;for(let b=0;b!==d;++b)s[b].apply(o);return this}setTime(e){this.time=0;for(let r=0;r<this._actions.length;r++)this._actions[r].time=0;return this.update(e)}getRoot(){return this._root}uncacheClip(e){const r=this._actions,n=e.uuid,i=this._actionsByClip,a=i[n];if(a!==void 0){const o=a.knownActions;for(let s=0,d=o.length;s!==d;++s){const b=o[s];this._deactivateAction(b);const L=b._cacheIndex,B=r[r.length-1];b._cacheIndex=null,b._byClipCacheIndex=null,B._cacheIndex=L,r[L]=B,r.pop(),this._removeInactiveBindingsForAction(b)}delete i[n]}}uncacheRoot(e){const r=e.uuid,n=this._actionsByClip;for(const o in n){const s=n[o].actionByRoot,d=s[r];d!==void 0&&(this._deactivateAction(d),this._removeInactiveAction(d))}const i=this._bindingsByRootAndName,a=i[r];if(a!==void 0)for(const o in a){const s=a[o];s.restoreOriginalState(),this._removeInactiveBinding(s)}}uncacheAction(e,r){const n=this.existingAction(e,r);n!==null&&(this._deactivateAction(n),this._removeInactiveAction(n))}}class WZt extends wye{constructor(e=1,r=1,n=1,i={}){super(e,r,i),this.isRenderTarget3D=!0,this.depth=n,this.texture=new GX(null,e,r,n),this._setTextureOptions(i),this.texture.isRenderTargetTexture=!0}}class Zye{constructor(e){this.value=e}clone(){return new Zye(this.value.clone===void 0?this.value:this.value.clone())}}let YZt=0;class XZt extends G5{constructor(){super(),this.isUniformsGroup=!0,Object.defineProperty(this,"id",{value:YZt++}),this.name="",this.usage=Q9,this.uniforms=[]}add(e){return this.uniforms.push(e),this}remove(e){const r=this.uniforms.indexOf(e);return r!==-1&&this.uniforms.splice(r,1),this}setName(e){return this.name=e,this}setUsage(e){return this.usage=e,this}dispose(){this.dispatchEvent({type:"dispose"})}copy(e){this.name=e.name,this.usage=e.usage;const r=e.uniforms;this.uniforms.length=0;for(let n=0,i=r.length;n<i;n++){const a=Array.isArray(r[n])?r[n]:[r[n]];for(let o=0;o<a.length;o++)this.uniforms.push(a[o].clone())}return this}clone(){return new this.constructor().copy(this)}}class CW extends YX{constructor(e,r,n=1){super(e,r),this.isInstancedInterleavedBuffer=!0,this.meshPerAttribute=n}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}clone(e){const r=super.clone(e);return r.meshPerAttribute=this.meshPerAttribute,r}toJSON(e){const r=super.toJSON(e);return r.isInstancedInterleavedBuffer=!0,r.meshPerAttribute=this.meshPerAttribute,r}}class ZZt{constructor(e,r,n,i,a,o=!1){this.isGLBufferAttribute=!0,this.name="",this.buffer=e,this.type=r,this.itemSize=n,this.elementSize=i,this.count=a,this.normalized=o,this.version=0}set needsUpdate(e){e===!0&&this.version++}setBuffer(e){return this.buffer=e,this}setType(e,r){return this.type=e,this.elementSize=r,this}setItemSize(e){return this.itemSize=e,this}setCount(e){return this.count=e,this}}const KIe=new Rc;class hZ{constructor(e,r,n=0,i=1/0){this.ray=new r6(e,r),this.near=n,this.far=i,this.camera=null,this.layers=new b8,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,r){this.ray.set(e,r)}setFromCamera(e,r){r.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(r.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(r).sub(this.ray.origin).normalize(),this.camera=r):r.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(r.near+r.far)/(r.near-r.far)).unproject(r),this.ray.direction.set(0,0,-1).transformDirection(r.matrixWorld),this.camera=r):console.error("THREE.Raycaster: Unsupported camera type: "+r.type)}setFromXRController(e){return KIe.identity().extractRotation(e.matrixWorld),this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(0,0,-1).applyMatrix4(KIe),this}intersectObject(e,r=!0,n=[]){return Fpe(e,this,n,r),n.sort(JIe),n}intersectObjects(e,r=!0,n=[]){for(let i=0,a=e.length;i<a;i++)Fpe(e[i],this,n,r);return n.sort(JIe),n}}function JIe(t,e){return t.distance-e.distance}function Fpe(t,e,r,n){let i=!0;if(t.layers.test(e.layers)&&t.raycast(e,r)===!1&&(i=!1),i===!0&&n===!0){const a=t.children;for(let o=0,s=a.length;o<s;o++)Fpe(a[o],e,r,!0)}}class KZt{constructor(){this._previousTime=0,this._currentTime=0,this._startTime=performance.now(),this._delta=0,this._elapsed=0,this._timescale=1,this._document=null,this._pageVisibilityHandler=null}connect(e){this._document=e,e.hidden!==void 0&&(this._pageVisibilityHandler=JZt.bind(this),e.addEventListener("visibilitychange",this._pageVisibilityHandler,!1))}disconnect(){this._pageVisibilityHandler!==null&&(this._document.removeEventListener("visibilitychange",this._pageVisibilityHandler),this._pageVisibilityHandler=null),this._document=null}getDelta(){return this._delta/1e3}getElapsed(){return this._elapsed/1e3}getTimescale(){return this._timescale}setTimescale(e){return this._timescale=e,this}reset(){return this._currentTime=performance.now()-this._startTime,this}dispose(){this.disconnect()}update(e){return this._pageVisibilityHandler!==null&&this._document.hidden===!0?this._delta=0:(this._previousTime=this._currentTime,this._currentTime=(e!==void 0?e:performance.now())-this._startTime,this._delta=(this._currentTime-this._previousTime)*this._timescale,this._elapsed+=this._delta),this}}function JZt(){this._document.hidden===!1&&this.reset()}class MW{constructor(e=1,r=0,n=0){this.radius=e,this.phi=r,this.theta=n}set(e,r,n){return this.radius=e,this.phi=r,this.theta=n,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){return this.phi=Od(this.phi,1e-6,Math.PI-1e-6),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,r,n){return this.radius=Math.sqrt(e*e+r*r+n*n),this.radius===0?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos(Od(r/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}}class QZt{constructor(e=1,r=0,n=0){this.radius=e,this.theta=r,this.y=n}set(e,r,n){return this.radius=e,this.theta=r,this.y=n,this}copy(e){return this.radius=e.radius,this.theta=e.theta,this.y=e.y,this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,r,n){return this.radius=Math.sqrt(e*e+n*n),this.theta=Math.atan2(e,n),this.y=r,this}clone(){return new this.constructor().copy(this)}}class Kye{constructor(e,r,n,i){Kye.prototype.isMatrix2=!0,this.elements=[1,0,0,1],e!==void 0&&this.set(e,r,n,i)}identity(){return this.set(1,0,0,1),this}fromArray(e,r=0){for(let n=0;n<4;n++)this.elements[n]=e[n+r];return this}set(e,r,n,i){const a=this.elements;return a[0]=e,a[2]=r,a[1]=n,a[3]=i,this}}const QIe=new sl;class eKt{constructor(e=new sl(1/0,1/0),r=new sl(-1/0,-1/0)){this.isBox2=!0,this.min=e,this.max=r}set(e,r){return this.min.copy(e),this.max.copy(r),this}setFromPoints(e){this.makeEmpty();for(let r=0,n=e.length;r<n;r++)this.expandByPoint(e[r]);return this}setFromCenterAndSize(e,r){const n=QIe.copy(r).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(e){return this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,r){return r.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y}clampPoint(e,r){return r.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,QIe).distanceTo(e)}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const ePe=new oi,qV=new oi,VO=new oi,qO=new oi,Uae=new oi,tKt=new oi,rKt=new oi;class qC{constructor(e=new oi,r=new oi){this.start=e,this.end=r}set(e,r){return this.start.copy(e),this.end.copy(r),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,r){return this.delta(r).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,r){ePe.subVectors(e,this.start),qV.subVectors(this.end,this.start);const n=qV.dot(qV);let a=qV.dot(ePe)/n;return r&&(a=Od(a,0,1)),a}closestPointToPoint(e,r,n){const i=this.closestPointToPointParameter(e,r);return this.delta(n).multiplyScalar(i).add(this.start)}distanceSqToLine3(e,r=tKt,n=rKt){const i=10000000000000001e-32;let a,o;const s=this.start,d=e.start,b=this.end,L=e.end;VO.subVectors(b,s),qO.subVectors(L,d),Uae.subVectors(s,d);const B=VO.dot(VO),V=qO.dot(qO),X=qO.dot(Uae);if(B<=i&&V<=i)return r.copy(s),n.copy(d),r.sub(n),r.dot(r);if(B<=i)a=0,o=X/V,o=Od(o,0,1);else{const ie=VO.dot(Uae);if(V<=i)o=0,a=Od(-ie/B,0,1);else{const de=VO.dot(qO),ae=B*V-de*de;ae!==0?a=Od((de*X-ie*V)/ae,0,1):a=0,o=(de*a+X)/V,o<0?(o=0,a=Od(-ie/B,0,1)):o>1&&(o=1,a=Od((de-ie)/B,0,1))}}return r.copy(s).add(VO.multiplyScalar(a)),n.copy(d).add(qO.multiplyScalar(o)),r.sub(n),r.dot(r)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const tPe=new oi;class nKt extends Hp{constructor(e,r){super(),this.light=e,this.matrixAutoUpdate=!1,this.color=r,this.type="SpotLightHelper";const n=new Jf,i=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let o=0,s=1,d=32;o<d;o++,s++){const b=o/d*Math.PI*2,L=s/d*Math.PI*2;i.push(Math.cos(b),Math.sin(b),1,Math.cos(L),Math.sin(L),1)}n.setAttribute("position",new Dc(i,3));const a=new Ww({fog:!1,toneMapped:!1});this.cone=new $5(n,a),this.add(this.cone),this.update()}dispose(){this.cone.geometry.dispose(),this.cone.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1),this.parent?(this.parent.updateWorldMatrix(!0),this.matrix.copy(this.parent.matrixWorld).invert().multiply(this.light.matrixWorld)):this.matrix.copy(this.light.matrixWorld),this.matrixWorld.copy(this.light.matrixWorld);const e=this.light.distance?this.light.distance:1e3,r=e*Math.tan(this.light.angle);this.cone.scale.set(r,r,e),tPe.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(tPe),this.color!==void 0?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}const hP=new oi,GV=new Rc,Hae=new Rc;class iKt extends $5{constructor(e){const r=HWe(e),n=new Jf,i=[],a=[];for(let b=0;b<r.length;b++){const L=r[b];L.parent&&L.parent.isBone&&(i.push(0,0,0),i.push(0,0,0),a.push(0,0,0),a.push(0,0,0))}n.setAttribute("position",new Dc(i,3)),n.setAttribute("color",new Dc(a,3));const o=new Ww({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0});super(n,o),this.isSkeletonHelper=!0,this.type="SkeletonHelper",this.root=e,this.bones=r,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1;const s=new Wu(255),d=new Wu(65280);this.setColors(s,d)}updateMatrixWorld(e){const r=this.bones,n=this.geometry,i=n.getAttribute("position");Hae.copy(this.root.matrixWorld).invert();for(let a=0,o=0;a<r.length;a++){const s=r[a];s.parent&&s.parent.isBone&&(GV.multiplyMatrices(Hae,s.matrixWorld),hP.setFromMatrixPosition(GV),i.setXYZ(o,hP.x,hP.y,hP.z),GV.multiplyMatrices(Hae,s.parent.matrixWorld),hP.setFromMatrixPosition(GV),i.setXYZ(o+1,hP.x,hP.y,hP.z),o+=2)}n.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(e)}setColors(e,r){const i=this.geometry.getAttribute("color");for(let a=0;a<i.count;a+=2)i.setXYZ(a,e.r,e.g,e.b),i.setXYZ(a+1,r.r,r.g,r.b);return i.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}function HWe(t){const e=[];t.isBone===!0&&e.push(t);for(let r=0;r<t.children.length;r++)e.push(...HWe(t.children[r]));return e}class aKt extends hc{constructor(e,r,n){const i=new n6(r,4,2),a=new dA({wireframe:!0,fog:!1,toneMapped:!1});super(i,a),this.light=e,this.color=n,this.type="PointLightHelper",this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}dispose(){this.geometry.dispose(),this.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.color!==void 0?this.material.color.set(this.color):this.material.color.copy(this.light.color)}}const oKt=new oi,rPe=new Wu,nPe=new Wu;class sKt extends Hp{constructor(e,r,n){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,this.type="HemisphereLightHelper";const i=new O3(r);i.rotateY(Math.PI*.5),this.material=new dA({wireframe:!0,fog:!1,toneMapped:!1}),this.color===void 0&&(this.material.vertexColors=!0);const a=i.getAttribute("position"),o=new Float32Array(a.count*3);i.setAttribute("color",new Kh(o,3)),this.add(new hc(i,this.material)),this.update()}dispose(){this.children[0].geometry.dispose(),this.children[0].material.dispose()}update(){const e=this.children[0];if(this.color!==void 0)this.material.color.set(this.color);else{const r=e.geometry.getAttribute("color");rPe.copy(this.light.color),nPe.copy(this.light.groundColor);for(let n=0,i=r.count;n<i;n++){const a=n<i/2?rPe:nPe;r.setXYZ(n,a.r,a.g,a.b)}r.needsUpdate=!0}this.light.updateWorldMatrix(!0,!1),e.lookAt(oKt.setFromMatrixPosition(this.light.matrixWorld).negate())}}class lKt extends $5{constructor(e=10,r=10,n=4473924,i=8947848){n=new Wu(n),i=new Wu(i);const a=r/2,o=e/r,s=e/2,d=[],b=[];for(let V=0,X=0,ie=-s;V<=r;V++,ie+=o){d.push(-s,0,ie,s,0,ie),d.push(ie,0,-s,ie,0,s);const de=V===a?n:i;de.toArray(b,X),X+=3,de.toArray(b,X),X+=3,de.toArray(b,X),X+=3,de.toArray(b,X),X+=3}const L=new Jf;L.setAttribute("position",new Dc(d,3)),L.setAttribute("color",new Dc(b,3));const B=new Ww({vertexColors:!0,toneMapped:!1});super(L,B),this.type="GridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}class uKt extends $5{constructor(e=10,r=16,n=8,i=64,a=4473924,o=8947848){a=new Wu(a),o=new Wu(o);const s=[],d=[];if(r>1)for(let B=0;B<r;B++){const V=B/r*(Math.PI*2),X=Math.sin(V)*e,ie=Math.cos(V)*e;s.push(0,0,0),s.push(X,0,ie);const de=B&1?a:o;d.push(de.r,de.g,de.b),d.push(de.r,de.g,de.b)}for(let B=0;B<n;B++){const V=B&1?a:o,X=e-e/n*B;for(let ie=0;ie<i;ie++){let de=ie/i*(Math.PI*2),ae=Math.sin(de)*X,U=Math.cos(de)*X;s.push(ae,0,U),d.push(V.r,V.g,V.b),de=(ie+1)/i*(Math.PI*2),ae=Math.sin(de)*X,U=Math.cos(de)*X,s.push(ae,0,U),d.push(V.r,V.g,V.b)}}const b=new Jf;b.setAttribute("position",new Dc(s,3)),b.setAttribute("color",new Dc(d,3));const L=new Ww({vertexColors:!0,toneMapped:!1});super(b,L),this.type="PolarGridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}const iPe=new oi,$V=new oi,aPe=new oi;class cKt extends Hp{constructor(e,r,n){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,this.type="DirectionalLightHelper",r===void 0&&(r=1);let i=new Jf;i.setAttribute("position",new Dc([-r,r,0,r,r,0,r,-r,0,-r,-r,0,-r,r,0],3));const a=new Ww({fog:!1,toneMapped:!1});this.lightPlane=new Cp(i,a),this.add(this.lightPlane),i=new Jf,i.setAttribute("position",new Dc([0,0,0,0,0,1],3)),this.targetLine=new Cp(i,a),this.add(this.targetLine),this.update()}dispose(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1),iPe.setFromMatrixPosition(this.light.matrixWorld),$V.setFromMatrixPosition(this.light.target.matrixWorld),aPe.subVectors($V,iPe),this.lightPlane.lookAt($V),this.color!==void 0?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt($V),this.targetLine.scale.z=aPe.length()}}const WV=new oi,f1=new $X;class jWe extends $5{constructor(e){const r=new Jf,n=new Ww({color:16777215,vertexColors:!0,toneMapped:!1}),i=[],a=[],o={};s("n1","n2"),s("n2","n4"),s("n4","n3"),s("n3","n1"),s("f1","f2"),s("f2","f4"),s("f4","f3"),s("f3","f1"),s("n1","f1"),s("n2","f2"),s("n3","f3"),s("n4","f4"),s("p","n1"),s("p","n2"),s("p","n3"),s("p","n4"),s("u1","u2"),s("u2","u3"),s("u3","u1"),s("c","t"),s("p","c"),s("cn1","cn2"),s("cn3","cn4"),s("cf1","cf2"),s("cf3","cf4");function s(ie,de){d(ie),d(de)}function d(ie){i.push(0,0,0),a.push(0,0,0),o[ie]===void 0&&(o[ie]=[]),o[ie].push(i.length/3-1)}r.setAttribute("position",new Dc(i,3)),r.setAttribute("color",new Dc(a,3)),super(r,n),this.type="CameraHelper",this.camera=e,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=o,this.update();const b=new Wu(16755200),L=new Wu(16711680),B=new Wu(43775),V=new Wu(16777215),X=new Wu(3355443);this.setColors(b,L,B,V,X)}setColors(e,r,n,i,a){const s=this.geometry.getAttribute("color");return s.setXYZ(0,e.r,e.g,e.b),s.setXYZ(1,e.r,e.g,e.b),s.setXYZ(2,e.r,e.g,e.b),s.setXYZ(3,e.r,e.g,e.b),s.setXYZ(4,e.r,e.g,e.b),s.setXYZ(5,e.r,e.g,e.b),s.setXYZ(6,e.r,e.g,e.b),s.setXYZ(7,e.r,e.g,e.b),s.setXYZ(8,e.r,e.g,e.b),s.setXYZ(9,e.r,e.g,e.b),s.setXYZ(10,e.r,e.g,e.b),s.setXYZ(11,e.r,e.g,e.b),s.setXYZ(12,e.r,e.g,e.b),s.setXYZ(13,e.r,e.g,e.b),s.setXYZ(14,e.r,e.g,e.b),s.setXYZ(15,e.r,e.g,e.b),s.setXYZ(16,e.r,e.g,e.b),s.setXYZ(17,e.r,e.g,e.b),s.setXYZ(18,e.r,e.g,e.b),s.setXYZ(19,e.r,e.g,e.b),s.setXYZ(20,e.r,e.g,e.b),s.setXYZ(21,e.r,e.g,e.b),s.setXYZ(22,e.r,e.g,e.b),s.setXYZ(23,e.r,e.g,e.b),s.setXYZ(24,r.r,r.g,r.b),s.setXYZ(25,r.r,r.g,r.b),s.setXYZ(26,r.r,r.g,r.b),s.setXYZ(27,r.r,r.g,r.b),s.setXYZ(28,r.r,r.g,r.b),s.setXYZ(29,r.r,r.g,r.b),s.setXYZ(30,r.r,r.g,r.b),s.setXYZ(31,r.r,r.g,r.b),s.setXYZ(32,n.r,n.g,n.b),s.setXYZ(33,n.r,n.g,n.b),s.setXYZ(34,n.r,n.g,n.b),s.setXYZ(35,n.r,n.g,n.b),s.setXYZ(36,n.r,n.g,n.b),s.setXYZ(37,n.r,n.g,n.b),s.setXYZ(38,i.r,i.g,i.b),s.setXYZ(39,i.r,i.g,i.b),s.setXYZ(40,a.r,a.g,a.b),s.setXYZ(41,a.r,a.g,a.b),s.setXYZ(42,a.r,a.g,a.b),s.setXYZ(43,a.r,a.g,a.b),s.setXYZ(44,a.r,a.g,a.b),s.setXYZ(45,a.r,a.g,a.b),s.setXYZ(46,a.r,a.g,a.b),s.setXYZ(47,a.r,a.g,a.b),s.setXYZ(48,a.r,a.g,a.b),s.setXYZ(49,a.r,a.g,a.b),s.needsUpdate=!0,this}update(){const e=this.geometry,r=this.pointMap,n=1,i=1;let a,o;if(f1.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),this.camera.reversedDepth===!0)a=1,o=0;else if(this.camera.coordinateSystem===tE)a=-1,o=1;else if(this.camera.coordinateSystem===g8)a=0,o=1;else throw new Error("THREE.CameraHelper.update(): Invalid coordinate system: "+this.camera.coordinateSystem);X1("c",r,e,f1,0,0,a),X1("t",r,e,f1,0,0,o),X1("n1",r,e,f1,-n,-i,a),X1("n2",r,e,f1,n,-i,a),X1("n3",r,e,f1,-n,i,a),X1("n4",r,e,f1,n,i,a),X1("f1",r,e,f1,-n,-i,o),X1("f2",r,e,f1,n,-i,o),X1("f3",r,e,f1,-n,i,o),X1("f4",r,e,f1,n,i,o),X1("u1",r,e,f1,n*.7,i*1.1,a),X1("u2",r,e,f1,-n*.7,i*1.1,a),X1("u3",r,e,f1,0,i*2,a),X1("cf1",r,e,f1,-n,0,o),X1("cf2",r,e,f1,n,0,o),X1("cf3",r,e,f1,0,-i,o),X1("cf4",r,e,f1,0,i,o),X1("cn1",r,e,f1,-n,0,a),X1("cn2",r,e,f1,n,0,a),X1("cn3",r,e,f1,0,-i,a),X1("cn4",r,e,f1,0,i,a),e.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}}function X1(t,e,r,n,i,a,o){WV.set(i,a,o).unproject(n);const s=e[t];if(s!==void 0){const d=r.getAttribute("position");for(let b=0,L=s.length;b<L;b++)d.setXYZ(s[b],WV.x,WV.y,WV.z)}}const YV=new xg;class fKt extends $5{constructor(e,r=16776960){const n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=new Float32Array(24),a=new Jf;a.setIndex(new Kh(n,1)),a.setAttribute("position",new Kh(i,3)),super(a,new Ww({color:r,toneMapped:!1})),this.object=e,this.type="BoxHelper",this.matrixAutoUpdate=!1,this.update()}update(){if(this.object!==void 0&&YV.setFromObject(this.object),YV.isEmpty())return;const e=YV.min,r=YV.max,n=this.geometry.attributes.position,i=n.array;i[0]=r.x,i[1]=r.y,i[2]=r.z,i[3]=e.x,i[4]=r.y,i[5]=r.z,i[6]=e.x,i[7]=e.y,i[8]=r.z,i[9]=r.x,i[10]=e.y,i[11]=r.z,i[12]=r.x,i[13]=r.y,i[14]=e.z,i[15]=e.x,i[16]=r.y,i[17]=e.z,i[18]=e.x,i[19]=e.y,i[20]=e.z,i[21]=r.x,i[22]=e.y,i[23]=e.z,n.needsUpdate=!0,this.geometry.computeBoundingSphere()}setFromObject(e){return this.object=e,this.update(),this}copy(e,r){return super.copy(e,r),this.object=e.object,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class dKt extends $5{constructor(e,r=16776960){const n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=[1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],a=new Jf;a.setIndex(new Kh(n,1)),a.setAttribute("position",new Dc(i,3)),super(a,new Ww({color:r,toneMapped:!1})),this.box=e,this.type="Box3Helper",this.geometry.computeBoundingSphere()}updateMatrixWorld(e){const r=this.box;r.isEmpty()||(r.getCenter(this.position),r.getSize(this.scale),this.scale.multiplyScalar(.5),super.updateMatrixWorld(e))}dispose(){this.geometry.dispose(),this.material.dispose()}}class hKt extends Cp{constructor(e,r=1,n=16776960){const i=n,a=[1,-1,0,-1,1,0,-1,-1,0,1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0],o=new Jf;o.setAttribute("position",new Dc(a,3)),o.computeBoundingSphere(),super(o,new Ww({color:i,toneMapped:!1})),this.type="PlaneHelper",this.plane=e,this.size=r;const s=[1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0],d=new Jf;d.setAttribute("position",new Dc(s,3)),d.computeBoundingSphere(),this.add(new hc(d,new dA({color:i,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1})))}updateMatrixWorld(e){this.position.set(0,0,0),this.scale.set(.5*this.size,.5*this.size,1),this.lookAt(this.plane.normal),this.translateZ(-this.plane.constant),super.updateMatrixWorld(e)}dispose(){this.geometry.dispose(),this.material.dispose(),this.children[0].geometry.dispose(),this.children[0].material.dispose()}}const oPe=new oi;let XV,jae;class pKt extends Hp{constructor(e=new oi(0,0,1),r=new oi(0,0,0),n=1,i=16776960,a=n*.2,o=a*.2){super(),this.type="ArrowHelper",XV===void 0&&(XV=new Jf,XV.setAttribute("position",new Dc([0,0,0,0,1,0],3)),jae=new yF(.5,1,5,1),jae.translate(0,-.5,0)),this.position.copy(r),this.line=new Cp(XV,new Ww({color:i,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new hc(jae,new dA({color:i,toneMapped:!1})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(e),this.setLength(n,a,o)}setDirection(e){if(e.y>.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{oPe.set(e.z,0,-e.x).normalize();const r=Math.acos(e.y);this.quaternion.setFromAxisAngle(oPe,r)}}setLength(e,r=e*.2,n=r*.2){this.line.scale.set(1,Math.max(1e-4,e-r),1),this.line.updateMatrix(),this.cone.scale.set(n,r,n),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class vKt extends $5{constructor(e=1){const r=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],n=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],i=new Jf;i.setAttribute("position",new Dc(r,3)),i.setAttribute("color",new Dc(n,3));const a=new Ww({vertexColors:!0,toneMapped:!1});super(i,a),this.type="AxesHelper"}setColors(e,r,n){const i=new Wu,a=this.geometry.attributes.color.array;return i.set(e),i.toArray(a,0),i.toArray(a,3),i.set(r),i.toArray(a,6),i.toArray(a,9),i.set(n),i.toArray(a,12),i.toArray(a,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class mKt{constructor(){this.type="ShapePath",this.color=new Wu,this.subPaths=[],this.currentPath=null}moveTo(e,r){return this.currentPath=new AW,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,r),this}lineTo(e,r){return this.currentPath.lineTo(e,r),this}quadraticCurveTo(e,r,n,i){return this.currentPath.quadraticCurveTo(e,r,n,i),this}bezierCurveTo(e,r,n,i,a,o){return this.currentPath.bezierCurveTo(e,r,n,i,a,o),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function r(U){const ve=[];for(let Se=0,Pe=U.length;Se<Pe;Se++){const Me=U[Se],Ie=new pL;Ie.curves=Me.curves,ve.push(Ie)}return ve}function n(U,ve){const Se=ve.length;let Pe=!1;for(let Me=Se-1,Ie=0;Ie<Se;Me=Ie++){let Ve=ve[Me],Ze=ve[Ie],Je=Ze.x-Ve.x,nt=Ze.y-Ve.y;if(Math.abs(nt)>Number.EPSILON){if(nt<0&&(Ve=ve[Ie],Je=-Je,Ze=ve[Me],nt=-nt),U.y<Ve.y||U.y>Ze.y)continue;if(U.y===Ve.y){if(U.x===Ve.x)return!0}else{const ut=nt*(U.x-Ve.x)-Je*(U.y-Ve.y);if(ut===0)return!0;if(ut<0)continue;Pe=!Pe}}else{if(U.y!==Ve.y)continue;if(Ze.x<=U.x&&U.x<=Ve.x||Ve.x<=U.x&&U.x<=Ze.x)return!0}}return Pe}const i=zC.isClockWise,a=this.subPaths;if(a.length===0)return[];let o,s,d;const b=[];if(a.length===1)return s=a[0],d=new pL,d.curves=s.curves,b.push(d),b;let L=!i(a[0].getPoints());L=e?!L:L;const B=[],V=[];let X=[],ie=0,de;V[ie]=void 0,X[ie]=[];for(let U=0,ve=a.length;U<ve;U++)s=a[U],de=s.getPoints(),o=i(de),o=e?!o:o,o?(!L&&V[ie]&&ie++,V[ie]={s:new pL,p:de},V[ie].s.curves=s.curves,L&&ie++,X[ie]=[]):X[ie].push({h:s,p:de[0]});if(!V[0])return r(a);if(V.length>1){let U=!1,ve=0;for(let Se=0,Pe=V.length;Se<Pe;Se++)B[Se]=[];for(let Se=0,Pe=V.length;Se<Pe;Se++){const Me=X[Se];for(let Ie=0;Ie<Me.length;Ie++){const Ve=Me[Ie];let Ze=!0;for(let Je=0;Je<V.length;Je++)n(Ve.p,V[Je].p)&&(Se!==Je&&ve++,Ze?(Ze=!1,B[Je].push(Ve)):U=!0);Ze&&B[Se].push(Ve)}}ve>0&&U===!1&&(X=B)}let ae;for(let U=0,ve=V.length;U<ve;U++){d=V[U].s,b.push(d),ae=X[U];for(let Se=0,Pe=ae.length;Se<Pe;Se++)d.holes.push(ae[Se].h)}return b}}class gKt extends G5{constructor(e,r=null){super(),this.object=e,this.domElement=r,this.enabled=!0,this.state=-1,this.keys={},this.mouseButtons={LEFT:null,MIDDLE:null,RIGHT:null},this.touches={ONE:null,TWO:null}}connect(e){if(e===void 0){console.warn("THREE.Controls: connect() now requires an element.");return}this.domElement!==null&&this.disconnect(),this.domElement=e}disconnect(){}dispose(){}update(){}}function yKt(t,e){const r=t.image&&t.image.width?t.image.width/t.image.height:1;return r>e?(t.repeat.x=1,t.repeat.y=r/e,t.offset.x=0,t.offset.y=(1-t.repeat.y)/2):(t.repeat.x=e/r,t.repeat.y=1,t.offset.x=(1-t.repeat.x)/2,t.offset.y=0),t}function bKt(t,e){const r=t.image&&t.image.width?t.image.width/t.image.height:1;return r>e?(t.repeat.x=e/r,t.repeat.y=1,t.offset.x=(1-t.repeat.x)/2,t.offset.y=0):(t.repeat.x=1,t.repeat.y=r/e,t.offset.x=0,t.offset.y=(1-t.repeat.y)/2),t}function xKt(t){return t.repeat.x=1,t.repeat.y=1,t.offset.x=0,t.offset.y=0,t}function zpe(t,e,r,n){const i=_Kt(n);switch(r){case mye:return t*e;case Dk:return t*e/i.components*i.byteLength;case pF:return t*e/i.components*i.byteLength;case pU:return t*e*2/i.components*i.byteLength;case vF:return t*e*2/i.components*i.byteLength;case gye:return t*e*3/i.components*i.byteLength;case Rp:return t*e*4/i.components*i.byteLength;case FL:return t*e*4/i.components*i.byteLength;case o9:case s9:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*8;case l9:case u9:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16;case Y$:case Z$:return Math.max(t,16)*Math.max(e,8)/4;case W$:case X$:return Math.max(t,8)*Math.max(e,8)/2;case K$:case J$:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*8;case Q$:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16;case eW:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16;case tW:return Math.floor((t+4)/5)*Math.floor((e+3)/4)*16;case rW:return Math.floor((t+4)/5)*Math.floor((e+4)/5)*16;case nW:return Math.floor((t+5)/6)*Math.floor((e+4)/5)*16;case iW:return Math.floor((t+5)/6)*Math.floor((e+5)/6)*16;case aW:return Math.floor((t+7)/8)*Math.floor((e+4)/5)*16;case oW:return Math.floor((t+7)/8)*Math.floor((e+5)/6)*16;case sW:return Math.floor((t+7)/8)*Math.floor((e+7)/8)*16;case lW:return Math.floor((t+9)/10)*Math.floor((e+4)/5)*16;case uW:return Math.floor((t+9)/10)*Math.floor((e+5)/6)*16;case cW:return Math.floor((t+9)/10)*Math.floor((e+7)/8)*16;case fW:return Math.floor((t+9)/10)*Math.floor((e+9)/10)*16;case dW:return Math.floor((t+11)/12)*Math.floor((e+9)/10)*16;case hW:return Math.floor((t+11)/12)*Math.floor((e+11)/12)*16;case pW:case vW:case mW:return Math.ceil(t/4)*Math.ceil(e/4)*16;case gW:case yW:return Math.ceil(t/4)*Math.ceil(e/4)*8;case bW:case xW:return Math.ceil(t/4)*Math.ceil(e/4)*16}throw new Error(`Unable to determine texture byte length for ${r} format.`)}function _Kt(t){switch(t){case e_:case h8:return{byteLength:1,components:1};case NL:case hU:case Og:return{byteLength:2,components:1};case HX:case jX:return{byteLength:2,components:4};case q2:case GP:case mp:return{byteLength:4,components:1};case pye:case vye:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${t}.`)}class wKt{static contain(e,r){return yKt(e,r)}static cover(e,r){return bKt(e,r)}static fill(e){return xKt(e)}static getByteLength(e,r,n,i){return zpe(e,r,n,i)}}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:dF}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=dF);/**
 * @license
 * Copyright 2010-2025 Three.js Authors
 * SPDX-License-Identifier: MIT
 */function VWe(){let t=null,e=!1,r=null,n=null;function i(a,o){r(a,o),n=t.requestAnimationFrame(i)}return{start:function(){e!==!0&&r!==null&&(n=t.requestAnimationFrame(i),e=!0)},stop:function(){t.cancelAnimationFrame(n),e=!1},setAnimationLoop:function(a){r=a},setContext:function(a){t=a}}}function SKt(t){const e=new WeakMap;function r(s,d){const b=s.array,L=s.usage,B=b.byteLength,V=t.createBuffer();t.bindBuffer(d,V),t.bufferData(d,b,L),s.onUploadCallback();let X;if(b instanceof Float32Array)X=t.FLOAT;else if(typeof Float16Array<"u"&&b instanceof Float16Array)X=t.HALF_FLOAT;else if(b instanceof Uint16Array)s.isFloat16BufferAttribute?X=t.HALF_FLOAT:X=t.UNSIGNED_SHORT;else if(b instanceof Int16Array)X=t.SHORT;else if(b instanceof Uint32Array)X=t.UNSIGNED_INT;else if(b instanceof Int32Array)X=t.INT;else if(b instanceof Int8Array)X=t.BYTE;else if(b instanceof Uint8Array)X=t.UNSIGNED_BYTE;else if(b instanceof Uint8ClampedArray)X=t.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+b);return{buffer:V,type:X,bytesPerElement:b.BYTES_PER_ELEMENT,version:s.version,size:B}}function n(s,d,b){const L=d.array,B=d.updateRanges;if(t.bindBuffer(b,s),B.length===0)t.bufferSubData(b,0,L);else{B.sort((X,ie)=>X.start-ie.start);let V=0;for(let X=1;X<B.length;X++){const ie=B[V],de=B[X];de.start<=ie.start+ie.count+1?ie.count=Math.max(ie.count,de.start+de.count-ie.start):(++V,B[V]=de)}B.length=V+1;for(let X=0,ie=B.length;X<ie;X++){const de=B[X];t.bufferSubData(b,de.start*L.BYTES_PER_ELEMENT,L,de.start,de.count)}d.clearUpdateRanges()}d.onUploadCallback()}function i(s){return s.isInterleavedBufferAttribute&&(s=s.data),e.get(s)}function a(s){s.isInterleavedBufferAttribute&&(s=s.data);const d=e.get(s);d&&(t.deleteBuffer(d.buffer),e.delete(s))}function o(s,d){if(s.isInterleavedBufferAttribute&&(s=s.data),s.isGLBufferAttribute){const L=e.get(s);(!L||L.version<s.version)&&e.set(s,{buffer:s.buffer,type:s.type,bytesPerElement:s.elementSize,version:s.version});return}const b=e.get(s);if(b===void 0)e.set(s,r(s,d));else if(b.version<s.version){if(b.size!==s.array.byteLength)throw new Error("THREE.WebGLAttributes: The size of the buffer attribute's array buffer does not match the original size. Resizing buffer attributes is not supported.");n(b.buffer,s,d),b.version=s.version}}return{get:i,remove:a,update:o}}var TKt=`#ifdef USE_ALPHAHASH
	if ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;
#endif`,EKt=`#ifdef USE_ALPHAHASH
	const float ALPHA_HASH_SCALE = 0.05;
	float hash2D( vec2 value ) {
		return fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );
	}
	float hash3D( vec3 value ) {
		return hash2D( vec2( hash2D( value.xy ), value.z ) );
	}
	float getAlphaHashThreshold( vec3 position ) {
		float maxDeriv = max(
			length( dFdx( position.xyz ) ),
			length( dFdy( position.xyz ) )
		);
		float pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );
		vec2 pixScales = vec2(
			exp2( floor( log2( pixScale ) ) ),
			exp2( ceil( log2( pixScale ) ) )
		);
		vec2 alpha = vec2(
			hash3D( floor( pixScales.x * position.xyz ) ),
			hash3D( floor( pixScales.y * position.xyz ) )
		);
		float lerpFactor = fract( log2( pixScale ) );
		float x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;
		float a = min( lerpFactor, 1.0 - lerpFactor );
		vec3 cases = vec3(
			x * x / ( 2.0 * a * ( 1.0 - a ) ),
			( x - 0.5 * a ) / ( 1.0 - a ),
			1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )
		);
		float threshold = ( x < ( 1.0 - a ) )
			? ( ( x < a ) ? cases.x : cases.y )
			: cases.z;
		return clamp( threshold , 1.0e-6, 1.0 );
	}
#endif`,AKt=`#ifdef USE_ALPHAMAP
	diffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;
#endif`,CKt=`#ifdef USE_ALPHAMAP
	uniform sampler2D alphaMap;
#endif`,MKt=`#ifdef USE_ALPHATEST
	#ifdef ALPHA_TO_COVERAGE
	diffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a );
	if ( diffuseColor.a == 0.0 ) discard;
	#else
	if ( diffuseColor.a < alphaTest ) discard;
	#endif
#endif`,RKt=`#ifdef USE_ALPHATEST
	uniform float alphaTest;
#endif`,kKt=`#ifdef USE_AOMAP
	float ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;
	reflectedLight.indirectDiffuse *= ambientOcclusion;
	#if defined( USE_CLEARCOAT ) 
		clearcoatSpecularIndirect *= ambientOcclusion;
	#endif
	#if defined( USE_SHEEN ) 
		sheenSpecularIndirect *= ambientOcclusion;
	#endif
	#if defined( USE_ENVMAP ) && defined( STANDARD )
		float dotNV = saturate( dot( geometryNormal, geometryViewDir ) );
		reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );
	#endif
#endif`,IKt=`#ifdef USE_AOMAP
	uniform sampler2D aoMap;
	uniform float aoMapIntensity;
#endif`,PKt=`#ifdef USE_BATCHING
	#if ! defined( GL_ANGLE_multi_draw )
	#define gl_DrawID _gl_DrawID
	uniform int _gl_DrawID;
	#endif
	uniform highp sampler2D batchingTexture;
	uniform highp usampler2D batchingIdTexture;
	mat4 getBatchingMatrix( const in float i ) {
		int size = textureSize( batchingTexture, 0 ).x;
		int j = int( i ) * 4;
		int x = j % size;
		int y = j / size;
		vec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 );
		vec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 );
		vec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 );
		vec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 );
		return mat4( v1, v2, v3, v4 );
	}
	float getIndirectIndex( const in int i ) {
		int size = textureSize( batchingIdTexture, 0 ).x;
		int x = i % size;
		int y = i / size;
		return float( texelFetch( batchingIdTexture, ivec2( x, y ), 0 ).r );
	}
#endif
#ifdef USE_BATCHING_COLOR
	uniform sampler2D batchingColorTexture;
	vec3 getBatchingColor( const in float i ) {
		int size = textureSize( batchingColorTexture, 0 ).x;
		int j = int( i );
		int x = j % size;
		int y = j / size;
		return texelFetch( batchingColorTexture, ivec2( x, y ), 0 ).rgb;
	}
#endif`,DKt=`#ifdef USE_BATCHING
	mat4 batchingMatrix = getBatchingMatrix( getIndirectIndex( gl_DrawID ) );
#endif`,LKt=`vec3 transformed = vec3( position );
#ifdef USE_ALPHAHASH
	vPosition = vec3( position );
#endif`,OKt=`vec3 objectNormal = vec3( normal );
#ifdef USE_TANGENT
	vec3 objectTangent = vec3( tangent.xyz );
#endif`,NKt=`float G_BlinnPhong_Implicit( ) {
	return 0.25;
}
float D_BlinnPhong( const in float shininess, const in float dotNH ) {
	return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );
}
vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {
	vec3 halfDir = normalize( lightDir + viewDir );
	float dotNH = saturate( dot( normal, halfDir ) );
	float dotVH = saturate( dot( viewDir, halfDir ) );
	vec3 F = F_Schlick( specularColor, 1.0, dotVH );
	float G = G_BlinnPhong_Implicit( );
	float D = D_BlinnPhong( shininess, dotNH );
	return F * ( G * D );
} // validated`,FKt=`#ifdef USE_IRIDESCENCE
	const mat3 XYZ_TO_REC709 = mat3(
		 3.2404542, -0.9692660,  0.0556434,
		-1.5371385,  1.8760108, -0.2040259,
		-0.4985314,  0.0415560,  1.0572252
	);
	vec3 Fresnel0ToIor( vec3 fresnel0 ) {
		vec3 sqrtF0 = sqrt( fresnel0 );
		return ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );
	}
	vec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {
		return pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );
	}
	float IorToFresnel0( float transmittedIor, float incidentIor ) {
		return pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));
	}
	vec3 evalSensitivity( float OPD, vec3 shift ) {
		float phase = 2.0 * PI * OPD * 1.0e-9;
		vec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );
		vec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );
		vec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );
		vec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );
		xyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );
		xyz /= 1.0685e-7;
		vec3 rgb = XYZ_TO_REC709 * xyz;
		return rgb;
	}
	vec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {
		vec3 I;
		float iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );
		float sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );
		float cosTheta2Sq = 1.0 - sinTheta2Sq;
		if ( cosTheta2Sq < 0.0 ) {
			return vec3( 1.0 );
		}
		float cosTheta2 = sqrt( cosTheta2Sq );
		float R0 = IorToFresnel0( iridescenceIOR, outsideIOR );
		float R12 = F_Schlick( R0, 1.0, cosTheta1 );
		float T121 = 1.0 - R12;
		float phi12 = 0.0;
		if ( iridescenceIOR < outsideIOR ) phi12 = PI;
		float phi21 = PI - phi12;
		vec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );		vec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );
		vec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );
		vec3 phi23 = vec3( 0.0 );
		if ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;
		if ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;
		if ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;
		float OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;
		vec3 phi = vec3( phi21 ) + phi23;
		vec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );
		vec3 r123 = sqrt( R123 );
		vec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );
		vec3 C0 = R12 + Rs;
		I = C0;
		vec3 Cm = Rs - T121;
		for ( int m = 1; m <= 2; ++ m ) {
			Cm *= r123;
			vec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );
			I += Cm * Sm;
		}
		return max( I, vec3( 0.0 ) );
	}
#endif`,zKt=`#ifdef USE_BUMPMAP
	uniform sampler2D bumpMap;
	uniform float bumpScale;
	vec2 dHdxy_fwd() {
		vec2 dSTdx = dFdx( vBumpMapUv );
		vec2 dSTdy = dFdy( vBumpMapUv );
		float Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;
		float dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;
		float dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;
		return vec2( dBx, dBy );
	}
	vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {
		vec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) );
		vec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) );
		vec3 vN = surf_norm;
		vec3 R1 = cross( vSigmaY, vN );
		vec3 R2 = cross( vN, vSigmaX );
		float fDet = dot( vSigmaX, R1 ) * faceDirection;
		vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );
		return normalize( abs( fDet ) * surf_norm - vGrad );
	}
#endif`,BKt=`#if NUM_CLIPPING_PLANES > 0
	vec4 plane;
	#ifdef ALPHA_TO_COVERAGE
		float distanceToPlane, distanceGradient;
		float clipOpacity = 1.0;
		#pragma unroll_loop_start
		for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {
			plane = clippingPlanes[ i ];
			distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;
			distanceGradient = fwidth( distanceToPlane ) / 2.0;
			clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane );
			if ( clipOpacity == 0.0 ) discard;
		}
		#pragma unroll_loop_end
		#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES
			float unionClipOpacity = 1.0;
			#pragma unroll_loop_start
			for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {
				plane = clippingPlanes[ i ];
				distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;
				distanceGradient = fwidth( distanceToPlane ) / 2.0;
				unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane );
			}
			#pragma unroll_loop_end
			clipOpacity *= 1.0 - unionClipOpacity;
		#endif
		diffuseColor.a *= clipOpacity;
		if ( diffuseColor.a == 0.0 ) discard;
	#else
		#pragma unroll_loop_start
		for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {
			plane = clippingPlanes[ i ];
			if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;
		}
		#pragma unroll_loop_end
		#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES
			bool clipped = true;
			#pragma unroll_loop_start
			for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {
				plane = clippingPlanes[ i ];
				clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;
			}
			#pragma unroll_loop_end
			if ( clipped ) discard;
		#endif
	#endif
#endif`,UKt=`#if NUM_CLIPPING_PLANES > 0
	varying vec3 vClipPosition;
	uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];
#endif`,HKt=`#if NUM_CLIPPING_PLANES > 0
	varying vec3 vClipPosition;
#endif`,jKt=`#if NUM_CLIPPING_PLANES > 0
	vClipPosition = - mvPosition.xyz;
#endif`,VKt=`#if defined( USE_COLOR_ALPHA )
	diffuseColor *= vColor;
#elif defined( USE_COLOR )
	diffuseColor.rgb *= vColor;
#endif`,qKt=`#if defined( USE_COLOR_ALPHA )
	varying vec4 vColor;
#elif defined( USE_COLOR )
	varying vec3 vColor;
#endif`,GKt=`#if defined( USE_COLOR_ALPHA )
	varying vec4 vColor;
#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )
	varying vec3 vColor;
#endif`,$Kt=`#if defined( USE_COLOR_ALPHA )
	vColor = vec4( 1.0 );
#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )
	vColor = vec3( 1.0 );
#endif
#ifdef USE_COLOR
	vColor *= color;
#endif
#ifdef USE_INSTANCING_COLOR
	vColor.xyz *= instanceColor.xyz;
#endif
#ifdef USE_BATCHING_COLOR
	vec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );
	vColor.xyz *= batchingColor.xyz;
#endif`,WKt=`#define PI 3.141592653589793
#define PI2 6.283185307179586
#define PI_HALF 1.5707963267948966
#define RECIPROCAL_PI 0.3183098861837907
#define RECIPROCAL_PI2 0.15915494309189535
#define EPSILON 1e-6
#ifndef saturate
#define saturate( a ) clamp( a, 0.0, 1.0 )
#endif
#define whiteComplement( a ) ( 1.0 - saturate( a ) )
float pow2( const in float x ) { return x*x; }
vec3 pow2( const in vec3 x ) { return x*x; }
float pow3( const in float x ) { return x*x*x; }
float pow4( const in float x ) { float x2 = x*x; return x2*x2; }
float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }
float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }
highp float rand( const in vec2 uv ) {
	const highp float a = 12.9898, b = 78.233, c = 43758.5453;
	highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );
	return fract( sin( sn ) * c );
}
#ifdef HIGH_PRECISION
	float precisionSafeLength( vec3 v ) { return length( v ); }
#else
	float precisionSafeLength( vec3 v ) {
		float maxComponent = max3( abs( v ) );
		return length( v / maxComponent ) * maxComponent;
	}
#endif
struct IncidentLight {
	vec3 color;
	vec3 direction;
	bool visible;
};
struct ReflectedLight {
	vec3 directDiffuse;
	vec3 directSpecular;
	vec3 indirectDiffuse;
	vec3 indirectSpecular;
};
#ifdef USE_ALPHAHASH
	varying vec3 vPosition;
#endif
vec3 transformDirection( in vec3 dir, in mat4 matrix ) {
	return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );
}
vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {
	return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );
}
mat3 transposeMat3( const in mat3 m ) {
	mat3 tmp;
	tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );
	tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );
	tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );
	return tmp;
}
bool isPerspectiveMatrix( mat4 m ) {
	return m[ 2 ][ 3 ] == - 1.0;
}
vec2 equirectUv( in vec3 dir ) {
	float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;
	float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;
	return vec2( u, v );
}
vec3 BRDF_Lambert( const in vec3 diffuseColor ) {
	return RECIPROCAL_PI * diffuseColor;
}
vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {
	float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );
	return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );
}
float F_Schlick( const in float f0, const in float f90, const in float dotVH ) {
	float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );
	return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );
} // validated`,YKt=`#ifdef ENVMAP_TYPE_CUBE_UV
	#define cubeUV_minMipLevel 4.0
	#define cubeUV_minTileSize 16.0
	float getFace( vec3 direction ) {
		vec3 absDirection = abs( direction );
		float face = - 1.0;
		if ( absDirection.x > absDirection.z ) {
			if ( absDirection.x > absDirection.y )
				face = direction.x > 0.0 ? 0.0 : 3.0;
			else
				face = direction.y > 0.0 ? 1.0 : 4.0;
		} else {
			if ( absDirection.z > absDirection.y )
				face = direction.z > 0.0 ? 2.0 : 5.0;
			else
				face = direction.y > 0.0 ? 1.0 : 4.0;
		}
		return face;
	}
	vec2 getUV( vec3 direction, float face ) {
		vec2 uv;
		if ( face == 0.0 ) {
			uv = vec2( direction.z, direction.y ) / abs( direction.x );
		} else if ( face == 1.0 ) {
			uv = vec2( - direction.x, - direction.z ) / abs( direction.y );
		} else if ( face == 2.0 ) {
			uv = vec2( - direction.x, direction.y ) / abs( direction.z );
		} else if ( face == 3.0 ) {
			uv = vec2( - direction.z, direction.y ) / abs( direction.x );
		} else if ( face == 4.0 ) {
			uv = vec2( - direction.x, direction.z ) / abs( direction.y );
		} else {
			uv = vec2( direction.x, direction.y ) / abs( direction.z );
		}
		return 0.5 * ( uv + 1.0 );
	}
	vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {
		float face = getFace( direction );
		float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );
		mipInt = max( mipInt, cubeUV_minMipLevel );
		float faceSize = exp2( mipInt );
		highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;
		if ( face > 2.0 ) {
			uv.y += faceSize;
			face -= 3.0;
		}
		uv.x += face * faceSize;
		uv.x += filterInt * 3.0 * cubeUV_minTileSize;
		uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );
		uv.x *= CUBEUV_TEXEL_WIDTH;
		uv.y *= CUBEUV_TEXEL_HEIGHT;
		#ifdef texture2DGradEXT
			return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;
		#else
			return texture2D( envMap, uv ).rgb;
		#endif
	}
	#define cubeUV_r0 1.0
	#define cubeUV_m0 - 2.0
	#define cubeUV_r1 0.8
	#define cubeUV_m1 - 1.0
	#define cubeUV_r4 0.4
	#define cubeUV_m4 2.0
	#define cubeUV_r5 0.305
	#define cubeUV_m5 3.0
	#define cubeUV_r6 0.21
	#define cubeUV_m6 4.0
	float roughnessToMip( float roughness ) {
		float mip = 0.0;
		if ( roughness >= cubeUV_r1 ) {
			mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;
		} else if ( roughness >= cubeUV_r4 ) {
			mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;
		} else if ( roughness >= cubeUV_r5 ) {
			mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;
		} else if ( roughness >= cubeUV_r6 ) {
			mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;
		} else {
			mip = - 2.0 * log2( 1.16 * roughness );		}
		return mip;
	}
	vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {
		float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );
		float mipF = fract( mip );
		float mipInt = floor( mip );
		vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );
		if ( mipF == 0.0 ) {
			return vec4( color0, 1.0 );
		} else {
			vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );
			return vec4( mix( color0, color1, mipF ), 1.0 );
		}
	}
#endif`,XKt=`vec3 transformedNormal = objectNormal;
#ifdef USE_TANGENT
	vec3 transformedTangent = objectTangent;
#endif
#ifdef USE_BATCHING
	mat3 bm = mat3( batchingMatrix );
	transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );
	transformedNormal = bm * transformedNormal;
	#ifdef USE_TANGENT
		transformedTangent = bm * transformedTangent;
	#endif
#endif
#ifdef USE_INSTANCING
	mat3 im = mat3( instanceMatrix );
	transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );
	transformedNormal = im * transformedNormal;
	#ifdef USE_TANGENT
		transformedTangent = im * transformedTangent;
	#endif
#endif
transformedNormal = normalMatrix * transformedNormal;
#ifdef FLIP_SIDED
	transformedNormal = - transformedNormal;
#endif
#ifdef USE_TANGENT
	transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;
	#ifdef FLIP_SIDED
		transformedTangent = - transformedTangent;
	#endif
#endif`,ZKt=`#ifdef USE_DISPLACEMENTMAP
	uniform sampler2D displacementMap;
	uniform float displacementScale;
	uniform float displacementBias;
#endif`,KKt=`#ifdef USE_DISPLACEMENTMAP
	transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );
#endif`,JKt=`#ifdef USE_EMISSIVEMAP
	vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );
	#ifdef DECODE_VIDEO_TEXTURE_EMISSIVE
		emissiveColor = sRGBTransferEOTF( emissiveColor );
	#endif
	totalEmissiveRadiance *= emissiveColor.rgb;
#endif`,QKt=`#ifdef USE_EMISSIVEMAP
	uniform sampler2D emissiveMap;
#endif`,eJt="gl_FragColor = linearToOutputTexel( gl_FragColor );",tJt=`vec4 LinearTransferOETF( in vec4 value ) {
	return value;
}
vec4 sRGBTransferEOTF( in vec4 value ) {
	return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );
}
vec4 sRGBTransferOETF( in vec4 value ) {
	return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );
}`,rJt=`#ifdef USE_ENVMAP
	#ifdef ENV_WORLDPOS
		vec3 cameraToFrag;
		if ( isOrthographic ) {
			cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );
		} else {
			cameraToFrag = normalize( vWorldPosition - cameraPosition );
		}
		vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
		#ifdef ENVMAP_MODE_REFLECTION
			vec3 reflectVec = reflect( cameraToFrag, worldNormal );
		#else
			vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );
		#endif
	#else
		vec3 reflectVec = vReflect;
	#endif
	#ifdef ENVMAP_TYPE_CUBE
		vec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );
	#else
		vec4 envColor = vec4( 0.0 );
	#endif
	#ifdef ENVMAP_BLENDING_MULTIPLY
		outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );
	#elif defined( ENVMAP_BLENDING_MIX )
		outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );
	#elif defined( ENVMAP_BLENDING_ADD )
		outgoingLight += envColor.xyz * specularStrength * reflectivity;
	#endif
#endif`,nJt=`#ifdef USE_ENVMAP
	uniform float envMapIntensity;
	uniform float flipEnvMap;
	uniform mat3 envMapRotation;
	#ifdef ENVMAP_TYPE_CUBE
		uniform samplerCube envMap;
	#else
		uniform sampler2D envMap;
	#endif
	
#endif`,iJt=`#ifdef USE_ENVMAP
	uniform float reflectivity;
	#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )
		#define ENV_WORLDPOS
	#endif
	#ifdef ENV_WORLDPOS
		varying vec3 vWorldPosition;
		uniform float refractionRatio;
	#else
		varying vec3 vReflect;
	#endif
#endif`,aJt=`#ifdef USE_ENVMAP
	#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )
		#define ENV_WORLDPOS
	#endif
	#ifdef ENV_WORLDPOS
		
		varying vec3 vWorldPosition;
	#else
		varying vec3 vReflect;
		uniform float refractionRatio;
	#endif
#endif`,oJt=`#ifdef USE_ENVMAP
	#ifdef ENV_WORLDPOS
		vWorldPosition = worldPosition.xyz;
	#else
		vec3 cameraToVertex;
		if ( isOrthographic ) {
			cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );
		} else {
			cameraToVertex = normalize( worldPosition.xyz - cameraPosition );
		}
		vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );
		#ifdef ENVMAP_MODE_REFLECTION
			vReflect = reflect( cameraToVertex, worldNormal );
		#else
			vReflect = refract( cameraToVertex, worldNormal, refractionRatio );
		#endif
	#endif
#endif`,sJt=`#ifdef USE_FOG
	vFogDepth = - mvPosition.z;
#endif`,lJt=`#ifdef USE_FOG
	varying float vFogDepth;
#endif`,uJt=`#ifdef USE_FOG
	#ifdef FOG_EXP2
		float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );
	#else
		float fogFactor = smoothstep( fogNear, fogFar, vFogDepth );
	#endif
	gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );
#endif`,cJt=`#ifdef USE_FOG
	uniform vec3 fogColor;
	varying float vFogDepth;
	#ifdef FOG_EXP2
		uniform float fogDensity;
	#else
		uniform float fogNear;
		uniform float fogFar;
	#endif
#endif`,fJt=`#ifdef USE_GRADIENTMAP
	uniform sampler2D gradientMap;
#endif
vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {
	float dotNL = dot( normal, lightDirection );
	vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );
	#ifdef USE_GRADIENTMAP
		return vec3( texture2D( gradientMap, coord ).r );
	#else
		vec2 fw = fwidth( coord ) * 0.5;
		return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );
	#endif
}`,dJt=`#ifdef USE_LIGHTMAP
	uniform sampler2D lightMap;
	uniform float lightMapIntensity;
#endif`,hJt=`LambertMaterial material;
material.diffuseColor = diffuseColor.rgb;
material.specularStrength = specularStrength;`,pJt=`varying vec3 vViewPosition;
struct LambertMaterial {
	vec3 diffuseColor;
	float specularStrength;
};
void RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {
	float dotNL = saturate( dot( geometryNormal, directLight.direction ) );
	vec3 irradiance = dotNL * directLight.color;
	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {
	reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
#define RE_Direct				RE_Direct_Lambert
#define RE_IndirectDiffuse		RE_IndirectDiffuse_Lambert`,vJt=`uniform bool receiveShadow;
uniform vec3 ambientLightColor;
#if defined( USE_LIGHT_PROBES )
	uniform vec3 lightProbe[ 9 ];
#endif
vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {
	float x = normal.x, y = normal.y, z = normal.z;
	vec3 result = shCoefficients[ 0 ] * 0.886227;
	result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;
	result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;
	result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;
	result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;
	result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;
	result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );
	result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;
	result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );
	return result;
}
vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {
	vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
	vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );
	return irradiance;
}
vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {
	vec3 irradiance = ambientLightColor;
	return irradiance;
}
float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {
	float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );
	if ( cutoffDistance > 0.0 ) {
		distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );
	}
	return distanceFalloff;
}
float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {
	return smoothstep( coneCosine, penumbraCosine, angleCosine );
}
#if NUM_DIR_LIGHTS > 0
	struct DirectionalLight {
		vec3 direction;
		vec3 color;
	};
	uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];
	void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {
		light.color = directionalLight.color;
		light.direction = directionalLight.direction;
		light.visible = true;
	}
#endif
#if NUM_POINT_LIGHTS > 0
	struct PointLight {
		vec3 position;
		vec3 color;
		float distance;
		float decay;
	};
	uniform PointLight pointLights[ NUM_POINT_LIGHTS ];
	void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {
		vec3 lVector = pointLight.position - geometryPosition;
		light.direction = normalize( lVector );
		float lightDistance = length( lVector );
		light.color = pointLight.color;
		light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );
		light.visible = ( light.color != vec3( 0.0 ) );
	}
#endif
#if NUM_SPOT_LIGHTS > 0
	struct SpotLight {
		vec3 position;
		vec3 direction;
		vec3 color;
		float distance;
		float decay;
		float coneCos;
		float penumbraCos;
	};
	uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];
	void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {
		vec3 lVector = spotLight.position - geometryPosition;
		light.direction = normalize( lVector );
		float angleCos = dot( light.direction, spotLight.direction );
		float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );
		if ( spotAttenuation > 0.0 ) {
			float lightDistance = length( lVector );
			light.color = spotLight.color * spotAttenuation;
			light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );
			light.visible = ( light.color != vec3( 0.0 ) );
		} else {
			light.color = vec3( 0.0 );
			light.visible = false;
		}
	}
#endif
#if NUM_RECT_AREA_LIGHTS > 0
	struct RectAreaLight {
		vec3 color;
		vec3 position;
		vec3 halfWidth;
		vec3 halfHeight;
	};
	uniform sampler2D ltc_1;	uniform sampler2D ltc_2;
	uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];
#endif
#if NUM_HEMI_LIGHTS > 0
	struct HemisphereLight {
		vec3 direction;
		vec3 skyColor;
		vec3 groundColor;
	};
	uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];
	vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {
		float dotNL = dot( normal, hemiLight.direction );
		float hemiDiffuseWeight = 0.5 * dotNL + 0.5;
		vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );
		return irradiance;
	}
#endif`,mJt=`#ifdef USE_ENVMAP
	vec3 getIBLIrradiance( const in vec3 normal ) {
		#ifdef ENVMAP_TYPE_CUBE_UV
			vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
			vec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 );
			return PI * envMapColor.rgb * envMapIntensity;
		#else
			return vec3( 0.0 );
		#endif
	}
	vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {
		#ifdef ENVMAP_TYPE_CUBE_UV
			vec3 reflectVec = reflect( - viewDir, normal );
			reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );
			reflectVec = inverseTransformDirection( reflectVec, viewMatrix );
			vec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness );
			return envMapColor.rgb * envMapIntensity;
		#else
			return vec3( 0.0 );
		#endif
	}
	#ifdef USE_ANISOTROPY
		vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {
			#ifdef ENVMAP_TYPE_CUBE_UV
				vec3 bentNormal = cross( bitangent, viewDir );
				bentNormal = normalize( cross( bentNormal, bitangent ) );
				bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );
				return getIBLRadiance( viewDir, bentNormal, roughness );
			#else
				return vec3( 0.0 );
			#endif
		}
	#endif
#endif`,gJt=`ToonMaterial material;
material.diffuseColor = diffuseColor.rgb;`,yJt=`varying vec3 vViewPosition;
struct ToonMaterial {
	vec3 diffuseColor;
};
void RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {
	vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;
	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {
	reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
#define RE_Direct				RE_Direct_Toon
#define RE_IndirectDiffuse		RE_IndirectDiffuse_Toon`,bJt=`BlinnPhongMaterial material;
material.diffuseColor = diffuseColor.rgb;
material.specularColor = specular;
material.specularShininess = shininess;
material.specularStrength = specularStrength;`,xJt=`varying vec3 vViewPosition;
struct BlinnPhongMaterial {
	vec3 diffuseColor;
	vec3 specularColor;
	float specularShininess;
	float specularStrength;
};
void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {
	float dotNL = saturate( dot( geometryNormal, directLight.direction ) );
	vec3 irradiance = dotNL * directLight.color;
	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
	reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;
}
void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {
	reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
#define RE_Direct				RE_Direct_BlinnPhong
#define RE_IndirectDiffuse		RE_IndirectDiffuse_BlinnPhong`,_Jt=`PhysicalMaterial material;
material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );
vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );
float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );
material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;
material.roughness = min( material.roughness, 1.0 );
#ifdef IOR
	material.ior = ior;
	#ifdef USE_SPECULAR
		float specularIntensityFactor = specularIntensity;
		vec3 specularColorFactor = specularColor;
		#ifdef USE_SPECULAR_COLORMAP
			specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;
		#endif
		#ifdef USE_SPECULAR_INTENSITYMAP
			specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;
		#endif
		material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );
	#else
		float specularIntensityFactor = 1.0;
		vec3 specularColorFactor = vec3( 1.0 );
		material.specularF90 = 1.0;
	#endif
	material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );
#else
	material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );
	material.specularF90 = 1.0;
#endif
#ifdef USE_CLEARCOAT
	material.clearcoat = clearcoat;
	material.clearcoatRoughness = clearcoatRoughness;
	material.clearcoatF0 = vec3( 0.04 );
	material.clearcoatF90 = 1.0;
	#ifdef USE_CLEARCOATMAP
		material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;
	#endif
	#ifdef USE_CLEARCOAT_ROUGHNESSMAP
		material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;
	#endif
	material.clearcoat = saturate( material.clearcoat );	material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );
	material.clearcoatRoughness += geometryRoughness;
	material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );
#endif
#ifdef USE_DISPERSION
	material.dispersion = dispersion;
#endif
#ifdef USE_IRIDESCENCE
	material.iridescence = iridescence;
	material.iridescenceIOR = iridescenceIOR;
	#ifdef USE_IRIDESCENCEMAP
		material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;
	#endif
	#ifdef USE_IRIDESCENCE_THICKNESSMAP
		material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;
	#else
		material.iridescenceThickness = iridescenceThicknessMaximum;
	#endif
#endif
#ifdef USE_SHEEN
	material.sheenColor = sheenColor;
	#ifdef USE_SHEEN_COLORMAP
		material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;
	#endif
	material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );
	#ifdef USE_SHEEN_ROUGHNESSMAP
		material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;
	#endif
#endif
#ifdef USE_ANISOTROPY
	#ifdef USE_ANISOTROPYMAP
		mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );
		vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;
		vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;
	#else
		vec2 anisotropyV = anisotropyVector;
	#endif
	material.anisotropy = length( anisotropyV );
	if( material.anisotropy == 0.0 ) {
		anisotropyV = vec2( 1.0, 0.0 );
	} else {
		anisotropyV /= material.anisotropy;
		material.anisotropy = saturate( material.anisotropy );
	}
	material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );
	material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;
	material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;
#endif`,wJt=`struct PhysicalMaterial {
	vec3 diffuseColor;
	float roughness;
	vec3 specularColor;
	float specularF90;
	float dispersion;
	#ifdef USE_CLEARCOAT
		float clearcoat;
		float clearcoatRoughness;
		vec3 clearcoatF0;
		float clearcoatF90;
	#endif
	#ifdef USE_IRIDESCENCE
		float iridescence;
		float iridescenceIOR;
		float iridescenceThickness;
		vec3 iridescenceFresnel;
		vec3 iridescenceF0;
	#endif
	#ifdef USE_SHEEN
		vec3 sheenColor;
		float sheenRoughness;
	#endif
	#ifdef IOR
		float ior;
	#endif
	#ifdef USE_TRANSMISSION
		float transmission;
		float transmissionAlpha;
		float thickness;
		float attenuationDistance;
		vec3 attenuationColor;
	#endif
	#ifdef USE_ANISOTROPY
		float anisotropy;
		float alphaT;
		vec3 anisotropyT;
		vec3 anisotropyB;
	#endif
};
vec3 clearcoatSpecularDirect = vec3( 0.0 );
vec3 clearcoatSpecularIndirect = vec3( 0.0 );
vec3 sheenSpecularDirect = vec3( 0.0 );
vec3 sheenSpecularIndirect = vec3(0.0 );
vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {
    float x = clamp( 1.0 - dotVH, 0.0, 1.0 );
    float x2 = x * x;
    float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );
    return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );
}
float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {
	float a2 = pow2( alpha );
	float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );
	float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );
	return 0.5 / max( gv + gl, EPSILON );
}
float D_GGX( const in float alpha, const in float dotNH ) {
	float a2 = pow2( alpha );
	float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;
	return RECIPROCAL_PI * a2 / pow2( denom );
}
#ifdef USE_ANISOTROPY
	float V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {
		float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );
		float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );
		float v = 0.5 / ( gv + gl );
		return saturate(v);
	}
	float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {
		float a2 = alphaT * alphaB;
		highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );
		highp float v2 = dot( v, v );
		float w2 = a2 / v2;
		return RECIPROCAL_PI * a2 * pow2 ( w2 );
	}
#endif
#ifdef USE_CLEARCOAT
	vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {
		vec3 f0 = material.clearcoatF0;
		float f90 = material.clearcoatF90;
		float roughness = material.clearcoatRoughness;
		float alpha = pow2( roughness );
		vec3 halfDir = normalize( lightDir + viewDir );
		float dotNL = saturate( dot( normal, lightDir ) );
		float dotNV = saturate( dot( normal, viewDir ) );
		float dotNH = saturate( dot( normal, halfDir ) );
		float dotVH = saturate( dot( viewDir, halfDir ) );
		vec3 F = F_Schlick( f0, f90, dotVH );
		float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );
		float D = D_GGX( alpha, dotNH );
		return F * ( V * D );
	}
#endif
vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {
	vec3 f0 = material.specularColor;
	float f90 = material.specularF90;
	float roughness = material.roughness;
	float alpha = pow2( roughness );
	vec3 halfDir = normalize( lightDir + viewDir );
	float dotNL = saturate( dot( normal, lightDir ) );
	float dotNV = saturate( dot( normal, viewDir ) );
	float dotNH = saturate( dot( normal, halfDir ) );
	float dotVH = saturate( dot( viewDir, halfDir ) );
	vec3 F = F_Schlick( f0, f90, dotVH );
	#ifdef USE_IRIDESCENCE
		F = mix( F, material.iridescenceFresnel, material.iridescence );
	#endif
	#ifdef USE_ANISOTROPY
		float dotTL = dot( material.anisotropyT, lightDir );
		float dotTV = dot( material.anisotropyT, viewDir );
		float dotTH = dot( material.anisotropyT, halfDir );
		float dotBL = dot( material.anisotropyB, lightDir );
		float dotBV = dot( material.anisotropyB, viewDir );
		float dotBH = dot( material.anisotropyB, halfDir );
		float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );
		float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );
	#else
		float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );
		float D = D_GGX( alpha, dotNH );
	#endif
	return F * ( V * D );
}
vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {
	const float LUT_SIZE = 64.0;
	const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;
	const float LUT_BIAS = 0.5 / LUT_SIZE;
	float dotNV = saturate( dot( N, V ) );
	vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );
	uv = uv * LUT_SCALE + LUT_BIAS;
	return uv;
}
float LTC_ClippedSphereFormFactor( const in vec3 f ) {
	float l = length( f );
	return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );
}
vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {
	float x = dot( v1, v2 );
	float y = abs( x );
	float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;
	float b = 3.4175940 + ( 4.1616724 + y ) * y;
	float v = a / b;
	float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;
	return cross( v1, v2 ) * theta_sintheta;
}
vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {
	vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];
	vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];
	vec3 lightNormal = cross( v1, v2 );
	if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );
	vec3 T1, T2;
	T1 = normalize( V - N * dot( V, N ) );
	T2 = - cross( N, T1 );
	mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );
	vec3 coords[ 4 ];
	coords[ 0 ] = mat * ( rectCoords[ 0 ] - P );
	coords[ 1 ] = mat * ( rectCoords[ 1 ] - P );
	coords[ 2 ] = mat * ( rectCoords[ 2 ] - P );
	coords[ 3 ] = mat * ( rectCoords[ 3 ] - P );
	coords[ 0 ] = normalize( coords[ 0 ] );
	coords[ 1 ] = normalize( coords[ 1 ] );
	coords[ 2 ] = normalize( coords[ 2 ] );
	coords[ 3 ] = normalize( coords[ 3 ] );
	vec3 vectorFormFactor = vec3( 0.0 );
	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );
	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );
	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );
	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );
	float result = LTC_ClippedSphereFormFactor( vectorFormFactor );
	return vec3( result );
}
#if defined( USE_SHEEN )
float D_Charlie( float roughness, float dotNH ) {
	float alpha = pow2( roughness );
	float invAlpha = 1.0 / alpha;
	float cos2h = dotNH * dotNH;
	float sin2h = max( 1.0 - cos2h, 0.0078125 );
	return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );
}
float V_Neubelt( float dotNV, float dotNL ) {
	return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );
}
vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {
	vec3 halfDir = normalize( lightDir + viewDir );
	float dotNL = saturate( dot( normal, lightDir ) );
	float dotNV = saturate( dot( normal, viewDir ) );
	float dotNH = saturate( dot( normal, halfDir ) );
	float D = D_Charlie( sheenRoughness, dotNH );
	float V = V_Neubelt( dotNV, dotNL );
	return sheenColor * ( D * V );
}
#endif
float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {
	float dotNV = saturate( dot( normal, viewDir ) );
	float r2 = roughness * roughness;
	float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;
	float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;
	float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );
	return saturate( DG * RECIPROCAL_PI );
}
vec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {
	float dotNV = saturate( dot( normal, viewDir ) );
	const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );
	const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );
	vec4 r = roughness * c0 + c1;
	float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;
	vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;
	return fab;
}
vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {
	vec2 fab = DFGApprox( normal, viewDir, roughness );
	return specularColor * fab.x + specularF90 * fab.y;
}
#ifdef USE_IRIDESCENCE
void computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {
#else
void computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {
#endif
	vec2 fab = DFGApprox( normal, viewDir, roughness );
	#ifdef USE_IRIDESCENCE
		vec3 Fr = mix( specularColor, iridescenceF0, iridescence );
	#else
		vec3 Fr = specularColor;
	#endif
	vec3 FssEss = Fr * fab.x + specularF90 * fab.y;
	float Ess = fab.x + fab.y;
	float Ems = 1.0 - Ess;
	vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;	vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );
	singleScatter += FssEss;
	multiScatter += Fms * Ems;
}
#if NUM_RECT_AREA_LIGHTS > 0
	void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
		vec3 normal = geometryNormal;
		vec3 viewDir = geometryViewDir;
		vec3 position = geometryPosition;
		vec3 lightPos = rectAreaLight.position;
		vec3 halfWidth = rectAreaLight.halfWidth;
		vec3 halfHeight = rectAreaLight.halfHeight;
		vec3 lightColor = rectAreaLight.color;
		float roughness = material.roughness;
		vec3 rectCoords[ 4 ];
		rectCoords[ 0 ] = lightPos + halfWidth - halfHeight;		rectCoords[ 1 ] = lightPos - halfWidth - halfHeight;
		rectCoords[ 2 ] = lightPos - halfWidth + halfHeight;
		rectCoords[ 3 ] = lightPos + halfWidth + halfHeight;
		vec2 uv = LTC_Uv( normal, viewDir, roughness );
		vec4 t1 = texture2D( ltc_1, uv );
		vec4 t2 = texture2D( ltc_2, uv );
		mat3 mInv = mat3(
			vec3( t1.x, 0, t1.y ),
			vec3(    0, 1,    0 ),
			vec3( t1.z, 0, t1.w )
		);
		vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );
		reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );
		reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );
	}
#endif
void RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
	float dotNL = saturate( dot( geometryNormal, directLight.direction ) );
	vec3 irradiance = dotNL * directLight.color;
	#ifdef USE_CLEARCOAT
		float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );
		vec3 ccIrradiance = dotNLcc * directLight.color;
		clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );
	#endif
	#ifdef USE_SHEEN
		sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );
	#endif
	reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );
	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
	reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {
	#ifdef USE_CLEARCOAT
		clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );
	#endif
	#ifdef USE_SHEEN
		sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );
	#endif
	vec3 singleScattering = vec3( 0.0 );
	vec3 multiScattering = vec3( 0.0 );
	vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;
	#ifdef USE_IRIDESCENCE
		computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );
	#else
		computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );
	#endif
	vec3 totalScattering = singleScattering + multiScattering;
	vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );
	reflectedLight.indirectSpecular += radiance * singleScattering;
	reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;
	reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;
}
#define RE_Direct				RE_Direct_Physical
#define RE_Direct_RectArea		RE_Direct_RectArea_Physical
#define RE_IndirectDiffuse		RE_IndirectDiffuse_Physical
#define RE_IndirectSpecular		RE_IndirectSpecular_Physical
float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {
	return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );
}`,SJt=`
vec3 geometryPosition = - vViewPosition;
vec3 geometryNormal = normal;
vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );
vec3 geometryClearcoatNormal = vec3( 0.0 );
#ifdef USE_CLEARCOAT
	geometryClearcoatNormal = clearcoatNormal;
#endif
#ifdef USE_IRIDESCENCE
	float dotNVi = saturate( dot( normal, geometryViewDir ) );
	if ( material.iridescenceThickness == 0.0 ) {
		material.iridescence = 0.0;
	} else {
		material.iridescence = saturate( material.iridescence );
	}
	if ( material.iridescence > 0.0 ) {
		material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );
		material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );
	}
#endif
IncidentLight directLight;
#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )
	PointLight pointLight;
	#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0
	PointLightShadow pointLightShadow;
	#endif
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {
		pointLight = pointLights[ i ];
		getPointLightInfo( pointLight, geometryPosition, directLight );
		#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )
		pointLightShadow = pointLightShadows[ i ];
		directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;
		#endif
		RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
	}
	#pragma unroll_loop_end
#endif
#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )
	SpotLight spotLight;
	vec4 spotColor;
	vec3 spotLightCoord;
	bool inSpotLightMap;
	#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0
	SpotLightShadow spotLightShadow;
	#endif
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {
		spotLight = spotLights[ i ];
		getSpotLightInfo( spotLight, geometryPosition, directLight );
		#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )
		#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX
		#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
		#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS
		#else
		#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )
		#endif
		#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )
			spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;
			inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );
			spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );
			directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;
		#endif
		#undef SPOT_LIGHT_MAP_INDEX
		#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
		spotLightShadow = spotLightShadows[ i ];
		directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;
		#endif
		RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
	}
	#pragma unroll_loop_end
#endif
#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )
	DirectionalLight directionalLight;
	#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0
	DirectionalLightShadow directionalLightShadow;
	#endif
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {
		directionalLight = directionalLights[ i ];
		getDirectionalLightInfo( directionalLight, directLight );
		#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )
		directionalLightShadow = directionalLightShadows[ i ];
		directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;
		#endif
		RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
	}
	#pragma unroll_loop_end
#endif
#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )
	RectAreaLight rectAreaLight;
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {
		rectAreaLight = rectAreaLights[ i ];
		RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
	}
	#pragma unroll_loop_end
#endif
#if defined( RE_IndirectDiffuse )
	vec3 iblIrradiance = vec3( 0.0 );
	vec3 irradiance = getAmbientLightIrradiance( ambientLightColor );
	#if defined( USE_LIGHT_PROBES )
		irradiance += getLightProbeIrradiance( lightProbe, geometryNormal );
	#endif
	#if ( NUM_HEMI_LIGHTS > 0 )
		#pragma unroll_loop_start
		for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {
			irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );
		}
		#pragma unroll_loop_end
	#endif
#endif
#if defined( RE_IndirectSpecular )
	vec3 radiance = vec3( 0.0 );
	vec3 clearcoatRadiance = vec3( 0.0 );
#endif`,TJt=`#if defined( RE_IndirectDiffuse )
	#ifdef USE_LIGHTMAP
		vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );
		vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;
		irradiance += lightMapIrradiance;
	#endif
	#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )
		iblIrradiance += getIBLIrradiance( geometryNormal );
	#endif
#endif
#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )
	#ifdef USE_ANISOTROPY
		radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );
	#else
		radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );
	#endif
	#ifdef USE_CLEARCOAT
		clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );
	#endif
#endif`,EJt=`#if defined( RE_IndirectDiffuse )
	RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
#endif
#if defined( RE_IndirectSpecular )
	RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
#endif`,AJt=`#if defined( USE_LOGARITHMIC_DEPTH_BUFFER )
	gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;
#endif`,CJt=`#if defined( USE_LOGARITHMIC_DEPTH_BUFFER )
	uniform float logDepthBufFC;
	varying float vFragDepth;
	varying float vIsPerspective;
#endif`,MJt=`#ifdef USE_LOGARITHMIC_DEPTH_BUFFER
	varying float vFragDepth;
	varying float vIsPerspective;
#endif`,RJt=`#ifdef USE_LOGARITHMIC_DEPTH_BUFFER
	vFragDepth = 1.0 + gl_Position.w;
	vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );
#endif`,kJt=`#ifdef USE_MAP
	vec4 sampledDiffuseColor = texture2D( map, vMapUv );
	#ifdef DECODE_VIDEO_TEXTURE
		sampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor );
	#endif
	diffuseColor *= sampledDiffuseColor;
#endif`,IJt=`#ifdef USE_MAP
	uniform sampler2D map;
#endif`,PJt=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP )
	#if defined( USE_POINTS_UV )
		vec2 uv = vUv;
	#else
		vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;
	#endif
#endif
#ifdef USE_MAP
	diffuseColor *= texture2D( map, uv );
#endif
#ifdef USE_ALPHAMAP
	diffuseColor.a *= texture2D( alphaMap, uv ).g;
#endif`,DJt=`#if defined( USE_POINTS_UV )
	varying vec2 vUv;
#else
	#if defined( USE_MAP ) || defined( USE_ALPHAMAP )
		uniform mat3 uvTransform;
	#endif
#endif
#ifdef USE_MAP
	uniform sampler2D map;
#endif
#ifdef USE_ALPHAMAP
	uniform sampler2D alphaMap;
#endif`,LJt=`float metalnessFactor = metalness;
#ifdef USE_METALNESSMAP
	vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );
	metalnessFactor *= texelMetalness.b;
#endif`,OJt=`#ifdef USE_METALNESSMAP
	uniform sampler2D metalnessMap;
#endif`,NJt=`#ifdef USE_INSTANCING_MORPH
	float morphTargetInfluences[ MORPHTARGETS_COUNT ];
	float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r;
	for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
		morphTargetInfluences[i] =  texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r;
	}
#endif`,FJt=`#if defined( USE_MORPHCOLORS )
	vColor *= morphTargetBaseInfluence;
	for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
		#if defined( USE_COLOR_ALPHA )
			if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];
		#elif defined( USE_COLOR )
			if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];
		#endif
	}
#endif`,zJt=`#ifdef USE_MORPHNORMALS
	objectNormal *= morphTargetBaseInfluence;
	for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
		if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];
	}
#endif`,BJt=`#ifdef USE_MORPHTARGETS
	#ifndef USE_INSTANCING_MORPH
		uniform float morphTargetBaseInfluence;
		uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];
	#endif
	uniform sampler2DArray morphTargetsTexture;
	uniform ivec2 morphTargetsTextureSize;
	vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {
		int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;
		int y = texelIndex / morphTargetsTextureSize.x;
		int x = texelIndex - y * morphTargetsTextureSize.x;
		ivec3 morphUV = ivec3( x, y, morphTargetIndex );
		return texelFetch( morphTargetsTexture, morphUV, 0 );
	}
#endif`,UJt=`#ifdef USE_MORPHTARGETS
	transformed *= morphTargetBaseInfluence;
	for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
		if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];
	}
#endif`,HJt=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;
#ifdef FLAT_SHADED
	vec3 fdx = dFdx( vViewPosition );
	vec3 fdy = dFdy( vViewPosition );
	vec3 normal = normalize( cross( fdx, fdy ) );
#else
	vec3 normal = normalize( vNormal );
	#ifdef DOUBLE_SIDED
		normal *= faceDirection;
	#endif
#endif
#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )
	#ifdef USE_TANGENT
		mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );
	#else
		mat3 tbn = getTangentFrame( - vViewPosition, normal,
		#if defined( USE_NORMALMAP )
			vNormalMapUv
		#elif defined( USE_CLEARCOAT_NORMALMAP )
			vClearcoatNormalMapUv
		#else
			vUv
		#endif
		);
	#endif
	#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )
		tbn[0] *= faceDirection;
		tbn[1] *= faceDirection;
	#endif
#endif
#ifdef USE_CLEARCOAT_NORMALMAP
	#ifdef USE_TANGENT
		mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );
	#else
		mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );
	#endif
	#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )
		tbn2[0] *= faceDirection;
		tbn2[1] *= faceDirection;
	#endif
#endif
vec3 nonPerturbedNormal = normal;`,jJt=`#ifdef USE_NORMALMAP_OBJECTSPACE
	normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;
	#ifdef FLIP_SIDED
		normal = - normal;
	#endif
	#ifdef DOUBLE_SIDED
		normal = normal * faceDirection;
	#endif
	normal = normalize( normalMatrix * normal );
#elif defined( USE_NORMALMAP_TANGENTSPACE )
	vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;
	mapN.xy *= normalScale;
	normal = normalize( tbn * mapN );
#elif defined( USE_BUMPMAP )
	normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );
#endif`,VJt=`#ifndef FLAT_SHADED
	varying vec3 vNormal;
	#ifdef USE_TANGENT
		varying vec3 vTangent;
		varying vec3 vBitangent;
	#endif
#endif`,qJt=`#ifndef FLAT_SHADED
	varying vec3 vNormal;
	#ifdef USE_TANGENT
		varying vec3 vTangent;
		varying vec3 vBitangent;
	#endif
#endif`,GJt=`#ifndef FLAT_SHADED
	vNormal = normalize( transformedNormal );
	#ifdef USE_TANGENT
		vTangent = normalize( transformedTangent );
		vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );
	#endif
#endif`,$Jt=`#ifdef USE_NORMALMAP
	uniform sampler2D normalMap;
	uniform vec2 normalScale;
#endif
#ifdef USE_NORMALMAP_OBJECTSPACE
	uniform mat3 normalMatrix;
#endif
#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )
	mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {
		vec3 q0 = dFdx( eye_pos.xyz );
		vec3 q1 = dFdy( eye_pos.xyz );
		vec2 st0 = dFdx( uv.st );
		vec2 st1 = dFdy( uv.st );
		vec3 N = surf_norm;
		vec3 q1perp = cross( q1, N );
		vec3 q0perp = cross( N, q0 );
		vec3 T = q1perp * st0.x + q0perp * st1.x;
		vec3 B = q1perp * st0.y + q0perp * st1.y;
		float det = max( dot( T, T ), dot( B, B ) );
		float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );
		return mat3( T * scale, B * scale, N );
	}
#endif`,WJt=`#ifdef USE_CLEARCOAT
	vec3 clearcoatNormal = nonPerturbedNormal;
#endif`,YJt=`#ifdef USE_CLEARCOAT_NORMALMAP
	vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;
	clearcoatMapN.xy *= clearcoatNormalScale;
	clearcoatNormal = normalize( tbn2 * clearcoatMapN );
#endif`,XJt=`#ifdef USE_CLEARCOATMAP
	uniform sampler2D clearcoatMap;
#endif
#ifdef USE_CLEARCOAT_NORMALMAP
	uniform sampler2D clearcoatNormalMap;
	uniform vec2 clearcoatNormalScale;
#endif
#ifdef USE_CLEARCOAT_ROUGHNESSMAP
	uniform sampler2D clearcoatRoughnessMap;
#endif`,ZJt=`#ifdef USE_IRIDESCENCEMAP
	uniform sampler2D iridescenceMap;
#endif
#ifdef USE_IRIDESCENCE_THICKNESSMAP
	uniform sampler2D iridescenceThicknessMap;
#endif`,KJt=`#ifdef OPAQUE
diffuseColor.a = 1.0;
#endif
#ifdef USE_TRANSMISSION
diffuseColor.a *= material.transmissionAlpha;
#endif
gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,JJt=`vec3 packNormalToRGB( const in vec3 normal ) {
	return normalize( normal ) * 0.5 + 0.5;
}
vec3 unpackRGBToNormal( const in vec3 rgb ) {
	return 2.0 * rgb.xyz - 1.0;
}
const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;const float ShiftRight8 = 1. / 256.;
const float Inv255 = 1. / 255.;
const vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );
const vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );
const vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );
const vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );
vec4 packDepthToRGBA( const in float v ) {
	if( v <= 0.0 )
		return vec4( 0., 0., 0., 0. );
	if( v >= 1.0 )
		return vec4( 1., 1., 1., 1. );
	float vuf;
	float af = modf( v * PackFactors.a, vuf );
	float bf = modf( vuf * ShiftRight8, vuf );
	float gf = modf( vuf * ShiftRight8, vuf );
	return vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );
}
vec3 packDepthToRGB( const in float v ) {
	if( v <= 0.0 )
		return vec3( 0., 0., 0. );
	if( v >= 1.0 )
		return vec3( 1., 1., 1. );
	float vuf;
	float bf = modf( v * PackFactors.b, vuf );
	float gf = modf( vuf * ShiftRight8, vuf );
	return vec3( vuf * Inv255, gf * PackUpscale, bf );
}
vec2 packDepthToRG( const in float v ) {
	if( v <= 0.0 )
		return vec2( 0., 0. );
	if( v >= 1.0 )
		return vec2( 1., 1. );
	float vuf;
	float gf = modf( v * 256., vuf );
	return vec2( vuf * Inv255, gf );
}
float unpackRGBAToDepth( const in vec4 v ) {
	return dot( v, UnpackFactors4 );
}
float unpackRGBToDepth( const in vec3 v ) {
	return dot( v, UnpackFactors3 );
}
float unpackRGToDepth( const in vec2 v ) {
	return v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;
}
vec4 pack2HalfToRGBA( const in vec2 v ) {
	vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );
	return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );
}
vec2 unpackRGBATo2Half( const in vec4 v ) {
	return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );
}
float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {
	return ( viewZ + near ) / ( near - far );
}
float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {
	return depth * ( near - far ) - near;
}
float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {
	return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );
}
float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {
	return ( near * far ) / ( ( far - near ) * depth - far );
}`,QJt=`#ifdef PREMULTIPLIED_ALPHA
	gl_FragColor.rgb *= gl_FragColor.a;
#endif`,eQt=`vec4 mvPosition = vec4( transformed, 1.0 );
#ifdef USE_BATCHING
	mvPosition = batchingMatrix * mvPosition;
#endif
#ifdef USE_INSTANCING
	mvPosition = instanceMatrix * mvPosition;
#endif
mvPosition = modelViewMatrix * mvPosition;
gl_Position = projectionMatrix * mvPosition;`,tQt=`#ifdef DITHERING
	gl_FragColor.rgb = dithering( gl_FragColor.rgb );
#endif`,rQt=`#ifdef DITHERING
	vec3 dithering( vec3 color ) {
		float grid_position = rand( gl_FragCoord.xy );
		vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );
		dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );
		return color + dither_shift_RGB;
	}
#endif`,nQt=`float roughnessFactor = roughness;
#ifdef USE_ROUGHNESSMAP
	vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );
	roughnessFactor *= texelRoughness.g;
#endif`,iQt=`#ifdef USE_ROUGHNESSMAP
	uniform sampler2D roughnessMap;
#endif`,aQt=`#if NUM_SPOT_LIGHT_COORDS > 0
	varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];
#endif
#if NUM_SPOT_LIGHT_MAPS > 0
	uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];
#endif
#ifdef USE_SHADOWMAP
	#if NUM_DIR_LIGHT_SHADOWS > 0
		uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];
		varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];
		struct DirectionalLightShadow {
			float shadowIntensity;
			float shadowBias;
			float shadowNormalBias;
			float shadowRadius;
			vec2 shadowMapSize;
		};
		uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];
	#endif
	#if NUM_SPOT_LIGHT_SHADOWS > 0
		uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];
		struct SpotLightShadow {
			float shadowIntensity;
			float shadowBias;
			float shadowNormalBias;
			float shadowRadius;
			vec2 shadowMapSize;
		};
		uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];
	#endif
	#if NUM_POINT_LIGHT_SHADOWS > 0
		uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];
		varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];
		struct PointLightShadow {
			float shadowIntensity;
			float shadowBias;
			float shadowNormalBias;
			float shadowRadius;
			vec2 shadowMapSize;
			float shadowCameraNear;
			float shadowCameraFar;
		};
		uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];
	#endif
	float texture2DCompare( sampler2D depths, vec2 uv, float compare ) {
		float depth = unpackRGBAToDepth( texture2D( depths, uv ) );
		#ifdef USE_REVERSED_DEPTH_BUFFER
			return step( depth, compare );
		#else
			return step( compare, depth );
		#endif
	}
	vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {
		return unpackRGBATo2Half( texture2D( shadow, uv ) );
	}
	float VSMShadow( sampler2D shadow, vec2 uv, float compare ) {
		float occlusion = 1.0;
		vec2 distribution = texture2DDistribution( shadow, uv );
		#ifdef USE_REVERSED_DEPTH_BUFFER
			float hard_shadow = step( distribution.x, compare );
		#else
			float hard_shadow = step( compare, distribution.x );
		#endif
		if ( hard_shadow != 1.0 ) {
			float distance = compare - distribution.x;
			float variance = max( 0.00000, distribution.y * distribution.y );
			float softness_probability = variance / (variance + distance * distance );			softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );			occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );
		}
		return occlusion;
	}
	float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {
		float shadow = 1.0;
		shadowCoord.xyz /= shadowCoord.w;
		shadowCoord.z += shadowBias;
		bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;
		bool frustumTest = inFrustum && shadowCoord.z <= 1.0;
		if ( frustumTest ) {
		#if defined( SHADOWMAP_TYPE_PCF )
			vec2 texelSize = vec2( 1.0 ) / shadowMapSize;
			float dx0 = - texelSize.x * shadowRadius;
			float dy0 = - texelSize.y * shadowRadius;
			float dx1 = + texelSize.x * shadowRadius;
			float dy1 = + texelSize.y * shadowRadius;
			float dx2 = dx0 / 2.0;
			float dy2 = dy0 / 2.0;
			float dx3 = dx1 / 2.0;
			float dy3 = dy1 / 2.0;
			shadow = (
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )
			) * ( 1.0 / 17.0 );
		#elif defined( SHADOWMAP_TYPE_PCF_SOFT )
			vec2 texelSize = vec2( 1.0 ) / shadowMapSize;
			float dx = texelSize.x;
			float dy = texelSize.y;
			vec2 uv = shadowCoord.xy;
			vec2 f = fract( uv * shadowMapSize + 0.5 );
			uv -= f * texelSize;
			shadow = (
				texture2DCompare( shadowMap, uv, shadowCoord.z ) +
				texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +
				texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +
				mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),
					 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),
					 f.x ) +
				mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),
					 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),
					 f.x ) +
				mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),
					 texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),
					 f.y ) +
				mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),
					 texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),
					 f.y ) +
				mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),
						  texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),
						  f.x ),
					 mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),
						  texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),
						  f.x ),
					 f.y )
			) * ( 1.0 / 9.0 );
		#elif defined( SHADOWMAP_TYPE_VSM )
			shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );
		#else
			shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );
		#endif
		}
		return mix( 1.0, shadow, shadowIntensity );
	}
	vec2 cubeToUV( vec3 v, float texelSizeY ) {
		vec3 absV = abs( v );
		float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );
		absV *= scaleToCube;
		v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );
		vec2 planar = v.xy;
		float almostATexel = 1.5 * texelSizeY;
		float almostOne = 1.0 - almostATexel;
		if ( absV.z >= almostOne ) {
			if ( v.z > 0.0 )
				planar.x = 4.0 - v.x;
		} else if ( absV.x >= almostOne ) {
			float signX = sign( v.x );
			planar.x = v.z * signX + 2.0 * signX;
		} else if ( absV.y >= almostOne ) {
			float signY = sign( v.y );
			planar.x = v.x + 2.0 * signY + 2.0;
			planar.y = v.z * signY - 2.0;
		}
		return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );
	}
	float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {
		float shadow = 1.0;
		vec3 lightToPosition = shadowCoord.xyz;
		
		float lightToPositionLength = length( lightToPosition );
		if ( lightToPositionLength - shadowCameraFar <= 0.0 && lightToPositionLength - shadowCameraNear >= 0.0 ) {
			float dp = ( lightToPositionLength - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );			dp += shadowBias;
			vec3 bd3D = normalize( lightToPosition );
			vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );
			#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )
				vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;
				shadow = (
					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +
					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +
					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +
					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +
					texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +
					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +
					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +
					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +
					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )
				) * ( 1.0 / 9.0 );
			#else
				shadow = texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );
			#endif
		}
		return mix( 1.0, shadow, shadowIntensity );
	}
#endif`,oQt=`#if NUM_SPOT_LIGHT_COORDS > 0
	uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];
	varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];
#endif
#ifdef USE_SHADOWMAP
	#if NUM_DIR_LIGHT_SHADOWS > 0
		uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];
		varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];
		struct DirectionalLightShadow {
			float shadowIntensity;
			float shadowBias;
			float shadowNormalBias;
			float shadowRadius;
			vec2 shadowMapSize;
		};
		uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];
	#endif
	#if NUM_SPOT_LIGHT_SHADOWS > 0
		struct SpotLightShadow {
			float shadowIntensity;
			float shadowBias;
			float shadowNormalBias;
			float shadowRadius;
			vec2 shadowMapSize;
		};
		uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];
	#endif
	#if NUM_POINT_LIGHT_SHADOWS > 0
		uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];
		varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];
		struct PointLightShadow {
			float shadowIntensity;
			float shadowBias;
			float shadowNormalBias;
			float shadowRadius;
			vec2 shadowMapSize;
			float shadowCameraNear;
			float shadowCameraFar;
		};
		uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];
	#endif
#endif`,sQt=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )
	vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );
	vec4 shadowWorldPosition;
#endif
#if defined( USE_SHADOWMAP )
	#if NUM_DIR_LIGHT_SHADOWS > 0
		#pragma unroll_loop_start
		for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {
			shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );
			vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;
		}
		#pragma unroll_loop_end
	#endif
	#if NUM_POINT_LIGHT_SHADOWS > 0
		#pragma unroll_loop_start
		for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {
			shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );
			vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;
		}
		#pragma unroll_loop_end
	#endif
#endif
#if NUM_SPOT_LIGHT_COORDS > 0
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {
		shadowWorldPosition = worldPosition;
		#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
			shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;
		#endif
		vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;
	}
	#pragma unroll_loop_end
#endif`,lQt=`float getShadowMask() {
	float shadow = 1.0;
	#ifdef USE_SHADOWMAP
	#if NUM_DIR_LIGHT_SHADOWS > 0
	DirectionalLightShadow directionalLight;
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {
		directionalLight = directionalLightShadows[ i ];
		shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;
	}
	#pragma unroll_loop_end
	#endif
	#if NUM_SPOT_LIGHT_SHADOWS > 0
	SpotLightShadow spotLight;
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {
		spotLight = spotLightShadows[ i ];
		shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;
	}
	#pragma unroll_loop_end
	#endif
	#if NUM_POINT_LIGHT_SHADOWS > 0
	PointLightShadow pointLight;
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {
		pointLight = pointLightShadows[ i ];
		shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;
	}
	#pragma unroll_loop_end
	#endif
	#endif
	return shadow;
}`,uQt=`#ifdef USE_SKINNING
	mat4 boneMatX = getBoneMatrix( skinIndex.x );
	mat4 boneMatY = getBoneMatrix( skinIndex.y );
	mat4 boneMatZ = getBoneMatrix( skinIndex.z );
	mat4 boneMatW = getBoneMatrix( skinIndex.w );
#endif`,cQt=`#ifdef USE_SKINNING
	uniform mat4 bindMatrix;
	uniform mat4 bindMatrixInverse;
	uniform highp sampler2D boneTexture;
	mat4 getBoneMatrix( const in float i ) {
		int size = textureSize( boneTexture, 0 ).x;
		int j = int( i ) * 4;
		int x = j % size;
		int y = j / size;
		vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );
		vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );
		vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );
		vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );
		return mat4( v1, v2, v3, v4 );
	}
#endif`,fQt=`#ifdef USE_SKINNING
	vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );
	vec4 skinned = vec4( 0.0 );
	skinned += boneMatX * skinVertex * skinWeight.x;
	skinned += boneMatY * skinVertex * skinWeight.y;
	skinned += boneMatZ * skinVertex * skinWeight.z;
	skinned += boneMatW * skinVertex * skinWeight.w;
	transformed = ( bindMatrixInverse * skinned ).xyz;
#endif`,dQt=`#ifdef USE_SKINNING
	mat4 skinMatrix = mat4( 0.0 );
	skinMatrix += skinWeight.x * boneMatX;
	skinMatrix += skinWeight.y * boneMatY;
	skinMatrix += skinWeight.z * boneMatZ;
	skinMatrix += skinWeight.w * boneMatW;
	skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;
	objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;
	#ifdef USE_TANGENT
		objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;
	#endif
#endif`,hQt=`float specularStrength;
#ifdef USE_SPECULARMAP
	vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );
	specularStrength = texelSpecular.r;
#else
	specularStrength = 1.0;
#endif`,pQt=`#ifdef USE_SPECULARMAP
	uniform sampler2D specularMap;
#endif`,vQt=`#if defined( TONE_MAPPING )
	gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );
#endif`,mQt=`#ifndef saturate
#define saturate( a ) clamp( a, 0.0, 1.0 )
#endif
uniform float toneMappingExposure;
vec3 LinearToneMapping( vec3 color ) {
	return saturate( toneMappingExposure * color );
}
vec3 ReinhardToneMapping( vec3 color ) {
	color *= toneMappingExposure;
	return saturate( color / ( vec3( 1.0 ) + color ) );
}
vec3 CineonToneMapping( vec3 color ) {
	color *= toneMappingExposure;
	color = max( vec3( 0.0 ), color - 0.004 );
	return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );
}
vec3 RRTAndODTFit( vec3 v ) {
	vec3 a = v * ( v + 0.0245786 ) - 0.000090537;
	vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;
	return a / b;
}
vec3 ACESFilmicToneMapping( vec3 color ) {
	const mat3 ACESInputMat = mat3(
		vec3( 0.59719, 0.07600, 0.02840 ),		vec3( 0.35458, 0.90834, 0.13383 ),
		vec3( 0.04823, 0.01566, 0.83777 )
	);
	const mat3 ACESOutputMat = mat3(
		vec3(  1.60475, -0.10208, -0.00327 ),		vec3( -0.53108,  1.10813, -0.07276 ),
		vec3( -0.07367, -0.00605,  1.07602 )
	);
	color *= toneMappingExposure / 0.6;
	color = ACESInputMat * color;
	color = RRTAndODTFit( color );
	color = ACESOutputMat * color;
	return saturate( color );
}
const mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(
	vec3( 1.6605, - 0.1246, - 0.0182 ),
	vec3( - 0.5876, 1.1329, - 0.1006 ),
	vec3( - 0.0728, - 0.0083, 1.1187 )
);
const mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(
	vec3( 0.6274, 0.0691, 0.0164 ),
	vec3( 0.3293, 0.9195, 0.0880 ),
	vec3( 0.0433, 0.0113, 0.8956 )
);
vec3 agxDefaultContrastApprox( vec3 x ) {
	vec3 x2 = x * x;
	vec3 x4 = x2 * x2;
	return + 15.5 * x4 * x2
		- 40.14 * x4 * x
		+ 31.96 * x4
		- 6.868 * x2 * x
		+ 0.4298 * x2
		+ 0.1191 * x
		- 0.00232;
}
vec3 AgXToneMapping( vec3 color ) {
	const mat3 AgXInsetMatrix = mat3(
		vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),
		vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),
		vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )
	);
	const mat3 AgXOutsetMatrix = mat3(
		vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),
		vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),
		vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )
	);
	const float AgxMinEv = - 12.47393;	const float AgxMaxEv = 4.026069;
	color *= toneMappingExposure;
	color = LINEAR_SRGB_TO_LINEAR_REC2020 * color;
	color = AgXInsetMatrix * color;
	color = max( color, 1e-10 );	color = log2( color );
	color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );
	color = clamp( color, 0.0, 1.0 );
	color = agxDefaultContrastApprox( color );
	color = AgXOutsetMatrix * color;
	color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );
	color = LINEAR_REC2020_TO_LINEAR_SRGB * color;
	color = clamp( color, 0.0, 1.0 );
	return color;
}
vec3 NeutralToneMapping( vec3 color ) {
	const float StartCompression = 0.8 - 0.04;
	const float Desaturation = 0.15;
	color *= toneMappingExposure;
	float x = min( color.r, min( color.g, color.b ) );
	float offset = x < 0.08 ? x - 6.25 * x * x : 0.04;
	color -= offset;
	float peak = max( color.r, max( color.g, color.b ) );
	if ( peak < StartCompression ) return color;
	float d = 1. - StartCompression;
	float newPeak = 1. - d * d / ( peak + d - StartCompression );
	color *= newPeak / peak;
	float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. );
	return mix( color, vec3( newPeak ), g );
}
vec3 CustomToneMapping( vec3 color ) { return color; }`,gQt=`#ifdef USE_TRANSMISSION
	material.transmission = transmission;
	material.transmissionAlpha = 1.0;
	material.thickness = thickness;
	material.attenuationDistance = attenuationDistance;
	material.attenuationColor = attenuationColor;
	#ifdef USE_TRANSMISSIONMAP
		material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;
	#endif
	#ifdef USE_THICKNESSMAP
		material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;
	#endif
	vec3 pos = vWorldPosition;
	vec3 v = normalize( cameraPosition - pos );
	vec3 n = inverseTransformDirection( normal, viewMatrix );
	vec4 transmitted = getIBLVolumeRefraction(
		n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,
		pos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness,
		material.attenuationColor, material.attenuationDistance );
	material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );
	totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );
#endif`,yQt=`#ifdef USE_TRANSMISSION
	uniform float transmission;
	uniform float thickness;
	uniform float attenuationDistance;
	uniform vec3 attenuationColor;
	#ifdef USE_TRANSMISSIONMAP
		uniform sampler2D transmissionMap;
	#endif
	#ifdef USE_THICKNESSMAP
		uniform sampler2D thicknessMap;
	#endif
	uniform vec2 transmissionSamplerSize;
	uniform sampler2D transmissionSamplerMap;
	uniform mat4 modelMatrix;
	uniform mat4 projectionMatrix;
	varying vec3 vWorldPosition;
	float w0( float a ) {
		return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );
	}
	float w1( float a ) {
		return ( 1.0 / 6.0 ) * ( a *  a * ( 3.0 * a - 6.0 ) + 4.0 );
	}
	float w2( float a ){
		return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );
	}
	float w3( float a ) {
		return ( 1.0 / 6.0 ) * ( a * a * a );
	}
	float g0( float a ) {
		return w0( a ) + w1( a );
	}
	float g1( float a ) {
		return w2( a ) + w3( a );
	}
	float h0( float a ) {
		return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );
	}
	float h1( float a ) {
		return 1.0 + w3( a ) / ( w2( a ) + w3( a ) );
	}
	vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {
		uv = uv * texelSize.zw + 0.5;
		vec2 iuv = floor( uv );
		vec2 fuv = fract( uv );
		float g0x = g0( fuv.x );
		float g1x = g1( fuv.x );
		float h0x = h0( fuv.x );
		float h1x = h1( fuv.x );
		float h0y = h0( fuv.y );
		float h1y = h1( fuv.y );
		vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;
		vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;
		vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;
		vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;
		return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +
			g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );
	}
	vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {
		vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );
		vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );
		vec2 fLodSizeInv = 1.0 / fLodSize;
		vec2 cLodSizeInv = 1.0 / cLodSize;
		vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );
		vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );
		return mix( fSample, cSample, fract( lod ) );
	}
	vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {
		vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );
		vec3 modelScale;
		modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );
		modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );
		modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );
		return normalize( refractionVector ) * thickness * modelScale;
	}
	float applyIorToRoughness( const in float roughness, const in float ior ) {
		return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );
	}
	vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {
		float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );
		return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );
	}
	vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {
		if ( isinf( attenuationDistance ) ) {
			return vec3( 1.0 );
		} else {
			vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;
			vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );			return transmittance;
		}
	}
	vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,
		const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,
		const in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness,
		const in vec3 attenuationColor, const in float attenuationDistance ) {
		vec4 transmittedLight;
		vec3 transmittance;
		#ifdef USE_DISPERSION
			float halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;
			vec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );
			for ( int i = 0; i < 3; i ++ ) {
				vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );
				vec3 refractedRayExit = position + transmissionRay;
				vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );
				vec2 refractionCoords = ndcPos.xy / ndcPos.w;
				refractionCoords += 1.0;
				refractionCoords /= 2.0;
				vec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );
				transmittedLight[ i ] = transmissionSample[ i ];
				transmittedLight.a += transmissionSample.a;
				transmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];
			}
			transmittedLight.a /= 3.0;
		#else
			vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );
			vec3 refractedRayExit = position + transmissionRay;
			vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );
			vec2 refractionCoords = ndcPos.xy / ndcPos.w;
			refractionCoords += 1.0;
			refractionCoords /= 2.0;
			transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );
			transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );
		#endif
		vec3 attenuatedColor = transmittance * transmittedLight.rgb;
		vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );
		float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;
		return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );
	}
#endif`,bQt=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
	varying vec2 vUv;
#endif
#ifdef USE_MAP
	varying vec2 vMapUv;
#endif
#ifdef USE_ALPHAMAP
	varying vec2 vAlphaMapUv;
#endif
#ifdef USE_LIGHTMAP
	varying vec2 vLightMapUv;
#endif
#ifdef USE_AOMAP
	varying vec2 vAoMapUv;
#endif
#ifdef USE_BUMPMAP
	varying vec2 vBumpMapUv;
#endif
#ifdef USE_NORMALMAP
	varying vec2 vNormalMapUv;
#endif
#ifdef USE_EMISSIVEMAP
	varying vec2 vEmissiveMapUv;
#endif
#ifdef USE_METALNESSMAP
	varying vec2 vMetalnessMapUv;
#endif
#ifdef USE_ROUGHNESSMAP
	varying vec2 vRoughnessMapUv;
#endif
#ifdef USE_ANISOTROPYMAP
	varying vec2 vAnisotropyMapUv;
#endif
#ifdef USE_CLEARCOATMAP
	varying vec2 vClearcoatMapUv;
#endif
#ifdef USE_CLEARCOAT_NORMALMAP
	varying vec2 vClearcoatNormalMapUv;
#endif
#ifdef USE_CLEARCOAT_ROUGHNESSMAP
	varying vec2 vClearcoatRoughnessMapUv;
#endif
#ifdef USE_IRIDESCENCEMAP
	varying vec2 vIridescenceMapUv;
#endif
#ifdef USE_IRIDESCENCE_THICKNESSMAP
	varying vec2 vIridescenceThicknessMapUv;
#endif
#ifdef USE_SHEEN_COLORMAP
	varying vec2 vSheenColorMapUv;
#endif
#ifdef USE_SHEEN_ROUGHNESSMAP
	varying vec2 vSheenRoughnessMapUv;
#endif
#ifdef USE_SPECULARMAP
	varying vec2 vSpecularMapUv;
#endif
#ifdef USE_SPECULAR_COLORMAP
	varying vec2 vSpecularColorMapUv;
#endif
#ifdef USE_SPECULAR_INTENSITYMAP
	varying vec2 vSpecularIntensityMapUv;
#endif
#ifdef USE_TRANSMISSIONMAP
	uniform mat3 transmissionMapTransform;
	varying vec2 vTransmissionMapUv;
#endif
#ifdef USE_THICKNESSMAP
	uniform mat3 thicknessMapTransform;
	varying vec2 vThicknessMapUv;
#endif`,xQt=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
	varying vec2 vUv;
#endif
#ifdef USE_MAP
	uniform mat3 mapTransform;
	varying vec2 vMapUv;
#endif
#ifdef USE_ALPHAMAP
	uniform mat3 alphaMapTransform;
	varying vec2 vAlphaMapUv;
#endif
#ifdef USE_LIGHTMAP
	uniform mat3 lightMapTransform;
	varying vec2 vLightMapUv;
#endif
#ifdef USE_AOMAP
	uniform mat3 aoMapTransform;
	varying vec2 vAoMapUv;
#endif
#ifdef USE_BUMPMAP
	uniform mat3 bumpMapTransform;
	varying vec2 vBumpMapUv;
#endif
#ifdef USE_NORMALMAP
	uniform mat3 normalMapTransform;
	varying vec2 vNormalMapUv;
#endif
#ifdef USE_DISPLACEMENTMAP
	uniform mat3 displacementMapTransform;
	varying vec2 vDisplacementMapUv;
#endif
#ifdef USE_EMISSIVEMAP
	uniform mat3 emissiveMapTransform;
	varying vec2 vEmissiveMapUv;
#endif
#ifdef USE_METALNESSMAP
	uniform mat3 metalnessMapTransform;
	varying vec2 vMetalnessMapUv;
#endif
#ifdef USE_ROUGHNESSMAP
	uniform mat3 roughnessMapTransform;
	varying vec2 vRoughnessMapUv;
#endif
#ifdef USE_ANISOTROPYMAP
	uniform mat3 anisotropyMapTransform;
	varying vec2 vAnisotropyMapUv;
#endif
#ifdef USE_CLEARCOATMAP
	uniform mat3 clearcoatMapTransform;
	varying vec2 vClearcoatMapUv;
#endif
#ifdef USE_CLEARCOAT_NORMALMAP
	uniform mat3 clearcoatNormalMapTransform;
	varying vec2 vClearcoatNormalMapUv;
#endif
#ifdef USE_CLEARCOAT_ROUGHNESSMAP
	uniform mat3 clearcoatRoughnessMapTransform;
	varying vec2 vClearcoatRoughnessMapUv;
#endif
#ifdef USE_SHEEN_COLORMAP
	uniform mat3 sheenColorMapTransform;
	varying vec2 vSheenColorMapUv;
#endif
#ifdef USE_SHEEN_ROUGHNESSMAP
	uniform mat3 sheenRoughnessMapTransform;
	varying vec2 vSheenRoughnessMapUv;
#endif
#ifdef USE_IRIDESCENCEMAP
	uniform mat3 iridescenceMapTransform;
	varying vec2 vIridescenceMapUv;
#endif
#ifdef USE_IRIDESCENCE_THICKNESSMAP
	uniform mat3 iridescenceThicknessMapTransform;
	varying vec2 vIridescenceThicknessMapUv;
#endif
#ifdef USE_SPECULARMAP
	uniform mat3 specularMapTransform;
	varying vec2 vSpecularMapUv;
#endif
#ifdef USE_SPECULAR_COLORMAP
	uniform mat3 specularColorMapTransform;
	varying vec2 vSpecularColorMapUv;
#endif
#ifdef USE_SPECULAR_INTENSITYMAP
	uniform mat3 specularIntensityMapTransform;
	varying vec2 vSpecularIntensityMapUv;
#endif
#ifdef USE_TRANSMISSIONMAP
	uniform mat3 transmissionMapTransform;
	varying vec2 vTransmissionMapUv;
#endif
#ifdef USE_THICKNESSMAP
	uniform mat3 thicknessMapTransform;
	varying vec2 vThicknessMapUv;
#endif`,_Qt=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
	vUv = vec3( uv, 1 ).xy;
#endif
#ifdef USE_MAP
	vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;
#endif
#ifdef USE_ALPHAMAP
	vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_LIGHTMAP
	vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_AOMAP
	vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_BUMPMAP
	vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_NORMALMAP
	vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_DISPLACEMENTMAP
	vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_EMISSIVEMAP
	vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_METALNESSMAP
	vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_ROUGHNESSMAP
	vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_ANISOTROPYMAP
	vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_CLEARCOATMAP
	vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_CLEARCOAT_NORMALMAP
	vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_CLEARCOAT_ROUGHNESSMAP
	vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_IRIDESCENCEMAP
	vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_IRIDESCENCE_THICKNESSMAP
	vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_SHEEN_COLORMAP
	vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_SHEEN_ROUGHNESSMAP
	vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_SPECULARMAP
	vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_SPECULAR_COLORMAP
	vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_SPECULAR_INTENSITYMAP
	vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_TRANSMISSIONMAP
	vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_THICKNESSMAP
	vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;
#endif`,wQt=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0
	vec4 worldPosition = vec4( transformed, 1.0 );
	#ifdef USE_BATCHING
		worldPosition = batchingMatrix * worldPosition;
	#endif
	#ifdef USE_INSTANCING
		worldPosition = instanceMatrix * worldPosition;
	#endif
	worldPosition = modelMatrix * worldPosition;
#endif`;const SQt=`varying vec2 vUv;
uniform mat3 uvTransform;
void main() {
	vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
	gl_Position = vec4( position.xy, 1.0, 1.0 );
}`,TQt=`uniform sampler2D t2D;
uniform float backgroundIntensity;
varying vec2 vUv;
void main() {
	vec4 texColor = texture2D( t2D, vUv );
	#ifdef DECODE_VIDEO_TEXTURE
		texColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );
	#endif
	texColor.rgb *= backgroundIntensity;
	gl_FragColor = texColor;
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
}`,EQt=`varying vec3 vWorldDirection;
#include <common>
void main() {
	vWorldDirection = transformDirection( position, modelMatrix );
	#include <begin_vertex>
	#include <project_vertex>
	gl_Position.z = gl_Position.w;
}`,AQt=`#ifdef ENVMAP_TYPE_CUBE
	uniform samplerCube envMap;
#elif defined( ENVMAP_TYPE_CUBE_UV )
	uniform sampler2D envMap;
#endif
uniform float flipEnvMap;
uniform float backgroundBlurriness;
uniform float backgroundIntensity;
uniform mat3 backgroundRotation;
varying vec3 vWorldDirection;
#include <cube_uv_reflection_fragment>
void main() {
	#ifdef ENVMAP_TYPE_CUBE
		vec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );
	#elif defined( ENVMAP_TYPE_CUBE_UV )
		vec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness );
	#else
		vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );
	#endif
	texColor.rgb *= backgroundIntensity;
	gl_FragColor = texColor;
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
}`,CQt=`varying vec3 vWorldDirection;
#include <common>
void main() {
	vWorldDirection = transformDirection( position, modelMatrix );
	#include <begin_vertex>
	#include <project_vertex>
	gl_Position.z = gl_Position.w;
}`,MQt=`uniform samplerCube tCube;
uniform float tFlip;
uniform float opacity;
varying vec3 vWorldDirection;
void main() {
	vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );
	gl_FragColor = texColor;
	gl_FragColor.a *= opacity;
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
}`,RQt=`#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
varying vec2 vHighPrecisionZW;
void main() {
	#include <uv_vertex>
	#include <batching_vertex>
	#include <skinbase_vertex>
	#include <morphinstance_vertex>
	#ifdef USE_DISPLACEMENTMAP
		#include <beginnormal_vertex>
		#include <morphnormal_vertex>
		#include <skinnormal_vertex>
	#endif
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <displacementmap_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	vHighPrecisionZW = gl_Position.zw;
}`,kQt=`#if DEPTH_PACKING == 3200
	uniform float opacity;
#endif
#include <common>
#include <packing>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
varying vec2 vHighPrecisionZW;
void main() {
	vec4 diffuseColor = vec4( 1.0 );
	#include <clipping_planes_fragment>
	#if DEPTH_PACKING == 3200
		diffuseColor.a = opacity;
	#endif
	#include <map_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	#include <alphahash_fragment>
	#include <logdepthbuf_fragment>
	#ifdef USE_REVERSED_DEPTH_BUFFER
		float fragCoordZ = vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ];
	#else
		float fragCoordZ = 0.5 * vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ] + 0.5;
	#endif
	#if DEPTH_PACKING == 3200
		gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );
	#elif DEPTH_PACKING == 3201
		gl_FragColor = packDepthToRGBA( fragCoordZ );
	#elif DEPTH_PACKING == 3202
		gl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );
	#elif DEPTH_PACKING == 3203
		gl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );
	#endif
}`,IQt=`#define DISTANCE
varying vec3 vWorldPosition;
#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	#include <batching_vertex>
	#include <skinbase_vertex>
	#include <morphinstance_vertex>
	#ifdef USE_DISPLACEMENTMAP
		#include <beginnormal_vertex>
		#include <morphnormal_vertex>
		#include <skinnormal_vertex>
	#endif
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <displacementmap_vertex>
	#include <project_vertex>
	#include <worldpos_vertex>
	#include <clipping_planes_vertex>
	vWorldPosition = worldPosition.xyz;
}`,PQt=`#define DISTANCE
uniform vec3 referencePosition;
uniform float nearDistance;
uniform float farDistance;
varying vec3 vWorldPosition;
#include <common>
#include <packing>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <clipping_planes_pars_fragment>
void main () {
	vec4 diffuseColor = vec4( 1.0 );
	#include <clipping_planes_fragment>
	#include <map_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	#include <alphahash_fragment>
	float dist = length( vWorldPosition - referencePosition );
	dist = ( dist - nearDistance ) / ( farDistance - nearDistance );
	dist = saturate( dist );
	gl_FragColor = packDepthToRGBA( dist );
}`,DQt=`varying vec3 vWorldDirection;
#include <common>
void main() {
	vWorldDirection = transformDirection( position, modelMatrix );
	#include <begin_vertex>
	#include <project_vertex>
}`,LQt=`uniform sampler2D tEquirect;
varying vec3 vWorldDirection;
#include <common>
void main() {
	vec3 direction = normalize( vWorldDirection );
	vec2 sampleUV = equirectUv( direction );
	gl_FragColor = texture2D( tEquirect, sampleUV );
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
}`,OQt=`uniform float scale;
attribute float lineDistance;
varying float vLineDistance;
#include <common>
#include <uv_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <morphtarget_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	vLineDistance = scale * lineDistance;
	#include <uv_vertex>
	#include <color_vertex>
	#include <morphinstance_vertex>
	#include <morphcolor_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	#include <fog_vertex>
}`,NQt=`uniform vec3 diffuse;
uniform float opacity;
uniform float dashSize;
uniform float totalSize;
varying float vLineDistance;
#include <common>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <fog_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	vec4 diffuseColor = vec4( diffuse, opacity );
	#include <clipping_planes_fragment>
	if ( mod( vLineDistance, totalSize ) > dashSize ) {
		discard;
	}
	vec3 outgoingLight = vec3( 0.0 );
	#include <logdepthbuf_fragment>
	#include <map_fragment>
	#include <color_fragment>
	outgoingLight = diffuseColor.rgb;
	#include <opaque_fragment>
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
	#include <fog_fragment>
	#include <premultiplied_alpha_fragment>
}`,FQt=`#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <envmap_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	#include <color_vertex>
	#include <morphinstance_vertex>
	#include <morphcolor_vertex>
	#include <batching_vertex>
	#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )
		#include <beginnormal_vertex>
		#include <morphnormal_vertex>
		#include <skinbase_vertex>
		#include <skinnormal_vertex>
		#include <defaultnormal_vertex>
	#endif
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	#include <worldpos_vertex>
	#include <envmap_vertex>
	#include <fog_vertex>
}`,zQt=`uniform vec3 diffuse;
uniform float opacity;
#ifndef FLAT_SHADED
	varying vec3 vNormal;
#endif
#include <common>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <aomap_pars_fragment>
#include <lightmap_pars_fragment>
#include <envmap_common_pars_fragment>
#include <envmap_pars_fragment>
#include <fog_pars_fragment>
#include <specularmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	vec4 diffuseColor = vec4( diffuse, opacity );
	#include <clipping_planes_fragment>
	#include <logdepthbuf_fragment>
	#include <map_fragment>
	#include <color_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	#include <alphahash_fragment>
	#include <specularmap_fragment>
	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
	#ifdef USE_LIGHTMAP
		vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );
		reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;
	#else
		reflectedLight.indirectDiffuse += vec3( 1.0 );
	#endif
	#include <aomap_fragment>
	reflectedLight.indirectDiffuse *= diffuseColor.rgb;
	vec3 outgoingLight = reflectedLight.indirectDiffuse;
	#include <envmap_fragment>
	#include <opaque_fragment>
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
	#include <fog_fragment>
	#include <premultiplied_alpha_fragment>
	#include <dithering_fragment>
}`,BQt=`#define LAMBERT
varying vec3 vViewPosition;
#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <envmap_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <normal_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <shadowmap_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	#include <color_vertex>
	#include <morphinstance_vertex>
	#include <morphcolor_vertex>
	#include <batching_vertex>
	#include <beginnormal_vertex>
	#include <morphnormal_vertex>
	#include <skinbase_vertex>
	#include <skinnormal_vertex>
	#include <defaultnormal_vertex>
	#include <normal_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <displacementmap_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	vViewPosition = - mvPosition.xyz;
	#include <worldpos_vertex>
	#include <envmap_vertex>
	#include <shadowmap_vertex>
	#include <fog_vertex>
}`,UQt=`#define LAMBERT
uniform vec3 diffuse;
uniform vec3 emissive;
uniform float opacity;
#include <common>
#include <packing>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <aomap_pars_fragment>
#include <lightmap_pars_fragment>
#include <emissivemap_pars_fragment>
#include <envmap_common_pars_fragment>
#include <envmap_pars_fragment>
#include <fog_pars_fragment>
#include <bsdfs>
#include <lights_pars_begin>
#include <normal_pars_fragment>
#include <lights_lambert_pars_fragment>
#include <shadowmap_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <specularmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	vec4 diffuseColor = vec4( diffuse, opacity );
	#include <clipping_planes_fragment>
	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
	vec3 totalEmissiveRadiance = emissive;
	#include <logdepthbuf_fragment>
	#include <map_fragment>
	#include <color_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	#include <alphahash_fragment>
	#include <specularmap_fragment>
	#include <normal_fragment_begin>
	#include <normal_fragment_maps>
	#include <emissivemap_fragment>
	#include <lights_lambert_fragment>
	#include <lights_fragment_begin>
	#include <lights_fragment_maps>
	#include <lights_fragment_end>
	#include <aomap_fragment>
	vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;
	#include <envmap_fragment>
	#include <opaque_fragment>
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
	#include <fog_fragment>
	#include <premultiplied_alpha_fragment>
	#include <dithering_fragment>
}`,HQt=`#define MATCAP
varying vec3 vViewPosition;
#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <color_pars_vertex>
#include <displacementmap_pars_vertex>
#include <fog_pars_vertex>
#include <normal_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	#include <color_vertex>
	#include <morphinstance_vertex>
	#include <morphcolor_vertex>
	#include <batching_vertex>
	#include <beginnormal_vertex>
	#include <morphnormal_vertex>
	#include <skinbase_vertex>
	#include <skinnormal_vertex>
	#include <defaultnormal_vertex>
	#include <normal_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <displacementmap_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	#include <fog_vertex>
	vViewPosition = - mvPosition.xyz;
}`,jQt=`#define MATCAP
uniform vec3 diffuse;
uniform float opacity;
uniform sampler2D matcap;
varying vec3 vViewPosition;
#include <common>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <fog_pars_fragment>
#include <normal_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	vec4 diffuseColor = vec4( diffuse, opacity );
	#include <clipping_planes_fragment>
	#include <logdepthbuf_fragment>
	#include <map_fragment>
	#include <color_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	#include <alphahash_fragment>
	#include <normal_fragment_begin>
	#include <normal_fragment_maps>
	vec3 viewDir = normalize( vViewPosition );
	vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );
	vec3 y = cross( viewDir, x );
	vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;
	#ifdef USE_MATCAP
		vec4 matcapColor = texture2D( matcap, uv );
	#else
		vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );
	#endif
	vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;
	#include <opaque_fragment>
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
	#include <fog_fragment>
	#include <premultiplied_alpha_fragment>
	#include <dithering_fragment>
}`,VQt=`#define NORMAL
#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
	varying vec3 vViewPosition;
#endif
#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <normal_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	#include <batching_vertex>
	#include <beginnormal_vertex>
	#include <morphinstance_vertex>
	#include <morphnormal_vertex>
	#include <skinbase_vertex>
	#include <skinnormal_vertex>
	#include <defaultnormal_vertex>
	#include <normal_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <displacementmap_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
	vViewPosition = - mvPosition.xyz;
#endif
}`,qQt=`#define NORMAL
uniform float opacity;
#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
	varying vec3 vViewPosition;
#endif
#include <packing>
#include <uv_pars_fragment>
#include <normal_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity );
	#include <clipping_planes_fragment>
	#include <logdepthbuf_fragment>
	#include <normal_fragment_begin>
	#include <normal_fragment_maps>
	gl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a );
	#ifdef OPAQUE
		gl_FragColor.a = 1.0;
	#endif
}`,GQt=`#define PHONG
varying vec3 vViewPosition;
#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <envmap_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <normal_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <shadowmap_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	#include <color_vertex>
	#include <morphcolor_vertex>
	#include <batching_vertex>
	#include <beginnormal_vertex>
	#include <morphinstance_vertex>
	#include <morphnormal_vertex>
	#include <skinbase_vertex>
	#include <skinnormal_vertex>
	#include <defaultnormal_vertex>
	#include <normal_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <displacementmap_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	vViewPosition = - mvPosition.xyz;
	#include <worldpos_vertex>
	#include <envmap_vertex>
	#include <shadowmap_vertex>
	#include <fog_vertex>
}`,$Qt=`#define PHONG
uniform vec3 diffuse;
uniform vec3 emissive;
uniform vec3 specular;
uniform float shininess;
uniform float opacity;
#include <common>
#include <packing>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <aomap_pars_fragment>
#include <lightmap_pars_fragment>
#include <emissivemap_pars_fragment>
#include <envmap_common_pars_fragment>
#include <envmap_pars_fragment>
#include <fog_pars_fragment>
#include <bsdfs>
#include <lights_pars_begin>
#include <normal_pars_fragment>
#include <lights_phong_pars_fragment>
#include <shadowmap_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <specularmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	vec4 diffuseColor = vec4( diffuse, opacity );
	#include <clipping_planes_fragment>
	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
	vec3 totalEmissiveRadiance = emissive;
	#include <logdepthbuf_fragment>
	#include <map_fragment>
	#include <color_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	#include <alphahash_fragment>
	#include <specularmap_fragment>
	#include <normal_fragment_begin>
	#include <normal_fragment_maps>
	#include <emissivemap_fragment>
	#include <lights_phong_fragment>
	#include <lights_fragment_begin>
	#include <lights_fragment_maps>
	#include <lights_fragment_end>
	#include <aomap_fragment>
	vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;
	#include <envmap_fragment>
	#include <opaque_fragment>
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
	#include <fog_fragment>
	#include <premultiplied_alpha_fragment>
	#include <dithering_fragment>
}`,WQt=`#define STANDARD
varying vec3 vViewPosition;
#ifdef USE_TRANSMISSION
	varying vec3 vWorldPosition;
#endif
#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <normal_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <shadowmap_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	#include <color_vertex>
	#include <morphinstance_vertex>
	#include <morphcolor_vertex>
	#include <batching_vertex>
	#include <beginnormal_vertex>
	#include <morphnormal_vertex>
	#include <skinbase_vertex>
	#include <skinnormal_vertex>
	#include <defaultnormal_vertex>
	#include <normal_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <displacementmap_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	vViewPosition = - mvPosition.xyz;
	#include <worldpos_vertex>
	#include <shadowmap_vertex>
	#include <fog_vertex>
#ifdef USE_TRANSMISSION
	vWorldPosition = worldPosition.xyz;
#endif
}`,YQt=`#define STANDARD
#ifdef PHYSICAL
	#define IOR
	#define USE_SPECULAR
#endif
uniform vec3 diffuse;
uniform vec3 emissive;
uniform float roughness;
uniform float metalness;
uniform float opacity;
#ifdef IOR
	uniform float ior;
#endif
#ifdef USE_SPECULAR
	uniform float specularIntensity;
	uniform vec3 specularColor;
	#ifdef USE_SPECULAR_COLORMAP
		uniform sampler2D specularColorMap;
	#endif
	#ifdef USE_SPECULAR_INTENSITYMAP
		uniform sampler2D specularIntensityMap;
	#endif
#endif
#ifdef USE_CLEARCOAT
	uniform float clearcoat;
	uniform float clearcoatRoughness;
#endif
#ifdef USE_DISPERSION
	uniform float dispersion;
#endif
#ifdef USE_IRIDESCENCE
	uniform float iridescence;
	uniform float iridescenceIOR;
	uniform float iridescenceThicknessMinimum;
	uniform float iridescenceThicknessMaximum;
#endif
#ifdef USE_SHEEN
	uniform vec3 sheenColor;
	uniform float sheenRoughness;
	#ifdef USE_SHEEN_COLORMAP
		uniform sampler2D sheenColorMap;
	#endif
	#ifdef USE_SHEEN_ROUGHNESSMAP
		uniform sampler2D sheenRoughnessMap;
	#endif
#endif
#ifdef USE_ANISOTROPY
	uniform vec2 anisotropyVector;
	#ifdef USE_ANISOTROPYMAP
		uniform sampler2D anisotropyMap;
	#endif
#endif
varying vec3 vViewPosition;
#include <common>
#include <packing>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <aomap_pars_fragment>
#include <lightmap_pars_fragment>
#include <emissivemap_pars_fragment>
#include <iridescence_fragment>
#include <cube_uv_reflection_fragment>
#include <envmap_common_pars_fragment>
#include <envmap_physical_pars_fragment>
#include <fog_pars_fragment>
#include <lights_pars_begin>
#include <normal_pars_fragment>
#include <lights_physical_pars_fragment>
#include <transmission_pars_fragment>
#include <shadowmap_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <clearcoat_pars_fragment>
#include <iridescence_pars_fragment>
#include <roughnessmap_pars_fragment>
#include <metalnessmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	vec4 diffuseColor = vec4( diffuse, opacity );
	#include <clipping_planes_fragment>
	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
	vec3 totalEmissiveRadiance = emissive;
	#include <logdepthbuf_fragment>
	#include <map_fragment>
	#include <color_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	#include <alphahash_fragment>
	#include <roughnessmap_fragment>
	#include <metalnessmap_fragment>
	#include <normal_fragment_begin>
	#include <normal_fragment_maps>
	#include <clearcoat_normal_fragment_begin>
	#include <clearcoat_normal_fragment_maps>
	#include <emissivemap_fragment>
	#include <lights_physical_fragment>
	#include <lights_fragment_begin>
	#include <lights_fragment_maps>
	#include <lights_fragment_end>
	#include <aomap_fragment>
	vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;
	vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;
	#include <transmission_fragment>
	vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;
	#ifdef USE_SHEEN
		float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );
		outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;
	#endif
	#ifdef USE_CLEARCOAT
		float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );
		vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );
		outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;
	#endif
	#include <opaque_fragment>
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
	#include <fog_fragment>
	#include <premultiplied_alpha_fragment>
	#include <dithering_fragment>
}`,XQt=`#define TOON
varying vec3 vViewPosition;
#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <normal_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <shadowmap_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	#include <color_vertex>
	#include <morphinstance_vertex>
	#include <morphcolor_vertex>
	#include <batching_vertex>
	#include <beginnormal_vertex>
	#include <morphnormal_vertex>
	#include <skinbase_vertex>
	#include <skinnormal_vertex>
	#include <defaultnormal_vertex>
	#include <normal_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <displacementmap_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	vViewPosition = - mvPosition.xyz;
	#include <worldpos_vertex>
	#include <shadowmap_vertex>
	#include <fog_vertex>
}`,ZQt=`#define TOON
uniform vec3 diffuse;
uniform vec3 emissive;
uniform float opacity;
#include <common>
#include <packing>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <aomap_pars_fragment>
#include <lightmap_pars_fragment>
#include <emissivemap_pars_fragment>
#include <gradientmap_pars_fragment>
#include <fog_pars_fragment>
#include <bsdfs>
#include <lights_pars_begin>
#include <normal_pars_fragment>
#include <lights_toon_pars_fragment>
#include <shadowmap_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	vec4 diffuseColor = vec4( diffuse, opacity );
	#include <clipping_planes_fragment>
	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
	vec3 totalEmissiveRadiance = emissive;
	#include <logdepthbuf_fragment>
	#include <map_fragment>
	#include <color_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	#include <alphahash_fragment>
	#include <normal_fragment_begin>
	#include <normal_fragment_maps>
	#include <emissivemap_fragment>
	#include <lights_toon_fragment>
	#include <lights_fragment_begin>
	#include <lights_fragment_maps>
	#include <lights_fragment_end>
	#include <aomap_fragment>
	vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;
	#include <opaque_fragment>
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
	#include <fog_fragment>
	#include <premultiplied_alpha_fragment>
	#include <dithering_fragment>
}`,KQt=`uniform float size;
uniform float scale;
#include <common>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <morphtarget_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
#ifdef USE_POINTS_UV
	varying vec2 vUv;
	uniform mat3 uvTransform;
#endif
void main() {
	#ifdef USE_POINTS_UV
		vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
	#endif
	#include <color_vertex>
	#include <morphinstance_vertex>
	#include <morphcolor_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <project_vertex>
	gl_PointSize = size;
	#ifdef USE_SIZEATTENUATION
		bool isPerspective = isPerspectiveMatrix( projectionMatrix );
		if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );
	#endif
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	#include <worldpos_vertex>
	#include <fog_vertex>
}`,JQt=`uniform vec3 diffuse;
uniform float opacity;
#include <common>
#include <color_pars_fragment>
#include <map_particle_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <fog_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	vec4 diffuseColor = vec4( diffuse, opacity );
	#include <clipping_planes_fragment>
	vec3 outgoingLight = vec3( 0.0 );
	#include <logdepthbuf_fragment>
	#include <map_particle_fragment>
	#include <color_fragment>
	#include <alphatest_fragment>
	#include <alphahash_fragment>
	outgoingLight = diffuseColor.rgb;
	#include <opaque_fragment>
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
	#include <fog_fragment>
	#include <premultiplied_alpha_fragment>
}`,QQt=`#include <common>
#include <batching_pars_vertex>
#include <fog_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <shadowmap_pars_vertex>
void main() {
	#include <batching_vertex>
	#include <beginnormal_vertex>
	#include <morphinstance_vertex>
	#include <morphnormal_vertex>
	#include <skinbase_vertex>
	#include <skinnormal_vertex>
	#include <defaultnormal_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <worldpos_vertex>
	#include <shadowmap_vertex>
	#include <fog_vertex>
}`,eer=`uniform vec3 color;
uniform float opacity;
#include <common>
#include <packing>
#include <fog_pars_fragment>
#include <bsdfs>
#include <lights_pars_begin>
#include <logdepthbuf_pars_fragment>
#include <shadowmap_pars_fragment>
#include <shadowmask_pars_fragment>
void main() {
	#include <logdepthbuf_fragment>
	gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
	#include <fog_fragment>
}`,ter=`uniform float rotation;
uniform vec2 center;
#include <common>
#include <uv_pars_vertex>
#include <fog_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	vec4 mvPosition = modelViewMatrix[ 3 ];
	vec2 scale = vec2( length( modelMatrix[ 0 ].xyz ), length( modelMatrix[ 1 ].xyz ) );
	#ifndef USE_SIZEATTENUATION
		bool isPerspective = isPerspectiveMatrix( projectionMatrix );
		if ( isPerspective ) scale *= - mvPosition.z;
	#endif
	vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;
	vec2 rotatedPosition;
	rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;
	rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;
	mvPosition.xy += rotatedPosition;
	gl_Position = projectionMatrix * mvPosition;
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	#include <fog_vertex>
}`,rer=`uniform vec3 diffuse;
uniform float opacity;
#include <common>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <fog_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	vec4 diffuseColor = vec4( diffuse, opacity );
	#include <clipping_planes_fragment>
	vec3 outgoingLight = vec3( 0.0 );
	#include <logdepthbuf_fragment>
	#include <map_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	#include <alphahash_fragment>
	outgoingLight = diffuseColor.rgb;
	#include <opaque_fragment>
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
	#include <fog_fragment>
}`,Xh={alphahash_fragment:TKt,alphahash_pars_fragment:EKt,alphamap_fragment:AKt,alphamap_pars_fragment:CKt,alphatest_fragment:MKt,alphatest_pars_fragment:RKt,aomap_fragment:kKt,aomap_pars_fragment:IKt,batching_pars_vertex:PKt,batching_vertex:DKt,begin_vertex:LKt,beginnormal_vertex:OKt,bsdfs:NKt,iridescence_fragment:FKt,bumpmap_pars_fragment:zKt,clipping_planes_fragment:BKt,clipping_planes_pars_fragment:UKt,clipping_planes_pars_vertex:HKt,clipping_planes_vertex:jKt,color_fragment:VKt,color_pars_fragment:qKt,color_pars_vertex:GKt,color_vertex:$Kt,common:WKt,cube_uv_reflection_fragment:YKt,defaultnormal_vertex:XKt,displacementmap_pars_vertex:ZKt,displacementmap_vertex:KKt,emissivemap_fragment:JKt,emissivemap_pars_fragment:QKt,colorspace_fragment:eJt,colorspace_pars_fragment:tJt,envmap_fragment:rJt,envmap_common_pars_fragment:nJt,envmap_pars_fragment:iJt,envmap_pars_vertex:aJt,envmap_physical_pars_fragment:mJt,envmap_vertex:oJt,fog_vertex:sJt,fog_pars_vertex:lJt,fog_fragment:uJt,fog_pars_fragment:cJt,gradientmap_pars_fragment:fJt,lightmap_pars_fragment:dJt,lights_lambert_fragment:hJt,lights_lambert_pars_fragment:pJt,lights_pars_begin:vJt,lights_toon_fragment:gJt,lights_toon_pars_fragment:yJt,lights_phong_fragment:bJt,lights_phong_pars_fragment:xJt,lights_physical_fragment:_Jt,lights_physical_pars_fragment:wJt,lights_fragment_begin:SJt,lights_fragment_maps:TJt,lights_fragment_end:EJt,logdepthbuf_fragment:AJt,logdepthbuf_pars_fragment:CJt,logdepthbuf_pars_vertex:MJt,logdepthbuf_vertex:RJt,map_fragment:kJt,map_pars_fragment:IJt,map_particle_fragment:PJt,map_particle_pars_fragment:DJt,metalnessmap_fragment:LJt,metalnessmap_pars_fragment:OJt,morphinstance_vertex:NJt,morphcolor_vertex:FJt,morphnormal_vertex:zJt,morphtarget_pars_vertex:BJt,morphtarget_vertex:UJt,normal_fragment_begin:HJt,normal_fragment_maps:jJt,normal_pars_fragment:VJt,normal_pars_vertex:qJt,normal_vertex:GJt,normalmap_pars_fragment:$Jt,clearcoat_normal_fragment_begin:WJt,clearcoat_normal_fragment_maps:YJt,clearcoat_pars_fragment:XJt,iridescence_pars_fragment:ZJt,opaque_fragment:KJt,packing:JJt,premultiplied_alpha_fragment:QJt,project_vertex:eQt,dithering_fragment:tQt,dithering_pars_fragment:rQt,roughnessmap_fragment:nQt,roughnessmap_pars_fragment:iQt,shadowmap_pars_fragment:aQt,shadowmap_pars_vertex:oQt,shadowmap_vertex:sQt,shadowmask_pars_fragment:lQt,skinbase_vertex:uQt,skinning_pars_vertex:cQt,skinning_vertex:fQt,skinnormal_vertex:dQt,specularmap_fragment:hQt,specularmap_pars_fragment:pQt,tonemapping_fragment:vQt,tonemapping_pars_fragment:mQt,transmission_fragment:gQt,transmission_pars_fragment:yQt,uv_pars_fragment:bQt,uv_pars_vertex:xQt,uv_vertex:_Qt,worldpos_vertex:wQt,background_vert:SQt,background_frag:TQt,backgroundCube_vert:EQt,backgroundCube_frag:AQt,cube_vert:CQt,cube_frag:MQt,depth_vert:RQt,depth_frag:kQt,distanceRGBA_vert:IQt,distanceRGBA_frag:PQt,equirect_vert:DQt,equirect_frag:LQt,linedashed_vert:OQt,linedashed_frag:NQt,meshbasic_vert:FQt,meshbasic_frag:zQt,meshlambert_vert:BQt,meshlambert_frag:UQt,meshmatcap_vert:HQt,meshmatcap_frag:jQt,meshnormal_vert:VQt,meshnormal_frag:qQt,meshphong_vert:GQt,meshphong_frag:$Qt,meshphysical_vert:WQt,meshphysical_frag:YQt,meshtoon_vert:XQt,meshtoon_frag:ZQt,points_vert:KQt,points_frag:JQt,shadow_vert:QQt,shadow_frag:eer,sprite_vert:ter,sprite_frag:rer},gc={common:{diffuse:{value:new Wu(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new gh},alphaMap:{value:null},alphaMapTransform:{value:new gh},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new gh}},envmap:{envMap:{value:null},envMapRotation:{value:new gh},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new gh}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new gh}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new gh},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new gh},normalScale:{value:new sl(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new gh},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new gh}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new gh}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new gh}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Wu(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Wu(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new gh},alphaTest:{value:0},uvTransform:{value:new gh}},sprite:{diffuse:{value:new Wu(16777215)},opacity:{value:1},center:{value:new sl(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new gh},alphaMap:{value:null},alphaMapTransform:{value:new gh},alphaTest:{value:0}}},DC={basic:{uniforms:D2([gc.common,gc.specularmap,gc.envmap,gc.aomap,gc.lightmap,gc.fog]),vertexShader:Xh.meshbasic_vert,fragmentShader:Xh.meshbasic_frag},lambert:{uniforms:D2([gc.common,gc.specularmap,gc.envmap,gc.aomap,gc.lightmap,gc.emissivemap,gc.bumpmap,gc.normalmap,gc.displacementmap,gc.fog,gc.lights,{emissive:{value:new Wu(0)}}]),vertexShader:Xh.meshlambert_vert,fragmentShader:Xh.meshlambert_frag},phong:{uniforms:D2([gc.common,gc.specularmap,gc.envmap,gc.aomap,gc.lightmap,gc.emissivemap,gc.bumpmap,gc.normalmap,gc.displacementmap,gc.fog,gc.lights,{emissive:{value:new Wu(0)},specular:{value:new Wu(1118481)},shininess:{value:30}}]),vertexShader:Xh.meshphong_vert,fragmentShader:Xh.meshphong_frag},standard:{uniforms:D2([gc.common,gc.envmap,gc.aomap,gc.lightmap,gc.emissivemap,gc.bumpmap,gc.normalmap,gc.displacementmap,gc.roughnessmap,gc.metalnessmap,gc.fog,gc.lights,{emissive:{value:new Wu(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Xh.meshphysical_vert,fragmentShader:Xh.meshphysical_frag},toon:{uniforms:D2([gc.common,gc.aomap,gc.lightmap,gc.emissivemap,gc.bumpmap,gc.normalmap,gc.displacementmap,gc.gradientmap,gc.fog,gc.lights,{emissive:{value:new Wu(0)}}]),vertexShader:Xh.meshtoon_vert,fragmentShader:Xh.meshtoon_frag},matcap:{uniforms:D2([gc.common,gc.bumpmap,gc.normalmap,gc.displacementmap,gc.fog,{matcap:{value:null}}]),vertexShader:Xh.meshmatcap_vert,fragmentShader:Xh.meshmatcap_frag},points:{uniforms:D2([gc.points,gc.fog]),vertexShader:Xh.points_vert,fragmentShader:Xh.points_frag},dashed:{uniforms:D2([gc.common,gc.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Xh.linedashed_vert,fragmentShader:Xh.linedashed_frag},depth:{uniforms:D2([gc.common,gc.displacementmap]),vertexShader:Xh.depth_vert,fragmentShader:Xh.depth_frag},normal:{uniforms:D2([gc.common,gc.bumpmap,gc.normalmap,gc.displacementmap,{opacity:{value:1}}]),vertexShader:Xh.meshnormal_vert,fragmentShader:Xh.meshnormal_frag},sprite:{uniforms:D2([gc.sprite,gc.fog]),vertexShader:Xh.sprite_vert,fragmentShader:Xh.sprite_frag},background:{uniforms:{uvTransform:{value:new gh},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Xh.background_vert,fragmentShader:Xh.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new gh}},vertexShader:Xh.backgroundCube_vert,fragmentShader:Xh.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Xh.cube_vert,fragmentShader:Xh.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Xh.equirect_vert,fragmentShader:Xh.equirect_frag},distanceRGBA:{uniforms:D2([gc.common,gc.displacementmap,{referencePosition:{value:new oi},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Xh.distanceRGBA_vert,fragmentShader:Xh.distanceRGBA_frag},shadow:{uniforms:D2([gc.lights,gc.fog,{color:{value:new Wu(0)},opacity:{value:1}}]),vertexShader:Xh.shadow_vert,fragmentShader:Xh.shadow_frag}};DC.physical={uniforms:D2([DC.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new gh},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new gh},clearcoatNormalScale:{value:new sl(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new gh},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new gh},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new gh},sheen:{value:0},sheenColor:{value:new Wu(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new gh},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new gh},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new gh},transmissionSamplerSize:{value:new sl},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new gh},attenuationDistance:{value:0},attenuationColor:{value:new Wu(0)},specularColor:{value:new Wu(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new gh},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new gh},anisotropyVector:{value:new sl},anisotropyMap:{value:null},anisotropyMapTransform:{value:new gh}}]),vertexShader:Xh.meshphysical_vert,fragmentShader:Xh.meshphysical_frag};const ZV={r:0,b:0,g:0},CD=new $2,ner=new Rc;function ier(t,e,r,n,i,a,o){const s=new Wu(0);let d=a===!0?0:1,b,L,B=null,V=0,X=null;function ie(Se){let Pe=Se.isScene===!0?Se.background:null;return Pe&&Pe.isTexture&&(Pe=(Se.backgroundBlurriness>0?r:e).get(Pe)),Pe}function de(Se){let Pe=!1;const Me=ie(Se);Me===null?U(s,d):Me&&Me.isColor&&(U(Me,1),Pe=!0);const Ie=t.xr.getEnvironmentBlendMode();Ie==="additive"?n.buffers.color.setClear(0,0,0,1,o):Ie==="alpha-blend"&&n.buffers.color.setClear(0,0,0,0,o),(t.autoClear||Pe)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil))}function ae(Se,Pe){const Me=ie(Pe);Me&&(Me.isCubeTexture||Me.mapping===hF)?(L===void 0&&(L=new hc(new Hw(1,1,1),new eb({name:"BackgroundCubeMaterial",uniforms:x8(DC.backgroundCube.uniforms),vertexShader:DC.backgroundCube.vertexShader,fragmentShader:DC.backgroundCube.fragmentShader,side:x1,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),L.geometry.deleteAttribute("normal"),L.geometry.deleteAttribute("uv"),L.onBeforeRender=function(Ie,Ve,Ze){this.matrixWorld.copyPosition(Ze.matrixWorld)},Object.defineProperty(L.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(L)),CD.copy(Pe.backgroundRotation),CD.x*=-1,CD.y*=-1,CD.z*=-1,Me.isCubeTexture&&Me.isRenderTargetTexture===!1&&(CD.y*=-1,CD.z*=-1),L.material.uniforms.envMap.value=Me,L.material.uniforms.flipEnvMap.value=Me.isCubeTexture&&Me.isRenderTargetTexture===!1?-1:1,L.material.uniforms.backgroundBlurriness.value=Pe.backgroundBlurriness,L.material.uniforms.backgroundIntensity.value=Pe.backgroundIntensity,L.material.uniforms.backgroundRotation.value.setFromMatrix4(ner.makeRotationFromEuler(CD)),L.material.toneMapped=xv.getTransfer(Me.colorSpace)!==yg,(B!==Me||V!==Me.version||X!==t.toneMapping)&&(L.material.needsUpdate=!0,B=Me,V=Me.version,X=t.toneMapping),L.layers.enableAll(),Se.unshift(L,L.geometry,L.material,0,0,null)):Me&&Me.isTexture&&(b===void 0&&(b=new hc(new j_(2,2),new eb({name:"BackgroundMaterial",uniforms:x8(DC.background.uniforms),vertexShader:DC.background.vertexShader,fragmentShader:DC.background.fragmentShader,side:dx,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),b.geometry.deleteAttribute("normal"),Object.defineProperty(b.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(b)),b.material.uniforms.t2D.value=Me,b.material.uniforms.backgroundIntensity.value=Pe.backgroundIntensity,b.material.toneMapped=xv.getTransfer(Me.colorSpace)!==yg,Me.matrixAutoUpdate===!0&&Me.updateMatrix(),b.material.uniforms.uvTransform.value.copy(Me.matrix),(B!==Me||V!==Me.version||X!==t.toneMapping)&&(b.material.needsUpdate=!0,B=Me,V=Me.version,X=t.toneMapping),b.layers.enableAll(),Se.unshift(b,b.geometry,b.material,0,0,null))}function U(Se,Pe){Se.getRGB(ZV,$$e(t)),n.buffers.color.setClear(ZV.r,ZV.g,ZV.b,Pe,o)}function ve(){L!==void 0&&(L.geometry.dispose(),L.material.dispose(),L=void 0),b!==void 0&&(b.geometry.dispose(),b.material.dispose(),b=void 0)}return{getClearColor:function(){return s},setClearColor:function(Se,Pe=1){s.set(Se),d=Pe,U(s,d)},getClearAlpha:function(){return d},setClearAlpha:function(Se){d=Se,U(s,d)},render:de,addToRenderList:ae,dispose:ve}}function aer(t,e){const r=t.getParameter(t.MAX_VERTEX_ATTRIBS),n={},i=V(null);let a=i,o=!1;function s(nt,ut,ht,_t,Dt){let qt=!1;const Lt=B(_t,ht,ut);a!==Lt&&(a=Lt,b(a.object)),qt=X(nt,_t,ht,Dt),qt&&ie(nt,_t,ht,Dt),Dt!==null&&e.update(Dt,t.ELEMENT_ARRAY_BUFFER),(qt||o)&&(o=!1,Pe(nt,ut,ht,_t),Dt!==null&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,e.get(Dt).buffer))}function d(){return t.createVertexArray()}function b(nt){return t.bindVertexArray(nt)}function L(nt){return t.deleteVertexArray(nt)}function B(nt,ut,ht){const _t=ht.wireframe===!0;let Dt=n[nt.id];Dt===void 0&&(Dt={},n[nt.id]=Dt);let qt=Dt[ut.id];qt===void 0&&(qt={},Dt[ut.id]=qt);let Lt=qt[_t];return Lt===void 0&&(Lt=V(d()),qt[_t]=Lt),Lt}function V(nt){const ut=[],ht=[],_t=[];for(let Dt=0;Dt<r;Dt++)ut[Dt]=0,ht[Dt]=0,_t[Dt]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:ut,enabledAttributes:ht,attributeDivisors:_t,object:nt,attributes:{},index:null}}function X(nt,ut,ht,_t){const Dt=a.attributes,qt=ut.attributes;let Lt=0;const dr=ht.getAttributes();for(const Zt in dr)if(dr[Zt].location>=0){const yt=Dt[Zt];let Vt=qt[Zt];if(Vt===void 0&&(Zt==="instanceMatrix"&&nt.instanceMatrix&&(Vt=nt.instanceMatrix),Zt==="instanceColor"&&nt.instanceColor&&(Vt=nt.instanceColor)),yt===void 0||yt.attribute!==Vt||Vt&&yt.data!==Vt.data)return!0;Lt++}return a.attributesNum!==Lt||a.index!==_t}function ie(nt,ut,ht,_t){const Dt={},qt=ut.attributes;let Lt=0;const dr=ht.getAttributes();for(const Zt in dr)if(dr[Zt].location>=0){let yt=qt[Zt];yt===void 0&&(Zt==="instanceMatrix"&&nt.instanceMatrix&&(yt=nt.instanceMatrix),Zt==="instanceColor"&&nt.instanceColor&&(yt=nt.instanceColor));const Vt={};Vt.attribute=yt,yt&&yt.data&&(Vt.data=yt.data),Dt[Zt]=Vt,Lt++}a.attributes=Dt,a.attributesNum=Lt,a.index=_t}function de(){const nt=a.newAttributes;for(let ut=0,ht=nt.length;ut<ht;ut++)nt[ut]=0}function ae(nt){U(nt,0)}function U(nt,ut){const ht=a.newAttributes,_t=a.enabledAttributes,Dt=a.attributeDivisors;ht[nt]=1,_t[nt]===0&&(t.enableVertexAttribArray(nt),_t[nt]=1),Dt[nt]!==ut&&(t.vertexAttribDivisor(nt,ut),Dt[nt]=ut)}function ve(){const nt=a.newAttributes,ut=a.enabledAttributes;for(let ht=0,_t=ut.length;ht<_t;ht++)ut[ht]!==nt[ht]&&(t.disableVertexAttribArray(ht),ut[ht]=0)}function Se(nt,ut,ht,_t,Dt,qt,Lt){Lt===!0?t.vertexAttribIPointer(nt,ut,ht,Dt,qt):t.vertexAttribPointer(nt,ut,ht,_t,Dt,qt)}function Pe(nt,ut,ht,_t){de();const Dt=_t.attributes,qt=ht.getAttributes(),Lt=ut.defaultAttributeValues;for(const dr in qt){const Zt=qt[dr];if(Zt.location>=0){let Cr=Dt[dr];if(Cr===void 0&&(dr==="instanceMatrix"&&nt.instanceMatrix&&(Cr=nt.instanceMatrix),dr==="instanceColor"&&nt.instanceColor&&(Cr=nt.instanceColor)),Cr!==void 0){const yt=Cr.normalized,Vt=Cr.itemSize,Er=e.get(Cr);if(Er===void 0)continue;const sr=Er.buffer,or=Er.type,Ar=Er.bytesPerElement,Ir=or===t.INT||or===t.UNSIGNED_INT||Cr.gpuType===GP;if(Cr.isInterleavedBufferAttribute){const _n=Cr.data,Un=_n.stride,Qn=Cr.offset;if(_n.isInstancedInterleavedBuffer){for(let Jn=0;Jn<Zt.locationSize;Jn++)U(Zt.location+Jn,_n.meshPerAttribute);nt.isInstancedMesh!==!0&&_t._maxInstanceCount===void 0&&(_t._maxInstanceCount=_n.meshPerAttribute*_n.count)}else for(let Jn=0;Jn<Zt.locationSize;Jn++)ae(Zt.location+Jn);t.bindBuffer(t.ARRAY_BUFFER,sr);for(let Jn=0;Jn<Zt.locationSize;Jn++)Se(Zt.location+Jn,Vt/Zt.locationSize,or,yt,Un*Ar,(Qn+Vt/Zt.locationSize*Jn)*Ar,Ir)}else{if(Cr.isInstancedBufferAttribute){for(let _n=0;_n<Zt.locationSize;_n++)U(Zt.location+_n,Cr.meshPerAttribute);nt.isInstancedMesh!==!0&&_t._maxInstanceCount===void 0&&(_t._maxInstanceCount=Cr.meshPerAttribute*Cr.count)}else for(let _n=0;_n<Zt.locationSize;_n++)ae(Zt.location+_n);t.bindBuffer(t.ARRAY_BUFFER,sr);for(let _n=0;_n<Zt.locationSize;_n++)Se(Zt.location+_n,Vt/Zt.locationSize,or,yt,Vt*Ar,Vt/Zt.locationSize*_n*Ar,Ir)}}else if(Lt!==void 0){const yt=Lt[dr];if(yt!==void 0)switch(yt.length){case 2:t.vertexAttrib2fv(Zt.location,yt);break;case 3:t.vertexAttrib3fv(Zt.location,yt);break;case 4:t.vertexAttrib4fv(Zt.location,yt);break;default:t.vertexAttrib1fv(Zt.location,yt)}}}}ve()}function Me(){Ze();for(const nt in n){const ut=n[nt];for(const ht in ut){const _t=ut[ht];for(const Dt in _t)L(_t[Dt].object),delete _t[Dt];delete ut[ht]}delete n[nt]}}function Ie(nt){if(n[nt.id]===void 0)return;const ut=n[nt.id];for(const ht in ut){const _t=ut[ht];for(const Dt in _t)L(_t[Dt].object),delete _t[Dt];delete ut[ht]}delete n[nt.id]}function Ve(nt){for(const ut in n){const ht=n[ut];if(ht[nt.id]===void 0)continue;const _t=ht[nt.id];for(const Dt in _t)L(_t[Dt].object),delete _t[Dt];delete ht[nt.id]}}function Ze(){Je(),o=!0,a!==i&&(a=i,b(a.object))}function Je(){i.geometry=null,i.program=null,i.wireframe=!1}return{setup:s,reset:Ze,resetDefaultState:Je,dispose:Me,releaseStatesOfGeometry:Ie,releaseStatesOfProgram:Ve,initAttributes:de,enableAttribute:ae,disableUnusedAttributes:ve}}function oer(t,e,r){let n;function i(b){n=b}function a(b,L){t.drawArrays(n,b,L),r.update(L,n,1)}function o(b,L,B){B!==0&&(t.drawArraysInstanced(n,b,L,B),r.update(L,n,B))}function s(b,L,B){if(B===0)return;e.get("WEBGL_multi_draw").multiDrawArraysWEBGL(n,b,0,L,0,B);let X=0;for(let ie=0;ie<B;ie++)X+=L[ie];r.update(X,n,1)}function d(b,L,B,V){if(B===0)return;const X=e.get("WEBGL_multi_draw");if(X===null)for(let ie=0;ie<b.length;ie++)o(b[ie],L[ie],V[ie]);else{X.multiDrawArraysInstancedWEBGL(n,b,0,L,0,V,0,B);let ie=0;for(let de=0;de<B;de++)ie+=L[de]*V[de];r.update(ie,n,1)}}this.setMode=i,this.render=a,this.renderInstances=o,this.renderMultiDraw=s,this.renderMultiDrawInstances=d}function ser(t,e,r,n){let i;function a(){if(i!==void 0)return i;if(e.has("EXT_texture_filter_anisotropic")===!0){const Ve=e.get("EXT_texture_filter_anisotropic");i=t.getParameter(Ve.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i}function o(Ve){return!(Ve!==Rp&&n.convert(Ve)!==t.getParameter(t.IMPLEMENTATION_COLOR_READ_FORMAT))}function s(Ve){const Ze=Ve===Og&&(e.has("EXT_color_buffer_half_float")||e.has("EXT_color_buffer_float"));return!(Ve!==e_&&n.convert(Ve)!==t.getParameter(t.IMPLEMENTATION_COLOR_READ_TYPE)&&Ve!==mp&&!Ze)}function d(Ve){if(Ve==="highp"){if(t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";Ve="mediump"}return Ve==="mediump"&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let b=r.precision!==void 0?r.precision:"highp";const L=d(b);L!==b&&(console.warn("THREE.WebGLRenderer:",b,"not supported, using",L,"instead."),b=L);const B=r.logarithmicDepthBuffer===!0,V=r.reversedDepthBuffer===!0&&e.has("EXT_clip_control"),X=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),ie=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),de=t.getParameter(t.MAX_TEXTURE_SIZE),ae=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),U=t.getParameter(t.MAX_VERTEX_ATTRIBS),ve=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),Se=t.getParameter(t.MAX_VARYING_VECTORS),Pe=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),Me=ie>0,Ie=t.getParameter(t.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:a,getMaxPrecision:d,textureFormatReadable:o,textureTypeReadable:s,precision:b,logarithmicDepthBuffer:B,reversedDepthBuffer:V,maxTextures:X,maxVertexTextures:ie,maxTextureSize:de,maxCubemapSize:ae,maxAttributes:U,maxVertexUniforms:ve,maxVaryings:Se,maxFragmentUniforms:Pe,vertexTextures:Me,maxSamples:Ie}}function ler(t){const e=this;let r=null,n=0,i=!1,a=!1;const o=new PC,s=new gh,d={value:null,needsUpdate:!1};this.uniform=d,this.numPlanes=0,this.numIntersection=0,this.init=function(B,V){const X=B.length!==0||V||n!==0||i;return i=V,n=B.length,X},this.beginShadows=function(){a=!0,L(null)},this.endShadows=function(){a=!1},this.setGlobalState=function(B,V){r=L(B,V,0)},this.setState=function(B,V,X){const ie=B.clippingPlanes,de=B.clipIntersection,ae=B.clipShadows,U=t.get(B);if(!i||ie===null||ie.length===0||a&&!ae)a?L(null):b();else{const ve=a?0:n,Se=ve*4;let Pe=U.clippingState||null;d.value=Pe,Pe=L(ie,V,Se,X);for(let Me=0;Me!==Se;++Me)Pe[Me]=r[Me];U.clippingState=Pe,this.numIntersection=de?this.numPlanes:0,this.numPlanes+=ve}};function b(){d.value!==r&&(d.value=r,d.needsUpdate=n>0),e.numPlanes=n,e.numIntersection=0}function L(B,V,X,ie){const de=B!==null?B.length:0;let ae=null;if(de!==0){if(ae=d.value,ie!==!0||ae===null){const U=X+de*4,ve=V.matrixWorldInverse;s.getNormalMatrix(ve),(ae===null||ae.length<U)&&(ae=new Float32Array(U));for(let Se=0,Pe=X;Se!==de;++Se,Pe+=4)o.copy(B[Se]).applyMatrix4(ve,s),o.normal.toArray(ae,Pe),ae[Pe+3]=o.constant}d.value=ae,d.needsUpdate=!0}return e.numPlanes=de,e.numIntersection=0,ae}}function uer(t){let e=new WeakMap;function r(o,s){return s===r4?o.mapping=U5:s===Y9&&(o.mapping=t4),o}function n(o){if(o&&o.isTexture){const s=o.mapping;if(s===r4||s===Y9)if(e.has(o)){const d=e.get(o).texture;return r(d,o.mapping)}else{const d=o.image;if(d&&d.height>0){const b=new Eye(d.height);return b.fromEquirectangularTexture(t,o),e.set(o,b),o.addEventListener("dispose",i),r(b.texture,o.mapping)}else return null}}return o}function i(o){const s=o.target;s.removeEventListener("dispose",i);const d=e.get(s);d!==void 0&&(e.delete(s),d.dispose())}function a(){e=new WeakMap}return{get:n,dispose:a}}const MN=4,sPe=[.125,.215,.35,.446,.526,.582],$D=20,Vae=new VC,lPe=new Wu;let qae=null,Gae=0,$ae=0,Wae=!1;const qD=(1+Math.sqrt(5))/2,GO=1/qD,uPe=[new oi(-qD,GO,0),new oi(qD,GO,0),new oi(-GO,0,qD),new oi(GO,0,qD),new oi(0,qD,-GO),new oi(0,qD,GO),new oi(-1,1,-1),new oi(1,1,-1),new oi(-1,1,1),new oi(1,1,1)],cer=new oi;class Bpe{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,r=0,n=.1,i=100,a={}){const{size:o=256,position:s=cer}=a;qae=this._renderer.getRenderTarget(),Gae=this._renderer.getActiveCubeFace(),$ae=this._renderer.getActiveMipmapLevel(),Wae=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(o);const d=this._allocateTargets();return d.depthBuffer=!0,this._sceneToCubeUV(e,n,i,d,s),r>0&&this._blur(d,0,0,r),this._applyPMREM(d),this._cleanup(d),d}fromEquirectangular(e,r=null){return this._fromTexture(e,r)}fromCubemap(e,r=null){return this._fromTexture(e,r)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=dPe(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=fPe(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodPlanes.length;e++)this._lodPlanes[e].dispose()}_cleanup(e){this._renderer.setRenderTarget(qae,Gae,$ae),this._renderer.xr.enabled=Wae,e.scissorTest=!1,KV(e,0,0,e.width,e.height)}_fromTexture(e,r){e.mapping===U5||e.mapping===t4?this._setSize(e.image.length===0?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),qae=this._renderer.getRenderTarget(),Gae=this._renderer.getActiveCubeFace(),$ae=this._renderer.getActiveMipmapLevel(),Wae=this._renderer.xr.enabled,this._renderer.xr.enabled=!1;const n=r||this._allocateTargets();return this._textureToCubeUV(e,n),this._applyPMREM(n),this._cleanup(n),n}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),r=4*this._cubeSize,n={magFilter:vp,minFilter:vp,generateMipmaps:!1,type:Og,format:Rp,colorSpace:KC,depthBuffer:!1},i=cPe(e,r,n);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==r){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=cPe(e,r,n);const{_lodMax:a}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=fer(a)),this._blurMaterial=der(a,e,r)}return i}_compileMaterial(e){const r=new hc(this._lodPlanes[0],e);this._renderer.compile(r,Vae)}_sceneToCubeUV(e,r,n,i,a){const d=new sy(90,1,r,n),b=[1,-1,1,1,1,1],L=[1,1,1,-1,-1,-1],B=this._renderer,V=B.autoClear,X=B.toneMapping;B.getClearColor(lPe),B.toneMapping=jC,B.autoClear=!1,B.state.buffers.depth.getReversed()&&(B.setRenderTarget(i),B.clearDepth(),B.setRenderTarget(null));const de=new dA({name:"PMREM.Background",side:x1,depthWrite:!1,depthTest:!1}),ae=new hc(new Hw,de);let U=!1;const ve=e.background;ve?ve.isColor&&(de.color.copy(ve),e.background=null,U=!0):(de.color.copy(lPe),U=!0);for(let Se=0;Se<6;Se++){const Pe=Se%3;Pe===0?(d.up.set(0,b[Se],0),d.position.set(a.x,a.y,a.z),d.lookAt(a.x+L[Se],a.y,a.z)):Pe===1?(d.up.set(0,0,b[Se]),d.position.set(a.x,a.y,a.z),d.lookAt(a.x,a.y+L[Se],a.z)):(d.up.set(0,b[Se],0),d.position.set(a.x,a.y,a.z),d.lookAt(a.x,a.y,a.z+L[Se]));const Me=this._cubeSize;KV(i,Pe*Me,Se>2?Me:0,Me,Me),B.setRenderTarget(i),U&&B.render(ae,d),B.render(e,d)}ae.geometry.dispose(),ae.material.dispose(),B.toneMapping=X,B.autoClear=V,e.background=ve}_textureToCubeUV(e,r){const n=this._renderer,i=e.mapping===U5||e.mapping===t4;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=dPe()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=fPe());const a=i?this._cubemapMaterial:this._equirectMaterial,o=new hc(this._lodPlanes[0],a),s=a.uniforms;s.envMap.value=e;const d=this._cubeSize;KV(r,0,0,3*d,2*d),n.setRenderTarget(r),n.render(o,Vae)}_applyPMREM(e){const r=this._renderer,n=r.autoClear;r.autoClear=!1;const i=this._lodPlanes.length;for(let a=1;a<i;a++){const o=Math.sqrt(this._sigmas[a]*this._sigmas[a]-this._sigmas[a-1]*this._sigmas[a-1]),s=uPe[(i-a-1)%uPe.length];this._blur(e,a-1,a,o,s)}r.autoClear=n}_blur(e,r,n,i,a){const o=this._pingPongRenderTarget;this._halfBlur(e,o,r,n,i,"latitudinal",a),this._halfBlur(o,e,n,n,i,"longitudinal",a)}_halfBlur(e,r,n,i,a,o,s){const d=this._renderer,b=this._blurMaterial;o!=="latitudinal"&&o!=="longitudinal"&&console.error("blur direction must be either latitudinal or longitudinal!");const L=3,B=new hc(this._lodPlanes[i],b),V=b.uniforms,X=this._sizeLods[n]-1,ie=isFinite(a)?Math.PI/(2*X):2*Math.PI/(2*$D-1),de=a/ie,ae=isFinite(a)?1+Math.floor(L*de):$D;ae>$D&&console.warn(`sigmaRadians, ${a}, is too large and will clip, as it requested ${ae} samples when the maximum is set to ${$D}`);const U=[];let ve=0;for(let Ve=0;Ve<$D;++Ve){const Ze=Ve/de,Je=Math.exp(-Ze*Ze/2);U.push(Je),Ve===0?ve+=Je:Ve<ae&&(ve+=2*Je)}for(let Ve=0;Ve<U.length;Ve++)U[Ve]=U[Ve]/ve;V.envMap.value=e.texture,V.samples.value=ae,V.weights.value=U,V.latitudinal.value=o==="latitudinal",s&&(V.poleAxis.value=s);const{_lodMax:Se}=this;V.dTheta.value=ie,V.mipInt.value=Se-n;const Pe=this._sizeLods[i],Me=3*Pe*(i>Se-MN?i-Se+MN:0),Ie=4*(this._cubeSize-Pe);KV(r,Me,Ie,3*Pe,2*Pe),d.setRenderTarget(r),d.render(B,Vae)}}function fer(t){const e=[],r=[],n=[];let i=t;const a=t-MN+1+sPe.length;for(let o=0;o<a;o++){const s=Math.pow(2,i);r.push(s);let d=1/s;o>t-MN?d=sPe[o-t+MN-1]:o===0&&(d=0),n.push(d);const b=1/(s-2),L=-b,B=1+b,V=[L,L,B,L,B,B,L,L,B,B,L,B],X=6,ie=6,de=3,ae=2,U=1,ve=new Float32Array(de*ie*X),Se=new Float32Array(ae*ie*X),Pe=new Float32Array(U*ie*X);for(let Ie=0;Ie<X;Ie++){const Ve=Ie%3*2/3-1,Ze=Ie>2?0:-1,Je=[Ve,Ze,0,Ve+2/3,Ze,0,Ve+2/3,Ze+1,0,Ve,Ze,0,Ve+2/3,Ze+1,0,Ve,Ze+1,0];ve.set(Je,de*ie*Ie),Se.set(V,ae*ie*Ie);const nt=[Ie,Ie,Ie,Ie,Ie,Ie];Pe.set(nt,U*ie*Ie)}const Me=new Jf;Me.setAttribute("position",new Kh(ve,de)),Me.setAttribute("uv",new Kh(Se,ae)),Me.setAttribute("faceIndex",new Kh(Pe,U)),e.push(Me),i>MN&&i--}return{lodPlanes:e,sizeLods:r,sigmas:n}}function cPe(t,e,r){const n=new cx(t,e,r);return n.texture.mapping=hF,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function KV(t,e,r,n,i){t.viewport.set(e,r,n,i),t.scissor.set(e,r,n,i)}function der(t,e,r){const n=new Float32Array($D),i=new oi(0,1,0);return new eb({name:"SphericalGaussianBlur",defines:{n:$D,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/r,CUBEUV_MAX_MIP:`${t}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:n},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:Jye(),fragmentShader:`

			precision mediump float;
			precision mediump int;

			varying vec3 vOutputDirection;

			uniform sampler2D envMap;
			uniform int samples;
			uniform float weights[ n ];
			uniform bool latitudinal;
			uniform float dTheta;
			uniform float mipInt;
			uniform vec3 poleAxis;

			#define ENVMAP_TYPE_CUBE_UV
			#include <cube_uv_reflection_fragment>

			vec3 getSample( float theta, vec3 axis ) {

				float cosTheta = cos( theta );
				// Rodrigues' axis-angle rotation
				vec3 sampleDirection = vOutputDirection * cosTheta
					+ cross( axis, vOutputDirection ) * sin( theta )
					+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );

				return bilinearCubeUV( envMap, sampleDirection, mipInt );

			}

			void main() {

				vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );

				if ( all( equal( axis, vec3( 0.0 ) ) ) ) {

					axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );

				}

				axis = normalize( axis );

				gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );
				gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );

				for ( int i = 1; i < n; i++ ) {

					if ( i >= samples ) {

						break;

					}

					float theta = dTheta * float( i );
					gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );
					gl_FragColor.rgb += weights[ i ] * getSample( theta, axis );

				}

			}
		`,blending:V2,depthTest:!1,depthWrite:!1})}function fPe(){return new eb({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:Jye(),fragmentShader:`

			precision mediump float;
			precision mediump int;

			varying vec3 vOutputDirection;

			uniform sampler2D envMap;

			#include <common>

			void main() {

				vec3 outputDirection = normalize( vOutputDirection );
				vec2 uv = equirectUv( outputDirection );

				gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );

			}
		`,blending:V2,depthTest:!1,depthWrite:!1})}function dPe(){return new eb({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:Jye(),fragmentShader:`

			precision mediump float;
			precision mediump int;

			uniform float flipEnvMap;

			varying vec3 vOutputDirection;

			uniform samplerCube envMap;

			void main() {

				gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );

			}
		`,blending:V2,depthTest:!1,depthWrite:!1})}function Jye(){return`

		precision mediump float;
		precision mediump int;

		attribute float faceIndex;

		varying vec3 vOutputDirection;

		// RH coordinate system; PMREM face-indexing convention
		vec3 getDirection( vec2 uv, float face ) {

			uv = 2.0 * uv - 1.0;

			vec3 direction = vec3( uv, 1.0 );

			if ( face == 0.0 ) {

				direction = direction.zyx; // ( 1, v, u ) pos x

			} else if ( face == 1.0 ) {

				direction = direction.xzy;
				direction.xz *= -1.0; // ( -u, 1, -v ) pos y

			} else if ( face == 2.0 ) {

				direction.x *= -1.0; // ( -u, v, 1 ) pos z

			} else if ( face == 3.0 ) {

				direction = direction.zyx;
				direction.xz *= -1.0; // ( -1, v, -u ) neg x

			} else if ( face == 4.0 ) {

				direction = direction.xzy;
				direction.xy *= -1.0; // ( -u, -1, v ) neg y

			} else if ( face == 5.0 ) {

				direction.z *= -1.0; // ( u, v, -1 ) neg z

			}

			return direction;

		}

		void main() {

			vOutputDirection = getDirection( uv, faceIndex );
			gl_Position = vec4( position, 1.0 );

		}
	`}function her(t){let e=new WeakMap,r=null;function n(s){if(s&&s.isTexture){const d=s.mapping,b=d===r4||d===Y9,L=d===U5||d===t4;if(b||L){let B=e.get(s);const V=B!==void 0?B.texture.pmremVersion:0;if(s.isRenderTargetTexture&&s.pmremVersion!==V)return r===null&&(r=new Bpe(t)),B=b?r.fromEquirectangular(s,B):r.fromCubemap(s,B),B.texture.pmremVersion=s.pmremVersion,e.set(s,B),B.texture;if(B!==void 0)return B.texture;{const X=s.image;return b&&X&&X.height>0||L&&X&&i(X)?(r===null&&(r=new Bpe(t)),B=b?r.fromEquirectangular(s):r.fromCubemap(s),B.texture.pmremVersion=s.pmremVersion,e.set(s,B),s.addEventListener("dispose",a),B.texture):null}}}return s}function i(s){let d=0;const b=6;for(let L=0;L<b;L++)s[L]!==void 0&&d++;return d===b}function a(s){const d=s.target;d.removeEventListener("dispose",a);const b=e.get(d);b!==void 0&&(e.delete(d),b.dispose())}function o(){e=new WeakMap,r!==null&&(r.dispose(),r=null)}return{get:n,dispose:o}}function per(t){const e={};function r(n){if(e[n]!==void 0)return e[n];let i;switch(n){case"WEBGL_depth_texture":i=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":i=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":i=t.getExtension("WEBGL_compressed_texture_s3tc")||t.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":i=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:i=t.getExtension(n)}return e[n]=i,i}return{has:function(n){return r(n)!==null},init:function(){r("EXT_color_buffer_float"),r("WEBGL_clip_cull_distance"),r("OES_texture_float_linear"),r("EXT_color_buffer_half_float"),r("WEBGL_multisampled_render_to_texture"),r("WEBGL_render_shared_exponent")},get:function(n){const i=r(n);return i===null&&tB("THREE.WebGLRenderer: "+n+" extension not supported."),i}}}function ver(t,e,r,n){const i={},a=new WeakMap;function o(B){const V=B.target;V.index!==null&&e.remove(V.index);for(const ie in V.attributes)e.remove(V.attributes[ie]);V.removeEventListener("dispose",o),delete i[V.id];const X=a.get(V);X&&(e.remove(X),a.delete(V)),n.releaseStatesOfGeometry(V),V.isInstancedBufferGeometry===!0&&delete V._maxInstanceCount,r.memory.geometries--}function s(B,V){return i[V.id]===!0||(V.addEventListener("dispose",o),i[V.id]=!0,r.memory.geometries++),V}function d(B){const V=B.attributes;for(const X in V)e.update(V[X],t.ARRAY_BUFFER)}function b(B){const V=[],X=B.index,ie=B.attributes.position;let de=0;if(X!==null){const ve=X.array;de=X.version;for(let Se=0,Pe=ve.length;Se<Pe;Se+=3){const Me=ve[Se+0],Ie=ve[Se+1],Ve=ve[Se+2];V.push(Me,Ie,Ie,Ve,Ve,Me)}}else if(ie!==void 0){const ve=ie.array;de=ie.version;for(let Se=0,Pe=ve.length/3-1;Se<Pe;Se+=3){const Me=Se+0,Ie=Se+1,Ve=Se+2;V.push(Me,Ie,Ie,Ve,Ve,Me)}}else return;const ae=new(H$e(V)?Tye:Sye)(V,1);ae.version=de;const U=a.get(B);U&&e.remove(U),a.set(B,ae)}function L(B){const V=a.get(B);if(V){const X=B.index;X!==null&&V.version<X.version&&b(B)}else b(B);return a.get(B)}return{get:s,update:d,getWireframeAttribute:L}}function mer(t,e,r){let n;function i(V){n=V}let a,o;function s(V){a=V.type,o=V.bytesPerElement}function d(V,X){t.drawElements(n,X,a,V*o),r.update(X,n,1)}function b(V,X,ie){ie!==0&&(t.drawElementsInstanced(n,X,a,V*o,ie),r.update(X,n,ie))}function L(V,X,ie){if(ie===0)return;e.get("WEBGL_multi_draw").multiDrawElementsWEBGL(n,X,0,a,V,0,ie);let ae=0;for(let U=0;U<ie;U++)ae+=X[U];r.update(ae,n,1)}function B(V,X,ie,de){if(ie===0)return;const ae=e.get("WEBGL_multi_draw");if(ae===null)for(let U=0;U<V.length;U++)b(V[U]/o,X[U],de[U]);else{ae.multiDrawElementsInstancedWEBGL(n,X,0,a,V,0,de,0,ie);let U=0;for(let ve=0;ve<ie;ve++)U+=X[ve]*de[ve];r.update(U,n,1)}}this.setMode=i,this.setIndex=s,this.render=d,this.renderInstances=b,this.renderMultiDraw=L,this.renderMultiDrawInstances=B}function ger(t){const e={geometries:0,textures:0},r={frame:0,calls:0,triangles:0,points:0,lines:0};function n(a,o,s){switch(r.calls++,o){case t.TRIANGLES:r.triangles+=s*(a/3);break;case t.LINES:r.lines+=s*(a/2);break;case t.LINE_STRIP:r.lines+=s*(a-1);break;case t.LINE_LOOP:r.lines+=s*a;break;case t.POINTS:r.points+=s*a;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",o);break}}function i(){r.calls=0,r.triangles=0,r.points=0,r.lines=0}return{memory:e,render:r,programs:null,autoReset:!0,reset:i,update:n}}function yer(t,e,r){const n=new WeakMap,i=new dh;function a(o,s,d){const b=o.morphTargetInfluences,L=s.morphAttributes.position||s.morphAttributes.normal||s.morphAttributes.color,B=L!==void 0?L.length:0;let V=n.get(s);if(V===void 0||V.count!==B){let nt=function(){Ze.dispose(),n.delete(s),s.removeEventListener("dispose",nt)};var X=nt;V!==void 0&&V.texture.dispose();const ie=s.morphAttributes.position!==void 0,de=s.morphAttributes.normal!==void 0,ae=s.morphAttributes.color!==void 0,U=s.morphAttributes.position||[],ve=s.morphAttributes.normal||[],Se=s.morphAttributes.color||[];let Pe=0;ie===!0&&(Pe=1),de===!0&&(Pe=2),ae===!0&&(Pe=3);let Me=s.attributes.position.count*Pe,Ie=1;Me>e.maxTextureSize&&(Ie=Math.ceil(Me/e.maxTextureSize),Me=e.maxTextureSize);const Ve=new Float32Array(Me*Ie*4*B),Ze=new vU(Ve,Me,Ie,B);Ze.type=mp,Ze.needsUpdate=!0;const Je=Pe*4;for(let ut=0;ut<B;ut++){const ht=U[ut],_t=ve[ut],Dt=Se[ut],qt=Me*Ie*4*ut;for(let Lt=0;Lt<ht.count;Lt++){const dr=Lt*Je;ie===!0&&(i.fromBufferAttribute(ht,Lt),Ve[qt+dr+0]=i.x,Ve[qt+dr+1]=i.y,Ve[qt+dr+2]=i.z,Ve[qt+dr+3]=0),de===!0&&(i.fromBufferAttribute(_t,Lt),Ve[qt+dr+4]=i.x,Ve[qt+dr+5]=i.y,Ve[qt+dr+6]=i.z,Ve[qt+dr+7]=0),ae===!0&&(i.fromBufferAttribute(Dt,Lt),Ve[qt+dr+8]=i.x,Ve[qt+dr+9]=i.y,Ve[qt+dr+10]=i.z,Ve[qt+dr+11]=Dt.itemSize===4?i.w:1)}}V={count:B,texture:Ze,size:new sl(Me,Ie)},n.set(s,V),s.addEventListener("dispose",nt)}if(o.isInstancedMesh===!0&&o.morphTexture!==null)d.getUniforms().setValue(t,"morphTexture",o.morphTexture,r);else{let ie=0;for(let ae=0;ae<b.length;ae++)ie+=b[ae];const de=s.morphTargetsRelative?1:1-ie;d.getUniforms().setValue(t,"morphTargetBaseInfluence",de),d.getUniforms().setValue(t,"morphTargetInfluences",b)}d.getUniforms().setValue(t,"morphTargetsTexture",V.texture,r),d.getUniforms().setValue(t,"morphTargetsTextureSize",V.size)}return{update:a}}function ber(t,e,r,n){let i=new WeakMap;function a(d){const b=n.render.frame,L=d.geometry,B=e.get(d,L);if(i.get(B)!==b&&(e.update(B),i.set(B,b)),d.isInstancedMesh&&(d.hasEventListener("dispose",s)===!1&&d.addEventListener("dispose",s),i.get(d)!==b&&(r.update(d.instanceMatrix,t.ARRAY_BUFFER),d.instanceColor!==null&&r.update(d.instanceColor,t.ARRAY_BUFFER),i.set(d,b))),d.isSkinnedMesh){const V=d.skeleton;i.get(V)!==b&&(V.update(),i.set(V,b))}return B}function o(){i=new WeakMap}function s(d){const b=d.target;b.removeEventListener("dispose",s),r.remove(b.instanceMatrix),b.instanceColor!==null&&r.remove(b.instanceColor)}return{update:a,dispose:o}}const qWe=new Fg,hPe=new Rye(1,1),GWe=new vU,$We=new GX,WWe=new mU,pPe=[],vPe=[],mPe=new Float32Array(16),gPe=new Float32Array(9),yPe=new Float32Array(4);function bF(t,e,r){const n=t[0];if(n<=0||n>0)return t;const i=e*r;let a=pPe[i];if(a===void 0&&(a=new Float32Array(i),pPe[i]=a),e!==0){n.toArray(a,0);for(let o=1,s=0;o!==e;++o)s+=r,t[o].toArray(a,s)}return a}function hx(t,e){if(t.length!==e.length)return!1;for(let r=0,n=t.length;r<n;r++)if(t[r]!==e[r])return!1;return!0}function px(t,e){for(let r=0,n=e.length;r<n;r++)t[r]=e[r]}function pZ(t,e){let r=vPe[e];r===void 0&&(r=new Int32Array(e),vPe[e]=r);for(let n=0;n!==e;++n)r[n]=t.allocateTextureUnit();return r}function xer(t,e){const r=this.cache;r[0]!==e&&(t.uniform1f(this.addr,e),r[0]=e)}function _er(t,e){const r=this.cache;if(e.x!==void 0)(r[0]!==e.x||r[1]!==e.y)&&(t.uniform2f(this.addr,e.x,e.y),r[0]=e.x,r[1]=e.y);else{if(hx(r,e))return;t.uniform2fv(this.addr,e),px(r,e)}}function wer(t,e){const r=this.cache;if(e.x!==void 0)(r[0]!==e.x||r[1]!==e.y||r[2]!==e.z)&&(t.uniform3f(this.addr,e.x,e.y,e.z),r[0]=e.x,r[1]=e.y,r[2]=e.z);else if(e.r!==void 0)(r[0]!==e.r||r[1]!==e.g||r[2]!==e.b)&&(t.uniform3f(this.addr,e.r,e.g,e.b),r[0]=e.r,r[1]=e.g,r[2]=e.b);else{if(hx(r,e))return;t.uniform3fv(this.addr,e),px(r,e)}}function Ser(t,e){const r=this.cache;if(e.x!==void 0)(r[0]!==e.x||r[1]!==e.y||r[2]!==e.z||r[3]!==e.w)&&(t.uniform4f(this.addr,e.x,e.y,e.z,e.w),r[0]=e.x,r[1]=e.y,r[2]=e.z,r[3]=e.w);else{if(hx(r,e))return;t.uniform4fv(this.addr,e),px(r,e)}}function Ter(t,e){const r=this.cache,n=e.elements;if(n===void 0){if(hx(r,e))return;t.uniformMatrix2fv(this.addr,!1,e),px(r,e)}else{if(hx(r,n))return;yPe.set(n),t.uniformMatrix2fv(this.addr,!1,yPe),px(r,n)}}function Eer(t,e){const r=this.cache,n=e.elements;if(n===void 0){if(hx(r,e))return;t.uniformMatrix3fv(this.addr,!1,e),px(r,e)}else{if(hx(r,n))return;gPe.set(n),t.uniformMatrix3fv(this.addr,!1,gPe),px(r,n)}}function Aer(t,e){const r=this.cache,n=e.elements;if(n===void 0){if(hx(r,e))return;t.uniformMatrix4fv(this.addr,!1,e),px(r,e)}else{if(hx(r,n))return;mPe.set(n),t.uniformMatrix4fv(this.addr,!1,mPe),px(r,n)}}function Cer(t,e){const r=this.cache;r[0]!==e&&(t.uniform1i(this.addr,e),r[0]=e)}function Mer(t,e){const r=this.cache;if(e.x!==void 0)(r[0]!==e.x||r[1]!==e.y)&&(t.uniform2i(this.addr,e.x,e.y),r[0]=e.x,r[1]=e.y);else{if(hx(r,e))return;t.uniform2iv(this.addr,e),px(r,e)}}function Rer(t,e){const r=this.cache;if(e.x!==void 0)(r[0]!==e.x||r[1]!==e.y||r[2]!==e.z)&&(t.uniform3i(this.addr,e.x,e.y,e.z),r[0]=e.x,r[1]=e.y,r[2]=e.z);else{if(hx(r,e))return;t.uniform3iv(this.addr,e),px(r,e)}}function ker(t,e){const r=this.cache;if(e.x!==void 0)(r[0]!==e.x||r[1]!==e.y||r[2]!==e.z||r[3]!==e.w)&&(t.uniform4i(this.addr,e.x,e.y,e.z,e.w),r[0]=e.x,r[1]=e.y,r[2]=e.z,r[3]=e.w);else{if(hx(r,e))return;t.uniform4iv(this.addr,e),px(r,e)}}function Ier(t,e){const r=this.cache;r[0]!==e&&(t.uniform1ui(this.addr,e),r[0]=e)}function Per(t,e){const r=this.cache;if(e.x!==void 0)(r[0]!==e.x||r[1]!==e.y)&&(t.uniform2ui(this.addr,e.x,e.y),r[0]=e.x,r[1]=e.y);else{if(hx(r,e))return;t.uniform2uiv(this.addr,e),px(r,e)}}function Der(t,e){const r=this.cache;if(e.x!==void 0)(r[0]!==e.x||r[1]!==e.y||r[2]!==e.z)&&(t.uniform3ui(this.addr,e.x,e.y,e.z),r[0]=e.x,r[1]=e.y,r[2]=e.z);else{if(hx(r,e))return;t.uniform3uiv(this.addr,e),px(r,e)}}function Ler(t,e){const r=this.cache;if(e.x!==void 0)(r[0]!==e.x||r[1]!==e.y||r[2]!==e.z||r[3]!==e.w)&&(t.uniform4ui(this.addr,e.x,e.y,e.z,e.w),r[0]=e.x,r[1]=e.y,r[2]=e.z,r[3]=e.w);else{if(hx(r,e))return;t.uniform4uiv(this.addr,e),px(r,e)}}function Oer(t,e,r){const n=this.cache,i=r.allocateTextureUnit();n[0]!==i&&(t.uniform1i(this.addr,i),n[0]=i);let a;this.type===t.SAMPLER_2D_SHADOW?(hPe.compareFunction=bye,a=hPe):a=qWe,r.setTexture2D(e||a,i)}function Ner(t,e,r){const n=this.cache,i=r.allocateTextureUnit();n[0]!==i&&(t.uniform1i(this.addr,i),n[0]=i),r.setTexture3D(e||$We,i)}function Fer(t,e,r){const n=this.cache,i=r.allocateTextureUnit();n[0]!==i&&(t.uniform1i(this.addr,i),n[0]=i),r.setTextureCube(e||WWe,i)}function zer(t,e,r){const n=this.cache,i=r.allocateTextureUnit();n[0]!==i&&(t.uniform1i(this.addr,i),n[0]=i),r.setTexture2DArray(e||GWe,i)}function Ber(t){switch(t){case 5126:return xer;case 35664:return _er;case 35665:return wer;case 35666:return Ser;case 35674:return Ter;case 35675:return Eer;case 35676:return Aer;case 5124:case 35670:return Cer;case 35667:case 35671:return Mer;case 35668:case 35672:return Rer;case 35669:case 35673:return ker;case 5125:return Ier;case 36294:return Per;case 36295:return Der;case 36296:return Ler;case 35678:case 36198:case 36298:case 36306:case 35682:return Oer;case 35679:case 36299:case 36307:return Ner;case 35680:case 36300:case 36308:case 36293:return Fer;case 36289:case 36303:case 36311:case 36292:return zer}}function Uer(t,e){t.uniform1fv(this.addr,e)}function Her(t,e){const r=bF(e,this.size,2);t.uniform2fv(this.addr,r)}function jer(t,e){const r=bF(e,this.size,3);t.uniform3fv(this.addr,r)}function Ver(t,e){const r=bF(e,this.size,4);t.uniform4fv(this.addr,r)}function qer(t,e){const r=bF(e,this.size,4);t.uniformMatrix2fv(this.addr,!1,r)}function Ger(t,e){const r=bF(e,this.size,9);t.uniformMatrix3fv(this.addr,!1,r)}function $er(t,e){const r=bF(e,this.size,16);t.uniformMatrix4fv(this.addr,!1,r)}function Wer(t,e){t.uniform1iv(this.addr,e)}function Yer(t,e){t.uniform2iv(this.addr,e)}function Xer(t,e){t.uniform3iv(this.addr,e)}function Zer(t,e){t.uniform4iv(this.addr,e)}function Ker(t,e){t.uniform1uiv(this.addr,e)}function Jer(t,e){t.uniform2uiv(this.addr,e)}function Qer(t,e){t.uniform3uiv(this.addr,e)}function etr(t,e){t.uniform4uiv(this.addr,e)}function ttr(t,e,r){const n=this.cache,i=e.length,a=pZ(r,i);hx(n,a)||(t.uniform1iv(this.addr,a),px(n,a));for(let o=0;o!==i;++o)r.setTexture2D(e[o]||qWe,a[o])}function rtr(t,e,r){const n=this.cache,i=e.length,a=pZ(r,i);hx(n,a)||(t.uniform1iv(this.addr,a),px(n,a));for(let o=0;o!==i;++o)r.setTexture3D(e[o]||$We,a[o])}function ntr(t,e,r){const n=this.cache,i=e.length,a=pZ(r,i);hx(n,a)||(t.uniform1iv(this.addr,a),px(n,a));for(let o=0;o!==i;++o)r.setTextureCube(e[o]||WWe,a[o])}function itr(t,e,r){const n=this.cache,i=e.length,a=pZ(r,i);hx(n,a)||(t.uniform1iv(this.addr,a),px(n,a));for(let o=0;o!==i;++o)r.setTexture2DArray(e[o]||GWe,a[o])}function atr(t){switch(t){case 5126:return Uer;case 35664:return Her;case 35665:return jer;case 35666:return Ver;case 35674:return qer;case 35675:return Ger;case 35676:return $er;case 5124:case 35670:return Wer;case 35667:case 35671:return Yer;case 35668:case 35672:return Xer;case 35669:case 35673:return Zer;case 5125:return Ker;case 36294:return Jer;case 36295:return Qer;case 36296:return etr;case 35678:case 36198:case 36298:case 36306:case 35682:return ttr;case 35679:case 36299:case 36307:return rtr;case 35680:case 36300:case 36308:case 36293:return ntr;case 36289:case 36303:case 36311:case 36292:return itr}}class otr{constructor(e,r,n){this.id=e,this.addr=n,this.cache=[],this.type=r.type,this.setValue=Ber(r.type)}}class str{constructor(e,r,n){this.id=e,this.addr=n,this.cache=[],this.type=r.type,this.size=r.size,this.setValue=atr(r.type)}}class ltr{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,r,n){const i=this.seq;for(let a=0,o=i.length;a!==o;++a){const s=i[a];s.setValue(e,r[s.id],n)}}}const Yae=/(\w+)(\])?(\[|\.)?/g;function bPe(t,e){t.seq.push(e),t.map[e.id]=e}function utr(t,e,r){const n=t.name,i=n.length;for(Yae.lastIndex=0;;){const a=Yae.exec(n),o=Yae.lastIndex;let s=a[1];const d=a[2]==="]",b=a[3];if(d&&(s=s|0),b===void 0||b==="["&&o+2===i){bPe(r,b===void 0?new otr(s,t,e):new str(s,t,e));break}else{let B=r.map[s];B===void 0&&(B=new ltr(s),bPe(r,B)),r=B}}}class LG{constructor(e,r){this.seq=[],this.map={};const n=e.getProgramParameter(r,e.ACTIVE_UNIFORMS);for(let i=0;i<n;++i){const a=e.getActiveUniform(r,i),o=e.getUniformLocation(r,a.name);utr(a,o,this)}}setValue(e,r,n,i){const a=this.map[r];a!==void 0&&a.setValue(e,n,i)}setOptional(e,r,n){const i=r[n];i!==void 0&&this.setValue(e,n,i)}static upload(e,r,n,i){for(let a=0,o=r.length;a!==o;++a){const s=r[a],d=n[s.id];d.needsUpdate!==!1&&s.setValue(e,d.value,i)}}static seqWithValue(e,r){const n=[];for(let i=0,a=e.length;i!==a;++i){const o=e[i];o.id in r&&n.push(o)}return n}}function xPe(t,e,r){const n=t.createShader(e);return t.shaderSource(n,r),t.compileShader(n),n}const ctr=37297;let ftr=0;function dtr(t,e){const r=t.split(`
`),n=[],i=Math.max(e-6,0),a=Math.min(e+6,r.length);for(let o=i;o<a;o++){const s=o+1;n.push(`${s===e?">":" "} ${s}: ${r[o]}`)}return n.join(`
`)}const _Pe=new gh;function htr(t){xv._getMatrix(_Pe,xv.workingColorSpace,t);const e=`mat3( ${_Pe.elements.map(r=>r.toFixed(4))} )`;switch(xv.getTransfer(t)){case J9:return[e,"LinearTransferOETF"];case yg:return[e,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space: ",t),[e,"LinearTransferOETF"]}}function wPe(t,e,r){const n=t.getShaderParameter(e,t.COMPILE_STATUS),a=(t.getShaderInfoLog(e)||"").trim();if(n&&a==="")return"";const o=/ERROR: 0:(\d+)/.exec(a);if(o){const s=parseInt(o[1]);return r.toUpperCase()+`

`+a+`

`+dtr(t.getShaderSource(e),s)}else return a}function ptr(t,e){const r=htr(e);return[`vec4 ${t}( vec4 value ) {`,`	return ${r[1]}( vec4( value.rgb * ${r[0]}, value.a ) );`,"}"].join(`
`)}function vtr(t,e){let r;switch(e){case _$e:r="Linear";break;case w$e:r="Reinhard";break;case S$e:r="Cineon";break;case UX:r="ACESFilmic";break;case E$e:r="AgX";break;case A$e:r="Neutral";break;case T$e:r="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),r="Linear"}return"vec3 "+t+"( vec3 color ) { return "+r+"ToneMapping( color ); }"}const JV=new oi;function mtr(){xv.getLuminanceCoefficients(JV);const t=JV.x.toFixed(4),e=JV.y.toFixed(4),r=JV.z.toFixed(4);return["float luminance( const in vec3 rgb ) {",`	const vec3 weights = vec3( ${t}, ${e}, ${r} );`,"	return dot( weights, rgb );","}"].join(`
`)}function gtr(t){return[t.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",t.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(zz).join(`
`)}function ytr(t){const e=[];for(const r in t){const n=t[r];n!==!1&&e.push("#define "+r+" "+n)}return e.join(`
`)}function btr(t,e){const r={},n=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let i=0;i<n;i++){const a=t.getActiveAttrib(e,i),o=a.name;let s=1;a.type===t.FLOAT_MAT2&&(s=2),a.type===t.FLOAT_MAT3&&(s=3),a.type===t.FLOAT_MAT4&&(s=4),r[o]={type:a.type,location:t.getAttribLocation(e,o),locationSize:s}}return r}function zz(t){return t!==""}function SPe(t,e){const r=e.numSpotLightShadows+e.numSpotLightMaps-e.numSpotLightShadowsWithMaps;return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,e.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,r).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,e.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,e.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,e.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,e.numPointLightShadows)}function TPe(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const xtr=/^[ \t]*#include +<([\w\d./]+)>/gm;function Upe(t){return t.replace(xtr,wtr)}const _tr=new Map;function wtr(t,e){let r=Xh[e];if(r===void 0){const n=_tr.get(e);if(n!==void 0)r=Xh[n],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,n);else throw new Error("Can not resolve #include <"+e+">")}return Upe(r)}const Str=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function EPe(t){return t.replace(Str,Ttr)}function Ttr(t,e,r,n){let i="";for(let a=parseInt(e);a<parseInt(r);a++)i+=n.replace(/\[\s*i\s*\]/g,"[ "+a+" ]").replace(/UNROLLED_LOOP_INDEX/g,a);return i}function APe(t){let e=`precision ${t.precision} float;
	precision ${t.precision} int;
	precision ${t.precision} sampler2D;
	precision ${t.precision} samplerCube;
	precision ${t.precision} sampler3D;
	precision ${t.precision} sampler2DArray;
	precision ${t.precision} sampler2DShadow;
	precision ${t.precision} samplerCubeShadow;
	precision ${t.precision} sampler2DArrayShadow;
	precision ${t.precision} isampler2D;
	precision ${t.precision} isampler3D;
	precision ${t.precision} isamplerCube;
	precision ${t.precision} isampler2DArray;
	precision ${t.precision} usampler2D;
	precision ${t.precision} usampler3D;
	precision ${t.precision} usamplerCube;
	precision ${t.precision} usampler2DArray;
	`;return t.precision==="highp"?e+=`
#define HIGH_PRECISION`:t.precision==="mediump"?e+=`
#define MEDIUM_PRECISION`:t.precision==="lowp"&&(e+=`
#define LOW_PRECISION`),e}function Etr(t){let e="SHADOWMAP_TYPE_BASIC";return t.shadowMapType===BX?e="SHADOWMAP_TYPE_PCF":t.shadowMapType===i9?e="SHADOWMAP_TYPE_PCF_SOFT":t.shadowMapType===AC&&(e="SHADOWMAP_TYPE_VSM"),e}function Atr(t){let e="ENVMAP_TYPE_CUBE";if(t.envMap)switch(t.envMapMode){case U5:case t4:e="ENVMAP_TYPE_CUBE";break;case hF:e="ENVMAP_TYPE_CUBE_UV";break}return e}function Ctr(t){let e="ENVMAP_MODE_REFLECTION";if(t.envMap)switch(t.envMapMode){case t4:e="ENVMAP_MODE_REFRACTION";break}return e}function Mtr(t){let e="ENVMAP_BLENDING_NONE";if(t.envMap)switch(t.combine){case dU:e="ENVMAP_BLENDING_MULTIPLY";break;case b$e:e="ENVMAP_BLENDING_MIX";break;case x$e:e="ENVMAP_BLENDING_ADD";break}return e}function Rtr(t){const e=t.envMapCubeUVHeight;if(e===null)return null;const r=Math.log2(e)-2,n=1/e;return{texelWidth:1/(3*Math.max(Math.pow(2,r),112)),texelHeight:n,maxMip:r}}function ktr(t,e,r,n){const i=t.getContext(),a=r.defines;let o=r.vertexShader,s=r.fragmentShader;const d=Etr(r),b=Atr(r),L=Ctr(r),B=Mtr(r),V=Rtr(r),X=gtr(r),ie=ytr(a),de=i.createProgram();let ae,U,ve=r.glslVersion?"#version "+r.glslVersion+`
`:"";r.isRawShaderMaterial?(ae=["#define SHADER_TYPE "+r.shaderType,"#define SHADER_NAME "+r.shaderName,ie].filter(zz).join(`
`),ae.length>0&&(ae+=`
`),U=["#define SHADER_TYPE "+r.shaderType,"#define SHADER_NAME "+r.shaderName,ie].filter(zz).join(`
`),U.length>0&&(U+=`
`)):(ae=[APe(r),"#define SHADER_TYPE "+r.shaderType,"#define SHADER_NAME "+r.shaderName,ie,r.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",r.batching?"#define USE_BATCHING":"",r.batchingColor?"#define USE_BATCHING_COLOR":"",r.instancing?"#define USE_INSTANCING":"",r.instancingColor?"#define USE_INSTANCING_COLOR":"",r.instancingMorph?"#define USE_INSTANCING_MORPH":"",r.useFog&&r.fog?"#define USE_FOG":"",r.useFog&&r.fogExp2?"#define FOG_EXP2":"",r.map?"#define USE_MAP":"",r.envMap?"#define USE_ENVMAP":"",r.envMap?"#define "+L:"",r.lightMap?"#define USE_LIGHTMAP":"",r.aoMap?"#define USE_AOMAP":"",r.bumpMap?"#define USE_BUMPMAP":"",r.normalMap?"#define USE_NORMALMAP":"",r.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",r.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",r.displacementMap?"#define USE_DISPLACEMENTMAP":"",r.emissiveMap?"#define USE_EMISSIVEMAP":"",r.anisotropy?"#define USE_ANISOTROPY":"",r.anisotropyMap?"#define USE_ANISOTROPYMAP":"",r.clearcoatMap?"#define USE_CLEARCOATMAP":"",r.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",r.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",r.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",r.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",r.specularMap?"#define USE_SPECULARMAP":"",r.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",r.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",r.roughnessMap?"#define USE_ROUGHNESSMAP":"",r.metalnessMap?"#define USE_METALNESSMAP":"",r.alphaMap?"#define USE_ALPHAMAP":"",r.alphaHash?"#define USE_ALPHAHASH":"",r.transmission?"#define USE_TRANSMISSION":"",r.transmissionMap?"#define USE_TRANSMISSIONMAP":"",r.thicknessMap?"#define USE_THICKNESSMAP":"",r.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",r.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",r.mapUv?"#define MAP_UV "+r.mapUv:"",r.alphaMapUv?"#define ALPHAMAP_UV "+r.alphaMapUv:"",r.lightMapUv?"#define LIGHTMAP_UV "+r.lightMapUv:"",r.aoMapUv?"#define AOMAP_UV "+r.aoMapUv:"",r.emissiveMapUv?"#define EMISSIVEMAP_UV "+r.emissiveMapUv:"",r.bumpMapUv?"#define BUMPMAP_UV "+r.bumpMapUv:"",r.normalMapUv?"#define NORMALMAP_UV "+r.normalMapUv:"",r.displacementMapUv?"#define DISPLACEMENTMAP_UV "+r.displacementMapUv:"",r.metalnessMapUv?"#define METALNESSMAP_UV "+r.metalnessMapUv:"",r.roughnessMapUv?"#define ROUGHNESSMAP_UV "+r.roughnessMapUv:"",r.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+r.anisotropyMapUv:"",r.clearcoatMapUv?"#define CLEARCOATMAP_UV "+r.clearcoatMapUv:"",r.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+r.clearcoatNormalMapUv:"",r.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+r.clearcoatRoughnessMapUv:"",r.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+r.iridescenceMapUv:"",r.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+r.iridescenceThicknessMapUv:"",r.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+r.sheenColorMapUv:"",r.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+r.sheenRoughnessMapUv:"",r.specularMapUv?"#define SPECULARMAP_UV "+r.specularMapUv:"",r.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+r.specularColorMapUv:"",r.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+r.specularIntensityMapUv:"",r.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+r.transmissionMapUv:"",r.thicknessMapUv?"#define THICKNESSMAP_UV "+r.thicknessMapUv:"",r.vertexTangents&&r.flatShading===!1?"#define USE_TANGENT":"",r.vertexColors?"#define USE_COLOR":"",r.vertexAlphas?"#define USE_COLOR_ALPHA":"",r.vertexUv1s?"#define USE_UV1":"",r.vertexUv2s?"#define USE_UV2":"",r.vertexUv3s?"#define USE_UV3":"",r.pointsUvs?"#define USE_POINTS_UV":"",r.flatShading?"#define FLAT_SHADED":"",r.skinning?"#define USE_SKINNING":"",r.morphTargets?"#define USE_MORPHTARGETS":"",r.morphNormals&&r.flatShading===!1?"#define USE_MORPHNORMALS":"",r.morphColors?"#define USE_MORPHCOLORS":"",r.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+r.morphTextureStride:"",r.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+r.morphTargetsCount:"",r.doubleSided?"#define DOUBLE_SIDED":"",r.flipSided?"#define FLIP_SIDED":"",r.shadowMapEnabled?"#define USE_SHADOWMAP":"",r.shadowMapEnabled?"#define "+d:"",r.sizeAttenuation?"#define USE_SIZEATTENUATION":"",r.numLightProbes>0?"#define USE_LIGHT_PROBES":"",r.logarithmicDepthBuffer?"#define USE_LOGARITHMIC_DEPTH_BUFFER":"",r.reversedDepthBuffer?"#define USE_REVERSED_DEPTH_BUFFER":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","	attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","	attribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH","	uniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1","	attribute vec2 uv1;","#endif","#ifdef USE_UV2","	attribute vec2 uv2;","#endif","#ifdef USE_UV3","	attribute vec2 uv3;","#endif","#ifdef USE_TANGENT","	attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","	attribute vec4 color;","#elif defined( USE_COLOR )","	attribute vec3 color;","#endif","#ifdef USE_SKINNING","	attribute vec4 skinIndex;","	attribute vec4 skinWeight;","#endif",`
`].filter(zz).join(`
`),U=[APe(r),"#define SHADER_TYPE "+r.shaderType,"#define SHADER_NAME "+r.shaderName,ie,r.useFog&&r.fog?"#define USE_FOG":"",r.useFog&&r.fogExp2?"#define FOG_EXP2":"",r.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",r.map?"#define USE_MAP":"",r.matcap?"#define USE_MATCAP":"",r.envMap?"#define USE_ENVMAP":"",r.envMap?"#define "+b:"",r.envMap?"#define "+L:"",r.envMap?"#define "+B:"",V?"#define CUBEUV_TEXEL_WIDTH "+V.texelWidth:"",V?"#define CUBEUV_TEXEL_HEIGHT "+V.texelHeight:"",V?"#define CUBEUV_MAX_MIP "+V.maxMip+".0":"",r.lightMap?"#define USE_LIGHTMAP":"",r.aoMap?"#define USE_AOMAP":"",r.bumpMap?"#define USE_BUMPMAP":"",r.normalMap?"#define USE_NORMALMAP":"",r.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",r.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",r.emissiveMap?"#define USE_EMISSIVEMAP":"",r.anisotropy?"#define USE_ANISOTROPY":"",r.anisotropyMap?"#define USE_ANISOTROPYMAP":"",r.clearcoat?"#define USE_CLEARCOAT":"",r.clearcoatMap?"#define USE_CLEARCOATMAP":"",r.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",r.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",r.dispersion?"#define USE_DISPERSION":"",r.iridescence?"#define USE_IRIDESCENCE":"",r.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",r.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",r.specularMap?"#define USE_SPECULARMAP":"",r.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",r.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",r.roughnessMap?"#define USE_ROUGHNESSMAP":"",r.metalnessMap?"#define USE_METALNESSMAP":"",r.alphaMap?"#define USE_ALPHAMAP":"",r.alphaTest?"#define USE_ALPHATEST":"",r.alphaHash?"#define USE_ALPHAHASH":"",r.sheen?"#define USE_SHEEN":"",r.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",r.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",r.transmission?"#define USE_TRANSMISSION":"",r.transmissionMap?"#define USE_TRANSMISSIONMAP":"",r.thicknessMap?"#define USE_THICKNESSMAP":"",r.vertexTangents&&r.flatShading===!1?"#define USE_TANGENT":"",r.vertexColors||r.instancingColor||r.batchingColor?"#define USE_COLOR":"",r.vertexAlphas?"#define USE_COLOR_ALPHA":"",r.vertexUv1s?"#define USE_UV1":"",r.vertexUv2s?"#define USE_UV2":"",r.vertexUv3s?"#define USE_UV3":"",r.pointsUvs?"#define USE_POINTS_UV":"",r.gradientMap?"#define USE_GRADIENTMAP":"",r.flatShading?"#define FLAT_SHADED":"",r.doubleSided?"#define DOUBLE_SIDED":"",r.flipSided?"#define FLIP_SIDED":"",r.shadowMapEnabled?"#define USE_SHADOWMAP":"",r.shadowMapEnabled?"#define "+d:"",r.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",r.numLightProbes>0?"#define USE_LIGHT_PROBES":"",r.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",r.decodeVideoTextureEmissive?"#define DECODE_VIDEO_TEXTURE_EMISSIVE":"",r.logarithmicDepthBuffer?"#define USE_LOGARITHMIC_DEPTH_BUFFER":"",r.reversedDepthBuffer?"#define USE_REVERSED_DEPTH_BUFFER":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",r.toneMapping!==jC?"#define TONE_MAPPING":"",r.toneMapping!==jC?Xh.tonemapping_pars_fragment:"",r.toneMapping!==jC?vtr("toneMapping",r.toneMapping):"",r.dithering?"#define DITHERING":"",r.opaque?"#define OPAQUE":"",Xh.colorspace_pars_fragment,ptr("linearToOutputTexel",r.outputColorSpace),mtr(),r.useDepthPacking?"#define DEPTH_PACKING "+r.depthPacking:"",`
`].filter(zz).join(`
`)),o=Upe(o),o=SPe(o,r),o=TPe(o,r),s=Upe(s),s=SPe(s,r),s=TPe(s,r),o=EPe(o),s=EPe(s),r.isRawShaderMaterial!==!0&&(ve=`#version 300 es
`,ae=[X,"#define attribute in","#define varying out","#define texture2D texture"].join(`
`)+`
`+ae,U=["#define varying in",r.glslVersion===Ipe?"":"layout(location = 0) out highp vec4 pc_fragColor;",r.glslVersion===Ipe?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(`
`)+`
`+U);const Se=ve+ae+o,Pe=ve+U+s,Me=xPe(i,i.VERTEX_SHADER,Se),Ie=xPe(i,i.FRAGMENT_SHADER,Pe);i.attachShader(de,Me),i.attachShader(de,Ie),r.index0AttributeName!==void 0?i.bindAttribLocation(de,0,r.index0AttributeName):r.morphTargets===!0&&i.bindAttribLocation(de,0,"position"),i.linkProgram(de);function Ve(ut){if(t.debug.checkShaderErrors){const ht=i.getProgramInfoLog(de)||"",_t=i.getShaderInfoLog(Me)||"",Dt=i.getShaderInfoLog(Ie)||"",qt=ht.trim(),Lt=_t.trim(),dr=Dt.trim();let Zt=!0,Cr=!0;if(i.getProgramParameter(de,i.LINK_STATUS)===!1)if(Zt=!1,typeof t.debug.onShaderError=="function")t.debug.onShaderError(i,de,Me,Ie);else{const yt=wPe(i,Me,"vertex"),Vt=wPe(i,Ie,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(de,i.VALIDATE_STATUS)+`

Material Name: `+ut.name+`
Material Type: `+ut.type+`

Program Info Log: `+qt+`
`+yt+`
`+Vt)}else qt!==""?console.warn("THREE.WebGLProgram: Program Info Log:",qt):(Lt===""||dr==="")&&(Cr=!1);Cr&&(ut.diagnostics={runnable:Zt,programLog:qt,vertexShader:{log:Lt,prefix:ae},fragmentShader:{log:dr,prefix:U}})}i.deleteShader(Me),i.deleteShader(Ie),Ze=new LG(i,de),Je=btr(i,de)}let Ze;this.getUniforms=function(){return Ze===void 0&&Ve(this),Ze};let Je;this.getAttributes=function(){return Je===void 0&&Ve(this),Je};let nt=r.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return nt===!1&&(nt=i.getProgramParameter(de,ctr)),nt},this.destroy=function(){n.releaseStatesOfProgram(this),i.deleteProgram(de),this.program=void 0},this.type=r.shaderType,this.name=r.shaderName,this.id=ftr++,this.cacheKey=e,this.usedTimes=1,this.program=de,this.vertexShader=Me,this.fragmentShader=Ie,this}let Itr=0;class Ptr{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const r=e.vertexShader,n=e.fragmentShader,i=this._getShaderStage(r),a=this._getShaderStage(n),o=this._getShaderCacheForMaterial(e);return o.has(i)===!1&&(o.add(i),i.usedTimes++),o.has(a)===!1&&(o.add(a),a.usedTimes++),this}remove(e){const r=this.materialCache.get(e);for(const n of r)n.usedTimes--,n.usedTimes===0&&this.shaderCache.delete(n.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const r=this.materialCache;let n=r.get(e);return n===void 0&&(n=new Set,r.set(e,n)),n}_getShaderStage(e){const r=this.shaderCache;let n=r.get(e);return n===void 0&&(n=new Dtr(e),r.set(e,n)),n}}class Dtr{constructor(e){this.id=Itr++,this.code=e,this.usedTimes=0}}function Ltr(t,e,r,n,i,a,o){const s=new b8,d=new Ptr,b=new Set,L=[],B=i.logarithmicDepthBuffer,V=i.vertexTextures;let X=i.precision;const ie={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function de(Je){return b.add(Je),Je===0?"uv":`uv${Je}`}function ae(Je,nt,ut,ht,_t){const Dt=ht.fog,qt=_t.geometry,Lt=Je.isMeshStandardMaterial?ht.environment:null,dr=(Je.isMeshStandardMaterial?r:e).get(Je.envMap||Lt),Zt=dr&&dr.mapping===hF?dr.image.height:null,Cr=ie[Je.type];Je.precision!==null&&(X=i.getMaxPrecision(Je.precision),X!==Je.precision&&console.warn("THREE.WebGLProgram.getParameters:",Je.precision,"not supported, using",X,"instead."));const yt=qt.morphAttributes.position||qt.morphAttributes.normal||qt.morphAttributes.color,Vt=yt!==void 0?yt.length:0;let Er=0;qt.morphAttributes.position!==void 0&&(Er=1),qt.morphAttributes.normal!==void 0&&(Er=2),qt.morphAttributes.color!==void 0&&(Er=3);let sr,or,Ar,Ir;if(Cr){const Mc=DC[Cr];sr=Mc.vertexShader,or=Mc.fragmentShader}else sr=Je.vertexShader,or=Je.fragmentShader,d.update(Je),Ar=d.getVertexShaderID(Je),Ir=d.getFragmentShaderID(Je);const _n=t.getRenderTarget(),Un=t.state.buffers.depth.getReversed(),Qn=_t.isInstancedMesh===!0,Jn=_t.isBatchedMesh===!0,Vn=!!Je.map,jn=!!Je.matcap,Lr=!!dr,Yn=!!Je.aoMap,On=!!Je.lightMap,Sn=!!Je.bumpMap,bn=!!Je.normalMap,Mn=!!Je.displacementMap,gi=!!Je.emissiveMap,Oi=!!Je.metalnessMap,Pa=!!Je.roughnessMap,va=Je.anisotropy>0,ti=Je.clearcoat>0,Tn=Je.dispersion>0,bi=Je.iridescence>0,Wn=Je.sheen>0,Ei=Je.transmission>0,Ki=va&&!!Je.anisotropyMap,sa=ti&&!!Je.clearcoatMap,xa=ti&&!!Je.clearcoatNormalMap,Qa=ti&&!!Je.clearcoatRoughnessMap,is=bi&&!!Je.iridescenceMap,go=bi&&!!Je.iridescenceThicknessMap,Co=Wn&&!!Je.sheenColorMap,Ko=Wn&&!!Je.sheenRoughnessMap,Zi=!!Je.specularMap,za=!!Je.specularColorMap,Ss=!!Je.specularIntensityMap,ba=Ei&&!!Je.transmissionMap,po=Ei&&!!Je.thicknessMap,Ys=!!Je.gradientMap,$s=!!Je.alphaMap,Gs=Je.alphaTest>0,Ns=!!Je.alphaHash,Hl=!!Je.extensions;let nu=jC;Je.toneMapped&&(_n===null||_n.isXRRenderTarget===!0)&&(nu=t.toneMapping);const su={shaderID:Cr,shaderType:Je.type,shaderName:Je.name,vertexShader:sr,fragmentShader:or,defines:Je.defines,customVertexShaderID:Ar,customFragmentShaderID:Ir,isRawShaderMaterial:Je.isRawShaderMaterial===!0,glslVersion:Je.glslVersion,precision:X,batching:Jn,batchingColor:Jn&&_t._colorsTexture!==null,instancing:Qn,instancingColor:Qn&&_t.instanceColor!==null,instancingMorph:Qn&&_t.morphTexture!==null,supportsVertexTextures:V,outputColorSpace:_n===null?t.outputColorSpace:_n.isXRRenderTarget===!0?_n.texture.colorSpace:KC,alphaToCoverage:!!Je.alphaToCoverage,map:Vn,matcap:jn,envMap:Lr,envMapMode:Lr&&dr.mapping,envMapCubeUVHeight:Zt,aoMap:Yn,lightMap:On,bumpMap:Sn,normalMap:bn,displacementMap:V&&Mn,emissiveMap:gi,normalMapObjectSpace:bn&&Je.normalMapType===D$e,normalMapTangentSpace:bn&&Je.normalMapType===_4,metalnessMap:Oi,roughnessMap:Pa,anisotropy:va,anisotropyMap:Ki,clearcoat:ti,clearcoatMap:sa,clearcoatNormalMap:xa,clearcoatRoughnessMap:Qa,dispersion:Tn,iridescence:bi,iridescenceMap:is,iridescenceThicknessMap:go,sheen:Wn,sheenColorMap:Co,sheenRoughnessMap:Ko,specularMap:Zi,specularColorMap:za,specularIntensityMap:Ss,transmission:Ei,transmissionMap:ba,thicknessMap:po,gradientMap:Ys,opaque:Je.transparent===!1&&Je.blending===Ak&&Je.alphaToCoverage===!1,alphaMap:$s,alphaTest:Gs,alphaHash:Ns,combine:Je.combine,mapUv:Vn&&de(Je.map.channel),aoMapUv:Yn&&de(Je.aoMap.channel),lightMapUv:On&&de(Je.lightMap.channel),bumpMapUv:Sn&&de(Je.bumpMap.channel),normalMapUv:bn&&de(Je.normalMap.channel),displacementMapUv:Mn&&de(Je.displacementMap.channel),emissiveMapUv:gi&&de(Je.emissiveMap.channel),metalnessMapUv:Oi&&de(Je.metalnessMap.channel),roughnessMapUv:Pa&&de(Je.roughnessMap.channel),anisotropyMapUv:Ki&&de(Je.anisotropyMap.channel),clearcoatMapUv:sa&&de(Je.clearcoatMap.channel),clearcoatNormalMapUv:xa&&de(Je.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Qa&&de(Je.clearcoatRoughnessMap.channel),iridescenceMapUv:is&&de(Je.iridescenceMap.channel),iridescenceThicknessMapUv:go&&de(Je.iridescenceThicknessMap.channel),sheenColorMapUv:Co&&de(Je.sheenColorMap.channel),sheenRoughnessMapUv:Ko&&de(Je.sheenRoughnessMap.channel),specularMapUv:Zi&&de(Je.specularMap.channel),specularColorMapUv:za&&de(Je.specularColorMap.channel),specularIntensityMapUv:Ss&&de(Je.specularIntensityMap.channel),transmissionMapUv:ba&&de(Je.transmissionMap.channel),thicknessMapUv:po&&de(Je.thicknessMap.channel),alphaMapUv:$s&&de(Je.alphaMap.channel),vertexTangents:!!qt.attributes.tangent&&(bn||va),vertexColors:Je.vertexColors,vertexAlphas:Je.vertexColors===!0&&!!qt.attributes.color&&qt.attributes.color.itemSize===4,pointsUvs:_t.isPoints===!0&&!!qt.attributes.uv&&(Vn||$s),fog:!!Dt,useFog:Je.fog===!0,fogExp2:!!Dt&&Dt.isFogExp2,flatShading:Je.flatShading===!0&&Je.wireframe===!1,sizeAttenuation:Je.sizeAttenuation===!0,logarithmicDepthBuffer:B,reversedDepthBuffer:Un,skinning:_t.isSkinnedMesh===!0,morphTargets:qt.morphAttributes.position!==void 0,morphNormals:qt.morphAttributes.normal!==void 0,morphColors:qt.morphAttributes.color!==void 0,morphTargetsCount:Vt,morphTextureStride:Er,numDirLights:nt.directional.length,numPointLights:nt.point.length,numSpotLights:nt.spot.length,numSpotLightMaps:nt.spotLightMap.length,numRectAreaLights:nt.rectArea.length,numHemiLights:nt.hemi.length,numDirLightShadows:nt.directionalShadowMap.length,numPointLightShadows:nt.pointShadowMap.length,numSpotLightShadows:nt.spotShadowMap.length,numSpotLightShadowsWithMaps:nt.numSpotLightShadowsWithMaps,numLightProbes:nt.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:Je.dithering,shadowMapEnabled:t.shadowMap.enabled&&ut.length>0,shadowMapType:t.shadowMap.type,toneMapping:nu,decodeVideoTexture:Vn&&Je.map.isVideoTexture===!0&&xv.getTransfer(Je.map.colorSpace)===yg,decodeVideoTextureEmissive:gi&&Je.emissiveMap.isVideoTexture===!0&&xv.getTransfer(Je.emissiveMap.colorSpace)===yg,premultipliedAlpha:Je.premultipliedAlpha,doubleSided:Je.side===Zx,flipSided:Je.side===x1,useDepthPacking:Je.depthPacking>=0,depthPacking:Je.depthPacking||0,index0AttributeName:Je.index0AttributeName,extensionClipCullDistance:Hl&&Je.extensions.clipCullDistance===!0&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(Hl&&Je.extensions.multiDraw===!0||Jn)&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:Je.customProgramCacheKey()};return su.vertexUv1s=b.has(1),su.vertexUv2s=b.has(2),su.vertexUv3s=b.has(3),b.clear(),su}function U(Je){const nt=[];if(Je.shaderID?nt.push(Je.shaderID):(nt.push(Je.customVertexShaderID),nt.push(Je.customFragmentShaderID)),Je.defines!==void 0)for(const ut in Je.defines)nt.push(ut),nt.push(Je.defines[ut]);return Je.isRawShaderMaterial===!1&&(ve(nt,Je),Se(nt,Je),nt.push(t.outputColorSpace)),nt.push(Je.customProgramCacheKey),nt.join()}function ve(Je,nt){Je.push(nt.precision),Je.push(nt.outputColorSpace),Je.push(nt.envMapMode),Je.push(nt.envMapCubeUVHeight),Je.push(nt.mapUv),Je.push(nt.alphaMapUv),Je.push(nt.lightMapUv),Je.push(nt.aoMapUv),Je.push(nt.bumpMapUv),Je.push(nt.normalMapUv),Je.push(nt.displacementMapUv),Je.push(nt.emissiveMapUv),Je.push(nt.metalnessMapUv),Je.push(nt.roughnessMapUv),Je.push(nt.anisotropyMapUv),Je.push(nt.clearcoatMapUv),Je.push(nt.clearcoatNormalMapUv),Je.push(nt.clearcoatRoughnessMapUv),Je.push(nt.iridescenceMapUv),Je.push(nt.iridescenceThicknessMapUv),Je.push(nt.sheenColorMapUv),Je.push(nt.sheenRoughnessMapUv),Je.push(nt.specularMapUv),Je.push(nt.specularColorMapUv),Je.push(nt.specularIntensityMapUv),Je.push(nt.transmissionMapUv),Je.push(nt.thicknessMapUv),Je.push(nt.combine),Je.push(nt.fogExp2),Je.push(nt.sizeAttenuation),Je.push(nt.morphTargetsCount),Je.push(nt.morphAttributeCount),Je.push(nt.numDirLights),Je.push(nt.numPointLights),Je.push(nt.numSpotLights),Je.push(nt.numSpotLightMaps),Je.push(nt.numHemiLights),Je.push(nt.numRectAreaLights),Je.push(nt.numDirLightShadows),Je.push(nt.numPointLightShadows),Je.push(nt.numSpotLightShadows),Je.push(nt.numSpotLightShadowsWithMaps),Je.push(nt.numLightProbes),Je.push(nt.shadowMapType),Je.push(nt.toneMapping),Je.push(nt.numClippingPlanes),Je.push(nt.numClipIntersection),Je.push(nt.depthPacking)}function Se(Je,nt){s.disableAll(),nt.supportsVertexTextures&&s.enable(0),nt.instancing&&s.enable(1),nt.instancingColor&&s.enable(2),nt.instancingMorph&&s.enable(3),nt.matcap&&s.enable(4),nt.envMap&&s.enable(5),nt.normalMapObjectSpace&&s.enable(6),nt.normalMapTangentSpace&&s.enable(7),nt.clearcoat&&s.enable(8),nt.iridescence&&s.enable(9),nt.alphaTest&&s.enable(10),nt.vertexColors&&s.enable(11),nt.vertexAlphas&&s.enable(12),nt.vertexUv1s&&s.enable(13),nt.vertexUv2s&&s.enable(14),nt.vertexUv3s&&s.enable(15),nt.vertexTangents&&s.enable(16),nt.anisotropy&&s.enable(17),nt.alphaHash&&s.enable(18),nt.batching&&s.enable(19),nt.dispersion&&s.enable(20),nt.batchingColor&&s.enable(21),nt.gradientMap&&s.enable(22),Je.push(s.mask),s.disableAll(),nt.fog&&s.enable(0),nt.useFog&&s.enable(1),nt.flatShading&&s.enable(2),nt.logarithmicDepthBuffer&&s.enable(3),nt.reversedDepthBuffer&&s.enable(4),nt.skinning&&s.enable(5),nt.morphTargets&&s.enable(6),nt.morphNormals&&s.enable(7),nt.morphColors&&s.enable(8),nt.premultipliedAlpha&&s.enable(9),nt.shadowMapEnabled&&s.enable(10),nt.doubleSided&&s.enable(11),nt.flipSided&&s.enable(12),nt.useDepthPacking&&s.enable(13),nt.dithering&&s.enable(14),nt.transmission&&s.enable(15),nt.sheen&&s.enable(16),nt.opaque&&s.enable(17),nt.pointsUvs&&s.enable(18),nt.decodeVideoTexture&&s.enable(19),nt.decodeVideoTextureEmissive&&s.enable(20),nt.alphaToCoverage&&s.enable(21),Je.push(s.mask)}function Pe(Je){const nt=ie[Je.type];let ut;if(nt){const ht=DC[nt];ut=wW.clone(ht.uniforms)}else ut=Je.uniforms;return ut}function Me(Je,nt){let ut;for(let ht=0,_t=L.length;ht<_t;ht++){const Dt=L[ht];if(Dt.cacheKey===nt){ut=Dt,++ut.usedTimes;break}}return ut===void 0&&(ut=new ktr(t,nt,Je,a),L.push(ut)),ut}function Ie(Je){if(--Je.usedTimes===0){const nt=L.indexOf(Je);L[nt]=L[L.length-1],L.pop(),Je.destroy()}}function Ve(Je){d.remove(Je)}function Ze(){d.dispose()}return{getParameters:ae,getProgramCacheKey:U,getUniforms:Pe,acquireProgram:Me,releaseProgram:Ie,releaseShaderCache:Ve,programs:L,dispose:Ze}}function Otr(){let t=new WeakMap;function e(o){return t.has(o)}function r(o){let s=t.get(o);return s===void 0&&(s={},t.set(o,s)),s}function n(o){t.delete(o)}function i(o,s,d){t.get(o)[s]=d}function a(){t=new WeakMap}return{has:e,get:r,remove:n,update:i,dispose:a}}function Ntr(t,e){return t.groupOrder!==e.groupOrder?t.groupOrder-e.groupOrder:t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.material.id!==e.material.id?t.material.id-e.material.id:t.z!==e.z?t.z-e.z:t.id-e.id}function CPe(t,e){return t.groupOrder!==e.groupOrder?t.groupOrder-e.groupOrder:t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function MPe(){const t=[];let e=0;const r=[],n=[],i=[];function a(){e=0,r.length=0,n.length=0,i.length=0}function o(B,V,X,ie,de,ae){let U=t[e];return U===void 0?(U={id:B.id,object:B,geometry:V,material:X,groupOrder:ie,renderOrder:B.renderOrder,z:de,group:ae},t[e]=U):(U.id=B.id,U.object=B,U.geometry=V,U.material=X,U.groupOrder=ie,U.renderOrder=B.renderOrder,U.z=de,U.group=ae),e++,U}function s(B,V,X,ie,de,ae){const U=o(B,V,X,ie,de,ae);X.transmission>0?n.push(U):X.transparent===!0?i.push(U):r.push(U)}function d(B,V,X,ie,de,ae){const U=o(B,V,X,ie,de,ae);X.transmission>0?n.unshift(U):X.transparent===!0?i.unshift(U):r.unshift(U)}function b(B,V){r.length>1&&r.sort(B||Ntr),n.length>1&&n.sort(V||CPe),i.length>1&&i.sort(V||CPe)}function L(){for(let B=e,V=t.length;B<V;B++){const X=t[B];if(X.id===null)break;X.id=null,X.object=null,X.geometry=null,X.material=null,X.group=null}}return{opaque:r,transmissive:n,transparent:i,init:a,push:s,unshift:d,finish:L,sort:b}}function Ftr(){let t=new WeakMap;function e(n,i){const a=t.get(n);let o;return a===void 0?(o=new MPe,t.set(n,[o])):i>=a.length?(o=new MPe,a.push(o)):o=a[i],o}function r(){t=new WeakMap}return{get:e,dispose:r}}function ztr(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let r;switch(e.type){case"DirectionalLight":r={direction:new oi,color:new Wu};break;case"SpotLight":r={position:new oi,direction:new oi,color:new Wu,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":r={position:new oi,color:new Wu,distance:0,decay:0};break;case"HemisphereLight":r={direction:new oi,skyColor:new Wu,groundColor:new Wu};break;case"RectAreaLight":r={color:new Wu,position:new oi,halfWidth:new oi,halfHeight:new oi};break}return t[e.id]=r,r}}}function Btr(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let r;switch(e.type){case"DirectionalLight":r={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new sl};break;case"SpotLight":r={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new sl};break;case"PointLight":r={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new sl,shadowCameraNear:1,shadowCameraFar:1e3};break}return t[e.id]=r,r}}}let Utr=0;function Htr(t,e){return(e.castShadow?2:0)-(t.castShadow?2:0)+(e.map?1:0)-(t.map?1:0)}function jtr(t){const e=new ztr,r=Btr(),n={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let b=0;b<9;b++)n.probe.push(new oi);const i=new oi,a=new Rc,o=new Rc;function s(b){let L=0,B=0,V=0;for(let Je=0;Je<9;Je++)n.probe[Je].set(0,0,0);let X=0,ie=0,de=0,ae=0,U=0,ve=0,Se=0,Pe=0,Me=0,Ie=0,Ve=0;b.sort(Htr);for(let Je=0,nt=b.length;Je<nt;Je++){const ut=b[Je],ht=ut.color,_t=ut.intensity,Dt=ut.distance,qt=ut.shadow&&ut.shadow.map?ut.shadow.map.texture:null;if(ut.isAmbientLight)L+=ht.r*_t,B+=ht.g*_t,V+=ht.b*_t;else if(ut.isLightProbe){for(let Lt=0;Lt<9;Lt++)n.probe[Lt].addScaledVector(ut.sh.coefficients[Lt],_t);Ve++}else if(ut.isDirectionalLight){const Lt=e.get(ut);if(Lt.color.copy(ut.color).multiplyScalar(ut.intensity),ut.castShadow){const dr=ut.shadow,Zt=r.get(ut);Zt.shadowIntensity=dr.intensity,Zt.shadowBias=dr.bias,Zt.shadowNormalBias=dr.normalBias,Zt.shadowRadius=dr.radius,Zt.shadowMapSize=dr.mapSize,n.directionalShadow[X]=Zt,n.directionalShadowMap[X]=qt,n.directionalShadowMatrix[X]=ut.shadow.matrix,ve++}n.directional[X]=Lt,X++}else if(ut.isSpotLight){const Lt=e.get(ut);Lt.position.setFromMatrixPosition(ut.matrixWorld),Lt.color.copy(ht).multiplyScalar(_t),Lt.distance=Dt,Lt.coneCos=Math.cos(ut.angle),Lt.penumbraCos=Math.cos(ut.angle*(1-ut.penumbra)),Lt.decay=ut.decay,n.spot[de]=Lt;const dr=ut.shadow;if(ut.map&&(n.spotLightMap[Me]=ut.map,Me++,dr.updateMatrices(ut),ut.castShadow&&Ie++),n.spotLightMatrix[de]=dr.matrix,ut.castShadow){const Zt=r.get(ut);Zt.shadowIntensity=dr.intensity,Zt.shadowBias=dr.bias,Zt.shadowNormalBias=dr.normalBias,Zt.shadowRadius=dr.radius,Zt.shadowMapSize=dr.mapSize,n.spotShadow[de]=Zt,n.spotShadowMap[de]=qt,Pe++}de++}else if(ut.isRectAreaLight){const Lt=e.get(ut);Lt.color.copy(ht).multiplyScalar(_t),Lt.halfWidth.set(ut.width*.5,0,0),Lt.halfHeight.set(0,ut.height*.5,0),n.rectArea[ae]=Lt,ae++}else if(ut.isPointLight){const Lt=e.get(ut);if(Lt.color.copy(ut.color).multiplyScalar(ut.intensity),Lt.distance=ut.distance,Lt.decay=ut.decay,ut.castShadow){const dr=ut.shadow,Zt=r.get(ut);Zt.shadowIntensity=dr.intensity,Zt.shadowBias=dr.bias,Zt.shadowNormalBias=dr.normalBias,Zt.shadowRadius=dr.radius,Zt.shadowMapSize=dr.mapSize,Zt.shadowCameraNear=dr.camera.near,Zt.shadowCameraFar=dr.camera.far,n.pointShadow[ie]=Zt,n.pointShadowMap[ie]=qt,n.pointShadowMatrix[ie]=ut.shadow.matrix,Se++}n.point[ie]=Lt,ie++}else if(ut.isHemisphereLight){const Lt=e.get(ut);Lt.skyColor.copy(ut.color).multiplyScalar(_t),Lt.groundColor.copy(ut.groundColor).multiplyScalar(_t),n.hemi[U]=Lt,U++}}ae>0&&(t.has("OES_texture_float_linear")===!0?(n.rectAreaLTC1=gc.LTC_FLOAT_1,n.rectAreaLTC2=gc.LTC_FLOAT_2):(n.rectAreaLTC1=gc.LTC_HALF_1,n.rectAreaLTC2=gc.LTC_HALF_2)),n.ambient[0]=L,n.ambient[1]=B,n.ambient[2]=V;const Ze=n.hash;(Ze.directionalLength!==X||Ze.pointLength!==ie||Ze.spotLength!==de||Ze.rectAreaLength!==ae||Ze.hemiLength!==U||Ze.numDirectionalShadows!==ve||Ze.numPointShadows!==Se||Ze.numSpotShadows!==Pe||Ze.numSpotMaps!==Me||Ze.numLightProbes!==Ve)&&(n.directional.length=X,n.spot.length=de,n.rectArea.length=ae,n.point.length=ie,n.hemi.length=U,n.directionalShadow.length=ve,n.directionalShadowMap.length=ve,n.pointShadow.length=Se,n.pointShadowMap.length=Se,n.spotShadow.length=Pe,n.spotShadowMap.length=Pe,n.directionalShadowMatrix.length=ve,n.pointShadowMatrix.length=Se,n.spotLightMatrix.length=Pe+Me-Ie,n.spotLightMap.length=Me,n.numSpotLightShadowsWithMaps=Ie,n.numLightProbes=Ve,Ze.directionalLength=X,Ze.pointLength=ie,Ze.spotLength=de,Ze.rectAreaLength=ae,Ze.hemiLength=U,Ze.numDirectionalShadows=ve,Ze.numPointShadows=Se,Ze.numSpotShadows=Pe,Ze.numSpotMaps=Me,Ze.numLightProbes=Ve,n.version=Utr++)}function d(b,L){let B=0,V=0,X=0,ie=0,de=0;const ae=L.matrixWorldInverse;for(let U=0,ve=b.length;U<ve;U++){const Se=b[U];if(Se.isDirectionalLight){const Pe=n.directional[B];Pe.direction.setFromMatrixPosition(Se.matrixWorld),i.setFromMatrixPosition(Se.target.matrixWorld),Pe.direction.sub(i),Pe.direction.transformDirection(ae),B++}else if(Se.isSpotLight){const Pe=n.spot[X];Pe.position.setFromMatrixPosition(Se.matrixWorld),Pe.position.applyMatrix4(ae),Pe.direction.setFromMatrixPosition(Se.matrixWorld),i.setFromMatrixPosition(Se.target.matrixWorld),Pe.direction.sub(i),Pe.direction.transformDirection(ae),X++}else if(Se.isRectAreaLight){const Pe=n.rectArea[ie];Pe.position.setFromMatrixPosition(Se.matrixWorld),Pe.position.applyMatrix4(ae),o.identity(),a.copy(Se.matrixWorld),a.premultiply(ae),o.extractRotation(a),Pe.halfWidth.set(Se.width*.5,0,0),Pe.halfHeight.set(0,Se.height*.5,0),Pe.halfWidth.applyMatrix4(o),Pe.halfHeight.applyMatrix4(o),ie++}else if(Se.isPointLight){const Pe=n.point[V];Pe.position.setFromMatrixPosition(Se.matrixWorld),Pe.position.applyMatrix4(ae),V++}else if(Se.isHemisphereLight){const Pe=n.hemi[de];Pe.direction.setFromMatrixPosition(Se.matrixWorld),Pe.direction.transformDirection(ae),de++}}}return{setup:s,setupView:d,state:n}}function RPe(t){const e=new jtr(t),r=[],n=[];function i(L){b.camera=L,r.length=0,n.length=0}function a(L){r.push(L)}function o(L){n.push(L)}function s(){e.setup(r)}function d(L){e.setupView(r,L)}const b={lightsArray:r,shadowsArray:n,camera:null,lights:e,transmissionRenderTarget:{}};return{init:i,state:b,setupLights:s,setupLightsView:d,pushLight:a,pushShadow:o}}function Vtr(t){let e=new WeakMap;function r(i,a=0){const o=e.get(i);let s;return o===void 0?(s=new RPe(t),e.set(i,[s])):a>=o.length?(s=new RPe(t),o.push(s)):s=o[a],s}function n(){e=new WeakMap}return{get:r,dispose:n}}const qtr=`void main() {
	gl_Position = vec4( position, 1.0 );
}`,Gtr=`uniform sampler2D shadow_pass;
uniform vec2 resolution;
uniform float radius;
#include <packing>
void main() {
	const float samples = float( VSM_SAMPLES );
	float mean = 0.0;
	float squared_mean = 0.0;
	float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );
	float uvStart = samples <= 1.0 ? 0.0 : - 1.0;
	for ( float i = 0.0; i < samples; i ++ ) {
		float uvOffset = uvStart + i * uvStride;
		#ifdef HORIZONTAL_PASS
			vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );
			mean += distribution.x;
			squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;
		#else
			float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );
			mean += depth;
			squared_mean += depth * depth;
		#endif
	}
	mean = mean / samples;
	squared_mean = squared_mean / samples;
	float std_dev = sqrt( squared_mean - mean * mean );
	gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );
}`;function $tr(t,e,r){let n=new gF;const i=new sl,a=new sl,o=new dh,s=new uZ({depthPacking:P$e}),d=new Uye,b={},L=r.maxTextureSize,B={[dx]:x1,[x1]:dx,[Zx]:Zx},V=new eb({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new sl},radius:{value:4}},vertexShader:qtr,fragmentShader:Gtr}),X=V.clone();X.defines.HORIZONTAL_PASS=1;const ie=new Jf;ie.setAttribute("position",new Kh(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const de=new hc(ie,V),ae=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=BX;let U=this.type;this.render=function(Ie,Ve,Ze){if(ae.enabled===!1||ae.autoUpdate===!1&&ae.needsUpdate===!1||Ie.length===0)return;const Je=t.getRenderTarget(),nt=t.getActiveCubeFace(),ut=t.getActiveMipmapLevel(),ht=t.state;ht.setBlending(V2),ht.buffers.depth.getReversed()===!0?ht.buffers.color.setClear(0,0,0,0):ht.buffers.color.setClear(1,1,1,1),ht.buffers.depth.setTest(!0),ht.setScissorTest(!1);const _t=U!==AC&&this.type===AC,Dt=U===AC&&this.type!==AC;for(let qt=0,Lt=Ie.length;qt<Lt;qt++){const dr=Ie[qt],Zt=dr.shadow;if(Zt===void 0){console.warn("THREE.WebGLShadowMap:",dr,"has no shadow.");continue}if(Zt.autoUpdate===!1&&Zt.needsUpdate===!1)continue;i.copy(Zt.mapSize);const Cr=Zt.getFrameExtents();if(i.multiply(Cr),a.copy(Zt.mapSize),(i.x>L||i.y>L)&&(i.x>L&&(a.x=Math.floor(L/Cr.x),i.x=a.x*Cr.x,Zt.mapSize.x=a.x),i.y>L&&(a.y=Math.floor(L/Cr.y),i.y=a.y*Cr.y,Zt.mapSize.y=a.y)),Zt.map===null||_t===!0||Dt===!0){const Vt=this.type!==AC?{minFilter:Mp,magFilter:Mp}:{};Zt.map!==null&&Zt.map.dispose(),Zt.map=new cx(i.x,i.y,Vt),Zt.map.texture.name=dr.name+".shadowMap",Zt.camera.updateProjectionMatrix()}t.setRenderTarget(Zt.map),t.clear();const yt=Zt.getViewportCount();for(let Vt=0;Vt<yt;Vt++){const Er=Zt.getViewport(Vt);o.set(a.x*Er.x,a.y*Er.y,a.x*Er.z,a.y*Er.w),ht.viewport(o),Zt.updateMatrices(dr,Vt),n=Zt.getFrustum(),Pe(Ve,Ze,Zt.camera,dr,this.type)}Zt.isPointLightShadow!==!0&&this.type===AC&&ve(Zt,Ze),Zt.needsUpdate=!1}U=this.type,ae.needsUpdate=!1,t.setRenderTarget(Je,nt,ut)};function ve(Ie,Ve){const Ze=e.update(de);V.defines.VSM_SAMPLES!==Ie.blurSamples&&(V.defines.VSM_SAMPLES=Ie.blurSamples,X.defines.VSM_SAMPLES=Ie.blurSamples,V.needsUpdate=!0,X.needsUpdate=!0),Ie.mapPass===null&&(Ie.mapPass=new cx(i.x,i.y)),V.uniforms.shadow_pass.value=Ie.map.texture,V.uniforms.resolution.value=Ie.mapSize,V.uniforms.radius.value=Ie.radius,t.setRenderTarget(Ie.mapPass),t.clear(),t.renderBufferDirect(Ve,null,Ze,V,de,null),X.uniforms.shadow_pass.value=Ie.mapPass.texture,X.uniforms.resolution.value=Ie.mapSize,X.uniforms.radius.value=Ie.radius,t.setRenderTarget(Ie.map),t.clear(),t.renderBufferDirect(Ve,null,Ze,X,de,null)}function Se(Ie,Ve,Ze,Je){let nt=null;const ut=Ze.isPointLight===!0?Ie.customDistanceMaterial:Ie.customDepthMaterial;if(ut!==void 0)nt=ut;else if(nt=Ze.isPointLight===!0?d:s,t.localClippingEnabled&&Ve.clipShadows===!0&&Array.isArray(Ve.clippingPlanes)&&Ve.clippingPlanes.length!==0||Ve.displacementMap&&Ve.displacementScale!==0||Ve.alphaMap&&Ve.alphaTest>0||Ve.map&&Ve.alphaTest>0||Ve.alphaToCoverage===!0){const ht=nt.uuid,_t=Ve.uuid;let Dt=b[ht];Dt===void 0&&(Dt={},b[ht]=Dt);let qt=Dt[_t];qt===void 0&&(qt=nt.clone(),Dt[_t]=qt,Ve.addEventListener("dispose",Me)),nt=qt}if(nt.visible=Ve.visible,nt.wireframe=Ve.wireframe,Je===AC?nt.side=Ve.shadowSide!==null?Ve.shadowSide:Ve.side:nt.side=Ve.shadowSide!==null?Ve.shadowSide:B[Ve.side],nt.alphaMap=Ve.alphaMap,nt.alphaTest=Ve.alphaToCoverage===!0?.5:Ve.alphaTest,nt.map=Ve.map,nt.clipShadows=Ve.clipShadows,nt.clippingPlanes=Ve.clippingPlanes,nt.clipIntersection=Ve.clipIntersection,nt.displacementMap=Ve.displacementMap,nt.displacementScale=Ve.displacementScale,nt.displacementBias=Ve.displacementBias,nt.wireframeLinewidth=Ve.wireframeLinewidth,nt.linewidth=Ve.linewidth,Ze.isPointLight===!0&&nt.isMeshDistanceMaterial===!0){const ht=t.properties.get(nt);ht.light=Ze}return nt}function Pe(Ie,Ve,Ze,Je,nt){if(Ie.visible===!1)return;if(Ie.layers.test(Ve.layers)&&(Ie.isMesh||Ie.isLine||Ie.isPoints)&&(Ie.castShadow||Ie.receiveShadow&&nt===AC)&&(!Ie.frustumCulled||n.intersectsObject(Ie))){Ie.modelViewMatrix.multiplyMatrices(Ze.matrixWorldInverse,Ie.matrixWorld);const _t=e.update(Ie),Dt=Ie.material;if(Array.isArray(Dt)){const qt=_t.groups;for(let Lt=0,dr=qt.length;Lt<dr;Lt++){const Zt=qt[Lt],Cr=Dt[Zt.materialIndex];if(Cr&&Cr.visible){const yt=Se(Ie,Cr,Je,nt);Ie.onBeforeShadow(t,Ie,Ve,Ze,_t,yt,Zt),t.renderBufferDirect(Ze,null,_t,yt,Ie,Zt),Ie.onAfterShadow(t,Ie,Ve,Ze,_t,yt,Zt)}}}else if(Dt.visible){const qt=Se(Ie,Dt,Je,nt);Ie.onBeforeShadow(t,Ie,Ve,Ze,_t,qt,null),t.renderBufferDirect(Ze,null,_t,qt,Ie,null),Ie.onAfterShadow(t,Ie,Ve,Ze,_t,qt,null)}}const ht=Ie.children;for(let _t=0,Dt=ht.length;_t<Dt;_t++)Pe(ht[_t],Ve,Ze,Je,nt)}function Me(Ie){Ie.target.removeEventListener("dispose",Me);for(const Ze in b){const Je=b[Ze],nt=Ie.target.uuid;nt in Je&&(Je[nt].dispose(),delete Je[nt])}}}const Wtr={[B$]:U$,[H$]:q$,[j$]:G$,[OL]:V$,[U$]:B$,[q$]:H$,[G$]:j$,[V$]:OL};function Ytr(t,e){function r(){let ba=!1;const po=new dh;let Ys=null;const $s=new dh(0,0,0,0);return{setMask:function(Gs){Ys!==Gs&&!ba&&(t.colorMask(Gs,Gs,Gs,Gs),Ys=Gs)},setLocked:function(Gs){ba=Gs},setClear:function(Gs,Ns,Hl,nu,su){su===!0&&(Gs*=nu,Ns*=nu,Hl*=nu),po.set(Gs,Ns,Hl,nu),$s.equals(po)===!1&&(t.clearColor(Gs,Ns,Hl,nu),$s.copy(po))},reset:function(){ba=!1,Ys=null,$s.set(-1,0,0,0)}}}function n(){let ba=!1,po=!1,Ys=null,$s=null,Gs=null;return{setReversed:function(Ns){if(po!==Ns){const Hl=e.get("EXT_clip_control");Ns?Hl.clipControlEXT(Hl.LOWER_LEFT_EXT,Hl.ZERO_TO_ONE_EXT):Hl.clipControlEXT(Hl.LOWER_LEFT_EXT,Hl.NEGATIVE_ONE_TO_ONE_EXT),po=Ns;const nu=Gs;Gs=null,this.setClear(nu)}},getReversed:function(){return po},setTest:function(Ns){Ns?_n(t.DEPTH_TEST):Un(t.DEPTH_TEST)},setMask:function(Ns){Ys!==Ns&&!ba&&(t.depthMask(Ns),Ys=Ns)},setFunc:function(Ns){if(po&&(Ns=Wtr[Ns]),$s!==Ns){switch(Ns){case B$:t.depthFunc(t.NEVER);break;case U$:t.depthFunc(t.ALWAYS);break;case H$:t.depthFunc(t.LESS);break;case OL:t.depthFunc(t.LEQUAL);break;case j$:t.depthFunc(t.EQUAL);break;case V$:t.depthFunc(t.GEQUAL);break;case q$:t.depthFunc(t.GREATER);break;case G$:t.depthFunc(t.NOTEQUAL);break;default:t.depthFunc(t.LEQUAL)}$s=Ns}},setLocked:function(Ns){ba=Ns},setClear:function(Ns){Gs!==Ns&&(po&&(Ns=1-Ns),t.clearDepth(Ns),Gs=Ns)},reset:function(){ba=!1,Ys=null,$s=null,Gs=null,po=!1}}}function i(){let ba=!1,po=null,Ys=null,$s=null,Gs=null,Ns=null,Hl=null,nu=null,su=null;return{setTest:function(Mc){ba||(Mc?_n(t.STENCIL_TEST):Un(t.STENCIL_TEST))},setMask:function(Mc){po!==Mc&&!ba&&(t.stencilMask(Mc),po=Mc)},setFunc:function(Mc,da,Xa){(Ys!==Mc||$s!==da||Gs!==Xa)&&(t.stencilFunc(Mc,da,Xa),Ys=Mc,$s=da,Gs=Xa)},setOp:function(Mc,da,Xa){(Ns!==Mc||Hl!==da||nu!==Xa)&&(t.stencilOp(Mc,da,Xa),Ns=Mc,Hl=da,nu=Xa)},setLocked:function(Mc){ba=Mc},setClear:function(Mc){su!==Mc&&(t.clearStencil(Mc),su=Mc)},reset:function(){ba=!1,po=null,Ys=null,$s=null,Gs=null,Ns=null,Hl=null,nu=null,su=null}}}const a=new r,o=new n,s=new i,d=new WeakMap,b=new WeakMap;let L={},B={},V=new WeakMap,X=[],ie=null,de=!1,ae=null,U=null,ve=null,Se=null,Pe=null,Me=null,Ie=null,Ve=new Wu(0,0,0),Ze=0,Je=!1,nt=null,ut=null,ht=null,_t=null,Dt=null;const qt=t.getParameter(t.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let Lt=!1,dr=0;const Zt=t.getParameter(t.VERSION);Zt.indexOf("WebGL")!==-1?(dr=parseFloat(/^WebGL (\d)/.exec(Zt)[1]),Lt=dr>=1):Zt.indexOf("OpenGL ES")!==-1&&(dr=parseFloat(/^OpenGL ES (\d)/.exec(Zt)[1]),Lt=dr>=2);let Cr=null,yt={};const Vt=t.getParameter(t.SCISSOR_BOX),Er=t.getParameter(t.VIEWPORT),sr=new dh().fromArray(Vt),or=new dh().fromArray(Er);function Ar(ba,po,Ys,$s){const Gs=new Uint8Array(4),Ns=t.createTexture();t.bindTexture(ba,Ns),t.texParameteri(ba,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(ba,t.TEXTURE_MAG_FILTER,t.NEAREST);for(let Hl=0;Hl<Ys;Hl++)ba===t.TEXTURE_3D||ba===t.TEXTURE_2D_ARRAY?t.texImage3D(po,0,t.RGBA,1,1,$s,0,t.RGBA,t.UNSIGNED_BYTE,Gs):t.texImage2D(po+Hl,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,Gs);return Ns}const Ir={};Ir[t.TEXTURE_2D]=Ar(t.TEXTURE_2D,t.TEXTURE_2D,1),Ir[t.TEXTURE_CUBE_MAP]=Ar(t.TEXTURE_CUBE_MAP,t.TEXTURE_CUBE_MAP_POSITIVE_X,6),Ir[t.TEXTURE_2D_ARRAY]=Ar(t.TEXTURE_2D_ARRAY,t.TEXTURE_2D_ARRAY,1,1),Ir[t.TEXTURE_3D]=Ar(t.TEXTURE_3D,t.TEXTURE_3D,1,1),a.setClear(0,0,0,1),o.setClear(1),s.setClear(0),_n(t.DEPTH_TEST),o.setFunc(OL),Sn(!1),bn(Ape),_n(t.CULL_FACE),Yn(V2);function _n(ba){L[ba]!==!0&&(t.enable(ba),L[ba]=!0)}function Un(ba){L[ba]!==!1&&(t.disable(ba),L[ba]=!1)}function Qn(ba,po){return B[ba]!==po?(t.bindFramebuffer(ba,po),B[ba]=po,ba===t.DRAW_FRAMEBUFFER&&(B[t.FRAMEBUFFER]=po),ba===t.FRAMEBUFFER&&(B[t.DRAW_FRAMEBUFFER]=po),!0):!1}function Jn(ba,po){let Ys=X,$s=!1;if(ba){Ys=V.get(po),Ys===void 0&&(Ys=[],V.set(po,Ys));const Gs=ba.textures;if(Ys.length!==Gs.length||Ys[0]!==t.COLOR_ATTACHMENT0){for(let Ns=0,Hl=Gs.length;Ns<Hl;Ns++)Ys[Ns]=t.COLOR_ATTACHMENT0+Ns;Ys.length=Gs.length,$s=!0}}else Ys[0]!==t.BACK&&(Ys[0]=t.BACK,$s=!0);$s&&t.drawBuffers(Ys)}function Vn(ba){return ie!==ba?(t.useProgram(ba),ie=ba,!0):!1}const jn={[PP]:t.FUNC_ADD,[r$e]:t.FUNC_SUBTRACT,[n$e]:t.FUNC_REVERSE_SUBTRACT};jn[i$e]=t.MIN,jn[a$e]=t.MAX;const Lr={[o$e]:t.ZERO,[s$e]:t.ONE,[l$e]:t.SRC_COLOR,[F$]:t.SRC_ALPHA,[p$e]:t.SRC_ALPHA_SATURATE,[d$e]:t.DST_COLOR,[c$e]:t.DST_ALPHA,[u$e]:t.ONE_MINUS_SRC_COLOR,[z$]:t.ONE_MINUS_SRC_ALPHA,[h$e]:t.ONE_MINUS_DST_COLOR,[f$e]:t.ONE_MINUS_DST_ALPHA,[v$e]:t.CONSTANT_COLOR,[m$e]:t.ONE_MINUS_CONSTANT_COLOR,[g$e]:t.CONSTANT_ALPHA,[y$e]:t.ONE_MINUS_CONSTANT_ALPHA};function Yn(ba,po,Ys,$s,Gs,Ns,Hl,nu,su,Mc){if(ba===V2){de===!0&&(Un(t.BLEND),de=!1);return}if(de===!1&&(_n(t.BLEND),de=!0),ba!==t$e){if(ba!==ae||Mc!==Je){if((U!==PP||Pe!==PP)&&(t.blendEquation(t.FUNC_ADD),U=PP,Pe=PP),Mc)switch(ba){case Ak:t.blendFuncSeparate(t.ONE,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA);break;case N$:t.blendFunc(t.ONE,t.ONE);break;case Cpe:t.blendFuncSeparate(t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ZERO,t.ONE);break;case Mpe:t.blendFuncSeparate(t.DST_COLOR,t.ONE_MINUS_SRC_ALPHA,t.ZERO,t.ONE);break;default:console.error("THREE.WebGLState: Invalid blending: ",ba);break}else switch(ba){case Ak:t.blendFuncSeparate(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA);break;case N$:t.blendFuncSeparate(t.SRC_ALPHA,t.ONE,t.ONE,t.ONE);break;case Cpe:console.error("THREE.WebGLState: SubtractiveBlending requires material.premultipliedAlpha = true");break;case Mpe:console.error("THREE.WebGLState: MultiplyBlending requires material.premultipliedAlpha = true");break;default:console.error("THREE.WebGLState: Invalid blending: ",ba);break}ve=null,Se=null,Me=null,Ie=null,Ve.set(0,0,0),Ze=0,ae=ba,Je=Mc}return}Gs=Gs||po,Ns=Ns||Ys,Hl=Hl||$s,(po!==U||Gs!==Pe)&&(t.blendEquationSeparate(jn[po],jn[Gs]),U=po,Pe=Gs),(Ys!==ve||$s!==Se||Ns!==Me||Hl!==Ie)&&(t.blendFuncSeparate(Lr[Ys],Lr[$s],Lr[Ns],Lr[Hl]),ve=Ys,Se=$s,Me=Ns,Ie=Hl),(nu.equals(Ve)===!1||su!==Ze)&&(t.blendColor(nu.r,nu.g,nu.b,su),Ve.copy(nu),Ze=su),ae=ba,Je=!1}function On(ba,po){ba.side===Zx?Un(t.CULL_FACE):_n(t.CULL_FACE);let Ys=ba.side===x1;po&&(Ys=!Ys),Sn(Ys),ba.blending===Ak&&ba.transparent===!1?Yn(V2):Yn(ba.blending,ba.blendEquation,ba.blendSrc,ba.blendDst,ba.blendEquationAlpha,ba.blendSrcAlpha,ba.blendDstAlpha,ba.blendColor,ba.blendAlpha,ba.premultipliedAlpha),o.setFunc(ba.depthFunc),o.setTest(ba.depthTest),o.setMask(ba.depthWrite),a.setMask(ba.colorWrite);const $s=ba.stencilWrite;s.setTest($s),$s&&(s.setMask(ba.stencilWriteMask),s.setFunc(ba.stencilFunc,ba.stencilRef,ba.stencilFuncMask),s.setOp(ba.stencilFail,ba.stencilZFail,ba.stencilZPass)),gi(ba.polygonOffset,ba.polygonOffsetFactor,ba.polygonOffsetUnits),ba.alphaToCoverage===!0?_n(t.SAMPLE_ALPHA_TO_COVERAGE):Un(t.SAMPLE_ALPHA_TO_COVERAGE)}function Sn(ba){nt!==ba&&(ba?t.frontFace(t.CW):t.frontFace(t.CCW),nt=ba)}function bn(ba){ba!==JGe?(_n(t.CULL_FACE),ba!==ut&&(ba===Ape?t.cullFace(t.BACK):ba===QGe?t.cullFace(t.FRONT):t.cullFace(t.FRONT_AND_BACK))):Un(t.CULL_FACE),ut=ba}function Mn(ba){ba!==ht&&(Lt&&t.lineWidth(ba),ht=ba)}function gi(ba,po,Ys){ba?(_n(t.POLYGON_OFFSET_FILL),(_t!==po||Dt!==Ys)&&(t.polygonOffset(po,Ys),_t=po,Dt=Ys)):Un(t.POLYGON_OFFSET_FILL)}function Oi(ba){ba?_n(t.SCISSOR_TEST):Un(t.SCISSOR_TEST)}function Pa(ba){ba===void 0&&(ba=t.TEXTURE0+qt-1),Cr!==ba&&(t.activeTexture(ba),Cr=ba)}function va(ba,po,Ys){Ys===void 0&&(Cr===null?Ys=t.TEXTURE0+qt-1:Ys=Cr);let $s=yt[Ys];$s===void 0&&($s={type:void 0,texture:void 0},yt[Ys]=$s),($s.type!==ba||$s.texture!==po)&&(Cr!==Ys&&(t.activeTexture(Ys),Cr=Ys),t.bindTexture(ba,po||Ir[ba]),$s.type=ba,$s.texture=po)}function ti(){const ba=yt[Cr];ba!==void 0&&ba.type!==void 0&&(t.bindTexture(ba.type,null),ba.type=void 0,ba.texture=void 0)}function Tn(){try{t.compressedTexImage2D(...arguments)}catch(ba){console.error("THREE.WebGLState:",ba)}}function bi(){try{t.compressedTexImage3D(...arguments)}catch(ba){console.error("THREE.WebGLState:",ba)}}function Wn(){try{t.texSubImage2D(...arguments)}catch(ba){console.error("THREE.WebGLState:",ba)}}function Ei(){try{t.texSubImage3D(...arguments)}catch(ba){console.error("THREE.WebGLState:",ba)}}function Ki(){try{t.compressedTexSubImage2D(...arguments)}catch(ba){console.error("THREE.WebGLState:",ba)}}function sa(){try{t.compressedTexSubImage3D(...arguments)}catch(ba){console.error("THREE.WebGLState:",ba)}}function xa(){try{t.texStorage2D(...arguments)}catch(ba){console.error("THREE.WebGLState:",ba)}}function Qa(){try{t.texStorage3D(...arguments)}catch(ba){console.error("THREE.WebGLState:",ba)}}function is(){try{t.texImage2D(...arguments)}catch(ba){console.error("THREE.WebGLState:",ba)}}function go(){try{t.texImage3D(...arguments)}catch(ba){console.error("THREE.WebGLState:",ba)}}function Co(ba){sr.equals(ba)===!1&&(t.scissor(ba.x,ba.y,ba.z,ba.w),sr.copy(ba))}function Ko(ba){or.equals(ba)===!1&&(t.viewport(ba.x,ba.y,ba.z,ba.w),or.copy(ba))}function Zi(ba,po){let Ys=b.get(po);Ys===void 0&&(Ys=new WeakMap,b.set(po,Ys));let $s=Ys.get(ba);$s===void 0&&($s=t.getUniformBlockIndex(po,ba.name),Ys.set(ba,$s))}function za(ba,po){const $s=b.get(po).get(ba);d.get(po)!==$s&&(t.uniformBlockBinding(po,$s,ba.__bindingPointIndex),d.set(po,$s))}function Ss(){t.disable(t.BLEND),t.disable(t.CULL_FACE),t.disable(t.DEPTH_TEST),t.disable(t.POLYGON_OFFSET_FILL),t.disable(t.SCISSOR_TEST),t.disable(t.STENCIL_TEST),t.disable(t.SAMPLE_ALPHA_TO_COVERAGE),t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ONE,t.ZERO),t.blendFuncSeparate(t.ONE,t.ZERO,t.ONE,t.ZERO),t.blendColor(0,0,0,0),t.colorMask(!0,!0,!0,!0),t.clearColor(0,0,0,0),t.depthMask(!0),t.depthFunc(t.LESS),o.setReversed(!1),t.clearDepth(1),t.stencilMask(4294967295),t.stencilFunc(t.ALWAYS,0,4294967295),t.stencilOp(t.KEEP,t.KEEP,t.KEEP),t.clearStencil(0),t.cullFace(t.BACK),t.frontFace(t.CCW),t.polygonOffset(0,0),t.activeTexture(t.TEXTURE0),t.bindFramebuffer(t.FRAMEBUFFER,null),t.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),t.bindFramebuffer(t.READ_FRAMEBUFFER,null),t.useProgram(null),t.lineWidth(1),t.scissor(0,0,t.canvas.width,t.canvas.height),t.viewport(0,0,t.canvas.width,t.canvas.height),L={},Cr=null,yt={},B={},V=new WeakMap,X=[],ie=null,de=!1,ae=null,U=null,ve=null,Se=null,Pe=null,Me=null,Ie=null,Ve=new Wu(0,0,0),Ze=0,Je=!1,nt=null,ut=null,ht=null,_t=null,Dt=null,sr.set(0,0,t.canvas.width,t.canvas.height),or.set(0,0,t.canvas.width,t.canvas.height),a.reset(),o.reset(),s.reset()}return{buffers:{color:a,depth:o,stencil:s},enable:_n,disable:Un,bindFramebuffer:Qn,drawBuffers:Jn,useProgram:Vn,setBlending:Yn,setMaterial:On,setFlipSided:Sn,setCullFace:bn,setLineWidth:Mn,setPolygonOffset:gi,setScissorTest:Oi,activeTexture:Pa,bindTexture:va,unbindTexture:ti,compressedTexImage2D:Tn,compressedTexImage3D:bi,texImage2D:is,texImage3D:go,updateUBOMapping:Zi,uniformBlockBinding:za,texStorage2D:xa,texStorage3D:Qa,texSubImage2D:Wn,texSubImage3D:Ei,compressedTexSubImage2D:Ki,compressedTexSubImage3D:sa,scissor:Co,viewport:Ko,reset:Ss}}function Xtr(t,e,r,n,i,a,o){const s=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):null,d=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),b=new sl,L=new WeakMap;let B;const V=new WeakMap;let X=!1;try{X=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function ie(ti,Tn){return X?new OffscreenCanvas(ti,Tn):eB("canvas")}function de(ti,Tn,bi){let Wn=1;const Ei=va(ti);if((Ei.width>bi||Ei.height>bi)&&(Wn=bi/Math.max(Ei.width,Ei.height)),Wn<1)if(typeof HTMLImageElement<"u"&&ti instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&ti instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&ti instanceof ImageBitmap||typeof VideoFrame<"u"&&ti instanceof VideoFrame){const Ki=Math.floor(Wn*Ei.width),sa=Math.floor(Wn*Ei.height);B===void 0&&(B=ie(Ki,sa));const xa=Tn?ie(Ki,sa):B;return xa.width=Ki,xa.height=sa,xa.getContext("2d").drawImage(ti,0,0,Ki,sa),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+Ei.width+"x"+Ei.height+") to ("+Ki+"x"+sa+")."),xa}else return"data"in ti&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+Ei.width+"x"+Ei.height+")."),ti;return ti}function ae(ti){return ti.generateMipmaps}function U(ti){t.generateMipmap(ti)}function ve(ti){return ti.isWebGLCubeRenderTarget?t.TEXTURE_CUBE_MAP:ti.isWebGL3DRenderTarget?t.TEXTURE_3D:ti.isWebGLArrayRenderTarget||ti.isCompressedArrayTexture?t.TEXTURE_2D_ARRAY:t.TEXTURE_2D}function Se(ti,Tn,bi,Wn,Ei=!1){if(ti!==null){if(t[ti]!==void 0)return t[ti];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+ti+"'")}let Ki=Tn;if(Tn===t.RED&&(bi===t.FLOAT&&(Ki=t.R32F),bi===t.HALF_FLOAT&&(Ki=t.R16F),bi===t.UNSIGNED_BYTE&&(Ki=t.R8)),Tn===t.RED_INTEGER&&(bi===t.UNSIGNED_BYTE&&(Ki=t.R8UI),bi===t.UNSIGNED_SHORT&&(Ki=t.R16UI),bi===t.UNSIGNED_INT&&(Ki=t.R32UI),bi===t.BYTE&&(Ki=t.R8I),bi===t.SHORT&&(Ki=t.R16I),bi===t.INT&&(Ki=t.R32I)),Tn===t.RG&&(bi===t.FLOAT&&(Ki=t.RG32F),bi===t.HALF_FLOAT&&(Ki=t.RG16F),bi===t.UNSIGNED_BYTE&&(Ki=t.RG8)),Tn===t.RG_INTEGER&&(bi===t.UNSIGNED_BYTE&&(Ki=t.RG8UI),bi===t.UNSIGNED_SHORT&&(Ki=t.RG16UI),bi===t.UNSIGNED_INT&&(Ki=t.RG32UI),bi===t.BYTE&&(Ki=t.RG8I),bi===t.SHORT&&(Ki=t.RG16I),bi===t.INT&&(Ki=t.RG32I)),Tn===t.RGB_INTEGER&&(bi===t.UNSIGNED_BYTE&&(Ki=t.RGB8UI),bi===t.UNSIGNED_SHORT&&(Ki=t.RGB16UI),bi===t.UNSIGNED_INT&&(Ki=t.RGB32UI),bi===t.BYTE&&(Ki=t.RGB8I),bi===t.SHORT&&(Ki=t.RGB16I),bi===t.INT&&(Ki=t.RGB32I)),Tn===t.RGBA_INTEGER&&(bi===t.UNSIGNED_BYTE&&(Ki=t.RGBA8UI),bi===t.UNSIGNED_SHORT&&(Ki=t.RGBA16UI),bi===t.UNSIGNED_INT&&(Ki=t.RGBA32UI),bi===t.BYTE&&(Ki=t.RGBA8I),bi===t.SHORT&&(Ki=t.RGBA16I),bi===t.INT&&(Ki=t.RGBA32I)),Tn===t.RGB&&(bi===t.UNSIGNED_INT_5_9_9_9_REV&&(Ki=t.RGB9_E5),bi===t.UNSIGNED_INT_10F_11F_11F_REV&&(Ki=t.R11F_G11F_B10F)),Tn===t.RGBA){const sa=Ei?J9:xv.getTransfer(Wn);bi===t.FLOAT&&(Ki=t.RGBA32F),bi===t.HALF_FLOAT&&(Ki=t.RGBA16F),bi===t.UNSIGNED_BYTE&&(Ki=sa===yg?t.SRGB8_ALPHA8:t.RGBA8),bi===t.UNSIGNED_SHORT_4_4_4_4&&(Ki=t.RGBA4),bi===t.UNSIGNED_SHORT_5_5_5_1&&(Ki=t.RGB5_A1)}return(Ki===t.R16F||Ki===t.R32F||Ki===t.RG16F||Ki===t.RG32F||Ki===t.RGBA16F||Ki===t.RGBA32F)&&e.get("EXT_color_buffer_float"),Ki}function Pe(ti,Tn){let bi;return ti?Tn===null||Tn===q2||Tn===p8?bi=t.DEPTH24_STENCIL8:Tn===mp?bi=t.DEPTH32F_STENCIL8:Tn===NL&&(bi=t.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):Tn===null||Tn===q2||Tn===p8?bi=t.DEPTH_COMPONENT24:Tn===mp?bi=t.DEPTH_COMPONENT32F:Tn===NL&&(bi=t.DEPTH_COMPONENT16),bi}function Me(ti,Tn){return ae(ti)===!0||ti.isFramebufferTexture&&ti.minFilter!==Mp&&ti.minFilter!==vp?Math.log2(Math.max(Tn.width,Tn.height))+1:ti.mipmaps!==void 0&&ti.mipmaps.length>0?ti.mipmaps.length:ti.isCompressedTexture&&Array.isArray(ti.image)?Tn.mipmaps.length:1}function Ie(ti){const Tn=ti.target;Tn.removeEventListener("dispose",Ie),Ze(Tn),Tn.isVideoTexture&&L.delete(Tn)}function Ve(ti){const Tn=ti.target;Tn.removeEventListener("dispose",Ve),nt(Tn)}function Ze(ti){const Tn=n.get(ti);if(Tn.__webglInit===void 0)return;const bi=ti.source,Wn=V.get(bi);if(Wn){const Ei=Wn[Tn.__cacheKey];Ei.usedTimes--,Ei.usedTimes===0&&Je(ti),Object.keys(Wn).length===0&&V.delete(bi)}n.remove(ti)}function Je(ti){const Tn=n.get(ti);t.deleteTexture(Tn.__webglTexture);const bi=ti.source,Wn=V.get(bi);delete Wn[Tn.__cacheKey],o.memory.textures--}function nt(ti){const Tn=n.get(ti);if(ti.depthTexture&&(ti.depthTexture.dispose(),n.remove(ti.depthTexture)),ti.isWebGLCubeRenderTarget)for(let Wn=0;Wn<6;Wn++){if(Array.isArray(Tn.__webglFramebuffer[Wn]))for(let Ei=0;Ei<Tn.__webglFramebuffer[Wn].length;Ei++)t.deleteFramebuffer(Tn.__webglFramebuffer[Wn][Ei]);else t.deleteFramebuffer(Tn.__webglFramebuffer[Wn]);Tn.__webglDepthbuffer&&t.deleteRenderbuffer(Tn.__webglDepthbuffer[Wn])}else{if(Array.isArray(Tn.__webglFramebuffer))for(let Wn=0;Wn<Tn.__webglFramebuffer.length;Wn++)t.deleteFramebuffer(Tn.__webglFramebuffer[Wn]);else t.deleteFramebuffer(Tn.__webglFramebuffer);if(Tn.__webglDepthbuffer&&t.deleteRenderbuffer(Tn.__webglDepthbuffer),Tn.__webglMultisampledFramebuffer&&t.deleteFramebuffer(Tn.__webglMultisampledFramebuffer),Tn.__webglColorRenderbuffer)for(let Wn=0;Wn<Tn.__webglColorRenderbuffer.length;Wn++)Tn.__webglColorRenderbuffer[Wn]&&t.deleteRenderbuffer(Tn.__webglColorRenderbuffer[Wn]);Tn.__webglDepthRenderbuffer&&t.deleteRenderbuffer(Tn.__webglDepthRenderbuffer)}const bi=ti.textures;for(let Wn=0,Ei=bi.length;Wn<Ei;Wn++){const Ki=n.get(bi[Wn]);Ki.__webglTexture&&(t.deleteTexture(Ki.__webglTexture),o.memory.textures--),n.remove(bi[Wn])}n.remove(ti)}let ut=0;function ht(){ut=0}function _t(){const ti=ut;return ti>=i.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+ti+" texture units while this GPU supports only "+i.maxTextures),ut+=1,ti}function Dt(ti){const Tn=[];return Tn.push(ti.wrapS),Tn.push(ti.wrapT),Tn.push(ti.wrapR||0),Tn.push(ti.magFilter),Tn.push(ti.minFilter),Tn.push(ti.anisotropy),Tn.push(ti.internalFormat),Tn.push(ti.format),Tn.push(ti.type),Tn.push(ti.generateMipmaps),Tn.push(ti.premultiplyAlpha),Tn.push(ti.flipY),Tn.push(ti.unpackAlignment),Tn.push(ti.colorSpace),Tn.join()}function qt(ti,Tn){const bi=n.get(ti);if(ti.isVideoTexture&&Oi(ti),ti.isRenderTargetTexture===!1&&ti.isExternalTexture!==!0&&ti.version>0&&bi.__version!==ti.version){const Wn=ti.image;if(Wn===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(Wn.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{Ir(bi,ti,Tn);return}}else ti.isExternalTexture&&(bi.__webglTexture=ti.sourceTexture?ti.sourceTexture:null);r.bindTexture(t.TEXTURE_2D,bi.__webglTexture,t.TEXTURE0+Tn)}function Lt(ti,Tn){const bi=n.get(ti);if(ti.isRenderTargetTexture===!1&&ti.version>0&&bi.__version!==ti.version){Ir(bi,ti,Tn);return}r.bindTexture(t.TEXTURE_2D_ARRAY,bi.__webglTexture,t.TEXTURE0+Tn)}function dr(ti,Tn){const bi=n.get(ti);if(ti.isRenderTargetTexture===!1&&ti.version>0&&bi.__version!==ti.version){Ir(bi,ti,Tn);return}r.bindTexture(t.TEXTURE_3D,bi.__webglTexture,t.TEXTURE0+Tn)}function Zt(ti,Tn){const bi=n.get(ti);if(ti.version>0&&bi.__version!==ti.version){_n(bi,ti,Tn);return}r.bindTexture(t.TEXTURE_CUBE_MAP,bi.__webglTexture,t.TEXTURE0+Tn)}const Cr={[sE]:t.REPEAT,[Ng]:t.CLAMP_TO_EDGE,[X9]:t.MIRRORED_REPEAT},yt={[Mp]:t.NEAREST,[hye]:t.NEAREST_MIPMAP_NEAREST,[EN]:t.NEAREST_MIPMAP_LINEAR,[vp]:t.LINEAR,[a9]:t.LINEAR_MIPMAP_NEAREST,[E5]:t.LINEAR_MIPMAP_LINEAR},Vt={[L$e]:t.NEVER,[U$e]:t.ALWAYS,[O$e]:t.LESS,[bye]:t.LEQUAL,[N$e]:t.EQUAL,[B$e]:t.GEQUAL,[F$e]:t.GREATER,[z$e]:t.NOTEQUAL};function Er(ti,Tn){if(Tn.type===mp&&e.has("OES_texture_float_linear")===!1&&(Tn.magFilter===vp||Tn.magFilter===a9||Tn.magFilter===EN||Tn.magFilter===E5||Tn.minFilter===vp||Tn.minFilter===a9||Tn.minFilter===EN||Tn.minFilter===E5)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),t.texParameteri(ti,t.TEXTURE_WRAP_S,Cr[Tn.wrapS]),t.texParameteri(ti,t.TEXTURE_WRAP_T,Cr[Tn.wrapT]),(ti===t.TEXTURE_3D||ti===t.TEXTURE_2D_ARRAY)&&t.texParameteri(ti,t.TEXTURE_WRAP_R,Cr[Tn.wrapR]),t.texParameteri(ti,t.TEXTURE_MAG_FILTER,yt[Tn.magFilter]),t.texParameteri(ti,t.TEXTURE_MIN_FILTER,yt[Tn.minFilter]),Tn.compareFunction&&(t.texParameteri(ti,t.TEXTURE_COMPARE_MODE,t.COMPARE_REF_TO_TEXTURE),t.texParameteri(ti,t.TEXTURE_COMPARE_FUNC,Vt[Tn.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(Tn.magFilter===Mp||Tn.minFilter!==EN&&Tn.minFilter!==E5||Tn.type===mp&&e.has("OES_texture_float_linear")===!1)return;if(Tn.anisotropy>1||n.get(Tn).__currentAnisotropy){const bi=e.get("EXT_texture_filter_anisotropic");t.texParameterf(ti,bi.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(Tn.anisotropy,i.getMaxAnisotropy())),n.get(Tn).__currentAnisotropy=Tn.anisotropy}}}function sr(ti,Tn){let bi=!1;ti.__webglInit===void 0&&(ti.__webglInit=!0,Tn.addEventListener("dispose",Ie));const Wn=Tn.source;let Ei=V.get(Wn);Ei===void 0&&(Ei={},V.set(Wn,Ei));const Ki=Dt(Tn);if(Ki!==ti.__cacheKey){Ei[Ki]===void 0&&(Ei[Ki]={texture:t.createTexture(),usedTimes:0},o.memory.textures++,bi=!0),Ei[Ki].usedTimes++;const sa=Ei[ti.__cacheKey];sa!==void 0&&(Ei[ti.__cacheKey].usedTimes--,sa.usedTimes===0&&Je(Tn)),ti.__cacheKey=Ki,ti.__webglTexture=Ei[Ki].texture}return bi}function or(ti,Tn,bi){return Math.floor(Math.floor(ti/bi)/Tn)}function Ar(ti,Tn,bi,Wn){const Ki=ti.updateRanges;if(Ki.length===0)r.texSubImage2D(t.TEXTURE_2D,0,0,0,Tn.width,Tn.height,bi,Wn,Tn.data);else{Ki.sort((go,Co)=>go.start-Co.start);let sa=0;for(let go=1;go<Ki.length;go++){const Co=Ki[sa],Ko=Ki[go],Zi=Co.start+Co.count,za=or(Ko.start,Tn.width,4),Ss=or(Co.start,Tn.width,4);Ko.start<=Zi+1&&za===Ss&&or(Ko.start+Ko.count-1,Tn.width,4)===za?Co.count=Math.max(Co.count,Ko.start+Ko.count-Co.start):(++sa,Ki[sa]=Ko)}Ki.length=sa+1;const xa=t.getParameter(t.UNPACK_ROW_LENGTH),Qa=t.getParameter(t.UNPACK_SKIP_PIXELS),is=t.getParameter(t.UNPACK_SKIP_ROWS);t.pixelStorei(t.UNPACK_ROW_LENGTH,Tn.width);for(let go=0,Co=Ki.length;go<Co;go++){const Ko=Ki[go],Zi=Math.floor(Ko.start/4),za=Math.ceil(Ko.count/4),Ss=Zi%Tn.width,ba=Math.floor(Zi/Tn.width),po=za,Ys=1;t.pixelStorei(t.UNPACK_SKIP_PIXELS,Ss),t.pixelStorei(t.UNPACK_SKIP_ROWS,ba),r.texSubImage2D(t.TEXTURE_2D,0,Ss,ba,po,Ys,bi,Wn,Tn.data)}ti.clearUpdateRanges(),t.pixelStorei(t.UNPACK_ROW_LENGTH,xa),t.pixelStorei(t.UNPACK_SKIP_PIXELS,Qa),t.pixelStorei(t.UNPACK_SKIP_ROWS,is)}}function Ir(ti,Tn,bi){let Wn=t.TEXTURE_2D;(Tn.isDataArrayTexture||Tn.isCompressedArrayTexture)&&(Wn=t.TEXTURE_2D_ARRAY),Tn.isData3DTexture&&(Wn=t.TEXTURE_3D);const Ei=sr(ti,Tn),Ki=Tn.source;r.bindTexture(Wn,ti.__webglTexture,t.TEXTURE0+bi);const sa=n.get(Ki);if(Ki.version!==sa.__version||Ei===!0){r.activeTexture(t.TEXTURE0+bi);const xa=xv.getPrimaries(xv.workingColorSpace),Qa=Tn.colorSpace===yk?null:xv.getPrimaries(Tn.colorSpace),is=Tn.colorSpace===yk||xa===Qa?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,Tn.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Tn.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,Tn.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,is);let go=de(Tn.image,!1,i.maxTextureSize);go=Pa(Tn,go);const Co=a.convert(Tn.format,Tn.colorSpace),Ko=a.convert(Tn.type);let Zi=Se(Tn.internalFormat,Co,Ko,Tn.colorSpace,Tn.isVideoTexture);Er(Wn,Tn);let za;const Ss=Tn.mipmaps,ba=Tn.isVideoTexture!==!0,po=sa.__version===void 0||Ei===!0,Ys=Ki.dataReady,$s=Me(Tn,go);if(Tn.isDepthTexture)Zi=Pe(Tn.format===m8,Tn.type),po&&(ba?r.texStorage2D(t.TEXTURE_2D,1,Zi,go.width,go.height):r.texImage2D(t.TEXTURE_2D,0,Zi,go.width,go.height,0,Co,Ko,null));else if(Tn.isDataTexture)if(Ss.length>0){ba&&po&&r.texStorage2D(t.TEXTURE_2D,$s,Zi,Ss[0].width,Ss[0].height);for(let Gs=0,Ns=Ss.length;Gs<Ns;Gs++)za=Ss[Gs],ba?Ys&&r.texSubImage2D(t.TEXTURE_2D,Gs,0,0,za.width,za.height,Co,Ko,za.data):r.texImage2D(t.TEXTURE_2D,Gs,Zi,za.width,za.height,0,Co,Ko,za.data);Tn.generateMipmaps=!1}else ba?(po&&r.texStorage2D(t.TEXTURE_2D,$s,Zi,go.width,go.height),Ys&&Ar(Tn,go,Co,Ko)):r.texImage2D(t.TEXTURE_2D,0,Zi,go.width,go.height,0,Co,Ko,go.data);else if(Tn.isCompressedTexture)if(Tn.isCompressedArrayTexture){ba&&po&&r.texStorage3D(t.TEXTURE_2D_ARRAY,$s,Zi,Ss[0].width,Ss[0].height,go.depth);for(let Gs=0,Ns=Ss.length;Gs<Ns;Gs++)if(za=Ss[Gs],Tn.format!==Rp)if(Co!==null)if(ba){if(Ys)if(Tn.layerUpdates.size>0){const Hl=zpe(za.width,za.height,Tn.format,Tn.type);for(const nu of Tn.layerUpdates){const su=za.data.subarray(nu*Hl/za.data.BYTES_PER_ELEMENT,(nu+1)*Hl/za.data.BYTES_PER_ELEMENT);r.compressedTexSubImage3D(t.TEXTURE_2D_ARRAY,Gs,0,0,nu,za.width,za.height,1,Co,su)}Tn.clearLayerUpdates()}else r.compressedTexSubImage3D(t.TEXTURE_2D_ARRAY,Gs,0,0,0,za.width,za.height,go.depth,Co,za.data)}else r.compressedTexImage3D(t.TEXTURE_2D_ARRAY,Gs,Zi,za.width,za.height,go.depth,0,za.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else ba?Ys&&r.texSubImage3D(t.TEXTURE_2D_ARRAY,Gs,0,0,0,za.width,za.height,go.depth,Co,Ko,za.data):r.texImage3D(t.TEXTURE_2D_ARRAY,Gs,Zi,za.width,za.height,go.depth,0,Co,Ko,za.data)}else{ba&&po&&r.texStorage2D(t.TEXTURE_2D,$s,Zi,Ss[0].width,Ss[0].height);for(let Gs=0,Ns=Ss.length;Gs<Ns;Gs++)za=Ss[Gs],Tn.format!==Rp?Co!==null?ba?Ys&&r.compressedTexSubImage2D(t.TEXTURE_2D,Gs,0,0,za.width,za.height,Co,za.data):r.compressedTexImage2D(t.TEXTURE_2D,Gs,Zi,za.width,za.height,0,za.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):ba?Ys&&r.texSubImage2D(t.TEXTURE_2D,Gs,0,0,za.width,za.height,Co,Ko,za.data):r.texImage2D(t.TEXTURE_2D,Gs,Zi,za.width,za.height,0,Co,Ko,za.data)}else if(Tn.isDataArrayTexture)if(ba){if(po&&r.texStorage3D(t.TEXTURE_2D_ARRAY,$s,Zi,go.width,go.height,go.depth),Ys)if(Tn.layerUpdates.size>0){const Gs=zpe(go.width,go.height,Tn.format,Tn.type);for(const Ns of Tn.layerUpdates){const Hl=go.data.subarray(Ns*Gs/go.data.BYTES_PER_ELEMENT,(Ns+1)*Gs/go.data.BYTES_PER_ELEMENT);r.texSubImage3D(t.TEXTURE_2D_ARRAY,0,0,0,Ns,go.width,go.height,1,Co,Ko,Hl)}Tn.clearLayerUpdates()}else r.texSubImage3D(t.TEXTURE_2D_ARRAY,0,0,0,0,go.width,go.height,go.depth,Co,Ko,go.data)}else r.texImage3D(t.TEXTURE_2D_ARRAY,0,Zi,go.width,go.height,go.depth,0,Co,Ko,go.data);else if(Tn.isData3DTexture)ba?(po&&r.texStorage3D(t.TEXTURE_3D,$s,Zi,go.width,go.height,go.depth),Ys&&r.texSubImage3D(t.TEXTURE_3D,0,0,0,0,go.width,go.height,go.depth,Co,Ko,go.data)):r.texImage3D(t.TEXTURE_3D,0,Zi,go.width,go.height,go.depth,0,Co,Ko,go.data);else if(Tn.isFramebufferTexture){if(po)if(ba)r.texStorage2D(t.TEXTURE_2D,$s,Zi,go.width,go.height);else{let Gs=go.width,Ns=go.height;for(let Hl=0;Hl<$s;Hl++)r.texImage2D(t.TEXTURE_2D,Hl,Zi,Gs,Ns,0,Co,Ko,null),Gs>>=1,Ns>>=1}}else if(Ss.length>0){if(ba&&po){const Gs=va(Ss[0]);r.texStorage2D(t.TEXTURE_2D,$s,Zi,Gs.width,Gs.height)}for(let Gs=0,Ns=Ss.length;Gs<Ns;Gs++)za=Ss[Gs],ba?Ys&&r.texSubImage2D(t.TEXTURE_2D,Gs,0,0,Co,Ko,za):r.texImage2D(t.TEXTURE_2D,Gs,Zi,Co,Ko,za);Tn.generateMipmaps=!1}else if(ba){if(po){const Gs=va(go);r.texStorage2D(t.TEXTURE_2D,$s,Zi,Gs.width,Gs.height)}Ys&&r.texSubImage2D(t.TEXTURE_2D,0,0,0,Co,Ko,go)}else r.texImage2D(t.TEXTURE_2D,0,Zi,Co,Ko,go);ae(Tn)&&U(Wn),sa.__version=Ki.version,Tn.onUpdate&&Tn.onUpdate(Tn)}ti.__version=Tn.version}function _n(ti,Tn,bi){if(Tn.image.length!==6)return;const Wn=sr(ti,Tn),Ei=Tn.source;r.bindTexture(t.TEXTURE_CUBE_MAP,ti.__webglTexture,t.TEXTURE0+bi);const Ki=n.get(Ei);if(Ei.version!==Ki.__version||Wn===!0){r.activeTexture(t.TEXTURE0+bi);const sa=xv.getPrimaries(xv.workingColorSpace),xa=Tn.colorSpace===yk?null:xv.getPrimaries(Tn.colorSpace),Qa=Tn.colorSpace===yk||sa===xa?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,Tn.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Tn.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,Tn.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,Qa);const is=Tn.isCompressedTexture||Tn.image[0].isCompressedTexture,go=Tn.image[0]&&Tn.image[0].isDataTexture,Co=[];for(let Ns=0;Ns<6;Ns++)!is&&!go?Co[Ns]=de(Tn.image[Ns],!0,i.maxCubemapSize):Co[Ns]=go?Tn.image[Ns].image:Tn.image[Ns],Co[Ns]=Pa(Tn,Co[Ns]);const Ko=Co[0],Zi=a.convert(Tn.format,Tn.colorSpace),za=a.convert(Tn.type),Ss=Se(Tn.internalFormat,Zi,za,Tn.colorSpace),ba=Tn.isVideoTexture!==!0,po=Ki.__version===void 0||Wn===!0,Ys=Ei.dataReady;let $s=Me(Tn,Ko);Er(t.TEXTURE_CUBE_MAP,Tn);let Gs;if(is){ba&&po&&r.texStorage2D(t.TEXTURE_CUBE_MAP,$s,Ss,Ko.width,Ko.height);for(let Ns=0;Ns<6;Ns++){Gs=Co[Ns].mipmaps;for(let Hl=0;Hl<Gs.length;Hl++){const nu=Gs[Hl];Tn.format!==Rp?Zi!==null?ba?Ys&&r.compressedTexSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Ns,Hl,0,0,nu.width,nu.height,Zi,nu.data):r.compressedTexImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Ns,Hl,Ss,nu.width,nu.height,0,nu.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):ba?Ys&&r.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Ns,Hl,0,0,nu.width,nu.height,Zi,za,nu.data):r.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Ns,Hl,Ss,nu.width,nu.height,0,Zi,za,nu.data)}}}else{if(Gs=Tn.mipmaps,ba&&po){Gs.length>0&&$s++;const Ns=va(Co[0]);r.texStorage2D(t.TEXTURE_CUBE_MAP,$s,Ss,Ns.width,Ns.height)}for(let Ns=0;Ns<6;Ns++)if(go){ba?Ys&&r.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Ns,0,0,0,Co[Ns].width,Co[Ns].height,Zi,za,Co[Ns].data):r.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Ns,0,Ss,Co[Ns].width,Co[Ns].height,0,Zi,za,Co[Ns].data);for(let Hl=0;Hl<Gs.length;Hl++){const su=Gs[Hl].image[Ns].image;ba?Ys&&r.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Ns,Hl+1,0,0,su.width,su.height,Zi,za,su.data):r.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Ns,Hl+1,Ss,su.width,su.height,0,Zi,za,su.data)}}else{ba?Ys&&r.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Ns,0,0,0,Zi,za,Co[Ns]):r.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Ns,0,Ss,Zi,za,Co[Ns]);for(let Hl=0;Hl<Gs.length;Hl++){const nu=Gs[Hl];ba?Ys&&r.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Ns,Hl+1,0,0,Zi,za,nu.image[Ns]):r.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Ns,Hl+1,Ss,Zi,za,nu.image[Ns])}}}ae(Tn)&&U(t.TEXTURE_CUBE_MAP),Ki.__version=Ei.version,Tn.onUpdate&&Tn.onUpdate(Tn)}ti.__version=Tn.version}function Un(ti,Tn,bi,Wn,Ei,Ki){const sa=a.convert(bi.format,bi.colorSpace),xa=a.convert(bi.type),Qa=Se(bi.internalFormat,sa,xa,bi.colorSpace),is=n.get(Tn),go=n.get(bi);if(go.__renderTarget=Tn,!is.__hasExternalTextures){const Co=Math.max(1,Tn.width>>Ki),Ko=Math.max(1,Tn.height>>Ki);Ei===t.TEXTURE_3D||Ei===t.TEXTURE_2D_ARRAY?r.texImage3D(Ei,Ki,Qa,Co,Ko,Tn.depth,0,sa,xa,null):r.texImage2D(Ei,Ki,Qa,Co,Ko,0,sa,xa,null)}r.bindFramebuffer(t.FRAMEBUFFER,ti),gi(Tn)?s.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,Wn,Ei,go.__webglTexture,0,Mn(Tn)):(Ei===t.TEXTURE_2D||Ei>=t.TEXTURE_CUBE_MAP_POSITIVE_X&&Ei<=t.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&t.framebufferTexture2D(t.FRAMEBUFFER,Wn,Ei,go.__webglTexture,Ki),r.bindFramebuffer(t.FRAMEBUFFER,null)}function Qn(ti,Tn,bi){if(t.bindRenderbuffer(t.RENDERBUFFER,ti),Tn.depthBuffer){const Wn=Tn.depthTexture,Ei=Wn&&Wn.isDepthTexture?Wn.type:null,Ki=Pe(Tn.stencilBuffer,Ei),sa=Tn.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,xa=Mn(Tn);gi(Tn)?s.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,xa,Ki,Tn.width,Tn.height):bi?t.renderbufferStorageMultisample(t.RENDERBUFFER,xa,Ki,Tn.width,Tn.height):t.renderbufferStorage(t.RENDERBUFFER,Ki,Tn.width,Tn.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,sa,t.RENDERBUFFER,ti)}else{const Wn=Tn.textures;for(let Ei=0;Ei<Wn.length;Ei++){const Ki=Wn[Ei],sa=a.convert(Ki.format,Ki.colorSpace),xa=a.convert(Ki.type),Qa=Se(Ki.internalFormat,sa,xa,Ki.colorSpace),is=Mn(Tn);bi&&gi(Tn)===!1?t.renderbufferStorageMultisample(t.RENDERBUFFER,is,Qa,Tn.width,Tn.height):gi(Tn)?s.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,is,Qa,Tn.width,Tn.height):t.renderbufferStorage(t.RENDERBUFFER,Qa,Tn.width,Tn.height)}}t.bindRenderbuffer(t.RENDERBUFFER,null)}function Jn(ti,Tn){if(Tn&&Tn.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(r.bindFramebuffer(t.FRAMEBUFFER,ti),!(Tn.depthTexture&&Tn.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");const Wn=n.get(Tn.depthTexture);Wn.__renderTarget=Tn,(!Wn.__webglTexture||Tn.depthTexture.image.width!==Tn.width||Tn.depthTexture.image.height!==Tn.height)&&(Tn.depthTexture.image.width=Tn.width,Tn.depthTexture.image.height=Tn.height,Tn.depthTexture.needsUpdate=!0),qt(Tn.depthTexture,0);const Ei=Wn.__webglTexture,Ki=Mn(Tn);if(Tn.depthTexture.format===v8)gi(Tn)?s.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,Ei,0,Ki):t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,Ei,0);else if(Tn.depthTexture.format===m8)gi(Tn)?s.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,Ei,0,Ki):t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,Ei,0);else throw new Error("Unknown depthTexture format")}function Vn(ti){const Tn=n.get(ti),bi=ti.isWebGLCubeRenderTarget===!0;if(Tn.__boundDepthTexture!==ti.depthTexture){const Wn=ti.depthTexture;if(Tn.__depthDisposeCallback&&Tn.__depthDisposeCallback(),Wn){const Ei=()=>{delete Tn.__boundDepthTexture,delete Tn.__depthDisposeCallback,Wn.removeEventListener("dispose",Ei)};Wn.addEventListener("dispose",Ei),Tn.__depthDisposeCallback=Ei}Tn.__boundDepthTexture=Wn}if(ti.depthTexture&&!Tn.__autoAllocateDepthBuffer){if(bi)throw new Error("target.depthTexture not supported in Cube render targets");const Wn=ti.texture.mipmaps;Wn&&Wn.length>0?Jn(Tn.__webglFramebuffer[0],ti):Jn(Tn.__webglFramebuffer,ti)}else if(bi){Tn.__webglDepthbuffer=[];for(let Wn=0;Wn<6;Wn++)if(r.bindFramebuffer(t.FRAMEBUFFER,Tn.__webglFramebuffer[Wn]),Tn.__webglDepthbuffer[Wn]===void 0)Tn.__webglDepthbuffer[Wn]=t.createRenderbuffer(),Qn(Tn.__webglDepthbuffer[Wn],ti,!1);else{const Ei=ti.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,Ki=Tn.__webglDepthbuffer[Wn];t.bindRenderbuffer(t.RENDERBUFFER,Ki),t.framebufferRenderbuffer(t.FRAMEBUFFER,Ei,t.RENDERBUFFER,Ki)}}else{const Wn=ti.texture.mipmaps;if(Wn&&Wn.length>0?r.bindFramebuffer(t.FRAMEBUFFER,Tn.__webglFramebuffer[0]):r.bindFramebuffer(t.FRAMEBUFFER,Tn.__webglFramebuffer),Tn.__webglDepthbuffer===void 0)Tn.__webglDepthbuffer=t.createRenderbuffer(),Qn(Tn.__webglDepthbuffer,ti,!1);else{const Ei=ti.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,Ki=Tn.__webglDepthbuffer;t.bindRenderbuffer(t.RENDERBUFFER,Ki),t.framebufferRenderbuffer(t.FRAMEBUFFER,Ei,t.RENDERBUFFER,Ki)}}r.bindFramebuffer(t.FRAMEBUFFER,null)}function jn(ti,Tn,bi){const Wn=n.get(ti);Tn!==void 0&&Un(Wn.__webglFramebuffer,ti,ti.texture,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,0),bi!==void 0&&Vn(ti)}function Lr(ti){const Tn=ti.texture,bi=n.get(ti),Wn=n.get(Tn);ti.addEventListener("dispose",Ve);const Ei=ti.textures,Ki=ti.isWebGLCubeRenderTarget===!0,sa=Ei.length>1;if(sa||(Wn.__webglTexture===void 0&&(Wn.__webglTexture=t.createTexture()),Wn.__version=Tn.version,o.memory.textures++),Ki){bi.__webglFramebuffer=[];for(let xa=0;xa<6;xa++)if(Tn.mipmaps&&Tn.mipmaps.length>0){bi.__webglFramebuffer[xa]=[];for(let Qa=0;Qa<Tn.mipmaps.length;Qa++)bi.__webglFramebuffer[xa][Qa]=t.createFramebuffer()}else bi.__webglFramebuffer[xa]=t.createFramebuffer()}else{if(Tn.mipmaps&&Tn.mipmaps.length>0){bi.__webglFramebuffer=[];for(let xa=0;xa<Tn.mipmaps.length;xa++)bi.__webglFramebuffer[xa]=t.createFramebuffer()}else bi.__webglFramebuffer=t.createFramebuffer();if(sa)for(let xa=0,Qa=Ei.length;xa<Qa;xa++){const is=n.get(Ei[xa]);is.__webglTexture===void 0&&(is.__webglTexture=t.createTexture(),o.memory.textures++)}if(ti.samples>0&&gi(ti)===!1){bi.__webglMultisampledFramebuffer=t.createFramebuffer(),bi.__webglColorRenderbuffer=[],r.bindFramebuffer(t.FRAMEBUFFER,bi.__webglMultisampledFramebuffer);for(let xa=0;xa<Ei.length;xa++){const Qa=Ei[xa];bi.__webglColorRenderbuffer[xa]=t.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,bi.__webglColorRenderbuffer[xa]);const is=a.convert(Qa.format,Qa.colorSpace),go=a.convert(Qa.type),Co=Se(Qa.internalFormat,is,go,Qa.colorSpace,ti.isXRRenderTarget===!0),Ko=Mn(ti);t.renderbufferStorageMultisample(t.RENDERBUFFER,Ko,Co,ti.width,ti.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+xa,t.RENDERBUFFER,bi.__webglColorRenderbuffer[xa])}t.bindRenderbuffer(t.RENDERBUFFER,null),ti.depthBuffer&&(bi.__webglDepthRenderbuffer=t.createRenderbuffer(),Qn(bi.__webglDepthRenderbuffer,ti,!0)),r.bindFramebuffer(t.FRAMEBUFFER,null)}}if(Ki){r.bindTexture(t.TEXTURE_CUBE_MAP,Wn.__webglTexture),Er(t.TEXTURE_CUBE_MAP,Tn);for(let xa=0;xa<6;xa++)if(Tn.mipmaps&&Tn.mipmaps.length>0)for(let Qa=0;Qa<Tn.mipmaps.length;Qa++)Un(bi.__webglFramebuffer[xa][Qa],ti,Tn,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+xa,Qa);else Un(bi.__webglFramebuffer[xa],ti,Tn,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+xa,0);ae(Tn)&&U(t.TEXTURE_CUBE_MAP),r.unbindTexture()}else if(sa){for(let xa=0,Qa=Ei.length;xa<Qa;xa++){const is=Ei[xa],go=n.get(is);let Co=t.TEXTURE_2D;(ti.isWebGL3DRenderTarget||ti.isWebGLArrayRenderTarget)&&(Co=ti.isWebGL3DRenderTarget?t.TEXTURE_3D:t.TEXTURE_2D_ARRAY),r.bindTexture(Co,go.__webglTexture),Er(Co,is),Un(bi.__webglFramebuffer,ti,is,t.COLOR_ATTACHMENT0+xa,Co,0),ae(is)&&U(Co)}r.unbindTexture()}else{let xa=t.TEXTURE_2D;if((ti.isWebGL3DRenderTarget||ti.isWebGLArrayRenderTarget)&&(xa=ti.isWebGL3DRenderTarget?t.TEXTURE_3D:t.TEXTURE_2D_ARRAY),r.bindTexture(xa,Wn.__webglTexture),Er(xa,Tn),Tn.mipmaps&&Tn.mipmaps.length>0)for(let Qa=0;Qa<Tn.mipmaps.length;Qa++)Un(bi.__webglFramebuffer[Qa],ti,Tn,t.COLOR_ATTACHMENT0,xa,Qa);else Un(bi.__webglFramebuffer,ti,Tn,t.COLOR_ATTACHMENT0,xa,0);ae(Tn)&&U(xa),r.unbindTexture()}ti.depthBuffer&&Vn(ti)}function Yn(ti){const Tn=ti.textures;for(let bi=0,Wn=Tn.length;bi<Wn;bi++){const Ei=Tn[bi];if(ae(Ei)){const Ki=ve(ti),sa=n.get(Ei).__webglTexture;r.bindTexture(Ki,sa),U(Ki),r.unbindTexture()}}}const On=[],Sn=[];function bn(ti){if(ti.samples>0){if(gi(ti)===!1){const Tn=ti.textures,bi=ti.width,Wn=ti.height;let Ei=t.COLOR_BUFFER_BIT;const Ki=ti.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,sa=n.get(ti),xa=Tn.length>1;if(xa)for(let is=0;is<Tn.length;is++)r.bindFramebuffer(t.FRAMEBUFFER,sa.__webglMultisampledFramebuffer),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+is,t.RENDERBUFFER,null),r.bindFramebuffer(t.FRAMEBUFFER,sa.__webglFramebuffer),t.framebufferTexture2D(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0+is,t.TEXTURE_2D,null,0);r.bindFramebuffer(t.READ_FRAMEBUFFER,sa.__webglMultisampledFramebuffer);const Qa=ti.texture.mipmaps;Qa&&Qa.length>0?r.bindFramebuffer(t.DRAW_FRAMEBUFFER,sa.__webglFramebuffer[0]):r.bindFramebuffer(t.DRAW_FRAMEBUFFER,sa.__webglFramebuffer);for(let is=0;is<Tn.length;is++){if(ti.resolveDepthBuffer&&(ti.depthBuffer&&(Ei|=t.DEPTH_BUFFER_BIT),ti.stencilBuffer&&ti.resolveStencilBuffer&&(Ei|=t.STENCIL_BUFFER_BIT)),xa){t.framebufferRenderbuffer(t.READ_FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.RENDERBUFFER,sa.__webglColorRenderbuffer[is]);const go=n.get(Tn[is]).__webglTexture;t.framebufferTexture2D(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,go,0)}t.blitFramebuffer(0,0,bi,Wn,0,0,bi,Wn,Ei,t.NEAREST),d===!0&&(On.length=0,Sn.length=0,On.push(t.COLOR_ATTACHMENT0+is),ti.depthBuffer&&ti.resolveDepthBuffer===!1&&(On.push(Ki),Sn.push(Ki),t.invalidateFramebuffer(t.DRAW_FRAMEBUFFER,Sn)),t.invalidateFramebuffer(t.READ_FRAMEBUFFER,On))}if(r.bindFramebuffer(t.READ_FRAMEBUFFER,null),r.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),xa)for(let is=0;is<Tn.length;is++){r.bindFramebuffer(t.FRAMEBUFFER,sa.__webglMultisampledFramebuffer),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+is,t.RENDERBUFFER,sa.__webglColorRenderbuffer[is]);const go=n.get(Tn[is]).__webglTexture;r.bindFramebuffer(t.FRAMEBUFFER,sa.__webglFramebuffer),t.framebufferTexture2D(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0+is,t.TEXTURE_2D,go,0)}r.bindFramebuffer(t.DRAW_FRAMEBUFFER,sa.__webglMultisampledFramebuffer)}else if(ti.depthBuffer&&ti.resolveDepthBuffer===!1&&d){const Tn=ti.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT;t.invalidateFramebuffer(t.DRAW_FRAMEBUFFER,[Tn])}}}function Mn(ti){return Math.min(i.maxSamples,ti.samples)}function gi(ti){const Tn=n.get(ti);return ti.samples>0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&Tn.__useRenderToTexture!==!1}function Oi(ti){const Tn=o.render.frame;L.get(ti)!==Tn&&(L.set(ti,Tn),ti.update())}function Pa(ti,Tn){const bi=ti.colorSpace,Wn=ti.format,Ei=ti.type;return ti.isCompressedTexture===!0||ti.isVideoTexture===!0||bi!==KC&&bi!==yk&&(xv.getTransfer(bi)===yg?(Wn!==Rp||Ei!==e_)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",bi)),Tn}function va(ti){return typeof HTMLImageElement<"u"&&ti instanceof HTMLImageElement?(b.width=ti.naturalWidth||ti.width,b.height=ti.naturalHeight||ti.height):typeof VideoFrame<"u"&&ti instanceof VideoFrame?(b.width=ti.displayWidth,b.height=ti.displayHeight):(b.width=ti.width,b.height=ti.height),b}this.allocateTextureUnit=_t,this.resetTextureUnits=ht,this.setTexture2D=qt,this.setTexture2DArray=Lt,this.setTexture3D=dr,this.setTextureCube=Zt,this.rebindTextures=jn,this.setupRenderTarget=Lr,this.updateRenderTargetMipmap=Yn,this.updateMultisampleRenderTarget=bn,this.setupDepthRenderbuffer=Vn,this.setupFrameBufferTexture=Un,this.useMultisampledRTT=gi}function YWe(t,e){function r(n,i=yk){let a;const o=xv.getTransfer(i);if(n===e_)return t.UNSIGNED_BYTE;if(n===HX)return t.UNSIGNED_SHORT_4_4_4_4;if(n===jX)return t.UNSIGNED_SHORT_5_5_5_1;if(n===pye)return t.UNSIGNED_INT_5_9_9_9_REV;if(n===vye)return t.UNSIGNED_INT_10F_11F_11F_REV;if(n===h8)return t.BYTE;if(n===hU)return t.SHORT;if(n===NL)return t.UNSIGNED_SHORT;if(n===GP)return t.INT;if(n===q2)return t.UNSIGNED_INT;if(n===mp)return t.FLOAT;if(n===Og)return t.HALF_FLOAT;if(n===mye)return t.ALPHA;if(n===gye)return t.RGB;if(n===Rp)return t.RGBA;if(n===v8)return t.DEPTH_COMPONENT;if(n===m8)return t.DEPTH_STENCIL;if(n===Dk)return t.RED;if(n===pF)return t.RED_INTEGER;if(n===pU)return t.RG;if(n===vF)return t.RG_INTEGER;if(n===FL)return t.RGBA_INTEGER;if(n===o9||n===s9||n===l9||n===u9)if(o===yg)if(a=e.get("WEBGL_compressed_texture_s3tc_srgb"),a!==null){if(n===o9)return a.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===s9)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===l9)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===u9)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(a=e.get("WEBGL_compressed_texture_s3tc"),a!==null){if(n===o9)return a.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===s9)return a.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===l9)return a.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===u9)return a.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(n===W$||n===Y$||n===X$||n===Z$)if(a=e.get("WEBGL_compressed_texture_pvrtc"),a!==null){if(n===W$)return a.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===Y$)return a.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===X$)return a.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===Z$)return a.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(n===K$||n===J$||n===Q$)if(a=e.get("WEBGL_compressed_texture_etc"),a!==null){if(n===K$||n===J$)return o===yg?a.COMPRESSED_SRGB8_ETC2:a.COMPRESSED_RGB8_ETC2;if(n===Q$)return o===yg?a.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:a.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(n===eW||n===tW||n===rW||n===nW||n===iW||n===aW||n===oW||n===sW||n===lW||n===uW||n===cW||n===fW||n===dW||n===hW)if(a=e.get("WEBGL_compressed_texture_astc"),a!==null){if(n===eW)return o===yg?a.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:a.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===tW)return o===yg?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:a.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===rW)return o===yg?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:a.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===nW)return o===yg?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:a.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===iW)return o===yg?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:a.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===aW)return o===yg?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:a.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===oW)return o===yg?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:a.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===sW)return o===yg?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:a.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===lW)return o===yg?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:a.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===uW)return o===yg?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:a.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===cW)return o===yg?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:a.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===fW)return o===yg?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:a.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===dW)return o===yg?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:a.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===hW)return o===yg?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:a.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(n===pW||n===vW||n===mW)if(a=e.get("EXT_texture_compression_bptc"),a!==null){if(n===pW)return o===yg?a.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:a.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(n===vW)return a.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(n===mW)return a.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(n===gW||n===yW||n===bW||n===xW)if(a=e.get("EXT_texture_compression_rgtc"),a!==null){if(n===gW)return a.COMPRESSED_RED_RGTC1_EXT;if(n===yW)return a.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(n===bW)return a.COMPRESSED_RED_GREEN_RGTC2_EXT;if(n===xW)return a.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return n===p8?t.UNSIGNED_INT_24_8:t[n]!==void 0?t[n]:null}return{convert:r}}const Ztr=`
void main() {

	gl_Position = vec4( position, 1.0 );

}`,Ktr=`
uniform sampler2DArray depthColor;
uniform float depthWidth;
uniform float depthHeight;

void main() {

	vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight );

	if ( coord.x >= 1.0 ) {

		gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r;

	} else {

		gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r;

	}

}`;class Jtr{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,r){if(this.texture===null){const n=new kye(e.texture);(e.depthNear!==r.depthNear||e.depthFar!==r.depthFar)&&(this.depthNear=e.depthNear,this.depthFar=e.depthFar),this.texture=n}}getMesh(e){if(this.texture!==null&&this.mesh===null){const r=e.cameras[0].viewport,n=new eb({vertexShader:Ztr,fragmentShader:Ktr,uniforms:{depthColor:{value:this.texture},depthWidth:{value:r.z},depthHeight:{value:r.w}}});this.mesh=new hc(new j_(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class Qtr extends G5{constructor(e,r){super();const n=this;let i=null,a=1,o=null,s="local-floor",d=1,b=null,L=null,B=null,V=null,X=null,ie=null;const de=typeof XRWebGLBinding<"u",ae=new Jtr,U={},ve=r.getContextAttributes();let Se=null,Pe=null;const Me=[],Ie=[],Ve=new sl;let Ze=null;const Je=new sy;Je.viewport=new dh;const nt=new sy;nt.viewport=new dh;const ut=[Je,nt],ht=new FWe;let _t=null,Dt=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(Ir){let _n=Me[Ir];return _n===void 0&&(_n=new DG,Me[Ir]=_n),_n.getTargetRaySpace()},this.getControllerGrip=function(Ir){let _n=Me[Ir];return _n===void 0&&(_n=new DG,Me[Ir]=_n),_n.getGripSpace()},this.getHand=function(Ir){let _n=Me[Ir];return _n===void 0&&(_n=new DG,Me[Ir]=_n),_n.getHandSpace()};function qt(Ir){const _n=Ie.indexOf(Ir.inputSource);if(_n===-1)return;const Un=Me[_n];Un!==void 0&&(Un.update(Ir.inputSource,Ir.frame,b||o),Un.dispatchEvent({type:Ir.type,data:Ir.inputSource}))}function Lt(){i.removeEventListener("select",qt),i.removeEventListener("selectstart",qt),i.removeEventListener("selectend",qt),i.removeEventListener("squeeze",qt),i.removeEventListener("squeezestart",qt),i.removeEventListener("squeezeend",qt),i.removeEventListener("end",Lt),i.removeEventListener("inputsourceschange",dr);for(let Ir=0;Ir<Me.length;Ir++){const _n=Ie[Ir];_n!==null&&(Ie[Ir]=null,Me[Ir].disconnect(_n))}_t=null,Dt=null,ae.reset();for(const Ir in U)delete U[Ir];e.setRenderTarget(Se),X=null,V=null,B=null,i=null,Pe=null,Ar.stop(),n.isPresenting=!1,e.setPixelRatio(Ze),e.setSize(Ve.width,Ve.height,!1),n.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(Ir){a=Ir,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(Ir){s=Ir,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return b||o},this.setReferenceSpace=function(Ir){b=Ir},this.getBaseLayer=function(){return V!==null?V:X},this.getBinding=function(){return B===null&&de&&(B=new XRWebGLBinding(i,r)),B},this.getFrame=function(){return ie},this.getSession=function(){return i},this.setSession=async function(Ir){if(i=Ir,i!==null){if(Se=e.getRenderTarget(),i.addEventListener("select",qt),i.addEventListener("selectstart",qt),i.addEventListener("selectend",qt),i.addEventListener("squeeze",qt),i.addEventListener("squeezestart",qt),i.addEventListener("squeezeend",qt),i.addEventListener("end",Lt),i.addEventListener("inputsourceschange",dr),ve.xrCompatible!==!0&&await r.makeXRCompatible(),Ze=e.getPixelRatio(),e.getSize(Ve),de&&"createProjectionLayer"in XRWebGLBinding.prototype){let Un=null,Qn=null,Jn=null;ve.depth&&(Jn=ve.stencil?r.DEPTH24_STENCIL8:r.DEPTH_COMPONENT24,Un=ve.stencil?m8:v8,Qn=ve.stencil?p8:q2);const Vn={colorFormat:r.RGBA8,depthFormat:Jn,scaleFactor:a};B=this.getBinding(),V=B.createProjectionLayer(Vn),i.updateRenderState({layers:[V]}),e.setPixelRatio(1),e.setSize(V.textureWidth,V.textureHeight,!1),Pe=new cx(V.textureWidth,V.textureHeight,{format:Rp,type:e_,depthTexture:new Rye(V.textureWidth,V.textureHeight,Qn,void 0,void 0,void 0,void 0,void 0,void 0,Un),stencilBuffer:ve.stencil,colorSpace:e.outputColorSpace,samples:ve.antialias?4:0,resolveDepthBuffer:V.ignoreDepthValues===!1,resolveStencilBuffer:V.ignoreDepthValues===!1})}else{const Un={antialias:ve.antialias,alpha:!0,depth:ve.depth,stencil:ve.stencil,framebufferScaleFactor:a};X=new XRWebGLLayer(i,r,Un),i.updateRenderState({baseLayer:X}),e.setPixelRatio(1),e.setSize(X.framebufferWidth,X.framebufferHeight,!1),Pe=new cx(X.framebufferWidth,X.framebufferHeight,{format:Rp,type:e_,colorSpace:e.outputColorSpace,stencilBuffer:ve.stencil,resolveDepthBuffer:X.ignoreDepthValues===!1,resolveStencilBuffer:X.ignoreDepthValues===!1})}Pe.isXRRenderTarget=!0,this.setFoveation(d),b=null,o=await i.requestReferenceSpace(s),Ar.setContext(i),Ar.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(i!==null)return i.environmentBlendMode},this.getDepthTexture=function(){return ae.getDepthTexture()};function dr(Ir){for(let _n=0;_n<Ir.removed.length;_n++){const Un=Ir.removed[_n],Qn=Ie.indexOf(Un);Qn>=0&&(Ie[Qn]=null,Me[Qn].disconnect(Un))}for(let _n=0;_n<Ir.added.length;_n++){const Un=Ir.added[_n];let Qn=Ie.indexOf(Un);if(Qn===-1){for(let Vn=0;Vn<Me.length;Vn++)if(Vn>=Ie.length){Ie.push(Un),Qn=Vn;break}else if(Ie[Vn]===null){Ie[Vn]=Un,Qn=Vn;break}if(Qn===-1)break}const Jn=Me[Qn];Jn&&Jn.connect(Un)}}const Zt=new oi,Cr=new oi;function yt(Ir,_n,Un){Zt.setFromMatrixPosition(_n.matrixWorld),Cr.setFromMatrixPosition(Un.matrixWorld);const Qn=Zt.distanceTo(Cr),Jn=_n.projectionMatrix.elements,Vn=Un.projectionMatrix.elements,jn=Jn[14]/(Jn[10]-1),Lr=Jn[14]/(Jn[10]+1),Yn=(Jn[9]+1)/Jn[5],On=(Jn[9]-1)/Jn[5],Sn=(Jn[8]-1)/Jn[0],bn=(Vn[8]+1)/Vn[0],Mn=jn*Sn,gi=jn*bn,Oi=Qn/(-Sn+bn),Pa=Oi*-Sn;if(_n.matrixWorld.decompose(Ir.position,Ir.quaternion,Ir.scale),Ir.translateX(Pa),Ir.translateZ(Oi),Ir.matrixWorld.compose(Ir.position,Ir.quaternion,Ir.scale),Ir.matrixWorldInverse.copy(Ir.matrixWorld).invert(),Jn[10]===-1)Ir.projectionMatrix.copy(_n.projectionMatrix),Ir.projectionMatrixInverse.copy(_n.projectionMatrixInverse);else{const va=jn+Oi,ti=Lr+Oi,Tn=Mn-Pa,bi=gi+(Qn-Pa),Wn=Yn*Lr/ti*va,Ei=On*Lr/ti*va;Ir.projectionMatrix.makePerspective(Tn,bi,Wn,Ei,va,ti),Ir.projectionMatrixInverse.copy(Ir.projectionMatrix).invert()}}function Vt(Ir,_n){_n===null?Ir.matrixWorld.copy(Ir.matrix):Ir.matrixWorld.multiplyMatrices(_n.matrixWorld,Ir.matrix),Ir.matrixWorldInverse.copy(Ir.matrixWorld).invert()}this.updateCamera=function(Ir){if(i===null)return;let _n=Ir.near,Un=Ir.far;ae.texture!==null&&(ae.depthNear>0&&(_n=ae.depthNear),ae.depthFar>0&&(Un=ae.depthFar)),ht.near=nt.near=Je.near=_n,ht.far=nt.far=Je.far=Un,(_t!==ht.near||Dt!==ht.far)&&(i.updateRenderState({depthNear:ht.near,depthFar:ht.far}),_t=ht.near,Dt=ht.far),ht.layers.mask=Ir.layers.mask|6,Je.layers.mask=ht.layers.mask&3,nt.layers.mask=ht.layers.mask&5;const Qn=Ir.parent,Jn=ht.cameras;Vt(ht,Qn);for(let Vn=0;Vn<Jn.length;Vn++)Vt(Jn[Vn],Qn);Jn.length===2?yt(ht,Je,nt):ht.projectionMatrix.copy(Je.projectionMatrix),Er(Ir,ht,Qn)};function Er(Ir,_n,Un){Un===null?Ir.matrix.copy(_n.matrixWorld):(Ir.matrix.copy(Un.matrixWorld),Ir.matrix.invert(),Ir.matrix.multiply(_n.matrixWorld)),Ir.matrix.decompose(Ir.position,Ir.quaternion,Ir.scale),Ir.updateMatrixWorld(!0),Ir.projectionMatrix.copy(_n.projectionMatrix),Ir.projectionMatrixInverse.copy(_n.projectionMatrixInverse),Ir.isPerspectiveCamera&&(Ir.fov=y8*2*Math.atan(1/Ir.projectionMatrix.elements[5]),Ir.zoom=1)}this.getCamera=function(){return ht},this.getFoveation=function(){if(!(V===null&&X===null))return d},this.setFoveation=function(Ir){d=Ir,V!==null&&(V.fixedFoveation=Ir),X!==null&&X.fixedFoveation!==void 0&&(X.fixedFoveation=Ir)},this.hasDepthSensing=function(){return ae.texture!==null},this.getDepthSensingMesh=function(){return ae.getMesh(ht)},this.getCameraTexture=function(Ir){return U[Ir]};let sr=null;function or(Ir,_n){if(L=_n.getViewerPose(b||o),ie=_n,L!==null){const Un=L.views;X!==null&&(e.setRenderTargetFramebuffer(Pe,X.framebuffer),e.setRenderTarget(Pe));let Qn=!1;Un.length!==ht.cameras.length&&(ht.cameras.length=0,Qn=!0);for(let Lr=0;Lr<Un.length;Lr++){const Yn=Un[Lr];let On=null;if(X!==null)On=X.getViewport(Yn);else{const bn=B.getViewSubImage(V,Yn);On=bn.viewport,Lr===0&&(e.setRenderTargetTextures(Pe,bn.colorTexture,bn.depthStencilTexture),e.setRenderTarget(Pe))}let Sn=ut[Lr];Sn===void 0&&(Sn=new sy,Sn.layers.enable(Lr),Sn.viewport=new dh,ut[Lr]=Sn),Sn.matrix.fromArray(Yn.transform.matrix),Sn.matrix.decompose(Sn.position,Sn.quaternion,Sn.scale),Sn.projectionMatrix.fromArray(Yn.projectionMatrix),Sn.projectionMatrixInverse.copy(Sn.projectionMatrix).invert(),Sn.viewport.set(On.x,On.y,On.width,On.height),Lr===0&&(ht.matrix.copy(Sn.matrix),ht.matrix.decompose(ht.position,ht.quaternion,ht.scale)),Qn===!0&&ht.cameras.push(Sn)}const Jn=i.enabledFeatures;if(Jn&&Jn.includes("depth-sensing")&&i.depthUsage=="gpu-optimized"&&de){B=n.getBinding();const Lr=B.getDepthInformation(Un[0]);Lr&&Lr.isValid&&Lr.texture&&ae.init(Lr,i.renderState)}if(Jn&&Jn.includes("camera-access")&&de){e.state.unbindTexture(),B=n.getBinding();for(let Lr=0;Lr<Un.length;Lr++){const Yn=Un[Lr].camera;if(Yn){let On=U[Yn];On||(On=new kye,U[Yn]=On);const Sn=B.getCameraImage(Yn);On.sourceTexture=Sn}}}}for(let Un=0;Un<Me.length;Un++){const Qn=Ie[Un],Jn=Me[Un];Qn!==null&&Jn!==void 0&&Jn.update(Qn,_n,b||o)}sr&&sr(Ir,_n),_n.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:_n}),ie=null}const Ar=new VWe;Ar.setAnimationLoop(or),this.setAnimationLoop=function(Ir){sr=Ir},this.dispose=function(){}}}const MD=new $2,err=new Rc;function trr(t,e){function r(ae,U){ae.matrixAutoUpdate===!0&&ae.updateMatrix(),U.value.copy(ae.matrix)}function n(ae,U){U.color.getRGB(ae.fogColor.value,$$e(t)),U.isFog?(ae.fogNear.value=U.near,ae.fogFar.value=U.far):U.isFogExp2&&(ae.fogDensity.value=U.density)}function i(ae,U,ve,Se,Pe){U.isMeshBasicMaterial||U.isMeshLambertMaterial?a(ae,U):U.isMeshToonMaterial?(a(ae,U),B(ae,U)):U.isMeshPhongMaterial?(a(ae,U),L(ae,U)):U.isMeshStandardMaterial?(a(ae,U),V(ae,U),U.isMeshPhysicalMaterial&&X(ae,U,Pe)):U.isMeshMatcapMaterial?(a(ae,U),ie(ae,U)):U.isMeshDepthMaterial?a(ae,U):U.isMeshDistanceMaterial?(a(ae,U),de(ae,U)):U.isMeshNormalMaterial?a(ae,U):U.isLineBasicMaterial?(o(ae,U),U.isLineDashedMaterial&&s(ae,U)):U.isPointsMaterial?d(ae,U,ve,Se):U.isSpriteMaterial?b(ae,U):U.isShadowMaterial?(ae.color.value.copy(U.color),ae.opacity.value=U.opacity):U.isShaderMaterial&&(U.uniformsNeedUpdate=!1)}function a(ae,U){ae.opacity.value=U.opacity,U.color&&ae.diffuse.value.copy(U.color),U.emissive&&ae.emissive.value.copy(U.emissive).multiplyScalar(U.emissiveIntensity),U.map&&(ae.map.value=U.map,r(U.map,ae.mapTransform)),U.alphaMap&&(ae.alphaMap.value=U.alphaMap,r(U.alphaMap,ae.alphaMapTransform)),U.bumpMap&&(ae.bumpMap.value=U.bumpMap,r(U.bumpMap,ae.bumpMapTransform),ae.bumpScale.value=U.bumpScale,U.side===x1&&(ae.bumpScale.value*=-1)),U.normalMap&&(ae.normalMap.value=U.normalMap,r(U.normalMap,ae.normalMapTransform),ae.normalScale.value.copy(U.normalScale),U.side===x1&&ae.normalScale.value.negate()),U.displacementMap&&(ae.displacementMap.value=U.displacementMap,r(U.displacementMap,ae.displacementMapTransform),ae.displacementScale.value=U.displacementScale,ae.displacementBias.value=U.displacementBias),U.emissiveMap&&(ae.emissiveMap.value=U.emissiveMap,r(U.emissiveMap,ae.emissiveMapTransform)),U.specularMap&&(ae.specularMap.value=U.specularMap,r(U.specularMap,ae.specularMapTransform)),U.alphaTest>0&&(ae.alphaTest.value=U.alphaTest);const ve=e.get(U),Se=ve.envMap,Pe=ve.envMapRotation;Se&&(ae.envMap.value=Se,MD.copy(Pe),MD.x*=-1,MD.y*=-1,MD.z*=-1,Se.isCubeTexture&&Se.isRenderTargetTexture===!1&&(MD.y*=-1,MD.z*=-1),ae.envMapRotation.value.setFromMatrix4(err.makeRotationFromEuler(MD)),ae.flipEnvMap.value=Se.isCubeTexture&&Se.isRenderTargetTexture===!1?-1:1,ae.reflectivity.value=U.reflectivity,ae.ior.value=U.ior,ae.refractionRatio.value=U.refractionRatio),U.lightMap&&(ae.lightMap.value=U.lightMap,ae.lightMapIntensity.value=U.lightMapIntensity,r(U.lightMap,ae.lightMapTransform)),U.aoMap&&(ae.aoMap.value=U.aoMap,ae.aoMapIntensity.value=U.aoMapIntensity,r(U.aoMap,ae.aoMapTransform))}function o(ae,U){ae.diffuse.value.copy(U.color),ae.opacity.value=U.opacity,U.map&&(ae.map.value=U.map,r(U.map,ae.mapTransform))}function s(ae,U){ae.dashSize.value=U.dashSize,ae.totalSize.value=U.dashSize+U.gapSize,ae.scale.value=U.scale}function d(ae,U,ve,Se){ae.diffuse.value.copy(U.color),ae.opacity.value=U.opacity,ae.size.value=U.size*ve,ae.scale.value=Se*.5,U.map&&(ae.map.value=U.map,r(U.map,ae.uvTransform)),U.alphaMap&&(ae.alphaMap.value=U.alphaMap,r(U.alphaMap,ae.alphaMapTransform)),U.alphaTest>0&&(ae.alphaTest.value=U.alphaTest)}function b(ae,U){ae.diffuse.value.copy(U.color),ae.opacity.value=U.opacity,ae.rotation.value=U.rotation,U.map&&(ae.map.value=U.map,r(U.map,ae.mapTransform)),U.alphaMap&&(ae.alphaMap.value=U.alphaMap,r(U.alphaMap,ae.alphaMapTransform)),U.alphaTest>0&&(ae.alphaTest.value=U.alphaTest)}function L(ae,U){ae.specular.value.copy(U.specular),ae.shininess.value=Math.max(U.shininess,1e-4)}function B(ae,U){U.gradientMap&&(ae.gradientMap.value=U.gradientMap)}function V(ae,U){ae.metalness.value=U.metalness,U.metalnessMap&&(ae.metalnessMap.value=U.metalnessMap,r(U.metalnessMap,ae.metalnessMapTransform)),ae.roughness.value=U.roughness,U.roughnessMap&&(ae.roughnessMap.value=U.roughnessMap,r(U.roughnessMap,ae.roughnessMapTransform)),U.envMap&&(ae.envMapIntensity.value=U.envMapIntensity)}function X(ae,U,ve){ae.ior.value=U.ior,U.sheen>0&&(ae.sheenColor.value.copy(U.sheenColor).multiplyScalar(U.sheen),ae.sheenRoughness.value=U.sheenRoughness,U.sheenColorMap&&(ae.sheenColorMap.value=U.sheenColorMap,r(U.sheenColorMap,ae.sheenColorMapTransform)),U.sheenRoughnessMap&&(ae.sheenRoughnessMap.value=U.sheenRoughnessMap,r(U.sheenRoughnessMap,ae.sheenRoughnessMapTransform))),U.clearcoat>0&&(ae.clearcoat.value=U.clearcoat,ae.clearcoatRoughness.value=U.clearcoatRoughness,U.clearcoatMap&&(ae.clearcoatMap.value=U.clearcoatMap,r(U.clearcoatMap,ae.clearcoatMapTransform)),U.clearcoatRoughnessMap&&(ae.clearcoatRoughnessMap.value=U.clearcoatRoughnessMap,r(U.clearcoatRoughnessMap,ae.clearcoatRoughnessMapTransform)),U.clearcoatNormalMap&&(ae.clearcoatNormalMap.value=U.clearcoatNormalMap,r(U.clearcoatNormalMap,ae.clearcoatNormalMapTransform),ae.clearcoatNormalScale.value.copy(U.clearcoatNormalScale),U.side===x1&&ae.clearcoatNormalScale.value.negate())),U.dispersion>0&&(ae.dispersion.value=U.dispersion),U.iridescence>0&&(ae.iridescence.value=U.iridescence,ae.iridescenceIOR.value=U.iridescenceIOR,ae.iridescenceThicknessMinimum.value=U.iridescenceThicknessRange[0],ae.iridescenceThicknessMaximum.value=U.iridescenceThicknessRange[1],U.iridescenceMap&&(ae.iridescenceMap.value=U.iridescenceMap,r(U.iridescenceMap,ae.iridescenceMapTransform)),U.iridescenceThicknessMap&&(ae.iridescenceThicknessMap.value=U.iridescenceThicknessMap,r(U.iridescenceThicknessMap,ae.iridescenceThicknessMapTransform))),U.transmission>0&&(ae.transmission.value=U.transmission,ae.transmissionSamplerMap.value=ve.texture,ae.transmissionSamplerSize.value.set(ve.width,ve.height),U.transmissionMap&&(ae.transmissionMap.value=U.transmissionMap,r(U.transmissionMap,ae.transmissionMapTransform)),ae.thickness.value=U.thickness,U.thicknessMap&&(ae.thicknessMap.value=U.thicknessMap,r(U.thicknessMap,ae.thicknessMapTransform)),ae.attenuationDistance.value=U.attenuationDistance,ae.attenuationColor.value.copy(U.attenuationColor)),U.anisotropy>0&&(ae.anisotropyVector.value.set(U.anisotropy*Math.cos(U.anisotropyRotation),U.anisotropy*Math.sin(U.anisotropyRotation)),U.anisotropyMap&&(ae.anisotropyMap.value=U.anisotropyMap,r(U.anisotropyMap,ae.anisotropyMapTransform))),ae.specularIntensity.value=U.specularIntensity,ae.specularColor.value.copy(U.specularColor),U.specularColorMap&&(ae.specularColorMap.value=U.specularColorMap,r(U.specularColorMap,ae.specularColorMapTransform)),U.specularIntensityMap&&(ae.specularIntensityMap.value=U.specularIntensityMap,r(U.specularIntensityMap,ae.specularIntensityMapTransform))}function ie(ae,U){U.matcap&&(ae.matcap.value=U.matcap)}function de(ae,U){const ve=e.get(U).light;ae.referencePosition.value.setFromMatrixPosition(ve.matrixWorld),ae.nearDistance.value=ve.shadow.camera.near,ae.farDistance.value=ve.shadow.camera.far}return{refreshFogUniforms:n,refreshMaterialUniforms:i}}function rrr(t,e,r,n){let i={},a={},o=[];const s=t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS);function d(ve,Se){const Pe=Se.program;n.uniformBlockBinding(ve,Pe)}function b(ve,Se){let Pe=i[ve.id];Pe===void 0&&(ie(ve),Pe=L(ve),i[ve.id]=Pe,ve.addEventListener("dispose",ae));const Me=Se.program;n.updateUBOMapping(ve,Me);const Ie=e.render.frame;a[ve.id]!==Ie&&(V(ve),a[ve.id]=Ie)}function L(ve){const Se=B();ve.__bindingPointIndex=Se;const Pe=t.createBuffer(),Me=ve.__size,Ie=ve.usage;return t.bindBuffer(t.UNIFORM_BUFFER,Pe),t.bufferData(t.UNIFORM_BUFFER,Me,Ie),t.bindBuffer(t.UNIFORM_BUFFER,null),t.bindBufferBase(t.UNIFORM_BUFFER,Se,Pe),Pe}function B(){for(let ve=0;ve<s;ve++)if(o.indexOf(ve)===-1)return o.push(ve),ve;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function V(ve){const Se=i[ve.id],Pe=ve.uniforms,Me=ve.__cache;t.bindBuffer(t.UNIFORM_BUFFER,Se);for(let Ie=0,Ve=Pe.length;Ie<Ve;Ie++){const Ze=Array.isArray(Pe[Ie])?Pe[Ie]:[Pe[Ie]];for(let Je=0,nt=Ze.length;Je<nt;Je++){const ut=Ze[Je];if(X(ut,Ie,Je,Me)===!0){const ht=ut.__offset,_t=Array.isArray(ut.value)?ut.value:[ut.value];let Dt=0;for(let qt=0;qt<_t.length;qt++){const Lt=_t[qt],dr=de(Lt);typeof Lt=="number"||typeof Lt=="boolean"?(ut.__data[0]=Lt,t.bufferSubData(t.UNIFORM_BUFFER,ht+Dt,ut.__data)):Lt.isMatrix3?(ut.__data[0]=Lt.elements[0],ut.__data[1]=Lt.elements[1],ut.__data[2]=Lt.elements[2],ut.__data[3]=0,ut.__data[4]=Lt.elements[3],ut.__data[5]=Lt.elements[4],ut.__data[6]=Lt.elements[5],ut.__data[7]=0,ut.__data[8]=Lt.elements[6],ut.__data[9]=Lt.elements[7],ut.__data[10]=Lt.elements[8],ut.__data[11]=0):(Lt.toArray(ut.__data,Dt),Dt+=dr.storage/Float32Array.BYTES_PER_ELEMENT)}t.bufferSubData(t.UNIFORM_BUFFER,ht,ut.__data)}}}t.bindBuffer(t.UNIFORM_BUFFER,null)}function X(ve,Se,Pe,Me){const Ie=ve.value,Ve=Se+"_"+Pe;if(Me[Ve]===void 0)return typeof Ie=="number"||typeof Ie=="boolean"?Me[Ve]=Ie:Me[Ve]=Ie.clone(),!0;{const Ze=Me[Ve];if(typeof Ie=="number"||typeof Ie=="boolean"){if(Ze!==Ie)return Me[Ve]=Ie,!0}else if(Ze.equals(Ie)===!1)return Ze.copy(Ie),!0}return!1}function ie(ve){const Se=ve.uniforms;let Pe=0;const Me=16;for(let Ve=0,Ze=Se.length;Ve<Ze;Ve++){const Je=Array.isArray(Se[Ve])?Se[Ve]:[Se[Ve]];for(let nt=0,ut=Je.length;nt<ut;nt++){const ht=Je[nt],_t=Array.isArray(ht.value)?ht.value:[ht.value];for(let Dt=0,qt=_t.length;Dt<qt;Dt++){const Lt=_t[Dt],dr=de(Lt),Zt=Pe%Me,Cr=Zt%dr.boundary,yt=Zt+Cr;Pe+=Cr,yt!==0&&Me-yt<dr.storage&&(Pe+=Me-yt),ht.__data=new Float32Array(dr.storage/Float32Array.BYTES_PER_ELEMENT),ht.__offset=Pe,Pe+=dr.storage}}}const Ie=Pe%Me;return Ie>0&&(Pe+=Me-Ie),ve.__size=Pe,ve.__cache={},this}function de(ve){const Se={boundary:0,storage:0};return typeof ve=="number"||typeof ve=="boolean"?(Se.boundary=4,Se.storage=4):ve.isVector2?(Se.boundary=8,Se.storage=8):ve.isVector3||ve.isColor?(Se.boundary=16,Se.storage=12):ve.isVector4?(Se.boundary=16,Se.storage=16):ve.isMatrix3?(Se.boundary=48,Se.storage=48):ve.isMatrix4?(Se.boundary=64,Se.storage=64):ve.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",ve),Se}function ae(ve){const Se=ve.target;Se.removeEventListener("dispose",ae);const Pe=o.indexOf(Se.__bindingPointIndex);o.splice(Pe,1),t.deleteBuffer(i[Se.id]),delete i[Se.id],delete a[Se.id]}function U(){for(const ve in i)t.deleteBuffer(i[ve]);o=[],i={},a={}}return{bind:d,update:b,dispose:U}}class Qye{constructor(e={}){const{canvas:r=j$e(),context:n=null,depth:i=!0,stencil:a=!1,alpha:o=!1,antialias:s=!1,premultipliedAlpha:d=!0,preserveDrawingBuffer:b=!1,powerPreference:L="default",failIfMajorPerformanceCaveat:B=!1,reversedDepthBuffer:V=!1}=e;this.isWebGLRenderer=!0;let X;if(n!==null){if(typeof WebGLRenderingContext<"u"&&n instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");X=n.getContextAttributes().alpha}else X=o;const ie=new Uint32Array(4),de=new Int32Array(4);let ae=null,U=null;const ve=[],Se=[];this.domElement=r,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.toneMapping=jC,this.toneMappingExposure=1,this.transmissionResolutionScale=1;const Pe=this;let Me=!1;this._outputColorSpace=H_;let Ie=0,Ve=0,Ze=null,Je=-1,nt=null;const ut=new dh,ht=new dh;let _t=null;const Dt=new Wu(0);let qt=0,Lt=r.width,dr=r.height,Zt=1,Cr=null,yt=null;const Vt=new dh(0,0,Lt,dr),Er=new dh(0,0,Lt,dr);let sr=!1;const or=new gF;let Ar=!1,Ir=!1;const _n=new Rc,Un=new oi,Qn=new dh,Jn={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let Vn=!1;function jn(){return Ze===null?Zt:1}let Lr=n;function Yn(Dn,ea){return r.getContext(Dn,ea)}try{const Dn={alpha:!0,depth:i,stencil:a,antialias:s,premultipliedAlpha:d,preserveDrawingBuffer:b,powerPreference:L,failIfMajorPerformanceCaveat:B};if("setAttribute"in r&&r.setAttribute("data-engine",`three.js r${dF}`),r.addEventListener("webglcontextlost",Ys,!1),r.addEventListener("webglcontextrestored",$s,!1),r.addEventListener("webglcontextcreationerror",Gs,!1),Lr===null){const ea="webgl2";if(Lr=Yn(ea,Dn),Lr===null)throw Yn(ea)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(Dn){throw console.error("THREE.WebGLRenderer: "+Dn.message),Dn}let On,Sn,bn,Mn,gi,Oi,Pa,va,ti,Tn,bi,Wn,Ei,Ki,sa,xa,Qa,is,go,Co,Ko,Zi,za,Ss;function ba(){On=new per(Lr),On.init(),Zi=new YWe(Lr,On),Sn=new ser(Lr,On,e,Zi),bn=new Ytr(Lr,On),Sn.reversedDepthBuffer&&V&&bn.buffers.depth.setReversed(!0),Mn=new ger(Lr),gi=new Otr,Oi=new Xtr(Lr,On,bn,gi,Sn,Zi,Mn),Pa=new uer(Pe),va=new her(Pe),ti=new SKt(Lr),za=new aer(Lr,ti),Tn=new ver(Lr,ti,Mn,za),bi=new ber(Lr,Tn,ti,Mn),go=new yer(Lr,Sn,Oi),xa=new ler(gi),Wn=new Ltr(Pe,Pa,va,On,Sn,za,xa),Ei=new trr(Pe,gi),Ki=new Ftr,sa=new Vtr(On),is=new ier(Pe,Pa,va,bn,bi,X,d),Qa=new $tr(Pe,bi,Sn),Ss=new rrr(Lr,Mn,Sn,bn),Co=new oer(Lr,On,Mn),Ko=new mer(Lr,On,Mn),Mn.programs=Wn.programs,Pe.capabilities=Sn,Pe.extensions=On,Pe.properties=gi,Pe.renderLists=Ki,Pe.shadowMap=Qa,Pe.state=bn,Pe.info=Mn}ba();const po=new Qtr(Pe,Lr);this.xr=po,this.getContext=function(){return Lr},this.getContextAttributes=function(){return Lr.getContextAttributes()},this.forceContextLoss=function(){const Dn=On.get("WEBGL_lose_context");Dn&&Dn.loseContext()},this.forceContextRestore=function(){const Dn=On.get("WEBGL_lose_context");Dn&&Dn.restoreContext()},this.getPixelRatio=function(){return Zt},this.setPixelRatio=function(Dn){Dn!==void 0&&(Zt=Dn,this.setSize(Lt,dr,!1))},this.getSize=function(Dn){return Dn.set(Lt,dr)},this.setSize=function(Dn,ea,pa=!0){if(po.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}Lt=Dn,dr=ea,r.width=Math.floor(Dn*Zt),r.height=Math.floor(ea*Zt),pa===!0&&(r.style.width=Dn+"px",r.style.height=ea+"px"),this.setViewport(0,0,Dn,ea)},this.getDrawingBufferSize=function(Dn){return Dn.set(Lt*Zt,dr*Zt).floor()},this.setDrawingBufferSize=function(Dn,ea,pa){Lt=Dn,dr=ea,Zt=pa,r.width=Math.floor(Dn*pa),r.height=Math.floor(ea*pa),this.setViewport(0,0,Dn,ea)},this.getCurrentViewport=function(Dn){return Dn.copy(ut)},this.getViewport=function(Dn){return Dn.copy(Vt)},this.setViewport=function(Dn,ea,pa,ja){Dn.isVector4?Vt.set(Dn.x,Dn.y,Dn.z,Dn.w):Vt.set(Dn,ea,pa,ja),bn.viewport(ut.copy(Vt).multiplyScalar(Zt).round())},this.getScissor=function(Dn){return Dn.copy(Er)},this.setScissor=function(Dn,ea,pa,ja){Dn.isVector4?Er.set(Dn.x,Dn.y,Dn.z,Dn.w):Er.set(Dn,ea,pa,ja),bn.scissor(ht.copy(Er).multiplyScalar(Zt).round())},this.getScissorTest=function(){return sr},this.setScissorTest=function(Dn){bn.setScissorTest(sr=Dn)},this.setOpaqueSort=function(Dn){Cr=Dn},this.setTransparentSort=function(Dn){yt=Dn},this.getClearColor=function(Dn){return Dn.copy(is.getClearColor())},this.setClearColor=function(){is.setClearColor(...arguments)},this.getClearAlpha=function(){return is.getClearAlpha()},this.setClearAlpha=function(){is.setClearAlpha(...arguments)},this.clear=function(Dn=!0,ea=!0,pa=!0){let ja=0;if(Dn){let _a=!1;if(Ze!==null){const Zs=Ze.texture.format;_a=Zs===FL||Zs===vF||Zs===pF}if(_a){const Zs=Ze.texture.type,ks=Zs===e_||Zs===q2||Zs===NL||Zs===p8||Zs===HX||Zs===jX,el=is.getClearColor(),ol=is.getClearAlpha(),tl=el.r,il=el.g,Gl=el.b;ks?(ie[0]=tl,ie[1]=il,ie[2]=Gl,ie[3]=ol,Lr.clearBufferuiv(Lr.COLOR,0,ie)):(de[0]=tl,de[1]=il,de[2]=Gl,de[3]=ol,Lr.clearBufferiv(Lr.COLOR,0,de))}else ja|=Lr.COLOR_BUFFER_BIT}ea&&(ja|=Lr.DEPTH_BUFFER_BIT),pa&&(ja|=Lr.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),Lr.clear(ja)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){r.removeEventListener("webglcontextlost",Ys,!1),r.removeEventListener("webglcontextrestored",$s,!1),r.removeEventListener("webglcontextcreationerror",Gs,!1),is.dispose(),Ki.dispose(),sa.dispose(),gi.dispose(),Pa.dispose(),va.dispose(),bi.dispose(),za.dispose(),Ss.dispose(),Wn.dispose(),po.dispose(),po.removeEventListener("sessionstart",Xa),po.removeEventListener("sessionend",Oo),_s.stop()};function Ys(Dn){Dn.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),Me=!0}function $s(){console.log("THREE.WebGLRenderer: Context Restored."),Me=!1;const Dn=Mn.autoReset,ea=Qa.enabled,pa=Qa.autoUpdate,ja=Qa.needsUpdate,_a=Qa.type;ba(),Mn.autoReset=Dn,Qa.enabled=ea,Qa.autoUpdate=pa,Qa.needsUpdate=ja,Qa.type=_a}function Gs(Dn){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",Dn.statusMessage)}function Ns(Dn){const ea=Dn.target;ea.removeEventListener("dispose",Ns),Hl(ea)}function Hl(Dn){nu(Dn),gi.remove(Dn)}function nu(Dn){const ea=gi.get(Dn).programs;ea!==void 0&&(ea.forEach(function(pa){Wn.releaseProgram(pa)}),Dn.isShaderMaterial&&Wn.releaseShaderCache(Dn))}this.renderBufferDirect=function(Dn,ea,pa,ja,_a,Zs){ea===null&&(ea=Jn);const ks=_a.isMesh&&_a.matrixWorld.determinant()<0,el=Ni(Dn,ea,pa,ja,_a);bn.setMaterial(ja,ks);let ol=pa.index,tl=1;if(ja.wireframe===!0){if(ol=Tn.getWireframeAttribute(pa),ol===void 0)return;tl=2}const il=pa.drawRange,Gl=pa.attributes.position;let Qu=il.start*tl,ic=(il.start+il.count)*tl;Zs!==null&&(Qu=Math.max(Qu,Zs.start*tl),ic=Math.min(ic,(Zs.start+Zs.count)*tl)),ol!==null?(Qu=Math.max(Qu,0),ic=Math.min(ic,ol.count)):Gl!=null&&(Qu=Math.max(Qu,0),ic=Math.min(ic,Gl.count));const rf=ic-Qu;if(rf<0||rf===1/0)return;za.setup(_a,ja,el,pa,ol);let Sd,yc=Co;if(ol!==null&&(Sd=ti.get(ol),yc=Ko,yc.setIndex(Sd)),_a.isMesh)ja.wireframe===!0?(bn.setLineWidth(ja.wireframeLinewidth*jn()),yc.setMode(Lr.LINES)):yc.setMode(Lr.TRIANGLES);else if(_a.isLine){let ii=ja.linewidth;ii===void 0&&(ii=1),bn.setLineWidth(ii*jn()),_a.isLineSegments?yc.setMode(Lr.LINES):_a.isLineLoop?yc.setMode(Lr.LINE_LOOP):yc.setMode(Lr.LINE_STRIP)}else _a.isPoints?yc.setMode(Lr.POINTS):_a.isSprite&&yc.setMode(Lr.TRIANGLES);if(_a.isBatchedMesh)if(_a._multiDrawInstances!==null)tB("THREE.WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."),yc.renderMultiDrawInstances(_a._multiDrawStarts,_a._multiDrawCounts,_a._multiDrawCount,_a._multiDrawInstances);else if(On.get("WEBGL_multi_draw"))yc.renderMultiDraw(_a._multiDrawStarts,_a._multiDrawCounts,_a._multiDrawCount);else{const ii=_a._multiDrawStarts,xh=_a._multiDrawCounts,pd=_a._multiDrawCount,Ip=ol?ti.get(ol).bytesPerElement:1,jf=gi.get(ja).currentProgram.getUniforms();for(let ih=0;ih<pd;ih++)jf.setValue(Lr,"_gl_DrawID",ih),yc.render(ii[ih]/Ip,xh[ih])}else if(_a.isInstancedMesh)yc.renderInstances(Qu,rf,_a.count);else if(pa.isInstancedBufferGeometry){const ii=pa._maxInstanceCount!==void 0?pa._maxInstanceCount:1/0,xh=Math.min(pa.instanceCount,ii);yc.renderInstances(Qu,rf,xh)}else yc.render(Qu,rf)};function su(Dn,ea,pa){Dn.transparent===!0&&Dn.side===Zx&&Dn.forceSinglePass===!1?(Dn.side=x1,Dn.needsUpdate=!0,Js(Dn,ea,pa),Dn.side=dx,Dn.needsUpdate=!0,Js(Dn,ea,pa),Dn.side=Zx):Js(Dn,ea,pa)}this.compile=function(Dn,ea,pa=null){pa===null&&(pa=Dn),U=sa.get(pa),U.init(ea),Se.push(U),pa.traverseVisible(function(_a){_a.isLight&&_a.layers.test(ea.layers)&&(U.pushLight(_a),_a.castShadow&&U.pushShadow(_a))}),Dn!==pa&&Dn.traverseVisible(function(_a){_a.isLight&&_a.layers.test(ea.layers)&&(U.pushLight(_a),_a.castShadow&&U.pushShadow(_a))}),U.setupLights();const ja=new Set;return Dn.traverse(function(_a){if(!(_a.isMesh||_a.isPoints||_a.isLine||_a.isSprite))return;const Zs=_a.material;if(Zs)if(Array.isArray(Zs))for(let ks=0;ks<Zs.length;ks++){const el=Zs[ks];su(el,pa,_a),ja.add(el)}else su(Zs,pa,_a),ja.add(Zs)}),U=Se.pop(),ja},this.compileAsync=function(Dn,ea,pa=null){const ja=this.compile(Dn,ea,pa);return new Promise(_a=>{function Zs(){if(ja.forEach(function(ks){gi.get(ks).currentProgram.isReady()&&ja.delete(ks)}),ja.size===0){_a(Dn);return}setTimeout(Zs,10)}On.get("KHR_parallel_shader_compile")!==null?Zs():setTimeout(Zs,10)})};let Mc=null;function da(Dn){Mc&&Mc(Dn)}function Xa(){_s.stop()}function Oo(){_s.start()}const _s=new VWe;_s.setAnimationLoop(da),typeof self<"u"&&_s.setContext(self),this.setAnimationLoop=function(Dn){Mc=Dn,po.setAnimationLoop(Dn),Dn===null?_s.stop():_s.start()},po.addEventListener("sessionstart",Xa),po.addEventListener("sessionend",Oo),this.render=function(Dn,ea){if(ea!==void 0&&ea.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(Me===!0)return;if(Dn.matrixWorldAutoUpdate===!0&&Dn.updateMatrixWorld(),ea.parent===null&&ea.matrixWorldAutoUpdate===!0&&ea.updateMatrixWorld(),po.enabled===!0&&po.isPresenting===!0&&(po.cameraAutoUpdate===!0&&po.updateCamera(ea),ea=po.getCamera()),Dn.isScene===!0&&Dn.onBeforeRender(Pe,Dn,ea,Ze),U=sa.get(Dn,Se.length),U.init(ea),Se.push(U),_n.multiplyMatrices(ea.projectionMatrix,ea.matrixWorldInverse),or.setFromProjectionMatrix(_n,tE,ea.reversedDepth),Ir=this.localClippingEnabled,Ar=xa.init(this.clippingPlanes,Ir),ae=Ki.get(Dn,ve.length),ae.init(),ve.push(ae),po.enabled===!0&&po.isPresenting===!0){const Zs=Pe.xr.getDepthSensingMesh();Zs!==null&&nl(Zs,ea,-1/0,Pe.sortObjects)}nl(Dn,ea,0,Pe.sortObjects),ae.finish(),Pe.sortObjects===!0&&ae.sort(Cr,yt),Vn=po.enabled===!1||po.isPresenting===!1||po.hasDepthSensing()===!1,Vn&&is.addToRenderList(ae,Dn),this.info.render.frame++,Ar===!0&&xa.beginShadows();const pa=U.state.shadowsArray;Qa.render(pa,Dn,ea),Ar===!0&&xa.endShadows(),this.info.autoReset===!0&&this.info.reset();const ja=ae.opaque,_a=ae.transmissive;if(U.setupLights(),ea.isArrayCamera){const Zs=ea.cameras;if(_a.length>0)for(let ks=0,el=Zs.length;ks<el;ks++){const ol=Zs[ks];zl(ja,_a,Dn,ol)}Vn&&is.render(Dn);for(let ks=0,el=Zs.length;ks<el;ks++){const ol=Zs[ks];vu(ae,Dn,ol,ol.viewport)}}else _a.length>0&&zl(ja,_a,Dn,ea),Vn&&is.render(Dn),vu(ae,Dn,ea);Ze!==null&&Ve===0&&(Oi.updateMultisampleRenderTarget(Ze),Oi.updateRenderTargetMipmap(Ze)),Dn.isScene===!0&&Dn.onAfterRender(Pe,Dn,ea),za.resetDefaultState(),Je=-1,nt=null,Se.pop(),Se.length>0?(U=Se[Se.length-1],Ar===!0&&xa.setGlobalState(Pe.clippingPlanes,U.state.camera)):U=null,ve.pop(),ve.length>0?ae=ve[ve.length-1]:ae=null};function nl(Dn,ea,pa,ja){if(Dn.visible===!1)return;if(Dn.layers.test(ea.layers)){if(Dn.isGroup)pa=Dn.renderOrder;else if(Dn.isLOD)Dn.autoUpdate===!0&&Dn.update(ea);else if(Dn.isLight)U.pushLight(Dn),Dn.castShadow&&U.pushShadow(Dn);else if(Dn.isSprite){if(!Dn.frustumCulled||or.intersectsSprite(Dn)){ja&&Qn.setFromMatrixPosition(Dn.matrixWorld).applyMatrix4(_n);const ks=bi.update(Dn),el=Dn.material;el.visible&&ae.push(Dn,ks,el,pa,Qn.z,null)}}else if((Dn.isMesh||Dn.isLine||Dn.isPoints)&&(!Dn.frustumCulled||or.intersectsObject(Dn))){const ks=bi.update(Dn),el=Dn.material;if(ja&&(Dn.boundingSphere!==void 0?(Dn.boundingSphere===null&&Dn.computeBoundingSphere(),Qn.copy(Dn.boundingSphere.center)):(ks.boundingSphere===null&&ks.computeBoundingSphere(),Qn.copy(ks.boundingSphere.center)),Qn.applyMatrix4(Dn.matrixWorld).applyMatrix4(_n)),Array.isArray(el)){const ol=ks.groups;for(let tl=0,il=ol.length;tl<il;tl++){const Gl=ol[tl],Qu=el[Gl.materialIndex];Qu&&Qu.visible&&ae.push(Dn,ks,Qu,pa,Qn.z,Gl)}}else el.visible&&ae.push(Dn,ks,el,pa,Qn.z,null)}}const Zs=Dn.children;for(let ks=0,el=Zs.length;ks<el;ks++)nl(Zs[ks],ea,pa,ja)}function vu(Dn,ea,pa,ja){const _a=Dn.opaque,Zs=Dn.transmissive,ks=Dn.transparent;U.setupLightsView(pa),Ar===!0&&xa.setGlobalState(Pe.clippingPlanes,pa),ja&&bn.viewport(ut.copy(ja)),_a.length>0&&jl(_a,ea,pa),Zs.length>0&&jl(Zs,ea,pa),ks.length>0&&jl(ks,ea,pa),bn.buffers.depth.setTest(!0),bn.buffers.depth.setMask(!0),bn.buffers.color.setMask(!0),bn.setPolygonOffset(!1)}function zl(Dn,ea,pa,ja){if((pa.isScene===!0?pa.overrideMaterial:null)!==null)return;U.state.transmissionRenderTarget[ja.id]===void 0&&(U.state.transmissionRenderTarget[ja.id]=new cx(1,1,{generateMipmaps:!0,type:On.has("EXT_color_buffer_half_float")||On.has("EXT_color_buffer_float")?Og:e_,minFilter:E5,samples:4,stencilBuffer:a,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:xv.workingColorSpace}));const Zs=U.state.transmissionRenderTarget[ja.id],ks=ja.viewport||ut;Zs.setSize(ks.z*Pe.transmissionResolutionScale,ks.w*Pe.transmissionResolutionScale);const el=Pe.getRenderTarget(),ol=Pe.getActiveCubeFace(),tl=Pe.getActiveMipmapLevel();Pe.setRenderTarget(Zs),Pe.getClearColor(Dt),qt=Pe.getClearAlpha(),qt<1&&Pe.setClearColor(16777215,.5),Pe.clear(),Vn&&is.render(pa);const il=Pe.toneMapping;Pe.toneMapping=jC;const Gl=ja.viewport;if(ja.viewport!==void 0&&(ja.viewport=void 0),U.setupLightsView(ja),Ar===!0&&xa.setGlobalState(Pe.clippingPlanes,ja),jl(Dn,pa,ja),Oi.updateMultisampleRenderTarget(Zs),Oi.updateRenderTargetMipmap(Zs),On.has("WEBGL_multisampled_render_to_texture")===!1){let Qu=!1;for(let ic=0,rf=ea.length;ic<rf;ic++){const Sd=ea[ic],yc=Sd.object,ii=Sd.geometry,xh=Sd.material,pd=Sd.group;if(xh.side===Zx&&yc.layers.test(ja.layers)){const Ip=xh.side;xh.side=x1,xh.needsUpdate=!0,Il(yc,pa,ja,ii,xh,pd),xh.side=Ip,xh.needsUpdate=!0,Qu=!0}}Qu===!0&&(Oi.updateMultisampleRenderTarget(Zs),Oi.updateRenderTargetMipmap(Zs))}Pe.setRenderTarget(el,ol,tl),Pe.setClearColor(Dt,qt),Gl!==void 0&&(ja.viewport=Gl),Pe.toneMapping=il}function jl(Dn,ea,pa){const ja=ea.isScene===!0?ea.overrideMaterial:null;for(let _a=0,Zs=Dn.length;_a<Zs;_a++){const ks=Dn[_a],el=ks.object,ol=ks.geometry,tl=ks.group;let il=ks.material;il.allowOverride===!0&&ja!==null&&(il=ja),el.layers.test(pa.layers)&&Il(el,ea,pa,ol,il,tl)}}function Il(Dn,ea,pa,ja,_a,Zs){Dn.onBeforeRender(Pe,ea,pa,ja,_a,Zs),Dn.modelViewMatrix.multiplyMatrices(pa.matrixWorldInverse,Dn.matrixWorld),Dn.normalMatrix.getNormalMatrix(Dn.modelViewMatrix),_a.onBeforeRender(Pe,ea,pa,ja,Dn,Zs),_a.transparent===!0&&_a.side===Zx&&_a.forceSinglePass===!1?(_a.side=x1,_a.needsUpdate=!0,Pe.renderBufferDirect(pa,ea,ja,_a,Dn,Zs),_a.side=dx,_a.needsUpdate=!0,Pe.renderBufferDirect(pa,ea,ja,_a,Dn,Zs),_a.side=Zx):Pe.renderBufferDirect(pa,ea,ja,_a,Dn,Zs),Dn.onAfterRender(Pe,ea,pa,ja,_a,Zs)}function Js(Dn,ea,pa){ea.isScene!==!0&&(ea=Jn);const ja=gi.get(Dn),_a=U.state.lights,Zs=U.state.shadowsArray,ks=_a.state.version,el=Wn.getParameters(Dn,_a.state,Zs,ea,pa),ol=Wn.getProgramCacheKey(el);let tl=ja.programs;ja.environment=Dn.isMeshStandardMaterial?ea.environment:null,ja.fog=ea.fog,ja.envMap=(Dn.isMeshStandardMaterial?va:Pa).get(Dn.envMap||ja.environment),ja.envMapRotation=ja.environment!==null&&Dn.envMap===null?ea.environmentRotation:Dn.envMapRotation,tl===void 0&&(Dn.addEventListener("dispose",Ns),tl=new Map,ja.programs=tl);let il=tl.get(ol);if(il!==void 0){if(ja.currentProgram===il&&ja.lightsStateVersion===ks)return zn(Dn,el),il}else el.uniforms=Wn.getUniforms(Dn),Dn.onBeforeCompile(el,Pe),il=Wn.acquireProgram(el,ol),tl.set(ol,il),ja.uniforms=el.uniforms;const Gl=ja.uniforms;return(!Dn.isShaderMaterial&&!Dn.isRawShaderMaterial||Dn.clipping===!0)&&(Gl.clippingPlanes=xa.uniform),zn(Dn,el),ja.needsLights=ts(Dn),ja.lightsStateVersion=ks,ja.needsLights&&(Gl.ambientLightColor.value=_a.state.ambient,Gl.lightProbe.value=_a.state.probe,Gl.directionalLights.value=_a.state.directional,Gl.directionalLightShadows.value=_a.state.directionalShadow,Gl.spotLights.value=_a.state.spot,Gl.spotLightShadows.value=_a.state.spotShadow,Gl.rectAreaLights.value=_a.state.rectArea,Gl.ltc_1.value=_a.state.rectAreaLTC1,Gl.ltc_2.value=_a.state.rectAreaLTC2,Gl.pointLights.value=_a.state.point,Gl.pointLightShadows.value=_a.state.pointShadow,Gl.hemisphereLights.value=_a.state.hemi,Gl.directionalShadowMap.value=_a.state.directionalShadowMap,Gl.directionalShadowMatrix.value=_a.state.directionalShadowMatrix,Gl.spotShadowMap.value=_a.state.spotShadowMap,Gl.spotLightMatrix.value=_a.state.spotLightMatrix,Gl.spotLightMap.value=_a.state.spotLightMap,Gl.pointShadowMap.value=_a.state.pointShadowMap,Gl.pointShadowMatrix.value=_a.state.pointShadowMatrix),ja.currentProgram=il,ja.uniformsList=null,il}function Vl(Dn){if(Dn.uniformsList===null){const ea=Dn.currentProgram.getUniforms();Dn.uniformsList=LG.seqWithValue(ea.seq,Dn.uniforms)}return Dn.uniformsList}function zn(Dn,ea){const pa=gi.get(Dn);pa.outputColorSpace=ea.outputColorSpace,pa.batching=ea.batching,pa.batchingColor=ea.batchingColor,pa.instancing=ea.instancing,pa.instancingColor=ea.instancingColor,pa.instancingMorph=ea.instancingMorph,pa.skinning=ea.skinning,pa.morphTargets=ea.morphTargets,pa.morphNormals=ea.morphNormals,pa.morphColors=ea.morphColors,pa.morphTargetsCount=ea.morphTargetsCount,pa.numClippingPlanes=ea.numClippingPlanes,pa.numIntersection=ea.numClipIntersection,pa.vertexAlphas=ea.vertexAlphas,pa.vertexTangents=ea.vertexTangents,pa.toneMapping=ea.toneMapping}function Ni(Dn,ea,pa,ja,_a){ea.isScene!==!0&&(ea=Jn),Oi.resetTextureUnits();const Zs=ea.fog,ks=ja.isMeshStandardMaterial?ea.environment:null,el=Ze===null?Pe.outputColorSpace:Ze.isXRRenderTarget===!0?Ze.texture.colorSpace:KC,ol=(ja.isMeshStandardMaterial?va:Pa).get(ja.envMap||ks),tl=ja.vertexColors===!0&&!!pa.attributes.color&&pa.attributes.color.itemSize===4,il=!!pa.attributes.tangent&&(!!ja.normalMap||ja.anisotropy>0),Gl=!!pa.morphAttributes.position,Qu=!!pa.morphAttributes.normal,ic=!!pa.morphAttributes.color;let rf=jC;ja.toneMapped&&(Ze===null||Ze.isXRRenderTarget===!0)&&(rf=Pe.toneMapping);const Sd=pa.morphAttributes.position||pa.morphAttributes.normal||pa.morphAttributes.color,yc=Sd!==void 0?Sd.length:0,ii=gi.get(ja),xh=U.state.lights;if(Ar===!0&&(Ir===!0||Dn!==nt)){const pf=Dn===nt&&ja.id===Je;xa.setState(ja,Dn,pf)}let pd=!1;ja.version===ii.__version?(ii.needsLights&&ii.lightsStateVersion!==xh.state.version||ii.outputColorSpace!==el||_a.isBatchedMesh&&ii.batching===!1||!_a.isBatchedMesh&&ii.batching===!0||_a.isBatchedMesh&&ii.batchingColor===!0&&_a.colorTexture===null||_a.isBatchedMesh&&ii.batchingColor===!1&&_a.colorTexture!==null||_a.isInstancedMesh&&ii.instancing===!1||!_a.isInstancedMesh&&ii.instancing===!0||_a.isSkinnedMesh&&ii.skinning===!1||!_a.isSkinnedMesh&&ii.skinning===!0||_a.isInstancedMesh&&ii.instancingColor===!0&&_a.instanceColor===null||_a.isInstancedMesh&&ii.instancingColor===!1&&_a.instanceColor!==null||_a.isInstancedMesh&&ii.instancingMorph===!0&&_a.morphTexture===null||_a.isInstancedMesh&&ii.instancingMorph===!1&&_a.morphTexture!==null||ii.envMap!==ol||ja.fog===!0&&ii.fog!==Zs||ii.numClippingPlanes!==void 0&&(ii.numClippingPlanes!==xa.numPlanes||ii.numIntersection!==xa.numIntersection)||ii.vertexAlphas!==tl||ii.vertexTangents!==il||ii.morphTargets!==Gl||ii.morphNormals!==Qu||ii.morphColors!==ic||ii.toneMapping!==rf||ii.morphTargetsCount!==yc)&&(pd=!0):(pd=!0,ii.__version=ja.version);let Ip=ii.currentProgram;pd===!0&&(Ip=Js(ja,ea,_a));let jf=!1,ih=!1,Td=!1;const Yc=Ip.getUniforms(),ep=ii.uniforms;if(bn.useProgram(Ip.program)&&(jf=!0,ih=!0,Td=!0),ja.id!==Je&&(Je=ja.id,ih=!0),jf||nt!==Dn){bn.buffers.depth.getReversed()&&Dn.reversedDepth!==!0&&(Dn._reversedDepth=!0,Dn.updateProjectionMatrix()),Yc.setValue(Lr,"projectionMatrix",Dn.projectionMatrix),Yc.setValue(Lr,"viewMatrix",Dn.matrixWorldInverse);const Tf=Yc.map.cameraPosition;Tf!==void 0&&Tf.setValue(Lr,Un.setFromMatrixPosition(Dn.matrixWorld)),Sn.logarithmicDepthBuffer&&Yc.setValue(Lr,"logDepthBufFC",2/(Math.log(Dn.far+1)/Math.LN2)),(ja.isMeshPhongMaterial||ja.isMeshToonMaterial||ja.isMeshLambertMaterial||ja.isMeshBasicMaterial||ja.isMeshStandardMaterial||ja.isShaderMaterial)&&Yc.setValue(Lr,"isOrthographic",Dn.isOrthographicCamera===!0),nt!==Dn&&(nt=Dn,ih=!0,Td=!0)}if(_a.isSkinnedMesh){Yc.setOptional(Lr,_a,"bindMatrix"),Yc.setOptional(Lr,_a,"bindMatrixInverse");const pf=_a.skeleton;pf&&(pf.boneTexture===null&&pf.computeBoneTexture(),Yc.setValue(Lr,"boneTexture",pf.boneTexture,Oi))}_a.isBatchedMesh&&(Yc.setOptional(Lr,_a,"batchingTexture"),Yc.setValue(Lr,"batchingTexture",_a._matricesTexture,Oi),Yc.setOptional(Lr,_a,"batchingIdTexture"),Yc.setValue(Lr,"batchingIdTexture",_a._indirectTexture,Oi),Yc.setOptional(Lr,_a,"batchingColorTexture"),_a._colorsTexture!==null&&Yc.setValue(Lr,"batchingColorTexture",_a._colorsTexture,Oi));const Tc=pa.morphAttributes;if((Tc.position!==void 0||Tc.normal!==void 0||Tc.color!==void 0)&&go.update(_a,pa,Ip),(ih||ii.receiveShadow!==_a.receiveShadow)&&(ii.receiveShadow=_a.receiveShadow,Yc.setValue(Lr,"receiveShadow",_a.receiveShadow)),ja.isMeshGouraudMaterial&&ja.envMap!==null&&(ep.envMap.value=ol,ep.flipEnvMap.value=ol.isCubeTexture&&ol.isRenderTargetTexture===!1?-1:1),ja.isMeshStandardMaterial&&ja.envMap===null&&ea.environment!==null&&(ep.envMapIntensity.value=ea.environmentIntensity),ih&&(Yc.setValue(Lr,"toneMappingExposure",Pe.toneMappingExposure),ii.needsLights&&Za(ep,Td),Zs&&ja.fog===!0&&Ei.refreshFogUniforms(ep,Zs),Ei.refreshMaterialUniforms(ep,ja,Zt,dr,U.state.transmissionRenderTarget[Dn.id]),LG.upload(Lr,Vl(ii),ep,Oi)),ja.isShaderMaterial&&ja.uniformsNeedUpdate===!0&&(LG.upload(Lr,Vl(ii),ep,Oi),ja.uniformsNeedUpdate=!1),ja.isSpriteMaterial&&Yc.setValue(Lr,"center",_a.center),Yc.setValue(Lr,"modelViewMatrix",_a.modelViewMatrix),Yc.setValue(Lr,"normalMatrix",_a.normalMatrix),Yc.setValue(Lr,"modelMatrix",_a.matrixWorld),ja.isShaderMaterial||ja.isRawShaderMaterial){const pf=ja.uniformsGroups;for(let Tf=0,T1=pf.length;Tf<T1;Tf++){const eg=pf[Tf];Ss.update(eg,Ip),Ss.bind(eg,Ip)}}return Ip}function Za(Dn,ea){Dn.ambientLightColor.needsUpdate=ea,Dn.lightProbe.needsUpdate=ea,Dn.directionalLights.needsUpdate=ea,Dn.directionalLightShadows.needsUpdate=ea,Dn.pointLights.needsUpdate=ea,Dn.pointLightShadows.needsUpdate=ea,Dn.spotLights.needsUpdate=ea,Dn.spotLightShadows.needsUpdate=ea,Dn.rectAreaLights.needsUpdate=ea,Dn.hemisphereLights.needsUpdate=ea}function ts(Dn){return Dn.isMeshLambertMaterial||Dn.isMeshToonMaterial||Dn.isMeshPhongMaterial||Dn.isMeshStandardMaterial||Dn.isShadowMaterial||Dn.isShaderMaterial&&Dn.lights===!0}this.getActiveCubeFace=function(){return Ie},this.getActiveMipmapLevel=function(){return Ve},this.getRenderTarget=function(){return Ze},this.setRenderTargetTextures=function(Dn,ea,pa){const ja=gi.get(Dn);ja.__autoAllocateDepthBuffer=Dn.resolveDepthBuffer===!1,ja.__autoAllocateDepthBuffer===!1&&(ja.__useRenderToTexture=!1),gi.get(Dn.texture).__webglTexture=ea,gi.get(Dn.depthTexture).__webglTexture=ja.__autoAllocateDepthBuffer?void 0:pa,ja.__hasExternalTextures=!0},this.setRenderTargetFramebuffer=function(Dn,ea){const pa=gi.get(Dn);pa.__webglFramebuffer=ea,pa.__useDefaultFramebuffer=ea===void 0};const ps=Lr.createFramebuffer();this.setRenderTarget=function(Dn,ea=0,pa=0){Ze=Dn,Ie=ea,Ve=pa;let ja=!0,_a=null,Zs=!1,ks=!1;if(Dn){const ol=gi.get(Dn);if(ol.__useDefaultFramebuffer!==void 0)bn.bindFramebuffer(Lr.FRAMEBUFFER,null),ja=!1;else if(ol.__webglFramebuffer===void 0)Oi.setupRenderTarget(Dn);else if(ol.__hasExternalTextures)Oi.rebindTextures(Dn,gi.get(Dn.texture).__webglTexture,gi.get(Dn.depthTexture).__webglTexture);else if(Dn.depthBuffer){const Gl=Dn.depthTexture;if(ol.__boundDepthTexture!==Gl){if(Gl!==null&&gi.has(Gl)&&(Dn.width!==Gl.image.width||Dn.height!==Gl.image.height))throw new Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");Oi.setupDepthRenderbuffer(Dn)}}const tl=Dn.texture;(tl.isData3DTexture||tl.isDataArrayTexture||tl.isCompressedArrayTexture)&&(ks=!0);const il=gi.get(Dn).__webglFramebuffer;Dn.isWebGLCubeRenderTarget?(Array.isArray(il[ea])?_a=il[ea][pa]:_a=il[ea],Zs=!0):Dn.samples>0&&Oi.useMultisampledRTT(Dn)===!1?_a=gi.get(Dn).__webglMultisampledFramebuffer:Array.isArray(il)?_a=il[pa]:_a=il,ut.copy(Dn.viewport),ht.copy(Dn.scissor),_t=Dn.scissorTest}else ut.copy(Vt).multiplyScalar(Zt).floor(),ht.copy(Er).multiplyScalar(Zt).floor(),_t=sr;if(pa!==0&&(_a=ps),bn.bindFramebuffer(Lr.FRAMEBUFFER,_a)&&ja&&bn.drawBuffers(Dn,_a),bn.viewport(ut),bn.scissor(ht),bn.setScissorTest(_t),Zs){const ol=gi.get(Dn.texture);Lr.framebufferTexture2D(Lr.FRAMEBUFFER,Lr.COLOR_ATTACHMENT0,Lr.TEXTURE_CUBE_MAP_POSITIVE_X+ea,ol.__webglTexture,pa)}else if(ks){const ol=ea;for(let tl=0;tl<Dn.textures.length;tl++){const il=gi.get(Dn.textures[tl]);Lr.framebufferTextureLayer(Lr.FRAMEBUFFER,Lr.COLOR_ATTACHMENT0+tl,il.__webglTexture,pa,ol)}}else if(Dn!==null&&pa!==0){const ol=gi.get(Dn.texture);Lr.framebufferTexture2D(Lr.FRAMEBUFFER,Lr.COLOR_ATTACHMENT0,Lr.TEXTURE_2D,ol.__webglTexture,pa)}Je=-1},this.readRenderTargetPixels=function(Dn,ea,pa,ja,_a,Zs,ks,el=0){if(!(Dn&&Dn.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let ol=gi.get(Dn).__webglFramebuffer;if(Dn.isWebGLCubeRenderTarget&&ks!==void 0&&(ol=ol[ks]),ol){bn.bindFramebuffer(Lr.FRAMEBUFFER,ol);try{const tl=Dn.textures[el],il=tl.format,Gl=tl.type;if(!Sn.textureFormatReadable(il)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!Sn.textureTypeReadable(Gl)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}ea>=0&&ea<=Dn.width-ja&&pa>=0&&pa<=Dn.height-_a&&(Dn.textures.length>1&&Lr.readBuffer(Lr.COLOR_ATTACHMENT0+el),Lr.readPixels(ea,pa,ja,_a,Zi.convert(il),Zi.convert(Gl),Zs))}finally{const tl=Ze!==null?gi.get(Ze).__webglFramebuffer:null;bn.bindFramebuffer(Lr.FRAMEBUFFER,tl)}}},this.readRenderTargetPixelsAsync=async function(Dn,ea,pa,ja,_a,Zs,ks,el=0){if(!(Dn&&Dn.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let ol=gi.get(Dn).__webglFramebuffer;if(Dn.isWebGLCubeRenderTarget&&ks!==void 0&&(ol=ol[ks]),ol)if(ea>=0&&ea<=Dn.width-ja&&pa>=0&&pa<=Dn.height-_a){bn.bindFramebuffer(Lr.FRAMEBUFFER,ol);const tl=Dn.textures[el],il=tl.format,Gl=tl.type;if(!Sn.textureFormatReadable(il))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!Sn.textureTypeReadable(Gl))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");const Qu=Lr.createBuffer();Lr.bindBuffer(Lr.PIXEL_PACK_BUFFER,Qu),Lr.bufferData(Lr.PIXEL_PACK_BUFFER,Zs.byteLength,Lr.STREAM_READ),Dn.textures.length>1&&Lr.readBuffer(Lr.COLOR_ATTACHMENT0+el),Lr.readPixels(ea,pa,ja,_a,Zi.convert(il),Zi.convert(Gl),0);const ic=Ze!==null?gi.get(Ze).__webglFramebuffer:null;bn.bindFramebuffer(Lr.FRAMEBUFFER,ic);const rf=Lr.fenceSync(Lr.SYNC_GPU_COMMANDS_COMPLETE,0);return Lr.flush(),await YYt(Lr,rf,4),Lr.bindBuffer(Lr.PIXEL_PACK_BUFFER,Qu),Lr.getBufferSubData(Lr.PIXEL_PACK_BUFFER,0,Zs),Lr.deleteBuffer(Qu),Lr.deleteSync(rf),Zs}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")},this.copyFramebufferToTexture=function(Dn,ea=null,pa=0){const ja=Math.pow(2,-pa),_a=Math.floor(Dn.image.width*ja),Zs=Math.floor(Dn.image.height*ja),ks=ea!==null?ea.x:0,el=ea!==null?ea.y:0;Oi.setTexture2D(Dn,0),Lr.copyTexSubImage2D(Lr.TEXTURE_2D,pa,0,0,ks,el,_a,Zs),bn.unbindTexture()};const Mi=Lr.createFramebuffer(),to=Lr.createFramebuffer();this.copyTextureToTexture=function(Dn,ea,pa=null,ja=null,_a=0,Zs=null){Zs===null&&(_a!==0?(tB("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),Zs=_a,_a=0):Zs=0);let ks,el,ol,tl,il,Gl,Qu,ic,rf;const Sd=Dn.isCompressedTexture?Dn.mipmaps[Zs]:Dn.image;if(pa!==null)ks=pa.max.x-pa.min.x,el=pa.max.y-pa.min.y,ol=pa.isBox3?pa.max.z-pa.min.z:1,tl=pa.min.x,il=pa.min.y,Gl=pa.isBox3?pa.min.z:0;else{const Tc=Math.pow(2,-_a);ks=Math.floor(Sd.width*Tc),el=Math.floor(Sd.height*Tc),Dn.isDataArrayTexture?ol=Sd.depth:Dn.isData3DTexture?ol=Math.floor(Sd.depth*Tc):ol=1,tl=0,il=0,Gl=0}ja!==null?(Qu=ja.x,ic=ja.y,rf=ja.z):(Qu=0,ic=0,rf=0);const yc=Zi.convert(ea.format),ii=Zi.convert(ea.type);let xh;ea.isData3DTexture?(Oi.setTexture3D(ea,0),xh=Lr.TEXTURE_3D):ea.isDataArrayTexture||ea.isCompressedArrayTexture?(Oi.setTexture2DArray(ea,0),xh=Lr.TEXTURE_2D_ARRAY):(Oi.setTexture2D(ea,0),xh=Lr.TEXTURE_2D),Lr.pixelStorei(Lr.UNPACK_FLIP_Y_WEBGL,ea.flipY),Lr.pixelStorei(Lr.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ea.premultiplyAlpha),Lr.pixelStorei(Lr.UNPACK_ALIGNMENT,ea.unpackAlignment);const pd=Lr.getParameter(Lr.UNPACK_ROW_LENGTH),Ip=Lr.getParameter(Lr.UNPACK_IMAGE_HEIGHT),jf=Lr.getParameter(Lr.UNPACK_SKIP_PIXELS),ih=Lr.getParameter(Lr.UNPACK_SKIP_ROWS),Td=Lr.getParameter(Lr.UNPACK_SKIP_IMAGES);Lr.pixelStorei(Lr.UNPACK_ROW_LENGTH,Sd.width),Lr.pixelStorei(Lr.UNPACK_IMAGE_HEIGHT,Sd.height),Lr.pixelStorei(Lr.UNPACK_SKIP_PIXELS,tl),Lr.pixelStorei(Lr.UNPACK_SKIP_ROWS,il),Lr.pixelStorei(Lr.UNPACK_SKIP_IMAGES,Gl);const Yc=Dn.isDataArrayTexture||Dn.isData3DTexture,ep=ea.isDataArrayTexture||ea.isData3DTexture;if(Dn.isDepthTexture){const Tc=gi.get(Dn),pf=gi.get(ea),Tf=gi.get(Tc.__renderTarget),T1=gi.get(pf.__renderTarget);bn.bindFramebuffer(Lr.READ_FRAMEBUFFER,Tf.__webglFramebuffer),bn.bindFramebuffer(Lr.DRAW_FRAMEBUFFER,T1.__webglFramebuffer);for(let eg=0;eg<ol;eg++)Yc&&(Lr.framebufferTextureLayer(Lr.READ_FRAMEBUFFER,Lr.COLOR_ATTACHMENT0,gi.get(Dn).__webglTexture,_a,Gl+eg),Lr.framebufferTextureLayer(Lr.DRAW_FRAMEBUFFER,Lr.COLOR_ATTACHMENT0,gi.get(ea).__webglTexture,Zs,rf+eg)),Lr.blitFramebuffer(tl,il,ks,el,Qu,ic,ks,el,Lr.DEPTH_BUFFER_BIT,Lr.NEAREST);bn.bindFramebuffer(Lr.READ_FRAMEBUFFER,null),bn.bindFramebuffer(Lr.DRAW_FRAMEBUFFER,null)}else if(_a!==0||Dn.isRenderTargetTexture||gi.has(Dn)){const Tc=gi.get(Dn),pf=gi.get(ea);bn.bindFramebuffer(Lr.READ_FRAMEBUFFER,Mi),bn.bindFramebuffer(Lr.DRAW_FRAMEBUFFER,to);for(let Tf=0;Tf<ol;Tf++)Yc?Lr.framebufferTextureLayer(Lr.READ_FRAMEBUFFER,Lr.COLOR_ATTACHMENT0,Tc.__webglTexture,_a,Gl+Tf):Lr.framebufferTexture2D(Lr.READ_FRAMEBUFFER,Lr.COLOR_ATTACHMENT0,Lr.TEXTURE_2D,Tc.__webglTexture,_a),ep?Lr.framebufferTextureLayer(Lr.DRAW_FRAMEBUFFER,Lr.COLOR_ATTACHMENT0,pf.__webglTexture,Zs,rf+Tf):Lr.framebufferTexture2D(Lr.DRAW_FRAMEBUFFER,Lr.COLOR_ATTACHMENT0,Lr.TEXTURE_2D,pf.__webglTexture,Zs),_a!==0?Lr.blitFramebuffer(tl,il,ks,el,Qu,ic,ks,el,Lr.COLOR_BUFFER_BIT,Lr.NEAREST):ep?Lr.copyTexSubImage3D(xh,Zs,Qu,ic,rf+Tf,tl,il,ks,el):Lr.copyTexSubImage2D(xh,Zs,Qu,ic,tl,il,ks,el);bn.bindFramebuffer(Lr.READ_FRAMEBUFFER,null),bn.bindFramebuffer(Lr.DRAW_FRAMEBUFFER,null)}else ep?Dn.isDataTexture||Dn.isData3DTexture?Lr.texSubImage3D(xh,Zs,Qu,ic,rf,ks,el,ol,yc,ii,Sd.data):ea.isCompressedArrayTexture?Lr.compressedTexSubImage3D(xh,Zs,Qu,ic,rf,ks,el,ol,yc,Sd.data):Lr.texSubImage3D(xh,Zs,Qu,ic,rf,ks,el,ol,yc,ii,Sd):Dn.isDataTexture?Lr.texSubImage2D(Lr.TEXTURE_2D,Zs,Qu,ic,ks,el,yc,ii,Sd.data):Dn.isCompressedTexture?Lr.compressedTexSubImage2D(Lr.TEXTURE_2D,Zs,Qu,ic,Sd.width,Sd.height,yc,Sd.data):Lr.texSubImage2D(Lr.TEXTURE_2D,Zs,Qu,ic,ks,el,yc,ii,Sd);Lr.pixelStorei(Lr.UNPACK_ROW_LENGTH,pd),Lr.pixelStorei(Lr.UNPACK_IMAGE_HEIGHT,Ip),Lr.pixelStorei(Lr.UNPACK_SKIP_PIXELS,jf),Lr.pixelStorei(Lr.UNPACK_SKIP_ROWS,ih),Lr.pixelStorei(Lr.UNPACK_SKIP_IMAGES,Td),Zs===0&&ea.generateMipmaps&&Lr.generateMipmap(xh),bn.unbindTexture()},this.initRenderTarget=function(Dn){gi.get(Dn).__webglFramebuffer===void 0&&Oi.setupRenderTarget(Dn)},this.initTexture=function(Dn){Dn.isCubeTexture?Oi.setTextureCube(Dn,0):Dn.isData3DTexture?Oi.setTexture3D(Dn,0):Dn.isDataArrayTexture||Dn.isCompressedArrayTexture?Oi.setTexture2DArray(Dn,0):Oi.setTexture2D(Dn,0),bn.unbindTexture()},this.resetState=function(){Ie=0,Ve=0,Ze=null,bn.reset(),za.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return tE}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const r=this.getContext();r.drawingBufferColorSpace=xv._getDrawingBufferColorSpace(e),r.unpackColorSpace=xv._getUnpackColorSpace()}}const nrr=Object.freeze(Object.defineProperty({__proto__:null,ACESFilmicToneMapping:UX,AddEquation:PP,AddOperation:x$e,AdditiveAnimationBlendMode:yye,AdditiveBlending:N$,AgXToneMapping:E$e,AlphaFormat:mye,AlwaysCompare:U$e,AlwaysDepth:U$,AlwaysStencilFunc:kpe,AmbientLight:PWe,AnimationAction:UWe,AnimationClip:sB,AnimationLoader:bZt,AnimationMixer:$Zt,AnimationObjectGroup:qZt,AnimationUtils:vZt,ArcCurve:iWe,ArrayCamera:FWe,ArrowHelper:pKt,AttachedBindMode:Rpe,Audio:zWe,AudioAnalyser:LZt,AudioContext:Wye,AudioListener:IZt,AudioLoader:MZt,AxesHelper:vKt,BackSide:x1,BasicDepthPacking:I$e,BasicShadowMap:e$e,BatchedMesh:Q$e,Bone:Cye,BooleanKeyframeTrack:i6,Box2:eKt,Box3:xg,Box3Helper:dKt,BoxGeometry:Hw,BoxHelper:fKt,BufferAttribute:Kh,BufferGeometry:Jf,BufferGeometryLoader:NWe,ByteType:h8,Cache:A5,Camera:$X,CameraHelper:jWe,CanvasTexture:zXt,CapsuleGeometry:JX,CatmullRomCurve3:Pye,CineonToneMapping:S$e,CircleGeometry:QX,ClampToEdgeWrapping:Ng,Clock:dZ,Color:Wu,ColorKeyframeTrack:Vye,ColorManagement:xv,CompressedArrayTexture:NXt,CompressedCubeTexture:FXt,CompressedTexture:KX,CompressedTextureLoader:xZt,ConeGeometry:yF,ConstantAlphaFactor:g$e,ConstantColorFactor:v$e,Controls:gKt,CubeCamera:W$e,CubeReflectionMapping:U5,CubeRefractionMapping:t4,CubeTexture:mU,CubeTextureLoader:CWe,CubeUVReflectionMapping:hF,CubicBezierCurve:Dye,CubicBezierCurve3:aWe,CubicInterpolant:SWe,CullFaceBack:Ape,CullFaceFront:QGe,CullFaceFrontBack:ZWt,CullFaceNone:JGe,Curve:oM,CurvePath:sWe,CustomBlending:t$e,CustomToneMapping:T$e,CylinderGeometry:Wx,Cylindrical:QZt,Data3DTexture:GX,DataArrayTexture:vU,DataTexture:$y,DataTextureLoader:qye,DataUtils:Vw,DecrementStencilOp:uYt,DecrementWrapStencilOp:fYt,DefaultLoadingManager:AWe,DepthFormat:v8,DepthStencilFormat:m8,DepthTexture:Rye,DetachedBindMode:C$e,DirectionalLight:IWe,DirectionalLightHelper:cKt,DiscreteInterpolant:TWe,DodecahedronGeometry:eZ,DoubleSide:Zx,DstAlphaFactor:c$e,DstColorFactor:d$e,DynamicCopyUsage:EYt,DynamicDrawUsage:qX,DynamicReadUsage:wYt,EdgesGeometry:nWe,EllipseCurve:tZ,EqualCompare:N$e,EqualDepth:j$,EqualStencilFunc:vYt,EquirectangularReflectionMapping:r4,EquirectangularRefractionMapping:Y9,Euler:$2,EventDispatcher:G5,ExternalTexture:kye,ExtrudeGeometry:rZ,FileLoader:uE,Float16BufferAttribute:pXt,Float32BufferAttribute:Dc,FloatType:mp,Fog:gU,FogExp2:WX,FramebufferTexture:OXt,FrontSide:dx,Frustum:gF,FrustumArray:ZX,GLBufferAttribute:ZZt,GLSL1:CYt,GLSL3:Ipe,GreaterCompare:F$e,GreaterDepth:q$,GreaterEqualCompare:B$e,GreaterEqualDepth:V$,GreaterEqualStencilFunc:bYt,GreaterStencilFunc:gYt,GridHelper:lKt,Group:CN,HalfFloatType:Og,HemisphereLight:MWe,HemisphereLightHelper:sKt,IcosahedronGeometry:yU,ImageBitmapLoader:CZt,ImageLoader:lB,ImageUtils:V$e,IncrementStencilOp:lYt,IncrementWrapStencilOp:cYt,InstancedBufferAttribute:_8,InstancedBufferGeometry:$ye,InstancedInterleavedBuffer:CW,InstancedMesh:J$e,Int16BufferAttribute:dXt,Int32BufferAttribute:hXt,Int8BufferAttribute:uXt,IntType:GP,InterleavedBuffer:YX,InterleavedBufferAttribute:rE,Interpolant:bU,InterpolateDiscrete:Z9,InterpolateLinear:_W,InterpolateSmooth:PG,InterpolationSamplingMode:kYt,InterpolationSamplingType:RYt,InvertStencilOp:dYt,KeepStencilOp:VD,KeyframeTrack:hA,LOD:Z$e,LatheGeometry:nZ,Layers:b8,LessCompare:O$e,LessDepth:H$,LessEqualCompare:bye,LessEqualDepth:OL,LessEqualStencilFunc:mYt,LessStencilFunc:pYt,Light:S4,LightProbe:OWe,Line:Cp,Line3:qC,LineBasicMaterial:Ww,LineCurve:Lye,LineCurve3:oWe,LineDashedMaterial:xWe,LineLoop:eWe,LineSegments:$5,LinearFilter:vp,LinearInterpolant:jye,LinearMipMapLinearFilter:$$,LinearMipMapNearestFilter:QWt,LinearMipmapLinearFilter:E5,LinearMipmapNearestFilter:a9,LinearSRGBColorSpace:KC,LinearToneMapping:_$e,LinearTransfer:J9,Loader:X2,LoaderUtils:Npe,LoadingManager:cZ,LoopOnce:M$e,LoopPingPong:k$e,LoopRepeat:R$e,MOUSE:HD,Material:q_,MaterialLoader:fZ,MathUtils:_ye,Matrix2:Kye,Matrix3:gh,Matrix4:Rc,MaxEquation:a$e,Mesh:hc,MeshBasicMaterial:dA,MeshDepthMaterial:uZ,MeshDistanceMaterial:Uye,MeshLambertMaterial:yWe,MeshMatcapMaterial:bWe,MeshNormalMaterial:gWe,MeshPhongMaterial:vWe,MeshPhysicalMaterial:pWe,MeshStandardMaterial:Bye,MeshToonMaterial:mWe,MinEquation:i$e,MirroredRepeatWrapping:X9,MixOperation:b$e,MultiplyBlending:Mpe,MultiplyOperation:dU,NearestFilter:Mp,NearestMipMapLinearFilter:JWt,NearestMipMapNearestFilter:KWt,NearestMipmapLinearFilter:EN,NearestMipmapNearestFilter:hye,NeutralToneMapping:A$e,NeverCompare:L$e,NeverDepth:B$,NeverStencilFunc:hYt,NoBlending:V2,NoColorSpace:yk,NoToneMapping:jC,NormalAnimationBlendMode:VX,NormalBlending:Ak,NotEqualCompare:z$e,NotEqualDepth:G$,NotEqualStencilFunc:yYt,NumberKeyframeTrack:aB,Object3D:Hp,ObjectLoader:EZt,ObjectSpaceNormalMap:D$e,OctahedronGeometry:O3,OneFactor:s$e,OneMinusConstantAlphaFactor:y$e,OneMinusConstantColorFactor:m$e,OneMinusDstAlphaFactor:f$e,OneMinusDstColorFactor:h$e,OneMinusSrcAlphaFactor:z$,OneMinusSrcColorFactor:u$e,OrthographicCamera:VC,PCFShadowMap:BX,PCFSoftShadowMap:i9,PMREMGenerator:Bpe,Path:AW,PerspectiveCamera:sy,Plane:PC,PlaneGeometry:j_,PlaneHelper:hKt,PointLight:kWe,PointLightHelper:aKt,Points:tWe,PointsMaterial:Mye,PolarGridHelper:uKt,PolyhedronGeometry:w4,PositionalAudio:DZt,PropertyBinding:Wv,PropertyMixer:BWe,QuadraticBezierCurve:Oye,QuadraticBezierCurve3:Nye,Quaternion:fh,QuaternionKeyframeTrack:xU,QuaternionLinearInterpolant:EWe,RED_GREEN_RGTC2_Format:bW,RED_RGTC1_Format:gW,REVISION:dF,RGBADepthPacking:P$e,RGBAFormat:Rp,RGBAIntegerFormat:FL,RGBA_ASTC_10x10_Format:fW,RGBA_ASTC_10x5_Format:lW,RGBA_ASTC_10x6_Format:uW,RGBA_ASTC_10x8_Format:cW,RGBA_ASTC_12x10_Format:dW,RGBA_ASTC_12x12_Format:hW,RGBA_ASTC_4x4_Format:eW,RGBA_ASTC_5x4_Format:tW,RGBA_ASTC_5x5_Format:rW,RGBA_ASTC_6x5_Format:nW,RGBA_ASTC_6x6_Format:iW,RGBA_ASTC_8x5_Format:aW,RGBA_ASTC_8x6_Format:oW,RGBA_ASTC_8x8_Format:sW,RGBA_BPTC_Format:pW,RGBA_ETC2_EAC_Format:Q$,RGBA_PVRTC_2BPPV1_Format:Z$,RGBA_PVRTC_4BPPV1_Format:X$,RGBA_S3TC_DXT1_Format:s9,RGBA_S3TC_DXT3_Format:l9,RGBA_S3TC_DXT5_Format:u9,RGBDepthPacking:iYt,RGBFormat:gye,RGBIntegerFormat:eYt,RGB_BPTC_SIGNED_Format:vW,RGB_BPTC_UNSIGNED_Format:mW,RGB_ETC1_Format:K$,RGB_ETC2_Format:J$,RGB_PVRTC_2BPPV1_Format:Y$,RGB_PVRTC_4BPPV1_Format:W$,RGB_S3TC_DXT1_Format:o9,RGDepthPacking:aYt,RGFormat:pU,RGIntegerFormat:vF,RawShaderMaterial:hWe,Ray:r6,Raycaster:hZ,RectAreaLight:DWe,RedFormat:Dk,RedIntegerFormat:pF,ReinhardToneMapping:w$e,RenderTarget:wye,RenderTarget3D:WZt,RepeatWrapping:sE,ReplaceStencilOp:sYt,ReverseSubtractEquation:n$e,RingGeometry:iZ,SIGNED_RED_GREEN_RGTC2_Format:xW,SIGNED_RED_RGTC1_Format:yW,SRGBColorSpace:H_,SRGBTransfer:yg,Scene:mF,ShaderChunk:Xh,ShaderLib:DC,ShaderMaterial:eb,ShadowMaterial:dWe,Shape:pL,ShapeGeometry:aZ,ShapePath:mKt,ShapeUtils:zC,ShortType:hU,Skeleton:XX,SkeletonHelper:iKt,SkinnedMesh:K$e,Source:wk,Sphere:Mb,SphereGeometry:n6,Spherical:MW,SphericalHarmonics3:LWe,SplineCurve:Fye,SpotLight:RWe,SpotLightHelper:nKt,Sprite:X$e,SpriteMaterial:Aye,SrcAlphaFactor:F$,SrcAlphaSaturateFactor:p$e,SrcColorFactor:l$e,StaticCopyUsage:TYt,StaticDrawUsage:Q9,StaticReadUsage:_Yt,StereoCamera:RZt,StreamCopyUsage:AYt,StreamDrawUsage:xYt,StreamReadUsage:SYt,StringKeyframeTrack:a6,SubtractEquation:r$e,SubtractiveBlending:Cpe,TOUCH:jD,TangentSpaceNormalMap:_4,TetrahedronGeometry:oZ,Texture:Fg,TextureLoader:_Zt,TextureUtils:wKt,Timer:KZt,TimestampQuery:MYt,TorusGeometry:OP,TorusKnotGeometry:sZ,Triangle:Tb,TriangleFanDrawMode:nYt,TriangleStripDrawMode:rYt,TrianglesDrawMode:tYt,TubeGeometry:lZ,UVMapping:e4,Uint16BufferAttribute:Sye,Uint32BufferAttribute:Tye,Uint8BufferAttribute:cXt,Uint8ClampedBufferAttribute:fXt,Uniform:Zye,UniformsGroup:XZt,UniformsLib:gc,UniformsUtils:wW,UnsignedByteType:e_,UnsignedInt101111Type:vye,UnsignedInt248Type:p8,UnsignedInt5999Type:pye,UnsignedIntType:q2,UnsignedShort4444Type:HX,UnsignedShort5551Type:jX,UnsignedShortType:NL,VSMShadowMap:AC,Vector2:sl,Vector3:oi,Vector4:dh,VectorKeyframeTrack:oB,VideoFrameTexture:LXt,VideoTexture:rWe,WebGL3DRenderTarget:JYt,WebGLArrayRenderTarget:q$e,WebGLCoordinateSystem:tE,WebGLCubeRenderTarget:Eye,WebGLRenderTarget:cx,WebGLRenderer:Qye,WebGLUtils:YWe,WebGPUCoordinateSystem:g8,WebXRController:DG,WireframeGeometry:zye,WrapAroundEnding:K9,ZeroCurvatureEnding:tL,ZeroFactor:o$e,ZeroSlopeEnding:rL,ZeroStencilOp:oYt,createCanvasElement:j$e},Symbol.toStringTag,{value:"Module"}));var Xae={exports:{}},lk={};/**
 * @license React
 * react-reconciler-constants.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 kPe;function irr(){return kPe||(kPe=1,lk.ConcurrentRoot=1,lk.ContinuousEventPriority=8,lk.DefaultEventPriority=32,lk.DiscreteEventPriority=2,lk.IdleEventPriority=268435456,lk.LegacyRoot=0,lk.NoEventPriority=0),lk}var IPe;function arr(){return IPe||(IPe=1,Xae.exports=irr()),Xae.exports}var OG=arr();const{useSyncExternalStoreWithSelector:orr}=WFt,srr=t=>t;function lrr(t,e=srr,r){const n=orr(t.subscribe,t.getState,t.getInitialState,e,r);return wi.useDebugValue(n),n}const PPe=(t,e)=>{const r=q9e(t),n=(i,a=e)=>lrr(r,i,a);return Object.assign(n,r),n},XWe=((t,e)=>t?PPe(t,e):PPe),urr=t=>typeof t=="object"&&typeof t.then=="function",iL=[];function ZWe(t,e,r=(n,i)=>n===i){if(t===e)return!0;if(!t||!e)return!1;const n=t.length;if(e.length!==n)return!1;for(let i=0;i<n;i++)if(!r(t[i],e[i]))return!1;return!0}function KWe(t,e=null,r=!1,n={}){e===null&&(e=[t]);for(const a of iL)if(ZWe(e,a.keys,a.equal)){if(r)return;if(Object.prototype.hasOwnProperty.call(a,"error"))throw a.error;if(Object.prototype.hasOwnProperty.call(a,"response"))return n.lifespan&&n.lifespan>0&&(a.timeout&&clearTimeout(a.timeout),a.timeout=setTimeout(a.remove,n.lifespan)),a.response;if(!r)throw a.promise}const i={keys:e,equal:n.equal,remove:()=>{const a=iL.indexOf(i);a!==-1&&iL.splice(a,1)},promise:(urr(t)?t:t(...e)).then(a=>{i.response=a,n.lifespan&&n.lifespan>0&&(i.timeout=setTimeout(i.remove,n.lifespan))}).catch(a=>i.error=a)};if(iL.push(i),!r)throw i.promise}const crr=(t,e,r)=>KWe(t,e,!1,r),frr=(t,e,r)=>void KWe(t,e,!0,r),drr=t=>{if(t===void 0||t.length===0)iL.splice(0,iL.length);else{const e=iL.find(r=>ZWe(t,r.keys,r.equal));e&&e.remove()}};var Zae={exports:{}},Kae={exports:{}},Jae={exports:{}},Qae={};/**
 * @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 DPe;function hrr(){return DPe||(DPe=1,(function(t){function e(Lt,dr){var Zt=Lt.length;Lt.push(dr);e:for(;0<Zt;){var Cr=Zt-1>>>1,yt=Lt[Cr];if(0<i(yt,dr))Lt[Cr]=dr,Lt[Zt]=yt,Zt=Cr;else break e}}function r(Lt){return Lt.length===0?null:Lt[0]}function n(Lt){if(Lt.length===0)return null;var dr=Lt[0],Zt=Lt.pop();if(Zt!==dr){Lt[0]=Zt;e:for(var Cr=0,yt=Lt.length,Vt=yt>>>1;Cr<Vt;){var Er=2*(Cr+1)-1,sr=Lt[Er],or=Er+1,Ar=Lt[or];if(0>i(sr,Zt))or<yt&&0>i(Ar,sr)?(Lt[Cr]=Ar,Lt[or]=Zt,Cr=or):(Lt[Cr]=sr,Lt[Er]=Zt,Cr=Er);else if(or<yt&&0>i(Ar,Zt))Lt[Cr]=Ar,Lt[or]=Zt,Cr=or;else break e}}return dr}function i(Lt,dr){var Zt=Lt.sortIndex-dr.sortIndex;return Zt!==0?Zt:Lt.id-dr.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;t.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();t.unstable_now=function(){return o.now()-s}}var d=[],b=[],L=1,B=null,V=3,X=!1,ie=!1,de=!1,ae=typeof setTimeout=="function"?setTimeout:null,U=typeof clearTimeout=="function"?clearTimeout:null,ve=typeof setImmediate<"u"?setImmediate:null;function Se(Lt){for(var dr=r(b);dr!==null;){if(dr.callback===null)n(b);else if(dr.startTime<=Lt)n(b),dr.sortIndex=dr.expirationTime,e(d,dr);else break;dr=r(b)}}function Pe(Lt){if(de=!1,Se(Lt),!ie)if(r(d)!==null)ie=!0,Dt();else{var dr=r(b);dr!==null&&qt(Pe,dr.startTime-Lt)}}var Me=!1,Ie=-1,Ve=5,Ze=-1;function Je(){return!(t.unstable_now()-Ze<Ve)}function nt(){if(Me){var Lt=t.unstable_now();Ze=Lt;var dr=!0;try{e:{ie=!1,de&&(de=!1,U(Ie),Ie=-1),X=!0;var Zt=V;try{t:{for(Se(Lt),B=r(d);B!==null&&!(B.expirationTime>Lt&&Je());){var Cr=B.callback;if(typeof Cr=="function"){B.callback=null,V=B.priorityLevel;var yt=Cr(B.expirationTime<=Lt);if(Lt=t.unstable_now(),typeof yt=="function"){B.callback=yt,Se(Lt),dr=!0;break t}B===r(d)&&n(d),Se(Lt)}else n(d);B=r(d)}if(B!==null)dr=!0;else{var Vt=r(b);Vt!==null&&qt(Pe,Vt.startTime-Lt),dr=!1}}break e}finally{B=null,V=Zt,X=!1}dr=void 0}}finally{dr?ut():Me=!1}}}var ut;if(typeof ve=="function")ut=function(){ve(nt)};else if(typeof MessageChannel<"u"){var ht=new MessageChannel,_t=ht.port2;ht.port1.onmessage=nt,ut=function(){_t.postMessage(null)}}else ut=function(){ae(nt,0)};function Dt(){Me||(Me=!0,ut())}function qt(Lt,dr){Ie=ae(function(){Lt(t.unstable_now())},dr)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(Lt){Lt.callback=null},t.unstable_continueExecution=function(){ie||X||(ie=!0,Dt())},t.unstable_forceFrameRate=function(Lt){0>Lt||125<Lt?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Ve=0<Lt?Math.floor(1e3/Lt):5},t.unstable_getCurrentPriorityLevel=function(){return V},t.unstable_getFirstCallbackNode=function(){return r(d)},t.unstable_next=function(Lt){switch(V){case 1:case 2:case 3:var dr=3;break;default:dr=V}var Zt=V;V=dr;try{return Lt()}finally{V=Zt}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(Lt,dr){switch(Lt){case 1:case 2:case 3:case 4:case 5:break;default:Lt=3}var Zt=V;V=Lt;try{return dr()}finally{V=Zt}},t.unstable_scheduleCallback=function(Lt,dr,Zt){var Cr=t.unstable_now();switch(typeof Zt=="object"&&Zt!==null?(Zt=Zt.delay,Zt=typeof Zt=="number"&&0<Zt?Cr+Zt:Cr):Zt=Cr,Lt){case 1:var yt=-1;break;case 2:yt=250;break;case 5:yt=1073741823;break;case 4:yt=1e4;break;default:yt=5e3}return yt=Zt+yt,Lt={id:L++,callback:dr,priorityLevel:Lt,startTime:Zt,expirationTime:yt,sortIndex:-1},Zt>Cr?(Lt.sortIndex=Zt,e(b,Lt),r(d)===null&&Lt===r(b)&&(de?(U(Ie),Ie=-1):de=!0,qt(Pe,Zt-Cr))):(Lt.sortIndex=yt,e(d,Lt),ie||X||(ie=!0,Dt())),Lt},t.unstable_shouldYield=Je,t.unstable_wrapCallback=function(Lt){var dr=V;return function(){var Zt=V;V=dr;try{return Lt.apply(this,arguments)}finally{V=Zt}}}})(Qae)),Qae}var LPe;function JWe(){return LPe||(LPe=1,Jae.exports=hrr()),Jae.exports}/**
 * @license React
 * react-reconciler.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 OPe;function prr(){return OPe||(OPe=1,(function(t){t.exports=function(e){function r(Ce,Ne,Tt,Kt){return new ob(Ce,Ne,Tt,Kt)}function n(){}function i(Ce){var Ne="https://react.dev/errors/"+Ce;if(1<arguments.length){Ne+="?args[]="+encodeURIComponent(arguments[1]);for(var Tt=2;Tt<arguments.length;Tt++)Ne+="&args[]="+encodeURIComponent(arguments[Tt])}return"Minified React error #"+Ce+"; visit "+Ne+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(Ce){return Ce===null||typeof Ce!="object"?null:(Ce=h_&&Ce[h_]||Ce["@@iterator"],typeof Ce=="function"?Ce:null)}function o(Ce){if(Ce==null)return null;if(typeof Ce=="function")return Ce.$$typeof===yT?null:Ce.displayName||Ce.name||null;if(typeof Ce=="string")return Ce;switch(Ce){case lb:return"Fragment";case Tx:return"Portal";case vT:return"Profiler";case IA:return"StrictMode";case zE:return"Suspense";case mT:return"SuspenseList"}if(typeof Ce=="object")switch(Ce.$$typeof){case d_:return(Ce.displayName||"Context")+".Provider";case iR:return(Ce._context.displayName||"Context")+".Consumer";case PA:var Ne=Ce.render;return Ce=Ce.displayName,Ce||(Ce=Ne.displayName||Ne.name||"",Ce=Ce!==""?"ForwardRef("+Ce+")":"ForwardRef"),Ce;case gT:return Ne=Ce.displayName||null,Ne!==null?Ne:o(Ce.type)||"Memo";case Fb:Ne=Ce._payload,Ce=Ce._init;try{return o(Ce(Ne))}catch{}}return null}function s(Ce){if(p_===void 0)try{throw Error()}catch(Tt){var Ne=Tt.stack.trim().match(/\n( *(at )?)/);p_=Ne&&Ne[1]||"",Q_=-1<Tt.stack.indexOf(`
    at`)?" (<anonymous>)":-1<Tt.stack.indexOf("@")?"@unknown:0:0":""}return`
`+p_+Ce+Q_}function d(Ce,Ne){if(!Ce||bT)return"";bT=!0;var Tt=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var Kt={DetermineComponentFrameRoot:function(){try{if(Ne){var $l=function(){throw Error()};if(Object.defineProperty($l.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct($l,[])}catch(md){var bc=md}Reflect.construct(Ce,[],$l)}else{try{$l.call()}catch(md){bc=md}Ce.call($l.prototype)}}else{try{throw Error()}catch(md){bc=md}($l=Ce())&&typeof $l.catch=="function"&&$l.catch(function(){})}}catch(md){if(md&&bc&&typeof md.stack=="string")return[md.stack,bc.stack]}return[null,null]}};Kt.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var Dr=Object.getOwnPropertyDescriptor(Kt.DetermineComponentFrameRoot,"name");Dr&&Dr.configurable&&Object.defineProperty(Kt.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var pn=Kt.DetermineComponentFrameRoot(),ta=pn[0],vo=pn[1];if(ta&&vo){var fs=ta.split(`
`),xl=vo.split(`
`);for(Dr=Kt=0;Kt<fs.length&&!fs[Kt].includes("DetermineComponentFrameRoot");)Kt++;for(;Dr<xl.length&&!xl[Dr].includes("DetermineComponentFrameRoot");)Dr++;if(Kt===fs.length||Dr===xl.length)for(Kt=fs.length-1,Dr=xl.length-1;1<=Kt&&0<=Dr&&fs[Kt]!==xl[Dr];)Dr--;for(;1<=Kt&&0<=Dr;Kt--,Dr--)if(fs[Kt]!==xl[Dr]){if(Kt!==1||Dr!==1)do if(Kt--,Dr--,0>Dr||fs[Kt]!==xl[Dr]){var cu=`
`+fs[Kt].replace(" at new "," at ");return Ce.displayName&&cu.includes("<anonymous>")&&(cu=cu.replace("<anonymous>",Ce.displayName)),cu}while(1<=Kt&&0<=Dr);break}}}finally{bT=!1,Error.prepareStackTrace=Tt}return(Tt=Ce?Ce.displayName||Ce.name:"")?s(Tt):""}function b(Ce){switch(Ce.tag){case 26:case 27:case 5:return s(Ce.type);case 16:return s("Lazy");case 13:return s("Suspense");case 19:return s("SuspenseList");case 0:case 15:return Ce=d(Ce.type,!1),Ce;case 11:return Ce=d(Ce.type.render,!1),Ce;case 1:return Ce=d(Ce.type,!0),Ce;default:return""}}function L(Ce){try{var Ne="";do Ne+=b(Ce),Ce=Ce.return;while(Ce);return Ne}catch(Tt){return`
Error generating stack: `+Tt.message+`
`+Tt.stack}}function B(Ce){var Ne=Ce,Tt=Ce;if(Ce.alternate)for(;Ne.return;)Ne=Ne.return;else{Ce=Ne;do Ne=Ce,(Ne.flags&4098)!==0&&(Tt=Ne.return),Ce=Ne.return;while(Ce)}return Ne.tag===3?Tt:null}function V(Ce){if(B(Ce)!==Ce)throw Error(i(188))}function X(Ce){var Ne=Ce.alternate;if(!Ne){if(Ne=B(Ce),Ne===null)throw Error(i(188));return Ne!==Ce?null:Ce}for(var Tt=Ce,Kt=Ne;;){var Dr=Tt.return;if(Dr===null)break;var pn=Dr.alternate;if(pn===null){if(Kt=Dr.return,Kt!==null){Tt=Kt;continue}break}if(Dr.child===pn.child){for(pn=Dr.child;pn;){if(pn===Tt)return V(Dr),Ce;if(pn===Kt)return V(Dr),Ne;pn=pn.sibling}throw Error(i(188))}if(Tt.return!==Kt.return)Tt=Dr,Kt=pn;else{for(var ta=!1,vo=Dr.child;vo;){if(vo===Tt){ta=!0,Tt=Dr,Kt=pn;break}if(vo===Kt){ta=!0,Kt=Dr,Tt=pn;break}vo=vo.sibling}if(!ta){for(vo=pn.child;vo;){if(vo===Tt){ta=!0,Tt=pn,Kt=Dr;break}if(vo===Kt){ta=!0,Kt=pn,Tt=Dr;break}vo=vo.sibling}if(!ta)throw Error(i(189))}}if(Tt.alternate!==Kt)throw Error(i(190))}if(Tt.tag!==3)throw Error(i(188));return Tt.stateNode.current===Tt?Ce:Ne}function ie(Ce){var Ne=Ce.tag;if(Ne===5||Ne===26||Ne===27||Ne===6)return Ce;for(Ce=Ce.child;Ce!==null;){if(Ne=ie(Ce),Ne!==null)return Ne;Ce=Ce.sibling}return null}function de(Ce){var Ne=Ce.tag;if(Ne===5||Ne===26||Ne===27||Ne===6)return Ce;for(Ce=Ce.child;Ce!==null;){if(Ce.tag!==4&&(Ne=de(Ce),Ne!==null))return Ne;Ce=Ce.sibling}return null}function ae(Ce){return{current:Ce}}function U(Ce){0>m_||(Ce.current=nm[m_],nm[m_]=null,m_--)}function ve(Ce,Ne){m_++,nm[m_]=Ce.current,Ce.current=Ne}function Se(Ce){return Ce>>>=0,Ce===0?32:31-(e3(Ce)/iI|0)|0}function Pe(Ce){var Ne=Ce&42;if(Ne!==0)return Ne;switch(Ce&-Ce){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: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 Ce&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return Ce&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return Ce}}function Me(Ce,Ne){var Tt=Ce.pendingLanes;if(Tt===0)return 0;var Kt=0,Dr=Ce.suspendedLanes,pn=Ce.pingedLanes,ta=Ce.warmLanes;Ce=Ce.finishedLanes!==0;var vo=Tt&134217727;return vo!==0?(Tt=vo&~Dr,Tt!==0?Kt=Pe(Tt):(pn&=vo,pn!==0?Kt=Pe(pn):Ce||(ta=vo&~ta,ta!==0&&(Kt=Pe(ta))))):(vo=Tt&~Dr,vo!==0?Kt=Pe(vo):pn!==0?Kt=Pe(pn):Ce||(ta=Tt&~ta,ta!==0&&(Kt=Pe(ta)))),Kt===0?0:Ne!==0&&Ne!==Kt&&(Ne&Dr)===0&&(Dr=Kt&-Kt,ta=Ne&-Ne,Dr>=ta||Dr===32&&(ta&4194176)!==0)?Ne:Kt}function Ie(Ce,Ne){return(Ce.pendingLanes&~(Ce.suspendedLanes&~Ce.pingedLanes)&Ne)===0}function Ve(Ce,Ne){switch(Ce){case 1:case 2:case 4:case 8:return Ne+250;case 16:case 32:case 64: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 Ne+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 Ze(){var Ce=y_;return y_<<=1,(y_&4194176)===0&&(y_=128),Ce}function Je(){var Ce=ow;return ow<<=1,(ow&62914560)===0&&(ow=4194304),Ce}function nt(Ce){for(var Ne=[],Tt=0;31>Tt;Tt++)Ne.push(Ce);return Ne}function ut(Ce,Ne){Ce.pendingLanes|=Ne,Ne!==268435456&&(Ce.suspendedLanes=0,Ce.pingedLanes=0,Ce.warmLanes=0)}function ht(Ce,Ne,Tt,Kt,Dr,pn){var ta=Ce.pendingLanes;Ce.pendingLanes=Tt,Ce.suspendedLanes=0,Ce.pingedLanes=0,Ce.warmLanes=0,Ce.expiredLanes&=Tt,Ce.entangledLanes&=Tt,Ce.errorRecoveryDisabledLanes&=Tt,Ce.shellSuspendCounter=0;var vo=Ce.entanglements,fs=Ce.expirationTimes,xl=Ce.hiddenUpdates;for(Tt=ta&~Tt;0<Tt;){var cu=31-_y(Tt),$l=1<<cu;vo[cu]=0,fs[cu]=-1;var bc=xl[cu];if(bc!==null)for(xl[cu]=null,cu=0;cu<bc.length;cu++){var md=bc[cu];md!==null&&(md.lane&=-536870913)}Tt&=~$l}Kt!==0&&_t(Ce,Kt,0),pn!==0&&Dr===0&&Ce.tag!==0&&(Ce.suspendedLanes|=pn&~(ta&~Ne))}function _t(Ce,Ne,Tt){Ce.pendingLanes|=Ne,Ce.suspendedLanes&=~Ne;var Kt=31-_y(Ne);Ce.entangledLanes|=Ne,Ce.entanglements[Kt]=Ce.entanglements[Kt]|1073741824|Tt&4194218}function Dt(Ce,Ne){var Tt=Ce.entangledLanes|=Ne;for(Ce=Ce.entanglements;Tt;){var Kt=31-_y(Tt),Dr=1<<Kt;Dr&Ne|Ce[Kt]&Ne&&(Ce[Kt]|=Ne),Tt&=~Dr}}function qt(Ce){return Ce&=-Ce,2<Ce?8<Ce?(Ce&134217727)!==0?32:268435456:8:2}function Lt(Ce){if(r1&&typeof r1.onCommitFiberRoot=="function")try{r1.onCommitFiberRoot(uv,Ce,void 0,(Ce.current.flags&128)===128)}catch{}}function dr(Ce){if(typeof cS=="function"&&H0(Ce),r1&&typeof r1.setStrictMode=="function")try{r1.setStrictMode(uv,Ce)}catch{}}function Zt(Ce,Ne){return Ce===Ne&&(Ce!==0||1/Ce===1/Ne)||Ce!==Ce&&Ne!==Ne}function Cr(Ce,Ne){if(typeof Ce=="object"&&Ce!==null){var Tt=r3.get(Ce);return Tt!==void 0?Tt:(Ne={value:Ce,source:Ne,stack:L(Ne)},r3.set(Ce,Ne),Ne)}return{value:Ce,source:Ne,stack:L(Ne)}}function yt(Ce,Ne){b_[Cx++]=x_,b_[Cx++]=nf,nf=Ce,x_=Ne}function Vt(Ce,Ne,Tt){L1[_0++]=Hb,L1[_0++]=Mx,L1[_0++]=fS,fS=Ce;var Kt=Hb;Ce=Mx;var Dr=32-_y(Kt)-1;Kt&=~(1<<Dr),Tt+=1;var pn=32-_y(Ne)+Dr;if(30<pn){var ta=Dr-Dr%5;pn=(Kt&(1<<ta)-1).toString(32),Kt>>=ta,Dr-=ta,Hb=1<<32-_y(Ne)+Dr|Tt<<Dr|Kt,Mx=pn+Ce}else Hb=1<<pn|Tt<<Dr|Kt,Mx=Ce}function Er(Ce){Ce.return!==null&&(yt(Ce,1),Vt(Ce,1,0))}function sr(Ce){for(;Ce===nf;)nf=b_[--Cx],b_[Cx]=null,x_=b_[--Cx],b_[Cx]=null;for(;Ce===fS;)fS=L1[--_0],L1[_0]=null,Mx=L1[--_0],L1[_0]=null,Hb=L1[--_0],L1[_0]=null}function or(Ce,Ne){ve(sw,Ne),ve(n3,Ce),ve(rp,null),Ce=oR(Ne),U(rp),ve(rp,Ce)}function Ar(){U(rp),U(n3),U(sw)}function Ir(Ce){Ce.memoizedState!==null&&ve(c2,Ce);var Ne=rp.current,Tt=nS(Ne,Ce.type);Ne!==Tt&&(ve(n3,Ce),ve(rp,Tt))}function _n(Ce){n3.current===Ce&&(U(rp),U(n3)),c2.current===Ce&&(U(c2),ym?P1._currentValue=by:P1._currentValue2=by)}function Un(Ce){var Ne=Error(i(418,""));throw Lr(Cr(Ne,Ce)),jb}function Qn(Ce,Ne){if(!ig)throw Error(i(175));KE(Ce.stateNode,Ce.type,Ce.memoizedProps,Ne,Ce)||Un(Ce)}function Jn(Ce){for(j0=Ce.return;j0;)switch(j0.tag){case 3:case 27:V0=!0;return;case 5:case 13:V0=!1;return;default:j0=j0.return}}function Vn(Ce){if(!ig||Ce!==j0)return!1;if(!np)return Jn(Ce),np=!0,!1;var Ne=!1;if(lv?Ce.tag!==3&&Ce.tag!==27&&(Ce.tag!==5||EM(Ce.type)&&!Fd(Ce.type,Ce.memoizedProps))&&(Ne=!0):Ce.tag!==3&&(Ce.tag!==5||EM(Ce.type)&&!Fd(Ce.type,Ce.memoizedProps))&&(Ne=!0),Ne&&w0&&Un(Ce),Jn(Ce),Ce.tag===13){if(!ig)throw Error(i(316));if(Ce=Ce.memoizedState,Ce=Ce!==null?Ce.dehydrated:null,!Ce)throw Error(i(317));w0=tI(Ce)}else w0=j0?Ax(Ce.stateNode):null;return!0}function jn(){ig&&(w0=j0=null,np=!1)}function Lr(Ce){Rx===null?Rx=[Ce]:Rx.push(Ce)}function Yn(){for(var Ce=f2,Ne=__=f2=0;Ne<Ce;){var Tt=im[Ne];im[Ne++]=null;var Kt=im[Ne];im[Ne++]=null;var Dr=im[Ne];im[Ne++]=null;var pn=im[Ne];if(im[Ne++]=null,Kt!==null&&Dr!==null){var ta=Kt.pending;ta===null?Dr.next=Dr:(Dr.next=ta.next,ta.next=Dr),Kt.pending=Dr}pn!==0&&Mn(Tt,Dr,pn)}}function On(Ce,Ne,Tt,Kt){im[f2++]=Ce,im[f2++]=Ne,im[f2++]=Tt,im[f2++]=Kt,__|=Kt,Ce.lanes|=Kt,Ce=Ce.alternate,Ce!==null&&(Ce.lanes|=Kt)}function Sn(Ce,Ne,Tt,Kt){return On(Ce,Ne,Tt,Kt),gi(Ce)}function bn(Ce,Ne){return On(Ce,null,null,Ne),gi(Ce)}function Mn(Ce,Ne,Tt){Ce.lanes|=Tt;var Kt=Ce.alternate;Kt!==null&&(Kt.lanes|=Tt);for(var Dr=!1,pn=Ce.return;pn!==null;)pn.childLanes|=Tt,Kt=pn.alternate,Kt!==null&&(Kt.childLanes|=Tt),pn.tag===22&&(Ce=pn.stateNode,Ce===null||Ce._visibility&1||(Dr=!0)),Ce=pn,pn=pn.return;Dr&&Ne!==null&&Ce.tag===3&&(pn=Ce.stateNode,Dr=31-_y(Tt),pn=pn.hiddenUpdates,Ce=pn[Dr],Ce===null?pn[Dr]=[Ne]:Ce.push(Ne),Ne.lane=Tt|536870912)}function gi(Ce){if(50<y2)throw y2=0,LM=null,Error(i(185));for(var Ne=Ce.return;Ne!==null;)Ce=Ne,Ne=Ce.return;return Ce.tag===3?Ce.stateNode:null}function Oi(Ce){Ce!==d2&&Ce.next===null&&(d2===null?AT=d2=Ce:d2=d2.next=Ce),Zp=!0,CT||(CT=!0,Wn(va))}function Pa(Ce,Ne){if(!XA&&Zp){XA=!0;do for(var Tt=!1,Kt=AT;Kt!==null;){if(Ce!==0){var Dr=Kt.pendingLanes;if(Dr===0)var pn=0;else{var ta=Kt.suspendedLanes,vo=Kt.pingedLanes;pn=(1<<31-_y(42|Ce)+1)-1,pn&=Dr&~(ta&~vo),pn=pn&201326677?pn&201326677|1:pn?pn|2:0}pn!==0&&(Tt=!0,bi(Kt,pn))}else pn=Wd,pn=Me(Kt,Kt===Jp?pn:0),(pn&3)===0||Ie(Kt,pn)||(Tt=!0,bi(Kt,pn));Kt=Kt.next}while(Tt);XA=!1}}function va(){Zp=CT=!1;var Ce=0;dS!==0&&(zb()&&(Ce=dS),dS=0);for(var Ne=n0(),Tt=null,Kt=AT;Kt!==null;){var Dr=Kt.next,pn=ti(Kt,Ne);pn===0?(Kt.next=null,Tt===null?AT=Dr:Tt.next=Dr,Dr===null&&(d2=Tt)):(Tt=Kt,(Ce!==0||(pn&3)!==0)&&(Zp=!0)),Kt=Dr}Pa(Ce)}function ti(Ce,Ne){for(var Tt=Ce.suspendedLanes,Kt=Ce.pingedLanes,Dr=Ce.expirationTimes,pn=Ce.pendingLanes&-62914561;0<pn;){var ta=31-_y(pn),vo=1<<ta,fs=Dr[ta];fs===-1?((vo&Tt)===0||(vo&Kt)!==0)&&(Dr[ta]=Ve(vo,Ne)):fs<=Ne&&(Ce.expiredLanes|=vo),pn&=~vo}if(Ne=Jp,Tt=Wd,Tt=Me(Ce,Ce===Ne?Tt:0),Kt=Ce.callbackNode,Tt===0||Ce===Ne&&cv===2||Ce.cancelPendingCommit!==null)return Kt!==null&&Kt!==null&&t3(Kt),Ce.callbackNode=null,Ce.callbackPriority=0;if((Tt&3)===0||Ie(Ce,Tt)){if(Ne=Tt&-Tt,Ne===Ce.callbackPriority)return Ne;switch(Kt!==null&&t3(Kt),qt(Tt)){case 2:case 8:Tt=vR;break;case 32:Tt=kM;break;case 268435456:Tt=mR;break;default:Tt=kM}return Kt=Tn.bind(null,Ce),Tt=ET(Tt,Kt),Ce.callbackPriority=Ne,Ce.callbackNode=Tt,Ne}return Kt!==null&&Kt!==null&&t3(Kt),Ce.callbackPriority=2,Ce.callbackNode=null,2}function Tn(Ce,Ne){var Tt=Ce.callbackNode;if(c_()&&Ce.callbackNode!==Tt)return null;var Kt=Wd;return Kt=Me(Ce,Ce===Jp?Kt:0),Kt===0?null:(e2(Ce,Kt,Ne),ti(Ce,n0()),Ce.callbackNode!=null&&Ce.callbackNode===Tt?Tn.bind(null,Ce):null)}function bi(Ce,Ne){if(c_())return null;e2(Ce,Ne,!0)}function Wn(Ce){i2?ew(function(){(ip&6)!==0?ET(YA,Ce):Ce()}):ET(YA,Ce)}function Ei(){return dS===0&&(dS=Ze()),dS}function Ki(Ce,Ne){if(lw===null){var Tt=lw=[];hS=0,Vb=Ei(),MT={status:"pending",value:void 0,then:function(Kt){Tt.push(Kt)}}}return hS++,Ne.then(sa,sa),Ne}function sa(){if(--hS===0&&lw!==null){MT!==null&&(MT.status="fulfilled");var Ce=lw;lw=null,Vb=0,MT=null;for(var Ne=0;Ne<Ce.length;Ne++)(0,Ce[Ne])()}}function xa(Ce,Ne){var Tt=[],Kt={status:"pending",value:null,reason:null,then:function(Dr){Tt.push(Dr)}};return Ce.then(function(){Kt.status="fulfilled",Kt.value=Ne;for(var Dr=0;Dr<Tt.length;Dr++)(0,Tt[Dr])(Ne)},function(Dr){for(Kt.status="rejected",Kt.reason=Dr,Dr=0;Dr<Tt.length;Dr++)(0,Tt[Dr])(void 0)}),Kt}function Qa(Ce){Ce.updateQueue={baseState:Ce.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function is(Ce,Ne){Ce=Ce.updateQueue,Ne.updateQueue===Ce&&(Ne.updateQueue={baseState:Ce.baseState,firstBaseUpdate:Ce.firstBaseUpdate,lastBaseUpdate:Ce.lastBaseUpdate,shared:Ce.shared,callbacks:null})}function go(Ce){return{lane:Ce,tag:0,payload:null,callback:null,next:null}}function Co(Ce,Ne,Tt){var Kt=Ce.updateQueue;if(Kt===null)return null;if(Kt=Kt.shared,(ip&2)!==0){var Dr=Kt.pending;return Dr===null?Ne.next=Ne:(Ne.next=Dr.next,Dr.next=Ne),Kt.pending=Ne,Ne=gi(Ce),Mn(Ce,null,Tt),Ne}return On(Ce,Kt,Ne,Tt),gi(Ce)}function Ko(Ce,Ne,Tt){if(Ne=Ne.updateQueue,Ne!==null&&(Ne=Ne.shared,(Tt&4194176)!==0)){var Kt=Ne.lanes;Kt&=Ce.pendingLanes,Tt|=Kt,Ne.lanes=Tt,Dt(Ce,Tt)}}function Zi(Ce,Ne){var Tt=Ce.updateQueue,Kt=Ce.alternate;if(Kt!==null&&(Kt=Kt.updateQueue,Tt===Kt)){var Dr=null,pn=null;if(Tt=Tt.firstBaseUpdate,Tt!==null){do{var ta={lane:Tt.lane,tag:Tt.tag,payload:Tt.payload,callback:null,next:null};pn===null?Dr=pn=ta:pn=pn.next=ta,Tt=Tt.next}while(Tt!==null);pn===null?Dr=pn=Ne:pn=pn.next=Ne}else Dr=pn=Ne;Tt={baseState:Kt.baseState,firstBaseUpdate:Dr,lastBaseUpdate:pn,shared:Kt.shared,callbacks:Kt.callbacks},Ce.updateQueue=Tt;return}Ce=Tt.lastBaseUpdate,Ce===null?Tt.firstBaseUpdate=Ne:Ce.next=Ne,Tt.lastBaseUpdate=Ne}function za(){if(pS){var Ce=MT;if(Ce!==null)throw Ce}}function Ss(Ce,Ne,Tt,Kt){pS=!1;var Dr=Ce.updateQueue;uw=!1;var pn=Dr.firstBaseUpdate,ta=Dr.lastBaseUpdate,vo=Dr.shared.pending;if(vo!==null){Dr.shared.pending=null;var fs=vo,xl=fs.next;fs.next=null,ta===null?pn=xl:ta.next=xl,ta=fs;var cu=Ce.alternate;cu!==null&&(cu=cu.updateQueue,vo=cu.lastBaseUpdate,vo!==ta&&(vo===null?cu.firstBaseUpdate=xl:vo.next=xl,cu.lastBaseUpdate=fs))}if(pn!==null){var $l=Dr.baseState;ta=0,cu=xl=fs=null,vo=pn;do{var bc=vo.lane&-536870913,md=bc!==vo.lane;if(md?(Wd&bc)===bc:(Kt&bc)===bc){bc!==0&&bc===Vb&&(pS=!0),cu!==null&&(cu=cu.next={lane:0,tag:vo.tag,payload:vo.payload,callback:null,next:null});e:{var Kb=Ce,_S=vo;bc=Ne;var wS=Tt;switch(_S.tag){case 1:if(Kb=_S.payload,typeof Kb=="function"){$l=Kb.call(wS,$l,bc);break e}$l=Kb;break e;case 3:Kb.flags=Kb.flags&-65537|128;case 0:if(Kb=_S.payload,bc=typeof Kb=="function"?Kb.call(wS,$l,bc):Kb,bc==null)break e;$l=FE({},$l,bc);break e;case 2:uw=!0}}bc=vo.callback,bc!==null&&(Ce.flags|=64,md&&(Ce.flags|=8192),md=Dr.callbacks,md===null?Dr.callbacks=[bc]:md.push(bc))}else md={lane:bc,tag:vo.tag,payload:vo.payload,callback:vo.callback,next:null},cu===null?(xl=cu=md,fs=$l):cu=cu.next=md,ta|=bc;if(vo=vo.next,vo===null){if(vo=Dr.shared.pending,vo===null)break;md=vo,vo=md.next,md.next=null,Dr.lastBaseUpdate=md,Dr.shared.pending=null}}while(!0);cu===null&&(fs=$l),Dr.baseState=fs,Dr.firstBaseUpdate=xl,Dr.lastBaseUpdate=cu,pn===null&&(Dr.shared.lanes=0),Zb|=ta,Ce.lanes=ta,Ce.memoizedState=$l}}function ba(Ce,Ne){if(typeof Ce!="function")throw Error(i(191,Ce));Ce.call(Ne)}function po(Ce,Ne){var Tt=Ce.callbacks;if(Tt!==null)for(Ce.callbacks=null,Ce=0;Ce<Tt.length;Ce++)ba(Tt[Ce],Ne)}function Ys(Ce,Ne){if(n1(Ce,Ne))return!0;if(typeof Ce!="object"||Ce===null||typeof Ne!="object"||Ne===null)return!1;var Tt=Object.keys(Ce),Kt=Object.keys(Ne);if(Tt.length!==Kt.length)return!1;for(Kt=0;Kt<Tt.length;Kt++){var Dr=Tt[Kt];if(!cw.call(Ne,Dr)||!n1(Ce[Dr],Ne[Dr]))return!1}return!0}function $s(Ce){return Ce=Ce.status,Ce==="fulfilled"||Ce==="rejected"}function Gs(){}function Ns(Ce,Ne,Tt){switch(Tt=Ce[Tt],Tt===void 0?Ce.push(Ne):Tt!==Ne&&(Ne.then(Gs,Gs),Ne=Tt),Ne.status){case"fulfilled":return Ne.value;case"rejected":throw Ce=Ne.reason,Ce===vS?Error(i(483)):Ce;default:if(typeof Ne.status=="string")Ne.then(Gs,Gs);else{if(Ce=Jp,Ce!==null&&100<Ce.shellSuspendCounter)throw Error(i(482));Ce=Ne,Ce.status="pending",Ce.then(function(Kt){if(Ne.status==="pending"){var Dr=Ne;Dr.status="fulfilled",Dr.value=Kt}},function(Kt){if(Ne.status==="pending"){var Dr=Ne;Dr.status="rejected",Dr.reason=Kt}})}switch(Ne.status){case"fulfilled":return Ne.value;case"rejected":throw Ce=Ne.reason,Ce===vS?Error(i(483)):Ce}throw fw=Ne,vS}}function Hl(){if(fw===null)throw Error(i(459));var Ce=fw;return fw=null,Ce}function nu(Ce){var Ne=dw;return dw+=1,qb===null&&(qb=[]),Ns(qb,Ce,Ne)}function su(Ce,Ne){Ne=Ne.props.ref,Ce.ref=Ne!==void 0?Ne:null}function Mc(Ce,Ne){throw Ne.$$typeof===Kk?Error(i(525)):(Ce=Object.prototype.toString.call(Ne),Error(i(31,Ce==="[object Object]"?"object with keys {"+Object.keys(Ne).join(", ")+"}":Ce)))}function da(Ce){var Ne=Ce._init;return Ne(Ce._payload)}function Xa(Ce){function Ne(Ps,zo){if(Ce){var Bs=Ps.deletions;Bs===null?(Ps.deletions=[zo],Ps.flags|=16):Bs.push(zo)}}function Tt(Ps,zo){if(!Ce)return null;for(;zo!==null;)Ne(Ps,zo),zo=zo.sibling;return null}function Kt(Ps){for(var zo=new Map;Ps!==null;)Ps.key!==null?zo.set(Ps.key,Ps):zo.set(Ps.index,Ps),Ps=Ps.sibling;return zo}function Dr(Ps,zo){return Ps=Sx(Ps,zo),Ps.index=0,Ps.sibling=null,Ps}function pn(Ps,zo,Bs){return Ps.index=Bs,Ce?(Bs=Ps.alternate,Bs!==null?(Bs=Bs.index,Bs<zo?(Ps.flags|=33554434,zo):Bs):(Ps.flags|=33554434,zo)):(Ps.flags|=1048576,zo)}function ta(Ps){return Ce&&Ps.alternate===null&&(Ps.flags|=33554434),Ps}function vo(Ps,zo,Bs,fu){return zo===null||zo.tag!==6?(zo=mM(Bs,Ps.mode,fu),zo.return=Ps,zo):(zo=Dr(zo,Bs),zo.return=Ps,zo)}function fs(Ps,zo,Bs,fu){var sf=Bs.type;return sf===lb?cu(Ps,zo,Bs.props.children,fu,Bs.key):zo!==null&&(zo.elementType===sf||typeof sf=="object"&&sf!==null&&sf.$$typeof===Fb&&da(sf)===zo.type)?(zo=Dr(zo,Bs.props),su(zo,Bs),zo.return=Ps,zo):(zo=J_(Bs.type,Bs.key,Bs.props,null,Ps.mode,fu),su(zo,Bs),zo.return=Ps,zo)}function xl(Ps,zo,Bs,fu){return zo===null||zo.tag!==4||zo.stateNode.containerInfo!==Bs.containerInfo||zo.stateNode.implementation!==Bs.implementation?(zo=nR(Bs,Ps.mode,fu),zo.return=Ps,zo):(zo=Dr(zo,Bs.children||[]),zo.return=Ps,zo)}function cu(Ps,zo,Bs,fu,sf){return zo===null||zo.tag!==7?(zo=wv(Bs,Ps.mode,fu,sf),zo.return=Ps,zo):(zo=Dr(zo,Bs),zo.return=Ps,zo)}function $l(Ps,zo,Bs){if(typeof zo=="string"&&zo!==""||typeof zo=="number"||typeof zo=="bigint")return zo=mM(""+zo,Ps.mode,Bs),zo.return=Ps,zo;if(typeof zo=="object"&&zo!==null){switch(zo.$$typeof){case kA:return Bs=J_(zo.type,zo.key,zo.props,null,Ps.mode,Bs),su(Bs,zo),Bs.return=Ps,Bs;case Tx:return zo=nR(zo,Ps.mode,Bs),zo.return=Ps,zo;case Fb:var fu=zo._init;return zo=fu(zo._payload),$l(Ps,zo,Bs)}if(ub(zo)||a(zo))return zo=wv(zo,Ps.mode,Bs,null),zo.return=Ps,zo;if(typeof zo.then=="function")return $l(Ps,nu(zo),Bs);if(zo.$$typeof===d_)return $l(Ps,oT(Ps,zo),Bs);Mc(Ps,zo)}return null}function bc(Ps,zo,Bs,fu){var sf=zo!==null?zo.key:null;if(typeof Bs=="string"&&Bs!==""||typeof Bs=="number"||typeof Bs=="bigint")return sf!==null?null:vo(Ps,zo,""+Bs,fu);if(typeof Bs=="object"&&Bs!==null){switch(Bs.$$typeof){case kA:return Bs.key===sf?fs(Ps,zo,Bs,fu):null;case Tx:return Bs.key===sf?xl(Ps,zo,Bs,fu):null;case Fb:return sf=Bs._init,Bs=sf(Bs._payload),bc(Ps,zo,Bs,fu)}if(ub(Bs)||a(Bs))return sf!==null?null:cu(Ps,zo,Bs,fu,null);if(typeof Bs.then=="function")return bc(Ps,zo,nu(Bs),fu);if(Bs.$$typeof===d_)return bc(Ps,zo,oT(Ps,Bs),fu);Mc(Ps,Bs)}return null}function md(Ps,zo,Bs,fu,sf){if(typeof fu=="string"&&fu!==""||typeof fu=="number"||typeof fu=="bigint")return Ps=Ps.get(Bs)||null,vo(zo,Ps,""+fu,sf);if(typeof fu=="object"&&fu!==null){switch(fu.$$typeof){case kA:return Ps=Ps.get(fu.key===null?Bs:fu.key)||null,fs(zo,Ps,fu,sf);case Tx:return Ps=Ps.get(fu.key===null?Bs:fu.key)||null,xl(zo,Ps,fu,sf);case Fb:var Tv=fu._init;return fu=Tv(fu._payload),md(Ps,zo,Bs,fu,sf)}if(ub(fu)||a(fu))return Ps=Ps.get(Bs)||null,cu(zo,Ps,fu,sf,null);if(typeof fu.then=="function")return md(Ps,zo,Bs,nu(fu),sf);if(fu.$$typeof===d_)return md(Ps,zo,Bs,oT(zo,fu),sf);Mc(zo,fu)}return null}function Kb(Ps,zo,Bs,fu){for(var sf=null,Tv=null,Qf=zo,_p=zo=0,Ag=null;Qf!==null&&_p<Bs.length;_p++){Qf.index>_p?(Ag=Qf,Qf=null):Ag=Qf.sibling;var lh=bc(Ps,Qf,Bs[_p],fu);if(lh===null){Qf===null&&(Qf=Ag);break}Ce&&Qf&&lh.alternate===null&&Ne(Ps,Qf),zo=pn(lh,zo,_p),Tv===null?sf=lh:Tv.sibling=lh,Tv=lh,Qf=Ag}if(_p===Bs.length)return Tt(Ps,Qf),np&&yt(Ps,_p),sf;if(Qf===null){for(;_p<Bs.length;_p++)Qf=$l(Ps,Bs[_p],fu),Qf!==null&&(zo=pn(Qf,zo,_p),Tv===null?sf=Qf:Tv.sibling=Qf,Tv=Qf);return np&&yt(Ps,_p),sf}for(Qf=Kt(Qf);_p<Bs.length;_p++)Ag=md(Qf,Ps,_p,Bs[_p],fu),Ag!==null&&(Ce&&Ag.alternate!==null&&Qf.delete(Ag.key===null?_p:Ag.key),zo=pn(Ag,zo,_p),Tv===null?sf=Ag:Tv.sibling=Ag,Tv=Ag);return Ce&&Qf.forEach(function(A_){return Ne(Ps,A_)}),np&&yt(Ps,_p),sf}function _S(Ps,zo,Bs,fu){if(Bs==null)throw Error(i(151));for(var sf=null,Tv=null,Qf=zo,_p=zo=0,Ag=null,lh=Bs.next();Qf!==null&&!lh.done;_p++,lh=Bs.next()){Qf.index>_p?(Ag=Qf,Qf=null):Ag=Qf.sibling;var A_=bc(Ps,Qf,lh.value,fu);if(A_===null){Qf===null&&(Qf=Ag);break}Ce&&Qf&&A_.alternate===null&&Ne(Ps,Qf),zo=pn(A_,zo,_p),Tv===null?sf=A_:Tv.sibling=A_,Tv=A_,Qf=Ag}if(lh.done)return Tt(Ps,Qf),np&&yt(Ps,_p),sf;if(Qf===null){for(;!lh.done;_p++,lh=Bs.next())lh=$l(Ps,lh.value,fu),lh!==null&&(zo=pn(lh,zo,_p),Tv===null?sf=lh:Tv.sibling=lh,Tv=lh);return np&&yt(Ps,_p),sf}for(Qf=Kt(Qf);!lh.done;_p++,lh=Bs.next())lh=md(Qf,Ps,_p,lh.value,fu),lh!==null&&(Ce&&lh.alternate!==null&&Qf.delete(lh.key===null?_p:lh.key),zo=pn(lh,zo,_p),Tv===null?sf=lh:Tv.sibling=lh,Tv=lh);return Ce&&Qf.forEach(function(JA){return Ne(Ps,JA)}),np&&yt(Ps,_p),sf}function wS(Ps,zo,Bs,fu){if(typeof Bs=="object"&&Bs!==null&&Bs.type===lb&&Bs.key===null&&(Bs=Bs.props.children),typeof Bs=="object"&&Bs!==null){switch(Bs.$$typeof){case kA:e:{for(var sf=Bs.key;zo!==null;){if(zo.key===sf){if(sf=Bs.type,sf===lb){if(zo.tag===7){Tt(Ps,zo.sibling),fu=Dr(zo,Bs.props.children),fu.return=Ps,Ps=fu;break e}}else if(zo.elementType===sf||typeof sf=="object"&&sf!==null&&sf.$$typeof===Fb&&da(sf)===zo.type){Tt(Ps,zo.sibling),fu=Dr(zo,Bs.props),su(fu,Bs),fu.return=Ps,Ps=fu;break e}Tt(Ps,zo);break}else Ne(Ps,zo);zo=zo.sibling}Bs.type===lb?(fu=wv(Bs.props.children,Ps.mode,fu,Bs.key),fu.return=Ps,Ps=fu):(fu=J_(Bs.type,Bs.key,Bs.props,null,Ps.mode,fu),su(fu,Bs),fu.return=Ps,Ps=fu)}return ta(Ps);case Tx:e:{for(sf=Bs.key;zo!==null;){if(zo.key===sf)if(zo.tag===4&&zo.stateNode.containerInfo===Bs.containerInfo&&zo.stateNode.implementation===Bs.implementation){Tt(Ps,zo.sibling),fu=Dr(zo,Bs.children||[]),fu.return=Ps,Ps=fu;break e}else{Tt(Ps,zo);break}else Ne(Ps,zo);zo=zo.sibling}fu=nR(Bs,Ps.mode,fu),fu.return=Ps,Ps=fu}return ta(Ps);case Fb:return sf=Bs._init,Bs=sf(Bs._payload),wS(Ps,zo,Bs,fu)}if(ub(Bs))return Kb(Ps,zo,Bs,fu);if(a(Bs)){if(sf=a(Bs),typeof sf!="function")throw Error(i(150));return Bs=sf.call(Bs),_S(Ps,zo,Bs,fu)}if(typeof Bs.then=="function")return wS(Ps,zo,nu(Bs),fu);if(Bs.$$typeof===d_)return wS(Ps,zo,oT(Ps,Bs),fu);Mc(Ps,Bs)}return typeof Bs=="string"&&Bs!==""||typeof Bs=="number"||typeof Bs=="bigint"?(Bs=""+Bs,zo!==null&&zo.tag===6?(Tt(Ps,zo.sibling),fu=Dr(zo,Bs),fu.return=Ps,Ps=fu):(Tt(Ps,zo),fu=mM(Bs,Ps.mode,fu),fu.return=Ps,Ps=fu),ta(Ps)):Tt(Ps,zo)}return function(Ps,zo,Bs,fu){try{dw=0;var sf=wS(Ps,zo,Bs,fu);return qb=null,sf}catch(Qf){if(Qf===vS)throw Qf;var Tv=r(29,Qf,null,Ps.mode);return Tv.lanes=fu,Tv.return=Ps,Tv}finally{}}}function Oo(Ce,Ne){Ce=wy,ve(kx,Ce),ve(Rh,Ne),wy=Ce|Ne.baseLanes}function _s(){ve(kx,wy),ve(Rh,Rh.current)}function nl(){wy=kx.current,U(Rh),U(kx)}function vu(Ce){var Ne=Ce.alternate;ve($g,$g.current&1),ve(Gb,Ce),bp===null&&(Ne===null||Rh.current!==null||Ne.memoizedState!==null)&&(bp=Ce)}function zl(Ce){if(Ce.tag===22){if(ve($g,$g.current),ve(Gb,Ce),bp===null){var Ne=Ce.alternate;Ne!==null&&Ne.memoizedState!==null&&(bp=Ce)}}else jl()}function jl(){ve($g,$g.current),ve(Gb,Gb.current)}function Il(Ce){U(Gb),bp===Ce&&(bp=null),U($g)}function Js(Ce){for(var Ne=Ce;Ne!==null;){if(Ne.tag===13){var Tt=Ne.memoizedState;if(Tt!==null&&(Tt=Tt.dehydrated,Tt===null||YE(Tt)||o2(Tt)))return Ne}else if(Ne.tag===19&&Ne.memoizedProps.revealOrder!==void 0){if((Ne.flags&128)!==0)return Ne}else if(Ne.child!==null){Ne.child.return=Ne,Ne=Ne.child;continue}if(Ne===Ce)break;for(;Ne.sibling===null;){if(Ne.return===null||Ne.return===Ce)return null;Ne=Ne.return}Ne.sibling.return=Ne.return,Ne=Ne.sibling}return null}function Vl(){throw Error(i(321))}function zn(Ce,Ne){if(Ne===null)return!1;for(var Tt=0;Tt<Ne.length&&Tt<Ce.length;Tt++)if(!n1(Ce[Tt],Ne[Tt]))return!1;return!0}function Ni(Ce,Ne,Tt,Kt,Dr,pn){return Ix=pn,$d=Ne,Ne.memoizedState=null,Ne.updateQueue=null,Ne.lanes=0,Ef.H=Ce===null||Ce.memoizedState===null?gS:O1,p2=!1,pn=Tt(Kt,Dr),p2=!1,RT&&(pn=ts(Ne,Tt,Kt,Dr)),Za(Ce),pn}function Za(Ce){Ef.H=ag;var Ne=kf!==null&&kf.next!==null;if(Ix=0,xp=kf=$d=null,Px=!1,kT=0,G0=null,Ne)throw Error(i(300));Ce===null||Kp||(Ce=Ce.dependencies,Ce!==null&&Dp(Ce)&&(Kp=!0))}function ts(Ce,Ne,Tt,Kt){$d=Ce;var Dr=0;do{if(RT&&(G0=null),kT=0,RT=!1,25<=Dr)throw Error(i(301));if(Dr+=1,xp=kf=null,Ce.updateQueue!=null){var pn=Ce.updateQueue;pn.lastEffect=null,pn.events=null,pn.stores=null,pn.memoCache!=null&&(pn.memoCache.index=0)}Ef.H=$b,pn=Ne(Tt,Kt)}while(RT);return pn}function ps(){var Ce=Ef.H,Ne=Ce.useState()[0];return Ne=typeof Ne.then=="function"?ja(Ne):Ne,Ce=Ce.useState()[0],(kf!==null?kf.memoizedState:null)!==Ce&&($d.flags|=1024),Ne}function Mi(){var Ce=mS!==0;return mS=0,Ce}function to(Ce,Ne,Tt){Ne.updateQueue=Ce.updateQueue,Ne.flags&=-2053,Ce.lanes&=~Tt}function Dn(Ce){if(Px){for(Ce=Ce.memoizedState;Ce!==null;){var Ne=Ce.queue;Ne!==null&&(Ne.pending=null),Ce=Ce.next}Px=!1}Ix=0,xp=kf=$d=null,RT=!1,kT=mS=0,G0=null}function ea(){var Ce={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xp===null?$d.memoizedState=xp=Ce:xp=xp.next=Ce,xp}function pa(){if(kf===null){var Ce=$d.alternate;Ce=Ce!==null?Ce.memoizedState:null}else Ce=kf.next;var Ne=xp===null?$d.memoizedState:xp.next;if(Ne!==null)xp=Ne,kf=Ce;else{if(Ce===null)throw $d.alternate===null?Error(i(467)):Error(i(310));kf=Ce,Ce={memoizedState:kf.memoizedState,baseState:kf.baseState,baseQueue:kf.baseQueue,queue:kf.queue,next:null},xp===null?$d.memoizedState=xp=Ce:xp=xp.next=Ce}return xp}function ja(Ce){var Ne=kT;return kT+=1,G0===null&&(G0=[]),Ce=Ns(G0,Ce,Ne),Ne=$d,(xp===null?Ne.memoizedState:xp.next)===null&&(Ne=Ne.alternate,Ef.H=Ne===null||Ne.memoizedState===null?gS:O1),Ce}function _a(Ce){if(Ce!==null&&typeof Ce=="object"){if(typeof Ce.then=="function")return ja(Ce);if(Ce.$$typeof===d_)return jg(Ce)}throw Error(i(438,String(Ce)))}function Zs(Ce){var Ne=null,Tt=$d.updateQueue;if(Tt!==null&&(Ne=Tt.memoCache),Ne==null){var Kt=$d.alternate;Kt!==null&&(Kt=Kt.updateQueue,Kt!==null&&(Kt=Kt.memoCache,Kt!=null&&(Ne={data:Kt.data.map(function(Dr){return Dr.slice()}),index:0})))}if(Ne==null&&(Ne={data:[],index:0}),Tt===null&&(Tt=ZA(),$d.updateQueue=Tt),Tt.memoCache=Ne,Tt=Ne.data[Ne.index],Tt===void 0)for(Tt=Ne.data[Ne.index]=Array(Ce),Kt=0;Kt<Ce;Kt++)Tt[Kt]=Jk;return Ne.index++,Tt}function ks(Ce,Ne){return typeof Ne=="function"?Ne(Ce):Ne}function el(Ce){var Ne=pa();return ol(Ne,kf,Ce)}function ol(Ce,Ne,Tt){var Kt=Ce.queue;if(Kt===null)throw Error(i(311));Kt.lastRenderedReducer=Tt;var Dr=Ce.baseQueue,pn=Kt.pending;if(pn!==null){if(Dr!==null){var ta=Dr.next;Dr.next=pn.next,pn.next=ta}Ne.baseQueue=Dr=pn,Kt.pending=null}if(pn=Ce.baseState,Dr===null)Ce.memoizedState=pn;else{Ne=Dr.next;var vo=ta=null,fs=null,xl=Ne,cu=!1;do{var $l=xl.lane&-536870913;if($l!==xl.lane?(Wd&$l)===$l:(Ix&$l)===$l){var bc=xl.revertLane;if(bc===0)fs!==null&&(fs=fs.next={lane:0,revertLane:0,action:xl.action,hasEagerState:xl.hasEagerState,eagerState:xl.eagerState,next:null}),$l===Vb&&(cu=!0);else if((Ix&bc)===bc){xl=xl.next,bc===Vb&&(cu=!0);continue}else $l={lane:0,revertLane:xl.revertLane,action:xl.action,hasEagerState:xl.hasEagerState,eagerState:xl.eagerState,next:null},fs===null?(vo=fs=$l,ta=pn):fs=fs.next=$l,$d.lanes|=bc,Zb|=bc;$l=xl.action,p2&&Tt(pn,$l),pn=xl.hasEagerState?xl.eagerState:Tt(pn,$l)}else bc={lane:$l,revertLane:xl.revertLane,action:xl.action,hasEagerState:xl.hasEagerState,eagerState:xl.eagerState,next:null},fs===null?(vo=fs=bc,ta=pn):fs=fs.next=bc,$d.lanes|=$l,Zb|=$l;xl=xl.next}while(xl!==null&&xl!==Ne);if(fs===null?ta=pn:fs.next=vo,!n1(pn,Ce.memoizedState)&&(Kp=!0,cu&&(Tt=MT,Tt!==null)))throw Tt;Ce.memoizedState=pn,Ce.baseState=ta,Ce.baseQueue=fs,Kt.lastRenderedState=pn}return Dr===null&&(Kt.lanes=0),[Ce.memoizedState,Kt.dispatch]}function tl(Ce){var Ne=pa(),Tt=Ne.queue;if(Tt===null)throw Error(i(311));Tt.lastRenderedReducer=Ce;var Kt=Tt.dispatch,Dr=Tt.pending,pn=Ne.memoizedState;if(Dr!==null){Tt.pending=null;var ta=Dr=Dr.next;do pn=Ce(pn,ta.action),ta=ta.next;while(ta!==Dr);n1(pn,Ne.memoizedState)||(Kp=!0),Ne.memoizedState=pn,Ne.baseQueue===null&&(Ne.baseState=pn),Tt.lastRenderedState=pn}return[pn,Kt]}function il(Ce,Ne,Tt){var Kt=$d,Dr=pa(),pn=np;if(pn){if(Tt===void 0)throw Error(i(407));Tt=Tt()}else Tt=Ne();var ta=!n1((kf||Dr).memoizedState,Tt);if(ta&&(Dr.memoizedState=Tt,Kp=!0),Dr=Dr.queue,tg(ic.bind(null,Kt,Dr,Ce),[Ce]),Dr.getSnapshot!==Ne||ta||xp!==null&&xp.memoizedState.tag&1){if(Kt.flags|=2048,eg(9,Qu.bind(null,Kt,Dr,Tt,Ne),{destroy:void 0},null),Jp===null)throw Error(i(349));pn||(Ix&60)!==0||Gl(Kt,Ne,Tt)}return Tt}function Gl(Ce,Ne,Tt){Ce.flags|=16384,Ce={getSnapshot:Ne,value:Tt},Ne=$d.updateQueue,Ne===null?(Ne=ZA(),$d.updateQueue=Ne,Ne.stores=[Ce]):(Tt=Ne.stores,Tt===null?Ne.stores=[Ce]:Tt.push(Ce))}function Qu(Ce,Ne,Tt,Kt){Ne.value=Tt,Ne.getSnapshot=Kt,rf(Ne)&&Sd(Ce)}function ic(Ce,Ne,Tt){return Tt(function(){rf(Ne)&&Sd(Ce)})}function rf(Ce){var Ne=Ce.getSnapshot;Ce=Ce.value;try{var Tt=Ne();return!n1(Ce,Tt)}catch{return!0}}function Sd(Ce){var Ne=bn(Ce,2);Ne!==null&&rg(Ne,Ce,2)}function yc(Ce){var Ne=ea();if(typeof Ce=="function"){var Tt=Ce;if(Ce=Tt(),p2){dr(!0);try{Tt()}finally{dr(!1)}}}return Ne.memoizedState=Ne.baseState=Ce,Ne.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ks,lastRenderedState:Ce},Ne}function ii(Ce,Ne,Tt,Kt){return Ce.baseState=Tt,ol(Ce,kf,typeof Kt=="function"?Kt:ks)}function xh(Ce,Ne,Tt,Kt,Dr){if(t0(Ce))throw Error(i(485));if(Ce=Ne.action,Ce!==null){var pn={payload:Dr,action:Ce,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(ta){pn.listeners.push(ta)}};Ef.T!==null?Tt(!0):pn.isTransition=!1,Kt(pn),Tt=Ne.pending,Tt===null?(pn.next=Ne.pending=pn,pd(Ne,pn)):(pn.next=Tt.next,Ne.pending=Tt.next=pn)}}function pd(Ce,Ne){var Tt=Ne.action,Kt=Ne.payload,Dr=Ce.state;if(Ne.isTransition){var pn=Ef.T,ta={};Ef.T=ta;try{var vo=Tt(Dr,Kt),fs=Ef.S;fs!==null&&fs(ta,vo),Ip(Ce,Ne,vo)}catch(xl){ih(Ce,Ne,xl)}finally{Ef.T=pn}}else try{pn=Tt(Dr,Kt),Ip(Ce,Ne,pn)}catch(xl){ih(Ce,Ne,xl)}}function Ip(Ce,Ne,Tt){Tt!==null&&typeof Tt=="object"&&typeof Tt.then=="function"?Tt.then(function(Kt){jf(Ce,Ne,Kt)},function(Kt){return ih(Ce,Ne,Kt)}):jf(Ce,Ne,Tt)}function jf(Ce,Ne,Tt){Ne.status="fulfilled",Ne.value=Tt,Td(Ne),Ce.state=Tt,Ne=Ce.pending,Ne!==null&&(Tt=Ne.next,Tt===Ne?Ce.pending=null:(Tt=Tt.next,Ne.next=Tt,pd(Ce,Tt)))}function ih(Ce,Ne,Tt){var Kt=Ce.pending;if(Ce.pending=null,Kt!==null){Kt=Kt.next;do Ne.status="rejected",Ne.reason=Tt,Td(Ne),Ne=Ne.next;while(Ne!==Kt)}Ce.action=null}function Td(Ce){Ce=Ce.listeners;for(var Ne=0;Ne<Ce.length;Ne++)(0,Ce[Ne])()}function Yc(Ce,Ne){return Ne}function ep(Ce,Ne){if(np){var Tt=Jp.formState;if(Tt!==null){e:{var Kt=$d;if(np){if(w0){var Dr=rw(w0,V0);if(Dr){w0=Ax(Dr),Kt=e1(Dr);break e}}Un(Kt)}Kt=!1}Kt&&(Ne=Tt[0])}}Tt=ea(),Tt.memoizedState=Tt.baseState=Ne,Kt={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yc,lastRenderedState:Ne},Tt.queue=Kt,Tt=wg.bind(null,$d,Kt),Kt.dispatch=Tt,Kt=yc(!1);var pn=jp.bind(null,$d,!1,Kt.queue);return Kt=ea(),Dr={state:Ne,dispatch:null,action:Ce,pending:null},Kt.queue=Dr,Tt=xh.bind(null,$d,Dr,pn,Tt),Dr.dispatch=Tt,Kt.memoizedState=Ce,[Ne,Tt,!1]}function Tc(Ce){var Ne=pa();return pf(Ne,kf,Ce)}function pf(Ce,Ne,Tt){Ne=ol(Ce,Ne,Yc)[0],Ce=el(ks)[0],Ne=typeof Ne=="object"&&Ne!==null&&typeof Ne.then=="function"?ja(Ne):Ne;var Kt=pa(),Dr=Kt.queue,pn=Dr.dispatch;return Tt!==Kt.memoizedState&&($d.flags|=2048,eg(9,Tf.bind(null,Dr,Tt),{destroy:void 0},null)),[Ne,pn,Ce]}function Tf(Ce,Ne){Ce.action=Ne}function T1(Ce){var Ne=pa(),Tt=kf;if(Tt!==null)return pf(Ne,Tt,Ce);pa(),Ne=Ne.memoizedState,Tt=pa();var Kt=Tt.queue.dispatch;return Tt.memoizedState=Ce,[Ne,Kt,!1]}function eg(Ce,Ne,Tt,Kt){return Ce={tag:Ce,create:Ne,inst:Tt,deps:Kt,next:null},Ne=$d.updateQueue,Ne===null&&(Ne=ZA(),$d.updateQueue=Ne),Tt=Ne.lastEffect,Tt===null?Ne.lastEffect=Ce.next=Ce:(Kt=Tt.next,Tt.next=Ce,Ce.next=Kt,Ne.lastEffect=Ce),Ce}function Om(){return pa().memoizedState}function bE(Ce,Ne,Tt,Kt){var Dr=ea();$d.flags|=Ce,Dr.memoizedState=eg(1|Ne,Tt,{destroy:void 0},Kt===void 0?null:Kt)}function tp(Ce,Ne,Tt,Kt){var Dr=pa();Kt=Kt===void 0?null:Kt;var pn=Dr.memoizedState.inst;kf!==null&&Kt!==null&&zn(Kt,kf.memoizedState.deps)?Dr.memoizedState=eg(Ne,Tt,pn,Kt):($d.flags|=Ce,Dr.memoizedState=eg(1|Ne,Tt,pn,Kt))}function E1(Ce,Ne){bE(8390656,8,Ce,Ne)}function tg(Ce,Ne){tp(2048,8,Ce,Ne)}function ah(Ce,Ne){return tp(4,2,Ce,Ne)}function Ug(Ce,Ne){return tp(4,4,Ce,Ne)}function Wp(Ce,Ne){if(typeof Ne=="function"){Ce=Ce();var Tt=Ne(Ce);return function(){typeof Tt=="function"?Tt():Ne(null)}}if(Ne!=null)return Ce=Ce(),Ne.current=Ce,function(){Ne.current=null}}function Hg(Ce,Ne,Tt){Tt=Tt!=null?Tt.concat([Ce]):null,tp(4,4,Wp.bind(null,Ne,Ce),Tt)}function G_(){}function Jd(Ce,Ne){var Tt=pa();Ne=Ne===void 0?null:Ne;var Kt=Tt.memoizedState;return Ne!==null&&zn(Ne,Kt[1])?Kt[0]:(Tt.memoizedState=[Ce,Ne],Ce)}function pA(Ce,Ne){var Tt=pa();Ne=Ne===void 0?null:Ne;var Kt=Tt.memoizedState;if(Ne!==null&&zn(Ne,Kt[1]))return Kt[0];if(Kt=Ce(),p2){dr(!0);try{Ce()}finally{dr(!1)}}return Tt.memoizedState=[Kt,Ne],Kt}function xE(Ce,Ne,Tt){return Tt===void 0||(Ix&1073741824)!==0?Ce.memoizedState=Ne:(Ce.memoizedState=Tt,Ce=DE(),$d.lanes|=Ce,Zb|=Ce,Tt)}function lM(Ce,Ne,Tt,Kt){return n1(Tt,Ne)?Tt:Rh.current!==null?(Ce=xE(Ce,Tt,Kt),n1(Ce,Ne)||(Kp=!0),Ce):(Ix&42)===0?(Kp=!0,Ce.memoizedState=Tt):(Ce=DE(),$d.lanes|=Ce,Zb|=Ce,Ne)}function n_(Ce,Ne,Tt,Kt,Dr){var pn=v_();rm(pn!==0&&8>pn?pn:8);var ta=Ef.T,vo={};Ef.T=vo,jp(Ce,!1,Ne,Tt);try{var fs=Dr(),xl=Ef.S;if(xl!==null&&xl(vo,fs),fs!==null&&typeof fs=="object"&&typeof fs.then=="function"){var cu=xa(fs,Kt);Pp(Ce,Ne,cu,Ch(Ce))}else Pp(Ce,Ne,Kt,Ch(Ce))}catch($l){Pp(Ce,Ne,{then:function(){},status:"rejected",reason:$l},Ch())}finally{rm(pn),Ef.T=ta}}function rb(Ce){var Ne=Ce.memoizedState;if(Ne!==null)return Ne;Ne={memoizedState:by,baseState:by,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ks,lastRenderedState:by},next:null};var Tt={};return Ne.next={memoizedState:Tt,baseState:Tt,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ks,lastRenderedState:Tt},next:null},Ce.memoizedState=Ne,Ce=Ce.alternate,Ce!==null&&(Ce.memoizedState=Ne),Ne}function J2(){return jg(P1)}function _g(){return pa().memoizedState}function A1(){return pa().memoizedState}function Xw(Ce){for(var Ne=Ce.return;Ne!==null;){switch(Ne.tag){case 24:case 3:var Tt=Ch();Ce=go(Tt);var Kt=Co(Ne,Ce,Tt);Kt!==null&&(rg(Kt,Ne,Tt),Ko(Kt,Ne,Tt)),Ne={cache:yx()},Ce.payload=Ne;return}Ne=Ne.return}}function vA(Ce,Ne,Tt){var Kt=Ch();Tt={lane:Kt,revertLane:0,action:Tt,hasEagerState:!1,eagerState:null,next:null},t0(Ce)?vd(Ne,Tt):(Tt=Sn(Ce,Ne,Tt,Kt),Tt!==null&&(rg(Tt,Ce,Kt),Qd(Tt,Ne,Kt)))}function wg(Ce,Ne,Tt){var Kt=Ch();Pp(Ce,Ne,Tt,Kt)}function Pp(Ce,Ne,Tt,Kt){var Dr={lane:Kt,revertLane:0,action:Tt,hasEagerState:!1,eagerState:null,next:null};if(t0(Ce))vd(Ne,Dr);else{var pn=Ce.alternate;if(Ce.lanes===0&&(pn===null||pn.lanes===0)&&(pn=Ne.lastRenderedReducer,pn!==null))try{var ta=Ne.lastRenderedState,vo=pn(ta,Tt);if(Dr.hasEagerState=!0,Dr.eagerState=vo,n1(vo,ta))return On(Ce,Ne,Dr,0),Jp===null&&Yn(),!1}catch{}finally{}if(Tt=Sn(Ce,Ne,Dr,Kt),Tt!==null)return rg(Tt,Ce,Kt),Qd(Tt,Ne,Kt),!0}return!1}function jp(Ce,Ne,Tt,Kt){if(Kt={lane:2,revertLane:Ei(),action:Kt,hasEagerState:!1,eagerState:null,next:null},t0(Ce)){if(Ne)throw Error(i(479))}else Ne=Sn(Ce,Tt,Kt,2),Ne!==null&&rg(Ne,Ce,2)}function t0(Ce){var Ne=Ce.alternate;return Ce===$d||Ne!==null&&Ne===$d}function vd(Ce,Ne){RT=Px=!0;var Tt=Ce.pending;Tt===null?Ne.next=Ne:(Ne.next=Tt.next,Tt.next=Ne),Ce.pending=Ne}function Qd(Ce,Ne,Tt){if((Tt&4194176)!==0){var Kt=Ne.lanes;Kt&=Ce.pendingLanes,Tt|=Kt,Ne.lanes=Tt,Dt(Ce,Tt)}}function $_(Ce,Ne,Tt,Kt){Ne=Ce.memoizedState,Tt=Tt(Kt,Ne),Tt=Tt==null?Ne:FE({},Ne,Tt),Ce.memoizedState=Tt,Ce.lanes===0&&(Ce.updateQueue.baseState=Tt)}function v0(Ce,Ne,Tt,Kt,Dr,pn,ta){return Ce=Ce.stateNode,typeof Ce.shouldComponentUpdate=="function"?Ce.shouldComponentUpdate(Kt,pn,ta):Ne.prototype&&Ne.prototype.isPureReactComponent?!Ys(Tt,Kt)||!Ys(Dr,pn):!0}function mA(Ce,Ne,Tt,Kt){Ce=Ne.state,typeof Ne.componentWillReceiveProps=="function"&&Ne.componentWillReceiveProps(Tt,Kt),typeof Ne.UNSAFE_componentWillReceiveProps=="function"&&Ne.UNSAFE_componentWillReceiveProps(Tt,Kt),Ne.state!==Ce&&S_.enqueueReplaceState(Ne,Ne.state,null)}function W_(Ce,Ne){var Tt=Ne;if("ref"in Ne){Tt={};for(var Kt in Ne)Kt!=="ref"&&(Tt[Kt]=Ne[Kt])}if(Ce=Ce.defaultProps){Tt===Ne&&(Tt=FE({},Tt));for(var Dr in Ce)Tt[Dr]===void 0&&(Tt[Dr]=Ce[Dr])}return Tt}function ec(Ce,Ne){try{var Tt=Ce.onUncaughtError;Tt(Ne.value,{componentStack:Ne.stack})}catch(Kt){setTimeout(function(){throw Kt})}}function Nv(Ce,Ne,Tt){try{var Kt=Ce.onCaughtError;Kt(Tt.value,{componentStack:Tt.stack,errorBoundary:Ne.tag===1?Ne.stateNode:null})}catch(Dr){setTimeout(function(){throw Dr})}}function Wy(Ce,Ne,Tt){return Tt=go(Tt),Tt.tag=3,Tt.payload={element:null},Tt.callback=function(){ec(Ce,Ne)},Tt}function Pb(Ce){return Ce=go(Ce),Ce.tag=3,Ce}function gx(Ce,Ne,Tt,Kt){var Dr=Tt.type.getDerivedStateFromError;if(typeof Dr=="function"){var pn=Kt.value;Ce.payload=function(){return Dr(pn)},Ce.callback=function(){Nv(Ne,Tt,Kt)}}var ta=Tt.stateNode;ta!==null&&typeof ta.componentDidCatch=="function"&&(Ce.callback=function(){Nv(Ne,Tt,Kt),typeof Dr!="function"&&(xS===null?xS=new Set([this]):xS.add(this));var vo=Kt.stack;this.componentDidCatch(Kt.value,{componentStack:vo!==null?vo:""})})}function Yu(Ce,Ne,Tt,Kt,Dr){if(Tt.flags|=32768,Kt!==null&&typeof Kt=="object"&&typeof Kt.then=="function"){if(Ne=Tt.alternate,Ne!==null&&EE(Ne,Tt,Dr,!0),Tt=Gb.current,Tt!==null){switch(Tt.tag){case 13:return bp===null?Ob():Tt.alternate===null&&fv===0&&(fv=3),Tt.flags&=-257,Tt.flags|=65536,Tt.lanes=Dr,Kt===h2?Tt.flags|=16384:(Ne=Tt.updateQueue,Ne===null?Tt.updateQueue=new Set([Kt]):Ne.add(Kt),K_(Ce,Kt,Dr)),!1;case 22:return Tt.flags|=65536,Kt===h2?Tt.flags|=16384:(Ne=Tt.updateQueue,Ne===null?(Ne={transitions:null,markerInstances:null,retryQueue:new Set([Kt])},Tt.updateQueue=Ne):(Tt=Ne.retryQueue,Tt===null?Ne.retryQueue=new Set([Kt]):Tt.add(Kt)),K_(Ce,Kt,Dr)),!1}throw Error(i(435,Tt.tag))}return K_(Ce,Kt,Dr),Ob(),!1}if(np)return Ne=Gb.current,Ne!==null?((Ne.flags&65536)===0&&(Ne.flags|=256),Ne.flags|=65536,Ne.lanes=Dr,Kt!==jb&&(Ce=Error(i(422),{cause:Kt}),Lr(Cr(Ce,Tt)))):(Kt!==jb&&(Ne=Error(i(423),{cause:Kt}),Lr(Cr(Ne,Tt))),Ce=Ce.current.alternate,Ce.flags|=65536,Dr&=-Dr,Ce.lanes|=Dr,Kt=Cr(Kt,Tt),Dr=Wy(Ce.stateNode,Kt,Dr),Zi(Ce,Dr),fv!==4&&(fv=2)),!1;var pn=Error(i(520),{cause:Kt});if(pn=Cr(pn,Tt),IT===null?IT=[pn]:IT.push(pn),fv!==4&&(fv=2),Ne===null)return!0;Kt=Cr(Kt,Tt),Tt=Ne;do{switch(Tt.tag){case 3:return Tt.flags|=65536,Ce=Dr&-Dr,Tt.lanes|=Ce,Ce=Wy(Tt.stateNode,Kt,Ce),Zi(Tt,Ce),!1;case 1:if(Ne=Tt.type,pn=Tt.stateNode,(Tt.flags&128)===0&&(typeof Ne.getDerivedStateFromError=="function"||pn!==null&&typeof pn.componentDidCatch=="function"&&(xS===null||!xS.has(pn))))return Tt.flags|=65536,Dr&=-Dr,Tt.lanes|=Dr,Dr=Pb(Dr),gx(Dr,Ce,Tt,Kt),Zi(Tt,Dr),!1}Tt=Tt.return}while(Tt!==null);return!1}function ov(Ce,Ne,Tt,Kt){Ne.child=Ce===null?q0(Ne,null,Tt,Kt):w_(Ne,Ce.child,Tt,Kt)}function _E(Ce,Ne,Tt,Kt,Dr){Tt=Tt.render;var pn=Ne.ref;if("ref"in Kt){var ta={};for(var vo in Kt)vo!=="ref"&&(ta[vo]=Kt[vo])}else ta=Kt;return m0(Ne),Kt=Ni(Ce,Ne,Tt,ta,pn,Dr),vo=Mi(),Ce!==null&&!Kp?(to(Ce,Ne,Dr),Y_(Ce,Ne,Dr)):(np&&vo&&Er(Ne),Ne.flags|=1,ov(Ce,Ne,Kt,Dr),Ne.child)}function Z5(Ce,Ne,Tt,Kt,Dr){if(Ce===null){var pn=Tt.type;return typeof pn=="function"&&!eh(pn)&&pn.defaultProps===void 0&&Tt.compare===null?(Ne.tag=15,Ne.type=pn,gA(Ce,Ne,pn,Kt,Dr)):(Ce=J_(Tt.type,null,Kt,Ne,Ne.mode,Dr),Ce.ref=Ne.ref,Ce.return=Ne,Ne.child=Ce)}if(pn=Ce.child,!cM(Ce,Dr)){var ta=pn.memoizedProps;if(Tt=Tt.compare,Tt=Tt!==null?Tt:Ys,Tt(ta,Kt)&&Ce.ref===Ne.ref)return Y_(Ce,Ne,Dr)}return Ne.flags|=1,Ce=Sx(pn,Kt),Ce.ref=Ne.ref,Ce.return=Ne,Ne.child=Ce}function gA(Ce,Ne,Tt,Kt,Dr){if(Ce!==null){var pn=Ce.memoizedProps;if(Ys(pn,Kt)&&Ce.ref===Ne.ref)if(Kp=!1,Ne.pendingProps=Kt=pn,cM(Ce,Dr))(Ce.flags&131072)!==0&&(Kp=!0);else return Ne.lanes=Ce.lanes,Y_(Ce,Ne,Dr)}return Vp(Ce,Ne,Tt,Kt,Dr)}function K5(Ce,Ne,Tt){var Kt=Ne.pendingProps,Dr=Kt.children,pn=(Ne.stateNode._pendingVisibility&2)!==0,ta=Ce!==null?Ce.memoizedState:null;if(wE(Ce,Ne),Kt.mode==="hidden"||pn){if((Ne.flags&128)!==0){if(Kt=ta!==null?ta.baseLanes|Tt:Tt,Ce!==null){for(Dr=Ne.child=Ce.child,pn=0;Dr!==null;)pn=pn|Dr.lanes|Dr.childLanes,Dr=Dr.sibling;Ne.childLanes=pn&~Kt}else Ne.childLanes=0,Ne.child=null;return J5(Ce,Ne,Kt,Tt)}if((Tt&536870912)!==0)Ne.memoizedState={baseLanes:0,cachePool:null},Ce!==null&&hy(Ne,ta!==null?ta.cachePool:null),ta!==null?Oo(Ne,ta):_s(),zl(Ne);else return Ne.lanes=Ne.childLanes=536870912,J5(Ce,Ne,ta!==null?ta.baseLanes|Tt:Tt,Tt)}else ta!==null?(hy(Ne,ta.cachePool),Oo(Ne,ta),jl(),Ne.memoizedState=null):(Ce!==null&&hy(Ne,null),_s(),jl());return ov(Ce,Ne,Dr,Tt),Ne.child}function J5(Ce,Ne,Tt,Kt){var Dr=AE();return Dr=Dr===null?null:{parent:ym?Fv._currentValue:Fv._currentValue2,pool:Dr},Ne.memoizedState={baseLanes:Tt,cachePool:Dr},Ce!==null&&hy(Ne,null),_s(),zl(Ne),Ce!==null&&EE(Ce,Ne,Kt,!0),null}function wE(Ce,Ne){var Tt=Ne.ref;if(Tt===null)Ce!==null&&Ce.ref!==null&&(Ne.flags|=2097664);else{if(typeof Tt!="function"&&typeof Tt!="object")throw Error(i(284));(Ce===null||Ce.ref!==Tt)&&(Ne.flags|=2097664)}}function Vp(Ce,Ne,Tt,Kt,Dr){return m0(Ne),Tt=Ni(Ce,Ne,Tt,Kt,void 0,Dr),Kt=Mi(),Ce!==null&&!Kp?(to(Ce,Ne,Dr),Y_(Ce,Ne,Dr)):(np&&Kt&&Er(Ne),Ne.flags|=1,ov(Ce,Ne,Tt,Dr),Ne.child)}function i_(Ce,Ne,Tt,Kt,Dr,pn){return m0(Ne),Ne.updateQueue=null,Tt=ts(Ne,Kt,Tt,Dr),Za(Ce),Kt=Mi(),Ce!==null&&!Kp?(to(Ce,Ne,pn),Y_(Ce,Ne,pn)):(np&&Kt&&Er(Ne),Ne.flags|=1,ov(Ce,Ne,Tt,pn),Ne.child)}function Db(Ce,Ne,Tt,Kt,Dr){if(m0(Ne),Ne.stateNode===null){var pn=g_,ta=Tt.contextType;typeof ta=="object"&&ta!==null&&(pn=jg(ta)),pn=new Tt(Kt,pn),Ne.memoizedState=pn.state!==null&&pn.state!==void 0?pn.state:null,pn.updater=S_,Ne.stateNode=pn,pn._reactInternals=Ne,pn=Ne.stateNode,pn.props=Kt,pn.state=Ne.memoizedState,pn.refs={},Qa(Ne),ta=Tt.contextType,pn.context=typeof ta=="object"&&ta!==null?jg(ta):g_,pn.state=Ne.memoizedState,ta=Tt.getDerivedStateFromProps,typeof ta=="function"&&($_(Ne,Tt,ta,Kt),pn.state=Ne.memoizedState),typeof Tt.getDerivedStateFromProps=="function"||typeof pn.getSnapshotBeforeUpdate=="function"||typeof pn.UNSAFE_componentWillMount!="function"&&typeof pn.componentWillMount!="function"||(ta=pn.state,typeof pn.componentWillMount=="function"&&pn.componentWillMount(),typeof pn.UNSAFE_componentWillMount=="function"&&pn.UNSAFE_componentWillMount(),ta!==pn.state&&S_.enqueueReplaceState(pn,pn.state,null),Ss(Ne,Kt,pn,Dr),za(),pn.state=Ne.memoizedState),typeof pn.componentDidMount=="function"&&(Ne.flags|=4194308),Kt=!0}else if(Ce===null){pn=Ne.stateNode;var vo=Ne.memoizedProps,fs=W_(Tt,vo);pn.props=fs;var xl=pn.context,cu=Tt.contextType;ta=g_,typeof cu=="object"&&cu!==null&&(ta=jg(cu));var $l=Tt.getDerivedStateFromProps;cu=typeof $l=="function"||typeof pn.getSnapshotBeforeUpdate=="function",vo=Ne.pendingProps!==vo,cu||typeof pn.UNSAFE_componentWillReceiveProps!="function"&&typeof pn.componentWillReceiveProps!="function"||(vo||xl!==ta)&&mA(Ne,pn,Kt,ta),uw=!1;var bc=Ne.memoizedState;pn.state=bc,Ss(Ne,Kt,pn,Dr),za(),xl=Ne.memoizedState,vo||bc!==xl||uw?(typeof $l=="function"&&($_(Ne,Tt,$l,Kt),xl=Ne.memoizedState),(fs=uw||v0(Ne,Tt,fs,Kt,bc,xl,ta))?(cu||typeof pn.UNSAFE_componentWillMount!="function"&&typeof pn.componentWillMount!="function"||(typeof pn.componentWillMount=="function"&&pn.componentWillMount(),typeof pn.UNSAFE_componentWillMount=="function"&&pn.UNSAFE_componentWillMount()),typeof pn.componentDidMount=="function"&&(Ne.flags|=4194308)):(typeof pn.componentDidMount=="function"&&(Ne.flags|=4194308),Ne.memoizedProps=Kt,Ne.memoizedState=xl),pn.props=Kt,pn.state=xl,pn.context=ta,Kt=fs):(typeof pn.componentDidMount=="function"&&(Ne.flags|=4194308),Kt=!1)}else{pn=Ne.stateNode,is(Ce,Ne),ta=Ne.memoizedProps,cu=W_(Tt,ta),pn.props=cu,$l=Ne.pendingProps,bc=pn.context,xl=Tt.contextType,fs=g_,typeof xl=="object"&&xl!==null&&(fs=jg(xl)),vo=Tt.getDerivedStateFromProps,(xl=typeof vo=="function"||typeof pn.getSnapshotBeforeUpdate=="function")||typeof pn.UNSAFE_componentWillReceiveProps!="function"&&typeof pn.componentWillReceiveProps!="function"||(ta!==$l||bc!==fs)&&mA(Ne,pn,Kt,fs),uw=!1,bc=Ne.memoizedState,pn.state=bc,Ss(Ne,Kt,pn,Dr),za();var md=Ne.memoizedState;ta!==$l||bc!==md||uw||Ce!==null&&Ce.dependencies!==null&&Dp(Ce.dependencies)?(typeof vo=="function"&&($_(Ne,Tt,vo,Kt),md=Ne.memoizedState),(cu=uw||v0(Ne,Tt,cu,Kt,bc,md,fs)||Ce!==null&&Ce.dependencies!==null&&Dp(Ce.dependencies))?(xl||typeof pn.UNSAFE_componentWillUpdate!="function"&&typeof pn.componentWillUpdate!="function"||(typeof pn.componentWillUpdate=="function"&&pn.componentWillUpdate(Kt,md,fs),typeof pn.UNSAFE_componentWillUpdate=="function"&&pn.UNSAFE_componentWillUpdate(Kt,md,fs)),typeof pn.componentDidUpdate=="function"&&(Ne.flags|=4),typeof pn.getSnapshotBeforeUpdate=="function"&&(Ne.flags|=1024)):(typeof pn.componentDidUpdate!="function"||ta===Ce.memoizedProps&&bc===Ce.memoizedState||(Ne.flags|=4),typeof pn.getSnapshotBeforeUpdate!="function"||ta===Ce.memoizedProps&&bc===Ce.memoizedState||(Ne.flags|=1024),Ne.memoizedProps=Kt,Ne.memoizedState=md),pn.props=Kt,pn.state=md,pn.context=fs,Kt=cu):(typeof pn.componentDidUpdate!="function"||ta===Ce.memoizedProps&&bc===Ce.memoizedState||(Ne.flags|=4),typeof pn.getSnapshotBeforeUpdate!="function"||ta===Ce.memoizedProps&&bc===Ce.memoizedState||(Ne.flags|=1024),Kt=!1)}return pn=Kt,wE(Ce,Ne),Kt=(Ne.flags&128)!==0,pn||Kt?(pn=Ne.stateNode,Tt=Kt&&typeof Tt.getDerivedStateFromError!="function"?null:pn.render(),Ne.flags|=1,Ce!==null&&Kt?(Ne.child=w_(Ne,Ce.child,null,Dr),Ne.child=w_(Ne,null,Tt,Dr)):ov(Ce,Ne,Tt,Dr),Ne.memoizedState=pn.state,Ce=Ne.child):Ce=Y_(Ce,Ne,Dr),Ce}function Q5(Ce,Ne,Tt,Kt){return jn(),Ne.flags|=256,ov(Ce,Ne,Tt,Kt),Ne.child}function SE(Ce){return{baseLanes:Ce,cachePool:eS()}}function Lb(Ce,Ne,Tt){return Ce=Ce!==null?Ce.childLanes&~Tt:0,Ne&&(Ce|=db),Ce}function yA(Ce,Ne,Tt){var Kt=Ne.pendingProps,Dr=!1,pn=(Ne.flags&128)!==0,ta;if((ta=pn)||(ta=Ce!==null&&Ce.memoizedState===null?!1:($g.current&2)!==0),ta&&(Dr=!0,Ne.flags&=-129),ta=(Ne.flags&32)!==0,Ne.flags&=-33,Ce===null){if(np){if(Dr?vu(Ne):jl(),np){var vo=w0,fs;(fs=vo)&&(vo=pR(vo,V0),vo!==null?(Ne.memoizedState={dehydrated:vo,treeContext:fS!==null?{id:Hb,overflow:Mx}:null,retryLane:536870912},fs=r(18,null,null,0),fs.stateNode=vo,fs.return=Ne,Ne.child=fs,j0=Ne,w0=null,fs=!0):fs=!1),fs||Un(Ne)}if(vo=Ne.memoizedState,vo!==null&&(vo=vo.dehydrated,vo!==null))return o2(vo)?Ne.lanes=16:Ne.lanes=536870912,null;Il(Ne)}return vo=Kt.children,Kt=Kt.fallback,Dr?(jl(),Dr=Ne.mode,vo=Qv({mode:"hidden",children:vo},Dr),Kt=wv(Kt,Dr,Tt,null),vo.return=Ne,Kt.return=Ne,vo.sibling=Kt,Ne.child=vo,Dr=Ne.child,Dr.memoizedState=SE(Tt),Dr.childLanes=Lb(Ce,ta,Tt),Ne.memoizedState=PM,Kt):(vu(Ne),TE(Ne,vo))}if(fs=Ce.memoizedState,fs!==null&&(vo=fs.dehydrated,vo!==null)){if(pn)Ne.flags&256?(vu(Ne),Ne.flags&=-257,Ne=dy(Ce,Ne,Tt)):Ne.memoizedState!==null?(jl(),Ne.child=Ce.child,Ne.flags|=128,Ne=null):(jl(),Dr=Kt.fallback,vo=Ne.mode,Kt=Qv({mode:"visible",children:Kt.children},vo),Dr=wv(Dr,vo,Tt,null),Dr.flags|=2,Kt.return=Ne,Dr.return=Ne,Kt.sibling=Dr,Ne.child=Kt,w_(Ne,Ce.child,null,Tt),Kt=Ne.child,Kt.memoizedState=SE(Tt),Kt.childLanes=Lb(Ce,ta,Tt),Ne.memoizedState=PM,Ne=Dr);else if(vu(Ne),o2(vo))ta=VA(vo).digest,Kt=Error(i(419)),Kt.stack="",Kt.digest=ta,Lr({value:Kt,source:null,stack:null}),Ne=dy(Ce,Ne,Tt);else if(Kp||EE(Ce,Ne,Tt,!1),ta=(Tt&Ce.childLanes)!==0,Kp||ta){if(ta=Jp,ta!==null){if(Kt=Tt&-Tt,(Kt&42)!==0)Kt=1;else switch(Kt){case 2:Kt=1;break;case 8:Kt=4;break;case 32:Kt=16;break;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:case 4194304:case 8388608:case 16777216:case 33554432:Kt=64;break;case 268435456:Kt=134217728;break;default:Kt=0}if(Kt=(Kt&(ta.suspendedLanes|Tt))!==0?0:Kt,Kt!==0&&Kt!==fs.retryLane)throw fs.retryLane=Kt,bn(Ce,Kt),rg(ta,Ce,Kt),v2}YE(vo)||Ob(),Ne=dy(Ce,Ne,Tt)}else YE(vo)?(Ne.flags|=128,Ne.child=Ce.child,Ne=Vi.bind(null,Ce),qA(vo,Ne),Ne=null):(Ce=fs.treeContext,ig&&(w0=ZE(vo),j0=Ne,np=!0,Rx=null,V0=!1,Ce!==null&&(L1[_0++]=Hb,L1[_0++]=Mx,L1[_0++]=fS,Hb=Ce.id,Mx=Ce.overflow,fS=Ne)),Ne=TE(Ne,Kt.children),Ne.flags|=4096);return Ne}return Dr?(jl(),Dr=Kt.fallback,vo=Ne.mode,fs=Ce.child,pn=fs.sibling,Kt=Sx(fs,{mode:"hidden",children:Kt.children}),Kt.subtreeFlags=fs.subtreeFlags&31457280,pn!==null?Dr=Sx(pn,Dr):(Dr=wv(Dr,vo,Tt,null),Dr.flags|=2),Dr.return=Ne,Kt.return=Ne,Kt.sibling=Dr,Ne.child=Kt,Kt=Dr,Dr=Ne.child,vo=Ce.child.memoizedState,vo===null?vo=SE(Tt):(fs=vo.cachePool,fs!==null?(pn=ym?Fv._currentValue:Fv._currentValue2,fs=fs.parent!==pn?{parent:pn,pool:pn}:fs):fs=eS(),vo={baseLanes:vo.baseLanes|Tt,cachePool:fs}),Dr.memoizedState=vo,Dr.childLanes=Lb(Ce,ta,Tt),Ne.memoizedState=PM,Kt):(vu(Ne),Tt=Ce.child,Ce=Tt.sibling,Tt=Sx(Tt,{mode:"visible",children:Kt.children}),Tt.return=Ne,Tt.sibling=null,Ce!==null&&(ta=Ne.deletions,ta===null?(Ne.deletions=[Ce],Ne.flags|=16):ta.push(Ce)),Ne.child=Tt,Ne.memoizedState=null,Tt)}function TE(Ce,Ne){return Ne=Qv({mode:"visible",children:Ne},Ce.mode),Ne.return=Ce,Ce.child=Ne}function Qv(Ce,Ne){return OE(Ce,Ne,0,null)}function dy(Ce,Ne,Tt){return w_(Ne,Ce.child,null,Tt),Ce=TE(Ne,Ne.pendingProps.children),Ce.flags|=2,Ne.memoizedState=null,Ce}function uM(Ce,Ne,Tt){Ce.lanes|=Ne;var Kt=Ce.alternate;Kt!==null&&(Kt.lanes|=Ne),xA(Ce.return,Ne,Tt)}function aT(Ce,Ne,Tt,Kt,Dr){var pn=Ce.memoizedState;pn===null?Ce.memoizedState={isBackwards:Ne,rendering:null,renderingStartTime:0,last:Kt,tail:Tt,tailMode:Dr}:(pn.isBackwards=Ne,pn.rendering=null,pn.renderingStartTime=0,pn.last=Kt,pn.tail=Tt,pn.tailMode=Dr)}function bA(Ce,Ne,Tt){var Kt=Ne.pendingProps,Dr=Kt.revealOrder,pn=Kt.tail;if(ov(Ce,Ne,Kt.children,Tt),Kt=$g.current,(Kt&2)!==0)Kt=Kt&1|2,Ne.flags|=128;else{if(Ce!==null&&(Ce.flags&128)!==0)e:for(Ce=Ne.child;Ce!==null;){if(Ce.tag===13)Ce.memoizedState!==null&&uM(Ce,Tt,Ne);else if(Ce.tag===19)uM(Ce,Tt,Ne);else if(Ce.child!==null){Ce.child.return=Ce,Ce=Ce.child;continue}if(Ce===Ne)break e;for(;Ce.sibling===null;){if(Ce.return===null||Ce.return===Ne)break e;Ce=Ce.return}Ce.sibling.return=Ce.return,Ce=Ce.sibling}Kt&=1}switch(ve($g,Kt),Dr){case"forwards":for(Tt=Ne.child,Dr=null;Tt!==null;)Ce=Tt.alternate,Ce!==null&&Js(Ce)===null&&(Dr=Tt),Tt=Tt.sibling;Tt=Dr,Tt===null?(Dr=Ne.child,Ne.child=null):(Dr=Tt.sibling,Tt.sibling=null),aT(Ne,!1,Dr,Tt,pn);break;case"backwards":for(Tt=null,Dr=Ne.child,Ne.child=null;Dr!==null;){if(Ce=Dr.alternate,Ce!==null&&Js(Ce)===null){Ne.child=Dr;break}Ce=Dr.sibling,Dr.sibling=Tt,Tt=Dr,Dr=Ce}aT(Ne,!0,Tt,null,pn);break;case"together":aT(Ne,!1,null,null,void 0);break;default:Ne.memoizedState=null}return Ne.child}function Y_(Ce,Ne,Tt){if(Ce!==null&&(Ne.dependencies=Ce.dependencies),Zb|=Ne.lanes,(Tt&Ne.childLanes)===0)if(Ce!==null){if(EE(Ce,Ne,Tt,!1),(Tt&Ne.childLanes)===0)return null}else return null;if(Ce!==null&&Ne.child!==Ce.child)throw Error(i(153));if(Ne.child!==null){for(Ce=Ne.child,Tt=Sx(Ce,Ce.pendingProps),Ne.child=Tt,Tt.return=Ne;Ce.sibling!==null;)Ce=Ce.sibling,Tt=Tt.sibling=Sx(Ce,Ce.pendingProps),Tt.return=Ne;Tt.sibling=null}return Ne.child}function cM(Ce,Ne){return(Ce.lanes&Ne)!==0?!0:(Ce=Ce.dependencies,!!(Ce!==null&&Dp(Ce)))}function fM(Ce,Ne,Tt){switch(Ne.tag){case 3:or(Ne,Ne.stateNode.containerInfo),a_(Ne,Fv,Ce.memoizedState.cache),jn();break;case 27:case 5:Ir(Ne);break;case 4:or(Ne,Ne.stateNode.containerInfo);break;case 10:a_(Ne,Ne.type,Ne.memoizedProps.value);break;case 13:var Kt=Ne.memoizedState;if(Kt!==null)return Kt.dehydrated!==null?(vu(Ne),Ne.flags|=128,null):(Tt&Ne.child.childLanes)!==0?yA(Ce,Ne,Tt):(vu(Ne),Ce=Y_(Ce,Ne,Tt),Ce!==null?Ce.sibling:null);vu(Ne);break;case 19:var Dr=(Ce.flags&128)!==0;if(Kt=(Tt&Ne.childLanes)!==0,Kt||(EE(Ce,Ne,Tt,!1),Kt=(Tt&Ne.childLanes)!==0),Dr){if(Kt)return bA(Ce,Ne,Tt);Ne.flags|=128}if(Dr=Ne.memoizedState,Dr!==null&&(Dr.rendering=null,Dr.tail=null,Dr.lastEffect=null),ve($g,$g.current),Kt)break;return null;case 22:case 23:return Ne.lanes=0,K5(Ce,Ne,Tt);case 24:a_(Ne,Fv,Ce.memoizedState.cache)}return Y_(Ce,Ne,Tt)}function eR(Ce,Ne,Tt){if(Ce!==null)if(Ce.memoizedProps!==Ne.pendingProps)Kp=!0;else{if(!cM(Ce,Tt)&&(Ne.flags&128)===0)return Kp=!1,fM(Ce,Ne,Tt);Kp=(Ce.flags&131072)!==0}else Kp=!1,np&&(Ne.flags&1048576)!==0&&Vt(Ne,x_,Ne.index);switch(Ne.lanes=0,Ne.tag){case 16:e:{Ce=Ne.pendingProps;var Kt=Ne.elementType,Dr=Kt._init;if(Kt=Dr(Kt._payload),Ne.type=Kt,typeof Kt=="function")eh(Kt)?(Ce=W_(Kt,Ce),Ne.tag=1,Ne=Db(null,Ne,Kt,Ce,Tt)):(Ne.tag=0,Ne=Vp(null,Ne,Kt,Ce,Tt));else{if(Kt!=null){if(Dr=Kt.$$typeof,Dr===PA){Ne.tag=11,Ne=_E(null,Ne,Kt,Ce,Tt);break e}else if(Dr===gT){Ne.tag=14,Ne=Z5(null,Ne,Kt,Ce,Tt);break e}}throw Ne=o(Kt)||Kt,Error(i(306,Ne,""))}}return Ne;case 0:return Vp(Ce,Ne,Ne.type,Ne.pendingProps,Tt);case 1:return Kt=Ne.type,Dr=W_(Kt,Ne.pendingProps),Db(Ce,Ne,Kt,Dr,Tt);case 3:e:{if(or(Ne,Ne.stateNode.containerInfo),Ce===null)throw Error(i(387));var pn=Ne.pendingProps;Dr=Ne.memoizedState,Kt=Dr.element,is(Ce,Ne),Ss(Ne,pn,null,Tt);var ta=Ne.memoizedState;if(pn=ta.cache,a_(Ne,Fv,pn),pn!==Dr.cache&&Q2(Ne,[Fv],Tt,!0),za(),pn=ta.element,ig&&Dr.isDehydrated)if(Dr={element:pn,isDehydrated:!1,cache:ta.cache},Ne.updateQueue.baseState=Dr,Ne.memoizedState=Dr,Ne.flags&256){Ne=Q5(Ce,Ne,pn,Tt);break e}else if(pn!==Kt){Kt=Cr(Error(i(424)),Ne),Lr(Kt),Ne=Q5(Ce,Ne,pn,Tt);break e}else for(ig&&(w0=hR(Ne.stateNode.containerInfo),j0=Ne,np=!0,Rx=null,V0=!0),Tt=q0(Ne,null,pn,Tt),Ne.child=Tt;Tt;)Tt.flags=Tt.flags&-3|4096,Tt=Tt.sibling;else{if(jn(),pn===Kt){Ne=Y_(Ce,Ne,Tt);break e}ov(Ce,Ne,pn,Tt)}Ne=Ne.child}return Ne;case 26:if(t1)return wE(Ce,Ne),Ce===null?(Tt=JE(Ne.type,null,Ne.pendingProps,null))?Ne.memoizedState=Tt:np||(Ne.stateNode=uS(Ne.type,Ne.pendingProps,sw.current,Ne)):Ne.memoizedState=JE(Ne.type,Ce.memoizedProps,Ne.pendingProps,Ce.memoizedState),null;case 27:if(lv)return Ir(Ne),Ce===null&&lv&&np&&(Kt=Ne.stateNode=xy(Ne.type,Ne.pendingProps,sw.current,rp.current,!1),j0=Ne,V0=!0,w0=XE(Kt)),Kt=Ne.pendingProps.children,Ce!==null||np?ov(Ce,Ne,Kt,Tt):Ne.child=w_(Ne,null,Kt,Tt),wE(Ce,Ne),Ne.child;case 5:return Ce===null&&np&&(AM(Ne.type,Ne.pendingProps,rp.current),(Dr=Kt=w0)&&(Kt=eI(Kt,Ne.type,Ne.pendingProps,V0),Kt!==null?(Ne.stateNode=Kt,j0=Ne,w0=XE(Kt),V0=!1,Dr=!0):Dr=!1),Dr||Un(Ne)),Ir(Ne),Dr=Ne.type,pn=Ne.pendingProps,ta=Ce!==null?Ce.memoizedProps:null,Kt=pn.children,Fd(Dr,pn)?Kt=null:ta!==null&&Fd(Dr,ta)&&(Ne.flags|=32),Ne.memoizedState!==null&&(Dr=Ni(Ce,Ne,ps,null,null,Tt),ym?P1._currentValue=Dr:P1._currentValue2=Dr),wE(Ce,Ne),ov(Ce,Ne,Kt,Tt),Ne.child;case 6:return Ce===null&&np&&(rI(Ne.pendingProps,rp.current),(Ce=Tt=w0)&&(Tt=ST(Tt,Ne.pendingProps,V0),Tt!==null?(Ne.stateNode=Tt,j0=Ne,w0=null,Ce=!0):Ce=!1),Ce||Un(Ne)),null;case 13:return yA(Ce,Ne,Tt);case 4:return or(Ne,Ne.stateNode.containerInfo),Kt=Ne.pendingProps,Ce===null?Ne.child=w_(Ne,null,Kt,Tt):ov(Ce,Ne,Kt,Tt),Ne.child;case 11:return _E(Ce,Ne,Ne.type,Ne.pendingProps,Tt);case 7:return ov(Ce,Ne,Ne.pendingProps,Tt),Ne.child;case 8:return ov(Ce,Ne,Ne.pendingProps.children,Tt),Ne.child;case 12:return ov(Ce,Ne,Ne.pendingProps.children,Tt),Ne.child;case 10:return Kt=Ne.pendingProps,a_(Ne,Ne.type,Kt.value),ov(Ce,Ne,Kt.children,Tt),Ne.child;case 9:return Dr=Ne.type._context,Kt=Ne.pendingProps.children,m0(Ne),Dr=jg(Dr),Kt=Kt(Dr),Ne.flags|=1,ov(Ce,Ne,Kt,Tt),Ne.child;case 14:return Z5(Ce,Ne,Ne.type,Ne.pendingProps,Tt);case 15:return gA(Ce,Ne,Ne.type,Ne.pendingProps,Tt);case 19:return bA(Ce,Ne,Tt);case 22:return K5(Ce,Ne,Tt);case 24:return m0(Ne),Kt=jg(Fv),Ce===null?(Dr=AE(),Dr===null&&(Dr=Jp,pn=yx(),Dr.pooledCache=pn,pn.refCount++,pn!==null&&(Dr.pooledCacheLanes|=Tt),Dr=pn),Ne.memoizedState={parent:Kt,cache:Dr},Qa(Ne),a_(Ne,Fv,Dr)):((Ce.lanes&Tt)!==0&&(is(Ce,Ne),Ss(Ne,null,null,Tt),za()),Dr=Ce.memoizedState,pn=Ne.memoizedState,Dr.parent!==Kt?(Dr={parent:Kt,cache:Kt},Ne.memoizedState=Dr,Ne.lanes===0&&(Ne.memoizedState=Ne.updateQueue.baseState=Dr),a_(Ne,Fv,Kt)):(Kt=pn.cache,a_(Ne,Fv,Kt),Kt!==Dr.cache&&Q2(Ne,[Fv],Tt,!0))),ov(Ce,Ne,Ne.pendingProps.children,Tt),Ne.child;case 29:throw Ne.pendingProps}throw Error(i(156,Ne.tag))}function a_(Ce,Ne,Tt){ym?(ve(hw,Ne._currentValue),Ne._currentValue=Tt):(ve(hw,Ne._currentValue2),Ne._currentValue2=Tt)}function C1(Ce){var Ne=hw.current;ym?Ce._currentValue=Ne:Ce._currentValue2=Ne,U(hw)}function xA(Ce,Ne,Tt){for(;Ce!==null;){var Kt=Ce.alternate;if((Ce.childLanes&Ne)!==Ne?(Ce.childLanes|=Ne,Kt!==null&&(Kt.childLanes|=Ne)):Kt!==null&&(Kt.childLanes&Ne)!==Ne&&(Kt.childLanes|=Ne),Ce===Tt)break;Ce=Ce.return}}function Q2(Ce,Ne,Tt,Kt){var Dr=Ce.child;for(Dr!==null&&(Dr.return=Ce);Dr!==null;){var pn=Dr.dependencies;if(pn!==null){var ta=Dr.child;pn=pn.firstContext;e:for(;pn!==null;){var vo=pn;pn=Dr;for(var fs=0;fs<Ne.length;fs++)if(vo.context===Ne[fs]){pn.lanes|=Tt,vo=pn.alternate,vo!==null&&(vo.lanes|=Tt),xA(pn.return,Tt,Ce),Kt||(ta=null);break e}pn=vo.next}}else if(Dr.tag===18){if(ta=Dr.return,ta===null)throw Error(i(341));ta.lanes|=Tt,pn=ta.alternate,pn!==null&&(pn.lanes|=Tt),xA(ta,Tt,Ce),ta=null}else ta=Dr.child;if(ta!==null)ta.return=Dr;else for(ta=Dr;ta!==null;){if(ta===Ce){ta=null;break}if(Dr=ta.sibling,Dr!==null){Dr.return=ta.return,ta=Dr;break}ta=ta.return}Dr=ta}}function EE(Ce,Ne,Tt,Kt){Ce=null;for(var Dr=Ne,pn=!1;Dr!==null;){if(!pn){if((Dr.flags&524288)!==0)pn=!0;else if((Dr.flags&262144)!==0)break}if(Dr.tag===10){var ta=Dr.alternate;if(ta===null)throw Error(i(387));if(ta=ta.memoizedProps,ta!==null){var vo=Dr.type;n1(Dr.pendingProps.value,ta.value)||(Ce!==null?Ce.push(vo):Ce=[vo])}}else if(Dr===c2.current){if(ta=Dr.alternate,ta===null)throw Error(i(387));ta.memoizedState.memoizedState!==Dr.memoizedState.memoizedState&&(Ce!==null?Ce.push(P1):Ce=[P1])}Dr=Dr.return}Ce!==null&&Q2(Ne,Ce,Tt,Kt),Ne.flags|=262144}function Dp(Ce){for(Ce=Ce.firstContext;Ce!==null;){var Ne=Ce.context;if(!n1(ym?Ne._currentValue:Ne._currentValue2,Ce.memoizedValue))return!0;Ce=Ce.next}return!1}function m0(Ce){Lx=Ce,Bm=null,Ce=Ce.dependencies,Ce!==null&&(Ce.firstContext=null)}function jg(Ce){return sT(Lx,Ce)}function oT(Ce,Ne){return Lx===null&&m0(Ce),sT(Ce,Ne)}function sT(Ce,Ne){var Tt=ym?Ne._currentValue:Ne._currentValue2;if(Ne={context:Ne,memoizedValue:Tt,next:null},Bm===null){if(Ce===null)throw Error(i(308));Bm=Ne,Ce.dependencies={lanes:0,firstContext:Ne},Ce.flags|=524288}else Bm=Bm.next=Ne;return Tt}function yx(){return{controller:new pw,data:new Map,refCount:0}}function o_(Ce){Ce.refCount--,Ce.refCount===0&&DM(gR,function(){Ce.controller.abort()})}function AE(){var Ce=vw.current;return Ce!==null?Ce:Jp.pooledCache}function hy(Ce,Ne){Ne===null?ve(vw,vw.current):ve(vw,Ne.pool)}function eS(){var Ce=AE();return Ce===null?null:{parent:ym?Fv._currentValue:Fv._currentValue2,pool:Ce}}function Nm(Ce){Ce.flags|=4}function tS(Ce,Ne){if(Ce!==null&&Ce.child===Ne.child)return!1;if((Ne.flags&16)!==0)return!0;for(Ce=Ne.child;Ce!==null;){if((Ce.flags&13878)!==0||(Ce.subtreeFlags&13878)!==0)return!0;Ce=Ce.sibling}return!1}function X_(Ce,Ne,Tt,Kt){if(Gg)for(Tt=Ne.child;Tt!==null;){if(Tt.tag===5||Tt.tag===6)LA(Ce,Tt.stateNode);else if(!(Tt.tag===4||lv&&Tt.tag===27)&&Tt.child!==null){Tt.child.return=Tt,Tt=Tt.child;continue}if(Tt===Ne)break;for(;Tt.sibling===null;){if(Tt.return===null||Tt.return===Ne)return;Tt=Tt.return}Tt.sibling.return=Tt.return,Tt=Tt.sibling}else if(I1)for(var Dr=Ne.child;Dr!==null;){if(Dr.tag===5){var pn=Dr.stateNode;Tt&&Kt&&(pn=jA(pn,Dr.type,Dr.memoizedProps)),LA(Ce,pn)}else if(Dr.tag===6)pn=Dr.stateNode,Tt&&Kt&&(pn=D1(pn,Dr.memoizedProps)),LA(Ce,pn);else if(Dr.tag!==4){if(Dr.tag===22&&Dr.memoizedState!==null)pn=Dr.child,pn!==null&&(pn.return=Dr),X_(Ce,Dr,!0,!0);else if(Dr.child!==null){Dr.child.return=Dr,Dr=Dr.child;continue}}if(Dr===Ne)break;for(;Dr.sibling===null;){if(Dr.return===null||Dr.return===Ne)return;Dr=Dr.return}Dr.sibling.return=Dr.return,Dr=Dr.sibling}}function dM(Ce,Ne,Tt,Kt){if(I1)for(var Dr=Ne.child;Dr!==null;){if(Dr.tag===5){var pn=Dr.stateNode;Tt&&Kt&&(pn=jA(pn,Dr.type,Dr.memoizedProps)),a2(Ce,pn)}else if(Dr.tag===6)pn=Dr.stateNode,Tt&&Kt&&(pn=D1(pn,Dr.memoizedProps)),a2(Ce,pn);else if(Dr.tag!==4){if(Dr.tag===22&&Dr.memoizedState!==null)pn=Dr.child,pn!==null&&(pn.return=Dr),dM(Ce,Dr,!(Dr.memoizedProps!==null&&Dr.memoizedProps.mode==="manual"),!0);else if(Dr.child!==null){Dr.child.return=Dr,Dr=Dr.child;continue}}if(Dr===Ne)break;for(;Dr.sibling===null;){if(Dr.return===null||Dr.return===Ne)return;Dr=Dr.return}Dr.sibling.return=Dr.return,Dr=Dr.sibling}}function CE(Ce,Ne){if(I1&&tS(Ce,Ne)){Ce=Ne.stateNode;var Tt=Ce.containerInfo,Kt=HA();dM(Kt,Ne,!1,!1),Ce.pendingChildren=Kt,Nm(Ne),wT(Tt,Kt)}}function _A(Ce,Ne,Tt,Kt){if(Gg)Ce.memoizedProps!==Kt&&Nm(Ne);else if(I1){var Dr=Ce.stateNode,pn=Ce.memoizedProps;if((Ce=tS(Ce,Ne))||pn!==Kt){var ta=rp.current;pn=_T(Dr,Tt,pn,Kt,!Ce,null),pn===Dr?Ne.stateNode=Dr:(Ex(pn,Tt,Kt,ta)&&Nm(Ne),Ne.stateNode=pn,Ce?X_(pn,Ne,!1,!1):Nm(Ne))}else Ne.stateNode=Dr}}function wA(Ce,Ne,Tt){if(UE(Ne,Tt)){if(Ce.flags|=16777216,!aS(Ne,Tt))if(em())Ce.flags|=8192;else throw fw=h2,i3}else Ce.flags&=-16777217}function hM(Ce,Ne){if(MM(Ne)){if(Ce.flags|=16777216,!u2(Ne))if(em())Ce.flags|=8192;else throw fw=h2,i3}else Ce.flags&=-16777217}function s_(Ce,Ne){Ne!==null&&(Ce.flags|=4),Ce.flags&16384&&(Ne=Ce.tag!==22?Je():536870912,Ce.lanes|=Ne,E_|=Ne)}function ME(Ce,Ne){if(!np)switch(Ce.tailMode){case"hidden":Ne=Ce.tail;for(var Tt=null;Ne!==null;)Ne.alternate!==null&&(Tt=Ne),Ne=Ne.sibling;Tt===null?Ce.tail=null:Tt.sibling=null;break;case"collapsed":Tt=Ce.tail;for(var Kt=null;Tt!==null;)Tt.alternate!==null&&(Kt=Tt),Tt=Tt.sibling;Kt===null?Ne||Ce.tail===null?Ce.tail=null:Ce.tail.sibling=null:Kt.sibling=null}}function mm(Ce){var Ne=Ce.alternate!==null&&Ce.alternate.child===Ce.child,Tt=0,Kt=0;if(Ne)for(var Dr=Ce.child;Dr!==null;)Tt|=Dr.lanes|Dr.childLanes,Kt|=Dr.subtreeFlags&31457280,Kt|=Dr.flags&31457280,Dr.return=Ce,Dr=Dr.sibling;else for(Dr=Ce.child;Dr!==null;)Tt|=Dr.lanes|Dr.childLanes,Kt|=Dr.subtreeFlags,Kt|=Dr.flags,Dr.return=Ce,Dr=Dr.sibling;return Ce.subtreeFlags|=Kt,Ce.childLanes=Tt,Ne}function SA(Ce,Ne,Tt){var Kt=Ne.pendingProps;switch(sr(Ne),Ne.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return mm(Ne),null;case 1:return mm(Ne),null;case 3:return Tt=Ne.stateNode,Kt=null,Ce!==null&&(Kt=Ce.memoizedState.cache),Ne.memoizedState.cache!==Kt&&(Ne.flags|=2048),C1(Fv),Ar(),Tt.pendingContext&&(Tt.context=Tt.pendingContext,Tt.pendingContext=null),(Ce===null||Ce.child===null)&&(Vn(Ne)?Nm(Ne):Ce===null||Ce.memoizedState.isDehydrated&&(Ne.flags&256)===0||(Ne.flags|=1024,Rx!==null&&(EA(Rx),Rx=null))),CE(Ce,Ne),mm(Ne),null;case 26:if(t1){Tt=Ne.type;var Dr=Ne.memoizedState;return Ce===null?(Nm(Ne),Dr!==null?(mm(Ne),hM(Ne,Dr)):(mm(Ne),wA(Ne,Tt,Kt))):Dr?Dr!==Ce.memoizedState?(Nm(Ne),mm(Ne),hM(Ne,Dr)):(mm(Ne),Ne.flags&=-16777217):(Gg?Ce.memoizedProps!==Kt&&Nm(Ne):_A(Ce,Ne,Tt,Kt),mm(Ne),wA(Ne,Tt,Kt)),null}case 27:if(lv){if(_n(Ne),Tt=sw.current,Dr=Ne.type,Ce!==null&&Ne.stateNode!=null)Gg?Ce.memoizedProps!==Kt&&Nm(Ne):_A(Ce,Ne,Dr,Kt);else{if(!Kt){if(Ne.stateNode===null)throw Error(i(166));return mm(Ne),null}Ce=rp.current,Vn(Ne)?Qn(Ne,Ce):(Ce=xy(Dr,Kt,Tt,Ce,!0),Ne.stateNode=Ce,Nm(Ne))}return mm(Ne),null}case 5:if(_n(Ne),Tt=Ne.type,Ce!==null&&Ne.stateNode!=null)_A(Ce,Ne,Tt,Kt);else{if(!Kt){if(Ne.stateNode===null)throw Error(i(166));return mm(Ne),null}Ce=rp.current,Vn(Ne)?Qn(Ne,Ce):(Dr=yM(Tt,Kt,sw.current,Ce,Ne),X_(Dr,Ne,!1,!1),Ne.stateNode=Dr,Ex(Dr,Tt,Kt,Ce)&&Nm(Ne))}return mm(Ne),wA(Ne,Ne.type,Ne.pendingProps),null;case 6:if(Ce&&Ne.stateNode!=null)Tt=Ce.memoizedProps,Gg?Tt!==Kt&&Nm(Ne):I1&&(Tt!==Kt?(Ne.stateNode=Yp(Kt,sw.current,rp.current,Ne),Nm(Ne)):Ne.stateNode=Ce.stateNode);else{if(typeof Kt!="string"&&Ne.stateNode===null)throw Error(i(166));if(Ce=sw.current,Tt=rp.current,Vn(Ne)){if(!ig)throw Error(i(176));if(Ce=Ne.stateNode,Tt=Ne.memoizedProps,Kt=null,Dr=j0,Dr!==null)switch(Dr.tag){case 27:case 5:Kt=Dr.memoizedProps}GA(Ce,Tt,Ne,Kt)||Un(Ne)}else Ne.stateNode=Yp(Kt,Ce,Tt,Ne)}return mm(Ne),null;case 13:if(Kt=Ne.memoizedState,Ce===null||Ce.memoizedState!==null&&Ce.memoizedState.dehydrated!==null){if(Dr=Vn(Ne),Kt!==null&&Kt.dehydrated!==null){if(Ce===null){if(!Dr)throw Error(i(318));if(!ig)throw Error(i(344));if(Dr=Ne.memoizedState,Dr=Dr!==null?Dr.dehydrated:null,!Dr)throw Error(i(317));nw(Dr,Ne)}else jn(),(Ne.flags&128)===0&&(Ne.memoizedState=null),Ne.flags|=4;mm(Ne),Dr=!1}else Rx!==null&&(EA(Rx),Rx=null),Dr=!0;if(!Dr)return Ne.flags&256?(Il(Ne),Ne):(Il(Ne),null)}if(Il(Ne),(Ne.flags&128)!==0)return Ne.lanes=Tt,Ne;if(Tt=Kt!==null,Ce=Ce!==null&&Ce.memoizedState!==null,Tt){Kt=Ne.child,Dr=null,Kt.alternate!==null&&Kt.alternate.memoizedState!==null&&Kt.alternate.memoizedState.cachePool!==null&&(Dr=Kt.alternate.memoizedState.cachePool.pool);var pn=null;Kt.memoizedState!==null&&Kt.memoizedState.cachePool!==null&&(pn=Kt.memoizedState.cachePool.pool),pn!==Dr&&(Kt.flags|=2048)}return Tt!==Ce&&Tt&&(Ne.child.flags|=8192),s_(Ne,Ne.updateQueue),mm(Ne),null;case 4:return Ar(),CE(Ce,Ne),Ce===null&&th(Ne.stateNode.containerInfo),mm(Ne),null;case 10:return C1(Ne.type),mm(Ne),null;case 19:if(U($g),Dr=Ne.memoizedState,Dr===null)return mm(Ne),null;if(Kt=(Ne.flags&128)!==0,pn=Dr.rendering,pn===null)if(Kt)ME(Dr,!1);else{if(fv!==0||Ce!==null&&(Ce.flags&128)!==0)for(Ce=Ne.child;Ce!==null;){if(pn=Js(Ce),pn!==null){for(Ne.flags|=128,ME(Dr,!1),Ce=pn.updateQueue,Ne.updateQueue=Ce,s_(Ne,Ce),Ne.subtreeFlags=0,Ce=Tt,Tt=Ne.child;Tt!==null;)hT(Tt,Ce),Tt=Tt.sibling;return ve($g,$g.current&1|2),Ne.child}Ce=Ce.sibling}Dr.tail!==null&&n0()>l3&&(Ne.flags|=128,Kt=!0,ME(Dr,!1),Ne.lanes=4194304)}else{if(!Kt)if(Ce=Js(pn),Ce!==null){if(Ne.flags|=128,Kt=!0,Ce=Ce.updateQueue,Ne.updateQueue=Ce,s_(Ne,Ce),ME(Dr,!0),Dr.tail===null&&Dr.tailMode==="hidden"&&!pn.alternate&&!np)return mm(Ne),null}else 2*n0()-Dr.renderingStartTime>l3&&Tt!==536870912&&(Ne.flags|=128,Kt=!0,ME(Dr,!1),Ne.lanes=4194304);Dr.isBackwards?(pn.sibling=Ne.child,Ne.child=pn):(Ce=Dr.last,Ce!==null?Ce.sibling=pn:Ne.child=pn,Dr.last=pn)}return Dr.tail!==null?(Ne=Dr.tail,Dr.rendering=Ne,Dr.tail=Ne.sibling,Dr.renderingStartTime=n0(),Ne.sibling=null,Ce=$g.current,ve($g,Kt?Ce&1|2:Ce&1),Ne):(mm(Ne),null);case 22:case 23:return Il(Ne),nl(),Kt=Ne.memoizedState!==null,Ce!==null?Ce.memoizedState!==null!==Kt&&(Ne.flags|=8192):Kt&&(Ne.flags|=8192),Kt?(Tt&536870912)!==0&&(Ne.flags&128)===0&&(mm(Ne),Ne.subtreeFlags&6&&(Ne.flags|=8192)):mm(Ne),Tt=Ne.updateQueue,Tt!==null&&s_(Ne,Tt.retryQueue),Tt=null,Ce!==null&&Ce.memoizedState!==null&&Ce.memoizedState.cachePool!==null&&(Tt=Ce.memoizedState.cachePool.pool),Kt=null,Ne.memoizedState!==null&&Ne.memoizedState.cachePool!==null&&(Kt=Ne.memoizedState.cachePool.pool),Kt!==Tt&&(Ne.flags|=2048),Ce!==null&&U(vw),null;case 24:return Tt=null,Ce!==null&&(Tt=Ce.memoizedState.cache),Ne.memoizedState.cache!==Tt&&(Ne.flags|=2048),C1(Fv),mm(Ne),null;case 25:return null}throw Error(i(156,Ne.tag))}function lT(Ce,Ne){switch(sr(Ne),Ne.tag){case 1:return Ce=Ne.flags,Ce&65536?(Ne.flags=Ce&-65537|128,Ne):null;case 3:return C1(Fv),Ar(),Ce=Ne.flags,(Ce&65536)!==0&&(Ce&128)===0?(Ne.flags=Ce&-65537|128,Ne):null;case 26:case 27:case 5:return _n(Ne),null;case 13:if(Il(Ne),Ce=Ne.memoizedState,Ce!==null&&Ce.dehydrated!==null){if(Ne.alternate===null)throw Error(i(340));jn()}return Ce=Ne.flags,Ce&65536?(Ne.flags=Ce&-65537|128,Ne):null;case 19:return U($g),null;case 4:return Ar(),null;case 10:return C1(Ne.type),null;case 22:case 23:return Il(Ne),nl(),Ce!==null&&U(vw),Ce=Ne.flags,Ce&65536?(Ne.flags=Ce&-65537|128,Ne):null;case 24:return C1(Fv),null;case 25:return null;default:return null}}function bx(Ce,Ne){switch(sr(Ne),Ne.tag){case 3:C1(Fv),Ar();break;case 26:case 27:case 5:_n(Ne);break;case 4:Ar();break;case 13:Il(Ne);break;case 19:U($g);break;case 10:C1(Ne.type);break;case 22:case 23:Il(Ne),nl(),Ce!==null&&U(vw);break;case 24:C1(Fv)}}function Zw(Ce,Ne){try{var Tt=Ne.updateQueue,Kt=Tt!==null?Tt.lastEffect:null;if(Kt!==null){var Dr=Kt.next;Tt=Dr;do{if((Tt.tag&Ce)===Ce){Kt=void 0;var pn=Tt.create,ta=Tt.inst;Kt=pn(),ta.destroy=Kt}Tt=Tt.next}while(Tt!==Dr)}}catch(vo){Rf(Ne,Ne.return,vo)}}function rS(Ce,Ne,Tt){try{var Kt=Ne.updateQueue,Dr=Kt!==null?Kt.lastEffect:null;if(Dr!==null){var pn=Dr.next;Kt=pn;do{if((Kt.tag&Ce)===Ce){var ta=Kt.inst,vo=ta.destroy;if(vo!==void 0){ta.destroy=void 0,Dr=Ne;var fs=Tt;try{vo()}catch(xl){Rf(Dr,fs,xl)}}}Kt=Kt.next}while(Kt!==pn)}}catch(xl){Rf(Ne,Ne.return,xl)}}function Yk(Ce){var Ne=Ce.updateQueue;if(Ne!==null){var Tt=Ce.stateNode;try{po(Ne,Tt)}catch(Kt){Rf(Ce,Ce.return,Kt)}}}function nb(Ce,Ne,Tt){Tt.props=W_(Ce.type,Ce.memoizedProps),Tt.state=Ce.memoizedState;try{Tt.componentWillUnmount()}catch(Kt){Rf(Ce,Ne,Kt)}}function Yy(Ce,Ne){try{var Tt=Ce.ref;if(Tt!==null){var Kt=Ce.stateNode;switch(Ce.tag){case 26:case 27:case 5:var Dr=xT(Kt);break;default:Dr=Kt}typeof Tt=="function"?Ce.refCleanup=Tt(Dr):Tt.current=Dr}}catch(pn){Rf(Ce,Ne,pn)}}function Fm(Ce,Ne){var Tt=Ce.ref,Kt=Ce.refCleanup;if(Tt!==null)if(typeof Kt=="function")try{Kt()}catch(Dr){Rf(Ce,Ne,Dr)}finally{Ce.refCleanup=null,Ce=Ce.alternate,Ce!=null&&(Ce.refCleanup=null)}else if(typeof Tt=="function")try{Tt(null)}catch(Dr){Rf(Ce,Ne,Dr)}else Tt.current=null}function pM(Ce){var Ne=Ce.type,Tt=Ce.memoizedProps,Kt=Ce.stateNode;try{Qk(Kt,Ne,Tt,Ce)}catch(Dr){Rf(Ce,Ce.return,Dr)}}function tR(Ce,Ne,Tt){try{uR(Ce.stateNode,Ce.type,Tt,Ne,Ce)}catch(Kt){Rf(Ce,Ce.return,Kt)}}function rR(Ce){return Ce.tag===5||Ce.tag===3||(t1?Ce.tag===26:!1)||(lv?Ce.tag===27:!1)||Ce.tag===4}function TA(Ce){e:for(;;){for(;Ce.sibling===null;){if(Ce.return===null||rR(Ce.return))return null;Ce=Ce.return}for(Ce.sibling.return=Ce.return,Ce=Ce.sibling;Ce.tag!==5&&Ce.tag!==6&&(!lv||Ce.tag!==27)&&Ce.tag!==18;){if(Ce.flags&2||Ce.child===null||Ce.tag===4)continue e;Ce.child.return=Ce,Ce=Ce.child}if(!(Ce.flags&2))return Ce.stateNode}}function RE(Ce,Ne,Tt){var Kt=Ce.tag;if(Kt===5||Kt===6)Ce=Ce.stateNode,Ne?GE(Tt,Ce,Ne):FA(Tt,Ce);else if(!(Kt===4||lv&&Kt===27)&&(Ce=Ce.child,Ce!==null))for(RE(Ce,Ne,Tt),Ce=Ce.sibling;Ce!==null;)RE(Ce,Ne,Tt),Ce=Ce.sibling}function Kw(Ce,Ne,Tt){var Kt=Ce.tag;if(Kt===5||Kt===6)Ce=Ce.stateNode,Ne?cR(Tt,Ce,Ne):NA(Tt,Ce);else if(!(Kt===4||lv&&Kt===27)&&(Ce=Ce.child,Ce!==null))for(Kw(Ce,Ne,Tt),Ce=Ce.sibling;Ce!==null;)Kw(Ce,Ne,Tt),Ce=Ce.sibling}function Jw(Ce,Ne,Tt){Ce=Ce.containerInfo;try{sS(Ce,Tt)}catch(Kt){Rf(Ne,Ne.return,Kt)}}function Yo(Ce,Ne){for(iS(Ce.containerInfo),Pd=Ne;Pd!==null;)if(Ce=Pd,Ne=Ce.child,(Ce.subtreeFlags&1028)!==0&&Ne!==null)Ne.return=Ce,Pd=Ne;else for(;Pd!==null;){Ce=Pd;var Tt=Ce.alternate;switch(Ne=Ce.flags,Ce.tag){case 0:break;case 11:case 15:break;case 1:if((Ne&1024)!==0&&Tt!==null){Ne=void 0;var Kt=Ce,Dr=Tt.memoizedProps;Tt=Tt.memoizedState;var pn=Kt.stateNode;try{var ta=W_(Kt.type,Dr,Kt.elementType===Kt.type);Ne=pn.getSnapshotBeforeUpdate(ta,Tt),pn.__reactInternalSnapshotBeforeUpdate=Ne}catch(vo){Rf(Kt,Kt.return,vo)}}break;case 3:(Ne&1024)!==0&&Gg&&Gd(Ce.stateNode.containerInfo);break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((Ne&1024)!==0)throw Error(i(163))}if(Ne=Ce.sibling,Ne!==null){Ne.return=Ce.return,Pd=Ne;break}Pd=Ce.return}return ta=sh,sh=!1,ta}function al(Ce,Ne,Tt){var Kt=Tt.flags;switch(Tt.tag){case 0:case 11:case 15:Z_(Ce,Tt),Kt&4&&Zw(5,Tt);break;case 1:if(Z_(Ce,Tt),Kt&4)if(Ce=Tt.stateNode,Ne===null)try{Ce.componentDidMount()}catch(vo){Rf(Tt,Tt.return,vo)}else{var Dr=W_(Tt.type,Ne.memoizedProps);Ne=Ne.memoizedState;try{Ce.componentDidUpdate(Dr,Ne,Ce.__reactInternalSnapshotBeforeUpdate)}catch(vo){Rf(Tt,Tt.return,vo)}}Kt&64&&Yk(Tt),Kt&512&&Yy(Tt,Tt.return);break;case 3:if(Z_(Ce,Tt),Kt&64&&(Kt=Tt.updateQueue,Kt!==null)){if(Ce=null,Tt.child!==null)switch(Tt.child.tag){case 27:case 5:Ce=xT(Tt.child.stateNode);break;case 1:Ce=Tt.child.stateNode}try{po(Kt,Ce)}catch(vo){Rf(Tt,Tt.return,vo)}}break;case 26:if(t1){Z_(Ce,Tt),Kt&512&&Yy(Tt,Tt.return);break}case 27:case 5:Z_(Ce,Tt),Ne===null&&Kt&4&&pM(Tt),Kt&512&&Yy(Tt,Tt.return);break;case 12:Z_(Ce,Tt);break;case 13:Z_(Ce,Tt),Kt&4&&Kc(Ce,Tt);break;case 22:if(Dr=Tt.memoizedState!==null||mw,!Dr){Ne=Ne!==null&&Ne.memoizedState!==null||Eg;var pn=mw,ta=Eg;mw=Dr,(Eg=Ne)&&!ta?xx(Ce,Tt,(Tt.subtreeFlags&8772)!==0):Z_(Ce,Tt),mw=pn,Eg=ta}Kt&512&&(Tt.memoizedProps.mode==="manual"?Yy(Tt,Tt.return):Fm(Tt,Tt.return));break;default:Z_(Ce,Tt)}}function Fs(Ce){var Ne=Ce.alternate;Ne!==null&&(Ce.alternate=null,Fs(Ne)),Ce.child=null,Ce.deletions=null,Ce.sibling=null,Ce.tag===5&&(Ne=Ce.stateNode,Ne!==null&&xM(Ne)),Ce.stateNode=null,Ce.return=null,Ce.dependencies=null,Ce.memoizedProps=null,Ce.memoizedState=null,Ce.pendingProps=null,Ce.stateNode=null,Ce.updateQueue=null}function hu(Ce,Ne,Tt){for(Tt=Tt.child;Tt!==null;)Xc(Ce,Ne,Tt),Tt=Tt.sibling}function Xc(Ce,Ne,Tt){if(r1&&typeof r1.onCommitFiberUnmount=="function")try{r1.onCommitFiberUnmount(uv,Tt)}catch{}switch(Tt.tag){case 26:if(t1){Eg||Fm(Tt,Ne),hu(Ce,Ne,Tt),Tt.memoizedState?Tg(Tt.memoizedState):Tt.stateNode&&l2(Tt.stateNode);break}case 27:if(lv){Eg||Fm(Tt,Ne);var Kt=wf,Dr=Ed;wf=Tt.stateNode,hu(Ce,Ne,Tt),aw(Tt.stateNode),wf=Kt,Ed=Dr;break}case 5:Eg||Fm(Tt,Ne);case 6:if(Gg){if(Kt=wf,Dr=Ed,wf=null,hu(Ce,Ne,Tt),wf=Kt,Ed=Dr,wf!==null)if(Ed)try{BA(wf,Tt.stateNode)}catch(pn){Rf(Tt,Ne,pn)}else try{$E(wf,Tt.stateNode)}catch(pn){Rf(Tt,Ne,pn)}}else hu(Ce,Ne,Tt);break;case 18:Gg&&wf!==null&&(Ed?TT(wf,Tt.stateNode):TM(wf,Tt.stateNode));break;case 4:Gg?(Kt=wf,Dr=Ed,wf=Tt.stateNode.containerInfo,Ed=!0,hu(Ce,Ne,Tt),wf=Kt,Ed=Dr):(I1&&Jw(Tt.stateNode,Tt,HA()),hu(Ce,Ne,Tt));break;case 0:case 11:case 14:case 15:Eg||rS(2,Tt,Ne),Eg||rS(4,Tt,Ne),hu(Ce,Ne,Tt);break;case 1:Eg||(Fm(Tt,Ne),Kt=Tt.stateNode,typeof Kt.componentWillUnmount=="function"&&nb(Tt,Ne,Kt)),hu(Ce,Ne,Tt);break;case 21:hu(Ce,Ne,Tt);break;case 22:Eg||Fm(Tt,Ne),Eg=(Kt=Eg)||Tt.memoizedState!==null,hu(Ce,Ne,Tt),Eg=Kt;break;default:hu(Ce,Ne,Tt)}}function Kc(Ce,Ne){if(ig&&Ne.memoizedState===null&&(Ce=Ne.alternate,Ce!==null&&(Ce=Ce.memoizedState,Ce!==null&&(Ce=Ce.dehydrated,Ce!==null))))try{SM(Ce)}catch(Tt){Rf(Ne,Ne.return,Tt)}}function Vg(Ce){switch(Ce.tag){case 13:case 19:var Ne=Ce.stateNode;return Ne===null&&(Ne=Ce.stateNode=new Lp),Ne;case 22:return Ce=Ce.stateNode,Ne=Ce._retryCache,Ne===null&&(Ne=Ce._retryCache=new Lp),Ne;default:throw Error(i(435,Ce.tag))}}function zh(Ce,Ne){var Tt=Vg(Ce);Ne.forEach(function(Kt){var Dr=ab.bind(null,Ce,Kt);Tt.has(Kt)||(Tt.add(Kt),Kt.then(Dr,Dr))})}function py(Ce,Ne){var Tt=Ne.deletions;if(Tt!==null)for(var Kt=0;Kt<Tt.length;Kt++){var Dr=Tt[Kt],pn=Ce,ta=Ne;if(Gg){var vo=ta;e:for(;vo!==null;){switch(vo.tag){case 27:case 5:wf=vo.stateNode,Ed=!1;break e;case 3:wf=vo.stateNode.containerInfo,Ed=!0;break e;case 4:wf=vo.stateNode.containerInfo,Ed=!0;break e}vo=vo.return}if(wf===null)throw Error(i(160));Xc(pn,ta,Dr),wf=null,Ed=!1}else Xc(pn,ta,Dr);pn=Dr.alternate,pn!==null&&(pn.return=null),Dr.return=null}if(Ne.subtreeFlags&13878)for(Ne=Ne.child;Ne!==null;)kE(Ne,Ce),Ne=Ne.sibling}function kE(Ce,Ne){var Tt=Ce.alternate,Kt=Ce.flags;switch(Ce.tag){case 0:case 11:case 14:case 15:py(Ne,Ce),Vf(Ce),Kt&4&&(rS(3,Ce,Ce.return),Zw(3,Ce),rS(5,Ce,Ce.return));break;case 1:py(Ne,Ce),Vf(Ce),Kt&512&&(Eg||Tt===null||Fm(Tt,Tt.return)),Kt&64&&mw&&(Ce=Ce.updateQueue,Ce!==null&&(Kt=Ce.callbacks,Kt!==null&&(Tt=Ce.shared.hiddenCallbacks,Ce.shared.hiddenCallbacks=Tt===null?Kt:Tt.concat(Kt))));break;case 26:if(t1){var Dr=zv;py(Ne,Ce),Vf(Ce),Kt&512&&(Eg||Tt===null||Fm(Tt,Tt.return)),Kt&4&&(Kt=Tt!==null?Tt.memoizedState:null,Ne=Ce.memoizedState,Tt===null?Ne===null?Ce.stateNode===null?Ce.stateNode=cb(Dr,Ce.type,Ce.memoizedProps,Ce):QE(Dr,Ce.type,Ce.stateNode):Ce.stateNode=CM(Dr,Ne,Ce.memoizedProps):Kt!==Ne?(Kt===null?Tt.stateNode!==null&&l2(Tt.stateNode):Tg(Kt),Ne===null?QE(Dr,Ce.type,Ce.stateNode):CM(Dr,Ne,Ce.memoizedProps)):Ne===null&&Ce.stateNode!==null&&tR(Ce,Ce.memoizedProps,Tt.memoizedProps));break}case 27:if(lv&&Kt&4&&Ce.alternate===null){Dr=Ce.stateNode;var pn=Ce.memoizedProps;try{Bb(Dr),RM(Ce.type,pn,Dr,Ce)}catch(cu){Rf(Ce,Ce.return,cu)}}case 5:if(py(Ne,Ce),Vf(Ce),Kt&512&&(Eg||Tt===null||Fm(Tt,Tt.return)),Gg){if(Ce.flags&32){Ne=Ce.stateNode;try{WE(Ne)}catch(cu){Rf(Ce,Ce.return,cu)}}Kt&4&&Ce.stateNode!=null&&(Ne=Ce.memoizedProps,tR(Ce,Ne,Tt!==null?Tt.memoizedProps:Ne)),Kt&1024&&(KA=!0)}break;case 6:if(py(Ne,Ce),Vf(Ce),Kt&4&&Gg){if(Ce.stateNode===null)throw Error(i(162));Kt=Ce.memoizedProps,Tt=Tt!==null?Tt.memoizedProps:Kt,Ne=Ce.stateNode;try{zA(Ne,Tt,Kt)}catch(cu){Rf(Ce,Ce.return,cu)}}break;case 3:if(t1?(iw(),Dr=zv,zv=$A(Ne.containerInfo),py(Ne,Ce),zv=Dr):py(Ne,Ce),Vf(Ce),Kt&4){if(Gg&&ig&&Tt!==null&&Tt.memoizedState.isDehydrated)try{lS(Ne.containerInfo)}catch(cu){Rf(Ce,Ce.return,cu)}if(I1){Kt=Ne.containerInfo,Tt=Ne.pendingChildren;try{sS(Kt,Tt)}catch(cu){Rf(Ce,Ce.return,cu)}}}KA&&(KA=!1,IE(Ce));break;case 4:t1?(Tt=zv,zv=$A(Ce.stateNode.containerInfo),py(Ne,Ce),Vf(Ce),zv=Tt):(py(Ne,Ce),Vf(Ce)),Kt&4&&I1&&Jw(Ce.stateNode,Ce,Ce.stateNode.pendingChildren);break;case 12:py(Ne,Ce),Vf(Ce);break;case 13:py(Ne,Ce),Vf(Ce),Ce.child.flags&8192&&Ce.memoizedState!==null!=(Tt!==null&&Tt.memoizedState!==null)&&(i1=n0()),Kt&4&&(Kt=Ce.updateQueue,Kt!==null&&(Ce.updateQueue=null,zh(Ce,Kt)));break;case 22:Kt&512&&(Eg||Tt===null||Fm(Tt,Tt.return)),Dr=Ce.memoizedState!==null;var ta=Tt!==null&&Tt.memoizedState!==null,vo=mw,fs=Eg;if(mw=vo||Dr,Eg=fs||ta,py(Ne,Ce),Eg=fs,mw=vo,Vf(Ce),Ne=Ce.stateNode,Ne._current=Ce,Ne._visibility&=-3,Ne._visibility|=Ne._pendingVisibility&2,Kt&8192&&(Ne._visibility=Dr?Ne._visibility&-2:Ne._visibility|1,Dr&&(Ne=mw||Eg,Tt===null||ta||Ne||l_(Ce)),Gg&&(Ce.memoizedProps===null||Ce.memoizedProps.mode!=="manual"))){e:if(Tt=null,Gg)for(Ne=Ce;;){if(Ne.tag===5||t1&&Ne.tag===26||lv&&Ne.tag===27){if(Tt===null){ta=Tt=Ne;try{pn=ta.stateNode,Dr?fR(pn):dR(ta.stateNode,ta.memoizedProps)}catch(cu){Rf(ta,ta.return,cu)}}}else if(Ne.tag===6){if(Tt===null){ta=Ne;try{var xl=ta.stateNode;Dr?UA(xl):wM(xl,ta.memoizedProps)}catch(cu){Rf(ta,ta.return,cu)}}}else if((Ne.tag!==22&&Ne.tag!==23||Ne.memoizedState===null||Ne===Ce)&&Ne.child!==null){Ne.child.return=Ne,Ne=Ne.child;continue}if(Ne===Ce)break e;for(;Ne.sibling===null;){if(Ne.return===null||Ne.return===Ce)break e;Tt===Ne&&(Tt=null),Ne=Ne.return}Tt===Ne&&(Tt=null),Ne.sibling.return=Ne.return,Ne=Ne.sibling}}Kt&4&&(Kt=Ce.updateQueue,Kt!==null&&(Tt=Kt.retryQueue,Tt!==null&&(Kt.retryQueue=null,zh(Ce,Tt))));break;case 19:py(Ne,Ce),Vf(Ce),Kt&4&&(Kt=Ce.updateQueue,Kt!==null&&(Ce.updateQueue=null,zh(Ce,Kt)));break;case 21:break;default:py(Ne,Ce),Vf(Ce)}}function Vf(Ce){var Ne=Ce.flags;if(Ne&2){try{if(Gg&&(!lv||Ce.tag!==27)){e:{for(var Tt=Ce.return;Tt!==null;){if(rR(Tt)){var Kt=Tt;break e}Tt=Tt.return}throw Error(i(160))}switch(Kt.tag){case 27:if(lv){var Dr=Kt.stateNode,pn=TA(Ce);Kw(Ce,pn,Dr);break}case 5:var ta=Kt.stateNode;Kt.flags&32&&(WE(ta),Kt.flags&=-33);var vo=TA(Ce);Kw(Ce,vo,ta);break;case 3:case 4:var fs=Kt.stateNode.containerInfo,xl=TA(Ce);RE(Ce,xl,fs);break;default:throw Error(i(161))}}}catch(cu){Rf(Ce,Ce.return,cu)}Ce.flags&=-3}Ne&4096&&(Ce.flags&=-4097)}function IE(Ce){if(Ce.subtreeFlags&1024)for(Ce=Ce.child;Ce!==null;){var Ne=Ce;IE(Ne),Ne.tag===5&&Ne.flags&1024&&_M(Ne.stateNode),Ce=Ce.sibling}}function Z_(Ce,Ne){if(Ne.subtreeFlags&8772)for(Ne=Ne.child;Ne!==null;)al(Ce,Ne.alternate,Ne),Ne=Ne.sibling}function l_(Ce){for(Ce=Ce.child;Ce!==null;){var Ne=Ce;switch(Ne.tag){case 0:case 11:case 14:case 15:rS(4,Ne,Ne.return),l_(Ne);break;case 1:Fm(Ne,Ne.return);var Tt=Ne.stateNode;typeof Tt.componentWillUnmount=="function"&&nb(Ne,Ne.return,Tt),l_(Ne);break;case 26:case 27:case 5:Fm(Ne,Ne.return),l_(Ne);break;case 22:Fm(Ne,Ne.return),Ne.memoizedState===null&&l_(Ne);break;default:l_(Ne)}Ce=Ce.sibling}}function xx(Ce,Ne,Tt){for(Tt=Tt&&(Ne.subtreeFlags&8772)!==0,Ne=Ne.child;Ne!==null;){var Kt=Ne.alternate,Dr=Ce,pn=Ne,ta=pn.flags;switch(pn.tag){case 0:case 11:case 15:xx(Dr,pn,Tt),Zw(4,pn);break;case 1:if(xx(Dr,pn,Tt),Kt=pn,Dr=Kt.stateNode,typeof Dr.componentDidMount=="function")try{Dr.componentDidMount()}catch(xl){Rf(Kt,Kt.return,xl)}if(Kt=pn,Dr=Kt.updateQueue,Dr!==null){var vo=Kt.stateNode;try{var fs=Dr.shared.hiddenCallbacks;if(fs!==null)for(Dr.shared.hiddenCallbacks=null,Dr=0;Dr<fs.length;Dr++)ba(fs[Dr],vo)}catch(xl){Rf(Kt,Kt.return,xl)}}Tt&&ta&64&&Yk(pn),Yy(pn,pn.return);break;case 26:case 27:case 5:xx(Dr,pn,Tt),Tt&&Kt===null&&ta&4&&pM(pn),Yy(pn,pn.return);break;case 12:xx(Dr,pn,Tt);break;case 13:xx(Dr,pn,Tt),Tt&&ta&4&&Kc(Dr,pn);break;case 22:pn.memoizedState===null&&xx(Dr,pn,Tt),Yy(pn,pn.return);break;default:xx(Dr,pn,Tt)}Ne=Ne.sibling}}function uT(Ce,Ne){var Tt=null;Ce!==null&&Ce.memoizedState!==null&&Ce.memoizedState.cachePool!==null&&(Tt=Ce.memoizedState.cachePool.pool),Ce=null,Ne.memoizedState!==null&&Ne.memoizedState.cachePool!==null&&(Ce=Ne.memoizedState.cachePool.pool),Ce!==Tt&&(Ce!=null&&Ce.refCount++,Tt!=null&&o_(Tt))}function Bh(Ce,Ne){Ce=null,Ne.alternate!==null&&(Ce=Ne.alternate.memoizedState.cache),Ne=Ne.memoizedState.cache,Ne!==Ce&&(Ne.refCount++,Ce!=null&&o_(Ce))}function gm(Ce,Ne,Tt,Kt){if(Ne.subtreeFlags&10256)for(Ne=Ne.child;Ne!==null;)PE(Ce,Ne,Tt,Kt),Ne=Ne.sibling}function PE(Ce,Ne,Tt,Kt){var Dr=Ne.flags;switch(Ne.tag){case 0:case 11:case 15:gm(Ce,Ne,Tt,Kt),Dr&2048&&Zw(9,Ne);break;case 3:gm(Ce,Ne,Tt,Kt),Dr&2048&&(Ce=null,Ne.alternate!==null&&(Ce=Ne.alternate.memoizedState.cache),Ne=Ne.memoizedState.cache,Ne!==Ce&&(Ne.refCount++,Ce!=null&&o_(Ce)));break;case 12:if(Dr&2048){gm(Ce,Ne,Tt,Kt),Ce=Ne.stateNode;try{var pn=Ne.memoizedProps,ta=pn.id,vo=pn.onPostCommit;typeof vo=="function"&&vo(ta,Ne.alternate===null?"mount":"update",Ce.passiveEffectDuration,-0)}catch(fs){Rf(Ne,Ne.return,fs)}}else gm(Ce,Ne,Tt,Kt);break;case 23:break;case 22:pn=Ne.stateNode,Ne.memoizedState!==null?pn._visibility&4?gm(Ce,Ne,Tt,Kt):vy(Ce,Ne):pn._visibility&4?gm(Ce,Ne,Tt,Kt):(pn._visibility|=4,Sg(Ce,Ne,Tt,Kt,(Ne.subtreeFlags&10256)!==0)),Dr&2048&&uT(Ne.alternate,Ne);break;case 24:gm(Ce,Ne,Tt,Kt),Dr&2048&&Bh(Ne.alternate,Ne);break;default:gm(Ce,Ne,Tt,Kt)}}function Sg(Ce,Ne,Tt,Kt,Dr){for(Dr=Dr&&(Ne.subtreeFlags&10256)!==0,Ne=Ne.child;Ne!==null;){var pn=Ce,ta=Ne,vo=Tt,fs=Kt,xl=ta.flags;switch(ta.tag){case 0:case 11:case 15:Sg(pn,ta,vo,fs,Dr),Zw(8,ta);break;case 23:break;case 22:var cu=ta.stateNode;ta.memoizedState!==null?cu._visibility&4?Sg(pn,ta,vo,fs,Dr):vy(pn,ta):(cu._visibility|=4,Sg(pn,ta,vo,fs,Dr)),Dr&&xl&2048&&uT(ta.alternate,ta);break;case 24:Sg(pn,ta,vo,fs,Dr),Dr&&xl&2048&&Bh(ta.alternate,ta);break;default:Sg(pn,ta,vo,fs,Dr)}Ne=Ne.sibling}}function vy(Ce,Ne){if(Ne.subtreeFlags&10256)for(Ne=Ne.child;Ne!==null;){var Tt=Ce,Kt=Ne,Dr=Kt.flags;switch(Kt.tag){case 22:vy(Tt,Kt),Dr&2048&&uT(Kt.alternate,Kt);break;case 24:vy(Tt,Kt),Dr&2048&&Bh(Kt.alternate,Kt);break;default:vy(Tt,Kt)}Ne=Ne.sibling}}function _x(Ce){if(Ce.subtreeFlags&Wb)for(Ce=Ce.child;Ce!==null;)vM(Ce),Ce=Ce.sibling}function vM(Ce){switch(Ce.tag){case 26:_x(Ce),Ce.flags&Wb&&(Ce.memoizedState!==null?nI(zv,Ce.memoizedState,Ce.memoizedProps):yy(Ce.type,Ce.memoizedProps));break;case 5:_x(Ce),Ce.flags&Wb&&yy(Ce.type,Ce.memoizedProps);break;case 3:case 4:if(t1){var Ne=zv;zv=$A(Ce.stateNode.containerInfo),_x(Ce),zv=Ne}else _x(Ce);break;case 22:Ce.memoizedState===null&&(Ne=Ce.alternate,Ne!==null&&Ne.memoizedState!==null?(Ne=Wb,Wb=16777216,_x(Ce),Wb=Ne):_x(Ce));break;default:_x(Ce)}}function Qw(Ce){var Ne=Ce.alternate;if(Ne!==null&&(Ce=Ne.child,Ce!==null)){Ne.child=null;do Ne=Ce.sibling,Ce.sibling=null,Ce=Ne;while(Ce!==null)}}function M1(Ce){var Ne=Ce.deletions;if((Ce.flags&16)!==0){if(Ne!==null)for(var Tt=0;Tt<Ne.length;Tt++){var Kt=Ne[Tt];Pd=Kt,R1(Kt,Ce)}Qw(Ce)}if(Ce.subtreeFlags&10256)for(Ce=Ce.child;Ce!==null;)cT(Ce),Ce=Ce.sibling}function cT(Ce){switch(Ce.tag){case 0:case 11:case 15:M1(Ce),Ce.flags&2048&&rS(9,Ce,Ce.return);break;case 3:M1(Ce);break;case 12:M1(Ce);break;case 22:var Ne=Ce.stateNode;Ce.memoizedState!==null&&Ne._visibility&4&&(Ce.return===null||Ce.return.tag!==13)?(Ne._visibility&=-5,ib(Ce)):M1(Ce);break;default:M1(Ce)}}function ib(Ce){var Ne=Ce.deletions;if((Ce.flags&16)!==0){if(Ne!==null)for(var Tt=0;Tt<Ne.length;Tt++){var Kt=Ne[Tt];Pd=Kt,R1(Kt,Ce)}Qw(Ce)}for(Ce=Ce.child;Ce!==null;){switch(Ne=Ce,Ne.tag){case 0:case 11:case 15:rS(8,Ne,Ne.return),ib(Ne);break;case 22:Tt=Ne.stateNode,Tt._visibility&4&&(Tt._visibility&=-5,ib(Ne));break;default:ib(Ne)}Ce=Ce.sibling}}function R1(Ce,Ne){for(;Pd!==null;){var Tt=Pd;switch(Tt.tag){case 0:case 11:case 15:rS(8,Tt,Ne);break;case 23:case 22:if(Tt.memoizedState!==null&&Tt.memoizedState.cachePool!==null){var Kt=Tt.memoizedState.cachePool.pool;Kt!=null&&Kt.refCount++}break;case 24:o_(Tt.memoizedState.cache)}if(Kt=Tt.child,Kt!==null)Kt.return=Tt,Pd=Kt;else e:for(Tt=Ce;Pd!==null;){Kt=Pd;var Dr=Kt.sibling,pn=Kt.return;if(Fs(Kt),Kt===Tt){Pd=null;break e}if(Dr!==null){Dr.return=pn,Pd=Dr;break e}Pd=pn}}}function fT(Ce){var Ne=sR(Ce);if(Ne!=null){if(typeof Ne.memoizedProps["data-testname"]!="string")throw Error(i(364));return Ne}if(Ce=HE(Ce),Ce===null)throw Error(i(362));return Ce.stateNode.current}function r0(Ce,Ne){var Tt=Ce.tag;switch(Ne.$$typeof){case o3:if(Ce.type===Ne.value)return!0;break;case Yb:e:{for(Ne=Ne.value,Ce=[Ce,0],Tt=0;Tt<Ce.length;){var Kt=Ce[Tt++],Dr=Kt.tag,pn=Ce[Tt++],ta=Ne[pn];if(Dr!==5&&Dr!==26&&Dr!==27||!tw(Kt)){for(;ta!=null&&r0(Kt,ta);)pn++,ta=Ne[pn];if(pn===Ne.length){Ne=!0;break e}else for(Kt=Kt.child;Kt!==null;)Ce.push(Kt,pn),Kt=Kt.sibling}}Ne=!1}return Ne;case am:if((Tt===5||Tt===26||Tt===27)&&lR(Ce.stateNode,Ne.value))return!0;break;case gw:if((Tt===5||Tt===6||Tt===26||Tt===27)&&(Ce=VE(Ce),Ce!==null&&0<=Ce.indexOf(Ne.value)))return!0;break;case T_:if((Tt===5||Tt===26||Tt===27)&&(Ce=Ce.memoizedProps["data-testname"],typeof Ce=="string"&&Ce.toLowerCase()===Ne.value.toLowerCase()))return!0;break;default:throw Error(i(365))}return!1}function Xy(Ce){switch(Ce.$$typeof){case o3:return"<"+(o(Ce.value)||"Unknown")+">";case Yb:return":has("+(Xy(Ce)||"")+")";case am:return'[role="'+Ce.value+'"]';case gw:return'"'+Ce.value+'"';case T_:return'[data-testname="'+Ce.value+'"]';default:throw Error(i(365))}}function g0(Ce,Ne){var Tt=[];Ce=[Ce,0];for(var Kt=0;Kt<Ce.length;){var Dr=Ce[Kt++],pn=Dr.tag,ta=Ce[Kt++],vo=Ne[ta];if(pn!==5&&pn!==26&&pn!==27||!tw(Dr)){for(;vo!=null&&r0(Dr,vo);)ta++,vo=Ne[ta];if(ta===Ne.length)Tt.push(Dr);else for(Dr=Dr.child;Dr!==null;)Ce.push(Dr,ta),Dr=Dr.sibling}}return Tt}function y0(Ce,Ne){if(!oS)throw Error(i(363));Ce=fT(Ce),Ce=g0(Ce,Ne),Ne=[],Ce=Array.from(Ce);for(var Tt=0;Tt<Ce.length;){var Kt=Ce[Tt++],Dr=Kt.tag;if(Dr===5||Dr===26||Dr===27)tw(Kt)||Ne.push(Kt.stateNode);else for(Kt=Kt.child;Kt!==null;)Ce.push(Kt),Kt=Kt.sibling}return Ne}function Ch(){if((ip&2)!==0&&Wd!==0)return Wd&-Wd;if(Ef.T!==null){var Ce=Vb;return Ce!==0?Ce:Ei()}return bM()}function DE(){db===0&&(db=(Wd&536870912)===0||np?Ze():536870912);var Ce=Gb.current;return Ce!==null&&(Ce.flags|=32),db}function rg(Ce,Ne,Tt){(Ce===Jp&&cv===2||Ce.cancelPendingCommit!==null)&&(gy(Ce,0),zm(Ce,Wd,db,!1)),ut(Ce,Tt),((ip&2)===0||Ce!==Jp)&&(Ce===Jp&&((ip&2)===0&&(m2|=Tt),fv===4&&zm(Ce,Wd,db,!1)),Oi(Ce))}function e2(Ce,Ne,Tt){if((ip&6)!==0)throw Error(i(327));var Kt=!Tt&&(Ne&60)===0&&(Ne&Ce.expiredLanes)===0||Ie(Ce,Ne),Dr=Kt?z0(Ce,Ne):qg(Ce,Ne,!0),pn=Kt;do{if(Dr===0){W0&&!Kt&&zm(Ce,Ne,0,!1);break}else if(Dr===6)zm(Ce,Ne,0,!fb);else{if(Tt=Ce.current.alternate,pn&&!b0(Tt)){Dr=qg(Ce,Ne,!1),pn=!1;continue}if(Dr===2){if(pn=Ne,Ce.errorRecoveryDisabledLanes&pn)var ta=0;else ta=Ce.pendingLanes&-536870913,ta=ta!==0?ta:ta&536870912?536870912:0;if(ta!==0){Ne=ta;e:{var vo=Ce;Dr=IT;var fs=ig&&vo.current.memoizedState.isDehydrated;if(fs&&(gy(vo,ta).flags|=256),ta=qg(vo,ta,!1),ta!==2){if(S0&&!fs){vo.errorRecoveryDisabledLanes|=pn,m2|=pn,Dr=4;break e}pn=bm,bm=Dr,pn!==null&&EA(pn)}Dr=ta}if(pn=!1,Dr!==2)continue}}if(Dr===1){gy(Ce,0),zm(Ce,Ne,0,!0);break}e:{switch(Kt=Ce,Dr){case 0:case 1:throw Error(i(345));case 4:if((Ne&4194176)===Ne){zm(Kt,Ne,db,!fb);break e}break;case 2:bm=null;break;case 3:case 5:break;default:throw Error(i(329))}if(Kt.finishedWork=Tt,Kt.finishedLanes=Ne,(Ne&62914560)===Ne&&(pn=i1+300-n0(),10<pn)){if(zm(Kt,Ne,db,!fb),Me(Kt,0)!==0)break e;Kt.timeoutHandle=Mh(Zy.bind(null,Kt,Tt,bm,u3,bS,Ne,db,m2,E_,fb,2,-0,0),pn);break e}Zy(Kt,Tt,bm,u3,bS,Ne,db,m2,E_,fb,0,-0,0)}}break}while(!0);Oi(Ce)}function EA(Ce){bm===null?bm=Ce:bm.push.apply(bm,Ce)}function Zy(Ce,Ne,Tt,Kt,Dr,pn,ta,vo,fs,xl,cu,$l,bc){var md=Ne.subtreeFlags;if((md&8192||(md&16785408)===16785408)&&(x0(),vM(Ne),Ne=Xp(),Ne!==null)){Ce.cancelPendingCommit=Ne(Jy.bind(null,Ce,Tt,Kt,Dr,ta,vo,fs,1,$l,bc)),zm(Ce,pn,ta,!xl);return}Jy(Ce,Tt,Kt,Dr,ta,vo,fs,cu,$l,bc)}function b0(Ce){for(var Ne=Ce;;){var Tt=Ne.tag;if((Tt===0||Tt===11||Tt===15)&&Ne.flags&16384&&(Tt=Ne.updateQueue,Tt!==null&&(Tt=Tt.stores,Tt!==null)))for(var Kt=0;Kt<Tt.length;Kt++){var Dr=Tt[Kt],pn=Dr.getSnapshot;Dr=Dr.value;try{if(!n1(pn(),Dr))return!1}catch{return!1}}if(Tt=Ne.child,Ne.subtreeFlags&16384&&Tt!==null)Tt.return=Ne,Ne=Tt;else{if(Ne===Ce)break;for(;Ne.sibling===null;){if(Ne.return===null||Ne.return===Ce)return!0;Ne=Ne.return}Ne.sibling.return=Ne.return,Ne=Ne.sibling}}return!0}function zm(Ce,Ne,Tt,Kt){Ne&=~s3,Ne&=~m2,Ce.suspendedLanes|=Ne,Ce.pingedLanes&=~Ne,Kt&&(Ce.warmLanes|=Ne),Kt=Ce.expirationTimes;for(var Dr=Ne;0<Dr;){var pn=31-_y(Dr),ta=1<<pn;Kt[pn]=-1,Dr&=~ta}Tt!==0&&_t(Ce,Tt,Ne)}function k1(){return(ip&6)===0?(Pa(0),!1):!0}function my(){if(If!==null){if(cv===0)var Ce=If.return;else Ce=If,Bm=Lx=null,Dn(Ce),qb=null,dw=0,Ce=If;for(;Ce!==null;)bx(Ce.alternate,Ce),Ce=Ce.return;If=null}}function gy(Ce,Ne){Ce.finishedWork=null,Ce.finishedLanes=0;var Tt=Ce.timeoutHandle;Tt!==n2&&(Ce.timeoutHandle=n2,BE(Tt)),Tt=Ce.cancelPendingCommit,Tt!==null&&(Ce.cancelPendingCommit=null,Tt()),my(),Jp=Ce,If=Tt=Sx(Ce.current,null),Wd=Ne,cv=0,$0=null,fb=!1,W0=Ie(Ce,Ne),S0=!1,E_=db=s3=m2=Zb=fv=0,bm=IT=null,bS=!1,(Ne&8)!==0&&(Ne|=Ne&32);var Kt=Ce.entangledLanes;if(Kt!==0)for(Ce=Ce.entanglements,Kt&=Ne;0<Kt;){var Dr=31-_y(Kt),pn=1<<Dr;Ne|=Ce[Dr],Kt&=~pn}return wy=Ne,Yn(),Tt}function F0(Ce,Ne){$d=null,Ef.H=ag,Ne===vS?(Ne=Hl(),cv=3):Ne===i3?(Ne=Hl(),cv=4):cv=Ne===v2?8:Ne!==null&&typeof Ne=="object"&&typeof Ne.then=="function"?6:1,$0=Ne,If===null&&(fv=1,ec(Ce,Cr(Ne,Ce.current)))}function em(){var Ce=Gb.current;return Ce===null?!0:(Wd&4194176)===Wd?bp===null:(Wd&62914560)===Wd||(Wd&536870912)!==0?Ce===bp:!1}function tm(){var Ce=Ef.H;return Ef.H=ag,Ce===null?ag:Ce}function u_(){var Ce=Ef.A;return Ef.A=a3,Ce}function Ob(){fv=4,fb||(Wd&4194176)!==Wd&&Gb.current!==null||(W0=!0),(Zb&134217727)===0&&(m2&134217727)===0||Jp===null||zm(Jp,Wd,db,!1)}function qg(Ce,Ne,Tt){var Kt=ip;ip|=2;var Dr=tm(),pn=u_();(Jp!==Ce||Wd!==Ne)&&(u3=null,gy(Ce,Ne)),Ne=!1;var ta=fv;e:do try{if(cv!==0&&If!==null){var vo=If,fs=$0;switch(cv){case 8:my(),ta=6;break e;case 3:case 2:case 6:Gb.current===null&&(Ne=!0);var xl=cv;if(cv=0,$0=null,Ky(Ce,vo,fs,xl),Tt&&W0){ta=0;break e}break;default:xl=cv,cv=0,$0=null,Ky(Ce,vo,fs,xl)}}AA(),ta=fv;break}catch(cu){F0(Ce,cu)}while(!0);return Ne&&Ce.shellSuspendCounter++,Bm=Lx=null,ip=Kt,Ef.H=Dr,Ef.A=pn,If===null&&(Jp=null,Wd=0,Yn()),ta}function AA(){for(;If!==null;)sv(If)}function z0(Ce,Ne){var Tt=ip;ip|=2;var Kt=tm(),Dr=u_();Jp!==Ce||Wd!==Ne?(u3=null,l3=n0()+500,gy(Ce,Ne)):W0=Ie(Ce,Ne);e:do try{if(cv!==0&&If!==null){Ne=If;var pn=$0;t:switch(cv){case 1:cv=0,$0=null,Ky(Ce,Ne,pn,1);break;case 2:if($s(pn)){cv=0,$0=null,qd(Ne);break}Ne=function(){cv===2&&Jp===Ce&&(cv=7),Oi(Ce)},pn.then(Ne,Ne);break e;case 3:cv=7;break e;case 4:cv=5;break e;case 7:$s(pn)?(cv=0,$0=null,qd(Ne)):(cv=0,$0=null,Ky(Ce,Ne,pn,7));break;case 5:var ta=null;switch(If.tag){case 26:ta=If.memoizedState;case 5:case 27:var vo=If,fs=vo.type,xl=vo.pendingProps;if(ta?u2(ta):aS(fs,xl)){cv=0,$0=null;var cu=vo.sibling;if(cu!==null)If=cu;else{var $l=vo.return;$l!==null?(If=$l,B0($l)):If=null}break t}}cv=0,$0=null,Ky(Ce,Ne,pn,5);break;case 6:cv=0,$0=null,Ky(Ce,Ne,pn,6);break;case 8:my(),fv=6;break e;default:throw Error(i(462))}}ng();break}catch(bc){F0(Ce,bc)}while(!0);return Bm=Lx=null,Ef.H=Kt,Ef.A=Dr,ip=Tt,If!==null?0:(Jp=null,Wd=0,Yn(),fv)}function ng(){for(;If!==null&&!aI();)sv(If)}function sv(Ce){var Ne=eR(Ce.alternate,Ce,wy);Ce.memoizedProps=Ce.pendingProps,Ne===null?B0(Ce):If=Ne}function qd(Ce){var Ne=Ce,Tt=Ne.alternate;switch(Ne.tag){case 15:case 0:Ne=i_(Tt,Ne,Ne.pendingProps,Ne.type,void 0,Wd);break;case 11:Ne=i_(Tt,Ne,Ne.pendingProps,Ne.type.render,Ne.ref,Wd);break;case 5:Dn(Ne);default:bx(Tt,Ne),Ne=If=hT(Ne,wy),Ne=eR(Tt,Ne,wy)}Ce.memoizedProps=Ce.pendingProps,Ne===null?B0(Ce):If=Ne}function Ky(Ce,Ne,Tt,Kt){Bm=Lx=null,Dn(Ne),qb=null,dw=0;var Dr=Ne.return;try{if(Yu(Ce,Dr,Ne,Tt,Wd)){fv=1,ec(Ce,Cr(Tt,Ce.current)),If=null;return}}catch(pn){if(Dr!==null)throw If=Dr,pn;fv=1,ec(Ce,Cr(Tt,Ce.current)),If=null;return}Ne.flags&32768?(np||Kt===1?Ce=!0:W0||(Wd&536870912)!==0?Ce=!1:(fb=Ce=!0,(Kt===2||Kt===3||Kt===6)&&(Kt=Gb.current,Kt!==null&&Kt.tag===13&&(Kt.flags|=16384))),t2(Ne,Ce)):B0(Ne)}function B0(Ce){var Ne=Ce;do{if((Ne.flags&32768)!==0){t2(Ne,fb);return}Ce=Ne.return;var Tt=SA(Ne.alternate,Ne,wy);if(Tt!==null){If=Tt;return}if(Ne=Ne.sibling,Ne!==null){If=Ne;return}If=Ne=Ce}while(Ne!==null);fv===0&&(fv=5)}function t2(Ce,Ne){do{var Tt=lT(Ce.alternate,Ce);if(Tt!==null){Tt.flags&=32767,If=Tt;return}if(Tt=Ce.return,Tt!==null&&(Tt.flags|=32768,Tt.subtreeFlags=0,Tt.deletions=null),!Ne&&(Ce=Ce.sibling,Ce!==null)){If=Ce;return}If=Ce=Tt}while(Ce!==null);fv=6,If=null}function Jy(Ce,Ne,Tt,Kt,Dr,pn,ta,vo,fs,xl){var cu=Ef.T,$l=v_();try{rm(2),Ef.T=null,CA(Ce,Ne,Tt,Kt,$l,Dr,pn,ta,vo,fs,xl)}finally{Ef.T=cu,rm($l)}}function CA(Ce,Ne,Tt,Kt,Dr,pn,ta,vo){do c_();while(yw!==null);if((ip&6)!==0)throw Error(i(327));var fs=Ce.finishedWork;if(Kt=Ce.finishedLanes,fs===null)return null;if(Ce.finishedWork=null,Ce.finishedLanes=0,fs===Ce.current)throw Error(i(177));Ce.callbackNode=null,Ce.callbackPriority=0,Ce.cancelPendingCommit=null;var xl=fs.lanes|fs.childLanes;if(xl|=__,ht(Ce,Kt,xl,pn,ta,vo),Ce===Jp&&(If=Jp=null,Wd=0),(fs.subtreeFlags&10256)===0&&(fs.flags&10256)===0||Ox||(Ox=!0,g2=xl,c3=Tt,wx(kM,function(){return c_(),null})),Tt=(fs.flags&15990)!==0,(fs.subtreeFlags&15990)!==0||Tt?(Tt=Ef.T,Ef.T=null,pn=v_(),rm(2),ta=ip,ip|=4,Yo(Ce,fs),kE(fs,Ce),r2(Ce.containerInfo),Ce.current=fs,al(Ce,fs.alternate,fs),WA(),ip=ta,rm(pn),Ef.T=Tt):Ce.current=fs,Ox?(Ox=!1,yw=Ce,PT=Kt):MA(Ce,xl),xl=Ce.pendingLanes,xl===0&&(xS=null),Lt(fs.stateNode),Oi(Ce),Ne!==null)for(Dr=Ce.onRecoverableError,fs=0;fs<Ne.length;fs++)xl=Ne[fs],Dr(xl.value,{componentStack:xl.stack});return(PT&3)!==0&&c_(),xl=Ce.pendingLanes,(Kt&4194218)!==0&&(xl&42)!==0?Ce===LM?y2++:(y2=0,LM=Ce):y2=0,Pa(0),null}function MA(Ce,Ne){(Ce.pooledCacheLanes&=Ne)===0&&(Ne=Ce.pooledCache,Ne!=null&&(Ce.pooledCache=null,o_(Ne)))}function c_(){if(yw!==null){var Ce=yw,Ne=g2;g2=0;var Tt=qt(PT),Kt=32>Tt?32:Tt;Tt=Ef.T;var Dr=v_();try{if(rm(Kt),Ef.T=null,yw===null)var pn=!1;else{Kt=c3,c3=null;var ta=yw,vo=PT;if(yw=null,PT=0,(ip&6)!==0)throw Error(i(331));var fs=ip;if(ip|=4,cT(ta.current),PE(ta,ta.current,vo,Kt),ip=fs,Pa(0,!1),r1&&typeof r1.onPostCommitFiberRoot=="function")try{r1.onPostCommitFiberRoot(uv,ta)}catch{}pn=!0}return pn}finally{rm(Dr),Ef.T=Tt,MA(Ce,Ne)}}return!1}function LE(Ce,Ne,Tt){Ne=Cr(Tt,Ne),Ne=Wy(Ce.stateNode,Ne,2),Ce=Co(Ce,Ne,2),Ce!==null&&(ut(Ce,2),Oi(Ce))}function Rf(Ce,Ne,Tt){if(Ce.tag===3)LE(Ce,Ce,Tt);else for(;Ne!==null;){if(Ne.tag===3){LE(Ne,Ce,Tt);break}else if(Ne.tag===1){var Kt=Ne.stateNode;if(typeof Ne.type.getDerivedStateFromError=="function"||typeof Kt.componentDidCatch=="function"&&(xS===null||!xS.has(Kt))){Ce=Cr(Tt,Ce),Tt=Pb(2),Kt=Co(Ne,Tt,2),Kt!==null&&(gx(Tt,Kt,Ne,Ce),ut(Kt,2),Oi(Kt));break}}Ne=Ne.return}}function K_(Ce,Ne,Tt){var Kt=Ce.pingCache;if(Kt===null){Kt=Ce.pingCache=new Xb;var Dr=new Set;Kt.set(Ne,Dr)}else Dr=Kt.get(Ne),Dr===void 0&&(Dr=new Set,Kt.set(Ne,Dr));Dr.has(Tt)||(S0=!0,Dr.add(Tt),Ce=dT.bind(null,Ce,Ne,Tt),Ne.then(Ce,Ce))}function dT(Ce,Ne,Tt){var Kt=Ce.pingCache;Kt!==null&&Kt.delete(Ne),Ce.pingedLanes|=Ce.suspendedLanes&Tt,Ce.warmLanes&=~Tt,Jp===Ce&&(Wd&Tt)===Tt&&(fv===4||fv===3&&(Wd&62914560)===Wd&&300>n0()-i1?(ip&2)===0&&gy(Ce,0):s3|=Tt,E_===Wd&&(E_=0)),Oi(Ce)}function f_(Ce,Ne){Ne===0&&(Ne=Je()),Ce=bn(Ce,Ne),Ce!==null&&(ut(Ce,Ne),Oi(Ce))}function Vi(Ce){var Ne=Ce.memoizedState,Tt=0;Ne!==null&&(Tt=Ne.retryLane),f_(Ce,Tt)}function ab(Ce,Ne){var Tt=0;switch(Ce.tag){case 13:var Kt=Ce.stateNode,Dr=Ce.memoizedState;Dr!==null&&(Tt=Dr.retryLane);break;case 19:Kt=Ce.stateNode;break;case 22:Kt=Ce.stateNode._retryCache;break;default:throw Error(i(314))}Kt!==null&&Kt.delete(Ne),f_(Ce,Tt)}function wx(Ce,Ne){return ET(Ce,Ne)}function ob(Ce,Ne,Tt,Kt){this.tag=Ce,this.key=Tt,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=Ne,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=Kt,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function eh(Ce){return Ce=Ce.prototype,!(!Ce||!Ce.isReactComponent)}function Sx(Ce,Ne){var Tt=Ce.alternate;return Tt===null?(Tt=r(Ce.tag,Ne,Ce.key,Ce.mode),Tt.elementType=Ce.elementType,Tt.type=Ce.type,Tt.stateNode=Ce.stateNode,Tt.alternate=Ce,Ce.alternate=Tt):(Tt.pendingProps=Ne,Tt.type=Ce.type,Tt.flags=0,Tt.subtreeFlags=0,Tt.deletions=null),Tt.flags=Ce.flags&31457280,Tt.childLanes=Ce.childLanes,Tt.lanes=Ce.lanes,Tt.child=Ce.child,Tt.memoizedProps=Ce.memoizedProps,Tt.memoizedState=Ce.memoizedState,Tt.updateQueue=Ce.updateQueue,Ne=Ce.dependencies,Tt.dependencies=Ne===null?null:{lanes:Ne.lanes,firstContext:Ne.firstContext},Tt.sibling=Ce.sibling,Tt.index=Ce.index,Tt.ref=Ce.ref,Tt.refCleanup=Ce.refCleanup,Tt}function hT(Ce,Ne){Ce.flags&=31457282;var Tt=Ce.alternate;return Tt===null?(Ce.childLanes=0,Ce.lanes=Ne,Ce.child=null,Ce.subtreeFlags=0,Ce.memoizedProps=null,Ce.memoizedState=null,Ce.updateQueue=null,Ce.dependencies=null,Ce.stateNode=null):(Ce.childLanes=Tt.childLanes,Ce.lanes=Tt.lanes,Ce.child=Tt.child,Ce.subtreeFlags=0,Ce.deletions=null,Ce.memoizedProps=Tt.memoizedProps,Ce.memoizedState=Tt.memoizedState,Ce.updateQueue=Tt.updateQueue,Ce.type=Tt.type,Ne=Tt.dependencies,Ce.dependencies=Ne===null?null:{lanes:Ne.lanes,firstContext:Ne.firstContext}),Ce}function J_(Ce,Ne,Tt,Kt,Dr,pn){var ta=0;if(Kt=Ce,typeof Ce=="function")eh(Ce)&&(ta=1);else if(typeof Ce=="string")ta=t1&&lv?s2(Ce,Tt,rp.current)?26:Ub(Ce)?27:5:t1?s2(Ce,Tt,rp.current)?26:5:lv&&Ub(Ce)?27:5;else e:switch(Ce){case lb:return wv(Tt.children,Dr,pn,Ne);case IA:ta=8,Dr|=24;break;case vT:return Ce=r(12,Tt,Ne,Dr|2),Ce.elementType=vT,Ce.lanes=pn,Ce;case zE:return Ce=r(13,Tt,Ne,Dr),Ce.elementType=zE,Ce.lanes=pn,Ce;case mT:return Ce=r(19,Tt,Ne,Dr),Ce.elementType=mT,Ce.lanes=pn,Ce;case aR:return OE(Tt,Dr,pn,Ne);default:if(typeof Ce=="object"&&Ce!==null)switch(Ce.$$typeof){case Qy:case d_:ta=10;break e;case iR:ta=9;break e;case PA:ta=11;break e;case gT:ta=14;break e;case Fb:ta=16,Kt=null;break e}ta=29,Tt=Error(i(130,Ce===null?"null":typeof Ce,"")),Kt=null}return Ne=r(ta,Tt,Ne,Dr),Ne.elementType=Ce,Ne.type=Kt,Ne.lanes=pn,Ne}function wv(Ce,Ne,Tt,Kt){return Ce=r(7,Ce,Kt,Ne),Ce.lanes=Tt,Ce}function OE(Ce,Ne,Tt,Kt){Ce=r(22,Ce,Kt,Ne),Ce.elementType=aR,Ce.lanes=Tt;var Dr={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var pn=Dr._current;if(pn===null)throw Error(i(456));if((Dr._pendingVisibility&2)===0){var ta=bn(pn,2);ta!==null&&(Dr._pendingVisibility|=2,rg(ta,pn,2))}},attach:function(){var pn=Dr._current;if(pn===null)throw Error(i(456));if((Dr._pendingVisibility&2)!==0){var ta=bn(pn,2);ta!==null&&(Dr._pendingVisibility&=-3,rg(ta,pn,2))}}};return Ce.stateNode=Dr,Ce}function mM(Ce,Ne,Tt){return Ce=r(6,Ce,null,Ne),Ce.lanes=Tt,Ce}function nR(Ce,Ne,Tt){return Ne=r(4,Ce.children!==null?Ce.children:[],Ce.key,Ne),Ne.lanes=Tt,Ne.stateNode={containerInfo:Ce.containerInfo,pendingChildren:null,implementation:Ce.implementation},Ne}function Xk(Ce,Ne,Tt,Kt,Dr,pn,ta,vo){this.tag=1,this.containerInfo=Ce,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=n2,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=nt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nt(0),this.hiddenUpdates=nt(null),this.identifierPrefix=Kt,this.onUncaughtError=Dr,this.onCaughtError=pn,this.onRecoverableError=ta,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=vo,this.incompleteTransitions=new Map}function Zk(Ce,Ne,Tt,Kt,Dr,pn,ta,vo,fs,xl,cu,$l){return Ce=new Xk(Ce,Ne,Tt,ta,vo,fs,xl,$l),Ne=1,pn===!0&&(Ne|=24),pn=r(3,null,null,Ne),Ce.current=pn,pn.stateNode=Ce,Ne=yx(),Ne.refCount++,Ce.pooledCache=Ne,Ne.refCount++,pn.memoizedState={element:Kt,isDehydrated:Tt,cache:Ne},Qa(pn),Ce}function Sv(Ce){return Ce?(Ce=g_,Ce):g_}function gM(Ce){var Ne=Ce._reactInternals;if(Ne===void 0)throw typeof Ce.render=="function"?Error(i(188)):(Ce=Object.keys(Ce).join(","),Error(i(268,Ce)));return Ce=X(Ne),Ce=Ce!==null?ie(Ce):null,Ce===null?null:xT(Ce.stateNode)}function NE(Ce,Ne,Tt,Kt,Dr,pn){Dr=Sv(Dr),Kt.context===null?Kt.context=Dr:Kt.pendingContext=Dr,Kt=go(Ne),Kt.payload={element:Tt},pn=pn===void 0?null:pn,pn!==null&&(Kt.callback=pn),Tt=Co(Ce,Kt,Ne),Tt!==null&&(rg(Tt,Ce,Ne),Ko(Tt,Ce,Ne))}function pT(Ce,Ne){if(Ce=Ce.memoizedState,Ce!==null&&Ce.dehydrated!==null){var Tt=Ce.retryLane;Ce.retryLane=Tt!==0&&Tt<Ne?Tt:Ne}}function RA(Ce,Ne){pT(Ce,Ne),(Ce=Ce.alternate)&&pT(Ce,Ne)}var Nd={},sb=zk(),Nb=JWe(),FE=Object.assign,Kk=Symbol.for("react.element"),kA=Symbol.for("react.transitional.element"),Tx=Symbol.for("react.portal"),lb=Symbol.for("react.fragment"),IA=Symbol.for("react.strict_mode"),vT=Symbol.for("react.profiler"),Qy=Symbol.for("react.provider"),iR=Symbol.for("react.consumer"),d_=Symbol.for("react.context"),PA=Symbol.for("react.forward_ref"),zE=Symbol.for("react.suspense"),mT=Symbol.for("react.suspense_list"),gT=Symbol.for("react.memo"),Fb=Symbol.for("react.lazy"),aR=Symbol.for("react.offscreen"),Jk=Symbol.for("react.memo_cache_sentinel"),h_=Symbol.iterator,yT=Symbol.for("react.client.reference"),Ef=sb.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,p_,Q_,bT=!1,ub=Array.isArray,DA=e.rendererVersion,oh=e.rendererPackageName,U0=e.extraDevToolsConfig,xT=e.getPublicInstance,oR=e.getRootHostContext,nS=e.getChildHostContext,iS=e.prepareForCommit,r2=e.resetAfterCommit,yM=e.createInstance,LA=e.appendInitialChild,Ex=e.finalizeInitialChildren,Fd=e.shouldSetTextContent,Yp=e.createTextInstance,Mh=e.scheduleTimeout,BE=e.cancelTimeout,n2=e.noTimeout,ym=e.isPrimaryRenderer;e.warnsIfNotActing;var Gg=e.supportsMutation,I1=e.supportsPersistence,ig=e.supportsHydration,sR=e.getInstanceFromNode;e.beforeActiveInstanceBlur,e.afterActiveInstanceBlur;var th=e.preparePortalMount;e.prepareScopeUpdate,e.getInstanceFromScope;var rm=e.setCurrentUpdatePriority,v_=e.getCurrentUpdatePriority,bM=e.resolveUpdatePriority;e.resolveEventType,e.resolveEventTimeStamp;var zb=e.shouldAttemptEagerTransition,xM=e.detachDeletedInstance;e.requestPostPaintCallback;var UE=e.maySuspendCommit,aS=e.preloadInstance,x0=e.startSuspendingCommit,yy=e.suspendInstance,Xp=e.waitForCommitToBeReady,by=e.NotPendingTransition,P1=e.HostTransitionContext,_M=e.resetFormInstance;e.bindToConsole;var i2=e.supportsMicrotasks,ew=e.scheduleMicrotask,oS=e.supportsTestSelectors,HE=e.findFiberRoot,jE=e.getBoundingRect,VE=e.getTextContent,tw=e.isHiddenSubtree,lR=e.matchAccessibilityRole,qE=e.setFocusIfFocusable,OA=e.setupIntersectionObserver,NA=e.appendChild,FA=e.appendChildToContainer,zA=e.commitTextUpdate,Qk=e.commitMount,uR=e.commitUpdate,cR=e.insertBefore,GE=e.insertInContainerBefore,$E=e.removeChild,BA=e.removeChildFromContainer,WE=e.resetTextContent,fR=e.hideInstance,UA=e.hideTextInstance,dR=e.unhideInstance,wM=e.unhideTextInstance,Gd=e.clearContainer,_T=e.cloneInstance,HA=e.createContainerChildSet,a2=e.appendChildToContainerChildSet,wT=e.finalizeContainerChildren,sS=e.replaceContainerChildren,jA=e.cloneHiddenInstance,D1=e.cloneHiddenTextInstance,YE=e.isSuspenseInstancePending,o2=e.isSuspenseInstanceFallback,VA=e.getSuspenseInstanceFallbackErrorDetails,qA=e.registerSuspenseInstanceRetry,rw=e.canHydrateFormStateMarker,e1=e.isFormStateMarkerMatching,Ax=e.getNextHydratableSibling,XE=e.getFirstHydratableChild,hR=e.getFirstHydratableChildWithinContainer,ZE=e.getFirstHydratableChildWithinSuspenseInstance,eI=e.canHydrateInstance,ST=e.canHydrateTextInstance,pR=e.canHydrateSuspenseInstance,KE=e.hydrateInstance,GA=e.hydrateTextInstance,nw=e.hydrateSuspenseInstance,tI=e.getNextHydratableInstanceAfterSuspenseInstance,lS=e.commitHydratedContainer,SM=e.commitHydratedSuspenseInstance,TM=e.clearSuspenseBoundary,TT=e.clearSuspenseBoundaryFromContainer,EM=e.shouldDeleteUnhydratedTailInstances;e.diffHydratedPropsForDevWarnings,e.diffHydratedTextForDevWarnings,e.describeHydratableInstanceForDevWarnings;var AM=e.validateHydratableInstance,rI=e.validateHydratableTextInstance,t1=e.supportsResources,s2=e.isHostHoistableType,$A=e.getHoistableRoot,JE=e.getResource,CM=e.acquireResource,Tg=e.releaseResource,cb=e.hydrateHoistable,QE=e.mountHoistable,l2=e.unmountHoistable,uS=e.createHoistableInstance,iw=e.prepareToCommitHoistables,MM=e.mayResourceSuspendCommit,u2=e.preloadResource,nI=e.suspendResource,lv=e.supportsSingletons,xy=e.resolveSingletonInstance,Bb=e.clearSingleton,RM=e.acquireSingletonInstance,aw=e.releaseSingletonInstance,Ub=e.isHostSingletonType,nm=[],m_=-1,g_={},_y=Math.clz32?Math.clz32:Se,e3=Math.log,iI=Math.LN2,y_=128,ow=4194304,ET=Nb.unstable_scheduleCallback,t3=Nb.unstable_cancelCallback,aI=Nb.unstable_shouldYield,WA=Nb.unstable_requestPaint,n0=Nb.unstable_now,YA=Nb.unstable_ImmediatePriority,vR=Nb.unstable_UserBlockingPriority,kM=Nb.unstable_NormalPriority,mR=Nb.unstable_IdlePriority,cS=Nb.log,H0=Nb.unstable_setDisableYieldValue,uv=null,r1=null,n1=typeof Object.is=="function"?Object.is:Zt,r3=new WeakMap,b_=[],Cx=0,nf=null,x_=0,L1=[],_0=0,fS=null,Hb=1,Mx="",rp=ae(null),n3=ae(null),sw=ae(null),c2=ae(null),j0=null,w0=null,np=!1,Rx=null,V0=!1,jb=Error(i(519)),im=[],f2=0,__=0,AT=null,d2=null,CT=!1,Zp=!1,XA=!1,dS=0,lw=null,hS=0,Vb=0,MT=null,uw=!1,pS=!1,cw=Object.prototype.hasOwnProperty,vS=Error(i(460)),i3=Error(i(474)),h2={then:function(){}},fw=null,qb=null,dw=0,w_=Xa(!0),q0=Xa(!1),Rh=ae(null),kx=ae(0),Gb=ae(null),bp=null,$g=ae(0),Ix=0,$d=null,kf=null,xp=null,Px=!1,RT=!1,p2=!1,mS=0,kT=0,G0=null,Dx=0,ZA=function(){return{lastEffect:null,events:null,stores:null,memoCache:null}},ag={readContext:jg,use:_a,useCallback:Vl,useContext:Vl,useEffect:Vl,useImperativeHandle:Vl,useLayoutEffect:Vl,useInsertionEffect:Vl,useMemo:Vl,useReducer:Vl,useRef:Vl,useState:Vl,useDebugValue:Vl,useDeferredValue:Vl,useTransition:Vl,useSyncExternalStore:Vl,useId:Vl};ag.useCacheRefresh=Vl,ag.useMemoCache=Vl,ag.useHostTransitionStatus=Vl,ag.useFormState=Vl,ag.useActionState=Vl,ag.useOptimistic=Vl;var gS={readContext:jg,use:_a,useCallback:function(Ce,Ne){return ea().memoizedState=[Ce,Ne===void 0?null:Ne],Ce},useContext:jg,useEffect:E1,useImperativeHandle:function(Ce,Ne,Tt){Tt=Tt!=null?Tt.concat([Ce]):null,bE(4194308,4,Wp.bind(null,Ne,Ce),Tt)},useLayoutEffect:function(Ce,Ne){return bE(4194308,4,Ce,Ne)},useInsertionEffect:function(Ce,Ne){bE(4,2,Ce,Ne)},useMemo:function(Ce,Ne){var Tt=ea();Ne=Ne===void 0?null:Ne;var Kt=Ce();if(p2){dr(!0);try{Ce()}finally{dr(!1)}}return Tt.memoizedState=[Kt,Ne],Kt},useReducer:function(Ce,Ne,Tt){var Kt=ea();if(Tt!==void 0){var Dr=Tt(Ne);if(p2){dr(!0);try{Tt(Ne)}finally{dr(!1)}}}else Dr=Ne;return Kt.memoizedState=Kt.baseState=Dr,Ce={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ce,lastRenderedState:Dr},Kt.queue=Ce,Ce=Ce.dispatch=vA.bind(null,$d,Ce),[Kt.memoizedState,Ce]},useRef:function(Ce){var Ne=ea();return Ce={current:Ce},Ne.memoizedState=Ce},useState:function(Ce){Ce=yc(Ce);var Ne=Ce.queue,Tt=wg.bind(null,$d,Ne);return Ne.dispatch=Tt,[Ce.memoizedState,Tt]},useDebugValue:G_,useDeferredValue:function(Ce,Ne){var Tt=ea();return xE(Tt,Ce,Ne)},useTransition:function(){var Ce=yc(!1);return Ce=n_.bind(null,$d,Ce.queue,!0,!1),ea().memoizedState=Ce,[!1,Ce]},useSyncExternalStore:function(Ce,Ne,Tt){var Kt=$d,Dr=ea();if(np){if(Tt===void 0)throw Error(i(407));Tt=Tt()}else{if(Tt=Ne(),Jp===null)throw Error(i(349));(Wd&60)!==0||Gl(Kt,Ne,Tt)}Dr.memoizedState=Tt;var pn={value:Tt,getSnapshot:Ne};return Dr.queue=pn,E1(ic.bind(null,Kt,pn,Ce),[Ce]),Kt.flags|=2048,eg(9,Qu.bind(null,Kt,pn,Tt,Ne),{destroy:void 0},null),Tt},useId:function(){var Ce=ea(),Ne=Jp.identifierPrefix;if(np){var Tt=Mx,Kt=Hb;Tt=(Kt&~(1<<32-_y(Kt)-1)).toString(32)+Tt,Ne=":"+Ne+"R"+Tt,Tt=mS++,0<Tt&&(Ne+="H"+Tt.toString(32)),Ne+=":"}else Tt=Dx++,Ne=":"+Ne+"r"+Tt.toString(32)+":";return Ce.memoizedState=Ne},useCacheRefresh:function(){return ea().memoizedState=Xw.bind(null,$d)}};gS.useMemoCache=Zs,gS.useHostTransitionStatus=J2,gS.useFormState=ep,gS.useActionState=ep,gS.useOptimistic=function(Ce){var Ne=ea();Ne.memoizedState=Ne.baseState=Ce;var Tt={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return Ne.queue=Tt,Ne=jp.bind(null,$d,!0,Tt),Tt.dispatch=Ne,[Ce,Ne]};var O1={readContext:jg,use:_a,useCallback:Jd,useContext:jg,useEffect:tg,useImperativeHandle:Hg,useInsertionEffect:ah,useLayoutEffect:Ug,useMemo:pA,useReducer:el,useRef:Om,useState:function(){return el(ks)},useDebugValue:G_,useDeferredValue:function(Ce,Ne){var Tt=pa();return lM(Tt,kf.memoizedState,Ce,Ne)},useTransition:function(){var Ce=el(ks)[0],Ne=pa().memoizedState;return[typeof Ce=="boolean"?Ce:ja(Ce),Ne]},useSyncExternalStore:il,useId:_g};O1.useCacheRefresh=A1,O1.useMemoCache=Zs,O1.useHostTransitionStatus=J2,O1.useFormState=Tc,O1.useActionState=Tc,O1.useOptimistic=function(Ce,Ne){var Tt=pa();return ii(Tt,kf,Ce,Ne)};var $b={readContext:jg,use:_a,useCallback:Jd,useContext:jg,useEffect:tg,useImperativeHandle:Hg,useInsertionEffect:ah,useLayoutEffect:Ug,useMemo:pA,useReducer:tl,useRef:Om,useState:function(){return tl(ks)},useDebugValue:G_,useDeferredValue:function(Ce,Ne){var Tt=pa();return kf===null?xE(Tt,Ce,Ne):lM(Tt,kf.memoizedState,Ce,Ne)},useTransition:function(){var Ce=tl(ks)[0],Ne=pa().memoizedState;return[typeof Ce=="boolean"?Ce:ja(Ce),Ne]},useSyncExternalStore:il,useId:_g};$b.useCacheRefresh=A1,$b.useMemoCache=Zs,$b.useHostTransitionStatus=J2,$b.useFormState=T1,$b.useActionState=T1,$b.useOptimistic=function(Ce,Ne){var Tt=pa();return kf!==null?ii(Tt,kf,Ce,Ne):(Tt.baseState=Ce,[Ce,Tt.queue.dispatch])};var S_={isMounted:function(Ce){return(Ce=Ce._reactInternals)?B(Ce)===Ce:!1},enqueueSetState:function(Ce,Ne,Tt){Ce=Ce._reactInternals;var Kt=Ch(),Dr=go(Kt);Dr.payload=Ne,Tt!=null&&(Dr.callback=Tt),Ne=Co(Ce,Dr,Kt),Ne!==null&&(rg(Ne,Ce,Kt),Ko(Ne,Ce,Kt))},enqueueReplaceState:function(Ce,Ne,Tt){Ce=Ce._reactInternals;var Kt=Ch(),Dr=go(Kt);Dr.tag=1,Dr.payload=Ne,Tt!=null&&(Dr.callback=Tt),Ne=Co(Ce,Dr,Kt),Ne!==null&&(rg(Ne,Ce,Kt),Ko(Ne,Ce,Kt))},enqueueForceUpdate:function(Ce,Ne){Ce=Ce._reactInternals;var Tt=Ch(),Kt=go(Tt);Kt.tag=2,Ne!=null&&(Kt.callback=Ne),Ne=Co(Ce,Kt,Tt),Ne!==null&&(rg(Ne,Ce,Tt),Ko(Ne,Ce,Tt))}},IM=typeof reportError=="function"?reportError:function(Ce){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Ne=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof Ce=="object"&&Ce!==null&&typeof Ce.message=="string"?String(Ce.message):String(Ce),error:Ce});if(!window.dispatchEvent(Ne))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",Ce);return}console.error(Ce)},v2=Error(i(461)),Kp=!1,PM={dehydrated:null,treeContext:null,retryLane:0},hw=ae(null),Lx=null,Bm=null,pw=typeof AbortController<"u"?AbortController:function(){var Ce=[],Ne=this.signal={aborted:!1,addEventListener:function(Tt,Kt){Ce.push(Kt)}};this.abort=function(){Ne.aborted=!0,Ce.forEach(function(Tt){return Tt()})}},DM=Nb.unstable_scheduleCallback,gR=Nb.unstable_NormalPriority,Fv={$$typeof:d_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0},yR=Ef.S;Ef.S=function(Ce,Ne){typeof Ne=="object"&&Ne!==null&&typeof Ne.then=="function"&&Ki(Ce,Ne),yR!==null&&yR(Ce,Ne)};var vw=ae(null),mw=!1,Eg=!1,KA=!1,Lp=typeof WeakSet=="function"?WeakSet:Set,Pd=null,sh=!1,wf=null,Ed=!1,zv=null,Wb=8192,a3={getCacheForType:function(Ce){var Ne=jg(Fv),Tt=Ne.data.get(Ce);return Tt===void 0&&(Tt=Ce(),Ne.data.set(Ce,Tt)),Tt}},o3=0,Yb=1,am=2,T_=3,gw=4;if(typeof Symbol=="function"&&Symbol.for){var yS=Symbol.for;o3=yS("selector.component"),Yb=yS("selector.has_pseudo_class"),am=yS("selector.role"),T_=yS("selector.test_id"),gw=yS("selector.text")}var Xb=typeof WeakMap=="function"?WeakMap:Map,ip=0,Jp=null,If=null,Wd=0,cv=0,$0=null,fb=!1,W0=!1,S0=!1,wy=0,fv=0,Zb=0,m2=0,s3=0,db=0,E_=0,IT=null,bm=null,bS=!1,i1=0,l3=1/0,u3=null,xS=null,Ox=!1,yw=null,PT=0,g2=0,c3=null,y2=0,LM=null;return Nd.attemptContinuousHydration=function(Ce){if(Ce.tag===13){var Ne=bn(Ce,67108864);Ne!==null&&rg(Ne,Ce,67108864),RA(Ce,67108864)}},Nd.attemptHydrationAtCurrentPriority=function(Ce){if(Ce.tag===13){var Ne=Ch(),Tt=bn(Ce,Ne);Tt!==null&&rg(Tt,Ce,Ne),RA(Ce,Ne)}},Nd.attemptSynchronousHydration=function(Ce){switch(Ce.tag){case 3:if(Ce=Ce.stateNode,Ce.current.memoizedState.isDehydrated){var Ne=Pe(Ce.pendingLanes);if(Ne!==0){for(Ce.pendingLanes|=2,Ce.entangledLanes|=2;Ne;){var Tt=1<<31-_y(Ne);Ce.entanglements[1]|=Tt,Ne&=~Tt}Oi(Ce),(ip&6)===0&&(l3=n0()+500,Pa(0))}}break;case 13:Ne=bn(Ce,2),Ne!==null&&rg(Ne,Ce,2),k1(),RA(Ce,2)}},Nd.batchedUpdates=function(Ce,Ne){return Ce(Ne)},Nd.createComponentSelector=function(Ce){return{$$typeof:o3,value:Ce}},Nd.createContainer=function(Ce,Ne,Tt,Kt,Dr,pn,ta,vo,fs,xl){return Zk(Ce,Ne,!1,null,Tt,Kt,pn,ta,vo,fs,xl,null)},Nd.createHasPseudoClassSelector=function(Ce){return{$$typeof:Yb,value:Ce}},Nd.createHydrationContainer=function(Ce,Ne,Tt,Kt,Dr,pn,ta,vo,fs,xl,cu,$l,bc){return Ce=Zk(Tt,Kt,!0,Ce,Dr,pn,vo,fs,xl,cu,$l,bc),Ce.context=Sv(null),Tt=Ce.current,Kt=Ch(),Dr=go(Kt),Dr.callback=Ne??null,Co(Tt,Dr,Kt),Ce.current.lanes=Kt,ut(Ce,Kt),Oi(Ce),Ce},Nd.createPortal=function(Ce,Ne,Tt){var Kt=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Tx,key:Kt==null?null:""+Kt,children:Ce,containerInfo:Ne,implementation:Tt}},Nd.createRoleSelector=function(Ce){return{$$typeof:am,value:Ce}},Nd.createTestNameSelector=function(Ce){return{$$typeof:T_,value:Ce}},Nd.createTextSelector=function(Ce){return{$$typeof:gw,value:Ce}},Nd.defaultOnCaughtError=function(Ce){console.error(Ce)},Nd.defaultOnRecoverableError=function(Ce){IM(Ce)},Nd.defaultOnUncaughtError=function(Ce){IM(Ce)},Nd.deferredUpdates=function(Ce){var Ne=Ef.T,Tt=v_();try{return rm(32),Ef.T=null,Ce()}finally{rm(Tt),Ef.T=Ne}},Nd.discreteUpdates=function(Ce,Ne,Tt,Kt,Dr){var pn=Ef.T,ta=v_();try{return rm(2),Ef.T=null,Ce(Ne,Tt,Kt,Dr)}finally{rm(ta),Ef.T=pn,ip===0&&(l3=n0()+500)}},Nd.findAllNodes=y0,Nd.findBoundingRects=function(Ce,Ne){if(!oS)throw Error(i(363));Ne=y0(Ce,Ne),Ce=[];for(var Tt=0;Tt<Ne.length;Tt++)Ce.push(jE(Ne[Tt]));for(Ne=Ce.length-1;0<Ne;Ne--){Tt=Ce[Ne];for(var Kt=Tt.x,Dr=Kt+Tt.width,pn=Tt.y,ta=pn+Tt.height,vo=Ne-1;0<=vo;vo--)if(Ne!==vo){var fs=Ce[vo],xl=fs.x,cu=xl+fs.width,$l=fs.y,bc=$l+fs.height;if(Kt>=xl&&pn>=$l&&Dr<=cu&&ta<=bc){Ce.splice(Ne,1);break}else if(Kt!==xl||Tt.width!==fs.width||bc<pn||$l>ta){if(!(pn!==$l||Tt.height!==fs.height||cu<Kt||xl>Dr)){xl>Kt&&(fs.width+=xl-Kt,fs.x=Kt),cu<Dr&&(fs.width=Dr-xl),Ce.splice(Ne,1);break}}else{$l>pn&&(fs.height+=$l-pn,fs.y=pn),bc<ta&&(fs.height=ta-$l),Ce.splice(Ne,1);break}}}return Ce},Nd.findHostInstance=gM,Nd.findHostInstanceWithNoPortals=function(Ce){return Ce=X(Ce),Ce=Ce!==null?de(Ce):null,Ce===null?null:xT(Ce.stateNode)},Nd.findHostInstanceWithWarning=function(Ce){return gM(Ce)},Nd.flushPassiveEffects=c_,Nd.flushSyncFromReconciler=function(Ce){var Ne=ip;ip|=1;var Tt=Ef.T,Kt=v_();try{if(rm(2),Ef.T=null,Ce)return Ce()}finally{rm(Kt),Ef.T=Tt,ip=Ne,(ip&6)===0&&Pa(0)}},Nd.flushSyncWork=k1,Nd.focusWithin=function(Ce,Ne){if(!oS)throw Error(i(363));for(Ce=fT(Ce),Ne=g0(Ce,Ne),Ne=Array.from(Ne),Ce=0;Ce<Ne.length;){var Tt=Ne[Ce++],Kt=Tt.tag;if(!tw(Tt)){if((Kt===5||Kt===26||Kt===27)&&qE(Tt.stateNode))return!0;for(Tt=Tt.child;Tt!==null;)Ne.push(Tt),Tt=Tt.sibling}}return!1},Nd.getFindAllNodesFailureDescription=function(Ce,Ne){if(!oS)throw Error(i(363));var Tt=0,Kt=[];Ce=[fT(Ce),0];for(var Dr=0;Dr<Ce.length;){var pn=Ce[Dr++],ta=pn.tag,vo=Ce[Dr++],fs=Ne[vo];if((ta!==5&&ta!==26&&ta!==27||!tw(pn))&&(r0(pn,fs)&&(Kt.push(Xy(fs)),vo++,vo>Tt&&(Tt=vo)),vo<Ne.length))for(pn=pn.child;pn!==null;)Ce.push(pn,vo),pn=pn.sibling}if(Tt<Ne.length){for(Ce=[];Tt<Ne.length;Tt++)Ce.push(Xy(Ne[Tt]));return`findAllNodes was able to match part of the selector:
  `+(Kt.join(" > ")+`

No matching component was found for:
  `)+Ce.join(" > ")}return null},Nd.getPublicRootInstance=function(Ce){if(Ce=Ce.current,!Ce.child)return null;switch(Ce.child.tag){case 27:case 5:return xT(Ce.child.stateNode);default:return Ce.child.stateNode}},Nd.injectIntoDevTools=function(){var Ce={bundleType:0,version:DA,rendererPackageName:oh,currentDispatcherRef:Ef,findFiberByHostInstance:sR,reconcilerVersion:"19.0.0"};if(U0!==null&&(Ce.rendererConfig=U0),typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")Ce=!1;else{var Ne=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(Ne.isDisabled||!Ne.supportsFiber)Ce=!0;else{try{uv=Ne.inject(Ce),r1=Ne}catch{}Ce=!!Ne.checkDCE}}return Ce},Nd.isAlreadyRendering=function(){return!1},Nd.observeVisibleRects=function(Ce,Ne,Tt,Kt){if(!oS)throw Error(i(363));Ce=y0(Ce,Ne);var Dr=OA(Ce,Tt,Kt).disconnect;return{disconnect:function(){Dr()}}},Nd.shouldError=function(){return null},Nd.shouldSuspend=function(){return!1},Nd.startHostTransition=function(Ce,Ne,Tt,Kt){if(Ce.tag!==5)throw Error(i(476));var Dr=rb(Ce).queue;n_(Ce,Dr,Ne,by,Tt===null?n:function(){var pn=rb(Ce).next.queue;return Pp(Ce,pn,{},Ch()),Tt(Kt)})},Nd.updateContainer=function(Ce,Ne,Tt,Kt){var Dr=Ne.current,pn=Ch();return NE(Dr,pn,Ce,Ne,Tt,Kt),pn},Nd.updateContainerSync=function(Ce,Ne,Tt,Kt){return Ne.tag===0&&c_(),NE(Ne.current,2,Ce,Ne,Tt,Kt),2},Nd},t.exports.default=t.exports,Object.defineProperty(t.exports,"__esModule",{value:!0})})(Kae)),Kae.exports}var NPe;function vrr(){return NPe||(NPe=1,Zae.exports=prr()),Zae.exports}var mrr=vrr();const grr=Qh(mrr);var FPe=JWe();function e1e(t,e,r){if(!t)return;if(r(t)===!0)return t;let n=e?t.return:t.child;for(;n;){const i=e1e(n,e,r);if(i)return i;n=e?null:n.sibling}}function QWe(t){try{return Object.defineProperties(t,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return t}}const t1e=QWe(ze.createContext(null));let eYe=class extends ze.Component{render(){return ze.createElement(t1e.Provider,{value:this._reactInternals},this.props.children)}};function tYe(){const t=ze.useContext(t1e);if(t===null)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const e=ze.useId();return ze.useMemo(()=>{for(const r of[t,t?.alternate]){if(!r)continue;const n=e1e(r,!1,i=>{let a=i.memoizedState;for(;a;){if(a.memoizedState===e)return!0;a=a.next}});if(n)return n}},[t,e])}const yrr=Symbol.for("react.context"),brr=t=>t!==null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===yrr;function xrr(){const t=tYe(),[e]=ze.useState(()=>new Map);e.clear();let r=t;for(;r;){const n=r.type;brr(n)&&n!==t1e&&!e.has(n)&&e.set(n,ze.use(QWe(n))),r=r.return}return e}function _rr(){const t=xrr();return ze.useMemo(()=>Array.from(t.keys()).reduce((e,r)=>n=>ze.createElement(e,null,ze.createElement(r.Provider,{...n,value:t.get(r)})),e=>ze.createElement(eYe,{...e})),[t])}function rYe(t){let e=t.root;for(;e.getState().previousRoot;)e=e.getState().previousRoot;return e}const nYe=t=>t&&t.isOrthographicCamera,wrr=t=>t&&t.hasOwnProperty("current"),Srr=t=>t!=null&&(typeof t=="string"||typeof t=="number"||t.isColor),_U=((t,e)=>typeof window<"u"&&(((t=window.document)==null?void 0:t.createElement)||((e=window.navigator)==null?void 0:e.product)==="ReactNative"))()?ze.useLayoutEffect:ze.useEffect;function r1e(t){const e=ze.useRef(t);return _U(()=>void(e.current=t),[t]),e}function Trr(){const t=tYe(),e=_rr();return ze.useMemo(()=>({children:r})=>{const i=!!e1e(t,!0,a=>a.type===ze.StrictMode)?ze.StrictMode:ze.Fragment;return Ke.jsx(i,{children:Ke.jsx(e,{children:r})})},[t,e])}function Err({set:t}){return _U(()=>(t(new Promise(()=>null)),()=>t(!1)),[t]),null}const Arr=(t=>(t=class extends ze.Component{constructor(...r){super(...r),this.state={error:!1}}componentDidCatch(r){this.props.set(r)}render(){return this.state.error?null:this.props.children}},t.getDerivedStateFromError=()=>({error:!0}),t))();function iYe(t){var e;const r=typeof window<"u"?(e=window.devicePixelRatio)!=null?e:2:1;return Array.isArray(t)?Math.min(Math.max(t[0],r),t[1]):t}function $O(t){var e;return(e=t.__r3f)==null?void 0:e.root.getState()}const oy={obj:t=>t===Object(t)&&!oy.arr(t)&&typeof t!="function",fun:t=>typeof t=="function",str:t=>typeof t=="string",num:t=>typeof t=="number",boo:t=>typeof t=="boolean",und:t=>t===void 0,nul:t=>t===null,arr:t=>Array.isArray(t),equ(t,e,{arrays:r="shallow",objects:n="reference",strict:i=!0}={}){if(typeof t!=typeof e||!!t!=!!e)return!1;if(oy.str(t)||oy.num(t)||oy.boo(t))return t===e;const a=oy.obj(t);if(a&&n==="reference")return t===e;const o=oy.arr(t);if(o&&r==="reference")return t===e;if((o||a)&&t===e)return!0;let s;for(s in t)if(!(s in e))return!1;if(a&&r==="shallow"&&n==="shallow"){for(s in i?e:t)if(!oy.equ(t[s],e[s],{strict:i,objects:"reference"}))return!1}else for(s in i?e:t)if(t[s]!==e[s])return!1;if(oy.und(s)){if(o&&t.length===0&&e.length===0||a&&Object.keys(t).length===0&&Object.keys(e).length===0)return!0;if(t!==e)return!1}return!0}};function Crr(t){const e={nodes:{},materials:{},meshes:{}};return t&&t.traverse(r=>{r.name&&(e.nodes[r.name]=r),r.material&&!e.materials[r.material.name]&&(e.materials[r.material.name]=r.material),r.isMesh&&!e.meshes[r.name]&&(e.meshes[r.name]=r)}),e}function Mrr(t){t.type!=="Scene"&&(t.dispose==null||t.dispose());for(const e in t){const r=t[e];r?.type!=="Scene"&&(r==null||r.dispose==null||r.dispose())}}const aYe=["children","key","ref"];function Rrr(t){const e={};for(const r in t)aYe.includes(r)||(e[r]=t[r]);return e}function RW(t,e,r,n){const i=t;let a=i?.__r3f;return a||(a={root:e,type:r,parent:null,children:[],props:Rrr(n),object:i,eventCount:0,handlers:{},isHidden:!1},i&&(i.__r3f=a)),a}function uB(t,e){let r=t[e];if(!e.includes("-"))return{root:t,key:e,target:r};r=t;for(const i of e.split("-")){var n;e=i,t=r,r=(n=r)==null?void 0:n[e]}return{root:t,key:e,target:r}}const zPe=/-\d+$/;function kW(t,e){if(oy.str(e.props.attach)){if(zPe.test(e.props.attach)){const i=e.props.attach.replace(zPe,""),{root:a,key:o}=uB(t.object,i);Array.isArray(a[o])||(a[o]=[])}const{root:r,key:n}=uB(t.object,e.props.attach);e.previousAttach=r[n],r[n]=e.object}else oy.fun(e.props.attach)&&(e.previousAttach=e.props.attach(t.object,e.object))}function IW(t,e){if(oy.str(e.props.attach)){const{root:r,key:n}=uB(t.object,e.props.attach),i=e.previousAttach;i===void 0?delete r[n]:r[n]=i}else e.previousAttach==null||e.previousAttach(t.object,e.object);delete e.previousAttach}const Hpe=[...aYe,"args","dispose","attach","object","onUpdate","dispose"],BPe=new Map;function krr(t){let e=BPe.get(t.constructor);try{e||(e=new t.constructor,BPe.set(t.constructor,e))}catch{}return e}function Irr(t,e){const r={};for(const n in e)if(!Hpe.includes(n)&&!oy.equ(e[n],t.props[n])){r[n]=e[n];for(const i in e)i.startsWith(`${n}-`)&&(r[i]=e[i])}for(const n in t.props){if(Hpe.includes(n)||e.hasOwnProperty(n))continue;const{root:i,key:a}=uB(t.object,n);if(i.constructor&&i.constructor.length===0){const o=krr(i);oy.und(o)||(r[a]=o[a])}else r[a]=0}return r}const Prr=["map","emissiveMap","sheenColorMap","specularColorMap","envMap"],Drr=/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/;function OC(t,e){var r;const n=t.__r3f,i=n&&rYe(n).getState(),a=n?.eventCount;for(const s in e){let d=e[s];if(Hpe.includes(s))continue;if(n&&Drr.test(s)){typeof d=="function"?n.handlers[s]=d:delete n.handlers[s],n.eventCount=Object.keys(n.handlers).length;continue}if(d===void 0)continue;let{root:b,key:L,target:B}=uB(t,s);if(B instanceof b8&&d instanceof b8)B.mask=d.mask;else if(B instanceof Wu&&Srr(d))B.set(d);else if(B!==null&&typeof B=="object"&&typeof B.set=="function"&&typeof B.copy=="function"&&d!=null&&d.constructor&&B.constructor===d.constructor)B.copy(d);else if(B!==null&&typeof B=="object"&&typeof B.set=="function"&&Array.isArray(d))typeof B.fromArray=="function"?B.fromArray(d):B.set(...d);else if(B!==null&&typeof B=="object"&&typeof B.set=="function"&&typeof d=="number")typeof B.setScalar=="function"?B.setScalar(d):B.set(d);else{var o;b[L]=d,i&&!i.linear&&Prr.includes(L)&&(o=b[L])!=null&&o.isTexture&&b[L].format===Rp&&b[L].type===e_&&(b[L].colorSpace=H_)}}if(n!=null&&n.parent&&i!=null&&i.internal&&(r=n.object)!=null&&r.isObject3D&&a!==n.eventCount){const s=n.object,d=i.internal.interaction.indexOf(s);d>-1&&i.internal.interaction.splice(d,1),n.eventCount&&s.raycast!==null&&i.internal.interaction.push(s)}return n&&n.props.attach===void 0&&(n.object.isBufferGeometry?n.props.attach="geometry":n.object.isMaterial&&(n.props.attach="material")),n&&xF(n),t}function xF(t){var e;if(!t.parent)return;t.props.onUpdate==null||t.props.onUpdate(t.object);const r=(e=t.root)==null||e.getState==null?void 0:e.getState();r&&r.internal.frames===0&&r.invalidate()}function oYe(t,e){t.manual||(nYe(t)?(t.left=e.width/-2,t.right=e.width/2,t.top=e.height/2,t.bottom=e.height/-2):t.aspect=e.width/e.height,t.updateProjectionMatrix())}const O2=t=>t?.isObject3D;function QV(t){return(t.eventObject||t.object).uuid+"/"+t.index+t.instanceId}function sYe(t,e,r,n){const i=r.get(e);i&&(r.delete(e),r.size===0&&(t.delete(n),i.target.releasePointerCapture(n)))}function Lrr(t,e){const{internal:r}=t.getState();r.interaction=r.interaction.filter(n=>n!==e),r.initialHits=r.initialHits.filter(n=>n!==e),r.hovered.forEach((n,i)=>{(n.eventObject===e||n.object===e)&&r.hovered.delete(i)}),r.capturedMap.forEach((n,i)=>{sYe(r.capturedMap,e,n,i)})}function Orr(t){function e(d){const{internal:b}=t.getState(),L=d.offsetX-b.initialClick[0],B=d.offsetY-b.initialClick[1];return Math.round(Math.sqrt(L*L+B*B))}function r(d){return d.filter(b=>["Move","Over","Enter","Out","Leave"].some(L=>{var B;return(B=b.__r3f)==null?void 0:B.handlers["onPointer"+L]}))}function n(d,b){const L=t.getState(),B=new Set,V=[],X=b?b(L.internal.interaction):L.internal.interaction;for(let U=0;U<X.length;U++){const ve=$O(X[U]);ve&&(ve.raycaster.camera=void 0)}L.previousRoot||L.events.compute==null||L.events.compute(d,L);function ie(U){const ve=$O(U);if(!ve||!ve.events.enabled||ve.raycaster.camera===null)return[];if(ve.raycaster.camera===void 0){var Se;ve.events.compute==null||ve.events.compute(d,ve,(Se=ve.previousRoot)==null?void 0:Se.getState()),ve.raycaster.camera===void 0&&(ve.raycaster.camera=null)}return ve.raycaster.camera?ve.raycaster.intersectObject(U,!0):[]}let de=X.flatMap(ie).sort((U,ve)=>{const Se=$O(U.object),Pe=$O(ve.object);return!Se||!Pe?U.distance-ve.distance:Pe.events.priority-Se.events.priority||U.distance-ve.distance}).filter(U=>{const ve=QV(U);return B.has(ve)?!1:(B.add(ve),!0)});L.events.filter&&(de=L.events.filter(de,L));for(const U of de){let ve=U.object;for(;ve;){var ae;(ae=ve.__r3f)!=null&&ae.eventCount&&V.push({...U,eventObject:ve}),ve=ve.parent}}if("pointerId"in d&&L.internal.capturedMap.has(d.pointerId))for(let U of L.internal.capturedMap.get(d.pointerId).values())B.has(QV(U.intersection))||V.push(U.intersection);return V}function i(d,b,L,B){if(d.length){const V={stopped:!1};for(const X of d){let ie=$O(X.object);if(ie||X.object.traverseAncestors(de=>{const ae=$O(de);if(ae)return ie=ae,!1}),ie){const{raycaster:de,pointer:ae,camera:U,internal:ve}=ie,Se=new oi(ae.x,ae.y,0).unproject(U),Pe=Je=>{var nt,ut;return(nt=(ut=ve.capturedMap.get(Je))==null?void 0:ut.has(X.eventObject))!=null?nt:!1},Me=Je=>{const nt={intersection:X,target:b.target};ve.capturedMap.has(Je)?ve.capturedMap.get(Je).set(X.eventObject,nt):ve.capturedMap.set(Je,new Map([[X.eventObject,nt]])),b.target.setPointerCapture(Je)},Ie=Je=>{const nt=ve.capturedMap.get(Je);nt&&sYe(ve.capturedMap,X.eventObject,nt,Je)};let Ve={};for(let Je in b){let nt=b[Je];typeof nt!="function"&&(Ve[Je]=nt)}let Ze={...X,...Ve,pointer:ae,intersections:d,stopped:V.stopped,delta:L,unprojectedPoint:Se,ray:de.ray,camera:U,stopPropagation(){const Je="pointerId"in b&&ve.capturedMap.get(b.pointerId);if((!Je||Je.has(X.eventObject))&&(Ze.stopped=V.stopped=!0,ve.hovered.size&&Array.from(ve.hovered.values()).find(nt=>nt.eventObject===X.eventObject))){const nt=d.slice(0,d.indexOf(X));a([...nt,X])}},target:{hasPointerCapture:Pe,setPointerCapture:Me,releasePointerCapture:Ie},currentTarget:{hasPointerCapture:Pe,setPointerCapture:Me,releasePointerCapture:Ie},nativeEvent:b};if(B(Ze),V.stopped===!0)break}}}return d}function a(d){const{internal:b}=t.getState();for(const L of b.hovered.values())if(!d.length||!d.find(B=>B.object===L.object&&B.index===L.index&&B.instanceId===L.instanceId)){const V=L.eventObject.__r3f;if(b.hovered.delete(QV(L)),V!=null&&V.eventCount){const X=V.handlers,ie={...L,intersections:d};X.onPointerOut==null||X.onPointerOut(ie),X.onPointerLeave==null||X.onPointerLeave(ie)}}}function o(d,b){for(let L=0;L<b.length;L++){const B=b[L].__r3f;B==null||B.handlers.onPointerMissed==null||B.handlers.onPointerMissed(d)}}function s(d){switch(d){case"onPointerLeave":case"onPointerCancel":return()=>a([]);case"onLostPointerCapture":return b=>{const{internal:L}=t.getState();"pointerId"in b&&L.capturedMap.has(b.pointerId)&&requestAnimationFrame(()=>{L.capturedMap.has(b.pointerId)&&(L.capturedMap.delete(b.pointerId),a([]))})}}return function(L){const{onPointerMissed:B,internal:V}=t.getState();V.lastEvent.current=L;const X=d==="onPointerMove",ie=d==="onClick"||d==="onContextMenu"||d==="onDoubleClick",ae=n(L,X?r:void 0),U=ie?e(L):0;d==="onPointerDown"&&(V.initialClick=[L.offsetX,L.offsetY],V.initialHits=ae.map(Se=>Se.eventObject)),ie&&!ae.length&&U<=2&&(o(L,V.interaction),B&&B(L)),X&&a(ae);function ve(Se){const Pe=Se.eventObject,Me=Pe.__r3f;if(!(Me!=null&&Me.eventCount))return;const Ie=Me.handlers;if(X){if(Ie.onPointerOver||Ie.onPointerEnter||Ie.onPointerOut||Ie.onPointerLeave){const Ve=QV(Se),Ze=V.hovered.get(Ve);Ze?Ze.stopped&&Se.stopPropagation():(V.hovered.set(Ve,Se),Ie.onPointerOver==null||Ie.onPointerOver(Se),Ie.onPointerEnter==null||Ie.onPointerEnter(Se))}Ie.onPointerMove==null||Ie.onPointerMove(Se)}else{const Ve=Ie[d];Ve?(!ie||V.initialHits.includes(Pe))&&(o(L,V.interaction.filter(Ze=>!V.initialHits.includes(Ze))),Ve(Se)):ie&&V.initialHits.includes(Pe)&&o(L,V.interaction.filter(Ze=>!V.initialHits.includes(Ze)))}}i(ae,L,U,ve)}}return{handlePointer:s}}const UPe=t=>!!(t!=null&&t.render),n1e=ze.createContext(null),Nrr=(t,e)=>{const r=XWe((s,d)=>{const b=new oi,L=new oi,B=new oi;function V(U=d().camera,ve=L,Se=d().size){const{width:Pe,height:Me,top:Ie,left:Ve}=Se,Ze=Pe/Me;ve.isVector3?B.copy(ve):B.set(...ve);const Je=U.getWorldPosition(b).distanceTo(B);if(nYe(U))return{width:Pe/U.zoom,height:Me/U.zoom,top:Ie,left:Ve,factor:1,distance:Je,aspect:Ze};{const nt=U.fov*Math.PI/180,ut=2*Math.tan(nt/2)*Je,ht=ut*(Pe/Me);return{width:ht,height:ut,top:Ie,left:Ve,factor:Pe/ht,distance:Je,aspect:Ze}}}let X;const ie=U=>s(ve=>({performance:{...ve.performance,current:U}})),de=new sl;return{set:s,get:d,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},scene:null,xr:null,invalidate:(U=1)=>t(d(),U),advance:(U,ve)=>e(U,ve,d()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new dZ,pointer:de,mouse:de,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const U=d();X&&clearTimeout(X),U.performance.current!==U.performance.min&&ie(U.performance.min),X=setTimeout(()=>ie(d().performance.max),U.performance.debounce)}},size:{width:0,height:0,top:0,left:0},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:V},setEvents:U=>s(ve=>({...ve,events:{...ve.events,...U}})),setSize:(U,ve,Se=0,Pe=0)=>{const Me=d().camera,Ie={width:U,height:ve,top:Se,left:Pe};s(Ve=>({size:Ie,viewport:{...Ve.viewport,...V(Me,L,Ie)}}))},setDpr:U=>s(ve=>{const Se=iYe(U);return{viewport:{...ve.viewport,dpr:Se,initialDpr:ve.viewport.initialDpr||Se}}}),setFrameloop:(U="always")=>{const ve=d().clock;ve.stop(),ve.elapsedTime=0,U!=="never"&&(ve.start(),ve.elapsedTime=0),s(()=>({frameloop:U}))},previousRoot:void 0,internal:{interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,lastEvent:ze.createRef(),active:!1,frames:0,priority:0,subscribe:(U,ve,Se)=>{const Pe=d().internal;return Pe.priority=Pe.priority+(ve>0?1:0),Pe.subscribers.push({ref:U,priority:ve,store:Se}),Pe.subscribers=Pe.subscribers.sort((Me,Ie)=>Me.priority-Ie.priority),()=>{const Me=d().internal;Me!=null&&Me.subscribers&&(Me.priority=Me.priority-(ve>0?1:0),Me.subscribers=Me.subscribers.filter(Ie=>Ie.ref!==U))}}}}}),n=r.getState();let i=n.size,a=n.viewport.dpr,o=n.camera;return r.subscribe(()=>{const{camera:s,size:d,viewport:b,gl:L,set:B}=r.getState();if(d.width!==i.width||d.height!==i.height||b.dpr!==a){i=d,a=b.dpr,oYe(s,d),b.dpr>0&&L.setPixelRatio(b.dpr);const V=typeof HTMLCanvasElement<"u"&&L.domElement instanceof HTMLCanvasElement;L.setSize(d.width,d.height,V)}s!==o&&(o=s,B(V=>({viewport:{...V.viewport,...V.viewport.getCurrentViewport(s)}})))}),r.subscribe(s=>t(s)),r};function i1e(){const t=ze.useContext(n1e);if(!t)throw new Error("R3F: Hooks can only be used within the Canvas component!");return t}function Km(t=r=>r,e){return i1e()(t,e)}function o6(t,e=0){const r=i1e(),n=r.getState().internal.subscribe,i=r1e(t);return _U(()=>n(i,e,r),[e,n,r]),null}const HPe=new WeakMap,Frr=t=>{var e;return typeof t=="function"&&(t==null||(e=t.prototype)==null?void 0:e.constructor)===t};function lYe(t,e){return function(r,...n){let i;return Frr(r)?(i=HPe.get(r),i||(i=new r,HPe.set(r,i))):i=r,t&&t(i),Promise.all(n.map(a=>new Promise((o,s)=>i.load(a,d=>{O2(d?.scene)&&Object.assign(d,Crr(d.scene)),o(d)},e,d=>s(new Error(`Could not load ${a}: ${d?.message}`))))))}}function S8(t,e,r,n){const i=Array.isArray(e)?e:[e],a=crr(lYe(r,n),[t,...i],{equal:oy.equ});return Array.isArray(e)?a:a[0]}S8.preload=function(t,e,r){const n=Array.isArray(e)?e:[e];return frr(lYe(r),[t,...n])};S8.clear=function(t,e){const r=Array.isArray(e)?e:[e];return drr([t,...r])};function zrr(t){const e=grr(t);return e.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:ze.version}),e}const uYe=0,T8={},Brr=/^three(?=[A-Z])/,vZ=t=>`${t[0].toUpperCase()}${t.slice(1)}`;let Urr=0;const Hrr=t=>typeof t=="function";function cYe(t){if(Hrr(t)){const e=`${Urr++}`;return T8[e]=t,e}else Object.assign(T8,t)}function fYe(t,e){const r=vZ(t),n=T8[r];if(t!=="primitive"&&!n)throw new Error(`R3F: ${r} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);if(t==="primitive"&&!e.object)throw new Error("R3F: Primitives without 'object' are invalid!");if(e.args!==void 0&&!Array.isArray(e.args))throw new Error("R3F: The args prop must be an array!")}function jrr(t,e,r){var n;return t=vZ(t)in T8?t:t.replace(Brr,""),fYe(t,e),t==="primitive"&&(n=e.object)!=null&&n.__r3f&&delete e.object.__r3f,RW(e.object,r,t,e)}function Vrr(t){if(!t.isHidden){var e;t.props.attach&&(e=t.parent)!=null&&e.object?IW(t.parent,t):O2(t.object)&&(t.object.visible=!1),t.isHidden=!0,xF(t)}}function dYe(t){if(t.isHidden){var e;t.props.attach&&(e=t.parent)!=null&&e.object?kW(t.parent,t):O2(t.object)&&t.props.visible!==!1&&(t.object.visible=!0),t.isHidden=!1,xF(t)}}function a1e(t,e,r){const n=e.root.getState();if(!(!t.parent&&t.object!==n.scene)){if(!e.object){var i,a;const o=T8[vZ(e.type)];e.object=(i=e.props.object)!=null?i:new o(...(a=e.props.args)!=null?a:[]),e.object.__r3f=e}if(OC(e.object,e.props),e.props.attach)kW(t,e);else if(O2(e.object)&&O2(t.object)){const o=t.object.children.indexOf(r?.object);if(r&&o!==-1){const s=t.object.children.indexOf(e.object);if(s!==-1){t.object.children.splice(s,1);const d=s<o?o-1:o;t.object.children.splice(d,0,e.object)}else e.object.parent=t.object,t.object.children.splice(o,0,e.object),e.object.dispatchEvent({type:"added"}),t.object.dispatchEvent({type:"childadded",child:e.object})}else t.object.add(e.object)}for(const o of e.children)a1e(e,o);xF(e)}}function eoe(t,e){e&&(e.parent=t,t.children.push(e),a1e(t,e))}function jPe(t,e,r){if(!e||!r)return;e.parent=t;const n=t.children.indexOf(r);n!==-1?t.children.splice(n,0,e):t.children.push(e),a1e(t,e,r)}function hYe(t){if(typeof t.dispose=="function"){const e=()=>{try{t.dispose()}catch{}};typeof IS_REACT_ACT_ENVIRONMENT<"u"?e():FPe.unstable_scheduleCallback(FPe.unstable_IdlePriority,e)}}function jpe(t,e,r){if(!e)return;e.parent=null;const n=t.children.indexOf(e);n!==-1&&t.children.splice(n,1),e.props.attach?IW(t,e):O2(e.object)&&O2(t.object)&&(t.object.remove(e.object),Lrr(rYe(e),e.object));const i=e.props.dispose!==null&&r!==!1;for(let a=e.children.length-1;a>=0;a--){const o=e.children[a];jpe(e,o,i)}e.children.length=0,delete e.object.__r3f,i&&e.type!=="primitive"&&e.object.type!=="Scene"&&hYe(e.object),r===void 0&&xF(e)}function qrr(t,e){for(const r of[t,t.alternate])if(r!==null)if(typeof r.ref=="function"){r.refCleanup==null||r.refCleanup();const n=r.ref(e);typeof n=="function"&&(r.refCleanup=n)}else r.ref&&(r.ref.current=e)}const NG=[];function Grr(){for(const[r]of NG){const n=r.parent;if(n){r.props.attach?IW(n,r):O2(r.object)&&O2(n.object)&&n.object.remove(r.object);for(const i of r.children)i.props.attach?IW(r,i):O2(i.object)&&O2(r.object)&&r.object.remove(i.object)}r.isHidden&&dYe(r),r.object.__r3f&&delete r.object.__r3f,r.type!=="primitive"&&hYe(r.object)}for(const[r,n,i]of NG){r.props=n;const a=r.parent;if(a){var t,e;const o=T8[vZ(r.type)];r.object=(t=r.props.object)!=null?t:new o(...(e=r.props.args)!=null?e:[]),r.object.__r3f=r,qrr(i,r.object),OC(r.object,r.props),r.props.attach?kW(a,r):O2(r.object)&&O2(a.object)&&a.object.add(r.object);for(const s of r.children)s.props.attach?kW(r,s):O2(s.object)&&O2(r.object)&&r.object.add(s.object);xF(r)}}NG.length=0}const toe=()=>{},VPe={};let eq=uYe;const $rr=0,Wrr=4,PW=zrr({isPrimaryRenderer:!1,warnsIfNotActing:!1,supportsMutation:!0,supportsPersistence:!1,supportsHydration:!1,createInstance:jrr,removeChild:jpe,appendChild:eoe,appendInitialChild:eoe,insertBefore:jPe,appendChildToContainer(t,e){const r=t.getState().scene.__r3f;!e||!r||eoe(r,e)},removeChildFromContainer(t,e){const r=t.getState().scene.__r3f;!e||!r||jpe(r,e)},insertInContainerBefore(t,e,r){const n=t.getState().scene.__r3f;!e||!r||!n||jPe(n,e,r)},getRootHostContext:()=>VPe,getChildHostContext:()=>VPe,commitUpdate(t,e,r,n,i){var a,o,s;fYe(e,n);let d=!1;if((t.type==="primitive"&&r.object!==n.object||((a=n.args)==null?void 0:a.length)!==((o=r.args)==null?void 0:o.length)||(s=n.args)!=null&&s.some((L,B)=>{var V;return L!==((V=r.args)==null?void 0:V[B])}))&&(d=!0),d)NG.push([t,{...n},i]);else{const L=Irr(t,n);Object.keys(L).length&&(Object.assign(t.props,L),OC(t.object,L))}(i.sibling===null||(i.flags&Wrr)===$rr)&&Grr()},finalizeInitialChildren:()=>!1,commitMount(){},getPublicInstance:t=>t?.object,prepareForCommit:()=>null,preparePortalMount:t=>RW(t.getState().scene,t,"",{}),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance:Vrr,unhideInstance:dYe,createTextInstance:toe,hideTextInstance:toe,unhideTextInstance:toe,scheduleTimeout:typeof setTimeout=="function"?setTimeout:void 0,cancelTimeout:typeof clearTimeout=="function"?clearTimeout:void 0,noTimeout:-1,getInstanceFromNode:()=>null,beforeActiveInstanceBlur(){},afterActiveInstanceBlur(){},detachDeletedInstance(){},prepareScopeUpdate(){},getInstanceFromScope:()=>null,shouldAttemptEagerTransition:()=>!1,trackSchedulerEvent:()=>{},resolveEventType:()=>null,resolveEventTimeStamp:()=>-1.1,requestPostPaintCallback(){},maySuspendCommit:()=>!1,preloadInstance:()=>!0,startSuspendingCommit(){},suspendInstance(){},waitForCommitToBeReady:()=>null,NotPendingTransition:null,HostTransitionContext:ze.createContext(null),setCurrentUpdatePriority(t){eq=t},getCurrentUpdatePriority(){return eq},resolveUpdatePriority(){var t;if(eq!==uYe)return eq;switch(typeof window<"u"&&((t=window.event)==null?void 0:t.type)){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return OG.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return OG.ContinuousEventPriority;default:return OG.DefaultEventPriority}},resetFormInstance(){}}),BL=new Map,WO={objects:"shallow",strict:!1};function Yrr(t,e){if(!e&&typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement&&t.parentElement){const{width:r,height:n,top:i,left:a}=t.parentElement.getBoundingClientRect();return{width:r,height:n,top:i,left:a}}else if(!e&&typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas)return{width:t.width,height:t.height,top:0,left:0};return{width:0,height:0,top:0,left:0,...e}}function Xrr(t){const e=BL.get(t),r=e?.fiber,n=e?.store;e&&console.warn("R3F.createRoot should only be called once!");const i=typeof reportError=="function"?reportError:console.error,a=n||Nrr(Gpe,GPe),o=r||PW.createContainer(a,OG.ConcurrentRoot,null,!1,null,"",i,i,i,null);e||BL.set(t,{fiber:o,store:a});let s,d,b=!1,L=null;return{async configure(B={}){let V;L=new Promise(Vt=>V=Vt);let{gl:X,size:ie,scene:de,events:ae,onCreated:U,shadows:ve=!1,linear:Se=!1,flat:Pe=!1,legacy:Me=!1,orthographic:Ie=!1,frameloop:Ve="always",dpr:Ze=[1,2],performance:Je,raycaster:nt,camera:ut,onPointerMissed:ht}=B,_t=a.getState(),Dt=_t.gl;if(!_t.gl){const Vt={canvas:t,powerPreference:"high-performance",antialias:!0,alpha:!0},Er=typeof X=="function"?await X(Vt):X;UPe(Er)?Dt=Er:Dt=new Qye({...Vt,...X}),_t.set({gl:Dt})}let qt=_t.raycaster;qt||_t.set({raycaster:qt=new hZ});const{params:Lt,...dr}=nt||{};if(oy.equ(dr,qt,WO)||OC(qt,{...dr}),oy.equ(Lt,qt.params,WO)||OC(qt,{params:{...qt.params,...Lt}}),!_t.camera||_t.camera===d&&!oy.equ(d,ut,WO)){d=ut;const Vt=ut?.isCamera,Er=Vt?ut:Ie?new VC(0,0,0,0,.1,1e3):new sy(75,0,.1,1e3);Vt||(Er.position.z=5,ut&&(OC(Er,ut),Er.manual||("aspect"in ut||"left"in ut||"right"in ut||"bottom"in ut||"top"in ut)&&(Er.manual=!0,Er.updateProjectionMatrix())),!_t.camera&&!(ut!=null&&ut.rotation)&&Er.lookAt(0,0,0)),_t.set({camera:Er}),qt.camera=Er}if(!_t.scene){let Vt;de!=null&&de.isScene?(Vt=de,RW(Vt,a,"",{})):(Vt=new mF,RW(Vt,a,"",{}),de&&OC(Vt,de)),_t.set({scene:Vt})}ae&&!_t.events.handlers&&_t.set({events:ae(a)});const Zt=Yrr(t,ie);if(oy.equ(Zt,_t.size,WO)||_t.setSize(Zt.width,Zt.height,Zt.top,Zt.left),Ze&&_t.viewport.dpr!==iYe(Ze)&&_t.setDpr(Ze),_t.frameloop!==Ve&&_t.setFrameloop(Ve),_t.onPointerMissed||_t.set({onPointerMissed:ht}),Je&&!oy.equ(Je,_t.performance,WO)&&_t.set(Vt=>({performance:{...Vt.performance,...Je}})),!_t.xr){var Cr;const Vt=(or,Ar)=>{const Ir=a.getState();Ir.frameloop!=="never"&&GPe(or,!0,Ir,Ar)},Er=()=>{const or=a.getState();or.gl.xr.enabled=or.gl.xr.isPresenting,or.gl.xr.setAnimationLoop(or.gl.xr.isPresenting?Vt:null),or.gl.xr.isPresenting||Gpe(or)},sr={connect(){const or=a.getState().gl;or.xr.addEventListener("sessionstart",Er),or.xr.addEventListener("sessionend",Er)},disconnect(){const or=a.getState().gl;or.xr.removeEventListener("sessionstart",Er),or.xr.removeEventListener("sessionend",Er)}};typeof((Cr=Dt.xr)==null?void 0:Cr.addEventListener)=="function"&&sr.connect(),_t.set({xr:sr})}if(Dt.shadowMap){const Vt=Dt.shadowMap.enabled,Er=Dt.shadowMap.type;if(Dt.shadowMap.enabled=!!ve,oy.boo(ve))Dt.shadowMap.type=i9;else if(oy.str(ve)){var yt;const sr={basic:e$e,percentage:BX,soft:i9,variance:AC};Dt.shadowMap.type=(yt=sr[ve])!=null?yt:i9}else oy.obj(ve)&&Object.assign(Dt.shadowMap,ve);(Vt!==Dt.shadowMap.enabled||Er!==Dt.shadowMap.type)&&(Dt.shadowMap.needsUpdate=!0)}return xv.enabled=!Me,b||(Dt.outputColorSpace=Se?KC:H_,Dt.toneMapping=Pe?jC:UX),_t.legacy!==Me&&_t.set(()=>({legacy:Me})),_t.linear!==Se&&_t.set(()=>({linear:Se})),_t.flat!==Pe&&_t.set(()=>({flat:Pe})),X&&!oy.fun(X)&&!UPe(X)&&!oy.equ(X,Dt,WO)&&OC(Dt,X),s=U,b=!0,V(),this},render(B){return!b&&!L&&this.configure(),L.then(()=>{PW.updateContainer(Ke.jsx(Zrr,{store:a,children:B,onCreated:s,rootElement:t}),o,null,()=>{})}),a},unmount(){pYe(t)}}}function Zrr({store:t,children:e,onCreated:r,rootElement:n}){return _U(()=>{const i=t.getState();i.set(a=>({internal:{...a.internal,active:!0}})),r&&r(i),t.getState().events.connected||i.events.connect==null||i.events.connect(n)},[]),Ke.jsx(n1e.Provider,{value:t,children:e})}function pYe(t,e){const r=BL.get(t),n=r?.fiber;if(n){const i=r?.store.getState();i&&(i.internal.active=!1),PW.updateContainer(null,n,null,()=>{i&&setTimeout(()=>{try{var a,o,s,d;i.events.disconnect==null||i.events.disconnect(),(a=i.gl)==null||(o=a.renderLists)==null||o.dispose==null||o.dispose(),(s=i.gl)==null||s.forceContextLoss==null||s.forceContextLoss(),(d=i.gl)!=null&&d.xr&&i.xr.disconnect(),Mrr(i.scene),BL.delete(t)}catch{}},500)})}}function Krr(t,e,r){return Ke.jsx(Jrr,{children:t,container:e,state:r})}function Jrr({state:t={},children:e,container:r}){const{events:n,size:i,...a}=t,o=i1e(),[s]=ze.useState(()=>new hZ),[d]=ze.useState(()=>new sl),b=r1e((B,V)=>{let X;if(V.camera&&i){const ie=V.camera;X=B.viewport.getCurrentViewport(ie,new oi,i),ie!==B.camera&&oYe(ie,i)}return{...B,...V,scene:r,raycaster:s,pointer:d,mouse:d,previousRoot:o,events:{...B.events,...V.events,...n},size:{...B.size,...i},viewport:{...B.viewport,...X},setEvents:ie=>V.set(de=>({...de,events:{...de.events,...ie}}))}}),L=ze.useMemo(()=>{const B=XWe((X,ie)=>({...a,set:X,get:ie})),V=X=>B.setState(ie=>b.current(X,ie));return V(o.getState()),o.subscribe(V),B},[o,r]);return Ke.jsx(Ke.Fragment,{children:PW.createPortal(Ke.jsx(n1e.Provider,{value:L,children:e}),L,null)})}const Qrr=new Set,enr=new Set,tnr=new Set;function roe(t,e){if(t.size)for(const{callback:r}of t.values())r(e)}function h9(t,e){switch(t){case"before":return roe(Qrr,e);case"after":return roe(enr,e);case"tail":return roe(tnr,e)}}let noe,ioe;function Vpe(t,e,r){let n=e.clock.getDelta();e.frameloop==="never"&&typeof t=="number"&&(n=t-e.clock.elapsedTime,e.clock.oldTime=e.clock.elapsedTime,e.clock.elapsedTime=t),noe=e.internal.subscribers;for(let i=0;i<noe.length;i++)ioe=noe[i],ioe.ref.current(ioe.store.getState(),n,r);return!e.internal.priority&&e.gl.render&&e.gl.render(e.scene,e.camera),e.internal.frames=Math.max(0,e.internal.frames-1),e.frameloop==="always"?1:e.internal.frames}let DW=!1,qpe=!1,aoe,qPe,YO;function vYe(t){qPe=requestAnimationFrame(vYe),DW=!0,aoe=0,h9("before",t),qpe=!0;for(const r of BL.values()){var e;YO=r.store.getState(),YO.internal.active&&(YO.frameloop==="always"||YO.internal.frames>0)&&!((e=YO.gl.xr)!=null&&e.isPresenting)&&(aoe+=Vpe(t,YO))}if(qpe=!1,h9("after",t),aoe===0)return h9("tail",t),DW=!1,cancelAnimationFrame(qPe)}function Gpe(t,e=1){var r;if(!t)return BL.forEach(n=>Gpe(n.store.getState(),e));(r=t.gl.xr)!=null&&r.isPresenting||!t.internal.active||t.frameloop==="never"||(e>1?t.internal.frames=Math.min(60,t.internal.frames+e):qpe?t.internal.frames=2:t.internal.frames=1,DW||(DW=!0,requestAnimationFrame(vYe)))}function GPe(t,e=!0,r,n){if(e&&h9("before",t),r)Vpe(t,r,n);else for(const i of BL.values())Vpe(t,i.store.getState());e&&h9("after",t)}const ooe={onClick:["click",!1],onContextMenu:["contextmenu",!1],onDoubleClick:["dblclick",!1],onWheel:["wheel",!0],onPointerDown:["pointerdown",!0],onPointerUp:["pointerup",!0],onPointerLeave:["pointerleave",!0],onPointerMove:["pointermove",!0],onPointerCancel:["pointercancel",!0],onLostPointerCapture:["lostpointercapture",!0]};function rnr(t){const{handlePointer:e}=Orr(t);return{priority:1,enabled:!0,compute(r,n,i){n.pointer.set(r.offsetX/n.size.width*2-1,-(r.offsetY/n.size.height)*2+1),n.raycaster.setFromCamera(n.pointer,n.camera)},connected:void 0,handlers:Object.keys(ooe).reduce((r,n)=>({...r,[n]:e(n)}),{}),update:()=>{var r;const{events:n,internal:i}=t.getState();(r=i.lastEvent)!=null&&r.current&&n.handlers&&n.handlers.onPointerMove(i.lastEvent.current)},connect:r=>{const{set:n,events:i}=t.getState();if(i.disconnect==null||i.disconnect(),n(a=>({events:{...a.events,connected:r}})),i.handlers)for(const a in i.handlers){const o=i.handlers[a],[s,d]=ooe[a];r.addEventListener(s,o,{passive:d})}},disconnect:()=>{const{set:r,events:n}=t.getState();if(n.connected){if(n.handlers)for(const i in n.handlers){const a=n.handlers[i],[o]=ooe[i];n.connected.removeEventListener(o,a)}r(i=>({events:{...i.events,connected:void 0}}))}}}}function $Pe(t,e){let r;return(...n)=>{window.clearTimeout(r),r=window.setTimeout(()=>t(...n),e)}}function nnr({debounce:t,scroll:e,polyfill:r,offsetSize:n}={debounce:0,scroll:!1,offsetSize:!1}){const i=r||(typeof window>"u"?class{}:window.ResizeObserver);if(!i)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[a,o]=ze.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),s=ze.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a,orientationHandler:null}),d=t?typeof t=="number"?t:t.scroll:null,b=t?typeof t=="number"?t:t.resize:null,L=ze.useRef(!1);ze.useEffect(()=>(L.current=!0,()=>void(L.current=!1)));const[B,V,X]=ze.useMemo(()=>{const U=()=>{if(!s.current.element)return;const{left:ve,top:Se,width:Pe,height:Me,bottom:Ie,right:Ve,x:Ze,y:Je}=s.current.element.getBoundingClientRect(),nt={left:ve,top:Se,width:Pe,height:Me,bottom:Ie,right:Ve,x:Ze,y:Je};s.current.element instanceof HTMLElement&&n&&(nt.height=s.current.element.offsetHeight,nt.width=s.current.element.offsetWidth),Object.freeze(nt),L.current&&!snr(s.current.lastBounds,nt)&&o(s.current.lastBounds=nt)};return[U,b?$Pe(U,b):U,d?$Pe(U,d):U]},[o,n,d,b]);function ie(){s.current.scrollContainers&&(s.current.scrollContainers.forEach(U=>U.removeEventListener("scroll",X,!0)),s.current.scrollContainers=null),s.current.resizeObserver&&(s.current.resizeObserver.disconnect(),s.current.resizeObserver=null),s.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",s.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",s.current.orientationHandler))}function de(){s.current.element&&(s.current.resizeObserver=new i(X),s.current.resizeObserver.observe(s.current.element),e&&s.current.scrollContainers&&s.current.scrollContainers.forEach(U=>U.addEventListener("scroll",X,{capture:!0,passive:!0})),s.current.orientationHandler=()=>{X()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",s.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",s.current.orientationHandler))}const ae=U=>{!U||U===s.current.element||(ie(),s.current.element=U,s.current.scrollContainers=mYe(U),de())};return anr(X,!!e),inr(V),ze.useEffect(()=>{ie(),de()},[e,X,V]),ze.useEffect(()=>ie,[]),[ae,a,B]}function inr(t){ze.useEffect(()=>{const e=t;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[t])}function anr(t,e){ze.useEffect(()=>{if(e){const r=t;return window.addEventListener("scroll",r,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",r,!0)}},[t,e])}function mYe(t){const e=[];if(!t||t===document.body)return e;const{overflow:r,overflowX:n,overflowY:i}=window.getComputedStyle(t);return[r,n,i].some(a=>a==="auto"||a==="scroll")&&e.push(t),[...e,...mYe(t.parentElement)]}const onr=["x","y","top","bottom","left","right","width","height"],snr=(t,e)=>onr.every(r=>t[r]===e[r]);function lnr({ref:t,children:e,fallback:r,resize:n,style:i,gl:a,events:o=rnr,eventSource:s,eventPrefix:d,shadows:b,linear:L,flat:B,legacy:V,orthographic:X,frameloop:ie,dpr:de,performance:ae,raycaster:U,camera:ve,scene:Se,onPointerMissed:Pe,onCreated:Me,...Ie}){ze.useMemo(()=>cYe(nrr),[]);const Ve=Trr(),[Ze,Je]=nnr({scroll:!0,debounce:{scroll:50,resize:0},...n}),nt=ze.useRef(null),ut=ze.useRef(null);ze.useImperativeHandle(t,()=>nt.current);const ht=r1e(Pe),[_t,Dt]=ze.useState(!1),[qt,Lt]=ze.useState(!1);if(_t)throw _t;if(qt)throw qt;const dr=ze.useRef(null);_U(()=>{const Cr=nt.current;if(Je.width>0&&Je.height>0&&Cr){dr.current||(dr.current=Xrr(Cr));async function yt(){await dr.current.configure({gl:a,scene:Se,events:o,shadows:b,linear:L,flat:B,legacy:V,orthographic:X,frameloop:ie,dpr:de,performance:ae,raycaster:U,camera:ve,size:Je,onPointerMissed:(...Vt)=>ht.current==null?void 0:ht.current(...Vt),onCreated:Vt=>{Vt.events.connect==null||Vt.events.connect(s?wrr(s)?s.current:s:ut.current),d&&Vt.setEvents({compute:(Er,sr)=>{const or=Er[d+"X"],Ar=Er[d+"Y"];sr.pointer.set(or/sr.size.width*2-1,-(Ar/sr.size.height)*2+1),sr.raycaster.setFromCamera(sr.pointer,sr.camera)}}),Me?.(Vt)}}),dr.current.render(Ke.jsx(Ve,{children:Ke.jsx(Arr,{set:Lt,children:Ke.jsx(ze.Suspense,{fallback:Ke.jsx(Err,{set:Dt}),children:e??null})})}))}yt()}}),ze.useEffect(()=>{const Cr=nt.current;if(Cr)return()=>pYe(Cr)},[]);const Zt=s?"none":"auto";return Ke.jsx("div",{ref:ut,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:Zt,...i},...Ie,children:Ke.jsx("div",{ref:Ze,style:{width:"100%",height:"100%"},children:Ke.jsx("canvas",{ref:nt,style:{display:"block"},children:r})})})}function unr(t){return Ke.jsx(eYe,{children:Ke.jsx(lnr,{...t})})}const mZ=parseInt(dF.replace(/\D+/g,"")),gYe=mZ>=125?"uv1":"uv2";var U3=Uint8Array,NP=Uint16Array,$pe=Uint32Array,yYe=new U3([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),bYe=new U3([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),cnr=new U3([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),xYe=function(t,e){for(var r=new NP(31),n=0;n<31;++n)r[n]=e+=1<<t[n-1];for(var i=new $pe(r[30]),n=1;n<30;++n)for(var a=r[n];a<r[n+1];++a)i[a]=a-r[n]<<5|n;return[r,i]},_Ye=xYe(yYe,2),wYe=_Ye[0],fnr=_Ye[1];wYe[28]=258,fnr[258]=28;var dnr=xYe(bYe,0),hnr=dnr[0],Wpe=new NP(32768);for(var L0=0;L0<32768;++L0){var pP=(L0&43690)>>>1|(L0&21845)<<1;pP=(pP&52428)>>>2|(pP&13107)<<2,pP=(pP&61680)>>>4|(pP&3855)<<4,Wpe[L0]=((pP&65280)>>>8|(pP&255)<<8)>>>1}var p9=(function(t,e,r){for(var n=t.length,i=0,a=new NP(e);i<n;++i)++a[t[i]-1];var o=new NP(e);for(i=0;i<e;++i)o[i]=o[i-1]+a[i-1]<<1;var s;if(r){s=new NP(1<<e);var d=15-e;for(i=0;i<n;++i)if(t[i])for(var b=i<<4|t[i],L=e-t[i],B=o[t[i]-1]++<<L,V=B|(1<<L)-1;B<=V;++B)s[Wpe[B]>>>d]=b}else for(s=new NP(n),i=0;i<n;++i)t[i]&&(s[i]=Wpe[o[t[i]-1]++]>>>15-t[i]);return s}),wU=new U3(288);for(var L0=0;L0<144;++L0)wU[L0]=8;for(var L0=144;L0<256;++L0)wU[L0]=9;for(var L0=256;L0<280;++L0)wU[L0]=7;for(var L0=280;L0<288;++L0)wU[L0]=8;var SYe=new U3(32);for(var L0=0;L0<32;++L0)SYe[L0]=5;var pnr=p9(wU,9,1),vnr=p9(SYe,5,1),soe=function(t){for(var e=t[0],r=1;r<t.length;++r)t[r]>e&&(e=t[r]);return e},_C=function(t,e,r){var n=e/8|0;return(t[n]|t[n+1]<<8)>>(e&7)&r},loe=function(t,e){var r=e/8|0;return(t[r]|t[r+1]<<8|t[r+2]<<16)>>(e&7)},mnr=function(t){return(t/8|0)+(t&7&&1)},gnr=function(t,e,r){(r==null||r>t.length)&&(r=t.length);var n=new(t instanceof NP?NP:t instanceof $pe?$pe:U3)(r-e);return n.set(t.subarray(e,r)),n},ynr=function(t,e,r){var n=t.length;if(!n||r&&!r.l&&n<5)return e||new U3(0);var i=!e||r,a=!r||r.i;r||(r={}),e||(e=new U3(n*3));var o=function(Ir){var _n=e.length;if(Ir>_n){var Un=new U3(Math.max(_n*2,Ir));Un.set(e),e=Un}},s=r.f||0,d=r.p||0,b=r.b||0,L=r.l,B=r.d,V=r.m,X=r.n,ie=n*8;do{if(!L){r.f=s=_C(t,d,1);var de=_C(t,d+1,3);if(d+=3,de)if(de==1)L=pnr,B=vnr,V=9,X=5;else if(de==2){var Se=_C(t,d,31)+257,Pe=_C(t,d+10,15)+4,Me=Se+_C(t,d+5,31)+1;d+=14;for(var Ie=new U3(Me),Ve=new U3(19),Ze=0;Ze<Pe;++Ze)Ve[cnr[Ze]]=_C(t,d+Ze*3,7);d+=Pe*3;for(var Je=soe(Ve),nt=(1<<Je)-1,ut=p9(Ve,Je,1),Ze=0;Ze<Me;){var ht=ut[_C(t,d,nt)];d+=ht&15;var ae=ht>>>4;if(ae<16)Ie[Ze++]=ae;else{var _t=0,Dt=0;for(ae==16?(Dt=3+_C(t,d,3),d+=2,_t=Ie[Ze-1]):ae==17?(Dt=3+_C(t,d,7),d+=3):ae==18&&(Dt=11+_C(t,d,127),d+=7);Dt--;)Ie[Ze++]=_t}}var qt=Ie.subarray(0,Se),Lt=Ie.subarray(Se);V=soe(qt),X=soe(Lt),L=p9(qt,V,1),B=p9(Lt,X,1)}else throw"invalid block type";else{var ae=mnr(d)+4,U=t[ae-4]|t[ae-3]<<8,ve=ae+U;if(ve>n){if(a)throw"unexpected EOF";break}i&&o(b+U),e.set(t.subarray(ae,ve),b),r.b=b+=U,r.p=d=ve*8;continue}if(d>ie){if(a)throw"unexpected EOF";break}}i&&o(b+131072);for(var dr=(1<<V)-1,Zt=(1<<X)-1,Cr=d;;Cr=d){var _t=L[loe(t,d)&dr],yt=_t>>>4;if(d+=_t&15,d>ie){if(a)throw"unexpected EOF";break}if(!_t)throw"invalid length/literal";if(yt<256)e[b++]=yt;else if(yt==256){Cr=d,L=null;break}else{var Vt=yt-254;if(yt>264){var Ze=yt-257,Er=yYe[Ze];Vt=_C(t,d,(1<<Er)-1)+wYe[Ze],d+=Er}var sr=B[loe(t,d)&Zt],or=sr>>>4;if(!sr)throw"invalid distance";d+=sr&15;var Lt=hnr[or];if(or>3){var Er=bYe[or];Lt+=loe(t,d)&(1<<Er)-1,d+=Er}if(d>ie){if(a)throw"unexpected EOF";break}i&&o(b+131072);for(var Ar=b+Vt;b<Ar;b+=4)e[b]=e[b-Lt],e[b+1]=e[b+1-Lt],e[b+2]=e[b+2-Lt],e[b+3]=e[b+3-Lt];b=Ar}}r.l=L,r.p=Cr,r.b=b,L&&(s=1,r.m=V,r.d=B,r.n=X)}while(!s);return b==e.length?e:gnr(e,0,b)},bnr=new U3(0),xnr=function(t){if((t[0]&15)!=8||t[0]>>>4>7||(t[0]<<8|t[1])%31)throw"invalid zlib data";if(t[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function tq(t,e){return ynr((xnr(t),t.subarray(2,-4)),e)}var _nr=typeof TextDecoder<"u"&&new TextDecoder,wnr=0;try{_nr.decode(bnr,{stream:!0}),wnr=1}catch{}const Snr=t=>t&&t.isCubeTexture;class Tnr extends hc{constructor(e,r){var n,i;const a=Snr(e),s=((i=a?(n=e.image[0])==null?void 0:n.width:e.image.width)!=null?i:1024)/4,d=Math.floor(Math.log2(s)),b=Math.pow(2,d),L=3*Math.max(b,112),B=4*b,V=[a?"#define ENVMAP_TYPE_CUBE":"",`#define CUBEUV_TEXEL_WIDTH ${1/L}`,`#define CUBEUV_TEXEL_HEIGHT ${1/B}`,`#define CUBEUV_MAX_MIP ${d}.0`],X=`
        varying vec3 vWorldPosition;
        void main() 
        {
            vec4 worldPosition = ( modelMatrix * vec4( position, 1.0 ) );
            vWorldPosition = worldPosition.xyz;
            
            gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
        }
        `,ie=V.join(`
`)+`
        #define ENVMAP_TYPE_CUBE_UV
        varying vec3 vWorldPosition;
        uniform float radius;
        uniform float height;
        uniform float angle;
        #ifdef ENVMAP_TYPE_CUBE
            uniform samplerCube map;
        #else
            uniform sampler2D map;
        #endif
        // From: https://www.shadertoy.com/view/4tsBD7
        float diskIntersectWithBackFaceCulling( vec3 ro, vec3 rd, vec3 c, vec3 n, float r ) 
        {
            float d = dot ( rd, n );
            
            if( d > 0.0 ) { return 1e6; }
            
            vec3  o = ro - c;
            float t = - dot( n, o ) / d;
            vec3  q = o + rd * t;
            
            return ( dot( q, q ) < r * r ) ? t : 1e6;
        }
        // From: https://www.iquilezles.org/www/articles/intersectors/intersectors.htm
        float sphereIntersect( vec3 ro, vec3 rd, vec3 ce, float ra ) 
        {
            vec3 oc = ro - ce;
            float b = dot( oc, rd );
            float c = dot( oc, oc ) - ra * ra;
            float h = b * b - c;
            
            if( h < 0.0 ) { return -1.0; }
            
            h = sqrt( h );
            
            return - b + h;
        }
        vec3 project() 
        {
            vec3 p = normalize( vWorldPosition );
            vec3 camPos = cameraPosition;
            camPos.y -= height;
            float intersection = sphereIntersect( camPos, p, vec3( 0.0 ), radius );
            if( intersection > 0.0 ) {
                
                vec3 h = vec3( 0.0, - height, 0.0 );
                float intersection2 = diskIntersectWithBackFaceCulling( camPos, p, h, vec3( 0.0, 1.0, 0.0 ), radius );
                p = ( camPos + min( intersection, intersection2 ) * p ) / radius;
            } else {
                p = vec3( 0.0, 1.0, 0.0 );
            }
            return p;
        }
        #include <common>
        #include <cube_uv_reflection_fragment>
        void main() 
        {
            vec3 projectedWorldPosition = project();
            
            #ifdef ENVMAP_TYPE_CUBE
                vec3 outcolor = textureCube( map, projectedWorldPosition ).rgb;
            #else
                vec3 direction = normalize( projectedWorldPosition );
                vec2 uv = equirectUv( direction );
                vec3 outcolor = texture2D( map, uv ).rgb;
            #endif
            gl_FragColor = vec4( outcolor, 1.0 );
            #include <tonemapping_fragment>
            #include <${mZ>=154?"colorspace_fragment":"encodings_fragment"}>
        }
        `,de={map:{value:e},height:{value:r?.height||15},radius:{value:r?.radius||100}},ae=new yU(1,16),U=new eb({uniforms:de,fragmentShader:ie,vertexShader:X,side:Zx});super(ae,U)}set radius(e){this.material.uniforms.radius.value=e}get radius(){return this.material.uniforms.radius.value}set height(e){this.material.uniforms.height.value=e}get height(){return this.material.uniforms.height.value}}var Enr=Object.defineProperty,Anr=(t,e,r)=>e in t?Enr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Cnr=(t,e,r)=>(Anr(t,e+"",r),r);class Mnr{constructor(){Cnr(this,"_listeners")}addEventListener(e,r){this._listeners===void 0&&(this._listeners={});const n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(r)===-1&&n[e].push(r)}hasEventListener(e,r){if(this._listeners===void 0)return!1;const n=this._listeners;return n[e]!==void 0&&n[e].indexOf(r)!==-1}removeEventListener(e,r){if(this._listeners===void 0)return;const i=this._listeners[e];if(i!==void 0){const a=i.indexOf(r);a!==-1&&i.splice(a,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const n=this._listeners[e.type];if(n!==void 0){e.target=this;const i=n.slice(0);for(let a=0,o=i.length;a<o;a++)i[a].call(this,e);e.target=null}}}var Rnr=Object.defineProperty,knr=(t,e,r)=>e in t?Rnr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ml=(t,e,r)=>(knr(t,typeof e!="symbol"?e+"":e,r),r);let Inr=class extends Hp{constructor(e,r){super(),ml(this,"isTransformControls",!0),ml(this,"visible",!1),ml(this,"domElement"),ml(this,"raycaster",new hZ),ml(this,"gizmo"),ml(this,"plane"),ml(this,"tempVector",new oi),ml(this,"tempVector2",new oi),ml(this,"tempQuaternion",new fh),ml(this,"unit",{X:new oi(1,0,0),Y:new oi(0,1,0),Z:new oi(0,0,1)}),ml(this,"pointStart",new oi),ml(this,"pointEnd",new oi),ml(this,"offset",new oi),ml(this,"rotationAxis",new oi),ml(this,"startNorm",new oi),ml(this,"endNorm",new oi),ml(this,"rotationAngle",0),ml(this,"cameraPosition",new oi),ml(this,"cameraQuaternion",new fh),ml(this,"cameraScale",new oi),ml(this,"parentPosition",new oi),ml(this,"parentQuaternion",new fh),ml(this,"parentQuaternionInv",new fh),ml(this,"parentScale",new oi),ml(this,"worldPositionStart",new oi),ml(this,"worldQuaternionStart",new fh),ml(this,"worldScaleStart",new oi),ml(this,"worldPosition",new oi),ml(this,"worldQuaternion",new fh),ml(this,"worldQuaternionInv",new fh),ml(this,"worldScale",new oi),ml(this,"eye",new oi),ml(this,"positionStart",new oi),ml(this,"quaternionStart",new fh),ml(this,"scaleStart",new oi),ml(this,"camera"),ml(this,"object"),ml(this,"enabled",!0),ml(this,"axis",null),ml(this,"mode","translate"),ml(this,"translationSnap",null),ml(this,"rotationSnap",null),ml(this,"scaleSnap",null),ml(this,"space","world"),ml(this,"size",1),ml(this,"dragging",!1),ml(this,"showX",!0),ml(this,"showY",!0),ml(this,"showZ",!0),ml(this,"changeEvent",{type:"change"}),ml(this,"mouseDownEvent",{type:"mouseDown",mode:this.mode}),ml(this,"mouseUpEvent",{type:"mouseUp",mode:this.mode}),ml(this,"objectChangeEvent",{type:"objectChange"}),ml(this,"intersectObjectWithRay",(i,a,o)=>{const s=a.intersectObject(i,!0);for(let d=0;d<s.length;d++)if(s[d].object.visible||o)return s[d];return!1}),ml(this,"attach",i=>(this.object=i,this.visible=!0,this)),ml(this,"detach",()=>(this.object=void 0,this.visible=!1,this.axis=null,this)),ml(this,"reset",()=>this.enabled?(this.dragging&&this.object!==void 0&&(this.object.position.copy(this.positionStart),this.object.quaternion.copy(this.quaternionStart),this.object.scale.copy(this.scaleStart),this.dispatchEvent(this.changeEvent),this.dispatchEvent(this.objectChangeEvent),this.pointStart.copy(this.pointEnd)),this):this),ml(this,"updateMatrixWorld",()=>{this.object!==void 0&&(this.object.updateMatrixWorld(),this.object.parent===null?console.error("TransformControls: The attached 3D object must be a part of the scene graph."):this.object.parent.matrixWorld.decompose(this.parentPosition,this.parentQuaternion,this.parentScale),this.object.matrixWorld.decompose(this.worldPosition,this.worldQuaternion,this.worldScale),this.parentQuaternionInv.copy(this.parentQuaternion).invert(),this.worldQuaternionInv.copy(this.worldQuaternion).invert()),this.camera.updateMatrixWorld(),this.camera.matrixWorld.decompose(this.cameraPosition,this.cameraQuaternion,this.cameraScale),this.eye.copy(this.cameraPosition).sub(this.worldPosition).normalize(),super.updateMatrixWorld()}),ml(this,"pointerHover",i=>{if(this.object===void 0||this.dragging===!0)return;this.raycaster.setFromCamera(i,this.camera);const a=this.intersectObjectWithRay(this.gizmo.picker[this.mode],this.raycaster);a?this.axis=a.object.name:this.axis=null}),ml(this,"pointerDown",i=>{if(!(this.object===void 0||this.dragging===!0||i.button!==0)&&this.axis!==null){this.raycaster.setFromCamera(i,this.camera);const a=this.intersectObjectWithRay(this.plane,this.raycaster,!0);if(a){let o=this.space;if(this.mode==="scale"?o="local":(this.axis==="E"||this.axis==="XYZE"||this.axis==="XYZ")&&(o="world"),o==="local"&&this.mode==="rotate"){const s=this.rotationSnap;this.axis==="X"&&s&&(this.object.rotation.x=Math.round(this.object.rotation.x/s)*s),this.axis==="Y"&&s&&(this.object.rotation.y=Math.round(this.object.rotation.y/s)*s),this.axis==="Z"&&s&&(this.object.rotation.z=Math.round(this.object.rotation.z/s)*s)}this.object.updateMatrixWorld(),this.object.parent&&this.object.parent.updateMatrixWorld(),this.positionStart.copy(this.object.position),this.quaternionStart.copy(this.object.quaternion),this.scaleStart.copy(this.object.scale),this.object.matrixWorld.decompose(this.worldPositionStart,this.worldQuaternionStart,this.worldScaleStart),this.pointStart.copy(a.point).sub(this.worldPositionStart)}this.dragging=!0,this.mouseDownEvent.mode=this.mode,this.dispatchEvent(this.mouseDownEvent)}}),ml(this,"pointerMove",i=>{const a=this.axis,o=this.mode,s=this.object;let d=this.space;if(o==="scale"?d="local":(a==="E"||a==="XYZE"||a==="XYZ")&&(d="world"),s===void 0||a===null||this.dragging===!1||i.button!==-1)return;this.raycaster.setFromCamera(i,this.camera);const b=this.intersectObjectWithRay(this.plane,this.raycaster,!0);if(b){if(this.pointEnd.copy(b.point).sub(this.worldPositionStart),o==="translate")this.offset.copy(this.pointEnd).sub(this.pointStart),d==="local"&&a!=="XYZ"&&this.offset.applyQuaternion(this.worldQuaternionInv),a.indexOf("X")===-1&&(this.offset.x=0),a.indexOf("Y")===-1&&(this.offset.y=0),a.indexOf("Z")===-1&&(this.offset.z=0),d==="local"&&a!=="XYZ"?this.offset.applyQuaternion(this.quaternionStart).divide(this.parentScale):this.offset.applyQuaternion(this.parentQuaternionInv).divide(this.parentScale),s.position.copy(this.offset).add(this.positionStart),this.translationSnap&&(d==="local"&&(s.position.applyQuaternion(this.tempQuaternion.copy(this.quaternionStart).invert()),a.search("X")!==-1&&(s.position.x=Math.round(s.position.x/this.translationSnap)*this.translationSnap),a.search("Y")!==-1&&(s.position.y=Math.round(s.position.y/this.translationSnap)*this.translationSnap),a.search("Z")!==-1&&(s.position.z=Math.round(s.position.z/this.translationSnap)*this.translationSnap),s.position.applyQuaternion(this.quaternionStart)),d==="world"&&(s.parent&&s.position.add(this.tempVector.setFromMatrixPosition(s.parent.matrixWorld)),a.search("X")!==-1&&(s.position.x=Math.round(s.position.x/this.translationSnap)*this.translationSnap),a.search("Y")!==-1&&(s.position.y=Math.round(s.position.y/this.translationSnap)*this.translationSnap),a.search("Z")!==-1&&(s.position.z=Math.round(s.position.z/this.translationSnap)*this.translationSnap),s.parent&&s.position.sub(this.tempVector.setFromMatrixPosition(s.parent.matrixWorld))));else if(o==="scale"){if(a.search("XYZ")!==-1){let L=this.pointEnd.length()/this.pointStart.length();this.pointEnd.dot(this.pointStart)<0&&(L*=-1),this.tempVector2.set(L,L,L)}else this.tempVector.copy(this.pointStart),this.tempVector2.copy(this.pointEnd),this.tempVector.applyQuaternion(this.worldQuaternionInv),this.tempVector2.applyQuaternion(this.worldQuaternionInv),this.tempVector2.divide(this.tempVector),a.search("X")===-1&&(this.tempVector2.x=1),a.search("Y")===-1&&(this.tempVector2.y=1),a.search("Z")===-1&&(this.tempVector2.z=1);s.scale.copy(this.scaleStart).multiply(this.tempVector2),this.scaleSnap&&this.object&&(a.search("X")!==-1&&(this.object.scale.x=Math.round(s.scale.x/this.scaleSnap)*this.scaleSnap||this.scaleSnap),a.search("Y")!==-1&&(s.scale.y=Math.round(s.scale.y/this.scaleSnap)*this.scaleSnap||this.scaleSnap),a.search("Z")!==-1&&(s.scale.z=Math.round(s.scale.z/this.scaleSnap)*this.scaleSnap||this.scaleSnap))}else if(o==="rotate"){this.offset.copy(this.pointEnd).sub(this.pointStart);const L=20/this.worldPosition.distanceTo(this.tempVector.setFromMatrixPosition(this.camera.matrixWorld));a==="E"?(this.rotationAxis.copy(this.eye),this.rotationAngle=this.pointEnd.angleTo(this.pointStart),this.startNorm.copy(this.pointStart).normalize(),this.endNorm.copy(this.pointEnd).normalize(),this.rotationAngle*=this.endNorm.cross(this.startNorm).dot(this.eye)<0?1:-1):a==="XYZE"?(this.rotationAxis.copy(this.offset).cross(this.eye).normalize(),this.rotationAngle=this.offset.dot(this.tempVector.copy(this.rotationAxis).cross(this.eye))*L):(a==="X"||a==="Y"||a==="Z")&&(this.rotationAxis.copy(this.unit[a]),this.tempVector.copy(this.unit[a]),d==="local"&&this.tempVector.applyQuaternion(this.worldQuaternion),this.rotationAngle=this.offset.dot(this.tempVector.cross(this.eye).normalize())*L),this.rotationSnap&&(this.rotationAngle=Math.round(this.rotationAngle/this.rotationSnap)*this.rotationSnap),d==="local"&&a!=="E"&&a!=="XYZE"?(s.quaternion.copy(this.quaternionStart),s.quaternion.multiply(this.tempQuaternion.setFromAxisAngle(this.rotationAxis,this.rotationAngle)).normalize()):(this.rotationAxis.applyQuaternion(this.parentQuaternionInv),s.quaternion.copy(this.tempQuaternion.setFromAxisAngle(this.rotationAxis,this.rotationAngle)),s.quaternion.multiply(this.quaternionStart).normalize())}this.dispatchEvent(this.changeEvent),this.dispatchEvent(this.objectChangeEvent)}}),ml(this,"pointerUp",i=>{i.button===0&&(this.dragging&&this.axis!==null&&(this.mouseUpEvent.mode=this.mode,this.dispatchEvent(this.mouseUpEvent)),this.dragging=!1,this.axis=null)}),ml(this,"getPointer",i=>{var a;if(this.domElement&&((a=this.domElement.ownerDocument)!=null&&a.pointerLockElement))return{x:0,y:0,button:i.button};{const o=i.changedTouches?i.changedTouches[0]:i,s=this.domElement.getBoundingClientRect();return{x:(o.clientX-s.left)/s.width*2-1,y:-(o.clientY-s.top)/s.height*2+1,button:i.button}}}),ml(this,"onPointerHover",i=>{if(this.enabled)switch(i.pointerType){case"mouse":case"pen":this.pointerHover(this.getPointer(i));break}}),ml(this,"onPointerDown",i=>{!this.enabled||!this.domElement||(this.domElement.style.touchAction="none",this.domElement.ownerDocument.addEventListener("pointermove",this.onPointerMove),this.pointerHover(this.getPointer(i)),this.pointerDown(this.getPointer(i)))}),ml(this,"onPointerMove",i=>{this.enabled&&this.pointerMove(this.getPointer(i))}),ml(this,"onPointerUp",i=>{!this.enabled||!this.domElement||(this.domElement.style.touchAction="",this.domElement.ownerDocument.removeEventListener("pointermove",this.onPointerMove),this.pointerUp(this.getPointer(i)))}),ml(this,"getMode",()=>this.mode),ml(this,"setMode",i=>{this.mode=i}),ml(this,"setTranslationSnap",i=>{this.translationSnap=i}),ml(this,"setRotationSnap",i=>{this.rotationSnap=i}),ml(this,"setScaleSnap",i=>{this.scaleSnap=i}),ml(this,"setSize",i=>{this.size=i}),ml(this,"setSpace",i=>{this.space=i}),ml(this,"update",()=>{console.warn("THREE.TransformControls: update function has no more functionality and therefore has been deprecated.")}),ml(this,"connect",i=>{i===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),this.domElement=i,this.domElement.addEventListener("pointerdown",this.onPointerDown),this.domElement.addEventListener("pointermove",this.onPointerHover),this.domElement.ownerDocument.addEventListener("pointerup",this.onPointerUp)}),ml(this,"dispose",()=>{var i,a,o,s,d,b;(i=this.domElement)==null||i.removeEventListener("pointerdown",this.onPointerDown),(a=this.domElement)==null||a.removeEventListener("pointermove",this.onPointerHover),(s=(o=this.domElement)==null?void 0:o.ownerDocument)==null||s.removeEventListener("pointermove",this.onPointerMove),(b=(d=this.domElement)==null?void 0:d.ownerDocument)==null||b.removeEventListener("pointerup",this.onPointerUp),this.traverse(L=>{const B=L;B.geometry&&B.geometry.dispose(),B.material&&B.material.dispose()})}),this.domElement=r,this.camera=e,this.gizmo=new Pnr,this.add(this.gizmo),this.plane=new Dnr,this.add(this.plane);const n=(i,a)=>{let o=a;Object.defineProperty(this,i,{get:function(){return o!==void 0?o:a},set:function(s){o!==s&&(o=s,this.plane[i]=s,this.gizmo[i]=s,this.dispatchEvent({type:i+"-changed",value:s}),this.dispatchEvent(this.changeEvent))}}),this[i]=a,this.plane[i]=a,this.gizmo[i]=a};n("camera",this.camera),n("object",this.object),n("enabled",this.enabled),n("axis",this.axis),n("mode",this.mode),n("translationSnap",this.translationSnap),n("rotationSnap",this.rotationSnap),n("scaleSnap",this.scaleSnap),n("space",this.space),n("size",this.size),n("dragging",this.dragging),n("showX",this.showX),n("showY",this.showY),n("showZ",this.showZ),n("worldPosition",this.worldPosition),n("worldPositionStart",this.worldPositionStart),n("worldQuaternion",this.worldQuaternion),n("worldQuaternionStart",this.worldQuaternionStart),n("cameraPosition",this.cameraPosition),n("cameraQuaternion",this.cameraQuaternion),n("pointStart",this.pointStart),n("pointEnd",this.pointEnd),n("rotationAxis",this.rotationAxis),n("rotationAngle",this.rotationAngle),n("eye",this.eye),r!==void 0&&this.connect(r)}};class Pnr extends Hp{constructor(){super(),ml(this,"isTransformControlsGizmo",!0),ml(this,"type","TransformControlsGizmo"),ml(this,"tempVector",new oi(0,0,0)),ml(this,"tempEuler",new $2),ml(this,"alignVector",new oi(0,1,0)),ml(this,"zeroVector",new oi(0,0,0)),ml(this,"lookAtMatrix",new Rc),ml(this,"tempQuaternion",new fh),ml(this,"tempQuaternion2",new fh),ml(this,"identityQuaternion",new fh),ml(this,"unitX",new oi(1,0,0)),ml(this,"unitY",new oi(0,1,0)),ml(this,"unitZ",new oi(0,0,1)),ml(this,"gizmo"),ml(this,"picker"),ml(this,"helper"),ml(this,"rotationAxis",new oi),ml(this,"cameraPosition",new oi),ml(this,"worldPositionStart",new oi),ml(this,"worldQuaternionStart",new fh),ml(this,"worldPosition",new oi),ml(this,"worldQuaternion",new fh),ml(this,"eye",new oi),ml(this,"camera",null),ml(this,"enabled",!0),ml(this,"axis",null),ml(this,"mode","translate"),ml(this,"space","world"),ml(this,"size",1),ml(this,"dragging",!1),ml(this,"showX",!0),ml(this,"showY",!0),ml(this,"showZ",!0),ml(this,"updateMatrixWorld",()=>{let yt=this.space;this.mode==="scale"&&(yt="local");const Vt=yt==="local"?this.worldQuaternion:this.identityQuaternion;this.gizmo.translate.visible=this.mode==="translate",this.gizmo.rotate.visible=this.mode==="rotate",this.gizmo.scale.visible=this.mode==="scale",this.helper.translate.visible=this.mode==="translate",this.helper.rotate.visible=this.mode==="rotate",this.helper.scale.visible=this.mode==="scale";let Er=[];Er=Er.concat(this.picker[this.mode].children),Er=Er.concat(this.gizmo[this.mode].children),Er=Er.concat(this.helper[this.mode].children);for(let sr=0;sr<Er.length;sr++){const or=Er[sr];or.visible=!0,or.rotation.set(0,0,0),or.position.copy(this.worldPosition);let Ar;if(this.camera.isOrthographicCamera?Ar=(this.camera.top-this.camera.bottom)/this.camera.zoom:Ar=this.worldPosition.distanceTo(this.cameraPosition)*Math.min(1.9*Math.tan(Math.PI*this.camera.fov/360)/this.camera.zoom,7),or.scale.set(1,1,1).multiplyScalar(Ar*this.size/7),or.tag==="helper"){or.visible=!1,or.name==="AXIS"?(or.position.copy(this.worldPositionStart),or.visible=!!this.axis,this.axis==="X"&&(this.tempQuaternion.setFromEuler(this.tempEuler.set(0,0,0)),or.quaternion.copy(Vt).multiply(this.tempQuaternion),Math.abs(this.alignVector.copy(this.unitX).applyQuaternion(Vt).dot(this.eye))>.9&&(or.visible=!1)),this.axis==="Y"&&(this.tempQuaternion.setFromEuler(this.tempEuler.set(0,0,Math.PI/2)),or.quaternion.copy(Vt).multiply(this.tempQuaternion),Math.abs(this.alignVector.copy(this.unitY).applyQuaternion(Vt).dot(this.eye))>.9&&(or.visible=!1)),this.axis==="Z"&&(this.tempQuaternion.setFromEuler(this.tempEuler.set(0,Math.PI/2,0)),or.quaternion.copy(Vt).multiply(this.tempQuaternion),Math.abs(this.alignVector.copy(this.unitZ).applyQuaternion(Vt).dot(this.eye))>.9&&(or.visible=!1)),this.axis==="XYZE"&&(this.tempQuaternion.setFromEuler(this.tempEuler.set(0,Math.PI/2,0)),this.alignVector.copy(this.rotationAxis),or.quaternion.setFromRotationMatrix(this.lookAtMatrix.lookAt(this.zeroVector,this.alignVector,this.unitY)),or.quaternion.multiply(this.tempQuaternion),or.visible=this.dragging),this.axis==="E"&&(or.visible=!1)):or.name==="START"?(or.position.copy(this.worldPositionStart),or.visible=this.dragging):or.name==="END"?(or.position.copy(this.worldPosition),or.visible=this.dragging):or.name==="DELTA"?(or.position.copy(this.worldPositionStart),or.quaternion.copy(this.worldQuaternionStart),this.tempVector.set(1e-10,1e-10,1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1),this.tempVector.applyQuaternion(this.worldQuaternionStart.clone().invert()),or.scale.copy(this.tempVector),or.visible=this.dragging):(or.quaternion.copy(Vt),this.dragging?or.position.copy(this.worldPositionStart):or.position.copy(this.worldPosition),this.axis&&(or.visible=this.axis.search(or.name)!==-1));continue}or.quaternion.copy(Vt),this.mode==="translate"||this.mode==="scale"?((or.name==="X"||or.name==="XYZX")&&Math.abs(this.alignVector.copy(this.unitX).applyQuaternion(Vt).dot(this.eye))>.99&&(or.scale.set(1e-10,1e-10,1e-10),or.visible=!1),(or.name==="Y"||or.name==="XYZY")&&Math.abs(this.alignVector.copy(this.unitY).applyQuaternion(Vt).dot(this.eye))>.99&&(or.scale.set(1e-10,1e-10,1e-10),or.visible=!1),(or.name==="Z"||or.name==="XYZZ")&&Math.abs(this.alignVector.copy(this.unitZ).applyQuaternion(Vt).dot(this.eye))>.99&&(or.scale.set(1e-10,1e-10,1e-10),or.visible=!1),or.name==="XY"&&Math.abs(this.alignVector.copy(this.unitZ).applyQuaternion(Vt).dot(this.eye))<.2&&(or.scale.set(1e-10,1e-10,1e-10),or.visible=!1),or.name==="YZ"&&Math.abs(this.alignVector.copy(this.unitX).applyQuaternion(Vt).dot(this.eye))<.2&&(or.scale.set(1e-10,1e-10,1e-10),or.visible=!1),or.name==="XZ"&&Math.abs(this.alignVector.copy(this.unitY).applyQuaternion(Vt).dot(this.eye))<.2&&(or.scale.set(1e-10,1e-10,1e-10),or.visible=!1),or.name.search("X")!==-1&&(this.alignVector.copy(this.unitX).applyQuaternion(Vt).dot(this.eye)<0?or.tag==="fwd"?or.visible=!1:or.scale.x*=-1:or.tag==="bwd"&&(or.visible=!1)),or.name.search("Y")!==-1&&(this.alignVector.copy(this.unitY).applyQuaternion(Vt).dot(this.eye)<0?or.tag==="fwd"?or.visible=!1:or.scale.y*=-1:or.tag==="bwd"&&(or.visible=!1)),or.name.search("Z")!==-1&&(this.alignVector.copy(this.unitZ).applyQuaternion(Vt).dot(this.eye)<0?or.tag==="fwd"?or.visible=!1:or.scale.z*=-1:or.tag==="bwd"&&(or.visible=!1))):this.mode==="rotate"&&(this.tempQuaternion2.copy(Vt),this.alignVector.copy(this.eye).applyQuaternion(this.tempQuaternion.copy(Vt).invert()),or.name.search("E")!==-1&&or.quaternion.setFromRotationMatrix(this.lookAtMatrix.lookAt(this.eye,this.zeroVector,this.unitY)),or.name==="X"&&(this.tempQuaternion.setFromAxisAngle(this.unitX,Math.atan2(-this.alignVector.y,this.alignVector.z)),this.tempQuaternion.multiplyQuaternions(this.tempQuaternion2,this.tempQuaternion),or.quaternion.copy(this.tempQuaternion)),or.name==="Y"&&(this.tempQuaternion.setFromAxisAngle(this.unitY,Math.atan2(this.alignVector.x,this.alignVector.z)),this.tempQuaternion.multiplyQuaternions(this.tempQuaternion2,this.tempQuaternion),or.quaternion.copy(this.tempQuaternion)),or.name==="Z"&&(this.tempQuaternion.setFromAxisAngle(this.unitZ,Math.atan2(this.alignVector.y,this.alignVector.x)),this.tempQuaternion.multiplyQuaternions(this.tempQuaternion2,this.tempQuaternion),or.quaternion.copy(this.tempQuaternion))),or.visible=or.visible&&(or.name.indexOf("X")===-1||this.showX),or.visible=or.visible&&(or.name.indexOf("Y")===-1||this.showY),or.visible=or.visible&&(or.name.indexOf("Z")===-1||this.showZ),or.visible=or.visible&&(or.name.indexOf("E")===-1||this.showX&&this.showY&&this.showZ),or.material.tempOpacity=or.material.tempOpacity||or.material.opacity,or.material.tempColor=or.material.tempColor||or.material.color.clone(),or.material.color.copy(or.material.tempColor),or.material.opacity=or.material.tempOpacity,this.enabled?this.axis&&(or.name===this.axis?(or.material.opacity=1,or.material.color.lerp(new Wu(1,1,1),.5)):this.axis.split("").some(function(Ir){return or.name===Ir})?(or.material.opacity=1,or.material.color.lerp(new Wu(1,1,1),.5)):(or.material.opacity*=.25,or.material.color.lerp(new Wu(1,1,1),.5))):(or.material.opacity*=.5,or.material.color.lerp(new Wu(1,1,1),.5))}super.updateMatrixWorld()});const e=new dA({depthTest:!1,depthWrite:!1,transparent:!0,side:Zx,fog:!1,toneMapped:!1}),r=new Ww({depthTest:!1,depthWrite:!1,transparent:!0,linewidth:1,fog:!1,toneMapped:!1}),n=e.clone();n.opacity=.15;const i=e.clone();i.opacity=.33;const a=e.clone();a.color.set(16711680);const o=e.clone();o.color.set(65280);const s=e.clone();s.color.set(255);const d=e.clone();d.opacity=.25;const b=d.clone();b.color.set(16776960);const L=d.clone();L.color.set(65535);const B=d.clone();B.color.set(16711935),e.clone().color.set(16776960);const X=r.clone();X.color.set(16711680);const ie=r.clone();ie.color.set(65280);const de=r.clone();de.color.set(255);const ae=r.clone();ae.color.set(65535);const U=r.clone();U.color.set(16711935);const ve=r.clone();ve.color.set(16776960);const Se=r.clone();Se.color.set(7895160);const Pe=ve.clone();Pe.opacity=.25;const Me=new Wx(0,.05,.2,12,1,!1),Ie=new Hw(.125,.125,.125),Ve=new Jf;Ve.setAttribute("position",new Dc([0,0,0,1,0,0],3));const Ze=(yt,Vt)=>{const Er=new Jf,sr=[];for(let or=0;or<=64*Vt;++or)sr.push(0,Math.cos(or/32*Math.PI)*yt,Math.sin(or/32*Math.PI)*yt);return Er.setAttribute("position",new Dc(sr,3)),Er},Je=()=>{const yt=new Jf;return yt.setAttribute("position",new Dc([0,0,0,1,1,1],3)),yt},nt={X:[[new hc(Me,a),[1,0,0],[0,0,-Math.PI/2],null,"fwd"],[new hc(Me,a),[1,0,0],[0,0,Math.PI/2],null,"bwd"],[new Cp(Ve,X)]],Y:[[new hc(Me,o),[0,1,0],null,null,"fwd"],[new hc(Me,o),[0,1,0],[Math.PI,0,0],null,"bwd"],[new Cp(Ve,ie),null,[0,0,Math.PI/2]]],Z:[[new hc(Me,s),[0,0,1],[Math.PI/2,0,0],null,"fwd"],[new hc(Me,s),[0,0,1],[-Math.PI/2,0,0],null,"bwd"],[new Cp(Ve,de),null,[0,-Math.PI/2,0]]],XYZ:[[new hc(new O3(.1,0),d.clone()),[0,0,0],[0,0,0]]],XY:[[new hc(new j_(.295,.295),b.clone()),[.15,.15,0]],[new Cp(Ve,ve),[.18,.3,0],null,[.125,1,1]],[new Cp(Ve,ve),[.3,.18,0],[0,0,Math.PI/2],[.125,1,1]]],YZ:[[new hc(new j_(.295,.295),L.clone()),[0,.15,.15],[0,Math.PI/2,0]],[new Cp(Ve,ae),[0,.18,.3],[0,0,Math.PI/2],[.125,1,1]],[new Cp(Ve,ae),[0,.3,.18],[0,-Math.PI/2,0],[.125,1,1]]],XZ:[[new hc(new j_(.295,.295),B.clone()),[.15,0,.15],[-Math.PI/2,0,0]],[new Cp(Ve,U),[.18,0,.3],null,[.125,1,1]],[new Cp(Ve,U),[.3,0,.18],[0,-Math.PI/2,0],[.125,1,1]]]},ut={X:[[new hc(new Wx(.2,0,1,4,1,!1),n),[.6,0,0],[0,0,-Math.PI/2]]],Y:[[new hc(new Wx(.2,0,1,4,1,!1),n),[0,.6,0]]],Z:[[new hc(new Wx(.2,0,1,4,1,!1),n),[0,0,.6],[Math.PI/2,0,0]]],XYZ:[[new hc(new O3(.2,0),n)]],XY:[[new hc(new j_(.4,.4),n),[.2,.2,0]]],YZ:[[new hc(new j_(.4,.4),n),[0,.2,.2],[0,Math.PI/2,0]]],XZ:[[new hc(new j_(.4,.4),n),[.2,0,.2],[-Math.PI/2,0,0]]]},ht={START:[[new hc(new O3(.01,2),i),null,null,null,"helper"]],END:[[new hc(new O3(.01,2),i),null,null,null,"helper"]],DELTA:[[new Cp(Je(),i),null,null,null,"helper"]],X:[[new Cp(Ve,i.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new Cp(Ve,i.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new Cp(Ve,i.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]},_t={X:[[new Cp(Ze(1,.5),X)],[new hc(new O3(.04,0),a),[0,0,.99],null,[1,3,1]]],Y:[[new Cp(Ze(1,.5),ie),null,[0,0,-Math.PI/2]],[new hc(new O3(.04,0),o),[0,0,.99],null,[3,1,1]]],Z:[[new Cp(Ze(1,.5),de),null,[0,Math.PI/2,0]],[new hc(new O3(.04,0),s),[.99,0,0],null,[1,3,1]]],E:[[new Cp(Ze(1.25,1),Pe),null,[0,Math.PI/2,0]],[new hc(new Wx(.03,0,.15,4,1,!1),Pe),[1.17,0,0],[0,0,-Math.PI/2],[1,1,.001]],[new hc(new Wx(.03,0,.15,4,1,!1),Pe),[-1.17,0,0],[0,0,Math.PI/2],[1,1,.001]],[new hc(new Wx(.03,0,.15,4,1,!1),Pe),[0,-1.17,0],[Math.PI,0,0],[1,1,.001]],[new hc(new Wx(.03,0,.15,4,1,!1),Pe),[0,1.17,0],[0,0,0],[1,1,.001]]],XYZE:[[new Cp(Ze(1,1),Se),null,[0,Math.PI/2,0]]]},Dt={AXIS:[[new Cp(Ve,i.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]]},qt={X:[[new hc(new OP(1,.1,4,24),n),[0,0,0],[0,-Math.PI/2,-Math.PI/2]]],Y:[[new hc(new OP(1,.1,4,24),n),[0,0,0],[Math.PI/2,0,0]]],Z:[[new hc(new OP(1,.1,4,24),n),[0,0,0],[0,0,-Math.PI/2]]],E:[[new hc(new OP(1.25,.1,2,24),n)]],XYZE:[[new hc(new n6(.7,10,8),n)]]},Lt={X:[[new hc(Ie,a),[.8,0,0],[0,0,-Math.PI/2]],[new Cp(Ve,X),null,null,[.8,1,1]]],Y:[[new hc(Ie,o),[0,.8,0]],[new Cp(Ve,ie),null,[0,0,Math.PI/2],[.8,1,1]]],Z:[[new hc(Ie,s),[0,0,.8],[Math.PI/2,0,0]],[new Cp(Ve,de),null,[0,-Math.PI/2,0],[.8,1,1]]],XY:[[new hc(Ie,b),[.85,.85,0],null,[2,2,.2]],[new Cp(Ve,ve),[.855,.98,0],null,[.125,1,1]],[new Cp(Ve,ve),[.98,.855,0],[0,0,Math.PI/2],[.125,1,1]]],YZ:[[new hc(Ie,L),[0,.85,.85],null,[.2,2,2]],[new Cp(Ve,ae),[0,.855,.98],[0,0,Math.PI/2],[.125,1,1]],[new Cp(Ve,ae),[0,.98,.855],[0,-Math.PI/2,0],[.125,1,1]]],XZ:[[new hc(Ie,B),[.85,0,.85],null,[2,.2,2]],[new Cp(Ve,U),[.855,0,.98],null,[.125,1,1]],[new Cp(Ve,U),[.98,0,.855],[0,-Math.PI/2,0],[.125,1,1]]],XYZX:[[new hc(new Hw(.125,.125,.125),d.clone()),[1.1,0,0]]],XYZY:[[new hc(new Hw(.125,.125,.125),d.clone()),[0,1.1,0]]],XYZZ:[[new hc(new Hw(.125,.125,.125),d.clone()),[0,0,1.1]]]},dr={X:[[new hc(new Wx(.2,0,.8,4,1,!1),n),[.5,0,0],[0,0,-Math.PI/2]]],Y:[[new hc(new Wx(.2,0,.8,4,1,!1),n),[0,.5,0]]],Z:[[new hc(new Wx(.2,0,.8,4,1,!1),n),[0,0,.5],[Math.PI/2,0,0]]],XY:[[new hc(Ie,n),[.85,.85,0],null,[3,3,.2]]],YZ:[[new hc(Ie,n),[0,.85,.85],null,[.2,3,3]]],XZ:[[new hc(Ie,n),[.85,0,.85],null,[3,.2,3]]],XYZX:[[new hc(new Hw(.2,.2,.2),n),[1.1,0,0]]],XYZY:[[new hc(new Hw(.2,.2,.2),n),[0,1.1,0]]],XYZZ:[[new hc(new Hw(.2,.2,.2),n),[0,0,1.1]]]},Zt={X:[[new Cp(Ve,i.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new Cp(Ve,i.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new Cp(Ve,i.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]},Cr=yt=>{const Vt=new Hp;for(let Er in yt)for(let sr=yt[Er].length;sr--;){const or=yt[Er][sr][0].clone(),Ar=yt[Er][sr][1],Ir=yt[Er][sr][2],_n=yt[Er][sr][3],Un=yt[Er][sr][4];or.name=Er,or.tag=Un,Ar&&or.position.set(Ar[0],Ar[1],Ar[2]),Ir&&or.rotation.set(Ir[0],Ir[1],Ir[2]),_n&&or.scale.set(_n[0],_n[1],_n[2]),or.updateMatrix();const Qn=or.geometry.clone();Qn.applyMatrix4(or.matrix),or.geometry=Qn,or.renderOrder=1/0,or.position.set(0,0,0),or.rotation.set(0,0,0),or.scale.set(1,1,1),Vt.add(or)}return Vt};this.gizmo={},this.picker={},this.helper={},this.add(this.gizmo.translate=Cr(nt)),this.add(this.gizmo.rotate=Cr(_t)),this.add(this.gizmo.scale=Cr(Lt)),this.add(this.picker.translate=Cr(ut)),this.add(this.picker.rotate=Cr(qt)),this.add(this.picker.scale=Cr(dr)),this.add(this.helper.translate=Cr(ht)),this.add(this.helper.rotate=Cr(Dt)),this.add(this.helper.scale=Cr(Zt)),this.picker.translate.visible=!1,this.picker.rotate.visible=!1,this.picker.scale.visible=!1}}class Dnr extends hc{constructor(){super(new j_(1e5,1e5,2,2),new dA({visible:!1,wireframe:!0,side:Zx,transparent:!0,opacity:.1,toneMapped:!1})),ml(this,"isTransformControlsPlane",!0),ml(this,"type","TransformControlsPlane"),ml(this,"unitX",new oi(1,0,0)),ml(this,"unitY",new oi(0,1,0)),ml(this,"unitZ",new oi(0,0,1)),ml(this,"tempVector",new oi),ml(this,"dirVector",new oi),ml(this,"alignVector",new oi),ml(this,"tempMatrix",new Rc),ml(this,"identityQuaternion",new fh),ml(this,"cameraQuaternion",new fh),ml(this,"worldPosition",new oi),ml(this,"worldQuaternion",new fh),ml(this,"eye",new oi),ml(this,"axis",null),ml(this,"mode","translate"),ml(this,"space","world"),ml(this,"updateMatrixWorld",()=>{let e=this.space;switch(this.position.copy(this.worldPosition),this.mode==="scale"&&(e="local"),this.unitX.set(1,0,0).applyQuaternion(e==="local"?this.worldQuaternion:this.identityQuaternion),this.unitY.set(0,1,0).applyQuaternion(e==="local"?this.worldQuaternion:this.identityQuaternion),this.unitZ.set(0,0,1).applyQuaternion(e==="local"?this.worldQuaternion:this.identityQuaternion),this.alignVector.copy(this.unitY),this.mode){case"translate":case"scale":switch(this.axis){case"X":this.alignVector.copy(this.eye).cross(this.unitX),this.dirVector.copy(this.unitX).cross(this.alignVector);break;case"Y":this.alignVector.copy(this.eye).cross(this.unitY),this.dirVector.copy(this.unitY).cross(this.alignVector);break;case"Z":this.alignVector.copy(this.eye).cross(this.unitZ),this.dirVector.copy(this.unitZ).cross(this.alignVector);break;case"XY":this.dirVector.copy(this.unitZ);break;case"YZ":this.dirVector.copy(this.unitX);break;case"XZ":this.alignVector.copy(this.unitZ),this.dirVector.copy(this.unitY);break;case"XYZ":case"E":this.dirVector.set(0,0,0);break}break;case"rotate":default:this.dirVector.set(0,0,0)}this.dirVector.length()===0?this.quaternion.copy(this.cameraQuaternion):(this.tempMatrix.lookAt(this.tempVector.set(0,0,0),this.dirVector,this.alignVector),this.quaternion.setFromRotationMatrix(this.tempMatrix)),super.updateMatrixWorld()})}}var Lnr=Object.defineProperty,Onr=(t,e,r)=>e in t?Lnr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,fd=(t,e,r)=>(Onr(t,typeof e!="symbol"?e+"":e,r),r);const rq=new r6,WPe=new PC,Nnr=Math.cos(70*(Math.PI/180)),YPe=(t,e)=>(t%e+e)%e;let Fnr=class extends Mnr{constructor(e,r){super(),fd(this,"object"),fd(this,"domElement"),fd(this,"enabled",!0),fd(this,"target",new oi),fd(this,"minDistance",0),fd(this,"maxDistance",1/0),fd(this,"minZoom",0),fd(this,"maxZoom",1/0),fd(this,"minPolarAngle",0),fd(this,"maxPolarAngle",Math.PI),fd(this,"minAzimuthAngle",-1/0),fd(this,"maxAzimuthAngle",1/0),fd(this,"enableDamping",!1),fd(this,"dampingFactor",.05),fd(this,"enableZoom",!0),fd(this,"zoomSpeed",1),fd(this,"enableRotate",!0),fd(this,"rotateSpeed",1),fd(this,"enablePan",!0),fd(this,"panSpeed",1),fd(this,"screenSpacePanning",!0),fd(this,"keyPanSpeed",7),fd(this,"zoomToCursor",!1),fd(this,"autoRotate",!1),fd(this,"autoRotateSpeed",2),fd(this,"reverseOrbit",!1),fd(this,"reverseHorizontalOrbit",!1),fd(this,"reverseVerticalOrbit",!1),fd(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),fd(this,"mouseButtons",{LEFT:HD.ROTATE,MIDDLE:HD.DOLLY,RIGHT:HD.PAN}),fd(this,"touches",{ONE:jD.ROTATE,TWO:jD.DOLLY_PAN}),fd(this,"target0"),fd(this,"position0"),fd(this,"zoom0"),fd(this,"_domElementKeyEvents",null),fd(this,"getPolarAngle"),fd(this,"getAzimuthalAngle"),fd(this,"setPolarAngle"),fd(this,"setAzimuthalAngle"),fd(this,"getDistance"),fd(this,"getZoomScale"),fd(this,"listenToKeyEvents"),fd(this,"stopListenToKeyEvents"),fd(this,"saveState"),fd(this,"reset"),fd(this,"update"),fd(this,"connect"),fd(this,"dispose"),fd(this,"dollyIn"),fd(this,"dollyOut"),fd(this,"getScale"),fd(this,"setScale"),this.object=e,this.domElement=r,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=()=>L.phi,this.getAzimuthalAngle=()=>L.theta,this.setPolarAngle=Zi=>{let za=YPe(Zi,2*Math.PI),Ss=L.phi;Ss<0&&(Ss+=2*Math.PI),za<0&&(za+=2*Math.PI);let ba=Math.abs(za-Ss);2*Math.PI-ba<ba&&(za<Ss?za+=2*Math.PI:Ss+=2*Math.PI),B.phi=za-Ss,n.update()},this.setAzimuthalAngle=Zi=>{let za=YPe(Zi,2*Math.PI),Ss=L.theta;Ss<0&&(Ss+=2*Math.PI),za<0&&(za+=2*Math.PI);let ba=Math.abs(za-Ss);2*Math.PI-ba<ba&&(za<Ss?za+=2*Math.PI:Ss+=2*Math.PI),B.theta=za-Ss,n.update()},this.getDistance=()=>n.object.position.distanceTo(n.target),this.listenToKeyEvents=Zi=>{Zi.addEventListener("keydown",Ki),this._domElementKeyEvents=Zi},this.stopListenToKeyEvents=()=>{this._domElementKeyEvents.removeEventListener("keydown",Ki),this._domElementKeyEvents=null},this.saveState=()=>{n.target0.copy(n.target),n.position0.copy(n.object.position),n.zoom0=n.object.zoom},this.reset=()=>{n.target.copy(n.target0),n.object.position.copy(n.position0),n.object.zoom=n.zoom0,n.object.updateProjectionMatrix(),n.dispatchEvent(i),n.update(),d=s.NONE},this.update=(()=>{const Zi=new oi,za=new oi(0,1,0),Ss=new fh().setFromUnitVectors(e.up,za),ba=Ss.clone().invert(),po=new oi,Ys=new fh,$s=2*Math.PI;return function(){const Ns=n.object.position;Ss.setFromUnitVectors(e.up,za),ba.copy(Ss).invert(),Zi.copy(Ns).sub(n.target),Zi.applyQuaternion(Ss),L.setFromVector3(Zi),n.autoRotate&&d===s.NONE&&Dt(ht()),n.enableDamping?(L.theta+=B.theta*n.dampingFactor,L.phi+=B.phi*n.dampingFactor):(L.theta+=B.theta,L.phi+=B.phi);let Hl=n.minAzimuthAngle,nu=n.maxAzimuthAngle;isFinite(Hl)&&isFinite(nu)&&(Hl<-Math.PI?Hl+=$s:Hl>Math.PI&&(Hl-=$s),nu<-Math.PI?nu+=$s:nu>Math.PI&&(nu-=$s),Hl<=nu?L.theta=Math.max(Hl,Math.min(nu,L.theta)):L.theta=L.theta>(Hl+nu)/2?Math.max(Hl,L.theta):Math.min(nu,L.theta)),L.phi=Math.max(n.minPolarAngle,Math.min(n.maxPolarAngle,L.phi)),L.makeSafe(),n.enableDamping===!0?n.target.addScaledVector(X,n.dampingFactor):n.target.add(X),n.zoomToCursor&&Je||n.object.isOrthographicCamera?L.radius=sr(L.radius):L.radius=sr(L.radius*V),Zi.setFromSpherical(L),Zi.applyQuaternion(ba),Ns.copy(n.target).add(Zi),n.object.matrixAutoUpdate||n.object.updateMatrix(),n.object.lookAt(n.target),n.enableDamping===!0?(B.theta*=1-n.dampingFactor,B.phi*=1-n.dampingFactor,X.multiplyScalar(1-n.dampingFactor)):(B.set(0,0,0),X.set(0,0,0));let su=!1;if(n.zoomToCursor&&Je){let Mc=null;if(n.object instanceof sy&&n.object.isPerspectiveCamera){const da=Zi.length();Mc=sr(da*V);const Xa=da-Mc;n.object.position.addScaledVector(Ve,Xa),n.object.updateMatrixWorld()}else if(n.object.isOrthographicCamera){const da=new oi(Ze.x,Ze.y,0);da.unproject(n.object),n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/V)),n.object.updateProjectionMatrix(),su=!0;const Xa=new oi(Ze.x,Ze.y,0);Xa.unproject(n.object),n.object.position.sub(Xa).add(da),n.object.updateMatrixWorld(),Mc=Zi.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),n.zoomToCursor=!1;Mc!==null&&(n.screenSpacePanning?n.target.set(0,0,-1).transformDirection(n.object.matrix).multiplyScalar(Mc).add(n.object.position):(rq.origin.copy(n.object.position),rq.direction.set(0,0,-1).transformDirection(n.object.matrix),Math.abs(n.object.up.dot(rq.direction))<Nnr?e.lookAt(n.target):(WPe.setFromNormalAndCoplanarPoint(n.object.up,n.target),rq.intersectPlane(WPe,n.target))))}else n.object instanceof VC&&n.object.isOrthographicCamera&&(su=V!==1,su&&(n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/V)),n.object.updateProjectionMatrix()));return V=1,Je=!1,su||po.distanceToSquared(n.object.position)>b||8*(1-Ys.dot(n.object.quaternion))>b?(n.dispatchEvent(i),po.copy(n.object.position),Ys.copy(n.object.quaternion),su=!1,!0):!1}})(),this.connect=Zi=>{n.domElement=Zi,n.domElement.style.touchAction="none",n.domElement.addEventListener("contextmenu",Qa),n.domElement.addEventListener("pointerdown",va),n.domElement.addEventListener("pointercancel",Tn),n.domElement.addEventListener("wheel",Ei)},this.dispose=()=>{var Zi,za,Ss,ba,po,Ys;n.domElement&&(n.domElement.style.touchAction="auto"),(Zi=n.domElement)==null||Zi.removeEventListener("contextmenu",Qa),(za=n.domElement)==null||za.removeEventListener("pointerdown",va),(Ss=n.domElement)==null||Ss.removeEventListener("pointercancel",Tn),(ba=n.domElement)==null||ba.removeEventListener("wheel",Ei),(po=n.domElement)==null||po.ownerDocument.removeEventListener("pointermove",ti),(Ys=n.domElement)==null||Ys.ownerDocument.removeEventListener("pointerup",Tn),n._domElementKeyEvents!==null&&n._domElementKeyEvents.removeEventListener("keydown",Ki)};const n=this,i={type:"change"},a={type:"start"},o={type:"end"},s={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let d=s.NONE;const b=1e-6,L=new MW,B=new MW;let V=1;const X=new oi,ie=new sl,de=new sl,ae=new sl,U=new sl,ve=new sl,Se=new sl,Pe=new sl,Me=new sl,Ie=new sl,Ve=new oi,Ze=new sl;let Je=!1;const nt=[],ut={};function ht(){return 2*Math.PI/60/60*n.autoRotateSpeed}function _t(){return Math.pow(.95,n.zoomSpeed)}function Dt(Zi){n.reverseOrbit||n.reverseHorizontalOrbit?B.theta+=Zi:B.theta-=Zi}function qt(Zi){n.reverseOrbit||n.reverseVerticalOrbit?B.phi+=Zi:B.phi-=Zi}const Lt=(()=>{const Zi=new oi;return function(Ss,ba){Zi.setFromMatrixColumn(ba,0),Zi.multiplyScalar(-Ss),X.add(Zi)}})(),dr=(()=>{const Zi=new oi;return function(Ss,ba){n.screenSpacePanning===!0?Zi.setFromMatrixColumn(ba,1):(Zi.setFromMatrixColumn(ba,0),Zi.crossVectors(n.object.up,Zi)),Zi.multiplyScalar(Ss),X.add(Zi)}})(),Zt=(()=>{const Zi=new oi;return function(Ss,ba){const po=n.domElement;if(po&&n.object instanceof sy&&n.object.isPerspectiveCamera){const Ys=n.object.position;Zi.copy(Ys).sub(n.target);let $s=Zi.length();$s*=Math.tan(n.object.fov/2*Math.PI/180),Lt(2*Ss*$s/po.clientHeight,n.object.matrix),dr(2*ba*$s/po.clientHeight,n.object.matrix)}else po&&n.object instanceof VC&&n.object.isOrthographicCamera?(Lt(Ss*(n.object.right-n.object.left)/n.object.zoom/po.clientWidth,n.object.matrix),dr(ba*(n.object.top-n.object.bottom)/n.object.zoom/po.clientHeight,n.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),n.enablePan=!1)}})();function Cr(Zi){n.object instanceof sy&&n.object.isPerspectiveCamera||n.object instanceof VC&&n.object.isOrthographicCamera?V=Zi:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function yt(Zi){Cr(V/Zi)}function Vt(Zi){Cr(V*Zi)}function Er(Zi){if(!n.zoomToCursor||!n.domElement)return;Je=!0;const za=n.domElement.getBoundingClientRect(),Ss=Zi.clientX-za.left,ba=Zi.clientY-za.top,po=za.width,Ys=za.height;Ze.x=Ss/po*2-1,Ze.y=-(ba/Ys)*2+1,Ve.set(Ze.x,Ze.y,1).unproject(n.object).sub(n.object.position).normalize()}function sr(Zi){return Math.max(n.minDistance,Math.min(n.maxDistance,Zi))}function or(Zi){ie.set(Zi.clientX,Zi.clientY)}function Ar(Zi){Er(Zi),Pe.set(Zi.clientX,Zi.clientY)}function Ir(Zi){U.set(Zi.clientX,Zi.clientY)}function _n(Zi){de.set(Zi.clientX,Zi.clientY),ae.subVectors(de,ie).multiplyScalar(n.rotateSpeed);const za=n.domElement;za&&(Dt(2*Math.PI*ae.x/za.clientHeight),qt(2*Math.PI*ae.y/za.clientHeight)),ie.copy(de),n.update()}function Un(Zi){Me.set(Zi.clientX,Zi.clientY),Ie.subVectors(Me,Pe),Ie.y>0?yt(_t()):Ie.y<0&&Vt(_t()),Pe.copy(Me),n.update()}function Qn(Zi){ve.set(Zi.clientX,Zi.clientY),Se.subVectors(ve,U).multiplyScalar(n.panSpeed),Zt(Se.x,Se.y),U.copy(ve),n.update()}function Jn(Zi){Er(Zi),Zi.deltaY<0?Vt(_t()):Zi.deltaY>0&&yt(_t()),n.update()}function Vn(Zi){let za=!1;switch(Zi.code){case n.keys.UP:Zt(0,n.keyPanSpeed),za=!0;break;case n.keys.BOTTOM:Zt(0,-n.keyPanSpeed),za=!0;break;case n.keys.LEFT:Zt(n.keyPanSpeed,0),za=!0;break;case n.keys.RIGHT:Zt(-n.keyPanSpeed,0),za=!0;break}za&&(Zi.preventDefault(),n.update())}function jn(){if(nt.length==1)ie.set(nt[0].pageX,nt[0].pageY);else{const Zi=.5*(nt[0].pageX+nt[1].pageX),za=.5*(nt[0].pageY+nt[1].pageY);ie.set(Zi,za)}}function Lr(){if(nt.length==1)U.set(nt[0].pageX,nt[0].pageY);else{const Zi=.5*(nt[0].pageX+nt[1].pageX),za=.5*(nt[0].pageY+nt[1].pageY);U.set(Zi,za)}}function Yn(){const Zi=nt[0].pageX-nt[1].pageX,za=nt[0].pageY-nt[1].pageY,Ss=Math.sqrt(Zi*Zi+za*za);Pe.set(0,Ss)}function On(){n.enableZoom&&Yn(),n.enablePan&&Lr()}function Sn(){n.enableZoom&&Yn(),n.enableRotate&&jn()}function bn(Zi){if(nt.length==1)de.set(Zi.pageX,Zi.pageY);else{const Ss=Ko(Zi),ba=.5*(Zi.pageX+Ss.x),po=.5*(Zi.pageY+Ss.y);de.set(ba,po)}ae.subVectors(de,ie).multiplyScalar(n.rotateSpeed);const za=n.domElement;za&&(Dt(2*Math.PI*ae.x/za.clientHeight),qt(2*Math.PI*ae.y/za.clientHeight)),ie.copy(de)}function Mn(Zi){if(nt.length==1)ve.set(Zi.pageX,Zi.pageY);else{const za=Ko(Zi),Ss=.5*(Zi.pageX+za.x),ba=.5*(Zi.pageY+za.y);ve.set(Ss,ba)}Se.subVectors(ve,U).multiplyScalar(n.panSpeed),Zt(Se.x,Se.y),U.copy(ve)}function gi(Zi){const za=Ko(Zi),Ss=Zi.pageX-za.x,ba=Zi.pageY-za.y,po=Math.sqrt(Ss*Ss+ba*ba);Me.set(0,po),Ie.set(0,Math.pow(Me.y/Pe.y,n.zoomSpeed)),yt(Ie.y),Pe.copy(Me)}function Oi(Zi){n.enableZoom&&gi(Zi),n.enablePan&&Mn(Zi)}function Pa(Zi){n.enableZoom&&gi(Zi),n.enableRotate&&bn(Zi)}function va(Zi){var za,Ss;n.enabled!==!1&&(nt.length===0&&((za=n.domElement)==null||za.ownerDocument.addEventListener("pointermove",ti),(Ss=n.domElement)==null||Ss.ownerDocument.addEventListener("pointerup",Tn)),is(Zi),Zi.pointerType==="touch"?sa(Zi):bi(Zi))}function ti(Zi){n.enabled!==!1&&(Zi.pointerType==="touch"?xa(Zi):Wn(Zi))}function Tn(Zi){var za,Ss,ba;go(Zi),nt.length===0&&((za=n.domElement)==null||za.releasePointerCapture(Zi.pointerId),(Ss=n.domElement)==null||Ss.ownerDocument.removeEventListener("pointermove",ti),(ba=n.domElement)==null||ba.ownerDocument.removeEventListener("pointerup",Tn)),n.dispatchEvent(o),d=s.NONE}function bi(Zi){let za;switch(Zi.button){case 0:za=n.mouseButtons.LEFT;break;case 1:za=n.mouseButtons.MIDDLE;break;case 2:za=n.mouseButtons.RIGHT;break;default:za=-1}switch(za){case HD.DOLLY:if(n.enableZoom===!1)return;Ar(Zi),d=s.DOLLY;break;case HD.ROTATE:if(Zi.ctrlKey||Zi.metaKey||Zi.shiftKey){if(n.enablePan===!1)return;Ir(Zi),d=s.PAN}else{if(n.enableRotate===!1)return;or(Zi),d=s.ROTATE}break;case HD.PAN:if(Zi.ctrlKey||Zi.metaKey||Zi.shiftKey){if(n.enableRotate===!1)return;or(Zi),d=s.ROTATE}else{if(n.enablePan===!1)return;Ir(Zi),d=s.PAN}break;default:d=s.NONE}d!==s.NONE&&n.dispatchEvent(a)}function Wn(Zi){if(n.enabled!==!1)switch(d){case s.ROTATE:if(n.enableRotate===!1)return;_n(Zi);break;case s.DOLLY:if(n.enableZoom===!1)return;Un(Zi);break;case s.PAN:if(n.enablePan===!1)return;Qn(Zi);break}}function Ei(Zi){n.enabled===!1||n.enableZoom===!1||d!==s.NONE&&d!==s.ROTATE||(Zi.preventDefault(),n.dispatchEvent(a),Jn(Zi),n.dispatchEvent(o))}function Ki(Zi){n.enabled===!1||n.enablePan===!1||Vn(Zi)}function sa(Zi){switch(Co(Zi),nt.length){case 1:switch(n.touches.ONE){case jD.ROTATE:if(n.enableRotate===!1)return;jn(),d=s.TOUCH_ROTATE;break;case jD.PAN:if(n.enablePan===!1)return;Lr(),d=s.TOUCH_PAN;break;default:d=s.NONE}break;case 2:switch(n.touches.TWO){case jD.DOLLY_PAN:if(n.enableZoom===!1&&n.enablePan===!1)return;On(),d=s.TOUCH_DOLLY_PAN;break;case jD.DOLLY_ROTATE:if(n.enableZoom===!1&&n.enableRotate===!1)return;Sn(),d=s.TOUCH_DOLLY_ROTATE;break;default:d=s.NONE}break;default:d=s.NONE}d!==s.NONE&&n.dispatchEvent(a)}function xa(Zi){switch(Co(Zi),d){case s.TOUCH_ROTATE:if(n.enableRotate===!1)return;bn(Zi),n.update();break;case s.TOUCH_PAN:if(n.enablePan===!1)return;Mn(Zi),n.update();break;case s.TOUCH_DOLLY_PAN:if(n.enableZoom===!1&&n.enablePan===!1)return;Oi(Zi),n.update();break;case s.TOUCH_DOLLY_ROTATE:if(n.enableZoom===!1&&n.enableRotate===!1)return;Pa(Zi),n.update();break;default:d=s.NONE}}function Qa(Zi){n.enabled!==!1&&Zi.preventDefault()}function is(Zi){nt.push(Zi)}function go(Zi){delete ut[Zi.pointerId];for(let za=0;za<nt.length;za++)if(nt[za].pointerId==Zi.pointerId){nt.splice(za,1);return}}function Co(Zi){let za=ut[Zi.pointerId];za===void 0&&(za=new sl,ut[Zi.pointerId]=za),za.set(Zi.pageX,Zi.pageY)}function Ko(Zi){const za=Zi.pointerId===nt[0].pointerId?nt[1]:nt[0];return ut[za.pointerId]}this.dollyIn=(Zi=_t())=>{Vt(Zi),n.update()},this.dollyOut=(Zi=_t())=>{yt(Zi),n.update()},this.getScale=()=>V,this.setScale=Zi=>{Cr(Zi),n.update()},this.getZoomScale=()=>_t(),r!==void 0&&this.connect(r),this.update()}};const znr={uniforms:{tDiffuse:{value:null},h:{value:1/512}},vertexShader:`
      varying vec2 vUv;

      void main() {

        vUv = uv;
        gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );

      }
  `,fragmentShader:`
    uniform sampler2D tDiffuse;
    uniform float h;

    varying vec2 vUv;

    void main() {

    	vec4 sum = vec4( 0.0 );

    	sum += texture2D( tDiffuse, vec2( vUv.x - 4.0 * h, vUv.y ) ) * 0.051;
    	sum += texture2D( tDiffuse, vec2( vUv.x - 3.0 * h, vUv.y ) ) * 0.0918;
    	sum += texture2D( tDiffuse, vec2( vUv.x - 2.0 * h, vUv.y ) ) * 0.12245;
    	sum += texture2D( tDiffuse, vec2( vUv.x - 1.0 * h, vUv.y ) ) * 0.1531;
    	sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;
    	sum += texture2D( tDiffuse, vec2( vUv.x + 1.0 * h, vUv.y ) ) * 0.1531;
    	sum += texture2D( tDiffuse, vec2( vUv.x + 2.0 * h, vUv.y ) ) * 0.12245;
    	sum += texture2D( tDiffuse, vec2( vUv.x + 3.0 * h, vUv.y ) ) * 0.0918;
    	sum += texture2D( tDiffuse, vec2( vUv.x + 4.0 * h, vUv.y ) ) * 0.051;

    	gl_FragColor = sum;

    }
  `},Bnr={uniforms:{tDiffuse:{value:null},v:{value:1/512}},vertexShader:`
    varying vec2 vUv;

    void main() {

      vUv = uv;
      gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );

    }
  `,fragmentShader:`

  uniform sampler2D tDiffuse;
  uniform float v;

  varying vec2 vUv;

  void main() {

    vec4 sum = vec4( 0.0 );

    sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 4.0 * v ) ) * 0.051;
    sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 3.0 * v ) ) * 0.0918;
    sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 2.0 * v ) ) * 0.12245;
    sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 1.0 * v ) ) * 0.1531;
    sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;
    sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 1.0 * v ) ) * 0.1531;
    sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 2.0 * v ) ) * 0.12245;
    sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 3.0 * v ) ) * 0.0918;
    sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 4.0 * v ) ) * 0.051;

    gl_FragColor = sum;

  }
  `};class Unr extends qye{constructor(e){super(e),this.type=Og}parse(e){const o=function(Ze,Je){switch(Ze){case 1:throw new Error("THREE.RGBELoader: Read Error: "+(Je||""));case 2:throw new Error("THREE.RGBELoader: Write Error: "+(Je||""));case 3:throw new Error("THREE.RGBELoader: Bad File Format: "+(Je||""));default:case 4:throw new Error("THREE.RGBELoader: Memory Error: "+(Je||""))}},B=function(Ze,Je,nt){Je=Je||1024;let ht=Ze.pos,_t=-1,Dt=0,qt="",Lt=String.fromCharCode.apply(null,new Uint16Array(Ze.subarray(ht,ht+128)));for(;0>(_t=Lt.indexOf(`
`))&&Dt<Je&&ht<Ze.byteLength;)qt+=Lt,Dt+=Lt.length,ht+=128,Lt+=String.fromCharCode.apply(null,new Uint16Array(Ze.subarray(ht,ht+128)));return-1<_t?(Ze.pos+=Dt+_t+1,qt+Lt.slice(0,_t)):!1},V=function(Ze){const Je=/^#\?(\S+)/,nt=/^\s*GAMMA\s*=\s*(\d+(\.\d+)?)\s*$/,ut=/^\s*EXPOSURE\s*=\s*(\d+(\.\d+)?)\s*$/,ht=/^\s*FORMAT=(\S+)\s*$/,_t=/^\s*\-Y\s+(\d+)\s+\+X\s+(\d+)\s*$/,Dt={valid:0,string:"",comments:"",programtype:"RGBE",format:"",gamma:1,exposure:1,width:0,height:0};let qt,Lt;for((Ze.pos>=Ze.byteLength||!(qt=B(Ze)))&&o(1,"no header found"),(Lt=qt.match(Je))||o(3,"bad initial token"),Dt.valid|=1,Dt.programtype=Lt[1],Dt.string+=qt+`
`;qt=B(Ze),qt!==!1;){if(Dt.string+=qt+`
`,qt.charAt(0)==="#"){Dt.comments+=qt+`
`;continue}if((Lt=qt.match(nt))&&(Dt.gamma=parseFloat(Lt[1])),(Lt=qt.match(ut))&&(Dt.exposure=parseFloat(Lt[1])),(Lt=qt.match(ht))&&(Dt.valid|=2,Dt.format=Lt[1]),(Lt=qt.match(_t))&&(Dt.valid|=4,Dt.height=parseInt(Lt[1],10),Dt.width=parseInt(Lt[2],10)),Dt.valid&2&&Dt.valid&4)break}return Dt.valid&2||o(3,"missing format specifier"),Dt.valid&4||o(3,"missing image size specifier"),Dt},X=function(Ze,Je,nt){const ut=Je;if(ut<8||ut>32767||Ze[0]!==2||Ze[1]!==2||Ze[2]&128)return new Uint8Array(Ze);ut!==(Ze[2]<<8|Ze[3])&&o(3,"wrong scanline width");const ht=new Uint8Array(4*Je*nt);ht.length||o(4,"unable to allocate buffer space");let _t=0,Dt=0;const qt=4*ut,Lt=new Uint8Array(4),dr=new Uint8Array(qt);let Zt=nt;for(;Zt>0&&Dt<Ze.byteLength;){Dt+4>Ze.byteLength&&o(1),Lt[0]=Ze[Dt++],Lt[1]=Ze[Dt++],Lt[2]=Ze[Dt++],Lt[3]=Ze[Dt++],(Lt[0]!=2||Lt[1]!=2||(Lt[2]<<8|Lt[3])!=ut)&&o(3,"bad rgbe scanline format");let Cr=0,yt;for(;Cr<qt&&Dt<Ze.byteLength;){yt=Ze[Dt++];const Er=yt>128;if(Er&&(yt-=128),(yt===0||Cr+yt>qt)&&o(3,"bad scanline data"),Er){const sr=Ze[Dt++];for(let or=0;or<yt;or++)dr[Cr++]=sr}else dr.set(Ze.subarray(Dt,Dt+yt),Cr),Cr+=yt,Dt+=yt}const Vt=ut;for(let Er=0;Er<Vt;Er++){let sr=0;ht[_t]=dr[Er+sr],sr+=ut,ht[_t+1]=dr[Er+sr],sr+=ut,ht[_t+2]=dr[Er+sr],sr+=ut,ht[_t+3]=dr[Er+sr],_t+=4}Zt--}return ht},ie=function(Ze,Je,nt,ut){const ht=Ze[Je+3],_t=Math.pow(2,ht-128)/255;nt[ut+0]=Ze[Je+0]*_t,nt[ut+1]=Ze[Je+1]*_t,nt[ut+2]=Ze[Je+2]*_t,nt[ut+3]=1},de=function(Ze,Je,nt,ut){const ht=Ze[Je+3],_t=Math.pow(2,ht-128)/255;nt[ut+0]=Vw.toHalfFloat(Math.min(Ze[Je+0]*_t,65504)),nt[ut+1]=Vw.toHalfFloat(Math.min(Ze[Je+1]*_t,65504)),nt[ut+2]=Vw.toHalfFloat(Math.min(Ze[Je+2]*_t,65504)),nt[ut+3]=Vw.toHalfFloat(1)},ae=new Uint8Array(e);ae.pos=0;const U=V(ae),ve=U.width,Se=U.height,Pe=X(ae.subarray(ae.pos),ve,Se);let Me,Ie,Ve;switch(this.type){case mp:Ve=Pe.length/4;const Ze=new Float32Array(Ve*4);for(let nt=0;nt<Ve;nt++)ie(Pe,nt*4,Ze,nt*4);Me=Ze,Ie=mp;break;case Og:Ve=Pe.length/4;const Je=new Uint16Array(Ve*4);for(let nt=0;nt<Ve;nt++)de(Pe,nt*4,Je,nt*4);Me=Je,Ie=Og;break;default:throw new Error("THREE.RGBELoader: Unsupported type: "+this.type)}return{width:ve,height:Se,data:Me,header:U.string,gamma:U.gamma,exposure:U.exposure,type:Ie}}setDataType(e){return this.type=e,this}load(e,r,n,i){function a(o,s){switch(o.type){case mp:case Og:"colorSpace"in o?o.colorSpace="srgb-linear":o.encoding=3e3,o.minFilter=vp,o.magFilter=vp,o.generateMipmaps=!1,o.flipY=!0;break}r&&r(o,s)}return super.load(e,a,n,i)}}const az=mZ>=152;class Hnr extends qye{constructor(e){super(e),this.type=Og}parse(e){const Je=Math.pow(2.7182818,2.2);function nt(zn,Ni){for(var Za=0,ts=0;ts<65536;++ts)(ts==0||zn[ts>>3]&1<<(ts&7))&&(Ni[Za++]=ts);for(var ps=Za-1;Za<65536;)Ni[Za++]=0;return ps}function ut(zn){for(var Ni=0;Ni<16384;Ni++)zn[Ni]={},zn[Ni].len=0,zn[Ni].lit=0,zn[Ni].p=null}const ht={l:0,c:0,lc:0};function _t(zn,Ni,Za,ts,ps){for(;Za<zn;)Ni=Ni<<8|Ko(ts,ps),Za+=8;Za-=zn,ht.l=Ni>>Za&(1<<zn)-1,ht.c=Ni,ht.lc=Za}const Dt=new Array(59);function qt(zn){for(var Ni=0;Ni<=58;++Ni)Dt[Ni]=0;for(var Ni=0;Ni<65537;++Ni)Dt[zn[Ni]]+=1;for(var Za=0,Ni=58;Ni>0;--Ni){var ts=Za+Dt[Ni]>>1;Dt[Ni]=Za,Za=ts}for(var Ni=0;Ni<65537;++Ni){var ps=zn[Ni];ps>0&&(zn[Ni]=ps|Dt[ps]++<<6)}}function Lt(zn,Ni,Za,ts,ps,Mi,to){for(var Dn=Za,ea=0,pa=0;ps<=Mi;ps++){if(Dn.value-Za.value>ts)return!1;_t(6,ea,pa,zn,Dn);var ja=ht.l;if(ea=ht.c,pa=ht.lc,to[ps]=ja,ja==63){if(Dn.value-Za.value>ts)throw"Something wrong with hufUnpackEncTable";_t(8,ea,pa,zn,Dn);var _a=ht.l+6;if(ea=ht.c,pa=ht.lc,ps+_a>Mi+1)throw"Something wrong with hufUnpackEncTable";for(;_a--;)to[ps++]=0;ps--}else if(ja>=59){var _a=ja-59+2;if(ps+_a>Mi+1)throw"Something wrong with hufUnpackEncTable";for(;_a--;)to[ps++]=0;ps--}}qt(to)}function dr(zn){return zn&63}function Zt(zn){return zn>>6}function Cr(zn,Ni,Za,ts){for(;Ni<=Za;Ni++){var ps=Zt(zn[Ni]),Mi=dr(zn[Ni]);if(ps>>Mi)throw"Invalid table entry";if(Mi>14){var to=ts[ps>>Mi-14];if(to.len)throw"Invalid table entry";if(to.lit++,to.p){var Dn=to.p;to.p=new Array(to.lit);for(var ea=0;ea<to.lit-1;++ea)to.p[ea]=Dn[ea]}else to.p=new Array(1);to.p[to.lit-1]=Ni}else if(Mi)for(var pa=0,ea=1<<14-Mi;ea>0;ea--){var to=ts[(ps<<14-Mi)+pa];if(to.len||to.p)throw"Invalid table entry";to.len=Mi,to.lit=Ni,pa++}}return!0}const yt={c:0,lc:0};function Vt(zn,Ni,Za,ts){zn=zn<<8|Ko(Za,ts),Ni+=8,yt.c=zn,yt.lc=Ni}const Er={c:0,lc:0};function sr(zn,Ni,Za,ts,ps,Mi,to,Dn,ea,pa){if(zn==Ni){ts<8&&(Vt(Za,ts,ps,to),Za=yt.c,ts=yt.lc),ts-=8;var ja=Za>>ts,ja=new Uint8Array([ja])[0];if(ea.value+ja>pa)return!1;for(var _a=Dn[ea.value-1];ja-- >0;)Dn[ea.value++]=_a}else if(ea.value<pa)Dn[ea.value++]=zn;else return!1;Er.c=Za,Er.lc=ts}function or(zn){return zn&65535}function Ar(zn){var Ni=or(zn);return Ni>32767?Ni-65536:Ni}const Ir={a:0,b:0};function _n(zn,Ni){var Za=Ar(zn),ts=Ar(Ni),ps=ts,Mi=Za+(ps&1)+(ps>>1),to=Mi,Dn=Mi-ps;Ir.a=to,Ir.b=Dn}function Un(zn,Ni){var Za=or(zn),ts=or(Ni),ps=Za-(ts>>1)&65535,Mi=ts+ps-32768&65535;Ir.a=Mi,Ir.b=ps}function Qn(zn,Ni,Za,ts,ps,Mi,to){for(var Dn=to<16384,ea=Za>ps?ps:Za,pa=1,ja;pa<=ea;)pa<<=1;for(pa>>=1,ja=pa,pa>>=1;pa>=1;){for(var _a=0,Zs=_a+Mi*(ps-ja),ks=Mi*pa,el=Mi*ja,ol=ts*pa,tl=ts*ja,il,Gl,Qu,ic;_a<=Zs;_a+=el){for(var rf=_a,Sd=_a+ts*(Za-ja);rf<=Sd;rf+=tl){var yc=rf+ol,ii=rf+ks,xh=ii+ol;Dn?(_n(zn[rf+Ni],zn[ii+Ni]),il=Ir.a,Qu=Ir.b,_n(zn[yc+Ni],zn[xh+Ni]),Gl=Ir.a,ic=Ir.b,_n(il,Gl),zn[rf+Ni]=Ir.a,zn[yc+Ni]=Ir.b,_n(Qu,ic),zn[ii+Ni]=Ir.a,zn[xh+Ni]=Ir.b):(Un(zn[rf+Ni],zn[ii+Ni]),il=Ir.a,Qu=Ir.b,Un(zn[yc+Ni],zn[xh+Ni]),Gl=Ir.a,ic=Ir.b,Un(il,Gl),zn[rf+Ni]=Ir.a,zn[yc+Ni]=Ir.b,Un(Qu,ic),zn[ii+Ni]=Ir.a,zn[xh+Ni]=Ir.b)}if(Za&pa){var ii=rf+ks;Dn?_n(zn[rf+Ni],zn[ii+Ni]):Un(zn[rf+Ni],zn[ii+Ni]),il=Ir.a,zn[ii+Ni]=Ir.b,zn[rf+Ni]=il}}if(ps&pa)for(var rf=_a,Sd=_a+ts*(Za-ja);rf<=Sd;rf+=tl){var yc=rf+ol;Dn?_n(zn[rf+Ni],zn[yc+Ni]):Un(zn[rf+Ni],zn[yc+Ni]),il=Ir.a,zn[yc+Ni]=Ir.b,zn[rf+Ni]=il}ja=pa,pa>>=1}return _a}function Jn(zn,Ni,Za,ts,ps,Mi,to,Dn,ea,pa){for(var ja=0,_a=0,Zs=Dn,ks=Math.trunc(ps.value+(Mi+7)/8);ps.value<ks;)for(Vt(ja,_a,Za,ps),ja=yt.c,_a=yt.lc;_a>=14;){var el=ja>>_a-14&16383,ol=Ni[el];if(ol.len)_a-=ol.len,sr(ol.lit,to,ja,_a,Za,ts,ps,ea,pa,Zs),ja=Er.c,_a=Er.lc;else{if(!ol.p)throw"hufDecode issues";var tl;for(tl=0;tl<ol.lit;tl++){for(var il=dr(zn[ol.p[tl]]);_a<il&&ps.value<ks;)Vt(ja,_a,Za,ps),ja=yt.c,_a=yt.lc;if(_a>=il&&Zt(zn[ol.p[tl]])==(ja>>_a-il&(1<<il)-1)){_a-=il,sr(ol.p[tl],to,ja,_a,Za,ts,ps,ea,pa,Zs),ja=Er.c,_a=Er.lc;break}}if(tl==ol.lit)throw"hufDecode issues"}}var Gl=8-Mi&7;for(ja>>=Gl,_a-=Gl;_a>0;){var ol=Ni[ja<<14-_a&16383];if(ol.len)_a-=ol.len,sr(ol.lit,to,ja,_a,Za,ts,ps,ea,pa,Zs),ja=Er.c,_a=Er.lc;else throw"hufDecode issues"}return!0}function Vn(zn,Ni,Za,ts,ps,Mi){var to={value:0},Dn=Za.value,ea=Co(Ni,Za),pa=Co(Ni,Za);Za.value+=4;var ja=Co(Ni,Za);if(Za.value+=4,ea<0||ea>=65537||pa<0||pa>=65537)throw"Something wrong with HUF_ENCSIZE";var _a=new Array(65537),Zs=new Array(16384);ut(Zs);var ks=ts-(Za.value-Dn);if(Lt(zn,Ni,Za,ks,ea,pa,_a),ja>8*(ts-(Za.value-Dn)))throw"Something wrong with hufUncompress";Cr(_a,ea,pa,Zs),Jn(_a,Zs,zn,Ni,Za,ja,pa,Mi,ps,to)}function jn(zn,Ni,Za){for(var ts=0;ts<Za;++ts)Ni[ts]=zn[Ni[ts]]}function Lr(zn){for(var Ni=1;Ni<zn.length;Ni++){var Za=zn[Ni-1]+zn[Ni]-128;zn[Ni]=Za}}function Yn(zn,Ni){for(var Za=0,ts=Math.floor((zn.length+1)/2),ps=0,Mi=zn.length-1;!(ps>Mi||(Ni[ps++]=zn[Za++],ps>Mi));)Ni[ps++]=zn[ts++]}function On(zn){for(var Ni=zn.byteLength,Za=new Array,ts=0,ps=new DataView(zn);Ni>0;){var Mi=ps.getInt8(ts++);if(Mi<0){var to=-Mi;Ni-=to+1;for(var Dn=0;Dn<to;Dn++)Za.push(ps.getUint8(ts++))}else{var to=Mi;Ni-=2;for(var ea=ps.getUint8(ts++),Dn=0;Dn<to+1;Dn++)Za.push(ea)}}return Za}function Sn(zn,Ni,Za,ts,ps,Mi){var yc=new DataView(Mi.buffer),to=Za[zn.idx[0]].width,Dn=Za[zn.idx[0]].height,ea=3,pa=Math.floor(to/8),ja=Math.ceil(to/8),_a=Math.ceil(Dn/8),Zs=to-(ja-1)*8,ks=Dn-(_a-1)*8,el={value:0},ol=new Array(ea),tl=new Array(ea),il=new Array(ea),Gl=new Array(ea),Qu=new Array(ea);for(let jf=0;jf<ea;++jf)Qu[jf]=Ni[zn.idx[jf]],ol[jf]=jf<1?0:ol[jf-1]+ja*_a,tl[jf]=new Float32Array(64),il[jf]=new Uint16Array(64),Gl[jf]=new Uint16Array(ja*64);for(let jf=0;jf<_a;++jf){var ic=8;jf==_a-1&&(ic=ks);var rf=8;for(let Td=0;Td<ja;++Td){Td==ja-1&&(rf=Zs);for(let Yc=0;Yc<ea;++Yc)il[Yc].fill(0),il[Yc][0]=ps[ol[Yc]++],bn(el,ts,il[Yc]),Mn(il[Yc],tl[Yc]),gi(tl[Yc]);Oi(tl);for(let Yc=0;Yc<ea;++Yc)Pa(tl[Yc],Gl[Yc],Td*64)}let ih=0;for(let Td=0;Td<ea;++Td){const Yc=Za[zn.idx[Td]].type;for(let ep=8*jf;ep<8*jf+ic;++ep){ih=Qu[Td][ep];for(let Tc=0;Tc<pa;++Tc){const pf=Tc*64+(ep&7)*8;yc.setUint16(ih+0*Yc,Gl[Td][pf+0],!0),yc.setUint16(ih+2*Yc,Gl[Td][pf+1],!0),yc.setUint16(ih+4*Yc,Gl[Td][pf+2],!0),yc.setUint16(ih+6*Yc,Gl[Td][pf+3],!0),yc.setUint16(ih+8*Yc,Gl[Td][pf+4],!0),yc.setUint16(ih+10*Yc,Gl[Td][pf+5],!0),yc.setUint16(ih+12*Yc,Gl[Td][pf+6],!0),yc.setUint16(ih+14*Yc,Gl[Td][pf+7],!0),ih+=16*Yc}}if(pa!=ja)for(let ep=8*jf;ep<8*jf+ic;++ep){const Tc=Qu[Td][ep]+8*pa*2*Yc,pf=pa*64+(ep&7)*8;for(let Tf=0;Tf<rf;++Tf)yc.setUint16(Tc+Tf*2*Yc,Gl[Td][pf+Tf],!0)}}}for(var Sd=new Uint16Array(to),yc=new DataView(Mi.buffer),ii=0;ii<ea;++ii){Za[zn.idx[ii]].decoded=!0;var xh=Za[zn.idx[ii]].type;if(Za[ii].type==2)for(var pd=0;pd<Dn;++pd){const jf=Qu[ii][pd];for(var Ip=0;Ip<to;++Ip)Sd[Ip]=yc.getUint16(jf+Ip*2*xh,!0);for(var Ip=0;Ip<to;++Ip)yc.setFloat32(jf+Ip*2*xh,po(Sd[Ip]),!0)}}}function bn(zn,Ni,Za){for(var ts,ps=1;ps<64;)ts=Ni[zn.value],ts==65280?ps=64:ts>>8==255?ps+=ts&255:(Za[ps]=ts,ps++),zn.value++}function Mn(zn,Ni){Ni[0]=po(zn[0]),Ni[1]=po(zn[1]),Ni[2]=po(zn[5]),Ni[3]=po(zn[6]),Ni[4]=po(zn[14]),Ni[5]=po(zn[15]),Ni[6]=po(zn[27]),Ni[7]=po(zn[28]),Ni[8]=po(zn[2]),Ni[9]=po(zn[4]),Ni[10]=po(zn[7]),Ni[11]=po(zn[13]),Ni[12]=po(zn[16]),Ni[13]=po(zn[26]),Ni[14]=po(zn[29]),Ni[15]=po(zn[42]),Ni[16]=po(zn[3]),Ni[17]=po(zn[8]),Ni[18]=po(zn[12]),Ni[19]=po(zn[17]),Ni[20]=po(zn[25]),Ni[21]=po(zn[30]),Ni[22]=po(zn[41]),Ni[23]=po(zn[43]),Ni[24]=po(zn[9]),Ni[25]=po(zn[11]),Ni[26]=po(zn[18]),Ni[27]=po(zn[24]),Ni[28]=po(zn[31]),Ni[29]=po(zn[40]),Ni[30]=po(zn[44]),Ni[31]=po(zn[53]),Ni[32]=po(zn[10]),Ni[33]=po(zn[19]),Ni[34]=po(zn[23]),Ni[35]=po(zn[32]),Ni[36]=po(zn[39]),Ni[37]=po(zn[45]),Ni[38]=po(zn[52]),Ni[39]=po(zn[54]),Ni[40]=po(zn[20]),Ni[41]=po(zn[22]),Ni[42]=po(zn[33]),Ni[43]=po(zn[38]),Ni[44]=po(zn[46]),Ni[45]=po(zn[51]),Ni[46]=po(zn[55]),Ni[47]=po(zn[60]),Ni[48]=po(zn[21]),Ni[49]=po(zn[34]),Ni[50]=po(zn[37]),Ni[51]=po(zn[47]),Ni[52]=po(zn[50]),Ni[53]=po(zn[56]),Ni[54]=po(zn[59]),Ni[55]=po(zn[61]),Ni[56]=po(zn[35]),Ni[57]=po(zn[36]),Ni[58]=po(zn[48]),Ni[59]=po(zn[49]),Ni[60]=po(zn[57]),Ni[61]=po(zn[58]),Ni[62]=po(zn[62]),Ni[63]=po(zn[63])}function gi(zn){const Ni=.5*Math.cos(.7853975),Za=.5*Math.cos(3.14159/16),ts=.5*Math.cos(3.14159/8),ps=.5*Math.cos(3*3.14159/16),Mi=.5*Math.cos(5*3.14159/16),to=.5*Math.cos(3*3.14159/8),Dn=.5*Math.cos(7*3.14159/16);for(var ea=new Array(4),pa=new Array(4),ja=new Array(4),_a=new Array(4),Zs=0;Zs<8;++Zs){var ks=Zs*8;ea[0]=ts*zn[ks+2],ea[1]=to*zn[ks+2],ea[2]=ts*zn[ks+6],ea[3]=to*zn[ks+6],pa[0]=Za*zn[ks+1]+ps*zn[ks+3]+Mi*zn[ks+5]+Dn*zn[ks+7],pa[1]=ps*zn[ks+1]-Dn*zn[ks+3]-Za*zn[ks+5]-Mi*zn[ks+7],pa[2]=Mi*zn[ks+1]-Za*zn[ks+3]+Dn*zn[ks+5]+ps*zn[ks+7],pa[3]=Dn*zn[ks+1]-Mi*zn[ks+3]+ps*zn[ks+5]-Za*zn[ks+7],ja[0]=Ni*(zn[ks+0]+zn[ks+4]),ja[3]=Ni*(zn[ks+0]-zn[ks+4]),ja[1]=ea[0]+ea[3],ja[2]=ea[1]-ea[2],_a[0]=ja[0]+ja[1],_a[1]=ja[3]+ja[2],_a[2]=ja[3]-ja[2],_a[3]=ja[0]-ja[1],zn[ks+0]=_a[0]+pa[0],zn[ks+1]=_a[1]+pa[1],zn[ks+2]=_a[2]+pa[2],zn[ks+3]=_a[3]+pa[3],zn[ks+4]=_a[3]-pa[3],zn[ks+5]=_a[2]-pa[2],zn[ks+6]=_a[1]-pa[1],zn[ks+7]=_a[0]-pa[0]}for(var el=0;el<8;++el)ea[0]=ts*zn[16+el],ea[1]=to*zn[16+el],ea[2]=ts*zn[48+el],ea[3]=to*zn[48+el],pa[0]=Za*zn[8+el]+ps*zn[24+el]+Mi*zn[40+el]+Dn*zn[56+el],pa[1]=ps*zn[8+el]-Dn*zn[24+el]-Za*zn[40+el]-Mi*zn[56+el],pa[2]=Mi*zn[8+el]-Za*zn[24+el]+Dn*zn[40+el]+ps*zn[56+el],pa[3]=Dn*zn[8+el]-Mi*zn[24+el]+ps*zn[40+el]-Za*zn[56+el],ja[0]=Ni*(zn[el]+zn[32+el]),ja[3]=Ni*(zn[el]-zn[32+el]),ja[1]=ea[0]+ea[3],ja[2]=ea[1]-ea[2],_a[0]=ja[0]+ja[1],_a[1]=ja[3]+ja[2],_a[2]=ja[3]-ja[2],_a[3]=ja[0]-ja[1],zn[0+el]=_a[0]+pa[0],zn[8+el]=_a[1]+pa[1],zn[16+el]=_a[2]+pa[2],zn[24+el]=_a[3]+pa[3],zn[32+el]=_a[3]-pa[3],zn[40+el]=_a[2]-pa[2],zn[48+el]=_a[1]-pa[1],zn[56+el]=_a[0]-pa[0]}function Oi(zn){for(var Ni=0;Ni<64;++Ni){var Za=zn[0][Ni],ts=zn[1][Ni],ps=zn[2][Ni];zn[0][Ni]=Za+1.5747*ps,zn[1][Ni]=Za-.1873*ts-.4682*ps,zn[2][Ni]=Za+1.8556*ts}}function Pa(zn,Ni,Za){for(var ts=0;ts<64;++ts)Ni[Za+ts]=Vw.toHalfFloat(va(zn[ts]))}function va(zn){return zn<=1?Math.sign(zn)*Math.pow(Math.abs(zn),2.2):Math.sign(zn)*Math.pow(Je,Math.abs(zn)-1)}function ti(zn){return new DataView(zn.array.buffer,zn.offset.value,zn.size)}function Tn(zn){var Ni=zn.viewer.buffer.slice(zn.offset.value,zn.offset.value+zn.size),Za=new Uint8Array(On(Ni)),ts=new Uint8Array(Za.length);return Lr(Za),Yn(Za,ts),new DataView(ts.buffer)}function bi(zn){var Ni=zn.array.slice(zn.offset.value,zn.offset.value+zn.size),Za=tq(Ni),ts=new Uint8Array(Za.length);return Lr(Za),Yn(Za,ts),new DataView(ts.buffer)}function Wn(zn){for(var Ni=zn.viewer,Za={value:zn.offset.value},ts=new Uint16Array(zn.width*zn.scanlineBlockSize*(zn.channels*zn.type)),ps=new Uint8Array(8192),Mi=0,to=new Array(zn.channels),Dn=0;Dn<zn.channels;Dn++)to[Dn]={},to[Dn].start=Mi,to[Dn].end=to[Dn].start,to[Dn].nx=zn.width,to[Dn].ny=zn.lines,to[Dn].size=zn.type,Mi+=to[Dn].nx*to[Dn].ny*to[Dn].size;var ea=Ys(Ni,Za),pa=Ys(Ni,Za);if(pa>=8192)throw"Something is wrong with PIZ_COMPRESSION BITMAP_SIZE";if(ea<=pa)for(var Dn=0;Dn<pa-ea+1;Dn++)ps[Dn+ea]=Zi(Ni,Za);var ja=new Uint16Array(65536),_a=nt(ps,ja),Zs=Co(Ni,Za);Vn(zn.array,Ni,Za,Zs,ts,Mi);for(var Dn=0;Dn<zn.channels;++Dn)for(var ks=to[Dn],el=0;el<to[Dn].size;++el)Qn(ts,ks.start+el,ks.nx,ks.size,ks.ny,ks.nx*ks.size,_a);jn(ja,ts,Mi);for(var ol=0,tl=new Uint8Array(ts.buffer.byteLength),il=0;il<zn.lines;il++)for(var Gl=0;Gl<zn.channels;Gl++){var ks=to[Gl],Qu=ks.nx*ks.size,ic=new Uint8Array(ts.buffer,ks.end*2,Qu*2);tl.set(ic,ol),ol+=Qu*2,ks.end+=Qu}return new DataView(tl.buffer)}function Ei(zn){var Ni=zn.array.slice(zn.offset.value,zn.offset.value+zn.size),Za=tq(Ni);const ts=zn.lines*zn.channels*zn.width,ps=zn.type==1?new Uint16Array(ts):new Uint32Array(ts);let Mi=0,to=0;const Dn=new Array(4);for(let ea=0;ea<zn.lines;ea++)for(let pa=0;pa<zn.channels;pa++){let ja=0;switch(zn.type){case 1:Dn[0]=Mi,Dn[1]=Dn[0]+zn.width,Mi=Dn[1]+zn.width;for(let _a=0;_a<zn.width;++_a){const Zs=Za[Dn[0]++]<<8|Za[Dn[1]++];ja+=Zs,ps[to]=ja,to++}break;case 2:Dn[0]=Mi,Dn[1]=Dn[0]+zn.width,Dn[2]=Dn[1]+zn.width,Mi=Dn[2]+zn.width;for(let _a=0;_a<zn.width;++_a){const Zs=Za[Dn[0]++]<<24|Za[Dn[1]++]<<16|Za[Dn[2]++]<<8;ja+=Zs,ps[to]=ja,to++}break}}return new DataView(ps.buffer)}function Ki(zn){var Ni=zn.viewer,Za={value:zn.offset.value},ts=new Uint8Array(zn.width*zn.lines*(zn.channels*zn.type*2)),ps={version:za(Ni,Za),unknownUncompressedSize:za(Ni,Za),unknownCompressedSize:za(Ni,Za),acCompressedSize:za(Ni,Za),dcCompressedSize:za(Ni,Za),rleCompressedSize:za(Ni,Za),rleUncompressedSize:za(Ni,Za),rleRawSize:za(Ni,Za),totalAcUncompressedCount:za(Ni,Za),totalDcUncompressedCount:za(Ni,Za),acCompression:za(Ni,Za)};if(ps.version<2)throw"EXRLoader.parse: "+jl.compression+" version "+ps.version+" is unsupported";for(var Mi=new Array,to=Ys(Ni,Za)-2;to>0;){var Dn=sa(Ni.buffer,Za),ea=Zi(Ni,Za),pa=ea>>2&3,ja=(ea>>4)-1,_a=new Int8Array([ja])[0],Zs=Zi(Ni,Za);Mi.push({name:Dn,index:_a,type:Zs,compression:pa}),to-=Dn.length+3}for(var ks=jl.channels,el=new Array(zn.channels),ol=0;ol<zn.channels;++ol){var tl=el[ol]={},il=ks[ol];tl.name=il.name,tl.compression=0,tl.decoded=!1,tl.type=il.pixelType,tl.pLinear=il.pLinear,tl.width=zn.width,tl.height=zn.lines}for(var Gl={idx:new Array(3)},Qu=0;Qu<zn.channels;++Qu)for(var tl=el[Qu],ol=0;ol<Mi.length;++ol){var ic=Mi[ol];tl.name==ic.name&&(tl.compression=ic.compression,ic.index>=0&&(Gl.idx[ic.index]=Qu),tl.offset=Qu)}if(ps.acCompressedSize>0)switch(ps.acCompression){case 0:var yc=new Uint16Array(ps.totalAcUncompressedCount);Vn(zn.array,Ni,Za,ps.acCompressedSize,yc,ps.totalAcUncompressedCount);break;case 1:var rf=zn.array.slice(Za.value,Za.value+ps.totalAcUncompressedCount),Sd=tq(rf),yc=new Uint16Array(Sd.buffer);Za.value+=ps.totalAcUncompressedCount;break}if(ps.dcCompressedSize>0){var ii={array:zn.array,offset:Za,size:ps.dcCompressedSize},xh=new Uint16Array(bi(ii).buffer);Za.value+=ps.dcCompressedSize}if(ps.rleRawSize>0){var rf=zn.array.slice(Za.value,Za.value+ps.rleCompressedSize),Sd=tq(rf),pd=On(Sd.buffer);Za.value+=ps.rleCompressedSize}for(var Ip=0,jf=new Array(el.length),ol=0;ol<jf.length;++ol)jf[ol]=new Array;for(var ih=0;ih<zn.lines;++ih)for(var Td=0;Td<el.length;++Td)jf[Td].push(Ip),Ip+=el[Td].width*zn.type*2;Sn(Gl,jf,el,yc,xh,ts);for(var ol=0;ol<el.length;++ol){var tl=el[ol];if(!tl.decoded)switch(tl.compression){case 2:for(var Yc=0,ep=0,ih=0;ih<zn.lines;++ih){for(var Tc=jf[ol][Yc],pf=0;pf<tl.width;++pf){for(var Tf=0;Tf<2*tl.type;++Tf)ts[Tc++]=pd[ep+Tf*tl.width*tl.height];ep++}Yc++}break;case 1:default:throw"EXRLoader.parse: unsupported channel compression"}}return new DataView(ts.buffer)}function sa(zn,Ni){for(var Za=new Uint8Array(zn),ts=0;Za[Ni.value+ts]!=0;)ts+=1;var ps=new TextDecoder().decode(Za.slice(Ni.value,Ni.value+ts));return Ni.value=Ni.value+ts+1,ps}function xa(zn,Ni,Za){var ts=new TextDecoder().decode(new Uint8Array(zn).slice(Ni.value,Ni.value+Za));return Ni.value=Ni.value+Za,ts}function Qa(zn,Ni){var Za=go(zn,Ni),ts=Co(zn,Ni);return[Za,ts]}function is(zn,Ni){var Za=Co(zn,Ni),ts=Co(zn,Ni);return[Za,ts]}function go(zn,Ni){var Za=zn.getInt32(Ni.value,!0);return Ni.value=Ni.value+4,Za}function Co(zn,Ni){var Za=zn.getUint32(Ni.value,!0);return Ni.value=Ni.value+4,Za}function Ko(zn,Ni){var Za=zn[Ni.value];return Ni.value=Ni.value+1,Za}function Zi(zn,Ni){var Za=zn.getUint8(Ni.value);return Ni.value=Ni.value+1,Za}const za=function(zn,Ni){let Za;return"getBigInt64"in DataView.prototype?Za=Number(zn.getBigInt64(Ni.value,!0)):Za=zn.getUint32(Ni.value+4,!0)+Number(zn.getUint32(Ni.value,!0)<<32),Ni.value+=8,Za};function Ss(zn,Ni){var Za=zn.getFloat32(Ni.value,!0);return Ni.value+=4,Za}function ba(zn,Ni){return Vw.toHalfFloat(Ss(zn,Ni))}function po(zn){var Ni=(zn&31744)>>10,Za=zn&1023;return(zn>>15?-1:1)*(Ni?Ni===31?Za?NaN:1/0:Math.pow(2,Ni-15)*(1+Za/1024):6103515625e-14*(Za/1024))}function Ys(zn,Ni){var Za=zn.getUint16(Ni.value,!0);return Ni.value+=2,Za}function $s(zn,Ni){return po(Ys(zn,Ni))}function Gs(zn,Ni,Za,ts){for(var ps=Za.value,Mi=[];Za.value<ps+ts-1;){var to=sa(Ni,Za),Dn=go(zn,Za),ea=Zi(zn,Za);Za.value+=3;var pa=go(zn,Za),ja=go(zn,Za);Mi.push({name:to,pixelType:Dn,pLinear:ea,xSampling:pa,ySampling:ja})}return Za.value+=1,Mi}function Ns(zn,Ni){var Za=Ss(zn,Ni),ts=Ss(zn,Ni),ps=Ss(zn,Ni),Mi=Ss(zn,Ni),to=Ss(zn,Ni),Dn=Ss(zn,Ni),ea=Ss(zn,Ni),pa=Ss(zn,Ni);return{redX:Za,redY:ts,greenX:ps,greenY:Mi,blueX:to,blueY:Dn,whiteX:ea,whiteY:pa}}function Hl(zn,Ni){var Za=["NO_COMPRESSION","RLE_COMPRESSION","ZIPS_COMPRESSION","ZIP_COMPRESSION","PIZ_COMPRESSION","PXR24_COMPRESSION","B44_COMPRESSION","B44A_COMPRESSION","DWAA_COMPRESSION","DWAB_COMPRESSION"],ts=Zi(zn,Ni);return Za[ts]}function nu(zn,Ni){var Za=Co(zn,Ni),ts=Co(zn,Ni),ps=Co(zn,Ni),Mi=Co(zn,Ni);return{xMin:Za,yMin:ts,xMax:ps,yMax:Mi}}function su(zn,Ni){var Za=["INCREASING_Y"],ts=Zi(zn,Ni);return Za[ts]}function Mc(zn,Ni){var Za=Ss(zn,Ni),ts=Ss(zn,Ni);return[Za,ts]}function da(zn,Ni){var Za=Ss(zn,Ni),ts=Ss(zn,Ni),ps=Ss(zn,Ni);return[Za,ts,ps]}function Xa(zn,Ni,Za,ts,ps){if(ts==="string"||ts==="stringvector"||ts==="iccProfile")return xa(Ni,Za,ps);if(ts==="chlist")return Gs(zn,Ni,Za,ps);if(ts==="chromaticities")return Ns(zn,Za);if(ts==="compression")return Hl(zn,Za);if(ts==="box2i")return nu(zn,Za);if(ts==="lineOrder")return su(zn,Za);if(ts==="float")return Ss(zn,Za);if(ts==="v2f")return Mc(zn,Za);if(ts==="v3f")return da(zn,Za);if(ts==="int")return go(zn,Za);if(ts==="rational")return Qa(zn,Za);if(ts==="timecode")return is(zn,Za);if(ts==="preview")return Za.value+=ps,"skipped";Za.value+=ps}function Oo(zn,Ni,Za){const ts={};if(zn.getUint32(0,!0)!=20000630)throw"THREE.EXRLoader: provided file doesn't appear to be in OpenEXR format.";ts.version=zn.getUint8(4);const ps=zn.getUint8(5);ts.spec={singleTile:!!(ps&2),longName:!!(ps&4),deepFormat:!!(ps&8),multiPart:!!(ps&16)},Za.value=8;for(var Mi=!0;Mi;){var to=sa(Ni,Za);if(to==0)Mi=!1;else{var Dn=sa(Ni,Za),ea=Co(zn,Za),pa=Xa(zn,Ni,Za,Dn,ea);pa===void 0?console.warn(`EXRLoader.parse: skipped unknown header attribute type '${Dn}'.`):ts[to]=pa}}if((ps&-5)!=0)throw console.error("EXRHeader:",ts),"THREE.EXRLoader: provided file is currently unsupported.";return ts}function _s(zn,Ni,Za,ts,ps){const Mi={size:0,viewer:Ni,array:Za,offset:ts,width:zn.dataWindow.xMax-zn.dataWindow.xMin+1,height:zn.dataWindow.yMax-zn.dataWindow.yMin+1,channels:zn.channels.length,bytesPerLine:null,lines:null,inputSize:null,type:zn.channels[0].pixelType,uncompress:null,getter:null,format:null,[az?"colorSpace":"encoding"]:null};switch(zn.compression){case"NO_COMPRESSION":Mi.lines=1,Mi.uncompress=ti;break;case"RLE_COMPRESSION":Mi.lines=1,Mi.uncompress=Tn;break;case"ZIPS_COMPRESSION":Mi.lines=1,Mi.uncompress=bi;break;case"ZIP_COMPRESSION":Mi.lines=16,Mi.uncompress=bi;break;case"PIZ_COMPRESSION":Mi.lines=32,Mi.uncompress=Wn;break;case"PXR24_COMPRESSION":Mi.lines=16,Mi.uncompress=Ei;break;case"DWAA_COMPRESSION":Mi.lines=32,Mi.uncompress=Ki;break;case"DWAB_COMPRESSION":Mi.lines=256,Mi.uncompress=Ki;break;default:throw"EXRLoader.parse: "+zn.compression+" is unsupported"}if(Mi.scanlineBlockSize=Mi.lines,Mi.type==1)switch(ps){case mp:Mi.getter=$s,Mi.inputSize=2;break;case Og:Mi.getter=Ys,Mi.inputSize=2;break}else if(Mi.type==2)switch(ps){case mp:Mi.getter=Ss,Mi.inputSize=4;break;case Og:Mi.getter=ba,Mi.inputSize=4}else throw"EXRLoader.parse: unsupported pixelType "+Mi.type+" for "+zn.compression+".";Mi.blockCount=(zn.dataWindow.yMax+1)/Mi.scanlineBlockSize;for(var to=0;to<Mi.blockCount;to++)za(Ni,ts);Mi.outputChannels=Mi.channels==3?4:Mi.channels;const Dn=Mi.width*Mi.height*Mi.outputChannels;switch(ps){case mp:Mi.byteArray=new Float32Array(Dn),Mi.channels<Mi.outputChannels&&Mi.byteArray.fill(1,0,Dn);break;case Og:Mi.byteArray=new Uint16Array(Dn),Mi.channels<Mi.outputChannels&&Mi.byteArray.fill(15360,0,Dn);break;default:console.error("THREE.EXRLoader: unsupported type: ",ps);break}return Mi.bytesPerLine=Mi.width*Mi.inputSize*Mi.channels,Mi.outputChannels==4?Mi.format=Rp:Mi.format=Dk,az?Mi.colorSpace="srgb-linear":Mi.encoding=3e3,Mi}const nl=new DataView(e),vu=new Uint8Array(e),zl={value:0},jl=Oo(nl,e,zl),Il=_s(jl,nl,vu,zl,this.type),Js={value:0},Vl={R:0,G:1,B:2,A:3,Y:0};for(let zn=0;zn<Il.height/Il.scanlineBlockSize;zn++){const Ni=Co(nl,zl);Il.size=Co(nl,zl),Il.lines=Ni+Il.scanlineBlockSize>Il.height?Il.height-Ni:Il.scanlineBlockSize;const ts=Il.size<Il.lines*Il.bytesPerLine?Il.uncompress(Il):ti(Il);zl.value+=Il.size;for(let ps=0;ps<Il.scanlineBlockSize;ps++){const Mi=ps+zn*Il.scanlineBlockSize;if(Mi>=Il.height)break;for(let to=0;to<Il.channels;to++){const Dn=Vl[jl.channels[to].name];for(let ea=0;ea<Il.width;ea++){Js.value=(ps*(Il.channels*Il.width)+to*Il.width+ea)*Il.inputSize;const pa=(Il.height-1-Mi)*(Il.width*Il.outputChannels)+ea*Il.outputChannels+Dn;Il.byteArray[pa]=Il.getter(ts,Js)}}}}return{header:jl,width:Il.width,height:Il.height,data:Il.byteArray,format:Il.format,[az?"colorSpace":"encoding"]:Il[az?"colorSpace":"encoding"],type:this.type}}setDataType(e){return this.type=e,this}load(e,r,n,i){function a(o,s){az?o.colorSpace=s.colorSpace:o.encoding=s.encoding,o.minFilter=vp,o.magFilter=vp,o.generateMipmaps=!1,o.flipY=!1,r&&r(o,s)}return super.load(e,a,n,i)}}const XPe=new xg,nq=new oi;class o1e extends $ye{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type="LineSegmentsGeometry";const e=[-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],r=[-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],n=[0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5];this.setIndex(n),this.setAttribute("position",new Dc(e,3)),this.setAttribute("uv",new Dc(r,2))}applyMatrix4(e){const r=this.attributes.instanceStart,n=this.attributes.instanceEnd;return r!==void 0&&(r.applyMatrix4(e),n.applyMatrix4(e),r.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}setPositions(e){let r;e instanceof Float32Array?r=e:Array.isArray(e)&&(r=new Float32Array(e));const n=new CW(r,6,1);return this.setAttribute("instanceStart",new rE(n,3,0)),this.setAttribute("instanceEnd",new rE(n,3,3)),this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e,r=3){let n;e instanceof Float32Array?n=e:Array.isArray(e)&&(n=new Float32Array(e));const i=new CW(n,r*2,1);return this.setAttribute("instanceColorStart",new rE(i,r,0)),this.setAttribute("instanceColorEnd",new rE(i,r,r)),this}fromWireframeGeometry(e){return this.setPositions(e.attributes.position.array),this}fromEdgesGeometry(e){return this.setPositions(e.attributes.position.array),this}fromMesh(e){return this.fromWireframeGeometry(new zye(e.geometry)),this}fromLineSegments(e){const r=e.geometry;return this.setPositions(r.attributes.position.array),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new xg);const e=this.attributes.instanceStart,r=this.attributes.instanceEnd;e!==void 0&&r!==void 0&&(this.boundingBox.setFromBufferAttribute(e),XPe.setFromBufferAttribute(r),this.boundingBox.union(XPe))}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Mb),this.boundingBox===null&&this.computeBoundingBox();const e=this.attributes.instanceStart,r=this.attributes.instanceEnd;if(e!==void 0&&r!==void 0){const n=this.boundingSphere.center;this.boundingBox.getCenter(n);let i=0;for(let a=0,o=e.count;a<o;a++)nq.fromBufferAttribute(e,a),i=Math.max(i,n.distanceToSquared(nq)),nq.fromBufferAttribute(r,a),i=Math.max(i,n.distanceToSquared(nq));this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.",this)}}toJSON(){}applyMatrix(e){return console.warn("THREE.LineSegmentsGeometry: applyMatrix() has been renamed to applyMatrix4()."),this.applyMatrix4(e)}}class TYe extends o1e{constructor(){super(),this.isLineGeometry=!0,this.type="LineGeometry"}setPositions(e){const r=e.length-3,n=new Float32Array(2*r);for(let i=0;i<r;i+=3)n[2*i]=e[i],n[2*i+1]=e[i+1],n[2*i+2]=e[i+2],n[2*i+3]=e[i+3],n[2*i+4]=e[i+4],n[2*i+5]=e[i+5];return super.setPositions(n),this}setColors(e,r=3){const n=e.length-r,i=new Float32Array(2*n);if(r===3)for(let a=0;a<n;a+=r)i[2*a]=e[a],i[2*a+1]=e[a+1],i[2*a+2]=e[a+2],i[2*a+3]=e[a+3],i[2*a+4]=e[a+4],i[2*a+5]=e[a+5];else for(let a=0;a<n;a+=r)i[2*a]=e[a],i[2*a+1]=e[a+1],i[2*a+2]=e[a+2],i[2*a+3]=e[a+3],i[2*a+4]=e[a+4],i[2*a+5]=e[a+5],i[2*a+6]=e[a+6],i[2*a+7]=e[a+7];return super.setColors(i,r),this}fromLine(e){const r=e.geometry;return this.setPositions(r.attributes.position.array),this}}class s1e extends eb{constructor(e){super({type:"LineMaterial",uniforms:wW.clone(wW.merge([gc.common,gc.fog,{worldUnits:{value:1},linewidth:{value:1},resolution:{value:new sl(1,1)},dashOffset:{value:0},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1}}])),vertexShader:`
				#include <common>
				#include <fog_pars_vertex>
				#include <logdepthbuf_pars_vertex>
				#include <clipping_planes_pars_vertex>

				uniform float linewidth;
				uniform vec2 resolution;

				attribute vec3 instanceStart;
				attribute vec3 instanceEnd;

				#ifdef USE_COLOR
					#ifdef USE_LINE_COLOR_ALPHA
						varying vec4 vLineColor;
						attribute vec4 instanceColorStart;
						attribute vec4 instanceColorEnd;
					#else
						varying vec3 vLineColor;
						attribute vec3 instanceColorStart;
						attribute vec3 instanceColorEnd;
					#endif
				#endif

				#ifdef WORLD_UNITS

					varying vec4 worldPos;
					varying vec3 worldStart;
					varying vec3 worldEnd;

					#ifdef USE_DASH

						varying vec2 vUv;

					#endif

				#else

					varying vec2 vUv;

				#endif

				#ifdef USE_DASH

					uniform float dashScale;
					attribute float instanceDistanceStart;
					attribute float instanceDistanceEnd;
					varying float vLineDistance;

				#endif

				void trimSegment( const in vec4 start, inout vec4 end ) {

					// trim end segment so it terminates between the camera plane and the near plane

					// conservative estimate of the near plane
					float a = projectionMatrix[ 2 ][ 2 ]; // 3nd entry in 3th column
					float b = projectionMatrix[ 3 ][ 2 ]; // 3nd entry in 4th column
					float nearEstimate = - 0.5 * b / a;

					float alpha = ( nearEstimate - start.z ) / ( end.z - start.z );

					end.xyz = mix( start.xyz, end.xyz, alpha );

				}

				void main() {

					#ifdef USE_COLOR

						vLineColor = ( position.y < 0.5 ) ? instanceColorStart : instanceColorEnd;

					#endif

					#ifdef USE_DASH

						vLineDistance = ( position.y < 0.5 ) ? dashScale * instanceDistanceStart : dashScale * instanceDistanceEnd;
						vUv = uv;

					#endif

					float aspect = resolution.x / resolution.y;

					// camera space
					vec4 start = modelViewMatrix * vec4( instanceStart, 1.0 );
					vec4 end = modelViewMatrix * vec4( instanceEnd, 1.0 );

					#ifdef WORLD_UNITS

						worldStart = start.xyz;
						worldEnd = end.xyz;

					#else

						vUv = uv;

					#endif

					// special case for perspective projection, and segments that terminate either in, or behind, the camera plane
					// clearly the gpu firmware has a way of addressing this issue when projecting into ndc space
					// but we need to perform ndc-space calculations in the shader, so we must address this issue directly
					// perhaps there is a more elegant solution -- WestLangley

					bool perspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 ); // 4th entry in the 3rd column

					if ( perspective ) {

						if ( start.z < 0.0 && end.z >= 0.0 ) {

							trimSegment( start, end );

						} else if ( end.z < 0.0 && start.z >= 0.0 ) {

							trimSegment( end, start );

						}

					}

					// clip space
					vec4 clipStart = projectionMatrix * start;
					vec4 clipEnd = projectionMatrix * end;

					// ndc space
					vec3 ndcStart = clipStart.xyz / clipStart.w;
					vec3 ndcEnd = clipEnd.xyz / clipEnd.w;

					// direction
					vec2 dir = ndcEnd.xy - ndcStart.xy;

					// account for clip-space aspect ratio
					dir.x *= aspect;
					dir = normalize( dir );

					#ifdef WORLD_UNITS

						// get the offset direction as perpendicular to the view vector
						vec3 worldDir = normalize( end.xyz - start.xyz );
						vec3 offset;
						if ( position.y < 0.5 ) {

							offset = normalize( cross( start.xyz, worldDir ) );

						} else {

							offset = normalize( cross( end.xyz, worldDir ) );

						}

						// sign flip
						if ( position.x < 0.0 ) offset *= - 1.0;

						float forwardOffset = dot( worldDir, vec3( 0.0, 0.0, 1.0 ) );

						// don't extend the line if we're rendering dashes because we
						// won't be rendering the endcaps
						#ifndef USE_DASH

							// extend the line bounds to encompass  endcaps
							start.xyz += - worldDir * linewidth * 0.5;
							end.xyz += worldDir * linewidth * 0.5;

							// shift the position of the quad so it hugs the forward edge of the line
							offset.xy -= dir * forwardOffset;
							offset.z += 0.5;

						#endif

						// endcaps
						if ( position.y > 1.0 || position.y < 0.0 ) {

							offset.xy += dir * 2.0 * forwardOffset;

						}

						// adjust for linewidth
						offset *= linewidth * 0.5;

						// set the world position
						worldPos = ( position.y < 0.5 ) ? start : end;
						worldPos.xyz += offset;

						// project the worldpos
						vec4 clip = projectionMatrix * worldPos;

						// shift the depth of the projected points so the line
						// segments overlap neatly
						vec3 clipPose = ( position.y < 0.5 ) ? ndcStart : ndcEnd;
						clip.z = clipPose.z * clip.w;

					#else

						vec2 offset = vec2( dir.y, - dir.x );
						// undo aspect ratio adjustment
						dir.x /= aspect;
						offset.x /= aspect;

						// sign flip
						if ( position.x < 0.0 ) offset *= - 1.0;

						// endcaps
						if ( position.y < 0.0 ) {

							offset += - dir;

						} else if ( position.y > 1.0 ) {

							offset += dir;

						}

						// adjust for linewidth
						offset *= linewidth;

						// adjust for clip-space to screen-space conversion // maybe resolution should be based on viewport ...
						offset /= resolution.y;

						// select end
						vec4 clip = ( position.y < 0.5 ) ? clipStart : clipEnd;

						// back to clip space
						offset *= clip.w;

						clip.xy += offset;

					#endif

					gl_Position = clip;

					vec4 mvPosition = ( position.y < 0.5 ) ? start : end; // this is an approximation

					#include <logdepthbuf_vertex>
					#include <clipping_planes_vertex>
					#include <fog_vertex>

				}
			`,fragmentShader:`
				uniform vec3 diffuse;
				uniform float opacity;
				uniform float linewidth;

				#ifdef USE_DASH

					uniform float dashOffset;
					uniform float dashSize;
					uniform float gapSize;

				#endif

				varying float vLineDistance;

				#ifdef WORLD_UNITS

					varying vec4 worldPos;
					varying vec3 worldStart;
					varying vec3 worldEnd;

					#ifdef USE_DASH

						varying vec2 vUv;

					#endif

				#else

					varying vec2 vUv;

				#endif

				#include <common>
				#include <fog_pars_fragment>
				#include <logdepthbuf_pars_fragment>
				#include <clipping_planes_pars_fragment>

				#ifdef USE_COLOR
					#ifdef USE_LINE_COLOR_ALPHA
						varying vec4 vLineColor;
					#else
						varying vec3 vLineColor;
					#endif
				#endif

				vec2 closestLineToLine(vec3 p1, vec3 p2, vec3 p3, vec3 p4) {

					float mua;
					float mub;

					vec3 p13 = p1 - p3;
					vec3 p43 = p4 - p3;

					vec3 p21 = p2 - p1;

					float d1343 = dot( p13, p43 );
					float d4321 = dot( p43, p21 );
					float d1321 = dot( p13, p21 );
					float d4343 = dot( p43, p43 );
					float d2121 = dot( p21, p21 );

					float denom = d2121 * d4343 - d4321 * d4321;

					float numer = d1343 * d4321 - d1321 * d4343;

					mua = numer / denom;
					mua = clamp( mua, 0.0, 1.0 );
					mub = ( d1343 + d4321 * ( mua ) ) / d4343;
					mub = clamp( mub, 0.0, 1.0 );

					return vec2( mua, mub );

				}

				void main() {

					#include <clipping_planes_fragment>

					#ifdef USE_DASH

						if ( vUv.y < - 1.0 || vUv.y > 1.0 ) discard; // discard endcaps

						if ( mod( vLineDistance + dashOffset, dashSize + gapSize ) > dashSize ) discard; // todo - FIX

					#endif

					float alpha = opacity;

					#ifdef WORLD_UNITS

						// Find the closest points on the view ray and the line segment
						vec3 rayEnd = normalize( worldPos.xyz ) * 1e5;
						vec3 lineDir = worldEnd - worldStart;
						vec2 params = closestLineToLine( worldStart, worldEnd, vec3( 0.0, 0.0, 0.0 ), rayEnd );

						vec3 p1 = worldStart + lineDir * params.x;
						vec3 p2 = rayEnd * params.y;
						vec3 delta = p1 - p2;
						float len = length( delta );
						float norm = len / linewidth;

						#ifndef USE_DASH

							#ifdef USE_ALPHA_TO_COVERAGE

								float dnorm = fwidth( norm );
								alpha = 1.0 - smoothstep( 0.5 - dnorm, 0.5 + dnorm, norm );

							#else

								if ( norm > 0.5 ) {

									discard;

								}

							#endif

						#endif

					#else

						#ifdef USE_ALPHA_TO_COVERAGE

							// artifacts appear on some hardware if a derivative is taken within a conditional
							float a = vUv.x;
							float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;
							float len2 = a * a + b * b;
							float dlen = fwidth( len2 );

							if ( abs( vUv.y ) > 1.0 ) {

								alpha = 1.0 - smoothstep( 1.0 - dlen, 1.0 + dlen, len2 );

							}

						#else

							if ( abs( vUv.y ) > 1.0 ) {

								float a = vUv.x;
								float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;
								float len2 = a * a + b * b;

								if ( len2 > 1.0 ) discard;

							}

						#endif

					#endif

					vec4 diffuseColor = vec4( diffuse, alpha );
					#ifdef USE_COLOR
						#ifdef USE_LINE_COLOR_ALPHA
							diffuseColor *= vLineColor;
						#else
							diffuseColor.rgb *= vLineColor;
						#endif
					#endif

					#include <logdepthbuf_fragment>

					gl_FragColor = diffuseColor;

					#include <tonemapping_fragment>
					#include <${mZ>=154?"colorspace_fragment":"encodings_fragment"}>
					#include <fog_fragment>
					#include <premultiplied_alpha_fragment>

				}
			`,clipping:!0}),this.isLineMaterial=!0,this.onBeforeCompile=function(){this.transparent?this.defines.USE_LINE_COLOR_ALPHA="1":delete this.defines.USE_LINE_COLOR_ALPHA},Object.defineProperties(this,{color:{enumerable:!0,get:function(){return this.uniforms.diffuse.value},set:function(r){this.uniforms.diffuse.value=r}},worldUnits:{enumerable:!0,get:function(){return"WORLD_UNITS"in this.defines},set:function(r){r===!0?this.defines.WORLD_UNITS="":delete this.defines.WORLD_UNITS}},linewidth:{enumerable:!0,get:function(){return this.uniforms.linewidth.value},set:function(r){this.uniforms.linewidth.value=r}},dashed:{enumerable:!0,get:function(){return"USE_DASH"in this.defines},set(r){!!r!="USE_DASH"in this.defines&&(this.needsUpdate=!0),r===!0?this.defines.USE_DASH="":delete this.defines.USE_DASH}},dashScale:{enumerable:!0,get:function(){return this.uniforms.dashScale.value},set:function(r){this.uniforms.dashScale.value=r}},dashSize:{enumerable:!0,get:function(){return this.uniforms.dashSize.value},set:function(r){this.uniforms.dashSize.value=r}},dashOffset:{enumerable:!0,get:function(){return this.uniforms.dashOffset.value},set:function(r){this.uniforms.dashOffset.value=r}},gapSize:{enumerable:!0,get:function(){return this.uniforms.gapSize.value},set:function(r){this.uniforms.gapSize.value=r}},opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(r){this.uniforms.opacity.value=r}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(r){this.uniforms.resolution.value.copy(r)}},alphaToCoverage:{enumerable:!0,get:function(){return"USE_ALPHA_TO_COVERAGE"in this.defines},set:function(r){!!r!="USE_ALPHA_TO_COVERAGE"in this.defines&&(this.needsUpdate=!0),r===!0?(this.defines.USE_ALPHA_TO_COVERAGE="",this.extensions.derivatives=!0):(delete this.defines.USE_ALPHA_TO_COVERAGE,this.extensions.derivatives=!1)}}}),this.setValues(e)}}const uoe=new dh,ZPe=new oi,KPe=new oi,O_=new dh,N_=new dh,l5=new dh,coe=new oi,foe=new Rc,F_=new qC,JPe=new oi,iq=new xg,aq=new Mb,u5=new dh;let S5,vL;function QPe(t,e,r){return u5.set(0,0,-e,1).applyMatrix4(t.projectionMatrix),u5.multiplyScalar(1/u5.w),u5.x=vL/r.width,u5.y=vL/r.height,u5.applyMatrix4(t.projectionMatrixInverse),u5.multiplyScalar(1/u5.w),Math.abs(Math.max(u5.x,u5.y))}function jnr(t,e){const r=t.matrixWorld,n=t.geometry,i=n.attributes.instanceStart,a=n.attributes.instanceEnd,o=Math.min(n.instanceCount,i.count);for(let s=0,d=o;s<d;s++){F_.start.fromBufferAttribute(i,s),F_.end.fromBufferAttribute(a,s),F_.applyMatrix4(r);const b=new oi,L=new oi;S5.distanceSqToSegment(F_.start,F_.end,L,b),L.distanceTo(b)<vL*.5&&e.push({point:L,pointOnLine:b,distance:S5.origin.distanceTo(L),object:t,face:null,faceIndex:s,uv:null,[gYe]:null})}}function Vnr(t,e,r){const n=e.projectionMatrix,a=t.material.resolution,o=t.matrixWorld,s=t.geometry,d=s.attributes.instanceStart,b=s.attributes.instanceEnd,L=Math.min(s.instanceCount,d.count),B=-e.near;S5.at(1,l5),l5.w=1,l5.applyMatrix4(e.matrixWorldInverse),l5.applyMatrix4(n),l5.multiplyScalar(1/l5.w),l5.x*=a.x/2,l5.y*=a.y/2,l5.z=0,coe.copy(l5),foe.multiplyMatrices(e.matrixWorldInverse,o);for(let V=0,X=L;V<X;V++){if(O_.fromBufferAttribute(d,V),N_.fromBufferAttribute(b,V),O_.w=1,N_.w=1,O_.applyMatrix4(foe),N_.applyMatrix4(foe),O_.z>B&&N_.z>B)continue;if(O_.z>B){const Se=O_.z-N_.z,Pe=(O_.z-B)/Se;O_.lerp(N_,Pe)}else if(N_.z>B){const Se=N_.z-O_.z,Pe=(N_.z-B)/Se;N_.lerp(O_,Pe)}O_.applyMatrix4(n),N_.applyMatrix4(n),O_.multiplyScalar(1/O_.w),N_.multiplyScalar(1/N_.w),O_.x*=a.x/2,O_.y*=a.y/2,N_.x*=a.x/2,N_.y*=a.y/2,F_.start.copy(O_),F_.start.z=0,F_.end.copy(N_),F_.end.z=0;const de=F_.closestPointToPointParameter(coe,!0);F_.at(de,JPe);const ae=_ye.lerp(O_.z,N_.z,de),U=ae>=-1&&ae<=1,ve=coe.distanceTo(JPe)<vL*.5;if(U&&ve){F_.start.fromBufferAttribute(d,V),F_.end.fromBufferAttribute(b,V),F_.start.applyMatrix4(o),F_.end.applyMatrix4(o);const Se=new oi,Pe=new oi;S5.distanceSqToSegment(F_.start,F_.end,Pe,Se),r.push({point:Pe,pointOnLine:Se,distance:S5.origin.distanceTo(Pe),object:t,face:null,faceIndex:V,uv:null,[gYe]:null})}}}class EYe extends hc{constructor(e=new o1e,r=new s1e({color:Math.random()*16777215})){super(e,r),this.isLineSegments2=!0,this.type="LineSegments2"}computeLineDistances(){const e=this.geometry,r=e.attributes.instanceStart,n=e.attributes.instanceEnd,i=new Float32Array(2*r.count);for(let o=0,s=0,d=r.count;o<d;o++,s+=2)ZPe.fromBufferAttribute(r,o),KPe.fromBufferAttribute(n,o),i[s]=s===0?0:i[s-1],i[s+1]=i[s]+ZPe.distanceTo(KPe);const a=new CW(i,2,1);return e.setAttribute("instanceDistanceStart",new rE(a,1,0)),e.setAttribute("instanceDistanceEnd",new rE(a,1,1)),this}raycast(e,r){const n=this.material.worldUnits,i=e.camera;i===null&&!n&&console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2 while worldUnits is set to false.');const a=e.params.Line2!==void 0&&e.params.Line2.threshold||0;S5=e.ray;const o=this.matrixWorld,s=this.geometry,d=this.material;vL=d.linewidth+a,s.boundingSphere===null&&s.computeBoundingSphere(),aq.copy(s.boundingSphere).applyMatrix4(o);let b;if(n)b=vL*.5;else{const B=Math.max(i.near,aq.distanceToPoint(S5.origin));b=QPe(i,B,d.resolution)}if(aq.radius+=b,S5.intersectsSphere(aq)===!1)return;s.boundingBox===null&&s.computeBoundingBox(),iq.copy(s.boundingBox).applyMatrix4(o);let L;if(n)L=vL*.5;else{const B=Math.max(i.near,iq.distanceToPoint(S5.origin));L=QPe(i,B,d.resolution)}iq.expandByScalar(L),S5.intersectsBox(iq)!==!1&&(n?jnr(this,r):Vnr(this,i,r))}onBeforeRender(e){const r=this.material.uniforms;r&&r.resolution&&(e.getViewport(uoe),this.material.uniforms.resolution.value.set(uoe.z,uoe.w))}}class qnr extends EYe{constructor(e=new TYe,r=new s1e({color:Math.random()*16777215})){super(e,r),this.isLine2=!0,this.type="Line2"}}const e4e=t=>Symbol.iterator in t,t4e=t=>"entries"in t,r4e=(t,e)=>{const r=t instanceof Map?t:new Map(t.entries()),n=e instanceof Map?e:new Map(e.entries());if(r.size!==n.size)return!1;for(const[i,a]of r)if(!n.has(i)||!Object.is(a,n.get(i)))return!1;return!0},Gnr=(t,e)=>{const r=t[Symbol.iterator](),n=e[Symbol.iterator]();let i=r.next(),a=n.next();for(;!i.done&&!a.done;){if(!Object.is(i.value,a.value))return!1;i=r.next(),a=n.next()}return!!i.done&&!!a.done};function $nr(t,e){return Object.is(t,e)?!0:typeof t!="object"||t===null||typeof e!="object"||e===null||Object.getPrototypeOf(t)!==Object.getPrototypeOf(e)?!1:e4e(t)&&e4e(e)?t4e(t)&&t4e(e)?r4e(t,e):Gnr(t,e):r4e({entries:()=>Object.entries(t)},{entries:()=>Object.entries(e)})}function AYe(t){const e=wi.useRef(void 0);return r=>{const n=t(r);return $nr(e.current,n)?e.current:e.current=n}}const CYe=ze.forwardRef(function({points:e,color:r=16777215,vertexColors:n,linewidth:i,lineWidth:a,segments:o,dashed:s,...d},b){var L,B;const V=Km(U=>U.size),X=ze.useMemo(()=>o?new EYe:new qnr,[o]),[ie]=ze.useState(()=>new s1e),de=(n==null||(L=n[0])==null?void 0:L.length)===4?4:3,ae=ze.useMemo(()=>{const U=o?new o1e:new TYe,ve=e.map(Se=>{const Pe=Array.isArray(Se);return Se instanceof oi||Se instanceof dh?[Se.x,Se.y,Se.z]:Se instanceof sl?[Se.x,Se.y,0]:Pe&&Se.length===3?[Se[0],Se[1],Se[2]]:Pe&&Se.length===2?[Se[0],Se[1],0]:Se});if(U.setPositions(ve.flat()),n){r=16777215;const Se=n.map(Pe=>Pe instanceof Wu?Pe.toArray():Pe);U.setColors(Se.flat(),de)}return U},[e,o,n,de]);return ze.useLayoutEffect(()=>{X.computeLineDistances()},[e,X]),ze.useLayoutEffect(()=>{s?ie.defines.USE_DASH="":delete ie.defines.USE_DASH,ie.needsUpdate=!0},[s,ie]),ze.useEffect(()=>()=>{ae.dispose(),ie.dispose()},[ae]),ze.createElement("primitive",Mr({object:X,ref:b},d),ze.createElement("primitive",{object:ae,attach:"geometry"}),ze.createElement("primitive",Mr({object:ie,attach:"material",color:r,vertexColors:!!n,resolution:[V.width,V.height],linewidth:(B=i??a)!==null&&B!==void 0?B:1,dashed:s,transparent:de===4},d)))}),Wnr=ze.forwardRef(({makeDefault:t,camera:e,regress:r,domElement:n,enableDamping:i=!0,keyEvents:a=!1,onChange:o,onStart:s,onEnd:d,...b},L)=>{const B=Km(Ie=>Ie.invalidate),V=Km(Ie=>Ie.camera),X=Km(Ie=>Ie.gl),ie=Km(Ie=>Ie.events),de=Km(Ie=>Ie.setEvents),ae=Km(Ie=>Ie.set),U=Km(Ie=>Ie.get),ve=Km(Ie=>Ie.performance),Se=e||V,Pe=n||ie.connected||X.domElement,Me=ze.useMemo(()=>new Fnr(Se),[Se]);return o6(()=>{Me.enabled&&Me.update()},-1),ze.useEffect(()=>(a&&Me.connect(a===!0?Pe:a),Me.connect(Pe),()=>void Me.dispose()),[a,Pe,r,Me,B]),ze.useEffect(()=>{const Ie=Je=>{B(),r&&ve.regress(),o&&o(Je)},Ve=Je=>{s&&s(Je)},Ze=Je=>{d&&d(Je)};return Me.addEventListener("change",Ie),Me.addEventListener("start",Ve),Me.addEventListener("end",Ze),()=>{Me.removeEventListener("start",Ve),Me.removeEventListener("end",Ze),Me.removeEventListener("change",Ie)}},[o,s,d,Me,B,de]),ze.useEffect(()=>{if(t){const Ie=U().controls;return ae({controls:Me}),()=>ae({controls:Ie})}},[t,Me]),ze.createElement("primitive",Mr({ref:L,object:Me,enableDamping:i},b))}),Ynr=ze.forwardRef(({children:t,domElement:e,onChange:r,onMouseDown:n,onMouseUp:i,onObjectChange:a,object:o,makeDefault:s,camera:d,enabled:b,axis:L,mode:B,translationSnap:V,rotationSnap:X,scaleSnap:ie,space:de,size:ae,showX:U,showY:ve,showZ:Se,...Pe},Me)=>{const Ie=Km(Vt=>Vt.controls),Ve=Km(Vt=>Vt.gl),Ze=Km(Vt=>Vt.events),Je=Km(Vt=>Vt.camera),nt=Km(Vt=>Vt.invalidate),ut=Km(Vt=>Vt.get),ht=Km(Vt=>Vt.set),_t=d||Je,Dt=e||Ze.connected||Ve.domElement,qt=ze.useMemo(()=>new Inr(_t,Dt),[_t,Dt]),Lt=ze.useRef(null);ze.useLayoutEffect(()=>(o?qt.attach(o instanceof Hp?o:o.current):Lt.current instanceof Hp&&qt.attach(Lt.current),()=>void qt.detach()),[o,t,qt]),ze.useEffect(()=>{if(Ie){const Vt=Er=>Ie.enabled=!Er.value;return qt.addEventListener("dragging-changed",Vt),()=>qt.removeEventListener("dragging-changed",Vt)}},[qt,Ie]);const dr=ze.useRef(void 0),Zt=ze.useRef(void 0),Cr=ze.useRef(void 0),yt=ze.useRef(void 0);return ze.useLayoutEffect(()=>void(dr.current=r),[r]),ze.useLayoutEffect(()=>void(Zt.current=n),[n]),ze.useLayoutEffect(()=>void(Cr.current=i),[i]),ze.useLayoutEffect(()=>void(yt.current=a),[a]),ze.useEffect(()=>{const Vt=Ar=>{nt(),dr.current==null||dr.current(Ar)},Er=Ar=>Zt.current==null?void 0:Zt.current(Ar),sr=Ar=>Cr.current==null?void 0:Cr.current(Ar),or=Ar=>yt.current==null?void 0:yt.current(Ar);return qt.addEventListener("change",Vt),qt.addEventListener("mouseDown",Er),qt.addEventListener("mouseUp",sr),qt.addEventListener("objectChange",or),()=>{qt.removeEventListener("change",Vt),qt.removeEventListener("mouseDown",Er),qt.removeEventListener("mouseUp",sr),qt.removeEventListener("objectChange",or)}},[nt,qt]),ze.useEffect(()=>{if(s){const Vt=ut().controls;return ht({controls:qt}),()=>ht({controls:Vt})}},[s,qt]),ze.createElement(ze.Fragment,null,ze.createElement("primitive",{ref:Me,object:qt,enabled:b,axis:L,mode:B,translationSnap:V,rotationSnap:X,scaleSnap:ie,space:de,size:ae,showX:U,showY:ve,showZ:Se}),ze.createElement("group",Mr({ref:Lt},Pe),t))}),MYe=0,Xnr=1,RYe=2,n4e=2,doe=1.25,i4e=1,$P=32,gZ=65535,Znr=Math.pow(2,-24),hoe=Symbol("SKIP_GENERATION");function kYe(t){return t.index?t.index.count:t.attributes.position.count}function _F(t){return kYe(t)/3}function IYe(t,e=ArrayBuffer){return t>65535?new Uint32Array(new e(4*t)):new Uint16Array(new e(2*t))}function Knr(t,e){if(!t.index){const r=t.attributes.position.count,n=e.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer,i=IYe(r,n);t.setIndex(new Kh(i,1));for(let a=0;a<r;a++)i[a]=a}}function PYe(t,e){const r=_F(t),n=e||t.drawRange,i=n.start/3,a=(n.start+n.count)/3,o=Math.max(0,i),s=Math.min(r,a)-o;return[{offset:Math.floor(o),count:Math.floor(s)}]}function DYe(t,e){if(!t.groups||!t.groups.length)return PYe(t,e);const r=[],n=new Set,i=e||t.drawRange,a=i.start/3,o=(i.start+i.count)/3;for(const d of t.groups){const b=d.start/3,L=(d.start+d.count)/3;n.add(Math.max(a,b)),n.add(Math.min(o,L))}const s=Array.from(n.values()).sort((d,b)=>d-b);for(let d=0;d<s.length-1;d++){const b=s[d],L=s[d+1];r.push({offset:Math.floor(b),count:Math.floor(L-b)})}return r}function Jnr(t,e){const r=_F(t),n=DYe(t,e).sort((o,s)=>o.offset-s.offset),i=n[n.length-1];i.count=Math.min(r-i.offset,i.count);let a=0;return n.forEach(({count:o})=>a+=o),r!==a}function poe(t,e,r,n,i){let a=1/0,o=1/0,s=1/0,d=-1/0,b=-1/0,L=-1/0,B=1/0,V=1/0,X=1/0,ie=-1/0,de=-1/0,ae=-1/0;for(let U=e*6,ve=(e+r)*6;U<ve;U+=6){const Se=t[U+0],Pe=t[U+1],Me=Se-Pe,Ie=Se+Pe;Me<a&&(a=Me),Ie>d&&(d=Ie),Se<B&&(B=Se),Se>ie&&(ie=Se);const Ve=t[U+2],Ze=t[U+3],Je=Ve-Ze,nt=Ve+Ze;Je<o&&(o=Je),nt>b&&(b=nt),Ve<V&&(V=Ve),Ve>de&&(de=Ve);const ut=t[U+4],ht=t[U+5],_t=ut-ht,Dt=ut+ht;_t<s&&(s=_t),Dt>L&&(L=Dt),ut<X&&(X=ut),ut>ae&&(ae=ut)}n[0]=a,n[1]=o,n[2]=s,n[3]=d,n[4]=b,n[5]=L,i[0]=B,i[1]=V,i[2]=X,i[3]=ie,i[4]=de,i[5]=ae}function Qnr(t,e=null,r=null,n=null){const i=t.attributes.position,a=t.index?t.index.array:null,o=_F(t),s=i.normalized;let d;e===null?(d=new Float32Array(o*6),r=0,n=o):(d=e,r=r||0,n=n||o);const b=i.array,L=i.offset||0;let B=3;i.isInterleavedBufferAttribute&&(B=i.data.stride);const V=["getX","getY","getZ"];for(let X=r;X<r+n;X++){const ie=X*3,de=X*6;let ae=ie+0,U=ie+1,ve=ie+2;a&&(ae=a[ae],U=a[U],ve=a[ve]),s||(ae=ae*B+L,U=U*B+L,ve=ve*B+L);for(let Se=0;Se<3;Se++){let Pe,Me,Ie;s?(Pe=i[V[Se]](ae),Me=i[V[Se]](U),Ie=i[V[Se]](ve)):(Pe=b[ae+Se],Me=b[U+Se],Ie=b[ve+Se]);let Ve=Pe;Me<Ve&&(Ve=Me),Ie<Ve&&(Ve=Ie);let Ze=Pe;Me>Ze&&(Ze=Me),Ie>Ze&&(Ze=Ie);const Je=(Ze-Ve)/2,nt=Se*2;d[de+nt+0]=Ve+Je,d[de+nt+1]=Je+(Math.abs(Ve)+Je)*Znr}}return d}function m1(t,e,r){return r.min.x=e[t],r.min.y=e[t+1],r.min.z=e[t+2],r.max.x=e[t+3],r.max.y=e[t+4],r.max.z=e[t+5],r}function a4e(t){let e=-1,r=-1/0;for(let n=0;n<3;n++){const i=t[n+3]-t[n];i>r&&(r=i,e=n)}return e}function o4e(t,e){e.set(t)}function s4e(t,e,r){let n,i;for(let a=0;a<3;a++){const o=a+3;n=t[a],i=e[a],r[a]=n<i?n:i,n=t[o],i=e[o],r[o]=n>i?n:i}}function oq(t,e,r){for(let n=0;n<3;n++){const i=e[t+2*n],a=e[t+2*n+1],o=i-a,s=i+a;o<r[n]&&(r[n]=o),s>r[n+3]&&(r[n+3]=s)}}function oz(t){const e=t[3]-t[0],r=t[4]-t[1],n=t[5]-t[2];return 2*(e*r+r*n+n*e)}const pk=32,eir=(t,e)=>t.candidate-e.candidate,vP=new Array(pk).fill().map(()=>({count:0,bounds:new Float32Array(6),rightCacheBounds:new Float32Array(6),leftCacheBounds:new Float32Array(6),candidate:0})),sq=new Float32Array(6);function tir(t,e,r,n,i,a){let o=-1,s=0;if(a===MYe)o=a4e(e),o!==-1&&(s=(e[o]+e[o+3])/2);else if(a===Xnr)o=a4e(t),o!==-1&&(s=rir(r,n,i,o));else if(a===RYe){const d=oz(t);let b=doe*i;const L=n*6,B=(n+i)*6;for(let V=0;V<3;V++){const X=e[V],ae=(e[V+3]-X)/pk;if(i<pk/4){const U=[...vP];U.length=i;let ve=0;for(let Pe=L;Pe<B;Pe+=6,ve++){const Me=U[ve];Me.candidate=r[Pe+2*V],Me.count=0;const{bounds:Ie,leftCacheBounds:Ve,rightCacheBounds:Ze}=Me;for(let Je=0;Je<3;Je++)Ze[Je]=1/0,Ze[Je+3]=-1/0,Ve[Je]=1/0,Ve[Je+3]=-1/0,Ie[Je]=1/0,Ie[Je+3]=-1/0;oq(Pe,r,Ie)}U.sort(eir);let Se=i;for(let Pe=0;Pe<Se;Pe++){const Me=U[Pe];for(;Pe+1<Se&&U[Pe+1].candidate===Me.candidate;)U.splice(Pe+1,1),Se--}for(let Pe=L;Pe<B;Pe+=6){const Me=r[Pe+2*V];for(let Ie=0;Ie<Se;Ie++){const Ve=U[Ie];Me>=Ve.candidate?oq(Pe,r,Ve.rightCacheBounds):(oq(Pe,r,Ve.leftCacheBounds),Ve.count++)}}for(let Pe=0;Pe<Se;Pe++){const Me=U[Pe],Ie=Me.count,Ve=i-Me.count,Ze=Me.leftCacheBounds,Je=Me.rightCacheBounds;let nt=0;Ie!==0&&(nt=oz(Ze)/d);let ut=0;Ve!==0&&(ut=oz(Je)/d);const ht=i4e+doe*(nt*Ie+ut*Ve);ht<b&&(o=V,b=ht,s=Me.candidate)}}else{for(let Se=0;Se<pk;Se++){const Pe=vP[Se];Pe.count=0,Pe.candidate=X+ae+Se*ae;const Me=Pe.bounds;for(let Ie=0;Ie<3;Ie++)Me[Ie]=1/0,Me[Ie+3]=-1/0}for(let Se=L;Se<B;Se+=6){let Ie=~~((r[Se+2*V]-X)/ae);Ie>=pk&&(Ie=pk-1);const Ve=vP[Ie];Ve.count++,oq(Se,r,Ve.bounds)}const U=vP[pk-1];o4e(U.bounds,U.rightCacheBounds);for(let Se=pk-2;Se>=0;Se--){const Pe=vP[Se],Me=vP[Se+1];s4e(Pe.bounds,Me.rightCacheBounds,Pe.rightCacheBounds)}let ve=0;for(let Se=0;Se<pk-1;Se++){const Pe=vP[Se],Me=Pe.count,Ie=Pe.bounds,Ze=vP[Se+1].rightCacheBounds;Me!==0&&(ve===0?o4e(Ie,sq):s4e(Ie,sq,sq)),ve+=Me;let Je=0,nt=0;ve!==0&&(Je=oz(sq)/d);const ut=i-ve;ut!==0&&(nt=oz(Ze)/d);const ht=i4e+doe*(Je*ve+nt*ut);ht<b&&(o=V,b=ht,s=Pe.candidate)}}}}else console.warn(`MeshBVH: Invalid build strategy value ${a} used.`);return{axis:o,pos:s}}function rir(t,e,r,n){let i=0;for(let a=e,o=e+r;a<o;a++)i+=t[a*6+n*2];return i/r}class voe{constructor(){this.boundingData=new Float32Array(6)}}function nir(t,e,r,n,i,a){let o=n,s=n+i-1;const d=a.pos,b=a.axis*2;for(;;){for(;o<=s&&r[o*6+b]<d;)o++;for(;o<=s&&r[s*6+b]>=d;)s--;if(o<s){for(let L=0;L<3;L++){let B=e[o*3+L];e[o*3+L]=e[s*3+L],e[s*3+L]=B}for(let L=0;L<6;L++){let B=r[o*6+L];r[o*6+L]=r[s*6+L],r[s*6+L]=B}o++,s--}else return o}}function iir(t,e,r,n,i,a){let o=n,s=n+i-1;const d=a.pos,b=a.axis*2;for(;;){for(;o<=s&&r[o*6+b]<d;)o++;for(;o<=s&&r[s*6+b]>=d;)s--;if(o<s){let L=t[o];t[o]=t[s],t[s]=L;for(let B=0;B<6;B++){let V=r[o*6+B];r[o*6+B]=r[s*6+B],r[s*6+B]=V}o++,s--}else return o}}function B2(t,e){return e[t+15]===65535}function VS(t,e){return e[t+6]}function nE(t,e){return e[t+14]}function G3(t){return t+8}function iE(t,e){return e[t+6]}function l1e(t,e){return e[t+7]}let LYe,Bz,FG,OYe;const air=Math.pow(2,32);function Ype(t){return"count"in t?1:1+Ype(t.left)+Ype(t.right)}function oir(t,e,r){return LYe=new Float32Array(r),Bz=new Uint32Array(r),FG=new Uint16Array(r),OYe=new Uint8Array(r),Xpe(t,e)}function Xpe(t,e){const r=t/4,n=t/2,i="count"in e,a=e.boundingData;for(let o=0;o<6;o++)LYe[r+o]=a[o];if(i)if(e.buffer){const o=e.buffer;OYe.set(new Uint8Array(o),t);for(let s=t,d=t+o.byteLength;s<d;s+=$P){const b=s/2;B2(b,FG)||(Bz[s/4+6]+=r)}return t+o.byteLength}else{const o=e.offset,s=e.count;return Bz[r+6]=o,FG[n+14]=s,FG[n+15]=gZ,t+$P}else{const o=e.left,s=e.right,d=e.splitAxis;let b;if(b=Xpe(t+$P,o),b/4>air)throw new Error("MeshBVH: Cannot store child pointer greater than 32 bits.");return Bz[r+6]=b/4,b=Xpe(b,s),Bz[r+7]=d,b}}function sir(t,e){const r=(t.index?t.index.count:t.attributes.position.count)/3,n=r>2**16,i=n?4:2,a=e?new SharedArrayBuffer(r*i):new ArrayBuffer(r*i),o=n?new Uint32Array(a):new Uint16Array(a);for(let s=0,d=o.length;s<d;s++)o[s]=s;return o}function lir(t,e,r,n,i){const{maxDepth:a,verbose:o,maxLeafTris:s,strategy:d,onProgress:b,indirect:L}=i,B=t._indirectBuffer,V=t.geometry,X=V.index?V.index.array:null,ie=L?iir:nir,de=_F(V),ae=new Float32Array(6);let U=!1;const ve=new voe;return poe(e,r,n,ve.boundingData,ae),Pe(ve,r,n,ae),ve;function Se(Me){b&&b(Me/de)}function Pe(Me,Ie,Ve,Ze=null,Je=0){if(!U&&Je>=a&&(U=!0,o&&(console.warn(`MeshBVH: Max depth of ${a} reached when generating BVH. Consider increasing maxDepth.`),console.warn(V))),Ve<=s||Je>=a)return Se(Ie+Ve),Me.offset=Ie,Me.count=Ve,Me;const nt=tir(Me.boundingData,Ze,e,Ie,Ve,d);if(nt.axis===-1)return Se(Ie+Ve),Me.offset=Ie,Me.count=Ve,Me;const ut=ie(B,X,e,Ie,Ve,nt);if(ut===Ie||ut===Ie+Ve)Se(Ie+Ve),Me.offset=Ie,Me.count=Ve;else{Me.splitAxis=nt.axis;const ht=new voe,_t=Ie,Dt=ut-Ie;Me.left=ht,poe(e,_t,Dt,ht.boundingData,ae),Pe(ht,_t,Dt,ae,Je+1);const qt=new voe,Lt=ut,dr=Ve-Dt;Me.right=qt,poe(e,Lt,dr,qt.boundingData,ae),Pe(qt,Lt,dr,ae,Je+1)}return Me}}function uir(t,e){const r=t.geometry;e.indirect&&(t._indirectBuffer=sir(r,e.useSharedArrayBuffer),Jnr(r,e.range)&&!e.verbose&&console.warn('MeshBVH: Provided geometry contains groups or a range that do not fully span the vertex contents while using the "indirect" option. BVH may incorrectly report intersections on unrendered portions of the geometry.')),t._indirectBuffer||Knr(r,e);const n=e.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer,i=Qnr(r),a=e.indirect?PYe(r,e.range):DYe(r,e.range);t._roots=a.map(o=>{const s=lir(t,i,o.offset,o.count,e),d=Ype(s),b=new n($P*d);return oir(0,s,b),b})}class Lk{constructor(){this.min=1/0,this.max=-1/0}setFromPointsField(e,r){let n=1/0,i=-1/0;for(let a=0,o=e.length;a<o;a++){const d=e[a][r];n=d<n?d:n,i=d>i?d:i}this.min=n,this.max=i}setFromPoints(e,r){let n=1/0,i=-1/0;for(let a=0,o=r.length;a<o;a++){const s=r[a],d=e.dot(s);n=d<n?d:n,i=d>i?d:i}this.min=n,this.max=i}isSeparated(e){return this.min>e.max||e.min>this.max}}Lk.prototype.setFromBox=(function(){const t=new oi;return function(r,n){const i=n.min,a=n.max;let o=1/0,s=-1/0;for(let d=0;d<=1;d++)for(let b=0;b<=1;b++)for(let L=0;L<=1;L++){t.x=i.x*d+a.x*(1-d),t.y=i.y*b+a.y*(1-b),t.z=i.z*L+a.z*(1-L);const B=r.dot(t);o=Math.min(B,o),s=Math.max(B,s)}this.min=o,this.max=s}})();const cir=(function(){const t=new oi,e=new oi,r=new oi;return function(i,a,o){const s=i.start,d=t,b=a.start,L=e;r.subVectors(s,b),t.subVectors(i.end,i.start),e.subVectors(a.end,a.start);const B=r.dot(L),V=L.dot(d),X=L.dot(L),ie=r.dot(d),ae=d.dot(d)*X-V*V;let U,ve;ae!==0?U=(B*V-ie*X)/ae:U=0,ve=(B+U*V)/X,o.x=U,o.y=ve}})(),u1e=(function(){const t=new sl,e=new oi,r=new oi;return function(i,a,o,s){cir(i,a,t);let d=t.x,b=t.y;if(d>=0&&d<=1&&b>=0&&b<=1){i.at(d,o),a.at(b,s);return}else if(d>=0&&d<=1){b<0?a.at(0,s):a.at(1,s),i.closestPointToPoint(s,!0,o);return}else if(b>=0&&b<=1){d<0?i.at(0,o):i.at(1,o),a.closestPointToPoint(o,!0,s);return}else{let L;d<0?L=i.start:L=i.end;let B;b<0?B=a.start:B=a.end;const V=e,X=r;if(i.closestPointToPoint(B,!0,e),a.closestPointToPoint(L,!0,r),V.distanceToSquared(B)<=X.distanceToSquared(L)){o.copy(V),s.copy(B);return}else{o.copy(L),s.copy(X);return}}}})(),fir=(function(){const t=new oi,e=new oi,r=new PC,n=new qC;return function(a,o){const{radius:s,center:d}=a,{a:b,b:L,c:B}=o;if(n.start=b,n.end=L,n.closestPointToPoint(d,!0,t).distanceTo(d)<=s||(n.start=b,n.end=B,n.closestPointToPoint(d,!0,t).distanceTo(d)<=s)||(n.start=L,n.end=B,n.closestPointToPoint(d,!0,t).distanceTo(d)<=s))return!0;const de=o.getPlane(r);if(Math.abs(de.distanceToPoint(d))<=s){const U=de.projectPoint(d,e);if(o.containsPoint(U))return!0}return!1}})(),dir=1e-15;function moe(t){return Math.abs(t)<dir}class JC extends Tb{constructor(...e){super(...e),this.isExtendedTriangle=!0,this.satAxes=new Array(4).fill().map(()=>new oi),this.satBounds=new Array(4).fill().map(()=>new Lk),this.points=[this.a,this.b,this.c],this.sphere=new Mb,this.plane=new PC,this.needsUpdate=!0}intersectsSphere(e){return fir(e,this)}update(){const e=this.a,r=this.b,n=this.c,i=this.points,a=this.satAxes,o=this.satBounds,s=a[0],d=o[0];this.getNormal(s),d.setFromPoints(s,i);const b=a[1],L=o[1];b.subVectors(e,r),L.setFromPoints(b,i);const B=a[2],V=o[2];B.subVectors(r,n),V.setFromPoints(B,i);const X=a[3],ie=o[3];X.subVectors(n,e),ie.setFromPoints(X,i),this.sphere.setFromPoints(this.points),this.plane.setFromNormalAndCoplanarPoint(s,e),this.needsUpdate=!1}}JC.prototype.closestPointToSegment=(function(){const t=new oi,e=new oi,r=new qC;return function(i,a=null,o=null){const{start:s,end:d}=i,b=this.points;let L,B=1/0;for(let V=0;V<3;V++){const X=(V+1)%3;r.start.copy(b[V]),r.end.copy(b[X]),u1e(r,i,t,e),L=t.distanceToSquared(e),L<B&&(B=L,a&&a.copy(t),o&&o.copy(e))}return this.closestPointToPoint(s,t),L=s.distanceToSquared(t),L<B&&(B=L,a&&a.copy(t),o&&o.copy(s)),this.closestPointToPoint(d,t),L=d.distanceToSquared(t),L<B&&(B=L,a&&a.copy(t),o&&o.copy(d)),Math.sqrt(B)}})();JC.prototype.intersectsTriangle=(function(){const t=new JC,e=new Array(3),r=new Array(3),n=new Lk,i=new Lk,a=new oi,o=new oi,s=new oi,d=new oi,b=new oi,L=new qC,B=new qC,V=new qC,X=new oi;function ie(de,ae,U){const ve=de.points;let Se=0,Pe=-1;for(let Me=0;Me<3;Me++){const{start:Ie,end:Ve}=L;Ie.copy(ve[Me]),Ve.copy(ve[(Me+1)%3]),L.delta(o);const Ze=moe(ae.distanceToPoint(Ie));if(moe(ae.normal.dot(o))&&Ze){U.copy(L),Se=2;break}const Je=ae.intersectLine(L,X);if(!Je&&Ze&&X.copy(Ie),(Je||Ze)&&!moe(X.distanceTo(Ve))){if(Se<=1)(Se===1?U.start:U.end).copy(X),Ze&&(Pe=Se);else if(Se>=2){(Pe===1?U.start:U.end).copy(X),Se=2;break}if(Se++,Se===2&&Pe===-1)break}}return Se}return function(ae,U=null,ve=!1){this.needsUpdate&&this.update(),ae.isExtendedTriangle?ae.needsUpdate&&ae.update():(t.copy(ae),t.update(),ae=t);const Se=this.plane,Pe=ae.plane;if(Math.abs(Se.normal.dot(Pe.normal))>1-1e-10){const Me=this.satBounds,Ie=this.satAxes;r[0]=ae.a,r[1]=ae.b,r[2]=ae.c;for(let Je=0;Je<4;Je++){const nt=Me[Je],ut=Ie[Je];if(n.setFromPoints(ut,r),nt.isSeparated(n))return!1}const Ve=ae.satBounds,Ze=ae.satAxes;e[0]=this.a,e[1]=this.b,e[2]=this.c;for(let Je=0;Je<4;Je++){const nt=Ve[Je],ut=Ze[Je];if(n.setFromPoints(ut,e),nt.isSeparated(n))return!1}for(let Je=0;Je<4;Je++){const nt=Ie[Je];for(let ut=0;ut<4;ut++){const ht=Ze[ut];if(a.crossVectors(nt,ht),n.setFromPoints(a,e),i.setFromPoints(a,r),n.isSeparated(i))return!1}}return U&&(ve||console.warn("ExtendedTriangle.intersectsTriangle: Triangles are coplanar which does not support an output edge. Setting edge to 0, 0, 0."),U.start.set(0,0,0),U.end.set(0,0,0)),!0}else{const Me=ie(this,Pe,B);if(Me===1&&ae.containsPoint(B.end))return U&&(U.start.copy(B.end),U.end.copy(B.end)),!0;if(Me!==2)return!1;const Ie=ie(ae,Se,V);if(Ie===1&&this.containsPoint(V.end))return U&&(U.start.copy(V.end),U.end.copy(V.end)),!0;if(Ie!==2)return!1;if(B.delta(s),V.delta(d),s.dot(d)<0){let _t=V.start;V.start=V.end,V.end=_t}const Ve=B.start.dot(s),Ze=B.end.dot(s),Je=V.start.dot(s),nt=V.end.dot(s),ut=Ze<Je,ht=Ve<nt;return Ve!==nt&&Je!==Ze&&ut===ht?!1:(U&&(b.subVectors(B.start,V.start),b.dot(s)>0?U.start.copy(B.start):U.start.copy(V.start),b.subVectors(B.end,V.end),b.dot(s)<0?U.end.copy(B.end):U.end.copy(V.end)),!0)}}})();JC.prototype.distanceToPoint=(function(){const t=new oi;return function(r){return this.closestPointToPoint(r,t),r.distanceTo(t)}})();JC.prototype.distanceToTriangle=(function(){const t=new oi,e=new oi,r=["a","b","c"],n=new qC,i=new qC;return function(o,s=null,d=null){const b=s||d?n:null;if(this.intersectsTriangle(o,b))return(s||d)&&(s&&b.getCenter(s),d&&b.getCenter(d)),0;let L=1/0;for(let B=0;B<3;B++){let V;const X=r[B],ie=o[X];this.closestPointToPoint(ie,t),V=ie.distanceToSquared(t),V<L&&(L=V,s&&s.copy(t),d&&d.copy(ie));const de=this[X];o.closestPointToPoint(de,t),V=de.distanceToSquared(t),V<L&&(L=V,s&&s.copy(de),d&&d.copy(t))}for(let B=0;B<3;B++){const V=r[B],X=r[(B+1)%3];n.set(this[V],this[X]);for(let ie=0;ie<3;ie++){const de=r[ie],ae=r[(ie+1)%3];i.set(o[de],o[ae]),u1e(n,i,t,e);const U=t.distanceToSquared(e);U<L&&(L=U,s&&s.copy(t),d&&d.copy(e))}}return Math.sqrt(L)}})();class Z2{constructor(e,r,n){this.isOrientedBox=!0,this.min=new oi,this.max=new oi,this.matrix=new Rc,this.invMatrix=new Rc,this.points=new Array(8).fill().map(()=>new oi),this.satAxes=new Array(3).fill().map(()=>new oi),this.satBounds=new Array(3).fill().map(()=>new Lk),this.alignedSatBounds=new Array(3).fill().map(()=>new Lk),this.needsUpdate=!1,e&&this.min.copy(e),r&&this.max.copy(r),n&&this.matrix.copy(n)}set(e,r,n){this.min.copy(e),this.max.copy(r),this.matrix.copy(n),this.needsUpdate=!0}copy(e){this.min.copy(e.min),this.max.copy(e.max),this.matrix.copy(e.matrix),this.needsUpdate=!0}}Z2.prototype.update=(function(){return function(){const e=this.matrix,r=this.min,n=this.max,i=this.points;for(let b=0;b<=1;b++)for(let L=0;L<=1;L++)for(let B=0;B<=1;B++){const V=1*b|2*L|4*B,X=i[V];X.x=b?n.x:r.x,X.y=L?n.y:r.y,X.z=B?n.z:r.z,X.applyMatrix4(e)}const a=this.satBounds,o=this.satAxes,s=i[0];for(let b=0;b<3;b++){const L=o[b],B=a[b],V=1<<b,X=i[V];L.subVectors(s,X),B.setFromPoints(L,i)}const d=this.alignedSatBounds;d[0].setFromPointsField(i,"x"),d[1].setFromPointsField(i,"y"),d[2].setFromPointsField(i,"z"),this.invMatrix.copy(this.matrix).invert(),this.needsUpdate=!1}})();Z2.prototype.intersectsBox=(function(){const t=new Lk;return function(r){this.needsUpdate&&this.update();const n=r.min,i=r.max,a=this.satBounds,o=this.satAxes,s=this.alignedSatBounds;if(t.min=n.x,t.max=i.x,s[0].isSeparated(t)||(t.min=n.y,t.max=i.y,s[1].isSeparated(t))||(t.min=n.z,t.max=i.z,s[2].isSeparated(t)))return!1;for(let d=0;d<3;d++){const b=o[d],L=a[d];if(t.setFromBox(b,r),L.isSeparated(t))return!1}return!0}})();Z2.prototype.intersectsTriangle=(function(){const t=new JC,e=new Array(3),r=new Lk,n=new Lk,i=new oi;return function(o){this.needsUpdate&&this.update(),o.isExtendedTriangle?o.needsUpdate&&o.update():(t.copy(o),t.update(),o=t);const s=this.satBounds,d=this.satAxes;e[0]=o.a,e[1]=o.b,e[2]=o.c;for(let V=0;V<3;V++){const X=s[V],ie=d[V];if(r.setFromPoints(ie,e),X.isSeparated(r))return!1}const b=o.satBounds,L=o.satAxes,B=this.points;for(let V=0;V<3;V++){const X=b[V],ie=L[V];if(r.setFromPoints(ie,B),X.isSeparated(r))return!1}for(let V=0;V<3;V++){const X=d[V];for(let ie=0;ie<4;ie++){const de=L[ie];if(i.crossVectors(X,de),r.setFromPoints(i,e),n.setFromPoints(i,B),r.isSeparated(n))return!1}}return!0}})();Z2.prototype.closestPointToPoint=(function(){return function(e,r){return this.needsUpdate&&this.update(),r.copy(e).applyMatrix4(this.invMatrix).clamp(this.min,this.max).applyMatrix4(this.matrix),r}})();Z2.prototype.distanceToPoint=(function(){const t=new oi;return function(r){return this.closestPointToPoint(r,t),r.distanceTo(t)}})();Z2.prototype.distanceToBox=(function(){const t=["x","y","z"],e=new Array(12).fill().map(()=>new qC),r=new Array(12).fill().map(()=>new qC),n=new oi,i=new oi;return function(o,s=0,d=null,b=null){if(this.needsUpdate&&this.update(),this.intersectsBox(o))return(d||b)&&(o.getCenter(i),this.closestPointToPoint(i,n),o.closestPointToPoint(n,i),d&&d.copy(n),b&&b.copy(i)),0;const L=s*s,B=o.min,V=o.max,X=this.points;let ie=1/0;for(let ae=0;ae<8;ae++){const U=X[ae];i.copy(U).clamp(B,V);const ve=U.distanceToSquared(i);if(ve<ie&&(ie=ve,d&&d.copy(U),b&&b.copy(i),ve<L))return Math.sqrt(ve)}let de=0;for(let ae=0;ae<3;ae++)for(let U=0;U<=1;U++)for(let ve=0;ve<=1;ve++){const Se=(ae+1)%3,Pe=(ae+2)%3,Me=U<<Se|ve<<Pe,Ie=1<<ae|U<<Se|ve<<Pe,Ve=X[Me],Ze=X[Ie];e[de].set(Ve,Ze);const nt=t[ae],ut=t[Se],ht=t[Pe],_t=r[de],Dt=_t.start,qt=_t.end;Dt[nt]=B[nt],Dt[ut]=U?B[ut]:V[ut],Dt[ht]=ve?B[ht]:V[ut],qt[nt]=V[nt],qt[ut]=U?B[ut]:V[ut],qt[ht]=ve?B[ht]:V[ut],de++}for(let ae=0;ae<=1;ae++)for(let U=0;U<=1;U++)for(let ve=0;ve<=1;ve++){i.x=ae?V.x:B.x,i.y=U?V.y:B.y,i.z=ve?V.z:B.z,this.closestPointToPoint(i,n);const Se=i.distanceToSquared(n);if(Se<ie&&(ie=Se,d&&d.copy(n),b&&b.copy(i),Se<L))return Math.sqrt(Se)}for(let ae=0;ae<12;ae++){const U=e[ae];for(let ve=0;ve<12;ve++){const Se=r[ve];u1e(U,Se,n,i);const Pe=n.distanceToSquared(i);if(Pe<ie&&(ie=Pe,d&&d.copy(n),b&&b.copy(i),Pe<L))return Math.sqrt(Pe)}}return Math.sqrt(ie)}})();class c1e{constructor(e){this._getNewPrimitive=e,this._primitives=[]}getPrimitive(){const e=this._primitives;return e.length===0?this._getNewPrimitive():e.pop()}releasePrimitive(e){this._primitives.push(e)}}class hir extends c1e{constructor(){super(()=>new JC)}}const $3=new hir;class pir{constructor(){this.float32Array=null,this.uint16Array=null,this.uint32Array=null;const e=[];let r=null;this.setBuffer=n=>{r&&e.push(r),r=n,this.float32Array=new Float32Array(n),this.uint16Array=new Uint16Array(n),this.uint32Array=new Uint32Array(n)},this.clearBuffer=()=>{r=null,this.float32Array=null,this.uint16Array=null,this.uint32Array=null,e.length!==0&&this.setBuffer(e.pop())}}}const N0=new pir;let FP,RN;const XO=[],lq=new c1e(()=>new xg);function vir(t,e,r,n,i,a){FP=lq.getPrimitive(),RN=lq.getPrimitive(),XO.push(FP,RN),N0.setBuffer(t._roots[e]);const o=Zpe(0,t.geometry,r,n,i,a);N0.clearBuffer(),lq.releasePrimitive(FP),lq.releasePrimitive(RN),XO.pop(),XO.pop();const s=XO.length;return s>0&&(RN=XO[s-1],FP=XO[s-2]),o}function Zpe(t,e,r,n,i=null,a=0,o=0){const{float32Array:s,uint16Array:d,uint32Array:b}=N0;let L=t*2;if(B2(L,d)){const ie=VS(t,b),de=nE(L,d);return m1(t,s,FP),n(ie,de,!1,o,a+t,FP)}else{let ht=function(Dt){const{uint16Array:qt,uint32Array:Lt}=N0;let dr=Dt*2;for(;!B2(dr,qt);)Dt=G3(Dt),dr=Dt*2;return VS(Dt,Lt)},_t=function(Dt){const{uint16Array:qt,uint32Array:Lt}=N0;let dr=Dt*2;for(;!B2(dr,qt);)Dt=iE(Dt,Lt),dr=Dt*2;return VS(Dt,Lt)+nE(dr,qt)};var V=ht,X=_t;const ie=G3(t),de=iE(t,b);let ae=ie,U=de,ve,Se,Pe,Me;if(i&&(Pe=FP,Me=RN,m1(ae,s,Pe),m1(U,s,Me),ve=i(Pe),Se=i(Me),Se<ve)){ae=de,U=ie;const Dt=ve;ve=Se,Se=Dt,Pe=Me}Pe||(Pe=FP,m1(ae,s,Pe));const Ie=B2(ae*2,d),Ve=r(Pe,Ie,ve,o+1,a+ae);let Ze;if(Ve===n4e){const Dt=ht(ae),Lt=_t(ae)-Dt;Ze=n(Dt,Lt,!0,o+1,a+ae,Pe)}else Ze=Ve&&Zpe(ae,e,r,n,i,a,o+1);if(Ze)return!0;Me=RN,m1(U,s,Me);const Je=B2(U*2,d),nt=r(Me,Je,Se,o+1,a+U);let ut;if(nt===n4e){const Dt=ht(U),Lt=_t(U)-Dt;ut=n(Dt,Lt,!0,o+1,a+U,Me)}else ut=nt&&Zpe(U,e,r,n,i,a,o+1);return!!ut}}const sz=new oi,goe=new oi;function mir(t,e,r={},n=0,i=1/0){const a=n*n,o=i*i;let s=1/0,d=null;if(t.shapecast({boundsTraverseOrder:L=>(sz.copy(e).clamp(L.min,L.max),sz.distanceToSquared(e)),intersectsBounds:(L,B,V)=>V<s&&V<o,intersectsTriangle:(L,B)=>{L.closestPointToPoint(e,sz);const V=e.distanceToSquared(sz);return V<s&&(goe.copy(sz),s=V,d=B),V<a}}),s===1/0)return null;const b=Math.sqrt(s);return r.point?r.point.copy(goe):r.point=goe.clone(),r.distance=b,r.faceIndex=d,r}const gir=parseInt(dF)>=169,RD=new oi,kD=new oi,ID=new oi,uq=new sl,cq=new sl,fq=new sl,l4e=new oi,u4e=new oi,c4e=new oi,lz=new oi;function yir(t,e,r,n,i,a,o,s){let d;if(a===x1?d=t.intersectTriangle(n,r,e,!0,i):d=t.intersectTriangle(e,r,n,a!==Zx,i),d===null)return null;const b=t.origin.distanceTo(i);return b<o||b>s?null:{distance:b,point:i.clone()}}function bir(t,e,r,n,i,a,o,s,d,b,L){RD.fromBufferAttribute(e,a),kD.fromBufferAttribute(e,o),ID.fromBufferAttribute(e,s);const B=yir(t,RD,kD,ID,lz,d,b,L);if(B){const V=new oi;Tb.getBarycoord(lz,RD,kD,ID,V),n&&(uq.fromBufferAttribute(n,a),cq.fromBufferAttribute(n,o),fq.fromBufferAttribute(n,s),B.uv=Tb.getInterpolation(lz,RD,kD,ID,uq,cq,fq,new sl)),i&&(uq.fromBufferAttribute(i,a),cq.fromBufferAttribute(i,o),fq.fromBufferAttribute(i,s),B.uv1=Tb.getInterpolation(lz,RD,kD,ID,uq,cq,fq,new sl)),r&&(l4e.fromBufferAttribute(r,a),u4e.fromBufferAttribute(r,o),c4e.fromBufferAttribute(r,s),B.normal=Tb.getInterpolation(lz,RD,kD,ID,l4e,u4e,c4e,new oi),B.normal.dot(t.direction)>0&&B.normal.multiplyScalar(-1));const X={a,b:o,c:s,normal:new oi,materialIndex:0};Tb.getNormal(RD,kD,ID,X.normal),B.face=X,B.faceIndex=a,gir&&(B.barycoord=V)}return B}function yZ(t,e,r,n,i,a,o){const s=n*3;let d=s+0,b=s+1,L=s+2;const B=t.index;t.index&&(d=B.getX(d),b=B.getX(b),L=B.getX(L));const{position:V,normal:X,uv:ie,uv1:de}=t.attributes,ae=bir(r,V,X,ie,de,d,b,L,e,a,o);return ae?(ae.faceIndex=n,i&&i.push(ae),ae):null}function Cb(t,e,r,n){const i=t.a,a=t.b,o=t.c;let s=e,d=e+1,b=e+2;r&&(s=r.getX(s),d=r.getX(d),b=r.getX(b)),i.x=n.getX(s),i.y=n.getY(s),i.z=n.getZ(s),a.x=n.getX(d),a.y=n.getY(d),a.z=n.getZ(d),o.x=n.getX(b),o.y=n.getY(b),o.z=n.getZ(b)}function xir(t,e,r,n,i,a,o,s){const{geometry:d,_indirectBuffer:b}=t;for(let L=n,B=n+i;L<B;L++)yZ(d,e,r,L,a,o,s)}function _ir(t,e,r,n,i,a,o){const{geometry:s,_indirectBuffer:d}=t;let b=1/0,L=null;for(let B=n,V=n+i;B<V;B++){let X;X=yZ(s,e,r,B,null,a,o),X&&X.distance<b&&(L=X,b=X.distance)}return L}function wir(t,e,r,n,i,a,o){const{geometry:s}=r,{index:d}=s,b=s.attributes.position;for(let L=t,B=e+t;L<B;L++){let V;if(V=L,Cb(o,V*3,d,b),o.needsUpdate=!0,n(o,V,i,a))return!0}return!1}function Sir(t,e=null){e&&Array.isArray(e)&&(e=new Set(e));const r=t.geometry,n=r.index?r.index.array:null,i=r.attributes.position;let a,o,s,d,b=0;const L=t._roots;for(let V=0,X=L.length;V<X;V++)a=L[V],o=new Uint32Array(a),s=new Uint16Array(a),d=new Float32Array(a),B(0,b),b+=a.byteLength;function B(V,X,ie=!1){const de=V*2;if(s[de+15]===gZ){const U=o[V+6],ve=s[de+14];let Se=1/0,Pe=1/0,Me=1/0,Ie=-1/0,Ve=-1/0,Ze=-1/0;for(let Je=3*U,nt=3*(U+ve);Je<nt;Je++){let ut=n[Je];const ht=i.getX(ut),_t=i.getY(ut),Dt=i.getZ(ut);ht<Se&&(Se=ht),ht>Ie&&(Ie=ht),_t<Pe&&(Pe=_t),_t>Ve&&(Ve=_t),Dt<Me&&(Me=Dt),Dt>Ze&&(Ze=Dt)}return d[V+0]!==Se||d[V+1]!==Pe||d[V+2]!==Me||d[V+3]!==Ie||d[V+4]!==Ve||d[V+5]!==Ze?(d[V+0]=Se,d[V+1]=Pe,d[V+2]=Me,d[V+3]=Ie,d[V+4]=Ve,d[V+5]=Ze,!0):!1}else{const U=V+8,ve=o[V+6],Se=U+X,Pe=ve+X;let Me=ie,Ie=!1,Ve=!1;e?Me||(Ie=e.has(Se),Ve=e.has(Pe),Me=!Ie&&!Ve):(Ie=!0,Ve=!0);const Ze=Me||Ie,Je=Me||Ve;let nt=!1;Ze&&(nt=B(U,X,Me));let ut=!1;Je&&(ut=B(ve,X,Me));const ht=nt||ut;if(ht)for(let _t=0;_t<3;_t++){const Dt=U+_t,qt=ve+_t,Lt=d[Dt],dr=d[Dt+3],Zt=d[qt],Cr=d[qt+3];d[V+_t]=Lt<Zt?Lt:Zt,d[V+_t+3]=dr>Cr?dr:Cr}return ht}}}function n4(t,e,r,n,i){let a,o,s,d,b,L;const B=1/r.direction.x,V=1/r.direction.y,X=1/r.direction.z,ie=r.origin.x,de=r.origin.y,ae=r.origin.z;let U=e[t],ve=e[t+3],Se=e[t+1],Pe=e[t+3+1],Me=e[t+2],Ie=e[t+3+2];return B>=0?(a=(U-ie)*B,o=(ve-ie)*B):(a=(ve-ie)*B,o=(U-ie)*B),V>=0?(s=(Se-de)*V,d=(Pe-de)*V):(s=(Pe-de)*V,d=(Se-de)*V),a>d||s>o||((s>a||isNaN(a))&&(a=s),(d<o||isNaN(o))&&(o=d),X>=0?(b=(Me-ae)*X,L=(Ie-ae)*X):(b=(Ie-ae)*X,L=(Me-ae)*X),a>L||b>o)?!1:((b>a||a!==a)&&(a=b),(L<o||o!==o)&&(o=L),a<=i&&o>=n)}function Tir(t,e,r,n,i,a,o,s){const{geometry:d,_indirectBuffer:b}=t;for(let L=n,B=n+i;L<B;L++){let V=b?b[L]:L;yZ(d,e,r,V,a,o,s)}}function Eir(t,e,r,n,i,a,o){const{geometry:s,_indirectBuffer:d}=t;let b=1/0,L=null;for(let B=n,V=n+i;B<V;B++){let X;X=yZ(s,e,r,d?d[B]:B,null,a,o),X&&X.distance<b&&(L=X,b=X.distance)}return L}function Air(t,e,r,n,i,a,o){const{geometry:s}=r,{index:d}=s,b=s.attributes.position;for(let L=t,B=e+t;L<B;L++){let V;if(V=r.resolveTriangleIndex(L),Cb(o,V*3,d,b),o.needsUpdate=!0,n(o,V,i,a))return!0}return!1}function Cir(t,e,r,n,i,a,o){N0.setBuffer(t._roots[e]),Kpe(0,t,r,n,i,a,o),N0.clearBuffer()}function Kpe(t,e,r,n,i,a,o){const{float32Array:s,uint16Array:d,uint32Array:b}=N0,L=t*2;if(B2(L,d)){const V=VS(t,b),X=nE(L,d);xir(e,r,n,V,X,i,a,o)}else{const V=G3(t);n4(V,s,n,a,o)&&Kpe(V,e,r,n,i,a,o);const X=iE(t,b);n4(X,s,n,a,o)&&Kpe(X,e,r,n,i,a,o)}}const Mir=["x","y","z"];function Rir(t,e,r,n,i,a){N0.setBuffer(t._roots[e]);const o=Jpe(0,t,r,n,i,a);return N0.clearBuffer(),o}function Jpe(t,e,r,n,i,a){const{float32Array:o,uint16Array:s,uint32Array:d}=N0;let b=t*2;if(B2(b,s)){const B=VS(t,d),V=nE(b,s);return _ir(e,r,n,B,V,i,a)}else{const B=l1e(t,d),V=Mir[B],ie=n.direction[V]>=0;let de,ae;ie?(de=G3(t),ae=iE(t,d)):(de=iE(t,d),ae=G3(t));const ve=n4(de,o,n,i,a)?Jpe(de,e,r,n,i,a):null;if(ve){const Me=ve.point[V];if(ie?Me<=o[ae+B]:Me>=o[ae+B+3])return ve}const Pe=n4(ae,o,n,i,a)?Jpe(ae,e,r,n,i,a):null;return ve&&Pe?ve.distance<=Pe.distance?ve:Pe:ve||Pe||null}}const dq=new xg,ZO=new JC,KO=new JC,uz=new Rc,f4e=new Z2,hq=new Z2;function kir(t,e,r,n){N0.setBuffer(t._roots[e]);const i=Qpe(0,t,r,n);return N0.clearBuffer(),i}function Qpe(t,e,r,n,i=null){const{float32Array:a,uint16Array:o,uint32Array:s}=N0;let d=t*2;if(i===null&&(r.boundingBox||r.computeBoundingBox(),f4e.set(r.boundingBox.min,r.boundingBox.max,n),i=f4e),B2(d,o)){const L=e.geometry,B=L.index,V=L.attributes.position,X=r.index,ie=r.attributes.position,de=VS(t,s),ae=nE(d,o);if(uz.copy(n).invert(),r.boundsTree)return m1(t,a,hq),hq.matrix.copy(uz),hq.needsUpdate=!0,r.boundsTree.shapecast({intersectsBounds:ve=>hq.intersectsBox(ve),intersectsTriangle:ve=>{ve.a.applyMatrix4(n),ve.b.applyMatrix4(n),ve.c.applyMatrix4(n),ve.needsUpdate=!0;for(let Se=de*3,Pe=(ae+de)*3;Se<Pe;Se+=3)if(Cb(KO,Se,B,V),KO.needsUpdate=!0,ve.intersectsTriangle(KO))return!0;return!1}});for(let U=de*3,ve=(ae+de)*3;U<ve;U+=3){Cb(ZO,U,B,V),ZO.a.applyMatrix4(uz),ZO.b.applyMatrix4(uz),ZO.c.applyMatrix4(uz),ZO.needsUpdate=!0;for(let Se=0,Pe=X.count;Se<Pe;Se+=3)if(Cb(KO,Se,X,ie),KO.needsUpdate=!0,ZO.intersectsTriangle(KO))return!0}}else{const L=t+8,B=s[t+6];return m1(L,a,dq),!!(i.intersectsBox(dq)&&Qpe(L,e,r,n,i)||(m1(B,a,dq),i.intersectsBox(dq)&&Qpe(B,e,r,n,i)))}}const pq=new Rc,yoe=new Z2,cz=new Z2,Iir=new oi,Pir=new oi,Dir=new oi,Lir=new oi;function Oir(t,e,r,n={},i={},a=0,o=1/0){e.boundingBox||e.computeBoundingBox(),yoe.set(e.boundingBox.min,e.boundingBox.max,r),yoe.needsUpdate=!0;const s=t.geometry,d=s.attributes.position,b=s.index,L=e.attributes.position,B=e.index,V=$3.getPrimitive(),X=$3.getPrimitive();let ie=Iir,de=Pir,ae=null,U=null;i&&(ae=Dir,U=Lir);let ve=1/0,Se=null,Pe=null;return pq.copy(r).invert(),cz.matrix.copy(pq),t.shapecast({boundsTraverseOrder:Me=>yoe.distanceToBox(Me),intersectsBounds:(Me,Ie,Ve)=>Ve<ve&&Ve<o?(Ie&&(cz.min.copy(Me.min),cz.max.copy(Me.max),cz.needsUpdate=!0),!0):!1,intersectsRange:(Me,Ie)=>{if(e.boundsTree)return e.boundsTree.shapecast({boundsTraverseOrder:Ze=>cz.distanceToBox(Ze),intersectsBounds:(Ze,Je,nt)=>nt<ve&&nt<o,intersectsRange:(Ze,Je)=>{for(let nt=Ze,ut=Ze+Je;nt<ut;nt++){Cb(X,3*nt,B,L),X.a.applyMatrix4(r),X.b.applyMatrix4(r),X.c.applyMatrix4(r),X.needsUpdate=!0;for(let ht=Me,_t=Me+Ie;ht<_t;ht++){Cb(V,3*ht,b,d),V.needsUpdate=!0;const Dt=V.distanceToTriangle(X,ie,ae);if(Dt<ve&&(de.copy(ie),U&&U.copy(ae),ve=Dt,Se=ht,Pe=nt),Dt<a)return!0}}}});{const Ve=_F(e);for(let Ze=0,Je=Ve;Ze<Je;Ze++){Cb(X,3*Ze,B,L),X.a.applyMatrix4(r),X.b.applyMatrix4(r),X.c.applyMatrix4(r),X.needsUpdate=!0;for(let nt=Me,ut=Me+Ie;nt<ut;nt++){Cb(V,3*nt,b,d),V.needsUpdate=!0;const ht=V.distanceToTriangle(X,ie,ae);if(ht<ve&&(de.copy(ie),U&&U.copy(ae),ve=ht,Se=nt,Pe=Ze),ht<a)return!0}}}}}),$3.releasePrimitive(V),$3.releasePrimitive(X),ve===1/0?null:(n.point?n.point.copy(de):n.point=de.clone(),n.distance=ve,n.faceIndex=Se,i&&(i.point?i.point.copy(U):i.point=U.clone(),i.point.applyMatrix4(pq),de.applyMatrix4(pq),i.distance=de.sub(i.point).length(),i.faceIndex=Pe),n)}function Nir(t,e=null){e&&Array.isArray(e)&&(e=new Set(e));const r=t.geometry,n=r.index?r.index.array:null,i=r.attributes.position;let a,o,s,d,b=0;const L=t._roots;for(let V=0,X=L.length;V<X;V++)a=L[V],o=new Uint32Array(a),s=new Uint16Array(a),d=new Float32Array(a),B(0,b),b+=a.byteLength;function B(V,X,ie=!1){const de=V*2;if(s[de+15]===gZ){const U=o[V+6],ve=s[de+14];let Se=1/0,Pe=1/0,Me=1/0,Ie=-1/0,Ve=-1/0,Ze=-1/0;for(let Je=U,nt=U+ve;Je<nt;Je++){const ut=3*t.resolveTriangleIndex(Je);for(let ht=0;ht<3;ht++){let _t=ut+ht;_t=n?n[_t]:_t;const Dt=i.getX(_t),qt=i.getY(_t),Lt=i.getZ(_t);Dt<Se&&(Se=Dt),Dt>Ie&&(Ie=Dt),qt<Pe&&(Pe=qt),qt>Ve&&(Ve=qt),Lt<Me&&(Me=Lt),Lt>Ze&&(Ze=Lt)}}return d[V+0]!==Se||d[V+1]!==Pe||d[V+2]!==Me||d[V+3]!==Ie||d[V+4]!==Ve||d[V+5]!==Ze?(d[V+0]=Se,d[V+1]=Pe,d[V+2]=Me,d[V+3]=Ie,d[V+4]=Ve,d[V+5]=Ze,!0):!1}else{const U=V+8,ve=o[V+6],Se=U+X,Pe=ve+X;let Me=ie,Ie=!1,Ve=!1;e?Me||(Ie=e.has(Se),Ve=e.has(Pe),Me=!Ie&&!Ve):(Ie=!0,Ve=!0);const Ze=Me||Ie,Je=Me||Ve;let nt=!1;Ze&&(nt=B(U,X,Me));let ut=!1;Je&&(ut=B(ve,X,Me));const ht=nt||ut;if(ht)for(let _t=0;_t<3;_t++){const Dt=U+_t,qt=ve+_t,Lt=d[Dt],dr=d[Dt+3],Zt=d[qt],Cr=d[qt+3];d[V+_t]=Lt<Zt?Lt:Zt,d[V+_t+3]=dr>Cr?dr:Cr}return ht}}}function Fir(t,e,r,n,i,a,o){N0.setBuffer(t._roots[e]),eve(0,t,r,n,i,a,o),N0.clearBuffer()}function eve(t,e,r,n,i,a,o){const{float32Array:s,uint16Array:d,uint32Array:b}=N0,L=t*2;if(B2(L,d)){const V=VS(t,b),X=nE(L,d);Tir(e,r,n,V,X,i,a,o)}else{const V=G3(t);n4(V,s,n,a,o)&&eve(V,e,r,n,i,a,o);const X=iE(t,b);n4(X,s,n,a,o)&&eve(X,e,r,n,i,a,o)}}const zir=["x","y","z"];function Bir(t,e,r,n,i,a){N0.setBuffer(t._roots[e]);const o=tve(0,t,r,n,i,a);return N0.clearBuffer(),o}function tve(t,e,r,n,i,a){const{float32Array:o,uint16Array:s,uint32Array:d}=N0;let b=t*2;if(B2(b,s)){const B=VS(t,d),V=nE(b,s);return Eir(e,r,n,B,V,i,a)}else{const B=l1e(t,d),V=zir[B],ie=n.direction[V]>=0;let de,ae;ie?(de=G3(t),ae=iE(t,d)):(de=iE(t,d),ae=G3(t));const ve=n4(de,o,n,i,a)?tve(de,e,r,n,i,a):null;if(ve){const Me=ve.point[V];if(ie?Me<=o[ae+B]:Me>=o[ae+B+3])return ve}const Pe=n4(ae,o,n,i,a)?tve(ae,e,r,n,i,a):null;return ve&&Pe?ve.distance<=Pe.distance?ve:Pe:ve||Pe||null}}const vq=new xg,JO=new JC,QO=new JC,fz=new Rc,d4e=new Z2,mq=new Z2;function Uir(t,e,r,n){N0.setBuffer(t._roots[e]);const i=rve(0,t,r,n);return N0.clearBuffer(),i}function rve(t,e,r,n,i=null){const{float32Array:a,uint16Array:o,uint32Array:s}=N0;let d=t*2;if(i===null&&(r.boundingBox||r.computeBoundingBox(),d4e.set(r.boundingBox.min,r.boundingBox.max,n),i=d4e),B2(d,o)){const L=e.geometry,B=L.index,V=L.attributes.position,X=r.index,ie=r.attributes.position,de=VS(t,s),ae=nE(d,o);if(fz.copy(n).invert(),r.boundsTree)return m1(t,a,mq),mq.matrix.copy(fz),mq.needsUpdate=!0,r.boundsTree.shapecast({intersectsBounds:ve=>mq.intersectsBox(ve),intersectsTriangle:ve=>{ve.a.applyMatrix4(n),ve.b.applyMatrix4(n),ve.c.applyMatrix4(n),ve.needsUpdate=!0;for(let Se=de,Pe=ae+de;Se<Pe;Se++)if(Cb(QO,3*e.resolveTriangleIndex(Se),B,V),QO.needsUpdate=!0,ve.intersectsTriangle(QO))return!0;return!1}});for(let U=de,ve=ae+de;U<ve;U++){const Se=e.resolveTriangleIndex(U);Cb(JO,3*Se,B,V),JO.a.applyMatrix4(fz),JO.b.applyMatrix4(fz),JO.c.applyMatrix4(fz),JO.needsUpdate=!0;for(let Pe=0,Me=X.count;Pe<Me;Pe+=3)if(Cb(QO,Pe,X,ie),QO.needsUpdate=!0,JO.intersectsTriangle(QO))return!0}}else{const L=t+8,B=s[t+6];return m1(L,a,vq),!!(i.intersectsBox(vq)&&rve(L,e,r,n,i)||(m1(B,a,vq),i.intersectsBox(vq)&&rve(B,e,r,n,i)))}}const gq=new Rc,boe=new Z2,dz=new Z2,Hir=new oi,jir=new oi,Vir=new oi,qir=new oi;function Gir(t,e,r,n={},i={},a=0,o=1/0){e.boundingBox||e.computeBoundingBox(),boe.set(e.boundingBox.min,e.boundingBox.max,r),boe.needsUpdate=!0;const s=t.geometry,d=s.attributes.position,b=s.index,L=e.attributes.position,B=e.index,V=$3.getPrimitive(),X=$3.getPrimitive();let ie=Hir,de=jir,ae=null,U=null;i&&(ae=Vir,U=qir);let ve=1/0,Se=null,Pe=null;return gq.copy(r).invert(),dz.matrix.copy(gq),t.shapecast({boundsTraverseOrder:Me=>boe.distanceToBox(Me),intersectsBounds:(Me,Ie,Ve)=>Ve<ve&&Ve<o?(Ie&&(dz.min.copy(Me.min),dz.max.copy(Me.max),dz.needsUpdate=!0),!0):!1,intersectsRange:(Me,Ie)=>{if(e.boundsTree){const Ve=e.boundsTree;return Ve.shapecast({boundsTraverseOrder:Ze=>dz.distanceToBox(Ze),intersectsBounds:(Ze,Je,nt)=>nt<ve&&nt<o,intersectsRange:(Ze,Je)=>{for(let nt=Ze,ut=Ze+Je;nt<ut;nt++){const ht=Ve.resolveTriangleIndex(nt);Cb(X,3*ht,B,L),X.a.applyMatrix4(r),X.b.applyMatrix4(r),X.c.applyMatrix4(r),X.needsUpdate=!0;for(let _t=Me,Dt=Me+Ie;_t<Dt;_t++){const qt=t.resolveTriangleIndex(_t);Cb(V,3*qt,b,d),V.needsUpdate=!0;const Lt=V.distanceToTriangle(X,ie,ae);if(Lt<ve&&(de.copy(ie),U&&U.copy(ae),ve=Lt,Se=_t,Pe=nt),Lt<a)return!0}}}})}else{const Ve=_F(e);for(let Ze=0,Je=Ve;Ze<Je;Ze++){Cb(X,3*Ze,B,L),X.a.applyMatrix4(r),X.b.applyMatrix4(r),X.c.applyMatrix4(r),X.needsUpdate=!0;for(let nt=Me,ut=Me+Ie;nt<ut;nt++){const ht=t.resolveTriangleIndex(nt);Cb(V,3*ht,b,d),V.needsUpdate=!0;const _t=V.distanceToTriangle(X,ie,ae);if(_t<ve&&(de.copy(ie),U&&U.copy(ae),ve=_t,Se=nt,Pe=Ze),_t<a)return!0}}}}}),$3.releasePrimitive(V),$3.releasePrimitive(X),ve===1/0?null:(n.point?n.point.copy(de):n.point=de.clone(),n.distance=ve,n.faceIndex=Se,i&&(i.point?i.point.copy(U):i.point=U.clone(),i.point.applyMatrix4(gq),de.applyMatrix4(gq),i.distance=de.sub(i.point).length(),i.faceIndex=Pe),n)}function $ir(){return typeof SharedArrayBuffer<"u"}const v9=new N0.constructor,LW=new N0.constructor,TP=new c1e(()=>new xg),eN=new xg,tN=new xg,xoe=new xg,_oe=new xg;let woe=!1;function Wir(t,e,r,n){if(woe)throw new Error("MeshBVH: Recursive calls to bvhcast not supported.");woe=!0;const i=t._roots,a=e._roots;let o,s=0,d=0;const b=new Rc().copy(r).invert();for(let L=0,B=i.length;L<B;L++){v9.setBuffer(i[L]),d=0;const V=TP.getPrimitive();m1(0,v9.float32Array,V),V.applyMatrix4(b);for(let X=0,ie=a.length;X<ie&&(LW.setBuffer(a[X]),o=TC(0,0,r,b,n,s,d,0,0,V),LW.clearBuffer(),d+=a[X].length,!o);X++);if(TP.releasePrimitive(V),v9.clearBuffer(),s+=i[L].length,o)break}return woe=!1,o}function TC(t,e,r,n,i,a=0,o=0,s=0,d=0,b=null,L=!1){let B,V;L?(B=LW,V=v9):(B=v9,V=LW);const X=B.float32Array,ie=B.uint32Array,de=B.uint16Array,ae=V.float32Array,U=V.uint32Array,ve=V.uint16Array,Se=t*2,Pe=e*2,Me=B2(Se,de),Ie=B2(Pe,ve);let Ve=!1;if(Ie&&Me)L?Ve=i(VS(e,U),nE(e*2,ve),VS(t,ie),nE(t*2,de),d,o+e,s,a+t):Ve=i(VS(t,ie),nE(t*2,de),VS(e,U),nE(e*2,ve),s,a+t,d,o+e);else if(Ie){const Ze=TP.getPrimitive();m1(e,ae,Ze),Ze.applyMatrix4(r);const Je=G3(t),nt=iE(t,ie);m1(Je,X,eN),m1(nt,X,tN);const ut=Ze.intersectsBox(eN),ht=Ze.intersectsBox(tN);Ve=ut&&TC(e,Je,n,r,i,o,a,d,s+1,Ze,!L)||ht&&TC(e,nt,n,r,i,o,a,d,s+1,Ze,!L),TP.releasePrimitive(Ze)}else{const Ze=G3(e),Je=iE(e,U);m1(Ze,ae,xoe),m1(Je,ae,_oe);const nt=b.intersectsBox(xoe),ut=b.intersectsBox(_oe);if(nt&&ut)Ve=TC(t,Ze,r,n,i,a,o,s,d+1,b,L)||TC(t,Je,r,n,i,a,o,s,d+1,b,L);else if(nt)if(Me)Ve=TC(t,Ze,r,n,i,a,o,s,d+1,b,L);else{const ht=TP.getPrimitive();ht.copy(xoe).applyMatrix4(r);const _t=G3(t),Dt=iE(t,ie);m1(_t,X,eN),m1(Dt,X,tN);const qt=ht.intersectsBox(eN),Lt=ht.intersectsBox(tN);Ve=qt&&TC(Ze,_t,n,r,i,o,a,d,s+1,ht,!L)||Lt&&TC(Ze,Dt,n,r,i,o,a,d,s+1,ht,!L),TP.releasePrimitive(ht)}else if(ut)if(Me)Ve=TC(t,Je,r,n,i,a,o,s,d+1,b,L);else{const ht=TP.getPrimitive();ht.copy(_oe).applyMatrix4(r);const _t=G3(t),Dt=iE(t,ie);m1(_t,X,eN),m1(Dt,X,tN);const qt=ht.intersectsBox(eN),Lt=ht.intersectsBox(tN);Ve=qt&&TC(Je,_t,n,r,i,o,a,d,s+1,ht,!L)||Lt&&TC(Je,Dt,n,r,i,o,a,d,s+1,ht,!L),TP.releasePrimitive(ht)}}return Ve}const yq=new Z2,h4e=new xg,Yir={strategy:MYe,maxDepth:40,maxLeafTris:10,useSharedArrayBuffer:!1,setBoundingBox:!0,onProgress:null,indirect:!1,verbose:!0,range:null};class f1e{static serialize(e,r={}){r={cloneBuffers:!0,...r};const n=e.geometry,i=e._roots,a=e._indirectBuffer,o=n.getIndex();let s;return r.cloneBuffers?s={roots:i.map(d=>d.slice()),index:o?o.array.slice():null,indirectBuffer:a?a.slice():null}:s={roots:i,index:o?o.array:null,indirectBuffer:a},s}static deserialize(e,r,n={}){n={setIndex:!0,indirect:!!e.indirectBuffer,...n};const{index:i,roots:a,indirectBuffer:o}=e,s=new f1e(r,{...n,[hoe]:!0});if(s._roots=a,s._indirectBuffer=o||null,n.setIndex){const d=r.getIndex();if(d===null){const b=new Kh(e.index,1,!1);r.setIndex(b)}else d.array!==i&&(d.array.set(i),d.needsUpdate=!0)}return s}get indirect(){return!!this._indirectBuffer}constructor(e,r={}){if(e.isBufferGeometry){if(e.index&&e.index.isInterleavedBufferAttribute)throw new Error("MeshBVH: InterleavedBufferAttribute is not supported for the index attribute.")}else throw new Error("MeshBVH: Only BufferGeometries are supported.");if(r=Object.assign({...Yir,[hoe]:!1},r),r.useSharedArrayBuffer&&!$ir())throw new Error("MeshBVH: SharedArrayBuffer is not available.");this.geometry=e,this._roots=null,this._indirectBuffer=null,r[hoe]||(uir(this,r),!e.boundingBox&&r.setBoundingBox&&(e.boundingBox=this.getBoundingBox(new xg))),this.resolveTriangleIndex=r.indirect?n=>this._indirectBuffer[n]:n=>n}refit(e=null){return(this.indirect?Nir:Sir)(this,e)}traverse(e,r=0){const n=this._roots[r],i=new Uint32Array(n),a=new Uint16Array(n);o(0);function o(s,d=0){const b=s*2,L=a[b+15]===gZ;if(L){const B=i[s+6],V=a[b+14];e(d,L,new Float32Array(n,s*4,6),B,V)}else{const B=s+$P/4,V=i[s+6],X=i[s+7];e(d,L,new Float32Array(n,s*4,6),X)||(o(B,d+1),o(V,d+1))}}}raycast(e,r=dx,n=0,i=1/0){const a=this._roots,o=this.geometry,s=[],d=r.isMaterial,b=Array.isArray(r),L=o.groups,B=d?r.side:r,V=this.indirect?Fir:Cir;for(let X=0,ie=a.length;X<ie;X++){const de=b?r[L[X].materialIndex].side:B,ae=s.length;if(V(this,X,de,e,s,n,i),b){const U=L[X].materialIndex;for(let ve=ae,Se=s.length;ve<Se;ve++)s[ve].face.materialIndex=U}}return s}raycastFirst(e,r=dx,n=0,i=1/0){const a=this._roots,o=this.geometry,s=r.isMaterial,d=Array.isArray(r);let b=null;const L=o.groups,B=s?r.side:r,V=this.indirect?Bir:Rir;for(let X=0,ie=a.length;X<ie;X++){const de=d?r[L[X].materialIndex].side:B,ae=V(this,X,de,e,n,i);ae!=null&&(b==null||ae.distance<b.distance)&&(b=ae,d&&(ae.face.materialIndex=L[X].materialIndex))}return b}intersectsGeometry(e,r){let n=!1;const i=this._roots,a=this.indirect?Uir:kir;for(let o=0,s=i.length;o<s&&(n=a(this,o,e,r),!n);o++);return n}shapecast(e){const r=$3.getPrimitive(),n=this.indirect?Air:wir;let{boundsTraverseOrder:i,intersectsBounds:a,intersectsRange:o,intersectsTriangle:s}=e;if(o&&s){const B=o;o=(V,X,ie,de,ae)=>B(V,X,ie,de,ae)?!0:n(V,X,this,s,ie,de,r)}else o||(s?o=(B,V,X,ie)=>n(B,V,this,s,X,ie,r):o=(B,V,X)=>X);let d=!1,b=0;const L=this._roots;for(let B=0,V=L.length;B<V;B++){const X=L[B];if(d=vir(this,B,a,o,i,b),d)break;b+=X.byteLength}return $3.releasePrimitive(r),d}bvhcast(e,r,n){let{intersectsRanges:i,intersectsTriangles:a}=n;const o=$3.getPrimitive(),s=this.geometry.index,d=this.geometry.attributes.position,b=this.indirect?ie=>{const de=this.resolveTriangleIndex(ie);Cb(o,de*3,s,d)}:ie=>{Cb(o,ie*3,s,d)},L=$3.getPrimitive(),B=e.geometry.index,V=e.geometry.attributes.position,X=e.indirect?ie=>{const de=e.resolveTriangleIndex(ie);Cb(L,de*3,B,V)}:ie=>{Cb(L,ie*3,B,V)};if(a){const ie=(de,ae,U,ve,Se,Pe,Me,Ie)=>{for(let Ve=U,Ze=U+ve;Ve<Ze;Ve++){X(Ve),L.a.applyMatrix4(r),L.b.applyMatrix4(r),L.c.applyMatrix4(r),L.needsUpdate=!0;for(let Je=de,nt=de+ae;Je<nt;Je++)if(b(Je),o.needsUpdate=!0,a(o,L,Je,Ve,Se,Pe,Me,Ie))return!0}return!1};if(i){const de=i;i=function(ae,U,ve,Se,Pe,Me,Ie,Ve){return de(ae,U,ve,Se,Pe,Me,Ie,Ve)?!0:ie(ae,U,ve,Se,Pe,Me,Ie,Ve)}}else i=ie}return Wir(this,e,r,i)}intersectsBox(e,r){return yq.set(e.min,e.max,r),yq.needsUpdate=!0,this.shapecast({intersectsBounds:n=>yq.intersectsBox(n),intersectsTriangle:n=>yq.intersectsTriangle(n)})}intersectsSphere(e){return this.shapecast({intersectsBounds:r=>e.intersectsBox(r),intersectsTriangle:r=>r.intersectsSphere(e)})}closestPointToGeometry(e,r,n={},i={},a=0,o=1/0){return(this.indirect?Gir:Oir)(this,e,r,n,i,a,o)}closestPointToPoint(e,r={},n=0,i=1/0){return mir(this,e,r,n,i)}getBoundingBox(e){return e.makeEmpty(),this._roots.forEach(n=>{m1(0,new Float32Array(n),h4e),e.union(h4e)}),e}}function Xir(t){switch(t){case 1:return"R";case 2:return"RG";case 3:return"RGBA";case 4:return"RGBA"}throw new Error}function Zir(t){switch(t){case 1:return Dk;case 2:return pU;case 3:return Rp;case 4:return Rp}}function p4e(t){switch(t){case 1:return pF;case 2:return vF;case 3:return FL;case 4:return FL}}class NYe extends $y{constructor(){super(),this.minFilter=Mp,this.magFilter=Mp,this.generateMipmaps=!1,this.overrideItemSize=null,this._forcedType=null}updateFrom(e){const r=this.overrideItemSize,n=e.itemSize,i=e.count;if(r!==null){if(n*i%r!==0)throw new Error("VertexAttributeTexture: overrideItemSize must divide evenly into buffer length.");e.itemSize=r,e.count=i*n/r}const a=e.itemSize,o=e.count,s=e.normalized,d=e.array.constructor,b=d.BYTES_PER_ELEMENT;let L=this._forcedType,B=a;if(L===null)switch(d){case Float32Array:L=mp;break;case Uint8Array:case Uint16Array:case Uint32Array:L=q2;break;case Int8Array:case Int16Array:case Int32Array:L=GP;break}let V,X,ie,de,ae=Xir(a);switch(L){case mp:ie=1,X=Zir(a),s&&b===1?(de=d,ae+="8",d===Uint8Array?V=e_:(V=h8,ae+="_SNORM")):(de=Float32Array,ae+="32F",V=mp);break;case GP:ae+=b*8+"I",ie=s?Math.pow(2,d.BYTES_PER_ELEMENT*8-1):1,X=p4e(a),b===1?(de=Int8Array,V=h8):b===2?(de=Int16Array,V=hU):(de=Int32Array,V=GP);break;case q2:ae+=b*8+"UI",ie=s?Math.pow(2,d.BYTES_PER_ELEMENT*8-1):1,X=p4e(a),b===1?(de=Uint8Array,V=e_):b===2?(de=Uint16Array,V=NL):(de=Uint32Array,V=q2);break}B===3&&(X===Rp||X===FL)&&(B=4);const U=Math.ceil(Math.sqrt(o))||1,ve=B*U*U,Se=new de(ve),Pe=e.normalized;e.normalized=!1;for(let Me=0;Me<o;Me++){const Ie=B*Me;Se[Ie]=e.getX(Me)/ie,a>=2&&(Se[Ie+1]=e.getY(Me)/ie),a>=3&&(Se[Ie+2]=e.getZ(Me)/ie,B===4&&(Se[Ie+3]=1)),a>=4&&(Se[Ie+3]=e.getW(Me)/ie)}e.normalized=Pe,this.internalFormat=ae,this.format=X,this.type=V,this.image.width=U,this.image.height=U,this.image.data=Se,this.needsUpdate=!0,this.dispose(),e.itemSize=n,e.count=i}}class FYe extends NYe{constructor(){super(),this._forcedType=q2}}class zYe extends NYe{constructor(){super(),this._forcedType=mp}}class Kir{constructor(){this.index=new FYe,this.position=new zYe,this.bvhBounds=new $y,this.bvhContents=new $y,this._cachedIndexAttr=null,this.index.overrideItemSize=3}updateFrom(e){const{geometry:r}=e;if(Qir(e,this.bvhBounds,this.bvhContents),this.position.updateFrom(r.attributes.position),e.indirect){const n=e._indirectBuffer;if(this._cachedIndexAttr===null||this._cachedIndexAttr.count!==n.length)if(r.index)this._cachedIndexAttr=r.index.clone();else{const i=IYe(kYe(r));this._cachedIndexAttr=new Kh(i,1,!1)}Jir(r,n,this._cachedIndexAttr),this.index.updateFrom(this._cachedIndexAttr)}else this.index.updateFrom(r.index)}dispose(){const{index:e,position:r,bvhBounds:n,bvhContents:i}=this;e&&e.dispose(),r&&r.dispose(),n&&n.dispose(),i&&i.dispose()}}function Jir(t,e,r){const n=r.array,i=t.index?t.index.array:null;for(let a=0,o=e.length;a<o;a++){const s=3*a,d=3*e[a];for(let b=0;b<3;b++)n[s+b]=i?i[d+b]:d+b}}function Qir(t,e,r){const n=t._roots;if(n.length!==1)throw new Error("MeshBVHUniformStruct: Multi-root BVHs not supported.");const i=n[0],a=new Uint16Array(i),o=new Uint32Array(i),s=new Float32Array(i),d=i.byteLength/$P,b=2*Math.ceil(Math.sqrt(d/2)),L=new Float32Array(4*b*b),B=Math.ceil(Math.sqrt(d)),V=new Uint32Array(2*B*B);for(let X=0;X<d;X++){const ie=X*$P/4,de=ie*2,ae=ie;for(let U=0;U<3;U++)L[8*X+0+U]=s[ae+0+U],L[8*X+4+U]=s[ae+3+U];if(B2(de,a)){const U=nE(de,a),ve=VS(ie,o),Se=4294901760|U;V[X*2+0]=Se,V[X*2+1]=ve}else{const U=4*iE(ie,o)/$P,ve=l1e(ie,o);V[X*2+0]=ve,V[X*2+1]=U}}e.image.data=L,e.image.width=b,e.image.height=b,e.format=Rp,e.type=mp,e.internalFormat="RGBA32F",e.minFilter=Mp,e.magFilter=Mp,e.generateMipmaps=!1,e.needsUpdate=!0,e.dispose(),r.image.data=V,r.image.width=B,r.image.height=B,r.format=vF,r.type=q2,r.internalFormat="RG32UI",r.minFilter=Mp,r.magFilter=Mp,r.generateMipmaps=!1,r.needsUpdate=!0,r.dispose()}const ear=`

// A stack of uint32 indices can can store the indices for
// a perfectly balanced tree with a depth up to 31. Lower stack
// depth gets higher performance.
//
// However not all trees are balanced. Best value to set this to
// is the trees max depth.
#ifndef BVH_STACK_DEPTH
#define BVH_STACK_DEPTH 60
#endif

#ifndef INFINITY
#define INFINITY 1e20
#endif

// Utilities
uvec4 uTexelFetch1D( usampler2D tex, uint index ) {

	uint width = uint( textureSize( tex, 0 ).x );
	uvec2 uv;
	uv.x = index % width;
	uv.y = index / width;

	return texelFetch( tex, ivec2( uv ), 0 );

}

ivec4 iTexelFetch1D( isampler2D tex, uint index ) {

	uint width = uint( textureSize( tex, 0 ).x );
	uvec2 uv;
	uv.x = index % width;
	uv.y = index / width;

	return texelFetch( tex, ivec2( uv ), 0 );

}

vec4 texelFetch1D( sampler2D tex, uint index ) {

	uint width = uint( textureSize( tex, 0 ).x );
	uvec2 uv;
	uv.x = index % width;
	uv.y = index / width;

	return texelFetch( tex, ivec2( uv ), 0 );

}

vec4 textureSampleBarycoord( sampler2D tex, vec3 barycoord, uvec3 faceIndices ) {

	return
		barycoord.x * texelFetch1D( tex, faceIndices.x ) +
		barycoord.y * texelFetch1D( tex, faceIndices.y ) +
		barycoord.z * texelFetch1D( tex, faceIndices.z );

}

void ndcToCameraRay(
	vec2 coord, mat4 cameraWorld, mat4 invProjectionMatrix,
	out vec3 rayOrigin, out vec3 rayDirection
) {

	// get camera look direction and near plane for camera clipping
	vec4 lookDirection = cameraWorld * vec4( 0.0, 0.0, - 1.0, 0.0 );
	vec4 nearVector = invProjectionMatrix * vec4( 0.0, 0.0, - 1.0, 1.0 );
	float near = abs( nearVector.z / nearVector.w );

	// get the camera direction and position from camera matrices
	vec4 origin = cameraWorld * vec4( 0.0, 0.0, 0.0, 1.0 );
	vec4 direction = invProjectionMatrix * vec4( coord, 0.5, 1.0 );
	direction /= direction.w;
	direction = cameraWorld * direction - origin;

	// slide the origin along the ray until it sits at the near clip plane position
	origin.xyz += direction.xyz * near / dot( direction, lookDirection );

	rayOrigin = origin.xyz;
	rayDirection = direction.xyz;

}
`,tar=`

#ifndef TRI_INTERSECT_EPSILON
#define TRI_INTERSECT_EPSILON 1e-5
#endif

// Raycasting
bool intersectsBounds( vec3 rayOrigin, vec3 rayDirection, vec3 boundsMin, vec3 boundsMax, out float dist ) {

	// https://www.reddit.com/r/opengl/comments/8ntzz5/fast_glsl_ray_box_intersection/
	// https://tavianator.com/2011/ray_box.html
	vec3 invDir = 1.0 / rayDirection;

	// find intersection distances for each plane
	vec3 tMinPlane = invDir * ( boundsMin - rayOrigin );
	vec3 tMaxPlane = invDir * ( boundsMax - rayOrigin );

	// get the min and max distances from each intersection
	vec3 tMinHit = min( tMaxPlane, tMinPlane );
	vec3 tMaxHit = max( tMaxPlane, tMinPlane );

	// get the furthest hit distance
	vec2 t = max( tMinHit.xx, tMinHit.yz );
	float t0 = max( t.x, t.y );

	// get the minimum hit distance
	t = min( tMaxHit.xx, tMaxHit.yz );
	float t1 = min( t.x, t.y );

	// set distance to 0.0 if the ray starts inside the box
	dist = max( t0, 0.0 );

	return t1 >= dist;

}

bool intersectsTriangle(
	vec3 rayOrigin, vec3 rayDirection, vec3 a, vec3 b, vec3 c,
	out vec3 barycoord, out vec3 norm, out float dist, out float side
) {

	// https://stackoverflow.com/questions/42740765/intersection-between-line-and-triangle-in-3d
	vec3 edge1 = b - a;
	vec3 edge2 = c - a;
	norm = cross( edge1, edge2 );

	float det = - dot( rayDirection, norm );
	float invdet = 1.0 / det;

	vec3 AO = rayOrigin - a;
	vec3 DAO = cross( AO, rayDirection );

	vec4 uvt;
	uvt.x = dot( edge2, DAO ) * invdet;
	uvt.y = - dot( edge1, DAO ) * invdet;
	uvt.z = dot( AO, norm ) * invdet;
	uvt.w = 1.0 - uvt.x - uvt.y;

	// set the hit information
	barycoord = uvt.wxy; // arranged in A, B, C order
	dist = uvt.z;
	side = sign( det );
	norm = side * normalize( norm );

	// add an epsilon to avoid misses between triangles
	uvt += vec4( TRI_INTERSECT_EPSILON );

	return all( greaterThanEqual( uvt, vec4( 0.0 ) ) );

}

bool intersectTriangles(
	// geometry info and triangle range
	sampler2D positionAttr, usampler2D indexAttr, uint offset, uint count,

	// ray
	vec3 rayOrigin, vec3 rayDirection,

	// outputs
	inout float minDistance, inout uvec4 faceIndices, inout vec3 faceNormal, inout vec3 barycoord,
	inout float side, inout float dist
) {

	bool found = false;
	vec3 localBarycoord, localNormal;
	float localDist, localSide;
	for ( uint i = offset, l = offset + count; i < l; i ++ ) {

		uvec3 indices = uTexelFetch1D( indexAttr, i ).xyz;
		vec3 a = texelFetch1D( positionAttr, indices.x ).rgb;
		vec3 b = texelFetch1D( positionAttr, indices.y ).rgb;
		vec3 c = texelFetch1D( positionAttr, indices.z ).rgb;

		if (
			intersectsTriangle( rayOrigin, rayDirection, a, b, c, localBarycoord, localNormal, localDist, localSide )
			&& localDist < minDistance
		) {

			found = true;
			minDistance = localDist;

			faceIndices = uvec4( indices.xyz, i );
			faceNormal = localNormal;

			side = localSide;
			barycoord = localBarycoord;
			dist = localDist;

		}

	}

	return found;

}

bool intersectsBVHNodeBounds( vec3 rayOrigin, vec3 rayDirection, sampler2D bvhBounds, uint currNodeIndex, out float dist ) {

	uint cni2 = currNodeIndex * 2u;
	vec3 boundsMin = texelFetch1D( bvhBounds, cni2 ).xyz;
	vec3 boundsMax = texelFetch1D( bvhBounds, cni2 + 1u ).xyz;
	return intersectsBounds( rayOrigin, rayDirection, boundsMin, boundsMax, dist );

}

// use a macro to hide the fact that we need to expand the struct into separate fields
#define	bvhIntersectFirstHit(		bvh,		rayOrigin, rayDirection, faceIndices, faceNormal, barycoord, side, dist	)	_bvhIntersectFirstHit(		bvh.position, bvh.index, bvh.bvhBounds, bvh.bvhContents,		rayOrigin, rayDirection, faceIndices, faceNormal, barycoord, side, dist	)

bool _bvhIntersectFirstHit(
	// bvh info
	sampler2D bvh_position, usampler2D bvh_index, sampler2D bvh_bvhBounds, usampler2D bvh_bvhContents,

	// ray
	vec3 rayOrigin, vec3 rayDirection,

	// output variables split into separate variables due to output precision
	inout uvec4 faceIndices, inout vec3 faceNormal, inout vec3 barycoord,
	inout float side, inout float dist
) {

	// stack needs to be twice as long as the deepest tree we expect because
	// we push both the left and right child onto the stack every traversal
	int ptr = 0;
	uint stack[ BVH_STACK_DEPTH ];
	stack[ 0 ] = 0u;

	float triangleDistance = INFINITY;
	bool found = false;
	while ( ptr > - 1 && ptr < BVH_STACK_DEPTH ) {

		uint currNodeIndex = stack[ ptr ];
		ptr --;

		// check if we intersect the current bounds
		float boundsHitDistance;
		if (
			! intersectsBVHNodeBounds( rayOrigin, rayDirection, bvh_bvhBounds, currNodeIndex, boundsHitDistance )
			|| boundsHitDistance > triangleDistance
		) {

			continue;

		}

		uvec2 boundsInfo = uTexelFetch1D( bvh_bvhContents, currNodeIndex ).xy;
		bool isLeaf = bool( boundsInfo.x & 0xffff0000u );

		if ( isLeaf ) {

			uint count = boundsInfo.x & 0x0000ffffu;
			uint offset = boundsInfo.y;

			found = intersectTriangles(
				bvh_position, bvh_index, offset, count,
				rayOrigin, rayDirection, triangleDistance,
				faceIndices, faceNormal, barycoord, side, dist
			) || found;

		} else {

			uint leftIndex = currNodeIndex + 1u;
			uint splitAxis = boundsInfo.x & 0x0000ffffu;
			uint rightIndex = boundsInfo.y;

			bool leftToRight = rayDirection[ splitAxis ] >= 0.0;
			uint c1 = leftToRight ? leftIndex : rightIndex;
			uint c2 = leftToRight ? rightIndex : leftIndex;

			// set c2 in the stack so we traverse it later. We need to keep track of a pointer in
			// the stack while we traverse. The second pointer added is the one that will be
			// traversed first
			ptr ++;
			stack[ ptr ] = c2;

			ptr ++;
			stack[ ptr ] = c1;

		}

	}

	return found;

}
`,rar=`
struct BVH {

	usampler2D index;
	sampler2D position;

	sampler2D bvhBounds;
	usampler2D bvhContents;

};
`;function d1e(t,e){const r=t+"Geometry";return ze.forwardRef(({args:n,children:i,...a},o)=>{const s=ze.useRef(null);return ze.useImperativeHandle(o,()=>s.current),ze.useLayoutEffect(()=>void e?.(s.current)),ze.createElement("mesh",Mr({ref:s},a),ze.createElement(r,{attach:"geometry",args:n}),i)})}const Soe=d1e("box"),nar=d1e("plane"),Toe=d1e("dodecahedron"),BYe=(t,e,r)=>{let n;switch(t){case e_:n=new Uint8ClampedArray(e*r*4);break;case Og:n=new Uint16Array(e*r*4);break;case q2:n=new Uint32Array(e*r*4);break;case h8:n=new Int8Array(e*r*4);break;case hU:n=new Int16Array(e*r*4);break;case GP:n=new Int32Array(e*r*4);break;case mp:n=new Float32Array(e*r*4);break;default:throw new Error("Unsupported data type")}return n};let bq;const iar=(t,e,r,n)=>{if(bq!==void 0)return bq;const i=new cx(1,1,n);e.setRenderTarget(i);const a=new hc(new j_,new dA({color:16777215}));e.render(a,r),e.setRenderTarget(null);const o=BYe(t,i.width,i.height);return e.readRenderTargetPixels(i,0,0,i.width,i.height,o),i.dispose(),a.geometry.dispose(),a.material.dispose(),bq=o[0]!==0,bq};class h1e{constructor(e){var r,n,i,a,o,s,d,b,L,B,V,X,ie,de,ae,U;this._rendererIsDisposable=!1,this._supportsReadPixels=!0,this.render=()=>{this._renderer.setRenderTarget(this._renderTarget);try{this._renderer.render(this._scene,this._camera)}catch(Se){throw this._renderer.setRenderTarget(null),Se}this._renderer.setRenderTarget(null)},this._width=e.width,this._height=e.height,this._type=e.type,this._colorSpace=e.colorSpace;const ve={format:Rp,depthBuffer:!1,stencilBuffer:!1,type:this._type,colorSpace:this._colorSpace,anisotropy:((r=e.renderTargetOptions)===null||r===void 0?void 0:r.anisotropy)!==void 0?(n=e.renderTargetOptions)===null||n===void 0?void 0:n.anisotropy:1,generateMipmaps:((i=e.renderTargetOptions)===null||i===void 0?void 0:i.generateMipmaps)!==void 0?(a=e.renderTargetOptions)===null||a===void 0?void 0:a.generateMipmaps:!1,magFilter:((o=e.renderTargetOptions)===null||o===void 0?void 0:o.magFilter)!==void 0?(s=e.renderTargetOptions)===null||s===void 0?void 0:s.magFilter:vp,minFilter:((d=e.renderTargetOptions)===null||d===void 0?void 0:d.minFilter)!==void 0?(b=e.renderTargetOptions)===null||b===void 0?void 0:b.minFilter:vp,samples:((L=e.renderTargetOptions)===null||L===void 0?void 0:L.samples)!==void 0?(B=e.renderTargetOptions)===null||B===void 0?void 0:B.samples:void 0,wrapS:((V=e.renderTargetOptions)===null||V===void 0?void 0:V.wrapS)!==void 0?(X=e.renderTargetOptions)===null||X===void 0?void 0:X.wrapS:Ng,wrapT:((ie=e.renderTargetOptions)===null||ie===void 0?void 0:ie.wrapT)!==void 0?(de=e.renderTargetOptions)===null||de===void 0?void 0:de.wrapT:Ng};if(this._material=e.material,e.renderer?this._renderer=e.renderer:(this._renderer=h1e.instantiateRenderer(),this._rendererIsDisposable=!0),this._scene=new mF,this._camera=new VC,this._camera.position.set(0,0,10),this._camera.left=-.5,this._camera.right=.5,this._camera.top=.5,this._camera.bottom=-.5,this._camera.updateProjectionMatrix(),!iar(this._type,this._renderer,this._camera,ve)){let Se;switch(this._type){case Og:Se=this._renderer.extensions.has("EXT_color_buffer_float")?mp:void 0;break}Se!==void 0?(console.warn(`This browser does not support reading pixels from ${this._type} RenderTargets, switching to ${mp}`),this._type=Se):(this._supportsReadPixels=!1,console.warn("This browser dos not support toArray or toDataTexture, calls to those methods will result in an error thrown"))}this._quad=new hc(new j_,this._material),this._quad.geometry.computeBoundingBox(),this._scene.add(this._quad),this._renderTarget=new cx(this.width,this.height,ve),this._renderTarget.texture.mapping=((ae=e.renderTargetOptions)===null||ae===void 0?void 0:ae.mapping)!==void 0?(U=e.renderTargetOptions)===null||U===void 0?void 0:U.mapping:e4}static instantiateRenderer(){const e=new Qye;return e.setSize(128,128),e}toArray(){if(!this._supportsReadPixels)throw new Error("Can't read pixels in this browser");const e=BYe(this._type,this._width,this._height);return this._renderer.readRenderTargetPixels(this._renderTarget,0,0,this._width,this._height,e),e}toDataTexture(e){const r=new $y(this.toArray(),this.width,this.height,Rp,this._type,e?.mapping||e4,e?.wrapS||Ng,e?.wrapT||Ng,e?.magFilter||vp,e?.minFilter||vp,e?.anisotropy||1,KC);return r.generateMipmaps=e?.generateMipmaps!==void 0?e?.generateMipmaps:!1,r}disposeOnDemandRenderer(){this._renderer.setRenderTarget(null),this._rendererIsDisposable&&(this._renderer.dispose(),this._renderer.forceContextLoss())}dispose(e){this.disposeOnDemandRenderer(),e&&this.renderTarget.dispose(),this.material instanceof eb&&Object.values(this.material.uniforms).forEach(r=>{r.value instanceof Fg&&r.value.dispose()}),Object.values(this.material).forEach(r=>{r instanceof Fg&&r.dispose()}),this.material.dispose(),this._quad.geometry.dispose()}get width(){return this._width}set width(e){this._width=e,this._renderTarget.setSize(this._width,this._height)}get height(){return this._height}set height(e){this._height=e,this._renderTarget.setSize(this._width,this._height)}get renderer(){return this._renderer}get renderTarget(){return this._renderTarget}set renderTarget(e){this._renderTarget=e,this._width=e.width,this._height=e.height}get material(){return this._material}get type(){return this._type}get colorSpace(){return this._colorSpace}}const aar=`
varying vec2 vUv;

void main() {
  vUv = uv;
  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
}
`,oar=`
// min half float value
#define HALF_FLOAT_MIN vec3( -65504, -65504, -65504 )
// max half float value
#define HALF_FLOAT_MAX vec3( 65504, 65504, 65504 )

uniform sampler2D sdr;
uniform sampler2D gainMap;
uniform vec3 gamma;
uniform vec3 offsetHdr;
uniform vec3 offsetSdr;
uniform vec3 gainMapMin;
uniform vec3 gainMapMax;
uniform float weightFactor;

varying vec2 vUv;

void main() {
  vec3 rgb = texture2D( sdr, vUv ).rgb;
  vec3 recovery = texture2D( gainMap, vUv ).rgb;
  vec3 logRecovery = pow( recovery, gamma );
  vec3 logBoost = gainMapMin * ( 1.0 - logRecovery ) + gainMapMax * logRecovery;
  vec3 hdrColor = (rgb + offsetSdr) * exp2( logBoost * weightFactor ) - offsetHdr;
  vec3 clampedHdrColor = max( HALF_FLOAT_MIN, min( HALF_FLOAT_MAX, hdrColor ));
  gl_FragColor = vec4( clampedHdrColor , 1.0 );
}
`;class sar extends eb{constructor({gamma:e,offsetHdr:r,offsetSdr:n,gainMapMin:i,gainMapMax:a,maxDisplayBoost:o,hdrCapacityMin:s,hdrCapacityMax:d,sdr:b,gainMap:L}){super({name:"GainMapDecoderMaterial",vertexShader:aar,fragmentShader:oar,uniforms:{sdr:{value:b},gainMap:{value:L},gamma:{value:new oi(1/e[0],1/e[1],1/e[2])},offsetHdr:{value:new oi().fromArray(r)},offsetSdr:{value:new oi().fromArray(n)},gainMapMin:{value:new oi().fromArray(i)},gainMapMax:{value:new oi().fromArray(a)},weightFactor:{value:(Math.log2(o)-s)/(d-s)}},blending:V2,depthTest:!1,depthWrite:!1}),this._maxDisplayBoost=o,this._hdrCapacityMin=s,this._hdrCapacityMax=d,this.needsUpdate=!0,this.uniformsNeedUpdate=!0}get sdr(){return this.uniforms.sdr.value}set sdr(e){this.uniforms.sdr.value=e}get gainMap(){return this.uniforms.gainMap.value}set gainMap(e){this.uniforms.gainMap.value=e}get offsetHdr(){return this.uniforms.offsetHdr.value.toArray()}set offsetHdr(e){this.uniforms.offsetHdr.value.fromArray(e)}get offsetSdr(){return this.uniforms.offsetSdr.value.toArray()}set offsetSdr(e){this.uniforms.offsetSdr.value.fromArray(e)}get gainMapMin(){return this.uniforms.gainMapMin.value.toArray()}set gainMapMin(e){this.uniforms.gainMapMin.value.fromArray(e)}get gainMapMax(){return this.uniforms.gainMapMax.value.toArray()}set gainMapMax(e){this.uniforms.gainMapMax.value.fromArray(e)}get gamma(){const e=this.uniforms.gamma.value;return[1/e.x,1/e.y,1/e.z]}set gamma(e){const r=this.uniforms.gamma.value;r.x=1/e[0],r.y=1/e[1],r.z=1/e[2]}get hdrCapacityMin(){return this._hdrCapacityMin}set hdrCapacityMin(e){this._hdrCapacityMin=e,this.calculateWeight()}get hdrCapacityMax(){return this._hdrCapacityMax}set hdrCapacityMax(e){this._hdrCapacityMax=e,this.calculateWeight()}get maxDisplayBoost(){return this._maxDisplayBoost}set maxDisplayBoost(e){this._maxDisplayBoost=Math.max(1,Math.min(65504,e)),this.calculateWeight()}calculateWeight(){const e=(Math.log2(this._maxDisplayBoost)-this._hdrCapacityMin)/(this._hdrCapacityMax-this._hdrCapacityMin);this.uniforms.weightFactor.value=Math.max(0,Math.min(1,e))}}class UYe extends Error{}class HYe extends Error{}const hz=(t,e,r)=>{const n=new RegExp(`${e}="([^"]*)"`,"i").exec(t);if(n)return n[1];const i=new RegExp(`<${e}[^>]*>([\\s\\S]*?)</${e}>`,"i").exec(t);if(i){const a=i[1].match(/<rdf:li>([^<]*)<\/rdf:li>/g);return a&&a.length===3?a.map(o=>o.replace(/<\/?rdf:li>/g,"")):i[1].trim()}if(r!==void 0)return r;throw new Error(`Can't find ${e} in gainmap metadata`)},lar=t=>{let e;typeof TextDecoder<"u"?e=new TextDecoder().decode(t):e=t.toString();let r=e.indexOf("<x:xmpmeta");for(;r!==-1;){const n=e.indexOf("x:xmpmeta>",r),i=e.slice(r,n+10);try{const a=hz(i,"hdrgm:GainMapMin","0"),o=hz(i,"hdrgm:GainMapMax"),s=hz(i,"hdrgm:Gamma","1"),d=hz(i,"hdrgm:OffsetSDR","0.015625"),b=hz(i,"hdrgm:OffsetHDR","0.015625"),L=/hdrgm:HDRCapacityMin="([^"]*)"/.exec(i),B=L?L[1]:"0",V=/hdrgm:HDRCapacityMax="([^"]*)"/.exec(i);if(!V)throw new Error("Incomplete gainmap metadata");const X=V[1];return{gainMapMin:Array.isArray(a)?a.map(ie=>parseFloat(ie)):[parseFloat(a),parseFloat(a),parseFloat(a)],gainMapMax:Array.isArray(o)?o.map(ie=>parseFloat(ie)):[parseFloat(o),parseFloat(o),parseFloat(o)],gamma:Array.isArray(s)?s.map(ie=>parseFloat(ie)):[parseFloat(s),parseFloat(s),parseFloat(s)],offsetSdr:Array.isArray(d)?d.map(ie=>parseFloat(ie)):[parseFloat(d),parseFloat(d),parseFloat(d)],offsetHdr:Array.isArray(b)?b.map(ie=>parseFloat(ie)):[parseFloat(b),parseFloat(b),parseFloat(b)],hdrCapacityMin:parseFloat(B),hdrCapacityMax:parseFloat(X)}}catch{}r=e.indexOf("<x:xmpmeta",n)}};class uar{constructor(e){this.options={debug:e&&e.debug!==void 0?e.debug:!1,extractFII:e&&e.extractFII!==void 0?e.extractFII:!0,extractNonFII:e&&e.extractNonFII!==void 0?e.extractNonFII:!0}}extract(e){return new Promise((r,n)=>{const i=this.options.debug,a=new DataView(e.buffer);if(a.getUint16(0)!==65496){n(new Error("Not a valid jpeg"));return}const o=a.byteLength;let s=2,d=0,b;for(;s<o;){if(++d>250){n(new Error(`Found no marker after ${d} loops 😵`));return}if(a.getUint8(s)!==255){n(new Error(`Not a valid marker at offset 0x${s.toString(16)}, found: 0x${a.getUint8(s).toString(16)}`));return}if(b=a.getUint8(s+1),i&&console.log(`Marker: ${b.toString(16)}`),b===226){i&&console.log("Found APP2 marker (0xffe2)");const L=s+4;if(a.getUint32(L)===1297106432){const B=L+4;let V;if(a.getUint16(B)===18761)V=!1;else if(a.getUint16(B)===19789)V=!0;else{n(new Error("No valid endianness marker found in TIFF header"));return}if(a.getUint16(B+2,!V)!==42){n(new Error("Not valid TIFF data! (no 0x002A marker)"));return}const X=a.getUint32(B+4,!V);if(X<8){n(new Error("Not valid TIFF data! (First offset less than 8)"));return}const ie=B+X,de=a.getUint16(ie,!V),ae=ie+2;let U=0;for(let Me=ae;Me<ae+12*de;Me+=12)a.getUint16(Me,!V)===45057&&(U=a.getUint32(Me+8,!V));const Se=ie+2+de*12+4,Pe=[];for(let Me=Se;Me<Se+U*16;Me+=16){const Ie={MPType:a.getUint32(Me,!V),size:a.getUint32(Me+4,!V),dataOffset:a.getUint32(Me+8,!V),dependantImages:a.getUint32(Me+12,!V),start:-1,end:-1,isFII:!1};Ie.dataOffset?(Ie.start=B+Ie.dataOffset,Ie.isFII=!1):(Ie.start=0,Ie.isFII=!0),Ie.end=Ie.start+Ie.size,Pe.push(Ie)}if(this.options.extractNonFII&&Pe.length){const Me=new Blob([a]),Ie=[];for(const Ve of Pe){if(Ve.isFII&&!this.options.extractFII)continue;const Ze=Me.slice(Ve.start,Ve.end+1,"image/jpeg");Ie.push(Ze)}r(Ie)}}}s+=2+a.getUint16(s+2)}})}}const car=async t=>{const e=lar(t);if(!e)throw new HYe("Gain map XMP metadata not found");const n=await new uar({extractFII:!0,extractNonFII:!0}).extract(t);if(n.length!==2)throw new UYe("Gain map recovery image not found");return{sdr:new Uint8Array(await n[0].arrayBuffer()),gainMap:new Uint8Array(await n[1].arrayBuffer()),metadata:e}},v4e=t=>new Promise((e,r)=>{const n=document.createElement("img");n.onload=()=>{e(n)},n.onerror=i=>{r(i)},n.src=URL.createObjectURL(t)});class jYe extends X2{constructor(e,r){super(r),e&&(this._renderer=e),this._internalLoadingManager=new cZ}setRenderer(e){return this._renderer=e,this}setRenderTargetOptions(e){return this._renderTargetOptions=e,this}prepareQuadRenderer(){this._renderer||console.warn("WARNING: An existing WebGL Renderer was not passed to this Loader constructor or in setRenderer, the result of this Loader will need to be converted to a Data Texture with toDataTexture() before you can use it in your renderer.");const e=new sar({gainMapMax:[1,1,1],gainMapMin:[0,0,0],gamma:[1,1,1],offsetHdr:[1,1,1],offsetSdr:[1,1,1],hdrCapacityMax:1,hdrCapacityMin:0,maxDisplayBoost:1,gainMap:new Fg,sdr:new Fg});return new h1e({width:16,height:16,type:Og,colorSpace:KC,material:e,renderer:this._renderer,renderTargetOptions:this._renderTargetOptions})}async render(e,r,n,i){const a=i?new Blob([i],{type:"image/jpeg"}):void 0,o=new Blob([n],{type:"image/jpeg"});let s,d,b=!1;if(typeof createImageBitmap>"u"){const V=await Promise.all([a?v4e(a):Promise.resolve(void 0),v4e(o)]);d=V[0],s=V[1],b=!0}else{const V=await Promise.all([a?createImageBitmap(a,{imageOrientation:"flipY"}):Promise.resolve(void 0),createImageBitmap(o,{imageOrientation:"flipY"})]);d=V[0],s=V[1]}const L=new Fg(d||new ImageData(2,2),e4,Ng,Ng,vp,$$,Rp,e_,1,KC);L.flipY=b,L.needsUpdate=!0;const B=new Fg(s,e4,Ng,Ng,vp,$$,Rp,e_,1,H_);B.flipY=b,B.needsUpdate=!0,e.width=s.width,e.height=s.height,e.material.gainMap=L,e.material.sdr=B,e.material.gainMapMin=r.gainMapMin,e.material.gainMapMax=r.gainMapMax,e.material.offsetHdr=r.offsetHdr,e.material.offsetSdr=r.offsetSdr,e.material.gamma=r.gamma,e.material.hdrCapacityMin=r.hdrCapacityMin,e.material.hdrCapacityMax=r.hdrCapacityMax,e.material.maxDisplayBoost=Math.pow(2,r.hdrCapacityMax),e.material.needsUpdate=!0,e.render()}}class far extends jYe{load([e,r,n],i,a,o){const s=this.prepareQuadRenderer();let d,b,L;const B=async()=>{if(d&&b&&L){try{await this.render(s,L,d,b)}catch(Je){this.manager.itemError(e),this.manager.itemError(r),this.manager.itemError(n),typeof o=="function"&&o(Je),s.disposeOnDemandRenderer();return}typeof i=="function"&&i(s),this.manager.itemEnd(e),this.manager.itemEnd(r),this.manager.itemEnd(n),s.disposeOnDemandRenderer()}};let V=!0,X=0,ie=0,de=!0,ae=0,U=0,ve=!0,Se=0,Pe=0;const Me=()=>{if(typeof a=="function"){const Je=X+ae+Se,nt=ie+U+Pe,ut=V&&de&&ve;a(new ProgressEvent("progress",{lengthComputable:ut,loaded:nt,total:Je}))}};this.manager.itemStart(e),this.manager.itemStart(r),this.manager.itemStart(n);const Ie=new uE(this._internalLoadingManager);Ie.setResponseType("arraybuffer"),Ie.setRequestHeader(this.requestHeader),Ie.setPath(this.path),Ie.setWithCredentials(this.withCredentials),Ie.load(e,async Je=>{if(typeof Je=="string")throw new Error("Invalid sdr buffer");d=Je,await B()},Je=>{V=Je.lengthComputable,ie=Je.loaded,X=Je.total,Me()},Je=>{this.manager.itemError(e),typeof o=="function"&&o(Je)});const Ve=new uE(this._internalLoadingManager);Ve.setResponseType("arraybuffer"),Ve.setRequestHeader(this.requestHeader),Ve.setPath(this.path),Ve.setWithCredentials(this.withCredentials),Ve.load(r,async Je=>{if(typeof Je=="string")throw new Error("Invalid gainmap buffer");b=Je,await B()},Je=>{de=Je.lengthComputable,U=Je.loaded,ae=Je.total,Me()},Je=>{this.manager.itemError(r),typeof o=="function"&&o(Je)});const Ze=new uE(this._internalLoadingManager);return Ze.setRequestHeader(this.requestHeader),Ze.setPath(this.path),Ze.setWithCredentials(this.withCredentials),Ze.load(n,async Je=>{if(typeof Je!="string")throw new Error("Invalid metadata string");L=JSON.parse(Je),await B()},Je=>{ve=Je.lengthComputable,Pe=Je.loaded,Se=Je.total,Me()},Je=>{this.manager.itemError(n),typeof o=="function"&&o(Je)}),s}}class dar extends jYe{load(e,r,n,i){const a=this.prepareQuadRenderer(),o=new uE(this._internalLoadingManager);return o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setPath(this.path),o.setWithCredentials(this.withCredentials),this.manager.itemStart(e),o.load(e,async s=>{if(typeof s=="string")throw new Error("Invalid buffer, received [string], was expecting [ArrayBuffer]");const d=new Uint8Array(s);let b,L,B;try{const V=await car(d);b=V.sdr,L=V.gainMap,B=V.metadata}catch(V){if(V instanceof HYe||V instanceof UYe)console.warn(`Failure to reconstruct an HDR image from ${e}: Gain map metadata not found in the file, HDRJPGLoader will render the SDR jpeg`),B={gainMapMin:[0,0,0],gainMapMax:[1,1,1],gamma:[1,1,1],hdrCapacityMin:0,hdrCapacityMax:1,offsetHdr:[0,0,0],offsetSdr:[0,0,0]},b=d;else throw V}try{await this.render(a,B,b,L)}catch(V){this.manager.itemError(e),typeof i=="function"&&i(V),a.disposeOnDemandRenderer();return}typeof r=="function"&&r(a),this.manager.itemEnd(e),a.disposeOnDemandRenderer()},n,s=>{this.manager.itemError(e),typeof i=="function"&&i(s)}),a}}const cB={apartment:"lebombo_1k.hdr",city:"potsdamer_platz_1k.hdr",dawn:"kiara_1_dawn_1k.hdr",forest:"forest_slope_1k.hdr",lobby:"st_fagans_interior_1k.hdr",night:"dikhololo_night_1k.hdr",park:"rooitou_park_1k.hdr",studio:"studio_small_03_1k.hdr",sunset:"venice_sunset_1k.hdr",warehouse:"empty_warehouse_01_1k.hdr"},VYe="https://raw.githack.com/pmndrs/drei-assets/456060a26bbeb8fdf79326f224b6d99b8bcce736/hdri/",qN=t=>Array.isArray(t),p1e=["/px.png","/nx.png","/py.png","/ny.png","/pz.png","/nz.png"];function bZ({files:t=p1e,path:e="",preset:r=void 0,colorSpace:n=void 0,extensions:i}={}){r&&(v1e(r),t=cB[r],e=VYe);const a=qN(t),{extension:o,isCubemap:s}=m1e(t),d=g1e(o);if(!d)throw new Error("useEnvironment: Unrecognized file extension: "+t);const b=Km(X=>X.gl);ze.useLayoutEffect(()=>{if(o!=="webp"&&o!=="jpg"&&o!=="jpeg")return;function X(){S8.clear(d,a?[t]:t)}b.domElement.addEventListener("webglcontextlost",X,{once:!0})},[t,b.domElement]);const L=S8(d,a?[t]:t,X=>{(o==="webp"||o==="jpg"||o==="jpeg")&&X.setRenderer(b),X.setPath==null||X.setPath(e),i&&i(X)});let B=a?L[0]:L;if(o==="jpg"||o==="jpeg"||o==="webp"){var V;B=(V=B.renderTarget)==null?void 0:V.texture}return B.mapping=s?U5:r4,B.colorSpace=n??(s?"srgb":"srgb-linear"),B}const har={files:p1e,path:"",preset:void 0,extensions:void 0};bZ.preload=t=>{const e={...har,...t};let{files:r,path:n=""}=e;const{preset:i,extensions:a}=e;i&&(v1e(i),r=cB[i],n=VYe);const{extension:o}=m1e(r);if(o==="webp"||o==="jpg"||o==="jpeg")throw new Error("useEnvironment: Preloading gainmaps is not supported");const s=g1e(o);if(!s)throw new Error("useEnvironment: Unrecognized file extension: "+r);S8.preload(s,qN(r)?[r]:r,d=>{d.setPath==null||d.setPath(n),a&&a(d)})};const par={files:p1e,preset:void 0};bZ.clear=t=>{const e={...par,...t};let{files:r}=e;const{preset:n}=e;n&&(v1e(n),r=cB[n]);const{extension:i}=m1e(r),a=g1e(i);if(!a)throw new Error("useEnvironment: Unrecognized file extension: "+r);S8.clear(a,qN(r)?[r]:r)};function v1e(t){if(!(t in cB))throw new Error("Preset must be one of: "+Object.keys(cB).join(", "))}function m1e(t){var e;const r=qN(t)&&t.length===6,n=qN(t)&&t.length===3&&t.some(o=>o.endsWith("json")),i=qN(t)?t[0]:t;return{extension:r?"cube":n?"webp":i.startsWith("data:application/exr")?"exr":i.startsWith("data:application/hdr")?"hdr":i.startsWith("data:image/jpeg")?"jpg":(e=i.split(".").pop())==null||(e=e.split("?"))==null||(e=e.shift())==null?void 0:e.toLowerCase(),isCubemap:r,isGainmap:n}}function g1e(t){return t==="cube"?CWe:t==="hdr"?Unr:t==="exr"?Hnr:t==="jpg"||t==="jpeg"?dar:t==="webp"?far:null}const mar=t=>t.current&&t.current.isScene,gar=t=>mar(t)?t.current:t;function y1e(t,e,r,n,i={}){var a,o,s,d;i={backgroundBlurriness:0,backgroundIntensity:1,backgroundRotation:[0,0,0],environmentIntensity:1,environmentRotation:[0,0,0],...i};const b=gar(e||r),L=b.background,B=b.environment,V={backgroundBlurriness:b.backgroundBlurriness,backgroundIntensity:b.backgroundIntensity,backgroundRotation:(a=(o=b.backgroundRotation)==null||o.clone==null?void 0:o.clone())!==null&&a!==void 0?a:[0,0,0],environmentIntensity:b.environmentIntensity,environmentRotation:(s=(d=b.environmentRotation)==null||d.clone==null?void 0:d.clone())!==null&&s!==void 0?s:[0,0,0]};return t!=="only"&&(b.environment=n),t&&(b.background=n),OC(b,i),()=>{t!=="only"&&(b.environment=B),t&&(b.background=L),OC(b,V)}}function b1e({scene:t,background:e=!1,map:r,...n}){const i=Km(a=>a.scene);return ze.useLayoutEffect(()=>{if(r)return y1e(e,t,i,r,n)}),null}function qYe({background:t=!1,scene:e,blur:r,backgroundBlurriness:n,backgroundIntensity:i,backgroundRotation:a,environmentIntensity:o,environmentRotation:s,...d}){const b=bZ(d),L=Km(B=>B.scene);return ze.useLayoutEffect(()=>y1e(t,e,L,b,{backgroundBlurriness:r??n,backgroundIntensity:i,backgroundRotation:a,environmentIntensity:o,environmentRotation:s})),ze.useEffect(()=>()=>{b.dispose()},[b]),null}function yar({children:t,near:e=.1,far:r=1e3,resolution:n=256,frames:i=1,map:a,background:o=!1,blur:s,backgroundBlurriness:d,backgroundIntensity:b,backgroundRotation:L,environmentIntensity:B,environmentRotation:V,scene:X,files:ie,path:de,preset:ae=void 0,extensions:U}){const ve=Km(Ze=>Ze.gl),Se=Km(Ze=>Ze.scene),Pe=ze.useRef(null),[Me]=ze.useState(()=>new mF),Ie=ze.useMemo(()=>{const Ze=new Eye(n);return Ze.texture.type=Og,Ze},[n]);ze.useEffect(()=>()=>{Ie.dispose()},[Ie]),ze.useLayoutEffect(()=>{if(i===1){const Ze=ve.autoClear;ve.autoClear=!0,Pe.current.update(ve,Me),ve.autoClear=Ze}return y1e(o,X,Se,Ie.texture,{backgroundBlurriness:s??d,backgroundIntensity:b,backgroundRotation:L,environmentIntensity:B,environmentRotation:V})},[t,Me,Ie.texture,X,Se,o,i,ve]);let Ve=1;return o6(()=>{if(i===1/0||Ve<i){const Ze=ve.autoClear;ve.autoClear=!0,Pe.current.update(ve,Me),ve.autoClear=Ze,Ve++}}),ze.createElement(ze.Fragment,null,Krr(ze.createElement(ze.Fragment,null,t,ze.createElement("cubeCamera",{ref:Pe,args:[e,r,Ie]}),ie||ae?ze.createElement(qYe,{background:!0,files:ie,preset:ae,path:de,extensions:U}):a?ze.createElement(b1e,{background:!0,map:a,extensions:U}):null),Me))}function bar(t){var e,r,n,i;const a=bZ(t),o=t.map||a;ze.useMemo(()=>cYe({GroundProjectedEnvImpl:Tnr}),[]),ze.useEffect(()=>()=>{a.dispose()},[a]);const s=ze.useMemo(()=>[o],[o]),d=(e=t.ground)==null?void 0:e.height,b=(r=t.ground)==null?void 0:r.radius,L=(n=(i=t.ground)==null?void 0:i.scale)!==null&&n!==void 0?n:1e3;return ze.createElement(ze.Fragment,null,ze.createElement(b1e,Mr({},t,{map:o})),ze.createElement("groundProjectedEnvImpl",{args:s,scale:L,height:d,radius:b}))}function xar(t){return t.ground?ze.createElement(bar,t):t.map?ze.createElement(b1e,t):t.children?ze.createElement(yar,t):ze.createElement(qYe,t)}const _ar=ze.forwardRef(({scale:t=10,frames:e=1/0,opacity:r=1,width:n=1,height:i=1,blur:a=1,near:o=0,far:s=10,resolution:d=512,smooth:b=!0,color:L="#000000",depthWrite:B=!1,renderOrder:V,...X},ie)=>{const de=ze.useRef(null),ae=Km(Dt=>Dt.scene),U=Km(Dt=>Dt.gl),ve=ze.useRef(null);n=n*(Array.isArray(t)?t[0]:t||1),i=i*(Array.isArray(t)?t[1]:t||1);const[Se,Pe,Me,Ie,Ve,Ze,Je]=ze.useMemo(()=>{const Dt=new cx(d,d),qt=new cx(d,d);qt.texture.generateMipmaps=Dt.texture.generateMipmaps=!1;const Lt=new j_(n,i).rotateX(Math.PI/2),dr=new hc(Lt),Zt=new uZ;Zt.depthTest=Zt.depthWrite=!1,Zt.onBeforeCompile=Vt=>{Vt.uniforms={...Vt.uniforms,ucolor:{value:new Wu(L)}},Vt.fragmentShader=Vt.fragmentShader.replace("void main() {",`uniform vec3 ucolor;
           void main() {
          `),Vt.fragmentShader=Vt.fragmentShader.replace("vec4( vec3( 1.0 - fragCoordZ ), opacity );","vec4( ucolor * fragCoordZ * 2.0, ( 1.0 - fragCoordZ ) * 1.0 );")};const Cr=new eb(znr),yt=new eb(Bnr);return yt.depthTest=Cr.depthTest=!1,[Dt,Lt,Zt,dr,Cr,yt,qt]},[d,n,i,t,L]),nt=Dt=>{Ie.visible=!0,Ie.material=Ve,Ve.uniforms.tDiffuse.value=Se.texture,Ve.uniforms.h.value=Dt*1/256,U.setRenderTarget(Je),U.render(Ie,ve.current),Ie.material=Ze,Ze.uniforms.tDiffuse.value=Je.texture,Ze.uniforms.v.value=Dt*1/256,U.setRenderTarget(Se),U.render(Ie,ve.current),Ie.visible=!1};let ut=0,ht,_t;return o6(()=>{ve.current&&(e===1/0||ut<e)&&(ut++,ht=ae.background,_t=ae.overrideMaterial,de.current.visible=!1,ae.background=null,ae.overrideMaterial=Me,U.setRenderTarget(Se),U.render(ae,ve.current),nt(a),b&&nt(a*.4),U.setRenderTarget(null),de.current.visible=!0,ae.overrideMaterial=_t,ae.background=ht)}),ze.useImperativeHandle(ie,()=>de.current,[]),ze.createElement("group",Mr({"rotation-x":Math.PI/2},X,{ref:de}),ze.createElement("mesh",{renderOrder:V,geometry:Pe,scale:[1,-1,1],rotation:[-Math.PI/2,0,0]},ze.createElement("meshBasicMaterial",{transparent:!0,map:Se.texture,opacity:r,depthWrite:B})),ze.createElement("orthographicCamera",{ref:ve,args:[-n/2,n/2,i/2,-i/2,o,s]}))});function war(t,e){const[r,n]=ze.useState({enabled:!0,enablePan:!0,enableRotate:!0,enableZoom:!0});return ze.useEffect(()=>{if(!t){n({enabled:!0,enablePan:!0,enableRotate:!0,enableZoom:!0});return}const i=e[t];if(!i||i.type!=="Camera"){n({enabled:!0,enablePan:!0,enableRotate:!0,enableZoom:!0});return}const a=!!i.data.position_curve_key,o=!!i.data.target_curve_key;n(a&&o?{enabled:!1,enablePan:!1,enableRotate:!1,enableZoom:!1}:a&&!o?{enabled:!0,enablePan:!1,enableRotate:!0,enableZoom:!1}:!a&&o?{enabled:!0,enablePan:!0,enableRotate:!1,enableZoom:!0}:{enabled:!0,enablePan:!0,enableRotate:!0,enableZoom:!0})},[t,e]),r}const Sar=({data:t})=>{const{mode:e}=HL(),r=cy(),{currentFrame:n,roomId:i,clientId:a,geometryDefaults:o}=rh(),s=$k(t,"Cell",o),[d,b]=ze.useState(null),{data:L,isFetching:B}=_v({queryKey:["frame",i,n,s.position],queryFn:({signal:X})=>ly(i,n,[s.position],X),enabled:!!i&&!!a,placeholderData:D0});ze.useEffect(()=>{if(B)return;const X=L?.[s.position];if(!X){b(null);return}if(X.length!==9){console.error("Invalid cell data length:",X.length,"expected 9"),b(null);return}const ie=[new oi(X[0],X[1],X[2]),new oi(X[3],X[4],X[5]),new oi(X[6],X[7],X[8])],ae=[new oi(0,0,0),ie[0],ie[1],ie[0].clone().add(ie[1]),ie[2],ie[0].clone().add(ie[2]),ie[1].clone().add(ie[2]),ie[0].clone().add(ie[1]).add(ie[2])],U=[[ae[0],ae[1]],[ae[1],ae[3]],[ae[3],ae[2]],[ae[2],ae[0]],[ae[4],ae[5]],[ae[5],ae[7]],[ae[7],ae[6]],[ae[6],ae[4]],[ae[0],ae[4]],[ae[1],ae[5]],[ae[2],ae[6]],[ae[3],ae[7]]];b(U)},[L,B,s.position]);const V=s.color==="default"?e==="light"?r.palette.primary.dark:r.palette.primary.light:s.color;return Ke.jsx("group",{children:d&&d.map((X,ie)=>Ke.jsx(CYe,{points:X,color:V,lineWidth:s.thickness,dashed:s.material==="LineDashedMaterial"},ie))})},Tar=({data:t})=>{const{scene:e}=Km(),{roomId:r,userId:n,geometryDefaults:i}=rh(),a=ze.useRef(null),{mode:o}=HL();cy();const s=$k(t,"Floor",i),{data:d}=Ek(r||"",n||"","settings","camera"),{data:b}=Ek(r||"",n||"","settings","studio_lighting"),L=(d?.far_plane||300)*2,B=Math.min(L*.3,150),V=s.color==="default"?o==="light"?"#e0e0e0":"#303030":s.color,X=s.grid_color==="default"?o==="light"?"#616161":"#9e9e9e":s.grid_color;ze.useEffect(()=>{if(!s.fog_enabled){e.fog=null;return}const de=b?.background_color==="default"?o==="light"?"#FFFFFF":"#212121":b?.background_color||"#FFFFFF",ae=d?.far_plane||300,U=ae*.6,ve=ae;return e.fog=new gU(de,U,ve),()=>{e.fog=null}},[s.fog_enabled,d?.far_plane,b?.background_color,o,e]),ze.useEffect(()=>{if(!a.current||!s.show_grid)return;const de=a.current;de.position.y=s.height,de.material instanceof q_&&(de.material.opacity=s.grid_opacity,de.material.transparent=!0,de.material.color.set(X))},[s.height,X,s.grid_opacity,s.show_grid]);const ie=Math.floor(L/s.grid_spacing);return Ke.jsxs("group",{children:[Ke.jsxs("mesh",{rotation:[-Math.PI/2,0,0],position:[0,s.height-.01,0],receiveShadow:!0,children:[Ke.jsx("planeGeometry",{args:[L,L]}),Ke.jsx("meshStandardMaterial",{color:V,roughness:.8,metalness:.2})]}),s.show_grid&&Ke.jsx("gridHelper",{ref:a,args:[L,ie,X,X],position:[0,s.height,0]}),s.show_shadows&&Ke.jsx(_ar,{position:[0,s.height+.01,0],opacity:s.shadow_opacity,scale:B,blur:s.shadow_blur,far:20,resolution:512})]})},m4e={"MeshPhysicalMaterial (matt)":{component:"meshPhysicalMaterial",defaultProps:{roughness:.9,reflectivity:.1,clearcoat:0,metalness:0,transmission:0,ior:1.45}},"MeshPhysicalMaterial (semi-gloss)":{component:"meshPhysicalMaterial",defaultProps:{roughness:.5,reflectivity:.4,clearcoat:.2,metalness:0,transmission:0,ior:1.45}},"MeshPhysicalMaterial (shiny)":{component:"meshPhysicalMaterial",defaultProps:{roughness:.2,reflectivity:.6,clearcoat:.4,clearcoatRoughness:.1,metalness:0,transmission:0,ior:1.45}},"MeshPhysicalMaterial (transparent)":{component:"meshPhysicalMaterial",defaultProps:{roughness:.6,reflectivity:.3,clearcoat:.1,transmission:.6,opacity:.6,transparent:!0,thickness:.2,ior:1.2,depthWrite:!1}},"MeshPhysicalMaterial (glass)":{component:"meshPhysicalMaterial",defaultProps:{roughness:.05,reflectivity:.7,clearcoat:.5,clearcoatRoughness:.1,transmission:1,opacity:.25,transparent:!0,thickness:.5,ior:1.5,envMapIntensity:1,depthWrite:!1}},"MeshStandardMaterial (matt)":{component:"meshStandardMaterial",defaultProps:{roughness:.8,metalness:0}},"MeshStandardMaterial (metallic)":{component:"meshStandardMaterial",defaultProps:{roughness:.3,metalness:1}},MeshBasicMaterial:{component:"meshBasicMaterial",defaultProps:{toneMapped:!1}},MeshToonMaterial:{component:"meshToonMaterial",defaultProps:{gradientMap:void 0}},"MeshLambertMaterial (matt)":{component:"meshLambertMaterial",defaultProps:{}},"MeshPhongMaterial (classic)":{component:"meshPhongMaterial",defaultProps:{shininess:30,specular:new Wu(.2,.2,.2)}}},g4e="MeshPhysicalMaterial (matt)";function SU(t,e,r,n){const a=m4e[t||g4e]||m4e[g4e],o=a.component,s={color:"white",side:n||dx,...a.defaultProps,transparent:e!==void 0&&e<1,opacity:e!==void 0?e:1};switch(o){case"meshPhysicalMaterial":return Ke.jsx("meshPhysicalMaterial",{...s});case"meshStandardMaterial":return Ke.jsx("meshStandardMaterial",{...s});case"meshBasicMaterial":return Ke.jsx("meshBasicMaterial",{...s});case"meshToonMaterial":return Ke.jsx("meshToonMaterial",{...s});case"meshLambertMaterial":return Ke.jsx("meshLambertMaterial",{...s});case"meshPhongMaterial":return Ke.jsx("meshPhongMaterial",{...s});default:return Ke.jsx("meshPhysicalMaterial",{...s})}}const GC=1.01,E8=1.25;function aL(t,e,r){let n=[];if(e)n=Array.from(e);else if(typeof t!="string"&&typeof t!="number"){if(Array.isArray(t)&&t.length>0){const i=t[0];Array.isArray(i)?n=t.flat():typeof i=="number"&&(t.length===1||t.length===3?n=Array(r).fill([...t]).flat():n=t)}}else typeof t=="number"&&(n=Array(r).fill(t));return n}function TU(t,e,r){let n=[];if(e)n=Array.from(e);else if(typeof t=="string"){const i=Xke(t);if(i)n=Array(r).fill(i).flat();else throw new Error(`Invalid hex color: ${t}`)}else Array.isArray(t)&&(typeof t[0]=="string"?n=t.flatMap(i=>{const a=Xke(i);if(!a)throw new Error(`Invalid hex color: ${i}`);return a}):Array.isArray(t[0])?n=t.flat():t.length===3&&typeof t[0]=="number"?n=Array(r).fill([...t]).flat():n=t);return n}function Ear(t,e,r){if(e)return Array.from(e);if(typeof t!="string"&&Array.isArray(t)){const n=t[0];if(Array.isArray(n))return t.flat();if(t.length===2&&typeof n=="number")return Array(r).fill([...t]).flat()}return[]}function Aar(t,e,r){if(e)return Array.from(e);if(typeof t!="string"&&Array.isArray(t)){const n=t[0];if(Array.isArray(n))return t.flat();if(t.length===3&&typeof n=="number")return Array(r).fill([...t]).flat()}return[]}function GYe(t,e,r){return e?Array.from(e):Array.isArray(t)?typeof t[0]=="number"?Array(r).fill([...t]).flat():t.flat():[]}function $Ye(t,e){return e?Array.from(e):typeof t!="string"&&Array.isArray(t)?Array.isArray(t[0])?t.flat():t:[]}function xZ(t,e){for(const[r,n]of Object.entries(t)){const i=e[r];if(n.length!==i)return console.error(`${r} has incorrect length: expected ${i}, got ${n.length}`),!1}return!0}function _Z(t,e){return e?e.length/3:Array.isArray(t)?Array.isArray(t[0])?t.length:t.length/3:0}const y1=new oi,b5=new oi,xq=new oi,EP=new fh,zP=new $2,P0=new Rc,i4=new Wu,Car=new VC(-1,1,1,-1,0,1);class Mar extends Jf{constructor(){super(),this.setAttribute("position",new Dc([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new Dc([0,2,0,0,2,0],2))}}const Rar=new Mar;class A8{constructor(e){this._mesh=new hc(Rar,e)}dispose(){this._mesh.geometry.dispose()}render(e){e.render(this._mesh,Car)}get material(){return this._mesh.material}set material(e){this._mesh.material=e}}function WYe(t,e=!1){const r=t[0].index!==null,n=new Set(Object.keys(t[0].attributes)),i=new Set(Object.keys(t[0].morphAttributes)),a={},o={},s=t[0].morphTargetsRelative,d=new Jf;let b=0;for(let L=0;L<t.length;++L){const B=t[L];let V=0;if(r!==(B.index!==null))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+L+". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."),null;for(const X in B.attributes){if(!n.has(X))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+L+'. All geometries must have compatible attributes; make sure "'+X+'" attribute exists among all geometries, or in none of them.'),null;a[X]===void 0&&(a[X]=[]),a[X].push(B.attributes[X]),V++}if(V!==n.size)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+L+". Make sure all geometries have the same number of attributes."),null;if(s!==B.morphTargetsRelative)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+L+". .morphTargetsRelative must be consistent throughout all geometries."),null;for(const X in B.morphAttributes){if(!i.has(X))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+L+".  .morphAttributes must be consistent throughout all geometries."),null;o[X]===void 0&&(o[X]=[]),o[X].push(B.morphAttributes[X])}if(e){let X;if(r)X=B.index.count;else if(B.attributes.position!==void 0)X=B.attributes.position.count;else return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+L+". The geometry must have either an index or a position attribute"),null;d.addGroup(b,X,L),b+=X}}if(r){let L=0;const B=[];for(let V=0;V<t.length;++V){const X=t[V].index;for(let ie=0;ie<X.count;++ie)B.push(X.getX(ie)+L);L+=t[V].attributes.position.count}d.setIndex(B)}for(const L in a){const B=y4e(a[L]);if(!B)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+L+" attribute."),null;d.setAttribute(L,B)}for(const L in o){const B=o[L][0].length;if(B===0)break;d.morphAttributes=d.morphAttributes||{},d.morphAttributes[L]=[];for(let V=0;V<B;++V){const X=[];for(let de=0;de<o[L].length;++de)X.push(o[L][de][V]);const ie=y4e(X);if(!ie)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+L+" morphAttribute."),null;d.morphAttributes[L].push(ie)}}return d}function y4e(t){let e,r,n,i=-1,a=0;for(let b=0;b<t.length;++b){const L=t[b];if(e===void 0&&(e=L.array.constructor),e!==L.array.constructor)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."),null;if(r===void 0&&(r=L.itemSize),r!==L.itemSize)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."),null;if(n===void 0&&(n=L.normalized),n!==L.normalized)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."),null;if(i===-1&&(i=L.gpuType),i!==L.gpuType)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.gpuType must be consistent across matching attributes."),null;a+=L.count*r}const o=new e(a),s=new Kh(o,r,n);let d=0;for(let b=0;b<t.length;++b){const L=t[b];if(L.isInterleavedBufferAttribute){const B=d/r;for(let V=0,X=L.count;V<X;V++)for(let ie=0;ie<r;ie++){const de=L.getComponent(V,ie);s.setComponent(V+B,ie,de)}}else o.set(L.array,d);d+=L.count*r}return i!==void 0&&(s.gpuType=i),s}function EU(t,e){const r=t.geometry,n=t.material,i=t.count;if(i===0){console.warn("[convertInstancedMesh] Instance count is 0, returning empty mesh");const ie=Array.isArray(n)?n[0].clone():n.clone();return new hc(new Jf,ie)}if(!r||!r.attributes.position)throw new Error("Base geometry is invalid or missing position attribute");const a=new Rc,o=new Wu,s=[],d=new oi,b=new fh,L=new oi;for(let ie=0;ie<i;ie++){t.getMatrixAt(ie,a),a.decompose(d,b,L);const de=r.clone();if(de.applyMatrix4(new Rc().compose(d,b,L)),t.instanceColor){t.getColorAt(ie,o);const ae=[],U=de.attributes.position.count;for(let ve=0;ve<U;ve++)ae.push(o.r,o.g,o.b);de.setAttribute("color",new Dc(ae,3))}s.push(de)}let B;try{B=WYe(s,!0)}catch(ie){throw console.error("[convertInstancedMesh] Error merging geometries:",ie),ie}s.forEach(ie=>ie.dispose()),B.computeBoundingBox(),B.computeBoundingSphere();let V;{const ie=Array.isArray(n)?n[0].clone():n.clone();"vertexColors"in ie&&(ie.vertexColors=!0),V=ie}return new hc(B,V)}function G2(t){t.geometry&&t.geometry.dispose(),t.material&&(Array.isArray(t.material)?t.material.forEach(e=>e.dispose()):t.material.dispose())}function kar({data:t,geometryKey:e,pathtracingEnabled:r=!1}){const{geometryDefaults:n}=rh(),i=$k(t,"Sphere",n),{position:a,color:o,radius:s,material:d,resolution:b,scale:L,selecting:B,hovering:V,opacity:X}=i,ie=ze.useRef(null),de=ze.useRef(null),ae=ze.useRef(null),U=ze.useRef(null),[ve,Se]=ze.useState(0),{currentFrame:Pe,roomId:Me,clientId:Ie,selections:Ve,updateSelections:Ze,setDrawingPointerPosition:Je,isDrawing:nt,setDrawingIsValid:ut,setGeometryFetching:ht,removeGeometryFetching:_t,hoveredGeometryInstance:Dt,setHoveredGeometryInstance:qt,setParticleCount:Lt,requestPathtracingUpdate:dr}=rh(),Zt=Ve[e]||[],Cr=ze.useMemo(()=>new Set(Zt),[Zt]),yt=ze.useMemo(()=>Array.from(Cr),[Cr]),Vt=ze.useMemo(()=>yt.filter(Sn=>Sn<ve),[yt,ve]),Er=b||8,sr=L||1,{data:or,isFetching:Ar}=_v({queryKey:["frame",Me,Pe,a],queryFn:({signal:Sn})=>ly(Me,Pe,[a],Sn),enabled:!!Me&&!!Ie&&typeof a=="string",placeholderData:D0}),{data:Ir,isFetching:_n}=_v({queryKey:["frame",Me,Pe,o],queryFn:({signal:Sn})=>ly(Me,Pe,[o],Sn),enabled:!!Me&&!!Ie&&typeof o=="string"&&ZC(o),placeholderData:D0}),{data:Un,isFetching:Qn}=_v({queryKey:["frame",Me,Pe,s],queryFn:({signal:Sn})=>ly(Me,Pe,[s],Sn),enabled:!!Me&&!!Ie&&typeof s=="string",placeholderData:D0}),Jn=typeof a=="string"&&Ar||typeof o=="string"&&ZC(o)&&_n||typeof s=="string"&&Qn;ze.useEffect(()=>{ht(e,Jn)},[e,Jn,ht]),ze.useEffect(()=>()=>{_t(e)},[e,_t]),ze.useEffect(()=>{if(!Jn)try{const Sn=typeof a=="string"?or?.[a]:void 0,bn=_Z(a,Sn);if(bn===0){ve!==0&&Se(0);return}const Mn=aL(a,Sn,bn),gi=typeof o=="string"?Ir?.[o]:void 0,Oi=TU(o,gi,bn),Pa=typeof s=="string"?Un?.[s]:void 0,va=aL(s,Pa,bn);if(!xZ({positions:Mn,colors:Oi,radii:va},{positions:bn*3,colors:bn*3,radii:bn})){console.error("Sphere/Particles data is invalid or has inconsistent lengths."),ve!==0&&Se(0);return}if(ve!==bn){Se(bn),Lt(bn);return}const Tn=ie.current;if(!Tn)return;for(let bi=0;bi<bn;bi++){const Wn=bi*3;y1.set(Mn[Wn],Mn[Wn+1],Mn[Wn+2]);const Ei=va[bi]*sr;P0.identity().setPosition(y1).scale(y1.set(Ei,Ei,Ei)),Tn.setMatrixAt(bi,P0),i4.setRGB(Oi[Wn],Oi[Wn+1],Oi[Wn+2]),Tn.setColorAt(bi,i4)}if(Tn.instanceMatrix.setUsage(qX),Tn.instanceMatrix.needsUpdate=!0,Tn.instanceColor&&(Tn.instanceColor.needsUpdate=!0),Tn.computeBoundingBox(),Tn.computeBoundingSphere(),B.enabled&&de.current){const bi=de.current;Vt.forEach((Wn,Ei)=>{if(Wn>=bn)return;const Ki=Wn*3;y1.set(Mn[Ki],Mn[Ki+1],Mn[Ki+2]);const sa=va[Wn]*sr*GC;P0.identity().setPosition(y1).scale(y1.set(sa,sa,sa)),bi.setMatrixAt(Ei,P0)}),bi.instanceMatrix.needsUpdate=!0,bi.computeBoundingBox(),bi.computeBoundingSphere()}}catch(Sn){console.error("Error processing Sphere/Particles data:",Sn),ve!==0&&Se(0)}},[Jn,or,Ir,Un,a,o,s,ve,sr,Vt,B]),ze.useEffect(()=>{if(!V?.enabled||!ae.current||!ie.current||ve===0)return;const Sn=ae.current,bn=ie.current;if(Dt?.geometryKey===e&&Dt?.instanceId!==null&&Dt.instanceId<ve){Sn.visible=!0;const Mn=new Rc;bn.getMatrixAt(Dt.instanceId,Mn);const gi=new oi,Oi=new oi;Mn.decompose(gi,new fh,Oi),Sn.position.copy(gi),Sn.scale.copy(Oi).multiplyScalar(E8)}else Sn.visible=!1},[Dt,ve,V,e]),ze.useEffect(()=>{if(!r){U.current&&(G2(U.current),U.current=null);return}if(!ie.current||ve===0)return;U.current&&G2(U.current);const Sn=EU(ie.current);return U.current=Sn,dr(),()=>{U.current&&(G2(U.current),U.current=null)}},[r,ve,e,dr]);const Vn=ze.useMemo(()=>new n6(1,Er,Er),[Er]),jn=ze.useCallback(Sn=>{Sn.detail!==1||Sn.instanceId===void 0||(Sn.stopPropagation(),Ze(e,Sn.instanceId,Sn.shiftKey))},[Ze,e]),Lr=ze.useCallback(Sn=>{Sn.instanceId!==void 0&&(Sn.stopPropagation(),nt&&Je(Sn.point))},[nt,Je]),Yn=ze.useCallback(Sn=>{Sn.instanceId!==void 0&&(Sn.stopPropagation(),qt(e,Sn.instanceId),ut(!0))},[ut,qt,e]),On=ze.useCallback(()=>{qt(null,null),ut(!1)},[ut,qt]);return!Ie||!Me?null:Ke.jsxs("group",{children:[Ke.jsxs("instancedMesh",{ref:ie,args:[void 0,void 0,ve],visible:!r,onClick:!r&&B.enabled?jn:void 0,onPointerEnter:!r&&V?.enabled?Yn:void 0,onPointerMove:!r&&V?.enabled?Lr:void 0,onPointerOut:!r&&V?.enabled?On:void 0,children:[Ke.jsx("primitive",{object:Vn,attach:"geometry"}),SU(d,X)]},ve),!r&&B.enabled&&Ke.jsxs("instancedMesh",{ref:de,args:[void 0,void 0,Vt.length],children:[Ke.jsx("primitive",{object:Vn,attach:"geometry"}),Ke.jsx("meshBasicMaterial",{side:dx,transparent:!0,opacity:B.opacity,color:B.color})]},`selection-${Vt.length}`),!r&&V?.enabled&&Ke.jsxs("mesh",{ref:ae,visible:!1,children:[Ke.jsx("primitive",{object:Vn,attach:"geometry"}),Ke.jsx("meshBasicMaterial",{side:x1,transparent:!0,opacity:V.opacity,color:V.color})]}),r&&U.current&&Ke.jsx("primitive",{object:U.current})]})}const b4e=new oi(0,1,0);function Iar(){const i=new Wx(.04,.04,.6,32),a=new yF(.1,.4,32);return i.translate(0,.6/2,0),a.translate(0,.6+.4/2,0),WYe([i,a])}function Par({data:t,geometryKey:e,pathtracingEnabled:r=!1}){const{geometryDefaults:n}=rh(),i=$k(t,"Arrow",n),{position:a,direction:o,color:s,radius:d,scale:b,material:L,opacity:B,selecting:V,hovering:X}=i,ie=ze.useRef(null),de=ze.useRef(null),ae=ze.useRef(null),U=ze.useRef(null),[ve,Se]=ze.useState(0),{currentFrame:Pe,roomId:Me,clientId:Ie,selections:Ve,updateSelections:Ze,hoveredGeometryInstance:Je,setHoveredGeometryInstance:nt,setDrawingPointerPosition:ut,isDrawing:ht,setDrawingIsValid:_t,setGeometryFetching:Dt,removeGeometryFetching:qt,requestPathtracingUpdate:Lt}=rh(),dr=Ve[e]||[],Zt=ze.useMemo(()=>new Set(dr),[dr]),Cr=ze.useMemo(()=>Array.from(Zt),[Zt]),yt=ze.useMemo(()=>Cr.filter(bn=>bn<ve),[Cr,ve]),{data:Vt,isFetching:Er}=_v({queryKey:["frame",Me,Pe,a],queryFn:({signal:bn})=>ly(Me,Pe,[a],bn),enabled:!!Me&&!!Ie&&typeof a=="string",placeholderData:D0}),{data:sr,isFetching:or}=_v({queryKey:["frame",Me,Pe,o],queryFn:({signal:bn})=>ly(Me,Pe,[o],bn),enabled:!!Me&&!!Ie&&typeof o=="string",placeholderData:D0}),{data:Ar,isFetching:Ir}=_v({queryKey:["frame",Me,Pe,s],queryFn:({signal:bn})=>ly(Me,Pe,[s],bn),enabled:!!Me&&!!Ie&&typeof s=="string"&&ZC(s),placeholderData:D0}),{data:_n,isFetching:Un}=_v({queryKey:["frame",Me,Pe,d],queryFn:({signal:bn})=>ly(Me,Pe,[d],bn),enabled:!!Me&&!!Ie&&typeof d=="string",placeholderData:D0}),{data:Qn,isFetching:Jn}=_v({queryKey:["frame",Me,Pe,b],queryFn:({signal:bn})=>ly(Me,Pe,[b],bn),enabled:!!Me&&!!Ie&&typeof b=="string",placeholderData:D0}),Vn=typeof a=="string"&&Er||typeof o=="string"&&or||typeof s=="string"&&ZC(s)&&Ir||typeof d=="string"&&Un||typeof b=="string"&&Jn;ze.useEffect(()=>{Dt(e,Vn)},[e,Vn,Dt]),ze.useEffect(()=>()=>{qt(e)},[e,qt]),ze.useEffect(()=>{if(!Vn)try{const bn=typeof a=="string"?Vt?.[a]:void 0,Mn=_Z(a,bn);if(Mn===0){ve!==0&&Se(0);return}const gi=aL(a,bn,Mn),Oi=typeof s=="string"?Ar?.[s]:void 0,Pa=TU(s,Oi,Mn),va=typeof d=="string"?_n?.[d]:void 0,ti=aL(d,va,Mn),Tn=typeof o=="string"?sr?.[o]:void 0,bi=aL(o,Tn,Mn),Wn=typeof b=="string"?Qn?.[b]:void 0,Ei=aL(b,Wn,Mn);if(!xZ({positions:gi,directions:bi,colors:Pa,radii:ti,scales:Ei},{positions:Mn*3,directions:Mn*3,colors:Mn*3,radii:Mn,scales:Mn})){console.error("Arrow data is invalid or has inconsistent lengths."),ve!==0&&Se(0);return}if(ve!==Mn){Se(Mn);return}const sa=ie.current;if(!sa)return;for(let xa=0;xa<Mn;xa++){const Qa=xa*3;y1.set(gi[Qa],gi[Qa+1],gi[Qa+2]),b5.set(bi[Qa],bi[Qa+1],bi[Qa+2]);const is=b5.length()*Ei[xa],go=ti[xa];xq.set(go,is,go),is>1e-6?EP.setFromUnitVectors(b4e,b5.normalize()):EP.identity(),P0.compose(y1,EP,xq),sa.setMatrixAt(xa,P0),i4.setRGB(Pa[Qa],Pa[Qa+1],Pa[Qa+2]),sa.setColorAt(xa,i4)}if(sa.instanceMatrix.needsUpdate=!0,sa.instanceColor&&(sa.instanceColor.needsUpdate=!0),sa.computeBoundingBox(),sa.computeBoundingSphere(),V.enabled&&de.current){const xa=de.current;yt.forEach((Qa,is)=>{if(Qa>=Mn)return;const go=Qa*3;y1.set(gi[go],gi[go+1],gi[go+2]),b5.set(bi[go],bi[go+1],bi[go+2]);const Co=b5.length()*Ei[Qa],Ko=ti[Qa]*GC;xq.set(Ko,Co*GC,Ko),Co>1e-6?EP.setFromUnitVectors(b4e,b5.normalize()):EP.identity(),P0.compose(y1,EP,xq),xa.setMatrixAt(is,P0)}),xa.instanceMatrix.needsUpdate=!0,xa.computeBoundingBox(),xa.computeBoundingSphere()}}catch(bn){console.error("Error processing Arrow data:",bn),ve!==0&&Se(0)}},[Vn,Vt,sr,Ar,_n,Qn,a,o,s,d,b,ve,yt,V,e]),ze.useEffect(()=>{if(!X?.enabled||!ae.current||!ie.current||ve===0)return;const bn=ae.current,Mn=ie.current;if(Je?.geometryKey===e&&Je?.instanceId!==null&&Je.instanceId<ve){bn.visible=!0;const gi=new Rc;Mn.getMatrixAt(Je.instanceId,gi);const Oi=new oi,Pa=new fh,va=new oi;gi.decompose(Oi,Pa,va),bn.position.copy(Oi),bn.quaternion.copy(Pa),bn.scale.copy(va).multiplyScalar(E8)}else bn.visible=!1},[Je,ve,X,e]),ze.useEffect(()=>{if(!r){U.current&&(G2(U.current),U.current=null);return}if(!ie.current||ve===0)return;U.current&&G2(U.current);const bn=EU(ie.current);return U.current=bn,Lt(),()=>{U.current&&(G2(U.current),U.current=null)}},[r,ve,e,Lt]);const jn=ze.useMemo(Iar,[]),Lr=ze.useCallback(bn=>{bn.detail!==1||bn.instanceId===void 0||(bn.stopPropagation(),Ze(e,bn.instanceId,bn.shiftKey))},[Ze,e]),Yn=ze.useCallback(bn=>{bn.instanceId!==void 0&&(bn.stopPropagation(),ht&&ut(bn.point))},[ht,ut]),On=ze.useCallback(bn=>{bn.instanceId!==void 0&&(bn.stopPropagation(),nt(e,bn.instanceId),_t(!0))},[nt,_t,e]),Sn=ze.useCallback(()=>{nt(null,null),_t(!1)},[nt,_t]);return!Ie||!Me?null:Ke.jsxs("group",{children:[Ke.jsx("instancedMesh",{ref:ie,args:[jn,void 0,ve],visible:!r,onClick:!r&&V.enabled?Lr:void 0,onPointerEnter:!r&&X?.enabled?On:void 0,onPointerMove:!r&&X?.enabled?Yn:void 0,onPointerOut:!r&&X?.enabled?Sn:void 0,children:SU(L,B)},ve),!r&&V.enabled&&Ke.jsx("instancedMesh",{ref:de,args:[jn,void 0,yt.length],children:Ke.jsx("meshBasicMaterial",{side:dx,transparent:!0,opacity:V.opacity,color:V.color})},`selection-${yt.length}`),!r&&X?.enabled&&Ke.jsxs("mesh",{ref:ae,visible:!1,children:[Ke.jsx("primitive",{object:jn,attach:"geometry"}),Ke.jsx("meshBasicMaterial",{side:x1,transparent:!0,opacity:X.opacity,color:X.color})]}),r&&U.current&&Ke.jsx("primitive",{object:U.current})]})}const x4e=new oi(0,1,0),_4e=new Wu,w4e=new Wu,S4e=new fh;function Dar({data:t,geometryKey:e,pathtracingEnabled:r=!1}){const{geometryDefaults:n}=rh(),i=$k(t,"Bond",n),{position:a,color:o,radius:s,connectivity:d,material:b,resolution:L,scale:B,opacity:V,selecting:X,hovering:ie}=i,de=ze.useRef(null),ae=ze.useRef(null),U=ze.useRef(null),ve=ze.useRef(null),[Se,Pe]=ze.useState(null),[Me,Ie]=ze.useState(0),[Ve,Ze]=ze.useState([]),{roomId:Je,currentFrame:nt,clientId:ut,selections:ht,updateSelections:_t,setGeometryFetching:Dt,removeGeometryFetching:qt,requestPathtracingUpdate:Lt}=rh(),dr=ht[e]||[],Zt=ze.useMemo(()=>new Set(dr),[dr]),Cr=ze.useMemo(()=>{const Sn=[];let bn=0;for(let Mn=0;Mn<Ve.length;Mn++)Zt.has(Mn)&&(Sn.push(bn),Sn.push(bn+1)),bn+=2;return Sn},[Ve,Zt]),yt=L||8,Vt=B||1,{data:Er,isFetching:sr}=_v({queryKey:["frame",Je,nt,a],queryFn:({signal:Sn})=>ly(Je,nt,[a],Sn),enabled:!!Je&&!!ut&&typeof a=="string",placeholderData:D0}),{data:or,isFetching:Ar}=_v({queryKey:["frame",Je,nt,o],queryFn:({signal:Sn})=>ly(Je,nt,[o],Sn),enabled:!!Je&&!!ut&&typeof o=="string"&&ZC(o),placeholderData:D0}),{data:Ir,isFetching:_n}=_v({queryKey:["frame",Je,nt,s],queryFn:({signal:Sn})=>ly(Je,nt,[s],Sn),enabled:!!Je&&!!ut&&typeof s=="string",placeholderData:D0}),{data:Un,isFetching:Qn}=_v({queryKey:["frame",Je,nt,d],queryFn:({signal:Sn})=>ly(Je,nt,[d],Sn),enabled:!!Je&&!!ut&&typeof d=="string",placeholderData:D0}),Jn=typeof a=="string"&&sr||typeof o=="string"&&ZC(o)&&Ar||typeof s=="string"&&_n||typeof d=="string"&&Qn;ze.useEffect(()=>{Dt(e,Jn)},[e,Jn,Dt]),ze.useEffect(()=>()=>{qt(e)},[e,qt]),ze.useEffect(()=>{if(!Jn)try{const Sn=typeof a=="string"?Er?.[a]:void 0;let bn=0,Mn=[];if(Sn?(bn=Sn.length/3,Mn=Array.from(Sn)):typeof a!="string"&&(Array.isArray(a)&&Array.isArray(a[0])?(bn=a.length,Mn=a.flat()):Array.isArray(a)&&(bn=a.length/3,Mn=a)),bn===0){Me!==0&&Ie(0);return}const gi=typeof o=="string"?or?.[o]:void 0,Oi=TU(o,gi,bn),Pa=typeof s=="string"?Ir?.[s]:void 0,va=aL(s,Pa,bn),Tn=(typeof d=="string"?Un?.[d]:void 0)||d,bi=[];if(Tn&&Tn.length>0)if(Array.isArray(Tn[0]))Tn.forEach(sa=>bi.push([sa[0],sa[1]]));else for(let sa=0;sa<Tn.length;sa+=3)bi.push([Tn[sa],Tn[sa+1]]);if(bi.length===0){Me!==0&&Ie(0),Ve.length!==0&&Ze([]);return}const Wn=bi.length*2;if(Me!==Wn){Ie(Wn),Ze(bi);return}JSON.stringify(Ve)!==JSON.stringify(bi)&&Ze(bi);const Ei=de.current;if(!Ei)return;let Ki=0;for(const sa of bi){const[xa,Qa]=sa;if(xa>=bn||Qa>=bn)continue;const is=xa*3,go=Qa*3;y1.fromArray(Mn,is),b5.fromArray(Mn,go);const Co=b5.clone().sub(y1),Ko=Co.length(),Zi=va[xa]*Vt,za=Ko/2;EP.setFromUnitVectors(x4e,Co.clone().normalize()),P0.compose(y1,EP,new oi(Zi,za,Zi)),Ei.setMatrixAt(Ki,P0),_4e.setRGB(Oi[is],Oi[is+1],Oi[is+2]),Ei.setColorAt(Ki,_4e),Ki++;const Ss=y1.clone().sub(b5);S4e.setFromUnitVectors(x4e,Ss.clone().normalize()),P0.compose(b5,S4e,new oi(Zi,za,Zi)),Ei.setMatrixAt(Ki,P0),w4e.setRGB(Oi[go],Oi[go+1],Oi[go+2]),Ei.setColorAt(Ki,w4e),Ki++}if(Ei.instanceMatrix.needsUpdate=!0,Ei.instanceColor&&(Ei.instanceColor.needsUpdate=!0),Ei.computeBoundingBox(),Ei.computeBoundingSphere(),X.enabled&&ae.current){const sa=ae.current;Cr.forEach((xa,Qa)=>{Ei.getMatrixAt(xa,P0),P0.scale(new oi(GC,GC,GC)),sa.setMatrixAt(Qa,P0)}),sa.instanceMatrix.needsUpdate=!0,sa.computeBoundingBox(),sa.computeBoundingSphere()}if(ie?.enabled&&U.current){const sa=U.current;if(Se!==null&&Se<Wn){sa.visible=!0,Ei.getMatrixAt(Se,P0);const xa=new oi,Qa=new fh,is=new oi;P0.decompose(xa,Qa,is),sa.position.copy(xa),sa.quaternion.copy(Qa),sa.scale.copy(is).multiplyScalar(E8)}else sa.visible=!1}}catch(Sn){console.error("Error processing Bonds data:",Sn),Me!==0&&Ie(0)}},[Jn,Er,or,Ir,Un,a,o,s,d,Me,Vt,X,Cr,ie,Se]),ze.useEffect(()=>{if(!r){ve.current&&(G2(ve.current),ve.current=null);return}if(!de.current||Me===0)return;ve.current&&G2(ve.current);const Sn=EU(de.current);return ve.current=Sn,Lt(),()=>{ve.current&&(G2(ve.current),ve.current=null)}},[r,Me,e,Lt]);const Vn=ze.useMemo(()=>{const Sn=new Wx(1,1,1,yt,1);return Sn.translate(0,.5,0),Sn},[yt]),jn=ze.useCallback(Sn=>{if(Sn.detail!==1||Sn.instanceId===void 0)return;Sn.stopPropagation();const bn=Math.floor(Sn.instanceId/2);_t(e,bn,Sn.shiftKey)},[_t,e]),Lr=ze.useCallback(Sn=>{Sn.instanceId!==void 0&&(Sn.stopPropagation(),Pe(Sn.instanceId))},[]),Yn=ze.useCallback(Sn=>{Sn.instanceId!==void 0&&(Sn.stopPropagation(),Pe(Sn.instanceId))},[]),On=ze.useCallback(()=>Pe(null),[]);return!ut||!Je?null:Ke.jsxs("group",{children:[Ke.jsx("instancedMesh",{ref:de,args:[Vn,void 0,Me],visible:!r,onClick:!r&&X.enabled?jn:void 0,onPointerEnter:!r&&ie.enabled?Lr:void 0,onPointerMove:!r&&ie.enabled?Yn:void 0,onPointerOut:!r&&ie.enabled?On:void 0,children:SU(b,V)},Me),!r&&Ke.jsxs(Ke.Fragment,{children:[X.enabled&&Ke.jsx("instancedMesh",{ref:ae,args:[Vn,void 0,Cr.length],children:Ke.jsx("meshBasicMaterial",{side:dx,transparent:!0,opacity:X.opacity,color:X.color||"#FFFF00"})},`selection-${Cr.length}`),ie?.enabled&&Ke.jsxs("mesh",{ref:U,visible:!1,children:[Ke.jsx("primitive",{object:Vn,attach:"geometry"}),Ke.jsx("meshBasicMaterial",{side:x1,transparent:!0,opacity:ie.opacity,color:ie.color||"#00FFFF"})]})]}),r&&ve.current&&Ke.jsx("primitive",{object:ve.current})]})}function Lar({data:t,geometryKey:e,pathtracingEnabled:r=!1}){const{geometryDefaults:n}=rh(),i=$k(t,"Box",n),{position:a,size:o,color:s,rotation:d,material:b,scale:L,selecting:B,hovering:V}=i,X=ze.useRef(null),ie=ze.useRef(null),de=ze.useRef(null),ae=ze.useRef(null),[U,ve]=ze.useState(0),{currentFrame:Se,roomId:Pe,clientId:Me,selections:Ie,updateSelections:Ve,hoveredGeometryInstance:Ze,setHoveredGeometryInstance:Je,setDrawingPointerPosition:nt,isDrawing:ut,setDrawingIsValid:ht,setGeometryFetching:_t,removeGeometryFetching:Dt,requestPathtracingUpdate:qt}=rh(),Lt=Ie[e]||[],dr=ze.useMemo(()=>new Set(Lt),[Lt]),Zt=ze.useMemo(()=>Array.from(dr),[dr]),Cr=ze.useMemo(()=>Zt.filter(On=>On<U),[Zt,U]),yt=L||1,{data:Vt,isFetching:Er}=_v({queryKey:["frame",Pe,Se,a],queryFn:({signal:On})=>ly(Pe,Se,[a],On),enabled:!!Pe&&!!Me&&typeof a=="string",placeholderData:D0}),{data:sr,isFetching:or}=_v({queryKey:["frame",Pe,Se,o],queryFn:({signal:On})=>ly(Pe,Se,[o],On),enabled:!!Pe&&!!Me&&typeof o=="string",placeholderData:D0}),{data:Ar,isFetching:Ir}=_v({queryKey:["frame",Pe,Se,s],queryFn:({signal:On})=>ly(Pe,Se,[s],On),enabled:!!Pe&&!!Me&&typeof s=="string"&&ZC(s),placeholderData:D0}),{data:_n,isFetching:Un}=_v({queryKey:["frame",Pe,Se,d],queryFn:({signal:On})=>ly(Pe,Se,[d],On),enabled:!!Pe&&!!Me&&typeof d=="string",placeholderData:D0}),Qn=typeof a=="string"&&Er||typeof o=="string"&&or||typeof s=="string"&&ZC(s)&&Ir||typeof d=="string"&&Un;ze.useEffect(()=>{_t(e,Qn)},[e,Qn,_t]),ze.useEffect(()=>()=>{Dt(e)},[e,Dt]),ze.useEffect(()=>{if(!Qn)try{const On=typeof a=="string"?Vt?.[a]:void 0,Sn=_Z(a,On);if(Sn===0){U!==0&&ve(0);return}const bn=$Ye(a,On),Mn=typeof s=="string"?Ar?.[s]:void 0,gi=TU(s,Mn,Sn),Oi=typeof o=="string"?sr?.[o]:void 0,Pa=Aar(o,Oi,Sn),va=typeof d=="string"?_n?.[d]:void 0,ti=GYe(d,va,Sn);if(!xZ({positions:bn,colors:gi,sizes:Pa,rotations:ti},{positions:Sn*3,colors:Sn*3,sizes:Sn*3,rotations:Sn*3})){console.error("Box data is invalid or has inconsistent lengths."),U!==0&&ve(0);return}if(U!==Sn){ve(Sn);return}const bi=X.current;if(!bi)return;for(let Wn=0;Wn<Sn;Wn++){const Ei=Wn*3;y1.set(bn[Ei],bn[Ei+1],bn[Ei+2]),zP.set(ti[Ei],ti[Ei+1],ti[Ei+2]);const Ki=Pa[Ei]*yt,sa=Pa[Ei+1]*yt,xa=Pa[Ei+2]*yt;P0.compose(y1,new fh().setFromEuler(zP),new oi(Ki,sa,xa)),bi.setMatrixAt(Wn,P0),i4.setRGB(gi[Ei],gi[Ei+1],gi[Ei+2]),bi.setColorAt(Wn,i4)}if(bi.instanceMatrix.setUsage(qX),bi.instanceMatrix.needsUpdate=!0,bi.instanceColor&&(bi.instanceColor.needsUpdate=!0),bi.computeBoundingBox(),bi.computeBoundingSphere(),B.enabled&&ie.current){const Wn=ie.current;Cr.forEach((Ei,Ki)=>{if(Ei>=Sn)return;const sa=Ei*3;y1.set(bn[sa],bn[sa+1],bn[sa+2]),zP.set(ti[sa],ti[sa+1],ti[sa+2]);const xa=Pa[sa]*yt*GC,Qa=Pa[sa+1]*yt*GC,is=Pa[sa+2]*yt*GC;P0.compose(y1,new fh().setFromEuler(zP),new oi(xa,Qa,is)),Wn.setMatrixAt(Ki,P0)}),Wn.instanceMatrix.needsUpdate=!0,Wn.computeBoundingBox(),Wn.computeBoundingSphere()}}catch(On){console.error("Error processing Box data:",On),U!==0&&ve(0)}},[Qn,Vt,sr,Ar,_n,a,o,s,d,U,yt,Cr,B,e]),ze.useEffect(()=>{if(!V?.enabled||!de.current||!X.current||U===0)return;const On=de.current,Sn=X.current;if(Ze?.geometryKey===e&&Ze?.instanceId!==null&&Ze.instanceId<U){On.visible=!0;const bn=new Rc;Sn.getMatrixAt(Ze.instanceId,bn);const Mn=new oi,gi=new fh,Oi=new oi;bn.decompose(Mn,gi,Oi),On.position.copy(Mn),On.quaternion.copy(gi),On.scale.copy(Oi).multiplyScalar(E8)}else On.visible=!1},[Ze,U,V,e]),ze.useEffect(()=>{if(!r){ae.current&&(G2(ae.current),ae.current=null);return}if(!X.current||U===0)return;ae.current&&G2(ae.current);const On=EU(X.current);return ae.current=On,qt(),()=>{ae.current&&(G2(ae.current),ae.current=null)}},[r,U,e,qt]);const Jn=ze.useMemo(()=>new Hw(1,1,1),[]),Vn=ze.useCallback(On=>{On.detail!==1||On.instanceId===void 0||(On.stopPropagation(),Ve(e,On.instanceId,On.shiftKey))},[Ve,e]),jn=ze.useCallback(On=>{On.instanceId!==void 0&&(On.stopPropagation(),ut&&nt(On.point))},[ut,nt]),Lr=ze.useCallback(On=>{On.instanceId!==void 0&&(On.stopPropagation(),Je(e,On.instanceId),ht(!0))},[Je,ht,e]),Yn=ze.useCallback(()=>{Je(null,null),ht(!1)},[Je,ht]);return!Me||!Pe?null:Ke.jsxs("group",{children:[Ke.jsxs("instancedMesh",{ref:X,args:[void 0,void 0,U],visible:!r,onClick:!r&&B.enabled?Vn:void 0,onPointerEnter:!r&&V?.enabled?Lr:void 0,onPointerMove:!r&&V?.enabled?jn:void 0,onPointerOut:!r&&V?.enabled?Yn:void 0,children:[Ke.jsx("primitive",{object:Jn,attach:"geometry"}),SU(b,t.opacity)]},U),!r&&B.enabled&&Ke.jsxs("instancedMesh",{ref:ie,args:[void 0,void 0,Cr.length],children:[Ke.jsx("primitive",{object:Jn,attach:"geometry"}),Ke.jsx("meshBasicMaterial",{side:dx,transparent:!0,opacity:B.opacity,color:B.color})]},`selection-${Cr.length}`),!r&&V?.enabled&&Ke.jsxs("mesh",{ref:de,visible:!1,children:[Ke.jsx("primitive",{object:Jn,attach:"geometry"}),Ke.jsx("meshBasicMaterial",{side:x1,transparent:!0,opacity:V.opacity,color:V.color})]}),r&&ae.current&&Ke.jsx("primitive",{object:ae.current})]})}function Oar({data:t,geometryKey:e,pathtracingEnabled:r=!1}){const{geometryDefaults:n}=rh(),i=$k(t,"Plane",n),{position:a,size:o,color:s,rotation:d,material:b,scale:L,double_sided:B,selecting:V,hovering:X,opacity:ie}=i,de=ze.useRef(null),ae=ze.useRef(null),U=ze.useRef(null),ve=ze.useRef(null),[Se,Pe]=ze.useState(0),{currentFrame:Me,roomId:Ie,clientId:Ve,selections:Ze,updateSelections:Je,hoveredGeometryInstance:nt,setHoveredGeometryInstance:ut,setDrawingPointerPosition:ht,isDrawing:_t,setDrawingIsValid:Dt,setGeometryFetching:qt,removeGeometryFetching:Lt,requestPathtracingUpdate:dr}=rh(),Zt=Ze[e]||[],Cr=ze.useMemo(()=>new Set(Zt),[Zt]),yt=ze.useMemo(()=>Array.from(Cr),[Cr]),Vt=ze.useMemo(()=>yt.filter(Mn=>Mn<Se),[yt,Se]),Er=L||1,{data:sr,isFetching:or}=_v({queryKey:["frame",Ie,Me,a],queryFn:({signal:Mn})=>ly(Ie,Me,[a],Mn),enabled:!!Ie&&!!Ve&&typeof a=="string",placeholderData:D0}),{data:Ar,isFetching:Ir}=_v({queryKey:["frame",Ie,Me,o],queryFn:({signal:Mn})=>ly(Ie,Me,[o],Mn),enabled:!!Ie&&!!Ve&&typeof o=="string",placeholderData:D0}),{data:_n,isFetching:Un}=_v({queryKey:["frame",Ie,Me,s],queryFn:({signal:Mn})=>ly(Ie,Me,[s],Mn),enabled:!!Ie&&!!Ve&&typeof s=="string"&&ZC(s),placeholderData:D0}),{data:Qn,isFetching:Jn}=_v({queryKey:["frame",Ie,Me,d],queryFn:({signal:Mn})=>ly(Ie,Me,[d],Mn),enabled:!!Ie&&!!Ve&&typeof d=="string",placeholderData:D0}),Vn=typeof a=="string"&&or||typeof o=="string"&&Ir||typeof s=="string"&&ZC(s)&&Un||typeof d=="string"&&Jn;ze.useEffect(()=>{qt(e,Vn)},[e,Vn,qt]),ze.useEffect(()=>()=>{Lt(e)},[e,Lt]),ze.useEffect(()=>{if(!Vn)try{const Mn=typeof a=="string"?sr?.[a]:void 0,gi=_Z(a,Mn);if(gi===0){Se!==0&&Pe(0);return}const Oi=$Ye(a,Mn),Pa=typeof s=="string"?_n?.[s]:void 0,va=TU(s,Pa,gi),ti=typeof o=="string"?Ar?.[o]:void 0,Tn=Ear(o,ti,gi),bi=typeof d=="string"?Qn?.[d]:void 0,Wn=GYe(d,bi,gi);if(!xZ({positions:Oi,colors:va,sizes:Tn,rotations:Wn},{positions:gi*3,colors:gi*3,sizes:gi*2,rotations:gi*3})){console.error("Plane data is invalid or has inconsistent lengths."),Se!==0&&Pe(0);return}if(Se!==gi){Pe(gi);return}const Ki=de.current;if(!Ki)return;for(let sa=0;sa<gi;sa++){const xa=sa*3,Qa=sa*2;y1.set(Oi[xa],Oi[xa+1],Oi[xa+2]),zP.set(Wn[xa],Wn[xa+1],Wn[xa+2]);const is=Tn[Qa]*Er,go=Tn[Qa+1]*Er;P0.compose(y1,new fh().setFromEuler(zP),new oi(is,go,1)),Ki.setMatrixAt(sa,P0),i4.setRGB(va[xa],va[xa+1],va[xa+2]),Ki.setColorAt(sa,i4)}if(Ki.instanceMatrix.setUsage(qX),Ki.instanceMatrix.needsUpdate=!0,Ki.instanceColor&&(Ki.instanceColor.needsUpdate=!0),Ki.computeBoundingBox(),Ki.computeBoundingSphere(),V.enabled&&ae.current){const sa=ae.current;Vt.forEach((xa,Qa)=>{if(xa>=gi)return;const is=xa*3,go=xa*2;y1.set(Oi[is],Oi[is+1],Oi[is+2]),zP.set(Wn[is],Wn[is+1],Wn[is+2]);const Co=Tn[go]*Er*GC,Ko=Tn[go+1]*Er*GC;P0.compose(y1,new fh().setFromEuler(zP),new oi(Co,Ko,.01)),sa.setMatrixAt(Qa,P0)}),sa.instanceMatrix.needsUpdate=!0,sa.computeBoundingBox(),sa.computeBoundingSphere()}}catch(Mn){console.error("Error processing Plane data:",Mn),Se!==0&&Pe(0)}},[Vn,sr,Ar,_n,Qn,a,o,s,d,Se,Er,Vt,V,e]),ze.useEffect(()=>{if(!X?.enabled||!U.current||!de.current||Se===0)return;const Mn=U.current,gi=de.current;if(nt?.geometryKey===e&&nt?.instanceId!==null&&nt.instanceId<Se){Mn.visible=!0;const Oi=new Rc;gi.getMatrixAt(nt.instanceId,Oi);const Pa=new oi,va=new fh,ti=new oi;Oi.decompose(Pa,va,ti),Mn.position.copy(Pa),Mn.quaternion.copy(va),Mn.scale.set(ti.x*E8,ti.y*E8,.01)}else Mn.visible=!1},[nt,Se,X,e]),ze.useEffect(()=>{if(!r){ve.current&&(G2(ve.current),ve.current=null);return}if(!de.current||Se===0)return;ve.current&&G2(ve.current);const Mn=EU(de.current);return ve.current=Mn,dr(),()=>{ve.current&&(G2(ve.current),ve.current=null)}},[r,Se,e,dr]);const jn=ze.useMemo(()=>new j_(1,1),[]),Lr=ze.useMemo(()=>new Hw(1,1,.01),[]),Yn=ze.useCallback(Mn=>{Mn.detail!==1||Mn.instanceId===void 0||(Mn.stopPropagation(),Je(e,Mn.instanceId,Mn.shiftKey))},[Je,e]),On=ze.useCallback(Mn=>{Mn.instanceId!==void 0&&(Mn.stopPropagation(),_t&&ht(Mn.point))},[_t,ht]),Sn=ze.useCallback(Mn=>{Mn.instanceId!==void 0&&(Mn.stopPropagation(),ut(e,Mn.instanceId),Dt(!0))},[ut,Dt,e]),bn=ze.useCallback(()=>{ut(null,null),Dt(!1)},[ut,Dt]);return!Ve||!Ie?null:Ke.jsxs("group",{children:[Ke.jsxs("instancedMesh",{ref:de,args:[void 0,void 0,Se],visible:!r,onClick:!r&&V.enabled?Yn:void 0,onPointerEnter:!r&&X?.enabled?Sn:void 0,onPointerMove:!r&&X?.enabled?On:void 0,onPointerOut:!r&&X?.enabled?bn:void 0,children:[Ke.jsx("primitive",{object:jn,attach:"geometry"}),SU(b,ie,void 0,B?Zx:dx)]},Se),!r&&V.enabled&&Ke.jsxs("instancedMesh",{ref:ae,args:[void 0,void 0,Vt.length],children:[Ke.jsx("primitive",{object:Lr,attach:"geometry"}),Ke.jsx("meshBasicMaterial",{side:B?Zx:dx,transparent:!0,opacity:V.opacity,color:V.color})]},`selection-${Vt.length}`),!r&&X?.enabled&&Ke.jsxs("mesh",{ref:U,visible:!1,children:[Ke.jsx("primitive",{object:Lr,attach:"geometry"}),Ke.jsx("meshBasicMaterial",{side:x1,transparent:!0,opacity:X.opacity,color:X.color})]}),r&&ve.current&&Ke.jsx("primitive",{object:ve.current})]})}function Nar({data:t,geometryKey:e}){const{geometryDefaults:r}=rh(),n=ze.useMemo(()=>$k(t,"Curve",r),[JSON.stringify(t),JSON.stringify(r.Curve)]),i=ze.useMemo(()=>n.position,[typeof n.position=="string"?n.position:JSON.stringify(n.position)]),a=ze.useMemo(()=>n.marker,[JSON.stringify(n.marker)]),o=ze.useMemo(()=>n.virtual_marker,[JSON.stringify(n.virtual_marker)]),{color:s,material:d,thickness:b,divisions:L,variant:B}=n,V=cy(),{currentFrame:X,roomId:ie,isDrawing:de,drawingIsValid:ae,drawingPointerPosition:U,setIsDrawing:ve,clientId:Se,setGeometryFetching:Pe,removeGeometryFetching:Me,setCurveLength:Ie,activeCurveForDrawing:Ve,registerCurveRef:Ze,unregisterCurveRef:Je}=rh(),[nt,ut]=ze.useState([]),[ht,_t]=ze.useState([]),[Dt,qt]=ze.useState([]),[Lt,dr]=ze.useState(null),[Zt,Cr]=ze.useState(null),yt=ze.useRef([]),Vt=ze.useRef(null),Er=Ve===e,sr=ze.useCallback(jn=>jn==="default"?V.palette.text.primary:jn,[V]),or=ze.useCallback(jn=>jn==="default"?V.palette.secondary.main:jn,[V]),{data:Ar,isFetching:Ir}=_v({queryKey:["frame",ie,X,i],queryFn:({signal:jn})=>ly(ie,X,[i],jn),enabled:!!ie&&!!Se&&typeof i=="string",placeholderData:D0});ze.useEffect(()=>{Pe(e,Ir)},[e,Ir,Pe]),ze.useEffect(()=>()=>{Me(e),Je(e)},[e,Me,Je]),ze.useEffect(()=>{if(typeof i=="string"){if(Ir)return;const jn=Ar?.[i];if(!jn){ut(Yn=>Yn.length===0?Yn:[]),Cr("remote");return}const Lr=[];for(let Yn=0;Yn<jn.length;Yn+=3)Lr.push(new oi(Number(jn[Yn]),Number(jn[Yn+1]),Number(jn[Yn+2])));ut(Lr),Cr("remote")}else{const jn=i;if(!jn||jn.length===0){ut(Yn=>Yn.length===0?Yn:[]),Cr("remote");return}const Lr=jn.map(Yn=>new oi(Yn[0],Yn[1],Yn[2]));ut(Lr),Cr("remote")}},[Ar,Ir,i]),ze.useEffect(()=>{const jn=[...nt];if(!n)return;if(U!==null&&de&&Er&&jn.push(U),jn.length<2){_t([]),qt([]),Ie(0),Vt.current=null,Je(e);return}const Lr=new Pye(jn,!1,"catmullrom",.5);Vt.current=Lr,Ze(e,Lr);const Yn=Lr.getPoints(L*jn.length);_t(Yn),Ie(Lr.getLength());const On=[];for(let Sn=0;Sn<jn.length-1;Sn++){const bn=jn[Sn],Mn=jn[Sn+1];let gi=1/0,Oi=1/0,Pa=0,va=0;for(let Tn=0;Tn<Yn.length;Tn++){const bi=Yn[Tn].distanceTo(bn),Wn=Yn[Tn].distanceTo(Mn);bi<gi&&(gi=bi,Pa=Tn),Wn<Oi&&(Oi=Wn,va=Tn)}const ti=Math.floor((Pa+va)/2);On.push(Yn[ti].clone())}qt(On)},[nt,U,de,Er,L,Ie,e,Ze,Je]);const _n=ze.useCallback(jn=>{const Lr=[...nt];Lr.splice(jn+1,0,Dt[jn].clone()),ut(Lr),setTimeout(()=>{dr(jn+1)},0)},[nt,Dt]),Un=ze.useCallback(()=>{if(ae&&U){const jn=[...nt];jn.push(U.clone()),Cr("local"),ut(jn)}else ve(!1)},[ae,U,nt,ve]),Qn=ze.useMemo(()=>Lt!==null?yt.current[Lt]:null,[Lt]);ze.useEffect(()=>{const jn=Lr=>{(Lr.key==="Backspace"||Lr.key==="Delete")&&(dr(null),setTimeout(()=>{Cr("local"),ut(Yn=>{if(Lt===null)return Yn;const On=[...Yn];return On.splice(Lt,1),On})},0))};return window.addEventListener("keydown",jn),()=>{window.removeEventListener("keydown",jn)}},[Lt]);const Jn=ze.useCallback(async()=>{if(!ie||!nt)return;const Lr={position:nt.map(Yn=>[Yn.x,Yn.y,Yn.z]),color:s,material:d,variant:n.variant,divisions:L,thickness:b,marker:a,virtual_marker:o};try{await Rme(ie,Se,e,"Curve",Lr)}catch(Yn){console.error("Error updating geometry:",Yn)}},[ie,nt,e,s,d,B,L,b,a,o,Se]);ze.useEffect(()=>{if(Zt!=="local")return;const jn=VL.debounce(Jn,500);return jn(),()=>{jn.cancel()}},[nt,Jn,Zt]);const Vn=ze.useCallback(()=>{Lt!==null&&yt.current[Lt]&&(ut(jn=>{const Lr=[...jn];return Lr[Lt]=yt.current[Lt].position.clone(),Lr}),Cr("local"))},[Lt]);return!ie||!a||!o?null:Ke.jsxs("group",{children:[Qn&&Lt!==null&&Ke.jsx(Ynr,{object:Qn,onPointerMissed:()=>dr(null),mode:"translate",onChange:Vn}),ht.length>=2&&Ke.jsx(CYe,{points:ht,color:de&&Er&&!ae?"#FF0000":sr(s),lineWidth:b,dashed:d==="LineDashedMaterial"}),a.enabled&&nt&&nt.map((jn,Lr)=>Ke.jsx(Toe,{position:jn,args:[a.size],ref:Yn=>{yt.current[Lr]=Yn},onClick:Yn=>{Yn.stopPropagation(),dr(Lr)},children:Ke.jsx("meshBasicMaterial",{color:de&&Er&&!ae?"#FF0000":or(a.color),opacity:a.opacity,transparent:a.opacity<1})},`marker-${Lr}`)),o.enabled&&Dt.map((jn,Lr)=>Ke.jsx(Toe,{position:jn,args:[o.size],onClick:()=>_n(Lr),children:Ke.jsx("meshBasicMaterial",{color:or(o.color),opacity:o.opacity,transparent:o.opacity<1})},`virtual-${Lr}`)),de&&Er&&U&&a.enabled&&Ke.jsx(Toe,{position:U,args:[a.size],onClick:Un,children:Ke.jsx("meshBasicMaterial",{color:de&&Er&&!ae?"#FF0000":or(a.color),opacity:a.opacity,transparent:a.opacity<1})},"virtual-drawing")]})}function Far({data:t,geometryKey:e}){const{camera:r}=Km(),{roomId:n,geometries:i,attachedCameraKey:a,curveRefs:o}=rh(),[s,d]=ze.useState(new oi(0,0,10)),[b,L]=ze.useState(new oi(0,0,0)),B=a===e,V=t.position_curve_key||null,X=t.target_curve_key||null,ie=V?o[V]:void 0,de=X?o[X]:void 0,ae=(Se,Pe,Me,Ie)=>{if(!Se)return Ie;if(Pe)return Pe.getPointAt(Me);{const Ve=i[Se];if(Ve?.type==="Curve"&&Ve.data?.position?.[0]){const[Ze,Je,nt]=Ve.data.position[0];return new oi(Ze,Je,nt)}else return console.warn(`Camera ${e}: curve key '${Se}' not found or invalid`),Ie}};ze.useEffect(()=>{const Se=ae(V,ie,t.position_progress,new oi(0,0,10));d(Se)},[ie,V,t.position_progress,i,e]),ze.useEffect(()=>{const Se=ae(X,de,t.target_progress,new oi(0,0,0));L(Se)},[de,X,t.target_progress,i,e]),ze.useEffect(()=>{if(!B)return;r.position.copy(s),r.up.set(t.up[0],t.up[1],t.up[2]),r.lookAt(b);let Se=!1;"fov"in r&&(r.fov=t.fov,Se=!0),"near"in r&&(r.near=t.near,Se=!0),"far"in r&&(r.far=t.far,Se=!0),"zoom"in r&&(r.zoom=t.zoom,Se=!0),Se&&r.updateProjectionMatrix()},[B,s,b,t.up,t.fov,t.near,t.far,t.zoom,r]);const U=ze.useMemo(()=>t.camera_type==="PerspectiveCamera"?new sy(t.fov,1,t.near,t.far):new VC(-1,1,1,-1,t.near,t.far),[t.camera_type,t.fov,t.near,t.far]);ze.useEffect(()=>{U&&(U.position.copy(s),U.up.set(t.up[0],t.up[1],t.up[2]),U.lookAt(b),U.updateMatrixWorld(!0))},[U,s,b,t.up]);const ve=ze.useMemo(()=>U?new jWe(U):null,[U]);return ze.useEffect(()=>{ve&&ve.update()},[ve,s,b]),!n||!t.helper_visible?null:Ke.jsxs("group",{children:[ve&&Ke.jsx("primitive",{object:ve}),Ke.jsxs("mesh",{position:b,children:[Ke.jsx("sphereGeometry",{args:[.1,16,16]}),Ke.jsx("meshBasicMaterial",{color:t.helper_color,opacity:.5,transparent:!0})]}),Ke.jsxs("line",{children:[Ke.jsx("bufferGeometry",{children:Ke.jsx("bufferAttribute",{attach:"attributes-position",count:2,itemSize:3,args:[new Float32Array([s.x,s.y,s.z,b.x,b.y,b.z]),3]})}),Ke.jsx("lineBasicMaterial",{color:t.helper_color,opacity:.3,transparent:!0})]})]})}function zar(){const{camera:t}=Km(),{isDrawing:e,setDrawingPointerPosition:r,setIsDrawing:n,drawingIsValid:i}=rh(),a=ze.useRef(null),o=10;o6(()=>{if(!a.current||!e||!("fov"in t)||!("aspect"in t))return;const d=_ye.degToRad(t.fov),b=2*Math.tan(d/2)*o,L=b*t.aspect;a.current.scale.set(L,b,1);const V=new oi(0,0,-1).applyQuaternion(t.quaternion).multiplyScalar(o).add(t.position);a.current.position.copy(V),a.current.lookAt(t.position)});const s=d=>{e&&(i||r(d.point))};return e?Ke.jsx(nar,{ref:a,args:[10,10,1,1],onPointerMove:s,children:Ke.jsx("meshBasicMaterial",{color:"gray",opacity:0,transparent:!0,wireframe:!0,side:Zx})}):null}function Bar(){const t=ze.useRef(null),e=.05,r=.5,{mode:n}=HL(),i=cy(),a=n==="dark"?i.palette.primary.light:i.palette.primary.dark;return o6(({controls:o})=>{t.current&&o&&"target"in o&&t.current.position.copy(o.target)}),Ke.jsxs("group",{ref:t,children:[Ke.jsx(Soe,{args:[r,e,e],children:Ke.jsx("meshStandardMaterial",{color:a})}),Ke.jsx(Soe,{args:[e,r,e],children:Ke.jsx("meshStandardMaterial",{color:a})}),Ke.jsx(Soe,{args:[e,e,r],children:Ke.jsx("meshStandardMaterial",{color:a})})]})}function Uar({settings:t}){const{camera:e}=Km();return ze.useEffect(()=>{t&&(e.near=t.near_plane,e.far=t.far_plane,e.updateProjectionMatrix())},[t,e]),null}function Har(t){const e=ze.useRef(null),{camera:r}=Km();return o6(()=>{e.current&&(e.current.position.copy(r.position),e.current.quaternion.copy(r.quaternion))}),Ke.jsxs("group",{ref:e,children:[Ke.jsx("ambientLight",{intensity:t.ambient_light,color:"#ffffff"}),Ke.jsx("directionalLight",{position:[5,2,8],intensity:t.key_light}),Ke.jsx("directionalLight",{position:[-4,-1,6],intensity:t.fill_light,color:"#a0c4ff"}),Ke.jsx("directionalLight",{position:[0,0,-50],intensity:t.rim_light,color:"#fff0f5"}),Ke.jsx("hemisphereLight",{color:"#e0f7ff",groundColor:"#ffffff",intensity:t.hemisphere_light})]})}const rN="arrays.positions",jar=t=>{const e=new oi(0,0,0),r=t.length/3;for(let n=0;n<t.length;n+=3)e.x+=t[n],e.y+=t[n+1],e.z+=t[n+2];return e.divideScalar(r),e},Var=()=>{const t=Km(d=>d.controls),e=iM(),{currentFrame:r,selections:n,updateSelectionForGeometry:i,toggleInfoBoxes:a,toggleDrawingMode:o,roomId:s}=rh();return ze.useEffect(()=>{const d=b=>{const L=b.target;if(!(L.tagName==="INPUT"||L.tagName==="TEXTAREA"||L.isContentEditable)){if((b.ctrlKey||b.metaKey)&&b.key==="a"){b.preventDefault();let V=e.getQueryData(["frame",s,r,rN]),X;if(V&&typeof V=="object"&&rN in V?X=V[rN]:V&&(X=V),X){const ie=X.length/3,de=Array.from({length:ie},(ae,U)=>U);i("particles",de)}return}if(b.key==="c"||b.key==="C"){b.preventDefault();let V=e.getQueryData(["frame",s,r,rN]),X;if(V&&typeof V=="object"&&rN in V?X=V[rN]:V&&(X=V),X&&n.particles&&n.particles.length>0){const ie=new X.constructor(n.particles.length*3);n.particles.forEach((de,ae)=>{X&&(ie[ae*3]=X[de*3],ie[ae*3+1]=X[de*3+1],ie[ae*3+2]=X[de*3+2])}),X=ie}if(X&&X.length>=3){const ie=jar(X);if(t){const de=t.object,ae=t.target,U=new oi;de.getWorldDirection(U);const ve=de.position.distanceTo(ae),Se=ie.clone().add(U.multiplyScalar(-ve));de.position.copy(Se),t.target.copy(ie),t.update()}else console.warn("Camera controls not available")}return}if(b.key==="x"||b.key==="X"){b.preventDefault(),o(e);return}if(b.key==="i"||b.key==="I"){b.preventDefault(),a();return}if(b.key==="r"||b.key==="R"){b.preventDefault();const V=b.ctrlKey;if(!t){console.warn("Camera controls not available");return}const X=t.object,ie=t.target,de=new oi;X.getWorldDirection(de);const ae=de.clone().normalize(),U=X.position.clone().sub(ie),ve=(b.shiftKey?Math.PI/8:Math.PI/32)*(V?-1:1);U.applyAxisAngle(ae,ve),X.position.copy(U.add(ie));const Se=X.up.clone();Se.applyAxisAngle(ae,ve),X.up.copy(Se),t.update();return}}};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[t,n,i,e,r,a,o,s]),null};var pz={exports:{}},Eoe={};function YYe(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(r=YYe(t[e]))&&(n&&(n+=" "),n+=r);else for(e in t)t[e]&&(n&&(n+=" "),n+=e);return n}function T4e(){for(var t,e,r=0,n="";r<arguments.length;)(t=arguments[r++])&&(e=YYe(t))&&(n&&(n+=" "),n+=e);return n}const qar=Object.freeze(Object.defineProperty({__proto__:null,clsx:T4e,default:T4e},Symbol.toStringTag,{value:"Module"})),Gar=Dit(qar);var Z1={},mP={},E4e;function wZ(){if(E4e)return mP;E4e=1,Object.defineProperty(mP,"__esModule",{value:!0}),mP.dontSetMe=i,mP.findInArray=t,mP.int=n,mP.isFunction=e,mP.isNum=r;function t(a,o){for(let s=0,d=a.length;s<d;s++)if(o.apply(o,[a[s],s,a]))return a[s]}function e(a){return typeof a=="function"||Object.prototype.toString.call(a)==="[object Function]"}function r(a){return typeof a=="number"&&!isNaN(a)}function n(a){return parseInt(a,10)}function i(a,o,s){if(a[o])return new Error("Invalid prop ".concat(o," passed to ").concat(s," - do not set this, set it on the child."))}return mP}var gP={},A4e;function $ar(){if(A4e)return gP;A4e=1,Object.defineProperty(gP,"__esModule",{value:!0}),gP.browserPrefixToKey=r,gP.browserPrefixToStyle=n,gP.default=void 0,gP.getPrefix=e;const t=["Moz","Webkit","O","ms"];function e(){var a;let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";const s=(a=window.document)===null||a===void 0||(a=a.documentElement)===null||a===void 0?void 0:a.style;if(!s||o in s)return"";for(let d=0;d<t.length;d++)if(r(o,t[d])in s)return t[d];return""}function r(a,o){return o?"".concat(o).concat(i(a)):a}function n(a,o){return o?"-".concat(o.toLowerCase(),"-").concat(a):a}function i(a){let o="",s=!0;for(let d=0;d<a.length;d++)s?(o+=a[d].toUpperCase(),s=!1):a[d]==="-"?s=!0:o+=a[d];return o}return gP.default=e(),gP}var C4e;function x1e(){if(C4e)return Z1;C4e=1,Object.defineProperty(Z1,"__esModule",{value:!0}),Z1.addClassName=Me,Z1.addEvent=s,Z1.addUserSelectStyles=Se,Z1.createCSSTransform=ie,Z1.createSVGTransform=de,Z1.getTouch=U,Z1.getTouchIdentifier=ve,Z1.getTranslation=ae,Z1.innerHeight=B,Z1.innerWidth=V,Z1.matchesSelector=a,Z1.matchesSelectorAndParentsTo=o,Z1.offsetXYFromParent=X,Z1.outerHeight=b,Z1.outerWidth=L,Z1.removeClassName=Ie,Z1.removeEvent=d,Z1.removeUserSelectStyles=Pe;var t=wZ(),e=n($ar());function r(Ve){if(typeof WeakMap!="function")return null;var Ze=new WeakMap,Je=new WeakMap;return(r=function(nt){return nt?Je:Ze})(Ve)}function n(Ve,Ze){if(Ve&&Ve.__esModule)return Ve;if(Ve===null||typeof Ve!="object"&&typeof Ve!="function")return{default:Ve};var Je=r(Ze);if(Je&&Je.has(Ve))return Je.get(Ve);var nt={},ut=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var ht in Ve)if(ht!=="default"&&Object.prototype.hasOwnProperty.call(Ve,ht)){var _t=ut?Object.getOwnPropertyDescriptor(Ve,ht):null;_t&&(_t.get||_t.set)?Object.defineProperty(nt,ht,_t):nt[ht]=Ve[ht]}return nt.default=Ve,Je&&Je.set(Ve,nt),nt}let i="";function a(Ve,Ze){return i||(i=(0,t.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(Je){return(0,t.isFunction)(Ve[Je])})),(0,t.isFunction)(Ve[i])?Ve[i](Ze):!1}function o(Ve,Ze,Je){let nt=Ve;do{if(a(nt,Ze))return!0;if(nt===Je)return!1;nt=nt.parentNode}while(nt);return!1}function s(Ve,Ze,Je,nt){if(!Ve)return;const ut={capture:!0,...nt};Ve.addEventListener?Ve.addEventListener(Ze,Je,ut):Ve.attachEvent?Ve.attachEvent("on"+Ze,Je):Ve["on"+Ze]=Je}function d(Ve,Ze,Je,nt){if(!Ve)return;const ut={capture:!0,...nt};Ve.removeEventListener?Ve.removeEventListener(Ze,Je,ut):Ve.detachEvent?Ve.detachEvent("on"+Ze,Je):Ve["on"+Ze]=null}function b(Ve){let Ze=Ve.clientHeight;const Je=Ve.ownerDocument.defaultView.getComputedStyle(Ve);return Ze+=(0,t.int)(Je.borderTopWidth),Ze+=(0,t.int)(Je.borderBottomWidth),Ze}function L(Ve){let Ze=Ve.clientWidth;const Je=Ve.ownerDocument.defaultView.getComputedStyle(Ve);return Ze+=(0,t.int)(Je.borderLeftWidth),Ze+=(0,t.int)(Je.borderRightWidth),Ze}function B(Ve){let Ze=Ve.clientHeight;const Je=Ve.ownerDocument.defaultView.getComputedStyle(Ve);return Ze-=(0,t.int)(Je.paddingTop),Ze-=(0,t.int)(Je.paddingBottom),Ze}function V(Ve){let Ze=Ve.clientWidth;const Je=Ve.ownerDocument.defaultView.getComputedStyle(Ve);return Ze-=(0,t.int)(Je.paddingLeft),Ze-=(0,t.int)(Je.paddingRight),Ze}function X(Ve,Ze,Je){const ut=Ze===Ze.ownerDocument.body?{left:0,top:0}:Ze.getBoundingClientRect(),ht=(Ve.clientX+Ze.scrollLeft-ut.left)/Je,_t=(Ve.clientY+Ze.scrollTop-ut.top)/Je;return{x:ht,y:_t}}function ie(Ve,Ze){const Je=ae(Ve,Ze,"px");return{[(0,e.browserPrefixToKey)("transform",e.default)]:Je}}function de(Ve,Ze){return ae(Ve,Ze,"")}function ae(Ve,Ze,Je){let{x:nt,y:ut}=Ve,ht="translate(".concat(nt).concat(Je,",").concat(ut).concat(Je,")");if(Ze){const _t="".concat(typeof Ze.x=="string"?Ze.x:Ze.x+Je),Dt="".concat(typeof Ze.y=="string"?Ze.y:Ze.y+Je);ht="translate(".concat(_t,", ").concat(Dt,")")+ht}return ht}function U(Ve,Ze){return Ve.targetTouches&&(0,t.findInArray)(Ve.targetTouches,Je=>Ze===Je.identifier)||Ve.changedTouches&&(0,t.findInArray)(Ve.changedTouches,Je=>Ze===Je.identifier)}function ve(Ve){if(Ve.targetTouches&&Ve.targetTouches[0])return Ve.targetTouches[0].identifier;if(Ve.changedTouches&&Ve.changedTouches[0])return Ve.changedTouches[0].identifier}function Se(Ve){if(!Ve)return;let Ze=Ve.getElementById("react-draggable-style-el");Ze||(Ze=Ve.createElement("style"),Ze.type="text/css",Ze.id="react-draggable-style-el",Ze.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
`,Ze.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
`,Ve.getElementsByTagName("head")[0].appendChild(Ze)),Ve.body&&Me(Ve.body,"react-draggable-transparent-selection")}function Pe(Ve){if(Ve)try{if(Ve.body&&Ie(Ve.body,"react-draggable-transparent-selection"),Ve.selection)Ve.selection.empty();else{const Ze=(Ve.defaultView||window).getSelection();Ze&&Ze.type!=="Caret"&&Ze.removeAllRanges()}}catch{}}function Me(Ve,Ze){Ve.classList?Ve.classList.add(Ze):Ve.className.match(new RegExp("(?:^|\\s)".concat(Ze,"(?!\\S)")))||(Ve.className+=" ".concat(Ze))}function Ie(Ve,Ze){Ve.classList?Ve.classList.remove(Ze):Ve.className=Ve.className.replace(new RegExp("(?:^|\\s)".concat(Ze,"(?!\\S)"),"g"),"")}return Z1}var c5={},M4e;function XYe(){if(M4e)return c5;M4e=1,Object.defineProperty(c5,"__esModule",{value:!0}),c5.canDragX=i,c5.canDragY=a,c5.createCoreData=s,c5.createDraggableData=d,c5.getBoundPosition=r,c5.getControlPosition=o,c5.snapToGrid=n;var t=wZ(),e=x1e();function r(B,V,X){if(!B.props.bounds)return[V,X];let{bounds:ie}=B.props;ie=typeof ie=="string"?ie:b(ie);const de=L(B);if(typeof ie=="string"){const{ownerDocument:ae}=de,U=ae.defaultView;let ve;if(ie==="parent"?ve=de.parentNode:ve=ae.querySelector(ie),!(ve instanceof U.HTMLElement))throw new Error('Bounds selector "'+ie+'" could not find an element.');const Se=ve,Pe=U.getComputedStyle(de),Me=U.getComputedStyle(Se);ie={left:-de.offsetLeft+(0,t.int)(Me.paddingLeft)+(0,t.int)(Pe.marginLeft),top:-de.offsetTop+(0,t.int)(Me.paddingTop)+(0,t.int)(Pe.marginTop),right:(0,e.innerWidth)(Se)-(0,e.outerWidth)(de)-de.offsetLeft+(0,t.int)(Me.paddingRight)-(0,t.int)(Pe.marginRight),bottom:(0,e.innerHeight)(Se)-(0,e.outerHeight)(de)-de.offsetTop+(0,t.int)(Me.paddingBottom)-(0,t.int)(Pe.marginBottom)}}return(0,t.isNum)(ie.right)&&(V=Math.min(V,ie.right)),(0,t.isNum)(ie.bottom)&&(X=Math.min(X,ie.bottom)),(0,t.isNum)(ie.left)&&(V=Math.max(V,ie.left)),(0,t.isNum)(ie.top)&&(X=Math.max(X,ie.top)),[V,X]}function n(B,V,X){const ie=Math.round(V/B[0])*B[0],de=Math.round(X/B[1])*B[1];return[ie,de]}function i(B){return B.props.axis==="both"||B.props.axis==="x"}function a(B){return B.props.axis==="both"||B.props.axis==="y"}function o(B,V,X){const ie=typeof V=="number"?(0,e.getTouch)(B,V):null;if(typeof V=="number"&&!ie)return null;const de=L(X),ae=X.props.offsetParent||de.offsetParent||de.ownerDocument.body;return(0,e.offsetXYFromParent)(ie||B,ae,X.props.scale)}function s(B,V,X){const ie=!(0,t.isNum)(B.lastX),de=L(B);return ie?{node:de,deltaX:0,deltaY:0,lastX:V,lastY:X,x:V,y:X}:{node:de,deltaX:V-B.lastX,deltaY:X-B.lastY,lastX:B.lastX,lastY:B.lastY,x:V,y:X}}function d(B,V){const X=B.props.scale;return{node:V.node,x:B.state.x+V.deltaX/X,y:B.state.y+V.deltaY/X,deltaX:V.deltaX/X,deltaY:V.deltaY/X,lastX:B.state.x,lastY:B.state.y}}function b(B){return{left:B.left,top:B.top,right:B.right,bottom:B.bottom}}function L(B){const V=B.findDOMNode();if(!V)throw new Error("<DraggableCore>: Unmounted during event!");return V}return c5}var vz={},_q={},R4e;function ZYe(){if(R4e)return _q;R4e=1,Object.defineProperty(_q,"__esModule",{value:!0}),_q.default=t;function t(){}return _q}var k4e;function War(){if(k4e)return vz;k4e=1,Object.defineProperty(vz,"__esModule",{value:!0}),vz.default=void 0;var t=b(zk()),e=s(JW()),r=s(qW()),n=x1e(),i=XYe(),a=wZ(),o=s(ZYe());function s(ae){return ae&&ae.__esModule?ae:{default:ae}}function d(ae){if(typeof WeakMap!="function")return null;var U=new WeakMap,ve=new WeakMap;return(d=function(Se){return Se?ve:U})(ae)}function b(ae,U){if(ae&&ae.__esModule)return ae;if(ae===null||typeof ae!="object"&&typeof ae!="function")return{default:ae};var ve=d(U);if(ve&&ve.has(ae))return ve.get(ae);var Se={},Pe=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Me in ae)if(Me!=="default"&&Object.prototype.hasOwnProperty.call(ae,Me)){var Ie=Pe?Object.getOwnPropertyDescriptor(ae,Me):null;Ie&&(Ie.get||Ie.set)?Object.defineProperty(Se,Me,Ie):Se[Me]=ae[Me]}return Se.default=ae,ve&&ve.set(ae,Se),Se}function L(ae,U,ve){return U=B(U),U in ae?Object.defineProperty(ae,U,{value:ve,enumerable:!0,configurable:!0,writable:!0}):ae[U]=ve,ae}function B(ae){var U=V(ae,"string");return typeof U=="symbol"?U:String(U)}function V(ae,U){if(typeof ae!="object"||ae===null)return ae;var ve=ae[Symbol.toPrimitive];if(ve!==void 0){var Se=ve.call(ae,U);if(typeof Se!="object")return Se;throw new TypeError("@@toPrimitive must return a primitive value.")}return(U==="string"?String:Number)(ae)}const X={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let ie=X.mouse,de=class extends t.Component{constructor(){super(...arguments),L(this,"dragging",!1),L(this,"lastX",NaN),L(this,"lastY",NaN),L(this,"touchIdentifier",null),L(this,"mounted",!1),L(this,"handleDragStart",U=>{if(this.props.onMouseDown(U),!this.props.allowAnyClick&&typeof U.button=="number"&&U.button!==0)return!1;const ve=this.findDOMNode();if(!ve||!ve.ownerDocument||!ve.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:Se}=ve;if(this.props.disabled||!(U.target instanceof Se.defaultView.Node)||this.props.handle&&!(0,n.matchesSelectorAndParentsTo)(U.target,this.props.handle,ve)||this.props.cancel&&(0,n.matchesSelectorAndParentsTo)(U.target,this.props.cancel,ve))return;U.type==="touchstart"&&U.preventDefault();const Pe=(0,n.getTouchIdentifier)(U);this.touchIdentifier=Pe;const Me=(0,i.getControlPosition)(U,Pe,this);if(Me==null)return;const{x:Ie,y:Ve}=Me,Ze=(0,i.createCoreData)(this,Ie,Ve);(0,o.default)("DraggableCore: handleDragStart: %j",Ze),(0,o.default)("calling",this.props.onStart),!(this.props.onStart(U,Ze)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,n.addUserSelectStyles)(Se),this.dragging=!0,this.lastX=Ie,this.lastY=Ve,(0,n.addEvent)(Se,ie.move,this.handleDrag),(0,n.addEvent)(Se,ie.stop,this.handleDragStop))}),L(this,"handleDrag",U=>{const ve=(0,i.getControlPosition)(U,this.touchIdentifier,this);if(ve==null)return;let{x:Se,y:Pe}=ve;if(Array.isArray(this.props.grid)){let Ve=Se-this.lastX,Ze=Pe-this.lastY;if([Ve,Ze]=(0,i.snapToGrid)(this.props.grid,Ve,Ze),!Ve&&!Ze)return;Se=this.lastX+Ve,Pe=this.lastY+Ze}const Me=(0,i.createCoreData)(this,Se,Pe);if((0,o.default)("DraggableCore: handleDrag: %j",Me),this.props.onDrag(U,Me)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const Ze=document.createEvent("MouseEvents");Ze.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(Ze)}return}this.lastX=Se,this.lastY=Pe}),L(this,"handleDragStop",U=>{if(!this.dragging)return;const ve=(0,i.getControlPosition)(U,this.touchIdentifier,this);if(ve==null)return;let{x:Se,y:Pe}=ve;if(Array.isArray(this.props.grid)){let Ze=Se-this.lastX||0,Je=Pe-this.lastY||0;[Ze,Je]=(0,i.snapToGrid)(this.props.grid,Ze,Je),Se=this.lastX+Ze,Pe=this.lastY+Je}const Me=(0,i.createCoreData)(this,Se,Pe);if(this.props.onStop(U,Me)===!1||this.mounted===!1)return!1;const Ve=this.findDOMNode();Ve&&this.props.enableUserSelectHack&&(0,n.removeUserSelectStyles)(Ve.ownerDocument),(0,o.default)("DraggableCore: handleDragStop: %j",Me),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,Ve&&((0,o.default)("DraggableCore: Removing handlers"),(0,n.removeEvent)(Ve.ownerDocument,ie.move,this.handleDrag),(0,n.removeEvent)(Ve.ownerDocument,ie.stop,this.handleDragStop))}),L(this,"onMouseDown",U=>(ie=X.mouse,this.handleDragStart(U))),L(this,"onMouseUp",U=>(ie=X.mouse,this.handleDragStop(U))),L(this,"onTouchStart",U=>(ie=X.touch,this.handleDragStart(U))),L(this,"onTouchEnd",U=>(ie=X.touch,this.handleDragStop(U)))}componentDidMount(){this.mounted=!0;const U=this.findDOMNode();U&&(0,n.addEvent)(U,X.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const U=this.findDOMNode();if(U){const{ownerDocument:ve}=U;(0,n.removeEvent)(ve,X.mouse.move,this.handleDrag),(0,n.removeEvent)(ve,X.touch.move,this.handleDrag),(0,n.removeEvent)(ve,X.mouse.stop,this.handleDragStop),(0,n.removeEvent)(ve,X.touch.stop,this.handleDragStop),(0,n.removeEvent)(U,X.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,n.removeUserSelectStyles)(ve)}}findDOMNode(){var U,ve;return(U=this.props)!==null&&U!==void 0&&U.nodeRef?(ve=this.props)===null||ve===void 0||(ve=ve.nodeRef)===null||ve===void 0?void 0:ve.current:r.default.findDOMNode(this)}render(){return t.cloneElement(t.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};return vz.default=de,L(de,"displayName","DraggableCore"),L(de,"propTypes",{allowAnyClick:e.default.bool,children:e.default.node.isRequired,disabled:e.default.bool,enableUserSelectHack:e.default.bool,offsetParent:function(ae,U){if(ae[U]&&ae[U].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:e.default.arrayOf(e.default.number),handle:e.default.string,cancel:e.default.string,nodeRef:e.default.object,onStart:e.default.func,onDrag:e.default.func,onStop:e.default.func,onMouseDown:e.default.func,scale:e.default.number,className:a.dontSetMe,style:a.dontSetMe,transform:a.dontSetMe}),L(de,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),vz}var I4e;function Yar(){return I4e||(I4e=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DraggableCore",{enumerable:!0,get:function(){return d.default}}),t.default=void 0;var e=V(zk()),r=L(JW()),n=L(qW()),i=L(Gar),a=x1e(),o=XYe(),s=wZ(),d=L(War()),b=L(ZYe());function L(ve){return ve&&ve.__esModule?ve:{default:ve}}function B(ve){if(typeof WeakMap!="function")return null;var Se=new WeakMap,Pe=new WeakMap;return(B=function(Me){return Me?Pe:Se})(ve)}function V(ve,Se){if(ve&&ve.__esModule)return ve;if(ve===null||typeof ve!="object"&&typeof ve!="function")return{default:ve};var Pe=B(Se);if(Pe&&Pe.has(ve))return Pe.get(ve);var Me={},Ie=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Ve in ve)if(Ve!=="default"&&Object.prototype.hasOwnProperty.call(ve,Ve)){var Ze=Ie?Object.getOwnPropertyDescriptor(ve,Ve):null;Ze&&(Ze.get||Ze.set)?Object.defineProperty(Me,Ve,Ze):Me[Ve]=ve[Ve]}return Me.default=ve,Pe&&Pe.set(ve,Me),Me}function X(){return X=Object.assign?Object.assign.bind():function(ve){for(var Se=1;Se<arguments.length;Se++){var Pe=arguments[Se];for(var Me in Pe)Object.prototype.hasOwnProperty.call(Pe,Me)&&(ve[Me]=Pe[Me])}return ve},X.apply(this,arguments)}function ie(ve,Se,Pe){return Se=de(Se),Se in ve?Object.defineProperty(ve,Se,{value:Pe,enumerable:!0,configurable:!0,writable:!0}):ve[Se]=Pe,ve}function de(ve){var Se=ae(ve,"string");return typeof Se=="symbol"?Se:String(Se)}function ae(ve,Se){if(typeof ve!="object"||ve===null)return ve;var Pe=ve[Symbol.toPrimitive];if(Pe!==void 0){var Me=Pe.call(ve,Se);if(typeof Me!="object")return Me;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Se==="string"?String:Number)(ve)}class U extends e.Component{static getDerivedStateFromProps(Se,Pe){let{position:Me}=Se,{prevPropsPosition:Ie}=Pe;return Me&&(!Ie||Me.x!==Ie.x||Me.y!==Ie.y)?((0,b.default)("Draggable: getDerivedStateFromProps %j",{position:Me,prevPropsPosition:Ie}),{x:Me.x,y:Me.y,prevPropsPosition:{...Me}}):null}constructor(Se){super(Se),ie(this,"onDragStart",(Pe,Me)=>{if((0,b.default)("Draggable: onDragStart: %j",Me),this.props.onStart(Pe,(0,o.createDraggableData)(this,Me))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),ie(this,"onDrag",(Pe,Me)=>{if(!this.state.dragging)return!1;(0,b.default)("Draggable: onDrag: %j",Me);const Ie=(0,o.createDraggableData)(this,Me),Ve={x:Ie.x,y:Ie.y,slackX:0,slackY:0};if(this.props.bounds){const{x:Je,y:nt}=Ve;Ve.x+=this.state.slackX,Ve.y+=this.state.slackY;const[ut,ht]=(0,o.getBoundPosition)(this,Ve.x,Ve.y);Ve.x=ut,Ve.y=ht,Ve.slackX=this.state.slackX+(Je-Ve.x),Ve.slackY=this.state.slackY+(nt-Ve.y),Ie.x=Ve.x,Ie.y=Ve.y,Ie.deltaX=Ve.x-this.state.x,Ie.deltaY=Ve.y-this.state.y}if(this.props.onDrag(Pe,Ie)===!1)return!1;this.setState(Ve)}),ie(this,"onDragStop",(Pe,Me)=>{if(!this.state.dragging||this.props.onStop(Pe,(0,o.createDraggableData)(this,Me))===!1)return!1;(0,b.default)("Draggable: onDragStop: %j",Me);const Ve={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:Je,y:nt}=this.props.position;Ve.x=Je,Ve.y=nt}this.setState(Ve)}),this.state={dragging:!1,dragged:!1,x:Se.position?Se.position.x:Se.defaultPosition.x,y:Se.position?Se.position.y:Se.defaultPosition.y,prevPropsPosition:{...Se.position},slackX:0,slackY:0,isElementSVG:!1},Se.position&&!(Se.onDrag||Se.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var Se,Pe;return(Se=(Pe=this.props)===null||Pe===void 0||(Pe=Pe.nodeRef)===null||Pe===void 0?void 0:Pe.current)!==null&&Se!==void 0?Se:n.default.findDOMNode(this)}render(){const{axis:Se,bounds:Pe,children:Me,defaultPosition:Ie,defaultClassName:Ve,defaultClassNameDragging:Ze,defaultClassNameDragged:Je,position:nt,positionOffset:ut,scale:ht,..._t}=this.props;let Dt={},qt=null;const dr=!!!nt||this.state.dragging,Zt=nt||Ie,Cr={x:(0,o.canDragX)(this)&&dr?this.state.x:Zt.x,y:(0,o.canDragY)(this)&&dr?this.state.y:Zt.y};this.state.isElementSVG?qt=(0,a.createSVGTransform)(Cr,ut):Dt=(0,a.createCSSTransform)(Cr,ut);const yt=(0,i.default)(Me.props.className||"",Ve,{[Ze]:this.state.dragging,[Je]:this.state.dragged});return e.createElement(d.default,X({},_t,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),e.cloneElement(e.Children.only(Me),{className:yt,style:{...Me.props.style,...Dt},transform:qt}))}}t.default=U,ie(U,"displayName","Draggable"),ie(U,"propTypes",{...d.default.propTypes,axis:r.default.oneOf(["both","x","y","none"]),bounds:r.default.oneOfType([r.default.shape({left:r.default.number,right:r.default.number,top:r.default.number,bottom:r.default.number}),r.default.string,r.default.oneOf([!1])]),defaultClassName:r.default.string,defaultClassNameDragging:r.default.string,defaultClassNameDragged:r.default.string,defaultPosition:r.default.shape({x:r.default.number,y:r.default.number}),positionOffset:r.default.shape({x:r.default.oneOfType([r.default.number,r.default.string]),y:r.default.oneOfType([r.default.number,r.default.string])}),position:r.default.shape({x:r.default.number,y:r.default.number}),className:s.dontSetMe,style:s.dontSetMe,transform:s.dontSetMe}),ie(U,"defaultProps",{...d.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})})(Eoe)),Eoe}var P4e;function Xar(){if(P4e)return pz.exports;P4e=1;const{default:t,DraggableCore:e}=Yar();return pz.exports=t,pz.exports.default=t,pz.exports.DraggableCore=e,pz.exports}var Zar=Xar();const Kar=Qh(Zar);var xb=function(){return xb=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},xb.apply(this,arguments)},D4e={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},L4e={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},wq={width:"20px",height:"20px",position:"absolute",zIndex:1},Jar={top:xb(xb({},D4e),{top:"-5px"}),right:xb(xb({},L4e),{left:void 0,right:"-5px"}),bottom:xb(xb({},D4e),{top:void 0,bottom:"-5px"}),left:xb(xb({},L4e),{left:"-5px"}),topRight:xb(xb({},wq),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:xb(xb({},wq),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:xb(xb({},wq),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:xb(xb({},wq),{left:"-10px",top:"-10px",cursor:"nw-resize"})},Qar=ze.memo(function(t){var e=t.onResizeStart,r=t.direction,n=t.children,i=t.replaceStyles,a=t.className,o=ze.useCallback(function(b){e(b,r)},[e,r]),s=ze.useCallback(function(b){e(b,r)},[e,r]),d=ze.useMemo(function(){return xb(xb({position:"absolute",userSelect:"none"},Jar[r]),i??{})},[i,r]);return Ke.jsx("div",{className:a||void 0,style:d,onMouseDown:o,onTouchStart:s,children:n})}),eor=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),d5=function(){return d5=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},d5.apply(this,arguments)},tor={width:"auto",height:"auto"},Sq=function(t,e,r){return Math.max(Math.min(t,r),e)},O4e=function(t,e,r){var n=Math.round(t/e);return n*e+r*(n-1)},nN=function(t,e){return new RegExp(t,"i").test(e)},Tq=function(t){return!!(t.touches&&t.touches.length)},ror=function(t){return!!((t.clientX||t.clientX===0)&&(t.clientY||t.clientY===0))},N4e=function(t,e,r){r===void 0&&(r=0);var n=e.reduce(function(a,o,s){return Math.abs(o-t)<Math.abs(e[a]-t)?s:a},0),i=Math.abs(e[n]-t);return r===0||i<r?e[n]:t},Aoe=function(t){return t=t.toString(),t==="auto"||t.endsWith("px")||t.endsWith("%")||t.endsWith("vh")||t.endsWith("vw")||t.endsWith("vmax")||t.endsWith("vmin")?t:"".concat(t,"px")},Eq=function(t,e,r,n){if(t&&typeof t=="string"){if(t.endsWith("px"))return Number(t.replace("px",""));if(t.endsWith("%")){var i=Number(t.replace("%",""))/100;return e*i}if(t.endsWith("vw")){var i=Number(t.replace("vw",""))/100;return r*i}if(t.endsWith("vh")){var i=Number(t.replace("vh",""))/100;return n*i}}return t},nor=function(t,e,r,n,i,a,o){return n=Eq(n,t.width,e,r),i=Eq(i,t.height,e,r),a=Eq(a,t.width,e,r),o=Eq(o,t.height,e,r),{maxWidth:typeof n>"u"?void 0:Number(n),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof a>"u"?void 0:Number(a),minHeight:typeof o>"u"?void 0:Number(o)}},ior=function(t){return Array.isArray(t)?t:[t,t]},aor=["as","ref","style","className","grid","gridGap","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],F4e="__resizable_base__",oor=(function(t){eor(e,t);function e(r){var n,i,a,o,s=t.call(this,r)||this;return s.ratio=1,s.resizable=null,s.parentLeft=0,s.parentTop=0,s.resizableLeft=0,s.resizableRight=0,s.resizableTop=0,s.resizableBottom=0,s.targetLeft=0,s.targetTop=0,s.delta={width:0,height:0},s.appendBase=function(){if(!s.resizable||!s.window)return null;var d=s.parentNode;if(!d)return null;var b=s.window.document.createElement("div");return b.style.width="100%",b.style.height="100%",b.style.position="absolute",b.style.transform="scale(0, 0)",b.style.left="0",b.style.flex="0 0 100%",b.classList?b.classList.add(F4e):b.className+=F4e,d.appendChild(b),b},s.removeBase=function(d){var b=s.parentNode;b&&b.removeChild(d)},s.state={isResizing:!1,width:(i=(n=s.propsSize)===null||n===void 0?void 0:n.width)!==null&&i!==void 0?i:"auto",height:(o=(a=s.propsSize)===null||a===void 0?void 0:a.height)!==null&&o!==void 0?o:"auto",direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},s.onResizeStart=s.onResizeStart.bind(s),s.onMouseMove=s.onMouseMove.bind(s),s.onMouseUp=s.onMouseUp.bind(s),s}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||tor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){var r=0,n=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,a=this.resizable.offsetHeight,o=this.resizable.style.position;o!=="relative"&&(this.resizable.style.position="relative"),r=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,n=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:a,this.resizable.style.position=o}return{width:r,height:n}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sizeStyle",{get:function(){var r=this,n=this.props.size,i=function(s){var d;if(typeof r.state[s]>"u"||r.state[s]==="auto")return"auto";if(r.propsSize&&r.propsSize[s]&&(!((d=r.propsSize[s])===null||d===void 0)&&d.toString().endsWith("%"))){if(r.state[s].toString().endsWith("%"))return r.state[s].toString();var b=r.getParentSize(),L=Number(r.state[s].toString().replace("px","")),B=L/b[s]*100;return"".concat(B,"%")}return Aoe(r.state[s])},a=n&&typeof n.width<"u"&&!this.state.isResizing?Aoe(n.width):i("width"),o=n&&typeof n.height<"u"&&!this.state.isResizing?Aoe(n.height):i("height");return{width:a,height:o}},enumerable:!1,configurable:!0}),e.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var r=this.appendBase();if(!r)return{width:0,height:0};var n=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(n=!0,this.parentNode.style.flexWrap="wrap"),r.style.position="relative",r.style.minWidth="100%",r.style.minHeight="100%";var a={width:r.offsetWidth,height:r.offsetHeight};return n&&(this.parentNode.style.flexWrap=i),this.removeBase(r),a},e.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},e.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},e.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var r=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:r.flexBasis!=="auto"?r.flexBasis:void 0})}},e.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},e.prototype.createSizeForCssProperty=function(r,n){var i=this.propsSize&&this.propsSize[n];return this.state[n]==="auto"&&this.state.original[n]===r&&(typeof i>"u"||i==="auto")?"auto":r},e.prototype.calculateNewMaxFromBoundary=function(r,n){var i=this.props.boundsByDirection,a=this.state.direction,o=i&&nN("left",a),s=i&&nN("top",a),d,b;if(this.props.bounds==="parent"){var L=this.parentNode;L&&(d=o?this.resizableRight-this.parentLeft:L.offsetWidth+(this.parentLeft-this.resizableLeft),b=s?this.resizableBottom-this.parentTop:L.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(d=o?this.resizableRight:this.window.innerWidth-this.resizableLeft,b=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(d=o?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),b=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return d&&Number.isFinite(d)&&(r=r&&r<d?r:d),b&&Number.isFinite(b)&&(n=n&&n<b?n:b),{maxWidth:r,maxHeight:n}},e.prototype.calculateNewSizeFromDirection=function(r,n){var i=this.props.scale||1,a=ior(this.props.resizeRatio||1),o=a[0],s=a[1],d=this.state,b=d.direction,L=d.original,B=this.props,V=B.lockAspectRatio,X=B.lockAspectRatioExtraHeight,ie=B.lockAspectRatioExtraWidth,de=L.width,ae=L.height,U=X||0,ve=ie||0;return nN("right",b)&&(de=L.width+(r-L.x)*o/i,V&&(ae=(de-ve)/this.ratio+U)),nN("left",b)&&(de=L.width-(r-L.x)*o/i,V&&(ae=(de-ve)/this.ratio+U)),nN("bottom",b)&&(ae=L.height+(n-L.y)*s/i,V&&(de=(ae-U)*this.ratio+ve)),nN("top",b)&&(ae=L.height-(n-L.y)*s/i,V&&(de=(ae-U)*this.ratio+ve)),{newWidth:de,newHeight:ae}},e.prototype.calculateNewSizeFromAspectRatio=function(r,n,i,a){var o=this.props,s=o.lockAspectRatio,d=o.lockAspectRatioExtraHeight,b=o.lockAspectRatioExtraWidth,L=typeof a.width>"u"?10:a.width,B=typeof i.width>"u"||i.width<0?r:i.width,V=typeof a.height>"u"?10:a.height,X=typeof i.height>"u"||i.height<0?n:i.height,ie=d||0,de=b||0;if(s){var ae=(V-ie)*this.ratio+de,U=(X-ie)*this.ratio+de,ve=(L-de)/this.ratio+ie,Se=(B-de)/this.ratio+ie,Pe=Math.max(L,ae),Me=Math.min(B,U),Ie=Math.max(V,ve),Ve=Math.min(X,Se);r=Sq(r,Pe,Me),n=Sq(n,Ie,Ve)}else r=Sq(r,L,B),n=Sq(n,V,X);return{newWidth:r,newHeight:n}},e.prototype.setBoundingClientRect=function(){var r=1/(this.props.scale||1);if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var i=n.getBoundingClientRect();this.parentLeft=i.left*r,this.parentTop=i.top*r}}if(this.props.bounds&&typeof this.props.bounds!="string"){var a=this.props.bounds.getBoundingClientRect();this.targetLeft=a.left*r,this.targetTop=a.top*r}if(this.resizable){var o=this.resizable.getBoundingClientRect(),s=o.left,d=o.top,b=o.right,L=o.bottom;this.resizableLeft=s*r,this.resizableRight=b*r,this.resizableTop=d*r,this.resizableBottom=L*r}},e.prototype.onResizeStart=function(r,n){if(!(!this.resizable||!this.window)){var i=0,a=0;if(r.nativeEvent&&ror(r.nativeEvent)?(i=r.nativeEvent.clientX,a=r.nativeEvent.clientY):r.nativeEvent&&Tq(r.nativeEvent)&&(i=r.nativeEvent.touches[0].clientX,a=r.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var o=this.props.onResizeStart(r,n,this.resizable);if(o===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,d=this.window.getComputedStyle(this.resizable);if(d.flexBasis!=="auto"){var b=this.parentNode;if(b){var L=this.window.getComputedStyle(b).flexDirection;this.flexDir=L.startsWith("row")?"row":"column",s=d.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var B={original:{x:i,y:a,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:d5(d5({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(r.target).cursor||"auto"}),direction:n,flexBasis:s};this.setState(B)}},e.prototype.onMouseMove=function(r){var n=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&Tq(r))try{r.preventDefault(),r.stopPropagation()}catch{}var i=this.props,a=i.maxWidth,o=i.maxHeight,s=i.minWidth,d=i.minHeight,b=Tq(r)?r.touches[0].clientX:r.clientX,L=Tq(r)?r.touches[0].clientY:r.clientY,B=this.state,V=B.direction,X=B.original,ie=B.width,de=B.height,ae=this.getParentSize(),U=nor(ae,this.window.innerWidth,this.window.innerHeight,a,o,s,d);a=U.maxWidth,o=U.maxHeight,s=U.minWidth,d=U.minHeight;var ve=this.calculateNewSizeFromDirection(b,L),Se=ve.newHeight,Pe=ve.newWidth,Me=this.calculateNewMaxFromBoundary(a,o);this.props.snap&&this.props.snap.x&&(Pe=N4e(Pe,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(Se=N4e(Se,this.props.snap.y,this.props.snapGap));var Ie=this.calculateNewSizeFromAspectRatio(Pe,Se,{width:Me.maxWidth,height:Me.maxHeight},{width:s,height:d});if(Pe=Ie.newWidth,Se=Ie.newHeight,this.props.grid){var Ve=O4e(Pe,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),Ze=O4e(Se,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),Je=this.props.snapGap||0,nt=Je===0||Math.abs(Ve-Pe)<=Je?Ve:Pe,ut=Je===0||Math.abs(Ze-Se)<=Je?Ze:Se;Pe=nt,Se=ut}var ht={width:Pe-X.width,height:Se-X.height};if(this.delta=ht,ie&&typeof ie=="string"){if(ie.endsWith("%")){var _t=Pe/ae.width*100;Pe="".concat(_t,"%")}else if(ie.endsWith("vw")){var Dt=Pe/this.window.innerWidth*100;Pe="".concat(Dt,"vw")}else if(ie.endsWith("vh")){var qt=Pe/this.window.innerHeight*100;Pe="".concat(qt,"vh")}}if(de&&typeof de=="string"){if(de.endsWith("%")){var _t=Se/ae.height*100;Se="".concat(_t,"%")}else if(de.endsWith("vw")){var Dt=Se/this.window.innerWidth*100;Se="".concat(Dt,"vw")}else if(de.endsWith("vh")){var qt=Se/this.window.innerHeight*100;Se="".concat(qt,"vh")}}var Lt={width:this.createSizeForCssProperty(Pe,"width"),height:this.createSizeForCssProperty(Se,"height")};this.flexDir==="row"?Lt.flexBasis=Lt.width:this.flexDir==="column"&&(Lt.flexBasis=Lt.height);var dr=this.state.width!==Lt.width,Zt=this.state.height!==Lt.height,Cr=this.state.flexBasis!==Lt.flexBasis,yt=dr||Zt||Cr;yt&&k8.flushSync(function(){n.setState(Lt)}),this.props.onResize&&yt&&this.props.onResize(r,V,this.resizable,ht)}},e.prototype.onMouseUp=function(r){var n,i,a=this.state,o=a.isResizing,s=a.direction;a.original,!(!o||!this.resizable)&&(this.props.onResizeStop&&this.props.onResizeStop(r,s,this.resizable,this.delta),this.props.size&&this.setState({width:(n=this.props.size.width)!==null&&n!==void 0?n:"auto",height:(i=this.props.size.height)!==null&&i!==void 0?i:"auto"}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:d5(d5({},this.state.backgroundStyle),{cursor:"auto"})}))},e.prototype.updateSize=function(r){var n,i;this.setState({width:(n=r.width)!==null&&n!==void 0?n:"auto",height:(i=r.height)!==null&&i!==void 0?i:"auto"})},e.prototype.renderResizer=function(){var r=this,n=this.props,i=n.enable,a=n.handleStyles,o=n.handleClasses,s=n.handleWrapperStyle,d=n.handleWrapperClass,b=n.handleComponent;if(!i)return null;var L=Object.keys(i).map(function(B){return i[B]!==!1?Ke.jsx(Qar,{direction:B,onResizeStart:r.onResizeStart,replaceStyles:a&&a[B],className:o&&o[B],children:b&&b[B]?b[B]:null},B):null});return Ke.jsx("div",{className:d,style:s,children:L})},e.prototype.render=function(){var r=this,n=Object.keys(this.props).reduce(function(o,s){return aor.indexOf(s)!==-1||(o[s]=r.props[s]),o},{}),i=d5(d5(d5({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var a=this.props.as||"div";return Ke.jsxs(a,d5({style:i,className:this.props.className},n,{ref:function(o){o&&(r.resizable=o)},children:[this.state.isResizing&&Ke.jsx("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]}))},e.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],gridGap:[0,0],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},e})(ze.PureComponent);/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var nve=function(t,e){return nve=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},nve(t,e)};function sor(t,e){nve(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var sx=function(){return sx=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},sx.apply(this,arguments)};function lor(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}var uor={width:"auto",height:"auto",display:"inline-block",position:"absolute",top:0,left:0},cor=function(t){return{bottom:t,bottomLeft:t,bottomRight:t,left:t,right:t,top:t,topLeft:t,topRight:t}},_1e=(function(t){sor(e,t);function e(r){var n=t.call(this,r)||this;return n.resizingPosition={x:0,y:0},n.offsetFromParent={left:0,top:0},n.resizableElement={current:null},n.originalPosition={x:0,y:0},n.state={resizing:!1,bounds:{top:0,right:0,bottom:0,left:0},maxWidth:r.maxWidth,maxHeight:r.maxHeight},n.onResizeStart=n.onResizeStart.bind(n),n.onResize=n.onResize.bind(n),n.onResizeStop=n.onResizeStop.bind(n),n.onDragStart=n.onDragStart.bind(n),n.onDrag=n.onDrag.bind(n),n.onDragStop=n.onDragStop.bind(n),n.getMaxSizesFromProps=n.getMaxSizesFromProps.bind(n),n}return e.prototype.componentDidMount=function(){this.updateOffsetFromParent();var r=this.offsetFromParent,n=r.left,i=r.top,a=this.getDraggablePosition(),o=a.x,s=a.y;this.draggable.setState({x:o-n,y:s-i}),this.forceUpdate()},e.prototype.getDraggablePosition=function(){var r=this.draggable.state,n=r.x,i=r.y;return{x:n,y:i}},e.prototype.getParent=function(){return this.resizable&&this.resizable.parentNode},e.prototype.getParentSize=function(){return this.resizable.getParentSize()},e.prototype.getMaxSizesFromProps=function(){var r=typeof this.props.maxWidth>"u"?Number.MAX_SAFE_INTEGER:this.props.maxWidth,n=typeof this.props.maxHeight>"u"?Number.MAX_SAFE_INTEGER:this.props.maxHeight;return{maxWidth:r,maxHeight:n}},e.prototype.getSelfElement=function(){return this.resizable&&this.resizable.resizable},e.prototype.getOffsetHeight=function(r){var n=this.props.scale;switch(this.props.bounds){case"window":return window.innerHeight/n;case"body":return document.body.offsetHeight/n;default:return r.offsetHeight}},e.prototype.getOffsetWidth=function(r){var n=this.props.scale;switch(this.props.bounds){case"window":return window.innerWidth/n;case"body":return document.body.offsetWidth/n;default:return r.offsetWidth}},e.prototype.onDragStart=function(r,n){this.props.onDragStart&&this.props.onDragStart(r,n);var i=this.getDraggablePosition();if(this.originalPosition=i,!!this.props.bounds){var a=this.getParent(),o=this.props.scale,s;if(this.props.bounds==="parent")s=a;else if(this.props.bounds==="body"){var d=a.getBoundingClientRect(),b=d.left,L=d.top,B=document.body.getBoundingClientRect(),V=-(b-a.offsetLeft*o-B.left)/o,X=-(L-a.offsetTop*o-B.top)/o,ie=(document.body.offsetWidth-this.resizable.size.width*o)/o+V,de=(document.body.offsetHeight-this.resizable.size.height*o)/o+X;return this.setState({bounds:{top:X,right:ie,bottom:de,left:V}})}else if(this.props.bounds==="window"){if(!this.resizable)return;var ae=a.getBoundingClientRect(),U=ae.left,ve=ae.top,Se=-(U-a.offsetLeft*o)/o,Pe=-(ve-a.offsetTop*o)/o,ie=(window.innerWidth-this.resizable.size.width*o)/o+Se,de=(window.innerHeight-this.resizable.size.height*o)/o+Pe;return this.setState({bounds:{top:Pe,right:ie,bottom:de,left:Se}})}else typeof this.props.bounds=="string"?s=document.querySelector(this.props.bounds):this.props.bounds instanceof HTMLElement&&(s=this.props.bounds);if(!(!(s instanceof HTMLElement)||!(a instanceof HTMLElement))){var Me=s.getBoundingClientRect(),Ie=Me.left,Ve=Me.top,Ze=a.getBoundingClientRect(),Je=Ze.left,nt=Ze.top,ut=(Ie-Je)/o,ht=Ve-nt;if(this.resizable){this.updateOffsetFromParent();var _t=this.offsetFromParent;this.setState({bounds:{top:ht-_t.top,right:ut+(s.offsetWidth-this.resizable.size.width)-_t.left/o,bottom:ht+(s.offsetHeight-this.resizable.size.height)-_t.top,left:ut-_t.left/o}})}}}},e.prototype.onDrag=function(r,n){if(this.props.onDrag){var i=this.offsetFromParent,a=i.left,o=i.top;if(!this.props.dragAxis||this.props.dragAxis==="both")return this.props.onDrag(r,sx(sx({},n),{x:n.x+a,y:n.y+o}));if(this.props.dragAxis==="x")return this.props.onDrag(r,sx(sx({},n),{x:n.x+a,y:this.originalPosition.y+o,deltaY:0}));if(this.props.dragAxis==="y")return this.props.onDrag(r,sx(sx({},n),{x:this.originalPosition.x+a,y:n.y+o,deltaX:0}))}},e.prototype.onDragStop=function(r,n){if(this.props.onDragStop){var i=this.offsetFromParent,a=i.left,o=i.top;if(!this.props.dragAxis||this.props.dragAxis==="both")return this.props.onDragStop(r,sx(sx({},n),{x:n.x+a,y:n.y+o}));if(this.props.dragAxis==="x")return this.props.onDragStop(r,sx(sx({},n),{x:n.x+a,y:this.originalPosition.y+o,deltaY:0}));if(this.props.dragAxis==="y")return this.props.onDragStop(r,sx(sx({},n),{x:this.originalPosition.x+a,y:n.y+o,deltaX:0}))}},e.prototype.onResizeStart=function(r,n,i){r.stopPropagation(),this.setState({resizing:!0});var a=this.props.scale,o=this.offsetFromParent,s=this.getDraggablePosition();if(this.resizingPosition={x:s.x+o.left,y:s.y+o.top},this.originalPosition=s,this.props.bounds){var d=this.getParent(),b=void 0;this.props.bounds==="parent"?b=d:this.props.bounds==="body"?b=document.body:this.props.bounds==="window"?b=window:typeof this.props.bounds=="string"?b=document.querySelector(this.props.bounds):this.props.bounds instanceof HTMLElement&&(b=this.props.bounds);var L=this.getSelfElement();if(L instanceof Element&&(b instanceof HTMLElement||b===window)&&d instanceof HTMLElement){var B=this.getMaxSizesFromProps(),V=B.maxWidth,X=B.maxHeight,ie=this.getParentSize();if(V&&typeof V=="string")if(V.endsWith("%")){var de=Number(V.replace("%",""))/100;V=ie.width*de}else V.endsWith("px")&&(V=Number(V.replace("px","")));if(X&&typeof X=="string")if(X.endsWith("%")){var de=Number(X.replace("%",""))/100;X=ie.height*de}else X.endsWith("px")&&(X=Number(X.replace("px","")));var ae=L.getBoundingClientRect(),U=ae.left,ve=ae.top,Se=this.props.bounds==="window"?{left:0,top:0}:b.getBoundingClientRect(),Pe=Se.left,Me=Se.top,Ie=this.getOffsetWidth(b),Ve=this.getOffsetHeight(b),Ze=n.toLowerCase().endsWith("left"),Je=n.toLowerCase().endsWith("right"),nt=n.startsWith("top"),ut=n.startsWith("bottom");if((Ze||nt)&&this.resizable){var ht=(U-Pe)/a+this.resizable.size.width;this.setState({maxWidth:ht>Number(V)?V:ht})}if(Je||this.props.lockAspectRatio&&!Ze&&!nt){var ht=Ie+(Pe-U)/a;this.setState({maxWidth:ht>Number(V)?V:ht})}if((nt||Ze)&&this.resizable){var ht=(ve-Me)/a+this.resizable.size.height;this.setState({maxHeight:ht>Number(X)?X:ht})}if(ut||this.props.lockAspectRatio&&!nt&&!Ze){var ht=Ve+(Me-ve)/a;this.setState({maxHeight:ht>Number(X)?X:ht})}}}else this.setState({maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight});this.props.onResizeStart&&this.props.onResizeStart(r,n,i)},e.prototype.onResize=function(r,n,i,a){var o=this,s={x:this.originalPosition.x,y:this.originalPosition.y},d=-a.width,b=-a.height,L=["top","left","topLeft","bottomLeft","topRight"];L.includes(n)&&(n==="bottomLeft"?s.x+=d:(n==="topRight"||(s.x+=d),s.y+=b));var B=this.draggable.state;(s.x!==B.x||s.y!==B.y)&&k8.flushSync(function(){o.draggable.setState(s)}),this.updateOffsetFromParent();var V=this.offsetFromParent,X=this.getDraggablePosition().x+V.left,ie=this.getDraggablePosition().y+V.top;this.resizingPosition={x:X,y:ie},this.props.onResize&&this.props.onResize(r,n,i,a,{x:X,y:ie})},e.prototype.onResizeStop=function(r,n,i,a){this.setState({resizing:!1});var o=this.getMaxSizesFromProps(),s=o.maxWidth,d=o.maxHeight;this.setState({maxWidth:s,maxHeight:d}),this.props.onResizeStop&&this.props.onResizeStop(r,n,i,a,this.resizingPosition)},e.prototype.updateSize=function(r){this.resizable&&this.resizable.updateSize({width:r.width,height:r.height})},e.prototype.updatePosition=function(r){this.draggable.setState(r)},e.prototype.updateOffsetFromParent=function(){var r=this.props.scale,n=this.getParent(),i=this.getSelfElement();if(!n||i===null)return{top:0,left:0};var a=n.getBoundingClientRect(),o=a.left,s=a.top,d=i.getBoundingClientRect(),b=this.getDraggablePosition(),L=n.scrollLeft,B=n.scrollTop;this.offsetFromParent={left:d.left-o+L-b.x*r,top:d.top-s+B-b.y*r}},e.prototype.render=function(){var r=this,n=this.props,i=n.disableDragging,a=n.style,o=n.dragHandleClassName,s=n.position,d=n.onMouseDown,b=n.onMouseUp,L=n.dragAxis,B=n.dragGrid,V=n.bounds,X=n.enableUserSelectHack,ie=n.cancel,de=n.children;n.onResizeStart,n.onResize,n.onResizeStop,n.onDragStart,n.onDrag,n.onDragStop;var ae=n.resizeHandleStyles,U=n.resizeHandleClasses,ve=n.resizeHandleComponent,Se=n.enableResizing,Pe=n.resizeGrid,Me=n.resizeHandleWrapperClass,Ie=n.resizeHandleWrapperStyle,Ve=n.scale,Ze=n.allowAnyClick,Je=n.dragPositionOffset,nt=lor(n,["disableDragging","style","dragHandleClassName","position","onMouseDown","onMouseUp","dragAxis","dragGrid","bounds","enableUserSelectHack","cancel","children","onResizeStart","onResize","onResizeStop","onDragStart","onDrag","onDragStop","resizeHandleStyles","resizeHandleClasses","resizeHandleComponent","enableResizing","resizeGrid","resizeHandleWrapperClass","resizeHandleWrapperStyle","scale","allowAnyClick","dragPositionOffset"]),ut=this.props.default?sx({},this.props.default):void 0;delete nt.default;var ht=i||o?{cursor:"auto"}:{cursor:"move"},_t=sx(sx(sx({},uor),ht),a),Dt=this.offsetFromParent,qt=Dt.left,Lt=Dt.top,dr;s&&(dr={x:s.x-qt,y:s.y-Lt});var Zt=this.state.resizing?void 0:dr,Cr=this.state.resizing?"both":L;return ze.createElement(Kar,{ref:function(yt){yt&&(r.draggable=yt)},handle:o?".".concat(o):void 0,defaultPosition:ut,onMouseDown:d,onMouseUp:b,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,axis:Cr,disabled:i,grid:B,bounds:V?this.state.bounds:void 0,position:Zt,enableUserSelectHack:X,cancel:ie,scale:Ve,allowAnyClick:Ze,nodeRef:this.resizableElement,positionOffset:Je},ze.createElement(oor,sx({},nt,{ref:function(yt){yt&&(r.resizable=yt,r.resizableElement.current=yt.resizable)},defaultSize:ut,size:this.props.size,enable:typeof Se=="boolean"?cor(Se):Se,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,style:_t,minWidth:this.props.minWidth,minHeight:this.props.minHeight,maxWidth:this.state.resizing?this.state.maxWidth:this.props.maxWidth,maxHeight:this.state.resizing?this.state.maxHeight:this.props.maxHeight,grid:Pe,handleWrapperClass:Me,handleWrapperStyle:Ie,lockAspectRatio:this.props.lockAspectRatio,lockAspectRatioExtraWidth:this.props.lockAspectRatioExtraWidth,lockAspectRatioExtraHeight:this.props.lockAspectRatioExtraHeight,handleStyles:ae,handleClasses:U,handleComponent:ve,scale:this.props.scale}),de))},e.defaultProps={maxWidth:Number.MAX_SAFE_INTEGER,maxHeight:Number.MAX_SAFE_INTEGER,scale:1,onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},onDragStart:function(){},onDrag:function(){},onDragStop:function(){}},e})(ze.PureComponent);const KYe=(t={})=>{const{category:e="all",enabled:r=!0}=t,{roomId:n,userId:i,currentFrame:a,particleCount:o}=rh(),{data:s}=Ek(n||"",i||"","settings","property_inspector"),d=s?.enabled_properties||[],b=r&&e!=="all"&&d.length>0,{data:L}=jGe(n||void 0,a,o,b),B=ze.useMemo(()=>{if(e==="all"||!L)return d;const X=new Set(L.perParticle.map(de=>de.key)),ie=new Set(L.global.map(de=>de.key));return d.filter(de=>e==="per-particle"?X.has(de):e==="global"?ie.has(de):!0)},[d,L,e]),V=iWt(n||void 0,a,B,r&&B.length>0);return{enabledProperties:B,propertyValues:V,isEnabled:B.length>0,categories:L}},dor=t=>(Array.isArray(t)||ArrayBuffer.isView(t))&&t.length>0,fB=t=>typeof t=="number"?t.toFixed(3):typeof t=="bigint"?t.toString():String(t),hor=(t,e=5)=>{const r=Array.from(t);return r.length<=e?`[${r.map(fB).join(", ")}]`:`[${r.slice(0,3).map(fB).join(", ")}, ... +${r.length-3}]`},por=(t,e,r)=>{const n=r?.metadata?.shape;if(n&&n.length>1){const a=n[1],o=e*a;return`[${Array.from(t.slice(o,o+a)).map(fB).join(", ")}]`}const i=t[e];return fB(i)},JYe=(t,e,r)=>t==null?"—":dor(t)?e!=null?por(t,e,r):hor(t):fB(t);function vor(){const t=cy(),{showInfoBoxes:e,particleCount:r,selection:n}=rh(),{enabledProperties:i,propertyValues:a,isEnabled:o}=KYe({category:"global",enabled:e});if(!e)return null;const s=n?.length||0;return Ke.jsx(_1e,{default:{x:window.innerWidth-280,y:84,width:240,height:"auto"},minWidth:200,minHeight:100,bounds:".drag-boundary-container",dragHandleClassName:"info-drag-handle",style:{zIndex:1300},enableResizing:!1,children:Ke.jsx(Gy,{elevation:3,sx:{width:"100%",height:"100%",display:"flex",flexDirection:"column",backgroundColor:t.palette.mode==="dark"?"rgba(0, 0, 0, 0.8)":"rgba(255, 255, 255, 0.9)",backdropFilter:"blur(10px)",border:`1px solid ${t.palette.mode==="dark"?"rgba(255, 255, 255, 0.1)":"rgba(0, 0, 0, 0.1)"}`},children:Ke.jsxs(Ul,{className:"info-drag-handle",sx:{padding:2,cursor:"move"},children:[Ke.jsx(Su,{variant:"h6",sx:{color:t.palette.text.primary,fontWeight:"bold",marginBottom:1,fontSize:"0.9rem"},children:"Scene Info"}),Ke.jsxs(Ul,{sx:{display:"flex",flexDirection:"column",gap:.5},children:[Ke.jsxs(Su,{variant:"body2",sx:{color:t.palette.text.secondary},children:["Particles: ",Ke.jsx("strong",{style:{color:t.palette.text.primary},children:r})]}),s>0&&Ke.jsxs(Su,{variant:"body2",sx:{color:t.palette.warning.main},children:["Selected: ",Ke.jsx("strong",{children:s})]}),o&&a.map((d,b)=>{const L=i[b];if(d.isLoading||d.isError||!d.data?.value)return null;const B=d.data.value,V=JYe(B);return Ke.jsxs(Su,{variant:"caption",sx:{color:t.palette.text.secondary,fontFamily:"monospace",fontSize:"0.75rem"},children:[L,": ",V]},L)})]})]})})})}function mor(){const t=cy(),{showInfoBoxes:e,hoveredParticleId:r,curveLength:n,isDrawing:i}=rh(),[a,o]=ze.useState({x:0,y:0}),s=e&&r!==null,{enabledProperties:d,propertyValues:b,isEnabled:L,categories:B}=KYe({category:"per-particle",enabled:s});if(ze.useEffect(()=>{const de=ae=>{o({x:ae.clientX,y:ae.clientY})};return window.addEventListener("mousemove",de),()=>window.removeEventListener("mousemove",de)},[]),!e)return null;const V=r!==null,X=i&&n>0;return V||X?Ke.jsx(Ul,{sx:{position:"fixed",left:a.x+20,top:a.y+20,pointerEvents:"none",userSelect:"none",zIndex:1e4},children:Ke.jsx(Gy,{elevation:3,sx:{padding:1.5,backgroundColor:t.palette.mode==="dark"?"rgba(0, 0, 0, 0.85)":"rgba(255, 255, 255, 0.95)",backdropFilter:"blur(10px)",borderRadius:1,minWidth:"120px",border:`1px solid ${t.palette.mode==="dark"?"rgba(255, 255, 255, 0.15)":"rgba(0, 0, 0, 0.15)"}`},children:Ke.jsxs(Ul,{sx:{display:"flex",flexDirection:"column",gap:.5},children:[V&&Ke.jsxs(Ke.Fragment,{children:[Ke.jsxs(Su,{variant:"body2",sx:{color:t.palette.primary.main,fontWeight:"bold"},children:["Particle: ",r]}),L&&r!==null&&b.map((de,ae)=>{const U=d[ae];if(de.isLoading||de.isError||!de.data?.value)return null;const ve=de.data.value,Se=B?.perParticle.find(Me=>Me.key===U),Pe=JYe(ve,r,Se);return Ke.jsxs(Su,{variant:"caption",sx:{color:t.palette.text.secondary,fontFamily:"monospace",fontSize:"0.75rem"},children:[U,": ",Pe]},U)})]}),X&&Ke.jsxs(Su,{variant:"body2",sx:{color:t.palette.warning.main,fontWeight:"bold"},children:["Length: ",n.toFixed(2)]})]})})}):null}function gor(){const{isDrawing:t,activeCurveForDrawing:e,setActiveCurveForDrawing:r,geometries:n}=rh(),[i,a]=ze.useState(null);if(!t||!e)return null;const o=Object.entries(n).filter(([V,X])=>X.type==="Curve"&&X.data?.active!==!1).map(([V,X])=>V),s=V=>{o.length>1&&a(V.currentTarget)},d=()=>{a(null)},b=V=>{r(V),d()},L=!!i,B=o.length>1;return Ke.jsxs(Ke.Fragment,{children:[Ke.jsx(Ul,{sx:{position:"fixed",bottom:80,right:16,zIndex:V=>V.zIndex.tooltip},children:Ke.jsx(Eb,{icon:Ke.jsx(y9e,{}),label:Ke.jsxs(Ul,{sx:{display:"flex",alignItems:"center",gap:.5},children:[Ke.jsxs(Su,{variant:"body2",children:["Drawing on: ",e]}),B&&Ke.jsx(o8,{fontSize:"small"})]}),color:"primary",size:"medium",onClick:s,sx:{cursor:B?"pointer":"default","& .MuiChip-label":{px:1}}})}),B&&Ke.jsx(xme,{anchorEl:i,open:L,onClose:d,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"},children:o.map(V=>Ke.jsx(Xx,{selected:V===e,onClick:()=>b(V),children:V},V))})]})}function QYe(t,e,r=0){if(t.isInterleavedBufferAttribute){const n=t.itemSize;for(let i=0,a=t.count;i<a;i++){const o=i+r;e.setX(o,t.getX(i)),n>=2&&e.setY(o,t.getY(i)),n>=3&&e.setZ(o,t.getZ(i)),n>=4&&e.setW(o,t.getW(i))}}else{const n=e.array,i=n.constructor,a=n.BYTES_PER_ELEMENT*t.itemSize*r;new i(n.buffer,a,t.array.length).set(t.array)}}function Uz(t,e=null){const r=t.array.constructor,n=t.normalized,i=t.itemSize,a=e===null?t.count:e;return new Kh(new r(i*a),i,n)}function gN(t,e){if(!t&&!e)return!0;if(!!t!=!!e)return!1;const r=t.count===e.count,n=t.normalized===e.normalized,i=t.array.constructor===e.array.constructor,a=t.itemSize===e.itemSize;return!(!r||!n||!i||!a)}function yor(t){const e=t[0].index!==null,r=new Set(Object.keys(t[0].attributes));if(!t[0].getAttribute("position"))throw new Error("StaticGeometryGenerator: position attribute is required.");for(let n=0;n<t.length;++n){const i=t[n];let a=0;if(e!==(i.index!==null))throw new Error("StaticGeometryGenerator: All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them.");for(const o in i.attributes){if(!r.has(o))throw new Error('StaticGeometryGenerator: All geometries must have compatible attributes; make sure "'+o+'" attribute exists among all geometries, or in none of them.');a++}if(a!==r.size)throw new Error("StaticGeometryGenerator: All geometries must have the same number of attributes.")}}function bor(t){let e=0;for(let r=0,n=t.length;r<n;r++)e+=t[r].getIndex().count;return e}function xor(t){let e=0;for(let r=0,n=t.length;r<n;r++)e+=t[r].getAttribute("position").count;return e}function _or(t,e,r){t.index&&t.index.count!==e&&t.setIndex(null);const n=t.attributes;for(const i in n)n[i].count!==r&&t.deleteAttribute(i)}function wor(t,e={},r=new Jf){const{useGroups:n=!1,forceUpdate:i=!1,skipAssigningAttributes:a=[],overwriteIndex:o=!0}=e;yor(t);const s=t[0].index!==null,d=s?bor(t):-1,b=xor(t);if(_or(r,d,b),n){let B=0;for(let V=0,X=t.length;V<X;V++){const ie=t[V];let de;s?de=ie.getIndex().count:de=ie.getAttribute("position").count,r.addGroup(B,de,V),B+=de}}if(s){let B=!1;if(r.index||(r.setIndex(new Kh(new Uint32Array(d),1,!1)),B=!0),B||o){let V=0,X=0;const ie=r.getIndex();for(let de=0,ae=t.length;de<ae;de++){const U=t[de],ve=U.getIndex();if(!(!i&&!B&&a[de]))for(let Pe=0;Pe<ve.count;++Pe)ie.setX(V+Pe,ve.getX(Pe)+X);V+=ve.count,X+=U.getAttribute("position").count}}}const L=Object.keys(t[0].attributes);for(let B=0,V=L.length;B<V;B++){let X=!1;const ie=L[B];if(!r.getAttribute(ie)){const U=t[0].getAttribute(ie);r.setAttribute(ie,Uz(U,b)),X=!0}let de=0;const ae=r.getAttribute(ie);for(let U=0,ve=t.length;U<ve;U++){const Se=t[U],Pe=!i&&!X&&a[U],Me=Se.getAttribute(ie);Pe||QYe(Me,ae,de),de+=Me.count}}}function Sor(t,e,r){const n=t.index,a=t.attributes.position.count,o=n?n.count:a;let s=t.groups;s.length===0&&(s=[{count:o,start:0,materialIndex:0}]);let d=t.getAttribute("materialIndex");if(!d||d.count!==a){let L;r.length<=255?L=new Uint8Array(a):L=new Uint16Array(a),d=new Kh(L,1,!1),t.deleteAttribute("materialIndex"),t.setAttribute("materialIndex",d)}const b=d.array;for(let L=0;L<s.length;L++){const B=s[L],V=B.start,X=B.count,ie=Math.min(X,o-V),de=Array.isArray(e)?e[B.materialIndex]:e,ae=r.indexOf(de);for(let U=0;U<ie;U++){let ve=V+U;n&&(ve=n.getX(ve)),b[ve]=ae}}}function Tor(t,e){if(!t.index){const r=t.attributes.position.count,n=new Array(r);for(let i=0;i<r;i++)n[i]=i;t.setIndex(n)}if(!t.attributes.normal&&e&&e.includes("normal")&&t.computeVertexNormals(),!t.attributes.uv&&e&&e.includes("uv")){const r=t.attributes.position.count;t.setAttribute("uv",new Kh(new Float32Array(r*2),2,!1))}if(!t.attributes.uv2&&e&&e.includes("uv2")){const r=t.attributes.position.count;t.setAttribute("uv2",new Kh(new Float32Array(r*2),2,!1))}if(!t.attributes.tangent&&e&&e.includes("tangent"))if(t.attributes.uv&&t.attributes.normal)t.computeTangents();else{const r=t.attributes.position.count;t.setAttribute("tangent",new Kh(new Float32Array(r*4),4,!1))}if(!t.attributes.color&&e&&e.includes("color")){const r=t.attributes.position.count,n=new Float32Array(r*4);n.fill(1),t.setAttribute("color",new Kh(n,4))}}function w1e(t){let e=0;if(t.byteLength!==0){const r=new Uint8Array(t);for(let n=0;n<t.byteLength;n++){const i=r[n];e=(e<<5)-e+i,e|=0}}return e}function z4e(t){let e=t.uuid;const r=Object.values(t.attributes);t.index&&(r.push(t.index),e+=`index|${t.index.version}`);const n=Object.keys(r).sort();for(const i of n){const a=r[i];e+=`${i}_${a.version}|`}return e}function B4e(t){const e=t.skeleton;return e?(e.boneTexture||e.computeBoneTexture(),`${w1e(e.boneTexture.image.data.buffer)}_${e.boneTexture.uuid}`):null}class Eor{constructor(e=null){this.matrixWorld=new Rc,this.geometryHash=null,this.skeletonHash=null,this.primitiveCount=-1,e!==null&&this.updateFrom(e)}updateFrom(e){const r=e.geometry,n=(r.index?r.index.count:r.attributes.position.count)/3;this.matrixWorld.copy(e.matrixWorld),this.geometryHash=z4e(r),this.primitiveCount=n,this.skeletonHash=B4e(e)}didChange(e){const r=e.geometry,n=(r.index?r.index.count:r.attributes.position.count)/3;return!(this.matrixWorld.equals(e.matrixWorld)&&this.geometryHash===z4e(r)&&this.skeletonHash===B4e(e)&&this.primitiveCount===n)}}const PD=new oi,DD=new oi,LD=new oi,U4e=new dh,Aq=new oi,Coe=new oi,H4e=new dh,j4e=new dh,Cq=new Rc,V4e=new Rc;function q4e(t,e,r){const n=t.skeleton,i=t.geometry,a=n.bones,o=n.boneInverses;H4e.fromBufferAttribute(i.attributes.skinIndex,e),j4e.fromBufferAttribute(i.attributes.skinWeight,e),Cq.elements.fill(0);for(let s=0;s<4;s++){const d=j4e.getComponent(s);if(d!==0){const b=H4e.getComponent(s);V4e.multiplyMatrices(a[b].matrixWorld,o[b]),Aor(Cq,V4e,d)}}return Cq.multiply(t.bindMatrix).premultiply(t.bindMatrixInverse),r.transformDirection(Cq),r}function Moe(t,e,r,n,i){Aq.set(0,0,0);for(let a=0,o=t.length;a<o;a++){const s=e[a],d=t[a];s!==0&&(Coe.fromBufferAttribute(d,n),r?Aq.addScaledVector(Coe,s):Aq.addScaledVector(Coe.sub(i),s))}i.add(Aq)}function Aor(t,e,r){const n=t.elements,i=e.elements;for(let a=0,o=i.length;a<o;a++)n[a]+=i[a]*r}function Cor(t){const{index:e,attributes:r}=t;if(e)for(let n=0,i=e.count;n<i;n+=3){const a=e.getX(n),o=e.getX(n+2);e.setX(n,o),e.setX(n+2,a)}else for(const n in r){const i=r[n],a=i.itemSize;for(let o=0,s=i.count;o<s;o+=3)for(let d=0;d<a;d++){const b=i.getComponent(o,d),L=i.getComponent(o+2,d);i.setComponent(o,d,L),i.setComponent(o+2,d,b)}}return t}function Mor(t,e={},r=new Jf){e={applyWorldTransforms:!0,attributes:[],...e};const n=t.geometry,i=e.applyWorldTransforms,a=e.attributes.includes("normal"),o=e.attributes.includes("tangent"),s=n.attributes,d=r.attributes;for(const ve in r.attributes)(!e.attributes.includes(ve)||!(ve in n.attributes))&&r.deleteAttribute(ve);!r.index&&n.index&&(r.index=n.index.clone()),d.position||r.setAttribute("position",Uz(s.position)),a&&!d.normal&&s.normal&&r.setAttribute("normal",Uz(s.normal)),o&&!d.tangent&&s.tangent&&r.setAttribute("tangent",Uz(s.tangent)),gN(n.index,r.index),gN(s.position,d.position),a&&gN(s.normal,d.normal),o&&gN(s.tangent,d.tangent);const b=s.position,L=a?s.normal:null,B=o?s.tangent:null,V=n.morphAttributes.position,X=n.morphAttributes.normal,ie=n.morphAttributes.tangent,de=n.morphTargetsRelative,ae=t.morphTargetInfluences,U=new gh;U.getNormalMatrix(t.matrixWorld),n.index&&r.index.array.set(n.index.array);for(let ve=0,Se=s.position.count;ve<Se;ve++)PD.fromBufferAttribute(b,ve),L&&DD.fromBufferAttribute(L,ve),B&&(U4e.fromBufferAttribute(B,ve),LD.fromBufferAttribute(B,ve)),ae&&(V&&Moe(V,ae,de,ve,PD),X&&Moe(X,ae,de,ve,DD),ie&&Moe(ie,ae,de,ve,LD)),t.isSkinnedMesh&&(t.applyBoneTransform(ve,PD),L&&q4e(t,ve,DD),B&&q4e(t,ve,LD)),i&&PD.applyMatrix4(t.matrixWorld),d.position.setXYZ(ve,PD.x,PD.y,PD.z),L&&(i&&DD.applyNormalMatrix(U),d.normal.setXYZ(ve,DD.x,DD.y,DD.z)),B&&(i&&LD.transformDirection(t.matrixWorld),d.tangent.setXYZW(ve,LD.x,LD.y,LD.z,U4e.w));for(const ve in e.attributes){const Se=e.attributes[ve];Se==="position"||Se==="tangent"||Se==="normal"||!(Se in s)||(d[Se]||r.setAttribute(Se,Uz(s[Se])),gN(s[Se],d[Se]),QYe(s[Se],d[Se]))}return t.matrixWorld.determinant()<0&&Cor(r),r}class Ror extends Jf{constructor(){super(),this.version=0,this.hash=null,this._diff=new Eor}isCompatible(e,r){const n=e.geometry;for(let i=0;i<r.length;i++){const a=r[i],o=n.attributes[a],s=this.attributes[a];if(o&&!gN(o,s))return!1}return!0}updateFrom(e,r){const n=this._diff;return n.didChange(e)?(Mor(e,r,this),n.updateFrom(e),this.version++,this.hash=`${this.uuid}_${this.version}`,!0):!1}}const ive=0,eXe=1,tXe=2;function kor(t,e){for(let r=0,n=t.length;r<n;r++)t[r].traverseVisible(a=>{a.isMesh&&e(a)})}function Ior(t){const e=[];for(let r=0,n=t.length;r<n;r++){const i=t[r];Array.isArray(i.material)?e.push(...i.material):e.push(i.material)}return e}function Por(t,e,r){if(t.length===0){e.setIndex(null);const n=e.attributes;for(const i in n)e.deleteAttribute(i);for(const i in r.attributes)e.setAttribute(r.attributes[i],new Kh(new Float32Array(0),4,!1))}else wor(t,r,e);for(const n in e.attributes)e.attributes[n].needsUpdate=!0}class Dor{constructor(e){this.objects=null,this.useGroups=!0,this.applyWorldTransforms=!0,this.generateMissingAttributes=!0,this.overwriteIndex=!0,this.attributes=["position","normal","color","tangent","uv","uv2"],this._intermediateGeometry=new Map,this._geometryMergeSets=new WeakMap,this._mergeOrder=[],this._dummyMesh=null,this.setObjects(e||[])}_getDummyMesh(){if(!this._dummyMesh){const e=new dA,r=new Jf;r.setAttribute("position",new Kh(new Float32Array(9),3)),this._dummyMesh=new hc(r,e)}return this._dummyMesh}_getMeshes(){const e=[];return kor(this.objects,r=>{e.push(r)}),e.sort((r,n)=>r.uuid>n.uuid?1:r.uuid<n.uuid?-1:0),e.length===0&&e.push(this._getDummyMesh()),e}_updateIntermediateGeometries(){const{_intermediateGeometry:e}=this,r=this._getMeshes(),n=new Set(e.keys()),i={attributes:this.attributes,applyWorldTransforms:this.applyWorldTransforms};for(let a=0,o=r.length;a<o;a++){const s=r[a],d=s.uuid;n.delete(d);let b=e.get(d);(!b||!b.isCompatible(s,this.attributes))&&(b&&b.dispose(),b=new Ror,e.set(d,b)),b.updateFrom(s,i)&&this.generateMissingAttributes&&Tor(b,this.attributes)}n.forEach(a=>{e.delete(a)})}setObjects(e){Array.isArray(e)?this.objects=[...e]:this.objects=[e]}generate(e=new Jf){const{useGroups:r,overwriteIndex:n,_intermediateGeometry:i,_geometryMergeSets:a}=this,o=this._getMeshes(),s=[],d=[],b=a.get(e)||[];this._updateIntermediateGeometries();let L=!1;o.length!==b.length&&(L=!0);for(let V=0,X=o.length;V<X;V++){const ie=o[V],de=i.get(ie.uuid);d.push(de);const ae=b[V];!ae||ae.uuid!==de.uuid?(s.push(!1),L=!0):ae.version!==de.version?s.push(!1):s.push(!0)}Por(d,e,{useGroups:r,forceUpdate:L,skipAssigningAttributes:s,overwriteIndex:n}),L&&e.dispose(),a.set(e,d.map(V=>({version:V.version,uuid:V.uuid})));let B=ive;return L?B=tXe:s.includes(!1)&&(B=eXe),{changeType:B,materials:Ior(o),geometry:e}}}function Lor(t){const e=new Set;for(let r=0,n=t.length;r<n;r++){const i=t[r];for(const a in i){const o=i[a];o&&o.isTexture&&e.add(o)}}return Array.from(e)}function Oor(t){const e=[],r=new Set;for(let i=0,a=t.length;i<a;i++)t[i].traverse(o=>{o.visible&&(o.isRectAreaLight||o.isSpotLight||o.isPointLight||o.isDirectionalLight)&&(e.push(o),o.iesMap&&r.add(o.iesMap))});const n=Array.from(r).sort((i,a)=>i.uuid<a.uuid?1:i.uuid>a.uuid?-1:0);return{lights:e,iesTextures:n}}class Nor{get initialized(){return!!this.bvh}constructor(e){this.bvhOptions={},this.attributes=["position","normal","tangent","color","uv","uv2"],this.generateBVH=!0,this.bvh=null,this.geometry=new Jf,this.staticGeometryGenerator=new Dor(e),this._bvhWorker=null,this._pendingGenerate=null,this._buildAsync=!1}setObjects(e){this.staticGeometryGenerator.setObjects(e)}setBVHWorker(e){this._bvhWorker=e}async generateAsync(e=null){if(!this._bvhWorker)throw new Error('PathTracingSceneGenerator: "setBVHWorker" must be called before "generateAsync" can be called.');if(this.bvh instanceof Promise)return this._pendingGenerate||(this._pendingGenerate=new Promise(async()=>(await this.bvh,this._pendingGenerate=null,this.generateAsync(e)))),this._pendingGenerate;{this._buildAsync=!0;const r=this.generate(e);return this._buildAsync=!1,r.bvh=this.bvh=await r.bvh,r}}generate(e=null){const{staticGeometryGenerator:r,geometry:n,attributes:i}=this,a=r.objects;r.attributes=i,a.forEach(B=>{B.traverse(V=>{V.isSkinnedMesh&&V.skeleton&&V.skeleton.update()})});const o=r.generate(n),s=o.materials,d=Lor(s),{lights:b,iesTextures:L}=Oor(a);if(o.changeType!==ive&&Sor(n,s,s),this.generateBVH){if(this.bvh instanceof Promise)throw new Error("PathTracingSceneGenerator: BVH is already building asynchronously.");if(o.changeType===tXe){const B={strategy:RYe,maxLeafTris:1,indirect:!0,onProgress:e,...this.bvhOptions};this._buildAsync?this.bvh=this._bvhWorker.generate(n,B):this.bvh=new f1e(n,B)}else o.changeType===eXe&&this.bvh.refit()}return{bvhChanged:o.changeType!==ive,bvh:this.bvh,lights:b,iesTextures:L,geometry:n,materials:s,textures:d,objects:a}}}class S1e extends eb{set needsUpdate(e){super.needsUpdate=!0,this.dispatchEvent({type:"recompilation"})}constructor(e){super(e);for(const r in this.uniforms)Object.defineProperty(this,r,{get(){return this.uniforms[r].value},set(n){this.uniforms[r].value=n}})}setDefine(e,r=void 0){if(r==null){if(e in this.defines)return delete this.defines[e],this.needsUpdate=!0,!0}else if(this.defines[e]!==r)return this.defines[e]=r,this.needsUpdate=!0,!0;return!1}}class For extends S1e{constructor(e){super({blending:V2,uniforms:{target1:{value:null},target2:{value:null},opacity:{value:1}},vertexShader:`

				varying vec2 vUv;

				void main() {

					vUv = uv;
					gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );

				}`,fragmentShader:`

				uniform float opacity;

				uniform sampler2D target1;
				uniform sampler2D target2;

				varying vec2 vUv;

				void main() {

					vec4 color1 = texture2D( target1, vUv );
					vec4 color2 = texture2D( target2, vUv );

					float invOpacity = 1.0 - opacity;
					float totalAlpha = color1.a * invOpacity + color2.a * opacity;

					if ( color1.a != 0.0 || color2.a != 0.0 ) {

						gl_FragColor.rgb = color1.rgb * ( invOpacity * color1.a / totalAlpha ) + color2.rgb * ( opacity * color2.a / totalAlpha );
						gl_FragColor.a = totalAlpha;

					} else {

						gl_FragColor = vec4( 0.0 );

					}

				}`}),this.setValues(e)}}function Mq(t=1){let e="uint";return t>1&&(e="uvec"+t),`
		${e} sobolReverseBits( ${e} x ) {

			x = ( ( ( x & 0xaaaaaaaau ) >> 1 ) | ( ( x & 0x55555555u ) << 1 ) );
			x = ( ( ( x & 0xccccccccu ) >> 2 ) | ( ( x & 0x33333333u ) << 2 ) );
			x = ( ( ( x & 0xf0f0f0f0u ) >> 4 ) | ( ( x & 0x0f0f0f0fu ) << 4 ) );
			x = ( ( ( x & 0xff00ff00u ) >> 8 ) | ( ( x & 0x00ff00ffu ) << 8 ) );
			return ( ( x >> 16 ) | ( x << 16 ) );

		}

		${e} sobolHashCombine( uint seed, ${e} v ) {

			return seed ^ ( v + ${e}( ( seed << 6 ) + ( seed >> 2 ) ) );

		}

		${e} sobolLaineKarrasPermutation( ${e} x, ${e} seed ) {

			x += seed;
			x ^= x * 0x6c50b47cu;
			x ^= x * 0xb82f1e52u;
			x ^= x * 0xc7afe638u;
			x ^= x * 0x8d22f6e6u;
			return x;

		}

		${e} nestedUniformScrambleBase2( ${e} x, ${e} seed ) {

			x = sobolLaineKarrasPermutation( x, seed );
			x = sobolReverseBits( x );
			return x;

		}
	`}function Rq(t=1){let e="uint",r="float",n="",i=".r",a="1u";return t>1&&(e="uvec"+t,r="vec"+t,n=t+"",t===2?(i=".rg",a="uvec2( 1u, 2u )"):t===3?(i=".rgb",a="uvec3( 1u, 2u, 3u )"):(i="",a="uvec4( 1u, 2u, 3u, 4u )")),`

		${r} sobol${n}( int effect ) {

			uint seed = sobolGetSeed( sobolBounceIndex, uint( effect ) );
			uint index = sobolPathIndex;

			uint shuffle_seed = sobolHashCombine( seed, 0u );
			uint shuffled_index = nestedUniformScrambleBase2( sobolReverseBits( index ), shuffle_seed );
			${r} sobol_pt = sobolGetTexturePoint( shuffled_index )${i};
			${e} result = ${e}( sobol_pt * 16777216.0 );

			${e} seed2 = sobolHashCombine( seed, ${a} );
			result = nestedUniformScrambleBase2( result, seed2 );

			return SOBOL_FACTOR * ${r}( result >> 8 );

		}
	`}const rXe=`

	// Utils
	const float SOBOL_FACTOR = 1.0 / 16777216.0;
	const uint SOBOL_MAX_POINTS = 256u * 256u;

	${Mq(1)}
	${Mq(2)}
	${Mq(3)}
	${Mq(4)}

	uint sobolHash( uint x ) {

		// finalizer from murmurhash3
		x ^= x >> 16;
		x *= 0x85ebca6bu;
		x ^= x >> 13;
		x *= 0xc2b2ae35u;
		x ^= x >> 16;
		return x;

	}

`,zor=`

	const uint SOBOL_DIRECTIONS_1[ 32 ] = uint[ 32 ](
		0x80000000u, 0xc0000000u, 0xa0000000u, 0xf0000000u,
		0x88000000u, 0xcc000000u, 0xaa000000u, 0xff000000u,
		0x80800000u, 0xc0c00000u, 0xa0a00000u, 0xf0f00000u,
		0x88880000u, 0xcccc0000u, 0xaaaa0000u, 0xffff0000u,
		0x80008000u, 0xc000c000u, 0xa000a000u, 0xf000f000u,
		0x88008800u, 0xcc00cc00u, 0xaa00aa00u, 0xff00ff00u,
		0x80808080u, 0xc0c0c0c0u, 0xa0a0a0a0u, 0xf0f0f0f0u,
		0x88888888u, 0xccccccccu, 0xaaaaaaaau, 0xffffffffu
	);

	const uint SOBOL_DIRECTIONS_2[ 32 ] = uint[ 32 ](
		0x80000000u, 0xc0000000u, 0x60000000u, 0x90000000u,
		0xe8000000u, 0x5c000000u, 0x8e000000u, 0xc5000000u,
		0x68800000u, 0x9cc00000u, 0xee600000u, 0x55900000u,
		0x80680000u, 0xc09c0000u, 0x60ee0000u, 0x90550000u,
		0xe8808000u, 0x5cc0c000u, 0x8e606000u, 0xc5909000u,
		0x6868e800u, 0x9c9c5c00u, 0xeeee8e00u, 0x5555c500u,
		0x8000e880u, 0xc0005cc0u, 0x60008e60u, 0x9000c590u,
		0xe8006868u, 0x5c009c9cu, 0x8e00eeeeu, 0xc5005555u
	);

	const uint SOBOL_DIRECTIONS_3[ 32 ] = uint[ 32 ](
		0x80000000u, 0xc0000000u, 0x20000000u, 0x50000000u,
		0xf8000000u, 0x74000000u, 0xa2000000u, 0x93000000u,
		0xd8800000u, 0x25400000u, 0x59e00000u, 0xe6d00000u,
		0x78080000u, 0xb40c0000u, 0x82020000u, 0xc3050000u,
		0x208f8000u, 0x51474000u, 0xfbea2000u, 0x75d93000u,
		0xa0858800u, 0x914e5400u, 0xdbe79e00u, 0x25db6d00u,
		0x58800080u, 0xe54000c0u, 0x79e00020u, 0xb6d00050u,
		0x800800f8u, 0xc00c0074u, 0x200200a2u, 0x50050093u
	);

	const uint SOBOL_DIRECTIONS_4[ 32 ] = uint[ 32 ](
		0x80000000u, 0x40000000u, 0x20000000u, 0xb0000000u,
		0xf8000000u, 0xdc000000u, 0x7a000000u, 0x9d000000u,
		0x5a800000u, 0x2fc00000u, 0xa1600000u, 0xf0b00000u,
		0xda880000u, 0x6fc40000u, 0x81620000u, 0x40bb0000u,
		0x22878000u, 0xb3c9c000u, 0xfb65a000u, 0xddb2d000u,
		0x78022800u, 0x9c0b3c00u, 0x5a0fb600u, 0x2d0ddb00u,
		0xa2878080u, 0xf3c9c040u, 0xdb65a020u, 0x6db2d0b0u,
		0x800228f8u, 0x400b3cdcu, 0x200fb67au, 0xb00ddb9du
	);

	uint getMaskedSobol( uint index, uint directions[ 32 ] ) {

		uint X = 0u;
		for ( int bit = 0; bit < 32; bit ++ ) {

			uint mask = ( index >> bit ) & 1u;
			X ^= mask * directions[ bit ];

		}
		return X;

	}

	vec4 generateSobolPoint( uint index ) {

		if ( index >= SOBOL_MAX_POINTS ) {

			return vec4( 0.0 );

		}

		// NOTE: this sobol "direction" is also available but we can't write out 5 components
		// uint x = index & 0x00ffffffu;
		uint x = sobolReverseBits( getMaskedSobol( index, SOBOL_DIRECTIONS_1 ) ) & 0x00ffffffu;
		uint y = sobolReverseBits( getMaskedSobol( index, SOBOL_DIRECTIONS_2 ) ) & 0x00ffffffu;
		uint z = sobolReverseBits( getMaskedSobol( index, SOBOL_DIRECTIONS_3 ) ) & 0x00ffffffu;
		uint w = sobolReverseBits( getMaskedSobol( index, SOBOL_DIRECTIONS_4 ) ) & 0x00ffffffu;

		return vec4( x, y, z, w ) * SOBOL_FACTOR;

	}

`,Bor=`

	// Seeds
	uniform sampler2D sobolTexture;
	uint sobolPixelIndex = 0u;
	uint sobolPathIndex = 0u;
	uint sobolBounceIndex = 0u;

	uint sobolGetSeed( uint bounce, uint effect ) {

		return sobolHash(
			sobolHashCombine(
				sobolHashCombine(
					sobolHash( bounce ),
					sobolPixelIndex
				),
				effect
			)
		);

	}

	vec4 sobolGetTexturePoint( uint index ) {

		if ( index >= SOBOL_MAX_POINTS ) {

			index = index % SOBOL_MAX_POINTS;

		}

		uvec2 dim = uvec2( textureSize( sobolTexture, 0 ).xy );
		uint y = index / dim.x;
		uint x = index - y * dim.x;
		vec2 uv = vec2( x, y ) / vec2( dim );
		return texture( sobolTexture, uv );

	}

	${Rq(1)}
	${Rq(2)}
	${Rq(3)}
	${Rq(4)}

`;class Uor extends S1e{constructor(){super({blending:V2,uniforms:{resolution:{value:new sl}},vertexShader:`

				varying vec2 vUv;
				void main() {

					vUv = uv;
					gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );

				}
			`,fragmentShader:`

				${rXe}
				${zor}

				varying vec2 vUv;
				uniform vec2 resolution;
				void main() {

					uint index = uint( gl_FragCoord.y ) * uint( resolution.x ) + uint( gl_FragCoord.x );
					gl_FragColor = generateSobolPoint( index );

				}
			`})}}class Hor{generate(e,r=256){const n=new cx(r,r,{type:mp,format:Rp,minFilter:Mp,magFilter:Mp,generateMipmaps:!1}),i=e.getRenderTarget();e.setRenderTarget(n);const a=new A8(new Uor);return a.material.resolution.set(r,r),a.render(e),e.setRenderTarget(i),a.dispose(),n}}class jor extends sy{set bokehSize(e){this.fStop=this.getFocalLength()/e}get bokehSize(){return this.getFocalLength()/this.fStop}constructor(...e){super(...e),this.fStop=1.4,this.apertureBlades=0,this.apertureRotation=0,this.focusDistance=25,this.anamorphicRatio=1}copy(e,r){return super.copy(e,r),this.fStop=e.fStop,this.apertureBlades=e.apertureBlades,this.apertureRotation=e.apertureRotation,this.focusDistance=e.focusDistance,this.anamorphicRatio=e.anamorphicRatio,this}}class Vor{constructor(){this.bokehSize=0,this.apertureBlades=0,this.apertureRotation=0,this.focusDistance=10,this.anamorphicRatio=1}updateFrom(e){e instanceof jor?(this.bokehSize=e.bokehSize,this.apertureBlades=e.apertureBlades,this.apertureRotation=e.apertureRotation,this.focusDistance=e.focusDistance,this.anamorphicRatio=e.anamorphicRatio):(this.bokehSize=0,this.apertureRotation=0,this.apertureBlades=0,this.focusDistance=10,this.anamorphicRatio=1)}}function Roe(t){const e=new Uint16Array(t.length);for(let r=0,n=t.length;r<n;++r)e[r]=Vw.toHalfFloat(t[r]);return e}function G4e(t,e,r=0,n=t.length){let i=r,a=r+n-1;for(;i<a;){const o=i+a>>1;t[o]<e?i=o+1:a=o}return i-r}function qor(t,e,r){return .2126*t+.7152*e+.0722*r}function Gor(t,e=Og){const r=t.clone();r.source=new wk({...r.image});const{width:n,height:i,data:a}=r.image;let o=a;if(r.type!==e){e===Og?o=new Uint16Array(a.length):o=new Float32Array(a.length);let s;a instanceof Int8Array||a instanceof Int16Array||a instanceof Int32Array?s=2**(8*a.BYTES_PER_ELEMENT-1)-1:s=2**(8*a.BYTES_PER_ELEMENT)-1;for(let d=0,b=a.length;d<b;d++){let L=a[d];r.type===Og&&(L=Vw.fromHalfFloat(a[d])),r.type!==mp&&r.type!==Og&&(L/=s),e===Og&&(o[d]=Vw.toHalfFloat(L))}r.image.data=o,r.type=e}if(r.flipY){const s=o;o=o.slice();for(let d=0;d<i;d++)for(let b=0;b<n;b++){const L=i-d-1,B=4*(d*n+b),V=4*(L*n+b);o[V+0]=s[B+0],o[V+1]=s[B+1],o[V+2]=s[B+2],o[V+3]=s[B+3]}r.flipY=!1,r.image.data=o}return r}class $or{constructor(){const e=new $y(Roe(new Float32Array([0,0,0,0])),1,1);e.type=Og,e.format=Rp,e.minFilter=vp,e.magFilter=vp,e.wrapS=sE,e.wrapT=sE,e.generateMipmaps=!1,e.needsUpdate=!0;const r=new $y(Roe(new Float32Array([0,1])),1,2);r.type=Og,r.format=Dk,r.minFilter=vp,r.magFilter=vp,r.generateMipmaps=!1,r.needsUpdate=!0;const n=new $y(Roe(new Float32Array([0,0,1,1])),2,2);n.type=Og,n.format=Dk,n.minFilter=vp,n.magFilter=vp,n.generateMipmaps=!1,n.needsUpdate=!0,this.map=e,this.marginalWeights=r,this.conditionalWeights=n,this.totalSum=0}dispose(){this.marginalWeights.dispose(),this.conditionalWeights.dispose(),this.map.dispose()}updateFrom(e){const r=Gor(e);r.wrapS=sE,r.wrapT=Ng;const{width:n,height:i,data:a}=r.image,o=new Float32Array(n*i),s=new Float32Array(n*i),d=new Float32Array(i),b=new Float32Array(i);let L=0,B=0;for(let ae=0;ae<i;ae++){let U=0;for(let ve=0;ve<n;ve++){const Se=ae*n+ve,Pe=Vw.fromHalfFloat(a[4*Se+0]),Me=Vw.fromHalfFloat(a[4*Se+1]),Ie=Vw.fromHalfFloat(a[4*Se+2]),Ve=qor(Pe,Me,Ie);U+=Ve,L+=Ve,o[Se]=Ve,s[Se]=U}if(U!==0)for(let ve=ae*n,Se=ae*n+n;ve<Se;ve++)o[ve]/=U,s[ve]/=U;B+=U,d[ae]=U,b[ae]=B}if(B!==0)for(let ae=0,U=d.length;ae<U;ae++)d[ae]/=B,b[ae]/=B;const V=new Uint16Array(i),X=new Uint16Array(n*i);for(let ae=0;ae<i;ae++){const U=(ae+1)/i,ve=G4e(b,U);V[ae]=Vw.toHalfFloat((ve+.5)/i)}for(let ae=0;ae<i;ae++)for(let U=0;U<n;U++){const ve=ae*n+U,Se=(U+1)/n,Pe=G4e(s,Se,ae*n,n);X[ve]=Vw.toHalfFloat((Pe+.5)/n)}this.dispose();const{marginalWeights:ie,conditionalWeights:de}=this;ie.image={width:i,height:1,data:V},ie.needsUpdate=!0,de.image={width:n,height:i,data:X},de.needsUpdate=!0,this.totalSum=L,this.map=r}}const koe=6,Wor=0,Yor=1,Xor=2,Zor=3,Kor=4,wC=new oi,OS=new oi,$4e=new Rc,iN=new fh,W4e=new oi,aN=new oi,Jor=new oi(0,1,0);class Qor{constructor(){const e=new $y(new Float32Array(4),1,1);e.format=Rp,e.type=mp,e.wrapS=Ng,e.wrapT=Ng,e.generateMipmaps=!1,e.minFilter=Mp,e.magFilter=Mp,this.tex=e,this.count=0}updateFrom(e,r=[]){const n=this.tex,i=Math.max(e.length*koe,1),a=Math.ceil(Math.sqrt(i));n.image.width!==a&&(n.dispose(),n.image.data=new Float32Array(a*a*4),n.image.width=a,n.image.height=a);const o=n.image.data;for(let d=0,b=e.length;d<b;d++){const L=e[d],B=d*koe*4;let V=0;for(let ie=0;ie<koe*4;ie++)o[B+ie]=0;L.getWorldPosition(OS),o[B+V++]=OS.x,o[B+V++]=OS.y,o[B+V++]=OS.z;let X=Wor;if(L.isRectAreaLight&&L.isCircular?X=Yor:L.isSpotLight?X=Xor:L.isDirectionalLight?X=Zor:L.isPointLight&&(X=Kor),o[B+V++]=X,o[B+V++]=L.color.r,o[B+V++]=L.color.g,o[B+V++]=L.color.b,o[B+V++]=L.intensity,L.getWorldQuaternion(iN),L.isRectAreaLight)wC.set(L.width,0,0).applyQuaternion(iN),o[B+V++]=wC.x,o[B+V++]=wC.y,o[B+V++]=wC.z,V++,OS.set(0,L.height,0).applyQuaternion(iN),o[B+V++]=OS.x,o[B+V++]=OS.y,o[B+V++]=OS.z,o[B+V++]=wC.cross(OS).length()*(L.isCircular?Math.PI/4:1);else if(L.isSpotLight){const ie=L.radius||0;W4e.setFromMatrixPosition(L.matrixWorld),aN.setFromMatrixPosition(L.target.matrixWorld),$4e.lookAt(W4e,aN,Jor),iN.setFromRotationMatrix($4e),wC.set(1,0,0).applyQuaternion(iN),o[B+V++]=wC.x,o[B+V++]=wC.y,o[B+V++]=wC.z,V++,OS.set(0,1,0).applyQuaternion(iN),o[B+V++]=OS.x,o[B+V++]=OS.y,o[B+V++]=OS.z,o[B+V++]=Math.PI*ie*ie,o[B+V++]=ie,o[B+V++]=L.decay,o[B+V++]=L.distance,o[B+V++]=Math.cos(L.angle),o[B+V++]=Math.cos(L.angle*(1-L.penumbra)),o[B+V++]=L.iesMap?r.indexOf(L.iesMap):-1}else if(L.isPointLight){const ie=wC.setFromMatrixPosition(L.matrixWorld);o[B+V++]=ie.x,o[B+V++]=ie.y,o[B+V++]=ie.z,V++,V+=4,V+=1,o[B+V++]=L.decay,o[B+V++]=L.distance}else if(L.isDirectionalLight){const ie=wC.setFromMatrixPosition(L.matrixWorld),de=OS.setFromMatrixPosition(L.target.matrixWorld);aN.subVectors(ie,de).normalize(),o[B+V++]=aN.x,o[B+V++]=aN.y,o[B+V++]=aN.z}}this.count=e.length;const s=w1e(o.buffer);return this.hash!==s?(this.hash=s,n.needsUpdate=!0,!0):!1}}function Y4e(t,e,r,n,i){if(e>n)throw new Error;const a=t.length/e,o=t.constructor.BYTES_PER_ELEMENT*8;let s=1;switch(t.constructor){case Uint8Array:case Uint16Array:case Uint32Array:s=2**o-1;break;case Int8Array:case Int16Array:case Int32Array:s=2**(o-1)-1;break}for(let d=0;d<a;d++){const b=4*d,L=e*d;for(let B=0;B<n;B++)r[i+b+B]=e>=B+1?t[L+B]/s:0}}class esr extends vU{constructor(){super(),this._textures=[],this.type=mp,this.format=Rp,this.internalFormat="RGBA32F"}updateAttribute(e,r){const n=this._textures[e];n.updateFrom(r);const i=n.image,a=this.image;if(i.width!==a.width||i.height!==a.height)throw new Error("FloatAttributeTextureArray: Attribute must be the same dimensions when updating single layer.");const{width:o,height:s,data:d}=a,L=o*s*4*e;let B=r.itemSize;B===3&&(B=4),Y4e(n.image.data,B,d,4,L),this.dispose(),this.needsUpdate=!0}setAttributes(e){const r=e[0].count,n=e.length;for(let B=0,V=n;B<V;B++)if(e[B].count!==r)throw new Error("FloatAttributeTextureArray: All attributes must have the same item count.");const i=this._textures;for(;i.length<n;){const B=new zYe;i.push(B)}for(;i.length>n;)i.pop();for(let B=0,V=n;B<V;B++)i[B].updateFrom(e[B]);const o=i[0].image,s=this.image;(o.width!==s.width||o.height!==s.height||o.depth!==n)&&(s.width=o.width,s.height=o.height,s.depth=n,s.data=new Float32Array(s.width*s.height*s.depth*4));const{data:d,width:b,height:L}=s;for(let B=0,V=n;B<V;B++){const X=i[B],de=b*L*4*B;let ae=e[B].itemSize;ae===3&&(ae=4),Y4e(X.image.data,ae,d,4,de)}this.dispose(),this.needsUpdate=!0}}class tsr extends esr{updateNormalAttribute(e){this.updateAttribute(0,e)}updateTangentAttribute(e){this.updateAttribute(1,e)}updateUvAttribute(e){this.updateAttribute(2,e)}updateColorAttribute(e){this.updateAttribute(3,e)}updateFrom(e,r,n,i){this.setAttributes([e,r,n,i])}}function T1e(t,e){return t.uuid<e.uuid?1:t.uuid>e.uuid?-1:0}function ave(t){return`${t.source.uuid}:${t.colorSpace}`}function rsr(t){const e=new Set,r=[];for(let n=0,i=t.length;n<i;n++){const a=t[n],o=ave(a);e.has(o)||(e.add(o),r.push(a))}return r}function nsr(t){const e=t.map(n=>n.iesMap||null).filter(n=>n),r=new Set(e);return Array.from(r).sort(T1e)}function isr(t){const e=new Set;for(let n=0,i=t.length;n<i;n++){const a=t[n];for(const o in a){const s=a[o];s&&s.isTexture&&e.add(s)}}const r=Array.from(e);return rsr(r).sort(T1e)}function asr(t){const e=[];return t.traverse(r=>{r.visible&&(r.isRectAreaLight||r.isSpotLight||r.isPointLight||r.isDirectionalLight)&&e.push(r)}),e.sort(T1e)}const nXe=45,X4e=nXe*4;class osr{constructor(){this._features={}}isUsed(e){return e in this._features}setUsed(e,r=!0){r===!1?delete this._features[e]:this._features[e]=!0}reset(){this._features={}}}class ssr extends $y{constructor(){super(new Float32Array(4),1,1),this.format=Rp,this.type=mp,this.wrapS=Ng,this.wrapT=Ng,this.minFilter=Mp,this.magFilter=Mp,this.generateMipmaps=!1,this.features=new osr}updateFrom(e,r){function n(ie,de,ae=-1){if(de in ie&&ie[de]){const U=ave(ie[de]);return B[U]}else return ae}function i(ie,de,ae){return de in ie?ie[de]:ae}function a(ie,de,ae,U){const ve=ie[de]&&ie[de].isTexture?ie[de]:null;if(ve){ve.matrixAutoUpdate&&ve.updateMatrix();const Se=ve.matrix.elements;let Pe=0;ae[U+Pe++]=Se[0],ae[U+Pe++]=Se[3],ae[U+Pe++]=Se[6],Pe++,ae[U+Pe++]=Se[1],ae[U+Pe++]=Se[4],ae[U+Pe++]=Se[7],Pe++}return 8}let o=0;const s=e.length*nXe,d=Math.ceil(Math.sqrt(s))||1,{image:b,features:L}=this,B={};for(let ie=0,de=r.length;ie<de;ie++)B[ave(r[ie])]=ie;b.width!==d&&(this.dispose(),b.data=new Float32Array(d*d*4),b.width=d,b.height=d);const V=b.data;L.reset();for(let ie=0,de=e.length;ie<de;ie++){const ae=e[ie];if(ae.isFogVolumeMaterial){L.setUsed("FOG");for(let Se=0;Se<X4e;Se++)V[o+Se]=0;V[o+0+0]=ae.color.r,V[o+0+1]=ae.color.g,V[o+0+2]=ae.color.b,V[o+8+3]=i(ae,"emissiveIntensity",0),V[o+12+0]=ae.emissive.r,V[o+12+1]=ae.emissive.g,V[o+12+2]=ae.emissive.b,V[o+52+1]=ae.density,V[o+52+3]=0,V[o+56+2]=4,o+=X4e;continue}V[o++]=ae.color.r,V[o++]=ae.color.g,V[o++]=ae.color.b,V[o++]=n(ae,"map"),V[o++]=i(ae,"metalness",0),V[o++]=n(ae,"metalnessMap"),V[o++]=i(ae,"roughness",0),V[o++]=n(ae,"roughnessMap"),V[o++]=i(ae,"ior",1.5),V[o++]=i(ae,"transmission",0),V[o++]=n(ae,"transmissionMap"),V[o++]=i(ae,"emissiveIntensity",0),"emissive"in ae?(V[o++]=ae.emissive.r,V[o++]=ae.emissive.g,V[o++]=ae.emissive.b):(V[o++]=0,V[o++]=0,V[o++]=0),V[o++]=n(ae,"emissiveMap"),V[o++]=n(ae,"normalMap"),"normalScale"in ae?(V[o++]=ae.normalScale.x,V[o++]=ae.normalScale.y):(V[o++]=1,V[o++]=1),V[o++]=i(ae,"clearcoat",0),V[o++]=n(ae,"clearcoatMap"),V[o++]=i(ae,"clearcoatRoughness",0),V[o++]=n(ae,"clearcoatRoughnessMap"),V[o++]=n(ae,"clearcoatNormalMap"),"clearcoatNormalScale"in ae?(V[o++]=ae.clearcoatNormalScale.x,V[o++]=ae.clearcoatNormalScale.y):(V[o++]=1,V[o++]=1),o++,V[o++]=i(ae,"sheen",0),"sheenColor"in ae?(V[o++]=ae.sheenColor.r,V[o++]=ae.sheenColor.g,V[o++]=ae.sheenColor.b):(V[o++]=0,V[o++]=0,V[o++]=0),V[o++]=n(ae,"sheenColorMap"),V[o++]=i(ae,"sheenRoughness",0),V[o++]=n(ae,"sheenRoughnessMap"),V[o++]=n(ae,"iridescenceMap"),V[o++]=n(ae,"iridescenceThicknessMap"),V[o++]=i(ae,"iridescence",0),V[o++]=i(ae,"iridescenceIOR",1.3);const U=i(ae,"iridescenceThicknessRange",[100,400]);V[o++]=U[0],V[o++]=U[1],"specularColor"in ae?(V[o++]=ae.specularColor.r,V[o++]=ae.specularColor.g,V[o++]=ae.specularColor.b):(V[o++]=1,V[o++]=1,V[o++]=1),V[o++]=n(ae,"specularColorMap"),V[o++]=i(ae,"specularIntensity",1),V[o++]=n(ae,"specularIntensityMap");const ve=i(ae,"thickness",0)===0&&i(ae,"attenuationDistance",1/0)===1/0;if(V[o++]=Number(ve),o++,"attenuationColor"in ae?(V[o++]=ae.attenuationColor.r,V[o++]=ae.attenuationColor.g,V[o++]=ae.attenuationColor.b):(V[o++]=1,V[o++]=1,V[o++]=1),V[o++]=i(ae,"attenuationDistance",1/0),V[o++]=n(ae,"alphaMap"),V[o++]=ae.opacity,V[o++]=ae.alphaTest,!ve&&ae.transmission>0)V[o++]=0;else switch(ae.side){case dx:V[o++]=1;break;case x1:V[o++]=-1;break;case Zx:V[o++]=0;break}V[o++]=Number(i(ae,"matte",!1)),V[o++]=Number(i(ae,"castShadow",!0)),V[o++]=Number(ae.vertexColors)|Number(ae.flatShading)<<1,V[o++]=Number(ae.transparent),o+=a(ae,"map",V,o),o+=a(ae,"metalnessMap",V,o),o+=a(ae,"roughnessMap",V,o),o+=a(ae,"transmissionMap",V,o),o+=a(ae,"emissiveMap",V,o),o+=a(ae,"normalMap",V,o),o+=a(ae,"clearcoatMap",V,o),o+=a(ae,"clearcoatNormalMap",V,o),o+=a(ae,"clearcoatRoughnessMap",V,o),o+=a(ae,"sheenColorMap",V,o),o+=a(ae,"sheenRoughnessMap",V,o),o+=a(ae,"iridescenceMap",V,o),o+=a(ae,"iridescenceThicknessMap",V,o),o+=a(ae,"specularColorMap",V,o),o+=a(ae,"specularIntensityMap",V,o)}const X=w1e(V.buffer);return this.hash!==X?(this.hash=X,this.needsUpdate=!0,!0):!1}}const Z4e=new Wu;function lsr(t){return t?`${t.uuid}:${t.version}`:null}function usr(t,e){for(const r in e)r in t&&(t[r]=e[r])}class K4e extends q$e{constructor(e,r,n){const i={format:Rp,type:e_,minFilter:vp,magFilter:vp,wrapS:sE,wrapT:sE,generateMipmaps:!1,...n};super(e,r,1,i),usr(this.texture,i),this.texture.setTextures=(...o)=>{this.setTextures(...o)},this.hashes=[null];const a=new A8(new csr);this.fsQuad=a}setTextures(e,r,n=this.width,i=this.height){const a=e.getRenderTarget(),o=e.toneMapping,s=e.getClearAlpha();e.getClearColor(Z4e);const d=r.length||1;(n!==this.width||i!==this.height||this.depth!==d)&&(this.setSize(n,i,d),this.hashes=new Array(d).fill(null)),e.setClearColor(0,0),e.toneMapping=jC;const b=this.fsQuad,L=this.hashes;let B=!1;for(let V=0,X=d;V<X;V++){const ie=r[V],de=lsr(ie);ie&&(L[V]!==de||ie.isWebGLRenderTarget)&&(ie.matrixAutoUpdate=!1,ie.matrix.identity(),b.material.map=ie,e.setRenderTarget(this,V),b.render(e),ie.updateMatrix(),ie.matrixAutoUpdate=!0,L[V]=de,B=!0)}return b.material.map=null,e.setClearColor(Z4e,s),e.setRenderTarget(a),e.toneMapping=o,B}dispose(){super.dispose(),this.fsQuad.dispose()}}class csr extends eb{get map(){return this.uniforms.map.value}set map(e){this.uniforms.map.value=e}constructor(){super({uniforms:{map:{value:null}},vertexShader:`
				varying vec2 vUv;
				void main() {

					vUv = uv;
					gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );

				}
			`,fragmentShader:`
				uniform sampler2D map;
				varying vec2 vUv;
				void main() {

					gl_FragColor = texture2D( map, vUv );

				}
			`})}}function fsr(t,e=Math.random()){for(let r=t.length-1;r>0;r--){const n=Math.floor(e()*(r+1)),i=t[r];t[r]=t[n],t[n]=i}return t}class dsr{constructor(e,r,n=Math.random){const i=e**r,a=new Uint16Array(i);let o=i;for(let s=0;s<i;s++)a[s]=s;this.samples=new Float32Array(r),this.strataCount=e,this.reset=function(){for(let s=0;s<i;s++)a[s]=s;o=0},this.reshuffle=function(){o=0},this.next=function(){const{samples:s}=this;o>=a.length&&(fsr(a,n),this.reshuffle());let d=a[o++];for(let b=0;b<r;b++)s[b]=(d%e+n())/e,d=Math.floor(d/e);return s}}}class hsr{constructor(e,r,n=Math.random){let i=0;for(const d of r)i+=d;const a=new Float32Array(i),o=[];let s=0;for(const d of r){const b=new dsr(e,d,n);b.samples=new Float32Array(a.buffer,s,b.samples.length),s+=b.samples.length*4,o.push(b)}this.samples=a,this.strataCount=e,this.next=function(){for(const d of o)d.next();return a},this.reshuffle=function(){for(const d of o)d.reshuffle()},this.reset=function(){for(const d of o)d.reset()}}}class psr{constructor(e=0){this.m=2147483648,this.a=1103515245,this.c=12345,this.seed=e}nextInt(){return this.seed=(this.a*this.seed+this.c)%this.m,this.seed}nextFloat(){return this.nextInt()/(this.m-1)}}class vsr extends $y{constructor(e=1,r=1,n=8){super(new Float32Array(1),1,1,Rp,mp),this.minFilter=Mp,this.magFilter=Mp,this.strata=n,this.sampler=null,this.generator=new psr,this.stableNoise=!1,this.random=()=>this.stableNoise?this.generator.nextFloat():Math.random(),this.init(e,r,n)}init(e=this.image.height,r=this.image.width,n=this.strata){const{image:i}=this;if(i.width===r&&i.height===e&&this.sampler!==null)return;const a=new Array(e*r).fill(4),o=new hsr(n,a,this.random);i.width=r,i.height=e,i.data=o.samples,this.sampler=o,this.dispose(),this.next()}next(){this.sampler.next(),this.needsUpdate=!0}reset(){this.sampler.reset(),this.generator.seed=0}}function msr(t,e=Math.random){for(let r=t.length-1;r>0;r--){const n=~~((e()-1e-6)*r),i=t[r];t[r]=t[n],t[n]=i}}function gsr(t,e){t.fill(0);for(let r=0;r<e;r++)t[r]=1}class J4e{constructor(e){this.count=0,this.size=-1,this.sigma=-1,this.radius=-1,this.lookupTable=null,this.score=null,this.binaryPattern=null,this.resize(e),this.setSigma(1.5)}findVoid(){const{score:e,binaryPattern:r}=this;let n=1/0,i=-1;for(let a=0,o=r.length;a<o;a++){if(r[a]!==0)continue;const s=e[a];s<n&&(n=s,i=a)}return i}findCluster(){const{score:e,binaryPattern:r}=this;let n=-1/0,i=-1;for(let a=0,o=r.length;a<o;a++){if(r[a]!==1)continue;const s=e[a];s>n&&(n=s,i=a)}return i}setSigma(e){if(e===this.sigma)return;const r=~~(Math.sqrt(20*e**2)+1),n=2*r+1,i=new Float32Array(n*n),a=e*e;for(let o=-r;o<=r;o++)for(let s=-r;s<=r;s++){const d=(r+s)*n+o+r,b=o*o+s*s;i[d]=Math.E**(-b/(2*a))}this.lookupTable=i,this.sigma=e,this.radius=r}resize(e){this.size!==e&&(this.size=e,this.score=new Float32Array(e*e),this.binaryPattern=new Uint8Array(e*e))}invert(){const{binaryPattern:e,score:r,size:n}=this;r.fill(0);for(let i=0,a=e.length;i<a;i++)if(e[i]===0){const o=~~(i/n),s=i-o*n;this.updateScore(s,o,1),e[i]=1}else e[i]=0}updateScore(e,r,n){const{size:i,score:a,lookupTable:o}=this,s=this.radius,d=2*s+1;for(let b=-s;b<=s;b++)for(let L=-s;L<=s;L++){const B=(s+L)*d+b+s,V=o[B];let X=e+b;X=X<0?i+X:X%i;let ie=r+L;ie=ie<0?i+ie:ie%i;const de=ie*i+X;a[de]+=n*V}}addPointIndex(e){this.binaryPattern[e]=1;const r=this.size,n=~~(e/r),i=e-n*r;this.updateScore(i,n,1),this.count++}removePointIndex(e){this.binaryPattern[e]=0;const r=this.size,n=~~(e/r),i=e-n*r;this.updateScore(i,n,-1),this.count--}copy(e){this.resize(e.size),this.score.set(e.score),this.binaryPattern.set(e.binaryPattern),this.setSigma(e.sigma),this.count=e.count}}class ysr{constructor(){this.random=Math.random,this.sigma=1.5,this.size=64,this.majorityPointsRatio=.1,this.samples=new J4e(1),this.savedSamples=new J4e(1)}generate(){const{samples:e,savedSamples:r,sigma:n,majorityPointsRatio:i,size:a}=this;e.resize(a),e.setSigma(n);const o=Math.floor(a*a*i),s=e.binaryPattern;gsr(s,o),msr(s,this.random);for(let B=0,V=s.length;B<V;B++)s[B]===1&&e.addPointIndex(B);for(;;){const B=e.findCluster();e.removePointIndex(B);const V=e.findVoid();if(B===V){e.addPointIndex(B);break}e.addPointIndex(V)}const d=new Uint32Array(a*a);r.copy(e);let b;for(b=e.count-1;b>=0;){const B=e.findCluster();e.removePointIndex(B),d[B]=b,b--}const L=a*a;for(b=r.count;b<L/2;){const B=r.findVoid();r.addPointIndex(B),d[B]=b,b++}for(r.invert();b<L;){const B=r.findCluster();r.removePointIndex(B),d[B]=b,b++}return{data:d,maxValue:L}}}function bsr(t){return t>=3?4:t}function xsr(t){switch(t){case 1:return Dk;case 2:return pU;default:return Rp}}class _sr extends $y{constructor(e=64,r=1){super(new Float32Array(4),1,1,Rp,mp),this.minFilter=Mp,this.magFilter=Mp,this.size=e,this.channels=r,this.update()}update(){const e=this.channels,r=this.size,n=new ysr;n.channels=e,n.size=r;const i=bsr(e),a=xsr(i);(this.image.width!==r||a!==this.format)&&(this.image.width=r,this.image.height=r,this.image.data=new Float32Array(r**2*i),this.format=a,this.dispose());const o=this.image.data;for(let s=0,d=e;s<d;s++){const b=n.generate(),L=b.data,B=b.maxValue;for(let V=0,X=L.length;V<X;V++){const ie=L[V]/B;o[V*i+s]=ie}}this.needsUpdate=!0}}const wsr=`

	struct PhysicalCamera {

		float focusDistance;
		float anamorphicRatio;
		float bokehSize;
		int apertureBlades;
		float apertureRotation;

	};

`,Ssr=`

	struct EquirectHdrInfo {

		sampler2D marginalWeights;
		sampler2D conditionalWeights;
		sampler2D map;

		float totalSum;

	};

`,Tsr=`

	#define RECT_AREA_LIGHT_TYPE 0
	#define CIRC_AREA_LIGHT_TYPE 1
	#define SPOT_LIGHT_TYPE 2
	#define DIR_LIGHT_TYPE 3
	#define POINT_LIGHT_TYPE 4

	struct LightsInfo {

		sampler2D tex;
		uint count;

	};

	struct Light {

		vec3 position;
		int type;

		vec3 color;
		float intensity;

		vec3 u;
		vec3 v;
		float area;

		// spot light fields
		float radius;
		float near;
		float decay;
		float distance;
		float coneCos;
		float penumbraCos;
		int iesProfile;

	};

	Light readLightInfo( sampler2D tex, uint index ) {

		uint i = index * 6u;

		vec4 s0 = texelFetch1D( tex, i + 0u );
		vec4 s1 = texelFetch1D( tex, i + 1u );
		vec4 s2 = texelFetch1D( tex, i + 2u );
		vec4 s3 = texelFetch1D( tex, i + 3u );

		Light l;
		l.position = s0.rgb;
		l.type = int( round( s0.a ) );

		l.color = s1.rgb;
		l.intensity = s1.a;

		l.u = s2.rgb;
		l.v = s3.rgb;
		l.area = s3.a;

		if ( l.type == SPOT_LIGHT_TYPE || l.type == POINT_LIGHT_TYPE ) {

			vec4 s4 = texelFetch1D( tex, i + 4u );
			vec4 s5 = texelFetch1D( tex, i + 5u );
			l.radius = s4.r;
			l.decay = s4.g;
			l.distance = s4.b;
			l.coneCos = s4.a;

			l.penumbraCos = s5.r;
			l.iesProfile = int( round( s5.g ) );

		} else {

			l.radius = 0.0;
			l.decay = 0.0;
			l.distance = 0.0;

			l.coneCos = 0.0;
			l.penumbraCos = 0.0;
			l.iesProfile = - 1;

		}

		return l;

	}

`,Esr=`

	struct Material {

		vec3 color;
		int map;

		float metalness;
		int metalnessMap;

		float roughness;
		int roughnessMap;

		float ior;
		float transmission;
		int transmissionMap;

		float emissiveIntensity;
		vec3 emissive;
		int emissiveMap;

		int normalMap;
		vec2 normalScale;

		float clearcoat;
		int clearcoatMap;
		int clearcoatNormalMap;
		vec2 clearcoatNormalScale;
		float clearcoatRoughness;
		int clearcoatRoughnessMap;

		int iridescenceMap;
		int iridescenceThicknessMap;
		float iridescence;
		float iridescenceIor;
		float iridescenceThicknessMinimum;
		float iridescenceThicknessMaximum;

		vec3 specularColor;
		int specularColorMap;

		float specularIntensity;
		int specularIntensityMap;
		bool thinFilm;

		vec3 attenuationColor;
		float attenuationDistance;

		int alphaMap;

		bool castShadow;
		float opacity;
		float alphaTest;

		float side;
		bool matte;

		float sheen;
		vec3 sheenColor;
		int sheenColorMap;
		float sheenRoughness;
		int sheenRoughnessMap;

		bool vertexColors;
		bool flatShading;
		bool transparent;
		bool fogVolume;

		mat3 mapTransform;
		mat3 metalnessMapTransform;
		mat3 roughnessMapTransform;
		mat3 transmissionMapTransform;
		mat3 emissiveMapTransform;
		mat3 normalMapTransform;
		mat3 clearcoatMapTransform;
		mat3 clearcoatNormalMapTransform;
		mat3 clearcoatRoughnessMapTransform;
		mat3 sheenColorMapTransform;
		mat3 sheenRoughnessMapTransform;
		mat3 iridescenceMapTransform;
		mat3 iridescenceThicknessMapTransform;
		mat3 specularColorMapTransform;
		mat3 specularIntensityMapTransform;

	};

	mat3 readTextureTransform( sampler2D tex, uint index ) {

		mat3 textureTransform;

		vec4 row1 = texelFetch1D( tex, index );
		vec4 row2 = texelFetch1D( tex, index + 1u );

		textureTransform[0] = vec3(row1.r, row2.r, 0.0);
		textureTransform[1] = vec3(row1.g, row2.g, 0.0);
		textureTransform[2] = vec3(row1.b, row2.b, 1.0);

		return textureTransform;

	}

	Material readMaterialInfo( sampler2D tex, uint index ) {

		uint i = index * 45u;

		vec4 s0 = texelFetch1D( tex, i + 0u );
		vec4 s1 = texelFetch1D( tex, i + 1u );
		vec4 s2 = texelFetch1D( tex, i + 2u );
		vec4 s3 = texelFetch1D( tex, i + 3u );
		vec4 s4 = texelFetch1D( tex, i + 4u );
		vec4 s5 = texelFetch1D( tex, i + 5u );
		vec4 s6 = texelFetch1D( tex, i + 6u );
		vec4 s7 = texelFetch1D( tex, i + 7u );
		vec4 s8 = texelFetch1D( tex, i + 8u );
		vec4 s9 = texelFetch1D( tex, i + 9u );
		vec4 s10 = texelFetch1D( tex, i + 10u );
		vec4 s11 = texelFetch1D( tex, i + 11u );
		vec4 s12 = texelFetch1D( tex, i + 12u );
		vec4 s13 = texelFetch1D( tex, i + 13u );
		vec4 s14 = texelFetch1D( tex, i + 14u );

		Material m;
		m.color = s0.rgb;
		m.map = int( round( s0.a ) );

		m.metalness = s1.r;
		m.metalnessMap = int( round( s1.g ) );
		m.roughness = s1.b;
		m.roughnessMap = int( round( s1.a ) );

		m.ior = s2.r;
		m.transmission = s2.g;
		m.transmissionMap = int( round( s2.b ) );
		m.emissiveIntensity = s2.a;

		m.emissive = s3.rgb;
		m.emissiveMap = int( round( s3.a ) );

		m.normalMap = int( round( s4.r ) );
		m.normalScale = s4.gb;

		m.clearcoat = s4.a;
		m.clearcoatMap = int( round( s5.r ) );
		m.clearcoatRoughness = s5.g;
		m.clearcoatRoughnessMap = int( round( s5.b ) );
		m.clearcoatNormalMap = int( round( s5.a ) );
		m.clearcoatNormalScale = s6.rg;

		m.sheen = s6.a;
		m.sheenColor = s7.rgb;
		m.sheenColorMap = int( round( s7.a ) );
		m.sheenRoughness = s8.r;
		m.sheenRoughnessMap = int( round( s8.g ) );

		m.iridescenceMap = int( round( s8.b ) );
		m.iridescenceThicknessMap = int( round( s8.a ) );
		m.iridescence = s9.r;
		m.iridescenceIor = s9.g;
		m.iridescenceThicknessMinimum = s9.b;
		m.iridescenceThicknessMaximum = s9.a;

		m.specularColor = s10.rgb;
		m.specularColorMap = int( round( s10.a ) );

		m.specularIntensity = s11.r;
		m.specularIntensityMap = int( round( s11.g ) );
		m.thinFilm = bool( s11.b );

		m.attenuationColor = s12.rgb;
		m.attenuationDistance = s12.a;

		m.alphaMap = int( round( s13.r ) );

		m.opacity = s13.g;
		m.alphaTest = s13.b;
		m.side = s13.a;

		m.matte = bool( s14.r );
		m.castShadow = bool( s14.g );
		m.vertexColors = bool( int( s14.b ) & 1 );
		m.flatShading = bool( int( s14.b ) & 2 );
		m.fogVolume = bool( int( s14.b ) & 4 );
		m.transparent = bool( s14.a );

		uint firstTextureTransformIdx = i + 15u;

		// mat3( 1.0 ) is an identity matrix
		m.mapTransform = m.map == - 1 ? mat3( 1.0 ) : readTextureTransform( tex, firstTextureTransformIdx );
		m.metalnessMapTransform = m.metalnessMap == - 1 ? mat3( 1.0 ) : readTextureTransform( tex, firstTextureTransformIdx + 2u );
		m.roughnessMapTransform = m.roughnessMap == - 1 ? mat3( 1.0 ) : readTextureTransform( tex, firstTextureTransformIdx + 4u );
		m.transmissionMapTransform = m.transmissionMap == - 1 ? mat3( 1.0 ) : readTextureTransform( tex, firstTextureTransformIdx + 6u );
		m.emissiveMapTransform = m.emissiveMap == - 1 ? mat3( 1.0 ) : readTextureTransform( tex, firstTextureTransformIdx + 8u );
		m.normalMapTransform = m.normalMap == - 1 ? mat3( 1.0 ) : readTextureTransform( tex, firstTextureTransformIdx + 10u );
		m.clearcoatMapTransform = m.clearcoatMap == - 1 ? mat3( 1.0 ) : readTextureTransform( tex, firstTextureTransformIdx + 12u );
		m.clearcoatNormalMapTransform = m.clearcoatNormalMap == - 1 ? mat3( 1.0 ) : readTextureTransform( tex, firstTextureTransformIdx + 14u );
		m.clearcoatRoughnessMapTransform = m.clearcoatRoughnessMap == - 1 ? mat3( 1.0 ) : readTextureTransform( tex, firstTextureTransformIdx + 16u );
		m.sheenColorMapTransform = m.sheenColorMap == - 1 ? mat3( 1.0 ) : readTextureTransform( tex, firstTextureTransformIdx + 18u );
		m.sheenRoughnessMapTransform = m.sheenRoughnessMap == - 1 ? mat3( 1.0 ) : readTextureTransform( tex, firstTextureTransformIdx + 20u );
		m.iridescenceMapTransform = m.iridescenceMap == - 1 ? mat3( 1.0 ) : readTextureTransform( tex, firstTextureTransformIdx + 22u );
		m.iridescenceThicknessMapTransform = m.iridescenceThicknessMap == - 1 ? mat3( 1.0 ) : readTextureTransform( tex, firstTextureTransformIdx + 24u );
		m.specularColorMapTransform = m.specularColorMap == - 1 ? mat3( 1.0 ) : readTextureTransform( tex, firstTextureTransformIdx + 26u );
		m.specularIntensityMapTransform = m.specularIntensityMap == - 1 ? mat3( 1.0 ) : readTextureTransform( tex, firstTextureTransformIdx + 28u );

		return m;

	}

`,Asr=`

	struct SurfaceRecord {

		// surface type
		bool volumeParticle;

		// geometry
		vec3 faceNormal;
		bool frontFace;
		vec3 normal;
		mat3 normalBasis;
		mat3 normalInvBasis;

		// cached properties
		float eta;
		float f0;

		// material
		float roughness;
		float filteredRoughness;
		float metalness;
		vec3 color;
		vec3 emission;

		// transmission
		float ior;
		float transmission;
		bool thinFilm;
		vec3 attenuationColor;
		float attenuationDistance;

		// clearcoat
		vec3 clearcoatNormal;
		mat3 clearcoatBasis;
		mat3 clearcoatInvBasis;
		float clearcoat;
		float clearcoatRoughness;
		float filteredClearcoatRoughness;

		// sheen
		float sheen;
		vec3 sheenColor;
		float sheenRoughness;

		// iridescence
		float iridescence;
		float iridescenceIor;
		float iridescenceThickness;

		// specular
		vec3 specularColor;
		float specularIntensity;
	};

	struct ScatterRecord {
		float specularPdf;
		float pdf;
		vec3 direction;
		vec3 color;
	};

`,Csr=`

	// samples the the given environment map in the given direction
	vec3 sampleEquirectColor( sampler2D envMap, vec3 direction ) {

		return texture2D( envMap, equirectDirectionToUv( direction ) ).rgb;

	}

	// gets the pdf of the given direction to sample
	float equirectDirectionPdf( vec3 direction ) {

		vec2 uv = equirectDirectionToUv( direction );
		float theta = uv.y * PI;
		float sinTheta = sin( theta );
		if ( sinTheta == 0.0 ) {

			return 0.0;

		}

		return 1.0 / ( 2.0 * PI * PI * sinTheta );

	}

	// samples the color given env map with CDF and returns the pdf of the direction
	float sampleEquirect( vec3 direction, inout vec3 color ) {

		float totalSum = envMapInfo.totalSum;
		if ( totalSum == 0.0 ) {

			color = vec3( 0.0 );
			return 1.0;

		}

		vec2 uv = equirectDirectionToUv( direction );
		color = texture2D( envMapInfo.map, uv ).rgb;

		float lum = luminance( color );
		ivec2 resolution = textureSize( envMapInfo.map, 0 );
		float pdf = lum / totalSum;

		return float( resolution.x * resolution.y ) * pdf * equirectDirectionPdf( direction );

	}

	// samples a direction of the envmap with color and retrieves pdf
	float sampleEquirectProbability( vec2 r, inout vec3 color, inout vec3 direction ) {

		// sample env map cdf
		float v = texture2D( envMapInfo.marginalWeights, vec2( r.x, 0.0 ) ).x;
		float u = texture2D( envMapInfo.conditionalWeights, vec2( r.y, v ) ).x;
		vec2 uv = vec2( u, v );

		vec3 derivedDirection = equirectUvToDirection( uv );
		direction = derivedDirection;
		color = texture2D( envMapInfo.map, uv ).rgb;

		float totalSum = envMapInfo.totalSum;
		float lum = luminance( color );
		ivec2 resolution = textureSize( envMapInfo.map, 0 );
		float pdf = lum / totalSum;

		return float( resolution.x * resolution.y ) * pdf * equirectDirectionPdf( direction );

	}
`,Msr=`

	float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {

		return smoothstep( coneCosine, penumbraCosine, angleCosine );

	}

	float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {

		// based upon Frostbite 3 Moving to Physically-based Rendering
		// page 32, equation 26: E[window1]
		// https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf
		float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), EPSILON );

		if ( cutoffDistance > 0.0 ) {

			distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );

		}

		return distanceFalloff;

	}

	float getPhotometricAttenuation( sampler2DArray iesProfiles, int iesProfile, vec3 posToLight, vec3 lightDir, vec3 u, vec3 v ) {

		float cosTheta = dot( posToLight, lightDir );
		float angle = acos( cosTheta ) / PI;

		return texture2D( iesProfiles, vec3( angle, 0.0, iesProfile ) ).r;

	}

	struct LightRecord {

		float dist;
		vec3 direction;
		float pdf;
		vec3 emission;
		int type;

	};

	bool intersectLightAtIndex( sampler2D lights, vec3 rayOrigin, vec3 rayDirection, uint l, inout LightRecord lightRec ) {

		bool didHit = false;
		Light light = readLightInfo( lights, l );

		vec3 u = light.u;
		vec3 v = light.v;

		// check for backface
		vec3 normal = normalize( cross( u, v ) );
		if ( dot( normal, rayDirection ) > 0.0 ) {

			u *= 1.0 / dot( u, u );
			v *= 1.0 / dot( v, v );

			float dist;

			// MIS / light intersection is not supported for punctual lights.
			if(
				( light.type == RECT_AREA_LIGHT_TYPE && intersectsRectangle( light.position, normal, u, v, rayOrigin, rayDirection, dist ) ) ||
				( light.type == CIRC_AREA_LIGHT_TYPE && intersectsCircle( light.position, normal, u, v, rayOrigin, rayDirection, dist ) )
			) {

				float cosTheta = dot( rayDirection, normal );
				didHit = true;
				lightRec.dist = dist;
				lightRec.pdf = ( dist * dist ) / ( light.area * cosTheta );
				lightRec.emission = light.color * light.intensity;
				lightRec.direction = rayDirection;
				lightRec.type = light.type;

			}

		}

		return didHit;

	}

	LightRecord randomAreaLightSample( Light light, vec3 rayOrigin, vec2 ruv ) {

		vec3 randomPos;
		if( light.type == RECT_AREA_LIGHT_TYPE ) {

			// rectangular area light
			randomPos = light.position + light.u * ( ruv.x - 0.5 ) + light.v * ( ruv.y - 0.5 );

		} else if( light.type == CIRC_AREA_LIGHT_TYPE ) {

			// circular area light
			float r = 0.5 * sqrt( ruv.x );
			float theta = ruv.y * 2.0 * PI;
			float x = r * cos( theta );
			float y = r * sin( theta );

			randomPos = light.position + light.u * x + light.v * y;

		}

		vec3 toLight = randomPos - rayOrigin;
		float lightDistSq = dot( toLight, toLight );
		float dist = sqrt( lightDistSq );
		vec3 direction = toLight / dist;
		vec3 lightNormal = normalize( cross( light.u, light.v ) );

		LightRecord lightRec;
		lightRec.type = light.type;
		lightRec.emission = light.color * light.intensity;
		lightRec.dist = dist;
		lightRec.direction = direction;

		// TODO: the denominator is potentially zero
		lightRec.pdf = lightDistSq / ( light.area * dot( direction, lightNormal ) );

		return lightRec;

	}

	LightRecord randomSpotLightSample( Light light, sampler2DArray iesProfiles, vec3 rayOrigin, vec2 ruv ) {

		float radius = light.radius * sqrt( ruv.x );
		float theta = ruv.y * 2.0 * PI;
		float x = radius * cos( theta );
		float y = radius * sin( theta );

		vec3 u = light.u;
		vec3 v = light.v;
		vec3 normal = normalize( cross( u, v ) );

		float angle = acos( light.coneCos );
		float angleTan = tan( angle );
		float startDistance = light.radius / max( angleTan, EPSILON );

		vec3 randomPos = light.position - normal * startDistance + u * x + v * y;
		vec3 toLight = randomPos - rayOrigin;
		float lightDistSq = dot( toLight, toLight );
		float dist = sqrt( lightDistSq );

		vec3 direction = toLight / max( dist, EPSILON );
		float cosTheta = dot( direction, normal );

		float spotAttenuation = light.iesProfile != - 1 ?
			getPhotometricAttenuation( iesProfiles, light.iesProfile, direction, normal, u, v ) :
			getSpotAttenuation( light.coneCos, light.penumbraCos, cosTheta );

		float distanceAttenuation = getDistanceAttenuation( dist, light.distance, light.decay );
		LightRecord lightRec;
		lightRec.type = light.type;
		lightRec.dist = dist;
		lightRec.direction = direction;
		lightRec.emission = light.color * light.intensity * distanceAttenuation * spotAttenuation;
		lightRec.pdf = 1.0;

		return lightRec;

	}

	LightRecord randomLightSample( sampler2D lights, sampler2DArray iesProfiles, uint lightCount, vec3 rayOrigin, vec3 ruv ) {

		LightRecord result;

		// pick a random light
		uint l = uint( ruv.x * float( lightCount ) );
		Light light = readLightInfo( lights, l );

		if ( light.type == SPOT_LIGHT_TYPE ) {

			result = randomSpotLightSample( light, iesProfiles, rayOrigin, ruv.yz );

		} else if ( light.type == POINT_LIGHT_TYPE ) {

			vec3 lightRay = light.u - rayOrigin;
			float lightDist = length( lightRay );
			float cutoffDistance = light.distance;
			float distanceFalloff = 1.0 / max( pow( lightDist, light.decay ), 0.01 );
			if ( cutoffDistance > 0.0 ) {

				distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDist / cutoffDistance ) ) );

			}

			LightRecord rec;
			rec.direction = normalize( lightRay );
			rec.dist = length( lightRay );
			rec.pdf = 1.0;
			rec.emission = light.color * light.intensity * distanceFalloff;
			rec.type = light.type;
			result = rec;

		} else if ( light.type == DIR_LIGHT_TYPE ) {

			LightRecord rec;
			rec.dist = 1e10;
			rec.direction = light.u;
			rec.pdf = 1.0;
			rec.emission = light.color * light.intensity;
			rec.type = light.type;

			result = rec;

		} else {

			// sample the light
			result = randomAreaLightSample( light, rayOrigin, ruv.yz );

		}

		return result;

	}

`,Rsr=`

	vec3 sampleHemisphere( vec3 n, vec2 uv ) {

		// https://www.rorydriscoll.com/2009/01/07/better-sampling/
		// https://graphics.pixar.com/library/OrthonormalB/paper.pdf
		float sign = n.z == 0.0 ? 1.0 : sign( n.z );
		float a = - 1.0 / ( sign + n.z );
		float b = n.x * n.y * a;
		vec3 b1 = vec3( 1.0 + sign * n.x * n.x * a, sign * b, - sign * n.x );
		vec3 b2 = vec3( b, sign + n.y * n.y * a, - n.y );

		float r = sqrt( uv.x );
		float theta = 2.0 * PI * uv.y;
		float x = r * cos( theta );
		float y = r * sin( theta );
		return x * b1 + y * b2 + sqrt( 1.0 - uv.x ) * n;

	}

	vec2 sampleTriangle( vec2 a, vec2 b, vec2 c, vec2 r ) {

		// get the edges of the triangle and the diagonal across the
		// center of the parallelogram
		vec2 e1 = a - b;
		vec2 e2 = c - b;
		vec2 diag = normalize( e1 + e2 );

		// pick the point in the parallelogram
		if ( r.x + r.y > 1.0 ) {

			r = vec2( 1.0 ) - r;

		}

		return e1 * r.x + e2 * r.y;

	}

	vec2 sampleCircle( vec2 uv ) {

		float angle = 2.0 * PI * uv.x;
		float radius = sqrt( uv.y );
		return vec2( cos( angle ), sin( angle ) ) * radius;

	}

	vec3 sampleSphere( vec2 uv ) {

		float u = ( uv.x - 0.5 ) * 2.0;
		float t = uv.y * PI * 2.0;
		float f = sqrt( 1.0 - u * u );

		return vec3( f * cos( t ), f * sin( t ), u );

	}

	vec2 sampleRegularPolygon( int sides, vec3 uvw ) {

		sides = max( sides, 3 );

		vec3 r = uvw;
		float anglePerSegment = 2.0 * PI / float( sides );
		float segment = floor( float( sides ) * r.x );

		float angle1 = anglePerSegment * segment;
		float angle2 = angle1 + anglePerSegment;
		vec2 a = vec2( sin( angle1 ), cos( angle1 ) );
		vec2 b = vec2( 0.0, 0.0 );
		vec2 c = vec2( sin( angle2 ), cos( angle2 ) );

		return sampleTriangle( a, b, c, r.yz );

	}

	// samples an aperture shape with the given number of sides. 0 means circle
	vec2 sampleAperture( int blades, vec3 uvw ) {

		return blades == 0 ?
			sampleCircle( uvw.xy ) :
			sampleRegularPolygon( blades, uvw );

	}


`,ksr=`

	bool totalInternalReflection( float cosTheta, float eta ) {

		float sinTheta = sqrt( 1.0 - cosTheta * cosTheta );
		return eta * sinTheta > 1.0;

	}

	// https://google.github.io/filament/Filament.md.html#materialsystem/diffusebrdf
	float schlickFresnel( float cosine, float f0 ) {

		return f0 + ( 1.0 - f0 ) * pow( 1.0 - cosine, 5.0 );

	}

	vec3 schlickFresnel( float cosine, vec3 f0 ) {

		return f0 + ( 1.0 - f0 ) * pow( 1.0 - cosine, 5.0 );

	}

	vec3 schlickFresnel( float cosine, vec3 f0, vec3 f90 ) {

		return f0 + ( f90 - f0 ) * pow( 1.0 - cosine, 5.0 );

	}

	float dielectricFresnel( float cosThetaI, float eta ) {

		// https://schuttejoe.github.io/post/disneybsdf/
		float ni = eta;
		float nt = 1.0;

		// Check for total internal reflection
		float sinThetaISq = 1.0f - cosThetaI * cosThetaI;
		float sinThetaTSq = eta * eta * sinThetaISq;
		if( sinThetaTSq >= 1.0 ) {

			return 1.0;

		}

		float sinThetaT = sqrt( sinThetaTSq );

		float cosThetaT = sqrt( max( 0.0, 1.0f - sinThetaT * sinThetaT ) );
		float rParallel = ( ( nt * cosThetaI ) - ( ni * cosThetaT ) ) / ( ( nt * cosThetaI ) + ( ni * cosThetaT ) );
		float rPerpendicular = ( ( ni * cosThetaI ) - ( nt * cosThetaT ) ) / ( ( ni * cosThetaI ) + ( nt * cosThetaT ) );
		return ( rParallel * rParallel + rPerpendicular * rPerpendicular ) / 2.0;

	}

	// https://raytracing.github.io/books/RayTracingInOneWeekend.html#dielectrics/schlickapproximation
	float iorRatioToF0( float eta ) {

		return pow( ( 1.0 - eta ) / ( 1.0 + eta ), 2.0 );

	}

	vec3 evaluateFresnel( float cosTheta, float eta, vec3 f0, vec3 f90 ) {

		if ( totalInternalReflection( cosTheta, eta ) ) {

			return f90;

		}

		return schlickFresnel( cosTheta, f0, f90 );

	}

	// TODO: disney fresnel was removed and replaced with this fresnel function to better align with
	// the glTF but is causing blown out pixels. Should be revisited
	// float evaluateFresnelWeight( float cosTheta, float eta, float f0 ) {

	// 	if ( totalInternalReflection( cosTheta, eta ) ) {

	// 		return 1.0;

	// 	}

	// 	return schlickFresnel( cosTheta, f0 );

	// }

	// https://schuttejoe.github.io/post/disneybsdf/
	float disneyFresnel( vec3 wo, vec3 wi, vec3 wh, float f0, float eta, float metalness ) {

		float dotHV = dot( wo, wh );
		if ( totalInternalReflection( dotHV, eta ) ) {

			return 1.0;

		}

		float dotHL = dot( wi, wh );
		float dielectricFresnel = dielectricFresnel( abs( dotHV ), eta );
		float metallicFresnel = schlickFresnel( dotHL, f0 );

		return mix( dielectricFresnel, metallicFresnel, metalness );

	}

`,Isr=`

	// Fast arccos approximation used to remove banding artifacts caused by numerical errors in acos.
	// This is a cubic Lagrange interpolating polynomial for x = [-1, -1/2, 0, 1/2, 1].
	// For more information see: https://github.com/gkjohnson/three-gpu-pathtracer/pull/171#issuecomment-1152275248
	float acosApprox( float x ) {

		x = clamp( x, -1.0, 1.0 );
		return ( - 0.69813170079773212 * x * x - 0.87266462599716477 ) * x + 1.5707963267948966;

	}

	// An acos with input values bound to the range [-1, 1].
	float acosSafe( float x ) {

		return acos( clamp( x, -1.0, 1.0 ) );

	}

	float saturateCos( float val ) {

		return clamp( val, 0.001, 1.0 );

	}

	float square( float t ) {

		return t * t;

	}

	vec2 square( vec2 t ) {

		return t * t;

	}

	vec3 square( vec3 t ) {

		return t * t;

	}

	vec4 square( vec4 t ) {

		return t * t;

	}

	vec2 rotateVector( vec2 v, float t ) {

		float ac = cos( t );
		float as = sin( t );
		return vec2(
			v.x * ac - v.y * as,
			v.x * as + v.y * ac
		);

	}

	// forms a basis with the normal vector as Z
	mat3 getBasisFromNormal( vec3 normal ) {

		vec3 other;
		if ( abs( normal.x ) > 0.5 ) {

			other = vec3( 0.0, 1.0, 0.0 );

		} else {

			other = vec3( 1.0, 0.0, 0.0 );

		}

		vec3 ortho = normalize( cross( normal, other ) );
		vec3 ortho2 = normalize( cross( normal, ortho ) );
		return mat3( ortho2, ortho, normal );

	}

`,Psr=`

	// Finds the point where the ray intersects the plane defined by u and v and checks if this point
	// falls in the bounds of the rectangle on that same plane.
	// Plane intersection: https://lousodrome.net/blog/light/2020/07/03/intersection-of-a-ray-and-a-plane/
	bool intersectsRectangle( vec3 center, vec3 normal, vec3 u, vec3 v, vec3 rayOrigin, vec3 rayDirection, inout float dist ) {

		float t = dot( center - rayOrigin, normal ) / dot( rayDirection, normal );

		if ( t > EPSILON ) {

			vec3 p = rayOrigin + rayDirection * t;
			vec3 vi = p - center;

			// check if p falls inside the rectangle
			float a1 = dot( u, vi );
			if ( abs( a1 ) <= 0.5 ) {

				float a2 = dot( v, vi );
				if ( abs( a2 ) <= 0.5 ) {

					dist = t;
					return true;

				}

			}

		}

		return false;

	}

	// Finds the point where the ray intersects the plane defined by u and v and checks if this point
	// falls in the bounds of the circle on that same plane. See above URL for a description of the plane intersection algorithm.
	bool intersectsCircle( vec3 position, vec3 normal, vec3 u, vec3 v, vec3 rayOrigin, vec3 rayDirection, inout float dist ) {

		float t = dot( position - rayOrigin, normal ) / dot( rayDirection, normal );

		if ( t > EPSILON ) {

			vec3 hit = rayOrigin + rayDirection * t;
			vec3 vi = hit - position;

			float a1 = dot( u, vi );
			float a2 = dot( v, vi );

			if( length( vec2( a1, a2 ) ) <= 0.5 ) {

				dist = t;
				return true;

			}

		}

		return false;

	}

`,Dsr=`

	// add texel fetch functions for texture arrays
	vec4 texelFetch1D( sampler2DArray tex, int layer, uint index ) {

		uint width = uint( textureSize( tex, 0 ).x );
		uvec2 uv;
		uv.x = index % width;
		uv.y = index / width;

		return texelFetch( tex, ivec3( uv, layer ), 0 );

	}

	vec4 textureSampleBarycoord( sampler2DArray tex, int layer, vec3 barycoord, uvec3 faceIndices ) {

		return
			barycoord.x * texelFetch1D( tex, layer, faceIndices.x ) +
			barycoord.y * texelFetch1D( tex, layer, faceIndices.y ) +
			barycoord.z * texelFetch1D( tex, layer, faceIndices.z );

	}

`,iXe=`

	// TODO: possibly this should be renamed something related to material or path tracing logic

	#ifndef RAY_OFFSET
	#define RAY_OFFSET 1e-4
	#endif

	// adjust the hit point by the surface normal by a factor of some offset and the
	// maximum component-wise value of the current point to accommodate floating point
	// error as values increase.
	vec3 stepRayOrigin( vec3 rayOrigin, vec3 rayDirection, vec3 offset, float dist ) {

		vec3 point = rayOrigin + rayDirection * dist;
		vec3 absPoint = abs( point );
		float maxPoint = max( absPoint.x, max( absPoint.y, absPoint.z ) );
		return point + offset * ( maxPoint + 1.0 ) * RAY_OFFSET;

	}

	// https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_volume/README.md#attenuation
	vec3 transmissionAttenuation( float dist, vec3 attColor, float attDist ) {

		vec3 ot = - log( attColor ) / attDist;
		return exp( - ot * dist );

	}

	vec3 getHalfVector( vec3 wi, vec3 wo, float eta ) {

		// get the half vector - assuming if the light incident vector is on the other side
		// of the that it's transmissive.
		vec3 h;
		if ( wi.z > 0.0 ) {

			h = normalize( wi + wo );

		} else {

			// Scale by the ior ratio to retrieve the appropriate half vector
			// From Section 2.2 on computing the transmission half vector:
			// https://blog.selfshadow.com/publications/s2015-shading-course/burley/s2015_pbs_disney_bsdf_notes.pdf
			h = normalize( wi + wo * eta );

		}

		h *= sign( h.z );
		return h;

	}

	vec3 getHalfVector( vec3 a, vec3 b ) {

		return normalize( a + b );

	}

	// The discrepancy between interpolated surface normal and geometry normal can cause issues when a ray
	// is cast that is on the top side of the geometry normal plane but below the surface normal plane. If
	// we find a ray like that we ignore it to avoid artifacts.
	// This function returns if the direction is on the same side of both planes.
	bool isDirectionValid( vec3 direction, vec3 surfaceNormal, vec3 geometryNormal ) {

		bool aboveSurfaceNormal = dot( direction, surfaceNormal ) > 0.0;
		bool aboveGeometryNormal = dot( direction, geometryNormal ) > 0.0;
		return aboveSurfaceNormal == aboveGeometryNormal;

	}

	// ray sampling x and z are swapped to align with expected background view
	vec2 equirectDirectionToUv( vec3 direction ) {

		// from Spherical.setFromCartesianCoords
		vec2 uv = vec2( atan( direction.z, direction.x ), acos( direction.y ) );
		uv /= vec2( 2.0 * PI, PI );

		// apply adjustments to get values in range [0, 1] and y right side up
		uv.x += 0.5;
		uv.y = 1.0 - uv.y;
		return uv;

	}

	vec3 equirectUvToDirection( vec2 uv ) {

		// undo above adjustments
		uv.x -= 0.5;
		uv.y = 1.0 - uv.y;

		// from Vector3.setFromSphericalCoords
		float theta = uv.x * 2.0 * PI;
		float phi = uv.y * PI;

		float sinPhi = sin( phi );

		return vec3( sinPhi * cos( theta ), cos( phi ), sinPhi * sin( theta ) );

	}

	// power heuristic for multiple importance sampling
	float misHeuristic( float a, float b ) {

		float aa = a * a;
		float bb = b * b;
		return aa / ( aa + bb );

	}

	// tentFilter from Peter Shirley's 'Realistic Ray Tracing (2nd Edition)' book, pg. 60
	// erichlof/THREE.js-PathTracing-Renderer/
	float tentFilter( float x ) {

		return x < 0.5 ? sqrt( 2.0 * x ) - 1.0 : 1.0 - sqrt( 2.0 - ( 2.0 * x ) );

	}
`,Q4e=`

	// https://www.shadertoy.com/view/wltcRS
	uvec4 WHITE_NOISE_SEED;

	void rng_initialize( vec2 p, int frame ) {

		// white noise seed
		WHITE_NOISE_SEED = uvec4( p, uint( frame ), uint( p.x ) + uint( p.y ) );

	}

	// https://www.pcg-random.org/
	void pcg4d( inout uvec4 v ) {

		v = v * 1664525u + 1013904223u;
		v.x += v.y * v.w;
		v.y += v.z * v.x;
		v.z += v.x * v.y;
		v.w += v.y * v.z;
		v = v ^ ( v >> 16u );
		v.x += v.y*v.w;
		v.y += v.z*v.x;
		v.z += v.x*v.y;
		v.w += v.y*v.z;

	}

	// returns [ 0, 1 ]
	float pcgRand() {

		pcg4d( WHITE_NOISE_SEED );
		return float( WHITE_NOISE_SEED.x ) / float( 0xffffffffu );

	}

	vec2 pcgRand2() {

		pcg4d( WHITE_NOISE_SEED );
		return vec2( WHITE_NOISE_SEED.xy ) / float(0xffffffffu);

	}

	vec3 pcgRand3() {

		pcg4d( WHITE_NOISE_SEED );
		return vec3( WHITE_NOISE_SEED.xyz ) / float( 0xffffffffu );

	}

	vec4 pcgRand4() {

		pcg4d( WHITE_NOISE_SEED );
		return vec4( WHITE_NOISE_SEED ) / float( 0xffffffffu );

	}
`,Lsr=`

	uniform sampler2D stratifiedTexture;
	uniform sampler2D stratifiedOffsetTexture;

	uint sobolPixelIndex = 0u;
	uint sobolPathIndex = 0u;
	uint sobolBounceIndex = 0u;
	vec4 pixelSeed = vec4( 0 );

	vec4 rand4( int v ) {

		ivec2 uv = ivec2( v, sobolBounceIndex );
		vec4 stratifiedSample = texelFetch( stratifiedTexture, uv, 0 );
		return fract( stratifiedSample + pixelSeed.r ); // blue noise + stratified samples

	}

	vec3 rand3( int v ) {

		return rand4( v ).xyz;

	}

	vec2 rand2( int v ) {

		return rand4( v ).xy;

	}

	float rand( int v ) {

		return rand4( v ).x;

	}

	void rng_initialize( vec2 screenCoord, int frame ) {

		// tile the small noise texture across the entire screen
		ivec2 noiseSize = ivec2( textureSize( stratifiedOffsetTexture, 0 ) );
		ivec2 pixel = ivec2( screenCoord.xy ) % noiseSize;
		vec2 pixelWidth = 1.0 / vec2( noiseSize );
		vec2 uv = vec2( pixel ) * pixelWidth + pixelWidth * 0.5;

		// note that using "texelFetch" here seems to break Android for some reason
		pixelSeed = texture( stratifiedOffsetTexture, uv );

	}

`,Osr=`

	// diffuse
	float diffuseEval( vec3 wo, vec3 wi, vec3 wh, SurfaceRecord surf, inout vec3 color ) {

		// https://schuttejoe.github.io/post/disneybsdf/
		float fl = schlickFresnel( wi.z, 0.0 );
		float fv = schlickFresnel( wo.z, 0.0 );

		float metalFactor = ( 1.0 - surf.metalness );
		float transFactor = ( 1.0 - surf.transmission );
		float rr = 0.5 + 2.0 * surf.roughness * fl * fl;
		float retro = rr * ( fl + fv + fl * fv * ( rr - 1.0f ) );
		float lambert = ( 1.0f - 0.5f * fl ) * ( 1.0f - 0.5f * fv );

		// TODO: subsurface approx?

		// float F = evaluateFresnelWeight( dot( wo, wh ), surf.eta, surf.f0 );
		float F = disneyFresnel( wo, wi, wh, surf.f0, surf.eta, surf.metalness );
		color = ( 1.0 - F ) * transFactor * metalFactor * wi.z * surf.color * ( retro + lambert ) / PI;

		return wi.z / PI;

	}

	vec3 diffuseDirection( vec3 wo, SurfaceRecord surf ) {

		vec3 lightDirection = sampleSphere( rand2( 11 ) );
		lightDirection.z += 1.0;
		lightDirection = normalize( lightDirection );

		return lightDirection;

	}

	// specular
	float specularEval( vec3 wo, vec3 wi, vec3 wh, SurfaceRecord surf, inout vec3 color ) {

		// if roughness is set to 0 then D === NaN which results in black pixels
		float metalness = surf.metalness;
		float roughness = surf.filteredRoughness;

		float eta = surf.eta;
		float f0 = surf.f0;

		vec3 f0Color = mix( f0 * surf.specularColor * surf.specularIntensity, surf.color, surf.metalness );
		vec3 f90Color = vec3( mix( surf.specularIntensity, 1.0, surf.metalness ) );
		vec3 F = evaluateFresnel( dot( wo, wh ), eta, f0Color, f90Color );

		vec3 iridescenceF = evalIridescence( 1.0, surf.iridescenceIor, dot( wi, wh ), surf.iridescenceThickness, f0Color );
		F = mix( F, iridescenceF,  surf.iridescence );

		// PDF
		// See 14.1.1 Microfacet BxDFs in https://www.pbr-book.org/
		float incidentTheta = acos( wo.z );
		float G = ggxShadowMaskG2( wi, wo, roughness );
		float D = ggxDistribution( wh, roughness );
		float G1 = ggxShadowMaskG1( incidentTheta, roughness );
		float ggxPdf = D * G1 * max( 0.0, abs( dot( wo, wh ) ) ) / abs ( wo.z );

		color = wi.z * F * G * D / ( 4.0 * abs( wi.z * wo.z ) );
		return ggxPdf / ( 4.0 * dot( wo, wh ) );

	}

	vec3 specularDirection( vec3 wo, SurfaceRecord surf ) {

		// sample ggx vndf distribution which gives a new normal
		float roughness = surf.filteredRoughness;
		vec3 halfVector = ggxDirection(
			wo,
			vec2( roughness ),
			rand2( 12 )
		);

		// apply to new ray by reflecting off the new normal
		return - reflect( wo, halfVector );

	}


	// transmission
	/*
	float transmissionEval( vec3 wo, vec3 wi, vec3 wh, SurfaceRecord surf, inout vec3 color ) {

		// See section 4.2 in https://www.cs.cornell.edu/~srm/publications/EGSR07-btdf.pdf

		float filteredRoughness = surf.filteredRoughness;
		float eta = surf.eta;
		bool frontFace = surf.frontFace;
		bool thinFilm = surf.thinFilm;

		color = surf.transmission * surf.color;

		float denom = pow( eta * dot( wi, wh ) + dot( wo, wh ), 2.0 );
		return ggxPDF( wo, wh, filteredRoughness ) / denom;

	}

	vec3 transmissionDirection( vec3 wo, SurfaceRecord surf ) {

		float filteredRoughness = surf.filteredRoughness;
		float eta = surf.eta;
		bool frontFace = surf.frontFace;

		// sample ggx vndf distribution which gives a new normal
		vec3 halfVector = ggxDirection(
			wo,
			vec2( filteredRoughness ),
			rand2( 13 )
		);

		vec3 lightDirection = refract( normalize( - wo ), halfVector, eta );
		if ( surf.thinFilm ) {

			lightDirection = - refract( normalize( - lightDirection ), - vec3( 0.0, 0.0, 1.0 ), 1.0 / eta );

		}

		return normalize( lightDirection );

	}
	*/

	// TODO: This is just using a basic cosine-weighted specular distribution with an
	// incorrect PDF value at the moment. Update it to correctly use a GGX distribution
	float transmissionEval( vec3 wo, vec3 wi, vec3 wh, SurfaceRecord surf, inout vec3 color ) {

		color = surf.transmission * surf.color;

		// PDF
		// float F = evaluateFresnelWeight( dot( wo, wh ), surf.eta, surf.f0 );
		// float F = disneyFresnel( wo, wi, wh, surf.f0, surf.eta, surf.metalness );
		// if ( F >= 1.0 ) {

		// 	return 0.0;

		// }

		// return 1.0 / ( 1.0 - F );

		// reverted to previous to transmission. The above was causing black pixels
		float eta = surf.eta;
		float f0 = surf.f0;
		float cosTheta = min( wo.z, 1.0 );
		float sinTheta = sqrt( 1.0 - cosTheta * cosTheta );
		float reflectance = schlickFresnel( cosTheta, f0 );
		bool cannotRefract = eta * sinTheta > 1.0;
		if ( cannotRefract ) {

			return 0.0;

		}

		return 1.0 / ( 1.0 - reflectance );

	}

	vec3 transmissionDirection( vec3 wo, SurfaceRecord surf ) {

		float roughness = surf.filteredRoughness;
		float eta = surf.eta;
		vec3 halfVector = normalize( vec3( 0.0, 0.0, 1.0 ) + sampleSphere( rand2( 13 ) ) * roughness );
		vec3 lightDirection = refract( normalize( - wo ), halfVector, eta );

		if ( surf.thinFilm ) {

			lightDirection = - refract( normalize( - lightDirection ), - vec3( 0.0, 0.0, 1.0 ), 1.0 / eta );

		}
		return normalize( lightDirection );

	}

	// clearcoat
	float clearcoatEval( vec3 wo, vec3 wi, vec3 wh, SurfaceRecord surf, inout vec3 color ) {

		float ior = 1.5;
		float f0 = iorRatioToF0( ior );
		bool frontFace = surf.frontFace;
		float roughness = surf.filteredClearcoatRoughness;

		float eta = frontFace ? 1.0 / ior : ior;
		float G = ggxShadowMaskG2( wi, wo, roughness );
		float D = ggxDistribution( wh, roughness );
		float F = schlickFresnel( dot( wi, wh ), f0 );

		float fClearcoat = F * D * G / ( 4.0 * abs( wi.z * wo.z ) );
		color = color * ( 1.0 - surf.clearcoat * F ) + fClearcoat * surf.clearcoat * wi.z;

		// PDF
		// See equation (27) in http://jcgt.org/published/0003/02/03/
		return ggxPDF( wo, wh, roughness ) / ( 4.0 * dot( wi, wh ) );

	}

	vec3 clearcoatDirection( vec3 wo, SurfaceRecord surf ) {

		// sample ggx vndf distribution which gives a new normal
		float roughness = surf.filteredClearcoatRoughness;
		vec3 halfVector = ggxDirection(
			wo,
			vec2( roughness ),
			rand2( 14 )
		);

		// apply to new ray by reflecting off the new normal
		return - reflect( wo, halfVector );

	}

	// sheen
	vec3 sheenColor( vec3 wo, vec3 wi, vec3 wh, SurfaceRecord surf ) {

		float cosThetaO = saturateCos( wo.z );
		float cosThetaI = saturateCos( wi.z );
		float cosThetaH = wh.z;

		float D = velvetD( cosThetaH, surf.sheenRoughness );
		float G = velvetG( cosThetaO, cosThetaI, surf.sheenRoughness );

		// See equation (1) in http://www.aconty.com/pdf/s2017_pbs_imageworks_sheen.pdf
		vec3 color = surf.sheenColor;
		color *= D * G / ( 4.0 * abs( cosThetaO * cosThetaI ) );
		color *= wi.z;

		return color;

	}

	// bsdf
	void getLobeWeights(
		vec3 wo, vec3 wi, vec3 wh, vec3 clearcoatWo, SurfaceRecord surf,
		inout float diffuseWeight, inout float specularWeight, inout float transmissionWeight, inout float clearcoatWeight
	) {

		float metalness = surf.metalness;
		float transmission = surf.transmission;
		// float fEstimate = evaluateFresnelWeight( dot( wo, wh ), surf.eta, surf.f0 );
		float fEstimate = disneyFresnel( wo, wi, wh, surf.f0, surf.eta, surf.metalness );

		float transSpecularProb = mix( max( 0.25, fEstimate ), 1.0, metalness );
		float diffSpecularProb = 0.5 + 0.5 * metalness;

		diffuseWeight = ( 1.0 - transmission ) * ( 1.0 - diffSpecularProb );
		specularWeight = transmission * transSpecularProb + ( 1.0 - transmission ) * diffSpecularProb;
		transmissionWeight = transmission * ( 1.0 - transSpecularProb );
		clearcoatWeight = surf.clearcoat * schlickFresnel( clearcoatWo.z, 0.04 );

		float totalWeight = diffuseWeight + specularWeight + transmissionWeight + clearcoatWeight;
		diffuseWeight /= totalWeight;
		specularWeight /= totalWeight;
		transmissionWeight /= totalWeight;
		clearcoatWeight /= totalWeight;
	}

	float bsdfEval(
		vec3 wo, vec3 clearcoatWo, vec3 wi, vec3 clearcoatWi, SurfaceRecord surf,
		float diffuseWeight, float specularWeight, float transmissionWeight, float clearcoatWeight, inout float specularPdf, inout vec3 color
	) {

		float metalness = surf.metalness;
		float transmission = surf.transmission;

		float spdf = 0.0;
		float dpdf = 0.0;
		float tpdf = 0.0;
		float cpdf = 0.0;
		color = vec3( 0.0 );

		vec3 halfVector = getHalfVector( wi, wo, surf.eta );

		// diffuse
		if ( diffuseWeight > 0.0 && wi.z > 0.0 ) {

			dpdf = diffuseEval( wo, wi, halfVector, surf, color );
			color *= 1.0 - surf.transmission;

		}

		// ggx specular
		if ( specularWeight > 0.0 && wi.z > 0.0 ) {

			vec3 outColor;
			spdf = specularEval( wo, wi, getHalfVector( wi, wo ), surf, outColor );
			color += outColor;

		}

		// transmission
		if ( transmissionWeight > 0.0 && wi.z < 0.0 ) {

			tpdf = transmissionEval( wo, wi, halfVector, surf, color );

		}

		// sheen
		color *= mix( 1.0, sheenAlbedoScaling( wo, wi, surf ), surf.sheen );
		color += sheenColor( wo, wi, halfVector, surf ) * surf.sheen;

		// clearcoat
		if ( clearcoatWi.z >= 0.0 && clearcoatWeight > 0.0 ) {

			vec3 clearcoatHalfVector = getHalfVector( clearcoatWo, clearcoatWi );
			cpdf = clearcoatEval( clearcoatWo, clearcoatWi, clearcoatHalfVector, surf, color );

		}

		float pdf =
			dpdf * diffuseWeight
			+ spdf * specularWeight
			+ tpdf * transmissionWeight
			+ cpdf * clearcoatWeight;

		// retrieve specular rays for the shadows flag
		specularPdf = spdf * specularWeight + cpdf * clearcoatWeight;

		return pdf;

	}

	float bsdfResult( vec3 worldWo, vec3 worldWi, SurfaceRecord surf, inout vec3 color ) {

		if ( surf.volumeParticle ) {

			color = surf.color / ( 4.0 * PI );
			return 1.0 / ( 4.0 * PI );

		}

		vec3 wo = normalize( surf.normalInvBasis * worldWo );
		vec3 wi = normalize( surf.normalInvBasis * worldWi );

		vec3 clearcoatWo = normalize( surf.clearcoatInvBasis * worldWo );
		vec3 clearcoatWi = normalize( surf.clearcoatInvBasis * worldWi );

		vec3 wh = getHalfVector( wo, wi, surf.eta );
		float diffuseWeight;
		float specularWeight;
		float transmissionWeight;
		float clearcoatWeight;
		getLobeWeights( wo, wi, wh, clearcoatWo, surf, diffuseWeight, specularWeight, transmissionWeight, clearcoatWeight );

		float specularPdf;
		return bsdfEval( wo, clearcoatWo, wi, clearcoatWi, surf, diffuseWeight, specularWeight, transmissionWeight, clearcoatWeight, specularPdf, color );

	}

	ScatterRecord bsdfSample( vec3 worldWo, SurfaceRecord surf ) {

		if ( surf.volumeParticle ) {

			ScatterRecord sampleRec;
			sampleRec.specularPdf = 0.0;
			sampleRec.pdf = 1.0 / ( 4.0 * PI );
			sampleRec.direction = sampleSphere( rand2( 16 ) );
			sampleRec.color = surf.color / ( 4.0 * PI );
			return sampleRec;

		}

		vec3 wo = normalize( surf.normalInvBasis * worldWo );
		vec3 clearcoatWo = normalize( surf.clearcoatInvBasis * worldWo );
		mat3 normalBasis = surf.normalBasis;
		mat3 invBasis = surf.normalInvBasis;
		mat3 clearcoatNormalBasis = surf.clearcoatBasis;
		mat3 clearcoatInvBasis = surf.clearcoatInvBasis;

		float diffuseWeight;
		float specularWeight;
		float transmissionWeight;
		float clearcoatWeight;
		// using normal and basically-reflected ray since we don't have proper half vector here
		getLobeWeights( wo, wo, vec3( 0, 0, 1 ), clearcoatWo, surf, diffuseWeight, specularWeight, transmissionWeight, clearcoatWeight );

		float pdf[4];
		pdf[0] = diffuseWeight;
		pdf[1] = specularWeight;
		pdf[2] = transmissionWeight;
		pdf[3] = clearcoatWeight;

		float cdf[4];
		cdf[0] = pdf[0];
		cdf[1] = pdf[1] + cdf[0];
		cdf[2] = pdf[2] + cdf[1];
		cdf[3] = pdf[3] + cdf[2];

		if( cdf[3] != 0.0 ) {

			float invMaxCdf = 1.0 / cdf[3];
			cdf[0] *= invMaxCdf;
			cdf[1] *= invMaxCdf;
			cdf[2] *= invMaxCdf;
			cdf[3] *= invMaxCdf;

		} else {

			cdf[0] = 1.0;
			cdf[1] = 0.0;
			cdf[2] = 0.0;
			cdf[3] = 0.0;

		}

		vec3 wi;
		vec3 clearcoatWi;

		float r = rand( 15 );
		if ( r <= cdf[0] ) { // diffuse

			wi = diffuseDirection( wo, surf );
			clearcoatWi = normalize( clearcoatInvBasis * normalize( normalBasis * wi ) );

		} else if ( r <= cdf[1] ) { // specular

			wi = specularDirection( wo, surf );
			clearcoatWi = normalize( clearcoatInvBasis * normalize( normalBasis * wi ) );

		} else if ( r <= cdf[2] ) { // transmission / refraction

			wi = transmissionDirection( wo, surf );
			clearcoatWi = normalize( clearcoatInvBasis * normalize( normalBasis * wi ) );

		} else if ( r <= cdf[3] ) { // clearcoat

			clearcoatWi = clearcoatDirection( clearcoatWo, surf );
			wi = normalize( invBasis * normalize( clearcoatNormalBasis * clearcoatWi ) );

		}

		ScatterRecord result;
		result.pdf = bsdfEval( wo, clearcoatWo, wi, clearcoatWi, surf, diffuseWeight, specularWeight, transmissionWeight, clearcoatWeight, result.specularPdf, result.color );
		result.direction = normalize( surf.normalBasis * wi );

		return result;

	}

`,Nsr=`

	// returns the hit distance given the material density
	float intersectFogVolume( Material material, float u ) {

		// https://raytracing.github.io/books/RayTracingTheNextWeek.html#volumes/constantdensitymediums
		return material.opacity == 0.0 ? INFINITY : ( - 1.0 / material.opacity ) * log( u );

	}

	ScatterRecord sampleFogVolume( SurfaceRecord surf, vec2 uv ) {

		ScatterRecord sampleRec;
		sampleRec.specularPdf = 0.0;
		sampleRec.pdf = 1.0 / ( 2.0 * PI );
		sampleRec.direction = sampleSphere( uv );
		sampleRec.color = surf.color;
		return sampleRec;

	}

`,Fsr=`

	// The GGX functions provide sampling and distribution information for normals as output so
	// in order to get probability of scatter direction the half vector must be computed and provided.
	// [0] https://www.cs.cornell.edu/~srm/publications/EGSR07-btdf.pdf
	// [1] https://hal.archives-ouvertes.fr/hal-01509746/document
	// [2] http://jcgt.org/published/0007/04/01/
	// [4] http://jcgt.org/published/0003/02/03/

	// trowbridge-reitz === GGX === GTR

	vec3 ggxDirection( vec3 incidentDir, vec2 roughness, vec2 uv ) {

		// TODO: try GGXVNDF implementation from reference [2], here. Needs to update ggxDistribution
		// function below, as well

		// Implementation from reference [1]
		// stretch view
		vec3 V = normalize( vec3( roughness * incidentDir.xy, incidentDir.z ) );

		// orthonormal basis
		vec3 T1 = ( V.z < 0.9999 ) ? normalize( cross( V, vec3( 0.0, 0.0, 1.0 ) ) ) : vec3( 1.0, 0.0, 0.0 );
		vec3 T2 = cross( T1, V );

		// sample point with polar coordinates (r, phi)
		float a = 1.0 / ( 1.0 + V.z );
		float r = sqrt( uv.x );
		float phi = ( uv.y < a ) ? uv.y / a * PI : PI + ( uv.y - a ) / ( 1.0 - a ) * PI;
		float P1 = r * cos( phi );
		float P2 = r * sin( phi ) * ( ( uv.y < a ) ? 1.0 : V.z );

		// compute normal
		vec3 N = P1 * T1 + P2 * T2 + V * sqrt( max( 0.0, 1.0 - P1 * P1 - P2 * P2 ) );

		// unstretch
		N = normalize( vec3( roughness * N.xy, max( 0.0, N.z ) ) );

		return N;

	}

	// Below are PDF and related functions for use in a Monte Carlo path tracer
	// as specified in Appendix B of the following paper
	// See equation (34) from reference [0]
	float ggxLamda( float theta, float roughness ) {

		float tanTheta = tan( theta );
		float tanTheta2 = tanTheta * tanTheta;
		float alpha2 = roughness * roughness;

		float numerator = - 1.0 + sqrt( 1.0 + alpha2 * tanTheta2 );
		return numerator / 2.0;

	}

	// See equation (34) from reference [0]
	float ggxShadowMaskG1( float theta, float roughness ) {

		return 1.0 / ( 1.0 + ggxLamda( theta, roughness ) );

	}

	// See equation (125) from reference [4]
	float ggxShadowMaskG2( vec3 wi, vec3 wo, float roughness ) {

		float incidentTheta = acos( wi.z );
		float scatterTheta = acos( wo.z );
		return 1.0 / ( 1.0 + ggxLamda( incidentTheta, roughness ) + ggxLamda( scatterTheta, roughness ) );

	}

	// See equation (33) from reference [0]
	float ggxDistribution( vec3 halfVector, float roughness ) {

		float a2 = roughness * roughness;
		a2 = max( EPSILON, a2 );
		float cosTheta = halfVector.z;
		float cosTheta4 = pow( cosTheta, 4.0 );

		if ( cosTheta == 0.0 ) return 0.0;

		float theta = acosSafe( halfVector.z );
		float tanTheta = tan( theta );
		float tanTheta2 = pow( tanTheta, 2.0 );

		float denom = PI * cosTheta4 * pow( a2 + tanTheta2, 2.0 );
		return ( a2 / denom );

	}

	// See equation (3) from reference [2]
	float ggxPDF( vec3 wi, vec3 halfVector, float roughness ) {

		float incidentTheta = acos( wi.z );
		float D = ggxDistribution( halfVector, roughness );
		float G1 = ggxShadowMaskG1( incidentTheta, roughness );

		return D * G1 * max( 0.0, dot( wi, halfVector ) ) / wi.z;

	}

`,zsr=`

	// XYZ to sRGB color space
	const mat3 XYZ_TO_REC709 = mat3(
		3.2404542, -0.9692660,  0.0556434,
		-1.5371385,  1.8760108, -0.2040259,
		-0.4985314,  0.0415560,  1.0572252
	);

	vec3 fresnel0ToIor( vec3 fresnel0 ) {

		vec3 sqrtF0 = sqrt( fresnel0 );
		return ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );

	}

	// Conversion FO/IOR
	vec3 iorToFresnel0( vec3 transmittedIor, float incidentIor ) {

		return square( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );

	}

	// ior is a value between 1.0 and 3.0. 1.0 is air interface
	float iorToFresnel0( float transmittedIor, float incidentIor ) {

		return square( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ) );

	}

	// Fresnel equations for dielectric/dielectric interfaces. See https://belcour.github.io/blog/research/2017/05/01/brdf-thin-film.html
	vec3 evalSensitivity( float OPD, vec3 shift ) {

		float phase = 2.0 * PI * OPD * 1.0e-9;

		vec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );
		vec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );
		vec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );

		vec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - square( phase ) * var );
		xyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * square( phase ) );
		xyz /= 1.0685e-7;

		vec3 srgb = XYZ_TO_REC709 * xyz;
		return srgb;

	}

	// See Section 4. Analytic Spectral Integration, A Practical Extension to Microfacet Theory for the Modeling of Varying Iridescence, https://hal.archives-ouvertes.fr/hal-01518344/document
	vec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {

		vec3 I;

		// Force iridescenceIor -> outsideIOR when thinFilmThickness -> 0.0
		float iridescenceIor = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );

		// Evaluate the cosTheta on the base layer (Snell law)
		float sinTheta2Sq = square( outsideIOR / iridescenceIor ) * ( 1.0 - square( cosTheta1 ) );

		// Handle TIR:
		float cosTheta2Sq = 1.0 - sinTheta2Sq;
		if ( cosTheta2Sq < 0.0 ) {

			return vec3( 1.0 );

		}

		float cosTheta2 = sqrt( cosTheta2Sq );

		// First interface
		float R0 = iorToFresnel0( iridescenceIor, outsideIOR );
		float R12 = schlickFresnel( cosTheta1, R0 );
		float R21 = R12;
		float T121 = 1.0 - R12;
		float phi12 = 0.0;
		if ( iridescenceIor < outsideIOR ) {

			phi12 = PI;

		}

		float phi21 = PI - phi12;

		// Second interface
		vec3 baseIOR = fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) ); // guard against 1.0
		vec3 R1 = iorToFresnel0( baseIOR, iridescenceIor );
		vec3 R23 = schlickFresnel( cosTheta2, R1 );
		vec3 phi23 = vec3( 0.0 );
		if ( baseIOR[0] < iridescenceIor ) {

			phi23[ 0 ] = PI;

		}

		if ( baseIOR[1] < iridescenceIor ) {

			phi23[ 1 ] = PI;

		}

		if ( baseIOR[2] < iridescenceIor ) {

			phi23[ 2 ] = PI;

		}

		// Phase shift
		float OPD = 2.0 * iridescenceIor * thinFilmThickness * cosTheta2;
		vec3 phi = vec3( phi21 ) + phi23;

		// Compound terms
		vec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );
		vec3 r123 = sqrt( R123 );
		vec3 Rs = square( T121 ) * R23 / ( vec3( 1.0 ) - R123 );

		// Reflectance term for m = 0 (DC term amplitude)
		vec3 C0 = R12 + Rs;
		I = C0;

		// Reflectance term for m > 0 (pairs of diracs)
		vec3 Cm = Rs - T121;
		for ( int m = 1; m <= 2; ++ m ) {

			Cm *= r123;
			vec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );
			I += Cm * Sm;

		}

		// Since out of gamut colors might be produced, negative color values are clamped to 0.
		return max( I, vec3( 0.0 ) );

	}

`,Bsr=`

	// See equation (2) in http://www.aconty.com/pdf/s2017_pbs_imageworks_sheen.pdf
	float velvetD( float cosThetaH, float roughness ) {

		float alpha = max( roughness, 0.07 );
		alpha = alpha * alpha;

		float invAlpha = 1.0 / alpha;

		float sqrCosThetaH = cosThetaH * cosThetaH;
		float sinThetaH = max( 1.0 - sqrCosThetaH, 0.001 );

		return ( 2.0 + invAlpha ) * pow( sinThetaH, 0.5 * invAlpha ) / ( 2.0 * PI );

	}

	float velvetParamsInterpolate( int i, float oneMinusAlphaSquared ) {

		const float p0[5] = float[5]( 25.3245, 3.32435, 0.16801, -1.27393, -4.85967 );
		const float p1[5] = float[5]( 21.5473, 3.82987, 0.19823, -1.97760, -4.32054 );

		return mix( p1[i], p0[i], oneMinusAlphaSquared );

	}

	float velvetL( float x, float alpha ) {

		float oneMinusAlpha = 1.0 - alpha;
		float oneMinusAlphaSquared = oneMinusAlpha * oneMinusAlpha;

		float a = velvetParamsInterpolate( 0, oneMinusAlphaSquared );
		float b = velvetParamsInterpolate( 1, oneMinusAlphaSquared );
		float c = velvetParamsInterpolate( 2, oneMinusAlphaSquared );
		float d = velvetParamsInterpolate( 3, oneMinusAlphaSquared );
		float e = velvetParamsInterpolate( 4, oneMinusAlphaSquared );

		return a / ( 1.0 + b * pow( abs( x ), c ) ) + d * x + e;

	}

	// See equation (3) in http://www.aconty.com/pdf/s2017_pbs_imageworks_sheen.pdf
	float velvetLambda( float cosTheta, float alpha ) {

		return abs( cosTheta ) < 0.5 ? exp( velvetL( cosTheta, alpha ) ) : exp( 2.0 * velvetL( 0.5, alpha ) - velvetL( 1.0 - cosTheta, alpha ) );

	}

	// See Section 3, Shadowing Term, in http://www.aconty.com/pdf/s2017_pbs_imageworks_sheen.pdf
	float velvetG( float cosThetaO, float cosThetaI, float roughness ) {

		float alpha = max( roughness, 0.07 );
		alpha = alpha * alpha;

		return 1.0 / ( 1.0 + velvetLambda( cosThetaO, alpha ) + velvetLambda( cosThetaI, alpha ) );

	}

	float directionalAlbedoSheen( float cosTheta, float alpha ) {

		cosTheta = saturate( cosTheta );

		float c = 1.0 - cosTheta;
		float c3 = c * c * c;

		return 0.65584461 * c3 + 1.0 / ( 4.16526551 + exp( -7.97291361 * sqrt( alpha ) + 6.33516894 ) );

	}

	float sheenAlbedoScaling( vec3 wo, vec3 wi, SurfaceRecord surf ) {

		float alpha = max( surf.sheenRoughness, 0.07 );
		alpha = alpha * alpha;

		float maxSheenColor = max( max( surf.sheenColor.r, surf.sheenColor.g ), surf.sheenColor.b );

		float eWo = directionalAlbedoSheen( saturateCos( wo.z ), alpha );
		float eWi = directionalAlbedoSheen( saturateCos( wi.z ), alpha );

		return min( 1.0 - maxSheenColor * eWo, 1.0 - maxSheenColor * eWi );

	}

	// See Section 5, Layering, in http://www.aconty.com/pdf/s2017_pbs_imageworks_sheen.pdf
	float sheenAlbedoScaling( vec3 wo, SurfaceRecord surf ) {

		float alpha = max( surf.sheenRoughness, 0.07 );
		alpha = alpha * alpha;

		float maxSheenColor = max( max( surf.sheenColor.r, surf.sheenColor.g ), surf.sheenColor.b );

		float eWo = directionalAlbedoSheen( saturateCos( wo.z ), alpha );

		return 1.0 - maxSheenColor * eWo;

	}

`,Usr=`

#ifndef FOG_CHECK_ITERATIONS
#define FOG_CHECK_ITERATIONS 30
#endif

// returns whether the given material is a fog material or not
bool isMaterialFogVolume( sampler2D materials, uint materialIndex ) {

	uint i = materialIndex * 45u;
	vec4 s14 = texelFetch1D( materials, i + 14u );
	return bool( int( s14.b ) & 4 );

}

// returns true if we're within the first fog volume we hit
bool bvhIntersectFogVolumeHit(
	vec3 rayOrigin, vec3 rayDirection,
	usampler2D materialIndexAttribute, sampler2D materials,
	inout Material material
) {

	material.fogVolume = false;

	for ( int i = 0; i < FOG_CHECK_ITERATIONS; i ++ ) {

		// find nearest hit
		uvec4 faceIndices = uvec4( 0u );
		vec3 faceNormal = vec3( 0.0, 0.0, 1.0 );
		vec3 barycoord = vec3( 0.0 );
		float side = 1.0;
		float dist = 0.0;
		bool hit = bvhIntersectFirstHit( bvh, rayOrigin, rayDirection, faceIndices, faceNormal, barycoord, side, dist );
		if ( hit ) {

			// if it's a fog volume return whether we hit the front or back face
			uint materialIndex = uTexelFetch1D( materialIndexAttribute, faceIndices.x ).r;
			if ( isMaterialFogVolume( materials, materialIndex ) ) {

				material = readMaterialInfo( materials, materialIndex );
				return side == - 1.0;

			} else {

				// move the ray forward
				rayOrigin = stepRayOrigin( rayOrigin, rayDirection, - faceNormal, dist );

			}

		} else {

			return false;

		}

	}

	return false;

}

`,Hsr=`

	// step through multiple surface hits and accumulate color attenuation based on transmissive surfaces
	// returns true if a solid surface was hit
	bool attenuateHit(
		RenderState state,
		Ray ray, float rayDist,
		out vec3 color
	) {

		// store the original bounce index so we can reset it after
		uint originalBounceIndex = sobolBounceIndex;

		int traversals = state.traversals;
		int transmissiveTraversals = state.transmissiveTraversals;
		bool isShadowRay = state.isShadowRay;
		Material fogMaterial = state.fogMaterial;

		vec3 startPoint = ray.origin;

		// hit results
		SurfaceHit surfaceHit;

		color = vec3( 1.0 );

		bool result = true;
		for ( int i = 0; i < traversals; i ++ ) {

			sobolBounceIndex ++;

			int hitType = traceScene( ray, fogMaterial, surfaceHit );

			if ( hitType == FOG_HIT ) {

				result = true;
				break;

			} else if ( hitType == SURFACE_HIT ) {

				float totalDist = distance( startPoint, ray.origin + ray.direction * surfaceHit.dist );
				if ( totalDist > rayDist ) {

					result = false;
					break;

				}

				// TODO: attenuate the contribution based on the PDF of the resulting ray including refraction values
				// Should be able to work using the material BSDF functions which will take into account specularity, etc.
				// TODO: should we account for emissive surfaces here?

				uint materialIndex = uTexelFetch1D( materialIndexAttribute, surfaceHit.faceIndices.x ).r;
				Material material = readMaterialInfo( materials, materialIndex );

				// adjust the ray to the new surface
				bool isEntering = surfaceHit.side == 1.0;
				ray.origin = stepRayOrigin( ray.origin, ray.direction, - surfaceHit.faceNormal, surfaceHit.dist );

				#if FEATURE_FOG

				if ( material.fogVolume ) {

					fogMaterial = material;
					fogMaterial.fogVolume = surfaceHit.side == 1.0;
					i -= sign( transmissiveTraversals );
					transmissiveTraversals --;
					continue;

				}

				#endif

				if ( ! material.castShadow && isShadowRay ) {

					continue;

				}

				vec2 uv = textureSampleBarycoord( attributesArray, ATTR_UV, surfaceHit.barycoord, surfaceHit.faceIndices.xyz ).xy;
				vec4 vertexColor = textureSampleBarycoord( attributesArray, ATTR_COLOR, surfaceHit.barycoord, surfaceHit.faceIndices.xyz );

				// albedo
				vec4 albedo = vec4( material.color, material.opacity );
				if ( material.map != - 1 ) {

					vec3 uvPrime = material.mapTransform * vec3( uv, 1 );
					albedo *= texture2D( textures, vec3( uvPrime.xy, material.map ) );

				}

				if ( material.vertexColors ) {

					albedo *= vertexColor;

				}

				// alphaMap
				if ( material.alphaMap != - 1 ) {

					albedo.a *= texture2D( textures, vec3( uv, material.alphaMap ) ).x;

				}

				// transmission
				float transmission = material.transmission;
				if ( material.transmissionMap != - 1 ) {

					vec3 uvPrime = material.transmissionMapTransform * vec3( uv, 1 );
					transmission *= texture2D( textures, vec3( uvPrime.xy, material.transmissionMap ) ).r;

				}

				// metalness
				float metalness = material.metalness;
				if ( material.metalnessMap != - 1 ) {

					vec3 uvPrime = material.metalnessMapTransform * vec3( uv, 1 );
					metalness *= texture2D( textures, vec3( uvPrime.xy, material.metalnessMap ) ).b;

				}

				float alphaTest = material.alphaTest;
				bool useAlphaTest = alphaTest != 0.0;
				float transmissionFactor = ( 1.0 - metalness ) * transmission;
				if (
					transmissionFactor < rand( 9 ) && ! (
						// material sidedness
						material.side != 0.0 && surfaceHit.side == material.side

						// alpha test
						|| useAlphaTest && albedo.a < alphaTest

						// opacity
						|| material.transparent && ! useAlphaTest && albedo.a < rand( 10 )
					)
				) {

					result = true;
					break;

				}

				if ( surfaceHit.side == 1.0 && isEntering ) {

					// only attenuate by surface color on the way in
					color *= mix( vec3( 1.0 ), albedo.rgb, transmissionFactor );

				} else if ( surfaceHit.side == - 1.0 ) {

					// attenuate by medium once we hit the opposite side of the model
					color *= transmissionAttenuation( surfaceHit.dist, material.attenuationColor, material.attenuationDistance );

				}

				bool isTransmissiveRay = dot( ray.direction, surfaceHit.faceNormal * surfaceHit.side ) < 0.0;
				if ( ( isTransmissiveRay || isEntering ) && transmissiveTraversals > 0 ) {

					i -= sign( transmissiveTraversals );
					transmissiveTraversals --;

				}

			} else {

				result = false;
				break;

			}

		}

		// reset the bounce index
		sobolBounceIndex = originalBounceIndex;
		return result;

	}

`,jsr=`

	vec3 ndcToRayOrigin( vec2 coord ) {

		vec4 rayOrigin4 = cameraWorldMatrix * invProjectionMatrix * vec4( coord, - 1.0, 1.0 );
		return rayOrigin4.xyz / rayOrigin4.w;
	}

	Ray getCameraRay() {

		vec2 ssd = vec2( 1.0 ) / resolution;

		// Jitter the camera ray by finding a uv coordinate at a random sample
		// around this pixel's UV coordinate for AA
		vec2 ruv = rand2( 0 );
		vec2 jitteredUv = vUv + vec2( tentFilter( ruv.x ) * ssd.x, tentFilter( ruv.y ) * ssd.y );
		Ray ray;

		#if CAMERA_TYPE == 2

			// Equirectangular projection
			vec4 rayDirection4 = vec4( equirectUvToDirection( jitteredUv ), 0.0 );
			vec4 rayOrigin4 = vec4( 0.0, 0.0, 0.0, 1.0 );

			rayDirection4 = cameraWorldMatrix * rayDirection4;
			rayOrigin4 = cameraWorldMatrix * rayOrigin4;

			ray.direction = normalize( rayDirection4.xyz );
			ray.origin = rayOrigin4.xyz / rayOrigin4.w;

		#else

			// get [- 1, 1] normalized device coordinates
			vec2 ndc = 2.0 * jitteredUv - vec2( 1.0 );
			ray.origin = ndcToRayOrigin( ndc );

			#if CAMERA_TYPE == 1

				// Orthographic projection
				ray.direction = ( cameraWorldMatrix * vec4( 0.0, 0.0, - 1.0, 0.0 ) ).xyz;
				ray.direction = normalize( ray.direction );

			#else

				// Perspective projection
				ray.direction = normalize( mat3( cameraWorldMatrix ) * ( invProjectionMatrix * vec4( ndc, 0.0, 1.0 ) ).xyz );

			#endif

		#endif

		#if FEATURE_DOF
		{

			// depth of field
			vec3 focalPoint = ray.origin + normalize( ray.direction ) * physicalCamera.focusDistance;

			// get the aperture sample
			// if blades === 0 then we assume a circle
			vec3 shapeUVW= rand3( 1 );
			int blades = physicalCamera.apertureBlades;
			float anamorphicRatio = physicalCamera.anamorphicRatio;
			vec2 apertureSample = blades == 0 ? sampleCircle( shapeUVW.xy ) : sampleRegularPolygon( blades, shapeUVW );
			apertureSample *= physicalCamera.bokehSize * 0.5 * 1e-3;

			// rotate the aperture shape
			apertureSample =
				rotateVector( apertureSample, physicalCamera.apertureRotation ) *
				saturate( vec2( anamorphicRatio, 1.0 / anamorphicRatio ) );

			// create the new ray
			ray.origin += ( cameraWorldMatrix * vec4( apertureSample, 0.0, 0.0 ) ).xyz;
			ray.direction = focalPoint - ray.origin;

		}
		#endif

		ray.direction = normalize( ray.direction );

		return ray;

	}

`,Vsr=`

	vec3 directLightContribution( vec3 worldWo, SurfaceRecord surf, RenderState state, vec3 rayOrigin ) {

		vec3 result = vec3( 0.0 );

		// uniformly pick a light or environment map
		if( lightsDenom != 0.0 && rand( 5 ) < float( lights.count ) / lightsDenom ) {

			// sample a light or environment
			LightRecord lightRec = randomLightSample( lights.tex, iesProfiles, lights.count, rayOrigin, rand3( 6 ) );

			bool isSampleBelowSurface = ! surf.volumeParticle && dot( surf.faceNormal, lightRec.direction ) < 0.0;
			if ( isSampleBelowSurface ) {

				lightRec.pdf = 0.0;

			}

			// check if a ray could even reach the light area
			Ray lightRay;
			lightRay.origin = rayOrigin;
			lightRay.direction = lightRec.direction;
			vec3 attenuatedColor;
			if (
				lightRec.pdf > 0.0 &&
				isDirectionValid( lightRec.direction, surf.normal, surf.faceNormal ) &&
				! attenuateHit( state, lightRay, lightRec.dist, attenuatedColor )
			) {

				// get the material pdf
				vec3 sampleColor;
				float lightMaterialPdf = bsdfResult( worldWo, lightRec.direction, surf, sampleColor );
				bool isValidSampleColor = all( greaterThanEqual( sampleColor, vec3( 0.0 ) ) );
				if ( lightMaterialPdf > 0.0 && isValidSampleColor ) {

					// weight the direct light contribution
					float lightPdf = lightRec.pdf / lightsDenom;
					float misWeight = lightRec.type == SPOT_LIGHT_TYPE || lightRec.type == DIR_LIGHT_TYPE || lightRec.type == POINT_LIGHT_TYPE ? 1.0 : misHeuristic( lightPdf, lightMaterialPdf );
					result = attenuatedColor * lightRec.emission * state.throughputColor * sampleColor * misWeight / lightPdf;

				}

			}

		} else if ( envMapInfo.totalSum != 0.0 && environmentIntensity != 0.0 ) {

			// find a sample in the environment map to include in the contribution
			vec3 envColor, envDirection;
			float envPdf = sampleEquirectProbability( rand2( 7 ), envColor, envDirection );
			envDirection = invEnvRotation3x3 * envDirection;

			// this env sampling is not set up for transmissive sampling and yields overly bright
			// results so we ignore the sample in this case.
			// TODO: this should be improved but how? The env samples could traverse a few layers?
			bool isSampleBelowSurface = ! surf.volumeParticle && dot( surf.faceNormal, envDirection ) < 0.0;
			if ( isSampleBelowSurface ) {

				envPdf = 0.0;

			}

			// check if a ray could even reach the surface
			Ray envRay;
			envRay.origin = rayOrigin;
			envRay.direction = envDirection;
			vec3 attenuatedColor;
			if (
				envPdf > 0.0 &&
				isDirectionValid( envDirection, surf.normal, surf.faceNormal ) &&
				! attenuateHit( state, envRay, INFINITY, attenuatedColor )
			) {

				// get the material pdf
				vec3 sampleColor;
				float envMaterialPdf = bsdfResult( worldWo, envDirection, surf, sampleColor );
				bool isValidSampleColor = all( greaterThanEqual( sampleColor, vec3( 0.0 ) ) );
				if ( envMaterialPdf > 0.0 && isValidSampleColor ) {

					// weight the direct light contribution
					envPdf /= lightsDenom;
					float misWeight = misHeuristic( envPdf, envMaterialPdf );
					result = attenuatedColor * environmentIntensity * envColor * state.throughputColor * sampleColor * misWeight / envPdf;

				}

			}

		}

		// Function changed to have a single return statement to potentially help with crashes on Mac OS.
		// See issue #470
		return result;

	}

`,qsr=`

	#define SKIP_SURFACE 0
	#define HIT_SURFACE 1
	int getSurfaceRecord(
		Material material, SurfaceHit surfaceHit, sampler2DArray attributesArray,
		float accumulatedRoughness,
		inout SurfaceRecord surf
	) {

		if ( material.fogVolume ) {

			vec3 normal = vec3( 0, 0, 1 );

			SurfaceRecord fogSurface;
			fogSurface.volumeParticle = true;
			fogSurface.color = material.color;
			fogSurface.emission = material.emissiveIntensity * material.emissive;
			fogSurface.normal = normal;
			fogSurface.faceNormal = normal;
			fogSurface.clearcoatNormal = normal;

			surf = fogSurface;
			return HIT_SURFACE;

		}

		// uv coord for textures
		vec2 uv = textureSampleBarycoord( attributesArray, ATTR_UV, surfaceHit.barycoord, surfaceHit.faceIndices.xyz ).xy;
		vec4 vertexColor = textureSampleBarycoord( attributesArray, ATTR_COLOR, surfaceHit.barycoord, surfaceHit.faceIndices.xyz );

		// albedo
		vec4 albedo = vec4( material.color, material.opacity );
		if ( material.map != - 1 ) {

			vec3 uvPrime = material.mapTransform * vec3( uv, 1 );
			albedo *= texture2D( textures, vec3( uvPrime.xy, material.map ) );

		}

		if ( material.vertexColors ) {

			albedo *= vertexColor;

		}

		// alphaMap
		if ( material.alphaMap != - 1 ) {

			albedo.a *= texture2D( textures, vec3( uv, material.alphaMap ) ).x;

		}

		// possibly skip this sample if it's transparent, alpha test is enabled, or we hit the wrong material side
		// and it's single sided.
		// - alpha test is disabled when it === 0
		// - the material sidedness test is complicated because we want light to pass through the back side but still
		// be able to see the front side. This boolean checks if the side we hit is the front side on the first ray
		// and we're rendering the other then we skip it. Do the opposite on subsequent bounces to get incoming light.
		float alphaTest = material.alphaTest;
		bool useAlphaTest = alphaTest != 0.0;
		if (
			// material sidedness
			material.side != 0.0 && surfaceHit.side != material.side

			// alpha test
			|| useAlphaTest && albedo.a < alphaTest

			// opacity
			|| material.transparent && ! useAlphaTest && albedo.a < rand( 3 )
		) {

			return SKIP_SURFACE;

		}

		// fetch the interpolated smooth normal
		vec3 normal = normalize( textureSampleBarycoord(
			attributesArray,
			ATTR_NORMAL,
			surfaceHit.barycoord,
			surfaceHit.faceIndices.xyz
		).xyz );

		// roughness
		float roughness = material.roughness;
		if ( material.roughnessMap != - 1 ) {

			vec3 uvPrime = material.roughnessMapTransform * vec3( uv, 1 );
			roughness *= texture2D( textures, vec3( uvPrime.xy, material.roughnessMap ) ).g;

		}

		// metalness
		float metalness = material.metalness;
		if ( material.metalnessMap != - 1 ) {

			vec3 uvPrime = material.metalnessMapTransform * vec3( uv, 1 );
			metalness *= texture2D( textures, vec3( uvPrime.xy, material.metalnessMap ) ).b;

		}

		// emission
		vec3 emission = material.emissiveIntensity * material.emissive;
		if ( material.emissiveMap != - 1 ) {

			vec3 uvPrime = material.emissiveMapTransform * vec3( uv, 1 );
			emission *= texture2D( textures, vec3( uvPrime.xy, material.emissiveMap ) ).xyz;

		}

		// transmission
		float transmission = material.transmission;
		if ( material.transmissionMap != - 1 ) {

			vec3 uvPrime = material.transmissionMapTransform * vec3( uv, 1 );
			transmission *= texture2D( textures, vec3( uvPrime.xy, material.transmissionMap ) ).r;

		}

		// normal
		if ( material.flatShading ) {

			// if we're rendering a flat shaded object then use the face normals - the face normal
			// is provided based on the side the ray hits the mesh so flip it to align with the
			// interpolated vertex normals.
			normal = surfaceHit.faceNormal * surfaceHit.side;

		}

		vec3 baseNormal = normal;
		if ( material.normalMap != - 1 ) {

			vec4 tangentSample = textureSampleBarycoord(
				attributesArray,
				ATTR_TANGENT,
				surfaceHit.barycoord,
				surfaceHit.faceIndices.xyz
			);

			// some provided tangents can be malformed (0, 0, 0) causing the normal to be degenerate
			// resulting in NaNs and slow path tracing.
			if ( length( tangentSample.xyz ) > 0.0 ) {

				vec3 tangent = normalize( tangentSample.xyz );
				vec3 bitangent = normalize( cross( normal, tangent ) * tangentSample.w );
				mat3 vTBN = mat3( tangent, bitangent, normal );

				vec3 uvPrime = material.normalMapTransform * vec3( uv, 1 );
				vec3 texNormal = texture2D( textures, vec3( uvPrime.xy, material.normalMap ) ).xyz * 2.0 - 1.0;
				texNormal.xy *= material.normalScale;
				normal = vTBN * texNormal;

			}

		}

		normal *= surfaceHit.side;

		// clearcoat
		float clearcoat = material.clearcoat;
		if ( material.clearcoatMap != - 1 ) {

			vec3 uvPrime = material.clearcoatMapTransform * vec3( uv, 1 );
			clearcoat *= texture2D( textures, vec3( uvPrime.xy, material.clearcoatMap ) ).r;

		}

		// clearcoatRoughness
		float clearcoatRoughness = material.clearcoatRoughness;
		if ( material.clearcoatRoughnessMap != - 1 ) {

			vec3 uvPrime = material.clearcoatRoughnessMapTransform * vec3( uv, 1 );
			clearcoatRoughness *= texture2D( textures, vec3( uvPrime.xy, material.clearcoatRoughnessMap ) ).g;

		}

		// clearcoatNormal
		vec3 clearcoatNormal = baseNormal;
		if ( material.clearcoatNormalMap != - 1 ) {

			vec4 tangentSample = textureSampleBarycoord(
				attributesArray,
				ATTR_TANGENT,
				surfaceHit.barycoord,
				surfaceHit.faceIndices.xyz
			);

			// some provided tangents can be malformed (0, 0, 0) causing the normal to be degenerate
			// resulting in NaNs and slow path tracing.
			if ( length( tangentSample.xyz ) > 0.0 ) {

				vec3 tangent = normalize( tangentSample.xyz );
				vec3 bitangent = normalize( cross( clearcoatNormal, tangent ) * tangentSample.w );
				mat3 vTBN = mat3( tangent, bitangent, clearcoatNormal );

				vec3 uvPrime = material.clearcoatNormalMapTransform * vec3( uv, 1 );
				vec3 texNormal = texture2D( textures, vec3( uvPrime.xy, material.clearcoatNormalMap ) ).xyz * 2.0 - 1.0;
				texNormal.xy *= material.clearcoatNormalScale;
				clearcoatNormal = vTBN * texNormal;

			}

		}

		clearcoatNormal *= surfaceHit.side;

		// sheenColor
		vec3 sheenColor = material.sheenColor;
		if ( material.sheenColorMap != - 1 ) {

			vec3 uvPrime = material.sheenColorMapTransform * vec3( uv, 1 );
			sheenColor *= texture2D( textures, vec3( uvPrime.xy, material.sheenColorMap ) ).rgb;

		}

		// sheenRoughness
		float sheenRoughness = material.sheenRoughness;
		if ( material.sheenRoughnessMap != - 1 ) {

			vec3 uvPrime = material.sheenRoughnessMapTransform * vec3( uv, 1 );
			sheenRoughness *= texture2D( textures, vec3( uvPrime.xy, material.sheenRoughnessMap ) ).a;

		}

		// iridescence
		float iridescence = material.iridescence;
		if ( material.iridescenceMap != - 1 ) {

			vec3 uvPrime = material.iridescenceMapTransform * vec3( uv, 1 );
			iridescence *= texture2D( textures, vec3( uvPrime.xy, material.iridescenceMap ) ).r;

		}

		// iridescence thickness
		float iridescenceThickness = material.iridescenceThicknessMaximum;
		if ( material.iridescenceThicknessMap != - 1 ) {

			vec3 uvPrime = material.iridescenceThicknessMapTransform * vec3( uv, 1 );
			float iridescenceThicknessSampled = texture2D( textures, vec3( uvPrime.xy, material.iridescenceThicknessMap ) ).g;
			iridescenceThickness = mix( material.iridescenceThicknessMinimum, material.iridescenceThicknessMaximum, iridescenceThicknessSampled );

		}

		iridescence = iridescenceThickness == 0.0 ? 0.0 : iridescence;

		// specular color
		vec3 specularColor = material.specularColor;
		if ( material.specularColorMap != - 1 ) {

			vec3 uvPrime = material.specularColorMapTransform * vec3( uv, 1 );
			specularColor *= texture2D( textures, vec3( uvPrime.xy, material.specularColorMap ) ).rgb;

		}

		// specular intensity
		float specularIntensity = material.specularIntensity;
		if ( material.specularIntensityMap != - 1 ) {

			vec3 uvPrime = material.specularIntensityMapTransform * vec3( uv, 1 );
			specularIntensity *= texture2D( textures, vec3( uvPrime.xy, material.specularIntensityMap ) ).a;

		}

		surf.volumeParticle = false;

		surf.faceNormal = surfaceHit.faceNormal;
		surf.normal = normal;

		surf.metalness = metalness;
		surf.color = albedo.rgb;
		surf.emission = emission;

		surf.ior = material.ior;
		surf.transmission = transmission;
		surf.thinFilm = material.thinFilm;
		surf.attenuationColor = material.attenuationColor;
		surf.attenuationDistance = material.attenuationDistance;

		surf.clearcoatNormal = clearcoatNormal;
		surf.clearcoat = clearcoat;

		surf.sheen = material.sheen;
		surf.sheenColor = sheenColor;

		surf.iridescence = iridescence;
		surf.iridescenceIor = material.iridescenceIor;
		surf.iridescenceThickness = iridescenceThickness;

		surf.specularColor = specularColor;
		surf.specularIntensity = specularIntensity;

		// apply perceptual roughness factor from gltf. sheen perceptual roughness is
		// applied by its brdf function
		// https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#microfacet-surfaces
		surf.roughness = roughness * roughness;
		surf.clearcoatRoughness = clearcoatRoughness * clearcoatRoughness;
		surf.sheenRoughness = sheenRoughness;

		// frontFace is used to determine transmissive properties and PDF. If no transmission is used
		// then we can just always assume this is a front face.
		surf.frontFace = surfaceHit.side == 1.0 || transmission == 0.0;
		surf.eta = material.thinFilm || surf.frontFace ? 1.0 / material.ior : material.ior;
		surf.f0 = iorRatioToF0( surf.eta );

		// Compute the filtered roughness value to use during specular reflection computations.
		// The accumulated roughness value is scaled by a user setting and a "magic value" of 5.0.
		// If we're exiting something transmissive then scale the factor down significantly so we can retain
		// sharp internal reflections
		surf.filteredRoughness = applyFilteredGlossy( surf.roughness, accumulatedRoughness );
		surf.filteredClearcoatRoughness = applyFilteredGlossy( surf.clearcoatRoughness, accumulatedRoughness );

		// get the normal frames
		surf.normalBasis = getBasisFromNormal( surf.normal );
		surf.normalInvBasis = inverse( surf.normalBasis );

		surf.clearcoatBasis = getBasisFromNormal( surf.clearcoatNormal );
		surf.clearcoatInvBasis = inverse( surf.clearcoatBasis );

		return HIT_SURFACE;

	}
`,Gsr=`

	struct Ray {

		vec3 origin;
		vec3 direction;

	};

	struct SurfaceHit {

		uvec4 faceIndices;
		vec3 barycoord;
		vec3 faceNormal;
		float side;
		float dist;

	};

	struct RenderState {

		bool firstRay;
		bool transmissiveRay;
		bool isShadowRay;
		float accumulatedRoughness;
		int transmissiveTraversals;
		int traversals;
		uint depth;
		vec3 throughputColor;
		Material fogMaterial;

	};

	RenderState initRenderState() {

		RenderState result;
		result.firstRay = true;
		result.transmissiveRay = true;
		result.isShadowRay = false;
		result.accumulatedRoughness = 0.0;
		result.transmissiveTraversals = 0;
		result.traversals = 0;
		result.throughputColor = vec3( 1.0 );
		result.depth = 0u;
		result.fogMaterial.fogVolume = false;
		return result;

	}

`,$sr=`

	#define NO_HIT 0
	#define SURFACE_HIT 1
	#define LIGHT_HIT 2
	#define FOG_HIT 3

	// Passing the global variable 'lights' into this function caused shader program errors.
	// So global variables like 'lights' and 'bvh' were moved out of the function parameters.
	// For more information, refer to: https://github.com/gkjohnson/three-gpu-pathtracer/pull/457
	int traceScene(
		Ray ray, Material fogMaterial, inout SurfaceHit surfaceHit
	) {

		int result = NO_HIT;
		bool hit = bvhIntersectFirstHit( bvh, ray.origin, ray.direction, surfaceHit.faceIndices, surfaceHit.faceNormal, surfaceHit.barycoord, surfaceHit.side, surfaceHit.dist );

		#if FEATURE_FOG

		if ( fogMaterial.fogVolume ) {

			// offset the distance so we don't run into issues with particles on the same surface
			// as other objects
			float particleDist = intersectFogVolume( fogMaterial, rand( 1 ) );
			if ( particleDist + RAY_OFFSET < surfaceHit.dist ) {

				surfaceHit.side = 1.0;
				surfaceHit.faceNormal = normalize( - ray.direction );
				surfaceHit.dist = particleDist;
				return FOG_HIT;

			}

		}

		#endif

		if ( hit ) {

			result = SURFACE_HIT;

		}

		return result;

	}

`;class Wsr extends S1e{onBeforeRender(){this.setDefine("FEATURE_DOF",this.physicalCamera.bokehSize===0?0:1),this.setDefine("FEATURE_BACKGROUND_MAP",this.backgroundMap?1:0),this.setDefine("FEATURE_FOG",this.materials.features.isUsed("FOG")?1:0)}constructor(e){super({transparent:!0,depthWrite:!1,defines:{FEATURE_MIS:1,FEATURE_RUSSIAN_ROULETTE:1,FEATURE_DOF:1,FEATURE_BACKGROUND_MAP:0,FEATURE_FOG:1,RANDOM_TYPE:2,CAMERA_TYPE:0,DEBUG_MODE:0,ATTR_NORMAL:0,ATTR_TANGENT:1,ATTR_UV:2,ATTR_COLOR:3},uniforms:{resolution:{value:new sl},opacity:{value:1},bounces:{value:10},transmissiveBounces:{value:10},filterGlossyFactor:{value:0},physicalCamera:{value:new Vor},cameraWorldMatrix:{value:new Rc},invProjectionMatrix:{value:new Rc},bvh:{value:new Kir},attributesArray:{value:new tsr},materialIndexAttribute:{value:new FYe},materials:{value:new ssr},textures:{value:new K4e().texture},lights:{value:new Qor},iesProfiles:{value:new K4e(360,180,{type:Og,wrapS:Ng,wrapT:Ng}).texture},environmentIntensity:{value:1},environmentRotation:{value:new Rc},envMapInfo:{value:new $or},backgroundBlur:{value:0},backgroundMap:{value:null},backgroundAlpha:{value:1},backgroundIntensity:{value:1},backgroundRotation:{value:new Rc},seed:{value:0},sobolTexture:{value:null},stratifiedTexture:{value:new vsr},stratifiedOffsetTexture:{value:new _sr(64,1)}},vertexShader:`

				varying vec2 vUv;
				void main() {

					vec4 mvPosition = vec4( position, 1.0 );
					mvPosition = modelViewMatrix * mvPosition;
					gl_Position = projectionMatrix * mvPosition;

					vUv = uv;

				}

			`,fragmentShader:`
				#define RAY_OFFSET 1e-4
				#define INFINITY 1e20

				precision highp isampler2D;
				precision highp usampler2D;
				precision highp sampler2DArray;
				vec4 envMapTexelToLinear( vec4 a ) { return a; }
				#include <common>

				// bvh intersection
				${ear}
				${rar}
				${tar}

				// uniform structs
				${wsr}
				${Tsr}
				${Ssr}
				${Esr}
				${Asr}

				// random
				#if RANDOM_TYPE == 2 	// Stratified List

					${Lsr}

				#elif RANDOM_TYPE == 1 	// Sobol

					${Q4e}
					${rXe}
					${Bor}

					#define rand(v) sobol(v)
					#define rand2(v) sobol2(v)
					#define rand3(v) sobol3(v)
					#define rand4(v) sobol4(v)

				#else 					// PCG

				${Q4e}

					// Using the sobol functions seems to break the the compiler on MacOS
					// - specifically the "sobolReverseBits" function.
					uint sobolPixelIndex = 0u;
					uint sobolPathIndex = 0u;
					uint sobolBounceIndex = 0u;

					#define rand(v) pcgRand()
					#define rand2(v) pcgRand2()
					#define rand3(v) pcgRand3()
					#define rand4(v) pcgRand4()

				#endif

				// common
				${Dsr}
				${ksr}
				${iXe}
				${Isr}
				${Psr}

				// environment
				uniform EquirectHdrInfo envMapInfo;
				uniform mat4 environmentRotation;
				uniform float environmentIntensity;

				// lighting
				uniform sampler2DArray iesProfiles;
				uniform LightsInfo lights;

				// background
				uniform float backgroundBlur;
				uniform float backgroundAlpha;
				#if FEATURE_BACKGROUND_MAP

				uniform sampler2D backgroundMap;
				uniform mat4 backgroundRotation;
				uniform float backgroundIntensity;

				#endif

				// camera
				uniform mat4 cameraWorldMatrix;
				uniform mat4 invProjectionMatrix;
				#if FEATURE_DOF

				uniform PhysicalCamera physicalCamera;

				#endif

				// geometry
				uniform sampler2DArray attributesArray;
				uniform usampler2D materialIndexAttribute;
				uniform sampler2D materials;
				uniform sampler2DArray textures;
				uniform BVH bvh;

				// path tracer
				uniform int bounces;
				uniform int transmissiveBounces;
				uniform float filterGlossyFactor;
				uniform int seed;

				// image
				uniform vec2 resolution;
				uniform float opacity;

				varying vec2 vUv;

				// globals
				mat3 envRotation3x3;
				mat3 invEnvRotation3x3;
				float lightsDenom;

				// sampling
				${Rsr}
				${Csr}
				${Msr}

				${Usr}
				${Fsr}
				${Bsr}
				${zsr}
				${Nsr}
				${Osr}

				float applyFilteredGlossy( float roughness, float accumulatedRoughness ) {

					return clamp(
						max(
							roughness,
							accumulatedRoughness * filterGlossyFactor * 5.0 ),
						0.0,
						1.0
					);

				}

				vec3 sampleBackground( vec3 direction, vec2 uv ) {

					vec3 sampleDir = sampleHemisphere( direction, uv ) * 0.5 * backgroundBlur;

					#if FEATURE_BACKGROUND_MAP

					sampleDir = normalize( mat3( backgroundRotation ) * direction + sampleDir );
					return backgroundIntensity * sampleEquirectColor( backgroundMap, sampleDir );

					#else

					sampleDir = normalize( envRotation3x3 * direction + sampleDir );
					return environmentIntensity * sampleEquirectColor( envMapInfo.map, sampleDir );

					#endif

				}

				${Gsr}
				${jsr}
				${$sr}
				${Hsr}
				${Vsr}
				${qsr}

				void main() {

					// init
					rng_initialize( gl_FragCoord.xy, seed );
					sobolPixelIndex = ( uint( gl_FragCoord.x ) << 16 ) | uint( gl_FragCoord.y );
					sobolPathIndex = uint( seed );

					// get camera ray
					Ray ray = getCameraRay();

					// inverse environment rotation
					envRotation3x3 = mat3( environmentRotation );
					invEnvRotation3x3 = inverse( envRotation3x3 );
					lightsDenom =
						( environmentIntensity == 0.0 || envMapInfo.totalSum == 0.0 ) && lights.count != 0u ?
							float( lights.count ) :
							float( lights.count + 1u );

					// final color
					gl_FragColor = vec4( 0, 0, 0, 1 );

					// surface results
					SurfaceHit surfaceHit;
					ScatterRecord scatterRec;

					// path tracing state
					RenderState state = initRenderState();
					state.transmissiveTraversals = transmissiveBounces;
					#if FEATURE_FOG

					state.fogMaterial.fogVolume = bvhIntersectFogVolumeHit(
						ray.origin, - ray.direction,
						materialIndexAttribute, materials,
						state.fogMaterial
					);

					#endif

					for ( int i = 0; i < bounces; i ++ ) {

						sobolBounceIndex ++;

						state.depth ++;
						state.traversals = bounces - i;
						state.firstRay = i == 0 && state.transmissiveTraversals == transmissiveBounces;

						int hitType = traceScene( ray, state.fogMaterial, surfaceHit );

						// check if we intersect any lights and accumulate the light contribution
						// TODO: we can add support for light surface rendering in the else condition if we
						// add the ability to toggle visibility of the the light
						if ( ! state.firstRay && ! state.transmissiveRay ) {

							LightRecord lightRec;
							float lightDist = hitType == NO_HIT ? INFINITY : surfaceHit.dist;
							for ( uint i = 0u; i < lights.count; i ++ ) {

								if (
									intersectLightAtIndex( lights.tex, ray.origin, ray.direction, i, lightRec ) &&
									lightRec.dist < lightDist
								) {

									#if FEATURE_MIS

									// weight the contribution
									// NOTE: Only area lights are supported for forward sampling and can be hit
									float misWeight = misHeuristic( scatterRec.pdf, lightRec.pdf / lightsDenom );
									gl_FragColor.rgb += lightRec.emission * state.throughputColor * misWeight;

									#else

									gl_FragColor.rgb += lightRec.emission * state.throughputColor;

									#endif

								}

							}

						}

						if ( hitType == NO_HIT ) {

							if ( state.firstRay || state.transmissiveRay ) {

								gl_FragColor.rgb += sampleBackground( ray.direction, rand2( 2 ) ) * state.throughputColor;
								gl_FragColor.a = backgroundAlpha;

							} else {

								#if FEATURE_MIS

								// get the PDF of the hit envmap point
								vec3 envColor;
								float envPdf = sampleEquirect( envRotation3x3 * ray.direction, envColor );
								envPdf /= lightsDenom;

								// and weight the contribution
								float misWeight = misHeuristic( scatterRec.pdf, envPdf );
								gl_FragColor.rgb += environmentIntensity * envColor * state.throughputColor * misWeight;

								#else

								gl_FragColor.rgb +=
									environmentIntensity *
									sampleEquirectColor( envMapInfo.map, envRotation3x3 * ray.direction ) *
									state.throughputColor;

								#endif

							}
							break;

						}

						uint materialIndex = uTexelFetch1D( materialIndexAttribute, surfaceHit.faceIndices.x ).r;
						Material material = readMaterialInfo( materials, materialIndex );

						#if FEATURE_FOG

						if ( hitType == FOG_HIT ) {

							material = state.fogMaterial;
							state.accumulatedRoughness += 0.2;

						} else if ( material.fogVolume ) {

							state.fogMaterial = material;
							state.fogMaterial.fogVolume = surfaceHit.side == 1.0;

							ray.origin = stepRayOrigin( ray.origin, ray.direction, - surfaceHit.faceNormal, surfaceHit.dist );

							i -= sign( state.transmissiveTraversals );
							state.transmissiveTraversals -= sign( state.transmissiveTraversals );
							continue;

						}

						#endif

						// early out if this is a matte material
						if ( material.matte && state.firstRay ) {

							gl_FragColor = vec4( 0.0 );
							break;

						}

						// if we've determined that this is a shadow ray and we've hit an item with no shadow casting
						// then skip it
						if ( ! material.castShadow && state.isShadowRay ) {

							ray.origin = stepRayOrigin( ray.origin, ray.direction, - surfaceHit.faceNormal, surfaceHit.dist );
							continue;

						}

						SurfaceRecord surf;
						if (
							getSurfaceRecord(
								material, surfaceHit, attributesArray, state.accumulatedRoughness,
								surf
							) == SKIP_SURFACE
						) {

							// only allow a limited number of transparency discards otherwise we could
							// crash the context with too long a loop.
							i -= sign( state.transmissiveTraversals );
							state.transmissiveTraversals -= sign( state.transmissiveTraversals );

							ray.origin = stepRayOrigin( ray.origin, ray.direction, - surfaceHit.faceNormal, surfaceHit.dist );
							continue;

						}

						scatterRec = bsdfSample( - ray.direction, surf );
						state.isShadowRay = scatterRec.specularPdf < rand( 4 );

						bool isBelowSurface = ! surf.volumeParticle && dot( scatterRec.direction, surf.faceNormal ) < 0.0;
						vec3 hitPoint = stepRayOrigin( ray.origin, ray.direction, isBelowSurface ? - surf.faceNormal : surf.faceNormal, surfaceHit.dist );

						// next event estimation
						#if FEATURE_MIS

						gl_FragColor.rgb += directLightContribution( - ray.direction, surf, state, hitPoint );

						#endif

						// accumulate a roughness value to offset diffuse, specular, diffuse rays that have high contribution
						// to a single pixel resulting in fireflies
						// TODO: handle transmissive surfaces
						if ( ! surf.volumeParticle && ! isBelowSurface ) {

							// determine if this is a rough normal or not by checking how far off straight up it is
							vec3 halfVector = normalize( - ray.direction + scatterRec.direction );
							state.accumulatedRoughness += max(
								sin( acosApprox( dot( halfVector, surf.normal ) ) ),
								sin( acosApprox( dot( halfVector, surf.clearcoatNormal ) ) )
							);

							state.transmissiveRay = false;

						}

						// accumulate emissive color
						gl_FragColor.rgb += ( surf.emission * state.throughputColor );

						// skip the sample if our PDF or ray is impossible
						if ( scatterRec.pdf <= 0.0 || ! isDirectionValid( scatterRec.direction, surf.normal, surf.faceNormal ) ) {

							break;

						}

						// if we're bouncing around the inside a transmissive material then decrement
						// perform this separate from a bounce
						bool isTransmissiveRay = ! surf.volumeParticle && dot( scatterRec.direction, surf.faceNormal * surfaceHit.side ) < 0.0;
						if ( ( isTransmissiveRay || isBelowSurface ) && state.transmissiveTraversals > 0 ) {

							state.transmissiveTraversals --;
							i --;

						}

						//

						// handle throughput color transformation
						// attenuate the throughput color by the medium color
						if ( ! surf.frontFace ) {

							state.throughputColor *= transmissionAttenuation( surfaceHit.dist, surf.attenuationColor, surf.attenuationDistance );

						}

						#if FEATURE_RUSSIAN_ROULETTE

						// russian roulette path termination
						// https://www.arnoldrenderer.com/research/physically_based_shader_design_in_arnold.pdf
						uint minBounces = 3u;
						float depthProb = float( state.depth < minBounces );

						float rrProb = luminance( state.throughputColor * scatterRec.color / scatterRec.pdf );
						rrProb /= luminance( state.throughputColor );
						rrProb = sqrt( rrProb );
						rrProb = max( rrProb, depthProb );
						rrProb = min( rrProb, 1.0 );
						if ( rand( 8 ) > rrProb ) {

							break;

						}

						// perform sample clamping here to avoid bright pixels
						state.throughputColor *= min( 1.0 / rrProb, 20.0 );

						#endif

						// adjust the throughput and discard and exit if we find discard the sample if there are any NaNs
						state.throughputColor *= scatterRec.color / scatterRec.pdf;
						if ( any( isnan( state.throughputColor ) ) || any( isinf( state.throughputColor ) ) ) {

							break;

						}

						//

						// prepare for next ray
						ray.direction = scatterRec.direction;
						ray.origin = hitPoint;

					}

					gl_FragColor.a *= opacity;

					#if DEBUG_MODE == 1

					// output the number of rays checked in the path and number of
					// transmissive rays encountered.
					gl_FragColor.rgb = vec3(
						float( state.depth ),
						transmissiveBounces - state.transmissiveTraversals,
						0.0
					);
					gl_FragColor.a = 1.0;

					#endif

				}

			`}),this.setValues(e)}}function*Ysr(){const{_renderer:t,_fsQuad:e,_blendQuad:r,_primaryTarget:n,_blendTargets:i,_sobolTarget:a,_subframe:o,alpha:s,material:d}=this,b=new dh,L=new dh,B=r.material;let[V,X]=i;for(;;){s?(B.opacity=this._opacityFactor/(this.samples+1),d.blending=V2,d.opacity=1):(d.opacity=this._opacityFactor/(this.samples+1),d.blending=Ak);const[ie,de,ae,U]=o,ve=n.width,Se=n.height;d.resolution.set(ve*ae,Se*U),d.sobolTexture=a.texture,d.stratifiedTexture.init(20,d.bounces+d.transmissiveBounces+5),d.stratifiedTexture.next(),d.seed++;const Pe=this.tiles.x||1,Me=this.tiles.y||1,Ie=Pe*Me,Ve=Math.ceil(ve*ae),Ze=Math.ceil(Se*U),Je=Math.floor(ie*ve),nt=Math.floor(de*Se),ut=Math.ceil(Ve/Pe),ht=Math.ceil(Ze/Me);for(let _t=0;_t<Me;_t++)for(let Dt=0;Dt<Pe;Dt++){const qt=t.getRenderTarget(),Lt=t.autoClear,dr=t.getScissorTest();t.getScissor(b),t.getViewport(L);let Zt=Dt,Cr=_t;if(!this.stableTiles){const Vt=this._currentTile%(Pe*Me);Zt=Vt%Pe,Cr=~~(Vt/Pe),this._currentTile=Vt+1}const yt=Me-Cr-1;n.scissor.set(Je+Zt*ut,nt+yt*ht,Math.min(ut,Ve-Zt*ut),Math.min(ht,Ze-yt*ht)),n.viewport.set(Je,nt,Ve,Ze),t.setRenderTarget(n),t.setScissorTest(!0),t.autoClear=!1,e.render(t),t.setViewport(L),t.setScissor(b),t.setScissorTest(dr),t.setRenderTarget(qt),t.autoClear=Lt,s&&(B.target1=V.texture,B.target2=n.texture,t.setRenderTarget(X),r.render(t),t.setRenderTarget(qt)),this.samples+=1/Ie,Dt===Pe-1&&_t===Me-1&&(this.samples=Math.round(this.samples)),yield}[V,X]=[X,V]}}const eDe=new Wu;let tDe=class{get material(){return this._fsQuad.material}set material(e){this._fsQuad.material.removeEventListener("recompilation",this._compileFunction),e.addEventListener("recompilation",this._compileFunction),this._fsQuad.material=e}get target(){return this._alpha?this._blendTargets[1]:this._primaryTarget}set alpha(e){this._alpha!==e&&(e||(this._blendTargets[0].dispose(),this._blendTargets[1].dispose()),this._alpha=e,this.reset())}get alpha(){return this._alpha}get isCompiling(){return!!this._compilePromise}constructor(e){this.camera=null,this.tiles=new sl(3,3),this.stableNoise=!1,this.stableTiles=!0,this.samples=0,this._subframe=new dh(0,0,1,1),this._opacityFactor=1,this._renderer=e,this._alpha=!1,this._fsQuad=new A8(new Wsr),this._blendQuad=new A8(new For),this._task=null,this._currentTile=0,this._compilePromise=null,this._sobolTarget=new Hor().generate(e),this._primaryTarget=new cx(1,1,{format:Rp,type:mp,magFilter:Mp,minFilter:Mp}),this._blendTargets=[new cx(1,1,{format:Rp,type:mp,magFilter:Mp,minFilter:Mp}),new cx(1,1,{format:Rp,type:mp,magFilter:Mp,minFilter:Mp})],this._compileFunction=()=>{const r=this.compileMaterial(this._fsQuad._mesh);r.then(()=>{this._compilePromise===r&&(this._compilePromise=null)}),this._compilePromise=r},this.material.addEventListener("recompilation",this._compileFunction)}compileMaterial(){return this._renderer.compileAsync(this._fsQuad._mesh)}setCamera(e){const{material:r}=this;r.cameraWorldMatrix.copy(e.matrixWorld),r.invProjectionMatrix.copy(e.projectionMatrixInverse),r.physicalCamera.updateFrom(e);let n=0;e.projectionMatrix.elements[15]>0&&(n=1),e.isEquirectCamera&&(n=2),r.setDefine("CAMERA_TYPE",n),this.camera=e}setSize(e,r){e=Math.ceil(e),r=Math.ceil(r),!(this._primaryTarget.width===e&&this._primaryTarget.height===r)&&(this._primaryTarget.setSize(e,r),this._blendTargets[0].setSize(e,r),this._blendTargets[1].setSize(e,r),this.reset())}getSize(e){e.x=this._primaryTarget.width,e.y=this._primaryTarget.height}dispose(){this._primaryTarget.dispose(),this._blendTargets[0].dispose(),this._blendTargets[1].dispose(),this._sobolTarget.dispose(),this._fsQuad.dispose(),this._blendQuad.dispose(),this._task=null}reset(){const{_renderer:e,_primaryTarget:r,_blendTargets:n}=this,i=e.getRenderTarget(),a=e.getClearAlpha();e.getClearColor(eDe),e.setRenderTarget(r),e.setClearColor(0,0),e.clearColor(),e.setRenderTarget(n[0]),e.setClearColor(0,0),e.clearColor(),e.setRenderTarget(n[1]),e.setClearColor(0,0),e.clearColor(),e.setClearColor(eDe,a),e.setRenderTarget(i),this.samples=0,this._task=null,this.material.stratifiedTexture.stableNoise=this.stableNoise,this.stableNoise&&(this.material.seed=0,this.material.stratifiedTexture.reset())}update(){this.material.onBeforeRender(),!this.isCompiling&&(this._task||(this._task=Ysr.call(this)),this._task.next())}};const OD=new sl,rDe=new sl,kq=new MW,Iq=new Wu;class Xsr extends $y{constructor(e=512,r=512){super(new Float32Array(e*r*4),e,r,Rp,mp,r4,sE,Ng,vp,vp),this.generationCallback=null}update(){this.dispose(),this.needsUpdate=!0;const{data:e,width:r,height:n}=this.image;for(let i=0;i<r;i++)for(let a=0;a<n;a++){rDe.set(r,n),OD.set(i/r,a/n),OD.x-=.5,OD.y=1-OD.y,kq.theta=OD.x*2*Math.PI,kq.phi=OD.y*Math.PI,kq.radius=1,this.generationCallback(kq,OD,rDe,Iq);const s=4*(a*r+i);e[s+0]=Iq.r,e[s+1]=Iq.g,e[s+2]=Iq.b,e[s+3]=1}}copy(e){return super.copy(e),this.generationCallback=e.generationCallback,this}}const nDe=new oi;class Zsr extends Xsr{constructor(e=512){super(e,e),this.topColor=new Wu().set(16777215),this.bottomColor=new Wu().set(0),this.exponent=2,this.generationCallback=(r,n,i,a)=>{nDe.setFromSpherical(r);const o=nDe.y*.5+.5;a.lerpColors(this.bottomColor,this.topColor,o**this.exponent)}}copy(e){return super.copy(e),this.topColor.copy(e.topColor),this.bottomColor.copy(e.bottomColor),this}}class Ksr extends eb{get map(){return this.uniforms.map.value}set map(e){this.uniforms.map.value=e}get opacity(){return this.uniforms.opacity.value}set opacity(e){this.uniforms&&(this.uniforms.opacity.value=e)}constructor(e){super({uniforms:{map:{value:null},opacity:{value:1}},vertexShader:`
				varying vec2 vUv;
				void main() {

					vUv = uv;
					gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );

				}
			`,fragmentShader:`
				uniform sampler2D map;
				uniform float opacity;
				varying vec2 vUv;

				vec4 clampedTexelFatch( sampler2D map, ivec2 px, int lod ) {

					vec4 res = texelFetch( map, ivec2( px.x, px.y ), 0 );

					#if defined( TONE_MAPPING )

					res.xyz = toneMapping( res.xyz );

					#endif

			  		return linearToOutputTexel( res );

				}

				void main() {

					vec2 size = vec2( textureSize( map, 0 ) );
					vec2 pxUv = vUv * size;
					vec2 pxCurr = floor( pxUv );
					vec2 pxFrac = fract( pxUv ) - 0.5;
					vec2 pxOffset;
					pxOffset.x = pxFrac.x > 0.0 ? 1.0 : - 1.0;
					pxOffset.y = pxFrac.y > 0.0 ? 1.0 : - 1.0;

					vec2 pxNext = clamp( pxOffset + pxCurr, vec2( 0.0 ), size - 1.0 );
					vec2 alpha = abs( pxFrac );

					vec4 p1 = mix(
						clampedTexelFatch( map, ivec2( pxCurr.x, pxCurr.y ), 0 ),
						clampedTexelFatch( map, ivec2( pxNext.x, pxCurr.y ), 0 ),
						alpha.x
					);

					vec4 p2 = mix(
						clampedTexelFatch( map, ivec2( pxCurr.x, pxNext.y ), 0 ),
						clampedTexelFatch( map, ivec2( pxNext.x, pxNext.y ), 0 ),
						alpha.x
					);

					gl_FragColor = mix( p1, p2, alpha.y );
					gl_FragColor.a *= opacity;
					#include <premultiplied_alpha_fragment>

				}
			`}),this.setValues(e)}}class Jsr extends eb{constructor(){super({uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:`
				varying vec2 vUv;
				void main() {

					vUv = uv;
					gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );

				}`,fragmentShader:`
				#define ENVMAP_TYPE_CUBE_UV

				uniform samplerCube envMap;
				uniform float flipEnvMap;
				varying vec2 vUv;

				#include <common>
				#include <cube_uv_reflection_fragment>

				${iXe}

				void main() {

					vec3 rayDirection = equirectUvToDirection( vUv );
					rayDirection.x *= flipEnvMap;
					gl_FragColor = textureCube( envMap, rayDirection );

				}`}),this.depthWrite=!1,this.depthTest=!1}}class iDe{constructor(e){this._renderer=e,this._quad=new A8(new Jsr)}generate(e,r=null,n=null){if(!e.isCubeTexture)throw new Error("CubeToEquirectMaterial: Source can only be cube textures.");const i=e.images[0],a=this._renderer,o=this._quad;r===null&&(r=4*i.height),n===null&&(n=2*i.height);const s=new cx(r,n,{type:mp,colorSpace:i.colorSpace}),d=i.height,b=Math.log2(d)-2,L=1/d,B=1/(3*Math.max(Math.pow(2,b),112));o.material.defines.CUBEUV_MAX_MIP=`${b}.0`,o.material.defines.CUBEUV_TEXEL_WIDTH=B,o.material.defines.CUBEUV_TEXEL_HEIGHT=L,o.material.uniforms.envMap.value=e,o.material.uniforms.flipEnvMap.value=e.isRenderTargetTexture?1:-1,o.material.needsUpdate=!0;const V=a.getRenderTarget(),X=a.autoClear;a.autoClear=!0,a.setRenderTarget(s),o.render(a),a.setRenderTarget(V),a.autoClear=X;const ie=new Uint16Array(r*n*4),de=new Float32Array(r*n*4);a.readRenderTargetPixels(s,0,0,r,n,de),s.dispose();for(let U=0,ve=de.length;U<ve;U++)ie[U]=Vw.toHalfFloat(de[U]);const ae=new $y(ie,r,n,Rp,Og);return ae.minFilter=$$,ae.magFilter=vp,ae.wrapS=sE,ae.wrapT=sE,ae.mapping=r4,ae.needsUpdate=!0,ae}dispose(){this._quad.dispose()}}function Qsr(t){return t.extensions.get("EXT_float_blend")}const oN=new sl;class elr{get multipleImportanceSampling(){return!!this._pathTracer.material.defines.FEATURE_MIS}set multipleImportanceSampling(e){this._pathTracer.material.setDefine("FEATURE_MIS",e?1:0)}get transmissiveBounces(){return this._pathTracer.material.transmissiveBounces}set transmissiveBounces(e){this._pathTracer.material.transmissiveBounces=e}get bounces(){return this._pathTracer.material.bounces}set bounces(e){this._pathTracer.material.bounces=e}get filterGlossyFactor(){return this._pathTracer.material.filterGlossyFactor}set filterGlossyFactor(e){this._pathTracer.material.filterGlossyFactor=e}get samples(){return this._pathTracer.samples}get target(){return this._pathTracer.target}get tiles(){return this._pathTracer.tiles}get stableNoise(){return this._pathTracer.stableNoise}set stableNoise(e){this._pathTracer.stableNoise=e}get isCompiling(){return!!this._pathTracer.isCompiling}constructor(e){this._renderer=e,this._generator=new Nor,this._pathTracer=new tDe(e),this._queueReset=!1,this._clock=new dZ,this._compilePromise=null,this._lowResPathTracer=new tDe(e),this._lowResPathTracer.tiles.set(1,1),this._quad=new A8(new Ksr({map:null,transparent:!0,blending:V2,premultipliedAlpha:e.getContextAttributes().premultipliedAlpha})),this._materials=null,this._previousEnvironment=null,this._previousBackground=null,this._internalBackground=null,this.renderDelay=100,this.minSamples=5,this.fadeDuration=500,this.enablePathTracing=!0,this.pausePathTracing=!1,this.dynamicLowRes=!1,this.lowResScale=.25,this.renderScale=1,this.synchronizeRenderSize=!0,this.rasterizeScene=!0,this.renderToCanvas=!0,this.textureSize=new sl(1024,1024),this.rasterizeSceneCallback=(r,n)=>{this._renderer.render(r,n)},this.renderToCanvasCallback=(r,n,i)=>{const a=n.autoClear;n.autoClear=!1,i.render(n),n.autoClear=a},this.setScene(new mF,new sy)}setBVHWorker(e){this._generator.setBVHWorker(e)}setScene(e,r,n={}){e.updateMatrixWorld(!0),r.updateMatrixWorld();const i=this._generator;if(i.setObjects(e),this._buildAsync)return i.generateAsync(n.onProgress).then(a=>this._updateFromResults(e,r,a));{const a=i.generate();return this._updateFromResults(e,r,a)}}setSceneAsync(...e){this._buildAsync=!0;const r=this.setScene(...e);return this._buildAsync=!1,r}setCamera(e){this.camera=e,this.updateCamera()}updateCamera(){const e=this.camera;e.updateMatrixWorld(),this._pathTracer.setCamera(e),this._lowResPathTracer.setCamera(e),this.reset()}updateMaterials(){const e=this._pathTracer.material,r=this._renderer,n=this._materials,i=this.textureSize,a=isr(n);e.textures.setTextures(r,a,i.x,i.y),e.materials.updateFrom(n,a),this.reset()}updateLights(){const e=this.scene,r=this._renderer,n=this._pathTracer.material,i=asr(e),a=nsr(i);n.lights.updateFrom(i,a),n.iesProfiles.setTextures(r,a),this.reset()}updateEnvironment(){const e=this.scene,r=this._pathTracer.material;if(this._internalBackground&&(this._internalBackground.dispose(),this._internalBackground=null),r.backgroundBlur=e.backgroundBlurriness,r.backgroundIntensity=e.backgroundIntensity??1,r.backgroundRotation.makeRotationFromEuler(e.backgroundRotation).invert(),e.background===null)r.backgroundMap=null,r.backgroundAlpha=0;else if(e.background.isColor){this._colorBackground=this._colorBackground||new Zsr(16);const n=this._colorBackground;n.topColor.equals(e.background)||(n.topColor.set(e.background),n.bottomColor.set(e.background),n.update()),r.backgroundMap=n,r.backgroundAlpha=1}else if(e.background.isCubeTexture){if(e.background!==this._previousBackground){const n=new iDe(this._renderer).generate(e.background);this._internalBackground=n,r.backgroundMap=n,r.backgroundAlpha=1}}else r.backgroundMap=e.background,r.backgroundAlpha=1;if(r.environmentIntensity=e.environmentIntensity??1,r.environmentRotation.makeRotationFromEuler(e.environmentRotation).invert(),this._previousEnvironment!==e.environment)if(e.environment!==null)if(e.environment.isCubeTexture){const n=new iDe(this._renderer).generate(e.environment);r.envMapInfo.updateFrom(n)}else r.envMapInfo.updateFrom(e.environment);else r.environmentIntensity=0;this._previousEnvironment=e.environment,this._previousBackground=e.background,this.reset()}_updateFromResults(e,r,n){const{materials:i,geometry:a,bvh:o,bvhChanged:s}=n;this._materials=i;const b=this._pathTracer.material;return s&&(b.bvh.updateFrom(o),b.attributesArray.updateFrom(a.attributes.normal,a.attributes.tangent,a.attributes.uv,a.attributes.color),b.materialIndexAttribute.updateFrom(a.attributes.materialIndex)),this._previousScene=e,this.scene=e,this.camera=r,this.updateCamera(),this.updateMaterials(),this.updateEnvironment(),this.updateLights(),n}renderSample(){const e=this._lowResPathTracer,r=this._pathTracer,n=this._renderer,i=this._clock,a=this._quad;this._updateScale(),this._queueReset&&(r.reset(),e.reset(),this._queueReset=!1,a.material.opacity=0,i.start());const o=i.getDelta()*1e3,s=i.getElapsedTime()*1e3;if(!this.pausePathTracing&&this.enablePathTracing&&this.renderDelay<=s&&!this.isCompiling&&r.update(),r.alpha=r.material.backgroundAlpha!==1||!Qsr(n),e.alpha=r.alpha,this.renderToCanvas){const d=this._renderer,b=this.minSamples;if(s>=this.renderDelay&&this.samples>=this.minSamples&&(this.fadeDuration!==0?a.material.opacity=Math.min(a.material.opacity+o/this.fadeDuration,1):a.material.opacity=1),!this.enablePathTracing||this.samples<b||a.material.opacity<1){if(this.dynamicLowRes&&!this.isCompiling){e.samples<1&&(e.material=r.material,e.update());const L=a.material.opacity;a.material.opacity=1-a.material.opacity,a.material.map=e.target.texture,a.render(d),a.material.opacity=L}(!this.dynamicLowRes&&this.rasterizeScene||this.dynamicLowRes&&this.isCompiling)&&this.rasterizeSceneCallback(this.scene,this.camera)}this.enablePathTracing&&a.material.opacity>0&&(a.material.opacity<1&&(a.material.blending=this.dynamicLowRes?N$:Ak),a.material.map=r.target.texture,this.renderToCanvasCallback(r.target,d,a),a.material.blending=V2)}}reset(){this._queueReset=!0,this._pathTracer.samples=0}dispose(){this._renderQuad.dispose(),this._renderQuad.material.dispose(),this._pathTracer.dispose()}_updateScale(){if(this.synchronizeRenderSize){this._renderer.getDrawingBufferSize(oN);const e=Math.floor(this.renderScale*oN.x),r=Math.floor(this.renderScale*oN.y);if(this._pathTracer.getSize(oN),oN.x!==e||oN.y!==r){const n=this.lowResScale;this._pathTracer.setSize(e,r),this._lowResPathTracer.setSize(Math.floor(e*n),Math.floor(r*n))}}}}const aXe=wi.createContext(null),tlr=wi.forwardRef(({children:t,enabled:e=!0,minSamples:r=1,samples:n=32,bounces:i=4,resolutionFactor:a=1,renderPriority:o=1,filteredGlossyFactor:s=0,renderDelay:d=0,fadeDuration:b=0,dynamicLowRes:L=!0,lowResScale:B=.25,textureSize:V=[1024,1024],rasterizeScene:X=!1,tiles:ie=[3,3],...de},ae)=>{const{gl:U,camera:ve,scene:Se,controls:Pe}=Km(),Me=ze.useMemo(()=>{const Ve=new elr(U);return Ve.synchronizeRenderSize=!0,Ve},[U]);wi.useImperativeHandle(ae,()=>Me,[Me]),wi.useLayoutEffect(()=>{OC(Me,{bounces:i,filteredGlossyFactor:s,renderDelay:d,fadeDuration:b,minSamples:r,dynamicLowRes:L,lowResScale:B,rasterizeScene:X,textureSize:V,tiles:ie}),Me.renderScale=a,Me.reset()},[de,a,i,r,Me]),wi.useEffect(()=>{e&&Me.reset()},[e]);const Ie=wi.useMemo(()=>({update:()=>{Me.setScene(Se,ve)},reset:()=>{Me.reset()},renderer:Me,pathtracer:Me}),[Me,Se,ve]);return wi.useLayoutEffect(()=>{Me.setScene(Se,ve)},[Se,ve]),wi.useLayoutEffect(()=>{const Ve=()=>{Me.updateCamera()};return Pe&&Pe.addEventListener("change",Ve),()=>{Pe&&Pe.removeEventListener("change",Ve)}},[Pe,Me]),o6(({camera:Ve,gl:Ze,scene:Je})=>{e&&Me.samples<(n??1/0)&&Me.renderSample(),e||Ze.render(Je,Ve)},1),Ke.jsx(aXe.Provider,{value:Ie,children:t})});function rlr(){const t=wi.useContext(aXe);if(!t)throw new Error("usePathtracer must be used within a Pathtracer");return t}function nlr({settings:t}){const e=rh(o=>o.pathtracingNeedsUpdate),r=rh(o=>o.clearPathtracingUpdate),n=rh(o=>o.currentFrame),{update:i}=rlr(),a=ze.useRef(!0);return ze.useEffect(()=>{e&&i&&(i(),r())},[e,i,r]),ze.useEffect(()=>{if(a.current){a.current=!1;return}i&&i()},[n,i]),ze.useEffect(()=>{a.current||i&&i()},[t.samples,t.min_samples,t.bounces,t.tiles,t.environment_preset,t.environment_intensity,t.environment_blur,t.environment_background,i]),null}function ilr({settings:t,children:e}){if(!t)return Ke.jsx(Ke.Fragment,{children:e});const{enabled:r=!1,min_samples:n=1,samples:i=256,bounces:a=3,tiles:o=1,environment_preset:s="studio",environment_intensity:d=1,environment_blur:b=0,environment_background:L=!1}=t;return r?Ke.jsxs(tlr,{minSamples:n,samples:i,bounces:a,tiles:o,enabled:!0,children:[Ke.jsx(nlr,{settings:t}),s!=="none"&&Ke.jsx(xar,{preset:s,background:L,backgroundBlurriness:b,environmentIntensity:d}),e]}):Ke.jsx(Ke.Fragment,{children:e})}class uk extends ze.Component{constructor(e){super(e),this.state={hasError:!1,error:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,r){console.error(`Error in geometry "${this.props.geometryKey}":`,e,`
Stack:`,e.stack,`
Component Stack:`,r.componentStack)}render(){return this.state.hasError?(console.warn(`Geometry "${this.props.geometryKey}" failed to render and was removed from the scene.`),null):this.props.children}}function alr(){const{roomId:t,userId:e,geometries:r,activeCurveForDrawing:n,setActiveCurveForDrawing:i,attachedCameraKey:a}=rh(),{mode:o}=HL(),s=war(a,r),{data:d}=Ek(t||"",e||"","settings","studio_lighting"),{data:b}=Ek(t||"",e||"","settings","camera"),{data:L}=Ek(t||"",e||"","settings","pathtracing"),B=L?.enabled===!0;ze.useEffect(()=>{if(n)return;const X=Fhe(r);if(X.length===0)return;const ie=zhe(X);console.log(`Auto-selecting default curve: ${ie}`),i(ie)},[r,n,i]);const V=d.background_color==="default"?o==="light"?"#FFFFFF":"#212121ff":d.background_color;return Ke.jsxs("div",{style:{width:"100%",height:"calc(100vh - 64px)"},children:[Ke.jsxs(unr,{shadows:!0,camera:{position:[-10,10,30],fov:50},gl:{antialias:!0,toneMapping:UX,preserveDrawingBuffer:b.preserve_drawing_buffer===!0},style:{background:V},orthographic:b.camera==="OrthographicCamera",children:[Ke.jsx(Uar,{settings:b}),Ke.jsxs(ilr,{settings:L,children:[!B&&Ke.jsx(Har,{ambient_light:d.ambient_light,key_light:d.key_light,fill_light:d.fill_light,rim_light:d.rim_light,hemisphere_light:d.hemisphere_light}),Ke.jsx(Var,{}),Object.entries(r).filter(([X,ie])=>ie.data?.active!==!1).map(([X,ie])=>ie.type==="Sphere"?Ke.jsx(uk,{geometryKey:X,children:Ke.jsx(kar,{geometryKey:X,data:ie.data,pathtracingEnabled:B})},X):ie.type==="Bond"?Ke.jsx(uk,{geometryKey:X,children:Ke.jsx(Dar,{geometryKey:X,data:ie.data,pathtracingEnabled:B})},X):ie.type==="Arrow"?Ke.jsx(uk,{geometryKey:X,children:Ke.jsx(Par,{geometryKey:X,data:ie.data,pathtracingEnabled:B})},X):ie.type==="Curve"?Ke.jsx(uk,{geometryKey:X,children:Ke.jsx(Nar,{geometryKey:X,data:ie.data})},X):ie.type==="Camera"?Ke.jsx(uk,{geometryKey:X,children:Ke.jsx(Far,{geometryKey:X,data:ie.data})},X):ie.type==="Cell"?Ke.jsx(uk,{geometryKey:X,children:Ke.jsx(Sar,{data:ie.data})},X):ie.type==="Floor"?Ke.jsx(uk,{geometryKey:X,children:Ke.jsx(Tar,{data:ie.data})},X):ie.type==="Box"?Ke.jsx(uk,{geometryKey:X,children:Ke.jsx(Lar,{geometryKey:X,data:ie.data,pathtracingEnabled:B})},X):ie.type==="Plane"?Ke.jsx(uk,{geometryKey:X,children:Ke.jsx(Oar,{geometryKey:X,data:ie.data,pathtracingEnabled:B})},X):(console.warn(`Unhandled geometry type: ${ie.type}`),null)),b.show_crosshair&&Ke.jsx(Bar,{}),Ke.jsx(zar,{})]}),Ke.jsx(Wnr,{enableDamping:!1,makeDefault:!0,enabled:s.enabled,enablePan:s.enablePan,enableRotate:s.enableRotate,enableZoom:s.enableZoom})]},b.camera),Ke.jsx(vor,{}),Ke.jsx(mor,{}),Ke.jsx(gor,{})]})}const E1e=(function(t){if(t==null)return ulr;if(typeof t=="function")return SZ(t);if(typeof t=="object")return Array.isArray(t)?olr(t):slr(t);if(typeof t=="string")return llr(t);throw new Error("Expected function, string, or object as test")});function olr(t){const e=[];let r=-1;for(;++r<t.length;)e[r]=E1e(t[r]);return SZ(n);function n(...i){let a=-1;for(;++a<e.length;)if(e[a].apply(this,i))return!0;return!1}}function slr(t){const e=t;return SZ(r);function r(n){const i=n;let a;for(a in t)if(i[a]!==e[a])return!1;return!0}}function llr(t){return SZ(e);function e(r){return r&&r.type===t}}function SZ(t){return e;function e(r,n,i){return!!(clr(r)&&t.call(this,r,typeof n=="number"?n:void 0,i||void 0))}}function ulr(){return!0}function clr(t){return t!==null&&typeof t=="object"&&"type"in t}const oXe=[],flr=!0,aDe=!1,A1e="skip";function sXe(t,e,r,n){let i;typeof e=="function"&&typeof r!="function"?(n=r,r=e):i=e;const a=E1e(i),o=n?-1:1;s(t,void 0,[])();function s(d,b,L){const B=d&&typeof d=="object"?d:{};if(typeof B.type=="string"){const X=typeof B.tagName=="string"?B.tagName:typeof B.name=="string"?B.name:void 0;Object.defineProperty(V,"name",{value:"node ("+(d.type+(X?"<"+X+">":""))+")"})}return V;function V(){let X=oXe,ie,de,ae;if((!e||a(d,b,L[L.length-1]||void 0))&&(X=dlr(r(d,L)),X[0]===aDe))return X;if("children"in d&&d.children){const U=d;if(U.children&&X[0]!==A1e)for(de=(n?U.children.length:-1)+o,ae=L.concat(U);de>-1&&de<U.children.length;){const ve=U.children[de];if(ie=s(ve,de,ae)(),ie[0]===aDe)return ie;de=typeof ie[1]=="number"?ie[1]:de+o}}return X}}}function dlr(t){return Array.isArray(t)?t:typeof t=="number"?[flr,t]:t==null?oXe:[t]}function C1e(t,e,r,n){let i,a,o;typeof e=="function"&&typeof r!="function"?(a=void 0,o=e,i=r):(a=e,o=r,i=n),sXe(t,a,s,i);function s(d,b){const L=b[b.length-1],B=L?L.children.indexOf(d):void 0;return o(d,B,L)}}const oDe=/(^|\s)@(\d+)/g;function hlr(){return t=>{C1e(t,"text",(e,r,n)=>{if(n.type!=="paragraph")return;const i=e.value,a=[];let o=0,s;for(;(s=oDe.exec(i))!==null;){s.index>o&&a.push({type:"text",value:i.substring(o,s.index)}),s[1]===" "&&a.push({type:"text",value:" "});const d=parseInt(s[2],10);a.push({type:"frameLink",data:{hName:"frameLink",hProperties:{frame:d}},children:[{type:"text",value:`@${d}`}]}),o=oDe.lastIndex}if(a.length!==0)return o<i.length&&a.push({type:"text",value:i.substring(o)}),n.children.splice(r,1,...a),[A1e,r+a.length]})}}function sDe(t){const e=[],r=String(t||"");let n=r.indexOf(","),i=0,a=!1;for(;!a;){n===-1&&(n=r.length,a=!0);const o=r.slice(i,n).trim();(o||!a)&&e.push(o),i=n+1,n=r.indexOf(",",i)}return e}function plr(t,e){const r={};return(t[t.length-1]===""?[...t,""]:t).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const vlr=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,mlr=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,glr={};function lDe(t,e){return(glr.jsx?mlr:vlr).test(t)}const ylr=/[ \t\n\f\r]/g;function blr(t){return typeof t=="object"?t.type==="text"?uDe(t.value):!1:uDe(t)}function uDe(t){return t.replace(ylr,"")===""}class AU{constructor(e,r,n){this.normal=r,this.property=e,n&&(this.space=n)}}AU.prototype.normal={};AU.prototype.property={};AU.prototype.space=void 0;function lXe(t,e){const r={},n={};for(const i of t)Object.assign(r,i.property),Object.assign(n,i.normal);return new AU(r,n,e)}function dB(t){return t.toLowerCase()}class rT{constructor(e,r){this.attribute=r,this.property=e}}rT.prototype.attribute="";rT.prototype.booleanish=!1;rT.prototype.boolean=!1;rT.prototype.commaOrSpaceSeparated=!1;rT.prototype.commaSeparated=!1;rT.prototype.defined=!1;rT.prototype.mustUseProperty=!1;rT.prototype.number=!1;rT.prototype.overloadedBoolean=!1;rT.prototype.property="";rT.prototype.spaceSeparated=!1;rT.prototype.space=void 0;let xlr=0;const Yh=s6(),_b=s6(),ove=s6(),Ru=s6(),d0=s6(),GN=s6(),WT=s6();function s6(){return 2**++xlr}const sve=Object.freeze(Object.defineProperty({__proto__:null,boolean:Yh,booleanish:_b,commaOrSpaceSeparated:WT,commaSeparated:GN,number:Ru,overloadedBoolean:ove,spaceSeparated:d0},Symbol.toStringTag,{value:"Module"})),Ioe=Object.keys(sve);class M1e extends rT{constructor(e,r,n,i){let a=-1;if(super(e,r),cDe(this,"space",i),typeof n=="number")for(;++a<Ioe.length;){const o=Ioe[a];cDe(this,Ioe[a],(n&sve[o])===sve[o])}}}M1e.prototype.defined=!0;function cDe(t,e,r){r&&(t[e]=r)}function wF(t){const e={},r={};for(const[n,i]of Object.entries(t.properties)){const a=new M1e(n,t.transform(t.attributes||{},n),i,t.space);t.mustUseProperty&&t.mustUseProperty.includes(n)&&(a.mustUseProperty=!0),e[n]=a,r[dB(n)]=n,r[dB(a.attribute)]=n}return new AU(e,r,t.space)}const uXe=wF({properties:{ariaActiveDescendant:null,ariaAtomic:_b,ariaAutoComplete:null,ariaBusy:_b,ariaChecked:_b,ariaColCount:Ru,ariaColIndex:Ru,ariaColSpan:Ru,ariaControls:d0,ariaCurrent:null,ariaDescribedBy:d0,ariaDetails:null,ariaDisabled:_b,ariaDropEffect:d0,ariaErrorMessage:null,ariaExpanded:_b,ariaFlowTo:d0,ariaGrabbed:_b,ariaHasPopup:null,ariaHidden:_b,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:d0,ariaLevel:Ru,ariaLive:null,ariaModal:_b,ariaMultiLine:_b,ariaMultiSelectable:_b,ariaOrientation:null,ariaOwns:d0,ariaPlaceholder:null,ariaPosInSet:Ru,ariaPressed:_b,ariaReadOnly:_b,ariaRelevant:null,ariaRequired:_b,ariaRoleDescription:d0,ariaRowCount:Ru,ariaRowIndex:Ru,ariaRowSpan:Ru,ariaSelected:_b,ariaSetSize:Ru,ariaSort:null,ariaValueMax:Ru,ariaValueMin:Ru,ariaValueNow:Ru,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function cXe(t,e){return e in t?t[e]:e}function fXe(t,e){return cXe(t,e.toLowerCase())}const _lr=wF({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:GN,acceptCharset:d0,accessKey:d0,action:null,allow:null,allowFullScreen:Yh,allowPaymentRequest:Yh,allowUserMedia:Yh,alt:null,as:null,async:Yh,autoCapitalize:null,autoComplete:d0,autoFocus:Yh,autoPlay:Yh,blocking:d0,capture:null,charSet:null,checked:Yh,cite:null,className:d0,cols:Ru,colSpan:null,content:null,contentEditable:_b,controls:Yh,controlsList:d0,coords:Ru|GN,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Yh,defer:Yh,dir:null,dirName:null,disabled:Yh,download:ove,draggable:_b,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Yh,formTarget:null,headers:d0,height:Ru,hidden:ove,high:Ru,href:null,hrefLang:null,htmlFor:d0,httpEquiv:d0,id:null,imageSizes:null,imageSrcSet:null,inert:Yh,inputMode:null,integrity:null,is:null,isMap:Yh,itemId:null,itemProp:d0,itemRef:d0,itemScope:Yh,itemType:d0,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Yh,low:Ru,manifest:null,max:null,maxLength:Ru,media:null,method:null,min:null,minLength:Ru,multiple:Yh,muted:Yh,name:null,nonce:null,noModule:Yh,noValidate:Yh,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Yh,optimum:Ru,pattern:null,ping:d0,placeholder:null,playsInline:Yh,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Yh,referrerPolicy:null,rel:d0,required:Yh,reversed:Yh,rows:Ru,rowSpan:Ru,sandbox:d0,scope:null,scoped:Yh,seamless:Yh,selected:Yh,shadowRootClonable:Yh,shadowRootDelegatesFocus:Yh,shadowRootMode:null,shape:null,size:Ru,sizes:null,slot:null,span:Ru,spellCheck:_b,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ru,step:null,style:null,tabIndex:Ru,target:null,title:null,translate:null,type:null,typeMustMatch:Yh,useMap:null,value:_b,width:Ru,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:d0,axis:null,background:null,bgColor:null,border:Ru,borderColor:null,bottomMargin:Ru,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Yh,declare:Yh,event:null,face:null,frame:null,frameBorder:null,hSpace:Ru,leftMargin:Ru,link:null,longDesc:null,lowSrc:null,marginHeight:Ru,marginWidth:Ru,noResize:Yh,noHref:Yh,noShade:Yh,noWrap:Yh,object:null,profile:null,prompt:null,rev:null,rightMargin:Ru,rules:null,scheme:null,scrolling:_b,standby:null,summary:null,text:null,topMargin:Ru,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ru,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Yh,disableRemotePlayback:Yh,prefix:null,property:null,results:Ru,security:null,unselectable:null},space:"html",transform:fXe}),wlr=wF({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",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",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",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",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",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",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:WT,accentHeight:Ru,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ru,amplitude:Ru,arabicForm:null,ascent:Ru,attributeName:null,attributeType:null,azimuth:Ru,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ru,by:null,calcMode:null,capHeight:Ru,className:d0,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Ru,diffuseConstant:Ru,direction:null,display:null,dur:null,divisor:Ru,dominantBaseline:null,download:Yh,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ru,enableBackground:null,end:null,event:null,exponent:Ru,externalResourcesRequired:null,fill:null,fillOpacity:Ru,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:GN,g2:GN,glyphName:GN,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ru,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ru,horizOriginX:Ru,horizOriginY:Ru,id:null,ideographic:Ru,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ru,k:Ru,k1:Ru,k2:Ru,k3:Ru,k4:Ru,kernelMatrix:WT,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ru,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ru,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Ru,overlineThickness:Ru,paintOrder:null,panose1:null,path:null,pathLength:Ru,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:d0,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ru,pointsAtY:Ru,pointsAtZ:Ru,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:WT,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:WT,rev:WT,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:WT,requiredFeatures:WT,requiredFonts:WT,requiredFormats:WT,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Ru,specularExponent:Ru,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ru,strikethroughThickness:Ru,string:null,stroke:null,strokeDashArray:WT,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ru,strokeOpacity:Ru,strokeWidth:null,style:null,surfaceScale:Ru,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:WT,tabIndex:Ru,tableValues:null,target:null,targetX:Ru,targetY:Ru,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:WT,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ru,underlineThickness:Ru,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ru,values:null,vAlphabetic:Ru,vMathematical:Ru,vectorEffect:null,vHanging:Ru,vIdeographic:Ru,version:null,vertAdvY:Ru,vertOriginX:Ru,vertOriginY:Ru,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ru,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:cXe}),dXe=wF({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}}),hXe=wF({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:fXe}),pXe=wF({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}}),Slr={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Tlr=/[A-Z]/g,fDe=/-[a-z]/g,Elr=/^data[-\w.:]+$/i;function vXe(t,e){const r=dB(e);let n=e,i=rT;if(r in t.normal)return t.property[t.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&Elr.test(e)){if(e.charAt(4)==="-"){const a=e.slice(5).replace(fDe,Clr);n="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=e.slice(4);if(!fDe.test(a)){let o=a.replace(Tlr,Alr);o.charAt(0)!=="-"&&(o="-"+o),e="data"+o}}i=M1e}return new i(n,e)}function Alr(t){return"-"+t.toLowerCase()}function Clr(t){return t.charAt(1).toUpperCase()}const mXe=lXe([uXe,_lr,dXe,hXe,pXe],"html"),TZ=lXe([uXe,wlr,dXe,hXe,pXe],"svg");function dDe(t){const e=String(t||"").trim();return e?e.split(/[ \t\n\r\f]+/g):[]}function Mlr(t){return t.join(" ").trim()}var sN={},Poe,hDe;function Rlr(){if(hDe)return Poe;hDe=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,e=/\n/g,r=/^\s*/,n=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,s=/^\s+|\s+$/g,d=`
`,b="/",L="*",B="",V="comment",X="declaration";Poe=function(de,ae){if(typeof de!="string")throw new TypeError("First argument must be a string");if(!de)return[];ae=ae||{};var U=1,ve=1;function Se(_t){var Dt=_t.match(e);Dt&&(U+=Dt.length);var qt=_t.lastIndexOf(d);ve=~qt?_t.length-qt:ve+_t.length}function Pe(){var _t={line:U,column:ve};return function(Dt){return Dt.position=new Me(_t),Ze(),Dt}}function Me(_t){this.start=_t,this.end={line:U,column:ve},this.source=ae.source}Me.prototype.content=de;function Ie(_t){var Dt=new Error(ae.source+":"+U+":"+ve+": "+_t);if(Dt.reason=_t,Dt.filename=ae.source,Dt.line=U,Dt.column=ve,Dt.source=de,!ae.silent)throw Dt}function Ve(_t){var Dt=_t.exec(de);if(Dt){var qt=Dt[0];return Se(qt),de=de.slice(qt.length),Dt}}function Ze(){Ve(r)}function Je(_t){var Dt;for(_t=_t||[];Dt=nt();)Dt!==!1&&_t.push(Dt);return _t}function nt(){var _t=Pe();if(!(b!=de.charAt(0)||L!=de.charAt(1))){for(var Dt=2;B!=de.charAt(Dt)&&(L!=de.charAt(Dt)||b!=de.charAt(Dt+1));)++Dt;if(Dt+=2,B===de.charAt(Dt-1))return Ie("End of comment missing");var qt=de.slice(2,Dt-2);return ve+=2,Se(qt),de=de.slice(Dt),ve+=2,_t({type:V,comment:qt})}}function ut(){var _t=Pe(),Dt=Ve(n);if(Dt){if(nt(),!Ve(i))return Ie("property missing ':'");var qt=Ve(a),Lt=_t({type:X,property:ie(Dt[0].replace(t,B)),value:qt?ie(qt[0].replace(t,B)):B});return Ve(o),Lt}}function ht(){var _t=[];Je(_t);for(var Dt;Dt=ut();)Dt!==!1&&(_t.push(Dt),Je(_t));return _t}return Ze(),ht()};function ie(de){return de?de.replace(s,B):B}return Poe}var pDe;function klr(){if(pDe)return sN;pDe=1;var t=sN&&sN.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(sN,"__esModule",{value:!0}),sN.default=r;var e=t(Rlr());function r(n,i){var a=null;if(!n||typeof n!="string")return a;var o=(0,e.default)(n),s=typeof i=="function";return o.forEach(function(d){if(d.type==="declaration"){var b=d.property,L=d.value;s?i(b,L,d):L&&(a=a||{},a[b]=L)}}),a}return sN}var mz={},vDe;function Ilr(){if(vDe)return mz;vDe=1,Object.defineProperty(mz,"__esModule",{value:!0}),mz.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,e=/-([a-z])/g,r=/^[^-]+$/,n=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(b){return!b||r.test(b)||t.test(b)},o=function(b,L){return L.toUpperCase()},s=function(b,L){return"".concat(L,"-")},d=function(b,L){return L===void 0&&(L={}),a(b)?b:(b=b.toLowerCase(),L.reactCompat?b=b.replace(i,s):b=b.replace(n,s),b.replace(e,o))};return mz.camelCase=d,mz}var gz,mDe;function Plr(){if(mDe)return gz;mDe=1;var t=gz&&gz.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},e=t(klr()),r=Ilr();function n(i,a){var o={};return!i||typeof i!="string"||(0,e.default)(i,function(s,d){s&&d&&(o[(0,r.camelCase)(s,a)]=d)}),o}return n.default=n,gz=n,gz}var Dlr=Plr();const Llr=Qh(Dlr),gXe=yXe("end"),R1e=yXe("start");function yXe(t){return e;function e(r){const n=r&&r.position&&r.position[t]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function Olr(t){const e=R1e(t),r=gXe(t);if(e&&r)return{start:e,end:r}}function m9(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?gDe(t.position):"start"in t||"end"in t?gDe(t):"line"in t||"column"in t?lve(t):""}function lve(t){return yDe(t&&t.line)+":"+yDe(t&&t.column)}function gDe(t){return lve(t&&t.start)+"-"+lve(t&&t.end)}function yDe(t){return t&&typeof t=="number"?t:1}class Yw extends Error{constructor(e,r,n){super(),typeof r=="string"&&(n=r,r=void 0);let i="",a={},o=!1;if(r&&("line"in r&&"column"in r?a={place:r}:"start"in r&&"end"in r?a={place:r}:"type"in r?a={ancestors:[r],place:r.position}:a={...r}),typeof e=="string"?i=e:!a.cause&&e&&(o=!0,i=e.message,a.cause=e),!a.ruleId&&!a.source&&typeof n=="string"){const d=n.indexOf(":");d===-1?a.ruleId=n:(a.source=n.slice(0,d),a.ruleId=n.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const s=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=s?s.line:void 0,this.name=m9(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Yw.prototype.file="";Yw.prototype.name="";Yw.prototype.reason="";Yw.prototype.message="";Yw.prototype.stack="";Yw.prototype.column=void 0;Yw.prototype.line=void 0;Yw.prototype.ancestors=void 0;Yw.prototype.cause=void 0;Yw.prototype.fatal=void 0;Yw.prototype.place=void 0;Yw.prototype.ruleId=void 0;Yw.prototype.source=void 0;const k1e={}.hasOwnProperty,Nlr=new Map,Flr=/[A-Z]/g,zlr=new Set(["table","tbody","thead","tfoot","tr"]),Blr=new Set(["td","th"]),bXe="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Ulr(t,e){if(!e||e.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=e.filePath||void 0;let n;if(e.development){if(typeof e.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=Ylr(r,e.jsxDEV)}else{if(typeof e.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof e.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");n=Wlr(r,e.jsx,e.jsxs)}const i={Fragment:e.Fragment,ancestors:[],components:e.components||{},create:n,elementAttributeNameCase:e.elementAttributeNameCase||"react",evaluater:e.createEvaluater?e.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:e.ignoreInvalidStyle||!1,passKeys:e.passKeys!==!1,passNode:e.passNode||!1,schema:e.space==="svg"?TZ:mXe,stylePropertyNameCase:e.stylePropertyNameCase||"dom",tableCellAlignToStyle:e.tableCellAlignToStyle!==!1},a=xXe(i,t,void 0);return a&&typeof a!="string"?a:i.create(t,i.Fragment,{children:a||void 0},void 0)}function xXe(t,e,r){if(e.type==="element")return Hlr(t,e,r);if(e.type==="mdxFlowExpression"||e.type==="mdxTextExpression")return jlr(t,e);if(e.type==="mdxJsxFlowElement"||e.type==="mdxJsxTextElement")return qlr(t,e,r);if(e.type==="mdxjsEsm")return Vlr(t,e);if(e.type==="root")return Glr(t,e,r);if(e.type==="text")return $lr(t,e)}function Hlr(t,e,r){const n=t.schema;let i=n;e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(i=TZ,t.schema=i),t.ancestors.push(e);const a=wXe(t,e.tagName,!1),o=Xlr(t,e);let s=P1e(t,e);return zlr.has(e.tagName)&&(s=s.filter(function(d){return typeof d=="string"?!blr(d):!0})),_Xe(t,o,a,e),I1e(o,s),t.ancestors.pop(),t.schema=n,t.create(e,a,o,r)}function jlr(t,e){if(e.data&&e.data.estree&&t.evaluater){const n=e.data.estree.body[0];return n.type,t.evaluater.evaluateExpression(n.expression)}hB(t,e.position)}function Vlr(t,e){if(e.data&&e.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(e.data.estree);hB(t,e.position)}function qlr(t,e,r){const n=t.schema;let i=n;e.name==="svg"&&n.space==="html"&&(i=TZ,t.schema=i),t.ancestors.push(e);const a=e.name===null?t.Fragment:wXe(t,e.name,!0),o=Zlr(t,e),s=P1e(t,e);return _Xe(t,o,a,e),I1e(o,s),t.ancestors.pop(),t.schema=n,t.create(e,a,o,r)}function Glr(t,e,r){const n={};return I1e(n,P1e(t,e)),t.create(e,t.Fragment,n,r)}function $lr(t,e){return e.value}function _Xe(t,e,r,n){typeof r!="string"&&r!==t.Fragment&&t.passNode&&(e.node=n)}function I1e(t,e){if(e.length>0){const r=e.length>1?e:e[0];r&&(t.children=r)}}function Wlr(t,e,r){return n;function n(i,a,o,s){const b=Array.isArray(o.children)?r:e;return s?b(a,o,s):b(a,o)}}function Ylr(t,e){return r;function r(n,i,a,o){const s=Array.isArray(a.children),d=R1e(n);return e(i,a,o,s,{columnNumber:d?d.column-1:void 0,fileName:t,lineNumber:d?d.line:void 0},void 0)}}function Xlr(t,e){const r={};let n,i;for(i in e.properties)if(i!=="children"&&k1e.call(e.properties,i)){const a=Klr(t,i,e.properties[i]);if(a){const[o,s]=a;t.tableCellAlignToStyle&&o==="align"&&typeof s=="string"&&Blr.has(e.tagName)?n=s:r[o]=s}}if(n){const a=r.style||(r.style={});a[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=n}return r}function Zlr(t,e){const r={};for(const n of e.attributes)if(n.type==="mdxJsxExpressionAttribute")if(n.data&&n.data.estree&&t.evaluater){const a=n.data.estree.body[0];a.type;const o=a.expression;o.type;const s=o.properties[0];s.type,Object.assign(r,t.evaluater.evaluateExpression(s.argument))}else hB(t,e.position);else{const i=n.name;let a;if(n.value&&typeof n.value=="object")if(n.value.data&&n.value.data.estree&&t.evaluater){const s=n.value.data.estree.body[0];s.type,a=t.evaluater.evaluateExpression(s.expression)}else hB(t,e.position);else a=n.value===null?!0:n.value;r[i]=a}return r}function P1e(t,e){const r=[];let n=-1;const i=t.passKeys?new Map:Nlr;for(;++n<e.children.length;){const a=e.children[n];let o;if(t.passKeys){const d=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(d){const b=i.get(d)||0;o=d+"-"+b,i.set(d,b+1)}}const s=xXe(t,a,o);s!==void 0&&r.push(s)}return r}function Klr(t,e,r){const n=vXe(t.schema,e);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=n.commaSeparated?plr(r):Mlr(r)),n.property==="style"){let i=typeof r=="object"?r:Jlr(t,String(r));return t.stylePropertyNameCase==="css"&&(i=Qlr(i)),["style",i]}return[t.elementAttributeNameCase==="react"&&n.space?Slr[n.property]||n.property:n.attribute,r]}}function Jlr(t,e){try{return Llr(e,{reactCompat:!0})}catch(r){if(t.ignoreInvalidStyle)return{};const n=r,i=new Yw("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=t.filePath||void 0,i.url=bXe+"#cannot-parse-style-attribute",i}}function wXe(t,e,r){let n;if(!r)n={type:"Literal",value:e};else if(e.includes(".")){const i=e.split(".");let a=-1,o;for(;++a<i.length;){const s=lDe(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};o=o?{type:"MemberExpression",object:o,property:s,computed:!!(a&&s.type==="Literal"),optional:!1}:s}n=o}else n=lDe(e)&&!/^[a-z]/.test(e)?{type:"Identifier",name:e}:{type:"Literal",value:e};if(n.type==="Literal"){const i=n.value;return k1e.call(t.components,i)?t.components[i]:i}if(t.evaluater)return t.evaluater.evaluateExpression(n);hB(t)}function hB(t,e){const r=new Yw("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:e,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=t.filePath||void 0,r.url=bXe+"#cannot-handle-mdx-estrees-without-createevaluater",r}function Qlr(t){const e={};let r;for(r in t)k1e.call(t,r)&&(e[eur(r)]=t[r]);return e}function eur(t){let e=t.replace(Flr,tur);return e.slice(0,3)==="ms-"&&(e="-"+e),e}function tur(t){return"-"+t.toLowerCase()}const Doe={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},rur={};function nur(t,e){const r=rur,n=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,i=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return SXe(t,n,i)}function SXe(t,e,r){if(iur(t)){if("value"in t)return t.type==="html"&&!r?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return bDe(t.children,e,r)}return Array.isArray(t)?bDe(t,e,r):""}function bDe(t,e,r){const n=[];let i=-1;for(;++i<t.length;)n[i]=SXe(t[i],e,r);return n.join("")}function iur(t){return!!(t&&typeof t=="object")}const xDe=document.createElement("i");function D1e(t){const e="&"+t+";";xDe.innerHTML=e;const r=xDe.textContent;return r.charCodeAt(r.length-1)===59&&t!=="semi"||r===e?!1:r}function H5(t,e,r,n){const i=t.length;let a=0,o;if(e<0?e=-e>i?0:i+e:e=e>i?i:e,r=r>0?r:0,n.length<1e4)o=Array.from(n),o.unshift(e,r),t.splice(...o);else for(r&&t.splice(e,r);a<n.length;)o=n.slice(a,a+1e4),o.unshift(e,0),t.splice(...o),a+=1e4,e+=1e4}function B3(t,e){return t.length>0?(H5(t,t.length,0,e),t):e}const _De={}.hasOwnProperty;function aur(t){const e={};let r=-1;for(;++r<t.length;)our(e,t[r]);return e}function our(t,e){let r;for(r in e){const i=(_De.call(t,r)?t[r]:void 0)||(t[r]={}),a=e[r];let o;if(a)for(o in a){_De.call(i,o)||(i[o]=[]);const s=a[o];sur(i[o],Array.isArray(s)?s:s?[s]:[])}}}function sur(t,e){let r=-1;const n=[];for(;++r<e.length;)(e[r].add==="after"?t:n).push(e[r]);H5(t,0,0,n)}function TXe(t,e){const r=Number.parseInt(t,e);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function $N(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const T5=T4(/[A-Za-z]/),aE=T4(/[\dA-Za-z]/),lur=T4(/[#-'*+\--9=?A-Z^-~]/);function uve(t){return t!==null&&(t<32||t===127)}const cve=T4(/\d/),uur=T4(/[\dA-Fa-f]/),cur=T4(/[!-/:-@[-`{-~]/);function Xf(t){return t!==null&&t<-2}function YS(t){return t!==null&&(t<0||t===32)}function Dm(t){return t===-2||t===-1||t===32}const fur=T4(new RegExp("\\p{P}|\\p{S}","u")),dur=T4(/\s/);function T4(t){return e;function e(r){return r!==null&&r>-1&&t.test(String.fromCharCode(r))}}function SF(t){const e=[];let r=-1,n=0,i=0;for(;++r<t.length;){const a=t.charCodeAt(r);let o="";if(a===37&&aE(t.charCodeAt(r+1))&&aE(t.charCodeAt(r+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){const s=t.charCodeAt(r+1);a<56320&&s>56319&&s<57344?(o=String.fromCharCode(a,s),i=1):o="�"}else o=String.fromCharCode(a);o&&(e.push(t.slice(n,r),encodeURIComponent(o)),n=r+i+1,o=""),i&&(r+=i,i=0)}return e.join("")+t.slice(n)}function Jm(t,e,r,n){const i=n?n-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(d){return Dm(d)?(t.enter(r),s(d)):e(d)}function s(d){return Dm(d)&&a++<i?(t.consume(d),s):(t.exit(r),e(d))}}const hur={tokenize:pur};function pur(t){const e=t.attempt(this.parser.constructs.contentInitial,n,i);let r;return e;function n(s){if(s===null){t.consume(s);return}return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),Jm(t,e,"linePrefix")}function i(s){return t.enter("paragraph"),a(s)}function a(s){const d=t.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=d),r=d,o(s)}function o(s){if(s===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(s);return}return Xf(s)?(t.consume(s),t.exit("chunkText"),a):(t.consume(s),o)}}const vur={tokenize:mur},wDe={tokenize:gur};function mur(t){const e=this,r=[];let n=0,i,a,o;return s;function s(Se){if(n<r.length){const Pe=r[n];return e.containerState=Pe[1],t.attempt(Pe[0].continuation,d,b)(Se)}return b(Se)}function d(Se){if(n++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,i&&ve();const Pe=e.events.length;let Me=Pe,Ie;for(;Me--;)if(e.events[Me][0]==="exit"&&e.events[Me][1].type==="chunkFlow"){Ie=e.events[Me][1].end;break}U(n);let Ve=Pe;for(;Ve<e.events.length;)e.events[Ve][1].end={...Ie},Ve++;return H5(e.events,Me+1,0,e.events.slice(Pe)),e.events.length=Ve,b(Se)}return s(Se)}function b(Se){if(n===r.length){if(!i)return V(Se);if(i.currentConstruct&&i.currentConstruct.concrete)return ie(Se);e.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(wDe,L,B)(Se)}function L(Se){return i&&ve(),U(n),V(Se)}function B(Se){return e.parser.lazy[e.now().line]=n!==r.length,o=e.now().offset,ie(Se)}function V(Se){return e.containerState={},t.attempt(wDe,X,ie)(Se)}function X(Se){return n++,r.push([e.currentConstruct,e.containerState]),V(Se)}function ie(Se){if(Se===null){i&&ve(),U(0),t.consume(Se);return}return i=i||e.parser.flow(e.now()),t.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),de(Se)}function de(Se){if(Se===null){ae(t.exit("chunkFlow"),!0),U(0),t.consume(Se);return}return Xf(Se)?(t.consume(Se),ae(t.exit("chunkFlow")),n=0,e.interrupt=void 0,s):(t.consume(Se),de)}function ae(Se,Pe){const Me=e.sliceStream(Se);if(Pe&&Me.push(null),Se.previous=a,a&&(a.next=Se),a=Se,i.defineSkip(Se.start),i.write(Me),e.parser.lazy[Se.start.line]){let Ie=i.events.length;for(;Ie--;)if(i.events[Ie][1].start.offset<o&&(!i.events[Ie][1].end||i.events[Ie][1].end.offset>o))return;const Ve=e.events.length;let Ze=Ve,Je,nt;for(;Ze--;)if(e.events[Ze][0]==="exit"&&e.events[Ze][1].type==="chunkFlow"){if(Je){nt=e.events[Ze][1].end;break}Je=!0}for(U(n),Ie=Ve;Ie<e.events.length;)e.events[Ie][1].end={...nt},Ie++;H5(e.events,Ze+1,0,e.events.slice(Ve)),e.events.length=Ie}}function U(Se){let Pe=r.length;for(;Pe-- >Se;){const Me=r[Pe];e.containerState=Me[1],Me[0].exit.call(e,t)}r.length=Se}function ve(){i.write([null]),a=void 0,i=void 0,e.containerState._closeFlow=void 0}}function gur(t,e,r){return Jm(t,t.attempt(this.parser.constructs.document,e,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function SDe(t){if(t===null||YS(t)||dur(t))return 1;if(fur(t))return 2}function L1e(t,e,r){const n=[];let i=-1;for(;++i<t.length;){const a=t[i].resolveAll;a&&!n.includes(a)&&(e=a(e,r),n.push(a))}return e}const fve={name:"attention",resolveAll:yur,tokenize:bur};function yur(t,e){let r=-1,n,i,a,o,s,d,b,L;for(;++r<t.length;)if(t[r][0]==="enter"&&t[r][1].type==="attentionSequence"&&t[r][1]._close){for(n=r;n--;)if(t[n][0]==="exit"&&t[n][1].type==="attentionSequence"&&t[n][1]._open&&e.sliceSerialize(t[n][1]).charCodeAt(0)===e.sliceSerialize(t[r][1]).charCodeAt(0)){if((t[n][1]._close||t[r][1]._open)&&(t[r][1].end.offset-t[r][1].start.offset)%3&&!((t[n][1].end.offset-t[n][1].start.offset+t[r][1].end.offset-t[r][1].start.offset)%3))continue;d=t[n][1].end.offset-t[n][1].start.offset>1&&t[r][1].end.offset-t[r][1].start.offset>1?2:1;const B={...t[n][1].end},V={...t[r][1].start};TDe(B,-d),TDe(V,d),o={type:d>1?"strongSequence":"emphasisSequence",start:B,end:{...t[n][1].end}},s={type:d>1?"strongSequence":"emphasisSequence",start:{...t[r][1].start},end:V},a={type:d>1?"strongText":"emphasisText",start:{...t[n][1].end},end:{...t[r][1].start}},i={type:d>1?"strong":"emphasis",start:{...o.start},end:{...s.end}},t[n][1].end={...o.start},t[r][1].start={...s.end},b=[],t[n][1].end.offset-t[n][1].start.offset&&(b=B3(b,[["enter",t[n][1],e],["exit",t[n][1],e]])),b=B3(b,[["enter",i,e],["enter",o,e],["exit",o,e],["enter",a,e]]),b=B3(b,L1e(e.parser.constructs.insideSpan.null,t.slice(n+1,r),e)),b=B3(b,[["exit",a,e],["enter",s,e],["exit",s,e],["exit",i,e]]),t[r][1].end.offset-t[r][1].start.offset?(L=2,b=B3(b,[["enter",t[r][1],e],["exit",t[r][1],e]])):L=0,H5(t,n-1,r-n+3,b),r=n+b.length-L-2;break}}for(r=-1;++r<t.length;)t[r][1].type==="attentionSequence"&&(t[r][1].type="data");return t}function bur(t,e){const r=this.parser.constructs.attentionMarkers.null,n=this.previous,i=SDe(n);let a;return o;function o(d){return a=d,t.enter("attentionSequence"),s(d)}function s(d){if(d===a)return t.consume(d),s;const b=t.exit("attentionSequence"),L=SDe(d),B=!L||L===2&&i||r.includes(d),V=!i||i===2&&L||r.includes(n);return b._open=!!(a===42?B:B&&(i||!V)),b._close=!!(a===42?V:V&&(L||!B)),e(d)}}function TDe(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}const xur={name:"autolink",tokenize:_ur};function _ur(t,e,r){let n=0;return i;function i(X){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(X),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),a}function a(X){return T5(X)?(t.consume(X),o):X===64?r(X):b(X)}function o(X){return X===43||X===45||X===46||aE(X)?(n=1,s(X)):b(X)}function s(X){return X===58?(t.consume(X),n=0,d):(X===43||X===45||X===46||aE(X))&&n++<32?(t.consume(X),s):(n=0,b(X))}function d(X){return X===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(X),t.exit("autolinkMarker"),t.exit("autolink"),e):X===null||X===32||X===60||uve(X)?r(X):(t.consume(X),d)}function b(X){return X===64?(t.consume(X),L):lur(X)?(t.consume(X),b):r(X)}function L(X){return aE(X)?B(X):r(X)}function B(X){return X===46?(t.consume(X),n=0,L):X===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(X),t.exit("autolinkMarker"),t.exit("autolink"),e):V(X)}function V(X){if((X===45||aE(X))&&n++<63){const ie=X===45?V:B;return t.consume(X),ie}return r(X)}}const EZ={partial:!0,tokenize:wur};function wur(t,e,r){return n;function n(a){return Dm(a)?Jm(t,i,"linePrefix")(a):i(a)}function i(a){return a===null||Xf(a)?e(a):r(a)}}const EXe={continuation:{tokenize:Tur},exit:Eur,name:"blockQuote",tokenize:Sur};function Sur(t,e,r){const n=this;return i;function i(o){if(o===62){const s=n.containerState;return s.open||(t.enter("blockQuote",{_container:!0}),s.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(o),t.exit("blockQuoteMarker"),a}return r(o)}function a(o){return Dm(o)?(t.enter("blockQuotePrefixWhitespace"),t.consume(o),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(o))}}function Tur(t,e,r){const n=this;return i;function i(o){return Dm(o)?Jm(t,a,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):a(o)}function a(o){return t.attempt(EXe,e,r)(o)}}function Eur(t){t.exit("blockQuote")}const AXe={name:"characterEscape",tokenize:Aur};function Aur(t,e,r){return n;function n(a){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(a),t.exit("escapeMarker"),i}function i(a){return cur(a)?(t.enter("characterEscapeValue"),t.consume(a),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):r(a)}}const CXe={name:"characterReference",tokenize:Cur};function Cur(t,e,r){const n=this;let i=0,a,o;return s;function s(B){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(B),t.exit("characterReferenceMarker"),d}function d(B){return B===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(B),t.exit("characterReferenceMarkerNumeric"),b):(t.enter("characterReferenceValue"),a=31,o=aE,L(B))}function b(B){return B===88||B===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(B),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),a=6,o=uur,L):(t.enter("characterReferenceValue"),a=7,o=cve,L(B))}function L(B){if(B===59&&i){const V=t.exit("characterReferenceValue");return o===aE&&!D1e(n.sliceSerialize(V))?r(B):(t.enter("characterReferenceMarker"),t.consume(B),t.exit("characterReferenceMarker"),t.exit("characterReference"),e)}return o(B)&&i++<a?(t.consume(B),L):r(B)}}const EDe={partial:!0,tokenize:Rur},ADe={concrete:!0,name:"codeFenced",tokenize:Mur};function Mur(t,e,r){const n=this,i={partial:!0,tokenize:Me};let a=0,o=0,s;return d;function d(Ie){return b(Ie)}function b(Ie){const Ve=n.events[n.events.length-1];return a=Ve&&Ve[1].type==="linePrefix"?Ve[2].sliceSerialize(Ve[1],!0).length:0,s=Ie,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),L(Ie)}function L(Ie){return Ie===s?(o++,t.consume(Ie),L):o<3?r(Ie):(t.exit("codeFencedFenceSequence"),Dm(Ie)?Jm(t,B,"whitespace")(Ie):B(Ie))}function B(Ie){return Ie===null||Xf(Ie)?(t.exit("codeFencedFence"),n.interrupt?e(Ie):t.check(EDe,de,Pe)(Ie)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),V(Ie))}function V(Ie){return Ie===null||Xf(Ie)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),B(Ie)):Dm(Ie)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),Jm(t,X,"whitespace")(Ie)):Ie===96&&Ie===s?r(Ie):(t.consume(Ie),V)}function X(Ie){return Ie===null||Xf(Ie)?B(Ie):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),ie(Ie))}function ie(Ie){return Ie===null||Xf(Ie)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),B(Ie)):Ie===96&&Ie===s?r(Ie):(t.consume(Ie),ie)}function de(Ie){return t.attempt(i,Pe,ae)(Ie)}function ae(Ie){return t.enter("lineEnding"),t.consume(Ie),t.exit("lineEnding"),U}function U(Ie){return a>0&&Dm(Ie)?Jm(t,ve,"linePrefix",a+1)(Ie):ve(Ie)}function ve(Ie){return Ie===null||Xf(Ie)?t.check(EDe,de,Pe)(Ie):(t.enter("codeFlowValue"),Se(Ie))}function Se(Ie){return Ie===null||Xf(Ie)?(t.exit("codeFlowValue"),ve(Ie)):(t.consume(Ie),Se)}function Pe(Ie){return t.exit("codeFenced"),e(Ie)}function Me(Ie,Ve,Ze){let Je=0;return nt;function nt(qt){return Ie.enter("lineEnding"),Ie.consume(qt),Ie.exit("lineEnding"),ut}function ut(qt){return Ie.enter("codeFencedFence"),Dm(qt)?Jm(Ie,ht,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(qt):ht(qt)}function ht(qt){return qt===s?(Ie.enter("codeFencedFenceSequence"),_t(qt)):Ze(qt)}function _t(qt){return qt===s?(Je++,Ie.consume(qt),_t):Je>=o?(Ie.exit("codeFencedFenceSequence"),Dm(qt)?Jm(Ie,Dt,"whitespace")(qt):Dt(qt)):Ze(qt)}function Dt(qt){return qt===null||Xf(qt)?(Ie.exit("codeFencedFence"),Ve(qt)):Ze(qt)}}}function Rur(t,e,r){const n=this;return i;function i(o){return o===null?r(o):(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),a)}function a(o){return n.parser.lazy[n.now().line]?r(o):e(o)}}const Loe={name:"codeIndented",tokenize:Iur},kur={partial:!0,tokenize:Pur};function Iur(t,e,r){const n=this;return i;function i(b){return t.enter("codeIndented"),Jm(t,a,"linePrefix",5)(b)}function a(b){const L=n.events[n.events.length-1];return L&&L[1].type==="linePrefix"&&L[2].sliceSerialize(L[1],!0).length>=4?o(b):r(b)}function o(b){return b===null?d(b):Xf(b)?t.attempt(kur,o,d)(b):(t.enter("codeFlowValue"),s(b))}function s(b){return b===null||Xf(b)?(t.exit("codeFlowValue"),o(b)):(t.consume(b),s)}function d(b){return t.exit("codeIndented"),e(b)}}function Pur(t,e,r){const n=this;return i;function i(o){return n.parser.lazy[n.now().line]?r(o):Xf(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),i):Jm(t,a,"linePrefix",5)(o)}function a(o){const s=n.events[n.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?e(o):Xf(o)?i(o):r(o)}}const Dur={name:"codeText",previous:Our,resolve:Lur,tokenize:Nur};function Lur(t){let e=t.length-4,r=3,n,i;if((t[r][1].type==="lineEnding"||t[r][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(n=r;++n<e;)if(t[n][1].type==="codeTextData"){t[r][1].type="codeTextPadding",t[e][1].type="codeTextPadding",r+=2,e-=2;break}}for(n=r-1,e++;++n<=e;)i===void 0?n!==e&&t[n][1].type!=="lineEnding"&&(i=n):(n===e||t[n][1].type==="lineEnding")&&(t[i][1].type="codeTextData",n!==i+2&&(t[i][1].end=t[n-1][1].end,t.splice(i+2,n-i-2),e-=n-i-2,n=i+2),i=void 0);return t}function Our(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Nur(t,e,r){let n=0,i,a;return o;function o(B){return t.enter("codeText"),t.enter("codeTextSequence"),s(B)}function s(B){return B===96?(t.consume(B),n++,s):(t.exit("codeTextSequence"),d(B))}function d(B){return B===null?r(B):B===32?(t.enter("space"),t.consume(B),t.exit("space"),d):B===96?(a=t.enter("codeTextSequence"),i=0,L(B)):Xf(B)?(t.enter("lineEnding"),t.consume(B),t.exit("lineEnding"),d):(t.enter("codeTextData"),b(B))}function b(B){return B===null||B===32||B===96||Xf(B)?(t.exit("codeTextData"),d(B)):(t.consume(B),b)}function L(B){return B===96?(t.consume(B),i++,L):i===n?(t.exit("codeTextSequence"),t.exit("codeText"),e(B)):(a.type="codeTextData",b(B))}}class Fur{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,r){const n=r??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,r,n){const i=r||0;this.setCursor(Math.trunc(e));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return n&&yz(this.left,n),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),yz(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),yz(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){const r=this.left.splice(e,Number.POSITIVE_INFINITY);yz(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);yz(this.left,r.reverse())}}}function yz(t,e){let r=0;if(e.length<1e4)t.push(...e);else for(;r<e.length;)t.push(...e.slice(r,r+1e4)),r+=1e4}function MXe(t){const e={};let r=-1,n,i,a,o,s,d,b;const L=new Fur(t);for(;++r<L.length;){for(;r in e;)r=e[r];if(n=L.get(r),r&&n[1].type==="chunkFlow"&&L.get(r-1)[1].type==="listItemPrefix"&&(d=n[1]._tokenizer.events,a=0,a<d.length&&d[a][1].type==="lineEndingBlank"&&(a+=2),a<d.length&&d[a][1].type==="content"))for(;++a<d.length&&d[a][1].type!=="content";)d[a][1].type==="chunkText"&&(d[a][1]._isInFirstContentOfListItem=!0,a++);if(n[0]==="enter")n[1].contentType&&(Object.assign(e,zur(L,r)),r=e[r],b=!0);else if(n[1]._container){for(a=r,i=void 0;a--;)if(o=L.get(a),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(L.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=a);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(n[1].end={...L.get(i)[1].start},s=L.slice(i,r),s.unshift(n),L.splice(i,r-i+1,s))}}return H5(t,0,Number.POSITIVE_INFINITY,L.slice(0)),!b}function zur(t,e){const r=t.get(e)[1],n=t.get(e)[2];let i=e-1;const a=[];let o=r._tokenizer;o||(o=n.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const s=o.events,d=[],b={};let L,B,V=-1,X=r,ie=0,de=0;const ae=[de];for(;X;){for(;t.get(++i)[1]!==X;);a.push(i),X._tokenizer||(L=n.sliceStream(X),X.next||L.push(null),B&&o.defineSkip(X.start),X._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(L),X._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),B=X,X=X.next}for(X=r;++V<s.length;)s[V][0]==="exit"&&s[V-1][0]==="enter"&&s[V][1].type===s[V-1][1].type&&s[V][1].start.line!==s[V][1].end.line&&(de=V+1,ae.push(de),X._tokenizer=void 0,X.previous=void 0,X=X.next);for(o.events=[],X?(X._tokenizer=void 0,X.previous=void 0):ae.pop(),V=ae.length;V--;){const U=s.slice(ae[V],ae[V+1]),ve=a.pop();d.push([ve,ve+U.length-1]),t.splice(ve,2,U)}for(d.reverse(),V=-1;++V<d.length;)b[ie+d[V][0]]=ie+d[V][1],ie+=d[V][1]-d[V][0]-1;return b}const Bur={resolve:Hur,tokenize:jur},Uur={partial:!0,tokenize:Vur};function Hur(t){return MXe(t),t}function jur(t,e){let r;return n;function n(s){return t.enter("content"),r=t.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?a(s):Xf(s)?t.check(Uur,o,a)(s):(t.consume(s),i)}function a(s){return t.exit("chunkContent"),t.exit("content"),e(s)}function o(s){return t.consume(s),t.exit("chunkContent"),r.next=t.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,i}}function Vur(t,e,r){const n=this;return i;function i(o){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),Jm(t,a,"linePrefix")}function a(o){if(o===null||Xf(o))return r(o);const s=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?e(o):t.interrupt(n.parser.constructs.flow,r,e)(o)}}function RXe(t,e,r,n,i,a,o,s,d){const b=d||Number.POSITIVE_INFINITY;let L=0;return B;function B(U){return U===60?(t.enter(n),t.enter(i),t.enter(a),t.consume(U),t.exit(a),V):U===null||U===32||U===41||uve(U)?r(U):(t.enter(n),t.enter(o),t.enter(s),t.enter("chunkString",{contentType:"string"}),de(U))}function V(U){return U===62?(t.enter(a),t.consume(U),t.exit(a),t.exit(i),t.exit(n),e):(t.enter(s),t.enter("chunkString",{contentType:"string"}),X(U))}function X(U){return U===62?(t.exit("chunkString"),t.exit(s),V(U)):U===null||U===60||Xf(U)?r(U):(t.consume(U),U===92?ie:X)}function ie(U){return U===60||U===62||U===92?(t.consume(U),X):X(U)}function de(U){return!L&&(U===null||U===41||YS(U))?(t.exit("chunkString"),t.exit(s),t.exit(o),t.exit(n),e(U)):L<b&&U===40?(t.consume(U),L++,de):U===41?(t.consume(U),L--,de):U===null||U===32||U===40||uve(U)?r(U):(t.consume(U),U===92?ae:de)}function ae(U){return U===40||U===41||U===92?(t.consume(U),de):de(U)}}function kXe(t,e,r,n,i,a){const o=this;let s=0,d;return b;function b(X){return t.enter(n),t.enter(i),t.consume(X),t.exit(i),t.enter(a),L}function L(X){return s>999||X===null||X===91||X===93&&!d||X===94&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?r(X):X===93?(t.exit(a),t.enter(i),t.consume(X),t.exit(i),t.exit(n),e):Xf(X)?(t.enter("lineEnding"),t.consume(X),t.exit("lineEnding"),L):(t.enter("chunkString",{contentType:"string"}),B(X))}function B(X){return X===null||X===91||X===93||Xf(X)||s++>999?(t.exit("chunkString"),L(X)):(t.consume(X),d||(d=!Dm(X)),X===92?V:B)}function V(X){return X===91||X===92||X===93?(t.consume(X),s++,B):B(X)}}function IXe(t,e,r,n,i,a){let o;return s;function s(V){return V===34||V===39||V===40?(t.enter(n),t.enter(i),t.consume(V),t.exit(i),o=V===40?41:V,d):r(V)}function d(V){return V===o?(t.enter(i),t.consume(V),t.exit(i),t.exit(n),e):(t.enter(a),b(V))}function b(V){return V===o?(t.exit(a),d(o)):V===null?r(V):Xf(V)?(t.enter("lineEnding"),t.consume(V),t.exit("lineEnding"),Jm(t,b,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),L(V))}function L(V){return V===o||V===null||Xf(V)?(t.exit("chunkString"),b(V)):(t.consume(V),V===92?B:L)}function B(V){return V===o||V===92?(t.consume(V),L):L(V)}}function g9(t,e){let r;return n;function n(i){return Xf(i)?(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),r=!0,n):Dm(i)?Jm(t,n,r?"linePrefix":"lineSuffix")(i):e(i)}}const qur={name:"definition",tokenize:$ur},Gur={partial:!0,tokenize:Wur};function $ur(t,e,r){const n=this;let i;return a;function a(X){return t.enter("definition"),o(X)}function o(X){return kXe.call(n,t,s,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(X)}function s(X){return i=$N(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),X===58?(t.enter("definitionMarker"),t.consume(X),t.exit("definitionMarker"),d):r(X)}function d(X){return YS(X)?g9(t,b)(X):b(X)}function b(X){return RXe(t,L,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(X)}function L(X){return t.attempt(Gur,B,B)(X)}function B(X){return Dm(X)?Jm(t,V,"whitespace")(X):V(X)}function V(X){return X===null||Xf(X)?(t.exit("definition"),n.parser.defined.push(i),e(X)):r(X)}}function Wur(t,e,r){return n;function n(s){return YS(s)?g9(t,i)(s):r(s)}function i(s){return IXe(t,a,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return Dm(s)?Jm(t,o,"whitespace")(s):o(s)}function o(s){return s===null||Xf(s)?e(s):r(s)}}const Yur={name:"hardBreakEscape",tokenize:Xur};function Xur(t,e,r){return n;function n(a){return t.enter("hardBreakEscape"),t.consume(a),i}function i(a){return Xf(a)?(t.exit("hardBreakEscape"),e(a)):r(a)}}const Zur={name:"headingAtx",resolve:Kur,tokenize:Jur};function Kur(t,e){let r=t.length-2,n=3,i,a;return t[n][1].type==="whitespace"&&(n+=2),r-2>n&&t[r][1].type==="whitespace"&&(r-=2),t[r][1].type==="atxHeadingSequence"&&(n===r-1||r-4>n&&t[r-2][1].type==="whitespace")&&(r-=n+1===r?2:4),r>n&&(i={type:"atxHeadingText",start:t[n][1].start,end:t[r][1].end},a={type:"chunkText",start:t[n][1].start,end:t[r][1].end,contentType:"text"},H5(t,n,r-n+1,[["enter",i,e],["enter",a,e],["exit",a,e],["exit",i,e]])),t}function Jur(t,e,r){let n=0;return i;function i(L){return t.enter("atxHeading"),a(L)}function a(L){return t.enter("atxHeadingSequence"),o(L)}function o(L){return L===35&&n++<6?(t.consume(L),o):L===null||YS(L)?(t.exit("atxHeadingSequence"),s(L)):r(L)}function s(L){return L===35?(t.enter("atxHeadingSequence"),d(L)):L===null||Xf(L)?(t.exit("atxHeading"),e(L)):Dm(L)?Jm(t,s,"whitespace")(L):(t.enter("atxHeadingText"),b(L))}function d(L){return L===35?(t.consume(L),d):(t.exit("atxHeadingSequence"),s(L))}function b(L){return L===null||L===35||YS(L)?(t.exit("atxHeadingText"),s(L)):(t.consume(L),b)}}const Qur=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],CDe=["pre","script","style","textarea"],ecr={concrete:!0,name:"htmlFlow",resolveTo:ncr,tokenize:icr},tcr={partial:!0,tokenize:ocr},rcr={partial:!0,tokenize:acr};function ncr(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function icr(t,e,r){const n=this;let i,a,o,s,d;return b;function b(sr){return L(sr)}function L(sr){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(sr),B}function B(sr){return sr===33?(t.consume(sr),V):sr===47?(t.consume(sr),a=!0,de):sr===63?(t.consume(sr),i=3,n.interrupt?e:yt):T5(sr)?(t.consume(sr),o=String.fromCharCode(sr),ae):r(sr)}function V(sr){return sr===45?(t.consume(sr),i=2,X):sr===91?(t.consume(sr),i=5,s=0,ie):T5(sr)?(t.consume(sr),i=4,n.interrupt?e:yt):r(sr)}function X(sr){return sr===45?(t.consume(sr),n.interrupt?e:yt):r(sr)}function ie(sr){const or="CDATA[";return sr===or.charCodeAt(s++)?(t.consume(sr),s===or.length?n.interrupt?e:ht:ie):r(sr)}function de(sr){return T5(sr)?(t.consume(sr),o=String.fromCharCode(sr),ae):r(sr)}function ae(sr){if(sr===null||sr===47||sr===62||YS(sr)){const or=sr===47,Ar=o.toLowerCase();return!or&&!a&&CDe.includes(Ar)?(i=1,n.interrupt?e(sr):ht(sr)):Qur.includes(o.toLowerCase())?(i=6,or?(t.consume(sr),U):n.interrupt?e(sr):ht(sr)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(sr):a?ve(sr):Se(sr))}return sr===45||aE(sr)?(t.consume(sr),o+=String.fromCharCode(sr),ae):r(sr)}function U(sr){return sr===62?(t.consume(sr),n.interrupt?e:ht):r(sr)}function ve(sr){return Dm(sr)?(t.consume(sr),ve):nt(sr)}function Se(sr){return sr===47?(t.consume(sr),nt):sr===58||sr===95||T5(sr)?(t.consume(sr),Pe):Dm(sr)?(t.consume(sr),Se):nt(sr)}function Pe(sr){return sr===45||sr===46||sr===58||sr===95||aE(sr)?(t.consume(sr),Pe):Me(sr)}function Me(sr){return sr===61?(t.consume(sr),Ie):Dm(sr)?(t.consume(sr),Me):Se(sr)}function Ie(sr){return sr===null||sr===60||sr===61||sr===62||sr===96?r(sr):sr===34||sr===39?(t.consume(sr),d=sr,Ve):Dm(sr)?(t.consume(sr),Ie):Ze(sr)}function Ve(sr){return sr===d?(t.consume(sr),d=null,Je):sr===null||Xf(sr)?r(sr):(t.consume(sr),Ve)}function Ze(sr){return sr===null||sr===34||sr===39||sr===47||sr===60||sr===61||sr===62||sr===96||YS(sr)?Me(sr):(t.consume(sr),Ze)}function Je(sr){return sr===47||sr===62||Dm(sr)?Se(sr):r(sr)}function nt(sr){return sr===62?(t.consume(sr),ut):r(sr)}function ut(sr){return sr===null||Xf(sr)?ht(sr):Dm(sr)?(t.consume(sr),ut):r(sr)}function ht(sr){return sr===45&&i===2?(t.consume(sr),Lt):sr===60&&i===1?(t.consume(sr),dr):sr===62&&i===4?(t.consume(sr),Vt):sr===63&&i===3?(t.consume(sr),yt):sr===93&&i===5?(t.consume(sr),Cr):Xf(sr)&&(i===6||i===7)?(t.exit("htmlFlowData"),t.check(tcr,Er,_t)(sr)):sr===null||Xf(sr)?(t.exit("htmlFlowData"),_t(sr)):(t.consume(sr),ht)}function _t(sr){return t.check(rcr,Dt,Er)(sr)}function Dt(sr){return t.enter("lineEnding"),t.consume(sr),t.exit("lineEnding"),qt}function qt(sr){return sr===null||Xf(sr)?_t(sr):(t.enter("htmlFlowData"),ht(sr))}function Lt(sr){return sr===45?(t.consume(sr),yt):ht(sr)}function dr(sr){return sr===47?(t.consume(sr),o="",Zt):ht(sr)}function Zt(sr){if(sr===62){const or=o.toLowerCase();return CDe.includes(or)?(t.consume(sr),Vt):ht(sr)}return T5(sr)&&o.length<8?(t.consume(sr),o+=String.fromCharCode(sr),Zt):ht(sr)}function Cr(sr){return sr===93?(t.consume(sr),yt):ht(sr)}function yt(sr){return sr===62?(t.consume(sr),Vt):sr===45&&i===2?(t.consume(sr),yt):ht(sr)}function Vt(sr){return sr===null||Xf(sr)?(t.exit("htmlFlowData"),Er(sr)):(t.consume(sr),Vt)}function Er(sr){return t.exit("htmlFlow"),e(sr)}}function acr(t,e,r){const n=this;return i;function i(o){return Xf(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),a):r(o)}function a(o){return n.parser.lazy[n.now().line]?r(o):e(o)}}function ocr(t,e,r){return n;function n(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),t.attempt(EZ,e,r)}}const scr={name:"htmlText",tokenize:lcr};function lcr(t,e,r){const n=this;let i,a,o;return s;function s(yt){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(yt),d}function d(yt){return yt===33?(t.consume(yt),b):yt===47?(t.consume(yt),Me):yt===63?(t.consume(yt),Se):T5(yt)?(t.consume(yt),Ze):r(yt)}function b(yt){return yt===45?(t.consume(yt),L):yt===91?(t.consume(yt),a=0,ie):T5(yt)?(t.consume(yt),ve):r(yt)}function L(yt){return yt===45?(t.consume(yt),X):r(yt)}function B(yt){return yt===null?r(yt):yt===45?(t.consume(yt),V):Xf(yt)?(o=B,dr(yt)):(t.consume(yt),B)}function V(yt){return yt===45?(t.consume(yt),X):B(yt)}function X(yt){return yt===62?Lt(yt):yt===45?V(yt):B(yt)}function ie(yt){const Vt="CDATA[";return yt===Vt.charCodeAt(a++)?(t.consume(yt),a===Vt.length?de:ie):r(yt)}function de(yt){return yt===null?r(yt):yt===93?(t.consume(yt),ae):Xf(yt)?(o=de,dr(yt)):(t.consume(yt),de)}function ae(yt){return yt===93?(t.consume(yt),U):de(yt)}function U(yt){return yt===62?Lt(yt):yt===93?(t.consume(yt),U):de(yt)}function ve(yt){return yt===null||yt===62?Lt(yt):Xf(yt)?(o=ve,dr(yt)):(t.consume(yt),ve)}function Se(yt){return yt===null?r(yt):yt===63?(t.consume(yt),Pe):Xf(yt)?(o=Se,dr(yt)):(t.consume(yt),Se)}function Pe(yt){return yt===62?Lt(yt):Se(yt)}function Me(yt){return T5(yt)?(t.consume(yt),Ie):r(yt)}function Ie(yt){return yt===45||aE(yt)?(t.consume(yt),Ie):Ve(yt)}function Ve(yt){return Xf(yt)?(o=Ve,dr(yt)):Dm(yt)?(t.consume(yt),Ve):Lt(yt)}function Ze(yt){return yt===45||aE(yt)?(t.consume(yt),Ze):yt===47||yt===62||YS(yt)?Je(yt):r(yt)}function Je(yt){return yt===47?(t.consume(yt),Lt):yt===58||yt===95||T5(yt)?(t.consume(yt),nt):Xf(yt)?(o=Je,dr(yt)):Dm(yt)?(t.consume(yt),Je):Lt(yt)}function nt(yt){return yt===45||yt===46||yt===58||yt===95||aE(yt)?(t.consume(yt),nt):ut(yt)}function ut(yt){return yt===61?(t.consume(yt),ht):Xf(yt)?(o=ut,dr(yt)):Dm(yt)?(t.consume(yt),ut):Je(yt)}function ht(yt){return yt===null||yt===60||yt===61||yt===62||yt===96?r(yt):yt===34||yt===39?(t.consume(yt),i=yt,_t):Xf(yt)?(o=ht,dr(yt)):Dm(yt)?(t.consume(yt),ht):(t.consume(yt),Dt)}function _t(yt){return yt===i?(t.consume(yt),i=void 0,qt):yt===null?r(yt):Xf(yt)?(o=_t,dr(yt)):(t.consume(yt),_t)}function Dt(yt){return yt===null||yt===34||yt===39||yt===60||yt===61||yt===96?r(yt):yt===47||yt===62||YS(yt)?Je(yt):(t.consume(yt),Dt)}function qt(yt){return yt===47||yt===62||YS(yt)?Je(yt):r(yt)}function Lt(yt){return yt===62?(t.consume(yt),t.exit("htmlTextData"),t.exit("htmlText"),e):r(yt)}function dr(yt){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(yt),t.exit("lineEnding"),Zt}function Zt(yt){return Dm(yt)?Jm(t,Cr,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(yt):Cr(yt)}function Cr(yt){return t.enter("htmlTextData"),o(yt)}}const O1e={name:"labelEnd",resolveAll:dcr,resolveTo:hcr,tokenize:pcr},ucr={tokenize:vcr},ccr={tokenize:mcr},fcr={tokenize:gcr};function dcr(t){let e=-1;const r=[];for(;++e<t.length;){const n=t[e][1];if(r.push(t[e]),n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd"){const i=n.type==="labelImage"?4:2;n.type="data",e+=i}}return t.length!==r.length&&H5(t,0,t.length,r),t}function hcr(t,e){let r=t.length,n=0,i,a,o,s;for(;r--;)if(i=t[r][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;t[r][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(t[r][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=r,i.type!=="labelLink")){n=2;break}}else i.type==="labelEnd"&&(o=r);const d={type:t[a][1].type==="labelLink"?"link":"image",start:{...t[a][1].start},end:{...t[t.length-1][1].end}},b={type:"label",start:{...t[a][1].start},end:{...t[o][1].end}},L={type:"labelText",start:{...t[a+n+2][1].end},end:{...t[o-2][1].start}};return s=[["enter",d,e],["enter",b,e]],s=B3(s,t.slice(a+1,a+n+3)),s=B3(s,[["enter",L,e]]),s=B3(s,L1e(e.parser.constructs.insideSpan.null,t.slice(a+n+4,o-3),e)),s=B3(s,[["exit",L,e],t[o-2],t[o-1],["exit",b,e]]),s=B3(s,t.slice(o+1)),s=B3(s,[["exit",d,e]]),H5(t,a,t.length,s),t}function pcr(t,e,r){const n=this;let i=n.events.length,a,o;for(;i--;)if((n.events[i][1].type==="labelImage"||n.events[i][1].type==="labelLink")&&!n.events[i][1]._balanced){a=n.events[i][1];break}return s;function s(V){return a?a._inactive?B(V):(o=n.parser.defined.includes($N(n.sliceSerialize({start:a.end,end:n.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(V),t.exit("labelMarker"),t.exit("labelEnd"),d):r(V)}function d(V){return V===40?t.attempt(ucr,L,o?L:B)(V):V===91?t.attempt(ccr,L,o?b:B)(V):o?L(V):B(V)}function b(V){return t.attempt(fcr,L,B)(V)}function L(V){return e(V)}function B(V){return a._balanced=!0,r(V)}}function vcr(t,e,r){return n;function n(B){return t.enter("resource"),t.enter("resourceMarker"),t.consume(B),t.exit("resourceMarker"),i}function i(B){return YS(B)?g9(t,a)(B):a(B)}function a(B){return B===41?L(B):RXe(t,o,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(B)}function o(B){return YS(B)?g9(t,d)(B):L(B)}function s(B){return r(B)}function d(B){return B===34||B===39||B===40?IXe(t,b,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(B):L(B)}function b(B){return YS(B)?g9(t,L)(B):L(B)}function L(B){return B===41?(t.enter("resourceMarker"),t.consume(B),t.exit("resourceMarker"),t.exit("resource"),e):r(B)}}function mcr(t,e,r){const n=this;return i;function i(s){return kXe.call(n,t,a,o,"reference","referenceMarker","referenceString")(s)}function a(s){return n.parser.defined.includes($N(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?e(s):r(s)}function o(s){return r(s)}}function gcr(t,e,r){return n;function n(a){return t.enter("reference"),t.enter("referenceMarker"),t.consume(a),t.exit("referenceMarker"),i}function i(a){return a===93?(t.enter("referenceMarker"),t.consume(a),t.exit("referenceMarker"),t.exit("reference"),e):r(a)}}const ycr={name:"labelStartImage",resolveAll:O1e.resolveAll,tokenize:bcr};function bcr(t,e,r){const n=this;return i;function i(s){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(s),t.exit("labelImageMarker"),a}function a(s){return s===91?(t.enter("labelMarker"),t.consume(s),t.exit("labelMarker"),t.exit("labelImage"),o):r(s)}function o(s){return s===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(s):e(s)}}const xcr={name:"labelStartLink",resolveAll:O1e.resolveAll,tokenize:_cr};function _cr(t,e,r){const n=this;return i;function i(o){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(o),t.exit("labelMarker"),t.exit("labelLink"),a}function a(o){return o===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(o):e(o)}}const Ooe={name:"lineEnding",tokenize:wcr};function wcr(t,e){return r;function r(n){return t.enter("lineEnding"),t.consume(n),t.exit("lineEnding"),Jm(t,e,"linePrefix")}}const zG={name:"thematicBreak",tokenize:Scr};function Scr(t,e,r){let n=0,i;return a;function a(b){return t.enter("thematicBreak"),o(b)}function o(b){return i=b,s(b)}function s(b){return b===i?(t.enter("thematicBreakSequence"),d(b)):n>=3&&(b===null||Xf(b))?(t.exit("thematicBreak"),e(b)):r(b)}function d(b){return b===i?(t.consume(b),n++,d):(t.exit("thematicBreakSequence"),Dm(b)?Jm(t,s,"whitespace")(b):s(b))}}const FS={continuation:{tokenize:Ccr},exit:Rcr,name:"list",tokenize:Acr},Tcr={partial:!0,tokenize:kcr},Ecr={partial:!0,tokenize:Mcr};function Acr(t,e,r){const n=this,i=n.events[n.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(X){const ie=n.containerState.type||(X===42||X===43||X===45?"listUnordered":"listOrdered");if(ie==="listUnordered"?!n.containerState.marker||X===n.containerState.marker:cve(X)){if(n.containerState.type||(n.containerState.type=ie,t.enter(ie,{_container:!0})),ie==="listUnordered")return t.enter("listItemPrefix"),X===42||X===45?t.check(zG,r,b)(X):b(X);if(!n.interrupt||X===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),d(X)}return r(X)}function d(X){return cve(X)&&++o<10?(t.consume(X),d):(!n.interrupt||o<2)&&(n.containerState.marker?X===n.containerState.marker:X===41||X===46)?(t.exit("listItemValue"),b(X)):r(X)}function b(X){return t.enter("listItemMarker"),t.consume(X),t.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||X,t.check(EZ,n.interrupt?r:L,t.attempt(Tcr,V,B))}function L(X){return n.containerState.initialBlankLine=!0,a++,V(X)}function B(X){return Dm(X)?(t.enter("listItemPrefixWhitespace"),t.consume(X),t.exit("listItemPrefixWhitespace"),V):r(X)}function V(X){return n.containerState.size=a+n.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(X)}}function Ccr(t,e,r){const n=this;return n.containerState._closeFlow=void 0,t.check(EZ,i,a);function i(s){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,Jm(t,e,"listItemIndent",n.containerState.size+1)(s)}function a(s){return n.containerState.furtherBlankLines||!Dm(s)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,o(s)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,t.attempt(Ecr,e,o)(s))}function o(s){return n.containerState._closeFlow=!0,n.interrupt=void 0,Jm(t,t.attempt(FS,e,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function Mcr(t,e,r){const n=this;return Jm(t,i,"listItemIndent",n.containerState.size+1);function i(a){const o=n.events[n.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===n.containerState.size?e(a):r(a)}}function Rcr(t){t.exit(this.containerState.type)}function kcr(t,e,r){const n=this;return Jm(t,i,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const o=n.events[n.events.length-1];return!Dm(a)&&o&&o[1].type==="listItemPrefixWhitespace"?e(a):r(a)}}const MDe={name:"setextUnderline",resolveTo:Icr,tokenize:Pcr};function Icr(t,e){let r=t.length,n,i,a;for(;r--;)if(t[r][0]==="enter"){if(t[r][1].type==="content"){n=r;break}t[r][1].type==="paragraph"&&(i=r)}else t[r][1].type==="content"&&t.splice(r,1),!a&&t[r][1].type==="definition"&&(a=r);const o={type:"setextHeading",start:{...t[n][1].start},end:{...t[t.length-1][1].end}};return t[i][1].type="setextHeadingText",a?(t.splice(i,0,["enter",o,e]),t.splice(a+1,0,["exit",t[n][1],e]),t[n][1].end={...t[a][1].end}):t[n][1]=o,t.push(["exit",o,e]),t}function Pcr(t,e,r){const n=this;let i;return a;function a(b){let L=n.events.length,B;for(;L--;)if(n.events[L][1].type!=="lineEnding"&&n.events[L][1].type!=="linePrefix"&&n.events[L][1].type!=="content"){B=n.events[L][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||B)?(t.enter("setextHeadingLine"),i=b,o(b)):r(b)}function o(b){return t.enter("setextHeadingLineSequence"),s(b)}function s(b){return b===i?(t.consume(b),s):(t.exit("setextHeadingLineSequence"),Dm(b)?Jm(t,d,"lineSuffix")(b):d(b))}function d(b){return b===null||Xf(b)?(t.exit("setextHeadingLine"),e(b)):r(b)}}const Dcr={tokenize:Lcr};function Lcr(t){const e=this,r=t.attempt(EZ,n,t.attempt(this.parser.constructs.flowInitial,i,Jm(t,t.attempt(this.parser.constructs.flow,i,t.attempt(Bur,i)),"linePrefix")));return r;function n(a){if(a===null){t.consume(a);return}return t.enter("lineEndingBlank"),t.consume(a),t.exit("lineEndingBlank"),e.currentConstruct=void 0,r}function i(a){if(a===null){t.consume(a);return}return t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),e.currentConstruct=void 0,r}}const Ocr={resolveAll:DXe()},Ncr=PXe("string"),Fcr=PXe("text");function PXe(t){return{resolveAll:DXe(t==="text"?zcr:void 0),tokenize:e};function e(r){const n=this,i=this.parser.constructs[t],a=r.attempt(i,o,s);return o;function o(L){return b(L)?a(L):s(L)}function s(L){if(L===null){r.consume(L);return}return r.enter("data"),r.consume(L),d}function d(L){return b(L)?(r.exit("data"),a(L)):(r.consume(L),d)}function b(L){if(L===null)return!0;const B=i[L];let V=-1;if(B)for(;++V<B.length;){const X=B[V];if(!X.previous||X.previous.call(n,n.previous))return!0}return!1}}}function DXe(t){return e;function e(r,n){let i=-1,a;for(;++i<=r.length;)a===void 0?r[i]&&r[i][1].type==="data"&&(a=i,i++):(!r[i]||r[i][1].type!=="data")&&(i!==a+2&&(r[a][1].end=r[i-1][1].end,r.splice(a+2,i-a-2),i=a+2),a=void 0);return t?t(r,n):r}}function zcr(t,e){let r=0;for(;++r<=t.length;)if((r===t.length||t[r][1].type==="lineEnding")&&t[r-1][1].type==="data"){const n=t[r-1][1],i=e.sliceStream(n);let a=i.length,o=-1,s=0,d;for(;a--;){const b=i[a];if(typeof b=="string"){for(o=b.length;b.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(b===-2)d=!0,s++;else if(b!==-1){a++;break}}if(e._contentTypeTextTrailing&&r===t.length&&(s=0),s){const b={type:r===t.length||d||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?o:n.start._bufferIndex+o,_index:n.start._index+a,line:n.end.line,column:n.end.column-s,offset:n.end.offset-s},end:{...n.end}};n.end={...b.start},n.start.offset===n.end.offset?Object.assign(n,b):(t.splice(r,0,["enter",b,e],["exit",b,e]),r+=2)}r++}return t}const Bcr={42:FS,43:FS,45:FS,48:FS,49:FS,50:FS,51:FS,52:FS,53:FS,54:FS,55:FS,56:FS,57:FS,62:EXe},Ucr={91:qur},Hcr={[-2]:Loe,[-1]:Loe,32:Loe},jcr={35:Zur,42:zG,45:[MDe,zG],60:ecr,61:MDe,95:zG,96:ADe,126:ADe},Vcr={38:CXe,92:AXe},qcr={[-5]:Ooe,[-4]:Ooe,[-3]:Ooe,33:ycr,38:CXe,42:fve,60:[xur,scr],91:xcr,92:[Yur,AXe],93:O1e,95:fve,96:Dur},Gcr={null:[fve,Ocr]},$cr={null:[42,95]},Wcr={null:[]},Ycr=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:$cr,contentInitial:Ucr,disable:Wcr,document:Bcr,flow:jcr,flowInitial:Hcr,insideSpan:Gcr,string:Vcr,text:qcr},Symbol.toStringTag,{value:"Module"}));function Xcr(t,e,r){let n={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const i={},a=[];let o=[],s=[];const d={attempt:Ve(Me),check:Ve(Ie),consume:ve,enter:Se,exit:Pe,interrupt:Ve(Ie,{interrupt:!0})},b={code:null,containerState:{},defineSkip:de,events:[],now:ie,parser:t,previous:null,sliceSerialize:V,sliceStream:X,write:B};let L=e.tokenize.call(b,d);return e.resolveAll&&a.push(e),b;function B(ut){return o=B3(o,ut),ae(),o[o.length-1]!==null?[]:(Ze(e,0),b.events=L1e(a,b.events,b),b.events)}function V(ut,ht){return Kcr(X(ut),ht)}function X(ut){return Zcr(o,ut)}function ie(){const{_bufferIndex:ut,_index:ht,line:_t,column:Dt,offset:qt}=n;return{_bufferIndex:ut,_index:ht,line:_t,column:Dt,offset:qt}}function de(ut){i[ut.line]=ut.column,nt()}function ae(){let ut;for(;n._index<o.length;){const ht=o[n._index];if(typeof ht=="string")for(ut=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===ut&&n._bufferIndex<ht.length;)U(ht.charCodeAt(n._bufferIndex));else U(ht)}}function U(ut){L=L(ut)}function ve(ut){Xf(ut)?(n.line++,n.column=1,n.offset+=ut===-3?2:1,nt()):ut!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===o[n._index].length&&(n._bufferIndex=-1,n._index++)),b.previous=ut}function Se(ut,ht){const _t=ht||{};return _t.type=ut,_t.start=ie(),b.events.push(["enter",_t,b]),s.push(_t),_t}function Pe(ut){const ht=s.pop();return ht.end=ie(),b.events.push(["exit",ht,b]),ht}function Me(ut,ht){Ze(ut,ht.from)}function Ie(ut,ht){ht.restore()}function Ve(ut,ht){return _t;function _t(Dt,qt,Lt){let dr,Zt,Cr,yt;return Array.isArray(Dt)?Er(Dt):"tokenize"in Dt?Er([Dt]):Vt(Dt);function Vt(Ir){return _n;function _n(Un){const Qn=Un!==null&&Ir[Un],Jn=Un!==null&&Ir.null,Vn=[...Array.isArray(Qn)?Qn:Qn?[Qn]:[],...Array.isArray(Jn)?Jn:Jn?[Jn]:[]];return Er(Vn)(Un)}}function Er(Ir){return dr=Ir,Zt=0,Ir.length===0?Lt:sr(Ir[Zt])}function sr(Ir){return _n;function _n(Un){return yt=Je(),Cr=Ir,Ir.partial||(b.currentConstruct=Ir),Ir.name&&b.parser.constructs.disable.null.includes(Ir.name)?Ar():Ir.tokenize.call(ht?Object.assign(Object.create(b),ht):b,d,or,Ar)(Un)}}function or(Ir){return ut(Cr,yt),qt}function Ar(Ir){return yt.restore(),++Zt<dr.length?sr(dr[Zt]):Lt}}}function Ze(ut,ht){ut.resolveAll&&!a.includes(ut)&&a.push(ut),ut.resolve&&H5(b.events,ht,b.events.length-ht,ut.resolve(b.events.slice(ht),b)),ut.resolveTo&&(b.events=ut.resolveTo(b.events,b))}function Je(){const ut=ie(),ht=b.previous,_t=b.currentConstruct,Dt=b.events.length,qt=Array.from(s);return{from:Dt,restore:Lt};function Lt(){n=ut,b.previous=ht,b.currentConstruct=_t,b.events.length=Dt,s=qt,nt()}}function nt(){n.line in i&&n.column<2&&(n.column=i[n.line],n.offset+=i[n.line]-1)}}function Zcr(t,e){const r=e.start._index,n=e.start._bufferIndex,i=e.end._index,a=e.end._bufferIndex;let o;if(r===i)o=[t[r].slice(n,a)];else{if(o=t.slice(r,i),n>-1){const s=o[0];typeof s=="string"?o[0]=s.slice(n):o.shift()}a>0&&o.push(t[i].slice(0,a))}return o}function Kcr(t,e){let r=-1;const n=[];let i;for(;++r<t.length;){const a=t[r];let o;if(typeof a=="string")o=a;else switch(a){case-5:{o="\r";break}case-4:{o=`
`;break}case-3:{o=`\r
`;break}case-2:{o=e?" ":"	";break}case-1:{if(!e&&i)continue;o=" ";break}default:o=String.fromCharCode(a)}i=a===-2,n.push(o)}return n.join("")}function Jcr(t){const n={constructs:aur([Ycr,...(t||{}).extensions||[]]),content:i(hur),defined:[],document:i(vur),flow:i(Dcr),lazy:{},string:i(Ncr),text:i(Fcr)};return n;function i(a){return o;function o(s){return Xcr(n,a,s)}}}function Qcr(t){for(;!MXe(t););return t}const RDe=/[\0\t\n\r]/g;function efr(){let t=1,e="",r=!0,n;return i;function i(a,o,s){const d=[];let b,L,B,V,X;for(a=e+(typeof a=="string"?a.toString():new TextDecoder(o||void 0).decode(a)),B=0,e="",r&&(a.charCodeAt(0)===65279&&B++,r=void 0);B<a.length;){if(RDe.lastIndex=B,b=RDe.exec(a),V=b&&b.index!==void 0?b.index:a.length,X=a.charCodeAt(V),!b){e=a.slice(B);break}if(X===10&&B===V&&n)d.push(-3),n=void 0;else switch(n&&(d.push(-5),n=void 0),B<V&&(d.push(a.slice(B,V)),t+=V-B),X){case 0:{d.push(65533),t++;break}case 9:{for(L=Math.ceil(t/4)*4,d.push(-2);t++<L;)d.push(-1);break}case 10:{d.push(-4),t=1;break}default:n=!0,t=1}B=V+1}return s&&(n&&d.push(-5),e&&d.push(e),d.push(null)),d}}const tfr=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function rfr(t){return t.replace(tfr,nfr)}function nfr(t,e,r){if(e)return e;if(r.charCodeAt(0)===35){const i=r.charCodeAt(1),a=i===120||i===88;return TXe(r.slice(a?2:1),a?16:10)}return D1e(r)||t}const LXe={}.hasOwnProperty;function ifr(t,e,r){return typeof e!="string"&&(r=e,e=void 0),afr(r)(Qcr(Jcr(r).document().write(efr()(t,e,!0))))}function afr(t){const e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(gi),autolinkProtocol:Je,autolinkEmail:Je,atxHeading:a(On),blockQuote:a(Jn),characterEscape:Je,characterReference:Je,codeFenced:a(Vn),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(Vn,o),codeText:a(jn,o),codeTextData:Je,data:Je,codeFlowValue:Je,definition:a(Lr),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(Yn),hardBreakEscape:a(Sn),hardBreakTrailing:a(Sn),htmlFlow:a(bn,o),htmlFlowData:Je,htmlText:a(bn,o),htmlTextData:Je,image:a(Mn),label:o,link:a(gi),listItem:a(Pa),listItemValue:V,listOrdered:a(Oi,B),listUnordered:a(Oi),paragraph:a(va),reference:sr,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(On),strong:a(ti),thematicBreak:a(bi)},exit:{atxHeading:d(),atxHeadingSequence:Me,autolink:d(),autolinkEmail:Qn,autolinkProtocol:Un,blockQuote:d(),characterEscapeValue:nt,characterReferenceMarkerHexadecimal:Ar,characterReferenceMarkerNumeric:Ar,characterReferenceValue:Ir,characterReference:_n,codeFenced:d(ae),codeFencedFence:de,codeFencedFenceInfo:X,codeFencedFenceMeta:ie,codeFlowValue:nt,codeIndented:d(U),codeText:d(qt),codeTextData:nt,data:nt,definition:d(),definitionDestinationString:Pe,definitionLabelString:ve,definitionTitleString:Se,emphasis:d(),hardBreakEscape:d(ht),hardBreakTrailing:d(ht),htmlFlow:d(_t),htmlFlowData:nt,htmlText:d(Dt),htmlTextData:nt,image:d(dr),label:Cr,labelText:Zt,lineEnding:ut,link:d(Lt),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:or,resourceDestinationString:yt,resourceTitleString:Vt,resource:Er,setextHeading:d(Ze),setextHeadingLineSequence:Ve,setextHeadingText:Ie,strong:d(),thematicBreak:d()}};OXe(e,(t||{}).mdastExtensions||[]);const r={};return n;function n(Wn){let Ei={type:"root",children:[]};const Ki={stack:[Ei],tokenStack:[],config:e,enter:s,exit:b,buffer:o,resume:L,data:r},sa=[];let xa=-1;for(;++xa<Wn.length;)if(Wn[xa][1].type==="listOrdered"||Wn[xa][1].type==="listUnordered")if(Wn[xa][0]==="enter")sa.push(xa);else{const Qa=sa.pop();xa=i(Wn,Qa,xa)}for(xa=-1;++xa<Wn.length;){const Qa=e[Wn[xa][0]];LXe.call(Qa,Wn[xa][1].type)&&Qa[Wn[xa][1].type].call(Object.assign({sliceSerialize:Wn[xa][2].sliceSerialize},Ki),Wn[xa][1])}if(Ki.tokenStack.length>0){const Qa=Ki.tokenStack[Ki.tokenStack.length-1];(Qa[1]||kDe).call(Ki,void 0,Qa[0])}for(Ei.position={start:yP(Wn.length>0?Wn[0][1].start:{line:1,column:1,offset:0}),end:yP(Wn.length>0?Wn[Wn.length-2][1].end:{line:1,column:1,offset:0})},xa=-1;++xa<e.transforms.length;)Ei=e.transforms[xa](Ei)||Ei;return Ei}function i(Wn,Ei,Ki){let sa=Ei-1,xa=-1,Qa=!1,is,go,Co,Ko;for(;++sa<=Ki;){const Zi=Wn[sa];switch(Zi[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Zi[0]==="enter"?xa++:xa--,Ko=void 0;break}case"lineEndingBlank":{Zi[0]==="enter"&&(is&&!Ko&&!xa&&!Co&&(Co=sa),Ko=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ko=void 0}if(!xa&&Zi[0]==="enter"&&Zi[1].type==="listItemPrefix"||xa===-1&&Zi[0]==="exit"&&(Zi[1].type==="listUnordered"||Zi[1].type==="listOrdered")){if(is){let za=sa;for(go=void 0;za--;){const Ss=Wn[za];if(Ss[1].type==="lineEnding"||Ss[1].type==="lineEndingBlank"){if(Ss[0]==="exit")continue;go&&(Wn[go][1].type="lineEndingBlank",Qa=!0),Ss[1].type="lineEnding",go=za}else if(!(Ss[1].type==="linePrefix"||Ss[1].type==="blockQuotePrefix"||Ss[1].type==="blockQuotePrefixWhitespace"||Ss[1].type==="blockQuoteMarker"||Ss[1].type==="listItemIndent"))break}Co&&(!go||Co<go)&&(is._spread=!0),is.end=Object.assign({},go?Wn[go][1].start:Zi[1].end),Wn.splice(go||sa,0,["exit",is,Zi[2]]),sa++,Ki++}if(Zi[1].type==="listItemPrefix"){const za={type:"listItem",_spread:!1,start:Object.assign({},Zi[1].start),end:void 0};is=za,Wn.splice(sa,0,["enter",za,Zi[2]]),sa++,Ki++,Co=void 0,Ko=!0}}}return Wn[Ei][1]._spread=Qa,Ki}function a(Wn,Ei){return Ki;function Ki(sa){s.call(this,Wn(sa),sa),Ei&&Ei.call(this,sa)}}function o(){this.stack.push({type:"fragment",children:[]})}function s(Wn,Ei,Ki){this.stack[this.stack.length-1].children.push(Wn),this.stack.push(Wn),this.tokenStack.push([Ei,Ki||void 0]),Wn.position={start:yP(Ei.start),end:void 0}}function d(Wn){return Ei;function Ei(Ki){Wn&&Wn.call(this,Ki),b.call(this,Ki)}}function b(Wn,Ei){const Ki=this.stack.pop(),sa=this.tokenStack.pop();if(sa)sa[0].type!==Wn.type&&(Ei?Ei.call(this,Wn,sa[0]):(sa[1]||kDe).call(this,Wn,sa[0]));else throw new Error("Cannot close `"+Wn.type+"` ("+m9({start:Wn.start,end:Wn.end})+"): it’s not open");Ki.position.end=yP(Wn.end)}function L(){return nur(this.stack.pop())}function B(){this.data.expectingFirstListItemValue=!0}function V(Wn){if(this.data.expectingFirstListItemValue){const Ei=this.stack[this.stack.length-2];Ei.start=Number.parseInt(this.sliceSerialize(Wn),10),this.data.expectingFirstListItemValue=void 0}}function X(){const Wn=this.resume(),Ei=this.stack[this.stack.length-1];Ei.lang=Wn}function ie(){const Wn=this.resume(),Ei=this.stack[this.stack.length-1];Ei.meta=Wn}function de(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function ae(){const Wn=this.resume(),Ei=this.stack[this.stack.length-1];Ei.value=Wn.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function U(){const Wn=this.resume(),Ei=this.stack[this.stack.length-1];Ei.value=Wn.replace(/(\r?\n|\r)$/g,"")}function ve(Wn){const Ei=this.resume(),Ki=this.stack[this.stack.length-1];Ki.label=Ei,Ki.identifier=$N(this.sliceSerialize(Wn)).toLowerCase()}function Se(){const Wn=this.resume(),Ei=this.stack[this.stack.length-1];Ei.title=Wn}function Pe(){const Wn=this.resume(),Ei=this.stack[this.stack.length-1];Ei.url=Wn}function Me(Wn){const Ei=this.stack[this.stack.length-1];if(!Ei.depth){const Ki=this.sliceSerialize(Wn).length;Ei.depth=Ki}}function Ie(){this.data.setextHeadingSlurpLineEnding=!0}function Ve(Wn){const Ei=this.stack[this.stack.length-1];Ei.depth=this.sliceSerialize(Wn).codePointAt(0)===61?1:2}function Ze(){this.data.setextHeadingSlurpLineEnding=void 0}function Je(Wn){const Ki=this.stack[this.stack.length-1].children;let sa=Ki[Ki.length-1];(!sa||sa.type!=="text")&&(sa=Tn(),sa.position={start:yP(Wn.start),end:void 0},Ki.push(sa)),this.stack.push(sa)}function nt(Wn){const Ei=this.stack.pop();Ei.value+=this.sliceSerialize(Wn),Ei.position.end=yP(Wn.end)}function ut(Wn){const Ei=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ki=Ei.children[Ei.children.length-1];Ki.position.end=yP(Wn.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(Ei.type)&&(Je.call(this,Wn),nt.call(this,Wn))}function ht(){this.data.atHardBreak=!0}function _t(){const Wn=this.resume(),Ei=this.stack[this.stack.length-1];Ei.value=Wn}function Dt(){const Wn=this.resume(),Ei=this.stack[this.stack.length-1];Ei.value=Wn}function qt(){const Wn=this.resume(),Ei=this.stack[this.stack.length-1];Ei.value=Wn}function Lt(){const Wn=this.stack[this.stack.length-1];if(this.data.inReference){const Ei=this.data.referenceType||"shortcut";Wn.type+="Reference",Wn.referenceType=Ei,delete Wn.url,delete Wn.title}else delete Wn.identifier,delete Wn.label;this.data.referenceType=void 0}function dr(){const Wn=this.stack[this.stack.length-1];if(this.data.inReference){const Ei=this.data.referenceType||"shortcut";Wn.type+="Reference",Wn.referenceType=Ei,delete Wn.url,delete Wn.title}else delete Wn.identifier,delete Wn.label;this.data.referenceType=void 0}function Zt(Wn){const Ei=this.sliceSerialize(Wn),Ki=this.stack[this.stack.length-2];Ki.label=rfr(Ei),Ki.identifier=$N(Ei).toLowerCase()}function Cr(){const Wn=this.stack[this.stack.length-1],Ei=this.resume(),Ki=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ki.type==="link"){const sa=Wn.children;Ki.children=sa}else Ki.alt=Ei}function yt(){const Wn=this.resume(),Ei=this.stack[this.stack.length-1];Ei.url=Wn}function Vt(){const Wn=this.resume(),Ei=this.stack[this.stack.length-1];Ei.title=Wn}function Er(){this.data.inReference=void 0}function sr(){this.data.referenceType="collapsed"}function or(Wn){const Ei=this.resume(),Ki=this.stack[this.stack.length-1];Ki.label=Ei,Ki.identifier=$N(this.sliceSerialize(Wn)).toLowerCase(),this.data.referenceType="full"}function Ar(Wn){this.data.characterReferenceType=Wn.type}function Ir(Wn){const Ei=this.sliceSerialize(Wn),Ki=this.data.characterReferenceType;let sa;Ki?(sa=TXe(Ei,Ki==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):sa=D1e(Ei);const xa=this.stack[this.stack.length-1];xa.value+=sa}function _n(Wn){const Ei=this.stack.pop();Ei.position.end=yP(Wn.end)}function Un(Wn){nt.call(this,Wn);const Ei=this.stack[this.stack.length-1];Ei.url=this.sliceSerialize(Wn)}function Qn(Wn){nt.call(this,Wn);const Ei=this.stack[this.stack.length-1];Ei.url="mailto:"+this.sliceSerialize(Wn)}function Jn(){return{type:"blockquote",children:[]}}function Vn(){return{type:"code",lang:null,meta:null,value:""}}function jn(){return{type:"inlineCode",value:""}}function Lr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Yn(){return{type:"emphasis",children:[]}}function On(){return{type:"heading",depth:0,children:[]}}function Sn(){return{type:"break"}}function bn(){return{type:"html",value:""}}function Mn(){return{type:"image",title:null,url:"",alt:null}}function gi(){return{type:"link",title:null,url:"",children:[]}}function Oi(Wn){return{type:"list",ordered:Wn.type==="listOrdered",start:null,spread:Wn._spread,children:[]}}function Pa(Wn){return{type:"listItem",spread:Wn._spread,checked:null,children:[]}}function va(){return{type:"paragraph",children:[]}}function ti(){return{type:"strong",children:[]}}function Tn(){return{type:"text",value:""}}function bi(){return{type:"thematicBreak"}}}function yP(t){return{line:t.line,column:t.column,offset:t.offset}}function OXe(t,e){let r=-1;for(;++r<e.length;){const n=e[r];Array.isArray(n)?OXe(t,n):ofr(t,n)}}function ofr(t,e){let r;for(r in e)if(LXe.call(e,r))switch(r){case"canContainEols":{const n=e[r];n&&t[r].push(...n);break}case"transforms":{const n=e[r];n&&t[r].push(...n);break}case"enter":case"exit":{const n=e[r];n&&Object.assign(t[r],n);break}}}function kDe(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+m9({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+m9({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+m9({start:e.start,end:e.end})+") is still open")}function sfr(t){const e=this;e.parser=r;function r(n){return ifr(n,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}function lfr(t,e){const r={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(e),!0)};return t.patch(e,r),t.applyData(e,r)}function ufr(t,e){const r={type:"element",tagName:"br",properties:{},children:[]};return t.patch(e,r),[t.applyData(e,r),{type:"text",value:`
`}]}function cfr(t,e){const r=e.value?e.value+`
`:"",n={};e.lang&&(n.className=["language-"+e.lang]);let i={type:"element",tagName:"code",properties:n,children:[{type:"text",value:r}]};return e.meta&&(i.data={meta:e.meta}),t.patch(e,i),i=t.applyData(e,i),i={type:"element",tagName:"pre",properties:{},children:[i]},t.patch(e,i),i}function ffr(t,e){const r={type:"element",tagName:"del",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}function dfr(t,e){const r={type:"element",tagName:"em",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}function hfr(t,e){const r=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",n=String(e.identifier).toUpperCase(),i=SF(n.toLowerCase()),a=t.footnoteOrder.indexOf(n);let o,s=t.footnoteCounts.get(n);s===void 0?(s=0,t.footnoteOrder.push(n),o=t.footnoteOrder.length):o=a+1,s+=1,t.footnoteCounts.set(n,s);const d={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+i,id:r+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};t.patch(e,d);const b={type:"element",tagName:"sup",properties:{},children:[d]};return t.patch(e,b),t.applyData(e,b)}function pfr(t,e){const r={type:"element",tagName:"h"+e.depth,properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}function vfr(t,e){if(t.options.allowDangerousHtml){const r={type:"raw",value:e.value};return t.patch(e,r),t.applyData(e,r)}}function NXe(t,e){const r=e.referenceType;let n="]";if(r==="collapsed"?n+="[]":r==="full"&&(n+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+n}];const i=t.all(e),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=n:i.push({type:"text",value:n}),i}function mfr(t,e){const r=String(e.identifier).toUpperCase(),n=t.definitionById.get(r);if(!n)return NXe(t,e);const i={src:SF(n.url||""),alt:e.alt};n.title!==null&&n.title!==void 0&&(i.title=n.title);const a={type:"element",tagName:"img",properties:i,children:[]};return t.patch(e,a),t.applyData(e,a)}function gfr(t,e){const r={src:SF(e.url)};e.alt!==null&&e.alt!==void 0&&(r.alt=e.alt),e.title!==null&&e.title!==void 0&&(r.title=e.title);const n={type:"element",tagName:"img",properties:r,children:[]};return t.patch(e,n),t.applyData(e,n)}function yfr(t,e){const r={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};t.patch(e,r);const n={type:"element",tagName:"code",properties:{},children:[r]};return t.patch(e,n),t.applyData(e,n)}function bfr(t,e){const r=String(e.identifier).toUpperCase(),n=t.definitionById.get(r);if(!n)return NXe(t,e);const i={href:SF(n.url||"")};n.title!==null&&n.title!==void 0&&(i.title=n.title);const a={type:"element",tagName:"a",properties:i,children:t.all(e)};return t.patch(e,a),t.applyData(e,a)}function xfr(t,e){const r={href:SF(e.url)};e.title!==null&&e.title!==void 0&&(r.title=e.title);const n={type:"element",tagName:"a",properties:r,children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function _fr(t,e,r){const n=t.all(e),i=r?wfr(r):FXe(e),a={},o=[];if(typeof e.checked=="boolean"){const L=n[0];let B;L&&L.type==="element"&&L.tagName==="p"?B=L:(B={type:"element",tagName:"p",properties:{},children:[]},n.unshift(B)),B.children.length>0&&B.children.unshift({type:"text",value:" "}),B.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let s=-1;for(;++s<n.length;){const L=n[s];(i||s!==0||L.type!=="element"||L.tagName!=="p")&&o.push({type:"text",value:`
`}),L.type==="element"&&L.tagName==="p"&&!i?o.push(...L.children):o.push(L)}const d=n[n.length-1];d&&(i||d.type!=="element"||d.tagName!=="p")&&o.push({type:"text",value:`
`});const b={type:"element",tagName:"li",properties:a,children:o};return t.patch(e,b),t.applyData(e,b)}function wfr(t){let e=!1;if(t.type==="list"){e=t.spread||!1;const r=t.children;let n=-1;for(;!e&&++n<r.length;)e=FXe(r[n])}return e}function FXe(t){const e=t.spread;return e??t.children.length>1}function Sfr(t,e){const r={},n=t.all(e);let i=-1;for(typeof e.start=="number"&&e.start!==1&&(r.start=e.start);++i<n.length;){const o=n[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const a={type:"element",tagName:e.ordered?"ol":"ul",properties:r,children:t.wrap(n,!0)};return t.patch(e,a),t.applyData(e,a)}function Tfr(t,e){const r={type:"element",tagName:"p",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}function Efr(t,e){const r={type:"root",children:t.wrap(t.all(e))};return t.patch(e,r),t.applyData(e,r)}function Afr(t,e){const r={type:"element",tagName:"strong",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}function Cfr(t,e){const r=t.all(e),n=r.shift(),i=[];if(n){const o={type:"element",tagName:"thead",properties:{},children:t.wrap([n],!0)};t.patch(e.children[0],o),i.push(o)}if(r.length>0){const o={type:"element",tagName:"tbody",properties:{},children:t.wrap(r,!0)},s=R1e(e.children[1]),d=gXe(e.children[e.children.length-1]);s&&d&&(o.position={start:s,end:d}),i.push(o)}const a={type:"element",tagName:"table",properties:{},children:t.wrap(i,!0)};return t.patch(e,a),t.applyData(e,a)}function Mfr(t,e,r){const n=r?r.children:void 0,a=(n?n.indexOf(e):1)===0?"th":"td",o=r&&r.type==="table"?r.align:void 0,s=o?o.length:e.children.length;let d=-1;const b=[];for(;++d<s;){const B=e.children[d],V={},X=o?o[d]:void 0;X&&(V.align=X);let ie={type:"element",tagName:a,properties:V,children:[]};B&&(ie.children=t.all(B),t.patch(B,ie),ie=t.applyData(B,ie)),b.push(ie)}const L={type:"element",tagName:"tr",properties:{},children:t.wrap(b,!0)};return t.patch(e,L),t.applyData(e,L)}function Rfr(t,e){const r={type:"element",tagName:"td",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}const IDe=9,PDe=32;function kfr(t){const e=String(t),r=/\r?\n|\r/g;let n=r.exec(e),i=0;const a=[];for(;n;)a.push(DDe(e.slice(i,n.index),i>0,!0),n[0]),i=n.index+n[0].length,n=r.exec(e);return a.push(DDe(e.slice(i),i>0,!1)),a.join("")}function DDe(t,e,r){let n=0,i=t.length;if(e){let a=t.codePointAt(n);for(;a===IDe||a===PDe;)n++,a=t.codePointAt(n)}if(r){let a=t.codePointAt(i-1);for(;a===IDe||a===PDe;)i--,a=t.codePointAt(i-1)}return i>n?t.slice(n,i):""}function Ifr(t,e){const r={type:"text",value:kfr(String(e.value))};return t.patch(e,r),t.applyData(e,r)}function Pfr(t,e){const r={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(e,r),t.applyData(e,r)}const Dfr={blockquote:lfr,break:ufr,code:cfr,delete:ffr,emphasis:dfr,footnoteReference:hfr,heading:pfr,html:vfr,imageReference:mfr,image:gfr,inlineCode:yfr,linkReference:bfr,link:xfr,listItem:_fr,list:Sfr,paragraph:Tfr,root:Efr,strong:Afr,table:Cfr,tableCell:Rfr,tableRow:Mfr,text:Ifr,thematicBreak:Pfr,toml:Pq,yaml:Pq,definition:Pq,footnoteDefinition:Pq};function Pq(){}const zXe=-1,AZ=0,y9=1,OW=2,N1e=3,F1e=4,z1e=5,B1e=6,BXe=7,UXe=8,LDe=typeof self=="object"?self:globalThis,Lfr=(t,e)=>{const r=(i,a)=>(t.set(a,i),i),n=i=>{if(t.has(i))return t.get(i);const[a,o]=e[i];switch(a){case AZ:case zXe:return r(o,i);case y9:{const s=r([],i);for(const d of o)s.push(n(d));return s}case OW:{const s=r({},i);for(const[d,b]of o)s[n(d)]=n(b);return s}case N1e:return r(new Date(o),i);case F1e:{const{source:s,flags:d}=o;return r(new RegExp(s,d),i)}case z1e:{const s=r(new Map,i);for(const[d,b]of o)s.set(n(d),n(b));return s}case B1e:{const s=r(new Set,i);for(const d of o)s.add(n(d));return s}case BXe:{const{name:s,message:d}=o;return r(new LDe[s](d),i)}case UXe:return r(BigInt(o),i);case"BigInt":return r(Object(BigInt(o)),i);case"ArrayBuffer":return r(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:s}=new Uint8Array(o);return r(new DataView(s),o)}}return r(new LDe[a](o),i)};return n},ODe=t=>Lfr(new Map,t)(0),lN="",{toString:Ofr}={},{keys:Nfr}=Object,bz=t=>{const e=typeof t;if(e!=="object"||!t)return[AZ,e];const r=Ofr.call(t).slice(8,-1);switch(r){case"Array":return[y9,lN];case"Object":return[OW,lN];case"Date":return[N1e,lN];case"RegExp":return[F1e,lN];case"Map":return[z1e,lN];case"Set":return[B1e,lN];case"DataView":return[y9,r]}return r.includes("Array")?[y9,r]:r.includes("Error")?[BXe,r]:[OW,r]},Dq=([t,e])=>t===AZ&&(e==="function"||e==="symbol"),Ffr=(t,e,r,n)=>{const i=(o,s)=>{const d=n.push(o)-1;return r.set(s,d),d},a=o=>{if(r.has(o))return r.get(o);let[s,d]=bz(o);switch(s){case AZ:{let L=o;switch(d){case"bigint":s=UXe,L=o.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+d);L=null;break;case"undefined":return i([zXe],o)}return i([s,L],o)}case y9:{if(d){let V=o;return d==="DataView"?V=new Uint8Array(o.buffer):d==="ArrayBuffer"&&(V=new Uint8Array(o)),i([d,[...V]],o)}const L=[],B=i([s,L],o);for(const V of o)L.push(a(V));return B}case OW:{if(d)switch(d){case"BigInt":return i([d,o.toString()],o);case"Boolean":case"Number":case"String":return i([d,o.valueOf()],o)}if(e&&"toJSON"in o)return a(o.toJSON());const L=[],B=i([s,L],o);for(const V of Nfr(o))(t||!Dq(bz(o[V])))&&L.push([a(V),a(o[V])]);return B}case N1e:return i([s,o.toISOString()],o);case F1e:{const{source:L,flags:B}=o;return i([s,{source:L,flags:B}],o)}case z1e:{const L=[],B=i([s,L],o);for(const[V,X]of o)(t||!(Dq(bz(V))||Dq(bz(X))))&&L.push([a(V),a(X)]);return B}case B1e:{const L=[],B=i([s,L],o);for(const V of o)(t||!Dq(bz(V)))&&L.push(a(V));return B}}const{message:b}=o;return i([s,{name:d,message:b}],o)};return a},NDe=(t,{json:e,lossy:r}={})=>{const n=[];return Ffr(!(e||r),!!e,new Map,n)(t),n},NW=typeof structuredClone=="function"?(t,e)=>e&&("json"in e||"lossy"in e)?ODe(NDe(t,e)):structuredClone(t):(t,e)=>ODe(NDe(t,e));function zfr(t,e){const r=[{type:"text",value:"↩"}];return e>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(e)}]}),r}function Bfr(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}function Ufr(t){const e=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=t.options.footnoteBackContent||zfr,n=t.options.footnoteBackLabel||Bfr,i=t.options.footnoteLabel||"Footnotes",a=t.options.footnoteLabelTagName||"h2",o=t.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let d=-1;for(;++d<t.footnoteOrder.length;){const b=t.footnoteById.get(t.footnoteOrder[d]);if(!b)continue;const L=t.all(b),B=String(b.identifier).toUpperCase(),V=SF(B.toLowerCase());let X=0;const ie=[],de=t.footnoteCounts.get(B);for(;de!==void 0&&++X<=de;){ie.length>0&&ie.push({type:"text",value:" "});let ve=typeof r=="string"?r:r(d,X);typeof ve=="string"&&(ve={type:"text",value:ve}),ie.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+V+(X>1?"-"+X:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(d,X),className:["data-footnote-backref"]},children:Array.isArray(ve)?ve:[ve]})}const ae=L[L.length-1];if(ae&&ae.type==="element"&&ae.tagName==="p"){const ve=ae.children[ae.children.length-1];ve&&ve.type==="text"?ve.value+=" ":ae.children.push({type:"text",value:" "}),ae.children.push(...ie)}else L.push(...ie);const U={type:"element",tagName:"li",properties:{id:e+"fn-"+V},children:t.wrap(L,!0)};t.patch(b,U),s.push(U)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...NW(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
`},{type:"element",tagName:"ol",properties:{},children:t.wrap(s,!0)},{type:"text",value:`
`}]}}const dve={}.hasOwnProperty,Hfr={};function jfr(t,e){const r=e||Hfr,n=new Map,i=new Map,a=new Map,o={...Dfr,...r.handlers},s={all:b,applyData:qfr,definitionById:n,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:o,one:d,options:r,patch:Vfr,wrap:$fr};return C1e(t,function(L){if(L.type==="definition"||L.type==="footnoteDefinition"){const B=L.type==="definition"?n:i,V=String(L.identifier).toUpperCase();B.has(V)||B.set(V,L)}}),s;function d(L,B){const V=L.type,X=s.handlers[V];if(dve.call(s.handlers,V)&&X)return X(s,L,B);if(s.options.passThrough&&s.options.passThrough.includes(V)){if("children"in L){const{children:de,...ae}=L,U=NW(ae);return U.children=s.all(L),U}return NW(L)}return(s.options.unknownHandler||Gfr)(s,L,B)}function b(L){const B=[];if("children"in L){const V=L.children;let X=-1;for(;++X<V.length;){const ie=s.one(V[X],L);if(ie){if(X&&V[X-1].type==="break"&&(!Array.isArray(ie)&&ie.type==="text"&&(ie.value=FDe(ie.value)),!Array.isArray(ie)&&ie.type==="element")){const de=ie.children[0];de&&de.type==="text"&&(de.value=FDe(de.value))}Array.isArray(ie)?B.push(...ie):B.push(ie)}}}return B}}function Vfr(t,e){t.position&&(e.position=Olr(t))}function qfr(t,e){let r=e;if(t&&t.data){const n=t.data.hName,i=t.data.hChildren,a=t.data.hProperties;if(typeof n=="string")if(r.type==="element")r.tagName=n;else{const o="children"in r?r.children:[r];r={type:"element",tagName:n,properties:{},children:o}}r.type==="element"&&a&&Object.assign(r.properties,NW(a)),"children"in r&&r.children&&i!==null&&i!==void 0&&(r.children=i)}return r}function Gfr(t,e){const r=e.data||{},n="value"in e&&!(dve.call(r,"hProperties")||dve.call(r,"hChildren"))?{type:"text",value:e.value}:{type:"element",tagName:"div",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function $fr(t,e){const r=[];let n=-1;for(e&&r.push({type:"text",value:`
`});++n<t.length;)n&&r.push({type:"text",value:`
`}),r.push(t[n]);return e&&t.length>0&&r.push({type:"text",value:`
`}),r}function FDe(t){let e=0,r=t.charCodeAt(e);for(;r===9||r===32;)e++,r=t.charCodeAt(e);return t.slice(e)}function zDe(t,e){const r=jfr(t,e),n=r.one(t,void 0),i=Ufr(r),a=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
`},i),a}function Wfr(t,e){return t&&"run"in t?async function(r,n){const i=zDe(r,{file:n,...e});await t.run(i,n)}:function(r,n){return zDe(r,{file:n,...t||e})}}function BDe(t){if(t)throw t}var Noe,UDe;function Yfr(){if(UDe)return Noe;UDe=1;var t=Object.prototype.hasOwnProperty,e=Object.prototype.toString,r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,i=function(b){return typeof Array.isArray=="function"?Array.isArray(b):e.call(b)==="[object Array]"},a=function(b){if(!b||e.call(b)!=="[object Object]")return!1;var L=t.call(b,"constructor"),B=b.constructor&&b.constructor.prototype&&t.call(b.constructor.prototype,"isPrototypeOf");if(b.constructor&&!L&&!B)return!1;var V;for(V in b);return typeof V>"u"||t.call(b,V)},o=function(b,L){r&&L.name==="__proto__"?r(b,L.name,{enumerable:!0,configurable:!0,value:L.newValue,writable:!0}):b[L.name]=L.newValue},s=function(b,L){if(L==="__proto__")if(t.call(b,L)){if(n)return n(b,L).value}else return;return b[L]};return Noe=function d(){var b,L,B,V,X,ie,de=arguments[0],ae=1,U=arguments.length,ve=!1;for(typeof de=="boolean"&&(ve=de,de=arguments[1]||{},ae=2),(de==null||typeof de!="object"&&typeof de!="function")&&(de={});ae<U;++ae)if(b=arguments[ae],b!=null)for(L in b)B=s(de,L),V=s(b,L),de!==V&&(ve&&V&&(a(V)||(X=i(V)))?(X?(X=!1,ie=B&&i(B)?B:[]):ie=B&&a(B)?B:{},o(de,{name:L,newValue:d(ve,ie,V)})):typeof V<"u"&&o(de,{name:L,newValue:V}));return de},Noe}var Xfr=Yfr();const Foe=Qh(Xfr);function hve(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function Zfr(){const t=[],e={run:r,use:n};return e;function r(...i){let a=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);s(null,...i);function s(d,...b){const L=t[++a];let B=-1;if(d){o(d);return}for(;++B<i.length;)(b[B]===null||b[B]===void 0)&&(b[B]=i[B]);i=b,L?Kfr(L,s)(...b):o(null,...b)}}function n(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return t.push(i),e}}function Kfr(t,e){let r;return n;function n(...o){const s=t.length>o.length;let d;s&&o.push(i);try{d=t.apply(this,o)}catch(b){const L=b;if(s&&r)throw L;return i(L)}s||(d&&d.then&&typeof d.then=="function"?d.then(a,i):d instanceof Error?i(d):a(d))}function i(o,...s){r||(r=!0,e(o,...s))}function a(o){i(null,o)}}const h5={basename:Jfr,dirname:Qfr,extname:edr,join:tdr,sep:"/"};function Jfr(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');CU(t);let r=0,n=-1,i=t.length,a;if(e===void 0||e.length===0||e.length>t.length){for(;i--;)if(t.codePointAt(i)===47){if(a){r=i+1;break}}else n<0&&(a=!0,n=i+1);return n<0?"":t.slice(r,n)}if(e===t)return"";let o=-1,s=e.length-1;for(;i--;)if(t.codePointAt(i)===47){if(a){r=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(t.codePointAt(i)===e.codePointAt(s--)?s<0&&(n=i):(s=-1,n=o));return r===n?n=o:n<0&&(n=t.length),t.slice(r,n)}function Qfr(t){if(CU(t),t.length===0)return".";let e=-1,r=t.length,n;for(;--r;)if(t.codePointAt(r)===47){if(n){e=r;break}}else n||(n=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function edr(t){CU(t);let e=t.length,r=-1,n=0,i=-1,a=0,o;for(;e--;){const s=t.codePointAt(e);if(s===47){if(o){n=e+1;break}continue}r<0&&(o=!0,r=e+1),s===46?i<0?i=e:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||r<0||a===0||a===1&&i===r-1&&i===n+1?"":t.slice(i,r)}function tdr(...t){let e=-1,r;for(;++e<t.length;)CU(t[e]),t[e]&&(r=r===void 0?t[e]:r+"/"+t[e]);return r===void 0?".":rdr(r)}function rdr(t){CU(t);const e=t.codePointAt(0)===47;let r=ndr(t,!e);return r.length===0&&!e&&(r="."),r.length>0&&t.codePointAt(t.length-1)===47&&(r+="/"),e?"/"+r:r}function ndr(t,e){let r="",n=0,i=-1,a=0,o=-1,s,d;for(;++o<=t.length;){if(o<t.length)s=t.codePointAt(o);else{if(s===47)break;s=47}if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(r.length<2||n!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(d=r.lastIndexOf("/"),d!==r.length-1){d<0?(r="",n=0):(r=r.slice(0,d),n=r.length-1-r.lastIndexOf("/")),i=o,a=0;continue}}else if(r.length>0){r="",n=0,i=o,a=0;continue}}e&&(r=r.length>0?r+"/..":"..",n=2)}else r.length>0?r+="/"+t.slice(i+1,o):r=t.slice(i+1,o),n=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return r}function CU(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const idr={cwd:adr};function adr(){return"/"}function pve(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function odr(t){if(typeof t=="string")t=new URL(t);else if(!pve(t)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return sdr(t)}function sdr(t){if(t.hostname!==""){const n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}const e=t.pathname;let r=-1;for(;++r<e.length;)if(e.codePointAt(r)===37&&e.codePointAt(r+1)===50){const n=e.codePointAt(r+2);if(n===70||n===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(e)}const zoe=["history","path","basename","stem","extname","dirname"];class HXe{constructor(e){let r;e?pve(e)?r={path:e}:typeof e=="string"||ldr(e)?r={value:e}:r=e:r={},this.cwd="cwd"in r?"":idr.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<zoe.length;){const a=zoe[n];a in r&&r[a]!==void 0&&r[a]!==null&&(this[a]=a==="history"?[...r[a]]:r[a])}let i;for(i in r)zoe.includes(i)||(this[i]=r[i])}get basename(){return typeof this.path=="string"?h5.basename(this.path):void 0}set basename(e){Uoe(e,"basename"),Boe(e,"basename"),this.path=h5.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?h5.dirname(this.path):void 0}set dirname(e){HDe(this.basename,"dirname"),this.path=h5.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?h5.extname(this.path):void 0}set extname(e){if(Boe(e,"extname"),HDe(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=h5.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){pve(e)&&(e=odr(e)),Uoe(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?h5.basename(this.path,this.extname):void 0}set stem(e){Uoe(e,"stem"),Boe(e,"stem"),this.path=h5.join(this.dirname||"",e+(this.extname||""))}fail(e,r,n){const i=this.message(e,r,n);throw i.fatal=!0,i}info(e,r,n){const i=this.message(e,r,n);return i.fatal=void 0,i}message(e,r,n){const i=new Yw(e,r,n);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}}function Boe(t,e){if(t&&t.includes(h5.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+h5.sep+"`")}function Uoe(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}function HDe(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}function ldr(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const udr=(function(t){const n=this.constructor.prototype,i=n[t],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,n),a}),cdr={}.hasOwnProperty;class U1e extends udr{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Zfr()}copy(){const e=new U1e;let r=-1;for(;++r<this.attachers.length;){const n=this.attachers[r];e.use(...n)}return e.data(Foe(!0,{},this.namespace)),e}data(e,r){return typeof e=="string"?arguments.length===2?(Voe("data",this.frozen),this.namespace[e]=r,this):cdr.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Voe("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);const i=r.call(e,...n);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const r=Lq(e),n=this.parser||this.Parser;return Hoe("parse",n),n(String(r),r)}process(e,r){const n=this;return this.freeze(),Hoe("process",this.parser||this.Parser),joe("process",this.compiler||this.Compiler),r?i(void 0,r):new Promise(i);function i(a,o){const s=Lq(e),d=n.parse(s);n.run(d,s,function(L,B,V){if(L||!B||!V)return b(L);const X=B,ie=n.stringify(X,V);hdr(ie)?V.value=ie:V.result=ie,b(L,V)});function b(L,B){L||!B?o(L):a?a(B):r(void 0,B)}}}processSync(e){let r=!1,n;return this.freeze(),Hoe("processSync",this.parser||this.Parser),joe("processSync",this.compiler||this.Compiler),this.process(e,i),VDe("processSync","process",r),n;function i(a,o){r=!0,BDe(a),n=o}}run(e,r,n){jDe(e),this.freeze();const i=this.transformers;return!n&&typeof r=="function"&&(n=r,r=void 0),n?a(void 0,n):new Promise(a);function a(o,s){const d=Lq(r);i.run(e,d,b);function b(L,B,V){const X=B||e;L?s(L):o?o(X):n(void 0,X,V)}}}runSync(e,r){let n=!1,i;return this.run(e,r,a),VDe("runSync","run",n),i;function a(o,s){BDe(o),i=s,n=!0}}stringify(e,r){this.freeze();const n=Lq(r),i=this.compiler||this.Compiler;return joe("stringify",i),jDe(e),i(e,n)}use(e,...r){const n=this.attachers,i=this.namespace;if(Voe("use",this.frozen),e!=null)if(typeof e=="function")d(e,r);else if(typeof e=="object")Array.isArray(e)?s(e):o(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function a(b){if(typeof b=="function")d(b,[]);else if(typeof b=="object")if(Array.isArray(b)){const[L,...B]=b;d(L,B)}else o(b);else throw new TypeError("Expected usable value, not `"+b+"`")}function o(b){if(!("plugins"in b)&&!("settings"in b))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(b.plugins),b.settings&&(i.settings=Foe(!0,i.settings,b.settings))}function s(b){let L=-1;if(b!=null)if(Array.isArray(b))for(;++L<b.length;){const B=b[L];a(B)}else throw new TypeError("Expected a list of plugins, not `"+b+"`")}function d(b,L){let B=-1,V=-1;for(;++B<n.length;)if(n[B][0]===b){V=B;break}if(V===-1)n.push([b,...L]);else if(L.length>0){let[X,...ie]=L;const de=n[V][1];hve(de)&&hve(X)&&(X=Foe(!0,de,X)),n[V]=[b,X,...ie]}}}}const fdr=new U1e().freeze();function Hoe(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function joe(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function Voe(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function jDe(t){if(!hve(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function VDe(t,e,r){if(!r)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function Lq(t){return ddr(t)?t:new HXe(t)}function ddr(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function hdr(t){return typeof t=="string"||pdr(t)}function pdr(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const vdr="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",qDe=[],GDe={allowDangerousHtml:!0},mdr=/^(https?|ircs?|mailto|xmpp)$/i,gdr=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function ydr(t){const e=bdr(t),r=xdr(t);return _dr(e.runSync(e.parse(r),r),t)}function bdr(t){const e=t.rehypePlugins||qDe,r=t.remarkPlugins||qDe,n=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...GDe}:GDe;return fdr().use(sfr).use(r).use(Wfr,n).use(e)}function xdr(t){const e=t.children||"",r=new HXe;return typeof e=="string"&&(r.value=e),r}function _dr(t,e){const r=e.allowedElements,n=e.allowElement,i=e.components,a=e.disallowedElements,o=e.skipHtml,s=e.unwrapDisallowed,d=e.urlTransform||wdr;for(const L of gdr)Object.hasOwn(e,L.from)&&(""+L.from+(L.to?"use `"+L.to+"` instead":"remove it")+vdr+L.id,void 0);return C1e(t,b),Ulr(t,{Fragment:Ke.Fragment,components:i,ignoreInvalidStyle:!0,jsx:Ke.jsx,jsxs:Ke.jsxs,passKeys:!0,passNode:!0});function b(L,B,V){if(L.type==="raw"&&V&&typeof B=="number")return o?V.children.splice(B,1):V.children[B]={type:"text",value:L.value},B;if(L.type==="element"){let X;for(X in Doe)if(Object.hasOwn(Doe,X)&&Object.hasOwn(L.properties,X)){const ie=L.properties[X],de=Doe[X];(de===null||de.includes(L.tagName))&&(L.properties[X]=d(String(ie||""),X,L))}}if(L.type==="element"){let X=r?!r.includes(L.tagName):a?a.includes(L.tagName):!1;if(!X&&n&&typeof B=="number"&&(X=!n(L,B,V)),X&&V&&typeof B=="number")return s&&L.children?V.children.splice(B,1,...L.children):V.children.splice(B,1),B}}}function wdr(t){const e=t.indexOf(":"),r=t.indexOf("?"),n=t.indexOf("#"),i=t.indexOf("/");return e===-1||i!==-1&&e>i||r!==-1&&e>r||n!==-1&&e>n||mdr.test(t.slice(0,e))?t:""}const Sdr=(t,e=30)=>PNt({queryKey:["chat",t],queryFn:async({pageParam:r})=>{const n=new URLSearchParams;n.append("limit",e.toString()),r&&n.append("before",r.toString());const i=await fetch(`/api/rooms/${t}/chat/messages?${n}`);if(!i.ok)throw new Error("Failed to fetch messages");return i.json()},getNextPageParam:r=>r.metadata.hasMore?r.metadata.oldestTimestamp:void 0,initialPageParam:void 0,enabled:!!t,staleTime:1e3*60}),Tdr=t=>RL({mutationFn:async e=>new Promise((r,n)=>{Yf.emit("chat:message:create",{content:e},i=>{i.success?r(i.message):n(new Error(i.error))})})}),Edr=t=>RL({mutationFn:async({messageId:e,content:r})=>new Promise((n,i)=>{Yf.emit("chat:message:edit",{messageId:e,content:r},a=>{a.success?n(a.message):i(new Error(a.error))})})});var Adr=ze.useLayoutEffect,Cdr=function(e){var r=wi.useRef(e);return Adr(function(){r.current=e}),r},$De=function(e,r){if(typeof e=="function"){e(r);return}e.current=r},Mdr=function(e,r){var n=wi.useRef();return wi.useCallback(function(i){e.current=i,n.current&&$De(n.current,null),n.current=r,r&&$De(r,i)},[r])},WDe={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},Rdr=function(e){Object.keys(WDe).forEach(function(r){e.style.setProperty(r,WDe[r],"important")})},YDe=Rdr,I2=null,XDe=function(e,r){var n=e.scrollHeight;return r.sizingStyle.boxSizing==="border-box"?n+r.borderSize:n-r.paddingSize};function kdr(t,e,r,n){r===void 0&&(r=1),n===void 0&&(n=1/0),I2||(I2=document.createElement("textarea"),I2.setAttribute("tabindex","-1"),I2.setAttribute("aria-hidden","true"),YDe(I2)),I2.parentNode===null&&document.body.appendChild(I2);var i=t.paddingSize,a=t.borderSize,o=t.sizingStyle,s=o.boxSizing;Object.keys(o).forEach(function(V){var X=V;I2.style[X]=o[X]}),YDe(I2),I2.value=e;var d=XDe(I2,t);I2.value=e,d=XDe(I2,t),I2.value="x";var b=I2.scrollHeight-i,L=b*r;s==="border-box"&&(L=L+i+a),d=Math.max(L,d);var B=b*n;return s==="border-box"&&(B=B+i+a),d=Math.min(B,d),[d,b]}var ZDe=function(){},Idr=function(e,r){return e.reduce(function(n,i){return n[i]=r[i],n},{})},Pdr=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],Ddr=!!document.documentElement.currentStyle,Ldr=function(e){var r=window.getComputedStyle(e);if(r===null)return null;var n=Idr(Pdr,r),i=n.boxSizing;if(i==="")return null;Ddr&&i==="border-box"&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+"px");var a=parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),o=parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth);return{sizingStyle:n,paddingSize:a,borderSize:o}},Odr=Ldr;function H1e(t,e,r){var n=Cdr(r);ze.useLayoutEffect(function(){var i=function(o){return n.current(o)};if(t)return t.addEventListener(e,i),function(){return t.removeEventListener(e,i)}},[])}var Ndr=function(e,r){H1e(document.body,"reset",function(n){e.current.form===n.target&&r(n)})},Fdr=function(e){H1e(window,"resize",e)},zdr=function(e){H1e(document.fonts,"loadingdone",e)},Bdr=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],Udr=function(e,r){var n=e.cacheMeasurements,i=e.maxRows,a=e.minRows,o=e.onChange,s=o===void 0?ZDe:o,d=e.onHeightChange,b=d===void 0?ZDe:d,L=Ms(e,Bdr),B=L.value!==void 0,V=ze.useRef(null),X=Mdr(V,r),ie=ze.useRef(0),de=ze.useRef(),ae=function(){var Se=V.current,Pe=n&&de.current?de.current:Odr(Se);if(Pe){de.current=Pe;var Me=kdr(Pe,Se.value||Se.placeholder||"x",a,i),Ie=Me[0],Ve=Me[1];ie.current!==Ie&&(ie.current=Ie,Se.style.setProperty("height",Ie+"px","important"),b(Ie,{rowHeight:Ve}))}},U=function(Se){B||ae(),s(Se)};return ze.useLayoutEffect(ae),Ndr(V,function(){if(!B){var ve=V.current.value;requestAnimationFrame(function(){var Se=V.current;Se&&ve!==Se.value&&ae()})}}),Fdr(ae),zdr(ae),ze.createElement("textarea",Mr({},L,{onChange:U,ref:X}))},Hdr=ze.forwardRef(Udr);const jXe=6048e5,jdr=864e5,KDe=Symbol.for("constructDateFrom");function a4(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&KDe in t?t[KDe](e):t instanceof Date?new t.constructor(e):new Date(e)}function sM(t,e){return a4(e||t,t)}let Vdr={};function CZ(){return Vdr}function pB(t,e){const r=CZ(),n=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=sM(t,e?.in),a=i.getDay(),o=(a<n?7:0)+a-n;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function FW(t,e){return pB(t,{...e,weekStartsOn:1})}function VXe(t,e){const r=sM(t,e?.in),n=r.getFullYear(),i=a4(r,0);i.setFullYear(n+1,0,4),i.setHours(0,0,0,0);const a=FW(i),o=a4(r,0);o.setFullYear(n,0,4),o.setHours(0,0,0,0);const s=FW(o);return r.getTime()>=a.getTime()?n+1:r.getTime()>=s.getTime()?n:n-1}function JDe(t){const e=sM(t),r=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return r.setUTCFullYear(e.getFullYear()),+t-+r}function qdr(t,...e){const r=a4.bind(null,e.find(n=>typeof n=="object"));return e.map(r)}function QDe(t,e){const r=sM(t,e?.in);return r.setHours(0,0,0,0),r}function Gdr(t,e,r){const[n,i]=qdr(r?.in,t,e),a=QDe(n),o=QDe(i),s=+a-JDe(a),d=+o-JDe(o);return Math.round((s-d)/jdr)}function $dr(t,e){const r=VXe(t,e),n=a4(t,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),FW(n)}function Wdr(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function Ydr(t){return!(!Wdr(t)&&typeof t!="number"||isNaN(+sM(t)))}function Xdr(t,e){const r=sM(t,e?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}const Zdr={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Kdr=(t,e,r)=>{let n;const i=Zdr[t];return typeof i=="string"?n=i:e===1?n=i.one:n=i.other.replace("{{count}}",e.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function qoe(t){return(e={})=>{const r=e.width?String(e.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}const Jdr={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Qdr={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ehr={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},thr={date:qoe({formats:Jdr,defaultWidth:"full"}),time:qoe({formats:Qdr,defaultWidth:"full"}),dateTime:qoe({formats:ehr,defaultWidth:"full"})},rhr={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},nhr=(t,e,r,n)=>rhr[t];function xz(t){return(e,r)=>{const n=r?.context?String(r.context):"standalone";let i;if(n==="formatting"&&t.formattingValues){const o=t.defaultFormattingWidth||t.defaultWidth,s=r?.width?String(r.width):o;i=t.formattingValues[s]||t.formattingValues[o]}else{const o=t.defaultWidth,s=r?.width?String(r.width):t.defaultWidth;i=t.values[s]||t.values[o]}const a=t.argumentCallback?t.argumentCallback(e):e;return i[a]}}const ihr={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},ahr={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ohr={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},shr={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},lhr={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},uhr={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},chr=(t,e)=>{const r=Number(t),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},fhr={ordinalNumber:chr,era:xz({values:ihr,defaultWidth:"wide"}),quarter:xz({values:ahr,defaultWidth:"wide",argumentCallback:t=>t-1}),month:xz({values:ohr,defaultWidth:"wide"}),day:xz({values:shr,defaultWidth:"wide"}),dayPeriod:xz({values:lhr,defaultWidth:"wide",formattingValues:uhr,defaultFormattingWidth:"wide"})};function _z(t){return(e,r={})=>{const n=r.width,i=n&&t.matchPatterns[n]||t.matchPatterns[t.defaultMatchWidth],a=e.match(i);if(!a)return null;const o=a[0],s=n&&t.parsePatterns[n]||t.parsePatterns[t.defaultParseWidth],d=Array.isArray(s)?hhr(s,B=>B.test(o)):dhr(s,B=>B.test(o));let b;b=t.valueCallback?t.valueCallback(d):d,b=r.valueCallback?r.valueCallback(b):b;const L=e.slice(o.length);return{value:b,rest:L}}}function dhr(t,e){for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&e(t[r]))return r}function hhr(t,e){for(let r=0;r<t.length;r++)if(e(t[r]))return r}function phr(t){return(e,r={})=>{const n=e.match(t.matchPattern);if(!n)return null;const i=n[0],a=e.match(t.parsePattern);if(!a)return null;let o=t.valueCallback?t.valueCallback(a[0]):a[0];o=r.valueCallback?r.valueCallback(o):o;const s=e.slice(i.length);return{value:o,rest:s}}}const vhr=/^(\d+)(th|st|nd|rd)?/i,mhr=/\d+/i,ghr={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},yhr={any:[/^b/i,/^(a|c)/i]},bhr={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},xhr={any:[/1/i,/2/i,/3/i,/4/i]},_hr={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},whr={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Shr={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Thr={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Ehr={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ahr={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Chr={ordinalNumber:phr({matchPattern:vhr,parsePattern:mhr,valueCallback:t=>parseInt(t,10)}),era:_z({matchPatterns:ghr,defaultMatchWidth:"wide",parsePatterns:yhr,defaultParseWidth:"any"}),quarter:_z({matchPatterns:bhr,defaultMatchWidth:"wide",parsePatterns:xhr,defaultParseWidth:"any",valueCallback:t=>t+1}),month:_z({matchPatterns:_hr,defaultMatchWidth:"wide",parsePatterns:whr,defaultParseWidth:"any"}),day:_z({matchPatterns:Shr,defaultMatchWidth:"wide",parsePatterns:Thr,defaultParseWidth:"any"}),dayPeriod:_z({matchPatterns:Ehr,defaultMatchWidth:"any",parsePatterns:Ahr,defaultParseWidth:"any"})},Mhr={code:"en-US",formatDistance:Kdr,formatLong:thr,formatRelative:nhr,localize:fhr,match:Chr,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Rhr(t,e){const r=sM(t,e?.in);return Gdr(r,Xdr(r))+1}function khr(t,e){const r=sM(t,e?.in),n=+FW(r)-+$dr(r);return Math.round(n/jXe)+1}function qXe(t,e){const r=sM(t,e?.in),n=r.getFullYear(),i=CZ(),a=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=a4(e?.in||t,0);o.setFullYear(n+1,0,a),o.setHours(0,0,0,0);const s=pB(o,e),d=a4(e?.in||t,0);d.setFullYear(n,0,a),d.setHours(0,0,0,0);const b=pB(d,e);return+r>=+s?n+1:+r>=+b?n:n-1}function Ihr(t,e){const r=CZ(),n=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=qXe(t,e),a=a4(e?.in||t,0);return a.setFullYear(i,0,n),a.setHours(0,0,0,0),pB(a,e)}function Phr(t,e){const r=sM(t,e?.in),n=+pB(r,e)-+Ihr(r,e);return Math.round(n/jXe)+1}function bg(t,e){const r=t<0?"-":"",n=Math.abs(t).toString().padStart(e,"0");return r+n}const bP={y(t,e){const r=t.getFullYear(),n=r>0?r:1-r;return bg(e==="yy"?n%100:n,e.length)},M(t,e){const r=t.getMonth();return e==="M"?String(r+1):bg(r+1,2)},d(t,e){return bg(t.getDate(),e.length)},a(t,e){const r=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(t,e){return bg(t.getHours()%12||12,e.length)},H(t,e){return bg(t.getHours(),e.length)},m(t,e){return bg(t.getMinutes(),e.length)},s(t,e){return bg(t.getSeconds(),e.length)},S(t,e){const r=e.length,n=t.getMilliseconds(),i=Math.trunc(n*Math.pow(10,r-3));return bg(i,e.length)}},uN={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},eLe={G:function(t,e,r){const n=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(t,e,r){if(e==="yo"){const n=t.getFullYear(),i=n>0?n:1-n;return r.ordinalNumber(i,{unit:"year"})}return bP.y(t,e)},Y:function(t,e,r,n){const i=qXe(t,n),a=i>0?i:1-i;if(e==="YY"){const o=a%100;return bg(o,2)}return e==="Yo"?r.ordinalNumber(a,{unit:"year"}):bg(a,e.length)},R:function(t,e){const r=VXe(t);return bg(r,e.length)},u:function(t,e){const r=t.getFullYear();return bg(r,e.length)},Q:function(t,e,r){const n=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return bg(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(t,e,r){const n=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return bg(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(t,e,r){const n=t.getMonth();switch(e){case"M":case"MM":return bP.M(t,e);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(t,e,r){const n=t.getMonth();switch(e){case"L":return String(n+1);case"LL":return bg(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(t,e,r,n){const i=Phr(t,n);return e==="wo"?r.ordinalNumber(i,{unit:"week"}):bg(i,e.length)},I:function(t,e,r){const n=khr(t);return e==="Io"?r.ordinalNumber(n,{unit:"week"}):bg(n,e.length)},d:function(t,e,r){return e==="do"?r.ordinalNumber(t.getDate(),{unit:"date"}):bP.d(t,e)},D:function(t,e,r){const n=Rhr(t);return e==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):bg(n,e.length)},E:function(t,e,r){const n=t.getDay();switch(e){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(t,e,r,n){const i=t.getDay(),a=(i-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(a);case"ee":return bg(a,2);case"eo":return r.ordinalNumber(a,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});case"eeee":default:return r.day(i,{width:"wide",context:"formatting"})}},c:function(t,e,r,n){const i=t.getDay(),a=(i-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(a);case"cc":return bg(a,e.length);case"co":return r.ordinalNumber(a,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});case"cccc":default:return r.day(i,{width:"wide",context:"standalone"})}},i:function(t,e,r){const n=t.getDay(),i=n===0?7:n;switch(e){case"i":return String(i);case"ii":return bg(i,e.length);case"io":return r.ordinalNumber(i,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(t,e,r){const i=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,e,r){const n=t.getHours();let i;switch(n===12?i=uN.noon:n===0?i=uN.midnight:i=n/12>=1?"pm":"am",e){case"b":case"bb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,e,r){const n=t.getHours();let i;switch(n>=17?i=uN.evening:n>=12?i=uN.afternoon:n>=4?i=uN.morning:i=uN.night,e){case"B":case"BB":case"BBB":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,e,r){if(e==="ho"){let n=t.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return bP.h(t,e)},H:function(t,e,r){return e==="Ho"?r.ordinalNumber(t.getHours(),{unit:"hour"}):bP.H(t,e)},K:function(t,e,r){const n=t.getHours()%12;return e==="Ko"?r.ordinalNumber(n,{unit:"hour"}):bg(n,e.length)},k:function(t,e,r){let n=t.getHours();return n===0&&(n=24),e==="ko"?r.ordinalNumber(n,{unit:"hour"}):bg(n,e.length)},m:function(t,e,r){return e==="mo"?r.ordinalNumber(t.getMinutes(),{unit:"minute"}):bP.m(t,e)},s:function(t,e,r){return e==="so"?r.ordinalNumber(t.getSeconds(),{unit:"second"}):bP.s(t,e)},S:function(t,e){return bP.S(t,e)},X:function(t,e,r){const n=t.getTimezoneOffset();if(n===0)return"Z";switch(e){case"X":return rLe(n);case"XXXX":case"XX":return GD(n);case"XXXXX":case"XXX":default:return GD(n,":")}},x:function(t,e,r){const n=t.getTimezoneOffset();switch(e){case"x":return rLe(n);case"xxxx":case"xx":return GD(n);case"xxxxx":case"xxx":default:return GD(n,":")}},O:function(t,e,r){const n=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+tLe(n,":");case"OOOO":default:return"GMT"+GD(n,":")}},z:function(t,e,r){const n=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+tLe(n,":");case"zzzz":default:return"GMT"+GD(n,":")}},t:function(t,e,r){const n=Math.trunc(+t/1e3);return bg(n,e.length)},T:function(t,e,r){return bg(+t,e.length)}};function tLe(t,e=""){const r=t>0?"-":"+",n=Math.abs(t),i=Math.trunc(n/60),a=n%60;return a===0?r+String(i):r+String(i)+e+bg(a,2)}function rLe(t,e){return t%60===0?(t>0?"-":"+")+bg(Math.abs(t)/60,2):GD(t,e)}function GD(t,e=""){const r=t>0?"-":"+",n=Math.abs(t),i=bg(Math.trunc(n/60),2),a=bg(n%60,2);return r+i+e+a}const nLe=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},GXe=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},Dhr=(t,e)=>{const r=t.match(/(P+)(p+)?/)||[],n=r[1],i=r[2];if(!i)return nLe(t,e);let a;switch(n){case"P":a=e.dateTime({width:"short"});break;case"PP":a=e.dateTime({width:"medium"});break;case"PPP":a=e.dateTime({width:"long"});break;case"PPPP":default:a=e.dateTime({width:"full"});break}return a.replace("{{date}}",nLe(n,e)).replace("{{time}}",GXe(i,e))},Lhr={p:GXe,P:Dhr},Ohr=/^D+$/,Nhr=/^Y+$/,Fhr=["D","DD","YY","YYYY"];function zhr(t){return Ohr.test(t)}function Bhr(t){return Nhr.test(t)}function Uhr(t,e,r){const n=Hhr(t,e,r);if(console.warn(n),Fhr.includes(t))throw new RangeError(n)}function Hhr(t,e,r){const n=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const jhr=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Vhr=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,qhr=/^'([^]*?)'?$/,Ghr=/''/g,$hr=/[a-zA-Z]/;function Whr(t,e,r){const n=CZ(),i=n.locale??Mhr,a=n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=n.weekStartsOn??n.locale?.options?.weekStartsOn??0,s=sM(t,r?.in);if(!Ydr(s))throw new RangeError("Invalid time value");let d=e.match(Vhr).map(L=>{const B=L[0];if(B==="p"||B==="P"){const V=Lhr[B];return V(L,i.formatLong)}return L}).join("").match(jhr).map(L=>{if(L==="''")return{isToken:!1,value:"'"};const B=L[0];if(B==="'")return{isToken:!1,value:Yhr(L)};if(eLe[B])return{isToken:!0,value:L};if(B.match($hr))throw new RangeError("Format string contains an unescaped latin alphabet character `"+B+"`");return{isToken:!1,value:L}});i.localize.preprocessor&&(d=i.localize.preprocessor(s,d));const b={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return d.map(L=>{if(!L.isToken)return L.value;const B=L.value;(Bhr(B)||zhr(B))&&Uhr(B,e,String(t));const V=eLe[B[0]];return V(s,B,i.localize,b)}).join("")}function Yhr(t){const e=t.match(qhr);return e?e[1].replace(Ghr,"'"):t}function Xhr(t,e){const r=String(t);let n=r.indexOf(e),i=n,a=0,o=0;for(;n!==-1;)n===i?++a>o&&(o=a):a=1,i=n+e.length,n=r.indexOf(e,i);return o}function Zhr(){return{enter:{mathFlow:t,mathFlowFenceMeta:e,mathText:a},exit:{mathFlow:i,mathFlowFence:n,mathFlowFenceMeta:r,mathFlowValue:s,mathText:o,mathTextData:s}};function t(d){const b={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[b]}},d)}function e(){this.buffer()}function r(){const d=this.resume(),b=this.stack[this.stack.length-1];b.type,b.meta=d}function n(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(d){const b=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),L=this.stack[this.stack.length-1];L.type,this.exit(d),L.value=b;const B=L.data.hChildren[0];B.type,B.tagName,B.children.push({type:"text",value:b}),this.data.mathFlowInside=void 0}function a(d){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},d),this.buffer()}function o(d){const b=this.resume(),L=this.stack[this.stack.length-1];L.type,this.exit(d),L.value=b,L.data.hChildren.push({type:"text",value:b})}function s(d){this.config.enter.data.call(this,d),this.config.exit.data.call(this,d)}}function Khr(t){let e=(t||{}).singleDollarTextMath;return e==null&&(e=!0),n.peek=i,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:`
`,inConstruct:"mathFlowMeta"},{character:"$",after:e?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:r,inlineMath:n}};function r(a,o,s,d){const b=a.value||"",L=s.createTracker(d),B="$".repeat(Math.max(Xhr(b,"$")+1,2)),V=s.enter("mathFlow");let X=L.move(B);if(a.meta){const ie=s.enter("mathFlowMeta");X+=L.move(s.safe(a.meta,{after:`
`,before:X,encode:["$"],...L.current()})),ie()}return X+=L.move(`
`),b&&(X+=L.move(b+`
`)),X+=L.move(B),V(),X}function n(a,o,s){let d=a.value||"",b=1;for(e||b++;new RegExp("(^|[^$])"+"\\$".repeat(b)+"([^$]|$)").test(d);)b++;const L="$".repeat(b);/[^ \r\n]/.test(d)&&(/^[ \r\n]/.test(d)&&/[ \r\n]$/.test(d)||/^\$|\$$/.test(d))&&(d=" "+d+" ");let B=-1;for(;++B<s.unsafe.length;){const V=s.unsafe[B];if(!V.atBreak)continue;const X=s.compilePattern(V);let ie;for(;ie=X.exec(d);){let de=ie.index;d.codePointAt(de)===10&&d.codePointAt(de-1)===13&&de--,d=d.slice(0,de)+" "+d.slice(ie.index+1)}}return L+d+L}function i(){return"$"}}const Jhr={tokenize:Qhr,concrete:!0,name:"mathFlow"},iLe={tokenize:epr,partial:!0};function Qhr(t,e,r){const n=this,i=n.events[n.events.length-1],a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0;let o=0;return s;function s(ve){return t.enter("mathFlow"),t.enter("mathFlowFence"),t.enter("mathFlowFenceSequence"),d(ve)}function d(ve){return ve===36?(t.consume(ve),o++,d):o<2?r(ve):(t.exit("mathFlowFenceSequence"),Jm(t,b,"whitespace")(ve))}function b(ve){return ve===null||Xf(ve)?B(ve):(t.enter("mathFlowFenceMeta"),t.enter("chunkString",{contentType:"string"}),L(ve))}function L(ve){return ve===null||Xf(ve)?(t.exit("chunkString"),t.exit("mathFlowFenceMeta"),B(ve)):ve===36?r(ve):(t.consume(ve),L)}function B(ve){return t.exit("mathFlowFence"),n.interrupt?e(ve):t.attempt(iLe,V,ae)(ve)}function V(ve){return t.attempt({tokenize:U,partial:!0},ae,X)(ve)}function X(ve){return(a?Jm(t,ie,"linePrefix",a+1):ie)(ve)}function ie(ve){return ve===null?ae(ve):Xf(ve)?t.attempt(iLe,V,ae)(ve):(t.enter("mathFlowValue"),de(ve))}function de(ve){return ve===null||Xf(ve)?(t.exit("mathFlowValue"),ie(ve)):(t.consume(ve),de)}function ae(ve){return t.exit("mathFlow"),e(ve)}function U(ve,Se,Pe){let Me=0;return Jm(ve,Ie,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function Ie(Je){return ve.enter("mathFlowFence"),ve.enter("mathFlowFenceSequence"),Ve(Je)}function Ve(Je){return Je===36?(Me++,ve.consume(Je),Ve):Me<o?Pe(Je):(ve.exit("mathFlowFenceSequence"),Jm(ve,Ze,"whitespace")(Je))}function Ze(Je){return Je===null||Xf(Je)?(ve.exit("mathFlowFence"),Se(Je)):Pe(Je)}}}function epr(t,e,r){const n=this;return i;function i(o){return o===null?e(o):(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),a)}function a(o){return n.parser.lazy[n.now().line]?r(o):e(o)}}function tpr(t){let r=(t||{}).singleDollarTextMath;return r==null&&(r=!0),{tokenize:n,resolve:rpr,previous:npr,name:"mathText"};function n(i,a,o){let s=0,d,b;return L;function L(de){return i.enter("mathText"),i.enter("mathTextSequence"),B(de)}function B(de){return de===36?(i.consume(de),s++,B):s<2&&!r?o(de):(i.exit("mathTextSequence"),V(de))}function V(de){return de===null?o(de):de===36?(b=i.enter("mathTextSequence"),d=0,ie(de)):de===32?(i.enter("space"),i.consume(de),i.exit("space"),V):Xf(de)?(i.enter("lineEnding"),i.consume(de),i.exit("lineEnding"),V):(i.enter("mathTextData"),X(de))}function X(de){return de===null||de===32||de===36||Xf(de)?(i.exit("mathTextData"),V(de)):(i.consume(de),X)}function ie(de){return de===36?(i.consume(de),d++,ie):d===s?(i.exit("mathTextSequence"),i.exit("mathText"),a(de)):(b.type="mathTextData",X(de))}}}function rpr(t){let e=t.length-4,r=3,n,i;if((t[r][1].type==="lineEnding"||t[r][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(n=r;++n<e;)if(t[n][1].type==="mathTextData"){t[e][1].type="mathTextPadding",t[r][1].type="mathTextPadding",r+=2,e-=2;break}}for(n=r-1,e++;++n<=e;)i===void 0?n!==e&&t[n][1].type!=="lineEnding"&&(i=n):(n===e||t[n][1].type==="lineEnding")&&(t[i][1].type="mathTextData",n!==i+2&&(t[i][1].end=t[n-1][1].end,t.splice(i+2,n-i-2),e-=n-i-2,n=i+2),i=void 0);return t}function npr(t){return t!==36||this.events[this.events.length-1][1].type==="characterEscape"}function ipr(t){return{flow:{36:Jhr},text:{36:tpr(t)}}}class JT{constructor(e,r,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=r,this.end=n}static range(e,r){return r?!e||!e.loc||!r.loc||e.loc.lexer!==r.loc.lexer?null:new JT(e.loc.lexer,e.loc.start,r.loc.end):e&&e.loc}}class eA{constructor(e,r){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=r}range(e,r){return new eA(r,JT.range(this,e))}}class Eu{constructor(e,r){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var n="KaTeX parse error: "+e,i,a,o=r&&r.loc;if(o&&o.start<=o.end){var s=o.lexer.input;i=o.start,a=o.end,i===s.length?n+=" at end of input: ":n+=" at position "+(i+1)+": ";var d=s.slice(i,a).replace(/[^]/g,"$&̲"),b;i>15?b="…"+s.slice(i-15,i):b=s.slice(0,i);var L;a+15<s.length?L=s.slice(a,a+15)+"…":L=s.slice(a),n+=b+d+L}var B=new Error(n);return B.name="ParseError",B.__proto__=Eu.prototype,B.position=i,i!=null&&a!=null&&(B.length=a-i),B.rawMessage=e,B}}Eu.prototype.__proto__=Error.prototype;var apr=function(e,r){return e.indexOf(r)!==-1},opr=function(e,r){return e===void 0?r:e},spr=/([A-Z])/g,lpr=function(e){return e.replace(spr,"-$1").toLowerCase()},upr={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},cpr=/[&><"']/g;function fpr(t){return String(t).replace(cpr,e=>upr[e])}var $Xe=function t(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?t(e.body[0]):e:e.type==="font"?t(e.body):e},dpr=function(e){var r=$Xe(e);return r.type==="mathord"||r.type==="textord"||r.type==="atom"},hpr=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},ppr=function(e){var r=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return r?r[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(r[1])?null:r[1].toLowerCase():"_relative"},Kf={contains:apr,deflt:opr,escape:fpr,hyphenate:lpr,getBaseElem:$Xe,isCharacterBox:dpr,protocolFromUrl:ppr},BG={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:t=>"#"+t},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(t,e)=>(e.push(t),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:t=>Math.max(0,t),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:t=>Math.max(0,t),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:t=>Math.max(0,t),cli:"-e, --max-expand <n>",cliProcessor:t=>t==="Infinity"?1/0:parseInt(t)},globalGroup:{type:"boolean",cli:!1}};function vpr(t){if(t.default)return t.default;var e=t.type,r=Array.isArray(e)?e[0]:e;if(typeof r!="string")return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class j1e{constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var r in BG)if(BG.hasOwnProperty(r)){var n=BG[r];this[r]=e[r]!==void 0?n.processor?n.processor(e[r]):e[r]:vpr(n)}}reportNonstrict(e,r,n){var i=this.strict;if(typeof i=="function"&&(i=i(e,r,n)),!(!i||i==="ignore")){if(i===!0||i==="error")throw new Eu("LaTeX-incompatible input and strict mode is set to 'error': "+(r+" ["+e+"]"),n);i==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+r+" ["+e+"]"))}}useStrictBehavior(e,r,n){var i=this.strict;if(typeof i=="function")try{i=i(e,r,n)}catch{i="error"}return!i||i==="ignore"?!1:i===!0||i==="error"?!0:i==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+r+" ["+e+"]")),!1)}isTrusted(e){if(e.url&&!e.protocol){var r=Kf.protocolFromUrl(e.url);if(r==null)return!1;e.protocol=r}var n=typeof this.trust=="function"?this.trust(e):this.trust;return!!n}}class xP{constructor(e,r,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=r,this.cramped=n}sup(){return x5[mpr[this.id]]}sub(){return x5[gpr[this.id]]}fracNum(){return x5[ypr[this.id]]}fracDen(){return x5[bpr[this.id]]}cramp(){return x5[xpr[this.id]]}text(){return x5[_pr[this.id]]}isTight(){return this.size>=2}}var V1e=0,zW=1,WN=2,Mk=3,vB=4,W3=5,C8=6,j2=7,x5=[new xP(V1e,0,!1),new xP(zW,0,!0),new xP(WN,1,!1),new xP(Mk,1,!0),new xP(vB,2,!1),new xP(W3,2,!0),new xP(C8,3,!1),new xP(j2,3,!0)],mpr=[vB,W3,vB,W3,C8,j2,C8,j2],gpr=[W3,W3,W3,W3,j2,j2,j2,j2],ypr=[WN,Mk,vB,W3,C8,j2,C8,j2],bpr=[Mk,Mk,W3,W3,j2,j2,j2,j2],xpr=[zW,zW,Mk,Mk,W3,W3,j2,j2],_pr=[V1e,zW,WN,Mk,WN,Mk,WN,Mk],hd={DISPLAY:x5[V1e],TEXT:x5[WN],SCRIPT:x5[vB],SCRIPTSCRIPT:x5[C8]},vve=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function wpr(t){for(var e=0;e<vve.length;e++)for(var r=vve[e],n=0;n<r.blocks.length;n++){var i=r.blocks[n];if(t>=i[0]&&t<=i[1])return r.name}return null}var UG=[];vve.forEach(t=>t.blocks.forEach(e=>UG.push(...e)));function WXe(t){for(var e=0;e<UG.length;e+=2)if(t>=UG[e]&&t<=UG[e+1])return!0;return!1}var cN=80,Spr=function(e,r){return"M95,"+(622+e+r)+`
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
c69,-144,104.5,-217.7,106.5,-221
l`+e/2.075+" -"+e+`
c5.3,-9.3,12,-14,20,-14
H400000v`+(40+e)+`H845.2724
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
M`+(834+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},Tpr=function(e,r){return"M263,"+(601+e+r)+`c0.7,0,18,39.7,52,119
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
c340,-704.7,510.7,-1060.3,512,-1067
l`+e/2.084+" -"+e+`
c4.7,-7.3,11,-11,19,-11
H40000v`+(40+e)+`H1012.3
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
M`+(1001+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},Epr=function(e,r){return"M983 "+(10+e+r)+`
l`+e/3.13+" -"+e+`
c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+`
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
M`+(1001+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},Apr=function(e,r){return"M424,"+(2398+e+r)+`
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
l`+e/4.223+" -"+e+`c4,-6.7,10,-10,18,-10 H400000
v`+(40+e)+`H1014.6
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+" "+r+`
h400000v`+(40+e)+"h-400000z"},Cpr=function(e,r){return"M473,"+(2713+e+r)+`
c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+" -"+e+`
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
606zM`+(1001+e)+" "+r+"h400000v"+(40+e)+"H1017.7z"},Mpr=function(e){var r=e/2;return"M400000 "+e+" H0 L"+r+" 0 l65 45 L145 "+(e-80)+" H400000z"},Rpr=function(e,r,n){var i=n-54-r-e;return"M702 "+(e+r)+"H400000"+(40+e)+`
H742v`+i+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
219 661 l218 661zM702 `+r+"H400000v"+(40+e)+"H742z"},kpr=function(e,r,n){r=1e3*r;var i="";switch(e){case"sqrtMain":i=Spr(r,cN);break;case"sqrtSize1":i=Tpr(r,cN);break;case"sqrtSize2":i=Epr(r,cN);break;case"sqrtSize3":i=Apr(r,cN);break;case"sqrtSize4":i=Cpr(r,cN);break;case"sqrtTall":i=Rpr(r,cN,n)}return i},Ipr=function(e,r){switch(e){case"⎜":return"M291 0 H417 V"+r+" H291z M291 0 H417 V"+r+" H291z";case"∣":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z";case"∥":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z"+("M367 0 H410 V"+r+" H367z M367 0 H410 V"+r+" H367z");case"⎟":return"M457 0 H583 V"+r+" H457z M457 0 H583 V"+r+" H457z";case"⎢":return"M319 0 H403 V"+r+" H319z M319 0 H403 V"+r+" H319z";case"⎥":return"M263 0 H347 V"+r+" H263z M263 0 H347 V"+r+" H263z";case"⎪":return"M384 0 H504 V"+r+" H384z M384 0 H504 V"+r+" H384z";case"⏐":return"M312 0 H355 V"+r+" H312z M312 0 H355 V"+r+" H312z";case"‖":return"M257 0 H300 V"+r+" H257z M257 0 H300 V"+r+" H257z"+("M478 0 H521 V"+r+" H478z M478 0 H521 V"+r+" H478z");default:return""}},aLe={doubleleftarrow:`M262 157
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
 l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
 435 0h399565z`,leftgroupunder:`M400000 262
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
 -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
 -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Ppr=function(e,r){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v1759 h347 v-84
H403z M403 1759 V0 H319 V1759 v`+r+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v1759 H0 v84 H347z
M347 1759 V0 H263 V1759 v`+r+" v1759 h84z";case"vert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+" v585 h43z";case"doublevert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+` v585 h43z
M367 15 v585 v`+r+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+r+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+r+` v1715 h263 v84 H319z
MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+r+` v1799 H0 v-84 H319z
MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v602 h84z
M403 1759 V0 H319 V1759 v`+r+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v602 h84z
M347 1759 V0 h-84 V1759 v`+r+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
-36,557 l0,`+(r+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
l0,-`+(r+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(r+9)+`
c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
l0,-`+(r+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};let MU=class{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return Kf.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),r=0;r<this.children.length;r++)e.appendChild(this.children[r].toNode());return e}toMarkup(){for(var e="",r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e}toText(){var e=r=>r.toText();return this.children.map(e).join("")}};var C5={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},Oq={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},oLe={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function Dpr(t,e){C5[t]=e}function q1e(t,e,r){if(!C5[e])throw new Error("Font metrics not found for font: "+e+".");var n=t.charCodeAt(0),i=C5[e][n];if(!i&&t[0]in oLe&&(n=oLe[t[0]].charCodeAt(0),i=C5[e][n]),!i&&r==="text"&&WXe(n)&&(i=C5[e][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var Goe={};function Lpr(t){var e;if(t>=5?e=0:t>=3?e=1:e=2,!Goe[e]){var r=Goe[e]={cssEmPerMu:Oq.quad[e]/18};for(var n in Oq)Oq.hasOwnProperty(n)&&(r[n]=Oq[n][e])}return Goe[e]}var Opr=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],sLe=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],lLe=function(e,r){return r.size<2?e:Opr[e-1][r.size-1]};class vk{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||vk.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=sLe[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var r={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var n in e)e.hasOwnProperty(n)&&(r[n]=e[n]);return new vk(r)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:lLe(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:sLe[e-1]})}havingBaseStyle(e){e=e||this.style.text();var r=lLe(vk.BASESIZE,e);return this.size===r&&this.textSize===vk.BASESIZE&&this.style===e?this:this.extend({style:e,size:r})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==vk.BASESIZE?["sizing","reset-size"+this.size,"size"+vk.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Lpr(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}vk.BASESIZE=6;var mve={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},Npr={ex:!0,em:!0,mu:!0},YXe=function(e){return typeof e!="string"&&(e=e.unit),e in mve||e in Npr||e==="ex"},Vy=function(e,r){var n;if(e.unit in mve)n=mve[e.unit]/r.fontMetrics().ptPerEm/r.sizeMultiplier;else if(e.unit==="mu")n=r.fontMetrics().cssEmPerMu;else{var i;if(r.style.isTight()?i=r.havingStyle(r.style.text()):i=r,e.unit==="ex")n=i.fontMetrics().xHeight;else if(e.unit==="em")n=i.fontMetrics().quad;else throw new Eu("Invalid unit: '"+e.unit+"'");i!==r&&(n*=i.sizeMultiplier/r.sizeMultiplier)}return Math.min(e.number*n,r.maxSize)},nc=function(e){return+e.toFixed(4)+"em"},o4=function(e){return e.filter(r=>r).join(" ")},XXe=function(e,r,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},r){r.style.isTight()&&this.classes.push("mtight");var i=r.getColor();i&&(this.style.color=i)}},ZXe=function(e){var r=document.createElement(e);r.className=o4(this.classes);for(var n in this.style)this.style.hasOwnProperty(n)&&(r.style[n]=this.style[n]);for(var i in this.attributes)this.attributes.hasOwnProperty(i)&&r.setAttribute(i,this.attributes[i]);for(var a=0;a<this.children.length;a++)r.appendChild(this.children[a].toNode());return r},Fpr=/[\s"'>/=\x00-\x1f]/,KXe=function(e){var r="<"+e;this.classes.length&&(r+=' class="'+Kf.escape(o4(this.classes))+'"');var n="";for(var i in this.style)this.style.hasOwnProperty(i)&&(n+=Kf.hyphenate(i)+":"+this.style[i]+";");n&&(r+=' style="'+Kf.escape(n)+'"');for(var a in this.attributes)if(this.attributes.hasOwnProperty(a)){if(Fpr.test(a))throw new Eu("Invalid attribute name '"+a+"'");r+=" "+a+'="'+Kf.escape(this.attributes[a])+'"'}r+=">";for(var o=0;o<this.children.length;o++)r+=this.children[o].toMarkup();return r+="</"+e+">",r};class RU{constructor(e,r,n,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,XXe.call(this,e,n,i),this.children=r||[]}setAttribute(e,r){this.attributes[e]=r}hasClass(e){return Kf.contains(this.classes,e)}toNode(){return ZXe.call(this,"span")}toMarkup(){return KXe.call(this,"span")}}class G1e{constructor(e,r,n,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,XXe.call(this,r,i),this.children=n||[],this.setAttribute("href",e)}setAttribute(e,r){this.attributes[e]=r}hasClass(e){return Kf.contains(this.classes,e)}toNode(){return ZXe.call(this,"a")}toMarkup(){return KXe.call(this,"a")}}class zpr{constructor(e,r,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=r,this.src=e,this.classes=["mord"],this.style=n}hasClass(e){return Kf.contains(this.classes,e)}toNode(){var e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(var r in this.style)this.style.hasOwnProperty(r)&&(e.style[r]=this.style[r]);return e}toMarkup(){var e='<img src="'+Kf.escape(this.src)+'"'+(' alt="'+Kf.escape(this.alt)+'"'),r="";for(var n in this.style)this.style.hasOwnProperty(n)&&(r+=Kf.hyphenate(n)+":"+this.style[n]+";");return r&&(e+=' style="'+Kf.escape(r)+'"'),e+="'/>",e}}var Bpr={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"};class lA{constructor(e,r,n,i,a,o,s,d){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=r||0,this.depth=n||0,this.italic=i||0,this.skew=a||0,this.width=o||0,this.classes=s||[],this.style=d||{},this.maxFontSize=0;var b=wpr(this.text.charCodeAt(0));b&&this.classes.push(b+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=Bpr[this.text])}hasClass(e){return Kf.contains(this.classes,e)}toNode(){var e=document.createTextNode(this.text),r=null;this.italic>0&&(r=document.createElement("span"),r.style.marginRight=nc(this.italic)),this.classes.length>0&&(r=r||document.createElement("span"),r.className=o4(this.classes));for(var n in this.style)this.style.hasOwnProperty(n)&&(r=r||document.createElement("span"),r.style[n]=this.style[n]);return r?(r.appendChild(e),r):e}toMarkup(){var e=!1,r="<span";this.classes.length&&(e=!0,r+=' class="',r+=Kf.escape(o4(this.classes)),r+='"');var n="";this.italic>0&&(n+="margin-right:"+this.italic+"em;");for(var i in this.style)this.style.hasOwnProperty(i)&&(n+=Kf.hyphenate(i)+":"+this.style[i]+";");n&&(e=!0,r+=' style="'+Kf.escape(n)+'"');var a=Kf.escape(this.text);return e?(r+=">",r+=a,r+="</span>",r):a}}class Ok{constructor(e,r){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=r||{}}toNode(){var e="http://www.w3.org/2000/svg",r=document.createElementNS(e,"svg");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&r.setAttribute(n,this.attributes[n]);for(var i=0;i<this.children.length;i++)r.appendChild(this.children[i].toNode());return r}toMarkup(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&(e+=" "+r+'="'+Kf.escape(this.attributes[r])+'"');e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</svg>",e}}class s4{constructor(e,r){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=r}toNode(){var e="http://www.w3.org/2000/svg",r=document.createElementNS(e,"path");return this.alternate?r.setAttribute("d",this.alternate):r.setAttribute("d",aLe[this.pathName]),r}toMarkup(){return this.alternate?'<path d="'+Kf.escape(this.alternate)+'"/>':'<path d="'+Kf.escape(aLe[this.pathName])+'"/>'}}class gve{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",r=document.createElementNS(e,"line");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&r.setAttribute(n,this.attributes[n]);return r}toMarkup(){var e="<line";for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&(e+=" "+r+'="'+Kf.escape(this.attributes[r])+'"');return e+="/>",e}}function uLe(t){if(t instanceof lA)return t;throw new Error("Expected symbolNode but got "+String(t)+".")}function Upr(t){if(t instanceof RU)return t;throw new Error("Expected span<HtmlDomNode> but got "+String(t)+".")}var Hpr={bin:1,close:1,inner:1,open:1,punct:1,rel:1},jpr={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},h0={math:{},text:{}};function Qr(t,e,r,n,i,a){h0[t][i]={font:e,group:r,replace:n},a&&n&&(h0[t][n]=h0[t][i])}var xn="math",ru="text",Ti="main",ao="ams",fy="accent-token",jc="bin",K2="close",TF="inner",dd="mathord",Ib="op-token",yE="open",MZ="punct",fo="rel",Wk="spacing",Go="textord";Qr(xn,Ti,fo,"≡","\\equiv",!0);Qr(xn,Ti,fo,"≺","\\prec",!0);Qr(xn,Ti,fo,"≻","\\succ",!0);Qr(xn,Ti,fo,"∼","\\sim",!0);Qr(xn,Ti,fo,"⊥","\\perp");Qr(xn,Ti,fo,"⪯","\\preceq",!0);Qr(xn,Ti,fo,"⪰","\\succeq",!0);Qr(xn,Ti,fo,"≃","\\simeq",!0);Qr(xn,Ti,fo,"∣","\\mid",!0);Qr(xn,Ti,fo,"≪","\\ll",!0);Qr(xn,Ti,fo,"≫","\\gg",!0);Qr(xn,Ti,fo,"≍","\\asymp",!0);Qr(xn,Ti,fo,"∥","\\parallel");Qr(xn,Ti,fo,"⋈","\\bowtie",!0);Qr(xn,Ti,fo,"⌣","\\smile",!0);Qr(xn,Ti,fo,"⊑","\\sqsubseteq",!0);Qr(xn,Ti,fo,"⊒","\\sqsupseteq",!0);Qr(xn,Ti,fo,"≐","\\doteq",!0);Qr(xn,Ti,fo,"⌢","\\frown",!0);Qr(xn,Ti,fo,"∋","\\ni",!0);Qr(xn,Ti,fo,"∝","\\propto",!0);Qr(xn,Ti,fo,"⊢","\\vdash",!0);Qr(xn,Ti,fo,"⊣","\\dashv",!0);Qr(xn,Ti,fo,"∋","\\owns");Qr(xn,Ti,MZ,".","\\ldotp");Qr(xn,Ti,MZ,"⋅","\\cdotp");Qr(xn,Ti,Go,"#","\\#");Qr(ru,Ti,Go,"#","\\#");Qr(xn,Ti,Go,"&","\\&");Qr(ru,Ti,Go,"&","\\&");Qr(xn,Ti,Go,"ℵ","\\aleph",!0);Qr(xn,Ti,Go,"∀","\\forall",!0);Qr(xn,Ti,Go,"ℏ","\\hbar",!0);Qr(xn,Ti,Go,"∃","\\exists",!0);Qr(xn,Ti,Go,"∇","\\nabla",!0);Qr(xn,Ti,Go,"♭","\\flat",!0);Qr(xn,Ti,Go,"ℓ","\\ell",!0);Qr(xn,Ti,Go,"♮","\\natural",!0);Qr(xn,Ti,Go,"♣","\\clubsuit",!0);Qr(xn,Ti,Go,"℘","\\wp",!0);Qr(xn,Ti,Go,"♯","\\sharp",!0);Qr(xn,Ti,Go,"♢","\\diamondsuit",!0);Qr(xn,Ti,Go,"ℜ","\\Re",!0);Qr(xn,Ti,Go,"♡","\\heartsuit",!0);Qr(xn,Ti,Go,"ℑ","\\Im",!0);Qr(xn,Ti,Go,"♠","\\spadesuit",!0);Qr(xn,Ti,Go,"§","\\S",!0);Qr(ru,Ti,Go,"§","\\S");Qr(xn,Ti,Go,"¶","\\P",!0);Qr(ru,Ti,Go,"¶","\\P");Qr(xn,Ti,Go,"†","\\dag");Qr(ru,Ti,Go,"†","\\dag");Qr(ru,Ti,Go,"†","\\textdagger");Qr(xn,Ti,Go,"‡","\\ddag");Qr(ru,Ti,Go,"‡","\\ddag");Qr(ru,Ti,Go,"‡","\\textdaggerdbl");Qr(xn,Ti,K2,"⎱","\\rmoustache",!0);Qr(xn,Ti,yE,"⎰","\\lmoustache",!0);Qr(xn,Ti,K2,"⟯","\\rgroup",!0);Qr(xn,Ti,yE,"⟮","\\lgroup",!0);Qr(xn,Ti,jc,"∓","\\mp",!0);Qr(xn,Ti,jc,"⊖","\\ominus",!0);Qr(xn,Ti,jc,"⊎","\\uplus",!0);Qr(xn,Ti,jc,"⊓","\\sqcap",!0);Qr(xn,Ti,jc,"∗","\\ast");Qr(xn,Ti,jc,"⊔","\\sqcup",!0);Qr(xn,Ti,jc,"◯","\\bigcirc",!0);Qr(xn,Ti,jc,"∙","\\bullet",!0);Qr(xn,Ti,jc,"‡","\\ddagger");Qr(xn,Ti,jc,"≀","\\wr",!0);Qr(xn,Ti,jc,"⨿","\\amalg");Qr(xn,Ti,jc,"&","\\And");Qr(xn,Ti,fo,"⟵","\\longleftarrow",!0);Qr(xn,Ti,fo,"⇐","\\Leftarrow",!0);Qr(xn,Ti,fo,"⟸","\\Longleftarrow",!0);Qr(xn,Ti,fo,"⟶","\\longrightarrow",!0);Qr(xn,Ti,fo,"⇒","\\Rightarrow",!0);Qr(xn,Ti,fo,"⟹","\\Longrightarrow",!0);Qr(xn,Ti,fo,"↔","\\leftrightarrow",!0);Qr(xn,Ti,fo,"⟷","\\longleftrightarrow",!0);Qr(xn,Ti,fo,"⇔","\\Leftrightarrow",!0);Qr(xn,Ti,fo,"⟺","\\Longleftrightarrow",!0);Qr(xn,Ti,fo,"↦","\\mapsto",!0);Qr(xn,Ti,fo,"⟼","\\longmapsto",!0);Qr(xn,Ti,fo,"↗","\\nearrow",!0);Qr(xn,Ti,fo,"↩","\\hookleftarrow",!0);Qr(xn,Ti,fo,"↪","\\hookrightarrow",!0);Qr(xn,Ti,fo,"↘","\\searrow",!0);Qr(xn,Ti,fo,"↼","\\leftharpoonup",!0);Qr(xn,Ti,fo,"⇀","\\rightharpoonup",!0);Qr(xn,Ti,fo,"↙","\\swarrow",!0);Qr(xn,Ti,fo,"↽","\\leftharpoondown",!0);Qr(xn,Ti,fo,"⇁","\\rightharpoondown",!0);Qr(xn,Ti,fo,"↖","\\nwarrow",!0);Qr(xn,Ti,fo,"⇌","\\rightleftharpoons",!0);Qr(xn,ao,fo,"≮","\\nless",!0);Qr(xn,ao,fo,"","\\@nleqslant");Qr(xn,ao,fo,"","\\@nleqq");Qr(xn,ao,fo,"⪇","\\lneq",!0);Qr(xn,ao,fo,"≨","\\lneqq",!0);Qr(xn,ao,fo,"","\\@lvertneqq");Qr(xn,ao,fo,"⋦","\\lnsim",!0);Qr(xn,ao,fo,"⪉","\\lnapprox",!0);Qr(xn,ao,fo,"⊀","\\nprec",!0);Qr(xn,ao,fo,"⋠","\\npreceq",!0);Qr(xn,ao,fo,"⋨","\\precnsim",!0);Qr(xn,ao,fo,"⪹","\\precnapprox",!0);Qr(xn,ao,fo,"≁","\\nsim",!0);Qr(xn,ao,fo,"","\\@nshortmid");Qr(xn,ao,fo,"∤","\\nmid",!0);Qr(xn,ao,fo,"⊬","\\nvdash",!0);Qr(xn,ao,fo,"⊭","\\nvDash",!0);Qr(xn,ao,fo,"⋪","\\ntriangleleft");Qr(xn,ao,fo,"⋬","\\ntrianglelefteq",!0);Qr(xn,ao,fo,"⊊","\\subsetneq",!0);Qr(xn,ao,fo,"","\\@varsubsetneq");Qr(xn,ao,fo,"⫋","\\subsetneqq",!0);Qr(xn,ao,fo,"","\\@varsubsetneqq");Qr(xn,ao,fo,"≯","\\ngtr",!0);Qr(xn,ao,fo,"","\\@ngeqslant");Qr(xn,ao,fo,"","\\@ngeqq");Qr(xn,ao,fo,"⪈","\\gneq",!0);Qr(xn,ao,fo,"≩","\\gneqq",!0);Qr(xn,ao,fo,"","\\@gvertneqq");Qr(xn,ao,fo,"⋧","\\gnsim",!0);Qr(xn,ao,fo,"⪊","\\gnapprox",!0);Qr(xn,ao,fo,"⊁","\\nsucc",!0);Qr(xn,ao,fo,"⋡","\\nsucceq",!0);Qr(xn,ao,fo,"⋩","\\succnsim",!0);Qr(xn,ao,fo,"⪺","\\succnapprox",!0);Qr(xn,ao,fo,"≆","\\ncong",!0);Qr(xn,ao,fo,"","\\@nshortparallel");Qr(xn,ao,fo,"∦","\\nparallel",!0);Qr(xn,ao,fo,"⊯","\\nVDash",!0);Qr(xn,ao,fo,"⋫","\\ntriangleright");Qr(xn,ao,fo,"⋭","\\ntrianglerighteq",!0);Qr(xn,ao,fo,"","\\@nsupseteqq");Qr(xn,ao,fo,"⊋","\\supsetneq",!0);Qr(xn,ao,fo,"","\\@varsupsetneq");Qr(xn,ao,fo,"⫌","\\supsetneqq",!0);Qr(xn,ao,fo,"","\\@varsupsetneqq");Qr(xn,ao,fo,"⊮","\\nVdash",!0);Qr(xn,ao,fo,"⪵","\\precneqq",!0);Qr(xn,ao,fo,"⪶","\\succneqq",!0);Qr(xn,ao,fo,"","\\@nsubseteqq");Qr(xn,ao,jc,"⊴","\\unlhd");Qr(xn,ao,jc,"⊵","\\unrhd");Qr(xn,ao,fo,"↚","\\nleftarrow",!0);Qr(xn,ao,fo,"↛","\\nrightarrow",!0);Qr(xn,ao,fo,"⇍","\\nLeftarrow",!0);Qr(xn,ao,fo,"⇏","\\nRightarrow",!0);Qr(xn,ao,fo,"↮","\\nleftrightarrow",!0);Qr(xn,ao,fo,"⇎","\\nLeftrightarrow",!0);Qr(xn,ao,fo,"△","\\vartriangle");Qr(xn,ao,Go,"ℏ","\\hslash");Qr(xn,ao,Go,"▽","\\triangledown");Qr(xn,ao,Go,"◊","\\lozenge");Qr(xn,ao,Go,"Ⓢ","\\circledS");Qr(xn,ao,Go,"®","\\circledR");Qr(ru,ao,Go,"®","\\circledR");Qr(xn,ao,Go,"∡","\\measuredangle",!0);Qr(xn,ao,Go,"∄","\\nexists");Qr(xn,ao,Go,"℧","\\mho");Qr(xn,ao,Go,"Ⅎ","\\Finv",!0);Qr(xn,ao,Go,"⅁","\\Game",!0);Qr(xn,ao,Go,"‵","\\backprime");Qr(xn,ao,Go,"▲","\\blacktriangle");Qr(xn,ao,Go,"▼","\\blacktriangledown");Qr(xn,ao,Go,"■","\\blacksquare");Qr(xn,ao,Go,"⧫","\\blacklozenge");Qr(xn,ao,Go,"★","\\bigstar");Qr(xn,ao,Go,"∢","\\sphericalangle",!0);Qr(xn,ao,Go,"∁","\\complement",!0);Qr(xn,ao,Go,"ð","\\eth",!0);Qr(ru,Ti,Go,"ð","ð");Qr(xn,ao,Go,"╱","\\diagup");Qr(xn,ao,Go,"╲","\\diagdown");Qr(xn,ao,Go,"□","\\square");Qr(xn,ao,Go,"□","\\Box");Qr(xn,ao,Go,"◊","\\Diamond");Qr(xn,ao,Go,"¥","\\yen",!0);Qr(ru,ao,Go,"¥","\\yen",!0);Qr(xn,ao,Go,"✓","\\checkmark",!0);Qr(ru,ao,Go,"✓","\\checkmark");Qr(xn,ao,Go,"ℶ","\\beth",!0);Qr(xn,ao,Go,"ℸ","\\daleth",!0);Qr(xn,ao,Go,"ℷ","\\gimel",!0);Qr(xn,ao,Go,"ϝ","\\digamma",!0);Qr(xn,ao,Go,"ϰ","\\varkappa");Qr(xn,ao,yE,"┌","\\@ulcorner",!0);Qr(xn,ao,K2,"┐","\\@urcorner",!0);Qr(xn,ao,yE,"└","\\@llcorner",!0);Qr(xn,ao,K2,"┘","\\@lrcorner",!0);Qr(xn,ao,fo,"≦","\\leqq",!0);Qr(xn,ao,fo,"⩽","\\leqslant",!0);Qr(xn,ao,fo,"⪕","\\eqslantless",!0);Qr(xn,ao,fo,"≲","\\lesssim",!0);Qr(xn,ao,fo,"⪅","\\lessapprox",!0);Qr(xn,ao,fo,"≊","\\approxeq",!0);Qr(xn,ao,jc,"⋖","\\lessdot");Qr(xn,ao,fo,"⋘","\\lll",!0);Qr(xn,ao,fo,"≶","\\lessgtr",!0);Qr(xn,ao,fo,"⋚","\\lesseqgtr",!0);Qr(xn,ao,fo,"⪋","\\lesseqqgtr",!0);Qr(xn,ao,fo,"≑","\\doteqdot");Qr(xn,ao,fo,"≓","\\risingdotseq",!0);Qr(xn,ao,fo,"≒","\\fallingdotseq",!0);Qr(xn,ao,fo,"∽","\\backsim",!0);Qr(xn,ao,fo,"⋍","\\backsimeq",!0);Qr(xn,ao,fo,"⫅","\\subseteqq",!0);Qr(xn,ao,fo,"⋐","\\Subset",!0);Qr(xn,ao,fo,"⊏","\\sqsubset",!0);Qr(xn,ao,fo,"≼","\\preccurlyeq",!0);Qr(xn,ao,fo,"⋞","\\curlyeqprec",!0);Qr(xn,ao,fo,"≾","\\precsim",!0);Qr(xn,ao,fo,"⪷","\\precapprox",!0);Qr(xn,ao,fo,"⊲","\\vartriangleleft");Qr(xn,ao,fo,"⊴","\\trianglelefteq");Qr(xn,ao,fo,"⊨","\\vDash",!0);Qr(xn,ao,fo,"⊪","\\Vvdash",!0);Qr(xn,ao,fo,"⌣","\\smallsmile");Qr(xn,ao,fo,"⌢","\\smallfrown");Qr(xn,ao,fo,"≏","\\bumpeq",!0);Qr(xn,ao,fo,"≎","\\Bumpeq",!0);Qr(xn,ao,fo,"≧","\\geqq",!0);Qr(xn,ao,fo,"⩾","\\geqslant",!0);Qr(xn,ao,fo,"⪖","\\eqslantgtr",!0);Qr(xn,ao,fo,"≳","\\gtrsim",!0);Qr(xn,ao,fo,"⪆","\\gtrapprox",!0);Qr(xn,ao,jc,"⋗","\\gtrdot");Qr(xn,ao,fo,"⋙","\\ggg",!0);Qr(xn,ao,fo,"≷","\\gtrless",!0);Qr(xn,ao,fo,"⋛","\\gtreqless",!0);Qr(xn,ao,fo,"⪌","\\gtreqqless",!0);Qr(xn,ao,fo,"≖","\\eqcirc",!0);Qr(xn,ao,fo,"≗","\\circeq",!0);Qr(xn,ao,fo,"≜","\\triangleq",!0);Qr(xn,ao,fo,"∼","\\thicksim");Qr(xn,ao,fo,"≈","\\thickapprox");Qr(xn,ao,fo,"⫆","\\supseteqq",!0);Qr(xn,ao,fo,"⋑","\\Supset",!0);Qr(xn,ao,fo,"⊐","\\sqsupset",!0);Qr(xn,ao,fo,"≽","\\succcurlyeq",!0);Qr(xn,ao,fo,"⋟","\\curlyeqsucc",!0);Qr(xn,ao,fo,"≿","\\succsim",!0);Qr(xn,ao,fo,"⪸","\\succapprox",!0);Qr(xn,ao,fo,"⊳","\\vartriangleright");Qr(xn,ao,fo,"⊵","\\trianglerighteq");Qr(xn,ao,fo,"⊩","\\Vdash",!0);Qr(xn,ao,fo,"∣","\\shortmid");Qr(xn,ao,fo,"∥","\\shortparallel");Qr(xn,ao,fo,"≬","\\between",!0);Qr(xn,ao,fo,"⋔","\\pitchfork",!0);Qr(xn,ao,fo,"∝","\\varpropto");Qr(xn,ao,fo,"◀","\\blacktriangleleft");Qr(xn,ao,fo,"∴","\\therefore",!0);Qr(xn,ao,fo,"∍","\\backepsilon");Qr(xn,ao,fo,"▶","\\blacktriangleright");Qr(xn,ao,fo,"∵","\\because",!0);Qr(xn,ao,fo,"⋘","\\llless");Qr(xn,ao,fo,"⋙","\\gggtr");Qr(xn,ao,jc,"⊲","\\lhd");Qr(xn,ao,jc,"⊳","\\rhd");Qr(xn,ao,fo,"≂","\\eqsim",!0);Qr(xn,Ti,fo,"⋈","\\Join");Qr(xn,ao,fo,"≑","\\Doteq",!0);Qr(xn,ao,jc,"∔","\\dotplus",!0);Qr(xn,ao,jc,"∖","\\smallsetminus");Qr(xn,ao,jc,"⋒","\\Cap",!0);Qr(xn,ao,jc,"⋓","\\Cup",!0);Qr(xn,ao,jc,"⩞","\\doublebarwedge",!0);Qr(xn,ao,jc,"⊟","\\boxminus",!0);Qr(xn,ao,jc,"⊞","\\boxplus",!0);Qr(xn,ao,jc,"⋇","\\divideontimes",!0);Qr(xn,ao,jc,"⋉","\\ltimes",!0);Qr(xn,ao,jc,"⋊","\\rtimes",!0);Qr(xn,ao,jc,"⋋","\\leftthreetimes",!0);Qr(xn,ao,jc,"⋌","\\rightthreetimes",!0);Qr(xn,ao,jc,"⋏","\\curlywedge",!0);Qr(xn,ao,jc,"⋎","\\curlyvee",!0);Qr(xn,ao,jc,"⊝","\\circleddash",!0);Qr(xn,ao,jc,"⊛","\\circledast",!0);Qr(xn,ao,jc,"⋅","\\centerdot");Qr(xn,ao,jc,"⊺","\\intercal",!0);Qr(xn,ao,jc,"⋒","\\doublecap");Qr(xn,ao,jc,"⋓","\\doublecup");Qr(xn,ao,jc,"⊠","\\boxtimes",!0);Qr(xn,ao,fo,"⇢","\\dashrightarrow",!0);Qr(xn,ao,fo,"⇠","\\dashleftarrow",!0);Qr(xn,ao,fo,"⇇","\\leftleftarrows",!0);Qr(xn,ao,fo,"⇆","\\leftrightarrows",!0);Qr(xn,ao,fo,"⇚","\\Lleftarrow",!0);Qr(xn,ao,fo,"↞","\\twoheadleftarrow",!0);Qr(xn,ao,fo,"↢","\\leftarrowtail",!0);Qr(xn,ao,fo,"↫","\\looparrowleft",!0);Qr(xn,ao,fo,"⇋","\\leftrightharpoons",!0);Qr(xn,ao,fo,"↶","\\curvearrowleft",!0);Qr(xn,ao,fo,"↺","\\circlearrowleft",!0);Qr(xn,ao,fo,"↰","\\Lsh",!0);Qr(xn,ao,fo,"⇈","\\upuparrows",!0);Qr(xn,ao,fo,"↿","\\upharpoonleft",!0);Qr(xn,ao,fo,"⇃","\\downharpoonleft",!0);Qr(xn,Ti,fo,"⊶","\\origof",!0);Qr(xn,Ti,fo,"⊷","\\imageof",!0);Qr(xn,ao,fo,"⊸","\\multimap",!0);Qr(xn,ao,fo,"↭","\\leftrightsquigarrow",!0);Qr(xn,ao,fo,"⇉","\\rightrightarrows",!0);Qr(xn,ao,fo,"⇄","\\rightleftarrows",!0);Qr(xn,ao,fo,"↠","\\twoheadrightarrow",!0);Qr(xn,ao,fo,"↣","\\rightarrowtail",!0);Qr(xn,ao,fo,"↬","\\looparrowright",!0);Qr(xn,ao,fo,"↷","\\curvearrowright",!0);Qr(xn,ao,fo,"↻","\\circlearrowright",!0);Qr(xn,ao,fo,"↱","\\Rsh",!0);Qr(xn,ao,fo,"⇊","\\downdownarrows",!0);Qr(xn,ao,fo,"↾","\\upharpoonright",!0);Qr(xn,ao,fo,"⇂","\\downharpoonright",!0);Qr(xn,ao,fo,"⇝","\\rightsquigarrow",!0);Qr(xn,ao,fo,"⇝","\\leadsto");Qr(xn,ao,fo,"⇛","\\Rrightarrow",!0);Qr(xn,ao,fo,"↾","\\restriction");Qr(xn,Ti,Go,"‘","`");Qr(xn,Ti,Go,"$","\\$");Qr(ru,Ti,Go,"$","\\$");Qr(ru,Ti,Go,"$","\\textdollar");Qr(xn,Ti,Go,"%","\\%");Qr(ru,Ti,Go,"%","\\%");Qr(xn,Ti,Go,"_","\\_");Qr(ru,Ti,Go,"_","\\_");Qr(ru,Ti,Go,"_","\\textunderscore");Qr(xn,Ti,Go,"∠","\\angle",!0);Qr(xn,Ti,Go,"∞","\\infty",!0);Qr(xn,Ti,Go,"′","\\prime");Qr(xn,Ti,Go,"△","\\triangle");Qr(xn,Ti,Go,"Γ","\\Gamma",!0);Qr(xn,Ti,Go,"Δ","\\Delta",!0);Qr(xn,Ti,Go,"Θ","\\Theta",!0);Qr(xn,Ti,Go,"Λ","\\Lambda",!0);Qr(xn,Ti,Go,"Ξ","\\Xi",!0);Qr(xn,Ti,Go,"Π","\\Pi",!0);Qr(xn,Ti,Go,"Σ","\\Sigma",!0);Qr(xn,Ti,Go,"Υ","\\Upsilon",!0);Qr(xn,Ti,Go,"Φ","\\Phi",!0);Qr(xn,Ti,Go,"Ψ","\\Psi",!0);Qr(xn,Ti,Go,"Ω","\\Omega",!0);Qr(xn,Ti,Go,"A","Α");Qr(xn,Ti,Go,"B","Β");Qr(xn,Ti,Go,"E","Ε");Qr(xn,Ti,Go,"Z","Ζ");Qr(xn,Ti,Go,"H","Η");Qr(xn,Ti,Go,"I","Ι");Qr(xn,Ti,Go,"K","Κ");Qr(xn,Ti,Go,"M","Μ");Qr(xn,Ti,Go,"N","Ν");Qr(xn,Ti,Go,"O","Ο");Qr(xn,Ti,Go,"P","Ρ");Qr(xn,Ti,Go,"T","Τ");Qr(xn,Ti,Go,"X","Χ");Qr(xn,Ti,Go,"¬","\\neg",!0);Qr(xn,Ti,Go,"¬","\\lnot");Qr(xn,Ti,Go,"⊤","\\top");Qr(xn,Ti,Go,"⊥","\\bot");Qr(xn,Ti,Go,"∅","\\emptyset");Qr(xn,ao,Go,"∅","\\varnothing");Qr(xn,Ti,dd,"α","\\alpha",!0);Qr(xn,Ti,dd,"β","\\beta",!0);Qr(xn,Ti,dd,"γ","\\gamma",!0);Qr(xn,Ti,dd,"δ","\\delta",!0);Qr(xn,Ti,dd,"ϵ","\\epsilon",!0);Qr(xn,Ti,dd,"ζ","\\zeta",!0);Qr(xn,Ti,dd,"η","\\eta",!0);Qr(xn,Ti,dd,"θ","\\theta",!0);Qr(xn,Ti,dd,"ι","\\iota",!0);Qr(xn,Ti,dd,"κ","\\kappa",!0);Qr(xn,Ti,dd,"λ","\\lambda",!0);Qr(xn,Ti,dd,"μ","\\mu",!0);Qr(xn,Ti,dd,"ν","\\nu",!0);Qr(xn,Ti,dd,"ξ","\\xi",!0);Qr(xn,Ti,dd,"ο","\\omicron",!0);Qr(xn,Ti,dd,"π","\\pi",!0);Qr(xn,Ti,dd,"ρ","\\rho",!0);Qr(xn,Ti,dd,"σ","\\sigma",!0);Qr(xn,Ti,dd,"τ","\\tau",!0);Qr(xn,Ti,dd,"υ","\\upsilon",!0);Qr(xn,Ti,dd,"ϕ","\\phi",!0);Qr(xn,Ti,dd,"χ","\\chi",!0);Qr(xn,Ti,dd,"ψ","\\psi",!0);Qr(xn,Ti,dd,"ω","\\omega",!0);Qr(xn,Ti,dd,"ε","\\varepsilon",!0);Qr(xn,Ti,dd,"ϑ","\\vartheta",!0);Qr(xn,Ti,dd,"ϖ","\\varpi",!0);Qr(xn,Ti,dd,"ϱ","\\varrho",!0);Qr(xn,Ti,dd,"ς","\\varsigma",!0);Qr(xn,Ti,dd,"φ","\\varphi",!0);Qr(xn,Ti,jc,"∗","*",!0);Qr(xn,Ti,jc,"+","+");Qr(xn,Ti,jc,"−","-",!0);Qr(xn,Ti,jc,"⋅","\\cdot",!0);Qr(xn,Ti,jc,"∘","\\circ",!0);Qr(xn,Ti,jc,"÷","\\div",!0);Qr(xn,Ti,jc,"±","\\pm",!0);Qr(xn,Ti,jc,"×","\\times",!0);Qr(xn,Ti,jc,"∩","\\cap",!0);Qr(xn,Ti,jc,"∪","\\cup",!0);Qr(xn,Ti,jc,"∖","\\setminus",!0);Qr(xn,Ti,jc,"∧","\\land");Qr(xn,Ti,jc,"∨","\\lor");Qr(xn,Ti,jc,"∧","\\wedge",!0);Qr(xn,Ti,jc,"∨","\\vee",!0);Qr(xn,Ti,Go,"√","\\surd");Qr(xn,Ti,yE,"⟨","\\langle",!0);Qr(xn,Ti,yE,"∣","\\lvert");Qr(xn,Ti,yE,"∥","\\lVert");Qr(xn,Ti,K2,"?","?");Qr(xn,Ti,K2,"!","!");Qr(xn,Ti,K2,"⟩","\\rangle",!0);Qr(xn,Ti,K2,"∣","\\rvert");Qr(xn,Ti,K2,"∥","\\rVert");Qr(xn,Ti,fo,"=","=");Qr(xn,Ti,fo,":",":");Qr(xn,Ti,fo,"≈","\\approx",!0);Qr(xn,Ti,fo,"≅","\\cong",!0);Qr(xn,Ti,fo,"≥","\\ge");Qr(xn,Ti,fo,"≥","\\geq",!0);Qr(xn,Ti,fo,"←","\\gets");Qr(xn,Ti,fo,">","\\gt",!0);Qr(xn,Ti,fo,"∈","\\in",!0);Qr(xn,Ti,fo,"","\\@not");Qr(xn,Ti,fo,"⊂","\\subset",!0);Qr(xn,Ti,fo,"⊃","\\supset",!0);Qr(xn,Ti,fo,"⊆","\\subseteq",!0);Qr(xn,Ti,fo,"⊇","\\supseteq",!0);Qr(xn,ao,fo,"⊈","\\nsubseteq",!0);Qr(xn,ao,fo,"⊉","\\nsupseteq",!0);Qr(xn,Ti,fo,"⊨","\\models");Qr(xn,Ti,fo,"←","\\leftarrow",!0);Qr(xn,Ti,fo,"≤","\\le");Qr(xn,Ti,fo,"≤","\\leq",!0);Qr(xn,Ti,fo,"<","\\lt",!0);Qr(xn,Ti,fo,"→","\\rightarrow",!0);Qr(xn,Ti,fo,"→","\\to");Qr(xn,ao,fo,"≱","\\ngeq",!0);Qr(xn,ao,fo,"≰","\\nleq",!0);Qr(xn,Ti,Wk," ","\\ ");Qr(xn,Ti,Wk," ","\\space");Qr(xn,Ti,Wk," ","\\nobreakspace");Qr(ru,Ti,Wk," ","\\ ");Qr(ru,Ti,Wk," "," ");Qr(ru,Ti,Wk," ","\\space");Qr(ru,Ti,Wk," ","\\nobreakspace");Qr(xn,Ti,Wk,null,"\\nobreak");Qr(xn,Ti,Wk,null,"\\allowbreak");Qr(xn,Ti,MZ,",",",");Qr(xn,Ti,MZ,";",";");Qr(xn,ao,jc,"⊼","\\barwedge",!0);Qr(xn,ao,jc,"⊻","\\veebar",!0);Qr(xn,Ti,jc,"⊙","\\odot",!0);Qr(xn,Ti,jc,"⊕","\\oplus",!0);Qr(xn,Ti,jc,"⊗","\\otimes",!0);Qr(xn,Ti,Go,"∂","\\partial",!0);Qr(xn,Ti,jc,"⊘","\\oslash",!0);Qr(xn,ao,jc,"⊚","\\circledcirc",!0);Qr(xn,ao,jc,"⊡","\\boxdot",!0);Qr(xn,Ti,jc,"△","\\bigtriangleup");Qr(xn,Ti,jc,"▽","\\bigtriangledown");Qr(xn,Ti,jc,"†","\\dagger");Qr(xn,Ti,jc,"⋄","\\diamond");Qr(xn,Ti,jc,"⋆","\\star");Qr(xn,Ti,jc,"◃","\\triangleleft");Qr(xn,Ti,jc,"▹","\\triangleright");Qr(xn,Ti,yE,"{","\\{");Qr(ru,Ti,Go,"{","\\{");Qr(ru,Ti,Go,"{","\\textbraceleft");Qr(xn,Ti,K2,"}","\\}");Qr(ru,Ti,Go,"}","\\}");Qr(ru,Ti,Go,"}","\\textbraceright");Qr(xn,Ti,yE,"{","\\lbrace");Qr(xn,Ti,K2,"}","\\rbrace");Qr(xn,Ti,yE,"[","\\lbrack",!0);Qr(ru,Ti,Go,"[","\\lbrack",!0);Qr(xn,Ti,K2,"]","\\rbrack",!0);Qr(ru,Ti,Go,"]","\\rbrack",!0);Qr(xn,Ti,yE,"(","\\lparen",!0);Qr(xn,Ti,K2,")","\\rparen",!0);Qr(ru,Ti,Go,"<","\\textless",!0);Qr(ru,Ti,Go,">","\\textgreater",!0);Qr(xn,Ti,yE,"⌊","\\lfloor",!0);Qr(xn,Ti,K2,"⌋","\\rfloor",!0);Qr(xn,Ti,yE,"⌈","\\lceil",!0);Qr(xn,Ti,K2,"⌉","\\rceil",!0);Qr(xn,Ti,Go,"\\","\\backslash");Qr(xn,Ti,Go,"∣","|");Qr(xn,Ti,Go,"∣","\\vert");Qr(ru,Ti,Go,"|","\\textbar",!0);Qr(xn,Ti,Go,"∥","\\|");Qr(xn,Ti,Go,"∥","\\Vert");Qr(ru,Ti,Go,"∥","\\textbardbl");Qr(ru,Ti,Go,"~","\\textasciitilde");Qr(ru,Ti,Go,"\\","\\textbackslash");Qr(ru,Ti,Go,"^","\\textasciicircum");Qr(xn,Ti,fo,"↑","\\uparrow",!0);Qr(xn,Ti,fo,"⇑","\\Uparrow",!0);Qr(xn,Ti,fo,"↓","\\downarrow",!0);Qr(xn,Ti,fo,"⇓","\\Downarrow",!0);Qr(xn,Ti,fo,"↕","\\updownarrow",!0);Qr(xn,Ti,fo,"⇕","\\Updownarrow",!0);Qr(xn,Ti,Ib,"∐","\\coprod");Qr(xn,Ti,Ib,"⋁","\\bigvee");Qr(xn,Ti,Ib,"⋀","\\bigwedge");Qr(xn,Ti,Ib,"⨄","\\biguplus");Qr(xn,Ti,Ib,"⋂","\\bigcap");Qr(xn,Ti,Ib,"⋃","\\bigcup");Qr(xn,Ti,Ib,"∫","\\int");Qr(xn,Ti,Ib,"∫","\\intop");Qr(xn,Ti,Ib,"∬","\\iint");Qr(xn,Ti,Ib,"∭","\\iiint");Qr(xn,Ti,Ib,"∏","\\prod");Qr(xn,Ti,Ib,"∑","\\sum");Qr(xn,Ti,Ib,"⨂","\\bigotimes");Qr(xn,Ti,Ib,"⨁","\\bigoplus");Qr(xn,Ti,Ib,"⨀","\\bigodot");Qr(xn,Ti,Ib,"∮","\\oint");Qr(xn,Ti,Ib,"∯","\\oiint");Qr(xn,Ti,Ib,"∰","\\oiiint");Qr(xn,Ti,Ib,"⨆","\\bigsqcup");Qr(xn,Ti,Ib,"∫","\\smallint");Qr(ru,Ti,TF,"…","\\textellipsis");Qr(xn,Ti,TF,"…","\\mathellipsis");Qr(ru,Ti,TF,"…","\\ldots",!0);Qr(xn,Ti,TF,"…","\\ldots",!0);Qr(xn,Ti,TF,"⋯","\\@cdots",!0);Qr(xn,Ti,TF,"⋱","\\ddots",!0);Qr(xn,Ti,Go,"⋮","\\varvdots");Qr(ru,Ti,Go,"⋮","\\varvdots");Qr(xn,Ti,fy,"ˊ","\\acute");Qr(xn,Ti,fy,"ˋ","\\grave");Qr(xn,Ti,fy,"¨","\\ddot");Qr(xn,Ti,fy,"~","\\tilde");Qr(xn,Ti,fy,"ˉ","\\bar");Qr(xn,Ti,fy,"˘","\\breve");Qr(xn,Ti,fy,"ˇ","\\check");Qr(xn,Ti,fy,"^","\\hat");Qr(xn,Ti,fy,"⃗","\\vec");Qr(xn,Ti,fy,"˙","\\dot");Qr(xn,Ti,fy,"˚","\\mathring");Qr(xn,Ti,dd,"","\\@imath");Qr(xn,Ti,dd,"","\\@jmath");Qr(xn,Ti,Go,"ı","ı");Qr(xn,Ti,Go,"ȷ","ȷ");Qr(ru,Ti,Go,"ı","\\i",!0);Qr(ru,Ti,Go,"ȷ","\\j",!0);Qr(ru,Ti,Go,"ß","\\ss",!0);Qr(ru,Ti,Go,"æ","\\ae",!0);Qr(ru,Ti,Go,"œ","\\oe",!0);Qr(ru,Ti,Go,"ø","\\o",!0);Qr(ru,Ti,Go,"Æ","\\AE",!0);Qr(ru,Ti,Go,"Œ","\\OE",!0);Qr(ru,Ti,Go,"Ø","\\O",!0);Qr(ru,Ti,fy,"ˊ","\\'");Qr(ru,Ti,fy,"ˋ","\\`");Qr(ru,Ti,fy,"ˆ","\\^");Qr(ru,Ti,fy,"˜","\\~");Qr(ru,Ti,fy,"ˉ","\\=");Qr(ru,Ti,fy,"˘","\\u");Qr(ru,Ti,fy,"˙","\\.");Qr(ru,Ti,fy,"¸","\\c");Qr(ru,Ti,fy,"˚","\\r");Qr(ru,Ti,fy,"ˇ","\\v");Qr(ru,Ti,fy,"¨",'\\"');Qr(ru,Ti,fy,"˝","\\H");Qr(ru,Ti,fy,"◯","\\textcircled");var JXe={"--":!0,"---":!0,"``":!0,"''":!0};Qr(ru,Ti,Go,"–","--",!0);Qr(ru,Ti,Go,"–","\\textendash");Qr(ru,Ti,Go,"—","---",!0);Qr(ru,Ti,Go,"—","\\textemdash");Qr(ru,Ti,Go,"‘","`",!0);Qr(ru,Ti,Go,"‘","\\textquoteleft");Qr(ru,Ti,Go,"’","'",!0);Qr(ru,Ti,Go,"’","\\textquoteright");Qr(ru,Ti,Go,"“","``",!0);Qr(ru,Ti,Go,"“","\\textquotedblleft");Qr(ru,Ti,Go,"”","''",!0);Qr(ru,Ti,Go,"”","\\textquotedblright");Qr(xn,Ti,Go,"°","\\degree",!0);Qr(ru,Ti,Go,"°","\\degree");Qr(ru,Ti,Go,"°","\\textdegree",!0);Qr(xn,Ti,Go,"£","\\pounds");Qr(xn,Ti,Go,"£","\\mathsterling",!0);Qr(ru,Ti,Go,"£","\\pounds");Qr(ru,Ti,Go,"£","\\textsterling",!0);Qr(xn,ao,Go,"✠","\\maltese");Qr(ru,ao,Go,"✠","\\maltese");var cLe='0123456789/@."';for(var $oe=0;$oe<cLe.length;$oe++){var fLe=cLe.charAt($oe);Qr(xn,Ti,Go,fLe,fLe)}var dLe='0123456789!@*()-=+";:?/.,';for(var Woe=0;Woe<dLe.length;Woe++){var hLe=dLe.charAt(Woe);Qr(ru,Ti,Go,hLe,hLe)}var BW="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(var Yoe=0;Yoe<BW.length;Yoe++){var Nq=BW.charAt(Yoe);Qr(xn,Ti,dd,Nq,Nq),Qr(ru,Ti,Go,Nq,Nq)}Qr(xn,ao,Go,"C","ℂ");Qr(ru,ao,Go,"C","ℂ");Qr(xn,ao,Go,"H","ℍ");Qr(ru,ao,Go,"H","ℍ");Qr(xn,ao,Go,"N","ℕ");Qr(ru,ao,Go,"N","ℕ");Qr(xn,ao,Go,"P","ℙ");Qr(ru,ao,Go,"P","ℙ");Qr(xn,ao,Go,"Q","ℚ");Qr(ru,ao,Go,"Q","ℚ");Qr(xn,ao,Go,"R","ℝ");Qr(ru,ao,Go,"R","ℝ");Qr(xn,ao,Go,"Z","ℤ");Qr(ru,ao,Go,"Z","ℤ");Qr(xn,Ti,dd,"h","ℎ");Qr(ru,Ti,dd,"h","ℎ");var jd="";for(var P2=0;P2<BW.length;P2++){var d1=BW.charAt(P2);jd=String.fromCharCode(55349,56320+P2),Qr(xn,Ti,dd,d1,jd),Qr(ru,Ti,Go,d1,jd),jd=String.fromCharCode(55349,56372+P2),Qr(xn,Ti,dd,d1,jd),Qr(ru,Ti,Go,d1,jd),jd=String.fromCharCode(55349,56424+P2),Qr(xn,Ti,dd,d1,jd),Qr(ru,Ti,Go,d1,jd),jd=String.fromCharCode(55349,56580+P2),Qr(xn,Ti,dd,d1,jd),Qr(ru,Ti,Go,d1,jd),jd=String.fromCharCode(55349,56684+P2),Qr(xn,Ti,dd,d1,jd),Qr(ru,Ti,Go,d1,jd),jd=String.fromCharCode(55349,56736+P2),Qr(xn,Ti,dd,d1,jd),Qr(ru,Ti,Go,d1,jd),jd=String.fromCharCode(55349,56788+P2),Qr(xn,Ti,dd,d1,jd),Qr(ru,Ti,Go,d1,jd),jd=String.fromCharCode(55349,56840+P2),Qr(xn,Ti,dd,d1,jd),Qr(ru,Ti,Go,d1,jd),jd=String.fromCharCode(55349,56944+P2),Qr(xn,Ti,dd,d1,jd),Qr(ru,Ti,Go,d1,jd),P2<26&&(jd=String.fromCharCode(55349,56632+P2),Qr(xn,Ti,dd,d1,jd),Qr(ru,Ti,Go,d1,jd),jd=String.fromCharCode(55349,56476+P2),Qr(xn,Ti,dd,d1,jd),Qr(ru,Ti,Go,d1,jd))}jd="𝕜";Qr(xn,Ti,dd,"k",jd);Qr(ru,Ti,Go,"k",jd);for(var ND=0;ND<10;ND++){var _P=ND.toString();jd=String.fromCharCode(55349,57294+ND),Qr(xn,Ti,dd,_P,jd),Qr(ru,Ti,Go,_P,jd),jd=String.fromCharCode(55349,57314+ND),Qr(xn,Ti,dd,_P,jd),Qr(ru,Ti,Go,_P,jd),jd=String.fromCharCode(55349,57324+ND),Qr(xn,Ti,dd,_P,jd),Qr(ru,Ti,Go,_P,jd),jd=String.fromCharCode(55349,57334+ND),Qr(xn,Ti,dd,_P,jd),Qr(ru,Ti,Go,_P,jd)}var yve="ÐÞþ";for(var Xoe=0;Xoe<yve.length;Xoe++){var Fq=yve.charAt(Xoe);Qr(xn,Ti,dd,Fq,Fq),Qr(ru,Ti,Go,Fq,Fq)}var zq=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],pLe=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Vpr=function(e,r){var n=e.charCodeAt(0),i=e.charCodeAt(1),a=(n-55296)*1024+(i-56320)+65536,o=r==="math"?0:1;if(119808<=a&&a<120484){var s=Math.floor((a-119808)/26);return[zq[s][2],zq[s][o]]}else if(120782<=a&&a<=120831){var d=Math.floor((a-120782)/10);return[pLe[d][2],pLe[d][o]]}else{if(a===120485||a===120486)return[zq[0][2],zq[0][o]];if(120486<a&&a<120782)return["",""];throw new Eu("Unsupported character: "+e)}},RZ=function(e,r,n){return h0[n][e]&&h0[n][e].replace&&(e=h0[n][e].replace),{value:e,metrics:q1e(e,r,n)}},kC=function(e,r,n,i,a){var o=RZ(e,r,n),s=o.metrics;e=o.value;var d;if(s){var b=s.italic;(n==="text"||i&&i.font==="mathit")&&(b=0),d=new lA(e,s.height,s.depth,b,s.skew,s.width,a)}else typeof console<"u"&&console.warn("No character metrics "+("for '"+e+"' in style '"+r+"' and mode '"+n+"'")),d=new lA(e,0,0,0,0,0,a);if(i){d.maxFontSize=i.sizeMultiplier,i.style.isTight()&&d.classes.push("mtight");var L=i.getColor();L&&(d.style.color=L)}return d},qpr=function(e,r,n,i){return i===void 0&&(i=[]),n.font==="boldsymbol"&&RZ(e,"Main-Bold",r).metrics?kC(e,"Main-Bold",r,n,i.concat(["mathbf"])):e==="\\"||h0[r][e].font==="main"?kC(e,"Main-Regular",r,n,i):kC(e,"AMS-Regular",r,n,i.concat(["amsrm"]))},Gpr=function(e,r,n,i,a){return a!=="textord"&&RZ(e,"Math-BoldItalic",r).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},$pr=function(e,r,n){var i=e.mode,a=e.text,o=["mord"],s=i==="math"||i==="text"&&r.font,d=s?r.font:r.fontFamily,b="",L="";if(a.charCodeAt(0)===55349&&([b,L]=Vpr(a,i)),b.length>0)return kC(a,b,i,r,o.concat(L));if(d){var B,V;if(d==="boldsymbol"){var X=Gpr(a,i,r,o,n);B=X.fontName,V=[X.fontClass]}else s?(B=tZe[d].fontName,V=[d]):(B=Bq(d,r.fontWeight,r.fontShape),V=[d,r.fontWeight,r.fontShape]);if(RZ(a,B,i).metrics)return kC(a,B,i,r,o.concat(V));if(JXe.hasOwnProperty(a)&&B.slice(0,10)==="Typewriter"){for(var ie=[],de=0;de<a.length;de++)ie.push(kC(a[de],B,i,r,o.concat(V)));return eZe(ie)}}if(n==="mathord")return kC(a,"Math-Italic",i,r,o.concat(["mathnormal"]));if(n==="textord"){var ae=h0[i][a]&&h0[i][a].font;if(ae==="ams"){var U=Bq("amsrm",r.fontWeight,r.fontShape);return kC(a,U,i,r,o.concat("amsrm",r.fontWeight,r.fontShape))}else if(ae==="main"||!ae){var ve=Bq("textrm",r.fontWeight,r.fontShape);return kC(a,ve,i,r,o.concat(r.fontWeight,r.fontShape))}else{var Se=Bq(ae,r.fontWeight,r.fontShape);return kC(a,Se,i,r,o.concat(Se,r.fontWeight,r.fontShape))}}else throw new Error("unexpected type: "+n+" in makeOrd")},Wpr=(t,e)=>{if(o4(t.classes)!==o4(e.classes)||t.skew!==e.skew||t.maxFontSize!==e.maxFontSize)return!1;if(t.classes.length===1){var r=t.classes[0];if(r==="mbin"||r==="mord")return!1}for(var n in t.style)if(t.style.hasOwnProperty(n)&&t.style[n]!==e.style[n])return!1;for(var i in e.style)if(e.style.hasOwnProperty(i)&&t.style[i]!==e.style[i])return!1;return!0},Ypr=t=>{for(var e=0;e<t.length-1;e++){var r=t[e],n=t[e+1];r instanceof lA&&n instanceof lA&&Wpr(r,n)&&(r.text+=n.text,r.height=Math.max(r.height,n.height),r.depth=Math.max(r.depth,n.depth),r.italic=n.italic,t.splice(e+1,1),e--)}return t},$1e=function(e){for(var r=0,n=0,i=0,a=0;a<e.children.length;a++){var o=e.children[a];o.height>r&&(r=o.height),o.depth>n&&(n=o.depth),o.maxFontSize>i&&(i=o.maxFontSize)}e.height=r,e.depth=n,e.maxFontSize=i},zS=function(e,r,n,i){var a=new RU(e,r,n,i);return $1e(a),a},QXe=(t,e,r,n)=>new RU(t,e,r,n),Xpr=function(e,r,n){var i=zS([e],[],r);return i.height=Math.max(n||r.fontMetrics().defaultRuleThickness,r.minRuleThickness),i.style.borderBottomWidth=nc(i.height),i.maxFontSize=1,i},Zpr=function(e,r,n,i){var a=new G1e(e,r,n,i);return $1e(a),a},eZe=function(e){var r=new MU(e);return $1e(r),r},Kpr=function(e,r){return e instanceof MU?zS([],[e],r):e},Jpr=function(e){if(e.positionType==="individualShift"){for(var r=e.children,n=[r[0]],i=-r[0].shift-r[0].elem.depth,a=i,o=1;o<r.length;o++){var s=-r[o].shift-a-r[o].elem.depth,d=s-(r[o-1].elem.height+r[o-1].elem.depth);a=a+s,n.push({type:"kern",size:d}),n.push(r[o])}return{children:n,depth:i}}var b;if(e.positionType==="top"){for(var L=e.positionData,B=0;B<e.children.length;B++){var V=e.children[B];L-=V.type==="kern"?V.size:V.elem.height+V.elem.depth}b=L}else if(e.positionType==="bottom")b=-e.positionData;else{var X=e.children[0];if(X.type!=="elem")throw new Error('First child must have type "elem".');if(e.positionType==="shift")b=-X.elem.depth-e.positionData;else if(e.positionType==="firstBaseline")b=-X.elem.depth;else throw new Error("Invalid positionType "+e.positionType+".")}return{children:e.children,depth:b}},Qpr=function(e,r){for(var{children:n,depth:i}=Jpr(e),a=0,o=0;o<n.length;o++){var s=n[o];if(s.type==="elem"){var d=s.elem;a=Math.max(a,d.maxFontSize,d.height)}}a+=2;var b=zS(["pstrut"],[]);b.style.height=nc(a);for(var L=[],B=i,V=i,X=i,ie=0;ie<n.length;ie++){var de=n[ie];if(de.type==="kern")X+=de.size;else{var ae=de.elem,U=de.wrapperClasses||[],ve=de.wrapperStyle||{},Se=zS(U,[b,ae],void 0,ve);Se.style.top=nc(-a-X-ae.depth),de.marginLeft&&(Se.style.marginLeft=de.marginLeft),de.marginRight&&(Se.style.marginRight=de.marginRight),L.push(Se),X+=ae.height+ae.depth}B=Math.min(B,X),V=Math.max(V,X)}var Pe=zS(["vlist"],L);Pe.style.height=nc(V);var Me;if(B<0){var Ie=zS([],[]),Ve=zS(["vlist"],[Ie]);Ve.style.height=nc(-B);var Ze=zS(["vlist-s"],[new lA("​")]);Me=[zS(["vlist-r"],[Pe,Ze]),zS(["vlist-r"],[Ve])]}else Me=[zS(["vlist-r"],[Pe])];var Je=zS(["vlist-t"],Me);return Me.length===2&&Je.classes.push("vlist-t2"),Je.height=V,Je.depth=-B,Je},evr=(t,e)=>{var r=zS(["mspace"],[],e),n=Vy(t,e);return r.style.marginRight=nc(n),r},Bq=function(e,r,n){var i="";switch(e){case"amsrm":i="AMS";break;case"textrm":i="Main";break;case"textsf":i="SansSerif";break;case"texttt":i="Typewriter";break;default:i=e}var a;return r==="textbf"&&n==="textit"?a="BoldItalic":r==="textbf"?a="Bold":r==="textit"?a="Italic":a="Regular",i+"-"+a},tZe={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},rZe={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},tvr=function(e,r){var[n,i,a]=rZe[e],o=new s4(n),s=new Ok([o],{width:nc(i),height:nc(a),style:"width:"+nc(i),viewBox:"0 0 "+1e3*i+" "+1e3*a,preserveAspectRatio:"xMinYMin"}),d=QXe(["overlay"],[s],r);return d.height=a,d.style.height=nc(a),d.style.width=nc(i),d},Ds={fontMap:tZe,makeSymbol:kC,mathsym:qpr,makeSpan:zS,makeSvgSpan:QXe,makeLineSpan:Xpr,makeAnchor:Zpr,makeFragment:eZe,wrapFragment:Kpr,makeVList:Qpr,makeOrd:$pr,makeGlue:evr,staticSvg:tvr,svgData:rZe,tryCombineChars:Ypr},Uy={number:3,unit:"mu"},FD={number:4,unit:"mu"},ck={number:5,unit:"mu"},rvr={mord:{mop:Uy,mbin:FD,mrel:ck,minner:Uy},mop:{mord:Uy,mop:Uy,mrel:ck,minner:Uy},mbin:{mord:FD,mop:FD,mopen:FD,minner:FD},mrel:{mord:ck,mop:ck,mopen:ck,minner:ck},mopen:{},mclose:{mop:Uy,mbin:FD,mrel:ck,minner:Uy},mpunct:{mord:Uy,mop:Uy,mrel:ck,mopen:Uy,mclose:Uy,mpunct:Uy,minner:Uy},minner:{mord:Uy,mop:Uy,mbin:FD,mrel:ck,mopen:Uy,mpunct:Uy,minner:Uy}},nvr={mord:{mop:Uy},mop:{mord:Uy,mop:Uy},mbin:{},mrel:{},mopen:{},mclose:{mop:Uy},mpunct:{},minner:{mop:Uy}},nZe={},UW={},HW={};function kc(t){for(var{type:e,names:r,props:n,handler:i,htmlBuilder:a,mathmlBuilder:o}=t,s={type:e,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:n.allowedInMath===void 0?!0:n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:i},d=0;d<r.length;++d)nZe[r[d]]=s;e&&(a&&(UW[e]=a),o&&(HW[e]=o))}function l6(t){var{type:e,htmlBuilder:r,mathmlBuilder:n}=t;kc({type:e,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:r,mathmlBuilder:n})}var jW=function(e){return e.type==="ordgroup"&&e.body.length===1?e.body[0]:e},J1=function(e){return e.type==="ordgroup"?e.body:[e]},Nk=Ds.makeSpan,ivr=["leftmost","mbin","mopen","mrel","mop","mpunct"],avr=["rightmost","mrel","mclose","mpunct"],ovr={display:hd.DISPLAY,text:hd.TEXT,script:hd.SCRIPT,scriptscript:hd.SCRIPTSCRIPT},svr={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},vx=function(e,r,n,i){i===void 0&&(i=[null,null]);for(var a=[],o=0;o<e.length;o++){var s=Xv(e[o],r);if(s instanceof MU){var d=s.children;a.push(...d)}else a.push(s)}if(Ds.tryCombineChars(a),!n)return a;var b=r;if(e.length===1){var L=e[0];L.type==="sizing"?b=r.havingSize(L.size):L.type==="styling"&&(b=r.havingStyle(ovr[L.style]))}var B=Nk([i[0]||"leftmost"],[],r),V=Nk([i[1]||"rightmost"],[],r),X=n==="root";return vLe(a,(ie,de)=>{var ae=de.classes[0],U=ie.classes[0];ae==="mbin"&&Kf.contains(avr,U)?de.classes[0]="mord":U==="mbin"&&Kf.contains(ivr,ae)&&(ie.classes[0]="mord")},{node:B},V,X),vLe(a,(ie,de)=>{var ae=bve(de),U=bve(ie),ve=ae&&U?ie.hasClass("mtight")?nvr[ae][U]:rvr[ae][U]:null;if(ve)return Ds.makeGlue(ve,b)},{node:B},V,X),a},vLe=function t(e,r,n,i,a){i&&e.push(i);for(var o=0;o<e.length;o++){var s=e[o],d=iZe(s);if(d){t(d.children,r,n,null,a);continue}var b=!s.hasClass("mspace");if(b){var L=r(s,n.node);L&&(n.insertAfter?n.insertAfter(L):(e.unshift(L),o++))}b?n.node=s:a&&s.hasClass("newline")&&(n.node=Nk(["leftmost"])),n.insertAfter=(B=>V=>{e.splice(B+1,0,V),o++})(o)}i&&e.pop()},iZe=function(e){return e instanceof MU||e instanceof G1e||e instanceof RU&&e.hasClass("enclosing")?e:null},lvr=function t(e,r){var n=iZe(e);if(n){var i=n.children;if(i.length){if(r==="right")return t(i[i.length-1],"right");if(r==="left")return t(i[0],"left")}}return e},bve=function(e,r){return e?(r&&(e=lvr(e,r)),svr[e.classes[0]]||null):null},mB=function(e,r){var n=["nulldelimiter"].concat(e.baseSizingClasses());return Nk(r.concat(n))},Xv=function(e,r,n){if(!e)return Nk();if(UW[e.type]){var i=UW[e.type](e,r);if(n&&r.size!==n.size){i=Nk(r.sizingClasses(n),[i],r);var a=r.sizeMultiplier/n.sizeMultiplier;i.height*=a,i.depth*=a}return i}else throw new Eu("Got group of unknown type: '"+e.type+"'")};function Uq(t,e){var r=Nk(["base"],t,e),n=Nk(["strut"]);return n.style.height=nc(r.height+r.depth),r.depth&&(n.style.verticalAlign=nc(-r.depth)),r.children.unshift(n),r}function xve(t,e){var r=null;t.length===1&&t[0].type==="tag"&&(r=t[0].tag,t=t[0].body);var n=vx(t,e,"root"),i;n.length===2&&n[1].hasClass("tag")&&(i=n.pop());for(var a=[],o=[],s=0;s<n.length;s++)if(o.push(n[s]),n[s].hasClass("mbin")||n[s].hasClass("mrel")||n[s].hasClass("allowbreak")){for(var d=!1;s<n.length-1&&n[s+1].hasClass("mspace")&&!n[s+1].hasClass("newline");)s++,o.push(n[s]),n[s].hasClass("nobreak")&&(d=!0);d||(a.push(Uq(o,e)),o=[])}else n[s].hasClass("newline")&&(o.pop(),o.length>0&&(a.push(Uq(o,e)),o=[]),a.push(n[s]));o.length>0&&a.push(Uq(o,e));var b;r?(b=Uq(vx(r,e,!0)),b.classes=["tag"],a.push(b)):i&&a.push(i);var L=Nk(["katex-html"],a);if(L.setAttribute("aria-hidden","true"),b){var B=b.children[0];B.style.height=nc(L.height+L.depth),L.depth&&(B.style.verticalAlign=nc(-L.depth))}return L}function aZe(t){return new MU(t)}class eE{constructor(e,r,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=r||[],this.classes=n||[]}setAttribute(e,r){this.attributes[e]=r}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&e.setAttribute(r,this.attributes[r]);this.classes.length>0&&(e.className=o4(this.classes));for(var n=0;n<this.children.length;n++)if(this.children[n]instanceof M5&&this.children[n+1]instanceof M5){for(var i=this.children[n].toText()+this.children[++n].toText();this.children[n+1]instanceof M5;)i+=this.children[++n].toText();e.appendChild(new M5(i).toNode())}else e.appendChild(this.children[n].toNode());return e}toMarkup(){var e="<"+this.type;for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&(e+=" "+r+'="',e+=Kf.escape(this.attributes[r]),e+='"');this.classes.length>0&&(e+=' class ="'+Kf.escape(o4(this.classes))+'"'),e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</"+this.type+">",e}toText(){return this.children.map(e=>e.toText()).join("")}}class M5{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return Kf.escape(this.toText())}toText(){return this.text}}class uvr{constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character=" ":e>=.1666&&e<=.1667?this.character=" ":e>=.2222&&e<=.2223?this.character=" ":e>=.2777&&e<=.2778?this.character="  ":e>=-.05556&&e<=-.05555?this.character=" ⁣":e>=-.1667&&e<=-.1666?this.character=" ⁣":e>=-.2223&&e<=-.2222?this.character=" ⁣":e>=-.2778&&e<=-.2777?this.character=" ⁣":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",nc(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+nc(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var gu={MathNode:eE,TextNode:M5,SpaceNode:uvr,newDocumentFragment:aZe},uA=function(e,r,n){return h0[r][e]&&h0[r][e].replace&&e.charCodeAt(0)!==55349&&!(JXe.hasOwnProperty(e)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(e=h0[r][e].replace),new gu.TextNode(e)},W1e=function(e){return e.length===1?e[0]:new gu.MathNode("mrow",e)},Y1e=function(e,r){if(r.fontFamily==="texttt")return"monospace";if(r.fontFamily==="textsf")return r.fontShape==="textit"&&r.fontWeight==="textbf"?"sans-serif-bold-italic":r.fontShape==="textit"?"sans-serif-italic":r.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(r.fontShape==="textit"&&r.fontWeight==="textbf")return"bold-italic";if(r.fontShape==="textit")return"italic";if(r.fontWeight==="textbf")return"bold";var n=r.font;if(!n||n==="mathnormal")return null;var i=e.mode;if(n==="mathit")return"italic";if(n==="boldsymbol")return e.type==="textord"?"bold":"bold-italic";if(n==="mathbf")return"bold";if(n==="mathbb")return"double-struck";if(n==="mathsfit")return"sans-serif-italic";if(n==="mathfrak")return"fraktur";if(n==="mathscr"||n==="mathcal")return"script";if(n==="mathsf")return"sans-serif";if(n==="mathtt")return"monospace";var a=e.text;if(Kf.contains(["\\imath","\\jmath"],a))return null;h0[i][a]&&h0[i][a].replace&&(a=h0[i][a].replace);var o=Ds.fontMap[n].fontName;return q1e(a,o,i)?Ds.fontMap[n].variant:null};function Zoe(t){if(!t)return!1;if(t.type==="mi"&&t.children.length===1){var e=t.children[0];return e instanceof M5&&e.text==="."}else if(t.type==="mo"&&t.children.length===1&&t.getAttribute("separator")==="true"&&t.getAttribute("lspace")==="0em"&&t.getAttribute("rspace")==="0em"){var r=t.children[0];return r instanceof M5&&r.text===","}else return!1}var nT=function(e,r,n){if(e.length===1){var i=Qg(e[0],r);return n&&i instanceof eE&&i.type==="mo"&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i]}for(var a=[],o,s=0;s<e.length;s++){var d=Qg(e[s],r);if(d instanceof eE&&o instanceof eE){if(d.type==="mtext"&&o.type==="mtext"&&d.getAttribute("mathvariant")===o.getAttribute("mathvariant")){o.children.push(...d.children);continue}else if(d.type==="mn"&&o.type==="mn"){o.children.push(...d.children);continue}else if(Zoe(d)&&o.type==="mn"){o.children.push(...d.children);continue}else if(d.type==="mn"&&Zoe(o))d.children=[...o.children,...d.children],a.pop();else if((d.type==="msup"||d.type==="msub")&&d.children.length>=1&&(o.type==="mn"||Zoe(o))){var b=d.children[0];b instanceof eE&&b.type==="mn"&&(b.children=[...o.children,...b.children],a.pop())}else if(o.type==="mi"&&o.children.length===1){var L=o.children[0];if(L instanceof M5&&L.text==="̸"&&(d.type==="mo"||d.type==="mi"||d.type==="mn")){var B=d.children[0];B instanceof M5&&B.text.length>0&&(B.text=B.text.slice(0,1)+"̸"+B.text.slice(1),a.pop())}}}a.push(d),o=d}return a},l4=function(e,r,n){return W1e(nT(e,r,n))},Qg=function(e,r){if(!e)return new gu.MathNode("mrow");if(HW[e.type]){var n=HW[e.type](e,r);return n}else throw new Eu("Got group of unknown type: '"+e.type+"'")};function mLe(t,e,r,n,i){var a=nT(t,r),o;a.length===1&&a[0]instanceof eE&&Kf.contains(["mrow","mtable"],a[0].type)?o=a[0]:o=new gu.MathNode("mrow",a);var s=new gu.MathNode("annotation",[new gu.TextNode(e)]);s.setAttribute("encoding","application/x-tex");var d=new gu.MathNode("semantics",[o,s]),b=new gu.MathNode("math",[d]);b.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&b.setAttribute("display","block");var L=i?"katex":"katex-mathml";return Ds.makeSpan([L],[b])}var oZe=function(e){return new vk({style:e.displayMode?hd.DISPLAY:hd.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},sZe=function(e,r){if(r.displayMode){var n=["katex-display"];r.leqno&&n.push("leqno"),r.fleqn&&n.push("fleqn"),e=Ds.makeSpan(n,[e])}return e},cvr=function(e,r,n){var i=oZe(n),a;if(n.output==="mathml")return mLe(e,r,i,n.displayMode,!0);if(n.output==="html"){var o=xve(e,i);a=Ds.makeSpan(["katex"],[o])}else{var s=mLe(e,r,i,n.displayMode,!1),d=xve(e,i);a=Ds.makeSpan(["katex"],[s,d])}return sZe(a,n)},fvr=function(e,r,n){var i=oZe(n),a=xve(e,i),o=Ds.makeSpan(["katex"],[a]);return sZe(o,n)},dvr={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},hvr=function(e){var r=new gu.MathNode("mo",[new gu.TextNode(dvr[e.replace(/^\\/,"")])]);return r.setAttribute("stretchy","true"),r},pvr={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},vvr=function(e){return e.type==="ordgroup"?e.body.length:1},mvr=function(e,r){function n(){var s=4e5,d=e.label.slice(1);if(Kf.contains(["widehat","widecheck","widetilde","utilde"],d)){var b=e,L=vvr(b.base),B,V,X;if(L>5)d==="widehat"||d==="widecheck"?(B=420,s=2364,X=.42,V=d+"4"):(B=312,s=2340,X=.34,V="tilde4");else{var ie=[1,1,2,2,3,3][L];d==="widehat"||d==="widecheck"?(s=[0,1062,2364,2364,2364][ie],B=[0,239,300,360,420][ie],X=[0,.24,.3,.3,.36,.42][ie],V=d+ie):(s=[0,600,1033,2339,2340][ie],B=[0,260,286,306,312][ie],X=[0,.26,.286,.3,.306,.34][ie],V="tilde"+ie)}var de=new s4(V),ae=new Ok([de],{width:"100%",height:nc(X),viewBox:"0 0 "+s+" "+B,preserveAspectRatio:"none"});return{span:Ds.makeSvgSpan([],[ae],r),minWidth:0,height:X}}else{var U=[],ve=pvr[d],[Se,Pe,Me]=ve,Ie=Me/1e3,Ve=Se.length,Ze,Je;if(Ve===1){var nt=ve[3];Ze=["hide-tail"],Je=[nt]}else if(Ve===2)Ze=["halfarrow-left","halfarrow-right"],Je=["xMinYMin","xMaxYMin"];else if(Ve===3)Ze=["brace-left","brace-center","brace-right"],Je=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
                    `+Ve+" children.");for(var ut=0;ut<Ve;ut++){var ht=new s4(Se[ut]),_t=new Ok([ht],{width:"400em",height:nc(Ie),viewBox:"0 0 "+s+" "+Me,preserveAspectRatio:Je[ut]+" slice"}),Dt=Ds.makeSvgSpan([Ze[ut]],[_t],r);if(Ve===1)return{span:Dt,minWidth:Pe,height:Ie};Dt.style.height=nc(Ie),U.push(Dt)}return{span:Ds.makeSpan(["stretchy"],U,r),minWidth:Pe,height:Ie}}}var{span:i,minWidth:a,height:o}=n();return i.height=o,i.style.height=nc(o),a>0&&(i.style.minWidth=nc(a)),i},gvr=function(e,r,n,i,a){var o,s=e.height+e.depth+n+i;if(/fbox|color|angl/.test(r)){if(o=Ds.makeSpan(["stretchy",r],[],a),r==="fbox"){var d=a.color&&a.getColor();d&&(o.style.borderColor=d)}}else{var b=[];/^[bx]cancel$/.test(r)&&b.push(new gve({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(r)&&b.push(new gve({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var L=new Ok(b,{width:"100%",height:nc(s)});o=Ds.makeSvgSpan([],[L],a)}return o.height=s,o.style.height=nc(s),o},Fk={encloseSpan:gvr,mathMLnode:hvr,svgSpan:mvr};function Jh(t,e){if(!t||t.type!==e)throw new Error("Expected node of type "+e+", but got "+(t?"node of type "+t.type:String(t)));return t}function X1e(t){var e=kZ(t);if(!e)throw new Error("Expected node of symbol group type, but got "+(t?"node of type "+t.type:String(t)));return e}function kZ(t){return t&&(t.type==="atom"||jpr.hasOwnProperty(t.type))?t:null}var Z1e=(t,e)=>{var r,n,i;t&&t.type==="supsub"?(n=Jh(t.base,"accent"),r=n.base,t.base=r,i=Upr(Xv(t,e)),t.base=n):(n=Jh(t,"accent"),r=n.base);var a=Xv(r,e.havingCrampedStyle()),o=n.isShifty&&Kf.isCharacterBox(r),s=0;if(o){var d=Kf.getBaseElem(r),b=Xv(d,e.havingCrampedStyle());s=uLe(b).skew}var L=n.label==="\\c",B=L?a.height+a.depth:Math.min(a.height,e.fontMetrics().xHeight),V;if(n.isStretchy)V=Fk.svgSpan(n,e),V=Ds.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:V,wrapperClasses:["svg-align"],wrapperStyle:s>0?{width:"calc(100% - "+nc(2*s)+")",marginLeft:nc(2*s)}:void 0}]},e);else{var X,ie;n.label==="\\vec"?(X=Ds.staticSvg("vec",e),ie=Ds.svgData.vec[1]):(X=Ds.makeOrd({mode:n.mode,text:n.label},e,"textord"),X=uLe(X),X.italic=0,ie=X.width,L&&(B+=X.depth)),V=Ds.makeSpan(["accent-body"],[X]);var de=n.label==="\\textcircled";de&&(V.classes.push("accent-full"),B=a.height);var ae=s;de||(ae-=ie/2),V.style.left=nc(ae),n.label==="\\textcircled"&&(V.style.top=".2em"),V=Ds.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-B},{type:"elem",elem:V}]},e)}var U=Ds.makeSpan(["mord","accent"],[V],e);return i?(i.children[0]=U,i.height=Math.max(U.height,i.height),i.classes[0]="mord",i):U},lZe=(t,e)=>{var r=t.isStretchy?Fk.mathMLnode(t.label):new gu.MathNode("mo",[uA(t.label,t.mode)]),n=new gu.MathNode("mover",[Qg(t.base,e),r]);return n.setAttribute("accent","true"),n},yvr=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(t=>"\\"+t).join("|"));kc({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(t,e)=>{var r=jW(e[0]),n=!yvr.test(t.funcName),i=!n||t.funcName==="\\widehat"||t.funcName==="\\widetilde"||t.funcName==="\\widecheck";return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:n,isShifty:i,base:r}},htmlBuilder:Z1e,mathmlBuilder:lZe});kc({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(t,e)=>{var r=e[0],n=t.parser.mode;return n==="math"&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:t.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:Z1e,mathmlBuilder:lZe});kc({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"accentUnder",mode:r.mode,label:n,base:i}},htmlBuilder:(t,e)=>{var r=Xv(t.base,e),n=Fk.svgSpan(t,e),i=t.label==="\\utilde"?.12:0,a=Ds.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:r}]},e);return Ds.makeSpan(["mord","accentunder"],[a],e)},mathmlBuilder:(t,e)=>{var r=Fk.mathMLnode(t.label),n=new gu.MathNode("munder",[Qg(t.base,e),r]);return n.setAttribute("accentunder","true"),n}});var Hq=t=>{var e=new gu.MathNode("mpadded",t?[t]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};kc({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){var{parser:n,funcName:i}=t;return{type:"xArrow",mode:n.mode,label:i,body:e[0],below:r[0]}},htmlBuilder(t,e){var r=e.style,n=e.havingStyle(r.sup()),i=Ds.wrapFragment(Xv(t.body,n,e),e),a=t.label.slice(0,2)==="\\x"?"x":"cd";i.classes.push(a+"-arrow-pad");var o;t.below&&(n=e.havingStyle(r.sub()),o=Ds.wrapFragment(Xv(t.below,n,e),e),o.classes.push(a+"-arrow-pad"));var s=Fk.svgSpan(t,e),d=-e.fontMetrics().axisHeight+.5*s.height,b=-e.fontMetrics().axisHeight-.5*s.height-.111;(i.depth>.25||t.label==="\\xleftequilibrium")&&(b-=i.depth);var L;if(o){var B=-e.fontMetrics().axisHeight+o.height+.5*s.height+.111;L=Ds.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:b},{type:"elem",elem:s,shift:d},{type:"elem",elem:o,shift:B}]},e)}else L=Ds.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:b},{type:"elem",elem:s,shift:d}]},e);return L.children[0].children[0].children[1].classes.push("svg-align"),Ds.makeSpan(["mrel","x-arrow"],[L],e)},mathmlBuilder(t,e){var r=Fk.mathMLnode(t.label);r.setAttribute("minsize",t.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(t.body){var i=Hq(Qg(t.body,e));if(t.below){var a=Hq(Qg(t.below,e));n=new gu.MathNode("munderover",[r,a,i])}else n=new gu.MathNode("mover",[r,i])}else if(t.below){var o=Hq(Qg(t.below,e));n=new gu.MathNode("munder",[r,o])}else n=Hq(),n=new gu.MathNode("mover",[r,n]);return n}});var bvr=Ds.makeSpan;function uZe(t,e){var r=vx(t.body,e,!0);return bvr([t.mclass],r,e)}function cZe(t,e){var r,n=nT(t.body,e);return t.mclass==="minner"?r=new gu.MathNode("mpadded",n):t.mclass==="mord"?t.isCharacterBox?(r=n[0],r.type="mi"):r=new gu.MathNode("mi",n):(t.isCharacterBox?(r=n[0],r.type="mo"):r=new gu.MathNode("mo",n),t.mclass==="mbin"?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):t.mclass==="mpunct"?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):t.mclass==="mopen"||t.mclass==="mclose"?(r.attributes.lspace="0em",r.attributes.rspace="0em"):t.mclass==="minner"&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}kc({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"mclass",mode:r.mode,mclass:"m"+n.slice(5),body:J1(i),isCharacterBox:Kf.isCharacterBox(i)}},htmlBuilder:uZe,mathmlBuilder:cZe});var IZ=t=>{var e=t.type==="ordgroup"&&t.body.length?t.body[0]:t;return e.type==="atom"&&(e.family==="bin"||e.family==="rel")?"m"+e.family:"mord"};kc({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(t,e){var{parser:r}=t;return{type:"mclass",mode:r.mode,mclass:IZ(e[0]),body:J1(e[1]),isCharacterBox:Kf.isCharacterBox(e[1])}}});kc({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(t,e){var{parser:r,funcName:n}=t,i=e[1],a=e[0],o;n!=="\\stackrel"?o=IZ(i):o="mrel";var s={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:J1(i)},d={type:"supsub",mode:a.mode,base:s,sup:n==="\\underset"?null:a,sub:n==="\\underset"?a:null};return{type:"mclass",mode:r.mode,mclass:o,body:[d],isCharacterBox:Kf.isCharacterBox(d)}},htmlBuilder:uZe,mathmlBuilder:cZe});kc({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"pmb",mode:r.mode,mclass:IZ(e[0]),body:J1(e[0])}},htmlBuilder(t,e){var r=vx(t.body,e,!0),n=Ds.makeSpan([t.mclass],r,e);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(t,e){var r=nT(t.body,e),n=new gu.MathNode("mstyle",r);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var xvr={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},gLe=()=>({type:"styling",body:[],mode:"math",style:"display"}),yLe=t=>t.type==="textord"&&t.text==="@",_vr=(t,e)=>(t.type==="mathord"||t.type==="atom")&&t.text===e;function wvr(t,e,r){var n=xvr[t];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":{var i=r.callFunction("\\\\cdleft",[e[0]],[]),a={type:"atom",text:n,mode:"math",family:"rel"},o=r.callFunction("\\Big",[a],[]),s=r.callFunction("\\\\cdright",[e[1]],[]),d={type:"ordgroup",mode:"math",body:[i,o,s]};return r.callFunction("\\\\cdparent",[d],[])}case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var b={type:"textord",text:"\\Vert",mode:"math"};return r.callFunction("\\Big",[b],[])}default:return{type:"textord",text:" ",mode:"math"}}}function Svr(t){var e=[];for(t.gullet.beginGroup(),t.gullet.macros.set("\\cr","\\\\\\relax"),t.gullet.beginGroup();;){e.push(t.parseExpression(!1,"\\\\")),t.gullet.endGroup(),t.gullet.beginGroup();var r=t.fetch().text;if(r==="&"||r==="\\\\")t.consume();else if(r==="\\end"){e[e.length-1].length===0&&e.pop();break}else throw new Eu("Expected \\\\ or \\cr or \\end",t.nextToken)}for(var n=[],i=[n],a=0;a<e.length;a++){for(var o=e[a],s=gLe(),d=0;d<o.length;d++)if(!yLe(o[d]))s.body.push(o[d]);else{n.push(s),d+=1;var b=X1e(o[d]).text,L=new Array(2);if(L[0]={type:"ordgroup",mode:"math",body:[]},L[1]={type:"ordgroup",mode:"math",body:[]},!("=|.".indexOf(b)>-1))if("<>AV".indexOf(b)>-1)for(var B=0;B<2;B++){for(var V=!0,X=d+1;X<o.length;X++){if(_vr(o[X],b)){V=!1,d=X;break}if(yLe(o[X]))throw new Eu("Missing a "+b+" character to complete a CD arrow.",o[X]);L[B].body.push(o[X])}if(V)throw new Eu("Missing a "+b+" character to complete a CD arrow.",o[d])}else throw new Eu('Expected one of "<>AV=|." after @',o[d]);var ie=wvr(b,L,t),de={type:"styling",body:[ie],mode:"math",style:"display"};n.push(de),s=gLe()}a%2===0?n.push(s):n.shift(),n=[],i.push(n)}t.gullet.endGroup(),t.gullet.endGroup();var ae=new Array(i[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:ae,colSeparationType:"CD",hLinesBeforeRow:new Array(i.length+1).fill([])}}kc({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:e[0]}},htmlBuilder(t,e){var r=e.havingStyle(e.style.sup()),n=Ds.wrapFragment(Xv(t.label,r,e),e);return n.classes.push("cd-label-"+t.side),n.style.bottom=nc(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(t,e){var r=new gu.MathNode("mrow",[Qg(t.label,e)]);return r=new gu.MathNode("mpadded",[r]),r.setAttribute("width","0"),t.side==="left"&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),r=new gu.MathNode("mstyle",[r]),r.setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}});kc({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(t,e){var{parser:r}=t;return{type:"cdlabelparent",mode:r.mode,fragment:e[0]}},htmlBuilder(t,e){var r=Ds.wrapFragment(Xv(t.fragment,e),e);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder(t,e){return new gu.MathNode("mrow",[Qg(t.fragment,e)])}});kc({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(t,e){for(var{parser:r}=t,n=Jh(e[0],"ordgroup"),i=n.body,a="",o=0;o<i.length;o++){var s=Jh(i[o],"textord");a+=s.text}var d=parseInt(a),b;if(isNaN(d))throw new Eu("\\@char has non-numeric argument "+a);if(d<0||d>=1114111)throw new Eu("\\@char with invalid code point "+a);return d<=65535?b=String.fromCharCode(d):(d-=65536,b=String.fromCharCode((d>>10)+55296,(d&1023)+56320)),{type:"textord",mode:r.mode,text:b}}});var fZe=(t,e)=>{var r=vx(t.body,e.withColor(t.color),!1);return Ds.makeFragment(r)},dZe=(t,e)=>{var r=nT(t.body,e.withColor(t.color)),n=new gu.MathNode("mstyle",r);return n.setAttribute("mathcolor",t.color),n};kc({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(t,e){var{parser:r}=t,n=Jh(e[0],"color-token").color,i=e[1];return{type:"color",mode:r.mode,color:n,body:J1(i)}},htmlBuilder:fZe,mathmlBuilder:dZe});kc({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(t,e){var{parser:r,breakOnTokenText:n}=t,i=Jh(e[0],"color-token").color;r.gullet.macros.set("\\current@color",i);var a=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:i,body:a}},htmlBuilder:fZe,mathmlBuilder:dZe});kc({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(t,e,r){var{parser:n}=t,i=n.gullet.future().text==="["?n.parseSizeGroup(!0):null,a=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:a,size:i&&Jh(i,"size").value}},htmlBuilder(t,e){var r=Ds.makeSpan(["mspace"],[],e);return t.newLine&&(r.classes.push("newline"),t.size&&(r.style.marginTop=nc(Vy(t.size,e)))),r},mathmlBuilder(t,e){var r=new gu.MathNode("mspace");return t.newLine&&(r.setAttribute("linebreak","newline"),t.size&&r.setAttribute("height",nc(Vy(t.size,e)))),r}});var _ve={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},hZe=t=>{var e=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new Eu("Expected a control sequence",t);return e},Tvr=t=>{var e=t.gullet.popToken();return e.text==="="&&(e=t.gullet.popToken(),e.text===" "&&(e=t.gullet.popToken())),e},pZe=(t,e,r,n)=>{var i=t.gullet.macros.get(r.text);i==null&&(r.noexpand=!0,i={tokens:[r],numArgs:0,unexpandable:!t.gullet.isExpandable(r.text)}),t.gullet.macros.set(e,i,n)};kc({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:e,funcName:r}=t;e.consumeSpaces();var n=e.fetch();if(_ve[n.text])return(r==="\\global"||r==="\\\\globallong")&&(n.text=_ve[n.text]),Jh(e.parseFunction(),"internal");throw new Eu("Invalid token after macro prefix",n)}});kc({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=e.gullet.popToken(),i=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new Eu("Expected a control sequence",n);for(var a=0,o,s=[[]];e.gullet.future().text!=="{";)if(n=e.gullet.popToken(),n.text==="#"){if(e.gullet.future().text==="{"){o=e.gullet.future(),s[a].push("{");break}if(n=e.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new Eu('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==a+1)throw new Eu('Argument number "'+n.text+'" out of order');a++,s.push([])}else{if(n.text==="EOF")throw new Eu("Expected a macro definition");s[a].push(n.text)}var{tokens:d}=e.gullet.consumeArg();return o&&d.unshift(o),(r==="\\edef"||r==="\\xdef")&&(d=e.gullet.expandTokens(d),d.reverse()),e.gullet.macros.set(i,{tokens:d,numArgs:a,delimiters:s},r===_ve[r]),{type:"internal",mode:e.mode}}});kc({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=hZe(e.gullet.popToken());e.gullet.consumeSpaces();var i=Tvr(e);return pZe(e,n,i,r==="\\\\globallet"),{type:"internal",mode:e.mode}}});kc({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=hZe(e.gullet.popToken()),i=e.gullet.popToken(),a=e.gullet.popToken();return pZe(e,n,a,r==="\\\\globalfuture"),e.gullet.pushToken(a),e.gullet.pushToken(i),{type:"internal",mode:e.mode}}});var Hz=function(e,r,n){var i=h0.math[e]&&h0.math[e].replace,a=q1e(i||e,r,n);if(!a)throw new Error("Unsupported symbol "+e+" and font size "+r+".");return a},K1e=function(e,r,n,i){var a=n.havingBaseStyle(r),o=Ds.makeSpan(i.concat(a.sizingClasses(n)),[e],n),s=a.sizeMultiplier/n.sizeMultiplier;return o.height*=s,o.depth*=s,o.maxFontSize=a.sizeMultiplier,o},vZe=function(e,r,n){var i=r.havingBaseStyle(n),a=(1-r.sizeMultiplier/i.sizeMultiplier)*r.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=nc(a),e.height-=a,e.depth+=a},Evr=function(e,r,n,i,a,o){var s=Ds.makeSymbol(e,"Main-Regular",a,i),d=K1e(s,r,i,o);return n&&vZe(d,i,r),d},Avr=function(e,r,n,i){return Ds.makeSymbol(e,"Size"+r+"-Regular",n,i)},mZe=function(e,r,n,i,a,o){var s=Avr(e,r,a,i),d=K1e(Ds.makeSpan(["delimsizing","size"+r],[s],i),hd.TEXT,i,o);return n&&vZe(d,i,hd.TEXT),d},Koe=function(e,r,n){var i;r==="Size1-Regular"?i="delim-size1":i="delim-size4";var a=Ds.makeSpan(["delimsizinginner",i],[Ds.makeSpan([],[Ds.makeSymbol(e,r,n)])]);return{type:"elem",elem:a}},Joe=function(e,r,n){var i=C5["Size4-Regular"][e.charCodeAt(0)]?C5["Size4-Regular"][e.charCodeAt(0)][4]:C5["Size1-Regular"][e.charCodeAt(0)][4],a=new s4("inner",Ipr(e,Math.round(1e3*r))),o=new Ok([a],{width:nc(i),height:nc(r),style:"width:"+nc(i),viewBox:"0 0 "+1e3*i+" "+Math.round(1e3*r),preserveAspectRatio:"xMinYMin"}),s=Ds.makeSvgSpan([],[o],n);return s.height=r,s.style.height=nc(r),s.style.width=nc(i),{type:"elem",elem:s}},wve=.008,jq={type:"kern",size:-1*wve},Cvr=["|","\\lvert","\\rvert","\\vert"],Mvr=["\\|","\\lVert","\\rVert","\\Vert"],gZe=function(e,r,n,i,a,o){var s,d,b,L,B="",V=0;s=b=L=e,d=null;var X="Size1-Regular";e==="\\uparrow"?b=L="⏐":e==="\\Uparrow"?b=L="‖":e==="\\downarrow"?s=b="⏐":e==="\\Downarrow"?s=b="‖":e==="\\updownarrow"?(s="\\uparrow",b="⏐",L="\\downarrow"):e==="\\Updownarrow"?(s="\\Uparrow",b="‖",L="\\Downarrow"):Kf.contains(Cvr,e)?(b="∣",B="vert",V=333):Kf.contains(Mvr,e)?(b="∥",B="doublevert",V=556):e==="["||e==="\\lbrack"?(s="⎡",b="⎢",L="⎣",X="Size4-Regular",B="lbrack",V=667):e==="]"||e==="\\rbrack"?(s="⎤",b="⎥",L="⎦",X="Size4-Regular",B="rbrack",V=667):e==="\\lfloor"||e==="⌊"?(b=s="⎢",L="⎣",X="Size4-Regular",B="lfloor",V=667):e==="\\lceil"||e==="⌈"?(s="⎡",b=L="⎢",X="Size4-Regular",B="lceil",V=667):e==="\\rfloor"||e==="⌋"?(b=s="⎥",L="⎦",X="Size4-Regular",B="rfloor",V=667):e==="\\rceil"||e==="⌉"?(s="⎤",b=L="⎥",X="Size4-Regular",B="rceil",V=667):e==="("||e==="\\lparen"?(s="⎛",b="⎜",L="⎝",X="Size4-Regular",B="lparen",V=875):e===")"||e==="\\rparen"?(s="⎞",b="⎟",L="⎠",X="Size4-Regular",B="rparen",V=875):e==="\\{"||e==="\\lbrace"?(s="⎧",d="⎨",L="⎩",b="⎪",X="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(s="⎫",d="⎬",L="⎭",b="⎪",X="Size4-Regular"):e==="\\lgroup"||e==="⟮"?(s="⎧",L="⎩",b="⎪",X="Size4-Regular"):e==="\\rgroup"||e==="⟯"?(s="⎫",L="⎭",b="⎪",X="Size4-Regular"):e==="\\lmoustache"||e==="⎰"?(s="⎧",L="⎭",b="⎪",X="Size4-Regular"):(e==="\\rmoustache"||e==="⎱")&&(s="⎫",L="⎩",b="⎪",X="Size4-Regular");var ie=Hz(s,X,a),de=ie.height+ie.depth,ae=Hz(b,X,a),U=ae.height+ae.depth,ve=Hz(L,X,a),Se=ve.height+ve.depth,Pe=0,Me=1;if(d!==null){var Ie=Hz(d,X,a);Pe=Ie.height+Ie.depth,Me=2}var Ve=de+Se+Pe,Ze=Math.max(0,Math.ceil((r-Ve)/(Me*U))),Je=Ve+Ze*Me*U,nt=i.fontMetrics().axisHeight;n&&(nt*=i.sizeMultiplier);var ut=Je/2-nt,ht=[];if(B.length>0){var _t=Je-de-Se,Dt=Math.round(Je*1e3),qt=Ppr(B,Math.round(_t*1e3)),Lt=new s4(B,qt),dr=(V/1e3).toFixed(3)+"em",Zt=(Dt/1e3).toFixed(3)+"em",Cr=new Ok([Lt],{width:dr,height:Zt,viewBox:"0 0 "+V+" "+Dt}),yt=Ds.makeSvgSpan([],[Cr],i);yt.height=Dt/1e3,yt.style.width=dr,yt.style.height=Zt,ht.push({type:"elem",elem:yt})}else{if(ht.push(Koe(L,X,a)),ht.push(jq),d===null){var Vt=Je-de-Se+2*wve;ht.push(Joe(b,Vt,i))}else{var Er=(Je-de-Se-Pe)/2+2*wve;ht.push(Joe(b,Er,i)),ht.push(jq),ht.push(Koe(d,X,a)),ht.push(jq),ht.push(Joe(b,Er,i))}ht.push(jq),ht.push(Koe(s,X,a))}var sr=i.havingBaseStyle(hd.TEXT),or=Ds.makeVList({positionType:"bottom",positionData:ut,children:ht},sr);return K1e(Ds.makeSpan(["delimsizing","mult"],[or],sr),hd.TEXT,i,o)},Qoe=80,ese=.08,tse=function(e,r,n,i,a){var o=kpr(e,i,n),s=new s4(e,o),d=new Ok([s],{width:"400em",height:nc(r),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return Ds.makeSvgSpan(["hide-tail"],[d],a)},Rvr=function(e,r){var n=r.havingBaseSizing(),i=_Ze("\\surd",e*n.sizeMultiplier,xZe,n),a=n.sizeMultiplier,o=Math.max(0,r.minRuleThickness-r.fontMetrics().sqrtRuleThickness),s,d=0,b=0,L=0,B;return i.type==="small"?(L=1e3+1e3*o+Qoe,e<1?a=1:e<1.4&&(a=.7),d=(1+o+ese)/a,b=(1+o)/a,s=tse("sqrtMain",d,L,o,r),s.style.minWidth="0.853em",B=.833/a):i.type==="large"?(L=(1e3+Qoe)*b9[i.size],b=(b9[i.size]+o)/a,d=(b9[i.size]+o+ese)/a,s=tse("sqrtSize"+i.size,d,L,o,r),s.style.minWidth="1.02em",B=1/a):(d=e+o+ese,b=e+o,L=Math.floor(1e3*e+o)+Qoe,s=tse("sqrtTall",d,L,o,r),s.style.minWidth="0.742em",B=1.056),s.height=b,s.style.height=nc(d),{span:s,advanceWidth:B,ruleWidth:(r.fontMetrics().sqrtRuleThickness+o)*a}},yZe=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],kvr=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],bZe=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],b9=[0,1.2,1.8,2.4,3],Ivr=function(e,r,n,i,a){if(e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle"),Kf.contains(yZe,e)||Kf.contains(bZe,e))return mZe(e,r,!1,n,i,a);if(Kf.contains(kvr,e))return gZe(e,b9[r],!1,n,i,a);throw new Eu("Illegal delimiter: '"+e+"'")},Pvr=[{type:"small",style:hd.SCRIPTSCRIPT},{type:"small",style:hd.SCRIPT},{type:"small",style:hd.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Dvr=[{type:"small",style:hd.SCRIPTSCRIPT},{type:"small",style:hd.SCRIPT},{type:"small",style:hd.TEXT},{type:"stack"}],xZe=[{type:"small",style:hd.SCRIPTSCRIPT},{type:"small",style:hd.SCRIPT},{type:"small",style:hd.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Lvr=function(e){if(e.type==="small")return"Main-Regular";if(e.type==="large")return"Size"+e.size+"-Regular";if(e.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},_Ze=function(e,r,n,i){for(var a=Math.min(2,3-i.style.size),o=a;o<n.length&&n[o].type!=="stack";o++){var s=Hz(e,Lvr(n[o]),"math"),d=s.height+s.depth;if(n[o].type==="small"){var b=i.havingBaseStyle(n[o].style);d*=b.sizeMultiplier}if(d>r)return n[o]}return n[n.length-1]},wZe=function(e,r,n,i,a,o){e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle");var s;Kf.contains(bZe,e)?s=Pvr:Kf.contains(yZe,e)?s=xZe:s=Dvr;var d=_Ze(e,r,s,i);return d.type==="small"?Evr(e,d.style,n,i,a,o):d.type==="large"?mZe(e,d.size,n,i,a,o):gZe(e,r,n,i,a,o)},Ovr=function(e,r,n,i,a,o){var s=i.fontMetrics().axisHeight*i.sizeMultiplier,d=901,b=5/i.fontMetrics().ptPerEm,L=Math.max(r-s,n+s),B=Math.max(L/500*d,2*L-b);return wZe(e,B,!0,i,a,o)},Rk={sqrtImage:Rvr,sizedDelim:Ivr,sizeToMaxHeight:b9,customSizedDelim:wZe,leftRightDelim:Ovr},bLe={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Nvr=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function PZ(t,e){var r=kZ(t);if(r&&Kf.contains(Nvr,r.text))return r;throw r?new Eu("Invalid delimiter '"+r.text+"' after '"+e.funcName+"'",t):new Eu("Invalid delimiter type '"+t.type+"'",t)}kc({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(t,e)=>{var r=PZ(e[0],t);return{type:"delimsizing",mode:t.parser.mode,size:bLe[t.funcName].size,mclass:bLe[t.funcName].mclass,delim:r.text}},htmlBuilder:(t,e)=>t.delim==="."?Ds.makeSpan([t.mclass]):Rk.sizedDelim(t.delim,t.size,e,t.mode,[t.mclass]),mathmlBuilder:t=>{var e=[];t.delim!=="."&&e.push(uA(t.delim,t.mode));var r=new gu.MathNode("mo",e);t.mclass==="mopen"||t.mclass==="mclose"?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var n=nc(Rk.sizeToMaxHeight[t.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r}});function xLe(t){if(!t.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}kc({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=t.parser.gullet.macros.get("\\current@color");if(r&&typeof r!="string")throw new Eu("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:t.parser.mode,delim:PZ(e[0],t).text,color:r}}});kc({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=PZ(e[0],t),n=t.parser;++n.leftrightDepth;var i=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var a=Jh(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:i,left:r.text,right:a.delim,rightColor:a.color}},htmlBuilder:(t,e)=>{xLe(t);for(var r=vx(t.body,e,!0,["mopen","mclose"]),n=0,i=0,a=!1,o=0;o<r.length;o++)r[o].isMiddle?a=!0:(n=Math.max(r[o].height,n),i=Math.max(r[o].depth,i));n*=e.sizeMultiplier,i*=e.sizeMultiplier;var s;if(t.left==="."?s=mB(e,["mopen"]):s=Rk.leftRightDelim(t.left,n,i,e,t.mode,["mopen"]),r.unshift(s),a)for(var d=1;d<r.length;d++){var b=r[d],L=b.isMiddle;L&&(r[d]=Rk.leftRightDelim(L.delim,n,i,L.options,t.mode,[]))}var B;if(t.right===".")B=mB(e,["mclose"]);else{var V=t.rightColor?e.withColor(t.rightColor):e;B=Rk.leftRightDelim(t.right,n,i,V,t.mode,["mclose"])}return r.push(B),Ds.makeSpan(["minner"],r,e)},mathmlBuilder:(t,e)=>{xLe(t);var r=nT(t.body,e);if(t.left!=="."){var n=new gu.MathNode("mo",[uA(t.left,t.mode)]);n.setAttribute("fence","true"),r.unshift(n)}if(t.right!=="."){var i=new gu.MathNode("mo",[uA(t.right,t.mode)]);i.setAttribute("fence","true"),t.rightColor&&i.setAttribute("mathcolor",t.rightColor),r.push(i)}return W1e(r)}});kc({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=PZ(e[0],t);if(!t.parser.leftrightDepth)throw new Eu("\\middle without preceding \\left",r);return{type:"middle",mode:t.parser.mode,delim:r.text}},htmlBuilder:(t,e)=>{var r;if(t.delim===".")r=mB(e,[]);else{r=Rk.sizedDelim(t.delim,1,e,t.mode,[]);var n={delim:t.delim,options:e};r.isMiddle=n}return r},mathmlBuilder:(t,e)=>{var r=t.delim==="\\vert"||t.delim==="|"?uA("|","text"):uA(t.delim,t.mode),n=new gu.MathNode("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var J1e=(t,e)=>{var r=Ds.wrapFragment(Xv(t.body,e),e),n=t.label.slice(1),i=e.sizeMultiplier,a,o=0,s=Kf.isCharacterBox(t.body);if(n==="sout")a=Ds.makeSpan(["stretchy","sout"]),a.height=e.fontMetrics().defaultRuleThickness/i,o=-.5*e.fontMetrics().xHeight;else if(n==="phase"){var d=Vy({number:.6,unit:"pt"},e),b=Vy({number:.35,unit:"ex"},e),L=e.havingBaseSizing();i=i/L.sizeMultiplier;var B=r.height+r.depth+d+b;r.style.paddingLeft=nc(B/2+d);var V=Math.floor(1e3*B*i),X=Mpr(V),ie=new Ok([new s4("phase",X)],{width:"400em",height:nc(V/1e3),viewBox:"0 0 400000 "+V,preserveAspectRatio:"xMinYMin slice"});a=Ds.makeSvgSpan(["hide-tail"],[ie],e),a.style.height=nc(B),o=r.depth+d+b}else{/cancel/.test(n)?s||r.classes.push("cancel-pad"):n==="angl"?r.classes.push("anglpad"):r.classes.push("boxpad");var de=0,ae=0,U=0;/box/.test(n)?(U=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),de=e.fontMetrics().fboxsep+(n==="colorbox"?0:U),ae=de):n==="angl"?(U=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),de=4*U,ae=Math.max(0,.25-r.depth)):(de=s?.2:0,ae=de),a=Fk.encloseSpan(r,n,de,ae,e),/fbox|boxed|fcolorbox/.test(n)?(a.style.borderStyle="solid",a.style.borderWidth=nc(U)):n==="angl"&&U!==.049&&(a.style.borderTopWidth=nc(U),a.style.borderRightWidth=nc(U)),o=r.depth+ae,t.backgroundColor&&(a.style.backgroundColor=t.backgroundColor,t.borderColor&&(a.style.borderColor=t.borderColor))}var ve;if(t.backgroundColor)ve=Ds.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:o},{type:"elem",elem:r,shift:0}]},e);else{var Se=/cancel|phase/.test(n)?["svg-align"]:[];ve=Ds.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:0},{type:"elem",elem:a,shift:o,wrapperClasses:Se}]},e)}return/cancel/.test(n)&&(ve.height=r.height,ve.depth=r.depth),/cancel/.test(n)&&!s?Ds.makeSpan(["mord","cancel-lap"],[ve],e):Ds.makeSpan(["mord"],[ve],e)},Q1e=(t,e)=>{var r=0,n=new gu.MathNode(t.label.indexOf("colorbox")>-1?"mpadded":"menclose",[Qg(t.body,e)]);switch(t.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),t.label==="\\fcolorbox"){var i=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);n.setAttribute("style","border: "+i+"em solid "+String(t.borderColor))}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return t.backgroundColor&&n.setAttribute("mathbackground",t.backgroundColor),n};kc({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(t,e,r){var{parser:n,funcName:i}=t,a=Jh(e[0],"color-token").color,o=e[1];return{type:"enclose",mode:n.mode,label:i,backgroundColor:a,body:o}},htmlBuilder:J1e,mathmlBuilder:Q1e});kc({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(t,e,r){var{parser:n,funcName:i}=t,a=Jh(e[0],"color-token").color,o=Jh(e[1],"color-token").color,s=e[2];return{type:"enclose",mode:n.mode,label:i,backgroundColor:o,borderColor:a,body:s}},htmlBuilder:J1e,mathmlBuilder:Q1e});kc({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"enclose",mode:r.mode,label:"\\fbox",body:e[0]}}});kc({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"enclose",mode:r.mode,label:n,body:i}},htmlBuilder:J1e,mathmlBuilder:Q1e});kc({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(t,e){var{parser:r}=t;return{type:"enclose",mode:r.mode,label:"\\angl",body:e[0]}}});var SZe={};function W5(t){for(var{type:e,names:r,props:n,handler:i,htmlBuilder:a,mathmlBuilder:o}=t,s={type:e,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},d=0;d<r.length;++d)SZe[r[d]]=s;a&&(UW[e]=a),o&&(HW[e]=o)}var TZe={};function Qi(t,e){TZe[t]=e}function _Le(t){var e=[];t.consumeSpaces();var r=t.fetch().text;for(r==="\\relax"&&(t.consume(),t.consumeSpaces(),r=t.fetch().text);r==="\\hline"||r==="\\hdashline";)t.consume(),e.push(r==="\\hdashline"),t.consumeSpaces(),r=t.fetch().text;return e}var DZ=t=>{var e=t.parser.settings;if(!e.displayMode)throw new Eu("{"+t.envName+"} can be used only in display mode.")};function ebe(t){if(t.indexOf("ed")===-1)return t.indexOf("*")===-1}function E4(t,e,r){var{hskipBeforeAndAfter:n,addJot:i,cols:a,arraystretch:o,colSeparationType:s,autoTag:d,singleRow:b,emptySingleRow:L,maxNumCols:B,leqno:V}=e;if(t.gullet.beginGroup(),b||t.gullet.macros.set("\\cr","\\\\\\relax"),!o){var X=t.gullet.expandMacroAsText("\\arraystretch");if(X==null)o=1;else if(o=parseFloat(X),!o||o<0)throw new Eu("Invalid \\arraystretch: "+X)}t.gullet.beginGroup();var ie=[],de=[ie],ae=[],U=[],ve=d!=null?[]:void 0;function Se(){d&&t.gullet.macros.set("\\@eqnsw","1",!0)}function Pe(){ve&&(t.gullet.macros.get("\\df@tag")?(ve.push(t.subparse([new eA("\\df@tag")])),t.gullet.macros.set("\\df@tag",void 0,!0)):ve.push(!!d&&t.gullet.macros.get("\\@eqnsw")==="1"))}for(Se(),U.push(_Le(t));;){var Me=t.parseExpression(!1,b?"\\end":"\\\\");t.gullet.endGroup(),t.gullet.beginGroup(),Me={type:"ordgroup",mode:t.mode,body:Me},r&&(Me={type:"styling",mode:t.mode,style:r,body:[Me]}),ie.push(Me);var Ie=t.fetch().text;if(Ie==="&"){if(B&&ie.length===B){if(b||s)throw new Eu("Too many tab characters: &",t.nextToken);t.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}t.consume()}else if(Ie==="\\end"){Pe(),ie.length===1&&Me.type==="styling"&&Me.body[0].body.length===0&&(de.length>1||!L)&&de.pop(),U.length<de.length+1&&U.push([]);break}else if(Ie==="\\\\"){t.consume();var Ve=void 0;t.gullet.future().text!==" "&&(Ve=t.parseSizeGroup(!0)),ae.push(Ve?Ve.value:null),Pe(),U.push(_Le(t)),ie=[],de.push(ie),Se()}else throw new Eu("Expected & or \\\\ or \\cr or \\end",t.nextToken)}return t.gullet.endGroup(),t.gullet.endGroup(),{type:"array",mode:t.mode,addJot:i,arraystretch:o,body:de,cols:a,rowGaps:ae,hskipBeforeAndAfter:n,hLinesBeforeRow:U,colSeparationType:s,tags:ve,leqno:V}}function tbe(t){return t.slice(0,1)==="d"?"display":"text"}var Y5=function(e,r){var n,i,a=e.body.length,o=e.hLinesBeforeRow,s=0,d=new Array(a),b=[],L=Math.max(r.fontMetrics().arrayRuleWidth,r.minRuleThickness),B=1/r.fontMetrics().ptPerEm,V=5*B;if(e.colSeparationType&&e.colSeparationType==="small"){var X=r.havingStyle(hd.SCRIPT).sizeMultiplier;V=.2778*(X/r.sizeMultiplier)}var ie=e.colSeparationType==="CD"?Vy({number:3,unit:"ex"},r):12*B,de=3*B,ae=e.arraystretch*ie,U=.7*ae,ve=.3*ae,Se=0;function Pe(Mn){for(var gi=0;gi<Mn.length;++gi)gi>0&&(Se+=.25),b.push({pos:Se,isDashed:Mn[gi]})}for(Pe(o[0]),n=0;n<e.body.length;++n){var Me=e.body[n],Ie=U,Ve=ve;s<Me.length&&(s=Me.length);var Ze=new Array(Me.length);for(i=0;i<Me.length;++i){var Je=Xv(Me[i],r);Ve<Je.depth&&(Ve=Je.depth),Ie<Je.height&&(Ie=Je.height),Ze[i]=Je}var nt=e.rowGaps[n],ut=0;nt&&(ut=Vy(nt,r),ut>0&&(ut+=ve,Ve<ut&&(Ve=ut),ut=0)),e.addJot&&(Ve+=de),Ze.height=Ie,Ze.depth=Ve,Se+=Ie,Ze.pos=Se,Se+=Ve+ut,d[n]=Ze,Pe(o[n+1])}var ht=Se/2+r.fontMetrics().axisHeight,_t=e.cols||[],Dt=[],qt,Lt,dr=[];if(e.tags&&e.tags.some(Mn=>Mn))for(n=0;n<a;++n){var Zt=d[n],Cr=Zt.pos-ht,yt=e.tags[n],Vt=void 0;yt===!0?Vt=Ds.makeSpan(["eqn-num"],[],r):yt===!1?Vt=Ds.makeSpan([],[],r):Vt=Ds.makeSpan([],vx(yt,r,!0),r),Vt.depth=Zt.depth,Vt.height=Zt.height,dr.push({type:"elem",elem:Vt,shift:Cr})}for(i=0,Lt=0;i<s||Lt<_t.length;++i,++Lt){for(var Er=_t[Lt]||{},sr=!0;Er.type==="separator";){if(sr||(qt=Ds.makeSpan(["arraycolsep"],[]),qt.style.width=nc(r.fontMetrics().doubleRuleSep),Dt.push(qt)),Er.separator==="|"||Er.separator===":"){var or=Er.separator==="|"?"solid":"dashed",Ar=Ds.makeSpan(["vertical-separator"],[],r);Ar.style.height=nc(Se),Ar.style.borderRightWidth=nc(L),Ar.style.borderRightStyle=or,Ar.style.margin="0 "+nc(-L/2);var Ir=Se-ht;Ir&&(Ar.style.verticalAlign=nc(-Ir)),Dt.push(Ar)}else throw new Eu("Invalid separator type: "+Er.separator);Lt++,Er=_t[Lt]||{},sr=!1}if(!(i>=s)){var _n=void 0;(i>0||e.hskipBeforeAndAfter)&&(_n=Kf.deflt(Er.pregap,V),_n!==0&&(qt=Ds.makeSpan(["arraycolsep"],[]),qt.style.width=nc(_n),Dt.push(qt)));var Un=[];for(n=0;n<a;++n){var Qn=d[n],Jn=Qn[i];if(Jn){var Vn=Qn.pos-ht;Jn.depth=Qn.depth,Jn.height=Qn.height,Un.push({type:"elem",elem:Jn,shift:Vn})}}Un=Ds.makeVList({positionType:"individualShift",children:Un},r),Un=Ds.makeSpan(["col-align-"+(Er.align||"c")],[Un]),Dt.push(Un),(i<s-1||e.hskipBeforeAndAfter)&&(_n=Kf.deflt(Er.postgap,V),_n!==0&&(qt=Ds.makeSpan(["arraycolsep"],[]),qt.style.width=nc(_n),Dt.push(qt)))}}if(d=Ds.makeSpan(["mtable"],Dt),b.length>0){for(var jn=Ds.makeLineSpan("hline",r,L),Lr=Ds.makeLineSpan("hdashline",r,L),Yn=[{type:"elem",elem:d,shift:0}];b.length>0;){var On=b.pop(),Sn=On.pos-ht;On.isDashed?Yn.push({type:"elem",elem:Lr,shift:Sn}):Yn.push({type:"elem",elem:jn,shift:Sn})}d=Ds.makeVList({positionType:"individualShift",children:Yn},r)}if(dr.length===0)return Ds.makeSpan(["mord"],[d],r);var bn=Ds.makeVList({positionType:"individualShift",children:dr},r);return bn=Ds.makeSpan(["tag"],[bn],r),Ds.makeFragment([d,bn])},Fvr={c:"center ",l:"left ",r:"right "},X5=function(e,r){for(var n=[],i=new gu.MathNode("mtd",[],["mtr-glue"]),a=new gu.MathNode("mtd",[],["mml-eqn-num"]),o=0;o<e.body.length;o++){for(var s=e.body[o],d=[],b=0;b<s.length;b++)d.push(new gu.MathNode("mtd",[Qg(s[b],r)]));e.tags&&e.tags[o]&&(d.unshift(i),d.push(i),e.leqno?d.unshift(a):d.push(a)),n.push(new gu.MathNode("mtr",d))}var L=new gu.MathNode("mtable",n),B=e.arraystretch===.5?.1:.16+e.arraystretch-1+(e.addJot?.09:0);L.setAttribute("rowspacing",nc(B));var V="",X="";if(e.cols&&e.cols.length>0){var ie=e.cols,de="",ae=!1,U=0,ve=ie.length;ie[0].type==="separator"&&(V+="top ",U=1),ie[ie.length-1].type==="separator"&&(V+="bottom ",ve-=1);for(var Se=U;Se<ve;Se++)ie[Se].type==="align"?(X+=Fvr[ie[Se].align],ae&&(de+="none "),ae=!0):ie[Se].type==="separator"&&ae&&(de+=ie[Se].separator==="|"?"solid ":"dashed ",ae=!1);L.setAttribute("columnalign",X.trim()),/[sd]/.test(de)&&L.setAttribute("columnlines",de.trim())}if(e.colSeparationType==="align"){for(var Pe=e.cols||[],Me="",Ie=1;Ie<Pe.length;Ie++)Me+=Ie%2?"0em ":"1em ";L.setAttribute("columnspacing",Me.trim())}else e.colSeparationType==="alignat"||e.colSeparationType==="gather"?L.setAttribute("columnspacing","0em"):e.colSeparationType==="small"?L.setAttribute("columnspacing","0.2778em"):e.colSeparationType==="CD"?L.setAttribute("columnspacing","0.5em"):L.setAttribute("columnspacing","1em");var Ve="",Ze=e.hLinesBeforeRow;V+=Ze[0].length>0?"left ":"",V+=Ze[Ze.length-1].length>0?"right ":"";for(var Je=1;Je<Ze.length-1;Je++)Ve+=Ze[Je].length===0?"none ":Ze[Je][0]?"dashed ":"solid ";return/[sd]/.test(Ve)&&L.setAttribute("rowlines",Ve.trim()),V!==""&&(L=new gu.MathNode("menclose",[L]),L.setAttribute("notation",V.trim())),e.arraystretch&&e.arraystretch<1&&(L=new gu.MathNode("mstyle",[L]),L.setAttribute("scriptlevel","1")),L},EZe=function(e,r){e.envName.indexOf("ed")===-1&&DZ(e);var n=[],i=e.envName.indexOf("at")>-1?"alignat":"align",a=e.envName==="split",o=E4(e.parser,{cols:n,addJot:!0,autoTag:a?void 0:ebe(e.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:a?2:void 0,leqno:e.parser.settings.leqno},"display"),s,d=0,b={type:"ordgroup",mode:e.mode,body:[]};if(r[0]&&r[0].type==="ordgroup"){for(var L="",B=0;B<r[0].body.length;B++){var V=Jh(r[0].body[B],"textord");L+=V.text}s=Number(L),d=s*2}var X=!d;o.body.forEach(function(U){for(var ve=1;ve<U.length;ve+=2){var Se=Jh(U[ve],"styling"),Pe=Jh(Se.body[0],"ordgroup");Pe.body.unshift(b)}if(X)d<U.length&&(d=U.length);else{var Me=U.length/2;if(s<Me)throw new Eu("Too many math in a row: "+("expected "+s+", but got "+Me),U[0])}});for(var ie=0;ie<d;++ie){var de="r",ae=0;ie%2===1?de="l":ie>0&&X&&(ae=1),n[ie]={type:"align",align:de,pregap:ae,postgap:0}}return o.colSeparationType=X?"align":"alignat",o};W5({type:"array",names:["array","darray"],props:{numArgs:1},handler(t,e){var r=kZ(e[0]),n=r?[e[0]]:Jh(e[0],"ordgroup").body,i=n.map(function(o){var s=X1e(o),d=s.text;if("lcr".indexOf(d)!==-1)return{type:"align",align:d};if(d==="|")return{type:"separator",separator:"|"};if(d===":")return{type:"separator",separator:":"};throw new Eu("Unknown column alignment: "+d,o)}),a={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return E4(t.parser,a,tbe(t.envName))},htmlBuilder:Y5,mathmlBuilder:X5});W5({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(t){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[t.envName.replace("*","")],r="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if(t.envName.charAt(t.envName.length-1)==="*"){var i=t.parser;if(i.consumeSpaces(),i.fetch().text==="["){if(i.consume(),i.consumeSpaces(),r=i.fetch().text,"lcr".indexOf(r)===-1)throw new Eu("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),n.cols=[{type:"align",align:r}]}}var a=E4(t.parser,n,tbe(t.envName)),o=Math.max(0,...a.body.map(s=>s.length));return a.cols=new Array(o).fill({type:"align",align:r}),e?{type:"leftright",mode:t.mode,body:[a],left:e[0],right:e[1],rightColor:void 0}:a},htmlBuilder:Y5,mathmlBuilder:X5});W5({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){var e={arraystretch:.5},r=E4(t.parser,e,"script");return r.colSeparationType="small",r},htmlBuilder:Y5,mathmlBuilder:X5});W5({type:"array",names:["subarray"],props:{numArgs:1},handler(t,e){var r=kZ(e[0]),n=r?[e[0]]:Jh(e[0],"ordgroup").body,i=n.map(function(o){var s=X1e(o),d=s.text;if("lc".indexOf(d)!==-1)return{type:"align",align:d};throw new Eu("Unknown column alignment: "+d,o)});if(i.length>1)throw new Eu("{subarray} can contain only one column");var a={cols:i,hskipBeforeAndAfter:!1,arraystretch:.5};if(a=E4(t.parser,a,"script"),a.body.length>0&&a.body[0].length>1)throw new Eu("{subarray} can contain only one column");return a},htmlBuilder:Y5,mathmlBuilder:X5});W5({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(t){var e={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},r=E4(t.parser,e,tbe(t.envName));return{type:"leftright",mode:t.mode,body:[r],left:t.envName.indexOf("r")>-1?".":"\\{",right:t.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Y5,mathmlBuilder:X5});W5({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:EZe,htmlBuilder:Y5,mathmlBuilder:X5});W5({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(t){Kf.contains(["gather","gather*"],t.envName)&&DZ(t);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:ebe(t.envName),emptySingleRow:!0,leqno:t.parser.settings.leqno};return E4(t.parser,e,"display")},htmlBuilder:Y5,mathmlBuilder:X5});W5({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:EZe,htmlBuilder:Y5,mathmlBuilder:X5});W5({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(t){DZ(t);var e={autoTag:ebe(t.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:t.parser.settings.leqno};return E4(t.parser,e,"display")},htmlBuilder:Y5,mathmlBuilder:X5});W5({type:"array",names:["CD"],props:{numArgs:0},handler(t){return DZ(t),Svr(t.parser)},htmlBuilder:Y5,mathmlBuilder:X5});Qi("\\nonumber","\\gdef\\@eqnsw{0}");Qi("\\notag","\\nonumber");kc({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(t,e){throw new Eu(t.funcName+" valid only within array environment")}});var wLe=SZe;kc({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];if(i.type!=="ordgroup")throw new Eu("Invalid environment name",i);for(var a="",o=0;o<i.body.length;++o)a+=Jh(i.body[o],"textord").text;if(n==="\\begin"){if(!wLe.hasOwnProperty(a))throw new Eu("No such environment: "+a,i);var s=wLe[a],{args:d,optArgs:b}=r.parseArguments("\\begin{"+a+"}",s),L={mode:r.mode,envName:a,parser:r},B=s.handler(L,d,b);r.expect("\\end",!1);var V=r.nextToken,X=Jh(r.parseFunction(),"environment");if(X.name!==a)throw new Eu("Mismatch: \\begin{"+a+"} matched by \\end{"+X.name+"}",V);return B}return{type:"environment",mode:r.mode,name:a,nameGroup:i}}});var AZe=(t,e)=>{var r=t.font,n=e.withFont(r);return Xv(t.body,n)},CZe=(t,e)=>{var r=t.font,n=e.withFont(r);return Qg(t.body,n)},SLe={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};kc({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=jW(e[0]),a=n;return a in SLe&&(a=SLe[a]),{type:"font",mode:r.mode,font:a.slice(1),body:i}},htmlBuilder:AZe,mathmlBuilder:CZe});kc({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(t,e)=>{var{parser:r}=t,n=e[0],i=Kf.isCharacterBox(n);return{type:"mclass",mode:r.mode,mclass:IZ(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:i}}});kc({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{parser:r,funcName:n,breakOnTokenText:i}=t,{mode:a}=r,o=r.parseExpression(!0,i),s="math"+n.slice(1);return{type:"font",mode:a,font:s,body:{type:"ordgroup",mode:r.mode,body:o}}},htmlBuilder:AZe,mathmlBuilder:CZe});var MZe=(t,e)=>{var r=e;return t==="display"?r=r.id>=hd.SCRIPT.id?r.text():hd.DISPLAY:t==="text"&&r.size===hd.DISPLAY.size?r=hd.TEXT:t==="script"?r=hd.SCRIPT:t==="scriptscript"&&(r=hd.SCRIPTSCRIPT),r},rbe=(t,e)=>{var r=MZe(t.size,e.style),n=r.fracNum(),i=r.fracDen(),a;a=e.havingStyle(n);var o=Xv(t.numer,a,e);if(t.continued){var s=8.5/e.fontMetrics().ptPerEm,d=3.5/e.fontMetrics().ptPerEm;o.height=o.height<s?s:o.height,o.depth=o.depth<d?d:o.depth}a=e.havingStyle(i);var b=Xv(t.denom,a,e),L,B,V;t.hasBarLine?(t.barSize?(B=Vy(t.barSize,e),L=Ds.makeLineSpan("frac-line",e,B)):L=Ds.makeLineSpan("frac-line",e),B=L.height,V=L.height):(L=null,B=0,V=e.fontMetrics().defaultRuleThickness);var X,ie,de;r.size===hd.DISPLAY.size||t.size==="display"?(X=e.fontMetrics().num1,B>0?ie=3*V:ie=7*V,de=e.fontMetrics().denom1):(B>0?(X=e.fontMetrics().num2,ie=V):(X=e.fontMetrics().num3,ie=3*V),de=e.fontMetrics().denom2);var ae;if(L){var ve=e.fontMetrics().axisHeight;X-o.depth-(ve+.5*B)<ie&&(X+=ie-(X-o.depth-(ve+.5*B))),ve-.5*B-(b.height-de)<ie&&(de+=ie-(ve-.5*B-(b.height-de)));var Se=-(ve-.5*B);ae=Ds.makeVList({positionType:"individualShift",children:[{type:"elem",elem:b,shift:de},{type:"elem",elem:L,shift:Se},{type:"elem",elem:o,shift:-X}]},e)}else{var U=X-o.depth-(b.height-de);U<ie&&(X+=.5*(ie-U),de+=.5*(ie-U)),ae=Ds.makeVList({positionType:"individualShift",children:[{type:"elem",elem:b,shift:de},{type:"elem",elem:o,shift:-X}]},e)}a=e.havingStyle(r),ae.height*=a.sizeMultiplier/e.sizeMultiplier,ae.depth*=a.sizeMultiplier/e.sizeMultiplier;var Pe;r.size===hd.DISPLAY.size?Pe=e.fontMetrics().delim1:r.size===hd.SCRIPTSCRIPT.size?Pe=e.havingStyle(hd.SCRIPT).fontMetrics().delim2:Pe=e.fontMetrics().delim2;var Me,Ie;return t.leftDelim==null?Me=mB(e,["mopen"]):Me=Rk.customSizedDelim(t.leftDelim,Pe,!0,e.havingStyle(r),t.mode,["mopen"]),t.continued?Ie=Ds.makeSpan([]):t.rightDelim==null?Ie=mB(e,["mclose"]):Ie=Rk.customSizedDelim(t.rightDelim,Pe,!0,e.havingStyle(r),t.mode,["mclose"]),Ds.makeSpan(["mord"].concat(a.sizingClasses(e)),[Me,Ds.makeSpan(["mfrac"],[ae]),Ie],e)},nbe=(t,e)=>{var r=new gu.MathNode("mfrac",[Qg(t.numer,e),Qg(t.denom,e)]);if(!t.hasBarLine)r.setAttribute("linethickness","0px");else if(t.barSize){var n=Vy(t.barSize,e);r.setAttribute("linethickness",nc(n))}var i=MZe(t.size,e.style);if(i.size!==e.style.size){r=new gu.MathNode("mstyle",[r]);var a=i.size===hd.DISPLAY.size?"true":"false";r.setAttribute("displaystyle",a),r.setAttribute("scriptlevel","0")}if(t.leftDelim!=null||t.rightDelim!=null){var o=[];if(t.leftDelim!=null){var s=new gu.MathNode("mo",[new gu.TextNode(t.leftDelim.replace("\\",""))]);s.setAttribute("fence","true"),o.push(s)}if(o.push(r),t.rightDelim!=null){var d=new gu.MathNode("mo",[new gu.TextNode(t.rightDelim.replace("\\",""))]);d.setAttribute("fence","true"),o.push(d)}return W1e(o)}return r};kc({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0],a=e[1],o,s=null,d=null,b="auto";switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":o=!0;break;case"\\\\atopfrac":o=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":o=!1,s="(",d=")";break;case"\\\\bracefrac":o=!1,s="\\{",d="\\}";break;case"\\\\brackfrac":o=!1,s="[",d="]";break;default:throw new Error("Unrecognized genfrac command")}switch(n){case"\\dfrac":case"\\dbinom":b="display";break;case"\\tfrac":case"\\tbinom":b="text";break}return{type:"genfrac",mode:r.mode,continued:!1,numer:i,denom:a,hasBarLine:o,leftDelim:s,rightDelim:d,size:b,barSize:null}},htmlBuilder:rbe,mathmlBuilder:nbe});kc({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0],a=e[1];return{type:"genfrac",mode:r.mode,continued:!0,numer:i,denom:a,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});kc({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(t){var{parser:e,funcName:r,token:n}=t,i;switch(r){case"\\over":i="\\frac";break;case"\\choose":i="\\binom";break;case"\\atop":i="\\\\atopfrac";break;case"\\brace":i="\\\\bracefrac";break;case"\\brack":i="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:i,token:n}}});var TLe=["display","text","script","scriptscript"],ELe=function(e){var r=null;return e.length>0&&(r=e,r=r==="."?null:r),r};kc({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(t,e){var{parser:r}=t,n=e[4],i=e[5],a=jW(e[0]),o=a.type==="atom"&&a.family==="open"?ELe(a.text):null,s=jW(e[1]),d=s.type==="atom"&&s.family==="close"?ELe(s.text):null,b=Jh(e[2],"size"),L,B=null;b.isBlank?L=!0:(B=b.value,L=B.number>0);var V="auto",X=e[3];if(X.type==="ordgroup"){if(X.body.length>0){var ie=Jh(X.body[0],"textord");V=TLe[Number(ie.text)]}}else X=Jh(X,"textord"),V=TLe[Number(X.text)];return{type:"genfrac",mode:r.mode,numer:n,denom:i,continued:!1,hasBarLine:L,barSize:B,leftDelim:o,rightDelim:d,size:V}},htmlBuilder:rbe,mathmlBuilder:nbe});kc({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(t,e){var{parser:r,funcName:n,token:i}=t;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:Jh(e[0],"size").value,token:i}}});kc({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0],a=hpr(Jh(e[1],"infix").size),o=e[2],s=a.number>0;return{type:"genfrac",mode:r.mode,numer:i,denom:o,continued:!1,hasBarLine:s,barSize:a,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:rbe,mathmlBuilder:nbe});var RZe=(t,e)=>{var r=e.style,n,i;t.type==="supsub"?(n=t.sup?Xv(t.sup,e.havingStyle(r.sup()),e):Xv(t.sub,e.havingStyle(r.sub()),e),i=Jh(t.base,"horizBrace")):i=Jh(t,"horizBrace");var a=Xv(i.base,e.havingBaseStyle(hd.DISPLAY)),o=Fk.svgSpan(i,e),s;if(i.isOver?(s=Ds.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:o}]},e),s.children[0].children[0].children[1].classes.push("svg-align")):(s=Ds.makeVList({positionType:"bottom",positionData:a.depth+.1+o.height,children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:a}]},e),s.children[0].children[0].children[0].classes.push("svg-align")),n){var d=Ds.makeSpan(["mord",i.isOver?"mover":"munder"],[s],e);i.isOver?s=Ds.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:d},{type:"kern",size:.2},{type:"elem",elem:n}]},e):s=Ds.makeVList({positionType:"bottom",positionData:d.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:d}]},e)}return Ds.makeSpan(["mord",i.isOver?"mover":"munder"],[s],e)},zvr=(t,e)=>{var r=Fk.mathMLnode(t.label);return new gu.MathNode(t.isOver?"mover":"munder",[Qg(t.base,e),r])};kc({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t;return{type:"horizBrace",mode:r.mode,label:n,isOver:/^\\over/.test(n),base:e[0]}},htmlBuilder:RZe,mathmlBuilder:zvr});kc({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[1],i=Jh(e[0],"url").url;return r.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:r.mode,href:i,body:J1(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(t,e)=>{var r=vx(t.body,e,!1);return Ds.makeAnchor(t.href,[],r,e)},mathmlBuilder:(t,e)=>{var r=l4(t.body,e);return r instanceof eE||(r=new eE("mrow",[r])),r.setAttribute("href",t.href),r}});kc({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=Jh(e[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var i=[],a=0;a<n.length;a++){var o=n[a];o==="~"&&(o="\\textasciitilde"),i.push({type:"textord",mode:"text",text:o})}var s={type:"text",mode:r.mode,font:"\\texttt",body:i};return{type:"href",mode:r.mode,href:n,body:J1(s)}}});kc({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(t,e){var{parser:r}=t;return{type:"hbox",mode:r.mode,body:J1(e[0])}},htmlBuilder(t,e){var r=vx(t.body,e,!1);return Ds.makeFragment(r)},mathmlBuilder(t,e){return new gu.MathNode("mrow",nT(t.body,e))}});kc({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(t,e)=>{var{parser:r,funcName:n,token:i}=t,a=Jh(e[0],"raw").string,o=e[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var s,d={};switch(n){case"\\htmlClass":d.class=a,s={command:"\\htmlClass",class:a};break;case"\\htmlId":d.id=a,s={command:"\\htmlId",id:a};break;case"\\htmlStyle":d.style=a,s={command:"\\htmlStyle",style:a};break;case"\\htmlData":{for(var b=a.split(","),L=0;L<b.length;L++){var B=b[L].split("=");if(B.length!==2)throw new Eu("Error parsing key-value for \\htmlData");d["data-"+B[0].trim()]=B[1].trim()}s={command:"\\htmlData",attributes:d};break}default:throw new Error("Unrecognized html command")}return r.settings.isTrusted(s)?{type:"html",mode:r.mode,attributes:d,body:J1(o)}:r.formatUnsupportedCmd(n)},htmlBuilder:(t,e)=>{var r=vx(t.body,e,!1),n=["enclosing"];t.attributes.class&&n.push(...t.attributes.class.trim().split(/\s+/));var i=Ds.makeSpan(n,r,e);for(var a in t.attributes)a!=="class"&&t.attributes.hasOwnProperty(a)&&i.setAttribute(a,t.attributes[a]);return i},mathmlBuilder:(t,e)=>l4(t.body,e)});kc({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t;return{type:"htmlmathml",mode:r.mode,html:J1(e[0]),mathml:J1(e[1])}},htmlBuilder:(t,e)=>{var r=vx(t.html,e,!1);return Ds.makeFragment(r)},mathmlBuilder:(t,e)=>l4(t.mathml,e)});var rse=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!r)throw new Eu("Invalid size: '"+e+"' in \\includegraphics");var n={number:+(r[1]+r[2]),unit:r[3]};if(!YXe(n))throw new Eu("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};kc({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(t,e,r)=>{var{parser:n}=t,i={number:0,unit:"em"},a={number:.9,unit:"em"},o={number:0,unit:"em"},s="";if(r[0])for(var d=Jh(r[0],"raw").string,b=d.split(","),L=0;L<b.length;L++){var B=b[L].split("=");if(B.length===2){var V=B[1].trim();switch(B[0].trim()){case"alt":s=V;break;case"width":i=rse(V);break;case"height":a=rse(V);break;case"totalheight":o=rse(V);break;default:throw new Eu("Invalid key: '"+B[0]+"' in \\includegraphics.")}}}var X=Jh(e[0],"url").url;return s===""&&(s=X,s=s.replace(/^.*[\\/]/,""),s=s.substring(0,s.lastIndexOf("."))),n.settings.isTrusted({command:"\\includegraphics",url:X})?{type:"includegraphics",mode:n.mode,alt:s,width:i,height:a,totalheight:o,src:X}:n.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(t,e)=>{var r=Vy(t.height,e),n=0;t.totalheight.number>0&&(n=Vy(t.totalheight,e)-r);var i=0;t.width.number>0&&(i=Vy(t.width,e));var a={height:nc(r+n)};i>0&&(a.width=nc(i)),n>0&&(a.verticalAlign=nc(-n));var o=new zpr(t.src,t.alt,a);return o.height=r,o.depth=n,o},mathmlBuilder:(t,e)=>{var r=new gu.MathNode("mglyph",[]);r.setAttribute("alt",t.alt);var n=Vy(t.height,e),i=0;if(t.totalheight.number>0&&(i=Vy(t.totalheight,e)-n,r.setAttribute("valign",nc(-i))),r.setAttribute("height",nc(n+i)),t.width.number>0){var a=Vy(t.width,e);r.setAttribute("width",nc(a))}return r.setAttribute("src",t.src),r}});kc({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(t,e){var{parser:r,funcName:n}=t,i=Jh(e[0],"size");if(r.settings.strict){var a=n[1]==="m",o=i.value.unit==="mu";a?(o||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, "+("not "+i.value.unit+" units")),r.mode!=="math"&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):o&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:i.value}},htmlBuilder(t,e){return Ds.makeGlue(t.dimension,e)},mathmlBuilder(t,e){var r=Vy(t.dimension,e);return new gu.SpaceNode(r)}});kc({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:i}},htmlBuilder:(t,e)=>{var r;t.alignment==="clap"?(r=Ds.makeSpan([],[Xv(t.body,e)]),r=Ds.makeSpan(["inner"],[r],e)):r=Ds.makeSpan(["inner"],[Xv(t.body,e)]);var n=Ds.makeSpan(["fix"],[]),i=Ds.makeSpan([t.alignment],[r,n],e),a=Ds.makeSpan(["strut"]);return a.style.height=nc(i.height+i.depth),i.depth&&(a.style.verticalAlign=nc(-i.depth)),i.children.unshift(a),i=Ds.makeSpan(["thinbox"],[i],e),Ds.makeSpan(["mord","vbox"],[i],e)},mathmlBuilder:(t,e)=>{var r=new gu.MathNode("mpadded",[Qg(t.body,e)]);if(t.alignment!=="rlap"){var n=t.alignment==="llap"?"-1":"-0.5";r.setAttribute("lspace",n+"width")}return r.setAttribute("width","0px"),r}});kc({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){var{funcName:r,parser:n}=t,i=n.mode;n.switchMode("math");var a=r==="\\("?"\\)":"$",o=n.parseExpression(!1,a);return n.expect(a),n.switchMode(i),{type:"styling",mode:n.mode,style:"text",body:o}}});kc({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){throw new Eu("Mismatched "+t.funcName)}});var ALe=(t,e)=>{switch(e.style.size){case hd.DISPLAY.size:return t.display;case hd.TEXT.size:return t.text;case hd.SCRIPT.size:return t.script;case hd.SCRIPTSCRIPT.size:return t.scriptscript;default:return t.text}};kc({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(t,e)=>{var{parser:r}=t;return{type:"mathchoice",mode:r.mode,display:J1(e[0]),text:J1(e[1]),script:J1(e[2]),scriptscript:J1(e[3])}},htmlBuilder:(t,e)=>{var r=ALe(t,e),n=vx(r,e,!1);return Ds.makeFragment(n)},mathmlBuilder:(t,e)=>{var r=ALe(t,e);return l4(r,e)}});var kZe=(t,e,r,n,i,a,o)=>{t=Ds.makeSpan([],[t]);var s=r&&Kf.isCharacterBox(r),d,b;if(e){var L=Xv(e,n.havingStyle(i.sup()),n);b={elem:L,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-L.depth)}}if(r){var B=Xv(r,n.havingStyle(i.sub()),n);d={elem:B,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-B.height)}}var V;if(b&&d){var X=n.fontMetrics().bigOpSpacing5+d.elem.height+d.elem.depth+d.kern+t.depth+o;V=Ds.makeVList({positionType:"bottom",positionData:X,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:d.elem,marginLeft:nc(-a)},{type:"kern",size:d.kern},{type:"elem",elem:t},{type:"kern",size:b.kern},{type:"elem",elem:b.elem,marginLeft:nc(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(d){var ie=t.height-o;V=Ds.makeVList({positionType:"top",positionData:ie,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:d.elem,marginLeft:nc(-a)},{type:"kern",size:d.kern},{type:"elem",elem:t}]},n)}else if(b){var de=t.depth+o;V=Ds.makeVList({positionType:"bottom",positionData:de,children:[{type:"elem",elem:t},{type:"kern",size:b.kern},{type:"elem",elem:b.elem,marginLeft:nc(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else return t;var ae=[V];if(d&&a!==0&&!s){var U=Ds.makeSpan(["mspace"],[],n);U.style.marginRight=nc(a),ae.unshift(U)}return Ds.makeSpan(["mop","op-limits"],ae,n)},IZe=["\\smallint"],EF=(t,e)=>{var r,n,i=!1,a;t.type==="supsub"?(r=t.sup,n=t.sub,a=Jh(t.base,"op"),i=!0):a=Jh(t,"op");var o=e.style,s=!1;o.size===hd.DISPLAY.size&&a.symbol&&!Kf.contains(IZe,a.name)&&(s=!0);var d;if(a.symbol){var b=s?"Size2-Regular":"Size1-Regular",L="";if((a.name==="\\oiint"||a.name==="\\oiiint")&&(L=a.name.slice(1),a.name=L==="oiint"?"\\iint":"\\iiint"),d=Ds.makeSymbol(a.name,b,"math",e,["mop","op-symbol",s?"large-op":"small-op"]),L.length>0){var B=d.italic,V=Ds.staticSvg(L+"Size"+(s?"2":"1"),e);d=Ds.makeVList({positionType:"individualShift",children:[{type:"elem",elem:d,shift:0},{type:"elem",elem:V,shift:s?.08:0}]},e),a.name="\\"+L,d.classes.unshift("mop"),d.italic=B}}else if(a.body){var X=vx(a.body,e,!0);X.length===1&&X[0]instanceof lA?(d=X[0],d.classes[0]="mop"):d=Ds.makeSpan(["mop"],X,e)}else{for(var ie=[],de=1;de<a.name.length;de++)ie.push(Ds.mathsym(a.name[de],a.mode,e));d=Ds.makeSpan(["mop"],ie,e)}var ae=0,U=0;return(d instanceof lA||a.name==="\\oiint"||a.name==="\\oiiint")&&!a.suppressBaseShift&&(ae=(d.height-d.depth)/2-e.fontMetrics().axisHeight,U=d.italic),i?kZe(d,r,n,e,o,U,ae):(ae&&(d.style.position="relative",d.style.top=nc(ae)),d)},kU=(t,e)=>{var r;if(t.symbol)r=new eE("mo",[uA(t.name,t.mode)]),Kf.contains(IZe,t.name)&&r.setAttribute("largeop","false");else if(t.body)r=new eE("mo",nT(t.body,e));else{r=new eE("mi",[new M5(t.name.slice(1))]);var n=new eE("mo",[uA("⁡","text")]);t.parentIsSupSub?r=new eE("mrow",[r,n]):r=aZe([r,n])}return r},Bvr={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};kc({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=n;return i.length===1&&(i=Bvr[i]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:EF,mathmlBuilder:kU});kc({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:J1(n)}},htmlBuilder:EF,mathmlBuilder:kU});var Uvr={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};kc({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:EF,mathmlBuilder:kU});kc({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:EF,mathmlBuilder:kU});kc({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t,n=r;return n.length===1&&(n=Uvr[n]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:EF,mathmlBuilder:kU});var PZe=(t,e)=>{var r,n,i=!1,a;t.type==="supsub"?(r=t.sup,n=t.sub,a=Jh(t.base,"operatorname"),i=!0):a=Jh(t,"operatorname");var o;if(a.body.length>0){for(var s=a.body.map(B=>{var V=B.text;return typeof V=="string"?{type:"textord",mode:B.mode,text:V}:B}),d=vx(s,e.withFont("mathrm"),!0),b=0;b<d.length;b++){var L=d[b];L instanceof lA&&(L.text=L.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}o=Ds.makeSpan(["mop"],d,e)}else o=Ds.makeSpan(["mop"],[],e);return i?kZe(o,r,n,e,e.style,0,0):o},Hvr=(t,e)=>{for(var r=nT(t.body,e.withFont("mathrm")),n=!0,i=0;i<r.length;i++){var a=r[i];if(!(a instanceof gu.SpaceNode))if(a instanceof gu.MathNode)switch(a.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{var o=a.children[0];a.children.length===1&&o instanceof gu.TextNode?o.text=o.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):n=!1;break}default:n=!1}else n=!1}if(n){var s=r.map(L=>L.toText()).join("");r=[new gu.TextNode(s)]}var d=new gu.MathNode("mi",r);d.setAttribute("mathvariant","normal");var b=new gu.MathNode("mo",[uA("⁡","text")]);return t.parentIsSupSub?new gu.MathNode("mrow",[d,b]):gu.newDocumentFragment([d,b])};kc({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"operatorname",mode:r.mode,body:J1(i),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:PZe,mathmlBuilder:Hvr});Qi("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");l6({type:"ordgroup",htmlBuilder(t,e){return t.semisimple?Ds.makeFragment(vx(t.body,e,!1)):Ds.makeSpan(["mord"],vx(t.body,e,!0),e)},mathmlBuilder(t,e){return l4(t.body,e,!0)}});kc({type:"overline",names:["\\overline"],props:{numArgs:1},handler(t,e){var{parser:r}=t,n=e[0];return{type:"overline",mode:r.mode,body:n}},htmlBuilder(t,e){var r=Xv(t.body,e.havingCrampedStyle()),n=Ds.makeLineSpan("overline-line",e),i=e.fontMetrics().defaultRuleThickness,a=Ds.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n},{type:"kern",size:i}]},e);return Ds.makeSpan(["mord","overline"],[a],e)},mathmlBuilder(t,e){var r=new gu.MathNode("mo",[new gu.TextNode("‾")]);r.setAttribute("stretchy","true");var n=new gu.MathNode("mover",[Qg(t.body,e),r]);return n.setAttribute("accent","true"),n}});kc({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"phantom",mode:r.mode,body:J1(n)}},htmlBuilder:(t,e)=>{var r=vx(t.body,e.withPhantom(),!1);return Ds.makeFragment(r)},mathmlBuilder:(t,e)=>{var r=nT(t.body,e);return new gu.MathNode("mphantom",r)}});kc({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"hphantom",mode:r.mode,body:n}},htmlBuilder:(t,e)=>{var r=Ds.makeSpan([],[Xv(t.body,e.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var n=0;n<r.children.length;n++)r.children[n].height=0,r.children[n].depth=0;return r=Ds.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},e),Ds.makeSpan(["mord"],[r],e)},mathmlBuilder:(t,e)=>{var r=nT(J1(t.body),e),n=new gu.MathNode("mphantom",r),i=new gu.MathNode("mpadded",[n]);return i.setAttribute("height","0px"),i.setAttribute("depth","0px"),i}});kc({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"vphantom",mode:r.mode,body:n}},htmlBuilder:(t,e)=>{var r=Ds.makeSpan(["inner"],[Xv(t.body,e.withPhantom())]),n=Ds.makeSpan(["fix"],[]);return Ds.makeSpan(["mord","rlap"],[r,n],e)},mathmlBuilder:(t,e)=>{var r=nT(J1(t.body),e),n=new gu.MathNode("mphantom",r),i=new gu.MathNode("mpadded",[n]);return i.setAttribute("width","0px"),i}});kc({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(t,e){var{parser:r}=t,n=Jh(e[0],"size").value,i=e[1];return{type:"raisebox",mode:r.mode,dy:n,body:i}},htmlBuilder(t,e){var r=Xv(t.body,e),n=Vy(t.dy,e);return Ds.makeVList({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]},e)},mathmlBuilder(t,e){var r=new gu.MathNode("mpadded",[Qg(t.body,e)]),n=t.dy.number+t.dy.unit;return r.setAttribute("voffset",n),r}});kc({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(t){var{parser:e}=t;return{type:"internal",mode:e.mode}}});kc({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(t,e,r){var{parser:n}=t,i=r[0],a=Jh(e[0],"size"),o=Jh(e[1],"size");return{type:"rule",mode:n.mode,shift:i&&Jh(i,"size").value,width:a.value,height:o.value}},htmlBuilder(t,e){var r=Ds.makeSpan(["mord","rule"],[],e),n=Vy(t.width,e),i=Vy(t.height,e),a=t.shift?Vy(t.shift,e):0;return r.style.borderRightWidth=nc(n),r.style.borderTopWidth=nc(i),r.style.bottom=nc(a),r.width=n,r.height=i+a,r.depth=-a,r.maxFontSize=i*1.125*e.sizeMultiplier,r},mathmlBuilder(t,e){var r=Vy(t.width,e),n=Vy(t.height,e),i=t.shift?Vy(t.shift,e):0,a=e.color&&e.getColor()||"black",o=new gu.MathNode("mspace");o.setAttribute("mathbackground",a),o.setAttribute("width",nc(r)),o.setAttribute("height",nc(n));var s=new gu.MathNode("mpadded",[o]);return i>=0?s.setAttribute("height",nc(i)):(s.setAttribute("height",nc(i)),s.setAttribute("depth",nc(-i))),s.setAttribute("voffset",nc(i)),s}});function DZe(t,e,r){for(var n=vx(t,e,!1),i=e.sizeMultiplier/r.sizeMultiplier,a=0;a<n.length;a++){var o=n[a].classes.indexOf("sizing");o<0?Array.prototype.push.apply(n[a].classes,e.sizingClasses(r)):n[a].classes[o+1]==="reset-size"+e.size&&(n[a].classes[o+1]="reset-size"+r.size),n[a].height*=i,n[a].depth*=i}return Ds.makeFragment(n)}var CLe=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],jvr=(t,e)=>{var r=e.havingSize(t.size);return DZe(t.body,r,e)};kc({type:"sizing",names:CLe,props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{breakOnTokenText:r,funcName:n,parser:i}=t,a=i.parseExpression(!1,r);return{type:"sizing",mode:i.mode,size:CLe.indexOf(n)+1,body:a}},htmlBuilder:jvr,mathmlBuilder:(t,e)=>{var r=e.havingSize(t.size),n=nT(t.body,r),i=new gu.MathNode("mstyle",n);return i.setAttribute("mathsize",nc(r.sizeMultiplier)),i}});kc({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(t,e,r)=>{var{parser:n}=t,i=!1,a=!1,o=r[0]&&Jh(r[0],"ordgroup");if(o)for(var s="",d=0;d<o.body.length;++d){var b=o.body[d];if(s=b.text,s==="t")i=!0;else if(s==="b")a=!0;else{i=!1,a=!1;break}}else i=!0,a=!0;var L=e[0];return{type:"smash",mode:n.mode,body:L,smashHeight:i,smashDepth:a}},htmlBuilder:(t,e)=>{var r=Ds.makeSpan([],[Xv(t.body,e)]);if(!t.smashHeight&&!t.smashDepth)return r;if(t.smashHeight&&(r.height=0,r.children))for(var n=0;n<r.children.length;n++)r.children[n].height=0;if(t.smashDepth&&(r.depth=0,r.children))for(var i=0;i<r.children.length;i++)r.children[i].depth=0;var a=Ds.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},e);return Ds.makeSpan(["mord"],[a],e)},mathmlBuilder:(t,e)=>{var r=new gu.MathNode("mpadded",[Qg(t.body,e)]);return t.smashHeight&&r.setAttribute("height","0px"),t.smashDepth&&r.setAttribute("depth","0px"),r}});kc({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){var{parser:n}=t,i=r[0],a=e[0];return{type:"sqrt",mode:n.mode,body:a,index:i}},htmlBuilder(t,e){var r=Xv(t.body,e.havingCrampedStyle());r.height===0&&(r.height=e.fontMetrics().xHeight),r=Ds.wrapFragment(r,e);var n=e.fontMetrics(),i=n.defaultRuleThickness,a=i;e.style.id<hd.TEXT.id&&(a=e.fontMetrics().xHeight);var o=i+a/4,s=r.height+r.depth+o+i,{span:d,ruleWidth:b,advanceWidth:L}=Rk.sqrtImage(s,e),B=d.height-b;B>r.height+r.depth+o&&(o=(o+B-r.height-r.depth)/2);var V=d.height-r.height-o-b;r.style.paddingLeft=nc(L);var X=Ds.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+V)},{type:"elem",elem:d},{type:"kern",size:b}]},e);if(t.index){var ie=e.havingStyle(hd.SCRIPTSCRIPT),de=Xv(t.index,ie,e),ae=.6*(X.height-X.depth),U=Ds.makeVList({positionType:"shift",positionData:-ae,children:[{type:"elem",elem:de}]},e),ve=Ds.makeSpan(["root"],[U]);return Ds.makeSpan(["mord","sqrt"],[ve,X],e)}else return Ds.makeSpan(["mord","sqrt"],[X],e)},mathmlBuilder(t,e){var{body:r,index:n}=t;return n?new gu.MathNode("mroot",[Qg(r,e),Qg(n,e)]):new gu.MathNode("msqrt",[Qg(r,e)])}});var MLe={display:hd.DISPLAY,text:hd.TEXT,script:hd.SCRIPT,scriptscript:hd.SCRIPTSCRIPT};kc({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t,e){var{breakOnTokenText:r,funcName:n,parser:i}=t,a=i.parseExpression(!0,r),o=n.slice(1,n.length-5);return{type:"styling",mode:i.mode,style:o,body:a}},htmlBuilder(t,e){var r=MLe[t.style],n=e.havingStyle(r).withFont("");return DZe(t.body,n,e)},mathmlBuilder(t,e){var r=MLe[t.style],n=e.havingStyle(r),i=nT(t.body,n),a=new gu.MathNode("mstyle",i),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},s=o[t.style];return a.setAttribute("scriptlevel",s[0]),a.setAttribute("displaystyle",s[1]),a}});var Vvr=function(e,r){var n=e.base;if(n)if(n.type==="op"){var i=n.limits&&(r.style.size===hd.DISPLAY.size||n.alwaysHandleSupSub);return i?EF:null}else if(n.type==="operatorname"){var a=n.alwaysHandleSupSub&&(r.style.size===hd.DISPLAY.size||n.limits);return a?PZe:null}else{if(n.type==="accent")return Kf.isCharacterBox(n.base)?Z1e:null;if(n.type==="horizBrace"){var o=!e.sub;return o===n.isOver?RZe:null}else return null}else return null};l6({type:"supsub",htmlBuilder(t,e){var r=Vvr(t,e);if(r)return r(t,e);var{base:n,sup:i,sub:a}=t,o=Xv(n,e),s,d,b=e.fontMetrics(),L=0,B=0,V=n&&Kf.isCharacterBox(n);if(i){var X=e.havingStyle(e.style.sup());s=Xv(i,X,e),V||(L=o.height-X.fontMetrics().supDrop*X.sizeMultiplier/e.sizeMultiplier)}if(a){var ie=e.havingStyle(e.style.sub());d=Xv(a,ie,e),V||(B=o.depth+ie.fontMetrics().subDrop*ie.sizeMultiplier/e.sizeMultiplier)}var de;e.style===hd.DISPLAY?de=b.sup1:e.style.cramped?de=b.sup3:de=b.sup2;var ae=e.sizeMultiplier,U=nc(.5/b.ptPerEm/ae),ve=null;if(d){var Se=t.base&&t.base.type==="op"&&t.base.name&&(t.base.name==="\\oiint"||t.base.name==="\\oiiint");(o instanceof lA||Se)&&(ve=nc(-o.italic))}var Pe;if(s&&d){L=Math.max(L,de,s.depth+.25*b.xHeight),B=Math.max(B,b.sub2);var Me=b.defaultRuleThickness,Ie=4*Me;if(L-s.depth-(d.height-B)<Ie){B=Ie-(L-s.depth)+d.height;var Ve=.8*b.xHeight-(L-s.depth);Ve>0&&(L+=Ve,B-=Ve)}var Ze=[{type:"elem",elem:d,shift:B,marginRight:U,marginLeft:ve},{type:"elem",elem:s,shift:-L,marginRight:U}];Pe=Ds.makeVList({positionType:"individualShift",children:Ze},e)}else if(d){B=Math.max(B,b.sub1,d.height-.8*b.xHeight);var Je=[{type:"elem",elem:d,marginLeft:ve,marginRight:U}];Pe=Ds.makeVList({positionType:"shift",positionData:B,children:Je},e)}else if(s)L=Math.max(L,de,s.depth+.25*b.xHeight),Pe=Ds.makeVList({positionType:"shift",positionData:-L,children:[{type:"elem",elem:s,marginRight:U}]},e);else throw new Error("supsub must have either sup or sub.");var nt=bve(o,"right")||"mord";return Ds.makeSpan([nt],[o,Ds.makeSpan(["msupsub"],[Pe])],e)},mathmlBuilder(t,e){var r=!1,n,i;t.base&&t.base.type==="horizBrace"&&(i=!!t.sup,i===t.base.isOver&&(r=!0,n=t.base.isOver)),t.base&&(t.base.type==="op"||t.base.type==="operatorname")&&(t.base.parentIsSupSub=!0);var a=[Qg(t.base,e)];t.sub&&a.push(Qg(t.sub,e)),t.sup&&a.push(Qg(t.sup,e));var o;if(r)o=n?"mover":"munder";else if(t.sub)if(t.sup){var b=t.base;b&&b.type==="op"&&b.limits&&e.style===hd.DISPLAY||b&&b.type==="operatorname"&&b.alwaysHandleSupSub&&(e.style===hd.DISPLAY||b.limits)?o="munderover":o="msubsup"}else{var d=t.base;d&&d.type==="op"&&d.limits&&(e.style===hd.DISPLAY||d.alwaysHandleSupSub)||d&&d.type==="operatorname"&&d.alwaysHandleSupSub&&(d.limits||e.style===hd.DISPLAY)?o="munder":o="msub"}else{var s=t.base;s&&s.type==="op"&&s.limits&&(e.style===hd.DISPLAY||s.alwaysHandleSupSub)||s&&s.type==="operatorname"&&s.alwaysHandleSupSub&&(s.limits||e.style===hd.DISPLAY)?o="mover":o="msup"}return new gu.MathNode(o,a)}});l6({type:"atom",htmlBuilder(t,e){return Ds.mathsym(t.text,t.mode,e,["m"+t.family])},mathmlBuilder(t,e){var r=new gu.MathNode("mo",[uA(t.text,t.mode)]);if(t.family==="bin"){var n=Y1e(t,e);n==="bold-italic"&&r.setAttribute("mathvariant",n)}else t.family==="punct"?r.setAttribute("separator","true"):(t.family==="open"||t.family==="close")&&r.setAttribute("stretchy","false");return r}});var LZe={mi:"italic",mn:"normal",mtext:"normal"};l6({type:"mathord",htmlBuilder(t,e){return Ds.makeOrd(t,e,"mathord")},mathmlBuilder(t,e){var r=new gu.MathNode("mi",[uA(t.text,t.mode,e)]),n=Y1e(t,e)||"italic";return n!==LZe[r.type]&&r.setAttribute("mathvariant",n),r}});l6({type:"textord",htmlBuilder(t,e){return Ds.makeOrd(t,e,"textord")},mathmlBuilder(t,e){var r=uA(t.text,t.mode,e),n=Y1e(t,e)||"normal",i;return t.mode==="text"?i=new gu.MathNode("mtext",[r]):/[0-9]/.test(t.text)?i=new gu.MathNode("mn",[r]):t.text==="\\prime"?i=new gu.MathNode("mo",[r]):i=new gu.MathNode("mi",[r]),n!==LZe[i.type]&&i.setAttribute("mathvariant",n),i}});var nse={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},ise={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};l6({type:"spacing",htmlBuilder(t,e){if(ise.hasOwnProperty(t.text)){var r=ise[t.text].className||"";if(t.mode==="text"){var n=Ds.makeOrd(t,e,"textord");return n.classes.push(r),n}else return Ds.makeSpan(["mspace",r],[Ds.mathsym(t.text,t.mode,e)],e)}else{if(nse.hasOwnProperty(t.text))return Ds.makeSpan(["mspace",nse[t.text]],[],e);throw new Eu('Unknown type of space "'+t.text+'"')}},mathmlBuilder(t,e){var r;if(ise.hasOwnProperty(t.text))r=new gu.MathNode("mtext",[new gu.TextNode(" ")]);else{if(nse.hasOwnProperty(t.text))return new gu.MathNode("mspace");throw new Eu('Unknown type of space "'+t.text+'"')}return r}});var RLe=()=>{var t=new gu.MathNode("mtd",[]);return t.setAttribute("width","50%"),t};l6({type:"tag",mathmlBuilder(t,e){var r=new gu.MathNode("mtable",[new gu.MathNode("mtr",[RLe(),new gu.MathNode("mtd",[l4(t.body,e)]),RLe(),new gu.MathNode("mtd",[l4(t.tag,e)])])]);return r.setAttribute("width","100%"),r}});var kLe={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},ILe={"\\textbf":"textbf","\\textmd":"textmd"},qvr={"\\textit":"textit","\\textup":"textup"},PLe=(t,e)=>{var r=t.font;if(r){if(kLe[r])return e.withTextFontFamily(kLe[r]);if(ILe[r])return e.withTextFontWeight(ILe[r]);if(r==="\\emph")return e.fontShape==="textit"?e.withTextFontShape("textup"):e.withTextFontShape("textit")}else return e;return e.withTextFontShape(qvr[r])};kc({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"text",mode:r.mode,body:J1(i),font:n}},htmlBuilder(t,e){var r=PLe(t,e),n=vx(t.body,r,!0);return Ds.makeSpan(["mord","text"],n,r)},mathmlBuilder(t,e){var r=PLe(t,e);return l4(t.body,r)}});kc({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"underline",mode:r.mode,body:e[0]}},htmlBuilder(t,e){var r=Xv(t.body,e),n=Ds.makeLineSpan("underline-line",e),i=e.fontMetrics().defaultRuleThickness,a=Ds.makeVList({positionType:"top",positionData:r.height,children:[{type:"kern",size:i},{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:r}]},e);return Ds.makeSpan(["mord","underline"],[a],e)},mathmlBuilder(t,e){var r=new gu.MathNode("mo",[new gu.TextNode("‾")]);r.setAttribute("stretchy","true");var n=new gu.MathNode("munder",[Qg(t.body,e),r]);return n.setAttribute("accentunder","true"),n}});kc({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(t,e){var{parser:r}=t;return{type:"vcenter",mode:r.mode,body:e[0]}},htmlBuilder(t,e){var r=Xv(t.body,e),n=e.fontMetrics().axisHeight,i=.5*(r.height-n-(r.depth+n));return Ds.makeVList({positionType:"shift",positionData:i,children:[{type:"elem",elem:r}]},e)},mathmlBuilder(t,e){return new gu.MathNode("mpadded",[Qg(t.body,e)],["vcenter"])}});kc({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(t,e,r){throw new Eu("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(t,e){for(var r=DLe(t),n=[],i=e.havingStyle(e.style.text()),a=0;a<r.length;a++){var o=r[a];o==="~"&&(o="\\textasciitilde"),n.push(Ds.makeSymbol(o,"Typewriter-Regular",t.mode,i,["mord","texttt"]))}return Ds.makeSpan(["mord","text"].concat(i.sizingClasses(e)),Ds.tryCombineChars(n),i)},mathmlBuilder(t,e){var r=new gu.TextNode(DLe(t)),n=new gu.MathNode("mtext",[r]);return n.setAttribute("mathvariant","monospace"),n}});var DLe=t=>t.body.replace(/ /g,t.star?"␣":" "),BP=nZe,OZe=`[ \r
	]`,Gvr="\\\\[a-zA-Z@]+",$vr="\\\\[^\uD800-\uDFFF]",Wvr="("+Gvr+")"+OZe+"*",Yvr=`\\\\(
|[ \r	]+
?)[ \r	]*`,Sve="[̀-ͯ]",Xvr=new RegExp(Sve+"+$"),Zvr="("+OZe+"+)|"+(Yvr+"|")+"([!-\\[\\]-‧‪-퟿豈-]"+(Sve+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(Sve+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+Wvr)+("|"+$vr+")");class LLe{constructor(e,r){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=r,this.tokenRegex=new RegExp(Zvr,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,r){this.catcodes[e]=r}lex(){var e=this.input,r=this.tokenRegex.lastIndex;if(r===e.length)return new eA("EOF",new JT(this,r,r));var n=this.tokenRegex.exec(e);if(n===null||n.index!==r)throw new Eu("Unexpected character: '"+e[r]+"'",new eA(e[r],new JT(this,r,r+1)));var i=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[i]===14){var a=e.indexOf(`
`,this.tokenRegex.lastIndex);return a===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=a+1,this.lex()}return new eA(i,new JT(this,r,this.tokenRegex.lastIndex))}}class Kvr{constructor(e,r){e===void 0&&(e={}),r===void 0&&(r={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=r,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new Eu("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var r in e)e.hasOwnProperty(r)&&(e[r]==null?delete this.current[r]:this.current[r]=e[r])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,r,n){if(n===void 0&&(n=!1),n){for(var i=0;i<this.undefStack.length;i++)delete this.undefStack[i][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=r)}else{var a=this.undefStack[this.undefStack.length-1];a&&!a.hasOwnProperty(e)&&(a[e]=this.current[e])}r==null?delete this.current[e]:this.current[e]=r}}var Jvr=TZe;Qi("\\noexpand",function(t){var e=t.popToken();return t.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});Qi("\\expandafter",function(t){var e=t.popToken();return t.expandOnce(!0),{tokens:[e],numArgs:0}});Qi("\\@firstoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[0],numArgs:0}});Qi("\\@secondoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[1],numArgs:0}});Qi("\\@ifnextchar",function(t){var e=t.consumeArgs(3);t.consumeSpaces();var r=t.future();return e[0].length===1&&e[0][0].text===r.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});Qi("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");Qi("\\TextOrMath",function(t){var e=t.consumeArgs(2);return t.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var OLe={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};Qi("\\char",function(t){var e=t.popToken(),r,n="";if(e.text==="'")r=8,e=t.popToken();else if(e.text==='"')r=16,e=t.popToken();else if(e.text==="`")if(e=t.popToken(),e.text[0]==="\\")n=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new Eu("\\char` missing argument");n=e.text.charCodeAt(0)}else r=10;if(r){if(n=OLe[e.text],n==null||n>=r)throw new Eu("Invalid base-"+r+" digit "+e.text);for(var i;(i=OLe[t.future().text])!=null&&i<r;)n*=r,n+=i,t.popToken()}return"\\@char{"+n+"}"});var ibe=(t,e,r,n)=>{var i=t.consumeArg().tokens;if(i.length!==1)throw new Eu("\\newcommand's first argument must be a macro name");var a=i[0].text,o=t.isDefined(a);if(o&&!e)throw new Eu("\\newcommand{"+a+"} attempting to redefine "+(a+"; use \\renewcommand"));if(!o&&!r)throw new Eu("\\renewcommand{"+a+"} when command "+a+" does not yet exist; use \\newcommand");var s=0;if(i=t.consumeArg().tokens,i.length===1&&i[0].text==="["){for(var d="",b=t.expandNextToken();b.text!=="]"&&b.text!=="EOF";)d+=b.text,b=t.expandNextToken();if(!d.match(/^\s*[0-9]+\s*$/))throw new Eu("Invalid number of arguments: "+d);s=parseInt(d),i=t.consumeArg().tokens}return o&&n||t.macros.set(a,{tokens:i,numArgs:s}),""};Qi("\\newcommand",t=>ibe(t,!1,!0,!1));Qi("\\renewcommand",t=>ibe(t,!0,!1,!1));Qi("\\providecommand",t=>ibe(t,!0,!0,!0));Qi("\\message",t=>{var e=t.consumeArgs(1)[0];return console.log(e.reverse().map(r=>r.text).join("")),""});Qi("\\errmessage",t=>{var e=t.consumeArgs(1)[0];return console.error(e.reverse().map(r=>r.text).join("")),""});Qi("\\show",t=>{var e=t.popToken(),r=e.text;return console.log(e,t.macros.get(r),BP[r],h0.math[r],h0.text[r]),""});Qi("\\bgroup","{");Qi("\\egroup","}");Qi("~","\\nobreakspace");Qi("\\lq","`");Qi("\\rq","'");Qi("\\aa","\\r a");Qi("\\AA","\\r A");Qi("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");Qi("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");Qi("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");Qi("ℬ","\\mathscr{B}");Qi("ℰ","\\mathscr{E}");Qi("ℱ","\\mathscr{F}");Qi("ℋ","\\mathscr{H}");Qi("ℐ","\\mathscr{I}");Qi("ℒ","\\mathscr{L}");Qi("ℳ","\\mathscr{M}");Qi("ℛ","\\mathscr{R}");Qi("ℭ","\\mathfrak{C}");Qi("ℌ","\\mathfrak{H}");Qi("ℨ","\\mathfrak{Z}");Qi("\\Bbbk","\\Bbb{k}");Qi("·","\\cdotp");Qi("\\llap","\\mathllap{\\textrm{#1}}");Qi("\\rlap","\\mathrlap{\\textrm{#1}}");Qi("\\clap","\\mathclap{\\textrm{#1}}");Qi("\\mathstrut","\\vphantom{(}");Qi("\\underbar","\\underline{\\text{#1}}");Qi("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');Qi("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");Qi("\\ne","\\neq");Qi("≠","\\neq");Qi("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");Qi("∉","\\notin");Qi("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");Qi("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");Qi("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");Qi("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");Qi("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");Qi("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");Qi("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");Qi("⟂","\\perp");Qi("‼","\\mathclose{!\\mkern-0.8mu!}");Qi("∌","\\notni");Qi("⌜","\\ulcorner");Qi("⌝","\\urcorner");Qi("⌞","\\llcorner");Qi("⌟","\\lrcorner");Qi("©","\\copyright");Qi("®","\\textregistered");Qi("️","\\textregistered");Qi("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');Qi("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');Qi("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');Qi("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');Qi("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");Qi("⋮","\\vdots");Qi("\\varGamma","\\mathit{\\Gamma}");Qi("\\varDelta","\\mathit{\\Delta}");Qi("\\varTheta","\\mathit{\\Theta}");Qi("\\varLambda","\\mathit{\\Lambda}");Qi("\\varXi","\\mathit{\\Xi}");Qi("\\varPi","\\mathit{\\Pi}");Qi("\\varSigma","\\mathit{\\Sigma}");Qi("\\varUpsilon","\\mathit{\\Upsilon}");Qi("\\varPhi","\\mathit{\\Phi}");Qi("\\varPsi","\\mathit{\\Psi}");Qi("\\varOmega","\\mathit{\\Omega}");Qi("\\substack","\\begin{subarray}{c}#1\\end{subarray}");Qi("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");Qi("\\boxed","\\fbox{$\\displaystyle{#1}$}");Qi("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");Qi("\\implies","\\DOTSB\\;\\Longrightarrow\\;");Qi("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");Qi("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");Qi("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var NLe={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};Qi("\\dots",function(t){var e="\\dotso",r=t.expandAfterFuture().text;return r in NLe?e=NLe[r]:(r.slice(0,4)==="\\not"||r in h0.math&&Kf.contains(["bin","rel"],h0.math[r].group))&&(e="\\dotsb"),e});var abe={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};Qi("\\dotso",function(t){var e=t.future().text;return e in abe?"\\ldots\\,":"\\ldots"});Qi("\\dotsc",function(t){var e=t.future().text;return e in abe&&e!==","?"\\ldots\\,":"\\ldots"});Qi("\\cdots",function(t){var e=t.future().text;return e in abe?"\\@cdots\\,":"\\@cdots"});Qi("\\dotsb","\\cdots");Qi("\\dotsm","\\cdots");Qi("\\dotsi","\\!\\cdots");Qi("\\dotsx","\\ldots\\,");Qi("\\DOTSI","\\relax");Qi("\\DOTSB","\\relax");Qi("\\DOTSX","\\relax");Qi("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");Qi("\\,","\\tmspace+{3mu}{.1667em}");Qi("\\thinspace","\\,");Qi("\\>","\\mskip{4mu}");Qi("\\:","\\tmspace+{4mu}{.2222em}");Qi("\\medspace","\\:");Qi("\\;","\\tmspace+{5mu}{.2777em}");Qi("\\thickspace","\\;");Qi("\\!","\\tmspace-{3mu}{.1667em}");Qi("\\negthinspace","\\!");Qi("\\negmedspace","\\tmspace-{4mu}{.2222em}");Qi("\\negthickspace","\\tmspace-{5mu}{.277em}");Qi("\\enspace","\\kern.5em ");Qi("\\enskip","\\hskip.5em\\relax");Qi("\\quad","\\hskip1em\\relax");Qi("\\qquad","\\hskip2em\\relax");Qi("\\tag","\\@ifstar\\tag@literal\\tag@paren");Qi("\\tag@paren","\\tag@literal{({#1})}");Qi("\\tag@literal",t=>{if(t.macros.get("\\df@tag"))throw new Eu("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});Qi("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");Qi("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");Qi("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");Qi("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");Qi("\\newline","\\\\\\relax");Qi("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var NZe=nc(C5["Main-Regular"][84][1]-.7*C5["Main-Regular"][65][1]);Qi("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+NZe+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");Qi("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+NZe+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");Qi("\\hspace","\\@ifstar\\@hspacer\\@hspace");Qi("\\@hspace","\\hskip #1\\relax");Qi("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");Qi("\\ordinarycolon",":");Qi("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");Qi("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');Qi("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');Qi("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');Qi("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');Qi("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');Qi("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');Qi("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');Qi("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');Qi("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');Qi("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');Qi("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');Qi("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');Qi("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');Qi("∷","\\dblcolon");Qi("∹","\\eqcolon");Qi("≔","\\coloneqq");Qi("≕","\\eqqcolon");Qi("⩴","\\Coloneqq");Qi("\\ratio","\\vcentcolon");Qi("\\coloncolon","\\dblcolon");Qi("\\colonequals","\\coloneqq");Qi("\\coloncolonequals","\\Coloneqq");Qi("\\equalscolon","\\eqqcolon");Qi("\\equalscoloncolon","\\Eqqcolon");Qi("\\colonminus","\\coloneq");Qi("\\coloncolonminus","\\Coloneq");Qi("\\minuscolon","\\eqcolon");Qi("\\minuscoloncolon","\\Eqcolon");Qi("\\coloncolonapprox","\\Colonapprox");Qi("\\coloncolonsim","\\Colonsim");Qi("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");Qi("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");Qi("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");Qi("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");Qi("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");Qi("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");Qi("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");Qi("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");Qi("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");Qi("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");Qi("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");Qi("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");Qi("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");Qi("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");Qi("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");Qi("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");Qi("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");Qi("\\nleqq","\\html@mathml{\\@nleqq}{≰}");Qi("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");Qi("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");Qi("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");Qi("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");Qi("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");Qi("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");Qi("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");Qi("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");Qi("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");Qi("\\imath","\\html@mathml{\\@imath}{ı}");Qi("\\jmath","\\html@mathml{\\@jmath}{ȷ}");Qi("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");Qi("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");Qi("⟦","\\llbracket");Qi("⟧","\\rrbracket");Qi("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");Qi("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");Qi("⦃","\\lBrace");Qi("⦄","\\rBrace");Qi("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");Qi("⦵","\\minuso");Qi("\\darr","\\downarrow");Qi("\\dArr","\\Downarrow");Qi("\\Darr","\\Downarrow");Qi("\\lang","\\langle");Qi("\\rang","\\rangle");Qi("\\uarr","\\uparrow");Qi("\\uArr","\\Uparrow");Qi("\\Uarr","\\Uparrow");Qi("\\N","\\mathbb{N}");Qi("\\R","\\mathbb{R}");Qi("\\Z","\\mathbb{Z}");Qi("\\alef","\\aleph");Qi("\\alefsym","\\aleph");Qi("\\Alpha","\\mathrm{A}");Qi("\\Beta","\\mathrm{B}");Qi("\\bull","\\bullet");Qi("\\Chi","\\mathrm{X}");Qi("\\clubs","\\clubsuit");Qi("\\cnums","\\mathbb{C}");Qi("\\Complex","\\mathbb{C}");Qi("\\Dagger","\\ddagger");Qi("\\diamonds","\\diamondsuit");Qi("\\empty","\\emptyset");Qi("\\Epsilon","\\mathrm{E}");Qi("\\Eta","\\mathrm{H}");Qi("\\exist","\\exists");Qi("\\harr","\\leftrightarrow");Qi("\\hArr","\\Leftrightarrow");Qi("\\Harr","\\Leftrightarrow");Qi("\\hearts","\\heartsuit");Qi("\\image","\\Im");Qi("\\infin","\\infty");Qi("\\Iota","\\mathrm{I}");Qi("\\isin","\\in");Qi("\\Kappa","\\mathrm{K}");Qi("\\larr","\\leftarrow");Qi("\\lArr","\\Leftarrow");Qi("\\Larr","\\Leftarrow");Qi("\\lrarr","\\leftrightarrow");Qi("\\lrArr","\\Leftrightarrow");Qi("\\Lrarr","\\Leftrightarrow");Qi("\\Mu","\\mathrm{M}");Qi("\\natnums","\\mathbb{N}");Qi("\\Nu","\\mathrm{N}");Qi("\\Omicron","\\mathrm{O}");Qi("\\plusmn","\\pm");Qi("\\rarr","\\rightarrow");Qi("\\rArr","\\Rightarrow");Qi("\\Rarr","\\Rightarrow");Qi("\\real","\\Re");Qi("\\reals","\\mathbb{R}");Qi("\\Reals","\\mathbb{R}");Qi("\\Rho","\\mathrm{P}");Qi("\\sdot","\\cdot");Qi("\\sect","\\S");Qi("\\spades","\\spadesuit");Qi("\\sub","\\subset");Qi("\\sube","\\subseteq");Qi("\\supe","\\supseteq");Qi("\\Tau","\\mathrm{T}");Qi("\\thetasym","\\vartheta");Qi("\\weierp","\\wp");Qi("\\Zeta","\\mathrm{Z}");Qi("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");Qi("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");Qi("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");Qi("\\bra","\\mathinner{\\langle{#1}|}");Qi("\\ket","\\mathinner{|{#1}\\rangle}");Qi("\\braket","\\mathinner{\\langle{#1}\\rangle}");Qi("\\Bra","\\left\\langle#1\\right|");Qi("\\Ket","\\left|#1\\right\\rangle");var FZe=t=>e=>{var r=e.consumeArg().tokens,n=e.consumeArg().tokens,i=e.consumeArg().tokens,a=e.consumeArg().tokens,o=e.macros.get("|"),s=e.macros.get("\\|");e.macros.beginGroup();var d=B=>V=>{t&&(V.macros.set("|",o),i.length&&V.macros.set("\\|",s));var X=B;if(!B&&i.length){var ie=V.future();ie.text==="|"&&(V.popToken(),X=!0)}return{tokens:X?i:n,numArgs:0}};e.macros.set("|",d(!1)),i.length&&e.macros.set("\\|",d(!0));var b=e.consumeArg().tokens,L=e.expandTokens([...a,...b,...r]);return e.macros.endGroup(),{tokens:L.reverse(),numArgs:0}};Qi("\\bra@ket",FZe(!1));Qi("\\bra@set",FZe(!0));Qi("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");Qi("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");Qi("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");Qi("\\angln","{\\angl n}");Qi("\\blue","\\textcolor{##6495ed}{#1}");Qi("\\orange","\\textcolor{##ffa500}{#1}");Qi("\\pink","\\textcolor{##ff00af}{#1}");Qi("\\red","\\textcolor{##df0030}{#1}");Qi("\\green","\\textcolor{##28ae7b}{#1}");Qi("\\gray","\\textcolor{gray}{#1}");Qi("\\purple","\\textcolor{##9d38bd}{#1}");Qi("\\blueA","\\textcolor{##ccfaff}{#1}");Qi("\\blueB","\\textcolor{##80f6ff}{#1}");Qi("\\blueC","\\textcolor{##63d9ea}{#1}");Qi("\\blueD","\\textcolor{##11accd}{#1}");Qi("\\blueE","\\textcolor{##0c7f99}{#1}");Qi("\\tealA","\\textcolor{##94fff5}{#1}");Qi("\\tealB","\\textcolor{##26edd5}{#1}");Qi("\\tealC","\\textcolor{##01d1c1}{#1}");Qi("\\tealD","\\textcolor{##01a995}{#1}");Qi("\\tealE","\\textcolor{##208170}{#1}");Qi("\\greenA","\\textcolor{##b6ffb0}{#1}");Qi("\\greenB","\\textcolor{##8af281}{#1}");Qi("\\greenC","\\textcolor{##74cf70}{#1}");Qi("\\greenD","\\textcolor{##1fab54}{#1}");Qi("\\greenE","\\textcolor{##0d923f}{#1}");Qi("\\goldA","\\textcolor{##ffd0a9}{#1}");Qi("\\goldB","\\textcolor{##ffbb71}{#1}");Qi("\\goldC","\\textcolor{##ff9c39}{#1}");Qi("\\goldD","\\textcolor{##e07d10}{#1}");Qi("\\goldE","\\textcolor{##a75a05}{#1}");Qi("\\redA","\\textcolor{##fca9a9}{#1}");Qi("\\redB","\\textcolor{##ff8482}{#1}");Qi("\\redC","\\textcolor{##f9685d}{#1}");Qi("\\redD","\\textcolor{##e84d39}{#1}");Qi("\\redE","\\textcolor{##bc2612}{#1}");Qi("\\maroonA","\\textcolor{##ffbde0}{#1}");Qi("\\maroonB","\\textcolor{##ff92c6}{#1}");Qi("\\maroonC","\\textcolor{##ed5fa6}{#1}");Qi("\\maroonD","\\textcolor{##ca337c}{#1}");Qi("\\maroonE","\\textcolor{##9e034e}{#1}");Qi("\\purpleA","\\textcolor{##ddd7ff}{#1}");Qi("\\purpleB","\\textcolor{##c6b9fc}{#1}");Qi("\\purpleC","\\textcolor{##aa87ff}{#1}");Qi("\\purpleD","\\textcolor{##7854ab}{#1}");Qi("\\purpleE","\\textcolor{##543b78}{#1}");Qi("\\mintA","\\textcolor{##f5f9e8}{#1}");Qi("\\mintB","\\textcolor{##edf2df}{#1}");Qi("\\mintC","\\textcolor{##e0e5cc}{#1}");Qi("\\grayA","\\textcolor{##f6f7f7}{#1}");Qi("\\grayB","\\textcolor{##f0f1f2}{#1}");Qi("\\grayC","\\textcolor{##e3e5e6}{#1}");Qi("\\grayD","\\textcolor{##d6d8da}{#1}");Qi("\\grayE","\\textcolor{##babec2}{#1}");Qi("\\grayF","\\textcolor{##888d93}{#1}");Qi("\\grayG","\\textcolor{##626569}{#1}");Qi("\\grayH","\\textcolor{##3b3e40}{#1}");Qi("\\grayI","\\textcolor{##21242c}{#1}");Qi("\\kaBlue","\\textcolor{##314453}{#1}");Qi("\\kaGreen","\\textcolor{##71B307}{#1}");var zZe={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class Qvr{constructor(e,r,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=r,this.expansionCount=0,this.feed(e),this.macros=new Kvr(Jvr,r.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new LLe(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var r,n,i;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;r=this.popToken(),{tokens:i,end:n}=this.consumeArg(["]"])}else({tokens:i,start:r,end:n}=this.consumeArg());return this.pushToken(new eA("EOF",n.loc)),this.pushTokens(i),r.range(n,"")}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var r=[],n=e&&e.length>0;n||this.consumeSpaces();var i=this.future(),a,o=0,s=0;do{if(a=this.popToken(),r.push(a),a.text==="{")++o;else if(a.text==="}"){if(--o,o===-1)throw new Eu("Extra }",a)}else if(a.text==="EOF")throw new Eu("Unexpected end of input in a macro argument, expected '"+(e&&n?e[s]:"}")+"'",a);if(e&&n)if((o===0||o===1&&e[s]==="{")&&a.text===e[s]){if(++s,s===e.length){r.splice(-s,s);break}}else s=0}while(o!==0||n);return i.text==="{"&&r[r.length-1].text==="}"&&(r.pop(),r.shift()),r.reverse(),{tokens:r,start:i,end:a}}consumeArgs(e,r){if(r){if(r.length!==e+1)throw new Eu("The length of delimiters doesn't match the number of args!");for(var n=r[0],i=0;i<n.length;i++){var a=this.popToken();if(n[i]!==a.text)throw new Eu("Use of the macro doesn't match its definition",a)}}for(var o=[],s=0;s<e;s++)o.push(this.consumeArg(r&&r[s+1]).tokens);return o}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new Eu("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var r=this.popToken(),n=r.text,i=r.noexpand?null:this._getExpansion(n);if(i==null||e&&i.unexpandable){if(e&&i==null&&n[0]==="\\"&&!this.isDefined(n))throw new Eu("Undefined control sequence: "+n);return this.pushToken(r),!1}this.countExpansion(1);var a=i.tokens,o=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs){a=a.slice();for(var s=a.length-1;s>=0;--s){var d=a[s];if(d.text==="#"){if(s===0)throw new Eu("Incomplete placeholder at end of macro body",d);if(d=a[--s],d.text==="#")a.splice(s+1,1);else if(/^[1-9]$/.test(d.text))a.splice(s,2,...o[+d.text-1]);else throw new Eu("Not a valid argument number",d)}}}return this.pushTokens(a),a.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new eA(e)]):void 0}expandTokens(e){var r=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var i=this.stack.pop();i.treatAsRelax&&(i.noexpand=!1,i.treatAsRelax=!1),r.push(i)}return this.countExpansion(r.length),r}expandMacroAsText(e){var r=this.expandMacro(e);return r&&r.map(n=>n.text).join("")}_getExpansion(e){var r=this.macros.get(e);if(r==null)return r;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var i=typeof r=="function"?r(this):r;if(typeof i=="string"){var a=0;if(i.indexOf("#")!==-1)for(var o=i.replace(/##/g,"");o.indexOf("#"+(a+1))!==-1;)++a;for(var s=new LLe(i,this.settings),d=[],b=s.lex();b.text!=="EOF";)d.push(b),b=s.lex();d.reverse();var L={tokens:d,numArgs:a};return L}return i}isDefined(e){return this.macros.has(e)||BP.hasOwnProperty(e)||h0.math.hasOwnProperty(e)||h0.text.hasOwnProperty(e)||zZe.hasOwnProperty(e)}isExpandable(e){var r=this.macros.get(e);return r!=null?typeof r=="string"||typeof r=="function"||!r.unexpandable:BP.hasOwnProperty(e)&&!BP[e].primitive}}var FLe=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Vq=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),ase={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},zLe={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class LZ{constructor(e,r){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Qvr(e,r,this.mode),this.settings=r,this.leftrightDepth=0}expect(e,r){if(r===void 0&&(r=!0),this.fetch().text!==e)throw new Eu("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());r&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var r=this.nextToken;this.consume(),this.gullet.pushToken(new eA("}")),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=r,n}parseExpression(e,r){for(var n=[];;){this.mode==="math"&&this.consumeSpaces();var i=this.fetch();if(LZ.endOfExpression.indexOf(i.text)!==-1||r&&i.text===r||e&&BP[i.text]&&BP[i.text].infix)break;var a=this.parseAtom(r);if(a){if(a.type==="internal")continue}else break;n.push(a)}return this.mode==="text"&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(e){for(var r=-1,n,i=0;i<e.length;i++)if(e[i].type==="infix"){if(r!==-1)throw new Eu("only one infix operator per group",e[i].token);r=i,n=e[i].replaceWith}if(r!==-1&&n){var a,o,s=e.slice(0,r),d=e.slice(r+1);s.length===1&&s[0].type==="ordgroup"?a=s[0]:a={type:"ordgroup",mode:this.mode,body:s},d.length===1&&d[0].type==="ordgroup"?o=d[0]:o={type:"ordgroup",mode:this.mode,body:d};var b;return n==="\\\\abovefrac"?b=this.callFunction(n,[a,e[r],o],[]):b=this.callFunction(n,[a,o],[]),[b]}else return e}handleSupSubscript(e){var r=this.fetch(),n=r.text;this.consume(),this.consumeSpaces();var i;do{var a;i=this.parseGroup(e)}while(((a=i)==null?void 0:a.type)==="internal");if(!i)throw new Eu("Expected group after '"+n+"'",r);return i}formatUnsupportedCmd(e){for(var r=[],n=0;n<e.length;n++)r.push({type:"textord",mode:"text",text:e[n]});var i={type:"text",mode:this.mode,body:r},a={type:"color",mode:this.mode,color:this.settings.errorColor,body:[i]};return a}parseAtom(e){var r=this.parseGroup("atom",e);if(r?.type==="internal"||this.mode==="text")return r;for(var n,i;;){this.consumeSpaces();var a=this.fetch();if(a.text==="\\limits"||a.text==="\\nolimits"){if(r&&r.type==="op"){var o=a.text==="\\limits";r.limits=o,r.alwaysHandleSupSub=!0}else if(r&&r.type==="operatorname")r.alwaysHandleSupSub&&(r.limits=a.text==="\\limits");else throw new Eu("Limit controls must follow a math operator",a);this.consume()}else if(a.text==="^"){if(n)throw new Eu("Double superscript",a);n=this.handleSupSubscript("superscript")}else if(a.text==="_"){if(i)throw new Eu("Double subscript",a);i=this.handleSupSubscript("subscript")}else if(a.text==="'"){if(n)throw new Eu("Double superscript",a);var s={type:"textord",mode:this.mode,text:"\\prime"},d=[s];for(this.consume();this.fetch().text==="'";)d.push(s),this.consume();this.fetch().text==="^"&&d.push(this.handleSupSubscript("superscript")),n={type:"ordgroup",mode:this.mode,body:d}}else if(Vq[a.text]){var b=FLe.test(a.text),L=[];for(L.push(new eA(Vq[a.text])),this.consume();;){var B=this.fetch().text;if(!Vq[B]||FLe.test(B)!==b)break;L.unshift(new eA(Vq[B])),this.consume()}var V=this.subparse(L);b?i={type:"ordgroup",mode:"math",body:V}:n={type:"ordgroup",mode:"math",body:V}}else break}return n||i?{type:"supsub",mode:this.mode,base:r,sup:n,sub:i}:r}parseFunction(e,r){var n=this.fetch(),i=n.text,a=BP[i];if(!a)return null;if(this.consume(),r&&r!=="atom"&&!a.allowedInArgument)throw new Eu("Got function '"+i+"' with no arguments"+(r?" as "+r:""),n);if(this.mode==="text"&&!a.allowedInText)throw new Eu("Can't use function '"+i+"' in text mode",n);if(this.mode==="math"&&a.allowedInMath===!1)throw new Eu("Can't use function '"+i+"' in math mode",n);var{args:o,optArgs:s}=this.parseArguments(i,a);return this.callFunction(i,o,s,n,e)}callFunction(e,r,n,i,a){var o={funcName:e,parser:this,token:i,breakOnTokenText:a},s=BP[e];if(s&&s.handler)return s.handler(o,r,n);throw new Eu("No function handler for "+e)}parseArguments(e,r){var n=r.numArgs+r.numOptionalArgs;if(n===0)return{args:[],optArgs:[]};for(var i=[],a=[],o=0;o<n;o++){var s=r.argTypes&&r.argTypes[o],d=o<r.numOptionalArgs;(r.primitive&&s==null||r.type==="sqrt"&&o===1&&a[0]==null)&&(s="primitive");var b=this.parseGroupOfType("argument to '"+e+"'",s,d);if(d)a.push(b);else if(b!=null)i.push(b);else throw new Eu("Null argument, please report this as a bug")}return{args:i,optArgs:a}}parseGroupOfType(e,r,n){switch(r){case"color":return this.parseColorGroup(n);case"size":return this.parseSizeGroup(n);case"url":return this.parseUrlGroup(n);case"math":case"text":return this.parseArgumentGroup(n,r);case"hbox":{var i=this.parseArgumentGroup(n,"text");return i!=null?{type:"styling",mode:i.mode,body:[i],style:"text"}:null}case"raw":{var a=this.parseStringGroup("raw",n);return a!=null?{type:"raw",mode:"text",string:a.text}:null}case"primitive":{if(n)throw new Eu("A primitive argument cannot be optional");var o=this.parseGroup(e);if(o==null)throw new Eu("Expected group as "+e,this.fetch());return o}case"original":case null:case void 0:return this.parseArgumentGroup(n);default:throw new Eu("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;this.fetch().text===" ";)this.consume()}parseStringGroup(e,r){var n=this.gullet.scanArgument(r);if(n==null)return null;for(var i="",a;(a=this.fetch()).text!=="EOF";)i+=a.text,this.consume();return this.consume(),n.text=i,n}parseRegexGroup(e,r){for(var n=this.fetch(),i=n,a="",o;(o=this.fetch()).text!=="EOF"&&e.test(a+o.text);)i=o,a+=i.text,this.consume();if(a==="")throw new Eu("Invalid "+r+": '"+n.text+"'",n);return n.range(i,a)}parseColorGroup(e){var r=this.parseStringGroup("color",e);if(r==null)return null;var n=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(r.text);if(!n)throw new Eu("Invalid color: '"+r.text+"'",r);var i=n[0];return/^[0-9a-f]{6}$/i.test(i)&&(i="#"+i),{type:"color-token",mode:this.mode,color:i}}parseSizeGroup(e){var r,n=!1;if(this.gullet.consumeSpaces(),!e&&this.gullet.future().text!=="{"?r=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):r=this.parseStringGroup("size",e),!r)return null;!e&&r.text.length===0&&(r.text="0pt",n=!0);var i=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(r.text);if(!i)throw new Eu("Invalid size: '"+r.text+"'",r);var a={number:+(i[1]+i[2]),unit:i[3]};if(!YXe(a))throw new Eu("Invalid unit: '"+a.unit+"'",r);return{type:"size",mode:this.mode,value:a,isBlank:n}}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var r=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),r==null)return null;var n=r.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:n}}parseArgumentGroup(e,r){var n=this.gullet.scanArgument(e);if(n==null)return null;var i=this.mode;r&&this.switchMode(r),this.gullet.beginGroup();var a=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var o={type:"ordgroup",mode:this.mode,loc:n.loc,body:a};return r&&this.switchMode(i),o}parseGroup(e,r){var n=this.fetch(),i=n.text,a;if(i==="{"||i==="\\begingroup"){this.consume();var o=i==="{"?"}":"\\endgroup";this.gullet.beginGroup();var s=this.parseExpression(!1,o),d=this.fetch();this.expect(o),this.gullet.endGroup(),a={type:"ordgroup",mode:this.mode,loc:JT.range(n,d),body:s,semisimple:i==="\\begingroup"||void 0}}else if(a=this.parseFunction(r,e)||this.parseSymbol(),a==null&&i[0]==="\\"&&!zZe.hasOwnProperty(i)){if(this.settings.throwOnError)throw new Eu("Undefined control sequence: "+i,n);a=this.formatUnsupportedCmd(i),this.consume()}return a}formLigatures(e){for(var r=e.length-1,n=0;n<r;++n){var i=e[n],a=i.text;a==="-"&&e[n+1].text==="-"&&(n+1<r&&e[n+2].text==="-"?(e.splice(n,3,{type:"textord",mode:"text",loc:JT.range(i,e[n+2]),text:"---"}),r-=2):(e.splice(n,2,{type:"textord",mode:"text",loc:JT.range(i,e[n+1]),text:"--"}),r-=1)),(a==="'"||a==="`")&&e[n+1].text===a&&(e.splice(n,2,{type:"textord",mode:"text",loc:JT.range(i,e[n+1]),text:a+a}),r-=1)}}parseSymbol(){var e=this.fetch(),r=e.text;if(/^\\verb[^a-zA-Z]/.test(r)){this.consume();var n=r.slice(5),i=n.charAt(0)==="*";if(i&&(n=n.slice(1)),n.length<2||n.charAt(0)!==n.slice(-1))throw new Eu(`\\verb assertion failed --
                    please report what input caused this bug`);return n=n.slice(1,-1),{type:"verb",mode:"text",body:n,star:i}}zLe.hasOwnProperty(r[0])&&!h0[this.mode][r[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+r[0]+'" used in math mode',e),r=zLe[r[0]]+r.slice(1));var a=Xvr.exec(r);a&&(r=r.substring(0,a.index),r==="i"?r="ı":r==="j"&&(r="ȷ"));var o;if(h0[this.mode][r]){this.settings.strict&&this.mode==="math"&&yve.indexOf(r)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+r[0]+'" used in math mode',e);var s=h0[this.mode][r].group,d=JT.range(e),b;if(Hpr.hasOwnProperty(s)){var L=s;b={type:"atom",mode:this.mode,family:L,loc:d,text:r}}else b={type:s,mode:this.mode,loc:d,text:r};o=b}else if(r.charCodeAt(0)>=128)this.settings.strict&&(WXe(r.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+r[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+r[0]+'"'+(" ("+r.charCodeAt(0)+")"),e)),o={type:"textord",mode:"text",loc:JT.range(e),text:r};else return null;if(this.consume(),a)for(var B=0;B<a[0].length;B++){var V=a[0][B];if(!ase[V])throw new Eu("Unknown accent ' "+V+"'",e);var X=ase[V][this.mode]||ase[V].text;if(!X)throw new Eu("Accent "+V+" unsupported in "+this.mode+" mode",e);o={type:"accent",mode:this.mode,loc:JT.range(e),label:X,isStretchy:!1,isShifty:!0,base:o}}return o}}LZ.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var obe=function(e,r){if(!(typeof e=="string"||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new LZ(e,r);delete n.gullet.macros.current["\\df@tag"];var i=n.parse();if(delete n.gullet.macros.current["\\current@color"],delete n.gullet.macros.current["\\color"],n.gullet.macros.get("\\df@tag")){if(!r.displayMode)throw new Eu("\\tag works only in display equations");i=[{type:"tag",mode:"text",body:i,tag:n.subparse([new eA("\\df@tag")])}]}return i},BZe=function(e,r,n){r.textContent="";var i=sbe(e,n).toNode();r.appendChild(i)};typeof document<"u"&&document.compatMode!=="CSS1Compat"&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),BZe=function(){throw new Eu("KaTeX doesn't work in quirks mode.")});var emr=function(e,r){var n=sbe(e,r).toMarkup();return n},tmr=function(e,r){var n=new j1e(r);return obe(e,n)},UZe=function(e,r,n){if(n.throwOnError||!(e instanceof Eu))throw e;var i=Ds.makeSpan(["katex-error"],[new lA(r)]);return i.setAttribute("title",e.toString()),i.setAttribute("style","color:"+n.errorColor),i},sbe=function(e,r){var n=new j1e(r);try{var i=obe(e,n);return cvr(i,e,n)}catch(a){return UZe(a,e,n)}},rmr=function(e,r){var n=new j1e(r);try{var i=obe(e,n);return fvr(i,e,n)}catch(a){return UZe(a,e,n)}},nmr="0.16.22",imr={Span:RU,Anchor:G1e,SymbolNode:lA,SvgNode:Ok,PathNode:s4,LineNode:gve},BLe={version:nmr,render:BZe,renderToString:emr,ParseError:Eu,SETTINGS_SCHEMA:BG,__parse:tmr,__renderToDomTree:sbe,__renderToHTMLTree:rmr,__setFontMetrics:Dpr,__defineSymbol:Qr,__defineFunction:kc,__defineMacro:Qi,__domTree:imr};const amr={};function omr(t){const e=this,r=t||amr,n=e.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),a=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(ipr(r)),a.push(Zhr()),o.push(Khr(r))}const ULe=/[#.]/g;function smr(t,e){const r=t||"",n={};let i=0,a,o;for(;i<r.length;){ULe.lastIndex=i;const s=ULe.exec(r),d=r.slice(i,s?s.index:r.length);d&&(a?a==="#"?n.id=d:Array.isArray(n.className)?n.className.push(d):n.className=[d]:o=d,i+=d.length),s&&(a=s[0],i++)}return{type:"element",tagName:o||e||"div",properties:n,children:[]}}function HZe(t,e,r){const n=r?fmr(r):void 0;function i(a,o,...s){let d;if(a==null){d={type:"root",children:[]};const b=o;s.unshift(b)}else{d=smr(a,e);const b=d.tagName.toLowerCase(),L=n?n.get(b):void 0;if(d.tagName=L||b,lmr(o))s.unshift(o);else for(const[B,V]of Object.entries(o))umr(t,d.properties,B,V)}for(const b of s)Tve(d.children,b);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return i}function lmr(t){if(t===null||typeof t!="object"||Array.isArray(t))return!0;if(typeof t.type!="string")return!1;const e=t,r=Object.keys(t);for(const n of r){const i=e[n];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const a=i;for(const o of a)if(typeof o!="number"&&typeof o!="string")return!0}}return!!("children"in t&&Array.isArray(t.children))}function umr(t,e,r,n){const i=vXe(t,r);let a;if(n!=null){if(typeof n=="number"){if(Number.isNaN(n))return;a=n}else typeof n=="boolean"?a=n:typeof n=="string"?i.spaceSeparated?a=dDe(n):i.commaSeparated?a=sDe(n):i.commaOrSpaceSeparated?a=dDe(sDe(n).join(" ")):a=HLe(i,i.property,n):Array.isArray(n)?a=[...n]:a=i.property==="style"?cmr(n):String(n);if(Array.isArray(a)){const o=[];for(const s of a)o.push(HLe(i,i.property,s));a=o}i.property==="className"&&Array.isArray(e.className)&&(a=e.className.concat(a)),e[i.property]=a}}function Tve(t,e){if(e!=null)if(typeof e=="number"||typeof e=="string")t.push({type:"text",value:String(e)});else if(Array.isArray(e))for(const r of e)Tve(t,r);else if(typeof e=="object"&&"type"in e)e.type==="root"?Tve(t,e.children):t.push(e);else throw new Error("Expected node, nodes, or string, got `"+e+"`")}function HLe(t,e,r){if(typeof r=="string"){if(t.number&&r&&!Number.isNaN(Number(r)))return Number(r);if((t.boolean||t.overloadedBoolean)&&(r===""||dB(r)===dB(e)))return!0}return r}function cmr(t){const e=[];for(const[r,n]of Object.entries(t))e.push([r,n].join(": "));return e.join("; ")}function fmr(t){const e=new Map;for(const r of t)e.set(r.toLowerCase(),r);return e}const dmr=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],hmr=HZe(mXe,"div"),pmr=HZe(TZ,"g",dmr),ose={html:"http://www.w3.org/1999/xhtml",svg:"http://www.w3.org/2000/svg"};function vmr(t,e){return jZe(t,{})||{type:"root",children:[]}}function jZe(t,e){const r=mmr(t,e);return r&&e.afterTransform&&e.afterTransform(t,r),r}function mmr(t,e){switch(t.nodeType){case 1:return xmr(t,e);case 3:return ymr(t);case 8:return bmr(t);case 9:return jLe(t,e);case 10:return gmr();case 11:return jLe(t,e);default:return}}function jLe(t,e){return{type:"root",children:VZe(t,e)}}function gmr(){return{type:"doctype"}}function ymr(t){return{type:"text",value:t.nodeValue||""}}function bmr(t){return{type:"comment",value:t.nodeValue||""}}function xmr(t,e){const r=t.namespaceURI,n=r===ose.svg?pmr:hmr,i=r===ose.html?t.tagName.toLowerCase():t.tagName,a=r===ose.html&&i==="template"?t.content:t,o=t.getAttributeNames(),s={};let d=-1;for(;++d<o.length;)s[o[d]]=t.getAttribute(o[d])||"";return n(i,s,VZe(a,e))}function VZe(t,e){const r=t.childNodes,n=[];let i=-1;for(;++i<r.length;){const a=jZe(r[i],e);a!==void 0&&n.push(a)}return n}new DOMParser;function _mr(t,e){const r=wmr(t);return vmr(r)}function wmr(t){const e=document.createElement("template");return e.innerHTML=t,e.content}const VLe=(function(t,e,r){const n=E1e(r);if(!t||!t.type||!t.children)throw new Error("Expected parent node");if(typeof e=="number"){if(e<0||e===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(e=t.children.indexOf(e),e<0)throw new Error("Expected child node or index");for(;++e<t.children.length;)if(n(t.children[e],e,t))return t.children[e]}),u6=(function(t){if(t==null)return Emr;if(typeof t=="string")return Tmr(t);if(typeof t=="object")return Smr(t);if(typeof t=="function")return lbe(t);throw new Error("Expected function, string, or array as `test`")});function Smr(t){const e=[];let r=-1;for(;++r<t.length;)e[r]=u6(t[r]);return lbe(n);function n(...i){let a=-1;for(;++a<e.length;)if(e[a].apply(this,i))return!0;return!1}}function Tmr(t){return lbe(e);function e(r){return r.tagName===t}}function lbe(t){return e;function e(r,n,i){return!!(Amr(r)&&t.call(this,r,typeof n=="number"?n:void 0,i||void 0))}}function Emr(t){return!!(t&&typeof t=="object"&&"type"in t&&t.type==="element"&&"tagName"in t&&typeof t.tagName=="string")}function Amr(t){return t!==null&&typeof t=="object"&&"type"in t&&"tagName"in t}const qLe=/\n/g,GLe=/[\t ]+/g,Eve=u6("br"),$Le=u6(Lmr),Cmr=u6("p"),WLe=u6("tr"),Mmr=u6(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",Dmr,Omr]),qZe=u6(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function Rmr(t,e){const r=e||{},n="children"in t?t.children:[],i=qZe(t),a=WZe(t,{whitespace:r.whitespace||"normal"}),o=[];(t.type==="text"||t.type==="comment")&&o.push(...$Ze(t,{breakBefore:!0,breakAfter:!0}));let s=-1;for(;++s<n.length;)o.push(...GZe(n[s],t,{whitespace:a,breakBefore:s?void 0:i,breakAfter:s<n.length-1?Eve(n[s+1]):i}));const d=[];let b;for(s=-1;++s<o.length;){const L=o[s];typeof L=="number"?b!==void 0&&L>b&&(b=L):L&&(b!==void 0&&b>-1&&d.push(`
`.repeat(b)||" "),b=-1,d.push(L))}return d.join("")}function GZe(t,e,r){return t.type==="element"?kmr(t,e,r):t.type==="text"?r.whitespace==="normal"?$Ze(t,r):Imr(t):[]}function kmr(t,e,r){const n=WZe(t,r),i=t.children||[];let a=-1,o=[];if(Mmr(t))return o;let s,d;for(Eve(t)||WLe(t)&&VLe(e,t,WLe)?d=`
`:Cmr(t)?(s=2,d=2):qZe(t)&&(s=1,d=1);++a<i.length;)o=o.concat(GZe(i[a],t,{whitespace:n,breakBefore:a?void 0:s,breakAfter:a<i.length-1?Eve(i[a+1]):d}));return $Le(t)&&VLe(e,t,$Le)&&o.push("	"),s&&o.unshift(s),d&&o.push(d),o}function $Ze(t,e){const r=String(t.value),n=[],i=[];let a=0;for(;a<=r.length;){qLe.lastIndex=a;const d=qLe.exec(r),b=d&&"index"in d?d.index:r.length;n.push(Pmr(r.slice(a,b).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),a===0?e.breakBefore:!0,b===r.length?e.breakAfter:!0)),a=b+1}let o=-1,s;for(;++o<n.length;)n[o].charCodeAt(n[o].length-1)===8203||o<n.length-1&&n[o+1].charCodeAt(0)===8203?(i.push(n[o]),s=void 0):n[o]?(typeof s=="number"&&i.push(s),i.push(n[o]),s=0):(o===0||o===n.length-1)&&i.push(0);return i}function Imr(t){return[String(t.value)]}function Pmr(t,e,r){const n=[];let i=0,a;for(;i<t.length;){GLe.lastIndex=i;const o=GLe.exec(t);a=o?o.index:t.length,!i&&!a&&o&&!e&&n.push(""),i!==a&&n.push(t.slice(i,a)),i=o?a+o[0].length:a}return i!==a&&!r&&n.push(""),n.join(" ")}function WZe(t,e){if(t.type==="element"){const r=t.properties||{};switch(t.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return r.wrap?"pre-wrap":"pre";case"td":case"th":return r.noWrap?"nowrap":e.whitespace;case"textarea":return"pre-wrap"}}return e.whitespace}function Dmr(t){return!!(t.properties||{}).hidden}function Lmr(t){return t.tagName==="td"||t.tagName==="th"}function Omr(t){return t.tagName==="dialog"&&!(t.properties||{}).open}const Nmr={},Fmr=[];function zmr(t){const e=t||Nmr;return function(r,n){sXe(r,"element",function(i,a){const o=Array.isArray(i.properties.className)?i.properties.className:Fmr,s=o.includes("language-math"),d=o.includes("math-display"),b=o.includes("math-inline");let L=d;if(!s&&!d&&!b)return;let B=a[a.length-1],V=i;if(i.tagName==="code"&&s&&B&&B.type==="element"&&B.tagName==="pre"&&(V=B,B=a[a.length-2],L=!0),!B)return;const X=Rmr(V,{whitespace:"pre"});let ie;try{ie=BLe.renderToString(X,{...e,displayMode:L,throwOnError:!0})}catch(ae){const U=ae,ve=U.name.toLowerCase();n.message("Could not render math with KaTeX",{ancestors:[...a,i],cause:U,place:i.position,ruleId:ve,source:"rehype-katex"});try{ie=BLe.renderToString(X,{...e,displayMode:L,strict:"ignore",throwOnError:!1})}catch{ie=[{type:"element",tagName:"span",properties:{className:["katex-error"],style:"color:"+(e.errorColor||"#cc0000"),title:String(ae)},children:[{type:"text",value:X}]}]}}typeof ie=="string"&&(ie=_mr(ie).children);const de=B.children.indexOf(V);return B.children.splice(de,1,...ie),A1e})}}function Bmr(t,e){if(t==null)return{};var r,n,i=Ms(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(n=0;n<a.length;n++)r=a[n],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}function Ave(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function Umr(t){if(Array.isArray(t))return Ave(t)}function Hmr(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function jmr(t,e){if(t){if(typeof t=="string")return Ave(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ave(t,e):void 0}}function Vmr(){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 Cve(t){return Umr(t)||Hmr(t)||jmr(t)||Vmr()}function YZe(t,e,r){return(e=d8(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function YLe(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function kN(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?YLe(Object(r),!0).forEach(function(n){YZe(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):YLe(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function qmr(t){var e=t.length;if(e===0||e===1)return t;if(e===2)return[t[0],t[1],"".concat(t[0],".").concat(t[1]),"".concat(t[1],".").concat(t[0])];if(e===3)return[t[0],t[1],t[2],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0])];if(e>=4)return[t[0],t[1],t[2],t[3],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[2],".").concat(t[3]),"".concat(t[3],".").concat(t[0]),"".concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[0]),"".concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[3],".").concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[2],".").concat(t[1],".").concat(t[0])]}var sse={};function Gmr(t){if(t.length===0||t.length===1)return t;var e=t.join(".");return sse[e]||(sse[e]=qmr(t)),sse[e]}function $mr(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,n=t.filter(function(a){return a!=="token"}),i=Gmr(n);return i.reduce(function(a,o){return kN(kN({},a),r[o])},e)}function XLe(t){return t.join(" ")}function Wmr(t,e){var r=0;return function(n){return r+=1,n.map(function(i,a){return XZe({node:i,stylesheet:t,useInlineStyles:e,key:"code-segment-".concat(r,"-").concat(a)})})}}function XZe(t){var e=t.node,r=t.stylesheet,n=t.style,i=n===void 0?{}:n,a=t.useInlineStyles,o=t.key,s=e.properties,d=e.type,b=e.tagName,L=e.value;if(d==="text")return L;if(b){var B=Wmr(r,a),V;if(!a)V=kN(kN({},s),{},{className:XLe(s.className)});else{var X=Object.keys(r).reduce(function(U,ve){return ve.split(".").forEach(function(Se){U.includes(Se)||U.push(Se)}),U},[]),ie=s.className&&s.className.includes("token")?["token"]:[],de=s.className&&ie.concat(s.className.filter(function(U){return!X.includes(U)}));V=kN(kN({},s),{},{className:XLe(de)||void 0,style:$mr(s.className,Object.assign({},s.style,i),r)})}var ae=B(e.children);return wi.createElement(b,Mr({key:o},V),ae)}}const Ymr=(function(t,e){var r=t.listLanguages();return r.indexOf(e)!==-1});var Xmr=["language","children","style","customStyle","codeTagProps","useInlineStyles","showLineNumbers","showInlineLineNumbers","startingLineNumber","lineNumberContainerStyle","lineNumberStyle","wrapLines","wrapLongLines","lineProps","renderer","PreTag","CodeTag","code","astGenerator"];function ZLe(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function UP(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ZLe(Object(r),!0).forEach(function(n){YZe(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ZLe(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Zmr=/\n/g;function Kmr(t){return t.match(Zmr)}function Jmr(t){var e=t.lines,r=t.startingLineNumber,n=t.style;return e.map(function(i,a){var o=a+r;return wi.createElement("span",{key:"line-".concat(a),className:"react-syntax-highlighter-line-number",style:typeof n=="function"?n(o):n},"".concat(o,`
`))})}function Qmr(t){var e=t.codeString,r=t.codeStyle,n=t.containerStyle,i=n===void 0?{float:"left",paddingRight:"10px"}:n,a=t.numberStyle,o=a===void 0?{}:a,s=t.startingLineNumber;return wi.createElement("code",{style:Object.assign({},r,i)},Jmr({lines:e.replace(/\n$/,"").split(`
`),style:o,startingLineNumber:s}))}function egr(t){return"".concat(t.toString().length,".25em")}function ZZe(t,e){return{type:"element",tagName:"span",properties:{key:"line-number--".concat(t),className:["comment","linenumber","react-syntax-highlighter-line-number"],style:e},children:[{type:"text",value:t}]}}function KZe(t,e,r){var n={display:"inline-block",minWidth:egr(r),paddingRight:"1em",textAlign:"right",userSelect:"none"},i=typeof t=="function"?t(e):t,a=UP(UP({},n),i);return a}function HG(t){var e=t.children,r=t.lineNumber,n=t.lineNumberStyle,i=t.largestLineNumber,a=t.showInlineLineNumbers,o=t.lineProps,s=o===void 0?{}:o,d=t.className,b=d===void 0?[]:d,L=t.showLineNumbers,B=t.wrapLongLines,V=t.wrapLines,X=V===void 0?!1:V,ie=X?UP({},typeof s=="function"?s(r):s):{};if(ie.className=ie.className?[].concat(Cve(ie.className.trim().split(/\s+/)),Cve(b)):b,r&&a){var de=KZe(n,r,i);e.unshift(ZZe(r,de))}return B&L&&(ie.style=UP({display:"flex"},ie.style)),{type:"element",tagName:"span",properties:ie,children:e}}function JZe(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],n=0;n<t.length;n++){var i=t[n];if(i.type==="text")r.push(HG({children:[i],className:Cve(new Set(e))}));else if(i.children){var a=e.concat(i.properties.className);JZe(i.children,a).forEach(function(o){return r.push(o)})}}return r}function tgr(t,e,r,n,i,a,o,s,d){var b,L=JZe(t.value),B=[],V=-1,X=0;function ie(Me,Ie){var Ve=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return HG({children:Me,lineNumber:Ie,lineNumberStyle:s,largestLineNumber:o,showInlineLineNumbers:i,lineProps:r,className:Ve,showLineNumbers:n,wrapLongLines:d,wrapLines:e})}function de(Me,Ie){if(n&&Ie&&i){var Ve=KZe(s,Ie,o);Me.unshift(ZZe(Ie,Ve))}return Me}function ae(Me,Ie){var Ve=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return e||Ve.length>0?ie(Me,Ie,Ve):de(Me,Ie)}for(var U=function(){var Ie=L[X],Ve=Ie.children[0].value,Ze=Kmr(Ve);if(Ze){var Je=Ve.split(`
`);Je.forEach(function(nt,ut){var ht=n&&B.length+a,_t={type:"text",value:"".concat(nt,`
`)};if(ut===0){var Dt=L.slice(V+1,X).concat(HG({children:[_t],className:Ie.properties.className})),qt=ae(Dt,ht);B.push(qt)}else if(ut===Je.length-1){var Lt=L[X+1]&&L[X+1].children&&L[X+1].children[0],dr={type:"text",value:"".concat(nt)};if(Lt){var Zt=HG({children:[dr],className:Ie.properties.className});L.splice(X+1,0,Zt)}else{var Cr=[dr],yt=ae(Cr,ht,Ie.properties.className);B.push(yt)}}else{var Vt=[_t],Er=ae(Vt,ht,Ie.properties.className);B.push(Er)}}),V=X}X++};X<L.length;)U();if(V!==L.length-1){var ve=L.slice(V+1,L.length);if(ve&&ve.length){var Se=n&&B.length+a,Pe=ae(ve,Se);B.push(Pe)}}return e?B:(b=[]).concat.apply(b,B)}function rgr(t){var e=t.rows,r=t.stylesheet,n=t.useInlineStyles;return e.map(function(i,a){return XZe({node:i,stylesheet:r,useInlineStyles:n,key:"code-segment-".concat(a)})})}function QZe(t){return t&&typeof t.highlightAuto<"u"}function ngr(t){var e=t.astGenerator,r=t.language,n=t.code,i=t.defaultCodeValue;if(QZe(e)){var a=Ymr(e,r);return r==="text"?{value:i,language:"text"}:a?e.highlight(r,n):e.highlightAuto(n)}try{return r&&r!=="text"?{value:e.highlight(n,r)}:{value:i}}catch{return{value:i}}}function igr(t,e){return function(n){var i,a,o=n.language,s=n.children,d=n.style,b=d===void 0?e:d,L=n.customStyle,B=L===void 0?{}:L,V=n.codeTagProps,X=V===void 0?{className:o?"language-".concat(o):void 0,style:UP(UP({},b['code[class*="language-"]']),b['code[class*="language-'.concat(o,'"]')])}:V,ie=n.useInlineStyles,de=ie===void 0?!0:ie,ae=n.showLineNumbers,U=ae===void 0?!1:ae,ve=n.showInlineLineNumbers,Se=ve===void 0?!0:ve,Pe=n.startingLineNumber,Me=Pe===void 0?1:Pe,Ie=n.lineNumberContainerStyle,Ve=n.lineNumberStyle,Ze=Ve===void 0?{}:Ve,Je=n.wrapLines,nt=n.wrapLongLines,ut=nt===void 0?!1:nt,ht=n.lineProps,_t=ht===void 0?{}:ht,Dt=n.renderer,qt=n.PreTag,Lt=qt===void 0?"pre":qt,dr=n.CodeTag,Zt=dr===void 0?"code":dr,Cr=n.code,yt=Cr===void 0?(Array.isArray(s)?s[0]:s)||"":Cr,Vt=n.astGenerator,Er=Bmr(n,Xmr);Vt=Vt||t;var sr=U?wi.createElement(Qmr,{containerStyle:Ie,codeStyle:X.style||{},numberStyle:Ze,startingLineNumber:Me,codeString:yt}):null,or=b.hljs||b['pre[class*="language-"]']||{backgroundColor:"#fff"},Ar=QZe(Vt)?"hljs":"prismjs",Ir=de?Object.assign({},Er,{style:Object.assign({},or,B)}):Object.assign({},Er,{className:Er.className?"".concat(Ar," ").concat(Er.className):Ar,style:Object.assign({},B)});if(ut?X.style=UP({whiteSpace:"pre-wrap"},X.style):X.style=UP({whiteSpace:"pre"},X.style),!Vt)return wi.createElement(Lt,Ir,sr,wi.createElement(Zt,X,yt));(Je===void 0&&Dt||ut)&&(Je=!0),Dt=Dt||rgr;var _n=[{type:"text",value:yt}],Un=ngr({astGenerator:Vt,language:o,code:yt,defaultCodeValue:_n});Un.language===null&&(Un.value=_n);var Qn=(i=(a=yt.match(/\n/g))===null||a===void 0?void 0:a.length)!==null&&i!==void 0?i:0,Jn=Me+Qn,Vn=tgr(Un,Je,_t,U,Se,Me,Jn,Ze,ut);return wi.createElement(Lt,Ir,wi.createElement(Zt,X,!Se&&sr,Dt({rows:Vn,stylesheet:b,useInlineStyles:de})))}}const agr=["abap","abnf","actionscript","ada","agda","al","antlr4","apacheconf","apex","apl","applescript","aql","arduino","arff","asciidoc","asm6502","asmatmel","aspnet","autohotkey","autoit","avisynth","avro-idl","bash","basic","batch","bbcode","bicep","birb","bison","bnf","brainfuck","brightscript","bro","bsl","c","cfscript","chaiscript","cil","clike","clojure","cmake","cobol","coffeescript","concurnas","coq","cpp","crystal","csharp","cshtml","csp","css-extras","css","csv","cypher","d","dart","dataweave","dax","dhall","diff","django","dns-zone-file","docker","dot","ebnf","editorconfig","eiffel","ejs","elixir","elm","erb","erlang","etlua","excel-formula","factor","false","firestore-security-rules","flow","fortran","fsharp","ftl","gap","gcode","gdscript","gedcom","gherkin","git","glsl","gml","gn","go-module","go","graphql","groovy","haml","handlebars","haskell","haxe","hcl","hlsl","hoon","hpkp","hsts","http","ichigojam","icon","icu-message-format","idris","iecst","ignore","inform7","ini","io","j","java","javadoc","javadoclike","javascript","javastacktrace","jexl","jolie","jq","js-extras","js-templates","jsdoc","json","json5","jsonp","jsstacktrace","jsx","julia","keepalived","keyman","kotlin","kumir","kusto","latex","latte","less","lilypond","liquid","lisp","livescript","llvm","log","lolcode","lua","magma","makefile","markdown","markup-templating","markup","matlab","maxscript","mel","mermaid","mizar","mongodb","monkey","moonscript","n1ql","n4js","nand2tetris-hdl","naniscript","nasm","neon","nevod","nginx","nim","nix","nsis","objectivec","ocaml","opencl","openqasm","oz","parigp","parser","pascal","pascaligo","pcaxis","peoplecode","perl","php-extras","php","phpdoc","plsql","powerquery","powershell","processing","prolog","promql","properties","protobuf","psl","pug","puppet","pure","purebasic","purescript","python","q","qml","qore","qsharp","r","racket","reason","regex","rego","renpy","rest","rip","roboconf","robotframework","ruby","rust","sas","sass","scala","scheme","scss","shell-session","smali","smalltalk","smarty","sml","solidity","solution-file","soy","sparql","splunk-spl","sqf","sql","squirrel","stan","stylus","swift","systemd","t4-cs","t4-templating","t4-vb","tap","tcl","textile","toml","tremor","tsx","tt2","turtle","twig","typescript","typoscript","unrealscript","uorazor","uri","v","vala","vbnet","velocity","verilog","vhdl","vim","visual-basic","warpscript","wasm","web-idl","wiki","wolfram","wren","xeora","xml-doc","xojo","xquery","yaml","yang","zig"];var lse,KLe;function ogr(){if(KLe)return lse;KLe=1,lse=e;var t=Object.prototype.hasOwnProperty;function e(){for(var r={},n=0;n<arguments.length;n++){var i=arguments[n];for(var a in i)t.call(i,a)&&(r[a]=i[a])}return r}return lse}var use,JLe;function eKe(){if(JLe)return use;JLe=1,use=e;var t=e.prototype;t.space=null,t.normal={},t.property={};function e(r,n,i){this.property=r,this.normal=n,i&&(this.space=i)}return use}var cse,QLe;function sgr(){if(QLe)return cse;QLe=1;var t=ogr(),e=eKe();cse=r;function r(n){for(var i=n.length,a=[],o=[],s=-1,d,b;++s<i;)d=n[s],a.push(d.property),o.push(d.normal),b=d.space;return new e(t.apply(null,a),t.apply(null,o),b)}return cse}var fse,e6e;function ube(){if(e6e)return fse;e6e=1,fse=t;function t(e){return e.toLowerCase()}return fse}var dse,t6e;function tKe(){if(t6e)return dse;t6e=1,dse=e;var t=e.prototype;t.space=null,t.attribute=null,t.property=null,t.boolean=!1,t.booleanish=!1,t.overloadedBoolean=!1,t.number=!1,t.commaSeparated=!1,t.spaceSeparated=!1,t.commaOrSpaceSeparated=!1,t.mustUseProperty=!1,t.defined=!1;function e(r,n){this.property=r,this.attribute=n}return dse}var fk={},r6e;function cbe(){if(r6e)return fk;r6e=1;var t=0;fk.boolean=e(),fk.booleanish=e(),fk.overloadedBoolean=e(),fk.number=e(),fk.spaceSeparated=e(),fk.commaSeparated=e(),fk.commaOrSpaceSeparated=e();function e(){return Math.pow(2,++t)}return fk}var hse,n6e;function rKe(){if(n6e)return hse;n6e=1;var t=tKe(),e=cbe();hse=i,i.prototype=new t,i.prototype.defined=!0;var r=["boolean","booleanish","overloadedBoolean","number","commaSeparated","spaceSeparated","commaOrSpaceSeparated"],n=r.length;function i(o,s,d,b){var L=-1,B;for(a(this,"space",b),t.call(this,o,s);++L<n;)B=r[L],a(this,B,(d&e[B])===e[B])}function a(o,s,d){d&&(o[s]=d)}return hse}var pse,i6e;function IU(){if(i6e)return pse;i6e=1;var t=ube(),e=eKe(),r=rKe();pse=n;function n(i){var a=i.space,o=i.mustUseProperty||[],s=i.attributes||{},d=i.properties,b=i.transform,L={},B={},V,X;for(V in d)X=new r(V,b(s,V),d[V],a),o.indexOf(V)!==-1&&(X.mustUseProperty=!0),L[V]=X,B[t(V)]=V,B[t(X.attribute)]=V;return new e(L,B,a)}return pse}var vse,a6e;function lgr(){if(a6e)return vse;a6e=1;var t=IU();vse=t({space:"xlink",transform:e,properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}});function e(r,n){return"xlink:"+n.slice(5).toLowerCase()}return vse}var mse,o6e;function ugr(){if(o6e)return mse;o6e=1;var t=IU();mse=t({space:"xml",transform:e,properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function e(r,n){return"xml:"+n.slice(3).toLowerCase()}return mse}var gse,s6e;function cgr(){if(s6e)return gse;s6e=1,gse=t;function t(e,r){return r in e?e[r]:r}return gse}var yse,l6e;function nKe(){if(l6e)return yse;l6e=1;var t=cgr();yse=e;function e(r,n){return t(r,n.toLowerCase())}return yse}var bse,u6e;function fgr(){if(u6e)return bse;u6e=1;var t=IU(),e=nKe();return bse=t({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:e,properties:{xmlns:null,xmlnsXLink:null}}),bse}var xse,c6e;function dgr(){if(c6e)return xse;c6e=1;var t=cbe(),e=IU(),r=t.booleanish,n=t.number,i=t.spaceSeparated;xse=e({transform:a,properties:{ariaActiveDescendant:null,ariaAtomic:r,ariaAutoComplete:null,ariaBusy:r,ariaChecked:r,ariaColCount:n,ariaColIndex:n,ariaColSpan:n,ariaControls:i,ariaCurrent:null,ariaDescribedBy:i,ariaDetails:null,ariaDisabled:r,ariaDropEffect:i,ariaErrorMessage:null,ariaExpanded:r,ariaFlowTo:i,ariaGrabbed:r,ariaHasPopup:null,ariaHidden:r,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:i,ariaLevel:n,ariaLive:null,ariaModal:r,ariaMultiLine:r,ariaMultiSelectable:r,ariaOrientation:null,ariaOwns:i,ariaPlaceholder:null,ariaPosInSet:n,ariaPressed:r,ariaReadOnly:r,ariaRelevant:null,ariaRequired:r,ariaRoleDescription:i,ariaRowCount:n,ariaRowIndex:n,ariaRowSpan:n,ariaSelected:r,ariaSetSize:n,ariaSort:null,ariaValueMax:n,ariaValueMin:n,ariaValueNow:n,ariaValueText:null,role:null}});function a(o,s){return s==="role"?s:"aria-"+s.slice(4).toLowerCase()}return xse}var _se,f6e;function hgr(){if(f6e)return _se;f6e=1;var t=cbe(),e=IU(),r=nKe(),n=t.boolean,i=t.overloadedBoolean,a=t.booleanish,o=t.number,s=t.spaceSeparated,d=t.commaSeparated;return _se=e({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:r,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:d,acceptCharset:s,accessKey:s,action:null,allow:null,allowFullScreen:n,allowPaymentRequest:n,allowUserMedia:n,alt:null,as:null,async:n,autoCapitalize:null,autoComplete:s,autoFocus:n,autoPlay:n,capture:n,charSet:null,checked:n,cite:null,className:s,cols:o,colSpan:null,content:null,contentEditable:a,controls:n,controlsList:s,coords:o|d,crossOrigin:null,data:null,dateTime:null,decoding:null,default:n,defer:n,dir:null,dirName:null,disabled:n,download:i,draggable:a,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:n,formTarget:null,headers:s,height:o,hidden:n,high:o,href:null,hrefLang:null,htmlFor:s,httpEquiv:s,id:null,imageSizes:null,imageSrcSet:d,inputMode:null,integrity:null,is:null,isMap:n,itemId:null,itemProp:s,itemRef:s,itemScope:n,itemType:s,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:n,low:o,manifest:null,max:null,maxLength:o,media:null,method:null,min:null,minLength:o,multiple:n,muted:n,name:null,nonce:null,noModule:n,noValidate:n,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextMenu:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:n,optimum:o,pattern:null,ping:s,placeholder:null,playsInline:n,poster:null,preload:null,readOnly:n,referrerPolicy:null,rel:s,required:n,reversed:n,rows:o,rowSpan:o,sandbox:s,scope:null,scoped:n,seamless:n,selected:n,shape:null,size:o,sizes:null,slot:null,span:o,spellCheck:a,src:null,srcDoc:null,srcLang:null,srcSet:d,start:o,step:null,style:null,tabIndex:o,target:null,title:null,translate:null,type:null,typeMustMatch:n,useMap:null,value:a,width:o,wrap:null,align:null,aLink:null,archive:s,axis:null,background:null,bgColor:null,border:o,borderColor:null,bottomMargin:o,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:n,declare:n,event:null,face:null,frame:null,frameBorder:null,hSpace:o,leftMargin:o,link:null,longDesc:null,lowSrc:null,marginHeight:o,marginWidth:o,noResize:n,noHref:n,noShade:n,noWrap:n,object:null,profile:null,prompt:null,rev:null,rightMargin:o,rules:null,scheme:null,scrolling:a,standby:null,summary:null,text:null,topMargin:o,valueType:null,version:null,vAlign:null,vLink:null,vSpace:o,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:n,disableRemotePlayback:n,prefix:null,property:null,results:o,security:null,unselectable:null}}),_se}var wse,d6e;function pgr(){if(d6e)return wse;d6e=1;var t=sgr(),e=lgr(),r=ugr(),n=fgr(),i=dgr(),a=hgr();return wse=t([r,e,n,i,a]),wse}var Sse,h6e;function vgr(){if(h6e)return Sse;h6e=1;var t=ube(),e=rKe(),r=tKe(),n="data";Sse=s;var i=/^data[-\w.:]+$/i,a=/-[a-z]/g,o=/[A-Z]/g;function s(V,X){var ie=t(X),de=X,ae=r;return ie in V.normal?V.property[V.normal[ie]]:(ie.length>4&&ie.slice(0,4)===n&&i.test(X)&&(X.charAt(4)==="-"?de=d(X):X=b(X),ae=e),new ae(de,X))}function d(V){var X=V.slice(5).replace(a,B);return n+X.charAt(0).toUpperCase()+X.slice(1)}function b(V){var X=V.slice(4);return a.test(X)?V:(X=X.replace(o,L),X.charAt(0)!=="-"&&(X="-"+X),n+X)}function L(V){return"-"+V.toLowerCase()}function B(V){return V.charAt(1).toUpperCase()}return Sse}var Tse,p6e;function mgr(){if(p6e)return Tse;p6e=1,Tse=e;var t=/[#.]/g;function e(r,n){for(var i=r||"",a=n||"div",o={},s=0,d,b,L;s<i.length;)t.lastIndex=s,L=t.exec(i),d=i.slice(s,L?L.index:i.length),d&&(b?b==="#"?o.id=d:o.className?o.className.push(d):o.className=[d]:a=d,s+=d.length),L&&(b=L[0],s++);return{type:"element",tagName:a,properties:o,children:[]}}return Tse}var qq={},v6e;function ggr(){if(v6e)return qq;v6e=1,qq.parse=n,qq.stringify=i;var t="",e=" ",r=/[ \t\n\r\f]+/g;function n(a){var o=String(a||t).trim();return o===t?[]:o.split(r)}function i(a){return a.join(e).trim()}return qq}var Gq={},m6e;function ygr(){if(m6e)return Gq;m6e=1,Gq.parse=n,Gq.stringify=i;var t=",",e=" ",r="";function n(a){for(var o=[],s=String(a||r),d=s.indexOf(t),b=0,L=!1,B;!L;)d===-1&&(d=s.length,L=!0),B=s.slice(b,d).trim(),(B||!L)&&o.push(B),b=d+1,d=s.indexOf(t,b);return o}function i(a,o){var s=o||{},d=s.padLeft===!1?r:e,b=s.padRight?e:r;return a[a.length-1]===r&&(a=a.concat(r)),a.join(b+t+d).trim()}return Gq}var Ese,g6e;function bgr(){if(g6e)return Ese;g6e=1;var t=vgr(),e=ube(),r=mgr(),n=ggr().parse,i=ygr().parse;Ese=o;var a={}.hasOwnProperty;function o(ie,de,ae){var U=ae?X(ae):null;return ve;function ve(Pe,Me){var Ie=r(Pe,de),Ve=Array.prototype.slice.call(arguments,2),Ze=Ie.tagName.toLowerCase(),Je;if(Ie.tagName=U&&a.call(U,Ze)?U[Ze]:Ze,Me&&s(Me,Ie)&&(Ve.unshift(Me),Me=null),Me)for(Je in Me)Se(Ie.properties,Je,Me[Je]);return b(Ie.children,Ve),Ie.tagName==="template"&&(Ie.content={type:"root",children:Ie.children},Ie.children=[]),Ie}function Se(Pe,Me,Ie){var Ve,Ze,Je;Ie==null||Ie!==Ie||(Ve=t(ie,Me),Ze=Ve.property,Je=Ie,typeof Je=="string"&&(Ve.spaceSeparated?Je=n(Je):Ve.commaSeparated?Je=i(Je):Ve.commaOrSpaceSeparated&&(Je=n(i(Je).join(" ")))),Ze==="style"&&typeof Ie!="string"&&(Je=V(Je)),Ze==="className"&&Pe.className&&(Je=Pe.className.concat(Je)),Pe[Ze]=L(Ve,Ze,Je))}}function s(ie,de){return typeof ie=="string"||"length"in ie||d(de.tagName,ie)}function d(ie,de){var ae=de.type;return ie==="input"||!ae||typeof ae!="string"?!1:typeof de.children=="object"&&"length"in de.children?!0:(ae=ae.toLowerCase(),ie==="button"?ae!=="menu"&&ae!=="submit"&&ae!=="reset"&&ae!=="button":"value"in de)}function b(ie,de){var ae,U;if(typeof de=="string"||typeof de=="number"){ie.push({type:"text",value:String(de)});return}if(typeof de=="object"&&"length"in de){for(ae=-1,U=de.length;++ae<U;)b(ie,de[ae]);return}if(typeof de!="object"||!("type"in de))throw new Error("Expected node, nodes, or string, got `"+de+"`");ie.push(de)}function L(ie,de,ae){var U,ve,Se;if(typeof ae!="object"||!("length"in ae))return B(ie,de,ae);for(ve=ae.length,U=-1,Se=[];++U<ve;)Se[U]=B(ie,de,ae[U]);return Se}function B(ie,de,ae){var U=ae;return ie.number||ie.positiveNumber?!isNaN(U)&&U!==""&&(U=Number(U)):(ie.boolean||ie.overloadedBoolean)&&typeof U=="string"&&(U===""||e(ae)===e(de))&&(U=!0),U}function V(ie){var de=[],ae;for(ae in ie)de.push([ae,ie[ae]].join(": "));return de.join("; ")}function X(ie){for(var de=ie.length,ae=-1,U={},ve;++ae<de;)ve=ie[ae],U[ve.toLowerCase()]=ve;return U}return Ese}var Ase,y6e;function xgr(){if(y6e)return Ase;y6e=1;var t=pgr(),e=bgr(),r=e(t,"div");return r.displayName="html",Ase=r,Ase}var Cse,b6e;function _gr(){return b6e||(b6e=1,Cse=xgr()),Cse}const wgr="Æ",Sgr="&",Tgr="Á",Egr="Â",Agr="À",Cgr="Å",Mgr="Ã",Rgr="Ä",kgr="©",Igr="Ç",Pgr="Ð",Dgr="É",Lgr="Ê",Ogr="È",Ngr="Ë",Fgr=">",zgr="Í",Bgr="Î",Ugr="Ì",Hgr="Ï",jgr="<",Vgr="Ñ",qgr="Ó",Ggr="Ô",$gr="Ò",Wgr="Ø",Ygr="Õ",Xgr="Ö",Zgr='"',Kgr="®",Jgr="Þ",Qgr="Ú",e0r="Û",t0r="Ù",r0r="Ü",n0r="Ý",i0r="á",a0r="â",o0r="´",s0r="æ",l0r="à",u0r="&",c0r="å",f0r="ã",d0r="ä",h0r="¦",p0r="ç",v0r="¸",m0r="¢",g0r="©",y0r="¤",b0r="°",x0r="÷",_0r="é",w0r="ê",S0r="è",T0r="ð",E0r="ë",A0r="½",C0r="¼",M0r="¾",R0r=">",k0r="í",I0r="î",P0r="¡",D0r="ì",L0r="¿",O0r="ï",N0r="«",F0r="<",z0r="¯",B0r="µ",U0r="·",H0r=" ",j0r="¬",V0r="ñ",q0r="ó",G0r="ô",$0r="ò",W0r="ª",Y0r="º",X0r="ø",Z0r="õ",K0r="ö",J0r="¶",Q0r="±",eyr="£",tyr='"',ryr="»",nyr="®",iyr="§",ayr="­",oyr="¹",syr="²",lyr="³",uyr="ß",cyr="þ",fyr="×",dyr="ú",hyr="û",pyr="ù",vyr="¨",myr="ü",gyr="ý",yyr="¥",byr="ÿ",xyr={AElig:wgr,AMP:Sgr,Aacute:Tgr,Acirc:Egr,Agrave:Agr,Aring:Cgr,Atilde:Mgr,Auml:Rgr,COPY:kgr,Ccedil:Igr,ETH:Pgr,Eacute:Dgr,Ecirc:Lgr,Egrave:Ogr,Euml:Ngr,GT:Fgr,Iacute:zgr,Icirc:Bgr,Igrave:Ugr,Iuml:Hgr,LT:jgr,Ntilde:Vgr,Oacute:qgr,Ocirc:Ggr,Ograve:$gr,Oslash:Wgr,Otilde:Ygr,Ouml:Xgr,QUOT:Zgr,REG:Kgr,THORN:Jgr,Uacute:Qgr,Ucirc:e0r,Ugrave:t0r,Uuml:r0r,Yacute:n0r,aacute:i0r,acirc:a0r,acute:o0r,aelig:s0r,agrave:l0r,amp:u0r,aring:c0r,atilde:f0r,auml:d0r,brvbar:h0r,ccedil:p0r,cedil:v0r,cent:m0r,copy:g0r,curren:y0r,deg:b0r,divide:x0r,eacute:_0r,ecirc:w0r,egrave:S0r,eth:T0r,euml:E0r,frac12:A0r,frac14:C0r,frac34:M0r,gt:R0r,iacute:k0r,icirc:I0r,iexcl:P0r,igrave:D0r,iquest:L0r,iuml:O0r,laquo:N0r,lt:F0r,macr:z0r,micro:B0r,middot:U0r,nbsp:H0r,not:j0r,ntilde:V0r,oacute:q0r,ocirc:G0r,ograve:$0r,ordf:W0r,ordm:Y0r,oslash:X0r,otilde:Z0r,ouml:K0r,para:J0r,plusmn:Q0r,pound:eyr,quot:tyr,raquo:ryr,reg:nyr,sect:iyr,shy:ayr,sup1:oyr,sup2:syr,sup3:lyr,szlig:uyr,thorn:cyr,times:fyr,uacute:dyr,ucirc:hyr,ugrave:pyr,uml:vyr,uuml:myr,yacute:gyr,yen:yyr,yuml:byr},_yr={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};var Mse,x6e;function iKe(){if(x6e)return Mse;x6e=1,Mse=t;function t(e){var r=typeof e=="string"?e.charCodeAt(0):e;return r>=48&&r<=57}return Mse}var Rse,_6e;function wyr(){if(_6e)return Rse;_6e=1,Rse=t;function t(e){var r=typeof e=="string"?e.charCodeAt(0):e;return r>=97&&r<=102||r>=65&&r<=70||r>=48&&r<=57}return Rse}var kse,w6e;function Syr(){if(w6e)return kse;w6e=1,kse=t;function t(e){var r=typeof e=="string"?e.charCodeAt(0):e;return r>=97&&r<=122||r>=65&&r<=90}return kse}var Ise,S6e;function Tyr(){if(S6e)return Ise;S6e=1;var t=Syr(),e=iKe();Ise=r;function r(n){return t(n)||e(n)}return Ise}var Pse,T6e;function Eyr(){if(T6e)return Pse;T6e=1;var t,e=59;Pse=r;function r(n){var i="&"+n+";",a;return t=t||document.createElement("i"),t.innerHTML=i,a=t.textContent,a.charCodeAt(a.length-1)===e&&n!=="semi"||a===i?!1:a}return Pse}var Dse,E6e;function Ayr(){if(E6e)return Dse;E6e=1;var t=xyr,e=_yr,r=iKe(),n=wyr(),i=Tyr(),a=Eyr();Dse=Cr;var o={}.hasOwnProperty,s=String.fromCharCode,d=Function.prototype,b={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},L=9,B=10,V=12,X=32,ie=38,de=59,ae=60,U=61,ve=35,Se=88,Pe=120,Me=65533,Ie="named",Ve="hexadecimal",Ze="decimal",Je={};Je[Ve]=16,Je[Ze]=10;var nt={};nt[Ie]=i,nt[Ze]=r,nt[Ve]=n;var ut=1,ht=2,_t=3,Dt=4,qt=5,Lt=6,dr=7,Zt={};Zt[ut]="Named character references must be terminated by a semicolon",Zt[ht]="Numeric character references must be terminated by a semicolon",Zt[_t]="Named character references cannot be empty",Zt[Dt]="Numeric character references cannot be empty",Zt[qt]="Named character references must be known",Zt[Lt]="Numeric character references cannot be disallowed",Zt[dr]="Numeric character references cannot be outside the permissible Unicode range";function Cr(sr,or){var Ar={},Ir,_n;or||(or={});for(_n in b)Ir=or[_n],Ar[_n]=Ir??b[_n];return(Ar.position.indent||Ar.position.start)&&(Ar.indent=Ar.position.indent||[],Ar.position=Ar.position.start),yt(sr,Ar)}function yt(sr,or){var Ar=or.additional,Ir=or.nonTerminated,_n=or.text,Un=or.reference,Qn=or.warning,Jn=or.textContext,Vn=or.referenceContext,jn=or.warningContext,Lr=or.position,Yn=or.indent||[],On=sr.length,Sn=0,bn=-1,Mn=Lr.column||1,gi=Lr.line||1,Oi="",Pa=[],va,ti,Tn,bi,Wn,Ei,Ki,sa,xa,Qa,is,go,Co,Ko,Zi,za,Ss,ba,po;for(typeof Ar=="string"&&(Ar=Ar.charCodeAt(0)),za=Ys(),sa=Qn?$s:d,Sn--,On++;++Sn<On;)if(Wn===B&&(Mn=Yn[bn]||1),Wn=sr.charCodeAt(Sn),Wn===ie){if(Ki=sr.charCodeAt(Sn+1),Ki===L||Ki===B||Ki===V||Ki===X||Ki===ie||Ki===ae||Ki!==Ki||Ar&&Ki===Ar){Oi+=s(Wn),Mn++;continue}for(Co=Sn+1,go=Co,po=Co,Ki===ve?(po=++go,Ki=sr.charCodeAt(po),Ki===Se||Ki===Pe?(Ko=Ve,po=++go):Ko=Ze):Ko=Ie,va="",is="",bi="",Zi=nt[Ko],po--;++po<On&&(Ki=sr.charCodeAt(po),!!Zi(Ki));)bi+=s(Ki),Ko===Ie&&o.call(t,bi)&&(va=bi,is=t[bi]);Tn=sr.charCodeAt(po)===de,Tn&&(po++,ti=Ko===Ie?a(bi):!1,ti&&(va=bi,is=ti)),ba=1+po-Co,!Tn&&!Ir||(bi?Ko===Ie?(Tn&&!is?sa(qt,1):(va!==bi&&(po=go+va.length,ba=1+po-go,Tn=!1),Tn||(xa=va?ut:_t,or.attribute?(Ki=sr.charCodeAt(po),Ki===U?(sa(xa,ba),is=null):i(Ki)?is=null:sa(xa,ba)):sa(xa,ba))),Ei=is):(Tn||sa(ht,ba),Ei=parseInt(bi,Je[Ko]),Vt(Ei)?(sa(dr,ba),Ei=s(Me)):Ei in e?(sa(Lt,ba),Ei=e[Ei]):(Qa="",Er(Ei)&&sa(Lt,ba),Ei>65535&&(Ei-=65536,Qa+=s(Ei>>>10|55296),Ei=56320|Ei&1023),Ei=Qa+s(Ei))):Ko!==Ie&&sa(Dt,ba)),Ei?(Gs(),za=Ys(),Sn=po-1,Mn+=po-Co+1,Pa.push(Ei),Ss=Ys(),Ss.offset++,Un&&Un.call(Vn,Ei,{start:za,end:Ss},sr.slice(Co-1,po)),za=Ss):(bi=sr.slice(Co-1,po),Oi+=bi,Mn+=bi.length,Sn=po-1)}else Wn===10&&(gi++,bn++,Mn=0),Wn===Wn?(Oi+=s(Wn),Mn++):Gs();return Pa.join("");function Ys(){return{line:gi,column:Mn,offset:Sn+(Lr.offset||0)}}function $s(Ns,Hl){var nu=Ys();nu.column+=Hl,nu.offset+=Hl,Qn.call(jn,Zt[Ns],nu,Ns)}function Gs(){Oi&&(Pa.push(Oi),_n&&_n.call(Jn,Oi,{start:za,end:Ys()}),Oi="")}}function Vt(sr){return sr>=55296&&sr<=57343||sr>1114111}function Er(sr){return sr>=1&&sr<=8||sr===11||sr>=13&&sr<=31||sr>=127&&sr<=159||sr>=64976&&sr<=65007||(sr&65535)===65535||(sr&65535)===65534}return Dse}var Lse={exports:{}},A6e;function Cyr(){return A6e||(A6e=1,(function(t){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
 * Prism: Lightweight, robust, elegant syntax highlighting
 *
 * @license MIT <https://opensource.org/licenses/MIT>
 * @author Lea Verou <https://lea.verou.me>
 * @namespace
 * @public
 */var r=(function(n){var i=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,a=0,o={},s={manual:n.Prism&&n.Prism.manual,disableWorkerMessageHandler:n.Prism&&n.Prism.disableWorkerMessageHandler,util:{encode:function ve(Se){return Se instanceof d?new d(Se.type,ve(Se.content),Se.alias):Array.isArray(Se)?Se.map(ve):Se.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(ve){return Object.prototype.toString.call(ve).slice(8,-1)},objId:function(ve){return ve.__id||Object.defineProperty(ve,"__id",{value:++a}),ve.__id},clone:function ve(Se,Pe){Pe=Pe||{};var Me,Ie;switch(s.util.type(Se)){case"Object":if(Ie=s.util.objId(Se),Pe[Ie])return Pe[Ie];Me={},Pe[Ie]=Me;for(var Ve in Se)Se.hasOwnProperty(Ve)&&(Me[Ve]=ve(Se[Ve],Pe));return Me;case"Array":return Ie=s.util.objId(Se),Pe[Ie]?Pe[Ie]:(Me=[],Pe[Ie]=Me,Se.forEach(function(Ze,Je){Me[Je]=ve(Ze,Pe)}),Me);default:return Se}},getLanguage:function(ve){for(;ve;){var Se=i.exec(ve.className);if(Se)return Se[1].toLowerCase();ve=ve.parentElement}return"none"},setLanguage:function(ve,Se){ve.className=ve.className.replace(RegExp(i,"gi"),""),ve.classList.add("language-"+Se)},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(Me){var ve=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(Me.stack)||[])[1];if(ve){var Se=document.getElementsByTagName("script");for(var Pe in Se)if(Se[Pe].src==ve)return Se[Pe]}return null}},isActive:function(ve,Se,Pe){for(var Me="no-"+Se;ve;){var Ie=ve.classList;if(Ie.contains(Se))return!0;if(Ie.contains(Me))return!1;ve=ve.parentElement}return!!Pe}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(ve,Se){var Pe=s.util.clone(s.languages[ve]);for(var Me in Se)Pe[Me]=Se[Me];return Pe},insertBefore:function(ve,Se,Pe,Me){Me=Me||s.languages;var Ie=Me[ve],Ve={};for(var Ze in Ie)if(Ie.hasOwnProperty(Ze)){if(Ze==Se)for(var Je in Pe)Pe.hasOwnProperty(Je)&&(Ve[Je]=Pe[Je]);Pe.hasOwnProperty(Ze)||(Ve[Ze]=Ie[Ze])}var nt=Me[ve];return Me[ve]=Ve,s.languages.DFS(s.languages,function(ut,ht){ht===nt&&ut!=ve&&(this[ut]=Ve)}),Ve},DFS:function ve(Se,Pe,Me,Ie){Ie=Ie||{};var Ve=s.util.objId;for(var Ze in Se)if(Se.hasOwnProperty(Ze)){Pe.call(Se,Ze,Se[Ze],Me||Ze);var Je=Se[Ze],nt=s.util.type(Je);nt==="Object"&&!Ie[Ve(Je)]?(Ie[Ve(Je)]=!0,ve(Je,Pe,null,Ie)):nt==="Array"&&!Ie[Ve(Je)]&&(Ie[Ve(Je)]=!0,ve(Je,Pe,Ze,Ie))}}},plugins:{},highlightAll:function(ve,Se){s.highlightAllUnder(document,ve,Se)},highlightAllUnder:function(ve,Se,Pe){var Me={callback:Pe,container:ve,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};s.hooks.run("before-highlightall",Me),Me.elements=Array.prototype.slice.apply(Me.container.querySelectorAll(Me.selector)),s.hooks.run("before-all-elements-highlight",Me);for(var Ie=0,Ve;Ve=Me.elements[Ie++];)s.highlightElement(Ve,Se===!0,Me.callback)},highlightElement:function(ve,Se,Pe){var Me=s.util.getLanguage(ve),Ie=s.languages[Me];s.util.setLanguage(ve,Me);var Ve=ve.parentElement;Ve&&Ve.nodeName.toLowerCase()==="pre"&&s.util.setLanguage(Ve,Me);var Ze=ve.textContent,Je={element:ve,language:Me,grammar:Ie,code:Ze};function nt(ht){Je.highlightedCode=ht,s.hooks.run("before-insert",Je),Je.element.innerHTML=Je.highlightedCode,s.hooks.run("after-highlight",Je),s.hooks.run("complete",Je),Pe&&Pe.call(Je.element)}if(s.hooks.run("before-sanity-check",Je),Ve=Je.element.parentElement,Ve&&Ve.nodeName.toLowerCase()==="pre"&&!Ve.hasAttribute("tabindex")&&Ve.setAttribute("tabindex","0"),!Je.code){s.hooks.run("complete",Je),Pe&&Pe.call(Je.element);return}if(s.hooks.run("before-highlight",Je),!Je.grammar){nt(s.util.encode(Je.code));return}if(Se&&n.Worker){var ut=new Worker(s.filename);ut.onmessage=function(ht){nt(ht.data)},ut.postMessage(JSON.stringify({language:Je.language,code:Je.code,immediateClose:!0}))}else nt(s.highlight(Je.code,Je.grammar,Je.language))},highlight:function(ve,Se,Pe){var Me={code:ve,grammar:Se,language:Pe};if(s.hooks.run("before-tokenize",Me),!Me.grammar)throw new Error('The language "'+Me.language+'" has no grammar.');return Me.tokens=s.tokenize(Me.code,Me.grammar),s.hooks.run("after-tokenize",Me),d.stringify(s.util.encode(Me.tokens),Me.language)},tokenize:function(ve,Se){var Pe=Se.rest;if(Pe){for(var Me in Pe)Se[Me]=Pe[Me];delete Se.rest}var Ie=new B;return V(Ie,Ie.head,ve),L(ve,Ie,Se,Ie.head,0),ie(Ie)},hooks:{all:{},add:function(ve,Se){var Pe=s.hooks.all;Pe[ve]=Pe[ve]||[],Pe[ve].push(Se)},run:function(ve,Se){var Pe=s.hooks.all[ve];if(!(!Pe||!Pe.length))for(var Me=0,Ie;Ie=Pe[Me++];)Ie(Se)}},Token:d};n.Prism=s;function d(ve,Se,Pe,Me){this.type=ve,this.content=Se,this.alias=Pe,this.length=(Me||"").length|0}d.stringify=function ve(Se,Pe){if(typeof Se=="string")return Se;if(Array.isArray(Se)){var Me="";return Se.forEach(function(nt){Me+=ve(nt,Pe)}),Me}var Ie={type:Se.type,content:ve(Se.content,Pe),tag:"span",classes:["token",Se.type],attributes:{},language:Pe},Ve=Se.alias;Ve&&(Array.isArray(Ve)?Array.prototype.push.apply(Ie.classes,Ve):Ie.classes.push(Ve)),s.hooks.run("wrap",Ie);var Ze="";for(var Je in Ie.attributes)Ze+=" "+Je+'="'+(Ie.attributes[Je]||"").replace(/"/g,"&quot;")+'"';return"<"+Ie.tag+' class="'+Ie.classes.join(" ")+'"'+Ze+">"+Ie.content+"</"+Ie.tag+">"};function b(ve,Se,Pe,Me){ve.lastIndex=Se;var Ie=ve.exec(Pe);if(Ie&&Me&&Ie[1]){var Ve=Ie[1].length;Ie.index+=Ve,Ie[0]=Ie[0].slice(Ve)}return Ie}function L(ve,Se,Pe,Me,Ie,Ve){for(var Ze in Pe)if(!(!Pe.hasOwnProperty(Ze)||!Pe[Ze])){var Je=Pe[Ze];Je=Array.isArray(Je)?Je:[Je];for(var nt=0;nt<Je.length;++nt){if(Ve&&Ve.cause==Ze+","+nt)return;var ut=Je[nt],ht=ut.inside,_t=!!ut.lookbehind,Dt=!!ut.greedy,qt=ut.alias;if(Dt&&!ut.pattern.global){var Lt=ut.pattern.toString().match(/[imsuy]*$/)[0];ut.pattern=RegExp(ut.pattern.source,Lt+"g")}for(var dr=ut.pattern||ut,Zt=Me.next,Cr=Ie;Zt!==Se.tail&&!(Ve&&Cr>=Ve.reach);Cr+=Zt.value.length,Zt=Zt.next){var yt=Zt.value;if(Se.length>ve.length)return;if(!(yt instanceof d)){var Vt=1,Er;if(Dt){if(Er=b(dr,Cr,ve,_t),!Er||Er.index>=ve.length)break;var Ir=Er.index,sr=Er.index+Er[0].length,or=Cr;for(or+=Zt.value.length;Ir>=or;)Zt=Zt.next,or+=Zt.value.length;if(or-=Zt.value.length,Cr=or,Zt.value instanceof d)continue;for(var Ar=Zt;Ar!==Se.tail&&(or<sr||typeof Ar.value=="string");Ar=Ar.next)Vt++,or+=Ar.value.length;Vt--,yt=ve.slice(Cr,or),Er.index-=Cr}else if(Er=b(dr,0,yt,_t),!Er)continue;var Ir=Er.index,_n=Er[0],Un=yt.slice(0,Ir),Qn=yt.slice(Ir+_n.length),Jn=Cr+yt.length;Ve&&Jn>Ve.reach&&(Ve.reach=Jn);var Vn=Zt.prev;Un&&(Vn=V(Se,Vn,Un),Cr+=Un.length),X(Se,Vn,Vt);var jn=new d(Ze,ht?s.tokenize(_n,ht):_n,qt,_n);if(Zt=V(Se,Vn,jn),Qn&&V(Se,Zt,Qn),Vt>1){var Lr={cause:Ze+","+nt,reach:Jn};L(ve,Se,Pe,Zt.prev,Cr,Lr),Ve&&Lr.reach>Ve.reach&&(Ve.reach=Lr.reach)}}}}}}function B(){var ve={value:null,prev:null,next:null},Se={value:null,prev:ve,next:null};ve.next=Se,this.head=ve,this.tail=Se,this.length=0}function V(ve,Se,Pe){var Me=Se.next,Ie={value:Pe,prev:Se,next:Me};return Se.next=Ie,Me.prev=Ie,ve.length++,Ie}function X(ve,Se,Pe){for(var Me=Se.next,Ie=0;Ie<Pe&&Me!==ve.tail;Ie++)Me=Me.next;Se.next=Me,Me.prev=Se,ve.length-=Ie}function ie(ve){for(var Se=[],Pe=ve.head.next;Pe!==ve.tail;)Se.push(Pe.value),Pe=Pe.next;return Se}if(!n.document)return n.addEventListener&&(s.disableWorkerMessageHandler||n.addEventListener("message",function(ve){var Se=JSON.parse(ve.data),Pe=Se.language,Me=Se.code,Ie=Se.immediateClose;n.postMessage(s.highlight(Me,s.languages[Pe],Pe)),Ie&&n.close()},!1)),s;var de=s.util.currentScript();de&&(s.filename=de.src,de.hasAttribute("data-manual")&&(s.manual=!0));function ae(){s.manual||s.highlightAll()}if(!s.manual){var U=document.readyState;U==="loading"||U==="interactive"&&de&&de.defer?document.addEventListener("DOMContentLoaded",ae):window.requestAnimationFrame?window.requestAnimationFrame(ae):window.setTimeout(ae,16)}return s})(e);t.exports&&(t.exports=r),typeof H3<"u"&&(H3.Prism=r)})(Lse)),Lse.exports}var Ose,C6e;function Myr(){if(C6e)return Ose;C6e=1,Ose=t,t.displayName="markup",t.aliases=["html","mathml","svg","xml","ssml","atom","rss"];function t(e){e.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.value.replace(/&amp;/,"&"))}),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(n,i){var a={};a["language-"+i]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:e.languages[i]},a.cdata=/^<!\[CDATA\[|\]\]>$/i;var o={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:a}};o["language-"+i]={pattern:/[\s\S]+/,inside:e.languages[i]};var s={};s[n]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return n}),"i"),lookbehind:!0,greedy:!0,inside:o},e.languages.insertBefore("markup","cdata",s)}}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:function(r,n){e.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:e.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml}return Ose}var Nse,M6e;function Ryr(){if(M6e)return Nse;M6e=1,Nse=t,t.displayName="css",t.aliases=[];function t(e){(function(r){var n=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+n.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+n.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+n.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:n,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var i=r.languages.markup;i&&(i.tag.addInlined("style","css"),i.tag.addAttribute("style","css"))})(e)}return Nse}var Fse,R6e;function kyr(){if(R6e)return Fse;R6e=1,Fse=t,t.displayName="clike",t.aliases=[];function t(e){e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}return Fse}var zse,k6e;function Iyr(){if(k6e)return zse;k6e=1,zse=t,t.displayName="javascript",t.aliases=["js"];function t(e){e.languages.javascript=e.languages.extend("clike",{"class-name":[e.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,e.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:e.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),e.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),e.languages.markup&&(e.languages.markup.tag.addInlined("script","javascript"),e.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),e.languages.js=e.languages.javascript}return zse}var Bse,I6e;function Pyr(){if(I6e)return Bse;I6e=1;var t=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof H3=="object"?H3:{},e=Me();t.Prism={manual:!0,disableWorkerMessageHandler:!0};var r=_gr(),n=Ayr(),i=Cyr(),a=Myr(),o=Ryr(),s=kyr(),d=Iyr();e();var b={}.hasOwnProperty;function L(){}L.prototype=i;var B=new L;Bse=B,B.highlight=ie,B.register=V,B.alias=X,B.registered=de,B.listLanguages=ae,V(a),V(o),V(s),V(d),B.util.encode=Se,B.Token.stringify=U;function V(Ie){if(typeof Ie!="function"||!Ie.displayName)throw new Error("Expected `function` for `grammar`, got `"+Ie+"`");B.languages[Ie.displayName]===void 0&&Ie(B)}function X(Ie,Ve){var Ze=B.languages,Je=Ie,nt,ut,ht,_t;Ve&&(Je={},Je[Ie]=Ve);for(nt in Je)for(ut=Je[nt],ut=typeof ut=="string"?[ut]:ut,ht=ut.length,_t=-1;++_t<ht;)Ze[ut[_t]]=Ze[nt]}function ie(Ie,Ve){var Ze=i.highlight,Je;if(typeof Ie!="string")throw new Error("Expected `string` for `value`, got `"+Ie+"`");if(B.util.type(Ve)==="Object")Je=Ve,Ve=null;else{if(typeof Ve!="string")throw new Error("Expected `string` for `name`, got `"+Ve+"`");if(b.call(B.languages,Ve))Je=B.languages[Ve];else throw new Error("Unknown language: `"+Ve+"` is not registered")}return Ze.call(this,Ie,Je,Ve)}function de(Ie){if(typeof Ie!="string")throw new Error("Expected `string` for `language`, got `"+Ie+"`");return b.call(B.languages,Ie)}function ae(){var Ie=B.languages,Ve=[],Ze;for(Ze in Ie)b.call(Ie,Ze)&&typeof Ie[Ze]=="object"&&Ve.push(Ze);return Ve}function U(Ie,Ve,Ze){var Je;return typeof Ie=="string"?{type:"text",value:Ie}:B.util.type(Ie)==="Array"?ve(Ie,Ve):(Je={type:Ie.type,content:B.Token.stringify(Ie.content,Ve,Ze),tag:"span",classes:["token",Ie.type],attributes:{},language:Ve,parent:Ze},Ie.alias&&(Je.classes=Je.classes.concat(Ie.alias)),B.hooks.run("wrap",Je),r(Je.tag+"."+Je.classes.join("."),Pe(Je.attributes),Je.content))}function ve(Ie,Ve){for(var Ze=[],Je=Ie.length,nt=-1,ut;++nt<Je;)ut=Ie[nt],ut!==""&&ut!==null&&ut!==void 0&&Ze.push(ut);for(nt=-1,Je=Ze.length;++nt<Je;)ut=Ze[nt],Ze[nt]=B.Token.stringify(ut,Ve,Ze);return Ze}function Se(Ie){return Ie}function Pe(Ie){var Ve;for(Ve in Ie)Ie[Ve]=n(Ie[Ve]);return Ie}function Me(){var Ie="Prism"in t,Ve=Ie?t.Prism:void 0;return Ze;function Ze(){Ie?t.Prism=Ve:delete t.Prism,Ie=void 0,Ve=void 0}}return Bse}const Dyr={'code[class*="language-"]':{color:"black",background:"none",textShadow:"0 1px white",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"black",background:"#f5f2f0",textShadow:"0 1px white",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"]::selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#b3d4fc"},':not(pre) > code[class*="language-"]':{background:"#f5f2f0",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"slategray"},prolog:{color:"slategray"},doctype:{color:"slategray"},cdata:{color:"slategray"},punctuation:{color:"#999"},namespace:{Opacity:".7"},property:{color:"#905"},tag:{color:"#905"},boolean:{color:"#905"},number:{color:"#905"},constant:{color:"#905"},symbol:{color:"#905"},deleted:{color:"#905"},selector:{color:"#690"},"attr-name":{color:"#690"},string:{color:"#690"},char:{color:"#690"},builtin:{color:"#690"},inserted:{color:"#690"},operator:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},entity:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)",cursor:"help"},url:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".language-css .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".style .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},atrule:{color:"#07a"},"attr-value":{color:"#07a"},keyword:{color:"#07a"},function:{color:"#DD4A68"},"class-name":{color:"#DD4A68"},regex:{color:"#e90"},important:{color:"#e90",fontWeight:"bold"},variable:{color:"#e90"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}};var Use,P6e;function Lyr(){if(P6e)return Use;P6e=1,Use=t,t.displayName="abap",t.aliases=[];function t(e){e.languages.abap={comment:/^\*.*/m,string:/(`|')(?:\\.|(?!\1)[^\\\r\n])*\1/,"string-template":{pattern:/([|}])(?:\\.|[^\\|{\r\n])*(?=[|{])/,lookbehind:!0,alias:"string"},"eol-comment":{pattern:/(^|\s)".*/m,lookbehind:!0,alias:"comment"},keyword:{pattern:/(\s|\.|^)(?:SCIENTIFIC_WITH_LEADING_ZERO|SCALE_PRESERVING_SCIENTIFIC|RMC_COMMUNICATION_FAILURE|END-ENHANCEMENT-SECTION|MULTIPLY-CORRESPONDING|SUBTRACT-CORRESPONDING|VERIFICATION-MESSAGE|DIVIDE-CORRESPONDING|ENHANCEMENT-SECTION|CURRENCY_CONVERSION|RMC_SYSTEM_FAILURE|START-OF-SELECTION|MOVE-CORRESPONDING|RMC_INVALID_STATUS|CUSTOMER-FUNCTION|END-OF-DEFINITION|ENHANCEMENT-POINT|SYSTEM-EXCEPTIONS|ADD-CORRESPONDING|SCALE_PRESERVING|SELECTION-SCREEN|CURSOR-SELECTION|END-OF-SELECTION|LOAD-OF-PROGRAM|SCROLL-BOUNDARY|SELECTION-TABLE|EXCEPTION-TABLE|IMPLEMENTATIONS|PARAMETER-TABLE|RIGHT-JUSTIFIED|UNIT_CONVERSION|AUTHORITY-CHECK|LIST-PROCESSING|SIGN_AS_POSTFIX|COL_BACKGROUND|IMPLEMENTATION|INTERFACE-POOL|TRANSFORMATION|IDENTIFICATION|ENDENHANCEMENT|LINE-SELECTION|INITIALIZATION|LEFT-JUSTIFIED|SELECT-OPTIONS|SELECTION-SETS|COMMUNICATION|CORRESPONDING|DECIMAL_SHIFT|PRINT-CONTROL|VALUE-REQUEST|CHAIN-REQUEST|FUNCTION-POOL|FIELD-SYMBOLS|FUNCTIONALITY|INVERTED-DATE|SELECTION-SET|CLASS-METHODS|OUTPUT-LENGTH|CLASS-CODING|COL_NEGATIVE|ERRORMESSAGE|FIELD-GROUPS|HELP-REQUEST|NO-EXTENSION|NO-TOPOFPAGE|REDEFINITION|DISPLAY-MODE|ENDINTERFACE|EXIT-COMMAND|FIELD-SYMBOL|NO-SCROLLING|SHORTDUMP-ID|ACCESSPOLICY|CLASS-EVENTS|COL_POSITIVE|DECLARATIONS|ENHANCEMENTS|FILTER-TABLE|SWITCHSTATES|SYNTAX-CHECK|TRANSPORTING|ASYNCHRONOUS|SYNTAX-TRACE|TOKENIZATION|USER-COMMAND|WITH-HEADING|ABAP-SOURCE|BREAK-POINT|CHAIN-INPUT|COMPRESSION|FIXED-POINT|NEW-SECTION|NON-UNICODE|OCCURRENCES|RESPONSIBLE|SYSTEM-CALL|TRACE-TABLE|ABBREVIATED|CHAR-TO-HEX|END-OF-FILE|ENDFUNCTION|ENVIRONMENT|ASSOCIATION|COL_HEADING|EDITOR-CALL|END-OF-PAGE|ENGINEERING|IMPLEMENTED|INTENSIFIED|RADIOBUTTON|SYSTEM-EXIT|TOP-OF-PAGE|TRANSACTION|APPLICATION|CONCATENATE|DESTINATION|ENHANCEMENT|IMMEDIATELY|NO-GROUPING|PRECOMPILED|REPLACEMENT|TITLE-LINES|ACTIVATION|BYTE-ORDER|CLASS-POOL|CONNECTION|CONVERSION|DEFINITION|DEPARTMENT|EXPIRATION|INHERITING|MESSAGE-ID|NO-HEADING|PERFORMING|QUEUE-ONLY|RIGHTSPACE|SCIENTIFIC|STATUSINFO|STRUCTURES|SYNCPOINTS|WITH-TITLE|ATTRIBUTES|BOUNDARIES|CLASS-DATA|COL_NORMAL|DD\/MM\/YYYY|DESCENDING|INTERFACES|LINE-COUNT|MM\/DD\/YYYY|NON-UNIQUE|PRESERVING|SELECTIONS|STATEMENTS|SUBROUTINE|TRUNCATION|TYPE-POOLS|ARITHMETIC|BACKGROUND|ENDPROVIDE|EXCEPTIONS|IDENTIFIER|INDEX-LINE|OBLIGATORY|PARAMETERS|PERCENTAGE|PUSHBUTTON|RESOLUTION|COMPONENTS|DEALLOCATE|DISCONNECT|DUPLICATES|FIRST-LINE|HEAD-LINES|NO-DISPLAY|OCCURRENCE|RESPECTING|RETURNCODE|SUBMATCHES|TRACE-FILE|ASCENDING|BYPASSING|ENDMODULE|EXCEPTION|EXCLUDING|EXPORTING|INCREMENT|MATCHCODE|PARAMETER|PARTIALLY|PREFERRED|REFERENCE|REPLACING|RETURNING|SELECTION|SEPARATED|SPECIFIED|STATEMENT|TIMESTAMP|TYPE-POOL|ACCEPTING|APPENDAGE|ASSIGNING|COL_GROUP|COMPARING|CONSTANTS|DANGEROUS|IMPORTING|INSTANCES|LEFTSPACE|LOG-POINT|QUICKINFO|READ-ONLY|SCROLLING|SQLSCRIPT|STEP-LOOP|TOP-LINES|TRANSLATE|APPENDING|AUTHORITY|CHARACTER|COMPONENT|CONDITION|DIRECTORY|DUPLICATE|MESSAGING|RECEIVING|SUBSCREEN|ACCORDING|COL_TOTAL|END-LINES|ENDMETHOD|ENDSELECT|EXPANDING|EXTENSION|INCLUDING|INFOTYPES|INTERFACE|INTERVALS|LINE-SIZE|PF-STATUS|PROCEDURE|PROTECTED|REQUESTED|RESUMABLE|RIGHTPLUS|SAP-SPOOL|SECONDARY|STRUCTURE|SUBSTRING|TABLEVIEW|NUMOFCHAR|ADJACENT|ANALYSIS|ASSIGNED|BACKWARD|CHANNELS|CHECKBOX|CONTINUE|CRITICAL|DATAINFO|DD\/MM\/YY|DURATION|ENCODING|ENDCLASS|FUNCTION|LEFTPLUS|LINEFEED|MM\/DD\/YY|OVERFLOW|RECEIVED|SKIPPING|SORTABLE|STANDARD|SUBTRACT|SUPPRESS|TABSTRIP|TITLEBAR|TRUNCATE|UNASSIGN|WHENEVER|ANALYZER|COALESCE|COMMENTS|CONDENSE|DECIMALS|DEFERRED|ENDWHILE|EXPLICIT|KEYWORDS|MESSAGES|POSITION|PRIORITY|RECEIVER|RENAMING|TIMEZONE|TRAILING|ALLOCATE|CENTERED|CIRCULAR|CONTROLS|CURRENCY|DELETING|DESCRIBE|DISTANCE|ENDCATCH|EXPONENT|EXTENDED|GENERATE|IGNORING|INCLUDES|INTERNAL|MAJOR-ID|MODIFIER|NEW-LINE|OPTIONAL|PROPERTY|ROLLBACK|STARTING|SUPPLIED|ABSTRACT|CHANGING|CONTEXTS|CREATING|CUSTOMER|DATABASE|DAYLIGHT|DEFINING|DISTINCT|DIVISION|ENABLING|ENDCHAIN|ESCAPING|HARMLESS|IMPLICIT|INACTIVE|LANGUAGE|MINOR-ID|MULTIPLY|NEW-PAGE|NO-TITLE|POS_HIGH|SEPARATE|TEXTPOOL|TRANSFER|SELECTOR|DBMAXLEN|ITERATOR|ARCHIVE|BIT-XOR|BYTE-CO|COLLECT|COMMENT|CURRENT|DEFAULT|DISPLAY|ENDFORM|EXTRACT|LEADING|LISTBOX|LOCATOR|MEMBERS|METHODS|NESTING|POS_LOW|PROCESS|PROVIDE|RAISING|RESERVE|SECONDS|SUMMARY|VISIBLE|BETWEEN|BIT-AND|BYTE-CS|CLEANUP|COMPUTE|CONTROL|CONVERT|DATASET|ENDCASE|FORWARD|HEADERS|HOTSPOT|INCLUDE|INVERSE|KEEPING|NO-ZERO|OBJECTS|OVERLAY|PADDING|PATTERN|PROGRAM|REFRESH|SECTION|SUMMING|TESTING|VERSION|WINDOWS|WITHOUT|BIT-NOT|BYTE-CA|BYTE-NA|CASTING|CONTEXT|COUNTRY|DYNAMIC|ENABLED|ENDLOOP|EXECUTE|FRIENDS|HANDLER|HEADING|INITIAL|\*-INPUT|LOGFILE|MAXIMUM|MINIMUM|NO-GAPS|NO-SIGN|PRAGMAS|PRIMARY|PRIVATE|REDUCED|REPLACE|REQUEST|RESULTS|UNICODE|WARNING|ALIASES|BYTE-CN|BYTE-NS|CALLING|COL_KEY|COLUMNS|CONNECT|ENDEXEC|ENTRIES|EXCLUDE|FILTERS|FURTHER|HELP-ID|LOGICAL|MAPPING|MESSAGE|NAMETAB|OPTIONS|PACKAGE|PERFORM|RECEIVE|STATICS|VARYING|BINDING|CHARLEN|GREATER|XSTRLEN|ACCEPT|APPEND|DETAIL|ELSEIF|ENDING|ENDTRY|FORMAT|FRAMES|GIVING|HASHED|HEADER|IMPORT|INSERT|MARGIN|MODULE|NATIVE|OBJECT|OFFSET|REMOTE|RESUME|SAVING|SIMPLE|SUBMIT|TABBED|TOKENS|UNIQUE|UNPACK|UPDATE|WINDOW|YELLOW|ACTUAL|ASPECT|CENTER|CURSOR|DELETE|DIALOG|DIVIDE|DURING|ERRORS|EVENTS|EXTEND|FILTER|HANDLE|HAVING|IGNORE|LITTLE|MEMORY|NO-GAP|OCCURS|OPTION|PERSON|PLACES|PUBLIC|REDUCE|REPORT|RESULT|SINGLE|SORTED|SWITCH|SYNTAX|TARGET|VALUES|WRITER|ASSERT|BLOCKS|BOUNDS|BUFFER|CHANGE|COLUMN|COMMIT|CONCAT|COPIES|CREATE|DDMMYY|DEFINE|ENDIAN|ESCAPE|EXPAND|KERNEL|LAYOUT|LEGACY|LEVELS|MMDDYY|NUMBER|OUTPUT|RANGES|READER|RETURN|SCREEN|SEARCH|SELECT|SHARED|SOURCE|STABLE|STATIC|SUBKEY|SUFFIX|TABLES|UNWIND|YYMMDD|ASSIGN|BACKUP|BEFORE|BINARY|BIT-OR|BLANKS|CLIENT|CODING|COMMON|DEMAND|DYNPRO|EXCEPT|EXISTS|EXPORT|FIELDS|GLOBAL|GROUPS|LENGTH|LOCALE|MEDIUM|METHOD|MODIFY|NESTED|OTHERS|REJECT|SCROLL|SUPPLY|SYMBOL|ENDFOR|STRLEN|ALIGN|BEGIN|BOUND|ENDAT|ENTRY|EVENT|FINAL|FLUSH|GRANT|INNER|SHORT|USING|WRITE|AFTER|BLACK|BLOCK|CLOCK|COLOR|COUNT|DUMMY|EMPTY|ENDDO|ENDON|GREEN|INDEX|INOUT|LEAVE|LEVEL|LINES|MODIF|ORDER|OUTER|RANGE|RESET|RETRY|RIGHT|SMART|SPLIT|STYLE|TABLE|THROW|UNDER|UNTIL|UPPER|UTF-8|WHERE|ALIAS|BLANK|CLEAR|CLOSE|EXACT|FETCH|FIRST|FOUND|GROUP|LLANG|LOCAL|OTHER|REGEX|SPOOL|TITLE|TYPES|VALID|WHILE|ALPHA|BOXED|CATCH|CHAIN|CHECK|CLASS|COVER|ENDIF|EQUIV|FIELD|FLOOR|FRAME|INPUT|LOWER|MATCH|NODES|PAGES|PRINT|RAISE|ROUND|SHIFT|SPACE|SPOTS|STAMP|STATE|TASKS|TIMES|TRMAC|ULINE|UNION|VALUE|WIDTH|EQUAL|LOG10|TRUNC|BLOB|CASE|CEIL|CLOB|COND|EXIT|FILE|GAPS|HOLD|INCL|INTO|KEEP|KEYS|LAST|LINE|LONG|LPAD|MAIL|MODE|OPEN|PINK|READ|ROWS|TEST|THEN|ZERO|AREA|BACK|BADI|BYTE|CAST|EDIT|EXEC|FAIL|FIND|FKEQ|FONT|FREE|GKEQ|HIDE|INIT|ITNO|LATE|LOOP|MAIN|MARK|MOVE|NEXT|NULL|RISK|ROLE|UNIT|WAIT|ZONE|BASE|CALL|CODE|DATA|DATE|FKGE|GKGE|HIGH|KIND|LEFT|LIST|MASK|MESH|NAME|NODE|PACK|PAGE|POOL|SEND|SIGN|SIZE|SOME|STOP|TASK|TEXT|TIME|USER|VARY|WITH|WORD|BLUE|CONV|COPY|DEEP|ELSE|FORM|FROM|HINT|ICON|JOIN|LIKE|LOAD|ONLY|PART|SCAN|SKIP|SORT|TYPE|UNIX|VIEW|WHEN|WORK|ACOS|ASIN|ATAN|COSH|EACH|FRAC|LESS|RTTI|SINH|SQRT|TANH|AVG|BIT|DIV|ISO|LET|OUT|PAD|SQL|ALL|CI_|CPI|END|LOB|LPI|MAX|MIN|NEW|OLE|RUN|SET|\?TO|YES|ABS|ADD|AND|BIG|FOR|HDB|JOB|LOW|NOT|SAP|TRY|VIA|XML|ANY|GET|IDS|KEY|MOD|OFF|PUT|RAW|RED|REF|SUM|TAB|XSD|CNT|COS|EXP|LOG|SIN|TAN|XOR|AT|CO|CP|DO|GT|ID|IF|NS|OR|BT|CA|CS|GE|NA|NB|EQ|IN|LT|NE|NO|OF|ON|PF|TO|AS|BY|CN|IS|LE|NP|UP|E|I|M|O|Z|C|X)\b/i,lookbehind:!0},number:/\b\d+\b/,operator:{pattern:/(\s)(?:\*\*?|<[=>]?|>=?|\?=|[-+\/=])(?=\s)/,lookbehind:!0},"string-operator":{pattern:/(\s)&&?(?=\s)/,lookbehind:!0,alias:"keyword"},"token-operator":[{pattern:/(\w)(?:->?|=>|[~|{}])(?=\w)/,lookbehind:!0,alias:"punctuation"},{pattern:/[|{}]/,alias:"punctuation"}],punctuation:/[,.:()]/}}return Use}var Hse,D6e;function Oyr(){if(D6e)return Hse;D6e=1,Hse=t,t.displayName="abnf",t.aliases=[];function t(e){(function(r){var n="(?:ALPHA|BIT|CHAR|CR|CRLF|CTL|DIGIT|DQUOTE|HEXDIG|HTAB|LF|LWSP|OCTET|SP|VCHAR|WSP)";r.languages.abnf={comment:/;.*/,string:{pattern:/(?:%[is])?"[^"\n\r]*"/,greedy:!0,inside:{punctuation:/^%[is]/}},range:{pattern:/%(?:b[01]+-[01]+|d\d+-\d+|x[A-F\d]+-[A-F\d]+)/i,alias:"number"},terminal:{pattern:/%(?:b[01]+(?:\.[01]+)*|d\d+(?:\.\d+)*|x[A-F\d]+(?:\.[A-F\d]+)*)/i,alias:"number"},repetition:{pattern:/(^|[^\w-])(?:\d*\*\d*|\d+)/,lookbehind:!0,alias:"operator"},definition:{pattern:/(^[ \t]*)(?:[a-z][\w-]*|<[^<>\r\n]*>)(?=\s*=)/m,lookbehind:!0,alias:"keyword",inside:{punctuation:/<|>/}},"core-rule":{pattern:RegExp("(?:(^|[^<\\w-])"+n+"|<"+n+">)(?![\\w-])","i"),lookbehind:!0,alias:["rule","constant"],inside:{punctuation:/<|>/}},rule:{pattern:/(^|[^<\w-])[a-z][\w-]*|<[^<>\r\n]*>/i,lookbehind:!0,inside:{punctuation:/<|>/}},operator:/=\/?|\//,punctuation:/[()\[\]]/}})(e)}return Hse}var jse,L6e;function Nyr(){if(L6e)return jse;L6e=1,jse=t,t.displayName="actionscript",t.aliases=[];function t(e){e.languages.actionscript=e.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),e.languages.actionscript["class-name"].alias="function",delete e.languages.actionscript.parameter,delete e.languages.actionscript["literal-property"],e.languages.markup&&e.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:e.languages.markup}})}return jse}var Vse,O6e;function Fyr(){if(O6e)return Vse;O6e=1,Vse=t,t.displayName="ada",t.aliases=[];function t(e){e.languages.ada={comment:/--.*/,string:/"(?:""|[^"\r\f\n])*"/,number:[{pattern:/\b\d(?:_?\d)*#[\dA-F](?:_?[\dA-F])*(?:\.[\dA-F](?:_?[\dA-F])*)?#(?:E[+-]?\d(?:_?\d)*)?/i},{pattern:/\b\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:E[+-]?\d(?:_?\d)*)?\b/i}],"attr-name":/\b'\w+/,keyword:/\b(?:abort|abs|abstract|accept|access|aliased|all|and|array|at|begin|body|case|constant|declare|delay|delta|digits|do|else|elsif|end|entry|exception|exit|for|function|generic|goto|if|in|interface|is|limited|loop|mod|new|not|null|of|others|out|overriding|package|pragma|private|procedure|protected|raise|range|record|rem|renames|requeue|return|reverse|select|separate|some|subtype|synchronized|tagged|task|terminate|then|type|until|use|when|while|with|xor)\b/i,boolean:/\b(?:false|true)\b/i,operator:/<[=>]?|>=?|=>?|:=|\/=?|\*\*?|[&+-]/,punctuation:/\.\.?|[,;():]/,char:/'.'/,variable:/\b[a-z](?:\w)*\b/i}}return Vse}var qse,N6e;function zyr(){if(N6e)return qse;N6e=1,qse=t,t.displayName="agda",t.aliases=[];function t(e){(function(r){r.languages.agda={comment:/\{-[\s\S]*?(?:-\}|$)|--.*/,string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},punctuation:/[(){}⦃⦄.;@]/,"class-name":{pattern:/((?:data|record) +)\S+/,lookbehind:!0},function:{pattern:/(^[ \t]*)(?!\s)[^:\r\n]+(?=:)/m,lookbehind:!0},operator:{pattern:/(^\s*|\s)(?:[=|:∀→λ\\?_]|->)(?=\s)/,lookbehind:!0},keyword:/\b(?:Set|abstract|constructor|data|eta-equality|field|forall|hiding|import|in|inductive|infix|infixl|infixr|instance|let|macro|module|mutual|no-eta-equality|open|overlap|pattern|postulate|primitive|private|public|quote|quoteContext|quoteGoal|quoteTerm|record|renaming|rewrite|syntax|tactic|unquote|unquoteDecl|unquoteDef|using|variable|where|with)\b/}})(e)}return qse}var Gse,F6e;function Byr(){if(F6e)return Gse;F6e=1,Gse=t,t.displayName="al",t.aliases=[];function t(e){e.languages.al={comment:/\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/'(?:''|[^'\r\n])*'(?!')|"(?:""|[^"\r\n])*"(?!")/,greedy:!0},function:{pattern:/(\b(?:event|procedure|trigger)\s+|(?:^|[^.])\.\s*)[a-z_]\w*(?=\s*\()/i,lookbehind:!0},keyword:[/\b(?:array|asserterror|begin|break|case|do|downto|else|end|event|exit|for|foreach|function|if|implements|in|indataset|interface|internal|local|of|procedure|program|protected|repeat|runonclient|securityfiltering|suppressdispose|temporary|then|to|trigger|until|var|while|with|withevents)\b/i,/\b(?:action|actions|addafter|addbefore|addfirst|addlast|area|assembly|chartpart|codeunit|column|controladdin|cuegroup|customizes|dataitem|dataset|dotnet|elements|enum|enumextension|extends|field|fieldattribute|fieldelement|fieldgroup|fieldgroups|fields|filter|fixed|grid|group|key|keys|label|labels|layout|modify|moveafter|movebefore|movefirst|movelast|page|pagecustomization|pageextension|part|profile|query|repeater|report|requestpage|schema|separator|systempart|table|tableelement|tableextension|textattribute|textelement|type|usercontrol|value|xmlport)\b/i],number:/\b(?:0x[\da-f]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?)(?:F|LL?|U(?:LL?)?)?\b/i,boolean:/\b(?:false|true)\b/i,variable:/\b(?:Curr(?:FieldNo|Page|Report)|x?Rec|RequestOptionsPage)\b/,"class-name":/\b(?:automation|biginteger|bigtext|blob|boolean|byte|char|clienttype|code|completiontriggererrorlevel|connectiontype|database|dataclassification|datascope|date|dateformula|datetime|decimal|defaultlayout|dialog|dictionary|dotnetassembly|dotnettypedeclaration|duration|errorinfo|errortype|executioncontext|executionmode|fieldclass|fieldref|fieldtype|file|filterpagebuilder|guid|httpclient|httpcontent|httpheaders|httprequestmessage|httpresponsemessage|instream|integer|joker|jsonarray|jsonobject|jsontoken|jsonvalue|keyref|list|moduledependencyinfo|moduleinfo|none|notification|notificationscope|objecttype|option|outstream|pageresult|record|recordid|recordref|reportformat|securityfilter|sessionsettings|tableconnectiontype|tablefilter|testaction|testfield|testfilterfield|testpage|testpermissions|testrequestpage|text|textbuilder|textconst|textencoding|time|transactionmodel|transactiontype|variant|verbosity|version|view|views|webserviceactioncontext|webserviceactionresultcode|xmlattribute|xmlattributecollection|xmlcdata|xmlcomment|xmldeclaration|xmldocument|xmldocumenttype|xmlelement|xmlnamespacemanager|xmlnametable|xmlnode|xmlnodelist|xmlprocessinginstruction|xmlreadoptions|xmltext|xmlwriteoptions)\b/i,operator:/\.\.|:[=:]|[-+*/]=?|<>|[<>]=?|=|\b(?:and|div|mod|not|or|xor)\b/i,punctuation:/[()\[\]{}:.;,]/}}return Gse}var $se,z6e;function Uyr(){if(z6e)return $se;z6e=1,$se=t,t.displayName="antlr4",t.aliases=["g4"];function t(e){e.languages.antlr4={comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,string:{pattern:/'(?:\\.|[^\\'\r\n])*'/,greedy:!0},"character-class":{pattern:/\[(?:\\.|[^\\\]\r\n])*\]/,greedy:!0,alias:"regex",inside:{range:{pattern:/([^[]|(?:^|[^\\])(?:\\\\)*\\\[)-(?!\])/,lookbehind:!0,alias:"punctuation"},escape:/\\(?:u(?:[a-fA-F\d]{4}|\{[a-fA-F\d]+\})|[pP]\{[=\w-]+\}|[^\r\nupP])/,punctuation:/[\[\]]/}},action:{pattern:/\{(?:[^{}]|\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})*\}/,greedy:!0,inside:{content:{pattern:/(\{)[\s\S]+(?=\})/,lookbehind:!0},punctuation:/[{}]/}},command:{pattern:/(->\s*(?!\s))(?:\s*(?:,\s*)?\b[a-z]\w*(?:\s*\([^()\r\n]*\))?)+(?=\s*;)/i,lookbehind:!0,inside:{function:/\b\w+(?=\s*(?:[,(]|$))/,punctuation:/[,()]/}},annotation:{pattern:/@\w+(?:::\w+)*/,alias:"keyword"},label:{pattern:/#[ \t]*\w+/,alias:"punctuation"},keyword:/\b(?:catch|channels|finally|fragment|grammar|import|lexer|locals|mode|options|parser|returns|throws|tokens)\b/,definition:[{pattern:/\b[a-z]\w*(?=\s*:)/,alias:["rule","class-name"]},{pattern:/\b[A-Z]\w*(?=\s*:)/,alias:["token","constant"]}],constant:/\b[A-Z][A-Z_]*\b/,operator:/\.\.|->|[|~]|[*+?]\??/,punctuation:/[;:()=]/},e.languages.g4=e.languages.antlr4}return $se}var Wse,B6e;function Hyr(){if(B6e)return Wse;B6e=1,Wse=t,t.displayName="apacheconf",t.aliases=[];function t(e){e.languages.apacheconf={comment:/#.*/,"directive-inline":{pattern:/(^[\t ]*)\b(?:AcceptFilter|AcceptPathInfo|AccessFileName|Action|Add(?:Alt|AltByEncoding|AltByType|Charset|DefaultCharset|Description|Encoding|Handler|Icon|IconByEncoding|IconByType|InputFilter|Language|ModuleInfo|OutputFilter|OutputFilterByType|Type)|Alias|AliasMatch|Allow(?:CONNECT|EncodedSlashes|Methods|Override|OverrideList)?|Anonymous(?:_LogEmail|_MustGiveEmail|_NoUserID|_VerifyEmail)?|AsyncRequestWorkerFactor|Auth(?:BasicAuthoritative|BasicFake|BasicProvider|BasicUseDigestAlgorithm|DBDUserPWQuery|DBDUserRealmQuery|DBMGroupFile|DBMType|DBMUserFile|Digest(?:Algorithm|Domain|NonceLifetime|Provider|Qop|ShmemSize)|Form(?:Authoritative|Body|DisableNoStore|FakeBasicAuth|Location|LoginRequiredLocation|LoginSuccessLocation|LogoutLocation|Method|Mimetype|Password|Provider|SitePassphrase|Size|Username)|GroupFile|LDAP(?:AuthorizePrefix|BindAuthoritative|BindDN|BindPassword|CharsetConfig|CompareAsUser|CompareDNOnServer|DereferenceAliases|GroupAttribute|GroupAttributeIsDN|InitialBindAsUser|InitialBindPattern|MaxSubGroupDepth|RemoteUserAttribute|RemoteUserIsDN|SearchAsUser|SubGroupAttribute|SubGroupClass|Url)|Merging|Name|nCache(?:Context|Enable|ProvideFor|SOCache|Timeout)|nzFcgiCheckAuthnProvider|nzFcgiDefineProvider|Type|UserFile|zDBDLoginToReferer|zDBDQuery|zDBDRedirectQuery|zDBMType|zSendForbiddenOnFailure)|BalancerGrowth|BalancerInherit|BalancerMember|BalancerPersist|BrowserMatch|BrowserMatchNoCase|BufferedLogs|BufferSize|Cache(?:DefaultExpire|DetailHeader|DirLength|DirLevels|Disable|Enable|File|Header|IgnoreCacheControl|IgnoreHeaders|IgnoreNoLastMod|IgnoreQueryString|IgnoreURLSessionIdentifiers|KeyBaseURL|LastModifiedFactor|Lock|LockMaxAge|LockPath|MaxExpire|MaxFileSize|MinExpire|MinFileSize|NegotiatedDocs|QuickHandler|ReadSize|ReadTime|Root|Socache(?:MaxSize|MaxTime|MinTime|ReadSize|ReadTime)?|StaleOnError|StoreExpired|StoreNoStore|StorePrivate)|CGIDScriptTimeout|CGIMapExtension|CharsetDefault|CharsetOptions|CharsetSourceEnc|CheckCaseOnly|CheckSpelling|ChrootDir|ContentDigest|CookieDomain|CookieExpires|CookieName|CookieStyle|CookieTracking|CoreDumpDirectory|CustomLog|Dav|DavDepthInfinity|DavGenericLockDB|DavLockDB|DavMinTimeout|DBDExptime|DBDInitSQL|DBDKeep|DBDMax|DBDMin|DBDParams|DBDPersist|DBDPrepareSQL|DBDriver|DefaultIcon|DefaultLanguage|DefaultRuntimeDir|DefaultType|Define|Deflate(?:BufferSize|CompressionLevel|FilterNote|InflateLimitRequestBody|InflateRatio(?:Burst|Limit)|MemLevel|WindowSize)|Deny|DirectoryCheckHandler|DirectoryIndex|DirectoryIndexRedirect|DirectorySlash|DocumentRoot|DTracePrivileges|DumpIOInput|DumpIOOutput|EnableExceptionHook|EnableMMAP|EnableSendfile|Error|ErrorDocument|ErrorLog|ErrorLogFormat|Example|ExpiresActive|ExpiresByType|ExpiresDefault|ExtendedStatus|ExtFilterDefine|ExtFilterOptions|FallbackResource|FileETag|FilterChain|FilterDeclare|FilterProtocol|FilterProvider|FilterTrace|ForceLanguagePriority|ForceType|ForensicLog|GprofDir|GracefulShutdownTimeout|Group|Header|HeaderName|Heartbeat(?:Address|Listen|MaxServers|Storage)|HostnameLookups|IdentityCheck|IdentityCheckTimeout|ImapBase|ImapDefault|ImapMenu|Include|IncludeOptional|Index(?:HeadInsert|Ignore|IgnoreReset|Options|OrderDefault|StyleSheet)|InputSed|ISAPI(?:AppendLogToErrors|AppendLogToQuery|CacheFile|FakeAsync|LogNotSupported|ReadAheadBuffer)|KeepAlive|KeepAliveTimeout|KeptBodySize|LanguagePriority|LDAP(?:CacheEntries|CacheTTL|ConnectionPoolTTL|ConnectionTimeout|LibraryDebug|OpCacheEntries|OpCacheTTL|ReferralHopLimit|Referrals|Retries|RetryDelay|SharedCacheFile|SharedCacheSize|Timeout|TrustedClientCert|TrustedGlobalCert|TrustedMode|VerifyServerCert)|Limit(?:InternalRecursion|Request(?:Body|Fields|FieldSize|Line)|XMLRequestBody)|Listen|ListenBackLog|LoadFile|LoadModule|LogFormat|LogLevel|LogMessage|LuaAuthzProvider|LuaCodeCache|Lua(?:Hook(?:AccessChecker|AuthChecker|CheckUserID|Fixups|InsertFilter|Log|MapToStorage|TranslateName|TypeChecker)|Inherit|InputFilter|MapHandler|OutputFilter|PackageCPath|PackagePath|QuickHandler|Root|Scope)|Max(?:ConnectionsPerChild|KeepAliveRequests|MemFree|RangeOverlaps|RangeReversals|Ranges|RequestWorkers|SpareServers|SpareThreads|Threads)|MergeTrailers|MetaDir|MetaFiles|MetaSuffix|MimeMagicFile|MinSpareServers|MinSpareThreads|MMapFile|ModemStandard|ModMimeUsePathInfo|MultiviewsMatch|Mutex|NameVirtualHost|NoProxy|NWSSLTrustedCerts|NWSSLUpgradeable|Options|Order|OutputSed|PassEnv|PidFile|PrivilegesMode|Protocol|ProtocolEcho|Proxy(?:AddHeaders|BadHeader|Block|Domain|ErrorOverride|ExpressDBMFile|ExpressDBMType|ExpressEnable|FtpDirCharset|FtpEscapeWildcards|FtpListOnWildcard|HTML(?:BufSize|CharsetOut|DocType|Enable|Events|Extended|Fixups|Interp|Links|Meta|StripComments|URLMap)|IOBufferSize|MaxForwards|Pass(?:Inherit|InterpolateEnv|Match|Reverse|ReverseCookieDomain|ReverseCookiePath)?|PreserveHost|ReceiveBufferSize|Remote|RemoteMatch|Requests|SCGIInternalRedirect|SCGISendfile|Set|SourceAddress|Status|Timeout|Via)|ReadmeName|ReceiveBufferSize|Redirect|RedirectMatch|RedirectPermanent|RedirectTemp|ReflectorHeader|RemoteIP(?:Header|InternalProxy|InternalProxyList|ProxiesHeader|TrustedProxy|TrustedProxyList)|RemoveCharset|RemoveEncoding|RemoveHandler|RemoveInputFilter|RemoveLanguage|RemoveOutputFilter|RemoveType|RequestHeader|RequestReadTimeout|Require|Rewrite(?:Base|Cond|Engine|Map|Options|Rule)|RLimitCPU|RLimitMEM|RLimitNPROC|Satisfy|ScoreBoardFile|Script(?:Alias|AliasMatch|InterpreterSource|Log|LogBuffer|LogLength|Sock)?|SecureListen|SeeRequestTail|SendBufferSize|Server(?:Admin|Alias|Limit|Name|Path|Root|Signature|Tokens)|Session(?:Cookie(?:Name|Name2|Remove)|Crypto(?:Cipher|Driver|Passphrase|PassphraseFile)|DBD(?:CookieName|CookieName2|CookieRemove|DeleteLabel|InsertLabel|PerUser|SelectLabel|UpdateLabel)|Env|Exclude|Header|Include|MaxAge)?|SetEnv|SetEnvIf|SetEnvIfExpr|SetEnvIfNoCase|SetHandler|SetInputFilter|SetOutputFilter|SSIEndTag|SSIErrorMsg|SSIETag|SSILastModified|SSILegacyExprParser|SSIStartTag|SSITimeFormat|SSIUndefinedEcho|SSL(?:CACertificateFile|CACertificatePath|CADNRequestFile|CADNRequestPath|CARevocationCheck|CARevocationFile|CARevocationPath|CertificateChainFile|CertificateFile|CertificateKeyFile|CipherSuite|Compression|CryptoDevice|Engine|FIPS|HonorCipherOrder|InsecureRenegotiation|OCSP(?:DefaultResponder|Enable|OverrideResponder|ResponderTimeout|ResponseMaxAge|ResponseTimeSkew|UseRequestNonce)|OpenSSLConfCmd|Options|PassPhraseDialog|Protocol|Proxy(?:CACertificateFile|CACertificatePath|CARevocation(?:Check|File|Path)|CheckPeer(?:CN|Expire|Name)|CipherSuite|Engine|MachineCertificate(?:ChainFile|File|Path)|Protocol|Verify|VerifyDepth)|RandomSeed|RenegBufferSize|Require|RequireSSL|Session(?:Cache|CacheTimeout|TicketKeyFile|Tickets)|SRPUnknownUserSeed|SRPVerifierFile|Stapling(?:Cache|ErrorCacheTimeout|FakeTryLater|ForceURL|ResponderTimeout|ResponseMaxAge|ResponseTimeSkew|ReturnResponderErrors|StandardCacheTimeout)|StrictSNIVHostCheck|UserName|UseStapling|VerifyClient|VerifyDepth)|StartServers|StartThreads|Substitute|Suexec|SuexecUserGroup|ThreadLimit|ThreadsPerChild|ThreadStackSize|TimeOut|TraceEnable|TransferLog|TypesConfig|UnDefine|UndefMacro|UnsetEnv|Use|UseCanonicalName|UseCanonicalPhysicalPort|User|UserDir|VHostCGIMode|VHostCGIPrivs|VHostGroup|VHostPrivs|VHostSecure|VHostUser|Virtual(?:DocumentRoot|ScriptAlias)(?:IP)?|WatchdogInterval|XBitHack|xml2EncAlias|xml2EncDefault|xml2StartParse)\b/im,lookbehind:!0,alias:"property"},"directive-block":{pattern:/<\/?\b(?:Auth[nz]ProviderAlias|Directory|DirectoryMatch|Else|ElseIf|Files|FilesMatch|If|IfDefine|IfModule|IfVersion|Limit|LimitExcept|Location|LocationMatch|Macro|Proxy|Require(?:All|Any|None)|VirtualHost)\b.*>/i,inside:{"directive-block":{pattern:/^<\/?\w+/,inside:{punctuation:/^<\/?/},alias:"tag"},"directive-block-parameter":{pattern:/.*[^>]/,inside:{punctuation:/:/,string:{pattern:/("|').*\1/,inside:{variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/}}},alias:"attr-value"},punctuation:/>/},alias:"tag"},"directive-flags":{pattern:/\[(?:[\w=],?)+\]/,alias:"keyword"},string:{pattern:/("|').*\1/,inside:{variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/}},variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/,regex:/\^?.*\$|\^.*\$?/}}return Wse}var Yse,U6e;function fbe(){if(U6e)return Yse;U6e=1,Yse=t,t.displayName="sql",t.aliases=[];function t(e){e.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}}return Yse}var Xse,H6e;function jyr(){if(H6e)return Xse;H6e=1;var t=fbe();Xse=e,e.displayName="apex",e.aliases=[];function e(r){r.register(t),(function(n){var i=/\b(?:(?:after|before)(?=\s+[a-z])|abstract|activate|and|any|array|as|asc|autonomous|begin|bigdecimal|blob|boolean|break|bulk|by|byte|case|cast|catch|char|class|collect|commit|const|continue|currency|date|datetime|decimal|default|delete|desc|do|double|else|end|enum|exception|exit|export|extends|final|finally|float|for|from|get(?=\s*[{};])|global|goto|group|having|hint|if|implements|import|in|inner|insert|instanceof|int|integer|interface|into|join|like|limit|list|long|loop|map|merge|new|not|null|nulls|number|object|of|on|or|outer|override|package|parallel|pragma|private|protected|public|retrieve|return|rollback|select|set|short|sObject|sort|static|string|super|switch|synchronized|system|testmethod|then|this|throw|time|transaction|transient|trigger|try|undelete|update|upsert|using|virtual|void|webservice|when|where|while|(?:inherited|with|without)\s+sharing)\b/i,a=/\b(?:(?=[a-z_]\w*\s*[<\[])|(?!<keyword>))[A-Z_]\w*(?:\s*\.\s*[A-Z_]\w*)*\b(?:\s*(?:\[\s*\]|<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>))*/.source.replace(/<keyword>/g,function(){return i.source});function o(d){return RegExp(d.replace(/<CLASS-NAME>/g,function(){return a}),"i")}var s={keyword:i,punctuation:/[()\[\]{};,:.<>]/};n.languages.apex={comment:n.languages.clike.comment,string:n.languages.clike.string,sql:{pattern:/((?:[=,({:]|\breturn)\s*)\[[^\[\]]*\]/i,lookbehind:!0,greedy:!0,alias:"language-sql",inside:n.languages.sql},annotation:{pattern:/@\w+\b/,alias:"punctuation"},"class-name":[{pattern:o(/(\b(?:class|enum|extends|implements|instanceof|interface|new|trigger\s+\w+\s+on)\s+)<CLASS-NAME>/.source),lookbehind:!0,inside:s},{pattern:o(/(\(\s*)<CLASS-NAME>(?=\s*\)\s*[\w(])/.source),lookbehind:!0,inside:s},{pattern:o(/<CLASS-NAME>(?=\s*\w+\s*[;=,(){:])/.source),inside:s}],trigger:{pattern:/(\btrigger\s+)\w+\b/i,lookbehind:!0,alias:"class-name"},keyword:i,function:/\b[a-z_]\w*(?=\s*\()/i,boolean:/\b(?:false|true)\b/i,number:/(?:\B\.\d+|\b\d+(?:\.\d+|L)?)\b/i,operator:/[!=](?:==?)?|\?\.?|&&|\|\||--|\+\+|[-+*/^&|]=?|:|<<?=?|>{1,3}=?/,punctuation:/[()\[\]{};,.]/}})(r)}return Xse}var Zse,j6e;function Vyr(){if(j6e)return Zse;j6e=1,Zse=t,t.displayName="apl",t.aliases=[];function t(e){e.languages.apl={comment:/(?:⍝|#[! ]).*$/m,string:{pattern:/'(?:[^'\r\n]|'')*'/,greedy:!0},number:/¯?(?:\d*\.?\b\d+(?:e[+¯]?\d+)?|¯|∞)(?:j¯?(?:(?:\d+(?:\.\d+)?|\.\d+)(?:e[+¯]?\d+)?|¯|∞))?/i,statement:/:[A-Z][a-z][A-Za-z]*\b/,"system-function":{pattern:/⎕[A-Z]+/i,alias:"function"},constant:/[⍬⌾#⎕⍞]/,function:/[-+×÷⌈⌊∣|⍳⍸?*⍟○!⌹<≤=>≥≠≡≢∊⍷∪∩~∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⊆⊇⌷⍋⍒⊤⊥⍕⍎⊣⊢⍁⍂≈⍯↗¤→]/,"monadic-operator":{pattern:/[\\\/⌿⍀¨⍨⌶&∥]/,alias:"operator"},"dyadic-operator":{pattern:/[.⍣⍠⍤∘⌸@⌺⍥]/,alias:"operator"},assignment:{pattern:/←/,alias:"keyword"},punctuation:/[\[;\]()◇⋄]/,dfn:{pattern:/[{}⍺⍵⍶⍹∇⍫:]/,alias:"builtin"}}}return Zse}var Kse,V6e;function qyr(){if(V6e)return Kse;V6e=1,Kse=t,t.displayName="applescript",t.aliases=[];function t(e){e.languages.applescript={comment:[/\(\*(?:\(\*(?:[^*]|\*(?!\)))*\*\)|(?!\(\*)[\s\S])*?\*\)/,/--.+/,/#.+/],string:/"(?:\\.|[^"\\\r\n])*"/,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e-?\d+)?\b/i,operator:[/[&=≠≤≥*+\-\/÷^]|[<>]=?/,/\b(?:(?:begin|end|start)s? with|(?:contains?|(?:does not|doesn't) contain)|(?:is|isn't|is not) (?:contained by|in)|(?:(?:is|isn't|is not) )?(?:greater|less) than(?: or equal)?(?: to)?|(?:comes|(?:does not|doesn't) come) (?:after|before)|(?:is|isn't|is not) equal(?: to)?|(?:(?:does not|doesn't) equal|equal to|equals|is not|isn't)|(?:a )?(?:ref(?: to)?|reference to)|(?:and|as|div|mod|not|or))\b/],keyword:/\b(?:about|above|after|against|apart from|around|aside from|at|back|before|beginning|behind|below|beneath|beside|between|but|by|considering|continue|copy|does|eighth|else|end|equal|error|every|exit|false|fifth|first|for|fourth|from|front|get|given|global|if|ignoring|in|instead of|into|is|it|its|last|local|me|middle|my|ninth|of|on|onto|out of|over|prop|property|put|repeat|return|returning|second|set|seventh|since|sixth|some|tell|tenth|that|the|then|third|through|thru|timeout|times|to|transaction|true|try|until|where|while|whose|with|without)\b/,"class-name":/\b(?:POSIX file|RGB color|alias|application|boolean|centimeters|centimetres|class|constant|cubic centimeters|cubic centimetres|cubic feet|cubic inches|cubic meters|cubic metres|cubic yards|date|degrees Celsius|degrees Fahrenheit|degrees Kelvin|feet|file|gallons|grams|inches|integer|kilograms|kilometers|kilometres|list|liters|litres|meters|metres|miles|number|ounces|pounds|quarts|real|record|reference|script|square feet|square kilometers|square kilometres|square meters|square metres|square miles|square yards|text|yards)\b/,punctuation:/[{}():,¬«»《》]/}}return Kse}var Jse,q6e;function Gyr(){if(q6e)return Jse;q6e=1,Jse=t,t.displayName="aql",t.aliases=[];function t(e){e.languages.aql={comment:/\/\/.*|\/\*[\s\S]*?\*\//,property:{pattern:/([{,]\s*)(?:(?!\d)\w+|(["'´`])(?:(?!\2)[^\\\r\n]|\\.)*\2)(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\.)*\1/,greedy:!0},identifier:{pattern:/([´`])(?:(?!\1)[^\\\r\n]|\\.)*\1/,greedy:!0},variable:/@@?\w+/,keyword:[{pattern:/(\bWITH\s+)COUNT(?=\s+INTO\b)/i,lookbehind:!0},/\b(?:AGGREGATE|ALL|AND|ANY|ASC|COLLECT|DESC|DISTINCT|FILTER|FOR|GRAPH|IN|INBOUND|INSERT|INTO|K_PATHS|K_SHORTEST_PATHS|LET|LIKE|LIMIT|NONE|NOT|NULL|OR|OUTBOUND|REMOVE|REPLACE|RETURN|SHORTEST_PATH|SORT|UPDATE|UPSERT|WINDOW|WITH)\b/i,{pattern:/(^|[^\w.[])(?:KEEP|PRUNE|SEARCH|TO)\b/i,lookbehind:!0},{pattern:/(^|[^\w.[])(?:CURRENT|NEW|OLD)\b/,lookbehind:!0},{pattern:/\bOPTIONS(?=\s*\{)/i}],function:/\b(?!\d)\w+(?=\s*\()/,boolean:/\b(?:false|true)\b/i,range:{pattern:/\.\./,alias:"operator"},number:[/\b0b[01]+/i,/\b0x[0-9a-f]+/i,/(?:\B\.\d+|\b(?:0|[1-9]\d*)(?:\.\d+)?)(?:e[+-]?\d+)?/i],operator:/\*{2,}|[=!]~|[!=<>]=?|&&|\|\||[-+*/%]/,punctuation:/::|[?.:,;()[\]{}]/}}return Jse}var Qse,G6e;function c6(){if(G6e)return Qse;G6e=1,Qse=t,t.displayName="c",t.aliases=[];function t(e){e.languages.c=e.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),e.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),e.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},e.languages.c.string],char:e.languages.c.char,comment:e.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:e.languages.c}}}}),e.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete e.languages.c.boolean}return Qse}var ele,$6e;function dbe(){if($6e)return ele;$6e=1;var t=c6();ele=e,e.displayName="cpp",e.aliases=[];function e(r){r.register(t),(function(n){var i=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,a=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return i.source});n.languages.cpp=n.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return i.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:i,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),n.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return a})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),n.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:n.languages.cpp}}}}),n.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),n.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:n.languages.extend("cpp",{})}}),n.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},n.languages.cpp["base-clause"])})(r)}return ele}var tle,W6e;function $yr(){if(W6e)return tle;W6e=1;var t=dbe();tle=e,e.displayName="arduino",e.aliases=["ino"];function e(r){r.register(t),r.languages.arduino=r.languages.extend("cpp",{keyword:/\b(?:String|array|bool|boolean|break|byte|case|catch|continue|default|do|double|else|finally|for|function|goto|if|in|instanceof|int|integer|long|loop|new|null|return|setup|string|switch|throw|try|void|while|word)\b/,constant:/\b(?:ANALOG_MESSAGE|DEFAULT|DIGITAL_MESSAGE|EXTERNAL|FIRMATA_STRING|HIGH|INPUT|INPUT_PULLUP|INTERNAL|INTERNAL1V1|INTERNAL2V56|LED_BUILTIN|LOW|OUTPUT|REPORT_ANALOG|REPORT_DIGITAL|SET_PIN_MODE|SYSEX_START|SYSTEM_RESET)\b/,builtin:/\b(?:Audio|BSSID|Bridge|Client|Console|EEPROM|Esplora|EsploraTFT|Ethernet|EthernetClient|EthernetServer|EthernetUDP|File|FileIO|FileSystem|Firmata|GPRS|GSM|GSMBand|GSMClient|GSMModem|GSMPIN|GSMScanner|GSMServer|GSMVoiceCall|GSM_SMS|HttpClient|IPAddress|IRread|Keyboard|KeyboardController|LiquidCrystal|LiquidCrystal_I2C|Mailbox|Mouse|MouseController|PImage|Process|RSSI|RobotControl|RobotMotor|SD|SPI|SSID|Scheduler|Serial|Server|Servo|SoftwareSerial|Stepper|Stream|TFT|Task|USBHost|WiFi|WiFiClient|WiFiServer|WiFiUDP|Wire|YunClient|YunServer|abs|addParameter|analogRead|analogReadResolution|analogReference|analogWrite|analogWriteResolution|answerCall|attach|attachGPRS|attachInterrupt|attached|autoscroll|available|background|beep|begin|beginPacket|beginSD|beginSMS|beginSpeaker|beginTFT|beginTransmission|beginWrite|bit|bitClear|bitRead|bitSet|bitWrite|blink|blinkVersion|buffer|changePIN|checkPIN|checkPUK|checkReg|circle|cityNameRead|cityNameWrite|clear|clearScreen|click|close|compassRead|config|connect|connected|constrain|cos|countryNameRead|countryNameWrite|createChar|cursor|debugPrint|delay|delayMicroseconds|detach|detachInterrupt|digitalRead|digitalWrite|disconnect|display|displayLogos|drawBMP|drawCompass|encryptionType|end|endPacket|endSMS|endTransmission|endWrite|exists|exitValue|fill|find|findUntil|flush|gatewayIP|get|getAsynchronously|getBand|getButton|getCurrentCarrier|getIMEI|getKey|getModifiers|getOemKey|getPINUsed|getResult|getSignalStrength|getSocket|getVoiceCallStatus|getXChange|getYChange|hangCall|height|highByte|home|image|interrupts|isActionDone|isDirectory|isListening|isPIN|isPressed|isValid|keyPressed|keyReleased|keyboardRead|knobRead|leftToRight|line|lineFollowConfig|listen|listenOnLocalhost|loadImage|localIP|lowByte|macAddress|maintain|map|max|messageAvailable|micros|millis|min|mkdir|motorsStop|motorsWrite|mouseDragged|mouseMoved|mousePressed|mouseReleased|move|noAutoscroll|noBlink|noBuffer|noCursor|noDisplay|noFill|noInterrupts|noListenOnLocalhost|noStroke|noTone|onReceive|onRequest|open|openNextFile|overflow|parseCommand|parseFloat|parseInt|parsePacket|pauseMode|peek|pinMode|playFile|playMelody|point|pointTo|position|pow|prepare|press|print|printFirmwareVersion|printVersion|println|process|processInput|pulseIn|put|random|randomSeed|read|readAccelerometer|readBlue|readButton|readBytes|readBytesUntil|readGreen|readJoystickButton|readJoystickSwitch|readJoystickX|readJoystickY|readLightSensor|readMessage|readMicrophone|readNetworks|readRed|readSlider|readString|readStringUntil|readTemperature|ready|rect|release|releaseAll|remoteIP|remoteNumber|remotePort|remove|requestFrom|retrieveCallingNumber|rewindDirectory|rightToLeft|rmdir|robotNameRead|robotNameWrite|run|runAsynchronously|runShellCommand|runShellCommandAsynchronously|running|scanNetworks|scrollDisplayLeft|scrollDisplayRight|seek|sendAnalog|sendDigitalPortPair|sendDigitalPorts|sendString|sendSysex|serialEvent|setBand|setBitOrder|setClockDivider|setCursor|setDNS|setDataMode|setFirmwareVersion|setMode|setPINUsed|setSpeed|setTextSize|setTimeout|shiftIn|shiftOut|shutdown|sin|size|sqrt|startLoop|step|stop|stroke|subnetMask|switchPIN|tan|tempoWrite|text|tone|transfer|tuneWrite|turn|updateIR|userNameRead|userNameWrite|voiceCall|waitContinue|width|write|writeBlue|writeGreen|writeJSON|writeMessage|writeMicroseconds|writeRGB|writeRed|yield)\b/}),r.languages.ino=r.languages.arduino}return tle}var rle,Y6e;function Wyr(){if(Y6e)return rle;Y6e=1,rle=t,t.displayName="arff",t.aliases=[];function t(e){e.languages.arff={comment:/%.*/,string:{pattern:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:/@(?:attribute|data|end|relation)\b/i,number:/\b\d+(?:\.\d+)?\b/,punctuation:/[{},]/}}return rle}var nle,X6e;function Yyr(){if(X6e)return nle;X6e=1,nle=t,t.displayName="asciidoc",t.aliases=["adoc"];function t(e){(function(r){var n={pattern:/(^[ \t]*)\[(?!\[)(?:(["'$`])(?:(?!\2)[^\\]|\\.)*\2|\[(?:[^\[\]\\]|\\.)*\]|[^\[\]\\"'$`]|\\.)*\]/m,lookbehind:!0,inside:{quoted:{pattern:/([$`])(?:(?!\1)[^\\]|\\.)*\1/,inside:{punctuation:/^[$`]|[$`]$/}},interpreted:{pattern:/'(?:[^'\\]|\\.)*'/,inside:{punctuation:/^'|'$/}},string:/"(?:[^"\\]|\\.)*"/,variable:/\w+(?==)/,punctuation:/^\[|\]$|,/,operator:/=/,"attr-value":/(?!^\s+$).+/}},i=r.languages.asciidoc={"comment-block":{pattern:/^(\/{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1/m,alias:"comment"},table:{pattern:/^\|={3,}(?:(?:\r?\n|\r(?!\n)).*)*?(?:\r?\n|\r)\|={3,}$/m,inside:{specifiers:{pattern:/(?:(?:(?:\d+(?:\.\d+)?|\.\d+)[+*](?:[<^>](?:\.[<^>])?|\.[<^>])?|[<^>](?:\.[<^>])?|\.[<^>])[a-z]*|[a-z]+)(?=\|)/,alias:"attr-value"},punctuation:{pattern:/(^|[^\\])[|!]=*/,lookbehind:!0}}},"passthrough-block":{pattern:/^(\+{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^\++|\++$/}},"literal-block":{pattern:/^(-{4,}|\.{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^(?:-+|\.+)|(?:-+|\.+)$/}},"other-block":{pattern:/^(--|\*{4,}|_{4,}|={4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^(?:-+|\*+|_+|=+)|(?:-+|\*+|_+|=+)$/}},"list-punctuation":{pattern:/(^[ \t]*)(?:-|\*{1,5}|\.{1,5}|(?:[a-z]|\d+)\.|[xvi]+\))(?= )/im,lookbehind:!0,alias:"punctuation"},"list-label":{pattern:/(^[ \t]*)[a-z\d].+(?::{2,4}|;;)(?=\s)/im,lookbehind:!0,alias:"symbol"},"indented-block":{pattern:/((\r?\n|\r)\2)([ \t]+)\S.*(?:(?:\r?\n|\r)\3.+)*(?=\2{2}|$)/,lookbehind:!0},comment:/^\/\/.*/m,title:{pattern:/^.+(?:\r?\n|\r)(?:={3,}|-{3,}|~{3,}|\^{3,}|\+{3,})$|^={1,5} .+|^\.(?![\s.]).*/m,alias:"important",inside:{punctuation:/^(?:\.|=+)|(?:=+|-+|~+|\^+|\++)$/}},"attribute-entry":{pattern:/^:[^:\r\n]+:(?: .*?(?: \+(?:\r?\n|\r).*?)*)?$/m,alias:"tag"},attributes:n,hr:{pattern:/^'{3,}$/m,alias:"punctuation"},"page-break":{pattern:/^<{3,}$/m,alias:"punctuation"},admonition:{pattern:/^(?:CAUTION|IMPORTANT|NOTE|TIP|WARNING):/m,alias:"keyword"},callout:[{pattern:/(^[ \t]*)<?\d*>/m,lookbehind:!0,alias:"symbol"},{pattern:/<\d+>/,alias:"symbol"}],macro:{pattern:/\b[a-z\d][a-z\d-]*::?(?:[^\s\[\]]*\[(?:[^\]\\"']|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:{function:/^[a-z\d-]+(?=:)/,punctuation:/^::?/,attributes:{pattern:/(?:\[(?:[^\]\\"']|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:n.inside}}},inline:{pattern:/(^|[^\\])(?:(?:\B\[(?:[^\]\\"']|(["'])(?:(?!\2)[^\\]|\\.)*\2|\\.)*\])?(?:\b_(?!\s)(?: _|[^_\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: _|[^_\\\r\n]|\\.)+)*_\b|\B``(?!\s).+?(?:(?:\r?\n|\r).+?)*''\B|\B`(?!\s)(?:[^`'\s]|\s+\S)+['`]\B|\B(['*+#])(?!\s)(?: \3|(?!\3)[^\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: \3|(?!\3)[^\\\r\n]|\\.)+)*\3\B)|(?:\[(?:[^\]\\"']|(["'])(?:(?!\4)[^\\]|\\.)*\4|\\.)*\])?(?:(__|\*\*|\+\+\+?|##|\$\$|[~^]).+?(?:(?:\r?\n|\r).+?)*\5|\{[^}\r\n]+\}|\[\[\[?.+?(?:(?:\r?\n|\r).+?)*\]?\]\]|<<.+?(?:(?:\r?\n|\r).+?)*>>|\(\(\(?.+?(?:(?:\r?\n|\r).+?)*\)?\)\)))/m,lookbehind:!0,inside:{attributes:n,url:{pattern:/^(?:\[\[\[?.+?\]?\]\]|<<.+?>>)$/,inside:{punctuation:/^(?:\[\[\[?|<<)|(?:\]\]\]?|>>)$/}},"attribute-ref":{pattern:/^\{.+\}$/,inside:{variable:{pattern:/(^\{)[a-z\d,+_-]+/,lookbehind:!0},operator:/^[=?!#%@$]|!(?=[:}])/,punctuation:/^\{|\}$|::?/}},italic:{pattern:/^(['_])[\s\S]+\1$/,inside:{punctuation:/^(?:''?|__?)|(?:''?|__?)$/}},bold:{pattern:/^\*[\s\S]+\*$/,inside:{punctuation:/^\*\*?|\*\*?$/}},punctuation:/^(?:``?|\+{1,3}|##?|\$\$|[~^]|\(\(\(?)|(?:''?|\+{1,3}|##?|\$\$|[~^`]|\)?\)\))$/}},replacement:{pattern:/\((?:C|R|TM)\)/,alias:"builtin"},entity:/&#?[\da-z]{1,8};/i,"line-continuation":{pattern:/(^| )\+$/m,lookbehind:!0,alias:"punctuation"}};function a(o){o=o.split(" ");for(var s={},d=0,b=o.length;d<b;d++)s[o[d]]=i[o[d]];return s}n.inside.interpreted.inside.rest=a("macro inline replacement entity"),i["passthrough-block"].inside.rest=a("macro"),i["literal-block"].inside.rest=a("callout"),i.table.inside.rest=a("comment-block passthrough-block literal-block other-block list-punctuation indented-block comment title attribute-entry attributes hr page-break admonition list-label callout macro inline replacement entity line-continuation"),i["other-block"].inside.rest=a("table list-punctuation indented-block comment attribute-entry attributes hr page-break admonition list-label macro inline replacement entity line-continuation"),i.title.inside.rest=a("macro inline replacement entity"),r.hooks.add("wrap",function(o){o.type==="entity"&&(o.attributes.title=o.content.value.replace(/&amp;/,"&"))}),r.languages.adoc=r.languages.asciidoc})(e)}return nle}var ile,Z6e;function Xyr(){if(Z6e)return ile;Z6e=1,ile=t,t.displayName="asm6502",t.aliases=[];function t(e){e.languages.asm6502={comment:/;.*/,directive:{pattern:/\.\w+(?= )/,alias:"property"},string:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,"op-code":{pattern:/\b(?:ADC|AND|ASL|BCC|BCS|BEQ|BIT|BMI|BNE|BPL|BRK|BVC|BVS|CLC|CLD|CLI|CLV|CMP|CPX|CPY|DEC|DEX|DEY|EOR|INC|INX|INY|JMP|JSR|LDA|LDX|LDY|LSR|NOP|ORA|PHA|PHP|PLA|PLP|ROL|ROR|RTI|RTS|SBC|SEC|SED|SEI|STA|STX|STY|TAX|TAY|TSX|TXA|TXS|TYA|adc|and|asl|bcc|bcs|beq|bit|bmi|bne|bpl|brk|bvc|bvs|clc|cld|cli|clv|cmp|cpx|cpy|dec|dex|dey|eor|inc|inx|iny|jmp|jsr|lda|ldx|ldy|lsr|nop|ora|pha|php|pla|plp|rol|ror|rti|rts|sbc|sec|sed|sei|sta|stx|sty|tax|tay|tsx|txa|txs|tya)\b/,alias:"keyword"},"hex-number":{pattern:/#?\$[\da-f]{1,4}\b/i,alias:"number"},"binary-number":{pattern:/#?%[01]+\b/,alias:"number"},"decimal-number":{pattern:/#?\b\d+\b/,alias:"number"},register:{pattern:/\b[xya]\b/i,alias:"variable"},punctuation:/[(),:]/}}return ile}var ale,K6e;function Zyr(){if(K6e)return ale;K6e=1,ale=t,t.displayName="asmatmel",t.aliases=[];function t(e){e.languages.asmatmel={comment:{pattern:/;.*/,greedy:!0},string:{pattern:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},constant:/\b(?:PORT[A-Z]|DDR[A-Z]|(?:DD|P)[A-Z](?:\d|[0-2]\d|3[01]))\b/,directive:{pattern:/\.\w+(?= )/,alias:"property"},"r-register":{pattern:/\br(?:\d|[12]\d|3[01])\b/,alias:"variable"},"op-code":{pattern:/\b(?:ADC|ADD|ADIW|AND|ANDI|ASR|BCLR|BLD|BRBC|BRBS|BRCC|BRCS|BREAK|BREQ|BRGE|BRHC|BRHS|BRID|BRIE|BRLO|BRLT|BRMI|BRNE|BRPL|BRSH|BRTC|BRTS|BRVC|BRVS|BSET|BST|CALL|CBI|CBR|CLC|CLH|CLI|CLN|CLR|CLS|CLT|CLV|CLZ|COM|CP|CPC|CPI|CPSE|DEC|DES|EICALL|EIJMP|ELPM|EOR|FMUL|FMULS|FMULSU|ICALL|IJMP|IN|INC|JMP|LAC|LAS|LAT|LD|LD[A-Za-z0-9]|LPM|LSL|LSR|MOV|MOVW|MUL|MULS|MULSU|NEG|NOP|OR|ORI|OUT|POP|PUSH|RCALL|RET|RETI|RJMP|ROL|ROR|SBC|SBCI|SBI|SBIC|SBIS|SBIW|SBR|SBRC|SBRS|SEC|SEH|SEI|SEN|SER|SES|SET|SEV|SEZ|SLEEP|SPM|ST|ST[A-Z0-9]|SUB|SUBI|SWAP|TST|WDR|XCH|adc|add|adiw|and|andi|asr|bclr|bld|brbc|brbs|brcc|brcs|break|breq|brge|brhc|brhs|brid|brie|brlo|brlt|brmi|brne|brpl|brsh|brtc|brts|brvc|brvs|bset|bst|call|cbi|cbr|clc|clh|cli|cln|clr|cls|clt|clv|clz|com|cp|cpc|cpi|cpse|dec|des|eicall|eijmp|elpm|eor|fmul|fmuls|fmulsu|icall|ijmp|in|inc|jmp|lac|las|lat|ld|ld[a-z0-9]|lpm|lsl|lsr|mov|movw|mul|muls|mulsu|neg|nop|or|ori|out|pop|push|rcall|ret|reti|rjmp|rol|ror|sbc|sbci|sbi|sbic|sbis|sbiw|sbr|sbrc|sbrs|sec|seh|sei|sen|ser|ses|set|sev|sez|sleep|spm|st|st[a-zA-Z0-9]|sub|subi|swap|tst|wdr|xch)\b/,alias:"keyword"},"hex-number":{pattern:/#?\$[\da-f]{2,4}\b/i,alias:"number"},"binary-number":{pattern:/#?%[01]+\b/,alias:"number"},"decimal-number":{pattern:/#?\b\d+\b/,alias:"number"},register:{pattern:/\b[acznvshtixy]\b/i,alias:"variable"},operator:/>>=?|<<=?|&&?|\|\|?|[-+*/%&|^!=<>?]=?/,punctuation:/[(),:]/}}return ale}var ole,J6e;function OZ(){if(J6e)return ole;J6e=1,ole=t,t.displayName="csharp",t.aliases=["dotnet","cs"];function t(e){(function(r){function n(Vt,Er){return Vt.replace(/<<(\d+)>>/g,function(sr,or){return"(?:"+Er[+or]+")"})}function i(Vt,Er,sr){return RegExp(n(Vt,Er),"")}function a(Vt,Er){for(var sr=0;sr<Er;sr++)Vt=Vt.replace(/<<self>>/g,function(){return"(?:"+Vt+")"});return Vt.replace(/<<self>>/g,"[^\\s\\S]")}var o={type:"bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",typeDeclaration:"class enum interface record struct",contextual:"add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",other:"abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield"};function s(Vt){return"\\b(?:"+Vt.trim().replace(/ /g,"|")+")\\b"}var d=s(o.typeDeclaration),b=RegExp(s(o.type+" "+o.typeDeclaration+" "+o.contextual+" "+o.other)),L=s(o.typeDeclaration+" "+o.contextual+" "+o.other),B=s(o.type+" "+o.typeDeclaration+" "+o.other),V=a(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source,2),X=a(/\((?:[^()]|<<self>>)*\)/.source,2),ie=/@?\b[A-Za-z_]\w*\b/.source,de=n(/<<0>>(?:\s*<<1>>)?/.source,[ie,V]),ae=n(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[L,de]),U=/\[\s*(?:,\s*)*\]/.source,ve=n(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[ae,U]),Se=n(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[V,X,U]),Pe=n(/\(<<0>>+(?:,<<0>>+)+\)/.source,[Se]),Me=n(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[Pe,ae,U]),Ie={keyword:b,punctuation:/[<>()?,.:[\]]/},Ve=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,Ze=/"(?:\\.|[^\\"\r\n])*"/.source,Je=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;r.languages.csharp=r.languages.extend("clike",{string:[{pattern:i(/(^|[^$\\])<<0>>/.source,[Je]),lookbehind:!0,greedy:!0},{pattern:i(/(^|[^@$\\])<<0>>/.source,[Ze]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:i(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[ae]),lookbehind:!0,inside:Ie},{pattern:i(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[ie,Me]),lookbehind:!0,inside:Ie},{pattern:i(/(\busing\s+)<<0>>(?=\s*=)/.source,[ie]),lookbehind:!0},{pattern:i(/(\b<<0>>\s+)<<1>>/.source,[d,de]),lookbehind:!0,inside:Ie},{pattern:i(/(\bcatch\s*\(\s*)<<0>>/.source,[ae]),lookbehind:!0,inside:Ie},{pattern:i(/(\bwhere\s+)<<0>>/.source,[ie]),lookbehind:!0},{pattern:i(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[ve]),lookbehind:!0,inside:Ie},{pattern:i(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[Me,B,ie]),inside:Ie}],keyword:b,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),r.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),r.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:i(/([(,]\s*)<<0>>(?=\s*:)/.source,[ie]),lookbehind:!0,alias:"punctuation"}}),r.languages.insertBefore("csharp","class-name",{namespace:{pattern:i(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[ie]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:i(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[X]),lookbehind:!0,alias:"class-name",inside:Ie},"return-type":{pattern:i(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[Me,ae]),inside:Ie,alias:"class-name"},"constructor-invocation":{pattern:i(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[Me]),lookbehind:!0,inside:Ie,alias:"class-name"},"generic-method":{pattern:i(/<<0>>\s*<<1>>(?=\s*\()/.source,[ie,V]),inside:{function:i(/^<<0>>/.source,[ie]),generic:{pattern:RegExp(V),alias:"class-name",inside:Ie}}},"type-list":{pattern:i(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[d,de,ie,Me,b.source,X,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:i(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[de,X]),lookbehind:!0,greedy:!0,inside:r.languages.csharp},keyword:b,"class-name":{pattern:RegExp(Me),greedy:!0,inside:Ie},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var nt=Ze+"|"+Ve,ut=n(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[nt]),ht=a(n(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[ut]),2),_t=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,Dt=n(/<<0>>(?:\s*\(<<1>>*\))?/.source,[ae,ht]);r.languages.insertBefore("csharp","class-name",{attribute:{pattern:i(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[_t,Dt]),lookbehind:!0,greedy:!0,inside:{target:{pattern:i(/^<<0>>(?=\s*:)/.source,[_t]),alias:"keyword"},"attribute-arguments":{pattern:i(/\(<<0>>*\)/.source,[ht]),inside:r.languages.csharp},"class-name":{pattern:RegExp(ae),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var qt=/:[^}\r\n]+/.source,Lt=a(n(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[ut]),2),dr=n(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Lt,qt]),Zt=a(n(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/.source,[nt]),2),Cr=n(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Zt,qt]);function yt(Vt,Er){return{interpolation:{pattern:i(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[Vt]),lookbehind:!0,inside:{"format-string":{pattern:i(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[Er,qt]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:r.languages.csharp}}},string:/[\s\S]+/}}r.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:i(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[dr]),lookbehind:!0,greedy:!0,inside:yt(dr,Lt)},{pattern:i(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[Cr]),lookbehind:!0,greedy:!0,inside:yt(Cr,Zt)}],char:{pattern:RegExp(Ve),greedy:!0}}),r.languages.dotnet=r.languages.cs=r.languages.csharp})(e)}return ole}var sle,Q6e;function Kyr(){if(Q6e)return sle;Q6e=1;var t=OZ();sle=e,e.displayName="aspnet",e.aliases=[];function e(r){r.register(t),r.languages.aspnet=r.languages.extend("markup",{"page-directive":{pattern:/<%\s*@.*%>/,alias:"tag",inside:{"page-directive":{pattern:/<%\s*@\s*(?:Assembly|Control|Implements|Import|Master(?:Type)?|OutputCache|Page|PreviousPageType|Reference|Register)?|%>/i,alias:"tag"},rest:r.languages.markup.tag.inside}},directive:{pattern:/<%.*%>/,alias:"tag",inside:{directive:{pattern:/<%\s*?[$=%#:]{0,2}|%>/,alias:"tag"},rest:r.languages.csharp}}}),r.languages.aspnet.tag.pattern=/<(?!%)\/?[^\s>\/]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/,r.languages.insertBefore("inside","punctuation",{directive:r.languages.aspnet.directive},r.languages.aspnet.tag.inside["attr-value"]),r.languages.insertBefore("aspnet","comment",{"asp-comment":{pattern:/<%--[\s\S]*?--%>/,alias:["asp","comment"]}}),r.languages.insertBefore("aspnet",r.languages.javascript?"script":"tag",{"asp-script":{pattern:/(<script(?=.*runat=['"]?server\b)[^>]*>)[\s\S]*?(?=<\/script>)/i,lookbehind:!0,alias:["asp","script"],inside:r.languages.csharp||{}}})}return sle}var lle,eOe;function Jyr(){if(eOe)return lle;eOe=1,lle=t,t.displayName="autohotkey",t.aliases=[];function t(e){e.languages.autohotkey={comment:[{pattern:/(^|\s);.*/,lookbehind:!0},{pattern:/(^[\t ]*)\/\*(?:[\r\n](?![ \t]*\*\/)|[^\r\n])*(?:[\r\n][ \t]*\*\/)?/m,lookbehind:!0,greedy:!0}],tag:{pattern:/^([ \t]*)[^\s,`":]+(?=:[ \t]*$)/m,lookbehind:!0},string:/"(?:[^"\n\r]|"")*"/,variable:/%\w+%/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/\?|\/\/?=?|:=|\|[=|]?|&[=&]?|\+[=+]?|-[=-]?|\*[=*]?|<(?:<=?|>|=)?|>>?=?|[.^!=~]=?|\b(?:AND|NOT|OR)\b/,boolean:/\b(?:false|true)\b/,selector:/\b(?:AutoTrim|BlockInput|Break|Click|ClipWait|Continue|Control|ControlClick|ControlFocus|ControlGet|ControlGetFocus|ControlGetPos|ControlGetText|ControlMove|ControlSend|ControlSendRaw|ControlSetText|CoordMode|Critical|DetectHiddenText|DetectHiddenWindows|Drive|DriveGet|DriveSpaceFree|EnvAdd|EnvDiv|EnvGet|EnvMult|EnvSet|EnvSub|EnvUpdate|Exit|ExitApp|FileAppend|FileCopy|FileCopyDir|FileCreateDir|FileCreateShortcut|FileDelete|FileEncoding|FileGetAttrib|FileGetShortcut|FileGetSize|FileGetTime|FileGetVersion|FileInstall|FileMove|FileMoveDir|FileRead|FileReadLine|FileRecycle|FileRecycleEmpty|FileRemoveDir|FileSelectFile|FileSelectFolder|FileSetAttrib|FileSetTime|FormatTime|GetKeyState|Gosub|Goto|GroupActivate|GroupAdd|GroupClose|GroupDeactivate|Gui|GuiControl|GuiControlGet|Hotkey|ImageSearch|IniDelete|IniRead|IniWrite|Input|InputBox|KeyWait|ListHotkeys|ListLines|ListVars|Loop|Menu|MouseClick|MouseClickDrag|MouseGetPos|MouseMove|MsgBox|OnExit|OutputDebug|Pause|PixelGetColor|PixelSearch|PostMessage|Process|Progress|Random|RegDelete|RegRead|RegWrite|Reload|Repeat|Return|Run|RunAs|RunWait|Send|SendEvent|SendInput|SendMessage|SendMode|SendPlay|SendRaw|SetBatchLines|SetCapslockState|SetControlDelay|SetDefaultMouseSpeed|SetEnv|SetFormat|SetKeyDelay|SetMouseDelay|SetNumlockState|SetRegView|SetScrollLockState|SetStoreCapslockMode|SetTimer|SetTitleMatchMode|SetWinDelay|SetWorkingDir|Shutdown|Sleep|Sort|SoundBeep|SoundGet|SoundGetWaveVolume|SoundPlay|SoundSet|SoundSetWaveVolume|SplashImage|SplashTextOff|SplashTextOn|SplitPath|StatusBarGetText|StatusBarWait|StringCaseSense|StringGetPos|StringLeft|StringLen|StringLower|StringMid|StringReplace|StringRight|StringSplit|StringTrimLeft|StringTrimRight|StringUpper|Suspend|SysGet|Thread|ToolTip|Transform|TrayTip|URLDownloadToFile|WinActivate|WinActivateBottom|WinClose|WinGet|WinGetActiveStats|WinGetActiveTitle|WinGetClass|WinGetPos|WinGetText|WinGetTitle|WinHide|WinKill|WinMaximize|WinMenuSelectItem|WinMinimize|WinMinimizeAll|WinMinimizeAllUndo|WinMove|WinRestore|WinSet|WinSetTitle|WinShow|WinWait|WinWaitActive|WinWaitClose|WinWaitNotActive)\b/i,constant:/\b(?:a_ahkpath|a_ahkversion|a_appdata|a_appdatacommon|a_autotrim|a_batchlines|a_caretx|a_carety|a_computername|a_controldelay|a_cursor|a_dd|a_ddd|a_dddd|a_defaultmousespeed|a_desktop|a_desktopcommon|a_detecthiddentext|a_detecthiddenwindows|a_endchar|a_eventinfo|a_exitreason|a_fileencoding|a_formatfloat|a_formatinteger|a_gui|a_guicontrol|a_guicontrolevent|a_guievent|a_guiheight|a_guiwidth|a_guix|a_guiy|a_hour|a_iconfile|a_iconhidden|a_iconnumber|a_icontip|a_index|a_ipaddress1|a_ipaddress2|a_ipaddress3|a_ipaddress4|a_is64bitos|a_isadmin|a_iscompiled|a_iscritical|a_ispaused|a_issuspended|a_isunicode|a_keydelay|a_language|a_lasterror|a_linefile|a_linenumber|a_loopfield|a_loopfileattrib|a_loopfiledir|a_loopfileext|a_loopfilefullpath|a_loopfilelongpath|a_loopfilename|a_loopfileshortname|a_loopfileshortpath|a_loopfilesize|a_loopfilesizekb|a_loopfilesizemb|a_loopfiletimeaccessed|a_loopfiletimecreated|a_loopfiletimemodified|a_loopreadline|a_loopregkey|a_loopregname|a_loopregsubkey|a_loopregtimemodified|a_loopregtype|a_mday|a_min|a_mm|a_mmm|a_mmmm|a_mon|a_mousedelay|a_msec|a_mydocuments|a_now|a_nowutc|a_numbatchlines|a_ostype|a_osversion|a_priorhotkey|a_priorkey|a_programfiles|a_programs|a_programscommon|a_ptrsize|a_regview|a_screendpi|a_screenheight|a_screenwidth|a_scriptdir|a_scriptfullpath|a_scripthwnd|a_scriptname|a_sec|a_space|a_startmenu|a_startmenucommon|a_startup|a_startupcommon|a_stringcasesense|a_tab|a_temp|a_thisfunc|a_thishotkey|a_thislabel|a_thismenu|a_thismenuitem|a_thismenuitempos|a_tickcount|a_timeidle|a_timeidlephysical|a_timesincepriorhotkey|a_timesincethishotkey|a_titlematchmode|a_titlematchmodespeed|a_username|a_wday|a_windelay|a_windir|a_workingdir|a_yday|a_year|a_yweek|a_yyyy|clipboard|clipboardall|comspec|errorlevel|programfiles)\b/i,builtin:/\b(?:abs|acos|asc|asin|atan|ceil|chr|class|comobjactive|comobjarray|comobjconnect|comobjcreate|comobjerror|comobjflags|comobjget|comobjquery|comobjtype|comobjvalue|cos|dllcall|exp|fileexist|Fileopen|floor|format|il_add|il_create|il_destroy|instr|isfunc|islabel|IsObject|ln|log|ltrim|lv_add|lv_delete|lv_deletecol|lv_getcount|lv_getnext|lv_gettext|lv_insert|lv_insertcol|lv_modify|lv_modifycol|lv_setimagelist|mod|numget|numput|onmessage|regexmatch|regexreplace|registercallback|round|rtrim|sb_seticon|sb_setparts|sb_settext|sin|sqrt|strlen|strreplace|strsplit|substr|tan|tv_add|tv_delete|tv_get|tv_getchild|tv_getcount|tv_getnext|tv_getparent|tv_getprev|tv_getselection|tv_gettext|tv_modify|varsetcapacity|winactive|winexist|__Call|__Get|__New|__Set)\b/i,symbol:/\b(?:alt|altdown|altup|appskey|backspace|browser_back|browser_favorites|browser_forward|browser_home|browser_refresh|browser_search|browser_stop|bs|capslock|ctrl|ctrlbreak|ctrldown|ctrlup|del|delete|down|end|enter|esc|escape|f1|f10|f11|f12|f13|f14|f15|f16|f17|f18|f19|f2|f20|f21|f22|f23|f24|f3|f4|f5|f6|f7|f8|f9|home|ins|insert|joy1|joy10|joy11|joy12|joy13|joy14|joy15|joy16|joy17|joy18|joy19|joy2|joy20|joy21|joy22|joy23|joy24|joy25|joy26|joy27|joy28|joy29|joy3|joy30|joy31|joy32|joy4|joy5|joy6|joy7|joy8|joy9|joyaxes|joybuttons|joyinfo|joyname|joypov|joyr|joyu|joyv|joyx|joyy|joyz|lalt|launch_app1|launch_app2|launch_mail|launch_media|lbutton|lcontrol|lctrl|left|lshift|lwin|lwindown|lwinup|mbutton|media_next|media_play_pause|media_prev|media_stop|numlock|numpad0|numpad1|numpad2|numpad3|numpad4|numpad5|numpad6|numpad7|numpad8|numpad9|numpadadd|numpadclear|numpaddel|numpaddiv|numpaddot|numpaddown|numpadend|numpadenter|numpadhome|numpadins|numpadleft|numpadmult|numpadpgdn|numpadpgup|numpadright|numpadsub|numpadup|pgdn|pgup|printscreen|ralt|rbutton|rcontrol|rctrl|right|rshift|rwin|rwindown|rwinup|scrolllock|shift|shiftdown|shiftup|space|tab|up|volume_down|volume_mute|volume_up|wheeldown|wheelleft|wheelright|wheelup|xbutton1|xbutton2)\b/i,important:/#\b(?:AllowSameLineComments|ClipboardTimeout|CommentFlag|DerefChar|ErrorStdOut|EscapeChar|HotkeyInterval|HotkeyModifierTimeout|Hotstring|If|IfTimeout|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Include|IncludeAgain|InputLevel|InstallKeybdHook|InstallMouseHook|KeyHistory|MaxHotkeysPerInterval|MaxMem|MaxThreads|MaxThreadsBuffer|MaxThreadsPerHotkey|MenuMaskKey|NoEnv|NoTrayIcon|Persistent|SingleInstance|UseHook|Warn|WinActivateForce)\b/i,keyword:/\b(?:Abort|AboveNormal|Add|ahk_class|ahk_exe|ahk_group|ahk_id|ahk_pid|All|Alnum|Alpha|AltSubmit|AltTab|AltTabAndMenu|AltTabMenu|AltTabMenuDismiss|AlwaysOnTop|AutoSize|Background|BackgroundTrans|BelowNormal|between|BitAnd|BitNot|BitOr|BitShiftLeft|BitShiftRight|BitXOr|Bold|Border|Button|ByRef|Catch|Checkbox|Checked|CheckedGray|Choose|ChooseString|Close|Color|ComboBox|Contains|ControlList|Count|Date|DateTime|Days|DDL|Default|DeleteAll|Delimiter|Deref|Destroy|Digit|Disable|Disabled|DropDownList|Edit|Eject|Else|Enable|Enabled|Error|Exist|Expand|ExStyle|FileSystem|Finally|First|Flash|Float|FloatFast|Focus|Font|for|global|Grid|Group|GroupBox|GuiClose|GuiContextMenu|GuiDropFiles|GuiEscape|GuiSize|Hdr|Hidden|Hide|High|HKCC|HKCR|HKCU|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_LOCAL_MACHINE|HKEY_USERS|HKLM|HKU|Hours|HScroll|Icon|IconSmall|ID|IDLast|If|IfEqual|IfExist|IfGreater|IfGreaterOrEqual|IfInString|IfLess|IfLessOrEqual|IfMsgBox|IfNotEqual|IfNotExist|IfNotInString|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Ignore|ImageList|in|Integer|IntegerFast|Interrupt|is|italic|Join|Label|LastFound|LastFoundExist|Limit|Lines|List|ListBox|ListView|local|Lock|Logoff|Low|Lower|Lowercase|MainWindow|Margin|Maximize|MaximizeBox|MaxSize|Minimize|MinimizeBox|MinMax|MinSize|Minutes|MonthCal|Mouse|Move|Multi|NA|No|NoActivate|NoDefault|NoHide|NoIcon|NoMainWindow|norm|Normal|NoSort|NoSortHdr|NoStandard|Not|NoTab|NoTimers|Number|Off|Ok|On|OwnDialogs|Owner|Parse|Password|Picture|Pixel|Pos|Pow|Priority|ProcessName|Radio|Range|Read|ReadOnly|Realtime|Redraw|Region|REG_BINARY|REG_DWORD|REG_EXPAND_SZ|REG_MULTI_SZ|REG_SZ|Relative|Rename|Report|Resize|Restore|Retry|RGB|Screen|Seconds|Section|Serial|SetLabel|ShiftAltTab|Show|Single|Slider|SortDesc|Standard|static|Status|StatusBar|StatusCD|strike|Style|Submit|SysMenu|Tab2|TabStop|Text|Theme|Throw|Tile|ToggleCheck|ToggleEnable|ToolWindow|Top|Topmost|TransColor|Transparent|Tray|TreeView|Try|TryAgain|Type|UnCheck|underline|Unicode|Unlock|Until|UpDown|Upper|Uppercase|UseErrorLevel|Vis|VisFirst|Visible|VScroll|Wait|WaitClose|WantCtrlA|WantF2|WantReturn|While|Wrap|Xdigit|xm|xp|xs|Yes|ym|yp|ys)\b/i,function:/[^(); \t,\n+*\-=?>:\\\/<&%\[\]]+(?=\()/,punctuation:/[{}[\]():,]/}}return lle}var ule,tOe;function Qyr(){if(tOe)return ule;tOe=1,ule=t,t.displayName="autoit",t.aliases=[];function t(e){e.languages.autoit={comment:[/;.*/,{pattern:/(^[\t ]*)#(?:comments-start|cs)[\s\S]*?^[ \t]*#(?:ce|comments-end)/m,lookbehind:!0}],url:{pattern:/(^[\t ]*#include\s+)(?:<[^\r\n>]+>|"[^\r\n"]+")/m,lookbehind:!0},string:{pattern:/(["'])(?:\1\1|(?!\1)[^\r\n])*\1/,greedy:!0,inside:{variable:/([%$@])\w+\1/}},directive:{pattern:/(^[\t ]*)#[\w-]+/m,lookbehind:!0,alias:"keyword"},function:/\b\w+(?=\()/,variable:/[$@]\w+/,keyword:/\b(?:Case|Const|Continue(?:Case|Loop)|Default|Dim|Do|Else(?:If)?|End(?:Func|If|Select|Switch|With)|Enum|Exit(?:Loop)?|For|Func|Global|If|In|Local|Next|Null|ReDim|Select|Static|Step|Switch|Then|To|Until|Volatile|WEnd|While|With)\b/i,number:/\b(?:0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,boolean:/\b(?:False|True)\b/i,operator:/<[=>]?|[-+*\/=&>]=?|[?^]|\b(?:And|Not|Or)\b/i,punctuation:/[\[\]().,:]/}}return ule}var cle,rOe;function e1r(){if(rOe)return cle;rOe=1,cle=t,t.displayName="avisynth",t.aliases=["avs"];function t(e){(function(r){function n(L,B){return L.replace(/<<(\d+)>>/g,function(V,X){return B[+X]})}function i(L,B,V){return RegExp(n(L,B),V)}var a=/bool|clip|float|int|string|val/.source,o=[/is(?:bool|clip|float|int|string)|defined|(?:(?:internal)?function|var)?exists?/.source,/apply|assert|default|eval|import|nop|select|undefined/.source,/opt_(?:allowfloataudio|avipadscanlines|dwchannelmask|enable_(?:b64a|planartopackedrgb|v210|y3_10_10|y3_10_16)|usewaveextensible|vdubplanarhack)|set(?:cachemode|maxcpu|memorymax|planarlegacyalignment|workingdir)/.source,/hex(?:value)?|value/.source,/abs|ceil|continued(?:denominator|numerator)?|exp|floor|fmod|frac|log(?:10)?|max|min|muldiv|pi|pow|rand|round|sign|spline|sqrt/.source,/a?sinh?|a?cosh?|a?tan[2h]?/.source,/(?:bit(?:and|not|x?or|[lr]?shift[aslu]?|sh[lr]|sa[lr]|[lr]rotatel?|ro[rl]|te?st|set(?:count)?|cl(?:ea)?r|ch(?:an)?ge?))/.source,/average(?:[bgr]|chroma[uv]|luma)|(?:[rgb]|chroma[uv]|luma|rgb|[yuv](?=difference(?:fromprevious|tonext)))difference(?:fromprevious|tonext)?|[yuvrgb]plane(?:median|min|max|minmaxdifference)/.source,/getprocessinfo|logmsg|script(?:dir(?:utf8)?|file(?:utf8)?|name(?:utf8)?)|setlogparams/.source,/chr|(?:fill|find|left|mid|replace|rev|right)str|format|[lu]case|ord|str(?:cmpi?|fromutf8|len|toutf8)|time|trim(?:all|left|right)/.source,/isversionorgreater|version(?:number|string)/.source,/buildpixeltype|colorspacenametopixeltype/.source,/addautoloaddir|on(?:cpu|cuda)|prefetch|setfiltermtmode/.source].join("|"),s=[/has(?:audio|video)/.source,/height|width/.source,/frame(?:count|rate)|framerate(?:denominator|numerator)/.source,/getparity|is(?:field|frame)based/.source,/bitspercomponent|componentsize|hasalpha|is(?:planar(?:rgba?)?|interleaved|rgb(?:24|32|48|64)?|y(?:8|u(?:va?|y2))?|yv(?:12|16|24|411)|420|422|444|packedrgb)|numcomponents|pixeltype/.source,/audio(?:bits|channels|duration|length(?:[fs]|hi|lo)?|rate)|isaudio(?:float|int)/.source].join("|"),d=[/avi(?:file)?source|directshowsource|image(?:reader|source|sourceanim)|opendmlsource|segmented(?:avisource|directshowsource)|wavsource/.source,/coloryuv|convertbacktoyuy2|convertto(?:RGB(?:24|32|48|64)|(?:planar)?RGBA?|Y8?|YV(?:12|16|24|411)|YUVA?(?:411|420|422|444)|YUY2)|fixluminance|gr[ae]yscale|invert|levels|limiter|mergea?rgb|merge(?:chroma|luma)|rgbadjust|show(?:alpha|blue|green|red)|swapuv|tweak|[uv]toy8?|ytouv/.source,/(?:colorkey|reset)mask|layer|mask(?:hs)?|merge|overlay|subtract/.source,/addborders|(?:bicubic|bilinear|blackman|gauss|lanczos4|lanczos|point|sinc|spline(?:16|36|64))resize|crop(?:bottom)?|flip(?:horizontal|vertical)|(?:horizontal|vertical)?reduceby2|letterbox|skewrows|turn(?:180|left|right)/.source,/blur|fixbrokenchromaupsampling|generalconvolution|(?:spatial|temporal)soften|sharpen/.source,/trim|(?:un)?alignedsplice|(?:assume|assumescaled|change|convert)FPS|(?:delete|duplicate)frame|dissolve|fade(?:in|io|out)[02]?|freezeframe|interleave|loop|reverse|select(?:even|odd|(?:range)?every)/.source,/assume[bt]ff|assume(?:field|frame)based|bob|complementparity|doubleweave|peculiarblend|pulldown|separate(?:columns|fields|rows)|swapfields|weave(?:columns|rows)?/.source,/amplify(?:db)?|assumesamplerate|audiodub(?:ex)?|audiotrim|convertaudioto(?:(?:8|16|24|32)bit|float)|converttomono|delayaudio|ensurevbrmp3sync|get(?:left|right)?channel|kill(?:audio|video)|mergechannels|mixaudio|monotostereo|normalize|resampleaudio|ssrc|supereq|timestretch/.source,/animate|applyrange|conditional(?:filter|reader|select)|frameevaluate|scriptclip|tcp(?:server|source)|writefile(?:end|if|start)?/.source,/imagewriter/.source,/blackness|blankclip|colorbars(?:hd)?|compare|dumpfiltergraph|echo|histogram|info|messageclip|preroll|setgraphanalysis|show(?:framenumber|smpte|time)|showfiveversions|stack(?:horizontal|vertical)|subtitle|tone|version/.source].join("|"),b=[o,s,d].join("|");r.languages.avisynth={comment:[{pattern:/(^|[^\\])\[\*(?:[^\[*]|\[(?!\*)|\*(?!\])|\[\*(?:[^\[*]|\[(?!\*)|\*(?!\]))*\*\])*\*\]/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],argument:{pattern:i(/\b(?:<<0>>)\s+("?)\w+\1/.source,[a],"i"),inside:{keyword:/^\w+/}},"argument-label":{pattern:/([,(][\s\\]*)\w+\s*=(?!=)/,lookbehind:!0,inside:{"argument-name":{pattern:/^\w+/,alias:"punctuation"},punctuation:/=$/}},string:[{pattern:/"""[\s\S]*?"""/,greedy:!0},{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0,inside:{constant:{pattern:/\b(?:DEFAULT_MT_MODE|(?:MAINSCRIPT|PROGRAM|SCRIPT)DIR|(?:MACHINE|USER)_(?:CLASSIC|PLUS)_PLUGINS)\b/}}}],variable:/\b(?:last)\b/i,boolean:/\b(?:false|no|true|yes)\b/i,keyword:/\b(?:catch|else|for|function|global|if|return|try|while|__END__)\b/i,constant:/\bMT_(?:MULTI_INSTANCE|NICE_FILTER|SERIALIZED|SPECIAL_MT)\b/,"builtin-function":{pattern:i(/\b(?:<<0>>)\b/.source,[b],"i"),alias:"function"},"type-cast":{pattern:i(/\b(?:<<0>>)(?=\s*\()/.source,[a],"i"),alias:"keyword"},function:{pattern:/\b[a-z_]\w*(?=\s*\()|(\.)[a-z_]\w*\b/i,lookbehind:!0},"line-continuation":{pattern:/(^[ \t]*)\\|\\(?=[ \t]*$)/m,lookbehind:!0,alias:"punctuation"},number:/\B\$(?:[\da-f]{6}|[\da-f]{8})\b|(?:(?:\b|\B-)\d+(?:\.\d*)?\b|\B\.\d+\b)/i,operator:/\+\+?|[!=<>]=?|&&|\|\||[?:*/%-]/,punctuation:/[{}\[\]();,.]/},r.languages.avs=r.languages.avisynth})(e)}return cle}var fle,nOe;function t1r(){if(nOe)return fle;nOe=1,fle=t,t.displayName="avroIdl",t.aliases=[];function t(e){e.languages["avro-idl"]={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},string:{pattern:/(^|[^\\])"(?:[^\r\n"\\]|\\.)*"/,lookbehind:!0,greedy:!0},annotation:{pattern:/@(?:[$\w.-]|`[^\r\n`]+`)+/,greedy:!0,alias:"function"},"function-identifier":{pattern:/`[^\r\n`]+`(?=\s*\()/,greedy:!0,alias:"function"},identifier:{pattern:/`[^\r\n`]+`/,greedy:!0},"class-name":{pattern:/(\b(?:enum|error|protocol|record|throws)\b\s+)[$\w]+/,lookbehind:!0,greedy:!0},keyword:/\b(?:array|boolean|bytes|date|decimal|double|enum|error|false|fixed|float|idl|import|int|local_timestamp_ms|long|map|null|oneway|protocol|record|schema|string|throws|time_ms|timestamp_ms|true|union|uuid|void)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:[{pattern:/(^|[^\w.])-?(?:(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|0x(?:[a-f0-9]+(?:\.[a-f0-9]*)?|\.[a-f0-9]+)(?:p[+-]?\d+)?)[dfl]?(?![\w.])/i,lookbehind:!0},/-?\b(?:Infinity|NaN)\b/],operator:/=/,punctuation:/[()\[\]{}<>.:,;-]/},e.languages.avdl=e.languages["avro-idl"]}return fle}var dle,iOe;function aKe(){if(iOe)return dle;iOe=1,dle=t,t.displayName="bash",t.aliases=["shell"];function t(e){(function(r){var n="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",i={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},a={bash:i,environment:{pattern:RegExp("\\$"+n),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+n),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};r.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+n),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:a},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:i}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:a},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:a.entity}}],environment:{pattern:RegExp("\\$?"+n),alias:"constant"},variable:a.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},i.inside=r.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],s=a.variable[1].inside,d=0;d<o.length;d++)s[o[d]]=r.languages.bash[o[d]];r.languages.shell=r.languages.bash})(e)}return dle}var hle,aOe;function oKe(){if(aOe)return hle;aOe=1,hle=t,t.displayName="basic",t.aliases=[];function t(e){e.languages.basic={comment:{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},string:{pattern:/"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:AS|BEEP|BLOAD|BSAVE|CALL(?: ABSOLUTE)?|CASE|CHAIN|CHDIR|CLEAR|CLOSE|CLS|COM|COMMON|CONST|DATA|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DIM|DO|DOUBLE|ELSE|ELSEIF|END|ENVIRON|ERASE|ERROR|EXIT|FIELD|FILES|FOR|FUNCTION|GET|GOSUB|GOTO|IF|INPUT|INTEGER|IOCTL|KEY|KILL|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|MKDIR|NAME|NEXT|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPTION BASE|OUT|POKE|PUT|READ|REDIM|REM|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SELECT CASE|SHARED|SHELL|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|SUB|SWAP|SYSTEM|THEN|TIMER|TO|TROFF|TRON|TYPE|UNLOCK|UNTIL|USING|VIEW PRINT|WAIT|WEND|WHILE|WRITE)(?:\$|\b)/i,function:/\b(?:ABS|ACCESS|ACOS|ANGLE|AREA|ARITHMETIC|ARRAY|ASIN|ASK|AT|ATN|BASE|BEGIN|BREAK|CAUSE|CEIL|CHR|CLIP|COLLATE|COLOR|CON|COS|COSH|COT|CSC|DATE|DATUM|DEBUG|DECIMAL|DEF|DEG|DEGREES|DELETE|DET|DEVICE|DISPLAY|DOT|ELAPSED|EPS|ERASABLE|EXLINE|EXP|EXTERNAL|EXTYPE|FILETYPE|FIXED|FP|GO|GRAPH|HANDLER|IDN|IMAGE|IN|INT|INTERNAL|IP|IS|KEYED|LBOUND|LCASE|LEFT|LEN|LENGTH|LET|LINE|LINES|LOG|LOG10|LOG2|LTRIM|MARGIN|MAT|MAX|MAXNUM|MID|MIN|MISSING|MOD|NATIVE|NUL|NUMERIC|OF|OPTION|ORD|ORGANIZATION|OUTIN|OUTPUT|PI|POINT|POINTER|POINTS|POS|PRINT|PROGRAM|PROMPT|RAD|RADIANS|RANDOMIZE|RECORD|RECSIZE|RECTYPE|RELATIVE|REMAINDER|REPEAT|REST|RETRY|REWRITE|RIGHT|RND|ROUND|RTRIM|SAME|SEC|SELECT|SEQUENTIAL|SET|SETTER|SGN|SIN|SINH|SIZE|SKIP|SQR|STANDARD|STATUS|STR|STREAM|STYLE|TAB|TAN|TANH|TEMPLATE|TEXT|THERE|TIME|TIMEOUT|TRACE|TRANSFORM|TRUNCATE|UBOUND|UCASE|USE|VAL|VARIABLE|VIEWPORT|WHEN|WINDOW|WITH|ZER|ZONEWIDTH)(?:\$|\b)/i,operator:/<[=>]?|>=?|[+\-*\/^=&]|\b(?:AND|EQV|IMP|NOT|OR|XOR)\b/i,punctuation:/[,;:()]/}}return hle}var ple,oOe;function r1r(){if(oOe)return ple;oOe=1,ple=t,t.displayName="batch",t.aliases=[];function t(e){(function(r){var n=/%%?[~:\w]+%?|!\S+!/,i={pattern:/\/[a-z?]+(?=[ :]|$):?|-[a-z]\b|--[a-z-]+\b/im,alias:"attr-name",inside:{punctuation:/:/}},a=/"(?:[\\"]"|[^"])*"(?!")/,o=/(?:\b|-)\d+\b/;r.languages.batch={comment:[/^::.*/m,{pattern:/((?:^|[&(])[ \t]*)rem\b(?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0}],label:{pattern:/^:.*/m,alias:"property"},command:[{pattern:/((?:^|[&(])[ \t]*)for(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* \S+ in \([^)]+\) do/im,lookbehind:!0,inside:{keyword:/\b(?:do|in)\b|^for\b/i,string:a,parameter:i,variable:n,number:o,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*)if(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:not )?(?:cmdextversion \d+|defined \w+|errorlevel \d+|exist \S+|(?:"[^"]*"|(?!")(?:(?!==)\S)+)?(?:==| (?:equ|geq|gtr|leq|lss|neq) )(?:"[^"]*"|[^\s"]\S*))/im,lookbehind:!0,inside:{keyword:/\b(?:cmdextversion|defined|errorlevel|exist|not)\b|^if\b/i,string:a,parameter:i,variable:n,number:o,operator:/\^|==|\b(?:equ|geq|gtr|leq|lss|neq)\b/i}},{pattern:/((?:^|[&()])[ \t]*)else\b/im,lookbehind:!0,inside:{keyword:/^else\b/i}},{pattern:/((?:^|[&(])[ \t]*)set(?: \/[a-z](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0,inside:{keyword:/^set\b/i,string:a,parameter:i,variable:[n,/\w+(?=(?:[*\/%+\-&^|]|<<|>>)?=)/],number:o,operator:/[*\/%+\-&^|]=?|<<=?|>>=?|[!~_=]/,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*@?)\w+\b(?:"(?:[\\"]"|[^"])*"(?!")|[^"^&)\r\n]|\^(?:\r\n|[\s\S]))*/m,lookbehind:!0,inside:{keyword:/^\w+\b/,string:a,parameter:i,label:{pattern:/(^\s*):\S+/m,lookbehind:!0,alias:"property"},variable:n,number:o,operator:/\^/}}],operator:/[&@]/,punctuation:/[()']/}})(e)}return ple}var vle,sOe;function n1r(){if(sOe)return vle;sOe=1,vle=t,t.displayName="bbcode",t.aliases=["shortcode"];function t(e){e.languages.bbcode={tag:{pattern:/\[\/?[^\s=\]]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'"\]=]+))?(?:\s+[^\s=\]]+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'"\]=]+))*\s*\]/,inside:{tag:{pattern:/^\[\/?[^\s=\]]+/,inside:{punctuation:/^\[\/?/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'"\]=]+)/,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\]/,"attr-name":/[^\s=\]]+/}}},e.languages.shortcode=e.languages.bbcode}return vle}var mle,lOe;function i1r(){if(lOe)return mle;lOe=1,mle=t,t.displayName="bicep",t.aliases=[];function t(e){e.languages.bicep={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],property:[{pattern:/([\r\n][ \t]*)[a-z_]\w*(?=[ \t]*:)/i,lookbehind:!0},{pattern:/([\r\n][ \t]*)'(?:\\.|\$(?!\{)|[^'\\\r\n$])*'(?=[ \t]*:)/,lookbehind:!0,greedy:!0}],string:[{pattern:/'''[^'][\s\S]*?'''/,greedy:!0},{pattern:/(^|[^\\'])'(?:\\.|\$(?!\{)|[^'\\\r\n$])*'/,lookbehind:!0,greedy:!0}],"interpolated-string":{pattern:/(^|[^\\'])'(?:\\.|\$(?:(?!\{)|\{[^{}\r\n]*\})|[^'\\\r\n$])*'/,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/\$\{[^{}\r\n]*\}/,inside:{expression:{pattern:/(^\$\{)[\s\S]+(?=\}$)/,lookbehind:!0},punctuation:/^\$\{|\}$/}},string:/[\s\S]+/}},datatype:{pattern:/(\b(?:output|param)\b[ \t]+\w+[ \t]+)\w+\b/,lookbehind:!0,alias:"class-name"},boolean:/\b(?:false|true)\b/,keyword:/\b(?:existing|for|if|in|module|null|output|param|resource|targetScope|var)\b/,decorator:/@\w+\b/,function:/\b[a-z_]\w*(?=[ \t]*\()/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/,punctuation:/[{}[\];(),.:]/},e.languages.bicep["interpolated-string"].inside.interpolation.inside.expression.inside=e.languages.bicep}return mle}var gle,uOe;function a1r(){if(uOe)return gle;uOe=1,gle=t,t.displayName="birb",t.aliases=[];function t(e){e.languages.birb=e.languages.extend("clike",{string:{pattern:/r?("|')(?:\\.|(?!\1)[^\\])*\1/,greedy:!0},"class-name":[/\b[A-Z](?:[\d_]*[a-zA-Z]\w*)?\b/,/\b(?:[A-Z]\w*|(?!(?:var|void)\b)[a-z]\w*)(?=\s+\w+\s*[;,=()])/],keyword:/\b(?:assert|break|case|class|const|default|else|enum|final|follows|for|grab|if|nest|new|next|noSeeb|return|static|switch|throw|var|void|while)\b/,operator:/\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?|:/,variable:/\b[a-z_]\w*\b/}),e.languages.insertBefore("birb","function",{metadata:{pattern:/<\w+>/,greedy:!0,alias:"symbol"}})}return gle}var yle,cOe;function o1r(){if(cOe)return yle;cOe=1;var t=c6();yle=e,e.displayName="bison",e.aliases=[];function e(r){r.register(t),r.languages.bison=r.languages.extend("c",{}),r.languages.insertBefore("bison","comment",{bison:{pattern:/^(?:[^%]|%(?!%))*%%[\s\S]*?%%/,inside:{c:{pattern:/%\{[\s\S]*?%\}|\{(?:\{[^}]*\}|[^{}])*\}/,inside:{delimiter:{pattern:/^%?\{|%?\}$/,alias:"punctuation"},"bison-variable":{pattern:/[$@](?:<[^\s>]+>)?[\w$]+/,alias:"variable",inside:{punctuation:/<|>/}},rest:r.languages.c}},comment:r.languages.c.comment,string:r.languages.c.string,property:/\S+(?=:)/,keyword:/%\w+/,number:{pattern:/(^|[^@])\b(?:0x[\da-f]+|\d+)/i,lookbehind:!0},punctuation:/%[%?]|[|:;\[\]<>]/}}})}return yle}var ble,fOe;function s1r(){if(fOe)return ble;fOe=1,ble=t,t.displayName="bnf",t.aliases=["rbnf"];function t(e){e.languages.bnf={string:{pattern:/"[^\r\n"]*"|'[^\r\n']*'/},definition:{pattern:/<[^<>\r\n\t]+>(?=\s*::=)/,alias:["rule","keyword"],inside:{punctuation:/^<|>$/}},rule:{pattern:/<[^<>\r\n\t]+>/,inside:{punctuation:/^<|>$/}},operator:/::=|[|()[\]{}*+?]|\.{3}/},e.languages.rbnf=e.languages.bnf}return ble}var xle,dOe;function l1r(){if(dOe)return xle;dOe=1,xle=t,t.displayName="brainfuck",t.aliases=[];function t(e){e.languages.brainfuck={pointer:{pattern:/<|>/,alias:"keyword"},increment:{pattern:/\+/,alias:"inserted"},decrement:{pattern:/-/,alias:"deleted"},branching:{pattern:/\[|\]/,alias:"important"},operator:/[.,]/,comment:/\S+/}}return xle}var _le,hOe;function u1r(){if(hOe)return _le;hOe=1,_le=t,t.displayName="brightscript",t.aliases=[];function t(e){e.languages.brightscript={comment:/(?:\brem|').*/i,"directive-statement":{pattern:/(^[\t ]*)#(?:const|else(?:[\t ]+if)?|end[\t ]+if|error|if).*/im,lookbehind:!0,alias:"property",inside:{"error-message":{pattern:/(^#error).+/,lookbehind:!0},directive:{pattern:/^#(?:const|else(?:[\t ]+if)?|end[\t ]+if|error|if)/,alias:"keyword"},expression:{pattern:/[\s\S]+/,inside:null}}},property:{pattern:/([\r\n{,][\t ]*)(?:(?!\d)\w+|"(?:[^"\r\n]|"")*"(?!"))(?=[ \t]*:)/,lookbehind:!0,greedy:!0},string:{pattern:/"(?:[^"\r\n]|"")*"(?!")/,greedy:!0},"class-name":{pattern:/(\bAs[\t ]+)\w+/i,lookbehind:!0},keyword:/\b(?:As|Dim|Each|Else|Elseif|End|Exit|For|Function|Goto|If|In|Print|Return|Step|Stop|Sub|Then|To|While)\b/i,boolean:/\b(?:false|true)\b/i,function:/\b(?!\d)\w+(?=[\t ]*\()/,number:/(?:\b\d+(?:\.\d+)?(?:[ed][+-]\d+)?|&h[a-f\d]+)\b[%&!#]?/i,operator:/--|\+\+|>>=?|<<=?|<>|[-+*/\\<>]=?|[:^=?]|\b(?:and|mod|not|or)\b/i,punctuation:/[.,;()[\]{}]/,constant:/\b(?:LINE_NUM)\b/i},e.languages.brightscript["directive-statement"].inside.expression.inside=e.languages.brightscript}return _le}var wle,pOe;function c1r(){if(pOe)return wle;pOe=1,wle=t,t.displayName="bro",t.aliases=[];function t(e){e.languages.bro={comment:{pattern:/(^|[^\\$])#.*/,lookbehind:!0,inside:{italic:/\b(?:FIXME|TODO|XXX)\b/}},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},boolean:/\b[TF]\b/,function:{pattern:/(\b(?:event|function|hook)[ \t]+)\w+(?:::\w+)?/,lookbehind:!0},builtin:/(?:@(?:load(?:-(?:plugin|sigs))?|unload|prefixes|ifn?def|else|(?:end)?if|DIR|FILENAME))|(?:&?(?:add_func|create_expire|default|delete_func|encrypt|error_handler|expire_func|group|log|mergeable|optional|persistent|priority|raw_output|read_expire|redef|rotate_interval|rotate_size|synchronized|type_column|write_expire))/,constant:{pattern:/(\bconst[ \t]+)\w+/i,lookbehind:!0},keyword:/\b(?:add|addr|alarm|any|bool|break|const|continue|count|delete|double|else|enum|event|export|file|for|function|global|hook|if|in|int|interval|local|module|next|of|opaque|pattern|port|print|record|return|schedule|set|string|subnet|table|time|timeout|using|vector|when)\b/,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&|\|\|?|\?|\*|\/|~|\^|%/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,punctuation:/[{}[\];(),.:]/}}return wle}var Sle,vOe;function f1r(){if(vOe)return Sle;vOe=1,Sle=t,t.displayName="bsl",t.aliases=[];function t(e){e.languages.bsl={comment:/\/\/.*/,string:[{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},{pattern:/'(?:[^'\r\n\\]|\\.)*'/}],keyword:[{pattern:/(^|[^\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:пока|для|новый|прервать|попытка|исключение|вызватьисключение|иначе|конецпопытки|неопределено|функция|перем|возврат|конецфункции|если|иначеесли|процедура|конецпроцедуры|тогда|знач|экспорт|конецесли|из|каждого|истина|ложь|по|цикл|конеццикла|выполнить)(?![\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])/i,lookbehind:!0},{pattern:/\b(?:break|do|each|else|elseif|enddo|endfunction|endif|endprocedure|endtry|except|execute|export|false|for|function|if|in|new|null|procedure|raise|return|then|to|true|try|undefined|val|var|while)\b/i}],number:{pattern:/(^(?=\d)|[^\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:\d+(?:\.\d*)?|\.\d+)(?:E[+-]?\d+)?/i,lookbehind:!0},operator:[/[<>+\-*/]=?|[%=]/,{pattern:/(^|[^\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:и|или|не)(?![\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])/i,lookbehind:!0},{pattern:/\b(?:and|not|or)\b/i}],punctuation:/\(\.|\.\)|[()\[\]:;,.]/,directive:[{pattern:/^([ \t]*)&.*/m,lookbehind:!0,greedy:!0,alias:"important"},{pattern:/^([ \t]*)#.*/gm,lookbehind:!0,greedy:!0,alias:"important"}]},e.languages.oscript=e.languages.bsl}return Sle}var Tle,mOe;function d1r(){if(mOe)return Tle;mOe=1,Tle=t,t.displayName="cfscript",t.aliases=[];function t(e){e.languages.cfscript=e.languages.extend("clike",{comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,inside:{annotation:{pattern:/(?:^|[^.])@[\w\.]+/,alias:"punctuation"}}},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],keyword:/\b(?:abstract|break|catch|component|continue|default|do|else|extends|final|finally|for|function|if|in|include|package|private|property|public|remote|required|rethrow|return|static|switch|throw|try|var|while|xml)\b(?!\s*=)/,operator:[/\+\+|--|&&|\|\||::|=>|[!=]==|<=?|>=?|[-+*/%&|^!=<>]=?|\?(?:\.|:)?|[?:]/,/\b(?:and|contains|eq|equal|eqv|gt|gte|imp|is|lt|lte|mod|not|or|xor)\b/],scope:{pattern:/\b(?:application|arguments|cgi|client|cookie|local|session|super|this|variables)\b/,alias:"global"},type:{pattern:/\b(?:any|array|binary|boolean|date|guid|numeric|query|string|struct|uuid|void|xml)\b/,alias:"builtin"}}),e.languages.insertBefore("cfscript","keyword",{"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"}}),delete e.languages.cfscript["class-name"],e.languages.cfc=e.languages.cfscript}return Tle}var Ele,gOe;function h1r(){if(gOe)return Ele;gOe=1;var t=dbe();Ele=e,e.displayName="chaiscript",e.aliases=[];function e(r){r.register(t),r.languages.chaiscript=r.languages.extend("clike",{string:{pattern:/(^|[^\\])'(?:[^'\\]|\\[\s\S])*'/,lookbehind:!0,greedy:!0},"class-name":[{pattern:/(\bclass\s+)\w+/,lookbehind:!0},{pattern:/(\b(?:attr|def)\s+)\w+(?=\s*::)/,lookbehind:!0}],keyword:/\b(?:attr|auto|break|case|catch|class|continue|def|default|else|finally|for|fun|global|if|return|switch|this|try|var|while)\b/,number:[r.languages.cpp.number,/\b(?:Infinity|NaN)\b/],operator:/>>=?|<<=?|\|\||&&|:[:=]?|--|\+\+|[=!<>+\-*/%|&^]=?|[?~]|`[^`\r\n]{1,4}`/}),r.languages.insertBefore("chaiscript","operator",{"parameter-type":{pattern:/([,(]\s*)\w+(?=\s+\w)/,lookbehind:!0,alias:"class-name"}}),r.languages.insertBefore("chaiscript","string",{"string-interpolation":{pattern:/(^|[^\\])"(?:[^"$\\]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})*"/,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\}/,lookbehind:!0,inside:{"interpolation-expression":{pattern:/(^\$\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:r.languages.chaiscript},"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"}}},string:/[\s\S]+/}}})}return Ele}var Ale,yOe;function p1r(){if(yOe)return Ale;yOe=1,Ale=t,t.displayName="cil",t.aliases=[];function t(e){e.languages.cil={comment:/\/\/.*/,string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},directive:{pattern:/(^|\W)\.[a-z]+(?=\s)/,lookbehind:!0,alias:"class-name"},variable:/\[[\w\.]+\]/,keyword:/\b(?:abstract|ansi|assembly|auto|autochar|beforefieldinit|bool|bstr|byvalstr|catch|char|cil|class|currency|date|decimal|default|enum|error|explicit|extends|extern|famandassem|family|famorassem|final(?:ly)?|float32|float64|hidebysig|u?int(?:8|16|32|64)?|iant|idispatch|implements|import|initonly|instance|interface|iunknown|literal|lpstr|lpstruct|lptstr|lpwstr|managed|method|native(?:Type)?|nested|newslot|object(?:ref)?|pinvokeimpl|private|privatescope|public|reqsecobj|rtspecialname|runtime|sealed|sequential|serializable|specialname|static|string|struct|syschar|tbstr|unicode|unmanagedexp|unsigned|value(?:type)?|variant|virtual|void)\b/,function:/\b(?:(?:constrained|no|readonly|tail|unaligned|volatile)\.)?(?:conv\.(?:[iu][1248]?|ovf\.[iu][1248]?(?:\.un)?|r\.un|r4|r8)|ldc\.(?:i4(?:\.\d+|\.[mM]1|\.s)?|i8|r4|r8)|ldelem(?:\.[iu][1248]?|\.r[48]|\.ref|a)?|ldind\.(?:[iu][1248]?|r[48]|ref)|stelem\.?(?:i[1248]?|r[48]|ref)?|stind\.(?:i[1248]?|r[48]|ref)?|end(?:fault|filter|finally)|ldarg(?:\.[0-3s]|a(?:\.s)?)?|ldloc(?:\.\d+|\.s)?|sub(?:\.ovf(?:\.un)?)?|mul(?:\.ovf(?:\.un)?)?|add(?:\.ovf(?:\.un)?)?|stloc(?:\.[0-3s])?|refany(?:type|val)|blt(?:\.un)?(?:\.s)?|ble(?:\.un)?(?:\.s)?|bgt(?:\.un)?(?:\.s)?|bge(?:\.un)?(?:\.s)?|unbox(?:\.any)?|init(?:blk|obj)|call(?:i|virt)?|brfalse(?:\.s)?|bne\.un(?:\.s)?|ldloca(?:\.s)?|brzero(?:\.s)?|brtrue(?:\.s)?|brnull(?:\.s)?|brinst(?:\.s)?|starg(?:\.s)?|leave(?:\.s)?|shr(?:\.un)?|rem(?:\.un)?|div(?:\.un)?|clt(?:\.un)?|alignment|castclass|ldvirtftn|beq(?:\.s)?|ckfinite|ldsflda|ldtoken|localloc|mkrefany|rethrow|cgt\.un|arglist|switch|stsfld|sizeof|newobj|newarr|ldsfld|ldnull|ldflda|isinst|throw|stobj|stfld|ldstr|ldobj|ldlen|ldftn|ldfld|cpobj|cpblk|break|br\.s|xor|shl|ret|pop|not|nop|neg|jmp|dup|cgt|ceq|box|and|or|br)\b/,boolean:/\b(?:false|true)\b/,number:/\b-?(?:0x[0-9a-f]+|\d+)(?:\.[0-9a-f]+)?\b/i,punctuation:/[{}[\];(),:=]|IL_[0-9A-Za-z]+/}}return Ale}var Cle,bOe;function v1r(){if(bOe)return Cle;bOe=1,Cle=t,t.displayName="clojure",t.aliases=[];function t(e){e.languages.clojure={comment:{pattern:/;.*/,greedy:!0},string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},char:/\\\w+/,symbol:{pattern:/(^|[\s()\[\]{},])::?[\w*+!?'<>=/.-]+/,lookbehind:!0},keyword:{pattern:/(\()(?:-|->|->>|\.|\.\.|\*|\/|\+|<|<=|=|==|>|>=|accessor|agent|agent-errors|aget|alength|all-ns|alter|and|append-child|apply|array-map|aset|aset-boolean|aset-byte|aset-char|aset-double|aset-float|aset-int|aset-long|aset-short|assert|assoc|await|await-for|bean|binding|bit-and|bit-not|bit-or|bit-shift-left|bit-shift-right|bit-xor|boolean|branch\?|butlast|byte|cast|char|children|class|clear-agent-errors|comment|commute|comp|comparator|complement|concat|cond|conj|cons|constantly|construct-proxy|contains\?|count|create-ns|create-struct|cycle|dec|declare|def|def-|definline|definterface|defmacro|defmethod|defmulti|defn|defn-|defonce|defproject|defprotocol|defrecord|defstruct|deftype|deref|difference|disj|dissoc|distinct|do|doall|doc|dorun|doseq|dosync|dotimes|doto|double|down|drop|drop-while|edit|end\?|ensure|eval|every\?|false\?|ffirst|file-seq|filter|find|find-doc|find-ns|find-var|first|float|flush|fn|fnseq|for|frest|gensym|get|get-proxy-class|hash-map|hash-set|identical\?|identity|if|if-let|if-not|import|in-ns|inc|index|insert-child|insert-left|insert-right|inspect-table|inspect-tree|instance\?|int|interleave|intersection|into|into-array|iterate|join|key|keys|keyword|keyword\?|last|lazy-cat|lazy-cons|left|lefts|let|line-seq|list|list\*|load|load-file|locking|long|loop|macroexpand|macroexpand-1|make-array|make-node|map|map-invert|map\?|mapcat|max|max-key|memfn|merge|merge-with|meta|min|min-key|monitor-enter|name|namespace|neg\?|new|newline|next|nil\?|node|not|not-any\?|not-every\?|not=|ns|ns-imports|ns-interns|ns-map|ns-name|ns-publics|ns-refers|ns-resolve|ns-unmap|nth|nthrest|or|parse|partial|path|peek|pop|pos\?|pr|pr-str|print|print-str|println|println-str|prn|prn-str|project|proxy|proxy-mappings|quot|quote|rand|rand-int|range|re-find|re-groups|re-matcher|re-matches|re-pattern|re-seq|read|read-line|recur|reduce|ref|ref-set|refer|rem|remove|remove-method|remove-ns|rename|rename-keys|repeat|replace|replicate|resolve|rest|resultset-seq|reverse|rfirst|right|rights|root|rrest|rseq|second|select|select-keys|send|send-off|seq|seq-zip|seq\?|set|set!|short|slurp|some|sort|sort-by|sorted-map|sorted-map-by|sorted-set|special-symbol\?|split-at|split-with|str|string\?|struct|struct-map|subs|subvec|symbol|symbol\?|sync|take|take-nth|take-while|test|throw|time|to-array|to-array-2d|tree-seq|true\?|try|union|up|update-proxy|val|vals|var|var-get|var-set|var\?|vector|vector-zip|vector\?|when|when-first|when-let|when-not|with-local-vars|with-meta|with-open|with-out-str|xml-seq|xml-zip|zero\?|zipmap|zipper)(?=[\s)]|$)/,lookbehind:!0},boolean:/\b(?:false|nil|true)\b/,number:{pattern:/(^|[^\w$@])(?:\d+(?:[/.]\d+)?(?:e[+-]?\d+)?|0x[a-f0-9]+|[1-9]\d?r[a-z0-9]+)[lmn]?(?![\w$@])/i,lookbehind:!0},function:{pattern:/((?:^|[^'])\()[\w*+!?'<>=/.-]+(?=[\s)]|$)/,lookbehind:!0},operator:/[#@^`~]/,punctuation:/[{}\[\](),]/}}return Cle}var Mle,xOe;function m1r(){if(xOe)return Mle;xOe=1,Mle=t,t.displayName="cmake",t.aliases=[];function t(e){e.languages.cmake={comment:/#.*/,string:{pattern:/"(?:[^\\"]|\\.)*"/,greedy:!0,inside:{interpolation:{pattern:/\$\{(?:[^{}$]|\$\{[^{}$]*\})*\}/,inside:{punctuation:/\$\{|\}/,variable:/\w+/}}}},variable:/\b(?:CMAKE_\w+|\w+_(?:(?:BINARY|SOURCE)_DIR|DESCRIPTION|HOMEPAGE_URL|ROOT|VERSION(?:_MAJOR|_MINOR|_PATCH|_TWEAK)?)|(?:ANDROID|APPLE|BORLAND|BUILD_SHARED_LIBS|CACHE|CPACK_(?:ABSOLUTE_DESTINATION_FILES|COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY|ERROR_ON_ABSOLUTE_INSTALL_DESTINATION|INCLUDE_TOPLEVEL_DIRECTORY|INSTALL_DEFAULT_DIRECTORY_PERMISSIONS|INSTALL_SCRIPT|PACKAGING_INSTALL_PREFIX|SET_DESTDIR|WARN_ON_ABSOLUTE_INSTALL_DESTINATION)|CTEST_(?:BINARY_DIRECTORY|BUILD_COMMAND|BUILD_NAME|BZR_COMMAND|BZR_UPDATE_OPTIONS|CHANGE_ID|CHECKOUT_COMMAND|CONFIGURATION_TYPE|CONFIGURE_COMMAND|COVERAGE_COMMAND|COVERAGE_EXTRA_FLAGS|CURL_OPTIONS|CUSTOM_(?:COVERAGE_EXCLUDE|ERROR_EXCEPTION|ERROR_MATCH|ERROR_POST_CONTEXT|ERROR_PRE_CONTEXT|MAXIMUM_FAILED_TEST_OUTPUT_SIZE|MAXIMUM_NUMBER_OF_(?:ERRORS|WARNINGS)|MAXIMUM_PASSED_TEST_OUTPUT_SIZE|MEMCHECK_IGNORE|POST_MEMCHECK|POST_TEST|PRE_MEMCHECK|PRE_TEST|TESTS_IGNORE|WARNING_EXCEPTION|WARNING_MATCH)|CVS_CHECKOUT|CVS_COMMAND|CVS_UPDATE_OPTIONS|DROP_LOCATION|DROP_METHOD|DROP_SITE|DROP_SITE_CDASH|DROP_SITE_PASSWORD|DROP_SITE_USER|EXTRA_COVERAGE_GLOB|GIT_COMMAND|GIT_INIT_SUBMODULES|GIT_UPDATE_CUSTOM|GIT_UPDATE_OPTIONS|HG_COMMAND|HG_UPDATE_OPTIONS|LABELS_FOR_SUBPROJECTS|MEMORYCHECK_(?:COMMAND|COMMAND_OPTIONS|SANITIZER_OPTIONS|SUPPRESSIONS_FILE|TYPE)|NIGHTLY_START_TIME|P4_CLIENT|P4_COMMAND|P4_OPTIONS|P4_UPDATE_OPTIONS|RUN_CURRENT_SCRIPT|SCP_COMMAND|SITE|SOURCE_DIRECTORY|SUBMIT_URL|SVN_COMMAND|SVN_OPTIONS|SVN_UPDATE_OPTIONS|TEST_LOAD|TEST_TIMEOUT|TRIGGER_SITE|UPDATE_COMMAND|UPDATE_OPTIONS|UPDATE_VERSION_ONLY|USE_LAUNCHERS)|CYGWIN|ENV|EXECUTABLE_OUTPUT_PATH|GHS-MULTI|IOS|LIBRARY_OUTPUT_PATH|MINGW|MSVC(?:10|11|12|14|60|70|71|80|90|_IDE|_TOOLSET_VERSION|_VERSION)?|MSYS|PROJECT_(?:BINARY_DIR|DESCRIPTION|HOMEPAGE_URL|NAME|SOURCE_DIR|VERSION|VERSION_(?:MAJOR|MINOR|PATCH|TWEAK))|UNIX|WIN32|WINCE|WINDOWS_PHONE|WINDOWS_STORE|XCODE|XCODE_VERSION))\b/,property:/\b(?:cxx_\w+|(?:ARCHIVE_OUTPUT_(?:DIRECTORY|NAME)|COMPILE_DEFINITIONS|COMPILE_PDB_NAME|COMPILE_PDB_OUTPUT_DIRECTORY|EXCLUDE_FROM_DEFAULT_BUILD|IMPORTED_(?:IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_LANGUAGES|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|NO_SONAME|OBJECTS|SONAME)|INTERPROCEDURAL_OPTIMIZATION|LIBRARY_OUTPUT_DIRECTORY|LIBRARY_OUTPUT_NAME|LINK_FLAGS|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|MAP_IMPORTED_CONFIG|OSX_ARCHITECTURES|OUTPUT_NAME|PDB_NAME|PDB_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_NAME|STATIC_LIBRARY_FLAGS|VS_CSHARP|VS_DOTNET_REFERENCEPROP|VS_DOTNET_REFERENCE|VS_GLOBAL_SECTION_POST|VS_GLOBAL_SECTION_PRE|VS_GLOBAL|XCODE_ATTRIBUTE)_\w+|\w+_(?:CLANG_TIDY|COMPILER_LAUNCHER|CPPCHECK|CPPLINT|INCLUDE_WHAT_YOU_USE|OUTPUT_NAME|POSTFIX|VISIBILITY_PRESET)|ABSTRACT|ADDITIONAL_MAKE_CLEAN_FILES|ADVANCED|ALIASED_TARGET|ALLOW_DUPLICATE_CUSTOM_TARGETS|ANDROID_(?:ANT_ADDITIONAL_OPTIONS|API|API_MIN|ARCH|ASSETS_DIRECTORIES|GUI|JAR_DEPENDENCIES|NATIVE_LIB_DEPENDENCIES|NATIVE_LIB_DIRECTORIES|PROCESS_MAX|PROGUARD|PROGUARD_CONFIG_PATH|SECURE_PROPS_PATH|SKIP_ANT_STEP|STL_TYPE)|ARCHIVE_OUTPUT_DIRECTORY|ATTACHED_FILES|ATTACHED_FILES_ON_FAIL|AUTOGEN_(?:BUILD_DIR|ORIGIN_DEPENDS|PARALLEL|SOURCE_GROUP|TARGETS_FOLDER|TARGET_DEPENDS)|AUTOMOC|AUTOMOC_(?:COMPILER_PREDEFINES|DEPEND_FILTERS|EXECUTABLE|MACRO_NAMES|MOC_OPTIONS|SOURCE_GROUP|TARGETS_FOLDER)|AUTORCC|AUTORCC_EXECUTABLE|AUTORCC_OPTIONS|AUTORCC_SOURCE_GROUP|AUTOUIC|AUTOUIC_EXECUTABLE|AUTOUIC_OPTIONS|AUTOUIC_SEARCH_PATHS|BINARY_DIR|BUILDSYSTEM_TARGETS|BUILD_RPATH|BUILD_RPATH_USE_ORIGIN|BUILD_WITH_INSTALL_NAME_DIR|BUILD_WITH_INSTALL_RPATH|BUNDLE|BUNDLE_EXTENSION|CACHE_VARIABLES|CLEAN_NO_CUSTOM|COMMON_LANGUAGE_RUNTIME|COMPATIBLE_INTERFACE_(?:BOOL|NUMBER_MAX|NUMBER_MIN|STRING)|COMPILE_(?:DEFINITIONS|FEATURES|FLAGS|OPTIONS|PDB_NAME|PDB_OUTPUT_DIRECTORY)|COST|CPACK_DESKTOP_SHORTCUTS|CPACK_NEVER_OVERWRITE|CPACK_PERMANENT|CPACK_STARTUP_SHORTCUTS|CPACK_START_MENU_SHORTCUTS|CPACK_WIX_ACL|CROSSCOMPILING_EMULATOR|CUDA_EXTENSIONS|CUDA_PTX_COMPILATION|CUDA_RESOLVE_DEVICE_SYMBOLS|CUDA_SEPARABLE_COMPILATION|CUDA_STANDARD|CUDA_STANDARD_REQUIRED|CXX_EXTENSIONS|CXX_STANDARD|CXX_STANDARD_REQUIRED|C_EXTENSIONS|C_STANDARD|C_STANDARD_REQUIRED|DEBUG_CONFIGURATIONS|DEFINE_SYMBOL|DEFINITIONS|DEPENDS|DEPLOYMENT_ADDITIONAL_FILES|DEPLOYMENT_REMOTE_DIRECTORY|DISABLED|DISABLED_FEATURES|ECLIPSE_EXTRA_CPROJECT_CONTENTS|ECLIPSE_EXTRA_NATURES|ENABLED_FEATURES|ENABLED_LANGUAGES|ENABLE_EXPORTS|ENVIRONMENT|EXCLUDE_FROM_ALL|EXCLUDE_FROM_DEFAULT_BUILD|EXPORT_NAME|EXPORT_PROPERTIES|EXTERNAL_OBJECT|EchoString|FAIL_REGULAR_EXPRESSION|FIND_LIBRARY_USE_LIB32_PATHS|FIND_LIBRARY_USE_LIB64_PATHS|FIND_LIBRARY_USE_LIBX32_PATHS|FIND_LIBRARY_USE_OPENBSD_VERSIONING|FIXTURES_CLEANUP|FIXTURES_REQUIRED|FIXTURES_SETUP|FOLDER|FRAMEWORK|Fortran_FORMAT|Fortran_MODULE_DIRECTORY|GENERATED|GENERATOR_FILE_NAME|GENERATOR_IS_MULTI_CONFIG|GHS_INTEGRITY_APP|GHS_NO_SOURCE_GROUP_FILE|GLOBAL_DEPENDS_DEBUG_MODE|GLOBAL_DEPENDS_NO_CYCLES|GNUtoMS|HAS_CXX|HEADER_FILE_ONLY|HELPSTRING|IMPLICIT_DEPENDS_INCLUDE_TRANSFORM|IMPORTED|IMPORTED_(?:COMMON_LANGUAGE_RUNTIME|CONFIGURATIONS|GLOBAL|IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_(?:LANGUAGES|LIBRARIES|MULTIPLICITY)|LOCATION|NO_SONAME|OBJECTS|SONAME)|IMPORT_PREFIX|IMPORT_SUFFIX|INCLUDE_DIRECTORIES|INCLUDE_REGULAR_EXPRESSION|INSTALL_NAME_DIR|INSTALL_RPATH|INSTALL_RPATH_USE_LINK_PATH|INTERFACE_(?:AUTOUIC_OPTIONS|COMPILE_DEFINITIONS|COMPILE_FEATURES|COMPILE_OPTIONS|INCLUDE_DIRECTORIES|LINK_DEPENDS|LINK_DIRECTORIES|LINK_LIBRARIES|LINK_OPTIONS|POSITION_INDEPENDENT_CODE|SOURCES|SYSTEM_INCLUDE_DIRECTORIES)|INTERPROCEDURAL_OPTIMIZATION|IN_TRY_COMPILE|IOS_INSTALL_COMBINED|JOB_POOLS|JOB_POOL_COMPILE|JOB_POOL_LINK|KEEP_EXTENSION|LABELS|LANGUAGE|LIBRARY_OUTPUT_DIRECTORY|LINKER_LANGUAGE|LINK_(?:DEPENDS|DEPENDS_NO_SHARED|DIRECTORIES|FLAGS|INTERFACE_LIBRARIES|INTERFACE_MULTIPLICITY|LIBRARIES|OPTIONS|SEARCH_END_STATIC|SEARCH_START_STATIC|WHAT_YOU_USE)|LISTFILE_STACK|LOCATION|MACOSX_BUNDLE|MACOSX_BUNDLE_INFO_PLIST|MACOSX_FRAMEWORK_INFO_PLIST|MACOSX_PACKAGE_LOCATION|MACOSX_RPATH|MACROS|MANUALLY_ADDED_DEPENDENCIES|MEASUREMENT|MODIFIED|NAME|NO_SONAME|NO_SYSTEM_FROM_IMPORTED|OBJECT_DEPENDS|OBJECT_OUTPUTS|OSX_ARCHITECTURES|OUTPUT_NAME|PACKAGES_FOUND|PACKAGES_NOT_FOUND|PARENT_DIRECTORY|PASS_REGULAR_EXPRESSION|PDB_NAME|PDB_OUTPUT_DIRECTORY|POSITION_INDEPENDENT_CODE|POST_INSTALL_SCRIPT|PREDEFINED_TARGETS_FOLDER|PREFIX|PRE_INSTALL_SCRIPT|PRIVATE_HEADER|PROCESSORS|PROCESSOR_AFFINITY|PROJECT_LABEL|PUBLIC_HEADER|REPORT_UNDEFINED_PROPERTIES|REQUIRED_FILES|RESOURCE|RESOURCE_LOCK|RULE_LAUNCH_COMPILE|RULE_LAUNCH_CUSTOM|RULE_LAUNCH_LINK|RULE_MESSAGES|RUNTIME_OUTPUT_DIRECTORY|RUN_SERIAL|SKIP_AUTOGEN|SKIP_AUTOMOC|SKIP_AUTORCC|SKIP_AUTOUIC|SKIP_BUILD_RPATH|SKIP_RETURN_CODE|SOURCES|SOURCE_DIR|SOVERSION|STATIC_LIBRARY_FLAGS|STATIC_LIBRARY_OPTIONS|STRINGS|SUBDIRECTORIES|SUFFIX|SYMBOLIC|TARGET_ARCHIVES_MAY_BE_SHARED_LIBS|TARGET_MESSAGES|TARGET_SUPPORTS_SHARED_LIBS|TESTS|TEST_INCLUDE_FILE|TEST_INCLUDE_FILES|TIMEOUT|TIMEOUT_AFTER_MATCH|TYPE|USE_FOLDERS|VALUE|VARIABLES|VERSION|VISIBILITY_INLINES_HIDDEN|VS_(?:CONFIGURATION_TYPE|COPY_TO_OUT_DIR|DEBUGGER_(?:COMMAND|COMMAND_ARGUMENTS|ENVIRONMENT|WORKING_DIRECTORY)|DEPLOYMENT_CONTENT|DEPLOYMENT_LOCATION|DOTNET_REFERENCES|DOTNET_REFERENCES_COPY_LOCAL|GLOBAL_KEYWORD|GLOBAL_PROJECT_TYPES|GLOBAL_ROOTNAMESPACE|INCLUDE_IN_VSIX|IOT_STARTUP_TASK|KEYWORD|RESOURCE_GENERATOR|SCC_AUXPATH|SCC_LOCALPATH|SCC_PROJECTNAME|SCC_PROVIDER|SDK_REFERENCES|SHADER_(?:DISABLE_OPTIMIZATIONS|ENABLE_DEBUG|ENTRYPOINT|FLAGS|MODEL|OBJECT_FILE_NAME|OUTPUT_HEADER_FILE|TYPE|VARIABLE_NAME)|STARTUP_PROJECT|TOOL_OVERRIDE|USER_PROPS|WINRT_COMPONENT|WINRT_EXTENSIONS|WINRT_REFERENCES|XAML_TYPE)|WILL_FAIL|WIN32_EXECUTABLE|WINDOWS_EXPORT_ALL_SYMBOLS|WORKING_DIRECTORY|WRAP_EXCLUDE|XCODE_(?:EMIT_EFFECTIVE_PLATFORM_NAME|EXPLICIT_FILE_TYPE|FILE_ATTRIBUTES|LAST_KNOWN_FILE_TYPE|PRODUCT_TYPE|SCHEME_(?:ADDRESS_SANITIZER|ADDRESS_SANITIZER_USE_AFTER_RETURN|ARGUMENTS|DISABLE_MAIN_THREAD_CHECKER|DYNAMIC_LIBRARY_LOADS|DYNAMIC_LINKER_API_USAGE|ENVIRONMENT|EXECUTABLE|GUARD_MALLOC|MAIN_THREAD_CHECKER_STOP|MALLOC_GUARD_EDGES|MALLOC_SCRIBBLE|MALLOC_STACK|THREAD_SANITIZER(?:_STOP)?|UNDEFINED_BEHAVIOUR_SANITIZER(?:_STOP)?|ZOMBIE_OBJECTS))|XCTEST)\b/,keyword:/\b(?:add_compile_definitions|add_compile_options|add_custom_command|add_custom_target|add_definitions|add_dependencies|add_executable|add_library|add_link_options|add_subdirectory|add_test|aux_source_directory|break|build_command|build_name|cmake_host_system_information|cmake_minimum_required|cmake_parse_arguments|cmake_policy|configure_file|continue|create_test_sourcelist|ctest_build|ctest_configure|ctest_coverage|ctest_empty_binary_directory|ctest_memcheck|ctest_read_custom_files|ctest_run_script|ctest_sleep|ctest_start|ctest_submit|ctest_test|ctest_update|ctest_upload|define_property|else|elseif|enable_language|enable_testing|endforeach|endfunction|endif|endmacro|endwhile|exec_program|execute_process|export|export_library_dependencies|file|find_file|find_library|find_package|find_path|find_program|fltk_wrap_ui|foreach|function|get_cmake_property|get_directory_property|get_filename_component|get_property|get_source_file_property|get_target_property|get_test_property|if|include|include_directories|include_external_msproject|include_guard|include_regular_expression|install|install_files|install_programs|install_targets|link_directories|link_libraries|list|load_cache|load_command|macro|make_directory|mark_as_advanced|math|message|option|output_required_files|project|qt_wrap_cpp|qt_wrap_ui|remove|remove_definitions|return|separate_arguments|set|set_directory_properties|set_property|set_source_files_properties|set_target_properties|set_tests_properties|site_name|source_group|string|subdir_depends|subdirs|target_compile_definitions|target_compile_features|target_compile_options|target_include_directories|target_link_directories|target_link_libraries|target_link_options|target_sources|try_compile|try_run|unset|use_mangled_mesa|utility_source|variable_requires|variable_watch|while|write_file)(?=\s*\()\b/,boolean:/\b(?:FALSE|OFF|ON|TRUE)\b/,namespace:/\b(?:INTERFACE|PRIVATE|PROPERTIES|PUBLIC|SHARED|STATIC|TARGET_OBJECTS)\b/,operator:/\b(?:AND|DEFINED|EQUAL|GREATER|LESS|MATCHES|NOT|OR|STREQUAL|STRGREATER|STRLESS|VERSION_EQUAL|VERSION_GREATER|VERSION_LESS)\b/,inserted:{pattern:/\b\w+::\w+\b/,alias:"class-name"},number:/\b\d+(?:\.\d+)*\b/,function:/\b[a-z_]\w*(?=\s*\()\b/i,punctuation:/[()>}]|\$[<{]/}}return Mle}var Rle,_Oe;function g1r(){if(_Oe)return Rle;_Oe=1,Rle=t,t.displayName="cobol",t.aliases=[];function t(e){e.languages.cobol={comment:{pattern:/\*>.*|(^[ \t]*)\*.*/m,lookbehind:!0,greedy:!0},string:{pattern:/[xzgn]?(?:"(?:[^\r\n"]|"")*"(?!")|'(?:[^\r\n']|'')*'(?!'))/i,greedy:!0},level:{pattern:/(^[ \t]*)\d+\b/m,lookbehind:!0,greedy:!0,alias:"number"},"class-name":{pattern:/(\bpic(?:ture)?\s+)(?:(?:[-\w$/,:*+<>]|\.(?!\s|$))(?:\(\d+\))?)+/i,lookbehind:!0,inside:{number:{pattern:/(\()\d+/,lookbehind:!0},punctuation:/[()]/}},keyword:{pattern:/(^|[^\w-])(?:ABORT|ACCEPT|ACCESS|ADD|ADDRESS|ADVANCING|AFTER|ALIGNED|ALL|ALPHABET|ALPHABETIC|ALPHABETIC-LOWER|ALPHABETIC-UPPER|ALPHANUMERIC|ALPHANUMERIC-EDITED|ALSO|ALTER|ALTERNATE|ANY|ARE|AREA|AREAS|AS|ASCENDING|ASCII|ASSIGN|ASSOCIATED-DATA|ASSOCIATED-DATA-LENGTH|AT|ATTRIBUTE|AUTHOR|AUTO|AUTO-SKIP|BACKGROUND-COLOR|BACKGROUND-COLOUR|BASIS|BEEP|BEFORE|BEGINNING|BELL|BINARY|BIT|BLANK|BLINK|BLOCK|BOTTOM|BOUNDS|BY|BYFUNCTION|BYTITLE|CALL|CANCEL|CAPABLE|CCSVERSION|CD|CF|CH|CHAINING|CHANGED|CHANNEL|CHARACTER|CHARACTERS|CLASS|CLASS-ID|CLOCK-UNITS|CLOSE|CLOSE-DISPOSITION|COBOL|CODE|CODE-SET|COL|COLLATING|COLUMN|COM-REG|COMMA|COMMITMENT|COMMON|COMMUNICATION|COMP|COMP-1|COMP-2|COMP-3|COMP-4|COMP-5|COMPUTATIONAL|COMPUTATIONAL-1|COMPUTATIONAL-2|COMPUTATIONAL-3|COMPUTATIONAL-4|COMPUTATIONAL-5|COMPUTE|CONFIGURATION|CONTAINS|CONTENT|CONTINUE|CONTROL|CONTROL-POINT|CONTROLS|CONVENTION|CONVERTING|COPY|CORR|CORRESPONDING|COUNT|CRUNCH|CURRENCY|CURSOR|DATA|DATA-BASE|DATE|DATE-COMPILED|DATE-WRITTEN|DAY|DAY-OF-WEEK|DBCS|DE|DEBUG-CONTENTS|DEBUG-ITEM|DEBUG-LINE|DEBUG-NAME|DEBUG-SUB-1|DEBUG-SUB-2|DEBUG-SUB-3|DEBUGGING|DECIMAL-POINT|DECLARATIVES|DEFAULT|DEFAULT-DISPLAY|DEFINITION|DELETE|DELIMITED|DELIMITER|DEPENDING|DESCENDING|DESTINATION|DETAIL|DFHRESP|DFHVALUE|DISABLE|DISK|DISPLAY|DISPLAY-1|DIVIDE|DIVISION|DONTCARE|DOUBLE|DOWN|DUPLICATES|DYNAMIC|EBCDIC|EGCS|EGI|ELSE|EMI|EMPTY-CHECK|ENABLE|END|END-ACCEPT|END-ADD|END-CALL|END-COMPUTE|END-DELETE|END-DIVIDE|END-EVALUATE|END-IF|END-MULTIPLY|END-OF-PAGE|END-PERFORM|END-READ|END-RECEIVE|END-RETURN|END-REWRITE|END-SEARCH|END-START|END-STRING|END-SUBTRACT|END-UNSTRING|END-WRITE|ENDING|ENTER|ENTRY|ENTRY-PROCEDURE|ENVIRONMENT|EOL|EOP|EOS|ERASE|ERROR|ESCAPE|ESI|EVALUATE|EVENT|EVERY|EXCEPTION|EXCLUSIVE|EXHIBIT|EXIT|EXPORT|EXTEND|EXTENDED|EXTERNAL|FD|FILE|FILE-CONTROL|FILLER|FINAL|FIRST|FOOTING|FOR|FOREGROUND-COLOR|FOREGROUND-COLOUR|FROM|FULL|FUNCTION|FUNCTION-POINTER|FUNCTIONNAME|GENERATE|GIVING|GLOBAL|GO|GOBACK|GRID|GROUP|HEADING|HIGH-VALUE|HIGH-VALUES|HIGHLIGHT|I-O|I-O-CONTROL|ID|IDENTIFICATION|IF|IMPLICIT|IMPORT|IN|INDEX|INDEXED|INDICATE|INITIAL|INITIALIZE|INITIATE|INPUT|INPUT-OUTPUT|INSPECT|INSTALLATION|INTEGER|INTO|INVALID|INVOKE|IS|JUST|JUSTIFIED|KANJI|KEPT|KEY|KEYBOARD|LABEL|LANGUAGE|LAST|LB|LD|LEADING|LEFT|LEFTLINE|LENGTH|LENGTH-CHECK|LIBACCESS|LIBPARAMETER|LIBRARY|LIMIT|LIMITS|LINAGE|LINAGE-COUNTER|LINE|LINE-COUNTER|LINES|LINKAGE|LIST|LOCAL|LOCAL-STORAGE|LOCK|LONG-DATE|LONG-TIME|LOW-VALUE|LOW-VALUES|LOWER|LOWLIGHT|MEMORY|MERGE|MESSAGE|MMDDYYYY|MODE|MODULES|MORE-LABELS|MOVE|MULTIPLE|MULTIPLY|NAMED|NATIONAL|NATIONAL-EDITED|NATIVE|NEGATIVE|NETWORK|NEXT|NO|NO-ECHO|NULL|NULLS|NUMBER|NUMERIC|NUMERIC-DATE|NUMERIC-EDITED|NUMERIC-TIME|OBJECT-COMPUTER|OCCURS|ODT|OF|OFF|OMITTED|ON|OPEN|OPTIONAL|ORDER|ORDERLY|ORGANIZATION|OTHER|OUTPUT|OVERFLOW|OVERLINE|OWN|PACKED-DECIMAL|PADDING|PAGE|PAGE-COUNTER|PASSWORD|PERFORM|PF|PH|PIC|PICTURE|PLUS|POINTER|PORT|POSITION|POSITIVE|PRINTER|PRINTING|PRIVATE|PROCEDURE|PROCEDURE-POINTER|PROCEDURES|PROCEED|PROCESS|PROGRAM|PROGRAM-ID|PROGRAM-LIBRARY|PROMPT|PURGE|QUEUE|QUOTE|QUOTES|RANDOM|RD|READ|READER|REAL|RECEIVE|RECEIVED|RECORD|RECORDING|RECORDS|RECURSIVE|REDEFINES|REEL|REF|REFERENCE|REFERENCES|RELATIVE|RELEASE|REMAINDER|REMARKS|REMOTE|REMOVAL|REMOVE|RENAMES|REPLACE|REPLACING|REPORT|REPORTING|REPORTS|REQUIRED|RERUN|RESERVE|RESET|RETURN|RETURN-CODE|RETURNING|REVERSE-VIDEO|REVERSED|REWIND|REWRITE|RF|RH|RIGHT|ROUNDED|RUN|SAME|SAVE|SCREEN|SD|SEARCH|SECTION|SECURE|SECURITY|SEGMENT|SEGMENT-LIMIT|SELECT|SEND|SENTENCE|SEPARATE|SEQUENCE|SEQUENTIAL|SET|SHARED|SHAREDBYALL|SHAREDBYRUNUNIT|SHARING|SHIFT-IN|SHIFT-OUT|SHORT-DATE|SIGN|SIZE|SORT|SORT-CONTROL|SORT-CORE-SIZE|SORT-FILE-SIZE|SORT-MERGE|SORT-MESSAGE|SORT-MODE-SIZE|SORT-RETURN|SOURCE|SOURCE-COMPUTER|SPACE|SPACES|SPECIAL-NAMES|STANDARD|STANDARD-1|STANDARD-2|START|STATUS|STOP|STRING|SUB-QUEUE-1|SUB-QUEUE-2|SUB-QUEUE-3|SUBTRACT|SUM|SUPPRESS|SYMBOL|SYMBOLIC|SYNC|SYNCHRONIZED|TABLE|TALLY|TALLYING|TAPE|TASK|TERMINAL|TERMINATE|TEST|TEXT|THEN|THREAD|THREAD-LOCAL|THROUGH|THRU|TIME|TIMER|TIMES|TITLE|TO|TODAYS-DATE|TODAYS-NAME|TOP|TRAILING|TRUNCATED|TYPE|TYPEDEF|UNDERLINE|UNIT|UNSTRING|UNTIL|UP|UPON|USAGE|USE|USING|VALUE|VALUES|VARYING|VIRTUAL|WAIT|WHEN|WHEN-COMPILED|WITH|WORDS|WORKING-STORAGE|WRITE|YEAR|YYYYDDD|YYYYMMDD|ZERO-FILL|ZEROES|ZEROS)(?![\w-])/i,lookbehind:!0},boolean:{pattern:/(^|[^\w-])(?:false|true)(?![\w-])/i,lookbehind:!0},number:{pattern:/(^|[^\w-])(?:[+-]?(?:(?:\d+(?:[.,]\d+)?|[.,]\d+)(?:e[+-]?\d+)?|zero))(?![\w-])/i,lookbehind:!0},operator:[/<>|[<>]=?|[=+*/&]/,{pattern:/(^|[^\w-])(?:-|and|equal|greater|less|not|or|than)(?![\w-])/i,lookbehind:!0}],punctuation:/[.:,()]/}}return Rle}var kle,wOe;function y1r(){if(wOe)return kle;wOe=1,kle=t,t.displayName="coffeescript",t.aliases=["coffee"];function t(e){(function(r){var n=/#(?!\{).+/,i={pattern:/#\{[^}]+\}/,alias:"variable"};r.languages.coffeescript=r.languages.extend("javascript",{comment:n,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:i}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),r.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:n,interpolation:i}}}),r.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:r.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:i}}]}),r.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete r.languages.coffeescript["template-string"],r.languages.coffee=r.languages.coffeescript})(e)}return kle}var Ile,SOe;function b1r(){if(SOe)return Ile;SOe=1,Ile=t,t.displayName="concurnas",t.aliases=["conc"];function t(e){e.languages.concurnas={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?(?:\*\/|$)|\/\/.*)/,lookbehind:!0,greedy:!0},langext:{pattern:/\b\w+\s*\|\|[\s\S]+?\|\|/,greedy:!0,inside:{"class-name":/^\w+/,string:{pattern:/(^\s*\|\|)[\s\S]+(?=\|\|$)/,lookbehind:!0},punctuation:/\|\|/}},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/,lookbehind:!0},keyword:/\b(?:abstract|actor|also|annotation|assert|async|await|bool|boolean|break|byte|case|catch|changed|char|class|closed|constant|continue|def|default|del|double|elif|else|enum|every|extends|false|finally|float|for|from|global|gpudef|gpukernel|if|import|in|init|inject|int|lambda|local|long|loop|match|new|nodefault|null|of|onchange|open|out|override|package|parfor|parforsync|post|pre|private|protected|provide|provider|public|return|shared|short|single|size_t|sizeof|super|sync|this|throw|trait|trans|transient|true|try|typedef|unchecked|using|val|var|void|while|with)\b/,boolean:/\b(?:false|true)\b/,number:/\b0b[01][01_]*L?\b|\b0x(?:[\da-f_]*\.)?[\da-f_p+-]+\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfls]?/i,punctuation:/[{}[\];(),.:]/,operator:/<==|>==|=>|->|<-|<>|&==|&<>|\?:?|\.\?|\+\+|--|[-+*/=<>]=?|[!^~]|\b(?:and|as|band|bor|bxor|comp|is|isnot|mod|or)\b=?/,annotation:{pattern:/@(?:\w+:)?(?:\w+|\[[^\]]+\])?/,alias:"builtin"}},e.languages.insertBefore("concurnas","langext",{"regex-literal":{pattern:/\br("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:e.languages.concurnas},regex:/[\s\S]+/}},"string-literal":{pattern:/(?:\B|\bs)("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:e.languages.concurnas},string:/[\s\S]+/}}}),e.languages.conc=e.languages.concurnas}return Ile}var Ple,TOe;function x1r(){if(TOe)return Ple;TOe=1,Ple=t,t.displayName="coq",t.aliases=[];function t(e){(function(r){for(var n=/\(\*(?:[^(*]|\((?!\*)|\*(?!\))|<self>)*\*\)/.source,i=0;i<2;i++)n=n.replace(/<self>/g,function(){return n});n=n.replace(/<self>/g,"[]"),r.languages.coq={comment:RegExp(n),string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},attribute:[{pattern:RegExp(/#\[(?:[^\[\]("]|"(?:[^"]|"")*"(?!")|\((?!\*)|<comment>)*\]/.source.replace(/<comment>/g,function(){return n})),greedy:!0,alias:"attr-name",inside:{comment:RegExp(n),string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},operator:/=/,punctuation:/^#\[|\]$|[,()]/}},{pattern:/\b(?:Cumulative|Global|Local|Monomorphic|NonCumulative|Polymorphic|Private|Program)\b/,alias:"attr-name"}],keyword:/\b(?:Abort|About|Add|Admit|Admitted|All|Arguments|As|Assumptions|Axiom|Axioms|Back|BackTo|Backtrace|BinOp|BinOpSpec|BinRel|Bind|Blacklist|Canonical|Case|Cd|Check|Class|Classes|Close|CoFixpoint|CoInductive|Coercion|Coercions|Collection|Combined|Compute|Conjecture|Conjectures|Constant|Constants|Constraint|Constructors|Context|Corollary|Create|CstOp|Custom|Cut|Debug|Declare|Defined|Definition|Delimit|Dependencies|Dependent|Derive|Diffs|Drop|Elimination|End|Entry|Equality|Eval|Example|Existential|Existentials|Existing|Export|Extern|Extraction|Fact|Fail|Field|File|Firstorder|Fixpoint|Flags|Focus|From|Funclass|Function|Functional|GC|Generalizable|Goal|Grab|Grammar|Graph|Guarded|Haskell|Heap|Hide|Hint|HintDb|Hints|Hypotheses|Hypothesis|IF|Identity|Immediate|Implicit|Implicits|Import|Include|Induction|Inductive|Infix|Info|Initial|InjTyp|Inline|Inspect|Instance|Instances|Intro|Intros|Inversion|Inversion_clear|JSON|Language|Left|Lemma|Let|Lia|Libraries|Library|Load|LoadPath|Locate|Ltac|Ltac2|ML|Match|Method|Minimality|Module|Modules|Morphism|Next|NoInline|Notation|Number|OCaml|Obligation|Obligations|Opaque|Open|Optimize|Parameter|Parameters|Parametric|Path|Paths|Prenex|Preterm|Primitive|Print|Profile|Projections|Proof|Prop|PropBinOp|PropOp|PropUOp|Property|Proposition|Pwd|Qed|Quit|Rec|Record|Recursive|Redirect|Reduction|Register|Relation|Remark|Remove|Require|Reserved|Reset|Resolve|Restart|Rewrite|Right|Ring|Rings|SProp|Saturate|Save|Scheme|Scope|Scopes|Search|SearchHead|SearchPattern|SearchRewrite|Section|Separate|Set|Setoid|Show|Signatures|Solve|Solver|Sort|Sortclass|Sorted|Spec|Step|Strategies|Strategy|String|Structure|SubClass|Subgraph|SuchThat|Tactic|Term|TestCompile|Theorem|Time|Timeout|To|Transparent|Type|Typeclasses|Types|Typing|UnOp|UnOpSpec|Undelimit|Undo|Unfocus|Unfocused|Unfold|Universe|Universes|Unshelve|Variable|Variables|Variant|Verbose|View|Visibility|Zify|_|apply|as|at|by|cofix|else|end|exists|exists2|fix|for|forall|fun|if|in|let|match|measure|move|removed|return|struct|then|using|wf|where|with)\b/,number:/\b(?:0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]+)?(?:p[+-]?\d[\d_]*)?|\d[\d_]*(?:\.[\d_]+)?(?:e[+-]?\d[\d_]*)?)\b/i,punct:{pattern:/@\{|\{\||\[=|:>/,alias:"punctuation"},operator:/\/\\|\\\/|\.{2,3}|:{1,2}=|\*\*|[-=]>|<(?:->?|[+:=>]|<:)|>(?:=|->)|\|[-|]?|[-!%&*+/<=>?@^~']/,punctuation:/\.\(|`\(|@\{|`\{|\{\||\[=|:>|[:.,;(){}\[\]]/}})(e)}return Ple}var Dle,EOe;function NZ(){if(EOe)return Dle;EOe=1,Dle=t,t.displayName="ruby",t.aliases=["rb"];function t(e){(function(r){r.languages.ruby=r.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),r.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var n={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:r.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete r.languages.ruby.function;var i="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",a=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;r.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+i+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:n,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:n,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+a),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+a+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),r.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+i),greedy:!0,inside:{interpolation:n,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:n,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:n,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+i),greedy:!0,inside:{interpolation:n,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:n,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete r.languages.ruby.string,r.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),r.languages.rb=r.languages.ruby})(e)}return Dle}var Lle,AOe;function _1r(){if(AOe)return Lle;AOe=1;var t=NZ();Lle=e,e.displayName="crystal",e.aliases=[];function e(r){r.register(t),(function(n){n.languages.crystal=n.languages.extend("ruby",{keyword:[/\b(?:__DIR__|__END_LINE__|__FILE__|__LINE__|abstract|alias|annotation|as|asm|begin|break|case|class|def|do|else|elsif|end|ensure|enum|extend|for|fun|if|ifdef|include|instance_sizeof|lib|macro|module|next|of|out|pointerof|private|protected|ptr|require|rescue|return|select|self|sizeof|struct|super|then|type|typeof|undef|uninitialized|union|unless|until|when|while|with|yield)\b/,{pattern:/(\.\s*)(?:is_a|responds_to)\?/,lookbehind:!0}],number:/\b(?:0b[01_]*[01]|0o[0-7_]*[0-7]|0x[\da-fA-F_]*[\da-fA-F]|(?:\d(?:[\d_]*\d)?)(?:\.[\d_]*\d)?(?:[eE][+-]?[\d_]*\d)?)(?:_(?:[uif](?:8|16|32|64))?)?\b/,operator:[/->/,n.languages.ruby.operator],punctuation:/[(){}[\].,;\\]/}),n.languages.insertBefore("crystal","string-literal",{attribute:{pattern:/@\[.*?\]/,inside:{delimiter:{pattern:/^@\[|\]$/,alias:"punctuation"},attribute:{pattern:/^(\s*)\w+/,lookbehind:!0,alias:"class-name"},args:{pattern:/\S(?:[\s\S]*\S)?/,inside:n.languages.crystal}}},expansion:{pattern:/\{(?:\{.*?\}|%.*?%)\}/,inside:{content:{pattern:/^(\{.)[\s\S]+(?=.\}$)/,lookbehind:!0,inside:n.languages.crystal},delimiter:{pattern:/^\{[\{%]|[\}%]\}$/,alias:"operator"}}},char:{pattern:/'(?:[^\\\r\n]{1,2}|\\(?:.|u(?:[A-Fa-f0-9]{1,4}|\{[A-Fa-f0-9]{1,6}\})))'/,greedy:!0}})})(r)}return Lle}var Ole,COe;function w1r(){if(COe)return Ole;COe=1;var t=OZ();Ole=e,e.displayName="cshtml",e.aliases=["razor"];function e(r){r.register(t),(function(n){var i=/\/(?![/*])|\/\/.*[\r\n]|\/\*[^*]*(?:\*(?!\/)[^*]*)*\*\//.source,a=/@(?!")|"(?:[^\r\n\\"]|\\.)*"|@"(?:[^\\"]|""|\\[\s\S])*"(?!")/.source+"|"+/'(?:(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'|(?=[^\\](?!')))/.source;function o(ae,U){for(var ve=0;ve<U;ve++)ae=ae.replace(/<self>/g,function(){return"(?:"+ae+")"});return ae.replace(/<self>/g,"[^\\s\\S]").replace(/<str>/g,"(?:"+a+")").replace(/<comment>/g,"(?:"+i+")")}var s=o(/\((?:[^()'"@/]|<str>|<comment>|<self>)*\)/.source,2),d=o(/\[(?:[^\[\]'"@/]|<str>|<comment>|<self>)*\]/.source,2),b=o(/\{(?:[^{}'"@/]|<str>|<comment>|<self>)*\}/.source,2),L=o(/<(?:[^<>'"@/]|<str>|<comment>|<self>)*>/.source,2),B=/(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?/.source,V=/(?!\d)[^\s>\/=$<%]+/.source+B+/\s*\/?>/.source,X=/\B@?/.source+"(?:"+/<([a-zA-Z][\w:]*)/.source+B+/\s*>/.source+"(?:"+(/[^<]/.source+"|"+/<\/?(?!\1\b)/.source+V+"|"+o(/<\1/.source+B+/\s*>/.source+"(?:"+(/[^<]/.source+"|"+/<\/?(?!\1\b)/.source+V+"|<self>")+")*"+/<\/\1\s*>/.source,2))+")*"+/<\/\1\s*>/.source+"|"+/</.source+V+")";n.languages.cshtml=n.languages.extend("markup",{});var ie=n.languages.insertBefore("csharp","string",{html:{pattern:RegExp(X),greedy:!0,inside:n.languages.cshtml}},{csharp:n.languages.extend("csharp",{})}),de={pattern:/\S[\s\S]*/,alias:"language-csharp",inside:ie};n.languages.insertBefore("cshtml","prolog",{"razor-comment":{pattern:/@\*[\s\S]*?\*@/,greedy:!0,alias:"comment"},block:{pattern:RegExp(/(^|[^@])@/.source+"(?:"+[b,/(?:code|functions)\s*/.source+b,/(?:for|foreach|lock|switch|using|while)\s*/.source+s+/\s*/.source+b,/do\s*/.source+b+/\s*while\s*/.source+s+/(?:\s*;)?/.source,/try\s*/.source+b+/\s*catch\s*/.source+s+/\s*/.source+b+/\s*finally\s*/.source+b,/if\s*/.source+s+/\s*/.source+b+"(?:"+/\s*else/.source+"(?:"+/\s+if\s*/.source+s+")?"+/\s*/.source+b+")*"].join("|")+")"),lookbehind:!0,greedy:!0,inside:{keyword:/^@\w*/,csharp:de}},directive:{pattern:/^([ \t]*)@(?:addTagHelper|attribute|implements|inherits|inject|layout|model|namespace|page|preservewhitespace|removeTagHelper|section|tagHelperPrefix|using)(?=\s).*/m,lookbehind:!0,greedy:!0,inside:{keyword:/^@\w+/,csharp:de}},value:{pattern:RegExp(/(^|[^@])@/.source+/(?:await\b\s*)?/.source+"(?:"+/\w+\b/.source+"|"+s+")(?:"+/[?!]?\.\w+\b/.source+"|"+s+"|"+d+"|"+L+s+")*"),lookbehind:!0,greedy:!0,alias:"variable",inside:{keyword:/^@/,csharp:de}},"delegate-operator":{pattern:/(^|[^@])@(?=<)/,lookbehind:!0,alias:"operator"}}),n.languages.razor=n.languages.cshtml})(r)}return Ole}var Nle,MOe;function S1r(){if(MOe)return Nle;MOe=1,Nle=t,t.displayName="csp",t.aliases=[];function t(e){(function(r){function n(i){return RegExp(/([ \t])/.source+"(?:"+i+")"+/(?=[\s;]|$)/.source,"i")}r.languages.csp={directive:{pattern:/(^|[\s;])(?:base-uri|block-all-mixed-content|(?:child|connect|default|font|frame|img|manifest|media|object|prefetch|script|style|worker)-src|disown-opener|form-action|frame-(?:ancestors|options)|input-protection(?:-(?:clip|selectors))?|navigate-to|plugin-types|policy-uri|referrer|reflected-xss|report-(?:to|uri)|require-sri-for|sandbox|(?:script|style)-src-(?:attr|elem)|upgrade-insecure-requests)(?=[\s;]|$)/i,lookbehind:!0,alias:"property"},scheme:{pattern:n(/[a-z][a-z0-9.+-]*:/.source),lookbehind:!0},none:{pattern:n(/'none'/.source),lookbehind:!0,alias:"keyword"},nonce:{pattern:n(/'nonce-[-+/\w=]+'/.source),lookbehind:!0,alias:"number"},hash:{pattern:n(/'sha(?:256|384|512)-[-+/\w=]+'/.source),lookbehind:!0,alias:"number"},host:{pattern:n(/[a-z][a-z0-9.+-]*:\/\/[^\s;,']*/.source+"|"+/\*[^\s;,']*/.source+"|"+/[a-z0-9-]+(?:\.[a-z0-9-]+)+(?::[\d*]+)?(?:\/[^\s;,']*)?/.source),lookbehind:!0,alias:"url",inside:{important:/\*/}},keyword:[{pattern:n(/'unsafe-[a-z-]+'/.source),lookbehind:!0,alias:"unsafe"},{pattern:n(/'[a-z-]+'/.source),lookbehind:!0,alias:"safe"}],punctuation:/;/}})(e)}return Nle}var Fle,ROe;function T1r(){if(ROe)return Fle;ROe=1,Fle=t,t.displayName="cssExtras",t.aliases=[];function t(e){(function(r){var n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,i;r.languages.css.selector={pattern:r.languages.css.selector.pattern,lookbehind:!0,inside:i={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp(`\\[(?:[^[\\]"']|`+n.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[n,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},r.languages.css.atrule.inside["selector-function-argument"].inside=i,r.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}});var a={pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0},o={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};r.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:a,number:o,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:a,number:o})})(e)}return Fle}var zle,kOe;function E1r(){if(kOe)return zle;kOe=1,zle=t,t.displayName="csv",t.aliases=[];function t(e){e.languages.csv={value:/[^\r\n,"]+|"(?:[^"]|"")*"(?!")/,punctuation:/,/}}return zle}var Ble,IOe;function A1r(){if(IOe)return Ble;IOe=1,Ble=t,t.displayName="cypher",t.aliases=[];function t(e){e.languages.cypher={comment:/\/\/.*/,string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/,greedy:!0},"class-name":{pattern:/(:\s*)(?:\w+|`(?:[^`\\\r\n])*`)(?=\s*[{):])/,lookbehind:!0,greedy:!0},relationship:{pattern:/(-\[\s*(?:\w+\s*|`(?:[^`\\\r\n])*`\s*)?:\s*|\|\s*:\s*)(?:\w+|`(?:[^`\\\r\n])*`)/,lookbehind:!0,greedy:!0,alias:"property"},identifier:{pattern:/`(?:[^`\\\r\n])*`/,greedy:!0},variable:/\$\w+/,keyword:/\b(?:ADD|ALL|AND|AS|ASC|ASCENDING|ASSERT|BY|CALL|CASE|COMMIT|CONSTRAINT|CONTAINS|CREATE|CSV|DELETE|DESC|DESCENDING|DETACH|DISTINCT|DO|DROP|ELSE|END|ENDS|EXISTS|FOR|FOREACH|IN|INDEX|IS|JOIN|KEY|LIMIT|LOAD|MANDATORY|MATCH|MERGE|NODE|NOT|OF|ON|OPTIONAL|OR|ORDER(?=\s+BY)|PERIODIC|REMOVE|REQUIRE|RETURN|SCALAR|SCAN|SET|SKIP|START|STARTS|THEN|UNION|UNIQUE|UNWIND|USING|WHEN|WHERE|WITH|XOR|YIELD)\b/i,function:/\b\w+\b(?=\s*\()/,boolean:/\b(?:false|null|true)\b/i,number:/\b(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)\b/,operator:/:|<--?|--?>?|<>|=~?|[<>]=?|[+*/%^|]|\.\.\.?/,punctuation:/[()[\]{},;.]/}}return Ble}var Ule,POe;function C1r(){if(POe)return Ule;POe=1,Ule=t,t.displayName="d",t.aliases=[];function t(e){e.languages.d=e.languages.extend("clike",{comment:[{pattern:/^\s*#!.+/,greedy:!0},{pattern:RegExp(/(^|[^\\])/.source+"(?:"+[/\/\+(?:\/\+(?:[^+]|\+(?!\/))*\+\/|(?!\/\+)[\s\S])*?\+\//.source,/\/\/.*/.source,/\/\*[\s\S]*?\*\//.source].join("|")+")"),lookbehind:!0,greedy:!0}],string:[{pattern:RegExp([/\b[rx]"(?:\\[\s\S]|[^\\"])*"[cwd]?/.source,/\bq"(?:\[[\s\S]*?\]|\([\s\S]*?\)|<[\s\S]*?>|\{[\s\S]*?\})"/.source,/\bq"((?!\d)\w+)$[\s\S]*?^\1"/.source,/\bq"(.)[\s\S]*?\2"/.source,/(["`])(?:\\[\s\S]|(?!\3)[^\\])*\3[cwd]?/.source].join("|"),"m"),greedy:!0},{pattern:/\bq\{(?:\{[^{}]*\}|[^{}])*\}/,greedy:!0,alias:"token-string"}],keyword:/\$|\b(?:__(?:(?:DATE|EOF|FILE|FUNCTION|LINE|MODULE|PRETTY_FUNCTION|TIMESTAMP|TIME|VENDOR|VERSION)__|gshared|parameters|traits|vector)|abstract|alias|align|asm|assert|auto|body|bool|break|byte|case|cast|catch|cdouble|cent|cfloat|char|class|const|continue|creal|dchar|debug|default|delegate|delete|deprecated|do|double|dstring|else|enum|export|extern|false|final|finally|float|for|foreach|foreach_reverse|function|goto|idouble|if|ifloat|immutable|import|inout|int|interface|invariant|ireal|lazy|long|macro|mixin|module|new|nothrow|null|out|override|package|pragma|private|protected|ptrdiff_t|public|pure|real|ref|return|scope|shared|short|size_t|static|string|struct|super|switch|synchronized|template|this|throw|true|try|typedef|typeid|typeof|ubyte|ucent|uint|ulong|union|unittest|ushort|version|void|volatile|wchar|while|with|wstring)\b/,number:[/\b0x\.?[a-f\d_]+(?:(?!\.\.)\.[a-f\d_]*)?(?:p[+-]?[a-f\d_]+)?[ulfi]{0,4}/i,{pattern:/((?:\.\.)?)(?:\b0b\.?|\b|\.)\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:e[+-]?\d[\d_]*)?[ulfi]{0,4}/i,lookbehind:!0}],operator:/\|[|=]?|&[&=]?|\+[+=]?|-[-=]?|\.?\.\.|=[>=]?|!(?:i[ns]\b|<>?=?|>=?|=)?|\bi[ns]\b|(?:<[<>]?|>>?>?|\^\^|[*\/%^~])=?/}),e.languages.insertBefore("d","string",{char:/'(?:\\(?:\W|\w+)|[^\\])'/}),e.languages.insertBefore("d","keyword",{property:/\B@\w*/}),e.languages.insertBefore("d","function",{register:{pattern:/\b(?:[ABCD][LHX]|E?(?:BP|DI|SI|SP)|[BS]PL|[ECSDGF]S|CR[0234]|[DS]IL|DR[012367]|E[ABCD]X|X?MM[0-7]|R(?:1[0-5]|[89])[BWD]?|R[ABCD]X|R[BS]P|R[DS]I|TR[3-7]|XMM(?:1[0-5]|[89])|YMM(?:1[0-5]|\d))\b|\bST(?:\([0-7]\)|\b)/,alias:"variable"}})}return Ule}var Hle,DOe;function M1r(){if(DOe)return Hle;DOe=1,Hle=t,t.displayName="dart",t.aliases=[];function t(e){(function(r){var n=[/\b(?:async|sync|yield)\*/,/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/],i=/(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,a={pattern:RegExp(i+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}}}};r.languages.dart=r.languages.extend("clike",{"class-name":[a,{pattern:RegExp(i+/[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source),lookbehind:!0,inside:a.inside}],keyword:n,operator:/\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),r.languages.insertBefore("dart","string",{"string-literal":{pattern:/r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,lookbehind:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:r.languages.dart}}},string:/[\s\S]+/}},string:void 0}),r.languages.insertBefore("dart","class-name",{metadata:{pattern:/@\w+/,alias:"function"}}),r.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":a,keyword:n,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})})(e)}return Hle}var jle,LOe;function R1r(){if(LOe)return jle;LOe=1,jle=t,t.displayName="dataweave",t.aliases=[];function t(e){(function(r){r.languages.dataweave={url:/\b[A-Za-z]+:\/\/[\w/:.?=&-]+|\burn:[\w:.?=&-]+/,property:{pattern:/(?:\b\w+#)?(?:"(?:\\.|[^\\"\r\n])*"|\b\w+)(?=\s*[:@])/,greedy:!0},string:{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},"mime-type":/\b(?:application|audio|image|multipart|text|video)\/[\w+-]+/,date:{pattern:/\|[\w:+-]+\|/,greedy:!0},comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],regex:{pattern:/\/(?:[^\\\/\r\n]|\\[^\r\n])+\//,greedy:!0},keyword:/\b(?:and|as|at|case|do|else|fun|if|input|is|match|not|ns|null|or|output|type|unless|update|using|var)\b/,function:/\b[A-Z_]\w*(?=\s*\()/i,number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\];(),.:@]/,operator:/<<|>>|->|[<>~=]=?|!=|--?-?|\+\+?|!|\?/,boolean:/\b(?:false|true)\b/}})(e)}return jle}var Vle,OOe;function k1r(){if(OOe)return Vle;OOe=1,Vle=t,t.displayName="dax",t.aliases=[];function t(e){e.languages.dax={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/).*)/,lookbehind:!0},"data-field":{pattern:/'(?:[^']|'')*'(?!')(?:\[[ \w\xA0-\uFFFF]+\])?|\w+\[[ \w\xA0-\uFFFF]+\]/,alias:"symbol"},measure:{pattern:/\[[ \w\xA0-\uFFFF]+\]/,alias:"constant"},string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},function:/\b(?:ABS|ACOS|ACOSH|ACOT|ACOTH|ADDCOLUMNS|ADDMISSINGITEMS|ALL|ALLCROSSFILTERED|ALLEXCEPT|ALLNOBLANKROW|ALLSELECTED|AND|APPROXIMATEDISTINCTCOUNT|ASIN|ASINH|ATAN|ATANH|AVERAGE|AVERAGEA|AVERAGEX|BETA\.DIST|BETA\.INV|BLANK|CALCULATE|CALCULATETABLE|CALENDAR|CALENDARAUTO|CEILING|CHISQ\.DIST|CHISQ\.DIST\.RT|CHISQ\.INV|CHISQ\.INV\.RT|CLOSINGBALANCEMONTH|CLOSINGBALANCEQUARTER|CLOSINGBALANCEYEAR|COALESCE|COMBIN|COMBINA|COMBINEVALUES|CONCATENATE|CONCATENATEX|CONFIDENCE\.NORM|CONFIDENCE\.T|CONTAINS|CONTAINSROW|CONTAINSSTRING|CONTAINSSTRINGEXACT|CONVERT|COS|COSH|COT|COTH|COUNT|COUNTA|COUNTAX|COUNTBLANK|COUNTROWS|COUNTX|CROSSFILTER|CROSSJOIN|CURRENCY|CURRENTGROUP|CUSTOMDATA|DATATABLE|DATE|DATEADD|DATEDIFF|DATESBETWEEN|DATESINPERIOD|DATESMTD|DATESQTD|DATESYTD|DATEVALUE|DAY|DEGREES|DETAILROWS|DISTINCT|DISTINCTCOUNT|DISTINCTCOUNTNOBLANK|DIVIDE|EARLIER|EARLIEST|EDATE|ENDOFMONTH|ENDOFQUARTER|ENDOFYEAR|EOMONTH|ERROR|EVEN|EXACT|EXCEPT|EXP|EXPON\.DIST|FACT|FALSE|FILTER|FILTERS|FIND|FIRSTDATE|FIRSTNONBLANK|FIRSTNONBLANKVALUE|FIXED|FLOOR|FORMAT|GCD|GENERATE|GENERATEALL|GENERATESERIES|GEOMEAN|GEOMEANX|GROUPBY|HASONEFILTER|HASONEVALUE|HOUR|IF|IF\.EAGER|IFERROR|IGNORE|INT|INTERSECT|ISBLANK|ISCROSSFILTERED|ISEMPTY|ISERROR|ISEVEN|ISFILTERED|ISINSCOPE|ISLOGICAL|ISNONTEXT|ISNUMBER|ISO\.CEILING|ISODD|ISONORAFTER|ISSELECTEDMEASURE|ISSUBTOTAL|ISTEXT|KEEPFILTERS|KEYWORDMATCH|LASTDATE|LASTNONBLANK|LASTNONBLANKVALUE|LCM|LEFT|LEN|LN|LOG|LOG10|LOOKUPVALUE|LOWER|MAX|MAXA|MAXX|MEDIAN|MEDIANX|MID|MIN|MINA|MINUTE|MINX|MOD|MONTH|MROUND|NATURALINNERJOIN|NATURALLEFTOUTERJOIN|NEXTDAY|NEXTMONTH|NEXTQUARTER|NEXTYEAR|NONVISUAL|NORM\.DIST|NORM\.INV|NORM\.S\.DIST|NORM\.S\.INV|NOT|NOW|ODD|OPENINGBALANCEMONTH|OPENINGBALANCEQUARTER|OPENINGBALANCEYEAR|OR|PARALLELPERIOD|PATH|PATHCONTAINS|PATHITEM|PATHITEMREVERSE|PATHLENGTH|PERCENTILE\.EXC|PERCENTILE\.INC|PERCENTILEX\.EXC|PERCENTILEX\.INC|PERMUT|PI|POISSON\.DIST|POWER|PREVIOUSDAY|PREVIOUSMONTH|PREVIOUSQUARTER|PREVIOUSYEAR|PRODUCT|PRODUCTX|QUARTER|QUOTIENT|RADIANS|RAND|RANDBETWEEN|RANK\.EQ|RANKX|RELATED|RELATEDTABLE|REMOVEFILTERS|REPLACE|REPT|RIGHT|ROLLUP|ROLLUPADDISSUBTOTAL|ROLLUPGROUP|ROLLUPISSUBTOTAL|ROUND|ROUNDDOWN|ROUNDUP|ROW|SAMEPERIODLASTYEAR|SAMPLE|SEARCH|SECOND|SELECTCOLUMNS|SELECTEDMEASURE|SELECTEDMEASUREFORMATSTRING|SELECTEDMEASURENAME|SELECTEDVALUE|SIGN|SIN|SINH|SQRT|SQRTPI|STARTOFMONTH|STARTOFQUARTER|STARTOFYEAR|STDEV\.P|STDEV\.S|STDEVX\.P|STDEVX\.S|SUBSTITUTE|SUBSTITUTEWITHINDEX|SUM|SUMMARIZE|SUMMARIZECOLUMNS|SUMX|SWITCH|T\.DIST|T\.DIST\.2T|T\.DIST\.RT|T\.INV|T\.INV\.2T|TAN|TANH|TIME|TIMEVALUE|TODAY|TOPN|TOPNPERLEVEL|TOPNSKIP|TOTALMTD|TOTALQTD|TOTALYTD|TREATAS|TRIM|TRUE|TRUNC|UNICHAR|UNICODE|UNION|UPPER|USERELATIONSHIP|USERNAME|USEROBJECTID|USERPRINCIPALNAME|UTCNOW|UTCTODAY|VALUE|VALUES|VAR\.P|VAR\.S|VARX\.P|VARX\.S|WEEKDAY|WEEKNUM|XIRR|XNPV|YEAR|YEARFRAC)(?=\s*\()/i,keyword:/\b(?:DEFINE|EVALUATE|MEASURE|ORDER\s+BY|RETURN|VAR|START\s+AT|ASC|DESC)\b/i,boolean:{pattern:/\b(?:FALSE|NULL|TRUE)\b/i,alias:"constant"},number:/\b\d+(?:\.\d*)?|\B\.\d+\b/,operator:/:=|[-+*\/=^]|&&?|\|\||<(?:=>?|<|>)?|>[>=]?|\b(?:IN|NOT)\b/i,punctuation:/[;\[\](){}`,.]/}}return Vle}var qle,NOe;function I1r(){if(NOe)return qle;NOe=1,qle=t,t.displayName="dhall",t.aliases=[];function t(e){e.languages.dhall={comment:/--.*|\{-(?:[^-{]|-(?!\})|\{(?!-)|\{-(?:[^-{]|-(?!\})|\{(?!-))*-\})*-\}/,string:{pattern:/"(?:[^"\\]|\\.)*"|''(?:[^']|'(?!')|'''|''\$\{)*''(?!'|\$)/,greedy:!0,inside:{interpolation:{pattern:/\$\{[^{}]*\}/,inside:{expression:{pattern:/(^\$\{)[\s\S]+(?=\}$)/,lookbehind:!0,alias:"language-dhall",inside:null},punctuation:/\$\{|\}/}}}},label:{pattern:/`[^`]*`/,greedy:!0},url:{pattern:/\bhttps?:\/\/[\w.:%!$&'*+;=@~-]+(?:\/[\w.:%!$&'*+;=@~-]*)*(?:\?[/?\w.:%!$&'*+;=@~-]*)?/,greedy:!0},env:{pattern:/\benv:(?:(?!\d)\w+|"(?:[^"\\=]|\\.)*")/,greedy:!0,inside:{function:/^env/,operator:/^:/,variable:/[\s\S]+/}},hash:{pattern:/\bsha256:[\da-fA-F]{64}\b/,inside:{function:/sha256/,operator:/:/,number:/[\da-fA-F]{64}/}},keyword:/\b(?:as|assert|else|forall|if|in|let|merge|missing|then|toMap|using|with)\b|\u2200/,builtin:/\b(?:None|Some)\b/,boolean:/\b(?:False|True)\b/,number:/\bNaN\b|-?\bInfinity\b|[+-]?\b(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/,operator:/\/\\|\/\/\\\\|&&|\|\||===|[!=]=|\/\/|->|\+\+|::|[+*#@=:?<>|\\\u2227\u2a53\u2261\u2afd\u03bb\u2192]/,punctuation:/\.\.|[{}\[\](),./]/,"class-name":/\b[A-Z]\w*\b/},e.languages.dhall.string.inside.interpolation.inside.expression.inside=e.languages.dhall}return qle}var Gle,FOe;function P1r(){if(FOe)return Gle;FOe=1,Gle=t,t.displayName="diff",t.aliases=[];function t(e){(function(r){r.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var n={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(n).forEach(function(i){var a=n[i],o=[];/^\w+$/.test(i)||o.push(/\w+/.exec(i)[0]),i==="diff"&&o.push("bold"),r.languages.diff[i]={pattern:RegExp("^(?:["+a+`].*(?:\r
?|
|(?![\\s\\S])))+`,"m"),alias:o,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(i)[0]}}}}),Object.defineProperty(r.languages.diff,"PREFIXES",{value:n})})(e)}return Gle}var $le,zOe;function iT(){if(zOe)return $le;zOe=1,$le=t,t.displayName="markupTemplating",t.aliases=[];function t(e){(function(r){function n(i,a){return"___"+i.toUpperCase()+a+"___"}Object.defineProperties(r.languages["markup-templating"]={},{buildPlaceholders:{value:function(i,a,o,s){if(i.language===a){var d=i.tokenStack=[];i.code=i.code.replace(o,function(b){if(typeof s=="function"&&!s(b))return b;for(var L=d.length,B;i.code.indexOf(B=n(a,L))!==-1;)++L;return d[L]=b,B}),i.grammar=r.languages.markup}}},tokenizePlaceholders:{value:function(i,a){if(i.language!==a||!i.tokenStack)return;i.grammar=r.languages[a];var o=0,s=Object.keys(i.tokenStack);function d(b){for(var L=0;L<b.length&&!(o>=s.length);L++){var B=b[L];if(typeof B=="string"||B.content&&typeof B.content=="string"){var V=s[o],X=i.tokenStack[V],ie=typeof B=="string"?B:B.content,de=n(a,V),ae=ie.indexOf(de);if(ae>-1){++o;var U=ie.substring(0,ae),ve=new r.Token(a,r.tokenize(X,i.grammar),"language-"+a,X),Se=ie.substring(ae+de.length),Pe=[];U&&Pe.push.apply(Pe,d([U])),Pe.push(ve),Se&&Pe.push.apply(Pe,d([Se])),typeof B=="string"?b.splice.apply(b,[L,1].concat(Pe)):B.content=Pe}}else B.content&&d(B.content)}return b}d(i.tokens)}}})})(e)}return $le}var Wle,BOe;function D1r(){if(BOe)return Wle;BOe=1;var t=iT();Wle=e,e.displayName="django",e.aliases=["jinja2"];function e(r){r.register(t),(function(n){n.languages.django={comment:/^\{#[\s\S]*?#\}$/,tag:{pattern:/(^\{%[+-]?\s*)\w+/,lookbehind:!0,alias:"keyword"},delimiter:{pattern:/^\{[{%][+-]?|[+-]?[}%]\}$/,alias:"punctuation"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},filter:{pattern:/(\|)\w+/,lookbehind:!0,alias:"function"},test:{pattern:/(\bis\s+(?:not\s+)?)(?!not\b)\w+/,lookbehind:!0,alias:"function"},function:/\b[a-z_]\w+(?=\s*\()/i,keyword:/\b(?:and|as|by|else|for|if|import|in|is|loop|not|or|recursive|with|without)\b/,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,number:/\b\d+(?:\.\d+)?\b/,boolean:/[Ff]alse|[Nn]one|[Tt]rue/,variable:/\b\w+\b/,punctuation:/[{}[\](),.:;]/};var i=/\{\{[\s\S]*?\}\}|\{%[\s\S]*?%\}|\{#[\s\S]*?#\}/g,a=n.languages["markup-templating"];n.hooks.add("before-tokenize",function(o){a.buildPlaceholders(o,"django",i)}),n.hooks.add("after-tokenize",function(o){a.tokenizePlaceholders(o,"django")}),n.languages.jinja2=n.languages.django,n.hooks.add("before-tokenize",function(o){a.buildPlaceholders(o,"jinja2",i)}),n.hooks.add("after-tokenize",function(o){a.tokenizePlaceholders(o,"jinja2")})})(r)}return Wle}var Yle,UOe;function L1r(){if(UOe)return Yle;UOe=1,Yle=t,t.displayName="dnsZoneFile",t.aliases=[];function t(e){e.languages["dns-zone-file"]={comment:/;.*/,string:{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0},variable:[{pattern:/(^\$ORIGIN[ \t]+)\S+/m,lookbehind:!0},{pattern:/(^|\s)@(?=\s|$)/,lookbehind:!0}],keyword:/^\$(?:INCLUDE|ORIGIN|TTL)(?=\s|$)/m,class:{pattern:/(^|\s)(?:CH|CS|HS|IN)(?=\s|$)/,lookbehind:!0,alias:"keyword"},type:{pattern:/(^|\s)(?:A|A6|AAAA|AFSDB|APL|ATMA|CAA|CDNSKEY|CDS|CERT|CNAME|DHCID|DLV|DNAME|DNSKEY|DS|EID|GID|GPOS|HINFO|HIP|IPSECKEY|ISDN|KEY|KX|LOC|MAILA|MAILB|MB|MD|MF|MG|MINFO|MR|MX|NAPTR|NB|NBSTAT|NIMLOC|NINFO|NS|NSAP|NSAP-PTR|NSEC|NSEC3|NSEC3PARAM|NULL|NXT|OPENPGPKEY|PTR|PX|RKEY|RP|RRSIG|RT|SIG|SINK|SMIMEA|SOA|SPF|SRV|SSHFP|TA|TKEY|TLSA|TSIG|TXT|UID|UINFO|UNSPEC|URI|WKS|X25)(?=\s|$)/,lookbehind:!0,alias:"keyword"},punctuation:/[()]/},e.languages["dns-zone"]=e.languages["dns-zone-file"]}return Yle}var Xle,HOe;function O1r(){if(HOe)return Xle;HOe=1,Xle=t,t.displayName="docker",t.aliases=["dockerfile"];function t(e){(function(r){var n=/\\[\r\n](?:\s|\\[\r\n]|#.*(?!.))*(?![\s#]|\\[\r\n])/.source,i=/(?:[ \t]+(?![ \t])(?:<SP_BS>)?|<SP_BS>)/.source.replace(/<SP_BS>/g,function(){return n}),a=/"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"|'(?:[^'\\\r\n]|\\(?:\r\n|[\s\S]))*'/.source,o=/--[\w-]+=(?:<STR>|(?!["'])(?:[^\s\\]|\\.)+)/.source.replace(/<STR>/g,function(){return a}),s={pattern:RegExp(a),greedy:!0},d={pattern:/(^[ \t]*)#.*/m,lookbehind:!0,greedy:!0};function b(L,B){return L=L.replace(/<OPT>/g,function(){return o}).replace(/<SP>/g,function(){return i}),RegExp(L,B)}r.languages.docker={instruction:{pattern:/(^[ \t]*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\s)(?:\\.|[^\r\n\\])*(?:\\$(?:\s|#.*$)*(?![\s#])(?:\\.|[^\r\n\\])*)*/im,lookbehind:!0,greedy:!0,inside:{options:{pattern:b(/(^(?:ONBUILD<SP>)?\w+<SP>)<OPT>(?:<SP><OPT>)*/.source,"i"),lookbehind:!0,greedy:!0,inside:{property:{pattern:/(^|\s)--[\w-]+/,lookbehind:!0},string:[s,{pattern:/(=)(?!["'])(?:[^\s\\]|\\.)+/,lookbehind:!0}],operator:/\\$/m,punctuation:/=/}},keyword:[{pattern:b(/(^(?:ONBUILD<SP>)?HEALTHCHECK<SP>(?:<OPT><SP>)*)(?:CMD|NONE)\b/.source,"i"),lookbehind:!0,greedy:!0},{pattern:b(/(^(?:ONBUILD<SP>)?FROM<SP>(?:<OPT><SP>)*(?!--)[^ \t\\]+<SP>)AS/.source,"i"),lookbehind:!0,greedy:!0},{pattern:b(/(^ONBUILD<SP>)\w+/.source,"i"),lookbehind:!0,greedy:!0},{pattern:/^\w+/,greedy:!0}],comment:d,string:s,variable:/\$(?:\w+|\{[^{}"'\\]*\})/,operator:/\\$/m}},comment:d},r.languages.dockerfile=r.languages.docker})(e)}return Xle}var Zle,jOe;function N1r(){if(jOe)return Zle;jOe=1,Zle=t,t.displayName="dot",t.aliases=["gv"];function t(e){(function(r){var n="(?:"+[/[a-zA-Z_\x80-\uFFFF][\w\x80-\uFFFF]*/.source,/-?(?:\.\d+|\d+(?:\.\d*)?)/.source,/"[^"\\]*(?:\\[\s\S][^"\\]*)*"/.source,/<(?:[^<>]|(?!<!--)<(?:[^<>"']|"[^"]*"|'[^']*')+>|<!--(?:[^-]|-(?!->))*-->)*>/.source].join("|")+")",i={markup:{pattern:/(^<)[\s\S]+(?=>$)/,lookbehind:!0,alias:["language-markup","language-html","language-xml"],inside:r.languages.markup}};function a(o,s){return RegExp(o.replace(/<ID>/g,function(){return n}),s)}r.languages.dot={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\/|^#.*/m,greedy:!0},"graph-name":{pattern:a(/(\b(?:digraph|graph|subgraph)[ \t\r\n]+)<ID>/.source,"i"),lookbehind:!0,greedy:!0,alias:"class-name",inside:i},"attr-value":{pattern:a(/(=[ \t\r\n]*)<ID>/.source),lookbehind:!0,greedy:!0,inside:i},"attr-name":{pattern:a(/([\[;, \t\r\n])<ID>(?=[ \t\r\n]*=)/.source),lookbehind:!0,greedy:!0,inside:i},keyword:/\b(?:digraph|edge|graph|node|strict|subgraph)\b/i,"compass-point":{pattern:/(:[ \t\r\n]*)(?:[ewc_]|[ns][ew]?)(?![\w\x80-\uFFFF])/,lookbehind:!0,alias:"builtin"},node:{pattern:a(/(^|[^-.\w\x80-\uFFFF\\])<ID>/.source),lookbehind:!0,greedy:!0,inside:i},operator:/[=:]|-[->]/,punctuation:/[\[\]{};,]/},r.languages.gv=r.languages.dot})(e)}return Zle}var Kle,VOe;function F1r(){if(VOe)return Kle;VOe=1,Kle=t,t.displayName="ebnf",t.aliases=[];function t(e){e.languages.ebnf={comment:/\(\*[\s\S]*?\*\)/,string:{pattern:/"[^"\r\n]*"|'[^'\r\n]*'/,greedy:!0},special:{pattern:/\?[^?\r\n]*\?/,greedy:!0,alias:"class-name"},definition:{pattern:/^([\t ]*)[a-z]\w*(?:[ \t]+[a-z]\w*)*(?=\s*=)/im,lookbehind:!0,alias:["rule","keyword"]},rule:/\b[a-z]\w*(?:[ \t]+[a-z]\w*)*\b/i,punctuation:/\([:/]|[:/]\)|[.,;()[\]{}]/,operator:/[-=|*/!]/}}return Kle}var Jle,qOe;function z1r(){if(qOe)return Jle;qOe=1,Jle=t,t.displayName="editorconfig",t.aliases=[];function t(e){e.languages.editorconfig={comment:/[;#].*/,section:{pattern:/(^[ \t]*)\[.+\]/m,lookbehind:!0,alias:"selector",inside:{regex:/\\\\[\[\]{},!?.*]/,operator:/[!?]|\.\.|\*{1,2}/,punctuation:/[\[\]{},]/}},key:{pattern:/(^[ \t]*)[^\s=]+(?=[ \t]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/=.*/,alias:"attr-value",inside:{punctuation:/^=/}}}}return Jle}var Qle,GOe;function B1r(){if(GOe)return Qle;GOe=1,Qle=t,t.displayName="eiffel",t.aliases=[];function t(e){e.languages.eiffel={comment:/--.*/,string:[{pattern:/"([^[]*)\[[\s\S]*?\]\1"/,greedy:!0},{pattern:/"([^{]*)\{[\s\S]*?\}\1"/,greedy:!0},{pattern:/"(?:%(?:(?!\n)\s)*\n\s*%|%\S|[^%"\r\n])*"/,greedy:!0}],char:/'(?:%.|[^%'\r\n])+'/,keyword:/\b(?:across|agent|alias|all|and|as|assign|attached|attribute|check|class|convert|create|Current|debug|deferred|detachable|do|else|elseif|end|ensure|expanded|export|external|feature|from|frozen|if|implies|inherit|inspect|invariant|like|local|loop|not|note|obsolete|old|once|or|Precursor|redefine|rename|require|rescue|Result|retry|select|separate|some|then|undefine|until|variant|Void|when|xor)\b/i,boolean:/\b(?:False|True)\b/i,"class-name":/\b[A-Z][\dA-Z_]*\b/,number:[/\b0[xcb][\da-f](?:_*[\da-f])*\b/i,/(?:\b\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?e[+-]?)?\d(?:_*\d)*\b|\b\d(?:_*\d)*\b\.?/i],punctuation:/:=|<<|>>|\(\||\|\)|->|\.(?=\w)|[{}[\];(),:?]/,operator:/\\\\|\|\.\.\||\.\.|\/[~\/=]?|[><]=?|[-+*^=~]/}}return Qle}var eue,$Oe;function U1r(){if($Oe)return eue;$Oe=1;var t=iT();eue=e,e.displayName="ejs",e.aliases=["eta"];function e(r){r.register(t),(function(n){n.languages.ejs={delimiter:{pattern:/^<%[-_=]?|[-_]?%>$/,alias:"punctuation"},comment:/^#[\s\S]*/,"language-javascript":{pattern:/[\s\S]+/,inside:n.languages.javascript}},n.hooks.add("before-tokenize",function(i){var a=/<%(?!%)[\s\S]+?%>/g;n.languages["markup-templating"].buildPlaceholders(i,"ejs",a)}),n.hooks.add("after-tokenize",function(i){n.languages["markup-templating"].tokenizePlaceholders(i,"ejs")}),n.languages.eta=n.languages.ejs})(r)}return eue}var tue,WOe;function H1r(){if(WOe)return tue;WOe=1,tue=t,t.displayName="elixir",t.aliases=[];function t(e){e.languages.elixir={doc:{pattern:/@(?:doc|moduledoc)\s+(?:("""|''')[\s\S]*?\1|("|')(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2)/,inside:{attribute:/^@\w+/,string:/['"][\s\S]+/}},comment:{pattern:/#.*/,greedy:!0},regex:{pattern:/~[rR](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[uismxfr]*/,greedy:!0},string:[{pattern:/~[cCsSwW](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|#\{[^}]+\}|#(?!\{)|[^#\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[csa]?/,greedy:!0,inside:{}},{pattern:/("""|''')[\s\S]*?\1/,greedy:!0,inside:{}},{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{}}],atom:{pattern:/(^|[^:]):\w+/,lookbehind:!0,alias:"symbol"},module:{pattern:/\b[A-Z]\w*\b/,alias:"class-name"},"attr-name":/\b\w+\??:(?!:)/,argument:{pattern:/(^|[^&])&\d+/,lookbehind:!0,alias:"variable"},attribute:{pattern:/@\w+/,alias:"variable"},function:/\b[_a-zA-Z]\w*[?!]?(?:(?=\s*(?:\.\s*)?\()|(?=\/\d))/,number:/\b(?:0[box][a-f\d_]+|\d[\d_]*)(?:\.[\d_]+)?(?:e[+-]?[\d_]+)?\b/i,keyword:/\b(?:after|alias|and|case|catch|cond|def(?:callback|delegate|exception|impl|macro|module|n|np|p|protocol|struct)?|do|else|end|fn|for|if|import|not|or|quote|raise|require|rescue|try|unless|unquote|use|when)\b/,boolean:/\b(?:false|nil|true)\b/,operator:[/\bin\b|&&?|\|[|>]?|\\\\|::|\.\.\.?|\+\+?|-[->]?|<[-=>]|>=|!==?|\B!|=(?:==?|[>~])?|[*\/^]/,{pattern:/([^<])<(?!<)/,lookbehind:!0},{pattern:/([^>])>(?!>)/,lookbehind:!0}],punctuation:/<<|>>|[.,%\[\]{}()]/},e.languages.elixir.string.forEach(function(r){r.inside={interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},rest:e.languages.elixir}}}})}return tue}var rue,YOe;function j1r(){if(YOe)return rue;YOe=1,rue=t,t.displayName="elm",t.aliases=[];function t(e){e.languages.elm={comment:/--.*|\{-[\s\S]*?-\}/,char:{pattern:/'(?:[^\\'\r\n]|\\(?:[abfnrtv\\']|\d+|x[0-9a-fA-F]+|u\{[0-9a-fA-F]+\}))'/,greedy:!0},string:[{pattern:/"""[\s\S]*?"""/,greedy:!0},{pattern:/"(?:[^\\"\r\n]|\\.)*"/,greedy:!0}],"import-statement":{pattern:/(^[\t ]*)import\s+[A-Z]\w*(?:\.[A-Z]\w*)*(?:\s+as\s+(?:[A-Z]\w*)(?:\.[A-Z]\w*)*)?(?:\s+exposing\s+)?/m,lookbehind:!0,inside:{keyword:/\b(?:as|exposing|import)\b/}},keyword:/\b(?:alias|as|case|else|exposing|if|in|infixl|infixr|let|module|of|then|type)\b/,builtin:/\b(?:abs|acos|always|asin|atan|atan2|ceiling|clamp|compare|cos|curry|degrees|e|flip|floor|fromPolar|identity|isInfinite|isNaN|logBase|max|min|negate|never|not|pi|radians|rem|round|sin|sqrt|tan|toFloat|toPolar|toString|truncate|turns|uncurry|xor)\b/,number:/\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0x[0-9a-f]+)\b/i,operator:/\s\.\s|[+\-/*=.$<>:&|^?%#@~!]{2,}|[+\-/*=$<>:&|^?%#@~!]/,hvariable:/\b(?:[A-Z]\w*\.)*[a-z]\w*\b/,constant:/\b(?:[A-Z]\w*\.)*[A-Z]\w*\b/,punctuation:/[{}[\]|(),.:]/}}return rue}var nue,XOe;function V1r(){if(XOe)return nue;XOe=1;var t=NZ(),e=iT();nue=r,r.displayName="erb",r.aliases=[];function r(n){n.register(t),n.register(e),(function(i){i.languages.erb={delimiter:{pattern:/^(\s*)<%=?|%>(?=\s*$)/,lookbehind:!0,alias:"punctuation"},ruby:{pattern:/\s*\S[\s\S]*/,alias:"language-ruby",inside:i.languages.ruby}},i.hooks.add("before-tokenize",function(a){var o=/<%=?(?:[^\r\n]|[\r\n](?!=begin)|[\r\n]=begin\s(?:[^\r\n]|[\r\n](?!=end))*[\r\n]=end)+?%>/g;i.languages["markup-templating"].buildPlaceholders(a,"erb",o)}),i.hooks.add("after-tokenize",function(a){i.languages["markup-templating"].tokenizePlaceholders(a,"erb")})})(n)}return nue}var iue,ZOe;function q1r(){if(ZOe)return iue;ZOe=1,iue=t,t.displayName="erlang",t.aliases=[];function t(e){e.languages.erlang={comment:/%.+/,string:{pattern:/"(?:\\.|[^\\"\r\n])*"/,greedy:!0},"quoted-function":{pattern:/'(?:\\.|[^\\'\r\n])+'(?=\()/,alias:"function"},"quoted-atom":{pattern:/'(?:\\.|[^\\'\r\n])+'/,alias:"atom"},boolean:/\b(?:false|true)\b/,keyword:/\b(?:after|case|catch|end|fun|if|of|receive|try|when)\b/,number:[/\$\\?./,/\b\d+#[a-z0-9]+/i,/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i],function:/\b[a-z][\w@]*(?=\()/,variable:{pattern:/(^|[^@])(?:\b|\?)[A-Z_][\w@]*/,lookbehind:!0},operator:[/[=\/<>:]=|=[:\/]=|\+\+?|--?|[=*\/!]|\b(?:and|andalso|band|bnot|bor|bsl|bsr|bxor|div|not|or|orelse|rem|xor)\b/,{pattern:/(^|[^<])<(?!<)/,lookbehind:!0},{pattern:/(^|[^>])>(?!>)/,lookbehind:!0}],atom:/\b[a-z][\w@]*/,punctuation:/[()[\]{}:;,.#|]|<<|>>/}}return iue}var aue,KOe;function sKe(){if(KOe)return aue;KOe=1,aue=t,t.displayName="lua",t.aliases=[];function t(e){e.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/}}return aue}var oue,JOe;function G1r(){if(JOe)return oue;JOe=1;var t=sKe(),e=iT();oue=r,r.displayName="etlua",r.aliases=[];function r(n){n.register(t),n.register(e),(function(i){i.languages.etlua={delimiter:{pattern:/^<%[-=]?|-?%>$/,alias:"punctuation"},"language-lua":{pattern:/[\s\S]+/,inside:i.languages.lua}},i.hooks.add("before-tokenize",function(a){var o=/<%[\s\S]+?%>/g;i.languages["markup-templating"].buildPlaceholders(a,"etlua",o)}),i.hooks.add("after-tokenize",function(a){i.languages["markup-templating"].tokenizePlaceholders(a,"etlua")})})(n)}return oue}var sue,QOe;function $1r(){if(QOe)return sue;QOe=1,sue=t,t.displayName="excelFormula",t.aliases=[];function t(e){e.languages["excel-formula"]={comment:{pattern:/(\bN\(\s*)"(?:[^"]|"")*"(?=\s*\))/i,lookbehind:!0,greedy:!0},string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},reference:{pattern:/(?:'[^']*'|(?:[^\s()[\]{}<>*?"';,$&]*\[[^^\s()[\]{}<>*?"']+\])?\w+)!/,greedy:!0,alias:"string",inside:{operator:/!$/,punctuation:/'/,sheet:{pattern:/[^[\]]+$/,alias:"function"},file:{pattern:/\[[^[\]]+\]$/,inside:{punctuation:/[[\]]/}},path:/[\s\S]+/}},"function-name":{pattern:/\b[A-Z]\w*(?=\()/i,alias:"keyword"},range:{pattern:/\$?\b(?:[A-Z]+\$?\d+:\$?[A-Z]+\$?\d+|[A-Z]+:\$?[A-Z]+|\d+:\$?\d+)\b/i,alias:"property",inside:{operator:/:/,cell:/\$?[A-Z]+\$?\d+/i,column:/\$?[A-Z]+/i,row:/\$?\d+/}},cell:{pattern:/\b[A-Z]+\d+\b|\$[A-Za-z]+\$?\d+\b|\b[A-Za-z]+\$\d+\b/,alias:"property"},number:/(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e[+-]?\d+)?\b/i,boolean:/\b(?:FALSE|TRUE)\b/i,operator:/[-+*/^%=&,]|<[=>]?|>=?/,punctuation:/[[\]();{}|]/},e.languages.xlsx=e.languages.xls=e.languages["excel-formula"]}return sue}var lue,eNe;function W1r(){if(eNe)return lue;eNe=1,lue=t,t.displayName="factor",t.aliases=[];function t(e){(function(r){var n={function:/\b(?:BUGS?|FIX(?:MES?)?|NOTES?|TODOS?|XX+|HACKS?|WARN(?:ING)?|\?{2,}|!{2,})\b/},i={number:/\\[^\s']|%\w/},a={comment:[{pattern:/(^|\s)(?:! .*|!$)/,lookbehind:!0,inside:n},{pattern:/(^|\s)\/\*\s[\s\S]*?\*\/(?=\s|$)/,lookbehind:!0,greedy:!0,inside:n},{pattern:/(^|\s)!\[(={0,6})\[\s[\s\S]*?\]\2\](?=\s|$)/,lookbehind:!0,greedy:!0,inside:n}],number:[{pattern:/(^|\s)[+-]?\d+(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)[+-]?0(?:b[01]+|o[0-7]+|d\d+|x[\dA-F]+)(?=\s|$)/i,lookbehind:!0},{pattern:/(^|\s)[+-]?\d+\/\d+\.?(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)\+?\d+\+\d+\/\d+(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)-\d+-\d+\/\d+(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)[+-]?(?:\d*\.\d+|\d+\.\d*|\d+)(?:e[+-]?\d+)?(?=\s|$)/i,lookbehind:!0},{pattern:/(^|\s)NAN:\s+[\da-fA-F]+(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)[+-]?0(?:b1\.[01]*|o1\.[0-7]*|d1\.\d*|x1\.[\dA-F]*)p\d+(?=\s|$)/i,lookbehind:!0}],regexp:{pattern:/(^|\s)R\/\s(?:\\\S|[^\\/])*\/(?:[idmsr]*|[idmsr]+-[idmsr]+)(?=\s|$)/,lookbehind:!0,alias:"number",inside:{variable:/\\\S/,keyword:/[+?*\[\]^$(){}.|]/,operator:{pattern:/(\/)[idmsr]+(?:-[idmsr]+)?/,lookbehind:!0}}},boolean:{pattern:/(^|\s)[tf](?=\s|$)/,lookbehind:!0},"custom-string":{pattern:/(^|\s)[A-Z0-9\-]+"\s(?:\\\S|[^"\\])*"/,lookbehind:!0,greedy:!0,alias:"string",inside:{number:/\\\S|%\w|\//}},"multiline-string":[{pattern:/(^|\s)STRING:\s+\S+(?:\n|\r\n).*(?:\n|\r\n)\s*;(?=\s|$)/,lookbehind:!0,greedy:!0,alias:"string",inside:{number:i.number,"semicolon-or-setlocal":{pattern:/([\r\n][ \t]*);(?=\s|$)/,lookbehind:!0,alias:"function"}}},{pattern:/(^|\s)HEREDOC:\s+\S+(?:\n|\r\n).*(?:\n|\r\n)\s*\S+(?=\s|$)/,lookbehind:!0,greedy:!0,alias:"string",inside:i},{pattern:/(^|\s)\[(={0,6})\[\s[\s\S]*?\]\2\](?=\s|$)/,lookbehind:!0,greedy:!0,alias:"string",inside:i}],"special-using":{pattern:/(^|\s)USING:(?:\s\S+)*(?=\s+;(?:\s|$))/,lookbehind:!0,alias:"function",inside:{string:{pattern:/(\s)[^:\s]+/,lookbehind:!0}}},"stack-effect-delimiter":[{pattern:/(^|\s)(?:call|eval|execute)?\((?=\s)/,lookbehind:!0,alias:"operator"},{pattern:/(\s)--(?=\s)/,lookbehind:!0,alias:"operator"},{pattern:/(\s)\)(?=\s|$)/,lookbehind:!0,alias:"operator"}],combinators:{pattern:null,lookbehind:!0,alias:"keyword"},"kernel-builtin":{pattern:null,lookbehind:!0,alias:"variable"},"sequences-builtin":{pattern:null,lookbehind:!0,alias:"variable"},"math-builtin":{pattern:null,lookbehind:!0,alias:"variable"},"constructor-word":{pattern:/(^|\s)<(?!=+>|-+>)\S+>(?=\s|$)/,lookbehind:!0,alias:"keyword"},"other-builtin-syntax":{pattern:null,lookbehind:!0,alias:"operator"},"conventionally-named-word":{pattern:/(^|\s)(?!")(?:(?:change|new|set|with)-\S+|\$\S+|>[^>\s]+|[^:>\s]+>|[^>\s]+>[^>\s]+|\+[^+\s]+\+|[^?\s]+\?|\?[^?\s]+|[^>\s]+>>|>>[^>\s]+|[^<\s]+<<|\([^()\s]+\)|[^!\s]+!|[^*\s]\S*\*|[^.\s]\S*\.)(?=\s|$)/,lookbehind:!0,alias:"keyword"},"colon-syntax":{pattern:/(^|\s)(?:[A-Z0-9\-]+#?)?:{1,2}\s+(?:;\S+|(?!;)\S+)(?=\s|$)/,lookbehind:!0,greedy:!0,alias:"function"},"semicolon-or-setlocal":{pattern:/(\s)(?:;|:>)(?=\s|$)/,lookbehind:!0,alias:"function"},"curly-brace-literal-delimiter":[{pattern:/(^|\s)[a-z]*\{(?=\s)/i,lookbehind:!0,alias:"operator"},{pattern:/(\s)\}(?=\s|$)/,lookbehind:!0,alias:"operator"}],"quotation-delimiter":[{pattern:/(^|\s)\[(?=\s)/,lookbehind:!0,alias:"operator"},{pattern:/(\s)\](?=\s|$)/,lookbehind:!0,alias:"operator"}],"normal-word":{pattern:/(^|\s)[^"\s]\S*(?=\s|$)/,lookbehind:!0},string:{pattern:/"(?:\\\S|[^"\\])*"/,greedy:!0,inside:i}},o=function(L){return(L+"").replace(/([.?*+\^$\[\]\\(){}|\-])/g,"\\$1")},s=function(L){return new RegExp("(^|\\s)(?:"+L.map(o).join("|")+")(?=\\s|$)")},d={"kernel-builtin":["or","2nipd","4drop","tuck","wrapper","nip","wrapper?","callstack>array","die","dupd","callstack","callstack?","3dup","hashcode","pick","4nip","build",">boolean","nipd","clone","5nip","eq?","?","=","swapd","2over","clear","2dup","get-retainstack","not","tuple?","dup","3nipd","call","-rotd","object","drop","assert=","assert?","-rot","execute","boa","get-callstack","curried?","3drop","pickd","overd","over","roll","3nip","swap","and","2nip","rotd","throw","(clone)","hashcode*","spin","reach","4dup","equal?","get-datastack","assert","2drop","<wrapper>","boolean?","identity-hashcode","identity-tuple?","null","composed?","new","5drop","rot","-roll","xor","identity-tuple","boolean"],"other-builtin-syntax":["=======","recursive","flushable",">>","<<<<<<","M\\","B","PRIVATE>","\\","======","final","inline","delimiter","deprecated","<PRIVATE",">>>>>>","<<<<<<<","parse-complex","malformed-complex","read-only",">>>>>>>","call-next-method","<<","foldable","$","$[","${"],"sequences-builtin":["member-eq?","mismatch","append","assert-sequence=","longer","repetition","clone-like","3sequence","assert-sequence?","last-index-from","reversed","index-from","cut*","pad-tail","join-as","remove-eq!","concat-as","but-last","snip","nths","nth","sequence","longest","slice?","<slice>","remove-nth","tail-slice","empty?","tail*","member?","virtual-sequence?","set-length","drop-prefix","iota","unclip","bounds-error?","unclip-last-slice","non-negative-integer-expected","non-negative-integer-expected?","midpoint@","longer?","?set-nth","?first","rest-slice","prepend-as","prepend","fourth","sift","subseq-start","new-sequence","?last","like","first4","1sequence","reverse","slice","virtual@","repetition?","set-last","index","4sequence","max-length","set-second","immutable-sequence","first2","first3","supremum","unclip-slice","suffix!","insert-nth","tail","3append","short","suffix","concat","flip","immutable?","reverse!","2sequence","sum","delete-all","indices","snip-slice","<iota>","check-slice","sequence?","head","append-as","halves","sequence=","collapse-slice","?second","slice-error?","product","bounds-check?","bounds-check","immutable","virtual-exemplar","harvest","remove","pad-head","last","set-fourth","cartesian-product","remove-eq","shorten","shorter","reversed?","shorter?","shortest","head-slice","pop*","tail-slice*","but-last-slice","iota?","append!","cut-slice","new-resizable","head-slice*","sequence-hashcode","pop","set-nth","?nth","second","join","immutable-sequence?","<reversed>","3append-as","virtual-sequence","subseq?","remove-nth!","length","last-index","lengthen","assert-sequence","copy","move","third","first","tail?","set-first","prefix","bounds-error","<repetition>","exchange","surround","cut","min-length","set-third","push-all","head?","subseq-start-from","delete-slice","rest","sum-lengths","head*","infimum","remove!","glue","slice-error","subseq","push","replace-slice","subseq-as","unclip-last"],"math-builtin":["number=","next-power-of-2","?1+","fp-special?","imaginary-part","float>bits","number?","fp-infinity?","bignum?","fp-snan?","denominator","gcd","*","+","fp-bitwise=","-","u>=","/",">=","bitand","power-of-2?","log2-expects-positive","neg?","<","log2",">","integer?","number","bits>double","2/","zero?","bits>float","float?","shift","ratio?","rect>","even?","ratio","fp-sign","bitnot",">fixnum","complex?","/i","integer>fixnum","/f","sgn",">bignum","next-float","u<","u>","mod","recip","rational",">float","2^","integer","fixnum?","neg","fixnum","sq","bignum",">rect","bit?","fp-qnan?","simple-gcd","complex","<fp-nan>","real",">fraction","double>bits","bitor","rem","fp-nan-payload","real-part","log2-expects-positive?","prev-float","align","unordered?","float","fp-nan?","abs","bitxor","integer>fixnum-strict","u<=","odd?","<=","/mod",">integer","real?","rational?","numerator"]};Object.keys(d).forEach(function(L){a[L].pattern=s(d[L])});var b=["2bi","while","2tri","bi*","4dip","both?","same?","tri@","curry","prepose","3bi","?if","tri*","2keep","3keep","curried","2keepd","when","2bi*","2tri*","4keep","bi@","keepdd","do","unless*","tri-curry","if*","loop","bi-curry*","when*","2bi@","2tri@","with","2with","either?","bi","until","3dip","3curry","tri-curry*","tri-curry@","bi-curry","keepd","compose","2dip","if","3tri","unless","tuple","keep","2curry","tri","most","while*","dip","composed","bi-curry@","find-last-from","trim-head-slice","map-as","each-from","none?","trim-tail","partition","if-empty","accumulate*","reject!","find-from","accumulate-as","collector-for-as","reject","map","map-sum","accumulate!","2each-from","follow","supremum-by","map!","unless-empty","collector","padding","reduce-index","replicate-as","infimum-by","trim-tail-slice","count","find-index","filter","accumulate*!","reject-as","map-integers","map-find","reduce","selector","interleave","2map","filter-as","binary-reduce","map-index-as","find","produce","filter!","replicate","cartesian-map","cartesian-each","find-index-from","map-find-last","3map-as","3map","find-last","selector-as","2map-as","2map-reduce","accumulate","each","each-index","accumulate*-as","when-empty","all?","collector-as","push-either","new-like","collector-for","2selector","push-if","2all?","map-reduce","3each","any?","trim-slice","2reduce","change-nth","produce-as","2each","trim","trim-head","cartesian-find","map-index","if-zero","each-integer","unless-zero","(find-integer)","when-zero","find-last-integer","(all-integers?)","times","(each-integer)","find-integer","all-integers?","unless-negative","if-positive","when-positive","when-negative","unless-positive","if-negative","case","2cleave","cond>quot","case>quot","3cleave","wrong-values","to-fixed-point","alist>quot","cond","cleave","call-effect","recursive-hashcode","spread","deep-spread>quot","2||","0||","n||","0&&","2&&","3||","1||","1&&","n&&","3&&","smart-unless*","keep-inputs","reduce-outputs","smart-when*","cleave>array","smart-with","smart-apply","smart-if","inputs/outputs","output>sequence-n","map-outputs","map-reduce-outputs","dropping","output>array","smart-map-reduce","smart-2map-reduce","output>array-n","nullary","input<sequence","append-outputs","drop-inputs","inputs","smart-2reduce","drop-outputs","smart-reduce","preserving","smart-when","outputs","append-outputs-as","smart-unless","smart-if*","sum-outputs","input<sequence-unsafe","output>sequence"];a.combinators.pattern=s(b),r.languages.factor=a})(e)}return lue}var uue,tNe;function Y1r(){if(tNe)return uue;tNe=1,uue=t,t.displayName="$false",t.aliases=[];function t(e){(function(r){r.languages.false={comment:{pattern:/\{[^}]*\}/},string:{pattern:/"[^"]*"/,greedy:!0},"character-code":{pattern:/'(?:[^\r]|\r\n?)/,alias:"number"},"assembler-code":{pattern:/\d+`/,alias:"important"},number:/\d+/,operator:/[-!#$%&'*+,./:;=>?@\\^_`|~ßø]/,punctuation:/\[|\]/,variable:/[a-z]/,"non-standard":{pattern:/[()<BDO®]/,alias:"bold"}}})(e)}return uue}var cue,rNe;function X1r(){if(rNe)return cue;rNe=1,cue=t,t.displayName="firestoreSecurityRules",t.aliases=[];function t(e){e.languages["firestore-security-rules"]=e.languages.extend("clike",{comment:/\/\/.*/,keyword:/\b(?:allow|function|if|match|null|return|rules_version|service)\b/,operator:/&&|\|\||[<>!=]=?|[-+*/%]|\b(?:in|is)\b/}),delete e.languages["firestore-security-rules"]["class-name"],e.languages.insertBefore("firestore-security-rules","keyword",{path:{pattern:/(^|[\s(),])(?:\/(?:[\w\xA0-\uFFFF]+|\{[\w\xA0-\uFFFF]+(?:=\*\*)?\}|\$\([\w\xA0-\uFFFF.]+\)))+/,lookbehind:!0,greedy:!0,inside:{variable:{pattern:/\{[\w\xA0-\uFFFF]+(?:=\*\*)?\}|\$\([\w\xA0-\uFFFF.]+\)/,inside:{operator:/=/,keyword:/\*\*/,punctuation:/[.$(){}]/}},punctuation:/\//}},method:{pattern:/(\ballow\s+)[a-z]+(?:\s*,\s*[a-z]+)*(?=\s*[:;])/,lookbehind:!0,alias:"builtin",inside:{punctuation:/,/}}})}return cue}var fue,nNe;function Z1r(){if(nNe)return fue;nNe=1,fue=t,t.displayName="flow",t.aliases=[];function t(e){(function(r){r.languages.flow=r.languages.extend("javascript",{}),r.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|any|mixed|null|void)\b/,alias:"tag"}]}),r.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete r.languages.flow.parameter,r.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(r.languages.flow.keyword)||(r.languages.flow.keyword=[r.languages.flow.keyword]),r.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})})(e)}return fue}var due,iNe;function K1r(){if(iNe)return due;iNe=1,due=t,t.displayName="fortran",t.aliases=[];function t(e){e.languages.fortran={"quoted-number":{pattern:/[BOZ](['"])[A-F0-9]+\1/i,alias:"number"},string:{pattern:/(?:\b\w+_)?(['"])(?:\1\1|&(?:\r\n?|\n)(?:[ \t]*!.*(?:\r\n?|\n)|(?![ \t]*!))|(?!\1).)*(?:\1|&)/,inside:{comment:{pattern:/(&(?:\r\n?|\n)\s*)!.*/,lookbehind:!0}}},comment:{pattern:/!.*/,greedy:!0},boolean:/\.(?:FALSE|TRUE)\.(?:_\w+)?/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[ED][+-]?\d+)?(?:_\w+)?/i,keyword:[/\b(?:CHARACTER|COMPLEX|DOUBLE ?PRECISION|INTEGER|LOGICAL|REAL)\b/i,/\b(?:END ?)?(?:BLOCK ?DATA|DO|FILE|FORALL|FUNCTION|IF|INTERFACE|MODULE(?! PROCEDURE)|PROGRAM|SELECT|SUBROUTINE|TYPE|WHERE)\b/i,/\b(?:ALLOCATABLE|ALLOCATE|BACKSPACE|CALL|CASE|CLOSE|COMMON|CONTAINS|CONTINUE|CYCLE|DATA|DEALLOCATE|DIMENSION|DO|END|EQUIVALENCE|EXIT|EXTERNAL|FORMAT|GO ?TO|IMPLICIT(?: NONE)?|INQUIRE|INTENT|INTRINSIC|MODULE PROCEDURE|NAMELIST|NULLIFY|OPEN|OPTIONAL|PARAMETER|POINTER|PRINT|PRIVATE|PUBLIC|READ|RETURN|REWIND|SAVE|SELECT|STOP|TARGET|WHILE|WRITE)\b/i,/\b(?:ASSIGNMENT|DEFAULT|ELEMENTAL|ELSE|ELSEIF|ELSEWHERE|ENTRY|IN|INCLUDE|INOUT|KIND|NULL|ONLY|OPERATOR|OUT|PURE|RECURSIVE|RESULT|SEQUENCE|STAT|THEN|USE)\b/i],operator:[/\*\*|\/\/|=>|[=\/]=|[<>]=?|::|[+\-*=%]|\.[A-Z]+\./i,{pattern:/(^|(?!\().)\/(?!\))/,lookbehind:!0}],punctuation:/\(\/|\/\)|[(),;:&]/}}return due}var hue,aNe;function J1r(){if(aNe)return hue;aNe=1,hue=t,t.displayName="fsharp",t.aliases=[];function t(e){e.languages.fsharp=e.languages.extend("clike",{comment:[{pattern:/(^|[^\\])\(\*(?!\))[\s\S]*?\*\)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|"(?:\\[\s\S]|[^\\"])*")B?/,greedy:!0},"class-name":{pattern:/(\b(?:exception|inherit|interface|new|of|type)\s+|\w\s*:\s*|\s:\??>\s*)[.\w]+\b(?:\s*(?:->|\*)\s*[.\w]+\b)*(?!\s*[:.])/,lookbehind:!0,inside:{operator:/->|\*/,punctuation:/\./}},keyword:/\b(?:let|return|use|yield)(?:!\B|\b)|\b(?:abstract|and|as|asr|assert|atomic|base|begin|break|checked|class|component|const|constraint|constructor|continue|default|delegate|do|done|downcast|downto|eager|elif|else|end|event|exception|extern|external|false|finally|fixed|for|fun|function|functor|global|if|in|include|inherit|inline|interface|internal|land|lazy|lor|lsl|lsr|lxor|match|member|method|mixin|mod|module|mutable|namespace|new|not|null|object|of|open|or|override|parallel|private|process|protected|public|pure|rec|sealed|select|sig|static|struct|tailcall|then|to|trait|true|try|type|upcast|val|virtual|void|volatile|when|while|with)\b/,number:[/\b0x[\da-fA-F]+(?:LF|lf|un)?\b/,/\b0b[01]+(?:uy|y)?\b/,/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[fm]|e[+-]?\d+)?\b/i,/\b\d+(?:[IlLsy]|UL|u[lsy]?)?\b/],operator:/([<>~&^])\1\1|([*.:<>&])\2|<-|->|[!=:]=|<?\|{1,3}>?|\??(?:<=|>=|<>|[-+*/%=<>])\??|[!?^&]|~[+~-]|:>|:\?>?/}),e.languages.insertBefore("fsharp","keyword",{preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(^#)\b(?:else|endif|if|light|line|nowarn)\b/,lookbehind:!0,alias:"keyword"}}}}),e.languages.insertBefore("fsharp","punctuation",{"computation-expression":{pattern:/\b[_a-z]\w*(?=\s*\{)/i,alias:"keyword"}}),e.languages.insertBefore("fsharp","string",{annotation:{pattern:/\[<.+?>\]/,greedy:!0,inside:{punctuation:/^\[<|>\]$/,"class-name":{pattern:/^\w+$|(^|;\s*)[A-Z]\w*(?=\()/,lookbehind:!0},"annotation-content":{pattern:/[\s\S]+/,inside:e.languages.fsharp}}},char:{pattern:/'(?:[^\\']|\\(?:.|\d{3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}|U[a-fA-F\d]{8}))'B?/,greedy:!0}})}return hue}var pue,oNe;function Q1r(){if(oNe)return pue;oNe=1;var t=iT();pue=e,e.displayName="ftl",e.aliases=[];function e(r){r.register(t),(function(n){for(var i=/[^<()"']|\((?:<expr>)*\)|<(?!#--)|<#--(?:[^-]|-(?!->))*-->|"(?:[^\\"]|\\.)*"|'(?:[^\\']|\\.)*'/.source,a=0;a<2;a++)i=i.replace(/<expr>/g,function(){return i});i=i.replace(/<expr>/g,/[^\s\S]/.source);var o={comment:/<#--[\s\S]*?-->/,string:[{pattern:/\br("|')(?:(?!\1)[^\\]|\\.)*\1/,greedy:!0},{pattern:RegExp(/("|')(?:(?!\1|\$\{)[^\\]|\\.|\$\{(?:(?!\})(?:<expr>))*\})*\1/.source.replace(/<expr>/g,function(){return i})),greedy:!0,inside:{interpolation:{pattern:RegExp(/((?:^|[^\\])(?:\\\\)*)\$\{(?:(?!\})(?:<expr>))*\}/.source.replace(/<expr>/g,function(){return i})),lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:null}}}}],keyword:/\b(?:as)\b/,boolean:/\b(?:false|true)\b/,"builtin-function":{pattern:/((?:^|[^?])\?\s*)\w+/,lookbehind:!0,alias:"function"},function:/\b\w+(?=\s*\()/,number:/\b\d+(?:\.\d+)?\b/,operator:/\.\.[<*!]?|->|--|\+\+|&&|\|\||\?{1,2}|[-+*/%!=<>]=?|\b(?:gt|gte|lt|lte)\b/,punctuation:/[,;.:()[\]{}]/};o.string[1].inside.interpolation.inside.rest=o,n.languages.ftl={"ftl-comment":{pattern:/^<#--[\s\S]*/,alias:"comment"},"ftl-directive":{pattern:/^<[\s\S]+>$/,inside:{directive:{pattern:/(^<\/?)[#@][a-z]\w*/i,lookbehind:!0,alias:"keyword"},punctuation:/^<\/?|\/?>$/,content:{pattern:/\s*\S[\s\S]*/,alias:"ftl",inside:o}}},"ftl-interpolation":{pattern:/^\$\{[\s\S]*\}$/,inside:{punctuation:/^\$\{|\}$/,content:{pattern:/\s*\S[\s\S]*/,alias:"ftl",inside:o}}}},n.hooks.add("before-tokenize",function(s){var d=RegExp(/<#--[\s\S]*?-->|<\/?[#@][a-zA-Z](?:<expr>)*?>|\$\{(?:<expr>)*?\}/.source.replace(/<expr>/g,function(){return i}),"gi");n.languages["markup-templating"].buildPlaceholders(s,"ftl",d)}),n.hooks.add("after-tokenize",function(s){n.languages["markup-templating"].tokenizePlaceholders(s,"ftl")})})(r)}return pue}var vue,sNe;function ebr(){if(sNe)return vue;sNe=1,vue=t,t.displayName="gap",t.aliases=[];function t(e){e.languages.gap={shell:{pattern:/^gap>[\s\S]*?(?=^gap>|$(?![\s\S]))/m,greedy:!0,inside:{gap:{pattern:/^(gap>).+(?:(?:\r(?:\n|(?!\n))|\n)>.*)*/,lookbehind:!0,inside:null},punctuation:/^gap>/}},comment:{pattern:/#.*/,greedy:!0},string:{pattern:/(^|[^\\'"])(?:'(?:[^\r\n\\']|\\.){1,10}'|"(?:[^\r\n\\"]|\\.)*"(?!")|"""[\s\S]*?""")/,lookbehind:!0,greedy:!0,inside:{continuation:{pattern:/([\r\n])>/,lookbehind:!0,alias:"punctuation"}}},keyword:/\b(?:Assert|Info|IsBound|QUIT|TryNextMethod|Unbind|and|atomic|break|continue|do|elif|else|end|fi|for|function|if|in|local|mod|not|od|or|quit|readonly|readwrite|rec|repeat|return|then|until|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:{pattern:/(^|[^\w.]|\.\.)(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?:_[a-z]?)?(?=$|[^\w.]|\.\.)/,lookbehind:!0},continuation:{pattern:/([\r\n])>/,lookbehind:!0,alias:"punctuation"},operator:/->|[-+*/^~=!]|<>|[<>]=?|:=|\.\./,punctuation:/[()[\]{},;.:]/},e.languages.gap.shell.inside.gap.inside=e.languages.gap}return vue}var mue,lNe;function tbr(){if(lNe)return mue;lNe=1,mue=t,t.displayName="gcode",t.aliases=[];function t(e){e.languages.gcode={comment:/;.*|\B\(.*?\)\B/,string:{pattern:/"(?:""|[^"])*"/,greedy:!0},keyword:/\b[GM]\d+(?:\.\d+)?\b/,property:/\b[A-Z]/,checksum:{pattern:/(\*)\d+/,lookbehind:!0,alias:"number"},punctuation:/[:*]/}}return mue}var gue,uNe;function rbr(){if(uNe)return gue;uNe=1,gue=t,t.displayName="gdscript",t.aliases=[];function t(e){e.languages.gdscript={comment:/#.*/,string:{pattern:/@?(?:("|')(?:(?!\1)[^\n\\]|\\[\s\S])*\1(?!"|')|"""(?:[^\\]|\\[\s\S])*?""")/,greedy:!0},"class-name":{pattern:/(^(?:class|class_name|extends)[ \t]+|^export\([ \t]*|\bas[ \t]+|(?:\b(?:const|var)[ \t]|[,(])[ \t]*\w+[ \t]*:[ \t]*|->[ \t]*)[a-zA-Z_]\w*/m,lookbehind:!0},keyword:/\b(?:and|as|assert|break|breakpoint|class|class_name|const|continue|elif|else|enum|export|extends|for|func|if|in|is|master|mastersync|match|not|null|onready|or|pass|preload|puppet|puppetsync|remote|remotesync|return|self|setget|signal|static|tool|var|while|yield)\b/,function:/\b[a-z_]\w*(?=[ \t]*\()/i,variable:/\$\w+/,number:[/\b0b[01_]+\b|\b0x[\da-fA-F_]+\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.[\d_]+)(?:e[+-]?[\d_]+)?\b/,/\b(?:INF|NAN|PI|TAU)\b/],constant:/\b[A-Z][A-Z_\d]*\b/,boolean:/\b(?:false|true)\b/,operator:/->|:=|&&|\|\||<<|>>|[-+*/%&|!<>=]=?|[~^]/,punctuation:/[.:,;()[\]{}]/}}return gue}var yue,cNe;function nbr(){if(cNe)return yue;cNe=1,yue=t,t.displayName="gedcom",t.aliases=[];function t(e){e.languages.gedcom={"line-value":{pattern:/(^[\t ]*\d+ +(?:@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@ +)?\w+ ).+/m,lookbehind:!0,inside:{pointer:{pattern:/^@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@$/,alias:"variable"}}},tag:{pattern:/(^[\t ]*\d+ +(?:@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@ +)?)\w+/m,lookbehind:!0,alias:"string"},level:{pattern:/(^[\t ]*)\d+/m,lookbehind:!0,alias:"number"},pointer:{pattern:/@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@/,alias:"variable"}}}return yue}var bue,fNe;function ibr(){if(fNe)return bue;fNe=1,bue=t,t.displayName="gherkin",t.aliases=[];function t(e){(function(r){var n=/(?:\r?\n|\r)[ \t]*\|.+\|(?:(?!\|).)*/.source;r.languages.gherkin={pystring:{pattern:/("""|''')[\s\S]+?\1/,alias:"string"},comment:{pattern:/(^[ \t]*)#.*/m,lookbehind:!0},tag:{pattern:/(^[ \t]*)@\S*/m,lookbehind:!0},feature:{pattern:/((?:^|\r?\n|\r)[ \t]*)(?:Ability|Ahoy matey!|Arwedd|Aspekt|Besigheid Behoefte|Business Need|Caracteristica|Característica|Egenskab|Egenskap|Eiginleiki|Feature|Fīča|Fitur|Fonctionnalité|Fonksyonalite|Funcionalidade|Funcionalitat|Functionalitate|Funcţionalitate|Funcționalitate|Functionaliteit|Fungsi|Funkcia|Funkcija|Funkcionalitāte|Funkcionalnost|Funkcja|Funksie|Funktionalität|Funktionalitéit|Funzionalità|Hwaet|Hwæt|Jellemző|Karakteristik|Lastnost|Mak|Mogucnost|laH|Mogućnost|Moznosti|Možnosti|OH HAI|Omadus|Ominaisuus|Osobina|Özellik|Potrzeba biznesowa|perbogh|poQbogh malja'|Požadavek|Požiadavka|Pretty much|Qap|Qu'meH 'ut|Savybė|Tính năng|Trajto|Vermoë|Vlastnosť|Właściwość|Značilnost|Δυνατότητα|Λειτουργία|Могућност|Мөмкинлек|Особина|Свойство|Үзенчәлеклелек|Функционал|Функционалност|Функция|Функціонал|תכונה|خاصية|خصوصیت|صلاحیت|کاروبار کی ضرورت|وِیژگی|रूप लेख|ਖਾਸੀਅਤ|ਨਕਸ਼ ਨੁਹਾਰ|ਮੁਹਾਂਦਰਾ|గుణము|ಹೆಚ್ಚಳ|ความต้องการทางธุรกิจ|ความสามารถ|โครงหลัก|기능|フィーチャ|功能|機能):(?:[^:\r\n]+(?:\r?\n|\r|$))*/,lookbehind:!0,inside:{important:{pattern:/(:)[^\r\n]+/,lookbehind:!0},keyword:/[^:\r\n]+:/}},scenario:{pattern:/(^[ \t]*)(?:Abstract Scenario|Abstrakt Scenario|Achtergrond|Aer|Ær|Agtergrond|All y'all|Antecedentes|Antecedents|Atburðarás|Atburðarásir|Awww, look mate|B4|Background|Baggrund|Bakgrund|Bakgrunn|Bakgrunnur|Beispiele|Beispiller|Bối cảnh|Cefndir|Cenario|Cenário|Cenario de Fundo|Cenário de Fundo|Cenarios|Cenários|Contesto|Context|Contexte|Contexto|Conto|Contoh|Contone|Dæmi|Dasar|Dead men tell no tales|Delineacao do Cenario|Delineação do Cenário|Dis is what went down|Dữ liệu|Dyagram Senaryo|Dyagram senaryo|Egzanp|Ejemplos|Eksempler|Ekzemploj|Enghreifftiau|Esbozo do escenario|Escenari|Escenario|Esempi|Esquema de l'escenari|Esquema del escenario|Esquema do Cenario|Esquema do Cenário|EXAMPLZ|Examples|Exempel|Exemple|Exemples|Exemplos|First off|Fono|Forgatókönyv|Forgatókönyv vázlat|Fundo|Geçmiş|Grundlage|Hannergrond|ghantoH|Háttér|Heave to|Istorik|Juhtumid|Keadaan|Khung kịch bản|Khung tình huống|Kịch bản|Koncept|Konsep skenario|Kontèks|Kontekst|Kontekstas|Konteksts|Kontext|Konturo de la scenaro|Latar Belakang|lut chovnatlh|lut|lutmey|Lýsing Atburðarásar|Lýsing Dæma|MISHUN SRSLY|MISHUN|Menggariskan Senario|mo'|Náčrt Scenára|Náčrt Scénáře|Náčrt Scenáru|Oris scenarija|Örnekler|Osnova|Osnova Scenára|Osnova scénáře|Osnutek|Ozadje|Paraugs|Pavyzdžiai|Példák|Piemēri|Plan du scénario|Plan du Scénario|Plan Senaryo|Plan senaryo|Plang vum Szenario|Pozadí|Pozadie|Pozadina|Príklady|Příklady|Primer|Primeri|Primjeri|Przykłady|Raamstsenaarium|Reckon it's like|Rerefons|Scenár|Scénář|Scenarie|Scenarij|Scenarijai|Scenarijaus šablonas|Scenariji|Scenārijs|Scenārijs pēc parauga|Scenarijus|Scenario|Scénario|Scenario Amlinellol|Scenario Outline|Scenario Template|Scenariomal|Scenariomall|Scenarios|Scenariu|Scenariusz|Scenaro|Schema dello scenario|Se ðe|Se the|Se þe|Senario|Senaryo Deskripsyon|Senaryo deskripsyon|Senaryo|Senaryo taslağı|Shiver me timbers|Situācija|Situai|Situasie Uiteensetting|Situasie|Skenario konsep|Skenario|Skica|Structura scenariu|Structură scenariu|Struktura scenarija|Stsenaarium|Swa hwaer swa|Swa|Swa hwær swa|Szablon scenariusza|Szenario|Szenariogrundriss|Tapaukset|Tapaus|Tapausaihio|Taust|Tausta|Template Keadaan|Template Senario|Template Situai|The thing of it is|Tình huống|Variantai|Voorbeelde|Voorbeelden|Wharrimean is|Yo-ho-ho|You'll wanna|Założenia|Παραδείγματα|Περιγραφή Σεναρίου|Σενάρια|Σενάριο|Υπόβαθρο|Кереш|Контекст|Концепт|Мисаллар|Мисоллар|Основа|Передумова|Позадина|Предистория|Предыстория|Приклади|Пример|Примери|Примеры|Рамка на сценарий|Скица|Структура сценарија|Структура сценария|Структура сценарію|Сценарий|Сценарий структураси|Сценарийның төзелеше|Сценарији|Сценарио|Сценарій|Тарих|Үрнәкләр|דוגמאות|רקע|תבנית תרחיש|תרחיש|الخلفية|الگوی سناریو|امثلة|پس منظر|زمینه|سناریو|سيناريو|سيناريو مخطط|مثالیں|منظر نامے کا خاکہ|منظرنامہ|نمونه ها|उदाहरण|परिदृश्य|परिदृश्य रूपरेखा|पृष्ठभूमि|ਉਦਾਹਰਨਾਂ|ਪਟਕਥਾ|ਪਟਕਥਾ ਢਾਂਚਾ|ਪਟਕਥਾ ਰੂਪ ਰੇਖਾ|ਪਿਛੋਕੜ|ఉదాహరణలు|కథనం|నేపథ్యం|సన్నివేశం|ಉದಾಹರಣೆಗಳು|ಕಥಾಸಾರಾಂಶ|ವಿವರಣೆ|ಹಿನ್ನೆಲೆ|โครงสร้างของเหตุการณ์|ชุดของตัวอย่าง|ชุดของเหตุการณ์|แนวคิด|สรุปเหตุการณ์|เหตุการณ์|배경|시나리오|시나리오 개요|예|サンプル|シナリオ|シナリオアウトライン|シナリオテンプレ|シナリオテンプレート|テンプレ|例|例子|剧本|剧本大纲|劇本|劇本大綱|场景|场景大纲|場景|場景大綱|背景):[^:\r\n]*/m,lookbehind:!0,inside:{important:{pattern:/(:)[^\r\n]*/,lookbehind:!0},keyword:/[^:\r\n]+:/}},"table-body":{pattern:RegExp("("+n+")(?:"+n+")+"),lookbehind:!0,inside:{outline:{pattern:/<[^>]+>/,alias:"variable"},td:{pattern:/\s*[^\s|][^|]*/,alias:"string"},punctuation:/\|/}},"table-head":{pattern:RegExp(n),inside:{th:{pattern:/\s*[^\s|][^|]*/,alias:"variable"},punctuation:/\|/}},atrule:{pattern:/(^[ \t]+)(?:'a|'ach|'ej|7|a|A také|A taktiež|A tiež|A zároveň|Aber|Ac|Adott|Akkor|Ak|Aleshores|Ale|Ali|Allora|Alors|Als|Ama|Amennyiben|Amikor|Ampak|an|AN|Ananging|And y'all|And|Angenommen|Anrhegedig a|An|Apabila|Atès|Atesa|Atunci|Avast!|Aye|A|awer|Bagi|Banjur|Bet|Biết|Blimey!|Buh|But at the end of the day I reckon|But y'all|But|BUT|Cal|Când|Cand|Cando|Ce|Cuando|Če|Ða ðe|Ða|Dadas|Dada|Dados|Dado|DaH ghu' bejlu'|dann|Dann|Dano|Dan|Dar|Dat fiind|Data|Date fiind|Date|Dati fiind|Dati|Daţi fiind|Dați fiind|DEN|Dato|De|Den youse gotta|Dengan|Diberi|Diyelim ki|Donada|Donat|Donitaĵo|Do|Dun|Duota|Ðurh|Eeldades|Ef|Eğer ki|Entao|Então|Entón|E|En|Entonces|Epi|És|Etant donnée|Etant donné|Et|Étant données|Étant donnée|Étant donné|Etant données|Etant donnés|Étant donnés|Fakat|Gangway!|Gdy|Gegeben seien|Gegeben sei|Gegeven|Gegewe|ghu' noblu'|Gitt|Given y'all|Given|Givet|Givun|Ha|Cho|I CAN HAZ|In|Ir|It's just unbelievable|I|Ja|Jeśli|Jeżeli|Kad|Kada|Kadar|Kai|Kaj|Když|Keď|Kemudian|Ketika|Khi|Kiedy|Ko|Kuid|Kui|Kun|Lan|latlh|Le sa a|Let go and haul|Le|Lè sa a|Lè|Logo|Lorsqu'<|Lorsque|mä|Maar|Mais|Mając|Ma|Majd|Maka|Manawa|Mas|Men|Menawa|Mutta|Nalika|Nalikaning|Nanging|Når|När|Nato|Nhưng|Niin|Njuk|O zaman|Och|Og|Oletetaan|Ond|Onda|Oraz|Pak|Pero|Però|Podano|Pokiaľ|Pokud|Potem|Potom|Privzeto|Pryd|Quan|Quand|Quando|qaSDI'|Så|Sed|Se|Siis|Sipoze ke|Sipoze Ke|Sipoze|Si|Şi|Și|Soit|Stel|Tada|Tad|Takrat|Tak|Tapi|Ter|Tetapi|Tha the|Tha|Then y'all|Then|Thì|Thurh|Toda|Too right|Un|Und|ugeholl|Và|vaj|Vendar|Ve|wann|Wanneer|WEN|Wenn|When y'all|When|Wtedy|Wun|Y'know|Yeah nah|Yna|Youse know like when|Youse know when youse got|Y|Za predpokladu|Za předpokladu|Zadan|Zadani|Zadano|Zadate|Zadato|Zakładając|Zaradi|Zatati|Þa þe|Þa|Þá|Þegar|Þurh|Αλλά|Δεδομένου|Και|Όταν|Τότε|А також|Агар|Але|Али|Аммо|А|Әгәр|Әйтик|Әмма|Бирок|Ва|Вә|Дадено|Дано|Допустим|Если|Задате|Задати|Задато|И|І|К тому же|Када|Кад|Когато|Когда|Коли|Ләкин|Лекин|Нәтиҗәдә|Нехай|Но|Онда|Припустимо, що|Припустимо|Пусть|Также|Та|Тогда|Тоді|То|Унда|Һәм|Якщо|אבל|אזי|אז|בהינתן|וגם|כאשר|آنگاه|اذاً|اگر|اما|اور|با فرض|بالفرض|بفرض|پھر|تب|ثم|جب|عندما|فرض کیا|لكن|لیکن|متى|هنگامی|و|अगर|और|कदा|किन्तु|चूंकि|जब|तथा|तदा|तब|परन्तु|पर|यदि|ਅਤੇ|ਜਦੋਂ|ਜਿਵੇਂ ਕਿ|ਜੇਕਰ|ਤਦ|ਪਰ|అప్పుడు|ఈ పరిస్థితిలో|కాని|చెప్పబడినది|మరియు|ಆದರೆ|ನಂತರ|ನೀಡಿದ|ಮತ್ತು|ಸ್ಥಿತಿಯನ್ನು|กำหนดให้|ดังนั้น|แต่|เมื่อ|และ|그러면<|그리고<|단<|만약<|만일<|먼저<|조건<|하지만<|かつ<|しかし<|ただし<|ならば<|もし<|並且<|但し<|但是<|假如<|假定<|假設<|假设<|前提<|同时<|同時<|并且<|当<|當<|而且<|那么<|那麼<)(?=[ \t])/m,lookbehind:!0},string:{pattern:/"(?:\\.|[^"\\\r\n])*"|'(?:\\.|[^'\\\r\n])*'/,inside:{outline:{pattern:/<[^>]+>/,alias:"variable"}}},outline:{pattern:/<[^>]+>/,alias:"variable"}}})(e)}return bue}var xue,dNe;function abr(){if(dNe)return xue;dNe=1,xue=t,t.displayName="git",t.aliases=[];function t(e){e.languages.git={comment:/^#.*/m,deleted:/^[-–].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m}}return xue}var _ue,hNe;function obr(){if(hNe)return _ue;hNe=1;var t=c6();_ue=e,e.displayName="glsl",e.aliases=[];function e(r){r.register(t),r.languages.glsl=r.languages.extend("c",{keyword:/\b(?:active|asm|atomic_uint|attribute|[ibdu]?vec[234]|bool|break|buffer|case|cast|centroid|class|coherent|common|const|continue|d?mat[234](?:x[234])?|default|discard|do|double|else|enum|extern|external|false|filter|fixed|flat|float|for|fvec[234]|goto|half|highp|hvec[234]|[iu]?sampler2DMS(?:Array)?|[iu]?sampler2DRect|[iu]?samplerBuffer|[iu]?samplerCube|[iu]?samplerCubeArray|[iu]?sampler[123]D|[iu]?sampler[12]DArray|[iu]?image2DMS(?:Array)?|[iu]?image2DRect|[iu]?imageBuffer|[iu]?imageCube|[iu]?imageCubeArray|[iu]?image[123]D|[iu]?image[12]DArray|if|in|inline|inout|input|int|interface|invariant|layout|long|lowp|mediump|namespace|noinline|noperspective|out|output|partition|patch|precise|precision|public|readonly|resource|restrict|return|sample|sampler[12]DArrayShadow|sampler[12]DShadow|sampler2DRectShadow|sampler3DRect|samplerCubeArrayShadow|samplerCubeShadow|shared|short|sizeof|smooth|static|struct|subroutine|superp|switch|template|this|true|typedef|uint|uniform|union|unsigned|using|varying|void|volatile|while|writeonly)\b/})}return _ue}var wue,pNe;function sbr(){if(pNe)return wue;pNe=1,wue=t,t.displayName="gml",t.aliases=[];function t(e){e.languages.gamemakerlanguage=e.languages.gml=e.languages.extend("clike",{keyword:/\b(?:break|case|continue|default|do|else|enum|exit|for|globalvar|if|repeat|return|switch|until|var|while)\b/,number:/(?:\b0x[\da-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ulf]{0,4}/i,operator:/--|\+\+|[-+%/=]=?|!=|\*\*?=?|<[<=>]?|>[=>]?|&&?|\^\^?|\|\|?|~|\b(?:and|at|not|or|with|xor)\b/,constant:/\b(?:GM_build_date|GM_version|action_(?:continue|restart|reverse|stop)|all|gamespeed_(?:fps|microseconds)|global|local|noone|other|pi|pointer_(?:invalid|null)|self|timezone_(?:local|utc)|undefined|ev_(?:create|destroy|step|alarm|keyboard|mouse|collision|other|draw|draw_(?:begin|end|post|pre)|keypress|keyrelease|trigger|(?:left|middle|no|right)_button|(?:left|middle|right)_press|(?:left|middle|right)_release|mouse_(?:enter|leave|wheel_down|wheel_up)|global_(?:left|middle|right)_button|global_(?:left|middle|right)_press|global_(?:left|middle|right)_release|joystick(?:1|2)_(?:button1|button2|button3|button4|button5|button6|button7|button8|down|left|right|up)|outside|boundary|game_start|game_end|room_start|room_end|no_more_lives|animation_end|end_of_path|no_more_health|user\d|gui|gui_begin|gui_end|step_(?:begin|end|normal))|vk_(?:alt|anykey|backspace|control|delete|down|end|enter|escape|home|insert|left|nokey|pagedown|pageup|pause|printscreen|return|right|shift|space|tab|up|f\d|numpad\d|add|decimal|divide|lalt|lcontrol|lshift|multiply|ralt|rcontrol|rshift|subtract)|achievement_(?:filter_(?:all_players|favorites_only|friends_only)|friends_info|info|leaderboard_info|our_info|pic_loaded|show_(?:achievement|bank|friend_picker|leaderboard|profile|purchase_prompt|ui)|type_challenge|type_score_challenge)|asset_(?:font|object|path|room|script|shader|sound|sprite|tiles|timeline|unknown)|audio_(?:3d|falloff_(?:exponent_distance|exponent_distance_clamped|inverse_distance|inverse_distance_clamped|linear_distance|linear_distance_clamped|none)|mono|new_system|old_system|stereo)|bm_(?:add|complex|dest_alpha|dest_color|dest_colour|inv_dest_alpha|inv_dest_color|inv_dest_colour|inv_src_alpha|inv_src_color|inv_src_colour|max|normal|one|src_alpha|src_alpha_sat|src_color|src_colour|subtract|zero)|browser_(?:chrome|firefox|ie|ie_mobile|not_a_browser|opera|safari|safari_mobile|tizen|unknown|windows_store)|buffer_(?:bool|f16|f32|f64|fast|fixed|generalerror|grow|invalidtype|network|outofbounds|outofspace|s16|s32|s8|seek_end|seek_relative|seek_start|string|text|u16|u32|u64|u8|vbuffer|wrap)|c_(?:aqua|black|blue|dkgray|fuchsia|gray|green|lime|ltgray|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow)|cmpfunc_(?:always|equal|greater|greaterequal|less|lessequal|never|notequal)|cr_(?:appstart|arrow|beam|cross|default|drag|handpoint|hourglass|none|size_all|size_nesw|size_ns|size_nwse|size_we|uparrow)|cull_(?:clockwise|counterclockwise|noculling)|device_(?:emulator|tablet)|device_ios_(?:ipad|ipad_retina|iphone|iphone5|iphone6|iphone6plus|iphone_retina|unknown)|display_(?:landscape|landscape_flipped|portrait|portrait_flipped)|dll_(?:cdecl|cdel|stdcall)|ds_type_(?:grid|list|map|priority|queue|stack)|ef_(?:cloud|ellipse|explosion|firework|flare|rain|ring|smoke|smokeup|snow|spark|star)|fa_(?:archive|bottom|center|directory|hidden|left|middle|readonly|right|sysfile|top|volumeid)|fb_login_(?:default|fallback_to_webview|forcing_safari|forcing_webview|no_fallback_to_webview|use_system_account)|iap_(?:available|canceled|ev_consume|ev_product|ev_purchase|ev_restore|ev_storeload|failed|purchased|refunded|status_available|status_loading|status_processing|status_restoring|status_unavailable|status_uninitialised|storeload_failed|storeload_ok|unavailable)|leaderboard_type_(?:number|time_mins_secs)|lighttype_(?:dir|point)|matrix_(?:projection|view|world)|mb_(?:any|left|middle|none|right)|network_(?:config_(?:connect_timeout|disable_reliable_udp|enable_reliable_udp|use_non_blocking_socket)|socket_(?:bluetooth|tcp|udp)|type_(?:connect|data|disconnect|non_blocking_connect))|of_challenge_(?:lose|tie|win)|os_(?:android|ios|linux|macosx|ps3|ps4|psvita|unknown|uwp|win32|win8native|windows|winphone|xboxone)|phy_debug_render_(?:aabb|collision_pairs|coms|core_shapes|joints|obb|shapes)|phy_joint_(?:anchor_1_x|anchor_1_y|anchor_2_x|anchor_2_y|angle|angle_limits|damping_ratio|frequency|length_1|length_2|lower_angle_limit|max_force|max_length|max_motor_force|max_motor_torque|max_torque|motor_force|motor_speed|motor_torque|reaction_force_x|reaction_force_y|reaction_torque|speed|translation|upper_angle_limit)|phy_particle_data_flag_(?:category|color|colour|position|typeflags|velocity)|phy_particle_flag_(?:colormixing|colourmixing|elastic|powder|spring|tensile|viscous|wall|water|zombie)|phy_particle_group_flag_(?:rigid|solid)|pr_(?:linelist|linestrip|pointlist|trianglefan|trianglelist|trianglestrip)|ps_(?:distr|shape)_(?:diamond|ellipse|gaussian|invgaussian|line|linear|rectangle)|pt_shape_(?:circle|cloud|disk|explosion|flare|line|pixel|ring|smoke|snow|spark|sphere|square|star)|ty_(?:real|string)|gp_(?:face\d|axislh|axislv|axisrh|axisrv|padd|padl|padr|padu|select|shoulderl|shoulderlb|shoulderr|shoulderrb|start|stickl|stickr)|lb_disp_(?:none|numeric|time_ms|time_sec)|lb_sort_(?:ascending|descending|none)|ov_(?:achievements|community|friends|gamegroup|players|settings)|ugc_(?:filetype_(?:community|microtrans)|list_(?:Favorited|Followed|Published|Subscribed|UsedOrPlayed|VotedDown|VotedOn|VotedUp|WillVoteLater)|match_(?:AllGuides|Artwork|Collections|ControllerBindings|IntegratedGuides|Items|Items_Mtx|Items_ReadyToUse|Screenshots|UsableInGame|Videos|WebGuides)|query_(?:AcceptedForGameRankedByAcceptanceDate|CreatedByFriendsRankedByPublicationDate|FavoritedByFriendsRankedByPublicationDate|NotYetRated)|query_RankedBy(?:NumTimesReported|PublicationDate|TextSearch|TotalVotesAsc|Trend|Vote|VotesUp)|result_success|sortorder_CreationOrder(?:Asc|Desc)|sortorder_(?:ForModeration|LastUpdatedDesc|SubscriptionDateDesc|TitleAsc|VoteScoreDesc)|visibility_(?:friends_only|private|public))|vertex_usage_(?:binormal|blendindices|blendweight|color|colour|depth|fog|normal|position|psize|sample|tangent|texcoord|textcoord)|vertex_type_(?:float\d|color|colour|ubyte4)|input_type|layerelementtype_(?:background|instance|oldtilemap|particlesystem|sprite|tile|tilemap|undefined)|se_(?:chorus|compressor|echo|equalizer|flanger|gargle|none|reverb)|text_type|tile_(?:flip|index_mask|mirror|rotate)|(?:obj|rm|scr|spr)\w+)\b/,variable:/\b(?:alarm|application_surface|async_load|background_(?:alpha|blend|color|colour|foreground|height|hspeed|htiled|index|showcolor|showcolour|visible|vspeed|vtiled|width|x|xscale|y|yscale)|bbox_(?:bottom|left|right|top)|browser_(?:height|width)|caption_(?:health|lives|score)|current_(?:day|hour|minute|month|second|time|weekday|year)|cursor_sprite|debug_mode|delta_time|direction|display_aa|error_(?:last|occurred)|event_(?:action|number|object|type)|fps|fps_real|friction|game_(?:display|project|save)_(?:id|name)|gamemaker_(?:pro|registered|version)|gravity|gravity_direction|(?:h|v)speed|health|iap_data|id|image_(?:alpha|angle|blend|depth|index|number|speed|xscale|yscale)|instance_(?:count|id)|keyboard_(?:key|lastchar|lastkey|string)|layer|lives|mask_index|mouse_(?:button|lastbutton|x|y)|object_index|os_(?:browser|device|type|version)|path_(?:endaction|index|orientation|position|positionprevious|scale|speed)|persistent|phy_(?:rotation|(?:col_normal|collision|com|linear_velocity|position|speed)_(?:x|y)|angular_(?:damping|velocity)|position_(?:x|y)previous|speed|linear_damping|bullet|fixed_rotation|active|mass|inertia|dynamic|kinematic|sleeping|collision_points)|pointer_(?:invalid|null)|room|room_(?:caption|first|height|last|persistent|speed|width)|score|secure_mode|show_(?:health|lives|score)|solid|speed|sprite_(?:height|index|width|xoffset|yoffset)|temp_directory|timeline_(?:index|loop|position|running|speed)|transition_(?:color|kind|steps)|undefined|view_(?:angle|current|enabled|(?:h|v)(?:border|speed)|(?:h|w|x|y)port|(?:h|w|x|y)view|object|surface_id|visible)|visible|webgl_enabled|working_directory|(?:x|y)(?:previous|start)|x|y|argument(?:_relitive|_count|\d)|argument|global|local|other|self)\b/})}return wue}var Sue,vNe;function lbr(){if(vNe)return Sue;vNe=1,Sue=t,t.displayName="gn",t.aliases=["gni"];function t(e){e.languages.gn={comment:{pattern:/#.*/,greedy:!0},"string-literal":{pattern:/(^|[^\\"])"(?:[^\r\n"\\]|\\.)*"/,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\{[\s\S]*?\}|[a-zA-Z_]\w*|0x[a-fA-F0-9]{2})/,lookbehind:!0,inside:{number:/^\$0x[\s\S]{2}$/,variable:/^\$\w+$/,"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}},string:/[\s\S]+/}},keyword:/\b(?:else|if)\b/,boolean:/\b(?:false|true)\b/,"builtin-function":{pattern:/\b(?:assert|defined|foreach|import|pool|print|template|tool|toolchain)(?=\s*\()/i,alias:"keyword"},function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:current_cpu|current_os|current_toolchain|default_toolchain|host_cpu|host_os|root_build_dir|root_gen_dir|root_out_dir|target_cpu|target_gen_dir|target_os|target_out_dir)\b/,number:/-?\b\d+\b/,operator:/[-+!=<>]=?|&&|\|\|/,punctuation:/[(){}[\],.]/},e.languages.gn["string-literal"].inside.interpolation.inside.expression.inside=e.languages.gn,e.languages.gni=e.languages.gn}return Sue}var Tue,mNe;function ubr(){if(mNe)return Tue;mNe=1,Tue=t,t.displayName="goModule",t.aliases=[];function t(e){e.languages["go-mod"]=e.languages["go-module"]={comment:{pattern:/\/\/.*/,greedy:!0},version:{pattern:/(^|[\s()[\],])v\d+\.\d+\.\d+(?:[+-][-+.\w]*)?(?![^\s()[\],])/,lookbehind:!0,alias:"number"},"go-version":{pattern:/((?:^|\s)go\s+)\d+(?:\.\d+){1,2}/,lookbehind:!0,alias:"number"},keyword:{pattern:/^([ \t]*)(?:exclude|go|module|replace|require|retract)\b/m,lookbehind:!0},operator:/=>/,punctuation:/[()[\],]/}}return Tue}var Eue,gNe;function cbr(){if(gNe)return Eue;gNe=1,Eue=t,t.displayName="go",t.aliases=[];function t(e){e.languages.go=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),e.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete e.languages.go["class-name"]}return Eue}var Aue,yNe;function fbr(){if(yNe)return Aue;yNe=1,Aue=t,t.displayName="graphql",t.aliases=[];function t(e){e.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:e.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},e.hooks.add("after-tokenize",function(n){if(n.language!=="graphql")return;var i=n.tokens.filter(function(U){return typeof U!="string"&&U.type!=="comment"&&U.type!=="scalar"}),a=0;function o(U){return i[a+U]}function s(U,ve){ve=ve||0;for(var Se=0;Se<U.length;Se++){var Pe=o(Se+ve);if(!Pe||Pe.type!==U[Se])return!1}return!0}function d(U,ve){for(var Se=1,Pe=a;Pe<i.length;Pe++){var Me=i[Pe],Ie=Me.content;if(Me.type==="punctuation"&&typeof Ie=="string"){if(U.test(Ie))Se++;else if(ve.test(Ie)&&(Se--,Se===0))return Pe}}return-1}function b(U,ve){var Se=U.alias;Se?Array.isArray(Se)||(U.alias=Se=[Se]):U.alias=Se=[],Se.push(ve)}for(;a<i.length;){var L=i[a++];if(L.type==="keyword"&&L.content==="mutation"){var B=[];if(s(["definition-mutation","punctuation"])&&o(1).content==="("){a+=2;var V=d(/^\($/,/^\)$/);if(V===-1)continue;for(;a<V;a++){var X=o(0);X.type==="variable"&&(b(X,"variable-input"),B.push(X.content))}a=V+1}if(s(["punctuation","property-query"])&&o(0).content==="{"&&(a++,b(o(0),"property-mutation"),B.length>0)){var ie=d(/^\{$/,/^\}$/);if(ie===-1)continue;for(var de=a;de<ie;de++){var ae=i[de];ae.type==="variable"&&B.indexOf(ae.content)>=0&&b(ae,"variable-input")}}}}})}return Aue}var Cue,bNe;function dbr(){if(bNe)return Cue;bNe=1,Cue=t,t.displayName="groovy",t.aliases=[];function t(e){e.languages.groovy=e.languages.extend("clike",{string:[{pattern:/("""|''')(?:[^\\]|\\[\s\S])*?\1|\$\/(?:[^/$]|\$(?:[/$]|(?![/$]))|\/(?!\$))*\/\$/,greedy:!0},{pattern:/(["'/])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0}],keyword:/\b(?:abstract|as|assert|boolean|break|byte|case|catch|char|class|const|continue|def|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|in|instanceof|int|interface|long|native|new|package|private|protected|public|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|trait|transient|try|void|volatile|while)\b/,number:/\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?\d+)?)[glidf]?\b/i,operator:{pattern:/(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,lookbehind:!0},punctuation:/\.+|[{}[\];(),:$]/}),e.languages.insertBefore("groovy","string",{shebang:{pattern:/#!.+/,alias:"comment"}}),e.languages.insertBefore("groovy","punctuation",{"spock-block":/\b(?:and|cleanup|expect|given|setup|then|when|where):/}),e.languages.insertBefore("groovy","function",{annotation:{pattern:/(^|[^.])@\w+/,lookbehind:!0,alias:"punctuation"}}),e.hooks.add("wrap",function(r){if(r.language==="groovy"&&r.type==="string"){var n=r.content.value[0];if(n!="'"){var i=/([^\\])(?:\$(?:\{.*?\}|[\w.]+))/;n==="$"&&(i=/([^\$])(?:\$(?:\{.*?\}|[\w.]+))/),r.content.value=r.content.value.replace(/&lt;/g,"<").replace(/&amp;/g,"&"),r.content=e.highlight(r.content.value,{expression:{pattern:i,lookbehind:!0,inside:e.languages.groovy}}),r.classes.push(n==="/"?"regex":"gstring")}}})}return Cue}var Mue,xNe;function hbr(){if(xNe)return Mue;xNe=1;var t=NZ();Mue=e,e.displayName="haml",e.aliases=[];function e(r){r.register(t),(function(n){n.languages.haml={"multiline-comment":{pattern:/((?:^|\r?\n|\r)([\t ]*))(?:\/|-#).*(?:(?:\r?\n|\r)\2[\t ].+)*/,lookbehind:!0,alias:"comment"},"multiline-code":[{pattern:/((?:^|\r?\n|\r)([\t ]*)(?:[~-]|[&!]?=)).*,[\t ]*(?:(?:\r?\n|\r)\2[\t ].*,[\t ]*)*(?:(?:\r?\n|\r)\2[\t ].+)/,lookbehind:!0,inside:n.languages.ruby},{pattern:/((?:^|\r?\n|\r)([\t ]*)(?:[~-]|[&!]?=)).*\|[\t ]*(?:(?:\r?\n|\r)\2[\t ].*\|[\t ]*)*/,lookbehind:!0,inside:n.languages.ruby}],filter:{pattern:/((?:^|\r?\n|\r)([\t ]*)):[\w-]+(?:(?:\r?\n|\r)(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/,lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"symbol"}}},markup:{pattern:/((?:^|\r?\n|\r)[\t ]*)<.+/,lookbehind:!0,inside:n.languages.markup},doctype:{pattern:/((?:^|\r?\n|\r)[\t ]*)!!!(?: .+)?/,lookbehind:!0},tag:{pattern:/((?:^|\r?\n|\r)[\t ]*)[%.#][\w\-#.]*[\w\-](?:\([^)]+\)|\{(?:\{[^}]+\}|[^{}])+\}|\[[^\]]+\])*[\/<>]*/,lookbehind:!0,inside:{attributes:[{pattern:/(^|[^#])\{(?:\{[^}]+\}|[^{}])+\}/,lookbehind:!0,inside:n.languages.ruby},{pattern:/\([^)]+\)/,inside:{"attr-value":{pattern:/(=\s*)(?:"(?:\\.|[^\\"\r\n])*"|[^)\s]+)/,lookbehind:!0},"attr-name":/[\w:-]+(?=\s*!?=|\s*[,)])/,punctuation:/[=(),]/}},{pattern:/\[[^\]]+\]/,inside:n.languages.ruby}],punctuation:/[<>]/}},code:{pattern:/((?:^|\r?\n|\r)[\t ]*(?:[~-]|[&!]?=)).+/,lookbehind:!0,inside:n.languages.ruby},interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},ruby:{pattern:/[\s\S]+/,inside:n.languages.ruby}}},punctuation:{pattern:/((?:^|\r?\n|\r)[\t ]*)[~=\-&!]+/,lookbehind:!0}};for(var i="((?:^|\\r?\\n|\\r)([\\t ]*)):{{filter_name}}(?:(?:\\r?\\n|\\r)(?:\\2[\\t ].+|\\s*?(?=\\r?\\n|\\r)))+",a=["css",{filter:"coffee",language:"coffeescript"},"erb","javascript","less","markdown","ruby","scss","textile"],o={},s=0,d=a.length;s<d;s++){var b=a[s];b=typeof b=="string"?{filter:b,language:b}:b,n.languages[b.language]&&(o["filter-"+b.filter]={pattern:RegExp(i.replace("{{filter_name}}",function(){return b.filter})),lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"symbol"},text:{pattern:/[\s\S]+/,alias:[b.language,"language-"+b.language],inside:n.languages[b.language]}}})}n.languages.insertBefore("haml","filter",o)})(r)}return Mue}var Rue,_Ne;function pbr(){if(_Ne)return Rue;_Ne=1;var t=iT();Rue=e,e.displayName="handlebars",e.aliases=["hbs"];function e(r){r.register(t),(function(n){n.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:false|true)\b/,block:{pattern:/^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},n.hooks.add("before-tokenize",function(i){var a=/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g;n.languages["markup-templating"].buildPlaceholders(i,"handlebars",a)}),n.hooks.add("after-tokenize",function(i){n.languages["markup-templating"].tokenizePlaceholders(i,"handlebars")}),n.languages.hbs=n.languages.handlebars})(r)}return Rue}var kue,wNe;function hbe(){if(wNe)return kue;wNe=1,kue=t,t.displayName="haskell",t.aliases=["hs"];function t(e){e.languages.haskell={comment:{pattern:/(^|[^-!#$%*+=?&@|~.:<>^\\\/])(?:--(?:(?=.)[^-!#$%*+=?&@|~.:<>^\\\/].*|$)|\{-[\s\S]*?-\})/m,lookbehind:!0},char:{pattern:/'(?:[^\\']|\\(?:[abfnrtv\\"'&]|\^[A-Z@[\]^_]|ACK|BEL|BS|CAN|CR|DC1|DC2|DC3|DC4|DEL|DLE|EM|ENQ|EOT|ESC|ETB|ETX|FF|FS|GS|HT|LF|NAK|NUL|RS|SI|SO|SOH|SP|STX|SUB|SYN|US|VT|\d+|o[0-7]+|x[0-9a-fA-F]+))'/,alias:"string"},string:{pattern:/"(?:[^\\"]|\\(?:\S|\s+\\))*"/,greedy:!0},keyword:/\b(?:case|class|data|deriving|do|else|if|in|infixl|infixr|instance|let|module|newtype|of|primitive|then|type|where)\b/,"import-statement":{pattern:/(^[\t ]*)import\s+(?:qualified\s+)?(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*(?:\s+as\s+(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*)?(?:\s+hiding\b)?/m,lookbehind:!0,inside:{keyword:/\b(?:as|hiding|import|qualified)\b/,punctuation:/\./}},builtin:/\b(?:abs|acos|acosh|all|and|any|appendFile|approxRational|asTypeOf|asin|asinh|atan|atan2|atanh|basicIORun|break|catch|ceiling|chr|compare|concat|concatMap|const|cos|cosh|curry|cycle|decodeFloat|denominator|digitToInt|div|divMod|drop|dropWhile|either|elem|encodeFloat|enumFrom|enumFromThen|enumFromThenTo|enumFromTo|error|even|exp|exponent|fail|filter|flip|floatDigits|floatRadix|floatRange|floor|fmap|foldl|foldl1|foldr|foldr1|fromDouble|fromEnum|fromInt|fromInteger|fromIntegral|fromRational|fst|gcd|getChar|getContents|getLine|group|head|id|inRange|index|init|intToDigit|interact|ioError|isAlpha|isAlphaNum|isAscii|isControl|isDenormalized|isDigit|isHexDigit|isIEEE|isInfinite|isLower|isNaN|isNegativeZero|isOctDigit|isPrint|isSpace|isUpper|iterate|last|lcm|length|lex|lexDigits|lexLitChar|lines|log|logBase|lookup|map|mapM|mapM_|max|maxBound|maximum|maybe|min|minBound|minimum|mod|negate|not|notElem|null|numerator|odd|or|ord|otherwise|pack|pi|pred|primExitWith|print|product|properFraction|putChar|putStr|putStrLn|quot|quotRem|range|rangeSize|read|readDec|readFile|readFloat|readHex|readIO|readInt|readList|readLitChar|readLn|readOct|readParen|readSigned|reads|readsPrec|realToFrac|recip|rem|repeat|replicate|return|reverse|round|scaleFloat|scanl|scanl1|scanr|scanr1|seq|sequence|sequence_|show|showChar|showInt|showList|showLitChar|showParen|showSigned|showString|shows|showsPrec|significand|signum|sin|sinh|snd|sort|span|splitAt|sqrt|subtract|succ|sum|tail|take|takeWhile|tan|tanh|threadToIOResult|toEnum|toInt|toInteger|toLower|toRational|toUpper|truncate|uncurry|undefined|unlines|until|unwords|unzip|unzip3|userError|words|writeFile|zip|zip3|zipWith|zipWith3)\b/,number:/\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0o[0-7]+|0x[0-9a-f]+)\b/i,operator:[{pattern:/`(?:[A-Z][\w']*\.)*[_a-z][\w']*`/,greedy:!0},{pattern:/(\s)\.(?=\s)/,lookbehind:!0},/[-!#$%*+=?&@|~:<>^\\\/][-!#$%*+=?&@|~.:<>^\\\/]*|\.[-!#$%*+=?&@|~.:<>^\\\/]+/],hvariable:{pattern:/\b(?:[A-Z][\w']*\.)*[_a-z][\w']*/,inside:{punctuation:/\./}},constant:{pattern:/\b(?:[A-Z][\w']*\.)*[A-Z][\w']*/,inside:{punctuation:/\./}},punctuation:/[{}[\];(),.:]/},e.languages.hs=e.languages.haskell}return kue}var Iue,SNe;function vbr(){if(SNe)return Iue;SNe=1,Iue=t,t.displayName="haxe",t.aliases=[];function t(e){e.languages.haxe=e.languages.extend("clike",{string:{pattern:/"(?:[^"\\]|\\[\s\S])*"/,greedy:!0},"class-name":[{pattern:/(\b(?:abstract|class|enum|extends|implements|interface|new|typedef)\s+)[A-Z_]\w*/,lookbehind:!0},/\b[A-Z]\w*/],keyword:/\bthis\b|\b(?:abstract|as|break|case|cast|catch|class|continue|default|do|dynamic|else|enum|extends|extern|final|for|from|function|if|implements|import|in|inline|interface|macro|new|null|operator|overload|override|package|private|public|return|static|super|switch|throw|to|try|typedef|untyped|using|var|while)(?!\.)\b/,function:{pattern:/\b[a-z_]\w*(?=\s*(?:<[^<>]*>\s*)?\()/i,greedy:!0},operator:/\.{3}|\+\+|--|&&|\|\||->|=>|(?:<<?|>{1,3}|[-+*/%!=&|^])=?|[?:~]/}),e.languages.insertBefore("haxe","string",{"string-interpolation":{pattern:/'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{interpolation:{pattern:/(^|[^\\])\$(?:\w+|\{[^{}]+\})/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.haxe}}},string:/[\s\S]+/}}}),e.languages.insertBefore("haxe","class-name",{regex:{pattern:/~\/(?:[^\/\\\r\n]|\\.)+\/[a-z]*/,greedy:!0,inside:{"regex-flags":/\b[a-z]+$/,"regex-source":{pattern:/^(~\/)[\s\S]+(?=\/$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^~\/|\/$/}}}),e.languages.insertBefore("haxe","keyword",{preprocessor:{pattern:/#(?:else|elseif|end|if)\b.*/,alias:"property"},metadata:{pattern:/@:?[\w.]+/,alias:"symbol"},reification:{pattern:/\$(?:\w+|(?=\{))/,alias:"important"}})}return Iue}var Pue,TNe;function mbr(){if(TNe)return Pue;TNe=1,Pue=t,t.displayName="hcl",t.aliases=[];function t(e){e.languages.hcl={comment:/(?:\/\/|#).*|\/\*[\s\S]*?(?:\*\/|$)/,heredoc:{pattern:/<<-?(\w+\b)[\s\S]*?^[ \t]*\1/m,greedy:!0,alias:"string"},keyword:[{pattern:/(?:data|resource)\s+(?:"(?:\\[\s\S]|[^\\"])*")(?=\s+"[\w-]+"\s+\{)/i,inside:{type:{pattern:/(resource|data|\s+)(?:"(?:\\[\s\S]|[^\\"])*")/i,lookbehind:!0,alias:"variable"}}},{pattern:/(?:backend|module|output|provider|provisioner|variable)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+(?=\{)/i,inside:{type:{pattern:/(backend|module|output|provider|provisioner|variable)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+/i,lookbehind:!0,alias:"variable"}}},/[\w-]+(?=\s+\{)/],property:[/[-\w\.]+(?=\s*=(?!=))/,/"(?:\\[\s\S]|[^\\"])+"(?=\s*[:=])/],string:{pattern:/"(?:[^\\$"]|\\[\s\S]|\$(?:(?=")|\$+(?!\$)|[^"${])|\$\{(?:[^{}"]|"(?:[^\\"]|\\[\s\S])*")*\})*"/,greedy:!0,inside:{interpolation:{pattern:/(^|[^$])\$\{(?:[^{}"]|"(?:[^\\"]|\\[\s\S])*")*\}/,lookbehind:!0,inside:{type:{pattern:/(\b(?:count|data|local|module|path|self|terraform|var)\b\.)[\w\*]+/i,lookbehind:!0,alias:"variable"},keyword:/\b(?:count|data|local|module|path|self|terraform|var)\b/i,function:/\w+(?=\()/,string:{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0},number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i,punctuation:/[!\$#%&'()*+,.\/;<=>@\[\\\]^`{|}~?:]/}}}},number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i,boolean:/\b(?:false|true)\b/i,punctuation:/[=\[\]{}]/}}return Pue}var Due,ENe;function gbr(){if(ENe)return Due;ENe=1;var t=c6();Due=e,e.displayName="hlsl",e.aliases=[];function e(r){r.register(t),r.languages.hlsl=r.languages.extend("c",{"class-name":[r.languages.c["class-name"],/\b(?:AppendStructuredBuffer|BlendState|Buffer|ByteAddressBuffer|CompileShader|ComputeShader|ConsumeStructuredBuffer|DepthStencilState|DepthStencilView|DomainShader|GeometryShader|Hullshader|InputPatch|LineStream|OutputPatch|PixelShader|PointStream|RWBuffer|RWByteAddressBuffer|RWStructuredBuffer|RWTexture(?:1D|1DArray|2D|2DArray|3D)|RasterizerState|RenderTargetView|SamplerComparisonState|SamplerState|StructuredBuffer|Texture(?:1D|1DArray|2D|2DArray|2DMS|2DMSArray|3D|Cube|CubeArray)|TriangleStream|VertexShader)\b/],keyword:[/\b(?:asm|asm_fragment|auto|break|case|catch|cbuffer|centroid|char|class|column_major|compile|compile_fragment|const|const_cast|continue|default|delete|discard|do|dynamic_cast|else|enum|explicit|export|extern|for|friend|fxgroup|goto|groupshared|if|in|inline|inout|interface|line|lineadj|linear|long|matrix|mutable|namespace|new|nointerpolation|noperspective|operator|out|packoffset|pass|pixelfragment|point|precise|private|protected|public|register|reinterpret_cast|return|row_major|sample|sampler|shared|short|signed|sizeof|snorm|stateblock|stateblock_state|static|static_cast|string|struct|switch|tbuffer|technique|technique10|technique11|template|texture|this|throw|triangle|triangleadj|try|typedef|typename|uniform|union|unorm|unsigned|using|vector|vertexfragment|virtual|void|volatile|while)\b/,/\b(?:bool|double|dword|float|half|int|min(?:10float|12int|16(?:float|int|uint))|uint)(?:[1-4](?:x[1-4])?)?\b/],number:/(?:(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+)?|\b0x[\da-fA-F]+)[fFhHlLuU]?\b/,boolean:/\b(?:false|true)\b/})}return Due}var Lue,ANe;function ybr(){if(ANe)return Lue;ANe=1,Lue=t,t.displayName="hoon",t.aliases=[];function t(e){e.languages.hoon={comment:{pattern:/::.*/,greedy:!0},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},constant:/%(?:\.[ny]|[\w-]+)/,"class-name":/@(?:[a-z0-9-]*[a-z0-9])?|\*/i,function:/(?:\+[-+] {2})?(?:[a-z](?:[a-z0-9-]*[a-z0-9])?)/,keyword:/\.[\^\+\*=\?]|![><:\.=\?!]|=[>|:,\.\-\^<+;/~\*\?]|\?[>|:\.\-\^<\+&~=@!]|\|[\$_%:\.\-\^~\*=@\?]|\+[|\$\+\*]|:[_\-\^\+~\*]|%[_:\.\-\^\+~\*=]|\^[|:\.\-\+&~\*=\?]|\$[|_%:<>\-\^&~@=\?]|;[:<\+;\/~\*=]|~[>|\$_%<\+\/&=\?!]|--|==/}}return Lue}var Oue,CNe;function bbr(){if(CNe)return Oue;CNe=1,Oue=t,t.displayName="hpkp",t.aliases=[];function t(e){e.languages.hpkp={directive:{pattern:/\b(?:includeSubDomains|max-age|pin-sha256|preload|report-to|report-uri|strict)(?=[\s;=]|$)/i,alias:"property"},operator:/=/,punctuation:/;/}}return Oue}var Nue,MNe;function xbr(){if(MNe)return Nue;MNe=1,Nue=t,t.displayName="hsts",t.aliases=[];function t(e){e.languages.hsts={directive:{pattern:/\b(?:includeSubDomains|max-age|preload)(?=[\s;=]|$)/i,alias:"property"},operator:/=/,punctuation:/;/}}return Nue}var Fue,RNe;function _br(){if(RNe)return Fue;RNe=1,Fue=t,t.displayName="http",t.aliases=[];function t(e){(function(r){function n(B){return RegExp("(^(?:"+B+"):[ 	]*(?![ 	]))[^]+","i")}r.languages.http={"request-line":{pattern:/^(?:CONNECT|DELETE|GET|HEAD|OPTIONS|PATCH|POST|PRI|PUT|SEARCH|TRACE)\s(?:https?:\/\/|\/)\S*\sHTTP\/[\d.]+/m,inside:{method:{pattern:/^[A-Z]+\b/,alias:"property"},"request-target":{pattern:/^(\s)(?:https?:\/\/|\/)\S*(?=\s)/,lookbehind:!0,alias:"url",inside:r.languages.uri},"http-version":{pattern:/^(\s)HTTP\/[\d.]+/,lookbehind:!0,alias:"property"}}},"response-status":{pattern:/^HTTP\/[\d.]+ \d+ .+/m,inside:{"http-version":{pattern:/^HTTP\/[\d.]+/,alias:"property"},"status-code":{pattern:/^(\s)\d+(?=\s)/,lookbehind:!0,alias:"number"},"reason-phrase":{pattern:/^(\s).+/,lookbehind:!0,alias:"string"}}},header:{pattern:/^[\w-]+:.+(?:(?:\r\n?|\n)[ \t].+)*/m,inside:{"header-value":[{pattern:n(/Content-Security-Policy/.source),lookbehind:!0,alias:["csp","languages-csp"],inside:r.languages.csp},{pattern:n(/Public-Key-Pins(?:-Report-Only)?/.source),lookbehind:!0,alias:["hpkp","languages-hpkp"],inside:r.languages.hpkp},{pattern:n(/Strict-Transport-Security/.source),lookbehind:!0,alias:["hsts","languages-hsts"],inside:r.languages.hsts},{pattern:n(/[^:]+/.source),lookbehind:!0}],"header-name":{pattern:/^[^:]+/,alias:"keyword"},punctuation:/^:/}}};var i=r.languages,a={"application/javascript":i.javascript,"application/json":i.json||i.javascript,"application/xml":i.xml,"text/xml":i.xml,"text/html":i.html,"text/css":i.css,"text/plain":i.plain},o={"application/json":!0,"application/xml":!0};function s(B){var V=B.replace(/^[a-z]+\//,""),X="\\w+/(?:[\\w.-]+\\+)+"+V+"(?![+\\w.-])";return"(?:"+B+"|"+X+")"}var d;for(var b in a)if(a[b]){d=d||{};var L=o[b]?s(b):b;d[b.replace(/\//g,"-")]={pattern:RegExp("("+/content-type:\s*/.source+L+/(?:(?:\r\n?|\n)[\w-].*)*(?:\r(?:\n|(?!\n))|\n)/.source+")"+/[^ \t\w-][\s\S]*/.source,"i"),lookbehind:!0,inside:a[b]}}d&&r.languages.insertBefore("http","header",d)})(e)}return Fue}var zue,kNe;function wbr(){if(kNe)return zue;kNe=1,zue=t,t.displayName="ichigojam",t.aliases=[];function t(e){e.languages.ichigojam={comment:/(?:\B'|REM)(?:[^\n\r]*)/i,string:{pattern:/"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/,greedy:!0},number:/\B#[0-9A-F]+|\B`[01]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:BEEP|BPS|CASE|CLEAR|CLK|CLO|CLP|CLS|CLT|CLV|CONT|COPY|ELSE|END|FILE|FILES|FOR|GOSUB|GOTO|GSB|IF|INPUT|KBD|LED|LET|LIST|LOAD|LOCATE|LRUN|NEW|NEXT|OUT|PLAY|POKE|PRINT|PWM|REM|RENUM|RESET|RETURN|RIGHT|RTN|RUN|SAVE|SCROLL|SLEEP|SRND|STEP|STOP|SUB|TEMPO|THEN|TO|UART|VIDEO|WAIT)(?:\$|\b)/i,function:/\b(?:ABS|ANA|ASC|BIN|BTN|DEC|END|FREE|HELP|HEX|I2CR|I2CW|IN|INKEY|LEN|LINE|PEEK|RND|SCR|SOUND|STR|TICK|USR|VER|VPEEK|ZER)(?:\$|\b)/i,label:/(?:\B@\S+)/,operator:/<[=>]?|>=?|\|\||&&|[+\-*\/=|&^~!]|\b(?:AND|NOT|OR)\b/i,punctuation:/[\[,;:()\]]/}}return zue}var Bue,INe;function Sbr(){if(INe)return Bue;INe=1,Bue=t,t.displayName="icon",t.aliases=[];function t(e){e.languages.icon={comment:/#.*/,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n_]|\\.|_(?!\1)(?:\r\n|[\s\S]))*\1/,greedy:!0},number:/\b(?:\d+r[a-z\d]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b|\.\d+\b/i,"builtin-keyword":{pattern:/&(?:allocated|ascii|clock|collections|cset|current|date|dateline|digits|dump|e|error(?:number|text|value)?|errout|fail|features|file|host|input|lcase|letters|level|line|main|null|output|phi|pi|pos|progname|random|regions|source|storage|subject|time|trace|ucase|version)\b/,alias:"variable"},directive:{pattern:/\$\w+/,alias:"builtin"},keyword:/\b(?:break|by|case|create|default|do|else|end|every|fail|global|if|initial|invocable|link|local|next|not|of|procedure|record|repeat|return|static|suspend|then|to|until|while)\b/,function:/\b(?!\d)\w+(?=\s*[({]|\s*!\s*\[)/,operator:/[+-]:(?!=)|(?:[\/?@^%&]|\+\+?|--?|==?=?|~==?=?|\*\*?|\|\|\|?|<(?:->?|<?=?)|>>?=?)(?::=)?|:(?:=:?)?|[!.\\|~]/,punctuation:/[\[\](){},;]/}}return Bue}var Uue,PNe;function Tbr(){if(PNe)return Uue;PNe=1,Uue=t,t.displayName="icuMessageFormat",t.aliases=[];function t(e){(function(r){function n(b,L){return L<=0?/[]/.source:b.replace(/<SELF>/g,function(){return n(b,L-1)})}var i=/'[{}:=,](?:[^']|'')*'(?!')/,a={pattern:/''/,greedy:!0,alias:"operator"},o={pattern:i,greedy:!0,inside:{escape:a}},s=n(/\{(?:[^{}']|'(?![{},'])|''|<STR>|<SELF>)*\}/.source.replace(/<STR>/g,function(){return i.source}),8),d={pattern:RegExp(s),inside:{message:{pattern:/^(\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:null},"message-delimiter":{pattern:/./,alias:"punctuation"}}};r.languages["icu-message-format"]={argument:{pattern:RegExp(s),greedy:!0,inside:{content:{pattern:/^(\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:{"argument-name":{pattern:/^(\s*)[^{}:=,\s]+/,lookbehind:!0},"choice-style":{pattern:/^(\s*,\s*choice\s*,\s*)\S(?:[\s\S]*\S)?/,lookbehind:!0,inside:{punctuation:/\|/,range:{pattern:/^(\s*)[+-]?(?:\d+(?:\.\d*)?|\u221e)\s*[<#\u2264]/,lookbehind:!0,inside:{operator:/[<#\u2264]/,number:/\S+/}},rest:null}},"plural-style":{pattern:/^(\s*,\s*(?:plural|selectordinal)\s*,\s*)\S(?:[\s\S]*\S)?/,lookbehind:!0,inside:{offset:/^offset:\s*\d+/,"nested-message":d,selector:{pattern:/=\d+|[^{}:=,\s]+/,inside:{keyword:/^(?:few|many|one|other|two|zero)$/}}}},"select-style":{pattern:/^(\s*,\s*select\s*,\s*)\S(?:[\s\S]*\S)?/,lookbehind:!0,inside:{"nested-message":d,selector:{pattern:/[^{}:=,\s]+/,inside:{keyword:/^other$/}}}},keyword:/\b(?:choice|plural|select|selectordinal)\b/,"arg-type":{pattern:/\b(?:date|duration|number|ordinal|spellout|time)\b/,alias:"keyword"},"arg-skeleton":{pattern:/(,\s*)::[^{}:=,\s]+/,lookbehind:!0},"arg-style":{pattern:/(,\s*)(?:currency|full|integer|long|medium|percent|short)(?=\s*$)/,lookbehind:!0},"arg-style-text":{pattern:RegExp(/(^\s*,\s*(?=\S))/.source+n(/(?:[^{}']|'[^']*'|\{(?:<SELF>)?\})+/.source,8)+"$"),lookbehind:!0,alias:"string"},punctuation:/,/}},"argument-delimiter":{pattern:/./,alias:"operator"}}},escape:a,string:o},d.inside.message.inside=r.languages["icu-message-format"],r.languages["icu-message-format"].argument.inside.content.inside["choice-style"].inside.rest=r.languages["icu-message-format"]})(e)}return Uue}var Hue,DNe;function Ebr(){if(DNe)return Hue;DNe=1;var t=hbe();Hue=e,e.displayName="idris",e.aliases=["idr"];function e(r){r.register(t),r.languages.idris=r.languages.extend("haskell",{comment:{pattern:/(?:(?:--|\|\|\|).*$|\{-[\s\S]*?-\})/m},keyword:/\b(?:Type|case|class|codata|constructor|corecord|data|do|dsl|else|export|if|implementation|implicit|import|impossible|in|infix|infixl|infixr|instance|interface|let|module|mutual|namespace|of|parameters|partial|postulate|private|proof|public|quoteGoal|record|rewrite|syntax|then|total|using|where|with)\b/,builtin:void 0}),r.languages.insertBefore("idris","keyword",{"import-statement":{pattern:/(^\s*import\s+)(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*/m,lookbehind:!0,inside:{punctuation:/\./}}}),r.languages.idr=r.languages.idris}return Hue}var jue,LNe;function Abr(){if(LNe)return jue;LNe=1,jue=t,t.displayName="iecst",t.aliases=[];function t(e){e.languages.iecst={comment:[{pattern:/(^|[^\\])(?:\/\*[\s\S]*?(?:\*\/|$)|\(\*[\s\S]*?(?:\*\)|$)|\{[\s\S]*?(?:\}|$))/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:[/\b(?:END_)?(?:PROGRAM|CONFIGURATION|INTERFACE|FUNCTION_BLOCK|FUNCTION|ACTION|TRANSITION|TYPE|STRUCT|(?:INITIAL_)?STEP|NAMESPACE|LIBRARY|CHANNEL|FOLDER|RESOURCE|VAR_(?:ACCESS|CONFIG|EXTERNAL|GLOBAL|INPUT|IN_OUT|OUTPUT|TEMP)|VAR|METHOD|PROPERTY)\b/i,/\b(?:AT|BY|(?:END_)?(?:CASE|FOR|IF|REPEAT|WHILE)|CONSTANT|CONTINUE|DO|ELSE|ELSIF|EXIT|EXTENDS|FROM|GET|GOTO|IMPLEMENTS|JMP|NON_RETAIN|OF|PRIVATE|PROTECTED|PUBLIC|RETAIN|RETURN|SET|TASK|THEN|TO|UNTIL|USING|WITH|__CATCH|__ENDTRY|__FINALLY|__TRY)\b/],"class-name":/\b(?:ANY|ARRAY|BOOL|BYTE|U?(?:D|L|S)?INT|(?:D|L)?WORD|DATE(?:_AND_TIME)?|DT|L?REAL|POINTER|STRING|TIME(?:_OF_DAY)?|TOD)\b/,address:{pattern:/%[IQM][XBWDL][\d.]*|%[IQ][\d.]*/,alias:"symbol"},number:/\b(?:16#[\da-f]+|2#[01_]+|0x[\da-f]+)\b|\b(?:D|DT|T|TOD)#[\d_shmd:]*|\b[A-Z]*#[\d.,_]*|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/,operator:/S?R?:?=>?|&&?|\*\*?|<[=>]?|>=?|[-:^/+#]|\b(?:AND|EQ|EXPT|GE|GT|LE|LT|MOD|NE|NOT|OR|XOR)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,punctuation:/[()[\].,;]/}}return jue}var Vue,ONe;function Cbr(){if(ONe)return Vue;ONe=1,Vue=t,t.displayName="ignore",t.aliases=["gitignore","hgignore","npmignore"];function t(e){(function(r){r.languages.ignore={comment:/^#.*/m,entry:{pattern:/\S(?:.*(?:(?:\\ )|\S))?/,alias:"string",inside:{operator:/^!|\*\*?|\?/,regex:{pattern:/(^|[^\\])\[[^\[\]]*\]/,lookbehind:!0},punctuation:/\//}}},r.languages.gitignore=r.languages.ignore,r.languages.hgignore=r.languages.ignore,r.languages.npmignore=r.languages.ignore})(e)}return Vue}var que,NNe;function Mbr(){if(NNe)return que;NNe=1,que=t,t.displayName="inform7",t.aliases=[];function t(e){e.languages.inform7={string:{pattern:/"[^"]*"/,inside:{substitution:{pattern:/\[[^\[\]]+\]/,inside:{delimiter:{pattern:/\[|\]/,alias:"punctuation"}}}}},comment:{pattern:/\[[^\[\]]+\]/,greedy:!0},title:{pattern:/^[ \t]*(?:book|chapter|part(?! of)|section|table|volume)\b.+/im,alias:"important"},number:{pattern:/(^|[^-])(?:\b\d+(?:\.\d+)?(?:\^\d+)?(?:(?!\d)\w+)?|\b(?:eight|eleven|five|four|nine|one|seven|six|ten|three|twelve|two))\b(?!-)/i,lookbehind:!0},verb:{pattern:/(^|[^-])\b(?:answering|applying to|are|asking|attacking|be(?:ing)?|burning|buying|called|carries|carry(?! out)|carrying|climbing|closing|conceal(?:ing|s)?|consulting|contain(?:ing|s)?|cutting|drinking|dropping|eating|enclos(?:es?|ing)|entering|examining|exiting|getting|giving|going|ha(?:s|ve|ving)|hold(?:ing|s)?|impl(?:ies|y)|incorporat(?:es?|ing)|inserting|is|jumping|kissing|listening|locking|looking|mean(?:ing|s)?|opening|provid(?:es?|ing)|pulling|pushing|putting|relat(?:es?|ing)|removing|searching|see(?:ing|s)?|setting|showing|singing|sleeping|smelling|squeezing|support(?:ing|s)?|swearing|switching|taking|tasting|telling|thinking|throwing|touching|turning|tying|unlock(?:ing|s)?|var(?:ies|y|ying)|waiting|waking|waving|wear(?:ing|s)?)\b(?!-)/i,lookbehind:!0,alias:"operator"},keyword:{pattern:/(^|[^-])\b(?:after|before|carry out|check|continue the action|definition(?= *:)|do nothing|else|end (?:if|the story|unless)|every turn|if|include|instead(?: of)?|let|move|no|now|otherwise|repeat|report|resume the story|rule for|running through|say(?:ing)?|stop the action|test|try(?:ing)?|understand|unless|use|when|while|yes)\b(?!-)/i,lookbehind:!0},property:{pattern:/(^|[^-])\b(?:adjacent(?! to)|carried|closed|concealed|contained|dark|described|edible|empty|enclosed|enterable|even|female|fixed in place|full|handled|held|improper-named|incorporated|inedible|invisible|lighted|lit|lock(?:able|ed)|male|marked for listing|mentioned|negative|neuter|non-(?:empty|full|recurring)|odd|opaque|open(?:able)?|plural-named|portable|positive|privately-named|proper-named|provided|publically-named|pushable between rooms|recurring|related|rubbing|scenery|seen|singular-named|supported|swinging|switch(?:able|ed(?: off| on)?)|touch(?:able|ed)|transparent|unconcealed|undescribed|unlit|unlocked|unmarked for listing|unmentioned|unopenable|untouchable|unvisited|variable|visible|visited|wearable|worn)\b(?!-)/i,lookbehind:!0,alias:"symbol"},position:{pattern:/(^|[^-])\b(?:above|adjacent to|back side of|below|between|down|east|everywhere|front side|here|in|inside(?: from)?|north(?:east|west)?|nowhere|on(?: top of)?|other side|outside(?: from)?|parts? of|regionally in|south(?:east|west)?|through|up|west|within)\b(?!-)/i,lookbehind:!0,alias:"keyword"},type:{pattern:/(^|[^-])\b(?:actions?|activit(?:ies|y)|actors?|animals?|backdrops?|containers?|devices?|directions?|doors?|holders?|kinds?|lists?|m[ae]n|nobody|nothing|nouns?|numbers?|objects?|people|persons?|player(?:'s holdall)?|regions?|relations?|rooms?|rule(?:book)?s?|scenes?|someone|something|supporters?|tables?|texts?|things?|time|vehicles?|wom[ae]n)\b(?!-)/i,lookbehind:!0,alias:"variable"},punctuation:/[.,:;(){}]/},e.languages.inform7.string.inside.substitution.inside.rest=e.languages.inform7,e.languages.inform7.string.inside.substitution.inside.rest.text={pattern:/\S(?:\s*\S)*/,alias:"comment"}}return que}var Gue,FNe;function Rbr(){if(FNe)return Gue;FNe=1,Gue=t,t.displayName="ini",t.aliases=[];function t(e){e.languages.ini={comment:{pattern:/(^[ \f\t\v]*)[#;][^\n\r]*/m,lookbehind:!0},section:{pattern:/(^[ \f\t\v]*)\[[^\n\r\]]*\]?/m,lookbehind:!0,inside:{"section-name":{pattern:/(^\[[ \f\t\v]*)[^ \f\t\v\]]+(?:[ \f\t\v]+[^ \f\t\v\]]+)*/,lookbehind:!0,alias:"selector"},punctuation:/\[|\]/}},key:{pattern:/(^[ \f\t\v]*)[^ \f\n\r\t\v=]+(?:[ \f\t\v]+[^ \f\n\r\t\v=]+)*(?=[ \f\t\v]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/(=[ \f\t\v]*)[^ \f\n\r\t\v]+(?:[ \f\t\v]+[^ \f\n\r\t\v]+)*/,lookbehind:!0,alias:"attr-value",inside:{"inner-value":{pattern:/^("|').+(?=\1$)/,lookbehind:!0}}},punctuation:/=/}}return Gue}var $ue,zNe;function kbr(){if(zNe)return $ue;zNe=1,$ue=t,t.displayName="io",t.aliases=[];function t(e){e.languages.io={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?(?:\*\/|$)|\/\/.*|#.*)/,lookbehind:!0,greedy:!0},"triple-quoted-string":{pattern:/"""(?:\\[\s\S]|(?!""")[^\\])*"""/,greedy:!0,alias:"string"},string:{pattern:/"(?:\\.|[^\\\r\n"])*"/,greedy:!0},keyword:/\b(?:activate|activeCoroCount|asString|block|break|call|catch|clone|collectGarbage|compileString|continue|do|doFile|doMessage|doString|else|elseif|exit|for|foreach|forward|getEnvironmentVariable|getSlot|hasSlot|if|ifFalse|ifNil|ifNilEval|ifTrue|isActive|isNil|isResumable|list|message|method|parent|pass|pause|perform|performWithArgList|print|println|proto|raise|raiseResumable|removeSlot|resend|resume|schedulerSleepSeconds|self|sender|setSchedulerSleepSeconds|setSlot|shallowCopy|slotNames|super|system|then|thisBlock|thisContext|try|type|uniqueId|updateSlot|wait|while|write|yield)\b/,builtin:/\b(?:Array|AudioDevice|AudioMixer|BigNum|Block|Box|Buffer|CFunction|CGI|Color|Curses|DBM|DNSResolver|DOConnection|DOProxy|DOServer|Date|Directory|Duration|DynLib|Error|Exception|FFT|File|Fnmatch|Font|Future|GL|GLE|GLScissor|GLU|GLUCylinder|GLUQuadric|GLUSphere|GLUT|Host|Image|Importer|LinkList|List|Lobby|Locals|MD5|MP3Decoder|MP3Encoder|Map|Message|Movie|Notification|Number|Object|OpenGL|Point|Protos|Random|Regex|SGML|SGMLElement|SGMLParser|SQLite|Sequence|Server|ShowMessage|SleepyCat|SleepyCatCursor|Socket|SocketManager|Sound|Soup|Store|String|Tree|UDPSender|UPDReceiver|URL|User|Warning|WeakLink)\b/,boolean:/\b(?:false|nil|true)\b/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e-?\d+)?/i,operator:/[=!*/%+\-^&|]=|>>?=?|<<?=?|:?:?=|\+\+?|--?|\*\*?|\/\/?|%|\|\|?|&&?|\b(?:and|not|or|return)\b|@@?|\?\??|\.\./,punctuation:/[{}[\];(),.:]/}}return $ue}var Wue,BNe;function Ibr(){if(BNe)return Wue;BNe=1,Wue=t,t.displayName="j",t.aliases=[];function t(e){e.languages.j={comment:{pattern:/\bNB\..*/,greedy:!0},string:{pattern:/'(?:''|[^'\r\n])*'/,greedy:!0},keyword:/\b(?:(?:CR|LF|adverb|conjunction|def|define|dyad|monad|noun|verb)\b|(?:assert|break|case|catch[dt]?|continue|do|else|elseif|end|fcase|for|for_\w+|goto_\w+|if|label_\w+|return|select|throw|try|while|whilst)\.)/,verb:{pattern:/(?!\^:|;\.|[=!][.:])(?:\{(?:\.|::?)?|p(?:\.\.?|:)|[=!\]]|[<>+*\-%$|,#][.:]?|[?^]\.?|[;\[]:?|[~}"i][.:]|[ACeEIjLor]\.|(?:[_\/\\qsux]|_?\d):)/,alias:"keyword"},number:/\b_?(?:(?!\d:)\d+(?:\.\d+)?(?:(?:ad|ar|[ejpx])_?\d+(?:\.\d+)?)*(?:b_?[\da-z]+(?:\.[\da-z]+)?)?|_\b(?!\.))/,adverb:{pattern:/[~}]|[\/\\]\.?|[bfM]\.|t[.:]/,alias:"builtin"},operator:/[=a][.:]|_\./,conjunction:{pattern:/&(?:\.:?|:)?|[.:@][.:]?|[!D][.:]|[;dHT]\.|`:?|[\^LS]:|"/,alias:"variable"},punctuation:/[()]/}}return Wue}var Yue,UNe;function pbe(){if(UNe)return Yue;UNe=1,Yue=t,t.displayName="java",t.aliases=[];function t(e){(function(r){var n=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,i=/(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,a={pattern:RegExp(i+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};r.languages.java=r.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[a,{pattern:RegExp(i+/[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source),lookbehind:!0,inside:a.inside}],keyword:n,function:[r.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0}}),r.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),r.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":a,keyword:n,punctuation:/[<>(),.:]/,operator:/[?&|]/}},namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return n.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(e)}return Yue}var Xue,HNe;function FZ(){if(HNe)return Xue;HNe=1,Xue=t,t.displayName="javadoclike",t.aliases=[];function t(e){(function(r){var n=r.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};function i(o,s){var d="doc-comment",b=r.languages[o];if(b){var L=b[d];if(!L){var B={};B[d]={pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"},b=r.languages.insertBefore(o,"comment",B),L=b[d]}if(L instanceof RegExp&&(L=b[d]={pattern:L}),Array.isArray(L))for(var V=0,X=L.length;V<X;V++)L[V]instanceof RegExp&&(L[V]={pattern:L[V]}),s(L[V]);else s(L)}}function a(o,s){typeof o=="string"&&(o=[o]),o.forEach(function(d){i(d,function(b){b.inside||(b.inside={}),b.inside.rest=s})})}Object.defineProperty(n,"addSupport",{value:a}),n.addSupport(["java","javascript","php"],n)})(e)}return Xue}var Zue,jNe;function Pbr(){if(jNe)return Zue;jNe=1;var t=pbe(),e=FZ();Zue=r,r.displayName="javadoc",r.aliases=[];function r(n){n.register(t),n.register(e),(function(i){var a=/(^(?:[\t ]*(?:\*\s*)*))[^*\s].*$/m,o=/#\s*\w+(?:\s*\([^()]*\))?/.source,s=/(?:\b[a-zA-Z]\w+\s*\.\s*)*\b[A-Z]\w*(?:\s*<mem>)?|<mem>/.source.replace(/<mem>/g,function(){return o});i.languages.javadoc=i.languages.extend("javadoclike",{}),i.languages.insertBefore("javadoc","keyword",{reference:{pattern:RegExp(/(@(?:exception|link|linkplain|see|throws|value)\s+(?:\*\s*)?)/.source+"(?:"+s+")"),lookbehind:!0,inside:{function:{pattern:/(#\s*)\w+(?=\s*\()/,lookbehind:!0},field:{pattern:/(#\s*)\w+/,lookbehind:!0},namespace:{pattern:/\b(?:[a-z]\w*\s*\.\s*)+/,inside:{punctuation:/\./}},"class-name":/\b[A-Z]\w*/,keyword:i.languages.java.keyword,punctuation:/[#()[\],.]/}},"class-name":{pattern:/(@param\s+)<[A-Z]\w*>/,lookbehind:!0,inside:{punctuation:/[.<>]/}},"code-section":[{pattern:/(\{@code\s+(?!\s))(?:[^\s{}]|\s+(?![\s}])|\{(?:[^{}]|\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})*\})+(?=\s*\})/,lookbehind:!0,inside:{code:{pattern:a,lookbehind:!0,inside:i.languages.java,alias:"language-java"}}},{pattern:/(<(code|pre|tt)>(?!<code>)\s*)\S(?:\S|\s+\S)*?(?=\s*<\/\2>)/,lookbehind:!0,inside:{line:{pattern:a,lookbehind:!0,inside:{tag:i.languages.markup.tag,entity:i.languages.markup.entity,code:{pattern:/.+/,inside:i.languages.java,alias:"language-java"}}}}}],tag:i.languages.markup.tag,entity:i.languages.markup.entity}),i.languages.javadoclike.addSupport("java",i.languages.javadoc)})(n)}return Zue}var Kue,VNe;function Dbr(){if(VNe)return Kue;VNe=1,Kue=t,t.displayName="javastacktrace",t.aliases=[];function t(e){e.languages.javastacktrace={summary:{pattern:/^([\t ]*)(?:(?:Caused by:|Suppressed:|Exception in thread "[^"]*")[\t ]+)?[\w$.]+(?::.*)?$/m,lookbehind:!0,inside:{keyword:{pattern:/^([\t ]*)(?:(?:Caused by|Suppressed)(?=:)|Exception in thread)/m,lookbehind:!0},string:{pattern:/^(\s*)"[^"]*"/,lookbehind:!0},exceptions:{pattern:/^(:?\s*)[\w$.]+(?=:|$)/,lookbehind:!0,inside:{"class-name":/[\w$]+$/,namespace:/\b[a-z]\w*\b/,punctuation:/\./}},message:{pattern:/(:\s*)\S.*/,lookbehind:!0,alias:"string"},punctuation:/:/}},"stack-frame":{pattern:/^([\t ]*)at (?:[\w$./]|@[\w$.+-]*\/)+(?:<init>)?\([^()]*\)/m,lookbehind:!0,inside:{keyword:{pattern:/^(\s*)at(?= )/,lookbehind:!0},source:[{pattern:/(\()\w+\.\w+:\d+(?=\))/,lookbehind:!0,inside:{file:/^\w+\.\w+/,punctuation:/:/,"line-number":{pattern:/\b\d+\b/,alias:"number"}}},{pattern:/(\()[^()]*(?=\))/,lookbehind:!0,inside:{keyword:/^(?:Native Method|Unknown Source)$/}}],"class-name":/[\w$]+(?=\.(?:<init>|[\w$]+)\()/,function:/(?:<init>|[\w$]+)(?=\()/,"class-loader":{pattern:/(\s)[a-z]\w*(?:\.[a-z]\w*)*(?=\/[\w@$.]*\/)/,lookbehind:!0,alias:"namespace",inside:{punctuation:/\./}},module:{pattern:/([\s/])[a-z]\w*(?:\.[a-z]\w*)*(?:@[\w$.+-]*)?(?=\/)/,lookbehind:!0,inside:{version:{pattern:/(@)[\s\S]+/,lookbehind:!0,alias:"number"},punctuation:/[@.]/}},namespace:{pattern:/(?:\b[a-z]\w*\.)+/,inside:{punctuation:/\./}},punctuation:/[()/.]/}},more:{pattern:/^([\t ]*)\.{3} \d+ [a-z]+(?: [a-z]+)*/m,lookbehind:!0,inside:{punctuation:/\.{3}/,number:/\d+/,keyword:/\b[a-z]+(?: [a-z]+)*\b/}}}}return Kue}var Jue,qNe;function Lbr(){if(qNe)return Jue;qNe=1,Jue=t,t.displayName="jexl",t.aliases=[];function t(e){e.languages.jexl={string:/(["'])(?:\\[\s\S]|(?!\1)[^\\])*\1/,transform:{pattern:/(\|\s*)[a-zA-Zа-яА-Я_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$][\wа-яА-Я\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$]*/,alias:"function",lookbehind:!0},function:/[a-zA-Zа-яА-Я_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$][\wа-яА-Я\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$]*\s*(?=\()/,number:/\b\d+(?:\.\d+)?\b|\B\.\d+\b/,operator:/[<>!]=?|-|\+|&&|==|\|\|?|\/\/?|[?:*^%]/,boolean:/\b(?:false|true)\b/,keyword:/\bin\b/,punctuation:/[{}[\](),.]/}}return Jue}var Que,GNe;function Obr(){if(GNe)return Que;GNe=1,Que=t,t.displayName="jolie",t.aliases=[];function t(e){e.languages.jolie=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\[\s\S]|[^"\\])*"/,lookbehind:!0,greedy:!0},"class-name":{pattern:/((?:\b(?:as|courier|embed|in|inputPort|outputPort|service)\b|@)[ \t]*)\w+/,lookbehind:!0},keyword:/\b(?:as|cH|comp|concurrent|constants|courier|cset|csets|default|define|else|embed|embedded|execution|exit|extender|for|foreach|forward|from|global|if|import|in|include|init|inputPort|install|instanceof|interface|is_defined|linkIn|linkOut|main|new|nullProcess|outputPort|over|private|provide|public|scope|sequential|service|single|spawn|synchronized|this|throw|throws|type|undef|until|while|with)\b/,function:/\b[a-z_]\w*(?=[ \t]*[@(])/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?l?/i,operator:/-[-=>]?|\+[+=]?|<[<=]?|[>=*!]=?|&&|\|\||[?\/%^@|]/,punctuation:/[()[\]{},;.:]/,builtin:/\b(?:Byte|any|bool|char|double|enum|float|int|length|long|ranges|regex|string|undefined|void)\b/}),e.languages.insertBefore("jolie","keyword",{aggregates:{pattern:/(\bAggregates\s*:\s*)(?:\w+(?:\s+with\s+\w+)?\s*,\s*)*\w+(?:\s+with\s+\w+)?/,lookbehind:!0,inside:{keyword:/\bwith\b/,"class-name":/\w+/,punctuation:/,/}},redirects:{pattern:/(\bRedirects\s*:\s*)(?:\w+\s*=>\s*\w+\s*,\s*)*(?:\w+\s*=>\s*\w+)/,lookbehind:!0,inside:{punctuation:/,/,"class-name":/\w+/,operator:/=>/}},property:{pattern:/\b(?:Aggregates|[Ii]nterfaces|Java|Javascript|Jolie|[Ll]ocation|OneWay|[Pp]rotocol|Redirects|RequestResponse)\b(?=[ \t]*:)/}})}return Que}var ece,$Ne;function Nbr(){if($Ne)return ece;$Ne=1,ece=t,t.displayName="jq",t.aliases=[];function t(e){(function(r){var n=/\\\((?:[^()]|\([^()]*\))*\)/.source,i=RegExp(/(^|[^\\])"(?:[^"\r\n\\]|\\[^\r\n(]|__)*"/.source.replace(/__/g,function(){return n})),a={interpolation:{pattern:RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+n),lookbehind:!0,inside:{content:{pattern:/^(\\\()[\s\S]+(?=\)$)/,lookbehind:!0,inside:null},punctuation:/^\\\(|\)$/}}},o=r.languages.jq={comment:/#.*/,property:{pattern:RegExp(i.source+/(?=\s*:(?!:))/.source),lookbehind:!0,greedy:!0,inside:a},string:{pattern:i,lookbehind:!0,greedy:!0,inside:a},function:{pattern:/(\bdef\s+)[a-z_]\w+/i,lookbehind:!0},variable:/\B\$\w+/,"property-literal":{pattern:/\b[a-z_]\w*(?=\s*:(?!:))/i,alias:"property"},keyword:/\b(?:as|break|catch|def|elif|else|end|foreach|if|import|include|label|module|modulemeta|null|reduce|then|try|while)\b/,boolean:/\b(?:false|true)\b/,number:/(?:\b\d+\.|\B\.)?\b\d+(?:[eE][+-]?\d+)?\b/,operator:[{pattern:/\|=?/,alias:"pipe"},/\.\.|[!=<>]?=|\?\/\/|\/\/=?|[-+*/%]=?|[<>?]|\b(?:and|not|or)\b/],"c-style-function":{pattern:/\b[a-z_]\w*(?=\s*\()/i,alias:"function"},punctuation:/::|[()\[\]{},:;]|\.(?=\s*[\[\w$])/,dot:{pattern:/\./,alias:"important"}};a.interpolation.inside.content.inside=o})(e)}return ece}var tce,WNe;function Fbr(){if(WNe)return tce;WNe=1,tce=t,t.displayName="jsExtras",t.aliases=[];function t(e){(function(r){r.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+r.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),r.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+r.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),r.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]});function n(b,L){return RegExp(b.replace(/<ID>/g,function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source}),L)}r.languages.insertBefore("javascript","keyword",{imports:{pattern:n(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:r.languages.javascript},exports:{pattern:n(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:r.languages.javascript}}),r.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),r.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),r.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:n(/(\.\s*)#?<ID>/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var i=["function","function-variable","method","method-variable","property-access"],a=0;a<i.length;a++){var o=i[a],s=r.languages.javascript[o];r.util.type(s)==="RegExp"&&(s=r.languages.javascript[o]={pattern:s});var d=s.inside||{};s.inside=d,d["maybe-class-name"]=/^[A-Z][\s\S]*/}})(e)}return tce}var rce,YNe;function zbr(){if(YNe)return rce;YNe=1,rce=t,t.displayName="jsTemplates",t.aliases=[];function t(e){(function(r){var n=r.languages.javascript["template-string"],i=n.pattern.source,a=n.inside.interpolation,o=a.inside["interpolation-punctuation"],s=a.pattern.source;function d(de,ae){if(r.languages[de])return{pattern:RegExp("((?:"+ae+")\\s*)"+i),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:de}}}}r.languages.javascript["template-string"]=[d("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),d("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),d("svg",/\bsvg/.source),d("markdown",/\b(?:markdown|md)/.source),d("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),d("sql",/\bsql/.source),n].filter(Boolean);function b(de,ae){return"___"+ae.toUpperCase()+"_"+de+"___"}function L(de,ae,U){var ve={code:de,grammar:ae,language:U};return r.hooks.run("before-tokenize",ve),ve.tokens=r.tokenize(ve.code,ve.grammar),r.hooks.run("after-tokenize",ve),ve.tokens}function B(de){var ae={};ae["interpolation-punctuation"]=o;var U=r.tokenize(de,ae);if(U.length===3){var ve=[1,1];ve.push.apply(ve,L(U[1],r.languages.javascript,"javascript")),U.splice.apply(U,ve)}return new r.Token("interpolation",U,a.alias,de)}function V(de,ae,U){var ve=r.tokenize(de,{interpolation:{pattern:RegExp(s),lookbehind:!0}}),Se=0,Pe={},Me=ve.map(function(Je){if(typeof Je=="string")return Je;for(var nt=Je.content,ut;de.indexOf(ut=b(Se++,U))!==-1;);return Pe[ut]=nt,ut}).join(""),Ie=L(Me,ae,U),Ve=Object.keys(Pe);Se=0;function Ze(Je){for(var nt=0;nt<Je.length;nt++){if(Se>=Ve.length)return;var ut=Je[nt];if(typeof ut=="string"||typeof ut.content=="string"){var ht=Ve[Se],_t=typeof ut=="string"?ut:ut.content,Dt=_t.indexOf(ht);if(Dt!==-1){++Se;var qt=_t.substring(0,Dt),Lt=B(Pe[ht]),dr=_t.substring(Dt+ht.length),Zt=[];if(qt&&Zt.push(qt),Zt.push(Lt),dr){var Cr=[dr];Ze(Cr),Zt.push.apply(Zt,Cr)}typeof ut=="string"?(Je.splice.apply(Je,[nt,1].concat(Zt)),nt+=Zt.length-1):ut.content=Zt}}else{var yt=ut.content;Array.isArray(yt)?Ze(yt):Ze([yt])}}}return Ze(Ie),new r.Token(U,Ie,"language-"+U,de)}var X={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};r.hooks.add("after-tokenize",function(de){if(!(de.language in X))return;function ae(U){for(var ve=0,Se=U.length;ve<Se;ve++){var Pe=U[ve];if(typeof Pe!="string"){var Me=Pe.content;if(!Array.isArray(Me)){typeof Me!="string"&&ae([Me]);continue}if(Pe.type==="template-string"){var Ie=Me[1];if(Me.length===3&&typeof Ie!="string"&&Ie.type==="embedded-code"){var Ve=ie(Ie),Ze=Ie.alias,Je=Array.isArray(Ze)?Ze[0]:Ze,nt=r.languages[Je];if(!nt)continue;Me[1]=V(Ve,nt,Je)}}else ae(Me)}}}ae(de.tokens)});function ie(de){return typeof de=="string"?de:Array.isArray(de)?de.map(ie).join(""):ie(de.content)}})(e)}return rce}var nce,XNe;function vbe(){if(XNe)return nce;XNe=1,nce=t,t.displayName="typescript",t.aliases=["ts"];function t(e){(function(r){r.languages.typescript=r.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),r.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete r.languages.typescript.parameter,delete r.languages.typescript["literal-property"];var n=r.languages.extend("typescript",{});delete n["class-name"],r.languages.typescript["class-name"].inside=n,r.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:n}}}}),r.languages.ts=r.languages.typescript})(e)}return nce}var ice,ZNe;function Bbr(){if(ZNe)return ice;ZNe=1;var t=FZ(),e=vbe();ice=r,r.displayName="jsdoc",r.aliases=[];function r(n){n.register(t),n.register(e),(function(i){var a=i.languages.javascript,o=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,s="(@(?:arg|argument|param|property)\\s+(?:"+o+"\\s+)?)";i.languages.jsdoc=i.languages.extend("javadoclike",{parameter:{pattern:RegExp(s+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),i.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(s+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:a,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(/<TYPE>/g,function(){return o})),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+o),lookbehind:!0,inside:{string:a.string,number:a.number,boolean:a.boolean,keyword:i.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:a,alias:"language-javascript"}}}}),i.languages.javadoclike.addSupport("javascript",i.languages.jsdoc)})(n)}return ice}var ace,KNe;function mbe(){if(KNe)return ace;KNe=1,ace=t,t.displayName="json",t.aliases=["webmanifest"];function t(e){e.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},e.languages.webmanifest=e.languages.json}return ace}var oce,JNe;function Ubr(){if(JNe)return oce;JNe=1;var t=mbe();oce=e,e.displayName="json5",e.aliases=[];function e(r){r.register(t),(function(n){var i=/("|')(?:\\(?:\r\n?|\n|.)|(?!\1)[^\\\r\n])*\1/;n.languages.json5=n.languages.extend("json",{property:[{pattern:RegExp(i.source+"(?=\\s*:)"),greedy:!0},{pattern:/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/,alias:"unquoted"}],string:{pattern:i,greedy:!0},number:/[+-]?\b(?:NaN|Infinity|0x[a-fA-F\d]+)\b|[+-]?(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+\b)?/})})(r)}return oce}var sce,QNe;function Hbr(){if(QNe)return sce;QNe=1;var t=mbe();sce=e,e.displayName="jsonp",e.aliases=[];function e(r){r.register(t),r.languages.jsonp=r.languages.extend("json",{punctuation:/[{}[\]();,.]/}),r.languages.insertBefore("jsonp","punctuation",{function:/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*\()/})}return sce}var lce,e8e;function jbr(){if(e8e)return lce;e8e=1,lce=t,t.displayName="jsstacktrace",t.aliases=[];function t(e){e.languages.jsstacktrace={"error-message":{pattern:/^\S.*/m,alias:"string"},"stack-frame":{pattern:/(^[ \t]+)at[ \t].*/m,lookbehind:!0,inside:{"not-my-code":{pattern:/^at[ \t]+(?!\s)(?:node\.js|<unknown>|.*(?:node_modules|\(<anonymous>\)|\(<unknown>|<anonymous>$|\(internal\/|\(node\.js)).*/m,alias:"comment"},filename:{pattern:/(\bat\s+(?!\s)|\()(?:[a-zA-Z]:)?[^():]+(?=:)/,lookbehind:!0,alias:"url"},function:{pattern:/(\bat\s+(?:new\s+)?)(?!\s)[_$a-zA-Z\xA0-\uFFFF<][.$\w\xA0-\uFFFF<>]*/,lookbehind:!0,inside:{punctuation:/\./}},punctuation:/[()]/,keyword:/\b(?:at|new)\b/,alias:{pattern:/\[(?:as\s+)?(?!\s)[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\]/,alias:"variable"},"line-number":{pattern:/:\d+(?::\d+)?\b/,alias:"number",inside:{punctuation:/:/}}}}}}return lce}var uce,t8e;function lKe(){if(t8e)return uce;t8e=1,uce=t,t.displayName="jsx",t.aliases=[];function t(e){(function(r){var n=r.util.clone(r.languages.javascript),i=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,a=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,o=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function s(L,B){return L=L.replace(/<S>/g,function(){return i}).replace(/<BRACES>/g,function(){return a}).replace(/<SPREAD>/g,function(){return o}),RegExp(L,B)}o=s(o).source,r.languages.jsx=r.languages.extend("markup",n),r.languages.jsx.tag.pattern=s(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),r.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,r.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,r.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,r.languages.jsx.tag.inside.comment=n.comment,r.languages.insertBefore("inside","attr-name",{spread:{pattern:s(/<SPREAD>/.source),inside:r.languages.jsx}},r.languages.jsx.tag),r.languages.insertBefore("inside","special-attr",{script:{pattern:s(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:r.languages.jsx}}},r.languages.jsx.tag);var d=function(L){return L?typeof L=="string"?L:typeof L.content=="string"?L.content:L.content.map(d).join(""):""},b=function(L){for(var B=[],V=0;V<L.length;V++){var X=L[V],ie=!1;if(typeof X!="string"&&(X.type==="tag"&&X.content[0]&&X.content[0].type==="tag"?X.content[0].content[0].content==="</"?B.length>0&&B[B.length-1].tagName===d(X.content[0].content[1])&&B.pop():X.content[X.content.length-1].content==="/>"||B.push({tagName:d(X.content[0].content[1]),openedBraces:0}):B.length>0&&X.type==="punctuation"&&X.content==="{"?B[B.length-1].openedBraces++:B.length>0&&B[B.length-1].openedBraces>0&&X.type==="punctuation"&&X.content==="}"?B[B.length-1].openedBraces--:ie=!0),(ie||typeof X=="string")&&B.length>0&&B[B.length-1].openedBraces===0){var de=d(X);V<L.length-1&&(typeof L[V+1]=="string"||L[V+1].type==="plain-text")&&(de+=d(L[V+1]),L.splice(V+1,1)),V>0&&(typeof L[V-1]=="string"||L[V-1].type==="plain-text")&&(de=d(L[V-1])+de,L.splice(V-1,1),V--),L[V]=new r.Token("plain-text",de,null,de)}X.content&&typeof X.content!="string"&&b(X.content)}};r.hooks.add("after-tokenize",function(L){L.language!=="jsx"&&L.language!=="tsx"||b(L.tokens)})})(e)}return uce}var cce,r8e;function Vbr(){if(r8e)return cce;r8e=1,cce=t,t.displayName="julia",t.aliases=[];function t(e){e.languages.julia={comment:{pattern:/(^|[^\\])(?:#=(?:[^#=]|=(?!#)|#(?!=)|#=(?:[^#=]|=(?!#)|#(?!=))*=#)*=#|#.*)/,lookbehind:!0},regex:{pattern:/r"(?:\\.|[^"\\\r\n])*"[imsx]{0,4}/,greedy:!0},string:{pattern:/"""[\s\S]+?"""|(?:\b\w+)?"(?:\\.|[^"\\\r\n])*"|`(?:[^\\`\r\n]|\\.)*`/,greedy:!0},char:{pattern:/(^|[^\w'])'(?:\\[^\r\n][^'\r\n]*|[^\\\r\n])'/,lookbehind:!0,greedy:!0},keyword:/\b(?:abstract|baremodule|begin|bitstype|break|catch|ccall|const|continue|do|else|elseif|end|export|finally|for|function|global|if|immutable|import|importall|in|let|local|macro|module|print|println|quote|return|struct|try|type|typealias|using|while)\b/,boolean:/\b(?:false|true)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[box])?(?:[\da-f]+(?:_[\da-f]+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[efp][+-]?\d+(?:_\d+)*)?j?/i,operator:/&&|\|\||[-+*^%÷⊻&$\\]=?|\/[\/=]?|!=?=?|\|[=>]?|<(?:<=?|[=:|])?|>(?:=|>>?=?)?|==?=?|[~≠≤≥'√∛]/,punctuation:/::?|[{}[\]();,.?]/,constant:/\b(?:(?:Inf|NaN)(?:16|32|64)?|im|pi)\b|[πℯ]/}}return cce}var fce,n8e;function qbr(){if(n8e)return fce;n8e=1,fce=t,t.displayName="keepalived",t.aliases=[];function t(e){e.languages.keepalived={comment:{pattern:/[#!].*/,greedy:!0},string:{pattern:/(^|[^\\])(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,lookbehind:!0,greedy:!0},ip:{pattern:RegExp(/\b(?:(?:(?:[\da-f]{1,4}:){7}[\da-f]{1,4}|(?:[\da-f]{1,4}:){6}:[\da-f]{1,4}|(?:[\da-f]{1,4}:){5}:(?:[\da-f]{1,4}:)?[\da-f]{1,4}|(?:[\da-f]{1,4}:){4}:(?:[\da-f]{1,4}:){0,2}[\da-f]{1,4}|(?:[\da-f]{1,4}:){3}:(?:[\da-f]{1,4}:){0,3}[\da-f]{1,4}|(?:[\da-f]{1,4}:){2}:(?:[\da-f]{1,4}:){0,4}[\da-f]{1,4}|(?:[\da-f]{1,4}:){6}<ipv4>|(?:[\da-f]{1,4}:){0,5}:<ipv4>|::(?:[\da-f]{1,4}:){0,5}<ipv4>|[\da-f]{1,4}::(?:[\da-f]{1,4}:){0,5}[\da-f]{1,4}|::(?:[\da-f]{1,4}:){0,6}[\da-f]{1,4}|(?:[\da-f]{1,4}:){1,7}:)(?:\/\d{1,3})?|<ipv4>(?:\/\d{1,2})?)\b/.source.replace(/<ipv4>/g,function(){return/(?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d))/.source}),"i"),alias:"number"},path:{pattern:/(\s)\/(?:[^\/\s]+\/)*[^\/\s]*|\b[a-zA-Z]:\\(?:[^\\\s]+\\)*[^\\\s]*/,lookbehind:!0,alias:"string"},variable:/\$\{?\w+\}?/,email:{pattern:/[\w-]+@[\w-]+(?:\.[\w-]{2,3}){1,2}/,alias:"string"},"conditional-configuration":{pattern:/@\^?[\w-]+/,alias:"variable"},operator:/=/,property:/\b(?:BFD_CHECK|DNS_CHECK|FILE_CHECK|HTTP_GET|MISC_CHECK|NAME|PING_CHECK|SCRIPTS|SMTP_CHECK|SSL|SSL_GET|TCP_CHECK|UDP_CHECK|accept|advert_int|alpha|auth_pass|auth_type|authentication|bfd_cpu_affinity|bfd_instance|bfd_no_swap|bfd_priority|bfd_process_name|bfd_rlimit_rttime|bfd_rt_priority|bind_if|bind_port|bindto|ca|certificate|check_unicast_src|checker|checker_cpu_affinity|checker_log_all_failures|checker_no_swap|checker_priority|checker_rlimit_rttime|checker_rt_priority|child_wait_time|connect_ip|connect_port|connect_timeout|dbus_service_name|debug|default_interface|delay|delay_before_retry|delay_loop|digest|dont_track_primary|dynamic|dynamic_interfaces|enable_(?:dbus|script_security|sni|snmp_checker|snmp_rfc|snmp_rfcv2|snmp_rfcv3|snmp_vrrp|traps)|end|fall|fast_recovery|file|flag-[123]|fork_delay|full_command|fwmark|garp_group|garp_interval|garp_lower_prio_delay|garp_lower_prio_repeat|garp_master_delay|garp_master_refresh|garp_master_refresh_repeat|garp_master_repeat|global_defs|global_tracking|gna_interval|group|ha_suspend|hashed|helo_name|higher_prio_send_advert|hoplimit|http_protocol|hysteresis|idle_tx|include|inhibit_on_failure|init_fail|init_file|instance|interface|interfaces|interval|ip_family|ipvs_process_name|keepalived.conf|kernel_rx_buf_size|key|linkbeat_interfaces|linkbeat_use_polling|log_all_failures|log_unknown_vrids|lower_prio_no_advert|lthreshold|lvs_flush|lvs_flush_onstop|lvs_method|lvs_netlink_cmd_rcv_bufs|lvs_netlink_cmd_rcv_bufs_force|lvs_netlink_monitor_rcv_bufs|lvs_netlink_monitor_rcv_bufs_force|lvs_notify_fifo|lvs_notify_fifo_script|lvs_sched|lvs_sync_daemon|max_auto_priority|max_hops|mcast_src_ip|mh-fallback|mh-port|min_auto_priority_delay|min_rx|min_tx|misc_dynamic|misc_path|misc_timeout|multiplier|name|namespace_with_ipsets|native_ipv6|neighbor_ip|net_namespace|net_namespace_ipvs|nftables|nftables_counters|nftables_ifindex|nftables_priority|no_accept|no_checker_emails|no_email_faults|nopreempt|notification_email|notification_email_from|notify|notify_backup|notify_deleted|notify_down|notify_fault|notify_fifo|notify_fifo_script|notify_master|notify_master_rx_lower_pri|notify_priority_changes|notify_stop|notify_up|old_unicast_checksum|omega|ops|param_match|passive|password|path|persistence_engine|persistence_granularity|persistence_timeout|preempt|preempt_delay|priority|process|process_monitor_rcv_bufs|process_monitor_rcv_bufs_force|process_name|process_names|promote_secondaries|protocol|proxy_arp|proxy_arp_pvlan|quorum|quorum_down|quorum_max|quorum_up|random_seed|real_server|regex|regex_max_offset|regex_min_offset|regex_no_match|regex_options|regex_stack|reload_repeat|reload_time_file|require_reply|retry|rise|router_id|rs_init_notifies|script|script_user|sh-fallback|sh-port|shutdown_script|shutdown_script_timeout|skip_check_adv_addr|smtp_alert|smtp_alert_checker|smtp_alert_vrrp|smtp_connect_timeout|smtp_helo_name|smtp_server|snmp_socket|sorry_server|sorry_server_inhibit|sorry_server_lvs_method|source_ip|start|startup_script|startup_script_timeout|state|static_ipaddress|static_routes|static_rules|status_code|step|strict_mode|sync_group_tracking_weight|terminate_delay|timeout|track_bfd|track_file|track_group|track_interface|track_process|track_script|track_src_ip|ttl|type|umask|unicast_peer|unicast_src_ip|unicast_ttl|url|use_ipvlan|use_pid_dir|use_vmac|user|uthreshold|val[123]|version|virtual_ipaddress|virtual_ipaddress_excluded|virtual_router_id|virtual_routes|virtual_rules|virtual_server|virtual_server_group|virtualhost|vmac_xmit_base|vrrp|vrrp_(?:check_unicast_src|cpu_affinity|garp_interval|garp_lower_prio_delay|garp_lower_prio_repeat|garp_master_delay|garp_master_refresh|garp_master_refresh_repeat|garp_master_repeat|gna_interval|higher_prio_send_advert|instance|ipsets|iptables|lower_prio_no_advert|mcast_group4|mcast_group6|min_garp|netlink_cmd_rcv_bufs|netlink_cmd_rcv_bufs_force|netlink_monitor_rcv_bufs|netlink_monitor_rcv_bufs_force|no_swap|notify_fifo|notify_fifo_script|notify_priority_changes|priority|process_name|rlimit_rttime|rt_priority|rx_bufs_multiplier|rx_bufs_policy|script|skip_check_adv_addr|startup_delay|strict|sync_group|track_process|version)|warmup|weight)\b/,constant:/\b(?:A|AAAA|AH|BACKUP|CNAME|DR|MASTER|MX|NAT|NS|PASS|SCTP|SOA|TCP|TUN|TXT|UDP|dh|fo|lblc|lblcr|lc|mh|nq|ovf|rr|sed|sh|wlc|wrr)\b/,number:{pattern:/(^|[^\w.-])-?\d+(?:\.\d+)?/,lookbehind:!0},boolean:/\b(?:false|no|off|on|true|yes)\b/,punctuation:/[\{\}]/}}return fce}var dce,i8e;function Gbr(){if(i8e)return dce;i8e=1,dce=t,t.displayName="keyman",t.aliases=[];function t(e){e.languages.keyman={comment:{pattern:/\bc .*/i,greedy:!0},string:{pattern:/"[^"\r\n]*"|'[^'\r\n]*'/,greedy:!0},"virtual-key":{pattern:/\[\s*(?:(?:ALT|CAPS|CTRL|LALT|LCTRL|NCAPS|RALT|RCTRL|SHIFT)\s+)*(?:[TKU]_[\w?]+|[A-E]\d\d?|"[^"\r\n]*"|'[^'\r\n]*')\s*\]/i,greedy:!0,alias:"function"},"header-keyword":{pattern:/&\w+/,alias:"bold"},"header-statement":{pattern:/\b(?:bitmap|bitmaps|caps always off|caps on only|copyright|hotkey|language|layout|message|name|shift frees caps|version)\b/i,alias:"bold"},"rule-keyword":{pattern:/\b(?:any|baselayout|beep|call|context|deadkey|dk|if|index|layer|notany|nul|outs|platform|reset|return|save|set|store|use)\b/i,alias:"keyword"},"structural-keyword":{pattern:/\b(?:ansi|begin|group|match|nomatch|unicode|using keys)\b/i,alias:"keyword"},"compile-target":{pattern:/\$(?:keyman|keymanonly|keymanweb|kmfl|weaver):/i,alias:"property"},number:/\b(?:U\+[\dA-F]+|d\d+|x[\da-f]+|\d+)\b/i,operator:/[+>\\$]|\.\./,punctuation:/[()=,]/}}return dce}var hce,a8e;function $br(){if(a8e)return hce;a8e=1,hce=t,t.displayName="kotlin",t.aliases=["kt","kts"];function t(e){(function(r){r.languages.kotlin=r.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete r.languages.kotlin["class-name"];var n={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:r.languages.kotlin}};r.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:n},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:n},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete r.languages.kotlin.string,r.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),r.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),r.languages.kt=r.languages.kotlin,r.languages.kts=r.languages.kotlin})(e)}return hce}var pce,o8e;function Wbr(){if(o8e)return pce;o8e=1,pce=t,t.displayName="kumir",t.aliases=["kum"];function t(e){(function(r){var n=/\s\x00-\x1f\x22-\x2f\x3a-\x3f\x5b-\x5e\x60\x7b-\x7e/.source;function i(a,o){return RegExp(a.replace(/<nonId>/g,n),o)}r.languages.kumir={comment:{pattern:/\|.*/},prolog:{pattern:/#.*/,greedy:!0},string:{pattern:/"[^\n\r"]*"|'[^\n\r']*'/,greedy:!0},boolean:{pattern:i(/(^|[<nonId>])(?:да|нет)(?=[<nonId>]|$)/.source),lookbehind:!0},"operator-word":{pattern:i(/(^|[<nonId>])(?:и|или|не)(?=[<nonId>]|$)/.source),lookbehind:!0,alias:"keyword"},"system-variable":{pattern:i(/(^|[<nonId>])знач(?=[<nonId>]|$)/.source),lookbehind:!0,alias:"keyword"},type:[{pattern:i(/(^|[<nonId>])(?:вещ|лит|лог|сим|цел)(?:\x20*таб)?(?=[<nonId>]|$)/.source),lookbehind:!0,alias:"builtin"},{pattern:i(/(^|[<nonId>])(?:компл|сканкод|файл|цвет)(?=[<nonId>]|$)/.source),lookbehind:!0,alias:"important"}],keyword:{pattern:i(/(^|[<nonId>])(?:алг|арг(?:\x20*рез)?|ввод|ВКЛЮЧИТЬ|вс[её]|выбор|вывод|выход|дано|для|до|дс|если|иначе|исп|использовать|кон(?:(?:\x20+|_)исп)?|кц(?:(?:\x20+|_)при)?|надо|нач|нс|нц|от|пауза|пока|при|раза?|рез|стоп|таб|то|утв|шаг)(?=[<nonId>]|$)/.source),lookbehind:!0},name:{pattern:i(/(^|[<nonId>])[^\d<nonId>][^<nonId>]*(?:\x20+[^<nonId>]+)*(?=[<nonId>]|$)/.source),lookbehind:!0},number:{pattern:i(/(^|[<nonId>])(?:\B\$[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)(?=[<nonId>]|$)/.source,"i"),lookbehind:!0},punctuation:/:=|[(),:;\[\]]/,"operator-char":{pattern:/\*\*?|<[=>]?|>=?|[-+/=]/,alias:"operator"}},r.languages.kum=r.languages.kumir})(e)}return pce}var vce,s8e;function Ybr(){if(s8e)return vce;s8e=1,vce=t,t.displayName="kusto",t.aliases=[];function t(e){e.languages.kusto={comment:{pattern:/\/\/.*/,greedy:!0},string:{pattern:/```[\s\S]*?```|[hH]?(?:"(?:[^\r\n\\"]|\\.)*"|'(?:[^\r\n\\']|\\.)*'|@(?:"[^\r\n"]*"|'[^\r\n']*'))/,greedy:!0},verb:{pattern:/(\|\s*)[a-z][\w-]*/i,lookbehind:!0,alias:"keyword"},command:{pattern:/\.[a-z][a-z\d-]*\b/,alias:"keyword"},"class-name":/\b(?:bool|datetime|decimal|dynamic|guid|int|long|real|string|timespan)\b/,keyword:/\b(?:access|alias|and|anti|as|asc|auto|between|by|(?:contains|(?:ends|starts)with|has(?:perfix|suffix)?)(?:_cs)?|database|declare|desc|external|from|fullouter|has_all|in|ingestion|inline|inner|innerunique|into|(?:left|right)(?:anti(?:semi)?|inner|outer|semi)?|let|like|local|not|of|on|or|pattern|print|query_parameters|range|restrict|schema|set|step|table|tables|to|view|where|with|matches\s+regex|nulls\s+(?:first|last))(?![\w-])/,boolean:/\b(?:false|null|true)\b/,function:/\b[a-z_]\w*(?=\s*\()/,datetime:[{pattern:/\b(?:(?:Fri|Friday|Mon|Monday|Sat|Saturday|Sun|Sunday|Thu|Thursday|Tue|Tuesday|Wed|Wednesday)\s*,\s*)?\d{1,2}(?:\s+|-)(?:Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)(?:\s+|-)\d{2}\s+\d{2}:\d{2}(?::\d{2})?(?:\s*(?:\b(?:[A-Z]|(?:[ECMT][DS]|GM|U)T)|[+-]\d{4}))?\b/,alias:"number"},{pattern:/[+-]?\b(?:\d{4}-\d{2}-\d{2}(?:[ T]\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?)?|\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?)Z?/,alias:"number"}],number:/\b(?:0x[0-9A-Fa-f]+|\d+(?:\.\d+)?(?:[Ee][+-]?\d+)?)(?:(?:min|sec|[mnµ]s|[dhms]|microsecond|tick)\b)?|[+-]?\binf\b/,operator:/=>|[!=]~|[!=<>]=?|[-+*/%|]|\.\./,punctuation:/[()\[\]{},;.:]/}}return vce}var mce,l8e;function Xbr(){if(l8e)return mce;l8e=1,mce=t,t.displayName="latex",t.aliases=["tex","context"];function t(e){(function(r){var n=/\\(?:[^a-z()[\]]|[a-z*]+)/i,i={"equation-command":{pattern:n,alias:"regex"}};r.languages.latex={comment:/%.*/,cdata:{pattern:/(\\begin\{((?:lstlisting|verbatim)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0},equation:[{pattern:/\$\$(?:\\[\s\S]|[^\\$])+\$\$|\$(?:\\[\s\S]|[^\\$])+\$|\\\([\s\S]*?\\\)|\\\[[\s\S]*?\\\]/,inside:i,alias:"string"},{pattern:/(\\begin\{((?:align|eqnarray|equation|gather|math|multline)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0,inside:i,alias:"string"}],keyword:{pattern:/(\\(?:begin|cite|documentclass|end|label|ref|usepackage)(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0},url:{pattern:/(\\url\{)[^}]+(?=\})/,lookbehind:!0},headline:{pattern:/(\\(?:chapter|frametitle|paragraph|part|section|subparagraph|subsection|subsubparagraph|subsubsection|subsubsubparagraph)\*?(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0,alias:"class-name"},function:{pattern:n,alias:"selector"},punctuation:/[[\]{}&]/},r.languages.tex=r.languages.latex,r.languages.context=r.languages.latex})(e)}return mce}var gce,u8e;function zZ(){if(u8e)return gce;u8e=1;var t=iT();gce=e,e.displayName="php",e.aliases=[];function e(r){r.register(t),(function(n){var i=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,a=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],o=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,s=/<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,d=/[{}\[\](),:;]/;n.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:i,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s+)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:a,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:o,operator:s,punctuation:d};var b={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:n.languages.php},L=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:b}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:b}}];n.languages.insertBefore("php","variable",{string:L,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:i,string:L,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:a,number:o,operator:s,punctuation:d}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),n.hooks.add("before-tokenize",function(B){if(/<\?/.test(B.code)){var V=/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g;n.languages["markup-templating"].buildPlaceholders(B,"php",V)}}),n.hooks.add("after-tokenize",function(B){n.languages["markup-templating"].tokenizePlaceholders(B,"php")})})(r)}return gce}var yce,c8e;function Zbr(){if(c8e)return yce;c8e=1;var t=iT(),e=zZ();yce=r,r.displayName="latte",r.aliases=[];function r(n){n.register(t),n.register(e),(function(i){i.languages.latte={comment:/^\{\*[\s\S]*/,"latte-tag":{pattern:/(^\{(?:\/(?=[a-z]))?)(?:[=_]|[a-z]\w*\b(?!\())/i,lookbehind:!0,alias:"important"},delimiter:{pattern:/^\{\/?|\}$/,alias:"punctuation"},php:{pattern:/\S(?:[\s\S]*\S)?/,alias:"language-php",inside:i.languages.php}};var a=i.languages.extend("markup",{});i.languages.insertBefore("inside","attr-value",{"n-attr":{pattern:/n:[\w-]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+))?/,inside:{"attr-name":{pattern:/^[^\s=]+/,alias:"important"},"attr-value":{pattern:/=[\s\S]+/,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}],php:{pattern:/\S(?:[\s\S]*\S)?/,inside:i.languages.php}}}}}},a.tag),i.hooks.add("before-tokenize",function(o){if(o.language==="latte"){var s=/\{\*[\s\S]*?\*\}|\{[^'"\s{}*](?:[^"'/{}]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|\/\*(?:[^*]|\*(?!\/))*\*\/)*\}/g;i.languages["markup-templating"].buildPlaceholders(o,"latte",s),o.grammar=a}}),i.hooks.add("after-tokenize",function(o){i.languages["markup-templating"].tokenizePlaceholders(o,"latte")})})(n)}return yce}var bce,f8e;function Kbr(){if(f8e)return bce;f8e=1,bce=t,t.displayName="less",t.aliases=[];function t(e){e.languages.less=e.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),e.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}})}return bce}var xce,d8e;function gbe(){if(d8e)return xce;d8e=1,xce=t,t.displayName="scheme",t.aliases=[];function t(e){(function(r){r.languages.scheme={comment:/;.*|#;\s*(?:\((?:[^()]|\([^()]*\))*\)|\[(?:[^\[\]]|\[[^\[\]]*\])*\])|#\|(?:[^#|]|#(?!\|)|\|(?!#)|#\|(?:[^#|]|#(?!\|)|\|(?!#))*\|#)*\|#/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},symbol:{pattern:/'[^()\[\]#'\s]+/,greedy:!0},char:{pattern:/#\\(?:[ux][a-fA-F\d]+\b|[-a-zA-Z]+\b|[\uD800-\uDBFF][\uDC00-\uDFFF]|\S)/,greedy:!0},"lambda-parameter":[{pattern:/((?:^|[^'`#])[(\[]lambda\s+)(?:[^|()\[\]'\s]+|\|(?:[^\\|]|\\.)*\|)/,lookbehind:!0},{pattern:/((?:^|[^'`#])[(\[]lambda\s+[(\[])[^()\[\]']+/,lookbehind:!0}],keyword:{pattern:/((?:^|[^'`#])[(\[])(?:begin|case(?:-lambda)?|cond(?:-expand)?|define(?:-library|-macro|-record-type|-syntax|-values)?|defmacro|delay(?:-force)?|do|else|except|export|guard|if|import|include(?:-ci|-library-declarations)?|lambda|let(?:rec)?(?:-syntax|-values|\*)?|let\*-values|only|parameterize|prefix|(?:quasi-?)?quote|rename|set!|syntax-(?:case|rules)|unless|unquote(?:-splicing)?|when)(?=[()\[\]\s]|$)/,lookbehind:!0},builtin:{pattern:/((?:^|[^'`#])[(\[])(?:abs|and|append|apply|assoc|ass[qv]|binary-port\?|boolean=?\?|bytevector(?:-append|-copy|-copy!|-length|-u8-ref|-u8-set!|\?)?|caar|cadr|call-with-(?:current-continuation|port|values)|call\/cc|car|cdar|cddr|cdr|ceiling|char(?:->integer|-ready\?|\?|<\?|<=\?|=\?|>\?|>=\?)|close-(?:input-port|output-port|port)|complex\?|cons|current-(?:error|input|output)-port|denominator|dynamic-wind|eof-object\??|eq\?|equal\?|eqv\?|error|error-object(?:-irritants|-message|\?)|eval|even\?|exact(?:-integer-sqrt|-integer\?|\?)?|expt|features|file-error\?|floor(?:-quotient|-remainder|\/)?|flush-output-port|for-each|gcd|get-output-(?:bytevector|string)|inexact\??|input-port(?:-open\?|\?)|integer(?:->char|\?)|lcm|length|list(?:->string|->vector|-copy|-ref|-set!|-tail|\?)?|make-(?:bytevector|list|parameter|string|vector)|map|max|member|memq|memv|min|modulo|negative\?|newline|not|null\?|number(?:->string|\?)|numerator|odd\?|open-(?:input|output)-(?:bytevector|string)|or|output-port(?:-open\?|\?)|pair\?|peek-char|peek-u8|port\?|positive\?|procedure\?|quotient|raise|raise-continuable|rational\?|rationalize|read-(?:bytevector|bytevector!|char|error\?|line|string|u8)|real\?|remainder|reverse|round|set-c[ad]r!|square|string(?:->list|->number|->symbol|->utf8|->vector|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?|<\?|<=\?|=\?|>\?|>=\?)?|substring|symbol(?:->string|\?|=\?)|syntax-error|textual-port\?|truncate(?:-quotient|-remainder|\/)?|u8-ready\?|utf8->string|values|vector(?:->list|->string|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?)?|with-exception-handler|write-(?:bytevector|char|string|u8)|zero\?)(?=[()\[\]\s]|$)/,lookbehind:!0},operator:{pattern:/((?:^|[^'`#])[(\[])(?:[-+*%/]|[<>]=?|=>?)(?=[()\[\]\s]|$)/,lookbehind:!0},number:{pattern:RegExp(n({"<ureal dec>":/\d+(?:\/\d+)|(?:\d+(?:\.\d*)?|\.\d+)(?:[esfdl][+-]?\d+)?/.source,"<real dec>":/[+-]?<ureal dec>|[+-](?:inf|nan)\.0/.source,"<imaginary dec>":/[+-](?:<ureal dec>|(?:inf|nan)\.0)?i/.source,"<complex dec>":/<real dec>(?:@<real dec>|<imaginary dec>)?|<imaginary dec>/.source,"<num dec>":/(?:#d(?:#[ei])?|#[ei](?:#d)?)?<complex dec>/.source,"<ureal box>":/[0-9a-f]+(?:\/[0-9a-f]+)?/.source,"<real box>":/[+-]?<ureal box>|[+-](?:inf|nan)\.0/.source,"<imaginary box>":/[+-](?:<ureal box>|(?:inf|nan)\.0)?i/.source,"<complex box>":/<real box>(?:@<real box>|<imaginary box>)?|<imaginary box>/.source,"<num box>":/#[box](?:#[ei])?|(?:#[ei])?#[box]<complex box>/.source,"<number>":/(^|[()\[\]\s])(?:<num dec>|<num box>)(?=[()\[\]\s]|$)/.source}),"i"),lookbehind:!0},boolean:{pattern:/(^|[()\[\]\s])#(?:[ft]|false|true)(?=[()\[\]\s]|$)/,lookbehind:!0},function:{pattern:/((?:^|[^'`#])[(\[])(?:[^|()\[\]'\s]+|\|(?:[^\\|]|\\.)*\|)(?=[()\[\]\s]|$)/,lookbehind:!0},identifier:{pattern:/(^|[()\[\]\s])\|(?:[^\\|]|\\.)*\|(?=[()\[\]\s]|$)/,lookbehind:!0,greedy:!0},punctuation:/[()\[\]']/};function n(i){for(var a in i)i[a]=i[a].replace(/<[\w\s]+>/g,function(o){return"(?:"+i[o].trim()+")"});return i[a]}})(e)}return xce}var _ce,h8e;function Jbr(){if(h8e)return _ce;h8e=1;var t=gbe();_ce=e,e.displayName="lilypond",e.aliases=[];function e(r){r.register(t),(function(n){for(var i=/\((?:[^();"#\\]|\\[\s\S]|;.*(?!.)|"(?:[^"\\]|\\.)*"|#(?:\{(?:(?!#\})[\s\S])*#\}|[^{])|<expr>)*\)/.source,a=5,o=0;o<a;o++)i=i.replace(/<expr>/g,function(){return i});i=i.replace(/<expr>/g,/[^\s\S]/.source);var s=n.languages.lilypond={comment:/%(?:(?!\{).*|\{[\s\S]*?%\})/,"embedded-scheme":{pattern:RegExp(/(^|[=\s])#(?:"(?:[^"\\]|\\.)*"|[^\s()"]*(?:[^\s()]|<expr>))/.source.replace(/<expr>/g,function(){return i}),"m"),lookbehind:!0,greedy:!0,inside:{scheme:{pattern:/^(#)[\s\S]+$/,lookbehind:!0,alias:"language-scheme",inside:{"embedded-lilypond":{pattern:/#\{[\s\S]*?#\}/,greedy:!0,inside:{punctuation:/^#\{|#\}$/,lilypond:{pattern:/[\s\S]+/,alias:"language-lilypond",inside:null}}},rest:n.languages.scheme}},punctuation:/#/}},string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},"class-name":{pattern:/(\\new\s+)[\w-]+/,lookbehind:!0},keyword:{pattern:/\\[a-z][-\w]*/i,inside:{punctuation:/^\\/}},operator:/[=|]|<<|>>/,punctuation:{pattern:/(^|[a-z\d])(?:'+|,+|[_^]?-[_^]?(?:[-+^!>._]|(?=\d))|[_^]\.?|[.!])|[{}()[\]<>^~]|\\[()[\]<>\\!]|--|__/,lookbehind:!0},number:/\b\d+(?:\/\d+)?\b/};s["embedded-scheme"].inside.scheme.inside["embedded-lilypond"].inside.lilypond.inside=s,n.languages.ly=s})(r)}return _ce}var wce,p8e;function Qbr(){if(p8e)return wce;p8e=1;var t=iT();wce=e,e.displayName="liquid",e.aliases=[];function e(r){r.register(t),r.languages.liquid={comment:{pattern:/(^\{%\s*comment\s*%\})[\s\S]+(?=\{%\s*endcomment\s*%\}$)/,lookbehind:!0},delimiter:{pattern:/^\{(?:\{\{|[%\{])-?|-?(?:\}\}|[%\}])\}$/,alias:"punctuation"},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},keyword:/\b(?:as|assign|break|(?:end)?(?:capture|case|comment|for|form|if|paginate|raw|style|tablerow|unless)|continue|cycle|decrement|echo|else|elsif|in|include|increment|limit|liquid|offset|range|render|reversed|section|when|with)\b/,object:/\b(?:address|all_country_option_tags|article|block|blog|cart|checkout|collection|color|country|country_option_tags|currency|current_page|current_tags|customer|customer_address|date|discount_allocation|discount_application|external_video|filter|filter_value|font|forloop|fulfillment|generic_file|gift_card|group|handle|image|line_item|link|linklist|localization|location|measurement|media|metafield|model|model_source|order|page|page_description|page_image|page_title|part|policy|product|product_option|recommendations|request|robots|routes|rule|script|search|selling_plan|selling_plan_allocation|selling_plan_group|shipping_method|shop|shop_locale|sitemap|store_availability|tax_line|template|theme|transaction|unit_price_measurement|user_agent|variant|video|video_source)\b/,function:[{pattern:/(\|\s*)\w+/,lookbehind:!0,alias:"filter"},{pattern:/(\.\s*)(?:first|last|size)/,lookbehind:!0}],boolean:/\b(?:false|nil|true)\b/,range:{pattern:/\.\./,alias:"operator"},number:/\b\d+(?:\.\d+)?\b/,operator:/[!=]=|<>|[<>]=?|[|?:=-]|\b(?:and|contains(?=\s)|or)\b/,punctuation:/[.,\[\]()]/,empty:{pattern:/\bempty\b/,alias:"keyword"}},r.hooks.add("before-tokenize",function(n){var i=/\{%\s*comment\s*%\}[\s\S]*?\{%\s*endcomment\s*%\}|\{(?:%[\s\S]*?%|\{\{[\s\S]*?\}\}|\{[\s\S]*?\})\}/g,a=!1;r.languages["markup-templating"].buildPlaceholders(n,"liquid",i,function(o){var s=/^\{%-?\s*(\w+)/.exec(o);if(s){var d=s[1];if(d==="raw"&&!a)return a=!0,!0;if(d==="endraw")return a=!1,!0}return!a})}),r.hooks.add("after-tokenize",function(n){r.languages["markup-templating"].tokenizePlaceholders(n,"liquid")})}return wce}var Sce,v8e;function exr(){if(v8e)return Sce;v8e=1,Sce=t,t.displayName="lisp",t.aliases=[];function t(e){(function(r){function n(de){return RegExp(/(\()/.source+"(?:"+de+")"+/(?=[\s\)])/.source)}function i(de){return RegExp(/([\s([])/.source+"(?:"+de+")"+/(?=[\s)])/.source)}var a=/(?!\d)[-+*/~!@$%^=<>{}\w]+/.source,o="&"+a,s="(\\()",d="(?=\\))",b="(?=\\s)",L=/(?:[^()]|\((?:[^()]|\((?:[^()]|\((?:[^()]|\((?:[^()]|\([^()]*\))*\))*\))*\))*\))*/.source,B={heading:{pattern:/;;;.*/,alias:["comment","title"]},comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0,inside:{argument:/[-A-Z]+(?=[.,\s])/,symbol:RegExp("`"+a+"'")}},"quoted-symbol":{pattern:RegExp("#?'"+a),alias:["variable","symbol"]},"lisp-property":{pattern:RegExp(":"+a),alias:"property"},splice:{pattern:RegExp(",@?"+a),alias:["symbol","variable"]},keyword:[{pattern:RegExp(s+"(?:and|(?:cl-)?letf|cl-loop|cond|cons|error|if|(?:lexical-)?let\\*?|message|not|null|or|provide|require|setq|unless|use-package|when|while)"+b),lookbehind:!0},{pattern:RegExp(s+"(?:append|by|collect|concat|do|finally|for|in|return)"+b),lookbehind:!0}],declare:{pattern:n(/declare/.source),lookbehind:!0,alias:"keyword"},interactive:{pattern:n(/interactive/.source),lookbehind:!0,alias:"keyword"},boolean:{pattern:i(/nil|t/.source),lookbehind:!0},number:{pattern:i(/[-+]?\d+(?:\.\d*)?/.source),lookbehind:!0},defvar:{pattern:RegExp(s+"def(?:const|custom|group|var)\\s+"+a),lookbehind:!0,inside:{keyword:/^def[a-z]+/,variable:RegExp(a)}},defun:{pattern:RegExp(s+/(?:cl-)?(?:defmacro|defun\*?)\s+/.source+a+/\s+\(/.source+L+/\)/.source),lookbehind:!0,greedy:!0,inside:{keyword:/^(?:cl-)?def\S+/,arguments:null,function:{pattern:RegExp("(^\\s)"+a),lookbehind:!0},punctuation:/[()]/}},lambda:{pattern:RegExp(s+"lambda\\s+\\(\\s*(?:&?"+a+"(?:\\s+&?"+a+")*\\s*)?\\)"),lookbehind:!0,greedy:!0,inside:{keyword:/^lambda/,arguments:null,punctuation:/[()]/}},car:{pattern:RegExp(s+a),lookbehind:!0},punctuation:[/(?:['`,]?\(|[)\[\]])/,{pattern:/(\s)\.(?=\s)/,lookbehind:!0}]},V={"lisp-marker":RegExp(o),varform:{pattern:RegExp(/\(/.source+a+/\s+(?=\S)/.source+L+/\)/.source),inside:B},argument:{pattern:RegExp(/(^|[\s(])/.source+a),lookbehind:!0,alias:"variable"},rest:B},X="\\S+(?:\\s+\\S+)*",ie={pattern:RegExp(s+L+d),lookbehind:!0,inside:{"rest-vars":{pattern:RegExp("&(?:body|rest)\\s+"+X),inside:V},"other-marker-vars":{pattern:RegExp("&(?:aux|optional)\\s+"+X),inside:V},keys:{pattern:RegExp("&key\\s+"+X+"(?:\\s+&allow-other-keys)?"),inside:V},argument:{pattern:RegExp(a),alias:"variable"},punctuation:/[()]/}};B.lambda.inside.arguments=ie,B.defun.inside.arguments=r.util.clone(ie),B.defun.inside.arguments.inside.sublist=ie,r.languages.lisp=B,r.languages.elisp=B,r.languages.emacs=B,r.languages["emacs-lisp"]=B})(e)}return Sce}var Tce,m8e;function txr(){if(m8e)return Tce;m8e=1,Tce=t,t.displayName="livescript",t.aliases=[];function t(e){e.languages.livescript={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\])#.*/,lookbehind:!0}],"interpolated-string":{pattern:/(^|[^"])("""|")(?:\\[\s\S]|(?!\2)[^\\])*\2(?!")/,lookbehind:!0,greedy:!0,inside:{variable:{pattern:/(^|[^\\])#[a-z_](?:-?[a-z]|[\d_])*/m,lookbehind:!0},interpolation:{pattern:/(^|[^\\])#\{[^}]+\}/m,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^#\{|\}$/,alias:"variable"}}},string:/[\s\S]+/}},string:[{pattern:/('''|')(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},{pattern:/<\[[\s\S]*?\]>/,greedy:!0},/\\[^\s,;\])}]+/],regex:[{pattern:/\/\/(?:\[[^\r\n\]]*\]|\\.|(?!\/\/)[^\\\[])+\/\/[gimyu]{0,5}/,greedy:!0,inside:{comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0}}},{pattern:/\/(?:\[[^\r\n\]]*\]|\\.|[^/\\\r\n\[])+\/[gimyu]{0,5}/,greedy:!0}],keyword:{pattern:/(^|(?!-).)\b(?:break|case|catch|class|const|continue|default|do|else|extends|fallthrough|finally|for(?: ever)?|function|if|implements|it|let|loop|new|null|otherwise|own|return|super|switch|that|then|this|throw|try|unless|until|var|void|when|while|yield)(?!-)\b/m,lookbehind:!0},"keyword-operator":{pattern:/(^|[^-])\b(?:(?:delete|require|typeof)!|(?:and|by|delete|export|from|import(?: all)?|in|instanceof|is(?: not|nt)?|not|of|or|til|to|typeof|with|xor)(?!-)\b)/m,lookbehind:!0,alias:"operator"},boolean:{pattern:/(^|[^-])\b(?:false|no|off|on|true|yes)(?!-)\b/m,lookbehind:!0},argument:{pattern:/(^|(?!\.&\.)[^&])&(?!&)\d*/m,lookbehind:!0,alias:"variable"},number:/\b(?:\d+~[\da-z]+|\d[\d_]*(?:\.\d[\d_]*)?(?:[a-z]\w*)?)/i,identifier:/[a-z_](?:-?[a-z]|[\d_])*/i,operator:[{pattern:/( )\.(?= )/,lookbehind:!0},/\.(?:[=~]|\.\.?)|\.(?:[&|^]|<<|>>>?)\.|:(?:=|:=?)|&&|\|[|>]|<(?:<<?<?|--?!?|~~?!?|[|=?])?|>[>=?]?|-(?:->?|>)?|\+\+?|@@?|%%?|\*\*?|!(?:~?=|--?>|~?~>)?|~(?:~?>|=)?|==?|\^\^?|[\/?]/],punctuation:/[(){}\[\]|.,:;`]/},e.languages.livescript["interpolated-string"].inside.interpolation.inside.rest=e.languages.livescript}return Tce}var Ece,g8e;function rxr(){if(g8e)return Ece;g8e=1,Ece=t,t.displayName="llvm",t.aliases=[];function t(e){(function(r){r.languages.llvm={comment:/;.*/,string:{pattern:/"[^"]*"/,greedy:!0},boolean:/\b(?:false|true)\b/,variable:/[%@!#](?:(?!\d)(?:[-$.\w]|\\[a-f\d]{2})+|\d+)/i,label:/(?!\d)(?:[-$.\w]|\\[a-f\d]{2})+:/i,type:{pattern:/\b(?:double|float|fp128|half|i[1-9]\d*|label|metadata|ppc_fp128|token|void|x86_fp80|x86_mmx)\b/,alias:"class-name"},keyword:/\b[a-z_][a-z_0-9]*\b/,number:/[+-]?\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b|\b0x[\dA-Fa-f]+\b|\b0xK[\dA-Fa-f]{20}\b|\b0x[ML][\dA-Fa-f]{32}\b|\b0xH[\dA-Fa-f]{4}\b/,punctuation:/[{}[\];(),.!*=<>]/}})(e)}return Ece}var Ace,y8e;function nxr(){if(y8e)return Ace;y8e=1,Ace=t,t.displayName="log",t.aliases=[];function t(e){e.languages.log={string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'(?![st] | \w)(?:[^'\\\r\n]|\\.)*'/,greedy:!0},exception:{pattern:/(^|[^\w.])[a-z][\w.]*(?:Error|Exception):.*(?:(?:\r\n?|\n)[ \t]*(?:at[ \t].+|\.{3}.*|Caused by:.*))+(?:(?:\r\n?|\n)[ \t]*\.\.\. .*)?/,lookbehind:!0,greedy:!0,alias:["javastacktrace","language-javastacktrace"],inside:e.languages.javastacktrace||{keyword:/\bat\b/,function:/[a-z_][\w$]*(?=\()/,punctuation:/[.:()]/}},level:[{pattern:/\b(?:ALERT|CRIT|CRITICAL|EMERG|EMERGENCY|ERR|ERROR|FAILURE|FATAL|SEVERE)\b/,alias:["error","important"]},{pattern:/\b(?:WARN|WARNING|WRN)\b/,alias:["warning","important"]},{pattern:/\b(?:DISPLAY|INF|INFO|NOTICE|STATUS)\b/,alias:["info","keyword"]},{pattern:/\b(?:DBG|DEBUG|FINE)\b/,alias:["debug","keyword"]},{pattern:/\b(?:FINER|FINEST|TRACE|TRC|VERBOSE|VRB)\b/,alias:["trace","comment"]}],property:{pattern:/((?:^|[\]|])[ \t]*)[a-z_](?:[\w-]|\b\/\b)*(?:[. ]\(?\w(?:[\w-]|\b\/\b)*\)?)*:(?=\s)/im,lookbehind:!0},separator:{pattern:/(^|[^-+])-{3,}|={3,}|\*{3,}|- - /m,lookbehind:!0,alias:"comment"},url:/\b(?:file|ftp|https?):\/\/[^\s|,;'"]*[^\s|,;'">.]/,email:{pattern:/(^|\s)[-\w+.]+@[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)+(?=\s)/,lookbehind:!0,alias:"url"},"ip-address":{pattern:/\b(?:\d{1,3}(?:\.\d{1,3}){3})\b/,alias:"constant"},"mac-address":{pattern:/\b[a-f0-9]{2}(?::[a-f0-9]{2}){5}\b/i,alias:"constant"},domain:{pattern:/(^|\s)[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)*\.[a-z][a-z0-9-]+(?=\s)/,lookbehind:!0,alias:"constant"},uuid:{pattern:/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/i,alias:"constant"},hash:{pattern:/\b(?:[a-f0-9]{32}){1,2}\b/i,alias:"constant"},"file-path":{pattern:/\b[a-z]:[\\/][^\s|,;:(){}\[\]"']+|(^|[\s:\[\](>|])\.{0,2}\/\w[^\s|,;:(){}\[\]"']*/i,lookbehind:!0,greedy:!0,alias:"string"},date:{pattern:RegExp(/\b\d{4}[-/]\d{2}[-/]\d{2}(?:T(?=\d{1,2}:)|(?=\s\d{1,2}:))/.source+"|"+/\b\d{1,4}[-/ ](?:\d{1,2}|Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)[-/ ]\d{2,4}T?\b/.source+"|"+/\b(?:(?:Fri|Mon|Sat|Sun|Thu|Tue|Wed)(?:\s{1,2}(?:Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep))?|Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)\s{1,2}\d{1,2}\b/.source,"i"),alias:"number"},time:{pattern:/\b\d{1,2}:\d{1,2}:\d{1,2}(?:[.,:]\d+)?(?:\s?[+-]\d{2}:?\d{2}|Z)?\b/,alias:"number"},boolean:/\b(?:false|null|true)\b/i,number:{pattern:/(^|[^.\w])(?:0x[a-f0-9]+|0o[0-7]+|0b[01]+|v?\d[\da-f]*(?:\.\d+)*(?:e[+-]?\d+)?[a-z]{0,3}\b)\b(?!\.\w)/i,lookbehind:!0},operator:/[;:?<=>~/@!$%&+\-|^(){}*#]/,punctuation:/[\[\].,]/}}return Ace}var Cce,b8e;function ixr(){if(b8e)return Cce;b8e=1,Cce=t,t.displayName="lolcode",t.aliases=[];function t(e){e.languages.lolcode={comment:[/\bOBTW\s[\s\S]*?\sTLDR\b/,/\bBTW.+/],string:{pattern:/"(?::.|[^":])*"/,inside:{variable:/:\{[^}]+\}/,symbol:[/:\([a-f\d]+\)/i,/:\[[^\]]+\]/,/:[)>o":]/]},greedy:!0},number:/(?:\B-)?(?:\b\d+(?:\.\d*)?|\B\.\d+)/,symbol:{pattern:/(^|\s)(?:A )?(?:BUKKIT|NOOB|NUMBAR|NUMBR|TROOF|YARN)(?=\s|,|$)/,lookbehind:!0,inside:{keyword:/A(?=\s)/}},label:{pattern:/((?:^|\s)(?:IM IN YR|IM OUTTA YR) )[a-zA-Z]\w*/,lookbehind:!0,alias:"string"},function:{pattern:/((?:^|\s)(?:HOW IZ I|I IZ|IZ) )[a-zA-Z]\w*/,lookbehind:!0},keyword:[{pattern:/(^|\s)(?:AN|FOUND YR|GIMMEH|GTFO|HAI|HAS A|HOW IZ I|I HAS A|I IZ|IF U SAY SO|IM IN YR|IM OUTTA YR|IS NOW(?: A)?|ITZ(?: A)?|IZ|KTHX|KTHXBYE|LIEK(?: A)?|MAEK|MEBBE|MKAY|NERFIN|NO WAI|O HAI IM|O RLY\?|OIC|OMG|OMGWTF|R|SMOOSH|SRS|TIL|UPPIN|VISIBLE|WILE|WTF\?|YA RLY|YR)(?=\s|,|$)/,lookbehind:!0},/'Z(?=\s|,|$)/],boolean:{pattern:/(^|\s)(?:FAIL|WIN)(?=\s|,|$)/,lookbehind:!0},variable:{pattern:/(^|\s)IT(?=\s|,|$)/,lookbehind:!0},operator:{pattern:/(^|\s)(?:NOT|BOTH SAEM|DIFFRINT|(?:ALL|ANY|BIGGR|BOTH|DIFF|EITHER|MOD|PRODUKT|QUOSHUNT|SMALLR|SUM|WON) OF)(?=\s|,|$)/,lookbehind:!0},punctuation:/\.{3}|…|,|!/}}return Cce}var Mce,x8e;function axr(){if(x8e)return Mce;x8e=1,Mce=t,t.displayName="magma",t.aliases=[];function t(e){e.languages.magma={output:{pattern:/^(>.*(?:\r(?:\n|(?!\n))|\n))(?!>)(?:.+|(?:\r(?:\n|(?!\n))|\n)(?!>).*)(?:(?:\r(?:\n|(?!\n))|\n)(?!>).*)*/m,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},string:{pattern:/(^|[^\\"])"(?:[^\r\n\\"]|\\.)*"/,lookbehind:!0,greedy:!0},keyword:/\b(?:_|adj|and|assert|assert2|assert3|assigned|break|by|case|cat|catch|clear|cmpeq|cmpne|continue|declare|default|delete|diff|div|do|elif|else|end|eq|error|eval|exists|exit|for|forall|forward|fprintf|freeze|function|ge|gt|if|iload|import|in|intrinsic|is|join|le|load|local|lt|meet|mod|ne|not|notadj|notin|notsubset|or|print|printf|procedure|quit|random|read|readi|repeat|require|requirege|requirerange|restore|return|save|sdiff|select|subset|then|time|to|try|until|vprint|vprintf|vtime|when|where|while|xor)\b/,boolean:/\b(?:false|true)\b/,generator:{pattern:/\b[a-z_]\w*(?=\s*<)/i,alias:"class-name"},function:/\b[a-z_]\w*(?=\s*\()/i,number:{pattern:/(^|[^\w.]|\.\.)(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?:_[a-z]?)?(?=$|[^\w.]|\.\.)/,lookbehind:!0},operator:/->|[-+*/^~!|#=]|:=|\.\./,punctuation:/[()[\]{}<>,;.:]/}}return Mce}var Rce,_8e;function oxr(){if(_8e)return Rce;_8e=1,Rce=t,t.displayName="makefile",t.aliases=[];function t(e){e.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/}}return Rce}var kce,w8e;function sxr(){if(w8e)return kce;w8e=1,kce=t,t.displayName="markdown",t.aliases=["md"];function t(e){(function(r){var n=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function i(V){return V=V.replace(/<inner>/g,function(){return n}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+V+")")}var a=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return a}),s=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;r.languages.markdown=r.languages.extend("markup",{}),r.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:r.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+s+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+s+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(a),inside:r.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+s+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(a),alias:"important",inside:r.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:i(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:i(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:i(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:i(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(V){["url","bold","italic","strike","code-snippet"].forEach(function(X){V!==X&&(r.languages.markdown[V].inside.content.inside[X]=r.languages.markdown[X])})}),r.hooks.add("after-tokenize",function(V){if(V.language!=="markdown"&&V.language!=="md")return;function X(ie){if(!(!ie||typeof ie=="string"))for(var de=0,ae=ie.length;de<ae;de++){var U=ie[de];if(U.type!=="code"){X(U.content);continue}var ve=U.content[1],Se=U.content[3];if(ve&&Se&&ve.type==="code-language"&&Se.type==="code-block"&&typeof ve.content=="string"){var Pe=ve.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");Pe=(/[a-z][\w-]*/i.exec(Pe)||[""])[0].toLowerCase();var Me="language-"+Pe;Se.alias?typeof Se.alias=="string"?Se.alias=[Se.alias,Me]:Se.alias.push(Me):Se.alias=[Me]}}}X(V.tokens)}),r.hooks.add("wrap",function(V){if(V.type==="code-block"){for(var X="",ie=0,de=V.classes.length;ie<de;ie++){var ae=V.classes[ie],U=/language-(.+)/.exec(ae);if(U){X=U[1];break}}var ve=r.languages[X];if(ve)V.content=r.highlight(B(V.content.value),ve,X);else if(X&&X!=="none"&&r.plugins.autoloader){var Se="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);V.attributes.id=Se,r.plugins.autoloader.loadLanguages(X,function(){var Pe=document.getElementById(Se);Pe&&(Pe.innerHTML=r.highlight(Pe.textContent,r.languages[X],X))})}}});var d=RegExp(r.languages.markup.tag.pattern.source,"gi"),b={amp:"&",lt:"<",gt:">",quot:'"'},L=String.fromCodePoint||String.fromCharCode;function B(V){var X=V.replace(d,"");return X=X.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(ie,de){if(de=de.toLowerCase(),de[0]==="#"){var ae;return de[1]==="x"?ae=parseInt(de.slice(2),16):ae=Number(de.slice(1)),L(ae)}else{var U=b[de];return U||ie}}),X}r.languages.md=r.languages.markdown})(e)}return kce}var Ice,S8e;function lxr(){if(S8e)return Ice;S8e=1,Ice=t,t.displayName="matlab",t.aliases=[];function t(e){e.languages.matlab={comment:[/%\{[\s\S]*?\}%/,/%.+/],string:{pattern:/\B'(?:''|[^'\r\n])*'/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+)?(?:[ij])?|\b[ij]\b/,keyword:/\b(?:NaN|break|case|catch|continue|else|elseif|end|for|function|if|inf|otherwise|parfor|pause|pi|return|switch|try|while)\b/,function:/\b(?!\d)\w+(?=\s*\()/,operator:/\.?[*^\/\\']|[+\-:@]|[<>=~]=?|&&?|\|\|?/,punctuation:/\.{3}|[.,;\[\](){}!]/}}return Ice}var Pce,T8e;function uxr(){if(T8e)return Pce;T8e=1,Pce=t,t.displayName="maxscript",t.aliases=[];function t(e){(function(r){var n=/\b(?:about|and|animate|as|at|attributes|by|case|catch|collect|continue|coordsys|do|else|exit|fn|for|from|function|global|if|in|local|macroscript|mapped|max|not|of|off|on|or|parameters|persistent|plugin|rcmenu|return|rollout|set|struct|then|throw|to|tool|try|undo|utility|when|where|while|with)\b/i;r.languages.maxscript={comment:{pattern:/\/\*[\s\S]*?(?:\*\/|$)|--.*/,greedy:!0},string:{pattern:/(^|[^"\\@])(?:"(?:[^"\\]|\\[\s\S])*"|@"[^"]*")/,lookbehind:!0,greedy:!0},path:{pattern:/\$(?:[\w/\\.*?]|'[^']*')*/,greedy:!0,alias:"string"},"function-call":{pattern:RegExp("((?:"+(/^/.source+"|"+/[;=<>+\-*/^({\[]/.source+"|"+/\b(?:and|by|case|catch|collect|do|else|if|in|not|or|return|then|to|try|where|while|with)\b/.source)+")[ 	]*)(?!"+n.source+")"+/[a-z_]\w*\b/.source+"(?=[ 	]*(?:"+("(?!"+n.source+")"+/[a-z_]/.source+"|"+/\d|-\.?\d/.source+"|"+/[({'"$@#?]/.source)+"))","im"),lookbehind:!0,greedy:!0,alias:"function"},"function-definition":{pattern:/(\b(?:fn|function)\s+)\w+\b/i,lookbehind:!0,alias:"function"},argument:{pattern:/\b[a-z_]\w*(?=:)/i,alias:"attr-name"},keyword:n,boolean:/\b(?:false|true)\b/,time:{pattern:/(^|[^\w.])(?:(?:(?:\d+(?:\.\d*)?|\.\d+)(?:[eEdD][+-]\d+|[LP])?[msft])+|\d+:\d+(?:\.\d*)?)(?![\w.:])/,lookbehind:!0,alias:"number"},number:[{pattern:/(^|[^\w.])(?:(?:\d+(?:\.\d*)?|\.\d+)(?:[eEdD][+-]\d+|[LP])?|0x[a-fA-F0-9]+)(?![\w.:])/,lookbehind:!0},/\b(?:e|pi)\b/],constant:/\b(?:dontcollect|ok|silentValue|undefined|unsupplied)\b/,color:{pattern:/\b(?:black|blue|brown|gray|green|orange|red|white|yellow)\b/i,alias:"constant"},operator:/[-+*/<>=!]=?|[&^?]|#(?!\()/,punctuation:/[()\[\]{}.:,;]|#(?=\()|\\$/m}})(e)}return Pce}var Dce,E8e;function cxr(){if(E8e)return Dce;E8e=1,Dce=t,t.displayName="mel",t.aliases=[];function t(e){e.languages.mel={comment:/\/\/.*/,code:{pattern:/`(?:\\.|[^\\`\r\n])*`/,greedy:!0,alias:"italic",inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"}}},string:{pattern:/"(?:\\.|[^\\"\r\n])*"/,greedy:!0},variable:/\$\w+/,number:/\b0x[\da-fA-F]+\b|\b\d+(?:\.\d*)?|\B\.\d+/,flag:{pattern:/-[^\d\W]\w*/,alias:"operator"},keyword:/\b(?:break|case|continue|default|do|else|float|for|global|if|in|int|matrix|proc|return|string|switch|vector|while)\b/,function:/\b\w+(?=\()|\b(?:CBG|HfAddAttractorToAS|HfAssignAS|HfBuildEqualMap|HfBuildFurFiles|HfBuildFurImages|HfCancelAFR|HfConnectASToHF|HfCreateAttractor|HfDeleteAS|HfEditAS|HfPerformCreateAS|HfRemoveAttractorFromAS|HfSelectAttached|HfSelectAttractors|HfUnAssignAS|Mayatomr|about|abs|addAttr|addAttributeEditorNodeHelp|addDynamic|addNewShelfTab|addPP|addPanelCategory|addPrefixToName|advanceToNextDrivenKey|affectedNet|affects|aimConstraint|air|alias|aliasAttr|align|alignCtx|alignCurve|alignSurface|allViewFit|ambientLight|angle|angleBetween|animCone|animCurveEditor|animDisplay|animView|annotate|appendStringArray|applicationName|applyAttrPreset|applyTake|arcLenDimContext|arcLengthDimension|arclen|arrayMapper|art3dPaintCtx|artAttrCtx|artAttrPaintVertexCtx|artAttrSkinPaintCtx|artAttrTool|artBuildPaintMenu|artFluidAttrCtx|artPuttyCtx|artSelectCtx|artSetPaintCtx|artUserPaintCtx|assignCommand|assignInputDevice|assignViewportFactories|attachCurve|attachDeviceAttr|attachSurface|attrColorSliderGrp|attrCompatibility|attrControlGrp|attrEnumOptionMenu|attrEnumOptionMenuGrp|attrFieldGrp|attrFieldSliderGrp|attrNavigationControlGrp|attrPresetEditWin|attributeExists|attributeInfo|attributeMenu|attributeQuery|autoKeyframe|autoPlace|bakeClip|bakeFluidShading|bakePartialHistory|bakeResults|bakeSimulation|basename|basenameEx|batchRender|bessel|bevel|bevelPlus|binMembership|bindSkin|blend2|blendShape|blendShapeEditor|blendShapePanel|blendTwoAttr|blindDataType|boneLattice|boundary|boxDollyCtx|boxZoomCtx|bufferCurve|buildBookmarkMenu|buildKeyframeMenu|button|buttonManip|cacheFile|cacheFileCombine|cacheFileMerge|cacheFileTrack|camera|cameraView|canCreateManip|canvas|capitalizeString|catch|catchQuiet|ceil|changeSubdivComponentDisplayLevel|changeSubdivRegion|channelBox|character|characterMap|characterOutlineEditor|characterize|chdir|checkBox|checkBoxGrp|checkDefaultRenderGlobals|choice|circle|circularFillet|clamp|clear|clearCache|clip|clipEditor|clipEditorCurrentTimeCtx|clipSchedule|clipSchedulerOutliner|clipTrimBefore|closeCurve|closeSurface|cluster|cmdFileOutput|cmdScrollFieldExecuter|cmdScrollFieldReporter|cmdShell|coarsenSubdivSelectionList|collision|color|colorAtPoint|colorEditor|colorIndex|colorIndexSliderGrp|colorSliderButtonGrp|colorSliderGrp|columnLayout|commandEcho|commandLine|commandPort|compactHairSystem|componentEditor|compositingInterop|computePolysetVolume|condition|cone|confirmDialog|connectAttr|connectControl|connectDynamic|connectJoint|connectionInfo|constrain|constrainValue|constructionHistory|container|containsMultibyte|contextInfo|control|convertFromOldLayers|convertIffToPsd|convertLightmap|convertSolidTx|convertTessellation|convertUnit|copyArray|copyFlexor|copyKey|copySkinWeights|cos|cpButton|cpCache|cpClothSet|cpCollision|cpConstraint|cpConvClothToMesh|cpForces|cpGetSolverAttr|cpPanel|cpProperty|cpRigidCollisionFilter|cpSeam|cpSetEdit|cpSetSolverAttr|cpSolver|cpSolverTypes|cpTool|cpUpdateClothUVs|createDisplayLayer|createDrawCtx|createEditor|createLayeredPsdFile|createMotionField|createNewShelf|createNode|createRenderLayer|createSubdivRegion|cross|crossProduct|ctxAbort|ctxCompletion|ctxEditMode|ctxTraverse|currentCtx|currentTime|currentTimeCtx|currentUnit|curve|curveAddPtCtx|curveCVCtx|curveEPCtx|curveEditorCtx|curveIntersect|curveMoveEPCtx|curveOnSurface|curveSketchCtx|cutKey|cycleCheck|cylinder|dagPose|date|defaultLightListCheckBox|defaultNavigation|defineDataServer|defineVirtualDevice|deformer|deg_to_rad|delete|deleteAttr|deleteShadingGroupsAndMaterials|deleteShelfTab|deleteUI|deleteUnusedBrushes|delrandstr|detachCurve|detachDeviceAttr|detachSurface|deviceEditor|devicePanel|dgInfo|dgdirty|dgeval|dgtimer|dimWhen|directKeyCtx|directionalLight|dirmap|dirname|disable|disconnectAttr|disconnectJoint|diskCache|displacementToPoly|displayAffected|displayColor|displayCull|displayLevelOfDetail|displayPref|displayRGBColor|displaySmoothness|displayStats|displayString|displaySurface|distanceDimContext|distanceDimension|doBlur|dolly|dollyCtx|dopeSheetEditor|dot|dotProduct|doubleProfileBirailSurface|drag|dragAttrContext|draggerContext|dropoffLocator|duplicate|duplicateCurve|duplicateSurface|dynCache|dynControl|dynExport|dynExpression|dynGlobals|dynPaintEditor|dynParticleCtx|dynPref|dynRelEdPanel|dynRelEditor|dynamicLoad|editAttrLimits|editDisplayLayerGlobals|editDisplayLayerMembers|editRenderLayerAdjustment|editRenderLayerGlobals|editRenderLayerMembers|editor|editorTemplate|effector|emit|emitter|enableDevice|encodeString|endString|endsWith|env|equivalent|equivalentTol|erf|error|eval|evalDeferred|evalEcho|event|exactWorldBoundingBox|exclusiveLightCheckBox|exec|executeForEachObject|exists|exp|expression|expressionEditorListen|extendCurve|extendSurface|extrude|fcheck|fclose|feof|fflush|fgetline|fgetword|file|fileBrowserDialog|fileDialog|fileExtension|fileInfo|filetest|filletCurve|filter|filterCurve|filterExpand|filterStudioImport|findAllIntersections|findAnimCurves|findKeyframe|findMenuItem|findRelatedSkinCluster|finder|firstParentOf|fitBspline|flexor|floatEq|floatField|floatFieldGrp|floatScrollBar|floatSlider|floatSlider2|floatSliderButtonGrp|floatSliderGrp|floor|flow|fluidCacheInfo|fluidEmitter|fluidVoxelInfo|flushUndo|fmod|fontDialog|fopen|formLayout|format|fprint|frameLayout|fread|freeFormFillet|frewind|fromNativePath|fwrite|gamma|gauss|geometryConstraint|getApplicationVersionAsFloat|getAttr|getClassification|getDefaultBrush|getFileList|getFluidAttr|getInputDeviceRange|getMayaPanelTypes|getModifiers|getPanel|getParticleAttr|getPluginResource|getenv|getpid|glRender|glRenderEditor|globalStitch|gmatch|goal|gotoBindPose|grabColor|gradientControl|gradientControlNoAttr|graphDollyCtx|graphSelectContext|graphTrackCtx|gravity|grid|gridLayout|group|groupObjectsByName|hardenPointCurve|hardware|hardwareRenderPanel|headsUpDisplay|headsUpMessage|help|helpLine|hermite|hide|hilite|hitTest|hotBox|hotkey|hotkeyCheck|hsv_to_rgb|hudButton|hudSlider|hudSliderButton|hwReflectionMap|hwRender|hwRenderLoad|hyperGraph|hyperPanel|hyperShade|hypot|iconTextButton|iconTextCheckBox|iconTextRadioButton|iconTextRadioCollection|iconTextScrollList|iconTextStaticLabel|ikHandle|ikHandleCtx|ikHandleDisplayScale|ikSolver|ikSplineHandleCtx|ikSystem|ikSystemInfo|ikfkDisplayMethod|illustratorCurves|image|imfPlugins|inheritTransform|insertJoint|insertJointCtx|insertKeyCtx|insertKnotCurve|insertKnotSurface|instance|instanceable|instancer|intField|intFieldGrp|intScrollBar|intSlider|intSliderGrp|interToUI|internalVar|intersect|iprEngine|isAnimCurve|isConnected|isDirty|isParentOf|isSameObject|isTrue|isValidObjectName|isValidString|isValidUiName|isolateSelect|itemFilter|itemFilterAttr|itemFilterRender|itemFilterType|joint|jointCluster|jointCtx|jointDisplayScale|jointLattice|keyTangent|keyframe|keyframeOutliner|keyframeRegionCurrentTimeCtx|keyframeRegionDirectKeyCtx|keyframeRegionDollyCtx|keyframeRegionInsertKeyCtx|keyframeRegionMoveKeyCtx|keyframeRegionScaleKeyCtx|keyframeRegionSelectKeyCtx|keyframeRegionSetKeyCtx|keyframeRegionTrackCtx|keyframeStats|lassoContext|lattice|latticeDeformKeyCtx|launch|launchImageEditor|layerButton|layeredShaderPort|layeredTexturePort|layout|layoutDialog|lightList|lightListEditor|lightListPanel|lightlink|lineIntersection|linearPrecision|linstep|listAnimatable|listAttr|listCameras|listConnections|listDeviceAttachments|listHistory|listInputDeviceAxes|listInputDeviceButtons|listInputDevices|listMenuAnnotation|listNodeTypes|listPanelCategories|listRelatives|listSets|listTransforms|listUnselected|listerEditor|loadFluid|loadNewShelf|loadPlugin|loadPluginLanguageResources|loadPrefObjects|localizedPanelLabel|lockNode|loft|log|longNameOf|lookThru|ls|lsThroughFilter|lsType|lsUI|mag|makeIdentity|makeLive|makePaintable|makeRoll|makeSingleSurface|makeTubeOn|makebot|manipMoveContext|manipMoveLimitsCtx|manipOptions|manipRotateContext|manipRotateLimitsCtx|manipScaleContext|manipScaleLimitsCtx|marker|match|max|memory|menu|menuBarLayout|menuEditor|menuItem|menuItemToShelf|menuSet|menuSetPref|messageLine|min|minimizeApp|mirrorJoint|modelCurrentTimeCtx|modelEditor|modelPanel|mouse|movIn|movOut|move|moveIKtoFK|moveKeyCtx|moveVertexAlongDirection|multiProfileBirailSurface|mute|nParticle|nameCommand|nameField|namespace|namespaceInfo|newPanelItems|newton|nodeCast|nodeIconButton|nodeOutliner|nodePreset|nodeType|noise|nonLinear|normalConstraint|normalize|nurbsBoolean|nurbsCopyUVSet|nurbsCube|nurbsEditUV|nurbsPlane|nurbsSelect|nurbsSquare|nurbsToPoly|nurbsToPolygonsPref|nurbsToSubdiv|nurbsToSubdivPref|nurbsUVSet|nurbsViewDirectionVector|objExists|objectCenter|objectLayer|objectType|objectTypeUI|obsoleteProc|oceanNurbsPreviewPlane|offsetCurve|offsetCurveOnSurface|offsetSurface|openGLExtension|openMayaPref|optionMenu|optionMenuGrp|optionVar|orbit|orbitCtx|orientConstraint|outlinerEditor|outlinerPanel|overrideModifier|paintEffectsDisplay|pairBlend|palettePort|paneLayout|panel|panelConfiguration|panelHistory|paramDimContext|paramDimension|paramLocator|parent|parentConstraint|particle|particleExists|particleInstancer|particleRenderInfo|partition|pasteKey|pathAnimation|pause|pclose|percent|performanceOptions|pfxstrokes|pickWalk|picture|pixelMove|planarSrf|plane|play|playbackOptions|playblast|plugAttr|plugNode|pluginInfo|pluginResourceUtil|pointConstraint|pointCurveConstraint|pointLight|pointMatrixMult|pointOnCurve|pointOnSurface|pointPosition|poleVectorConstraint|polyAppend|polyAppendFacetCtx|polyAppendVertex|polyAutoProjection|polyAverageNormal|polyAverageVertex|polyBevel|polyBlendColor|polyBlindData|polyBoolOp|polyBridgeEdge|polyCacheMonitor|polyCheck|polyChipOff|polyClipboard|polyCloseBorder|polyCollapseEdge|polyCollapseFacet|polyColorBlindData|polyColorDel|polyColorPerVertex|polyColorSet|polyCompare|polyCone|polyCopyUV|polyCrease|polyCreaseCtx|polyCreateFacet|polyCreateFacetCtx|polyCube|polyCut|polyCutCtx|polyCylinder|polyCylindricalProjection|polyDelEdge|polyDelFacet|polyDelVertex|polyDuplicateAndConnect|polyDuplicateEdge|polyEditUV|polyEditUVShell|polyEvaluate|polyExtrudeEdge|polyExtrudeFacet|polyExtrudeVertex|polyFlipEdge|polyFlipUV|polyForceUV|polyGeoSampler|polyHelix|polyInfo|polyInstallAction|polyLayoutUV|polyListComponentConversion|polyMapCut|polyMapDel|polyMapSew|polyMapSewMove|polyMergeEdge|polyMergeEdgeCtx|polyMergeFacet|polyMergeFacetCtx|polyMergeUV|polyMergeVertex|polyMirrorFace|polyMoveEdge|polyMoveFacet|polyMoveFacetUV|polyMoveUV|polyMoveVertex|polyNormal|polyNormalPerVertex|polyNormalizeUV|polyOptUvs|polyOptions|polyOutput|polyPipe|polyPlanarProjection|polyPlane|polyPlatonicSolid|polyPoke|polyPrimitive|polyPrism|polyProjection|polyPyramid|polyQuad|polyQueryBlindData|polyReduce|polySelect|polySelectConstraint|polySelectConstraintMonitor|polySelectCtx|polySelectEditCtx|polySeparate|polySetToFaceNormal|polySewEdge|polyShortestPathCtx|polySmooth|polySoftEdge|polySphere|polySphericalProjection|polySplit|polySplitCtx|polySplitEdge|polySplitRing|polySplitVertex|polyStraightenUVBorder|polySubdivideEdge|polySubdivideFacet|polyToSubdiv|polyTorus|polyTransfer|polyTriangulate|polyUVSet|polyUnite|polyWedgeFace|popen|popupMenu|pose|pow|preloadRefEd|print|progressBar|progressWindow|projFileViewer|projectCurve|projectTangent|projectionContext|projectionManip|promptDialog|propModCtx|propMove|psdChannelOutliner|psdEditTextureFile|psdExport|psdTextureFile|putenv|pwd|python|querySubdiv|quit|rad_to_deg|radial|radioButton|radioButtonGrp|radioCollection|radioMenuItemCollection|rampColorPort|rand|randomizeFollicles|randstate|rangeControl|readTake|rebuildCurve|rebuildSurface|recordAttr|recordDevice|redo|reference|referenceEdit|referenceQuery|refineSubdivSelectionList|refresh|refreshAE|registerPluginResource|rehash|reloadImage|removeJoint|removeMultiInstance|removePanelCategory|rename|renameAttr|renameSelectionList|renameUI|render|renderGlobalsNode|renderInfo|renderLayerButton|renderLayerParent|renderLayerPostProcess|renderLayerUnparent|renderManip|renderPartition|renderQualityNode|renderSettings|renderThumbnailUpdate|renderWindowEditor|renderWindowSelectContext|renderer|reorder|reorderDeformers|requires|reroot|resampleFluid|resetAE|resetPfxToPolyCamera|resetTool|resolutionNode|retarget|reverseCurve|reverseSurface|revolve|rgb_to_hsv|rigidBody|rigidSolver|roll|rollCtx|rootOf|rot|rotate|rotationInterpolation|roundConstantRadius|rowColumnLayout|rowLayout|runTimeCommand|runup|sampleImage|saveAllShelves|saveAttrPreset|saveFluid|saveImage|saveInitialState|saveMenu|savePrefObjects|savePrefs|saveShelf|saveToolSettings|scale|scaleBrushBrightness|scaleComponents|scaleConstraint|scaleKey|scaleKeyCtx|sceneEditor|sceneUIReplacement|scmh|scriptCtx|scriptEditorInfo|scriptJob|scriptNode|scriptTable|scriptToShelf|scriptedPanel|scriptedPanelType|scrollField|scrollLayout|sculpt|searchPathArray|seed|selLoadSettings|select|selectContext|selectCurveCV|selectKey|selectKeyCtx|selectKeyframeRegionCtx|selectMode|selectPref|selectPriority|selectType|selectedNodes|selectionConnection|separator|setAttr|setAttrEnumResource|setAttrMapping|setAttrNiceNameResource|setConstraintRestPosition|setDefaultShadingGroup|setDrivenKeyframe|setDynamic|setEditCtx|setEditor|setFluidAttr|setFocus|setInfinity|setInputDeviceMapping|setKeyCtx|setKeyPath|setKeyframe|setKeyframeBlendshapeTargetWts|setMenuMode|setNodeNiceNameResource|setNodeTypeFlag|setParent|setParticleAttr|setPfxToPolyCamera|setPluginResource|setProject|setStampDensity|setStartupMessage|setState|setToolTo|setUITemplate|setXformManip|sets|shadingConnection|shadingGeometryRelCtx|shadingLightRelCtx|shadingNetworkCompare|shadingNode|shapeCompare|shelfButton|shelfLayout|shelfTabLayout|shellField|shortNameOf|showHelp|showHidden|showManipCtx|showSelectionInTitle|showShadingGroupAttrEditor|showWindow|sign|simplify|sin|singleProfileBirailSurface|size|sizeBytes|skinCluster|skinPercent|smoothCurve|smoothTangentSurface|smoothstep|snap2to2|snapKey|snapMode|snapTogetherCtx|snapshot|soft|softMod|softModCtx|sort|sound|soundControl|source|spaceLocator|sphere|sphrand|spotLight|spotLightPreviewPort|spreadSheetEditor|spring|sqrt|squareSurface|srtContext|stackTrace|startString|startsWith|stitchAndExplodeShell|stitchSurface|stitchSurfacePoints|strcmp|stringArrayCatenate|stringArrayContains|stringArrayCount|stringArrayInsertAtIndex|stringArrayIntersector|stringArrayRemove|stringArrayRemoveAtIndex|stringArrayRemoveDuplicates|stringArrayRemoveExact|stringArrayToString|stringToStringArray|strip|stripPrefixFromName|stroke|subdAutoProjection|subdCleanTopology|subdCollapse|subdDuplicateAndConnect|subdEditUV|subdListComponentConversion|subdMapCut|subdMapSewMove|subdMatchTopology|subdMirror|subdToBlind|subdToPoly|subdTransferUVsToCache|subdiv|subdivCrease|subdivDisplaySmoothness|substitute|substituteAllString|substituteGeometry|substring|surface|surfaceSampler|surfaceShaderList|swatchDisplayPort|switchTable|symbolButton|symbolCheckBox|sysFile|system|tabLayout|tan|tangentConstraint|texLatticeDeformContext|texManipContext|texMoveContext|texMoveUVShellContext|texRotateContext|texScaleContext|texSelectContext|texSelectShortestPathCtx|texSmudgeUVContext|texWinToolCtx|text|textCurves|textField|textFieldButtonGrp|textFieldGrp|textManip|textScrollList|textToShelf|textureDisplacePlane|textureHairColor|texturePlacementContext|textureWindow|threadCount|threePointArcCtx|timeControl|timePort|timerX|toNativePath|toggle|toggleAxis|toggleWindowVisibility|tokenize|tokenizeList|tolerance|tolower|toolButton|toolCollection|toolDropped|toolHasOptions|toolPropertyWindow|torus|toupper|trace|track|trackCtx|transferAttributes|transformCompare|transformLimits|translator|trim|trunc|truncateFluidCache|truncateHairCache|tumble|tumbleCtx|turbulence|twoPointArcCtx|uiRes|uiTemplate|unassignInputDevice|undo|undoInfo|ungroup|uniform|unit|unloadPlugin|untangleUV|untitledFileName|untrim|upAxis|updateAE|userCtx|uvLink|uvSnapshot|validateShelfName|vectorize|view2dToolCtx|viewCamera|viewClipPlane|viewFit|viewHeadOn|viewLookAt|viewManip|viewPlace|viewSet|visor|volumeAxis|vortex|waitCursor|warning|webBrowser|webBrowserPrefs|whatIs|window|windowPref|wire|wireContext|workspace|wrinkle|wrinkleContext|writeTake|xbmLangPathList|xform)\b/,operator:[/\+[+=]?|-[-=]?|&&|\|\||[<>]=|[*\/!=]=?|[%^]/,{pattern:/(^|[^<])<(?!<)/,lookbehind:!0},{pattern:/(^|[^>])>(?!>)/,lookbehind:!0}],punctuation:/<<|>>|[.,:;?\[\](){}]/},e.languages.mel.code.inside.rest=e.languages.mel}return Dce}var Lce,A8e;function fxr(){if(A8e)return Lce;A8e=1,Lce=t,t.displayName="mermaid",t.aliases=[];function t(e){e.languages.mermaid={comment:{pattern:/%%.*/,greedy:!0},style:{pattern:/^([ \t]*(?:classDef|linkStyle|style)[ \t]+[\w$-]+[ \t]+)\w.*[^\s;]/m,lookbehind:!0,inside:{property:/\b\w[\w-]*(?=[ \t]*:)/,operator:/:/,punctuation:/,/}},"inter-arrow-label":{pattern:/([^<>ox.=-])(?:-[-.]|==)(?![<>ox.=-])[ \t]*(?:"[^"\r\n]*"|[^\s".=-](?:[^\r\n.=-]*[^\s.=-])?)[ \t]*(?:\.+->?|--+[->]|==+[=>])(?![<>ox.=-])/,lookbehind:!0,greedy:!0,inside:{arrow:{pattern:/(?:\.+->?|--+[->]|==+[=>])$/,alias:"operator"},label:{pattern:/^([\s\S]{2}[ \t]*)\S(?:[\s\S]*\S)?/,lookbehind:!0,alias:"property"},"arrow-head":{pattern:/^\S+/,alias:["arrow","operator"]}}},arrow:[{pattern:/(^|[^{}|o.-])[|}][|o](?:--|\.\.)[|o][|{](?![{}|o.-])/,lookbehind:!0,alias:"operator"},{pattern:/(^|[^<>ox.=-])(?:[<ox](?:==+|--+|-\.*-)[>ox]?|(?:==+|--+|-\.*-)[>ox]|===+|---+|-\.+-)(?![<>ox.=-])/,lookbehind:!0,alias:"operator"},{pattern:/(^|[^<>()x-])(?:--?(?:>>|[x>)])(?![<>()x])|(?:<<|[x<(])--?(?!-))/,lookbehind:!0,alias:"operator"},{pattern:/(^|[^<>|*o.-])(?:[*o]--|--[*o]|<\|?(?:--|\.\.)|(?:--|\.\.)\|?>|--|\.\.)(?![<>|*o.-])/,lookbehind:!0,alias:"operator"}],label:{pattern:/(^|[^|<])\|(?:[^\r\n"|]|"[^"\r\n]*")+\|/,lookbehind:!0,greedy:!0,alias:"property"},text:{pattern:/(?:[(\[{]+|\b>)(?:[^\r\n"()\[\]{}]|"[^"\r\n]*")+(?:[)\]}]+|>)/,alias:"string"},string:{pattern:/"[^"\r\n]*"/,greedy:!0},annotation:{pattern:/<<(?:abstract|choice|enumeration|fork|interface|join|service)>>|\[\[(?:choice|fork|join)\]\]/i,alias:"important"},keyword:[{pattern:/(^[ \t]*)(?:action|callback|class|classDef|classDiagram|click|direction|erDiagram|flowchart|gantt|gitGraph|graph|journey|link|linkStyle|pie|requirementDiagram|sequenceDiagram|stateDiagram|stateDiagram-v2|style|subgraph)(?![\w$-])/m,lookbehind:!0,greedy:!0},{pattern:/(^[ \t]*)(?:activate|alt|and|as|autonumber|deactivate|else|end(?:[ \t]+note)?|loop|opt|par|participant|rect|state|note[ \t]+(?:over|(?:left|right)[ \t]+of))(?![\w$-])/im,lookbehind:!0,greedy:!0}],entity:/#[a-z0-9]+;/,operator:{pattern:/(\w[ \t]*)&(?=[ \t]*\w)|:::|:/,lookbehind:!0},punctuation:/[(){};]/}}return Lce}var Oce,C8e;function dxr(){if(C8e)return Oce;C8e=1,Oce=t,t.displayName="mizar",t.aliases=[];function t(e){e.languages.mizar={comment:/::.+/,keyword:/@proof\b|\b(?:according|aggregate|all|and|antonym|are|as|associativity|assume|asymmetry|attr|be|begin|being|by|canceled|case|cases|clusters?|coherence|commutativity|compatibility|connectedness|consider|consistency|constructors|contradiction|correctness|def|deffunc|define|definitions?|defpred|do|does|end|environ|equals|ex|exactly|existence|for|from|func|given|hence|hereby|holds|idempotence|identity|iff?|implies|involutiveness|irreflexivity|is|it|let|means|mode|non|not|notations?|now|of|or|otherwise|over|per|pred|prefix|projectivity|proof|provided|qua|reconsider|redefine|reduce|reducibility|reflexivity|registrations?|requirements|reserve|sch|schemes?|section|selector|set|sethood|st|struct|such|suppose|symmetry|synonym|take|that|the|then|theorems?|thesis|thus|to|transitivity|uniqueness|vocabular(?:ies|y)|when|where|with|wrt)\b/,parameter:{pattern:/\$(?:10|\d)/,alias:"variable"},variable:/\b\w+(?=:)/,number:/(?:\b|-)\d+\b/,operator:/\.\.\.|->|&|\.?=/,punctuation:/\(#|#\)|[,:;\[\](){}]/}}return Oce}var Nce,M8e;function hxr(){if(M8e)return Nce;M8e=1,Nce=t,t.displayName="mongodb",t.aliases=[];function t(e){(function(r){var n=["$eq","$gt","$gte","$in","$lt","$lte","$ne","$nin","$and","$not","$nor","$or","$exists","$type","$expr","$jsonSchema","$mod","$regex","$text","$where","$geoIntersects","$geoWithin","$near","$nearSphere","$all","$elemMatch","$size","$bitsAllClear","$bitsAllSet","$bitsAnyClear","$bitsAnySet","$comment","$elemMatch","$meta","$slice","$currentDate","$inc","$min","$max","$mul","$rename","$set","$setOnInsert","$unset","$addToSet","$pop","$pull","$push","$pullAll","$each","$position","$slice","$sort","$bit","$addFields","$bucket","$bucketAuto","$collStats","$count","$currentOp","$facet","$geoNear","$graphLookup","$group","$indexStats","$limit","$listLocalSessions","$listSessions","$lookup","$match","$merge","$out","$planCacheStats","$project","$redact","$replaceRoot","$replaceWith","$sample","$set","$skip","$sort","$sortByCount","$unionWith","$unset","$unwind","$setWindowFields","$abs","$accumulator","$acos","$acosh","$add","$addToSet","$allElementsTrue","$and","$anyElementTrue","$arrayElemAt","$arrayToObject","$asin","$asinh","$atan","$atan2","$atanh","$avg","$binarySize","$bsonSize","$ceil","$cmp","$concat","$concatArrays","$cond","$convert","$cos","$dateFromParts","$dateToParts","$dateFromString","$dateToString","$dayOfMonth","$dayOfWeek","$dayOfYear","$degreesToRadians","$divide","$eq","$exp","$filter","$first","$floor","$function","$gt","$gte","$hour","$ifNull","$in","$indexOfArray","$indexOfBytes","$indexOfCP","$isArray","$isNumber","$isoDayOfWeek","$isoWeek","$isoWeekYear","$last","$last","$let","$literal","$ln","$log","$log10","$lt","$lte","$ltrim","$map","$max","$mergeObjects","$meta","$min","$millisecond","$minute","$mod","$month","$multiply","$ne","$not","$objectToArray","$or","$pow","$push","$radiansToDegrees","$range","$reduce","$regexFind","$regexFindAll","$regexMatch","$replaceOne","$replaceAll","$reverseArray","$round","$rtrim","$second","$setDifference","$setEquals","$setIntersection","$setIsSubset","$setUnion","$size","$sin","$slice","$split","$sqrt","$stdDevPop","$stdDevSamp","$strcasecmp","$strLenBytes","$strLenCP","$substr","$substrBytes","$substrCP","$subtract","$sum","$switch","$tan","$toBool","$toDate","$toDecimal","$toDouble","$toInt","$toLong","$toObjectId","$toString","$toLower","$toUpper","$trim","$trunc","$type","$week","$year","$zip","$count","$dateAdd","$dateDiff","$dateSubtract","$dateTrunc","$getField","$rand","$sampleRate","$setField","$unsetField","$comment","$explain","$hint","$max","$maxTimeMS","$min","$orderby","$query","$returnKey","$showDiskLoc","$natural"],i=["ObjectId","Code","BinData","DBRef","Timestamp","NumberLong","NumberDecimal","MaxKey","MinKey","RegExp","ISODate","UUID"];n=n.map(function(o){return o.replace("$","\\$")});var a="(?:"+n.join("|")+")\\b";r.languages.mongodb=r.languages.extend("javascript",{}),r.languages.insertBefore("mongodb","string",{property:{pattern:/(?:(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)(?=\s*:)/,greedy:!0,inside:{keyword:RegExp(`^(['"])?`+a+"(?:\\1)?$")}}}),r.languages.mongodb.string.inside={url:{pattern:/https?:\/\/[-\w@:%.+~#=]{1,256}\.[a-z0-9()]{1,6}\b[-\w()@:%+.~#?&/=]*/i,greedy:!0},entity:{pattern:/\b(?:(?:[01]?\d\d?|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d\d?|2[0-4]\d|25[0-5])\b/,greedy:!0}},r.languages.insertBefore("mongodb","constant",{builtin:{pattern:RegExp("\\b(?:"+i.join("|")+")\\b"),alias:"keyword"}})})(e)}return Nce}var Fce,R8e;function pxr(){if(R8e)return Fce;R8e=1,Fce=t,t.displayName="monkey",t.aliases=[];function t(e){e.languages.monkey={comment:{pattern:/^#Rem\s[\s\S]*?^#End|'.+/im,greedy:!0},string:{pattern:/"[^"\r\n]*"/,greedy:!0},preprocessor:{pattern:/(^[ \t]*)#.+/m,lookbehind:!0,greedy:!0,alias:"property"},function:/\b\w+(?=\()/,"type-char":{pattern:/\b[?%#$]/,alias:"class-name"},number:{pattern:/((?:\.\.)?)(?:(?:\b|\B-\.?|\B\.)\d+(?:(?!\.\.)\.\d*)?|\$[\da-f]+)/i,lookbehind:!0},keyword:/\b(?:Abstract|Array|Bool|Case|Catch|Class|Const|Continue|Default|Eachin|Else|ElseIf|End|EndIf|Exit|Extends|Extern|False|Field|Final|Float|For|Forever|Function|Global|If|Implements|Import|Inline|Int|Interface|Local|Method|Module|New|Next|Null|Object|Private|Property|Public|Repeat|Return|Select|Self|Step|Strict|String|Super|Then|Throw|To|True|Try|Until|Void|Wend|While)\b/i,operator:/\.\.|<[=>]?|>=?|:?=|(?:[+\-*\/&~|]|\b(?:Mod|Shl|Shr)\b)=?|\b(?:And|Not|Or)\b/i,punctuation:/[.,:;()\[\]]/}}return Fce}var zce,k8e;function vxr(){if(k8e)return zce;k8e=1,zce=t,t.displayName="moonscript",t.aliases=["moon"];function t(e){e.languages.moonscript={comment:/--.*/,string:[{pattern:/'[^']*'|\[(=*)\[[\s\S]*?\]\1\]/,greedy:!0},{pattern:/"[^"]*"/,greedy:!0,inside:{interpolation:{pattern:/#\{[^{}]*\}/,inside:{moonscript:{pattern:/(^#\{)[\s\S]+(?=\})/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/#\{|\}/,alias:"punctuation"}}}}}],"class-name":[{pattern:/(\b(?:class|extends)[ \t]+)\w+/,lookbehind:!0},/\b[A-Z]\w*/],keyword:/\b(?:class|continue|do|else|elseif|export|extends|for|from|if|import|in|local|nil|return|self|super|switch|then|unless|using|when|while|with)\b/,variable:/@@?\w*/,property:{pattern:/\b(?!\d)\w+(?=:)|(:)(?!\d)\w+/,lookbehind:!0},function:{pattern:/\b(?:_G|_VERSION|assert|collectgarbage|coroutine\.(?:create|resume|running|status|wrap|yield)|debug\.(?:debug|getfenv|gethook|getinfo|getlocal|getmetatable|getregistry|getupvalue|setfenv|sethook|setlocal|setmetatable|setupvalue|traceback)|dofile|error|getfenv|getmetatable|io\.(?:close|flush|input|lines|open|output|popen|read|stderr|stdin|stdout|tmpfile|type|write)|ipairs|load|loadfile|loadstring|math\.(?:abs|acos|asin|atan|atan2|ceil|cos|cosh|deg|exp|floor|fmod|frexp|ldexp|log|log10|max|min|modf|pi|pow|rad|random|randomseed|sin|sinh|sqrt|tan|tanh)|module|next|os\.(?:clock|date|difftime|execute|exit|getenv|remove|rename|setlocale|time|tmpname)|package\.(?:cpath|loaded|loadlib|path|preload|seeall)|pairs|pcall|print|rawequal|rawget|rawset|require|select|setfenv|setmetatable|string\.(?:byte|char|dump|find|format|gmatch|gsub|len|lower|match|rep|reverse|sub|upper)|table\.(?:concat|insert|maxn|remove|sort)|tonumber|tostring|type|unpack|xpcall)\b/,inside:{punctuation:/\./}},boolean:/\b(?:false|true)\b/,number:/(?:\B\.\d+|\b\d+\.\d+|\b\d+(?=[eE]))(?:[eE][-+]?\d+)?\b|\b(?:0x[a-fA-F\d]+|\d+)(?:U?LL)?\b/,operator:/\.{3}|[-=]>|~=|(?:[-+*/%<>!=]|\.\.)=?|[:#^]|\b(?:and|or)\b=?|\b(?:not)\b/,punctuation:/[.,()[\]{}\\]/},e.languages.moonscript.string[1].inside.interpolation.inside.moonscript.inside=e.languages.moonscript,e.languages.moon=e.languages.moonscript}return zce}var Bce,I8e;function mxr(){if(I8e)return Bce;I8e=1,Bce=t,t.displayName="n1ql",t.aliases=[];function t(e){e.languages.n1ql={comment:{pattern:/\/\*[\s\S]*?(?:$|\*\/)|--.*/,greedy:!0},string:{pattern:/(["'])(?:\\[\s\S]|(?!\1)[^\\]|\1\1)*\1/,greedy:!0},identifier:{pattern:/`(?:\\[\s\S]|[^\\`]|``)*`/,greedy:!0},parameter:/\$[\w.]+/,keyword:/\b(?:ADVISE|ALL|ALTER|ANALYZE|AS|ASC|AT|BEGIN|BINARY|BOOLEAN|BREAK|BUCKET|BUILD|BY|CALL|CAST|CLUSTER|COLLATE|COLLECTION|COMMIT|COMMITTED|CONNECT|CONTINUE|CORRELATE|CORRELATED|COVER|CREATE|CURRENT|DATABASE|DATASET|DATASTORE|DECLARE|DECREMENT|DELETE|DERIVED|DESC|DESCRIBE|DISTINCT|DO|DROP|EACH|ELEMENT|EXCEPT|EXCLUDE|EXECUTE|EXPLAIN|FETCH|FILTER|FLATTEN|FLUSH|FOLLOWING|FOR|FORCE|FROM|FTS|FUNCTION|GOLANG|GRANT|GROUP|GROUPS|GSI|HASH|HAVING|IF|IGNORE|ILIKE|INCLUDE|INCREMENT|INDEX|INFER|INLINE|INNER|INSERT|INTERSECT|INTO|IS|ISOLATION|JAVASCRIPT|JOIN|KEY|KEYS|KEYSPACE|KNOWN|LANGUAGE|LAST|LEFT|LET|LETTING|LEVEL|LIMIT|LSM|MAP|MAPPING|MATCHED|MATERIALIZED|MERGE|MINUS|MISSING|NAMESPACE|NEST|NL|NO|NTH_VALUE|NULL|NULLS|NUMBER|OBJECT|OFFSET|ON|OPTION|OPTIONS|ORDER|OTHERS|OUTER|OVER|PARSE|PARTITION|PASSWORD|PATH|POOL|PRECEDING|PREPARE|PRIMARY|PRIVATE|PRIVILEGE|PROBE|PROCEDURE|PUBLIC|RANGE|RAW|REALM|REDUCE|RENAME|RESPECT|RETURN|RETURNING|REVOKE|RIGHT|ROLE|ROLLBACK|ROW|ROWS|SATISFIES|SAVEPOINT|SCHEMA|SCOPE|SELECT|SELF|SEMI|SET|SHOW|SOME|START|STATISTICS|STRING|SYSTEM|TIES|TO|TRAN|TRANSACTION|TRIGGER|TRUNCATE|UNBOUNDED|UNDER|UNION|UNIQUE|UNKNOWN|UNNEST|UNSET|UPDATE|UPSERT|USE|USER|USING|VALIDATE|VALUE|VALUES|VIA|VIEW|WHERE|WHILE|WINDOW|WITH|WORK|XOR)\b/i,function:/\b[a-z_]\w*(?=\s*\()/i,boolean:/\b(?:FALSE|TRUE)\b/i,number:/(?:\b\d+\.|\B\.)\d+e[+\-]?\d+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/%]|!=|==?|\|\||<[>=]?|>=?|\b(?:AND|ANY|ARRAY|BETWEEN|CASE|ELSE|END|EVERY|EXISTS|FIRST|IN|LIKE|NOT|OR|THEN|VALUED|WHEN|WITHIN)\b/i,punctuation:/[;[\](),.{}:]/}}return Bce}var Uce,P8e;function gxr(){if(P8e)return Uce;P8e=1,Uce=t,t.displayName="n4js",t.aliases=["n4jsd"];function t(e){e.languages.n4js=e.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),e.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),e.languages.n4jsd=e.languages.n4js}return Uce}var Hce,D8e;function yxr(){if(D8e)return Hce;D8e=1,Hce=t,t.displayName="nand2tetrisHdl",t.aliases=[];function t(e){e.languages["nand2tetris-hdl"]={comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,keyword:/\b(?:BUILTIN|CHIP|CLOCKED|IN|OUT|PARTS)\b/,boolean:/\b(?:false|true)\b/,function:/\b[A-Za-z][A-Za-z0-9]*(?=\()/,number:/\b\d+\b/,operator:/=|\.\./,punctuation:/[{}[\];(),:]/}}return Hce}var jce,L8e;function bxr(){if(L8e)return jce;L8e=1,jce=t,t.displayName="naniscript",t.aliases=[];function t(e){(function(r){var n=/\{[^\r\n\[\]{}]*\}/,i={"quoted-string":{pattern:/"(?:[^"\\]|\\.)*"/,alias:"operator"},"command-param-id":{pattern:/(\s)\w+:/,lookbehind:!0,alias:"property"},"command-param-value":[{pattern:n,alias:"selector"},{pattern:/([\t ])\S+/,lookbehind:!0,greedy:!0,alias:"operator"},{pattern:/\S(?:.*\S)?/,alias:"operator"}]};r.languages.naniscript={comment:{pattern:/^([\t ]*);.*/m,lookbehind:!0},define:{pattern:/^>.+/m,alias:"tag",inside:{value:{pattern:/(^>\w+[\t ]+)(?!\s)[^{}\r\n]+/,lookbehind:!0,alias:"operator"},key:{pattern:/(^>)\w+/,lookbehind:!0}}},label:{pattern:/^([\t ]*)#[\t ]*\w+[\t ]*$/m,lookbehind:!0,alias:"regex"},command:{pattern:/^([\t ]*)@\w+(?=[\t ]|$).*/m,lookbehind:!0,alias:"function",inside:{"command-name":/^@\w+/,expression:{pattern:n,greedy:!0,alias:"selector"},"command-params":{pattern:/\s*\S[\s\S]*/,inside:i}}},"generic-text":{pattern:/(^[ \t]*)[^#@>;\s].*/m,lookbehind:!0,alias:"punctuation",inside:{"escaped-char":/\\[{}\[\]"]/,expression:{pattern:n,greedy:!0,alias:"selector"},"inline-command":{pattern:/\[[\t ]*\w[^\r\n\[\]]*\]/,greedy:!0,alias:"function",inside:{"command-params":{pattern:/(^\[[\t ]*\w+\b)[\s\S]+(?=\]$)/,lookbehind:!0,inside:i},"command-param-name":{pattern:/^(\[[\t ]*)\w+/,lookbehind:!0,alias:"name"},"start-stop-char":/[\[\]]/}}}}},r.languages.nani=r.languages.naniscript,r.hooks.add("after-tokenize",function(s){var d=s.tokens;d.forEach(function(b){if(typeof b!="string"&&b.type==="generic-text"){var L=o(b);a(L)||(b.type="bad-line",b.content=L)}})});function a(s){for(var d="[]{}",b=[],L=0;L<s.length;L++){var B=s[L],V=d.indexOf(B);if(V!==-1){if(V%2===0)b.push(V+1);else if(b.pop()!==V)return!1}}return b.length===0}function o(s){return typeof s=="string"?s:Array.isArray(s)?s.map(o).join(""):o(s.content)}})(e)}return jce}var Vce,O8e;function xxr(){if(O8e)return Vce;O8e=1,Vce=t,t.displayName="nasm",t.aliases=[];function t(e){e.languages.nasm={comment:/;.*$/m,string:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,label:{pattern:/(^\s*)[A-Za-z._?$][\w.?$@~#]*:/m,lookbehind:!0,alias:"function"},keyword:[/\[?BITS (?:16|32|64)\]?/,{pattern:/(^\s*)section\s*[a-z.]+:?/im,lookbehind:!0},/(?:extern|global)[^;\r\n]*/i,/(?:CPU|DEFAULT|FLOAT).*$/m],register:{pattern:/\b(?:st\d|[xyz]mm\d\d?|[cdt]r\d|r\d\d?[bwd]?|[er]?[abcd]x|[abcd][hl]|[er]?(?:bp|di|si|sp)|[cdefgs]s)\b/i,alias:"variable"},number:/(?:\b|(?=\$))(?:0[hx](?:\.[\da-f]+|[\da-f]+(?:\.[\da-f]+)?)(?:p[+-]?\d+)?|\d[\da-f]+[hx]|\$\d[\da-f]*|0[oq][0-7]+|[0-7]+[oq]|0[by][01]+|[01]+[by]|0[dt]\d+|(?:\d+(?:\.\d+)?|\.\d+)(?:\.?e[+-]?\d+)?[dt]?)\b/i,operator:/[\[\]*+\-\/%<>=&|$!]/}}return Vce}var qce,N8e;function _xr(){if(N8e)return qce;N8e=1,qce=t,t.displayName="neon",t.aliases=[];function t(e){e.languages.neon={comment:{pattern:/#.*/,greedy:!0},datetime:{pattern:/(^|[[{(=:,\s])\d\d\d\d-\d\d?-\d\d?(?:(?:[Tt]| +)\d\d?:\d\d:\d\d(?:\.\d*)? *(?:Z|[-+]\d\d?(?::?\d\d)?)?)?(?=$|[\]}),\s])/,lookbehind:!0,alias:"number"},key:{pattern:/(^|[[{(,\s])[^,:=[\]{}()'"\s]+(?=\s*:(?:$|[\]}),\s])|\s*=)/,lookbehind:!0,alias:"atrule"},number:{pattern:/(^|[[{(=:,\s])[+-]?(?:0x[\da-fA-F]+|0o[0-7]+|0b[01]+|(?:\d+(?:\.\d*)?|\.?\d+)(?:[eE][+-]?\d+)?)(?=$|[\]}),:=\s])/,lookbehind:!0},boolean:{pattern:/(^|[[{(=:,\s])(?:false|no|true|yes)(?=$|[\]}),:=\s])/i,lookbehind:!0},null:{pattern:/(^|[[{(=:,\s])(?:null)(?=$|[\]}),:=\s])/i,lookbehind:!0,alias:"keyword"},string:{pattern:/(^|[[{(=:,\s])(?:('''|""")\r?\n(?:(?:[^\r\n]|\r?\n(?![\t ]*\2))*\r?\n)?[\t ]*\2|'[^'\r\n]*'|"(?:\\.|[^\\"\r\n])*")/,lookbehind:!0,greedy:!0},literal:{pattern:/(^|[[{(=:,\s])(?:[^#"',:=[\]{}()\s`-]|[:-][^"',=[\]{}()\s])(?:[^,:=\]})(\s]|:(?![\s,\]})]|$)|[ \t]+[^#,:=\]})(\s])*/,lookbehind:!0,alias:"string"},punctuation:/[,:=[\]{}()-]/}}return qce}var Gce,F8e;function wxr(){if(F8e)return Gce;F8e=1,Gce=t,t.displayName="nevod",t.aliases=[];function t(e){e.languages.nevod={comment:/\/\/.*|(?:\/\*[\s\S]*?(?:\*\/|$))/,string:{pattern:/(?:"(?:""|[^"])*"(?!")|'(?:''|[^'])*'(?!'))!?\*?/,greedy:!0,inside:{"string-attrs":/!$|!\*$|\*$/}},namespace:{pattern:/(@namespace\s+)[a-zA-Z0-9\-.]+(?=\s*\{)/,lookbehind:!0},pattern:{pattern:/(@pattern\s+)?#?[a-zA-Z0-9\-.]+(?:\s*\(\s*(?:~\s*)?[a-zA-Z0-9\-.]+\s*(?:,\s*(?:~\s*)?[a-zA-Z0-9\-.]*)*\))?(?=\s*=)/,lookbehind:!0,inside:{"pattern-name":{pattern:/^#?[a-zA-Z0-9\-.]+/,alias:"class-name"},fields:{pattern:/\(.*\)/,inside:{"field-name":{pattern:/[a-zA-Z0-9\-.]+/,alias:"variable"},punctuation:/[,()]/,operator:{pattern:/~/,alias:"field-hidden-mark"}}}}},search:{pattern:/(@search\s+|#)[a-zA-Z0-9\-.]+(?:\.\*)?(?=\s*;)/,alias:"function",lookbehind:!0},keyword:/@(?:having|inside|namespace|outside|pattern|require|search|where)\b/,"standard-pattern":{pattern:/\b(?:Alpha|AlphaNum|Any|Blank|End|LineBreak|Num|NumAlpha|Punct|Space|Start|Symbol|Word|WordBreak)\b(?:\([a-zA-Z0-9\-.,\s+]*\))?/,inside:{"standard-pattern-name":{pattern:/^[a-zA-Z0-9\-.]+/,alias:"builtin"},quantifier:{pattern:/\b\d+(?:\s*\+|\s*-\s*\d+)?(?!\w)/,alias:"number"},"standard-pattern-attr":{pattern:/[a-zA-Z0-9\-.]+/,alias:"builtin"},punctuation:/[,()]/}},quantifier:{pattern:/\b\d+(?:\s*\+|\s*-\s*\d+)?(?!\w)/,alias:"number"},operator:[{pattern:/=/,alias:"pattern-def"},{pattern:/&/,alias:"conjunction"},{pattern:/~/,alias:"exception"},{pattern:/\?/,alias:"optionality"},{pattern:/[[\]]/,alias:"repetition"},{pattern:/[{}]/,alias:"variation"},{pattern:/[+_]/,alias:"sequence"},{pattern:/\.{2,3}/,alias:"span"}],"field-capture":[{pattern:/([a-zA-Z0-9\-.]+\s*\()\s*[a-zA-Z0-9\-.]+\s*:\s*[a-zA-Z0-9\-.]+(?:\s*,\s*[a-zA-Z0-9\-.]+\s*:\s*[a-zA-Z0-9\-.]+)*(?=\s*\))/,lookbehind:!0,inside:{"field-name":{pattern:/[a-zA-Z0-9\-.]+/,alias:"variable"},colon:/:/}},{pattern:/[a-zA-Z0-9\-.]+\s*:/,inside:{"field-name":{pattern:/[a-zA-Z0-9\-.]+/,alias:"variable"},colon:/:/}}],punctuation:/[:;,()]/,name:/[a-zA-Z0-9\-.]+/}}return Gce}var $ce,z8e;function Sxr(){if(z8e)return $ce;z8e=1,$ce=t,t.displayName="nginx",t.aliases=[];function t(e){(function(r){var n=/\$(?:\w[a-z\d]*(?:_[^\x00-\x1F\s"'\\()$]*)?|\{[^}\s"'\\]+\})/i;r.languages.nginx={comment:{pattern:/(^|[\s{};])#.*/,lookbehind:!0,greedy:!0},directive:{pattern:/(^|\s)\w(?:[^;{}"'\\\s]|\\.|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|\s+(?:#.*(?!.)|(?![#\s])))*?(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:{string:{pattern:/((?:^|[^\\])(?:\\\\)*)(?:"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/,lookbehind:!0,greedy:!0,inside:{escape:{pattern:/\\["'\\nrt]/,alias:"entity"},variable:n}},comment:{pattern:/(\s)#.*/,lookbehind:!0,greedy:!0},keyword:{pattern:/^\S+/,greedy:!0},boolean:{pattern:/(\s)(?:off|on)(?!\S)/,lookbehind:!0},number:{pattern:/(\s)\d+[a-z]*(?!\S)/i,lookbehind:!0},variable:n}},punctuation:/[{};]/}})(e)}return $ce}var Wce,B8e;function Txr(){if(B8e)return Wce;B8e=1,Wce=t,t.displayName="nim",t.aliases=[];function t(e){e.languages.nim={comment:{pattern:/#.*/,greedy:!0},string:{pattern:/(?:\b(?!\d)(?:\w|\\x[89a-fA-F][0-9a-fA-F])+)?(?:"""[\s\S]*?"""(?!")|"(?:\\[\s\S]|""|[^"\\])*")/,greedy:!0},char:{pattern:/'(?:\\(?:\d+|x[\da-fA-F]{0,2}|.)|[^'])'/,greedy:!0},function:{pattern:/(?:(?!\d)(?:\w|\\x[89a-fA-F][0-9a-fA-F])+|`[^`\r\n]+`)\*?(?:\[[^\]]+\])?(?=\s*\()/,greedy:!0,inside:{operator:/\*$/}},identifier:{pattern:/`[^`\r\n]+`/,greedy:!0,inside:{punctuation:/`/}},number:/\b(?:0[xXoObB][\da-fA-F_]+|\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:[eE][+-]?\d[\d_]*)?)(?:'?[iuf]\d*)?/,keyword:/\b(?:addr|as|asm|atomic|bind|block|break|case|cast|concept|const|continue|converter|defer|discard|distinct|do|elif|else|end|enum|except|export|finally|for|from|func|generic|if|import|include|interface|iterator|let|macro|method|mixin|nil|object|out|proc|ptr|raise|ref|return|static|template|try|tuple|type|using|var|when|while|with|without|yield)\b/,operator:{pattern:/(^|[({\[](?=\.\.)|(?![({\[]\.).)(?:(?:[=+\-*\/<>@$~&%|!?^:\\]|\.\.|\.(?![)}\]]))+|\b(?:and|div|in|is|isnot|mod|not|notin|of|or|shl|shr|xor)\b)/m,lookbehind:!0},punctuation:/[({\[]\.|\.[)}\]]|[`(){}\[\],:]/}}return Wce}var Yce,U8e;function Exr(){if(U8e)return Yce;U8e=1,Yce=t,t.displayName="nix",t.aliases=[];function t(e){e.languages.nix={comment:{pattern:/\/\*[\s\S]*?\*\/|#.*/,greedy:!0},string:{pattern:/"(?:[^"\\]|\\[\s\S])*"|''(?:(?!'')[\s\S]|''(?:'|\\|\$\{))*''/,greedy:!0,inside:{interpolation:{pattern:/(^|(?:^|(?!'').)[^\\])\$\{(?:[^{}]|\{[^}]*\})*\}/,lookbehind:!0,inside:null}}},url:[/\b(?:[a-z]{3,7}:\/\/)[\w\-+%~\/.:#=?&]+/,{pattern:/([^\/])(?:[\w\-+%~.:#=?&]*(?!\/\/)[\w\-+%~\/.:#=?&])?(?!\/\/)\/[\w\-+%~\/.:#=?&]*/,lookbehind:!0}],antiquotation:{pattern:/\$(?=\{)/,alias:"important"},number:/\b\d+\b/,keyword:/\b(?:assert|builtins|else|if|in|inherit|let|null|or|then|with)\b/,function:/\b(?:abort|add|all|any|attrNames|attrValues|baseNameOf|compareVersions|concatLists|currentSystem|deepSeq|derivation|dirOf|div|elem(?:At)?|fetch(?:Tarball|url)|filter(?:Source)?|fromJSON|genList|getAttr|getEnv|hasAttr|hashString|head|import|intersectAttrs|is(?:Attrs|Bool|Function|Int|List|Null|String)|length|lessThan|listToAttrs|map|mul|parseDrvName|pathExists|read(?:Dir|File)|removeAttrs|replaceStrings|seq|sort|stringLength|sub(?:string)?|tail|throw|to(?:File|JSON|Path|String|XML)|trace|typeOf)\b|\bfoldl'\B/,boolean:/\b(?:false|true)\b/,operator:/[=!<>]=?|\+\+?|\|\||&&|\/\/|->?|[?@]/,punctuation:/[{}()[\].,:;]/},e.languages.nix.string.inside.interpolation.inside=e.languages.nix}return Yce}var Xce,H8e;function Axr(){if(H8e)return Xce;H8e=1,Xce=t,t.displayName="nsis",t.aliases=[];function t(e){e.languages.nsis={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|[#;].*)/,lookbehind:!0,greedy:!0},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:{pattern:/(^[\t ]*)(?:Abort|Add(?:BrandingImage|Size)|AdvSplash|Allow(?:RootDirInstall|SkipFiles)|AutoCloseWindow|BG(?:Font|Gradient|Image)|Banner|BrandingText|BringToFront|CRCCheck|Call(?:InstDLL)?|Caption|ChangeUI|CheckBitmap|ClearErrors|CompletedText|ComponentText|CopyFiles|Create(?:Directory|Font|ShortCut)|Delete(?:INISec|INIStr|RegKey|RegValue)?|Detail(?:Print|sButtonText)|Dialer|Dir(?:Text|Var|Verify)|EnableWindow|Enum(?:RegKey|RegValue)|Exch|Exec(?:Shell(?:Wait)?|Wait)?|ExpandEnvStrings|File(?:BufSize|Close|ErrorText|Open|Read|ReadByte|ReadUTF16LE|ReadWord|Seek|Write|WriteByte|WriteUTF16LE|WriteWord)?|Find(?:Close|First|Next|Window)|FlushINI|Get(?:CurInstType|CurrentAddress|DLLVersion(?:Local)?|DlgItem|ErrorLevel|FileTime(?:Local)?|FullPathName|Function(?:Address|End)?|InstDirError|LabelAddress|TempFileName)|Goto|HideWindow|Icon|If(?:Abort|Errors|FileExists|RebootFlag|Silent)|InitPluginsDir|InstProgressFlags|Inst(?:Type(?:GetText|SetText)?)|Install(?:ButtonText|Colors|Dir(?:RegKey)?)|Int(?:64|Ptr)?CmpU?|Int(?:64)?Fmt|Int(?:Ptr)?Op|IsWindow|Lang(?:DLL|String)|License(?:BkColor|Data|ForceSelection|LangString|Text)|LoadLanguageFile|LockWindow|Log(?:Set|Text)|Manifest(?:DPIAware|SupportedOS)|Math|MessageBox|MiscButtonText|NSISdl|Name|Nop|OutFile|PE(?:DllCharacteristics|SubsysVer)|Page(?:Callbacks)?|Pop|Push|Quit|RMDir|Read(?:EnvStr|INIStr|RegDWORD|RegStr)|Reboot|RegDLL|Rename|RequestExecutionLevel|ReserveFile|Return|SearchPath|Section(?:End|GetFlags|GetInstTypes|GetSize|GetText|Group|In|SetFlags|SetInstTypes|SetSize|SetText)?|SendMessage|Set(?:AutoClose|BrandingImage|Compress|Compressor(?:DictSize)?|CtlColors|CurInstType|DatablockOptimize|DateSave|Details(?:Print|View)|ErrorLevel|Errors|FileAttributes|Font|OutPath|Overwrite|PluginUnload|RebootFlag|RegView|ShellVarContext|Silent)|Show(?:InstDetails|UninstDetails|Window)|Silent(?:Install|UnInstall)|Sleep|SpaceTexts|Splash|StartMenu|Str(?:CmpS?|Cpy|Len)|SubCaption|System|UnRegDLL|Unicode|UninstPage|Uninstall(?:ButtonText|Caption|Icon|SubCaption|Text)|UserInfo|VI(?:AddVersionKey|FileVersion|ProductVersion)|VPatch|Var|WindowIcon|Write(?:INIStr|Reg(?:Bin|DWORD|ExpandStr|MultiStr|None|Str)|Uninstaller)|XPStyle|ns(?:Dialogs|Exec))\b/m,lookbehind:!0},property:/\b(?:ARCHIVE|FILE_(?:ATTRIBUTE_ARCHIVE|ATTRIBUTE_NORMAL|ATTRIBUTE_OFFLINE|ATTRIBUTE_READONLY|ATTRIBUTE_SYSTEM|ATTRIBUTE_TEMPORARY)|HK(?:(?:CR|CU|LM)(?:32|64)?|DD|PD|U)|HKEY_(?:CLASSES_ROOT|CURRENT_CONFIG|CURRENT_USER|DYN_DATA|LOCAL_MACHINE|PERFORMANCE_DATA|USERS)|ID(?:ABORT|CANCEL|IGNORE|NO|OK|RETRY|YES)|MB_(?:ABORTRETRYIGNORE|DEFBUTTON1|DEFBUTTON2|DEFBUTTON3|DEFBUTTON4|ICONEXCLAMATION|ICONINFORMATION|ICONQUESTION|ICONSTOP|OK|OKCANCEL|RETRYCANCEL|RIGHT|RTLREADING|SETFOREGROUND|TOPMOST|USERICON|YESNO)|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SYSTEM|TEMPORARY|admin|all|auto|both|colored|false|force|hide|highest|lastused|leave|listonly|none|normal|notset|off|on|open|print|show|silent|silentlog|smooth|textonly|true|user)\b/,constant:/\$\{[!\w\.:\^-]+\}|\$\([!\w\.:\^-]+\)/,variable:/\$\w[\w\.]*/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|\+\+?|<=?|>=?|==?=?|&&?|\|\|?|[?*\/~^%]/,punctuation:/[{}[\];(),.:]/,important:{pattern:/(^[\t ]*)!(?:addincludedir|addplugindir|appendfile|cd|define|delfile|echo|else|endif|error|execute|finalize|getdllversion|gettlbversion|if|ifdef|ifmacrodef|ifmacrondef|ifndef|include|insertmacro|macro|macroend|makensis|packhdr|pragma|searchparse|searchreplace|system|tempfile|undef|verbose|warning)\b/im,lookbehind:!0}}}return Xce}var Zce,j8e;function Cxr(){if(j8e)return Zce;j8e=1;var t=c6();Zce=e,e.displayName="objectivec",e.aliases=["objc"];function e(r){r.register(t),r.languages.objectivec=r.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete r.languages.objectivec["class-name"],r.languages.objc=r.languages.objectivec}return Zce}var Kce,V8e;function Mxr(){if(V8e)return Kce;V8e=1,Kce=t,t.displayName="ocaml",t.aliases=[];function t(e){e.languages.ocaml={comment:{pattern:/\(\*[\s\S]*?\*\)/,greedy:!0},char:{pattern:/'(?:[^\\\r\n']|\\(?:.|[ox]?[0-9a-f]{1,3}))'/i,greedy:!0},string:[{pattern:/"(?:\\(?:[\s\S]|\r\n)|[^\\\r\n"])*"/,greedy:!0},{pattern:/\{([a-z_]*)\|[\s\S]*?\|\1\}/,greedy:!0}],number:[/\b(?:0b[01][01_]*|0o[0-7][0-7_]*)\b/i,/\b0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]*)?(?:p[+-]?\d[\d_]*)?(?!\w)/i,/\b\d[\d_]*(?:\.[\d_]*)?(?:e[+-]?\d[\d_]*)?(?!\w)/i],directive:{pattern:/\B#\w+/,alias:"property"},label:{pattern:/\B~\w+/,alias:"property"},"type-variable":{pattern:/\B'\w+/,alias:"function"},variant:{pattern:/`\w+/,alias:"symbol"},keyword:/\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|nonrec|object|of|open|private|rec|sig|struct|then|to|try|type|val|value|virtual|when|where|while|with)\b/,boolean:/\b(?:false|true)\b/,"operator-like-punctuation":{pattern:/\[[<>|]|[>|]\]|\{<|>\}/,alias:"punctuation"},operator:/\.[.~]|:[=>]|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lsl|lsr|lxor|mod|or)\b/,punctuation:/;;|::|[(){}\[\].,:;#]|\b_\b/}}return Kce}var Jce,q8e;function Rxr(){if(q8e)return Jce;q8e=1;var t=c6();Jce=e,e.displayName="opencl",e.aliases=[];function e(r){r.register(t),(function(n){n.languages.opencl=n.languages.extend("c",{keyword:/\b(?:(?:__)?(?:constant|global|kernel|local|private|read_only|read_write|write_only)|__attribute__|auto|(?:bool|u?(?:char|int|long|short)|half|quad)(?:2|3|4|8|16)?|break|case|complex|const|continue|(?:double|float)(?:16(?:x(?:1|2|4|8|16))?|1x(?:1|2|4|8|16)|2(?:x(?:1|2|4|8|16))?|3|4(?:x(?:1|2|4|8|16))?|8(?:x(?:1|2|4|8|16))?)?|default|do|else|enum|extern|for|goto|if|imaginary|inline|packed|pipe|register|restrict|return|signed|sizeof|static|struct|switch|typedef|uniform|union|unsigned|void|volatile|while)\b/,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[fuhl]{0,4}/i,boolean:/\b(?:false|true)\b/,"constant-opencl-kernel":{pattern:/\b(?:CHAR_(?:BIT|MAX|MIN)|CLK_(?:ADDRESS_(?:CLAMP(?:_TO_EDGE)?|NONE|REPEAT)|FILTER_(?:LINEAR|NEAREST)|(?:GLOBAL|LOCAL)_MEM_FENCE|NORMALIZED_COORDS_(?:FALSE|TRUE))|CL_(?:BGRA|(?:HALF_)?FLOAT|INTENSITY|LUMINANCE|A?R?G?B?[Ax]?|(?:(?:UN)?SIGNED|[US]NORM)_(?:INT(?:8|16|32))|UNORM_(?:INT_101010|SHORT_(?:555|565)))|(?:DBL|FLT|HALF)_(?:DIG|EPSILON|(?:MAX|MIN)(?:(?:_10)?_EXP)?|MANT_DIG)|FLT_RADIX|HUGE_VALF?|(?:INT|LONG|SCHAR|SHRT)_(?:MAX|MIN)|INFINITY|MAXFLOAT|M_(?:[12]_PI|2_SQRTPI|E|LN(?:2|10)|LOG(?:2|10)E?|PI(?:_[24])?|SQRT(?:1_2|2))(?:_F|_H)?|NAN|(?:UCHAR|UINT|ULONG|USHRT)_MAX)\b/,alias:"constant"}}),n.languages.insertBefore("opencl","class-name",{"builtin-type":{pattern:/\b(?:_cl_(?:command_queue|context|device_id|event|kernel|mem|platform_id|program|sampler)|cl_(?:image_format|mem_fence_flags)|clk_event_t|event_t|image(?:1d_(?:array_|buffer_)?t|2d_(?:array_(?:depth_|msaa_depth_|msaa_)?|depth_|msaa_depth_|msaa_)?t|3d_t)|intptr_t|ndrange_t|ptrdiff_t|queue_t|reserve_id_t|sampler_t|size_t|uintptr_t)\b/,alias:"keyword"}});var i={"type-opencl-host":{pattern:/\b(?:cl_(?:GLenum|GLint|GLuin|addressing_mode|bitfield|bool|buffer_create_type|build_status|channel_(?:order|type)|(?:u?(?:char|int|long|short)|double|float)(?:2|3|4|8|16)?|command_(?:queue(?:_info|_properties)?|type)|context(?:_info|_properties)?|device_(?:exec_capabilities|fp_config|id|info|local_mem_type|mem_cache_type|type)|(?:event|sampler)(?:_info)?|filter_mode|half|image_info|kernel(?:_info|_work_group_info)?|map_flags|mem(?:_flags|_info|_object_type)?|platform_(?:id|info)|profiling_info|program(?:_build_info|_info)?))\b/,alias:"keyword"},"boolean-opencl-host":{pattern:/\bCL_(?:FALSE|TRUE)\b/,alias:"boolean"},"constant-opencl-host":{pattern:/\bCL_(?:A|ABGR|ADDRESS_(?:CLAMP(?:_TO_EDGE)?|MIRRORED_REPEAT|NONE|REPEAT)|ARGB|BGRA|BLOCKING|BUFFER_CREATE_TYPE_REGION|BUILD_(?:ERROR|IN_PROGRESS|NONE|PROGRAM_FAILURE|SUCCESS)|COMMAND_(?:ACQUIRE_GL_OBJECTS|BARRIER|COPY_(?:BUFFER(?:_RECT|_TO_IMAGE)?|IMAGE(?:_TO_BUFFER)?)|FILL_(?:BUFFER|IMAGE)|MAP(?:_BUFFER|_IMAGE)|MARKER|MIGRATE(?:_SVM)?_MEM_OBJECTS|NATIVE_KERNEL|NDRANGE_KERNEL|READ_(?:BUFFER(?:_RECT)?|IMAGE)|RELEASE_GL_OBJECTS|SVM_(?:FREE|MAP|MEMCPY|MEMFILL|UNMAP)|TASK|UNMAP_MEM_OBJECT|USER|WRITE_(?:BUFFER(?:_RECT)?|IMAGE))|COMPILER_NOT_AVAILABLE|COMPILE_PROGRAM_FAILURE|COMPLETE|CONTEXT_(?:DEVICES|INTEROP_USER_SYNC|NUM_DEVICES|PLATFORM|PROPERTIES|REFERENCE_COUNT)|DEPTH(?:_STENCIL)?|DEVICE_(?:ADDRESS_BITS|AFFINITY_DOMAIN_(?:L[1-4]_CACHE|NEXT_PARTITIONABLE|NUMA)|AVAILABLE|BUILT_IN_KERNELS|COMPILER_AVAILABLE|DOUBLE_FP_CONFIG|ENDIAN_LITTLE|ERROR_CORRECTION_SUPPORT|EXECUTION_CAPABILITIES|EXTENSIONS|GLOBAL_(?:MEM_(?:CACHELINE_SIZE|CACHE_SIZE|CACHE_TYPE|SIZE)|VARIABLE_PREFERRED_TOTAL_SIZE)|HOST_UNIFIED_MEMORY|IL_VERSION|IMAGE(?:2D_MAX_(?:HEIGHT|WIDTH)|3D_MAX_(?:DEPTH|HEIGHT|WIDTH)|_BASE_ADDRESS_ALIGNMENT|_MAX_ARRAY_SIZE|_MAX_BUFFER_SIZE|_PITCH_ALIGNMENT|_SUPPORT)|LINKER_AVAILABLE|LOCAL_MEM_SIZE|LOCAL_MEM_TYPE|MAX_(?:CLOCK_FREQUENCY|COMPUTE_UNITS|CONSTANT_ARGS|CONSTANT_BUFFER_SIZE|GLOBAL_VARIABLE_SIZE|MEM_ALLOC_SIZE|NUM_SUB_GROUPS|ON_DEVICE_(?:EVENTS|QUEUES)|PARAMETER_SIZE|PIPE_ARGS|READ_IMAGE_ARGS|READ_WRITE_IMAGE_ARGS|SAMPLERS|WORK_GROUP_SIZE|WORK_ITEM_DIMENSIONS|WORK_ITEM_SIZES|WRITE_IMAGE_ARGS)|MEM_BASE_ADDR_ALIGN|MIN_DATA_TYPE_ALIGN_SIZE|NAME|NATIVE_VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT)|NOT_(?:AVAILABLE|FOUND)|OPENCL_C_VERSION|PARENT_DEVICE|PARTITION_(?:AFFINITY_DOMAIN|BY_AFFINITY_DOMAIN|BY_COUNTS|BY_COUNTS_LIST_END|EQUALLY|FAILED|MAX_SUB_DEVICES|PROPERTIES|TYPE)|PIPE_MAX_(?:ACTIVE_RESERVATIONS|PACKET_SIZE)|PLATFORM|PREFERRED_(?:GLOBAL_ATOMIC_ALIGNMENT|INTEROP_USER_SYNC|LOCAL_ATOMIC_ALIGNMENT|PLATFORM_ATOMIC_ALIGNMENT|VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT))|PRINTF_BUFFER_SIZE|PROFILE|PROFILING_TIMER_RESOLUTION|QUEUE_(?:ON_(?:DEVICE_(?:MAX_SIZE|PREFERRED_SIZE|PROPERTIES)|HOST_PROPERTIES)|PROPERTIES)|REFERENCE_COUNT|SINGLE_FP_CONFIG|SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS|SVM_(?:ATOMICS|CAPABILITIES|COARSE_GRAIN_BUFFER|FINE_GRAIN_BUFFER|FINE_GRAIN_SYSTEM)|TYPE(?:_ACCELERATOR|_ALL|_CPU|_CUSTOM|_DEFAULT|_GPU)?|VENDOR(?:_ID)?|VERSION)|DRIVER_VERSION|EVENT_(?:COMMAND_(?:EXECUTION_STATUS|QUEUE|TYPE)|CONTEXT|REFERENCE_COUNT)|EXEC_(?:KERNEL|NATIVE_KERNEL|STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST)|FILTER_(?:LINEAR|NEAREST)|FLOAT|FP_(?:CORRECTLY_ROUNDED_DIVIDE_SQRT|DENORM|FMA|INF_NAN|ROUND_TO_INF|ROUND_TO_NEAREST|ROUND_TO_ZERO|SOFT_FLOAT)|GLOBAL|HALF_FLOAT|IMAGE_(?:ARRAY_SIZE|BUFFER|DEPTH|ELEMENT_SIZE|FORMAT|FORMAT_MISMATCH|FORMAT_NOT_SUPPORTED|HEIGHT|NUM_MIP_LEVELS|NUM_SAMPLES|ROW_PITCH|SLICE_PITCH|WIDTH)|INTENSITY|INVALID_(?:ARG_INDEX|ARG_SIZE|ARG_VALUE|BINARY|BUFFER_SIZE|BUILD_OPTIONS|COMMAND_QUEUE|COMPILER_OPTIONS|CONTEXT|DEVICE|DEVICE_PARTITION_COUNT|DEVICE_QUEUE|DEVICE_TYPE|EVENT|EVENT_WAIT_LIST|GLOBAL_OFFSET|GLOBAL_WORK_SIZE|GL_OBJECT|HOST_PTR|IMAGE_DESCRIPTOR|IMAGE_FORMAT_DESCRIPTOR|IMAGE_SIZE|KERNEL|KERNEL_ARGS|KERNEL_DEFINITION|KERNEL_NAME|LINKER_OPTIONS|MEM_OBJECT|MIP_LEVEL|OPERATION|PIPE_SIZE|PLATFORM|PROGRAM|PROGRAM_EXECUTABLE|PROPERTY|QUEUE_PROPERTIES|SAMPLER|VALUE|WORK_DIMENSION|WORK_GROUP_SIZE|WORK_ITEM_SIZE)|KERNEL_(?:ARG_(?:ACCESS_(?:NONE|QUALIFIER|READ_ONLY|READ_WRITE|WRITE_ONLY)|ADDRESS_(?:CONSTANT|GLOBAL|LOCAL|PRIVATE|QUALIFIER)|INFO_NOT_AVAILABLE|NAME|TYPE_(?:CONST|NAME|NONE|PIPE|QUALIFIER|RESTRICT|VOLATILE))|ATTRIBUTES|COMPILE_NUM_SUB_GROUPS|COMPILE_WORK_GROUP_SIZE|CONTEXT|EXEC_INFO_SVM_FINE_GRAIN_SYSTEM|EXEC_INFO_SVM_PTRS|FUNCTION_NAME|GLOBAL_WORK_SIZE|LOCAL_MEM_SIZE|LOCAL_SIZE_FOR_SUB_GROUP_COUNT|MAX_NUM_SUB_GROUPS|MAX_SUB_GROUP_SIZE_FOR_NDRANGE|NUM_ARGS|PREFERRED_WORK_GROUP_SIZE_MULTIPLE|PRIVATE_MEM_SIZE|PROGRAM|REFERENCE_COUNT|SUB_GROUP_COUNT_FOR_NDRANGE|WORK_GROUP_SIZE)|LINKER_NOT_AVAILABLE|LINK_PROGRAM_FAILURE|LOCAL|LUMINANCE|MAP_(?:FAILURE|READ|WRITE|WRITE_INVALIDATE_REGION)|MEM_(?:ALLOC_HOST_PTR|ASSOCIATED_MEMOBJECT|CONTEXT|COPY_HOST_PTR|COPY_OVERLAP|FLAGS|HOST_NO_ACCESS|HOST_PTR|HOST_READ_ONLY|HOST_WRITE_ONLY|KERNEL_READ_AND_WRITE|MAP_COUNT|OBJECT_(?:ALLOCATION_FAILURE|BUFFER|IMAGE1D|IMAGE1D_ARRAY|IMAGE1D_BUFFER|IMAGE2D|IMAGE2D_ARRAY|IMAGE3D|PIPE)|OFFSET|READ_ONLY|READ_WRITE|REFERENCE_COUNT|SIZE|SVM_ATOMICS|SVM_FINE_GRAIN_BUFFER|TYPE|USES_SVM_POINTER|USE_HOST_PTR|WRITE_ONLY)|MIGRATE_MEM_OBJECT_(?:CONTENT_UNDEFINED|HOST)|MISALIGNED_SUB_BUFFER_OFFSET|NONE|NON_BLOCKING|OUT_OF_(?:HOST_MEMORY|RESOURCES)|PIPE_(?:MAX_PACKETS|PACKET_SIZE)|PLATFORM_(?:EXTENSIONS|HOST_TIMER_RESOLUTION|NAME|PROFILE|VENDOR|VERSION)|PROFILING_(?:COMMAND_(?:COMPLETE|END|QUEUED|START|SUBMIT)|INFO_NOT_AVAILABLE)|PROGRAM_(?:BINARIES|BINARY_SIZES|BINARY_TYPE(?:_COMPILED_OBJECT|_EXECUTABLE|_LIBRARY|_NONE)?|BUILD_(?:GLOBAL_VARIABLE_TOTAL_SIZE|LOG|OPTIONS|STATUS)|CONTEXT|DEVICES|IL|KERNEL_NAMES|NUM_DEVICES|NUM_KERNELS|REFERENCE_COUNT|SOURCE)|QUEUED|QUEUE_(?:CONTEXT|DEVICE|DEVICE_DEFAULT|ON_DEVICE|ON_DEVICE_DEFAULT|OUT_OF_ORDER_EXEC_MODE_ENABLE|PROFILING_ENABLE|PROPERTIES|REFERENCE_COUNT|SIZE)|R|RA|READ_(?:ONLY|WRITE)_CACHE|RG|RGB|RGBA|RGBx|RGx|RUNNING|Rx|SAMPLER_(?:ADDRESSING_MODE|CONTEXT|FILTER_MODE|LOD_MAX|LOD_MIN|MIP_FILTER_MODE|NORMALIZED_COORDS|REFERENCE_COUNT)|(?:UN)?SIGNED_INT(?:8|16|32)|SNORM_INT(?:8|16)|SUBMITTED|SUCCESS|UNORM_INT(?:8|16|24|_101010|_101010_2)|UNORM_SHORT_(?:555|565)|VERSION_(?:1_0|1_1|1_2|2_0|2_1)|sBGRA|sRGB|sRGBA|sRGBx)\b/,alias:"constant"},"function-opencl-host":{pattern:/\bcl(?:BuildProgram|CloneKernel|CompileProgram|Create(?:Buffer|CommandQueue(?:WithProperties)?|Context|ContextFromType|Image|Image2D|Image3D|Kernel|KernelsInProgram|Pipe|ProgramWith(?:Binary|BuiltInKernels|IL|Source)|Sampler|SamplerWithProperties|SubBuffer|SubDevices|UserEvent)|Enqueue(?:(?:Barrier|Marker)(?:WithWaitList)?|Copy(?:Buffer(?:Rect|ToImage)?|Image(?:ToBuffer)?)|(?:Fill|Map)(?:Buffer|Image)|MigrateMemObjects|NDRangeKernel|NativeKernel|(?:Read|Write)(?:Buffer(?:Rect)?|Image)|SVM(?:Free|Map|MemFill|Memcpy|MigrateMem|Unmap)|Task|UnmapMemObject|WaitForEvents)|Finish|Flush|Get(?:CommandQueueInfo|ContextInfo|Device(?:AndHostTimer|IDs|Info)|Event(?:Profiling)?Info|ExtensionFunctionAddress(?:ForPlatform)?|HostTimer|ImageInfo|Kernel(?:ArgInfo|Info|SubGroupInfo|WorkGroupInfo)|MemObjectInfo|PipeInfo|Platform(?:IDs|Info)|Program(?:Build)?Info|SamplerInfo|SupportedImageFormats)|LinkProgram|(?:Release|Retain)(?:CommandQueue|Context|Device|Event|Kernel|MemObject|Program|Sampler)|SVM(?:Alloc|Free)|Set(?:CommandQueueProperty|DefaultDeviceCommandQueue|EventCallback|Kernel|Kernel(?:Arg(?:SVMPointer)?|ExecInfo)|MemObjectDestructorCallback|UserEventStatus)|Unload(?:Platform)?Compiler|WaitForEvents)\b/,alias:"function"}};n.languages.insertBefore("c","keyword",i),n.languages.cpp&&(i["type-opencl-host-cpp"]={pattern:/\b(?:Buffer|BufferGL|BufferRenderGL|CommandQueue|Context|Device|DeviceCommandQueue|EnqueueArgs|Event|Image|Image1D|Image1DArray|Image1DBuffer|Image2D|Image2DArray|Image2DGL|Image3D|Image3DGL|ImageFormat|ImageGL|Kernel|KernelFunctor|LocalSpaceArg|Memory|NDRange|Pipe|Platform|Program|SVMAllocator|SVMTraitAtomic|SVMTraitCoarse|SVMTraitFine|SVMTraitReadOnly|SVMTraitReadWrite|SVMTraitWriteOnly|Sampler|UserEvent)\b/,alias:"keyword"},n.languages.insertBefore("cpp","keyword",i))})(r)}return Jce}var Qce,G8e;function kxr(){if(G8e)return Qce;G8e=1,Qce=t,t.displayName="openqasm",t.aliases=["qasm"];function t(e){e.languages.openqasm={comment:/\/\*[\s\S]*?\*\/|\/\/.*/,string:{pattern:/"[^"\r\n\t]*"|'[^'\r\n\t]*'/,greedy:!0},keyword:/\b(?:CX|OPENQASM|U|barrier|boxas|boxto|break|const|continue|ctrl|def|defcal|defcalgrammar|delay|else|end|for|gate|gphase|if|in|include|inv|kernel|lengthof|let|measure|pow|reset|return|rotary|stretchinf|while)\b|#pragma\b/,"class-name":/\b(?:angle|bit|bool|creg|fixed|float|int|length|qreg|qubit|stretch|uint)\b/,function:/\b(?:cos|exp|ln|popcount|rotl|rotr|sin|sqrt|tan)\b(?=\s*\()/,constant:/\b(?:euler|pi|tau)\b|π|𝜏|ℇ/,number:{pattern:/(^|[^.\w$])(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?(?:dt|ns|us|µs|ms|s)?/i,lookbehind:!0},operator:/->|>>=?|<<=?|&&|\|\||\+\+|--|[!=<>&|~^+\-*/%]=?|@/,punctuation:/[(){}\[\];,:.]/},e.languages.qasm=e.languages.openqasm}return Qce}var efe,$8e;function Ixr(){if($8e)return efe;$8e=1,efe=t,t.displayName="oz",t.aliases=[];function t(e){e.languages.oz={comment:{pattern:/\/\*[\s\S]*?\*\/|%.*/,greedy:!0},string:{pattern:/"(?:[^"\\]|\\[\s\S])*"/,greedy:!0},atom:{pattern:/'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,alias:"builtin"},keyword:/\$|\[\]|\b(?:_|at|attr|case|catch|choice|class|cond|declare|define|dis|else(?:case|if)?|end|export|fail|false|feat|finally|from|fun|functor|if|import|in|local|lock|meth|nil|not|of|or|prepare|proc|prop|raise|require|self|skip|then|thread|true|try|unit)\b/,function:[/\b[a-z][A-Za-z\d]*(?=\()/,{pattern:/(\{)[A-Z][A-Za-z\d]*\b/,lookbehind:!0}],number:/\b(?:0[bx][\da-f]+|\d+(?:\.\d*)?(?:e~?\d+)?)\b|&(?:[^\\]|\\(?:\d{3}|.))/i,variable:/`(?:[^`\\]|\\.)+`/,"attr-name":/\b\w+(?=[ \t]*:(?![:=]))/,operator:/:(?:=|::?)|<[-:=]?|=(?:=|<?:?)|>=?:?|\\=:?|!!?|[|#+\-*\/,~^@]|\b(?:andthen|div|mod|orelse)\b/,punctuation:/[\[\](){}.:;?]/}}return efe}var tfe,W8e;function Pxr(){if(W8e)return tfe;W8e=1,tfe=t,t.displayName="parigp",t.aliases=[];function t(e){e.languages.parigp={comment:/\/\*[\s\S]*?\*\/|\\\\.*/,string:{pattern:/"(?:[^"\\\r\n]|\\.)*"/,greedy:!0},keyword:(function(){var r=["breakpoint","break","dbg_down","dbg_err","dbg_up","dbg_x","forcomposite","fordiv","forell","forpart","forprime","forstep","forsubgroup","forvec","for","iferr","if","local","my","next","return","until","while"];return r=r.map(function(n){return n.split("").join(" *")}).join("|"),RegExp("\\b(?:"+r+")\\b")})(),function:/\b\w(?:[\w ]*\w)?(?= *\()/,number:{pattern:/((?:\. *\. *)?)(?:\b\d(?: *\d)*(?: *(?!\. *\.)\.(?: *\d)*)?|\. *\d(?: *\d)*)(?: *e *(?:[+-] *)?\d(?: *\d)*)?/i,lookbehind:!0},operator:/\. *\.|[*\/!](?: *=)?|%(?: *=|(?: *#)?(?: *')*)?|\+(?: *[+=])?|-(?: *[-=>])?|<(?: *>|(?: *<)?(?: *=)?)?|>(?: *>)?(?: *=)?|=(?: *=){0,2}|\\(?: *\/)?(?: *=)?|&(?: *&)?|\| *\||['#~^]/,punctuation:/[\[\]{}().,:;|]/}}return tfe}var rfe,Y8e;function Dxr(){if(Y8e)return rfe;Y8e=1,rfe=t,t.displayName="parser",t.aliases=[];function t(e){(function(r){var n=r.languages.parser=r.languages.extend("markup",{keyword:{pattern:/(^|[^^])(?:\^(?:case|eval|for|if|switch|throw)\b|@(?:BASE|CLASS|GET(?:_DEFAULT)?|OPTIONS|SET_DEFAULT|USE)\b)/,lookbehind:!0},variable:{pattern:/(^|[^^])\B\$(?:\w+|(?=[.{]))(?:(?:\.|::?)\w+)*(?:\.|::?)?/,lookbehind:!0,inside:{punctuation:/\.|:+/}},function:{pattern:/(^|[^^])\B[@^]\w+(?:(?:\.|::?)\w+)*(?:\.|::?)?/,lookbehind:!0,inside:{keyword:{pattern:/(^@)(?:GET_|SET_)/,lookbehind:!0},punctuation:/\.|:+/}},escape:{pattern:/\^(?:[$^;@()\[\]{}"':]|#[a-f\d]*)/i,alias:"builtin"},punctuation:/[\[\](){};]/});n=r.languages.insertBefore("parser","keyword",{"parser-comment":{pattern:/(\s)#.*/,lookbehind:!0,alias:"comment"},expression:{pattern:/(^|[^^])\((?:[^()]|\((?:[^()]|\((?:[^()])*\))*\))*\)/,greedy:!0,lookbehind:!0,inside:{string:{pattern:/(^|[^^])(["'])(?:(?!\2)[^^]|\^[\s\S])*\2/,lookbehind:!0},keyword:n.keyword,variable:n.variable,function:n.function,boolean:/\b(?:false|true)\b/,number:/\b(?:0x[a-f\d]+|\d+(?:\.\d*)?(?:e[+-]?\d+)?)\b/i,escape:n.escape,operator:/[~+*\/\\%]|!(?:\|\|?|=)?|&&?|\|\|?|==|<[<=]?|>[>=]?|-[fd]?|\b(?:def|eq|ge|gt|in|is|le|lt|ne)\b/,punctuation:n.punctuation}}}),r.languages.insertBefore("inside","punctuation",{expression:n.expression,keyword:n.keyword,variable:n.variable,function:n.function,escape:n.escape,"parser-punctuation":{pattern:n.punctuation,alias:"punctuation"}},n.tag.inside["attr-value"])})(e)}return rfe}var nfe,X8e;function Lxr(){if(X8e)return nfe;X8e=1,nfe=t,t.displayName="pascal",t.aliases=["objectpascal"];function t(e){e.languages.pascal={directive:{pattern:/\{\$[\s\S]*?\}/,greedy:!0,alias:["marco","property"]},comment:{pattern:/\(\*[\s\S]*?\*\)|\{[\s\S]*?\}|\/\/.*/,greedy:!0},string:{pattern:/(?:'(?:''|[^'\r\n])*'(?!')|#[&$%]?[a-f\d]+)+|\^[a-z]/i,greedy:!0},asm:{pattern:/(\basm\b)[\s\S]+?(?=\bend\s*[;[])/i,lookbehind:!0,greedy:!0,inside:null},keyword:[{pattern:/(^|[^&])\b(?:absolute|array|asm|begin|case|const|constructor|destructor|do|downto|else|end|file|for|function|goto|if|implementation|inherited|inline|interface|label|nil|object|of|operator|packed|procedure|program|record|reintroduce|repeat|self|set|string|then|to|type|unit|until|uses|var|while|with)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:dispose|exit|false|new|true)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:class|dispinterface|except|exports|finalization|finally|initialization|inline|library|on|out|packed|property|raise|resourcestring|threadvar|try)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:absolute|abstract|alias|assembler|bitpacked|break|cdecl|continue|cppdecl|cvar|default|deprecated|dynamic|enumerator|experimental|export|external|far|far16|forward|generic|helper|implements|index|interrupt|iochecks|local|message|name|near|nodefault|noreturn|nostackframe|oldfpccall|otherwise|overload|override|pascal|platform|private|protected|public|published|read|register|reintroduce|result|safecall|saveregisters|softfloat|specialize|static|stdcall|stored|strict|unaligned|unimplemented|varargs|virtual|write)\b/i,lookbehind:!0}],number:[/(?:[&%]\d+|\$[a-f\d]+)/i,/\b\d+(?:\.\d+)?(?:e[+-]?\d+)?/i],operator:[/\.\.|\*\*|:=|<[<=>]?|>[>=]?|[+\-*\/]=?|[@^=]/,{pattern:/(^|[^&])\b(?:and|as|div|exclude|in|include|is|mod|not|or|shl|shr|xor)\b/,lookbehind:!0}],punctuation:/\(\.|\.\)|[()\[\]:;,.]/},e.languages.pascal.asm.inside=e.languages.extend("pascal",{asm:void 0,keyword:void 0,operator:void 0}),e.languages.objectpascal=e.languages.pascal}return nfe}var ife,Z8e;function Oxr(){if(Z8e)return ife;Z8e=1,ife=t,t.displayName="pascaligo",t.aliases=[];function t(e){(function(r){var n=/\((?:[^()]|\((?:[^()]|\([^()]*\))*\))*\)/.source,i=/(?:\b\w+(?:<braces>)?|<braces>)/.source.replace(/<braces>/g,function(){return n}),a=r.languages.pascaligo={comment:/\(\*[\s\S]+?\*\)|\/\/.*/,string:{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1|\^[a-z]/i,greedy:!0},"class-name":[{pattern:RegExp(/(\btype\s+\w+\s+is\s+)<type>/.source.replace(/<type>/g,function(){return i}),"i"),lookbehind:!0,inside:null},{pattern:RegExp(/<type>(?=\s+is\b)/.source.replace(/<type>/g,function(){return i}),"i"),inside:null},{pattern:RegExp(/(:\s*)<type>/.source.replace(/<type>/g,function(){return i})),lookbehind:!0,inside:null}],keyword:{pattern:/(^|[^&])\b(?:begin|block|case|const|else|end|fail|for|from|function|if|is|nil|of|remove|return|skip|then|type|var|while|with)\b/i,lookbehind:!0},boolean:{pattern:/(^|[^&])\b(?:False|True)\b/i,lookbehind:!0},builtin:{pattern:/(^|[^&])\b(?:bool|int|list|map|nat|record|string|unit)\b/i,lookbehind:!0},function:/\b\w+(?=\s*\()/,number:[/%[01]+|&[0-7]+|\$[a-f\d]+/i,/\b\d+(?:\.\d+)?(?:e[+-]?\d+)?(?:mtz|n)?/i],operator:/->|=\/=|\.\.|\*\*|:=|<[<=>]?|>[>=]?|[+\-*\/]=?|[@^=|]|\b(?:and|mod|or)\b/,punctuation:/\(\.|\.\)|[()\[\]:;,.{}]/},o=["comment","keyword","builtin","operator","punctuation"].reduce(function(s,d){return s[d]=a[d],s},{});a["class-name"].forEach(function(s){s.inside=o})})(e)}return ife}var afe,K8e;function Nxr(){if(K8e)return afe;K8e=1,afe=t,t.displayName="pcaxis",t.aliases=["px"];function t(e){e.languages.pcaxis={string:/"[^"]*"/,keyword:{pattern:/((?:^|;)\s*)[-A-Z\d]+(?:\s*\[[-\w]+\])?(?:\s*\("[^"]*"(?:,\s*"[^"]*")*\))?(?=\s*=)/,lookbehind:!0,greedy:!0,inside:{keyword:/^[-A-Z\d]+/,language:{pattern:/^(\s*)\[[-\w]+\]/,lookbehind:!0,inside:{punctuation:/^\[|\]$/,property:/[-\w]+/}},"sub-key":{pattern:/^(\s*)\S[\s\S]*/,lookbehind:!0,inside:{parameter:{pattern:/"[^"]*"/,alias:"property"},punctuation:/^\(|\)$|,/}}}},operator:/=/,tlist:{pattern:/TLIST\s*\(\s*\w+(?:(?:\s*,\s*"[^"]*")+|\s*,\s*"[^"]*"-"[^"]*")?\s*\)/,greedy:!0,inside:{function:/^TLIST/,property:{pattern:/^(\s*\(\s*)\w+/,lookbehind:!0},string:/"[^"]*"/,punctuation:/[(),]/,operator:/-/}},punctuation:/[;,]/,number:{pattern:/(^|\s)\d+(?:\.\d+)?(?!\S)/,lookbehind:!0},boolean:/NO|YES/},e.languages.px=e.languages.pcaxis}return afe}var ofe,J8e;function Fxr(){if(J8e)return ofe;J8e=1,ofe=t,t.displayName="peoplecode",t.aliases=["pcode"];function t(e){e.languages.peoplecode={comment:RegExp([/\/\*[\s\S]*?\*\//.source,/\bREM[^;]*;/.source,/<\*(?:[^<*]|\*(?!>)|<(?!\*)|<\*(?:(?!\*>)[\s\S])*\*>)*\*>/.source,/\/\+[\s\S]*?\+\//.source].join("|")),string:{pattern:/'(?:''|[^'\r\n])*'(?!')|"(?:""|[^"\r\n])*"(?!")/,greedy:!0},variable:/%\w+/,"function-definition":{pattern:/((?:^|[^\w-])(?:function|method)\s+)\w+/i,lookbehind:!0,alias:"function"},"class-name":{pattern:/((?:^|[^-\w])(?:as|catch|class|component|create|extends|global|implements|instance|local|of|property|returns)\s+)\w+(?::\w+)*/i,lookbehind:!0,inside:{punctuation:/:/}},keyword:/\b(?:abstract|alias|as|catch|class|component|constant|create|declare|else|end-(?:class|evaluate|for|function|get|if|method|set|try|while)|evaluate|extends|for|function|get|global|if|implements|import|instance|library|local|method|null|of|out|peopleCode|private|program|property|protected|readonly|ref|repeat|returns?|set|step|then|throw|to|try|until|value|when(?:-other)?|while)\b/i,"operator-keyword":{pattern:/\b(?:and|not|or)\b/i,alias:"operator"},function:/[_a-z]\w*(?=\s*\()/i,boolean:/\b(?:false|true)\b/i,number:/\b\d+(?:\.\d+)?\b/,operator:/<>|[<>]=?|!=|\*\*|[-+*/|=@]/,punctuation:/[:.;,()[\]]/},e.languages.pcode=e.languages.peoplecode}return ofe}var sfe,Q8e;function zxr(){if(Q8e)return sfe;Q8e=1,sfe=t,t.displayName="perl",t.aliases=[];function t(e){(function(r){var n=/(?:\((?:[^()\\]|\\[\s\S])*\)|\{(?:[^{}\\]|\\[\s\S])*\}|\[(?:[^[\]\\]|\\[\s\S])*\]|<(?:[^<>\\]|\\[\s\S])*>)/.source;r.languages.perl={comment:[{pattern:/(^\s*)=\w[\s\S]*?=cut.*/m,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(/\b(?:q|qq|qw|qx)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,n].join("|")+")"),greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:RegExp(/\b(?:m|qr)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,n].join("|")+")"+/[msixpodualngc]*/.source),greedy:!0},{pattern:RegExp(/(^|[^-])\b(?:s|tr|y)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,/([a-zA-Z0-9])(?:(?!\3)[^\\]|\\[\s\S])*\3(?:(?!\3)[^\\]|\\[\s\S])*\3/.source,n+/\s*/.source+n].join("|")+")"+/[msixpodualngcer]*/.source),lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|x|xor)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*?>|\b_\b/,alias:"symbol"},"v-string":{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/(\bsub[ \t]+)\w+/,lookbehind:!0},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)\b/,punctuation:/[{}[\];(),:]/}})(e)}return sfe}var lfe,eFe;function Bxr(){if(eFe)return lfe;eFe=1;var t=zZ();lfe=e,e.displayName="phpExtras",e.aliases=[];function e(r){r.register(t),r.languages.insertBefore("php","variable",{this:{pattern:/\$this\b/,alias:"keyword"},global:/\$(?:GLOBALS|HTTP_RAW_POST_DATA|_(?:COOKIE|ENV|FILES|GET|POST|REQUEST|SERVER|SESSION)|argc|argv|http_response_header|php_errormsg)\b/,scope:{pattern:/\b[\w\\]+::/,inside:{keyword:/\b(?:parent|self|static)\b/,punctuation:/::|\\/}}})}return lfe}var ufe,tFe;function Uxr(){if(tFe)return ufe;tFe=1;var t=zZ(),e=FZ();ufe=r,r.displayName="phpdoc",r.aliases=[];function r(n){n.register(t),n.register(e),(function(i){var a=/(?:\b[a-zA-Z]\w*|[|\\[\]])+/.source;i.languages.phpdoc=i.languages.extend("javadoclike",{parameter:{pattern:RegExp("(@(?:global|param|property(?:-read|-write)?|var)\\s+(?:"+a+"\\s+)?)\\$\\w+"),lookbehind:!0}}),i.languages.insertBefore("phpdoc","keyword",{"class-name":[{pattern:RegExp("(@(?:global|package|param|property(?:-read|-write)?|return|subpackage|throws|var)\\s+)"+a),lookbehind:!0,inside:{keyword:/\b(?:array|bool|boolean|callback|double|false|float|int|integer|mixed|null|object|resource|self|string|true|void)\b/,punctuation:/[|\\[\]()]/}}]}),i.languages.javadoclike.addSupport("php",i.languages.phpdoc)})(n)}return ufe}var cfe,rFe;function Hxr(){if(rFe)return cfe;rFe=1;var t=fbe();cfe=e,e.displayName="plsql",e.aliases=[];function e(r){r.register(t),r.languages.plsql=r.languages.extend("sql",{comment:{pattern:/\/\*[\s\S]*?\*\/|--.*/,greedy:!0},keyword:/\b(?:A|ACCESSIBLE|ADD|AGENT|AGGREGATE|ALL|ALTER|AND|ANY|ARRAY|AS|ASC|AT|ATTRIBUTE|AUTHID|AVG|BEGIN|BETWEEN|BFILE_BASE|BINARY|BLOB_BASE|BLOCK|BODY|BOTH|BOUND|BULK|BY|BYTE|C|CALL|CALLING|CASCADE|CASE|CHAR|CHARACTER|CHARSET|CHARSETFORM|CHARSETID|CHAR_BASE|CHECK|CLOB_BASE|CLONE|CLOSE|CLUSTER|CLUSTERS|COLAUTH|COLLECT|COLUMNS|COMMENT|COMMIT|COMMITTED|COMPILED|COMPRESS|CONNECT|CONSTANT|CONSTRUCTOR|CONTEXT|CONTINUE|CONVERT|COUNT|CRASH|CREATE|CREDENTIAL|CURRENT|CURSOR|CUSTOMDATUM|DANGLING|DATA|DATE|DATE_BASE|DAY|DECLARE|DEFAULT|DEFINE|DELETE|DESC|DETERMINISTIC|DIRECTORY|DISTINCT|DOUBLE|DROP|DURATION|ELEMENT|ELSE|ELSIF|EMPTY|END|ESCAPE|EXCEPT|EXCEPTION|EXCEPTIONS|EXCLUSIVE|EXECUTE|EXISTS|EXIT|EXTERNAL|FETCH|FINAL|FIRST|FIXED|FLOAT|FOR|FORALL|FORCE|FROM|FUNCTION|GENERAL|GOTO|GRANT|GROUP|HASH|HAVING|HEAP|HIDDEN|HOUR|IDENTIFIED|IF|IMMEDIATE|IMMUTABLE|IN|INCLUDING|INDEX|INDEXES|INDICATOR|INDICES|INFINITE|INSERT|INSTANTIABLE|INT|INTERFACE|INTERSECT|INTERVAL|INTO|INVALIDATE|IS|ISOLATION|JAVA|LANGUAGE|LARGE|LEADING|LENGTH|LEVEL|LIBRARY|LIKE|LIKE2|LIKE4|LIKEC|LIMIT|LIMITED|LOCAL|LOCK|LONG|LOOP|MAP|MAX|MAXLEN|MEMBER|MERGE|MIN|MINUS|MINUTE|MOD|MODE|MODIFY|MONTH|MULTISET|MUTABLE|NAME|NAN|NATIONAL|NATIVE|NCHAR|NEW|NOCOMPRESS|NOCOPY|NOT|NOWAIT|NULL|NUMBER_BASE|OBJECT|OCICOLL|OCIDATE|OCIDATETIME|OCIDURATION|OCIINTERVAL|OCILOBLOCATOR|OCINUMBER|OCIRAW|OCIREF|OCIREFCURSOR|OCIROWID|OCISTRING|OCITYPE|OF|OLD|ON|ONLY|OPAQUE|OPEN|OPERATOR|OPTION|OR|ORACLE|ORADATA|ORDER|ORGANIZATION|ORLANY|ORLVARY|OTHERS|OUT|OVERLAPS|OVERRIDING|PACKAGE|PARALLEL_ENABLE|PARAMETER|PARAMETERS|PARENT|PARTITION|PASCAL|PERSISTABLE|PIPE|PIPELINED|PLUGGABLE|POLYMORPHIC|PRAGMA|PRECISION|PRIOR|PRIVATE|PROCEDURE|PUBLIC|RAISE|RANGE|RAW|READ|RECORD|REF|REFERENCE|RELIES_ON|REM|REMAINDER|RENAME|RESOURCE|RESULT|RESULT_CACHE|RETURN|RETURNING|REVERSE|REVOKE|ROLLBACK|ROW|SAMPLE|SAVE|SAVEPOINT|SB1|SB2|SB4|SECOND|SEGMENT|SELECT|SELF|SEPARATE|SEQUENCE|SERIALIZABLE|SET|SHARE|SHORT|SIZE|SIZE_T|SOME|SPARSE|SQL|SQLCODE|SQLDATA|SQLNAME|SQLSTATE|STANDARD|START|STATIC|STDDEV|STORED|STRING|STRUCT|STYLE|SUBMULTISET|SUBPARTITION|SUBSTITUTABLE|SUBTYPE|SUM|SYNONYM|TABAUTH|TABLE|TDO|THE|THEN|TIME|TIMESTAMP|TIMEZONE_ABBR|TIMEZONE_HOUR|TIMEZONE_MINUTE|TIMEZONE_REGION|TO|TRAILING|TRANSACTION|TRANSACTIONAL|TRUSTED|TYPE|UB1|UB2|UB4|UNDER|UNION|UNIQUE|UNPLUG|UNSIGNED|UNTRUSTED|UPDATE|USE|USING|VALIST|VALUE|VALUES|VARIABLE|VARIANCE|VARRAY|VARYING|VIEW|VIEWS|VOID|WHEN|WHERE|WHILE|WITH|WORK|WRAPPED|WRITE|YEAR|ZONE)\b/i,operator:/:=?|=>|[<>^~!]=|\.\.|\|\||\*\*|[-+*/%<>=@]/}),r.languages.insertBefore("plsql","operator",{label:{pattern:/<<\s*\w+\s*>>/,alias:"symbol"}})}return cfe}var ffe,nFe;function jxr(){if(nFe)return ffe;nFe=1,ffe=t,t.displayName="powerquery",t.aliases=[];function t(e){e.languages.powerquery={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},"quoted-identifier":{pattern:/#"(?:[^"\r\n]|"")*"(?!")/,greedy:!0},string:{pattern:/(?:#!)?"(?:[^"\r\n]|"")*"(?!")/,greedy:!0},constant:[/\bDay\.(?:Friday|Monday|Saturday|Sunday|Thursday|Tuesday|Wednesday)\b/,/\bTraceLevel\.(?:Critical|Error|Information|Verbose|Warning)\b/,/\bOccurrence\.(?:All|First|Last)\b/,/\bOrder\.(?:Ascending|Descending)\b/,/\bRoundingMode\.(?:AwayFromZero|Down|ToEven|TowardZero|Up)\b/,/\bMissingField\.(?:Error|Ignore|UseNull)\b/,/\bQuoteStyle\.(?:Csv|None)\b/,/\bJoinKind\.(?:FullOuter|Inner|LeftAnti|LeftOuter|RightAnti|RightOuter)\b/,/\bGroupKind\.(?:Global|Local)\b/,/\bExtraValues\.(?:Error|Ignore|List)\b/,/\bJoinAlgorithm\.(?:Dynamic|LeftHash|LeftIndex|PairwiseHash|RightHash|RightIndex|SortMerge)\b/,/\bJoinSide\.(?:Left|Right)\b/,/\bPrecision\.(?:Decimal|Double)\b/,/\bRelativePosition\.From(?:End|Start)\b/,/\bTextEncoding\.(?:Ascii|BigEndianUnicode|Unicode|Utf16|Utf8|Windows)\b/,/\b(?:Any|Binary|Date|DateTime|DateTimeZone|Duration|Function|Int16|Int32|Int64|Int8|List|Logical|None|Number|Record|Table|Text|Time)\.Type\b/,/\bnull\b/],boolean:/\b(?:false|true)\b/,keyword:/\b(?:and|as|each|else|error|if|in|is|let|meta|not|nullable|optional|or|otherwise|section|shared|then|try|type)\b|#(?:binary|date|datetime|datetimezone|duration|infinity|nan|sections|shared|table|time)\b/,function:{pattern:/(^|[^#\w.])[a-z_][\w.]*(?=\s*\()/i,lookbehind:!0},"data-type":{pattern:/\b(?:any|anynonnull|binary|date|datetime|datetimezone|duration|function|list|logical|none|number|record|table|text|time)\b/,alias:"class-name"},number:{pattern:/\b0x[\da-f]+\b|(?:[+-]?(?:\b\d+\.)?\b\d+|[+-]\.\d+|(^|[^.])\B\.\d+)(?:e[+-]?\d+)?\b/i,lookbehind:!0},operator:/[-+*\/&?@^]|<(?:=>?|>)?|>=?|=>?|\.\.\.?/,punctuation:/[,;\[\](){}]/},e.languages.pq=e.languages.powerquery,e.languages.mscript=e.languages.powerquery}return ffe}var dfe,iFe;function Vxr(){if(iFe)return dfe;iFe=1,dfe=t,t.displayName="powershell",t.aliases=[];function t(e){(function(r){var n=r.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};n.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:n},boolean:n.boolean,variable:n.variable}})(e)}return dfe}var hfe,aFe;function qxr(){if(aFe)return hfe;aFe=1,hfe=t,t.displayName="processing",t.aliases=[];function t(e){e.languages.processing=e.languages.extend("clike",{keyword:/\b(?:break|case|catch|class|continue|default|else|extends|final|for|if|implements|import|new|null|private|public|return|static|super|switch|this|try|void|while)\b/,function:/\b\w+(?=\s*\()/,operator:/<[<=]?|>[>=]?|&&?|\|\|?|[%?]|[!=+\-*\/]=?/}),e.languages.insertBefore("processing","number",{constant:/\b(?!XML\b)[A-Z][A-Z\d_]+\b/,type:{pattern:/\b(?:boolean|byte|char|color|double|float|int|[A-Z]\w*)\b/,alias:"class-name"}})}return hfe}var pfe,oFe;function Gxr(){if(oFe)return pfe;oFe=1,pfe=t,t.displayName="prolog",t.aliases=[];function t(e){e.languages.prolog={comment:{pattern:/\/\*[\s\S]*?\*\/|%.*/,greedy:!0},string:{pattern:/(["'])(?:\1\1|\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1(?!\1)/,greedy:!0},builtin:/\b(?:fx|fy|xf[xy]?|yfx?)\b/,function:/\b[a-z]\w*(?:(?=\()|\/\d+)/,number:/\b\d+(?:\.\d*)?/,operator:/[:\\=><\-?*@\/;+^|!$.]+|\b(?:is|mod|not|xor)\b/,punctuation:/[(){}\[\],]/}}return pfe}var vfe,sFe;function $xr(){if(sFe)return vfe;sFe=1,vfe=t,t.displayName="promql",t.aliases=[];function t(e){(function(r){var n=["sum","min","max","avg","group","stddev","stdvar","count","count_values","bottomk","topk","quantile"],i=["on","ignoring","group_right","group_left","by","without"],a=["offset"],o=n.concat(i,a);r.languages.promql={comment:{pattern:/(^[ \t]*)#.*/m,lookbehind:!0},"vector-match":{pattern:new RegExp("((?:"+i.join("|")+")\\s*)\\([^)]*\\)"),lookbehind:!0,inside:{"label-key":{pattern:/\b[^,]+\b/,alias:"attr-name"},punctuation:/[(),]/}},"context-labels":{pattern:/\{[^{}]*\}/,inside:{"label-key":{pattern:/\b[a-z_]\w*(?=\s*(?:=|![=~]))/,alias:"attr-name"},"label-value":{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0,alias:"attr-value"},punctuation:/\{|\}|=~?|![=~]|,/}},"context-range":[{pattern:/\[[\w\s:]+\]/,inside:{punctuation:/\[|\]|:/,"range-duration":{pattern:/\b(?:\d+(?:[smhdwy]|ms))+\b/i,alias:"number"}}},{pattern:/(\boffset\s+)\w+/,lookbehind:!0,inside:{"range-duration":{pattern:/\b(?:\d+(?:[smhdwy]|ms))+\b/i,alias:"number"}}}],keyword:new RegExp("\\b(?:"+o.join("|")+")\\b","i"),function:/\b[a-z_]\w*(?=\s*\()/i,number:/[-+]?(?:(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e[-+]?\d+)?\b|\b(?:0x[0-9a-f]+|nan|inf)\b)/i,operator:/[\^*/%+-]|==|!=|<=|<|>=|>|\b(?:and|or|unless)\b/i,punctuation:/[{};()`,.[\]]/}})(e)}return vfe}var mfe,lFe;function Wxr(){if(lFe)return mfe;lFe=1,mfe=t,t.displayName="properties",t.aliases=[];function t(e){e.languages.properties={comment:/^[ \t]*[#!].*$/m,"attr-value":{pattern:/(^[ \t]*(?:\\(?:\r\n|[\s\S])|[^\\\s:=])+(?: *[=:] *(?! )| ))(?:\\(?:\r\n|[\s\S])|[^\\\r\n])+/m,lookbehind:!0},"attr-name":/^[ \t]*(?:\\(?:\r\n|[\s\S])|[^\\\s:=])+(?= *[=:]| )/m,punctuation:/[=:]/}}return mfe}var gfe,uFe;function Yxr(){if(uFe)return gfe;uFe=1,gfe=t,t.displayName="protobuf",t.aliases=[];function t(e){(function(r){var n=/\b(?:bool|bytes|double|s?fixed(?:32|64)|float|[su]?int(?:32|64)|string)\b/;r.languages.protobuf=r.languages.extend("clike",{"class-name":[{pattern:/(\b(?:enum|extend|message|service)\s+)[A-Za-z_]\w*(?=\s*\{)/,lookbehind:!0},{pattern:/(\b(?:rpc\s+\w+|returns)\s*\(\s*(?:stream\s+)?)\.?[A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*(?=\s*\))/,lookbehind:!0}],keyword:/\b(?:enum|extend|extensions|import|message|oneof|option|optional|package|public|repeated|required|reserved|returns|rpc(?=\s+\w)|service|stream|syntax|to)\b(?!\s*=\s*\d)/,function:/\b[a-z_]\w*(?=\s*\()/i}),r.languages.insertBefore("protobuf","operator",{map:{pattern:/\bmap<\s*[\w.]+\s*,\s*[\w.]+\s*>(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/[<>.,]/,builtin:n}},builtin:n,"positional-class-name":{pattern:/(?:\b|\B\.)[a-z_]\w*(?:\.[a-z_]\w*)*(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/\./}},annotation:{pattern:/(\[\s*)[a-z_]\w*(?=\s*=)/i,lookbehind:!0}})})(e)}return gfe}var yfe,cFe;function Xxr(){if(cFe)return yfe;cFe=1,yfe=t,t.displayName="psl",t.aliases=[];function t(e){e.languages.psl={comment:{pattern:/#.*/,greedy:!0},string:{pattern:/"(?:\\.|[^\\"])*"/,greedy:!0,inside:{symbol:/\\[ntrbA-Z"\\]/}},"heredoc-string":{pattern:/<<<([a-zA-Z_]\w*)[\r\n](?:.*[\r\n])*?\1\b/,alias:"string",greedy:!0},keyword:/\b(?:__multi|__single|case|default|do|else|elsif|exit|export|for|foreach|function|if|last|line|local|next|requires|return|switch|until|while|word)\b/,constant:/\b(?:ALARM|CHART_ADD_GRAPH|CHART_DELETE_GRAPH|CHART_DESTROY|CHART_LOAD|CHART_PRINT|EOF|OFFLINE|OK|PSL_PROF_LOG|R_CHECK_HORIZ|R_CHECK_VERT|R_CLICKER|R_COLUMN|R_FRAME|R_ICON|R_LABEL|R_LABEL_CENTER|R_LIST_MULTIPLE|R_LIST_MULTIPLE_ND|R_LIST_SINGLE|R_LIST_SINGLE_ND|R_MENU|R_POPUP|R_POPUP_SCROLLED|R_RADIO_HORIZ|R_RADIO_VERT|R_ROW|R_SCALE_HORIZ|R_SCALE_VERT|R_SEP_HORIZ|R_SEP_VERT|R_SPINNER|R_TEXT_FIELD|R_TEXT_FIELD_LABEL|R_TOGGLE|TRIM_LEADING|TRIM_LEADING_AND_TRAILING|TRIM_REDUNDANT|TRIM_TRAILING|VOID|WARN)\b/,boolean:/\b(?:FALSE|False|NO|No|TRUE|True|YES|Yes|false|no|true|yes)\b/,variable:/\b(?:PslDebug|errno|exit_status)\b/,builtin:{pattern:/\b(?:PslExecute|PslFunctionCall|PslFunctionExists|PslSetOptions|_snmp_debug|acos|add_diary|annotate|annotate_get|ascii_to_ebcdic|asctime|asin|atan|atexit|batch_set|blackout|cat|ceil|chan_exists|change_state|close|code_cvt|cond_signal|cond_wait|console_type|convert_base|convert_date|convert_locale_date|cos|cosh|create|date|dcget_text|destroy|destroy_lock|dget_text|difference|dump_hist|ebcdic_to_ascii|encrypt|event_archive|event_catalog_get|event_check|event_query|event_range_manage|event_range_query|event_report|event_schedule|event_trigger|event_trigger2|execute|exists|exp|fabs|file|floor|fmod|fopen|fseek|ftell|full_discovery|get|get_chan_info|get_ranges|get_text|get_vars|getenv|gethostinfo|getpid|getpname|grep|history|history_get_retention|in_transition|index|int|internal|intersection|is_var|isnumber|join|kill|length|lines|lock|lock_info|log|log10|loge|matchline|msg_check|msg_get_format|msg_get_severity|msg_printf|msg_sprintf|ntharg|nthargf|nthline|nthlinef|num_bytes|num_consoles|pconfig|popen|poplines|pow|print|printf|proc_exists|process|random|read|readln|refresh_parameters|remote_check|remote_close|remote_event_query|remote_event_trigger|remote_file_send|remote_open|remove|replace|rindex|sec_check_priv|sec_store_get|sec_store_set|set|set_alarm_ranges|set_locale|share|sin|sinh|sleep|snmp_agent_config|snmp_agent_start|snmp_agent_stop|snmp_close|snmp_config|snmp_get|snmp_get_next|snmp_h_get|snmp_h_get_next|snmp_h_set|snmp_open|snmp_set|snmp_trap_ignore|snmp_trap_listen|snmp_trap_raise_std_trap|snmp_trap_receive|snmp_trap_register_im|snmp_trap_send|snmp_walk|sopen|sort|splitline|sprintf|sqrt|srandom|str_repeat|strcasecmp|subset|substr|system|tail|tan|tanh|text_domain|time|tmpnam|tolower|toupper|trace_psl_process|trim|union|unique|unlock|unset|va_arg|va_start|write)\b/,alias:"builtin-function"},"foreach-variable":{pattern:/(\bforeach\s+(?:(?:\w+\b|"(?:\\.|[^\\"])*")\s+){0,2})[_a-zA-Z]\w*(?=\s*\()/,lookbehind:!0,greedy:!0},function:/\b[_a-z]\w*\b(?=\s*\()/i,number:/\b(?:0x[0-9a-f]+|\d+(?:\.\d+)?)\b/i,operator:/--|\+\+|&&=?|\|\|=?|<<=?|>>=?|[=!]~|[-+*/%&|^!=<>]=?|\.|[:?]/,punctuation:/[(){}\[\];,]/}}return yfe}var bfe,fFe;function Zxr(){if(fFe)return bfe;fFe=1,bfe=t,t.displayName="pug",t.aliases=[];function t(e){(function(r){r.languages.pug={comment:{pattern:/(^([\t ]*))\/\/.*(?:(?:\r?\n|\r)\2[\t ].+)*/m,lookbehind:!0},"multiline-script":{pattern:/(^([\t ]*)script\b.*\.[\t ]*)(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/m,lookbehind:!0,inside:r.languages.javascript},filter:{pattern:/(^([\t ]*)):.+(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/m,lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"variable"},text:/\S[\s\S]*/}},"multiline-plain-text":{pattern:/(^([\t ]*)[\w\-#.]+\.[\t ]*)(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/m,lookbehind:!0},markup:{pattern:/(^[\t ]*)<.+/m,lookbehind:!0,inside:r.languages.markup},doctype:{pattern:/((?:^|\n)[\t ]*)doctype(?: .+)?/,lookbehind:!0},"flow-control":{pattern:/(^[\t ]*)(?:case|default|each|else|if|unless|when|while)\b(?: .+)?/m,lookbehind:!0,inside:{each:{pattern:/^each .+? in\b/,inside:{keyword:/\b(?:each|in)\b/,punctuation:/,/}},branch:{pattern:/^(?:case|default|else|if|unless|when|while)\b/,alias:"keyword"},rest:r.languages.javascript}},keyword:{pattern:/(^[\t ]*)(?:append|block|extends|include|prepend)\b.+/m,lookbehind:!0},mixin:[{pattern:/(^[\t ]*)mixin .+/m,lookbehind:!0,inside:{keyword:/^mixin/,function:/\w+(?=\s*\(|\s*$)/,punctuation:/[(),.]/}},{pattern:/(^[\t ]*)\+.+/m,lookbehind:!0,inside:{name:{pattern:/^\+\w+/,alias:"function"},rest:r.languages.javascript}}],script:{pattern:/(^[\t ]*script(?:(?:&[^(]+)?\([^)]+\))*[\t ]).+/m,lookbehind:!0,inside:r.languages.javascript},"plain-text":{pattern:/(^[\t ]*(?!-)[\w\-#.]*[\w\-](?:(?:&[^(]+)?\([^)]+\))*\/?[\t ]).+/m,lookbehind:!0},tag:{pattern:/(^[\t ]*)(?!-)[\w\-#.]*[\w\-](?:(?:&[^(]+)?\([^)]+\))*\/?:?/m,lookbehind:!0,inside:{attributes:[{pattern:/&[^(]+\([^)]+\)/,inside:r.languages.javascript},{pattern:/\([^)]+\)/,inside:{"attr-value":{pattern:/(=\s*(?!\s))(?:\{[^}]*\}|[^,)\r\n]+)/,lookbehind:!0,inside:r.languages.javascript},"attr-name":/[\w-]+(?=\s*!?=|\s*[,)])/,punctuation:/[!=(),]+/}}],punctuation:/:/,"attr-id":/#[\w\-]+/,"attr-class":/\.[\w\-]+/}},code:[{pattern:/(^[\t ]*(?:-|!?=)).+/m,lookbehind:!0,inside:r.languages.javascript}],punctuation:/[.\-!=|]+/};for(var n=/(^([\t ]*)):<filter_name>(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/.source,i=[{filter:"atpl",language:"twig"},{filter:"coffee",language:"coffeescript"},"ejs","handlebars","less","livescript","markdown",{filter:"sass",language:"scss"},"stylus"],a={},o=0,s=i.length;o<s;o++){var d=i[o];d=typeof d=="string"?{filter:d,language:d}:d,r.languages[d.language]&&(a["filter-"+d.filter]={pattern:RegExp(n.replace("<filter_name>",function(){return d.filter}),"m"),lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"variable"},text:{pattern:/\S[\s\S]*/,alias:[d.language,"language-"+d.language],inside:r.languages[d.language]}}})}r.languages.insertBefore("pug","filter",a)})(e)}return bfe}var xfe,dFe;function Kxr(){if(dFe)return xfe;dFe=1,xfe=t,t.displayName="puppet",t.aliases=[];function t(e){(function(r){r.languages.puppet={heredoc:[{pattern:/(@\("([^"\r\n\/):]+)"(?:\/[nrts$uL]*)?\).*(?:\r?\n|\r))(?:.*(?:\r?\n|\r(?!\n)))*?[ \t]*(?:\|[ \t]*)?(?:-[ \t]*)?\2/,lookbehind:!0,alias:"string",inside:{punctuation:/(?=\S).*\S(?= *$)/}},{pattern:/(@\(([^"\r\n\/):]+)(?:\/[nrts$uL]*)?\).*(?:\r?\n|\r))(?:.*(?:\r?\n|\r(?!\n)))*?[ \t]*(?:\|[ \t]*)?(?:-[ \t]*)?\2/,lookbehind:!0,greedy:!0,alias:"string",inside:{punctuation:/(?=\S).*\S(?= *$)/}},{pattern:/@\("?(?:[^"\r\n\/):]+)"?(?:\/[nrts$uL]*)?\)/,alias:"string",inside:{punctuation:{pattern:/(\().+?(?=\))/,lookbehind:!0}}}],"multiline-comment":{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0,greedy:!0,alias:"comment"},regex:{pattern:/((?:\bnode\s+|[~=\(\[\{,]\s*|[=+]>\s*|^\s*))\/(?:[^\/\\]|\\[\s\S])+\/(?:[imx]+\b|\B)/,lookbehind:!0,greedy:!0,inside:{"extended-regex":{pattern:/^\/(?:[^\/\\]|\\[\s\S])+\/[im]*x[im]*$/,inside:{comment:/#.*/}}}},comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},string:{pattern:/(["'])(?:\$\{(?:[^'"}]|(["'])(?:(?!\2)[^\\]|\\[\s\S])*\2)+\}|\$(?!\{)|(?!\1)[^\\$]|\\[\s\S])*\1/,greedy:!0,inside:{"double-quoted":{pattern:/^"[\s\S]*"$/,inside:{}}}},variable:{pattern:/\$(?:::)?\w+(?:::\w+)*/,inside:{punctuation:/::/}},"attr-name":/(?:\b\w+|\*)(?=\s*=>)/,function:[{pattern:/(\.)(?!\d)\w+/,lookbehind:!0},/\b(?:contain|debug|err|fail|include|info|notice|realize|require|tag|warning)\b|\b(?!\d)\w+(?=\()/],number:/\b(?:0x[a-f\d]+|\d+(?:\.\d+)?(?:e-?\d+)?)\b/i,boolean:/\b(?:false|true)\b/,keyword:/\b(?:application|attr|case|class|consumes|default|define|else|elsif|function|if|import|inherits|node|private|produces|type|undef|unless)\b/,datatype:{pattern:/\b(?:Any|Array|Boolean|Callable|Catalogentry|Class|Collection|Data|Default|Enum|Float|Hash|Integer|NotUndef|Numeric|Optional|Pattern|Regexp|Resource|Runtime|Scalar|String|Struct|Tuple|Type|Undef|Variant)\b/,alias:"symbol"},operator:/=[=~>]?|![=~]?|<(?:<\|?|[=~|-])?|>[>=]?|->?|~>|\|>?>?|[*\/%+?]|\b(?:and|in|or)\b/,punctuation:/[\[\]{}().,;]|:+/};var n=[{pattern:/(^|[^\\])\$\{(?:[^'"{}]|\{[^}]*\}|(["'])(?:(?!\2)[^\\]|\\[\s\S])*\2)+\}/,lookbehind:!0,inside:{"short-variable":{pattern:/(^\$\{)(?!\w+\()(?:::)?\w+(?:::\w+)*/,lookbehind:!0,alias:"variable",inside:{punctuation:/::/}},delimiter:{pattern:/^\$/,alias:"variable"},rest:r.languages.puppet}},{pattern:/(^|[^\\])\$(?:::)?\w+(?:::\w+)*/,lookbehind:!0,alias:"variable",inside:{punctuation:/::/}}];r.languages.puppet.heredoc[0].inside.interpolation=n,r.languages.puppet.string.inside["double-quoted"].inside.interpolation=n})(e)}return xfe}var _fe,hFe;function Jxr(){if(hFe)return _fe;hFe=1,_fe=t,t.displayName="pure",t.aliases=[];function t(e){(function(r){r.languages.pure={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0},/#!.+/],"inline-lang":{pattern:/%<[\s\S]+?%>/,greedy:!0,inside:{lang:{pattern:/(^%< *)-\*-.+?-\*-/,lookbehind:!0,alias:"comment"},delimiter:{pattern:/^%<.*|%>$/,alias:"punctuation"}}},string:{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0},number:{pattern:/((?:\.\.)?)(?:\b(?:inf|nan)\b|\b0x[\da-f]+|(?:\b(?:0b)?\d+(?:\.\d+)?|\B\.\d+)(?:e[+-]?\d+)?L?)/i,lookbehind:!0},keyword:/\b(?:NULL|ans|break|bt|case|catch|cd|clear|const|def|del|dump|else|end|exit|extern|false|force|help|if|infix[lr]?|interface|let|ls|mem|namespace|nonfix|of|otherwise|outfix|override|postfix|prefix|private|public|pwd|quit|run|save|show|stats|then|throw|trace|true|type|underride|using|when|with)\b/,function:/\b(?:abs|add_(?:addr|constdef|(?:fundef|interface|macdef|typedef)(?:_at)?|vardef)|all|any|applp?|arity|bigintp?|blob(?:_crc|_size|p)?|boolp?|byte_c?string(?:_pointer)?|byte_(?:matrix|pointer)|calloc|cat|catmap|ceil|char[ps]?|check_ptrtag|chr|clear_sentry|clearsym|closurep?|cmatrixp?|cols?|colcat(?:map)?|colmap|colrev|colvector(?:p|seq)?|complex(?:_float_(?:matrix|pointer)|_matrix(?:_view)?|_pointer|p)?|conj|cookedp?|cst|cstring(?:_(?:dup|list|vector))?|curry3?|cyclen?|del_(?:constdef|fundef|interface|macdef|typedef|vardef)|delete|diag(?:mat)?|dim|dmatrixp?|do|double(?:_matrix(?:_view)?|_pointer|p)?|dowith3?|drop|dropwhile|eval(?:cmd)?|exactp|filter|fix|fixity|flip|float(?:_matrix|_pointer)|floor|fold[lr]1?|frac|free|funp?|functionp?|gcd|get(?:_(?:byte|constdef|double|float|fundef|int(?:64)?|interface(?:_typedef)?|long|macdef|pointer|ptrtag|sentry|short|string|typedef|vardef))?|globsym|hash|head|id|im|imatrixp?|index|inexactp|infp|init|insert|int(?:_matrix(?:_view)?|_pointer|p)?|int64_(?:matrix|pointer)|integerp?|iteraten?|iterwhile|join|keys?|lambdap?|last(?:err(?:pos)?)?|lcd|list[2p]?|listmap|make_ptrtag|malloc|map|matcat|matrixp?|max|member|min|nanp|nargs|nmatrixp?|null|numberp?|ord|pack(?:ed)?|pointer(?:_cast|_tag|_type|p)?|pow|pred|ptrtag|put(?:_(?:byte|double|float|int(?:64)?|long|pointer|short|string))?|rationalp?|re|realp?|realloc|recordp?|redim|reduce(?:_with)?|refp?|repeatn?|reverse|rlistp?|round|rows?|rowcat(?:map)?|rowmap|rowrev|rowvector(?:p|seq)?|same|scan[lr]1?|sentry|sgn|short_(?:matrix|pointer)|slice|smatrixp?|sort|split|str|strcat|stream|stride|string(?:_(?:dup|list|vector)|p)?|subdiag(?:mat)?|submat|subseq2?|substr|succ|supdiag(?:mat)?|symbolp?|tail|take|takewhile|thunkp?|transpose|trunc|tuplep?|typep|ubyte|uint(?:64)?|ulong|uncurry3?|unref|unzip3?|update|ushort|vals?|varp?|vector(?:p|seq)?|void|zip3?|zipwith3?)\b/,special:{pattern:/\b__[a-z]+__\b/i,alias:"builtin"},operator:/(?:[!"#$%&'*+,\-.\/:<=>?@\\^`|~\u00a1-\u00bf\u00d7-\u00f7\u20d0-\u2bff]|\b_+\b)+|\b(?:and|div|mod|not|or)\b/,punctuation:/[(){}\[\];,|]/};var n=["c",{lang:"c++",alias:"cpp"},"fortran"],i=/%< *-\*- *<lang>\d* *-\*-[\s\S]+?%>/.source;n.forEach(function(a){var o=a;if(typeof a!="string"&&(o=a.alias,a=a.lang),r.languages[o]){var s={};s["inline-lang-"+o]={pattern:RegExp(i.replace("<lang>",a.replace(/([.+*?\/\\(){}\[\]])/g,"\\$1")),"i"),inside:r.util.clone(r.languages.pure["inline-lang"].inside)},s["inline-lang-"+o].inside.rest=r.util.clone(r.languages[o]),r.languages.insertBefore("pure","inline-lang",s)}}),r.languages.c&&(r.languages.pure["inline-lang"].inside.rest=r.util.clone(r.languages.c))})(e)}return _fe}var wfe,pFe;function Qxr(){if(pFe)return wfe;pFe=1,wfe=t,t.displayName="purebasic",t.aliases=[];function t(e){e.languages.purebasic=e.languages.extend("clike",{comment:/;.*/,keyword:/\b(?:align|and|as|break|calldebugger|case|compilercase|compilerdefault|compilerelse|compilerelseif|compilerendif|compilerendselect|compilererror|compilerif|compilerselect|continue|data|datasection|debug|debuglevel|declare|declarec|declarecdll|declaredll|declaremodule|default|define|dim|disableasm|disabledebugger|disableexplicit|else|elseif|enableasm|enabledebugger|enableexplicit|end|enddatasection|enddeclaremodule|endenumeration|endif|endimport|endinterface|endmacro|endmodule|endprocedure|endselect|endstructure|endstructureunion|endwith|enumeration|extends|fakereturn|for|foreach|forever|global|gosub|goto|if|import|importc|includebinary|includefile|includepath|interface|macro|module|newlist|newmap|next|not|or|procedure|procedurec|procedurecdll|proceduredll|procedurereturn|protected|prototype|prototypec|read|redim|repeat|restore|return|runtime|select|shared|static|step|structure|structureunion|swap|threaded|to|until|wend|while|with|xincludefile|xor)\b/i,function:/\b\w+(?:\.\w+)?\s*(?=\()/,number:/(?:\$[\da-f]+|\b-?(?:\d+(?:\.\d+)?|\.\d+)(?:e[+-]?\d+)?)\b/i,operator:/(?:@\*?|\?|\*)\w+|-[>-]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|?\||[~^%?*/@]/}),e.languages.insertBefore("purebasic","keyword",{tag:/#\w+\$?/,asm:{pattern:/(^[\t ]*)!.*/m,lookbehind:!0,alias:"tag",inside:{comment:/;.*/,string:{pattern:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"label-reference-anonymous":{pattern:/(!\s*j[a-z]+\s+)@[fb]/i,lookbehind:!0,alias:"fasm-label"},"label-reference-addressed":{pattern:/(!\s*j[a-z]+\s+)[A-Z._?$@][\w.?$@~#]*/i,lookbehind:!0,alias:"fasm-label"},keyword:[/\b(?:extern|global)\b[^;\r\n]*/i,/\b(?:CPU|DEFAULT|FLOAT)\b.*/],function:{pattern:/^([\t ]*!\s*)[\da-z]+(?=\s|$)/im,lookbehind:!0},"function-inline":{pattern:/(:\s*)[\da-z]+(?=\s)/i,lookbehind:!0,alias:"function"},label:{pattern:/^([\t ]*!\s*)[A-Za-z._?$@][\w.?$@~#]*(?=:)/m,lookbehind:!0,alias:"fasm-label"},register:/\b(?:st\d|[xyz]mm\d\d?|[cdt]r\d|r\d\d?[bwd]?|[er]?[abcd]x|[abcd][hl]|[er]?(?:bp|di|si|sp)|[cdefgs]s|mm\d+)\b/i,number:/(?:\b|-|(?=\$))(?:0[hx](?:[\da-f]*\.)?[\da-f]+(?:p[+-]?\d+)?|\d[\da-f]+[hx]|\$\d[\da-f]*|0[oq][0-7]+|[0-7]+[oq]|0[by][01]+|[01]+[by]|0[dt]\d+|(?:\d+(?:\.\d+)?|\.\d+)(?:\.?e[+-]?\d+)?[dt]?)\b/i,operator:/[\[\]*+\-/%<>=&|$!,.:]/}}}),delete e.languages.purebasic["class-name"],delete e.languages.purebasic.boolean,e.languages.pbfasm=e.languages.purebasic}return wfe}var Sfe,vFe;function e_r(){if(vFe)return Sfe;vFe=1;var t=hbe();Sfe=e,e.displayName="purescript",e.aliases=["purs"];function e(r){r.register(t),r.languages.purescript=r.languages.extend("haskell",{keyword:/\b(?:ado|case|class|data|derive|do|else|forall|if|in|infixl|infixr|instance|let|module|newtype|of|primitive|then|type|where)\b|∀/,"import-statement":{pattern:/(^[\t ]*)import\s+[A-Z][\w']*(?:\.[A-Z][\w']*)*(?:\s+as\s+[A-Z][\w']*(?:\.[A-Z][\w']*)*)?(?:\s+hiding\b)?/m,lookbehind:!0,inside:{keyword:/\b(?:as|hiding|import)\b/,punctuation:/\./}},builtin:/\b(?:absurd|add|ap|append|apply|between|bind|bottom|clamp|compare|comparing|compose|conj|const|degree|discard|disj|div|eq|flap|flip|gcd|identity|ifM|join|lcm|liftA1|liftM1|map|max|mempty|min|mod|mul|negate|not|notEq|one|otherwise|recip|show|sub|top|unit|unless|unlessM|void|when|whenM|zero)\b/,operator:[r.languages.haskell.operator[0],r.languages.haskell.operator[2],/[\xa2-\xa6\xa8\xa9\xac\xae-\xb1\xb4\xb8\xd7\xf7\u02c2-\u02c5\u02d2-\u02df\u02e5-\u02eb\u02ed\u02ef-\u02ff\u0375\u0384\u0385\u03f6\u0482\u058d-\u058f\u0606-\u0608\u060b\u060e\u060f\u06de\u06e9\u06fd\u06fe\u07f6\u07fe\u07ff\u09f2\u09f3\u09fa\u09fb\u0af1\u0b70\u0bf3-\u0bfa\u0c7f\u0d4f\u0d79\u0e3f\u0f01-\u0f03\u0f13\u0f15-\u0f17\u0f1a-\u0f1f\u0f34\u0f36\u0f38\u0fbe-\u0fc5\u0fc7-\u0fcc\u0fce\u0fcf\u0fd5-\u0fd8\u109e\u109f\u1390-\u1399\u166d\u17db\u1940\u19de-\u19ff\u1b61-\u1b6a\u1b74-\u1b7c\u1fbd\u1fbf-\u1fc1\u1fcd-\u1fcf\u1fdd-\u1fdf\u1fed-\u1fef\u1ffd\u1ffe\u2044\u2052\u207a-\u207c\u208a-\u208c\u20a0-\u20bf\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211e-\u2123\u2125\u2127\u2129\u212e\u213a\u213b\u2140-\u2144\u214a-\u214d\u214f\u218a\u218b\u2190-\u2307\u230c-\u2328\u232b-\u2426\u2440-\u244a\u249c-\u24e9\u2500-\u2767\u2794-\u27c4\u27c7-\u27e5\u27f0-\u2982\u2999-\u29d7\u29dc-\u29fb\u29fe-\u2b73\u2b76-\u2b95\u2b97-\u2bff\u2ce5-\u2cea\u2e50\u2e51\u2e80-\u2e99\u2e9b-\u2ef3\u2f00-\u2fd5\u2ff0-\u2ffb\u3004\u3012\u3013\u3020\u3036\u3037\u303e\u303f\u309b\u309c\u3190\u3191\u3196-\u319f\u31c0-\u31e3\u3200-\u321e\u322a-\u3247\u3250\u3260-\u327f\u328a-\u32b0\u32c0-\u33ff\u4dc0-\u4dff\ua490-\ua4c6\ua700-\ua716\ua720\ua721\ua789\ua78a\ua828-\ua82b\ua836-\ua839\uaa77-\uaa79\uab5b\uab6a\uab6b\ufb29\ufbb2-\ufbc1\ufdfc\ufdfd\ufe62\ufe64-\ufe66\ufe69\uff04\uff0b\uff1c-\uff1e\uff3e\uff40\uff5c\uff5e\uffe0-\uffe6\uffe8-\uffee\ufffc\ufffd]/]}),r.languages.purs=r.languages.purescript}return Sfe}var Tfe,mFe;function t_r(){if(mFe)return Tfe;mFe=1,Tfe=t,t.displayName="python",t.aliases=["py"];function t(e){e.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},e.languages.python["string-interpolation"].inside.interpolation.inside.rest=e.languages.python,e.languages.py=e.languages.python}return Tfe}var Efe,gFe;function r_r(){if(gFe)return Efe;gFe=1,Efe=t,t.displayName="q",t.aliases=[];function t(e){e.languages.q={string:/"(?:\\.|[^"\\\r\n])*"/,comment:[{pattern:/([\t )\]}])\/.*/,lookbehind:!0,greedy:!0},{pattern:/(^|\r?\n|\r)\/[\t ]*(?:(?:\r?\n|\r)(?:.*(?:\r?\n|\r(?!\n)))*?(?:\\(?=[\t ]*(?:\r?\n|\r))|$)|\S.*)/,lookbehind:!0,greedy:!0},{pattern:/^\\[\t ]*(?:\r?\n|\r)[\s\S]+/m,greedy:!0},{pattern:/^#!.+/m,greedy:!0}],symbol:/`(?::\S+|[\w.]*)/,datetime:{pattern:/0N[mdzuvt]|0W[dtz]|\d{4}\.\d\d(?:m|\.\d\d(?:T(?:\d\d(?::\d\d(?::\d\d(?:[.:]\d\d\d)?)?)?)?)?[dz]?)|\d\d:\d\d(?::\d\d(?:[.:]\d\d\d)?)?[uvt]?/,alias:"number"},number:/\b(?![01]:)(?:0N[hje]?|0W[hj]?|0[wn]|0x[\da-fA-F]+|\d+(?:\.\d*)?(?:e[+-]?\d+)?[hjfeb]?)/,keyword:/\\\w+\b|\b(?:abs|acos|aj0?|all|and|any|asc|asin|asof|atan|attr|avgs?|binr?|by|ceiling|cols|cor|cos|count|cov|cross|csv|cut|delete|deltas|desc|dev|differ|distinct|div|do|dsave|ej|enlist|eval|except|exec|exit|exp|fby|fills|first|fkeys|flip|floor|from|get|getenv|group|gtime|hclose|hcount|hdel|hopen|hsym|iasc|identity|idesc|if|ij|in|insert|inter|inv|keys?|last|like|list|ljf?|load|log|lower|lsq|ltime|ltrim|mavg|maxs?|mcount|md5|mdev|med|meta|mins?|mmax|mmin|mmu|mod|msum|neg|next|not|null|or|over|parse|peach|pj|plist|prds?|prev|prior|rand|rank|ratios|raze|read0|read1|reciprocal|reval|reverse|rload|rotate|rsave|rtrim|save|scan|scov|sdev|select|set|setenv|show|signum|sin|sqrt|ssr?|string|sublist|sums?|sv|svar|system|tables|tan|til|trim|txf|type|uj|ungroup|union|update|upper|upsert|value|var|views?|vs|wavg|where|while|within|wj1?|wsum|ww|xasc|xbar|xcols?|xdesc|xexp|xgroup|xkey|xlog|xprev|xrank)\b/,adverb:{pattern:/['\/\\]:?|\beach\b/,alias:"function"},verb:{pattern:/(?:\B\.\B|\b[01]:|<[=>]?|>=?|[:+\-*%,!?~=|$&#@^]):?|\b_\b:?/,alias:"operator"},punctuation:/[(){}\[\];.]/}}return Efe}var Afe,yFe;function n_r(){if(yFe)return Afe;yFe=1,Afe=t,t.displayName="qml",t.aliases=[];function t(e){(function(r){for(var n=/"(?:\\.|[^\\"\r\n])*"|'(?:\\.|[^\\'\r\n])*'/.source,i=/\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))*\*\//.source,a=/(?:[^\\()[\]{}"'/]|<string>|\/(?![*/])|<comment>|\(<expr>*\)|\[<expr>*\]|\{<expr>*\}|\\[\s\S])/.source.replace(/<string>/g,function(){return n}).replace(/<comment>/g,function(){return i}),o=0;o<2;o++)a=a.replace(/<expr>/g,function(){return a});a=a.replace(/<expr>/g,"[^\\s\\S]"),r.languages.qml={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},"javascript-function":{pattern:RegExp(/((?:^|;)[ \t]*)function\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*\(<js>*\)\s*\{<js>*\}/.source.replace(/<js>/g,function(){return a}),"m"),lookbehind:!0,greedy:!0,alias:"language-javascript",inside:r.languages.javascript},"class-name":{pattern:/((?:^|[:;])[ \t]*)(?!\d)\w+(?=[ \t]*\{|[ \t]+on\b)/m,lookbehind:!0},property:[{pattern:/((?:^|[;{])[ \t]*)(?!\d)\w+(?:\.\w+)*(?=[ \t]*:)/m,lookbehind:!0},{pattern:/((?:^|[;{])[ \t]*)property[ \t]+(?!\d)\w+(?:\.\w+)*[ \t]+(?!\d)\w+(?:\.\w+)*(?=[ \t]*:)/m,lookbehind:!0,inside:{keyword:/^property/,property:/\w+(?:\.\w+)*/}}],"javascript-expression":{pattern:RegExp(/(:[ \t]*)(?![\s;}[])(?:(?!$|[;}])<js>)+/.source.replace(/<js>/g,function(){return a}),"m"),lookbehind:!0,greedy:!0,alias:"language-javascript",inside:r.languages.javascript},string:{pattern:/"(?:\\.|[^\\"\r\n])*"/,greedy:!0},keyword:/\b(?:as|import|on)\b/,punctuation:/[{}[\]:;,]/}})(e)}return Afe}var Cfe,bFe;function i_r(){if(bFe)return Cfe;bFe=1,Cfe=t,t.displayName="qore",t.aliases=[];function t(e){e.languages.qore=e.languages.extend("clike",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:\/\/|#).*)/,lookbehind:!0},string:{pattern:/("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},keyword:/\b(?:abstract|any|assert|binary|bool|boolean|break|byte|case|catch|char|class|code|const|continue|data|default|do|double|else|enum|extends|final|finally|float|for|goto|hash|if|implements|import|inherits|instanceof|int|interface|long|my|native|new|nothing|null|object|our|own|private|reference|rethrow|return|short|soft(?:bool|date|float|int|list|number|string)|static|strictfp|string|sub|super|switch|synchronized|this|throw|throws|transient|try|void|volatile|while)\b/,boolean:/\b(?:false|true)\b/i,function:/\$?\b(?!\d)\w+(?=\()/,number:/\b(?:0b[01]+|0x(?:[\da-f]*\.)?[\da-fp\-]+|(?:\d+(?:\.\d+)?|\.\d+)(?:e\d+)?[df]|(?:\d+(?:\.\d+)?|\.\d+))\b/i,operator:{pattern:/(^|[^.])(?:\+[+=]?|-[-=]?|[!=](?:==?|~)?|>>?=?|<(?:=>?|<=?)?|&[&=]?|\|[|=]?|[*\/%^]=?|[~?])/,lookbehind:!0},variable:/\$(?!\d)\w+\b/})}return Cfe}var Mfe,xFe;function a_r(){if(xFe)return Mfe;xFe=1,Mfe=t,t.displayName="qsharp",t.aliases=["qs"];function t(e){(function(r){function n(ie,de){return ie.replace(/<<(\d+)>>/g,function(ae,U){return"(?:"+de[+U]+")"})}function i(ie,de,ae){return RegExp(n(ie,de),"")}function a(ie,de){for(var ae=0;ae<de;ae++)ie=ie.replace(/<<self>>/g,function(){return"(?:"+ie+")"});return ie.replace(/<<self>>/g,"[^\\s\\S]")}var o={type:"Adj BigInt Bool Ctl Double false Int One Pauli PauliI PauliX PauliY PauliZ Qubit Range Result String true Unit Zero",other:"Adjoint adjoint apply as auto body borrow borrowing Controlled controlled distribute elif else fail fixup for function if in internal intrinsic invert is let mutable namespace new newtype open operation repeat return self set until use using while within"};function s(ie){return"\\b(?:"+ie.trim().replace(/ /g,"|")+")\\b"}var d=RegExp(s(o.type+" "+o.other)),b=/\b[A-Za-z_]\w*\b/.source,L=n(/<<0>>(?:\s*\.\s*<<0>>)*/.source,[b]),B={keyword:d,punctuation:/[<>()?,.:[\]]/},V=/"(?:\\.|[^\\"])*"/.source;r.languages.qsharp=r.languages.extend("clike",{comment:/\/\/.*/,string:[{pattern:i(/(^|[^$\\])<<0>>/.source,[V]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:i(/(\b(?:as|open)\s+)<<0>>(?=\s*(?:;|as\b))/.source,[L]),lookbehind:!0,inside:B},{pattern:i(/(\bnamespace\s+)<<0>>(?=\s*\{)/.source,[L]),lookbehind:!0,inside:B}],keyword:d,number:/(?:\b0(?:x[\da-f]+|b[01]+|o[0-7]+)|(?:\B\.\d+|\b\d+(?:\.\d*)?)(?:e[-+]?\d+)?)l?\b/i,operator:/\band=|\bor=|\band\b|\bnot\b|\bor\b|<[-=]|[-=]>|>>>=?|<<<=?|\^\^\^=?|\|\|\|=?|&&&=?|w\/=?|~~~|[*\/+\-^=!%]=?/,punctuation:/::|[{}[\];(),.:]/}),r.languages.insertBefore("qsharp","number",{range:{pattern:/\.\./,alias:"operator"}});var X=a(n(/\{(?:[^"{}]|<<0>>|<<self>>)*\}/.source,[V]),2);r.languages.insertBefore("qsharp","string",{"interpolation-string":{pattern:i(/\$"(?:\\.|<<0>>|[^\\"{])*"/.source,[X]),greedy:!0,inside:{interpolation:{pattern:i(/((?:^|[^\\])(?:\\\\)*)<<0>>/.source,[X]),lookbehind:!0,inside:{punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-qsharp",inside:r.languages.qsharp}}},string:/[\s\S]+/}}})})(e),e.languages.qs=e.languages.qsharp}return Mfe}var Rfe,_Fe;function o_r(){if(_Fe)return Rfe;_Fe=1,Rfe=t,t.displayName="r",t.aliases=[];function t(e){e.languages.r={comment:/#.*/,string:{pattern:/(['"])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"percent-operator":{pattern:/%[^%\s]*%/,alias:"operator"},boolean:/\b(?:FALSE|TRUE)\b/,ellipsis:/\.\.(?:\.|\d+)/,number:[/\b(?:Inf|NaN)\b/,/(?:\b0x[\dA-Fa-f]+(?:\.\d*)?|\b\d+(?:\.\d*)?|\B\.\d+)(?:[EePp][+-]?\d+)?[iL]?/],keyword:/\b(?:NA|NA_character_|NA_complex_|NA_integer_|NA_real_|NULL|break|else|for|function|if|in|next|repeat|while)\b/,operator:/->?>?|<(?:=|<?-)?|[>=!]=?|::?|&&?|\|\|?|[+*\/^$@~]/,punctuation:/[(){}\[\],;]/}}return Rfe}var kfe,wFe;function s_r(){if(wFe)return kfe;wFe=1;var t=gbe();kfe=e,e.displayName="racket",e.aliases=["rkt"];function e(r){r.register(t),r.languages.racket=r.languages.extend("scheme",{"lambda-parameter":{pattern:/([(\[]lambda\s+[(\[])[^()\[\]'\s]+/,lookbehind:!0}}),r.languages.insertBefore("racket","string",{lang:{pattern:/^#lang.+/m,greedy:!0,alias:"keyword"}}),r.languages.rkt=r.languages.racket}return kfe}var Ife,SFe;function l_r(){if(SFe)return Ife;SFe=1,Ife=t,t.displayName="reason",t.aliases=[];function t(e){e.languages.reason=e.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),e.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete e.languages.reason.function}return Ife}var Pfe,TFe;function u_r(){if(TFe)return Pfe;TFe=1,Pfe=t,t.displayName="regex",t.aliases=[];function t(e){(function(r){var n={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},i=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,a={pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},o={pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},s="(?:[^\\\\-]|"+i.source+")",d=RegExp(s+"-"+s),b={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};r.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:d,inside:{escape:i,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":n,"char-set":o,escape:i}},"special-escape":n,"char-set":a,backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":b}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:i,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":b}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}}})(e)}return Pfe}var Dfe,EFe;function c_r(){if(EFe)return Dfe;EFe=1,Dfe=t,t.displayName="rego",t.aliases=[];function t(e){e.languages.rego={comment:/#.*/,property:{pattern:/(^|[^\\.])(?:"(?:\\.|[^\\"\r\n])*"|`[^`]*`|\b[a-z_]\w*\b)(?=\s*:(?!=))/i,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:as|default|else|import|not|null|package|set(?=\s*\()|some|with)\b/,boolean:/\b(?:false|true)\b/,function:{pattern:/\b[a-z_]\w*\b(?:\s*\.\s*\b[a-z_]\w*\b)*(?=\s*\()/i,inside:{namespace:/\b\w+\b(?=\s*\.)/,punctuation:/\./}},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,operator:/[-+*/%|&]|[<>:=]=?|!=|\b_\b/,punctuation:/[,;.\[\]{}()]/}}return Dfe}var Lfe,AFe;function f_r(){if(AFe)return Lfe;AFe=1,Lfe=t,t.displayName="renpy",t.aliases=["rpy"];function t(e){e.languages.renpy={comment:{pattern:/(^|[^\\])#.+/,lookbehind:!0},string:{pattern:/("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\])*\2|(?:^#?(?:(?:[0-9a-fA-F]){3}|[0-9a-fA-F]{6})$)/m,greedy:!0},function:/\b[a-z_]\w*(?=\()/i,property:/\b(?:Update|UpdateVersion|action|activate_sound|adv_nvl_transition|after_load_transition|align|alpha|alt|anchor|antialias|area|auto|background|bar_invert|bar_resizing|bar_vertical|black_color|bold|bottom_bar|bottom_gutter|bottom_margin|bottom_padding|box_reverse|box_wrap|can_update|caret|child|color|crop|default_afm_enable|default_afm_time|default_fullscreen|default_text_cps|developer|directory_name|drag_handle|drag_joined|drag_name|drag_raise|draggable|dragged|drop_shadow|drop_shadow_color|droppable|dropped|easein|easeout|edgescroll|end_game_transition|end_splash_transition|enter_replay_transition|enter_sound|enter_transition|enter_yesno_transition|executable_name|exit_replay_transition|exit_sound|exit_transition|exit_yesno_transition|fadein|fadeout|first_indent|first_spacing|fit_first|focus|focus_mask|font|foreground|game_main_transition|get_installed_packages|google_play_key|google_play_salt|ground|has_music|has_sound|has_voice|height|help|hinting|hover|hover_background|hover_color|hover_sound|hovered|hyperlink_functions|idle|idle_color|image_style|include_update|insensitive|insensitive_background|insensitive_color|inside|intra_transition|italic|justify|kerning|keyboard_focus|language|layer_clipping|layers|layout|left_bar|left_gutter|left_margin|left_padding|length|line_leading|line_overlap_split|line_spacing|linear|main_game_transition|main_menu_music|maximum|min_width|minimum|minwidth|modal|mouse|mousewheel|name|narrator_menu|newline_indent|nvl_adv_transition|offset|order_reverse|outlines|overlay_functions|pos|position|prefix|radius|range|rest_indent|right_bar|right_gutter|right_margin|right_padding|rotate|rotate_pad|ruby_style|sample_sound|save_directory|say_attribute_transition|screen_height|screen_width|scrollbars|selected_hover|selected_hover_color|selected_idle|selected_idle_color|selected_insensitive|show_side_image|show_two_window|side_spacing|side_xpos|side_ypos|size|size_group|slow_cps|slow_cps_multiplier|spacing|strikethrough|subpixel|text_align|text_style|text_xpos|text_y_fudge|text_ypos|thumb|thumb_offset|thumb_shadow|thumbnail_height|thumbnail_width|time|top_bar|top_gutter|top_margin|top_padding|translations|underline|unscrollable|update|value|version|version_name|version_tuple|vertical|width|window_hide_transition|window_icon|window_left_padding|window_show_transition|window_title|windows_icon|xadjustment|xalign|xanchor|xanchoraround|xaround|xcenter|xfill|xinitial|xmargin|xmaximum|xminimum|xoffset|xofsset|xpadding|xpos|xsize|xzoom|yadjustment|yalign|yanchor|yanchoraround|yaround|ycenter|yfill|yinitial|ymargin|ymaximum|yminimum|yoffset|ypadding|ypos|ysize|ysizexysize|yzoom|zoom|zorder)\b/,tag:/\b(?:bar|block|button|buttoscreenn|drag|draggroup|fixed|frame|grid|[hv]box|hotbar|hotspot|image|imagebutton|imagemap|input|key|label|menu|mm_menu_frame|mousearea|nvl|parallel|screen|self|side|tag|text|textbutton|timer|vbar|viewport|window)\b|\$/,keyword:/\b(?:None|add|adjustment|alignaround|allow|angle|animation|around|as|assert|behind|box_layout|break|build|cache|call|center|changed|child_size|choice|circles|class|clear|clicked|clipping|clockwise|config|contains|continue|corner1|corner2|counterclockwise|def|default|define|del|delay|disabled|disabled_text|dissolve|elif|else|event|except|exclude|exec|expression|fade|finally|for|from|function|global|gm_root|has|hide|id|if|import|in|init|is|jump|knot|lambda|left|less_rounded|mm_root|movie|music|null|on|onlayer|pass|pause|persistent|play|print|python|queue|raise|random|renpy|repeat|return|right|rounded_window|scene|scope|set|show|slow|slow_abortable|slow_done|sound|stop|store|style|style_group|substitute|suffix|theme|transform|transform_anchor|transpose|try|ui|unhovered|updater|use|voice|while|widget|widget_hover|widget_selected|widget_text|yield)\b/,boolean:/\b(?:[Ff]alse|[Tt]rue)\b/,number:/(?:\b(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*(?:\.\d*)?)|\B\.\d+)(?:e[+-]?\d+)?j?/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:and|at|not|or|with)\b/,punctuation:/[{}[\];(),.:]/},e.languages.rpy=e.languages.renpy}return Lfe}var Ofe,CFe;function d_r(){if(CFe)return Ofe;CFe=1,Ofe=t,t.displayName="rest",t.aliases=[];function t(e){e.languages.rest={table:[{pattern:/(^[\t ]*)(?:\+[=-]+)+\+(?:\r?\n|\r)(?:\1[+|].+[+|](?:\r?\n|\r))+\1(?:\+[=-]+)+\+/m,lookbehind:!0,inside:{punctuation:/\||(?:\+[=-]+)+\+/}},{pattern:/(^[\t ]*)=+ [ =]*=(?:(?:\r?\n|\r)\1.+)+(?:\r?\n|\r)\1=+ [ =]*=(?=(?:\r?\n|\r){2}|\s*$)/m,lookbehind:!0,inside:{punctuation:/[=-]+/}}],"substitution-def":{pattern:/(^[\t ]*\.\. )\|(?:[^|\s](?:[^|]*[^|\s])?)\| [^:]+::/m,lookbehind:!0,inside:{substitution:{pattern:/^\|(?:[^|\s]|[^|\s][^|]*[^|\s])\|/,alias:"attr-value",inside:{punctuation:/^\||\|$/}},directive:{pattern:/( )(?! )[^:]+::/,lookbehind:!0,alias:"function",inside:{punctuation:/::$/}}}},"link-target":[{pattern:/(^[\t ]*\.\. )\[[^\]]+\]/m,lookbehind:!0,alias:"string",inside:{punctuation:/^\[|\]$/}},{pattern:/(^[\t ]*\.\. )_(?:`[^`]+`|(?:[^:\\]|\\.)+):/m,lookbehind:!0,alias:"string",inside:{punctuation:/^_|:$/}}],directive:{pattern:/(^[\t ]*\.\. )[^:]+::/m,lookbehind:!0,alias:"function",inside:{punctuation:/::$/}},comment:{pattern:/(^[\t ]*\.\.)(?:(?: .+)?(?:(?:\r?\n|\r).+)+| .+)(?=(?:\r?\n|\r){2}|$)/m,lookbehind:!0},title:[{pattern:/^(([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2+)(?:\r?\n|\r).+(?:\r?\n|\r)\1$/m,inside:{punctuation:/^[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+|[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+$/,important:/.+/}},{pattern:/(^|(?:\r?\n|\r){2}).+(?:\r?\n|\r)([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2+(?=\r?\n|\r|$)/,lookbehind:!0,inside:{punctuation:/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+$/,important:/.+/}}],hr:{pattern:/((?:\r?\n|\r){2})([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2{3,}(?=(?:\r?\n|\r){2})/,lookbehind:!0,alias:"punctuation"},field:{pattern:/(^[\t ]*):[^:\r\n]+:(?= )/m,lookbehind:!0,alias:"attr-name"},"command-line-option":{pattern:/(^[\t ]*)(?:[+-][a-z\d]|(?:--|\/)[a-z\d-]+)(?:[ =](?:[a-z][\w-]*|<[^<>]+>))?(?:, (?:[+-][a-z\d]|(?:--|\/)[a-z\d-]+)(?:[ =](?:[a-z][\w-]*|<[^<>]+>))?)*(?=(?:\r?\n|\r)? {2,}\S)/im,lookbehind:!0,alias:"symbol"},"literal-block":{pattern:/::(?:\r?\n|\r){2}([ \t]+)(?![ \t]).+(?:(?:\r?\n|\r)\1.+)*/,inside:{"literal-block-punctuation":{pattern:/^::/,alias:"punctuation"}}},"quoted-literal-block":{pattern:/::(?:\r?\n|\r){2}([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]).*(?:(?:\r?\n|\r)\1.*)*/,inside:{"literal-block-punctuation":{pattern:/^(?:::|([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\1*)/m,alias:"punctuation"}}},"list-bullet":{pattern:/(^[\t ]*)(?:[*+\-•‣⁃]|\(?(?:\d+|[a-z]|[ivxdclm]+)\)|(?:\d+|[a-z]|[ivxdclm]+)\.)(?= )/im,lookbehind:!0,alias:"punctuation"},"doctest-block":{pattern:/(^[\t ]*)>>> .+(?:(?:\r?\n|\r).+)*/m,lookbehind:!0,inside:{punctuation:/^>>>/}},inline:[{pattern:/(^|[\s\-:\/'"<(\[{])(?::[^:]+:`.*?`|`.*?`:[^:]+:|(\*\*?|``?|\|)(?!\s)(?:(?!\2).)*\S\2(?=[\s\-.,:;!?\\\/'")\]}]|$))/m,lookbehind:!0,inside:{bold:{pattern:/(^\*\*).+(?=\*\*$)/,lookbehind:!0},italic:{pattern:/(^\*).+(?=\*$)/,lookbehind:!0},"inline-literal":{pattern:/(^``).+(?=``$)/,lookbehind:!0,alias:"symbol"},role:{pattern:/^:[^:]+:|:[^:]+:$/,alias:"function",inside:{punctuation:/^:|:$/}},"interpreted-text":{pattern:/(^`).+(?=`$)/,lookbehind:!0,alias:"attr-value"},substitution:{pattern:/(^\|).+(?=\|$)/,lookbehind:!0,alias:"attr-value"},punctuation:/\*\*?|``?|\|/}}],link:[{pattern:/\[[^\[\]]+\]_(?=[\s\-.,:;!?\\\/'")\]}]|$)/,alias:"string",inside:{punctuation:/^\[|\]_$/}},{pattern:/(?:\b[a-z\d]+(?:[_.:+][a-z\d]+)*_?_|`[^`]+`_?_|_`[^`]+`)(?=[\s\-.,:;!?\\\/'")\]}]|$)/i,alias:"string",inside:{punctuation:/^_?`|`$|`?_?_$/}}],punctuation:{pattern:/(^[\t ]*)(?:\|(?= |$)|(?:---?|—|\.\.|__)(?= )|\.\.$)/m,lookbehind:!0}}}return Ofe}var Nfe,MFe;function h_r(){if(MFe)return Nfe;MFe=1,Nfe=t,t.displayName="rip",t.aliases=[];function t(e){e.languages.rip={comment:{pattern:/#.*/,greedy:!0},char:{pattern:/\B`[^\s`'",.:;#\/\\()<>\[\]{}]\b/,greedy:!0},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},regex:{pattern:/(^|[^/])\/(?!\/)(?:\[[^\n\r\]]*\]|\\.|[^/\\\r\n\[])+\/(?=\s*(?:$|[\r\n,.;})]))/,lookbehind:!0,greedy:!0},keyword:/(?:=>|->)|\b(?:case|catch|class|else|exit|finally|if|raise|return|switch|try)\b/,builtin:/@|\bSystem\b/,boolean:/\b(?:false|true)\b/,date:/\b\d{4}-\d{2}-\d{2}\b/,time:/\b\d{2}:\d{2}:\d{2}\b/,datetime:/\b\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\b/,symbol:/:[^\d\s`'",.:;#\/\\()<>\[\]{}][^\s`'",.:;#\/\\()<>\[\]{}]*/,number:/[+-]?\b(?:\d+\.\d+|\d+)\b/,punctuation:/(?:\.{2,3})|[`,.:;=\/\\()<>\[\]{}]/,reference:/[^\d\s`'",.:;#\/\\()<>\[\]{}][^\s`'",.:;#\/\\()<>\[\]{}]*/}}return Nfe}var Ffe,RFe;function p_r(){if(RFe)return Ffe;RFe=1,Ffe=t,t.displayName="roboconf",t.aliases=[];function t(e){e.languages.roboconf={comment:/#.*/,keyword:{pattern:/(^|\s)(?:(?:external|import)\b|(?:facet|instance of)(?=[ \t]+[\w-]+[ \t]*\{))/,lookbehind:!0},component:{pattern:/[\w-]+(?=[ \t]*\{)/,alias:"variable"},property:/[\w.-]+(?=[ \t]*:)/,value:{pattern:/(=[ \t]*(?![ \t]))[^,;]+/,lookbehind:!0,alias:"attr-value"},optional:{pattern:/\(optional\)/,alias:"builtin"},wildcard:{pattern:/(\.)\*/,lookbehind:!0,alias:"operator"},punctuation:/[{},.;:=]/}}return Ffe}var zfe,kFe;function v_r(){if(kFe)return zfe;kFe=1,zfe=t,t.displayName="robotframework",t.aliases=[];function t(e){(function(r){var n={pattern:/(^[ \t]*| {2}|\t)#.*/m,lookbehind:!0,greedy:!0},i={pattern:/((?:^|[^\\])(?:\\{2})*)[$@&%]\{(?:[^{}\r\n]|\{[^{}\r\n]*\})*\}/,lookbehind:!0,inside:{punctuation:/^[$@&%]\{|\}$/}};function a(b,L){var B={};B["section-header"]={pattern:/^ ?\*{3}.+?\*{3}/,alias:"keyword"};for(var V in L)B[V]=L[V];return B.tag={pattern:/([\r\n](?: {2}|\t)[ \t]*)\[[-\w]+\]/,lookbehind:!0,inside:{punctuation:/\[|\]/}},B.variable=i,B.comment=n,{pattern:RegExp(/^ ?\*{3}[ \t]*<name>[ \t]*\*{3}(?:.|[\r\n](?!\*{3}))*/.source.replace(/<name>/g,function(){return b}),"im"),alias:"section",inside:B}}var o={pattern:/(\[Documentation\](?: {2}|\t)[ \t]*)(?![ \t]|#)(?:.|(?:\r\n?|\n)[ \t]*\.{3})+/,lookbehind:!0,alias:"string"},s={pattern:/([\r\n] ?)(?!#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0,alias:"function",inside:{variable:i}},d={pattern:/([\r\n](?: {2}|\t)[ \t]*)(?!\[|\.{3}|#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0,inside:{variable:i}};r.languages.robotframework={settings:a("Settings",{documentation:{pattern:/([\r\n] ?Documentation(?: {2}|\t)[ \t]*)(?![ \t]|#)(?:.|(?:\r\n?|\n)[ \t]*\.{3})+/,lookbehind:!0,alias:"string"},property:{pattern:/([\r\n] ?)(?!\.{3}|#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0}}),variables:a("Variables"),"test-cases":a("Test Cases",{"test-name":s,documentation:o,property:d}),keywords:a("Keywords",{"keyword-name":s,documentation:o,property:d}),tasks:a("Tasks",{"task-name":s,documentation:o,property:d}),comment:n},r.languages.robot=r.languages.robotframework})(e)}return zfe}var Bfe,IFe;function m_r(){if(IFe)return Bfe;IFe=1,Bfe=t,t.displayName="rust",t.aliases=[];function t(e){(function(r){for(var n=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,i=0;i<2;i++)n=n.replace(/<self>/g,function(){return n});n=n.replace(/<self>/g,function(){return/[^\s\S]/.source}),r.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+n),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},r.languages.rust["closure-params"].inside.rest=r.languages.rust,r.languages.rust.attribute.inside.string=r.languages.rust.string})(e)}return Bfe}var Ufe,PFe;function g_r(){if(PFe)return Ufe;PFe=1,Ufe=t,t.displayName="sas",t.aliases=[];function t(e){(function(r){var n=/(?:"(?:""|[^"])*"(?!")|'(?:''|[^'])*'(?!'))/.source,i=/\b(?:\d[\da-f]*x|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,a={pattern:RegExp(n+"[bx]"),alias:"number"},o={pattern:/&[a-z_]\w*/i},s={pattern:/((?:^|\s|=|\())%(?:ABORT|BY|CMS|COPY|DISPLAY|DO|ELSE|END|EVAL|GLOBAL|GO|GOTO|IF|INC|INCLUDE|INDEX|INPUT|KTRIM|LENGTH|LET|LIST|LOCAL|PUT|QKTRIM|QSCAN|QSUBSTR|QSYSFUNC|QUPCASE|RETURN|RUN|SCAN|SUBSTR|SUPERQ|SYMDEL|SYMEXIST|SYMGLOBL|SYMLOCAL|SYSCALL|SYSEVALF|SYSEXEC|SYSFUNC|SYSGET|SYSRPUT|THEN|TO|TSO|UNQUOTE|UNTIL|UPCASE|WHILE|WINDOW)\b/i,lookbehind:!0,alias:"keyword"},d={pattern:/(^|\s)(?:proc\s+\w+|data(?!=)|quit|run)\b/i,alias:"keyword",lookbehind:!0},b=[/\/\*[\s\S]*?\*\//,{pattern:/(^[ \t]*|;\s*)\*[^;]*;/m,lookbehind:!0}],L={pattern:RegExp(n),greedy:!0},B=/[$%@.(){}\[\];,\\]/,V={pattern:/%?\b\w+(?=\()/,alias:"keyword"},X={function:V,"arg-value":{pattern:/(=\s*)[A-Z\.]+/i,lookbehind:!0},operator:/=/,"macro-variable":o,arg:{pattern:/[A-Z]+/i,alias:"keyword"},number:i,"numeric-constant":a,punctuation:B,string:L},ie={pattern:/\b(?:format|put)\b=?[\w'$.]+/i,inside:{keyword:/^(?:format|put)(?==)/i,equals:/=/,format:{pattern:/(?:\w|\$\d)+\.\d?/,alias:"number"}}},de={pattern:/\b(?:format|put)\s+[\w']+(?:\s+[$.\w]+)+(?=;)/i,inside:{keyword:/^(?:format|put)/i,format:{pattern:/[\w$]+\.\d?/,alias:"number"}}},ae={pattern:/((?:^|\s)=?)(?:catname|checkpoint execute_always|dm|endsas|filename|footnote|%include|libname|%list|lock|missing|options|page|resetline|%run|sasfile|skip|sysecho|title\d?)\b/i,lookbehind:!0,alias:"keyword"},U={pattern:/(^|\s)(?:submit(?:\s+(?:load|norun|parseonly))?|endsubmit)\b/i,lookbehind:!0,alias:"keyword"},ve=/aStore|accessControl|aggregation|audio|autotune|bayesianNetClassifier|bioMedImage|boolRule|builtins|cardinality|cdm|clustering|conditionalRandomFields|configuration|copula|countreg|dataDiscovery|dataPreprocess|dataSciencePilot|dataStep|decisionTree|deduplication|deepLearn|deepNeural|deepRnn|ds2|ecm|entityRes|espCluster|explainModel|factmac|fastKnn|fcmpact|fedSql|freqTab|gVarCluster|gam|gleam|graphSemiSupLearn|hiddenMarkovModel|hyperGroup|ica|image|iml|kernalPca|langModel|ldaTopic|loadStreams|mbc|mixed|mlTools|modelPublishing|network|neuralNet|nmf|nonParametricBayes|nonlinear|optNetwork|optimization|panel|pca|percentile|phreg|pls|qkb|qlim|quantreg|recommend|regression|reinforcementLearn|robustPca|ruleMining|sampling|sandwich|sccasl|search(?:Analytics)?|sentimentAnalysis|sequence|session(?:Prop)?|severity|simSystem|simple|smartData|sparkEmbeddedProcess|sparseML|spatialreg|spc|stabilityMonitoring|svDataDescription|svm|table|text(?:Filters|Frequency|Mining|Parse|Rule(?:Develop|Score)|Topic|Util)|timeData|transpose|tsInfo|tsReconcile|uniTimeSeries|varReduce/.source,Se={pattern:RegExp(/(^|\s)(?:action\s+)?(?:<act>)\.[a-z]+\b[^;]+/.source.replace(/<act>/g,function(){return ve}),"i"),lookbehind:!0,inside:{keyword:RegExp(/(?:<act>)\.[a-z]+\b/.source.replace(/<act>/g,function(){return ve}),"i"),action:{pattern:/(?:action)/i,alias:"keyword"},comment:b,function:V,"arg-value":X["arg-value"],operator:X.operator,argument:X.arg,number:i,"numeric-constant":a,punctuation:B,string:L}},Pe={pattern:/((?:^|\s)=?)(?:after|analysis|and|array|barchart|barwidth|begingraph|by|call|cas|cbarline|cfill|class(?:lev)?|close|column|computed?|contains|continue|data(?==)|define|delete|describe|document|do\s+over|do|dol|drop|dul|else|end(?:comp|source)?|entryTitle|eval(?:uate)?|exec(?:ute)?|exit|file(?:name)?|fill(?:attrs)?|flist|fnc|function(?:list)?|global|goto|group(?:by)?|headline|headskip|histogram|if|infile|keep|keylabel|keyword|label|layout|leave|legendlabel|length|libname|loadactionset|merge|midpoints|_?null_|name|noobs|nowd|ods|options|or|otherwise|out(?:put)?|over(?:lay)?|plot|print|put|raise|ranexp|rannor|rbreak|retain|return|select|session|sessref|set|source|statgraph|sum|summarize|table|temp|terminate|then\s+do|then|title\d?|to|var|when|where|xaxisopts|y2axisopts|yaxisopts)\b/i,lookbehind:!0};r.languages.sas={datalines:{pattern:/^([ \t]*)(?:cards|(?:data)?lines);[\s\S]+?^[ \t]*;/im,lookbehind:!0,alias:"string",inside:{keyword:{pattern:/^(?:cards|(?:data)?lines)/i},punctuation:/;/}},"proc-sql":{pattern:/(^proc\s+(?:fed)?sql(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|data|quit|run);|(?![\s\S]))/im,lookbehind:!0,inside:{sql:{pattern:RegExp(/^[ \t]*(?:select|alter\s+table|(?:create|describe|drop)\s+(?:index|table(?:\s+constraints)?|view)|create\s+unique\s+index|insert\s+into|update)(?:<str>|[^;"'])+;/.source.replace(/<str>/g,function(){return n}),"im"),alias:"language-sql",inside:r.languages.sql},"global-statements":ae,"sql-statements":{pattern:/(^|\s)(?:disconnect\s+from|begin|commit|exec(?:ute)?|reset|rollback|validate)\b/i,lookbehind:!0,alias:"keyword"},number:i,"numeric-constant":a,punctuation:B,string:L}},"proc-groovy":{pattern:/(^proc\s+groovy(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|data|quit|run);|(?![\s\S]))/im,lookbehind:!0,inside:{comment:b,groovy:{pattern:RegExp(/(^[ \t]*submit(?:\s+(?:load|norun|parseonly))?)(?:<str>|[^"'])+?(?=endsubmit;)/.source.replace(/<str>/g,function(){return n}),"im"),lookbehind:!0,alias:"language-groovy",inside:r.languages.groovy},keyword:Pe,"submit-statement":U,"global-statements":ae,number:i,"numeric-constant":a,punctuation:B,string:L}},"proc-lua":{pattern:/(^proc\s+lua(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|data|quit|run);|(?![\s\S]))/im,lookbehind:!0,inside:{comment:b,lua:{pattern:RegExp(/(^[ \t]*submit(?:\s+(?:load|norun|parseonly))?)(?:<str>|[^"'])+?(?=endsubmit;)/.source.replace(/<str>/g,function(){return n}),"im"),lookbehind:!0,alias:"language-lua",inside:r.languages.lua},keyword:Pe,"submit-statement":U,"global-statements":ae,number:i,"numeric-constant":a,punctuation:B,string:L}},"proc-cas":{pattern:/(^proc\s+cas(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|quit|data);|(?![\s\S]))/im,lookbehind:!0,inside:{comment:b,"statement-var":{pattern:/((?:^|\s)=?)saveresult\s[^;]+/im,lookbehind:!0,inside:{statement:{pattern:/^saveresult\s+\S+/i,inside:{keyword:/^(?:saveresult)/i}},rest:X}},"cas-actions":Se,statement:{pattern:/((?:^|\s)=?)(?:default|(?:un)?set|on|output|upload)[^;]+/im,lookbehind:!0,inside:X},step:d,keyword:Pe,function:V,format:ie,altformat:de,"global-statements":ae,number:i,"numeric-constant":a,punctuation:B,string:L}},"proc-args":{pattern:RegExp(/(^proc\s+\w+\s+)(?!\s)(?:[^;"']|<str>)+;/.source.replace(/<str>/g,function(){return n}),"im"),lookbehind:!0,inside:X},"macro-keyword":s,"macro-variable":o,"macro-string-functions":{pattern:/((?:^|\s|=))%(?:BQUOTE|NRBQUOTE|NRQUOTE|NRSTR|QUOTE|STR)\(.*?(?:[^%]\))/i,lookbehind:!0,inside:{function:{pattern:/%(?:BQUOTE|NRBQUOTE|NRQUOTE|NRSTR|QUOTE|STR)/i,alias:"keyword"},"macro-keyword":s,"macro-variable":o,"escaped-char":{pattern:/%['"()<>=¬^~;,#]/},punctuation:B}},"macro-declaration":{pattern:/^%macro[^;]+(?=;)/im,inside:{keyword:/%macro/i}},"macro-end":{pattern:/^%mend[^;]+(?=;)/im,inside:{keyword:/%mend/i}},macro:{pattern:/%_\w+(?=\()/,alias:"keyword"},input:{pattern:/\binput\s[-\w\s/*.$&]+;/i,inside:{input:{alias:"keyword",pattern:/^input/i},comment:b,number:i,"numeric-constant":a}},"options-args":{pattern:/(^options)[-'"|/\\<>*+=:()\w\s]*(?=;)/im,lookbehind:!0,inside:X},"cas-actions":Se,comment:b,function:V,format:ie,altformat:de,"numeric-constant":a,datetime:{pattern:RegExp(n+"(?:dt?|t)"),alias:"number"},string:L,step:d,keyword:Pe,"operator-keyword":{pattern:/\b(?:eq|ge|gt|in|le|lt|ne|not)\b/i,alias:"operator"},number:i,operator:/\*\*?|\|\|?|!!?|¦¦?|<[>=]?|>[<=]?|[-+\/=&]|[~¬^]=?/,punctuation:B}})(e)}return Ufe}var Hfe,DFe;function y_r(){if(DFe)return Hfe;DFe=1,Hfe=t,t.displayName="sass",t.aliases=[];function t(e){(function(r){r.languages.sass=r.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),r.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete r.languages.sass.atrule;var n=/\$[-\w]+|#\{\$[-\w]+\}/,i=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];r.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:n,operator:i}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:n,operator:i,important:r.languages.sass.important}}}),delete r.languages.sass.property,delete r.languages.sass.important,r.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})})(e)}return Hfe}var jfe,LFe;function b_r(){if(LFe)return jfe;LFe=1;var t=pbe();jfe=e,e.displayName="scala",e.aliases=[];function e(r){r.register(t),r.languages.scala=r.languages.extend("java",{"triple-quoted-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:/<-|=>|\b(?:abstract|case|catch|class|def|do|else|extends|final|finally|for|forSome|if|implicit|import|lazy|match|new|null|object|override|package|private|protected|return|sealed|self|super|this|throw|trait|try|type|val|var|while|with|yield)\b/,number:/\b0x(?:[\da-f]*\.)?[\da-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e\d+)?[dfl]?/i,builtin:/\b(?:Any|AnyRef|AnyVal|Boolean|Byte|Char|Double|Float|Int|Long|Nothing|Short|String|Unit)\b/,symbol:/'[^\d\s\\]\w*/}),r.languages.insertBefore("scala","triple-quoted-string",{"string-interpolation":{pattern:/\b[a-z]\w*(?:"""(?:[^$]|\$(?:[^{]|\{(?:[^{}]|\{[^{}]*\})*\}))*?"""|"(?:[^$"\r\n]|\$(?:[^{]|\{(?:[^{}]|\{[^{}]*\})*\}))*")/i,greedy:!0,inside:{id:{pattern:/^\w+/,greedy:!0,alias:"function"},escape:{pattern:/\\\$"|\$[$"]/,greedy:!0,alias:"symbol"},interpolation:{pattern:/\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,greedy:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:r.languages.scala}}},string:/[\s\S]+/}}}),delete r.languages.scala["class-name"],delete r.languages.scala.function}return jfe}var Vfe,OFe;function x_r(){if(OFe)return Vfe;OFe=1,Vfe=t,t.displayName="scss",t.aliases=[];function t(e){e.languages.scss=e.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),e.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),e.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),e.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),e.languages.scss.atrule.inside.rest=e.languages.scss}return Vfe}var qfe,NFe;function __r(){if(NFe)return qfe;NFe=1;var t=aKe();qfe=e,e.displayName="shellSession",e.aliases=[];function e(r){r.register(t),(function(n){var i=[/"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/.source,/'[^']*'/.source,/\$'(?:[^'\\]|\\[\s\S])*'/.source,/<<-?\s*(["']?)(\w+)\1\s[\s\S]*?[\r\n]\2/.source].join("|");n.languages["shell-session"]={command:{pattern:RegExp(/^/.source+"(?:"+(/[^\s@:$#%*!/\\]+@[^\r\n@:$#%*!/\\]+(?::[^\0-\x1F$#%*?"<>:;|]+)?/.source+"|"+/[/~.][^\0-\x1F$#%*?"<>@:;|]*/.source)+")?"+/[$#%](?=\s)/.source+/(?:[^\\\r\n \t'"<$]|[ \t](?:(?!#)|#.*$)|\\(?:[^\r]|\r\n?)|\$(?!')|<(?!<)|<<str>>)+/.source.replace(/<<str>>/g,function(){return i}),"m"),greedy:!0,inside:{info:{pattern:/^[^#$%]+/,alias:"punctuation",inside:{user:/^[^\s@:$#%*!/\\]+@[^\r\n@:$#%*!/\\]+/,punctuation:/:/,path:/[\s\S]+/}},bash:{pattern:/(^[$#%]\s*)\S[\s\S]*/,lookbehind:!0,alias:"language-bash",inside:n.languages.bash},"shell-symbol":{pattern:/^[$#%]/,alias:"important"}}},output:/.(?:.*(?:[\r\n]|.$))*/},n.languages["sh-session"]=n.languages.shellsession=n.languages["shell-session"]})(r)}return qfe}var Gfe,FFe;function w_r(){if(FFe)return Gfe;FFe=1,Gfe=t,t.displayName="smali",t.aliases=[];function t(e){e.languages.smali={comment:/#.*/,string:{pattern:/"(?:[^\r\n\\"]|\\.)*"|'(?:[^\r\n\\']|\\(?:.|u[\da-fA-F]{4}))'/,greedy:!0},"class-name":{pattern:/(^|[^L])L(?:(?:\w+|`[^`\r\n]*`)\/)*(?:[\w$]+|`[^`\r\n]*`)(?=\s*;)/,lookbehind:!0,inside:{"class-name":{pattern:/(^L|\/)(?:[\w$]+|`[^`\r\n]*`)$/,lookbehind:!0},namespace:{pattern:/^(L)(?:(?:\w+|`[^`\r\n]*`)\/)+/,lookbehind:!0,inside:{punctuation:/\//}},builtin:/^L/}},builtin:[{pattern:/([();\[])[BCDFIJSVZ]+/,lookbehind:!0},{pattern:/([\w$>]:)[BCDFIJSVZ]/,lookbehind:!0}],keyword:[{pattern:/(\.end\s+)[\w-]+/,lookbehind:!0},{pattern:/(^|[^\w.-])\.(?!\d)[\w-]+/,lookbehind:!0},{pattern:/(^|[^\w.-])(?:abstract|annotation|bridge|constructor|enum|final|interface|private|protected|public|runtime|static|synthetic|system|transient)(?![\w.-])/,lookbehind:!0}],function:{pattern:/(^|[^\w.-])(?:\w+|<[\w$-]+>)(?=\()/,lookbehind:!0},field:{pattern:/[\w$]+(?=:)/,alias:"variable"},register:{pattern:/(^|[^\w.-])[vp]\d(?![\w.-])/,lookbehind:!0,alias:"variable"},boolean:{pattern:/(^|[^\w.-])(?:false|true)(?![\w.-])/,lookbehind:!0},number:{pattern:/(^|[^/\w.-])-?(?:NAN|INFINITY|0x(?:[\dA-F]+(?:\.[\dA-F]*)?|\.[\dA-F]+)(?:p[+-]?[\dA-F]+)?|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?)[dflst]?(?![\w.-])/i,lookbehind:!0},label:{pattern:/(:)\w+/,lookbehind:!0,alias:"property"},operator:/->|\.\.|[\[=]/,punctuation:/[{}(),;:]/}}return Gfe}var $fe,zFe;function S_r(){if(zFe)return $fe;zFe=1,$fe=t,t.displayName="smalltalk",t.aliases=[];function t(e){e.languages.smalltalk={comment:{pattern:/"(?:""|[^"])*"/,greedy:!0},char:{pattern:/\$./,greedy:!0},string:{pattern:/'(?:''|[^'])*'/,greedy:!0},symbol:/#[\da-z]+|#(?:-|([+\/\\*~<>=@%|&?!])\1?)|#(?=\()/i,"block-arguments":{pattern:/(\[\s*):[^\[|]*\|/,lookbehind:!0,inside:{variable:/:[\da-z]+/i,punctuation:/\|/}},"temporary-variables":{pattern:/\|[^|]+\|/,inside:{variable:/[\da-z]+/i,punctuation:/\|/}},keyword:/\b(?:new|nil|self|super)\b/,boolean:/\b(?:false|true)\b/,number:[/\d+r-?[\dA-Z]+(?:\.[\dA-Z]+)?(?:e-?\d+)?/,/\b\d+(?:\.\d+)?(?:e-?\d+)?/],operator:/[<=]=?|:=|~[~=]|\/\/?|\\\\|>[>=]?|[!^+\-*&|,@]/,punctuation:/[.;:?\[\](){}]/}}return $fe}var Wfe,BFe;function T_r(){if(BFe)return Wfe;BFe=1;var t=iT();Wfe=e,e.displayName="smarty",e.aliases=[];function e(r){r.register(t),(function(n){n.languages.smarty={comment:{pattern:/^\{\*[\s\S]*?\*\}/,greedy:!0},"embedded-php":{pattern:/^\{php\}[\s\S]*?\{\/php\}/,greedy:!0,inside:{smarty:{pattern:/^\{php\}|\{\/php\}$/,inside:null},php:{pattern:/[\s\S]+/,alias:"language-php",inside:n.languages.php}}},string:[{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0,inside:{interpolation:{pattern:/\{[^{}]*\}|`[^`]*`/,inside:{"interpolation-punctuation":{pattern:/^[{`]|[`}]$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}},variable:/\$\w+/}},{pattern:/'(?:\\.|[^'\\\r\n])*'/,greedy:!0}],keyword:{pattern:/(^\{\/?)[a-z_]\w*\b(?!\()/i,lookbehind:!0,greedy:!0},delimiter:{pattern:/^\{\/?|\}$/,greedy:!0,alias:"punctuation"},number:/\b0x[\dA-Fa-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][-+]?\d+)?/,variable:[/\$(?!\d)\w+/,/#(?!\d)\w+#/,{pattern:/(\.|->|\w\s*=)(?!\d)\w+\b(?!\()/,lookbehind:!0},{pattern:/(\[)(?!\d)\w+(?=\])/,lookbehind:!0}],function:{pattern:/(\|\s*)@?[a-z_]\w*|\b[a-z_]\w*(?=\()/i,lookbehind:!0},"attr-name":/\b[a-z_]\w*(?=\s*=)/i,boolean:/\b(?:false|no|off|on|true|yes)\b/,punctuation:/[\[\](){}.,:`]|->/,operator:[/[+\-*\/%]|==?=?|[!<>]=?|&&|\|\|?/,/\bis\s+(?:not\s+)?(?:div|even|odd)(?:\s+by)?\b/,/\b(?:and|eq|gt?e|gt|lt?e|lt|mod|neq?|not|or)\b/]},n.languages.smarty["embedded-php"].inside.smarty.inside=n.languages.smarty,n.languages.smarty.string[0].inside.interpolation.inside.expression.inside=n.languages.smarty;var i=/"(?:\\.|[^"\\\r\n])*"|'(?:\\.|[^'\\\r\n])*'/,a=RegExp(/\{\*[\s\S]*?\*\}/.source+"|"+/\{php\}[\s\S]*?\{\/php\}/.source+"|"+/\{(?:[^{}"']|<str>|\{(?:[^{}"']|<str>|\{(?:[^{}"']|<str>)*\})*\})*\}/.source.replace(/<str>/g,function(){return i.source}),"g");n.hooks.add("before-tokenize",function(o){var s="{literal}",d="{/literal}",b=!1;n.languages["markup-templating"].buildPlaceholders(o,"smarty",a,function(L){return L===d&&(b=!1),b?!1:(L===s&&(b=!0),!0)})}),n.hooks.add("after-tokenize",function(o){n.languages["markup-templating"].tokenizePlaceholders(o,"smarty")})})(r)}return Wfe}var Yfe,UFe;function E_r(){if(UFe)return Yfe;UFe=1,Yfe=t,t.displayName="sml",t.aliases=["smlnj"];function t(e){(function(r){var n=/\b(?:abstype|and|andalso|as|case|datatype|do|else|end|eqtype|exception|fn|fun|functor|handle|if|in|include|infix|infixr|let|local|nonfix|of|op|open|orelse|raise|rec|sharing|sig|signature|struct|structure|then|type|val|where|while|with|withtype)\b/i;r.languages.sml={comment:/\(\*(?:[^*(]|\*(?!\))|\((?!\*)|\(\*(?:[^*(]|\*(?!\))|\((?!\*))*\*\))*\*\)/,string:{pattern:/#?"(?:[^"\\]|\\.)*"/,greedy:!0},"class-name":[{pattern:RegExp(/((?:^|[^:]):\s*)<TERMINAL>(?:\s*(?:(?:\*|->)\s*<TERMINAL>|,\s*<TERMINAL>(?:(?=<NOT-LAST>)|(?!<NOT-LAST>)\s+<LONG-ID>)))*/.source.replace(/<NOT-LAST>/g,function(){return/\s*(?:[*,]|->)/.source}).replace(/<TERMINAL>/g,function(){return/(?:'[\w']*|<LONG-ID>|\((?:[^()]|\([^()]*\))*\)|\{(?:[^{}]|\{[^{}]*\})*\})(?:\s+<LONG-ID>)*/.source}).replace(/<LONG-ID>/g,function(){return/(?!<KEYWORD>)[a-z\d_][\w'.]*/.source}).replace(/<KEYWORD>/g,function(){return n.source}),"i"),lookbehind:!0,greedy:!0,inside:null},{pattern:/((?:^|[^\w'])(?:datatype|exception|functor|signature|structure|type)\s+)[a-z_][\w'.]*/i,lookbehind:!0}],function:{pattern:/((?:^|[^\w'])fun\s+)[a-z_][\w'.]*/i,lookbehind:!0},keyword:n,variable:{pattern:/(^|[^\w'])'[\w']*/,lookbehind:!0},number:/~?\b(?:\d+(?:\.\d+)?(?:e~?\d+)?|0x[\da-f]+)\b/i,word:{pattern:/\b0w(?:\d+|x[\da-f]+)\b/i,alias:"constant"},boolean:/\b(?:false|true)\b/i,operator:/\.\.\.|:[>=:]|=>?|->|[<>]=?|[!+\-*/^#|@~]/,punctuation:/[(){}\[\].:,;]/},r.languages.sml["class-name"][0].inside=r.languages.sml,r.languages.smlnj=r.languages.sml})(e)}return Yfe}var Xfe,HFe;function A_r(){if(HFe)return Xfe;HFe=1,Xfe=t,t.displayName="solidity",t.aliases=["sol"];function t(e){e.languages.solidity=e.languages.extend("clike",{"class-name":{pattern:/(\b(?:contract|enum|interface|library|new|struct|using)\s+)(?!\d)[\w$]+/,lookbehind:!0},keyword:/\b(?:_|anonymous|as|assembly|assert|break|calldata|case|constant|constructor|continue|contract|default|delete|do|else|emit|enum|event|external|for|from|function|if|import|indexed|inherited|interface|internal|is|let|library|mapping|memory|modifier|new|payable|pragma|private|public|pure|require|returns?|revert|selfdestruct|solidity|storage|struct|suicide|switch|this|throw|using|var|view|while)\b/,operator:/=>|->|:=|=:|\*\*|\+\+|--|\|\||&&|<<=?|>>=?|[-+*/%^&|<>!=]=?|[~?]/}),e.languages.insertBefore("solidity","keyword",{builtin:/\b(?:address|bool|byte|u?int(?:8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?|string|bytes(?:[1-9]|[12]\d|3[0-2])?)\b/}),e.languages.insertBefore("solidity","number",{version:{pattern:/([<>]=?|\^)\d+\.\d+\.\d+\b/,lookbehind:!0,alias:"number"}}),e.languages.sol=e.languages.solidity}return Xfe}var Zfe,jFe;function C_r(){if(jFe)return Zfe;jFe=1,Zfe=t,t.displayName="solutionFile",t.aliases=[];function t(e){(function(r){var n={pattern:/\{[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}\}/i,alias:"constant",inside:{punctuation:/[{}]/}};r.languages["solution-file"]={comment:{pattern:/#.*/,greedy:!0},string:{pattern:/"[^"\r\n]*"|'[^'\r\n]*'/,greedy:!0,inside:{guid:n}},object:{pattern:/^([ \t]*)(?:([A-Z]\w*)\b(?=.*(?:\r\n?|\n)(?:\1[ \t].*(?:\r\n?|\n))*\1End\2(?=[ \t]*$))|End[A-Z]\w*(?=[ \t]*$))/m,lookbehind:!0,greedy:!0,alias:"keyword"},property:{pattern:/^([ \t]*)(?!\s)[^\r\n"#=()]*[^\s"#=()](?=\s*=)/m,lookbehind:!0,inside:{guid:n}},guid:n,number:/\b\d+(?:\.\d+)*\b/,boolean:/\b(?:FALSE|TRUE)\b/,operator:/=/,punctuation:/[(),]/},r.languages.sln=r.languages["solution-file"]})(e)}return Zfe}var Kfe,VFe;function M_r(){if(VFe)return Kfe;VFe=1;var t=iT();Kfe=e,e.displayName="soy",e.aliases=[];function e(r){r.register(t),(function(n){var i=/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,a=/\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b|\b0x[\dA-F]+\b/;n.languages.soy={comment:[/\/\*[\s\S]*?\*\//,{pattern:/(\s)\/\/.*/,lookbehind:!0,greedy:!0}],"command-arg":{pattern:/(\{+\/?\s*(?:alias|call|delcall|delpackage|deltemplate|namespace|template)\s+)\.?[\w.]+/,lookbehind:!0,alias:"string",inside:{punctuation:/\./}},parameter:{pattern:/(\{+\/?\s*@?param\??\s+)\.?[\w.]+/,lookbehind:!0,alias:"variable"},keyword:[{pattern:/(\{+\/?[^\S\r\n]*)(?:\\[nrt]|alias|call|case|css|default|delcall|delpackage|deltemplate|else(?:if)?|fallbackmsg|for(?:each)?|if(?:empty)?|lb|let|literal|msg|namespace|nil|@?param\??|rb|sp|switch|template|xid)/,lookbehind:!0},/\b(?:any|as|attributes|bool|css|float|html|in|int|js|list|map|null|number|string|uri)\b/],delimiter:{pattern:/^\{+\/?|\/?\}+$/,alias:"punctuation"},property:/\w+(?==)/,variable:{pattern:/\$[^\W\d]\w*(?:\??(?:\.\w+|\[[^\]]+\]))*/,inside:{string:{pattern:i,greedy:!0},number:a,punctuation:/[\[\].?]/}},string:{pattern:i,greedy:!0},function:[/\w+(?=\()/,{pattern:/(\|[^\S\r\n]*)\w+/,lookbehind:!0}],boolean:/\b(?:false|true)\b/,number:a,operator:/\?:?|<=?|>=?|==?|!=|[+*/%-]|\b(?:and|not|or)\b/,punctuation:/[{}()\[\]|.,:]/},n.hooks.add("before-tokenize",function(o){var s=/\{\{.+?\}\}|\{.+?\}|\s\/\/.*|\/\*[\s\S]*?\*\//g,d="{literal}",b="{/literal}",L=!1;n.languages["markup-templating"].buildPlaceholders(o,"soy",s,function(B){return B===b&&(L=!1),L?!1:(B===d&&(L=!0),!0)})}),n.hooks.add("after-tokenize",function(o){n.languages["markup-templating"].tokenizePlaceholders(o,"soy")})})(r)}return Kfe}var Jfe,qFe;function uKe(){if(qFe)return Jfe;qFe=1,Jfe=t,t.displayName="turtle",t.aliases=[];function t(e){e.languages.turtle={comment:{pattern:/#.*/,greedy:!0},"multiline-string":{pattern:/"""(?:(?:""?)?(?:[^"\\]|\\.))*"""|'''(?:(?:''?)?(?:[^'\\]|\\.))*'''/,greedy:!0,alias:"string",inside:{comment:/#.*/}},string:{pattern:/"(?:[^\\"\r\n]|\\.)*"|'(?:[^\\'\r\n]|\\.)*'/,greedy:!0},url:{pattern:/<(?:[^\x00-\x20<>"{}|^`\\]|\\(?:u[\da-fA-F]{4}|U[\da-fA-F]{8}))*>/,greedy:!0,inside:{punctuation:/[<>]/}},function:{pattern:/(?:(?![-.\d\xB7])[-.\w\xB7\xC0-\uFFFD]+)?:(?:(?![-.])(?:[-.:\w\xC0-\uFFFD]|%[\da-f]{2}|\\.)+)?/i,inside:{"local-name":{pattern:/([^:]*:)[\s\S]+/,lookbehind:!0},prefix:{pattern:/[\s\S]+/,inside:{punctuation:/:/}}}},number:/[+-]?\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i,punctuation:/[{}.,;()[\]]|\^\^/,boolean:/\b(?:false|true)\b/,keyword:[/(?:\ba|@prefix|@base)\b|=/,/\b(?:base|graph|prefix)\b/i],tag:{pattern:/@[a-z]+(?:-[a-z\d]+)*/i,inside:{punctuation:/@/}}},e.languages.trig=e.languages.turtle}return Jfe}var Qfe,GFe;function R_r(){if(GFe)return Qfe;GFe=1;var t=uKe();Qfe=e,e.displayName="sparql",e.aliases=["rq"];function e(r){r.register(t),r.languages.sparql=r.languages.extend("turtle",{boolean:/\b(?:false|true)\b/i,variable:{pattern:/[?$]\w+/,greedy:!0}}),r.languages.insertBefore("sparql","punctuation",{keyword:[/\b(?:A|ADD|ALL|AS|ASC|ASK|BNODE|BY|CLEAR|CONSTRUCT|COPY|CREATE|DATA|DEFAULT|DELETE|DESC|DESCRIBE|DISTINCT|DROP|EXISTS|FILTER|FROM|GROUP|HAVING|INSERT|INTO|LIMIT|LOAD|MINUS|MOVE|NAMED|NOT|NOW|OFFSET|OPTIONAL|ORDER|RAND|REDUCED|SELECT|SEPARATOR|SERVICE|SILENT|STRUUID|UNION|USING|UUID|VALUES|WHERE)\b/i,/\b(?:ABS|AVG|BIND|BOUND|CEIL|COALESCE|CONCAT|CONTAINS|COUNT|DATATYPE|DAY|ENCODE_FOR_URI|FLOOR|GROUP_CONCAT|HOURS|IF|IRI|isBLANK|isIRI|isLITERAL|isNUMERIC|isURI|LANG|LANGMATCHES|LCASE|MAX|MD5|MIN|MINUTES|MONTH|REGEX|REPLACE|ROUND|sameTerm|SAMPLE|SECONDS|SHA1|SHA256|SHA384|SHA512|STR|STRAFTER|STRBEFORE|STRDT|STRENDS|STRLANG|STRLEN|STRSTARTS|SUBSTR|SUM|TIMEZONE|TZ|UCASE|URI|YEAR)\b(?=\s*\()/i,/\b(?:BASE|GRAPH|PREFIX)\b/i]}),r.languages.rq=r.languages.sparql}return Qfe}var ede,$Fe;function k_r(){if($Fe)return ede;$Fe=1,ede=t,t.displayName="splunkSpl",t.aliases=[];function t(e){e.languages["splunk-spl"]={comment:/`comment\("(?:\\.|[^\\"])*"\)`/,string:{pattern:/"(?:\\.|[^\\"])*"/,greedy:!0},keyword:/\b(?:abstract|accum|addcoltotals|addinfo|addtotals|analyzefields|anomalies|anomalousvalue|anomalydetection|append|appendcols|appendcsv|appendlookup|appendpipe|arules|associate|audit|autoregress|bin|bucket|bucketdir|chart|cluster|cofilter|collect|concurrency|contingency|convert|correlate|datamodel|dbinspect|dedup|delete|delta|diff|erex|eval|eventcount|eventstats|extract|fieldformat|fields|fieldsummary|filldown|fillnull|findtypes|folderize|foreach|format|from|gauge|gentimes|geom|geomfilter|geostats|head|highlight|history|iconify|input|inputcsv|inputlookup|iplocation|join|kmeans|kv|kvform|loadjob|localize|localop|lookup|makecontinuous|makemv|makeresults|map|mcollect|metadata|metasearch|meventcollect|mstats|multikv|multisearch|mvcombine|mvexpand|nomv|outlier|outputcsv|outputlookup|outputtext|overlap|pivot|predict|rangemap|rare|regex|relevancy|reltime|rename|replace|rest|return|reverse|rex|rtorder|run|savedsearch|script|scrub|search|searchtxn|selfjoin|sendemail|set|setfields|sichart|sirare|sistats|sitimechart|sitop|sort|spath|stats|strcat|streamstats|table|tags|tail|timechart|timewrap|top|transaction|transpose|trendline|tscollect|tstats|typeahead|typelearner|typer|union|uniq|untable|where|x11|xmlkv|xmlunescape|xpath|xyseries)\b/i,"operator-word":{pattern:/\b(?:and|as|by|not|or|xor)\b/i,alias:"operator"},function:/\b\w+(?=\s*\()/,property:/\b\w+(?=\s*=(?!=))/,date:{pattern:/\b\d{1,2}\/\d{1,2}\/\d{1,4}(?:(?::\d{1,2}){3})?\b/,alias:"number"},number:/\b\d+(?:\.\d+)?\b/,boolean:/\b(?:f|false|t|true)\b/i,operator:/[<>=]=?|[-+*/%|]/,punctuation:/[()[\],]/}}return ede}var tde,WFe;function I_r(){if(WFe)return tde;WFe=1,tde=t,t.displayName="sqf",t.aliases=[];function t(e){e.languages.sqf=e.languages.extend("clike",{string:{pattern:/"(?:(?:"")?[^"])*"(?!")|'(?:[^'])*'/,greedy:!0},keyword:/\b(?:breakOut|breakTo|call|case|catch|default|do|echo|else|execFSM|execVM|exitWith|for|forEach|forEachMember|forEachMemberAgent|forEachMemberTeam|from|goto|if|nil|preprocessFile|preprocessFileLineNumbers|private|scopeName|spawn|step|switch|then|throw|to|try|while|with)\b/i,boolean:/\b(?:false|true)\b/i,function:/\b(?:abs|accTime|acos|action|actionIDs|actionKeys|actionKeysImages|actionKeysNames|actionKeysNamesArray|actionName|actionParams|activateAddons|activatedAddons|activateKey|add3DENConnection|add3DENEventHandler|add3DENLayer|addAction|addBackpack|addBackpackCargo|addBackpackCargoGlobal|addBackpackGlobal|addCamShake|addCuratorAddons|addCuratorCameraArea|addCuratorEditableObjects|addCuratorEditingArea|addCuratorPoints|addEditorObject|addEventHandler|addForce|addForceGeneratorRTD|addGoggles|addGroupIcon|addHandgunItem|addHeadgear|addItem|addItemCargo|addItemCargoGlobal|addItemPool|addItemToBackpack|addItemToUniform|addItemToVest|addLiveStats|addMagazine|addMagazineAmmoCargo|addMagazineCargo|addMagazineCargoGlobal|addMagazineGlobal|addMagazinePool|addMagazines|addMagazineTurret|addMenu|addMenuItem|addMissionEventHandler|addMPEventHandler|addMusicEventHandler|addOwnedMine|addPlayerScores|addPrimaryWeaponItem|addPublicVariableEventHandler|addRating|addResources|addScore|addScoreSide|addSecondaryWeaponItem|addSwitchableUnit|addTeamMember|addToRemainsCollector|addTorque|addUniform|addVehicle|addVest|addWaypoint|addWeapon|addWeaponCargo|addWeaponCargoGlobal|addWeaponGlobal|addWeaponItem|addWeaponPool|addWeaponTurret|admin|agent|agents|AGLToASL|aimedAtTarget|aimPos|airDensityCurveRTD|airDensityRTD|airplaneThrottle|airportSide|AISFinishHeal|alive|all3DENEntities|allAirports|allControls|allCurators|allCutLayers|allDead|allDeadMen|allDisplays|allGroups|allMapMarkers|allMines|allMissionObjects|allow3DMode|allowCrewInImmobile|allowCuratorLogicIgnoreAreas|allowDamage|allowDammage|allowFileOperations|allowFleeing|allowGetIn|allowSprint|allPlayers|allSimpleObjects|allSites|allTurrets|allUnits|allUnitsUAV|allVariables|ammo|ammoOnPylon|animate|animateBay|animateDoor|animatePylon|animateSource|animationNames|animationPhase|animationSourcePhase|animationState|append|apply|armoryPoints|arrayIntersect|asin|ASLToAGL|ASLToATL|assert|assignAsCargo|assignAsCargoIndex|assignAsCommander|assignAsDriver|assignAsGunner|assignAsTurret|assignCurator|assignedCargo|assignedCommander|assignedDriver|assignedGunner|assignedItems|assignedTarget|assignedTeam|assignedVehicle|assignedVehicleRole|assignItem|assignTeam|assignToAirport|atan|atan2|atg|ATLToASL|attachedObject|attachedObjects|attachedTo|attachObject|attachTo|attackEnabled|backpack|backpackCargo|backpackContainer|backpackItems|backpackMagazines|backpackSpaceFor|behaviour|benchmark|binocular|blufor|boundingBox|boundingBoxReal|boundingCenter|briefingName|buildingExit|buildingPos|buldozer_EnableRoadDiag|buldozer_IsEnabledRoadDiag|buldozer_LoadNewRoads|buldozer_reloadOperMap|buttonAction|buttonSetAction|cadetMode|callExtension|camCommand|camCommit|camCommitPrepared|camCommitted|camConstuctionSetParams|camCreate|camDestroy|cameraEffect|cameraEffectEnableHUD|cameraInterest|cameraOn|cameraView|campaignConfigFile|camPreload|camPreloaded|camPrepareBank|camPrepareDir|camPrepareDive|camPrepareFocus|camPrepareFov|camPrepareFovRange|camPreparePos|camPrepareRelPos|camPrepareTarget|camSetBank|camSetDir|camSetDive|camSetFocus|camSetFov|camSetFovRange|camSetPos|camSetRelPos|camSetTarget|camTarget|camUseNVG|canAdd|canAddItemToBackpack|canAddItemToUniform|canAddItemToVest|cancelSimpleTaskDestination|canFire|canMove|canSlingLoad|canStand|canSuspend|canTriggerDynamicSimulation|canUnloadInCombat|canVehicleCargo|captive|captiveNum|cbChecked|cbSetChecked|ceil|channelEnabled|cheatsEnabled|checkAIFeature|checkVisibility|civilian|className|clear3DENAttribute|clear3DENInventory|clearAllItemsFromBackpack|clearBackpackCargo|clearBackpackCargoGlobal|clearForcesRTD|clearGroupIcons|clearItemCargo|clearItemCargoGlobal|clearItemPool|clearMagazineCargo|clearMagazineCargoGlobal|clearMagazinePool|clearOverlay|clearRadio|clearVehicleInit|clearWeaponCargo|clearWeaponCargoGlobal|clearWeaponPool|clientOwner|closeDialog|closeDisplay|closeOverlay|collapseObjectTree|collect3DENHistory|collectiveRTD|combatMode|commandArtilleryFire|commandChat|commander|commandFire|commandFollow|commandFSM|commandGetOut|commandingMenu|commandMove|commandRadio|commandStop|commandSuppressiveFire|commandTarget|commandWatch|comment|commitOverlay|compile|compileFinal|completedFSM|composeText|configClasses|configFile|configHierarchy|configName|configNull|configProperties|configSourceAddonList|configSourceMod|configSourceModList|confirmSensorTarget|connectTerminalToUAV|controlNull|controlsGroupCtrl|copyFromClipboard|copyToClipboard|copyWaypoints|cos|count|countEnemy|countFriendly|countSide|countType|countUnknown|create3DENComposition|create3DENEntity|createAgent|createCenter|createDialog|createDiaryLink|createDiaryRecord|createDiarySubject|createDisplay|createGearDialog|createGroup|createGuardedPoint|createLocation|createMarker|createMarkerLocal|createMenu|createMine|createMissionDisplay|createMPCampaignDisplay|createSimpleObject|createSimpleTask|createSite|createSoundSource|createTask|createTeam|createTrigger|createUnit|createVehicle|createVehicleCrew|createVehicleLocal|crew|ctAddHeader|ctAddRow|ctClear|ctCurSel|ctData|ctFindHeaderRows|ctFindRowHeader|ctHeaderControls|ctHeaderCount|ctRemoveHeaders|ctRemoveRows|ctrlActivate|ctrlAddEventHandler|ctrlAngle|ctrlAutoScrollDelay|ctrlAutoScrollRewind|ctrlAutoScrollSpeed|ctrlChecked|ctrlClassName|ctrlCommit|ctrlCommitted|ctrlCreate|ctrlDelete|ctrlEnable|ctrlEnabled|ctrlFade|ctrlHTMLLoaded|ctrlIDC|ctrlIDD|ctrlMapAnimAdd|ctrlMapAnimClear|ctrlMapAnimCommit|ctrlMapAnimDone|ctrlMapCursor|ctrlMapMouseOver|ctrlMapScale|ctrlMapScreenToWorld|ctrlMapWorldToScreen|ctrlModel|ctrlModelDirAndUp|ctrlModelScale|ctrlParent|ctrlParentControlsGroup|ctrlPosition|ctrlRemoveAllEventHandlers|ctrlRemoveEventHandler|ctrlScale|ctrlSetActiveColor|ctrlSetAngle|ctrlSetAutoScrollDelay|ctrlSetAutoScrollRewind|ctrlSetAutoScrollSpeed|ctrlSetBackgroundColor|ctrlSetChecked|ctrlSetDisabledColor|ctrlSetEventHandler|ctrlSetFade|ctrlSetFocus|ctrlSetFont|ctrlSetFontH1|ctrlSetFontH1B|ctrlSetFontH2|ctrlSetFontH2B|ctrlSetFontH3|ctrlSetFontH3B|ctrlSetFontH4|ctrlSetFontH4B|ctrlSetFontH5|ctrlSetFontH5B|ctrlSetFontH6|ctrlSetFontH6B|ctrlSetFontHeight|ctrlSetFontHeightH1|ctrlSetFontHeightH2|ctrlSetFontHeightH3|ctrlSetFontHeightH4|ctrlSetFontHeightH5|ctrlSetFontHeightH6|ctrlSetFontHeightSecondary|ctrlSetFontP|ctrlSetFontPB|ctrlSetFontSecondary|ctrlSetForegroundColor|ctrlSetModel|ctrlSetModelDirAndUp|ctrlSetModelScale|ctrlSetPixelPrecision|ctrlSetPosition|ctrlSetScale|ctrlSetStructuredText|ctrlSetText|ctrlSetTextColor|ctrlSetTextColorSecondary|ctrlSetTextSecondary|ctrlSetTooltip|ctrlSetTooltipColorBox|ctrlSetTooltipColorShade|ctrlSetTooltipColorText|ctrlShow|ctrlShown|ctrlText|ctrlTextHeight|ctrlTextSecondary|ctrlTextWidth|ctrlType|ctrlVisible|ctRowControls|ctRowCount|ctSetCurSel|ctSetData|ctSetHeaderTemplate|ctSetRowTemplate|ctSetValue|ctValue|curatorAddons|curatorCamera|curatorCameraArea|curatorCameraAreaCeiling|curatorCoef|curatorEditableObjects|curatorEditingArea|curatorEditingAreaType|curatorMouseOver|curatorPoints|curatorRegisteredObjects|curatorSelected|curatorWaypointCost|current3DENOperation|currentChannel|currentCommand|currentMagazine|currentMagazineDetail|currentMagazineDetailTurret|currentMagazineTurret|currentMuzzle|currentNamespace|currentTask|currentTasks|currentThrowable|currentVisionMode|currentWaypoint|currentWeapon|currentWeaponMode|currentWeaponTurret|currentZeroing|cursorObject|cursorTarget|customChat|customRadio|cutFadeOut|cutObj|cutRsc|cutText|damage|date|dateToNumber|daytime|deActivateKey|debriefingText|debugFSM|debugLog|deg|delete3DENEntities|deleteAt|deleteCenter|deleteCollection|deleteEditorObject|deleteGroup|deleteGroupWhenEmpty|deleteIdentity|deleteLocation|deleteMarker|deleteMarkerLocal|deleteRange|deleteResources|deleteSite|deleteStatus|deleteTeam|deleteVehicle|deleteVehicleCrew|deleteWaypoint|detach|detectedMines|diag_activeMissionFSMs|diag_activeScripts|diag_activeSQFScripts|diag_activeSQSScripts|diag_captureFrame|diag_captureFrameToFile|diag_captureSlowFrame|diag_codePerformance|diag_drawMode|diag_dynamicSimulationEnd|diag_enable|diag_enabled|diag_fps|diag_fpsMin|diag_frameNo|diag_lightNewLoad|diag_list|diag_log|diag_logSlowFrame|diag_mergeConfigFile|diag_recordTurretLimits|diag_setLightNew|diag_tickTime|diag_toggle|dialog|diarySubjectExists|didJIP|didJIPOwner|difficulty|difficultyEnabled|difficultyEnabledRTD|difficultyOption|direction|directSay|disableAI|disableCollisionWith|disableConversation|disableDebriefingStats|disableMapIndicators|disableNVGEquipment|disableRemoteSensors|disableSerialization|disableTIEquipment|disableUAVConnectability|disableUserInput|displayAddEventHandler|displayCtrl|displayNull|displayParent|displayRemoveAllEventHandlers|displayRemoveEventHandler|displaySetEventHandler|dissolveTeam|distance|distance2D|distanceSqr|distributionRegion|do3DENAction|doArtilleryFire|doFire|doFollow|doFSM|doGetOut|doMove|doorPhase|doStop|doSuppressiveFire|doTarget|doWatch|drawArrow|drawEllipse|drawIcon|drawIcon3D|drawLine|drawLine3D|drawLink|drawLocation|drawPolygon|drawRectangle|drawTriangle|driver|drop|dynamicSimulationDistance|dynamicSimulationDistanceCoef|dynamicSimulationEnabled|dynamicSimulationSystemEnabled|east|edit3DENMissionAttributes|editObject|editorSetEventHandler|effectiveCommander|emptyPositions|enableAI|enableAIFeature|enableAimPrecision|enableAttack|enableAudioFeature|enableAutoStartUpRTD|enableAutoTrimRTD|enableCamShake|enableCaustics|enableChannel|enableCollisionWith|enableCopilot|enableDebriefingStats|enableDiagLegend|enableDynamicSimulation|enableDynamicSimulationSystem|enableEndDialog|enableEngineArtillery|enableEnvironment|enableFatigue|enableGunLights|enableInfoPanelComponent|enableIRLasers|enableMimics|enablePersonTurret|enableRadio|enableReload|enableRopeAttach|enableSatNormalOnDetail|enableSaving|enableSentences|enableSimulation|enableSimulationGlobal|enableStamina|enableStressDamage|enableTeamSwitch|enableTraffic|enableUAVConnectability|enableUAVWaypoints|enableVehicleCargo|enableVehicleSensor|enableWeaponDisassembly|endl|endLoadingScreen|endMission|engineOn|enginesIsOnRTD|enginesPowerRTD|enginesRpmRTD|enginesTorqueRTD|entities|environmentEnabled|estimatedEndServerTime|estimatedTimeLeft|evalObjectArgument|everyBackpack|everyContainer|exec|execEditorScript|exp|expectedDestination|exportJIPMessages|eyeDirection|eyePos|face|faction|fadeMusic|fadeRadio|fadeSound|fadeSpeech|failMission|fillWeaponsFromPool|find|findCover|findDisplay|findEditorObject|findEmptyPosition|findEmptyPositionReady|findIf|findNearestEnemy|finishMissionInit|finite|fire|fireAtTarget|firstBackpack|flag|flagAnimationPhase|flagOwner|flagSide|flagTexture|fleeing|floor|flyInHeight|flyInHeightASL|fog|fogForecast|fogParams|forceAddUniform|forceAtPositionRTD|forcedMap|forceEnd|forceFlagTexture|forceFollowRoad|forceGeneratorRTD|forceMap|forceRespawn|forceSpeed|forceWalk|forceWeaponFire|forceWeatherChange|forgetTarget|format|formation|formationDirection|formationLeader|formationMembers|formationPosition|formationTask|formatText|formLeader|freeLook|fromEditor|fuel|fullCrew|gearIDCAmmoCount|gearSlotAmmoCount|gearSlotData|get3DENActionState|get3DENAttribute|get3DENCamera|get3DENConnections|get3DENEntity|get3DENEntityID|get3DENGrid|get3DENIconsVisible|get3DENLayerEntities|get3DENLinesVisible|get3DENMissionAttribute|get3DENMouseOver|get3DENSelected|getAimingCoef|getAllEnvSoundControllers|getAllHitPointsDamage|getAllOwnedMines|getAllSoundControllers|getAmmoCargo|getAnimAimPrecision|getAnimSpeedCoef|getArray|getArtilleryAmmo|getArtilleryComputerSettings|getArtilleryETA|getAssignedCuratorLogic|getAssignedCuratorUnit|getBackpackCargo|getBleedingRemaining|getBurningValue|getCameraViewDirection|getCargoIndex|getCenterOfMass|getClientState|getClientStateNumber|getCompatiblePylonMagazines|getConnectedUAV|getContainerMaxLoad|getCursorObjectParams|getCustomAimCoef|getDammage|getDescription|getDir|getDirVisual|getDLCAssetsUsage|getDLCAssetsUsageByName|getDLCs|getDLCUsageTime|getEditorCamera|getEditorMode|getEditorObjectScope|getElevationOffset|getEngineTargetRpmRTD|getEnvSoundController|getFatigue|getFieldManualStartPage|getForcedFlagTexture|getFriend|getFSMVariable|getFuelCargo|getGroupIcon|getGroupIconParams|getGroupIcons|getHideFrom|getHit|getHitIndex|getHitPointDamage|getItemCargo|getMagazineCargo|getMarkerColor|getMarkerPos|getMarkerSize|getMarkerType|getMass|getMissionConfig|getMissionConfigValue|getMissionDLCs|getMissionLayerEntities|getMissionLayers|getModelInfo|getMousePosition|getMusicPlayedTime|getNumber|getObjectArgument|getObjectChildren|getObjectDLC|getObjectMaterials|getObjectProxy|getObjectTextures|getObjectType|getObjectViewDistance|getOxygenRemaining|getPersonUsedDLCs|getPilotCameraDirection|getPilotCameraPosition|getPilotCameraRotation|getPilotCameraTarget|getPlateNumber|getPlayerChannel|getPlayerScores|getPlayerUID|getPlayerUIDOld|getPos|getPosASL|getPosASLVisual|getPosASLW|getPosATL|getPosATLVisual|getPosVisual|getPosWorld|getPylonMagazines|getRelDir|getRelPos|getRemoteSensorsDisabled|getRepairCargo|getResolution|getRotorBrakeRTD|getShadowDistance|getShotParents|getSlingLoad|getSoundController|getSoundControllerResult|getSpeed|getStamina|getStatValue|getSuppression|getTerrainGrid|getTerrainHeightASL|getText|getTotalDLCUsageTime|getTrimOffsetRTD|getUnitLoadout|getUnitTrait|getUserMFDText|getUserMFDValue|getVariable|getVehicleCargo|getWeaponCargo|getWeaponSway|getWingsOrientationRTD|getWingsPositionRTD|getWPPos|glanceAt|globalChat|globalRadio|goggles|group|groupChat|groupFromNetId|groupIconSelectable|groupIconsVisible|groupId|groupOwner|groupRadio|groupSelectedUnits|groupSelectUnit|grpNull|gunner|gusts|halt|handgunItems|handgunMagazine|handgunWeapon|handsHit|hasInterface|hasPilotCamera|hasWeapon|hcAllGroups|hcGroupParams|hcLeader|hcRemoveAllGroups|hcRemoveGroup|hcSelected|hcSelectGroup|hcSetGroup|hcShowBar|hcShownBar|headgear|hideBody|hideObject|hideObjectGlobal|hideSelection|hint|hintC|hintCadet|hintSilent|hmd|hostMission|htmlLoad|HUDMovementLevels|humidity|image|importAllGroups|importance|in|inArea|inAreaArray|incapacitatedState|independent|inflame|inflamed|infoPanel|infoPanelComponentEnabled|infoPanelComponents|infoPanels|inGameUISetEventHandler|inheritsFrom|initAmbientLife|inPolygon|inputAction|inRangeOfArtillery|insertEditorObject|intersect|is3DEN|is3DENMultiplayer|isAbleToBreathe|isAgent|isAimPrecisionEnabled|isArray|isAutoHoverOn|isAutonomous|isAutoStartUpEnabledRTD|isAutotest|isAutoTrimOnRTD|isBleeding|isBurning|isClass|isCollisionLightOn|isCopilotEnabled|isDamageAllowed|isDedicated|isDLCAvailable|isEngineOn|isEqualTo|isEqualType|isEqualTypeAll|isEqualTypeAny|isEqualTypeArray|isEqualTypeParams|isFilePatchingEnabled|isFlashlightOn|isFlatEmpty|isForcedWalk|isFormationLeader|isGroupDeletedWhenEmpty|isHidden|isInRemainsCollector|isInstructorFigureEnabled|isIRLaserOn|isKeyActive|isKindOf|isLaserOn|isLightOn|isLocalized|isManualFire|isMarkedForCollection|isMultiplayer|isMultiplayerSolo|isNil|isNull|isNumber|isObjectHidden|isObjectRTD|isOnRoad|isPipEnabled|isPlayer|isRealTime|isRemoteExecuted|isRemoteExecutedJIP|isServer|isShowing3DIcons|isSimpleObject|isSprintAllowed|isStaminaEnabled|isSteamMission|isStreamFriendlyUIEnabled|isStressDamageEnabled|isText|isTouchingGround|isTurnedOut|isTutHintsEnabled|isUAVConnectable|isUAVConnected|isUIContext|isUniformAllowed|isVehicleCargo|isVehicleRadarOn|isVehicleSensorEnabled|isWalking|isWeaponDeployed|isWeaponRested|itemCargo|items|itemsWithMagazines|join|joinAs|joinAsSilent|joinSilent|joinString|kbAddDatabase|kbAddDatabaseTargets|kbAddTopic|kbHasTopic|kbReact|kbRemoveTopic|kbTell|kbWasSaid|keyImage|keyName|knowsAbout|land|landAt|landResult|language|laserTarget|lbAdd|lbClear|lbColor|lbColorRight|lbCurSel|lbData|lbDelete|lbIsSelected|lbPicture|lbPictureRight|lbSelection|lbSetColor|lbSetColorRight|lbSetCurSel|lbSetData|lbSetPicture|lbSetPictureColor|lbSetPictureColorDisabled|lbSetPictureColorSelected|lbSetPictureRight|lbSetPictureRightColor|lbSetPictureRightColorDisabled|lbSetPictureRightColorSelected|lbSetSelectColor|lbSetSelectColorRight|lbSetSelected|lbSetText|lbSetTextRight|lbSetTooltip|lbSetValue|lbSize|lbSort|lbSortByValue|lbText|lbTextRight|lbValue|leader|leaderboardDeInit|leaderboardGetRows|leaderboardInit|leaderboardRequestRowsFriends|leaderboardRequestRowsGlobal|leaderboardRequestRowsGlobalAroundUser|leaderboardsRequestUploadScore|leaderboardsRequestUploadScoreKeepBest|leaderboardState|leaveVehicle|libraryCredits|libraryDisclaimers|lifeState|lightAttachObject|lightDetachObject|lightIsOn|lightnings|limitSpeed|linearConversion|lineBreak|lineIntersects|lineIntersectsObjs|lineIntersectsSurfaces|lineIntersectsWith|linkItem|list|listObjects|listRemoteTargets|listVehicleSensors|ln|lnbAddArray|lnbAddColumn|lnbAddRow|lnbClear|lnbColor|lnbColorRight|lnbCurSelRow|lnbData|lnbDeleteColumn|lnbDeleteRow|lnbGetColumnsPosition|lnbPicture|lnbPictureRight|lnbSetColor|lnbSetColorRight|lnbSetColumnsPos|lnbSetCurSelRow|lnbSetData|lnbSetPicture|lnbSetPictureColor|lnbSetPictureColorRight|lnbSetPictureColorSelected|lnbSetPictureColorSelectedRight|lnbSetPictureRight|lnbSetText|lnbSetTextRight|lnbSetValue|lnbSize|lnbSort|lnbSortByValue|lnbText|lnbTextRight|lnbValue|load|loadAbs|loadBackpack|loadFile|loadGame|loadIdentity|loadMagazine|loadOverlay|loadStatus|loadUniform|loadVest|local|localize|locationNull|locationPosition|lock|lockCameraTo|lockCargo|lockDriver|locked|lockedCargo|lockedDriver|lockedTurret|lockIdentity|lockTurret|lockWP|log|logEntities|logNetwork|logNetworkTerminate|lookAt|lookAtPos|magazineCargo|magazines|magazinesAllTurrets|magazinesAmmo|magazinesAmmoCargo|magazinesAmmoFull|magazinesDetail|magazinesDetailBackpack|magazinesDetailUniform|magazinesDetailVest|magazinesTurret|magazineTurretAmmo|mapAnimAdd|mapAnimClear|mapAnimCommit|mapAnimDone|mapCenterOnCamera|mapGridPosition|markAsFinishedOnSteam|markerAlpha|markerBrush|markerColor|markerDir|markerPos|markerShape|markerSize|markerText|markerType|max|members|menuAction|menuAdd|menuChecked|menuClear|menuCollapse|menuData|menuDelete|menuEnable|menuEnabled|menuExpand|menuHover|menuPicture|menuSetAction|menuSetCheck|menuSetData|menuSetPicture|menuSetValue|menuShortcut|menuShortcutText|menuSize|menuSort|menuText|menuURL|menuValue|min|mineActive|mineDetectedBy|missionConfigFile|missionDifficulty|missionName|missionNamespace|missionStart|missionVersion|modelToWorld|modelToWorldVisual|modelToWorldVisualWorld|modelToWorldWorld|modParams|moonIntensity|moonPhase|morale|move|move3DENCamera|moveInAny|moveInCargo|moveInCommander|moveInDriver|moveInGunner|moveInTurret|moveObjectToEnd|moveOut|moveTime|moveTo|moveToCompleted|moveToFailed|musicVolume|name|nameSound|nearEntities|nearestBuilding|nearestLocation|nearestLocations|nearestLocationWithDubbing|nearestObject|nearestObjects|nearestTerrainObjects|nearObjects|nearObjectsReady|nearRoads|nearSupplies|nearTargets|needReload|netId|netObjNull|newOverlay|nextMenuItemIndex|nextWeatherChange|nMenuItems|numberOfEnginesRTD|numberToDate|objectCurators|objectFromNetId|objectParent|objNull|objStatus|onBriefingGear|onBriefingGroup|onBriefingNotes|onBriefingPlan|onBriefingTeamSwitch|onCommandModeChanged|onDoubleClick|onEachFrame|onGroupIconClick|onGroupIconOverEnter|onGroupIconOverLeave|onHCGroupSelectionChanged|onMapSingleClick|onPlayerConnected|onPlayerDisconnected|onPreloadFinished|onPreloadStarted|onShowNewObject|onTeamSwitch|openCuratorInterface|openDLCPage|openDSInterface|openMap|openSteamApp|openYoutubeVideo|opfor|orderGetIn|overcast|overcastForecast|owner|param|params|parseNumber|parseSimpleArray|parseText|parsingNamespace|particlesQuality|pi|pickWeaponPool|pitch|pixelGrid|pixelGridBase|pixelGridNoUIScale|pixelH|pixelW|playableSlotsNumber|playableUnits|playAction|playActionNow|player|playerRespawnTime|playerSide|playersNumber|playGesture|playMission|playMove|playMoveNow|playMusic|playScriptedMission|playSound|playSound3D|position|positionCameraToWorld|posScreenToWorld|posWorldToScreen|ppEffectAdjust|ppEffectCommit|ppEffectCommitted|ppEffectCreate|ppEffectDestroy|ppEffectEnable|ppEffectEnabled|ppEffectForceInNVG|precision|preloadCamera|preloadObject|preloadSound|preloadTitleObj|preloadTitleRsc|primaryWeapon|primaryWeaponItems|primaryWeaponMagazine|priority|processDiaryLink|processInitCommands|productVersion|profileName|profileNamespace|profileNameSteam|progressLoadingScreen|progressPosition|progressSetPosition|publicVariable|publicVariableClient|publicVariableServer|pushBack|pushBackUnique|putWeaponPool|queryItemsPool|queryMagazinePool|queryWeaponPool|rad|radioChannelAdd|radioChannelCreate|radioChannelRemove|radioChannelSetCallSign|radioChannelSetLabel|radioVolume|rain|rainbow|random|rank|rankId|rating|rectangular|registeredTasks|registerTask|reload|reloadEnabled|remoteControl|remoteExec|remoteExecCall|remoteExecutedOwner|remove3DENConnection|remove3DENEventHandler|remove3DENLayer|removeAction|removeAll3DENEventHandlers|removeAllActions|removeAllAssignedItems|removeAllContainers|removeAllCuratorAddons|removeAllCuratorCameraAreas|removeAllCuratorEditingAreas|removeAllEventHandlers|removeAllHandgunItems|removeAllItems|removeAllItemsWithMagazines|removeAllMissionEventHandlers|removeAllMPEventHandlers|removeAllMusicEventHandlers|removeAllOwnedMines|removeAllPrimaryWeaponItems|removeAllWeapons|removeBackpack|removeBackpackGlobal|removeCuratorAddons|removeCuratorCameraArea|removeCuratorEditableObjects|removeCuratorEditingArea|removeDrawIcon|removeDrawLinks|removeEventHandler|removeFromRemainsCollector|removeGoggles|removeGroupIcon|removeHandgunItem|removeHeadgear|removeItem|removeItemFromBackpack|removeItemFromUniform|removeItemFromVest|removeItems|removeMagazine|removeMagazineGlobal|removeMagazines|removeMagazinesTurret|removeMagazineTurret|removeMenuItem|removeMissionEventHandler|removeMPEventHandler|removeMusicEventHandler|removeOwnedMine|removePrimaryWeaponItem|removeSecondaryWeaponItem|removeSimpleTask|removeSwitchableUnit|removeTeamMember|removeUniform|removeVest|removeWeapon|removeWeaponAttachmentCargo|removeWeaponCargo|removeWeaponGlobal|removeWeaponTurret|reportRemoteTarget|requiredVersion|resetCamShake|resetSubgroupDirection|resistance|resize|resources|respawnVehicle|restartEditorCamera|reveal|revealMine|reverse|reversedMouseY|roadAt|roadsConnectedTo|roleDescription|ropeAttachedObjects|ropeAttachedTo|ropeAttachEnabled|ropeAttachTo|ropeCreate|ropeCut|ropeDestroy|ropeDetach|ropeEndPosition|ropeLength|ropes|ropeUnwind|ropeUnwound|rotorsForcesRTD|rotorsRpmRTD|round|runInitScript|safeZoneH|safeZoneW|safeZoneWAbs|safeZoneX|safeZoneXAbs|safeZoneY|save3DENInventory|saveGame|saveIdentity|saveJoysticks|saveOverlay|saveProfileNamespace|saveStatus|saveVar|savingEnabled|say|say2D|say3D|score|scoreSide|screenshot|screenToWorld|scriptDone|scriptName|scriptNull|scudState|secondaryWeapon|secondaryWeaponItems|secondaryWeaponMagazine|select|selectBestPlaces|selectDiarySubject|selectedEditorObjects|selectEditorObject|selectionNames|selectionPosition|selectLeader|selectMax|selectMin|selectNoPlayer|selectPlayer|selectRandom|selectRandomWeighted|selectWeapon|selectWeaponTurret|sendAUMessage|sendSimpleCommand|sendTask|sendTaskResult|sendUDPMessage|serverCommand|serverCommandAvailable|serverCommandExecutable|serverName|serverTime|set|set3DENAttribute|set3DENAttributes|set3DENGrid|set3DENIconsVisible|set3DENLayer|set3DENLinesVisible|set3DENLogicType|set3DENMissionAttribute|set3DENMissionAttributes|set3DENModelsVisible|set3DENObjectType|set3DENSelected|setAccTime|setActualCollectiveRTD|setAirplaneThrottle|setAirportSide|setAmmo|setAmmoCargo|setAmmoOnPylon|setAnimSpeedCoef|setAperture|setApertureNew|setArmoryPoints|setAttributes|setAutonomous|setBehaviour|setBleedingRemaining|setBrakesRTD|setCameraInterest|setCamShakeDefParams|setCamShakeParams|setCamUseTI|setCaptive|setCenterOfMass|setCollisionLight|setCombatMode|setCompassOscillation|setConvoySeparation|setCuratorCameraAreaCeiling|setCuratorCoef|setCuratorEditingAreaType|setCuratorWaypointCost|setCurrentChannel|setCurrentTask|setCurrentWaypoint|setCustomAimCoef|setCustomWeightRTD|setDamage|setDammage|setDate|setDebriefingText|setDefaultCamera|setDestination|setDetailMapBlendPars|setDir|setDirection|setDrawIcon|setDriveOnPath|setDropInterval|setDynamicSimulationDistance|setDynamicSimulationDistanceCoef|setEditorMode|setEditorObjectScope|setEffectCondition|setEngineRpmRTD|setFace|setFaceAnimation|setFatigue|setFeatureType|setFlagAnimationPhase|setFlagOwner|setFlagSide|setFlagTexture|setFog|setForceGeneratorRTD|setFormation|setFormationTask|setFormDir|setFriend|setFromEditor|setFSMVariable|setFuel|setFuelCargo|setGroupIcon|setGroupIconParams|setGroupIconsSelectable|setGroupIconsVisible|setGroupId|setGroupIdGlobal|setGroupOwner|setGusts|setHideBehind|setHit|setHitIndex|setHitPointDamage|setHorizonParallaxCoef|setHUDMovementLevels|setIdentity|setImportance|setInfoPanel|setLeader|setLightAmbient|setLightAttenuation|setLightBrightness|setLightColor|setLightDayLight|setLightFlareMaxDistance|setLightFlareSize|setLightIntensity|setLightnings|setLightUseFlare|setLocalWindParams|setMagazineTurretAmmo|setMarkerAlpha|setMarkerAlphaLocal|setMarkerBrush|setMarkerBrushLocal|setMarkerColor|setMarkerColorLocal|setMarkerDir|setMarkerDirLocal|setMarkerPos|setMarkerPosLocal|setMarkerShape|setMarkerShapeLocal|setMarkerSize|setMarkerSizeLocal|setMarkerText|setMarkerTextLocal|setMarkerType|setMarkerTypeLocal|setMass|setMimic|setMousePosition|setMusicEffect|setMusicEventHandler|setName|setNameSound|setObjectArguments|setObjectMaterial|setObjectMaterialGlobal|setObjectProxy|setObjectTexture|setObjectTextureGlobal|setObjectViewDistance|setOvercast|setOwner|setOxygenRemaining|setParticleCircle|setParticleClass|setParticleFire|setParticleParams|setParticleRandom|setPilotCameraDirection|setPilotCameraRotation|setPilotCameraTarget|setPilotLight|setPiPEffect|setPitch|setPlateNumber|setPlayable|setPlayerRespawnTime|setPos|setPosASL|setPosASL2|setPosASLW|setPosATL|setPosition|setPosWorld|setPylonLoadOut|setPylonsPriority|setRadioMsg|setRain|setRainbow|setRandomLip|setRank|setRectangular|setRepairCargo|setRotorBrakeRTD|setShadowDistance|setShotParents|setSide|setSimpleTaskAlwaysVisible|setSimpleTaskCustomData|setSimpleTaskDescription|setSimpleTaskDestination|setSimpleTaskTarget|setSimpleTaskType|setSimulWeatherLayers|setSize|setSkill|setSlingLoad|setSoundEffect|setSpeaker|setSpeech|setSpeedMode|setStamina|setStaminaScheme|setStatValue|setSuppression|setSystemOfUnits|setTargetAge|setTaskMarkerOffset|setTaskResult|setTaskState|setTerrainGrid|setText|setTimeMultiplier|setTitleEffect|setToneMapping|setToneMappingParams|setTrafficDensity|setTrafficDistance|setTrafficGap|setTrafficSpeed|setTriggerActivation|setTriggerArea|setTriggerStatements|setTriggerText|setTriggerTimeout|setTriggerType|setType|setUnconscious|setUnitAbility|setUnitLoadout|setUnitPos|setUnitPosWeak|setUnitRank|setUnitRecoilCoefficient|setUnitTrait|setUnloadInCombat|setUserActionText|setUserMFDText|setUserMFDValue|setVariable|setVectorDir|setVectorDirAndUp|setVectorUp|setVehicleAmmo|setVehicleAmmoDef|setVehicleArmor|setVehicleCargo|setVehicleId|setVehicleInit|setVehicleLock|setVehiclePosition|setVehicleRadar|setVehicleReceiveRemoteTargets|setVehicleReportOwnPosition|setVehicleReportRemoteTargets|setVehicleTIPars|setVehicleVarName|setVelocity|setVelocityModelSpace|setVelocityTransformation|setViewDistance|setVisibleIfTreeCollapsed|setWantedRpmRTD|setWaves|setWaypointBehaviour|setWaypointCombatMode|setWaypointCompletionRadius|setWaypointDescription|setWaypointForceBehaviour|setWaypointFormation|setWaypointHousePosition|setWaypointLoiterRadius|setWaypointLoiterType|setWaypointName|setWaypointPosition|setWaypointScript|setWaypointSpeed|setWaypointStatements|setWaypointTimeout|setWaypointType|setWaypointVisible|setWeaponReloadingTime|setWind|setWindDir|setWindForce|setWindStr|setWingForceScaleRTD|setWPPos|show3DIcons|showChat|showCinemaBorder|showCommandingMenu|showCompass|showCuratorCompass|showGPS|showHUD|showLegend|showMap|shownArtilleryComputer|shownChat|shownCompass|shownCuratorCompass|showNewEditorObject|shownGPS|shownHUD|shownMap|shownPad|shownRadio|shownScoretable|shownUAVFeed|shownWarrant|shownWatch|showPad|showRadio|showScoretable|showSubtitles|showUAVFeed|showWarrant|showWatch|showWaypoint|showWaypoints|side|sideAmbientLife|sideChat|sideEmpty|sideEnemy|sideFriendly|sideLogic|sideRadio|sideUnknown|simpleTasks|simulationEnabled|simulCloudDensity|simulCloudOcclusion|simulInClouds|simulWeatherSync|sin|size|sizeOf|skill|skillFinal|skipTime|sleep|sliderPosition|sliderRange|sliderSetPosition|sliderSetRange|sliderSetSpeed|sliderSpeed|slingLoadAssistantShown|soldierMagazines|someAmmo|sort|soundVolume|speaker|speed|speedMode|splitString|sqrt|squadParams|stance|startLoadingScreen|stop|stopEngineRTD|stopped|str|sunOrMoon|supportInfo|suppressFor|surfaceIsWater|surfaceNormal|surfaceType|swimInDepth|switchableUnits|switchAction|switchCamera|switchGesture|switchLight|switchMove|synchronizedObjects|synchronizedTriggers|synchronizedWaypoints|synchronizeObjectsAdd|synchronizeObjectsRemove|synchronizeTrigger|synchronizeWaypoint|systemChat|systemOfUnits|tan|targetKnowledge|targets|targetsAggregate|targetsQuery|taskAlwaysVisible|taskChildren|taskCompleted|taskCustomData|taskDescription|taskDestination|taskHint|taskMarkerOffset|taskNull|taskParent|taskResult|taskState|taskType|teamMember|teamMemberNull|teamName|teams|teamSwitch|teamSwitchEnabled|teamType|terminate|terrainIntersect|terrainIntersectASL|terrainIntersectAtASL|text|textLog|textLogFormat|tg|time|timeMultiplier|titleCut|titleFadeOut|titleObj|titleRsc|titleText|toArray|toFixed|toLower|toString|toUpper|triggerActivated|triggerActivation|triggerArea|triggerAttachedVehicle|triggerAttachObject|triggerAttachVehicle|triggerDynamicSimulation|triggerStatements|triggerText|triggerTimeout|triggerTimeoutCurrent|triggerType|turretLocal|turretOwner|turretUnit|tvAdd|tvClear|tvCollapse|tvCollapseAll|tvCount|tvCurSel|tvData|tvDelete|tvExpand|tvExpandAll|tvPicture|tvPictureRight|tvSetColor|tvSetCurSel|tvSetData|tvSetPicture|tvSetPictureColor|tvSetPictureColorDisabled|tvSetPictureColorSelected|tvSetPictureRight|tvSetPictureRightColor|tvSetPictureRightColorDisabled|tvSetPictureRightColorSelected|tvSetSelectColor|tvSetText|tvSetTooltip|tvSetValue|tvSort|tvSortByValue|tvText|tvTooltip|tvValue|type|typeName|typeOf|UAVControl|uiNamespace|uiSleep|unassignCurator|unassignItem|unassignTeam|unassignVehicle|underwater|uniform|uniformContainer|uniformItems|uniformMagazines|unitAddons|unitAimPosition|unitAimPositionVisual|unitBackpack|unitIsUAV|unitPos|unitReady|unitRecoilCoefficient|units|unitsBelowHeight|unlinkItem|unlockAchievement|unregisterTask|updateDrawIcon|updateMenuItem|updateObjectTree|useAIOperMapObstructionTest|useAISteeringComponent|useAudioTimeForMoves|userInputDisabled|vectorAdd|vectorCos|vectorCrossProduct|vectorDiff|vectorDir|vectorDirVisual|vectorDistance|vectorDistanceSqr|vectorDotProduct|vectorFromTo|vectorMagnitude|vectorMagnitudeSqr|vectorModelToWorld|vectorModelToWorldVisual|vectorMultiply|vectorNormalized|vectorUp|vectorUpVisual|vectorWorldToModel|vectorWorldToModelVisual|vehicle|vehicleCargoEnabled|vehicleChat|vehicleRadio|vehicleReceiveRemoteTargets|vehicleReportOwnPosition|vehicleReportRemoteTargets|vehicles|vehicleVarName|velocity|velocityModelSpace|verifySignature|vest|vestContainer|vestItems|vestMagazines|viewDistance|visibleCompass|visibleGPS|visibleMap|visiblePosition|visiblePositionASL|visibleScoretable|visibleWatch|waitUntil|waves|waypointAttachedObject|waypointAttachedVehicle|waypointAttachObject|waypointAttachVehicle|waypointBehaviour|waypointCombatMode|waypointCompletionRadius|waypointDescription|waypointForceBehaviour|waypointFormation|waypointHousePosition|waypointLoiterRadius|waypointLoiterType|waypointName|waypointPosition|waypoints|waypointScript|waypointsEnabledUAV|waypointShow|waypointSpeed|waypointStatements|waypointTimeout|waypointTimeoutCurrent|waypointType|waypointVisible|weaponAccessories|weaponAccessoriesCargo|weaponCargo|weaponDirection|weaponInertia|weaponLowered|weapons|weaponsItems|weaponsItemsCargo|weaponState|weaponsTurret|weightRTD|west|WFSideText|wind|windDir|windRTD|windStr|wingsForcesRTD|worldName|worldSize|worldToModel|worldToModelVisual|worldToScreen)\b/i,number:/(?:\$|\b0x)[\da-f]+\b|(?:\B\.\d+|\b\d+(?:\.\d+)?)(?:e[+-]?\d+)?\b/i,operator:/##|>>|&&|\|\||[!=<>]=?|[-+*/%#^]|\b(?:and|mod|not|or)\b/i,"magic-variable":{pattern:/\b(?:this|thisList|thisTrigger|_exception|_fnc_scriptName|_fnc_scriptNameParent|_forEachIndex|_this|_thisEventHandler|_thisFSM|_thisScript|_x)\b/i,alias:"keyword"},constant:/\bDIK(?:_[a-z\d]+)+\b/i}),e.languages.insertBefore("sqf","string",{macro:{pattern:/(^[ \t]*)#[a-z](?:[^\r\n\\]|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{directive:{pattern:/#[a-z]+\b/i,alias:"keyword"},comment:e.languages.sqf.comment}}}),delete e.languages.sqf["class-name"]}return tde}var rde,YFe;function P_r(){if(YFe)return rde;YFe=1,rde=t,t.displayName="squirrel",t.aliases=[];function t(e){e.languages.squirrel=e.languages.extend("clike",{comment:[e.languages.clike.comment[0],{pattern:/(^|[^\\:])(?:\/\/|#).*/,lookbehind:!0,greedy:!0}],string:{pattern:/(^|[^\\"'@])(?:@"(?:[^"]|"")*"(?!")|"(?:[^\\\r\n"]|\\.)*")/,lookbehind:!0,greedy:!0},"class-name":{pattern:/(\b(?:class|enum|extends|instanceof)\s+)\w+(?:\.\w+)*/,lookbehind:!0,inside:{punctuation:/\./}},keyword:/\b(?:__FILE__|__LINE__|base|break|case|catch|class|clone|const|constructor|continue|default|delete|else|enum|extends|for|foreach|function|if|in|instanceof|local|null|resume|return|static|switch|this|throw|try|typeof|while|yield)\b/,number:/\b(?:0x[0-9a-fA-F]+|\d+(?:\.(?:\d+|[eE][+-]?\d+))?)\b/,operator:/\+\+|--|<=>|<[-<]|>>>?|&&?|\|\|?|[-+*/%!=<>]=?|[~^]|::?/,punctuation:/[(){}\[\],;.]/}),e.languages.insertBefore("squirrel","string",{char:{pattern:/(^|[^\\"'])'(?:[^\\']|\\(?:[xuU][0-9a-fA-F]{0,8}|[\s\S]))'/,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("squirrel","operator",{"attribute-punctuation":{pattern:/<\/|\/>/,alias:"important"},lambda:{pattern:/@(?=\()/,alias:"operator"}})}return rde}var nde,XFe;function D_r(){if(XFe)return nde;XFe=1,nde=t,t.displayName="stan",t.aliases=[];function t(e){(function(r){var n=/\b(?:algebra_solver|algebra_solver_newton|integrate_1d|integrate_ode|integrate_ode_bdf|integrate_ode_rk45|map_rect|ode_(?:adams|bdf|ckrk|rk45)(?:_tol)?|ode_adjoint_tol_ctl|reduce_sum|reduce_sum_static)\b/;r.languages.stan={comment:/\/\/.*|\/\*[\s\S]*?\*\/|#(?!include).*/,string:{pattern:/"[\x20\x21\x23-\x5B\x5D-\x7E]*"/,greedy:!0},directive:{pattern:/^([ \t]*)#include\b.*/m,lookbehind:!0,alias:"property"},"function-arg":{pattern:RegExp("("+n.source+/\s*\(\s*/.source+")"+/[a-zA-Z]\w*/.source),lookbehind:!0,alias:"function"},constraint:{pattern:/(\b(?:int|matrix|real|row_vector|vector)\s*)<[^<>]*>/,lookbehind:!0,inside:{expression:{pattern:/(=\s*)\S(?:\S|\s+(?!\s))*?(?=\s*(?:>$|,\s*\w+\s*=))/,lookbehind:!0,inside:null},property:/\b[a-z]\w*(?=\s*=)/i,operator:/=/,punctuation:/^<|>$|,/}},keyword:[{pattern:/\bdata(?=\s*\{)|\b(?:functions|generated|model|parameters|quantities|transformed)\b/,alias:"program-block"},/\b(?:array|break|cholesky_factor_corr|cholesky_factor_cov|complex|continue|corr_matrix|cov_matrix|data|else|for|if|in|increment_log_prob|int|matrix|ordered|positive_ordered|print|real|reject|return|row_vector|simplex|target|unit_vector|vector|void|while)\b/,n],function:/\b[a-z]\w*(?=\s*\()/i,number:/(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:E[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,boolean:/\b(?:false|true)\b/,operator:/<-|\.[*/]=?|\|\|?|&&|[!=<>+\-*/]=?|['^%~?:]/,punctuation:/[()\[\]{},;]/},r.languages.stan.constraint.inside.expression.inside=r.languages.stan})(e)}return nde}var ide,ZFe;function L_r(){if(ZFe)return ide;ZFe=1,ide=t,t.displayName="stylus",t.aliases=[];function t(e){(function(r){var n={pattern:/(\b\d+)(?:%|[a-z]+)/,lookbehind:!0},i={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0},a={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/\burl\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:else|for|if|return|unless)(?=\s|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:n,number:i,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:n,boolean:/\b(?:false|true)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:i,punctuation:/[{}()\[\];:,]/};a.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^\{|\}$/,alias:"punctuation"},rest:a}},a.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:a}},r.languages.stylus={"atrule-declaration":{pattern:/(^[ \t]*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:a}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:\{[^{}]*\}|\S.*|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:a}},statement:{pattern:/(^[ \t]*)(?:else|for|if|return|unless)[ \t].+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:a}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)(?!\s)[^{\r\n]*(?:;|[^{\r\n,]$(?!(?:\r?\n|\r)(?:\{|\2[ \t])))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:a.interpolation}},rest:a}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t])))/m,lookbehind:!0,inside:{interpolation:a.interpolation,comment:a.comment,punctuation:/[{},]/}},func:a.func,string:a.string,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},interpolation:a.interpolation,punctuation:/[{}()\[\];:.]/}})(e)}return ide}var ade,KFe;function O_r(){if(KFe)return ade;KFe=1,ade=t,t.displayName="swift",t.aliases=[];function t(e){e.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ 	]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},e.languages.swift["string-literal"].forEach(function(r){r.inside.interpolation.inside=e.languages.swift})}return ade}var ode,JFe;function N_r(){if(JFe)return ode;JFe=1,ode=t,t.displayName="systemd",t.aliases=[];function t(e){(function(r){var n={pattern:/^[;#].*/m,greedy:!0},i=/"(?:[^\r\n"\\]|\\(?:[^\r]|\r\n?))*"(?!\S)/.source;r.languages.systemd={comment:n,section:{pattern:/^\[[^\n\r\[\]]*\](?=[ \t]*$)/m,greedy:!0,inside:{punctuation:/^\[|\]$/,"section-name":{pattern:/[\s\S]+/,alias:"selector"}}},key:{pattern:/^[^\s=]+(?=[ \t]*=)/m,greedy:!0,alias:"attr-name"},value:{pattern:RegExp(/(=[ \t]*(?!\s))/.source+"(?:"+i+`|(?=[^"\r
]))(?:`+(/[^\s\\]/.source+'|[ 	]+(?:(?![ 	"])|'+i+")|"+/\\[\r\n]+(?:[#;].*[\r\n]+)*(?![#;])/.source)+")*"),lookbehind:!0,greedy:!0,alias:"attr-value",inside:{comment:n,quoted:{pattern:RegExp(/(^|\s)/.source+i),lookbehind:!0,greedy:!0},punctuation:/\\$/m,boolean:{pattern:/^(?:false|no|off|on|true|yes)$/,greedy:!0}}},punctuation:/=/}})(e)}return ode}var sde,QFe;function ybe(){if(QFe)return sde;QFe=1,sde=t,t.displayName="t4Templating",t.aliases=[];function t(e){(function(r){function n(a,o,s){return{pattern:RegExp("<#"+a+"[\\s\\S]*?#>"),alias:"block",inside:{delimiter:{pattern:RegExp("^<#"+a+"|#>$"),alias:"important"},content:{pattern:/[\s\S]+/,inside:o,alias:s}}}}function i(a){var o=r.languages[a],s="language-"+a;return{block:{pattern:/<#[\s\S]+?#>/,inside:{directive:n("@",{"attr-value":{pattern:/=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+)/,inside:{punctuation:/^=|^["']|["']$/}},keyword:/\b\w+(?=\s)/,"attr-name":/\b\w+/}),expression:n("=",o,s),"class-feature":n("\\+",o,s),standard:n("",o,s)}}}}r.languages["t4-templating"]=Object.defineProperty({},"createT4",{value:i})})(e)}return sde}var lde,e7e;function F_r(){if(e7e)return lde;e7e=1;var t=ybe(),e=OZ();lde=r,r.displayName="t4Cs",r.aliases=[];function r(n){n.register(t),n.register(e),n.languages.t4=n.languages["t4-cs"]=n.languages["t4-templating"].createT4("csharp")}return lde}var ude,t7e;function cKe(){if(t7e)return ude;t7e=1;var t=oKe();ude=e,e.displayName="vbnet",e.aliases=[];function e(r){r.register(t),r.languages.vbnet=r.languages.extend("basic",{comment:[{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},{pattern:/(^|[^\\:])'.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(^|[^"])"(?:""|[^"])*"(?!")/,lookbehind:!0,greedy:!0},keyword:/(?:\b(?:ADDHANDLER|ADDRESSOF|ALIAS|AND|ANDALSO|AS|BEEP|BLOAD|BOOLEAN|BSAVE|BYREF|BYTE|BYVAL|CALL(?: ABSOLUTE)?|CASE|CATCH|CBOOL|CBYTE|CCHAR|CDATE|CDBL|CDEC|CHAIN|CHAR|CHDIR|CINT|CLASS|CLEAR|CLNG|CLOSE|CLS|COBJ|COM|COMMON|CONST|CONTINUE|CSBYTE|CSHORT|CSNG|CSTR|CTYPE|CUINT|CULNG|CUSHORT|DATA|DATE|DECIMAL|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DEFAULT|DELEGATE|DIM|DIRECTCAST|DO|DOUBLE|ELSE|ELSEIF|END|ENUM|ENVIRON|ERASE|ERROR|EVENT|EXIT|FALSE|FIELD|FILES|FINALLY|FOR(?: EACH)?|FRIEND|FUNCTION|GET|GETTYPE|GETXMLNAMESPACE|GLOBAL|GOSUB|GOTO|HANDLES|IF|IMPLEMENTS|IMPORTS|IN|INHERITS|INPUT|INTEGER|INTERFACE|IOCTL|IS|ISNOT|KEY|KILL|LET|LIB|LIKE|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|ME|MKDIR|MOD|MODULE|MUSTINHERIT|MUSTOVERRIDE|MYBASE|MYCLASS|NAME|NAMESPACE|NARROWING|NEW|NEXT|NOT|NOTHING|NOTINHERITABLE|NOTOVERRIDABLE|OBJECT|OF|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPERATOR|OPTION(?: BASE)?|OPTIONAL|OR|ORELSE|OUT|OVERLOADS|OVERRIDABLE|OVERRIDES|PARAMARRAY|PARTIAL|POKE|PRIVATE|PROPERTY|PROTECTED|PUBLIC|PUT|RAISEEVENT|READ|READONLY|REDIM|REM|REMOVEHANDLER|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SBYTE|SELECT(?: CASE)?|SET|SHADOWS|SHARED|SHELL|SHORT|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|STRUCTURE|SUB|SWAP|SYNCLOCK|SYSTEM|THEN|THROW|TIMER|TO|TROFF|TRON|TRUE|TRY|TRYCAST|TYPE|TYPEOF|UINTEGER|ULONG|UNLOCK|UNTIL|USHORT|USING|VIEW PRINT|WAIT|WEND|WHEN|WHILE|WIDENING|WITH|WITHEVENTS|WRITE|WRITEONLY|XOR)|\B(?:#CONST|#ELSE|#ELSEIF|#END|#IF))(?:\$|\b)/i,punctuation:/[,;:(){}]/})}return ude}var cde,r7e;function z_r(){if(r7e)return cde;r7e=1;var t=ybe(),e=cKe();cde=r,r.displayName="t4Vb",r.aliases=[];function r(n){n.register(t),n.register(e),n.languages["t4-vb"]=n.languages["t4-templating"].createT4("vbnet")}return cde}var fde,n7e;function fKe(){if(n7e)return fde;n7e=1,fde=t,t.displayName="yaml",t.aliases=["yml"];function t(e){(function(r){var n=/[*&][^\s[\]{},]+/,i=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,a="(?:"+i.source+"(?:[ 	]+"+n.source+")?|"+n.source+"(?:[ 	]+"+i.source+")?)",o=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),s=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function d(b,L){L=(L||"").replace(/m/g,"")+"m";var B=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return a}).replace(/<<value>>/g,function(){return b});return RegExp(B,L)}r.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return a})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return a}).replace(/<<key>>/g,function(){return"(?:"+o+"|"+s+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:d(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:d(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:d(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:d(s),lookbehind:!0,greedy:!0},number:{pattern:d(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:i,important:n,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},r.languages.yml=r.languages.yaml})(e)}return fde}var dde,i7e;function B_r(){if(i7e)return dde;i7e=1;var t=fKe();dde=e,e.displayName="tap",e.aliases=[];function e(r){r.register(t),r.languages.tap={fail:/not ok[^#{\n\r]*/,pass:/ok[^#{\n\r]*/,pragma:/pragma [+-][a-z]+/,bailout:/bail out!.*/i,version:/TAP version \d+/i,plan:/\b\d+\.\.\d+(?: +#.*)?/,subtest:{pattern:/# Subtest(?:: .*)?/,greedy:!0},punctuation:/[{}]/,directive:/#.*/,yamlish:{pattern:/(^[ \t]*)---[\s\S]*?[\r\n][ \t]*\.\.\.$/m,lookbehind:!0,inside:r.languages.yaml,alias:"language-yaml"}}}return dde}var hde,a7e;function U_r(){if(a7e)return hde;a7e=1,hde=t,t.displayName="tcl",t.aliases=[];function t(e){e.languages.tcl={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},string:{pattern:/"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"/,greedy:!0},variable:[{pattern:/(\$)(?:::)?(?:[a-zA-Z0-9]+::)*\w+/,lookbehind:!0},{pattern:/(\$)\{[^}]+\}/,lookbehind:!0},{pattern:/(^[\t ]*set[ \t]+)(?:::)?(?:[a-zA-Z0-9]+::)*\w+/m,lookbehind:!0}],function:{pattern:/(^[\t ]*proc[ \t]+)\S+/m,lookbehind:!0},builtin:[{pattern:/(^[\t ]*)(?:break|class|continue|error|eval|exit|for|foreach|if|proc|return|switch|while)\b/m,lookbehind:!0},/\b(?:else|elseif)\b/],scope:{pattern:/(^[\t ]*)(?:global|upvar|variable)\b/m,lookbehind:!0,alias:"constant"},keyword:{pattern:/(^[\t ]*|\[)(?:Safe_Base|Tcl|after|append|apply|array|auto_(?:execok|import|load|mkindex|qualify|reset)|automkindex_old|bgerror|binary|catch|cd|chan|clock|close|concat|dde|dict|encoding|eof|exec|expr|fblocked|fconfigure|fcopy|file(?:event|name)?|flush|gets|glob|history|http|incr|info|interp|join|lappend|lassign|lindex|linsert|list|llength|load|lrange|lrepeat|lreplace|lreverse|lsearch|lset|lsort|math(?:func|op)|memory|msgcat|namespace|open|package|parray|pid|pkg_mkIndex|platform|puts|pwd|re_syntax|read|refchan|regexp|registry|regsub|rename|scan|seek|set|socket|source|split|string|subst|tcl(?:_endOfWord|_findLibrary|startOf(?:Next|Previous)Word|test|vars|wordBreak(?:After|Before))|tell|time|tm|trace|unknown|unload|unset|update|uplevel|vwait)\b/m,lookbehind:!0},operator:/!=?|\*\*?|==|&&?|\|\|?|<[=<]?|>[=>]?|[-+~\/%?^]|\b(?:eq|in|ne|ni)\b/,punctuation:/[{}()\[\]]/}}return hde}var pde,o7e;function H_r(){if(o7e)return pde;o7e=1,pde=t,t.displayName="textile",t.aliases=[];function t(e){(function(r){var n=/\([^|()\n]+\)|\[[^\]\n]+\]|\{[^}\n]+\}/.source,i=/\)|\((?![^|()\n]+\))/.source;function a(V,X){return RegExp(V.replace(/<MOD>/g,function(){return"(?:"+n+")"}).replace(/<PAR>/g,function(){return"(?:"+i+")"}),X||"")}var o={css:{pattern:/\{[^{}]+\}/,inside:{rest:r.languages.css}},"class-id":{pattern:/(\()[^()]+(?=\))/,lookbehind:!0,alias:"attr-value"},lang:{pattern:/(\[)[^\[\]]+(?=\])/,lookbehind:!0,alias:"attr-value"},punctuation:/[\\\/]\d+|\S/},s=r.languages.textile=r.languages.extend("markup",{phrase:{pattern:/(^|\r|\n)\S[\s\S]*?(?=$|\r?\n\r?\n|\r\r)/,lookbehind:!0,inside:{"block-tag":{pattern:a(/^[a-z]\w*(?:<MOD>|<PAR>|[<>=])*\./.source),inside:{modifier:{pattern:a(/(^[a-z]\w*)(?:<MOD>|<PAR>|[<>=])+(?=\.)/.source),lookbehind:!0,inside:o},tag:/^[a-z]\w*/,punctuation:/\.$/}},list:{pattern:a(/^[*#]+<MOD>*\s+\S.*/.source,"m"),inside:{modifier:{pattern:a(/(^[*#]+)<MOD>+/.source),lookbehind:!0,inside:o},punctuation:/^[*#]+/}},table:{pattern:a(/^(?:(?:<MOD>|<PAR>|[<>=^~])+\.\s*)?(?:\|(?:(?:<MOD>|<PAR>|[<>=^~_]|[\\/]\d+)+\.|(?!(?:<MOD>|<PAR>|[<>=^~_]|[\\/]\d+)+\.))[^|]*)+\|/.source,"m"),inside:{modifier:{pattern:a(/(^|\|(?:\r?\n|\r)?)(?:<MOD>|<PAR>|[<>=^~_]|[\\/]\d+)+(?=\.)/.source),lookbehind:!0,inside:o},punctuation:/\||^\./}},inline:{pattern:a(/(^|[^a-zA-Z\d])(\*\*|__|\?\?|[*_%@+\-^~])<MOD>*.+?\2(?![a-zA-Z\d])/.source),lookbehind:!0,inside:{bold:{pattern:a(/(^(\*\*?)<MOD>*).+?(?=\2)/.source),lookbehind:!0},italic:{pattern:a(/(^(__?)<MOD>*).+?(?=\2)/.source),lookbehind:!0},cite:{pattern:a(/(^\?\?<MOD>*).+?(?=\?\?)/.source),lookbehind:!0,alias:"string"},code:{pattern:a(/(^@<MOD>*).+?(?=@)/.source),lookbehind:!0,alias:"keyword"},inserted:{pattern:a(/(^\+<MOD>*).+?(?=\+)/.source),lookbehind:!0},deleted:{pattern:a(/(^-<MOD>*).+?(?=-)/.source),lookbehind:!0},span:{pattern:a(/(^%<MOD>*).+?(?=%)/.source),lookbehind:!0},modifier:{pattern:a(/(^\*\*|__|\?\?|[*_%@+\-^~])<MOD>+/.source),lookbehind:!0,inside:o},punctuation:/[*_%?@+\-^~]+/}},"link-ref":{pattern:/^\[[^\]]+\]\S+$/m,inside:{string:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0},url:{pattern:/(^\])\S+$/,lookbehind:!0},punctuation:/[\[\]]/}},link:{pattern:a(/"<MOD>*[^"]+":.+?(?=[^\w/]?(?:\s|$))/.source),inside:{text:{pattern:a(/(^"<MOD>*)[^"]+(?=")/.source),lookbehind:!0},modifier:{pattern:a(/(^")<MOD>+/.source),lookbehind:!0,inside:o},url:{pattern:/(:).+/,lookbehind:!0},punctuation:/[":]/}},image:{pattern:a(/!(?:<MOD>|<PAR>|[<>=])*(?![<>=])[^!\s()]+(?:\([^)]+\))?!(?::.+?(?=[^\w/]?(?:\s|$)))?/.source),inside:{source:{pattern:a(/(^!(?:<MOD>|<PAR>|[<>=])*)(?![<>=])[^!\s()]+(?:\([^)]+\))?(?=!)/.source),lookbehind:!0,alias:"url"},modifier:{pattern:a(/(^!)(?:<MOD>|<PAR>|[<>=])+/.source),lookbehind:!0,inside:o},url:{pattern:/(:).+/,lookbehind:!0},punctuation:/[!:]/}},footnote:{pattern:/\b\[\d+\]/,alias:"comment",inside:{punctuation:/\[|\]/}},acronym:{pattern:/\b[A-Z\d]+\([^)]+\)/,inside:{comment:{pattern:/(\()[^()]+(?=\))/,lookbehind:!0},punctuation:/[()]/}},mark:{pattern:/\b\((?:C|R|TM)\)/,alias:"comment",inside:{punctuation:/[()]/}}}}}),d=s.phrase.inside,b={inline:d.inline,link:d.link,image:d.image,footnote:d.footnote,acronym:d.acronym,mark:d.mark};s.tag.pattern=/<\/?(?!\d)[a-z0-9]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i;var L=d.inline.inside;L.bold.inside=b,L.italic.inside=b,L.inserted.inside=b,L.deleted.inside=b,L.span.inside=b;var B=d.table.inside;B.inline=b.inline,B.link=b.link,B.image=b.image,B.footnote=b.footnote,B.acronym=b.acronym,B.mark=b.mark})(e)}return pde}var vde,s7e;function j_r(){if(s7e)return vde;s7e=1,vde=t,t.displayName="toml",t.aliases=[];function t(e){(function(r){var n=/(?:[\w-]+|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*")/.source;function i(a){return a.replace(/__/g,function(){return n})}r.languages.toml={comment:{pattern:/#.*/,greedy:!0},table:{pattern:RegExp(i(/(^[\t ]*\[\s*(?:\[\s*)?)__(?:\s*\.\s*__)*(?=\s*\])/.source),"m"),lookbehind:!0,greedy:!0,alias:"class-name"},key:{pattern:RegExp(i(/(^[\t ]*|[{,]\s*)__(?:\s*\.\s*__)*(?=\s*=)/.source),"m"),lookbehind:!0,greedy:!0,alias:"property"},string:{pattern:/"""(?:\\[\s\S]|[^\\])*?"""|'''[\s\S]*?'''|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},date:[{pattern:/\b\d{4}-\d{2}-\d{2}(?:[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?\b/i,alias:"number"},{pattern:/\b\d{2}:\d{2}:\d{2}(?:\.\d+)?\b/,alias:"number"}],number:/(?:\b0(?:x[\da-zA-Z]+(?:_[\da-zA-Z]+)*|o[0-7]+(?:_[0-7]+)*|b[10]+(?:_[10]+)*))\b|[-+]?\b\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?\b|[-+]?\b(?:inf|nan)\b/,boolean:/\b(?:false|true)\b/,punctuation:/[.,=[\]{}]/}})(e)}return vde}var mde,l7e;function V_r(){if(l7e)return mde;l7e=1,mde=t,t.displayName="tremor",t.aliases=[];function t(e){(function(r){r.languages.tremor={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},"interpolated-string":null,extractor:{pattern:/\b[a-z_]\w*\|(?:[^\r\n\\|]|\\(?:\r\n|[\s\S]))*\|/i,greedy:!0,inside:{regex:{pattern:/(^re)\|[\s\S]+/,lookbehind:!0},function:/^\w+/,value:/\|[\s\S]+/}},identifier:{pattern:/`[^`]*`/,greedy:!0},function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())\b/,keyword:/\b(?:args|as|by|case|config|connect|connector|const|copy|create|default|define|deploy|drop|each|emit|end|erase|event|flow|fn|for|from|group|having|insert|into|intrinsic|let|links|match|merge|mod|move|of|operator|patch|pipeline|recur|script|select|set|sliding|state|stream|to|tumbling|update|use|when|where|window|with)\b/,boolean:/\b(?:false|null|true)\b/i,number:/\b(?:0b[01_]*|0x[0-9a-fA-F_]*|\d[\d_]*(?:\.\d[\d_]*)?(?:[Ee][+-]?[\d_]+)?)\b/,"pattern-punctuation":{pattern:/%(?=[({[])/,alias:"punctuation"},operator:/[-+*\/%~!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?>?=?|(?:absent|and|not|or|present|xor)\b/,punctuation:/::|[;\[\]()\{\},.:]/};var n=/#\{(?:[^"{}]|\{[^{}]*\}|"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*")*\}/.source;r.languages.tremor["interpolated-string"]={pattern:RegExp(/(^|[^\\])/.source+'(?:"""(?:'+/[^"\\#]|\\[\s\S]|"(?!"")|#(?!\{)/.source+"|"+n+')*"""|"(?:'+/[^"\\\r\n#]|\\(?:\r\n|[\s\S])|#(?!\{)/.source+"|"+n+')*")'),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:RegExp(n),inside:{punctuation:/^#\{|\}$/,expression:{pattern:/[\s\S]+/,inside:r.languages.tremor}}},string:/[\s\S]+/}},r.languages.troy=r.languages.tremor,r.languages.trickle=r.languages.tremor})(e)}return mde}var gde,u7e;function q_r(){if(u7e)return gde;u7e=1;var t=lKe(),e=vbe();gde=r,r.displayName="tsx",r.aliases=[];function r(n){n.register(t),n.register(e),(function(i){var a=i.util.clone(i.languages.typescript);i.languages.tsx=i.languages.extend("jsx",a),delete i.languages.tsx.parameter,delete i.languages.tsx["literal-property"];var o=i.languages.tsx.tag;o.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+o.pattern.source+")",o.pattern.flags),o.lookbehind=!0})(n)}return gde}var yde,c7e;function G_r(){if(c7e)return yde;c7e=1;var t=iT();yde=e,e.displayName="tt2",e.aliases=[];function e(r){r.register(t),(function(n){n.languages.tt2=n.languages.extend("clike",{comment:/#.*|\[%#[\s\S]*?%\]/,keyword:/\b(?:BLOCK|CALL|CASE|CATCH|CLEAR|DEBUG|DEFAULT|ELSE|ELSIF|END|FILTER|FINAL|FOREACH|GET|IF|IN|INCLUDE|INSERT|LAST|MACRO|META|NEXT|PERL|PROCESS|RAWPERL|RETURN|SET|STOP|SWITCH|TAGS|THROW|TRY|UNLESS|USE|WHILE|WRAPPER)\b/,punctuation:/[[\]{},()]/}),n.languages.insertBefore("tt2","number",{operator:/=[>=]?|!=?|<=?|>=?|&&|\|\|?|\b(?:and|not|or)\b/,variable:{pattern:/\b[a-z]\w*(?:\s*\.\s*(?:\d+|\$?[a-z]\w*))*\b/i}}),n.languages.insertBefore("tt2","keyword",{delimiter:{pattern:/^(?:\[%|%%)-?|-?%\]$/,alias:"punctuation"}}),n.languages.insertBefore("tt2","string",{"single-quoted-string":{pattern:/'[^\\']*(?:\\[\s\S][^\\']*)*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"[^\\"]*(?:\\[\s\S][^\\"]*)*"/,greedy:!0,alias:"string",inside:{variable:{pattern:/\$(?:[a-z]\w*(?:\.(?:\d+|\$?[a-z]\w*))*)/i}}}}),delete n.languages.tt2.string,n.hooks.add("before-tokenize",function(i){var a=/\[%[\s\S]+?%\]/g;n.languages["markup-templating"].buildPlaceholders(i,"tt2",a)}),n.hooks.add("after-tokenize",function(i){n.languages["markup-templating"].tokenizePlaceholders(i,"tt2")})})(r)}return yde}var bde,f7e;function $_r(){if(f7e)return bde;f7e=1;var t=iT();bde=e,e.displayName="twig",e.aliases=[];function e(r){r.register(t),r.languages.twig={comment:/^\{#[\s\S]*?#\}$/,"tag-name":{pattern:/(^\{%-?\s*)\w+/,lookbehind:!0,alias:"keyword"},delimiter:{pattern:/^\{[{%]-?|-?[%}]\}$/,alias:"punctuation"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,inside:{punctuation:/^['"]|['"]$/}},keyword:/\b(?:even|if|odd)\b/,boolean:/\b(?:false|null|true)\b/,number:/\b0x[\dA-Fa-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][-+]?\d+)?/,operator:[{pattern:/(\s)(?:and|b-and|b-or|b-xor|ends with|in|is|matches|not|or|same as|starts with)(?=\s)/,lookbehind:!0},/[=<>]=?|!=|\*\*?|\/\/?|\?:?|[-+~%|]/],punctuation:/[()\[\]{}:.,]/},r.hooks.add("before-tokenize",function(n){if(n.language==="twig"){var i=/\{(?:#[\s\S]*?#|%[\s\S]*?%|\{[\s\S]*?\})\}/g;r.languages["markup-templating"].buildPlaceholders(n,"twig",i)}}),r.hooks.add("after-tokenize",function(n){r.languages["markup-templating"].tokenizePlaceholders(n,"twig")})}return bde}var xde,d7e;function W_r(){if(d7e)return xde;d7e=1,xde=t,t.displayName="typoscript",t.aliases=["tsconfig"];function t(e){(function(r){var n=/\b(?:ACT|ACTIFSUB|CARRAY|CASE|CLEARGIF|COA|COA_INT|CONSTANTS|CONTENT|CUR|EDITPANEL|EFFECT|EXT|FILE|FLUIDTEMPLATE|FORM|FRAME|FRAMESET|GIFBUILDER|GMENU|GMENU_FOLDOUT|GMENU_LAYERS|GP|HMENU|HRULER|HTML|IENV|IFSUB|IMAGE|IMGMENU|IMGMENUITEM|IMGTEXT|IMG_RESOURCE|INCLUDE_TYPOSCRIPT|JSMENU|JSMENUITEM|LLL|LOAD_REGISTER|NO|PAGE|RECORDS|RESTORE_REGISTER|TEMPLATE|TEXT|TMENU|TMENUITEM|TMENU_LAYERS|USER|USER_INT|_GIFBUILDER|global|globalString|globalVar)\b/;r.languages.typoscript={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:= \t]|(?:^|[^= \t])[ \t]+)\/\/.*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^"'])#.*/,lookbehind:!0,greedy:!0}],function:[{pattern:/<INCLUDE_TYPOSCRIPT:\s*source\s*=\s*(?:"[^"\r\n]*"|'[^'\r\n]*')\s*>/,inside:{string:{pattern:/"[^"\r\n]*"|'[^'\r\n]*'/,inside:{keyword:n}},keyword:{pattern:/INCLUDE_TYPOSCRIPT/}}},{pattern:/@import\s*(?:"[^"\r\n]*"|'[^'\r\n]*')/,inside:{string:/"[^"\r\n]*"|'[^'\r\n]*'/}}],string:{pattern:/^([^=]*=[< ]?)(?:(?!\]\n).)*/,lookbehind:!0,inside:{function:/\{\$.*\}/,keyword:n,number:/^\d+$/,punctuation:/[,|:]/}},keyword:n,number:{pattern:/\b\d+\s*[.{=]/,inside:{operator:/[.{=]/}},tag:{pattern:/\.?[-\w\\]+\.?/,inside:{punctuation:/\./}},punctuation:/[{}[\];(),.:|]/,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/},r.languages.tsconfig=r.languages.typoscript})(e)}return xde}var _de,h7e;function Y_r(){if(h7e)return _de;h7e=1,_de=t,t.displayName="unrealscript",t.aliases=["uc","uscript"];function t(e){e.languages.unrealscript={comment:/\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},category:{pattern:/(\b(?:(?:autoexpand|hide|show)categories|var)\s*\()[^()]+(?=\))/,lookbehind:!0,greedy:!0,alias:"property"},metadata:{pattern:/(\w\s*)<\s*\w+\s*=[^<>|=\r\n]+(?:\|\s*\w+\s*=[^<>|=\r\n]+)*>/,lookbehind:!0,greedy:!0,inside:{property:/\b\w+(?=\s*=)/,operator:/=/,punctuation:/[<>|]/}},macro:{pattern:/`\w+/,alias:"property"},"class-name":{pattern:/(\b(?:class|enum|extends|interface|state(?:\(\))?|struct|within)\s+)\w+/,lookbehind:!0},keyword:/\b(?:abstract|actor|array|auto|autoexpandcategories|bool|break|byte|case|class|classgroup|client|coerce|collapsecategories|config|const|continue|default|defaultproperties|delegate|dependson|deprecated|do|dontcollapsecategories|editconst|editinlinenew|else|enum|event|exec|export|extends|final|float|for|forcescriptorder|foreach|function|goto|guid|hidecategories|hidedropdown|if|ignores|implements|inherits|input|int|interface|iterator|latent|local|material|name|native|nativereplication|noexport|nontransient|noteditinlinenew|notplaceable|operator|optional|out|pawn|perobjectconfig|perobjectlocalized|placeable|postoperator|preoperator|private|protected|reliable|replication|return|server|showcategories|simulated|singular|state|static|string|struct|structdefault|structdefaultproperties|switch|texture|transient|travel|unreliable|until|var|vector|while|within)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,boolean:/\b(?:false|true)\b/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/>>|<<|--|\+\+|\*\*|[-+*/~!=<>$@]=?|&&?|\|\|?|\^\^?|[?:%]|\b(?:ClockwiseFrom|Cross|Dot)\b/,punctuation:/[()[\]{};,.]/},e.languages.uc=e.languages.uscript=e.languages.unrealscript}return _de}var wde,p7e;function X_r(){if(p7e)return wde;p7e=1,wde=t,t.displayName="uorazor",t.aliases=[];function t(e){e.languages.uorazor={"comment-hash":{pattern:/#.*/,alias:"comment",greedy:!0},"comment-slash":{pattern:/\/\/.*/,alias:"comment",greedy:!0},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,inside:{punctuation:/^['"]|['"]$/},greedy:!0},"source-layers":{pattern:/\b(?:arms|backpack|blue|bracelet|cancel|clear|cloak|criminal|earrings|enemy|facialhair|friend|friendly|gloves|gray|grey|ground|hair|head|innerlegs|innertorso|innocent|lefthand|middletorso|murderer|neck|nonfriendly|onehandedsecondary|outerlegs|outertorso|pants|red|righthand|ring|self|shirt|shoes|talisman|waist)\b/i,alias:"function"},"source-commands":{pattern:/\b(?:alliance|attack|cast|clearall|clearignore|clearjournal|clearlist|clearsysmsg|createlist|createtimer|dclick|dclicktype|dclickvar|dress|dressconfig|drop|droprelloc|emote|getlabel|guild|gumpclose|gumpresponse|hotkey|ignore|lasttarget|lift|lifttype|menu|menuresponse|msg|org|organize|organizer|overhead|pause|poplist|potion|promptresponse|pushlist|removelist|removetimer|rename|restock|say|scav|scavenger|script|setability|setlasttarget|setskill|settimer|setvar|sysmsg|target|targetloc|targetrelloc|targettype|undress|unignore|unsetvar|useobject|useonce|useskill|usetype|virtue|wait|waitforgump|waitformenu|waitforprompt|waitforstat|waitforsysmsg|waitfortarget|walk|wfsysmsg|wft|whisper|yell)\b/,alias:"function"},"tag-name":{pattern:/(^\{%-?\s*)\w+/,lookbehind:!0,alias:"keyword"},delimiter:{pattern:/^\{[{%]-?|-?[%}]\}$/,alias:"punctuation"},function:/\b(?:atlist|close|closest|count|counter|counttype|dead|dex|diffhits|diffmana|diffstam|diffweight|find|findbuff|finddebuff|findlayer|findtype|findtypelist|followers|gumpexists|hidden|hits|hp|hue|human|humanoid|ingump|inlist|insysmessage|insysmsg|int|invul|lhandempty|list|listexists|mana|maxhits|maxhp|maxmana|maxstam|maxweight|monster|mounted|name|next|noto|paralyzed|poisoned|position|prev|previous|queued|rand|random|rhandempty|skill|stam|str|targetexists|timer|timerexists|varexist|warmode|weight)\b/,keyword:/\b(?:and|as|break|continue|else|elseif|endfor|endif|endwhile|for|if|loop|not|or|replay|stop|while)\b/,boolean:/\b(?:false|null|true)\b/,number:/\b0x[\dA-Fa-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][-+]?\d+)?/,operator:[{pattern:/(\s)(?:and|b-and|b-or|b-xor|ends with|in|is|matches|not|or|same as|starts with)(?=\s)/,lookbehind:!0},/[=<>]=?|!=|\*\*?|\/\/?|\?:?|[-+~%|]/],punctuation:/[()\[\]{}:.,]/}}return wde}var Sde,v7e;function Z_r(){if(v7e)return Sde;v7e=1,Sde=t,t.displayName="uri",t.aliases=["url"];function t(e){e.languages.uri={scheme:{pattern:/^[a-z][a-z0-9+.-]*:/im,greedy:!0,inside:{"scheme-delimiter":/:$/}},fragment:{pattern:/#[\w\-.~!$&'()*+,;=%:@/?]*/,inside:{"fragment-delimiter":/^#/}},query:{pattern:/\?[\w\-.~!$&'()*+,;=%:@/?]*/,inside:{"query-delimiter":{pattern:/^\?/,greedy:!0},"pair-delimiter":/[&;]/,pair:{pattern:/^[^=][\s\S]*/,inside:{key:/^[^=]+/,value:{pattern:/(^=)[\s\S]+/,lookbehind:!0}}}}},authority:{pattern:RegExp(/^\/\//.source+/(?:[\w\-.~!$&'()*+,;=%:]*@)?/.source+("(?:"+/\[(?:[0-9a-fA-F:.]{2,48}|v[0-9a-fA-F]+\.[\w\-.~!$&'()*+,;=]+)\]/.source+"|"+/[\w\-.~!$&'()*+,;=%]*/.source+")")+/(?::\d*)?/.source,"m"),inside:{"authority-delimiter":/^\/\//,"user-info-segment":{pattern:/^[\w\-.~!$&'()*+,;=%:]*@/,inside:{"user-info-delimiter":/@$/,"user-info":/^[\w\-.~!$&'()*+,;=%:]+/}},"port-segment":{pattern:/:\d*$/,inside:{"port-delimiter":/^:/,port:/^\d+/}},host:{pattern:/[\s\S]+/,inside:{"ip-literal":{pattern:/^\[[\s\S]+\]$/,inside:{"ip-literal-delimiter":/^\[|\]$/,"ipv-future":/^v[\s\S]+/,"ipv6-address":/^[\s\S]+/}},"ipv4-address":/^(?:(?:[03-9]\d?|[12]\d{0,2})\.){3}(?:[03-9]\d?|[12]\d{0,2})$/}}}},path:{pattern:/^[\w\-.~!$&'()*+,;=%:@/]+/m,inside:{"path-separator":/\//}}},e.languages.url=e.languages.uri}return Sde}var Tde,m7e;function K_r(){if(m7e)return Tde;m7e=1,Tde=t,t.displayName="v",t.aliases=[];function t(e){(function(r){var n={pattern:/[\s\S]+/,inside:null};r.languages.v=r.languages.extend("clike",{string:{pattern:/r?(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,alias:"quoted-string",greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\{[^{}]*\}|\w+(?:\.\w+(?:\([^\(\)]*\))?|\[[^\[\]]+\])*)/,lookbehind:!0,inside:{"interpolation-variable":{pattern:/^\$\w[\s\S]*$/,alias:"variable"},"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},"interpolation-expression":n}}}},"class-name":{pattern:/(\b(?:enum|interface|struct|type)\s+)(?:C\.)?\w+/,lookbehind:!0},keyword:/(?:\b(?:__global|as|asm|assert|atomic|break|chan|const|continue|defer|else|embed|enum|fn|for|go(?:to)?|if|import|in|interface|is|lock|match|module|mut|none|or|pub|return|rlock|select|shared|sizeof|static|struct|type(?:of)?|union|unsafe)|\$(?:else|for|if)|#(?:flag|include))\b/,number:/\b(?:0x[a-f\d]+(?:_[a-f\d]+)*|0b[01]+(?:_[01]+)*|0o[0-7]+(?:_[0-7]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?)\b/i,operator:/~|\?|[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\.?/,builtin:/\b(?:any(?:_float|_int)?|bool|byte(?:ptr)?|charptr|f(?:32|64)|i(?:8|16|64|128|nt)|rune|size_t|string|u(?:16|32|64|128)|voidptr)\b/}),n.inside=r.languages.v,r.languages.insertBefore("v","string",{char:{pattern:/`(?:\\`|\\?[^`]{1,2})`/,alias:"rune"}}),r.languages.insertBefore("v","operator",{attribute:{pattern:/(^[\t ]*)\[(?:deprecated|direct_array_access|flag|inline|live|ref_only|typedef|unsafe_fn|windows_stdcall)\]/m,lookbehind:!0,alias:"annotation",inside:{punctuation:/[\[\]]/,keyword:/\w+/}},generic:{pattern:/<\w+>(?=\s*[\)\{])/,inside:{punctuation:/[<>]/,"class-name":/\w+/}}}),r.languages.insertBefore("v","function",{"generic-function":{pattern:/\b\w+\s*<\w+>(?=\()/,inside:{function:/^\w+/,generic:{pattern:/<\w+>/,inside:r.languages.v.generic.inside}}}})})(e)}return Tde}var Ede,g7e;function J_r(){if(g7e)return Ede;g7e=1,Ede=t,t.displayName="vala",t.aliases=[];function t(e){e.languages.vala=e.languages.extend("clike",{"class-name":[{pattern:/\b[A-Z]\w*(?:\.\w+)*\b(?=(?:\?\s+|\*?\s+\*?)\w)/,inside:{punctuation:/\./}},{pattern:/(\[)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/(\b(?:class|interface)\s+[A-Z]\w*(?:\.\w+)*\s*:\s*)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/((?:\b(?:class|enum|interface|new|struct)\s+)|(?:catch\s+\())[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}}],keyword:/\b(?:abstract|as|assert|async|base|bool|break|case|catch|char|class|const|construct|continue|default|delegate|delete|do|double|dynamic|else|ensures|enum|errordomain|extern|finally|float|for|foreach|get|if|in|inline|int|int16|int32|int64|int8|interface|internal|is|lock|long|namespace|new|null|out|override|owned|params|private|protected|public|ref|requires|return|set|short|signal|sizeof|size_t|ssize_t|static|string|struct|switch|this|throw|throws|try|typeof|uchar|uint|uint16|uint32|uint64|uint8|ulong|unichar|unowned|ushort|using|value|var|virtual|void|volatile|weak|while|yield)\b/i,function:/\b\w+(?=\s*\()/,number:/(?:\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)(?:f|u?l?)?/i,operator:/\+\+|--|&&|\|\||<<=?|>>=?|=>|->|~|[+\-*\/%&^|=!<>]=?|\?\??|\.\.\./,punctuation:/[{}[\];(),.:]/,constant:/\b[A-Z0-9_]+\b/}),e.languages.insertBefore("vala","string",{"raw-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},"template-string":{pattern:/@"[\s\S]*?"/,greedy:!0,inside:{interpolation:{pattern:/\$(?:\([^)]*\)|[a-zA-Z]\w*)/,inside:{delimiter:{pattern:/^\$\(?|\)$/,alias:"punctuation"},rest:e.languages.vala}},string:/[\s\S]+/}}}),e.languages.insertBefore("vala","keyword",{regex:{pattern:/\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[imsx]{0,4}(?=\s*(?:$|[\r\n,.;})\]]))/,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^\//,"regex-flags":/^[a-z]+$/}}})}return Ede}var Ade,y7e;function Q_r(){if(y7e)return Ade;y7e=1,Ade=t,t.displayName="velocity",t.aliases=[];function t(e){(function(r){r.languages.velocity=r.languages.extend("markup",{});var n={variable:{pattern:/(^|[^\\](?:\\\\)*)\$!?(?:[a-z][\w-]*(?:\([^)]*\))?(?:\.[a-z][\w-]*(?:\([^)]*\))?|\[[^\]]+\])*|\{[^}]+\})/i,lookbehind:!0,inside:{}},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},number:/\b\d+\b/,boolean:/\b(?:false|true)\b/,operator:/[=!<>]=?|[+*/%-]|&&|\|\||\.\.|\b(?:eq|g[et]|l[et]|n(?:e|ot))\b/,punctuation:/[(){}[\]:,.]/};n.variable.inside={string:n.string,function:{pattern:/([^\w-])[a-z][\w-]*(?=\()/,lookbehind:!0},number:n.number,boolean:n.boolean,punctuation:n.punctuation},r.languages.insertBefore("velocity","comment",{unparsed:{pattern:/(^|[^\\])#\[\[[\s\S]*?\]\]#/,lookbehind:!0,greedy:!0,inside:{punctuation:/^#\[\[|\]\]#$/}},"velocity-comment":[{pattern:/(^|[^\\])#\*[\s\S]*?\*#/,lookbehind:!0,greedy:!0,alias:"comment"},{pattern:/(^|[^\\])##.*/,lookbehind:!0,greedy:!0,alias:"comment"}],directive:{pattern:/(^|[^\\](?:\\\\)*)#@?(?:[a-z][\w-]*|\{[a-z][\w-]*\})(?:\s*\((?:[^()]|\([^()]*\))*\))?/i,lookbehind:!0,inside:{keyword:{pattern:/^#@?(?:[a-z][\w-]*|\{[a-z][\w-]*\})|\bin\b/,inside:{punctuation:/[{}]/}},rest:n}},variable:n.variable}),r.languages.velocity.tag.inside["attr-value"].inside.rest=r.languages.velocity})(e)}return Ade}var Cde,b7e;function ewr(){if(b7e)return Cde;b7e=1,Cde=t,t.displayName="verilog",t.aliases=[];function t(e){e.languages.verilog={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"kernel-function":{pattern:/\B\$\w+\b/,alias:"property"},constant:/\B`\w+\b/,function:/\b\w+(?=\()/,keyword:/\b(?:alias|and|assert|assign|assume|automatic|before|begin|bind|bins|binsof|bit|break|buf|bufif0|bufif1|byte|case|casex|casez|cell|chandle|class|clocking|cmos|config|const|constraint|context|continue|cover|covergroup|coverpoint|cross|deassign|default|defparam|design|disable|dist|do|edge|else|end|endcase|endclass|endclocking|endconfig|endfunction|endgenerate|endgroup|endinterface|endmodule|endpackage|endprimitive|endprogram|endproperty|endsequence|endspecify|endtable|endtask|enum|event|expect|export|extends|extern|final|first_match|for|force|foreach|forever|fork|forkjoin|function|generate|genvar|highz0|highz1|if|iff|ifnone|ignore_bins|illegal_bins|import|incdir|include|initial|inout|input|inside|instance|int|integer|interface|intersect|join|join_any|join_none|large|liblist|library|local|localparam|logic|longint|macromodule|matches|medium|modport|module|nand|negedge|new|nmos|nor|noshowcancelled|not|notif0|notif1|null|or|output|package|packed|parameter|pmos|posedge|primitive|priority|program|property|protected|pull0|pull1|pulldown|pullup|pulsestyle_ondetect|pulsestyle_onevent|pure|rand|randc|randcase|randsequence|rcmos|real|realtime|ref|reg|release|repeat|return|rnmos|rpmos|rtran|rtranif0|rtranif1|scalared|sequence|shortint|shortreal|showcancelled|signed|small|solve|specify|specparam|static|string|strong0|strong1|struct|super|supply0|supply1|table|tagged|task|this|throughout|time|timeprecision|timeunit|tran|tranif0|tranif1|tri|tri0|tri1|triand|trior|trireg|type|typedef|union|unique|unsigned|use|uwire|var|vectored|virtual|void|wait|wait_order|wand|weak0|weak1|while|wildcard|wire|with|within|wor|xnor|xor)\b/,important:/\b(?:always|always_comb|always_ff|always_latch)\b(?: *@)?/,number:/\B##?\d+|(?:\b\d+)?'[odbh] ?[\da-fzx_?]+|\b(?:\d*[._])?\d+(?:e[-+]?\d+)?/i,operator:/[-+{}^~%*\/?=!<>&|]+/,punctuation:/[[\];(),.:]/}}return Cde}var Mde,x7e;function twr(){if(x7e)return Mde;x7e=1,Mde=t,t.displayName="vhdl",t.aliases=[];function t(e){e.languages.vhdl={comment:/--.+/,"vhdl-vectors":{pattern:/\b[oxb]"[\da-f_]+"|"[01uxzwlh-]+"/i,alias:"number"},"quoted-function":{pattern:/"\S+?"(?=\()/,alias:"function"},string:/"(?:[^\\"\r\n]|\\(?:\r\n|[\s\S]))*"/,constant:/\b(?:library|use)\b/i,keyword:/\b(?:'active|'ascending|'base|'delayed|'driving|'driving_value|'event|'high|'image|'instance_name|'last_active|'last_event|'last_value|'left|'leftof|'length|'low|'path_name|'pos|'pred|'quiet|'range|'reverse_range|'right|'rightof|'simple_name|'stable|'succ|'transaction|'val|'value|access|after|alias|all|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|new|next|null|of|on|open|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|report|return|select|severity|shared|signal|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with)\b/i,boolean:/\b(?:false|true)\b/i,function:/\w+(?=\()/,number:/'[01uxzwlh-]'|\b(?:\d+#[\da-f_.]+#|\d[\d_.]*)(?:e[-+]?\d+)?/i,operator:/[<>]=?|:=|[-+*/&=]|\b(?:abs|and|mod|nand|nor|not|or|rem|rol|ror|sla|sll|sra|srl|xnor|xor)\b/i,punctuation:/[{}[\];(),.:]/}}return Mde}var Rde,_7e;function rwr(){if(_7e)return Rde;_7e=1,Rde=t,t.displayName="vim",t.aliases=[];function t(e){e.languages.vim={string:/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\r\n]|'')*'/,comment:/".*/,function:/\b\w+(?=\()/,keyword:/\b(?:N|Next|P|Print|X|XMLent|XMLns|ab|abbreviate|abc|abclear|abo|aboveleft|al|all|ar|arga|argadd|argd|argdelete|argdo|arge|argedit|argg|argglobal|argl|arglocal|args|argu|argument|as|ascii|b|bN|bNext|ba|bad|badd|ball|bd|bdelete|be|bel|belowright|bf|bfirst|bl|blast|bm|bmodified|bn|bnext|bo|botright|bp|bprevious|br|brea|break|breaka|breakadd|breakd|breakdel|breakl|breaklist|brewind|bro|browse|bufdo|buffer|buffers|bun|bunload|bw|bwipeout|c|cN|cNext|cNfcNfile|ca|cabbrev|cabc|cabclear|cad|caddb|caddbuffer|caddexpr|caddf|caddfile|cal|call|cat|catch|cb|cbuffer|cc|ccl|cclose|cd|ce|center|cex|cexpr|cf|cfile|cfir|cfirst|cg|cgetb|cgetbuffer|cgete|cgetexpr|cgetfile|change|changes|chd|chdir|che|checkpath|checkt|checktime|cl|cla|clast|clist|clo|close|cmapc|cmapclear|cn|cnew|cnewer|cnext|cnf|cnfile|cnorea|cnoreabbrev|co|col|colder|colo|colorscheme|comc|comclear|comp|compiler|con|conf|confirm|continue|cope|copen|copy|cp|cpf|cpfile|cprevious|cq|cquit|cr|crewind|cu|cuna|cunabbrev|cunmap|cw|cwindow|d|debugg|debuggreedy|delc|delcommand|delete|delf|delfunction|delm|delmarks|di|diffg|diffget|diffoff|diffpatch|diffpu|diffput|diffsplit|diffthis|diffu|diffupdate|dig|digraphs|display|dj|djump|dl|dlist|dr|drop|ds|dsearch|dsp|dsplit|e|earlier|echoe|echoerr|echom|echomsg|echon|edit|el|else|elsei|elseif|em|emenu|en|endf|endfo|endfor|endfun|endfunction|endif|endt|endtry|endw|endwhile|ene|enew|ex|exi|exit|exu|exusage|f|file|files|filetype|fin|fina|finally|find|fini|finish|fir|first|fix|fixdel|fo|fold|foldc|foldclose|foldd|folddoc|folddoclosed|folddoopen|foldo|foldopen|for|fu|fun|function|go|goto|gr|grep|grepa|grepadd|h|ha|hardcopy|help|helpf|helpfind|helpg|helpgrep|helpt|helptags|hid|hide|his|history|ia|iabbrev|iabc|iabclear|if|ij|ijump|il|ilist|imapc|imapclear|in|inorea|inoreabbrev|isearch|isp|isplit|iu|iuna|iunabbrev|iunmap|j|join|ju|jumps|k|kee|keepalt|keepj|keepjumps|keepmarks|l|lN|lNext|lNf|lNfile|la|lad|laddb|laddbuffer|laddexpr|laddf|laddfile|lan|language|last|later|lb|lbuffer|lc|lcd|lch|lchdir|lcl|lclose|left|lefta|leftabove|let|lex|lexpr|lf|lfile|lfir|lfirst|lg|lgetb|lgetbuffer|lgete|lgetexpr|lgetfile|lgr|lgrep|lgrepa|lgrepadd|lh|lhelpgrep|list|ll|lla|llast|lli|llist|lm|lmak|lmake|lmap|lmapc|lmapclear|ln|lne|lnew|lnewer|lnext|lnf|lnfile|lnoremap|lo|loadview|loc|lockmarks|lockv|lockvar|lol|lolder|lop|lopen|lp|lpf|lpfile|lprevious|lr|lrewind|ls|lt|ltag|lu|lunmap|lv|lvimgrep|lvimgrepa|lvimgrepadd|lw|lwindow|m|ma|mak|make|mark|marks|mat|match|menut|menutranslate|mk|mkexrc|mks|mksession|mksp|mkspell|mkv|mkvie|mkview|mkvimrc|mod|mode|move|mz|mzf|mzfile|mzscheme|n|nbkey|new|next|nmapc|nmapclear|noh|nohlsearch|norea|noreabbrev|nu|number|nun|nunmap|o|omapc|omapclear|on|only|open|opt|options|ou|ounmap|p|pc|pclose|pe|ped|pedit|perl|perld|perldo|po|pop|popu|popup|pp|ppop|pre|preserve|prev|previous|print|prof|profd|profdel|profile|promptf|promptfind|promptr|promptrepl|ps|psearch|ptN|ptNext|pta|ptag|ptf|ptfirst|ptj|ptjump|ptl|ptlast|ptn|ptnext|ptp|ptprevious|ptr|ptrewind|pts|ptselect|pu|put|pw|pwd|py|pyf|pyfile|python|q|qa|qall|quit|quita|quitall|r|read|rec|recover|red|redi|redir|redo|redr|redraw|redraws|redrawstatus|reg|registers|res|resize|ret|retab|retu|return|rew|rewind|ri|right|rightb|rightbelow|ru|rub|ruby|rubyd|rubydo|rubyf|rubyfile|runtime|rv|rviminfo|sN|sNext|sa|sal|sall|san|sandbox|sargument|sav|saveas|sb|sbN|sbNext|sba|sball|sbf|sbfirst|sbl|sblast|sbm|sbmodified|sbn|sbnext|sbp|sbprevious|sbr|sbrewind|sbuffer|scrip|scripte|scriptencoding|scriptnames|se|set|setf|setfiletype|setg|setglobal|setl|setlocal|sf|sfind|sfir|sfirst|sh|shell|sign|sil|silent|sim|simalt|sl|sla|slast|sleep|sm|smagic|smap|smapc|smapclear|sme|smenu|sn|snext|sni|sniff|sno|snomagic|snor|snoremap|snoreme|snoremenu|so|sor|sort|source|sp|spe|spelld|spelldump|spellgood|spelli|spellinfo|spellr|spellrepall|spellu|spellundo|spellw|spellwrong|split|spr|sprevious|sre|srewind|st|sta|stag|star|startg|startgreplace|startinsert|startr|startreplace|stj|stjump|stop|stopi|stopinsert|sts|stselect|sun|sunhide|sunm|sunmap|sus|suspend|sv|sview|syncbind|t|tN|tNext|ta|tab|tabN|tabNext|tabc|tabclose|tabd|tabdo|tabe|tabedit|tabf|tabfind|tabfir|tabfirst|tabl|tablast|tabm|tabmove|tabn|tabnew|tabnext|tabo|tabonly|tabp|tabprevious|tabr|tabrewind|tabs|tag|tags|tc|tcl|tcld|tcldo|tclf|tclfile|te|tearoff|tf|tfirst|th|throw|tj|tjump|tl|tlast|tm|tmenu|tn|tnext|to|topleft|tp|tprevious|tr|trewind|try|ts|tselect|tu|tunmenu|u|una|unabbreviate|undo|undoj|undojoin|undol|undolist|unh|unhide|unlet|unlo|unlockvar|unm|unmap|up|update|ve|verb|verbose|version|vert|vertical|vi|vie|view|vim|vimgrep|vimgrepa|vimgrepadd|visual|viu|viusage|vmapc|vmapclear|vne|vnew|vs|vsplit|vu|vunmap|w|wN|wNext|wa|wall|wh|while|win|winc|wincmd|windo|winp|winpos|winsize|wn|wnext|wp|wprevious|wq|wqa|wqall|write|ws|wsverb|wv|wviminfo|x|xa|xall|xit|xm|xmap|xmapc|xmapclear|xme|xmenu|xn|xnoremap|xnoreme|xnoremenu|xu|xunmap|y|yank)\b/,builtin:/\b(?:acd|ai|akm|aleph|allowrevins|altkeymap|ambiwidth|ambw|anti|antialias|arab|arabic|arabicshape|ari|arshape|autochdir|autocmd|autoindent|autoread|autowrite|autowriteall|aw|awa|background|backspace|backup|backupcopy|backupdir|backupext|backupskip|balloondelay|ballooneval|balloonexpr|bdir|bdlay|beval|bex|bexpr|bg|bh|bin|binary|biosk|bioskey|bk|bkc|bomb|breakat|brk|browsedir|bs|bsdir|bsk|bt|bufhidden|buflisted|buftype|casemap|ccv|cdpath|cedit|cfu|ch|charconvert|ci|cin|cindent|cink|cinkeys|cino|cinoptions|cinw|cinwords|clipboard|cmdheight|cmdwinheight|cmp|cms|columns|com|comments|commentstring|compatible|complete|completefunc|completeopt|consk|conskey|copyindent|cot|cpo|cpoptions|cpt|cscopepathcomp|cscopeprg|cscopequickfix|cscopetag|cscopetagorder|cscopeverbose|cspc|csprg|csqf|cst|csto|csverb|cuc|cul|cursorcolumn|cursorline|cwh|debug|deco|def|define|delcombine|dex|dg|dict|dictionary|diff|diffexpr|diffopt|digraph|dip|dir|directory|dy|ea|ead|eadirection|eb|ed|edcompatible|ef|efm|ei|ek|enc|encoding|endofline|eol|ep|equalalways|equalprg|errorbells|errorfile|errorformat|esckeys|et|eventignore|expandtab|exrc|fcl|fcs|fdc|fde|fdi|fdl|fdls|fdm|fdn|fdo|fdt|fen|fenc|fencs|fex|ff|ffs|fileencoding|fileencodings|fileformat|fileformats|fillchars|fk|fkmap|flp|fml|fmr|foldcolumn|foldenable|foldexpr|foldignore|foldlevel|foldlevelstart|foldmarker|foldmethod|foldminlines|foldnestmax|foldtext|formatexpr|formatlistpat|formatoptions|formatprg|fp|fs|fsync|ft|gcr|gd|gdefault|gfm|gfn|gfs|gfw|ghr|gp|grepformat|grepprg|gtl|gtt|guicursor|guifont|guifontset|guifontwide|guiheadroom|guioptions|guipty|guitablabel|guitabtooltip|helpfile|helpheight|helplang|hf|hh|hi|hidden|highlight|hk|hkmap|hkmapp|hkp|hl|hlg|hls|hlsearch|ic|icon|iconstring|ignorecase|im|imactivatekey|imak|imc|imcmdline|imd|imdisable|imi|iminsert|ims|imsearch|inc|include|includeexpr|incsearch|inde|indentexpr|indentkeys|indk|inex|inf|infercase|insertmode|invacd|invai|invakm|invallowrevins|invaltkeymap|invanti|invantialias|invar|invarab|invarabic|invarabicshape|invari|invarshape|invautochdir|invautoindent|invautoread|invautowrite|invautowriteall|invaw|invawa|invbackup|invballooneval|invbeval|invbin|invbinary|invbiosk|invbioskey|invbk|invbl|invbomb|invbuflisted|invcf|invci|invcin|invcindent|invcompatible|invconfirm|invconsk|invconskey|invcopyindent|invcp|invcscopetag|invcscopeverbose|invcst|invcsverb|invcuc|invcul|invcursorcolumn|invcursorline|invdeco|invdelcombine|invdg|invdiff|invdigraph|invdisable|invea|inveb|inved|invedcompatible|invek|invendofline|inveol|invequalalways|inverrorbells|invesckeys|invet|invex|invexpandtab|invexrc|invfen|invfk|invfkmap|invfoldenable|invgd|invgdefault|invguipty|invhid|invhidden|invhk|invhkmap|invhkmapp|invhkp|invhls|invhlsearch|invic|invicon|invignorecase|invim|invimc|invimcmdline|invimd|invincsearch|invinf|invinfercase|invinsertmode|invis|invjoinspaces|invjs|invlazyredraw|invlbr|invlinebreak|invlisp|invlist|invloadplugins|invlpl|invlz|invma|invmacatsui|invmagic|invmh|invml|invmod|invmodeline|invmodifiable|invmodified|invmore|invmousef|invmousefocus|invmousehide|invnu|invnumber|invodev|invopendevice|invpaste|invpi|invpreserveindent|invpreviewwindow|invprompt|invpvw|invreadonly|invremap|invrestorescreen|invrevins|invri|invrightleft|invrightleftcmd|invrl|invrlc|invro|invrs|invru|invruler|invsb|invsc|invscb|invscrollbind|invscs|invsecure|invsft|invshellslash|invshelltemp|invshiftround|invshortname|invshowcmd|invshowfulltag|invshowmatch|invshowmode|invsi|invsm|invsmartcase|invsmartindent|invsmarttab|invsmd|invsn|invsol|invspell|invsplitbelow|invsplitright|invspr|invsr|invssl|invsta|invstartofline|invstmp|invswapfile|invswf|invta|invtagbsearch|invtagrelative|invtagstack|invtbi|invtbidi|invtbs|invtermbidi|invterse|invtextauto|invtextmode|invtf|invtgst|invtildeop|invtimeout|invtitle|invto|invtop|invtr|invttimeout|invttybuiltin|invttyfast|invtx|invvb|invvisualbell|invwa|invwarn|invwb|invweirdinvert|invwfh|invwfw|invwildmenu|invwinfixheight|invwinfixwidth|invwiv|invwmnu|invwrap|invwrapscan|invwrite|invwriteany|invwritebackup|invws|isf|isfname|isi|isident|isk|iskeyword|isprint|joinspaces|js|key|keymap|keymodel|keywordprg|km|kmp|kp|langmap|langmenu|laststatus|lazyredraw|lbr|lcs|linebreak|lines|linespace|lisp|lispwords|listchars|loadplugins|lpl|lsp|lz|macatsui|magic|makeef|makeprg|matchpairs|matchtime|maxcombine|maxfuncdepth|maxmapdepth|maxmem|maxmempattern|maxmemtot|mco|mef|menuitems|mfd|mh|mis|mkspellmem|ml|mls|mm|mmd|mmp|mmt|modeline|modelines|modifiable|modified|more|mouse|mousef|mousefocus|mousehide|mousem|mousemodel|mouses|mouseshape|mouset|mousetime|mp|mps|msm|mzq|mzquantum|nf|noacd|noai|noakm|noallowrevins|noaltkeymap|noanti|noantialias|noar|noarab|noarabic|noarabicshape|noari|noarshape|noautochdir|noautoindent|noautoread|noautowrite|noautowriteall|noaw|noawa|nobackup|noballooneval|nobeval|nobin|nobinary|nobiosk|nobioskey|nobk|nobl|nobomb|nobuflisted|nocf|noci|nocin|nocindent|nocompatible|noconfirm|noconsk|noconskey|nocopyindent|nocp|nocscopetag|nocscopeverbose|nocst|nocsverb|nocuc|nocul|nocursorcolumn|nocursorline|nodeco|nodelcombine|nodg|nodiff|nodigraph|nodisable|noea|noeb|noed|noedcompatible|noek|noendofline|noeol|noequalalways|noerrorbells|noesckeys|noet|noex|noexpandtab|noexrc|nofen|nofk|nofkmap|nofoldenable|nogd|nogdefault|noguipty|nohid|nohidden|nohk|nohkmap|nohkmapp|nohkp|nohls|noic|noicon|noignorecase|noim|noimc|noimcmdline|noimd|noincsearch|noinf|noinfercase|noinsertmode|nois|nojoinspaces|nojs|nolazyredraw|nolbr|nolinebreak|nolisp|nolist|noloadplugins|nolpl|nolz|noma|nomacatsui|nomagic|nomh|noml|nomod|nomodeline|nomodifiable|nomodified|nomore|nomousef|nomousefocus|nomousehide|nonu|nonumber|noodev|noopendevice|nopaste|nopi|nopreserveindent|nopreviewwindow|noprompt|nopvw|noreadonly|noremap|norestorescreen|norevins|nori|norightleft|norightleftcmd|norl|norlc|noro|nors|noru|noruler|nosb|nosc|noscb|noscrollbind|noscs|nosecure|nosft|noshellslash|noshelltemp|noshiftround|noshortname|noshowcmd|noshowfulltag|noshowmatch|noshowmode|nosi|nosm|nosmartcase|nosmartindent|nosmarttab|nosmd|nosn|nosol|nospell|nosplitbelow|nosplitright|nospr|nosr|nossl|nosta|nostartofline|nostmp|noswapfile|noswf|nota|notagbsearch|notagrelative|notagstack|notbi|notbidi|notbs|notermbidi|noterse|notextauto|notextmode|notf|notgst|notildeop|notimeout|notitle|noto|notop|notr|nottimeout|nottybuiltin|nottyfast|notx|novb|novisualbell|nowa|nowarn|nowb|noweirdinvert|nowfh|nowfw|nowildmenu|nowinfixheight|nowinfixwidth|nowiv|nowmnu|nowrap|nowrapscan|nowrite|nowriteany|nowritebackup|nows|nrformats|numberwidth|nuw|odev|oft|ofu|omnifunc|opendevice|operatorfunc|opfunc|osfiletype|pa|para|paragraphs|paste|pastetoggle|patchexpr|patchmode|path|pdev|penc|pex|pexpr|pfn|ph|pheader|pi|pm|pmbcs|pmbfn|popt|preserveindent|previewheight|previewwindow|printdevice|printencoding|printexpr|printfont|printheader|printmbcharset|printmbfont|printoptions|prompt|pt|pumheight|pvh|pvw|qe|quoteescape|readonly|remap|report|restorescreen|revins|rightleft|rightleftcmd|rl|rlc|ro|rs|rtp|ruf|ruler|rulerformat|runtimepath|sbo|sc|scb|scr|scroll|scrollbind|scrolljump|scrolloff|scrollopt|scs|sect|sections|secure|sel|selection|selectmode|sessionoptions|sft|shcf|shellcmdflag|shellpipe|shellquote|shellredir|shellslash|shelltemp|shelltype|shellxquote|shiftround|shiftwidth|shm|shortmess|shortname|showbreak|showcmd|showfulltag|showmatch|showmode|showtabline|shq|si|sidescroll|sidescrolloff|siso|sj|slm|smartcase|smartindent|smarttab|smc|smd|softtabstop|sol|spc|spell|spellcapcheck|spellfile|spelllang|spellsuggest|spf|spl|splitbelow|splitright|sps|sr|srr|ss|ssl|ssop|stal|startofline|statusline|stl|stmp|su|sua|suffixes|suffixesadd|sw|swapfile|swapsync|swb|swf|switchbuf|sws|sxq|syn|synmaxcol|syntax|t_AB|t_AF|t_AL|t_CS|t_CV|t_Ce|t_Co|t_Cs|t_DL|t_EI|t_F1|t_F2|t_F3|t_F4|t_F5|t_F6|t_F7|t_F8|t_F9|t_IE|t_IS|t_K1|t_K3|t_K4|t_K5|t_K6|t_K7|t_K8|t_K9|t_KA|t_KB|t_KC|t_KD|t_KE|t_KF|t_KG|t_KH|t_KI|t_KJ|t_KK|t_KL|t_RI|t_RV|t_SI|t_Sb|t_Sf|t_WP|t_WS|t_ZH|t_ZR|t_al|t_bc|t_cd|t_ce|t_cl|t_cm|t_cs|t_da|t_db|t_dl|t_fs|t_k1|t_k2|t_k3|t_k4|t_k5|t_k6|t_k7|t_k8|t_k9|t_kB|t_kD|t_kI|t_kN|t_kP|t_kb|t_kd|t_ke|t_kh|t_kl|t_kr|t_ks|t_ku|t_le|t_mb|t_md|t_me|t_mr|t_ms|t_nd|t_op|t_se|t_so|t_sr|t_te|t_ti|t_ts|t_ue|t_us|t_ut|t_vb|t_ve|t_vi|t_vs|t_xs|tabline|tabpagemax|tabstop|tagbsearch|taglength|tagrelative|tagstack|tal|tb|tbi|tbidi|tbis|tbs|tenc|term|termbidi|termencoding|terse|textauto|textmode|textwidth|tgst|thesaurus|tildeop|timeout|timeoutlen|title|titlelen|titleold|titlestring|toolbar|toolbariconsize|top|tpm|tsl|tsr|ttimeout|ttimeoutlen|ttm|tty|ttybuiltin|ttyfast|ttym|ttymouse|ttyscroll|ttytype|tw|tx|uc|ul|undolevels|updatecount|updatetime|ut|vb|vbs|vdir|verbosefile|vfile|viewdir|viewoptions|viminfo|virtualedit|visualbell|vop|wak|warn|wb|wc|wcm|wd|weirdinvert|wfh|wfw|whichwrap|wi|wig|wildchar|wildcharm|wildignore|wildmenu|wildmode|wildoptions|wim|winaltkeys|window|winfixheight|winfixwidth|winheight|winminheight|winminwidth|winwidth|wiv|wiw|wm|wmh|wmnu|wmw|wop|wrap|wrapmargin|wrapscan|writeany|writebackup|writedelay|ww)\b/,number:/\b(?:0x[\da-f]+|\d+(?:\.\d+)?)\b/i,operator:/\|\||&&|[-+.]=?|[=!](?:[=~][#?]?)?|[<>]=?[#?]?|[*\/%?]|\b(?:is(?:not)?)\b/,punctuation:/[{}[\](),;:]/}}return Rde}var kde,w7e;function nwr(){if(w7e)return kde;w7e=1,kde=t,t.displayName="visualBasic",t.aliases=[];function t(e){e.languages["visual-basic"]={comment:{pattern:/(?:['‘’]|REM\b)(?:[^\r\n_]|_(?:\r\n?|\n)?)*/i,inside:{keyword:/^REM/i}},directive:{pattern:/#(?:Const|Else|ElseIf|End|ExternalChecksum|ExternalSource|If|Region)(?:\b_[ \t]*(?:\r\n?|\n)|.)+/i,alias:"property",greedy:!0},string:{pattern:/\$?["“”](?:["“”]{2}|[^"“”])*["“”]C?/i,greedy:!0},date:{pattern:/#[ \t]*(?:\d+([/-])\d+\1\d+(?:[ \t]+(?:\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?))?|\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?)[ \t]*#/i,alias:"number"},number:/(?:(?:\b\d+(?:\.\d+)?|\.\d+)(?:E[+-]?\d+)?|&[HO][\dA-F]+)(?:[FRD]|U?[ILS])?/i,boolean:/\b(?:False|Nothing|True)\b/i,keyword:/\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Currency|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|Type|TypeOf|U(?:Integer|Long|Short)|Until|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Xor)\b/i,operator:/[+\-*/\\^<=>&#@$%!]|\b_(?=[ \t]*[\r\n])/,punctuation:/[{}().,:?]/},e.languages.vb=e.languages["visual-basic"],e.languages.vba=e.languages["visual-basic"]}return kde}var Ide,S7e;function iwr(){if(S7e)return Ide;S7e=1,Ide=t,t.displayName="warpscript",t.aliases=[];function t(e){e.languages.warpscript={comment:/#.*|\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'|<'(?:[^\\']|'(?!>)|\\.)*'>/,greedy:!0},variable:/\$\S+/,macro:{pattern:/@\S+/,alias:"property"},keyword:/\b(?:BREAK|CHECKMACRO|CONTINUE|CUDF|DEFINED|DEFINEDMACRO|EVAL|FAIL|FOR|FOREACH|FORSTEP|IFT|IFTE|MSGFAIL|NRETURN|RETHROW|RETURN|SWITCH|TRY|UDF|UNTIL|WHILE)\b/,number:/[+-]?\b(?:NaN|Infinity|\d+(?:\.\d*)?(?:[Ee][+-]?\d+)?|0x[\da-fA-F]+|0b[01]+)\b/,boolean:/\b(?:F|T|false|true)\b/,punctuation:/<%|%>|[{}[\]()]/,operator:/==|&&?|\|\|?|\*\*?|>>>?|<<|[<>!~]=?|[-/%^]|\+!?|\b(?:AND|NOT|OR)\b/}}return Ide}var Pde,T7e;function awr(){if(T7e)return Pde;T7e=1,Pde=t,t.displayName="wasm",t.aliases=[];function t(e){e.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/}}return Pde}var Dde,E7e;function owr(){if(E7e)return Dde;E7e=1,Dde=t,t.displayName="webIdl",t.aliases=[];function t(e){(function(r){var n=/(?:\B-|\b_|\b)[A-Za-z][\w-]*(?![\w-])/.source,i="(?:"+/\b(?:unsigned\s+)?long\s+long(?![\w-])/.source+"|"+/\b(?:unrestricted|unsigned)\s+[a-z]+(?![\w-])/.source+"|"+/(?!(?:unrestricted|unsigned)\b)/.source+n+/(?:\s*<(?:[^<>]|<[^<>]*>)*>)?/.source+")"+/(?:\s*\?)?/.source,a={};r.languages["web-idl"]={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},string:{pattern:/"[^"]*"/,greedy:!0},namespace:{pattern:RegExp(/(\bnamespace\s+)/.source+n),lookbehind:!0},"class-name":[{pattern:/(^|[^\w-])(?:iterable|maplike|setlike)\s*<(?:[^<>]|<[^<>]*>)*>/,lookbehind:!0,inside:a},{pattern:RegExp(/(\b(?:attribute|const|deleter|getter|optional|setter)\s+)/.source+i),lookbehind:!0,inside:a},{pattern:RegExp("("+/\bcallback\s+/.source+n+/\s*=\s*/.source+")"+i),lookbehind:!0,inside:a},{pattern:RegExp(/(\btypedef\b\s*)/.source+i),lookbehind:!0,inside:a},{pattern:RegExp(/(\b(?:callback|dictionary|enum|interface(?:\s+mixin)?)\s+)(?!(?:interface|mixin)\b)/.source+n),lookbehind:!0},{pattern:RegExp(/(:\s*)/.source+n),lookbehind:!0},RegExp(n+/(?=\s+(?:implements|includes)\b)/.source),{pattern:RegExp(/(\b(?:implements|includes)\s+)/.source+n),lookbehind:!0},{pattern:RegExp(i+"(?="+/\s*(?:\.{3}\s*)?/.source+n+/\s*[(),;=]/.source+")"),inside:a}],builtin:/\b(?:ArrayBuffer|BigInt64Array|BigUint64Array|ByteString|DOMString|DataView|Float32Array|Float64Array|FrozenArray|Int16Array|Int32Array|Int8Array|ObservableArray|Promise|USVString|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray)\b/,keyword:[/\b(?:async|attribute|callback|const|constructor|deleter|dictionary|enum|getter|implements|includes|inherit|interface|mixin|namespace|null|optional|or|partial|readonly|required|setter|static|stringifier|typedef|unrestricted)\b/,/\b(?:any|bigint|boolean|byte|double|float|iterable|long|maplike|object|octet|record|sequence|setlike|short|symbol|undefined|unsigned|void)\b/],boolean:/\b(?:false|true)\b/,number:{pattern:/(^|[^\w-])-?(?:0x[0-9a-f]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|NaN|Infinity)(?![\w-])/i,lookbehind:!0},operator:/\.{3}|[=:?<>-]/,punctuation:/[(){}[\].,;]/};for(var o in r.languages["web-idl"])o!=="class-name"&&(a[o]=r.languages["web-idl"][o]);r.languages.webidl=r.languages["web-idl"]})(e)}return Dde}var Lde,A7e;function swr(){if(A7e)return Lde;A7e=1,Lde=t,t.displayName="wiki",t.aliases=[];function t(e){e.languages.wiki=e.languages.extend("markup",{"block-comment":{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0,alias:"comment"},heading:{pattern:/^(=+)[^=\r\n].*?\1/m,inside:{punctuation:/^=+|=+$/,important:/.+/}},emphasis:{pattern:/('{2,5}).+?\1/,inside:{"bold-italic":{pattern:/(''''').+?(?=\1)/,lookbehind:!0,alias:["bold","italic"]},bold:{pattern:/(''')[^'](?:.*?[^'])?(?=\1)/,lookbehind:!0},italic:{pattern:/('')[^'](?:.*?[^'])?(?=\1)/,lookbehind:!0},punctuation:/^''+|''+$/}},hr:{pattern:/^-{4,}/m,alias:"punctuation"},url:[/ISBN +(?:97[89][ -]?)?(?:\d[ -]?){9}[\dx]\b|(?:PMID|RFC) +\d+/i,/\[\[.+?\]\]|\[.+?\]/],variable:[/__[A-Z]+__/,/\{{3}.+?\}{3}/,/\{\{.+?\}\}/],symbol:[/^#redirect/im,/~{3,5}/],"table-tag":{pattern:/((?:^|[|!])[|!])[^|\r\n]+\|(?!\|)/m,lookbehind:!0,inside:{"table-bar":{pattern:/\|$/,alias:"punctuation"},rest:e.languages.markup.tag.inside}},punctuation:/^(?:\{\||\|\}|\|-|[*#:;!|])|\|\||!!/m}),e.languages.insertBefore("wiki","tag",{nowiki:{pattern:/<(nowiki|pre|source)\b[^>]*>[\s\S]*?<\/\1>/i,inside:{tag:{pattern:/<(?:nowiki|pre|source)\b[^>]*>|<\/(?:nowiki|pre|source)>/i,inside:e.languages.markup.tag.inside}}}})}return Lde}var Ode,C7e;function lwr(){if(C7e)return Ode;C7e=1,Ode=t,t.displayName="wolfram",t.aliases=["mathematica","wl","nb"];function t(e){e.languages.wolfram={comment:/\(\*(?:\(\*(?:[^*]|\*(?!\)))*\*\)|(?!\(\*)[\s\S])*?\*\)/,string:{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:Abs|AbsArg|Accuracy|Block|Do|For|Function|If|Manipulate|Module|Nest|NestList|None|Return|Switch|Table|Which|While)\b/,context:{pattern:/\b\w+`+\w*/,alias:"class-name"},blank:{pattern:/\b\w+_\b/,alias:"regex"},"global-variable":{pattern:/\$\w+/,alias:"variable"},boolean:/\b(?:False|True)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/\/\.|;|=\.|\^=|\^:=|:=|<<|>>|<\||\|>|:>|\|->|->|<-|@@@|@@|@|\/@|=!=|===|==|=|\+|-|\^|\[\/-+%=\]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},e.languages.mathematica=e.languages.wolfram,e.languages.wl=e.languages.wolfram,e.languages.nb=e.languages.wolfram}return Ode}var Nde,M7e;function uwr(){if(M7e)return Nde;M7e=1,Nde=t,t.displayName="wren",t.aliases=[];function t(e){e.languages.wren={comment:[{pattern:/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|\/\*(?:[^*/]|\*(?!\/)|\/(?!\*))*\*\/)*\*\/)*\*\//,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],"triple-quoted-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},"string-literal":null,hashbang:{pattern:/^#!\/.+/,greedy:!0,alias:"comment"},attribute:{pattern:/#!?[ \t\u3000]*\w+/,alias:"keyword"},"class-name":[{pattern:/(\bclass\s+)\w+/,lookbehind:!0},/\b[A-Z][a-z\d_]*\b/],constant:/\b[A-Z][A-Z\d_]*\b/,null:{pattern:/\bnull\b/,alias:"keyword"},keyword:/\b(?:as|break|class|construct|continue|else|for|foreign|if|import|in|is|return|static|super|this|var|while)\b/,boolean:/\b(?:false|true)\b/,number:/\b(?:0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,function:/\b[a-z_]\w*(?=\s*[({])/i,operator:/<<|>>|[=!<>]=?|&&|\|\||[-+*/%~^&|?:]|\.{2,3}/,punctuation:/[\[\](){}.,;]/},e.languages.wren["string-literal"]={pattern:/(^|[^\\"])"(?:[^\\"%]|\\[\s\S]|%(?!\()|%\((?:[^()]|\((?:[^()]|\([^)]*\))*\))*\))*"/,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)%\((?:[^()]|\((?:[^()]|\([^)]*\))*\))*\)/,lookbehind:!0,inside:{expression:{pattern:/^(%\()[\s\S]+(?=\)$)/,lookbehind:!0,inside:e.languages.wren},"interpolation-punctuation":{pattern:/^%\(|\)$/,alias:"punctuation"}}},string:/[\s\S]+/}}}return Nde}var Fde,R7e;function cwr(){if(R7e)return Fde;R7e=1,Fde=t,t.displayName="xeora",t.aliases=["xeoracube"];function t(e){(function(r){r.languages.xeora=r.languages.extend("markup",{constant:{pattern:/\$(?:DomainContents|PageRenderDuration)\$/,inside:{punctuation:{pattern:/\$/}}},variable:{pattern:/\$@?(?:#+|[-+*~=^])?[\w.]+\$/,inside:{punctuation:{pattern:/[$.]/},operator:{pattern:/#+|[-+*~=^@]/}}},"function-inline":{pattern:/\$F:[-\w.]+\?[-\w.]+(?:,(?:(?:@[-#]*\w+\.[\w+.]\.*)*\|)*(?:(?:[\w+]|[-#*.~^]+[\w+]|=\S)(?:[^$=]|=+[^=])*=*|(?:@[-#]*\w+\.[\w+.]\.*)+(?:(?:[\w+]|[-#*~^][-#*.~^]*[\w+]|=\S)(?:[^$=]|=+[^=])*=*)?)?)?\$/,inside:{variable:{pattern:/(?:[,|])@?(?:#+|[-+*~=^])?[\w.]+/,inside:{punctuation:{pattern:/[,.|]/},operator:{pattern:/#+|[-+*~=^@]/}}},punctuation:{pattern:/\$\w:|[$:?.,|]/}},alias:"function"},"function-block":{pattern:/\$XF:\{[-\w.]+\?[-\w.]+(?:,(?:(?:@[-#]*\w+\.[\w+.]\.*)*\|)*(?:(?:[\w+]|[-#*.~^]+[\w+]|=\S)(?:[^$=]|=+[^=])*=*|(?:@[-#]*\w+\.[\w+.]\.*)+(?:(?:[\w+]|[-#*~^][-#*.~^]*[\w+]|=\S)(?:[^$=]|=+[^=])*=*)?)?)?\}:XF\$/,inside:{punctuation:{pattern:/[$:{}?.,|]/}},alias:"function"},"directive-inline":{pattern:/\$\w(?:#\d+\+?)?(?:\[[-\w.]+\])?:[-\/\w.]+\$/,inside:{punctuation:{pattern:/\$(?:\w:|C(?:\[|#\d))?|[:{[\]]/,inside:{tag:{pattern:/#\d/}}}},alias:"function"},"directive-block-open":{pattern:/\$\w+:\{|\$\w(?:#\d+\+?)?(?:\[[-\w.]+\])?:[-\w.]+:\{(?:![A-Z]+)?/,inside:{punctuation:{pattern:/\$(?:\w:|C(?:\[|#\d))?|[:{[\]]/,inside:{tag:{pattern:/#\d/}}},attribute:{pattern:/![A-Z]+$/,inside:{punctuation:{pattern:/!/}},alias:"keyword"}},alias:"function"},"directive-block-separator":{pattern:/\}:[-\w.]+:\{/,inside:{punctuation:{pattern:/[:{}]/}},alias:"function"},"directive-block-close":{pattern:/\}:[-\w.]+\$/,inside:{punctuation:{pattern:/[:{}$]/}},alias:"function"}}),r.languages.insertBefore("inside","punctuation",{variable:r.languages.xeora["function-inline"].inside.variable},r.languages.xeora["function-block"]),r.languages.xeoracube=r.languages.xeora})(e)}return Fde}var zde,k7e;function fwr(){if(k7e)return zde;k7e=1,zde=t,t.displayName="xmlDoc",t.aliases=[];function t(e){(function(r){function n(s,d){r.languages[s]&&r.languages.insertBefore(s,"comment",{"doc-comment":d})}var i=r.languages.markup.tag,a={pattern:/\/\/\/.*/,greedy:!0,alias:"comment",inside:{tag:i}},o={pattern:/'''.*/,greedy:!0,alias:"comment",inside:{tag:i}};n("csharp",a),n("fsharp",a),n("vbnet",o)})(e)}return zde}var Bde,I7e;function dwr(){if(I7e)return Bde;I7e=1,Bde=t,t.displayName="xojo",t.aliases=[];function t(e){e.languages.xojo={comment:{pattern:/(?:'|\/\/|Rem\b).+/i,greedy:!0},string:{pattern:/"(?:""|[^"])*"/,greedy:!0},number:[/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,/&[bchou][a-z\d]+/i],directive:{pattern:/#(?:Else|ElseIf|Endif|If|Pragma)\b/i,alias:"property"},keyword:/\b(?:AddHandler|App|Array|As(?:signs)?|Auto|Boolean|Break|By(?:Ref|Val)|Byte|Call|Case|Catch|CFStringRef|CGFloat|Class|Color|Const|Continue|CString|Currency|CurrentMethodName|Declare|Delegate|Dim|Do(?:uble|wnTo)?|Each|Else(?:If)?|End|Enumeration|Event|Exception|Exit|Extends|False|Finally|For|Function|Get|GetTypeInfo|Global|GOTO|If|Implements|In|Inherits|Int(?:8|16|32|64|eger|erface)?|Lib|Loop|Me|Module|Next|Nil|Object|Optional|OSType|ParamArray|Private|Property|Protected|PString|Ptr|Raise(?:Event)?|ReDim|RemoveHandler|Return|Select(?:or)?|Self|Set|Shared|Short|Single|Soft|Static|Step|String|Sub|Super|Text|Then|To|True|Try|Ubound|UInt(?:8|16|32|64|eger)?|Until|Using|Var(?:iant)?|Wend|While|WindowPtr|WString)\b/i,operator:/<[=>]?|>=?|[+\-*\/\\^=]|\b(?:AddressOf|And|Ctype|IsA?|Mod|New|Not|Or|WeakAddressOf|Xor)\b/i,punctuation:/[.,;:()]/}}return Bde}var Ude,P7e;function hwr(){if(P7e)return Ude;P7e=1,Ude=t,t.displayName="xquery",t.aliases=[];function t(e){(function(r){r.languages.xquery=r.languages.extend("markup",{"xquery-comment":{pattern:/\(:[\s\S]*?:\)/,greedy:!0,alias:"comment"},string:{pattern:/(["'])(?:\1\1|(?!\1)[\s\S])*\1/,greedy:!0},extension:{pattern:/\(#.+?#\)/,alias:"symbol"},variable:/\$[-\w:]+/,axis:{pattern:/(^|[^-])(?:ancestor(?:-or-self)?|attribute|child|descendant(?:-or-self)?|following(?:-sibling)?|parent|preceding(?:-sibling)?|self)(?=::)/,lookbehind:!0,alias:"operator"},"keyword-operator":{pattern:/(^|[^:-])\b(?:and|castable as|div|eq|except|ge|gt|idiv|instance of|intersect|is|le|lt|mod|ne|or|union)\b(?=$|[^:-])/,lookbehind:!0,alias:"operator"},keyword:{pattern:/(^|[^:-])\b(?:as|ascending|at|base-uri|boundary-space|case|cast as|collation|construction|copy-namespaces|declare|default|descending|else|empty (?:greatest|least)|encoding|every|external|for|function|if|import|in|inherit|lax|let|map|module|namespace|no-inherit|no-preserve|option|order(?: by|ed|ing)?|preserve|return|satisfies|schema|some|stable|strict|strip|then|to|treat as|typeswitch|unordered|validate|variable|version|where|xquery)\b(?=$|[^:-])/,lookbehind:!0},function:/[\w-]+(?::[\w-]+)*(?=\s*\()/,"xquery-element":{pattern:/(element\s+)[\w-]+(?::[\w-]+)*/,lookbehind:!0,alias:"tag"},"xquery-attribute":{pattern:/(attribute\s+)[\w-]+(?::[\w-]+)*/,lookbehind:!0,alias:"attr-name"},builtin:{pattern:/(^|[^:-])\b(?:attribute|comment|document|element|processing-instruction|text|xs:(?:ENTITIES|ENTITY|ID|IDREFS?|NCName|NMTOKENS?|NOTATION|Name|QName|anyAtomicType|anyType|anyURI|base64Binary|boolean|byte|date|dateTime|dayTimeDuration|decimal|double|duration|float|gDay|gMonth|gMonthDay|gYear|gYearMonth|hexBinary|int|integer|language|long|negativeInteger|nonNegativeInteger|nonPositiveInteger|normalizedString|positiveInteger|short|string|time|token|unsigned(?:Byte|Int|Long|Short)|untyped(?:Atomic)?|yearMonthDuration))\b(?=$|[^:-])/,lookbehind:!0},number:/\b\d+(?:\.\d+)?(?:E[+-]?\d+)?/,operator:[/[+*=?|@]|\.\.?|:=|!=|<[=<]?|>[=>]?/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}],punctuation:/[[\](){},;:/]/}),r.languages.xquery.tag.pattern=/<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/,r.languages.xquery.tag.inside["attr-value"].pattern=/=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+)/,r.languages.xquery.tag.inside["attr-value"].inside.punctuation=/^="|"$/,r.languages.xquery.tag.inside["attr-value"].inside.expression={pattern:/\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}/,inside:r.languages.xquery,alias:"language-xquery"};var n=function(a){return typeof a=="string"?a:typeof a.content=="string"?a.content:a.content.map(n).join("")},i=function(a){for(var o=[],s=0;s<a.length;s++){var d=a[s],b=!1;if(typeof d!="string"&&(d.type==="tag"&&d.content[0]&&d.content[0].type==="tag"?d.content[0].content[0].content==="</"?o.length>0&&o[o.length-1].tagName===n(d.content[0].content[1])&&o.pop():d.content[d.content.length-1].content==="/>"||o.push({tagName:n(d.content[0].content[1]),openedBraces:0}):o.length>0&&d.type==="punctuation"&&d.content==="{"&&(!a[s+1]||a[s+1].type!=="punctuation"||a[s+1].content!=="{")&&(!a[s-1]||a[s-1].type!=="plain-text"||a[s-1].content!=="{")?o[o.length-1].openedBraces++:o.length>0&&o[o.length-1].openedBraces>0&&d.type==="punctuation"&&d.content==="}"?o[o.length-1].openedBraces--:d.type!=="comment"&&(b=!0)),(b||typeof d=="string")&&o.length>0&&o[o.length-1].openedBraces===0){var L=n(d);s<a.length-1&&(typeof a[s+1]=="string"||a[s+1].type==="plain-text")&&(L+=n(a[s+1]),a.splice(s+1,1)),s>0&&(typeof a[s-1]=="string"||a[s-1].type==="plain-text")&&(L=n(a[s-1])+L,a.splice(s-1,1),s--),/^\s+$/.test(L)?a[s]=L:a[s]=new r.Token("plain-text",L,null,L)}d.content&&typeof d.content!="string"&&i(d.content)}};r.hooks.add("after-tokenize",function(a){a.language==="xquery"&&i(a.tokens)})})(e)}return Ude}var Hde,D7e;function pwr(){if(D7e)return Hde;D7e=1,Hde=t,t.displayName="yang",t.aliases=[];function t(e){e.languages.yang={comment:/\/\*[\s\S]*?\*\/|\/\/.*/,string:{pattern:/"(?:[^\\"]|\\.)*"|'[^']*'/,greedy:!0},keyword:{pattern:/(^|[{};\r\n][ \t]*)[a-z_][\w.-]*/i,lookbehind:!0},namespace:{pattern:/(\s)[a-z_][\w.-]*(?=:)/i,lookbehind:!0},boolean:/\b(?:false|true)\b/,operator:/\+/,punctuation:/[{};:]/}}return Hde}var jde,L7e;function vwr(){if(L7e)return jde;L7e=1,jde=t,t.displayName="zig",t.aliases=[];function t(e){(function(r){function n(L){return function(){return L}}var i=/\b(?:align|allowzero|and|anyframe|anytype|asm|async|await|break|cancel|catch|comptime|const|continue|defer|else|enum|errdefer|error|export|extern|fn|for|if|inline|linksection|nakedcc|noalias|nosuspend|null|or|orelse|packed|promise|pub|resume|return|stdcallcc|struct|suspend|switch|test|threadlocal|try|undefined|union|unreachable|usingnamespace|var|volatile|while)\b/,a="\\b(?!"+i.source+")(?!\\d)\\w+\\b",o=/align\s*\((?:[^()]|\([^()]*\))*\)/.source,s=/(?:\?|\bpromise->|(?:\[[^[\]]*\]|\*(?!\*)|\*\*)(?:\s*<ALIGN>|\s*const\b|\s*volatile\b|\s*allowzero\b)*)/.source.replace(/<ALIGN>/g,n(o)),d=/(?:\bpromise\b|(?:\berror\.)?<ID>(?:\.<ID>)*(?!\s+<ID>))/.source.replace(/<ID>/g,n(a)),b="(?!\\s)(?:!?\\s*(?:"+s+"\\s*)*"+d+")+";r.languages.zig={comment:[{pattern:/\/\/[/!].*/,alias:"doc-comment"},/\/{2}.*/],string:[{pattern:/(^|[^\\@])c?"(?:[^"\\\r\n]|\\.)*"/,lookbehind:!0,greedy:!0},{pattern:/([\r\n])([ \t]+c?\\{2}).*(?:(?:\r\n?|\n)\2.*)*/,lookbehind:!0,greedy:!0}],char:{pattern:/(^|[^\\])'(?:[^'\\\r\n]|[\uD800-\uDFFF]{2}|\\(?:.|x[a-fA-F\d]{2}|u\{[a-fA-F\d]{1,6}\}))'/,lookbehind:!0,greedy:!0},builtin:/\B@(?!\d)\w+(?=\s*\()/,label:{pattern:/(\b(?:break|continue)\s*:\s*)\w+\b|\b(?!\d)\w+\b(?=\s*:\s*(?:\{|while\b))/,lookbehind:!0},"class-name":[/\b(?!\d)\w+(?=\s*=\s*(?:(?:extern|packed)\s+)?(?:enum|struct|union)\s*[({])/,{pattern:RegExp(/(:\s*)<TYPE>(?=\s*(?:<ALIGN>\s*)?[=;,)])|<TYPE>(?=\s*(?:<ALIGN>\s*)?\{)/.source.replace(/<TYPE>/g,n(b)).replace(/<ALIGN>/g,n(o))),lookbehind:!0,inside:null},{pattern:RegExp(/(\)\s*)<TYPE>(?=\s*(?:<ALIGN>\s*)?;)/.source.replace(/<TYPE>/g,n(b)).replace(/<ALIGN>/g,n(o))),lookbehind:!0,inside:null}],"builtin-type":{pattern:/\b(?:anyerror|bool|c_u?(?:int|long|longlong|short)|c_longdouble|c_void|comptime_(?:float|int)|f(?:16|32|64|128)|[iu](?:8|16|32|64|128|size)|noreturn|type|void)\b/,alias:"keyword"},keyword:i,function:/\b(?!\d)\w+(?=\s*\()/,number:/\b(?:0b[01]+|0o[0-7]+|0x[a-fA-F\d]+(?:\.[a-fA-F\d]*)?(?:[pP][+-]?[a-fA-F\d]+)?|\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)\b/,boolean:/\b(?:false|true)\b/,operator:/\.[*?]|\.{2,3}|[-=]>|\*\*|\+\+|\|\||(?:<<|>>|[-+*]%|[-+*/%^&|<>!=])=?|[?~]/,punctuation:/[.:,;(){}[\]]/},r.languages.zig["class-name"].forEach(function(L){L.inside===null&&(L.inside=r.languages.zig)})})(e)}return jde}var Vde,O7e;function mwr(){if(O7e)return Vde;O7e=1;var t=Pyr();return Vde=t,t.register(Lyr()),t.register(Oyr()),t.register(Nyr()),t.register(Fyr()),t.register(zyr()),t.register(Byr()),t.register(Uyr()),t.register(Hyr()),t.register(jyr()),t.register(Vyr()),t.register(qyr()),t.register(Gyr()),t.register($yr()),t.register(Wyr()),t.register(Yyr()),t.register(Xyr()),t.register(Zyr()),t.register(Kyr()),t.register(Jyr()),t.register(Qyr()),t.register(e1r()),t.register(t1r()),t.register(aKe()),t.register(oKe()),t.register(r1r()),t.register(n1r()),t.register(i1r()),t.register(a1r()),t.register(o1r()),t.register(s1r()),t.register(l1r()),t.register(u1r()),t.register(c1r()),t.register(f1r()),t.register(c6()),t.register(d1r()),t.register(h1r()),t.register(p1r()),t.register(v1r()),t.register(m1r()),t.register(g1r()),t.register(y1r()),t.register(b1r()),t.register(x1r()),t.register(dbe()),t.register(_1r()),t.register(OZ()),t.register(w1r()),t.register(S1r()),t.register(T1r()),t.register(E1r()),t.register(A1r()),t.register(C1r()),t.register(M1r()),t.register(R1r()),t.register(k1r()),t.register(I1r()),t.register(P1r()),t.register(D1r()),t.register(L1r()),t.register(O1r()),t.register(N1r()),t.register(F1r()),t.register(z1r()),t.register(B1r()),t.register(U1r()),t.register(H1r()),t.register(j1r()),t.register(V1r()),t.register(q1r()),t.register(G1r()),t.register($1r()),t.register(W1r()),t.register(Y1r()),t.register(X1r()),t.register(Z1r()),t.register(K1r()),t.register(J1r()),t.register(Q1r()),t.register(ebr()),t.register(tbr()),t.register(rbr()),t.register(nbr()),t.register(ibr()),t.register(abr()),t.register(obr()),t.register(sbr()),t.register(lbr()),t.register(ubr()),t.register(cbr()),t.register(fbr()),t.register(dbr()),t.register(hbr()),t.register(pbr()),t.register(hbe()),t.register(vbr()),t.register(mbr()),t.register(gbr()),t.register(ybr()),t.register(bbr()),t.register(xbr()),t.register(_br()),t.register(wbr()),t.register(Sbr()),t.register(Tbr()),t.register(Ebr()),t.register(Abr()),t.register(Cbr()),t.register(Mbr()),t.register(Rbr()),t.register(kbr()),t.register(Ibr()),t.register(pbe()),t.register(Pbr()),t.register(FZ()),t.register(Dbr()),t.register(Lbr()),t.register(Obr()),t.register(Nbr()),t.register(Fbr()),t.register(zbr()),t.register(Bbr()),t.register(mbe()),t.register(Ubr()),t.register(Hbr()),t.register(jbr()),t.register(lKe()),t.register(Vbr()),t.register(qbr()),t.register(Gbr()),t.register($br()),t.register(Wbr()),t.register(Ybr()),t.register(Xbr()),t.register(Zbr()),t.register(Kbr()),t.register(Jbr()),t.register(Qbr()),t.register(exr()),t.register(txr()),t.register(rxr()),t.register(nxr()),t.register(ixr()),t.register(sKe()),t.register(axr()),t.register(oxr()),t.register(sxr()),t.register(iT()),t.register(lxr()),t.register(uxr()),t.register(cxr()),t.register(fxr()),t.register(dxr()),t.register(hxr()),t.register(pxr()),t.register(vxr()),t.register(mxr()),t.register(gxr()),t.register(yxr()),t.register(bxr()),t.register(xxr()),t.register(_xr()),t.register(wxr()),t.register(Sxr()),t.register(Txr()),t.register(Exr()),t.register(Axr()),t.register(Cxr()),t.register(Mxr()),t.register(Rxr()),t.register(kxr()),t.register(Ixr()),t.register(Pxr()),t.register(Dxr()),t.register(Lxr()),t.register(Oxr()),t.register(Nxr()),t.register(Fxr()),t.register(zxr()),t.register(Bxr()),t.register(zZ()),t.register(Uxr()),t.register(Hxr()),t.register(jxr()),t.register(Vxr()),t.register(qxr()),t.register(Gxr()),t.register($xr()),t.register(Wxr()),t.register(Yxr()),t.register(Xxr()),t.register(Zxr()),t.register(Kxr()),t.register(Jxr()),t.register(Qxr()),t.register(e_r()),t.register(t_r()),t.register(r_r()),t.register(n_r()),t.register(i_r()),t.register(a_r()),t.register(o_r()),t.register(s_r()),t.register(l_r()),t.register(u_r()),t.register(c_r()),t.register(f_r()),t.register(d_r()),t.register(h_r()),t.register(p_r()),t.register(v_r()),t.register(NZ()),t.register(m_r()),t.register(g_r()),t.register(y_r()),t.register(b_r()),t.register(gbe()),t.register(x_r()),t.register(__r()),t.register(w_r()),t.register(S_r()),t.register(T_r()),t.register(E_r()),t.register(A_r()),t.register(C_r()),t.register(M_r()),t.register(R_r()),t.register(k_r()),t.register(I_r()),t.register(fbe()),t.register(P_r()),t.register(D_r()),t.register(L_r()),t.register(O_r()),t.register(N_r()),t.register(F_r()),t.register(ybe()),t.register(z_r()),t.register(B_r()),t.register(U_r()),t.register(H_r()),t.register(j_r()),t.register(V_r()),t.register(q_r()),t.register(G_r()),t.register(uKe()),t.register($_r()),t.register(vbe()),t.register(W_r()),t.register(Y_r()),t.register(X_r()),t.register(Z_r()),t.register(K_r()),t.register(J_r()),t.register(cKe()),t.register(Q_r()),t.register(ewr()),t.register(twr()),t.register(rwr()),t.register(nwr()),t.register(iwr()),t.register(awr()),t.register(owr()),t.register(swr()),t.register(lwr()),t.register(uwr()),t.register(cwr()),t.register(fwr()),t.register(dwr()),t.register(hwr()),t.register(fKe()),t.register(pwr()),t.register(vwr()),Vde}var gwr=mwr();const ywr=Qh(gwr);var bbe=igr(ywr,Dyr);bbe.supportedLanguages=agr;const dKe={'code[class*="language-"]':{background:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{background:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",borderRadius:"0.3em"},'code[class*="language-"]::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"] *::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'pre[class*="language-"] *::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"]::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"] *::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'pre[class*="language-"] *::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},':not(pre) > code[class*="language-"]':{padding:"0.2em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},prolog:{color:"hsl(220, 10%, 40%)"},cdata:{color:"hsl(220, 10%, 40%)"},doctype:{color:"hsl(220, 14%, 71%)"},punctuation:{color:"hsl(220, 14%, 71%)"},entity:{color:"hsl(220, 14%, 71%)",cursor:"help"},"attr-name":{color:"hsl(29, 54%, 61%)"},"class-name":{color:"hsl(29, 54%, 61%)"},boolean:{color:"hsl(29, 54%, 61%)"},constant:{color:"hsl(29, 54%, 61%)"},number:{color:"hsl(29, 54%, 61%)"},atrule:{color:"hsl(29, 54%, 61%)"},keyword:{color:"hsl(286, 60%, 67%)"},property:{color:"hsl(355, 65%, 65%)"},tag:{color:"hsl(355, 65%, 65%)"},symbol:{color:"hsl(355, 65%, 65%)"},deleted:{color:"hsl(355, 65%, 65%)"},important:{color:"hsl(355, 65%, 65%)"},selector:{color:"hsl(95, 38%, 62%)"},string:{color:"hsl(95, 38%, 62%)"},char:{color:"hsl(95, 38%, 62%)"},builtin:{color:"hsl(95, 38%, 62%)"},inserted:{color:"hsl(95, 38%, 62%)"},regex:{color:"hsl(95, 38%, 62%)"},"attr-value":{color:"hsl(95, 38%, 62%)"},"attr-value > .token.punctuation":{color:"hsl(95, 38%, 62%)"},variable:{color:"hsl(207, 82%, 66%)"},operator:{color:"hsl(207, 82%, 66%)"},function:{color:"hsl(207, 82%, 66%)"},url:{color:"hsl(187, 47%, 55%)"},"attr-value > .token.punctuation.attr-equals":{color:"hsl(220, 14%, 71%)"},"special-attr > .token.attr-value > .token.value.css":{color:"hsl(220, 14%, 71%)"},".language-css .token.selector":{color:"hsl(355, 65%, 65%)"},".language-css .token.property":{color:"hsl(220, 14%, 71%)"},".language-css .token.function":{color:"hsl(187, 47%, 55%)"},".language-css .token.url > .token.function":{color:"hsl(187, 47%, 55%)"},".language-css .token.url > .token.string.url":{color:"hsl(95, 38%, 62%)"},".language-css .token.important":{color:"hsl(286, 60%, 67%)"},".language-css .token.atrule .token.rule":{color:"hsl(286, 60%, 67%)"},".language-javascript .token.operator":{color:"hsl(286, 60%, 67%)"},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:"hsl(5, 48%, 51%)"},".language-json .token.operator":{color:"hsl(220, 14%, 71%)"},".language-json .token.null.keyword":{color:"hsl(29, 54%, 61%)"},".language-markdown .token.url":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url > .token.operator":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url-reference.url > .token.string":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url > .token.content":{color:"hsl(207, 82%, 66%)"},".language-markdown .token.url > .token.url":{color:"hsl(187, 47%, 55%)"},".language-markdown .token.url-reference.url":{color:"hsl(187, 47%, 55%)"},".language-markdown .token.blockquote.punctuation":{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},".language-markdown .token.hr.punctuation":{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},".language-markdown .token.code-snippet":{color:"hsl(95, 38%, 62%)"},".language-markdown .token.bold .token.content":{color:"hsl(29, 54%, 61%)"},".language-markdown .token.italic .token.content":{color:"hsl(286, 60%, 67%)"},".language-markdown .token.strike .token.content":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.strike .token.punctuation":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.list.punctuation":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.title.important > .token.punctuation":{color:"hsl(355, 65%, 65%)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:"0.8"},"token.tab:not(:empty):before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.cr:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.lf:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.space:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:"0.4em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},".line-highlight.line-highlight":{background:"hsla(220, 100%, 80%, 0.04)"},".line-highlight.line-highlight:before":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 14%, 71%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},".line-highlight.line-highlight[data-end]:after":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 14%, 71%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"hsla(220, 100%, 80%, 0.04)"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"hsla(220, 14%, 71%, 0.15)"},".command-line .command-line-prompt":{borderRightColor:"hsla(220, 14%, 71%, 0.15)"},".line-numbers .line-numbers-rows > span:before":{color:"hsl(220, 14%, 45%)"},".command-line .command-line-prompt > span:before":{color:"hsl(220, 14%, 45%)"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"hsl(95, 38%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"hsl(95, 38%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"hsl(95, 38%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"hsl(207, 82%, 66%)"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"hsl(207, 82%, 66%)"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"hsl(207, 82%, 66%)"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"hsl(286, 60%, 67%)"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"hsl(286, 60%, 67%)"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"hsl(286, 60%, 67%)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},".prism-previewer.prism-previewer:before":{borderColor:"hsl(224, 13%, 17%)"},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:"hsl(224, 13%, 17%)",borderRadius:"0.3em"},".prism-previewer-color.prism-previewer-color:before":{borderRadius:"0.3em"},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:"0.3em"},".prism-previewer.prism-previewer:after":{borderTopColor:"hsl(224, 13%, 17%)"},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:"hsl(224, 13%, 17%)"},".prism-previewer-angle.prism-previewer-angle:before":{background:"hsl(219, 13%, 22%)"},".prism-previewer-time.prism-previewer-time:before":{background:"hsl(219, 13%, 22%)"},".prism-previewer-easing.prism-previewer-easing":{background:"hsl(219, 13%, 22%)"},".prism-previewer-angle.prism-previewer-angle circle":{stroke:"hsl(220, 14%, 71%)",strokeOpacity:"1"},".prism-previewer-time.prism-previewer-time circle":{stroke:"hsl(220, 14%, 71%)",strokeOpacity:"1"},".prism-previewer-easing.prism-previewer-easing circle":{stroke:"hsl(220, 14%, 71%)",fill:"transparent"},".prism-previewer-easing.prism-previewer-easing path":{stroke:"hsl(220, 14%, 71%)"},".prism-previewer-easing.prism-previewer-easing line":{stroke:"hsl(220, 14%, 71%)"}},hKe={'code[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",borderRadius:"0.3em"},'code[class*="language-"]::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"]::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},':not(pre) > code[class*="language-"]':{padding:"0.2em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},prolog:{color:"hsl(230, 4%, 64%)"},cdata:{color:"hsl(230, 4%, 64%)"},doctype:{color:"hsl(230, 8%, 24%)"},punctuation:{color:"hsl(230, 8%, 24%)"},entity:{color:"hsl(230, 8%, 24%)",cursor:"help"},"attr-name":{color:"hsl(35, 99%, 36%)"},"class-name":{color:"hsl(35, 99%, 36%)"},boolean:{color:"hsl(35, 99%, 36%)"},constant:{color:"hsl(35, 99%, 36%)"},number:{color:"hsl(35, 99%, 36%)"},atrule:{color:"hsl(35, 99%, 36%)"},keyword:{color:"hsl(301, 63%, 40%)"},property:{color:"hsl(5, 74%, 59%)"},tag:{color:"hsl(5, 74%, 59%)"},symbol:{color:"hsl(5, 74%, 59%)"},deleted:{color:"hsl(5, 74%, 59%)"},important:{color:"hsl(5, 74%, 59%)"},selector:{color:"hsl(119, 34%, 47%)"},string:{color:"hsl(119, 34%, 47%)"},char:{color:"hsl(119, 34%, 47%)"},builtin:{color:"hsl(119, 34%, 47%)"},inserted:{color:"hsl(119, 34%, 47%)"},regex:{color:"hsl(119, 34%, 47%)"},"attr-value":{color:"hsl(119, 34%, 47%)"},"attr-value > .token.punctuation":{color:"hsl(119, 34%, 47%)"},variable:{color:"hsl(221, 87%, 60%)"},operator:{color:"hsl(221, 87%, 60%)"},function:{color:"hsl(221, 87%, 60%)"},url:{color:"hsl(198, 99%, 37%)"},"attr-value > .token.punctuation.attr-equals":{color:"hsl(230, 8%, 24%)"},"special-attr > .token.attr-value > .token.value.css":{color:"hsl(230, 8%, 24%)"},".language-css .token.selector":{color:"hsl(5, 74%, 59%)"},".language-css .token.property":{color:"hsl(230, 8%, 24%)"},".language-css .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.string.url":{color:"hsl(119, 34%, 47%)"},".language-css .token.important":{color:"hsl(301, 63%, 40%)"},".language-css .token.atrule .token.rule":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.operator":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:"hsl(344, 84%, 43%)"},".language-json .token.operator":{color:"hsl(230, 8%, 24%)"},".language-json .token.null.keyword":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.url":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.operator":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url-reference.url > .token.string":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.content":{color:"hsl(221, 87%, 60%)"},".language-markdown .token.url > .token.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.url-reference.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.blockquote.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.hr.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.code-snippet":{color:"hsl(119, 34%, 47%)"},".language-markdown .token.bold .token.content":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.italic .token.content":{color:"hsl(301, 63%, 40%)"},".language-markdown .token.strike .token.content":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.strike .token.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.list.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.title.important > .token.punctuation":{color:"hsl(5, 74%, 59%)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:"0.8"},"token.tab:not(:empty):before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.cr:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.lf:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.space:before":{color:"hsla(230, 8%, 24%, 0.2)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:"0.4em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},".line-highlight.line-highlight":{background:"hsla(230, 8%, 24%, 0.05)"},".line-highlight.line-highlight:before":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},".line-highlight.line-highlight[data-end]:after":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"hsla(230, 8%, 24%, 0.05)"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".command-line .command-line-prompt":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".line-numbers .line-numbers-rows > span:before":{color:"hsl(230, 1%, 62%)"},".command-line .command-line-prompt > span:before":{color:"hsl(230, 1%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"hsl(301, 63%, 40%)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},".prism-previewer.prism-previewer:before":{borderColor:"hsl(0, 0, 95%)"},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:"hsl(0, 0, 95%)",borderRadius:"0.3em"},".prism-previewer-color.prism-previewer-color:before":{borderRadius:"0.3em"},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:"0.3em"},".prism-previewer.prism-previewer:after":{borderTopColor:"hsl(0, 0, 95%)"},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:"hsl(0, 0, 95%)"},".prism-previewer-angle.prism-previewer-angle:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-time.prism-previewer-time:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-easing.prism-previewer-easing":{background:"hsl(0, 0%, 100%)"},".prism-previewer-angle.prism-previewer-angle circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-time.prism-previewer-time circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-easing.prism-previewer-easing circle":{stroke:"hsl(230, 8%, 24%)",fill:"transparent"},".prism-previewer-easing.prism-previewer-easing path":{stroke:"hsl(230, 8%, 24%)"},".prism-previewer-easing.prism-previewer-easing line":{stroke:"hsl(230, 8%, 24%)"}},bwr=({frame:t})=>{const{frameCount:e}=rh(),r=UY(),n=()=>{t>=0&&t<e&&r(t)};return Ke.jsx(Ke.Fragment,{children:t>=0&&t<e?Ke.jsx(Eb,{icon:Ke.jsx(mWt,{}),label:`${t}`,clickable:!0,color:"primary",onClick:n}):Ke.jsxs("span",{children:["@",t]})})},xwr=[omr,hlr],_wr=[zmr],wwr=ze.memo(ydr),Swr=({open:t,onClose:e})=>{const{setCurrentFrame:r}=rh(),{roomId:n,userId:i}=R8(),[a,o]=ze.useState(""),[s,d]=ze.useState(null),[b,L]=ze.useState(""),B=ze.useRef(null),V=ze.useRef(null),{mode:X}=HL(),ie=cy(),{data:de,fetchNextPage:ae,hasNextPage:U,isFetchingNextPage:ve,isLoading:Se}=Sdr(n||"",50),Pe=Tdr(),Me=Edr();ze.useEffect(()=>(t?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset"}),[t]);const Ie=()=>{V.current&&(V.current.scrollTop=V.current.scrollHeight)};ze.useEffect(()=>{t&&setTimeout(Ie,100)},[t,de]);const Ve=Dt=>{if(V.current){const{scrollTop:qt}=V.current;qt<50&&U&&!ve&&ae()}},Ze=Dt=>{if(V.current){const{scrollTop:qt,scrollHeight:Lt,clientHeight:dr}=V.current;if(Dt.deltaY<0&&qt===0||Dt.deltaY>0&&qt+dr>=Lt-1){if(Dt.deltaY<0&&U)return;Dt.preventDefault(),Dt.stopPropagation()}}},Je=async()=>{if(a.trim())try{await Pe.mutateAsync(a),o("")}catch(Dt){console.error("Failed to send message:",Dt)}},nt=Dt=>{d(Dt.id),L(Dt.content)},ut=async()=>{if(!(!s||!b.trim()))try{await Me.mutateAsync({messageId:s,content:b}),d(null),L("")}catch(Dt){console.error("Failed to edit message:",Dt)}},ht=()=>{d(null),L("")},_t=de?.pages.flatMap(Dt=>Dt.messages).sort((Dt,qt)=>Dt.createdAt-qt.createdAt)||[];return t?Ke.jsx(_1e,{default:{x:window.innerWidth-420,y:20,width:400,height:600},minWidth:300,minHeight:400,bounds:".drag-boundary-container",dragHandleClassName:"drag-handle",style:{zIndex:1301},children:Ke.jsxs(Gy,{elevation:4,sx:{width:"100%",height:"100%",display:"flex",flexDirection:"column",overflow:"hidden"},children:[Ke.jsxs(Ul,{className:"drag-handle",sx:{p:1.4,display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:1,borderColor:"divider",cursor:"move"},children:[Ke.jsxs(Ul,{sx:{display:"flex",alignItems:"center",gap:1},children:[Ke.jsx(Su,{variant:"h6",children:"Chat"}),Ke.jsx(Zf,{size:"small",sx:{color:"text.secondary"},children:Ke.jsx(k0e,{fontSize:"small"})})]}),Ke.jsx(Zf,{onClick:e,size:"small",children:Ke.jsx(Xge,{})})]}),Ke.jsxs(Ul,{ref:V,onScroll:Ve,onWheel:Ze,sx:{flexGrow:1,overflowY:"auto",p:2,display:"flex",flexDirection:"column",gap:1},children:[Se&&Ke.jsx(Ul,{sx:{display:"flex",justifyContent:"center",p:2},children:Ke.jsx(_1,{size:24})}),ve&&Ke.jsx(Ul,{sx:{display:"flex",justifyContent:"center",p:1},children:Ke.jsx(_1,{size:20})}),_t.map(Dt=>{const qt=Dt.author.id===i,Lt=s===Dt.id;return Ke.jsxs(Gy,{sx:{p:1.5,backgroundColor:qt?X==="dark"?"primary.dark":"primary.light":"background.paper",color:qt&&X==="dark"?"primary.contrastText":"text.primary",alignSelf:qt?"flex-end":"flex-start",maxWidth:"80%"},elevation:1,children:[Ke.jsxs(Ul,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:.5},children:[Ke.jsxs(Su,{variant:"caption",color:"text.secondary",children:[Dt.author.id," -"," ",Whr(new Date(Dt.createdAt),"HH:mm")]}),qt&&!Lt&&Ke.jsx(Zf,{size:"small",onClick:()=>nt(Dt),children:Ke.jsx(uye,{fontSize:"small"})})]}),Lt?Ke.jsxs(Ul,{sx:{display:"flex",gap:1,alignItems:"center"},children:[Ke.jsx(zg,{fullWidth:!0,size:"small",value:b,onChange:dr=>L(dr.target.value),multiline:!0,maxRows:4}),Ke.jsx(Zf,{size:"small",onClick:ut,color:"primary",children:Ke.jsx(fWt,{fontSize:"small"})}),Ke.jsx(Zf,{size:"small",onClick:ht,children:Ke.jsx(uWt,{fontSize:"small"})})]}):Ke.jsxs(Ke.Fragment,{children:[Ke.jsx(Ul,{sx:{"& p":{margin:0},wordBreak:"break-word"},children:Ke.jsx(wwr,{remarkPlugins:xwr,rehypePlugins:_wr,components:{code({node:dr,className:Zt,children:Cr,...yt}){const Vt=/language-(\w+)/.exec(Zt||"");return Vt?Ke.jsx(bbe,{style:X==="dark"?dKe:hKe,language:Vt[1],PreTag:"div",...yt,children:String(Cr).replace(/\n$/,"")}):Ke.jsx("code",{className:Zt,...yt,children:Cr})},frameLink({frame:dr}){return typeof dr=="number"?Ke.jsx(bwr,{frame:dr}):null}},children:Dt.content})}),Dt.isEdited&&Ke.jsx(Su,{variant:"caption",color:"text.secondary",sx:{fontStyle:"italic",mt:.5},children:"(edited)"})]})]},Dt.id)}),Ke.jsx("div",{ref:B})]}),Ke.jsx(oA,{}),Ke.jsx(Ul,{sx:{p:2,backgroundColor:"background.default"},children:Ke.jsxs(Ul,{sx:{display:"flex",gap:1,alignItems:"center"},children:[Ke.jsx(Hdr,{minRows:1,maxRows:6,placeholder:"Type a message...",value:a,onChange:Dt=>o(Dt.target.value),onKeyPress:Dt=>{Dt.key==="Enter"&&!Dt.shiftKey&&(Dt.preventDefault(),Je())},style:{width:"100%",resize:"none",padding:"8.5px 14px",borderRadius:"4px",border:`1px solid ${ie.palette.divider}`,backgroundColor:ie.palette.background.paper,color:ie.palette.text.primary,fontFamily:"inherit",fontSize:"inherit"}}),Ke.jsx(Zf,{color:"primary",onClick:Je,disabled:!a.trim()||Pe.isPending,children:Ke.jsx(bWt,{})})]})})]})}):null},Twr=({open:t,onClose:e})=>{const{roomId:r,userId:n}=R8(),{mode:i}=HL(),a=()=>{const o=`from zndraw import ZnDraw

vis = ZnDraw(
  url="${window.location.origin}/",
  room="${r}",
  user="${n}"
)`;navigator.clipboard.writeText(o)};return Ke.jsxs(iA,{open:t,onClose:e,maxWidth:"sm",fullWidth:!0,children:[Ke.jsx(YC,{children:"Connect to this ZnDraw session"}),Ke.jsxs(aA,{children:[Ke.jsx(Su,{variant:"body2",sx:{mb:2},children:"You can connect a Python kernel to this ZnDraw session using:"}),Ke.jsxs(Ul,{sx:{position:"relative"},children:[Ke.jsx(bbe,{language:"python",style:i==="dark"?dKe:hKe,customStyle:{margin:0,borderRadius:"4px"},children:`from zndraw import ZnDraw

vis = ZnDraw(
  url="${window.location.origin}/",
  room="${r}",
  user="${n}"
)`}),Ke.jsx(Id,{startIcon:Ke.jsx(lye,{}),onClick:a,sx:{mt:1},variant:"outlined",size:"small",children:"Copy to clipboard"})]})]})]})},Ewr=()=>{const{setClientId:t,setRoomId:e,setUserId:r,setCurrentFrame:n,setFrameCount:i,setSelections:a,setSelectionGroups:o,setActiveSelectionGroup:s,setFrameSelection:d,setBookmarks:b,setJoinToken:L,setGeometries:B,setGeometryDefaults:V}=rh(),{roomId:X,userId:ie}=R8(),[de]=pze(),ae=iM(),U=ze.useRef(null),ve=ze.useCallback(async()=>{if(!X||!ie)return;const Pe=new AbortController;U.current=Pe,console.log("Joining room via REST:",X,ie);const Me=de.get("template"),Ie={userId:ie};Me&&(Ie.template=Me);try{const Ve=await cwt(X,Ie,Pe.signal);if(console.log("Join response data:",Ve),typeof Ve.frameCount=="number"&&i(Ve.frameCount),Ve.selections!==void 0&&(console.log("Setting selections from join:",Ve.selections),a(Ve.selections)),Ve.selectionGroups!==void 0&&(console.log("Setting selection groups from join:",Ve.selectionGroups),o(Ve.selectionGroups)),Ve.activeSelectionGroup!==void 0&&(console.log("Setting active selection group from join:",Ve.activeSelectionGroup),s(Ve.activeSelectionGroup)),Ve.frame_selection!==void 0&&d(Ve.frame_selection),Ve.step!==void 0&&Ve.step!==null&&n(Ve.step),Ve.bookmarks!==void 0&&b(KGe(Ve.bookmarks)),Ve.clientId&&t(Ve.clientId),Ve.joinToken&&L(Ve.joinToken),Ve.geometryDefaults&&V(Ve.geometryDefaults),Ve.geometries&&B(Ve.geometries),e(X),r(ie),Ve.settings)for(const[Ze,Je]of Object.entries(Ve.settings)){const nt=["extensionData",X,ie,"settings",Ze];ae.setQueryData(nt,Je)}}catch(Ve){Ve instanceof Error&&Ve.name==="AbortError"?console.log("Fetch aborted on unmount or re-run."):console.error("Error joining room:",Ve)}finally{U.current===Pe&&(U.current=null)}},[X,ie,de,ae,t,e,r,n,i,a,o,s,d,b,L,B,V]),Se=ze.useMemo(()=>VL.throttle(ve,1e4,{leading:!0,trailing:!1}),[ve]);return ze.useEffect(()=>(Se(),()=>{U.current?.abort(),Se.cancel()}),[X,ie,Se]),{}};var qde={},Gde={},N7e;function Awr(){return N7e||(N7e=1,(function(t){function e(Me){"@babel/helpers - typeof";return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ie){return typeof Ie}:function(Ie){return Ie&&typeof Symbol=="function"&&Ie.constructor===Symbol&&Ie!==Symbol.prototype?"symbol":typeof Ie},e(Me)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=Pe;var r=o(zk()),n=i(JW());function i(Me){return Me&&Me.__esModule?Me:{default:Me}}function a(Me){if(typeof WeakMap!="function")return null;var Ie=new WeakMap,Ve=new WeakMap;return(a=function(Je){return Je?Ve:Ie})(Me)}function o(Me,Ie){if(Me&&Me.__esModule)return Me;if(Me===null||e(Me)!=="object"&&typeof Me!="function")return{default:Me};var Ve=a(Ie);if(Ve&&Ve.has(Me))return Ve.get(Me);var Ze={},Je=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var nt in Me)if(nt!=="default"&&Object.prototype.hasOwnProperty.call(Me,nt)){var ut=Je?Object.getOwnPropertyDescriptor(Me,nt):null;ut&&(ut.get||ut.set)?Object.defineProperty(Ze,nt,ut):Ze[nt]=Me[nt]}return Ze.default=Me,Ve&&Ve.set(Me,Ze),Ze}function s(Me,Ie){if(!(Me instanceof Ie))throw new TypeError("Cannot call a class as a function")}function d(Me,Ie){for(var Ve=0;Ve<Ie.length;Ve++){var Ze=Ie[Ve];Ze.enumerable=Ze.enumerable||!1,Ze.configurable=!0,"value"in Ze&&(Ze.writable=!0),Object.defineProperty(Me,Ze.key,Ze)}}function b(Me,Ie,Ve){return Ie&&d(Me.prototype,Ie),Object.defineProperty(Me,"prototype",{writable:!1}),Me}function L(Me,Ie){if(typeof Ie!="function"&&Ie!==null)throw new TypeError("Super expression must either be null or a function");Me.prototype=Object.create(Ie&&Ie.prototype,{constructor:{value:Me,writable:!0,configurable:!0}}),Object.defineProperty(Me,"prototype",{writable:!1}),Ie&&B(Me,Ie)}function B(Me,Ie){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Ze,Je){return Ze.__proto__=Je,Ze},B(Me,Ie)}function V(Me){var Ie=de();return function(){var Ze=ae(Me),Je;if(Ie){var nt=ae(this).constructor;Je=Reflect.construct(Ze,arguments,nt)}else Je=Ze.apply(this,arguments);return X(this,Je)}}function X(Me,Ie){if(Ie&&(e(Ie)==="object"||typeof Ie=="function"))return Ie;if(Ie!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ie(Me)}function ie(Me){if(Me===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Me}function de(){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 ae(Me){return ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Ve){return Ve.__proto__||Object.getPrototypeOf(Ve)},ae(Me)}var U=["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"],ve=["plotly_restyle","plotly_redraw","plotly_relayout","plotly_relayouting","plotly_doubleclick","plotly_animated","plotly_sunburstclick"],Se=typeof window<"u";function Pe(Me){var Ie=(function(Ve){L(Je,Ve);var Ze=V(Je);function Je(nt){var ut;return s(this,Je),ut=Ze.call(this,nt),ut.p=Promise.resolve(),ut.resizeHandler=null,ut.handlers={},ut.syncWindowResize=ut.syncWindowResize.bind(ie(ut)),ut.syncEventHandlers=ut.syncEventHandlers.bind(ie(ut)),ut.attachUpdateEvents=ut.attachUpdateEvents.bind(ie(ut)),ut.getRef=ut.getRef.bind(ie(ut)),ut.handleUpdate=ut.handleUpdate.bind(ie(ut)),ut.figureCallback=ut.figureCallback.bind(ie(ut)),ut.updatePlotly=ut.updatePlotly.bind(ie(ut)),ut}return b(Je,[{key:"updatePlotly",value:function(ut,ht,_t){var Dt=this;this.p=this.p.then(function(){if(!Dt.unmounting){if(!Dt.el)throw new Error("Missing element reference");return Me.react(Dt.el,{data:Dt.props.data,layout:Dt.props.layout,config:Dt.props.config,frames:Dt.props.frames})}}).then(function(){Dt.unmounting||(Dt.syncWindowResize(ut),Dt.syncEventHandlers(),Dt.figureCallback(ht),_t&&Dt.attachUpdateEvents())}).catch(function(qt){Dt.props.onError&&Dt.props.onError(qt)})}},{key:"componentDidMount",value:function(){this.unmounting=!1,this.updatePlotly(!0,this.props.onInitialized,!0)}},{key:"componentDidUpdate",value:function(ut){this.unmounting=!1;var ht=ut.frames&&ut.frames.length?ut.frames.length:0,_t=this.props.frames&&this.props.frames.length?this.props.frames.length:0,Dt=!(ut.layout===this.props.layout&&ut.data===this.props.data&&ut.config===this.props.config&&_t===ht),qt=ut.revision!==void 0,Lt=ut.revision!==this.props.revision;!Dt&&(!qt||qt&&!Lt)||this.updatePlotly(!1,this.props.onUpdate,!1)}},{key:"componentWillUnmount",value:function(){this.unmounting=!0,this.figureCallback(this.props.onPurge),this.resizeHandler&&Se&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null),this.removeUpdateEvents(),Me.purge(this.el)}},{key:"attachUpdateEvents",value:function(){var ut=this;!this.el||!this.el.removeListener||ve.forEach(function(ht){ut.el.on(ht,ut.handleUpdate)})}},{key:"removeUpdateEvents",value:function(){var ut=this;!this.el||!this.el.removeListener||ve.forEach(function(ht){ut.el.removeListener(ht,ut.handleUpdate)})}},{key:"handleUpdate",value:function(){this.figureCallback(this.props.onUpdate)}},{key:"figureCallback",value:function(ut){if(typeof ut=="function"){var ht=this.el,_t=ht.data,Dt=ht.layout,qt=this.el._transitionData?this.el._transitionData._frames:null,Lt={data:_t,layout:Dt,frames:qt};ut(Lt,this.el)}}},{key:"syncWindowResize",value:function(ut){var ht=this;Se&&(this.props.useResizeHandler&&!this.resizeHandler?(this.resizeHandler=function(){return Me.Plots.resize(ht.el)},window.addEventListener("resize",this.resizeHandler),ut&&this.resizeHandler()):!this.props.useResizeHandler&&this.resizeHandler&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null))}},{key:"getRef",value:function(ut){this.el=ut,this.props.debug&&Se&&(window.gd=this.el)}},{key:"syncEventHandlers",value:function(){var ut=this;U.forEach(function(ht){var _t=ut.props["on"+ht],Dt=ut.handlers[ht],qt=!!Dt;_t&&!qt?ut.addEventHandler(ht,_t):!_t&&qt?ut.removeEventHandler(ht):_t&&qt&&_t!==Dt&&(ut.removeEventHandler(ht),ut.addEventHandler(ht,_t))})}},{key:"addEventHandler",value:function(ut,ht){this.handlers[ut]=ht,this.el.on(this.getPlotlyEventName(ut),this.handlers[ut])}},{key:"removeEventHandler",value:function(ut){this.el.removeListener(this.getPlotlyEventName(ut),this.handlers[ut]),delete this.handlers[ut]}},{key:"getPlotlyEventName",value:function(ut){return"plotly_"+ut.toLowerCase()}},{key:"render",value:function(){return r.default.createElement("div",{id:this.props.divId,style:this.props.style,ref:this.getRef,className:this.props.className})}}]),Je})(r.Component);return Ie.propTypes={data:n.default.arrayOf(n.default.object),config:n.default.object,layout:n.default.object,frames:n.default.arrayOf(n.default.object),revision:n.default.number,onInitialized:n.default.func,onPurge:n.default.func,onError:n.default.func,onUpdate:n.default.func,debug:n.default.bool,style:n.default.object,className:n.default.string,useResizeHandler:n.default.bool,divId:n.default.string},U.forEach(function(Ve){Ie.propTypes["on"+Ve]=n.default.func}),Ie.defaultProps={debug:!1,useResizeHandler:!1,data:[],style:{position:"relative",display:"inline-block"}},Ie}})(Gde)),Gde}var jG={exports:{}},Cwr=jG.exports,F7e;function Mwr(){return F7e||(F7e=1,(function(t){var e={};(function(r,n){t.exports?t.exports=n():r.moduleName=n()})(typeof self<"u"?self:Cwr,()=>{var r=(()=>{var n=Object.create,i=Object.defineProperty,a=Object.defineProperties,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyDescriptors,d=Object.getOwnPropertyNames,b=Object.getOwnPropertySymbols,L=Object.getPrototypeOf,B=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable,X=(pe,le,w)=>le in pe?i(pe,le,{enumerable:!0,configurable:!0,writable:!0,value:w}):pe[le]=w,ie=(pe,le)=>{for(var w in le||(le={}))B.call(le,w)&&X(pe,w,le[w]);if(b)for(var w of b(le))V.call(le,w)&&X(pe,w,le[w]);return pe},de=(pe,le)=>a(pe,s(le)),ae=(pe,le)=>function(){return pe&&(le=(0,pe[d(pe)[0]])(pe=0)),le},U=(pe,le)=>function(){return le||(0,pe[d(pe)[0]])((le={exports:{}}).exports,le),le.exports},ve=(pe,le)=>{for(var w in le)i(pe,w,{get:le[w],enumerable:!0})},Se=(pe,le,w,R)=>{if(le&&typeof le=="object"||typeof le=="function")for(let O of d(le))!B.call(pe,O)&&O!==w&&i(pe,O,{get:()=>le[O],enumerable:!(R=o(le,O))||R.enumerable});return pe},Pe=(pe,le,w)=>(w=pe!=null?n(L(pe)):{},Se(i(w,"default",{value:pe,enumerable:!0}),pe)),Me=pe=>Se(i({},"__esModule",{value:!0}),pe),Ie=U({"src/version.js"(pe){pe.version="3.1.1"}}),Ve=U({"node_modules/native-promise-only/lib/npo.src.js"(pe,le){(function(R,O,z){O[R]=O[R]||z(),typeof le<"u"&&le.exports&&(le.exports=O[R])})("Promise",typeof window<"u"?window:pe,function(){var R,O,z,l=Object.prototype.toString,u=typeof setImmediate<"u"?function(C){return setImmediate(C)}:setTimeout;try{Object.defineProperty({},"x",{}),R=function(C,I,N,F){return Object.defineProperty(C,I,{value:N,writable:!0,configurable:F!==!1})}}catch{R=function(I,N,F){return I[N]=F,I}}z=(function(){var C,I,N;function F(k,P){this.fn=k,this.self=P,this.next=void 0}return{add:function(P,T){N=new F(P,T),I?I.next=N:C=N,I=N,N=void 0},drain:function(){var P=C;for(C=I=O=void 0;P;)P.fn.call(P.self),P=P.next}}})();function c(g,C){z.add(g,C),O||(O=u(z.drain))}function p(g){var C,I=typeof g;return g!=null&&(I=="object"||I=="function")&&(C=g.then),typeof C=="function"?C:!1}function f(){for(var g=0;g<this.chain.length;g++)v(this,this.state===1?this.chain[g].success:this.chain[g].failure,this.chain[g]);this.chain.length=0}function v(g,C,I){var N,F;try{C===!1?I.reject(g.msg):(C===!0?N=g.msg:N=C.call(void 0,g.msg),N===I.promise?I.reject(TypeError("Promise-chain cycle")):(F=p(N))?F.call(N,I.resolve,I.reject):I.resolve(N))}catch(k){I.reject(k)}}function h(g){var C,I=this;if(!I.triggered){I.triggered=!0,I.def&&(I=I.def);try{(C=p(g))?c(function(){var N=new x(I);try{C.call(g,function(){h.apply(N,arguments)},function(){m.apply(N,arguments)})}catch(F){m.call(N,F)}}):(I.msg=g,I.state=1,I.chain.length>0&&c(f,I))}catch(N){m.call(new x(I),N)}}}function m(g){var C=this;C.triggered||(C.triggered=!0,C.def&&(C=C.def),C.msg=g,C.state=2,C.chain.length>0&&c(f,C))}function _(g,C,I,N){for(var F=0;F<C.length;F++)(function(P){g.resolve(C[P]).then(function(y){I(P,y)},N)})(F)}function x(g){this.def=g,this.triggered=!1}function A(g){this.promise=g,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function E(g){if(typeof g!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var C=new A(this);this.then=function(N,F){var k={success:typeof N=="function"?N:!0,failure:typeof F=="function"?F:!1};return k.promise=new this.constructor(function(T,y){if(typeof T!="function"||typeof y!="function")throw TypeError("Not a function");k.resolve=T,k.reject=y}),C.chain.push(k),C.state!==0&&c(f,C),k.promise},this.catch=function(N){return this.then(void 0,N)};try{g.call(void 0,function(N){h.call(C,N)},function(N){m.call(C,N)})}catch(I){m.call(C,I)}}var D=R({},"constructor",E,!1);return E.prototype=D,R(D,"__NPO__",0,!1),R(E,"resolve",function(C){var I=this;return C&&typeof C=="object"&&C.__NPO__===1?C:new I(function(F,k){if(typeof F!="function"||typeof k!="function")throw TypeError("Not a function");F(C)})}),R(E,"reject",function(C){return new this(function(N,F){if(typeof N!="function"||typeof F!="function")throw TypeError("Not a function");F(C)})}),R(E,"all",function(C){var I=this;return l.call(C)!="[object Array]"?I.reject(TypeError("Not an array")):C.length===0?I.resolve([]):new I(function(F,k){if(typeof F!="function"||typeof k!="function")throw TypeError("Not a function");var P=C.length,T=Array(P),y=0;_(I,C,function(M,W){T[M]=W,++y===P&&F(T)},k)})}),R(E,"race",function(C){var I=this;return l.call(C)!="[object Array]"?I.reject(TypeError("Not an array")):new I(function(F,k){if(typeof F!="function"||typeof k!="function")throw TypeError("Not a function");_(I,C,function(T,y){F(y)},k)})}),E})}}),Ze=U({"node_modules/@plotly/d3/d3.js"(pe,le){(function(){var w={version:"3.8.2"},R=[].slice,O=function($e){return R.call($e)},z=self.document;function l($e){return $e&&($e.ownerDocument||$e.document||$e).documentElement}function u($e){return $e&&($e.ownerDocument&&$e.ownerDocument.defaultView||$e.document&&$e||$e.defaultView)}if(z)try{O(z.documentElement.childNodes)[0].nodeType}catch{O=function(vt){for(var Bt=vt.length,fr=new Array(Bt);Bt--;)fr[Bt]=vt[Bt];return fr}}if(Date.now||(Date.now=function(){return+new Date}),z)try{z.createElement("DIV").style.setProperty("opacity",0,"")}catch{var c=this.Element.prototype,p=c.setAttribute,f=c.setAttributeNS,v=this.CSSStyleDeclaration.prototype,h=v.setProperty;c.setAttribute=function(vt,Bt){p.call(this,vt,Bt+"")},c.setAttributeNS=function(vt,Bt,fr){f.call(this,vt,Bt,fr+"")},v.setProperty=function(vt,Bt,fr){h.call(this,vt,Bt+"",fr)}}w.ascending=m;function m($e,vt){return $e<vt?-1:$e>vt?1:$e>=vt?0:NaN}w.descending=function($e,vt){return vt<$e?-1:vt>$e?1:vt>=$e?0:NaN},w.min=function($e,vt){var Bt=-1,fr=$e.length,pr,_r;if(arguments.length===1){for(;++Bt<fr;)if((_r=$e[Bt])!=null&&_r>=_r){pr=_r;break}for(;++Bt<fr;)(_r=$e[Bt])!=null&&pr>_r&&(pr=_r)}else{for(;++Bt<fr;)if((_r=vt.call($e,$e[Bt],Bt))!=null&&_r>=_r){pr=_r;break}for(;++Bt<fr;)(_r=vt.call($e,$e[Bt],Bt))!=null&&pr>_r&&(pr=_r)}return pr},w.max=function($e,vt){var Bt=-1,fr=$e.length,pr,_r;if(arguments.length===1){for(;++Bt<fr;)if((_r=$e[Bt])!=null&&_r>=_r){pr=_r;break}for(;++Bt<fr;)(_r=$e[Bt])!=null&&_r>pr&&(pr=_r)}else{for(;++Bt<fr;)if((_r=vt.call($e,$e[Bt],Bt))!=null&&_r>=_r){pr=_r;break}for(;++Bt<fr;)(_r=vt.call($e,$e[Bt],Bt))!=null&&_r>pr&&(pr=_r)}return pr},w.extent=function($e,vt){var Bt=-1,fr=$e.length,pr,_r,Yr;if(arguments.length===1){for(;++Bt<fr;)if((_r=$e[Bt])!=null&&_r>=_r){pr=Yr=_r;break}for(;++Bt<fr;)(_r=$e[Bt])!=null&&(pr>_r&&(pr=_r),Yr<_r&&(Yr=_r))}else{for(;++Bt<fr;)if((_r=vt.call($e,$e[Bt],Bt))!=null&&_r>=_r){pr=Yr=_r;break}for(;++Bt<fr;)(_r=vt.call($e,$e[Bt],Bt))!=null&&(pr>_r&&(pr=_r),Yr<_r&&(Yr=_r))}return[pr,Yr]};function _($e){return $e===null?NaN:+$e}function x($e){return!isNaN($e)}w.sum=function($e,vt){var Bt=0,fr=$e.length,pr,_r=-1;if(arguments.length===1)for(;++_r<fr;)x(pr=+$e[_r])&&(Bt+=pr);else for(;++_r<fr;)x(pr=+vt.call($e,$e[_r],_r))&&(Bt+=pr);return Bt},w.mean=function($e,vt){var Bt=0,fr=$e.length,pr,_r=-1,Yr=fr;if(arguments.length===1)for(;++_r<fr;)x(pr=_($e[_r]))?Bt+=pr:--Yr;else for(;++_r<fr;)x(pr=_(vt.call($e,$e[_r],_r)))?Bt+=pr:--Yr;if(Yr)return Bt/Yr},w.quantile=function($e,vt){var Bt=($e.length-1)*vt+1,fr=Math.floor(Bt),pr=+$e[fr-1],_r=Bt-fr;return _r?pr+_r*($e[fr]-pr):pr},w.median=function($e,vt){var Bt=[],fr=$e.length,pr,_r=-1;if(arguments.length===1)for(;++_r<fr;)x(pr=_($e[_r]))&&Bt.push(pr);else for(;++_r<fr;)x(pr=_(vt.call($e,$e[_r],_r)))&&Bt.push(pr);if(Bt.length)return w.quantile(Bt.sort(m),.5)},w.variance=function($e,vt){var Bt=$e.length,fr=0,pr,_r,Yr=0,Wr=-1,yn=0;if(arguments.length===1)for(;++Wr<Bt;)x(pr=_($e[Wr]))&&(_r=pr-fr,fr+=_r/++yn,Yr+=_r*(pr-fr));else for(;++Wr<Bt;)x(pr=_(vt.call($e,$e[Wr],Wr)))&&(_r=pr-fr,fr+=_r/++yn,Yr+=_r*(pr-fr));if(yn>1)return Yr/(yn-1)},w.deviation=function(){var $e=w.variance.apply(this,arguments);return $e&&Math.sqrt($e)};function A($e){return{left:function(vt,Bt,fr,pr){for(arguments.length<3&&(fr=0),arguments.length<4&&(pr=vt.length);fr<pr;){var _r=fr+pr>>>1;$e(vt[_r],Bt)<0?fr=_r+1:pr=_r}return fr},right:function(vt,Bt,fr,pr){for(arguments.length<3&&(fr=0),arguments.length<4&&(pr=vt.length);fr<pr;){var _r=fr+pr>>>1;$e(vt[_r],Bt)>0?pr=_r:fr=_r+1}return fr}}}var E=A(m);w.bisectLeft=E.left,w.bisect=w.bisectRight=E.right,w.bisector=function($e){return A($e.length===1?function(vt,Bt){return m($e(vt),Bt)}:$e)},w.shuffle=function($e,vt,Bt){(fr=arguments.length)<3&&(Bt=$e.length,fr<2&&(vt=0));for(var fr=Bt-vt,pr,_r;fr;)_r=Math.random()*fr--|0,pr=$e[fr+vt],$e[fr+vt]=$e[_r+vt],$e[_r+vt]=pr;return $e},w.permute=function($e,vt){for(var Bt=vt.length,fr=new Array(Bt);Bt--;)fr[Bt]=$e[vt[Bt]];return fr},w.pairs=function($e){for(var vt=0,Bt=$e.length-1,fr=$e[0],pr=new Array(Bt<0?0:Bt);vt<Bt;)pr[vt]=[fr,fr=$e[++vt]];return pr},w.transpose=function($e){if(!(_r=$e.length))return[];for(var vt=-1,Bt=w.min($e,D),fr=new Array(Bt);++vt<Bt;)for(var pr=-1,_r,Yr=fr[vt]=new Array(_r);++pr<_r;)Yr[pr]=$e[pr][vt];return fr};function D($e){return $e.length}w.zip=function(){return w.transpose(arguments)},w.keys=function($e){var vt=[];for(var Bt in $e)vt.push(Bt);return vt},w.values=function($e){var vt=[];for(var Bt in $e)vt.push($e[Bt]);return vt},w.entries=function($e){var vt=[];for(var Bt in $e)vt.push({key:Bt,value:$e[Bt]});return vt},w.merge=function($e){for(var vt=$e.length,Bt,fr=-1,pr=0,_r,Yr;++fr<vt;)pr+=$e[fr].length;for(_r=new Array(pr);--vt>=0;)for(Yr=$e[vt],Bt=Yr.length;--Bt>=0;)_r[--pr]=Yr[Bt];return _r};var g=Math.abs;w.range=function($e,vt,Bt){if(arguments.length<3&&(Bt=1,arguments.length<2&&(vt=$e,$e=0)),(vt-$e)/Bt===1/0)throw new Error("infinite range");var fr=[],pr=C(g(Bt)),_r=-1,Yr;if($e*=pr,vt*=pr,Bt*=pr,Bt<0)for(;(Yr=$e+Bt*++_r)>vt;)fr.push(Yr/pr);else for(;(Yr=$e+Bt*++_r)<vt;)fr.push(Yr/pr);return fr};function C($e){for(var vt=1;$e*vt%1;)vt*=10;return vt}function I($e,vt){for(var Bt in vt)Object.defineProperty($e.prototype,Bt,{value:vt[Bt],enumerable:!1})}w.map=function($e,vt){var Bt=new N;if($e instanceof N)$e.forEach(function(Wr,yn){Bt.set(Wr,yn)});else if(Array.isArray($e)){var fr=-1,pr=$e.length,_r;if(arguments.length===1)for(;++fr<pr;)Bt.set(fr,$e[fr]);else for(;++fr<pr;)Bt.set(vt.call($e,_r=$e[fr],fr),_r)}else for(var Yr in $e)Bt.set(Yr,$e[Yr]);return Bt};function N(){this._=Object.create(null)}var F="__proto__",k="\0";I(N,{has:y,get:function($e){return this._[P($e)]},set:function($e,vt){return this._[P($e)]=vt},remove:S,keys:M,values:function(){var $e=[];for(var vt in this._)$e.push(this._[vt]);return $e},entries:function(){var $e=[];for(var vt in this._)$e.push({key:T(vt),value:this._[vt]});return $e},size:W,empty:$,forEach:function($e){for(var vt in this._)$e.call(this,T(vt),this._[vt])}});function P($e){return($e+="")===F||$e[0]===k?k+$e:$e}function T($e){return($e+="")[0]===k?$e.slice(1):$e}function y($e){return P($e)in this._}function S($e){return($e=P($e))in this._&&delete this._[$e]}function M(){var $e=[];for(var vt in this._)$e.push(T(vt));return $e}function W(){var $e=0;for(var vt in this._)++$e;return $e}function $(){for(var $e in this._)return!1;return!0}w.nest=function(){var $e={},vt=[],Bt=[],fr,pr;function _r(Wr,yn,li){if(li>=vt.length)return pr?pr.call($e,yn):fr?yn.sort(fr):yn;for(var ni=-1,Pi=yn.length,Ji=vt[li++],na,_o,ca,La=new N,qa;++ni<Pi;)(qa=La.get(na=Ji(_o=yn[ni])))?qa.push(_o):La.set(na,[_o]);return Wr?(_o=Wr(),ca=function(bo,So){_o.set(bo,_r(Wr,So,li))}):(_o={},ca=function(bo,So){_o[bo]=_r(Wr,So,li)}),La.forEach(ca),_o}function Yr(Wr,yn){if(yn>=vt.length)return Wr;var li=[],ni=Bt[yn++];return Wr.forEach(function(Pi,Ji){li.push({key:Pi,values:Yr(Ji,yn)})}),ni?li.sort(function(Pi,Ji){return ni(Pi.key,Ji.key)}):li}return $e.map=function(Wr,yn){return _r(yn,Wr,0)},$e.entries=function(Wr){return Yr(_r(w.map,Wr,0),0)},$e.key=function(Wr){return vt.push(Wr),$e},$e.sortKeys=function(Wr){return Bt[vt.length-1]=Wr,$e},$e.sortValues=function(Wr){return fr=Wr,$e},$e.rollup=function(Wr){return pr=Wr,$e},$e},w.set=function($e){var vt=new Z;if($e)for(var Bt=0,fr=$e.length;Bt<fr;++Bt)vt.add($e[Bt]);return vt};function Z(){this._=Object.create(null)}I(Z,{has:y,add:function($e){return this._[P($e+="")]=!0,$e},remove:S,values:M,size:W,empty:$,forEach:function($e){for(var vt in this._)$e.call(this,T(vt))}}),w.behavior={};function K($e){return $e}w.rebind=function($e,vt){for(var Bt=1,fr=arguments.length,pr;++Bt<fr;)$e[pr=arguments[Bt]]=Q($e,vt,vt[pr]);return $e};function Q($e,vt,Bt){return function(){var fr=Bt.apply(vt,arguments);return fr===vt?$e:fr}}function J($e,vt){if(vt in $e)return vt;vt=vt.charAt(0).toUpperCase()+vt.slice(1);for(var Bt=0,fr=G.length;Bt<fr;++Bt){var pr=G[Bt]+vt;if(pr in $e)return pr}}var G=["webkit","ms","moz","Moz","o","O"];function ee(){}w.dispatch=function(){for(var $e=new re,vt=-1,Bt=arguments.length;++vt<Bt;)$e[arguments[vt]]=fe($e);return $e};function re(){}re.prototype.on=function($e,vt){var Bt=$e.indexOf("."),fr="";if(Bt>=0&&(fr=$e.slice(Bt+1),$e=$e.slice(0,Bt)),$e)return arguments.length<2?this[$e].on(fr):this[$e].on(fr,vt);if(arguments.length===2){if(vt==null)for($e in this)this.hasOwnProperty($e)&&this[$e].on(fr,null);return this}};function fe($e){var vt=[],Bt=new N;function fr(){for(var pr=vt,_r=-1,Yr=pr.length,Wr;++_r<Yr;)(Wr=pr[_r].on)&&Wr.apply(this,arguments);return $e}return fr.on=function(pr,_r){var Yr=Bt.get(pr),Wr;return arguments.length<2?Yr&&Yr.on:(Yr&&(Yr.on=null,vt=vt.slice(0,Wr=vt.indexOf(Yr)).concat(vt.slice(Wr+1)),Bt.remove(pr)),_r&&vt.push(Bt.set(pr,{on:_r})),$e)},fr}w.event=null;function we(){w.event.preventDefault()}function Oe(){for(var $e=w.event,vt;vt=$e.sourceEvent;)$e=vt;return $e}function ke($e){for(var vt=new re,Bt=0,fr=arguments.length;++Bt<fr;)vt[arguments[Bt]]=fe(vt);return vt.of=function(pr,_r){return function(Yr){try{var Wr=Yr.sourceEvent=w.event;Yr.target=$e,w.event=Yr,vt[Yr.type].apply(pr,_r)}finally{w.event=Wr}}},vt}w.requote=function($e){return $e.replace(Le,"\\$&")};var Le=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,oe={}.__proto__?function($e,vt){$e.__proto__=vt}:function($e,vt){for(var Bt in vt)$e[Bt]=vt[Bt]};function be($e){return oe($e,xe),$e}var _e=function($e,vt){return vt.querySelector($e)},he=function($e,vt){return vt.querySelectorAll($e)},De=function($e,vt){var Bt=$e.matches||$e[J($e,"matchesSelector")];return De=function(fr,pr){return Bt.call(fr,pr)},De($e,vt)};typeof Sizzle=="function"&&(_e=function($e,vt){return Sizzle($e,vt)[0]||null},he=Sizzle,De=Sizzle.matchesSelector),w.selection=function(){return w.select(z.documentElement)};var xe=w.selection.prototype=[];xe.select=function($e){var vt=[],Bt,fr,pr,_r;$e=se($e);for(var Yr=-1,Wr=this.length;++Yr<Wr;){vt.push(Bt=[]),Bt.parentNode=(pr=this[Yr]).parentNode;for(var yn=-1,li=pr.length;++yn<li;)(_r=pr[yn])?(Bt.push(fr=$e.call(_r,_r.__data__,yn,Yr)),fr&&"__data__"in _r&&(fr.__data__=_r.__data__)):Bt.push(null)}return be(vt)};function se($e){return typeof $e=="function"?$e:function(){return _e($e,this)}}xe.selectAll=function($e){var vt=[],Bt,fr;$e=Ee($e);for(var pr=-1,_r=this.length;++pr<_r;)for(var Yr=this[pr],Wr=-1,yn=Yr.length;++Wr<yn;)(fr=Yr[Wr])&&(vt.push(Bt=O($e.call(fr,fr.__data__,Wr,pr))),Bt.parentNode=fr);return be(vt)};function Ee($e){return typeof $e=="function"?$e:function(){return he($e,this)}}var Te="http://www.w3.org/1999/xhtml",Be={svg:"http://www.w3.org/2000/svg",xhtml:Te,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};w.ns={prefix:Be,qualify:function($e){var vt=$e.indexOf(":"),Bt=$e;return vt>=0&&(Bt=$e.slice(0,vt))!=="xmlns"&&($e=$e.slice(vt+1)),Be.hasOwnProperty(Bt)?{space:Be[Bt],local:$e}:$e}},xe.attr=function($e,vt){if(arguments.length<2){if(typeof $e=="string"){var Bt=this.node();return $e=w.ns.qualify($e),$e.local?Bt.getAttributeNS($e.space,$e.local):Bt.getAttribute($e)}for(vt in $e)this.each(tt(vt,$e[vt]));return this}return this.each(tt($e,vt))};function tt($e,vt){$e=w.ns.qualify($e);function Bt(){this.removeAttribute($e)}function fr(){this.removeAttributeNS($e.space,$e.local)}function pr(){this.setAttribute($e,vt)}function _r(){this.setAttributeNS($e.space,$e.local,vt)}function Yr(){var yn=vt.apply(this,arguments);yn==null?this.removeAttribute($e):this.setAttribute($e,yn)}function Wr(){var yn=vt.apply(this,arguments);yn==null?this.removeAttributeNS($e.space,$e.local):this.setAttributeNS($e.space,$e.local,yn)}return vt==null?$e.local?fr:Bt:typeof vt=="function"?$e.local?Wr:Yr:$e.local?_r:pr}function at($e){return $e.trim().replace(/\s+/g," ")}xe.classed=function($e,vt){if(arguments.length<2){if(typeof $e=="string"){var Bt=this.node(),fr=($e=pt($e)).length,pr=-1;if(vt=Bt.classList){for(;++pr<fr;)if(!vt.contains($e[pr]))return!1}else for(vt=Bt.getAttribute("class");++pr<fr;)if(!gt($e[pr]).test(vt))return!1;return!0}for(vt in $e)this.each(Rt(vt,$e[vt]));return this}return this.each(Rt($e,vt))};function gt($e){return new RegExp("(?:^|\\s+)"+w.requote($e)+"(?:\\s+|$)","g")}function pt($e){return($e+"").trim().split(/^|\s+/)}function Rt($e,vt){$e=pt($e).map($t);var Bt=$e.length;function fr(){for(var _r=-1;++_r<Bt;)$e[_r](this,vt)}function pr(){for(var _r=-1,Yr=vt.apply(this,arguments);++_r<Bt;)$e[_r](this,Yr)}return typeof vt=="function"?pr:fr}function $t($e){var vt=gt($e);return function(Bt,fr){if(pr=Bt.classList)return fr?pr.add($e):pr.remove($e);var pr=Bt.getAttribute("class")||"";fr?(vt.lastIndex=0,vt.test(pr)||Bt.setAttribute("class",at(pr+" "+$e))):Bt.setAttribute("class",at(pr.replace(vt," ")))}}xe.style=function($e,vt,Bt){var fr=arguments.length;if(fr<3){if(typeof $e!="string"){fr<2&&(vt="");for(Bt in $e)this.each(Wt(Bt,$e[Bt],vt));return this}if(fr<2){var pr=this.node();return u(pr).getComputedStyle(pr,null).getPropertyValue($e)}Bt=""}return this.each(Wt($e,vt,Bt))};function Wt($e,vt,Bt){function fr(){this.style.removeProperty($e)}function pr(){this.style.setProperty($e,vt,Bt)}function _r(){var Yr=vt.apply(this,arguments);Yr==null?this.style.removeProperty($e):this.style.setProperty($e,Yr,Bt)}return vt==null?fr:typeof vt=="function"?_r:pr}xe.property=function($e,vt){if(arguments.length<2){if(typeof $e=="string")return this.node()[$e];for(vt in $e)this.each(Ht(vt,$e[vt]));return this}return this.each(Ht($e,vt))};function Ht($e,vt){function Bt(){delete this[$e]}function fr(){this[$e]=vt}function pr(){var _r=vt.apply(this,arguments);_r==null?delete this[$e]:this[$e]=_r}return vt==null?Bt:typeof vt=="function"?pr:fr}xe.text=function($e){return arguments.length?this.each(typeof $e=="function"?function(){var vt=$e.apply(this,arguments);this.textContent=vt??""}:$e==null?function(){this.textContent=""}:function(){this.textContent=$e}):this.node().textContent},xe.html=function($e){return arguments.length?this.each(typeof $e=="function"?function(){var vt=$e.apply(this,arguments);this.innerHTML=vt??""}:$e==null?function(){this.innerHTML=""}:function(){this.innerHTML=$e}):this.node().innerHTML},xe.append=function($e){return $e=Ft($e),this.select(function(){return this.appendChild($e.apply(this,arguments))})};function Ft($e){function vt(){var fr=this.ownerDocument,pr=this.namespaceURI;return pr===Te&&fr.documentElement.namespaceURI===Te?fr.createElement($e):fr.createElementNS(pr,$e)}function Bt(){return this.ownerDocument.createElementNS($e.space,$e.local)}return typeof $e=="function"?$e:($e=w.ns.qualify($e)).local?Bt:vt}xe.insert=function($e,vt){return $e=Ft($e),vt=se(vt),this.select(function(){return this.insertBefore($e.apply(this,arguments),vt.apply(this,arguments)||null)})},xe.remove=function(){return this.each(st)};function st(){var $e=this.parentNode;$e&&$e.removeChild(this)}xe.data=function($e,vt){var Bt=-1,fr=this.length,pr,_r;if(!arguments.length){for($e=new Array(fr=(pr=this[0]).length);++Bt<fr;)(_r=pr[Bt])&&($e[Bt]=_r.__data__);return $e}function Yr(ni,Pi){var Ji,na=ni.length,_o=Pi.length,ca=Math.min(na,_o),La=new Array(_o),qa=new Array(_o),bo=new Array(na),So,Va;if(vt){var os=new N,ul=new Array(na),Us;for(Ji=-1;++Ji<na;)(So=ni[Ji])&&(os.has(Us=vt.call(So,So.__data__,Ji))?bo[Ji]=So:os.set(Us,So),ul[Ji]=Us);for(Ji=-1;++Ji<_o;)(So=os.get(Us=vt.call(Pi,Va=Pi[Ji],Ji)))?So!==!0&&(La[Ji]=So,So.__data__=Va):qa[Ji]=rt(Va),os.set(Us,!0);for(Ji=-1;++Ji<na;)Ji in ul&&os.get(ul[Ji])!==!0&&(bo[Ji]=ni[Ji])}else{for(Ji=-1;++Ji<ca;)So=ni[Ji],Va=Pi[Ji],So?(So.__data__=Va,La[Ji]=So):qa[Ji]=rt(Va);for(;Ji<_o;++Ji)qa[Ji]=rt(Pi[Ji]);for(;Ji<na;++Ji)bo[Ji]=ni[Ji]}qa.update=La,qa.parentNode=La.parentNode=bo.parentNode=ni.parentNode,Wr.push(qa),yn.push(La),li.push(bo)}var Wr=Jt([]),yn=be([]),li=be([]);if(typeof $e=="function")for(;++Bt<fr;)Yr(pr=this[Bt],$e.call(pr,pr.parentNode.__data__,Bt));else for(;++Bt<fr;)Yr(pr=this[Bt],$e);return yn.enter=function(){return Wr},yn.exit=function(){return li},yn};function rt($e){return{__data__:$e}}xe.datum=function($e){return arguments.length?this.property("__data__",$e):this.property("__data__")},xe.filter=function($e){var vt=[],Bt,fr,pr;typeof $e!="function"&&($e=Ue($e));for(var _r=0,Yr=this.length;_r<Yr;_r++){vt.push(Bt=[]),Bt.parentNode=(fr=this[_r]).parentNode;for(var Wr=0,yn=fr.length;Wr<yn;Wr++)(pr=fr[Wr])&&$e.call(pr,pr.__data__,Wr,_r)&&Bt.push(pr)}return be(vt)};function Ue($e){return function(){return De(this,$e)}}xe.order=function(){for(var $e=-1,vt=this.length;++$e<vt;)for(var Bt=this[$e],fr=Bt.length-1,pr=Bt[fr],_r;--fr>=0;)(_r=Bt[fr])&&(pr&&pr!==_r.nextSibling&&pr.parentNode.insertBefore(_r,pr),pr=_r);return this},xe.sort=function($e){$e=xt.apply(this,arguments);for(var vt=-1,Bt=this.length;++vt<Bt;)this[vt].sort($e);return this.order()};function xt($e){return arguments.length||($e=m),function(vt,Bt){return vt&&Bt?$e(vt.__data__,Bt.__data__):!vt-!Bt}}xe.each=function($e){return Gt(this,function(vt,Bt,fr){$e.call(vt,vt.__data__,Bt,fr)})};function Gt($e,vt){for(var Bt=0,fr=$e.length;Bt<fr;Bt++)for(var pr=$e[Bt],_r=0,Yr=pr.length,Wr;_r<Yr;_r++)(Wr=pr[_r])&&vt(Wr,_r,Bt);return $e}xe.call=function($e){var vt=O(arguments);return $e.apply(vt[0]=this,vt),this},xe.empty=function(){return!this.node()},xe.node=function(){for(var $e=0,vt=this.length;$e<vt;$e++)for(var Bt=this[$e],fr=0,pr=Bt.length;fr<pr;fr++){var _r=Bt[fr];if(_r)return _r}return null},xe.size=function(){var $e=0;return Gt(this,function(){++$e}),$e};function Jt($e){return oe($e,Ut),$e}var Ut=[];w.selection.enter=Jt,w.selection.enter.prototype=Ut,Ut.append=xe.append,Ut.empty=xe.empty,Ut.node=xe.node,Ut.call=xe.call,Ut.size=xe.size,Ut.select=function($e){for(var vt=[],Bt,fr,pr,_r,Yr,Wr=-1,yn=this.length;++Wr<yn;){pr=(_r=this[Wr]).update,vt.push(Bt=[]),Bt.parentNode=_r.parentNode;for(var li=-1,ni=_r.length;++li<ni;)(Yr=_r[li])?(Bt.push(pr[li]=fr=$e.call(_r.parentNode,Yr.__data__,li,Wr)),fr.__data__=Yr.__data__):Bt.push(null)}return be(vt)},Ut.insert=function($e,vt){return arguments.length<2&&(vt=kr(this)),xe.insert.call(this,$e,vt)};function kr($e){var vt,Bt;return function(fr,pr,_r){var Yr=$e[_r].update,Wr=Yr.length,yn;for(_r!=Bt&&(Bt=_r,vt=0),pr>=vt&&(vt=pr+1);!(yn=Yr[vt])&&++vt<Wr;);return yn}}w.select=function($e){var vt;return typeof $e=="string"?(vt=[_e($e,z)],vt.parentNode=z.documentElement):(vt=[$e],vt.parentNode=l($e)),be([vt])},w.selectAll=function($e){var vt;return typeof $e=="string"?(vt=O(he($e,z)),vt.parentNode=z.documentElement):(vt=O($e),vt.parentNode=null),be([vt])},xe.on=function($e,vt,Bt){var fr=arguments.length;if(fr<3){if(typeof $e!="string"){fr<2&&(vt=!1);for(Bt in $e)this.each(Pr(Bt,$e[Bt],vt));return this}if(fr<2)return(fr=this.node()["__on"+$e])&&fr._;Bt=!1}return this.each(Pr($e,vt,Bt))};function Pr($e,vt,Bt){var fr="__on"+$e,pr=$e.indexOf("."),_r=rn;pr>0&&($e=$e.slice(0,pr));var Yr=$r.get($e);Yr&&($e=Yr,_r=kn);function Wr(){var ni=this[fr];ni&&(this.removeEventListener($e,ni,ni.$),delete this[fr])}function yn(){var ni=_r(vt,O(arguments));Wr.call(this),this.addEventListener($e,this[fr]=ni,ni.$=Bt),ni._=vt}function li(){var ni=new RegExp("^__on([^.]+)"+w.requote($e)+"$"),Pi;for(var Ji in this)if(Pi=Ji.match(ni)){var na=this[Ji];this.removeEventListener(Pi[1],na,na.$),delete this[Ji]}}return pr?vt?yn:Wr:vt?ee:li}var $r=w.map({mouseenter:"mouseover",mouseleave:"mouseout"});z&&$r.forEach(function($e){"on"+$e in z&&$r.remove($e)});function rn($e,vt){return function(Bt){var fr=w.event;w.event=Bt,vt[0]=this.__data__;try{$e.apply(this,vt)}finally{w.event=fr}}}function kn($e,vt){var Bt=rn($e,vt);return function(fr){var pr=this,_r=fr.relatedTarget;(!_r||_r!==pr&&!(_r.compareDocumentPosition(pr)&8))&&Bt.call(pr,fr)}}var Rn,ci=0;function In($e){var vt=".dragsuppress-"+ ++ci,Bt="click"+vt,fr=w.select(u($e)).on("touchmove"+vt,we).on("dragstart"+vt,we).on("selectstart"+vt,we);if(Rn==null&&(Rn="onselectstart"in $e?!1:J($e.style,"userSelect")),Rn){var pr=l($e).style,_r=pr[Rn];pr[Rn]="none"}return function(Yr){if(fr.on(vt,null),Rn&&(pr[Rn]=_r),Yr){var Wr=function(){fr.on(Bt,null)};fr.on(Bt,function(){we(),Wr()},!0),setTimeout(Wr,0)}}}w.mouse=function($e){return mr($e,Oe())};var Gn=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function mr($e,vt){vt.changedTouches&&(vt=vt.changedTouches[0]);var Bt=$e.ownerSVGElement||$e;if(Bt.createSVGPoint){var fr=Bt.createSVGPoint();if(Gn<0){var pr=u($e);if(pr.scrollX||pr.scrollY){Bt=w.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var _r=Bt[0][0].getScreenCTM();Gn=!(_r.f||_r.e),Bt.remove()}}return Gn?(fr.x=vt.pageX,fr.y=vt.pageY):(fr.x=vt.clientX,fr.y=vt.clientY),fr=fr.matrixTransform($e.getScreenCTM().inverse()),[fr.x,fr.y]}var Yr=$e.getBoundingClientRect();return[vt.clientX-Yr.left-$e.clientLeft,vt.clientY-Yr.top-$e.clientTop]}w.touch=function($e,vt,Bt){if(arguments.length<3&&(Bt=vt,vt=Oe().changedTouches),vt){for(var fr=0,pr=vt.length,_r;fr<pr;++fr)if((_r=vt[fr]).identifier===Bt)return mr($e,_r)}},w.behavior.drag=function(){var $e=ke(pr,"drag","dragstart","dragend"),vt=null,Bt=_r(ee,w.mouse,u,"mousemove","mouseup"),fr=_r(St,w.touch,K,"touchmove","touchend");function pr(){this.on("mousedown.drag",Bt).on("touchstart.drag",fr)}function _r(Yr,Wr,yn,li,ni){return function(){var Pi=this,Ji=w.event.target.correspondingElement||w.event.target,na=Pi.parentNode,_o=$e.of(Pi,arguments),ca=0,La=Yr(),qa=".drag"+(La==null?"":"-"+La),bo,So=w.select(yn(Ji)).on(li+qa,ul).on(ni+qa,Us),Va=In(Ji),os=Wr(na,La);vt?(bo=vt.apply(Pi,arguments),bo=[bo.x-os[0],bo.y-os[1]]):bo=[0,0],_o({type:"dragstart"});function ul(){var rl=Wr(na,La),Yl,eu;rl&&(Yl=rl[0]-os[0],eu=rl[1]-os[1],ca|=Yl|eu,os=rl,_o({type:"drag",x:rl[0]+bo[0],y:rl[1]+bo[1],dx:Yl,dy:eu}))}function Us(){Wr(na,La)&&(So.on(li+qa,null).on(ni+qa,null),Va(ca),_o({type:"dragend"}))}}}return pr.origin=function(Yr){return arguments.length?(vt=Yr,pr):vt},w.rebind(pr,$e,"on")};function St(){return w.event.changedTouches[0].identifier}w.touches=function($e,vt){return arguments.length<2&&(vt=Oe().touches),vt?O(vt).map(function(Bt){var fr=mr($e,Bt);return fr.identifier=Bt.identifier,fr}):[]};var Ot=1e-6,Et=Ot*Ot,je=Math.PI,Ye=2*je,et=Ye-Ot,mt=je/2,Nt=je/180,lr=180/je;function br($e,vt,Bt){return(vt[0]-$e[0])*(Bt[1]-$e[1])-(vt[1]-$e[1])*(Bt[0]-$e[0])}function Or($e){return $e>1?mt:$e<-1?-mt:Math.asin($e)}function tn($e){return(($e=Math.exp($e))-1/$e)/2}function Jr($e){return(($e=Math.exp($e))+1/$e)/2}function dn($e){return(($e=Math.exp(2*$e))-1)/($e+1)}var on=Math.SQRT2,Nn=2,Wi=4;w.interpolateZoom=function($e,vt){var Bt=$e[0],fr=$e[1],pr=$e[2],_r=vt[0],Yr=vt[1],Wr=vt[2],yn=_r-Bt,li=Yr-fr,ni=yn*yn+li*li,Pi,Ji;if(ni<Et)Ji=Math.log(Wr/pr)/on,Pi=function(bo){return[Bt+bo*yn,fr+bo*li,pr*Math.exp(on*bo*Ji)]};else{var na=Math.sqrt(ni),_o=(Wr*Wr-pr*pr+Wi*ni)/(2*pr*Nn*na),ca=(Wr*Wr-pr*pr-Wi*ni)/(2*Wr*Nn*na),La=Math.log(Math.sqrt(_o*_o+1)-_o),qa=Math.log(Math.sqrt(ca*ca+1)-ca);Ji=(qa-La)/on,Pi=function(bo){var So=bo*Ji,Va=Jr(La),os=pr/(Nn*na)*(Va*dn(on*So+La)-tn(La));return[Bt+os*yn,fr+os*li,pr*Va/Jr(on*So+La)]}}return Pi.duration=Ji*1e3,Pi},w.behavior.zoom=function(){var $e={x:0,y:0,k:1},vt,Bt,fr,pr=[960,500],_r=Oa,Yr=250,Wr=0,yn="mousedown.zoom",li="mousemove.zoom",ni="mouseup.zoom",Pi,Ji="touchstart.zoom",na,_o=ke(So,"zoomstart","zoom","zoomend"),ca,La,qa,bo;Aa||(Aa="onwheel"in z?(Da=function(){return-w.event.deltaY*(w.event.deltaMode?120:1)},"wheel"):"onmousewheel"in z?(Da=function(){return w.event.wheelDelta},"mousewheel"):(Da=function(){return-w.event.detail},"MozMousePixelScroll"));function So(Rl){Rl.on(yn,Zu).on(Aa+".zoom",Ph).on("dblclick.zoom",xd).on(Ji,Qc)}So.event=function(Rl){Rl.each(function(){var Cc=_o.of(this,arguments),$c=$e;Zl?w.select(this).transition().each("start.zoom",function(){$e=this.__chart__||{x:0,y:0,k:1},eu(Cc)}).tween("zoom:zoom",function(){var ud=pr[0],Uf=pr[1],mv=Bt?Bt[0]:ud/2,Mf=Bt?Bt[1]:Uf/2,cd=w.interpolateZoom([(mv-$e.x)/$e.k,(Mf-$e.y)/$e.k,ud/$e.k],[(mv-$c.x)/$c.k,(Mf-$c.y)/$c.k,ud/$c.k]);return function(qv){var Th=cd(qv),rr=ud/Th[2];this.__chart__=$e={x:mv-Th[0]*rr,y:Mf-Th[1]*rr,k:rr},Vc(Cc)}}).each("interrupt.zoom",function(){ou(Cc)}).each("end.zoom",function(){ou(Cc)}):(this.__chart__=$e,eu(Cc),Vc(Cc),ou(Cc))})},So.translate=function(Rl){return arguments.length?($e={x:+Rl[0],y:+Rl[1],k:$e.k},Yl(),So):[$e.x,$e.y]},So.scale=function(Rl){return arguments.length?($e={x:$e.x,y:$e.y,k:null},ul(+Rl),Yl(),So):$e.k},So.scaleExtent=function(Rl){return arguments.length?(_r=Rl==null?Oa:[+Rl[0],+Rl[1]],So):_r},So.center=function(Rl){return arguments.length?(fr=Rl&&[+Rl[0],+Rl[1]],So):fr},So.size=function(Rl){return arguments.length?(pr=Rl&&[+Rl[0],+Rl[1]],So):pr},So.duration=function(Rl){return arguments.length?(Yr=+Rl,So):Yr},So.x=function(Rl){return arguments.length?(La=Rl,ca=Rl.copy(),$e={x:0,y:0,k:1},So):La},So.y=function(Rl){return arguments.length?(bo=Rl,qa=Rl.copy(),$e={x:0,y:0,k:1},So):bo};function Va(Rl){return[(Rl[0]-$e.x)/$e.k,(Rl[1]-$e.y)/$e.k]}function os(Rl){return[Rl[0]*$e.k+$e.x,Rl[1]*$e.k+$e.y]}function ul(Rl){$e.k=Math.max(_r[0],Math.min(_r[1],Rl))}function Us(Rl,Cc){Cc=os(Cc),$e.x+=Rl[0]-Cc[0],$e.y+=Rl[1]-Cc[1]}function rl(Rl,Cc,$c,ud){Rl.__chart__={x:$e.x,y:$e.y,k:$e.k},ul(Math.pow(2,ud)),Us(Bt=Cc,$c),Rl=w.select(Rl),Yr>0&&(Rl=Rl.transition().duration(Yr)),Rl.call(So.event)}function Yl(){La&&La.domain(ca.range().map(function(Rl){return(Rl-$e.x)/$e.k}).map(ca.invert)),bo&&bo.domain(qa.range().map(function(Rl){return(Rl-$e.y)/$e.k}).map(qa.invert))}function eu(Rl){Wr++||Rl({type:"zoomstart"})}function Vc(Rl){Yl(),Rl({type:"zoom",scale:$e.k,translate:[$e.x,$e.y]})}function ou(Rl){--Wr||(Rl({type:"zoomend"}),Bt=null)}function Zu(){var Rl=this,Cc=_o.of(Rl,arguments),$c=0,ud=w.select(u(Rl)).on(li,Mf).on(ni,cd),Uf=Va(w.mouse(Rl)),mv=In(Rl);mo.call(Rl),eu(Cc);function Mf(){$c=1,Us(w.mouse(Rl),Uf),Vc(Cc)}function cd(){ud.on(li,null).on(ni,null),mv($c),ou(Cc)}}function Qc(){var Rl=this,Cc=_o.of(Rl,arguments),$c={},ud=0,Uf,mv=".zoom-"+w.event.changedTouches[0].identifier,Mf="touchmove"+mv,cd="touchend"+mv,qv=[],Th=w.select(Rl),rr=In(Rl);En(),eu(Cc),Th.on(yn,null).on(Ji,En);function mn(){var zi=w.touches(Rl);return Uf=$e.k,zi.forEach(function(Fi){Fi.identifier in $c&&($c[Fi.identifier]=Va(Fi))}),zi}function En(){var zi=w.event.target;w.select(zi).on(Mf,ia).on(cd,Wa),qv.push(zi);for(var Fi=w.event.changedTouches,Ao=0,To=Fi.length;Ao<To;++Ao)$c[Fi[Ao].identifier]=null;var Eo=mn(),qo=Date.now();if(Eo.length===1){if(qo-na<500){var qs=Eo[0];rl(Rl,qs,$c[qs.identifier],Math.floor(Math.log($e.k)/Math.LN2)+1),we()}na=qo}else if(Eo.length>1){var qs=Eo[0],xs=Eo[1],Uo=qs[0]-xs[0],io=qs[1]-xs[1];ud=Uo*Uo+io*io}}function ia(){var zi=w.touches(Rl),Fi,Ao,To,Eo;mo.call(Rl);for(var qo=0,qs=zi.length;qo<qs;++qo,Eo=null)if(To=zi[qo],Eo=$c[To.identifier]){if(Ao)break;Fi=To,Ao=Eo}if(Eo){var xs=(xs=To[0]-Fi[0])*xs+(xs=To[1]-Fi[1])*xs,Uo=ud&&Math.sqrt(xs/ud);Fi=[(Fi[0]+To[0])/2,(Fi[1]+To[1])/2],Ao=[(Ao[0]+Eo[0])/2,(Ao[1]+Eo[1])/2],ul(Uo*Uf)}na=null,Us(Fi,Ao),Vc(Cc)}function Wa(){if(w.event.touches.length){for(var zi=w.event.changedTouches,Fi=0,Ao=zi.length;Fi<Ao;++Fi)delete $c[zi[Fi].identifier];for(var To in $c)return void mn()}w.selectAll(qv).on(mv,null),Th.on(yn,Zu).on(Ji,Qc),rr(),ou(Cc)}}function Ph(){var Rl=_o.of(this,arguments);Pi?clearTimeout(Pi):(mo.call(this),vt=Va(Bt=fr||w.mouse(this)),eu(Rl)),Pi=setTimeout(function(){Pi=null,ou(Rl)},50),we(),ul(Math.pow(2,Da()*.002)*$e.k),Us(Bt,vt),Vc(Rl)}function xd(){var Rl=w.mouse(this),Cc=Math.log($e.k)/Math.LN2;rl(this,Rl,Va(Rl),w.event.shiftKey?Math.ceil(Cc)-1:Math.floor(Cc)+1)}return w.rebind(So,_o,"on")};var Oa=[0,1/0],Da,Aa;w.color=Ka;function Ka(){}Ka.prototype.toString=function(){return this.rgb()+""},w.hsl=Sa;function Sa($e,vt,Bt){return this instanceof Sa?(this.h=+$e,this.s=+vt,void(this.l=+Bt)):arguments.length<2?$e instanceof Sa?new Sa($e.h,$e.s,$e.l):pi(""+$e,_i,Sa):new Sa($e,vt,Bt)}var no=Sa.prototype=new Ka;no.brighter=function($e){return $e=Math.pow(.7,arguments.length?$e:1),new Sa(this.h,this.s,this.l/$e)},no.darker=function($e){return $e=Math.pow(.7,arguments.length?$e:1),new Sa(this.h,this.s,$e*this.l)},no.rgb=function(){return Fo(this.h,this.s,this.l)};function Fo($e,vt,Bt){var fr,pr;$e=isNaN($e)?0:($e%=360)<0?$e+360:$e,vt=isNaN(vt)||vt<0?0:vt>1?1:vt,Bt=Bt<0?0:Bt>1?1:Bt,pr=Bt<=.5?Bt*(1+vt):Bt+vt-Bt*vt,fr=2*Bt-pr;function _r(Wr){return Wr>360?Wr-=360:Wr<0&&(Wr+=360),Wr<60?fr+(pr-fr)*Wr/60:Wr<180?pr:Wr<240?fr+(pr-fr)*(240-Wr)/60:fr}function Yr(Wr){return Math.round(_r(Wr)*255)}return new er(Yr($e+120),Yr($e),Yr($e-120))}w.hcl=an;function an($e,vt,Bt){return this instanceof an?(this.h=+$e,this.c=+vt,void(this.l=+Bt)):arguments.length<2?$e instanceof an?new an($e.h,$e.c,$e.l):$e instanceof Kr?ro($e.l,$e.a,$e.b):ro(($e=fi(($e=w.rgb($e)).r,$e.g,$e.b)).l,$e.a,$e.b):new an($e,vt,Bt)}var Hr=an.prototype=new Ka;Hr.brighter=function($e){return new an(this.h,this.c,Math.min(100,this.l+$n*(arguments.length?$e:1)))},Hr.darker=function($e){return new an(this.h,this.c,Math.max(0,this.l-$n*(arguments.length?$e:1)))},Hr.rgb=function(){return nn(this.h,this.c,this.l).rgb()};function nn($e,vt,Bt){return isNaN($e)&&($e=0),isNaN(vt)&&(vt=0),new Kr(Bt,Math.cos($e*=Nt)*vt,Math.sin($e)*vt)}w.lab=Kr;function Kr($e,vt,Bt){return this instanceof Kr?(this.l=+$e,this.a=+vt,void(this.b=+Bt)):arguments.length<2?$e instanceof Kr?new Kr($e.l,$e.a,$e.b):$e instanceof an?nn($e.h,$e.c,$e.l):fi(($e=er($e)).r,$e.g,$e.b):new Kr($e,vt,Bt)}var $n=18,Ai=.95047,aa=1,Ci=1.08883,Ta=Kr.prototype=new Ka;Ta.brighter=function($e){return new Kr(Math.min(100,this.l+$n*(arguments.length?$e:1)),this.a,this.b)},Ta.darker=function($e){return new Kr(Math.max(0,this.l-$n*(arguments.length?$e:1)),this.a,this.b)},Ta.rgb=function(){return Na(this.l,this.a,this.b)};function Na($e,vt,Bt){var fr=($e+16)/116,pr=fr+vt/500,_r=fr-Bt/200;return pr=oo(pr)*Ai,fr=oo(fr)*aa,_r=oo(_r)*Ci,new er(vr(3.2404542*pr-1.5371385*fr-.4985314*_r),vr(-.969266*pr+1.8760108*fr+.041556*_r),vr(.0556434*pr-.2040259*fr+1.0572252*_r))}function ro($e,vt,Bt){return $e>0?new an(Math.atan2(Bt,vt)*lr,Math.sqrt(vt*vt+Bt*Bt),$e):new an(NaN,NaN,$e)}function oo($e){return $e>.206893034?$e*$e*$e:($e-4/29)/7.787037}function xo($e){return $e>.008856?Math.pow($e,1/3):7.787037*$e+4/29}function vr($e){return Math.round(255*($e<=.00304?12.92*$e:1.055*Math.pow($e,1/2.4)-.055))}w.rgb=er;function er($e,vt,Bt){return this instanceof er?(this.r=~~$e,this.g=~~vt,void(this.b=~~Bt)):arguments.length<2?$e instanceof er?new er($e.r,$e.g,$e.b):pi(""+$e,er,Fo):new er($e,vt,Bt)}function si($e){return new er($e>>16,$e>>8&255,$e&255)}function ei($e){return si($e)+""}var Kn=er.prototype=new Ka;Kn.brighter=function($e){$e=Math.pow(.7,arguments.length?$e:1);var vt=this.r,Bt=this.g,fr=this.b,pr=30;return!vt&&!Bt&&!fr?new er(pr,pr,pr):(vt&&vt<pr&&(vt=pr),Bt&&Bt<pr&&(Bt=pr),fr&&fr<pr&&(fr=pr),new er(Math.min(255,vt/$e),Math.min(255,Bt/$e),Math.min(255,fr/$e)))},Kn.darker=function($e){return $e=Math.pow(.7,arguments.length?$e:1),new er($e*this.r,$e*this.g,$e*this.b)},Kn.hsl=function(){return _i(this.r,this.g,this.b)},Kn.toString=function(){return"#"+qn(this.r)+qn(this.g)+qn(this.b)};function qn($e){return $e<16?"0"+Math.max(0,$e).toString(16):Math.min(255,$e).toString(16)}function pi($e,vt,Bt){var fr=0,pr=0,_r=0,Yr,Wr,yn;if(Yr=/([a-z]+)\((.*)\)/.exec($e=$e.toLowerCase()),Yr)switch(Wr=Yr[2].split(","),Yr[1]){case"hsl":return Bt(parseFloat(Wr[0]),parseFloat(Wr[1])/100,parseFloat(Wr[2])/100);case"rgb":return vt($i(Wr[0]),$i(Wr[1]),$i(Wr[2]))}return(yn=Hi.get($e))?vt(yn.r,yn.g,yn.b):($e!=null&&$e.charAt(0)==="#"&&!isNaN(yn=parseInt($e.slice(1),16))&&($e.length===4?(fr=(yn&3840)>>4,fr=fr>>4|fr,pr=yn&240,pr=pr>>4|pr,_r=yn&15,_r=_r<<4|_r):$e.length===7&&(fr=(yn&16711680)>>16,pr=(yn&65280)>>8,_r=yn&255)),vt(fr,pr,_r))}function _i($e,vt,Bt){var fr=Math.min($e/=255,vt/=255,Bt/=255),pr=Math.max($e,vt,Bt),_r=pr-fr,Yr,Wr,yn=(pr+fr)/2;return _r?(Wr=yn<.5?_r/(pr+fr):_r/(2-pr-fr),$e==pr?Yr=(vt-Bt)/_r+(vt<Bt?6:0):vt==pr?Yr=(Bt-$e)/_r+2:Yr=($e-vt)/_r+4,Yr*=60):(Yr=NaN,Wr=yn>0&&yn<1?0:Yr),new Sa(Yr,Wr,yn)}function fi($e,vt,Bt){$e=Ri($e),vt=Ri(vt),Bt=Ri(Bt);var fr=xo((.4124564*$e+.3575761*vt+.1804375*Bt)/Ai),pr=xo((.2126729*$e+.7151522*vt+.072175*Bt)/aa),_r=xo((.0193339*$e+.119192*vt+.9503041*Bt)/Ci);return Kr(116*pr-16,500*(fr-pr),200*(pr-_r))}function Ri($e){return($e/=255)<=.04045?$e/12.92:Math.pow(($e+.055)/1.055,2.4)}function $i($e){var vt=parseFloat($e);return $e.charAt($e.length-1)==="%"?Math.round(vt*2.55):vt}var Hi=w.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});Hi.forEach(function($e,vt){Hi.set($e,si(vt))});function wr($e){return typeof $e=="function"?$e:function(){return $e}}w.functor=wr,w.xhr=gn(K);function gn($e){return function(vt,Bt,fr){return arguments.length===2&&typeof Bt=="function"&&(fr=Bt,Bt=null),Xn(vt,Bt,$e,fr)}}function Xn($e,vt,Bt,fr){var pr={},_r=w.dispatch("beforesend","progress","load","error"),Yr={},Wr=new XMLHttpRequest,yn=null;self.XDomainRequest&&!("withCredentials"in Wr)&&/^(http(s)?:)?\/\//.test($e)&&(Wr=new XDomainRequest),"onload"in Wr?Wr.onload=Wr.onerror=li:Wr.onreadystatechange=function(){Wr.readyState>3&&li()};function li(){var ni=Wr.status,Pi;if(!ni&&ha(Wr)||ni>=200&&ni<300||ni===304){try{Pi=Bt.call(pr,Wr)}catch(Ji){_r.error.call(pr,Ji);return}_r.load.call(pr,Pi)}else _r.error.call(pr,Wr)}return Wr.onprogress=function(ni){var Pi=w.event;w.event=ni;try{_r.progress.call(pr,Wr)}finally{w.event=Pi}},pr.header=function(ni,Pi){return ni=(ni+"").toLowerCase(),arguments.length<2?Yr[ni]:(Pi==null?delete Yr[ni]:Yr[ni]=Pi+"",pr)},pr.mimeType=function(ni){return arguments.length?(vt=ni==null?null:ni+"",pr):vt},pr.responseType=function(ni){return arguments.length?(yn=ni,pr):yn},pr.response=function(ni){return Bt=ni,pr},["get","post"].forEach(function(ni){pr[ni]=function(){return pr.send.apply(pr,[ni].concat(O(arguments)))}}),pr.send=function(ni,Pi,Ji){if(arguments.length===2&&typeof Pi=="function"&&(Ji=Pi,Pi=null),Wr.open(ni,$e,!0),vt!=null&&!("accept"in Yr)&&(Yr.accept=vt+",*/*"),Wr.setRequestHeader)for(var na in Yr)Wr.setRequestHeader(na,Yr[na]);return vt!=null&&Wr.overrideMimeType&&Wr.overrideMimeType(vt),yn!=null&&(Wr.responseType=yn),Ji!=null&&pr.on("error",Ji).on("load",function(_o){Ji(null,_o)}),_r.beforesend.call(pr,Wr),Wr.send(Pi??null),pr},pr.abort=function(){return Wr.abort(),pr},w.rebind(pr,_r,"on"),fr==null?pr:pr.get(Yi(fr))}function Yi($e){return $e.length===1?function(vt,Bt){$e(vt==null?Bt:null)}:$e}function ha($e){var vt=$e.responseType;return vt&&vt!=="text"?$e.response:$e.responseText}w.dsv=function($e,vt){var Bt=new RegExp('["'+$e+`
]`),fr=$e.charCodeAt(0);function pr(li,ni,Pi){arguments.length<3&&(Pi=ni,ni=null);var Ji=Xn(li,vt,ni==null?_r:Yr(ni),Pi);return Ji.row=function(na){return arguments.length?Ji.response((ni=na)==null?_r:Yr(na)):ni},Ji}function _r(li){return pr.parse(li.responseText)}function Yr(li){return function(ni){return pr.parse(ni.responseText,li)}}pr.parse=function(li,ni){var Pi;return pr.parseRows(li,function(Ji,na){if(Pi)return Pi(Ji,na-1);var _o=function(ca){for(var La={},qa=Ji.length,bo=0;bo<qa;++bo)La[Ji[bo]]=ca[bo];return La};Pi=ni?function(ca,La){return ni(_o(ca),La)}:_o})},pr.parseRows=function(li,ni){var Pi={},Ji={},na=[],_o=li.length,ca=0,La=0,qa,bo;function So(){if(ca>=_o)return Ji;if(bo)return bo=!1,Pi;var os=ca;if(li.charCodeAt(os)===34){for(var ul=os;ul++<_o;)if(li.charCodeAt(ul)===34){if(li.charCodeAt(ul+1)!==34)break;++ul}ca=ul+2;var Us=li.charCodeAt(ul+1);return Us===13?(bo=!0,li.charCodeAt(ul+2)===10&&++ca):Us===10&&(bo=!0),li.slice(os+1,ul).replace(/""/g,'"')}for(;ca<_o;){var Us=li.charCodeAt(ca++),rl=1;if(Us===10)bo=!0;else if(Us===13)bo=!0,li.charCodeAt(ca)===10&&(++ca,++rl);else if(Us!==fr)continue;return li.slice(os,ca-rl)}return li.slice(os)}for(;(qa=So())!==Ji;){for(var Va=[];qa!==Pi&&qa!==Ji;)Va.push(qa),qa=So();ni&&(Va=ni(Va,La++))==null||na.push(Va)}return na},pr.format=function(li){if(Array.isArray(li[0]))return pr.formatRows(li);var ni=new Z,Pi=[];return li.forEach(function(Ji){for(var na in Ji)ni.has(na)||Pi.push(ni.add(na))}),[Pi.map(yn).join($e)].concat(li.map(function(Ji){return Pi.map(function(na){return yn(Ji[na])}).join($e)})).join(`
`)},pr.formatRows=function(li){return li.map(Wr).join(`
`)};function Wr(li){return li.map(yn).join($e)}function yn(li){return Bt.test(li)?'"'+li.replace(/\"/g,'""')+'"':li}return pr},w.csv=w.dsv(",","text/csv"),w.tsv=w.dsv("	","text/tab-separated-values");var Ca,Ba,ji,Ea,cs=this[J(this,"requestAnimationFrame")]||function($e){setTimeout($e,17)};w.timer=function(){No.apply(this,arguments)};function No($e,vt,Bt){var fr=arguments.length;fr<2&&(vt=0),fr<3&&(Bt=Date.now());var pr=Bt+vt,_r={c:$e,t:pr,n:null};return Ba?Ba.n=_r:Ca=_r,Ba=_r,ji||(Ea=clearTimeout(Ea),ji=1,cs(Vs)),_r}function Vs(){var $e=pl(),vt=kl()-$e;vt>24?(isFinite(vt)&&(clearTimeout(Ea),Ea=setTimeout(Vs,vt)),ji=0):(ji=1,cs(Vs))}w.timer.flush=function(){pl(),kl()};function pl(){for(var $e=Date.now(),vt=Ca;vt;)$e>=vt.t&&vt.c($e-vt.t)&&(vt.c=null),vt=vt.n;return $e}function kl(){for(var $e,vt=Ca,Bt=1/0;vt;)vt.c?(vt.t<Bt&&(Bt=vt.t),vt=($e=vt).n):vt=$e?$e.n=vt.n:Ca=vt.n;return Ba=$e,Bt}w.round=function($e,vt){return vt?Math.round($e*(vt=Math.pow(10,vt)))/vt:Math.round($e)},w.geom={};function El($e){return $e[0]}function iu($e){return $e[1]}w.geom.hull=function($e){var vt=El,Bt=iu;if(arguments.length)return fr($e);function fr(pr){if(pr.length<3)return[];var _r=wr(vt),Yr=wr(Bt),Wr,yn=pr.length,li=[],ni=[];for(Wr=0;Wr<yn;Wr++)li.push([+_r.call(this,pr[Wr],Wr),+Yr.call(this,pr[Wr],Wr),Wr]);for(li.sort(yl),Wr=0;Wr<yn;Wr++)ni.push([li[Wr][0],-li[Wr][1]]);var Pi=bu(li),Ji=bu(ni),na=Ji[0]===Pi[0],_o=Ji[Ji.length-1]===Pi[Pi.length-1],ca=[];for(Wr=Pi.length-1;Wr>=0;--Wr)ca.push(pr[li[Pi[Wr]][2]]);for(Wr=+na;Wr<Ji.length-_o;++Wr)ca.push(pr[li[Ji[Wr]][2]]);return ca}return fr.x=function(pr){return arguments.length?(vt=pr,fr):vt},fr.y=function(pr){return arguments.length?(Bt=pr,fr):Bt},fr};function bu($e){for(var vt=$e.length,Bt=[0,1],fr=2,pr=2;pr<vt;pr++){for(;fr>1&&br($e[Bt[fr-2]],$e[Bt[fr-1]],$e[pr])<=0;)--fr;Bt[fr++]=pr}return Bt.slice(0,fr)}function yl($e,vt){return $e[0]-vt[0]||$e[1]-vt[1]}w.geom.polygon=function($e){return oe($e,ql),$e};var ql=w.geom.polygon.prototype=[];ql.area=function(){for(var $e=-1,vt=this.length,Bt,fr=this[vt-1],pr=0;++$e<vt;)Bt=fr,fr=this[$e],pr+=Bt[1]*fr[0]-Bt[0]*fr[1];return pr*.5},ql.centroid=function($e){var vt=-1,Bt=this.length,fr=0,pr=0,_r,Yr=this[Bt-1],Wr;for(arguments.length||($e=-1/(6*this.area()));++vt<Bt;)_r=Yr,Yr=this[vt],Wr=_r[0]*Yr[1]-Yr[0]*_r[1],fr+=(_r[0]+Yr[0])*Wr,pr+=(_r[1]+Yr[1])*Wr;return[fr*$e,pr*$e]},ql.clip=function($e){for(var vt,Bt=Pf($e),fr=-1,pr=this.length-Pf(this),_r,Yr,Wr=this[pr-1],yn,li,ni;++fr<pr;){for(vt=$e.slice(),$e.length=0,yn=this[fr],li=vt[(Yr=vt.length-Bt)-1],_r=-1;++_r<Yr;)ni=vt[_r],rc(ni,Wr,yn)?(rc(li,Wr,yn)||$e.push(zc(li,ni,Wr,yn)),$e.push(ni)):rc(li,Wr,yn)&&$e.push(zc(li,ni,Wr,yn)),li=ni;Bt&&$e.push($e[0]),Wr=yn}return $e};function rc($e,vt,Bt){return(Bt[0]-vt[0])*($e[1]-vt[1])<(Bt[1]-vt[1])*($e[0]-vt[0])}function zc($e,vt,Bt,fr){var pr=$e[0],_r=Bt[0],Yr=vt[0]-pr,Wr=fr[0]-_r,yn=$e[1],li=Bt[1],ni=vt[1]-yn,Pi=fr[1]-li,Ji=(Wr*(yn-li)-Pi*(pr-_r))/(Pi*Yr-Wr*ni);return[pr+Ji*Yr,yn+Ji*ni]}function Pf($e){var vt=$e[0],Bt=$e[$e.length-1];return!(vt[0]-Bt[0]||vt[1]-Bt[1])}var ju,Ql,lu,dc=[],wc,mc,xu=[];function qu(){zd(this),this.edge=this.site=this.circle=null}function xf($e){var vt=dc.pop()||new qu;return vt.site=$e,vt}function ed($e){uf($e),lu.remove($e),dc.push($e),zd($e)}function Df($e){var vt=$e.circle,Bt=vt.x,fr=vt.cy,pr={x:Bt,y:fr},_r=$e.P,Yr=$e.N,Wr=[$e];ed($e);for(var yn=_r;yn.circle&&g(Bt-yn.circle.x)<Ot&&g(fr-yn.circle.cy)<Ot;)_r=yn.P,Wr.unshift(yn),ed(yn),yn=_r;Wr.unshift(yn),uf(yn);for(var li=Yr;li.circle&&g(Bt-li.circle.x)<Ot&&g(fr-li.circle.cy)<Ot;)Yr=li.N,Wr.push(li),ed(li),li=Yr;Wr.push(li),uf(li);var ni=Wr.length,Pi;for(Pi=1;Pi<ni;++Pi)li=Wr[Pi],yn=Wr[Pi-1],uu(li.edge,yn.site,li.site,pr);yn=Wr[0],li=Wr[ni-1],li.edge=Zc(yn.site,li.site,null,pr),Bc(yn),Bc(li)}function Sc($e){for(var vt=$e.x,Bt=$e.y,fr,pr,_r,Yr,Wr=lu._;Wr;)if(_r=Qo(Wr,Bt)-vt,_r>Ot)Wr=Wr.L;else if(Yr=vt-Sl(Wr,Bt),Yr>Ot){if(!Wr.R){fr=Wr;break}Wr=Wr.R}else{_r>-Ot?(fr=Wr.P,pr=Wr):Yr>-Ot?(fr=Wr,pr=Wr.N):fr=pr=Wr;break}var yn=xf($e);if(lu.insert(fr,yn),!(!fr&&!pr)){if(fr===pr){uf(fr),pr=xf(fr.site),lu.insert(yn,pr),yn.edge=pr.edge=Zc(fr.site,yn.site),Bc(fr),Bc(pr);return}if(!pr){yn.edge=Zc(fr.site,yn.site);return}uf(fr),uf(pr);var li=fr.site,ni=li.x,Pi=li.y,Ji=$e.x-ni,na=$e.y-Pi,_o=pr.site,ca=_o.x-ni,La=_o.y-Pi,qa=2*(Ji*La-na*ca),bo=Ji*Ji+na*na,So=ca*ca+La*La,Va={x:(La*bo-na*So)/qa+ni,y:(Ji*So-ca*bo)/qa+Pi};uu(pr.edge,li,_o,Va),yn.edge=Zc(li,$e,null,Va),pr.edge=Zc($e,_o,null,Va),Bc(fr),Bc(pr)}}function Qo($e,vt){var Bt=$e.site,fr=Bt.x,pr=Bt.y,_r=pr-vt;if(!_r)return fr;var Yr=$e.P;if(!Yr)return-1/0;Bt=Yr.site;var Wr=Bt.x,yn=Bt.y,li=yn-vt;if(!li)return Wr;var ni=Wr-fr,Pi=1/_r-1/li,Ji=ni/li;return Pi?(-Ji+Math.sqrt(Ji*Ji-2*Pi*(ni*ni/(-2*li)-yn+li/2+pr-_r/2)))/Pi+fr:(fr+Wr)/2}function Sl($e,vt){var Bt=$e.N;if(Bt)return Qo(Bt,vt);var fr=$e.site;return fr.y===vt?fr.x:1/0}function gd($e){this.site=$e,this.edges=[]}gd.prototype.prepare=function(){for(var $e=this.edges,vt=$e.length,Bt;vt--;)Bt=$e[vt].edge,(!Bt.b||!Bt.a)&&$e.splice(vt,1);return $e.sort(wu),$e.length};function $f($e){for(var vt=$e[0][0],Bt=$e[1][0],fr=$e[0][1],pr=$e[1][1],_r,Yr,Wr,yn,li=Ql,ni=li.length,Pi,Ji,na,_o,ca,La;ni--;)if(Pi=li[ni],!(!Pi||!Pi.prepare()))for(na=Pi.edges,_o=na.length,Ji=0;Ji<_o;)La=na[Ji].end(),Wr=La.x,yn=La.y,ca=na[++Ji%_o].start(),_r=ca.x,Yr=ca.y,(g(Wr-_r)>Ot||g(yn-Yr)>Ot)&&(na.splice(Ji,0,new Lf(Md(Pi.site,La,g(Wr-vt)<Ot&&pr-yn>Ot?{x:vt,y:g(_r-vt)<Ot?Yr:pr}:g(yn-pr)<Ot&&Bt-Wr>Ot?{x:g(Yr-pr)<Ot?_r:Bt,y:pr}:g(Wr-Bt)<Ot&&yn-fr>Ot?{x:Bt,y:g(_r-Bt)<Ot?Yr:fr}:g(yn-fr)<Ot&&Wr-vt>Ot?{x:g(Yr-fr)<Ot?_r:vt,y:fr}:null),Pi.site,null)),++_o)}function wu($e,vt){return vt.angle-$e.angle}function Ad(){zd(this),this.x=this.y=this.arc=this.site=this.cy=null}function Bc($e){var vt=$e.P,Bt=$e.N;if(!(!vt||!Bt)){var fr=vt.site,pr=$e.site,_r=Bt.site;if(fr!==_r){var Yr=pr.x,Wr=pr.y,yn=fr.x-Yr,li=fr.y-Wr,ni=_r.x-Yr,La=_r.y-Wr,Pi=2*(yn*La-li*ni);if(!(Pi>=-Et)){var Ji=yn*yn+li*li,na=ni*ni+La*La,_o=(La*Ji-li*na)/Pi,ca=(yn*na-ni*Ji)/Pi,La=ca+Wr,qa=xu.pop()||new Ad;qa.arc=$e,qa.site=pr,qa.x=_o+Yr,qa.y=La+Math.sqrt(_o*_o+ca*ca),qa.cy=La,$e.circle=qa;for(var bo=null,So=mc._;So;)if(qa.y<So.y||qa.y===So.y&&qa.x<=So.x)if(So.L)So=So.L;else{bo=So.P;break}else if(So.R)So=So.R;else{bo=So;break}mc.insert(bo,qa),bo||(wc=qa)}}}}function uf($e){var vt=$e.circle;vt&&(vt.P||(wc=vt.N),mc.remove(vt),xu.push(vt),zd(vt),$e.circle=null)}function Cd($e,vt,Bt,fr){return function(pr){var _r=pr.a,Yr=pr.b,Wr=_r.x,yn=_r.y,li=Yr.x,ni=Yr.y,Pi=0,Ji=1,na=li-Wr,_o=ni-yn,ca;if(ca=$e-Wr,!(!na&&ca>0)){if(ca/=na,na<0){if(ca<Pi)return;ca<Ji&&(Ji=ca)}else if(na>0){if(ca>Ji)return;ca>Pi&&(Pi=ca)}if(ca=Bt-Wr,!(!na&&ca<0)){if(ca/=na,na<0){if(ca>Ji)return;ca>Pi&&(Pi=ca)}else if(na>0){if(ca<Pi)return;ca<Ji&&(Ji=ca)}if(ca=vt-yn,!(!_o&&ca>0)){if(ca/=_o,_o<0){if(ca<Pi)return;ca<Ji&&(Ji=ca)}else if(_o>0){if(ca>Ji)return;ca>Pi&&(Pi=ca)}if(ca=fr-yn,!(!_o&&ca<0)){if(ca/=_o,_o<0){if(ca>Ji)return;ca>Pi&&(Pi=ca)}else if(_o>0){if(ca<Pi)return;ca<Ji&&(Ji=ca)}return Pi>0&&(pr.a={x:Wr+Pi*na,y:yn+Pi*_o}),Ji<1&&(pr.b={x:Wr+Ji*na,y:yn+Ji*_o}),pr}}}}}}function Tl($e){for(var vt=ju,Bt=Cd($e[0][0],$e[0][1],$e[1][0],$e[1][1]),fr=vt.length,pr;fr--;)pr=vt[fr],(!Xu(pr,$e)||!Bt(pr)||g(pr.a.x-pr.b.x)<Ot&&g(pr.a.y-pr.b.y)<Ot)&&(pr.a=pr.b=null,vt.splice(fr,1))}function Xu($e,vt){var Bt=$e.b;if(Bt)return!0;var fr=$e.a,pr=vt[0][0],_r=vt[1][0],Yr=vt[0][1],Wr=vt[1][1],yn=$e.l,li=$e.r,ni=yn.x,Pi=yn.y,Ji=li.x,na=li.y,_o=(ni+Ji)/2,ca=(Pi+na)/2,La,qa;if(na===Pi){if(_o<pr||_o>=_r)return;if(ni>Ji){if(!fr)fr={x:_o,y:Yr};else if(fr.y>=Wr)return;Bt={x:_o,y:Wr}}else{if(!fr)fr={x:_o,y:Wr};else if(fr.y<Yr)return;Bt={x:_o,y:Yr}}}else if(La=(ni-Ji)/(na-Pi),qa=ca-La*_o,La<-1||La>1)if(ni>Ji){if(!fr)fr={x:(Yr-qa)/La,y:Yr};else if(fr.y>=Wr)return;Bt={x:(Wr-qa)/La,y:Wr}}else{if(!fr)fr={x:(Wr-qa)/La,y:Wr};else if(fr.y<Yr)return;Bt={x:(Yr-qa)/La,y:Yr}}else if(Pi<na){if(!fr)fr={x:pr,y:La*pr+qa};else if(fr.x>=_r)return;Bt={x:_r,y:La*_r+qa}}else{if(!fr)fr={x:_r,y:La*_r+qa};else if(fr.x<pr)return;Bt={x:pr,y:La*pr+qa}}return $e.a=fr,$e.b=Bt,!0}function pu($e,vt){this.l=$e,this.r=vt,this.a=this.b=null}function Zc($e,vt,Bt,fr){var pr=new pu($e,vt);return ju.push(pr),Bt&&uu(pr,$e,vt,Bt),fr&&uu(pr,vt,$e,fr),Ql[$e.i].edges.push(new Lf(pr,$e,vt)),Ql[vt.i].edges.push(new Lf(pr,vt,$e)),pr}function Md($e,vt,Bt){var fr=new pu($e,null);return fr.a=vt,fr.b=Bt,ju.push(fr),fr}function uu($e,vt,Bt,fr){!$e.a&&!$e.b?($e.a=fr,$e.l=vt,$e.r=Bt):$e.l===Bt?$e.b=fr:$e.a=fr}function Lf($e,vt,Bt){var fr=$e.a,pr=$e.b;this.edge=$e,this.site=vt,this.angle=Bt?Math.atan2(Bt.y-vt.y,Bt.x-vt.x):$e.l===vt?Math.atan2(pr.x-fr.x,fr.y-pr.y):Math.atan2(fr.x-pr.x,pr.y-fr.y)}Lf.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 op(){this._=null}function zd($e){$e.U=$e.C=$e.L=$e.R=$e.P=$e.N=null}op.prototype={insert:function($e,vt){var Bt,fr,pr;if($e){if(vt.P=$e,vt.N=$e.N,$e.N&&($e.N.P=vt),$e.N=vt,$e.R){for($e=$e.R;$e.L;)$e=$e.L;$e.L=vt}else $e.R=vt;Bt=$e}else this._?($e=td(this._),vt.P=null,vt.N=$e,$e.P=$e.L=vt,Bt=$e):(vt.P=vt.N=null,this._=vt,Bt=null);for(vt.L=vt.R=null,vt.U=Bt,vt.C=!0,$e=vt;Bt&&Bt.C;)fr=Bt.U,Bt===fr.L?(pr=fr.R,pr&&pr.C?(Bt.C=pr.C=!1,fr.C=!0,$e=fr):($e===Bt.R&&(Qp(this,Bt),$e=Bt,Bt=$e.U),Bt.C=!1,fr.C=!0,hh(this,fr))):(pr=fr.L,pr&&pr.C?(Bt.C=pr.C=!1,fr.C=!0,$e=fr):($e===Bt.L&&(hh(this,Bt),$e=Bt,Bt=$e.U),Bt.C=!1,fr.C=!0,Qp(this,fr))),Bt=$e.U;this._.C=!1},remove:function($e){$e.N&&($e.N.P=$e.P),$e.P&&($e.P.N=$e.N),$e.N=$e.P=null;var vt=$e.U,Bt,fr=$e.L,pr=$e.R,_r,Yr;if(fr?pr?_r=td(pr):_r=fr:_r=pr,vt?vt.L===$e?vt.L=_r:vt.R=_r:this._=_r,fr&&pr?(Yr=_r.C,_r.C=$e.C,_r.L=fr,fr.U=_r,_r!==pr?(vt=_r.U,_r.U=$e.U,$e=_r.R,vt.L=$e,_r.R=pr,pr.U=_r):(_r.U=vt,vt=_r,$e=_r.R)):(Yr=$e.C,$e=_r),$e&&($e.U=vt),!Yr){if($e&&$e.C){$e.C=!1;return}do{if($e===this._)break;if($e===vt.L){if(Bt=vt.R,Bt.C&&(Bt.C=!1,vt.C=!0,Qp(this,vt),Bt=vt.R),Bt.L&&Bt.L.C||Bt.R&&Bt.R.C){(!Bt.R||!Bt.R.C)&&(Bt.L.C=!1,Bt.C=!0,hh(this,Bt),Bt=vt.R),Bt.C=vt.C,vt.C=Bt.R.C=!1,Qp(this,vt),$e=this._;break}}else if(Bt=vt.L,Bt.C&&(Bt.C=!1,vt.C=!0,hh(this,vt),Bt=vt.L),Bt.L&&Bt.L.C||Bt.R&&Bt.R.C){(!Bt.L||!Bt.L.C)&&(Bt.R.C=!1,Bt.C=!0,Qp(this,Bt),Bt=vt.L),Bt.C=vt.C,vt.C=Bt.L.C=!1,hh(this,vt),$e=this._;break}Bt.C=!0,$e=vt,vt=vt.U}while(!$e.C);$e&&($e.C=!1)}}};function Qp($e,vt){var Bt=vt,fr=vt.R,pr=Bt.U;pr?pr.L===Bt?pr.L=fr:pr.R=fr:$e._=fr,fr.U=pr,Bt.U=fr,Bt.R=fr.L,Bt.R&&(Bt.R.U=Bt),fr.L=Bt}function hh($e,vt){var Bt=vt,fr=vt.L,pr=Bt.U;pr?pr.L===Bt?pr.L=fr:pr.R=fr:$e._=fr,fr.U=pr,Bt.U=fr,Bt.L=fr.R,Bt.L&&(Bt.L.U=Bt),fr.R=Bt}function td($e){for(;$e.L;)$e=$e.L;return $e}function ev($e,vt){var Bt=$e.sort(Um).pop(),fr,pr,_r;for(ju=[],Ql=new Array($e.length),lu=new op,mc=new op;;)if(_r=wc,Bt&&(!_r||Bt.y<_r.y||Bt.y===_r.y&&Bt.x<_r.x))(Bt.x!==fr||Bt.y!==pr)&&(Ql[Bt.i]=new gd(Bt),Sc(Bt),fr=Bt.x,pr=Bt.y),Bt=$e.pop();else if(_r)Df(_r.arc);else break;vt&&(Tl(vt),$f(vt));var Yr={cells:Ql,edges:ju};return lu=mc=ju=Ql=null,Yr}function Um($e,vt){return vt.y-$e.y||vt.x-$e.x}w.geom.voronoi=function($e){var vt=El,Bt=iu,fr=vt,pr=Bt,_r=Hm;if($e)return Yr($e);function Yr(yn){var li=new Array(yn.length),ni=_r[0][0],Pi=_r[0][1],Ji=_r[1][0],na=_r[1][1];return ev(Wr(yn),_r).cells.forEach(function(_o,ca){var La=_o.edges,qa=_o.site,bo=li[ca]=La.length?La.map(function(So){var Va=So.start();return[Va.x,Va.y]}):qa.x>=ni&&qa.x<=Ji&&qa.y>=Pi&&qa.y<=na?[[ni,na],[Ji,na],[Ji,Pi],[ni,Pi]]:[];bo.point=yn[ca]}),li}function Wr(yn){return yn.map(function(li,ni){return{x:Math.round(fr(li,ni)/Ot)*Ot,y:Math.round(pr(li,ni)/Ot)*Ot,i:ni}})}return Yr.links=function(yn){return ev(Wr(yn)).edges.filter(function(li){return li.l&&li.r}).map(function(li){return{source:yn[li.l.i],target:yn[li.r.i]}})},Yr.triangles=function(yn){var li=[];return ev(Wr(yn)).cells.forEach(function(ni,Pi){for(var Ji=ni.site,na=ni.edges.sort(wu),_o=-1,ca=na.length,La,qa=na[ca-1].edge,bo=qa.l===Ji?qa.r:qa.l;++_o<ca;)La=bo,qa=na[_o].edge,bo=qa.l===Ji?qa.r:qa.l,Pi<La.i&&Pi<bo.i&&om(Ji,La,bo)<0&&li.push([yn[Pi],yn[La.i],yn[bo.i]])}),li},Yr.x=function(yn){return arguments.length?(fr=wr(vt=yn),Yr):vt},Yr.y=function(yn){return arguments.length?(pr=wr(Bt=yn),Yr):Bt},Yr.clipExtent=function(yn){return arguments.length?(_r=yn??Hm,Yr):_r===Hm?null:_r},Yr.size=function(yn){return arguments.length?Yr.clipExtent(yn&&[[0,0],yn]):_r===Hm?null:_r&&_r[1]},Yr};var Hm=[[-1e6,-1e6],[1e6,1e6]];function om($e,vt,Bt){return($e.x-Bt.x)*(vt.y-$e.y)-($e.x-vt.x)*(Bt.y-$e.y)}w.geom.delaunay=function($e){return w.geom.voronoi().triangles($e)},w.geom.quadtree=function($e,vt,Bt,fr,pr){var _r=El,Yr=iu,Wr;if(Wr=arguments.length)return _r=K0,Yr=o1,Wr===3&&(pr=Bt,fr=vt,Bt=vt=0),yn($e);function yn(li){var ni,Pi=wr(_r),Ji=wr(Yr),na,_o,ca,La,qa,bo,So,Va;if(vt!=null)qa=vt,bo=Bt,So=fr,Va=pr;else if(So=Va=-(qa=bo=1/0),na=[],_o=[],La=li.length,Wr)for(ca=0;ca<La;++ca)ni=li[ca],ni.x<qa&&(qa=ni.x),ni.y<bo&&(bo=ni.y),ni.x>So&&(So=ni.x),ni.y>Va&&(Va=ni.y),na.push(ni.x),_o.push(ni.y);else for(ca=0;ca<La;++ca){var os=+Pi(ni=li[ca],ca),ul=+Ji(ni,ca);os<qa&&(qa=os),ul<bo&&(bo=ul),os>So&&(So=os),ul>Va&&(Va=ul),na.push(os),_o.push(ul)}var Us=So-qa,rl=Va-bo;Us>rl?Va=bo+Us:So=qa+rl;function Yl(ou,Zu,Qc,Ph,xd,Rl,Cc,$c){if(!(isNaN(Qc)||isNaN(Ph)))if(ou.leaf){var ud=ou.x,Uf=ou.y;if(ud!=null)if(g(ud-Qc)+g(Uf-Ph)<.01)eu(ou,Zu,Qc,Ph,xd,Rl,Cc,$c);else{var mv=ou.point;ou.x=ou.y=ou.point=null,eu(ou,mv,ud,Uf,xd,Rl,Cc,$c),eu(ou,Zu,Qc,Ph,xd,Rl,Cc,$c)}else ou.x=Qc,ou.y=Ph,ou.point=Zu}else eu(ou,Zu,Qc,Ph,xd,Rl,Cc,$c)}function eu(ou,Zu,Qc,Ph,xd,Rl,Cc,$c){var ud=(xd+Cc)*.5,Uf=(Rl+$c)*.5,mv=Qc>=ud,Mf=Ph>=Uf,cd=Mf<<1|mv;ou.leaf=!1,ou=ou.nodes[cd]||(ou.nodes[cd]=Of()),mv?xd=ud:Cc=ud,Mf?Rl=Uf:$c=Uf,Yl(ou,Zu,Qc,Ph,xd,Rl,Cc,$c)}var Vc=Of();if(Vc.add=function(ou){Yl(Vc,ou,+Pi(ou,++ca),+Ji(ou,ca),qa,bo,So,Va)},Vc.visit=function(ou){xm(ou,Vc,qa,bo,So,Va)},Vc.find=function(ou){return J0(Vc,ou[0],ou[1],qa,bo,So,Va)},ca=-1,vt==null){for(;++ca<La;)Yl(Vc,li[ca],na[ca],_o[ca],qa,bo,So,Va);--ca}else li.forEach(Vc.add);return na=_o=li=ni=null,Vc}return yn.x=function(li){return arguments.length?(_r=li,yn):_r},yn.y=function(li){return arguments.length?(Yr=li,yn):Yr},yn.extent=function(li){return arguments.length?(li==null?vt=Bt=fr=pr=null:(vt=+li[0][0],Bt=+li[0][1],fr=+li[1][0],pr=+li[1][1]),yn):vt==null?null:[[vt,Bt],[fr,pr]]},yn.size=function(li){return arguments.length?(li==null?vt=Bt=fr=pr=null:(vt=Bt=0,fr=+li[0],pr=+li[1]),yn):vt==null?null:[fr-vt,pr-Bt]},yn};function K0($e){return $e.x}function o1($e){return $e.y}function Of(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function xm($e,vt,Bt,fr,pr,_r){if(!$e(vt,Bt,fr,pr,_r)){var Yr=(Bt+pr)*.5,Wr=(fr+_r)*.5,yn=vt.nodes;yn[0]&&xm($e,yn[0],Bt,fr,Yr,Wr),yn[1]&&xm($e,yn[1],Yr,fr,pr,Wr),yn[2]&&xm($e,yn[2],Bt,Wr,Yr,_r),yn[3]&&xm($e,yn[3],Yr,Wr,pr,_r)}}function J0($e,vt,Bt,fr,pr,_r,Yr){var Wr=1/0,yn;return(function li(ni,Pi,Ji,na,_o){if(!(Pi>_r||Ji>Yr||na<fr||_o<pr)){if(ca=ni.point){var ca,La=vt-ni.x,qa=Bt-ni.y,bo=La*La+qa*qa;if(bo<Wr){var So=Math.sqrt(Wr=bo);fr=vt-So,pr=Bt-So,_r=vt+So,Yr=Bt+So,yn=ca}}for(var Va=ni.nodes,os=(Pi+na)*.5,ul=(Ji+_o)*.5,Us=vt>=os,rl=Bt>=ul,Yl=rl<<1|Us,eu=Yl+4;Yl<eu;++Yl)if(ni=Va[Yl&3])switch(Yl&3){case 0:li(ni,Pi,Ji,os,ul);break;case 1:li(ni,os,Ji,na,ul);break;case 2:li(ni,Pi,ul,os,_o);break;case 3:li(ni,os,ul,na,_o);break}}})($e,fr,pr,_r,Yr),yn}w.interpolateRgb=wp;function wp($e,vt){$e=w.rgb($e),vt=w.rgb(vt);var Bt=$e.r,fr=$e.g,pr=$e.b,_r=vt.r-Bt,Yr=vt.g-fr,Wr=vt.b-pr;return function(yn){return"#"+qn(Math.round(Bt+_r*yn))+qn(Math.round(fr+Yr*yn))+qn(Math.round(pr+Wr*yn))}}w.interpolateObject=sp;function sp($e,vt){var Bt={},fr={},pr;for(pr in $e)pr in vt?Bt[pr]=Uc($e[pr],vt[pr]):fr[pr]=$e[pr];for(pr in vt)pr in $e||(fr[pr]=vt[pr]);return function(_r){for(pr in Bt)fr[pr]=Bt[pr](_r);return fr}}w.interpolateNumber=Sp;function Sp($e,vt){return $e=+$e,vt=+vt,function(Bt){return $e*(1-Bt)+vt*Bt}}w.interpolateString=sm;function sm($e,vt){var Bt=yd.lastIndex=lp.lastIndex=0,fr,pr,_r,Yr=-1,Wr=[],yn=[];for($e=$e+"",vt=vt+"";(fr=yd.exec($e))&&(pr=lp.exec(vt));)(_r=pr.index)>Bt&&(_r=vt.slice(Bt,_r),Wr[Yr]?Wr[Yr]+=_r:Wr[++Yr]=_r),(fr=fr[0])===(pr=pr[0])?Wr[Yr]?Wr[Yr]+=pr:Wr[++Yr]=pr:(Wr[++Yr]=null,yn.push({i:Yr,x:Sp(fr,pr)})),Bt=lp.lastIndex;return Bt<vt.length&&(_r=vt.slice(Bt),Wr[Yr]?Wr[Yr]+=_r:Wr[++Yr]=_r),Wr.length<2?yn[0]?(vt=yn[0].x,function(li){return vt(li)+""}):function(){return vt}:(vt=yn.length,function(li){for(var ni=0,Pi;ni<vt;++ni)Wr[(Pi=yn[ni]).i]=Pi.x(li);return Wr.join("")})}var yd=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,lp=new RegExp(yd.source,"g");w.interpolate=Uc;function Uc($e,vt){for(var Bt=w.interpolators.length,fr;--Bt>=0&&!(fr=w.interpolators[Bt]($e,vt)););return fr}w.interpolators=[function($e,vt){var Bt=typeof vt;return(Bt==="string"?Hi.has(vt.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(vt)?wp:sm:vt instanceof Ka?wp:Array.isArray(vt)?zf:Bt==="object"&&isNaN(vt)?sp:Sp)($e,vt)}],w.interpolateArray=zf;function zf($e,vt){var Bt=[],fr=[],pr=$e.length,_r=vt.length,Yr=Math.min($e.length,vt.length),Wr;for(Wr=0;Wr<Yr;++Wr)Bt.push(Uc($e[Wr],vt[Wr]));for(;Wr<pr;++Wr)fr[Wr]=$e[Wr];for(;Wr<_r;++Wr)fr[Wr]=vt[Wr];return function(yn){for(Wr=0;Wr<Yr;++Wr)fr[Wr]=Bt[Wr](yn);return fr}}var jm=function(){return K},hv=w.map({linear:jm,poly:Wg,quad:function(){return pb},cubic:function(){return mf},sin:function(){return lm},exp:function(){return Hh},circle:function(){return Q0},elastic:sg,back:a0,bounce:function(){return up}}),og=w.map({in:K,out:z1,"in-out":Oc,"out-in":function($e){return Oc(z1($e))}});w.ease=function($e){var vt=$e.indexOf("-"),Bt=vt>=0?$e.slice(0,vt):$e,fr=vt>=0?$e.slice(vt+1):"in";return Bt=hv.get(Bt)||jm,fr=og.get(fr)||K,Bd(fr(Bt.apply(null,R.call(arguments,1))))};function Bd($e){return function(vt){return vt<=0?0:vt>=1?1:$e(vt)}}function z1($e){return function(vt){return 1-$e(1-vt)}}function Oc($e){return function(vt){return .5*(vt<.5?$e(2*vt):2-$e(2-2*vt))}}function pb($e){return $e*$e}function mf($e){return $e*$e*$e}function mu($e){if($e<=0)return 0;if($e>=1)return 1;var vt=$e*$e,Bt=vt*$e;return 4*($e<.5?Bt:3*($e-vt)+Bt-.75)}function Wg($e){return function(vt){return Math.pow(vt,$e)}}function lm($e){return 1-Math.cos($e*mt)}function Hh($e){return Math.pow(2,10*($e-1))}function Q0($e){return 1-Math.sqrt(1-$e*$e)}function sg($e,vt){var Bt;return arguments.length<2&&(vt=.45),arguments.length?Bt=vt/Ye*Math.asin(1/$e):($e=1,Bt=vt/4),function(fr){return 1+$e*Math.pow(2,-10*fr)*Math.sin((fr-Bt)*Ye/vt)}}function a0($e){return $e||($e=1.70158),function(vt){return vt*vt*(($e+1)*vt-$e)}}function up($e){return $e<1/2.75?7.5625*$e*$e:$e<2/2.75?7.5625*($e-=1.5/2.75)*$e+.75:$e<2.5/2.75?7.5625*($e-=2.25/2.75)*$e+.9375:7.5625*($e-=2.625/2.75)*$e+.984375}w.interpolateHcl=s1;function s1($e,vt){$e=w.hcl($e),vt=w.hcl(vt);var Bt=$e.h,fr=$e.c,pr=$e.l,_r=vt.h-Bt,Yr=vt.c-fr,Wr=vt.l-pr;return isNaN(Yr)&&(Yr=0,fr=isNaN(fr)?vt.c:fr),isNaN(_r)?(_r=0,Bt=isNaN(Bt)?vt.h:Bt):_r>180?_r-=360:_r<-180&&(_r+=360),function(yn){return nn(Bt+_r*yn,fr+Yr*yn,pr+Wr*yn)+""}}w.interpolateHsl=Ay;function Ay($e,vt){$e=w.hsl($e),vt=w.hsl(vt);var Bt=$e.h,fr=$e.s,pr=$e.l,_r=vt.h-Bt,Yr=vt.s-fr,Wr=vt.l-pr;return isNaN(Yr)&&(Yr=0,fr=isNaN(fr)?vt.s:fr),isNaN(_r)?(_r=0,Bt=isNaN(Bt)?vt.h:Bt):_r>180?_r-=360:_r<-180&&(_r+=360),function(yn){return Fo(Bt+_r*yn,fr+Yr*yn,pr+Wr*yn)+""}}w.interpolateLab=o0;function o0($e,vt){$e=w.lab($e),vt=w.lab(vt);var Bt=$e.l,fr=$e.a,pr=$e.b,_r=vt.l-Bt,Yr=vt.a-fr,Wr=vt.b-pr;return function(yn){return Na(Bt+_r*yn,fr+Yr*yn,pr+Wr*yn)+""}}w.interpolateRound=lg;function lg($e,vt){return vt-=$e,function(Bt){return Math.round($e+vt*Bt)}}w.transform=function($e){var vt=z.createElementNS(w.ns.prefix.svg,"g");return(w.transform=function(Bt){if(Bt!=null){vt.setAttribute("transform",Bt);var fr=vt.transform.baseVal.consolidate()}return new ey(fr?fr.matrix:Vm)})($e)};function ey($e){var vt=[$e.a,$e.b],Bt=[$e.c,$e.d],fr=um(vt),pr=ty(vt,Bt),_r=um(Cy(Bt,vt,-pr))||0;vt[0]*Bt[1]<Bt[0]*vt[1]&&(vt[0]*=-1,vt[1]*=-1,fr*=-1,pr*=-1),this.rotate=(fr?Math.atan2(vt[1],vt[0]):Math.atan2(-Bt[0],Bt[1]))*lr,this.translate=[$e.e,$e.f],this.scale=[fr,_r],this.skew=_r?Math.atan2(pr,_r)*lr:0}ey.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};function ty($e,vt){return $e[0]*vt[0]+$e[1]*vt[1]}function um($e){var vt=Math.sqrt(ty($e,$e));return vt&&($e[0]/=vt,$e[1]/=vt),vt}function Cy($e,vt,Bt){return $e[0]+=Bt*vt[0],$e[1]+=Bt*vt[1],$e}var Vm={a:1,b:0,c:0,d:1,e:0,f:0};w.interpolateTransform=E0;function _m($e){return $e.length?$e.pop()+",":""}function cp($e,vt,Bt,fr){if($e[0]!==vt[0]||$e[1]!==vt[1]){var pr=Bt.push("translate(",null,",",null,")");fr.push({i:pr-4,x:Sp($e[0],vt[0])},{i:pr-2,x:Sp($e[1],vt[1])})}else(vt[0]||vt[1])&&Bt.push("translate("+vt+")")}function Rg($e,vt,Bt,fr){$e!==vt?($e-vt>180?vt+=360:vt-$e>180&&($e+=360),fr.push({i:Bt.push(_m(Bt)+"rotate(",null,")")-2,x:Sp($e,vt)})):vt&&Bt.push(_m(Bt)+"rotate("+vt+")")}function ry($e,vt,Bt,fr){$e!==vt?fr.push({i:Bt.push(_m(Bt)+"skewX(",null,")")-2,x:Sp($e,vt)}):vt&&Bt.push(_m(Bt)+"skewX("+vt+")")}function Wf($e,vt,Bt,fr){if($e[0]!==vt[0]||$e[1]!==vt[1]){var pr=Bt.push(_m(Bt)+"scale(",null,",",null,")");fr.push({i:pr-4,x:Sp($e[0],vt[0])},{i:pr-2,x:Sp($e[1],vt[1])})}else(vt[0]!==1||vt[1]!==1)&&Bt.push(_m(Bt)+"scale("+vt+")")}function E0($e,vt){var Bt=[],fr=[];return $e=w.transform($e),vt=w.transform(vt),cp($e.translate,vt.translate,Bt,fr),Rg($e.rotate,vt.rotate,Bt,fr),ry($e.skew,vt.skew,Bt,fr),Wf($e.scale,vt.scale,Bt,fr),$e=vt=null,function(pr){for(var _r=-1,Yr=fr.length,Wr;++_r<Yr;)Bt[(Wr=fr[_r]).i]=Wr.x(pr);return Bt.join("")}}function B1($e,vt){return vt=(vt-=$e=+$e)||1/vt,function(Bt){return(Bt-$e)/vt}}function My($e,vt){return vt=(vt-=$e=+$e)||1/vt,function(Bt){return Math.max(0,Math.min(1,(Bt-$e)/vt))}}w.layout={},w.layout.bundle=function(){return function($e){for(var vt=[],Bt=-1,fr=$e.length;++Bt<fr;)vt.push(s0($e[Bt]));return vt}};function s0($e){for(var vt=$e.source,Bt=$e.target,fr=Av(vt,Bt),pr=[vt];vt!==fr;)vt=vt.parent,pr.push(vt);for(var _r=pr.length;Bt!==fr;)pr.splice(_r,0,Bt),Bt=Bt.parent;return pr}function Ry($e){for(var vt=[],Bt=$e.parent;Bt!=null;)vt.push($e),$e=Bt,Bt=Bt.parent;return vt.push($e),vt}function Av($e,vt){if($e===vt)return $e;for(var Bt=Ry($e),fr=Ry(vt),pr=Bt.pop(),_r=fr.pop(),Yr=null;pr===_r;)Yr=pr,pr=Bt.pop(),_r=fr.pop();return Yr}w.layout.chord=function(){var $e={},vt,Bt,fr,pr,_r=0,Yr,Wr,yn;function li(){var Pi={},Ji=[],na=w.range(pr),_o=[],ca,La,qa,bo,So;for(vt=[],Bt=[],ca=0,bo=-1;++bo<pr;){for(La=0,So=-1;++So<pr;)La+=fr[bo][So];Ji.push(La),_o.push(w.range(pr)),ca+=La}for(Yr&&na.sort(function(Vc,ou){return Yr(Ji[Vc],Ji[ou])}),Wr&&_o.forEach(function(Vc,ou){Vc.sort(function(Zu,Qc){return Wr(fr[ou][Zu],fr[ou][Qc])})}),ca=(Ye-_r*pr)/ca,La=0,bo=-1;++bo<pr;){for(qa=La,So=-1;++So<pr;){var Va=na[bo],os=_o[Va][So],ul=fr[Va][os],Us=La,rl=La+=ul*ca;Pi[Va+"-"+os]={index:Va,subindex:os,startAngle:Us,endAngle:rl,value:ul}}Bt[Va]={index:Va,startAngle:qa,endAngle:La,value:Ji[Va]},La+=_r}for(bo=-1;++bo<pr;)for(So=bo-1;++So<pr;){var Yl=Pi[bo+"-"+So],eu=Pi[So+"-"+bo];(Yl.value||eu.value)&&vt.push(Yl.value<eu.value?{source:eu,target:Yl}:{source:Yl,target:eu})}yn&&ni()}function ni(){vt.sort(function(Pi,Ji){return yn((Pi.source.value+Pi.target.value)/2,(Ji.source.value+Ji.target.value)/2)})}return $e.matrix=function(Pi){return arguments.length?(pr=(fr=Pi)&&fr.length,vt=Bt=null,$e):fr},$e.padding=function(Pi){return arguments.length?(_r=Pi,vt=Bt=null,$e):_r},$e.sortGroups=function(Pi){return arguments.length?(Yr=Pi,vt=Bt=null,$e):Yr},$e.sortSubgroups=function(Pi){return arguments.length?(Wr=Pi,vt=null,$e):Wr},$e.sortChords=function(Pi){return arguments.length?(yn=Pi,vt&&ni(),$e):yn},$e.chords=function(){return vt||li(),vt},$e.groups=function(){return Bt||li(),Bt},$e},w.layout.force=function(){var $e={},vt=w.dispatch("start","tick","end"),Bt,fr=[1,1],pr,_r,Yr=.9,Wr=qm,yn=tv,li=-30,ni=Mv,Pi=.1,Ji=.64,na=[],_o=[],ca,La,qa;function bo(Va){return function(os,ul,Us,rl){if(os.point!==Va){var Yl=os.cx-Va.x,eu=os.cy-Va.y,Vc=rl-ul,ou=Yl*Yl+eu*eu;if(Vc*Vc/Ji<ou){if(ou<ni){var Zu=os.charge/ou;Va.px-=Yl*Zu,Va.py-=eu*Zu}return!0}if(os.point&&ou&&ou<ni){var Zu=os.pointCharge/ou;Va.px-=Yl*Zu,Va.py-=eu*Zu}}return!os.charge}}$e.tick=function(){if((_r*=.99)<.005)return Bt=null,vt.end({type:"end",alpha:_r=0}),!0;var Va=na.length,os=_o.length,ul,Us,rl,Yl,eu,Vc,ou,Zu,Qc;for(Us=0;Us<os;++Us)rl=_o[Us],Yl=rl.source,eu=rl.target,Zu=eu.x-Yl.x,Qc=eu.y-Yl.y,(Vc=Zu*Zu+Qc*Qc)&&(Vc=_r*La[Us]*((Vc=Math.sqrt(Vc))-ca[Us])/Vc,Zu*=Vc,Qc*=Vc,eu.x-=Zu*(ou=Yl.weight+eu.weight?Yl.weight/(Yl.weight+eu.weight):.5),eu.y-=Qc*ou,Yl.x+=Zu*(ou=1-ou),Yl.y+=Qc*ou);if((ou=_r*Pi)&&(Zu=fr[0]/2,Qc=fr[1]/2,Us=-1,ou))for(;++Us<Va;)rl=na[Us],rl.x+=(Zu-rl.x)*ou,rl.y+=(Qc-rl.y)*ou;if(li)for(bd(ul=w.geom.quadtree(na),_r,qa),Us=-1;++Us<Va;)(rl=na[Us]).fixed||ul.visit(bo(rl));for(Us=-1;++Us<Va;)rl=na[Us],rl.fixed?(rl.x=rl.px,rl.y=rl.py):(rl.x-=(rl.px-(rl.px=rl.x))*Yr,rl.y-=(rl.py-(rl.py=rl.y))*Yr);vt.tick({type:"tick",alpha:_r})},$e.nodes=function(Va){return arguments.length?(na=Va,$e):na},$e.links=function(Va){return arguments.length?(_o=Va,$e):_o},$e.size=function(Va){return arguments.length?(fr=Va,$e):fr},$e.linkDistance=function(Va){return arguments.length?(Wr=typeof Va=="function"?Va:+Va,$e):Wr},$e.distance=$e.linkDistance,$e.linkStrength=function(Va){return arguments.length?(yn=typeof Va=="function"?Va:+Va,$e):yn},$e.friction=function(Va){return arguments.length?(Yr=+Va,$e):Yr},$e.charge=function(Va){return arguments.length?(li=typeof Va=="function"?Va:+Va,$e):li},$e.chargeDistance=function(Va){return arguments.length?(ni=Va*Va,$e):Math.sqrt(ni)},$e.gravity=function(Va){return arguments.length?(Pi=+Va,$e):Pi},$e.theta=function(Va){return arguments.length?(Ji=Va*Va,$e):Math.sqrt(Ji)},$e.alpha=function(Va){return arguments.length?(Va=+Va,_r?Va>0?_r=Va:(Bt.c=null,Bt.t=NaN,Bt=null,vt.end({type:"end",alpha:_r=0})):Va>0&&(vt.start({type:"start",alpha:_r=Va}),Bt=No($e.tick)),$e):_r},$e.start=function(){var Va,os=na.length,ul=_o.length,Us=fr[0],rl=fr[1],Yl,eu;for(Va=0;Va<os;++Va)(eu=na[Va]).index=Va,eu.weight=0;for(Va=0;Va<ul;++Va)eu=_o[Va],typeof eu.source=="number"&&(eu.source=na[eu.source]),typeof eu.target=="number"&&(eu.target=na[eu.target]),++eu.source.weight,++eu.target.weight;for(Va=0;Va<os;++Va)eu=na[Va],isNaN(eu.x)&&(eu.x=Vc("x",Us)),isNaN(eu.y)&&(eu.y=Vc("y",rl)),isNaN(eu.px)&&(eu.px=eu.x),isNaN(eu.py)&&(eu.py=eu.y);if(ca=[],typeof Wr=="function")for(Va=0;Va<ul;++Va)ca[Va]=+Wr.call(this,_o[Va],Va);else for(Va=0;Va<ul;++Va)ca[Va]=Wr;if(La=[],typeof yn=="function")for(Va=0;Va<ul;++Va)La[Va]=+yn.call(this,_o[Va],Va);else for(Va=0;Va<ul;++Va)La[Va]=yn;if(qa=[],typeof li=="function")for(Va=0;Va<os;++Va)qa[Va]=+li.call(this,na[Va],Va);else for(Va=0;Va<os;++Va)qa[Va]=li;function Vc(ou,Zu){if(!Yl){for(Yl=new Array(os),xd=0;xd<os;++xd)Yl[xd]=[];for(xd=0;xd<ul;++xd){var Qc=_o[xd];Yl[Qc.source.index].push(Qc.target),Yl[Qc.target.index].push(Qc.source)}}for(var Ph=Yl[Va],xd=-1,Rl=Ph.length,Cc;++xd<Rl;)if(!isNaN(Cc=Ph[xd][ou]))return Cc;return Math.random()*Zu}return $e.resume()},$e.resume=function(){return $e.alpha(.1)},$e.stop=function(){return $e.alpha(0)},$e.drag=function(){if(pr||(pr=w.behavior.drag().origin(K).on("dragstart.force",ky).on("drag.force",So).on("dragend.force",uh)),!arguments.length)return pr;this.on("mouseover.force",Cv).on("mouseout.force",ug).call(pr)};function So(Va){Va.px=w.event.x,Va.py=w.event.y,$e.resume()}return w.rebind($e,vt,"on")};function ky($e){$e.fixed|=2}function uh($e){$e.fixed&=-7}function Cv($e){$e.fixed|=4,$e.px=$e.x,$e.py=$e.y}function ug($e){$e.fixed&=-5}function bd($e,vt,Bt){var fr=0,pr=0;if($e.charge=0,!$e.leaf)for(var _r=$e.nodes,Yr=_r.length,Wr=-1,yn;++Wr<Yr;)yn=_r[Wr],yn!=null&&(bd(yn,vt,Bt),$e.charge+=yn.charge,fr+=yn.charge*yn.cx,pr+=yn.charge*yn.cy);if($e.point){$e.leaf||($e.point.x+=Math.random()-.5,$e.point.y+=Math.random()-.5);var li=vt*Bt[$e.point.index];$e.charge+=$e.pointCharge=li,fr+=li*$e.point.x,pr+=li*$e.point.y}$e.cx=fr/$e.charge,$e.cy=pr/$e.charge}var qm=20,tv=1,Mv=1/0;w.layout.hierarchy=function(){var $e=U1,vt=cg,Bt=A0;function fr(pr){var _r=[pr],Yr=[],Wr;for(pr.depth=0;(Wr=_r.pop())!=null;)if(Yr.push(Wr),(li=vt.call(fr,Wr,Wr.depth))&&(yn=li.length)){for(var yn,li,ni;--yn>=0;)_r.push(ni=li[yn]),ni.parent=Wr,ni.depth=Wr.depth+1;Bt&&(Wr.value=0),Wr.children=li}else Bt&&(Wr.value=+Bt.call(fr,Wr,Wr.depth)||0),delete Wr.children;return wm(pr,function(Pi){var Ji,na;$e&&(Ji=Pi.children)&&Ji.sort($e),Bt&&(na=Pi.parent)&&(na.value+=Pi.value)}),Yr}return fr.sort=function(pr){return arguments.length?($e=pr,fr):$e},fr.children=function(pr){return arguments.length?(vt=pr,fr):vt},fr.value=function(pr){return arguments.length?(Bt=pr,fr):Bt},fr.revalue=function(pr){return Bt&&(Yg(pr,function(_r){_r.children&&(_r.value=0)}),wm(pr,function(_r){var Yr;_r.children||(_r.value=+Bt.call(fr,_r,_r.depth)||0),(Yr=_r.parent)&&(Yr.value+=_r.value)})),pr},fr};function Ud($e,vt){return w.rebind($e,vt,"sort","children","value"),$e.nodes=$e,$e.links=Qb,$e}function Yg($e,vt){for(var Bt=[$e];($e=Bt.pop())!=null;)if(vt($e),(pr=$e.children)&&(fr=pr.length))for(var fr,pr;--fr>=0;)Bt.push(pr[fr])}function wm($e,vt){for(var Bt=[$e],fr=[];($e=Bt.pop())!=null;)if(fr.push($e),(Yr=$e.children)&&(_r=Yr.length))for(var pr=-1,_r,Yr;++pr<_r;)Bt.push(Yr[pr]);for(;($e=fr.pop())!=null;)vt($e)}function cg($e){return $e.children}function A0($e){return $e.value}function U1($e,vt){return vt.value-$e.value}function Qb($e){return w.merge($e.map(function(vt){return(vt.children||[]).map(function(Bt){return{source:vt,target:Bt}})}))}w.layout.partition=function(){var $e=w.layout.hierarchy(),vt=[1,1];function Bt(_r,Yr,Wr,yn){var li=_r.children;if(_r.x=Yr,_r.y=_r.depth*yn,_r.dx=Wr,_r.dy=yn,li&&(Pi=li.length)){var ni=-1,Pi,Ji,na;for(Wr=_r.value?Wr/_r.value:0;++ni<Pi;)Bt(Ji=li[ni],Yr,na=Ji.value*Wr,yn),Yr+=na}}function fr(_r){var Yr=_r.children,Wr=0;if(Yr&&(li=Yr.length))for(var yn=-1,li;++yn<li;)Wr=Math.max(Wr,fr(Yr[yn]));return 1+Wr}function pr(_r,Yr){var Wr=$e.call(this,_r,Yr);return Bt(Wr[0],0,vt[0],vt[1]/fr(Wr[0])),Wr}return pr.size=function(_r){return arguments.length?(vt=_r,pr):vt},Ud(pr,$e)},w.layout.pie=function(){var $e=Number,vt=Xg,Bt=0,fr=Ye,pr=0;function _r(Yr){var Wr=Yr.length,yn=Yr.map(function(bo,So){return+$e.call(_r,bo,So)}),li=+(typeof Bt=="function"?Bt.apply(this,arguments):Bt),ni=(typeof fr=="function"?fr.apply(this,arguments):fr)-li,Pi=Math.min(Math.abs(ni)/Wr,+(typeof pr=="function"?pr.apply(this,arguments):pr)),Ji=Pi*(ni<0?-1:1),na=w.sum(yn),_o=na?(ni-Wr*Ji)/na:0,ca=w.range(Wr),La=[],qa;return vt!=null&&ca.sort(vt===Xg?function(bo,So){return yn[So]-yn[bo]}:function(bo,So){return vt(Yr[bo],Yr[So])}),ca.forEach(function(bo){La[bo]={data:Yr[bo],value:qa=yn[bo],startAngle:li,endAngle:li+=qa*_o+Ji,padAngle:Pi}}),La}return _r.value=function(Yr){return arguments.length?($e=Yr,_r):$e},_r.sort=function(Yr){return arguments.length?(vt=Yr,_r):vt},_r.startAngle=function(Yr){return arguments.length?(Bt=Yr,_r):Bt},_r.endAngle=function(Yr){return arguments.length?(fr=Yr,_r):fr},_r.padAngle=function(Yr){return arguments.length?(pr=Yr,_r):pr},_r};var Xg={};w.layout.stack=function(){var $e=K,vt=Iy,Bt=Kg,fr=M0,pr=C0,_r=Uv;function Yr(Wr,yn){if(!(_o=Wr.length))return Wr;var li=Wr.map(function(bo,So){return $e.call(Yr,bo,So)}),ni=li.map(function(bo){return bo.map(function(So,Va){return[pr.call(Yr,So,Va),_r.call(Yr,So,Va)]})}),Pi=vt.call(Yr,ni,yn);li=w.permute(li,Pi),ni=w.permute(ni,Pi);var Ji=Bt.call(Yr,ni,yn),na=li[0].length,_o,ca,La,qa;for(La=0;La<na;++La)for(fr.call(Yr,li[0][La],qa=Ji[La],ni[0][La][1]),ca=1;ca<_o;++ca)fr.call(Yr,li[ca][La],qa+=ni[ca-1][La][1],ni[ca][La][1]);return Wr}return Yr.values=function(Wr){return arguments.length?($e=Wr,Yr):$e},Yr.order=function(Wr){return arguments.length?(vt=typeof Wr=="function"?Wr:Tp.get(Wr)||Iy,Yr):vt},Yr.offset=function(Wr){return arguments.length?(Bt=typeof Wr=="function"?Wr:Zg.get(Wr)||Kg,Yr):Bt},Yr.x=function(Wr){return arguments.length?(pr=Wr,Yr):pr},Yr.y=function(Wr){return arguments.length?(_r=Wr,Yr):_r},Yr.out=function(Wr){return arguments.length?(fr=Wr,Yr):fr},Yr};function C0($e){return $e.x}function Uv($e){return $e.y}function M0($e,vt,Bt){$e.y0=vt,$e.y=Bt}var Tp=w.map({"inside-out":function($e){var vt=$e.length,Bt,fr,pr=$e.map(Rd),_r=$e.map(Rv),Yr=w.range(vt).sort(function(Pi,Ji){return pr[Pi]-pr[Ji]}),Wr=0,yn=0,li=[],ni=[];for(Bt=0;Bt<vt;++Bt)fr=Yr[Bt],Wr<yn?(Wr+=_r[fr],li.push(fr)):(yn+=_r[fr],ni.push(fr));return ni.reverse().concat(li)},reverse:function($e){return w.range($e.length).reverse()},default:Iy}),Zg=w.map({silhouette:function($e){var vt=$e.length,Bt=$e[0].length,fr=[],pr=0,_r,Yr,Wr,yn=[];for(Yr=0;Yr<Bt;++Yr){for(_r=0,Wr=0;_r<vt;_r++)Wr+=$e[_r][Yr][1];Wr>pr&&(pr=Wr),fr.push(Wr)}for(Yr=0;Yr<Bt;++Yr)yn[Yr]=(pr-fr[Yr])/2;return yn},wiggle:function($e){var vt=$e.length,Bt=$e[0],fr=Bt.length,pr,_r,Yr,Wr,yn,li,ni,Pi,Ji,na=[];for(na[0]=Pi=Ji=0,_r=1;_r<fr;++_r){for(pr=0,Wr=0;pr<vt;++pr)Wr+=$e[pr][_r][1];for(pr=0,yn=0,ni=Bt[_r][0]-Bt[_r-1][0];pr<vt;++pr){for(Yr=0,li=($e[pr][_r][1]-$e[pr][_r-1][1])/(2*ni);Yr<pr;++Yr)li+=($e[Yr][_r][1]-$e[Yr][_r-1][1])/ni;yn+=li*$e[pr][_r][1]}na[_r]=Pi-=Wr?yn/Wr*ni:0,Pi<Ji&&(Ji=Pi)}for(_r=0;_r<fr;++_r)na[_r]-=Ji;return na},expand:function($e){var vt=$e.length,Bt=$e[0].length,fr=1/vt,pr,_r,Yr,Wr=[];for(_r=0;_r<Bt;++_r){for(pr=0,Yr=0;pr<vt;pr++)Yr+=$e[pr][_r][1];if(Yr)for(pr=0;pr<vt;pr++)$e[pr][_r][1]/=Yr;else for(pr=0;pr<vt;pr++)$e[pr][_r][1]=fr}for(_r=0;_r<Bt;++_r)Wr[_r]=0;return Wr},zero:Kg});function Iy($e){return w.range($e.length)}function Kg($e){for(var vt=-1,Bt=$e[0].length,fr=[];++vt<Bt;)fr[vt]=0;return fr}function Rd($e){for(var vt=1,Bt=0,fr=$e[0][1],pr,_r=$e.length;vt<_r;++vt)(pr=$e[vt][1])>fr&&(Bt=vt,fr=pr);return Bt}function Rv($e){return $e.reduce(cm,0)}function cm($e,vt){return $e+vt[1]}w.layout.histogram=function(){var $e=!0,vt=Number,Bt=l0,fr=ny;function pr(_r,Ji){for(var Wr=[],yn=_r.map(vt,this),li=Bt.call(this,yn,Ji),ni=fr.call(this,li,yn,Ji),Pi,Ji=-1,na=yn.length,_o=ni.length-1,ca=$e?1:1/na,La;++Ji<_o;)Pi=Wr[Ji]=[],Pi.dx=ni[Ji+1]-(Pi.x=ni[Ji]),Pi.y=0;if(_o>0)for(Ji=-1;++Ji<na;)La=yn[Ji],La>=li[0]&&La<=li[1]&&(Pi=Wr[w.bisect(ni,La,1,_o)-1],Pi.y+=ca,Pi.push(_r[Ji]));return Wr}return pr.value=function(_r){return arguments.length?(vt=_r,pr):vt},pr.range=function(_r){return arguments.length?(Bt=wr(_r),pr):Bt},pr.bins=function(_r){return arguments.length?(fr=typeof _r=="number"?function(Yr){return Ld(Yr,_r)}:wr(_r),pr):fr},pr.frequency=function(_r){return arguments.length?($e=!!_r,pr):$e},pr};function ny($e,vt){return Ld($e,Math.ceil(Math.log(vt.length)/Math.LN2+1))}function Ld($e,vt){for(var Bt=-1,fr=+$e[0],pr=($e[1]-fr)/vt,_r=[];++Bt<=vt;)_r[Bt]=pr*Bt+fr;return _r}function l0($e){return[w.min($e),w.max($e)]}w.layout.pack=function(){var $e=w.layout.hierarchy().sort(fg),vt=0,Bt=[1,1],fr;function pr(_r,Yr){var Wr=$e.call(this,_r,Yr),yn=Wr[0],li=Bt[0],ni=Bt[1],Pi=fr==null?Math.sqrt:typeof fr=="function"?fr:function(){return fr};if(yn.x=yn.y=0,wm(yn,function(na){na.r=+Pi(na.value)}),wm(yn,c0),vt){var Ji=vt*(fr?1:Math.max(2*yn.r/li,2*yn.r/ni))/2;wm(yn,function(na){na.r+=Ji}),wm(yn,c0),wm(yn,function(na){na.r-=Ji})}return Py(yn,li/2,ni/2,fr?1:1/Math.max(2*yn.r/li,2*yn.r/ni)),Wr}return pr.size=function(_r){return arguments.length?(Bt=_r,pr):Bt},pr.radius=function(_r){return arguments.length?(fr=_r==null||typeof _r=="function"?_r:+_r,pr):fr},pr.padding=function(_r){return arguments.length?(vt=+_r,pr):vt},Ud(pr,$e)};function fg($e,vt){return $e.value-vt.value}function Hv($e,vt){var Bt=$e._pack_next;$e._pack_next=vt,vt._pack_prev=$e,vt._pack_next=Bt,Bt._pack_prev=vt}function u0($e,vt){$e._pack_next=vt,vt._pack_prev=$e}function Sm($e,vt){var Bt=vt.x-$e.x,fr=vt.y-$e.y,pr=$e.r+vt.r;return .999*pr*pr>Bt*Bt+fr*fr}function c0($e){if(!(vt=$e.children)||!(Ji=vt.length))return;var vt,Bt=1/0,fr=-1/0,pr=1/0,_r=-1/0,Yr,Wr,yn,li,ni,Pi,Ji;function na(Va){Bt=Math.min(Va.x-Va.r,Bt),fr=Math.max(Va.x+Va.r,fr),pr=Math.min(Va.y-Va.r,pr),_r=Math.max(Va.y+Va.r,_r)}if(vt.forEach(H1),Yr=vt[0],Yr.x=-Yr.r,Yr.y=0,na(Yr),Ji>1&&(Wr=vt[1],Wr.x=Wr.r,Wr.y=0,na(Wr),Ji>2))for(yn=vt[2],jv(Yr,Wr,yn),na(yn),Hv(Yr,yn),Yr._pack_prev=yn,Hv(yn,Wr),Wr=Yr._pack_next,li=3;li<Ji;li++){jv(Yr,Wr,yn=vt[li]);var _o=0,ca=1,La=1;for(ni=Wr._pack_next;ni!==Wr;ni=ni._pack_next,ca++)if(Sm(ni,yn)){_o=1;break}if(_o==1)for(Pi=Yr._pack_prev;Pi!==ni._pack_prev&&!Sm(Pi,yn);Pi=Pi._pack_prev,La++);_o?(ca<La||ca==La&&Wr.r<Yr.r?u0(Yr,Wr=ni):u0(Yr=Pi,Wr),li--):(Hv(Yr,yn),Wr=yn,na(yn))}var qa=(Bt+fr)/2,bo=(pr+_r)/2,So=0;for(li=0;li<Ji;li++)yn=vt[li],yn.x-=qa,yn.y-=bo,So=Math.max(So,yn.r+Math.sqrt(yn.x*yn.x+yn.y*yn.y));$e.r=So,vt.forEach(Np)}function H1($e){$e._pack_next=$e._pack_prev=$e}function Np($e){delete $e._pack_next,delete $e._pack_prev}function Py($e,vt,Bt,fr){var pr=$e.children;if($e.x=vt+=fr*$e.x,$e.y=Bt+=fr*$e.y,$e.r*=fr,pr)for(var _r=-1,Yr=pr.length;++_r<Yr;)Py(pr[_r],vt,Bt,fr)}function jv($e,vt,Bt){var fr=$e.r+Bt.r,pr=vt.x-$e.x,_r=vt.y-$e.y;if(fr&&(pr||_r)){var Yr=vt.r+Bt.r,Wr=pr*pr+_r*_r;Yr*=Yr,fr*=fr;var yn=.5+(fr-Yr)/(2*Wr),li=Math.sqrt(Math.max(0,2*Yr*(fr+Wr)-(fr-=Wr)*fr-Yr*Yr))/(2*Wr);Bt.x=$e.x+yn*pr+li*_r,Bt.y=$e.y+yn*_r-li*pr}else Bt.x=$e.x+fr,Bt.y=$e.y}w.layout.tree=function(){var $e=w.layout.hierarchy().sort(null).value(null),vt=Gm,Bt=[1,1],fr=null;function pr(ni,Pi){var Ji=$e.call(this,ni,Pi),na=Ji[0],_o=_r(na);if(wm(_o,Yr),_o.parent.m=-_o.z,Yg(_o,Wr),fr)Yg(na,li);else{var ca=na,La=na,qa=na;Yg(na,function(os){os.x<ca.x&&(ca=os),os.x>La.x&&(La=os),os.depth>qa.depth&&(qa=os)});var bo=vt(ca,La)/2-ca.x,So=Bt[0]/(La.x+vt(La,ca)/2+bo),Va=Bt[1]/(qa.depth||1);Yg(na,function(os){os.x=(os.x+bo)*So,os.y=os.depth*Va})}return Ji}function _r(ni){for(var Pi={A:null,children:[ni]},Ji=[Pi],na;(na=Ji.pop())!=null;)for(var _o=na.children,ca,La=0,qa=_o.length;La<qa;++La)Ji.push((_o[La]=ca={_:_o[La],parent:na,children:(ca=_o[La].children)&&ca.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:La}).a=ca);return Pi.children[0]}function Yr(ni){var Pi=ni.children,Ji=ni.parent.children,na=ni.i?Ji[ni.i-1]:null;if(Pi.length){Yd(ni);var _o=(Pi[0].z+Pi[Pi.length-1].z)/2;na?(ni.z=na.z+vt(ni._,na._),ni.m=ni.z-_o):ni.z=_o}else na&&(ni.z=na.z+vt(ni._,na._));ni.parent.A=yn(ni,na,ni.parent.A||Ji[0])}function Wr(ni){ni._.x=ni.z+ni.parent.m,ni.m+=ni.parent.m}function yn(ni,Pi,Ji){if(Pi){for(var na=ni,_o=ni,ca=Pi,La=na.parent.children[0],qa=na.m,bo=_o.m,So=ca.m,Va=La.m,os;ca=ph(ca),na=Tm(na),ca&&na;)La=Tm(La),_o=ph(_o),_o.a=ni,os=ca.z+So-na.z-qa+vt(ca._,na._),os>0&&(pv(dg(ca,ni,Ji),ni,os),qa+=os,bo+=os),So+=ca.m,qa+=na.m,Va+=La.m,bo+=_o.m;ca&&!ph(_o)&&(_o.t=ca,_o.m+=So-bo),na&&!Tm(La)&&(La.t=na,La.m+=qa-Va,Ji=ni)}return Ji}function li(ni){ni.x*=Bt[0],ni.y=ni.depth*Bt[1]}return pr.separation=function(ni){return arguments.length?(vt=ni,pr):vt},pr.size=function(ni){return arguments.length?(fr=(Bt=ni)==null?li:null,pr):fr?null:Bt},pr.nodeSize=function(ni){return arguments.length?(fr=(Bt=ni)==null?null:li,pr):fr?Bt:null},Ud(pr,$e)};function Gm($e,vt){return $e.parent==vt.parent?1:2}function Tm($e){var vt=$e.children;return vt.length?vt[0]:$e.t}function ph($e){var vt=$e.children,Bt;return(Bt=vt.length)?vt[Bt-1]:$e.t}function pv($e,vt,Bt){var fr=Bt/(vt.i-$e.i);vt.c-=fr,vt.s+=Bt,$e.c+=fr,vt.z+=Bt,vt.m+=Bt}function Yd($e){for(var vt=0,Bt=0,fr=$e.children,pr=fr.length,_r;--pr>=0;)_r=fr[pr],_r.z+=vt,_r.m+=vt,vt+=_r.s+(Bt+=_r.c)}function dg($e,vt,Bt){return $e.a.parent===vt.parent?$e.a:Bt}w.layout.cluster=function(){var $e=w.layout.hierarchy().sort(null).value(null),vt=Gm,Bt=[1,1],fr=!1;function pr(_r,Yr){var Wr=$e.call(this,_r,Yr),yn=Wr[0],li,ni=0;wm(yn,function(ca){var La=ca.children;La&&La.length?(ca.x=iy(La),ca.y=Em(La)):(ca.x=li?ni+=vt(ca,li):0,ca.y=0,li=ca)});var Pi=sn(yn),Ji=Fn(yn),na=Pi.x-vt(Pi,Ji)/2,_o=Ji.x+vt(Ji,Pi)/2;return wm(yn,fr?function(ca){ca.x=(ca.x-yn.x)*Bt[0],ca.y=(yn.y-ca.y)*Bt[1]}:function(ca){ca.x=(ca.x-na)/(_o-na)*Bt[0],ca.y=(1-(yn.y?ca.y/yn.y:1))*Bt[1]}),Wr}return pr.separation=function(_r){return arguments.length?(vt=_r,pr):vt},pr.size=function(_r){return arguments.length?(fr=(Bt=_r)==null,pr):fr?null:Bt},pr.nodeSize=function(_r){return arguments.length?(fr=(Bt=_r)!=null,pr):fr?Bt:null},Ud(pr,$e)};function Em($e){return 1+w.max($e,function(vt){return vt.y})}function iy($e){return $e.reduce(function(vt,Bt){return vt+Bt.x},0)/$e.length}function sn($e){var vt=$e.children;return vt&&vt.length?sn(vt[0]):$e}function Fn($e){var vt=$e.children,Bt;return vt&&(Bt=vt.length)?Fn(vt[Bt-1]):$e}w.layout.treemap=function(){var $e=w.layout.hierarchy(),vt=Math.round,Bt=[1,1],fr=null,pr=Li,_r=!1,Yr,Wr="squarify",yn=.5*(1+Math.sqrt(5));function li(ca,La){for(var qa=-1,bo=ca.length,So,Va;++qa<bo;)Va=(So=ca[qa]).value*(La<0?0:La),So.area=isNaN(Va)||Va<=0?0:Va}function ni(ca){var La=ca.children;if(La&&La.length){var qa=pr(ca),bo=[],So=La.slice(),Va,os=1/0,ul,Us=Wr==="slice"?qa.dx:Wr==="dice"?qa.dy:Wr==="slice-dice"?ca.depth&1?qa.dy:qa.dx:Math.min(qa.dx,qa.dy),rl;for(li(So,qa.dx*qa.dy/ca.value),bo.area=0;(rl=So.length)>0;)bo.push(Va=So[rl-1]),bo.area+=Va.area,Wr!=="squarify"||(ul=Ji(bo,Us))<=os?(So.pop(),os=ul):(bo.area-=bo.pop().area,na(bo,Us,qa,!1),Us=Math.min(qa.dx,qa.dy),bo.length=bo.area=0,os=1/0);bo.length&&(na(bo,Us,qa,!0),bo.length=bo.area=0),La.forEach(ni)}}function Pi(ca){var La=ca.children;if(La&&La.length){var qa=pr(ca),bo=La.slice(),So,Va=[];for(li(bo,qa.dx*qa.dy/ca.value),Va.area=0;So=bo.pop();)Va.push(So),Va.area+=So.area,So.z!=null&&(na(Va,So.z?qa.dx:qa.dy,qa,!bo.length),Va.length=Va.area=0);La.forEach(Pi)}}function Ji(ca,La){for(var qa=ca.area,bo,So=0,Va=1/0,os=-1,ul=ca.length;++os<ul;)(bo=ca[os].area)&&(bo<Va&&(Va=bo),bo>So&&(So=bo));return qa*=qa,La*=La,qa?Math.max(La*So*yn/qa,qa/(La*Va*yn)):1/0}function na(ca,La,qa,bo){var So=-1,Va=ca.length,os=qa.x,ul=qa.y,Us=La?vt(ca.area/La):0,rl;if(La==qa.dx){for((bo||Us>qa.dy)&&(Us=qa.dy);++So<Va;)rl=ca[So],rl.x=os,rl.y=ul,rl.dy=Us,os+=rl.dx=Math.min(qa.x+qa.dx-os,Us?vt(rl.area/Us):0);rl.z=!0,rl.dx+=qa.x+qa.dx-os,qa.y+=Us,qa.dy-=Us}else{for((bo||Us>qa.dx)&&(Us=qa.dx);++So<Va;)rl=ca[So],rl.x=os,rl.y=ul,rl.dx=Us,ul+=rl.dy=Math.min(qa.y+qa.dy-ul,Us?vt(rl.area/Us):0);rl.z=!1,rl.dy+=qa.y+qa.dy-ul,qa.x+=Us,qa.dx-=Us}}function _o(ca){var La=Yr||$e(ca),qa=La[0];return qa.x=qa.y=0,qa.value?(qa.dx=Bt[0],qa.dy=Bt[1]):qa.dx=qa.dy=0,Yr&&$e.revalue(qa),li([qa],qa.dx*qa.dy/qa.value),(Yr?Pi:ni)(qa),_r&&(Yr=La),La}return _o.size=function(ca){return arguments.length?(Bt=ca,_o):Bt},_o.padding=function(ca){if(!arguments.length)return fr;function La(So){var Va=ca.call(_o,So,So.depth);return Va==null?Li(So):Si(So,typeof Va=="number"?[Va,Va,Va,Va]:Va)}function qa(So){return Si(So,ca)}var bo;return pr=(fr=ca)==null?Li:(bo=typeof ca)=="function"?La:(bo==="number"&&(ca=[ca,ca,ca,ca]),qa),_o},_o.round=function(ca){return arguments.length?(vt=ca?Math.round:Number,_o):vt!=Number},_o.sticky=function(ca){return arguments.length?(_r=ca,Yr=null,_o):_r},_o.ratio=function(ca){return arguments.length?(yn=ca,_o):yn},_o.mode=function(ca){return arguments.length?(Wr=ca+"",_o):Wr},Ud(_o,$e)};function Li($e){return{x:$e.x,y:$e.y,dx:$e.dx,dy:$e.dy}}function Si($e,vt){var Bt=$e.x+vt[3],fr=$e.y+vt[0],pr=$e.dx-vt[1]-vt[3],_r=$e.dy-vt[0]-vt[2];return pr<0&&(Bt+=pr/2,pr=0),_r<0&&(fr+=_r/2,_r=0),{x:Bt,y:fr,dx:pr,dy:_r}}w.random={normal:function($e,vt){var Bt=arguments.length;return Bt<2&&(vt=1),Bt<1&&($e=0),function(){var fr,pr,_r;do fr=Math.random()*2-1,pr=Math.random()*2-1,_r=fr*fr+pr*pr;while(!_r||_r>1);return $e+vt*fr*Math.sqrt(-2*Math.log(_r)/_r)}},logNormal:function(){var $e=w.random.normal.apply(w,arguments);return function(){return Math.exp($e())}},bates:function($e){var vt=w.random.irwinHall($e);return function(){return vt()/$e}},irwinHall:function($e){return function(){for(var vt=0,Bt=0;Bt<$e;Bt++)vt+=Math.random();return vt}}},w.scale={};function ma($e){var vt=$e[0],Bt=$e[$e.length-1];return vt<Bt?[vt,Bt]:[Bt,vt]}function yo($e){return $e.rangeExtent?$e.rangeExtent():ma($e.range())}function uo($e,vt,Bt,fr){var pr=Bt($e[0],$e[1]),_r=fr(vt[0],vt[1]);return function(Yr){return _r(pr(Yr))}}function rs($e,vt){var Bt=0,fr=$e.length-1,pr=$e[Bt],_r=$e[fr],Yr;return _r<pr&&(Yr=Bt,Bt=fr,fr=Yr,Yr=pr,pr=_r,_r=Yr),$e[Bt]=vt.floor(pr),$e[fr]=vt.ceil(_r),$e}function hs($e){return $e?{floor:function(vt){return Math.floor(vt/$e)*$e},ceil:function(vt){return Math.ceil(vt/$e)*$e}}:Ws}var Ws={floor:K,ceil:K};function Bo($e,vt,Bt,fr){var pr=[],_r=[],Yr=0,Wr=Math.min($e.length,vt.length)-1;for($e[Wr]<$e[0]&&($e=$e.slice().reverse(),vt=vt.slice().reverse());++Yr<=Wr;)pr.push(Bt($e[Yr-1],$e[Yr])),_r.push(fr(vt[Yr-1],vt[Yr]));return function(yn){var li=w.bisect($e,yn,1,Wr)-1;return _r[li](pr[li](yn))}}w.scale.linear=function(){return As([0,1],[0,1],Uc,!1)};function As($e,vt,Bt,fr){var pr,_r;function Yr(){var yn=Math.min($e.length,vt.length)>2?Bo:uo,li=fr?My:B1;return pr=yn($e,vt,li,Bt),_r=yn(vt,$e,li,Uc),Wr}function Wr(yn){return pr(yn)}return Wr.invert=function(yn){return _r(yn)},Wr.domain=function(yn){return arguments.length?($e=yn.map(Number),Yr()):$e},Wr.range=function(yn){return arguments.length?(vt=yn,Yr()):vt},Wr.rangeRound=function(yn){return Wr.range(yn).interpolate(lg)},Wr.clamp=function(yn){return arguments.length?(fr=yn,Yr()):fr},Wr.interpolate=function(yn){return arguments.length?(Bt=yn,Yr()):Bt},Wr.ticks=function(yn){return Tu($e,yn)},Wr.tickFormat=function(yn,li){return d3_scale_linearTickFormat($e,yn,li)},Wr.nice=function(yn){return Io($e,yn),Yr()},Wr.copy=function(){return As($e,vt,Bt,fr)},Yr()}function Jo($e,vt){return w.rebind($e,vt,"range","rangeRound","interpolate","clamp")}function Io($e,vt){return rs($e,hs(ll($e,vt)[2])),rs($e,hs(ll($e,vt)[2])),$e}function ll($e,vt){vt==null&&(vt=10);var Bt=ma($e),fr=Bt[1]-Bt[0],pr=Math.pow(10,Math.floor(Math.log(fr/vt)/Math.LN10)),_r=vt/fr*pr;return _r<=.15?pr*=10:_r<=.35?pr*=5:_r<=.75&&(pr*=2),Bt[0]=Math.ceil(Bt[0]/pr)*pr,Bt[1]=Math.floor(Bt[1]/pr)*pr+pr*.5,Bt[2]=pr,Bt}function Tu($e,vt){return w.range.apply(w,ll($e,vt))}w.scale.log=function(){return du(w.scale.linear().domain([0,1]),10,!0,[1,10])};function du($e,vt,Bt,fr){function pr(Wr){return(Bt?Math.log(Wr<0?0:Wr):-Math.log(Wr>0?0:-Wr))/Math.log(vt)}function _r(Wr){return Bt?Math.pow(vt,Wr):-Math.pow(vt,-Wr)}function Yr(Wr){return $e(pr(Wr))}return Yr.invert=function(Wr){return _r($e.invert(Wr))},Yr.domain=function(Wr){return arguments.length?(Bt=Wr[0]>=0,$e.domain((fr=Wr.map(Number)).map(pr)),Yr):fr},Yr.base=function(Wr){return arguments.length?(vt=+Wr,$e.domain(fr.map(pr)),Yr):vt},Yr.nice=function(){var Wr=rs(fr.map(pr),Bt?Math:ku);return $e.domain(Wr),fr=Wr.map(_r),Yr},Yr.ticks=function(){var Wr=ma(fr),yn=[],li=Wr[0],ni=Wr[1],Pi=Math.floor(pr(li)),Ji=Math.ceil(pr(ni)),na=vt%1?2:vt;if(isFinite(Ji-Pi)){if(Bt){for(;Pi<Ji;Pi++)for(var _o=1;_o<na;_o++)yn.push(_r(Pi)*_o);yn.push(_r(Pi))}else for(yn.push(_r(Pi));Pi++<Ji;)for(var _o=na-1;_o>0;_o--)yn.push(_r(Pi)*_o);for(Pi=0;yn[Pi]<li;Pi++);for(Ji=yn.length;yn[Ji-1]>ni;Ji--);yn=yn.slice(Pi,Ji)}return yn},Yr.copy=function(){return du($e.copy(),vt,Bt,fr)},Jo(Yr,$e)}var ku={floor:function($e){return-Math.ceil(-$e)},ceil:function($e){return-Math.floor(-$e)}};w.scale.pow=function(){return Au(w.scale.linear(),1,[0,1])};function Au($e,vt,Bt){var fr=cl(vt),pr=cl(1/vt);function _r(Yr){return $e(fr(Yr))}return _r.invert=function(Yr){return pr($e.invert(Yr))},_r.domain=function(Yr){return arguments.length?($e.domain((Bt=Yr.map(Number)).map(fr)),_r):Bt},_r.ticks=function(Yr){return Tu(Bt,Yr)},_r.tickFormat=function(Yr,Wr){return d3_scale_linearTickFormat(Bt,Yr,Wr)},_r.nice=function(Yr){return _r.domain(Io(Bt,Yr))},_r.exponent=function(Yr){return arguments.length?(fr=cl(vt=Yr),pr=cl(1/vt),$e.domain(Bt.map(fr)),_r):vt},_r.copy=function(){return Au($e.copy(),vt,Bt)},Jo(_r,$e)}function cl($e){return function(vt){return vt<0?-Math.pow(-vt,$e):Math.pow(vt,$e)}}w.scale.sqrt=function(){return w.scale.pow().exponent(.5)},w.scale.ordinal=function(){return Os([],{t:"range",a:[[]]})};function Os($e,vt){var Bt,fr,pr;function _r(Wr){return fr[((Bt.get(Wr)||(vt.t==="range"?Bt.set(Wr,$e.push(Wr)):NaN))-1)%fr.length]}function Yr(Wr,yn){return w.range($e.length).map(function(li){return Wr+yn*li})}return _r.domain=function(Wr){if(!arguments.length)return $e;$e=[],Bt=new N;for(var yn=-1,li=Wr.length,ni;++yn<li;)Bt.has(ni=Wr[yn])||Bt.set(ni,$e.push(ni));return _r[vt.t].apply(_r,vt.a)},_r.range=function(Wr){return arguments.length?(fr=Wr,pr=0,vt={t:"range",a:arguments},_r):fr},_r.rangePoints=function(Wr,yn){arguments.length<2&&(yn=0);var li=Wr[0],ni=Wr[1],Pi=$e.length<2?(li=(li+ni)/2,0):(ni-li)/($e.length-1+yn);return fr=Yr(li+Pi*yn/2,Pi),pr=0,vt={t:"rangePoints",a:arguments},_r},_r.rangeRoundPoints=function(Wr,yn){arguments.length<2&&(yn=0);var li=Wr[0],ni=Wr[1],Pi=$e.length<2?(li=ni=Math.round((li+ni)/2),0):(ni-li)/($e.length-1+yn)|0;return fr=Yr(li+Math.round(Pi*yn/2+(ni-li-($e.length-1+yn)*Pi)/2),Pi),pr=0,vt={t:"rangeRoundPoints",a:arguments},_r},_r.rangeBands=function(Wr,yn,li){arguments.length<2&&(yn=0),arguments.length<3&&(li=yn);var ni=Wr[1]<Wr[0],Pi=Wr[ni-0],Ji=Wr[1-ni],na=(Ji-Pi)/($e.length-yn+2*li);return fr=Yr(Pi+na*li,na),ni&&fr.reverse(),pr=na*(1-yn),vt={t:"rangeBands",a:arguments},_r},_r.rangeRoundBands=function(Wr,yn,li){arguments.length<2&&(yn=0),arguments.length<3&&(li=yn);var ni=Wr[1]<Wr[0],Pi=Wr[ni-0],Ji=Wr[1-ni],na=Math.floor((Ji-Pi)/($e.length-yn+2*li));return fr=Yr(Pi+Math.round((Ji-Pi-($e.length-yn)*na)/2),na),ni&&fr.reverse(),pr=Math.round(na*(1-yn)),vt={t:"rangeRoundBands",a:arguments},_r},_r.rangeBand=function(){return pr},_r.rangeExtent=function(){return ma(vt.a[0])},_r.copy=function(){return Os($e,vt)},_r.domain($e)}w.scale.category10=function(){return w.scale.ordinal().range(Vu)},w.scale.category20=function(){return w.scale.ordinal().range(Nc)},w.scale.category20b=function(){return w.scale.ordinal().range(Sf)},w.scale.category20c=function(){return w.scale.ordinal().range(sd)};var Vu=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(ei),Nc=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(ei),Sf=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(ei),sd=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(ei);w.scale.quantile=function(){return Cf([],[])};function Cf($e,vt){var Bt;function fr(){var _r=0,Yr=vt.length;for(Bt=[];++_r<Yr;)Bt[_r-1]=w.quantile($e,_r/Yr);return pr}function pr(_r){if(!isNaN(_r=+_r))return vt[w.bisect(Bt,_r)]}return pr.domain=function(_r){return arguments.length?($e=_r.map(_).filter(x).sort(m),fr()):$e},pr.range=function(_r){return arguments.length?(vt=_r,fr()):vt},pr.quantiles=function(){return Bt},pr.invertExtent=function(_r){return _r=vt.indexOf(_r),_r<0?[NaN,NaN]:[_r>0?Bt[_r-1]:$e[0],_r<Bt.length?Bt[_r]:$e[$e.length-1]]},pr.copy=function(){return Cf($e,vt)},fr()}w.scale.quantize=function(){return ld(0,1,[0,1])};function ld($e,vt,Bt){var fr,pr;function _r(Wr){return Bt[Math.max(0,Math.min(pr,Math.floor(fr*(Wr-$e))))]}function Yr(){return fr=Bt.length/(vt-$e),pr=Bt.length-1,_r}return _r.domain=function(Wr){return arguments.length?($e=+Wr[0],vt=+Wr[Wr.length-1],Yr()):[$e,vt]},_r.range=function(Wr){return arguments.length?(Bt=Wr,Yr()):Bt},_r.invertExtent=function(Wr){return Wr=Bt.indexOf(Wr),Wr=Wr<0?NaN:Wr/fr+$e,[Wr,Wr+1/fr]},_r.copy=function(){return ld($e,vt,Bt)},Yr()}w.scale.threshold=function(){return Jc([.5],[0,1])};function Jc($e,vt){function Bt(fr){if(fr<=fr)return vt[w.bisect($e,fr)]}return Bt.domain=function(fr){return arguments.length?($e=fr,Bt):$e},Bt.range=function(fr){return arguments.length?(vt=fr,Bt):vt},Bt.invertExtent=function(fr){return fr=vt.indexOf(fr),[$e[fr-1],$e[fr]]},Bt.copy=function(){return Jc($e,vt)},Bt}w.scale.identity=function(){return wh([0,1])};function wh($e){function vt(Bt){return+Bt}return vt.invert=vt,vt.domain=vt.range=function(Bt){return arguments.length?($e=Bt.map(vt),vt):$e},vt.ticks=function(Bt){return Tu($e,Bt)},vt.tickFormat=function(Bt,fr){return d3_scale_linearTickFormat($e,Bt,fr)},vt.copy=function(){return wh($e)},vt}w.svg={};function vh(){return 0}w.svg.arc=function(){var $e=Wl,vt=lc,Bt=vh,fr=rd,pr=Bf,_r=gf,Yr=rv;function Wr(){var li=Math.max(0,+$e.apply(this,arguments)),ni=Math.max(0,+vt.apply(this,arguments)),Pi=pr.apply(this,arguments)-mt,Ji=_r.apply(this,arguments)-mt,na=Math.abs(Ji-Pi),_o=Pi>Ji?0:1;if(ni<li&&(ca=ni,ni=li,li=ca),na>=et)return yn(ni,_o)+(li?yn(li,1-_o):"")+"Z";var ca,La,qa,bo,So=0,Va=0,os,ul,Us,rl,Yl,eu,Vc,ou,Zu=[];if((bo=(+Yr.apply(this,arguments)||0)/2)&&(qa=fr===rd?Math.sqrt(li*li+ni*ni):+fr.apply(this,arguments),_o||(Va*=-1),ni&&(Va=Or(qa/ni*Math.sin(bo))),li&&(So=Or(qa/li*Math.sin(bo)))),ni){os=ni*Math.cos(Pi+Va),ul=ni*Math.sin(Pi+Va),Us=ni*Math.cos(Ji-Va),rl=ni*Math.sin(Ji-Va);var Qc=Math.abs(Ji-Pi-2*Va)<=je?0:1;if(Va&&nv(os,ul,Us,rl)===_o^Qc){var Ph=(Pi+Ji)/2;os=ni*Math.cos(Ph),ul=ni*Math.sin(Ph),Us=rl=null}}else os=ul=0;if(li){Yl=li*Math.cos(Ji-So),eu=li*Math.sin(Ji-So),Vc=li*Math.cos(Pi+So),ou=li*Math.sin(Pi+So);var xd=Math.abs(Pi-Ji+2*So)<=je?0:1;if(So&&nv(Yl,eu,Vc,ou)===1-_o^xd){var Rl=(Pi+Ji)/2;Yl=li*Math.cos(Rl),eu=li*Math.sin(Rl),Vc=ou=null}}else Yl=eu=0;if(na>Ot&&(ca=Math.min(Math.abs(ni-li)/2,+Bt.apply(this,arguments)))>.001){La=li<ni^_o?0:1;var Cc=ca,$c=ca;if(na<je){var ud=Vc==null?[Yl,eu]:Us==null?[os,ul]:zc([os,ul],[Vc,ou],[Us,rl],[Yl,eu]),Uf=os-ud[0],mv=ul-ud[1],Mf=Us-ud[0],cd=rl-ud[1],qv=1/Math.sin(Math.acos((Uf*Mf+mv*cd)/(Math.sqrt(Uf*Uf+mv*mv)*Math.sqrt(Mf*Mf+cd*cd)))/2),Th=Math.sqrt(ud[0]*ud[0]+ud[1]*ud[1]);$c=Math.min(ca,(li-Th)/(qv-1)),Cc=Math.min(ca,(ni-Th)/(qv+1))}if(Us!=null){var rr=vv(Vc==null?[Yl,eu]:[Vc,ou],[os,ul],ni,Cc,_o),mn=vv([Us,rl],[Yl,eu],ni,Cc,_o);ca===Cc?Zu.push("M",rr[0],"A",Cc,",",Cc," 0 0,",La," ",rr[1],"A",ni,",",ni," 0 ",1-_o^nv(rr[1][0],rr[1][1],mn[1][0],mn[1][1]),",",_o," ",mn[1],"A",Cc,",",Cc," 0 0,",La," ",mn[0]):Zu.push("M",rr[0],"A",Cc,",",Cc," 0 1,",La," ",mn[0])}else Zu.push("M",os,",",ul);if(Vc!=null){var En=vv([os,ul],[Vc,ou],li,-$c,_o),ia=vv([Yl,eu],Us==null?[os,ul]:[Us,rl],li,-$c,_o);ca===$c?Zu.push("L",ia[0],"A",$c,",",$c," 0 0,",La," ",ia[1],"A",li,",",li," 0 ",_o^nv(ia[1][0],ia[1][1],En[1][0],En[1][1]),",",1-_o," ",En[1],"A",$c,",",$c," 0 0,",La," ",En[0]):Zu.push("L",ia[0],"A",$c,",",$c," 0 0,",La," ",En[0])}else Zu.push("L",Yl,",",eu)}else Zu.push("M",os,",",ul),Us!=null&&Zu.push("A",ni,",",ni," 0 ",Qc,",",_o," ",Us,",",rl),Zu.push("L",Yl,",",eu),Vc!=null&&Zu.push("A",li,",",li," 0 ",xd,",",1-_o," ",Vc,",",ou);return Zu.push("Z"),Zu.join("")}function yn(li,ni){return"M0,"+li+"A"+li+","+li+" 0 1,"+ni+" 0,"+-li+"A"+li+","+li+" 0 1,"+ni+" 0,"+li}return Wr.innerRadius=function(li){return arguments.length?($e=wr(li),Wr):$e},Wr.outerRadius=function(li){return arguments.length?(vt=wr(li),Wr):vt},Wr.cornerRadius=function(li){return arguments.length?(Bt=wr(li),Wr):Bt},Wr.padRadius=function(li){return arguments.length?(fr=li==rd?rd:wr(li),Wr):fr},Wr.startAngle=function(li){return arguments.length?(pr=wr(li),Wr):pr},Wr.endAngle=function(li){return arguments.length?(_r=wr(li),Wr):_r},Wr.padAngle=function(li){return arguments.length?(Yr=wr(li),Wr):Yr},Wr.centroid=function(){var li=(+$e.apply(this,arguments)+ +vt.apply(this,arguments))/2,ni=(+pr.apply(this,arguments)+ +_r.apply(this,arguments))/2-mt;return[Math.cos(ni)*li,Math.sin(ni)*li]},Wr};var rd="auto";function Wl($e){return $e.innerRadius}function lc($e){return $e.outerRadius}function Bf($e){return $e.startAngle}function gf($e){return $e.endAngle}function rv($e){return $e&&$e.padAngle}function nv($e,vt,Bt,fr){return($e-Bt)*vt-(vt-fr)*$e>0?0:1}function vv($e,vt,Bt,fr,pr){var _r=$e[0]-vt[0],Yr=$e[1]-vt[1],Wr=(pr?fr:-fr)/Math.sqrt(_r*_r+Yr*Yr),yn=Wr*Yr,li=-Wr*_r,ni=$e[0]+yn,Pi=$e[1]+li,Ji=vt[0]+yn,na=vt[1]+li,_o=(ni+Ji)/2,ca=(Pi+na)/2,La=Ji-ni,qa=na-Pi,bo=La*La+qa*qa,So=Bt-fr,Va=ni*na-Ji*Pi,os=(qa<0?-1:1)*Math.sqrt(Math.max(0,So*So*bo-Va*Va)),ul=(Va*qa-La*os)/bo,Us=(-Va*La-qa*os)/bo,rl=(Va*qa+La*os)/bo,Yl=(-Va*La+qa*os)/bo,eu=ul-_o,Vc=Us-ca,ou=rl-_o,Zu=Yl-ca;return eu*eu+Vc*Vc>ou*ou+Zu*Zu&&(ul=rl,Us=Yl),[[ul-yn,Us-li],[ul*Bt/So,Us*Bt/So]]}function kg(){return!0}function iv($e){var vt=El,Bt=iu,fr=kg,pr=Sh,_r=pr.key,Yr=.7;function Wr(yn){var li=[],ni=[],Pi=-1,Ji=yn.length,na,_o=wr(vt),ca=wr(Bt);function La(){li.push("M",pr($e(ni),Yr))}for(;++Pi<Ji;)fr.call(this,na=yn[Pi],Pi)?ni.push([+_o.call(this,na,Pi),+ca.call(this,na,Pi)]):ni.length&&(La(),ni=[]);return ni.length&&La(),li.length?li.join(""):null}return Wr.x=function(yn){return arguments.length?(vt=yn,Wr):vt},Wr.y=function(yn){return arguments.length?(Bt=yn,Wr):Bt},Wr.defined=function(yn){return arguments.length?(fr=yn,Wr):fr},Wr.interpolate=function(yn){return arguments.length?(typeof yn=="function"?_r=pr=yn:_r=(pr=$m.get(yn)||Sh).key,Wr):_r},Wr.tension=function(yn){return arguments.length?(Yr=yn,Wr):Yr},Wr}w.svg.line=function(){return iv(K)};var $m=w.map({linear:Sh,"linear-closed":Wm,step:Iu,"step-before":Gu,"step-after":Ym,basis:it,"basis-open":ot,"basis-closed":bt,bundle:ar,cardinal:wt,"cardinal-open":Vv,"cardinal-closed":kv,monotone:zt});$m.forEach(function($e,vt){vt.key=$e,vt.closed=/-closed$/.test($e)});function Sh($e){return $e.length>1?$e.join("L"):$e+"Z"}function Wm($e){return $e.join("L")+"Z"}function Iu($e){for(var vt=0,Bt=$e.length,fr=$e[0],pr=[fr[0],",",fr[1]];++vt<Bt;)pr.push("H",(fr[0]+(fr=$e[vt])[0])/2,"V",fr[1]);return Bt>1&&pr.push("H",fr[0]),pr.join("")}function Gu($e){for(var vt=0,Bt=$e.length,fr=$e[0],pr=[fr[0],",",fr[1]];++vt<Bt;)pr.push("V",(fr=$e[vt])[1],"H",fr[0]);return pr.join("")}function Ym($e){for(var vt=0,Bt=$e.length,fr=$e[0],pr=[fr[0],",",fr[1]];++vt<Bt;)pr.push("H",(fr=$e[vt])[0],"V",fr[1]);return pr.join("")}function Vv($e,vt){return $e.length<4?Sh($e):$e[1]+q($e.slice(1,-1),Ae($e,vt))}function kv($e,vt){return $e.length<3?Wm($e):$e[0]+q(($e.push($e[0]),$e),Ae([$e[$e.length-2]].concat($e,[$e[1]]),vt))}function wt($e,vt){return $e.length<3?Sh($e):$e[0]+q($e,Ae($e,vt))}function q($e,vt){if(vt.length<1||$e.length!=vt.length&&$e.length!=vt.length+2)return Sh($e);var Bt=$e.length!=vt.length,fr="",pr=$e[0],_r=$e[1],Yr=vt[0],Wr=Yr,yn=1;if(Bt&&(fr+="Q"+(_r[0]-Yr[0]*2/3)+","+(_r[1]-Yr[1]*2/3)+","+_r[0]+","+_r[1],pr=$e[1],yn=2),vt.length>1){Wr=vt[1],_r=$e[yn],yn++,fr+="C"+(pr[0]+Yr[0])+","+(pr[1]+Yr[1])+","+(_r[0]-Wr[0])+","+(_r[1]-Wr[1])+","+_r[0]+","+_r[1];for(var li=2;li<vt.length;li++,yn++)_r=$e[yn],Wr=vt[li],fr+="S"+(_r[0]-Wr[0])+","+(_r[1]-Wr[1])+","+_r[0]+","+_r[1]}if(Bt){var ni=$e[yn];fr+="Q"+(_r[0]+Wr[0]*2/3)+","+(_r[1]+Wr[1]*2/3)+","+ni[0]+","+ni[1]}return fr}function Ae($e,vt){for(var Bt=[],fr=(1-vt)/2,pr,_r=$e[0],Yr=$e[1],Wr=1,yn=$e.length;++Wr<yn;)pr=_r,_r=Yr,Yr=$e[Wr],Bt.push([fr*(Yr[0]-pr[0]),fr*(Yr[1]-pr[1])]);return Bt}function it($e){if($e.length<3)return Sh($e);var vt=1,Bt=$e.length,fr=$e[0],pr=fr[0],_r=fr[1],Yr=[pr,pr,pr,(fr=$e[1])[0]],Wr=[_r,_r,_r,fr[1]],yn=[pr,",",_r,"L",yr(Cn,Yr),",",yr(Cn,Wr)];for($e.push($e[Bt-1]);++vt<=Bt;)fr=$e[vt],Yr.shift(),Yr.push(fr[0]),Wr.shift(),Wr.push(fr[1]),Pn(yn,Yr,Wr);return $e.pop(),yn.push("L",fr),yn.join("")}function ot($e){if($e.length<4)return Sh($e);for(var vt=[],Bt=-1,fr=$e.length,pr,_r=[0],Yr=[0];++Bt<3;)pr=$e[Bt],_r.push(pr[0]),Yr.push(pr[1]);for(vt.push(yr(Cn,_r)+","+yr(Cn,Yr)),--Bt;++Bt<fr;)pr=$e[Bt],_r.shift(),_r.push(pr[0]),Yr.shift(),Yr.push(pr[1]),Pn(vt,_r,Yr);return vt.join("")}function bt($e){for(var vt,Bt=-1,fr=$e.length,pr=fr+4,_r,Yr=[],Wr=[];++Bt<4;)_r=$e[Bt%fr],Yr.push(_r[0]),Wr.push(_r[1]);for(vt=[yr(Cn,Yr),",",yr(Cn,Wr)],--Bt;++Bt<pr;)_r=$e[Bt%fr],Yr.shift(),Yr.push(_r[0]),Wr.shift(),Wr.push(_r[1]),Pn(vt,Yr,Wr);return vt.join("")}function ar($e,vt){var Bt=$e.length-1;if(Bt)for(var fr=$e[0][0],pr=$e[0][1],_r=$e[Bt][0]-fr,Yr=$e[Bt][1]-pr,Wr=-1,yn,li;++Wr<=Bt;)yn=$e[Wr],li=Wr/Bt,yn[0]=vt*yn[0]+(1-vt)*(fr+li*_r),yn[1]=vt*yn[1]+(1-vt)*(pr+li*Yr);return it($e)}function yr($e,vt){return $e[0]*vt[0]+$e[1]*vt[1]+$e[2]*vt[2]+$e[3]*vt[3]}var Ur=[0,2/3,1/3,0],ln=[0,1/3,2/3,0],Cn=[0,1/6,2/3,1/6];function Pn($e,vt,Bt){$e.push("C",yr(Ur,vt),",",yr(Ur,Bt),",",yr(ln,vt),",",yr(ln,Bt),",",yr(Cn,vt),",",yr(Cn,Bt))}function vi($e,vt){return(vt[1]-$e[1])/(vt[0]-$e[0])}function Ui($e){for(var vt=0,Bt=$e.length-1,fr=[],pr=$e[0],_r=$e[1],Yr=fr[0]=vi(pr,_r);++vt<Bt;)fr[vt]=(Yr+(Yr=vi(pr=_r,_r=$e[vt+1])))/2;return fr[vt]=Yr,fr}function kt($e){for(var vt=[],Bt,fr,pr,_r,Yr=Ui($e),Wr=-1,yn=$e.length-1;++Wr<yn;)Bt=vi($e[Wr],$e[Wr+1]),g(Bt)<Ot?Yr[Wr]=Yr[Wr+1]=0:(fr=Yr[Wr]/Bt,pr=Yr[Wr+1]/Bt,_r=fr*fr+pr*pr,_r>9&&(_r=Bt*3/Math.sqrt(_r),Yr[Wr]=_r*fr,Yr[Wr+1]=_r*pr));for(Wr=-1;++Wr<=yn;)_r=($e[Math.min(yn,Wr+1)][0]-$e[Math.max(0,Wr-1)][0])/(6*(1+Yr[Wr]*Yr[Wr])),vt.push([_r||0,Yr[Wr]*_r||0]);return vt}function zt($e){return $e.length<3?Sh($e):$e[0]+q($e,kt($e))}w.svg.line.radial=function(){var $e=iv(Qt);return $e.radius=$e.x,delete $e.x,$e.angle=$e.y,delete $e.y,$e};function Qt($e){for(var vt,Bt=-1,fr=$e.length,pr,_r;++Bt<fr;)vt=$e[Bt],pr=vt[0],_r=vt[1]-mt,vt[0]=pr*Math.cos(_r),vt[1]=pr*Math.sin(_r);return $e}function cr($e){var vt=El,Bt=El,fr=0,pr=iu,_r=kg,Yr=Sh,Wr=Yr.key,yn=Yr,li="L",ni=.7;function Pi(Ji){var na=[],_o=[],ca=[],La=-1,qa=Ji.length,bo,So=wr(vt),Va=wr(fr),os=vt===Bt?function(){return Us}:wr(Bt),ul=fr===pr?function(){return rl}:wr(pr),Us,rl;function Yl(){na.push("M",Yr($e(ca),ni),li,yn($e(_o.reverse()),ni),"Z")}for(;++La<qa;)_r.call(this,bo=Ji[La],La)?(_o.push([Us=+So.call(this,bo,La),rl=+Va.call(this,bo,La)]),ca.push([+os.call(this,bo,La),+ul.call(this,bo,La)])):_o.length&&(Yl(),_o=[],ca=[]);return _o.length&&Yl(),na.length?na.join(""):null}return Pi.x=function(Ji){return arguments.length?(vt=Bt=Ji,Pi):Bt},Pi.x0=function(Ji){return arguments.length?(vt=Ji,Pi):vt},Pi.x1=function(Ji){return arguments.length?(Bt=Ji,Pi):Bt},Pi.y=function(Ji){return arguments.length?(fr=pr=Ji,Pi):pr},Pi.y0=function(Ji){return arguments.length?(fr=Ji,Pi):fr},Pi.y1=function(Ji){return arguments.length?(pr=Ji,Pi):pr},Pi.defined=function(Ji){return arguments.length?(_r=Ji,Pi):_r},Pi.interpolate=function(Ji){return arguments.length?(typeof Ji=="function"?Wr=Yr=Ji:Wr=(Yr=$m.get(Ji)||Sh).key,yn=Yr.reverse||Yr,li=Yr.closed?"M":"L",Pi):Wr},Pi.tension=function(Ji){return arguments.length?(ni=Ji,Pi):ni},Pi}Gu.reverse=Ym,Ym.reverse=Gu,w.svg.area=function(){return cr(K)},w.svg.area.radial=function(){var $e=cr(Qt);return $e.radius=$e.x,delete $e.x,$e.innerRadius=$e.x0,delete $e.x0,$e.outerRadius=$e.x1,delete $e.x1,$e.angle=$e.y,delete $e.y,$e.startAngle=$e.y0,delete $e.y0,$e.endAngle=$e.y1,delete $e.y1,$e};function Sr($e){return $e.source}function gr($e){return $e.target}w.svg.chord=function(){var $e=Sr,vt=gr,Bt=Nr,fr=Bf,pr=gf;function _r(ni,Pi){var Ji=Yr(this,$e,ni,Pi),na=Yr(this,vt,ni,Pi);return"M"+Ji.p0+yn(Ji.r,Ji.p1,Ji.a1-Ji.a0)+(Wr(Ji,na)?li(Ji.r,Ji.p1,Ji.r,Ji.p0):li(Ji.r,Ji.p1,na.r,na.p0)+yn(na.r,na.p1,na.a1-na.a0)+li(na.r,na.p1,Ji.r,Ji.p0))+"Z"}function Yr(ni,Pi,Ji,na){var _o=Pi.call(ni,Ji,na),ca=Bt.call(ni,_o,na),La=fr.call(ni,_o,na)-mt,qa=pr.call(ni,_o,na)-mt;return{r:ca,a0:La,a1:qa,p0:[ca*Math.cos(La),ca*Math.sin(La)],p1:[ca*Math.cos(qa),ca*Math.sin(qa)]}}function Wr(ni,Pi){return ni.a0==Pi.a0&&ni.a1==Pi.a1}function yn(ni,Pi,Ji){return"A"+ni+","+ni+" 0 "+ +(Ji>je)+",1 "+Pi}function li(ni,Pi,Ji,na){return"Q 0,0 "+na}return _r.radius=function(ni){return arguments.length?(Bt=wr(ni),_r):Bt},_r.source=function(ni){return arguments.length?($e=wr(ni),_r):$e},_r.target=function(ni){return arguments.length?(vt=wr(ni),_r):vt},_r.startAngle=function(ni){return arguments.length?(fr=wr(ni),_r):fr},_r.endAngle=function(ni){return arguments.length?(pr=wr(ni),_r):pr},_r};function Nr($e){return $e.radius}w.svg.diagonal=function(){var $e=Sr,vt=gr,Bt=vn;function fr(pr,_r){var Yr=$e.call(this,pr,_r),Wr=vt.call(this,pr,_r),yn=(Yr.y+Wr.y)/2,li=[Yr,{x:Yr.x,y:yn},{x:Wr.x,y:yn},Wr];return li=li.map(Bt),"M"+li[0]+"C"+li[1]+" "+li[2]+" "+li[3]}return fr.source=function(pr){return arguments.length?($e=wr(pr),fr):$e},fr.target=function(pr){return arguments.length?(vt=wr(pr),fr):vt},fr.projection=function(pr){return arguments.length?(Bt=pr,fr):Bt},fr};function vn($e){return[$e.x,$e.y]}w.svg.diagonal.radial=function(){var $e=w.svg.diagonal(),vt=vn,Bt=$e.projection;return $e.projection=function(fr){return arguments.length?Bt(An(vt=fr)):vt},$e};function An($e){return function(){var vt=$e.apply(this,arguments),Bt=vt[0],fr=vt[1]-mt;return[Bt*Math.cos(fr),Bt*Math.sin(fr)]}}w.svg.symbol=function(){var $e=ai,vt=Ln;function Bt(fr,pr){return(ra.get($e.call(this,fr,pr))||ki)(vt.call(this,fr,pr))}return Bt.type=function(fr){return arguments.length?($e=wr(fr),Bt):$e},Bt.size=function(fr){return arguments.length?(vt=wr(fr),Bt):vt},Bt};function Ln(){return 64}function ai(){return"circle"}function ki($e){var vt=Math.sqrt($e/je);return"M0,"+vt+"A"+vt+","+vt+" 0 1,1 0,"+-vt+"A"+vt+","+vt+" 0 1,1 0,"+vt+"Z"}var ra=w.map({circle:ki,cross:function($e){var vt=Math.sqrt($e/5)/2;return"M"+-3*vt+","+-vt+"H"+-vt+"V"+-3*vt+"H"+vt+"V"+-vt+"H"+3*vt+"V"+vt+"H"+vt+"V"+3*vt+"H"+-vt+"V"+vt+"H"+-3*vt+"Z"},diamond:function($e){var vt=Math.sqrt($e/(2*Ma)),Bt=vt*Ma;return"M0,"+-vt+"L"+Bt+",0 0,"+vt+" "+-Bt+",0Z"},square:function($e){var vt=Math.sqrt($e)/2;return"M"+-vt+","+-vt+"L"+vt+","+-vt+" "+vt+","+vt+" "+-vt+","+vt+"Z"},"triangle-down":function($e){var vt=Math.sqrt($e/oa),Bt=vt*oa/2;return"M0,"+Bt+"L"+vt+","+-Bt+" "+-vt+","+-Bt+"Z"},"triangle-up":function($e){var vt=Math.sqrt($e/oa),Bt=vt*oa/2;return"M0,"+-Bt+"L"+vt+","+Bt+" "+-vt+","+Bt+"Z"}});w.svg.symbolTypes=ra.keys();var oa=Math.sqrt(3),Ma=Math.tan(30*Nt);xe.transition=function($e){for(var vt=Zl||++fl,Bt=Gc($e),fr=[],pr,_r,Yr=Fl||{time:Date.now(),ease:mu,delay:0,duration:250},Wr=-1,yn=this.length;++Wr<yn;){fr.push(pr=[]);for(var li=this[Wr],ni=-1,Pi=li.length;++ni<Pi;)(_r=li[ni])&&_c(_r,ni,Bt,vt,Yr),pr.push(_r)}return $o(fr,Bt,vt)},xe.interrupt=function($e){return this.each($e==null?mo:ns(Gc($e)))};var mo=ns(Gc());function ns($e){return function(){var vt,Bt,fr;(vt=this[$e])&&(fr=vt[Bt=vt.active])&&(fr.timer.c=null,fr.timer.t=NaN,--vt.count?delete vt[Bt]:delete this[$e],vt.active+=.5,fr.event&&fr.event.interrupt.call(this,this.__data__,fr.index))}}function $o($e,vt,Bt){return oe($e,as),$e.namespace=vt,$e.id=Bt,$e}var as=[],fl=0,Zl,Fl;as.call=xe.call,as.empty=xe.empty,as.node=xe.node,as.size=xe.size,w.transition=function($e,vt){return $e&&$e.transition?Zl?$e.transition(vt):$e:w.selection().transition($e)},w.transition.prototype=as,as.select=function($e){var vt=this.id,Bt=this.namespace,fr=[],pr,_r,Yr;$e=se($e);for(var Wr=-1,yn=this.length;++Wr<yn;){fr.push(pr=[]);for(var li=this[Wr],ni=-1,Pi=li.length;++ni<Pi;)(Yr=li[ni])&&(_r=$e.call(Yr,Yr.__data__,ni,Wr))?("__data__"in Yr&&(_r.__data__=Yr.__data__),_c(_r,ni,Bt,vt,Yr[Bt][vt]),pr.push(_r)):pr.push(null)}return $o(fr,Bt,vt)},as.selectAll=function($e){var vt=this.id,Bt=this.namespace,fr=[],pr,_r,Yr,Wr,yn;$e=Ee($e);for(var li=-1,ni=this.length;++li<ni;)for(var Pi=this[li],Ji=-1,na=Pi.length;++Ji<na;)if(Yr=Pi[Ji]){yn=Yr[Bt][vt],_r=$e.call(Yr,Yr.__data__,Ji,li),fr.push(pr=[]);for(var _o=-1,ca=_r.length;++_o<ca;)(Wr=_r[_o])&&_c(Wr,_o,Bt,vt,yn),pr.push(Wr)}return $o(fr,Bt,vt)},as.filter=function($e){var vt=[],Bt,fr,pr;typeof $e!="function"&&($e=Ue($e));for(var _r=0,Yr=this.length;_r<Yr;_r++){vt.push(Bt=[]);for(var fr=this[_r],Wr=0,yn=fr.length;Wr<yn;Wr++)(pr=fr[Wr])&&$e.call(pr,pr.__data__,Wr,_r)&&Bt.push(pr)}return $o(vt,this.namespace,this.id)},as.tween=function($e,vt){var Bt=this.id,fr=this.namespace;return arguments.length<2?this.node()[fr][Bt].tween.get($e):Gt(this,vt==null?function(pr){pr[fr][Bt].tween.remove($e)}:function(pr){pr[fr][Bt].tween.set($e,vt)})};function Du($e,vt,Bt,fr){var pr=$e.id,_r=$e.namespace;return Gt($e,typeof Bt=="function"?function(Yr,Wr,yn){Yr[_r][pr].tween.set(vt,fr(Bt.call(Yr,Yr.__data__,Wr,yn)))}:(Bt=fr(Bt),function(Yr){Yr[_r][pr].tween.set(vt,Bt)}))}as.attr=function($e,vt){if(arguments.length<2){for(vt in $e)this.attr(vt,$e[vt]);return this}var Bt=$e=="transform"?E0:Uc,fr=w.ns.qualify($e);function pr(){this.removeAttribute(fr)}function _r(){this.removeAttributeNS(fr.space,fr.local)}function Yr(yn){return yn==null?pr:(yn+="",function(){var li=this.getAttribute(fr),ni;return li!==yn&&(ni=Bt(li,yn),function(Pi){this.setAttribute(fr,ni(Pi))})})}function Wr(yn){return yn==null?_r:(yn+="",function(){var li=this.getAttributeNS(fr.space,fr.local),ni;return li!==yn&&(ni=Bt(li,yn),function(Pi){this.setAttributeNS(fr.space,fr.local,ni(Pi))})})}return Du(this,"attr."+$e,vt,fr.local?Wr:Yr)},as.attrTween=function($e,vt){var Bt=w.ns.qualify($e);function fr(_r,Yr){var Wr=vt.call(this,_r,Yr,this.getAttribute(Bt));return Wr&&function(yn){this.setAttribute(Bt,Wr(yn))}}function pr(_r,Yr){var Wr=vt.call(this,_r,Yr,this.getAttributeNS(Bt.space,Bt.local));return Wr&&function(yn){this.setAttributeNS(Bt.space,Bt.local,Wr(yn))}}return this.tween("attr."+$e,Bt.local?pr:fr)},as.style=function($e,vt,Bt){var fr=arguments.length;if(fr<3){if(typeof $e!="string"){fr<2&&(vt="");for(Bt in $e)this.style(Bt,$e[Bt],vt);return this}Bt=""}function pr(){this.style.removeProperty($e)}function _r(Yr){return Yr==null?pr:(Yr+="",function(){var Wr=u(this).getComputedStyle(this,null).getPropertyValue($e),yn;return Wr!==Yr&&(yn=Uc(Wr,Yr),function(li){this.style.setProperty($e,yn(li),Bt)})})}return Du(this,"style."+$e,vt,_r)},as.styleTween=function($e,vt,Bt){arguments.length<3&&(Bt="");function fr(pr,_r){var Yr=vt.call(this,pr,_r,u(this).getComputedStyle(this,null).getPropertyValue($e));return Yr&&function(Wr){this.style.setProperty($e,Yr(Wr),Bt)}}return this.tween("style."+$e,fr)},as.text=function($e){return Du(this,"text",$e,qc)};function qc($e){return $e==null&&($e=""),function(){this.textContent=$e}}as.remove=function(){var $e=this.namespace;return this.each("end.transition",function(){var vt;this[$e].count<2&&(vt=this.parentNode)&&vt.removeChild(this)})},as.ease=function($e){var vt=this.id,Bt=this.namespace;return arguments.length<1?this.node()[Bt][vt].ease:(typeof $e!="function"&&($e=w.ease.apply(w,arguments)),Gt(this,function(fr){fr[Bt][vt].ease=$e}))},as.delay=function($e){var vt=this.id,Bt=this.namespace;return arguments.length<1?this.node()[Bt][vt].delay:Gt(this,typeof $e=="function"?function(fr,pr,_r){fr[Bt][vt].delay=+$e.call(fr,fr.__data__,pr,_r)}:($e=+$e,function(fr){fr[Bt][vt].delay=$e}))},as.duration=function($e){var vt=this.id,Bt=this.namespace;return arguments.length<1?this.node()[Bt][vt].duration:Gt(this,typeof $e=="function"?function(fr,pr,_r){fr[Bt][vt].duration=Math.max(1,$e.call(fr,fr.__data__,pr,_r))}:($e=Math.max(1,$e),function(fr){fr[Bt][vt].duration=$e}))},as.each=function($e,vt){var Bt=this.id,fr=this.namespace;if(arguments.length<2){var pr=Fl,_r=Zl;try{Zl=Bt,Gt(this,function(Yr,Wr,yn){Fl=Yr[fr][Bt],$e.call(Yr,Yr.__data__,Wr,yn)})}finally{Fl=pr,Zl=_r}}else Gt(this,function(Yr){var Wr=Yr[fr][Bt];(Wr.event||(Wr.event=w.dispatch("start","end","interrupt"))).on($e,vt)});return this},as.transition=function(){for(var $e=this.id,vt=++fl,Bt=this.namespace,fr=[],pr,_r,Yr,Wr,yn=0,li=this.length;yn<li;yn++){fr.push(pr=[]);for(var _r=this[yn],ni=0,Pi=_r.length;ni<Pi;ni++)(Yr=_r[ni])&&(Wr=Yr[Bt][$e],_c(Yr,ni,Bt,vt,{time:Wr.time,ease:Wr.ease,delay:Wr.delay+Wr.duration,duration:Wr.duration})),pr.push(Yr)}return $o(fr,Bt,vt)};function Gc($e){return $e==null?"__transition__":"__transition_"+$e+"__"}function _c($e,vt,Bt,fr,pr){var _r=$e[Bt]||($e[Bt]={active:0,count:0}),Yr=_r[fr],Wr,yn,li,ni,Pi;function Ji(ca){var La=Yr.delay;if(yn.t=La+Wr,La<=ca)return na(ca-La);yn.c=na}function na(ca){var La=_r.active,qa=_r[La];qa&&(qa.timer.c=null,qa.timer.t=NaN,--_r.count,delete _r[La],qa.event&&qa.event.interrupt.call($e,$e.__data__,qa.index));for(var bo in _r)if(+bo<fr){var So=_r[bo];So.timer.c=null,So.timer.t=NaN,--_r.count,delete _r[bo]}yn.c=_o,No(function(){return yn.c&&_o(ca||1)&&(yn.c=null,yn.t=NaN),1},0,Wr),_r.active=fr,Yr.event&&Yr.event.start.call($e,$e.__data__,vt),Pi=[],Yr.tween.forEach(function(Va,os){(os=os.call($e,$e.__data__,vt))&&Pi.push(os)}),ni=Yr.ease,li=Yr.duration}function _o(ca){for(var La=ca/li,qa=ni(La),bo=Pi.length;bo>0;)Pi[--bo].call($e,qa);if(La>=1)return Yr.event&&Yr.event.end.call($e,$e.__data__,vt),--_r.count?delete _r[fr]:delete $e[Bt],1}Yr||(Wr=pr.time,yn=No(Ji,0,Wr),Yr=_r[fr]={tween:new N,time:Wr,timer:yn,delay:pr.delay,duration:pr.duration,ease:pr.ease,index:vt},pr=null,++_r.count)}w.svg.axis=function(){var $e=w.scale.linear(),vt=ef,Bt=6,fr=6,pr=3,_r=[10],Yr=null,Wr;function yn(li){li.each(function(){var ni=w.select(this),Pi=this.__chart__||$e,Ji=this.__chart__=$e.copy(),na=Yr??(Ji.ticks?Ji.ticks.apply(Ji,_r):Ji.domain()),_o=Wr??(Ji.tickFormat?Ji.tickFormat.apply(Ji,_r):K),ca=ni.selectAll(".tick").data(na,Ji),La=ca.enter().insert("g",".domain").attr("class","tick").style("opacity",Ot),qa=w.transition(ca.exit()).style("opacity",Ot).remove(),bo=w.transition(ca.order()).style("opacity",1),So=Math.max(Bt,0)+pr,Va,os=yo(Ji),ul=ni.selectAll(".domain").data([0]),Us=(ul.enter().append("path").attr("class","domain"),w.transition(ul));La.append("line"),La.append("text");var rl=La.select("line"),Yl=bo.select("line"),eu=ca.select("text").text(_o),Vc=La.select("text"),ou=bo.select("text"),Zu=vt==="top"||vt==="left"?-1:1,Qc,Ph,xd,Rl;if(vt==="bottom"||vt==="top"?(Va=kd,Qc="x",xd="y",Ph="x2",Rl="y2",eu.attr("dy",Zu<0?"0em":".71em").style("text-anchor","middle"),Us.attr("d","M"+os[0]+","+Zu*fr+"V0H"+os[1]+"V"+Zu*fr)):(Va=Ec,Qc="y",xd="x",Ph="y2",Rl="x2",eu.attr("dy",".32em").style("text-anchor",Zu<0?"end":"start"),Us.attr("d","M"+Zu*fr+","+os[0]+"H0V"+os[1]+"H"+Zu*fr)),rl.attr(Rl,Zu*Bt),Vc.attr(xd,Zu*So),Yl.attr(Ph,0).attr(Rl,Zu*Bt),ou.attr(Qc,0).attr(xd,Zu*So),Ji.rangeBand){var Cc=Ji,$c=Cc.rangeBand()/2;Pi=Ji=function(ud){return Cc(ud)+$c}}else Pi.rangeBand?Pi=Ji:qa.call(Va,Ji,Pi);La.call(Va,Pi,Ji),bo.call(Va,Ji,Ji)})}return yn.scale=function(li){return arguments.length?($e=li,yn):$e},yn.orient=function(li){return arguments.length?(vt=li in Xd?li+"":ef,yn):vt},yn.ticks=function(){return arguments.length?(_r=O(arguments),yn):_r},yn.tickValues=function(li){return arguments.length?(Yr=li,yn):Yr},yn.tickFormat=function(li){return arguments.length?(Wr=li,yn):Wr},yn.tickSize=function(li){var ni=arguments.length;return ni?(Bt=+li,fr=+arguments[ni-1],yn):Bt},yn.innerTickSize=function(li){return arguments.length?(Bt=+li,yn):Bt},yn.outerTickSize=function(li){return arguments.length?(fr=+li,yn):fr},yn.tickPadding=function(li){return arguments.length?(pr=+li,yn):pr},yn.tickSubdivide=function(){return arguments.length&&yn},yn};var ef="bottom",Xd={top:1,right:1,bottom:1,left:1};function kd($e,vt,Bt){$e.attr("transform",function(fr){var pr=vt(fr);return"translate("+(isFinite(pr)?pr:Bt(fr))+",0)"})}function Ec($e,vt,Bt){$e.attr("transform",function(fr){var pr=vt(fr);return"translate(0,"+(isFinite(pr)?pr:Bt(fr))+")"})}w.svg.brush=function(){var $e=ke(ni,"brushstart","brush","brushend"),vt=null,Bt=null,fr=[0,0],pr=[0,0],_r,Yr,Wr=!0,yn=!0,li=Ih[0];function ni(ca){ca.each(function(){var La=w.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",_o).on("touchstart.brush",_o),qa=La.selectAll(".background").data([0]);qa.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),La.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var bo=La.selectAll(".resize").data(li,K);bo.exit().remove(),bo.enter().append("g").attr("class",function(ul){return"resize "+ul}).style("cursor",function(ul){return Ac[ul]}).append("rect").attr("x",function(ul){return/[ew]$/.test(ul)?-3:null}).attr("y",function(ul){return/^[ns]/.test(ul)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),bo.style("display",ni.empty()?"none":null);var So=w.transition(La),Va=w.transition(qa),os;vt&&(os=yo(vt),Va.attr("x",os[0]).attr("width",os[1]-os[0]),Ji(So)),Bt&&(os=yo(Bt),Va.attr("y",os[0]).attr("height",os[1]-os[0]),na(So)),Pi(So)})}ni.event=function(ca){ca.each(function(){var La=$e.of(this,arguments),qa={x:fr,y:pr,i:_r,j:Yr},bo=this.__chart__||qa;this.__chart__=qa,Zl?w.select(this).transition().each("start.brush",function(){_r=bo.i,Yr=bo.j,fr=bo.x,pr=bo.y,La({type:"brushstart"})}).tween("brush:brush",function(){var So=zf(fr,qa.x),Va=zf(pr,qa.y);return _r=Yr=null,function(os){fr=qa.x=So(os),pr=qa.y=Va(os),La({type:"brush",mode:"resize"})}}).each("end.brush",function(){_r=qa.i,Yr=qa.j,La({type:"brush",mode:"resize"}),La({type:"brushend"})}):(La({type:"brushstart"}),La({type:"brush",mode:"resize"}),La({type:"brushend"}))})};function Pi(ca){ca.selectAll(".resize").attr("transform",function(La){return"translate("+fr[+/e$/.test(La)]+","+pr[+/^s/.test(La)]+")"})}function Ji(ca){ca.select(".extent").attr("x",fr[0]),ca.selectAll(".extent,.n>rect,.s>rect").attr("width",fr[1]-fr[0])}function na(ca){ca.select(".extent").attr("y",pr[0]),ca.selectAll(".extent,.e>rect,.w>rect").attr("height",pr[1]-pr[0])}function _o(){var ca=this,La=w.select(w.event.target),qa=$e.of(ca,arguments),bo=w.select(ca),So=La.datum(),Va=!/^(n|s)$/.test(So)&&vt,os=!/^(e|w)$/.test(So)&&Bt,ul=La.classed("extent"),Us=In(ca),rl,Yl=w.mouse(ca),eu,Vc=w.select(u(ca)).on("keydown.brush",Qc).on("keyup.brush",Ph);if(w.event.changedTouches?Vc.on("touchmove.brush",xd).on("touchend.brush",Cc):Vc.on("mousemove.brush",xd).on("mouseup.brush",Cc),bo.interrupt().selectAll("*").interrupt(),ul)Yl[0]=fr[0]-Yl[0],Yl[1]=pr[0]-Yl[1];else if(So){var ou=+/w$/.test(So),Zu=+/^n/.test(So);eu=[fr[1-ou]-Yl[0],pr[1-Zu]-Yl[1]],Yl[0]=fr[ou],Yl[1]=pr[Zu]}else w.event.altKey&&(rl=Yl.slice());bo.style("pointer-events","none").selectAll(".resize").style("display",null),w.select("body").style("cursor",La.style("cursor")),qa({type:"brushstart"}),xd();function Qc(){w.event.keyCode==32&&(ul||(rl=null,Yl[0]-=fr[1],Yl[1]-=pr[1],ul=2),we())}function Ph(){w.event.keyCode==32&&ul==2&&(Yl[0]+=fr[1],Yl[1]+=pr[1],ul=0,we())}function xd(){var $c=w.mouse(ca),ud=!1;eu&&($c[0]+=eu[0],$c[1]+=eu[1]),ul||(w.event.altKey?(rl||(rl=[(fr[0]+fr[1])/2,(pr[0]+pr[1])/2]),Yl[0]=fr[+($c[0]<rl[0])],Yl[1]=pr[+($c[1]<rl[1])]):rl=null),Va&&Rl($c,vt,0)&&(Ji(bo),ud=!0),os&&Rl($c,Bt,1)&&(na(bo),ud=!0),ud&&(Pi(bo),qa({type:"brush",mode:ul?"move":"resize"}))}function Rl($c,ud,Uf){var mv=yo(ud),Mf=mv[0],cd=mv[1],qv=Yl[Uf],Th=Uf?pr:fr,rr=Th[1]-Th[0],mn,En;if(ul&&(Mf-=qv,cd-=rr+qv),mn=(Uf?yn:Wr)?Math.max(Mf,Math.min(cd,$c[Uf])):$c[Uf],ul?En=(mn+=qv)+rr:(rl&&(qv=Math.max(Mf,Math.min(cd,2*rl[Uf]-mn))),qv<mn?(En=mn,mn=qv):En=qv),Th[0]!=mn||Th[1]!=En)return Uf?Yr=null:_r=null,Th[0]=mn,Th[1]=En,!0}function Cc(){xd(),bo.style("pointer-events","all").selectAll(".resize").style("display",ni.empty()?"none":null),w.select("body").style("cursor",null),Vc.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),Us(),qa({type:"brushend"})}}return ni.x=function(ca){return arguments.length?(vt=ca,li=Ih[!vt<<1|!Bt],ni):vt},ni.y=function(ca){return arguments.length?(Bt=ca,li=Ih[!vt<<1|!Bt],ni):Bt},ni.clamp=function(ca){return arguments.length?(vt&&Bt?(Wr=!!ca[0],yn=!!ca[1]):vt?Wr=!!ca:Bt&&(yn=!!ca),ni):vt&&Bt?[Wr,yn]:vt?Wr:Bt?yn:null},ni.extent=function(ca){var La,qa,bo,So,Va;return arguments.length?(vt&&(La=ca[0],qa=ca[1],Bt&&(La=La[0],qa=qa[0]),_r=[La,qa],vt.invert&&(La=vt(La),qa=vt(qa)),qa<La&&(Va=La,La=qa,qa=Va),(La!=fr[0]||qa!=fr[1])&&(fr=[La,qa])),Bt&&(bo=ca[0],So=ca[1],vt&&(bo=bo[1],So=So[1]),Yr=[bo,So],Bt.invert&&(bo=Bt(bo),So=Bt(So)),So<bo&&(Va=bo,bo=So,So=Va),(bo!=pr[0]||So!=pr[1])&&(pr=[bo,So])),ni):(vt&&(_r?(La=_r[0],qa=_r[1]):(La=fr[0],qa=fr[1],vt.invert&&(La=vt.invert(La),qa=vt.invert(qa)),qa<La&&(Va=La,La=qa,qa=Va))),Bt&&(Yr?(bo=Yr[0],So=Yr[1]):(bo=pr[0],So=pr[1],Bt.invert&&(bo=Bt.invert(bo),So=Bt.invert(So)),So<bo&&(Va=bo,bo=So,So=Va))),vt&&Bt?[[La,bo],[qa,So]]:vt?[La,qa]:Bt&&[bo,So])},ni.clear=function(){return ni.empty()||(fr=[0,0],pr=[0,0],_r=Yr=null),ni},ni.empty=function(){return!!vt&&fr[0]==fr[1]||!!Bt&&pr[0]==pr[1]},w.rebind(ni,$e,"on")};var Ac={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Ih=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]];w.text=gn(function($e){return $e.responseText}),w.json=function($e,vt){return Xn($e,"application/json",Ep,vt)};function Ep($e){return JSON.parse($e.responseText)}w.html=function($e,vt){return Xn($e,"text/html",Iv,vt)};function Iv($e){var vt=z.createRange();return vt.selectNode(z.body),vt.createContextualFragment($e.responseText)}w.xml=gn(function($e){return $e.responseXML}),typeof le=="object"&&le.exports?le.exports=w:this.d3=w}).apply(self)}}),Je=U({"node_modules/d3-time/dist/d3-time.js"(pe,le){(function(w,R){typeof pe=="object"&&typeof le<"u"?R(pe):(w=w||self,R(w.d3=w.d3||{}))})(pe,function(w){var R=new Date,O=new Date;function z(Ue,xt,Gt,Jt){function Ut(kr){return Ue(kr=arguments.length===0?new Date:new Date(+kr)),kr}return Ut.floor=function(kr){return Ue(kr=new Date(+kr)),kr},Ut.ceil=function(kr){return Ue(kr=new Date(kr-1)),xt(kr,1),Ue(kr),kr},Ut.round=function(kr){var Pr=Ut(kr),$r=Ut.ceil(kr);return kr-Pr<$r-kr?Pr:$r},Ut.offset=function(kr,Pr){return xt(kr=new Date(+kr),Pr==null?1:Math.floor(Pr)),kr},Ut.range=function(kr,Pr,$r){var rn=[],kn;if(kr=Ut.ceil(kr),$r=$r==null?1:Math.floor($r),!(kr<Pr)||!($r>0))return rn;do rn.push(kn=new Date(+kr)),xt(kr,$r),Ue(kr);while(kn<kr&&kr<Pr);return rn},Ut.filter=function(kr){return z(function(Pr){if(Pr>=Pr)for(;Ue(Pr),!kr(Pr);)Pr.setTime(Pr-1)},function(Pr,$r){if(Pr>=Pr)if($r<0)for(;++$r<=0;)for(;xt(Pr,-1),!kr(Pr););else for(;--$r>=0;)for(;xt(Pr,1),!kr(Pr););})},Gt&&(Ut.count=function(kr,Pr){return R.setTime(+kr),O.setTime(+Pr),Ue(R),Ue(O),Math.floor(Gt(R,O))},Ut.every=function(kr){return kr=Math.floor(kr),!isFinite(kr)||!(kr>0)?null:kr>1?Ut.filter(Jt?function(Pr){return Jt(Pr)%kr===0}:function(Pr){return Ut.count(0,Pr)%kr===0}):Ut}),Ut}var l=z(function(){},function(Ue,xt){Ue.setTime(+Ue+xt)},function(Ue,xt){return xt-Ue});l.every=function(Ue){return Ue=Math.floor(Ue),!isFinite(Ue)||!(Ue>0)?null:Ue>1?z(function(xt){xt.setTime(Math.floor(xt/Ue)*Ue)},function(xt,Gt){xt.setTime(+xt+Gt*Ue)},function(xt,Gt){return(Gt-xt)/Ue}):l};var u=l.range,c=1e3,p=6e4,f=36e5,v=864e5,h=6048e5,m=z(function(Ue){Ue.setTime(Ue-Ue.getMilliseconds())},function(Ue,xt){Ue.setTime(+Ue+xt*c)},function(Ue,xt){return(xt-Ue)/c},function(Ue){return Ue.getUTCSeconds()}),_=m.range,x=z(function(Ue){Ue.setTime(Ue-Ue.getMilliseconds()-Ue.getSeconds()*c)},function(Ue,xt){Ue.setTime(+Ue+xt*p)},function(Ue,xt){return(xt-Ue)/p},function(Ue){return Ue.getMinutes()}),A=x.range,E=z(function(Ue){Ue.setTime(Ue-Ue.getMilliseconds()-Ue.getSeconds()*c-Ue.getMinutes()*p)},function(Ue,xt){Ue.setTime(+Ue+xt*f)},function(Ue,xt){return(xt-Ue)/f},function(Ue){return Ue.getHours()}),D=E.range,g=z(function(Ue){Ue.setHours(0,0,0,0)},function(Ue,xt){Ue.setDate(Ue.getDate()+xt)},function(Ue,xt){return(xt-Ue-(xt.getTimezoneOffset()-Ue.getTimezoneOffset())*p)/v},function(Ue){return Ue.getDate()-1}),C=g.range;function I(Ue){return z(function(xt){xt.setDate(xt.getDate()-(xt.getDay()+7-Ue)%7),xt.setHours(0,0,0,0)},function(xt,Gt){xt.setDate(xt.getDate()+Gt*7)},function(xt,Gt){return(Gt-xt-(Gt.getTimezoneOffset()-xt.getTimezoneOffset())*p)/h})}var N=I(0),F=I(1),k=I(2),P=I(3),T=I(4),y=I(5),S=I(6),M=N.range,W=F.range,$=k.range,Z=P.range,K=T.range,Q=y.range,J=S.range,G=z(function(Ue){Ue.setDate(1),Ue.setHours(0,0,0,0)},function(Ue,xt){Ue.setMonth(Ue.getMonth()+xt)},function(Ue,xt){return xt.getMonth()-Ue.getMonth()+(xt.getFullYear()-Ue.getFullYear())*12},function(Ue){return Ue.getMonth()}),ee=G.range,re=z(function(Ue){Ue.setMonth(0,1),Ue.setHours(0,0,0,0)},function(Ue,xt){Ue.setFullYear(Ue.getFullYear()+xt)},function(Ue,xt){return xt.getFullYear()-Ue.getFullYear()},function(Ue){return Ue.getFullYear()});re.every=function(Ue){return!isFinite(Ue=Math.floor(Ue))||!(Ue>0)?null:z(function(xt){xt.setFullYear(Math.floor(xt.getFullYear()/Ue)*Ue),xt.setMonth(0,1),xt.setHours(0,0,0,0)},function(xt,Gt){xt.setFullYear(xt.getFullYear()+Gt*Ue)})};var fe=re.range,we=z(function(Ue){Ue.setUTCSeconds(0,0)},function(Ue,xt){Ue.setTime(+Ue+xt*p)},function(Ue,xt){return(xt-Ue)/p},function(Ue){return Ue.getUTCMinutes()}),Oe=we.range,ke=z(function(Ue){Ue.setUTCMinutes(0,0,0)},function(Ue,xt){Ue.setTime(+Ue+xt*f)},function(Ue,xt){return(xt-Ue)/f},function(Ue){return Ue.getUTCHours()}),Le=ke.range,oe=z(function(Ue){Ue.setUTCHours(0,0,0,0)},function(Ue,xt){Ue.setUTCDate(Ue.getUTCDate()+xt)},function(Ue,xt){return(xt-Ue)/v},function(Ue){return Ue.getUTCDate()-1}),be=oe.range;function _e(Ue){return z(function(xt){xt.setUTCDate(xt.getUTCDate()-(xt.getUTCDay()+7-Ue)%7),xt.setUTCHours(0,0,0,0)},function(xt,Gt){xt.setUTCDate(xt.getUTCDate()+Gt*7)},function(xt,Gt){return(Gt-xt)/h})}var he=_e(0),De=_e(1),xe=_e(2),se=_e(3),Ee=_e(4),Te=_e(5),Be=_e(6),tt=he.range,at=De.range,gt=xe.range,pt=se.range,Rt=Ee.range,$t=Te.range,Wt=Be.range,Ht=z(function(Ue){Ue.setUTCDate(1),Ue.setUTCHours(0,0,0,0)},function(Ue,xt){Ue.setUTCMonth(Ue.getUTCMonth()+xt)},function(Ue,xt){return xt.getUTCMonth()-Ue.getUTCMonth()+(xt.getUTCFullYear()-Ue.getUTCFullYear())*12},function(Ue){return Ue.getUTCMonth()}),Ft=Ht.range,st=z(function(Ue){Ue.setUTCMonth(0,1),Ue.setUTCHours(0,0,0,0)},function(Ue,xt){Ue.setUTCFullYear(Ue.getUTCFullYear()+xt)},function(Ue,xt){return xt.getUTCFullYear()-Ue.getUTCFullYear()},function(Ue){return Ue.getUTCFullYear()});st.every=function(Ue){return!isFinite(Ue=Math.floor(Ue))||!(Ue>0)?null:z(function(xt){xt.setUTCFullYear(Math.floor(xt.getUTCFullYear()/Ue)*Ue),xt.setUTCMonth(0,1),xt.setUTCHours(0,0,0,0)},function(xt,Gt){xt.setUTCFullYear(xt.getUTCFullYear()+Gt*Ue)})};var rt=st.range;w.timeDay=g,w.timeDays=C,w.timeFriday=y,w.timeFridays=Q,w.timeHour=E,w.timeHours=D,w.timeInterval=z,w.timeMillisecond=l,w.timeMilliseconds=u,w.timeMinute=x,w.timeMinutes=A,w.timeMonday=F,w.timeMondays=W,w.timeMonth=G,w.timeMonths=ee,w.timeSaturday=S,w.timeSaturdays=J,w.timeSecond=m,w.timeSeconds=_,w.timeSunday=N,w.timeSundays=M,w.timeThursday=T,w.timeThursdays=K,w.timeTuesday=k,w.timeTuesdays=$,w.timeWednesday=P,w.timeWednesdays=Z,w.timeWeek=N,w.timeWeeks=M,w.timeYear=re,w.timeYears=fe,w.utcDay=oe,w.utcDays=be,w.utcFriday=Te,w.utcFridays=$t,w.utcHour=ke,w.utcHours=Le,w.utcMillisecond=l,w.utcMilliseconds=u,w.utcMinute=we,w.utcMinutes=Oe,w.utcMonday=De,w.utcMondays=at,w.utcMonth=Ht,w.utcMonths=Ft,w.utcSaturday=Be,w.utcSaturdays=Wt,w.utcSecond=m,w.utcSeconds=_,w.utcSunday=he,w.utcSundays=tt,w.utcThursday=Ee,w.utcThursdays=Rt,w.utcTuesday=xe,w.utcTuesdays=gt,w.utcWednesday=se,w.utcWednesdays=pt,w.utcWeek=he,w.utcWeeks=tt,w.utcYear=st,w.utcYears=rt,Object.defineProperty(w,"__esModule",{value:!0})})}}),nt=U({"node_modules/d3-time-format/dist/d3-time-format.js"(pe,le){(function(w,R){typeof pe=="object"&&typeof le<"u"?R(pe,Je()):(w=w||self,R(w.d3=w.d3||{},w.d3))})(pe,function(w,R){function O(St){if(0<=St.y&&St.y<100){var Ot=new Date(-1,St.m,St.d,St.H,St.M,St.S,St.L);return Ot.setFullYear(St.y),Ot}return new Date(St.y,St.m,St.d,St.H,St.M,St.S,St.L)}function z(St){if(0<=St.y&&St.y<100){var Ot=new Date(Date.UTC(-1,St.m,St.d,St.H,St.M,St.S,St.L));return Ot.setUTCFullYear(St.y),Ot}return new Date(Date.UTC(St.y,St.m,St.d,St.H,St.M,St.S,St.L))}function l(St,Ot,Et){return{y:St,m:Ot,d:Et,H:0,M:0,S:0,L:0}}function u(St){var Ot=St.dateTime,Et=St.date,je=St.time,Ye=St.periods,et=St.days,mt=St.shortDays,Nt=St.months,lr=St.shortMonths,br=_(Ye),Or=x(Ye),tn=_(et),Jr=x(et),dn=_(mt),on=x(mt),Nn=_(Nt),Wi=x(Nt),Oa=_(lr),Da=x(lr),Aa={a:Na,A:ro,b:oo,B:xo,c:null,d:G,e:G,f:Oe,H:ee,I:re,j:fe,L:we,m:ke,M:Le,p:vr,q:er,Q:Pr,s:$r,S:oe,u:be,U:_e,V:he,w:De,W:xe,x:null,X:null,y:se,Y:Ee,Z:Te,"%":kr},Ka={a:si,A:ei,b:Kn,B:qn,c:null,d:Be,e:Be,f:Rt,H:tt,I:at,j:gt,L:pt,m:$t,M:Wt,p:pi,q:_i,Q:Pr,s:$r,S:Ht,u:Ft,U:st,V:rt,w:Ue,W:xt,x:null,X:null,y:Gt,Y:Jt,Z:Ut,"%":kr},Sa={a:nn,A:Kr,b:$n,B:Ai,c:aa,d:T,e:T,f:Z,H:S,I:S,j:y,L:$,m:P,M,p:Hr,q:k,Q,s:J,S:W,u:E,U:D,V:g,w:A,W:C,x:Ci,X:Ta,y:N,Y:I,Z:F,"%":K};Aa.x=no(Et,Aa),Aa.X=no(je,Aa),Aa.c=no(Ot,Aa),Ka.x=no(Et,Ka),Ka.X=no(je,Ka),Ka.c=no(Ot,Ka);function no(fi,Ri){return function($i){var Hi=[],wr=-1,gn=0,Xn=fi.length,Yi,ha,Ca;for($i instanceof Date||($i=new Date(+$i));++wr<Xn;)fi.charCodeAt(wr)===37&&(Hi.push(fi.slice(gn,wr)),(ha=c[Yi=fi.charAt(++wr)])!=null?Yi=fi.charAt(++wr):ha=Yi==="e"?" ":"0",(Ca=Ri[Yi])&&(Yi=Ca($i,ha)),Hi.push(Yi),gn=wr+1);return Hi.push(fi.slice(gn,wr)),Hi.join("")}}function Fo(fi,Ri){return function($i){var Hi=l(1900,void 0,1),wr=an(Hi,fi,$i+="",0),gn,Xn;if(wr!=$i.length)return null;if("Q"in Hi)return new Date(Hi.Q);if("s"in Hi)return new Date(Hi.s*1e3+("L"in Hi?Hi.L:0));if(Ri&&!("Z"in Hi)&&(Hi.Z=0),"p"in Hi&&(Hi.H=Hi.H%12+Hi.p*12),Hi.m===void 0&&(Hi.m="q"in Hi?Hi.q:0),"V"in Hi){if(Hi.V<1||Hi.V>53)return null;"w"in Hi||(Hi.w=1),"Z"in Hi?(gn=z(l(Hi.y,0,1)),Xn=gn.getUTCDay(),gn=Xn>4||Xn===0?R.utcMonday.ceil(gn):R.utcMonday(gn),gn=R.utcDay.offset(gn,(Hi.V-1)*7),Hi.y=gn.getUTCFullYear(),Hi.m=gn.getUTCMonth(),Hi.d=gn.getUTCDate()+(Hi.w+6)%7):(gn=O(l(Hi.y,0,1)),Xn=gn.getDay(),gn=Xn>4||Xn===0?R.timeMonday.ceil(gn):R.timeMonday(gn),gn=R.timeDay.offset(gn,(Hi.V-1)*7),Hi.y=gn.getFullYear(),Hi.m=gn.getMonth(),Hi.d=gn.getDate()+(Hi.w+6)%7)}else("W"in Hi||"U"in Hi)&&("w"in Hi||(Hi.w="u"in Hi?Hi.u%7:"W"in Hi?1:0),Xn="Z"in Hi?z(l(Hi.y,0,1)).getUTCDay():O(l(Hi.y,0,1)).getDay(),Hi.m=0,Hi.d="W"in Hi?(Hi.w+6)%7+Hi.W*7-(Xn+5)%7:Hi.w+Hi.U*7-(Xn+6)%7);return"Z"in Hi?(Hi.H+=Hi.Z/100|0,Hi.M+=Hi.Z%100,z(Hi)):O(Hi)}}function an(fi,Ri,$i,Hi){for(var wr=0,gn=Ri.length,Xn=$i.length,Yi,ha;wr<gn;){if(Hi>=Xn)return-1;if(Yi=Ri.charCodeAt(wr++),Yi===37){if(Yi=Ri.charAt(wr++),ha=Sa[Yi in c?Ri.charAt(wr++):Yi],!ha||(Hi=ha(fi,$i,Hi))<0)return-1}else if(Yi!=$i.charCodeAt(Hi++))return-1}return Hi}function Hr(fi,Ri,$i){var Hi=br.exec(Ri.slice($i));return Hi?(fi.p=Or[Hi[0].toLowerCase()],$i+Hi[0].length):-1}function nn(fi,Ri,$i){var Hi=dn.exec(Ri.slice($i));return Hi?(fi.w=on[Hi[0].toLowerCase()],$i+Hi[0].length):-1}function Kr(fi,Ri,$i){var Hi=tn.exec(Ri.slice($i));return Hi?(fi.w=Jr[Hi[0].toLowerCase()],$i+Hi[0].length):-1}function $n(fi,Ri,$i){var Hi=Oa.exec(Ri.slice($i));return Hi?(fi.m=Da[Hi[0].toLowerCase()],$i+Hi[0].length):-1}function Ai(fi,Ri,$i){var Hi=Nn.exec(Ri.slice($i));return Hi?(fi.m=Wi[Hi[0].toLowerCase()],$i+Hi[0].length):-1}function aa(fi,Ri,$i){return an(fi,Ot,Ri,$i)}function Ci(fi,Ri,$i){return an(fi,Et,Ri,$i)}function Ta(fi,Ri,$i){return an(fi,je,Ri,$i)}function Na(fi){return mt[fi.getDay()]}function ro(fi){return et[fi.getDay()]}function oo(fi){return lr[fi.getMonth()]}function xo(fi){return Nt[fi.getMonth()]}function vr(fi){return Ye[+(fi.getHours()>=12)]}function er(fi){return 1+~~(fi.getMonth()/3)}function si(fi){return mt[fi.getUTCDay()]}function ei(fi){return et[fi.getUTCDay()]}function Kn(fi){return lr[fi.getUTCMonth()]}function qn(fi){return Nt[fi.getUTCMonth()]}function pi(fi){return Ye[+(fi.getUTCHours()>=12)]}function _i(fi){return 1+~~(fi.getUTCMonth()/3)}return{format:function(fi){var Ri=no(fi+="",Aa);return Ri.toString=function(){return fi},Ri},parse:function(fi){var Ri=Fo(fi+="",!1);return Ri.toString=function(){return fi},Ri},utcFormat:function(fi){var Ri=no(fi+="",Ka);return Ri.toString=function(){return fi},Ri},utcParse:function(fi){var Ri=Fo(fi+="",!0);return Ri.toString=function(){return fi},Ri}}}var c={"-":"",_:" ",0:"0"},p=/^\s*\d+/,f=/^%/,v=/[\\^$*+?|[\]().{}]/g;function h(St,Ot,Et){var je=St<0?"-":"",Ye=(je?-St:St)+"",et=Ye.length;return je+(et<Et?new Array(Et-et+1).join(Ot)+Ye:Ye)}function m(St){return St.replace(v,"\\$&")}function _(St){return new RegExp("^(?:"+St.map(m).join("|")+")","i")}function x(St){for(var Ot={},Et=-1,je=St.length;++Et<je;)Ot[St[Et].toLowerCase()]=Et;return Ot}function A(St,Ot,Et){var je=p.exec(Ot.slice(Et,Et+1));return je?(St.w=+je[0],Et+je[0].length):-1}function E(St,Ot,Et){var je=p.exec(Ot.slice(Et,Et+1));return je?(St.u=+je[0],Et+je[0].length):-1}function D(St,Ot,Et){var je=p.exec(Ot.slice(Et,Et+2));return je?(St.U=+je[0],Et+je[0].length):-1}function g(St,Ot,Et){var je=p.exec(Ot.slice(Et,Et+2));return je?(St.V=+je[0],Et+je[0].length):-1}function C(St,Ot,Et){var je=p.exec(Ot.slice(Et,Et+2));return je?(St.W=+je[0],Et+je[0].length):-1}function I(St,Ot,Et){var je=p.exec(Ot.slice(Et,Et+4));return je?(St.y=+je[0],Et+je[0].length):-1}function N(St,Ot,Et){var je=p.exec(Ot.slice(Et,Et+2));return je?(St.y=+je[0]+(+je[0]>68?1900:2e3),Et+je[0].length):-1}function F(St,Ot,Et){var je=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Ot.slice(Et,Et+6));return je?(St.Z=je[1]?0:-(je[2]+(je[3]||"00")),Et+je[0].length):-1}function k(St,Ot,Et){var je=p.exec(Ot.slice(Et,Et+1));return je?(St.q=je[0]*3-3,Et+je[0].length):-1}function P(St,Ot,Et){var je=p.exec(Ot.slice(Et,Et+2));return je?(St.m=je[0]-1,Et+je[0].length):-1}function T(St,Ot,Et){var je=p.exec(Ot.slice(Et,Et+2));return je?(St.d=+je[0],Et+je[0].length):-1}function y(St,Ot,Et){var je=p.exec(Ot.slice(Et,Et+3));return je?(St.m=0,St.d=+je[0],Et+je[0].length):-1}function S(St,Ot,Et){var je=p.exec(Ot.slice(Et,Et+2));return je?(St.H=+je[0],Et+je[0].length):-1}function M(St,Ot,Et){var je=p.exec(Ot.slice(Et,Et+2));return je?(St.M=+je[0],Et+je[0].length):-1}function W(St,Ot,Et){var je=p.exec(Ot.slice(Et,Et+2));return je?(St.S=+je[0],Et+je[0].length):-1}function $(St,Ot,Et){var je=p.exec(Ot.slice(Et,Et+3));return je?(St.L=+je[0],Et+je[0].length):-1}function Z(St,Ot,Et){var je=p.exec(Ot.slice(Et,Et+6));return je?(St.L=Math.floor(je[0]/1e3),Et+je[0].length):-1}function K(St,Ot,Et){var je=f.exec(Ot.slice(Et,Et+1));return je?Et+je[0].length:-1}function Q(St,Ot,Et){var je=p.exec(Ot.slice(Et));return je?(St.Q=+je[0],Et+je[0].length):-1}function J(St,Ot,Et){var je=p.exec(Ot.slice(Et));return je?(St.s=+je[0],Et+je[0].length):-1}function G(St,Ot){return h(St.getDate(),Ot,2)}function ee(St,Ot){return h(St.getHours(),Ot,2)}function re(St,Ot){return h(St.getHours()%12||12,Ot,2)}function fe(St,Ot){return h(1+R.timeDay.count(R.timeYear(St),St),Ot,3)}function we(St,Ot){return h(St.getMilliseconds(),Ot,3)}function Oe(St,Ot){return we(St,Ot)+"000"}function ke(St,Ot){return h(St.getMonth()+1,Ot,2)}function Le(St,Ot){return h(St.getMinutes(),Ot,2)}function oe(St,Ot){return h(St.getSeconds(),Ot,2)}function be(St){var Ot=St.getDay();return Ot===0?7:Ot}function _e(St,Ot){return h(R.timeSunday.count(R.timeYear(St)-1,St),Ot,2)}function he(St,Ot){var Et=St.getDay();return St=Et>=4||Et===0?R.timeThursday(St):R.timeThursday.ceil(St),h(R.timeThursday.count(R.timeYear(St),St)+(R.timeYear(St).getDay()===4),Ot,2)}function De(St){return St.getDay()}function xe(St,Ot){return h(R.timeMonday.count(R.timeYear(St)-1,St),Ot,2)}function se(St,Ot){return h(St.getFullYear()%100,Ot,2)}function Ee(St,Ot){return h(St.getFullYear()%1e4,Ot,4)}function Te(St){var Ot=St.getTimezoneOffset();return(Ot>0?"-":(Ot*=-1,"+"))+h(Ot/60|0,"0",2)+h(Ot%60,"0",2)}function Be(St,Ot){return h(St.getUTCDate(),Ot,2)}function tt(St,Ot){return h(St.getUTCHours(),Ot,2)}function at(St,Ot){return h(St.getUTCHours()%12||12,Ot,2)}function gt(St,Ot){return h(1+R.utcDay.count(R.utcYear(St),St),Ot,3)}function pt(St,Ot){return h(St.getUTCMilliseconds(),Ot,3)}function Rt(St,Ot){return pt(St,Ot)+"000"}function $t(St,Ot){return h(St.getUTCMonth()+1,Ot,2)}function Wt(St,Ot){return h(St.getUTCMinutes(),Ot,2)}function Ht(St,Ot){return h(St.getUTCSeconds(),Ot,2)}function Ft(St){var Ot=St.getUTCDay();return Ot===0?7:Ot}function st(St,Ot){return h(R.utcSunday.count(R.utcYear(St)-1,St),Ot,2)}function rt(St,Ot){var Et=St.getUTCDay();return St=Et>=4||Et===0?R.utcThursday(St):R.utcThursday.ceil(St),h(R.utcThursday.count(R.utcYear(St),St)+(R.utcYear(St).getUTCDay()===4),Ot,2)}function Ue(St){return St.getUTCDay()}function xt(St,Ot){return h(R.utcMonday.count(R.utcYear(St)-1,St),Ot,2)}function Gt(St,Ot){return h(St.getUTCFullYear()%100,Ot,2)}function Jt(St,Ot){return h(St.getUTCFullYear()%1e4,Ot,4)}function Ut(){return"+0000"}function kr(){return"%"}function Pr(St){return+St}function $r(St){return Math.floor(+St/1e3)}var rn;kn({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 kn(St){return rn=u(St),w.timeFormat=rn.format,w.timeParse=rn.parse,w.utcFormat=rn.utcFormat,w.utcParse=rn.utcParse,rn}var Rn="%Y-%m-%dT%H:%M:%S.%LZ";function ci(St){return St.toISOString()}var In=Date.prototype.toISOString?ci:w.utcFormat(Rn);function Gn(St){var Ot=new Date(St);return isNaN(Ot)?null:Ot}var mr=+new Date("2000-01-01T00:00:00.000Z")?Gn:w.utcParse(Rn);w.isoFormat=In,w.isoParse=mr,w.timeFormatDefaultLocale=kn,w.timeFormatLocale=u,Object.defineProperty(w,"__esModule",{value:!0})})}}),ut=U({"node_modules/d3-format/dist/d3-format.js"(pe,le){(function(w,R){typeof pe=="object"&&typeof le<"u"?R(pe):(w=typeof globalThis<"u"?globalThis:w||self,R(w.d3=w.d3||{}))})(pe,function(w){function R(P){return Math.abs(P=Math.round(P))>=1e21?P.toLocaleString("en").replace(/,/g,""):P.toString(10)}function O(P,T){if((y=(P=T?P.toExponential(T-1):P.toExponential()).indexOf("e"))<0)return null;var y,S=P.slice(0,y);return[S.length>1?S[0]+S.slice(2):S,+P.slice(y+1)]}function z(P){return P=O(Math.abs(P)),P?P[1]:NaN}function l(P,T){return function(y,S){for(var M=y.length,W=[],$=0,Z=P[0],K=0;M>0&&Z>0&&(K+Z+1>S&&(Z=Math.max(1,S-K)),W.push(y.substring(M-=Z,M+Z)),!((K+=Z+1)>S));)Z=P[$=($+1)%P.length];return W.reverse().join(T)}}function u(P){return function(T){return T.replace(/[0-9]/g,function(y){return P[+y]})}}var c=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function p(P){if(!(T=c.exec(P)))throw new Error("invalid format: "+P);var T;return new f({fill:T[1],align:T[2],sign:T[3],symbol:T[4],zero:T[5],width:T[6],comma:T[7],precision:T[8]&&T[8].slice(1),trim:T[9],type:T[10]})}p.prototype=f.prototype;function f(P){this.fill=P.fill===void 0?" ":P.fill+"",this.align=P.align===void 0?">":P.align+"",this.sign=P.sign===void 0?"-":P.sign+"",this.symbol=P.symbol===void 0?"":P.symbol+"",this.zero=!!P.zero,this.width=P.width===void 0?void 0:+P.width,this.comma=!!P.comma,this.precision=P.precision===void 0?void 0:+P.precision,this.trim=!!P.trim,this.type=P.type===void 0?"":P.type+""}f.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 v(P){e:for(var T=P.length,y=1,S=-1,M;y<T;++y)switch(P[y]){case".":S=M=y;break;case"0":S===0&&(S=y),M=y;break;default:if(!+P[y])break e;S>0&&(S=0);break}return S>0?P.slice(0,S)+P.slice(M+1):P}var h;function m(P,T){var y=O(P,T);if(!y)return P+"";var S=y[0],M=y[1],W=M-(h=Math.max(-8,Math.min(8,Math.floor(M/3)))*3)+1,$=S.length;return W===$?S:W>$?S+new Array(W-$+1).join("0"):W>0?S.slice(0,W)+"."+S.slice(W):"0."+new Array(1-W).join("0")+O(P,Math.max(0,T+W-1))[0]}function _(P,T){var y=O(P,T);if(!y)return P+"";var S=y[0],M=y[1];return M<0?"0."+new Array(-M).join("0")+S:S.length>M+1?S.slice(0,M+1)+"."+S.slice(M+1):S+new Array(M-S.length+2).join("0")}var x={"%":function(P,T){return(P*100).toFixed(T)},b:function(P){return Math.round(P).toString(2)},c:function(P){return P+""},d:R,e:function(P,T){return P.toExponential(T)},f:function(P,T){return P.toFixed(T)},g:function(P,T){return P.toPrecision(T)},o:function(P){return Math.round(P).toString(8)},p:function(P,T){return _(P*100,T)},r:_,s:m,X:function(P){return Math.round(P).toString(16).toUpperCase()},x:function(P){return Math.round(P).toString(16)}};function A(P){return P}var E=Array.prototype.map,D=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function g(P){var T=P.grouping===void 0||P.thousands===void 0?A:l(E.call(P.grouping,Number),P.thousands+""),y=P.currency===void 0?"":P.currency[0]+"",S=P.currency===void 0?"":P.currency[1]+"",M=P.decimal===void 0?".":P.decimal+"",W=P.numerals===void 0?A:u(E.call(P.numerals,String)),$=P.percent===void 0?"%":P.percent+"",Z=P.minus===void 0?"-":P.minus+"",K=P.nan===void 0?"NaN":P.nan+"";function Q(G){G=p(G);var ee=G.fill,re=G.align,fe=G.sign,we=G.symbol,Oe=G.zero,ke=G.width,Le=G.comma,oe=G.precision,be=G.trim,_e=G.type;_e==="n"?(Le=!0,_e="g"):x[_e]||(oe===void 0&&(oe=12),be=!0,_e="g"),(Oe||ee==="0"&&re==="=")&&(Oe=!0,ee="0",re="=");var he=we==="$"?y:we==="#"&&/[boxX]/.test(_e)?"0"+_e.toLowerCase():"",De=we==="$"?S:/[%p]/.test(_e)?$:"",xe=x[_e],se=/[defgprs%]/.test(_e);oe=oe===void 0?6:/[gprs]/.test(_e)?Math.max(1,Math.min(21,oe)):Math.max(0,Math.min(20,oe));function Ee(Te){var Be=he,tt=De,at,gt,pt;if(_e==="c")tt=xe(Te)+tt,Te="";else{Te=+Te;var Rt=Te<0||1/Te<0;if(Te=isNaN(Te)?K:xe(Math.abs(Te),oe),be&&(Te=v(Te)),Rt&&+Te==0&&fe!=="+"&&(Rt=!1),Be=(Rt?fe==="("?fe:Z:fe==="-"||fe==="("?"":fe)+Be,tt=(_e==="s"?D[8+h/3]:"")+tt+(Rt&&fe==="("?")":""),se){for(at=-1,gt=Te.length;++at<gt;)if(pt=Te.charCodeAt(at),48>pt||pt>57){tt=(pt===46?M+Te.slice(at+1):Te.slice(at))+tt,Te=Te.slice(0,at);break}}}Le&&!Oe&&(Te=T(Te,1/0));var $t=Be.length+Te.length+tt.length,Wt=$t<ke?new Array(ke-$t+1).join(ee):"";switch(Le&&Oe&&(Te=T(Wt+Te,Wt.length?ke-tt.length:1/0),Wt=""),re){case"<":Te=Be+Te+tt+Wt;break;case"=":Te=Be+Wt+Te+tt;break;case"^":Te=Wt.slice(0,$t=Wt.length>>1)+Be+Te+tt+Wt.slice($t);break;default:Te=Wt+Be+Te+tt;break}return W(Te)}return Ee.toString=function(){return G+""},Ee}function J(G,ee){var re=Q((G=p(G),G.type="f",G)),fe=Math.max(-8,Math.min(8,Math.floor(z(ee)/3)))*3,we=Math.pow(10,-fe),Oe=D[8+fe/3];return function(ke){return re(we*ke)+Oe}}return{format:Q,formatPrefix:J}}var C;I({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function I(P){return C=g(P),w.format=C.format,w.formatPrefix=C.formatPrefix,C}function N(P){return Math.max(0,-z(Math.abs(P)))}function F(P,T){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(z(T)/3)))*3-z(Math.abs(P)))}function k(P,T){return P=Math.abs(P),T=Math.abs(T)-P,Math.max(0,z(T)-z(P))+1}w.FormatSpecifier=f,w.formatDefaultLocale=I,w.formatLocale=g,w.formatSpecifier=p,w.precisionFixed=N,w.precisionPrefix=F,w.precisionRound=k,Object.defineProperty(w,"__esModule",{value:!0})})}}),ht=U({"node_modules/is-string-blank/index.js"(pe,le){le.exports=function(w){for(var R=w.length,O,z=0;z<R;z++)if(O=w.charCodeAt(z),(O<9||O>13)&&O!==32&&O!==133&&O!==160&&O!==5760&&O!==6158&&(O<8192||O>8205)&&O!==8232&&O!==8233&&O!==8239&&O!==8287&&O!==8288&&O!==12288&&O!==65279)return!1;return!0}}}),_t=U({"node_modules/fast-isnumeric/index.js"(pe,le){var w=ht();le.exports=function(R){var O=typeof R;if(O==="string"){var z=R;if(R=+R,R===0&&w(z))return!1}else if(O!=="number")return!1;return R-R<1}}}),Dt=U({"src/constants/numerical.js"(pe,le){le.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:"−"}}}),qt=U({"node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js"(pe,le){(function(w,R){typeof pe=="object"&&typeof le<"u"?R(pe):(w=typeof globalThis<"u"?globalThis:w||self,R(w["base64-arraybuffer"]={}))})(pe,function(w){for(var R="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",O=typeof Uint8Array>"u"?[]:new Uint8Array(256),z=0;z<R.length;z++)O[R.charCodeAt(z)]=z;var l=function(c){var p=new Uint8Array(c),f,v=p.length,h="";for(f=0;f<v;f+=3)h+=R[p[f]>>2],h+=R[(p[f]&3)<<4|p[f+1]>>4],h+=R[(p[f+1]&15)<<2|p[f+2]>>6],h+=R[p[f+2]&63];return v%3===2?h=h.substring(0,h.length-1)+"=":v%3===1&&(h=h.substring(0,h.length-2)+"=="),h},u=function(c){var p=c.length*.75,f=c.length,v,h=0,m,_,x,A;c[c.length-1]==="="&&(p--,c[c.length-2]==="="&&p--);var E=new ArrayBuffer(p),D=new Uint8Array(E);for(v=0;v<f;v+=4)m=O[c.charCodeAt(v)],_=O[c.charCodeAt(v+1)],x=O[c.charCodeAt(v+2)],A=O[c.charCodeAt(v+3)],D[h++]=m<<2|_>>4,D[h++]=(_&15)<<4|x>>2,D[h++]=(x&3)<<6|A&63;return E};w.decode=u,w.encode=l,Object.defineProperty(w,"__esModule",{value:!0})})}}),Lt=U({"src/lib/is_plain_object.js"(pe,le){le.exports=function(R){return window&&window.process&&window.process.versions?Object.prototype.toString.call(R)==="[object Object]":Object.prototype.toString.call(R)==="[object Object]"&&Object.getPrototypeOf(R).hasOwnProperty("hasOwnProperty")}}}),dr=U({"src/lib/array.js"(pe){var le=qt().decode,w=Lt(),R=Array.isArray,O=ArrayBuffer,z=DataView;function l(m){return O.isView(m)&&!(m instanceof z)}pe.isTypedArray=l;function u(m){return R(m)||l(m)}pe.isArrayOrTypedArray=u;function c(m){return!u(m[0])}pe.isArray1D=c,pe.ensureArray=function(m,_){return R(m)||(m=[]),m.length=_,m};var p={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};p.uint8c=p.u1c,p.uint8=p.u1,p.int8=p.i1,p.uint16=p.u2,p.int16=p.i2,p.uint32=p.u4,p.int32=p.i4,p.float32=p.f4,p.float64=p.f8;function f(m){return m.constructor===ArrayBuffer}pe.isArrayBuffer=f,pe.decodeTypedArraySpec=function(m){var _=[],x=v(m),A=x.dtype,E=p[A];if(!E)throw new Error('Error in dtype: "'+A+'"');var D=E.BYTES_PER_ELEMENT,g=x.bdata;f(g)||(g=le(g));var C=x.shape===void 0?[g.byteLength/D]:(""+x.shape).split(",");C.reverse();var I=C.length,N,F,k=+C[0],P=D*k,T=0;if(I===1)_=new E(g);else if(I===2)for(N=+C[1],F=0;F<N;F++)_[F]=new E(g,T,k),T+=P;else if(I===3){N=+C[1];for(var y=+C[2],S=0;S<y;S++)for(_[S]=[],F=0;F<N;F++)_[S][F]=new E(g,T,k),T+=P}else throw new Error("ndim: "+I+'is not supported with the shape:"'+x.shape+'"');return _.bdata=x.bdata,_.dtype=x.dtype,_.shape=C.reverse().join(","),m._inputArray=_,_},pe.isTypedArraySpec=function(m){return w(m)&&m.hasOwnProperty("dtype")&&typeof m.dtype=="string"&&m.hasOwnProperty("bdata")&&(typeof m.bdata=="string"||f(m.bdata))&&(m.shape===void 0||m.hasOwnProperty("shape")&&(typeof m.shape=="string"||typeof m.shape=="number"))};function v(m){return{bdata:m.bdata,dtype:m.dtype,shape:m.shape}}pe.concat=function(){var m=[],_=!0,x=0,A,E,D,g,C,I,N,F;for(D=0;D<arguments.length;D++)g=arguments[D],I=g.length,I&&(E?m.push(g):(E=g,C=I),R(g)?A=!1:(_=!1,x?A!==g.constructor&&(A=!1):A=g.constructor),x+=I);if(!x)return[];if(!m.length)return E;if(_)return E.concat.apply(E,m);if(A){for(N=new A(x),N.set(E),D=0;D<m.length;D++)g=m[D],N.set(g,C),C+=g.length;return N}for(N=new Array(x),F=0;F<E.length;F++)N[F]=E[F];for(D=0;D<m.length;D++){for(g=m[D],F=0;F<g.length;F++)N[C+F]=g[F];C+=F}return N},pe.maxRowLength=function(m){return h(m,Math.max,0)},pe.minRowLength=function(m){return h(m,Math.min,1/0)};function h(m,_,x){if(u(m))if(u(m[0])){for(var A=x,E=0;E<m.length;E++)A=_(A,m[E].length);return A}else return m.length;return 0}}}),Zt=U({"src/lib/nested_property.js"(pe,le){var w=_t(),R=dr().isArrayOrTypedArray;le.exports=function(m,_){if(w(_))_=String(_);else if(typeof _!="string"||_.substr(_.length-4)==="[-1]")throw"bad property string";var x=_.split("."),A,E,D,g;for(g=0;g<x.length;g++)if(String(x[g]).slice(0,2)==="__")throw"bad property string";for(g=0;g<x.length;){if(A=String(x[g]).match(/^([^\[\]]*)((\[\-?[0-9]*\])+)$/),A){if(A[1])x[g]=A[1];else if(g===0)x.splice(0,1);else throw"bad property string";for(E=A[2].substr(1,A[2].length-2).split("]["),D=0;D<E.length;D++)g++,x.splice(g,0,Number(E[D]))}g++}return typeof m!="object"?v(m,_,x):{set:u(m,x,_),get:O(m,x),astr:_,parts:x,obj:m}};function O(h,m){return function(_){var x=h,A,E,D,g,C;for(g=0;g<m.length-1;g++){if(A=m[g],A===-1){for(E=!0,D=[],C=0;C<x.length;C++)D[C]=O(x[C],m.slice(g+1))(_),D[C]!==D[0]&&(E=!1);return E?D[0]:D}if(typeof A=="number"&&!R(x)||(x=x[A],typeof x!="object"||x===null))return}if(!(typeof x!="object"||x===null)&&(D=x[m[g]],!(!_&&D===null)))return D}}var z=/(^|\.)args\[/;function l(h,m){return h===void 0||h===null&&!m.match(z)}function u(h,m,_){return function(x){var A=h,E="",D=l(x,_),g,C;for(C=0;C<m.length-1;C++){if(g=m[C],typeof g=="number"&&!R(A))throw"array index but container is not an array";if(g===-1){if(D=!p(A,m.slice(C+1),x,_),D)break;return}if(!f(A,g,m[C+1],D))break;if(A=A[g],typeof A!="object"||A===null)throw"container is not an object";E=c(E,g)}if(D){if(C===m.length-1&&(delete A[m[C]],Array.isArray(A)&&+m[C]===A.length-1))for(;A.length&&A[A.length-1]===void 0;)A.pop()}else A[m[C]]=x}}function c(h,m){var _=m;return w(m)?_="["+m+"]":h&&(_="."+m),h+_}function p(h,m,_,x){var A=R(_),E=!0,D=_,g=x.replace("-1",0),C=A?!1:l(_,g),I=m[0],N;for(N=0;N<h.length;N++)g=x.replace("-1",N),A&&(D=_[N%_.length],C=l(D,g)),C&&(E=!1),f(h,N,I,C)&&u(h[N],m,x.replace("-1",N))(D);return E}function f(h,m,_,x){if(h[m]===void 0){if(x)return!1;typeof _=="number"?h[m]=[]:h[m]={}}return!0}function v(h,m,_){return{set:function(){throw"bad container"},get:function(){},astr:m,parts:_,obj:h}}}}),Cr=U({"src/lib/keyed_container.js"(pe,le){var w=Zt(),R=/^\w*$/,O=0,z=1,l=2,u=3,c=4;le.exports=function(f,v,h,m){h=h||"name",m=m||"value";var _,x,A,E={};v&&v.length?(A=w(f,v),x=A.get()):x=f,v=v||"";var D={};if(x)for(_=0;_<x.length;_++)D[x[_][h]]=_;var g=R.test(m),C={set:function(I,N){var F=N===null?c:O;if(!x){if(!A||F===c)return;x=[],A.set(x)}var k=D[I];if(k===void 0){if(F===c)return;F=F|u,k=x.length,D[I]=k}else N!==(g?x[k][m]:w(x[k],m).get())&&(F=F|l);var P=x[k]=x[k]||{};return P[h]=I,g?P[m]=N:w(P,m).set(N),N!==null&&(F=F&~c),E[k]=E[k]|F,C},get:function(I){if(x){var N=D[I];if(N!==void 0)return g?x[N][m]:w(x[N],m).get()}},rename:function(I,N){var F=D[I];return F===void 0||(E[F]=E[F]|z,D[N]=F,delete D[I],x[F][h]=N),C},remove:function(I){var N=D[I];if(N===void 0)return C;var F=x[N];if(Object.keys(F).length>2)return E[N]=E[N]|l,C.set(I,null);if(g){for(_=N;_<x.length;_++)E[_]=E[_]|u;for(_=N;_<x.length;_++)D[x[_][h]]--;x.splice(N,1),delete D[I]}else w(F,m).set(null),E[N]=E[N]|l|c;return C},constructUpdate:function(){for(var I,N,F={},k=Object.keys(E),P=0;P<k.length;P++)N=k[P],I=v+"["+N+"]",x[N]?(E[N]&z&&(F[I+"."+h]=x[N][h]),E[N]&l&&(g?F[I+"."+m]=E[N]&c?null:x[N][m]:F[I+"."+m]=E[N]&c?null:w(x[N],m).get())):F[I]=null;return F}};return C}}}),yt=U({"src/lib/relative_attr.js"(pe,le){var w=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,R=/^[^\.\[\]]+$/;le.exports=function(O,z){for(;z;){var l=O.match(w);if(l)O=l[1];else if(O.match(R))O="";else throw new Error("bad relativeAttr call:"+[O,z]);if(z.charAt(0)==="^")z=z.slice(1);else break}return O&&z.charAt(0)!=="["?O+"."+z:O+z}}}),Vt=U({"src/lib/to_log_range.js"(pe,le){var w=_t();le.exports=function(O,z){if(O>0)return Math.log(O)/Math.LN10;var l=Math.log(Math.min(z[0],z[1]))/Math.LN10;return w(l)||(l=Math.log(Math.max(z[0],z[1]))/Math.LN10-6),l}}}),Er=U({"src/lib/relink_private.js"(pe,le){var w=dr().isArrayOrTypedArray,R=Lt();le.exports=function O(z,l){for(var u in l){var c=l[u],p=z[u];if(p!==c)if(u.charAt(0)==="_"||typeof c=="function"){if(u in z)continue;z[u]=c}else if(w(c)&&w(p)&&R(c[0])){if(u==="customdata"||u==="ids")continue;for(var f=Math.min(c.length,p.length),v=0;v<f;v++)p[v]!==c[v]&&R(c[v])&&R(p[v])&&O(p[v],c[v])}else R(c)&&R(p)&&(O(p,c),Object.keys(p).length||delete z[u])}}}}),sr=U({"src/lib/mod.js"(pe,le){function w(O,z){var l=O%z;return l<0?l+z:l}function R(O,z){return Math.abs(O)>z/2?O-Math.round(O/z)*z:O}le.exports={mod:w,modHalf:R}}}),or=U({"node_modules/tinycolor2/tinycolor.js"(pe,le){(function(w){var R=/^\s+/,O=/\s+$/,z=0,l=w.round,u=w.min,c=w.max,p=w.random;function f(se,Ee){if(se=se||"",Ee=Ee||{},se instanceof f)return se;if(!(this instanceof f))return new f(se,Ee);var Te=v(se);this._originalInput=se,this._r=Te.r,this._g=Te.g,this._b=Te.b,this._a=Te.a,this._roundA=l(100*this._a)/100,this._format=Ee.format||Te.format,this._gradientType=Ee.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=Te.ok,this._tc_id=z++}f.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 se=this.toRgb();return(se.r*299+se.g*587+se.b*114)/1e3},getLuminance:function(){var se=this.toRgb(),Ee,Te,Be,tt,at,gt;return Ee=se.r/255,Te=se.g/255,Be=se.b/255,Ee<=.03928?tt=Ee/12.92:tt=w.pow((Ee+.055)/1.055,2.4),Te<=.03928?at=Te/12.92:at=w.pow((Te+.055)/1.055,2.4),Be<=.03928?gt=Be/12.92:gt=w.pow((Be+.055)/1.055,2.4),.2126*tt+.7152*at+.0722*gt},setAlpha:function(se){return this._a=G(se),this._roundA=l(100*this._a)/100,this},toHsv:function(){var se=x(this._r,this._g,this._b);return{h:se.h*360,s:se.s,v:se.v,a:this._a}},toHsvString:function(){var se=x(this._r,this._g,this._b),Ee=l(se.h*360),Te=l(se.s*100),Be=l(se.v*100);return this._a==1?"hsv("+Ee+", "+Te+"%, "+Be+"%)":"hsva("+Ee+", "+Te+"%, "+Be+"%, "+this._roundA+")"},toHsl:function(){var se=m(this._r,this._g,this._b);return{h:se.h*360,s:se.s,l:se.l,a:this._a}},toHslString:function(){var se=m(this._r,this._g,this._b),Ee=l(se.h*360),Te=l(se.s*100),Be=l(se.l*100);return this._a==1?"hsl("+Ee+", "+Te+"%, "+Be+"%)":"hsla("+Ee+", "+Te+"%, "+Be+"%, "+this._roundA+")"},toHex:function(se){return E(this._r,this._g,this._b,se)},toHexString:function(se){return"#"+this.toHex(se)},toHex8:function(se){return D(this._r,this._g,this._b,this._a,se)},toHex8String:function(se){return"#"+this.toHex8(se)},toRgb:function(){return{r:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(ee(this._r,255)*100)+"%",g:l(ee(this._g,255)*100)+"%",b:l(ee(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+l(ee(this._r,255)*100)+"%, "+l(ee(this._g,255)*100)+"%, "+l(ee(this._b,255)*100)+"%)":"rgba("+l(ee(this._r,255)*100)+"%, "+l(ee(this._g,255)*100)+"%, "+l(ee(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:Q[E(this._r,this._g,this._b,!0)]||!1},toFilter:function(se){var Ee="#"+g(this._r,this._g,this._b,this._a),Te=Ee,Be=this._gradientType?"GradientType = 1, ":"";if(se){var tt=f(se);Te="#"+g(tt._r,tt._g,tt._b,tt._a)}return"progid:DXImageTransform.Microsoft.gradient("+Be+"startColorstr="+Ee+",endColorstr="+Te+")"},toString:function(se){var Ee=!!se;se=se||this._format;var Te=!1,Be=this._a<1&&this._a>=0,tt=!Ee&&Be&&(se==="hex"||se==="hex6"||se==="hex3"||se==="hex4"||se==="hex8"||se==="name");return tt?se==="name"&&this._a===0?this.toName():this.toRgbString():(se==="rgb"&&(Te=this.toRgbString()),se==="prgb"&&(Te=this.toPercentageRgbString()),(se==="hex"||se==="hex6")&&(Te=this.toHexString()),se==="hex3"&&(Te=this.toHexString(!0)),se==="hex4"&&(Te=this.toHex8String(!0)),se==="hex8"&&(Te=this.toHex8String()),se==="name"&&(Te=this.toName()),se==="hsl"&&(Te=this.toHslString()),se==="hsv"&&(Te=this.toHsvString()),Te||this.toHexString())},clone:function(){return f(this.toString())},_applyModification:function(se,Ee){var Te=se.apply(null,[this].concat([].slice.call(Ee)));return this._r=Te._r,this._g=Te._g,this._b=Te._b,this.setAlpha(Te._a),this},lighten:function(){return this._applyModification(F,arguments)},brighten:function(){return this._applyModification(k,arguments)},darken:function(){return this._applyModification(P,arguments)},desaturate:function(){return this._applyModification(C,arguments)},saturate:function(){return this._applyModification(I,arguments)},greyscale:function(){return this._applyModification(N,arguments)},spin:function(){return this._applyModification(T,arguments)},_applyCombination:function(se,Ee){return se.apply(null,[this].concat([].slice.call(Ee)))},analogous:function(){return this._applyCombination($,arguments)},complement:function(){return this._applyCombination(y,arguments)},monochromatic:function(){return this._applyCombination(Z,arguments)},splitcomplement:function(){return this._applyCombination(W,arguments)},triad:function(){return this._applyCombination(S,arguments)},tetrad:function(){return this._applyCombination(M,arguments)}},f.fromRatio=function(se,Ee){if(typeof se=="object"){var Te={};for(var Be in se)se.hasOwnProperty(Be)&&(Be==="a"?Te[Be]=se[Be]:Te[Be]=Le(se[Be]));se=Te}return f(se,Ee)};function v(se){var Ee={r:0,g:0,b:0},Te=1,Be=null,tt=null,at=null,gt=!1,pt=!1;return typeof se=="string"&&(se=De(se)),typeof se=="object"&&(he(se.r)&&he(se.g)&&he(se.b)?(Ee=h(se.r,se.g,se.b),gt=!0,pt=String(se.r).substr(-1)==="%"?"prgb":"rgb"):he(se.h)&&he(se.s)&&he(se.v)?(Be=Le(se.s),tt=Le(se.v),Ee=A(se.h,Be,tt),gt=!0,pt="hsv"):he(se.h)&&he(se.s)&&he(se.l)&&(Be=Le(se.s),at=Le(se.l),Ee=_(se.h,Be,at),gt=!0,pt="hsl"),se.hasOwnProperty("a")&&(Te=se.a)),Te=G(Te),{ok:gt,format:se.format||pt,r:u(255,c(Ee.r,0)),g:u(255,c(Ee.g,0)),b:u(255,c(Ee.b,0)),a:Te}}function h(se,Ee,Te){return{r:ee(se,255)*255,g:ee(Ee,255)*255,b:ee(Te,255)*255}}function m(se,Ee,Te){se=ee(se,255),Ee=ee(Ee,255),Te=ee(Te,255);var Be=c(se,Ee,Te),tt=u(se,Ee,Te),at,gt,pt=(Be+tt)/2;if(Be==tt)at=gt=0;else{var Rt=Be-tt;switch(gt=pt>.5?Rt/(2-Be-tt):Rt/(Be+tt),Be){case se:at=(Ee-Te)/Rt+(Ee<Te?6:0);break;case Ee:at=(Te-se)/Rt+2;break;case Te:at=(se-Ee)/Rt+4;break}at/=6}return{h:at,s:gt,l:pt}}function _(se,Ee,Te){var Be,tt,at;se=ee(se,360),Ee=ee(Ee,100),Te=ee(Te,100);function gt($t,Wt,Ht){return Ht<0&&(Ht+=1),Ht>1&&(Ht-=1),Ht<1/6?$t+(Wt-$t)*6*Ht:Ht<1/2?Wt:Ht<2/3?$t+(Wt-$t)*(2/3-Ht)*6:$t}if(Ee===0)Be=tt=at=Te;else{var pt=Te<.5?Te*(1+Ee):Te+Ee-Te*Ee,Rt=2*Te-pt;Be=gt(Rt,pt,se+1/3),tt=gt(Rt,pt,se),at=gt(Rt,pt,se-1/3)}return{r:Be*255,g:tt*255,b:at*255}}function x(se,Ee,Te){se=ee(se,255),Ee=ee(Ee,255),Te=ee(Te,255);var Be=c(se,Ee,Te),tt=u(se,Ee,Te),at,gt,pt=Be,Rt=Be-tt;if(gt=Be===0?0:Rt/Be,Be==tt)at=0;else{switch(Be){case se:at=(Ee-Te)/Rt+(Ee<Te?6:0);break;case Ee:at=(Te-se)/Rt+2;break;case Te:at=(se-Ee)/Rt+4;break}at/=6}return{h:at,s:gt,v:pt}}function A(se,Ee,Te){se=ee(se,360)*6,Ee=ee(Ee,100),Te=ee(Te,100);var Be=w.floor(se),tt=se-Be,at=Te*(1-Ee),gt=Te*(1-tt*Ee),pt=Te*(1-(1-tt)*Ee),Rt=Be%6,$t=[Te,gt,at,at,pt,Te][Rt],Wt=[pt,Te,Te,gt,at,at][Rt],Ht=[at,at,pt,Te,Te,gt][Rt];return{r:$t*255,g:Wt*255,b:Ht*255}}function E(se,Ee,Te,Be){var tt=[ke(l(se).toString(16)),ke(l(Ee).toString(16)),ke(l(Te).toString(16))];return Be&&tt[0].charAt(0)==tt[0].charAt(1)&&tt[1].charAt(0)==tt[1].charAt(1)&&tt[2].charAt(0)==tt[2].charAt(1)?tt[0].charAt(0)+tt[1].charAt(0)+tt[2].charAt(0):tt.join("")}function D(se,Ee,Te,Be,tt){var at=[ke(l(se).toString(16)),ke(l(Ee).toString(16)),ke(l(Te).toString(16)),ke(oe(Be))];return tt&&at[0].charAt(0)==at[0].charAt(1)&&at[1].charAt(0)==at[1].charAt(1)&&at[2].charAt(0)==at[2].charAt(1)&&at[3].charAt(0)==at[3].charAt(1)?at[0].charAt(0)+at[1].charAt(0)+at[2].charAt(0)+at[3].charAt(0):at.join("")}function g(se,Ee,Te,Be){var tt=[ke(oe(Be)),ke(l(se).toString(16)),ke(l(Ee).toString(16)),ke(l(Te).toString(16))];return tt.join("")}f.equals=function(se,Ee){return!se||!Ee?!1:f(se).toRgbString()==f(Ee).toRgbString()},f.random=function(){return f.fromRatio({r:p(),g:p(),b:p()})};function C(se,Ee){Ee=Ee===0?0:Ee||10;var Te=f(se).toHsl();return Te.s-=Ee/100,Te.s=re(Te.s),f(Te)}function I(se,Ee){Ee=Ee===0?0:Ee||10;var Te=f(se).toHsl();return Te.s+=Ee/100,Te.s=re(Te.s),f(Te)}function N(se){return f(se).desaturate(100)}function F(se,Ee){Ee=Ee===0?0:Ee||10;var Te=f(se).toHsl();return Te.l+=Ee/100,Te.l=re(Te.l),f(Te)}function k(se,Ee){Ee=Ee===0?0:Ee||10;var Te=f(se).toRgb();return Te.r=c(0,u(255,Te.r-l(255*-(Ee/100)))),Te.g=c(0,u(255,Te.g-l(255*-(Ee/100)))),Te.b=c(0,u(255,Te.b-l(255*-(Ee/100)))),f(Te)}function P(se,Ee){Ee=Ee===0?0:Ee||10;var Te=f(se).toHsl();return Te.l-=Ee/100,Te.l=re(Te.l),f(Te)}function T(se,Ee){var Te=f(se).toHsl(),Be=(Te.h+Ee)%360;return Te.h=Be<0?360+Be:Be,f(Te)}function y(se){var Ee=f(se).toHsl();return Ee.h=(Ee.h+180)%360,f(Ee)}function S(se){var Ee=f(se).toHsl(),Te=Ee.h;return[f(se),f({h:(Te+120)%360,s:Ee.s,l:Ee.l}),f({h:(Te+240)%360,s:Ee.s,l:Ee.l})]}function M(se){var Ee=f(se).toHsl(),Te=Ee.h;return[f(se),f({h:(Te+90)%360,s:Ee.s,l:Ee.l}),f({h:(Te+180)%360,s:Ee.s,l:Ee.l}),f({h:(Te+270)%360,s:Ee.s,l:Ee.l})]}function W(se){var Ee=f(se).toHsl(),Te=Ee.h;return[f(se),f({h:(Te+72)%360,s:Ee.s,l:Ee.l}),f({h:(Te+216)%360,s:Ee.s,l:Ee.l})]}function $(se,Ee,Te){Ee=Ee||6,Te=Te||30;var Be=f(se).toHsl(),tt=360/Te,at=[f(se)];for(Be.h=(Be.h-(tt*Ee>>1)+720)%360;--Ee;)Be.h=(Be.h+tt)%360,at.push(f(Be));return at}function Z(se,Ee){Ee=Ee||6;for(var Te=f(se).toHsv(),Be=Te.h,tt=Te.s,at=Te.v,gt=[],pt=1/Ee;Ee--;)gt.push(f({h:Be,s:tt,v:at})),at=(at+pt)%1;return gt}f.mix=function(se,Ee,Te){Te=Te===0?0:Te||50;var Be=f(se).toRgb(),tt=f(Ee).toRgb(),at=Te/100,gt={r:(tt.r-Be.r)*at+Be.r,g:(tt.g-Be.g)*at+Be.g,b:(tt.b-Be.b)*at+Be.b,a:(tt.a-Be.a)*at+Be.a};return f(gt)},f.readability=function(se,Ee){var Te=f(se),Be=f(Ee);return(w.max(Te.getLuminance(),Be.getLuminance())+.05)/(w.min(Te.getLuminance(),Be.getLuminance())+.05)},f.isReadable=function(se,Ee,Te){var Be=f.readability(se,Ee),tt,at;switch(at=!1,tt=xe(Te),tt.level+tt.size){case"AAsmall":case"AAAlarge":at=Be>=4.5;break;case"AAlarge":at=Be>=3;break;case"AAAsmall":at=Be>=7;break}return at},f.mostReadable=function(se,Ee,Te){var Be=null,tt=0,at,gt,pt,Rt;Te=Te||{},gt=Te.includeFallbackColors,pt=Te.level,Rt=Te.size;for(var $t=0;$t<Ee.length;$t++)at=f.readability(se,Ee[$t]),at>tt&&(tt=at,Be=f(Ee[$t]));return f.isReadable(se,Be,{level:pt,size:Rt})||!gt?Be:(Te.includeFallbackColors=!1,f.mostReadable(se,["#fff","#000"],Te))};var K=f.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"},Q=f.hexNames=J(K);function J(se){var Ee={};for(var Te in se)se.hasOwnProperty(Te)&&(Ee[se[Te]]=Te);return Ee}function G(se){return se=parseFloat(se),(isNaN(se)||se<0||se>1)&&(se=1),se}function ee(se,Ee){we(se)&&(se="100%");var Te=Oe(se);return se=u(Ee,c(0,parseFloat(se))),Te&&(se=parseInt(se*Ee,10)/100),w.abs(se-Ee)<1e-6?1:se%Ee/parseFloat(Ee)}function re(se){return u(1,c(0,se))}function fe(se){return parseInt(se,16)}function we(se){return typeof se=="string"&&se.indexOf(".")!=-1&&parseFloat(se)===1}function Oe(se){return typeof se=="string"&&se.indexOf("%")!=-1}function ke(se){return se.length==1?"0"+se:""+se}function Le(se){return se<=1&&(se=se*100+"%"),se}function oe(se){return w.round(parseFloat(se)*255).toString(16)}function be(se){return fe(se)/255}var _e=(function(){var se="[-\\+]?\\d+%?",Ee="[-\\+]?\\d*\\.\\d+%?",Te="(?:"+Ee+")|(?:"+se+")",Be="[\\s|\\(]+("+Te+")[,|\\s]+("+Te+")[,|\\s]+("+Te+")\\s*\\)?",tt="[\\s|\\(]+("+Te+")[,|\\s]+("+Te+")[,|\\s]+("+Te+")[,|\\s]+("+Te+")\\s*\\)?";return{CSS_UNIT:new RegExp(Te),rgb:new RegExp("rgb"+Be),rgba:new RegExp("rgba"+tt),hsl:new RegExp("hsl"+Be),hsla:new RegExp("hsla"+tt),hsv:new RegExp("hsv"+Be),hsva:new RegExp("hsva"+tt),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 he(se){return!!_e.CSS_UNIT.exec(se)}function De(se){se=se.replace(R,"").replace(O,"").toLowerCase();var Ee=!1;if(K[se])se=K[se],Ee=!0;else if(se=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var Te;return(Te=_e.rgb.exec(se))?{r:Te[1],g:Te[2],b:Te[3]}:(Te=_e.rgba.exec(se))?{r:Te[1],g:Te[2],b:Te[3],a:Te[4]}:(Te=_e.hsl.exec(se))?{h:Te[1],s:Te[2],l:Te[3]}:(Te=_e.hsla.exec(se))?{h:Te[1],s:Te[2],l:Te[3],a:Te[4]}:(Te=_e.hsv.exec(se))?{h:Te[1],s:Te[2],v:Te[3]}:(Te=_e.hsva.exec(se))?{h:Te[1],s:Te[2],v:Te[3],a:Te[4]}:(Te=_e.hex8.exec(se))?{r:fe(Te[1]),g:fe(Te[2]),b:fe(Te[3]),a:be(Te[4]),format:Ee?"name":"hex8"}:(Te=_e.hex6.exec(se))?{r:fe(Te[1]),g:fe(Te[2]),b:fe(Te[3]),format:Ee?"name":"hex"}:(Te=_e.hex4.exec(se))?{r:fe(Te[1]+""+Te[1]),g:fe(Te[2]+""+Te[2]),b:fe(Te[3]+""+Te[3]),a:be(Te[4]+""+Te[4]),format:Ee?"name":"hex8"}:(Te=_e.hex3.exec(se))?{r:fe(Te[1]+""+Te[1]),g:fe(Te[2]+""+Te[2]),b:fe(Te[3]+""+Te[3]),format:Ee?"name":"hex"}:!1}function xe(se){var Ee,Te;return se=se||{level:"AA",size:"small"},Ee=(se.level||"AA").toUpperCase(),Te=(se.size||"small").toLowerCase(),Ee!=="AA"&&Ee!=="AAA"&&(Ee="AA"),Te!=="small"&&Te!=="large"&&(Te="small"),{level:Ee,size:Te}}typeof le<"u"&&le.exports?le.exports=f:window.tinycolor=f})(Math)}}),Ar=U({"src/lib/extend.js"(pe){var le=Lt(),w=Array.isArray;function R(z,l){var u,c;for(u=0;u<z.length;u++){if(c=z[u],c!==null&&typeof c=="object")return!1;c!==void 0&&(l[u]=c)}return!0}pe.extendFlat=function(){return O(arguments,!1,!1,!1)},pe.extendDeep=function(){return O(arguments,!0,!1,!1)},pe.extendDeepAll=function(){return O(arguments,!0,!0,!1)},pe.extendDeepNoArrays=function(){return O(arguments,!0,!1,!0)};function O(z,l,u,c){var p=z[0],f=z.length,v,h,m,_,x,A,E;if(f===2&&w(p)&&w(z[1])&&p.length===0){if(E=R(z[1],p),E)return p;p.splice(0,p.length)}for(var D=1;D<f;D++){v=z[D];for(h in v)m=p[h],_=v[h],c&&w(_)?p[h]=_:l&&_&&(le(_)||(x=w(_)))?(x?(x=!1,A=m&&w(m)?m:[]):A=m&&le(m)?m:{},p[h]=O([A,_],l,u,c)):(typeof _<"u"||u)&&(p[h]=_)}return p}}}),Ir=U({"src/plots/font_attributes.js"(pe,le){le.exports=function(w){var R=w.variantValues,O=w.editType,z=w.colorEditType;z===void 0&&(z=O);var l={editType:O,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};w.noNumericWeightValues&&(l.valType="enumerated",l.values=l.extras,l.extras=void 0,l.min=void 0,l.max=void 0);var u={family:{valType:"string",noBlank:!0,strict:!0,editType:O},size:{valType:"number",min:1,editType:O},color:{valType:"color",editType:z},weight:l,style:{editType:O,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:w.noFontVariant?void 0:{editType:O,valType:"enumerated",values:R||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:w.noFontTextcase?void 0:{editType:O,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:w.noFontLineposition?void 0:{editType:O,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:w.noFontShadow?void 0:{editType:O,valType:"string",dflt:w.autoShadowDflt?"auto":"none"},editType:O};return w.autoSize&&(u.size.dflt="auto"),w.autoColor&&(u.color.dflt="auto"),w.arrayOk&&(u.family.arrayOk=!0,u.weight.arrayOk=!0,u.style.arrayOk=!0,w.noFontVariant||(u.variant.arrayOk=!0),w.noFontTextcase||(u.textcase.arrayOk=!0),w.noFontLineposition||(u.lineposition.arrayOk=!0),w.noFontShadow||(u.shadow.arrayOk=!0),u.size.arrayOk=!0,u.color.arrayOk=!0),u}}}),_n=U({"src/components/fx/constants.js"(pe,le){le.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}}}),Un=U({"src/components/fx/layout_attributes.js"(pe,le){var w=_n(),R=Ir(),O=R({editType:"none"});O.family.dflt=w.HOVERFONT,O.size.dflt=w.HOVERFONTSIZE,le.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:O,grouptitlefont:R({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"}}}}),Qn=U({"src/components/fx/attributes.js"(pe,le){var w=Ir(),R=Un().hoverlabel,O=Ar().extendFlat;le.exports={hoverlabel:{bgcolor:O({},R.bgcolor,{arrayOk:!0}),bordercolor:O({},R.bordercolor,{arrayOk:!0}),font:w({arrayOk:!0,editType:"none"}),align:O({},R.align,{arrayOk:!0}),namelength:O({},R.namelength,{arrayOk:!0}),showarrow:O({},R.showarrow),editType:"none"}}}}),Jn=U({"src/plots/attributes.js"(pe,le){var w=Ir(),R=Qn();le.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:w({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:R.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"}}}}),Vn=U({"src/components/colorscale/scales.js"(pe,le){var w=or(),R={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)"]]},O=R.RdBu;function z(c,p){if(p||(p=O),!c)return p;function f(){try{c=R[c]||JSON.parse(c)}catch{c=p}}return typeof c=="string"&&(f(),typeof c=="string"&&f()),l(c)?c:p}function l(c){var p=0;if(!Array.isArray(c)||c.length<2||!c[0]||!c[c.length-1]||+c[0][0]!=0||+c[c.length-1][0]!=1)return!1;for(var f=0;f<c.length;f++){var v=c[f];if(v.length!==2||+v[0]<p||!w(v[1]).isValid())return!1;p=+v[0]}return!0}function u(c){return R[c]!==void 0?!0:l(c)}le.exports={scales:R,defaultScale:O,get:z,isValid:u}}}),jn=U({"src/components/color/attributes.js"(pe){pe.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],pe.defaultLine="#444",pe.lightLine="#eee",pe.background="#fff",pe.borderLine="#BEC8D9",pe.lightFraction=1e3/11}}),Lr=U({"src/components/color/index.js"(pe,le){var w=or(),R=_t(),O=dr().isTypedArray,z=le.exports={},l=jn();z.defaults=l.defaults;var u=z.defaultLine=l.defaultLine;z.lightLine=l.lightLine;var c=z.background=l.background;z.tinyRGB=function(f){var v=f.toRgb();return"rgb("+Math.round(v.r)+", "+Math.round(v.g)+", "+Math.round(v.b)+")"},z.rgb=function(f){return z.tinyRGB(w(f))},z.opacity=function(f){return f?w(f).getAlpha():0},z.addOpacity=function(f,v){var h=w(f).toRgb();return"rgba("+Math.round(h.r)+", "+Math.round(h.g)+", "+Math.round(h.b)+", "+v+")"},z.combine=function(f,v){var h=w(f).toRgb();if(h.a===1)return w(f).toRgbString();var m=w(v||c).toRgb(),_=m.a===1?m:{r:255*(1-m.a)+m.r*m.a,g:255*(1-m.a)+m.g*m.a,b:255*(1-m.a)+m.b*m.a},x={r:_.r*(1-h.a)+h.r*h.a,g:_.g*(1-h.a)+h.g*h.a,b:_.b*(1-h.a)+h.b*h.a};return w(x).toRgbString()},z.interpolate=function(f,v,h){var m=w(f).toRgb(),_=w(v).toRgb(),x={r:h*m.r+(1-h)*_.r,g:h*m.g+(1-h)*_.g,b:h*m.b+(1-h)*_.b};return w(x).toRgbString()},z.contrast=function(f,v,h){var m=w(f);m.getAlpha()!==1&&(m=w(z.combine(f,c)));var _=m.isDark()?v?m.lighten(v):c:h?m.darken(h):u;return _.toString()},z.stroke=function(f,v){var h=w(v);f.style({stroke:z.tinyRGB(h),"stroke-opacity":h.getAlpha()})},z.fill=function(f,v){var h=w(v);f.style({fill:z.tinyRGB(h),"fill-opacity":h.getAlpha()})},z.clean=function(f){if(!(!f||typeof f!="object")){var v=Object.keys(f),h,m,_,x;for(h=0;h<v.length;h++)if(_=v[h],x=f[_],_.substr(_.length-5)==="color")if(Array.isArray(x))for(m=0;m<x.length;m++)x[m]=p(x[m]);else f[_]=p(x);else if(_.substr(_.length-10)==="colorscale"&&Array.isArray(x))for(m=0;m<x.length;m++)Array.isArray(x[m])&&(x[m][1]=p(x[m][1]));else if(Array.isArray(x)){var A=x[0];if(!Array.isArray(A)&&A&&typeof A=="object")for(m=0;m<x.length;m++)z.clean(x[m])}else x&&typeof x=="object"&&!O(x)&&z.clean(x)}};function p(f){if(R(f)||typeof f!="string")return f;var v=f.trim();if(v.substr(0,3)!=="rgb")return f;var h=v.match(/^rgba?\s*\(([^()]*)\)$/);if(!h)return f;var m=h[1].trim().split(/\s*[\s,]\s*/),_=v.charAt(3)==="a"&&m.length===4;if(!_&&m.length!==3)return f;for(var x=0;x<m.length;x++){if(!m[x].length||(m[x]=Number(m[x]),!(m[x]>=0)))return f;if(x===3)m[x]>1&&(m[x]=1);else if(m[x]>=1)return f}var A=Math.round(m[0]*255)+", "+Math.round(m[1]*255)+", "+Math.round(m[2]*255);return _?"rgba("+A+", "+m[3]+")":"rgb("+A+")"}}}),Yn=U({"src/constants/interactions.js"(pe,le){le.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}}}),On=U({"src/lib/regex.js"(pe){pe.counter=function(le,w,R,O){var z=(w||"")+(R?"":"$"),l=O===!1?"":"^";return le==="xy"?new RegExp(l+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+z):new RegExp(l+le+"([2-9]|[1-9][0-9]+)?"+z)}}}),Sn=U({"src/lib/coerce.js"(pe){var le=_t(),w=or(),R=Ar().extendFlat,O=Jn(),z=Vn(),l=Lr(),u=Yn().DESELECTDIM,c=Zt(),p=On().counter,f=sr().modHalf,v=dr().isArrayOrTypedArray,h=dr().isTypedArraySpec,m=dr().decodeTypedArraySpec;pe.valObjectMeta={data_array:{coerceFunction:function(x,A,E){A.set(v(x)?x:h(x)?m(x):E)}},enumerated:{coerceFunction:function(x,A,E,D){D.coerceNumber&&(x=+x),D.values.indexOf(x)===-1?A.set(E):A.set(x)},validateFunction:function(x,A){A.coerceNumber&&(x=+x);for(var E=A.values,D=0;D<E.length;D++){var g=String(E[D]);if(g.charAt(0)==="/"&&g.charAt(g.length-1)==="/"){var C=new RegExp(g.substr(1,g.length-2));if(C.test(x))return!0}else if(x===E[D])return!0}return!1}},boolean:{coerceFunction:function(x,A,E){x===!0||x===!1?A.set(x):A.set(E)}},number:{coerceFunction:function(x,A,E,D){h(x)&&(x=m(x)),!le(x)||D.min!==void 0&&x<D.min||D.max!==void 0&&x>D.max?A.set(E):A.set(+x)}},integer:{coerceFunction:function(x,A,E,D){if((D.extras||[]).indexOf(x)!==-1){A.set(x);return}h(x)&&(x=m(x)),x%1||!le(x)||D.min!==void 0&&x<D.min||D.max!==void 0&&x>D.max?A.set(E):A.set(+x)}},string:{coerceFunction:function(x,A,E,D){if(typeof x!="string"){var g=typeof x=="number";D.strict===!0||!g?A.set(E):A.set(String(x))}else D.noBlank&&!x?A.set(E):A.set(x)}},color:{coerceFunction:function(x,A,E){h(x)&&(x=m(x)),w(x).isValid()?A.set(x):A.set(E)}},colorlist:{coerceFunction:function(x,A,E){function D(g){return w(g).isValid()}!Array.isArray(x)||!x.length?A.set(E):x.every(D)?A.set(x):A.set(E)}},colorscale:{coerceFunction:function(x,A,E){A.set(z.get(x,E))}},angle:{coerceFunction:function(x,A,E){h(x)&&(x=m(x)),x==="auto"?A.set("auto"):le(x)?A.set(f(+x,360)):A.set(E)}},subplotid:{coerceFunction:function(x,A,E,D){var g=D.regex||p(E);if(typeof x=="string"&&g.test(x)){A.set(x);return}A.set(E)},validateFunction:function(x,A){var E=A.dflt;return x===E?!0:typeof x!="string"?!1:!!p(E).test(x)}},flaglist:{coerceFunction:function(x,A,E,D){if((D.extras||[]).indexOf(x)!==-1){A.set(x);return}if(typeof x!="string"){A.set(E);return}for(var g=x.split("+"),C=0;C<g.length;){var I=g[C];D.flags.indexOf(I)===-1||g.indexOf(I)<C?g.splice(C,1):C++}g.length?A.set(g.join("+")):A.set(E)}},any:{coerceFunction:function(x,A,E){x===void 0?A.set(E):A.set(h(x)?m(x):x)}},info_array:{coerceFunction:function(x,A,E,D){function g(K,Q,J){var G,ee={set:function(re){G=re}};return J===void 0&&(J=Q.dflt),pe.valObjectMeta[Q.valType].coerceFunction(K,ee,J,Q),G}if(h(x)&&(x=m(x)),!v(x)){A.set(E);return}var C=D.dimensions===2||D.dimensions==="1-2"&&Array.isArray(x)&&v(x[0]),I=D.items,N=[],F=Array.isArray(I),k=F&&C&&v(I[0]),P=C&&F&&!k,T=F&&!P?I.length:x.length,y,S,M,W,$,Z;if(E=Array.isArray(E)?E:[],C)for(y=0;y<T;y++)for(N[y]=[],M=v(x[y])?x[y]:[],P?$=I.length:F?$=I[y].length:$=M.length,S=0;S<$;S++)P?W=I[S]:F?W=I[y][S]:W=I,Z=g(M[S],W,(E[y]||[])[S]),Z!==void 0&&(N[y][S]=Z);else for(y=0;y<T;y++)Z=g(x[y],F?I[y]:I,E[y]),Z!==void 0&&(N[y]=Z);A.set(N)},validateFunction:function(x,A){if(!v(x))return!1;var E=A.items,D=Array.isArray(E),g=A.dimensions===2;if(!A.freeLength&&x.length!==E.length)return!1;for(var C=0;C<x.length;C++)if(g){if(!v(x[C])||!A.freeLength&&x[C].length!==E[C].length)return!1;for(var I=0;I<x[C].length;I++)if(!_(x[C][I],D?E[C][I]:E))return!1}else if(!_(x[C],D?E[C]:E))return!1;return!0}}},pe.coerce=function(x,A,E,D,g){var C=c(E,D).get(),I=c(x,D),N=c(A,D),F=I.get(),k=A._template;if(F===void 0&&k&&(F=c(k,D).get(),k=0),g===void 0&&(g=C.dflt),C.arrayOk){if(v(F))return N.set(F),F;if(h(F))return F=m(F),N.set(F),F}var P=pe.valObjectMeta[C.valType].coerceFunction;P(F,N,g,C);var T=N.get();return k&&T===g&&!_(F,C)&&(F=c(k,D).get(),P(F,N,g,C),T=N.get()),T},pe.coerce2=function(x,A,E,D,g){var C=c(x,D),I=pe.coerce(x,A,E,D,g),N=C.get();return N!=null?I:!1},pe.coerceFont=function(x,A,E,D){D||(D={}),E=R({},E),E=R(E,D.overrideDflt||{});var g={family:x(A+".family",E.family),size:x(A+".size",E.size),color:x(A+".color",E.color),weight:x(A+".weight",E.weight),style:x(A+".style",E.style)};if(D.noFontVariant||(g.variant=x(A+".variant",E.variant)),D.noFontLineposition||(g.lineposition=x(A+".lineposition",E.lineposition)),D.noFontTextcase||(g.textcase=x(A+".textcase",E.textcase)),!D.noFontShadow){var C=E.shadow;C==="none"&&D.autoShadowDflt&&(C="auto"),g.shadow=x(A+".shadow",C)}return g},pe.coercePattern=function(x,A,E,D){var g=x(A+".shape"),C;if(g||(C=x(A+".path")),g||C){g&&x(A+".solidity"),x(A+".size");var I=x(A+".fillmode"),N=I==="overlay";if(!D){var F=x(A+".bgcolor",N?E:void 0);x(A+".fgcolor",N?l.contrast(F):E)}x(A+".fgopacity",N?.5:1)}},pe.coerceHoverinfo=function(x,A,E){var D=A._module.attributes,g=D.hoverinfo?D:O,C=g.hoverinfo,I;if(E._dataLength===1){var N=C.dflt==="all"?C.flags.slice():C.dflt.split("+");N.splice(N.indexOf("name"),1),I=N.join("+")}return pe.coerce(x,A,g,"hoverinfo",I)},pe.coerceSelectionMarkerOpacity=function(x,A){if(x.marker){var E=x.marker.opacity;if(E!==void 0){var D,g;!v(E)&&!x.selected&&!x.unselected&&(D=E,g=u*E),A("selected.marker.opacity",D),A("unselected.marker.opacity",g)}}};function _(x,A){var E=pe.valObjectMeta[A.valType];if(A.arrayOk&&v(x))return!0;if(E.validateFunction)return E.validateFunction(x,A);var D={},g=D,C={set:function(I){g=I}};return E.coerceFunction(x,C,D,A),g!==D}pe.validate=_}}),bn=U({"src/plot_api/plot_config.js"(pe,le){var w={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:{}}},R={};function O(z,l){for(var u in z){var c=z[u];c.valType?l[u]=c.dflt:(l[u]||(l[u]={}),O(c,l[u]))}}O(w,R),le.exports={configAttributes:w,dfltConfig:R}}}),Mn=U({"src/lib/notifier.js"(pe,le){var w=Ze(),R=_t(),O=[];le.exports=function(z,l){if(O.indexOf(z)!==-1)return;O.push(z);var u=1e3;R(l)?u=l:l==="long"&&(u=3e3);var c=w.select("body").selectAll(".plotly-notifier").data([0]);c.enter().append("div").classed("plotly-notifier",!0);var p=c.selectAll(".notifier-note").data(O);function f(v){v.duration(700).style("opacity",0).each("end",function(h){var m=O.indexOf(h);m!==-1&&O.splice(m,1),w.select(this).remove()})}p.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(v){var h=w.select(this);h.append("button").classed("notifier-close",!0).html("&times;").on("click",function(){h.transition().call(f)});for(var m=h.append("p"),_=v.split(/<br\s*\/?>/g),x=0;x<_.length;x++)x&&m.append("br"),m.append("span").text(_[x]);l==="stick"?h.transition().duration(350).style("opacity",1):h.transition().duration(700).style("opacity",1).transition().delay(u).call(f)})}}}),gi=U({"src/lib/loggers.js"(pe,le){var w=bn().dfltConfig,R=Mn(),O=le.exports={};O.log=function(){var z;if(w.logging>1){var l=["LOG:"];for(z=0;z<arguments.length;z++)l.push(arguments[z]);console.trace.apply(console,l)}if(w.notifyOnLogging>1){var u=[];for(z=0;z<arguments.length;z++)u.push(arguments[z]);R(u.join("<br>"),"long")}},O.warn=function(){var z;if(w.logging>0){var l=["WARN:"];for(z=0;z<arguments.length;z++)l.push(arguments[z]);console.trace.apply(console,l)}if(w.notifyOnLogging>0){var u=[];for(z=0;z<arguments.length;z++)u.push(arguments[z]);R(u.join("<br>"),"stick")}},O.error=function(){var z;if(w.logging>0){var l=["ERROR:"];for(z=0;z<arguments.length;z++)l.push(arguments[z]);console.error.apply(console,l)}if(w.notifyOnLogging>0){var u=[];for(z=0;z<arguments.length;z++)u.push(arguments[z]);R(u.join("<br>"),"stick")}}}}),Oi=U({"src/lib/noop.js"(pe,le){le.exports=function(){}}}),Pa=U({"src/lib/push_unique.js"(pe,le){le.exports=function(R,O){if(O instanceof RegExp){for(var z=O.toString(),l=0;l<R.length;l++)if(R[l]instanceof RegExp&&R[l].toString()===z)return R;R.push(O)}else(O||O===0)&&R.indexOf(O)===-1&&R.push(O);return R}}}),va=U({"node_modules/gl-mat4/create.js"(pe,le){le.exports=w;function w(){var R=new Float32Array(16);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}}}),ti=U({"node_modules/gl-mat4/clone.js"(pe,le){le.exports=w;function w(R){var O=new Float32Array(16);return O[0]=R[0],O[1]=R[1],O[2]=R[2],O[3]=R[3],O[4]=R[4],O[5]=R[5],O[6]=R[6],O[7]=R[7],O[8]=R[8],O[9]=R[9],O[10]=R[10],O[11]=R[11],O[12]=R[12],O[13]=R[13],O[14]=R[14],O[15]=R[15],O}}}),Tn=U({"node_modules/gl-mat4/copy.js"(pe,le){le.exports=w;function w(R,O){return R[0]=O[0],R[1]=O[1],R[2]=O[2],R[3]=O[3],R[4]=O[4],R[5]=O[5],R[6]=O[6],R[7]=O[7],R[8]=O[8],R[9]=O[9],R[10]=O[10],R[11]=O[11],R[12]=O[12],R[13]=O[13],R[14]=O[14],R[15]=O[15],R}}}),bi=U({"node_modules/gl-mat4/identity.js"(pe,le){le.exports=w;function w(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}}}),Wn=U({"node_modules/gl-mat4/transpose.js"(pe,le){le.exports=w;function w(R,O){if(R===O){var z=O[1],l=O[2],u=O[3],c=O[6],p=O[7],f=O[11];R[1]=O[4],R[2]=O[8],R[3]=O[12],R[4]=z,R[6]=O[9],R[7]=O[13],R[8]=l,R[9]=c,R[11]=O[14],R[12]=u,R[13]=p,R[14]=f}else R[0]=O[0],R[1]=O[4],R[2]=O[8],R[3]=O[12],R[4]=O[1],R[5]=O[5],R[6]=O[9],R[7]=O[13],R[8]=O[2],R[9]=O[6],R[10]=O[10],R[11]=O[14],R[12]=O[3],R[13]=O[7],R[14]=O[11],R[15]=O[15];return R}}}),Ei=U({"node_modules/gl-mat4/invert.js"(pe,le){le.exports=w;function w(R,O){var z=O[0],l=O[1],u=O[2],c=O[3],p=O[4],f=O[5],v=O[6],h=O[7],m=O[8],_=O[9],x=O[10],A=O[11],E=O[12],D=O[13],g=O[14],C=O[15],I=z*f-l*p,N=z*v-u*p,F=z*h-c*p,k=l*v-u*f,P=l*h-c*f,T=u*h-c*v,y=m*D-_*E,S=m*g-x*E,M=m*C-A*E,W=_*g-x*D,$=_*C-A*D,Z=x*C-A*g,K=I*Z-N*$+F*W+k*M-P*S+T*y;return K?(K=1/K,R[0]=(f*Z-v*$+h*W)*K,R[1]=(u*$-l*Z-c*W)*K,R[2]=(D*T-g*P+C*k)*K,R[3]=(x*P-_*T-A*k)*K,R[4]=(v*M-p*Z-h*S)*K,R[5]=(z*Z-u*M+c*S)*K,R[6]=(g*F-E*T-C*N)*K,R[7]=(m*T-x*F+A*N)*K,R[8]=(p*$-f*M+h*y)*K,R[9]=(l*M-z*$-c*y)*K,R[10]=(E*P-D*F+C*I)*K,R[11]=(_*F-m*P-A*I)*K,R[12]=(f*S-p*W-v*y)*K,R[13]=(z*W-l*S+u*y)*K,R[14]=(D*N-E*k-g*I)*K,R[15]=(m*k-_*N+x*I)*K,R):null}}}),Ki=U({"node_modules/gl-mat4/adjoint.js"(pe,le){le.exports=w;function w(R,O){var z=O[0],l=O[1],u=O[2],c=O[3],p=O[4],f=O[5],v=O[6],h=O[7],m=O[8],_=O[9],x=O[10],A=O[11],E=O[12],D=O[13],g=O[14],C=O[15];return R[0]=f*(x*C-A*g)-_*(v*C-h*g)+D*(v*A-h*x),R[1]=-(l*(x*C-A*g)-_*(u*C-c*g)+D*(u*A-c*x)),R[2]=l*(v*C-h*g)-f*(u*C-c*g)+D*(u*h-c*v),R[3]=-(l*(v*A-h*x)-f*(u*A-c*x)+_*(u*h-c*v)),R[4]=-(p*(x*C-A*g)-m*(v*C-h*g)+E*(v*A-h*x)),R[5]=z*(x*C-A*g)-m*(u*C-c*g)+E*(u*A-c*x),R[6]=-(z*(v*C-h*g)-p*(u*C-c*g)+E*(u*h-c*v)),R[7]=z*(v*A-h*x)-p*(u*A-c*x)+m*(u*h-c*v),R[8]=p*(_*C-A*D)-m*(f*C-h*D)+E*(f*A-h*_),R[9]=-(z*(_*C-A*D)-m*(l*C-c*D)+E*(l*A-c*_)),R[10]=z*(f*C-h*D)-p*(l*C-c*D)+E*(l*h-c*f),R[11]=-(z*(f*A-h*_)-p*(l*A-c*_)+m*(l*h-c*f)),R[12]=-(p*(_*g-x*D)-m*(f*g-v*D)+E*(f*x-v*_)),R[13]=z*(_*g-x*D)-m*(l*g-u*D)+E*(l*x-u*_),R[14]=-(z*(f*g-v*D)-p*(l*g-u*D)+E*(l*v-u*f)),R[15]=z*(f*x-v*_)-p*(l*x-u*_)+m*(l*v-u*f),R}}}),sa=U({"node_modules/gl-mat4/determinant.js"(pe,le){le.exports=w;function w(R){var O=R[0],z=R[1],l=R[2],u=R[3],c=R[4],p=R[5],f=R[6],v=R[7],h=R[8],m=R[9],_=R[10],x=R[11],A=R[12],E=R[13],D=R[14],g=R[15],C=O*p-z*c,I=O*f-l*c,N=O*v-u*c,F=z*f-l*p,k=z*v-u*p,P=l*v-u*f,T=h*E-m*A,y=h*D-_*A,S=h*g-x*A,M=m*D-_*E,W=m*g-x*E,$=_*g-x*D;return C*$-I*W+N*M+F*S-k*y+P*T}}}),xa=U({"node_modules/gl-mat4/multiply.js"(pe,le){le.exports=w;function w(R,O,z){var l=O[0],u=O[1],c=O[2],p=O[3],f=O[4],v=O[5],h=O[6],m=O[7],_=O[8],x=O[9],A=O[10],E=O[11],D=O[12],g=O[13],C=O[14],I=O[15],N=z[0],F=z[1],k=z[2],P=z[3];return R[0]=N*l+F*f+k*_+P*D,R[1]=N*u+F*v+k*x+P*g,R[2]=N*c+F*h+k*A+P*C,R[3]=N*p+F*m+k*E+P*I,N=z[4],F=z[5],k=z[6],P=z[7],R[4]=N*l+F*f+k*_+P*D,R[5]=N*u+F*v+k*x+P*g,R[6]=N*c+F*h+k*A+P*C,R[7]=N*p+F*m+k*E+P*I,N=z[8],F=z[9],k=z[10],P=z[11],R[8]=N*l+F*f+k*_+P*D,R[9]=N*u+F*v+k*x+P*g,R[10]=N*c+F*h+k*A+P*C,R[11]=N*p+F*m+k*E+P*I,N=z[12],F=z[13],k=z[14],P=z[15],R[12]=N*l+F*f+k*_+P*D,R[13]=N*u+F*v+k*x+P*g,R[14]=N*c+F*h+k*A+P*C,R[15]=N*p+F*m+k*E+P*I,R}}}),Qa=U({"node_modules/gl-mat4/translate.js"(pe,le){le.exports=w;function w(R,O,z){var l=z[0],u=z[1],c=z[2],p,f,v,h,m,_,x,A,E,D,g,C;return O===R?(R[12]=O[0]*l+O[4]*u+O[8]*c+O[12],R[13]=O[1]*l+O[5]*u+O[9]*c+O[13],R[14]=O[2]*l+O[6]*u+O[10]*c+O[14],R[15]=O[3]*l+O[7]*u+O[11]*c+O[15]):(p=O[0],f=O[1],v=O[2],h=O[3],m=O[4],_=O[5],x=O[6],A=O[7],E=O[8],D=O[9],g=O[10],C=O[11],R[0]=p,R[1]=f,R[2]=v,R[3]=h,R[4]=m,R[5]=_,R[6]=x,R[7]=A,R[8]=E,R[9]=D,R[10]=g,R[11]=C,R[12]=p*l+m*u+E*c+O[12],R[13]=f*l+_*u+D*c+O[13],R[14]=v*l+x*u+g*c+O[14],R[15]=h*l+A*u+C*c+O[15]),R}}}),is=U({"node_modules/gl-mat4/scale.js"(pe,le){le.exports=w;function w(R,O,z){var l=z[0],u=z[1],c=z[2];return R[0]=O[0]*l,R[1]=O[1]*l,R[2]=O[2]*l,R[3]=O[3]*l,R[4]=O[4]*u,R[5]=O[5]*u,R[6]=O[6]*u,R[7]=O[7]*u,R[8]=O[8]*c,R[9]=O[9]*c,R[10]=O[10]*c,R[11]=O[11]*c,R[12]=O[12],R[13]=O[13],R[14]=O[14],R[15]=O[15],R}}}),go=U({"node_modules/gl-mat4/rotate.js"(pe,le){le.exports=w;function w(R,O,z,l){var u=l[0],c=l[1],p=l[2],f=Math.sqrt(u*u+c*c+p*p),v,h,m,_,x,A,E,D,g,C,I,N,F,k,P,T,y,S,M,W,$,Z,K,Q;return Math.abs(f)<1e-6?null:(f=1/f,u*=f,c*=f,p*=f,v=Math.sin(z),h=Math.cos(z),m=1-h,_=O[0],x=O[1],A=O[2],E=O[3],D=O[4],g=O[5],C=O[6],I=O[7],N=O[8],F=O[9],k=O[10],P=O[11],T=u*u*m+h,y=c*u*m+p*v,S=p*u*m-c*v,M=u*c*m-p*v,W=c*c*m+h,$=p*c*m+u*v,Z=u*p*m+c*v,K=c*p*m-u*v,Q=p*p*m+h,R[0]=_*T+D*y+N*S,R[1]=x*T+g*y+F*S,R[2]=A*T+C*y+k*S,R[3]=E*T+I*y+P*S,R[4]=_*M+D*W+N*$,R[5]=x*M+g*W+F*$,R[6]=A*M+C*W+k*$,R[7]=E*M+I*W+P*$,R[8]=_*Z+D*K+N*Q,R[9]=x*Z+g*K+F*Q,R[10]=A*Z+C*K+k*Q,R[11]=E*Z+I*K+P*Q,O!==R&&(R[12]=O[12],R[13]=O[13],R[14]=O[14],R[15]=O[15]),R)}}}),Co=U({"node_modules/gl-mat4/rotateX.js"(pe,le){le.exports=w;function w(R,O,z){var l=Math.sin(z),u=Math.cos(z),c=O[4],p=O[5],f=O[6],v=O[7],h=O[8],m=O[9],_=O[10],x=O[11];return O!==R&&(R[0]=O[0],R[1]=O[1],R[2]=O[2],R[3]=O[3],R[12]=O[12],R[13]=O[13],R[14]=O[14],R[15]=O[15]),R[4]=c*u+h*l,R[5]=p*u+m*l,R[6]=f*u+_*l,R[7]=v*u+x*l,R[8]=h*u-c*l,R[9]=m*u-p*l,R[10]=_*u-f*l,R[11]=x*u-v*l,R}}}),Ko=U({"node_modules/gl-mat4/rotateY.js"(pe,le){le.exports=w;function w(R,O,z){var l=Math.sin(z),u=Math.cos(z),c=O[0],p=O[1],f=O[2],v=O[3],h=O[8],m=O[9],_=O[10],x=O[11];return O!==R&&(R[4]=O[4],R[5]=O[5],R[6]=O[6],R[7]=O[7],R[12]=O[12],R[13]=O[13],R[14]=O[14],R[15]=O[15]),R[0]=c*u-h*l,R[1]=p*u-m*l,R[2]=f*u-_*l,R[3]=v*u-x*l,R[8]=c*l+h*u,R[9]=p*l+m*u,R[10]=f*l+_*u,R[11]=v*l+x*u,R}}}),Zi=U({"node_modules/gl-mat4/rotateZ.js"(pe,le){le.exports=w;function w(R,O,z){var l=Math.sin(z),u=Math.cos(z),c=O[0],p=O[1],f=O[2],v=O[3],h=O[4],m=O[5],_=O[6],x=O[7];return O!==R&&(R[8]=O[8],R[9]=O[9],R[10]=O[10],R[11]=O[11],R[12]=O[12],R[13]=O[13],R[14]=O[14],R[15]=O[15]),R[0]=c*u+h*l,R[1]=p*u+m*l,R[2]=f*u+_*l,R[3]=v*u+x*l,R[4]=h*u-c*l,R[5]=m*u-p*l,R[6]=_*u-f*l,R[7]=x*u-v*l,R}}}),za=U({"node_modules/gl-mat4/fromRotation.js"(pe,le){le.exports=w;function w(R,O,z){var l,u,c,p=z[0],f=z[1],v=z[2],h=Math.sqrt(p*p+f*f+v*v);return Math.abs(h)<1e-6?null:(h=1/h,p*=h,f*=h,v*=h,l=Math.sin(O),u=Math.cos(O),c=1-u,R[0]=p*p*c+u,R[1]=f*p*c+v*l,R[2]=v*p*c-f*l,R[3]=0,R[4]=p*f*c-v*l,R[5]=f*f*c+u,R[6]=v*f*c+p*l,R[7]=0,R[8]=p*v*c+f*l,R[9]=f*v*c-p*l,R[10]=v*v*c+u,R[11]=0,R[12]=0,R[13]=0,R[14]=0,R[15]=1,R)}}}),Ss=U({"node_modules/gl-mat4/fromRotationTranslation.js"(pe,le){le.exports=w;function w(R,O,z){var l=O[0],u=O[1],c=O[2],p=O[3],f=l+l,v=u+u,h=c+c,m=l*f,_=l*v,x=l*h,A=u*v,E=u*h,D=c*h,g=p*f,C=p*v,I=p*h;return R[0]=1-(A+D),R[1]=_+I,R[2]=x-C,R[3]=0,R[4]=_-I,R[5]=1-(m+D),R[6]=E+g,R[7]=0,R[8]=x+C,R[9]=E-g,R[10]=1-(m+A),R[11]=0,R[12]=z[0],R[13]=z[1],R[14]=z[2],R[15]=1,R}}}),ba=U({"node_modules/gl-mat4/fromScaling.js"(pe,le){le.exports=w;function w(R,O){return R[0]=O[0],R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=O[1],R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=O[2],R[11]=0,R[12]=0,R[13]=0,R[14]=0,R[15]=1,R}}}),po=U({"node_modules/gl-mat4/fromTranslation.js"(pe,le){le.exports=w;function w(R,O){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]=O[0],R[13]=O[1],R[14]=O[2],R[15]=1,R}}}),Ys=U({"node_modules/gl-mat4/fromXRotation.js"(pe,le){le.exports=w;function w(R,O){var z=Math.sin(O),l=Math.cos(O);return R[0]=1,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=l,R[6]=z,R[7]=0,R[8]=0,R[9]=-z,R[10]=l,R[11]=0,R[12]=0,R[13]=0,R[14]=0,R[15]=1,R}}}),$s=U({"node_modules/gl-mat4/fromYRotation.js"(pe,le){le.exports=w;function w(R,O){var z=Math.sin(O),l=Math.cos(O);return R[0]=l,R[1]=0,R[2]=-z,R[3]=0,R[4]=0,R[5]=1,R[6]=0,R[7]=0,R[8]=z,R[9]=0,R[10]=l,R[11]=0,R[12]=0,R[13]=0,R[14]=0,R[15]=1,R}}}),Gs=U({"node_modules/gl-mat4/fromZRotation.js"(pe,le){le.exports=w;function w(R,O){var z=Math.sin(O),l=Math.cos(O);return R[0]=l,R[1]=z,R[2]=0,R[3]=0,R[4]=-z,R[5]=l,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}}}),Ns=U({"node_modules/gl-mat4/fromQuat.js"(pe,le){le.exports=w;function w(R,O){var z=O[0],l=O[1],u=O[2],c=O[3],p=z+z,f=l+l,v=u+u,h=z*p,m=l*p,_=l*f,x=u*p,A=u*f,E=u*v,D=c*p,g=c*f,C=c*v;return R[0]=1-_-E,R[1]=m+C,R[2]=x-g,R[3]=0,R[4]=m-C,R[5]=1-h-E,R[6]=A+D,R[7]=0,R[8]=x+g,R[9]=A-D,R[10]=1-h-_,R[11]=0,R[12]=0,R[13]=0,R[14]=0,R[15]=1,R}}}),Hl=U({"node_modules/gl-mat4/frustum.js"(pe,le){le.exports=w;function w(R,O,z,l,u,c,p){var f=1/(z-O),v=1/(u-l),h=1/(c-p);return R[0]=c*2*f,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=c*2*v,R[6]=0,R[7]=0,R[8]=(z+O)*f,R[9]=(u+l)*v,R[10]=(p+c)*h,R[11]=-1,R[12]=0,R[13]=0,R[14]=p*c*2*h,R[15]=0,R}}}),nu=U({"node_modules/gl-mat4/perspective.js"(pe,le){le.exports=w;function w(R,O,z,l,u){var c=1/Math.tan(O/2),p=1/(l-u);return R[0]=c/z,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=c,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=(u+l)*p,R[11]=-1,R[12]=0,R[13]=0,R[14]=2*u*l*p,R[15]=0,R}}}),su=U({"node_modules/gl-mat4/perspectiveFromFieldOfView.js"(pe,le){le.exports=w;function w(R,O,z,l){var u=Math.tan(O.upDegrees*Math.PI/180),c=Math.tan(O.downDegrees*Math.PI/180),p=Math.tan(O.leftDegrees*Math.PI/180),f=Math.tan(O.rightDegrees*Math.PI/180),v=2/(p+f),h=2/(u+c);return R[0]=v,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=h,R[6]=0,R[7]=0,R[8]=-((p-f)*v*.5),R[9]=(u-c)*h*.5,R[10]=l/(z-l),R[11]=-1,R[12]=0,R[13]=0,R[14]=l*z/(z-l),R[15]=0,R}}}),Mc=U({"node_modules/gl-mat4/ortho.js"(pe,le){le.exports=w;function w(R,O,z,l,u,c,p){var f=1/(O-z),v=1/(l-u),h=1/(c-p);return R[0]=-2*f,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=-2*v,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=2*h,R[11]=0,R[12]=(O+z)*f,R[13]=(u+l)*v,R[14]=(p+c)*h,R[15]=1,R}}}),da=U({"node_modules/gl-mat4/lookAt.js"(pe,le){var w=bi();le.exports=R;function R(O,z,l,u){var c,p,f,v,h,m,_,x,A,E,D=z[0],g=z[1],C=z[2],I=u[0],N=u[1],F=u[2],k=l[0],P=l[1],T=l[2];return Math.abs(D-k)<1e-6&&Math.abs(g-P)<1e-6&&Math.abs(C-T)<1e-6?w(O):(_=D-k,x=g-P,A=C-T,E=1/Math.sqrt(_*_+x*x+A*A),_*=E,x*=E,A*=E,c=N*A-F*x,p=F*_-I*A,f=I*x-N*_,E=Math.sqrt(c*c+p*p+f*f),E?(E=1/E,c*=E,p*=E,f*=E):(c=0,p=0,f=0),v=x*f-A*p,h=A*c-_*f,m=_*p-x*c,E=Math.sqrt(v*v+h*h+m*m),E?(E=1/E,v*=E,h*=E,m*=E):(v=0,h=0,m=0),O[0]=c,O[1]=v,O[2]=_,O[3]=0,O[4]=p,O[5]=h,O[6]=x,O[7]=0,O[8]=f,O[9]=m,O[10]=A,O[11]=0,O[12]=-(c*D+p*g+f*C),O[13]=-(v*D+h*g+m*C),O[14]=-(_*D+x*g+A*C),O[15]=1,O)}}}),Xa=U({"node_modules/gl-mat4/str.js"(pe,le){le.exports=w;function w(R){return"mat4("+R[0]+", "+R[1]+", "+R[2]+", "+R[3]+", "+R[4]+", "+R[5]+", "+R[6]+", "+R[7]+", "+R[8]+", "+R[9]+", "+R[10]+", "+R[11]+", "+R[12]+", "+R[13]+", "+R[14]+", "+R[15]+")"}}}),Oo=U({"node_modules/gl-mat4/index.js"(pe,le){le.exports={create:va(),clone:ti(),copy:Tn(),identity:bi(),transpose:Wn(),invert:Ei(),adjoint:Ki(),determinant:sa(),multiply:xa(),translate:Qa(),scale:is(),rotate:go(),rotateX:Co(),rotateY:Ko(),rotateZ:Zi(),fromRotation:za(),fromRotationTranslation:Ss(),fromScaling:ba(),fromTranslation:po(),fromXRotation:Ys(),fromYRotation:$s(),fromZRotation:Gs(),fromQuat:Ns(),frustum:Hl(),perspective:nu(),perspectiveFromFieldOfView:su(),ortho:Mc(),lookAt:da(),str:Xa()}}}),_s=U({"src/lib/matrix.js"(pe){var le=Oo();pe.init2dArray=function(w,R){for(var O=new Array(w),z=0;z<w;z++)O[z]=new Array(R);return O},pe.transposeRagged=function(w){var R=0,O=w.length,z,l;for(z=0;z<O;z++)R=Math.max(R,w[z].length);var u=new Array(R);for(z=0;z<R;z++)for(u[z]=new Array(O),l=0;l<O;l++)u[z][l]=w[l][z];return u},pe.dot=function(w,R){if(!(w.length&&R.length)||w.length!==R.length)return null;var O=w.length,z,l;if(w[0].length)for(z=new Array(O),l=0;l<O;l++)z[l]=pe.dot(w[l],R);else if(R[0].length){var u=pe.transposeRagged(R);for(z=new Array(u.length),l=0;l<u.length;l++)z[l]=pe.dot(w,u[l])}else for(z=0,l=0;l<O;l++)z+=w[l]*R[l];return z},pe.translationMatrix=function(w,R){return[[1,0,w],[0,1,R],[0,0,1]]},pe.rotationMatrix=function(w){var R=w*Math.PI/180;return[[Math.cos(R),-Math.sin(R),0],[Math.sin(R),Math.cos(R),0],[0,0,1]]},pe.rotationXYMatrix=function(w,R,O){return pe.dot(pe.dot(pe.translationMatrix(R,O),pe.rotationMatrix(w)),pe.translationMatrix(-R,-O))},pe.apply3DTransform=function(w){return function(){var R=arguments,O=arguments.length===1?R[0]:[R[0],R[1],R[2]||0];return pe.dot(w,[O[0],O[1],O[2],1]).slice(0,3)}},pe.apply2DTransform=function(w){return function(){var R=arguments;R.length===3&&(R=R[0]);var O=arguments.length===1?R[0]:[R[0],R[1]];return pe.dot(w,[O[0],O[1],1]).slice(0,2)}},pe.apply2DTransform2=function(w){var R=pe.apply2DTransform(w);return function(O){return R(O.slice(0,2)).concat(R(O.slice(2,4)))}},pe.convertCssMatrix=function(w){if(w){var R=w.length;if(R===16)return w;if(R===6)return[w[0],w[1],0,0,w[2],w[3],0,0,0,0,1,0,w[4],w[5],0,1]}return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},pe.inverseTransformMatrix=function(w){var R=[];return le.invert(R,w),[[R[0],R[1],R[2],R[3]],[R[4],R[5],R[6],R[7]],[R[8],R[9],R[10],R[11]],[R[12],R[13],R[14],R[15]]]}}}),nl=U({"src/lib/dom.js"(pe,le){var w=Ze(),R=gi(),O=_s(),z=Oo();function l(D){var g;if(typeof D=="string"){if(g=document.getElementById(D),g===null)throw new Error("No DOM element with id '"+D+"' exists on the page.");return g}else if(D==null)throw new Error("DOM element provided is null or undefined");return D}function u(D){var g=w.select(D);return g.node()instanceof HTMLElement&&g.size()&&g.classed("js-plotly-plot")}function c(D){var g=D&&D.parentNode;g&&g.removeChild(D)}function p(D,g){f("global",D,g)}function f(D,g,C){var I="plotly.js-style-"+D,N=document.getElementById(I);if(!(N&&N.matches(".no-inline-styles"))){N||(N=document.createElement("style"),N.setAttribute("id",I),N.appendChild(document.createTextNode("")),document.head.appendChild(N));var F=N.sheet;F?F.insertRule?F.insertRule(g+"{"+C+"}",0):F.addRule?F.addRule(g,C,0):R.warn("addStyleRule failed"):R.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function v(D){var g="plotly.js-style-"+D,C=document.getElementById(g);C&&c(C)}function h(D,g,C,I,N,F){var k=I.split(":"),P=N.split(":"),T="data-btn-style-event-added";F||(F=document),F.querySelectorAll(D).forEach(function(y){y.getAttribute(T)||(y.addEventListener("mouseenter",function(){var S=this.querySelector(C);S&&(S.style[k[0]]=k[1])}),y.addEventListener("mouseleave",function(){var S=this.querySelector(C);S&&(g&&this.matches(g)?S.style[k[0]]=k[1]:S.style[P[0]]=P[1])}),y.setAttribute(T,!0))})}function m(D){var g=x(D),C=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return g.forEach(function(I){var N=_(I);if(N){var F=O.convertCssMatrix(N);C=z.multiply(C,C,F)}}),C}function _(D){var g=window.getComputedStyle(D,null),C=g.getPropertyValue("-webkit-transform")||g.getPropertyValue("-moz-transform")||g.getPropertyValue("-ms-transform")||g.getPropertyValue("-o-transform")||g.getPropertyValue("transform");return C==="none"?null:C.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(I){return+I})}function x(D){for(var g=[];A(D);)g.push(D),D=D.parentNode,typeof ShadowRoot=="function"&&D instanceof ShadowRoot&&(D=D.host);return g}function A(D){return D&&(D instanceof Element||D instanceof HTMLElement)}function E(D,g){return D&&g&&D.top===g.top&&D.left===g.left&&D.right===g.right&&D.bottom===g.bottom}le.exports={getGraphDiv:l,isPlotDiv:u,removeElement:c,addStyleRule:p,addRelatedStyleRule:f,deleteRelatedStyleRule:v,setStyleOnHover:h,getFullTransformMatrix:m,getElementTransformMatrix:_,getElementAndAncestors:x,equalDomRects:E}}}),vu=U({"src/plots/animation_attributes.js"(pe,le){le.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"}}}}}),zl=U({"src/plot_api/edit_types.js"(pe,le){var w=Ar().extendFlat,R=Lt(),O={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},z={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},l=O.flags.slice().concat(["fullReplot"]),u=z.flags.slice().concat("layoutReplot");le.exports={traces:O,layout:z,traceFlags:function(){return c(l)},layoutFlags:function(){return c(u)},update:function(v,h){var m=h.editType;if(m&&m!=="none")for(var _=m.split("+"),x=0;x<_.length;x++)v[_[x]]=!0},overrideAll:p};function c(v){for(var h={},m=0;m<v.length;m++)h[v[m]]=!1;return h}function p(v,h,m){var _=w({},v);for(var x in _){var A=_[x];R(A)&&(_[x]=f(A,h,m,x))}return m==="from-root"&&(_.editType=h),_}function f(v,h,m,_){if(v.valType){var x=w({},v);if(x.editType=h,Array.isArray(v.items)){x.items=new Array(v.items.length);for(var A=0;A<v.items.length;A++)x.items[A]=f(v.items[A],h)}return x}else return p(v,h,_.charAt(0)==="_"?"nested":"from-root")}}}),jl=U({"src/components/drawing/attributes.js"(pe){pe.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},pe.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"}}}),Il=U({"src/constants/docs.js"(pe,le){le.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"}}}),Js=U({"src/plots/template_attributes.js"(pe){var le=Il(),w=le.FORMAT_LINK,R=le.DATE_FORMAT_LINK;function O(l){var u=l&&l.supportOther;return["Variables are inserted using %{variable},",'for example "y: %{y}"'+(u?" 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}".`,w,"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}".`,R,"for details on the date formatting syntax."].join(" ")}pe.templateFormatStringDescription=O;function z(l){var u=l.description?" "+l.description:"",c=l.keys||[];if(c.length>0){for(var p=[],f=0;f<c.length;f++)p[f]="`"+c[f]+"`";u=u+"Finally, the template string has access to ",c.length===1?u=u+"variable "+p[0]:u=u+"variables "+p.slice(0,-1).join(", ")+" and "+p.slice(-1)+"."}return u}pe.hovertemplateAttrs=function(l,u){l=l||{},u=u||{},z(u);var c={valType:"string",dflt:"",editType:l.editType||"none"};return l.arrayOk!==!1&&(c.arrayOk=!0),c},pe.texttemplateAttrs=function(l,u){l=l||{},u=u||{},z(u);var c={valType:"string",dflt:"",editType:l.editType||"calc"};return l.arrayOk!==!1&&(c.arrayOk=!0),c},pe.shapeTexttemplateAttrs=function(l,u){l=l||{},u=u||{},l.newshape,z(u);var c={valType:"string",dflt:"",editType:l.editType||"arraydraw"};return c}}}),Vl=U({"src/components/shapes/label_texttemplate.js"(pe,le){function w(C,I){return I?I.d2l(C):C}function R(C,I){return I?I.l2d(C):C}function O(C){return C.x0}function z(C){return C.x1}function l(C){return C.y0}function u(C){return C.y1}function c(C){return C.x0shift||0}function p(C){return C.x1shift||0}function f(C){return C.y0shift||0}function v(C){return C.y1shift||0}function h(C,I){return w(C.x1,I)+p(C)-w(C.x0,I)-c(C)}function m(C,I,N){return w(C.y1,N)+v(C)-w(C.y0,N)-f(C)}function _(C,I){return Math.abs(h(C,I))}function x(C,I,N){return Math.abs(m(C,I,N))}function A(C,I,N){return C.type!=="line"?void 0:Math.sqrt(Math.pow(h(C,I),2)+Math.pow(m(C,I,N),2))}function E(C,I){return R((w(C.x1,I)+p(C)+w(C.x0,I)+c(C))/2,I)}function D(C,I,N){return R((w(C.y1,N)+v(C)+w(C.y0,N)+f(C))/2,N)}function g(C,I,N){return C.type!=="line"?void 0:m(C,I,N)/h(C,I)}le.exports={x0:O,x1:z,y0:l,y1:u,slope:g,dx:h,dy:m,width:_,height:x,length:A,xcenter:E,ycenter:D}}}),zn=U({"src/components/shapes/draw_newshape/attributes.js"(pe,le){var w=zl().overrideAll,R=Jn(),O=Ir(),z=jl().dash,l=Ar().extendFlat,u=Js().shapeTexttemplateAttrs,c=Vl();le.exports=w({newshape:{visible:l({},R.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:l({},R.legend,{}),legendgroup:l({},R.legendgroup,{}),legendgrouptitle:{text:l({},R.legendgrouptitle.text,{}),font:O({})},legendrank:l({},R.legendrank,{}),legendwidth:l({},R.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:l({},z,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd"},opacity:{valType:"number",min:0,max:1,dflt:1},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal"},name:l({},R.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:u({newshape:!0},{keys:Object.keys(c)}),font:O({}),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)"},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")}}),Ni=U({"src/components/selections/draw_newselection/attributes.js"(pe,le){var w=jl().dash,R=Ar().extendFlat;le.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:R({},w,{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"}}}}),Za=U({"src/plots/pad_attributes.js"(pe,le){le.exports=function(w){var R=w.editType;return{t:{valType:"number",dflt:0,editType:R},r:{valType:"number",dflt:0,editType:R},b:{valType:"number",dflt:0,editType:R},l:{valType:"number",dflt:0,editType:R},editType:R}}}}),ts=U({"src/plots/layout_attributes.js"(pe,le){var w=Ir(),R=vu(),O=jn(),z=zn(),l=Ni(),u=Za(),c=Ar().extendFlat,p=w({editType:"calc"});p.family.dflt='"Open Sans", verdana, arial, sans-serif',p.size.dflt=12,p.color.dflt=O.defaultLine,le.exports={font:p,title:{text:{valType:"string",editType:"layoutstyle"},font:w({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:w({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:c(u({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:O.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:O.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:O.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:z.newshape,activeshape:z.activeshape,newselection:l.newselection,activeselection:l.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:c({},R.transition,{editType:"none"})}}}),ps=U({"node_modules/maplibre-gl/dist/maplibre-gl.css"(){(function(){if(!document.getElementById("8431bff7cc77ea8693f8122c6e0981316b936a0a4930625e08b1512d134062bc")){var pe=document.createElement("style");pe.id="8431bff7cc77ea8693f8122c6e0981316b936a0a4930625e08b1512d134062bc",pe.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(pe)}})()}}),Mi=U({"src/registry.js"(pe){var le=gi(),w=Oi(),R=Pa(),O=Lt(),z=nl().addStyleRule,l=Ar(),u=Jn(),c=ts(),p=l.extendFlat,f=l.extendDeepAll;pe.modules={},pe.allCategories={},pe.allTypes=[],pe.subplotsRegistry={},pe.componentsRegistry={},pe.layoutArrayContainers=[],pe.layoutArrayRegexes=[],pe.traceLayoutAttributes={},pe.localeRegistry={},pe.apiMethodRegistry={},pe.collectableSubplotTypes=null,pe.register=function(I){if(pe.collectableSubplotTypes=null,I)I&&!Array.isArray(I)&&(I=[I]);else throw new Error("No argument passed to Plotly.register.");for(var N=0;N<I.length;N++){var F=I[N];if(!F)throw new Error("Invalid module was attempted to be registered!");switch(F.moduleType){case"trace":v(F);break;case"transform":_(F);break;case"component":m(F);break;case"locale":x(F);break;case"apiMethod":var k=F.name;pe.apiMethodRegistry[k]=F.fn;break;default:throw new Error("Invalid module was attempted to be registered!")}}},pe.getModule=function(C){var I=pe.modules[g(C)];return I?I._module:!1},pe.traceIs=function(C,I){if(C=g(C),C==="various")return!1;var N=pe.modules[C];return N||(C&&le.log("Unrecognized trace type "+C+"."),N=pe.modules[u.type.dflt]),!!N.categories[I]},pe.getComponentMethod=function(C,I){var N=pe.componentsRegistry[C];return N&&N[I]||w},pe.call=function(){var C=arguments[0],I=[].slice.call(arguments,1);return pe.apiMethodRegistry[C].apply(null,I)};function v(C){var I=C.name,N=C.categories,F=C.meta;if(pe.modules[I]){le.log("Type "+I+" already registered");return}pe.subplotsRegistry[C.basePlotModule.name]||h(C.basePlotModule);for(var k={},P=0;P<N.length;P++)k[N[P]]=!0,pe.allCategories[N[P]]=!0;pe.modules[I]={_module:C,categories:k},F&&Object.keys(F).length&&(pe.modules[I].meta=F),pe.allTypes.push(I);for(var T in pe.componentsRegistry)E(T,I);C.layoutAttributes&&p(pe.traceLayoutAttributes,C.layoutAttributes);var y=C.basePlotModule,S=y.name;if(S==="mapbox"){var M=y.constants.styleRules;for(var W in M)z(".js-plotly-plot .plotly .mapboxgl-"+W,M[W])}S==="map"&&ps(),(S==="geo"||S==="mapbox"||S==="map")&&window.PlotlyGeoAssets===void 0&&(window.PlotlyGeoAssets={topojson:{}})}function h(C){var I=C.name;if(pe.subplotsRegistry[I]){le.log("Plot type "+I+" already registered.");return}A(C),pe.subplotsRegistry[I]=C;for(var N in pe.componentsRegistry)D(N,C.name)}function m(C){if(typeof C.name!="string")throw new Error("Component module *name* must be a string.");var I=C.name;pe.componentsRegistry[I]=C,C.layoutAttributes&&(C.layoutAttributes._isLinkedToArray&&R(pe.layoutArrayContainers,I),A(C));for(var N in pe.modules)E(I,N);for(var F in pe.subplotsRegistry)D(I,F);C.schema&&C.schema.layout&&f(c,C.schema.layout)}function _(C){if(typeof C.name!="string")throw new Error("Transform module *name* must be a string.");var I="Transform module "+C.name,N=typeof C.transform=="function",F=typeof C.calcTransform=="function";if(!N&&!F)throw new Error(I+" is missing a *transform* or *calcTransform* method.");N&&F&&le.log([I+" has both a *transform* and *calcTransform* methods.","Please note that all *transform* methods are executed","before all *calcTransform* methods."].join(" ")),O(C.attributes)||le.log(I+" registered without an *attributes* object."),typeof C.supplyDefaults!="function"&&le.log(I+" registered without a *supplyDefaults* method.")}function x(C){var I=C.name,N=I.split("-")[0],F=C.dictionary,k=C.format,P=F&&Object.keys(F).length,T=k&&Object.keys(k).length,y=pe.localeRegistry,S=y[I];if(S||(y[I]=S={}),N!==I){var M=y[N];M||(y[N]=M={}),P&&M.dictionary===S.dictionary&&(M.dictionary=F),T&&M.format===S.format&&(M.format=k)}P&&(S.dictionary=F),T&&(S.format=k)}function A(C){if(C.layoutAttributes){var I=C.layoutAttributes._arrayAttrRegexps;if(I)for(var N=0;N<I.length;N++)R(pe.layoutArrayRegexes,I[N])}}function E(C,I){var N=pe.componentsRegistry[C].schema;if(!(!N||!N.traces)){var F=N.traces[I];F&&f(pe.modules[I]._module.attributes,F)}}function D(C,I){var N=pe.componentsRegistry[C].schema;if(!(!N||!N.subplots)){var F=pe.subplotsRegistry[I],k=F.layoutAttributes,P=F.attr==="subplot"?F.name:F.attr;Array.isArray(P)&&(P=P[0]);var T=N.subplots[P];k&&T&&f(k,T)}}function g(C){return typeof C=="object"&&(C=C.type),C}}}),to=U({"src/lib/dates.js"(pe){var le=nt().timeFormat,w=_t(),R=gi(),O=sr().mod,z=Dt(),l=z.BADNUM,u=z.ONEDAY,c=z.ONEHOUR,p=z.ONEMIN,f=z.ONESEC,v=z.EPOCHJD,h=Mi(),m=nt().utcFormat,_=/^\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,x=/^\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,A=new Date().getFullYear()-70;function E(K){return K&&h.componentsRegistry.calendars&&typeof K=="string"&&K!=="gregorian"}pe.dateTick0=function(K,Q){var J=D(K,!!Q);if(Q<2)return J;var G=pe.dateTime2ms(J,K);return G+=u*(Q-1),pe.ms2DateTime(G,0,K)};function D(K,Q){return E(K)?Q?h.getComponentMethod("calendars","CANONICAL_SUNDAY")[K]:h.getComponentMethod("calendars","CANONICAL_TICK")[K]:Q?"2000-01-02":"2000-01-01"}pe.dfltRange=function(K){return E(K)?h.getComponentMethod("calendars","DFLTRANGE")[K]:["2000-01-01","2001-01-01"]},pe.isJSDate=function(K){return typeof K=="object"&&K!==null&&typeof K.getTime=="function"};var g,C;pe.dateTime2ms=function(K,Q){if(pe.isJSDate(K)){var J=K.getTimezoneOffset()*p,G=(K.getUTCMinutes()-K.getMinutes())*p+(K.getUTCSeconds()-K.getSeconds())*f+(K.getUTCMilliseconds()-K.getMilliseconds());if(G){var ee=3*p;J=J-ee/2+O(G-J+ee/2,ee)}return K=Number(K)-J,K>=g&&K<=C?K:l}if(typeof K!="string"&&typeof K!="number")return l;K=String(K);var re=E(Q),fe=K.charAt(0);re&&(fe==="G"||fe==="g")&&(K=K.substr(1),Q="");var we=re&&Q.substr(0,7)==="chinese",Oe=K.match(we?x:_);if(!Oe)return l;var ke=Oe[1],Le=Oe[3]||"1",oe=Number(Oe[5]||1),be=Number(Oe[7]||0),_e=Number(Oe[9]||0),he=Number(Oe[11]||0);if(re){if(ke.length===2)return l;ke=Number(ke);var De;try{var xe=h.getComponentMethod("calendars","getCal")(Q);if(we){var se=Le.charAt(Le.length-1)==="i";Le=parseInt(Le,10),De=xe.newDate(ke,xe.toMonthIndex(ke,Le,se),oe)}else De=xe.newDate(ke,Number(Le),oe)}catch{return l}return De?(De.toJD()-v)*u+be*c+_e*p+he*f:l}ke.length===2?ke=(Number(ke)+2e3-A)%100+A:ke=Number(ke),Le-=1;var Ee=new Date(Date.UTC(2e3,Le,oe,be,_e));return Ee.setUTCFullYear(ke),Ee.getUTCMonth()!==Le||Ee.getUTCDate()!==oe?l:Ee.getTime()+he*f},g=pe.MIN_MS=pe.dateTime2ms("-9999"),C=pe.MAX_MS=pe.dateTime2ms("9999-12-31 23:59:59.9999"),pe.isDateTime=function(K,Q){return pe.dateTime2ms(K,Q)!==l};function I(K,Q){return String(K+Math.pow(10,Q)).substr(1)}var N=90*u,F=3*c,k=5*p;pe.ms2DateTime=function(K,Q,J){if(typeof K!="number"||!(K>=g&&K<=C))return l;Q||(Q=0);var G=Math.floor(O(K+.05,1)*10),ee=Math.round(K-G/10),re,fe,we,Oe,ke,Le;if(E(J)){var oe=Math.floor(ee/u)+v,be=Math.floor(O(K,u));try{re=h.getComponentMethod("calendars","getCal")(J).fromJD(oe).formatDate("yyyy-mm-dd")}catch{re=m("G%Y-%m-%d")(new Date(ee))}if(re.charAt(0)==="-")for(;re.length<11;)re="-0"+re.substr(1);else for(;re.length<10;)re="0"+re;fe=Q<N?Math.floor(be/c):0,we=Q<N?Math.floor(be%c/p):0,Oe=Q<F?Math.floor(be%p/f):0,ke=Q<k?be%f*10+G:0}else Le=new Date(ee),re=m("%Y-%m-%d")(Le),fe=Q<N?Le.getUTCHours():0,we=Q<N?Le.getUTCMinutes():0,Oe=Q<F?Le.getUTCSeconds():0,ke=Q<k?Le.getUTCMilliseconds()*10+G:0;return P(re,fe,we,Oe,ke)},pe.ms2DateTimeLocal=function(K){if(!(K>=g+u&&K<=C-u))return l;var Q=Math.floor(O(K+.05,1)*10),J=new Date(Math.round(K-Q/10)),G=le("%Y-%m-%d")(J),ee=J.getHours(),re=J.getMinutes(),fe=J.getSeconds(),we=J.getUTCMilliseconds()*10+Q;return P(G,ee,re,fe,we)};function P(K,Q,J,G,ee){if((Q||J||G||ee)&&(K+=" "+I(Q,2)+":"+I(J,2),(G||ee)&&(K+=":"+I(G,2),ee))){for(var re=4;ee%10===0;)re-=1,ee/=10;K+="."+I(ee,re)}return K}pe.cleanDate=function(K,Q,J){if(K===l)return Q;if(pe.isJSDate(K)||typeof K=="number"&&isFinite(K)){if(E(J))return R.error("JS Dates and milliseconds are incompatible with world calendars",K),Q;if(K=pe.ms2DateTimeLocal(+K),!K&&Q!==void 0)return Q}else if(!pe.isDateTime(K,J))return R.error("unrecognized date",K),Q;return K};var T=/%\d?f/g,y=/%h/g,S={1:"1",2:"1",3:"2",4:"2"};function M(K,Q,J,G){K=K.replace(T,function(re){var fe=Math.min(+re.charAt(1)||6,6),we=(Q/1e3%1+2).toFixed(fe).substr(2).replace(/0+$/,"")||"0";return we});var ee=new Date(Math.floor(Q+.05));if(K=K.replace(y,function(){return S[J("%q")(ee)]}),E(G))try{K=h.getComponentMethod("calendars","worldCalFmt")(K,Q,G)}catch{return"Invalid"}return J(K)(ee)}var W=[59,59.9,59.99,59.999,59.9999];function $(K,Q){var J=O(K+.05,u),G=I(Math.floor(J/c),2)+":"+I(O(Math.floor(J/p),60),2);if(Q!=="M"){w(Q)||(Q=0);var ee=Math.min(O(K/f,60),W[Q]),re=(100+ee).toFixed(Q).substr(1);Q>0&&(re=re.replace(/0+$/,"").replace(/[\.]$/,"")),G+=":"+re}return G}pe.formatDate=function(K,Q,J,G,ee,re){if(ee=E(ee)&&ee,!Q)if(J==="y")Q=re.year;else if(J==="m")Q=re.month;else if(J==="d")Q=re.dayMonth+`
`+re.year;else return $(K,J)+`
`+M(re.dayMonthYear,K,G,ee);return M(Q,K,G,ee)};var Z=3*u;pe.incrementMonth=function(K,Q,J){J=E(J)&&J;var G=O(K,u);if(K=Math.round(K-G),J)try{var ee=Math.round(K/u)+v,re=h.getComponentMethod("calendars","getCal")(J),fe=re.fromJD(ee);return Q%12?re.add(fe,Q,"m"):re.add(fe,Q/12,"y"),(fe.toJD()-v)*u+G}catch{R.error("invalid ms "+K+" in calendar "+J)}var we=new Date(K+Z);return we.setUTCMonth(we.getUTCMonth()+Q)+G-Z},pe.findExactDates=function(K,Q){for(var J=0,G=0,ee=0,re=0,fe,we,Oe=E(Q)&&h.getComponentMethod("calendars","getCal")(Q),ke=0;ke<K.length;ke++){if(we=K[ke],!w(we)){re++;continue}if(!(we%u))if(Oe)try{fe=Oe.fromJD(we/u+v),fe.day()===1?fe.month()===1?J++:G++:ee++}catch{}else fe=new Date(we),fe.getUTCDate()===1?fe.getUTCMonth()===0?J++:G++:ee++}G+=J,ee+=G;var Le=K.length-re;return{exactYears:J/Le,exactMonths:G/Le,exactDays:ee/Le}}}}),Dn=U({"src/lib/identity.js"(pe,le){le.exports=function(R){return R}}}),ea=U({"src/lib/search.js"(pe){var le=_t(),w=gi(),R=Dn(),O=Dt().BADNUM,z=1e-9;pe.findBin=function(f,v,h){if(le(v.start))return h?Math.ceil((f-v.start)/v.size-z)-1:Math.floor((f-v.start)/v.size+z);var m=0,_=v.length,x=0,A=_>1?(v[_-1]-v[0])/(_-1):1,E,D;for(A>=0?D=h?l:u:D=h?p:c,f+=A*z*(h?-1:1)*(A>=0?1:-1);m<_&&x++<100;)E=Math.floor((m+_)/2),D(v[E],f)?m=E+1:_=E;return x>90&&w.log("Long binary search..."),m-1};function l(f,v){return f<v}function u(f,v){return f<=v}function c(f,v){return f>v}function p(f,v){return f>=v}pe.sorterAsc=function(f,v){return f-v},pe.sorterDes=function(f,v){return v-f},pe.distinctVals=function(f){var v=f.slice();v.sort(pe.sorterAsc);var h;for(h=v.length-1;h>-1&&v[h]===O;h--);for(var m=v[h]-v[0]||1,_=m/(h||1)/1e4,x=[],A,E=0;E<=h;E++){var D=v[E],g=D-A;A===void 0?(x.push(D),A=D):g>_&&(m=Math.min(m,g),x.push(D),A=D)}return{vals:x,minDiff:m}},pe.roundUp=function(f,v,h){for(var m=0,_=v.length-1,x,A=0,E=h?0:1,D=h?1:0,g=h?Math.ceil:Math.floor;m<_&&A++<100;)x=g((m+_)/2),v[x]<=f?m=x+E:_=x-D;return v[m]},pe.sort=function(f,v){for(var h=0,m=0,_=1;_<f.length;_++){var x=v(f[_],f[_-1]);if(x<0?h=1:x>0&&(m=1),h&&m)return f.sort(v)}return m?f:f.reverse()},pe.findIndexOfMin=function(f,v){v=v||R;for(var h=1/0,m,_=0;_<f.length;_++){var x=v(f[_]);x<h&&(h=x,m=_)}return m}}}),pa=U({"src/lib/sort_object_keys.js"(pe,le){le.exports=function(R){return Object.keys(R).sort()}}}),ja=U({"src/lib/stats.js"(pe){var le=_t(),w=dr().isArrayOrTypedArray;pe.aggNums=function(R,O,z,l){var u,c;if((!l||l>z.length)&&(l=z.length),le(O)||(O=!1),w(z[0])){for(c=new Array(l),u=0;u<l;u++)c[u]=pe.aggNums(R,O,z[u]);z=c}for(u=0;u<l;u++)le(O)?le(z[u])&&(O=R(+O,+z[u])):O=z[u];return O},pe.len=function(R){return pe.aggNums(function(O){return O+1},0,R)},pe.mean=function(R,O){return O||(O=pe.len(R)),pe.aggNums(function(z,l){return z+l},0,R)/O},pe.geometricMean=function(R,O){return O||(O=pe.len(R)),Math.pow(pe.aggNums(function(z,l){return z*l},1,R),1/O)},pe.midRange=function(R){if(!(R===void 0||R.length===0))return(pe.aggNums(Math.max,null,R)+pe.aggNums(Math.min,null,R))/2},pe.variance=function(R,O,z){return O||(O=pe.len(R)),le(z)||(z=pe.mean(R,O)),pe.aggNums(function(l,u){return l+Math.pow(u-z,2)},0,R)/O},pe.stdev=function(R,O,z){return Math.sqrt(pe.variance(R,O,z))},pe.median=function(R){var O=R.slice().sort();return pe.interp(O,.5)},pe.interp=function(R,O){if(!le(O))throw"n should be a finite number";if(O=O*R.length-.5,O<0)return R[0];if(O>R.length-1)return R[R.length-1];var z=O%1;return z*R[Math.ceil(O)]+(1-z)*R[Math.floor(O)]}}}),_a=U({"src/lib/angles.js"(pe,le){var w=sr(),R=w.mod,O=w.modHalf,z=Math.PI,l=2*z;function u(D){return D/180*z}function c(D){return D/z*180}function p(D){return Math.abs(D[1]-D[0])>l-1e-14}function f(D,g){return O(g-D,l)}function v(D,g){return Math.abs(f(D,g))}function h(D,g){if(p(g))return!0;var C,I;g[0]<g[1]?(C=g[0],I=g[1]):(C=g[1],I=g[0]),C=R(C,l),I=R(I,l),C>I&&(I+=l);var N=R(D,l),F=N+l;return N>=C&&N<=I||F>=C&&F<=I}function m(D,g,C,I){if(!h(g,I))return!1;var N,F;return C[0]<C[1]?(N=C[0],F=C[1]):(N=C[1],F=C[0]),D>=N&&D<=F}function _(D,g,C,I,N,F,k){N=N||0,F=F||0;var P=p([C,I]),T,y,S,M,W;P?(T=0,y=z,S=l):C<I?(T=C,S=I):(T=I,S=C),D<g?(M=D,W=g):(M=g,W=D);function $(J,G){return[J*Math.cos(G)+N,F-J*Math.sin(G)]}var Z=Math.abs(S-T)<=z?0:1;function K(J,G,ee){return"A"+[J,J]+" "+[0,Z,ee]+" "+$(J,G)}var Q;return P?M===null?Q="M"+$(W,T)+K(W,y,0)+K(W,S,0)+"Z":Q="M"+$(M,T)+K(M,y,0)+K(M,S,0)+"ZM"+$(W,T)+K(W,y,1)+K(W,S,1)+"Z":M===null?(Q="M"+$(W,T)+K(W,S,0),k&&(Q+="L0,0Z")):Q="M"+$(M,T)+"L"+$(W,T)+K(W,S,0)+"L"+$(M,S)+K(M,T,1)+"Z",Q}function x(D,g,C,I,N){return _(null,D,g,C,I,N,0)}function A(D,g,C,I,N){return _(null,D,g,C,I,N,1)}function E(D,g,C,I,N,F){return _(D,g,C,I,N,F,1)}le.exports={deg2rad:u,rad2deg:c,angleDelta:f,angleDist:v,isFullCircle:p,isAngleInsideSector:h,isPtInsideSector:m,pathArc:x,pathSector:A,pathAnnulus:E}}}),Zs=U({"src/lib/anchor_utils.js"(pe){pe.isLeftAnchor=function(w){return w.xanchor==="left"||w.xanchor==="auto"&&w.x<=1/3},pe.isCenterAnchor=function(w){return w.xanchor==="center"||w.xanchor==="auto"&&w.x>1/3&&w.x<2/3},pe.isRightAnchor=function(w){return w.xanchor==="right"||w.xanchor==="auto"&&w.x>=2/3},pe.isTopAnchor=function(w){return w.yanchor==="top"||w.yanchor==="auto"&&w.y>=2/3},pe.isMiddleAnchor=function(w){return w.yanchor==="middle"||w.yanchor==="auto"&&w.y>1/3&&w.y<2/3},pe.isBottomAnchor=function(w){return w.yanchor==="bottom"||w.yanchor==="auto"&&w.y<=1/3}}}),ks=U({"src/lib/geometry2d.js"(pe){var le=sr().mod;pe.segmentsIntersect=w;function w(u,c,p,f,v,h,m,_){var x=p-u,A=v-u,E=m-v,D=f-c,g=h-c,C=_-h,I=x*C-E*D;if(I===0)return null;var N=(A*C-E*g)/I,F=(A*D-x*g)/I;return F<0||F>1||N<0||N>1?null:{x:u+x*N,y:c+D*N}}pe.segmentDistance=function(c,p,f,v,h,m,_,x){if(w(c,p,f,v,h,m,_,x))return 0;var A=f-c,E=v-p,D=_-h,g=x-m,C=A*A+E*E,I=D*D+g*g,N=Math.min(R(A,E,C,h-c,m-p),R(A,E,C,_-c,x-p),R(D,g,I,c-h,p-m),R(D,g,I,f-h,v-m));return Math.sqrt(N)};function R(u,c,p,f,v){var h=f*u+v*c;if(h<0)return f*f+v*v;if(h>p){var m=f-u,_=v-c;return m*m+_*_}else{var x=f*c-v*u;return x*x/p}}var O,z,l;pe.getTextLocation=function(c,p,f,v){if((c!==z||v!==l)&&(O={},z=c,l=v),O[f])return O[f];var h=c.getPointAtLength(le(f-v/2,p)),m=c.getPointAtLength(le(f+v/2,p)),_=Math.atan((m.y-h.y)/(m.x-h.x)),x=c.getPointAtLength(le(f,p)),A=(x.x*4+h.x+m.x)/6,E=(x.y*4+h.y+m.y)/6,D={x:A,y:E,theta:_};return O[f]=D,D},pe.clearLocationCache=function(){z=null},pe.getVisibleSegment=function(c,p,f){var v=p.left,h=p.right,m=p.top,_=p.bottom,x=0,A=c.getTotalLength(),E=A,D,g;function C(N){var F=c.getPointAtLength(N);N===0?D=F:N===A&&(g=F);var k=F.x<v?v-F.x:F.x>h?F.x-h:0,P=F.y<m?m-F.y:F.y>_?F.y-_:0;return Math.sqrt(k*k+P*P)}for(var I=C(x);I;){if(x+=I+f,x>E)return;I=C(x)}for(I=C(E);I;){if(E-=I+f,x>E)return;I=C(E)}return{min:x,max:E,len:E-x,total:A,isClosed:x===0&&E===A&&Math.abs(D.x-g.x)<.1&&Math.abs(D.y-g.y)<.1}},pe.findPointOnPath=function(c,p,f,v){v=v||{};for(var h=v.pathLength||c.getTotalLength(),m=v.tolerance||.001,_=v.iterationLimit||30,x=c.getPointAtLength(0)[f]>c.getPointAtLength(h)[f]?-1:1,A=0,E=0,D=h,g,C,I;A<_;){if(g=(E+D)/2,C=c.getPointAtLength(g),I=C[f]-p,Math.abs(I)<m)return C;x*I>0?D=g:E=g,A++}return C}}}),el=U({"src/lib/throttle.js"(pe){var le={};pe.throttle=function(O,z,l){var u=le[O],c=Date.now();if(!u){for(var p in le)le[p].ts<c-6e4&&delete le[p];u=le[O]={ts:0,timer:null}}w(u);function f(){l(),u.ts=Date.now(),u.onDone&&(u.onDone(),u.onDone=null)}if(c>u.ts+z){f();return}u.timer=setTimeout(function(){f(),u.timer=null},z)},pe.done=function(R){var O=le[R];return!O||!O.timer?Promise.resolve():new Promise(function(z){var l=O.onDone;O.onDone=function(){l&&l(),z(),O.onDone=null}})},pe.clear=function(R){if(R)w(le[R]),delete le[R];else for(var O in le)pe.clear(O)};function w(R){R&&R.timer!==null&&(clearTimeout(R.timer),R.timer=null)}}}),ol=U({"src/lib/clear_responsive.js"(pe,le){le.exports=function(R){R._responsiveChartHandler&&(window.removeEventListener("resize",R._responsiveChartHandler),delete R._responsiveChartHandler)}}}),tl=U({"node_modules/is-mobile/index.js"(pe,le){le.exports=z,le.exports.isMobile=z,le.exports.default=z;var w=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,R=/CrOS/,O=/android|ipad|playbook|silk/i;function z(l){l||(l={});let u=l.ua;if(!u&&typeof navigator<"u"&&(u=navigator.userAgent),u&&u.headers&&typeof u.headers["user-agent"]=="string"&&(u=u.headers["user-agent"]),typeof u!="string")return!1;let c=w.test(u)&&!R.test(u)||!!l.tablet&&O.test(u);return!c&&l.tablet&&l.featureDetect&&navigator&&navigator.maxTouchPoints>1&&u.indexOf("Macintosh")!==-1&&u.indexOf("Safari")!==-1&&(c=!0),c}}}),il=U({"src/lib/preserve_drawing_buffer.js"(pe,le){var w=_t(),R=tl();le.exports=function(l){var u;if(l&&l.hasOwnProperty("userAgent")?u=l.userAgent:u=O(),typeof u!="string")return!0;var c=R({ua:{headers:{"user-agent":u}},tablet:!0,featureDetect:!1});if(!c)for(var p=u.split(" "),f=1;f<p.length;f++){var v=p[f];if(v.indexOf("Safari")!==-1)for(var h=f-1;h>-1;h--){var m=p[h];if(m.substr(0,8)==="Version/"){var _=m.substr(8).split(".")[0];if(w(_)&&(_=+_),_>=13)return!0}}}return c};function O(){var z;return typeof navigator<"u"&&(z=navigator.userAgent),z&&z.headers&&typeof z.headers["user-agent"]=="string"&&(z=z.headers["user-agent"]),z}}}),Gl=U({"src/lib/make_trace_groups.js"(pe,le){var w=Ze();le.exports=function(O,z,l){var u=O.selectAll("g."+l.replace(/\s/g,".")).data(z,function(p){return p[0].trace.uid});u.exit().remove(),u.enter().append("g").attr("class",l),u.order();var c=O.classed("rangeplot")?"nodeRangePlot3":"node3";return u.each(function(p){p[0][c]=w.select(this)}),u}}}),Qu=U({"src/lib/localize.js"(pe,le){var w=Mi();le.exports=function(O,z){for(var l=O._context.locale,u=0;u<2;u++){for(var c=O._context.locales,p=0;p<2;p++){var f=(c[l]||{}).dictionary;if(f){var v=f[z];if(v)return v}c=w.localeRegistry}var h=l.split("-")[0];if(h===l)break;l=h}return z}}}),ic=U({"src/lib/filter_unique.js"(pe,le){le.exports=function(R){for(var O={},z=[],l=0,u=0;u<R.length;u++){var c=R[u];O[c]!==1&&(O[c]=1,z[l++]=c)}return z}}}),rf=U({"src/lib/filter_visible.js"(pe,le){le.exports=function(l){for(var u=O(l)?R:w,c=[],p=0;p<l.length;p++){var f=l[p];u(f)&&c.push(f)}return c};function w(z){return z.visible===!0}function R(z){var l=z[0].trace;return l.visible===!0&&l._length!==0}function O(z){return Array.isArray(z)&&Array.isArray(z[0])&&z[0][0]&&z[0][0].trace}}}),Sd=U({"src/lib/increment.js"(pe,le){le.exports=function(R,O){if(!O)return R;var z=1/Math.abs(O),l=z>1?(z*R+z*O)/z:R+O,u=String(l).length;if(u>16){var c=String(O).length,p=String(R).length;if(u>=p+c){var f=parseFloat(l).toPrecision(12);f.indexOf("e+")===-1&&(l=+f)}}return l}}}),yc=U({"src/lib/clean_number.js"(pe,le){var w=_t(),R=Dt().BADNUM,O=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;le.exports=function(l){return typeof l=="string"&&(l=l.replace(O,"")),w(l)?Number(l):R}}}),ii=U({"src/lib/index.js"(pe,le){var w=Ze(),R=nt().utcFormat,O=ut().format,z=_t(),l=Dt(),u=l.FP_SAFE,c=-u,p=l.BADNUM,f=le.exports={};f.adjustFormat=function(se){return!se||/^\d[.]\df/.test(se)||/[.]\d%/.test(se)?se:se==="0.f"?"~f":/^\d%/.test(se)?"~%":/^\ds/.test(se)?"~s":!/^[~,.0$]/.test(se)&&/[&fps]/.test(se)?"~"+se:se};var v={};f.warnBadFormat=function(xe){var se=String(xe);v[se]||(v[se]=1,f.warn('encountered bad format: "'+se+'"'))},f.noFormat=function(xe){return String(xe)},f.numberFormat=function(xe){var se;try{se=O(f.adjustFormat(xe))}catch{return f.warnBadFormat(xe),f.noFormat}return se},f.nestedProperty=Zt(),f.keyedContainer=Cr(),f.relativeAttr=yt(),f.isPlainObject=Lt(),f.toLogRange=Vt(),f.relinkPrivateKeys=Er();var h=dr();f.isArrayBuffer=h.isArrayBuffer,f.isTypedArray=h.isTypedArray,f.isArrayOrTypedArray=h.isArrayOrTypedArray,f.isArray1D=h.isArray1D,f.ensureArray=h.ensureArray,f.concat=h.concat,f.maxRowLength=h.maxRowLength,f.minRowLength=h.minRowLength;var m=sr();f.mod=m.mod,f.modHalf=m.modHalf;var _=Sn();f.valObjectMeta=_.valObjectMeta,f.coerce=_.coerce,f.coerce2=_.coerce2,f.coerceFont=_.coerceFont,f.coercePattern=_.coercePattern,f.coerceHoverinfo=_.coerceHoverinfo,f.coerceSelectionMarkerOpacity=_.coerceSelectionMarkerOpacity,f.validate=_.validate;var x=to();f.dateTime2ms=x.dateTime2ms,f.isDateTime=x.isDateTime,f.ms2DateTime=x.ms2DateTime,f.ms2DateTimeLocal=x.ms2DateTimeLocal,f.cleanDate=x.cleanDate,f.isJSDate=x.isJSDate,f.formatDate=x.formatDate,f.incrementMonth=x.incrementMonth,f.dateTick0=x.dateTick0,f.dfltRange=x.dfltRange,f.findExactDates=x.findExactDates,f.MIN_MS=x.MIN_MS,f.MAX_MS=x.MAX_MS;var A=ea();f.findBin=A.findBin,f.sorterAsc=A.sorterAsc,f.sorterDes=A.sorterDes,f.distinctVals=A.distinctVals,f.roundUp=A.roundUp,f.sort=A.sort,f.findIndexOfMin=A.findIndexOfMin,f.sortObjectKeys=pa();var E=ja();f.aggNums=E.aggNums,f.len=E.len,f.mean=E.mean,f.geometricMean=E.geometricMean,f.median=E.median,f.midRange=E.midRange,f.variance=E.variance,f.stdev=E.stdev,f.interp=E.interp;var D=_s();f.init2dArray=D.init2dArray,f.transposeRagged=D.transposeRagged,f.dot=D.dot,f.translationMatrix=D.translationMatrix,f.rotationMatrix=D.rotationMatrix,f.rotationXYMatrix=D.rotationXYMatrix,f.apply3DTransform=D.apply3DTransform,f.apply2DTransform=D.apply2DTransform,f.apply2DTransform2=D.apply2DTransform2,f.convertCssMatrix=D.convertCssMatrix,f.inverseTransformMatrix=D.inverseTransformMatrix;var g=_a();f.deg2rad=g.deg2rad,f.rad2deg=g.rad2deg,f.angleDelta=g.angleDelta,f.angleDist=g.angleDist,f.isFullCircle=g.isFullCircle,f.isAngleInsideSector=g.isAngleInsideSector,f.isPtInsideSector=g.isPtInsideSector,f.pathArc=g.pathArc,f.pathSector=g.pathSector,f.pathAnnulus=g.pathAnnulus;var C=Zs();f.isLeftAnchor=C.isLeftAnchor,f.isCenterAnchor=C.isCenterAnchor,f.isRightAnchor=C.isRightAnchor,f.isTopAnchor=C.isTopAnchor,f.isMiddleAnchor=C.isMiddleAnchor,f.isBottomAnchor=C.isBottomAnchor;var I=ks();f.segmentsIntersect=I.segmentsIntersect,f.segmentDistance=I.segmentDistance,f.getTextLocation=I.getTextLocation,f.clearLocationCache=I.clearLocationCache,f.getVisibleSegment=I.getVisibleSegment,f.findPointOnPath=I.findPointOnPath;var N=Ar();f.extendFlat=N.extendFlat,f.extendDeep=N.extendDeep,f.extendDeepAll=N.extendDeepAll,f.extendDeepNoArrays=N.extendDeepNoArrays;var F=gi();f.log=F.log,f.warn=F.warn,f.error=F.error;var k=On();f.counterRegex=k.counter;var P=el();f.throttle=P.throttle,f.throttleDone=P.done,f.clearThrottle=P.clear;var T=nl();f.getGraphDiv=T.getGraphDiv,f.isPlotDiv=T.isPlotDiv,f.removeElement=T.removeElement,f.addStyleRule=T.addStyleRule,f.addRelatedStyleRule=T.addRelatedStyleRule,f.deleteRelatedStyleRule=T.deleteRelatedStyleRule,f.setStyleOnHover=T.setStyleOnHover,f.getFullTransformMatrix=T.getFullTransformMatrix,f.getElementTransformMatrix=T.getElementTransformMatrix,f.getElementAndAncestors=T.getElementAndAncestors,f.equalDomRects=T.equalDomRects,f.clearResponsive=ol(),f.preserveDrawingBuffer=il(),f.makeTraceGroups=Gl(),f._=Qu(),f.notifier=Mn(),f.filterUnique=ic(),f.filterVisible=rf(),f.pushUnique=Pa(),f.increment=Sd(),f.cleanNumber=yc(),f.ensureNumber=function(se){return z(se)?(se=Number(se),se>u||se<c?p:se):p},f.isIndex=function(xe,se){return se!==void 0&&xe>=se?!1:z(xe)&&xe>=0&&xe%1===0},f.noop=Oi(),f.identity=Dn(),f.repeat=function(xe,se){for(var Ee=new Array(se),Te=0;Te<se;Te++)Ee[Te]=xe;return Ee},f.swapAttrs=function(xe,se,Ee,Te){Ee||(Ee="x"),Te||(Te="y");for(var Be=0;Be<se.length;Be++){var tt=se[Be],at=f.nestedProperty(xe,tt.replace("?",Ee)),gt=f.nestedProperty(xe,tt.replace("?",Te)),pt=at.get();at.set(gt.get()),gt.set(pt)}},f.raiseToTop=function(se){se.parentNode.appendChild(se)},f.cancelTransition=function(xe){return xe.transition().duration(0)},f.constrain=function(xe,se,Ee){return se>Ee?Math.max(Ee,Math.min(se,xe)):Math.max(se,Math.min(Ee,xe))},f.bBoxIntersect=function(xe,se,Ee){return Ee=Ee||0,xe.left<=se.right+Ee&&se.left<=xe.right+Ee&&xe.top<=se.bottom+Ee&&se.top<=xe.bottom+Ee},f.simpleMap=function(xe,se,Ee,Te,Be){for(var tt=xe.length,at=new Array(tt),gt=0;gt<tt;gt++)at[gt]=se(xe[gt],Ee,Te,Be);return at},f.randstr=function xe(se,Ee,Te,Be){if(Te||(Te=16),Ee===void 0&&(Ee=24),Ee<=0)return"0";var tt=Math.log(Math.pow(2,Ee))/Math.log(Te),at="",gt,pt,Rt;for(gt=2;tt===1/0;gt*=2)tt=Math.log(Math.pow(2,Ee/gt))/Math.log(Te)*gt;var $t=tt-Math.floor(tt);for(gt=0;gt<Math.floor(tt);gt++)Rt=Math.floor(Math.random()*Te).toString(Te),at=Rt+at;$t&&(pt=Math.pow(Te,$t),Rt=Math.floor(Math.random()*pt).toString(Te),at=Rt+at);var Wt=parseInt(at,Te);return se&&se[at]||Wt!==1/0&&Wt>=Math.pow(2,Ee)?Be>10?(f.warn("randstr failed uniqueness"),at):xe(se,Ee,Te,(Be||0)+1):at},f.OptionControl=function(xe,se){xe||(xe={}),se||(se="opt");var Ee={};return Ee.optionList=[],Ee._newoption=function(Te){Te[se]=xe,Ee[Te.name]=Te,Ee.optionList.push(Te)},Ee["_"+se]=xe,Ee},f.smooth=function(xe,se){if(se=Math.round(se)||0,se<2)return xe;var Ee=xe.length,Te=2*Ee,Be=2*se-1,tt=new Array(Be),at=new Array(Ee),gt,pt,Rt,$t;for(gt=0;gt<Be;gt++)tt[gt]=(1-Math.cos(Math.PI*(gt+1)/se))/(2*se);for(gt=0;gt<Ee;gt++){for($t=0,pt=0;pt<Be;pt++)Rt=gt+pt+1-se,Rt<-Ee?Rt-=Te*Math.round(Rt/Te):Rt>=Te&&(Rt-=Te*Math.floor(Rt/Te)),Rt<0?Rt=-1-Rt:Rt>=Ee&&(Rt=Te-1-Rt),$t+=xe[Rt]*tt[pt];at[gt]=$t}return at},f.syncOrAsync=function(xe,se,Ee){var Te,Be;function tt(){return f.syncOrAsync(xe,se,Ee)}for(;xe.length;)if(Be=xe.splice(0,1)[0],Te=Be(se),Te&&Te.then)return Te.then(tt);return Ee&&Ee(se)},f.stripTrailingSlash=function(xe){return xe.substr(-1)==="/"?xe.substr(0,xe.length-1):xe},f.noneOrAll=function(xe,se,Ee){if(xe){var Te=!1,Be=!0,tt,at;for(tt=0;tt<Ee.length;tt++)at=xe[Ee[tt]],at!=null?Te=!0:Be=!1;if(Te&&!Be)for(tt=0;tt<Ee.length;tt++)xe[Ee[tt]]=se[Ee[tt]]}},f.mergeArray=function(xe,se,Ee,Te){var Be=typeof Te=="function";if(f.isArrayOrTypedArray(xe))for(var tt=Math.min(xe.length,se.length),at=0;at<tt;at++){var gt=xe[at];se[at][Ee]=Be?Te(gt):gt}},f.mergeArrayCastPositive=function(xe,se,Ee){return f.mergeArray(xe,se,Ee,function(Te){var Be=+Te;return isFinite(Be)&&Be>0?Be:0})},f.fillArray=function(xe,se,Ee,Te){if(Te=Te||f.identity,f.isArrayOrTypedArray(xe))for(var Be=0;Be<se.length;Be++)se[Be][Ee]=Te(xe[Be])},f.castOption=function(xe,se,Ee,Te){Te=Te||f.identity;var Be=f.nestedProperty(xe,Ee).get();return f.isArrayOrTypedArray(Be)?Array.isArray(se)&&f.isArrayOrTypedArray(Be[se[0]])?Te(Be[se[0]][se[1]]):Te(Be[se]):Be},f.extractOption=function(xe,se,Ee,Te){if(Ee in xe)return xe[Ee];var Be=f.nestedProperty(se,Te).get();if(!Array.isArray(Be))return Be};function y(xe){var se={};for(var Ee in xe)for(var Te=xe[Ee],Be=0;Be<Te.length;Be++)se[Te[Be]]=+Ee;return se}f.tagSelected=function(xe,se,Ee){var Te=se.selectedpoints,Be=se._indexToPoints,tt;Be&&(tt=y(Be));function at(Wt){return Wt!==void 0&&Wt<xe.length}for(var gt=0;gt<Te.length;gt++){var pt=Te[gt];if(f.isIndex(pt)||f.isArrayOrTypedArray(pt)&&f.isIndex(pt[0])&&f.isIndex(pt[1])){var Rt=tt?tt[pt]:pt,$t=Ee?Ee[Rt]:Rt;at($t)&&(xe[$t].selected=1)}}},f.selIndices2selPoints=function(xe){var se=xe.selectedpoints,Ee=xe._indexToPoints;if(Ee){for(var Te=y(Ee),Be=[],tt=0;tt<se.length;tt++){var at=se[tt];if(f.isIndex(at)){var gt=Te[at];f.isIndex(gt)&&Be.push(gt)}}return Be}else return se},f.getTargetArray=function(xe,se){var Ee=se.target;if(typeof Ee=="string"&&Ee){var Te=f.nestedProperty(xe,Ee).get();return f.isArrayOrTypedArray(Te)?Te:!1}else if(f.isArrayOrTypedArray(Ee))return Ee;return!1};function S(xe,se,Ee){var Te={};typeof se!="object"&&(se={});var Be=Ee==="pieLike"?-1:3,tt=Object.keys(xe),at,gt,pt;for(at=0;at<tt.length;at++)gt=tt[at],pt=xe[gt],!(gt.charAt(0)==="_"||typeof pt=="function")&&(gt==="module"?Te[gt]=pt:Array.isArray(pt)?gt==="colorscale"||Be===-1?Te[gt]=pt.slice():Te[gt]=pt.slice(0,Be):f.isTypedArray(pt)?Be===-1?Te[gt]=pt.subarray():Te[gt]=pt.subarray(0,Be):pt&&typeof pt=="object"?Te[gt]=S(xe[gt],se[gt],Ee):Te[gt]=pt);for(tt=Object.keys(se),at=0;at<tt.length;at++)gt=tt[at],pt=se[gt],(typeof pt!="object"||!(gt in Te)||typeof Te[gt]!="object")&&(Te[gt]=pt);return Te}f.minExtend=S,f.titleCase=function(xe){return xe.charAt(0).toUpperCase()+xe.substr(1)},f.containsAny=function(xe,se){for(var Ee=0;Ee<se.length;Ee++)if(xe.indexOf(se[Ee])!==-1)return!0;return!1};var M=/Version\/[\d\.]+.*Safari/;f.isSafari=function(){return M.test(window.navigator.userAgent)};var W=/iPad|iPhone|iPod/;f.isIOS=function(){return W.test(window.navigator.userAgent)};var $=/Macintosh.+AppleWebKit.+Gecko\)$/;f.isMacWKWebView=()=>$.test(window.navigator.userAgent);var Z=/Firefox\/(\d+)\.\d+/;f.getFirefoxVersion=function(){var xe=Z.exec(window.navigator.userAgent);if(xe&&xe.length===2){var se=parseInt(xe[1]);if(!isNaN(se))return se}return null},f.isD3Selection=function(xe){return xe instanceof w.selection},f.ensureSingle=function(xe,se,Ee,Te){var Be=xe.select(se+(Ee?"."+Ee:""));if(Be.size())return Be;var tt=xe.append(se);return Ee&&tt.classed(Ee,!0),Te&&tt.call(Te),tt},f.ensureSingleById=function(xe,se,Ee,Te){var Be=xe.select(se+"#"+Ee);if(Be.size())return Be;var tt=xe.append(se).attr("id",Ee);return Te&&tt.call(Te),tt},f.objectFromPath=function(xe,se){for(var Ee=xe.split("."),Te,Be=Te={},tt=0;tt<Ee.length;tt++){var at=Ee[tt],gt=null,pt=Ee[tt].match(/(.*)\[([0-9]+)\]/);pt?(at=pt[1],gt=pt[2],Te=Te[at]=[],tt===Ee.length-1?Te[gt]=se:Te[gt]={},Te=Te[gt]):(tt===Ee.length-1?Te[at]=se:Te[at]={},Te=Te[at])}return Be};var K=/^([^\[\.]+)\.(.+)?/,Q=/^([^\.]+)\[([0-9]+)\](\.)?(.+)?/;function J(xe){return xe.slice(0,2)==="__"}f.expandObjectPaths=function(xe){var se,Ee,Te,Be,tt,at,gt;if(typeof xe=="object"&&!Array.isArray(xe)){for(Ee in xe)if(xe.hasOwnProperty(Ee))if(se=Ee.match(K)){if(Be=xe[Ee],Te=se[1],J(Te))continue;delete xe[Ee],xe[Te]=f.extendDeepNoArrays(xe[Te]||{},f.objectFromPath(Ee,f.expandObjectPaths(Be))[Te])}else if(se=Ee.match(Q)){if(Be=xe[Ee],Te=se[1],J(Te))continue;if(tt=parseInt(se[2]),delete xe[Ee],xe[Te]=xe[Te]||[],se[3]===".")gt=se[4],at=xe[Te][tt]=xe[Te][tt]||{},f.extendDeepNoArrays(at,f.objectFromPath(gt,f.expandObjectPaths(Be)));else{if(J(Te))continue;xe[Te][tt]=f.expandObjectPaths(Be)}}else{if(J(Ee))continue;xe[Ee]=f.expandObjectPaths(xe[Ee])}}return xe},f.numSeparate=function(xe,se,Ee){if(Ee||(Ee=!1),typeof se!="string"||se.length===0)throw new Error("Separator string required for formatting!");typeof xe=="number"&&(xe=String(xe));var Te=/(\d+)(\d{3})/,Be=se.charAt(0),tt=se.charAt(1),at=xe.split("."),gt=at[0],pt=at.length>1?Be+at[1]:"";if(tt&&(at.length>1||gt.length>4||Ee))for(;Te.test(gt);)gt=gt.replace(Te,"$1"+tt+"$2");return gt+pt},f.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var G=/^\w*$/;f.templateString=function(xe,se){var Ee={};return xe.replace(f.TEMPLATE_STRING_REGEX,function(Te,Be){var tt;return G.test(Be)?tt=se[Be]:(Ee[Be]=Ee[Be]||f.nestedProperty(se,Be).get,tt=Ee[Be](!0)),tt!==void 0?tt:""})};var ee={max:10,count:0,name:"hovertemplate"};f.hovertemplateString=function(){return Le.apply(ee,arguments)};var re={max:10,count:0,name:"texttemplate"};f.texttemplateString=function(){return Le.apply(re,arguments)};var fe=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function we(xe){var se=xe.match(fe);return se?{key:se[1],op:se[2],number:Number(se[3])}:{key:xe,op:null,number:null}}var Oe={max:10,count:0,name:"texttemplate",parseMultDiv:!0};f.texttemplateStringForShapes=function(){return Le.apply(Oe,arguments)};var ke=/^[:|\|]/;function Le(xe,se,Ee){var Te=this,Be=arguments;return se||(se={}),xe.replace(f.TEMPLATE_STRING_REGEX,function(tt,at,gt){var pt=at==="xother"||at==="yother",Rt=at==="_xother"||at==="_yother",$t=at==="_xother_"||at==="_yother_",Wt=at==="xother_"||at==="yother_",Ht=pt||Rt||Wt||$t,Ft=at;(Rt||$t)&&(Ft=Ft.substring(1)),(Wt||$t)&&(Ft=Ft.substring(0,Ft.length-1));var st=null,rt=null;if(Te.parseMultDiv){var Ue=we(Ft);Ft=Ue.key,st=Ue.op,rt=Ue.number}var xt;if(Ht){if(xt=se[Ft],xt===void 0)return""}else{var Gt,Jt;for(Jt=3;Jt<Be.length;Jt++)if(Gt=Be[Jt],!!Gt){if(Gt.hasOwnProperty(Ft)){xt=Gt[Ft];break}if(G.test(Ft)||(xt=f.nestedProperty(Gt,Ft).get(!0)),xt!==void 0)break}}if(xt!==void 0&&(st==="*"&&(xt*=rt),st==="/"&&(xt/=rt)),xt===void 0&&Te)return Te.count<Te.max&&(f.warn("Variable '"+Ft+"' in "+Te.name+" could not be found!"),xt=tt),Te.count===Te.max&&f.warn("Too many "+Te.name+" warnings - additional warnings will be suppressed"),Te.count++,tt;if(gt){var Ut;if(gt[0]===":"&&(Ut=Ee?Ee.numberFormat:f.numberFormat,xt!==""&&(xt=Ut(gt.replace(ke,""))(xt))),gt[0]==="|"){Ut=Ee?Ee.timeFormat:R;var kr=f.dateTime2ms(xt);xt=f.formatDate(kr,gt.replace(ke,""),!1,Ut)}}else{var Pr=Ft+"Label";se.hasOwnProperty(Pr)&&(xt=se[Pr])}return Ht&&(xt="("+xt+")",(Rt||$t)&&(xt=" "+xt),(Wt||$t)&&(xt=xt+" ")),xt})}var oe=48,be=57;f.subplotSort=function(xe,se){for(var Ee=Math.min(xe.length,se.length)+1,Te=0,Be=0,tt=0;tt<Ee;tt++){var at=xe.charCodeAt(tt)||0,gt=se.charCodeAt(tt)||0,pt=at>=oe&&at<=be,Rt=gt>=oe&&gt<=be;if(pt&&(Te=10*Te+at-oe),Rt&&(Be=10*Be+gt-oe),!pt||!Rt){if(Te!==Be)return Te-Be;if(at!==gt)return at-gt}}return Be-Te};var _e=2e9;f.seedPseudoRandom=function(){_e=2e9},f.pseudoRandom=function(){var xe=_e;return _e=(69069*_e+1)%4294967296,Math.abs(_e-xe)<429496729?f.pseudoRandom():_e/4294967296},f.fillText=function(xe,se,Ee){var Te=Array.isArray(Ee)?function(at){Ee.push(at)}:function(at){Ee.text=at},Be=f.extractOption(xe,se,"htx","hovertext");if(f.isValidTextValue(Be))return Te(Be);var tt=f.extractOption(xe,se,"tx","text");if(f.isValidTextValue(tt))return Te(tt)},f.isValidTextValue=function(xe){return xe||xe===0},f.formatPercent=function(xe,se){se=se||0;for(var Ee=(Math.round(100*xe*Math.pow(10,se))*Math.pow(.1,se)).toFixed(se)+"%",Te=0;Te<se;Te++)Ee.indexOf(".")!==-1&&(Ee=Ee.replace("0%","%"),Ee=Ee.replace(".%","%"));return Ee},f.isHidden=function(xe){var se=window.getComputedStyle(xe).display;return!se||se==="none"},f.strTranslate=function(xe,se){return xe||se?"translate("+xe+","+se+")":""},f.strRotate=function(xe){return xe?"rotate("+xe+")":""},f.strScale=function(xe){return xe!==1?"scale("+xe+")":""},f.getTextTransform=function(xe){var se=xe.noCenter,Ee=xe.textX,Te=xe.textY,Be=xe.targetX,tt=xe.targetY,at=xe.anchorX||0,gt=xe.anchorY||0,pt=xe.rotate,Rt=xe.scale;return Rt?Rt>1&&(Rt=1):Rt=0,f.strTranslate(Be-Rt*(Ee+at),tt-Rt*(Te+gt))+f.strScale(Rt)+(pt?"rotate("+pt+(se?"":" "+Ee+" "+Te)+")":"")},f.setTransormAndDisplay=function(xe,se){xe.attr("transform",f.getTextTransform(se)),xe.style("display",se.scale?null:"none")},f.ensureUniformFontSize=function(xe,se){var Ee=f.extendFlat({},se);return Ee.size=Math.max(se.size,xe._fullLayout.uniformtext.minsize||0),Ee},f.join2=function(xe,se,Ee){var Te=xe.length;return Te>1?xe.slice(0,-1).join(se)+Ee+xe[Te-1]:xe.join(se)},f.bigFont=function(xe){return Math.round(1.2*xe)};var he=f.getFirefoxVersion(),De=he!==null&&he<86;f.getPositionFromD3Event=function(){return De?[w.event.layerX,w.event.layerY]:[w.event.offsetX,w.event.offsetY]}}}),xh=U({"build/plotcss.js"(){var pe=ii(),le={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding: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(R in le)w=R.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),pe.addStyleRule(w,le[R]);var w,R}}),pd=U({"node_modules/is-browser/client.js"(pe,le){le.exports=!0}}),Ip=U({"node_modules/has-hover/index.js"(pe,le){var w=pd(),R;typeof window.matchMedia=="function"?R=!window.matchMedia("(hover: none)").matches:R=w,le.exports=R}}),jf=U({"node_modules/events/events.js"(pe,le){var w=typeof Reflect=="object"?Reflect:null,R=w&&typeof w.apply=="function"?w.apply:function(F,k,P){return Function.prototype.apply.call(F,k,P)},O;w&&typeof w.ownKeys=="function"?O=w.ownKeys:Object.getOwnPropertySymbols?O=function(F){return Object.getOwnPropertyNames(F).concat(Object.getOwnPropertySymbols(F))}:O=function(F){return Object.getOwnPropertyNames(F)};function z(N){console&&console.warn&&console.warn(N)}var l=Number.isNaN||function(F){return F!==F};function u(){u.init.call(this)}le.exports=u,le.exports.once=g,u.EventEmitter=u,u.prototype._events=void 0,u.prototype._eventsCount=0,u.prototype._maxListeners=void 0;var c=10;function p(N){if(typeof N!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof N)}Object.defineProperty(u,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(N){if(typeof N!="number"||N<0||l(N))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+N+".");c=N}}),u.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},u.prototype.setMaxListeners=function(F){if(typeof F!="number"||F<0||l(F))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+F+".");return this._maxListeners=F,this};function f(N){return N._maxListeners===void 0?u.defaultMaxListeners:N._maxListeners}u.prototype.getMaxListeners=function(){return f(this)},u.prototype.emit=function(F){for(var k=[],P=1;P<arguments.length;P++)k.push(arguments[P]);var T=F==="error",y=this._events;if(y!==void 0)T=T&&y.error===void 0;else if(!T)return!1;if(T){var S;if(k.length>0&&(S=k[0]),S instanceof Error)throw S;var M=new Error("Unhandled error."+(S?" ("+S.message+")":""));throw M.context=S,M}var W=y[F];if(W===void 0)return!1;if(typeof W=="function")R(W,this,k);else for(var $=W.length,Z=A(W,$),P=0;P<$;++P)R(Z[P],this,k);return!0};function v(N,F,k,P){var T,y,S;if(p(k),y=N._events,y===void 0?(y=N._events=Object.create(null),N._eventsCount=0):(y.newListener!==void 0&&(N.emit("newListener",F,k.listener?k.listener:k),y=N._events),S=y[F]),S===void 0)S=y[F]=k,++N._eventsCount;else if(typeof S=="function"?S=y[F]=P?[k,S]:[S,k]:P?S.unshift(k):S.push(k),T=f(N),T>0&&S.length>T&&!S.warned){S.warned=!0;var M=new Error("Possible EventEmitter memory leak detected. "+S.length+" "+String(F)+" listeners added. Use emitter.setMaxListeners() to increase limit");M.name="MaxListenersExceededWarning",M.emitter=N,M.type=F,M.count=S.length,z(M)}return N}u.prototype.addListener=function(F,k){return v(this,F,k,!1)},u.prototype.on=u.prototype.addListener,u.prototype.prependListener=function(F,k){return v(this,F,k,!0)};function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function m(N,F,k){var P={fired:!1,wrapFn:void 0,target:N,type:F,listener:k},T=h.bind(P);return T.listener=k,P.wrapFn=T,T}u.prototype.once=function(F,k){return p(k),this.on(F,m(this,F,k)),this},u.prototype.prependOnceListener=function(F,k){return p(k),this.prependListener(F,m(this,F,k)),this},u.prototype.removeListener=function(F,k){var P,T,y,S,M;if(p(k),T=this._events,T===void 0)return this;if(P=T[F],P===void 0)return this;if(P===k||P.listener===k)--this._eventsCount===0?this._events=Object.create(null):(delete T[F],T.removeListener&&this.emit("removeListener",F,P.listener||k));else if(typeof P!="function"){for(y=-1,S=P.length-1;S>=0;S--)if(P[S]===k||P[S].listener===k){M=P[S].listener,y=S;break}if(y<0)return this;y===0?P.shift():E(P,y),P.length===1&&(T[F]=P[0]),T.removeListener!==void 0&&this.emit("removeListener",F,M||k)}return this},u.prototype.off=u.prototype.removeListener,u.prototype.removeAllListeners=function(F){var k,P,T;if(P=this._events,P===void 0)return this;if(P.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):P[F]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete P[F]),this;if(arguments.length===0){var y=Object.keys(P),S;for(T=0;T<y.length;++T)S=y[T],S!=="removeListener"&&this.removeAllListeners(S);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(k=P[F],typeof k=="function")this.removeListener(F,k);else if(k!==void 0)for(T=k.length-1;T>=0;T--)this.removeListener(F,k[T]);return this};function _(N,F,k){var P=N._events;if(P===void 0)return[];var T=P[F];return T===void 0?[]:typeof T=="function"?k?[T.listener||T]:[T]:k?D(T):A(T,T.length)}u.prototype.listeners=function(F){return _(this,F,!0)},u.prototype.rawListeners=function(F){return _(this,F,!1)},u.listenerCount=function(N,F){return typeof N.listenerCount=="function"?N.listenerCount(F):x.call(N,F)},u.prototype.listenerCount=x;function x(N){var F=this._events;if(F!==void 0){var k=F[N];if(typeof k=="function")return 1;if(k!==void 0)return k.length}return 0}u.prototype.eventNames=function(){return this._eventsCount>0?O(this._events):[]};function A(N,F){for(var k=new Array(F),P=0;P<F;++P)k[P]=N[P];return k}function E(N,F){for(;F+1<N.length;F++)N[F]=N[F+1];N.pop()}function D(N){for(var F=new Array(N.length),k=0;k<F.length;++k)F[k]=N[k].listener||N[k];return F}function g(N,F){return new Promise(function(k,P){function T(S){N.removeListener(F,y),P(S)}function y(){typeof N.removeListener=="function"&&N.removeListener("error",T),k([].slice.call(arguments))}I(N,F,y,{once:!0}),F!=="error"&&C(N,T,{once:!0})})}function C(N,F,k){typeof N.on=="function"&&I(N,"error",F,k)}function I(N,F,k,P){if(typeof N.on=="function")P.once?N.once(F,k):N.on(F,k);else if(typeof N.addEventListener=="function")N.addEventListener(F,function T(y){P.once&&N.removeEventListener(F,T),k(y)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof N)}}}),ih=U({"src/lib/events.js"(pe,le){var w=jf().EventEmitter,R={init:function(O){if(O._ev instanceof w)return O;var z=new w,l=new w;return O._ev=z,O._internalEv=l,O.on=z.on.bind(z),O.once=z.once.bind(z),O.removeListener=z.removeListener.bind(z),O.removeAllListeners=z.removeAllListeners.bind(z),O._internalOn=l.on.bind(l),O._internalOnce=l.once.bind(l),O._removeInternalListener=l.removeListener.bind(l),O._removeAllInternalListeners=l.removeAllListeners.bind(l),O.emit=function(u,c){z.emit(u,c),l.emit(u,c)},typeof O.addEventListener=="function"&&O.addEventListener("wheel",()=>{},{passive:!0}),O},triggerHandler:function(O,z,l){var u,c=O._ev;if(!c)return;var p=c._events[z];if(!p)return;function f(h){if(h.listener){if(c.removeListener(z,h.listener),!h.fired)return h.fired=!0,h.listener.apply(c,[l])}else return h.apply(c,[l])}p=Array.isArray(p)?p:[p];var v;for(v=0;v<p.length-1;v++)f(p[v]);return u=f(p[v]),u},purge:function(O){return delete O._ev,delete O.on,delete O.once,delete O.removeListener,delete O.removeAllListeners,delete O.emit,delete O._ev,delete O._internalEv,delete O._internalOn,delete O._internalOnce,delete O._removeInternalListener,delete O._removeAllInternalListeners,O}};le.exports=R}}),Td=U({"src/lib/queue.js"(pe,le){var w=ii(),R=bn().dfltConfig;function O(l,u){for(var c=[],p,f=0;f<u.length;f++)p=u[f],p===l?c[f]=p:typeof p=="object"?c[f]=Array.isArray(p)?w.extendDeep([],p):w.extendDeepAll({},p):c[f]=p;return c}var z={};z.add=function(l,u,c,p,f){var v,h;if(l.undoQueue=l.undoQueue||{index:0,queue:[],sequence:!1},h=l.undoQueue.index,l.autoplay){l.undoQueue.inSequence||(l.autoplay=!1);return}!l.undoQueue.sequence||l.undoQueue.beginSequence?(v={undo:{calls:[],args:[]},redo:{calls:[],args:[]}},l.undoQueue.queue.splice(h,l.undoQueue.queue.length-h,v),l.undoQueue.index+=1):v=l.undoQueue.queue[h-1],l.undoQueue.beginSequence=!1,v&&(v.undo.calls.unshift(u),v.undo.args.unshift(c),v.redo.calls.push(p),v.redo.args.push(f)),l.undoQueue.queue.length>R.queueLength&&(l.undoQueue.queue.shift(),l.undoQueue.index--)},z.startSequence=function(l){l.undoQueue=l.undoQueue||{index:0,queue:[],sequence:!1},l.undoQueue.sequence=!0,l.undoQueue.beginSequence=!0},z.stopSequence=function(l){l.undoQueue=l.undoQueue||{index:0,queue:[],sequence:!1},l.undoQueue.sequence=!1,l.undoQueue.beginSequence=!1},z.undo=function(u){var c,p;if(!(u.undoQueue===void 0||isNaN(u.undoQueue.index)||u.undoQueue.index<=0)){for(u.undoQueue.index--,c=u.undoQueue.queue[u.undoQueue.index],u.undoQueue.inSequence=!0,p=0;p<c.undo.calls.length;p++)z.plotDo(u,c.undo.calls[p],c.undo.args[p]);u.undoQueue.inSequence=!1,u.autoplay=!1}},z.redo=function(u){var c,p;if(!(u.undoQueue===void 0||isNaN(u.undoQueue.index)||u.undoQueue.index>=u.undoQueue.queue.length)){for(c=u.undoQueue.queue[u.undoQueue.index],u.undoQueue.inSequence=!0,p=0;p<c.redo.calls.length;p++)z.plotDo(u,c.redo.calls[p],c.redo.args[p]);u.undoQueue.inSequence=!1,u.autoplay=!1,u.undoQueue.index++}},z.plotDo=function(l,u,c){l.autoplay=!0,c=O(l,c),u.apply(null,c)},le.exports=z}}),Yc=U({"src/plots/frame_attributes.js"(pe,le){le.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}}}),ep=U({"src/plot_api/plot_schema.js"(pe){var le=Mi(),w=ii(),R=Jn(),O=ts(),z=Yc(),l=vu(),u=bn().configAttributes,c=zl(),p=w.extendDeepAll,f=w.isPlainObject,v=w.isArrayOrTypedArray,h=w.nestedProperty,m=w.valObjectMeta,_="_isSubplotObj",x="_isLinkedToArray",A="_arrayAttrRegexps",E="_deprecated",D=[_,x,A,E];pe.IS_SUBPLOT_OBJ=_,pe.IS_LINKED_TO_ARRAY=x,pe.DEPRECATED=E,pe.UNDERSCORE_ATTRS=D,pe.get=function(){var $={};return le.allTypes.forEach(function(Z){$[Z]=N(Z)}),{defs:{valObjects:m,metaKeys:D.concat(["description","role","editType","impliedEdits"]),editType:{traces:c.traces,layout:c.layout},impliedEdits:{}},traces:$,layout:F(),frames:k(),animation:P(l),config:P(u)}},pe.crawl=function($,Z,K,Q){var J=K||0;Q=Q||"",Object.keys($).forEach(function(G){var ee=$[G];if(D.indexOf(G)===-1){var re=(Q?Q+".":"")+G;Z(ee,G,$,J,re),!pe.isValObject(ee)&&f(ee)&&G!=="impliedEdits"&&pe.crawl(ee,Z,J+1,re)}})},pe.isValObject=function($){return $&&$.valType!==void 0},pe.findArrayAttributes=function($){var Z=[],K=[],Q=[],J,G;function ee(fe,we,Oe,ke){K=K.slice(0,ke).concat([we]),Q=Q.slice(0,ke).concat([fe&&fe._isLinkedToArray]);var Le=fe&&(fe.valType==="data_array"||fe.arrayOk===!0)&&!(K[ke-1]==="colorbar"&&(we==="ticktext"||we==="tickvals"));Le&&re(J,0,"")}function re(fe,we,Oe){var ke=fe[K[we]],Le=Oe+K[we];if(we===K.length-1)v(ke)&&Z.push(G+Le);else if(Q[we]){if(Array.isArray(ke))for(var oe=0;oe<ke.length;oe++)f(ke[oe])&&re(ke[oe],we+1,Le+"["+oe+"].")}else f(ke)&&re(ke,we+1,Le+".")}return J=$,G="",pe.crawl(R,ee),$._module&&$._module.attributes&&pe.crawl($._module.attributes,ee),Z},pe.getTraceValObject=function($,Z){var K=Z[0],Q=1,J,G,ee=$._module;if(ee||(ee=(le.modules[$.type||R.type.dflt]||{})._module),!ee)return!1;if(J=ee.attributes,G=J&&J[K],!G){var re=ee.basePlotModule;re&&re.attributes&&(G=re.attributes[K])}return G||(G=R[K]),C(G,Z,Q)},pe.getLayoutValObject=function($,Z){var K=g($,Z[0]);return C(K,Z,1)};function g($,Z){var K,Q,J,G,ee=$._basePlotModules;if(ee){var re;for(K=0;K<ee.length;K++){if(J=ee[K],J.attrRegex&&J.attrRegex.test(Z)){if(J.layoutAttrOverrides)return J.layoutAttrOverrides;!re&&J.layoutAttributes&&(re=J.layoutAttributes)}var fe=J.baseLayoutAttrOverrides;if(fe&&Z in fe)return fe[Z]}if(re)return re}var we=$._modules;if(we){for(K=0;K<we.length;K++)if(G=we[K].layoutAttributes,G&&Z in G)return G[Z]}for(Q in le.componentsRegistry){if(J=le.componentsRegistry[Q],J.name==="colorscale"&&Z.indexOf("coloraxis")===0)return J.layoutAttributes[Z];if(!J.schema&&Z===J.name)return J.layoutAttributes}return Z in O?O[Z]:!1}function C($,Z,K){if(!$)return!1;if($._isLinkedToArray){if(I(Z[K]))K++;else if(K<Z.length)return!1}for(;K<Z.length;K++){var Q=$[Z[K]];if(f(Q))$=Q;else break;if(K===Z.length-1)break;if($._isLinkedToArray){if(K++,!I(Z[K]))return!1}else if($.valType==="info_array"){K++;var J=Z[K];if(!I(J))return!1;var G=$.items;if(Array.isArray(G)){if(J>=G.length)return!1;if($.dimensions===2){if(K++,Z.length===K)return $;var ee=Z[K];if(!I(ee))return!1;$=G[J][ee]}else $=G[J]}else $=G}}return $}function I($){return $===Math.round($)&&$>=0}function N($){var Z,K;Z=le.modules[$]._module,K=Z.basePlotModule;var Q={};Q.type=null;var J=p({},R),G=p({},Z.attributes);pe.crawl(G,function(fe,we,Oe,ke,Le){h(J,Le).set(void 0),fe===void 0&&h(G,Le).set(void 0)}),p(Q,J),le.traceIs($,"noOpacity")&&delete Q.opacity,le.traceIs($,"showLegend")||(delete Q.showlegend,delete Q.legendgroup),le.traceIs($,"noHover")&&(delete Q.hoverinfo,delete Q.hoverlabel),Z.selectPoints||delete Q.selectedpoints,p(Q,G),K.attributes&&p(Q,K.attributes),Q.type=$;var ee={meta:Z.meta||{},categories:Z.categories||{},animatable:!!Z.animatable,type:$,attributes:P(Q)};if(Z.layoutAttributes){var re={};p(re,Z.layoutAttributes),ee.layoutAttributes=P(re)}return Z.animatable||pe.crawl(ee,function(fe){pe.isValObject(fe)&&"anim"in fe&&delete fe.anim}),ee}function F(){var $={},Z,K;p($,O);for(Z in le.subplotsRegistry)if(K=le.subplotsRegistry[Z],!!K.layoutAttributes)if(Array.isArray(K.attr))for(var Q=0;Q<K.attr.length;Q++)M($,K,K.attr[Q]);else{var J=K.attr==="subplot"?K.name:K.attr;M($,K,J)}for(Z in le.componentsRegistry){K=le.componentsRegistry[Z];var G=K.schema;if(G&&(G.subplots||G.layout)){var ee=G.subplots;if(ee&&ee.xaxis&&!ee.yaxis)for(var re in ee.xaxis)delete $.yaxis[re];delete $.xaxis.shift,delete $.xaxis.autoshift}else K.name==="colorscale"?p($,K.layoutAttributes):K.layoutAttributes&&W($,K.layoutAttributes,K.name)}return{layoutAttributes:P($)}}function k(){var $={frames:p({},z)};return P($),$.frames}function P($){return T($),y($),S($),$}function T($){function Z(Q){return{valType:"string",editType:"none"}}function K(Q,J,G){pe.isValObject(Q)?(Q.arrayOk===!0||Q.valType==="data_array")&&(G[J+"src"]=Z()):f(Q)&&(Q.role="object")}pe.crawl($,K)}function y($){function Z(K,Q,J){if(K){var G=K[x];G&&(delete K[x],J[Q]={items:{}},J[Q].items[G]=K,J[Q].role="object")}}pe.crawl($,Z)}function S($){function Z(K){for(var Q in K)if(f(K[Q]))Z(K[Q]);else if(Array.isArray(K[Q]))for(var J=0;J<K[Q].length;J++)Z(K[Q][J]);else K[Q]instanceof RegExp&&(K[Q]=K[Q].toString())}Z($)}function M($,Z,K){var Q=h($,K),J=p({},Z.layoutAttributes);J[_]=!0,Q.set(J)}function W($,Z,K){var Q=h($,K);Q.set(p(Q.get()||{},Z))}}}),Tc=U({"src/plot_api/plot_template.js"(pe){var le=ii(),w=Jn(),R="templateitemname",O={name:{valType:"string",editType:"none"}};O[R]={valType:"string",editType:"calc"},pe.templatedArray=function(u,c){return c._isLinkedToArray=u,c.name=O.name,c[R]=O[R],c},pe.traceTemplater=function(u){var c={},p,f;for(p in u)f=u[p],Array.isArray(f)&&f.length&&(c[p]=0);function v(h){p=le.coerce(h,{},w,"type");var m={type:p,_template:null};if(p in c){f=u[p];var _=c[p]%f.length;c[p]++,m._template=f[_]}return m}return{newTrace:v}},pe.newContainer=function(u,c,p){var f=u._template,v=f&&(f[c]||p&&f[p]);le.isPlainObject(v)||(v=null);var h=u[c]={_template:v};return h},pe.arrayTemplater=function(u,c,p){var f=u._template,v=f&&f[l(c)],h=f&&f[c];(!Array.isArray(h)||!h.length)&&(h=[]);var m={};function _(A){var E={name:A.name,_input:A},D=E[R]=A[R];if(!z(D))return E._template=v,E;for(var g=0;g<h.length;g++){var C=h[g];if(C.name===D)return m[D]=1,E._template=C,E}return E[p]=A[p]||!1,E._template=!1,E}function x(){for(var A=[],E=0;E<h.length;E++){var D=h[E],g=D.name;if(z(g)&&!m[g]){var C={_template:D,name:g,_input:{_templateitemname:g}};C[R]=D[R],A.push(C),m[g]=1}}return A}return{newItem:_,defaultItems:x}};function z(u){return u&&typeof u=="string"}function l(u){var c=u.length-1;return u.charAt(c)!=="s"&&le.warn("bad argument to arrayDefaultKey: "+u),u.substr(0,u.length-1)+"defaults"}pe.arrayDefaultKey=l,pe.arrayEditor=function(u,c,p){var f=(le.nestedProperty(u,c).get()||[]).length,v=p._index,h=v>=f&&(p._input||{})._templateitemname;h&&(v=f);var m=c+"["+v+"]",_;function x(){_={},h&&(_[m]={},_[m][R]=h)}x();function A(C,I){_[C]=I}function E(C,I){h?le.nestedProperty(_[m],C).set(I):_[m+"."+C]=I}function D(){var C=_;return x(),C}function g(C,I){C&&E(C,I);var N=D();for(var F in N)le.nestedProperty(u,F).set(N[F])}return{modifyBase:A,modifyItem:E,getUpdateObj:D,applyUpdate:g}}}}),pf=U({"src/plots/cartesian/constants.js"(pe,le){var w=On().counter;le.exports={idRegex:{x:w("x","( domain)?"),y:w("y","( domain)?")},attrRegex:w("[xy]axis"),xAxisMatch:w("xaxis"),yAxisMatch:w("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"}}}),Tf=U({"src/plots/cartesian/axis_ids.js"(pe){var le=Mi(),w=pf();pe.id2name=function(z){if(!(typeof z!="string"||!z.match(w.AX_ID_PATTERN))){var l=z.split(" ")[0].substr(1);return l==="1"&&(l=""),z.charAt(0)+"axis"+l}},pe.name2id=function(z){if(z.match(w.AX_NAME_PATTERN)){var l=z.substr(5);return l==="1"&&(l=""),z.charAt(0)+l}},pe.cleanId=function(z,l,u){var c=/( domain)$/.test(z);if(!(typeof z!="string"||!z.match(w.AX_ID_PATTERN))&&!(l&&z.charAt(0)!==l)&&!(c&&!u)){var p=z.split(" ")[0].substr(1).replace(/^0+/,"");return p==="1"&&(p=""),z.charAt(0)+p+(c&&u?" domain":"")}},pe.list=function(O,z,l){var u=O._fullLayout;if(!u)return[];var c=pe.listIds(O,z),p=new Array(c.length),f;for(f=0;f<c.length;f++){var v=c[f];p[f]=u[v.charAt(0)+"axis"+v.substr(1)]}if(!l){var h=u._subplots.gl3d||[];for(f=0;f<h.length;f++){var m=u[h[f]];z?p.push(m[z+"axis"]):p.push(m.xaxis,m.yaxis,m.zaxis)}}return p},pe.listIds=function(O,z){var l=O._fullLayout;if(!l)return[];var u=l._subplots;return z?u[z+"axis"]:u.xaxis.concat(u.yaxis)},pe.getFromId=function(O,z,l){var u=O._fullLayout;return z=z===void 0||typeof z!="string"?z:z.replace(" domain",""),l==="x"?z=z.replace(/y[0-9]*/,""):l==="y"&&(z=z.replace(/x[0-9]*/,"")),u[pe.id2name(z)]},pe.getFromTrace=function(O,z,l){var u=O._fullLayout,c=null;if(le.traceIs(z,"gl3d")){var p=z.scene;p.substr(0,5)==="scene"&&(c=u[p][l+"axis"])}else c=pe.getFromId(O,z[l+"axis"]||l);return c},pe.idSort=function(O,z){var l=O.charAt(0),u=z.charAt(0);return l!==u?l>u?1:-1:+(O.substr(1)||1)-+(z.substr(1)||1)},pe.ref2id=function(O){return/^[xyz]/.test(O)?O.split(" ")[0]:!1};function R(O,z){if(z&&z.length){for(var l=0;l<z.length;l++)if(z[l][O])return!0}return!1}pe.isLinked=function(O,z){return R(z,O._axisMatchGroups)||R(z,O._axisConstraintGroups)}}}),T1=U({"src/components/shapes/handle_outline.js"(pe,le){function w(O){var z=O._fullLayout._zoomlayer;z&&z.selectAll(".outline-controllers").remove()}function R(O){var z=O._fullLayout._zoomlayer;z&&z.selectAll(".select-outline").remove(),O._fullLayout._outlining=!1}le.exports={clearOutlineControllers:w,clearOutline:R}}}),eg=U({"src/traces/scatter/layout_attributes.js"(pe,le){le.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}}}),Om=U({"src/plots/get_data.js"(pe){var le=Mi();pf().SUBPLOT_PATTERN,pe.getSubplotCalcData=function(w,R,O){var z=le.subplotsRegistry[R];if(!z)return[];for(var l=z.attr,u=[],c=0;c<w.length;c++){var p=w[c],f=p[0].trace;f[l]===O&&u.push(p)}return u},pe.getModuleCalcData=function(w,R,O){var z=[],l=[],u;if(typeof R=="string"?u=le.getModule(R).plot:typeof R=="function"?u=R:u=R.plot,!u)return[z,w];for(var c=O,p=0;p<w.length;p++){var f=w[p],v=f[0].trace,h=v.zorder!==void 0;v.visible!==!0||v._length===0||(v._module&&v._module.plot===u&&(!h||v.zorder===c)?z.push(f):l.push(f))}return[z,l]},pe.getSubplotData=function(R,O,z){if(!le.subplotsRegistry[O])return[];for(var l=le.subplotsRegistry[O].attr,u=[],c,p=0;p<R.length;p++)c=R[p],c[l]===z&&u.push(c);return u}}}),bE=U({"src/plots/command.js"(pe){var le=Mi(),w=ii();pe.manageCommandObserver=function(c,p,f,v){var h={},m=!0;p&&p._commandObserver&&(h=p._commandObserver),h.cache||(h.cache={}),h.lookupTable={};var _=pe.hasSimpleAPICommandBindings(c,f,h.lookupTable);if(p&&p._commandObserver){if(_)return h;if(p._commandObserver.remove)return p._commandObserver.remove(),p._commandObserver=null,h}if(_){R(c,_,h.cache),h.check=function(){if(m){var D=R(c,_,h.cache);return D.changed&&v&&h.lookupTable[D.value]!==void 0&&(h.disable(),Promise.resolve(v({value:D.value,type:_.type,prop:_.prop,traces:_.traces,index:h.lookupTable[D.value]})).then(h.enable,h.enable)),D.changed}};for(var x=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],A=0;A<x.length;A++)c._internalOn(x[A],h.check);h.remove=function(){for(var E=0;E<x.length;E++)c._removeInternalListener(x[E],h.check)}}else w.log("Unable to automatically bind plot updates to API command"),h.lookupTable={},h.remove=function(){};return h.disable=function(){m=!1},h.enable=function(){m=!0},p&&(p._commandObserver=h),h},pe.hasSimpleAPICommandBindings=function(c,p,f){var v,h=p.length,m;for(v=0;v<h;v++){var _,x=p[v],A=x.method,E=x.args;if(Array.isArray(E)||(E=[]),!A)return!1;var D=pe.computeAPICommandBindings(c,A,E);if(D.length!==1)return!1;if(!m)m=D[0],Array.isArray(m.traces)&&m.traces.sort();else{if(_=D[0],_.type!==m.type||_.prop!==m.prop)return!1;if(Array.isArray(m.traces))if(Array.isArray(_.traces)){_.traces.sort();for(var g=0;g<m.traces.length;g++)if(m.traces[g]!==_.traces[g])return!1}else return!1;else if(_.prop!==m.prop)return!1}_=D[0];var C=_.value;if(Array.isArray(C))if(C.length===1)C=C[0];else return!1;f&&(f[C]=v)}return m};function R(c,p,f){var v,h,m,_=!1;if(p.type==="data")v=c._fullData[p.traces!==null?p.traces[0]:0];else if(p.type==="layout")v=c._fullLayout;else return!1;return h=w.nestedProperty(v,p.prop).get(),m=f[p.type]=f[p.type]||{},m.hasOwnProperty(p.prop)&&m[p.prop]!==h&&(_=!0),m[p.prop]=h,{changed:_,value:h}}pe.executeAPICommand=function(c,p,f){if(p==="skip")return Promise.resolve();var v=le.apiMethodRegistry[p],h=[c];Array.isArray(f)||(f=[]);for(var m=0;m<f.length;m++)h.push(f[m]);return v.apply(null,h).catch(function(_){return w.warn("API call to Plotly."+p+" rejected.",_),Promise.reject(_)})},pe.computeAPICommandBindings=function(c,p,f){var v;switch(Array.isArray(f)||(f=[]),p){case"restyle":v=l(c,f);break;case"relayout":v=z(c,f);break;case"update":v=l(c,[f[0],f[2]]).concat(z(c,[f[1]]));break;case"animate":v=O(c,f);break;default:v=[]}return v};function O(c,p){return Array.isArray(p[0])&&p[0].length===1&&["string","number"].indexOf(typeof p[0][0])!==-1?[{type:"layout",prop:"_currentFrame",value:p[0][0].toString()}]:[]}function z(c,p){var f=[],v=p[0],h={};if(typeof v=="string")h[v]=p[1];else if(w.isPlainObject(v))h=v;else return f;return u(h,function(m,_,x){f.push({type:"layout",prop:m,value:x})},"",0),f}function l(c,p){var f,v,h,m,_=[];if(v=p[0],h=p[1],f=p[2],m={},typeof v=="string")m[v]=h;else if(w.isPlainObject(v))m=v,f===void 0&&(f=h);else return _;return f===void 0&&(f=null),u(m,function(x,A,E){var D,g;if(Array.isArray(E)){g=E.slice();var C=Math.min(g.length,c.data.length);f&&(C=Math.min(C,f.length)),D=[];for(var I=0;I<C;I++)D[I]=f?f[I]:I}else g=E,D=f?f.slice():null;if(D===null)Array.isArray(g)&&(g=g[0]);else if(Array.isArray(D)){if(!Array.isArray(g)){var N=g;g=[];for(var F=0;F<D.length;F++)g[F]=N}g.length=Math.min(D.length,g.length)}_.push({type:"data",prop:x,traces:D,value:g})},"",0),_}function u(c,p,f,v){Object.keys(c).forEach(function(h){var m=c[h];if(h[0]!=="_"){var _=f+(v>0?".":"")+h;w.isPlainObject(m)?u(m,p,_,v+1):p(_,h,m)}})}}}),tp=U({"src/plots/plots.js"(pe,le){var w=Ze(),R=nt().timeFormatLocale,O=ut().formatLocale,z=_t(),l=qt(),u=Mi(),c=ep(),p=Tc(),f=ii(),v=Lr(),h=Dt().BADNUM,m=Tf(),_=T1().clearOutline,x=eg(),A=vu(),E=Yc(),D=Om().getModuleCalcData,g=f.relinkPrivateKeys,C=f._,I=le.exports={};f.extendFlat(I,u),I.attributes=Jn(),I.attributes.type.values=I.allTypes,I.fontAttrs=Ir(),I.layoutAttributes=ts();var N=bE();I.executeAPICommand=N.executeAPICommand,I.computeAPICommandBindings=N.computeAPICommandBindings,I.manageCommandObserver=N.manageCommandObserver,I.hasSimpleAPICommandBindings=N.hasSimpleAPICommandBindings,I.redrawText=function(oe){return oe=f.getGraphDiv(oe),new Promise(function(be){setTimeout(function(){oe._fullLayout&&(u.getComponentMethod("annotations","draw")(oe),u.getComponentMethod("legend","draw")(oe),u.getComponentMethod("colorbar","draw")(oe),be(I.previousPromises(oe)))},300)})},I.resize=function(oe){oe=f.getGraphDiv(oe);var be,_e=new Promise(function(he,De){(!oe||f.isHidden(oe))&&De(new Error("Resize must be passed a displayed plot div element.")),oe._redrawTimer&&clearTimeout(oe._redrawTimer),oe._resolveResize&&(be=oe._resolveResize),oe._resolveResize=he,oe._redrawTimer=setTimeout(function(){if(!oe.layout||oe.layout.width&&oe.layout.height||f.isHidden(oe)){he(oe);return}delete oe.layout.width,delete oe.layout.height;var xe=oe.changed;oe.autoplay=!0,u.call("relayout",oe,{autosize:!0}).then(function(){oe.changed=xe,oe._resolveResize===he&&(delete oe._resolveResize,he(oe))})},100)});return be&&be(_e),_e},I.previousPromises=function(oe){if((oe._promises||[]).length)return Promise.all(oe._promises).then(function(){oe._promises=[]})},I.addLinks=function(oe){if(!(!oe._context.showLink&&!oe._context.showSources)){var be=oe._fullLayout,_e=f.ensureSingle(be._paper,"text","js-plot-link-container",function(Te){Te.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:v.defaultLine,"pointer-events":"all"}).each(function(){var Be=w.select(this);Be.append("tspan").classed("js-link-to-tool",!0),Be.append("tspan").classed("js-link-spacer",!0),Be.append("tspan").classed("js-sourcelinks",!0)})}),he=_e.node(),De={y:be._paper.attr("height")-9};document.body.contains(he)&&he.getComputedTextLength()>=be.width-20?(De["text-anchor"]="start",De.x=5):(De["text-anchor"]="end",De.x=be._paper.attr("width")-7),_e.attr(De);var xe=_e.select(".js-link-to-tool"),se=_e.select(".js-link-spacer"),Ee=_e.select(".js-sourcelinks");oe._context.showSources&&oe._context.showSources(oe),oe._context.showLink&&F(oe,xe),se.text(xe.text()&&Ee.text()?" - ":"")}};function F(oe,be){be.text("");var _e=be.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(oe._context.linkText+" »");if(oe._context.sendData)_e.on("click",function(){I.sendDataToCloud(oe)});else{var he=window.location.pathname.split("/"),De=window.location.search;_e.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+he[2].split(".")[0]+"/"+he[1]+De})}}I.sendDataToCloud=function(oe){var be=(window.PLOTLYENV||{}).BASE_URL||oe._context.plotlyServerURL;if(be){oe.emit("plotly_beforeexport");var _e=w.select(oe).append("div").attr("id","hiddenform").style("display","none"),he=_e.append("form").attr({action:be+"/external",method:"post",target:"_blank"}),De=he.append("input").attr({type:"text",name:"data"});return De.node().value=I.graphJson(oe,!1,"keepdata"),he.node().submit(),_e.remove(),oe.emit("plotly_afterexport"),!1}};var k=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],P=["year","month","dayMonth","dayMonthYear"];I.supplyDefaults=function(oe,be){var _e=be&&be.skipUpdateCalc,he=oe._fullLayout||{};if(he._skipDefaults){delete he._skipDefaults;return}var De=oe._fullLayout={},xe=oe.layout||{},se=oe._fullData||[],Ee=oe._fullData=[],Te=oe.data||[],Be=oe.calcdata||[],tt=oe._context||{},at;oe._transitionData||I.createTransitionData(oe),De._dfltTitle={plot:C(oe,"Click to enter Plot title"),subtitle:C(oe,"Click to enter Plot subtitle"),x:C(oe,"Click to enter X axis title"),y:C(oe,"Click to enter Y axis title"),colorbar:C(oe,"Click to enter Colorscale title"),annotation:C(oe,"new text")},De._traceWord=C(oe,"trace");var gt=S(oe,k);if(De._mapboxAccessToken=tt.mapboxAccessToken,he._initialAutoSizeIsDone){var pt=he.width,Rt=he.height;I.supplyLayoutGlobalDefaults(xe,De,gt),xe.width||(De.width=pt),xe.height||(De.height=Rt),I.sanitizeMargins(De)}else{I.supplyLayoutGlobalDefaults(xe,De,gt);var $t=!xe.width||!xe.height,Wt=De.autosize,Ht=tt.autosizable,Ft=$t&&(Wt||Ht);Ft?I.plotAutoSize(oe,xe,De):$t&&I.sanitizeMargins(De),!Wt&&$t&&(xe.width=De.width,xe.height=De.height)}De._d3locale=M(gt,De.separators),De._extraFormat=S(oe,P),De._initialAutoSizeIsDone=!0,De._dataLength=Te.length,De._modules=[],De._visibleModules=[],De._basePlotModules=[];var st=De._subplots=y(),rt=De._splomAxes={x:{},y:{}},Ue=De._splomSubplots={};De._splomGridDflt={},De._scatterStackOpts={},De._firstScatter={},De._alignmentOpts={},De._colorAxes={},De._requestRangeslider={},De._traceUids=T(se,Te),I.supplyDataDefaults(Te,Ee,xe,De);var xt=Object.keys(rt.x),Gt=Object.keys(rt.y);if(xt.length>1&&Gt.length>1){for(u.getComponentMethod("grid","sizeDefaults")(xe,De),at=0;at<xt.length;at++)f.pushUnique(st.xaxis,xt[at]);for(at=0;at<Gt.length;at++)f.pushUnique(st.yaxis,Gt[at]);for(var Jt in Ue)f.pushUnique(st.cartesian,Jt)}if(De._has=I._hasPlotType.bind(De),se.length===Ee.length)for(at=0;at<Ee.length;at++)g(Ee[at],se[at]);I.supplyLayoutModuleDefaults(xe,De,Ee,oe._transitionData);var Ut=De._visibleModules,kr=[];for(at=0;at<Ut.length;at++){var Pr=Ut[at].crossTraceDefaults;Pr&&f.pushUnique(kr,Pr)}for(at=0;at<kr.length;at++)kr[at](Ee,De);De._hasOnlyLargeSploms=De._basePlotModules.length===1&&De._basePlotModules[0].name==="splom"&&xt.length>15&&Gt.length>15&&De.shapes.length===0&&De.images.length===0,I.linkSubplots(Ee,De,se,he),I.cleanPlot(Ee,De,se,he);var $r=!!(he._has&&he._has("cartesian")),rn=!!(De._has&&De._has("cartesian")),kn=$r,Rn=rn;kn&&!Rn?he._bgLayer.remove():Rn&&!kn&&(De._shouldCreateBgLayer=!0),he._zoomlayer&&!oe._dragging&&_({_fullLayout:he}),W(Ee,De),g(De,he),u.getComponentMethod("colorscale","crossTraceDefaults")(Ee,De),De._preGUI||(De._preGUI={}),De._tracePreGUI||(De._tracePreGUI={});var ci=De._tracePreGUI,In={},Gn;for(Gn in ci)In[Gn]="old";for(at=0;at<Ee.length;at++)Gn=Ee[at]._fullInput.uid,In[Gn]||(ci[Gn]={}),In[Gn]="new";for(Gn in In)In[Gn]==="old"&&delete ci[Gn];K(De),u.getComponentMethod("rangeslider","makeData")(De),!_e&&Be.length===Ee.length&&I.supplyDefaultsUpdateCalc(Be,Ee)},I.supplyDefaultsUpdateCalc=function(oe,be){for(var _e=0;_e<be.length;_e++){var he=be[_e],De=(oe[_e]||[])[0];if(De&&De.trace){var xe=De.trace;if(xe._hasCalcTransform){var se=xe._arrayAttrs,Ee,Te,Be;for(Ee=0;Ee<se.length;Ee++)Te=se[Ee],Be=f.nestedProperty(xe,Te).get().slice(),f.nestedProperty(he,Te).set(Be)}De.trace=he}}};function T(oe,be){var _e=be.length,he=[],De,xe;for(De=0;De<oe.length;De++){var se=oe[De]._fullInput;se!==xe&&he.push(se),xe=se}var Ee=he.length,Te=new Array(_e),Be={};function tt(pt,Rt){Te[Rt]=pt,Be[pt]=1}function at(pt,Rt){if(pt&&typeof pt=="string"&&!Be[pt])return tt(pt,Rt),!0}for(De=0;De<_e;De++){var gt=be[De].uid;typeof gt=="number"&&(gt=String(gt)),!at(gt,De)&&(De<Ee&&at(he[De].uid,De)||tt(f.randstr(Be),De))}return Te}function y(){var oe=u.collectableSubplotTypes,be={},_e,he;if(!oe){oe=[];var De=u.subplotsRegistry;for(var xe in De){var se=De[xe],Ee=se.attr;if(Ee&&(oe.push(xe),Array.isArray(Ee)))for(he=0;he<Ee.length;he++)f.pushUnique(oe,Ee[he])}}for(_e=0;_e<oe.length;_e++)be[oe[_e]]=[];return be}function S(oe,be){var _e=oe._context.locale;_e||(_e="en-US");var he=!1,De={};function xe(at){for(var gt=!0,pt=0;pt<be.length;pt++){var Rt=be[pt];De[Rt]||(at[Rt]?De[Rt]=at[Rt]:gt=!1)}gt&&(he=!0)}for(var se=0;se<2;se++){for(var Ee=oe._context.locales,Te=0;Te<2;Te++){var Be=(Ee[_e]||{}).format;if(Be&&(xe(Be),he))break;Ee=u.localeRegistry}var tt=_e.split("-")[0];if(he||tt===_e)break;_e=tt}return he||xe(u.localeRegistry.en.format),De}function M(oe,be){return oe.decimal=be.charAt(0),oe.thousands=be.charAt(1),{numberFormat:function(_e){try{_e=O(oe).format(f.adjustFormat(_e))}catch{return f.warnBadFormat(_e),f.noFormat}return _e},timeFormat:R(oe).utcFormat}}function W(oe,be){var _e,he=[];be.meta&&(_e=be._meta={meta:be.meta,layout:{meta:be.meta}});for(var De=0;De<oe.length;De++){var xe=oe[De];xe.meta?he[xe.index]=xe._meta={meta:xe.meta}:be.meta&&(xe._meta={meta:be.meta}),be.meta&&(xe._meta.layout={meta:be.meta})}he.length&&(_e||(_e=be._meta={}),_e.data=he)}I.createTransitionData=function(oe){oe._transitionData||(oe._transitionData={}),oe._transitionData._frames||(oe._transitionData._frames=[]),oe._transitionData._frameHash||(oe._transitionData._frameHash={}),oe._transitionData._counter||(oe._transitionData._counter=0),oe._transitionData._interruptCallbacks||(oe._transitionData._interruptCallbacks=[])},I._hasPlotType=function(oe){var be,_e=this._basePlotModules||[];for(be=0;be<_e.length;be++)if(_e[be].name===oe)return!0;var he=this._modules||[];for(be=0;be<he.length;be++){var De=he[be].name;if(De===oe)return!0;var xe=u.modules[De];if(xe&&xe.categories[oe])return!0}return!1},I.cleanPlot=function(oe,be,_e,he){var De,xe,se=he._basePlotModules||[];for(De=0;De<se.length;De++){var Ee=se[De];Ee.clean&&Ee.clean(oe,be,_e,he)}var Te=he._has&&he._has("gl"),Be=be._has&&be._has("gl");Te&&!Be&&he._glcontainer!==void 0&&(he._glcontainer.selectAll(".gl-canvas").remove(),he._glcontainer.selectAll(".no-webgl").remove(),he._glcanvas=null);var tt=!!he._infolayer;e:for(De=0;De<_e.length;De++){var at=_e[De],gt=at.uid;for(xe=0;xe<oe.length;xe++){var pt=oe[xe];if(gt===pt.uid)continue e}tt&&he._infolayer.select(".cb"+gt).remove()}},I.linkSubplots=function(oe,be,_e,he){var De,xe,se=he._plots||{},Ee=be._plots={},Te=be._subplots,Be={_fullData:oe,_fullLayout:be},tt=Te.cartesian||[];for(De=0;De<tt.length;De++){var at=tt[De],gt=se[at],pt=m.getFromId(Be,at,"x"),Rt=m.getFromId(Be,at,"y"),$t;for(gt?$t=Ee[at]=gt:($t=Ee[at]={},$t.id=at),pt._counterAxes.push(Rt._id),Rt._counterAxes.push(pt._id),pt._subplotsWith.push(at),Rt._subplotsWith.push(at),$t.xaxis=pt,$t.yaxis=Rt,$t._hasClipOnAxisFalse=!1,xe=0;xe<oe.length;xe++){var Wt=oe[xe];if(Wt.xaxis===$t.xaxis._id&&Wt.yaxis===$t.yaxis._id&&Wt.cliponaxis===!1){$t._hasClipOnAxisFalse=!0;break}}}var Ht=m.list(Be,null,!0),Ft;for(De=0;De<Ht.length;De++){Ft=Ht[De];var st=null;Ft.overlaying&&(st=m.getFromId(Be,Ft.overlaying),st&&st.overlaying&&(Ft.overlaying=!1,st=null)),Ft._mainAxis=st||Ft,st&&(Ft.domain=st.domain.slice()),Ft._anchorAxis=Ft.anchor==="free"?null:m.getFromId(Be,Ft.anchor)}for(De=0;De<Ht.length;De++)if(Ft=Ht[De],Ft._counterAxes.sort(m.idSort),Ft._subplotsWith.sort(f.subplotSort),Ft._mainSubplot=$(Ft,be),Ft._counterAxes.length&&(Ft.spikemode&&Ft.spikemode.indexOf("across")!==-1||Ft.automargin&&Ft.mirror&&Ft.anchor!=="free"||u.getComponentMethod("rangeslider","isVisible")(Ft))){var rt=1,Ue=0;for(xe=0;xe<Ft._counterAxes.length;xe++){var xt=m.getFromId(Be,Ft._counterAxes[xe]);rt=Math.min(rt,xt.domain[0]),Ue=Math.max(Ue,xt.domain[1])}rt<Ue&&(Ft._counterDomainMin=rt,Ft._counterDomainMax=Ue)}};function $(oe,be){var _e={_fullLayout:be},he=oe._id.charAt(0)==="x",De=oe._mainAxis._anchorAxis,xe="",se="",Ee="";if(De&&(Ee=De._mainAxis._id,xe=he?oe._id+Ee:Ee+oe._id),!xe||!be._plots[xe]){xe="";for(var Te=oe._counterAxes,Be=0;Be<Te.length;Be++){var tt=Te[Be],at=he?oe._id+tt:tt+oe._id;se||(se=at);var gt=m.getFromId(_e,tt);if(Ee&&gt.overlaying===Ee){xe=at;break}}}return xe||se}I.clearExpandedTraceDefaultColors=function(oe){var be,_e,he;function De(se,Ee,Te,Be){_e[Be]=Ee,_e.length=Be+1,se.valType==="color"&&se.dflt===void 0&&be.push(_e.join("."))}for(_e=[],be=oe._module._colorAttrs,be||(oe._module._colorAttrs=be=[],c.crawl(oe._module.attributes,De)),he=0;he<be.length;he++){var xe=f.nestedProperty(oe,"_input."+be[he]);xe.get()||f.nestedProperty(oe,be[he]).set(null)}},I.supplyDataDefaults=function(oe,be,_e,he){var De=he._modules,xe=he._visibleModules,se=he._basePlotModules,Ee=0,Te,Be,tt;he._transformModules=[];function at(Ht){be.push(Ht);var Ft=Ht._module;Ft&&(f.pushUnique(De,Ft),Ht.visible===!0&&f.pushUnique(xe,Ft),f.pushUnique(se,Ht._module.basePlotModule),Ht._input.visible!==!1&&Ee++)}var gt={},pt=[],Rt=(_e.template||{}).data||{},$t=p.traceTemplater(Rt);for(Te=0;Te<oe.length;Te++)tt=oe[Te],Be=$t.newTrace(tt),Be.uid=he._traceUids[Te],I.supplyTraceDefaults(tt,Be,Ee,he,Te),Be.index=Te,Be._input=tt,Be._fullInput=Be,at(Be),u.traceIs(Be,"carpetAxis")&&(gt[Be.carpet]=Be),u.traceIs(Be,"carpetDependent")&&pt.push(Te);for(Te=0;Te<pt.length;Te++)if(Be=be[pt[Te]],!!Be.visible){var Wt=gt[Be.carpet];if(Be._carpet=Wt,!Wt||!Wt.visible){Be.visible=!1;continue}Be.xaxis=Wt.xaxis,Be.yaxis=Wt.yaxis}},I.supplyAnimationDefaults=function(oe){oe=oe||{};var be,_e={};function he(De,xe){return f.coerce(oe||{},_e,A,De,xe)}if(he("mode"),he("direction"),he("fromcurrent"),Array.isArray(oe.frame))for(_e.frame=[],be=0;be<oe.frame.length;be++)_e.frame[be]=I.supplyAnimationFrameDefaults(oe.frame[be]||{});else _e.frame=I.supplyAnimationFrameDefaults(oe.frame||{});if(Array.isArray(oe.transition))for(_e.transition=[],be=0;be<oe.transition.length;be++)_e.transition[be]=I.supplyAnimationTransitionDefaults(oe.transition[be]||{});else _e.transition=I.supplyAnimationTransitionDefaults(oe.transition||{});return _e},I.supplyAnimationFrameDefaults=function(oe){var be={};function _e(he,De){return f.coerce(oe||{},be,A.frame,he,De)}return _e("duration"),_e("redraw"),be},I.supplyAnimationTransitionDefaults=function(oe){var be={};function _e(he,De){return f.coerce(oe||{},be,A.transition,he,De)}return _e("duration"),_e("easing"),be},I.supplyFrameDefaults=function(oe){var be={};function _e(he,De){return f.coerce(oe,be,E,he,De)}return _e("group"),_e("name"),_e("traces"),_e("baseframe"),_e("data"),_e("layout"),be},I.supplyTraceDefaults=function(oe,be,_e,he,De){var xe=he.colorway||v.defaults,se=xe[_e%xe.length],Ee;function Te(st,rt){return f.coerce(oe,be,I.attributes,st,rt)}var Be=Te("visible");Te("type"),Te("name",he._traceWord+" "+De),Te("uirevision",he.uirevision);var tt=I.getModule(be);if(be._module=tt,tt){var at=tt.basePlotModule,gt=at.attr,pt=at.attributes;if(gt&&pt){var Rt=he._subplots,$t="";if(Array.isArray(gt))for(Ee=0;Ee<gt.length;Ee++){var Wt=gt[Ee],Ht=f.coerce(oe,be,pt,Wt);Rt[Wt]&&f.pushUnique(Rt[Wt],Ht),$t+=Ht}else $t=f.coerce(oe,be,pt,gt);Rt[at.name]&&f.pushUnique(Rt[at.name],$t)}}if(Be&&(Te("customdata"),Te("ids"),Te("meta"),u.traceIs(be,"showLegend")?(f.coerce(oe,be,tt.attributes.showlegend?tt.attributes:I.attributes,"showlegend"),Te("legend"),Te("legendwidth"),Te("legendgroup"),Te("legendgrouptitle.text"),Te("legendrank"),be._dfltShowLegend=!0):be._dfltShowLegend=!1,tt&&tt.supplyDefaults(oe,be,se,he),u.traceIs(be,"noOpacity")||Te("opacity"),u.traceIs(be,"notLegendIsolatable")&&(be.visible=!!be.visible),u.traceIs(be,"noHover")||(be.hovertemplate||f.coerceHoverinfo(oe,be,he),be.type!=="parcats"&&u.getComponentMethod("fx","supplyDefaults")(oe,be,se,he)),tt&&tt.selectPoints)){var Ft=Te("selectedpoints");f.isTypedArray(Ft)&&(be.selectedpoints=Array.from(Ft))}return be},I.supplyLayoutGlobalDefaults=function(oe,be,_e){function he(at,gt){return f.coerce(oe,be,I.layoutAttributes,at,gt)}var De=oe.template;f.isPlainObject(De)&&(be.template=De,be._template=De.layout,be._dataTemplate=De.data),he("autotypenumbers");var xe=f.coerceFont(he,"font"),se=xe.size;f.coerceFont(he,"title.font",xe,{overrideDflt:{size:Math.round(se*1.4)}}),he("title.text",be._dfltTitle.plot),he("title.xref");var Ee=he("title.yref");he("title.pad.t"),he("title.pad.r"),he("title.pad.b"),he("title.pad.l");var Te=he("title.automargin");he("title.x"),he("title.xanchor"),he("title.y"),he("title.yanchor"),he("title.subtitle.text",be._dfltTitle.subtitle),f.coerceFont(he,"title.subtitle.font",xe,{overrideDflt:{size:Math.round(be.title.font.size*.7)}}),Te&&(Ee==="paper"&&(be.title.y!==0&&(be.title.y=1),be.title.yanchor==="auto"&&(be.title.yanchor=be.title.y===0?"top":"bottom")),Ee==="container"&&(be.title.y==="auto"&&(be.title.y=1),be.title.yanchor==="auto"&&(be.title.yanchor=be.title.y<.5?"bottom":"top")));var Be=he("uniformtext.mode");Be&&he("uniformtext.minsize"),he("autosize",!(oe.width&&oe.height)),he("width"),he("height"),he("minreducedwidth"),he("minreducedheight"),he("margin.l"),he("margin.r"),he("margin.t"),he("margin.b"),he("margin.pad"),he("margin.autoexpand"),oe.width&&oe.height&&I.sanitizeMargins(be),u.getComponentMethod("grid","sizeDefaults")(oe,be),he("paper_bgcolor"),he("separators",_e.decimal+_e.thousands),he("hidesources"),he("colorway"),he("datarevision");var tt=he("uirevision");he("editrevision",tt),he("selectionrevision",tt),u.getComponentMethod("modebar","supplyLayoutDefaults")(oe,be),u.getComponentMethod("shapes","supplyDrawNewShapeDefaults")(oe,be,he),u.getComponentMethod("selections","supplyDrawNewSelectionDefaults")(oe,be,he),he("meta"),f.isPlainObject(oe.transition)&&(he("transition.duration"),he("transition.easing"),he("transition.ordering")),u.getComponentMethod("calendars","handleDefaults")(oe,be,"calendar"),u.getComponentMethod("fx","supplyLayoutGlobalDefaults")(oe,be,he),f.coerce(oe,be,x,"scattermode")};function Z(oe){return typeof oe=="string"&&oe.substr(oe.length-2)==="px"&&parseFloat(oe)}I.plotAutoSize=function(be,_e,he){var De=be._context||{},xe=De.frameMargins,se,Ee,Te=f.isPlotDiv(be);if(Te&&be.emit("plotly_autosize"),De.fillFrame)se=window.innerWidth,Ee=window.innerHeight,document.body.style.overflow="hidden";else{var Be=Te?window.getComputedStyle(be):{};if(se=Z(Be.width)||Z(Be.maxWidth)||he.width,Ee=Z(Be.height)||Z(Be.maxHeight)||he.height,z(xe)&&xe>0){var tt=1-2*xe;se=Math.round(tt*se),Ee=Math.round(tt*Ee)}}var at=I.layoutAttributes.width.min,gt=I.layoutAttributes.height.min;se<at&&(se=at),Ee<gt&&(Ee=gt);var pt=!_e.width&&Math.abs(he.width-se)>1,Rt=!_e.height&&Math.abs(he.height-Ee)>1;(Rt||pt)&&(pt&&(he.width=se),Rt&&(he.height=Ee)),be._initialAutoSize||(be._initialAutoSize={width:se,height:Ee}),I.sanitizeMargins(he)},I.supplyLayoutModuleDefaults=function(oe,be,_e,he){var De=u.componentsRegistry,xe=be._basePlotModules,se,Ee,Te,Be=u.subplotsRegistry.cartesian;for(se in De)Te=De[se],Te.includeBasePlot&&Te.includeBasePlot(oe,be);xe.length||xe.push(Be),be._has("cartesian")&&(u.getComponentMethod("grid","contentDefaults")(oe,be),Be.finalizeSubplots(oe,be));for(var tt in be._subplots)be._subplots[tt].sort(f.subplotSort);for(Ee=0;Ee<xe.length;Ee++)Te=xe[Ee],Te.supplyLayoutDefaults&&Te.supplyLayoutDefaults(oe,be,_e);var at=be._modules;for(Ee=0;Ee<at.length;Ee++)Te=at[Ee],Te.supplyLayoutDefaults&&Te.supplyLayoutDefaults(oe,be,_e);var gt=be._transformModules;for(Ee=0;Ee<gt.length;Ee++)Te=gt[Ee],Te.supplyLayoutDefaults&&Te.supplyLayoutDefaults(oe,be,_e,he);for(se in De)Te=De[se],Te.supplyLayoutDefaults&&Te.supplyLayoutDefaults(oe,be,_e)},I.purge=function(oe){var be=oe._fullLayout||{};be._glcontainer!==void 0&&(be._glcontainer.selectAll(".gl-canvas").remove(),be._glcontainer.remove(),be._glcanvas=null),be._modeBar&&be._modeBar.destroy(),oe._transitionData&&(oe._transitionData._interruptCallbacks&&(oe._transitionData._interruptCallbacks.length=0),oe._transitionData._animationRaf&&window.cancelAnimationFrame(oe._transitionData._animationRaf)),f.clearThrottle(),f.clearResponsive(oe),delete oe.data,delete oe.layout,delete oe._fullData,delete oe._fullLayout,delete oe.calcdata,delete oe.empty,delete oe.fid,delete oe.undoqueue,delete oe.undonum,delete oe.autoplay,delete oe.changed,delete oe._promises,delete oe._redrawTimer,delete oe._hmlumcount,delete oe._hmpixcount,delete oe._transitionData,delete oe._transitioning,delete oe._initialAutoSize,delete oe._transitioningWithDuration,delete oe._dragging,delete oe._dragged,delete oe._dragdata,delete oe._hoverdata,delete oe._snapshotInProgress,delete oe._editing,delete oe._mouseDownTime,delete oe._legendMouseDownTime,oe.removeAllListeners&&oe.removeAllListeners()},I.style=function(oe){var be=oe._fullLayout._visibleModules,_e=[],he;for(he=0;he<be.length;he++){var De=be[he];De.style&&f.pushUnique(_e,De.style)}for(he=0;he<_e.length;he++)_e[he](oe)},I.sanitizeMargins=function(oe){if(!(!oe||!oe.margin)){var be=oe.width,_e=oe.height,he=oe.margin,De=be-(he.l+he.r),xe=_e-(he.t+he.b),se;De<0&&(se=(be-1)/(he.l+he.r),he.l=Math.floor(se*he.l),he.r=Math.floor(se*he.r)),xe<0&&(se=(_e-1)/(he.t+he.b),he.t=Math.floor(se*he.t),he.b=Math.floor(se*he.b))}},I.clearAutoMarginIds=function(oe){oe._fullLayout._pushmarginIds={}},I.allowAutoMargin=function(oe,be){oe._fullLayout._pushmarginIds[be]=1};function K(oe){var be=oe.margin;if(!oe._size){var _e=oe._size={l:Math.round(be.l),r:Math.round(be.r),t:Math.round(be.t),b:Math.round(be.b),p:Math.round(be.pad)};_e.w=Math.round(oe.width)-_e.l-_e.r,_e.h=Math.round(oe.height)-_e.t-_e.b}oe._pushmargin||(oe._pushmargin={}),oe._pushmarginIds||(oe._pushmarginIds={}),oe._reservedMargin||(oe._reservedMargin={})}var Q=2,J=2;I.autoMargin=function(oe,be,_e){var he=oe._fullLayout,De=he.width,xe=he.height,se=he.margin,Ee=he.minreducedwidth,Te=he.minreducedheight,Be=f.constrain(De-se.l-se.r,Q,Ee),tt=f.constrain(xe-se.t-se.b,J,Te),at=Math.max(0,De-Be),gt=Math.max(0,xe-tt),pt=he._pushmargin,Rt=he._pushmarginIds;if(se.autoexpand!==!1){if(!_e)delete pt[be],delete Rt[be];else{var $t=_e.pad;if($t===void 0&&($t=Math.min(12,se.l,se.r,se.t,se.b)),at){var Wt=(_e.l+_e.r)/at;Wt>1&&(_e.l/=Wt,_e.r/=Wt)}if(gt){var Ht=(_e.t+_e.b)/gt;Ht>1&&(_e.t/=Ht,_e.b/=Ht)}var Ft=_e.xl!==void 0?_e.xl:_e.x,st=_e.xr!==void 0?_e.xr:_e.x,rt=_e.yt!==void 0?_e.yt:_e.y,Ue=_e.yb!==void 0?_e.yb:_e.y;pt[be]={l:{val:Ft,size:_e.l+$t},r:{val:st,size:_e.r+$t},b:{val:Ue,size:_e.b+$t},t:{val:rt,size:_e.t+$t}},Rt[be]=1}if(!he._replotting)return I.doAutoMargin(oe)}};function G(oe){if("_redrawFromAutoMarginCount"in oe._fullLayout)return!1;var be=m.list(oe,"",!0);for(var _e in be)if(be[_e].autoshift||be[_e].shift)return!0;return!1}I.doAutoMargin=function(oe){var be=oe._fullLayout,_e=be.width,he=be.height;be._size||(be._size={}),K(be);var De=be._size,xe=be.margin,se={t:0,b:0,l:0,r:0},Ee=f.extendFlat({},De),Te=xe.l,Be=xe.r,tt=xe.t,at=xe.b,gt=be._pushmargin,pt=be._pushmarginIds,Rt=be.minreducedwidth,$t=be.minreducedheight;if(xe.autoexpand!==!1){for(var Wt in gt)pt[Wt]||delete gt[Wt];var Ht=oe._fullLayout._reservedMargin;for(var Ft in Ht)for(var st in Ht[Ft]){var rt=Ht[Ft][st];se[st]=Math.max(se[st],rt)}gt.base={l:{val:0,size:Te},r:{val:1,size:Be},t:{val:1,size:tt},b:{val:0,size:at}};for(var Ue in se){var xt=0;for(var Gt in gt)Gt!=="base"&&z(gt[Gt][Ue].size)&&(xt=gt[Gt][Ue].size>xt?gt[Gt][Ue].size:xt);var Jt=Math.max(0,xe[Ue]-xt);se[Ue]=Math.max(0,se[Ue]-Jt)}for(var Ut in gt){var kr=gt[Ut].l||{},Pr=gt[Ut].b||{},$r=kr.val,rn=kr.size,kn=Pr.val,Rn=Pr.size,ci=_e-se.r-se.l,In=he-se.t-se.b;for(var Gn in gt){if(z(rn)&&gt[Gn].r){var mr=gt[Gn].r.val,St=gt[Gn].r.size;if(mr>$r){var Ot=(rn*mr+(St-ci)*$r)/(mr-$r),Et=(St*(1-$r)+(rn-ci)*(1-mr))/(mr-$r);Ot+Et>Te+Be&&(Te=Ot,Be=Et)}}if(z(Rn)&&gt[Gn].t){var je=gt[Gn].t.val,Ye=gt[Gn].t.size;if(je>kn){var et=(Rn*je+(Ye-In)*kn)/(je-kn),mt=(Ye*(1-kn)+(Rn-In)*(1-je))/(je-kn);et+mt>at+tt&&(at=et,tt=mt)}}}}}var Nt=f.constrain(_e-xe.l-xe.r,Q,Rt),lr=f.constrain(he-xe.t-xe.b,J,$t),br=Math.max(0,_e-Nt),Or=Math.max(0,he-lr);if(br){var tn=(Te+Be)/br;tn>1&&(Te/=tn,Be/=tn)}if(Or){var Jr=(at+tt)/Or;Jr>1&&(at/=Jr,tt/=Jr)}if(De.l=Math.round(Te)+se.l,De.r=Math.round(Be)+se.r,De.t=Math.round(tt)+se.t,De.b=Math.round(at)+se.b,De.p=Math.round(xe.pad),De.w=Math.round(_e)-De.l-De.r,De.h=Math.round(he)-De.t-De.b,!be._replotting&&(I.didMarginChange(Ee,De)||G(oe))){"_redrawFromAutoMarginCount"in be?be._redrawFromAutoMarginCount++:be._redrawFromAutoMarginCount=1;var dn=3*(1+Object.keys(pt).length);if(be._redrawFromAutoMarginCount<dn)return u.call("_doPlot",oe);be._size=Ee,f.warn("Too many auto-margin redraws.")}ee(oe)};function ee(oe){var be=m.list(oe,"",!0);["_adjustTickLabelsOverflow","_hideCounterAxisInsideTickLabels"].forEach(function(_e){for(var he=0;he<be.length;he++){var De=be[he][_e];De&&De()}})}var re=["l","r","t","b","p","w","h"];I.didMarginChange=function(oe,be){for(var _e=0;_e<re.length;_e++){var he=re[_e],De=oe[he],xe=be[he];if(!z(De)||Math.abs(xe-De)>1)return!0}return!1},I.graphJson=function(oe,be,_e,he,De,xe){(De&&be&&!oe._fullData||De&&!be&&!oe._fullLayout)&&I.supplyDefaults(oe);var se=De?oe._fullData:oe.data,Ee=De?oe._fullLayout:oe.layout,Te=(oe._transitionData||{})._frames;function Be(gt,pt){if(typeof gt=="function")return pt?"_function_":null;if(f.isPlainObject(gt)){var Rt={},$t;return Object.keys(gt).sort().forEach(function(st){if(["_","["].indexOf(st.charAt(0))===-1){if(typeof gt[st]=="function"){pt&&(Rt[st]="_function");return}if(_e==="keepdata"){if(st.substr(st.length-3)==="src")return}else if(_e==="keepstream"){if($t=gt[st+"src"],typeof $t=="string"&&$t.indexOf(":")>0&&!f.isPlainObject(gt.stream))return}else if(_e!=="keepall"&&($t=gt[st+"src"],typeof $t=="string"&&$t.indexOf(":")>0))return;Rt[st]=Be(gt[st],pt)}}),Rt}var Wt=Array.isArray(gt),Ht=f.isTypedArray(gt);if((Wt||Ht)&&gt.dtype&&gt.shape){var Ft=gt.bdata;return Be({dtype:gt.dtype,shape:gt.shape,bdata:f.isArrayBuffer(Ft)?l.encode(Ft):Ft},pt)}return Wt?gt.map(function(st){return Be(st,pt)}):Ht?f.simpleMap(gt,f.identity):f.isJSDate(gt)?f.ms2DateTimeLocal(+gt):gt}var tt={data:(se||[]).map(function(gt){var pt=Be(gt);return be&&delete pt.fit,pt})};if(!be&&(tt.layout=Be(Ee),De)){var at=Ee._size;tt.layout.computed={margin:{b:at.b,l:at.l,r:at.r,t:at.t}}}return Te&&(tt.frames=Be(Te)),xe&&(tt.config=Be(oe._context,!0)),he==="object"?tt:JSON.stringify(tt)},I.modifyFrames=function(oe,be){var _e,he,De,xe=oe._transitionData._frames,se=oe._transitionData._frameHash;for(_e=0;_e<be.length;_e++)switch(he=be[_e],he.type){case"replace":De=he.value;var Ee=(xe[he.index]||{}).name,Te=De.name;xe[he.index]=se[Te]=De,Te!==Ee&&(delete se[Ee],se[Te]=De);break;case"insert":De=he.value,se[De.name]=De,xe.splice(he.index,0,De);break;case"delete":De=xe[he.index],delete se[De.name],xe.splice(he.index,1);break}return Promise.resolve()},I.computeFrame=function(oe,be){var _e=oe._transitionData._frameHash,he,De,xe,se;if(!be)throw new Error("computeFrame must be given a string frame name");var Ee=_e[be.toString()];if(!Ee)return!1;for(var Te=[Ee],Be=[Ee.name];Ee.baseframe&&(Ee=_e[Ee.baseframe.toString()])&&Be.indexOf(Ee.name)===-1;)Te.push(Ee),Be.push(Ee.name);for(var tt={};Ee=Te.pop();)if(Ee.layout&&(tt.layout=I.extendLayout(tt.layout,Ee.layout)),Ee.data){if(tt.data||(tt.data=[]),De=Ee.traces,!De)for(De=[],he=0;he<Ee.data.length;he++)De[he]=he;for(tt.traces||(tt.traces=[]),he=0;he<Ee.data.length;he++)xe=De[he],xe!=null&&(se=tt.traces.indexOf(xe),se===-1&&(se=tt.data.length,tt.traces[se]=xe),tt.data[se]=I.extendTrace(tt.data[se],Ee.data[he]))}return tt},I.recomputeFrameHash=function(oe){for(var be=oe._transitionData._frameHash={},_e=oe._transitionData._frames,he=0;he<_e.length;he++){var De=_e[he];De&&De.name&&(be[De.name]=De)}},I.extendObjectWithContainers=function(oe,be,_e){var he,De,xe,se,Ee,Te,Be,tt,at=f.extendDeepNoArrays({},be||{}),gt=f.expandObjectPaths(at),pt={};if(_e&&_e.length)for(xe=0;xe<_e.length;xe++)he=f.nestedProperty(gt,_e[xe]),De=he.get(),De===void 0?f.nestedProperty(pt,_e[xe]).set(null):(he.set(null),f.nestedProperty(pt,_e[xe]).set(De));if(oe=f.extendDeepNoArrays(oe||{},gt),_e&&_e.length){for(xe=0;xe<_e.length;xe++)if(Ee=f.nestedProperty(pt,_e[xe]),Be=Ee.get(),!!Be){for(Te=f.nestedProperty(oe,_e[xe]),tt=Te.get(),Array.isArray(tt)||(tt=[],Te.set(tt)),se=0;se<Be.length;se++){var Rt=Be[se];Rt===null?tt[se]=null:tt[se]=I.extendObjectWithContainers(tt[se],Rt)}Te.set(tt)}}return oe},I.dataArrayContainers=["transforms","dimensions"],I.layoutArrayContainers=u.layoutArrayContainers,I.extendTrace=function(oe,be){return I.extendObjectWithContainers(oe,be,I.dataArrayContainers)},I.extendLayout=function(oe,be){return I.extendObjectWithContainers(oe,be,I.layoutArrayContainers)},I.transition=function(oe,be,_e,he,De,xe){var se={redraw:De.redraw},Ee={},Te=[];return se.prepareFn=function(){for(var Be=Array.isArray(be)?be.length:0,tt=he.slice(0,Be),at=0;at<tt.length;at++){var gt=tt[at],pt=oe._fullData[gt],Rt=pt._module;if(Rt){if(Rt.animatable){var $t=Rt.basePlotModule.name;Ee[$t]||(Ee[$t]=[]),Ee[$t].push(gt)}oe.data[tt[at]]=I.extendTrace(oe.data[tt[at]],be[at])}}var Wt=f.expandObjectPaths(f.extendDeepNoArrays({},_e)),Ht=/^[xy]axis[0-9]*$/;for(var Ft in Wt)Ht.test(Ft)&&delete Wt[Ft].range;I.extendLayout(oe.layout,Wt),delete oe.calcdata,I.supplyDefaults(oe),I.doCalcdata(oe);var st=f.expandObjectPaths(_e);if(st){var rt=oe._fullLayout._plots;for(var Ue in rt){var xt=rt[Ue],Gt=xt.xaxis,Jt=xt.yaxis,Ut=Gt.range.slice(),kr=Jt.range.slice(),Pr=null,$r=null,rn=null,kn=null;Array.isArray(st[Gt._name+".range"])?Pr=st[Gt._name+".range"].slice():Array.isArray((st[Gt._name]||{}).range)&&(Pr=st[Gt._name].range.slice()),Array.isArray(st[Jt._name+".range"])?$r=st[Jt._name+".range"].slice():Array.isArray((st[Jt._name]||{}).range)&&($r=st[Jt._name].range.slice()),Ut&&Pr&&(Gt.r2l(Ut[0])!==Gt.r2l(Pr[0])||Gt.r2l(Ut[1])!==Gt.r2l(Pr[1]))&&(rn={xr0:Ut,xr1:Pr}),kr&&$r&&(Jt.r2l(kr[0])!==Jt.r2l($r[0])||Jt.r2l(kr[1])!==Jt.r2l($r[1]))&&(kn={yr0:kr,yr1:$r}),(rn||kn)&&Te.push(f.extendFlat({plotinfo:xt},rn,kn))}}return Promise.resolve()},se.runFn=function(Be){var tt,at=oe._fullLayout._basePlotModules,gt=Te.length,pt;if(_e)for(pt=0;pt<at.length;pt++)at[pt].transitionAxes&&at[pt].transitionAxes(oe,Te,xe,Be);gt?(tt=f.extendFlat({},xe),tt.duration=0,delete Ee.cartesian):tt=xe;for(var Rt in Ee){var $t=Ee[Rt],Wt=oe._fullData[$t[0]]._module;Wt.basePlotModule.plot(oe,$t,tt,Be)}},fe(oe,xe,se)},I.transitionFromReact=function(oe,be,_e,he){var De=oe._fullLayout,xe=De.transition,se={},Ee=[];return se.prepareFn=function(){var Te=De._plots;se.redraw=!1,be.anim==="some"&&(se.redraw=!0),_e.anim==="some"&&(se.redraw=!0);for(var Be in Te){var tt=Te[Be],at=tt.xaxis,gt=tt.yaxis,pt=he[at._name].range.slice(),Rt=he[gt._name].range.slice(),$t=at.range.slice(),Wt=gt.range.slice();at.setScale(),gt.setScale();var Ht=null,Ft=null;(at.r2l(pt[0])!==at.r2l($t[0])||at.r2l(pt[1])!==at.r2l($t[1]))&&(Ht={xr0:pt,xr1:$t}),(gt.r2l(Rt[0])!==gt.r2l(Wt[0])||gt.r2l(Rt[1])!==gt.r2l(Wt[1]))&&(Ft={yr0:Rt,yr1:Wt}),(Ht||Ft)&&Ee.push(f.extendFlat({plotinfo:tt},Ht,Ft))}return Promise.resolve()},se.runFn=function(Te){for(var Be=oe._fullData,tt=oe._fullLayout,at=tt._basePlotModules,gt,pt,Rt,$t=[],Wt=0;Wt<Be.length;Wt++)$t.push(Wt);function Ht(){if(oe._fullLayout)for(var st=0;st<at.length;st++)at[st].transitionAxes&&at[st].transitionAxes(oe,Ee,gt,Te)}function Ft(){if(oe._fullLayout)for(var st=0;st<at.length;st++)at[st].plot(oe,Rt,pt,Te)}Ee.length&&be.anim?xe.ordering==="traces first"?(gt=f.extendFlat({},xe,{duration:0}),Rt=$t,pt=xe,setTimeout(Ht,xe.duration),Ft()):(gt=xe,Rt=null,pt=f.extendFlat({},xe,{duration:0}),setTimeout(Ft,gt.duration),Ht()):Ee.length?(gt=xe,Ht()):be.anim&&(Rt=$t,pt=xe,Ft())},fe(oe,xe,se)};function fe(oe,be,_e){var he=!1;function De(at){var gt=Promise.resolve();if(!at)return gt;for(;at.length;)gt=gt.then(at.shift());return gt}function xe(at){if(at)for(;at.length;)at.shift()}function se(){return oe.emit("plotly_transitioning",[]),new Promise(function(at){oe._transitioning=!0,be.duration>0&&(oe._transitioningWithDuration=!0),oe._transitionData._interruptCallbacks.push(function(){he=!0}),_e.redraw&&oe._transitionData._interruptCallbacks.push(function(){return u.call("redraw",oe)}),oe._transitionData._interruptCallbacks.push(function(){oe.emit("plotly_transitioninterrupted",[])});var gt=0,pt=0;function Rt(){return gt++,function(){pt++,!he&&pt===gt&&Ee(at)}}_e.runFn(Rt),setTimeout(Rt())})}function Ee(at){if(oe._transitionData)return xe(oe._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(_e.redraw)return u.call("redraw",oe)}).then(function(){oe._transitioning=!1,oe._transitioningWithDuration=!1,oe.emit("plotly_transitioned",[])}).then(at)}function Te(){if(oe._transitionData)return oe._transitioning=!1,De(oe._transitionData._interruptCallbacks)}var Be=[I.previousPromises,Te,_e.prepareFn,I.rehover,I.reselect,se],tt=f.syncOrAsync(Be,oe);return(!tt||!tt.then)&&(tt=Promise.resolve()),tt.then(function(){return oe})}I.doCalcdata=function(oe,be){var _e=m.list(oe),he=oe._fullData,De=oe._fullLayout,xe,se,Ee,Te,Be=new Array(he.length),tt=(oe.calcdata||[]).slice();for(oe.calcdata=Be,De._numBoxes=0,De._numViolins=0,De._violinScaleGroupStats={},oe._hmpixcount=0,oe._hmlumcount=0,De._piecolormap={},De._sunburstcolormap={},De._treemapcolormap={},De._iciclecolormap={},De._funnelareacolormap={},Ee=0;Ee<he.length;Ee++)if(Array.isArray(be)&&be.indexOf(Ee)===-1){Be[Ee]=tt[Ee];continue}for(Ee=0;Ee<he.length;Ee++)xe=he[Ee],xe._arrayAttrs=c.findArrayAttributes(xe),xe._extremes={};var at=De._subplots.polar||[];for(Ee=0;Ee<at.length;Ee++)_e.push(De[at[Ee]].radialaxis,De[at[Ee]].angularaxis);for(var gt in De._colorAxes){var pt=De[gt];pt.cauto!==!1&&(delete pt.cmin,delete pt.cmax)}var Rt=!1;function $t(Ft){if(xe=he[Ft],se=xe._module,xe.visible===!0&&xe.transforms){if(se&&se.calc){var st=se.calc(oe,xe);st[0]&&st[0].t&&st[0].t._scene&&delete st[0].t._scene.dirty}for(Te=0;Te<xe.transforms.length;Te++){var rt=xe.transforms[Te];se=transformsRegistry[rt.type],se&&se.calcTransform&&(xe._hasCalcTransform=!0,Rt=!0,se.calcTransform(oe,xe,rt))}}}function Wt(Ft,st){if(xe=he[Ft],se=xe._module,!!se.isContainer===st){var rt=[];if(xe.visible===!0&&xe._length!==0){delete xe._indexToPoints;var Ue=xe.transforms||[];for(Te=Ue.length-1;Te>=0;Te--)if(Ue[Te].enabled){xe._indexToPoints=Ue[Te]._indexToPoints;break}se&&se.calc&&(rt=se.calc(oe,xe))}(!Array.isArray(rt)||!rt[0])&&(rt=[{x:h,y:h}]),rt[0].t||(rt[0].t={}),rt[0].trace=xe,Be[Ft]=rt}}for(ke(_e,he,De),Ee=0;Ee<he.length;Ee++)Wt(Ee,!0);for(Ee=0;Ee<he.length;Ee++)$t(Ee);for(Rt&&ke(_e,he,De),Ee=0;Ee<he.length;Ee++)Wt(Ee,!0);for(Ee=0;Ee<he.length;Ee++)Wt(Ee,!1);Le(oe);var Ht=Oe(_e,oe);if(Ht.length){for(De._numBoxes=0,De._numViolins=0,Ee=0;Ee<Ht.length;Ee++)Wt(Ht[Ee],!0);for(Ee=0;Ee<Ht.length;Ee++)Wt(Ht[Ee],!1);Le(oe)}u.getComponentMethod("fx","calc")(oe),u.getComponentMethod("errorbars","calc")(oe)};var we=/(total|sum|min|max|mean|geometric mean|median) (ascending|descending)/;function Oe(oe,be){var _e=[],he,De,xe,se,Ee;function Te(Gn,mr,St){var Ot=mr._id.charAt(0);if(Gn==="histogram2dcontour"){var Et=mr._counterAxes[0],je=m.getFromId(be,Et),Ye=Ot==="x"||Et==="x"&&je.type==="category",et=Ot==="y"||Et==="y"&&je.type==="category";return function(mt,Nt){return mt===0||Nt===0||Ye&&mt===St[Nt].length-1||et&&Nt===St.length-1?-1:(Ot==="y"?Nt:mt)-1}}else return function(mt,Nt){return Ot==="y"?Nt:mt}}var Be={min:function(Gn){return f.aggNums(Math.min,null,Gn)},max:function(Gn){return f.aggNums(Math.max,null,Gn)},sum:function(Gn){return f.aggNums(function(mr,St){return mr+St},null,Gn)},total:function(Gn){return f.aggNums(function(mr,St){return mr+St},null,Gn)},mean:function(Gn){return f.mean(Gn)},"geometric mean":function(Gn){return f.geometricMean(Gn)},median:function(Gn){return f.median(Gn)}};function tt(Gn,mr){return Gn[1]-mr[1]}function at(Gn,mr){return mr[1]-Gn[1]}for(he=0;he<oe.length;he++){var gt=oe[he];if(gt.type==="category"){var pt=gt.categoryorder.match(we);if(pt){var Rt=pt[1],$t=pt[2],Wt=gt._id.charAt(0),Ht=Wt==="x",Ft=[];for(De=0;De<gt._categories.length;De++)Ft.push([gt._categories[De],[]]);for(De=0;De<gt._traceIndices.length;De++){var st=gt._traceIndices[De],rt=be._fullData[st];if(rt.visible===!0){var Ue=rt.type;u.traceIs(rt,"histogram")&&(delete rt._xautoBinFinished,delete rt._yautoBinFinished);var xt=Ue==="splom",Gt=Ue==="scattergl",Jt=be.calcdata[st];for(xe=0;xe<Jt.length;xe++){var Ut=Jt[xe],kr,Pr;if(xt){var $r=rt._axesDim[gt._id];if(!Ht){var rn=rt._diag[$r][0];rn&&(gt=be._fullLayout[m.id2name(rn)])}var kn=Ut.trace.dimensions[$r].values;for(se=0;se<kn.length;se++)for(kr=gt._categoriesMap[kn[se]],Ee=0;Ee<Ut.trace.dimensions.length;Ee++)if(Ee!==$r){var Rn=Ut.trace.dimensions[Ee];Ft[kr][1].push(Rn.values[se])}}else if(Gt){for(se=0;se<Ut.t.x.length;se++)Ht?(kr=Ut.t.x[se],Pr=Ut.t.y[se]):(kr=Ut.t.y[se],Pr=Ut.t.x[se]),Ft[kr][1].push(Pr);Ut.t&&Ut.t._scene&&delete Ut.t._scene.dirty}else if(Ut.hasOwnProperty("z")){Pr=Ut.z;var ci=Te(rt.type,gt,Pr);for(se=0;se<Pr.length;se++)for(Ee=0;Ee<Pr[se].length;Ee++)kr=ci(Ee,se),kr+1&&Ft[kr][1].push(Pr[se][Ee])}else for(kr=Ut.p,kr===void 0&&(kr=Ut[Wt]),Pr=Ut.s,Pr===void 0&&(Pr=Ut.v),Pr===void 0&&(Pr=Ht?Ut.y:Ut.x),Array.isArray(Pr)||(Pr===void 0?Pr=[]:Pr=[Pr]),se=0;se<Pr.length;se++)Ft[kr][1].push(Pr[se])}}}gt._categoriesValue=Ft;var In=[];for(De=0;De<Ft.length;De++)In.push([Ft[De][0],Be[Rt](Ft[De][1])]);In.sort($t==="descending"?at:tt),gt._categoriesAggregatedValue=In,gt._initialCategories=In.map(function(Gn){return Gn[0]}),_e=_e.concat(gt.sortByInitialCategories())}}}return _e}function ke(oe,be,_e){var he={};function De(Te){Te.clearCalc(),Te.type==="multicategory"&&Te.setupMultiCategory(be),he[Te._id]=1}f.simpleMap(oe,De);for(var xe=_e._axisMatchGroups||[],se=0;se<xe.length;se++)for(var Ee in xe[se])he[Ee]||De(_e[m.id2name(Ee)])}function Le(oe){var be=oe._fullLayout,_e=be._visibleModules,he={},De,xe,se;for(xe=0;xe<_e.length;xe++){var Ee=_e[xe],Te=Ee.crossTraceCalc;if(Te){var Be=Ee.basePlotModule.name;he[Be]?f.pushUnique(he[Be],Te):he[Be]=[Te]}}for(se in he){var tt=he[se],at=be._subplots[se];if(Array.isArray(at))for(De=0;De<at.length;De++){var gt=at[De],pt=se==="cartesian"?be._plots[gt]:be[gt];for(xe=0;xe<tt.length;xe++)tt[xe](oe,pt,gt)}else for(xe=0;xe<tt.length;xe++)tt[xe](oe)}}I.rehover=function(oe){oe._fullLayout._rehover&&oe._fullLayout._rehover()},I.redrag=function(oe){oe._fullLayout._redrag&&oe._fullLayout._redrag()},I.reselect=function(oe){var be=oe._fullLayout,_e=(oe.layout||{}).selections,he=be._previousSelections;be._previousSelections=_e;var De=be._reselect||JSON.stringify(_e)!==JSON.stringify(he);u.getComponentMethod("selections","reselect")(oe,De)},I.generalUpdatePerTraceModule=function(oe,be,_e,he){var De=be.traceHash,xe={},se;for(se=0;se<_e.length;se++){var Ee=_e[se],Te=Ee[0].trace;Te.visible&&(xe[Te.type]=xe[Te.type]||[],xe[Te.type].push(Ee))}for(var Be in De)if(!xe[Be]){var tt=De[Be][0],at=tt[0].trace;at.visible=!1,xe[Be]=[tt]}for(var gt in xe){var pt=xe[gt],Rt=pt[0][0].trace._module;Rt.plot(oe,be,f.filterVisible(pt),he)}be.traceHash=xe},I.plotBasePlot=function(oe,be,_e,he,De){var xe=u.getModule(oe),se=D(be.calcdata,xe)[0];xe.plot(be,se,he,De)},I.cleanBasePlot=function(oe,be,_e,he,De){var xe=De._has&&De._has(oe),se=_e._has&&_e._has(oe);xe&&!se&&De["_"+oe+"layer"].selectAll("g.trace").remove()}}}),E1=U({"src/constants/xmlns_namespaces.js"(pe){pe.xmlns="http://www.w3.org/2000/xmlns/",pe.svg="http://www.w3.org/2000/svg",pe.xlink="http://www.w3.org/1999/xlink",pe.svgAttrs={xmlns:pe.svg,"xmlns:xlink":pe.xlink}}}),tg=U({"src/constants/alignment.js"(pe,le){le.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"}}}}),ah=U({"src/lib/svg_text_utils.js"(pe){var le=Ze(),w=ii(),R=w.strTranslate,O=E1(),z=tg().LINE_SPACING,l=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;pe.convertToTspans=function(J,G,ee){var re=J.text(),fe=!J.attr("data-notex")&&G&&G._context.typesetMath&&typeof MathJax<"u"&&re.match(l),we=le.select(J.node().parentNode);if(we.empty())return;var Oe=J.attr("class")?J.attr("class").split(" ")[0]:"text";Oe+="-math",we.selectAll("svg."+Oe).remove(),we.selectAll("g."+Oe+"-group").remove(),J.style("display",null).attr({"data-unformatted":re,"data-math":"N"});function ke(){we.empty()||(Oe=J.attr("class")+"-math",we.select("svg."+Oe).remove()),J.text("").style("white-space","pre");var Le=$(J.node(),re);Le&&J.style("pointer-events","all"),pe.positionText(J),ee&&ee.call(J)}return fe?(G&&G._promises||[]).push(new Promise(function(Le){J.style("display","none");var oe=parseInt(J.node().style.fontSize,10),be={fontSize:oe};v(fe[2],be,function(_e,he,De){we.selectAll("svg."+Oe).remove(),we.selectAll("g."+Oe+"-group").remove();var xe=_e&&_e.select("svg");if(!xe||!xe.node()){ke(),Le();return}var se=we.append("g").classed(Oe+"-group",!0).attr({"pointer-events":"none","data-unformatted":re,"data-math":"Y"});se.node().appendChild(xe.node()),he&&he.node()&&xe.node().insertBefore(he.node().cloneNode(!0),xe.node().firstChild);var Ee=De.width,Te=De.height;xe.attr({class:Oe,height:Te,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var Be=J.node().style.fill||"black",tt=xe.select("g");tt.attr({fill:Be,stroke:Be});var at=tt.node().getBoundingClientRect(),gt=at.width,pt=at.height;(gt>Ee||pt>Te)&&(xe.style("overflow","hidden"),at=xe.node().getBoundingClientRect(),gt=at.width,pt=at.height);var Rt=+J.attr("x"),$t=+J.attr("y"),Wt=oe||J.node().getBoundingClientRect().height,Ht=-Wt/4;if(Oe[0]==="y")se.attr({transform:"rotate("+[-90,Rt,$t]+")"+R(-gt/2,Ht-pt/2)});else if(Oe[0]==="l")$t=Ht-pt/2;else if(Oe[0]==="a"&&Oe.indexOf("atitle")!==0)Rt=0,$t=Ht;else{var Ft=J.attr("text-anchor");Rt=Rt-gt*(Ft==="middle"?.5:Ft==="end"?1:0),$t=$t+Ht-pt/2}xe.attr({x:Rt,y:$t}),ee&&ee.call(J,se),Le(se)})})):ke(),J};var u=/(<|&lt;|&#60;)/g,c=/(>|&gt;|&#62;)/g;function p(J){return J.replace(u,"\\lt ").replace(c,"\\gt ")}var f=[["$","$"],["\\(","\\)"]];function v(J,G,ee){var re=parseInt((MathJax.version||"").split(".")[0]);if(re!==2&&re!==3){w.warn("No MathJax version:",MathJax.version);return}var fe,we,Oe,ke,Le=function(){return we=w.extendDeepAll({},MathJax.Hub.config),Oe=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:f},displayAlign:"left"})},oe=function(){we=w.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=f},be=function(){if(fe=MathJax.Hub.config.menuSettings.renderer,fe!=="SVG")return MathJax.Hub.setRenderer("SVG")},_e=function(){fe=MathJax.config.startup.output,fe!=="svg"&&(MathJax.config.startup.output="svg")},he=function(){var Be="math-output-"+w.randstr({},64);ke=le.select("body").append("div").attr({id:Be}).style({visibility:"hidden",position:"absolute","font-size":G.fontSize+"px"}).text(p(J));var tt=ke.node();return re===2?MathJax.Hub.Typeset(tt):MathJax.typeset([tt])},De=function(){var Be=ke.select(re===2?".MathJax_SVG":".MathJax"),tt=!Be.empty()&&ke.select("svg").node();if(!tt)w.log("There was an error in the tex syntax.",J),ee();else{var at=tt.getBoundingClientRect(),gt;re===2?gt=le.select("body").select("#MathJax_SVG_glyphs"):gt=Be.select("defs"),ee(Be,gt,at)}ke.remove()},xe=function(){if(fe!=="SVG")return MathJax.Hub.setRenderer(fe)},se=function(){fe!=="svg"&&(MathJax.config.startup.output=fe)},Ee=function(){return Oe!==void 0&&(MathJax.Hub.processSectionDelay=Oe),MathJax.Hub.Config(we)},Te=function(){MathJax.config=we};re===2?MathJax.Hub.Queue(Le,be,he,De,xe,Ee):re===3&&(oe(),_e(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){he(),De(),se(),Te()}))}var h={sup:"font-size:70%",sub:"font-size:70%",s:"text-decoration:line-through",u:"text-decoration:underline",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},m={sub:"0.3em",sup:"-0.6em"},_={sub:"-0.21em",sup:"0.42em"},x="​",A=["http:","https:","mailto:","",void 0,":"],E=pe.NEWLINES=/(\r\n?|\n)/g,D=/(<[^<>]*>)/,g=/<(\/?)([^ >]*)(\s+(.*))?>/i,C=/<br(\s+.*)?>/i;pe.BR_TAG_ALL=/<br(\s+.*)?>/gi;var I=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,N=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,F=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,k=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function P(J,G){if(!J)return null;var ee=J.match(G),re=ee&&(ee[3]||ee[4]);return re&&M(re)}var T=/(^|;)\s*color:/;pe.plainText=function(J,G){G=G||{};for(var ee=G.len!==void 0&&G.len!==-1?G.len:1/0,re=G.allowedTags!==void 0?G.allowedTags:["br"],fe="...",we=fe.length,Oe=J.split(D),ke=[],Le="",oe=0,be=0;be<Oe.length;be++){var _e=Oe[be],he=_e.match(g),De=he&&he[2].toLowerCase();if(De)re.indexOf(De)!==-1&&(ke.push(_e),Le=De);else{var xe=_e.length;if(oe+xe<ee)ke.push(_e),oe+=xe;else if(oe<ee){var se=ee-oe;Le&&(Le!=="br"||se<=we||xe<=we)&&ke.pop(),ee>we?ke.push(_e.substr(0,se-we)+fe):ke.push(_e.substr(0,se));break}Le=""}}return ke.join("")};var y={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},S=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function M(J){return J.replace(S,function(G,ee){var re;return ee.charAt(0)==="#"?re=W(ee.charAt(1)==="x"?parseInt(ee.substr(2),16):parseInt(ee.substr(1),10)):re=y[ee],re||G})}pe.convertEntities=M;function W(J){if(!(J>1114111)){var G=String.fromCodePoint;if(G)return G(J);var ee=String.fromCharCode;return J<=65535?ee(J):ee((J>>10)+55232,J%1024+56320)}}function $(J,G){G=G.replace(E," ");var ee=!1,re=[],fe,we=-1;function Oe(){we++;var pt=document.createElementNS(O.svg,"tspan");le.select(pt).attr({class:"line",dy:we*z+"em"}),J.appendChild(pt),fe=pt;var Rt=re;if(re=[{node:pt}],Rt.length>1)for(var $t=1;$t<Rt.length;$t++)ke(Rt[$t])}function ke(pt){var Rt=pt.type,$t={},Wt;if(Rt==="a"){Wt="a";var Ht=pt.target,Ft=pt.href,st=pt.popup;Ft&&($t={"xlink:xlink:show":Ht==="_blank"||Ht.charAt(0)!=="_"?"new":"replace",target:Ht,"xlink:xlink:href":Ft},st&&($t.onclick='window.open(this.href.baseVal,this.target.baseVal,"'+st+'");return false;'))}else Wt="tspan";pt.style&&($t.style=pt.style);var rt=document.createElementNS(O.svg,Wt);if(Rt==="sup"||Rt==="sub"){Le(fe,x),fe.appendChild(rt);var Ue=document.createElementNS(O.svg,"tspan");Le(Ue,x),le.select(Ue).attr("dy",_[Rt]),$t.dy=m[Rt],fe.appendChild(rt),fe.appendChild(Ue)}else fe.appendChild(rt);le.select(rt).attr($t),fe=pt.node=rt,re.push(pt)}function Le(pt,Rt){pt.appendChild(document.createTextNode(Rt))}function oe(pt){if(re.length===1){w.log("Ignoring unexpected end tag </"+pt+">.",G);return}var Rt=re.pop();pt!==Rt.type&&w.log("Start tag <"+Rt.type+"> doesnt match end tag <"+pt+">. Pretending it did match.",G),fe=re[re.length-1].node}var be=C.test(G);be?Oe():(fe=J,re=[{node:J}]);for(var _e=G.split(D),he=0;he<_e.length;he++){var De=_e[he],xe=De.match(g),se=xe&&xe[2].toLowerCase(),Ee=h[se];if(se==="br")Oe();else if(Ee===void 0)Le(fe,M(De));else if(xe[1])oe(se);else{var Te=xe[4],Be={type:se},tt=P(Te,I);if(tt?(tt=tt.replace(T,"$1 fill:"),Ee&&(tt+=";"+Ee)):Ee&&(tt=Ee),tt&&(Be.style=tt),se==="a"){ee=!0;var at=P(Te,N);if(at){var gt=Z(at);gt&&(Be.href=gt,Be.target=P(Te,F)||"_blank",Be.popup=P(Te,k))}}ke(Be)}}return ee}function Z(J){var G=encodeURI(decodeURI(J)),ee=document.createElement("a"),re=document.createElement("a");ee.href=J,re.href=G;var fe=ee.protocol,we=re.protocol;return A.indexOf(fe)!==-1&&A.indexOf(we)!==-1?G:""}pe.sanitizeHTML=function(G){G=G.replace(E," ");for(var ee=document.createElement("p"),re=ee,fe=[],we=G.split(D),Oe=0;Oe<we.length;Oe++){var ke=we[Oe],Le=ke.match(g),oe=Le&&Le[2].toLowerCase();if(oe in h)if(Le[1])fe.length&&(re=fe.pop());else{var be=Le[4],_e=P(be,I),he=_e?{style:_e}:{};if(oe==="a"){var De=P(be,N);if(De){var xe=Z(De);if(xe){he.href=xe;var se=P(be,F);se&&(he.target=se)}}}var Ee=document.createElement(oe);re.appendChild(Ee),le.select(Ee).attr(he),re=Ee,fe.push(Ee)}else re.appendChild(document.createTextNode(M(ke)))}var Te="innerHTML";return ee[Te]},pe.lineCount=function(G){return G.selectAll("tspan.line").size()||1},pe.positionText=function(G,ee,re){return G.each(function(){var fe=le.select(this);function we(Le,oe){return oe===void 0?(oe=fe.attr(Le),oe===null&&(fe.attr(Le,0),oe=0)):fe.attr(Le,oe),oe}var Oe=we("x",ee),ke=we("y",re);this.nodeName==="text"&&fe.selectAll("tspan.line").attr({x:Oe,y:ke})})};function K(J,G,ee){var re=ee.horizontalAlign,fe=ee.verticalAlign||"top",we=J.node().getBoundingClientRect(),Oe=G.node().getBoundingClientRect(),ke,Le,oe;return fe==="bottom"?Le=function(){return we.bottom-ke.height}:fe==="middle"?Le=function(){return we.top+(we.height-ke.height)/2}:Le=function(){return we.top},re==="right"?oe=function(){return we.right-ke.width}:re==="center"?oe=function(){return we.left+(we.width-ke.width)/2}:oe=function(){return we.left},function(){ke=this.node().getBoundingClientRect();var be=oe()-Oe.left,_e=Le()-Oe.top,he=ee.gd||{};if(ee.gd){he._fullLayout._calcInverseTransform(he);var De=w.apply3DTransform(he._fullLayout._invTransform)(be,_e);be=De[0],_e=De[1]}return this.style({top:_e+"px",left:be+"px","z-index":1e3}),this}}var Q="1px ";pe.makeTextShadow=function(J){var G=Q,ee=Q,re=Q;return G+ee+re+J+", -"+G+"-"+ee+re+J+", "+G+"-"+ee+re+J+", -"+G+ee+re+J},pe.makeEditable=function(J,G){var ee=G.gd,re=G.delegate,fe=le.dispatch("edit","input","cancel"),we=re||J;if(J.style({"pointer-events":re?"none":"all"}),J.size()!==1)throw new Error("boo");function Oe(){Le(),J.style({opacity:0});var oe=we.attr("class"),be;oe?be="."+oe.split(" ")[0]+"-math-group":be="[class*=-math-group]",be&&le.select(J.node().parentNode).select(be).style({opacity:0})}function ke(oe){var be=oe.node(),_e=document.createRange();_e.selectNodeContents(be);var he=window.getSelection();he.removeAllRanges(),he.addRange(_e),be.focus()}function Le(){var oe=le.select(ee),be=oe.select(".svg-container"),_e=be.append("div"),he=J.node().style,De=parseFloat(he.fontSize||12),xe=G.text;xe===void 0&&(xe=J.attr("data-unformatted")),_e.classed("plugin-editable editable",!0).style({position:"absolute","font-family":he.fontFamily||"Arial","font-size":De,color:G.fill||he.fill||"black",opacity:1,"background-color":G.background||"transparent",outline:"#ffffff33 1px solid",margin:[-De/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(xe).call(K(J,be,G)).on("blur",function(){ee._editing=!1,J.text(this.textContent).style({opacity:1});var se=le.select(this).attr("class"),Ee;se?Ee="."+se.split(" ")[0]+"-math-group":Ee="[class*=-math-group]",Ee&&le.select(J.node().parentNode).select(Ee).style({opacity:0});var Te=this.textContent;le.select(this).transition().duration(0).remove(),le.select(document).on("mouseup",null),fe.edit.call(J,Te)}).on("focus",function(){var se=this;ee._editing=!0,le.select(document).on("mouseup",function(){if(le.event.target===se)return!1;document.activeElement===_e.node()&&_e.node().blur()})}).on("keyup",function(){le.event.which===27?(ee._editing=!1,J.style({opacity:1}),le.select(this).style({opacity:0}).on("blur",function(){return!1}).transition().remove(),fe.cancel.call(J,this.textContent)):(fe.input.call(J,this.textContent),le.select(this).call(K(J,be,G)))}).on("keydown",function(){le.event.which===13&&this.blur()}).call(ke)}return G.immediate?Oe():we.on("click",Oe),le.rebind(J,fe,"on")}}}),Ug=U({"src/components/colorscale/helpers.js"(pe,le){var w=Ze(),R=or(),O=_t(),z=ii(),l=Lr(),u=Vn().isValid;function c(E,D,g){var C=D?z.nestedProperty(E,D).get()||{}:E,I=C[g||"color"];I&&I._inputArray&&(I=I._inputArray);var N=!1;if(z.isArrayOrTypedArray(I)){for(var F=0;F<I.length;F++)if(O(I[F])){N=!0;break}}return z.isPlainObject(C)&&(N||C.showscale===!0||O(C.cmin)&&O(C.cmax)||u(C.colorscale)||z.isPlainObject(C.colorbar))}var p=["showscale","autocolorscale","colorscale","reversescale","colorbar"],f=["min","max","mid","auto"];function v(E){var D=E._colorAx,g=D||E,C={},I,N,F;for(N=0;N<p.length;N++)F=p[N],C[F]=g[F];if(D)for(I="c",N=0;N<f.length;N++)F=f[N],C[F]=g["c"+F];else{var k;for(N=0;N<f.length;N++){if(F=f[N],k="c"+F,k in g){C[F]=g[k];continue}k="z"+F,k in g&&(C[F]=g[k])}I=k.charAt(0)}return C._sync=function(P,T){var y=f.indexOf(P)!==-1?I+P:P;g[y]=g["_"+y]=T},C}function h(E){for(var D=v(E),g=D.min,C=D.max,I=D.reversescale?m(D.colorscale):D.colorscale,N=I.length,F=new Array(N),k=new Array(N),P=0;P<N;P++){var T=I[P];F[P]=g+T[0]*(C-g),k[P]=T[1]}return{domain:F,range:k}}function m(E){for(var D=E.length,g=new Array(D),C=D-1,I=0;C>=0;C--,I++){var N=E[C];g[I]=[1-N[0],N[1]]}return g}function _(E,D){D=D||{};for(var g=E.domain,C=E.range,I=C.length,N=new Array(I),F=0;F<I;F++){var k=R(C[F]).toRgb();N[F]=[k.r,k.g,k.b,k.a]}var P=w.scale.linear().domain(g).range(N).clamp(!0),T=D.noNumericCheck,y=D.returnArray,S;return T&&y?S=P:T?S=function(M){return A(P(M))}:y?S=function(M){return O(M)?P(M):R(M).isValid()?M:l.defaultLine}:S=function(M){return O(M)?A(P(M)):R(M).isValid()?M:l.defaultLine},S.domain=P.domain,S.range=function(){return C},S}function x(E,D){return _(h(E),D)}function A(E){var D={r:E[0],g:E[1],b:E[2],a:E[3]};return R(D).toRgbString()}le.exports={hasColorscale:c,extractOpts:v,extractScale:h,flipScale:m,makeColorScaleFunc:_,makeColorScaleFuncFromTrace:x}}}),Wp=U({"src/plots/cartesian/axis_format_attributes.js"(pe,le){var w=Il(),R=w.FORMAT_LINK,O=w.DATE_FORMAT_LINK;function z(c,p){return{valType:"string",dflt:"",editType:"none",description:(p?l:u)("hover text",c)+["By default the values are formatted using "+(p?"generic number format":"`"+c+"axis.hoverformat`")+"."].join(" ")}}function l(c,p){return["Sets the "+c+" formatting rule"+(p?"for `"+p+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+R+"."].join(" ")}function u(c,p){return l(c,p)+[" And for dates see: "+O+".","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(" ")}le.exports={axisHoverFormat:z,descriptionOnlyNumbers:l,descriptionWithDates:u}}}),Hg=U({"src/plots/cartesian/layout_attributes.js"(pe,le){var w=Ir(),R=jn(),O=jl().dash,z=Ar().extendFlat,l=Tc().templatedArray;Js().templateFormatStringDescription;var u=Wp().descriptionWithDates,c=Dt().ONEDAY,p=pf(),f=p.HOUR_PATTERN,v=p.WEEKDAY_PATTERN,h={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},m=z({},h,{values:h.values.slice().concat(["sync"])});function _(T){return{valType:"integer",min:0,dflt:T?5:0,editType:"ticks"}}var x={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},A={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},E={valType:"data_array",editType:"ticks"},D={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function g(T){var y={valType:"number",min:0,editType:"ticks"};return T||(y.dflt=5),y}function C(T){var y={valType:"number",min:0,editType:"ticks"};return T||(y.dflt=1),y}var I={valType:"color",dflt:R.defaultLine,editType:"ticks"},N={valType:"color",dflt:R.lightLine,editType:"ticks"};function F(T){var y={valType:"number",min:0,editType:"ticks"};return T||(y.dflt=1),y}var k=z({},O,{editType:"ticks"}),P={valType:"boolean",editType:"ticks"};le.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:R.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:w({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:[p.idRegex.x.toString(),p.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:[p.idRegex.x.toString(),p.idRegex.y.toString()],editType:"calc"},rangebreaks:l("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:[v,f,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:c},editType:"calc"}),tickmode:m,nticks:_(),tick0:x,dtick:A,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:E,ticktext:{valType:"data_array",editType:"ticks"},ticks:D,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:g(),tickwidth:C(),tickcolor:I,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:z({},O,{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:w({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"],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:u("tick label")},tickformatstops:l("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:u("hover text")},unifiedhovertitle:{text:{valType:"string",dflt:"",editType:"none"},editType:"none"},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:R.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:P,gridcolor:N,gridwidth:F(),griddash:k,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:R.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:R.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",p.idRegex.x.toString(),p.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",p.idRegex.x.toString(),p.idRegex.y.toString()],editType:"plot"},minor:{tickmode:h,nticks:_("minor"),tick0:x,dtick:A,tickvals:E,ticks:D,ticklen:g("minor"),tickwidth:C("minor"),tickcolor:I,gridcolor:N,gridwidth:F("minor"),griddash:k,showgrid:P,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"}}}),G_=U({"src/components/colorbar/attributes.js"(pe,le){var w=Hg(),R=Ir(),O=Ar().extendFlat,z=zl().overrideAll;le.exports=z({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:w.linecolor,outlinewidth:w.linewidth,bordercolor:w.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:w.minor.tickmode,nticks:w.nticks,tick0:w.tick0,dtick:w.dtick,tickvals:w.tickvals,ticktext:w.ticktext,ticks:O({},w.ticks,{dflt:""}),ticklabeloverflow:O({},w.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:w.ticklen,tickwidth:w.tickwidth,tickcolor:w.tickcolor,ticklabelstep:w.ticklabelstep,showticklabels:w.showticklabels,labelalias:w.labelalias,tickfont:R({}),tickangle:w.tickangle,tickformat:w.tickformat,tickformatstops:w.tickformatstops,tickprefix:w.tickprefix,showtickprefix:w.showtickprefix,ticksuffix:w.ticksuffix,showticksuffix:w.showticksuffix,separatethousands:w.separatethousands,exponentformat:w.exponentformat,minexponent:w.minexponent,showexponent:w.showexponent,title:{text:{valType:"string"},font:R({}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")}}),Jd=U({"src/components/colorscale/attributes.js"(pe,le){var w=G_(),R=On().counter,O=pa(),z=Vn().scales;O(z),le.exports=function(u,c){u=u||"",c=c||{};var p=c.cLetter||"c";"onlyIfNumerical"in c&&c.onlyIfNumerical;var f="noScale"in c?c.noScale:u==="marker.line",v="showScaleDflt"in c?c.showScaleDflt:p==="z",h=typeof c.colorscaleDflt=="string"?z[c.colorscaleDflt]:null,m=c.editTypeOverride||"",_;"colorAttr"in c?(_=c.colorAttr,c.colorAttr):_={z:"z",c:"color"}[p];var x=p+"auto",A=p+"min",E=p+"max",D=p+"mid",g={};g[A]=g[E]=void 0;var C={};C[x]=!1;var I={};return _==="color"&&(I.color={valType:"color",arrayOk:!0,editType:m||"style"},c.anim&&(I.color.anim=!0)),I[x]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:g},I[A]={valType:"number",dflt:null,editType:m||"plot",impliedEdits:C},I[E]={valType:"number",dflt:null,editType:m||"plot",impliedEdits:C},I[D]={valType:"number",dflt:null,editType:"calc",impliedEdits:g},I.colorscale={valType:"colorscale",editType:"calc",dflt:h,impliedEdits:{autocolorscale:!1}},I.autocolorscale={valType:"boolean",dflt:c.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},I.reversescale={valType:"boolean",dflt:!1,editType:"plot"},f||(I.showscale={valType:"boolean",dflt:v,editType:"calc"},I.colorbar=w),c.noColorAxis||(I.coloraxis={valType:"subplotid",regex:R("coloraxis"),dflt:null,editType:"calc"}),I}}}),pA=U({"src/components/colorscale/layout_attributes.js"(pe,le){var w=Ar().extendFlat,R=Jd(),O=Vn().scales;le.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:O.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:O.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:O.RdBu,editType:"calc"}},coloraxis:w({_isSubplotObj:!0,editType:"calc"},R("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}}}),xE=U({"src/components/colorbar/has_colorbar.js"(pe,le){var w=ii();le.exports=function(O){return w.isPlainObject(O.colorbar)}}}),lM=U({"src/plots/cartesian/clean_ticks.js"(pe){var le=_t(),w=ii(),R=Dt(),O=R.ONEDAY,z=R.ONEWEEK;pe.dtick=function(l,u){var c=u==="log",p=u==="date",f=u==="category",v=p?O:1;if(!l)return v;if(le(l))return l=Number(l),l<=0?v:f?Math.max(1,Math.round(l)):p?Math.max(.1,l):l;if(typeof l!="string"||!(p||c))return v;var h=l.charAt(0),m=l.substr(1);return m=le(m)?Number(m):0,m<=0||!(p&&h==="M"&&m===Math.round(m)||c&&h==="L"||c&&h==="D"&&(m===1||m===2))?v:l},pe.tick0=function(l,u,c,p){if(u==="date")return w.cleanDate(l,w.dateTick0(c,p%z===0?1:0));if(!(p==="D1"||p==="D2"))return le(l)?Number(l):0}}}),n_=U({"src/plots/cartesian/tick_value_defaults.js"(pe,le){var w=lM(),R=ii().isArrayOrTypedArray,O=dr().isTypedArraySpec,z=dr().decodeTypedArraySpec;le.exports=function(u,c,p,f,v){v||(v={});var h=v.isMinor,m=h?u.minor||{}:u,_=h?c.minor:c,x=h?"minor.":"";function A(k){var P=m[k];return O(P)&&(P=z(P)),P!==void 0?P:(_._template||{})[k]}var E=A("tick0"),D=A("dtick"),g=A("tickvals"),C=R(g)?"array":D?"linear":"auto",I=p(x+"tickmode",C);if(I==="auto"||I==="sync")p(x+"nticks");else if(I==="linear"){var N=_.dtick=w.dtick(D,f);_.tick0=w.tick0(E,f,c.calendar,N)}else if(f!=="multicategory"){var F=p(x+"tickvals");F===void 0?_.tickmode="auto":h||p("ticktext")}}}}),rb=U({"src/plots/cartesian/tick_mark_defaults.js"(pe,le){var w=ii(),R=Hg();le.exports=function(z,l,u,c){var p=c.isMinor,f=p?z.minor||{}:z,v=p?l.minor:l,h=p?R.minor:R,m=p?"minor.":"",_=w.coerce2(f,v,h,"ticklen",p?(l.ticklen||5)*.6:void 0),x=w.coerce2(f,v,h,"tickwidth",p?l.tickwidth||1:void 0),A=w.coerce2(f,v,h,"tickcolor",(p?l.tickcolor:void 0)||v.color),E=u(m+"ticks",!p&&c.outerTicks||_||x||A?"outside":"");E||(delete v.ticklen,delete v.tickwidth,delete v.tickcolor)}}}),J2=U({"src/plots/cartesian/show_dflt.js"(pe,le){le.exports=function(R){var O=["showexponent","showtickprefix","showticksuffix"],z=O.filter(function(u){return R[u]!==void 0}),l=function(u){return R[u]===R[z[0]]};if(z.every(l)||z.length===1)return R[z[0]]}}}),_g=U({"src/plots/array_container_defaults.js"(pe,le){var w=ii(),R=Tc();le.exports=function(z,l,u){var c=u.name,p=u.inclusionAttr||"visible",f=l[c],v=w.isArrayOrTypedArray(z[c])?z[c]:[],h=l[c]=[],m=R.arrayTemplater(l,c,p),_,x;for(_=0;_<v.length;_++){var A=v[_];w.isPlainObject(A)?x=m.newItem(A):(x=m.newItem({}),x[p]=!1),x._index=_,x[p]!==!1&&u.handleItemDefaults(A,x,l,u),h.push(x)}var E=m.defaultItems();for(_=0;_<E.length;_++)x=E[_],x._index=h.length,u.handleItemDefaults({},x,l,u,{}),h.push(x);if(w.isArrayOrTypedArray(f)){var D=Math.min(f.length,h.length);for(_=0;_<D;_++)w.relinkPrivateKeys(h[_],f[_])}return h}}}),A1=U({"src/plots/cartesian/tick_label_defaults.js"(pe,le){var w=ii(),R=Lr().contrast,O=Hg(),z=J2(),l=_g();le.exports=function(p,f,v,h,m){m||(m={});var _=v("labelalias");w.isPlainObject(_)||delete f.labelalias;var x=z(p),A=v("showticklabels");if(A){m.noTicklabelshift||v("ticklabelshift"),m.noTicklabelstandoff||v("ticklabelstandoff");var E=m.font||{},D=f.color,g=f.ticklabelposition||"",C=g.indexOf("inside")!==-1?R(m.bgColor):D&&D!==O.color.dflt?D:E.color;if(w.coerceFont(v,"tickfont",E,{overrideDflt:{color:C}}),!m.noTicklabelstep&&h!=="multicategory"&&h!=="log"&&v("ticklabelstep"),!m.noAng){var I=v("tickangle");!m.noAutotickangles&&I==="auto"&&v("autotickangles")}if(h!=="category"){var N=v("tickformat");l(p,f,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:u}),f.tickformatstops.length||delete f.tickformatstops,!m.noExp&&!N&&h!=="date"&&(v("showexponent",x),v("exponentformat"),v("minexponent"),v("separatethousands"))}!m.noMinorloglabels&&h==="log"&&v("minorloglabels")}};function u(c,p){function f(h,m){return w.coerce(c,p,O.tickformatstops,h,m)}var v=f("enabled");v&&(f("dtickrange"),f("value"))}}}),Xw=U({"src/plots/cartesian/prefix_suffix_defaults.js"(pe,le){var w=J2();le.exports=function(O,z,l,u,c){c||(c={});var p=c.tickSuffixDflt,f=w(O),v=l("tickprefix");v&&l("showtickprefix",f);var h=l("ticksuffix",p);h&&l("showticksuffix",f)}}}),vA=U({"src/components/colorbar/defaults.js"(pe,le){var w=ii(),R=Tc(),O=n_(),z=rb(),l=A1(),u=Xw(),c=G_();le.exports=function(f,v,h){var m=R.newContainer(v,"colorbar"),_=f.colorbar||{};function x(G,ee){return w.coerce(_,m,c,G,ee)}var A=h.margin||{t:0,b:0,l:0,r:0},E=h.width-A.l-A.r,D=h.height-A.t-A.b,g=x("orientation"),C=g==="v",I=x("thicknessmode");x("thickness",I==="fraction"?30/(C?E:D):30);var N=x("lenmode");x("len",N==="fraction"?1:C?D:E);var F=x("yref"),k=x("xref"),P=F==="paper",T=k==="paper",y,S,M,W="left";C?(M="middle",W=T?"left":"right",y=T?1.02:1,S=.5):(M=P?"bottom":"top",W="center",y=.5,S=P?1.02:1),w.coerce(_,m,{x:{valType:"number",min:T?-2:0,max:T?3:1,dflt:y}},"x"),w.coerce(_,m,{y:{valType:"number",min:P?-2:0,max:P?3:1,dflt:S}},"y"),x("xanchor",W),x("xpad"),x("yanchor",M),x("ypad"),w.noneOrAll(_,m,["x","y"]),x("outlinecolor"),x("outlinewidth"),x("bordercolor"),x("borderwidth"),x("bgcolor");var $=w.coerce(_,m,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:C?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");x("ticklabeloverflow",$.indexOf("inside")!==-1?"hide past domain":"hide past div"),O(_,m,x,"linear");var Z=h.font,K={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:Z};$.indexOf("inside")!==-1&&(K.bgColor="black"),u(_,m,x,"linear",K),l(_,m,x,"linear",K),z(_,m,x,"linear",K),x("title.text",h._dfltTitle.colorbar);var Q=m.showticklabels?m.tickfont:Z,J=w.extendFlat({},Z,{family:Q.family,size:w.bigFont(Q.size)});w.coerceFont(x,"title.font",J),x("title.side",C?"top":"right")}}}),wg=U({"src/components/colorscale/defaults.js"(pe,le){var w=_t(),R=ii(),O=xE(),z=vA(),l=Vn().isValid,u=Mi().traceIs;function c(p,f){var v=f.slice(0,f.length-1);return f?R.nestedProperty(p,v).get()||{}:p}le.exports=function p(f,v,h,m,_){var x=_.prefix,A=_.cLetter,E="_module"in v,D=c(f,x),g=c(v,x),C=c(v._template||{},x)||{},I=function(){return delete f.coloraxis,delete v.coloraxis,p(f,v,h,m,_)};if(E){var N=h._colorAxes||{},F=m(x+"coloraxis");if(F){var k=u(v,"contour")&&R.nestedProperty(v,"contours.coloring").get()||"heatmap",P=N[F];P?(P[2].push(I),P[0]!==k&&(P[0]=!1,R.warn(["Ignoring coloraxis:",F,"setting","as it is linked to incompatible colorscales."].join(" ")))):N[F]=[k,v,[I]];return}}var T=D[A+"min"],y=D[A+"max"],S=w(T)&&w(y)&&T<y,M=m(x+A+"auto",!S);M?m(x+A+"mid"):(m(x+A+"min"),m(x+A+"max"));var W=D.colorscale,$=C.colorscale,Z;if(W!==void 0&&(Z=!l(W)),$!==void 0&&(Z=!l($)),m(x+"autocolorscale",Z),m(x+"colorscale"),m(x+"reversescale"),x!=="marker.line."){var K;x&&E&&(K=O(D));var Q=m(x+"showscale",K);Q&&(x&&C&&(g._template=C),z(D,g,h))}}}}),Pp=U({"src/components/colorscale/layout_defaults.js"(pe,le){var w=ii(),R=Tc(),O=pA(),z=wg();le.exports=function(u,c){function p(E,D){return w.coerce(u,c,O,E,D)}p("colorscale.sequential"),p("colorscale.sequentialminus"),p("colorscale.diverging");var f=c._colorAxes,v,h;function m(E,D){return w.coerce(v,h,O.coloraxis,E,D)}for(var _ in f){var x=f[_];if(x[0])v=u[_]||{},h=R.newContainer(c,_,"coloraxis"),h._name=_,z(v,h,c,m,{prefix:"",cLetter:"c"});else{for(var A=0;A<x[2].length;A++)x[2][A]();delete c._colorAxes[_]}}}}}),jp=U({"src/components/colorscale/cross_trace_defaults.js"(pe,le){var w=ii(),R=Ug().hasColorscale,O=Ug().extractOpts;le.exports=function(l,u){function c(x,A){var E=x["_"+A];E!==void 0&&(x[A]=E)}function p(x,A){var E=A.container?w.nestedProperty(x,A.container).get():x;if(E)if(E.coloraxis)E._colorAx=u[E.coloraxis];else{var D=O(E),g=D.auto;(g||D.min===void 0)&&c(E,A.min),(g||D.max===void 0)&&c(E,A.max),D.autocolorscale&&c(E,"colorscale")}}for(var f=0;f<l.length;f++){var v=l[f],h=v._module.colorbar;if(h)if(Array.isArray(h))for(var m=0;m<h.length;m++)p(v,h[m]);else p(v,h);R(v,"marker.line")&&p(v,{container:"marker.line",min:"cmin",max:"cmax"})}for(var _ in u._colorAxes)p(u[_],{min:"cmin",max:"cmax"})}}}),t0=U({"src/components/colorscale/calc.js"(pe,le){var w=_t(),R=ii(),O=Ug().extractOpts;le.exports=function(l,u,c){var p=l._fullLayout,f=c.vals,v=c.containerStr,h=v?R.nestedProperty(u,v).get():u,m=O(h),_=m.auto!==!1,x=m.min,A=m.max,E=m.mid,D=function(){return R.aggNums(Math.min,null,f)},g=function(){return R.aggNums(Math.max,null,f)};if(x===void 0?x=D():_&&(h._colorAx&&w(x)?x=Math.min(x,D()):x=D()),A===void 0?A=g():_&&(h._colorAx&&w(A)?A=Math.max(A,g()):A=g()),_&&E!==void 0&&(A-E>E-x?x=E-(A-E):A-E<E-x&&(A=E+(E-x))),x===A&&(x-=.5,A+=.5),m._sync("min",x),m._sync("max",A),m.autocolorscale){var C;x*A<0?C=p.colorscale.diverging:x>=0?C=p.colorscale.sequential:C=p.colorscale.sequentialminus,m._sync("colorscale",C)}}}}),vd=U({"src/components/colorscale/index.js"(pe,le){var w=Vn(),R=Ug();le.exports={moduleType:"component",name:"colorscale",attributes:Jd(),layoutAttributes:pA(),supplyLayoutDefaults:Pp(),handleDefaults:wg(),crossTraceDefaults:jp(),calc:t0(),scales:w.scales,defaultScale:w.defaultScale,getScale:w.get,isValidScale:w.isValid,hasColorscale:R.hasColorscale,extractOpts:R.extractOpts,extractScale:R.extractScale,flipScale:R.flipScale,makeColorScaleFunc:R.makeColorScaleFunc,makeColorScaleFuncFromTrace:R.makeColorScaleFuncFromTrace}}}),Qd=U({"src/traces/scatter/subtypes.js"(pe,le){var w=ii(),R=dr().isTypedArraySpec;le.exports={hasLines:function(O){return O.visible&&O.mode&&O.mode.indexOf("lines")!==-1},hasMarkers:function(O){return O.visible&&(O.mode&&O.mode.indexOf("markers")!==-1||O.type==="splom")},hasText:function(O){return O.visible&&O.mode&&O.mode.indexOf("text")!==-1},isBubble:function(O){var z=O.marker;return w.isPlainObject(z)&&(w.isArrayOrTypedArray(z.size)||R(z.size))}}}}),$_=U({"src/traces/scatter/make_bubble_size_func.js"(pe,le){var w=_t();le.exports=function(O,z){z||(z=2);var l=O.marker,u=l.sizeref||1,c=l.sizemin||0,p=l.sizemode==="area"?function(f){return Math.sqrt(f/u)}:function(f){return f/u};return function(f){var v=p(f/z);return w(v)&&v>0?Math.max(v,c):0}}}}),v0=U({"src/components/fx/helpers.js"(pe){var le=ii();pe.getSubplot=function(u){return u.subplot||u.xaxis+u.yaxis||u.geo},pe.isTraceInSubplots=function(u,c){if(u.type==="splom"){for(var p=u.xaxes||[],f=u.yaxes||[],v=0;v<p.length;v++)for(var h=0;h<f.length;h++)if(c.indexOf(p[v]+f[h])!==-1)return!0;return!1}return c.indexOf(pe.getSubplot(u))!==-1},pe.flat=function(u,c){for(var p=new Array(u.length),f=0;f<u.length;f++)p[f]=c;return p},pe.p2c=function(u,c){for(var p=new Array(u.length),f=0;f<u.length;f++)p[f]=u[f].p2c(c);return p},pe.getDistanceFunction=function(u,c,p,f){return u==="closest"?f||pe.quadrature(c,p):u.charAt(0)==="x"?c:p},pe.getClosest=function(u,c,p){if(p.index!==!1)p.index>=0&&p.index<u.length?p.distance=0:p.index=!1;else for(var f=1/0,v=u.length,h=0;h<v;h++)f=c(u[h]),f<=p.distance&&(p.index=h,p.distance=f);return p},pe.inbox=function(u,c,p){return u*c<0||u===0?p:1/0},pe.quadrature=function(u,c){return function(p){var f=u(p),v=c(p);return Math.sqrt(f*f+v*v)}},pe.makeEventData=function(u,c,p){var f="index"in u?u.index:u.pointNumber,v={data:c._input,fullData:c,curveNumber:c.index,pointNumber:f};if(c._indexToPoints){var h=c._indexToPoints[f];h.length===1?v.pointIndex=h[0]:v.pointIndices=h}else v.pointIndex=f;return c._module.eventData?v=c._module.eventData(v,u,c,p,f):("xVal"in u?v.x=u.xVal:"x"in u&&(v.x=u.x),"yVal"in u?v.y=u.yVal:"y"in u&&(v.y=u.y),u.xa&&(v.xaxis=u.xa),u.ya&&(v.yaxis=u.ya),u.zLabelVal!==void 0&&(v.z=u.zLabelVal)),pe.appendArrayPointValue(v,c,f),v},pe.appendArrayPointValue=function(u,c,p){var f=c._arrayAttrs;if(f)for(var v=0;v<f.length;v++){var h=f[v],m=R(h);if(u[m]===void 0){var _=le.nestedProperty(c,h).get(),x=O(_,p);x!==void 0&&(u[m]=x)}}},pe.appendArrayMultiPointValues=function(u,c,p){var f=c._arrayAttrs;if(f)for(var v=0;v<f.length;v++){var h=f[v],m=R(h);if(u[m]===void 0){for(var _=le.nestedProperty(c,h).get(),x=new Array(p.length),A=0;A<p.length;A++)x[A]=O(_,p[A]);u[m]=x}}};var w={ids:"id",locations:"location",labels:"label",values:"value","marker.colors":"color",parents:"parent"};function R(u){return w[u]||u}function O(u,c){if(Array.isArray(c)){if(Array.isArray(u)&&Array.isArray(u[c[0]]))return u[c[0]][c[1]]}else return u[c]}var z={x:!0,y:!0},l={"x unified":!0,"y unified":!0};pe.isUnifiedHover=function(u){return typeof u!="string"?!1:!!l[u]},pe.isXYhover=function(u){return typeof u!="string"?!1:!!z[u]}}}),mA=U({"node_modules/parse-svg-path/index.js"(pe,le){le.exports=O;var w={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},R=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function O(u){var c=[];return u.replace(R,function(p,f,v){var h=f.toLowerCase();for(v=l(v),h=="m"&&v.length>2&&(c.push([f].concat(v.splice(0,2))),h="l",f=f=="m"?"l":"L");;){if(v.length==w[h])return v.unshift(f),c.push(v);if(v.length<w[h])throw new Error("malformed path data");c.push([f].concat(v.splice(0,w[h])))}}),c}var z=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;function l(u){var c=u.match(z);return c?c.map(Number):[]}}}),W_=U({"src/components/drawing/symbol_defs.js"(pe,le){var w=mA(),R=(function(A,E){return E?Math.round(A*(E=Math.pow(10,E)))/E:Math.round(A)}),O="M0,0Z",z=Math.sqrt(2),l=Math.sqrt(3),u=Math.PI,c=Math.cos,p=Math.sin;le.exports={circle:{n:0,f:function(A,E,D){if(f(E))return O;var g=R(A,2),C="M"+g+",0A"+g+","+g+" 0 1,1 0,-"+g+"A"+g+","+g+" 0 0,1 "+g+",0Z";return D?x(E,D,C):C}},square:{n:1,f:function(A,E,D){if(f(E))return O;var g=R(A,2);return x(E,D,"M"+g+","+g+"H-"+g+"V-"+g+"H"+g+"Z")}},diamond:{n:2,f:function(A,E,D){if(f(E))return O;var g=R(A*1.3,2);return x(E,D,"M"+g+",0L0,"+g+"L-"+g+",0L0,-"+g+"Z")}},cross:{n:3,f:function(A,E,D){if(f(E))return O;var g=R(A*.4,2),C=R(A*1.2,2);return x(E,D,"M"+C+","+g+"H"+g+"V"+C+"H-"+g+"V"+g+"H-"+C+"V-"+g+"H-"+g+"V-"+C+"H"+g+"V-"+g+"H"+C+"Z")}},x:{n:4,f:function(A,E,D){if(f(E))return O;var g=R(A*.8/z,2),C="l"+g+","+g,I="l"+g+",-"+g,N="l-"+g+",-"+g,F="l-"+g+","+g;return x(E,D,"M0,"+g+C+I+N+I+N+F+N+F+C+F+C+"Z")}},"triangle-up":{n:5,f:function(A,E,D){if(f(E))return O;var g=R(A*2/l,2),C=R(A/2,2),I=R(A,2);return x(E,D,"M-"+g+","+C+"H"+g+"L0,-"+I+"Z")}},"triangle-down":{n:6,f:function(A,E,D){if(f(E))return O;var g=R(A*2/l,2),C=R(A/2,2),I=R(A,2);return x(E,D,"M-"+g+",-"+C+"H"+g+"L0,"+I+"Z")}},"triangle-left":{n:7,f:function(A,E,D){if(f(E))return O;var g=R(A*2/l,2),C=R(A/2,2),I=R(A,2);return x(E,D,"M"+C+",-"+g+"V"+g+"L-"+I+",0Z")}},"triangle-right":{n:8,f:function(A,E,D){if(f(E))return O;var g=R(A*2/l,2),C=R(A/2,2),I=R(A,2);return x(E,D,"M-"+C+",-"+g+"V"+g+"L"+I+",0Z")}},"triangle-ne":{n:9,f:function(A,E,D){if(f(E))return O;var g=R(A*.6,2),C=R(A*1.2,2);return x(E,D,"M-"+C+",-"+g+"H"+g+"V"+C+"Z")}},"triangle-se":{n:10,f:function(A,E,D){if(f(E))return O;var g=R(A*.6,2),C=R(A*1.2,2);return x(E,D,"M"+g+",-"+C+"V"+g+"H-"+C+"Z")}},"triangle-sw":{n:11,f:function(A,E,D){if(f(E))return O;var g=R(A*.6,2),C=R(A*1.2,2);return x(E,D,"M"+C+","+g+"H-"+g+"V-"+C+"Z")}},"triangle-nw":{n:12,f:function(A,E,D){if(f(E))return O;var g=R(A*.6,2),C=R(A*1.2,2);return x(E,D,"M-"+g+","+C+"V-"+g+"H"+C+"Z")}},pentagon:{n:13,f:function(A,E,D){if(f(E))return O;var g=R(A*.951,2),C=R(A*.588,2),I=R(-A,2),N=R(A*-.309,2),F=R(A*.809,2);return x(E,D,"M"+g+","+N+"L"+C+","+F+"H-"+C+"L-"+g+","+N+"L0,"+I+"Z")}},hexagon:{n:14,f:function(A,E,D){if(f(E))return O;var g=R(A,2),C=R(A/2,2),I=R(A*l/2,2);return x(E,D,"M"+I+",-"+C+"V"+C+"L0,"+g+"L-"+I+","+C+"V-"+C+"L0,-"+g+"Z")}},hexagon2:{n:15,f:function(A,E,D){if(f(E))return O;var g=R(A,2),C=R(A/2,2),I=R(A*l/2,2);return x(E,D,"M-"+C+","+I+"H"+C+"L"+g+",0L"+C+",-"+I+"H-"+C+"L-"+g+",0Z")}},octagon:{n:16,f:function(A,E,D){if(f(E))return O;var g=R(A*.924,2),C=R(A*.383,2);return x(E,D,"M-"+C+",-"+g+"H"+C+"L"+g+",-"+C+"V"+C+"L"+C+","+g+"H-"+C+"L-"+g+","+C+"V-"+C+"Z")}},star:{n:17,f:function(A,E,D){if(f(E))return O;var g=A*1.4,C=R(g*.225,2),I=R(g*.951,2),N=R(g*.363,2),F=R(g*.588,2),k=R(-g,2),P=R(g*-.309,2),T=R(g*.118,2),y=R(g*.809,2),S=R(g*.382,2);return x(E,D,"M"+C+","+P+"H"+I+"L"+N+","+T+"L"+F+","+y+"L0,"+S+"L-"+F+","+y+"L-"+N+","+T+"L-"+I+","+P+"H-"+C+"L0,"+k+"Z")}},hexagram:{n:18,f:function(A,E,D){if(f(E))return O;var g=R(A*.66,2),C=R(A*.38,2),I=R(A*.76,2);return x(E,D,"M-"+I+",0l-"+C+",-"+g+"h"+I+"l"+C+",-"+g+"l"+C+","+g+"h"+I+"l-"+C+","+g+"l"+C+","+g+"h-"+I+"l-"+C+","+g+"l-"+C+",-"+g+"h-"+I+"Z")}},"star-triangle-up":{n:19,f:function(A,E,D){if(f(E))return O;var g=R(A*l*.8,2),C=R(A*.8,2),I=R(A*1.6,2),N=R(A*4,2),F="A "+N+","+N+" 0 0 1 ";return x(E,D,"M-"+g+","+C+F+g+","+C+F+"0,-"+I+F+"-"+g+","+C+"Z")}},"star-triangle-down":{n:20,f:function(A,E,D){if(f(E))return O;var g=R(A*l*.8,2),C=R(A*.8,2),I=R(A*1.6,2),N=R(A*4,2),F="A "+N+","+N+" 0 0 1 ";return x(E,D,"M"+g+",-"+C+F+"-"+g+",-"+C+F+"0,"+I+F+g+",-"+C+"Z")}},"star-square":{n:21,f:function(A,E,D){if(f(E))return O;var g=R(A*1.1,2),C=R(A*2,2),I="A "+C+","+C+" 0 0 1 ";return x(E,D,"M-"+g+",-"+g+I+"-"+g+","+g+I+g+","+g+I+g+",-"+g+I+"-"+g+",-"+g+"Z")}},"star-diamond":{n:22,f:function(A,E,D){if(f(E))return O;var g=R(A*1.4,2),C=R(A*1.9,2),I="A "+C+","+C+" 0 0 1 ";return x(E,D,"M-"+g+",0"+I+"0,"+g+I+g+",0"+I+"0,-"+g+I+"-"+g+",0Z")}},"diamond-tall":{n:23,f:function(A,E,D){if(f(E))return O;var g=R(A*.7,2),C=R(A*1.4,2);return x(E,D,"M0,"+C+"L"+g+",0L0,-"+C+"L-"+g+",0Z")}},"diamond-wide":{n:24,f:function(A,E,D){if(f(E))return O;var g=R(A*1.4,2),C=R(A*.7,2);return x(E,D,"M0,"+C+"L"+g+",0L0,-"+C+"L-"+g+",0Z")}},hourglass:{n:25,f:function(A,E,D){if(f(E))return O;var g=R(A,2);return x(E,D,"M"+g+","+g+"H-"+g+"L"+g+",-"+g+"H-"+g+"Z")},noDot:!0},bowtie:{n:26,f:function(A,E,D){if(f(E))return O;var g=R(A,2);return x(E,D,"M"+g+","+g+"V-"+g+"L-"+g+","+g+"V-"+g+"Z")},noDot:!0},"circle-cross":{n:27,f:function(A,E,D){if(f(E))return O;var g=R(A,2);return x(E,D,"M0,"+g+"V-"+g+"M"+g+",0H-"+g+"M"+g+",0A"+g+","+g+" 0 1,1 0,-"+g+"A"+g+","+g+" 0 0,1 "+g+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(A,E,D){if(f(E))return O;var g=R(A,2),C=R(A/z,2);return x(E,D,"M"+C+","+C+"L-"+C+",-"+C+"M"+C+",-"+C+"L-"+C+","+C+"M"+g+",0A"+g+","+g+" 0 1,1 0,-"+g+"A"+g+","+g+" 0 0,1 "+g+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(A,E,D){if(f(E))return O;var g=R(A,2);return x(E,D,"M0,"+g+"V-"+g+"M"+g+",0H-"+g+"M"+g+","+g+"H-"+g+"V-"+g+"H"+g+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(A,E,D){if(f(E))return O;var g=R(A,2);return x(E,D,"M"+g+","+g+"L-"+g+",-"+g+"M"+g+",-"+g+"L-"+g+","+g+"M"+g+","+g+"H-"+g+"V-"+g+"H"+g+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(A,E,D){if(f(E))return O;var g=R(A*1.3,2);return x(E,D,"M"+g+",0L0,"+g+"L-"+g+",0L0,-"+g+"ZM0,-"+g+"V"+g+"M-"+g+",0H"+g)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(A,E,D){if(f(E))return O;var g=R(A*1.3,2),C=R(A*.65,2);return x(E,D,"M"+g+",0L0,"+g+"L-"+g+",0L0,-"+g+"ZM-"+C+",-"+C+"L"+C+","+C+"M-"+C+","+C+"L"+C+",-"+C)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(A,E,D){if(f(E))return O;var g=R(A*1.4,2);return x(E,D,"M0,"+g+"V-"+g+"M"+g+",0H-"+g)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(A,E,D){if(f(E))return O;var g=R(A,2);return x(E,D,"M"+g+","+g+"L-"+g+",-"+g+"M"+g+",-"+g+"L-"+g+","+g)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(A,E,D){if(f(E))return O;var g=R(A*1.2,2),C=R(A*.85,2);return x(E,D,"M0,"+g+"V-"+g+"M"+g+",0H-"+g+"M"+C+","+C+"L-"+C+",-"+C+"M"+C+",-"+C+"L-"+C+","+C)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(A,E,D){if(f(E))return O;var g=R(A/2,2),C=R(A,2);return x(E,D,"M"+g+","+C+"V-"+C+"M"+(g-C)+",-"+C+"V"+C+"M"+C+","+g+"H-"+C+"M-"+C+","+(g-C)+"H"+C)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(A,E,D){if(f(E))return O;var g=R(A*1.2,2),C=R(A*1.6,2),I=R(A*.8,2);return x(E,D,"M-"+g+","+I+"L0,0M"+g+","+I+"L0,0M0,-"+C+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(A,E,D){if(f(E))return O;var g=R(A*1.2,2),C=R(A*1.6,2),I=R(A*.8,2);return x(E,D,"M-"+g+",-"+I+"L0,0M"+g+",-"+I+"L0,0M0,"+C+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(A,E,D){if(f(E))return O;var g=R(A*1.2,2),C=R(A*1.6,2),I=R(A*.8,2);return x(E,D,"M"+I+","+g+"L0,0M"+I+",-"+g+"L0,0M-"+C+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(A,E,D){if(f(E))return O;var g=R(A*1.2,2),C=R(A*1.6,2),I=R(A*.8,2);return x(E,D,"M-"+I+","+g+"L0,0M-"+I+",-"+g+"L0,0M"+C+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(A,E,D){if(f(E))return O;var g=R(A*1.4,2);return x(E,D,"M"+g+",0H-"+g)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(A,E,D){if(f(E))return O;var g=R(A*1.4,2);return x(E,D,"M0,"+g+"V-"+g)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(A,E,D){if(f(E))return O;var g=R(A,2);return x(E,D,"M"+g+",-"+g+"L-"+g+","+g)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(A,E,D){if(f(E))return O;var g=R(A,2);return x(E,D,"M"+g+","+g+"L-"+g+",-"+g)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(A,E,D){if(f(E))return O;var g=R(A,2),C=R(A*2,2);return x(E,D,"M0,0L-"+g+","+C+"H"+g+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(A,E,D){if(f(E))return O;var g=R(A,2),C=R(A*2,2);return x(E,D,"M0,0L-"+g+",-"+C+"H"+g+"Z")},noDot:!0},"arrow-left":{n:47,f:function(A,E,D){if(f(E))return O;var g=R(A*2,2),C=R(A,2);return x(E,D,"M0,0L"+g+",-"+C+"V"+C+"Z")},noDot:!0},"arrow-right":{n:48,f:function(A,E,D){if(f(E))return O;var g=R(A*2,2),C=R(A,2);return x(E,D,"M0,0L-"+g+",-"+C+"V"+C+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(A,E,D){if(f(E))return O;var g=R(A,2),C=R(A*2,2);return x(E,D,"M-"+g+",0H"+g+"M0,0L-"+g+","+C+"H"+g+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(A,E,D){if(f(E))return O;var g=R(A,2),C=R(A*2,2);return x(E,D,"M-"+g+",0H"+g+"M0,0L-"+g+",-"+C+"H"+g+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(A,E,D){if(f(E))return O;var g=R(A*2,2),C=R(A,2);return x(E,D,"M0,-"+C+"V"+C+"M0,0L"+g+",-"+C+"V"+C+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(A,E,D){if(f(E))return O;var g=R(A*2,2),C=R(A,2);return x(E,D,"M0,-"+C+"V"+C+"M0,0L-"+g+",-"+C+"V"+C+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(A,E,D){if(f(E))return O;var g=u/2.5,C=2*A*c(g),I=2*A*p(g);return x(E,D,"M0,0L"+-C+","+I+"L"+C+","+I+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(A,E,D){if(f(E))return O;var g=u/4,C=2*A*c(g),I=2*A*p(g);return x(E,D,"M0,0L"+-C+","+I+"A "+2*A+","+2*A+" 0 0 1 "+C+","+I+"Z")},backoff:.4,noDot:!0}};function f(A){return A===null}var v,h,m,_;function x(A,E,D){if((!A||A%360===0)&&!E)return D;if(m===A&&_===E&&v===D)return h;m=A,_=E,v=D;function g(Z,K){var Q=c(Z),J=p(Z),G=K[0],ee=K[1]+(E||0);return[G*Q-ee*J,G*J+ee*Q]}for(var C=A/180*u,I=0,N=0,F=w(D),k="",P=0;P<F.length;P++){var T=F[P],y=T[0],S=I,M=N;if(y==="M"||y==="L")I=+T[1],N=+T[2];else if(y==="m"||y==="l")I+=+T[1],N+=+T[2];else if(y==="H")I=+T[1];else if(y==="h")I+=+T[1];else if(y==="V")N=+T[1];else if(y==="v")N+=+T[1];else if(y==="A"){I=+T[1],N=+T[2];var W=g(C,[+T[6],+T[7]]);T[6]=W[0],T[7]=W[1],T[3]=+T[3]+A}(y==="H"||y==="V")&&(y="L"),(y==="h"||y==="v")&&(y="l"),(y==="m"||y==="l")&&(I-=S,N-=M);var $=g(C,[I,N]);(y==="H"||y==="V")&&(y="L"),(y==="M"||y==="L"||y==="m"||y==="l")&&(T[1]=$[0],T[2]=$[1]),T[0]=y,k+=T[0]+T.slice(1).join(",")}return h=k,k}}}),ec=U({"src/components/drawing/index.js"(pe,le){var w=Ze(),R=ii(),O=R.numberFormat,z=_t(),l=or(),u=Mi(),c=Lr(),p=vd(),f=R.strTranslate,v=ah(),h=E1(),m=tg(),_=m.LINE_SPACING,x=Yn().DESELECTDIM,A=Qd(),E=$_(),D=v0().appendArrayPointValue,g=le.exports={};g.font=function(st,rt){var Ue=rt.variant,xt=rt.style,Gt=rt.weight,Jt=rt.color,Ut=rt.size,kr=rt.family,Pr=rt.shadow,$r=rt.lineposition,rn=rt.textcase;kr&&st.style("font-family",kr),Ut+1&&st.style("font-size",Ut+"px"),Jt&&st.call(c.fill,Jt),Gt&&st.style("font-weight",Gt),xt&&st.style("font-style",xt),Ue&&st.style("font-variant",Ue),rn&&st.style("text-transform",C(N(rn))),Pr&&st.style("text-shadow",Pr==="auto"?v.makeTextShadow(c.contrast(Jt)):C(Pr)),$r&&st.style("text-decoration-line",C(F($r)))};function C(st){return st==="none"?void 0:st}var I={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function N(st){return I[st]}function F(st){return st.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}g.setPosition=function(st,rt,Ue){st.attr("x",rt).attr("y",Ue)},g.setSize=function(st,rt,Ue){st.attr("width",rt).attr("height",Ue)},g.setRect=function(st,rt,Ue,xt,Gt){st.call(g.setPosition,rt,Ue).call(g.setSize,xt,Gt)},g.translatePoint=function(st,rt,Ue,xt){var Gt=Ue.c2p(st.x),Jt=xt.c2p(st.y);if(z(Gt)&&z(Jt)&&rt.node())rt.node().nodeName==="text"?rt.attr("x",Gt).attr("y",Jt):rt.attr("transform",f(Gt,Jt));else return!1;return!0},g.translatePoints=function(st,rt,Ue){st.each(function(xt){var Gt=w.select(this);g.translatePoint(xt,Gt,rt,Ue)})},g.hideOutsideRangePoint=function(st,rt,Ue,xt,Gt,Jt){rt.attr("display",Ue.isPtWithinRange(st,Gt)&&xt.isPtWithinRange(st,Jt)?null:"none")},g.hideOutsideRangePoints=function(st,rt){if(rt._hasClipOnAxisFalse){var Ue=rt.xaxis,xt=rt.yaxis;st.each(function(Gt){var Jt=Gt[0].trace,Ut=Jt.xcalendar,kr=Jt.ycalendar,Pr=u.traceIs(Jt,"bar-like")?".bartext":".point,.textpoint";st.selectAll(Pr).each(function($r){g.hideOutsideRangePoint($r,w.select(this),Ue,xt,Ut,kr)})})}},g.crispRound=function(st,rt,Ue){return!rt||!z(rt)?Ue||0:st._context.staticPlot?rt:rt<1?1:Math.round(rt)},g.singleLineStyle=function(st,rt,Ue,xt,Gt){rt.style("fill","none");var Jt=(((st||[])[0]||{}).trace||{}).line||{},Ut=Ue||Jt.width||0,kr=Gt||Jt.dash||"";c.stroke(rt,xt||Jt.color),g.dashLine(rt,kr,Ut)},g.lineGroupStyle=function(st,rt,Ue,xt){st.style("fill","none").each(function(Gt){var Jt=(((Gt||[])[0]||{}).trace||{}).line||{},Ut=rt||Jt.width||0,kr=xt||Jt.dash||"";w.select(this).call(c.stroke,Ue||Jt.color).call(g.dashLine,kr,Ut)})},g.dashLine=function(st,rt,Ue){Ue=+Ue||0,rt=g.dashStyle(rt,Ue),st.style({"stroke-dasharray":rt,"stroke-width":Ue+"px"})},g.dashStyle=function(st,rt){rt=+rt||1;var Ue=Math.max(rt,3);return st==="solid"?st="":st==="dot"?st=Ue+"px,"+Ue+"px":st==="dash"?st=3*Ue+"px,"+3*Ue+"px":st==="longdash"?st=5*Ue+"px,"+5*Ue+"px":st==="dashdot"?st=3*Ue+"px,"+Ue+"px,"+Ue+"px,"+Ue+"px":st==="longdashdot"&&(st=5*Ue+"px,"+2*Ue+"px,"+Ue+"px,"+2*Ue+"px"),st};function k(st,rt,Ue,xt){var Gt=rt.fillpattern,Jt=rt.fillgradient,Ut=g.getPatternAttr,kr=Gt&&(Ut(Gt.shape,0,"")||Ut(Gt.path,0,""));if(kr){var Pr=Ut(Gt.bgcolor,0,null),$r=Ut(Gt.fgcolor,0,null),rn=Gt.fgopacity,kn=Ut(Gt.size,0,8),Rn=Ut(Gt.solidity,0,.3),ci=rt.uid;g.pattern(st,"point",Ue,ci,kr,kn,Rn,void 0,Gt.fillmode,Pr,$r,rn)}else if(Jt&&Jt.type!=="none"){var In=Jt.type,Gn="scatterfill-"+rt.uid;if(xt&&(Gn="legendfill-"+rt.uid),!xt&&(Jt.start!==void 0||Jt.stop!==void 0)){var mr,St;In==="horizontal"?(mr={x:Jt.start,y:0},St={x:Jt.stop,y:0}):In==="vertical"&&(mr={x:0,y:Jt.start},St={x:0,y:Jt.stop}),mr.x=rt._xA.c2p(mr.x===void 0?rt._extremes.x.min[0].val:mr.x,!0),mr.y=rt._yA.c2p(mr.y===void 0?rt._extremes.y.min[0].val:mr.y,!0),St.x=rt._xA.c2p(St.x===void 0?rt._extremes.x.max[0].val:St.x,!0),St.y=rt._yA.c2p(St.y===void 0?rt._extremes.y.max[0].val:St.y,!0),st.call($,Ue,Gn,"linear",Jt.colorscale,"fill",mr,St,!0,!1)}else In==="horizontal"&&(In=In+"reversed"),st.call(g.gradient,Ue,Gn,In,Jt.colorscale,"fill")}else rt.fillcolor&&st.call(c.fill,rt.fillcolor)}g.singleFillStyle=function(st,rt){var Ue=w.select(st.node()),xt=Ue.data(),Gt=((xt[0]||[])[0]||{}).trace||{};k(st,Gt,rt,!1)},g.fillGroupStyle=function(st,rt,Ue){st.style("stroke-width",0).each(function(xt){var Gt=w.select(this);xt[0].trace&&k(Gt,xt[0].trace,rt,Ue)})};var P=W_();g.symbolNames=[],g.symbolFuncs=[],g.symbolBackOffs=[],g.symbolNeedLines={},g.symbolNoDot={},g.symbolNoFill={},g.symbolList=[],Object.keys(P).forEach(function(st){var rt=P[st],Ue=rt.n;g.symbolList.push(Ue,String(Ue),st,Ue+100,String(Ue+100),st+"-open"),g.symbolNames[Ue]=st,g.symbolFuncs[Ue]=rt.f,g.symbolBackOffs[Ue]=rt.backoff||0,rt.needLine&&(g.symbolNeedLines[Ue]=!0),rt.noDot?g.symbolNoDot[Ue]=!0:g.symbolList.push(Ue+200,String(Ue+200),st+"-dot",Ue+300,String(Ue+300),st+"-open-dot"),rt.noFill&&(g.symbolNoFill[Ue]=!0)});var T=g.symbolNames.length,y="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";g.symbolNumber=function(st){if(z(st))st=+st;else if(typeof st=="string"){var rt=0;st.indexOf("-open")>0&&(rt=100,st=st.replace("-open","")),st.indexOf("-dot")>0&&(rt+=200,st=st.replace("-dot","")),st=g.symbolNames.indexOf(st),st>=0&&(st+=rt)}return st%100>=T||st>=400?0:Math.floor(Math.max(st,0))};function S(st,rt,Ue,xt){var Gt=st%100;return g.symbolFuncs[Gt](rt,Ue,xt)+(st>=200?y:"")}var M=O("~f"),W={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};g.gradient=function(st,rt,Ue,xt,Gt,Jt){var Ut=W[xt];return $(st,rt,Ue,Ut.type,Gt,Jt,Ut.start,Ut.stop,!1,Ut.reversed)};function $(st,rt,Ue,xt,Gt,Jt,Ut,kr,Pr,$r){var rn=Gt.length,kn;xt==="linear"?kn={node:"linearGradient",attrs:{x1:Ut.x,y1:Ut.y,x2:kr.x,y2:kr.y,gradientUnits:Pr?"userSpaceOnUse":"objectBoundingBox"},reversed:$r}:xt==="radial"&&(kn={node:"radialGradient",reversed:$r});for(var Rn=new Array(rn),ci=0;ci<rn;ci++)kn.reversed?Rn[rn-1-ci]=[M((1-Gt[ci][0])*100),Gt[ci][1]]:Rn[ci]=[M(Gt[ci][0]*100),Gt[ci][1]];var In=rt._fullLayout,Gn="g"+In._uid+"-"+Ue,mr=In._defs.select(".gradients").selectAll("#"+Gn).data([xt+Rn.join(";")],R.identity);mr.exit().remove(),mr.enter().append(kn.node).each(function(){var St=w.select(this);kn.attrs&&St.attr(kn.attrs),St.attr("id",Gn);var Ot=St.selectAll("stop").data(Rn);Ot.exit().remove(),Ot.enter().append("stop"),Ot.each(function(Et){var je=l(Et[1]);w.select(this).attr({offset:Et[0]+"%","stop-color":c.tinyRGB(je),"stop-opacity":je.getAlpha()})})}),st.style(Jt,De(Gn,rt)).style(Jt+"-opacity",null),st.classed("gradient_filled",!0)}g.pattern=function(st,rt,Ue,xt,Gt,Jt,Ut,kr,Pr,$r,rn,kn){var Rn=rt==="legend";kr&&(Pr==="overlay"?($r=kr,rn=c.contrast($r)):($r=void 0,rn=kr));var ci=Ue._fullLayout,In="p"+ci._uid+"-"+xt,Gn,mr,St=function(Jr,dn,on,Nn,Wi){return Nn+(Wi-Nn)*(Jr-dn)/(on-dn)},Ot,Et,je,Ye,et={},mt=l(rn),Nt=c.tinyRGB(mt),lr=mt.getAlpha(),br=kn*lr;switch(Gt){case"/":Gn=Jt*Math.sqrt(2),mr=Jt*Math.sqrt(2),Ot="M-"+Gn/4+","+mr/4+"l"+Gn/2+",-"+mr/2+"M0,"+mr+"L"+Gn+",0M"+Gn/4*3+","+mr/4*5+"l"+Gn/2+",-"+mr/2,Et=Ut*Jt,Ye="path",et={d:Ot,opacity:br,stroke:Nt,"stroke-width":Et+"px"};break;case"\\":Gn=Jt*Math.sqrt(2),mr=Jt*Math.sqrt(2),Ot="M"+Gn/4*3+",-"+mr/4+"l"+Gn/2+","+mr/2+"M0,0L"+Gn+","+mr+"M-"+Gn/4+","+mr/4*3+"l"+Gn/2+","+mr/2,Et=Ut*Jt,Ye="path",et={d:Ot,opacity:br,stroke:Nt,"stroke-width":Et+"px"};break;case"x":Gn=Jt*Math.sqrt(2),mr=Jt*Math.sqrt(2),Ot="M-"+Gn/4+","+mr/4+"l"+Gn/2+",-"+mr/2+"M0,"+mr+"L"+Gn+",0M"+Gn/4*3+","+mr/4*5+"l"+Gn/2+",-"+mr/2+"M"+Gn/4*3+",-"+mr/4+"l"+Gn/2+","+mr/2+"M0,0L"+Gn+","+mr+"M-"+Gn/4+","+mr/4*3+"l"+Gn/2+","+mr/2,Et=Jt-Jt*Math.sqrt(1-Ut),Ye="path",et={d:Ot,opacity:br,stroke:Nt,"stroke-width":Et+"px"};break;case"|":Gn=Jt,mr=Jt,Ye="path",Ot="M"+Gn/2+",0L"+Gn/2+","+mr,Et=Ut*Jt,Ye="path",et={d:Ot,opacity:br,stroke:Nt,"stroke-width":Et+"px"};break;case"-":Gn=Jt,mr=Jt,Ye="path",Ot="M0,"+mr/2+"L"+Gn+","+mr/2,Et=Ut*Jt,Ye="path",et={d:Ot,opacity:br,stroke:Nt,"stroke-width":Et+"px"};break;case"+":Gn=Jt,mr=Jt,Ye="path",Ot="M"+Gn/2+",0L"+Gn/2+","+mr+"M0,"+mr/2+"L"+Gn+","+mr/2,Et=Jt-Jt*Math.sqrt(1-Ut),Ye="path",et={d:Ot,opacity:br,stroke:Nt,"stroke-width":Et+"px"};break;case".":Gn=Jt,mr=Jt,Ut<Math.PI/4?je=Math.sqrt(Ut*Jt*Jt/Math.PI):je=St(Ut,Math.PI/4,1,Jt/2,Jt/Math.sqrt(2)),Ye="circle",et={cx:Gn/2,cy:mr/2,r:je,opacity:br,fill:Nt};break;default:Gn=Jt,mr=Jt,Ye="path",et={d:Gt,opacity:br,fill:Nt};break}var Or=[Gt||"noSh",$r||"noBg",rn||"noFg",Jt,Ut].join(";"),tn=ci._defs.select(".patterns").selectAll("#"+In).data([Or],R.identity);tn.exit().remove(),tn.enter().append("pattern").each(function(){var Jr=w.select(this);if(Jr.attr({id:In,width:Gn+"px",height:mr+"px",patternUnits:"userSpaceOnUse",patternTransform:Rn?"scale(0.8)":""}),$r){var dn=l($r),on=c.tinyRGB(dn),Nn=dn.getAlpha(),Wi=Jr.selectAll("rect").data([0]);Wi.exit().remove(),Wi.enter().append("rect").attr({width:Gn+"px",height:mr+"px",fill:on,"fill-opacity":Nn})}var Oa=Jr.selectAll(Ye).data([0]);Oa.exit().remove(),Oa.enter().append(Ye).attr(et)}),st.style("fill",De(In,Ue)).style("fill-opacity",null),st.classed("pattern_filled",!0)},g.initGradients=function(st){var rt=st._fullLayout,Ue=R.ensureSingle(rt._defs,"g","gradients");Ue.selectAll("linearGradient,radialGradient").remove(),w.select(st).selectAll(".gradient_filled").classed("gradient_filled",!1)},g.initPatterns=function(st){var rt=st._fullLayout,Ue=R.ensureSingle(rt._defs,"g","patterns");Ue.selectAll("pattern").remove(),w.select(st).selectAll(".pattern_filled").classed("pattern_filled",!1)},g.getPatternAttr=function(st,rt,Ue){return st&&R.isArrayOrTypedArray(st)?rt<st.length?st[rt]:Ue:st},g.pointStyle=function(st,rt,Ue,xt){if(st.size()){var Gt=g.makePointStyleFns(rt);st.each(function(Jt){g.singlePointStyle(Jt,w.select(this),rt,Gt,Ue,xt)})}},g.singlePointStyle=function(st,rt,Ue,xt,Gt,Jt){var Ut=Ue.marker,kr=Ut.line;if(Jt&&Jt.i>=0&&st.i===void 0&&(st.i=Jt.i),rt.style("opacity",xt.selectedOpacityFn?xt.selectedOpacityFn(st):st.mo===void 0?Ut.opacity:st.mo),xt.ms2mrc){var Pr;st.ms==="various"||Ut.size==="various"?Pr=3:Pr=xt.ms2mrc(st.ms),st.mrc=Pr,xt.selectedSizeFn&&(Pr=st.mrc=xt.selectedSizeFn(st));var $r=g.symbolNumber(st.mx||Ut.symbol)||0;st.om=$r%200>=100;var rn=Ft(st,Ue),kn=Ee(st,Ue);rt.attr("d",S($r,Pr,rn,kn))}var Rn=!1,ci,In,Gn;if(st.so)Gn=kr.outlierwidth,In=kr.outliercolor,ci=Ut.outliercolor;else{var mr=(kr||{}).width;Gn=(st.mlw+1||mr+1||(st.trace?(st.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in st?In=st.mlcc=xt.lineScale(st.mlc):R.isArrayOrTypedArray(kr.color)?In=c.defaultLine:In=kr.color,R.isArrayOrTypedArray(Ut.color)&&(ci=c.defaultLine,Rn=!0),"mc"in st?ci=st.mcc=xt.markerScale(st.mc):ci=Ut.color||Ut.colors||"rgba(0,0,0,0)",xt.selectedColorFn&&(ci=xt.selectedColorFn(st))}if(st.om)rt.call(c.stroke,ci).style({"stroke-width":(Gn||1)+"px",fill:"none"});else{rt.style("stroke-width",(st.isBlank?0:Gn)+"px");var St=Ut.gradient,Ot=st.mgt;Ot?Rn=!0:Ot=St&&St.type,R.isArrayOrTypedArray(Ot)&&(Ot=Ot[0],W[Ot]||(Ot=0));var Et=Ut.pattern,je=g.getPatternAttr,Ye=Et&&(je(Et.shape,st.i,"")||je(Et.path,st.i,""));if(Ot&&Ot!=="none"){var et=st.mgc;et?Rn=!0:et=St.color;var mt=Ue.uid;Rn&&(mt+="-"+st.i),g.gradient(rt,Gt,mt,Ot,[[0,et],[1,ci]],"fill")}else if(Ye){var Nt=!1,lr=Et.fgcolor;!lr&&Jt&&Jt.color&&(lr=Jt.color,Nt=!0);var br=je(lr,st.i,Jt&&Jt.color||null),Or=je(Et.bgcolor,st.i,null),tn=Et.fgopacity,Jr=je(Et.size,st.i,8),dn=je(Et.solidity,st.i,.3);Nt=Nt||st.mcc||R.isArrayOrTypedArray(Et.shape)||R.isArrayOrTypedArray(Et.path)||R.isArrayOrTypedArray(Et.bgcolor)||R.isArrayOrTypedArray(Et.fgcolor)||R.isArrayOrTypedArray(Et.size)||R.isArrayOrTypedArray(Et.solidity);var on=Ue.uid;Nt&&(on+="-"+st.i),g.pattern(rt,"point",Gt,on,Ye,Jr,dn,st.mcc,Et.fillmode,Or,br,tn)}else R.isArrayOrTypedArray(ci)?c.fill(rt,ci[st.i]):c.fill(rt,ci);Gn&&c.stroke(rt,In)}},g.makePointStyleFns=function(st){var rt={},Ue=st.marker;return rt.markerScale=g.tryColorscale(Ue,""),rt.lineScale=g.tryColorscale(Ue,"line"),u.traceIs(st,"symbols")&&(rt.ms2mrc=A.isBubble(st)?E(st):function(){return(Ue.size||6)/2}),st.selectedpoints&&R.extendFlat(rt,g.makeSelectedPointStyleFns(st)),rt},g.makeSelectedPointStyleFns=function(st){var rt={},Ue=st.selected||{},xt=st.unselected||{},Gt=st.marker||{},Jt=Ue.marker||{},Ut=xt.marker||{},kr=Gt.opacity,Pr=Jt.opacity,$r=Ut.opacity,rn=Pr!==void 0,kn=$r!==void 0;(R.isArrayOrTypedArray(kr)||rn||kn)&&(rt.selectedOpacityFn=function(je){var Ye=je.mo===void 0?Gt.opacity:je.mo;return je.selected?rn?Pr:Ye:kn?$r:x*Ye});var Rn=Gt.color,ci=Jt.color,In=Ut.color;(ci||In)&&(rt.selectedColorFn=function(je){var Ye=je.mcc||Rn;return je.selected?ci||Ye:In||Ye});var Gn=Gt.size,mr=Jt.size,St=Ut.size,Ot=mr!==void 0,Et=St!==void 0;return u.traceIs(st,"symbols")&&(Ot||Et)&&(rt.selectedSizeFn=function(je){var Ye=je.mrc||Gn/2;return je.selected?Ot?mr/2:Ye:Et?St/2:Ye}),rt},g.makeSelectedTextStyleFns=function(st){var rt={},Ue=st.selected||{},xt=st.unselected||{},Gt=st.textfont||{},Jt=Ue.textfont||{},Ut=xt.textfont||{},kr=Gt.color,Pr=Jt.color,$r=Ut.color;return rt.selectedTextColorFn=function(rn){var kn=rn.tc||kr;return rn.selected?Pr||kn:$r||(Pr?kn:c.addOpacity(kn,x))},rt},g.selectedPointStyle=function(st,rt){if(!(!st.size()||!rt.selectedpoints)){var Ue=g.makeSelectedPointStyleFns(rt),xt=rt.marker||{},Gt=[];Ue.selectedOpacityFn&&Gt.push(function(Jt,Ut){Jt.style("opacity",Ue.selectedOpacityFn(Ut))}),Ue.selectedColorFn&&Gt.push(function(Jt,Ut){c.fill(Jt,Ue.selectedColorFn(Ut))}),Ue.selectedSizeFn&&Gt.push(function(Jt,Ut){var kr=Ut.mx||xt.symbol||0,Pr=Ue.selectedSizeFn(Ut);Jt.attr("d",S(g.symbolNumber(kr),Pr,Ft(Ut,rt),Ee(Ut,rt))),Ut.mrc2=Pr}),Gt.length&&st.each(function(Jt){for(var Ut=w.select(this),kr=0;kr<Gt.length;kr++)Gt[kr](Ut,Jt)})}},g.tryColorscale=function(st,rt){var Ue=rt?R.nestedProperty(st,rt).get():st;if(Ue){var xt=Ue.color;if((Ue.colorscale||Ue._colorAx)&&R.isArrayOrTypedArray(xt))return p.makeColorScaleFuncFromTrace(Ue)}return R.identity};var Z={start:1,end:-1,middle:0,bottom:1,top:-1};function K(st,rt,Ue,xt,Gt){var Jt=w.select(st.node().parentNode),Ut=rt.indexOf("top")!==-1?"top":rt.indexOf("bottom")!==-1?"bottom":"middle",kr=rt.indexOf("left")!==-1?"end":rt.indexOf("right")!==-1?"start":"middle",Pr=xt?xt/.8+1:0,$r=(v.lineCount(st)-1)*_+1,rn=Z[kr]*Pr,kn=Ue*.75+Z[Ut]*Pr+(Z[Ut]-1)*$r*Ue/2;st.attr("text-anchor",kr),Gt||Jt.attr("transform",f(rn,kn))}function Q(st,rt){var Ue=st.ts||rt.textfont.size;return z(Ue)&&Ue>0?Ue:0}g.textPointStyle=function(st,rt,Ue){if(st.size()){var xt;if(rt.selectedpoints){var Gt=g.makeSelectedTextStyleFns(rt);xt=Gt.selectedTextColorFn}var Jt=rt.texttemplate,Ut=Ue._fullLayout;st.each(function(kr){var Pr=w.select(this),$r=Jt?R.extractOption(kr,rt,"txt","texttemplate"):R.extractOption(kr,rt,"tx","text");if(!$r&&$r!==0){Pr.remove();return}if(Jt){var rn=rt._module.formatLabels,kn=rn?rn(kr,rt,Ut):{},Rn={};D(Rn,rt,kr.i);var ci=rt._meta||{};$r=R.texttemplateString($r,kn,Ut._d3locale,Rn,kr,ci)}var In=kr.tp||rt.textposition,Gn=Q(kr,rt),mr=xt?xt(kr):kr.tc||rt.textfont.color;Pr.call(g.font,{family:kr.tf||rt.textfont.family,weight:kr.tw||rt.textfont.weight,style:kr.ty||rt.textfont.style,variant:kr.tv||rt.textfont.variant,textcase:kr.tC||rt.textfont.textcase,lineposition:kr.tE||rt.textfont.lineposition,shadow:kr.tS||rt.textfont.shadow,size:Gn,color:mr}).text($r).call(v.convertToTspans,Ue).call(K,In,Gn,kr.mrc)})}},g.selectedTextStyle=function(st,rt){if(!(!st.size()||!rt.selectedpoints)){var Ue=g.makeSelectedTextStyleFns(rt);st.each(function(xt){var Gt=w.select(this),Jt=Ue.selectedTextColorFn(xt),Ut=xt.tp||rt.textposition,kr=Q(xt,rt);c.fill(Gt,Jt);var Pr=u.traceIs(rt,"bar-like");K(Gt,Ut,kr,xt.mrc2||xt.mrc,Pr)})}};var J=.5;g.smoothopen=function(st,rt){if(st.length<3)return"M"+st.join("L");var Ue="M"+st[0],xt=[],Gt;for(Gt=1;Gt<st.length-1;Gt++)xt.push(Oe(st[Gt-1],st[Gt],st[Gt+1],rt));for(Ue+="Q"+xt[0][0]+" "+st[1],Gt=2;Gt<st.length-1;Gt++)Ue+="C"+xt[Gt-2][1]+" "+xt[Gt-1][0]+" "+st[Gt];return Ue+="Q"+xt[st.length-3][1]+" "+st[st.length-1],Ue},g.smoothclosed=function(st,rt){if(st.length<3)return"M"+st.join("L")+"Z";var Ue="M"+st[0],xt=st.length-1,Gt=[Oe(st[xt],st[0],st[1],rt)],Jt;for(Jt=1;Jt<xt;Jt++)Gt.push(Oe(st[Jt-1],st[Jt],st[Jt+1],rt));for(Gt.push(Oe(st[xt-1],st[xt],st[0],rt)),Jt=1;Jt<=xt;Jt++)Ue+="C"+Gt[Jt-1][1]+" "+Gt[Jt][0]+" "+st[Jt];return Ue+="C"+Gt[xt][1]+" "+Gt[0][0]+" "+st[0]+"Z",Ue};var G,ee;function re(st,rt,Ue){return Ue&&(st=oe(st)),rt?we(st[1]):fe(st[0])}function fe(st){var rt=w.round(st,2);return G=rt,rt}function we(st){var rt=w.round(st,2);return ee=rt,rt}function Oe(st,rt,Ue,xt){var Gt=st[0]-rt[0],Jt=st[1]-rt[1],Ut=Ue[0]-rt[0],kr=Ue[1]-rt[1],Pr=Math.pow(Gt*Gt+Jt*Jt,J/2),$r=Math.pow(Ut*Ut+kr*kr,J/2),rn=($r*$r*Gt-Pr*Pr*Ut)*xt,kn=($r*$r*Jt-Pr*Pr*kr)*xt,Rn=3*$r*(Pr+$r),ci=3*Pr*(Pr+$r);return[[fe(rt[0]+(Rn&&rn/Rn)),we(rt[1]+(Rn&&kn/Rn))],[fe(rt[0]-(ci&&rn/ci)),we(rt[1]-(ci&&kn/ci))]]}var ke={hv:function(st,rt,Ue){return"H"+fe(rt[0])+"V"+re(rt,1,Ue)},vh:function(st,rt,Ue){return"V"+we(rt[1])+"H"+re(rt,0,Ue)},hvh:function(st,rt,Ue){return"H"+fe((st[0]+rt[0])/2)+"V"+we(rt[1])+"H"+re(rt,0,Ue)},vhv:function(st,rt,Ue){return"V"+we((st[1]+rt[1])/2)+"H"+fe(rt[0])+"V"+re(rt,1,Ue)}},Le=function(st,rt,Ue){return"L"+re(rt,0,Ue)+","+re(rt,1,Ue)};g.steps=function(st){var rt=ke[st]||Le;return function(Ue){for(var xt="M"+fe(Ue[0][0])+","+we(Ue[0][1]),Gt=Ue.length,Jt=1;Jt<Gt;Jt++)xt+=rt(Ue[Jt-1],Ue[Jt],Jt===Gt-1);return xt}};function oe(st,rt){var Ue=st.backoff,xt=st.trace,Gt=st.d,Jt=st.i;if(Ue&&xt&&xt.marker&&xt.marker.angle%360===0&&xt.line&&xt.line.shape!=="spline"){var Ut=R.isArrayOrTypedArray(Ue),kr=st,Pr=rt?rt[0]:G||0,$r=rt?rt[1]:ee||0,rn=kr[0],kn=kr[1],Rn=rn-Pr,ci=kn-$r,In=Math.atan2(ci,Rn),Gn=Ut?Ue[Jt]:Ue;if(Gn==="auto"){var mr=kr.i;xt.type==="scatter"&&mr--;var St=kr.marker,Ot=St.symbol;R.isArrayOrTypedArray(Ot)&&(Ot=Ot[mr]);var Et=St.size;R.isArrayOrTypedArray(Et)&&(Et=Et[mr]),Gn=St?g.symbolBackOffs[g.symbolNumber(Ot)]*Et:0,Gn+=g.getMarkerStandoff(Gt[mr],xt)||0}var je=rn-Gn*Math.cos(In),Ye=kn-Gn*Math.sin(In);(je<=rn&&je>=Pr||je>=rn&&je<=Pr)&&(Ye<=kn&&Ye>=$r||Ye>=kn&&Ye<=$r)&&(st=[je,Ye])}return st}g.applyBackoff=oe,g.makeTester=function(){var st=R.ensureSingleById(w.select("body"),"svg","js-plotly-tester",function(Ue){Ue.attr(h.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),rt=R.ensureSingle(st,"path","js-reference-point",function(Ue){Ue.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});g.tester=st,g.testref=rt},g.savedBBoxes={};var be=0,_e=1e4;g.bBox=function(st,rt,Ue){Ue||(Ue=he(st));var xt;if(Ue){if(xt=g.savedBBoxes[Ue],xt)return R.extendFlat({},xt)}else if(st.childNodes.length===1){var Gt=st.childNodes[0];if(Ue=he(Gt),Ue){var Jt=+Gt.getAttribute("x")||0,Ut=+Gt.getAttribute("y")||0,kr=Gt.getAttribute("transform");if(!kr){var Pr=g.bBox(Gt,!1,Ue);return Jt&&(Pr.left+=Jt,Pr.right+=Jt),Ut&&(Pr.top+=Ut,Pr.bottom+=Ut),Pr}if(Ue+="~"+Jt+"~"+Ut+"~"+kr,xt=g.savedBBoxes[Ue],xt)return R.extendFlat({},xt)}}var $r,rn;rt?$r=st:(rn=g.tester.node(),$r=st.cloneNode(!0),rn.appendChild($r)),w.select($r).attr("transform",null).call(v.positionText,0,0);var kn=$r.getBoundingClientRect(),Rn=g.testref.node().getBoundingClientRect();rt||rn.removeChild($r);var ci={height:kn.height,width:kn.width,left:kn.left-Rn.left,top:kn.top-Rn.top,right:kn.right-Rn.left,bottom:kn.bottom-Rn.top};return be>=_e&&(g.savedBBoxes={},be=0),Ue&&(g.savedBBoxes[Ue]=ci),be++,R.extendFlat({},ci)};function he(st){var rt=st.getAttribute("data-unformatted");if(rt!==null)return rt+st.getAttribute("data-math")+st.getAttribute("text-anchor")+st.getAttribute("style")}g.setClipUrl=function(st,rt,Ue){st.attr("clip-path",De(rt,Ue))};function De(st,rt){if(!st)return null;var Ue=rt._context,xt=Ue._exportedPlot?"":Ue._baseUrl||"";return xt?"url('"+xt+"#"+st+"')":"url(#"+st+")"}g.getTranslate=function(st){var rt=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,Ue=st.attr?"attr":"getAttribute",xt=st[Ue]("transform")||"",Gt=xt.replace(rt,function(Jt,Ut,kr){return[Ut,kr].join(" ")}).split(" ");return{x:+Gt[0]||0,y:+Gt[1]||0}},g.setTranslate=function(st,rt,Ue){var xt=/(\btranslate\(.*?\);?)/,Gt=st.attr?"attr":"getAttribute",Jt=st.attr?"attr":"setAttribute",Ut=st[Gt]("transform")||"";return rt=rt||0,Ue=Ue||0,Ut=Ut.replace(xt,"").trim(),Ut+=f(rt,Ue),Ut=Ut.trim(),st[Jt]("transform",Ut),Ut},g.getScale=function(st){var rt=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,Ue=st.attr?"attr":"getAttribute",xt=st[Ue]("transform")||"",Gt=xt.replace(rt,function(Jt,Ut,kr){return[Ut,kr].join(" ")}).split(" ");return{x:+Gt[0]||1,y:+Gt[1]||1}},g.setScale=function(st,rt,Ue){var xt=/(\bscale\(.*?\);?)/,Gt=st.attr?"attr":"getAttribute",Jt=st.attr?"attr":"setAttribute",Ut=st[Gt]("transform")||"";return rt=rt||1,Ue=Ue||1,Ut=Ut.replace(xt,"").trim(),Ut+="scale("+rt+","+Ue+")",Ut=Ut.trim(),st[Jt]("transform",Ut),Ut};var xe=/\s*sc.*/;g.setPointGroupScale=function(st,rt,Ue){if(rt=rt||1,Ue=Ue||1,!!st){var xt=rt===1&&Ue===1?"":"scale("+rt+","+Ue+")";st.each(function(){var Gt=(this.getAttribute("transform")||"").replace(xe,"");Gt+=xt,Gt=Gt.trim(),this.setAttribute("transform",Gt)})}};var se=/translate\([^)]*\)\s*$/;g.setTextPointsScale=function(st,rt,Ue){st&&st.each(function(){var xt,Gt=w.select(this),Jt=Gt.select("text");if(Jt.node()){var Ut=parseFloat(Jt.attr("x")||0),kr=parseFloat(Jt.attr("y")||0),Pr=(Gt.attr("transform")||"").match(se);rt===1&&Ue===1?xt=[]:xt=[f(Ut,kr),"scale("+rt+","+Ue+")",f(-Ut,-kr)],Pr&&xt.push(Pr),Gt.attr("transform",xt.join(""))}})};function Ee(st,rt){var Ue;return st&&(Ue=st.mf),Ue===void 0&&(Ue=rt.marker&&rt.marker.standoff||0),!rt._geo&&!rt._xA?-Ue:Ue}g.getMarkerStandoff=Ee;var Te=Math.atan2,Be=Math.cos,tt=Math.sin;function at(st,rt){var Ue=rt[0],xt=rt[1];return[Ue*Be(st)-xt*tt(st),Ue*tt(st)+xt*Be(st)]}var gt,pt,Rt,$t,Wt,Ht;function Ft(st,rt){var Ue=st.ma;Ue===void 0&&(Ue=rt.marker.angle,(!Ue||R.isArrayOrTypedArray(Ue))&&(Ue=0));var xt,Gt,Jt=rt.marker.angleref;if(Jt==="previous"||Jt==="north"){if(rt._geo){var Ut=rt._geo.project(st.lonlat);xt=Ut[0],Gt=Ut[1]}else{var kr=rt._xA,Pr=rt._yA;if(kr&&Pr)xt=kr.c2p(st.x),Gt=Pr.c2p(st.y);else return 90}if(rt._geo){var $r=st.lonlat[0],rn=st.lonlat[1],kn=rt._geo.project([$r,rn+1e-5]),Rn=rt._geo.project([$r+1e-5,rn]),ci=Te(Rn[1]-Gt,Rn[0]-xt),In=Te(kn[1]-Gt,kn[0]-xt),Gn;if(Jt==="north")Gn=Ue/180*Math.PI;else if(Jt==="previous"){var mr=$r/180*Math.PI,St=rn/180*Math.PI,Ot=gt/180*Math.PI,Et=pt/180*Math.PI,je=Ot-mr,Ye=Be(Et)*tt(je),et=tt(Et)*Be(St)-Be(Et)*tt(St)*Be(je);Gn=-Te(Ye,et)-Math.PI,gt=$r,pt=rn}var mt=at(ci,[Be(Gn),0]),Nt=at(In,[tt(Gn),0]);Ue=Te(mt[1]+Nt[1],mt[0]+Nt[0])/Math.PI*180,Jt==="previous"&&!(Ht===rt.uid&&st.i===Wt+1)&&(Ue=null)}if(Jt==="previous"&&!rt._geo)if(Ht===rt.uid&&st.i===Wt+1&&z(xt)&&z(Gt)){var lr=xt-Rt,br=Gt-$t,Or=rt.line&&rt.line.shape||"",tn=Or.slice(Or.length-1);tn==="h"&&(br=0),tn==="v"&&(lr=0),Ue+=Te(br,lr)/Math.PI*180+90}else Ue=null}return Rt=xt,$t=Gt,Wt=st.i,Ht=rt.uid,Ue}g.getMarkerAngle=Ft}}),Nv=U({"src/components/titles/index.js"(pe,le){var w=Ze(),R=_t(),O=tp(),z=Mi(),l=ii(),u=l.strTranslate,c=ec(),p=Lr(),f=ah(),v=Yn(),h=tg().OPPOSITE_SIDE,m=/ [XY][0-9]* /,_=1.6,x=1.6;function A(E,D,g){var C=E._fullLayout,I=g.propContainer,N=g.propName,F=g.placeholder,k=g.traceIndex,P=g.avoid||{},T=g.attributes,y=g.transform,S=g.containerGroup,M=1,W=I.title,$=(W&&W.text?W.text:"").trim(),Z=!1,K=W&&W.font?W.font:{},Q=K.family,J=K.size,G=K.color,ee=K.weight,re=K.style,fe=K.variant,we=K.textcase,Oe=K.lineposition,ke=K.shadow,Le=g.subtitlePropName,oe=!!Le,be=g.subtitlePlaceholder,_e=(I.title||{}).subtitle||{text:"",font:{}},he=_e.text.trim(),De=!1,xe=1,se=_e.font,Ee=se.family,Te=se.size,Be=se.color,tt=se.weight,at=se.style,gt=se.variant,pt=se.textcase,Rt=se.lineposition,$t=se.shadow,Wt;N==="title.text"?Wt="titleText":N.indexOf("axis")!==-1?Wt="axisTitleText":N.indexOf("colorbar")!==-1&&(Wt="colorbarTitleText");var Ht=E._context.edits[Wt];function Ft(Rn,ci){return Rn===void 0||ci===void 0?!1:Rn.replace(m," % ")===ci.replace(m," % ")}$===""?M=0:Ft($,F)&&(Ht||($=""),M=.2,Z=!0),oe&&(he===""?xe=0:Ft(he,be)&&(Ht||(he=""),xe=.2,De=!0)),g._meta?$=l.templateString($,g._meta):C._meta&&($=l.templateString($,C._meta));var st=$||he||Ht,rt;S||(S=l.ensureSingle(C._infolayer,"g","g-"+D),rt=C._hColorbarMoveTitle);var Ue=S.selectAll("text."+D).data(st?[0]:[]);Ue.enter().append("text"),Ue.text($).attr("class",D),Ue.exit().remove();var xt=null,Gt=D+"-subtitle",Jt=he||Ht;if(oe&&Jt&&(xt=S.selectAll("text."+Gt).data(Jt?[0]:[]),xt.enter().append("text"),xt.text(he).attr("class",Gt),xt.exit().remove()),!st)return S;function Ut(Rn,ci){l.syncOrAsync([kr,Pr],{title:Rn,subtitle:ci})}function kr(Rn){var ci=Rn.title,In=Rn.subtitle,Gn;!y&&rt&&(y={}),y?(Gn="",y.rotate&&(Gn+="rotate("+[y.rotate,T.x,T.y]+")"),(y.offset||rt)&&(Gn+=u(0,(y.offset||0)-(rt||0)))):Gn=null,ci.attr("transform",Gn);function mr(et){if(et){var mt=w.select(et.node().parentNode).select("."+Gt);if(!mt.empty()){var Nt=et.node().getBBox();if(Nt.height){var lr=Nt.y+Nt.height+_*Te;mt.attr("y",lr)}}}}if(ci.style("opacity",M*p.opacity(G)).call(c.font,{color:p.rgb(G),size:w.round(J,2),family:Q,weight:ee,style:re,variant:fe,textcase:we,shadow:ke,lineposition:Oe}).attr(T).call(f.convertToTspans,E,mr),In){var St=S.select("."+D+"-math-group"),Ot=ci.node().getBBox(),Et=St.node()?St.node().getBBox():void 0,je=Et?Et.y+Et.height+_*Te:Ot.y+Ot.height+x*Te,Ye=l.extendFlat({},T,{y:je});In.attr("transform",Gn),In.style("opacity",xe*p.opacity(Be)).call(c.font,{color:p.rgb(Be),size:w.round(Te,2),family:Ee,weight:tt,style:at,variant:gt,textcase:pt,shadow:$t,lineposition:Rt}).attr(Ye).call(f.convertToTspans,E)}return O.previousPromises(E)}function Pr(Rn){var ci=Rn.title,In=w.select(ci.node().parentNode);if(P&&P.selection&&P.side&&$){In.attr("transform",null);var Gn=h[P.side],mr=P.side==="left"||P.side==="top"?-1:1,St=R(P.pad)?P.pad:2,Ot=c.bBox(In.node()),Et={t:0,b:0,l:0,r:0},je=E._fullLayout._reservedMargin;for(var Ye in je)for(var et in je[Ye]){var mt=je[Ye][et];Et[et]=Math.max(Et[et],mt)}var Nt={left:Et.l,top:Et.t,right:C.width-Et.r,bottom:C.height-Et.b},lr=P.maxShift||mr*(Nt[P.side]-Ot[P.side]),br=0;if(lr<0)br=lr;else{var Or=P.offsetLeft||0,tn=P.offsetTop||0;Ot.left-=Or,Ot.right-=Or,Ot.top-=tn,Ot.bottom-=tn,P.selection.each(function(){var dn=c.bBox(this);l.bBoxIntersect(Ot,dn,St)&&(br=Math.max(br,mr*(dn[P.side]-Ot[Gn])+St))}),br=Math.min(lr,br),I._titleScoot=Math.abs(br)}if(br>0||lr<0){var Jr={left:[-br,0],right:[br,0],top:[0,-br],bottom:[0,br]}[P.side];In.attr("transform",u(Jr[0],Jr[1]))}}}Ue.call(Ut,xt);function $r(Rn,ci){Rn.text(ci).on("mouseover.opacity",function(){w.select(this).transition().duration(v.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){w.select(this).transition().duration(v.HIDE_PLACEHOLDER).style("opacity",0)})}if(Ht&&($?Ue.on(".opacity",null):($r(Ue,F),Z=!0),Ue.call(f.makeEditable,{gd:E}).on("edit",function(Rn){k!==void 0?z.call("_guiRestyle",E,N,Rn,k):z.call("_guiRelayout",E,N,Rn)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Ut)}).on("input",function(Rn){this.text(Rn||" ").call(f.positionText,T.x,T.y)}),oe)){if(oe&&!$){var rn=Ue.node().getBBox(),kn=rn.y+rn.height+x*Te;xt.attr("y",kn)}he?xt.on(".opacity",null):($r(xt,be),De=!0),xt.call(f.makeEditable,{gd:E}).on("edit",function(Rn){z.call("_guiRelayout",E,"title.subtitle.text",Rn)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Ut)}).on("input",function(Rn){this.text(Rn||" ").call(f.positionText,xt.attr("x"),xt.attr("y"))})}return Ue.classed("js-placeholder",Z),xt&&xt.classed("js-placeholder",De),S}le.exports={draw:A,SUBTITLE_PADDING_EM:x,SUBTITLE_PADDING_MATHJAX_EM:_}}}),Wy=U({"src/plots/cartesian/set_convert.js"(pe,le){var w=Ze(),R=nt().utcFormat,O=ii(),z=O.numberFormat,l=_t(),u=O.cleanNumber,c=O.ms2DateTime,p=O.dateTime2ms,f=O.ensureNumber,v=O.isArrayOrTypedArray,h=Dt(),m=h.FP_SAFE,_=h.BADNUM,x=h.LOG_CLIP,A=h.ONEWEEK,E=h.ONEDAY,D=h.ONEHOUR,g=h.ONEMIN,C=h.ONESEC,I=Tf(),N=pf(),F=N.HOUR_PATTERN,k=N.WEEKDAY_PATTERN;function P(y){return Math.pow(10,y)}function T(y){return y!=null}le.exports=function(S,M){M=M||{};var W=S._id||"x",$=W.charAt(0);function Z(he,De){if(he>0)return Math.log(he)/Math.LN10;if(he<=0&&De&&S.range&&S.range.length===2){var xe=S.range[0],se=S.range[1];return .5*(xe+se-2*x*Math.abs(xe-se))}else return _}function K(he,De,xe,se){if((se||{}).msUTC&&l(he))return+he;var Ee=p(he,xe||S.calendar);if(Ee===_)if(l(he)){he=+he;var Te=Math.floor(O.mod(he+.05,1)*10),Be=Math.round(he-Te/10);Ee=p(new Date(Be))+Te/10}else return _;return Ee}function Q(he,De,xe){return c(he,De,xe||S.calendar)}function J(he){return S._categories[Math.round(he)]}function G(he){if(T(he)){if(S._categoriesMap===void 0&&(S._categoriesMap={}),S._categoriesMap[he]!==void 0)return S._categoriesMap[he];S._categories.push(typeof he=="number"?String(he):he);var De=S._categories.length-1;return S._categoriesMap[he]=De,De}return _}function ee(he,De){for(var xe=new Array(De),se=0;se<De;se++){var Ee=(he[0]||[])[se],Te=(he[1]||[])[se];xe[se]=re([Ee,Te])}return xe}function re(he){if(S._categoriesMap)return S._categoriesMap[he]}function fe(he){var De=re(he);if(De!==void 0)return De;if(l(he))return+he}function we(he){return l(he)?+he:re(he)}function Oe(he,De,xe){return w.round(xe+De*he,2)}function ke(he,De,xe){return(he-xe)/De}var Le=function(De){return l(De)?Oe(De,S._m,S._b):_},oe=function(he){return ke(he,S._m,S._b)};if(S.rangebreaks){var be=$==="y";Le=function(he){if(!l(he))return _;var De=S._rangebreaks.length;if(!De)return Oe(he,S._m,S._b);var xe=be;S.range[0]>S.range[1]&&(xe=!xe);for(var se=xe?-1:1,Ee=se*he,Te=0,Be=0;Be<De;Be++){var tt=se*S._rangebreaks[Be].min,at=se*S._rangebreaks[Be].max;if(Ee<tt)break;if(Ee>at)Te=Be+1;else{Te=Ee<(tt+at)/2?Be:Be+1;break}}var gt=S._B[Te]||0;return isFinite(gt)?Oe(he,S._m2,gt):0},oe=function(he){var De=S._rangebreaks.length;if(!De)return ke(he,S._m,S._b);for(var xe=0,se=0;se<De&&!(he<S._rangebreaks[se].pmin);se++)he>S._rangebreaks[se].pmax&&(xe=se+1);return ke(he,S._m2,S._B[xe])}}S.c2l=S.type==="log"?Z:f,S.l2c=S.type==="log"?P:f,S.l2p=Le,S.p2l=oe,S.c2p=S.type==="log"?function(he,De){return Le(Z(he,De))}:Le,S.p2c=S.type==="log"?function(he){return P(oe(he))}:oe,["linear","-"].indexOf(S.type)!==-1?(S.d2r=S.r2d=S.d2c=S.r2c=S.d2l=S.r2l=u,S.c2d=S.c2r=S.l2d=S.l2r=f,S.d2p=S.r2p=function(he){return S.l2p(u(he))},S.p2d=S.p2r=oe,S.cleanPos=f):S.type==="log"?(S.d2r=S.d2l=function(he,De){return Z(u(he),De)},S.r2d=S.r2c=function(he){return P(u(he))},S.d2c=S.r2l=u,S.c2d=S.l2r=f,S.c2r=Z,S.l2d=P,S.d2p=function(he,De){return S.l2p(S.d2r(he,De))},S.p2d=function(he){return P(oe(he))},S.r2p=function(he){return S.l2p(u(he))},S.p2r=oe,S.cleanPos=f):S.type==="date"?(S.d2r=S.r2d=O.identity,S.d2c=S.r2c=S.d2l=S.r2l=K,S.c2d=S.c2r=S.l2d=S.l2r=Q,S.d2p=S.r2p=function(he,De,xe){return S.l2p(K(he,0,xe))},S.p2d=S.p2r=function(he,De,xe){return Q(oe(he),De,xe)},S.cleanPos=function(he){return O.cleanDate(he,_,S.calendar)}):S.type==="category"?(S.d2c=S.d2l=G,S.r2d=S.c2d=S.l2d=J,S.d2r=S.d2l_noadd=fe,S.r2c=function(he){var De=we(he);return De!==void 0?De:S.fraction2r(.5)},S.l2r=S.c2r=f,S.r2l=we,S.d2p=function(he){return S.l2p(S.r2c(he))},S.p2d=function(he){return J(oe(he))},S.r2p=S.d2p,S.p2r=oe,S.cleanPos=function(he){return typeof he=="string"&&he!==""?he:f(he)}):S.type==="multicategory"&&(S.r2d=S.c2d=S.l2d=J,S.d2r=S.d2l_noadd=fe,S.r2c=function(he){var De=fe(he);return De!==void 0?De:S.fraction2r(.5)},S.r2c_just_indices=re,S.l2r=S.c2r=f,S.r2l=fe,S.d2p=function(he){return S.l2p(S.r2c(he))},S.p2d=function(he){return J(oe(he))},S.r2p=S.d2p,S.p2r=oe,S.cleanPos=function(he){return Array.isArray(he)||typeof he=="string"&&he!==""?he:f(he)},S.setupMultiCategory=function(he){var De=S._traceIndices,xe,se,Ee=S._matchGroup;if(Ee&&S._categories.length===0){for(var Te in Ee)if(Te!==W){var Be=M[I.id2name(Te)];De=De.concat(Be._traceIndices)}}var tt=[[0,{}],[0,{}]],at=[];for(xe=0;xe<De.length;xe++){var gt=he[De[xe]];if($ in gt){var pt=gt[$],Rt=gt._length||O.minRowLength(pt);if(v(pt[0])&&v(pt[1]))for(se=0;se<Rt;se++){var $t=pt[0][se],Wt=pt[1][se];T($t)&&T(Wt)&&(at.push([$t,Wt]),$t in tt[0][1]||(tt[0][1][$t]=tt[0][0]++),Wt in tt[1][1]||(tt[1][1][Wt]=tt[1][0]++))}}}for(at.sort(function(Ht,Ft){var st=tt[0][1],rt=st[Ht[0]]-st[Ft[0]];if(rt)return rt;var Ue=tt[1][1];return Ue[Ht[1]]-Ue[Ft[1]]}),xe=0;xe<at.length;xe++)G(at[xe])}),S.fraction2r=function(he){var De=S.r2l(S.range[0]),xe=S.r2l(S.range[1]);return S.l2r(De+he*(xe-De))},S.r2fraction=function(he){var De=S.r2l(S.range[0]),xe=S.r2l(S.range[1]);return(S.r2l(he)-De)/(xe-De)},S.limitRange=function(he){var De=S.minallowed,xe=S.maxallowed;if(!(De===void 0&&xe===void 0)){he||(he="range");var se=O.nestedProperty(S,he).get(),Ee=O.simpleMap(se,S.r2l),Te=Ee[1]<Ee[0];Te&&Ee.reverse();var Be=O.simpleMap([De,xe],S.r2l);if(De!==void 0&&Ee[0]<Be[0]&&(se[Te?1:0]=De),xe!==void 0&&Ee[1]>Be[1]&&(se[Te?0:1]=xe),se[0]===se[1]){var tt=S.l2r(De),at=S.l2r(xe);if(De!==void 0){var gt=tt+1;xe!==void 0&&(gt=Math.min(gt,at)),se[Te?1:0]=gt}if(xe!==void 0){var pt=at+1;De!==void 0&&(pt=Math.max(pt,tt)),se[Te?0:1]=pt}}}},S.cleanRange=function(he,De){S._cleanRange(he,De),S.limitRange(he)},S._cleanRange=function(he,De){De||(De={}),he||(he="range");var xe=O.nestedProperty(S,he).get(),se,Ee;if(S.type==="date"?Ee=O.dfltRange(S.calendar):$==="y"?Ee=N.DFLTRANGEY:S._name==="realaxis"?Ee=[0,1]:Ee=De.dfltRange||N.DFLTRANGEX,Ee=Ee.slice(),(S.rangemode==="tozero"||S.rangemode==="nonnegative")&&(Ee[0]=0),!xe||xe.length!==2){O.nestedProperty(S,he).set(Ee);return}var Te=xe[0]===null,Be=xe[1]===null;for(S.type==="date"&&!S.autorange&&(xe[0]=O.cleanDate(xe[0],_,S.calendar),xe[1]=O.cleanDate(xe[1],_,S.calendar)),se=0;se<2;se++)if(S.type==="date"){if(!O.isDateTime(xe[se],S.calendar)){S[he]=Ee;break}if(S.r2l(xe[0])===S.r2l(xe[1])){var tt=O.constrain(S.r2l(xe[0]),O.MIN_MS+1e3,O.MAX_MS-1e3);xe[0]=S.l2r(tt-1e3),xe[1]=S.l2r(tt+1e3);break}}else{if(!l(xe[se]))if(!(Te||Be)&&l(xe[1-se]))xe[se]=xe[1-se]*(se?10:.1);else{S[he]=Ee;break}if(xe[se]<-m?xe[se]=-m:xe[se]>m&&(xe[se]=m),xe[0]===xe[1]){var at=Math.max(1,Math.abs(xe[0]*1e-6));xe[0]-=at,xe[1]+=at}}},S.setScale=function(he){var De=M._size;if(S.overlaying){var xe=I.getFromId({_fullLayout:M},S.overlaying);S.domain=xe.domain}var se=he&&S._r?"_r":"range",Ee=S.calendar;S.cleanRange(se);var Te=S.r2l(S[se][0],Ee),Be=S.r2l(S[se][1],Ee),tt=$==="y";if(tt?(S._offset=De.t+(1-S.domain[1])*De.h,S._length=De.h*(S.domain[1]-S.domain[0]),S._m=S._length/(Te-Be),S._b=-S._m*Be):(S._offset=De.l+S.domain[0]*De.w,S._length=De.w*(S.domain[1]-S.domain[0]),S._m=S._length/(Be-Te),S._b=-S._m*Te),S._rangebreaks=[],S._lBreaks=0,S._m2=0,S._B=[],S.rangebreaks){var at,gt;if(S._rangebreaks=S.locateBreaks(Math.min(Te,Be),Math.max(Te,Be)),S._rangebreaks.length){for(at=0;at<S._rangebreaks.length;at++)gt=S._rangebreaks[at],S._lBreaks+=Math.abs(gt.max-gt.min);var pt=tt;Te>Be&&(pt=!pt),pt&&S._rangebreaks.reverse();var Rt=pt?-1:1;for(S._m2=Rt*S._length/(Math.abs(Be-Te)-S._lBreaks),S._B.push(-S._m2*(tt?Be:Te)),at=0;at<S._rangebreaks.length;at++)gt=S._rangebreaks[at],S._B.push(S._B[S._B.length-1]-Rt*S._m2*(gt.max-gt.min));for(at=0;at<S._rangebreaks.length;at++)gt=S._rangebreaks[at],gt.pmin=Le(gt.min),gt.pmax=Le(gt.max)}}if(!isFinite(S._m)||!isFinite(S._b)||S._length<0)throw M._replotting=!1,new Error("Something went wrong with axis scaling")},S.maskBreaks=function(he){var De=S.rangebreaks||[],xe,se,Ee,Te,Be;De._cachedPatterns||(De._cachedPatterns=De.map(function(st){return st.enabled&&st.bounds?O.simpleMap(st.bounds,st.pattern?u:S.d2c):null})),De._cachedValues||(De._cachedValues=De.map(function(st){return st.enabled&&st.values?O.simpleMap(st.values,S.d2c).sort(O.sorterAsc):null}));for(var tt=0;tt<De.length;tt++){var at=De[tt];if(at.enabled){if(at.bounds){var gt=at.pattern;switch(xe=De._cachedPatterns[tt],se=xe[0],Ee=xe[1],gt){case k:Be=new Date(he),Te=Be.getUTCDay(),se>Ee&&(Ee+=7,Te<se&&(Te+=7));break;case F:Be=new Date(he);var pt=Be.getUTCHours(),Rt=Be.getUTCMinutes(),$t=Be.getUTCSeconds(),Wt=Be.getUTCMilliseconds();Te=pt+(Rt/60+$t/3600+Wt/36e5),se>Ee&&(Ee+=24,Te<se&&(Te+=24));break;case"":Te=he;break}if(Te>=se&&Te<Ee)return _}else for(var Ht=De._cachedValues[tt],Ft=0;Ft<Ht.length;Ft++)if(se=Ht[Ft],Ee=se+at.dvalue,he>=se&&he<Ee)return _}}return he},S.locateBreaks=function(he,De){var xe,se,Ee,Te,Be=[];if(!S.rangebreaks)return Be;var tt=S.rangebreaks.slice().sort(function(Ue,xt){return Ue.pattern===k&&xt.pattern===F?-1:xt.pattern===k&&Ue.pattern===F?1:0}),at=function(Ue,xt){if(Ue=O.constrain(Ue,he,De),xt=O.constrain(xt,he,De),Ue!==xt){for(var Gt=!0,Jt=0;Jt<Be.length;Jt++){var Ut=Be[Jt];Ue<Ut.max&&xt>=Ut.min&&(Ue<Ut.min&&(Ut.min=Ue),xt>Ut.max&&(Ut.max=xt),Gt=!1)}Gt&&Be.push({min:Ue,max:xt})}};for(xe=0;xe<tt.length;xe++){var gt=tt[xe];if(gt.enabled)if(gt.bounds){var pt=he,Rt=De;gt.pattern&&(pt=Math.floor(pt)),se=O.simpleMap(gt.bounds,gt.pattern?u:S.r2l),Ee=se[0],Te=se[1];var $t=new Date(pt),Wt,Ht;switch(gt.pattern){case k:Ht=A,Wt=((Te<Ee?7:0)+(Te-Ee))*E,pt+=Ee*E-($t.getUTCDay()*E+$t.getUTCHours()*D+$t.getUTCMinutes()*g+$t.getUTCSeconds()*C+$t.getUTCMilliseconds());break;case F:Ht=E,Wt=((Te<Ee?24:0)+(Te-Ee))*D,pt+=Ee*D-($t.getUTCHours()*D+$t.getUTCMinutes()*g+$t.getUTCSeconds()*C+$t.getUTCMilliseconds());break;default:pt=Math.min(se[0],se[1]),Rt=Math.max(se[0],se[1]),Ht=Rt-pt,Wt=Ht}for(var Ft=pt;Ft<Rt;Ft+=Ht)at(Ft,Ft+Wt)}else for(var st=O.simpleMap(gt.values,S.d2c),rt=0;rt<st.length;rt++)Ee=st[rt],Te=Ee+gt.dvalue,at(Ee,Te)}return Be.sort(function(Ue,xt){return Ue.min-xt.min}),Be},S.makeCalcdata=function(he,De,xe){var se,Ee,Te,Be,tt=S.type,at=tt==="date"&&he[De+"calendar"];if(De in he){if(se=he[De],Be=he._length||O.minRowLength(se),O.isTypedArray(se)&&(tt==="linear"||tt==="log")){if(Be===se.length)return se;if(se.subarray)return se.subarray(0,Be)}if(tt==="multicategory")return ee(se,Be);for(Ee=new Array(Be),Te=0;Te<Be;Te++)Ee[Te]=S.d2c(se[Te],0,at,xe)}else{var gt=De+"0"in he?S.d2c(he[De+"0"],0,at):0,pt=he["d"+De]?Number(he["d"+De]):1;for(se=he[{x:"y",y:"x"}[De]],Be=he._length||se.length,Ee=new Array(Be),Te=0;Te<Be;Te++)Ee[Te]=gt+Te*pt}if(S.rangebreaks)for(Te=0;Te<Be;Te++)Ee[Te]=S.maskBreaks(Ee[Te]);return Ee},S.isValidRange=function(he,De){return Array.isArray(he)&&he.length===2&&(De&&he[0]===null||l(S.r2l(he[0])))&&(De&&he[1]===null||l(S.r2l(he[1])))},S.getAutorangeDflt=function(he,De){var xe=!S.isValidRange(he,"nullOk");return xe&&De&&De.reverseDflt?xe="reversed":he&&(he[0]===null&&he[1]===null?xe=!0:he[0]===null&&he[1]!==null?xe="min":he[0]!==null&&he[1]===null&&(xe="max")),xe},S.isReversed=function(){var he=S.autorange;return he==="reversed"||he==="min reversed"||he==="max reversed"},S.isPtWithinRange=function(he,De){var xe=S.c2l(he[$],null,De),se=S.r2l(S.range[0]),Ee=S.r2l(S.range[1]);return se<Ee?se<=xe&&xe<=Ee:Ee<=xe&&xe<=se},S._emptyCategories=function(){S._categories=[],S._categoriesMap={}},S.clearCalc=function(){var he=S._matchGroup;if(he){var De=null,xe=null;for(var se in he){var Ee=M[I.id2name(se)];if(Ee._categories){De=Ee._categories,xe=Ee._categoriesMap;break}}De&&xe?(S._categories=De,S._categoriesMap=xe):S._emptyCategories()}else S._emptyCategories();if(S._initialCategories)for(var Te=0;Te<S._initialCategories.length;Te++)G(S._initialCategories[Te])},S.sortByInitialCategories=function(){var he=[];if(S._emptyCategories(),S._initialCategories)for(var De=0;De<S._initialCategories.length;De++)G(S._initialCategories[De]);he=he.concat(S._traceIndices);var xe=S._matchGroup;for(var se in xe)if(W!==se){var Ee=M[I.id2name(se)];Ee._categories=S._categories,Ee._categoriesMap=S._categoriesMap,he=he.concat(Ee._traceIndices)}return he};var _e=M._d3locale;S.type==="date"&&(S._dateFormat=_e?_e.timeFormat:R,S._extraFormat=M._extraFormat),S._separators=M.separators,S._numFormat=_e?_e.numberFormat:z,delete S._minDtick,delete S._forceTick0}}}),Pb=U({"src/plots/cartesian/axis_autotype.js"(pe,le){var w=_t(),R=ii(),O=Dt().BADNUM,z=R.isArrayOrTypedArray,l=R.isDateTime,u=R.cleanNumber,c=Math.round;le.exports=function(A,E,D){var g=A,C=D.noMultiCategory;if(z(g)&&!g.length)return"-";if(!C&&_(g))return"multicategory";if(C&&Array.isArray(g[0])){for(var I=[],N=0;N<g.length;N++)if(z(g[N]))for(var F=0;F<g[N].length;F++)I.push(g[N][F]);g=I}if(v(g,E))return"date";var k=D.autotypenumbers!=="strict";return m(g,k)?"category":f(g,k)?"linear":"-"};function p(x,A){return A?w(x):typeof x=="number"}function f(x,A){for(var E=x.length,D=0;D<E;D++)if(p(x[D],A))return!0;return!1}function v(x,A){for(var E=x.length,D=h(E),g=0,C=0,I={},N=0;N<E;N+=D){var F=c(N),k=x[F],P=String(k);I[P]||(I[P]=1,l(k,A)&&g++,w(k)&&C++)}return g>C*2}function h(x){return Math.max(1,(x-1)/1e3)}function m(x,A){for(var E=x.length,D=h(E),g=0,C=0,I={},N=0;N<E;N+=D){var F=c(N),k=x[F],P=String(k);if(!I[P]){I[P]=1;var T=typeof k;T==="boolean"?C++:(A?u(k)!==O:T==="number")?g++:T==="string"&&C++}}return C>g*2}function _(x){return z(x[0])&&z(x[1])}}}),gx=U({"src/plots/cartesian/autorange.js"(pe,le){var w=Ze(),R=_t(),O=ii(),z=Dt().FP_SAFE,l=Mi(),u=ec(),c=Tf(),p=c.getFromId,f=c.isLinked;le.exports={applyAutorangeOptions:S,getAutoRange:v,makePadFn:m,doAutoRange:E,findExtremes:D,concatExtremes:A};function v(M,W){var $,Z,K=[],Q=M._fullLayout,J=m(Q,W,0),G=m(Q,W,1),ee=A(M,W),re=ee.min,fe=ee.max;if(re.length===0||fe.length===0)return O.simpleMap(W.range,W.r2l);var we=re[0].val,Oe=fe[0].val;for($=1;$<re.length&&we===Oe;$++)we=Math.min(we,re[$].val);for($=1;$<fe.length&&we===Oe;$++)Oe=Math.max(Oe,fe[$].val);var ke=W.autorange,Le=ke==="reversed"||ke==="min reversed"||ke==="max reversed";if(!Le&&W.range){var oe=O.simpleMap(W.range,W.r2l);Le=oe[1]<oe[0]}W.autorange==="reversed"&&(W.autorange=!0);var be=W.rangemode,_e=be==="tozero",he=be==="nonnegative",De=W._length,xe=De/10,se=0,Ee,Te,Be,tt,at,gt;for($=0;$<re.length;$++)for(Ee=re[$],Z=0;Z<fe.length;Z++)Te=fe[Z],gt=Te.val-Ee.val-h(W,Ee.val,Te.val),gt>0&&(at=De-J(Ee)-G(Te),at>xe?gt/at>se&&(Be=Ee,tt=Te,se=gt/at):gt/De>se&&(Be={val:Ee.val,nopad:1},tt={val:Te.val,nopad:1},se=gt/De));function pt(Ft,st){return Math.max(Ft,G(st))}if(we===Oe){var Rt=we-1,$t=we+1;if(_e)if(we===0)K=[0,1];else{var Wt=(we>0?fe:re).reduce(pt,0),Ht=we/(1-Math.min(.5,Wt/De));K=we>0?[0,Ht]:[Ht,0]}else he?K=[Math.max(0,Rt),Math.max(1,$t)]:K=[Rt,$t]}else _e?(Be.val>=0&&(Be={val:0,nopad:1}),tt.val<=0&&(tt={val:0,nopad:1})):he&&(Be.val-se*J(Be)<0&&(Be={val:0,nopad:1}),tt.val<=0&&(tt={val:1,nopad:1})),se=(tt.val-Be.val-h(W,Ee.val,Te.val))/(De-J(Be)-G(tt)),K=[Be.val-se*J(Be),tt.val+se*G(tt)];return K=S(K,W),W.limitRange&&W.limitRange(),Le&&K.reverse(),O.simpleMap(K,W.l2r||Number)}function h(M,W,$){var Z=0;if(M.rangebreaks)for(var K=M.locateBreaks(W,$),Q=0;Q<K.length;Q++){var J=K[Q];Z+=J.max-J.min}return Z}function m(M,W,$){var Z=.05*W._length,K=W._anchorAxis||{};if((W.ticklabelposition||"").indexOf("inside")!==-1||(K.ticklabelposition||"").indexOf("inside")!==-1){var Q=W.isReversed();if(!Q){var J=O.simpleMap(W.range,W.r2l);Q=J[1]<J[0]}Q&&($=!$)}var G=0;return f(M,W._id)||(G=x(M,W,$)),Z=Math.max(G,Z),W.constrain==="domain"&&W._inputDomain&&(Z*=(W._inputDomain[1]-W._inputDomain[0])/(W.domain[1]-W.domain[0])),function(re){return re.nopad?0:re.pad+(re.extrapad?Z:G)}}var _=3;function x(M,W,$){var Z=0,K=W._id.charAt(0)==="x";for(var Q in M._plots){var J=M._plots[Q];if(!(W._id!==J.xaxis._id&&W._id!==J.yaxis._id)){var G=(K?J.yaxis:J.xaxis)||{};if((G.ticklabelposition||"").indexOf("inside")!==-1&&(!$&&(G.side==="left"||G.side==="bottom")||$&&(G.side==="top"||G.side==="right"))){if(G._vals){var ee=O.deg2rad(G._tickAngles[G._id+"tick"]||0),re=Math.abs(Math.cos(ee)),fe=Math.abs(Math.sin(ee));if(!G._vals[0].bb){var we=G._id+"tick",Oe=G._selections[we];Oe.each(function(he){var De=w.select(this),xe=De.select(".text-math-group");xe.empty()&&(he.bb=u.bBox(De.node()))})}for(var ke=0;ke<G._vals.length;ke++){var Le=G._vals[ke],oe=Le.bb;if(oe){var be=2*_+oe.width,_e=2*_+oe.height;Z=Math.max(Z,K?Math.max(be*re,_e*fe):Math.max(_e*re,be*fe))}}}G.ticks==="inside"&&G.ticklabelposition==="inside"&&(Z+=G.ticklen||0)}}}return Z}function A(M,W,$){var Z=W._id,K=M._fullData,Q=M._fullLayout,J=[],G=[],ee,re,fe;function we(be,_e){for(ee=0;ee<_e.length;ee++){var he=be[_e[ee]],De=(he._extremes||{})[Z];if(he.visible===!0&&De){for(re=0;re<De.min.length;re++)fe=De.min[re],g(J,fe.val,fe.pad,{extrapad:fe.extrapad});for(re=0;re<De.max.length;re++)fe=De.max[re],C(G,fe.val,fe.pad,{extrapad:fe.extrapad})}}}if(we(K,W._traceIndices),we(Q.annotations||[],W._annIndices||[]),we(Q.shapes||[],W._shapeIndices||[]),W._matchGroup&&!$){for(var Oe in W._matchGroup)if(Oe!==W._id){var ke=p(M,Oe),Le=A(M,ke,!0),oe=W._length/ke._length;for(re=0;re<Le.min.length;re++)fe=Le.min[re],g(J,fe.val,fe.pad*oe,{extrapad:fe.extrapad});for(re=0;re<Le.max.length;re++)fe=Le.max[re],C(G,fe.val,fe.pad*oe,{extrapad:fe.extrapad})}}return{min:J,max:G}}function E(M,W,$){if(W.setScale(),W.autorange){W.range=$?$.slice():v(M,W),W._r=W.range.slice(),W._rl=O.simpleMap(W._r,W.r2l);var Z=W._input,K={};K[W._attr+".range"]=W.range,K[W._attr+".autorange"]=W.autorange,l.call("_storeDirectGUIEdit",M.layout,M._fullLayout._preGUI,K),Z.range=W.range.slice(),Z.autorange=W.autorange}var Q=W._anchorAxis;if(Q&&Q.rangeslider){var J=Q.rangeslider[W._name];J&&J.rangemode==="auto"&&(J.range=v(M,W)),Q._input.rangeslider[W._name]=O.extendFlat({},J)}}function D(M,W,$){$||($={}),M._m||M.setScale();var Z=[],K=[],Q=W.length,J=$.padded||!1,G=$.tozero&&(M.type==="linear"||M.type==="-"),ee=M.type==="log",re=!1,fe=$.vpadLinearized||!1,we,Oe,ke,Le,oe,be,_e,he,De;function xe(pt){if(Array.isArray(pt))return re=!0,function($t){return Math.max(Number(pt[$t]||0),0)};var Rt=Math.max(Number(pt||0),0);return function(){return Rt}}var se=xe((M._m>0?$.ppadplus:$.ppadminus)||$.ppad||0),Ee=xe((M._m>0?$.ppadminus:$.ppadplus)||$.ppad||0),Te=xe($.vpadplus||$.vpad),Be=xe($.vpadminus||$.vpad);if(!re){if(he=1/0,De=-1/0,ee)for(we=0;we<Q;we++)Oe=W[we],Oe<he&&Oe>0&&(he=Oe),Oe>De&&Oe<z&&(De=Oe);else for(we=0;we<Q;we++)Oe=W[we],Oe<he&&Oe>-z&&(he=Oe),Oe>De&&Oe<z&&(De=Oe);W=[he,De],Q=2}var tt={tozero:G,extrapad:J};function at(pt){ke=W[pt],R(ke)&&(be=se(pt),_e=Ee(pt),fe?(Le=M.c2l(ke)-Be(pt),oe=M.c2l(ke)+Te(pt)):(he=ke-Be(pt),De=ke+Te(pt),ee&&he<De/10&&(he=De/10),Le=M.c2l(he),oe=M.c2l(De)),G&&(Le=Math.min(0,Le),oe=Math.max(0,oe)),N(Le)&&g(Z,Le,_e,tt),N(oe)&&C(K,oe,be,tt))}var gt=Math.min(6,Q);for(we=0;we<gt;we++)at(we);for(we=Q-1;we>=gt;we--)at(we);return{min:Z,max:K,opts:$}}function g(M,W,$,Z){I(M,W,$,Z,F)}function C(M,W,$,Z){I(M,W,$,Z,k)}function I(M,W,$,Z,K){for(var Q=Z.tozero,J=Z.extrapad,G=!0,ee=0;ee<M.length&&G;ee++){var re=M[ee];if(K(re.val,W)&&re.pad>=$&&(re.extrapad||!J)){G=!1;break}else K(W,re.val)&&re.pad<=$&&(J||!re.extrapad)&&(M.splice(ee,1),ee--)}if(G){var fe=Q&&W===0;M.push({val:W,pad:fe?0:$,extrapad:fe?!1:J})}}function N(M){return R(M)&&Math.abs(M)<z}function F(M,W){return M<=W}function k(M,W){return M>=W}function P(M,W){var $=W.autorangeoptions;return $&&$.minallowed!==void 0&&y(W,$.minallowed,$.maxallowed)?$.minallowed:$&&$.clipmin!==void 0&&y(W,$.clipmin,$.clipmax)?Math.max(M,W.d2l($.clipmin)):M}function T(M,W){var $=W.autorangeoptions;return $&&$.maxallowed!==void 0&&y(W,$.minallowed,$.maxallowed)?$.maxallowed:$&&$.clipmax!==void 0&&y(W,$.clipmin,$.clipmax)?Math.min(M,W.d2l($.clipmax)):M}function y(M,W,$){return W!==void 0&&$!==void 0?(W=M.d2l(W),$=M.d2l($),W<$):!0}function S(M,W){if(!W||!W.autorangeoptions)return M;var $=M[0],Z=M[1],K=W.autorangeoptions.include;if(K!==void 0){var Q=W.d2l($),J=W.d2l(Z);O.isArrayOrTypedArray(K)||(K=[K]);for(var G=0;G<K.length;G++){var ee=W.d2l(K[G]);Q>=ee&&(Q=ee,$=ee),J<=ee&&(J=ee,Z=ee)}}return $=P($,W),Z=T(Z,W),[$,Z]}}}),Yu=U({"src/plots/cartesian/axes.js"(pe,le){var w=Ze(),R=_t(),O=tp(),z=Mi(),l=ii(),u=l.strTranslate,c=ah(),p=Nv(),f=Lr(),v=ec(),h=Hg(),m=lM(),_=Dt(),x=_.ONEMAXYEAR,A=_.ONEAVGYEAR,E=_.ONEMINYEAR,D=_.ONEMAXQUARTER,g=_.ONEAVGQUARTER,C=_.ONEMINQUARTER,I=_.ONEMAXMONTH,N=_.ONEAVGMONTH,F=_.ONEMINMONTH,k=_.ONEWEEK,P=_.ONEDAY,T=P/2,y=_.ONEHOUR,S=_.ONEMIN,M=_.ONESEC,W=_.ONEMILLI,$=_.ONEMICROSEC,Z=_.MINUS_SIGN,K=_.BADNUM,Q={K:"zeroline"},J={K:"gridline",L:"path"},G={K:"minor-gridline",L:"path"},ee={K:"tick",L:"path"},re={K:"tick",L:"text"},fe={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},we=tg(),Oe=we.MID_SHIFT,ke=we.CAP_SHIFT,Le=we.LINE_SPACING,oe=we.OPPOSITE_SIDE,be=3,_e=le.exports={};_e.setConvert=Wy();var he=Pb(),De=Tf(),xe=De.idSort,se=De.isLinked;_e.id2name=De.id2name,_e.name2id=De.name2id,_e.cleanId=De.cleanId,_e.list=De.list,_e.listIds=De.listIds,_e.getFromId=De.getFromId,_e.getFromTrace=De.getFromTrace;var Ee=gx();_e.getAutoRange=Ee.getAutoRange,_e.findExtremes=Ee.findExtremes;var Te=1e-4;function Be(vr){var er=(vr[1]-vr[0])*Te;return[vr[0]-er,vr[1]+er]}_e.coerceRef=function(vr,er,si,ei,Kn,qn){var pi=ei.charAt(ei.length-1),_i=si._fullLayout._subplots[pi+"axis"],fi=ei+"ref",Ri={};return Kn||(Kn=_i[0]||(typeof qn=="string"?qn:qn[0])),qn||(qn=Kn),_i=_i.concat(_i.map(function($i){return $i+" domain"})),Ri[fi]={valType:"enumerated",values:_i.concat(qn?typeof qn=="string"?[qn]:qn:[]),dflt:Kn},l.coerce(vr,er,Ri,fi)},_e.getRefType=function(vr){return vr===void 0?vr:vr==="paper"?"paper":vr==="pixel"?"pixel":/( domain)$/.test(vr)?"domain":"range"},_e.coercePosition=function(vr,er,si,ei,Kn,qn){var pi,_i,fi=_e.getRefType(ei);if(fi!=="range")pi=l.ensureNumber,_i=si(Kn,qn);else{var Ri=_e.getFromId(er,ei);qn=Ri.fraction2r(qn),_i=si(Kn,qn),pi=Ri.cleanPos}vr[Kn]=pi(_i)},_e.cleanPosition=function(vr,er,si){var ei=si==="paper"||si==="pixel"?l.ensureNumber:_e.getFromId(er,si).cleanPos;return ei(vr)},_e.redrawComponents=function(vr,er){er=er||_e.listIds(vr);var si=vr._fullLayout;function ei(Kn,qn,pi,_i){for(var fi=z.getComponentMethod(Kn,qn),Ri={},$i=0;$i<er.length;$i++)for(var Hi=si[_e.id2name(er[$i])],wr=Hi[pi],gn=0;gn<wr.length;gn++){var Xn=wr[gn];if(!Ri[Xn]&&(fi(vr,Xn),Ri[Xn]=1,_i))return}}ei("annotations","drawOne","_annIndices"),ei("shapes","drawOne","_shapeIndices"),ei("images","draw","_imgIndices",!0),ei("selections","drawOne","_selectionIndices")};var tt=_e.getDataConversions=function(vr,er,si,ei){var Kn,qn=si==="x"||si==="y"||si==="z"?si:ei;if(l.isArrayOrTypedArray(qn)){if(Kn={type:he(ei,void 0,{autotypenumbers:vr._fullLayout.autotypenumbers}),_categories:[]},_e.setConvert(Kn),Kn.type==="category")for(var pi=0;pi<ei.length;pi++)Kn.d2c(ei[pi])}else Kn=_e.getFromTrace(vr,er,qn);return Kn?{d2c:Kn.d2c,c2d:Kn.c2d}:qn==="ids"?{d2c:gt,c2d:gt}:{d2c:at,c2d:at}};function at(vr){return+vr}function gt(vr){return String(vr)}_e.getDataToCoordFunc=function(vr,er,si,ei){return tt(vr,er,si,ei).d2c},_e.counterLetter=function(vr){var er=vr.charAt(0);if(er==="x")return"y";if(er==="y")return"x"},_e.minDtick=function(vr,er,si,ei){["log","category","multicategory"].indexOf(vr.type)!==-1||!ei?vr._minDtick=0:vr._minDtick===void 0?(vr._minDtick=er,vr._forceTick0=si):vr._minDtick&&((vr._minDtick/er+1e-6)%1<2e-6&&((si-vr._forceTick0)/er%1+1.000001)%1<2e-6?(vr._minDtick=er,vr._forceTick0=si):((er/vr._minDtick+1e-6)%1>2e-6||((si-vr._forceTick0)/vr._minDtick%1+1.000001)%1>2e-6)&&(vr._minDtick=0))},_e.saveRangeInitial=function(vr,er){for(var si=_e.list(vr,"",!0),ei=!1,Kn=0;Kn<si.length;Kn++){var qn=si[Kn],pi=qn._rangeInitial0===void 0&&qn._rangeInitial1===void 0,_i=pi||qn.range[0]!==qn._rangeInitial0||qn.range[1]!==qn._rangeInitial1,fi=qn.autorange;(pi&&fi!==!0||er&&_i)&&(qn._rangeInitial0=fi==="min"||fi==="max reversed"?void 0:qn.range[0],qn._rangeInitial1=fi==="max"||fi==="min reversed"?void 0:qn.range[1],qn._autorangeInitial=fi,ei=!0)}return ei},_e.saveShowSpikeInitial=function(vr,er){for(var si=_e.list(vr,"",!0),ei=!1,Kn="on",qn=0;qn<si.length;qn++){var pi=si[qn],_i=pi._showSpikeInitial===void 0,fi=_i||pi.showspikes!==pi._showspikes;(_i||er&&fi)&&(pi._showSpikeInitial=pi.showspikes,ei=!0),Kn==="on"&&!pi.showspikes&&(Kn="off")}return vr._fullLayout._cartesianSpikesEnabled=Kn,ei},_e.autoBin=function(vr,er,si,ei,Kn,qn){var pi=l.aggNums(Math.min,null,vr),_i=l.aggNums(Math.max,null,vr);if(er.type==="category"||er.type==="multicategory")return{start:pi-.5,end:_i+.5,size:Math.max(1,Math.round(qn)||1),_dataSpan:_i-pi};Kn||(Kn=er.calendar);var fi;if(er.type==="log"?fi={type:"linear",range:[pi,_i]}:fi={type:er.type,range:l.simpleMap([pi,_i],er.c2r,0,Kn),calendar:Kn},_e.setConvert(fi),qn=qn&&m.dtick(qn,fi.type),qn)fi.dtick=qn,fi.tick0=m.tick0(void 0,fi.type,Kn);else{var Ri;if(si)Ri=(_i-pi)/si;else{var $i=l.distinctVals(vr),Hi=Math.pow(10,Math.floor(Math.log($i.minDiff)/Math.LN10)),wr=Hi*l.roundUp($i.minDiff/Hi,[.9,1.9,4.9,9.9],!0);Ri=Math.max(wr,2*l.stdev(vr)/Math.pow(vr.length,ei?.25:.4)),R(Ri)||(Ri=1)}_e.autoTicks(fi,Ri)}var gn=fi.dtick,Xn=_e.tickIncrement(_e.tickFirst(fi),gn,"reverse",Kn),Yi,ha;if(typeof gn=="number")Xn=pt(Xn,vr,fi,pi,_i),ha=1+Math.floor((_i-Xn)/gn),Yi=Xn+ha*gn;else for(fi.dtick.charAt(0)==="M"&&(Xn=Rt(Xn,vr,gn,pi,Kn)),Yi=Xn,ha=0;Yi<=_i;)Yi=_e.tickIncrement(Yi,gn,!1,Kn),ha++;return{start:er.c2r(Xn,0,Kn),end:er.c2r(Yi,0,Kn),size:gn,_dataSpan:_i-pi}};function pt(vr,er,si,ei,Kn){var qn=0,pi=0,_i=0,fi=0;function Ri(gn){return(1+(gn-vr)*100/si.dtick)%100<2}for(var $i=0;$i<er.length;$i++)er[$i]%1===0?_i++:R(er[$i])||fi++,Ri(er[$i])&&qn++,Ri(er[$i]+si.dtick/2)&&pi++;var Hi=er.length-fi;if(_i===Hi&&si.type!=="date")si.dtick<1?vr=ei-.5*si.dtick:(vr-=.5,vr+si.dtick<ei&&(vr+=si.dtick));else if(pi<Hi*.1&&(qn>Hi*.3||Ri(ei)||Ri(Kn))){var wr=si.dtick/2;vr+=vr+wr<ei?wr:-wr}return vr}function Rt(vr,er,si,ei,Kn){var qn=l.findExactDates(er,Kn),pi=.8;if(qn.exactDays>pi){var _i=Number(si.substr(1));qn.exactYears>pi&&_i%12===0?vr=_e.tickIncrement(vr,"M6","reverse")+P*1.5:qn.exactMonths>pi?vr=_e.tickIncrement(vr,"M1","reverse")+P*15.5:vr-=T;var fi=_e.tickIncrement(vr,si);if(fi<=ei)return fi}return vr}_e.prepMinorTicks=function(vr,er,si){if(!er.minor.dtick){delete vr.dtick;var ei=er.dtick&&R(er._tmin),Kn;if(ei){var qn=_e.tickIncrement(er._tmin,er.dtick,!0);Kn=[er._tmin,qn*.99+er._tmin*.01]}else{var pi=l.simpleMap(er.range,er.r2l);Kn=[pi[0],.8*pi[0]+.2*pi[1]]}if(vr.range=l.simpleMap(Kn,er.l2r),vr._isMinor=!0,_e.prepTicks(vr,si),ei){var _i=R(er.dtick),fi=R(vr.dtick),Ri=_i?er.dtick:+er.dtick.substring(1),$i=fi?vr.dtick:+vr.dtick.substring(1);_i&&fi?$t(Ri,$i)?Ri===2*k&&$i===2*P&&(vr.dtick=k):Ri===2*k&&$i===3*P?vr.dtick=k:Ri===k&&!(er._input.minor||{}).nticks?vr.dtick=P:Wt(Ri/$i,2.5)?vr.dtick=Ri/2:vr.dtick=Ri:String(er.dtick).charAt(0)==="M"?fi?vr.dtick="M1":$t(Ri,$i)?Ri>=12&&$i===2&&(vr.dtick="M3"):vr.dtick=er.dtick:String(vr.dtick).charAt(0)==="L"?String(er.dtick).charAt(0)==="L"?$t(Ri,$i)||(vr.dtick=Wt(Ri/$i,2.5)?er.dtick/2:er.dtick):vr.dtick="D1":vr.dtick==="D2"&&+er.dtick>1&&(vr.dtick=1)}vr.range=er.range}er.minor._tick0Init===void 0&&(vr.tick0=er.tick0)};function $t(vr,er){return Math.abs((vr/er+.5)%1-.5)<.001}function Wt(vr,er){return Math.abs(vr/er-1)<.001}_e.prepTicks=function(vr,er){var si=l.simpleMap(vr.range,vr.r2l,void 0,void 0,er);if(vr.tickmode==="auto"||!vr.dtick){var ei=vr.nticks,Kn;ei||(vr.type==="category"||vr.type==="multicategory"?(Kn=vr.tickfont?l.bigFont(vr.tickfont.size||12):15,ei=vr._length/Kn):(Kn=vr._id.charAt(0)==="y"?40:80,ei=l.constrain(vr._length/Kn,4,9)+1),vr._name==="radialaxis"&&(ei*=2)),vr.minor&&vr.minor.tickmode!=="array"||vr.tickmode==="array"&&(ei*=100),vr._roughDTick=Math.abs(si[1]-si[0])/ei,_e.autoTicks(vr,vr._roughDTick),vr._minDtick>0&&vr.dtick<vr._minDtick*2&&(vr.dtick=vr._minDtick,vr.tick0=vr.l2r(vr._forceTick0))}vr.ticklabelmode==="period"&&Ft(vr),vr.tick0||(vr.tick0=vr.type==="date"?"2000-01-01":0),vr.type==="date"&&vr.dtick<.1&&(vr.dtick=.1),Rn(vr)};function Ht(vr){return+vr.substring(1)}function Ft(vr){var er;function si(){return!(R(vr.dtick)||vr.dtick.charAt(0)!=="M")}var ei=si(),Kn=_e.getTickFormat(vr);if(Kn){var qn=vr._dtickInit!==vr.dtick;/%[fLQsSMX]/.test(Kn)||(/%[HI]/.test(Kn)?(er=y,qn&&!ei&&vr.dtick<y&&(vr.dtick=y)):/%p/.test(Kn)?(er=T,qn&&!ei&&vr.dtick<T&&(vr.dtick=T)):/%[Aadejuwx]/.test(Kn)?(er=P,qn&&!ei&&vr.dtick<P&&(vr.dtick=P)):/%[UVW]/.test(Kn)?(er=k,qn&&!ei&&vr.dtick<k&&(vr.dtick=k)):/%[Bbm]/.test(Kn)?(er=N,qn&&(ei?Ht(vr.dtick)<1:vr.dtick<F)&&(vr.dtick="M1")):/%[q]/.test(Kn)?(er=g,qn&&(ei?Ht(vr.dtick)<3:vr.dtick<C)&&(vr.dtick="M3")):/%[Yy]/.test(Kn)&&(er=A,qn&&(ei?Ht(vr.dtick)<12:vr.dtick<E)&&(vr.dtick="M12")))}ei=si(),ei&&vr.tick0===vr._dowTick0&&(vr.tick0=vr._rawTick0),vr._definedDelta=er}function st(vr,er,si){for(var ei=0;ei<vr.length;ei++){var Kn=vr[ei].value,qn=ei,pi=ei+1;ei<vr.length-1?(qn=ei,pi=ei+1):ei>0?(qn=ei-1,pi=ei):(qn=ei,pi=ei);var _i=vr[qn].value,fi=vr[pi].value,Ri=Math.abs(fi-_i),$i=si||Ri,Hi=0;$i>=E?Ri>=E&&Ri<=x?Hi=Ri:Hi=A:si===g&&$i>=C?Ri>=C&&Ri<=D?Hi=Ri:Hi=g:$i>=F?Ri>=F&&Ri<=I?Hi=Ri:Hi=N:si===k&&$i>=k?Hi=k:$i>=P?Hi=P:si===T&&$i>=T?Hi=T:si===y&&$i>=y&&(Hi=y);var wr;Hi>=Ri&&(Hi=Ri,wr=!0);var gn=Kn+Hi;if(er.rangebreaks&&Hi>0){for(var Xn=84,Yi=0,ha=0;ha<Xn;ha++){var Ca=(ha+.5)/Xn;er.maskBreaks(Kn*(1-Ca)+Ca*gn)!==K&&Yi++}Hi*=Yi/Xn,Hi||(vr[ei].drop=!0),wr&&Ri>k&&(Hi=Ri)}(Hi>0||ei===0)&&(vr[ei].periodX=Kn+Hi/2)}}_e.calcTicks=function(er,si){for(var ei=er.type,Kn=er.calendar,qn=er.ticklabelstep,pi=er.ticklabelmode==="period",_i=er.range[0]>er.range[1],fi=!er.ticklabelindex||l.isArrayOrTypedArray(er.ticklabelindex)?er.ticklabelindex:[er.ticklabelindex],Ri=l.simpleMap(er.range,er.r2l,void 0,void 0,si),$i=Ri[1]<Ri[0],Hi=Math.min(Ri[0],Ri[1]),wr=Math.max(Ri[0],Ri[1]),gn=Math.max(1e3,er._length||0),Xn=[],Yi=[],ha=[],Ca=[],Ba=[],ji=er.minor&&(er.minor.ticks||er.minor.showgrid),Ea=1;Ea>=(ji?0:1);Ea--){var cs=!Ea;Ea?(er._dtickInit=er.dtick,er._tick0Init=er.tick0):(er.minor._dtickInit=er.minor.dtick,er.minor._tick0Init=er.minor.tick0);var No=Ea?er:l.extendFlat({},er,er.minor);if(cs?_e.prepMinorTicks(No,er,si):_e.prepTicks(No,si),No.tickmode==="array"){Ea?(ha=[],Xn=xt(er,!cs)):(Ca=[],Yi=xt(er,!cs));continue}if(No.tickmode==="sync"){ha=[],Xn=Ue(er);continue}var Vs=Be(Ri),pl=Vs[0],kl=Vs[1],El=R(No.dtick),iu=ei==="log"&&!(El||No.dtick.charAt(0)==="L"),bu=_e.tickFirst(No,si);if(Ea){if(er._tmin=bu,bu<pl!==$i)break;(ei==="category"||ei==="multicategory")&&(kl=$i?Math.max(-.5,kl):Math.min(er._categories.length-.5,kl))}var yl=null,ql=bu,rc;if(Ea){var zc;El?zc=er.dtick:ei==="date"?typeof er.dtick=="string"&&er.dtick.charAt(0)==="M"&&(zc=N*er.dtick.substring(1)):zc=er._roughDTick,rc=Math.round((er.r2l(ql)-er.r2l(er.tick0))/zc)-1}var Pf=No.dtick;for(No.rangebreaks&&No._tick0Init!==No.tick0&&(ql=Ci(ql,er),$i||(ql=_e.tickIncrement(ql,Pf,!$i,Kn))),Ea&&pi&&(ql=_e.tickIncrement(ql,Pf,!$i,Kn),rc--);$i?ql>=kl:ql<=kl;ql=_e.tickIncrement(ql,Pf,$i,Kn)){if(Ea&&rc++,No.rangebreaks&&!$i){if(ql<pl)continue;if(No.maskBreaks(ql)===K&&Ci(ql,No)>=wr)break}if(ha.length>gn||ql===yl)break;yl=ql;var ju={value:ql};Ea?(iu&&ql!==(ql|0)&&(ju.simpleLabel=!0),qn>1&&rc%qn&&(ju.skipLabel=!0),ha.push(ju)):(ju.minor=!0,Ca.push(ju))}}if(!Ca||Ca.length<2)fi=!1;else{var Ql=(Ca[1].value-Ca[0].value)*(_i?-1:1);xo(Ql,er.tickformat)||(fi=!1)}if(!fi)Ba=ha;else{var lu=ha.concat(Ca);pi&&ha.length&&(lu=lu.slice(1)),lu=lu.sort(function(pu,Zc){return pu.value-Zc.value}).filter(function(pu,Zc,Md){return Zc===0||pu.value!==Md[Zc-1].value});var dc=lu.map(function(pu,Zc){return pu.minor===void 0&&!pu.skipLabel?Zc:null}).filter(function(pu){return pu!==null});dc.forEach(function(pu){fi.map(function(Zc){var Md=pu+Zc;Md>=0&&Md<lu.length&&l.pushUnique(Ba,lu[Md])})})}if(ji){var wc=er.minor.ticks==="inside"&&er.ticks==="outside"||er.minor.ticks==="outside"&&er.ticks==="inside";if(!wc){for(var mc=ha.map(function(pu){return pu.value}),xu=[],qu=0;qu<Ca.length;qu++){var xf=Ca[qu],ed=xf.value;if(mc.indexOf(ed)===-1){for(var Df=!1,Sc=0;!Df&&Sc<ha.length;Sc++)1e7+ha[Sc].value===1e7+ed&&(Df=!0);Df||xu.push(xf)}}Ca=xu}}pi&&st(Ba,er,er._definedDelta);var Qo;if(er.rangebreaks){var Sl=er._id.charAt(0)==="y",gd=1;er.tickmode==="auto"&&(gd=er.tickfont?er.tickfont.size:12);var $f=NaN;for(Qo=ha.length-1;Qo>-1;Qo--){if(ha[Qo].drop){ha.splice(Qo,1);continue}ha[Qo].value=Ci(ha[Qo].value,er);var wu=er.c2p(ha[Qo].value);(Sl?$f>wu-gd:$f<wu+gd)?ha.splice($i?Qo+1:Qo,1):$f=wu}}aa(er)&&Math.abs(Ri[1]-Ri[0])===360&&ha.pop(),er._tmax=(ha[ha.length-1]||{}).value,er._prevDateHead="",er._inCalcTicks=!0;var Ad,Bc=function(pu){pu.text="",er._prevDateHead=Ad};ha=ha.concat(Ca);function uf(pu,Zc){var Md=_e.tickText(pu,Zc.value,!1,Zc.simpleLabel),uu=Zc.periodX;return uu!==void 0&&(Md.periodX=uu,(uu>wr||uu<Hi)&&(uu>wr&&(Md.periodX=wr),uu<Hi&&(Md.periodX=Hi),Bc(Md))),Md}var Cd;for(Qo=0;Qo<ha.length;Qo++){var Tl=ha[Qo].minor,Xu=ha[Qo].value;Tl?(fi&&Ba.indexOf(ha[Qo])!==-1?Cd=uf(er,ha[Qo]):Cd={x:Xu},Cd.minor=!0,Yi.push(Cd)):(Ad=er._prevDateHead,Cd=uf(er,ha[Qo]),(ha[Qo].skipLabel||fi&&Ba.indexOf(ha[Qo])===-1)&&Bc(Cd),Xn.push(Cd))}return Xn=Xn.concat(Yi),er._inCalcTicks=!1,pi&&Xn.length&&(Xn[0].noTick=!0),Xn};function rt(vr,er){return vr.rangebreaks&&(er=er.filter(function(si){return vr.maskBreaks(si.x)!==K})),er}function Ue(vr){var er=vr._mainAxis,si=[];if(er._vals){for(var ei=0;ei<er._vals.length;ei++)if(!er._vals[ei].noTick){var Kn=er.l2p(er._vals[ei].x),qn=vr.p2l(Kn),pi=_e.tickText(vr,qn);er._vals[ei].minor&&(pi.minor=!0,pi.text=""),si.push(pi)}}return si=rt(vr,si),si}function xt(vr,er){var si=l.simpleMap(vr.range,vr.r2l),ei=Be(si),Kn=Math.min(ei[0],ei[1]),qn=Math.max(ei[0],ei[1]),pi=vr.type==="category"?vr.d2l_noadd:vr.d2l;vr.type==="log"&&String(vr.dtick).charAt(0)!=="L"&&(vr.dtick="L"+Math.pow(10,Math.floor(Math.min(vr.range[0],vr.range[1]))-1));for(var _i=[],fi=0;fi<=1;fi++)if(!(er!==void 0&&(er&&fi||er===!1&&!fi))&&!(fi&&!vr.minor)){var Ri=fi?vr.minor.tickvals:vr.tickvals,$i=fi?[]:vr.ticktext;if(Ri){l.isArrayOrTypedArray($i)||($i=[]);for(var Hi=0;Hi<Ri.length;Hi++){var wr=pi(Ri[Hi]);if(wr>Kn&&wr<qn){var gn=_e.tickText(vr,wr,!1,String($i[Hi]));fi&&(gn.minor=!0,gn.text=""),_i.push(gn)}}}}return _i=rt(vr,_i),_i}var Gt=[2,5,10],Jt=[1,2,3,6,12],Ut=[1,2,5,10,15,30],kr=[1,2,3,7,14],Pr=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],$r=[-.301,0,.301,.699,1],rn=[15,30,45,90,180];function kn(vr,er,si){return er*l.roundUp(vr/er,si)}_e.autoTicks=function(vr,er,si){var ei;function Kn(Hi){return Math.pow(Hi,Math.floor(Math.log(er)/Math.LN10))}if(vr.type==="date"){vr.tick0=l.dateTick0(vr.calendar,0);var qn=2*er;if(qn>A)er/=A,ei=Kn(10),vr.dtick="M"+12*kn(er,ei,Gt);else if(qn>N)er/=N,vr.dtick="M"+kn(er,1,Jt);else if(qn>P){if(vr.dtick=kn(er,P,vr._hasDayOfWeekBreaks?[1,2,7,14]:kr),!si){var pi=_e.getTickFormat(vr),_i=vr.ticklabelmode==="period";_i&&(vr._rawTick0=vr.tick0),/%[uVW]/.test(pi)?vr.tick0=l.dateTick0(vr.calendar,2):vr.tick0=l.dateTick0(vr.calendar,1),_i&&(vr._dowTick0=vr.tick0)}}else qn>y?vr.dtick=kn(er,y,Jt):qn>S?vr.dtick=kn(er,S,Ut):qn>M?vr.dtick=kn(er,M,Ut):(ei=Kn(10),vr.dtick=kn(er,ei,Gt))}else if(vr.type==="log"){vr.tick0=0;var fi=l.simpleMap(vr.range,vr.r2l);if(vr._isMinor&&(er*=1.5),er>.7)vr.dtick=Math.ceil(er);else if(Math.abs(fi[1]-fi[0])<1){var Ri=1.5*Math.abs((fi[1]-fi[0])/er);er=Math.abs(Math.pow(10,fi[1])-Math.pow(10,fi[0]))/Ri,ei=Kn(10),vr.dtick="L"+kn(er,ei,Gt)}else vr.dtick=er>.3?"D2":"D1"}else vr.type==="category"||vr.type==="multicategory"?(vr.tick0=0,vr.dtick=Math.ceil(Math.max(er,1))):aa(vr)?(vr.tick0=0,ei=1,vr.dtick=kn(er,ei,rn)):(vr.tick0=0,ei=Kn(10),vr.dtick=kn(er,ei,Gt));if(vr.dtick===0&&(vr.dtick=1),!R(vr.dtick)&&typeof vr.dtick!="string"){var $i=vr.dtick;throw vr.dtick=1,"ax.dtick error: "+String($i)}};function Rn(vr){var er=vr.dtick;if(vr._tickexponent=0,!R(er)&&typeof er!="string"&&(er=1),(vr.type==="category"||vr.type==="multicategory")&&(vr._tickround=null),vr.type==="date"){var si=vr.r2l(vr.tick0),ei=vr.l2r(si).replace(/(^-|i)/g,""),Kn=ei.length;if(String(er).charAt(0)==="M")Kn>10||ei.substr(5)!=="01-01"?vr._tickround="d":vr._tickround=+er.substr(1)%12===0?"y":"m";else if(er>=P&&Kn<=10||er>=P*15)vr._tickround="d";else if(er>=S&&Kn<=16||er>=y)vr._tickround="M";else if(er>=M&&Kn<=19||er>=S)vr._tickround="S";else{var qn=vr.l2r(si+er).replace(/^-/,"").length;vr._tickround=Math.max(Kn,qn)-20,vr._tickround<0&&(vr._tickround=4)}}else if(R(er)||er.charAt(0)==="L"){var pi=vr.range.map(vr.r2d||Number);R(er)||(er=Number(er.substr(1))),vr._tickround=2-Math.floor(Math.log(er)/Math.LN10+.01);var _i=Math.max(Math.abs(pi[0]),Math.abs(pi[1])),fi=Math.floor(Math.log(_i)/Math.LN10+.01),Ri=vr.minexponent===void 0?3:vr.minexponent;Math.abs(fi)>Ri&&(et(vr.exponentformat)&&!mt(fi)?vr._tickexponent=3*Math.round((fi-1)/3):vr._tickexponent=fi)}else vr._tickround=null}_e.tickIncrement=function(vr,er,si,ei){var Kn=si?-1:1;if(R(er))return l.increment(vr,Kn*er);var qn=er.charAt(0),pi=Kn*Number(er.substr(1));if(qn==="M")return l.incrementMonth(vr,pi,ei);if(qn==="L")return Math.log(Math.pow(10,vr)+pi)/Math.LN10;if(qn==="D"){var _i=er==="D2"?$r:Pr,fi=vr+Kn*.01,Ri=l.roundUp(l.mod(fi,1),_i,si);return Math.floor(fi)+Math.log(w.round(Math.pow(10,Ri),1))/Math.LN10}throw"unrecognized dtick "+String(er)},_e.tickFirst=function(vr,er){var si=vr.r2l||Number,ei=l.simpleMap(vr.range,si,void 0,void 0,er),Kn=ei[1]<ei[0],qn=Kn?Math.floor:Math.ceil,pi=Be(ei)[0],_i=vr.dtick,fi=si(vr.tick0);if(R(_i)){var Ri=qn((pi-fi)/_i)*_i+fi;return(vr.type==="category"||vr.type==="multicategory")&&(Ri=l.constrain(Ri,0,vr._categories.length-1)),Ri}var $i=_i.charAt(0),Hi=Number(_i.substr(1));if($i==="M"){for(var wr=0,gn=fi,Xn,Yi,ha;wr<10;){if(Xn=_e.tickIncrement(gn,_i,Kn,vr.calendar),(Xn-pi)*(gn-pi)<=0)return Kn?Math.min(gn,Xn):Math.max(gn,Xn);Yi=(pi-(gn+Xn)/2)/(Xn-gn),ha=$i+(Math.abs(Math.round(Yi))||1)*Hi,gn=_e.tickIncrement(gn,ha,Yi<0?!Kn:Kn,vr.calendar),wr++}return l.error("tickFirst did not converge",vr),gn}else{if($i==="L")return Math.log(qn((Math.pow(10,pi)-fi)/Hi)*Hi+fi)/Math.LN10;if($i==="D"){var Ca=_i==="D2"?$r:Pr,Ba=l.roundUp(l.mod(pi,1),Ca,Kn);return Math.floor(pi)+Math.log(w.round(Math.pow(10,Ba),1))/Math.LN10}else throw"unrecognized dtick "+String(_i)}},_e.tickText=function(vr,er,si,ei){var Kn=ci(vr,er),qn=vr.tickmode==="array",pi=si||qn,_i=vr.type,fi=_i==="category"?vr.d2l_noadd:vr.d2l,Ri,$i=function(ha){var Ca=vr.l2p(ha);return Ca>=0&&Ca<=vr._length?ha:null};if(qn&&l.isArrayOrTypedArray(vr.ticktext)){var Hi=l.simpleMap(vr.range,vr.r2l),wr=(Math.abs(Hi[1]-Hi[0])-(vr._lBreaks||0))/1e4;for(Ri=0;Ri<vr.ticktext.length&&!(Math.abs(er-fi(vr.tickvals[Ri]))<wr);Ri++);if(Ri<vr.ticktext.length)return Kn.text=String(vr.ticktext[Ri]),Kn.xbnd=[$i(Kn.x-.5),$i(Kn.x+vr.dtick-.5)],Kn}function gn(ha){if(ha===void 0)return!0;if(si)return ha==="none";var Ca={first:vr._tmin,last:vr._tmax}[ha];return ha!=="all"&&er!==Ca}var Xn=si?"never":vr.exponentformat!=="none"&&gn(vr.showexponent)?"hide":"";if(_i==="date"?In(vr,Kn,si,pi):_i==="log"?Gn(vr,Kn,si,pi,Xn):_i==="category"?mr(vr,Kn):_i==="multicategory"?St(vr,Kn,si):aa(vr)?Et(vr,Kn,si,pi,Xn):Ot(vr,Kn,si,pi,Xn),ei||(vr.tickprefix&&!gn(vr.showtickprefix)&&(Kn.text=vr.tickprefix+Kn.text),vr.ticksuffix&&!gn(vr.showticksuffix)&&(Kn.text+=vr.ticksuffix)),vr.labelalias&&vr.labelalias.hasOwnProperty(Kn.text)){var Yi=vr.labelalias[Kn.text];typeof Yi=="string"&&(Kn.text=Yi)}return(vr.tickson==="boundaries"||vr.showdividers)&&(Kn.xbnd=[$i(Kn.x-.5),$i(Kn.x+vr.dtick-.5)]),Kn},_e.hoverLabelText=function(vr,er,si){si&&(vr=l.extendFlat({},vr,{hoverformat:si}));var ei=l.isArrayOrTypedArray(er)?er[0]:er,Kn=l.isArrayOrTypedArray(er)?er[1]:void 0;if(Kn!==void 0&&Kn!==ei)return _e.hoverLabelText(vr,ei,si)+" - "+_e.hoverLabelText(vr,Kn,si);var qn=vr.type==="log"&&ei<=0,pi=_e.tickText(vr,vr.c2l(qn?-ei:ei),"hover").text;return qn?ei===0?"0":Z+pi:pi};function ci(vr,er,si){var ei=vr.tickfont||{};return{x:er,dx:0,dy:0,text:si||"",fontSize:ei.size,font:ei.family,fontWeight:ei.weight,fontStyle:ei.style,fontVariant:ei.variant,fontTextcase:ei.textcase,fontLineposition:ei.lineposition,fontShadow:ei.shadow,fontColor:ei.color}}function In(vr,er,si,ei){var Kn=vr._tickround,qn=si&&vr.hoverformat||_e.getTickFormat(vr);ei=!qn&&ei,ei&&(R(Kn)?Kn=4:Kn={y:"m",m:"d",d:"M",M:"S",S:4}[Kn]);var pi=l.formatDate(er.x,qn,Kn,vr._dateFormat,vr.calendar,vr._extraFormat),_i,fi=pi.indexOf(`
`);if(fi!==-1&&(_i=pi.substr(fi+1),pi=pi.substr(0,fi)),ei&&(_i!==void 0&&(pi==="00:00:00"||pi==="00:00")?(pi=_i,_i=""):pi.length===8&&(pi=pi.replace(/:00$/,""))),_i)if(si)Kn==="d"?pi+=", "+_i:pi=_i+(pi?", "+pi:"");else if(!vr._inCalcTicks||vr._prevDateHead!==_i)vr._prevDateHead=_i,pi+="<br>"+_i;else{var Ri=Ta(vr),$i=vr._trueSide||vr.side;(!Ri&&$i==="top"||Ri&&$i==="bottom")&&(pi+="<br> ")}er.text=pi}function Gn(vr,er,si,ei,Kn){var qn=vr.dtick,pi=er.x,_i=vr.tickformat,fi=typeof qn=="string"&&qn.charAt(0);if(Kn==="never"&&(Kn=""),ei&&fi!=="L"&&(qn="L3",fi="L"),_i||fi==="L")er.text=Nt(Math.pow(10,pi),vr,Kn,ei);else if(R(qn)||fi==="D"&&(vr.minorloglabels==="complete"||l.mod(pi+.01,1)<.1)){vr.minorloglabels==="complete"&&!(l.mod(pi+.01,1)<.1)&&(er.fontSize*=.75);var Ri=Math.pow(10,pi).toExponential(0),$i=Ri.split("e"),Hi=+$i[1],wr=Math.abs(Hi),gn=vr.exponentformat;gn==="power"||et(gn)&&mt(Hi)?(er.text=$i[0],wr>0&&(er.text+="x10"),er.text==="1x10"&&(er.text="10"),Hi!==0&&Hi!==1&&(er.text+="<sup>"+(Hi>0?"":Z)+wr+"</sup>"),er.fontSize*=1.25):(gn==="e"||gn==="E")&&wr>2?er.text=$i[0]+gn+(Hi>0?"+":Z)+wr:(er.text=Nt(Math.pow(10,pi),vr,"","fakehover"),qn==="D1"&&vr._id.charAt(0)==="y"&&(er.dy-=er.fontSize/6))}else if(fi==="D")er.text=vr.minorloglabels==="none"?"":String(Math.round(Math.pow(10,l.mod(pi,1)))),er.fontSize*=.75;else throw"unrecognized dtick "+String(qn);if(vr.dtick==="D1"){var Xn=String(er.text).charAt(0);(Xn==="0"||Xn==="1")&&(vr._id.charAt(0)==="y"?er.dx-=er.fontSize/4:(er.dy+=er.fontSize/2,er.dx+=(vr.range[1]>vr.range[0]?1:-1)*er.fontSize*(pi<0?.5:.25)))}}function mr(vr,er){var si=vr._categories[Math.round(er.x)];si===void 0&&(si=""),er.text=String(si)}function St(vr,er,si){var ei=Math.round(er.x),Kn=vr._categories[ei]||[],qn=Kn[1]===void 0?"":String(Kn[1]),pi=Kn[0]===void 0?"":String(Kn[0]);si?er.text=pi+" - "+qn:(er.text=qn,er.text2=pi)}function Ot(vr,er,si,ei,Kn){Kn==="never"?Kn="":vr.showexponent==="all"&&Math.abs(er.x/vr.dtick)<1e-6&&(Kn="hide"),er.text=Nt(er.x,vr,Kn,ei)}function Et(vr,er,si,ei,Kn){if(vr.thetaunit==="radians"&&!si){var qn=er.x/180;if(qn===0)er.text="0";else{var pi=je(qn);if(pi[1]>=100)er.text=Nt(l.deg2rad(er.x),vr,Kn,ei);else{var _i=er.x<0;pi[1]===1?pi[0]===1?er.text="π":er.text=pi[0]+"π":er.text=["<sup>",pi[0],"</sup>","⁄","<sub>",pi[1],"</sub>","π"].join(""),_i&&(er.text=Z+er.text)}}}else er.text=Nt(er.x,vr,Kn,ei)}function je(vr){function er(_i,fi){return Math.abs(_i-fi)<=1e-6}function si(_i,fi){return er(fi,0)?_i:si(fi,_i%fi)}function ei(_i){for(var fi=1;!er(Math.round(_i*fi)/fi,_i);)fi*=10;return fi}var Kn=ei(vr),qn=vr*Kn,pi=Math.abs(si(qn,Kn));return[Math.round(qn/pi),Math.round(Kn/pi)]}var Ye=["f","p","n","μ","m","","k","M","G","T"];function et(vr){return vr==="SI"||vr==="B"}function mt(vr){return vr>14||vr<-15}function Nt(vr,er,si,ei){var Kn=vr<0,qn=er._tickround,pi=si||er.exponentformat||"B",_i=er._tickexponent,fi=_e.getTickFormat(er),Ri=er.separatethousands;if(ei){var $i={exponentformat:pi,minexponent:er.minexponent,dtick:er.showexponent==="none"?er.dtick:R(vr)&&Math.abs(vr)||1,range:er.showexponent==="none"?er.range.map(er.r2d):[0,vr||1]};Rn($i),qn=(Number($i._tickround)||0)+4,_i=$i._tickexponent,er.hoverformat&&(fi=er.hoverformat)}if(fi)return er._numFormat(fi)(vr).replace(/-/g,Z);var Hi=Math.pow(10,-qn)/2;if(pi==="none"&&(_i=0),vr=Math.abs(vr),vr<Hi)vr="0",Kn=!1;else{if(vr+=Hi,_i&&(vr*=Math.pow(10,-_i),qn+=_i),qn===0)vr=String(Math.floor(vr));else if(qn<0){vr=String(Math.round(vr)),vr=vr.substr(0,vr.length+qn);for(var wr=qn;wr<0;wr++)vr+="0"}else{vr=String(vr);var gn=vr.indexOf(".")+1;gn&&(vr=vr.substr(0,gn+qn).replace(/\.?0+$/,""))}vr=l.numSeparate(vr,er._separators,Ri)}if(_i&&pi!=="hide"){et(pi)&&mt(_i)&&(pi="power");var Xn;_i<0?Xn=Z+-_i:pi!=="power"?Xn="+"+_i:Xn=String(_i),pi==="e"||pi==="E"?vr+=pi+Xn:pi==="power"?vr+="×10<sup>"+Xn+"</sup>":pi==="B"&&_i===9?vr+="B":et(pi)&&(vr+=Ye[_i/3+5])}return Kn?Z+vr:vr}_e.getTickFormat=function(vr){var er;function si(fi){return typeof fi!="string"?fi:Number(fi.replace("M",""))*N}function ei(fi,Ri){var $i=["L","D"];if(typeof fi==typeof Ri){if(typeof fi=="number")return fi-Ri;var Hi=$i.indexOf(fi.charAt(0)),wr=$i.indexOf(Ri.charAt(0));return Hi===wr?Number(fi.replace(/(L|D)/g,""))-Number(Ri.replace(/(L|D)/g,"")):Hi-wr}else return typeof fi=="number"?1:-1}function Kn(fi,Ri,$i){var Hi=$i||function(Xn){return Xn},wr=Ri[0],gn=Ri[1];return(!wr&&typeof wr!="number"||Hi(wr)<=Hi(fi))&&(!gn&&typeof gn!="number"||Hi(gn)>=Hi(fi))}function qn(fi,Ri){var $i=Ri[0]===null,Hi=Ri[1]===null,wr=ei(fi,Ri[0])>=0,gn=ei(fi,Ri[1])<=0;return($i||wr)&&(Hi||gn)}var pi,_i;if(vr.tickformatstops&&vr.tickformatstops.length>0)switch(vr.type){case"date":case"linear":{for(er=0;er<vr.tickformatstops.length;er++)if(_i=vr.tickformatstops[er],_i.enabled&&Kn(vr.dtick,_i.dtickrange,si)){pi=_i;break}break}case"log":{for(er=0;er<vr.tickformatstops.length;er++)if(_i=vr.tickformatstops[er],_i.enabled&&qn(vr.dtick,_i.dtickrange)){pi=_i;break}break}}return pi?pi.value:vr.tickformat},_e.getSubplots=function(vr,er){var si=vr._fullLayout._subplots,ei=si.cartesian.concat(si.gl2d||[]),Kn=er?_e.findSubplotsWithAxis(ei,er):ei;return Kn.sort(function(qn,pi){var _i=qn.substr(1).split("y"),fi=pi.substr(1).split("y");return _i[0]===fi[0]?+_i[1]-+fi[1]:+_i[0]-+fi[0]}),Kn},_e.findSubplotsWithAxis=function(vr,er){for(var si=new RegExp(er._id.charAt(0)==="x"?"^"+er._id+"y":er._id+"$"),ei=[],Kn=0;Kn<vr.length;Kn++){var qn=vr[Kn];si.test(qn)&&ei.push(qn)}return ei},_e.makeClipPaths=function(vr){var er=vr._fullLayout;if(!er._hasOnlyLargeSploms){var si={_offset:0,_length:er.width,_id:""},ei={_offset:0,_length:er.height,_id:""},Kn=_e.list(vr,"x",!0),qn=_e.list(vr,"y",!0),pi=[],_i,fi;for(_i=0;_i<Kn.length;_i++)for(pi.push({x:Kn[_i],y:ei}),fi=0;fi<qn.length;fi++)_i===0&&pi.push({x:si,y:qn[fi]}),pi.push({x:Kn[_i],y:qn[fi]});var Ri=er._clips.selectAll(".axesclip").data(pi,function($i){return $i.x._id+$i.y._id});Ri.enter().append("clipPath").classed("axesclip",!0).attr("id",function($i){return"clip"+er._uid+$i.x._id+$i.y._id}).append("rect"),Ri.exit().remove(),Ri.each(function($i){w.select(this).select("rect").attr({x:$i.x._offset||0,y:$i.y._offset||0,width:$i.x._length||1,height:$i.y._length||1})})}},_e.draw=function(vr,er,si){var ei=vr._fullLayout;er==="redraw"&&ei._paper.selectAll("g.subplot").each(function(fi){var Ri=fi[0],$i=ei._plots[Ri];if($i){var Hi=$i.xaxis,wr=$i.yaxis;$i.xaxislayer.selectAll("."+Hi._id+"tick").remove(),$i.yaxislayer.selectAll("."+wr._id+"tick").remove(),$i.xaxislayer.selectAll("."+Hi._id+"tick2").remove(),$i.yaxislayer.selectAll("."+wr._id+"tick2").remove(),$i.xaxislayer.selectAll("."+Hi._id+"divider").remove(),$i.yaxislayer.selectAll("."+wr._id+"divider").remove(),$i.minorGridlayer&&$i.minorGridlayer.selectAll("path").remove(),$i.gridlayer&&$i.gridlayer.selectAll("path").remove(),$i.zerolinelayer&&$i.zerolinelayer.selectAll("path").remove(),$i.zerolinelayerAbove&&$i.zerolinelayerAbove.selectAll("path").remove(),ei._infolayer.select(".g-"+Hi._id+"title").remove(),ei._infolayer.select(".g-"+wr._id+"title").remove()}});var Kn=!er||er==="redraw"?_e.listIds(vr):er,qn=_e.list(vr),pi=qn.filter(function(fi){return fi.autoshift}).map(function(fi){return fi.overlaying});Kn.map(function(fi){var Ri=_e.getFromId(vr,fi);if(Ri.tickmode==="sync"&&Ri.overlaying){var $i=Kn.findIndex(function(Hi){return Hi===Ri.overlaying});$i>=0&&Kn.unshift(Kn.splice($i,1).shift())}});var _i={false:{left:0,right:0}};return l.syncOrAsync(Kn.map(function(fi){return function(){if(fi){var Ri=_e.getFromId(vr,fi);si||(si={}),si.axShifts=_i,si.overlayingShiftedAx=pi;var $i=_e.drawOne(vr,Ri,si);return Ri._shiftPusher&&ro(Ri,Ri._fullDepth||0,_i,!0),Ri._r=Ri.range.slice(),Ri._rl=l.simpleMap(Ri._r,Ri.r2l),$i}}}))},_e.drawOne=function(vr,er,si){si=si||{};var ei=si.axShifts||{},Kn=si.overlayingShiftedAx||[],qn,pi,_i;er.setScale();var fi=vr._fullLayout,Ri=er._id,$i=Ri.charAt(0),Hi=_e.counterLetter(Ri),wr=fi._plots[er._mainSubplot],gn=er.zerolinelayer==="above traces";if(!wr)return;if(er._shiftPusher=er.autoshift||Kn.indexOf(er._id)!==-1||Kn.indexOf(er.overlaying)!==-1,er._shiftPusher&er.anchor==="free"){var Xn=er.linewidth/2||0;er.ticks==="inside"&&(Xn+=er.ticklen),ro(er,Xn,ei,!0),ro(er,er.shift||0,ei,!1)}(si.skipTitle!==!0||er._shift===void 0)&&(er._shift=oo(er,ei));var Yi=wr[$i+"axislayer"],ha=er._mainLinePosition,Ca=ha+=er._shift,Ba=er._mainMirrorPosition,ji=er._vals=_e.calcTicks(er),Ea=[er.mirror,Ca,Ba].join("_");for(qn=0;qn<ji.length;qn++)ji[qn].axInfo=Ea;er._selections={},er._tickAngles&&(er._prevTickAngles=er._tickAngles),er._tickAngles={},er._depth=null;var cs={};function No(Xu){var pu=Ri+(Xu||"tick");return cs[pu]||(cs[pu]=Jr(er,pu,Ca)),cs[pu]}if(er.visible){var Vs=_e.makeTransTickFn(er),pl=_e.makeTransTickLabelFn(er),kl,El,iu=er.ticks==="inside",bu=er.ticks==="outside";if(er.tickson==="boundaries"){var yl=br(er,ji);El=_e.clipEnds(er,yl),kl=iu?El:yl}else El=_e.clipEnds(er,ji),kl=iu&&er.ticklabelmode!=="period"?El:ji;var ql=er._gridVals=El,rc=tn(er,ji);if(!fi._hasOnlyLargeSploms){var zc=er._subplotsWith,Pf={};for(qn=0;qn<zc.length;qn++){pi=zc[qn],_i=fi._plots[pi];var ju=_i[Hi+"axis"],Ql=ju._mainAxis._id;if(!Pf[Ql]){Pf[Ql]=1;var lu=$i==="x"?"M0,"+ju._offset+"v"+ju._length:"M"+ju._offset+",0h"+ju._length;_e.drawGrid(vr,er,{vals:ql,counterAxis:ju,layer:_i.gridlayer.select("."+Ri),minorLayer:_i.minorGridlayer.select("."+Ri),path:lu,transFn:Vs}),_e.drawZeroLine(vr,er,{counterAxis:ju,layer:gn?_i.zerolinelayerAbove:_i.zerolinelayer,path:lu,transFn:Vs})}}}var dc,wc=_e.getTickSigns(er),mc=_e.getTickSigns(er,"minor");if(er.ticks||er.minor&&er.minor.ticks){var xu=_e.makeTickPath(er,Ca,wc[2]),qu=_e.makeTickPath(er,Ca,mc[2],{minor:!0}),xf,ed,Df,Sc;if(er._anchorAxis&&er.mirror&&er.mirror!==!0?(xf=_e.makeTickPath(er,Ba,wc[3]),ed=_e.makeTickPath(er,Ba,mc[3],{minor:!0}),Df=xu+xf,Sc=qu+ed):(xf="",ed="",Df=xu,Sc=qu),er.showdividers&&bu&&er.tickson==="boundaries"){var Qo={};for(qn=0;qn<rc.length;qn++)Qo[rc[qn].x]=1;dc=function(Xu){return Qo[Xu.x]?xf:Df}}else dc=function(Xu){return Xu.minor?Sc:Df}}if(_e.drawTicks(vr,er,{vals:kl,layer:Yi,path:dc,transFn:Vs}),er.mirror==="allticks"){var Sl=Object.keys(er._linepositions||{});for(qn=0;qn<Sl.length;qn++){pi=Sl[qn],_i=fi._plots[pi];var gd=er._linepositions[pi]||[],$f=gd[0],wu=gd[1],Ad=gd[2],Bc=_e.makeTickPath(er,$f,Ad?wc[0]:mc[0],{minor:Ad})+_e.makeTickPath(er,wu,Ad?wc[1]:mc[1],{minor:Ad});_e.drawTicks(vr,er,{vals:kl,layer:_i[$i+"axislayer"],path:Bc,transFn:Vs})}}var uf=[];if(uf.push(function(){return _e.drawLabels(vr,er,{vals:ji,layer:Yi,plotinfo:_i,transFn:pl,labelFns:_e.makeLabelFns(er,Ca)})}),er.type==="multicategory"){var Cd={x:2,y:10}[$i];uf.push(function(){var Xu={x:"height",y:"width"}[$i],pu=No()[Xu]+Cd+(er._tickAngles[Ri+"tick"]?er.tickfont.size*Le:0);return _e.drawLabels(vr,er,{vals:Or(er,ji),layer:Yi,cls:Ri+"tick2",repositionOnUpdate:!0,secondary:!0,transFn:Vs,labelFns:_e.makeLabelFns(er,Ca+pu*wc[4])})}),uf.push(function(){return er._depth=wc[4]*(No("tick2")[er.side]-Ca),Wi(vr,er,{vals:rc,layer:Yi,path:_e.makeTickPath(er,Ca,wc[4],{len:er._depth}),transFn:Vs})})}else er.title.hasOwnProperty("standoff")&&uf.push(function(){er._depth=wc[4]*(No()[er.side]-Ca)});var Tl=z.getComponentMethod("rangeslider","isVisible")(er);return!si.skipTitle&&!(Tl&&er.side==="bottom")&&uf.push(function(){return Da(vr,er)}),uf.push(function(){var Xu=er.side.charAt(0),pu=oe[er.side].charAt(0),Zc=_e.getPxPosition(vr,er),Md=bu?er.ticklen:0,uu,Lf,op,zd;(er.automargin||Tl||er._shiftPusher)&&(er.type==="multicategory"?uu=No("tick2"):(uu=No(),$i==="x"&&Xu==="b"&&(er._depth=Math.max(uu.width>0?uu.bottom-Zc:0,Md))));var Qp=0,hh=0;if(er._shiftPusher&&(Qp=Math.max(Md,uu.height>0?Xu==="l"?Zc-uu.left:uu.right-Zc:0),er.title.text!==fi._dfltTitle[$i]&&(hh=(er._titleStandoff||0)+(er._titleScoot||0),Xu==="l"&&(hh+=Oa(er))),er._fullDepth=Math.max(Qp,hh)),er.automargin){Lf={x:0,y:0,r:0,l:0,t:0,b:0};var td=[0,1],ev=typeof er._shift=="number"?er._shift:0;if($i==="x"){if(Xu==="b"?Lf[Xu]=er._depth:(Lf[Xu]=er._depth=Math.max(uu.width>0?Zc-uu.top:0,Md),td.reverse()),uu.width>0){var Um=uu.right-(er._offset+er._length);Um>0&&(Lf.xr=1,Lf.r=Um);var Hm=er._offset-uu.left;Hm>0&&(Lf.xl=0,Lf.l=Hm)}}else if(Xu==="l"?(er._depth=Math.max(uu.height>0?Zc-uu.left:0,Md),Lf[Xu]=er._depth-ev):(er._depth=Math.max(uu.height>0?uu.right-Zc:0,Md),Lf[Xu]=er._depth+ev,td.reverse()),uu.height>0){var om=uu.bottom-(er._offset+er._length);om>0&&(Lf.yb=0,Lf.b=om);var K0=er._offset-uu.top;K0>0&&(Lf.yt=1,Lf.t=K0)}Lf[Hi]=er.anchor==="free"?er.position:er._anchorAxis.domain[td[0]],er.title.text!==fi._dfltTitle[$i]&&(Lf[Xu]+=Oa(er)+(er.title.standoff||0)),er.mirror&&er.anchor!=="free"&&(op={x:0,y:0,r:0,l:0,t:0,b:0},op[pu]=er.linewidth,er.mirror&&er.mirror!==!0&&(op[pu]+=Md),er.mirror===!0||er.mirror==="ticks"?op[Hi]=er._anchorAxis.domain[td[1]]:(er.mirror==="all"||er.mirror==="allticks")&&(op[Hi]=[er._counterDomainMin,er._counterDomainMax][td[1]]))}Tl&&(zd=z.getComponentMethod("rangeslider","autoMarginOpts")(vr,er)),typeof er.automargin=="string"&&(lr(Lf,er.automargin),lr(op,er.automargin)),O.autoMargin(vr,Fo(er),Lf),O.autoMargin(vr,an(er),op),O.autoMargin(vr,Hr(er),zd)}),l.syncOrAsync(uf)}};function lr(vr,er){if(vr){var si=Object.keys(fe).reduce(function(ei,Kn){return er.indexOf(Kn)!==-1&&fe[Kn].forEach(function(qn){ei[qn]=1}),ei},{});Object.keys(vr).forEach(function(ei){si[ei]||(ei.length===1?vr[ei]=0:delete vr[ei])})}}function br(vr,er){var si=[],ei,Kn=function(qn,pi){var _i=qn.xbnd[pi];_i!==null&&si.push(l.extendFlat({},qn,{x:_i}))};if(er.length){for(ei=0;ei<er.length;ei++)Kn(er[ei],0);Kn(er[ei-1],1)}return si}function Or(vr,er){for(var si=[],ei={},Kn=0;Kn<er.length;Kn++){var qn=er[Kn];ei[qn.text2]?ei[qn.text2].push(qn.x):ei[qn.text2]=[qn.x]}for(var pi in ei)si.push(ci(vr,l.interp(ei[pi],.5),pi));return si}function tn(vr,er){var si=[],ei,Kn,qn=er.length&&er[er.length-1].x<er[0].x,pi=function(fi,Ri){var $i=fi.xbnd[Ri];$i!==null&&si.push(l.extendFlat({},fi,{x:$i}))};if(vr.showdividers&&er.length){for(ei=0;ei<er.length;ei++){var _i=er[ei];_i.text2!==Kn&&pi(_i,qn?1:0),Kn=_i.text2}pi(er[ei-1],qn?0:1)}return si}function Jr(vr,er,si){var ei,Kn,qn,pi;if(vr._selections[er].size())ei=1/0,Kn=-1/0,qn=1/0,pi=-1/0,vr._selections[er].each(function(){var fi=no(this);if(fi.node().style.display!=="none"){var Ri=v.bBox(fi.node().parentNode);ei=Math.min(ei,Ri.top),Kn=Math.max(Kn,Ri.bottom),qn=Math.min(qn,Ri.left),pi=Math.max(pi,Ri.right)}});else{var _i=_e.makeLabelFns(vr,si);ei=Kn=_i.yFn({dx:0,dy:0,fontSize:0}),qn=pi=_i.xFn({dx:0,dy:0,fontSize:0})}return{top:ei,bottom:Kn,left:qn,right:pi,height:Kn-ei,width:pi-qn}}_e.getTickSigns=function(vr,er){var si=vr._id.charAt(0),ei={x:"top",y:"right"}[si],Kn=vr.side===ei?1:-1,qn=[-1,1,Kn,-Kn],pi=er?(vr.minor||{}).ticks:vr.ticks;return pi!=="inside"==(si==="x")&&(qn=qn.map(function(_i){return-_i})),vr.side&&qn.push({l:-1,t:-1,r:1,b:1}[vr.side.charAt(0)]),qn},_e.makeTransTickFn=function(vr){return vr._id.charAt(0)==="x"?function(er){return u(vr._offset+vr.l2p(er.x),0)}:function(er){return u(0,vr._offset+vr.l2p(er.x))}},_e.makeTransTickLabelFn=function(vr){var er=on(vr),si=vr.ticklabelshift||0,ei=vr.ticklabelstandoff||0,Kn=er[0],qn=er[1],pi=vr.range[0]>vr.range[1],_i=vr.ticklabelposition&&vr.ticklabelposition.indexOf("inside")!==-1,fi=!_i;if(si){var Ri=pi?-1:1;si=si*Ri}if(ei){var $i=vr.side,Hi=_i&&($i==="top"||$i==="left")||fi&&($i==="bottom"||$i==="right")?1:-1;ei=ei*Hi}return vr._id.charAt(0)==="x"?function(wr){return u(Kn+vr._offset+vr.l2p(dn(wr))+si,qn+ei)}:function(wr){return u(qn+ei,Kn+vr._offset+vr.l2p(dn(wr))+si)}};function dn(vr){return vr.periodX!==void 0?vr.periodX:vr.x}function on(vr){var er=vr.ticklabelposition||"",si=vr.tickson||"",ei=function(Xn){return er.indexOf(Xn)!==-1},Kn=ei("top"),qn=ei("left"),pi=ei("right"),_i=ei("bottom"),fi=ei("inside"),Ri=si!=="boundaries"&&(_i||qn||Kn||pi);if(!Ri&&!fi)return[0,0];var $i=vr.side,Hi=Ri?(vr.tickwidth||0)/2:0,wr=be,gn=vr.tickfont?vr.tickfont.size:12;return(_i||Kn)&&(Hi+=gn*ke,wr+=(vr.linewidth||0)/2),(qn||pi)&&(Hi+=(vr.linewidth||0)/2,wr+=be),fi&&$i==="top"&&(wr-=gn*(1-ke)),(qn||Kn)&&(Hi=-Hi),($i==="bottom"||$i==="right")&&(wr=-wr),[Ri?Hi:0,fi?wr:0]}_e.makeTickPath=function(vr,er,si,ei){ei||(ei={});var Kn=ei.minor;if(Kn&&!vr.minor)return"";var qn=ei.len!==void 0?ei.len:Kn?vr.minor.ticklen:vr.ticklen,pi=vr._id.charAt(0),_i=(vr.linewidth||1)/2;return pi==="x"?"M0,"+(er+_i*si)+"v"+qn*si:"M"+(er+_i*si)+",0h"+qn*si},_e.makeLabelFns=function(vr,er,si){var ei=vr.ticklabelposition||"",Kn=vr.tickson||"",qn=function(yl){return ei.indexOf(yl)!==-1},pi=qn("top"),_i=qn("left"),fi=qn("right"),Ri=qn("bottom"),$i=Kn!=="boundaries"&&(Ri||_i||pi||fi),Hi=qn("inside"),wr=ei==="inside"&&vr.ticks==="inside"||!Hi&&vr.ticks==="outside"&&Kn!=="boundaries",gn=0,Xn=0,Yi=wr?vr.ticklen:0;if(Hi?Yi*=-1:$i&&(Yi=0),wr&&(gn+=Yi,si)){var ha=l.deg2rad(si);gn=Yi*Math.cos(ha)+1,Xn=Yi*Math.sin(ha)}vr.showticklabels&&(wr||vr.showline)&&(gn+=.2*vr.tickfont.size),gn+=(vr.linewidth||1)/2*(Hi?-1:1);var Ca={labelStandoff:gn,labelShift:Xn},Ba,ji,Ea,cs,No=0,Vs=vr.side,pl=vr._id.charAt(0),kl=vr.tickangle,El;if(pl==="x")El=!Hi&&Vs==="bottom"||Hi&&Vs==="top",cs=El?1:-1,Hi&&(cs*=-1),Ba=Xn*cs,ji=er+gn*cs,Ea=El?1:-.2,Math.abs(kl)===90&&(Hi?Ea+=Oe:kl===-90&&Vs==="bottom"?Ea=ke:kl===90&&Vs==="top"?Ea=Oe:Ea=.5,No=Oe/2*(kl/90)),Ca.xFn=function(yl){return yl.dx+Ba+No*yl.fontSize},Ca.yFn=function(yl){return yl.dy+ji+yl.fontSize*Ea},Ca.anchorFn=function(yl,ql){if($i){if(_i)return"end";if(fi)return"start"}return!R(ql)||ql===0||ql===180?"middle":ql*cs<0!==Hi?"end":"start"},Ca.heightFn=function(yl,ql,rc){return ql<-60||ql>60?-.5*rc:vr.side==="top"!==Hi?-rc:0};else if(pl==="y"){if(El=!Hi&&Vs==="left"||Hi&&Vs==="right",cs=El?1:-1,Hi&&(cs*=-1),Ba=gn,ji=Xn*cs,Ea=0,!Hi&&Math.abs(kl)===90&&(kl===-90&&Vs==="left"||kl===90&&Vs==="right"?Ea=ke:Ea=.5),Hi){var iu=R(kl)?+kl:0;if(iu!==0){var bu=l.deg2rad(iu);No=Math.abs(Math.sin(bu))*ke*cs,Ea=0}}Ca.xFn=function(yl){return yl.dx+er-(Ba+yl.fontSize*Ea)*cs+No*yl.fontSize},Ca.yFn=function(yl){return yl.dy+ji+yl.fontSize*Oe},Ca.anchorFn=function(yl,ql){return R(ql)&&Math.abs(ql)===90?"middle":El?"end":"start"},Ca.heightFn=function(yl,ql,rc){return vr.side==="right"&&(ql*=-1),ql<-30?-rc:ql<30?-.5*rc:0}}return Ca};function Nn(vr){return[vr.text,vr.x,vr.axInfo,vr.font,vr.fontSize,vr.fontColor].join("_")}_e.drawTicks=function(vr,er,si){si=si||{};var ei=er._id+"tick",Kn=[].concat(er.minor&&er.minor.ticks?si.vals.filter(function(pi){return pi.minor&&!pi.noTick}):[]).concat(er.ticks?si.vals.filter(function(pi){return!pi.minor&&!pi.noTick}):[]),qn=si.layer.selectAll("path."+ei).data(Kn,Nn);qn.exit().remove(),qn.enter().append("path").classed(ei,1).classed("ticks",1).classed("crisp",si.crisp!==!1).each(function(pi){return f.stroke(w.select(this),pi.minor?er.minor.tickcolor:er.tickcolor)}).style("stroke-width",function(pi){return v.crispRound(vr,pi.minor?er.minor.tickwidth:er.tickwidth,1)+"px"}).attr("d",si.path).style("display",null),Na(er,[ee]),qn.attr("transform",si.transFn)},_e.drawGrid=function(vr,er,si){if(si=si||{},er.tickmode!=="sync"){var ei=er._id+"grid",Kn=er.minor&&er.minor.showgrid,qn=Kn?si.vals.filter(function(Ca){return Ca.minor}):[],pi=er.showgrid?si.vals.filter(function(Ca){return!Ca.minor}):[],_i=si.counterAxis;if(_i&&_e.shouldShowZeroLine(vr,er,_i))for(var fi=er.tickmode==="array",Ri=0;Ri<pi.length;Ri++){var $i=pi[Ri].x;if(fi?!$i:Math.abs($i)<er.dtick/100)if(pi=pi.slice(0,Ri).concat(pi.slice(Ri+1)),fi)Ri--;else break}er._gw=v.crispRound(vr,er.gridwidth,1);for(var Hi=Kn?v.crispRound(vr,er.minor.gridwidth,1):0,wr=si.layer,gn=si.minorLayer,Xn=1;Xn>=0;Xn--){var Yi=Xn?wr:gn;if(Yi){var ha=Yi.selectAll("path."+ei).data(Xn?pi:qn,Nn);ha.exit().remove(),ha.enter().append("path").classed(ei,1).classed("crisp",si.crisp!==!1),ha.attr("transform",si.transFn).attr("d",si.path).each(function(Ca){return f.stroke(w.select(this),Ca.minor?er.minor.gridcolor:er.gridcolor||"#ddd")}).style("stroke-dasharray",function(Ca){return v.dashStyle(Ca.minor?er.minor.griddash:er.griddash,Ca.minor?er.minor.gridwidth:er.gridwidth)}).style("stroke-width",function(Ca){return(Ca.minor?Hi:er._gw)+"px"}).style("display",null),typeof si.path=="function"&&ha.attr("d",si.path)}}Na(er,[J,G])}},_e.drawZeroLine=function(vr,er,si){si=si||si;var ei=er._id+"zl",Kn=_e.shouldShowZeroLine(vr,er,si.counterAxis),qn=si.layer.selectAll("path."+ei).data(Kn?[{x:0,id:er._id}]:[]);qn.exit().remove(),qn.enter().append("path").classed(ei,1).classed("zl",1).classed("crisp",si.crisp!==!1).each(function(){si.layer.selectAll("path").sort(function(pi,_i){return xe(pi.id,_i.id)})}),qn.attr("transform",si.transFn).attr("d",si.path).call(f.stroke,er.zerolinecolor||f.defaultLine).style("stroke-width",v.crispRound(vr,er.zerolinewidth,er._gw||1)+"px").style("display",null),Na(er,[Q])},_e.drawLabels=function(vr,er,si){si=si||{};var ei=vr._fullLayout,Kn=er._id,qn=er.zerolinelayer==="above traces",pi=si.cls||Kn+"tick",_i=si.vals.filter(function(Ql){return Ql.text}),fi=si.labelFns,Ri=si.secondary?0:er.tickangle,$i=(er._prevTickAngles||{})[pi],Hi=si.layer.selectAll("g."+pi).data(er.showticklabels?_i:[],Nn),wr=[];Hi.enter().append("g").classed(pi,1).append("text").attr("text-anchor","middle").each(function(Ql){var lu=w.select(this),dc=vr._promises.length;lu.call(c.positionText,fi.xFn(Ql),fi.yFn(Ql)).call(v.font,{family:Ql.font,size:Ql.fontSize,color:Ql.fontColor,weight:Ql.fontWeight,style:Ql.fontStyle,variant:Ql.fontVariant,textcase:Ql.fontTextcase,lineposition:Ql.fontLineposition,shadow:Ql.fontShadow}).text(Ql.text).call(c.convertToTspans,vr),vr._promises[dc]?wr.push(vr._promises.pop().then(function(){gn(lu,Ri)})):gn(lu,Ri)}),Na(er,[re]),Hi.exit().remove(),si.repositionOnUpdate&&Hi.each(function(Ql){w.select(this).select("text").call(c.positionText,fi.xFn(Ql),fi.yFn(Ql))});function gn(Ql,lu){Ql.each(function(dc){var wc=w.select(this),mc=wc.select(".text-math-group"),xu=fi.anchorFn(dc,lu),qu=si.transFn.call(wc.node(),dc)+(R(lu)&&+lu!=0?" rotate("+lu+","+fi.xFn(dc)+","+(fi.yFn(dc)-dc.fontSize/2)+")":""),xf=c.lineCount(wc),ed=Le*dc.fontSize,Df=fi.heightFn(dc,R(lu)?+lu:0,(xf-1)*ed);if(Df&&(qu+=u(0,Df)),mc.empty()){var Sc=wc.select("text");Sc.attr({transform:qu,"text-anchor":xu}),Sc.style("display",null),er._adjustTickLabelsOverflow&&er._adjustTickLabelsOverflow()}else{var Qo=v.bBox(mc.node()).width,Sl=Qo*{end:-.5,start:.5}[xu];mc.attr("transform",qu+u(Sl,0))}})}er._adjustTickLabelsOverflow=function(){var Ql=er.ticklabeloverflow;if(!(!Ql||Ql==="allow")){var lu=Ql.indexOf("hide")!==-1,dc=er._id.charAt(0)==="x",wc=0,mc=dc?vr._fullLayout.width:vr._fullLayout.height;if(Ql.indexOf("domain")!==-1){var xu=l.simpleMap(er.range,er.r2l);wc=er.l2p(xu[0])+er._offset,mc=er.l2p(xu[1])+er._offset}var qu=Math.min(wc,mc),xf=Math.max(wc,mc),ed=er.side,Df=1/0,Sc=-1/0;Hi.each(function($f){var wu=w.select(this),Ad=wu.select(".text-math-group");if(Ad.empty()){var Bc=v.bBox(wu.node()),uf=0;dc?(Bc.right>xf||Bc.left<qu)&&(uf=1):(Bc.bottom>xf||Bc.top+(er.tickangle?0:$f.fontSize/4)<qu)&&(uf=1);var Cd=wu.select("text");uf?lu&&Cd.style("display","none"):Cd.node().style.display!=="none"&&(Cd.style("display",null),ed==="bottom"||ed==="right"?Df=Math.min(Df,dc?Bc.top:Bc.left):Df=-1/0,ed==="top"||ed==="left"?Sc=Math.max(Sc,dc?Bc.bottom:Bc.right):Sc=1/0)}});for(var Qo in ei._plots){var Sl=ei._plots[Qo];if(!(er._id!==Sl.xaxis._id&&er._id!==Sl.yaxis._id)){var gd=dc?Sl.yaxis:Sl.xaxis;gd&&(gd["_visibleLabelMin_"+er._id]=Df,gd["_visibleLabelMax_"+er._id]=Sc)}}}},er._hideCounterAxisInsideTickLabels=function(Ql){var lu=er._id.charAt(0)==="x",dc=[];for(var wc in ei._plots){var mc=ei._plots[wc];er._id!==mc.xaxis._id&&er._id!==mc.yaxis._id||dc.push(lu?mc.yaxis:mc.xaxis)}dc.forEach(function(xu,qu){xu&&Ta(xu)&&(Ql||[Q,G,J,ee,re]).forEach(function(xf){var ed=xf.K==="tick"&&xf.L==="text"&&er.ticklabelmode==="period",Df=ei._plots[er._mainSubplot],Sc;if(xf.K===Q.K){var Qo=qn?Df.zerolinelayerAbove:Df.zerolinelayer;Sc=Qo.selectAll("."+er._id+"zl")}else xf.K===G.K?Sc=Df.minorGridlayer.selectAll("."+er._id):xf.K===J.K?Sc=Df.gridlayer.selectAll("."+er._id):Sc=Df[er._id.charAt(0)+"axislayer"];Sc.each(function(){var Sl=w.select(this);xf.L&&(Sl=Sl.selectAll(xf.L)),Sl.each(function(gd){var $f=er.l2p(ed?dn(gd):gd.x)+er._offset,wu=w.select(this);$f<er["_visibleLabelMax_"+xu._id]&&$f>er["_visibleLabelMin_"+xu._id]?wu.style("display","none"):xf.K==="tick"&&!qu&&wu.node().style.display!=="none"&&wu.style("display",null)})})})})},gn(Hi,$i+1?$i:Ri);function Xn(){return wr.length&&Promise.all(wr)}var Yi=null;function ha(){if(gn(Hi,Ri),_i.length&&er.autotickangles&&(er.type!=="log"||String(er.dtick).charAt(0)!=="D")){Yi=er.autotickangles[0];var Ql=0,lu=[],dc,wc=1;Hi.each(function(Lf){Ql=Math.max(Ql,Lf.fontSize);var op=er.l2p(Lf.x),zd=no(this),Qp=v.bBox(zd.node());wc=Math.max(wc,c.lineCount(zd)),lu.push({top:0,bottom:10,height:10,left:op-Qp.width/2,right:op+Qp.width/2+2,width:Qp.width+2})});var mc=(er.tickson==="boundaries"||er.showdividers)&&!si.secondary,xu=_i.length,qu=Math.abs((_i[xu-1].x-_i[0].x)*er._m)/(xu-1),xf=mc?qu/2:qu,ed=mc?er.ticklen:Ql*1.25*wc,Df=Math.sqrt(Math.pow(xf,2)+Math.pow(ed,2)),Sc=xf/Df,Qo=er.autotickangles.map(function(Lf){return Lf*Math.PI/180}),Sl=Qo.find(function(Lf){return Math.abs(Math.cos(Lf))<=Sc});Sl===void 0&&(Sl=Qo.reduce(function(Lf,op){return Math.abs(Math.cos(Lf))<Math.abs(Math.cos(op))?Lf:op},Qo[0]));var gd=Sl*(180/Math.PI);if(mc){var $f=2;for(er.ticks&&($f+=er.tickwidth/2),dc=0;dc<lu.length;dc++){var wu=_i[dc].xbnd,Ad=lu[dc];if(wu[0]!==null&&Ad.left-er.l2p(wu[0])<$f||wu[1]!==null&&er.l2p(wu[1])-Ad.right<$f){Yi=gd;break}}}else{var Bc=er.ticklabelposition||"",uf=er.tickson||"",Cd=function(Lf){return Bc.indexOf(Lf)!==-1},Tl=Cd("top"),Xu=Cd("left"),pu=Cd("right"),Zc=Cd("bottom"),Md=uf!=="boundaries"&&(Zc||Xu||Tl||pu),uu=Md?(er.tickwidth||0)+2*be:0;for(dc=0;dc<lu.length-1;dc++)if(l.bBoxIntersect(lu[dc],lu[dc+1],uu)){Yi=gd;break}}Yi&&gn(Hi,Yi)}}er._selections&&(er._selections[pi]=Hi);var Ca=[Xn];er.automargin&&ei._redrawFromAutoMarginCount&&$i===90?(Yi=$i,Ca.push(function(){gn(Hi,$i)})):Ca.push(ha),er._tickAngles&&Ca.push(function(){er._tickAngles[pi]=Yi===null?R(Ri)?Ri:0:Yi});var Ba=function(){var Ql=0,lu=0;return Hi.each(function(dc,wc){var mc=no(this),xu=mc.select(".text-math-group");if(xu.empty()){var qu;er._vals[wc]&&(qu=er._vals[wc].bb||v.bBox(mc.node()),er._vals[wc].bb=qu),Ql=Math.max(Ql,qu.width),lu=Math.max(lu,qu.height)}}),{labelsMaxW:Ql,labelsMaxH:lu}},ji=er._anchorAxis;if(ji&&(ji.autorange||ji.insiderange)&&Ta(er)&&!se(ei,er._id)&&(ei._insideTickLabelsUpdaterange||(ei._insideTickLabelsUpdaterange={}),ji.autorange&&(ei._insideTickLabelsUpdaterange[ji._name+".autorange"]=ji.autorange,Ca.push(Ba)),ji.insiderange)){var Ea=Ba(),cs=er._id.charAt(0)==="y"?Ea.labelsMaxW:Ea.labelsMaxH;cs+=2*be,er.ticklabelposition==="inside"&&(cs+=er.ticklen||0);var No=er.side==="right"||er.side==="top"?1:-1,Vs=No===1?1:0,pl=No===1?0:1,kl=[];kl[pl]=ji.range[pl];var El=ji.range,iu=ji.r2p(El[Vs]),bu=ji.r2p(El[pl]),yl=ei._insideTickLabelsUpdaterange[ji._name+".range"];if(yl){var ql=ji.r2p(yl[Vs]),rc=ji.r2p(yl[pl]),zc=No*(er._id.charAt(0)==="y"?1:-1);zc*iu<zc*ql&&(iu=ql,kl[Vs]=El[Vs]=yl[Vs]),zc*bu>zc*rc&&(bu=rc,kl[pl]=El[pl]=yl[pl])}var Pf=Math.abs(bu-iu);Pf-cs>0?(Pf-=cs,cs*=1+cs/Pf):cs=0,er._id.charAt(0)!=="y"&&(cs=-cs),kl[Vs]=ji.p2r(ji.r2p(El[Vs])+No*cs),ji.autorange==="min"||ji.autorange==="max reversed"?(kl[0]=null,ji._rangeInitial0=void 0,ji._rangeInitial1=void 0):(ji.autorange==="max"||ji.autorange==="min reversed")&&(kl[1]=null,ji._rangeInitial0=void 0,ji._rangeInitial1=void 0),ei._insideTickLabelsUpdaterange[ji._name+".range"]=kl}var ju=l.syncOrAsync(Ca);return ju&&ju.then&&vr._promises.push(ju),ju};function Wi(vr,er,si){var ei=er._id+"divider",Kn=si.vals,qn=si.layer.selectAll("path."+ei).data(Kn,Nn);qn.exit().remove(),qn.enter().insert("path",":first-child").classed(ei,1).classed("crisp",1).call(f.stroke,er.dividercolor).style("stroke-width",v.crispRound(vr,er.dividerwidth,1)+"px"),qn.attr("transform",si.transFn).attr("d",si.path)}_e.getPxPosition=function(vr,er){var si=vr._fullLayout._size,ei=er._id.charAt(0),Kn=er.side,qn;if(er.anchor!=="free"?qn=er._anchorAxis:ei==="x"?qn={_offset:si.t+(1-(er.position||0))*si.h,_length:0}:ei==="y"&&(qn={_offset:si.l+(er.position||0)*si.w+er._shift,_length:0}),Kn==="top"||Kn==="left")return qn._offset;if(Kn==="bottom"||Kn==="right")return qn._offset+qn._length};function Oa(vr){var er=vr.title.font.size,si=(vr.title.text.match(c.BR_TAG_ALL)||[]).length;return vr.title.hasOwnProperty("standoff")?er*(ke+si*Le):si?er*(si+1)*Le:er}function Da(vr,er){var si=vr._fullLayout,ei=er._id,Kn=ei.charAt(0),qn=er.title.font.size,pi,_i=(er.title.text.match(c.BR_TAG_ALL)||[]).length;if(er.title.hasOwnProperty("standoff"))er.side==="bottom"||er.side==="right"?pi=er._depth+er.title.standoff+qn*ke:(er.side==="top"||er.side==="left")&&(pi=er._depth+er.title.standoff+qn*(Oe+_i*Le));else{var fi=Ta(er);if(er.type==="multicategory")pi=er._depth;else{var Ri=1.5*qn;fi&&(Ri=.5*qn,er.ticks==="outside"&&(Ri+=er.ticklen)),pi=10+Ri+(er.linewidth?er.linewidth-1:0)}fi||(Kn==="x"?pi+=er.side==="top"?qn*(er.showticklabels?1:0):qn*(er.showticklabels?1.5:.5):pi+=er.side==="right"?qn*(er.showticklabels?1:.5):qn*(er.showticklabels?.5:0))}var $i=_e.getPxPosition(vr,er),Hi,wr,gn;Kn==="x"?(wr=er._offset+er._length/2,gn=er.side==="top"?$i-pi:$i+pi):(gn=er._offset+er._length/2,wr=er.side==="right"?$i+pi:$i-pi,Hi={rotate:"-90",offset:0});var Xn;if(er.type!=="multicategory"){var Yi=er._selections[er._id+"tick"];if(Xn={selection:Yi,side:er.side},Yi&&Yi.node()&&Yi.node().parentNode){var ha=v.getTranslate(Yi.node().parentNode);Xn.offsetLeft=ha.x,Xn.offsetTop=ha.y}er.title.hasOwnProperty("standoff")&&(Xn.pad=0)}return er._titleStandoff=pi,p.draw(vr,ei+"title",{propContainer:er,propName:er._name+".title.text",placeholder:si._dfltTitle[Kn],avoid:Xn,transform:Hi,attributes:{x:wr,y:gn,"text-anchor":"middle"}})}_e.shouldShowZeroLine=function(vr,er,si){var ei=l.simpleMap(er.range,er.r2l);return ei[0]*ei[1]<=0&&er.zeroline&&(er.type==="linear"||er.type==="-")&&!(er.rangebreaks&&er.maskBreaks(0)===K)&&(Aa(er,0)||!Ka(vr,er,si,ei)||Sa(vr,er))},_e.clipEnds=function(vr,er){return er.filter(function(si){return Aa(vr,si.x)})};function Aa(vr,er){var si=vr.l2p(er);return si>1&&si<vr._length-1}function Ka(vr,er,si,ei){var Kn=si._mainAxis;if(!Kn)return;var qn=vr._fullLayout,pi=er._id.charAt(0),_i=_e.counterLetter(er._id),fi=er._offset+(Math.abs(ei[0])<Math.abs(ei[1])==(pi==="x")?0:er._length);function Ri(Xn){if(!Xn.showline||!Xn.linewidth)return!1;var Yi=Math.max((Xn.linewidth+er.zerolinewidth)/2,1);function ha(ji){return typeof ji=="number"&&Math.abs(ji-fi)<Yi}if(ha(Xn._mainLinePosition)||ha(Xn._mainMirrorPosition))return!0;var Ca=Xn._linepositions||{};for(var Ba in Ca)if(ha(Ca[Ba][0])||ha(Ca[Ba][1]))return!0}var $i=qn._plots[si._mainSubplot];if(!($i.mainplotinfo||$i).overlays.length)return Ri(si);for(var Hi=_e.list(vr,_i),wr=0;wr<Hi.length;wr++){var gn=Hi[wr];if(gn._mainAxis===Kn&&Ri(gn))return!0}}function Sa(vr,er){for(var si=vr._fullData,ei=er._mainSubplot,Kn=er._id.charAt(0),qn=0;qn<si.length;qn++){var pi=si[qn];if(pi.visible===!0&&pi.xaxis+pi.yaxis===ei&&(z.traceIs(pi,"bar-like")&&pi.orientation==={x:"h",y:"v"}[Kn]||pi.fill&&pi.fill.charAt(pi.fill.length-1)===Kn))return!0}return!1}function no(vr){var er=w.select(vr),si=er.select(".text-math-group");return si.empty()?er.select("text"):si}_e.allowAutoMargin=function(vr){for(var er=_e.list(vr,"",!0),si=0;si<er.length;si++){var ei=er[si];ei.automargin&&(O.allowAutoMargin(vr,Fo(ei)),ei.mirror&&O.allowAutoMargin(vr,an(ei))),z.getComponentMethod("rangeslider","isVisible")(ei)&&O.allowAutoMargin(vr,Hr(ei))}};function Fo(vr){return vr._id+".automargin"}function an(vr){return Fo(vr)+".mirror"}function Hr(vr){return vr._id+".rangeslider"}_e.swap=function(vr,er){for(var si=nn(vr,er),ei=0;ei<si.length;ei++)$n(vr,si[ei].x,si[ei].y)};function nn(vr,er){var si=[],ei,Kn;for(ei=0;ei<er.length;ei++){var qn=[],pi=vr._fullData[er[ei]].xaxis,_i=vr._fullData[er[ei]].yaxis;if(!(!pi||!_i)){for(Kn=0;Kn<si.length;Kn++)(si[Kn].x.indexOf(pi)!==-1||si[Kn].y.indexOf(_i)!==-1)&&qn.push(Kn);if(!qn.length){si.push({x:[pi],y:[_i]});continue}var fi=si[qn[0]],Ri;if(qn.length>1)for(Kn=1;Kn<qn.length;Kn++)Ri=si[qn[Kn]],Kr(fi.x,Ri.x),Kr(fi.y,Ri.y);Kr(fi.x,[pi]),Kr(fi.y,[_i])}}return si}function Kr(vr,er){for(var si=0;si<er.length;si++)vr.indexOf(er[si])===-1&&vr.push(er[si])}function $n(vr,er,si){var ei=[],Kn=[],qn=vr.layout,pi,_i;for(pi=0;pi<er.length;pi++)ei.push(_e.getFromId(vr,er[pi]));for(pi=0;pi<si.length;pi++)Kn.push(_e.getFromId(vr,si[pi]));var fi=Object.keys(h),Ri=["anchor","domain","overlaying","position","side","tickangle","editType"],$i=["linear","log"];for(pi=0;pi<fi.length;pi++){var Hi=fi[pi],wr=ei[0][Hi],gn=Kn[0][Hi],Xn=!0,Yi=!1,ha=!1;if(!(Hi.charAt(0)==="_"||typeof wr=="function"||Ri.indexOf(Hi)!==-1)){for(_i=1;_i<ei.length&&Xn;_i++){var Ca=ei[_i][Hi];Hi==="type"&&$i.indexOf(wr)!==-1&&$i.indexOf(Ca)!==-1&&wr!==Ca?Yi=!0:Ca!==wr&&(Xn=!1)}for(_i=1;_i<Kn.length&&Xn;_i++){var Ba=Kn[_i][Hi];Hi==="type"&&$i.indexOf(gn)!==-1&&$i.indexOf(Ba)!==-1&&gn!==Ba?ha=!0:Kn[_i][Hi]!==gn&&(Xn=!1)}Xn&&(Yi&&(qn[ei[0]._name].type="linear"),ha&&(qn[Kn[0]._name].type="linear"),Ai(qn,Hi,ei,Kn,vr._fullLayout._dfltTitle))}}for(pi=0;pi<vr._fullLayout.annotations.length;pi++){var ji=vr._fullLayout.annotations[pi];er.indexOf(ji.xref)!==-1&&si.indexOf(ji.yref)!==-1&&l.swapAttrs(qn.annotations[pi],["?"])}}function Ai(vr,er,si,ei,Kn){var qn=l.nestedProperty,pi=qn(vr[si[0]._name],er).get(),_i=qn(vr[ei[0]._name],er).get(),fi;for(er==="title"&&(pi&&pi.text===Kn.x&&(pi.text=Kn.y),_i&&_i.text===Kn.y&&(_i.text=Kn.x)),fi=0;fi<si.length;fi++)qn(vr,si[fi]._name+"."+er).set(_i);for(fi=0;fi<ei.length;fi++)qn(vr,ei[fi]._name+"."+er).set(pi)}function aa(vr){return vr._id==="angularaxis"}function Ci(vr,er){for(var si=er._rangebreaks.length,ei=0;ei<si;ei++){var Kn=er._rangebreaks[ei];if(vr>=Kn.min&&vr<Kn.max)return Kn.max}return vr}function Ta(vr){return(vr.ticklabelposition||"").indexOf("inside")!==-1}function Na(vr,er){Ta(vr._anchorAxis||{})&&vr._hideCounterAxisInsideTickLabels&&vr._hideCounterAxisInsideTickLabels(er)}function ro(vr,er,si,ei){var Kn=vr.anchor!=="free"&&(vr.overlaying===void 0||vr.overlaying===!1)?vr._id:vr.overlaying,qn;ei?qn=vr.side==="right"?er:-er:qn=er,Kn in si||(si[Kn]={}),vr.side in si[Kn]||(si[Kn][vr.side]=0),si[Kn][vr.side]+=qn}function oo(vr,er){return vr.autoshift?er[vr.overlaying][vr.side]:vr.shift||0}function xo(vr,er){return/%f/.test(er)?vr>=$:/%L/.test(er)?vr>=W:/%[SX]/.test(er)?vr>=M:/%M/.test(er)?vr>=S:/%[HI]/.test(er)?vr>=y:/%p/.test(er)?vr>=T:/%[Aadejuwx]/.test(er)?vr>=P:/%[UVW]/.test(er)?vr>=k:/%[Bbm]/.test(er)?vr>=F:/%[q]/.test(er)?vr>=C:/%[Yy]/.test(er)?vr>=E:!0}}}),ov=U({"src/plots/cartesian/autorange_options_defaults.js"(pe,le){le.exports=function(R,O,z){var l,u;if(z){var c=O==="reversed"||O==="min reversed"||O==="max reversed";l=z[c?1:0],u=z[c?0:1]}var p=R("autorangeoptions.minallowed",u===null?l:void 0),f=R("autorangeoptions.maxallowed",l===null?u:void 0);p===void 0&&R("autorangeoptions.clipmin"),f===void 0&&R("autorangeoptions.clipmax"),R("autorangeoptions.include")}}}),_E=U({"src/plots/cartesian/range_defaults.js"(pe,le){var w=ov();le.exports=function(O,z,l,u){var c=z._template||{},p=z.type||c.type||"-";l("minallowed"),l("maxallowed");var f=l("range");if(!f){var v;!u.noInsiderange&&p!=="log"&&(v=l("insiderange"),v&&(v[0]===null||v[1]===null)&&(z.insiderange=!1,v=void 0),v&&(f=l("range",v)))}var h=z.getAutorangeDflt(f,u),m=l("autorange",h),_;f&&(f[0]===null&&f[1]===null||(f[0]===null||f[1]===null)&&(m==="reversed"||m===!0)||f[0]!==null&&(m==="min"||m==="max reversed")||f[1]!==null&&(m==="max"||m==="min reversed"))&&(f=void 0,delete z.range,z.autorange=!0,_=!0),_||(h=z.getAutorangeDflt(f,u),m=l("autorange",h)),m&&(w(l,m,f),(p==="linear"||p==="-")&&l("rangemode")),z.cleanRange()}}}),Z5=U({"node_modules/mouse-event-offset/index.js"(pe,le){var w={left:0,top:0};le.exports=R;function R(z,l,u){l=l||z.currentTarget||z.srcElement,Array.isArray(u)||(u=[0,0]);var c=z.clientX||0,p=z.clientY||0,f=O(l);return u[0]=c-f.left,u[1]=p-f.top,u}function O(z){return z===window||z===document||z===document.body?w:z.getBoundingClientRect()}}}),gA=U({"node_modules/has-passive-events/index.js"(pe,le){var w=pd();function R(){var O=!1;try{var z=Object.defineProperty({},"passive",{get:function(){O=!0}});window.addEventListener("test",null,z),window.removeEventListener("test",null,z)}catch{O=!1}return O}le.exports=w&&R()}}),K5=U({"src/components/dragelement/align.js"(pe,le){le.exports=function(R,O,z,l,u){var c=(R-z)/(l-z),p=c+O/(l-z),f=(c+p)/2;return u==="left"||u==="bottom"?c:u==="center"||u==="middle"?f:u==="right"||u==="top"?p:c<2/3-f?c:p>4/3-f?p:f}}}),J5=U({"src/components/dragelement/cursor.js"(pe,le){var w=ii(),R=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];le.exports=function(z,l,u,c){return u==="left"?z=0:u==="center"?z=1:u==="right"?z=2:z=w.constrain(Math.floor(z*3),0,2),c==="bottom"?l=0:c==="middle"?l=1:c==="top"?l=2:l=w.constrain(Math.floor(l*3),0,2),R[l][z]}}}),wE=U({"src/components/dragelement/unhover.js"(pe,le){var w=ih(),R=el(),O=nl().getGraphDiv,z=_n(),l=le.exports={};l.wrapped=function(u,c,p){u=O(u),u._fullLayout&&R.clear(u._fullLayout._uid+z.HOVERID),l.raw(u,c,p)},l.raw=function(c,p){var f=c._fullLayout,v=c._hoverdata;p||(p={}),!(p.target&&!c._dragged&&w.triggerHandler(c,"plotly_beforehover",p)===!1)&&(f._hoverlayer.selectAll("g").remove(),f._hoverlayer.selectAll("line").remove(),f._hoverlayer.selectAll("circle").remove(),c._hoverdata=void 0,p.target&&v&&c.emit("plotly_unhover",{event:p,points:v}))}}}),Vp=U({"src/components/dragelement/index.js"(pe,le){var w=Z5(),R=Ip(),O=gA(),z=ii().removeElement,l=pf(),u=le.exports={};u.align=K5(),u.getCursor=J5();var c=wE();u.unhover=c.wrapped,u.unhoverRaw=c.raw,u.init=function(h){var m=h.gd,_=1,x=m._context.doubleClickDelay,A=h.element,E,D,g,C,I,N,F,k;m._mouseDownTime||(m._mouseDownTime=0),A.style.pointerEvents="all",A.onmousedown=y,O?(A._ontouchstart&&A.removeEventListener("touchstart",A._ontouchstart),A._ontouchstart=y,A.addEventListener("touchstart",y,{passive:!1})):A.ontouchstart=y;function P(W,$,Z){return Math.abs(W)<Z&&(W=0),Math.abs($)<Z&&($=0),[W,$]}var T=h.clampFn||P;function y(W){m._dragged=!1,m._dragging=!0;var $=f(W);E=$[0],D=$[1],F=W.target,N=W,k=W.buttons===2||W.ctrlKey,typeof W.clientX>"u"&&typeof W.clientY>"u"&&(W.clientX=E,W.clientY=D),g=new Date().getTime(),g-m._mouseDownTime<x?_+=1:(_=1,m._mouseDownTime=g),h.prepFn&&h.prepFn(W,E,D),R&&!k?(I=p(),I.style.cursor=window.getComputedStyle(A).cursor):R||(I=document,C=window.getComputedStyle(document.documentElement).cursor,document.documentElement.style.cursor=window.getComputedStyle(A).cursor),document.addEventListener("mouseup",M),document.addEventListener("touchend",M),h.dragmode!==!1&&(W.preventDefault(),document.addEventListener("mousemove",S),document.addEventListener("touchmove",S,{passive:!1}))}function S(W){W.preventDefault();var $=f(W),Z=h.minDrag||l.MINDRAG,K=T($[0]-E,$[1]-D,Z),Q=K[0],J=K[1];(Q||J)&&(m._dragged=!0,u.unhover(m,W)),m._dragged&&h.moveFn&&!k&&(m._dragdata={element:A,dx:Q,dy:J},h.moveFn(Q,J))}function M(W){if(delete m._dragdata,h.dragmode!==!1&&(W.preventDefault(),document.removeEventListener("mousemove",S),document.removeEventListener("touchmove",S)),document.removeEventListener("mouseup",M),document.removeEventListener("touchend",M),R?z(I):C&&(I.documentElement.style.cursor=C,C=null),!m._dragging){m._dragged=!1;return}if(m._dragging=!1,new Date().getTime()-m._mouseDownTime>x&&(_=Math.max(_-1,1)),m._dragged)h.doneFn&&h.doneFn();else{var $;N.target===F?$=N:($={target:F,srcElement:F,toElement:F},Object.keys(N).concat(Object.keys(N.__proto__)).forEach(Z=>{var K=N[Z];!$[Z]&&typeof K!="function"&&($[Z]=K)})),h.clickFn&&h.clickFn(_,$),k||F.dispatchEvent(new MouseEvent("click",W))}m._dragging=!1,m._dragged=!1}};function p(){var v=document.createElement("div");v.className="dragcover";var h=v.style;return h.position="fixed",h.left=0,h.right=0,h.top=0,h.bottom=0,h.zIndex=999999999,h.background="none",document.body.appendChild(v),v}u.coverSlip=p;function f(v){return w(v.changedTouches?v.changedTouches[0]:v,document.body)}}}),i_=U({"src/lib/setcursor.js"(pe,le){le.exports=function(R,O){(R.attr("class")||"").split(" ").forEach(function(z){z.indexOf("cursor-")===0&&R.classed(z,!1)}),O&&R.classed("cursor-"+O,!0)}}}),Db=U({"src/lib/override_cursor.js"(pe,le){var w=i_(),R="data-savedcursor",O="!!";le.exports=function(l,u){var c=l.attr(R);if(u){if(!c){for(var p=(l.attr("class")||"").split(" "),f=0;f<p.length;f++){var v=p[f];v.indexOf("cursor-")===0&&l.attr(R,v.substr(7)).classed(v,!1)}l.attr(R)||l.attr(R,O)}w(l,u)}else c&&(l.attr(R,null),c===O?w(l):w(l,c))}}}),Q5=U({"src/components/legend/attributes.js"(pe,le){var w=Ir(),R=jn();le.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:R.defaultLine,editType:"legend"},maxheight:{valType:"number",min:0,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:w({editType:"legend"}),grouptitlefont:w({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:w({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}}}),SE=U({"src/components/legend/helpers.js"(pe){pe.isGrouped=function(w){return(w.traceorder||"").indexOf("grouped")!==-1},pe.isVertical=function(w){return w.orientation!=="h"},pe.isReversed=function(w){return(w.traceorder||"").indexOf("reversed")!==-1}}}),Lb=U({"src/components/legend/defaults.js"(pe,le){var w=Mi(),R=ii(),O=Tc(),z=Jn(),l=Q5(),u=ts(),c=SE();function p(f,v,h,m){var _=v[f]||{},x=O.newContainer(h,f);function A(Le,oe){return R.coerce(_,x,l,Le,oe)}var E=R.coerceFont(A,"font",h.font);A("bgcolor",h.paper_bgcolor),A("bordercolor");var D=A("visible");if(D){for(var g,C=function(Le,oe){var be=g._input,_e=g;return R.coerce(be,_e,z,Le,oe)},I=h.font||{},N=R.coerceFont(A,"grouptitlefont",I,{overrideDflt:{size:Math.round(I.size*1.1)}}),F=0,k=!1,P="normal",T=(h.shapes||[]).filter(function(Le){return Le.showlegend}),y=m.concat(T).filter(function(Le){return f===(Le.legend||"legend")}),S=0;S<y.length;S++)if(g=y[S],!!g.visible){var M=g._isShape;(g.showlegend||g._dfltShowLegend&&!(g._module&&g._module.attributes&&g._module.attributes.showlegend&&g._module.attributes.showlegend.dflt===!1))&&(F++,g.showlegend&&(k=!0,(!M&&w.traceIs(g,"pie-like")||g._input.showlegend===!0)&&F++),R.coerceFont(C,"legendgrouptitle.font",N)),(!M&&w.traceIs(g,"bar")&&h.barmode==="stack"||["tonextx","tonexty"].indexOf(g.fill)!==-1)&&(P=c.isGrouped({traceorder:P})?"grouped+reversed":"reversed"),g.legendgroup!==void 0&&g.legendgroup!==""&&(P=c.isReversed({traceorder:P})?"reversed+grouped":"grouped")}var W=R.coerce(v,h,u,"showlegend",k&&F>(f==="legend"?1:0));if(W===!1&&(h[f]=void 0),!(W===!1&&!_.uirevision)&&(A("uirevision",h.uirevision),W!==!1)){A("borderwidth");var $=A("orientation"),Z=A("yref"),K=A("xref"),Q=$==="h",J=Z==="paper",G=K==="paper",ee,re,fe,we="left";Q?(ee=0,w.getComponentMethod("rangeslider","isVisible")(v.xaxis)?J?(re=1.1,fe="bottom"):(re=1,fe="top"):J?(re=-.1,fe="top"):(re=0,fe="bottom")):(re=1,fe="auto",G?ee=1.02:(ee=1,we="right")),R.coerce(_,x,{x:{valType:"number",editType:"legend",min:G?-2:0,max:G?3:1,dflt:ee}},"x"),R.coerce(_,x,{y:{valType:"number",editType:"legend",min:J?-2:0,max:J?3:1,dflt:re}},"y"),A("traceorder",P),c.isGrouped(h[f])&&A("tracegroupgap"),A("entrywidth"),A("entrywidthmode"),A("indentation"),A("itemsizing"),A("itemwidth"),A("itemclick"),A("itemdoubleclick"),A("groupclick"),A("xanchor",we),A("yanchor",fe),A("maxheight"),A("valign"),R.noneOrAll(_,x,["x","y"]);var Oe=A("title.text");if(Oe){A("title.side",Q?"left":"top");var ke=R.extendFlat({},E,{size:R.bigFont(E.size)});R.coerceFont(A,"title.font",ke)}}}}le.exports=function(v,h,m){var _,x=m.slice(),A=h.shapes;if(A)for(_=0;_<A.length;_++){var E=A[_];if(E.showlegend){var D={_input:E._input,visible:E.visible,showlegend:E.showlegend,legend:E.legend};x.push(D)}}var g=["legend"];for(_=0;_<x.length;_++)R.pushUnique(g,x[_].legend);for(h._legends=[],_=0;_<g.length;_++){var C=g[_];p(C,v,h,x),h[C]&&h[C].visible&&(h[C]._id=C),h._legends.push(C)}}}}),yA=U({"src/components/legend/handle_click.js"(pe,le){var w=Mi(),R=ii(),O=R.pushUnique,z=!0;le.exports=function(u,c,p){var f=c._fullLayout;if(c._dragged||c._editing)return;var v=f.legend.itemclick,h=f.legend.itemdoubleclick,m=f.legend.groupclick;p===1&&v==="toggle"&&h==="toggleothers"&&z&&c.data&&c._context.showTips&&R.notifier(R._(c,"Double-click on legend to isolate one trace"),"long"),z=!1;var _;if(p===1?_=v:p===2&&(_=h),!_)return;var x=m==="togglegroup",A=f.hiddenlabels?f.hiddenlabels.slice():[],E=u.data()[0][0];if(E.groupTitle&&E.noClick)return;var D=c._fullData,g=(f.shapes||[]).filter(function(st){return st.showlegend}),C=D.concat(g),I=E.trace;I._isShape&&(I=I._fullInput);var N=I.legendgroup,F,k,P,T,y,S,M={},W=[],$=[],Z=[];function K(st,rt){var Ue=W.indexOf(st),xt=M.visible;return xt||(xt=M.visible=[]),W.indexOf(st)===-1&&(W.push(st),Ue=W.length-1),xt[Ue]=rt,Ue}var Q=(f.shapes||[]).map(function(st){return st._input}),J=!1;function G(st,rt){Q[st].visible=rt,J=!0}function ee(st,rt){if(!(E.groupTitle&&!x)){var Ue=st._fullInput||st,xt=Ue._isShape,Gt=Ue.index;Gt===void 0&&(Gt=Ue._index);var Jt=Ue.visible===!1?!1:rt;xt?G(Gt,Jt):K(Gt,Jt)}}var re=I.legend,fe=I._fullInput,we=fe&&fe._isShape;if(!we&&w.traceIs(I,"pie-like")){var Oe=E.label,ke=A.indexOf(Oe);if(_==="toggle")ke===-1?A.push(Oe):A.splice(ke,1);else if(_==="toggleothers"){var Le=ke!==-1,oe=[];for(F=0;F<c.calcdata.length;F++){var be=c.calcdata[F];for(k=0;k<be.length;k++){var _e=be[k],he=_e.label;re===be[0].trace.legend&&Oe!==he&&(A.indexOf(he)===-1&&(Le=!0),O(A,he),oe.push(he))}}if(!Le)for(var De=0;De<oe.length;De++){var xe=A.indexOf(oe[De]);xe!==-1&&A.splice(xe,1)}}w.call("_guiRelayout",c,"hiddenlabels",A)}else{var se=N&&N.length,Ee=[],Te;if(se)for(F=0;F<C.length;F++)Te=C[F],Te.visible&&Te.legendgroup===N&&Ee.push(F);if(_==="toggle"){var Be;switch(I.visible){case!0:Be="legendonly";break;case!1:Be=!1;break;case"legendonly":Be=!0;break}if(se)if(x)for(F=0;F<C.length;F++){var tt=C[F];tt.visible!==!1&&tt.legendgroup===N&&ee(tt,Be)}else ee(I,Be);else ee(I,Be)}else if(_==="toggleothers"){var at,gt,pt,Rt,$t,Wt=!0;for(F=0;F<C.length;F++)if($t=C[F],at=$t===I,pt=$t.showlegend!==!0,!(at||pt)&&(gt=se&&$t.legendgroup===N,!gt&&$t.legend===re&&$t.visible===!0&&!w.traceIs($t,"notLegendIsolatable"))){Wt=!1;break}for(F=0;F<C.length;F++)if($t=C[F],!($t.visible===!1||$t.legend!==re)&&!w.traceIs($t,"notLegendIsolatable"))switch(I.visible){case"legendonly":ee($t,!0);break;case!0:Rt=Wt?!0:"legendonly",at=$t===I,pt=$t.showlegend!==!0&&!$t.legendgroup,gt=at||se&&$t.legendgroup===N,ee($t,gt||pt?!0:Rt);break}}for(F=0;F<$.length;F++)if(P=$[F],!!P){var Ht=P.constructUpdate(),Ft=Object.keys(Ht);for(k=0;k<Ft.length;k++)T=Ft[k],S=M[T]=M[T]||[],S[Z[F]]=Ht[T]}for(y=Object.keys(M),F=0;F<y.length;F++)for(T=y[F],k=0;k<W.length;k++)M[T].hasOwnProperty(k)||(M[T][k]=void 0);J?w.call("_guiUpdate",c,M,{shapes:Q},W):w.call("_guiRestyle",c,M,W)}}}}),TE=U({"src/components/legend/constants.js"(pe,le){le.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}}}),Qv=U({"src/components/legend/get_legend_data.js"(pe,le){var w=Mi(),R=SE();le.exports=function(z,l,u){var c=l._inHover,p=R.isGrouped(l),f=R.isReversed(l),v={},h=[],m=!1,_={},x=0,A=0,E,D;function g(ee,re,fe){if(l.visible!==!1&&!(u&&ee!==l._id))if(re===""||!R.isGrouped(l)){var we="~~i"+x;h.push(we),v[we]=[fe],x++}else h.indexOf(re)===-1?(h.push(re),m=!0,v[re]=[fe]):v[re].push(fe)}for(E=0;E<z.length;E++){var C=z[E],I=C[0],N=I.trace,F=N.legend,k=N.legendgroup;if(!(!c&&(!N.visible||!N.showlegend)))if(w.traceIs(N,"pie-like"))for(_[k]||(_[k]={}),D=0;D<C.length;D++){var P=C[D].label;_[k][P]||(g(F,k,{label:P,color:C[D].color,i:C[D].i,trace:N,pts:C[D].pts}),_[k][P]=!0,A=Math.max(A,(P||"").length))}else g(F,k,I),A=Math.max(A,(N.name||"").length)}if(!h.length)return[];var T=!m||!p,y=[];for(E=0;E<h.length;E++){var S=v[h[E]];T?y.push(S[0]):y.push(S)}for(T&&(y=[y]),E=0;E<y.length;E++){var M=1/0;for(D=0;D<y[E].length;D++){var W=y[E][D].trace.legendrank;M>W&&(M=W)}y[E][0]._groupMinRank=M,y[E][0]._preGroupSort=E}var $=function(ee,re){return ee[0]._groupMinRank-re[0]._groupMinRank||ee[0]._preGroupSort-re[0]._preGroupSort},Z=function(ee,re){return ee.trace.legendrank-re.trace.legendrank||ee._preSort-re._preSort};for(y.forEach(function(ee,re){ee[0]._preGroupSort=re}),y.sort($),E=0;E<y.length;E++){y[E].forEach(function(ee,re){ee._preSort=re}),y[E].sort(Z);var K=y[E][0].trace,Q=null;for(D=0;D<y[E].length;D++){var J=y[E][D].trace.legendgrouptitle;if(J&&J.text){Q=J,c&&(J.font=l._groupTitleFont);break}}if(f&&y[E].reverse(),Q){var G=!1;for(D=0;D<y[E].length;D++)if(w.traceIs(y[E][D].trace,"pie-like")){G=!0;break}y[E].unshift({i:-1,groupTitle:Q,noClick:G,trace:{showlegend:K.showlegend,legendgroup:K.legendgroup,visible:l.groupclick==="toggleitem"?!0:K.visible}})}for(D=0;D<y[E].length;D++)y[E][D]=[y[E][D]]}return l._lgroupsLength=y.length,l._maxNameLength=A,y}}}),dy=U({"src/traces/pie/helpers.js"(pe){var le=ii();function w(R){return R.indexOf("e")!==-1?R.replace(/[.]?0+e/,"e"):R.indexOf(".")!==-1?R.replace(/[.]?0+$/,""):R}pe.formatPiePercent=function(O,z){var l=w((O*100).toPrecision(3));return le.numSeparate(l,z)+"%"},pe.formatPieValue=function(O,z){var l=w(O.toPrecision(10));return le.numSeparate(l,z)},pe.getFirstFilled=function(O,z){if(le.isArrayOrTypedArray(O))for(var l=0;l<z.length;l++){var u=O[z[l]];if(u||u===0||u==="")return u}},pe.castOption=function(O,z){if(le.isArrayOrTypedArray(O))return pe.getFirstFilled(O,z);if(O)return O},pe.getRotationAngle=function(R){return(R==="auto"?0:R)*Math.PI/180}}}),uM=U({"src/traces/pie/fill_one.js"(pe,le){var w=ec(),R=Lr();le.exports=function(z,l,u,c){var p=u.marker.pattern;p&&p.shape?w.pointStyle(z,u,c,l):R.fill(z,l.color)}}}),aT=U({"src/traces/pie/style_one.js"(pe,le){var w=Lr(),R=dy().castOption,O=uM();le.exports=function(l,u,c,p){var f=c.marker.line,v=R(f.color,u.pts)||w.defaultLine,h=R(f.width,u.pts)||0;l.call(O,u,c,p).style("stroke-width",h).call(w.stroke,v)}}}),bA=U({"src/components/legend/style.js"(pe,le){var w=Ze(),R=Mi(),O=ii(),z=O.strTranslate,l=ec(),u=Lr(),c=Ug().extractOpts,p=Qd(),f=aT(),v=dy().castOption,h=TE(),m=12,_=5,x=2,A=10,E=5;le.exports=function(N,F,k){var P=F._fullLayout;k||(k=P.legend);var T=k.itemsizing==="constant",y=k.itemwidth,S=(y+h.itemGap*2)/2,M=z(S,0),W=function(oe,be,_e,he){var De;if(oe+1)De=oe;else if(be&&be.width>0)De=be.width;else return 0;return T?he:Math.min(De,_e)};N.each(function(oe){var be=w.select(this),_e=O.ensureSingle(be,"g","layers");_e.style("opacity",oe[0].trace.opacity);var he=k.indentation,De=k.valign,xe=oe[0].lineHeight,se=oe[0].height;if(De==="middle"&&he===0||!xe||!se)_e.attr("transform",null);else{var Ee={top:1,bottom:-1}[De],Te=Ee*(.5*(xe-se+3))||0,Be=k.indentation;_e.attr("transform",z(Be,Te))}var tt=_e.selectAll("g.legendfill").data([oe]);tt.enter().append("g").classed("legendfill",!0);var at=_e.selectAll("g.legendlines").data([oe]);at.enter().append("g").classed("legendlines",!0);var gt=_e.selectAll("g.legendsymbols").data([oe]);gt.enter().append("g").classed("legendsymbols",!0),gt.selectAll("g.legendpoints").data([oe]).enter().append("g").classed("legendpoints",!0)}).each(Le).each(K).each(J).each(Q).each(ee).each(Oe).each(we).each($).each(Z).each(re).each(fe);function $(oe){var be=g(oe),_e=be.showFill,he=be.showLine,De=be.showGradientLine,xe=be.showGradientFill,se=be.anyFill,Ee=be.anyLine,Te=oe[0],Be=Te.trace,tt,at,gt=c(Be),pt=gt.colorscale,Rt=gt.reversescale,$t=function(xt){if(xt.size())if(_e)l.fillGroupStyle(xt,F,!0);else{var Gt="legendfill-"+Be.uid;l.gradient(xt,F,Gt,D(Rt),pt,"fill")}},Wt=function(xt){if(xt.size()){var Gt="legendline-"+Be.uid;l.lineGroupStyle(xt),l.gradient(xt,F,Gt,D(Rt),pt,"stroke")}},Ht=p.hasMarkers(Be)||!se?"M5,0":Ee?"M5,-2":"M5,-3",Ft=w.select(this),st=Ft.select(".legendfill").selectAll("path").data(_e||xe?[oe]:[]);if(st.enter().append("path").classed("js-fill",!0),st.exit().remove(),st.attr("d",Ht+"h"+y+"v6h-"+y+"z").call($t),he||De){var rt=W(void 0,Be.line,A,_);at=O.minExtend(Be,{line:{width:rt}}),tt=[O.minExtend(Te,{trace:at})]}var Ue=Ft.select(".legendlines").selectAll("path").data(he||De?[tt]:[]);Ue.enter().append("path").classed("js-line",!0),Ue.exit().remove(),Ue.attr("d",Ht+(De?"l"+y+",0.0001":"h"+y)).call(he?l.lineGroupStyle:Wt)}function Z(oe){var be=g(oe),_e=be.anyFill,he=be.anyLine,De=be.showLine,xe=be.showMarker,se=oe[0],Ee=se.trace,Te=!xe&&!he&&!_e&&p.hasText(Ee),Be,tt;function at(st,rt,Ue,xt){var Gt=O.nestedProperty(Ee,st).get(),Jt=O.isArrayOrTypedArray(Gt)&&rt?rt(Gt):Gt;if(T&&Jt&&xt!==void 0&&(Jt=xt),Ue){if(Jt<Ue[0])return Ue[0];if(Jt>Ue[1])return Ue[1]}return Jt}function gt(st){return se._distinct&&se.index&&st[se.index]?st[se.index]:st[0]}if(xe||Te||De){var pt={},Rt={};if(xe){pt.mc=at("marker.color",gt),pt.mx=at("marker.symbol",gt),pt.mo=at("marker.opacity",O.mean,[.2,1]),pt.mlc=at("marker.line.color",gt),pt.mlw=at("marker.line.width",O.mean,[0,5],x),Rt.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var $t=at("marker.size",O.mean,[2,16],m);pt.ms=$t,Rt.marker.size=$t}De&&(Rt.line={width:at("line.width",gt,[0,10],_)}),Te&&(pt.tx="Aa",pt.tp=at("textposition",gt),pt.ts=10,pt.tc=at("textfont.color",gt),pt.tf=at("textfont.family",gt),pt.tw=at("textfont.weight",gt),pt.ty=at("textfont.style",gt),pt.tv=at("textfont.variant",gt),pt.tC=at("textfont.textcase",gt),pt.tE=at("textfont.lineposition",gt),pt.tS=at("textfont.shadow",gt)),Be=[O.minExtend(se,pt)],tt=O.minExtend(Ee,Rt),tt.selectedpoints=null,tt.texttemplate=null}var Wt=w.select(this).select("g.legendpoints"),Ht=Wt.selectAll("path.scatterpts").data(xe?Be:[]);Ht.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",M),Ht.exit().remove(),Ht.call(l.pointStyle,tt,F),xe&&(Be[0].mrc=3);var Ft=Wt.selectAll("g.pointtext").data(Te?Be:[]);Ft.enter().append("g").classed("pointtext",!0).append("text").attr("transform",M),Ft.exit().remove(),Ft.selectAll("text").call(l.textPointStyle,tt,F)}function K(oe){var be=oe[0].trace,_e=be.type==="waterfall";if(oe[0]._distinct&&_e){var he=oe[0].trace[oe[0].dir].marker;return oe[0].mc=he.color,oe[0].mlw=he.line.width,oe[0].mlc=he.line.color,G(oe,this,"waterfall")}var De=[];be.visible&&_e&&(De=oe[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 xe=w.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(De);xe.enter().append("path").classed("legendwaterfall",!0).attr("transform",M).style("stroke-miterlimit",1),xe.exit().remove(),xe.each(function(se){var Ee=w.select(this),Te=be[se[0]].marker,Be=W(void 0,Te.line,E,x);Ee.attr("d",se[1]).style("stroke-width",Be+"px").call(u.fill,Te.color),Be&&Ee.call(u.stroke,Te.line.color)})}function Q(oe){G(oe,this)}function J(oe){G(oe,this,"funnel")}function G(oe,be,_e){var he=oe[0].trace,De=he.marker||{},xe=De.line||{},se=De.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",Ee=_e?he.visible&&he.type===_e:R.traceIs(he,"bar"),Te=w.select(be).select("g.legendpoints").selectAll("path.legend"+_e).data(Ee?[oe]:[]);Te.enter().append("path").classed("legend"+_e,!0).attr("d",se).attr("transform",M),Te.exit().remove(),Te.each(function(Be){var tt=w.select(this),at=Be[0],gt=W(at.mlw,De.line,E,x);tt.style("stroke-width",gt+"px");var pt=at.mcc;if(!k._inHover&&"mc"in at){var Rt=c(De),$t=Rt.mid;$t===void 0&&($t=(Rt.max+Rt.min)/2),pt=l.tryColorscale(De,"")($t)}var Wt=pt||at.mc||De.color,Ht=De.pattern,Ft=l.getPatternAttr,st=Ht&&(Ft(Ht.shape,0,"")||Ft(Ht.path,0,""));if(st){var rt=Ft(Ht.bgcolor,0,null),Ue=Ft(Ht.fgcolor,0,null),xt=Ht.fgopacity,Gt=C(Ht.size,8,10),Jt=C(Ht.solidity,.5,1),Ut="legend-"+he.uid;tt.call(l.pattern,"legend",F,Ut,st,Gt,Jt,pt,Ht.fillmode,rt,Ue,xt)}else tt.call(u.fill,Wt);gt&&u.stroke(tt,at.mlc||xe.color)})}function ee(oe){var be=oe[0].trace,_e=w.select(this).select("g.legendpoints").selectAll("path.legendbox").data(be.visible&&R.traceIs(be,"box-violin")?[oe]:[]);_e.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",M),_e.exit().remove(),_e.each(function(){var he=w.select(this);if((be.boxpoints==="all"||be.points==="all")&&u.opacity(be.fillcolor)===0&&u.opacity((be.line||{}).color)===0){var De=O.minExtend(be,{marker:{size:T?m:O.constrain(be.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});_e.call(l.pointStyle,De,F)}else{var xe=W(void 0,be.line,E,x);he.style("stroke-width",xe+"px").call(u.fill,be.fillcolor),xe&&u.stroke(he,be.line.color)}})}function re(oe){var be=oe[0].trace,_e=w.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(be.visible&&be.type==="candlestick"?[oe,oe]:[]);_e.enter().append("path").classed("legendcandle",!0).attr("d",function(he,De){return De?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",M).style("stroke-miterlimit",1),_e.exit().remove(),_e.each(function(he,De){var xe=w.select(this),se=be[De?"increasing":"decreasing"],Ee=W(void 0,se.line,E,x);xe.style("stroke-width",Ee+"px").call(u.fill,se.fillcolor),Ee&&u.stroke(xe,se.line.color)})}function fe(oe){var be=oe[0].trace,_e=w.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(be.visible&&be.type==="ohlc"?[oe,oe]:[]);_e.enter().append("path").classed("legendohlc",!0).attr("d",function(he,De){return De?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",M).style("stroke-miterlimit",1),_e.exit().remove(),_e.each(function(he,De){var xe=w.select(this),se=be[De?"increasing":"decreasing"],Ee=W(void 0,se.line,E,x);xe.style("fill","none").call(l.dashLine,se.line.dash,Ee),Ee&&u.stroke(xe,se.line.color)})}function we(oe){ke(oe,this,"pie")}function Oe(oe){ke(oe,this,"funnelarea")}function ke(oe,be,_e){var he=oe[0],De=he.trace,xe=_e?De.visible&&De.type===_e:R.traceIs(De,_e),se=w.select(be).select("g.legendpoints").selectAll("path.legend"+_e).data(xe?[oe]:[]);if(se.enter().append("path").classed("legend"+_e,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",M),se.exit().remove(),se.size()){var Ee=De.marker||{},Te=W(v(Ee.line.width,he.pts),Ee.line,E,x),Be="pieLike",tt=O.minExtend(De,{marker:{line:{width:Te}}},Be),at=O.minExtend(he,{trace:tt},Be);f(se,at,tt,F)}}function Le(oe){var be=oe[0].trace,_e,he=[];if(be.visible)switch(be.type){case"histogram2d":case"heatmap":he=[["M-15,-2V4H15V-2Z"]],_e=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":he=[["M-6,-6V6H6V-6Z"]],_e=!0;break;case"densitymapbox":case"densitymap":he=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],_e="radial";break;case"cone":he=[["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"]],_e=!1;break;case"streamtube":he=[["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"]],_e=!1;break;case"surface":he=[["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"]],_e=!0;break;case"mesh3d":he=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],_e=!1;break;case"volume":he=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],_e=!0;break;case"isosurface":he=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],_e=!1;break}var De=w.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(he);De.enter().append("path").classed("legend3dandfriends",!0).attr("transform",M).style("stroke-miterlimit",1),De.exit().remove(),De.each(function(xe,se){var Ee=w.select(this),Te=c(be),Be=Te.colorscale,tt=Te.reversescale,at=function($t){if($t.size()){var Wt="legendfill-"+be.uid;l.gradient($t,F,Wt,D(tt,_e==="radial"),Be,"fill")}},gt;if(Be){if(!_e){var Rt=Be.length;gt=se===0?Be[tt?Rt-1:0][1]:se===1?Be[tt?0:Rt-1][1]:Be[Math.floor((Rt-1)/2)][1]}}else{var pt=be.vertexcolor||be.facecolor||be.color;gt=O.isArrayOrTypedArray(pt)?pt[se]||pt[0]:pt}Ee.attr("d",xe[0]),gt?Ee.call(u.fill,gt):Ee.call(at)})}};function D(I,N){var F=N?"radial":"horizontal";return F+(I?"":"reversed")}function g(I){var N=I[0].trace,F=N.contours,k=p.hasLines(N),P=p.hasMarkers(N),T=N.visible&&N.fill&&N.fill!=="none",y=!1,S=!1;if(F){var M=F.coloring;M==="lines"?y=!0:k=M==="none"||M==="heatmap"||F.showlines,F.type==="constraint"?T=F._operation!=="=":(M==="fill"||M==="heatmap")&&(S=!0)}return{showMarker:P,showLine:k,showFill:T,showGradientLine:y,showGradientFill:S,anyLine:k||y,anyFill:T||S}}function C(I,N,F){return I&&O.isArrayOrTypedArray(I)?N:I>F?F:I}}}),Y_=U({"src/components/legend/draw.js"(pe,le){var w=Ze(),R=ii(),O=tp(),z=Mi(),l=ih(),u=Vp(),c=ec(),p=Lr(),f=ah(),v=yA(),h=TE(),m=tg(),_=m.LINE_SPACING,x=m.FROM_TL,A=m.FROM_BR,E=Qv(),D=bA(),g=SE(),C=1,I=/^legend[0-9]*$/;le.exports=function(re,fe){if(fe)F(re,fe);else{var we=re._fullLayout,Oe=we._legends,ke=we._infolayer.selectAll('[class^="legend"]');ke.each(function(){var _e=w.select(this),he=_e.attr("class"),De=he.split(" ")[0];De.match(I)&&Oe.indexOf(De)===-1&&_e.remove()});for(var Le=0;Le<Oe.length;Le++){var oe=Oe[Le],be=re._fullLayout[oe];F(re,be)}}};function N(ee,re,fe){if(!(re.title.side!=="top center"&&re.title.side!=="top right")){var we=re.title.font,Oe=we.size*_,ke=0,Le=ee.node(),oe=c.bBox(Le).width;re.title.side==="top center"?ke=.5*(re._width-2*fe-2*h.titlePad-oe):re.title.side==="top right"&&(ke=re._width-2*fe-2*h.titlePad-oe),f.positionText(ee,fe+h.titlePad+ke,fe+Oe)}}function F(ee,re){var fe=re||{},we=ee._fullLayout,Oe=G(fe),ke,Le,oe=fe._inHover;if(oe?(Le=fe.layer,ke="hover"):(Le=we._infolayer,ke=Oe),!!Le){ke+=we._uid,ee._legendMouseDownTime||(ee._legendMouseDownTime=0);var be;if(oe){if(!fe.entries)return;be=E(fe.entries,fe)}else{for(var _e=(ee.calcdata||[]).slice(),he=we.shapes,De=0;De<he.length;De++){var xe=he[De];if(xe.showlegend){var se={_isShape:!0,_fullInput:xe,index:xe._index,name:xe.name||xe.label.text||"shape "+xe._index,legend:xe.legend,legendgroup:xe.legendgroup,legendgrouptitle:xe.legendgrouptitle,legendrank:xe.legendrank,legendwidth:xe.legendwidth,showlegend:xe.showlegend,visible:xe.visible,opacity:xe.opacity,mode:xe.type==="line"?"lines":"markers",line:xe.line,marker:{line:xe.line,color:xe.fillcolor,size:12,symbol:xe.type==="rect"?"square":xe.type==="circle"?"circle":"hexagon2"}};_e.push([{trace:se}])}}be=we.showlegend&&E(_e,fe,we._legends.length>1)}var Ee=we.hiddenlabels||[];if(!oe&&(!we.showlegend||!be.length))return Le.selectAll("."+Oe).remove(),we._topdefs.select("#"+ke).remove(),O.autoMargin(ee,Oe);var Te=R.ensureSingle(Le,"g",Oe,function(Ht){oe||Ht.attr("pointer-events","all")}),Be=R.ensureSingleById(we._topdefs,"clipPath",ke,function(Ht){Ht.append("rect")}),tt=R.ensureSingle(Te,"rect","bg",function(Ht){Ht.attr("shape-rendering","crispEdges")});tt.call(p.stroke,fe.bordercolor).call(p.fill,fe.bgcolor).style("stroke-width",fe.borderwidth+"px");var at=R.ensureSingle(Te,"g","scrollbox"),gt=fe.title;fe._titleWidth=0,fe._titleHeight=0;var pt;gt.text?(pt=R.ensureSingle(at,"text",Oe+"titletext"),pt.attr("text-anchor","start").call(c.font,gt.font).text(gt.text),M(pt,at,ee,fe,C)):at.selectAll("."+Oe+"titletext").remove();var Rt=R.ensureSingle(Te,"rect","scrollbar",function(Ht){Ht.attr(h.scrollBarEnterAttrs).call(p.fill,h.scrollBarColor)}),$t=at.selectAll("g.groups").data(be);$t.enter().append("g").attr("class","groups"),$t.exit().remove();var Wt=$t.selectAll("g.traces").data(R.identity);Wt.enter().append("g").attr("class","traces"),Wt.exit().remove(),Wt.style("opacity",function(Ht){var Ft=Ht[0].trace;return z.traceIs(Ft,"pie-like")?Ee.indexOf(Ht[0].label)!==-1?.5:1:Ft.visible==="legendonly"?.5:1}).each(function(){w.select(this).call(T,ee,fe)}).call(D,ee,fe).each(function(){oe||w.select(this).call(S,ee,Oe)}),R.syncOrAsync([O.previousPromises,function(){return Z(ee,$t,Wt,fe)},function(){var Ht=we._size,Ft=fe.borderwidth,st=fe.xref==="paper",rt=fe.yref==="paper";if(gt.text&&N(pt,fe,Ft),!oe){var Ue,xt;st?Ue=Ht.l+Ht.w*fe.x-x[Q(fe)]*fe._width:Ue=we.width*fe.x-x[Q(fe)]*fe._width,rt?xt=Ht.t+Ht.h*(1-fe.y)-x[J(fe)]*fe._effHeight:xt=we.height*(1-fe.y)-x[J(fe)]*fe._effHeight;var Gt=K(ee,Oe,Ue,xt);if(Gt)return;if(we.margin.autoexpand){var Jt=Ue,Ut=xt;Ue=st?R.constrain(Ue,0,we.width-fe._width):Jt,xt=rt?R.constrain(xt,0,we.height-fe._effHeight):Ut,Ue!==Jt&&R.log("Constrain "+Oe+".x to make legend fit inside graph"),xt!==Ut&&R.log("Constrain "+Oe+".y to make legend fit inside graph")}c.setTranslate(Te,Ue,xt)}if(Rt.on(".drag",null),Te.on("wheel",null),oe||fe._height<=fe._maxHeight||ee._context.staticPlot){var kr=fe._effHeight;oe&&(kr=fe._height),tt.attr({width:fe._width-Ft,height:kr-Ft,x:Ft/2,y:Ft/2}),c.setTranslate(at,0,0),Be.select("rect").attr({width:fe._width-2*Ft,height:kr-2*Ft,x:Ft,y:Ft}),c.setClipUrl(at,ke,ee),c.setRect(Rt,0,0,0,0),delete fe._scrollY}else{var Pr=Math.max(h.scrollBarMinHeight,fe._effHeight*fe._effHeight/fe._height),$r=fe._effHeight-Pr-2*h.scrollBarMargin,rn=fe._height-fe._effHeight,kn=$r/rn,Rn=Math.min(fe._scrollY||0,rn);tt.attr({width:fe._width-2*Ft+h.scrollBarWidth+h.scrollBarMargin,height:fe._effHeight-Ft,x:Ft/2,y:Ft/2}),Be.select("rect").attr({width:fe._width-2*Ft+h.scrollBarWidth+h.scrollBarMargin,height:fe._effHeight-2*Ft,x:Ft,y:Ft+Rn}),c.setClipUrl(at,ke,ee),je(Rn,Pr,kn),Te.on("wheel",function(){Rn=R.constrain(fe._scrollY+w.event.deltaY/$r*rn,0,rn),je(Rn,Pr,kn),Rn!==0&&Rn!==rn&&w.event.preventDefault()});var ci,In,Gn,mr=function(lr,br,Or){var tn=(Or-br)/kn+lr;return R.constrain(tn,0,rn)},St=function(lr,br,Or){var tn=(br-Or)/kn+lr;return R.constrain(tn,0,rn)},Ot=w.behavior.drag().on("dragstart",function(){var lr=w.event.sourceEvent;lr.type==="touchstart"?ci=lr.changedTouches[0].clientY:ci=lr.clientY,Gn=Rn}).on("drag",function(){var lr=w.event.sourceEvent;lr.buttons===2||lr.ctrlKey||(lr.type==="touchmove"?In=lr.changedTouches[0].clientY:In=lr.clientY,Rn=mr(Gn,ci,In),je(Rn,Pr,kn))});Rt.call(Ot);var Et=w.behavior.drag().on("dragstart",function(){var lr=w.event.sourceEvent;lr.type==="touchstart"&&(ci=lr.changedTouches[0].clientY,Gn=Rn)}).on("drag",function(){var lr=w.event.sourceEvent;lr.type==="touchmove"&&(In=lr.changedTouches[0].clientY,Rn=St(Gn,ci,In),je(Rn,Pr,kn))});at.call(Et)}function je(lr,br,Or){fe._scrollY=ee._fullLayout[Oe]._scrollY=lr,c.setTranslate(at,0,-lr),c.setRect(Rt,fe._width,h.scrollBarMargin+lr*Or,h.scrollBarWidth,br),Be.select("rect").attr("y",Ft+lr)}if(ee._context.edits.legendPosition){var Ye,et,mt,Nt;Te.classed("cursor-move",!0),u.init({element:Te.node(),gd:ee,prepFn:function(lr){if(lr.target!==Rt.node()){var br=c.getTranslate(Te);mt=br.x,Nt=br.y}},moveFn:function(lr,br){if(mt!==void 0&&Nt!==void 0){var Or=mt+lr,tn=Nt+br;c.setTranslate(Te,Or,tn),Ye=u.align(Or,fe._width,Ht.l,Ht.l+Ht.w,fe.xanchor),et=u.align(tn+fe._height,-fe._height,Ht.t+Ht.h,Ht.t,fe.yanchor)}},doneFn:function(){if(Ye!==void 0&&et!==void 0){var lr={};lr[Oe+".x"]=Ye,lr[Oe+".y"]=et,z.call("_guiRelayout",ee,lr)}},clickFn:function(lr,br){var Or=Le.selectAll("g.traces").filter(function(){var tn=this.getBoundingClientRect();return br.clientX>=tn.left&&br.clientX<=tn.right&&br.clientY>=tn.top&&br.clientY<=tn.bottom});Or.size()>0&&P(ee,Te,Or,lr,br)}})}}],ee)}}function k(ee,re,fe){var we=ee[0],Oe=we.width,ke=re.entrywidthmode,Le=we.trace.legendwidth||re.entrywidth;return ke==="fraction"?re._maxWidth*Le:fe+(Le||Oe)}function P(ee,re,fe,we,Oe){var ke=fe.data()[0][0].trace,Le={event:Oe,node:fe.node(),curveNumber:ke.index,expandedIndex:ke.index,data:ee.data,layout:ee.layout,frames:ee._transitionData._frames,config:ee._context,fullData:ee._fullData,fullLayout:ee._fullLayout};ke._group&&(Le.group=ke._group),z.traceIs(ke,"pie-like")&&(Le.label=fe.datum()[0].label);var oe=l.triggerHandler(ee,"plotly_legendclick",Le);if(we===1){if(oe===!1)return;re._clickTimeout=setTimeout(function(){ee._fullLayout&&v(fe,ee,we)},ee._context.doubleClickDelay)}else if(we===2){re._clickTimeout&&clearTimeout(re._clickTimeout),ee._legendMouseDownTime=0;var be=l.triggerHandler(ee,"plotly_legenddoubleclick",Le);be!==!1&&oe!==!1&&v(fe,ee,we)}}function T(ee,re,fe){var we=G(fe),Oe=ee.data()[0][0],ke=Oe.trace,Le=z.traceIs(ke,"pie-like"),oe=!fe._inHover&&re._context.edits.legendText&&!Le,be=fe._maxNameLength,_e,he;Oe.groupTitle?(_e=Oe.groupTitle.text,he=Oe.groupTitle.font):(he=fe.font,fe.entries?_e=Oe.text:(_e=Le?Oe.label:ke.name,ke._meta&&(_e=R.templateString(_e,ke._meta))));var De=R.ensureSingle(ee,"text",we+"text");De.attr("text-anchor","start").call(c.font,he).text(oe?y(_e,be):_e);var xe=fe.indentation+fe.itemwidth+h.itemGap*2;f.positionText(De,xe,0),oe?De.call(f.makeEditable,{gd:re,text:_e}).call(M,ee,re,fe).on("edit",function(se){this.text(y(se,be)).call(M,ee,re,fe);var Ee=Oe.trace._fullInput||{},Te={};return Te.name=se,Ee._isShape?z.call("_guiRelayout",re,"shapes["+ke.index+"].name",Te.name):z.call("_guiRestyle",re,Te,ke.index)}):M(De,ee,re,fe)}function y(ee,re){var fe=Math.max(4,re);if(ee&&ee.trim().length>=fe/2)return ee;ee=ee||"";for(var we=fe-ee.length;we>0;we--)ee+=" ";return ee}function S(ee,re,fe){var we=re._context.doubleClickDelay,Oe,ke=1,Le=R.ensureSingle(ee,"rect",fe+"toggle",function(oe){re._context.staticPlot||oe.style("cursor","pointer").attr("pointer-events","all"),oe.call(p.fill,"rgba(0,0,0,0)")});re._context.staticPlot||(Le.on("mousedown",function(){Oe=new Date().getTime(),Oe-re._legendMouseDownTime<we?ke+=1:(ke=1,re._legendMouseDownTime=Oe)}),Le.on("mouseup",function(){if(!(re._dragged||re._editing)){var oe=re._fullLayout[fe];new Date().getTime()-re._legendMouseDownTime>we&&(ke=Math.max(ke-1,1)),P(re,oe,ee,ke,w.event)}}))}function M(ee,re,fe,we,Oe){we._inHover&&ee.attr("data-notex",!0),f.convertToTspans(ee,fe,function(){W(re,fe,we,Oe)})}function W(ee,re,fe,we){var Oe=ee.data()[0][0];if(!fe._inHover&&Oe&&!Oe.trace.showlegend){ee.remove();return}var ke=ee.select("g[class*=math-group]"),Le=ke.node(),oe=G(fe);fe||(fe=re._fullLayout[oe]);var be=fe.borderwidth,_e;we===C?_e=fe.title.font:Oe.groupTitle?_e=Oe.groupTitle.font:_e=fe.font;var he=_e.size*_,De,xe;if(Le){var se=c.bBox(Le);De=se.height,xe=se.width,we===C?c.setTranslate(ke,be,be+De*.75):c.setTranslate(ke,0,De*.25)}else{var Ee="."+oe+(we===C?"title":"")+"text",Te=ee.select(Ee),Be=f.lineCount(Te),tt=Te.node();if(De=he*Be,xe=tt?c.bBox(tt).width:0,we===C)fe.title.side==="left"&&(xe+=h.itemGap*2),f.positionText(Te,be+h.titlePad,be+he);else{var at=h.itemGap*2+fe.indentation+fe.itemwidth;Oe.groupTitle&&(at=h.itemGap,xe-=fe.indentation+fe.itemwidth),f.positionText(Te,at,-he*((Be-1)/2-.3))}}we===C?(fe._titleWidth=xe,fe._titleHeight=De):(Oe.lineHeight=he,Oe.height=Math.max(De,16)+3,Oe.width=xe)}function $(ee){var re=0,fe=0,we=ee.title.side;return we&&(we.indexOf("left")!==-1&&(re=ee._titleWidth),we.indexOf("top")!==-1&&(fe=ee._titleHeight)),[re,fe]}function Z(ee,re,fe,we){var Oe=ee._fullLayout,ke=G(we);we||(we=Oe[ke]);var Le=Oe._size,oe=g.isVertical(we),be=g.isGrouped(we),_e=we.entrywidthmode==="fraction",he=we.borderwidth,De=2*he,xe=h.itemGap,se=we.indentation+we.itemwidth+xe*2,Ee=2*(he+xe),Te=J(we),Be=we.y<0||we.y===0&&Te==="top",tt=we.y>1||we.y===1&&Te==="bottom",at=we.tracegroupgap,gt={};const{orientation:pt,yref:Rt}=we;let{maxheight:$t}=we;const Wt=Be||tt||pt!=="v"||Rt!=="paper";$t||($t=Wt?.5:1);const Ht=Wt?Oe.height:Le.h;we._maxHeight=Math.max($t>1?$t:$t*Ht,30);var Ft=0;we._width=0,we._height=0;var st=$(we);if(oe)fe.each(function(je){var Ye=je[0].height;c.setTranslate(this,he+st[0],he+st[1]+we._height+Ye/2+xe),we._height+=Ye,we._width=Math.max(we._width,je[0].width)}),Ft=se+we._width,we._width+=xe+se+De,we._height+=Ee,be&&(re.each(function(je,Ye){c.setTranslate(this,0,Ye*we.tracegroupgap)}),we._height+=(we._lgroupsLength-1)*we.tracegroupgap);else{var rt=Q(we),Ue=we.x<0||we.x===0&&rt==="right",xt=we.x>1||we.x===1&&rt==="left",Gt=tt||Be,Jt=Oe.width/2;we._maxWidth=Math.max(Ue?Gt&&rt==="left"?Le.l+Le.w:Jt:xt?Gt&&rt==="right"?Le.r+Le.w:Jt:Le.w,2*se);var Ut=0,kr=0;fe.each(function(je){var Ye=k(je,we,se);Ut=Math.max(Ut,Ye),kr+=Ye}),Ft=null;var Pr=0;if(be){var $r=0,rn=0,kn=0;re.each(function(){var je=0,Ye=0;w.select(this).selectAll("g.traces").each(function(mt){var Nt=k(mt,we,se),lr=mt[0].height;c.setTranslate(this,st[0],st[1]+he+xe+lr/2+Ye),Ye+=lr,je=Math.max(je,Nt),gt[mt[0].trace.legendgroup]=je});var et=je+xe;rn>0&&et+he+rn>we._maxWidth?(Pr=Math.max(Pr,rn),rn=0,kn+=$r+at,$r=Ye):$r=Math.max($r,Ye),c.setTranslate(this,rn,kn),rn+=et}),we._width=Math.max(Pr,rn)+he,we._height=kn+$r+Ee}else{var Rn=fe.size(),ci=kr+De+(Rn-1)*xe<we._maxWidth,In=0,Gn=0,mr=0,St=0;fe.each(function(je){var Ye=je[0].height,et=k(je,we,se),mt=ci?et:Ut;_e||(mt+=xe),mt+he+Gn-xe>=we._maxWidth&&(Pr=Math.max(Pr,St),Gn=0,mr+=In,we._height+=In,In=0),c.setTranslate(this,st[0]+he+Gn,st[1]+he+mr+Ye/2+xe),St=Gn+et+xe,Gn+=mt,In=Math.max(In,Ye)}),ci?(we._width=Gn+De,we._height=In+Ee):(we._width=Math.max(Pr,St)+De,we._height+=In+Ee)}}we._width=Math.ceil(Math.max(we._width+st[0],we._titleWidth+2*(he+h.titlePad))),we._height=Math.ceil(Math.max(we._height+st[1],we._titleHeight+2*(he+h.itemGap))),we._effHeight=Math.min(we._height,we._maxHeight);var Ot=ee._context.edits,Et=Ot.legendText||Ot.legendPosition;fe.each(function(je){var Ye=w.select(this).select("."+ke+"toggle"),et=je[0].height,mt=je[0].trace.legendgroup,Nt=k(je,we,se);be&&mt!==""&&(Nt=gt[mt]);var lr=Et?se:Ft||Nt;!oe&&!_e&&(lr+=xe/2),c.setRect(Ye,0,-et/2,lr,et)})}function K(ee,re,fe,we){var Oe=ee._fullLayout,ke=Oe[re],Le=Q(ke),oe=J(ke),be=ke.xref==="paper",_e=ke.yref==="paper";ee._fullLayout._reservedMargin[re]={};var he=ke.y<.5?"b":"t",De=ke.x<.5?"l":"r",xe={r:Oe.width-fe,l:fe+ke._width,b:Oe.height-we,t:we+ke._effHeight};if(be&&_e)return O.autoMargin(ee,re,{x:ke.x,y:ke.y,l:ke._width*x[Le],r:ke._width*A[Le],b:ke._effHeight*A[oe],t:ke._effHeight*x[oe]});be?ee._fullLayout._reservedMargin[re][he]=xe[he]:_e||ke.orientation==="v"?ee._fullLayout._reservedMargin[re][De]=xe[De]:ee._fullLayout._reservedMargin[re][he]=xe[he]}function Q(ee){return R.isRightAnchor(ee)?"right":R.isCenterAnchor(ee)?"center":"left"}function J(ee){return R.isBottomAnchor(ee)?"bottom":R.isMiddleAnchor(ee)?"middle":"top"}function G(ee){return ee._id||"legend"}}}),cM=U({"src/components/fx/hover.js"(pe){var le=Ze(),w=_t(),R=or(),O=ii(),z=O.pushUnique,l=O.strTranslate,u=O.strRotate,c=ih(),p=ah(),f=Db(),v=ec(),h=Lr(),m=Vp(),_=Yu(),x=pf().zindexSeparator,A=Mi(),E=v0(),D=_n(),g=Lb(),C=Y_(),I=D.YANGLE,N=Math.PI*I/180,F=1/Math.sin(N),k=Math.cos(N),P=Math.sin(N),T=D.HOVERARROWSIZE,y=D.HOVERTEXTPAD,S={box:!0,ohlc:!0,violin:!0,candlestick:!0},M={scatter:!0,scattergl:!0,splom:!0};function W(se,Ee){return se.distance-Ee.distance}pe.hover=function(Ee,Te,Be,tt){Ee=O.getGraphDiv(Ee);var at=Te.target;O.throttle(Ee._fullLayout._uid+D.HOVERID,D.HOVERMINTIME,function(){$(Ee,Te,Be,tt,at)})},pe.loneHover=function(Ee,Te){var Be=!0;Array.isArray(Ee)||(Be=!1,Ee=[Ee]);var tt=Te.gd,at=he(tt),gt=De(tt),pt=Ee.map(function(xt){var Gt=xt._x0||xt.x0||xt.x||0,Jt=xt._x1||xt.x1||xt.x||0,Ut=xt._y0||xt.y0||xt.y||0,kr=xt._y1||xt.y1||xt.y||0,Pr=xt.eventData;if(Pr){var $r=Math.min(Gt,Jt),rn=Math.max(Gt,Jt),kn=Math.min(Ut,kr),Rn=Math.max(Ut,kr),ci=xt.trace;if(A.traceIs(ci,"gl3d")){var In=tt._fullLayout[ci.scene]._scene.container,Gn=In.offsetLeft,mr=In.offsetTop;$r+=Gn,rn+=Gn,kn+=mr,Rn+=mr}Pr.bbox={x0:$r+gt,x1:rn+gt,y0:kn+at,y1:Rn+at},Te.inOut_bbox&&Te.inOut_bbox.push(Pr.bbox)}else Pr=!1;return{color:xt.color||h.defaultLine,x0:xt.x0||xt.x||0,x1:xt.x1||xt.x||0,y0:xt.y0||xt.y||0,y1:xt.y1||xt.y||0,xLabel:xt.xLabel,yLabel:xt.yLabel,zLabel:xt.zLabel,text:xt.text,name:xt.name,idealAlign:xt.idealAlign,borderColor:xt.borderColor,fontFamily:xt.fontFamily,fontSize:xt.fontSize,fontColor:xt.fontColor,fontWeight:xt.fontWeight,fontStyle:xt.fontStyle,fontVariant:xt.fontVariant,nameLength:xt.nameLength,textAlign:xt.textAlign,trace:xt.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:xt.hovertemplate||!1,hovertemplateLabels:xt.hovertemplateLabels||!1,eventData:Pr}}),Rt=!1,$t=Q(pt,{gd:tt,hovermode:"closest",rotateLabels:Rt,bgColor:Te.bgColor||h.background,container:le.select(Te.container),outerContainer:Te.outerContainer||Te.container}),Wt=$t.hoverLabels,Ht=5,Ft=0,st=0;Wt.sort(function(xt,Gt){return xt.y0-Gt.y0}).each(function(xt,Gt){var Jt=xt.y0-xt.by/2;Jt-Ht<Ft?xt.offset=Ft-Jt+Ht:xt.offset=0,Ft=Jt+xt.by+xt.offset,Gt===Te.anchorIndex&&(st=xt.offset)}).each(function(xt){xt.offset-=st});var rt=tt._fullLayout._invScaleX,Ue=tt._fullLayout._invScaleY;return fe(Wt,Rt,rt,Ue),Be?Wt:Wt.node()};function $(se,Ee,Te,Be,tt){Te||(Te="xy"),typeof Te=="string"&&(Te=Te.split(x)[0]);var at=Array.isArray(Te)?Te:[Te],gt,pt=se._fullLayout,Rt=pt.hoversubplots,$t=pt._plots||[],Wt=$t[Te],Ht=pt._has("cartesian"),Ft=Ee.hovermode||pt.hovermode,st=(Ft||"").charAt(0)==="x",rt=(Ft||"").charAt(0)==="y",Ue,xt;if(Ht&&(st||rt)&&Rt==="axis"){for(var Gt=at.length,Jt=0;Jt<Gt;Jt++)if(gt=at[Jt],$t[gt]){Ue=_.getFromId(se,gt,"x"),xt=_.getFromId(se,gt,"y");var Ut=(st?Ue:xt)._subplotsWith;if(Ut&&Ut.length)for(var kr=0;kr<Ut.length;kr++)z(at,Ut[kr])}}if(Wt&&Rt!=="single"){var Pr=Wt.overlays.map(function(yl){return yl.id});at=at.concat(Pr)}for(var $r=at.length,rn=new Array($r),kn=new Array($r),Rn=!1,ci=0;ci<$r;ci++)if(gt=at[ci],$t[gt])Rn=!0,rn[ci]=$t[gt].xaxis,kn[ci]=$t[gt].yaxis;else if(pt[gt]&&pt[gt]._subplot){var In=pt[gt]._subplot;rn[ci]=In.xaxis,kn[ci]=In.yaxis}else{O.warn("Unrecognized subplot: "+gt);return}if(Ft&&!Rn&&(Ft="closest"),["x","y","closest","x unified","y unified"].indexOf(Ft)===-1||!se.calcdata||se.querySelector(".zoombox")||se._dragging)return m.unhoverRaw(se,Ee);var Gn=pt.hoverdistance;Gn===-1&&(Gn=1/0);var mr=pt.spikedistance;mr===-1&&(mr=1/0);var St=[],Ot=[],Et,je,Ye,et,mt,Nt,lr,br,Or,tn,Jr,dn,on,Nn={hLinePoint:null,vLinePoint:null},Wi=!1;if(Array.isArray(Ee))for(Ft="array",Ye=0;Ye<Ee.length;Ye++)mt=se.calcdata[Ee[Ye].curveNumber||0],mt&&(Nt=mt[0].trace,mt[0].trace.hoverinfo!=="skip"&&(Ot.push(mt),Nt.orientation==="h"&&(Wi=!0)));else{var Oa=se.calcdata.slice();for(Oa.sort(function(yl,ql){var rc=yl[0].trace.zorder||0,zc=ql[0].trace.zorder||0;return rc-zc}),et=0;et<Oa.length;et++)mt=Oa[et],Nt=mt[0].trace,Nt.hoverinfo!=="skip"&&E.isTraceInSubplots(Nt,at)&&(Ot.push(mt),Nt.orientation==="h"&&(Wi=!0));var Da=!tt,Aa,Ka;if(Da)"xpx"in Ee?Aa=Ee.xpx:Aa=rn[0]._length/2,"ypx"in Ee?Ka=Ee.ypx:Ka=kn[0]._length/2;else{if(c.triggerHandler(se,"plotly_beforehover",Ee)===!1)return;var Sa=tt.getBoundingClientRect();Aa=Ee.clientX-Sa.left,Ka=Ee.clientY-Sa.top,pt._calcInverseTransform(se);var no=O.apply3DTransform(pt._invTransform)(Aa,Ka);if(Aa=no[0],Ka=no[1],Aa<0||Aa>rn[0]._length||Ka<0||Ka>kn[0]._length)return m.unhoverRaw(se,Ee)}if(Ee.pointerX=Aa+rn[0]._offset,Ee.pointerY=Ka+kn[0]._offset,"xval"in Ee?Et=E.flat(at,Ee.xval):Et=E.p2c(rn,Aa),"yval"in Ee?je=E.flat(at,Ee.yval):je=E.p2c(kn,Ka),!w(Et[0])||!w(je[0]))return O.warn("Fx.hover failed",Ee,se),m.unhoverRaw(se,Ee)}var Fo=1/0;function an(yl,ql){for(et=0;et<Ot.length;et++)if(mt=Ot[et],!(!mt||!mt[0]||!mt[0].trace)&&(Nt=mt[0].trace,!(Nt.visible!==!0||Nt._length===0)&&["carpet","contourcarpet"].indexOf(Nt._module.name)===-1)){if(Or=Ft,E.isUnifiedHover(Or)&&(Or=Or.charAt(0)),Nt.type==="splom"?(br=0,lr=at[br]):(lr=E.getSubplot(Nt),br=at.indexOf(lr)),dn={cd:mt,trace:Nt,xa:rn[br],ya:kn[br],maxHoverDistance:Gn,maxSpikeDistance:mr,index:!1,distance:Math.min(Fo,Gn),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:h.defaultLine,name:Nt.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},pt[lr]&&(dn.subplot=pt[lr]._subplot),pt._splomScenes&&pt._splomScenes[Nt.uid]&&(dn.scene=pt._splomScenes[Nt.uid]),Or==="array"){var rc=Ee[et];"pointNumber"in rc?(dn.index=rc.pointNumber,Or="closest"):(Or="","xval"in rc&&(tn=rc.xval,Or="x"),"yval"in rc&&(Jr=rc.yval,Or=Or?"closest":"y"))}else yl!==void 0&&ql!==void 0?(tn=yl,Jr=ql):(tn=Et[br],Jr=je[br]);if(on=St.length,Gn!==0)if(Nt._module&&Nt._module.hoverPoints){var zc=Nt._module.hoverPoints(dn,tn,Jr,Or,{finiteRange:!0,hoverLayer:pt._hoverlayer,hoversubplots:Rt,gd:se});if(zc)for(var Pf,ju=0;ju<zc.length;ju++)Pf=zc[ju],w(Pf.x0)&&w(Pf.y0)&&St.push(we(Pf,Ft))}else O.log("Unrecognized trace type in hover:",Nt);if(Ft==="closest"&&St.length>on&&(St.splice(0,on),Fo=St[0].distance),Ht&&mr!==0&&St.length===0){dn.distance=mr,dn.index=!1;var Ql=Nt._module.hoverPoints(dn,tn,Jr,"closest",{hoverLayer:pt._hoverlayer});if(Ql&&(Ql=Ql.filter(function(qu){return qu.spikeDistance<=mr})),Ql&&Ql.length){var lu,dc=Ql.filter(function(qu){return qu.xa.showspikes&&qu.xa.spikesnap!=="hovered data"});if(dc.length){var wc=dc[0];w(wc.x0)&&w(wc.y0)&&(lu=nn(wc),(!Nn.vLinePoint||Nn.vLinePoint.spikeDistance>lu.spikeDistance)&&(Nn.vLinePoint=lu))}var mc=Ql.filter(function(qu){return qu.ya.showspikes&&qu.ya.spikesnap!=="hovered data"});if(mc.length){var xu=mc[0];w(xu.x0)&&w(xu.y0)&&(lu=nn(xu),(!Nn.hLinePoint||Nn.hLinePoint.spikeDistance>lu.spikeDistance)&&(Nn.hLinePoint=lu))}}}}}an();function Hr(yl,ql,rc){for(var zc=null,Pf=1/0,ju,Ql=0;Ql<yl.length;Ql++)Ue&&Ue._id!==yl[Ql].xa._id||xt&&xt._id!==yl[Ql].ya._id||(ju=yl[Ql].spikeDistance,rc&&Ql===0&&(ju=-1/0),ju<=Pf&&ju<=ql&&(zc=yl[Ql],Pf=ju));return zc}function nn(yl){return yl?{xa:yl.xa,ya:yl.ya,x:yl.xSpike!==void 0?yl.xSpike:(yl.x0+yl.x1)/2,y:yl.ySpike!==void 0?yl.ySpike:(yl.y0+yl.y1)/2,distance:yl.distance,spikeDistance:yl.spikeDistance,curveNumber:yl.trace.index,color:yl.color,pointNumber:yl.index}:null}var Kr={fullLayout:pt,container:pt._hoverlayer,event:Ee};se._spikepoints;var $n={vLinePoint:Nn.vLinePoint,hLinePoint:Nn.hLinePoint};se._spikepoints=$n;var Ai=function(){var yl=St.filter(function(rc){return Ue&&Ue._id===rc.xa._id&&xt&&xt._id===rc.ya._id}),ql=St.filter(function(rc){return!(Ue&&Ue._id===rc.xa._id&&xt&&xt._id===rc.ya._id)});yl.sort(W),ql.sort(W),St=yl.concat(ql),St=be(St,Ft)};Ai();var aa=Ft.charAt(0),Ci=(aa==="x"||aa==="y")&&St[0]&&M[St[0].trace.type];if(Ht&&mr!==0&&St.length!==0){var Ta=St.filter(function(yl){return yl.ya.showspikes}),Na=Hr(Ta,mr,Ci);Nn.hLinePoint=nn(Na);var ro=St.filter(function(yl){return yl.xa.showspikes}),oo=Hr(ro,mr,Ci);Nn.vLinePoint=nn(oo)}if(St.length===0){var xo=m.unhoverRaw(se,Ee);return Ht&&(Nn.hLinePoint!==null||Nn.vLinePoint!==null)&&Le()&&Oe(se,Nn,Kr),xo}if(Ht&&Le()&&Oe(se,Nn,Kr),E.isXYhover(Or)&&St[0].length!==0&&St[0].trace.type!=="splom"){var vr=St[0];S[vr.trace.type]?St=St.filter(function(yl){return yl.trace.index===vr.trace.index}):St=[vr];var er=St.length,si=_e("x",vr,pt),ei=_e("y",vr,pt);an(si,ei);var Kn=[],qn={},pi=0,_i=function(yl){var ql=S[yl.trace.type]?Z(yl):yl.trace.index;if(!qn[ql])pi++,qn[ql]=pi,Kn.push(yl);else{var rc=qn[ql]-1,zc=Kn[rc];rc>0&&Math.abs(yl.distance)<Math.abs(zc.distance)&&(Kn[rc]=yl)}},fi;for(fi=0;fi<er;fi++)_i(St[fi]);for(fi=St.length-1;fi>er-1;fi--)_i(St[fi]);St=Kn,Ai()}var Ri=se._hoverdata,$i=[],Hi=he(se),wr=De(se);for(Ye=0;Ye<St.length;Ye++){var gn=St[Ye],Xn=E.makeEventData(gn,gn.trace,gn.cd);if(gn.hovertemplate!==!1){var Yi=!1;gn.cd[gn.index]&&gn.cd[gn.index].ht&&(Yi=gn.cd[gn.index].ht),gn.hovertemplate=Yi||gn.trace.hovertemplate||!1}if(gn.xa&&gn.ya){var ha=gn.x0+gn.xa._offset,Ca=gn.x1+gn.xa._offset,Ba=gn.y0+gn.ya._offset,ji=gn.y1+gn.ya._offset,Ea=Math.min(ha,Ca),cs=Math.max(ha,Ca),No=Math.min(Ba,ji),Vs=Math.max(Ba,ji);Xn.bbox={x0:Ea+wr,x1:cs+wr,y0:No+Hi,y1:Vs+Hi}}gn.eventData=[Xn],$i.push(Xn)}se._hoverdata=$i;var pl=Ft==="y"&&(Ot.length>1||St.length>1)||Ft==="closest"&&Wi&&St.length>1,kl=h.combine(pt.plot_bgcolor||h.background,pt.paper_bgcolor),El=Q(St,{gd:se,hovermode:Ft,rotateLabels:pl,bgColor:kl,container:pt._hoverlayer,outerContainer:pt._paper.node(),commonLabelOpts:pt.hoverlabel,hoverdistance:pt.hoverdistance}),iu=El.hoverLabels;if(E.isUnifiedHover(Ft)||(G(iu,pl,pt,El.commonLabelBoundingBox),fe(iu,pl,pt._invScaleX,pt._invScaleY)),tt&&tt.tagName){var bu=A.getComponentMethod("annotations","hasClickToShow")(se,$i);f(le.select(tt),bu?"pointer":"")}!tt||Be||!ke(se,Ee,Ri)||(Ri&&se.emit("plotly_unhover",{event:Ee,points:Ri}),se.emit("plotly_hover",{event:Ee,points:se._hoverdata,xaxes:rn,yaxes:kn,xvals:Et,yvals:je}))}function Z(se){return[se.trace.index,se.index,se.x0,se.y0,se.name,se.attr,se.xa?se.xa._id:"",se.ya?se.ya._id:""].join(",")}var K=/<extra>([\s\S]*)<\/extra>/;function Q(se,Ee){var Te=Ee.gd,Be=Te._fullLayout,tt=Ee.hovermode,at=Ee.rotateLabels,gt=Ee.bgColor,pt=Ee.container,Rt=Ee.outerContainer,$t=Ee.commonLabelOpts||{};if(se.length===0)return[[]];var Wt=Ee.fontFamily||D.HOVERFONT,Ht=Ee.fontSize||D.HOVERFONTSIZE,Ft=Ee.fontWeight||Be.font.weight,st=Ee.fontStyle||Be.font.style,rt=Ee.fontVariant||Be.font.variant,Ue=Ee.fontTextcase||Be.font.textcase,xt=Ee.fontLineposition||Be.font.lineposition,Gt=Ee.fontShadow||Be.font.shadow,Jt=se[0],Ut=Jt.xa,kr=Jt.ya,Pr=tt.charAt(0),$r=Pr+"Label",rn=Jt[$r];if(rn===void 0&&Ut.type==="multicategory")for(var kn=0;kn<se.length&&(rn=se[kn][$r],rn===void 0);kn++);var Rn=xe(Te,Rt),ci=Rn.top,In=Rn.width,Gn=Rn.height,mr=rn!==void 0&&Jt.distance<=Ee.hoverdistance&&(tt==="x"||tt==="y");if(mr){var St=!0,Ot,Et;for(Ot=0;Ot<se.length;Ot++)if(St&&se[Ot].zLabel===void 0&&(St=!1),Et=se[Ot].hoverinfo||se[Ot].trace.hoverinfo,Et){var je=Array.isArray(Et)?Et:Et.split("+");if(je.indexOf("all")===-1&&je.indexOf(tt)===-1){mr=!1;break}}St&&(mr=!1)}var Ye=pt.selectAll("g.axistext").data(mr?[0]:[]);Ye.enter().append("g").classed("axistext",!0),Ye.exit().remove();var et={minX:0,maxX:0,minY:0,maxY:0};if(Ye.each(function(){var er=le.select(this),si=O.ensureSingle(er,"path","",function(pl){pl.style({"stroke-width":"1px"})}),ei=O.ensureSingle(er,"text","",function(pl){pl.attr("data-notex",1)}),Kn=$t.bgcolor||h.defaultLine,qn=$t.bordercolor||h.contrast(Kn),pi=h.contrast(Kn),_i=$t.font,fi={weight:_i.weight||Ft,style:_i.style||st,variant:_i.variant||rt,textcase:_i.textcase||Ue,lineposition:_i.lineposition||xt,shadow:_i.shadow||Gt,family:_i.family||Wt,size:_i.size||Ht,color:_i.color||pi};si.style({fill:Kn,stroke:qn}),ei.text(rn).call(v.font,fi).call(p.positionText,0,0).call(p.convertToTspans,Te),er.attr("transform","");var Ri=xe(Te,ei.node()),$i,Hi;if(tt==="x"){var wr=Ut.side==="top"?"-":"";ei.attr("text-anchor","middle").call(p.positionText,0,Ut.side==="top"?ci-Ri.bottom-T-y:ci-Ri.top+T+y),$i=Ut._offset+(Jt.x0+Jt.x1)/2,Hi=kr._offset+(Ut.side==="top"?0:kr._length);var gn=Ri.width/2+y,Xn=$i;$i<gn?Xn=gn:$i>Be.width-gn&&(Xn=Be.width-gn),si.attr("d","M"+($i-Xn)+",0L"+($i-Xn+T)+","+wr+T+"H"+gn+"v"+wr+(y*2+Ri.height)+"H"+-gn+"V"+wr+T+"H"+($i-Xn-T)+"Z"),$i=Xn,et.minX=$i-gn,et.maxX=$i+gn,Ut.side==="top"?(et.minY=Hi-(y*2+Ri.height),et.maxY=Hi-y):(et.minY=Hi+y,et.maxY=Hi+(y*2+Ri.height))}else{var Yi,ha,Ca;kr.side==="right"?(Yi="start",ha=1,Ca="",$i=Ut._offset+Ut._length):(Yi="end",ha=-1,Ca="-",$i=Ut._offset),Hi=kr._offset+(Jt.y0+Jt.y1)/2,ei.attr("text-anchor",Yi),si.attr("d","M0,0L"+Ca+T+","+T+"V"+(y+Ri.height/2)+"h"+Ca+(y*2+Ri.width)+"V-"+(y+Ri.height/2)+"H"+Ca+T+"V-"+T+"Z"),et.minY=Hi-(y+Ri.height/2),et.maxY=Hi+(y+Ri.height/2),kr.side==="right"?(et.minX=$i+T,et.maxX=$i+T+(y*2+Ri.width)):(et.minX=$i-T-(y*2+Ri.width),et.maxX=$i-T);var Ba=Ri.height/2,ji=ci-Ri.top-Ba,Ea="clip"+Be._uid+"commonlabel"+kr._id,cs;if($i<Ri.width+2*y+T){cs="M-"+(T+y)+"-"+Ba+"h-"+(Ri.width-y)+"V"+Ba+"h"+(Ri.width-y)+"Z";var No=Ri.width-$i+y;p.positionText(ei,No,ji),Yi==="end"&&ei.selectAll("tspan").each(function(){var pl=le.select(this),kl=v.tester.append("text").text(pl.text()).call(v.font,fi),El=xe(Te,kl.node());Math.round(El.width)<Math.round(Ri.width)&&pl.attr("x",No-El.width),kl.remove()})}else p.positionText(ei,ha*(y+T),ji),cs=null;var Vs=Be._topclips.selectAll("#"+Ea).data(cs?[0]:[]);Vs.enter().append("clipPath").attr("id",Ea).append("path"),Vs.exit().remove(),Vs.select("path").attr("d",cs),v.setClipUrl(ei,cs?Ea:null,Te)}er.attr("transform",l($i,Hi))}),E.isUnifiedHover(tt)){pt.selectAll("g.hovertext").remove();var mt=se.filter(function(er){return er.hoverinfo!=="none"});if(mt.length===0)return[];var Nt=Be.hoverlabel,lr=Nt.font,br=mt[0],Or=((tt==="x unified"?br.xa:br.ya).unifiedhovertitle||{}).text,tn=Or?O.hovertemplateString(Or,{},Be._d3locale,tt==="x unified"?{xa:br.xa,x:br.xVal}:{ya:br.ya,y:br.yVal}):rn,Jr={showlegend:!0,legend:{title:{text:tn,font:lr},font:lr,bgcolor:Nt.bgcolor,bordercolor:Nt.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:Be.legend?Be.legend.traceorder:void 0,orientation:"v"}},dn={font:lr};g(Jr,dn,Te._fullData);var on=dn.legend;on.entries=[];for(var Nn=0;Nn<mt.length;Nn++){var Wi=mt[Nn];if(Wi.hoverinfo!=="none"){var Oa=J(Wi,!0,tt,Be,rn),Da=Oa[0],Aa=Oa[1];Wi.name=Aa,Aa!==""?Wi.text=Aa+" : "+Da:Wi.text=Da;var Ka=Wi.cd[Wi.index];Ka&&(Ka.mc&&(Wi.mc=Ka.mc),Ka.mcc&&(Wi.mc=Ka.mcc),Ka.mlc&&(Wi.mlc=Ka.mlc),Ka.mlcc&&(Wi.mlc=Ka.mlcc),Ka.mlw&&(Wi.mlw=Ka.mlw),Ka.mrc&&(Wi.mrc=Ka.mrc),Ka.dir&&(Wi.dir=Ka.dir)),Wi._distinct=!0,on.entries.push([Wi])}}on.entries.sort(function(er,si){return er[0].trace.index-si[0].trace.index}),on.layer=pt,on._inHover=!0,on._groupTitleFont=Nt.grouptitlefont,C(Te,on);var Sa=pt.select("g.legend"),no=xe(Te,Sa.node()),Fo=no.width+2*y,an=no.height+2*y,Hr=mt[0],nn=(Hr.x0+Hr.x1)/2,Kr=(Hr.y0+Hr.y1)/2,$n=!(A.traceIs(Hr.trace,"bar-like")||A.traceIs(Hr.trace,"box-violin")),Ai,aa;Pr==="y"?$n?(aa=Kr-y,Ai=Kr+y):(aa=Math.min.apply(null,mt.map(function(er){return Math.min(er.y0,er.y1)})),Ai=Math.max.apply(null,mt.map(function(er){return Math.max(er.y0,er.y1)}))):aa=Ai=O.mean(mt.map(function(er){return(er.y0+er.y1)/2}))-an/2;var Ci,Ta;Pr==="x"?$n?(Ci=nn+y,Ta=nn-y):(Ci=Math.max.apply(null,mt.map(function(er){return Math.max(er.x0,er.x1)})),Ta=Math.min.apply(null,mt.map(function(er){return Math.min(er.x0,er.x1)}))):Ci=Ta=O.mean(mt.map(function(er){return(er.x0+er.x1)/2}))-Fo/2;var Na=Ut._offset,ro=kr._offset;Ai+=ro,Ci+=Na,Ta+=Na-Fo,aa+=ro-an;var oo,xo;return Ci+Fo<In&&Ci>=0?oo=Ci:Ta+Fo<In&&Ta>=0?oo=Ta:Na+Fo<In?oo=Na:Ci-nn<nn-Ta+Fo?oo=In-Fo:oo=0,oo+=y,Ai+an<Gn&&Ai>=0?xo=Ai:aa+an<Gn&&aa>=0?xo=aa:ro+an<Gn?xo=ro:Ai-Kr<Kr-aa+an?xo=Gn-an:xo=0,xo+=y,Sa.attr("transform",l(oo-1,xo-1)),Sa}var vr=pt.selectAll("g.hovertext").data(se,function(er){return Z(er)});return vr.enter().append("g").classed("hovertext",!0).each(function(){var er=le.select(this);er.append("rect").call(h.fill,h.addOpacity(gt,.8)),er.append("text").classed("name",!0),er.append("path").style("stroke-width","1px"),er.append("text").classed("nums",!0).call(v.font,{weight:Ft,style:st,variant:rt,textcase:Ue,lineposition:xt,shadow:Gt,family:Wt,size:Ht})}),vr.exit().remove(),vr.each(function(er){var si=le.select(this).attr("transform",""),ei=er.color;Array.isArray(ei)&&(ei=ei[er.eventData[0].pointNumber]);var Kn=er.bgcolor||ei,qn=h.combine(h.opacity(Kn)?Kn:h.defaultLine,gt),pi=h.combine(h.opacity(ei)?ei:h.defaultLine,gt),_i=er.borderColor||h.contrast(qn),fi=J(er,mr,tt,Be,rn,si),Ri=fi[0],$i=fi[1],Hi=si.select("text.nums").call(v.font,{family:er.fontFamily||Wt,size:er.fontSize||Ht,color:er.fontColor||_i,weight:er.fontWeight||Ft,style:er.fontStyle||st,variant:er.fontVariant||rt,textcase:er.fontTextcase||Ue,lineposition:er.fontLineposition||xt,shadow:er.fontShadow||Gt}).text(Ri).attr("data-notex",1).call(p.positionText,0,0).call(p.convertToTspans,Te),wr=si.select("text.name"),gn=0,Xn=0;if($i&&$i!==Ri){wr.call(v.font,{family:er.fontFamily||Wt,size:er.fontSize||Ht,color:pi,weight:er.fontWeight||Ft,style:er.fontStyle||st,variant:er.fontVariant||rt,textcase:er.fontTextcase||Ue,lineposition:er.fontLineposition||xt,shadow:er.fontShadow||Gt}).text($i).attr("data-notex",1).call(p.positionText,0,0).call(p.convertToTspans,Te);var Yi=xe(Te,wr.node());gn=Yi.width+2*y,Xn=Yi.height+2*y}else wr.remove(),si.select("rect").remove();si.select("path").style({fill:qn,stroke:_i});var ha=er.xa._offset+(er.x0+er.x1)/2,Ca=er.ya._offset+(er.y0+er.y1)/2,Ba=Math.abs(er.x1-er.x0),ji=Math.abs(er.y1-er.y0),Ea=xe(Te,Hi.node()),cs=Ea.width/Be._invScaleX,No=Ea.height/Be._invScaleY;er.ty0=(ci-Ea.top)/Be._invScaleY,er.bx=cs+2*y,er.by=Math.max(No+2*y,Xn),er.anchor="start",er.txwidth=cs,er.tx2width=gn,er.offset=0;var Vs=(cs+T+y+gn)*Be._invScaleX,pl,kl;if(at)er.pos=ha,pl=Ca+ji/2+Vs<=Gn,kl=Ca-ji/2-Vs>=0,(er.idealAlign==="top"||!pl)&&kl?(Ca-=ji/2,er.anchor="end"):pl?(Ca+=ji/2,er.anchor="start"):er.anchor="middle",er.crossPos=Ca;else{if(er.pos=Ca,pl=ha+Ba/2+Vs<=In,kl=ha-Ba/2-Vs>=0,(er.idealAlign==="left"||!pl)&&kl)ha-=Ba/2,er.anchor="end";else if(pl)ha+=Ba/2,er.anchor="start";else{er.anchor="middle";var El=Vs/2,iu=ha+El-In,bu=ha-El;iu>0&&(ha-=iu),bu<0&&(ha+=-bu)}er.crossPos=ha}Hi.attr("text-anchor",er.anchor),gn&&wr.attr("text-anchor",er.anchor),si.attr("transform",l(ha,Ca)+(at?u(I):""))}),{hoverLabels:vr,commonLabelBoundingBox:et}}function J(se,Ee,Te,Be,tt,at){var gt="",pt="";se.nameOverride!==void 0&&(se.name=se.nameOverride),se.name&&(se.trace._meta&&(se.name=O.templateString(se.name,se.trace._meta)),gt=oe(se.name,se.nameLength));var Rt=Te.charAt(0),$t=Rt==="x"?"y":"x";se.zLabel!==void 0?(se.xLabel!==void 0&&(pt+="x: "+se.xLabel+"<br>"),se.yLabel!==void 0&&(pt+="y: "+se.yLabel+"<br>"),se.trace.type!=="choropleth"&&se.trace.type!=="choroplethmapbox"&&se.trace.type!=="choroplethmap"&&(pt+=(pt?"z: ":"")+se.zLabel)):Ee&&se[Rt+"Label"]===tt?pt=se[$t+"Label"]||"":se.xLabel===void 0?se.yLabel!==void 0&&se.trace.type!=="scattercarpet"&&(pt=se.yLabel):se.yLabel===void 0?pt=se.xLabel:pt="("+se.xLabel+", "+se.yLabel+")",(se.text||se.text===0)&&!Array.isArray(se.text)&&(pt+=(pt?"<br>":"")+se.text),se.extraText!==void 0&&(pt+=(pt?"<br>":"")+se.extraText),at&&pt===""&&!se.hovertemplate&&(gt===""&&at.remove(),pt=gt);var Wt=se.hovertemplate||!1;if(Wt){var Ht=se.hovertemplateLabels||se;se[Rt+"Label"]!==tt&&(Ht[Rt+"other"]=Ht[Rt+"Val"],Ht[Rt+"otherLabel"]=Ht[Rt+"Label"]),pt=O.hovertemplateString(Wt,Ht,Be._d3locale,se.eventData[0]||{},se.trace._meta),pt=pt.replace(K,function(Ft,st){return gt=oe(st,se.nameLength),""})}return[pt,gt]}function G(se,Ee,Te,Be){var tt=Ee?"xa":"ya",at=Ee?"ya":"xa",gt=0,pt=1,Rt=se.size(),$t=new Array(Rt),Wt=0,Ht=Be.minX,Ft=Be.maxX,st=Be.minY,rt=Be.maxY,Ue=function(Et){return Et*Te._invScaleX},xt=function(Et){return Et*Te._invScaleY};se.each(function(Et){var je=Et[tt],Ye=Et[at],et=je._id.charAt(0)==="x",mt=je.range;Wt===0&&mt&&mt[0]>mt[1]!==et&&(pt=-1);var Nt=0,lr=et?Te.width:Te.height;if(Te.hovermode==="x"||Te.hovermode==="y"){var br=ee(Et,Ee),Or=Et.anchor,tn=Or==="end"?-1:1,Jr,dn;if(Or==="middle")Jr=Et.crossPos+(et?xt(br.y-Et.by/2):Ue(Et.bx/2+Et.tx2width/2)),dn=Jr+(et?xt(Et.by):Ue(Et.bx));else if(et)Jr=Et.crossPos+xt(T+br.y)-xt(Et.by/2-T),dn=Jr+xt(Et.by);else{var on=Ue(tn*T+br.x),Nn=on+Ue(tn*Et.bx);Jr=Et.crossPos+Math.min(on,Nn),dn=Et.crossPos+Math.max(on,Nn)}et?st!==void 0&&rt!==void 0&&Math.min(dn,rt)-Math.max(Jr,st)>1&&(Ye.side==="left"?(Nt=Ye._mainLinePosition,lr=Te.width):lr=Ye._mainLinePosition):Ht!==void 0&&Ft!==void 0&&Math.min(dn,Ft)-Math.max(Jr,Ht)>1&&(Ye.side==="top"?(Nt=Ye._mainLinePosition,lr=Te.height):lr=Ye._mainLinePosition)}$t[Wt++]=[{datum:Et,traceIndex:Et.trace.index,dp:0,pos:Et.pos,posref:Et.posref,size:Et.by*(et?F:1)/2,pmin:Nt,pmax:lr}]}),$t.sort(function(Et,je){return Et[0].posref-je[0].posref||pt*(je[0].traceIndex-Et[0].traceIndex)});var Gt,Jt,Ut,kr,Pr,$r,rn;function kn(Et){var je=Et[0],Ye=Et[Et.length-1];if(Jt=je.pmin-je.pos-je.dp+je.size,Ut=Ye.pos+Ye.dp+Ye.size-je.pmax,Jt>.01){for(Pr=Et.length-1;Pr>=0;Pr--)Et[Pr].dp+=Jt;Gt=!1}if(!(Ut<.01)){if(Jt<-.01){for(Pr=Et.length-1;Pr>=0;Pr--)Et[Pr].dp-=Ut;Gt=!1}if(Gt){var et=0;for(kr=0;kr<Et.length;kr++)$r=Et[kr],$r.pos+$r.dp+$r.size>je.pmax&&et++;for(kr=Et.length-1;kr>=0&&!(et<=0);kr--)$r=Et[kr],$r.pos>je.pmax-1&&($r.del=!0,et--);for(kr=0;kr<Et.length&&!(et<=0);kr++)if($r=Et[kr],$r.pos<je.pmin+1)for($r.del=!0,et--,Ut=$r.size*2,Pr=Et.length-1;Pr>=0;Pr--)Et[Pr].dp-=Ut;for(kr=Et.length-1;kr>=0&&!(et<=0);kr--)$r=Et[kr],$r.pos+$r.dp+$r.size>je.pmax&&($r.del=!0,et--)}}}for(;!Gt&&gt<=Rt;){for(gt++,Gt=!0,kr=0;kr<$t.length-1;){var Rn=$t[kr],ci=$t[kr+1],In=Rn[Rn.length-1],Gn=ci[0];if(Jt=In.pos+In.dp+In.size-Gn.pos-Gn.dp+Gn.size,Jt>.01){for(Pr=ci.length-1;Pr>=0;Pr--)ci[Pr].dp+=Jt;for(Rn.push.apply(Rn,ci),$t.splice(kr+1,1),rn=0,Pr=Rn.length-1;Pr>=0;Pr--)rn+=Rn[Pr].dp;for(Ut=rn/Rn.length,Pr=Rn.length-1;Pr>=0;Pr--)Rn[Pr].dp-=Ut;Gt=!1}else kr++}$t.forEach(kn)}for(kr=$t.length-1;kr>=0;kr--){var mr=$t[kr];for(Pr=mr.length-1;Pr>=0;Pr--){var St=mr[Pr],Ot=St.datum;Ot.offset=St.dp,Ot.del=St.del}}}function ee(se,Ee){var Te=0,Be=se.offset;return Ee&&(Be*=-P,Te=se.offset*k),{x:Te,y:Be}}function re(se){var Ee={start:1,end:-1,middle:0}[se.anchor],Te=Ee*(T+y),Be=Te+Ee*(se.txwidth+y),tt=se.anchor==="middle";return tt&&(Te-=se.tx2width/2,Be+=se.txwidth/2+y),{alignShift:Ee,textShiftX:Te,text2ShiftX:Be}}function fe(se,Ee,Te,Be){var tt=function(gt){return gt*Te},at=function(gt){return gt*Be};se.each(function(gt){var pt=le.select(this);if(gt.del)return pt.remove();var Rt=pt.select("text.nums"),$t=gt.anchor,Wt=$t==="end"?-1:1,Ht=re(gt),Ft=ee(gt,Ee),st=Ft.x,rt=Ft.y,Ue=$t==="middle",xt="hoverlabel"in gt.trace?gt.trace.hoverlabel.showarrow:!0,Gt;Ue?Gt="M-"+tt(gt.bx/2+gt.tx2width/2)+","+at(rt-gt.by/2)+"h"+tt(gt.bx)+"v"+at(gt.by)+"h-"+tt(gt.bx)+"Z":xt?Gt="M0,0L"+tt(Wt*T+st)+","+at(T+rt)+"v"+at(gt.by/2-T)+"h"+tt(Wt*gt.bx)+"v-"+at(gt.by)+"H"+tt(Wt*T+st)+"V"+at(rt-T)+"Z":Gt="M"+tt(Wt*T+st)+","+at(rt-gt.by/2)+"h"+tt(Wt*gt.bx)+"v"+at(gt.by)+"h"+tt(-Wt*gt.bx)+"Z",pt.select("path").attr("d",Gt);var Jt=st+Ht.textShiftX,Ut=rt+gt.ty0-gt.by/2+y,kr=gt.textAlign||"auto";kr!=="auto"&&(kr==="left"&&$t!=="start"?(Rt.attr("text-anchor","start"),Jt=Ue?-gt.bx/2-gt.tx2width/2+y:-gt.bx-y):kr==="right"&&$t!=="end"&&(Rt.attr("text-anchor","end"),Jt=Ue?gt.bx/2-gt.tx2width/2-y:gt.bx+y)),Rt.call(p.positionText,tt(Jt),at(Ut)),gt.tx2width&&(pt.select("text.name").call(p.positionText,tt(Ht.text2ShiftX+Ht.alignShift*y+st),at(rt+gt.ty0-gt.by/2+y)),pt.select("rect").call(v.setRect,tt(Ht.text2ShiftX+(Ht.alignShift-1)*gt.tx2width/2+st),at(rt-gt.by/2-1),tt(gt.tx2width),at(gt.by+2)))})}function we(se,Ee){var Te=se.index,Be=se.trace||{},tt=se.cd[0],at=se.cd[Te]||{};function gt(Ft){return Ft||w(Ft)&&Ft===0}var pt=Array.isArray(Te)?function(Ft,st){var rt=O.castOption(tt,Te,Ft);return gt(rt)?rt:O.extractOption({},Be,"",st)}:function(Ft,st){return O.extractOption(at,Be,Ft,st)};function Rt(Ft,st,rt){var Ue=pt(st,rt);gt(Ue)&&(se[Ft]=Ue)}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"),se.posref=Ee==="y"||Ee==="closest"&&Be.orientation==="h"?se.xa._offset+(se.x0+se.x1)/2:se.ya._offset+(se.y0+se.y1)/2,se.x0=O.constrain(se.x0,0,se.xa._length),se.x1=O.constrain(se.x1,0,se.xa._length),se.y0=O.constrain(se.y0,0,se.ya._length),se.y1=O.constrain(se.y1,0,se.ya._length),se.xLabelVal!==void 0&&(se.xLabel="xLabel"in se?se.xLabel:_.hoverLabelText(se.xa,se.xLabelVal,Be.xhoverformat),se.xVal=se.xa.c2d(se.xLabelVal)),se.yLabelVal!==void 0&&(se.yLabel="yLabel"in se?se.yLabel:_.hoverLabelText(se.ya,se.yLabelVal,Be.yhoverformat),se.yVal=se.ya.c2d(se.yLabelVal)),se.zLabelVal!==void 0&&se.zLabel===void 0&&(se.zLabel=String(se.zLabelVal)),!isNaN(se.xerr)&&!(se.xa.type==="log"&&se.xerr<=0)){var $t=_.tickText(se.xa,se.xa.c2l(se.xerr),"hover").text;se.xerrneg!==void 0?se.xLabel+=" +"+$t+" / -"+_.tickText(se.xa,se.xa.c2l(se.xerrneg),"hover").text:se.xLabel+=" ± "+$t,Ee==="x"&&(se.distance+=1)}if(!isNaN(se.yerr)&&!(se.ya.type==="log"&&se.yerr<=0)){var Wt=_.tickText(se.ya,se.ya.c2l(se.yerr),"hover").text;se.yerrneg!==void 0?se.yLabel+=" +"+Wt+" / -"+_.tickText(se.ya,se.ya.c2l(se.yerrneg),"hover").text:se.yLabel+=" ± "+Wt,Ee==="y"&&(se.distance+=1)}var Ht=se.hoverinfo||se.trace.hoverinfo;return Ht&&Ht!=="all"&&(Ht=Array.isArray(Ht)?Ht:Ht.split("+"),Ht.indexOf("x")===-1&&(se.xLabel=void 0),Ht.indexOf("y")===-1&&(se.yLabel=void 0),Ht.indexOf("z")===-1&&(se.zLabel=void 0),Ht.indexOf("text")===-1&&(se.text=void 0),Ht.indexOf("name")===-1&&(se.name=void 0)),se}function Oe(se,Ee,Te){var Be=Te.container,tt=Te.fullLayout,at=tt._size,gt=Te.event,pt=!!Ee.hLinePoint,Rt=!!Ee.vLinePoint,$t,Wt;if(Be.selectAll(".spikeline").remove(),!!(Rt||pt)){var Ht=h.combine(tt.plot_bgcolor,tt.paper_bgcolor);if(pt){var Ft=Ee.hLinePoint,st,rt;$t=Ft&&Ft.xa,Wt=Ft&&Ft.ya;var Ue=Wt.spikesnap;Ue==="cursor"?(st=gt.pointerX,rt=gt.pointerY):(st=$t._offset+Ft.x,rt=Wt._offset+Ft.y);var xt=R.readability(Ft.color,Ht)<1.5?h.contrast(Ht):Ft.color,Gt=Wt.spikemode,Jt=Wt.spikethickness,Ut=Wt.spikecolor||xt,kr=_.getPxPosition(se,Wt),Pr,$r;if(Gt.indexOf("toaxis")!==-1||Gt.indexOf("across")!==-1){if(Gt.indexOf("toaxis")!==-1&&(Pr=kr,$r=st),Gt.indexOf("across")!==-1){var rn=Wt._counterDomainMin,kn=Wt._counterDomainMax;Wt.anchor==="free"&&(rn=Math.min(rn,Wt.position),kn=Math.max(kn,Wt.position)),Pr=at.l+rn*at.w,$r=at.l+kn*at.w}Be.insert("line",":first-child").attr({x1:Pr,x2:$r,y1:rt,y2:rt,"stroke-width":Jt,stroke:Ut,"stroke-dasharray":v.dashStyle(Wt.spikedash,Jt)}).classed("spikeline",!0).classed("crisp",!0),Be.insert("line",":first-child").attr({x1:Pr,x2:$r,y1:rt,y2:rt,"stroke-width":Jt+2,stroke:Ht}).classed("spikeline",!0).classed("crisp",!0)}Gt.indexOf("marker")!==-1&&Be.insert("circle",":first-child").attr({cx:kr+(Wt.side!=="right"?Jt:-Jt),cy:rt,r:Jt,fill:Ut}).classed("spikeline",!0)}if(Rt){var Rn=Ee.vLinePoint,ci,In;$t=Rn&&Rn.xa,Wt=Rn&&Rn.ya;var Gn=$t.spikesnap;Gn==="cursor"?(ci=gt.pointerX,In=gt.pointerY):(ci=$t._offset+Rn.x,In=Wt._offset+Rn.y);var mr=R.readability(Rn.color,Ht)<1.5?h.contrast(Ht):Rn.color,St=$t.spikemode,Ot=$t.spikethickness,Et=$t.spikecolor||mr,je=_.getPxPosition(se,$t),Ye,et;if(St.indexOf("toaxis")!==-1||St.indexOf("across")!==-1){if(St.indexOf("toaxis")!==-1&&(Ye=je,et=In),St.indexOf("across")!==-1){var mt=$t._counterDomainMin,Nt=$t._counterDomainMax;$t.anchor==="free"&&(mt=Math.min(mt,$t.position),Nt=Math.max(Nt,$t.position)),Ye=at.t+(1-Nt)*at.h,et=at.t+(1-mt)*at.h}Be.insert("line",":first-child").attr({x1:ci,x2:ci,y1:Ye,y2:et,"stroke-width":Ot,stroke:Et,"stroke-dasharray":v.dashStyle($t.spikedash,Ot)}).classed("spikeline",!0).classed("crisp",!0),Be.insert("line",":first-child").attr({x1:ci,x2:ci,y1:Ye,y2:et,"stroke-width":Ot+2,stroke:Ht}).classed("spikeline",!0).classed("crisp",!0)}St.indexOf("marker")!==-1&&Be.insert("circle",":first-child").attr({cx:ci,cy:je-($t.side!=="top"?Ot:-Ot),r:Ot,fill:Et}).classed("spikeline",!0)}}}function ke(se,Ee,Te){if(!Te||Te.length!==se._hoverdata.length)return!0;for(var Be=Te.length-1;Be>=0;Be--){var tt=Te[Be],at=se._hoverdata[Be];if(tt.curveNumber!==at.curveNumber||String(tt.pointNumber)!==String(at.pointNumber)||String(tt.pointNumbers)!==String(at.pointNumbers)||tt.binNumber!==at.binNumber)return!0}return!1}function Le(se,Ee){return!0}function oe(se,Ee){return p.plainText(se||"",{len:Ee,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function be(se,Ee){for(var Te=Ee.charAt(0),Be=[],tt=[],at=[],gt=0;gt<se.length;gt++){var pt=se[gt];A.traceIs(pt.trace,"bar-like")||A.traceIs(pt.trace,"box-violin")?at.push(pt):pt.trace[Te+"period"]?tt.push(pt):Be.push(pt)}return Be.concat(tt).concat(at)}function _e(se,Ee,Te){var Be=Ee[se+"a"],tt=Ee[se+"Val"],at=Ee.cd[0];if(Be.type==="category"||Be.type==="multicategory")tt=Be._categoriesMap[tt];else if(Be.type==="date"){var gt=Ee.trace[se+"periodalignment"];if(gt){var pt=Ee.cd[Ee.index],Rt=pt[se+"Start"];Rt===void 0&&(Rt=pt[se]);var $t=pt[se+"End"];$t===void 0&&($t=pt[se]);var Wt=$t-Rt;gt==="end"?tt+=Wt:gt==="middle"&&(tt+=Wt/2)}tt=Be.d2c(tt)}return at&&at.t&&at.t.posLetter===Be._id&&(Te.boxmode==="group"||Te.violinmode==="group")&&(tt+=at.t.dPos),tt}function he(se){return se.offsetTop+se.clientTop}function De(se){return se.offsetLeft+se.clientLeft}function xe(se,Ee){var Te=se._fullLayout,Be=Ee.getBoundingClientRect(),tt=Be.left,at=Be.top,gt=tt+Be.width,pt=at+Be.height,Rt=O.apply3DTransform(Te._invTransform)(tt,at),$t=O.apply3DTransform(Te._invTransform)(gt,pt),Wt=Rt[0],Ht=Rt[1],Ft=$t[0],st=$t[1];return{x:Wt,y:Ht,width:Ft-Wt,height:st-Ht,top:Math.min(Ht,st),left:Math.min(Wt,Ft),right:Math.max(Wt,Ft),bottom:Math.max(Ht,st)}}}}),fM=U({"src/components/fx/hoverlabel_defaults.js"(pe,le){var w=ii(),R=Lr(),O=v0().isUnifiedHover;le.exports=function(l,u,c,p){p=p||{};var f=u.legend;function v(h){p.font[h]||(p.font[h]=f?u.legend.font[h]:u.font[h])}u&&O(u.hovermode)&&(p.font||(p.font={}),v("size"),v("family"),v("color"),v("weight"),v("style"),v("variant"),f?(p.bgcolor||(p.bgcolor=R.combine(u.legend.bgcolor,u.paper_bgcolor)),p.bordercolor||(p.bordercolor=u.legend.bordercolor)):p.bgcolor||(p.bgcolor=u.paper_bgcolor)),c("hoverlabel.bgcolor",p.bgcolor),c("hoverlabel.bordercolor",p.bordercolor),c("hoverlabel.namelength",p.namelength),c("hoverlabel.showarrow",p.showarrow),w.coerceFont(c,"hoverlabel.font",p.font),c("hoverlabel.align",p.align)}}}),eR=U({"src/components/fx/layout_global_defaults.js"(pe,le){var w=ii(),R=fM(),O=Un();le.exports=function(l,u){function c(p,f){return w.coerce(l,u,O,p,f)}R(l,u,c)}}}),a_=U({"src/components/fx/defaults.js"(pe,le){var w=ii(),R=Qn(),O=fM();le.exports=function(l,u,c,p){function f(h,m){return w.coerce(l,u,R,h,m)}var v=w.extendFlat({},p.hoverlabel);u.hovertemplate&&(v.namelength=-1),O(l,u,f,v)}}}),C1=U({"src/components/fx/hovermode_defaults.js"(pe,le){var w=ii(),R=Un();le.exports=function(z,l){function u(c,p){return l[c]!==void 0?l[c]:w.coerce(z,l,R,c,p)}return u("clickmode"),u("hoversubplots"),u("hovermode")}}}),xA=U({"src/components/fx/layout_defaults.js"(pe,le){var w=ii(),R=Un(),O=C1(),z=fM();le.exports=function(u,c){function p(A,E){return w.coerce(u,c,R,A,E)}var f=O(u,c);f&&(p("hoverdistance"),p("spikedistance"));var v=p("dragmode");v==="select"&&p("selectdirection");var h=c._has("mapbox"),m=c._has("map"),_=c._has("geo"),x=c._basePlotModules.length;c.dragmode==="zoom"&&((h||m||_)&&x===1||(h||m)&&_&&x===2)&&(c.dragmode="pan"),z(u,c,p),w.coerceFont(p,"hoverlabel.grouptitlefont",c.hoverlabel.font)}}}),Q2=U({"src/components/fx/calc.js"(pe,le){var w=ii(),R=Mi();le.exports=function(l){var u=l.calcdata,c=l._fullLayout;function p(_){return function(x){return w.coerceHoverinfo({hoverinfo:x},{_module:_._module},c)}}for(var f=0;f<u.length;f++){var v=u[f],h=v[0].trace;if(!R.traceIs(h,"pie-like")){var m=R.traceIs(h,"2dMap")?O:w.fillArray;m(h.hoverinfo,v,"hi",p(h)),h.hovertemplate&&m(h.hovertemplate,v,"ht"),h.hoverlabel&&(m(h.hoverlabel.bgcolor,v,"hbg"),m(h.hoverlabel.bordercolor,v,"hbc"),m(h.hoverlabel.font.size,v,"hts"),m(h.hoverlabel.font.color,v,"htc"),m(h.hoverlabel.font.family,v,"htf"),m(h.hoverlabel.font.weight,v,"htw"),m(h.hoverlabel.font.style,v,"hty"),m(h.hoverlabel.font.variant,v,"htv"),m(h.hoverlabel.namelength,v,"hnl"),m(h.hoverlabel.align,v,"hta"),m(h.hoverlabel.showarrow,v,"htsa"))}}};function O(z,l,u,c){c=c||w.identity,Array.isArray(z)&&(l[0][u]=c(z))}}}),EE=U({"src/components/fx/click.js"(pe,le){var w=Mi(),R=cM().hover;le.exports=function(z,l,u){var c=w.getComponentMethod("annotations","onClick")(z,z._hoverdata);u!==void 0&&R(z,l,u,!0);function p(){z.emit("plotly_click",{points:z._hoverdata,event:l})}z._hoverdata&&l&&l.target&&(c&&c.then?c.then(p):p(),l.stopImmediatePropagation&&l.stopImmediatePropagation())}}}),Dp=U({"src/components/fx/index.js"(pe,le){var w=Ze(),R=ii(),O=Vp(),z=v0(),l=Un(),u=cM();le.exports={moduleType:"component",name:"fx",constants:_n(),schema:{layout:l},attributes:Qn(),layoutAttributes:l,supplyLayoutGlobalDefaults:eR(),supplyDefaults:a_(),supplyLayoutDefaults:xA(),calc:Q2(),getDistanceFunction:z.getDistanceFunction,getClosest:z.getClosest,inbox:z.inbox,quadrature:z.quadrature,appendArrayPointValue:z.appendArrayPointValue,castHoverOption:p,castHoverinfo:f,hover:u.hover,unhover:O.unhover,loneHover:u.loneHover,loneUnhover:c,click:EE()};function c(v){var h=R.isD3Selection(v)?v:w.select(v);h.selectAll("g.hovertext").remove(),h.selectAll(".spikeline").remove()}function p(v,h,m){return R.castOption(v,h,"hoverlabel."+m)}function f(v,h,m){function _(x){return R.coerceHoverinfo({hoverinfo:x},{_module:v._module},h)}return R.castOption(v,m,"hoverinfo",_)}}}),m0=U({"src/components/dragelement/helpers.js"(pe){pe.selectMode=function(le){return le==="lasso"||le==="select"},pe.drawMode=function(le){return le==="drawclosedpath"||le==="drawopenpath"||le==="drawline"||le==="drawrect"||le==="drawcircle"},pe.openMode=function(le){return le==="drawline"||le==="drawopenpath"},pe.rectMode=function(le){return le==="select"||le==="drawline"||le==="drawrect"||le==="drawcircle"},pe.freeMode=function(le){return le==="lasso"||le==="drawclosedpath"||le==="drawopenpath"},pe.selectingOrDrawing=function(le){return pe.freeMode(le)||pe.rectMode(le)}}}),jg=U({"src/lib/clear_gl_canvases.js"(pe,le){le.exports=function(R){var O=R._fullLayout;O._glcanvas&&O._glcanvas.size()&&O._glcanvas.each(function(z){z.regl&&z.regl.clear({color:!0,depth:!0})})}}}),oT=U({"src/fonts/ploticon.js"(pe,le){le.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("")}}}}),sT=U({"src/components/shapes/draw_newshape/constants.js"(pe,le){var w=32;le.exports={CIRCLE_SIDES:w,i000:0,i090:w/4,i180:w/2,i270:w/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}}}),yx=U({"src/components/selections/helpers.js"(pe,le){var w=ii().strTranslate;function R(u,c){switch(u.type){case"log":return u.p2d(c);case"date":return u.p2r(c,0,u.calendar);default:return u.p2r(c)}}function O(u,c){switch(u.type){case"log":return u.d2p(c);case"date":return u.r2p(c,0,u.calendar);default:return u.r2p(c)}}function z(u){var c=u._id.charAt(0)==="y"?1:0;return function(p){return R(u,p[c])}}function l(u){return w(u.xaxis._offset,u.yaxis._offset)}le.exports={p2r:R,r2p:O,axValue:z,getTransform:l}}}),o_=U({"src/components/shapes/draw_newshape/helpers.js"(pe){var le=mA(),w=sT(),R=w.CIRCLE_SIDES,O=w.SQRT2,z=yx(),l=z.p2r,u=z.r2p,c=[0,3,4,5,6,1,2],p=[0,3,4,1,2];pe.writePaths=function(h){var m=h.length;if(!m)return"M0,0Z";for(var _="",x=0;x<m;x++)for(var A=h[x].length,E=0;E<A;E++){var D=h[x][E][0];if(D==="Z")_+="Z";else for(var g=h[x][E].length,C=0;C<g;C++){var I=C;D==="Q"||D==="S"?I=p[C]:D==="C"&&(I=c[C]),_+=h[x][E][I],C>0&&C<g-1&&(_+=",")}}return _},pe.readPaths=function(h,m,_,x){var A=le(h),E=[],D=-1,g=function(){D++,E[D]=[]},C,I=0,N=0,F,k,P=function(){F=I,k=N};P();for(var T=0;T<A.length;T++){var y=[],S,M,W,$,Z=A[T][0],K=Z;switch(Z){case"M":g(),I=+A[T][1],N=+A[T][2],y.push([K,I,N]),P();break;case"Q":case"S":S=+A[T][1],W=+A[T][2],I=+A[T][3],N=+A[T][4],y.push([K,I,N,S,W]);break;case"C":S=+A[T][1],W=+A[T][2],M=+A[T][3],$=+A[T][4],I=+A[T][5],N=+A[T][6],y.push([K,I,N,S,W,M,$]);break;case"T":case"L":I=+A[T][1],N=+A[T][2],y.push([K,I,N]);break;case"H":K="L",I=+A[T][1],y.push([K,I,N]);break;case"V":K="L",N=+A[T][1],y.push([K,I,N]);break;case"A":K="L";var Q=+A[T][1],J=+A[T][2];+A[T][4]||(Q=-Q,J=-J);var G=I-Q,ee=N;for(C=1;C<=R/2;C++){var re=2*Math.PI*C/R;y.push([K,G+Q*Math.cos(re),ee+J*Math.sin(re)])}break;case"Z":(I!==F||N!==k)&&(I=F,N=k,y.push([K,I,N]));break}for(var fe=(_||{}).domain,we=m._fullLayout._size,Oe=_&&_.xsizemode==="pixel",ke=_&&_.ysizemode==="pixel",Le=x===!1,oe=0;oe<y.length;oe++){for(C=0;C+2<7;C+=2){var be=y[oe][C+1],_e=y[oe][C+2];be===void 0||_e===void 0||(I=be,N=_e,_&&(_.xaxis&&_.xaxis.p2r?(Le&&(be-=_.xaxis._offset),Oe?be=u(_.xaxis,_.xanchor)+be:be=l(_.xaxis,be)):(Le&&(be-=we.l),fe?be=fe.x[0]+be/we.w:be=be/we.w),_.yaxis&&_.yaxis.p2r?(Le&&(_e-=_.yaxis._offset),ke?_e=u(_.yaxis,_.yanchor)-_e:_e=l(_.yaxis,_e)):(Le&&(_e-=we.t),fe?_e=fe.y[1]-_e/we.h:_e=1-_e/we.h)),y[oe][C+1]=be,y[oe][C+2]=_e)}E[D].push(y[oe].slice())}}return E};function f(h,m){return Math.abs(h-m)<=1e-6}function v(h,m){var _=m[1]-h[1],x=m[2]-h[2];return Math.sqrt(_*_+x*x)}pe.pointsOnRectangle=function(h){var m=h.length;if(m!==5)return!1;for(var _=1;_<3;_++){var x=h[0][_]-h[1][_],A=h[3][_]-h[2][_];if(!f(x,A))return!1;var E=h[0][_]-h[3][_],D=h[1][_]-h[2][_];if(!f(E,D))return!1}return!f(h[0][1],h[1][1])&&!f(h[0][1],h[3][1])?!1:!!(v(h[0],h[1])*v(h[0],h[3]))},pe.pointsOnEllipse=function(h){var m=h.length;if(m!==R+1)return!1;m=R;for(var _=0;_<m;_++){var x=(m*2-_)%m,A=(m/2+x)%m,E=(m/2+_)%m;if(!f(v(h[_],h[E]),v(h[x],h[A])))return!1}return!0},pe.handleEllipse=function(h,m,_){if(!h)return[m,_];var x=pe.ellipseOver({x0:m[0],y0:m[1],x1:_[0],y1:_[1]}),A=(x.x1+x.x0)/2,E=(x.y1+x.y0)/2,D=(x.x1-x.x0)/2,g=(x.y1-x.y0)/2;D||(D=g=g/O),g||(g=D=D/O);for(var C=[],I=0;I<R;I++){var N=I*2*Math.PI/R;C.push([A+D*Math.cos(N),E+g*Math.sin(N)])}return C},pe.ellipseOver=function(h){var m=h.x0,_=h.y0,x=h.x1,A=h.y1,E=x-m,D=A-_;m-=E,_-=D;var g=(m+x)/2,C=(_+A)/2,I=O;return E*=I,D*=I,{x0:g-E,y0:C-D,x1:g+E,y1:C+D}},pe.fixDatesForPaths=function(h,m,_){var x=m.type==="date",A=_.type==="date";if(!x&&!A)return h;for(var E=0;E<h.length;E++)for(var D=0;D<h[E].length;D++)for(var g=0;g+2<h[E][D].length;g+=2)x&&(h[E][D][g+1]=h[E][D][g+1].replace(" ","_")),A&&(h[E][D][g+2]=h[E][D][g+2].replace(" ","_"));return h}}}),AE=U({"src/components/shapes/draw_newshape/newshapes.js"(pe,le){var w=Tf(),R=m0(),O=R.drawMode,z=R.openMode,l=sT(),u=l.i000,c=l.i090,p=l.i180,f=l.i270,v=l.cos45,h=l.sin45,m=yx(),_=m.p2r,x=m.r2p,A=T1(),E=A.clearOutline,D=o_(),g=D.readPaths,C=D.writePaths,I=D.ellipseOver,N=D.fixDatesForPaths;function F(P,T){if(P.length){var y=P[0][0];if(y){var S=T.gd,M=T.isActiveShape,W=T.dragmode,$=(S.layout||{}).shapes||[];if(!O(W)&&M!==void 0){var Z=S._fullLayout._activeShapeIndex;if(Z<$.length)switch(S._fullLayout.shapes[Z].type){case"rect":W="drawrect";break;case"circle":W="drawcircle";break;case"line":W="drawline";break;case"path":var K=$[Z].path||"";K[K.length-1]==="Z"?W="drawclosedpath":W="drawopenpath";break}}var Q=k(P,T,W);E(S);for(var J=T.editHelpers,G=(J||{}).modifyItem,ee=[],re=0;re<$.length;re++){var fe=S._fullLayout.shapes[re];if(ee[re]=fe._input,M!==void 0&&re===S._fullLayout._activeShapeIndex){var we=Q;switch(fe.type){case"line":case"rect":case"circle":var Oe=w.getFromId(S,fe.xref);fe.xref.charAt(0)==="x"&&Oe.type.includes("category")?(G("x0",we.x0-(fe.x0shift||0)),G("x1",we.x1-(fe.x1shift||0))):(G("x0",we.x0),G("x1",we.x1));var ke=w.getFromId(S,fe.yref);fe.yref.charAt(0)==="y"&&ke.type.includes("category")?(G("y0",we.y0-(fe.y0shift||0)),G("y1",we.y1-(fe.y1shift||0))):(G("y0",we.y0),G("y1",we.y1));break;case"path":G("path",we.path);break}}}return M===void 0?(ee.push(Q),ee):J?J.getUpdateObj():{}}}}function k(P,T,y){var S=P[0][0],M=T.gd,W=S.getAttribute("d"),$=M._fullLayout.newshape,Z=T.plotinfo,K=T.isActiveShape,Q=Z.xaxis,J=Z.yaxis,G=!!Z.domain||!Z.xaxis,ee=!!Z.domain||!Z.yaxis,re=z(y),fe=g(W,M,Z,K),we={editable:!0,visible:$.visible,name:$.name,showlegend:$.showlegend,legend:$.legend,legendwidth:$.legendwidth,legendgroup:$.legendgroup,legendgrouptitle:{text:$.legendgrouptitle.text,font:$.legendgrouptitle.font},legendrank:$.legendrank,label:$.label,xref:G?"paper":Q._id,yref:ee?"paper":J._id,layer:$.layer,opacity:$.opacity,line:{color:$.line.color,width:$.line.width,dash:$.line.dash}};re||(we.fillcolor=$.fillcolor,we.fillrule=$.fillrule);var Oe;if(fe.length===1&&(Oe=fe[0]),Oe&&Oe.length===5&&y==="drawrect")we.type="rect",we.x0=Oe[0][1],we.y0=Oe[0][2],we.x1=Oe[2][1],we.y1=Oe[2][2];else if(Oe&&y==="drawline")we.type="line",we.x0=Oe[0][1],we.y0=Oe[0][2],we.x1=Oe[1][1],we.y1=Oe[1][2];else if(Oe&&y==="drawcircle"){we.type="circle";var ke=Oe[u][1],Le=Oe[c][1],oe=Oe[p][1],be=Oe[f][1],_e=Oe[u][2],he=Oe[c][2],De=Oe[p][2],xe=Oe[f][2],se=Z.xaxis&&(Z.xaxis.type==="date"||Z.xaxis.type==="log"),Ee=Z.yaxis&&(Z.yaxis.type==="date"||Z.yaxis.type==="log");se&&(ke=x(Z.xaxis,ke),Le=x(Z.xaxis,Le),oe=x(Z.xaxis,oe),be=x(Z.xaxis,be)),Ee&&(_e=x(Z.yaxis,_e),he=x(Z.yaxis,he),De=x(Z.yaxis,De),xe=x(Z.yaxis,xe));var Te=(Le+be)/2,Be=(_e+De)/2,tt=(be-Le+oe-ke)/2,at=(xe-he+De-_e)/2,gt=I({x0:Te,y0:Be,x1:Te+tt*v,y1:Be+at*h});se&&(gt.x0=_(Z.xaxis,gt.x0),gt.x1=_(Z.xaxis,gt.x1)),Ee&&(gt.y0=_(Z.yaxis,gt.y0),gt.y1=_(Z.yaxis,gt.y1)),we.x0=gt.x0,we.y0=gt.y0,we.x1=gt.x1,we.y1=gt.y1}else we.type="path",Q&&J&&N(fe,Q,J),we.path=C(fe),Oe=null;return we}le.exports={newShapes:F,createShapeObj:k}}}),hy=U({"src/components/selections/draw_newselection/newselections.js"(pe,le){var w=m0(),R=w.selectMode,O=T1(),z=O.clearOutline,l=o_(),u=l.readPaths,c=l.writePaths,p=l.fixDatesForPaths;le.exports=function(v,h){if(v.length){var m=v[0][0];if(m){var _=m.getAttribute("d"),x=h.gd,A=x._fullLayout.newselection,E=h.plotinfo,D=E.xaxis,g=E.yaxis,C=h.isActiveSelection,I=h.dragmode,N=(x.layout||{}).selections||[];if(!R(I)&&C!==void 0){var F=x._fullLayout._activeSelectionIndex;if(F<N.length)switch(x._fullLayout.selections[F].type){case"rect":I="select";break;case"path":I="lasso";break}}var k=u(_,x,E,C),P={xref:D._id,yref:g._id,opacity:A.opacity,line:{color:A.line.color,width:A.line.width,dash:A.line.dash}},T;k.length===1&&(T=k[0]),T&&T.length===5&&I==="select"?(P.type="rect",P.x0=T[0][1],P.y0=T[0][2],P.x1=T[2][1],P.y1=T[2][2]):(P.type="path",D&&g&&p(k,D,g),P.path=c(k),T=null),z(x);for(var y=h.editHelpers,S=(y||{}).modifyItem,M=[],W=0;W<N.length;W++){var $=x._fullLayout.selections[W];if(!$){M[W]=$;continue}if(M[W]=$._input,C!==void 0&&W===x._fullLayout._activeSelectionIndex){var Z=P;switch($.type){case"rect":S("x0",Z.x0),S("x1",Z.x1),S("y0",Z.y0),S("y1",Z.y1);break;case"path":S("path",Z.path);break}}}return C===void 0?(M.push(P),M):y?y.getUpdateObj():{}}}}}}),eS=U({"src/components/shapes/constants.js"(pe,le){le.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}}}}),Nm=U({"src/components/shapes/helpers.js"(pe){var le=eS(),w=ii(),R=Yu();pe.rangeToShapePosition=function(l){return l.type==="log"?l.r2d:function(u){return u}},pe.shapePositionToRange=function(l){return l.type==="log"?l.d2r:function(u){return u}},pe.decodeDate=function(l){return function(u){return u.replace&&(u=u.replace("_"," ")),l(u)}},pe.encodeDate=function(l){return function(u){return l(u).replace(" ","_")}},pe.extractPathCoords=function(l,u,c){var p=[],f=l.match(le.segmentRE);return f.forEach(function(v){var h=u[v.charAt(0)].drawn;if(h!==void 0){var m=v.substr(1).match(le.paramRE);if(!(!m||m.length<h)){var _=m[h],x=c?_:w.cleanNumber(_);p.push(x)}}}),p},pe.getDataToPixel=function(l,u,c,p,f){var v=l._fullLayout._size,h;if(u)if(f==="domain")h=function(_){return u._length*(p?1-_:_)+u._offset};else{var m=pe.shapePositionToRange(u);h=function(_){var x=z(u,c);return u._offset+u.r2p(m(_,!0))+x},u.type==="date"&&(h=pe.decodeDate(h))}else p?h=function(_){return v.t+v.h*(1-_)}:h=function(_){return v.l+v.w*_};return h},pe.getPixelToData=function(l,u,c,p){var f=l._fullLayout._size,v;if(u)if(p==="domain")v=function(m){var _=(m-u._offset)/u._length;return c?1-_:_};else{var h=pe.rangeToShapePosition(u);v=function(m){return h(u.p2r(m-u._offset))}}else c?v=function(m){return 1-(m-f.t)/f.h}:v=function(m){return(m-f.l)/f.w};return v},pe.roundPositionForSharpStrokeRendering=function(l,u){var c=Math.round(u%2)===1,p=Math.round(l);return c?p+.5:p},pe.makeShapesOptionsAndPlotinfo=function(l,u){var c=l._fullLayout.shapes[u]||{},p=l._fullLayout._plots[c.xref+c.yref],f=!!p;return f?p._hadPlotinfo=!0:(p={},c.xref&&c.xref!=="paper"&&(p.xaxis=l._fullLayout[c.xref+"axis"]),c.yref&&c.yref!=="paper"&&(p.yaxis=l._fullLayout[c.yref+"axis"])),p.xsizemode=c.xsizemode,p.ysizemode=c.ysizemode,p.xanchor=c.xanchor,p.yanchor=c.yanchor,{options:c,plotinfo:p}},pe.makeSelectionsOptionsAndPlotinfo=function(l,u){var c=l._fullLayout.selections[u]||{},p=l._fullLayout._plots[c.xref+c.yref],f=!!p;return f?p._hadPlotinfo=!0:(p={},c.xref&&(p.xaxis=l._fullLayout[c.xref+"axis"]),c.yref&&(p.yaxis=l._fullLayout[c.yref+"axis"])),{options:c,plotinfo:p}},pe.getPathString=function(l,u){var c=u.type,p=R.getRefType(u.xref),f=R.getRefType(u.yref),v=R.getFromId(l,u.xref),h=R.getFromId(l,u.yref),m=l._fullLayout._size,_,x,A,E,D=z(v,u.x0shift),g=z(v,u.x1shift),C=z(h,u.y0shift),I=z(h,u.y1shift),N,F,k,P;if(v?p==="domain"?x=function(J){return v._offset+v._length*J}:(_=pe.shapePositionToRange(v),x=function(J){return v._offset+v.r2p(_(J,!0))}):x=function(J){return m.l+m.w*J},h?f==="domain"?E=function(J){return h._offset+h._length*(1-J)}:(A=pe.shapePositionToRange(h),E=function(J){return h._offset+h.r2p(A(J,!0))}):E=function(J){return m.t+m.h*(1-J)},c==="path")return v&&v.type==="date"&&(x=pe.decodeDate(x)),h&&h.type==="date"&&(E=pe.decodeDate(E)),O(u,x,E);if(u.xsizemode==="pixel"){var T=x(u.xanchor);N=T+u.x0+D,F=T+u.x1+g}else N=x(u.x0)+D,F=x(u.x1)+g;if(u.ysizemode==="pixel"){var y=E(u.yanchor);k=y-u.y0+C,P=y-u.y1+I}else k=E(u.y0)+C,P=E(u.y1)+I;if(c==="line")return"M"+N+","+k+"L"+F+","+P;if(c==="rect")return"M"+N+","+k+"H"+F+"V"+P+"H"+N+"Z";var S=(N+F)/2,M=(k+P)/2,W=Math.abs(S-N),$=Math.abs(M-k),Z="A"+W+","+$,K=S+W+","+M,Q=S+","+(M-$);return"M"+K+Z+" 0 1,1 "+Q+Z+" 0 0,1 "+K+"Z"};function O(l,u,c){var p=l.path,f=l.xsizemode,v=l.ysizemode,h=l.xanchor,m=l.yanchor;return p.replace(le.segmentRE,function(_){var x=0,A=_.charAt(0),E=le.paramIsX[A],D=le.paramIsY[A],g=le.numParams[A],C=_.substr(1).replace(le.paramRE,function(I){return E[x]?f==="pixel"?I=u(h)+Number(I):I=u(I):D[x]&&(v==="pixel"?I=c(m)-Number(I):I=c(I)),x++,x>g&&(I="X"),I});return x>g&&(C=C.replace(/[\s,]*X.*/,""),w.log("Ignoring extra params in segment "+_)),A+C})}function z(l,u){u=u||0;var c=0;return u&&l&&(l.type==="category"||l.type==="multicategory")&&(c=(l.r2p(1)-l.r2p(0))*u),c}}}),tS=U({"src/components/shapes/display_labels.js"(pe,le){var w=ii(),R=Yu(),O=ah(),z=ec(),l=o_().readPaths,u=Nm(),c=u.getPathString,p=Vl(),f=tg().FROM_TL;le.exports=function(_,x,A,E){if(E.selectAll(".shape-label").remove(),!!(A.label.text||A.label.texttemplate)){var D;if(A.label.texttemplate){var g={};if(A.type!=="path"){var C=R.getFromId(_,A.xref),I=R.getFromId(_,A.yref);for(var N in p){var F=p[N](A,C,I);F!==void 0&&(g[N]=F)}}D=w.texttemplateStringForShapes(A.label.texttemplate,{},_._fullLayout._d3locale,g)}else D=A.label.text;var k={"data-index":x},P=A.label.font,T={"data-notex":1},y=E.append("g").attr(k).classed("shape-label",!0),S=y.append("text").attr(T).classed("shape-label-text",!0).text(D),M,W,$,Z;if(A.path){var K=c(_,A),Q=l(K,_);M=1/0,$=1/0,W=-1/0,Z=-1/0;for(var J=0;J<Q.length;J++)for(var G=0;G<Q[J].length;G++)for(var ee=Q[J][G],re=1;re<ee.length;re+=2){var fe=ee[re],we=ee[re+1];M=Math.min(M,fe),W=Math.max(W,fe),$=Math.min($,we),Z=Math.max(Z,we)}}else{var Oe=R.getFromId(_,A.xref),ke=A.x0shift,Le=A.x1shift,oe=R.getRefType(A.xref),be=R.getFromId(_,A.yref),_e=A.y0shift,he=A.y1shift,De=R.getRefType(A.yref),xe=function(pt,Rt){var $t=u.getDataToPixel(_,Oe,Rt,!1,oe);return $t(pt)},se=function(pt,Rt){var $t=u.getDataToPixel(_,be,Rt,!0,De);return $t(pt)};M=xe(A.x0,ke),W=xe(A.x1,Le),$=se(A.y0,_e),Z=se(A.y1,he)}var Ee=A.label.textangle;Ee==="auto"&&(A.type==="line"?Ee=v(M,$,W,Z):Ee=0),S.call(function(pt){return pt.call(z.font,P).attr({}),O.convertToTspans(pt,_),pt});var Te=z.bBox(S.node()),Be=h(M,$,W,Z,A,Ee,Te),tt=Be.textx,at=Be.texty,gt=Be.xanchor;S.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[gt],y:at,x:tt,transform:"rotate("+Ee+","+tt+","+at+")"}).call(O.positionText,tt,at)}};function v(m,_,x,A){var E,D;return D=Math.abs(x-m),x>=m?E=_-A:E=A-_,-180/Math.PI*Math.atan2(E,D)}function h(m,_,x,A,E,D,g){var C=E.label.textposition,I=E.label.textangle,N=E.label.padding,F=E.type,k=Math.PI/180*D,P=Math.sin(k),T=Math.cos(k),y=E.label.xanchor,S=E.label.yanchor,M,W,$,Z;if(F==="line"){C==="start"?(M=m,W=_):C==="end"?(M=x,W=A):(M=(m+x)/2,W=(_+A)/2),y==="auto"&&(C==="start"?I==="auto"?x>m?y="left":x<m?y="right":y="center":x>m?y="right":x<m?y="left":y="center":C==="end"?I==="auto"?x>m?y="right":x<m?y="left":y="center":x>m?y="left":x<m?y="right":y="center":y="center");var K={left:1,center:0,right:-1},Q={bottom:-1,middle:0,top:1};if(I==="auto"){var J=Q[S];$=-N*P*J,Z=N*T*J}else{var G=K[y],ee=Q[S];$=N*G,Z=N*ee}M=M+$,W=W+Z}else $=N+3,C.indexOf("right")!==-1?(M=Math.max(m,x)-$,y==="auto"&&(y="right")):C.indexOf("left")!==-1?(M=Math.min(m,x)+$,y==="auto"&&(y="left")):(M=(m+x)/2,y==="auto"&&(y="center")),C.indexOf("top")!==-1?W=Math.min(_,A):C.indexOf("bottom")!==-1?W=Math.max(_,A):W=(_+A)/2,Z=N,S==="bottom"?W=W-Z:S==="top"&&(W=W+Z);var re=f[S],fe=E.label.font.size,we=g.height,Oe=(we*re-fe)*P,ke=-(we*re-fe)*T;return{textx:M+Oe,texty:W+ke,xanchor:y}}}}),X_=U({"src/components/shapes/display_outlines.js"(pe,le){var w=ii(),R=w.strTranslate,O=Vp(),z=m0(),l=z.drawMode,u=z.selectMode,c=Mi(),p=Lr(),f=sT(),v=f.i000,h=f.i090,m=f.i180,_=f.i270,x=T1(),A=x.clearOutlineControllers,E=o_(),D=E.pointsOnRectangle,g=E.pointsOnEllipse,C=E.writePaths,I=AE().newShapes,N=AE().createShapeObj,F=hy(),k=tS();le.exports=function S(M,W,$,Z){Z||(Z=0);var K=$.gd;function Q(){S(M,W,$,Z++),(g(M[0])||$.hasText)&&J({redrawing:!0})}function J(Ht){var Ft={};$.isActiveShape!==void 0&&($.isActiveShape=!1,Ft=I(W,$)),$.isActiveSelection!==void 0&&($.isActiveSelection=!1,Ft=F(W,$),K._fullLayout._reselect=!0),Object.keys(Ft).length&&c.call((Ht||{}).redrawing?"relayout":"_guiRelayout",K,Ft)}var G=K._fullLayout,ee=G._zoomlayer,re=$.dragmode,fe=l(re),we=u(re);(fe||we)&&(K._fullLayout._outlining=!0),A(K),W.attr("d",C(M));var Oe,ke,Le,oe,be;if(!Z&&($.isActiveShape||$.isActiveSelection)){be=P([],M);var _e=ee.append("g").attr("class","outline-controllers");tt(_e),Wt()}if(fe&&$.hasText){var he=ee.select(".label-temp"),De=N(W,$,$.dragmode);k(K,"label-temp",De,he)}function xe(Ht){Le=+Ht.srcElement.getAttribute("data-i"),oe=+Ht.srcElement.getAttribute("data-j"),Oe[Le][oe].moveFn=se}function se(Ht,Ft){if(M.length){var st=be[Le][oe][1],rt=be[Le][oe][2],Ue=M[Le],xt=Ue.length;if(D(Ue)){var Gt=Ht,Jt=Ft;if($.isActiveSelection){var Ut=T(Ue,oe);Ut[1]===Ue[oe][1]?Jt=0:Gt=0}for(var kr=0;kr<xt;kr++)if(kr!==oe){var Pr=Ue[kr];Pr[1]===Ue[oe][1]&&(Pr[1]=st+Gt),Pr[2]===Ue[oe][2]&&(Pr[2]=rt+Jt)}if(Ue[oe][1]=st+Gt,Ue[oe][2]=rt+Jt,!D(Ue))for(var $r=0;$r<xt;$r++)for(var rn=0;rn<Ue[$r].length;rn++)Ue[$r][rn]=be[Le][$r][rn]}else Ue[oe][1]=st+Ht,Ue[oe][2]=rt+Ft;Q()}}function Ee(){J()}function Te(){if(M.length&&M[Le]&&M[Le].length){for(var Ht=[],Ft=0;Ft<M[Le].length;Ft++)Ft!==oe&&Ht.push(M[Le][Ft]);Ht.length>1&&!(Ht.length===2&&Ht[1][0]==="Z")&&(oe===0&&(Ht[0][0]="M"),M[Le]=Ht,Q(),J())}}function Be(Ht,Ft){if(Ht===2){Le=+Ft.srcElement.getAttribute("data-i"),oe=+Ft.srcElement.getAttribute("data-j");var st=M[Le];!D(st)&&!g(st)&&Te()}}function tt(Ht){Oe=[];for(var Ft=0;Ft<M.length;Ft++){var st=M[Ft],rt=D(st),Ue=!rt&&g(st);Oe[Ft]=[];for(var xt=st.length,Gt=0;Gt<xt;Gt++)if(st[Gt][0]!=="Z"&&!(Ue&&Gt!==v&&Gt!==h&&Gt!==m&&Gt!==_)){var Jt=rt&&$.isActiveSelection,Ut;Jt&&(Ut=T(st,Gt));var kr=st[Gt][1],Pr=st[Gt][2],$r=Ht.append(Jt?"rect":"circle").attr("data-i",Ft).attr("data-j",Gt).style({fill:p.background,stroke:p.defaultLine,"stroke-width":1,"shape-rendering":"crispEdges"});if(Jt){var rn=Ut[1]-kr,kn=Ut[2]-Pr,Rn=kn?5:Math.max(Math.min(25,Math.abs(rn)-5),5),ci=rn?5:Math.max(Math.min(25,Math.abs(kn)-5),5);$r.classed(kn?"cursor-ew-resize":"cursor-ns-resize",!0).attr("width",Rn).attr("height",ci).attr("x",kr-Rn/2).attr("y",Pr-ci/2).attr("transform",R(rn/2,kn/2))}else $r.classed("cursor-grab",!0).attr("r",5).attr("cx",kr).attr("cy",Pr);Oe[Ft][Gt]={element:$r.node(),gd:K,prepFn:xe,doneFn:Ee,clickFn:Be},O.init(Oe[Ft][Gt])}}}function at(Ht,Ft){if(M.length)for(var st=0;st<M.length;st++)for(var rt=0;rt<M[st].length;rt++)for(var Ue=0;Ue+2<M[st][rt].length;Ue+=2)M[st][rt][Ue+1]=be[st][rt][Ue+1]+Ht,M[st][rt][Ue+2]=be[st][rt][Ue+2]+Ft}function gt(Ht,Ft){at(Ht,Ft),Q()}function pt(Ht){Le=+Ht.srcElement.getAttribute("data-i"),Le||(Le=0),ke[Le].moveFn=gt}function Rt(){J()}function $t(Ht){Ht===2&&y(K)}function Wt(){if(ke=[],!!M.length){var Ht=0;ke[Ht]={element:W[0][0],gd:K,prepFn:pt,doneFn:Rt,clickFn:$t},O.init(ke[Ht])}}};function P(S,M){for(var W=0;W<M.length;W++){var $=M[W];S[W]=[];for(var Z=0;Z<$.length;Z++){S[W][Z]=[];for(var K=0;K<$[Z].length;K++)S[W][Z][K]=$[Z][K]}}return S}function T(S,M){var W=S[M][1],$=S[M][2],Z=S.length,K,Q,J;return K=(M+1)%Z,Q=S[K][1],J=S[K][2],Q===W&&J===$&&(K=(M+2)%Z,Q=S[K][1],J=S[K][2]),[K,Q,J]}function y(S){if(u(S._fullLayout.dragmode)){A(S);var M=S._fullLayout._activeSelectionIndex,W=(S.layout||{}).selections||[];if(M<W.length){for(var $=[],Z=0;Z<W.length;Z++)Z!==M&&$.push(W[Z]);delete S._fullLayout._activeSelectionIndex;var K=S._fullLayout.selections[M];S._fullLayout._deselect={xref:K.xref,yref:K.yref},c.call("_guiRelayout",S,{selections:$})}}}}}),dM=U({"src/components/shapes/draw.js"(pe,le){var w=Ze(),R=Mi(),O=ii(),z=Yu(),l=o_().readPaths,u=X_(),c=tS(),p=T1().clearOutlineControllers,f=Lr(),v=ec(),h=Tc().arrayEditor,m=Vp(),_=i_(),x=eS(),A=Nm(),E=A.getPathString;le.exports={draw:D,drawOne:I,eraseActiveShape:y,drawLabel:c};function D(S){var M=S._fullLayout;M._shapeUpperLayer.selectAll("path").remove(),M._shapeLowerLayer.selectAll("path").remove(),M._shapeUpperLayer.selectAll("text").remove(),M._shapeLowerLayer.selectAll("text").remove();for(var W in M._plots){var $=M._plots[W].shapelayer;$&&($.selectAll("path").remove(),$.selectAll("text").remove())}for(var Z=0;Z<M.shapes.length;Z++)M.shapes[Z].visible===!0&&I(S,Z)}function g(S){return!!S._fullLayout._outlining}function C(S){return!S._context.edits.shapePosition}function I(S,M){S._fullLayout._paperdiv.selectAll('.shapelayer [data-index="'+M+'"]').remove();var W=A.makeShapesOptionsAndPlotinfo(S,M),$=W.options,Z=W.plotinfo;if(!$._input||$.visible!==!0)return;if($.layer==="above")Q(S._fullLayout._shapeUpperLayer);else if($.xref==="paper"||$.yref==="paper")Q(S._fullLayout._shapeLowerLayer);else if($.layer==="between")Q(Z.shapelayerBetween);else if(Z._hadPlotinfo){var K=Z.mainplotinfo||Z;Q(K.shapelayer)}else Q(S._fullLayout._shapeLowerLayer);function Q(J){var G=E(S,$),ee={"data-index":M,"fill-rule":$.fillrule,d:G},re=$.opacity,fe=$.fillcolor,we=$.line.width?$.line.color:"rgba(0,0,0,0)",Oe=$.line.width,ke=$.line.dash;!Oe&&$.editable===!0&&(Oe=5,ke="solid");var Le=G[G.length-1]!=="Z",oe=C(S)&&$.editable&&S._fullLayout._activeShapeIndex===M;oe&&(fe=Le?"rgba(0,0,0,0)":S._fullLayout.activeshape.fillcolor,re=S._fullLayout.activeshape.opacity);var be=J.append("g").classed("shape-group",!0).attr({"data-index":M}),_e=be.append("path").attr(ee).style("opacity",re).call(f.stroke,we).call(f.fill,fe).call(v.dashLine,ke,Oe);N(be,S,$),c(S,M,$,be);var he;if((oe||S._context.edits.shapePosition)&&(he=h(S.layout,"shapes",$)),oe){_e.style({cursor:"move"});var De={element:_e.node(),plotinfo:Z,gd:S,editHelpers:he,hasText:$.label.text||$.label.texttemplate,isActiveShape:!0},xe=l(G,S);u(xe,_e,De)}else S._context.edits.shapePosition?F(S,_e,$,M,J,he):$.editable===!0&&_e.style("pointer-events",Le||f.opacity(fe)*re<=.5?"stroke":"all");_e.node().addEventListener("click",function(){return P(S,_e)})}}function N(S,M,W){var $=(W.xref+W.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");v.setClipUrl(S,$?"clip"+M._fullLayout._uid+$:null,M)}function F(S,M,W,$,Z,K){var Q=10,J=10,G=W.xsizemode==="pixel",ee=W.ysizemode==="pixel",re=W.type==="line",fe=W.type==="path",we=K.modifyItem,Oe,ke,Le,oe,be,_e,he,De,xe,se,Ee,Te,Be,tt,at,gt=w.select(M.node().parentNode),pt=z.getFromId(S,W.xref),Rt=z.getRefType(W.xref),$t=z.getFromId(S,W.yref),Wt=z.getRefType(W.yref),Ht=W.x0shift,Ft=W.x1shift,st=W.y0shift,rt=W.y1shift,Ue=function(je,Ye){var et=A.getDataToPixel(S,pt,Ye,!1,Rt);return et(je)},xt=function(je,Ye){var et=A.getDataToPixel(S,$t,Ye,!0,Wt);return et(je)},Gt=A.getPixelToData(S,pt,!1,Rt),Jt=A.getPixelToData(S,$t,!0,Wt),Ut=$r(),kr={element:Ut.node(),gd:S,prepFn:Rn,doneFn:ci,clickFn:In},Pr;m.init(kr),Ut.node().onmousemove=kn;function $r(){return re?rn():M}function rn(){var je=10,Ye=Math.max(W.line.width,je),et=Z.append("g").attr("data-index",$).attr("drag-helper",!0);et.append("path").attr("d",M.attr("d")).style({cursor:"move","stroke-width":Ye,"stroke-opacity":"0"});var mt={"fill-opacity":"0"},Nt=Math.max(Ye/2,je);return et.append("circle").attr({"data-line-point":"start-point",cx:G?Ue(W.xanchor)+W.x0:Ue(W.x0,Ht),cy:ee?xt(W.yanchor)-W.y0:xt(W.y0,st),r:Nt}).style(mt).classed("cursor-grab",!0),et.append("circle").attr({"data-line-point":"end-point",cx:G?Ue(W.xanchor)+W.x1:Ue(W.x1,Ft),cy:ee?xt(W.yanchor)-W.y1:xt(W.y1,rt),r:Nt}).style(mt).classed("cursor-grab",!0),et}function kn(je){if(g(S)){Pr=null;return}if(re)je.target.tagName==="path"?Pr="move":Pr=je.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var Ye=kr.element.getBoundingClientRect(),et=Ye.right-Ye.left,mt=Ye.bottom-Ye.top,Nt=je.clientX-Ye.left,lr=je.clientY-Ye.top,br=!fe&&et>Q&&mt>J&&!je.shiftKey?m.getCursor(Nt/et,1-lr/mt):"move";_(M,br),Pr=br.split("-")[0]}}function Rn(je){g(S)||(G&&(be=Ue(W.xanchor)),ee&&(_e=xt(W.yanchor)),W.type==="path"?at=W.path:(Oe=G?W.x0:Ue(W.x0),ke=ee?W.y0:xt(W.y0),Le=G?W.x1:Ue(W.x1),oe=ee?W.y1:xt(W.y1)),Oe<Le?(xe=Oe,Be="x0",se=Le,tt="x1"):(xe=Le,Be="x1",se=Oe,tt="x0"),!ee&&ke<oe||ee&&ke>oe?(he=ke,Ee="y0",De=oe,Te="y1"):(he=oe,Ee="y1",De=ke,Te="y0"),kn(je),St(Z,W),Et(M,W,S),kr.moveFn=Pr==="move"?Gn:mr,kr.altKey=je.altKey)}function ci(){g(S)||(_(M),Ot(Z),N(M,S,W),R.call("_guiRelayout",S,K.getUpdateObj()))}function In(){g(S)||Ot(Z)}function Gn(je,Ye){if(W.type==="path"){var et=function(lr){return lr},mt=et,Nt=et;G?we("xanchor",W.xanchor=Gt(be+je)):(mt=function(br){return Gt(Ue(br)+je)},pt&&pt.type==="date"&&(mt=A.encodeDate(mt))),ee?we("yanchor",W.yanchor=Jt(_e+Ye)):(Nt=function(br){return Jt(xt(br)+Ye)},$t&&$t.type==="date"&&(Nt=A.encodeDate(Nt))),we("path",W.path=k(at,mt,Nt))}else G?we("xanchor",W.xanchor=Gt(be+je)):(we("x0",W.x0=Gt(Oe+je)),we("x1",W.x1=Gt(Le+je))),ee?we("yanchor",W.yanchor=Jt(_e+Ye)):(we("y0",W.y0=Jt(ke+Ye)),we("y1",W.y1=Jt(oe+Ye)));M.attr("d",E(S,W)),St(Z,W),c(S,$,W,gt)}function mr(je,Ye){if(fe){var et=function(Sa){return Sa},mt=et,Nt=et;G?we("xanchor",W.xanchor=Gt(be+je)):(mt=function(no){return Gt(Ue(no)+je)},pt&&pt.type==="date"&&(mt=A.encodeDate(mt))),ee?we("yanchor",W.yanchor=Jt(_e+Ye)):(Nt=function(no){return Jt(xt(no)+Ye)},$t&&$t.type==="date"&&(Nt=A.encodeDate(Nt))),we("path",W.path=k(at,mt,Nt))}else if(re){if(Pr==="resize-over-start-point"){var lr=Oe+je,br=ee?ke-Ye:ke+Ye;we("x0",W.x0=G?lr:Gt(lr)),we("y0",W.y0=ee?br:Jt(br))}else if(Pr==="resize-over-end-point"){var Or=Le+je,tn=ee?oe-Ye:oe+Ye;we("x1",W.x1=G?Or:Gt(Or)),we("y1",W.y1=ee?tn:Jt(tn))}}else{var Jr=function(Sa){return Pr.indexOf(Sa)!==-1},dn=Jr("n"),on=Jr("s"),Nn=Jr("w"),Wi=Jr("e"),Oa=dn?he+Ye:he,Da=on?De+Ye:De,Aa=Nn?xe+je:xe,Ka=Wi?se+je:se;ee&&(dn&&(Oa=he-Ye),on&&(Da=De-Ye)),(!ee&&Da-Oa>J||ee&&Oa-Da>J)&&(we(Ee,W[Ee]=ee?Oa:Jt(Oa)),we(Te,W[Te]=ee?Da:Jt(Da))),Ka-Aa>Q&&(we(Be,W[Be]=G?Aa:Gt(Aa)),we(tt,W[tt]=G?Ka:Gt(Ka)))}M.attr("d",E(S,W)),St(Z,W),c(S,$,W,gt)}function St(je,Ye){(G||ee)&&et();function et(){var mt=Ye.type!=="path",Nt=je.selectAll(".visual-cue").data([0]),lr=1;Nt.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":lr}).classed("visual-cue",!0);var br=Ue(G?Ye.xanchor:O.midRange(mt?[Ye.x0,Ye.x1]:A.extractPathCoords(Ye.path,x.paramIsX))),Or=xt(ee?Ye.yanchor:O.midRange(mt?[Ye.y0,Ye.y1]:A.extractPathCoords(Ye.path,x.paramIsY)));if(br=A.roundPositionForSharpStrokeRendering(br,lr),Or=A.roundPositionForSharpStrokeRendering(Or,lr),G&&ee){var tn="M"+(br-1-lr)+","+(Or-1-lr)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";Nt.attr("d",tn)}else if(G){var Jr="M"+(br-1-lr)+","+(Or-9-lr)+"v18 h2 v-18 Z";Nt.attr("d",Jr)}else{var dn="M"+(br-9-lr)+","+(Or-1-lr)+"h18 v2 h-18 Z";Nt.attr("d",dn)}}}function Ot(je){je.selectAll(".visual-cue").remove()}function Et(je,Ye,et){var mt=Ye.xref,Nt=Ye.yref,lr=z.getFromId(et,mt),br=z.getFromId(et,Nt),Or="";mt!=="paper"&&!lr.autorange&&(Or+=mt),Nt!=="paper"&&!br.autorange&&(Or+=Nt),v.setClipUrl(je,Or?"clip"+et._fullLayout._uid+Or:null,et)}}function k(S,M,W){return S.replace(x.segmentRE,function($){var Z=0,K=$.charAt(0),Q=x.paramIsX[K],J=x.paramIsY[K],G=x.numParams[K],ee=$.substr(1).replace(x.paramRE,function(re){return Z>=G||(Q[Z]?re=M(re):J[Z]&&(re=W(re)),Z++),re});return K+ee})}function P(S,M){if(C(S)){var W=M.node(),$=+W.getAttribute("data-index");if($>=0){if($===S._fullLayout._activeShapeIndex){T(S);return}S._fullLayout._activeShapeIndex=$,S._fullLayout._deactivateShape=T,D(S)}}}function T(S){if(C(S)){var M=S._fullLayout._activeShapeIndex;M>=0&&(p(S),delete S._fullLayout._activeShapeIndex,D(S))}}function y(S){if(C(S)){p(S);var M=S._fullLayout._activeShapeIndex,W=(S.layout||{}).shapes||[];if(M<W.length){for(var $=[],Z=0;Z<W.length;Z++)Z!==M&&$.push(W[Z]);return delete S._fullLayout._activeShapeIndex,R.call("_guiRelayout",S,{shapes:$})}}}}}),CE=U({"src/components/modebar/buttons.js"(pe,le){var w=Mi(),R=tp(),O=Tf(),z=oT(),l=dM().eraseActiveShape,u=ii(),c=u._,p=le.exports={};p.toImage={name:"toImage",title:function(F){var k=F._context.toImageButtonOptions||{},P=k.format||"png";return P==="png"?c(F,"Download plot as a PNG"):c(F,"Download plot")},icon:z.camera,click:function(F){var k=F._context.toImageButtonOptions,P={format:k.format||"png"};u.notifier(c(F,"Taking snapshot - this may take a few seconds"),"long"),["filename","width","height","scale"].forEach(function(T){T in k&&(P[T]=k[T])}),w.call("downloadImage",F,P).then(function(T){u.notifier(c(F,"Snapshot succeeded")+" - "+T,"long")}).catch(function(){u.notifier(c(F,"Sorry, there was a problem downloading your snapshot!"),"long")})}},p.sendDataToCloud={name:"sendDataToCloud",title:function(F){return c(F,"Edit in Chart Studio")},icon:z.disk,click:function(F){R.sendDataToCloud(F)}},p.editInChartStudio={name:"editInChartStudio",title:function(F){return c(F,"Edit in Chart Studio")},icon:z.pencil,click:function(F){R.sendDataToCloud(F)}},p.zoom2d={name:"zoom2d",_cat:"zoom",title:function(F){return c(F,"Zoom")},attr:"dragmode",val:"zoom",icon:z.zoombox,click:f},p.pan2d={name:"pan2d",_cat:"pan",title:function(F){return c(F,"Pan")},attr:"dragmode",val:"pan",icon:z.pan,click:f},p.select2d={name:"select2d",_cat:"select",title:function(F){return c(F,"Box Select")},attr:"dragmode",val:"select",icon:z.selectbox,click:f},p.lasso2d={name:"lasso2d",_cat:"lasso",title:function(F){return c(F,"Lasso Select")},attr:"dragmode",val:"lasso",icon:z.lasso,click:f},p.drawclosedpath={name:"drawclosedpath",title:function(F){return c(F,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:z.drawclosedpath,click:f},p.drawopenpath={name:"drawopenpath",title:function(F){return c(F,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:z.drawopenpath,click:f},p.drawline={name:"drawline",title:function(F){return c(F,"Draw line")},attr:"dragmode",val:"drawline",icon:z.drawline,click:f},p.drawrect={name:"drawrect",title:function(F){return c(F,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:z.drawrect,click:f},p.drawcircle={name:"drawcircle",title:function(F){return c(F,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:z.drawcircle,click:f},p.eraseshape={name:"eraseshape",title:function(F){return c(F,"Erase active shape")},icon:z.eraseshape,click:l},p.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(F){return c(F,"Zoom in")},attr:"zoom",val:"in",icon:z.zoom_plus,click:f},p.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(F){return c(F,"Zoom out")},attr:"zoom",val:"out",icon:z.zoom_minus,click:f},p.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(F){return c(F,"Autoscale")},attr:"zoom",val:"auto",icon:z.autoscale,click:f},p.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(F){return c(F,"Reset axes")},attr:"zoom",val:"reset",icon:z.home,click:f},p.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(F){return c(F,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:z.tooltip_basic,gravity:"ne",click:f},p.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(F){return c(F,"Compare data on hover")},attr:"hovermode",val:function(F){return F._fullLayout._isHoriz?"y":"x"},icon:z.tooltip_compare,gravity:"ne",click:f};function f(F,k){var P=k.currentTarget,T=P.getAttribute("data-attr"),y=P.getAttribute("data-val")||!0,S=F._fullLayout,M={},W=O.list(F,null,!0),$=S._cartesianSpikesEnabled,Z,K;if(T==="zoom"){var Q=y==="in"?.5:2,J=(1+Q)/2,G=(1-Q)/2,ee,re;for(K=0;K<W.length;K++)if(Z=W[K],re=Z.modebardisable==="none"||Z.modebardisable.indexOf(y==="auto"||y==="reset"?"autoscale":"zoominout")===-1,re&&!Z.fixedrange)if(ee=Z._name,y==="auto")M[ee+".autorange"]=!0;else if(y==="reset")Z._rangeInitial0===void 0&&Z._rangeInitial1===void 0?M[ee+".autorange"]=!0:Z._rangeInitial0===void 0?(M[ee+".autorange"]=Z._autorangeInitial,M[ee+".range"]=[null,Z._rangeInitial1]):Z._rangeInitial1===void 0?(M[ee+".range"]=[Z._rangeInitial0,null],M[ee+".autorange"]=Z._autorangeInitial):M[ee+".range"]=[Z._rangeInitial0,Z._rangeInitial1],Z._showSpikeInitial!==void 0&&(M[ee+".showspikes"]=Z._showSpikeInitial,$==="on"&&!Z._showSpikeInitial&&($="off"));else{var fe=[Z.r2l(Z.range[0]),Z.r2l(Z.range[1])],we=[J*fe[0]+G*fe[1],J*fe[1]+G*fe[0]];M[ee+".range[0]"]=Z.l2r(we[0]),M[ee+".range[1]"]=Z.l2r(we[1])}}else T==="hovermode"&&(y==="x"||y==="y")&&(y=S._isHoriz?"y":"x",P.setAttribute("data-val",y)),M[T]=y;S._cartesianSpikesEnabled=$,w.call("_guiRelayout",F,M)}p.zoom3d={name:"zoom3d",_cat:"zoom",title:function(F){return c(F,"Zoom")},attr:"scene.dragmode",val:"zoom",icon:z.zoombox,click:v},p.pan3d={name:"pan3d",_cat:"pan",title:function(F){return c(F,"Pan")},attr:"scene.dragmode",val:"pan",icon:z.pan,click:v},p.orbitRotation={name:"orbitRotation",title:function(F){return c(F,"Orbital rotation")},attr:"scene.dragmode",val:"orbit",icon:z["3d_rotate"],click:v},p.tableRotation={name:"tableRotation",title:function(F){return c(F,"Turntable rotation")},attr:"scene.dragmode",val:"turntable",icon:z["z-axis"],click:v};function v(F,k){for(var P=k.currentTarget,T=P.getAttribute("data-attr"),y=P.getAttribute("data-val")||!0,S=F._fullLayout._subplots.gl3d||[],M={},W=T.split("."),$=0;$<S.length;$++)M[S[$]+"."+W[1]]=y;var Z=y==="pan"?y:"zoom";M.dragmode=Z,w.call("_guiRelayout",F,M)}p.resetCameraDefault3d={name:"resetCameraDefault3d",_cat:"resetCameraDefault",title:function(F){return c(F,"Reset camera to default")},attr:"resetDefault",icon:z.home,click:h},p.resetCameraLastSave3d={name:"resetCameraLastSave3d",_cat:"resetCameraLastSave",title:function(F){return c(F,"Reset camera to last save")},attr:"resetLastSave",icon:z.movie,click:h};function h(F,k){for(var P=k.currentTarget,T=P.getAttribute("data-attr"),y=T==="resetLastSave",S=T==="resetDefault",M=F._fullLayout,W=M._subplots.gl3d||[],$={},Z=0;Z<W.length;Z++){var K=W[Z],Q=K+".camera",J=K+".aspectratio",G=K+".aspectmode",ee=M[K]._scene,re;y?($[Q+".up"]=ee.viewInitial.up,$[Q+".eye"]=ee.viewInitial.eye,$[Q+".center"]=ee.viewInitial.center,re=!0):S&&($[Q+".up"]=null,$[Q+".eye"]=null,$[Q+".center"]=null,re=!0),re&&($[J+".x"]=ee.viewInitial.aspectratio.x,$[J+".y"]=ee.viewInitial.aspectratio.y,$[J+".z"]=ee.viewInitial.aspectratio.z,$[G]=ee.viewInitial.aspectmode)}w.call("_guiRelayout",F,$)}p.hoverClosest3d={name:"hoverClosest3d",_cat:"hoverclosest",title:function(F){return c(F,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:z.tooltip_basic,gravity:"ne",click:_};function m(F,k){var P=k.currentTarget,T=P._previousVal,y=F._fullLayout,S=y._subplots.gl3d||[],M=["xaxis","yaxis","zaxis"],W={},$={};if(T)$=T,P._previousVal=null;else{for(var Z=0;Z<S.length;Z++){var K=S[Z],Q=y[K],J=K+".hovermode";W[J]=Q.hovermode,$[J]=!1;for(var G=0;G<3;G++){var ee=M[G],re=K+"."+ee+".showspikes";$[re]=!1,W[re]=Q[ee].showspikes}}P._previousVal=W}return $}function _(F,k){var P=m(F,k);w.call("_guiRelayout",F,P)}p.zoomInGeo={name:"zoomInGeo",_cat:"zoomin",title:function(F){return c(F,"Zoom in")},attr:"zoom",val:"in",icon:z.zoom_plus,click:x},p.zoomOutGeo={name:"zoomOutGeo",_cat:"zoomout",title:function(F){return c(F,"Zoom out")},attr:"zoom",val:"out",icon:z.zoom_minus,click:x},p.resetGeo={name:"resetGeo",_cat:"reset",title:function(F){return c(F,"Reset")},attr:"reset",val:null,icon:z.autoscale,click:x},p.hoverClosestGeo={name:"hoverClosestGeo",_cat:"hoverclosest",title:function(F){return c(F,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:z.tooltip_basic,gravity:"ne",click:E};function x(F,k){for(var P=k.currentTarget,T=P.getAttribute("data-attr"),y=P.getAttribute("data-val")||!0,S=F._fullLayout,M=S._subplots.geo||[],W=0;W<M.length;W++){var $=M[W],Z=S[$];if(T==="zoom"){var K=Z.projection.scale,Q=y==="in"?2*K:.5*K;w.call("_guiRelayout",F,$+".projection.scale",Q)}}T==="reset"&&N(F,"geo")}p.hoverClosestPie={name:"hoverClosestPie",_cat:"hoverclosest",title:function(F){return c(F,"Toggle show closest data on hover")},attr:"hovermode",val:"closest",icon:z.tooltip_basic,gravity:"ne",click:E};function A(F){var k=F._fullLayout;return k.hovermode?!1:k._has("cartesian")?k._isHoriz?"y":"x":"closest"}function E(F){var k=A(F);w.call("_guiRelayout",F,"hovermode",k)}p.resetViewSankey={name:"resetSankeyGroup",title:function(F){return c(F,"Reset view")},icon:z.home,click:function(F){for(var k={"node.groups":[],"node.x":[],"node.y":[]},P=0;P<F._fullData.length;P++){var T=F._fullData[P]._viewInitial;k["node.groups"].push(T.node.groups.slice()),k["node.x"].push(T.node.x.slice()),k["node.y"].push(T.node.y.slice())}w.call("restyle",F,k)}},p.toggleHover={name:"toggleHover",title:function(F){return c(F,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:z.tooltip_basic,gravity:"ne",click:function(F,k){var P=m(F,k);P.hovermode=A(F),w.call("_guiRelayout",F,P)}},p.resetViews={name:"resetViews",title:function(F){return c(F,"Reset views")},icon:z.home,click:function(F,k){var P=k.currentTarget;P.setAttribute("data-attr","zoom"),P.setAttribute("data-val","reset"),f(F,k),P.setAttribute("data-attr","resetLastSave"),h(F,k),N(F,"geo"),N(F,"mapbox"),N(F,"map")}},p.toggleSpikelines={name:"toggleSpikelines",title:function(F){return c(F,"Toggle Spike Lines")},icon:z.spikeline,attr:"_cartesianSpikesEnabled",val:"on",click:function(F){var k=F._fullLayout,P=k._cartesianSpikesEnabled;k._cartesianSpikesEnabled=P==="on"?"off":"on",w.call("_guiRelayout",F,D(F))}};function D(F){for(var k=F._fullLayout,P=k._cartesianSpikesEnabled==="on",T=O.list(F,null,!0),y={},S=0;S<T.length;S++){var M=T[S];y[M._name+".showspikes"]=P?!0:M._showSpikeInitial}return y}p.resetViewMapbox={name:"resetViewMapbox",_cat:"resetView",title:function(F){return c(F,"Reset view")},attr:"reset",icon:z.home,click:function(F){N(F,"mapbox")}},p.resetViewMap={name:"resetViewMap",_cat:"resetView",title:function(F){return c(F,"Reset view")},attr:"reset",icon:z.home,click:function(F){N(F,"map")}},p.zoomInMapbox={name:"zoomInMapbox",_cat:"zoomin",title:function(F){return c(F,"Zoom in")},attr:"zoom",val:"in",icon:z.zoom_plus,click:g},p.zoomInMap={name:"zoomInMap",_cat:"zoomin",title:function(F){return c(F,"Zoom in")},attr:"zoom",val:"in",icon:z.zoom_plus,click:C},p.zoomOutMapbox={name:"zoomOutMapbox",_cat:"zoomout",title:function(F){return c(F,"Zoom out")},attr:"zoom",val:"out",icon:z.zoom_minus,click:g},p.zoomOutMap={name:"zoomOutMap",_cat:"zoomout",title:function(F){return c(F,"Zoom out")},attr:"zoom",val:"out",icon:z.zoom_minus,click:C};function g(F,k){I(F,k,"mapbox")}function C(F,k){I(F,k,"map")}function I(F,k,P){for(var T=k.currentTarget,y=T.getAttribute("data-val"),S=F._fullLayout,M=S._subplots[P]||[],W=1.05,$={},Z=0;Z<M.length;Z++){var K=M[Z],Q=S[K].zoom,J=y==="in"?W*Q:Q/W;$[K+".zoom"]=J}w.call("_guiRelayout",F,$)}function N(F,k){for(var P=F._fullLayout,T=P._subplots[k]||[],y={},S=0;S<T.length;S++)for(var M=T[S],W=P[M]._subplot,$=W.viewInitial,Z=Object.keys($),K=0;K<Z.length;K++){var Q=Z[K];y[M+"."+Q]=$[Q]}w.call("_guiRelayout",F,y)}}}),_A=U({"src/components/modebar/constants.js"(pe,le){var w=CE(),R=Object.keys(w),O=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],z=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(O),l=[],u=function(c){if(z.indexOf(c._cat||c.name)===-1){var p=c.name,f=(c._cat||c.name).toLowerCase();l.indexOf(p)===-1&&l.push(p),l.indexOf(f)===-1&&l.push(f)}};R.forEach(function(c){u(w[c])}),l.sort(),le.exports={DRAW_MODES:O,backButtons:z,foreButtons:l}}}),wA=U({"src/components/modebar/attributes.js"(pe,le){_A(),le.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"}}}}),hM=U({"src/components/modebar/defaults.js"(pe,le){var w=ii(),R=Lr(),O=Tc(),z=wA();le.exports=function(u,c){var p=u.modebar||{},f=O.newContainer(c,"modebar");function v(m,_){return w.coerce(p,f,z,m,_)}v("orientation"),v("bgcolor",R.addOpacity(c.paper_bgcolor,.5));var h=R.contrast(R.rgb(c.modebar.bgcolor));v("color",R.addOpacity(h,.3)),v("activecolor",R.addOpacity(h,.7)),v("uirevision",c.uirevision),v("add"),v("remove")}}}),s_=U({"src/components/modebar/modebar.js"(pe,le){var w=Ze(),R=_t(),O=ii(),z=oT(),l=Ie().version,u=new DOMParser;function c(h){this.container=h.container,this.element=document.createElement("div"),this.update(h.graphInfo,h.buttons),this.container.appendChild(this.element)}var p=c.prototype;p.update=function(h,m){this.graphInfo=h;var _=this.graphInfo._context,x=this.graphInfo._fullLayout,A="modebar-"+x._uid;this.element.setAttribute("id",A),this.element.setAttribute("role","toolbar"),this._uid=A,this.element.className="modebar modebar--custom",_.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),x.modebar.orientation==="v"&&(this.element.className+=" vertical",m=m.reverse());var E=x.modebar,D="#"+A+" .modebar-group";document.querySelectorAll(D).forEach(function(F){F.style.backgroundColor=E.bgcolor});var g=!this.hasButtons(m),C=this.hasLogo!==_.displaylogo,I=this.locale!==_.locale;if(this.locale=_.locale,(g||C||I)&&(this.removeAllButtons(),this.updateButtons(m),_.watermark||_.displaylogo)){var N=this.getLogo();_.watermark&&(N.className=N.className+" watermark"),x.modebar.orientation==="v"?this.element.insertBefore(N,this.element.childNodes[0]):this.element.appendChild(N),this.hasLogo=!0}this.updateActiveButton(),O.setStyleOnHover("#"+A+" .modebar-btn",".active",".icon path","fill: "+E.activecolor,"fill: "+E.color,this.element)},p.updateButtons=function(h){var m=this;this.buttons=h,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(_){var x=m.createGroup();_.forEach(function(A){var E=A.name;if(!E)throw new Error("must provide button 'name' in button config");if(m.buttonsNames.indexOf(E)!==-1)throw new Error("button name '"+E+"' is taken");m.buttonsNames.push(E);var D=m.createButton(A);m.buttonElements.push(D),x.appendChild(D)}),m.element.appendChild(x)})},p.createGroup=function(){var h=document.createElement("div");h.className="modebar-group";var m=this.graphInfo._fullLayout.modebar;return h.style.backgroundColor=m.bgcolor,h},p.createButton=function(h){var m=this,_=document.createElement("button");_.setAttribute("type","button"),_.setAttribute("rel","tooltip"),_.className="modebar-btn";var x=h.title;x===void 0?x=h.name:typeof x=="function"&&(x=x(this.graphInfo)),(x||x===0)&&(_.setAttribute("data-title",x),_.setAttribute("aria-label",x)),h.attr!==void 0&&_.setAttribute("data-attr",h.attr);var A=h.val;A!==void 0&&(typeof A=="function"&&(A=A(this.graphInfo)),_.setAttribute("data-val",A));var E=h.click;if(typeof E!="function")throw new Error("must provide button 'click' function in button config");_.addEventListener("click",function(g){h.click(m.graphInfo,g),m.updateActiveButton(g.currentTarget)}),_.setAttribute("data-toggle",h.toggle||!1),h.toggle&&w.select(_).classed("active",!0);var D=h.icon;return typeof D=="function"?_.appendChild(D()):_.appendChild(this.createIcon(D||z.question)),_.setAttribute("data-gravity",h.gravity||"n"),_},p.createIcon=function(h){var m=R(h.height)?Number(h.height):h.ascent-h.descent,_="http://www.w3.org/2000/svg",x;if(h.path){x=document.createElementNS(_,"svg"),x.setAttribute("viewBox",[0,0,h.width,m].join(" ")),x.setAttribute("class","icon");var A=document.createElementNS(_,"path");A.setAttribute("d",h.path),h.transform?A.setAttribute("transform",h.transform):h.ascent!==void 0&&A.setAttribute("transform","matrix(1 0 0 -1 0 "+h.ascent+")"),x.appendChild(A)}if(h.svg){var E=u.parseFromString(h.svg,"application/xml");x=E.childNodes[0]}return x.setAttribute("height","1em"),x.setAttribute("width","1em"),x},p.updateActiveButton=function(h){var m=this.graphInfo._fullLayout,_=h!==void 0?h.getAttribute("data-attr"):null;this.buttonElements.forEach(function(x){var A=x.getAttribute("data-val")||!0,E=x.getAttribute("data-attr"),D=x.getAttribute("data-toggle")==="true",g=w.select(x),C=function(F,k){var P=m.modebar,T=F.querySelector(".icon path");T&&(k||F.matches(":hover")?T.style.fill=P.activecolor:T.style.fill=P.color)};if(D){if(E===_){var I=!g.classed("active");g.classed("active",I),C(x,I)}}else{var N=E===null?E:O.nestedProperty(m,E).get();g.classed("active",N===A),C(x,N===A)}})},p.hasButtons=function(h){var m=this.buttons;if(!m||h.length!==m.length)return!1;for(var _=0;_<h.length;++_){if(h[_].length!==m[_].length)return!1;for(var x=0;x<h[_].length;x++)if(h[_][x].name!==m[_][x].name)return!1}return!0};function f(h){return h+" (v"+l+")"}p.getLogo=function(){var h=this.createGroup(),m=document.createElement("a");return m.href="https://plotly.com/",m.target="_blank",m.setAttribute("data-title",f(O._(this.graphInfo,"Produced with Plotly.js"))),m.className="modebar-btn plotlyjsicon modebar-btn--logo",m.appendChild(this.createIcon(z.newplotlylogo)),h.appendChild(m),h},p.removeAllButtons=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.hasLogo=!1},p.destroy=function(){O.removeElement(this.container.querySelector(".modebar"))};function v(h,m){var _=h._fullLayout,x=new c({graphInfo:h,container:_._modebardiv.node(),buttons:m});return _._privateplot&&w.select(x.element).append("span").classed("badge-private float--left",!0).text("PRIVATE"),x}le.exports=v}}),ME=U({"src/components/modebar/manage.js"(pe,le){var w=Tf(),R=Qd(),O=Mi(),z=v0().isUnifiedHover,l=s_(),u=CE(),c=_A().DRAW_MODES,p=ii().extendDeep;le.exports=function(E){var D=E._fullLayout,g=E._context,C=D._modeBar;if(!g.displayModeBar&&!g.watermark){C&&(C.destroy(),delete D._modeBar);return}if(!Array.isArray(g.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(g.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var I=g.modeBarButtons,N;Array.isArray(I)&&I.length?N=x(I):!g.displayModeBar&&g.watermark?N=[]:N=f(E),C?C.update(E,N):D._modeBar=l(E,N)};function f(A){var E=A._fullLayout,D=A._fullData,g=A._context;function C(se,Ee){if(typeof Ee=="string"){if(Ee.toLowerCase()===se.toLowerCase())return!0}else{var Te=Ee.name,Be=Ee._cat||Ee.name;if(Te===se||Be===se.toLowerCase())return!0}return!1}var I=E.modebar.add;typeof I=="string"&&(I=[I]);var N=E.modebar.remove;typeof N=="string"&&(N=[N]);var F=g.modeBarButtonsToAdd.concat(I.filter(function(se){for(var Ee=0;Ee<g.modeBarButtonsToRemove.length;Ee++)if(C(se,g.modeBarButtonsToRemove[Ee]))return!1;return!0})),k=g.modeBarButtonsToRemove.concat(N.filter(function(se){for(var Ee=0;Ee<g.modeBarButtonsToAdd.length;Ee++)if(C(se,g.modeBarButtonsToAdd[Ee]))return!1;return!0})),P=E._has("cartesian"),T=E._has("gl3d"),y=E._has("geo"),S=E._has("pie"),M=E._has("funnelarea"),W=E._has("ternary"),$=E._has("mapbox"),Z=E._has("map"),K=E._has("polar"),Q=E._has("smith"),J=E._has("sankey"),G=v(E),ee=z(E.hovermode),re=[];function fe(se){if(se.length){for(var Ee=[],Te=0;Te<se.length;Te++){for(var Be=se[Te],tt=u[Be],at=tt.name.toLowerCase(),gt=(tt._cat||tt.name).toLowerCase(),pt=!1,Rt=0;Rt<k.length;Rt++){var $t=k[Rt].toLowerCase();if($t===at||$t===gt){pt=!0;break}}pt||Ee.push(u[Be])}re.push(Ee)}}var we=["toImage"];g.showEditInChartStudio?we.push("editInChartStudio"):g.showSendToCloud&&we.push("sendDataToCloud"),fe(we);var Oe=[],ke=[],Le=[],oe=[];(P||S||M||W)+y+T+$+Z+K+Q>1?(ke=["toggleHover"],Le=["resetViews"]):y?(Oe=["zoomInGeo","zoomOutGeo"],ke=["hoverClosestGeo"],Le=["resetGeo"]):T?(ke=["hoverClosest3d"],Le=["resetCameraDefault3d","resetCameraLastSave3d"]):$?(Oe=["zoomInMapbox","zoomOutMapbox"],ke=["toggleHover"],Le=["resetViewMapbox"]):Z?(Oe=["zoomInMap","zoomOutMap"],ke=["toggleHover"],Le=["resetViewMap"]):S?ke=["hoverClosestPie"]:J?(ke=["hoverClosestCartesian","hoverCompareCartesian"],Le=["resetViewSankey"]):ke=["toggleHover"],P&&ke.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(m(D)||ee)&&(ke=[]),P&&!G&&(Oe=["zoomIn2d","zoomOut2d","autoScale2d"],Le[0]!=="resetViews"&&(Le=["resetScale2d"])),T?oe=["zoom3d","pan3d","orbitRotation","tableRotation"]:P&&!G||W?oe=["zoom2d","pan2d"]:$||Z||y?oe=["pan2d"]:K&&(oe=["zoom2d"]),h(D)&&oe.push("select2d","lasso2d");var be=[],_e=function(se){be.indexOf(se)===-1&&ke.indexOf(se)!==-1&&be.push(se)};if(Array.isArray(F)){for(var he=[],De=0;De<F.length;De++){var xe=F[De];typeof xe=="string"?(xe=xe.toLowerCase(),c.indexOf(xe)!==-1?(E._has("mapbox")||E._has("map")||E._has("cartesian"))&&oe.push(xe):xe==="togglespikelines"?_e("toggleSpikelines"):xe==="togglehover"?_e("toggleHover"):xe==="hovercompare"?_e("hoverCompareCartesian"):xe==="hoverclosest"?(_e("hoverClosestCartesian"),_e("hoverClosestGeo"),_e("hoverClosest3d"),_e("hoverClosestPie")):xe==="v1hovermode"&&(_e("hoverClosestCartesian"),_e("hoverCompareCartesian"),_e("hoverClosestGeo"),_e("hoverClosest3d"),_e("hoverClosestPie"))):he.push(xe)}F=he}return fe(oe),fe(Oe.concat(Le)),fe(be),_(re,F)}function v(A){for(var E=w.list({_fullLayout:A},null,!0),D=0;D<E.length;D++){var g=E[D].modebardisable;if(!E[D].fixedrange&&g!=="autoscale+zoominout"&&g!=="zoominout+autoscale")return!1}return!0}function h(A){for(var E=!1,D=0;D<A.length&&!E;D++){var g=A[D];!g._module||!g._module.selectPoints||(O.traceIs(g,"scatter-like")?(R.hasMarkers(g)||R.hasText(g))&&(E=!0):O.traceIs(g,"box-violin")?(g.boxpoints==="all"||g.points==="all")&&(E=!0):E=!0)}return E}function m(A){for(var E=0;E<A.length;E++)if(!O.traceIs(A[E],"noHover"))return!1;return!0}function _(A,E){if(E.length)if(Array.isArray(E[0]))for(var D=0;D<E.length;D++)A.push(E[D]);else A.push(E);return A}function x(A){for(var E=p([],A),D=0;D<E.length;D++)for(var g=E[D],C=0;C<g.length;C++){var I=g[C];if(typeof I=="string")if(u[I]!==void 0)E[D][C]=u[I];else throw new Error(["*modeBarButtons* configuration options","invalid button name"].join(" "))}return E}}}),mm=U({"src/components/modebar/index.js"(pe,le){le.exports={moduleType:"component",name:"modebar",layoutAttributes:wA(),supplyLayoutDefaults:hM(),manage:ME()}}}),SA=U({"src/plots/cartesian/scale_zoom.js"(pe,le){var w=tg().FROM_BL;le.exports=function(O,z,l){l===void 0&&(l=w[O.constraintoward||"center"]);var u=[O.r2l(O.range[0]),O.r2l(O.range[1])],c=u[0]+(u[1]-u[0])*l;O.range=O._input.range=[O.l2r(c+(u[0]-c)*z),O.l2r(c+(u[1]-c)*z)],O.setScale()}}}),lT=U({"src/plots/cartesian/constraints.js"(pe){var le=ii(),w=gx(),R=Tf().id2name,O=Hg(),z=SA(),l=Wy(),u=Dt().ALMOST_EQUAL,c=tg().FROM_BL;pe.handleDefaults=function(A,E,D){var g=D.axIds,C=D.axHasImage,I=E._axisConstraintGroups=[],N=E._axisMatchGroups=[],F,k,P,T,y,S,M,W;for(F=0;F<g.length;F++)T=R(g[F]),y=A[T],S=E[T],p(y,S,{axIds:g,layoutOut:E,hasImage:C[T]});function $(we,Oe){for(F=0;F<we.length;F++){k=we[F];for(P in k)E[R(P)][Oe]=k}}for($(N,"_matchGroup"),F=0;F<I.length;F++){k=I[F];for(P in k)if(S=E[R(P)],S.fixedrange){for(var Z in k){var K=R(Z);(A[K]||{}).fixedrange===!1&&le.warn("fixedrange was specified as false for axis "+K+" but was overridden because another axis in its constraint group has fixedrange true"),E[K].fixedrange=!0}break}}for(F=0;F<I.length;){k=I[F];for(P in k){S=E[R(P)],S._matchGroup&&Object.keys(S._matchGroup).length===Object.keys(k).length&&(I.splice(F,1),F--);break}F++}$(I,"_constraintGroup");var Q=["constrain","range","autorange","rangemode","rangebreaks","categoryorder","categoryarray"],J=!1,G=!1;function ee(){W=S[M],M==="rangebreaks"&&(G=S._hasDayOfWeekBreaks)}for(F=0;F<N.length;F++){k=N[F];for(var re=0;re<Q.length;re++){M=Q[re],W=null;var fe;for(P in k)if(T=R(P),y=A[T],S=E[T],M in S){if(!S.matches&&(fe=S,M in y)){ee();break}W===null&&M in y&&ee()}if(M==="range"&&W&&y.range&&y.range.length===2&&y.range[0]!==null&&y.range[1]!==null&&(J=!0),M==="autorange"&&W===null&&J&&(W=!1),W===null&&M in fe&&(W=fe[M]),W!==null)for(P in k)S=E[R(P)],S[M]=M==="range"?W.slice():W,M==="rangebreaks"&&(S._hasDayOfWeekBreaks=G,l(S,E))}}};function p(A,E,D){var g=D.axIds,C=D.layoutOut,I=D.hasImage,N=C._axisConstraintGroups,F=C._axisMatchGroups,k=E._id,P=k.charAt(0),T=((C._splomAxes||{})[P]||{})[k]||{},y=E._id,S=y.charAt(0)==="x";E._matchGroup=null,E._constraintGroup=null;function M(oe,be){return le.coerce(A,E,O,oe,be)}M("constrain",I?"domain":"range"),le.coerce(A,E,{constraintoward:{valType:"enumerated",values:S?["left","center","right"]:["bottom","middle","top"],dflt:S?"center":"middle"}},"constraintoward");var W=E.type,$,Z,K=[];for($=0;$<g.length;$++)if(Z=g[$],Z!==y){var Q=C[R(Z)];Q.type===W&&K.push(Z)}var J=v(N,y);if(J){var G=[];for($=0;$<K.length;$++)Z=K[$],J[Z]||G.push(Z);K=G}var ee=K.length,re,fe;ee&&(A.matches||T.matches)&&(re=le.coerce(A,E,{matches:{valType:"enumerated",values:K,dflt:K.indexOf(T.matches)!==-1?T.matches:void 0}},"matches"));var we=I&&!S?E.anchor:void 0;if(ee&&!re&&(A.scaleanchor||we)&&(fe=le.coerce(A,E,{scaleanchor:{valType:"enumerated",values:K.concat([!1])}},"scaleanchor",we)),re){E._matchGroup=h(F,y,re,1);var Oe=C[R(re)],ke=f(C,E)/f(C,Oe);S!==(re.charAt(0)==="x")&&(ke=(S?"x":"y")+ke),h(N,y,re,ke)}else A.matches&&g.indexOf(A.matches)!==-1&&le.warn("ignored "+E._name+'.matches: "'+A.matches+'" to avoid an infinite loop');if(fe){var Le=M("scaleratio");Le||(Le=E.scaleratio=1),h(N,y,fe,Le)}else A.scaleanchor&&g.indexOf(A.scaleanchor)!==-1&&le.warn("ignored "+E._name+'.scaleanchor: "'+A.scaleanchor+'" to avoid either an infinite loop and possibly inconsistent scaleratios, or because this axis declares a *matches* constraint.')}function f(A,E){var D=E.domain;return D||(D=A[R(E.overlaying)].domain),D[1]-D[0]}function v(A,E){for(var D=0;D<A.length;D++)if(A[D][E])return A[D];return null}function h(A,E,D,g){var C,I,N,F,k,P=v(A,E);P===null?(P={},P[E]=1,k=A.length,A.push(P)):k=A.indexOf(P);var T=Object.keys(P);for(C=0;C<A.length;C++)if(N=A[C],C!==k&&N[D]){var y=N[D];for(I=0;I<T.length;I++)F=T[I],N[F]=m(y,m(g,P[F]));A.splice(k,1);return}if(g!==1)for(I=0;I<T.length;I++){var S=T[I];P[S]=m(g,P[S])}P[D]=1}function m(A,E){var D="",g="",C,I;typeof A=="string"&&(D=A.match(/^[xy]*/)[0],C=D.length,A=+A.substr(C)),typeof E=="string"&&(g=E.match(/^[xy]*/)[0],I=g.length,E=+E.substr(I));var N=A*E;return!C&&!I?N:!C||!I||D.charAt(0)===g.charAt(0)?D+g+A*E:C===I?N:(C>I?D.substr(I):g.substr(C))+N}function _(A,E){for(var D=E._size,g=D.h/D.w,C={},I=Object.keys(A),N=0;N<I.length;N++){var F=I[N],k=A[F];if(typeof k=="string"){var P=k.match(/^[xy]*/)[0],T=P.length;k=+k.substr(T);for(var y=P.charAt(0)==="y"?g:1/g,S=0;S<T;S++)k*=y}C[F]=k}return C}pe.enforce=function(E){var D=E._fullLayout,g=D._axisConstraintGroups||[],C,I,N,F,k,P,T,y;for(C=0;C<g.length;C++){N=_(g[C],D);var S=Object.keys(N),M=1/0,W=0,$=1/0,Z={},K={},Q=!1;for(I=0;I<S.length;I++)F=S[I],K[F]=k=D[R(F)],k._inputDomain?k.domain=k._inputDomain.slice():k._inputDomain=k.domain.slice(),k._inputRange||(k._inputRange=k.range.slice()),k.setScale(),Z[F]=P=Math.abs(k._m)/N[F],M=Math.min(M,P),(k.constrain==="domain"||!k._constraintShrinkable)&&($=Math.min($,P)),delete k._constraintShrinkable,W=Math.max(W,P),k.constrain==="domain"&&(Q=!0);if(!(M>u*W&&!Q)){for(I=0;I<S.length;I++)if(F=S[I],P=Z[F],k=K[F],T=k.constrain,P!==$||T==="domain")if(y=P/$,T==="range")z(k,y);else{var J=k._inputDomain,G=(k.domain[1]-k.domain[0])/(J[1]-J[0]),ee=(k.r2l(k.range[1])-k.r2l(k.range[0]))/(k.r2l(k._inputRange[1])-k.r2l(k._inputRange[0]));if(y/=G,y*ee<1){k.domain=k._input.domain=J.slice(),z(k,y);continue}if(ee<1&&(k.range=k._input.range=k._inputRange.slice(),y*=ee),k.autorange){var re=k.r2l(k.range[0]),fe=k.r2l(k.range[1]),we=(re+fe)/2,Oe=we,ke=we,Le=Math.abs(fe-we),oe=we-Le*y*1.0001,be=we+Le*y*1.0001,_e=w.makePadFn(D,k,0),he=w.makePadFn(D,k,1);x(k,y);var De=Math.abs(k._m),xe=w.concatExtremes(E,k),se=xe.min,Ee=xe.max,Te,Be;for(Be=0;Be<se.length;Be++)Te=se[Be].val-_e(se[Be])/De,Te>oe&&Te<Oe&&(Oe=Te);for(Be=0;Be<Ee.length;Be++)Te=Ee[Be].val+he(Ee[Be])/De,Te<be&&Te>ke&&(ke=Te);var tt=(ke-Oe)/(2*Le);y/=tt,Oe=k.l2r(Oe),ke=k.l2r(ke),k.range=k._input.range=re<fe?[Oe,ke]:[ke,Oe]}x(k,y)}}}},pe.getAxisGroup=function(E,D){for(var g=E._axisMatchGroups,C=0;C<g.length;C++){var I=g[C];if(I[D])return"g"+C}return D},pe.clean=function(E,D){if(D._inputDomain){for(var g=!1,C=D._id,I=E._fullLayout._axisConstraintGroups,N=0;N<I.length;N++)if(I[N][C]){g=!0;break}(!g||D.constrain!=="domain")&&(D._input.domain=D.domain=D._inputDomain,delete D._inputDomain)}};function x(A,E){var D=A._inputDomain,g=c[A.constraintoward],C=D[0]+(D[1]-D[0])*g;A.domain=A._input.domain=[C+(D[0]-C)/E,C+(D[1]-C)/E],A.setScale()}}}),bx=U({"src/plot_api/subroutines.js"(pe){var le=Ze(),w=Mi(),R=tp(),O=ii(),z=ah(),l=jg(),u=Lr(),c=ec(),p=Nv(),f=mm(),v=Yu(),h=tg(),m=lT(),_=m.enforce,x=m.clean,A=gx().doAutoRange,E="start",D="middle",g="end",C=pf().zindexSeparator;pe.layoutStyles=function(J){return O.syncOrAsync([R.doAutoMargin,N],J)};function I(J,G,ee){for(var re=0;re<ee.length;re++){var fe=ee[re][0],we=ee[re][1];if(!(fe[0]>=J[1]||fe[1]<=J[0])&&we[0]<G[1]&&we[1]>G[0])return!0}return!1}function N(J){var G=J._fullLayout,ee=G._size,re=ee.p,fe=v.list(J,"",!0),we,Oe,ke,Le,oe,be;if(G._paperdiv.style({width:J._context.responsive&&G.autosize&&!J._context._hasZeroWidth&&!J.layout.width?"100%":G.width+"px",height:J._context.responsive&&G.autosize&&!J._context._hasZeroHeight&&!J.layout.height?"100%":G.height+"px"}).selectAll(".main-svg").call(c.setSize,G.width,G.height),J._context.setBackground(J,G.paper_bgcolor),pe.drawMainTitle(J),f.manage(J),!G._has("cartesian"))return R.previousPromises(J);function _e(Et,je,Ye){var et=Et._lw/2;if(Et._id.charAt(0)==="x"){if(je){if(Ye==="top")return je._offset-re-et}else return ee.t+ee.h*(1-(Et.position||0))+et%1;return je._offset+je._length+re+et}if(je){if(Ye==="right")return je._offset+je._length+re+et}else return ee.l+ee.w*(Et.position||0)+et%1;return je._offset-re-et}for(we=0;we<fe.length;we++){Le=fe[we];var he=Le._anchorAxis;Le._linepositions={},Le._lw=c.crispRound(J,Le.linewidth,1),Le._mainLinePosition=_e(Le,he,Le.side),Le._mainMirrorPosition=Le.mirror&&he?_e(Le,he,h.OPPOSITE_SIDE[Le.side]):null}var De=[],xe=[],se=[],Ee=u.opacity(G.paper_bgcolor)===1&&u.opacity(G.plot_bgcolor)===1&&G.paper_bgcolor===G.plot_bgcolor;for(Oe in G._plots)if(ke=G._plots[Oe],ke.mainplot)ke.bg&&ke.bg.remove(),ke.bg=void 0;else{var Te=ke.xaxis.domain,Be=ke.yaxis.domain,tt=ke.plotgroup;if(I(Te,Be,se)&&Oe.indexOf(C)===-1){var at=tt.node(),gt=ke.bg=O.ensureSingle(tt,"rect","bg");at.insertBefore(gt.node(),at.childNodes[0]),xe.push(Oe)}else tt.select("rect.bg").remove(),se.push([Te,Be]),Ee||(De.push(Oe),xe.push(Oe))}var pt=G._bgLayer.selectAll(".bg").data(De);for(pt.enter().append("rect").classed("bg",!0),pt.exit().remove(),pt.each(function(Et){G._plots[Et].bg=le.select(this)}),we=0;we<xe.length;we++)ke=G._plots[xe[we]],oe=ke.xaxis,be=ke.yaxis,ke.bg&&oe._offset!==void 0&&be._offset!==void 0&&ke.bg.call(c.setRect,oe._offset-re,be._offset-re,oe._length+2*re,be._length+2*re).call(u.fill,G.plot_bgcolor).style("stroke-width",0);if(!G._hasOnlyLargeSploms)for(Oe in G._plots){ke=G._plots[Oe],oe=ke.xaxis,be=ke.yaxis;var Rt=ke.clipId="clip"+G._uid+Oe+"plot",$t=O.ensureSingleById(G._clips,"clipPath",Rt,function(Et){Et.classed("plotclip",!0).append("rect")});ke.clipRect=$t.select("rect").attr({width:oe._length,height:be._length}),c.setTranslate(ke.plot,oe._offset,be._offset);var Wt,Ht;ke._hasClipOnAxisFalse?(Wt=null,Ht=Rt):(Wt=Rt,Ht=null),c.setClipUrl(ke.plot,Wt,J),ke.layerClipId=Ht}var Ft,st,rt,Ue,xt,Gt,Jt,Ut,kr,Pr,$r,rn,kn;function Rn(Et){return"M"+Ft+","+Et+"H"+st}function ci(Et){return"M"+oe._offset+","+Et+"h"+oe._length}function In(Et){return"M"+Et+","+Ut+"V"+Jt}function Gn(Et){return be._shift!==void 0&&(Et+=be._shift),"M"+Et+","+be._offset+"v"+be._length}function mr(Et,je,Ye){if(!Et.showline||Oe!==Et._mainSubplot)return"";if(!Et._anchorAxis)return Ye(Et._mainLinePosition);var et=je(Et._mainLinePosition);return Et.mirror&&(et+=je(Et._mainMirrorPosition)),et}for(Oe in G._plots){ke=G._plots[Oe],oe=ke.xaxis,be=ke.yaxis;var St="M0,0";F(oe,Oe)&&(xt=P(oe,"left",be,fe),Ft=oe._offset-(xt?re+xt:0),Gt=P(oe,"right",be,fe),st=oe._offset+oe._length+(Gt?re+Gt:0),rt=_e(oe,be,"bottom"),Ue=_e(oe,be,"top"),kn=!oe._anchorAxis||Oe!==oe._mainSubplot,kn&&(oe.mirror==="allticks"||oe.mirror==="all")&&(oe._linepositions[Oe]=[rt,Ue]),St=mr(oe,Rn,ci),kn&&oe.showline&&(oe.mirror==="all"||oe.mirror==="allticks")&&(St+=Rn(rt)+Rn(Ue)),ke.xlines.style("stroke-width",oe._lw+"px").call(u.stroke,oe.showline?oe.linecolor:"rgba(0,0,0,0)")),ke.xlines.attr("d",St);var Ot="M0,0";F(be,Oe)&&($r=P(be,"bottom",oe,fe),Jt=be._offset+be._length+($r?re:0),rn=P(be,"top",oe,fe),Ut=be._offset-(rn?re:0),kr=_e(be,oe,"left"),Pr=_e(be,oe,"right"),kn=!be._anchorAxis||Oe!==be._mainSubplot,kn&&(be.mirror==="allticks"||be.mirror==="all")&&(be._linepositions[Oe]=[kr,Pr]),Ot=mr(be,In,Gn),kn&&be.showline&&(be.mirror==="all"||be.mirror==="allticks")&&(Ot+=In(kr)+In(Pr)),ke.ylines.style("stroke-width",be._lw+"px").call(u.stroke,be.showline?be.linecolor:"rgba(0,0,0,0)")),ke.ylines.attr("d",Ot)}return v.makeClipPaths(J),R.previousPromises(J)}function F(J,G){return(J.ticks||J.showline)&&(G===J._mainSubplot||J.mirror==="all"||J.mirror==="allticks")}function k(J,G,ee){if(!ee.showline||!ee._lw)return!1;if(ee.mirror==="all"||ee.mirror==="allticks")return!0;var re=ee._anchorAxis;if(!re)return!1;var fe=h.FROM_BL[G];return ee.side===G?re.domain[fe]===J.domain[fe]:ee.mirror&&re.domain[1-fe]===J.domain[1-fe]}function P(J,G,ee,re){if(k(J,G,ee))return ee._lw;for(var fe=0;fe<re.length;fe++){var we=re[fe];if(we._mainAxis===ee._mainAxis&&k(J,G,we))return we._lw}return 0}pe.drawMainTitle=function(J){var G=J._fullLayout.title,ee=J._fullLayout,re=K(ee),fe=Q(ee),we=$(ee,fe),Oe=W(ee,re);if(p.draw(J,"gtitle",{propContainer:ee,propName:"title.text",subtitlePropName:"title.subtitle.text",placeholder:ee._dfltTitle.plot,subtitlePlaceholder:ee._dfltTitle.subtitle,attributes:{x:Oe,y:we,"text-anchor":re,dy:fe}}),G.text&&G.automargin){var ke=le.select(J).selectAll(".gtitle"),Le=c.bBox(le.select(J).selectAll(".g-gtitle").node()).height,oe=S(J,G,Le);if(oe>0){M(J,we,oe,Le),ke.attr({x:Oe,y:we,"text-anchor":re,dy:Z(G.yanchor)}).call(z.positionText,Oe,we);var be=(G.text.match(z.BR_TAG_ALL)||[]).length;if(be){var _e=h.LINE_SPACING*be+h.MID_SHIFT;G.y===0&&(_e=-_e),ke.selectAll(".line").each(function(){var Ee=+this.getAttribute("dy").slice(0,-2)-_e+"em";this.setAttribute("dy",Ee)})}var he=le.select(J).selectAll(".gtitle-subtitle");if(he.node()){var De=ke.node().getBBox(),xe=De.y+De.height,se=xe+p.SUBTITLE_PADDING_EM*G.subtitle.font.size;he.attr({x:Oe,y:se,"text-anchor":re,dy:Z(G.yanchor)}).call(z.positionText,Oe,se)}}}};function T(J,G,ee,re,fe){var we=G.yref==="paper"?J._fullLayout._size.h:J._fullLayout.height,Oe=O.isTopAnchor(G)?re:re-fe,ke=ee==="b"?we-Oe:Oe;return O.isTopAnchor(G)&&ee==="t"||O.isBottomAnchor(G)&&ee==="b"?!1:ke<fe}function y(J,G,ee,re,fe){var we=0;return ee==="middle"&&(we+=fe/2),J==="t"?(ee==="top"&&(we+=fe),we+=re-G*re):(ee==="bottom"&&(we+=fe),we+=G*re),we}function S(J,G,ee){var re=G.y,fe=G.yanchor,we=re>.5?"t":"b",Oe=J._fullLayout.margin[we],ke=0;return G.yref==="paper"?ke=ee+G.pad.t+G.pad.b:G.yref==="container"&&(ke=y(we,re,fe,J._fullLayout.height,ee)+G.pad.t+G.pad.b),ke>Oe?ke:0}function M(J,G,ee,re){var fe="title.automargin",we=J._fullLayout.title,Oe=we.y>.5?"t":"b",ke={x:we.x,y:we.y,t:0,b:0},Le={};we.yref==="paper"&&T(J,we,Oe,G,re)?ke[Oe]=ee:we.yref==="container"&&(Le[Oe]=ee,J._fullLayout._reservedMargin[fe]=Le),R.allowAutoMargin(J,fe),R.autoMargin(J,fe,ke)}function W(J,G){var ee=J.title,re=J._size,fe=0;switch(G===E?fe=ee.pad.l:G===g&&(fe=-ee.pad.r),ee.xref){case"paper":return re.l+re.w*ee.x+fe;case"container":default:return J.width*ee.x+fe}}function $(J,G){var ee=J.title,re=J._size,fe=0;if(G==="0em"||!G?fe=-ee.pad.b:G===h.CAP_SHIFT+"em"&&(fe=ee.pad.t),ee.y==="auto")return re.t/2;switch(ee.yref){case"paper":return re.t+re.h-re.h*ee.y+fe;case"container":default:return J.height-J.height*ee.y+fe}}function Z(J){return J==="top"?h.CAP_SHIFT+.3+"em":J==="bottom"?"-0.3em":h.MID_SHIFT+"em"}function K(J){var G=J.title,ee=D;return O.isRightAnchor(G)?ee=g:O.isLeftAnchor(G)&&(ee=E),ee}function Q(J){var G=J.title,ee="0em";return O.isTopAnchor(G)?ee=h.CAP_SHIFT+"em":O.isMiddleAnchor(G)&&(ee=h.MID_SHIFT+"em"),ee}pe.doTraceStyle=function(J){var G=J.calcdata,ee=[],re;for(re=0;re<G.length;re++){var fe=G[re],we=fe[0]||{},Oe=we.trace||{},ke=Oe._module||{},Le=ke.arraysToCalcdata;Le&&Le(fe,Oe);var oe=ke.editStyle;oe&&ee.push({fn:oe,cd0:we})}if(ee.length){for(re=0;re<ee.length;re++){var be=ee[re];be.fn(J,be.cd0)}l(J),pe.redrawReglTraces(J)}return R.style(J),w.getComponentMethod("legend","draw")(J),R.previousPromises(J)},pe.doColorBars=function(J){return w.getComponentMethod("colorbar","draw")(J),R.previousPromises(J)},pe.layoutReplot=function(J){var G=J.layout;return J.layout=void 0,w.call("_doPlot",J,"",G)},pe.doLegend=function(J){return w.getComponentMethod("legend","draw")(J),R.previousPromises(J)},pe.doTicksRelayout=function(J){return v.draw(J,"redraw"),J._fullLayout._hasOnlyLargeSploms&&(w.subplotsRegistry.splom.updateGrid(J),l(J),pe.redrawReglTraces(J)),pe.drawMainTitle(J),R.previousPromises(J)},pe.doModeBar=function(J){var G=J._fullLayout;f.manage(J);for(var ee=0;ee<G._basePlotModules.length;ee++){var re=G._basePlotModules[ee].updateFx;re&&re(J)}return R.previousPromises(J)},pe.doCamera=function(J){for(var G=J._fullLayout,ee=G._subplots.gl3d,re=0;re<ee.length;re++){var fe=G[ee[re]],we=fe._scene;we.setViewport(fe)}},pe.drawData=function(J){var G=J._fullLayout;l(J);for(var ee=G._basePlotModules,re=0;re<ee.length;re++)ee[re].plot(J);return pe.redrawReglTraces(J),R.style(J),w.getComponentMethod("selections","draw")(J),w.getComponentMethod("shapes","draw")(J),w.getComponentMethod("annotations","draw")(J),w.getComponentMethod("images","draw")(J),G._replotting=!1,R.previousPromises(J)},pe.redrawReglTraces=function(J){var G=J._fullLayout;if(G._has("regl")){var ee=J._fullData,re=[],fe=[],we,Oe;for(G._hasOnlyLargeSploms&&G._splomGrid.draw(),we=0;we<ee.length;we++){var ke=ee[we];ke.visible===!0&&ke._length!==0&&(ke.type==="splom"?G._splomScenes[ke.uid].draw():ke.type==="scattergl"?O.pushUnique(re,ke.xaxis+ke.yaxis):ke.type==="scatterpolargl"&&O.pushUnique(fe,ke.subplot))}for(we=0;we<re.length;we++)Oe=G._plots[re[we]],Oe._scene&&Oe._scene.draw();for(we=0;we<fe.length;we++)Oe=G[fe[we]]._subplot,Oe._scene&&Oe._scene.draw()}},pe.doAutoRangeAndConstraints=function(J){for(var G=v.list(J,"",!0),ee,re={},fe=0;fe<G.length;fe++)if(ee=G[fe],!re[ee._id]){re[ee._id]=1,x(J,ee),A(J,ee);var we=ee._matchGroup;if(we)for(var Oe in we){var ke=v.getFromId(J,Oe);A(J,ke,ee.range),re[Oe]=1}}_(J)},pe.finalDraw=function(J){w.getComponentMethod("rangeslider","draw")(J),w.getComponentMethod("rangeselector","draw")(J)},pe.drawMarginPushers=function(J){w.getComponentMethod("legend","draw")(J),w.getComponentMethod("rangeselector","draw")(J),w.getComponentMethod("sliders","draw")(J),w.getComponentMethod("updatemenus","draw")(J),w.getComponentMethod("colorbar","draw")(J)}}}),Zw=U({"src/components/selections/draw.js"(pe,le){var w=o_().readPaths,R=X_(),O=T1().clearOutlineControllers,z=Lr(),l=ec(),u=Tc().arrayEditor,c=Nm(),p=c.getPathString;le.exports={draw:f,drawOne:h,activateLastSelection:x};function f(E){var D=E._fullLayout;O(E),D._selectionLayer.selectAll("path").remove();for(var g in D._plots){var C=D._plots[g].selectionLayer;C&&C.selectAll("path").remove()}for(var I=0;I<D.selections.length;I++)h(E,I)}function v(E){return E._context.editSelection}function h(E,D){E._fullLayout._paperdiv.selectAll('.selectionlayer [data-index="'+D+'"]').remove();var g=c.makeSelectionsOptionsAndPlotinfo(E,D),C=g.options,I=g.plotinfo;if(!C._input)return;N(E._fullLayout._selectionLayer);function N(F){var k=p(E,C),P={"data-index":D,"fill-rule":"evenodd",d:k},T=C.opacity,y="rgba(0,0,0,0)",S=C.line.color||z.contrast(E._fullLayout.plot_bgcolor),M=C.line.width,W=C.line.dash;M||(M=5,W="solid");var $=v(E)&&E._fullLayout._activeSelectionIndex===D;$&&(y=E._fullLayout.activeselection.fillcolor,T=E._fullLayout.activeselection.opacity);for(var Z=[],K=1;K>=0;K--){var Q=F.append("path").attr(P).style("opacity",K?.1:T).call(z.stroke,S).call(z.fill,y).call(l.dashLine,K?"solid":W,K?4+M:M);if(m(Q,E,C),$){var J=u(E.layout,"selections",C);Q.style({cursor:"move"});var G={element:Q.node(),plotinfo:I,gd:E,editHelpers:J,isActiveSelection:!0},ee=w(k,E);R(ee,Q,G)}else Q.style("pointer-events",K?"all":"none");Z[K]=Q}var re=Z[0],fe=Z[1];fe.node().addEventListener("click",function(){return _(E,re)})}}function m(E,D,g){var C=g.xref+g.yref;l.setClipUrl(E,"clip"+D._fullLayout._uid+C,D)}function _(E,D){if(v(E)){var g=D.node(),C=+g.getAttribute("data-index");if(C>=0){if(C===E._fullLayout._activeSelectionIndex){A(E);return}E._fullLayout._activeSelectionIndex=C,E._fullLayout._deactivateSelection=A,f(E)}}}function x(E){if(v(E)){var D=E._fullLayout.selections.length-1;E._fullLayout._activeSelectionIndex=D,E._fullLayout._deactivateSelection=A,f(E)}}function A(E){if(v(E)){var D=E._fullLayout._activeSelectionIndex;D>=0&&(O(E),delete E._fullLayout._activeSelectionIndex,f(E))}}}}),rS=U({"node_modules/polybooljs/lib/build-log.js"(pe,le){function w(){var R,O=0,z=!1;function l(u,c){return R.list.push({type:u,data:c?JSON.parse(JSON.stringify(c)):void 0}),R}return R={list:[],segmentId:function(){return O++},checkIntersection:function(u,c){return l("check",{seg1:u,seg2:c})},segmentChop:function(u,c){return l("div_seg",{seg:u,pt:c}),l("chop",{seg:u,pt:c})},statusRemove:function(u){return l("pop_seg",{seg:u})},segmentUpdate:function(u){return l("seg_update",{seg:u})},segmentNew:function(u,c){return l("new_seg",{seg:u,primary:c})},segmentRemove:function(u){return l("rem_seg",{seg:u})},tempStatus:function(u,c,p){return l("temp_status",{seg:u,above:c,below:p})},rewind:function(u){return l("rewind",{seg:u})},status:function(u,c,p){return l("status",{seg:u,above:c,below:p})},vert:function(u){return u===z?R:(z=u,l("vert",{x:u}))},log:function(u){return typeof u!="string"&&(u=JSON.stringify(u,!1,"  ")),l("log",{txt:u})},reset:function(){return l("reset")},selected:function(u){return l("selected",{segs:u})},chainStart:function(u){return l("chain_start",{seg:u})},chainRemoveHead:function(u,c){return l("chain_rem_head",{index:u,pt:c})},chainRemoveTail:function(u,c){return l("chain_rem_tail",{index:u,pt:c})},chainNew:function(u,c){return l("chain_new",{pt1:u,pt2:c})},chainMatch:function(u){return l("chain_match",{index:u})},chainClose:function(u){return l("chain_close",{index:u})},chainAddHead:function(u,c){return l("chain_add_head",{index:u,pt:c})},chainAddTail:function(u,c){return l("chain_add_tail",{index:u,pt:c})},chainConnect:function(u,c){return l("chain_con",{index1:u,index2:c})},chainReverse:function(u){return l("chain_rev",{index:u})},chainJoin:function(u,c){return l("chain_join",{index1:u,index2:c})},done:function(){return l("done")}},R}le.exports=w}}),Yk=U({"node_modules/polybooljs/lib/epsilon.js"(pe,le){function w(R){typeof R!="number"&&(R=1e-10);var O={epsilon:function(z){return typeof z=="number"&&(R=z),R},pointAboveOrOnLine:function(z,l,u){var c=l[0],p=l[1],f=u[0],v=u[1],h=z[0],m=z[1];return(f-c)*(m-p)-(v-p)*(h-c)>=-R},pointBetween:function(z,l,u){var c=z[1]-l[1],p=u[0]-l[0],f=z[0]-l[0],v=u[1]-l[1],h=f*p+c*v;if(h<R)return!1;var m=p*p+v*v;return!(h-m>-R)},pointsSameX:function(z,l){return Math.abs(z[0]-l[0])<R},pointsSameY:function(z,l){return Math.abs(z[1]-l[1])<R},pointsSame:function(z,l){return O.pointsSameX(z,l)&&O.pointsSameY(z,l)},pointsCompare:function(z,l){return O.pointsSameX(z,l)?O.pointsSameY(z,l)?0:z[1]<l[1]?-1:1:z[0]<l[0]?-1:1},pointsCollinear:function(z,l,u){var c=z[0]-l[0],p=z[1]-l[1],f=l[0]-u[0],v=l[1]-u[1];return Math.abs(c*v-f*p)<R},linesIntersect:function(z,l,u,c){var p=l[0]-z[0],f=l[1]-z[1],v=c[0]-u[0],h=c[1]-u[1],m=p*h-f*v;if(Math.abs(m)<R)return!1;var _=z[0]-u[0],x=z[1]-u[1],A=(v*x-h*_)/m,E=(p*x-f*_)/m,D={alongA:0,alongB:0,pt:[z[0]+A*p,z[1]+A*f]};return A<=-R?D.alongA=-2:A<R?D.alongA=-1:A-1<=-R?D.alongA=0:A-1<R?D.alongA=1:D.alongA=2,E<=-R?D.alongB=-2:E<R?D.alongB=-1:E-1<=-R?D.alongB=0:E-1<R?D.alongB=1:D.alongB=2,D},pointInsideRegion:function(z,l){for(var u=z[0],c=z[1],p=l[l.length-1][0],f=l[l.length-1][1],v=!1,h=0;h<l.length;h++){var m=l[h][0],_=l[h][1];_-c>R!=f-c>R&&(p-m)*(c-_)/(f-_)+m-u>R&&(v=!v),p=m,f=_}return v}};return O}le.exports=w}}),nb=U({"node_modules/polybooljs/lib/linked-list.js"(pe,le){var w={create:function(){var R={root:{root:!0,next:null},exists:function(O){return!(O===null||O===R.root)},isEmpty:function(){return R.root.next===null},getHead:function(){return R.root.next},insertBefore:function(O,z){for(var l=R.root,u=R.root.next;u!==null;){if(z(u)){O.prev=u.prev,O.next=u,u.prev.next=O,u.prev=O;return}l=u,u=u.next}l.next=O,O.prev=l,O.next=null},findTransition:function(O){for(var z=R.root,l=R.root.next;l!==null&&!O(l);)z=l,l=l.next;return{before:z===R.root?null:z,after:l,insert:function(u){return u.prev=z,u.next=l,z.next=u,l!==null&&(l.prev=u),u}}}};return R},node:function(R){return R.prev=null,R.next=null,R.remove=function(){R.prev.next=R.next,R.next&&(R.next.prev=R.prev),R.prev=null,R.next=null},R}};le.exports=w}}),Yy=U({"node_modules/polybooljs/lib/intersecter.js"(pe,le){var w=nb();function R(O,z,l){function u(D,g){return{id:l?l.segmentId():-1,start:D,end:g,myFill:{above:null,below:null},otherFill:null}}function c(D,g,C){return{id:l?l.segmentId():-1,start:D,end:g,myFill:{above:C.myFill.above,below:C.myFill.below},otherFill:null}}var p=w.create();function f(D,g,C,I,N,F){var k=z.pointsCompare(g,N);return k!==0?k:z.pointsSame(C,F)?0:D!==I?D?1:-1:z.pointAboveOrOnLine(C,I?N:F,I?F:N)?1:-1}function v(D,g){p.insertBefore(D,function(C){var I=f(D.isStart,D.pt,g,C.isStart,C.pt,C.other.pt);return I<0})}function h(D,g){var C=w.node({isStart:!0,pt:D.start,seg:D,primary:g,other:null,status:null});return v(C,D.end),C}function m(D,g,C){var I=w.node({isStart:!1,pt:g.end,seg:g,primary:C,other:D,status:null});D.other=I,v(I,D.pt)}function _(D,g){var C=h(D,g);return m(C,D,g),C}function x(D,g){l&&l.segmentChop(D.seg,g),D.other.remove(),D.seg.end=g,D.other.pt=g,v(D.other,D.pt)}function A(D,g){var C=c(g,D.seg.end,D.seg);return x(D,g),_(C,D.primary)}function E(D,g){var C=w.create();function I(Q,J){var G=Q.seg.start,ee=Q.seg.end,re=J.seg.start,fe=J.seg.end;return z.pointsCollinear(G,re,fe)?z.pointsCollinear(ee,re,fe)||z.pointAboveOrOnLine(ee,re,fe)?1:-1:z.pointAboveOrOnLine(G,re,fe)?1:-1}function N(Q){return C.findTransition(function(J){var G=I(Q,J.ev);return G>0})}function F(Q,J){var G=Q.seg,ee=J.seg,re=G.start,fe=G.end,we=ee.start,Oe=ee.end;l&&l.checkIntersection(G,ee);var ke=z.linesIntersect(re,fe,we,Oe);if(ke===!1){if(!z.pointsCollinear(re,fe,we)||z.pointsSame(re,Oe)||z.pointsSame(fe,we))return!1;var Le=z.pointsSame(re,we),oe=z.pointsSame(fe,Oe);if(Le&&oe)return J;var be=!Le&&z.pointBetween(re,we,Oe),_e=!oe&&z.pointBetween(fe,we,Oe);if(Le)return _e?A(J,fe):A(Q,Oe),J;be&&(oe||(_e?A(J,fe):A(Q,Oe)),A(J,re))}else ke.alongA===0&&(ke.alongB===-1?A(Q,we):ke.alongB===0?A(Q,ke.pt):ke.alongB===1&&A(Q,Oe)),ke.alongB===0&&(ke.alongA===-1?A(J,re):ke.alongA===0?A(J,ke.pt):ke.alongA===1&&A(J,fe));return!1}for(var k=[];!p.isEmpty();){var P=p.getHead();if(l&&l.vert(P.pt[0]),P.isStart){let Q=function(){if(y){var J=F(P,y);if(J)return J}return S?F(P,S):!1};l&&l.segmentNew(P.seg,P.primary);var T=N(P),y=T.before?T.before.ev:null,S=T.after?T.after.ev:null;l&&l.tempStatus(P.seg,y?y.seg:!1,S?S.seg:!1);var M=Q();if(M){if(O){var W;P.seg.myFill.below===null?W=!0:W=P.seg.myFill.above!==P.seg.myFill.below,W&&(M.seg.myFill.above=!M.seg.myFill.above)}else M.seg.otherFill=P.seg.myFill;l&&l.segmentUpdate(M.seg),P.other.remove(),P.remove()}if(p.getHead()!==P){l&&l.rewind(P.seg);continue}if(O){var W;P.seg.myFill.below===null?W=!0:W=P.seg.myFill.above!==P.seg.myFill.below,S?P.seg.myFill.below=S.seg.myFill.above:P.seg.myFill.below=D,W?P.seg.myFill.above=!P.seg.myFill.below:P.seg.myFill.above=P.seg.myFill.below}else if(P.seg.otherFill===null){var $;S?P.primary===S.primary?$=S.seg.otherFill.above:$=S.seg.myFill.above:$=P.primary?g:D,P.seg.otherFill={above:$,below:$}}l&&l.status(P.seg,y?y.seg:!1,S?S.seg:!1),P.other.status=T.insert(w.node({ev:P}))}else{var Z=P.status;if(Z===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(C.exists(Z.prev)&&C.exists(Z.next)&&F(Z.prev.ev,Z.next.ev),l&&l.statusRemove(Z.ev.seg),Z.remove(),!P.primary){var K=P.seg.myFill;P.seg.myFill=P.seg.otherFill,P.seg.otherFill=K}k.push(P.seg)}p.getHead().remove()}return l&&l.done(),k}return O?{addRegion:function(D){for(var g,C=D[D.length-1],I=0;I<D.length;I++){g=C,C=D[I];var N=z.pointsCompare(g,C);N!==0&&_(u(N<0?g:C,N<0?C:g),!0)}},calculate:function(D){return E(D,!1)}}:{calculate:function(D,g,C,I){return D.forEach(function(N){_(c(N.start,N.end,N),!0)}),C.forEach(function(N){_(c(N.start,N.end,N),!1)}),E(g,I)}}}le.exports=R}}),Fm=U({"node_modules/polybooljs/lib/segment-chainer.js"(pe,le){function w(R,O,z){var l=[],u=[];return R.forEach(function(c){var p=c.start,f=c.end;if(O.pointsSame(p,f)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}z&&z.chainStart(c);var v={index:0,matches_head:!1,matches_pt1:!1},h={index:0,matches_head:!1,matches_pt1:!1},m=v;function _($,Z,K){return m.index=$,m.matches_head=Z,m.matches_pt1=K,m===v?(m=h,!1):(m=null,!0)}for(var x=0;x<l.length;x++){var A=l[x],E=A[0];A[1];var D=A[A.length-1];if(A[A.length-2],O.pointsSame(E,p)){if(_(x,!0,!0))break}else if(O.pointsSame(E,f)){if(_(x,!0,!1))break}else if(O.pointsSame(D,p)){if(_(x,!1,!0))break}else if(O.pointsSame(D,f)&&_(x,!1,!1))break}if(m===v){l.push([p,f]),z&&z.chainNew(p,f);return}if(m===h){z&&z.chainMatch(v.index);var g=v.index,C=v.matches_pt1?f:p,I=v.matches_head,A=l[g],N=I?A[0]:A[A.length-1],F=I?A[1]:A[A.length-2],k=I?A[A.length-1]:A[0],P=I?A[A.length-2]:A[1];if(O.pointsCollinear(F,N,C)&&(I?(z&&z.chainRemoveHead(v.index,C),A.shift()):(z&&z.chainRemoveTail(v.index,C),A.pop()),N=F),O.pointsSame(k,C)){l.splice(g,1),O.pointsCollinear(P,k,N)&&(I?(z&&z.chainRemoveTail(v.index,N),A.pop()):(z&&z.chainRemoveHead(v.index,N),A.shift())),z&&z.chainClose(v.index),u.push(A);return}I?(z&&z.chainAddHead(v.index,C),A.unshift(C)):(z&&z.chainAddTail(v.index,C),A.push(C));return}function T($){z&&z.chainReverse($),l[$].reverse()}function y($,Z){var K=l[$],Q=l[Z],J=K[K.length-1],G=K[K.length-2],ee=Q[0],re=Q[1];O.pointsCollinear(G,J,ee)&&(z&&z.chainRemoveTail($,J),K.pop(),J=G),O.pointsCollinear(J,ee,re)&&(z&&z.chainRemoveHead(Z,ee),Q.shift()),z&&z.chainJoin($,Z),l[$]=K.concat(Q),l.splice(Z,1)}var S=v.index,M=h.index;z&&z.chainConnect(S,M);var W=l[S].length<l[M].length;v.matches_head?h.matches_head?W?(T(S),y(S,M)):(T(M),y(M,S)):y(M,S):h.matches_head?y(S,M):W?(T(S),y(M,S)):(T(M),y(S,M))}),u}le.exports=w}}),pM=U({"node_modules/polybooljs/lib/segment-selector.js"(pe,le){function w(O,z,l){var u=[];return O.forEach(function(c){var p=(c.myFill.above?8:0)+(c.myFill.below?4:0)+(c.otherFill&&c.otherFill.above?2:0)+(c.otherFill&&c.otherFill.below?1:0);z[p]!==0&&u.push({id:l?l.segmentId():-1,start:c.start,end:c.end,myFill:{above:z[p]===1,below:z[p]===2},otherFill:null})}),l&&l.selected(u),u}var R={union:function(O,z){return w(O,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],z)},intersect:function(O,z){return w(O,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],z)},difference:function(O,z){return w(O,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],z)},differenceRev:function(O,z){return w(O,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],z)},xor:function(O,z){return w(O,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],z)}};le.exports=R}}),tR=U({"node_modules/polybooljs/lib/geojson.js"(pe,le){var w={toPolygon:function(R,O){function z(c){if(c.length<=0)return R.segments({inverted:!1,regions:[]});function p(h){var m=h.slice(0,h.length-1);return R.segments({inverted:!1,regions:[m]})}for(var f=p(c[0]),v=1;v<c.length;v++)f=R.selectDifference(R.combine(f,p(c[v])));return f}if(O.type==="Polygon")return R.polygon(z(O.coordinates));if(O.type==="MultiPolygon"){for(var l=R.segments({inverted:!1,regions:[]}),u=0;u<O.coordinates.length;u++)l=R.selectUnion(R.combine(l,z(O.coordinates[u])));return R.polygon(l)}throw new Error("PolyBool: Cannot convert GeoJSON object to PolyBool polygon")},fromPolygon:function(R,O,z){z=R.polygon(R.segments(z));function l(A,E){return O.pointInsideRegion([(A[0][0]+A[1][0])*.5,(A[0][1]+A[1][1])*.5],E)}function u(A){return{region:A,children:[]}}var c=u(null);function p(A,E){for(var D=0;D<A.children.length;D++){var g=A.children[D];if(l(E,g.region)){p(g,E);return}}for(var C=u(E),D=0;D<A.children.length;D++){var g=A.children[D];l(g.region,E)&&(C.children.push(g),A.children.splice(D,1),D--)}A.children.push(C)}for(var f=0;f<z.regions.length;f++){var v=z.regions[f];v.length<3||p(c,v)}function h(A,E){for(var D=0,g=A[A.length-1][0],C=A[A.length-1][1],I=[],N=0;N<A.length;N++){var F=A[N][0],k=A[N][1];I.push([F,k]),D+=k*g-F*C,g=F,C=k}var P=D<0;return P!==E&&I.reverse(),I.push([I[0][0],I[0][1]]),I}var m=[];function _(A){var E=[h(A.region,!1)];m.push(E);for(var D=0;D<A.children.length;D++)E.push(x(A.children[D]))}function x(A){for(var E=0;E<A.children.length;E++)_(A.children[E]);return h(A.region,!0)}for(var f=0;f<c.children.length;f++)_(c.children[f]);return m.length<=0?{type:"Polygon",coordinates:[]}:m.length==1?{type:"Polygon",coordinates:m[0]}:{type:"MultiPolygon",coordinates:m}}};le.exports=w}}),rR=U({"node_modules/polybooljs/index.js"(pe,le){var w=rS(),R=Yk(),O=Yy(),z=Fm(),l=pM(),u=tR(),c=!1,p=R(),f;f={buildLog:function(h){return h===!0?c=w():h===!1&&(c=!1),c===!1?!1:c.list},epsilon:function(h){return p.epsilon(h)},segments:function(h){var m=O(!0,p,c);return h.regions.forEach(m.addRegion),{segments:m.calculate(h.inverted),inverted:h.inverted}},combine:function(h,m){var _=O(!1,p,c);return{combined:_.calculate(h.segments,h.inverted,m.segments,m.inverted),inverted1:h.inverted,inverted2:m.inverted}},selectUnion:function(h){return{segments:l.union(h.combined,c),inverted:h.inverted1||h.inverted2}},selectIntersect:function(h){return{segments:l.intersect(h.combined,c),inverted:h.inverted1&&h.inverted2}},selectDifference:function(h){return{segments:l.difference(h.combined,c),inverted:h.inverted1&&!h.inverted2}},selectDifferenceRev:function(h){return{segments:l.differenceRev(h.combined,c),inverted:!h.inverted1&&h.inverted2}},selectXor:function(h){return{segments:l.xor(h.combined,c),inverted:h.inverted1!==h.inverted2}},polygon:function(h){return{regions:z(h.segments,p,c),inverted:h.inverted}},polygonFromGeoJSON:function(h){return u.toPolygon(f,h)},polygonToGeoJSON:function(h){return u.fromPolygon(f,p,h)},union:function(h,m){return v(h,m,f.selectUnion)},intersect:function(h,m){return v(h,m,f.selectIntersect)},difference:function(h,m){return v(h,m,f.selectDifference)},differenceRev:function(h,m){return v(h,m,f.selectDifferenceRev)},xor:function(h,m){return v(h,m,f.selectXor)}};function v(h,m,_){var x=f.segments(h),A=f.segments(m),E=f.combine(x,A),D=_(E);return f.polygon(D)}typeof window=="object"&&(window.PolyBool=f),le.exports=f}}),TA=U({"node_modules/point-in-polygon/nested.js"(pe,le){le.exports=function(R,O,z,l){var u=R[0],c=R[1],p=!1;z===void 0&&(z=0),l===void 0&&(l=O.length);for(var f=l-z,v=0,h=f-1;v<f;h=v++){var m=O[v+z][0],_=O[v+z][1],x=O[h+z][0],A=O[h+z][1],E=_>c!=A>c&&u<(x-m)*(c-_)/(A-_)+m;E&&(p=!p)}return p}}}),RE=U({"src/lib/polygon.js"(pe,le){var w=_s().dot,R=Dt().BADNUM,O=le.exports={};O.tester=function(l){var u=l.slice(),c=u[0][0],p=c,f=u[0][1],v=f,h;for((u[u.length-1][0]!==u[0][0]||u[u.length-1][1]!==u[0][1])&&u.push(u[0]),h=1;h<u.length;h++)c=Math.min(c,u[h][0]),p=Math.max(p,u[h][0]),f=Math.min(f,u[h][1]),v=Math.max(v,u[h][1]);var m=!1,_;u.length===5&&(u[0][0]===u[1][0]?u[2][0]===u[3][0]&&u[0][1]===u[3][1]&&u[1][1]===u[2][1]&&(m=!0,_=function(g){return g[0]===u[0][0]}):u[0][1]===u[1][1]&&u[2][1]===u[3][1]&&u[0][0]===u[3][0]&&u[1][0]===u[2][0]&&(m=!0,_=function(g){return g[1]===u[0][1]}));function x(g,C){var I=g[0],N=g[1];return!(I===R||I<c||I>p||N===R||N<f||N>v||C&&_(g))}function A(g,C){var I=g[0],N=g[1];if(I===R||I<c||I>p||N===R||N<f||N>v)return!1;var F=u.length,k=u[0][0],P=u[0][1],T=0,y,S,M,W,$;for(y=1;y<F;y++)if(S=k,M=P,k=u[y][0],P=u[y][1],W=Math.min(S,k),!(I<W||I>Math.max(S,k)||N>Math.max(M,P)))if(N<Math.min(M,P))I!==W&&T++;else{if(k===S?$=N:$=M+(I-S)*(P-M)/(k-S),N===$)return!(y===1&&C);N<=$&&I!==W&&T++}return T%2===1}var E=!0,D=u[0];for(h=1;h<u.length;h++)if(D[0]!==u[h][0]||D[1]!==u[h][1]){E=!1;break}return{xmin:c,xmax:p,ymin:f,ymax:v,pts:u,contains:m?x:A,isRect:m,degenerate:E}},O.isSegmentBent=function(l,u,c,p){var f=l[u],v=[l[c][0]-f[0],l[c][1]-f[1]],h=w(v,v),m=Math.sqrt(h),_=[-v[1]/m,v[0]/m],x,A,E;for(x=u+1;x<c;x++)if(A=[l[x][0]-f[0],l[x][1]-f[1]],E=w(A,v),E<0||E>h||Math.abs(w(A,_))>p)return!0;return!1},O.filter=function(l,u){var c=[l[0]],p=0,f=0;function v(m){l.push(m);var _=c.length,x=p;c.splice(f+1);for(var A=x+1;A<l.length;A++)(A===l.length-1||O.isSegmentBent(l,x,A+1,u))&&(c.push(l[A]),c.length<_-2&&(p=A,f=c.length-1),x=A)}if(l.length>1){var h=l.pop();v(h)}return{addPt:v,raw:l,filtered:c}}}}),Kw=U({"src/components/selections/constants.js"(pe,le){le.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}}}),Jw=U({"src/components/selections/select.js"(pe,le){var w=rR(),R=TA(),O=Mi(),z=ec().dashStyle,l=Lr(),u=Dp(),c=v0().makeEventData,p=m0(),f=p.freeMode,v=p.rectMode,h=p.drawMode,m=p.openMode,_=p.selectMode,x=Nm(),A=eS(),E=X_(),D=T1().clearOutline,g=o_(),C=g.handleEllipse,I=g.readPaths,N=AE().newShapes,F=hy(),k=Zw().activateLastSelection,P=ii(),T=P.sorterAsc,y=RE(),S=el(),M=Tf().getFromId,W=jg(),$=bx().redrawReglTraces,Z=Kw(),K=Z.MINSELECT,Q=y.filter,J=y.tester,G=yx(),ee=G.p2r,re=G.axValue,fe=G.getTransform;function we(St){return St.subplot!==void 0}function Oe(St,Ot,Et,je,Ye){var et=!we(je),mt=f(Ye),Nt=v(Ye),lr=m(Ye),br=h(Ye),Or=_(Ye),tn=Ye==="drawline",Jr=Ye==="drawcircle",dn=tn||Jr,on=je.gd,Nn=on._fullLayout,Wi=Or&&Nn.newselection.mode==="immediate"&&et,Oa=Nn._zoomlayer,Da=je.element.getBoundingClientRect(),Aa=je.plotinfo,Ka=fe(Aa),Sa=Ot-Da.left,no=Et-Da.top;Nn._calcInverseTransform(on);var Fo=P.apply3DTransform(Nn._invTransform)(Sa,no);Sa=Fo[0],no=Fo[1];var an=Nn._invScaleX,Hr=Nn._invScaleY,nn=Sa,Kr=no,$n="M"+Sa+","+no,Ai=je.xaxes[0],aa=je.yaxes[0],Ci=Ai._length,Ta=aa._length,Na=St.altKey&&!(h(Ye)&&lr),ro,oo,xo,vr,er,si,ei;he(St,on,je),mt&&(ro=Q([[Sa,no]],Z.BENDPX));var Kn=Oa.selectAll("path.select-outline-"+Aa.id).data([1]),qn=br?Nn.newshape:Nn.newselection;br&&(je.hasText=qn.label.text||qn.label.texttemplate);var pi=br&&!lr?qn.fillcolor:"rgba(0,0,0,0)",_i=qn.line.color||(et?l.contrast(on._fullLayout.plot_bgcolor):"#7f7f7f");Kn.enter().append("path").attr("class","select-outline select-outline-"+Aa.id).style({opacity:br?qn.opacity/2:1,"stroke-dasharray":z(qn.line.dash,qn.line.width),"stroke-width":qn.line.width+"px","shape-rendering":"crispEdges"}).call(l.stroke,_i).call(l.fill,pi).attr("fill-rule","evenodd").classed("cursor-move",!!br).attr("transform",Ka).attr("d",$n+"Z");var fi=Oa.append("path").attr("class","zoombox-corners").style({fill:l.background,stroke:l.defaultLine,"stroke-width":1}).attr("transform",Ka).attr("d","M0,0Z");if(br&&je.hasText){var Ri=Oa.select(".label-temp");Ri.empty()&&(Ri=Oa.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var $i=Nn._uid+Z.SELECTID,Hi=[],wr=Te(on,je.xaxes,je.yaxes,je.subplot);Wi&&!St.shiftKey&&(je._clearSubplotSelections=function(){if(et){var Xn=Ai._id,Yi=aa._id;Jt(on,Xn,Yi,wr);for(var ha=(on.layout||{}).selections||[],Ca=[],Ba=!1,ji=0;ji<ha.length;ji++){var Ea=Nn.selections[ji];!Ea||Ea.xref!==Xn||Ea.yref!==Yi?Ca.push(ha[ji]):Ba=!0}Ba&&(on._fullLayout._noEmitSelectedAtStart=!0,O.call("_guiRelayout",on,{selections:Ca}))}});var gn=ci(je);je.moveFn=function(Xn,Yi){je._clearSubplotSelections&&(je._clearSubplotSelections(),je._clearSubplotSelections=void 0),nn=Math.max(0,Math.min(Ci,an*Xn+Sa)),Kr=Math.max(0,Math.min(Ta,Hr*Yi+no));var ha=Math.abs(nn-Sa),Ca=Math.abs(Kr-no);if(Nt){var Ba,ji,Ea;if(Or){var cs=Nn.selectdirection;switch(cs==="any"?Ca<Math.min(ha*.6,K)?Ba="h":ha<Math.min(Ca*.6,K)?Ba="v":Ba="d":Ba=cs,Ba){case"h":ji=Jr?Ta/2:0,Ea=Ta;break;case"v":ji=Jr?Ci/2:0,Ea=Ci;break}}if(br)switch(Nn.newshape.drawdirection){case"vertical":Ba="h",ji=Jr?Ta/2:0,Ea=Ta;break;case"horizontal":Ba="v",ji=Jr?Ci/2:0,Ea=Ci;break;case"ortho":ha<Ca?(Ba="h",ji=no,Ea=Kr):(Ba="v",ji=Sa,Ea=nn);break;default:Ba="d"}Ba==="h"?(vr=dn?C(Jr,[nn,ji],[nn,Ea]):[[Sa,ji],[Sa,Ea],[nn,Ea],[nn,ji]],vr.xmin=dn?nn:Math.min(Sa,nn),vr.xmax=dn?nn:Math.max(Sa,nn),vr.ymin=Math.min(ji,Ea),vr.ymax=Math.max(ji,Ea),fi.attr("d","M"+vr.xmin+","+(no-K)+"h-4v"+2*K+"h4ZM"+(vr.xmax-1)+","+(no-K)+"h4v"+2*K+"h-4Z")):Ba==="v"?(vr=dn?C(Jr,[ji,Kr],[Ea,Kr]):[[ji,no],[ji,Kr],[Ea,Kr],[Ea,no]],vr.xmin=Math.min(ji,Ea),vr.xmax=Math.max(ji,Ea),vr.ymin=dn?Kr:Math.min(no,Kr),vr.ymax=dn?Kr:Math.max(no,Kr),fi.attr("d","M"+(Sa-K)+","+vr.ymin+"v-4h"+2*K+"v4ZM"+(Sa-K)+","+(vr.ymax-1)+"v4h"+2*K+"v-4Z")):Ba==="d"&&(vr=dn?C(Jr,[Sa,no],[nn,Kr]):[[Sa,no],[Sa,Kr],[nn,Kr],[nn,no]],vr.xmin=Math.min(Sa,nn),vr.xmax=Math.max(Sa,nn),vr.ymin=Math.min(no,Kr),vr.ymax=Math.max(no,Kr),fi.attr("d","M0,0Z"))}else mt&&(ro.addPt([nn,Kr]),vr=ro.filtered);if(je.selectionDefs&&je.selectionDefs.length?(xo=Ht(je.mergedPolygons,vr,Na),vr.subtract=Na,oo=_e(je.selectionDefs.concat([vr]))):(xo=[vr],oo=J(vr)),E(st(xo,lr),Kn,je),Or){var No=Ue(on,!1),Vs=No.eventData?No.eventData.points.slice():[];No=Ue(on,!1,oo,wr,je),oo=No.selectionTesters,ei=No.eventData;var pl;ro?pl=ro.filtered:pl=rn(xo),S.throttle($i,Z.SELECTDELAY,function(){Hi=rt(oo,wr);for(var kl=Hi.slice(),El=0;El<Vs.length;El++){for(var iu=Vs[El],bu=!1,yl=0;yl<kl.length;yl++)if(kl[yl].curveNumber===iu.curveNumber&&kl[yl].pointNumber===iu.pointNumber){bu=!0;break}bu||kl.push(iu)}kl.length&&(ei||(ei={}),ei.points=kl),gn(ei,pl),In(on,ei)})}},je.clickFn=function(Xn,Yi){if(fi.remove(),on._fullLayout._activeShapeIndex>=0){on._fullLayout._deactivateShape(on);return}if(!br){var ha=Nn.clickmode;S.done($i).then(function(){if(S.clear($i),Xn===2){for(Kn.remove(),er=0;er<wr.length;er++)si=wr[er],si._module.selectPoints(si,!1);if($t(on,wr),se(je),mr(on),wr.length){var Ca=wr[0].xaxis,Ba=wr[0].yaxis;if(Ca&&Ba){for(var ji=[],Ea=on._fullLayout.selections,cs=0;cs<Ea.length;cs++){var No=Ea[cs];No&&(No.xref!==Ca._id||No.yref!==Ba._id)&&ji.push(No)}ji.length<Ea.length&&(on._fullLayout._noEmitSelectedAtStart=!0,O.call("_guiRelayout",on,{selections:ji}))}}}else ha.indexOf("select")>-1&&ke(Yi,on,je.xaxes,je.yaxes,je.subplot,je,Kn),ha==="event"&&Gn(on,void 0);u.click(on,Yi,Aa.id)}).catch(P.error)}},je.doneFn=function(){fi.remove(),S.done($i).then(function(){S.clear($i),!Wi&&vr&&je.selectionDefs&&(vr.subtract=Na,je.selectionDefs.push(vr),je.mergedPolygons.length=0,[].push.apply(je.mergedPolygons,xo)),(Wi||br)&&se(je,Wi),je.doneFnCompleted&&je.doneFnCompleted(Hi),Or&&Gn(on,ei)}).catch(P.error)}}function ke(St,Ot,Et,je,Ye,et,mt){var Nt=Ot._hoverdata,lr=Ot._fullLayout,br=lr.clickmode,Or=br.indexOf("event")>-1,tn=[],Jr,dn,on,Nn,Wi,Oa,Da,Aa,Ka,Sa;if(tt(Nt)){he(St,Ot,et),Jr=Te(Ot,Et,je,Ye);var no=at(Nt,Jr),Fo=no.pointNumbers.length>0;if(Fo?pt(Jr,no):Rt(Jr)&&(Da=gt(no))){for(mt&&mt.remove(),Sa=0;Sa<Jr.length;Sa++)dn=Jr[Sa],dn._module.selectPoints(dn,!1);$t(Ot,Jr),se(et),Or&&mr(Ot)}else{Aa=St.shiftKey&&(Da!==void 0?Da:gt(no)),on=Le(no.pointNumber,no.searchInfo,Aa);var an=et.selectionDefs.concat([on]);for(Nn=_e(an),Sa=0;Sa<Jr.length;Sa++)if(Wi=Jr[Sa]._module.selectPoints(Jr[Sa],Nn),Oa=Ft(Wi,Jr[Sa]),tn.length)for(var Hr=0;Hr<Oa.length;Hr++)tn.push(Oa[Hr]);else tn=Oa;if(Ka={points:tn},$t(Ot,Jr,Ka),on&&et&&et.selectionDefs.push(on),mt){var nn=et.mergedPolygons,Kr=m(et.dragmode);E(st(nn,Kr),mt,et)}Or&&Gn(Ot,Ka)}}}function Le(St,Ot,Et){return{pointNumber:St,searchInfo:Ot,subtract:!!Et}}function oe(St){return"pointNumber"in St&&"searchInfo"in St}function be(St){return{xmin:0,xmax:0,ymin:0,ymax:0,pts:[],contains:function(Ot,Et,je,Ye){var et=St.searchInfo.cd[0].trace.index,mt=Ye.cd[0].trace.index;return mt===et&&je===St.pointNumber},isRect:!1,degenerate:!1,subtract:!!St.subtract}}function _e(St){if(!St.length)return;for(var Ot=[],Et=oe(St[0])?0:St[0][0][0],je=Et,Ye=oe(St[0])?0:St[0][0][1],et=Ye,mt=0;mt<St.length;mt++)if(oe(St[mt]))Ot.push(be(St[mt]));else{var Nt=J(St[mt]);Nt.subtract=!!St[mt].subtract,Ot.push(Nt),Et=Math.min(Et,Nt.xmin),je=Math.max(je,Nt.xmax),Ye=Math.min(Ye,Nt.ymin),et=Math.max(et,Nt.ymax)}function lr(br,Or,tn,Jr){for(var dn=!1,on=0;on<Ot.length;on++)Ot[on].contains(br,Or,tn,Jr)&&(dn=!Ot[on].subtract);return dn}return{xmin:Et,xmax:je,ymin:Ye,ymax:et,pts:[],contains:lr,isRect:!1,degenerate:!1}}function he(St,Ot,Et){var je=Ot._fullLayout,Ye=Et.plotinfo,et=Et.dragmode,mt=je._lastSelectedSubplot&&je._lastSelectedSubplot===Ye.id,Nt=(St.shiftKey||St.altKey)&&!(h(et)&&m(et));mt&&Nt&&Ye.selection&&Ye.selection.selectionDefs&&!Et.selectionDefs?(Et.selectionDefs=Ye.selection.selectionDefs,Et.mergedPolygons=Ye.selection.mergedPolygons):(!Nt||!Ye.selection)&&se(Et),mt||(D(Ot),je._lastSelectedSubplot=Ye.id)}function De(St){return St._fullLayout._activeShapeIndex>=0}function xe(St){return St._fullLayout._activeSelectionIndex>=0}function se(St,Ot){var Et=St.dragmode,je=St.plotinfo,Ye=St.gd;De(Ye)&&Ye._fullLayout._deactivateShape(Ye),xe(Ye)&&Ye._fullLayout._deactivateSelection(Ye);var et=Ye._fullLayout,mt=et._zoomlayer,Nt=h(Et),lr=_(Et);if(Nt||lr){var br=mt.selectAll(".select-outline-"+je.id);if(br&&Ye._fullLayout._outlining){var Or;Nt&&(Or=N(br,St)),Or&&O.call("_guiRelayout",Ye,{shapes:Or});var tn;lr&&!we(St)&&(tn=F(br,St)),tn&&(Ye._fullLayout._noEmitSelectedAtStart=!0,O.call("_guiRelayout",Ye,{selections:tn}).then(function(){Ot&&k(Ye)})),Ye._fullLayout._outlining=!1}}je.selection={},je.selection.selectionDefs=St.selectionDefs=[],je.selection.mergedPolygons=St.mergedPolygons=[]}function Ee(St){return St._id}function Te(St,Ot,Et,je){if(!St.calcdata)return[];var Ye=[],et=Ot.map(Ee),mt=Et.map(Ee),Nt,lr,br;for(br=0;br<St.calcdata.length;br++)if(Nt=St.calcdata[br],lr=Nt[0].trace,!(lr.visible!==!0||!lr._module||!lr._module.selectPoints))if(we({subplot:je})&&(lr.subplot===je||lr.geo===je))Ye.push(Be(lr._module,Nt,Ot[0],Et[0]));else if(lr.type==="splom"){if(lr._xaxes[et[0]]&&lr._yaxes[mt[0]]){var Or=Be(lr._module,Nt,Ot[0],Et[0]);Or.scene=St._fullLayout._splomScenes[lr.uid],Ye.push(Or)}}else if(lr.type==="sankey"){var tn=Be(lr._module,Nt,Ot[0],Et[0]);Ye.push(tn)}else{if(et.indexOf(lr.xaxis)===-1&&(!lr._xA||!lr._xA.overlaying)||mt.indexOf(lr.yaxis)===-1&&(!lr._yA||!lr._yA.overlaying))continue;Ye.push(Be(lr._module,Nt,M(St,lr.xaxis),M(St,lr.yaxis)))}return Ye}function Be(St,Ot,Et,je){return{_module:St,cd:Ot,xaxis:Et,yaxis:je}}function tt(St){return St&&Array.isArray(St)&&St[0].hoverOnBox!==!0}function at(St,Ot){var Et=St[0],je=-1,Ye=[],et,mt;for(mt=0;mt<Ot.length;mt++)if(et=Ot[mt],Et.fullData.index===et.cd[0].trace.index){if(Et.hoverOnBox===!0)break;Et.pointNumber!==void 0?je=Et.pointNumber:Et.binNumber!==void 0&&(je=Et.binNumber,Ye=Et.pointNumbers);break}return{pointNumber:je,pointNumbers:Ye,searchInfo:et}}function gt(St){var Ot=St.searchInfo.cd[0].trace,Et=St.pointNumber,je=St.pointNumbers,Ye=je.length>0,et=Ye?je[0]:Et;return Ot.selectedpoints?Ot.selectedpoints.indexOf(et)>-1:!1}function pt(St,Ot){var Et=[],je,Ye,et,mt;for(mt=0;mt<St.length;mt++)je=St[mt],je.cd[0].trace.selectedpoints&&je.cd[0].trace.selectedpoints.length>0&&Et.push(je);if(Et.length===1&&(et=Et[0]===Ot.searchInfo,et&&(Ye=Ot.searchInfo.cd[0].trace,Ye.selectedpoints.length===Ot.pointNumbers.length))){for(mt=0;mt<Ot.pointNumbers.length;mt++)if(Ye.selectedpoints.indexOf(Ot.pointNumbers[mt])<0)return!1;return!0}return!1}function Rt(St){var Ot=0,Et,je,Ye;for(Ye=0;Ye<St.length;Ye++)if(Et=St[Ye],je=Et.cd[0].trace,je.selectedpoints&&(je.selectedpoints.length>1||(Ot+=je.selectedpoints.length,Ot>1)))return!1;return Ot===1}function $t(St,Ot,Et){var je;for(je=0;je<Ot.length;je++){var Ye=Ot[je].cd[0].trace._fullInput,et=St._fullLayout._tracePreGUI[Ye.uid]||{};et.selectedpoints===void 0&&(et.selectedpoints=Ye._input.selectedpoints||null)}var mt;if(Et){var Nt=Et.points||[];for(je=0;je<Ot.length;je++)mt=Ot[je].cd[0].trace,mt._input.selectedpoints=mt._fullInput.selectedpoints=[],mt._fullInput!==mt&&(mt.selectedpoints=[]);for(var lr=0;lr<Nt.length;lr++){var br=Nt[lr],Or=br.data,tn=br.fullData,Jr=br.pointIndex,dn=br.pointIndices;dn?([].push.apply(Or.selectedpoints,dn),mt._fullInput!==mt&&[].push.apply(tn.selectedpoints,dn)):(Or.selectedpoints.push(Jr),mt._fullInput!==mt&&tn.selectedpoints.push(Jr))}}else for(je=0;je<Ot.length;je++)mt=Ot[je].cd[0].trace,delete mt.selectedpoints,delete mt._input.selectedpoints,mt._fullInput!==mt&&delete mt._fullInput.selectedpoints;Wt(St,Ot)}function Wt(St,Ot){for(var Et=!1,je=0;je<Ot.length;je++){var Ye=Ot[je],et=Ye.cd;O.traceIs(et[0].trace,"regl")&&(Et=!0);var mt=Ye._module,Nt=mt.styleOnSelect||mt.style;Nt&&(Nt(St,et,et[0].node3),et[0].nodeRangePlot3&&Nt(St,et,et[0].nodeRangePlot3))}Et&&(W(St),$(St))}function Ht(St,Ot,Et){for(var je=Et?w.difference:w.union,Ye=je({regions:St},{regions:[Ot]}),et=Ye.regions.reverse(),mt=0;mt<et.length;mt++){var Nt=et[mt];Nt.subtract=Pr(Nt,et.slice(0,mt))}return et}function Ft(St,Ot){if(Array.isArray(St))for(var Et=Ot.cd,je=Ot.cd[0].trace,Ye=0;Ye<St.length;Ye++)St[Ye]=c(St[Ye],je,Et);return St}function st(St,Ot){for(var Et=[],je=0;je<St.length;je++){Et[je]=[];for(var Ye=0;Ye<St[je].length;Ye++){Et[je][Ye]=[],Et[je][Ye][0]=Ye?"L":"M";for(var et=0;et<St[je][Ye].length;et++)Et[je][Ye].push(St[je][Ye][et])}Ot||Et[je].push(["Z",Et[je][0][1],Et[je][0][2]])}return Et}function rt(St,Ot){for(var Et=[],je,Ye,et=0;et<Ot.length;et++){var mt=Ot[et];Ye=mt._module.selectPoints(mt,St),je=Ft(Ye,mt),Et=Et.concat(je)}return Et}function Ue(St,Ot,Et,je,Ye){var et=!!je,mt,Nt,lr;Ye&&(mt=Ye.plotinfo,Nt=Ye.xaxes[0]._id,lr=Ye.yaxes[0]._id);var br=[],Or=[],tn=kr(St),Jr=St._fullLayout;if(mt){var dn=Jr._zoomlayer,on=Jr.dragmode,Nn=h(on),Wi=_(on);if(Nn||Wi){var Oa=M(St,Nt,"x"),Da=M(St,lr,"y");if(Oa&&Da){var Aa=dn.selectAll(".select-outline-"+mt.id);if(Aa&&St._fullLayout._outlining&&Aa.length){for(var Ka=Aa[0][0],Sa=Ka.getAttribute("d"),no=I(Sa,St,mt),Fo=[],an=0;an<no.length;an++){for(var Hr=no[an],nn=[],Kr=0;Kr<Hr.length;Kr++)nn.push([$r(Oa,Hr[Kr][1]),$r(Da,Hr[Kr][2])]);nn.xref=Nt,nn.yref=lr,nn.subtract=Pr(nn,Fo),Fo.push(nn)}tn=tn.concat(Fo)}}}}var $n=Nt&&lr?[Nt+lr]:Jr._subplots.cartesian;xt(St);for(var Ai={},aa=0;aa<$n.length;aa++){var Ci=$n[aa],Ta=Ci.indexOf("y"),Na=Ci.slice(0,Ta),ro=Ci.slice(Ta),oo=Nt&&lr?Et:void 0;if(oo=Ut(tn,Na,ro,oo),oo){var xo=je;if(!et){var vr=M(St,Na,"x"),er=M(St,ro,"y");xo=Te(St,[vr],[er],Ci);for(var si=0;si<xo.length;si++){var ei=xo[si],Kn=ei.cd[0],qn=Kn.trace;if(ei._module.name==="scattergl"&&!Kn.t.xpx){var pi=qn.x,_i=qn.y,fi=qn._length;Kn.t.xpx=[],Kn.t.ypx=[];for(var Ri=0;Ri<fi;Ri++)Kn.t.xpx[Ri]=vr.c2p(pi[Ri]),Kn.t.ypx[Ri]=er.c2p(_i[Ri])}ei._module.name==="splom"&&(Ai[qn.uid]||(Ai[qn.uid]=!0))}}var $i=rt(oo,xo);br=br.concat($i),Or=Or.concat(xo)}}var Hi={points:br};$t(St,Or,Hi);var wr=Jr.clickmode,gn=wr.indexOf("event")>-1&&Ot;if(!mt&&Ot){var Xn=kr(St,!0);if(Xn.length){var Yi=Xn[0].xref,ha=Xn[0].yref;if(Yi&&ha){var Ca=rn(Xn),Ba=Rn([M(St,Yi,"x"),M(St,ha,"y")]);Ba(Hi,Ca)}}St._fullLayout._noEmitSelectedAtStart?St._fullLayout._noEmitSelectedAtStart=!1:gn&&Gn(St,Hi),Jr._reselect=!1}if(!mt&&Jr._deselect){var ji=Jr._deselect;Nt=ji.xref,lr=ji.yref,Gt(Nt,lr,Or)||Jt(St,Nt,lr,je),gn&&(Hi.points.length?Gn(St,Hi):mr(St)),Jr._deselect=!1}return{eventData:Hi,selectionTesters:Et}}function xt(St){var Ot=St.calcdata;if(Ot)for(var Et=0;Et<Ot.length;Et++){var je=Ot[Et][0],Ye=je.trace,et=St._fullLayout._splomScenes;if(et){var mt=et[Ye.uid];mt&&(mt.selectBatch=[])}}}function Gt(St,Ot,Et){for(var je=0;je<Et.length;je++){var Ye=Et[je];if(Ye.xaxis&&Ye.xaxis._id===St&&Ye.yaxis&&Ye.yaxis._id===Ot)return!0}return!1}function Jt(St,Ot,Et,je){je=Te(St,[M(St,Ot,"x")],[M(St,Et,"y")],Ot+Et);for(var Ye=0;Ye<je.length;Ye++){var et=je[Ye];et._module.selectPoints(et,!1)}$t(St,je)}function Ut(St,Ot,Et,je){for(var Ye,et=0;et<St.length;et++){var mt=St[et];if(!(Ot!==mt.xref||Et!==mt.yref))if(Ye){var Nt=!!mt.subtract;Ye=Ht(Ye,mt,Nt),je=_e(Ye)}else Ye=[mt],je=J(mt)}return je}function kr(St,Ot){for(var Et=[],je=St._fullLayout,Ye=je.selections,et=Ye.length,mt=0;mt<et;mt++)if(!(Ot&&mt!==je._activeSelectionIndex)){var Nt=Ye[mt];if(Nt){var lr=Nt.xref,br=Nt.yref,Or=M(St,lr,"x"),tn=M(St,br,"y"),Jr,dn,on,Nn,Wi;if(Nt.type==="rect"){Wi=[];var Oa=$r(Or,Nt.x0),Da=$r(Or,Nt.x1),Aa=$r(tn,Nt.y0),Ka=$r(tn,Nt.y1);Wi=[[Oa,Aa],[Oa,Ka],[Da,Ka],[Da,Aa]],Jr=Math.min(Oa,Da),dn=Math.max(Oa,Da),on=Math.min(Aa,Ka),Nn=Math.max(Aa,Ka),Wi.xmin=Jr,Wi.xmax=dn,Wi.ymin=on,Wi.ymax=Nn,Wi.xref=lr,Wi.yref=br,Wi.subtract=!1,Wi.isRect=!0,Et.push(Wi)}else if(Nt.type==="path")for(var Sa=Nt.path.split("Z"),no=[],Fo=0;Fo<Sa.length;Fo++){var an=Sa[Fo];if(an){an+="Z";var Hr=x.extractPathCoords(an,A.paramIsX,"raw"),nn=x.extractPathCoords(an,A.paramIsY,"raw");Jr=1/0,dn=-1/0,on=1/0,Nn=-1/0,Wi=[];for(var Kr=0;Kr<Hr.length;Kr++){var $n=$r(Or,Hr[Kr]),Ai=$r(tn,nn[Kr]);Wi.push([$n,Ai]),Jr=Math.min($n,Jr),dn=Math.max($n,dn),on=Math.min(Ai,on),Nn=Math.max(Ai,Nn)}Wi.xmin=Jr,Wi.xmax=dn,Wi.ymin=on,Wi.ymax=Nn,Wi.xref=lr,Wi.yref=br,Wi.subtract=Pr(Wi,no),no.push(Wi),Et.push(Wi)}}}}return Et}function Pr(St,Ot){for(var Et=!1,je=0;je<Ot.length;je++)for(var Ye=Ot[je],et=0;et<St.length;et++)if(R(St[et],Ye)){Et=!Et;break}return Et}function $r(St,Ot){return St.type==="date"&&(Ot=Ot.replace("_"," ")),St.type==="log"?St.c2p(Ot):St.r2p(Ot,null,St.calendar)}function rn(St){for(var Ot=St.length,Et=[],je=0;je<Ot;je++){var Ye=St[je];Et=Et.concat(Ye),Et=Et.concat([Ye[0]])}return kn(Et)}function kn(St){return St.isRect=St.length===5&&St[0][0]===St[4][0]&&St[0][1]===St[4][1]&&St[0][0]===St[1][0]&&St[2][0]===St[3][0]&&St[0][1]===St[3][1]&&St[1][1]===St[2][1]||St[0][1]===St[1][1]&&St[2][1]===St[3][1]&&St[0][0]===St[3][0]&&St[1][0]===St[2][0],St.isRect&&(St.xmin=Math.min(St[0][0],St[2][0]),St.xmax=Math.max(St[0][0],St[2][0]),St.ymin=Math.min(St[0][1],St[2][1]),St.ymax=Math.max(St[0][1],St[2][1])),St}function Rn(St){return function(Ot,Et){for(var je,Ye,et=0;et<St.length;et++){var mt=St[et],Nt=mt._id,lr=Nt.charAt(0);if(Et.isRect){je||(je={});var br=Et[lr+"min"],Or=Et[lr+"max"];br!==void 0&&Or!==void 0&&(je[Nt]=[ee(mt,br),ee(mt,Or)].sort(T))}else Ye||(Ye={}),Ye[Nt]=Et.map(re(mt))}je&&(Ot.range=je),Ye&&(Ot.lassoPoints=Ye)}}function ci(St){var Ot=St.plotinfo;return Ot.fillRangeItems||Rn(St.xaxes.concat(St.yaxes))}function In(St,Ot){St.emit("plotly_selecting",Ot)}function Gn(St,Ot){Ot&&(Ot.selections=(St.layout||{}).selections||[]),St.emit("plotly_selected",Ot)}function mr(St){St.emit("plotly_deselect",null)}le.exports={reselect:Ue,prepSelect:Oe,clearOutline:D,clearSelectionsCache:se,selectOnClick:ke}}}),Yo=U({"src/components/annotations/arrow_paths.js"(pe,le){le.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}]}}),al=U({"src/constants/axis_placeable_objects.js"(pe,le){le.exports={axisRefDescription:function(w,R,O){return["If set to a",w,"axis id (e.g. *"+w+"* or","*"+w+"2*), the `"+w+"` position refers to a",w,"coordinate. If set to *paper*, the `"+w+"`","position refers to the distance from the",R,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",R,"("+O+"). If set to a",w,"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",R,"of the domain of that axis: e.g.,","*"+w+"2 domain* refers to the domain of the second",w," axis and a",w,"position of 0.5 refers to the","point between the",R,"and the",O,"of the domain of the","second",w,"axis."].join(" ")}}}}),Fs=U({"src/components/annotations/attributes.js"(pe,le){var w=Yo(),R=Ir(),O=pf(),z=Tc().templatedArray;al(),le.exports=z("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:R({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:w.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:w.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",O.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",O.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",O.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",O.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:R({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})}}),hu=U({"src/traces/scatter/constants.js"(pe,le){le.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}}}),Xc=U({"src/traces/scatter/fillcolor_attribute.js"(pe,le){le.exports=function(R){return{valType:"color",editType:"style",anim:!0}}}}),Kc=U({"src/traces/scatter/attributes.js"(pe,le){var w=Wp().axisHoverFormat,R=Js().texttemplateAttrs,O=Js().hovertemplateAttrs,z=Jd(),l=Ir(),u=jl().dash,c=jl().pattern,p=ec(),f=hu(),v=Ar().extendFlat,h=Xc();function m(A){return{valType:"any",dflt:0,editType:"calc"}}function _(A){return{valType:"any",editType:"calc"}}function x(A){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}le.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:m(),yperiod:m(),xperiod0:_(),yperiod0:_(),xperiodalignment:x(),yperiodalignment:x(),xhoverformat:w("x"),yhoverformat:w("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:R({},{}),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:O({},{keys:f.eventDataKeys}),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:v({},u,{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:h(!0),fillgradient:v({type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],dflt:"none",editType:"calc"},start:{valType:"number",editType:"calc"},stop:{valType:"number",editType:"calc"},colorscale:{valType:"colorscale",editType:"style"},editType:"calc"}),fillpattern:c,marker:v({symbol:{valType:"enumerated",values:p.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:v({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},editType:"calc"},z("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"},z("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:l({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}}}),Vg=U({"src/components/selections/attributes.js"(pe,le){var w=Fs(),R=Kc().line,O=jl().dash,z=Ar().extendFlat,l=zl().overrideAll,u=Tc().templatedArray;al(),le.exports=l(u("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:z({},w.xref,{}),yref:z({},w.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:R.color,width:z({},R.width,{min:1,dflt:1}),dash:z({},O,{dflt:"dot"})}}),"arraydraw","from-root")}}),zh=U({"src/components/selections/defaults.js"(pe,le){var w=ii(),R=Yu(),O=_g(),z=Vg(),l=Nm();le.exports=function(p,f){O(p,f,{name:"selections",handleItemDefaults:u});for(var v=f.selections,h=0;h<v.length;h++){var m=v[h];m&&m.path===void 0&&(m.x0===void 0||m.x1===void 0||m.y0===void 0||m.y1===void 0)&&(f.selections[h]=null)}};function u(c,p,f){function v(W,$){return w.coerce(c,p,z,W,$)}var h=v("path"),m=h?"path":"rect",_=v("type",m),x=_!=="path";x&&delete p.path,v("opacity"),v("line.color"),v("line.width"),v("line.dash");for(var A=["x","y"],E=0;E<2;E++){var D=A[E],g={_fullLayout:f},C,I,N,F=R.coerceRef(c,p,g,D);if(C=R.getFromId(g,F),C._selectionIndices.push(p._index),N=l.rangeToShapePosition(C),I=l.shapePositionToRange(C),x){var k=D+"0",P=D+"1",T=c[k],y=c[P];c[k]=I(c[k],!0),c[P]=I(c[P],!0),R.coercePosition(p,g,v,F,k),R.coercePosition(p,g,v,F,P);var S=p[k],M=p[P];S!==void 0&&M!==void 0&&(p[k]=N(S),p[P]=N(M),c[k]=T,c[P]=y)}}x&&w.noneOrAll(c,p,["x0","x1","y0","y1"])}}}),py=U({"src/components/selections/draw_newselection/defaults.js"(pe,le){le.exports=function(R,O,z){z("newselection.mode");var l=z("newselection.line.width");l&&(z("newselection.line.color"),z("newselection.line.dash")),z("activeselection.fillcolor"),z("activeselection.opacity")}}}),kE=U({"src/plots/cartesian/include_components.js"(pe,le){var w=Mi(),R=ii(),O=Tf();le.exports=function(l){return function(c,p){var f=c[l];if(Array.isArray(f))for(var v=w.subplotsRegistry.cartesian,h=v.idRegex,m=p._subplots,_=m.xaxis,x=m.yaxis,A=m.cartesian,E=p._has("cartesian"),D=0;D<f.length;D++){var g=f[D];if(R.isPlainObject(g)){var C=O.cleanId(g.xref,"x",!1),I=O.cleanId(g.yref,"y",!1),N=h.x.test(C),F=h.y.test(I);if(N||F){E||R.pushUnique(p._basePlotModules,v);var k=!1;N&&_.indexOf(C)===-1&&(_.push(C),k=!0),F&&x.indexOf(I)===-1&&(x.push(I),k=!0),k&&N&&F&&A.push(C+I)}}}}}}}),Vf=U({"src/components/selections/index.js"(pe,le){var w=Zw(),R=Jw();le.exports={moduleType:"component",name:"selections",layoutAttributes:Vg(),supplyLayoutDefaults:zh(),supplyDrawNewSelectionDefaults:py(),includeBasePlot:kE()("selections"),draw:w.draw,drawOne:w.drawOne,reselect:R.reselect,prepSelect:R.prepSelect,clearOutline:R.clearOutline,clearSelectionsCache:R.clearSelectionsCache,selectOnClick:R.selectOnClick}}}),IE=U({"src/plots/cartesian/dragbox.js"(pe,le){var w=Ze(),R=ii(),O=R.numberFormat,z=or(),l=gA(),u=Mi(),c=R.strTranslate,p=ah(),f=Lr(),v=ec(),h=Dp(),m=Yu(),_=i_(),x=Vp(),A=m0(),E=A.selectingOrDrawing,D=A.freeMode,g=tg().FROM_TL,C=jg(),I=bx().redrawReglTraces,N=tp(),F=Tf().getFromId,k=Vf().prepSelect,P=Vf().clearOutline,T=Vf().selectOnClick,y=SA(),S=pf(),M=S.MINDRAG,W=S.MINZOOM,$=!0;function Z(Be,tt,at,gt,pt,Rt,$t,Wt){var Ht=Be._fullLayout._zoomlayer,Ft=$t+Wt==="nsew",st=($t+Wt).length===1,rt,Ue,xt,Gt,Jt,Ut,kr,Pr,$r,rn,kn,Rn,ci,In,Gn,mr,St,Ot,Et,je,Ye,et,mt;at+=tt.yaxis._shift;function Nt(){if(rt=tt.xaxis,Ue=tt.yaxis,$r=rt._length,rn=Ue._length,kr=rt._offset,Pr=Ue._offset,xt={},xt[rt._id]=rt,Gt={},Gt[Ue._id]=Ue,$t&&Wt)for(var Kn=tt.overlays,qn=0;qn<Kn.length;qn++){var pi=Kn[qn].xaxis;xt[pi._id]=pi;var _i=Kn[qn].yaxis;Gt[_i._id]=_i}Jt=Te(xt),Ut=Te(Gt),ci=J(Jt,Wt),In=J(Ut,$t),Gn=!In&&!ci,Rn=se(Be,Be._fullLayout._axisMatchGroups,xt,Gt),kn=se(Be,Be._fullLayout._axisConstraintGroups,xt,Gt,Rn);var fi=kn.isSubplotConstrained||Rn.isSubplotConstrained;mr=Wt||fi,St=$t||fi;var Ri=Be._fullLayout;Ot=Ri._has("scattergl"),Et=Ri._has("splom"),je=Ri._has("svg")}Nt();var lr=we(In+ci,Be._fullLayout.dragmode,Ft),br=Q(tt,$t+Wt+"drag",lr,at,gt,pt,Rt);if(Gn&&!Ft)return br.onmousedown=null,br.style.pointerEvents="none",br;var Or={element:br,gd:Be,plotinfo:tt};Or.prepFn=function(Kn,qn,pi){var _i=Or.dragmode,fi=Be._fullLayout.dragmode;fi!==_i&&(Or.dragmode=fi),Nt(),et=Be._fullLayout._invScaleX,mt=Be._fullLayout._invScaleY,Gn||(Ft?Kn.shiftKey?fi==="pan"?fi="zoom":E(fi)||(fi="pan"):Kn.ctrlKey&&(fi="pan"):fi="pan"),D(fi)?Or.minDrag=1:Or.minDrag=void 0,E(fi)?(Or.xaxes=Jt,Or.yaxes=Ut,k(Kn,qn,pi,Or,fi)):(Or.clickFn=Jr,E(_i)&&tn(),Gn||(fi==="zoom"?(Or.moveFn=an,Or.doneFn=nn,Or.minDrag=1,Fo(Kn,qn,pi)):fi==="pan"&&(Or.moveFn=Ta,Or.doneFn=xo))),Be._fullLayout._redrag=function(){var Ri=Be._dragdata;if(Ri&&Ri.element===br){var $i=Be._fullLayout.dragmode;E($i)||(Nt(),vr([0,0,$r,rn]),Or.moveFn(Ri.dx,Ri.dy))}}};function tn(){Or.plotinfo.selection=!1,P(Be)}function Jr(Kn,qn){var pi=Or.gd;if(pi._fullLayout._activeShapeIndex>=0){pi._fullLayout._deactivateShape(pi);return}var _i=pi._fullLayout.clickmode;if(be(pi),Kn===2&&!st&&oo(),Ft)_i.indexOf("select")>-1&&T(qn,pi,Jt,Ut,tt.id,Or),_i.indexOf("event")>-1&&h.click(pi,qn,tt.id);else if(Kn===1&&st){var fi=$t?Ue:rt,Ri=$t==="s"||Wt==="w"?0:1,$i=fi._name+".range["+Ri+"]",Hi=G(fi,Ri),wr="left",gn="middle";if(fi.fixedrange)return;$t?(gn=$t==="n"?"top":"bottom",fi.side==="right"&&(wr="right")):Wt==="e"&&(wr="right"),pi._context.showAxisRangeEntryBoxes&&w.select(br).call(p.makeEditable,{gd:pi,immediate:!0,background:pi._fullLayout.paper_bgcolor,text:String(Hi),fill:fi.tickfont?fi.tickfont.color:"#444",horizontalAlign:wr,verticalAlign:gn}).on("edit",function(Xn){var Yi=fi.d2r(Xn);Yi!==void 0&&u.call("_guiRelayout",pi,$i,Yi)})}}x.init(Or);var dn,on,Nn,Wi,Oa,Da,Aa,Ka,Sa,no;function Fo(Kn,qn,pi){var _i=br.getBoundingClientRect();dn=qn-_i.left,on=pi-_i.top,Be._fullLayout._calcInverseTransform(Be);var fi=R.apply3DTransform(Be._fullLayout._invTransform)(dn,on);dn=fi[0],on=fi[1],Nn={l:dn,r:dn,w:0,t:on,b:on,h:0},Wi=Be._hmpixcount?Be._hmlumcount/Be._hmpixcount:z(Be._fullLayout.plot_bgcolor).getLuminance(),Oa="M0,0H"+$r+"V"+rn+"H0V0",Da=!1,Aa="xy",no=!1,Ka=Oe(Ht,Wi,kr,Pr,Oa),Sa=ke(Ht,kr,Pr)}function an(Kn,qn){if(Be._transitioningWithDuration)return!1;var pi=Math.max(0,Math.min($r,et*Kn+dn)),_i=Math.max(0,Math.min(rn,mt*qn+on)),fi=Math.abs(pi-dn),Ri=Math.abs(_i-on);Nn.l=Math.min(dn,pi),Nn.r=Math.max(dn,pi),Nn.t=Math.min(on,_i),Nn.b=Math.max(on,_i);function $i(){Aa="",Nn.r=Nn.l,Nn.t=Nn.b,Sa.attr("d","M0,0Z")}if(kn.isSubplotConstrained)fi>W||Ri>W?(Aa="xy",fi/$r>Ri/rn?(Ri=fi*rn/$r,on>_i?Nn.t=on-Ri:Nn.b=on+Ri):(fi=Ri*$r/rn,dn>pi?Nn.l=dn-fi:Nn.r=dn+fi),Sa.attr("d",xe(Nn))):$i();else if(Rn.isSubplotConstrained)if(fi>W||Ri>W){Aa="xy";var Hi=Math.min(Nn.l/$r,(rn-Nn.b)/rn),wr=Math.max(Nn.r/$r,(rn-Nn.t)/rn);Nn.l=Hi*$r,Nn.r=wr*$r,Nn.b=(1-Hi)*rn,Nn.t=(1-wr)*rn,Sa.attr("d",xe(Nn))}else $i();else!In||Ri<Math.min(Math.max(fi*.6,M),W)?fi<M||!ci?$i():(Nn.t=0,Nn.b=rn,Aa="x",Sa.attr("d",he(Nn,on))):!ci||fi<Math.min(Ri*.6,W)?(Nn.l=0,Nn.r=$r,Aa="y",Sa.attr("d",De(Nn,dn))):(Aa="xy",Sa.attr("d",xe(Nn)));Nn.w=Nn.r-Nn.l,Nn.h=Nn.b-Nn.t,Aa&&(no=!0),Be._dragged=no,Le(Ka,Sa,Nn,Oa,Da,Wi),Hr(),Be.emit("plotly_relayouting",Ye),Da=!0}function Hr(){Ye={},(Aa==="xy"||Aa==="x")&&(ee(Jt,Nn.l/$r,Nn.r/$r,Ye,kn.xaxes),Na("x",Ye)),(Aa==="xy"||Aa==="y")&&(ee(Ut,(rn-Nn.b)/rn,(rn-Nn.t)/rn,Ye,kn.yaxes),Na("y",Ye))}function nn(){Hr(),be(Be),xo(),_e(Be)}var Kr=[0,0,$r,rn],$n=null,Ai=S.REDRAWDELAY,aa=tt.mainplot?Be._fullLayout._plots[tt.mainplot]:tt;function Ci(Kn){if(!Be._context._scrollZoom.cartesian&&!Be._fullLayout._enablescrollzoom)return;if(tn(),Be._transitioningWithDuration){Kn.preventDefault(),Kn.stopPropagation();return}Nt(),clearTimeout($n);var qn=-Kn.deltaY;if(isFinite(qn)||(qn=Kn.wheelDelta/10),!isFinite(qn)){R.log("Did not find wheel motion attributes: ",Kn);return}var pi=Math.exp(-Math.min(Math.max(qn,-20),20)/200),_i=aa.draglayer.select(".nsewdrag").node().getBoundingClientRect(),fi=(Kn.clientX-_i.left)/_i.width,Ri=(_i.bottom-Kn.clientY)/_i.height,$i;function Hi(wr,gn,Xn){if(wr.fixedrange)return;var Yi=R.simpleMap(wr.range,wr.r2l),ha=Yi[0]+(Yi[1]-Yi[0])*gn;function Ca(Ba){return wr.l2r(ha+(Ba-ha)*Xn)}wr.range=Yi.map(Ca)}if(mr){for(Wt||(fi=.5),$i=0;$i<Jt.length;$i++)Hi(Jt[$i],fi,pi);Na("x"),Kr[2]*=pi,Kr[0]+=Kr[2]*fi*(1/pi-1)}if(St){for($t||(Ri=.5),$i=0;$i<Ut.length;$i++)Hi(Ut[$i],Ri,pi);Na("y"),Kr[3]*=pi,Kr[1]+=Kr[3]*(1-Ri)*(1/pi-1)}vr(Kr),ro(),Be.emit("plotly_relayouting",Ye),$n=setTimeout(function(){Be._fullLayout&&(Kr=[0,0,$r,rn],xo())},Ai),Kn.preventDefault()}$t.length*Wt.length!==1&&Ee(br,Ci);function Ta(Kn,qn){if(Kn=Kn*et,qn=qn*mt,Be._transitioningWithDuration)return;if(Be._fullLayout._replotting=!0,ci==="ew"||In==="ns"){var pi=ci?-Kn:0,_i=In?-qn:0;if(Rn.isSubplotConstrained){if(ci&&In){var fi=(Kn/$r-qn/rn)/2;Kn=fi*$r,qn=-fi*rn,pi=-Kn,_i=-qn}In?pi=-_i*$r/rn:_i=-pi*rn/$r}ci&&(re(Jt,Kn),Na("x")),In&&(re(Ut,qn),Na("y")),vr([pi,_i,$r,rn]),ro(),Be.emit("plotly_relayouting",Ye);return}function Ri(Ca,Ba,ji){for(var Ea=1-Ba,cs,No,Vs=0;Vs<Ca.length;Vs++){var pl=Ca[Vs];if(!pl.fixedrange){cs=pl,No=pl._rl[Ea]+(pl._rl[Ba]-pl._rl[Ea])/fe(ji/pl._length);var kl=pl.l2r(No);kl!==!1&&kl!==void 0&&(pl.range[Ba]=kl)}}return cs._length*(cs._rl[Ba]-No)/(cs._rl[Ba]-cs._rl[Ea])}var $i=ci==="w"==(In==="n")?1:-1;if(ci&&In&&(kn.isSubplotConstrained||Rn.isSubplotConstrained)){var Hi=(Kn/$r+$i*qn/rn)/2;Kn=Hi*$r,qn=$i*Hi*rn}var wr,gn;if(ci==="w"?Kn=Ri(Jt,0,Kn):ci==="e"?Kn=Ri(Jt,1,-Kn):ci||(Kn=0),In==="n"?qn=Ri(Ut,1,qn):In==="s"?qn=Ri(Ut,0,-qn):In||(qn=0),wr=ci==="w"?Kn:0,gn=In==="n"?qn:0,kn.isSubplotConstrained&&!Rn.isSubplotConstrained||Rn.isSubplotConstrained&&ci&&In&&$i>0){var Xn;if(Rn.isSubplotConstrained||!ci&&In.length===1){for(Xn=0;Xn<Jt.length;Xn++)Jt[Xn].range=Jt[Xn]._r.slice(),y(Jt[Xn],1-qn/rn);Kn=qn*$r/rn,wr=Kn/2}if(Rn.isSubplotConstrained||!In&&ci.length===1){for(Xn=0;Xn<Ut.length;Xn++)Ut[Xn].range=Ut[Xn]._r.slice(),y(Ut[Xn],1-Kn/$r);qn=Kn*rn/$r,gn=qn/2}}(!Rn.isSubplotConstrained||!In)&&Na("x"),(!Rn.isSubplotConstrained||!ci)&&Na("y");var Yi=$r-Kn,ha=rn-qn;Rn.isSubplotConstrained&&!(ci&&In)&&(ci?(gn=wr?0:Kn*rn/$r,ha=Yi*rn/$r):(wr=gn?0:qn*$r/rn,Yi=ha*$r/rn)),vr([wr,gn,Yi,ha]),ro(),Be.emit("plotly_relayouting",Ye)}function Na(Kn,qn){for(var pi=Rn.isSubplotConstrained?{x:Ut,y:Jt}[Kn]:Rn[Kn+"axes"],_i=Rn.isSubplotConstrained?{x:Jt,y:Ut}[Kn]:[],fi=0;fi<pi.length;fi++){var Ri=pi[fi],$i=Ri._id,Hi=Rn.xLinks[$i]||Rn.yLinks[$i],wr=_i[0]||xt[Hi]||Gt[Hi];wr&&(qn?(qn[Ri._name+".range[0]"]=qn[wr._name+".range[0]"],qn[Ri._name+".range[1]"]=qn[wr._name+".range[1]"]):Ri.range=wr.range.slice())}}function ro(){var Kn=[],qn;function pi($i){for(qn=0;qn<$i.length;qn++)$i[qn].fixedrange||Kn.push($i[qn]._id)}function _i($i,Hi){for(qn=0;qn<$i.length;qn++){var wr=$i[qn],gn=wr[Hi];!wr.fixedrange&&gn.tickmode==="sync"&&Kn.push(gn._id)}}for(mr&&(pi(Jt),pi(kn.xaxes),pi(Rn.xaxes),_i(tt.overlays,"xaxis")),St&&(pi(Ut),pi(kn.yaxes),pi(Rn.yaxes),_i(tt.overlays,"yaxis")),Ye={},qn=0;qn<Kn.length;qn++){var fi=Kn[qn],Ri=F(Be,fi);m.drawOne(Be,Ri,{skipTitle:!0}),Ye[Ri._name+".range[0]"]=Ri.range[0],Ye[Ri._name+".range[1]"]=Ri.range[1]}m.redrawComponents(Be,Kn)}function oo(){if(!Be._transitioningWithDuration){var Kn=Be._context.doubleClick,qn=[];ci&&(qn=qn.concat(Jt)),In&&(qn=qn.concat(Ut)),Rn.xaxes&&(qn=qn.concat(Rn.xaxes)),Rn.yaxes&&(qn=qn.concat(Rn.yaxes));var pi={},_i,fi;if(Kn==="reset+autosize")for(Kn="autosize",fi=0;fi<qn.length;fi++){_i=qn[fi];var Ri=_i._rangeInitial0,$i=_i._rangeInitial1,Hi=Ri!==void 0||$i!==void 0;if(Hi&&(Ri!==void 0&&Ri!==_i.range[0]||$i!==void 0&&$i!==_i.range[1])||!Hi&&_i.autorange!==!0){Kn="reset";break}}if(Kn==="autosize")for(fi=0;fi<qn.length;fi++)_i=qn[fi],_i.fixedrange||(pi[_i._name+".autorange"]=!0);else if(Kn==="reset"){for((ci||kn.isSubplotConstrained)&&(qn=qn.concat(kn.xaxes)),In&&!kn.isSubplotConstrained&&(qn=qn.concat(kn.yaxes)),kn.isSubplotConstrained&&(ci?In||(qn=qn.concat(Ut)):qn=qn.concat(Jt)),fi=0;fi<qn.length;fi++)if(_i=qn[fi],!_i.fixedrange){var wr=_i._name,gn=_i._autorangeInitial;_i._rangeInitial0===void 0&&_i._rangeInitial1===void 0?pi[wr+".autorange"]=!0:_i._rangeInitial0===void 0?(pi[wr+".autorange"]=gn,pi[wr+".range"]=[null,_i._rangeInitial1]):_i._rangeInitial1===void 0?(pi[wr+".range"]=[_i._rangeInitial0,null],pi[wr+".autorange"]=gn):pi[wr+".range"]=[_i._rangeInitial0,_i._rangeInitial1]}}Be.emit("plotly_doubleclick",null),u.call("_guiRelayout",Be,pi)}}function xo(){vr([0,0,$r,rn]),R.syncOrAsync([N.previousPromises,function(){Be._fullLayout._replotting=!1,u.call("_guiRelayout",Be,Ye)}],Be)}function vr(Kn){var qn=Be._fullLayout,pi=qn._plots,_i=qn._subplots.cartesian,fi,Ri,$i,Hi;if(Et&&u.subplotsRegistry.splom.drag(Be),Ot){for(fi=0;fi<_i.length;fi++)if(Ri=pi[_i[fi]],$i=Ri.xaxis,Hi=Ri.yaxis,Ri._scene){$i.limitRange&&$i.limitRange(),Hi.limitRange&&Hi.limitRange();var wr=R.simpleMap($i.range,$i.r2l),gn=R.simpleMap(Hi.range,Hi.r2l);Ri._scene.update({range:[wr[0],gn[0],wr[1],gn[1]]})}}if((Et||Ot)&&(C(Be),I(Be)),je){var Xn=Kn[2]/rt._length,Yi=Kn[3]/Ue._length;for(fi=0;fi<_i.length;fi++){Ri=pi[_i[fi]],$i=Ri.xaxis,Hi=Ri.yaxis;var ha=(mr||Rn.isSubplotConstrained)&&!$i.fixedrange&&xt[$i._id],Ca=(St||Rn.isSubplotConstrained)&&!Hi.fixedrange&&Gt[Hi._id],Ba,ji,Ea,cs;if(ha?(Ba=Xn,Ea=Wt||Rn.isSubplotConstrained?Kn[0]:ei($i,Ba)):Rn.xaHash[$i._id]?(Ba=Xn,Ea=Kn[0]*$i._length/rt._length):Rn.yaHash[$i._id]?(Ba=Yi,Ea=In==="ns"?-Kn[1]*$i._length/Ue._length:ei($i,Ba,{n:"top",s:"bottom"}[In])):(Ba=er($i,Xn,Yi),Ea=si($i,Ba)),Ba>1&&($i.maxallowed!==void 0&&mr===($i.range[0]<$i.range[1]?"e":"w")||$i.minallowed!==void 0&&mr===($i.range[0]<$i.range[1]?"w":"e"))&&(Ba=1,Ea=0),Ca?(ji=Yi,cs=$t||Rn.isSubplotConstrained?Kn[1]:ei(Hi,ji)):Rn.yaHash[Hi._id]?(ji=Yi,cs=Kn[1]*Hi._length/Ue._length):Rn.xaHash[Hi._id]?(ji=Xn,cs=ci==="ew"?-Kn[0]*Hi._length/rt._length:ei(Hi,ji,{e:"right",w:"left"}[ci])):(ji=er(Hi,Xn,Yi),cs=si(Hi,ji)),ji>1&&(Hi.maxallowed!==void 0&&St===(Hi.range[0]<Hi.range[1]?"n":"s")||Hi.minallowed!==void 0&&St===(Hi.range[0]<Hi.range[1]?"s":"n"))&&(ji=1,cs=0),!(!Ba&&!ji)){Ba||(Ba=1),ji||(ji=1);var No=$i._offset-Ea/Ba,Vs=Hi._offset-cs/ji;Ri.clipRect.call(v.setTranslate,Ea,cs).call(v.setScale,Ba,ji),Ri.plot.call(v.setTranslate,No,Vs).call(v.setScale,1/Ba,1/ji),(Ba!==Ri.xScaleFactor||ji!==Ri.yScaleFactor)&&(v.setPointGroupScale(Ri.zoomScalePts,Ba,ji),v.setTextPointsScale(Ri.zoomScaleTxt,Ba,ji)),v.hideOutsideRangePoints(Ri.clipOnAxisFalseTraces,Ri),Ri.xScaleFactor=Ba,Ri.yScaleFactor=ji}}}}function er(Kn,qn,pi){return Kn.fixedrange?0:mr&&kn.xaHash[Kn._id]?qn:St&&(kn.isSubplotConstrained?kn.xaHash:kn.yaHash)[Kn._id]?pi:0}function si(Kn,qn){return qn?(Kn.range=Kn._r.slice(),y(Kn,qn),ei(Kn,qn)):0}function ei(Kn,qn,pi){return Kn._length*(1-qn)*g[pi||Kn.constraintoward||"middle"]}return br}function K(Be,tt,at,gt){var pt=R.ensureSingle(Be.draglayer,tt,at,function(Rt){Rt.classed("drag",!0).style({fill:"transparent","stroke-width":0}).attr("data-subplot",Be.id)});return pt.call(_,gt),pt.node()}function Q(Be,tt,at,gt,pt,Rt,$t){var Wt=K(Be,"rect",tt,at);return w.select(Wt).call(v.setRect,gt,pt,Rt,$t),Wt}function J(Be,tt){for(var at=0;at<Be.length;at++)if(!Be[at].fixedrange)return tt;return""}function G(Be,tt){var at=Be.range[tt],gt=Math.abs(at-Be.range[1-tt]),pt;return Be.type==="date"?at:Be.type==="log"?(pt=Math.ceil(Math.max(0,-Math.log(gt)/Math.LN10))+3,O("."+pt+"g")(Math.pow(10,at))):(pt=Math.floor(Math.log(Math.abs(at))/Math.LN10)-Math.floor(Math.log(gt)/Math.LN10)+4,O("."+String(pt)+"g")(at))}function ee(Be,tt,at,gt,pt){for(var Rt=0;Rt<Be.length;Rt++){var $t=Be[Rt];if(!$t.fixedrange)if($t.rangebreaks){var Wt=$t._id.charAt(0)==="y",Ht=Wt?1-tt:tt,Ft=Wt?1-at:at;gt[$t._name+".range[0]"]=$t.l2r($t.p2l(Ht*$t._length)),gt[$t._name+".range[1]"]=$t.l2r($t.p2l(Ft*$t._length))}else{var st=$t._rl[0],rt=$t._rl[1]-st;gt[$t._name+".range[0]"]=$t.l2r(st+rt*tt),gt[$t._name+".range[1]"]=$t.l2r(st+rt*at)}}if(pt&&pt.length){var Ue=(tt+(1-at))/2;ee(pt,Ue,1-Ue,gt,[])}}function re(Be,tt){for(var at=0;at<Be.length;at++){var gt=Be[at];if(!gt.fixedrange){if(gt.rangebreaks){var pt=0,Rt=gt._length,$t=gt.p2l(pt+tt)-gt.p2l(pt),Wt=gt.p2l(Rt+tt)-gt.p2l(Rt),Ht=($t+Wt)/2;gt.range=[gt.l2r(gt._rl[0]-Ht),gt.l2r(gt._rl[1]-Ht)]}else gt.range=[gt.l2r(gt._rl[0]-tt/gt._m),gt.l2r(gt._rl[1]-tt/gt._m)];gt.limitRange&&gt.limitRange()}}}function fe(Be){return 1-(Be>=0?Math.min(Be,.9):1/(1/Math.max(Be,-.3)+3.222))}function we(Be,tt,at){return Be?Be==="nsew"?at?"":tt==="pan"?"move":"crosshair":Be.toLowerCase()+"-resize":"pointer"}function Oe(Be,tt,at,gt,pt){return Be.append("path").attr("class","zoombox").style({fill:tt>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",c(at,gt)).attr("d",pt+"Z")}function ke(Be,tt,at){return Be.append("path").attr("class","zoombox-corners").style({fill:f.background,stroke:f.defaultLine,"stroke-width":1,opacity:0}).attr("transform",c(tt,at)).attr("d","M0,0Z")}function Le(Be,tt,at,gt,pt,Rt){Be.attr("d",gt+"M"+at.l+","+at.t+"v"+at.h+"h"+at.w+"v-"+at.h+"h-"+at.w+"Z"),oe(Be,tt,pt,Rt)}function oe(Be,tt,at,gt){at||(Be.transition().style("fill",gt>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),tt.transition().style("opacity",1).duration(200))}function be(Be){w.select(Be).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function _e(Be){$&&Be.data&&Be._context.showTips&&(R.notifier(R._(Be,"Double-click to zoom back out"),"long"),$=!1)}function he(Be,tt){return"M"+(Be.l-.5)+","+(tt-W-.5)+"h-3v"+(2*W+1)+"h3ZM"+(Be.r+.5)+","+(tt-W-.5)+"h3v"+(2*W+1)+"h-3Z"}function De(Be,tt){return"M"+(tt-W-.5)+","+(Be.t-.5)+"v-3h"+(2*W+1)+"v3ZM"+(tt-W-.5)+","+(Be.b+.5)+"v3h"+(2*W+1)+"v-3Z"}function xe(Be){var tt=Math.floor(Math.min(Be.b-Be.t,Be.r-Be.l,W)/2);return"M"+(Be.l-3.5)+","+(Be.t-.5+tt)+"h3v"+-tt+"h"+tt+"v-3h-"+(tt+3)+"ZM"+(Be.r+3.5)+","+(Be.t-.5+tt)+"h-3v"+-tt+"h"+-tt+"v-3h"+(tt+3)+"ZM"+(Be.r+3.5)+","+(Be.b+.5-tt)+"h-3v"+tt+"h"+-tt+"v3h"+(tt+3)+"ZM"+(Be.l-3.5)+","+(Be.b+.5-tt)+"h3v"+tt+"h"+tt+"v3h-"+(tt+3)+"Z"}function se(Be,tt,at,gt,pt){for(var Rt=!1,$t={},Wt={},Ht,Ft,st,rt,Ue=(pt||{}).xaHash,xt=(pt||{}).yaHash,Gt=0;Gt<tt.length;Gt++){var Jt=tt[Gt];for(Ht in at)if(Jt[Ht]){for(st in Jt)!(pt&&(Ue[st]||xt[st]))&&!(st.charAt(0)==="x"?at:gt)[st]&&($t[st]=Ht);for(Ft in gt)!(pt&&(Ue[Ft]||xt[Ft]))&&Jt[Ft]&&(Rt=!0)}for(Ft in gt)if(Jt[Ft])for(rt in Jt)!(pt&&(Ue[rt]||xt[rt]))&&!(rt.charAt(0)==="x"?at:gt)[rt]&&(Wt[rt]=Ft)}Rt&&(R.extendFlat($t,Wt),Wt={});var Ut={},kr=[];for(st in $t){var Pr=F(Be,st);kr.push(Pr),Ut[Pr._id]=Pr}var $r={},rn=[];for(rt in Wt){var kn=F(Be,rt);rn.push(kn),$r[kn._id]=kn}return{xaHash:Ut,yaHash:$r,xaxes:kr,yaxes:rn,xLinks:$t,yLinks:Wt,isSubplotConstrained:Rt}}function Ee(Be,tt){if(!l)Be.onwheel!==void 0?Be.onwheel=tt:Be.onmousewheel!==void 0?Be.onmousewheel=tt:Be.isAddedWheelEvent||(Be.isAddedWheelEvent=!0,Be.addEventListener("wheel",tt,{passive:!1}));else{var at=Be.onwheel!==void 0?"wheel":"mousewheel";Be._onwheel&&Be.removeEventListener(at,Be._onwheel),Be._onwheel=tt,Be.addEventListener(at,tt,{passive:!1})}}function Te(Be){var tt=[];for(var at in Be)tt.push(Be[at]);return tt}le.exports={makeDragBox:Z,makeDragger:K,makeRectDragger:Q,makeZoombox:Oe,makeCorners:ke,updateZoombox:Le,xyCorners:xe,transitionZoombox:oe,removeZoombox:be,showDoubleClickNotifier:_e,attachWheelEventHandler:Ee}}}),Z_=U({"src/plots/cartesian/graph_interact.js"(pe){var le=Ze(),w=Dp(),R=Vp(),O=i_(),z=IE().makeDragBox,l=pf().DRAGGERSIZE;pe.initInteractions=function(c){var p=c._fullLayout;if(c._context.staticPlot){le.select(c).selectAll(".drag").remove();return}if(!(!p._has("cartesian")&&!p._has("splom"))){var f=Object.keys(p._plots||{}).sort(function(h,m){if((p._plots[h].mainplot&&!0)===(p._plots[m].mainplot&&!0)){var _=h.split("y"),x=m.split("y");return _[0]===x[0]?Number(_[1]||1)-Number(x[1]||1):Number(_[0]||1)-Number(x[0]||1)}return p._plots[h].mainplot?1:-1});f.forEach(function(h){var m=p._plots[h],_=m.xaxis,x=m.yaxis;if(!m.mainplot){var A=z(c,m,_._offset,x._offset,_._length,x._length,"ns","ew");A.onmousemove=function(g){c._fullLayout._rehover=function(){c._fullLayout._hoversubplot===h&&c._fullLayout._plots[h]&&w.hover(c,g,h)},w.hover(c,g,h),c._fullLayout._lasthover=A,c._fullLayout._hoversubplot=h},A.onmouseout=function(g){c._dragging||(c._fullLayout._hoversubplot=null,R.unhover(c,g))},c._context.showAxisDragHandles&&(z(c,m,_._offset-l,x._offset-l,l,l,"n","w"),z(c,m,_._offset+_._length,x._offset-l,l,l,"n","e"),z(c,m,_._offset-l,x._offset+x._length,l,l,"s","w"),z(c,m,_._offset+_._length,x._offset+x._length,l,l,"s","e"))}if(c._context.showAxisDragHandles){if(h===_._mainSubplot){var E=_._mainLinePosition;_.side==="top"&&(E-=l),z(c,m,_._offset+_._length*.1,E,_._length*.8,l,"","ew"),z(c,m,_._offset,E,_._length*.1,l,"","w"),z(c,m,_._offset+_._length*.9,E,_._length*.1,l,"","e")}if(h===x._mainSubplot){var D=x._mainLinePosition;x.side!=="right"&&(D-=l),z(c,m,D,x._offset+x._length*.1,l,x._length*.8,"ns",""),z(c,m,D,x._offset+x._length*.9,l,x._length*.1,"s",""),z(c,m,D,x._offset,l,x._length*.1,"n","")}}});var v=p._hoverlayer.node();v.onmousemove=function(h){h.target=c._fullLayout._lasthover,w.hover(c,h,p._hoversubplot)},v.onclick=function(h){h.target=c._fullLayout._lasthover,w.click(c,h)},v.onmousedown=function(h){c._fullLayout._lasthover.onmousedown(h)},pe.updateFx(c)}},pe.updateFx=function(u){var c=u._fullLayout,p=c.dragmode==="pan"?"move":"crosshair";O(c._draggers,p)}}}),l_=U({"src/plot_api/container_array_match.js"(pe,le){var w=Mi();le.exports=function(O){for(var z=w.layoutArrayContainers,l=w.layoutArrayRegexes,u=O.split("[")[0],c,p,f=0;f<l.length;f++)if(p=O.match(l[f]),p&&p.index===0){c=p[0];break}if(c||(c=z[z.indexOf(u)]),!c)return!1;var v=O.substr(c.length);return v?(p=v.match(/^\[(0|[1-9][0-9]*)\](\.(.+))?$/),p?{array:c,index:Number(p[1]),property:p[3]||""}:!1):{array:c,index:"",property:""}}}}),xx=U({"src/plot_api/manage_arrays.js"(pe){var le=Lt(),w=Oi(),R=gi(),O=ea().sorterAsc,z=Mi();pe.containerArrayMatch=l_();var l=pe.isAddVal=function(p){return p==="add"||le(p)},u=pe.isRemoveVal=function(p){return p===null||p==="remove"};pe.applyContainerArrayChanges=function(p,f,v,h,m){var _=f.astr,x=z.getComponentMethod(_,"supplyLayoutDefaults"),A=z.getComponentMethod(_,"draw"),E=z.getComponentMethod(_,"drawOne"),D=h.replot||h.recalc||x===w||A===w,g=p.layout,C=p._fullLayout;if(v[""]){Object.keys(v).length>1&&R.warn("Full array edits are incompatible with other edits",_);var I=v[""][""];if(u(I))f.set(null);else if(Array.isArray(I))f.set(I);else return R.warn("Unrecognized full array edit value",_,I),!0;return D?!1:(x(g,C),A(p),!0)}var N=Object.keys(v).map(Number).sort(O),F=f.get(),k=F||[],P=m(C,_).get(),T=[],y=-1,S=k.length,M,W,$,Z,K,Q,J,G;for(M=0;M<N.length;M++){if($=N[M],Z=v[$],K=Object.keys(Z),Q=Z[""],J=l(Q),$<0||$>k.length-(J?0:1)){R.warn("index out of range",_,$);continue}if(Q!==void 0)K.length>1&&R.warn("Insertion & removal are incompatible with edits to the same index.",_,$),u(Q)?T.push($):J?(Q==="add"&&(Q={}),k.splice($,0,Q),P&&P.splice($,0,{})):R.warn("Unrecognized full object edit value",_,$,Q),y===-1&&(y=$);else for(W=0;W<K.length;W++)G=_+"["+$+"].",m(k[$],K[W],G).set(Z[K[W]])}for(M=T.length-1;M>=0;M--)k.splice(T[M],1),P&&P.splice(T[M],1);if(k.length?F||f.set(k):f.set(null),D)return!1;if(x(g,C),E!==w){var ee;if(y===-1)ee=N;else{for(S=Math.max(k.length,S),ee=[],M=0;M<N.length&&($=N[M],!($>=y));M++)ee.push($);for(M=y;M<S;M++)ee.push(M)}for(M=0;M<ee.length;M++)E(p,ee[M])}else A(p);return!0}}}),uT=U({"src/plot_api/helpers.js"(pe){var le=_t();Ns();var w=Mi(),R=ii(),O=tp(),z=Tf(),l=Lr(),u=z.cleanId,c=z.getFromTrace,p=w.traceIs;pe.clearPromiseQueue=function(D){Array.isArray(D._promises)&&D._promises.length>0&&R.log("Clearing previous rejected promises from queue."),D._promises=[]},pe.cleanLayout=function(D){var g;D||(D={}),D.xaxis1&&(D.xaxis||(D.xaxis=D.xaxis1),delete D.xaxis1),D.yaxis1&&(D.yaxis||(D.yaxis=D.yaxis1),delete D.yaxis1),D.scene1&&(D.scene||(D.scene=D.scene1),delete D.scene1);var C=(O.subplotsRegistry.cartesian||{}).attrRegex;(O.subplotsRegistry.polar||{}).attrRegex,(O.subplotsRegistry.ternary||{}).attrRegex,(O.subplotsRegistry.gl3d||{}).attrRegex;var I=Object.keys(D);for(g=0;g<I.length;g++){var N=I[g];if(C&&C.test(N)){var F=D[N];F.anchor&&F.anchor!=="free"&&(F.anchor=u(F.anchor)),F.overlaying&&(F.overlaying=u(F.overlaying)),F.type||(F.isdate?F.type="date":F.islog?F.type="log":F.isdate===!1&&F.islog===!1&&(F.type="linear")),(F.autorange==="withzero"||F.autorange==="tozero")&&(F.autorange=!0,F.rangemode="tozero"),F.insiderange&&delete F.range,delete F.islog,delete F.isdate,delete F.categories,_(F,"domain")&&delete F.domain}}var k=Array.isArray(D.annotations)?D.annotations.length:0;for(g=0;g<k;g++){var P=D.annotations[g];R.isPlainObject(P)&&(f(P,"xref"),f(P,"yref"))}var T=Array.isArray(D.shapes)?D.shapes.length:0;for(g=0;g<T;g++){var y=D.shapes[g];R.isPlainObject(y)&&(f(y,"xref"),f(y,"yref"))}var S=Array.isArray(D.images)?D.images.length:0;for(g=0;g<S;g++){var M=D.images[g];R.isPlainObject(M)&&(f(M,"xref"),f(M,"yref"))}var W=D.legend;return W&&(W.x>3?(W.x=1.02,W.xanchor="left"):W.x<-2&&(W.x=-.02,W.xanchor="right"),W.y>3?(W.y=1.02,W.yanchor="bottom"):W.y<-2&&(W.y=-.02,W.yanchor="top")),D.dragmode==="rotate"&&(D.dragmode="orbit"),l.clean(D),D.template&&D.template.layout&&pe.cleanLayout(D.template.layout),D};function f(D,g){var C=D[g],I=g.charAt(0);C&&C!=="paper"&&(D[g]=u(C,I,!0))}pe.cleanData=function(D){for(var g=0;g<D.length;g++){var C=D[g],I;if(C.type==="histogramy"&&"xbins"in C&&!("ybins"in C)&&(C.ybins=C.xbins,delete C.xbins),C.type==="histogramy"&&pe.swapXYData(C),(C.type==="histogramx"||C.type==="histogramy")&&(C.type="histogram"),"scl"in C&&!("colorscale"in C)&&(C.colorscale=C.scl,delete C.scl),"reversescl"in C&&!("reversescale"in C)&&(C.reversescale=C.reversescl,delete C.reversescl),C.xaxis&&(C.xaxis=u(C.xaxis,"x")),C.yaxis&&(C.yaxis=u(C.yaxis,"y")),p(C,"gl3d")&&C.scene&&(C.scene=O.subplotsRegistry.gl3d.cleanId(C.scene)),!p(C,"pie-like")&&!p(C,"bar-like"))if(Array.isArray(C.textposition))for(I=0;I<C.textposition.length;I++)C.textposition[I]=m(C.textposition[I]);else C.textposition&&(C.textposition=m(C.textposition));var N=w.getModule(C);if(N&&N.colorbar){var F=N.colorbar.container,k=F?C[F]:C;k&&k.colorscale&&(k.colorscale==="YIGnBu"&&(k.colorscale="YlGnBu"),k.colorscale==="YIOrRd"&&(k.colorscale="YlOrRd"))}if(C.type==="surface"&&R.isPlainObject(C.contours)){var P=["x","y","z"];for(I=0;I<P.length;I++){var T=C.contours[P[I]];R.isPlainObject(T)&&(T.highlightColor&&(T.highlightcolor=T.highlightColor,delete T.highlightColor),T.highlightWidth&&(T.highlightwidth=T.highlightWidth,delete T.highlightWidth))}}if(C.type==="candlestick"||C.type==="ohlc"){var y=(C.increasing||{}).showlegend!==!1,S=(C.decreasing||{}).showlegend!==!1,M=v(C.increasing),W=v(C.decreasing);if(M!==!1&&W!==!1){var $=h(M,W,y,S);$&&(C.name=$)}else(M||W)&&!C.name&&(C.name=M||W)}_(C,"line")&&delete C.line,"marker"in C&&(_(C.marker,"line")&&delete C.marker.line,_(C,"marker")&&delete C.marker),l.clean(C),C.autobinx&&(delete C.autobinx,delete C.xbins),C.autobiny&&(delete C.autobiny,delete C.ybins)}};function v(D){if(!R.isPlainObject(D))return!1;var g=D.name;return delete D.name,delete D.showlegend,(typeof g=="string"||typeof g=="number")&&String(g)}function h(D,g,C,I){if(C&&!I)return D;if(I&&!C||!D.trim())return g;if(!g.trim())return D;var N=Math.min(D.length,g.length),F;for(F=0;F<N&&D.charAt(F)===g.charAt(F);F++);var k=D.substr(0,F);return k.trim()}function m(D){var g="middle",C="center";return typeof D=="string"&&(D.indexOf("top")!==-1?g="top":D.indexOf("bottom")!==-1&&(g="bottom"),D.indexOf("left")!==-1?C="left":D.indexOf("right")!==-1&&(C="right")),g+" "+C}function _(D,g){return g in D&&typeof D[g]=="object"&&Object.keys(D[g]).length===0}pe.swapXYData=function(D){var g;if(R.swapAttrs(D,["?","?0","d?","?bins","nbins?","autobin?","?src","error_?"]),Array.isArray(D.z)&&Array.isArray(D.z[0])&&(D.transpose?delete D.transpose:D.transpose=!0),D.error_x&&D.error_y){var C=D.error_y,I="copy_ystyle"in C?C.copy_ystyle:!(C.color||C.thickness||C.width);R.swapAttrs(D,["error_?.copy_ystyle"]),I&&R.swapAttrs(D,["error_?.color","error_?.thickness","error_?.width"])}if(typeof D.hoverinfo=="string"){var N=D.hoverinfo.split("+");for(g=0;g<N.length;g++)N[g]==="x"?N[g]="y":N[g]==="y"&&(N[g]="x");D.hoverinfo=N.join("+")}},pe.coerceTraceIndices=function(D,g){if(le(g))return[g];if(!Array.isArray(g)||!g.length)return D.data.map(function(N,F){return F});if(Array.isArray(g)){for(var C=[],I=0;I<g.length;I++)R.isIndex(g[I],D.data.length)?C.push(g[I]):R.warn("trace index (",g[I],") is not a number or is out of bounds");return C}return g},pe.manageArrayContainers=function(D,g,C){var I=D.obj,N=D.parts,F=N.length,k=N[F-1],P=le(k);if(P&&g===null){var T=N.slice(0,F-1).join("."),y=R.nestedProperty(I,T).get();y.splice(k,1)}else P&&D.get()===void 0&&D.get()===void 0&&(C[D.astr]=null),D.set(g)};var x=/(\.[^\[\]\.]+|\[[^\[\]\.]+\])$/;function A(D){var g=D.search(x);if(g>0)return D.substr(0,g)}pe.hasParent=function(D,g){for(var C=A(g);C;){if(C in D)return!0;C=A(C)}return!1};var E=["x","y","z"];pe.clearAxisTypes=function(D,g,C){for(var I=0;I<g.length;I++)for(var N=D._fullData[I],F=0;F<3;F++){var k=c(D,N,E[F]);if(k&&k.type!=="log"){var P=k._name,T=k._id.substr(1);if(T.substr(0,5)==="scene"){if(C[T]!==void 0)continue;P=T+"."+P}var y=P+".type";C[P]===void 0&&C[y]===void 0&&R.nestedProperty(D.layout,y).set(null)}}}}}),Bh=U({"src/plot_api/plot_api.js"(pe){var le=Ze(),w=_t(),R=Ip(),O=ii(),z=O.nestedProperty,l=ih(),u=Td(),c=Mi(),p=ep(),f=tp(),v=Yu(),h=_E(),m=Hg(),_=ec(),x=Lr(),A=Z_().initInteractions,E=E1(),D=Vf().clearOutline,g=bn().dfltConfig,C=xx(),I=uT(),N=bx(),F=zl(),k=pf().AX_NAME_PATTERN,P=0,T=5;function y(je,Ye,et,mt){var Nt;if(je=O.getGraphDiv(je),l.init(je),O.isPlainObject(Ye)){var lr=Ye;Ye=lr.data,et=lr.layout,mt=lr.config,Nt=lr.frames}var br=l.triggerHandler(je,"plotly_beforeplot",[Ye,et,mt]);if(br===!1)return Promise.reject();!Ye&&!et&&!O.isPlotDiv(je)&&O.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",je);function Or(){if(Nt)return pe.addFrames(je,Nt)}Z(je,mt),et||(et={}),le.select(je).classed("js-plotly-plot",!0),_.makeTester(),Array.isArray(je._promises)||(je._promises=[]);var tn=(je.data||[]).length===0&&Array.isArray(Ye);Array.isArray(Ye)&&(I.cleanData(Ye),tn?je.data=Ye:je.data.push.apply(je.data,Ye),je.empty=!1),(!je.layout||tn)&&(je.layout=I.cleanLayout(et)),f.supplyDefaults(je);var Jr=je._fullLayout,dn=Jr._has("cartesian");Jr._replotting=!0,(tn||Jr._shouldCreateBgLayer)&&(Et(je),Jr._shouldCreateBgLayer&&delete Jr._shouldCreateBgLayer),_.initGradients(je),_.initPatterns(je),tn&&v.saveShowSpikeInitial(je);var on=!je.calcdata||je.calcdata.length!==(je._fullData||[]).length;on&&f.doCalcdata(je);for(var Nn=0;Nn<je.calcdata.length;Nn++)je.calcdata[Nn][0].trace=je._fullData[Nn];je._context.responsive?je._responsiveChartHandler||(je._responsiveChartHandler=function(){O.isHidden(je)||f.resize(je)},window.addEventListener("resize",je._responsiveChartHandler)):O.clearResponsive(je);var Wi=O.extendFlat({},Jr._size),Oa=0;function Da(){for(var nn=Jr._basePlotModules,Kr=0;Kr<nn.length;Kr++)nn[Kr].drawFramework&&nn[Kr].drawFramework(je);!Jr._glcanvas&&Jr._has("gl")&&(Jr._glcanvas=Jr._glcontainer.selectAll(".gl-canvas").data([{key:"contextLayer",context:!0,pick:!1},{key:"focusLayer",context:!1,pick:!1},{key:"pickLayer",context:!1,pick:!0}],function(Ci){return Ci.key}),Jr._glcanvas.enter().append("canvas").attr("class",function(Ci){return"gl-canvas gl-canvas-"+Ci.key.replace("Layer","")}).style({position:"absolute",top:0,left:0,overflow:"visible","pointer-events":"none"}));var $n=je._context.plotGlPixelRatio;if(Jr._glcanvas){Jr._glcanvas.attr("width",Jr.width*$n).attr("height",Jr.height*$n).style("width",Jr.width+"px").style("height",Jr.height+"px");var Ai=Jr._glcanvas.data()[0].regl;if(Ai&&(Math.floor(Jr.width*$n)!==Ai._gl.drawingBufferWidth||Math.floor(Jr.height*$n)!==Ai._gl.drawingBufferHeight)){var aa="WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.";if(Oa)O.error(aa);else return O.log(aa+" Clearing graph and plotting again."),f.cleanPlot([],{},je._fullData,Jr),f.supplyDefaults(je),Jr=je._fullLayout,f.doCalcdata(je),Oa++,Da()}}return Jr.modebar.orientation==="h"?Jr._modebardiv.style("height",null).style("width","100%"):Jr._modebardiv.style("width",null).style("height",Jr.height+"px"),f.previousPromises(je)}function Aa(){if(f.clearAutoMarginIds(je),N.drawMarginPushers(je),v.allowAutoMargin(je),je._fullLayout.title.text&&je._fullLayout.title.automargin&&f.allowAutoMargin(je,"title.automargin"),Jr._has("pie"))for(var nn=je._fullData,Kr=0;Kr<nn.length;Kr++){var $n=nn[Kr];$n.type==="pie"&&$n.automargin&&f.allowAutoMargin(je,"pie."+$n.uid+".automargin")}return f.doAutoMargin(je),f.previousPromises(je)}function Ka(){if(f.didMarginChange(Wi,Jr._size))return O.syncOrAsync([Aa,N.layoutStyles],je)}function Sa(){if(!on){no();return}return O.syncOrAsync([c.getComponentMethod("shapes","calcAutorange"),c.getComponentMethod("annotations","calcAutorange"),no],je)}function no(){je._transitioning||(N.doAutoRangeAndConstraints(je),tn&&v.saveRangeInitial(je),c.getComponentMethod("rangeslider","calcAutorange")(je))}function Fo(){return v.draw(je,tn?"":"redraw")}var an=[f.previousPromises,Or,Da,Aa,Ka];dn&&an.push(Sa),an.push(N.layoutStyles),dn&&an.push(Fo,function(Kr){var $n=Kr._fullLayout._insideTickLabelsUpdaterange;if($n)return Kr._fullLayout._insideTickLabelsUpdaterange=void 0,tt(Kr,$n).then(function(){v.saveRangeInitial(Kr,!0)})}),an.push(N.drawData,N.finalDraw,A,f.addLinks,f.rehover,f.redrag,f.reselect,f.doAutoMargin,f.previousPromises);var Hr=O.syncOrAsync(an,je);return(!Hr||!Hr.then)&&(Hr=Promise.resolve()),Hr.then(function(){return S(je),je})}function S(je){var Ye=je._fullLayout;Ye._redrawFromAutoMarginCount?Ye._redrawFromAutoMarginCount--:je.emit("plotly_afterplot")}function M(je){return O.extendFlat(g,je)}function W(je,Ye){try{je._fullLayout._paper.style("background",Ye)}catch(et){O.error(et)}}function $(je,Ye){var et=x.combine(Ye,"white");W(je,et)}function Z(je,Ye){if(!je._context){je._context=O.extendDeep({},g);var et=le.select("base");je._context._baseUrl=et.size()&&et.attr("href")?window.location.href.split("#")[0]:""}var mt=je._context,Nt,lr,br;if(Ye){for(lr=Object.keys(Ye),Nt=0;Nt<lr.length;Nt++)br=lr[Nt],!(br==="editable"||br==="edits")&&br in mt&&(br==="setBackground"&&Ye[br]==="opaque"?mt[br]=$:mt[br]=Ye[br]);var Or=Ye.editable;if(Or!==void 0)for(mt.editable=Or,lr=Object.keys(mt.edits),Nt=0;Nt<lr.length;Nt++)mt.edits[lr[Nt]]=Or;if(Ye.edits)for(lr=Object.keys(Ye.edits),Nt=0;Nt<lr.length;Nt++)br=lr[Nt],br in mt.edits&&(mt.edits[br]=Ye.edits[br]);mt._exportedPlot=Ye._exportedPlot}mt.staticPlot&&(mt.editable=!1,mt.edits={},mt.autosizable=!1,mt.scrollZoom=!1,mt.doubleClick=!1,mt.showTips=!1,mt.showLink=!1,mt.displayModeBar=!1),mt.displayModeBar==="hover"&&!R&&(mt.displayModeBar=!0),(mt.setBackground==="transparent"||typeof mt.setBackground!="function")&&(mt.setBackground=W),mt._hasZeroHeight=mt._hasZeroHeight||je.clientHeight===0,mt._hasZeroWidth=mt._hasZeroWidth||je.clientWidth===0;var tn=mt.scrollZoom,Jr=mt._scrollZoom={};if(tn===!0)Jr.cartesian=1,Jr.gl3d=1,Jr.geo=1,Jr.mapbox=1,Jr.map=1;else if(typeof tn=="string"){var dn=tn.split("+");for(Nt=0;Nt<dn.length;Nt++)Jr[dn[Nt]]=1}else tn!==!1&&(Jr.gl3d=1,Jr.geo=1,Jr.mapbox=1,Jr.map=1)}function K(je){if(je=O.getGraphDiv(je),!O.isPlotDiv(je))throw new Error("This element is not a Plotly plot: "+je);return I.cleanData(je.data),I.cleanLayout(je.layout),je.calcdata=void 0,pe._doPlot(je).then(function(){return je.emit("plotly_redraw"),je})}function Q(je,Ye,et,mt){return je=O.getGraphDiv(je),f.cleanPlot([],{},je._fullData||[],je._fullLayout||{}),f.purge(je),pe._doPlot(je,Ye,et,mt)}function J(je,Ye){var et=Ye+1,mt=[],Nt,lr;for(Nt=0;Nt<je.length;Nt++)lr=je[Nt],lr<0?mt.push(et+lr):mt.push(lr);return mt}function G(je,Ye,et){var mt,Nt;for(mt=0;mt<Ye.length;mt++){if(Nt=Ye[mt],Nt!==parseInt(Nt,10))throw new Error("all values in "+et+" must be integers");if(Nt>=je.data.length||Nt<-je.data.length)throw new Error(et+" must be valid indices for gd.data.");if(Ye.indexOf(Nt,mt+1)>-1||Nt>=0&&Ye.indexOf(-je.data.length+Nt)>-1||Nt<0&&Ye.indexOf(je.data.length+Nt)>-1)throw new Error("each index in "+et+" must be unique.")}}function ee(je,Ye,et){if(!Array.isArray(je.data))throw new Error("gd.data must be an array.");if(typeof Ye>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(Ye)||(Ye=[Ye]),G(je,Ye,"currentIndices"),typeof et<"u"&&!Array.isArray(et)&&(et=[et]),typeof et<"u"&&G(je,et,"newIndices"),typeof et<"u"&&Ye.length!==et.length)throw new Error("current and new indices must be of equal length.")}function re(je,Ye,et){var mt,Nt;if(!Array.isArray(je.data))throw new Error("gd.data must be an array.");if(typeof Ye>"u")throw new Error("traces must be defined.");for(Array.isArray(Ye)||(Ye=[Ye]),mt=0;mt<Ye.length;mt++)if(Nt=Ye[mt],typeof Nt!="object"||Array.isArray(Nt)||Nt===null)throw new Error("all values in traces array must be non-array objects");if(typeof et<"u"&&!Array.isArray(et)&&(et=[et]),typeof et<"u"&&et.length!==Ye.length)throw new Error("if indices is specified, traces.length must equal indices.length")}function fe(je,Ye,et,mt){var Nt=O.isPlainObject(mt);if(!Array.isArray(je.data))throw new Error("gd.data must be an array");if(!O.isPlainObject(Ye))throw new Error("update must be a key:value object");if(typeof et>"u")throw new Error("indices must be an integer or array of integers");G(je,et,"indices");for(var lr in Ye){if(!Array.isArray(Ye[lr])||Ye[lr].length!==et.length)throw new Error("attribute "+lr+" must be an array of length equal to indices array length");if(Nt&&(!(lr in mt)||!Array.isArray(mt[lr])||mt[lr].length!==Ye[lr].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 we(je,Ye,et,mt){var Nt=O.isPlainObject(mt),lr=[],br,Or,tn,Jr,dn;Array.isArray(et)||(et=[et]),et=J(et,je.data.length-1);for(var on in Ye)for(var Nn=0;Nn<et.length;Nn++){if(br=je.data[et[Nn]],tn=z(br,on),Or=tn.get(),Jr=Ye[on][Nn],!O.isArrayOrTypedArray(Jr))throw new Error("attribute: "+on+" index: "+Nn+" must be an array");if(!O.isArrayOrTypedArray(Or))throw new Error("cannot extend missing or non-array attribute: "+on);if(Or.constructor!==Jr.constructor)throw new Error("cannot extend array with an array of a different type: "+on);dn=Nt?mt[on][Nn]:mt,w(dn)||(dn=-1),lr.push({prop:tn,target:Or,insert:Jr,maxp:Math.floor(dn)})}return lr}function Oe(je,Ye,et,mt,Nt){fe(je,Ye,et,mt);for(var lr=we(je,Ye,et,mt),br={},Or={},tn=0;tn<lr.length;tn++){var Jr=lr[tn].prop,dn=lr[tn].maxp,on=Nt(lr[tn].target,lr[tn].insert,dn);Jr.set(on[0]),Array.isArray(br[Jr.astr])||(br[Jr.astr]=[]),br[Jr.astr].push(on[1]),Array.isArray(Or[Jr.astr])||(Or[Jr.astr]=[]),Or[Jr.astr].push(lr[tn].target.length)}return{update:br,maxPoints:Or}}function ke(je,Ye){var et=new je.constructor(je.length+Ye.length);return et.set(je),et.set(Ye,je.length),et}function Le(je,Ye,et,mt){je=O.getGraphDiv(je);function Nt(tn,Jr,dn){var on,Nn;if(O.isTypedArray(tn))if(dn<0){var Wi=new tn.constructor(0),Oa=ke(tn,Jr);dn<0?(on=Oa,Nn=Wi):(on=Wi,Nn=Oa)}else if(on=new tn.constructor(dn),Nn=new tn.constructor(tn.length+Jr.length-dn),dn===Jr.length)on.set(Jr),Nn.set(tn);else if(dn<Jr.length){var Da=Jr.length-dn;on.set(Jr.subarray(Da)),Nn.set(tn),Nn.set(Jr.subarray(0,Da),tn.length)}else{var Aa=dn-Jr.length,Ka=tn.length-Aa;on.set(tn.subarray(Ka)),on.set(Jr,Aa),Nn.set(tn.subarray(0,Ka))}else on=tn.concat(Jr),Nn=dn>=0&&dn<on.length?on.splice(0,on.length-dn):[];return[on,Nn]}var lr=Oe(je,Ye,et,mt,Nt),br=pe.redraw(je),Or=[je,lr.update,et,lr.maxPoints];return u.add(je,pe.prependTraces,Or,Le,arguments),br}function oe(je,Ye,et,mt){je=O.getGraphDiv(je);function Nt(tn,Jr,dn){var on,Nn;if(O.isTypedArray(tn))if(dn<=0){var Wi=new tn.constructor(0),Oa=ke(Jr,tn);dn<0?(on=Oa,Nn=Wi):(on=Wi,Nn=Oa)}else if(on=new tn.constructor(dn),Nn=new tn.constructor(tn.length+Jr.length-dn),dn===Jr.length)on.set(Jr),Nn.set(tn);else if(dn<Jr.length){var Da=Jr.length-dn;on.set(Jr.subarray(0,Da)),Nn.set(Jr.subarray(Da)),Nn.set(tn,Da)}else{var Aa=dn-Jr.length;on.set(Jr),on.set(tn.subarray(0,Aa),Jr.length),Nn.set(tn.subarray(Aa))}else on=Jr.concat(tn),Nn=dn>=0&&dn<on.length?on.splice(dn,on.length):[];return[on,Nn]}var lr=Oe(je,Ye,et,mt,Nt),br=pe.redraw(je),Or=[je,lr.update,et,lr.maxPoints];return u.add(je,pe.extendTraces,Or,oe,arguments),br}function be(je,Ye,et){je=O.getGraphDiv(je);var mt=[],Nt=pe.deleteTraces,lr=be,br=[je,mt],Or=[je,Ye],tn,Jr;for(re(je,Ye,et),Array.isArray(Ye)||(Ye=[Ye]),Ye=Ye.map(function(dn){return O.extendFlat({},dn)}),I.cleanData(Ye),tn=0;tn<Ye.length;tn++)je.data.push(Ye[tn]);for(tn=0;tn<Ye.length;tn++)mt.push(-Ye.length+tn);if(typeof et>"u")return Jr=pe.redraw(je),u.add(je,Nt,br,lr,Or),Jr;Array.isArray(et)||(et=[et]);try{ee(je,mt,et)}catch(dn){throw je.data.splice(je.data.length-Ye.length,Ye.length),dn}return u.startSequence(je),u.add(je,Nt,br,lr,Or),Jr=pe.moveTraces(je,mt,et),u.stopSequence(je),Jr}function _e(je,Ye){je=O.getGraphDiv(je);var et=[],mt=pe.addTraces,Nt=_e,lr=[je,et,Ye],br=[je,Ye],Or,tn;if(typeof Ye>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(Ye)||(Ye=[Ye]),G(je,Ye,"indices"),Ye=J(Ye,je.data.length-1),Ye.sort(O.sorterDes),Or=0;Or<Ye.length;Or+=1)tn=je.data.splice(Ye[Or],1)[0],et.push(tn);var Jr=pe.redraw(je);return u.add(je,mt,lr,Nt,br),Jr}function he(je,Ye,et){je=O.getGraphDiv(je);var mt=[],Nt=[],lr=he,br=he,Or=[je,et,Ye],tn=[je,Ye,et],Jr;if(ee(je,Ye,et),Ye=Array.isArray(Ye)?Ye:[Ye],typeof et>"u")for(et=[],Jr=0;Jr<Ye.length;Jr++)et.push(-Ye.length+Jr);for(et=Array.isArray(et)?et:[et],Ye=J(Ye,je.data.length-1),et=J(et,je.data.length-1),Jr=0;Jr<je.data.length;Jr++)Ye.indexOf(Jr)===-1&&mt.push(je.data[Jr]);for(Jr=0;Jr<Ye.length;Jr++)Nt.push({newIndex:et[Jr],trace:je.data[Ye[Jr]]});for(Nt.sort(function(on,Nn){return on.newIndex-Nn.newIndex}),Jr=0;Jr<Nt.length;Jr+=1)mt.splice(Nt[Jr].newIndex,0,Nt[Jr].trace);je.data=mt;var dn=pe.redraw(je);return u.add(je,lr,Or,br,tn),dn}function De(je,Ye,et,mt){je=O.getGraphDiv(je),I.clearPromiseQueue(je);var Nt={};if(typeof Ye=="string")Nt[Ye]=et;else if(O.isPlainObject(Ye))Nt=O.extendFlat({},Ye),mt===void 0&&(mt=et);else return O.warn("Restyle fail.",Ye,et,mt),Promise.reject();Object.keys(Nt).length&&(je.changed=!0);var lr=I.coerceTraceIndices(je,mt),br=Be(je,Nt,lr),Or=br.flags;Or.calc&&(je.calcdata=void 0),Or.clearAxisTypes&&I.clearAxisTypes(je,lr,{});var tn=[];Or.fullReplot?tn.push(pe._doPlot):(tn.push(f.previousPromises),f.supplyDefaults(je),Or.markerSize&&(f.doCalcdata(je),gt(tn)),Or.style&&tn.push(N.doTraceStyle),Or.colorbars&&tn.push(N.doColorBars),tn.push(S)),tn.push(f.rehover,f.redrag,f.reselect),u.add(je,De,[je,br.undoit,br.traces],De,[je,br.redoit,br.traces]);var Jr=O.syncOrAsync(tn,je);return(!Jr||!Jr.then)&&(Jr=Promise.resolve()),Jr.then(function(){return je.emit("plotly_restyle",br.eventData),je})}function xe(je){return je===void 0?null:je}function se(je,Ye){return Ye?function(et,mt,Nt){var lr=z(et,mt),br=lr.set;return lr.set=function(Or){var tn=(Nt||"")+mt;Ee(tn,lr.get(),Or,je),br(Or)},lr}:z}function Ee(je,Ye,et,mt){if(Array.isArray(Ye)||Array.isArray(et))for(var Nt=Array.isArray(Ye)?Ye:[],lr=Array.isArray(et)?et:[],br=Math.max(Nt.length,lr.length),Or=0;Or<br;Or++)Ee(je+"["+Or+"]",Nt[Or],lr[Or],mt);else if(O.isPlainObject(Ye)||O.isPlainObject(et)){var tn=O.isPlainObject(Ye)?Ye:{},Jr=O.isPlainObject(et)?et:{},dn=O.extendFlat({},tn,Jr);for(var on in dn)Ee(je+"."+on,tn[on],Jr[on],mt)}else mt[je]===void 0&&(mt[je]=xe(Ye))}function Te(je,Ye,et){for(var mt in et){var Nt=z(je,mt);Ee(mt,Nt.get(),et[mt],Ye)}}function Be(je,Ye,et){var mt=je._fullLayout,Nt=je._fullData,lr=je.data,br=mt._guiEditing,Or=se(mt._preGUI,br),tn=O.extendDeepAll({},Ye),Jr,dn=F.traceFlags(),on={},Nn={},Wi;function Oa(){return et.map(function(){})}function Da(Xn){var Yi=v.id2name(Xn);Wi.indexOf(Yi)===-1&&Wi.push(Yi)}function Aa(Xn){return"LAYOUT"+Xn+".autorange"}function Ka(Xn){return"LAYOUT"+Xn+".range"}function Sa(Xn){for(var Yi=Xn;Yi<Nt.length;Yi++)if(Nt[Yi]._input===lr[Xn])return Nt[Yi]}function no(Xn,Yi,ha){if(Array.isArray(Xn)){Xn.forEach(function(Ea){no(Ea,Yi,ha)});return}if(!(Xn in Ye||I.hasParent(Ye,Xn))){var Ca;if(Xn.substr(0,6)==="LAYOUT")Ca=Or(je.layout,Xn.replace("LAYOUT",""));else{var Ba=et[ha],ji=mt._tracePreGUI[Sa(Ba)._fullInput.uid];Ca=se(ji,br)(lr[Ba],Xn)}Xn in Nn||(Nn[Xn]=Oa()),Nn[Xn][ha]===void 0&&(Nn[Xn][ha]=xe(Ca.get())),Yi!==void 0&&Ca.set(Yi)}}function Fo(Xn){return function(Yi){return Nt[Yi][Xn]}}function an(Xn){return function(Yi,ha){return Yi===!1?Nt[et[ha]][Xn]:null}}for(var Hr in Ye){if(I.hasParent(Ye,Hr))throw new Error("cannot set "+Hr+" and a parent attribute simultaneously");var nn=Ye[Hr],Kr,$n,Ai,aa,Ci,Ta;if((Hr==="autobinx"||Hr==="autobiny")&&(Hr=Hr.charAt(Hr.length-1)+"bins",Array.isArray(nn)?nn=nn.map(an(Hr)):nn===!1?nn=et.map(Fo(Hr)):nn=null),on[Hr]=nn,Hr.substr(0,6)==="LAYOUT"){Ai=Or(je.layout,Hr.replace("LAYOUT","")),Nn[Hr]=[xe(Ai.get())],Ai.set(Array.isArray(nn)?nn[0]:nn),dn.calc=!0;continue}for(Nn[Hr]=Oa(),Jr=0;Jr<et.length;Jr++){Kr=lr[et[Jr]],$n=Sa(et[Jr]);var Na=mt._tracePreGUI[$n._fullInput.uid];if(Ai=se(Na,br)(Kr,Hr),aa=Ai.get(),Ci=Array.isArray(nn)?nn[Jr%nn.length]:nn,Ci!==void 0){var ro=Ai.parts[Ai.parts.length-1],oo=Hr.substr(0,Hr.length-ro.length-1),xo=oo?oo+".":"",vr=oo?z($n,oo).get():$n;if(Ta=p.getTraceValObject($n,Ai.parts),Ta&&Ta.impliedEdits&&Ci!==null)for(var er in Ta.impliedEdits)no(O.relativeAttr(Hr,er),Ta.impliedEdits[er],Jr);else if((ro==="thicknessmode"||ro==="lenmode")&&aa!==Ci&&(Ci==="fraction"||Ci==="pixels")&&vr){var si=mt._size,ei=vr.orient,Kn=ei==="top"||ei==="bottom";if(ro==="thicknessmode"){var qn=Kn?si.h:si.w;no(xo+"thickness",vr.thickness*(Ci==="fraction"?1/qn:qn),Jr)}else{var pi=Kn?si.w:si.h;no(xo+"len",vr.len*(Ci==="fraction"?1/pi:pi),Jr)}}else if(Hr==="type"&&(Ci==="pie"!=(aa==="pie")||Ci==="funnelarea"!=(aa==="funnelarea"))){var _i="x",fi="y";(Ci==="bar"||aa==="bar")&&Kr.orientation==="h"&&(_i="y",fi="x"),O.swapAttrs(Kr,["?","?src"],"labels",_i),O.swapAttrs(Kr,["d?","?0"],"label",_i),O.swapAttrs(Kr,["?","?src"],"values",fi),aa==="pie"||aa==="funnelarea"?(z(Kr,"marker.color").set(z(Kr,"marker.colors").get()),mt._pielayer.selectAll("g.trace").remove()):c.traceIs(Kr,"cartesian")&&z(Kr,"marker.colors").set(z(Kr,"marker.color").get())}Nn[Hr][Jr]=xe(aa);var Ri=["swapxy","swapxyaxes","orientation","orientationaxes"];if(Ri.indexOf(Hr)!==-1){if(Hr==="orientation"){Ai.set(Ci);var $i=Kr.x&&!Kr.y?"h":"v";if((Ai.get()||$i)===$n.orientation)continue}else Hr==="orientationaxes"&&(Kr.orientation={v:"h",h:"v"}[$n.orientation]);I.swapXYData(Kr),dn.calc=dn.clearAxisTypes=!0}else f.dataArrayContainers.indexOf(Ai.parts[0])!==-1?(I.manageArrayContainers(Ai,Ci,Nn),dn.calc=!0):(Ta?Ta.arrayOk&&!c.traceIs($n,"regl")&&(O.isArrayOrTypedArray(Ci)||O.isArrayOrTypedArray(aa))?dn.calc=!0:F.update(dn,Ta):dn.calc=!0,Ai.set(Ci))}}if(["swapxyaxes","orientationaxes"].indexOf(Hr)!==-1&&v.swap(je,et),Hr==="orientationaxes"){var Hi=z(je.layout,"hovermode"),wr=Hi.get();wr==="x"?Hi.set("y"):wr==="y"?Hi.set("x"):wr==="x unified"?Hi.set("y unified"):wr==="y unified"&&Hi.set("x unified")}if(["orientation","type"].indexOf(Hr)!==-1){for(Wi=[],Jr=0;Jr<et.length;Jr++){var gn=lr[et[Jr]];c.traceIs(gn,"cartesian")&&(Da(gn.xaxis||"x"),Da(gn.yaxis||"y"))}no(Wi.map(Aa),!0,0),no(Wi.map(Ka),[0,1],0)}}return(dn.calc||dn.plot)&&(dn.fullReplot=!0),{flags:dn,undoit:Nn,redoit:on,traces:et,eventData:O.extendDeepNoArrays([],[tn,et])}}function tt(je,Ye,et){je=O.getGraphDiv(je),I.clearPromiseQueue(je);var mt={};if(typeof Ye=="string")mt[Ye]=et;else if(O.isPlainObject(Ye))mt=O.extendFlat({},Ye);else return O.warn("Relayout fail.",Ye,et),Promise.reject();Object.keys(mt).length&&(je.changed=!0);var Nt=Wt(je,mt),lr=Nt.flags;lr.calc&&(je.calcdata=void 0);var br=[f.previousPromises];lr.layoutReplot?br.push(N.layoutReplot):Object.keys(mt).length&&(at(je,lr,Nt)||f.supplyDefaults(je),lr.legend&&br.push(N.doLegend),lr.layoutstyle&&br.push(N.layoutStyles),lr.axrange&&gt(br,Nt.rangesAltered),lr.ticks&&br.push(N.doTicksRelayout),lr.modebar&&br.push(N.doModeBar),lr.camera&&br.push(N.doCamera),lr.colorbars&&br.push(N.doColorBars),br.push(S)),br.push(f.rehover,f.redrag,f.reselect),u.add(je,tt,[je,Nt.undoit],tt,[je,Nt.redoit]);var Or=O.syncOrAsync(br,je);return(!Or||!Or.then)&&(Or=Promise.resolve(je)),Or.then(function(){return je.emit("plotly_relayout",Nt.eventData),je})}function at(je,Ye,et){var mt=je._fullLayout;if(!Ye.axrange)return!1;for(var Nt in Ye)if(Nt!=="axrange"&&Ye[Nt])return!1;var lr,br,Or=function(Wi,Oa){return O.coerce(lr,br,m,Wi,Oa)},tn={};for(var Jr in et.rangesAltered){var dn=v.id2name(Jr);if(lr=je.layout[dn],br=mt[dn],h(lr,br,Or,tn),br._matchGroup){for(var on in br._matchGroup)if(on!==Jr){var Nn=mt[v.id2name(on)];Nn.autorange=br.autorange,Nn.range=br.range.slice(),Nn._input.range=br.range.slice()}}}return!0}function gt(je,Ye){var et=Ye?function(mt){var Nt=[],lr=!0;for(var br in Ye){var Or=v.getFromId(mt,br);if(Nt.push(br),(Or.ticklabelposition||"").indexOf("inside")!==-1&&Or._anchorAxis&&Nt.push(Or._anchorAxis._id),Or._matchGroup)for(var tn in Or._matchGroup)Ye[tn]||Nt.push(tn)}return v.draw(mt,Nt,{skipTitle:lr})}:function(mt){return v.draw(mt,"redraw")};je.push(D,N.doAutoRangeAndConstraints,et,N.drawData,N.finalDraw)}var pt=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,Rt=/^[xyz]axis[0-9]*\.autorange$/,$t=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function Wt(je,Ye){var et=je.layout,mt=je._fullLayout,Nt=mt._guiEditing,lr=se(mt._preGUI,Nt),br=Object.keys(Ye),Or=v.list(je),tn=O.extendDeepAll({},Ye),Jr={},dn,on,Nn;for(br=Object.keys(Ye),on=0;on<br.length;on++)if(br[on].indexOf("allaxes")===0){for(Nn=0;Nn<Or.length;Nn++){var Wi=Or[Nn]._id.substr(1),Oa=Wi.indexOf("scene")!==-1?Wi+".":"",Da=br[on].replace("allaxes",Oa+Or[Nn]._name);Ye[Da]||(Ye[Da]=Ye[br[on]])}delete Ye[br[on]]}var Aa=F.layoutFlags(),Ka={},Sa={};function no(ji,Ea){if(Array.isArray(ji)){ji.forEach(function(No){no(No,Ea)});return}if(!(ji in Ye||I.hasParent(Ye,ji))){var cs=lr(et,ji);ji in Sa||(Sa[ji]=xe(cs.get())),Ea!==void 0&&cs.set(Ea)}}var Fo={},an;function Hr(ji){var Ea=v.name2id(ji.split(".")[0]);return Fo[Ea]=1,Ea}for(var nn in Ye){if(I.hasParent(Ye,nn))throw new Error("cannot set "+nn+" and a parent attribute simultaneously");for(var Kr=lr(et,nn),$n=Ye[nn],Ai=Kr.parts.length,aa=Ai-1;aa>0&&typeof Kr.parts[aa]!="string";)aa--;var Ci=Kr.parts[aa],Ta=Kr.parts[aa-1]+"."+Ci,Na=Kr.parts.slice(0,aa).join("."),ro=z(je.layout,Na).get(),oo=z(mt,Na).get(),xo=Kr.get();if($n!==void 0){Ka[nn]=$n,Sa[nn]=Ci==="reverse"?$n:xe(xo);var vr=p.getLayoutValObject(mt,Kr.parts);if(vr&&vr.impliedEdits&&$n!==null)for(var er in vr.impliedEdits)no(O.relativeAttr(nn,er),vr.impliedEdits[er]);if(["width","height"].indexOf(nn)!==-1)if($n){no("autosize",null);var si=nn==="height"?"width":"height";no(si,mt[si])}else mt[nn]=je._initialAutoSize[nn];else if(nn==="autosize")no("width",$n?null:mt.width),no("height",$n?null:mt.height);else if(Ta.match(pt))Hr(Ta),z(mt,Na+"._inputRange").set(null);else if(Ta.match(Rt)){Hr(Ta),z(mt,Na+"._inputRange").set(null);var ei=z(mt,Na).get();ei._inputDomain&&(ei._input.domain=ei._inputDomain.slice())}else Ta.match($t)&&z(mt,Na+"._inputDomain").set(null);if(Ci==="type"){an=ro;var Kn=oo.type==="linear"&&$n==="log",qn=oo.type==="log"&&$n==="linear";if(Kn||qn){if(!an||!an.range)no(Na+".autorange",!0);else if(oo.autorange)Kn&&(an.range=an.range[1]>an.range[0]?[1,2]:[2,1]);else{var pi=an.range[0],_i=an.range[1];Kn?(pi<=0&&_i<=0&&no(Na+".autorange",!0),pi<=0?pi=_i/1e6:_i<=0&&(_i=pi/1e6),no(Na+".range[0]",Math.log(pi)/Math.LN10),no(Na+".range[1]",Math.log(_i)/Math.LN10)):(no(Na+".range[0]",Math.pow(10,pi)),no(Na+".range[1]",Math.pow(10,_i)))}Array.isArray(mt._subplots.polar)&&mt._subplots.polar.length&&mt[Kr.parts[0]]&&Kr.parts[1]==="radialaxis"&&delete mt[Kr.parts[0]]._subplot.viewInitial["radialaxis.range"],c.getComponentMethod("annotations","convertCoords")(je,oo,$n,no),c.getComponentMethod("images","convertCoords")(je,oo,$n,no)}else no(Na+".autorange",!0),no(Na+".range",null);z(mt,Na+"._inputRange").set(null)}else if(Ci.match(k)){var fi=z(mt,nn).get(),Ri=($n||{}).type;(!Ri||Ri==="-")&&(Ri="linear"),c.getComponentMethod("annotations","convertCoords")(je,fi,Ri,no),c.getComponentMethod("images","convertCoords")(je,fi,Ri,no)}var $i=C.containerArrayMatch(nn);if($i){dn=$i.array,on=$i.index;var Hi=$i.property,wr=vr||{editType:"calc"};on!==""&&Hi===""&&(C.isAddVal($n)?Sa[nn]=null:C.isRemoveVal($n)?Sa[nn]=(z(et,dn).get()||[])[on]:O.warn("unrecognized full object value",Ye)),F.update(Aa,wr),Jr[dn]||(Jr[dn]={});var gn=Jr[dn][on];gn||(gn=Jr[dn][on]={}),gn[Hi]=$n,delete Ye[nn]}else Ci==="reverse"?(ro.range?ro.range.reverse():(no(Na+".autorange",!0),ro.range=[1,0]),oo.autorange?Aa.calc=!0:Aa.plot=!0):(nn==="dragmode"&&($n===!1&&xo!==!1||$n!==!1&&xo===!1)||mt._has("scatter-like")&&mt._has("regl")&&nn==="dragmode"&&($n==="lasso"||$n==="select")&&!(xo==="lasso"||xo==="select")?Aa.plot=!0:vr?F.update(Aa,vr):Aa.calc=!0,Kr.set($n))}}for(dn in Jr){var Xn=C.applyContainerArrayChanges(je,lr(et,dn),Jr[dn],Aa,lr);Xn||(Aa.plot=!0)}for(var Yi in Fo){an=v.getFromId(je,Yi);var ha=an&&an._constraintGroup;if(ha){Aa.calc=!0;for(var Ca in ha)Fo[Ca]||(v.getFromId(je,Ca)._constraintShrinkable=!0)}}(Ht(je)||Ye.height||Ye.width)&&(Aa.plot=!0);var Ba=mt.shapes;for(on=0;on<Ba.length;on++)if(Ba[on].showlegend){Aa.calc=!0;break}return(Aa.plot||Aa.calc)&&(Aa.layoutReplot=!0),{flags:Aa,rangesAltered:Fo,undoit:Sa,redoit:Ka,eventData:tn}}function Ht(je){var Ye=je._fullLayout,et=Ye.width,mt=Ye.height;return je.layout.autosize&&f.plotAutoSize(je,je.layout,Ye),Ye.width!==et||Ye.height!==mt}function Ft(je,Ye,et,mt){je=O.getGraphDiv(je),I.clearPromiseQueue(je),O.isPlainObject(Ye)||(Ye={}),O.isPlainObject(et)||(et={}),Object.keys(Ye).length&&(je.changed=!0),Object.keys(et).length&&(je.changed=!0);var Nt=I.coerceTraceIndices(je,mt),lr=Be(je,O.extendFlat({},Ye),Nt),br=lr.flags,Or=Wt(je,O.extendFlat({},et)),tn=Or.flags;(br.calc||tn.calc)&&(je.calcdata=void 0),br.clearAxisTypes&&I.clearAxisTypes(je,Nt,et);var Jr=[];tn.layoutReplot?Jr.push(N.layoutReplot):br.fullReplot?Jr.push(pe._doPlot):(Jr.push(f.previousPromises),at(je,tn,Or)||f.supplyDefaults(je),br.style&&Jr.push(N.doTraceStyle),(br.colorbars||tn.colorbars)&&Jr.push(N.doColorBars),tn.legend&&Jr.push(N.doLegend),tn.layoutstyle&&Jr.push(N.layoutStyles),tn.axrange&&gt(Jr,Or.rangesAltered),tn.ticks&&Jr.push(N.doTicksRelayout),tn.modebar&&Jr.push(N.doModeBar),tn.camera&&Jr.push(N.doCamera),Jr.push(S)),Jr.push(f.rehover,f.redrag,f.reselect),u.add(je,Ft,[je,lr.undoit,Or.undoit,lr.traces],Ft,[je,lr.redoit,Or.redoit,lr.traces]);var dn=O.syncOrAsync(Jr,je);return(!dn||!dn.then)&&(dn=Promise.resolve(je)),dn.then(function(){return je.emit("plotly_update",{data:lr.eventData,layout:Or.eventData}),je})}function st(je){return function(et){et._fullLayout._guiEditing=!0;var mt=je.apply(null,arguments);return et._fullLayout._guiEditing=!1,mt}}var rt=[{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"}],Ue=[{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 xt(je,Ye){for(var et=0;et<Ye.length;et++){var mt=Ye[et],Nt=je.match(mt.pattern);if(Nt){var lr=Nt[1]||"";return{head:lr,tail:je.substr(lr.length+1),attr:mt.attr}}}}function Gt(je,Ye){var et=z(Ye,je).get();if(et!==void 0)return et;var mt=je.split(".");for(mt.pop();mt.length>1;)if(mt.pop(),et=z(Ye,mt.join(".")+".uirevision").get(),et!==void 0)return et;return Ye.uirevision}function Jt(je,Ye){for(var et=0;et<Ye.length;et++)if(Ye[et]._fullInput.uid===je)return et;return-1}function Ut(je,Ye,et){for(var mt=0;mt<Ye.length;mt++)if(Ye[mt].uid===je)return mt;return!Ye[et]||Ye[et].uid?-1:et}function kr(je,Ye){var et=O.isPlainObject(je),mt=Array.isArray(je);return et||mt?(et&&O.isPlainObject(Ye)||mt&&Array.isArray(Ye))&&JSON.stringify(je)===JSON.stringify(Ye):je===Ye}function Pr(je,Ye,et,mt){var Nt=mt._preGUI,lr,br,Or,tn,Jr,dn,on,Nn,Wi,Oa,Da=[],Aa={},Ka={};for(lr in Nt){if(Jr=xt(lr,rt),Jr){if(Wi=Jr.head,Oa=Jr.tail,br=Jr.attr||Wi+".uirevision",Or=z(mt,br).get(),tn=Or&&Gt(br,Ye),tn&&tn===Or){if(dn=Nt[lr],dn===null&&(dn=void 0),on=z(Ye,lr),Nn=on.get(),kr(Nn,dn)){Nn===void 0&&Oa==="autorange"&&Da.push(Wi),on.set(xe(z(mt,lr).get()));continue}else if(Oa==="autorange"||Oa.substr(0,6)==="range["){var Sa=Nt[Wi+".range[0]"],no=Nt[Wi+".range[1]"],Fo=Nt[Wi+".autorange"];if(Fo||Fo===null&&Sa===null&&no===null){if(!(Wi in Aa)){var an=z(Ye,Wi).get();Aa[Wi]=an&&(an.autorange||an.autorange!==!1&&(!an.range||an.range.length!==2))}if(Aa[Wi]){on.set(xe(z(mt,lr).get()));continue}}}}}else O.warn("unrecognized GUI edit: "+lr);delete Nt[lr],Jr&&Jr.tail.substr(0,6)==="range["&&(Ka[Jr.head]=1)}for(var Hr=0;Hr<Da.length;Hr++){var nn=Da[Hr];if(Ka[nn]){var Kr=z(Ye,nn).get();Kr&&delete Kr.autorange}}var $n=mt._tracePreGUI;for(var Ai in $n){var aa=$n[Ai],Ci=null,Ta;for(lr in aa){if(!Ci){var Na=Jt(Ai,et);if(Na<0){delete $n[Ai];break}var ro=et[Na];Ta=ro._fullInput;var oo=Ut(Ai,je,Ta.index);if(oo<0){delete $n[Ai];break}Ci=je[oo]}if(Jr=xt(lr,Ue),Jr){if(Jr.attr?(Or=z(mt,Jr.attr).get(),tn=Or&&Gt(Jr.attr,Ye)):(Or=Ta.uirevision,tn=Ci.uirevision,tn===void 0&&(tn=Ye.uirevision)),tn&&tn===Or&&(dn=aa[lr],dn===null&&(dn=void 0),on=z(Ci,lr),Nn=on.get(),kr(Nn,dn))){on.set(xe(z(Ta,lr).get()));continue}}else O.warn("unrecognized GUI edit: "+lr+" in trace uid "+Ai);delete aa[lr]}}}function $r(je,Ye,et,mt){var Nt,lr;function br(){return pe.addFrames(je,Nt)}je=O.getGraphDiv(je),I.clearPromiseQueue(je);var Or=je._fullData,tn=je._fullLayout;if(!O.isPlotDiv(je)||!Or||!tn)lr=pe.newPlot(je,Ye,et,mt);else{if(O.isPlainObject(Ye)){var Jr=Ye;Ye=Jr.data,et=Jr.layout,mt=Jr.config,Nt=Jr.frames}var dn=!1;if(mt){var on=O.extendDeep({},je._context);je._context=void 0,Z(je,mt),dn=ci(on,je._context)}if(dn){const Na=je._ev.eventNames().map(ro=>[ro,je._ev.listeners(ro)]);lr=pe.newPlot(je,Ye,et,mt).then(()=>{for(const[ro,oo]of Na)oo.forEach(xo=>je.on(ro,xo));return pe.react(je,Ye,et,mt)})}else{je.data=Ye||[],I.cleanData(je.data),je.layout=et||{},I.cleanLayout(je.layout),Pr(je.data,je.layout,Or,tn),f.supplyDefaults(je,{skipUpdateCalc:!0});var Nn=je._fullData,Wi=je._fullLayout,Oa=Wi.datarevision===void 0,Da=Wi.transition,Aa=kn(je,tn,Wi,Oa,Da),Ka=Aa.newDataRevision,Sa=rn(je,Or,Nn,Oa,Da,Ka);if(Ht(je)&&(Aa.layoutReplot=!0),Sa.calc||Aa.calc){je.calcdata=void 0;for(var no=Object.getOwnPropertyNames(Wi),Fo=0;Fo<no.length;Fo++){var an=no[Fo],Hr=an.substring(0,5);if(Hr==="xaxis"||Hr==="yaxis"){var nn=Wi[an]._emptyCategories;nn&&nn()}}}else f.supplyDefaultsUpdateCalc(je.calcdata,Nn);var Kr=[];if(Nt&&(je._transitionData={},f.createTransitionData(je),Kr.push(br)),Wi.transition&&(Sa.anim||Aa.anim))Aa.ticks&&Kr.push(N.doTicksRelayout),f.doCalcdata(je),N.doAutoRangeAndConstraints(je),Kr.push(function(){return f.transitionFromReact(je,Sa,Aa,tn)});else if(Sa.fullReplot||Aa.layoutReplot)je._fullLayout._skipDefaults=!0,Kr.push(pe._doPlot);else{for(var $n in Aa.arrays){var Ai=Aa.arrays[$n];if(Ai.length){var aa=c.getComponentMethod($n,"drawOne");if(aa!==O.noop)for(var Ci=0;Ci<Ai.length;Ci++)aa(je,Ai[Ci]);else{var Ta=c.getComponentMethod($n,"draw");if(Ta===O.noop)throw new Error("cannot draw components: "+$n);Ta(je)}}}Kr.push(f.previousPromises),Sa.style&&Kr.push(N.doTraceStyle),(Sa.colorbars||Aa.colorbars)&&Kr.push(N.doColorBars),Aa.legend&&Kr.push(N.doLegend),Aa.layoutstyle&&Kr.push(N.layoutStyles),Aa.axrange&&gt(Kr),Aa.ticks&&Kr.push(N.doTicksRelayout),Aa.modebar&&Kr.push(N.doModeBar),Aa.camera&&Kr.push(N.doCamera),Kr.push(S)}Kr.push(f.rehover,f.redrag,f.reselect),lr=O.syncOrAsync(Kr,je),(!lr||!lr.then)&&(lr=Promise.resolve(je))}}return lr.then(()=>(dn||je.emit("plotly_react",{config:mt,data:Ye,layout:et}),je))}function rn(je,Ye,et,mt,Nt,lr){var br=Ye.length===et.length;if(!Nt&&!br)return{fullReplot:!0,calc:!0};var Or=F.traceFlags();Or.arrays={},Or.nChanges=0,Or.nChangesAnim=0;var tn,Jr;function dn(Wi){var Oa=p.getTraceValObject(Jr,Wi);return!Jr._module.animatable&&Oa.anim&&(Oa.anim=!1),Oa}var on={getValObject:dn,flags:Or,immutable:mt,transition:Nt,newDataRevision:lr,gd:je},Nn={};for(tn=0;tn<Ye.length;tn++)if(et[tn]){if(Jr=et[tn]._fullInput,Nn[Jr.uid])continue;Nn[Jr.uid]=1,Rn(Ye[tn]._fullInput,Jr,[],on)}return(Or.calc||Or.plot)&&(Or.fullReplot=!0),Nt&&Or.nChanges&&Or.nChangesAnim&&(Or.anim=Or.nChanges===Or.nChangesAnim&&br?"all":"some"),Or}function kn(je,Ye,et,mt,Nt){var lr=F.layoutFlags();lr.arrays={},lr.rangesAltered={},lr.nChanges=0,lr.nChangesAnim=0;function br(Nn){return p.getLayoutValObject(et,Nn)}for(var Or in et)if(!(!Or.startsWith("xaxis")&&!Or.startsWith("yaxis"))&&Ye[Or]){var tn=et[Or].domain,Jr=Ye[Or].domain,dn=Ye[Or]._inputDomain;Ye[Or]._inputDomain&&(tn[0]===dn[0]&&tn[1]===dn[1]?et[Or].domain=Ye[Or].domain:(tn[0]!==Jr[0]||tn[1]!==Jr[1])&&(et[Or]._inputDomain=null))}var on={getValObject:br,flags:lr,immutable:mt,transition:Nt,gd:je};return Rn(Ye,et,[],on),(lr.plot||lr.calc)&&(lr.layoutReplot=!0),Nt&&lr.nChanges&&lr.nChangesAnim&&(lr.anim=lr.nChanges===lr.nChangesAnim?"all":"some"),lr}function Rn(je,Ye,et,mt){var Nt,lr,br,Or=mt.getValObject,tn=mt.flags,Jr=mt.immutable,dn=mt.inArray,on=mt.arrayIndex;function Nn(){var Na=Nt.editType;if(dn&&Na.indexOf("arraydraw")!==-1){O.pushUnique(tn.arrays[dn],on);return}F.update(tn,Nt),Na!=="none"&&tn.nChanges++,mt.transition&&Nt.anim&&tn.nChangesAnim++,(pt.test(br)||Rt.test(br))&&(tn.rangesAltered[et[0]]=1),lr==="datarevision"&&(tn.newDataRevision=1)}function Wi(Na){return Na.valType==="data_array"||Na.arrayOk}for(lr in je){if(tn.calc&&!mt.transition)return;var Oa=je[lr],Da=Ye[lr],Aa=et.concat(lr);if(br=Aa.join("."),!(lr.charAt(0)==="_"||typeof Oa=="function"||Oa===Da)){if((lr==="tick0"||lr==="dtick")&&et[0]!=="geo"){var Ka=Ye.tickmode;if(Ka==="auto"||Ka==="array"||!Ka)continue}if(!(lr==="range"&&Ye.autorange)&&!((lr==="zmin"||lr==="zmax")&&Ye.type==="contourcarpet")&&(Nt=Or(Aa),!!Nt&&!(Nt._compareAsJSON&&JSON.stringify(Oa)===JSON.stringify(Da)))){var Sa=Nt.valType,no,Fo=Wi(Nt),an=Array.isArray(Oa),Hr=Array.isArray(Da);if(an&&Hr){var nn="_input_"+lr,Kr=je[nn],$n=Ye[nn];if(Array.isArray(Kr)&&Kr===$n)continue}if(Da===void 0)Fo&&an?tn.calc=!0:Nn();else if(Nt._isLinkedToArray){var Ai=[],aa=!1;dn||(tn.arrays[lr]=Ai);var Ci=Math.min(Oa.length,Da.length),Ta=Math.max(Oa.length,Da.length);if(Ci!==Ta)if(Nt.editType==="arraydraw")aa=!0;else{Nn();continue}for(no=0;no<Ci;no++)Rn(Oa[no],Da[no],Aa.concat(no),O.extendFlat({inArray:lr,arrayIndex:no},mt));if(aa)for(no=Ci;no<Ta;no++)Ai.push(no)}else!Sa&&O.isPlainObject(Oa)?Rn(Oa,Da,Aa,mt):Fo?an&&Hr?(Jr&&(tn.calc=!0),(Jr||mt.newDataRevision)&&Nn()):an!==Hr?tn.calc=!0:Nn():an&&Hr?(Oa.length!==Da.length||String(Oa)!==String(Da))&&Nn():Nn()}}}for(lr in Ye)if(!(lr in je||lr.charAt(0)==="_"||typeof Ye[lr]=="function"))if(Nt=Or(et.concat(lr)),Wi(Nt)&&Array.isArray(Ye[lr])){tn.calc=!0;return}else Nn()}function ci(je,Ye){var et;for(et in je)if(et.charAt(0)!=="_"){var mt=je[et],Nt=Ye[et];if(mt!==Nt)if(O.isPlainObject(mt)&&O.isPlainObject(Nt)){if(ci(mt,Nt))return!0}else if(Array.isArray(mt)&&Array.isArray(Nt)){if(mt.length!==Nt.length)return!0;for(var lr=0;lr<mt.length;lr++)if(mt[lr]!==Nt[lr])if(O.isPlainObject(mt[lr])&&O.isPlainObject(Nt[lr])){if(ci(mt[lr],Nt[lr]))return!0}else return!0}else return!0}}function In(je,Ye,et){if(je=O.getGraphDiv(je),!O.isPlotDiv(je))throw new Error("This element is not a Plotly plot: "+je+". It's likely that you've failed to create a plot before animating it. For more details, see https://plotly.com/javascript/animations/");var mt=je._transitionData;mt._frameQueue||(mt._frameQueue=[]),et=f.supplyAnimationDefaults(et);var Nt=et.transition,lr=et.frame;mt._frameWaitingCnt===void 0&&(mt._frameWaitingCnt=0);function br(Jr){return Array.isArray(Nt)?Jr>=Nt.length?Nt[0]:Nt[Jr]:Nt}function Or(Jr){return Array.isArray(lr)?Jr>=lr.length?lr[0]:lr[Jr]:lr}function tn(Jr,dn){var on=0;return function(){if(Jr&&++on===dn)return Jr()}}return new Promise(function(Jr,dn){function on(){if(mt._frameQueue.length!==0){for(;mt._frameQueue.length;){var Ci=mt._frameQueue.pop();Ci.onInterrupt&&Ci.onInterrupt()}je.emit("plotly_animationinterrupted",[])}}function Nn(Ci){if(Ci.length!==0){for(var Ta=0;Ta<Ci.length;Ta++){var Na;Ci[Ta].type==="byname"?Na=f.computeFrame(je,Ci[Ta].name):Na=Ci[Ta].data;var ro=Or(Ta),oo=br(Ta);oo.duration=Math.min(oo.duration,ro.duration);var xo={frame:Na,name:Ci[Ta].name,frameOpts:ro,transitionOpts:oo};Ta===Ci.length-1&&(xo.onComplete=tn(Jr,2),xo.onInterrupt=dn),mt._frameQueue.push(xo)}et.mode==="immediate"&&(mt._lastFrameAt=-1/0),mt._animationRaf||Da()}}function Wi(){je.emit("plotly_animated"),window.cancelAnimationFrame(mt._animationRaf),mt._animationRaf=null}function Oa(){mt._currentFrame&&mt._currentFrame.onComplete&&mt._currentFrame.onComplete();var Ci=mt._currentFrame=mt._frameQueue.shift();if(Ci){var Ta=Ci.name?Ci.name.toString():null;je._fullLayout._currentFrame=Ta,mt._lastFrameAt=Date.now(),mt._timeToNext=Ci.frameOpts.duration,f.transition(je,Ci.frame.data,Ci.frame.layout,I.coerceTraceIndices(je,Ci.frame.traces),Ci.frameOpts,Ci.transitionOpts).then(function(){Ci.onComplete&&Ci.onComplete()}),je.emit("plotly_animatingframe",{name:Ta,frame:Ci.frame,animation:{frame:Ci.frameOpts,transition:Ci.transitionOpts}})}else Wi()}function Da(){je.emit("plotly_animating"),mt._lastFrameAt=-1/0,mt._timeToNext=0,mt._runningTransitions=0,mt._currentFrame=null;var Ci=function(){mt._animationRaf=window.requestAnimationFrame(Ci),Date.now()-mt._lastFrameAt>mt._timeToNext&&Oa()};Ci()}var Aa=0;function Ka(Ci){return Array.isArray(Nt)?Aa>=Nt.length?Ci.transitionOpts=Nt[Aa]:Ci.transitionOpts=Nt[0]:Ci.transitionOpts=Nt,Aa++,Ci}var Sa,no,Fo=[],an=Ye==null,Hr=Array.isArray(Ye),nn=!an&&!Hr&&O.isPlainObject(Ye);if(nn)Fo.push({type:"object",data:Ka(O.extendFlat({},Ye))});else if(an||["string","number"].indexOf(typeof Ye)!==-1)for(Sa=0;Sa<mt._frames.length;Sa++)no=mt._frames[Sa],no&&(an||String(no.group)===String(Ye))&&Fo.push({type:"byname",name:String(no.name),data:Ka({name:no.name})});else if(Hr)for(Sa=0;Sa<Ye.length;Sa++){var Kr=Ye[Sa];["number","string"].indexOf(typeof Kr)!==-1?(Kr=String(Kr),Fo.push({type:"byname",name:Kr,data:Ka({name:Kr})})):O.isPlainObject(Kr)&&Fo.push({type:"object",data:Ka(O.extendFlat({},Kr))})}for(Sa=0;Sa<Fo.length;Sa++)if(no=Fo[Sa],no.type==="byname"&&!mt._frameHash[no.data.name]){O.warn('animate failure: frame not found: "'+no.data.name+'"'),dn();return}["next","immediate"].indexOf(et.mode)!==-1&&on(),et.direction==="reverse"&&Fo.reverse();var $n=je._fullLayout._currentFrame;if($n&&et.fromcurrent){var Ai=-1;for(Sa=0;Sa<Fo.length;Sa++)if(no=Fo[Sa],no.type==="byname"&&no.name===$n){Ai=Sa;break}if(Ai>0&&Ai<Fo.length-1){var aa=[];for(Sa=0;Sa<Fo.length;Sa++)no=Fo[Sa],(Fo[Sa].type!=="byname"||Sa>Ai)&&aa.push(no);Fo=aa}}Fo.length>0?Nn(Fo):(je.emit("plotly_animated"),Jr())})}function Gn(je,Ye,et){if(je=O.getGraphDiv(je),Ye==null)return Promise.resolve();if(!O.isPlotDiv(je))throw new Error("This element is not a Plotly plot: "+je+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var mt,Nt,lr,br,Or=je._transitionData._frames,tn=je._transitionData._frameHash;if(!Array.isArray(Ye))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+Ye);var Jr=Or.length+Ye.length*2,dn=[],on={};for(mt=Ye.length-1;mt>=0;mt--)if(O.isPlainObject(Ye[mt])){var Nn=Ye[mt].name,Wi=(tn[Nn]||on[Nn]||{}).name,Oa=Ye[mt].name,Da=tn[Wi]||on[Wi];Wi&&Oa&&typeof Oa=="number"&&Da&&P<T&&(P++,O.warn('addFrames: overwriting frame "'+(tn[Wi]||on[Wi]).name+'" with a frame whose name of type "number" also equates to "'+Wi+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),P===T&&O.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.")),on[Nn]={name:Nn},dn.push({frame:f.supplyFrameDefaults(Ye[mt]),index:et&&et[mt]!==void 0&&et[mt]!==null?et[mt]:Jr+mt})}dn.sort(function(nn,Kr){return nn.index>Kr.index?-1:nn.index<Kr.index?1:0});var Aa=[],Ka=[],Sa=Or.length;for(mt=dn.length-1;mt>=0;mt--){if(Nt=dn[mt].frame,typeof Nt.name=="number"&&O.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!Nt.name)for(;tn[Nt.name="frame "+je._transitionData._counter++];);if(tn[Nt.name]){for(lr=0;lr<Or.length&&(Or[lr]||{}).name!==Nt.name;lr++);Aa.push({type:"replace",index:lr,value:Nt}),Ka.unshift({type:"replace",index:lr,value:Or[lr]})}else br=Math.max(0,Math.min(dn[mt].index,Sa)),Aa.push({type:"insert",index:br,value:Nt}),Ka.unshift({type:"delete",index:br}),Sa++}var no=f.modifyFrames,Fo=f.modifyFrames,an=[je,Ka],Hr=[je,Aa];return u&&u.add(je,no,an,Fo,Hr),f.modifyFrames(je,Aa)}function mr(je,Ye){if(je=O.getGraphDiv(je),!O.isPlotDiv(je))throw new Error("This element is not a Plotly plot: "+je);var et,mt,Nt=je._transitionData._frames,lr=[],br=[];if(!Ye)for(Ye=[],et=0;et<Nt.length;et++)Ye.push(et);for(Ye=Ye.slice(),Ye.sort(),et=Ye.length-1;et>=0;et--)mt=Ye[et],lr.push({type:"delete",index:mt}),br.unshift({type:"insert",index:mt,value:Nt[mt]});var Or=f.modifyFrames,tn=f.modifyFrames,Jr=[je,br],dn=[je,lr];return u&&u.add(je,Or,Jr,tn,dn),f.modifyFrames(je,lr)}function St(je){je=O.getGraphDiv(je);var Ye=je._fullLayout||{},et=je._fullData||[];return f.cleanPlot([],{},et,Ye),f.purge(je),l.purge(je),Ye._container&&Ye._container.remove(),delete je._context,je}function Ot(je){var Ye=je._fullLayout,et=je.getBoundingClientRect();if(!O.equalDomRects(et,Ye._lastBBox)){var mt=Ye._invTransform=O.inverseTransformMatrix(O.getFullTransformMatrix(je));Ye._invScaleX=Math.sqrt(mt[0][0]*mt[0][0]+mt[0][1]*mt[0][1]+mt[0][2]*mt[0][2]),Ye._invScaleY=Math.sqrt(mt[1][0]*mt[1][0]+mt[1][1]*mt[1][1]+mt[1][2]*mt[1][2]),Ye._lastBBox=et}}function Et(je){var Ye=le.select(je),et=je._fullLayout;if(et._calcInverseTransform=Ot,et._calcInverseTransform(je),et._container=Ye.selectAll(".plot-container").data([0]),et._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),et._paperdiv=et._container.selectAll(".svg-container").data([0]),et._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),et._glcontainer=et._paperdiv.selectAll(".gl-container").data([{}]),et._glcontainer.enter().append("div").classed("gl-container",!0),et._paperdiv.selectAll(".main-svg").remove(),et._paperdiv.select(".modebar-container").remove(),et._paper=et._paperdiv.insert("svg",":first-child").classed("main-svg",!0),et._toppaper=et._paperdiv.append("svg").classed("main-svg",!0),et._modebardiv=et._paperdiv.append("div"),delete et._modeBar,et._hoverpaper=et._paperdiv.append("svg").classed("main-svg",!0),!et._uid){var mt={};le.selectAll("defs").each(function(){this.id&&(mt[this.id.split("-")[1]]=1)}),et._uid=O.randstr(mt)}et._paperdiv.selectAll(".main-svg").attr(E.svgAttrs),et._defs=et._paper.append("defs").attr("id","defs-"+et._uid),et._clips=et._defs.append("g").classed("clips",!0),et._topdefs=et._toppaper.append("defs").attr("id","topdefs-"+et._uid),et._topclips=et._topdefs.append("g").classed("clips",!0),et._bgLayer=et._paper.append("g").classed("bglayer",!0),et._draggers=et._paper.append("g").classed("draglayer",!0);var Nt=et._paper.append("g").classed("layer-below",!0);et._imageLowerLayer=Nt.append("g").classed("imagelayer",!0),et._shapeLowerLayer=Nt.append("g").classed("shapelayer",!0),et._cartesianlayer=et._paper.append("g").classed("cartesianlayer",!0),et._polarlayer=et._paper.append("g").classed("polarlayer",!0),et._smithlayer=et._paper.append("g").classed("smithlayer",!0),et._ternarylayer=et._paper.append("g").classed("ternarylayer",!0),et._geolayer=et._paper.append("g").classed("geolayer",!0),et._funnelarealayer=et._paper.append("g").classed("funnelarealayer",!0),et._pielayer=et._paper.append("g").classed("pielayer",!0),et._iciclelayer=et._paper.append("g").classed("iciclelayer",!0),et._treemaplayer=et._paper.append("g").classed("treemaplayer",!0),et._sunburstlayer=et._paper.append("g").classed("sunburstlayer",!0),et._indicatorlayer=et._toppaper.append("g").classed("indicatorlayer",!0),et._glimages=et._paper.append("g").classed("glimages",!0);var lr=et._toppaper.append("g").classed("layer-above",!0);et._imageUpperLayer=lr.append("g").classed("imagelayer",!0),et._shapeUpperLayer=lr.append("g").classed("shapelayer",!0),et._selectionLayer=et._toppaper.append("g").classed("selectionlayer",!0),et._infolayer=et._toppaper.append("g").classed("infolayer",!0),et._menulayer=et._toppaper.append("g").classed("menulayer",!0),et._zoomlayer=et._toppaper.append("g").classed("zoomlayer",!0),et._hoverlayer=et._hoverpaper.append("g").classed("hoverlayer",!0),et._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),je.emit("plotly_framework")}pe.animate=In,pe.addFrames=Gn,pe.deleteFrames=mr,pe.addTraces=be,pe.deleteTraces=_e,pe.extendTraces=Le,pe.moveTraces=he,pe.prependTraces=oe,pe.newPlot=Q,pe._doPlot=y,pe.purge=St,pe.react=$r,pe.redraw=K,pe.relayout=tt,pe.restyle=De,pe.setPlotConfig=M,pe.update=Ft,pe._guiRelayout=st(tt),pe._guiRestyle=st(De),pe._guiUpdate=st(Ft),pe._storeDirectGUIEdit=Te}}),gm=U({"src/snapshot/helpers.js"(pe){var le=Mi();pe.getDelay=function(O){return O._has&&(O._has("gl3d")||O._has("mapbox")||O._has("map"))?500:0},pe.getRedrawFunc=function(O){return function(){le.getComponentMethod("colorbar","draw")(O)}},pe.encodeSVG=function(O){return"data:image/svg+xml,"+encodeURIComponent(O)},pe.encodeJSON=function(O){return"data:application/json,"+encodeURIComponent(O)};var w=window.URL||window.webkitURL;pe.createObjectURL=function(O){return w.createObjectURL(O)},pe.revokeObjectURL=function(O){return w.revokeObjectURL(O)},pe.createBlob=function(O,z){if(z==="svg")return new window.Blob([O],{type:"image/svg+xml;charset=utf-8"});if(z==="full-json")return new window.Blob([O],{type:"application/json;charset=utf-8"});var l=R(window.atob(O));return new window.Blob([l],{type:"image/"+z})},pe.octetStream=function(O){document.location.href="data:application/octet-stream"+O};function R(O){for(var z=O.length,l=new ArrayBuffer(z),u=new Uint8Array(l),c=0;c<z;c++)u[c]=O.charCodeAt(c);return l}pe.IMAGE_URL_PREFIX=/^data:image\/\w+;base64,/}}),PE=U({"src/snapshot/tosvg.js"(pe,le){var w=Ze();ii();var R=ec(),O=Lr();E1();var z=/"/g,l="TOBESTRIPPED",u=new RegExp('("'+l+")|("+l+'")',"g");function c(f){var v=w.select("body").append("div").style({display:"none"}).html(""),h=f.replace(/(&[^;]*;)/gi,function(m){return m==="&lt;"?"&#60;":m==="&rt;"?"&#62;":m.indexOf("<")!==-1||m.indexOf(">")!==-1?"":v.html(m).text()});return v.remove(),h}function p(f){return f.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&amp;")}le.exports=function(v,h,m){var _=v._fullLayout,x=_._paper,A=_._toppaper,E=_.width,D=_.height,g;x.insert("rect",":first-child").call(R.setRect,0,0,E,D).call(O.fill,_.paper_bgcolor);var C=_._basePlotModules||[];for(g=0;g<C.length;g++){var I=C[g];I.toSVG&&I.toSVG(v)}if(A){var N=A.node().childNodes,F=Array.prototype.slice.call(N);for(g=0;g<F.length;g++){var k=F[g];k.childNodes.length&&x.node().appendChild(k)}}_._draggers&&_._draggers.remove(),x.node().style.background="",x.selectAll("text").attr({"data-unformatted":null,"data-math":null}).each(function(){var T=w.select(this);if(this.style.visibility==="hidden"||this.style.display==="none"){T.remove();return}else T.style({visibility:null,display:null});var y=this.style.fontFamily;y&&y.indexOf('"')!==-1&&T.style("font-family",y.replace(z,l));var S=this.style.fontWeight;S&&(S==="normal"||S==="400")&&T.style("font-weight",void 0);var M=this.style.fontStyle;M&&M==="normal"&&T.style("font-style",void 0);var W=this.style.fontVariant;W&&W==="normal"&&T.style("font-variant",void 0)}),x.selectAll(".gradient_filled,.pattern_filled").each(function(){var T=w.select(this),y=this.style.fill;y&&y.indexOf("url(")!==-1&&T.style("fill",y.replace(z,l));var S=this.style.stroke;S&&S.indexOf("url(")!==-1&&T.style("stroke",S.replace(z,l))}),(h==="pdf"||h==="eps")&&x.selectAll("#MathJax_SVG_glyphs path").attr("stroke-width",0),h==="svg"&&m&&(x.attr("width",m*E),x.attr("height",m*D),x.attr("viewBox","0 0 "+E+" "+D));var P=new window.XMLSerializer().serializeToString(x.node());return P=c(P),P=p(P),P=P.replace(u,"'"),P}}}),Sg=U({"src/snapshot/svgtoimg.js"(pe,le){var w=ii(),R=jf().EventEmitter,O=gm();function z(l){var u=l.emitter||new R,c=new Promise(function(p,f){var v=window.Image,h=l.svg,m=l.format||"png",_=l.canvas,x=l.scale||1,A=l.width||300,E=l.height||150,D=x*A,g=x*E,C=_.getContext("2d",{willReadFrequently:!0}),I=new v,N,F;m==="svg"||w.isSafari()?F=O.encodeSVG(h):(N=O.createBlob(h,"svg"),F=O.createObjectURL(N)),_.width=D,_.height=g,I.onload=function(){var k;switch(N=null,O.revokeObjectURL(F),m!=="svg"&&C.drawImage(I,0,0,D,g),m){case"jpeg":k=_.toDataURL("image/jpeg");break;case"png":k=_.toDataURL("image/png");break;case"webp":k=_.toDataURL("image/webp");break;case"svg":k=F;break;default:var P="Image format is not jpeg, png, svg or webp.";if(f(new Error(P)),!l.promise)return u.emit("error",P)}p(k),l.promise||u.emit("success",k)},I.onerror=function(k){if(N=null,O.revokeObjectURL(F),f(k),!l.promise)return u.emit("error",k)},I.src=F});return l.promise?c:u}le.exports=z}}),vy=U({"src/plot_api/to_image.js"(pe,le){var w=_t(),R=Bh(),O=tp(),z=ii(),l=gm(),u=PE(),c=Sg(),p=Ie().version,f={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 v(h,m){m=m||{};var _,x,A,E;z.isPlainObject(h)?(_=h.data||[],x=h.layout||{},A=h.config||{},E={}):(h=z.getGraphDiv(h),_=z.extendDeep([],h.data),x=z.extendDeep({},h.layout),A=h._context,E=h._fullLayout||{});function D(Q){return!(Q in m)||z.validate(m[Q],f[Q])}if(!D("width")&&m.width!==null||!D("height")&&m.height!==null)throw new Error("Height and width should be pixel values.");if(!D("format"))throw new Error("Export format is not "+z.join2(f.format.values,", "," or ")+".");var g={};function C(Q,J){return z.coerce(m,g,f,Q,J)}var I=C("format"),N=C("width"),F=C("height"),k=C("scale"),P=C("setBackground"),T=C("imageDataOnly"),y=document.createElement("div");y.style.position="absolute",y.style.left="-5000px",document.body.appendChild(y);var S=z.extendFlat({},x);N?S.width=N:m.width===null&&w(E.width)&&(S.width=E.width),F?S.height=F:m.height===null&&w(E.height)&&(S.height=E.height);var M=z.extendFlat({},A,{_exportedPlot:!0,staticPlot:!0,setBackground:P}),W=l.getRedrawFunc(y);function $(){return new Promise(function(Q){setTimeout(Q,l.getDelay(y._fullLayout))})}function Z(){return new Promise(function(Q,J){var G=u(y,I,k),ee=y._fullLayout.width,re=y._fullLayout.height;function fe(){R.purge(y),document.body.removeChild(y)}if(I==="full-json"){var we=O.graphJson(y,!1,"keepdata","object",!0,!0);return we.version=p,we=JSON.stringify(we),fe(),Q(T?we:l.encodeJSON(we))}if(fe(),I==="svg")return Q(T?G:l.encodeSVG(G));var Oe=document.createElement("canvas");Oe.id=z.randstr(),c({format:I,width:ee,height:re,scale:k,canvas:Oe,svg:G,promise:!0}).then(Q).catch(J)})}function K(Q){return T?Q.replace(l.IMAGE_URL_PREFIX,""):Q}return new Promise(function(Q,J){R.newPlot(y,_,S,M).then(W).then($).then(Z).then(function(G){Q(K(G))}).catch(function(G){J(G)})})}le.exports=v}}),_x=U({"src/plot_api/validate.js"(pe,le){var w=ii(),R=tp(),O=ep(),z=bn().dfltConfig,l=w.isPlainObject,u=Array.isArray,c=w.isArrayOrTypedArray;le.exports=function(C,I){C===void 0&&(C=[]),I===void 0&&(I={});var N=O.get(),F=[],k={_context:w.extendFlat({},z)},P,T;u(C)?(k.data=w.extendDeep([],C),P=C):(k.data=[],P=[],F.push(m("array","data"))),l(I)?(k.layout=w.extendDeep({},I),T=I):(k.layout={},T={},arguments.length>1&&F.push(m("object","layout"))),R.supplyDefaults(k);for(var y=k._fullData,S=P.length,M=0;M<S;M++){var W=P[M],$=["data",M];if(!l(W)){F.push(m("object",$));continue}var Z=y[M],K=Z.type,Q=N.traces[K].attributes;Q.type={valType:"enumerated",values:[K]},Z.visible===!1&&W.visible!==!1&&F.push(m("invisible",$)),p(W,Z,Q,F,$)}var J=k._fullLayout,G=f(N,y);return p(T,J,G,F,"layout"),F.length===0?void 0:F};function p(g,C,I,N,F,k){k=k||[];for(var P=Object.keys(g),T=0;T<P.length;T++){var y=P[T],S=k.slice();S.push(y);var M=g[y],W=C[y],$=x(I,y),Z=($||{}).valType,K=Z==="info_array",Q=Z==="colorscale",J=($||{}).items;if(!_(I,y))N.push(m("schema",F,S));else if(l(M)&&l(W)&&Z!=="any")p(M,W,$,N,F,S);else if(K&&u(M)){M.length>W.length&&N.push(m("unused",F,S.concat(W.length)));var G=W.length,ee=Array.isArray(J);ee&&(G=Math.min(G,J.length));var re,fe,we,Oe,ke;if($.dimensions===2)for(fe=0;fe<G;fe++)if(u(M[fe])){M[fe].length>W[fe].length&&N.push(m("unused",F,S.concat(fe,W[fe].length)));var Le=W[fe].length;for(re=0;re<(ee?Math.min(Le,J[fe].length):Le);re++)we=ee?J[fe][re]:J,Oe=M[fe][re],ke=W[fe][re],w.validate(Oe,we)?ke!==Oe&&ke!==+Oe&&N.push(m("dynamic",F,S.concat(fe,re),Oe,ke)):N.push(m("value",F,S.concat(fe,re),Oe))}else N.push(m("array",F,S.concat(fe),M[fe]));else for(fe=0;fe<G;fe++)we=ee?J[fe]:J,Oe=M[fe],ke=W[fe],w.validate(Oe,we)?ke!==Oe&&ke!==+Oe&&N.push(m("dynamic",F,S.concat(fe),Oe,ke)):N.push(m("value",F,S.concat(fe),Oe))}else if($.items&&!K&&u(M)){var oe=J[Object.keys(J)[0]],be=[],_e,he;for(_e=0;_e<W.length;_e++){var De=W[_e]._index||_e;if(he=S.slice(),he.push(De),l(M[De])&&l(W[_e])){be.push(De);var xe=M[De],se=W[_e];l(xe)&&xe.visible!==!1&&se.visible===!1?N.push(m("invisible",F,he)):p(xe,se,oe,N,F,he)}}for(_e=0;_e<M.length;_e++)he=S.slice(),he.push(_e),l(M[_e])?be.indexOf(_e)===-1&&N.push(m("unused",F,he)):N.push(m("object",F,he,M[_e]))}else!l(M)&&l(W)?N.push(m("object",F,S,M)):!c(M)&&c(W)&&!K&&!Q?N.push(m("array",F,S,M)):y in C?w.validate(M,$)?$.valType==="enumerated"&&($.coerceNumber&&M!==+W||!c(M)&&M!==W||String(M)!==String(W))&&N.push(m("dynamic",F,S,M,W)):N.push(m("value",F,S,M)):N.push(m("unused",F,S,M))}return N}function f(g,C){for(var I=g.layout.layoutAttributes,N=0;N<C.length;N++){var F=C[N],k=g.traces[F.type],P=k.layoutAttributes;P&&(F.subplot?w.extendFlat(I[k.attributes.subplot.dflt],P):w.extendFlat(I,P))}return I}var v={object:function(g,C){var I;return g==="layout"&&C===""?I="The layout argument":g[0]==="data"&&C===""?I="Trace "+g[1]+" in the data argument":I=h(g)+"key "+C,I+" must be linked to an object container"},array:function(g,C){var I;return g==="data"?I="The data argument":I=h(g)+"key "+C,I+" must be linked to an array container"},schema:function(g,C){return h(g)+"key "+C+" is not part of the schema"},unused:function(g,C,I){var N=l(I)?"container":"key";return h(g)+N+" "+C+" did not get coerced"},dynamic:function(g,C,I,N){return[h(g)+"key",C,"(set to '"+I+"')","got reset to","'"+N+"'","during defaults."].join(" ")},invisible:function(g,C){return(C?h(g)+"item "+C:"Trace "+g[1])+" got defaulted to be not visible"},value:function(g,C,I){return[h(g)+"key "+C,"is set to an invalid value ("+I+")"].join(" ")}};function h(g){return u(g)?"In data trace "+g[1]+", ":"In "+g+", "}function m(g,C,I,N,F){I=I||"";var k,P;u(C)?(k=C[0],P=C[1]):(k=C,P=null);var T=D(I),y=v[g](C,T,N,F);return w.log(y),{code:g,container:k,trace:P,path:I,astr:T,msg:y}}function _(g,C){var I=E(C),N=I.keyMinusId,F=I.id;return N in g&&g[N]._isSubplotObj&&F?!0:C in g}function x(g,C){if(C in g)return g[C];var I=E(C);return g[I.keyMinusId]}var A=w.counterRegex("([a-z]+)");function E(g){var C=g.match(A);return{keyMinusId:C&&C[1],id:C&&C[2]}}function D(g){if(!u(g))return String(g);for(var C="",I=0;I<g.length;I++){var N=g[I];typeof N=="number"?C=C.substr(0,C.length-1)+"["+N+"]":C+=N,I<g.length-1&&(C+=".")}return C}}}),vM=U({"src/snapshot/filesaver.js"(pe,le){var w=ii(),R=gm();function O(z,l,u){var c=document.createElement("a"),p="download"in c,f=new Promise(function(v,h){var m,_;if(p)return m=R.createBlob(z,u),_=R.createObjectURL(m),c.href=_,c.download=l,document.body.appendChild(c),c.click(),document.body.removeChild(c),R.revokeObjectURL(_),m=null,v(l);if(w.isSafari()){var x=u==="svg"?",":";base64,";return R.octetStream(x+encodeURIComponent(z)),v(l)}h(new Error("download error"))});return f}le.exports=O}}),Qw=U({"src/snapshot/download.js"(pe,le){var w=ii(),R=vy(),O=vM();gm();function z(l,u){var c;return w.isPlainObject(l)||(c=w.getGraphDiv(l)),u=u||{},u.format=u.format||"png",u.width=u.width||null,u.height=u.height||null,u.imageDataOnly=!0,new Promise(function(p,f){c&&c._snapshotInProgress&&f(new Error("Snapshotting already in progress.")),c&&(c._snapshotInProgress=!0);var v=R(l,u),h=u.filename||l.fn||"newplot";h+="."+u.format.replace("-","."),v.then(function(m){return c&&(c._snapshotInProgress=!1),O(m,h,u.format)}).then(function(m){p(m)}).catch(function(m){c&&(c._snapshotInProgress=!1),f(m)})})}le.exports=z}}),M1=U({"src/plot_api/template_api.js"(pe){var le=ii(),w=le.isPlainObject,R=ep(),O=tp(),z=Jn(),l=Tc(),u=bn().dfltConfig;pe.makeTemplate=function(A){A=le.isPlainObject(A)?A:le.getGraphDiv(A),A=le.extendDeep({_context:u},{data:A.data,layout:A.layout}),O.supplyDefaults(A);var E=A.data||[],D=A.layout||{};D._basePlotModules=A._fullLayout._basePlotModules,D._modules=A._fullLayout._modules;var g={data:{},layout:{}};E.forEach(function(M){var W={};f(M,W,h.bind(null,M));var $=le.coerce(M,{},z,"type"),Z=g.data[$];Z||(Z=g.data[$]=[]),Z.push(W)}),f(D,g.layout,v.bind(null,D)),delete g.layout.template;var C=D.template;if(w(C)){var I=C.layout,N,F,k,P,T,y;w(I)&&c(I,g.layout);var S=C.data;if(w(S)){for(F in g.data)if(k=S[F],Array.isArray(k)){for(T=g.data[F],y=T.length,P=k.length,N=0;N<y;N++)c(k[N%P],T[N]);for(N=y;N<P;N++)T.push(le.extendDeep({},k[N]))}for(F in S)F in g.data||(g.data[F]=le.extendDeep([],S[F]))}}return g};function c(A,E){A=le.extendDeep({},A);var D=Object.keys(A).sort(),g,C;function I(T,y,S){if(w(y)&&w(T))c(T,y);else if(Array.isArray(y)&&Array.isArray(T)){var M=l.arrayTemplater({_template:A},S);for(C=0;C<y.length;C++){var W=y[C],$=M.newItem(W)._template;$&&c($,W)}var Z=M.defaultItems();for(C=0;C<Z.length;C++)y.push(Z[C]._template);for(C=0;C<y.length;C++)delete y[C].templateitemname}}for(g=0;g<D.length;g++){var N=D[g],F=A[N];if(N in E?I(F,E[N],N):E[N]=F,p(N)===N)for(var k in E){var P=p(k);k!==P&&P===N&&!(k in A)&&I(F,E[k],N)}}}function p(A){return A.replace(/[0-9]+$/,"")}function f(A,E,D,g,C){var I=C&&D(C);for(var N in A){var F=A[N],k=m(A,N,g),P=m(A,N,C),T=D(P);if(!T){var y=p(N);y!==N&&(P=m(A,y,C),T=D(P))}if(!(I&&I===T)&&!(!T||T._noTemplating||T.valType==="data_array"||T.arrayOk&&Array.isArray(F)))if(!T.valType&&w(F))f(F,E,D,k,P);else if(T._isLinkedToArray&&Array.isArray(F))for(var S=!1,M=0,W={},$=0;$<F.length;$++){var Z=F[$];if(w(Z)){var K=Z.name;if(K)W[K]||(f(Z,E,D,m(F,M,k),m(F,M,P)),M++,W[K]=1);else if(!S){var Q=l.arrayDefaultKey(N),J=m(A,Q,g),G=m(F,M,k);f(Z,E,D,G,m(F,M,P));var ee=le.nestedProperty(E,G),re=le.nestedProperty(E,J);re.set(ee.get()),ee.set(null),S=!0}}}else{var fe=le.nestedProperty(E,k);fe.set(F)}}}function v(A,E){return R.getLayoutValObject(A,le.nestedProperty({},E).parts)}function h(A,E){return R.getTraceValObject(A,le.nestedProperty({},E).parts)}function m(A,E,D){var g;return D?Array.isArray(A)?g=D+"["+E+"]":g=D+"."+E:g=E,g}pe.validateTemplate=function(A,E){var D=le.extendDeep({},{_context:u,data:A.data,layout:A.layout}),g=D.layout||{};w(E)||(E=g.template||{});var C=E.layout,I=E.data,N=[];D.layout=g,D.layout.template=E,O.supplyDefaults(D);var F=D._fullLayout,k=D._fullData,P={};function T(J,G){for(var ee in J)if(ee.charAt(0)!=="_"&&w(J[ee])){var re=p(ee),fe=[],we;for(we=0;we<G.length;we++)fe.push(m(J,ee,G[we])),re!==ee&&fe.push(m(J,re,G[we]));for(we=0;we<fe.length;we++)P[fe[we]]=1;T(J[ee],fe)}}function y(J,G){for(var ee in J)if(ee.indexOf("defaults")===-1&&w(J[ee])){var re=m(J,ee,G);P[re]?y(J[ee],re):N.push({code:"unused",path:re})}}if(w(C)?(T(F,["layout"]),y(C,"layout")):N.push({code:"layout"}),!w(I))N.push({code:"data"});else{for(var S={},M,W=0;W<k.length;W++){var $=k[W];M=$.type,S[M]=(S[M]||0)+1,$._fullInput._template||N.push({code:"missing",index:$.index,traceType:M})}for(M in I){var Z=I[M].length,K=S[M]||0;Z>K?N.push({code:"unused",traceType:M,templateCount:Z,dataCount:K}):K>Z&&N.push({code:"reused",traceType:M,templateCount:Z,dataCount:K})}}function Q(J,G){for(var ee in J)if(ee.charAt(0)!=="_"){var re=J[ee],fe=m(J,ee,G);w(re)?(Array.isArray(J)&&re._template===!1&&re.templateitemname&&N.push({code:"missing",path:fe,templateitemname:re.templateitemname}),Q(re,fe)):Array.isArray(re)&&_(re)&&Q(re,fe)}}if(Q({data:k,layout:F},""),N.length)return N.map(x)};function _(A){for(var E=0;E<A.length;E++)if(w(A[E]))return!0}function x(A){var E;switch(A.code){case"data":E="The template has no key data.";break;case"layout":E="The template has no key layout.";break;case"missing":A.path?E="There are no templates for item "+A.path+" with name "+A.templateitemname:E="There are no templates for trace "+A.index+", of type "+A.traceType+".";break;case"unused":A.path?E="The template item at "+A.path+" was not used in constructing the plot.":A.dataCount?E="Some of the templates of type "+A.traceType+" were not used. The template has "+A.templateCount+" traces, the data only has "+A.dataCount+" of this type.":E="The template has "+A.templateCount+" traces of type "+A.traceType+" but there are none in the data.";break;case"reused":E="Some of the templates of type "+A.traceType+" were used more than once. The template has "+A.templateCount+" traces, the data has "+A.dataCount+" of this type.";break}return A.msg=E,A}}}),cT=U({"src/plot_api/index.js"(pe){var le=Bh();pe._doPlot=le._doPlot,pe.newPlot=le.newPlot,pe.restyle=le.restyle,pe.relayout=le.relayout,pe.redraw=le.redraw,pe.update=le.update,pe._guiRestyle=le._guiRestyle,pe._guiRelayout=le._guiRelayout,pe._guiUpdate=le._guiUpdate,pe._storeDirectGUIEdit=le._storeDirectGUIEdit,pe.react=le.react,pe.extendTraces=le.extendTraces,pe.prependTraces=le.prependTraces,pe.addTraces=le.addTraces,pe.deleteTraces=le.deleteTraces,pe.moveTraces=le.moveTraces,pe.purge=le.purge,pe.addFrames=le.addFrames,pe.deleteFrames=le.deleteFrames,pe.animate=le.animate,pe.setPlotConfig=le.setPlotConfig;var w=nl().getGraphDiv,R=dM().eraseActiveShape;pe.deleteActiveShape=function(z){return R(w(z))},pe.toImage=vy(),pe.validate=_x(),pe.downloadImage=Qw();var O=M1();pe.makeTemplate=O.makeTemplate,pe.validateTemplate=O.validateTemplate}}),ib=U({"src/traces/scatter/xy_defaults.js"(pe,le){var w=ii(),R=Mi();le.exports=function(z,l,u,c){var p=c("x"),f=c("y"),v,h=R.getComponentMethod("calendars","handleTraceDefaults");if(h(z,l,["x","y"],u),p){var m=w.minRowLength(p);f?v=Math.min(m,w.minRowLength(f)):(v=m,c("y0"),c("dy"))}else{if(!f)return 0;v=w.minRowLength(f),c("x0"),c("dx")}return l._length=v,v}}}),R1=U({"src/traces/scatter/period_defaults.js"(pe,le){var w=ii().dateTick0,R=Dt(),O=R.ONEWEEK;function z(l,u){return l%O===0?w(u,1):w(u,0)}le.exports=function(u,c,p,f,v){if(v||(v={x:!0,y:!0}),v.x){var h=f("xperiod");h&&(f("xperiod0",z(h,c.xcalendar)),f("xperiodalignment"))}if(v.y){var m=f("yperiod");m&&(f("yperiod0",z(m,c.ycalendar)),f("yperiodalignment"))}}}}),fT=U({"src/traces/scatter/stack_defaults.js"(pe,le){var w=["orientation","groupnorm","stackgaps"];le.exports=function(O,z,l,u){var c=l._scatterStackOpts,p=u("stackgroup");if(p){var f=z.xaxis+z.yaxis,v=c[f];v||(v=c[f]={});var h=v[p],m=!1;h?h.traces.push(z):(h=v[p]={traceIndices:[],traces:[z]},m=!0);for(var _={orientation:z.x&&!z.y?"h":"v"},x=0;x<w.length;x++){var A=w[x],E=A+"Found";if(!h[E]){var D=O[A]!==void 0,g=A==="orientation";if((D||m)&&(h[A]=u(A,_[A]),g&&(h.fillDflt=h[A]==="h"?"tonextx":"tonexty"),D&&(h[E]=!0,!m&&(delete h.traces[0][A],g))))for(var C=0;C<h.traces.length-1;C++){var I=h.traces[C];I._input.fill!==I.fill&&(I.fill=h.fillDflt)}}}return h}}}}),r0=U({"src/traces/scatter/marker_defaults.js"(pe,le){var w=Lr(),R=Ug().hasColorscale,O=wg(),z=Qd();le.exports=function(u,c,p,f,v,h){var m=z.isBubble(u),_=(u.line||{}).color,x;if(h=h||{},_&&(p=_),v("marker.symbol"),v("marker.opacity",m?.7:1),v("marker.size"),h.noAngle||(v("marker.angle"),h.noAngleRef||v("marker.angleref"),h.noStandOff||v("marker.standoff")),v("marker.color",p),R(u,"marker")&&O(u,c,f,v,{prefix:"marker.",cLetter:"c"}),h.noSelect||(v("selected.marker.color"),v("unselected.marker.color"),v("selected.marker.size"),v("unselected.marker.size")),h.noLine||(_&&!Array.isArray(_)&&c.marker.color!==_?x=_:m?x=w.background:x=w.defaultLine,v("marker.line.color",x),R(u,"marker.line")&&O(u,c,f,v,{prefix:"marker.line.",cLetter:"c"}),v("marker.line.width",m?1:0)),m&&(v("marker.sizeref"),v("marker.sizemin"),v("marker.sizemode")),h.gradient){var A=v("marker.gradient.type");A!=="none"&&v("marker.gradient.color")}}}}),Xy=U({"src/traces/scatter/line_defaults.js"(pe,le){var w=ii().isArrayOrTypedArray,R=Ug().hasColorscale,O=wg();le.exports=function(l,u,c,p,f,v){v||(v={});var h=(l.marker||{}).color;if(h&&h._inputArray&&(h=h._inputArray),f("line.color",c),R(l,"line"))O(l,u,p,f,{prefix:"line.",cLetter:"c"});else{var m=(w(h)?!1:h)||c;f("line.color",m)}f("line.width"),v.noDash||f("line.dash"),v.backoff&&f("line.backoff")}}}),g0=U({"src/traces/scatter/line_shape_defaults.js"(pe,le){le.exports=function(R,O,z){var l=z("line.shape");l==="spline"&&z("line.smoothing")}}}),y0=U({"src/traces/scatter/text_defaults.js"(pe,le){var w=ii();le.exports=function(R,O,z,l,u){u=u||{},l("textposition"),w.coerceFont(l,"textfont",u.font||z.font,u),u.noSelect||(l("selected.textfont.color"),l("unselected.textfont.color"))}}}),Ch=U({"src/traces/scatter/fillcolor_defaults.js"(pe,le){var w=Lr(),R=ii().isArrayOrTypedArray;function O(z){for(var l=w.interpolate(z[0][1],z[1][1],.5),u=2;u<z.length;u++){var c=w.interpolate(z[u-1][1],z[u][1],.5);l=w.interpolate(l,c,z[u-1][0]/z[u][0])}return l}le.exports=function(l,u,c,p,f){f||(f={});var v=!1;if(u.marker){var h=u.marker.color,m=(u.marker.line||{}).color;h&&!R(h)?v=h:m&&!R(m)&&(v=m)}var _;if(f.moduleHasFillgradient){var x=p("fillgradient.type");if(x!=="none"){p("fillgradient.start"),p("fillgradient.stop");var A=p("fillgradient.colorscale");A&&(_=O(A))}}p("fillcolor",w.addOpacity((u.line||{}).color||v||_||c,.5))}}}),DE=U({"src/traces/scatter/defaults.js"(pe,le){var w=ii(),R=Mi(),O=Kc(),z=hu(),l=Qd(),u=ib(),c=R1(),p=fT(),f=r0(),v=Xy(),h=g0(),m=y0(),_=Ch(),x=ii().coercePattern;le.exports=function(E,D,g,C){function I(M,W){return w.coerce(E,D,O,M,W)}var N=u(E,D,C,I);if(N||(D.visible=!1),!!D.visible){c(E,D,C,I),I("xhoverformat"),I("yhoverformat"),I("zorder");var F=p(E,D,C,I);C.scattermode==="group"&&D.orientation===void 0&&I("orientation","v");var k=!F&&N<z.PTS_LINESONLY?"lines+markers":"lines";I("text"),I("hovertext"),I("mode",k),l.hasMarkers(D)&&f(E,D,g,C,I,{gradient:!0}),l.hasLines(D)&&(v(E,D,g,C,I,{backoff:!0}),h(E,D,I),I("connectgaps"),I("line.simplify")),l.hasText(D)&&(I("texttemplate"),m(E,D,C,I));var P=[];(l.hasMarkers(D)||l.hasText(D))&&(I("cliponaxis"),I("marker.maxdisplayed"),P.push("points")),I("fill",F?F.fillDflt:"none"),D.fill!=="none"&&(_(E,D,g,I,{moduleHasFillgradient:!0}),l.hasLines(D)||h(E,D,I),x(I,"fillpattern",D.fillcolor,!1));var T=(D.line||{}).color,y=(D.marker||{}).color;(D.fill==="tonext"||D.fill==="toself")&&P.push("fills"),I("hoveron",P.join("+")||"points"),D.hoveron!=="fills"&&I("hovertemplate");var S=R.getComponentMethod("errorbars","supplyDefaults");S(E,D,T||y||g,{axis:"y"}),S(E,D,T||y||g,{axis:"x",inherit:"y"}),w.coerceSelectionMarkerOpacity(D,I)}}}}),rg=U({"src/traces/scatter/grouping_defaults.js"(pe,le){var w=lT().getAxisGroup;le.exports=function(O,z,l,u,c){var p=z.orientation,f=z[{v:"x",h:"y"}[p]+"axis"],v=w(l,f)+p,h=l._alignmentOpts||{},m=u("alignmentgroup"),_=h[v];_||(_=h[v]={});var x=_[m];x?x.traces.push(z):x=_[m]={traces:[z],alignmentIndex:Object.keys(_).length,offsetGroups:{}};var A=u("offsetgroup")||"",E=x.offsetGroups,D=E[A];z._offsetIndex=0,(c!=="group"||A)&&(D||(D=E[A]={offsetIndex:Object.keys(E).length}),z._offsetIndex=D.offsetIndex)}}}),e2=U({"src/traces/scatter/cross_trace_defaults.js"(pe,le){var w=ii(),R=rg(),O=Kc();le.exports=function(l,u){var c,p,f,v=u.scattermode;function h(E){return w.coerce(p._input,p,O,E)}if(u.scattermode==="group")for(f=0;f<l.length;f++)p=l[f],p.type==="scatter"&&(c=p._input,R(c,p,u,h,v));for(f=0;f<l.length;f++){var m=l[f];if(m.type==="scatter"){var _=m.fill;if(!(_==="none"||_==="toself")&&(m.opacity=void 0,_==="tonexty"||_==="tonextx"))for(var x=f-1;x>=0;x--){var A=l[x];if(A.type==="scatter"&&A.xaxis===m.xaxis&&A.yaxis===m.yaxis){A.opacity=void 0;break}}}}}}}),EA=U({"src/traces/scatter/layout_defaults.js"(pe,le){var w=ii(),R=eg();le.exports=function(O,z){function l(c,p){return w.coerce(O,z,R,c,p)}var u=z.barmode==="group";z.scattermode==="group"&&l("scattergap",u?z.bargap:.2)}}}),Zy=U({"src/plots/cartesian/align_period.js"(pe,le){var w=_t(),R=ii(),O=R.dateTime2ms,z=R.incrementMonth,l=Dt(),u=l.ONEAVGMONTH;le.exports=function(p,f,v,h){if(f.type!=="date")return{vals:h};var m=p[v+"periodalignment"];if(!m)return{vals:h};var _=p[v+"period"],x;if(w(_)){if(_=+_,_<=0)return{vals:h}}else if(typeof _=="string"&&_.charAt(0)==="M"){var A=+_.substring(1);if(A>0&&Math.round(A)===A)x=A;else return{vals:h}}for(var E=f.calendar,D=m==="start",g=m==="end",C=p[v+"period0"],I=O(C,E)||0,N=[],F=[],k=[],P=h.length,T=0;T<P;T++){var y=h[T],S,M,W;if(x){for(S=Math.round((y-I)/(x*u)),W=z(I,x*S,E);W>y;)W=z(W,-x,E);for(;W<=y;)W=z(W,x,E);M=z(W,-x,E)}else{for(S=Math.round((y-I)/_),W=I+S*_;W>y;)W-=_;for(;W<=y;)W+=_;M=W-_}N[T]=D?M:g?W:(M+W)/2,F[T]=M,k[T]=W}return{vals:N,starts:F,ends:k}}}}),b0=U({"src/traces/scatter/colorscale_calc.js"(pe,le){var w=Ug().hasColorscale,R=t0(),O=Qd();le.exports=function(l,u){O.hasLines(u)&&w(u,"line")&&R(l,u,{vals:u.line.color,containerStr:"line",cLetter:"c"}),O.hasMarkers(u)&&(w(u,"marker")&&R(l,u,{vals:u.marker.color,containerStr:"marker",cLetter:"c"}),w(u,"marker.line")&&R(l,u,{vals:u.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}}}),zm=U({"src/traces/scatter/arrays_to_calcdata.js"(pe,le){var w=ii();le.exports=function(O,z){for(var l=0;l<O.length;l++)O[l].i=l;w.mergeArray(z.text,O,"tx"),w.mergeArray(z.texttemplate,O,"txt"),w.mergeArray(z.hovertext,O,"htx"),w.mergeArray(z.customdata,O,"data"),w.mergeArray(z.textposition,O,"tp"),z.textfont&&(w.mergeArrayCastPositive(z.textfont.size,O,"ts"),w.mergeArray(z.textfont.color,O,"tc"),w.mergeArray(z.textfont.family,O,"tf"),w.mergeArray(z.textfont.weight,O,"tw"),w.mergeArray(z.textfont.style,O,"ty"),w.mergeArray(z.textfont.variant,O,"tv"),w.mergeArray(z.textfont.textcase,O,"tC"),w.mergeArray(z.textfont.lineposition,O,"tE"),w.mergeArray(z.textfont.shadow,O,"tS"));var u=z.marker;if(u){w.mergeArrayCastPositive(u.size,O,"ms"),w.mergeArrayCastPositive(u.opacity,O,"mo"),w.mergeArray(u.symbol,O,"mx"),w.mergeArray(u.angle,O,"ma"),w.mergeArray(u.standoff,O,"mf"),w.mergeArray(u.color,O,"mc");var c=u.line;u.line&&(w.mergeArray(c.color,O,"mlc"),w.mergeArrayCastPositive(c.width,O,"mlw"));var p=u.gradient;p&&p.type!=="none"&&(w.mergeArray(p.type,O,"mgt"),w.mergeArray(p.color,O,"mgc"))}}}}),k1=U({"src/traces/scatter/calc_selection.js"(pe,le){var w=ii();le.exports=function(O,z){w.isArrayOrTypedArray(z.selectedpoints)&&w.tagSelected(O,z)}}}),my=U({"src/traces/scatter/calc.js"(pe,le){var w=_t(),R=ii(),O=Yu(),z=Zy(),l=Dt().BADNUM,u=Qd(),c=b0(),p=zm(),f=k1();function v(E,D){var g=E._fullLayout,C=D._xA=O.getFromId(E,D.xaxis||"x","x"),I=D._yA=O.getFromId(E,D.yaxis||"y","y"),N=C.makeCalcdata(D,"x"),F=I.makeCalcdata(D,"y"),k=z(D,C,"x",N),P=z(D,I,"y",F),T=k.vals,y=P.vals,S=D._length,M=new Array(S),W=D.ids,$=A(D,g,C,I),Z=!1,K,Q,J,G,ee,re;_(g,D);var fe="x",we="y",Oe;if($)R.pushUnique($.traceIndices,D.index),K=$.orientation==="v",K?(we="s",Oe="x"):(fe="s",Oe="y"),ee=$.stackgaps==="interpolate";else{var ke=m(D,S);h(E,D,C,I,T,y,ke)}var Le=!!D.xperiodalignment,oe=!!D.yperiodalignment;for(Q=0;Q<S;Q++){var be=M[Q]={},_e=w(T[Q]),he=w(y[Q]);_e&&he?(be[fe]=T[Q],be[we]=y[Q],Le&&(be.orig_x=N[Q],be.xEnd=k.ends[Q],be.xStart=k.starts[Q]),oe&&(be.orig_y=F[Q],be.yEnd=P.ends[Q],be.yStart=P.starts[Q])):$&&(K?_e:he)?(be[Oe]=K?T[Q]:y[Q],be.gap=!0,ee?(be.s=l,Z=!0):be.s=0):be[fe]=be[we]=l,W&&(be.id=String(W[Q]))}if(p(M,D),c(E,D),f(M,D),$){for(Q=0;Q<M.length;)M[Q][Oe]===l?M.splice(Q,1):Q++;if(R.sort(M,function(Ee,Te){return Ee[Oe]-Te[Oe]||Ee.i-Te.i}),Z){for(Q=0;Q<M.length-1&&M[Q].gap;)Q++;for(re=M[Q].s,re||(re=M[Q].s=0),J=0;J<Q;J++)M[J].s=re;for(G=M.length-1;G>Q&&M[G].gap;)G--;for(re=M[G].s,J=M.length-1;J>G;J--)M[J].s=re;for(;Q<G;)if(Q++,M[Q].gap){for(J=Q+1;M[J].gap;)J++;for(var De=M[Q-1][Oe],xe=M[Q-1].s,se=(M[J].s-xe)/(M[J][Oe]-De);Q<J;)M[Q].s=xe+(M[Q][Oe]-De)*se,Q++}}}return M}function h(E,D,g,C,I,N,F){var k=D._length,P=E._fullLayout,T=g._id,y=C._id,S=P._firstScatter[x(D)]===D.uid,M=(A(D,P,g,C)||{}).orientation,W=D.fill;g._minDtick=0,C._minDtick=0;var $={padded:!0},Z={padded:!0};F&&($.ppad=Z.ppad=F);var K=k<2||I[0]!==I[k-1]||N[0]!==N[k-1];K&&(W==="tozerox"||W==="tonextx"&&(S||M==="h"))?$.tozero=!0:!(D.error_y||{}).visible&&(W==="tonexty"||W==="tozeroy"||!u.hasMarkers(D)&&!u.hasText(D))&&($.padded=!1,$.ppad=0),K&&(W==="tozeroy"||W==="tonexty"&&(S||M==="v"))?Z.tozero=!0:(W==="tonextx"||W==="tozerox")&&(Z.padded=!1),T&&(D._extremes[T]=O.findExtremes(g,I,$)),y&&(D._extremes[y]=O.findExtremes(C,N,Z))}function m(E,D){if(u.hasMarkers(E)){var g=E.marker,C=1.6*(E.marker.sizeref||1),I;if(E.marker.sizemode==="area"?I=function(T){return Math.max(Math.sqrt((T||0)/C),3)}:I=function(T){return Math.max((T||0)/C,3)},R.isArrayOrTypedArray(g.size)){var N={type:"linear"};O.setConvert(N);for(var F=N.makeCalcdata(E.marker,"size"),k=new Array(D),P=0;P<D;P++)k[P]=I(F[P]);return k}else return I(g.size)}}function _(E,D){var g=x(D),C=E._firstScatter;C[g]||(C[g]=D.uid)}function x(E){var D=E.stackgroup;return E.xaxis+E.yaxis+E.type+(D?"-"+D:"")}function A(E,D,g,C){var I=E.stackgroup;if(I){var N=D._scatterStackOpts[g._id+C._id][I],F=N.orientation==="v"?C:g;if(F.type==="linear"||F.type==="log")return N}}le.exports={calc:v,calcMarkerSize:m,calcAxisExpansion:h,setFirstScatter:_,getStackOpts:A}}}),gy=U({"src/traces/bar/sieve.js"(pe,le){le.exports=R;var w=ii().distinctVals;function R(O,z){this.traces=O,this.sepNegVal=z.sepNegVal,this.overlapNoMerge=z.overlapNoMerge;for(var l=1/0,u=z.posAxis._id.charAt(0),c=[],p=0;p<O.length;p++){for(var f=O[p],v=0;v<f.length;v++){var h=f[v],m=h.p;m===void 0&&(m=h[u]),m!==void 0&&c.push(m)}f[0]&&f[0].width1&&(l=Math.min(f[0].width1,l))}this.positions=c;var _=w(c);this.distinctPositions=_.vals,_.vals.length===1&&l!==1/0?this.minDiff=l:this.minDiff=Math.min(_.minDiff,l);var x=(z.posAxis||{}).type;(x==="category"||x==="multicategory")&&(this.minDiff=1),this.binWidth=this.minDiff,this.bins={}}R.prototype.put=function(z,l,u){var c=this.getLabel(z,l,u),p=this.bins[c]||0;return this.bins[c]=p+u,p},R.prototype.get=function(z,l,u){var c=this.getLabel(z,l,u);return this.bins[c]||0},R.prototype.getLabel=function(z,l,u){var c=u<0&&this.sepNegVal?"v":"^",p=this.overlapNoMerge?z:Math.round(z/this.binWidth);return c+p+"g"+l}}}),F0=U({"src/traces/bar/cross_trace_calc.js"(pe,le){var w=_t(),R=ii().isArrayOrTypedArray,O=Dt().BADNUM,z=Mi(),l=Yu(),u=lT().getAxisGroup,c=gy();function p(M,W){for(var $=W.xaxis,Z=W.yaxis,K=M._fullLayout,Q=M._fullData,J=M.calcdata,G=[],ee=[],re=0;re<Q.length;re++){var fe=Q[re];if(fe.visible===!0&&z.traceIs(fe,"bar")&&fe.xaxis===$._id&&fe.yaxis===Z._id&&(fe.orientation==="h"?G.push(J[re]):ee.push(J[re]),fe._computePh))for(var we=M.calcdata[re],Oe=0;Oe<we.length;Oe++)typeof we[Oe].ph0=="function"&&(we[Oe].ph0=we[Oe].ph0()),typeof we[Oe].ph1=="function"&&(we[Oe].ph1=we[Oe].ph1())}var ke={xCat:$.type==="category"||$.type==="multicategory",yCat:Z.type==="category"||Z.type==="multicategory",mode:K.barmode,norm:K.barnorm,gap:K.bargap,groupgap:K.bargroupgap};f(M,$,Z,ee,ke),f(M,Z,$,G,ke)}function f(M,W,$,Z,K){if(Z.length){var Q,J,G,ee,re;switch(m($,Z),K.mode){case"overlay":_(M,W,$,Z,K);break;case"group":for(Q=[],J=[],G=0;G<Z.length;G++)ee=Z[G],re=ee[0].trace,re.offset===void 0?J.push(ee):Q.push(ee);J.length&&x(M,W,$,J,K),Q.length&&_(M,W,$,Q,K);break;case"stack":case"relative":for(Q=[],J=[],G=0;G<Z.length;G++)ee=Z[G],re=ee[0].trace,re.base===void 0?J.push(ee):Q.push(ee);h(J),J.length&&A(M,W,$,J,K),Q.length&&_(M,W,$,Q,K);break}v(Z),y(Z,W)}}function v(M){var W,$,Z,K,Q,J,G;for(W=0;W<M.length;W++)$=M[W],Z=$[0].trace,K=$[0].t,K.cornerradiusvalue===void 0&&(Q=Z.marker?Z.marker.cornerradius:void 0,Q!==void 0&&(J=w(Q)?+Q:+Q.slice(0,-1),G=w(Q)?"px":"%",K.cornerradiusvalue=J,K.cornerradiusform=G))}function h(M){if(!(M.length<2)){var W,$,Z,K,Q,J,G;for(W=0;W<M.length&&($=M[W],Z=$[0].trace,Q=Z.marker?Z.marker.cornerradius:void 0,Q===void 0);W++);if(Q!==void 0)for(J=w(Q)?+Q:+Q.slice(0,-1),G=w(Q)?"px":"%",W=0;W<M.length;W++)$=M[W],K=$[0].t,K.cornerradiusvalue=J,K.cornerradiusform=G}}function m(M,W){var $,Z;for($=0;$<W.length;$++){var K=W[$],Q=K[0].trace,J=Q.type==="funnel"?Q._base:Q.base,G,ee=Q.orientation==="h"?Q.xcalendar:Q.ycalendar,re=M.type==="category"||M.type==="multicategory"?function(){return null}:M.d2c;if(R(J)){for(Z=0;Z<Math.min(J.length,K.length);Z++)G=re(J[Z],0,ee),w(G)?(K[Z].b=+G,K[Z].hasB=1):K[Z].b=0;for(;Z<K.length;Z++)K[Z].b=0}else{G=re(J,0,ee);var fe=w(G);for(G=fe?G:0,Z=0;Z<K.length;Z++)K[Z].b=G,fe&&(K[Z].hasB=1)}}}function _(M,W,$,Z,K){for(var Q=0;Q<Z.length;Q++){var J=Z[Q],G=new c([J],{posAxis:W,sepNegVal:!1,overlapNoMerge:!K.norm});E(M,W,G,K),K.norm?(F(G),P($,G,K)):I($,G)}}function x(M,W,$,Z,K){var Q=new c(Z,{posAxis:W,sepNegVal:!1,overlapNoMerge:!K.norm});E(M,W,Q,K),k(Q,W),K.norm?(F(Q),P($,Q,K)):I($,Q)}function A(M,W,$,Z,K){var Q=new c(Z,{posAxis:W,sepNegVal:K.mode==="relative",overlapNoMerge:!(K.norm||K.mode==="stack"||K.mode==="relative")});E(M,W,Q,K),N($,Q,K);for(var J=0;J<Z.length;J++)for(var G=Z[J],ee=G[0].t.offsetindex,re=0;re<G.length;re++){var fe=G[re];if(fe.s!==O){var we=fe.b+fe.s===Q.get(fe.p,ee,fe.s);we&&(fe._outmost=!0)}}K.norm&&P($,Q,K)}function E(M,W,$,Z){var K=M._fullLayout,Q=$.positions,J=$.distinctPositions,G=$.minDiff,ee=$.traces,re=ee.length,fe=Q.length!==J.length,we=G*(1-Z.gap),Oe,ke,Le,oe;if(W._id==="angularaxis")Oe=we,ke=Oe*(1-(Z.groupgap||0)),Le=-ke/2;else{var be=u(K,W._id)+ee[0][0].trace.orientation;oe=K._alignmentOpts[be]||{}}for(var _e=0;_e<re;_e++){var he=ee[_e],De=he[0].trace;if(W._id!=="angularaxis"){var xe=oe[De.alignmentgroup]||{},se=Object.keys(xe.offsetGroups||{}).length;se?Oe=we/se:Oe=fe?we/re:we,ke=Oe*(1-(Z.groupgap||0)),se?Le=((2*De._offsetIndex+1-se)*Oe-ke)/2:Le=fe?((2*_e+1-re)*Oe-ke)/2:-ke/2}var Ee=he[0].t;Ee.barwidth=ke,Ee.offsetindex=De._offsetIndex||0,Ee.poffset=Le,Ee.bargroupwidth=we,Ee.bardelta=G}$.binWidth=ee[0][0].t.barwidth/100,D($),g(W,$),W._id==="angularaxis"?C(W,$):C(W,$,fe)}function D(M){var W=M.traces,$,Z;for($=0;$<W.length;$++){var K=W[$],Q=K[0],J=Q.trace,G=Q.t,ee=J._offset||J.offset,re=G.poffset,fe;if(R(ee)){for(fe=Array.prototype.slice.call(ee,0,K.length),Z=0;Z<fe.length;Z++)w(fe[Z])||(fe[Z]=re);for(Z=fe.length;Z<K.length;Z++)fe.push(re);G.poffset=fe}else ee!==void 0&&(G.poffset=ee);var we=J._width||J.width,Oe=G.barwidth;if(R(we)){var ke=Array.prototype.slice.call(we,0,K.length);for(Z=0;Z<ke.length;Z++)w(ke[Z])||(ke[Z]=Oe);for(Z=ke.length;Z<K.length;Z++)ke.push(Oe);if(G.barwidth=ke,ee===void 0){for(fe=[],Z=0;Z<K.length;Z++)fe.push(re+(Oe-ke[Z])/2);G.poffset=fe}}else we!==void 0&&(G.barwidth=we,ee===void 0&&(G.poffset=re+(Oe-we)/2))}}function g(M,W){for(var $=W.traces,Z=S(M),K=0;K<$.length;K++)for(var Q=$[K],J=Q[0].t,G=J.poffset,ee=R(G),re=J.barwidth,fe=R(re),we=0;we<Q.length;we++){var Oe=Q[we],ke=Oe.w=fe?re[we]:re;Oe.p===void 0&&(Oe.p=Oe[Z],Oe["orig_"+Z]=Oe[Z]);var Le=(ee?G[we]:G)+ke/2;Oe[Z]=Oe.p+Le}}function C(M,W,$){var Z=W.traces,K=W.minDiff,Q=K/2;l.minDtick(M,W.minDiff,W.distinctPositions[0],$);for(var J=0;J<Z.length;J++){var G=Z[J],ee=G[0],re=ee.trace,fe=[],we,Oe,ke,Le;for(Le=0;Le<G.length;Le++)we=G[Le],Oe=we.p-Q,ke=we.p+Q,fe.push(Oe,ke);if(re.width||re.offset){var oe=ee.t,be=oe.poffset,_e=oe.barwidth,he=R(be),De=R(_e);for(Le=0;Le<G.length;Le++){we=G[Le];var xe=he?be[Le]:be,se=De?_e[Le]:_e;Oe=we.p+xe,ke=Oe+se,fe.push(Oe,ke)}}re._extremes[M._id]=l.findExtremes(M,fe,{padded:!1})}}function I(M,W){for(var $=W.traces,Z=S(M),K=0;K<$.length;K++){for(var Q=$[K],J=Q[0].trace,G=J.type==="scatter",ee=J.orientation==="v",re=[],fe=!1,we=0;we<Q.length;we++){var Oe=Q[we],ke=G?0:Oe.b,Le=G?ee?Oe.y:Oe.x:ke+Oe.s;Oe[Z]=Le,re.push(Le),Oe.hasB&&re.push(ke),(!Oe.hasB||!Oe.b)&&(fe=!0)}J._extremes[M._id]=l.findExtremes(M,re,{tozero:fe,padded:!0})}}function N(M,W,$){var Z=S(M),K=W.traces,Q,J,G,ee,re,fe,we;for(ee=0;ee<K.length;ee++)if(Q=K[ee],J=Q[0].trace,J.type==="funnel")for(we=Q[0].t.offsetindex,re=0;re<Q.length;re++)fe=Q[re],fe.s!==O&&W.put(fe.p,we,-.5*fe.s);for(ee=0;ee<K.length;ee++){Q=K[ee],J=Q[0].trace,G=J.type==="funnel",we=J.type==="barpolar"?0:Q[0].t.offsetindex;var Oe=[];for(re=0;re<Q.length;re++)if(fe=Q[re],fe.s!==O){var ke;G?ke=fe.s:ke=fe.s+fe.b;var Le=W.put(fe.p,we,ke),oe=Le+ke;fe.b=Le,fe[Z]=oe,$.norm||(Oe.push(oe),fe.hasB&&Oe.push(Le))}$.norm||(J._extremes[M._id]=l.findExtremes(M,Oe,{tozero:!0,padded:!0}))}}function F(M){for(var W=M.traces,$=0;$<W.length;$++)for(var Z=W[$],K=Z[0].t.offsetindex,Q=0;Q<Z.length;Q++){var J=Z[Q];J.s!==O&&M.put(J.p,K,J.b+J.s)}}function k(M,W){for(var $=M.traces,Z=0;Z<$.length;Z++){var K=$[Z],Q=K[0].trace,J=K[0].t.offsetindex;if(Q.base===void 0)for(var G=new c([K],{posAxis:W,sepNegVal:!0,overlapNoMerge:!0}),ee=0;ee<K.length;ee++){var re=K[ee];if(re.p!==O){var fe=G.put(re.p,J,re.b+re.s);fe&&(re.b=fe)}}}}function P(M,W,$){var Z=W.traces,K=S(M),Q=$.norm==="fraction"?1:100,J=Q/1e9,G=M.l2c(M.c2l(0)),ee=$.mode==="stack"?Q:G;function re(Ee){return w(M.c2l(Ee))&&(Ee<G-J||Ee>ee+J||!w(G))}for(var fe=0;fe<Z.length;fe++){for(var we=Z[fe],Oe=we[0].t.offsetindex,ke=we[0].trace,Le=[],oe=!1,be=!1,_e=0;_e<we.length;_e++){var he=we[_e];if(he.s!==O){var De=Math.abs(Q/W.get(he.p,Oe,he.s));he.b*=De,he.s*=De;var xe=he.b,se=xe+he.s;he[K]=se,Le.push(se),be=be||re(se),he.hasB&&(Le.push(xe),be=be||re(xe)),(!he.hasB||!he.b)&&(oe=!0)}}ke._extremes[M._id]=l.findExtremes(M,Le,{tozero:oe,padded:be})}}function T(M,W,$,Z){for(var K=S(Z),Q=0;Q<M.length;Q++)for(var J=M[Q],G=0;G<J.length;G++){var ee=J[G],re=ee[K];ee._sMin=W[re],ee._sMax=$[re]}}function y(M,W){var $=S(W),Z={},K,Q,J,G=1/0,ee=-1/0;for(K=0;K<M.length;K++)for(J=M[K],Q=0;Q<J.length;Q++){var re=J[Q].p;w(re)&&(G=Math.min(G,re),ee=Math.max(ee,re))}var fe=1e4/(ee-G),we=Z.round=function(Be){return String(Math.round(fe*(Be-G)))},Oe={},ke={},Le=M.some(function(Be){var tt=Be[0].trace;return"marker"in tt&&tt.marker.cornerradius});for(K=0;K<M.length;K++){J=M[K],J[0].t.extents=Z;var oe=J[0].t.poffset,be=R(oe);for(Q=0;Q<J.length;Q++){var _e=J[Q],he=_e[$]-_e.w/2;if(w(he)){var De=_e[$]+_e.w/2,xe=we(_e.p);Z[xe]?Z[xe]=[Math.min(he,Z[xe][0]),Math.max(De,Z[xe][1])]:Z[xe]=[he,De]}if(_e.p0=_e.p+(be?oe[Q]:oe),_e.p1=_e.p0+_e.w,_e.s0=_e.b,_e.s1=_e.s0+_e.s,Le){var se=Math.min(_e.s0,_e.s1)||0,Ee=Math.max(_e.s0,_e.s1)||0,Te=_e[$];Oe[Te]=Te in Oe?Math.min(Oe[Te],se):se,ke[Te]=Te in ke?Math.max(ke[Te],Ee):Ee}}}Le&&T(M,Oe,ke,W)}function S(M){return M._id.charAt(0)}le.exports={crossTraceCalc:p,setGroupPositions:f}}}),em=U({"src/traces/scatter/cross_trace_calc.js"(pe,le){var w=my(),R=F0().setGroupPositions;function O(u,c){for(var p=c.xaxis,f=c.yaxis,v=u._fullLayout,h=u._fullData,m=u.calcdata,_=[],x=[],A=0;A<h.length;A++){var E=h[A];E.visible===!0&&E.type==="scatter"&&E.xaxis===p._id&&E.yaxis===f._id&&(E.orientation==="h"?_.push(m[A]):E.orientation==="v"&&x.push(m[A]))}var D={mode:v.scattermode,gap:v.scattergap};R(u,p,f,x,D),R(u,f,p,_,D)}le.exports=function(c,p){c._fullLayout.scattermode==="group"&&O(c,p);var f=p.xaxis,v=p.yaxis,h=f._id+v._id,m=c._fullLayout._scatterStackOpts[h];if(m){var _=c.calcdata,x,A,E,D,g,C,I,N,F,k,P,T,y,S,M;for(var W in m){k=m[W];var $=k.traceIndices;if($.length){for(P=k.stackgaps==="interpolate",T=k.groupnorm,k.orientation==="v"?(y="x",S="y"):(y="y",S="x"),M=new Array($.length),x=0;x<M.length;x++)M[x]=!1;C=_[$[0]];var Z=new Array(C.length);for(x=0;x<C.length;x++)Z[x]=C[x][y];for(x=1;x<$.length;x++){for(g=_[$[x]],A=E=0;A<g.length;A++){for(I=g[A][y];I>Z[E]&&E<Z.length;E++)z(g,A,Z[E],x,M,P,y),A++;if(I!==Z[E]){for(D=0;D<x;D++)z(_[$[D]],E,I,D,M,P,y);Z.splice(E,0,I)}E++}for(;E<Z.length;E++)z(g,A,Z[E],x,M,P,y),A++}var K=Z.length;for(A=0;A<C.length;A++){for(N=C[A][S]=C[A].s,x=1;x<$.length;x++)g=_[$[x]],g[0].trace._rawLength=g[0].trace._length,g[0].trace._length=K,N+=g[A].s,g[A][S]=N;if(T)for(F=(T==="fraction"?N:N/100)||1,x=0;x<$.length;x++){var Q=_[$[x]][A];Q[S]/=F,Q.sNorm=Q.s/F}}for(x=0;x<$.length;x++){g=_[$[x]];var J=g[0].trace,G=w.calcMarkerSize(J,J._rawLength),ee=Array.isArray(G);if(G&&M[x]||ee){var re=G;for(G=new Array(K),A=0;A<K;A++)G[A]=g[A].gap?0:ee?re[g[A].i]:re}var fe=new Array(K),we=new Array(K);for(A=0;A<K;A++)fe[A]=g[A].x,we[A]=g[A].y;w.calcAxisExpansion(c,J,f,v,fe,we,G),g[0].t.orientation=k.orientation}}}}};function z(u,c,p,f,v,h,m){v[f]=!0;var _={i:null,gap:!0,s:0};if(_[m]=p,u.splice(c,0,_),c&&p===u[c-1][m]){var x=u[c-1];_.s=x.s,_.i=x.i,_.gap=x.gap}else h&&(_.s=l(u,c,p,m));c||(u[0].t=u[1].t,u[0].trace=u[1].trace,delete u[1].t,delete u[1].trace)}function l(u,c,p,f){var v=u[c-1],h=u[c+1];return h?v?v.s+(h.s-v.s)*(p-v[f])/(h[f]-v[f]):h.s:v.s}}}),tm=U({"src/traces/scatter/line_points.js"(pe,le){var w=ec(),R=Dt(),O=R.BADNUM,z=R.LOG_CLIP,l=z+.5,u=z-.5,c=ii(),p=c.segmentsIntersect,f=c.constrain,v=hu();le.exports=function(m,_){var x=_.trace||{},A=_.xaxis,E=_.yaxis,D=A.type==="log",g=E.type==="log",C=A._length,I=E._length,N=_.backoff,F=x.marker,k=_.connectGaps,P=_.baseTolerance,T=_.shape,y=T==="linear",S=x.fill&&x.fill!=="none",M=[],W=v.minTolerance,$=m.length,Z=new Array($),K=0,Q,J,G,ee,re,fe,we,Oe,ke,Le,oe,be,_e,he,De,xe;function se(br){var Or=m[br];if(!Or)return!1;var tn=_.linearized?A.l2p(Or.x):A.c2p(Or.x),Jr=_.linearized?E.l2p(Or.y):E.c2p(Or.y);if(tn===O){if(D&&(tn=A.c2p(Or.x,!0)),tn===O)return!1;g&&Jr===O&&(tn*=Math.abs(A._m*I*(A._m>0?l:u)/(E._m*C*(E._m>0?l:u)))),tn*=1e3}if(Jr===O){if(g&&(Jr=E.c2p(Or.y,!0)),Jr===O)return!1;Jr*=1e3}return[tn,Jr]}function Ee(br,Or,tn,Jr){var dn=tn-br,on=Jr-Or,Nn=.5-br,Wi=.5-Or,Oa=dn*dn+on*on,Da=dn*Nn+on*Wi;if(Da>0&&Da<Oa){var Aa=Nn*on-Wi*dn;if(Aa*Aa<Oa)return!0}}var Te,Be;function tt(br,Or){var tn=br[0]/C,Jr=br[1]/I,dn=Math.max(0,-tn,tn-1,-Jr,Jr-1);return dn&&Te!==void 0&&Ee(tn,Jr,Te,Be)&&(dn=0),dn&&Or&&Ee(tn,Jr,Or[0]/C,Or[1]/I)&&(dn=0),(1+v.toleranceGrowth*dn)*P}function at(br,Or){var tn=br[0]-Or[0],Jr=br[1]-Or[1];return Math.sqrt(tn*tn+Jr*Jr)}var gt=v.maxScreensAway,pt=-C*gt,Rt=C*(1+gt),$t=-I*gt,Wt=I*(1+gt),Ht=[[pt,$t,Rt,$t],[Rt,$t,Rt,Wt],[Rt,Wt,pt,Wt],[pt,Wt,pt,$t]],Ft,st,rt,Ue,xt,Gt;function Jt(br,Or){for(var tn=[],Jr=0,dn=0;dn<4;dn++){var on=Ht[dn],Nn=p(br[0],br[1],Or[0],Or[1],on[0],on[1],on[2],on[3]);Nn&&(!Jr||Math.abs(Nn.x-tn[0][0])>1||Math.abs(Nn.y-tn[0][1])>1)&&(Nn=[Nn.x,Nn.y],Jr&&at(Nn,br)<at(tn[0],br)?tn.unshift(Nn):tn.push(Nn),Jr++)}return tn}function Ut(br){if(br[0]<pt||br[0]>Rt||br[1]<$t||br[1]>Wt)return[f(br[0],pt,Rt),f(br[1],$t,Wt)]}function kr(br,Or){if(br[0]===Or[0]&&(br[0]===pt||br[0]===Rt)||br[1]===Or[1]&&(br[1]===$t||br[1]===Wt))return!0}function Pr(br,Or){var tn=[],Jr=Ut(br),dn=Ut(Or);return Jr&&dn&&kr(Jr,dn)||(Jr&&tn.push(Jr),dn&&tn.push(dn)),tn}function $r(br,Or,tn){return function(Jr,dn){var on=Ut(Jr),Nn=Ut(dn),Wi=[];if(on&&Nn&&kr(on,Nn))return Wi;on&&Wi.push(on),Nn&&Wi.push(Nn);var Oa=2*c.constrain((Jr[br]+dn[br])/2,Or,tn)-((on||Jr)[br]+(Nn||dn)[br]);if(Oa){var Da;on&&Nn?Da=Oa>0==on[br]>Nn[br]?on:Nn:Da=on||Nn,Da[br]+=Oa}return Wi}}var rn;T==="linear"||T==="spline"?rn=Jt:T==="hv"||T==="vh"?rn=Pr:T==="hvh"?rn=$r(0,pt,Rt):T==="vhv"&&(rn=$r(1,$t,Wt));function kn(br,Or){var tn=Or[0]-br[0],Jr=(Or[1]-br[1])/tn,dn=(br[1]*Or[0]-Or[1]*br[0])/tn;return dn>0?[Jr>0?pt:Rt,Wt]:[Jr>0?Rt:pt,$t]}function Rn(br){var Or=br[0],tn=br[1],Jr=Or===Z[K-1][0],dn=tn===Z[K-1][1];if(!(Jr&&dn))if(K>1){var on=Or===Z[K-2][0],Nn=tn===Z[K-2][1];Jr&&(Or===pt||Or===Rt)&&on?Nn?K--:Z[K-1]=br:dn&&(tn===$t||tn===Wt)&&Nn?on?K--:Z[K-1]=br:Z[K++]=br}else Z[K++]=br}function ci(br){Z[K-1][0]!==br[0]&&Z[K-1][1]!==br[1]&&Rn([rt,Ue]),Rn(br),xt=null,rt=Ue=0}var In=c.isArrayOrTypedArray(F);function Gn(br){if(br&&N&&(br.i=Q,br.d=m,br.trace=x,br.marker=In?F[br.i]:F,br.backoff=N),Te=br[0]/C,Be=br[1]/I,Ft=br[0]<pt?pt:br[0]>Rt?Rt:0,st=br[1]<$t?$t:br[1]>Wt?Wt:0,Ft||st){if(!K)Z[K++]=[Ft||br[0],st||br[1]];else if(xt){var Or=rn(xt,br);Or.length>1&&(ci(Or[0]),Z[K++]=Or[1])}else Gt=rn(Z[K-1],br)[0],Z[K++]=Gt;var tn=Z[K-1];Ft&&st&&(tn[0]!==Ft||tn[1]!==st)?(xt&&(rt!==Ft&&Ue!==st?Rn(rt&&Ue?kn(xt,br):[rt||Ft,Ue||st]):rt&&Ue&&Rn([rt,Ue])),Rn([Ft,st])):rt-Ft&&Ue-st&&Rn([Ft||rt,st||Ue]),xt=br,rt=Ft,Ue=st}else xt&&ci(rn(xt,br)[0]),Z[K++]=br}for(Q=0;Q<$;Q++)if(J=se(Q),!!J){for(K=0,xt=null,Gn(J),Q++;Q<$;Q++){if(ee=se(Q),!ee){if(k)continue;break}if(!y||!_.simplify){Gn(ee);continue}var mr=se(Q+1);if(Le=at(ee,J),!(!(S&&(K===0||K===$-1))&&Le<tt(ee,mr)*W)){for(Oe=[(ee[0]-J[0])/Le,(ee[1]-J[1])/Le],re=J,oe=Le,be=he=De=0,we=!1,G=ee,Q++;Q<m.length;Q++){if(fe=mr,mr=se(Q+1),!fe){if(k)continue;break}if(ke=[fe[0]-J[0],fe[1]-J[1]],xe=ke[0]*Oe[1]-ke[1]*Oe[0],he=Math.min(he,xe),De=Math.max(De,xe),De-he>tt(fe,mr))break;G=fe,_e=ke[0]*Oe[0]+ke[1]*Oe[1],_e>oe?(oe=_e,ee=fe,we=!1):_e<be&&(be=_e,re=fe,we=!0)}if(we?(Gn(ee),G!==re&&Gn(re)):(re!==J&&Gn(re),G!==ee&&Gn(ee)),Gn(G),Q>=m.length||!fe)break;Gn(fe),J=fe}}xt&&Rn([rt||xt[0],Ue||xt[1]]),M.push(Z.slice(0,K))}var St=T.slice(T.length-1);if(N&&St!=="h"&&St!=="v"){for(var Ot=!1,Et=-1,je=[],Ye=0;Ye<M.length;Ye++)for(var et=0;et<M[Ye].length-1;et++){var mt=M[Ye][et],Nt=M[Ye][et+1],lr=w.applyBackoff(Nt,mt);(lr[0]!==Nt[0]||lr[1]!==Nt[1])&&(Ot=!0),je[Et+1]||(Et++,je[Et]=[mt,[lr[0],lr[1]]])}return Ot?je:M}return M}}}),u_=U({"src/traces/scatter/link_traces.js"(pe,le){var w={tonextx:1,tonexty:1,tonext:1};le.exports=function(O,z,l){var u,c,p,f,v,h={},m=!1,_=-1,x=0,A=-1;for(c=0;c<l.length;c++)u=l[c][0].trace,p=u.stackgroup||"",p?p in h?v=h[p]:(v=h[p]=x,x++):u.fill in w&&A>=0?v=A:(v=A=x,x++),v<_&&(m=!0),u._groupIndex=_=v;var E=l.slice();m&&E.sort(function(g,C){var I=g[0].trace,N=C[0].trace;return I._groupIndex-N._groupIndex||I.index-N.index});var D={};for(c=0;c<E.length;c++)u=E[c][0].trace,p=u.stackgroup||"",u.visible===!0?(u._nexttrace=null,u.fill in w&&(f=D[p],u._prevtrace=f||null,f&&(f._nexttrace=u)),u._ownfill=u.fill&&(u.fill.substr(0,6)==="tozero"||u.fill==="toself"||u.fill.substr(0,2)==="to"&&!u._prevtrace),D[p]=u):u._prevtrace=u._nexttrace=u._ownfill=null;return E}}}),Ob=U({"src/traces/scatter/plot.js"(pe,le){var w=Ze(),R=Mi(),O=ii(),z=O.ensureSingle,l=O.identity,u=ec(),c=Qd(),p=tm(),f=u_(),v=RE().tester;le.exports=function(A,E,D,g,C,I){var N,F,k=!C,P=!!C&&C.duration>0,T=f(A,E,D);if(N=g.selectAll("g.trace").data(T,function(S){return S[0].trace.uid}),N.enter().append("g").attr("class",function(S){return"trace scatter trace"+S[0].trace.uid}).style("stroke-miterlimit",2),N.order(),h(A,N,E),P){I&&(F=I());var y=w.transition().duration(C.duration).ease(C.easing).each("end",function(){F&&F()}).each("interrupt",function(){F&&F()});y.each(function(){g.selectAll("g.trace").each(function(S,M){m(A,M,E,S,T,this,C)})})}else N.each(function(S,M){m(A,M,E,S,T,this,C)});k&&N.exit().remove(),g.selectAll("path:not([d])").remove()};function h(x,A,E){A.each(function(D){var g=z(w.select(this),"g","fills");u.setClipUrl(g,E.layerClipId,x);var C=D[0].trace,I=[];C._ownfill&&I.push("_ownFill"),C._nexttrace&&I.push("_nextFill");var N=g.selectAll("g").data(I,l);N.enter().append("g"),N.exit().each(function(F){C[F]=null}).remove(),N.order().each(function(F){C[F]=z(w.select(this),"path","js-fill")})})}function m(x,A,E,D,g,C,I){var N=x._context.staticPlot,F;_(x,A,E,D,g);var k=!!I&&I.duration>0;function P(Rn){return k?Rn.transition():Rn}var T=E.xaxis,y=E.yaxis,S=D[0].trace,M=S.line,W=w.select(C),$=z(W,"g","errorbars"),Z=z(W,"g","lines"),K=z(W,"g","points"),Q=z(W,"g","text");if(R.getComponentMethod("errorbars","plot")(x,$,E,I),S.visible!==!0)return;P(W).style("opacity",S.opacity);var J,G,ee=S.fill.charAt(S.fill.length-1);ee!=="x"&&ee!=="y"&&(ee="");var re,fe;ee==="y"?(re=1,fe=y.c2p(0,!0)):ee==="x"&&(re=0,fe=T.c2p(0,!0)),D[0][E.isRangePlot?"nodeRangePlot3":"node3"]=W;var we="",Oe=[],ke=S._prevtrace,Le=null,oe=null;ke&&(we=ke._prevRevpath||"",G=ke._nextFill,Oe=ke._ownPolygons,Le=ke._fillsegments,oe=ke._fillElement);var be,_e,he="",De="",xe,se,Ee,Te,Be,tt,at=[];S._polygons=[];var gt=[],pt=[],Rt=O.noop;if(J=S._ownFill,c.hasLines(S)||S.fill!=="none"){G&&G.datum(D),["hv","vh","hvh","vhv"].indexOf(M.shape)!==-1?(xe=u.steps(M.shape),se=u.steps(M.shape.split("").reverse().join(""))):M.shape==="spline"?xe=se=function(Rn){var ci=Rn[Rn.length-1];return Rn.length>1&&Rn[0][0]===ci[0]&&Rn[0][1]===ci[1]?u.smoothclosed(Rn.slice(1),M.smoothing):u.smoothopen(Rn,M.smoothing)}:xe=se=function(Rn){return"M"+Rn.join("L")},Ee=function(Rn){return se(Rn.reverse())},pt=p(D,{xaxis:T,yaxis:y,trace:S,connectGaps:S.connectgaps,baseTolerance:Math.max(M.width||1,3)/4,shape:M.shape,backoff:M.backoff,simplify:M.simplify,fill:S.fill}),gt=new Array(pt.length);var $t=0;for(F=0;F<pt.length;F++){var Wt,Ht=pt[F];!Wt||!ee?(Wt=Ht.slice(),gt[$t]=Wt,$t++):Wt.push.apply(Wt,Ht)}S._fillElement=null,S._fillExclusionElement=oe,S._fillsegments=gt.slice(0,$t),gt=S._fillsegments,pt.length&&(Te=pt[0][0].slice(),Be=pt[pt.length-1],tt=Be[Be.length-1].slice()),Rt=function(Rn){return function(ci){if(be=xe(ci),_e=Ee(ci),he?ee?(he+="L"+be.substr(1),De=_e+("L"+De.substr(1))):(he+="Z"+be,De=_e+"Z"+De):(he=be,De=_e),c.hasLines(S)){var In=w.select(this);if(In.datum(D),Rn)P(In.style("opacity",0).attr("d",be).call(u.lineGroupStyle)).style("opacity",1);else{var Gn=P(In);Gn.attr("d",be),u.singleLineStyle(D,Gn)}}}}}var Ft=Z.selectAll(".js-line").data(pt);P(Ft.exit()).style("opacity",0).remove(),Ft.each(Rt(!1)),Ft.enter().append("path").classed("js-line",!0).style("vector-effect",N?"none":"non-scaling-stroke").call(u.lineGroupStyle).each(Rt(!0)),u.setClipUrl(Ft,E.layerClipId,x);function st(Rn){P(Rn).attr("d","M0,0Z")}var rt=function(){var Rn=new Array(gt.length);for(F=0;F<gt.length;F++)Rn[F]=v(gt[F]);return Rn},Ue=function(Rn){var ci,In;if(!Rn||Rn.length===0)for(ci=new Array(gt.length),In=0;In<gt.length;In++){var Gn=gt[In][0].slice(),mr=gt[In][gt[In].length-1].slice();Gn[re]=mr[re]=fe;var St=[mr,Gn],Ot=St.concat(gt[In]);ci[In]=v(Ot)}else{for(ci=new Array(Rn.length-1+gt.length),In=0;In<Rn.length-1;In++)ci[In]=v(Rn[In]);var Et=Rn[Rn.length-1].slice();for(Et.reverse(),In=0;In<gt.length;In++)ci[Rn.length-1+In]=v(gt[In].concat(Et))}return ci};pt.length?(J?(J.datum(D),Te&&tt&&(ee?(Te[re]=tt[re]=fe,P(J).attr("d","M"+tt+"L"+Te+"L"+he.substr(1)).call(u.singleFillStyle,x),at=Ue(null)):(P(J).attr("d",he+"Z").call(u.singleFillStyle,x),at=rt())),S._polygons=at,S._fillElement=J):G&&(S.fill.substr(0,6)==="tonext"&&he&&we?(S.fill==="tonext"?(P(G).attr("d",he+"Z"+we+"Z").call(u.singleFillStyle,x),at=rt(),S._polygons=at.concat(Oe)):(P(G).attr("d",he+"L"+we.substr(1)+"Z").call(u.singleFillStyle,x),at=Ue(Le),S._polygons=at),S._fillElement=G):st(G)),S._prevRevpath=De):(J?st(J):G&&st(G),S._prevRevpath=null),S._ownPolygons=at;function xt(Rn){return Rn.filter(function(ci){return!ci.gap&&ci.vis})}function Gt(Rn){return Rn.filter(function(ci){return ci.vis})}function Jt(Rn){return Rn.filter(function(ci){return!ci.gap})}function Ut(Rn){return Rn.id}function kr(Rn){if(Rn.ids)return Ut}function Pr(){return!1}function $r(Rn,ci,In){var Gn,mr,St,Ot=In[0].trace,Et=c.hasMarkers(Ot),je=c.hasText(Ot),Ye=kr(Ot),et=Pr,mt=Pr;if(Et||je){var Nt=l,lr=Ot.stackgroup,br=lr&&x._fullLayout._scatterStackOpts[T._id+y._id][lr].stackgaps==="infer zero";Ot.marker.maxdisplayed||Ot._needsCull?Nt=br?Gt:xt:lr&&!br&&(Nt=Jt),Et&&(et=Nt),je&&(mt=Nt)}mr=Rn.selectAll("path.point"),Gn=mr.data(et,Ye);var Or=Gn.enter().append("path").classed("point",!0);k&&Or.call(u.pointStyle,Ot,x).call(u.translatePoints,T,y).style("opacity",0).transition().style("opacity",1),Gn.order();var tn;Et&&(tn=u.makePointStyleFns(Ot)),Gn.each(function(Jr){var dn=w.select(this),on=P(dn);St=u.translatePoint(Jr,on,T,y),St?(u.singlePointStyle(Jr,on,Ot,tn,x),E.layerClipId&&u.hideOutsideRangePoint(Jr,on,T,y,Ot.xcalendar,Ot.ycalendar),Ot.customdata&&dn.classed("plotly-customdata",Jr.data!==null&&Jr.data!==void 0)):on.remove()}),k?Gn.exit().transition().style("opacity",0).remove():Gn.exit().remove(),mr=ci.selectAll("g"),Gn=mr.data(mt,Ye),Gn.enter().append("g").classed("textpoint",!0).append("text"),Gn.order(),Gn.each(function(Jr){var dn=w.select(this),on=P(dn.select("text"));St=u.translatePoint(Jr,on,T,y),St?E.layerClipId&&u.hideOutsideRangePoint(Jr,dn,T,y,Ot.xcalendar,Ot.ycalendar):dn.remove()}),Gn.selectAll("text").call(u.textPointStyle,Ot,x).each(function(Jr){var dn=T.c2p(Jr.x),on=y.c2p(Jr.y);w.select(this).selectAll("tspan.line").each(function(){P(w.select(this)).attr({x:dn,y:on})})}),Gn.exit().remove()}K.datum(D),Q.datum(D),$r(K,Q,D);var rn=S.cliponaxis===!1,kn=rn?null:E.layerClipId;u.setClipUrl(K,kn,x),u.setClipUrl(Q,kn,x)}function _(x,A,E,D,g){var C=E.xaxis,I=E.yaxis,N=w.extent(O.simpleMap(C.range,C.r2c)),F=w.extent(O.simpleMap(I.range,I.r2c)),k=D[0].trace;if(c.hasMarkers(k)){var P=k.marker.maxdisplayed;if(P!==0){var T=D.filter(function(W){return W.x>=N[0]&&W.x<=N[1]&&W.y>=F[0]&&W.y<=F[1]}),y=Math.ceil(T.length/P),S=0;g.forEach(function(W,$){var Z=W[0].trace;c.hasMarkers(Z)&&Z.marker.maxdisplayed>0&&$<A&&S++});var M=Math.round(S*y/3+Math.floor(S/3)*y/7.1);D.forEach(function(W){delete W.vis}),T.forEach(function(W,$){Math.round(($+M)%y)===0&&(W.vis=!0)})}}}}}),qg=U({"src/traces/scatter/marker_colorbar.js"(pe,le){le.exports={container:"marker",min:"cmin",max:"cmax"}}}),AA=U({"src/traces/scatter/format_labels.js"(pe,le){var w=Yu();le.exports=function(O,z,l){var u={},c={_fullLayout:l},p=w.getFromTrace(c,z,"x"),f=w.getFromTrace(c,z,"y"),v=O.orig_x;v===void 0&&(v=O.x);var h=O.orig_y;return h===void 0&&(h=O.y),u.xLabel=w.tickText(p,p.c2l(v),!0).text,u.yLabel=w.tickText(f,f.c2l(h),!0).text,u}}}),z0=U({"src/traces/scatter/style.js"(pe,le){var w=Ze(),R=ec(),O=Mi();function z(p){var f=w.select(p).selectAll("g.trace.scatter");f.style("opacity",function(v){return v[0].trace.opacity}),f.selectAll("g.points").each(function(v){var h=w.select(this),m=v.trace||v[0].trace;l(h,m,p)}),f.selectAll("g.text").each(function(v){var h=w.select(this),m=v.trace||v[0].trace;u(h,m,p)}),f.selectAll("g.trace path.js-line").call(R.lineGroupStyle),f.selectAll("g.trace path.js-fill").call(R.fillGroupStyle,p,!1),O.getComponentMethod("errorbars","style")(f)}function l(p,f,v){R.pointStyle(p.selectAll("path.point"),f,v)}function u(p,f,v){R.textPointStyle(p.selectAll("text"),f,v)}function c(p,f,v){var h=f[0].trace;h.selectedpoints?(R.selectedPointStyle(v.selectAll("path.point"),h),R.selectedTextStyle(v.selectAll("text"),h)):(l(v,h,p),u(v,h,p))}le.exports={style:z,stylePoints:l,styleText:u,styleOnSelect:c}}}),ng=U({"src/traces/scatter/get_trace_color.js"(pe,le){var w=Lr(),R=Qd();le.exports=function(z,l){var u,c;if(z.mode==="lines")return u=z.line.color,u&&w.opacity(u)?u:z.fillcolor;if(z.mode==="none")return z.fill?z.fillcolor:"";var p=l.mcc||(z.marker||{}).color,f=l.mlcc||((z.marker||{}).line||{}).color;return c=p&&w.opacity(p)?p:f&&w.opacity(f)&&(l.mlw||((z.marker||{}).line||{}).width)?f:"",c?w.opacity(c)<.3?w.addOpacity(c,.3):c:(u=(z.line||{}).color,u&&w.opacity(u)&&R.hasLines(z)&&z.line.width?u:z.fillcolor)}}}),sv=U({"src/traces/scatter/hover.js"(pe,le){var w=ii(),R=Dp(),O=Mi(),z=ng(),l=Lr(),u=w.fillText;le.exports=function(p,f,v,h){var m=p.cd,_=m[0].trace,x=p.xa,A=p.ya,E=x.c2p(f),D=A.c2p(v),g=[E,D],C=_.hoveron||"",I=_.mode.indexOf("markers")!==-1?3:.5,N=!!_.xperiodalignment,F=!!_.yperiodalignment;if(C.indexOf("points")!==-1){var k=function(Oe){if(N){var ke=x.c2p(Oe.xStart),Le=x.c2p(Oe.xEnd);return E>=Math.min(ke,Le)&&E<=Math.max(ke,Le)?0:1/0}var oe=Math.max(3,Oe.mrc||0),be=1-1/oe,_e=Math.abs(x.c2p(Oe.x)-E);return _e<oe?be*_e/oe:_e-oe+be},P=function(Oe){if(F){var ke=A.c2p(Oe.yStart),Le=A.c2p(Oe.yEnd);return D>=Math.min(ke,Le)&&D<=Math.max(ke,Le)?0:1/0}var oe=Math.max(3,Oe.mrc||0),be=1-1/oe,_e=Math.abs(A.c2p(Oe.y)-D);return _e<oe?be*_e/oe:_e-oe+be},T=function(Oe){var ke=Math.max(I,Oe.mrc||0),Le=x.c2p(Oe.x)-E,oe=A.c2p(Oe.y)-D;return Math.max(Math.sqrt(Le*Le+oe*oe)-ke,1-I/ke)},y=R.getDistanceFunction(h,k,P,T);if(R.getClosest(m,y,p),p.index!==!1){var S=m[p.index],M=x.c2p(S.x,!0),W=A.c2p(S.y,!0),$=S.mrc||1;p.index=S.i;var Z=m[0].t.orientation,K=Z&&(S.sNorm||S.s),Q=Z==="h"?K:S.orig_x!==void 0?S.orig_x:S.x,J=Z==="v"?K:S.orig_y!==void 0?S.orig_y:S.y;return w.extendFlat(p,{color:z(_,S),x0:M-$,x1:M+$,xLabelVal:Q,y0:W-$,y1:W+$,yLabelVal:J,spikeDistance:T(S),hovertemplate:_.hovertemplate}),u(S,_,p),O.getComponentMethod("errorbars","hoverInfo")(S,_,p),[p]}}function G(Oe){if(!Oe)return!1;var ke=Oe.node();try{var Le=new DOMPoint(g[0],g[1]);return ke.isPointInFill(Le)}catch{var oe=ke.ownerSVGElement.createSVGPoint();return oe.x=g[0],oe.y=g[1],ke.isPointInFill(oe)}}function ee(Oe){var ke,Le=[],oe=1/0,be=-1/0,_e=1/0,he=-1/0,De;for(ke=0;ke<Oe.length;ke++){var xe=Oe[ke];xe.contains(g)&&(Le.push(xe),_e=Math.min(_e,xe.ymin),he=Math.max(he,xe.ymax))}if(Le.length===0)return null;_e=Math.max(_e,0),he=Math.min(he,A._length),De=(_e+he)/2;var se,Ee,Te,Be,tt,at,gt;for(ke=0;ke<Le.length;ke++)for(Ee=Le[ke].pts,se=1;se<Ee.length;se++)at=Ee[se-1][1],gt=Ee[se][1],at>De!=gt>=De&&(Be=Ee[se-1][0],tt=Ee[se][0],gt-at&&(Te=Be+(tt-Be)*(De-at)/(gt-at),oe=Math.min(oe,Te),be=Math.max(be,Te)));return oe=Math.max(oe,0),be=Math.min(be,x._length),{x0:oe,x1:be,y0:De,y1:De}}if(C.indexOf("fills")!==-1&&_._fillElement){var re=G(_._fillElement)&&!G(_._fillExclusionElement);if(re){var fe=ee(_._polygons);fe===null&&(fe={x0:g[0],x1:g[0],y0:g[1],y1:g[1]});var we=l.defaultLine;return l.opacity(_.fillcolor)?we=_.fillcolor:l.opacity((_.line||{}).color)&&(we=_.line.color),w.extendFlat(p,{distance:p.maxHoverDistance,x0:fe.x0,x1:fe.x1,y0:fe.y0,y1:fe.y1,color:we,hovertemplate:!1}),delete p.index,_.text&&!w.isArrayOrTypedArray(_.text)?p.text=String(_.text):p.text=_.name,[p]}}}}}),qd=U({"src/traces/scatter/select.js"(pe,le){var w=Qd();le.exports=function(O,z){var l=O.cd,u=O.xaxis,c=O.yaxis,p=[],f=l[0].trace,v,h,m,_,x=!w.hasMarkers(f)&&!w.hasText(f);if(x)return[];if(z===!1)for(v=0;v<l.length;v++)l[v].selected=0;else for(v=0;v<l.length;v++)h=l[v],m=u.c2p(h.x),_=c.c2p(h.y),h.i!==null&&z.contains([m,_],!1,v,O)?(p.push({pointNumber:h.i,x:u.c2d(h.x),y:c.c2d(h.y)}),h.selected=1):h.selected=0;return p}}}),Ky=U({"src/plots/cartesian/attributes.js"(pe,le){le.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}}}),B0=U({"src/plots/cartesian/type_defaults.js"(pe,le){var w=Mi().traceIs,R=Pb();le.exports=function(p,f,v,h){v("autotypenumbers",h.autotypenumbersDflt);var m=v("type",(h.splomStash||{}).type);m==="-"&&(O(f,h.data),f.type==="-"?f.type="linear":p.type=f.type)};function O(c,p){if(c.type==="-"){var f=c._id,v=f.charAt(0),h;f.indexOf("scene")!==-1&&(f=v);var m=z(p,f,v);if(m){if(m.type==="histogram"&&v==={v:"y",h:"x"}[m.orientation||"v"]){c.type="linear";return}var _=v+"calendar",x=m[_],A={noMultiCategory:!w(m,"cartesian")||w(m,"noMultiCategory")};if(m.type==="box"&&m._hasPreCompStats&&v==={h:"x",v:"y"}[m.orientation||"v"]&&(A.noMultiCategory=!0),A.autotypenumbers=c.autotypenumbers,u(m,v)){var E=l(m),D=[];for(h=0;h<p.length;h++){var g=p[h];!w(g,"box-violin")||(g[v+"axis"]||v)!==f||(g[E]!==void 0?D.push(g[E][0]):g.name!==void 0?D.push(g.name):D.push("text"),g[_]!==x&&(x=void 0))}c.type=R(D,x,A)}else if(m.type==="splom"){var C=m.dimensions,I=C[m._axesDim[f]];I.visible&&(c.type=R(I.values,x,A))}else c.type=R(m[v]||[m[v+"0"]],x,A)}}}function z(c,p,f){for(var v=0;v<c.length;v++){var h=c[v];if(h.type==="splom"&&h._length>0&&(h["_"+f+"axes"]||{})[p])return h;if((h[f+"axis"]||f)===p){if(u(h,f))return h;if((h[f]||[]).length||h[f+"0"])return h}}}function l(c){return{v:"x",h:"y"}[c.orientation||"v"]}function u(c,p){var f=l(c),v=w(c,"box-violin"),h=w(c._fullInput||{},"candlestick");return v&&!h&&p===f&&c[f]===void 0&&c[f+"0"]===void 0}}}),t2=U({"src/plots/cartesian/category_order_defaults.js"(pe,le){var w=dr().isTypedArraySpec;function R(O,z){var l=z.dataAttr||O._id.charAt(0),u={},c,p,f;if(z.axData)c=z.axData;else for(c=[],p=0;p<z.data.length;p++){var v=z.data[p];v[l+"axis"]===O._id&&c.push(v)}for(p=0;p<c.length;p++){var h=c[p][l];for(f=0;f<h.length;f++){var m=h[f];m!=null&&(u[m]=1)}}return Object.keys(u)}le.exports=function(z,l,u,c){if(l.type==="category"){var p=z.categoryarray,f=Array.isArray(p)&&p.length>0||w(p),v;f&&(v="array");var h=u("categoryorder",v),m;h==="array"&&(m=u("categoryarray")),!f&&h==="array"&&(h=l.categoryorder="trace"),h==="trace"?l._initialCategories=[]:h==="array"?l._initialCategories=m.slice():(m=R(l,c).sort(),h==="category ascending"?l._initialCategories=m:h==="category descending"&&(l._initialCategories=m.reverse()))}}}}),Jy=U({"src/plots/cartesian/line_grid_defaults.js"(pe,le){var w=or().mix,R=jn(),O=ii();le.exports=function(l,u,c,p){p=p||{};var f=p.dfltColor;function v(S,M){return O.coerce2(l,u,p.attributes,S,M)}var h=v("linecolor",f),m=v("linewidth"),_=c("showline",p.showLine||!!h||!!m);_||(delete u.linecolor,delete u.linewidth);var x=w(f,p.bgColor,p.blend||R.lightFraction).toRgbString(),A=v("gridcolor",x),E=v("gridwidth"),D=v("griddash"),g=c("showgrid",p.showGrid||!!A||!!E||!!D);if(g||(delete u.gridcolor,delete u.gridwidth,delete u.griddash),p.hasMinor){var C=w(u.gridcolor,p.bgColor,67).toRgbString(),I=v("minor.gridcolor",C),N=v("minor.gridwidth",u.gridwidth||1),F=v("minor.griddash",u.griddash||"solid"),k=c("minor.showgrid",!!I||!!N||!!F);k||(delete u.minor.gridcolor,delete u.minor.gridwidth,delete u.minor.griddash)}if(!p.noZeroLine){v("zerolinelayer");var P=v("zerolinecolor",f),T=v("zerolinewidth"),y=c("zeroline",p.showGrid||!!P||!!T);y||(delete u.zerolinelayer,delete u.zerolinecolor,delete u.zerolinewidth)}}}}),CA=U({"src/plots/cartesian/axis_defaults.js"(pe,le){var w=_t(),R=Mi(),O=ii(),z=Tc(),l=_g(),u=Hg(),c=n_(),p=rb(),f=A1(),v=Xw(),h=t2(),m=Jy(),_=_E(),x=Wy(),A=pf().WEEKDAY_PATTERN,E=pf().HOUR_PATTERN;le.exports=function(N,F,k,P,T){var y=P.letter,S=P.font||{},M=P.splomStash||{},W=k("visible",!P.visibleDflt),$=F._template||{},Z=F.type||$.type||"-",K;if(Z==="date"){var Q=R.getComponentMethod("calendars","handleDefaults");Q(N,F,"calendar",P.calendar),P.noTicklabelmode||(K=k("ticklabelmode"))}!P.noTicklabelindex&&(Z==="date"||Z==="linear")&&k("ticklabelindex");var J="";(!P.noTicklabelposition||Z==="multicategory")&&(J=O.coerce(N,F,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:K==="period"?["outside","inside"]:y==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),P.noTicklabeloverflow||k("ticklabeloverflow",J.indexOf("inside")!==-1?"hide past domain":Z==="category"||Z==="multicategory"?"allow":"hide past div"),x(F,T),_(N,F,k,P),h(N,F,k,P),P.noHover||(Z!=="category"&&k("hoverformat"),P.noUnifiedhovertitle||k("unifiedhovertitle.text"));var G=k("color"),ee=G!==u.color.dflt?G:S.color,re=M.label||T._dfltTitle[y];if(v(N,F,k,Z,P),!W)return F;k("title.text",re),O.coerceFont(k,"title.font",S,{overrideDflt:{size:O.bigFont(S.size),color:ee}}),c(N,F,k,Z);var fe=P.hasMinor;if(fe&&(z.newContainer(F,"minor"),c(N,F,k,Z,{isMinor:!0})),f(N,F,k,Z,P),p(N,F,k,P),fe){var we=P.isMinor;P.isMinor=!0,p(N,F,k,P),P.isMinor=we}m(N,F,k,{dfltColor:G,bgColor:P.bgColor,showGrid:P.showGrid,hasMinor:fe,attributes:u}),fe&&!F.minor.ticks&&!F.minor.showgrid&&delete F.minor,(F.showline||F.ticks)&&k("mirror");var Oe=Z==="multicategory";if(!P.noTickson&&(Z==="category"||Oe)&&(F.ticks||F.showgrid)&&(Oe?(k("tickson","boundaries"),delete F.ticklabelposition):k("tickson")),Oe){var ke=k("showdividers");ke&&(k("dividercolor"),k("dividerwidth"))}if(Z==="date")if(l(N,F,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:D}),!F.rangebreaks.length)delete F.rangebreaks;else{for(var Le=0;Le<F.rangebreaks.length;Le++)if(F.rangebreaks[Le].pattern===A){F._hasDayOfWeekBreaks=!0;break}if(x(F,T),T._has("scattergl")||T._has("splom"))for(var oe=0;oe<P.data.length;oe++){var be=P.data[oe];(be.type==="scattergl"||be.type==="splom")&&(be.visible=!1,O.warn(be.type+" traces do not work on axes with rangebreaks. Setting trace "+be.index+" to `visible: false`."))}}return F};function D(I,N,F){function k(K,Q){return O.coerce(I,N,u.rangebreaks,K,Q)}var P=k("enabled");if(P){var T=k("bounds");if(T&&T.length>=2){var y="",S,M;if(T.length===2){for(S=0;S<2;S++)if(M=C(T[S]),M){y=A;break}}var W=k("pattern",y);if(W===A)for(S=0;S<2;S++)M=C(T[S]),M&&(N.bounds[S]=T[S]=M-1);if(W)for(S=0;S<2;S++)switch(M=T[S],W){case A:if(!w(M)){N.enabled=!1;return}if(M=+M,M!==Math.floor(M)||M<0||M>=7){N.enabled=!1;return}N.bounds[S]=T[S]=M;break;case E:if(!w(M)){N.enabled=!1;return}if(M=+M,M<0||M>24){N.enabled=!1;return}N.bounds[S]=T[S]=M;break}if(F.autorange===!1){var $=F.range;if($[0]<$[1]){if(T[0]<$[0]&&T[1]>$[1]){N.enabled=!1;return}}else if(T[0]>$[0]&&T[1]<$[1]){N.enabled=!1;return}}}else{var Z=k("values");if(Z&&Z.length)k("dvalue");else{N.enabled=!1;return}}}}var g={sun:1,mon:2,tue:3,wed:4,thu:5,fri:6,sat:7};function C(I){if(typeof I=="string")return g[I.substr(0,3).toLowerCase()]}}}),MA=U({"src/plots/cartesian/position_defaults.js"(pe,le){var w=_t(),R=ii();le.exports=function(z,l,u,c){var p=c.counterAxes||[],f=c.overlayableAxes||[],v=c.letter,h=c.grid,m=c.overlayingDomain,_,x,A,E,D,g;h&&(x=h._domains[v][h._axisMap[l._id]],_=h._anchors[l._id],x&&(A=h[v+"side"].split(" ")[0],E=h.domain[v][A==="right"||A==="top"?1:0])),x=x||[0,1],_=_||(w(z.position)?"free":p[0]||"free"),A=A||(v==="x"?"bottom":"left"),E=E||0,D=0,g=!1;var C=R.coerce(z,l,{anchor:{valType:"enumerated",values:["free"].concat(p),dflt:_}},"anchor"),I=R.coerce(z,l,{side:{valType:"enumerated",values:v==="x"?["bottom","top"]:["left","right"],dflt:A}},"side");if(C==="free"){if(v==="y"){var N=u("autoshift");N&&(E=I==="left"?m[0]:m[1],g=l.automargin?l.automargin:!0,D=I==="left"?-3:3),u("shift",D)}u("position",E)}u("automargin",g);var F=!1;if(f.length&&(F=R.coerce(z,l,{overlaying:{valType:"enumerated",values:[!1].concat(f),dflt:!1}},"overlaying")),!F){var k=u("domain",x);k[0]>k[1]-1/4096&&(l.domain=x),R.noneOrAll(z.domain,l.domain,x),l.tickmode==="sync"&&(l.tickmode="auto")}return u("layer"),l}}}),c_=U({"src/plots/cartesian/layout_defaults.js"(pe,le){var w=ii(),R=Lr(),O=v0().isUnifiedHover,z=C1(),l=Tc(),u=ts(),c=Hg(),p=B0(),f=CA(),v=lT(),h=MA(),m=Tf(),_=m.id2name,x=m.name2id,A=pf().AX_ID_PATTERN,E=Mi(),D=E.traceIs,g=E.getComponentMethod;function C(I,N,F){Array.isArray(I[N])?I[N].push(F):I[N]=[F]}le.exports=function(N,F,k){var P=F.autotypenumbers,T={},y={},S={},M={},W={},$={},Z={},K={},Q={},J={},G,ee;for(G=0;G<k.length;G++){var re=k[G];if(D(re,"cartesian")){var fe;if(re.xaxis)fe=_(re.xaxis),C(T,fe,re);else if(re.xaxes)for(ee=0;ee<re.xaxes.length;ee++)C(T,_(re.xaxes[ee]),re);var we;if(re.yaxis)we=_(re.yaxis),C(T,we,re);else if(re.yaxes)for(ee=0;ee<re.yaxes.length;ee++)C(T,_(re.yaxes[ee]),re);if(re.type==="funnel"?re.orientation==="h"?(fe&&(y[fe]=!0),we&&(Z[we]=!0)):we&&(S[we]=!0):re.type==="image"?(we&&(K[we]=!0),fe&&(K[fe]=!0)):(we&&(W[we]=!0,$[we]=!0),(!D(re,"carpet")||re.type==="carpet"&&!re._cheater)&&fe&&(M[fe]=!0)),re.type==="carpet"&&re._cheater&&fe&&(y[fe]=!0),D(re,"2dMap")&&(Q[fe]=!0,Q[we]=!0),D(re,"oriented")){var Oe=re.orientation==="h"?we:fe;J[Oe]=!0}}}var ke=F._subplots,Le=ke.xaxis,oe=ke.yaxis,be=w.simpleMap(Le,_),_e=w.simpleMap(oe,_),he=be.concat(_e),De=R.background;Le.length&&oe.length&&(De=w.coerce(N,F,u,"plot_bgcolor"));var xe=R.combine(De,F.paper_bgcolor),se,Ee,Te,Be,tt;function at(){var et=T[se]||[];tt._traceIndices=et.map(function(mt){return mt.index}),tt._annIndices=[],tt._shapeIndices=[],tt._selectionIndices=[],tt._imgIndices=[],tt._subplotsWith=[],tt._counterAxes=[],tt._name=tt._attr=se,tt._id=Ee}function gt(et,mt){return w.coerce(Be,tt,c,et,mt)}function pt(et,mt){return w.coerce2(Be,tt,c,et,mt)}function Rt(et){return et==="x"?oe:Le}function $t(et,mt){for(var Nt=et==="x"?be:_e,lr=[],br=0;br<Nt.length;br++){var Or=Nt[br];Or!==mt&&!(N[Or]||{}).overlaying&&lr.push(x(Or))}return lr}var Wt={x:Rt("x"),y:Rt("y")},Ht=Wt.x.concat(Wt.y),Ft={},st=[];function rt(){var et=Be.matches;A.test(et)&&Ht.indexOf(et)===-1&&(Ft[et]=Be.type,st=Object.keys(Ft))}var Ue=z(N,F),xt=O(Ue);for(G=0;G<he.length;G++){se=he[G],Ee=x(se),Te=se.charAt(0),w.isPlainObject(N[se])||(N[se]={}),Be=N[se],tt=l.newContainer(F,se,Te+"axis"),at();var Gt=Te==="x"&&!M[se]&&y[se]||Te==="y"&&!W[se]&&S[se],Jt=Te==="y"&&(!$[se]&&Z[se]||K[se]),Ut={hasMinor:!0,letter:Te,font:F.font,outerTicks:Q[se],showGrid:!J[se],data:T[se]||[],bgColor:xe,calendar:F.calendar,automargin:!0,visibleDflt:Gt,reverseDflt:Jt,autotypenumbersDflt:P,splomStash:((F._splomAxes||{})[Te]||{})[Ee],noAutotickangles:Te==="y"};gt("uirevision",F.uirevision),p(Be,tt,gt,Ut),f(Be,tt,gt,Ut,F);var kr=xt&&Te===Ue.charAt(0),Pr=pt("spikecolor",xt?tt.color:void 0),$r=pt("spikethickness",xt?1.5:void 0),rn=pt("spikedash",xt?"dot":void 0),kn=pt("spikemode",xt?"across":void 0),Rn=pt("spikesnap"),ci=gt("showspikes",!!kr||!!Pr||!!$r||!!rn||!!kn||!!Rn);ci||(delete tt.spikecolor,delete tt.spikethickness,delete tt.spikedash,delete tt.spikemode,delete tt.spikesnap);var In=_(Be.overlaying),Gn=[0,1];if(F[In]!==void 0){var mr=_(F[In].anchor);F[mr]!==void 0&&(Gn=F[mr].domain)}h(Be,tt,gt,{letter:Te,counterAxes:Wt[Te],overlayableAxes:$t(Te,se),grid:F.grid,overlayingDomain:Gn}),gt("title.standoff"),rt(),tt._input=Be}for(G=0;G<st.length;){Ee=st[G++],se=_(Ee),Te=se.charAt(0),w.isPlainObject(N[se])||(N[se]={}),Be=N[se],tt=l.newContainer(F,se,Te+"axis"),at();var St={letter:Te,font:F.font,outerTicks:Q[se],showGrid:!J[se],data:[],bgColor:xe,calendar:F.calendar,automargin:!0,visibleDflt:!1,reverseDflt:!1,autotypenumbersDflt:P,splomStash:((F._splomAxes||{})[Te]||{})[Ee]};gt("uirevision",F.uirevision),tt.type=Ft[Ee]||"linear",f(Be,tt,gt,St,F),h(Be,tt,gt,{letter:Te,counterAxes:Wt[Te],overlayableAxes:$t(Te,se),grid:F.grid}),gt("fixedrange"),gt("modebardisable"),rt(),tt._input=Be}var Ot=g("rangeslider","handleDefaults"),Et=g("rangeselector","handleDefaults");for(G=0;G<be.length;G++)se=be[G],Be=N[se],tt=F[se],Ot(N,F,se),tt.type==="date"&&Et(Be,tt,F,_e,tt.calendar),gt("fixedrange"),gt("modebardisable");for(G=0;G<_e.length;G++){se=_e[G],Be=N[se],tt=F[se];var je=F[_(tt.anchor)],Ye=g("rangeslider","isVisible")(je);gt("fixedrange",Ye),gt("modebardisable")}v.handleDefaults(N,F,{axIds:Ht.concat(st).sort(m.idSort),axHasImage:K})}}}),LE=U({"src/plots/cartesian/transition_axes.js"(pe,le){var w=Ze(),R=Mi(),O=ii(),z=ec(),l=Yu();le.exports=function(c,p,f,v){var h=c._fullLayout;if(p.length===0){l.redrawComponents(c);return}function m(F){var k=F.xaxis,P=F.yaxis;h._defs.select("#"+F.clipId+"> rect").call(z.setTranslate,0,0).call(z.setScale,1,1),F.plot.call(z.setTranslate,k._offset,P._offset).call(z.setScale,1,1);var T=F.plot.selectAll(".scatterlayer .trace");T.selectAll(".point").call(z.setPointGroupScale,1,1),T.selectAll(".textpoint").call(z.setTextPointsScale,1,1),T.call(z.hideOutsideRangePoints,F)}function _(F,k){var P=F.plotinfo,T=P.xaxis,y=P.yaxis,S=T._length,M=y._length,W=!!F.xr1,$=!!F.yr1,Z=[];if(W){var K=O.simpleMap(F.xr0,T.r2l),Q=O.simpleMap(F.xr1,T.r2l),J=K[1]-K[0],G=Q[1]-Q[0];Z[0]=(K[0]*(1-k)+k*Q[0]-K[0])/(K[1]-K[0])*S,Z[2]=S*(1-k+k*G/J),T.range[0]=T.l2r(K[0]*(1-k)+k*Q[0]),T.range[1]=T.l2r(K[1]*(1-k)+k*Q[1])}else Z[0]=0,Z[2]=S;if($){var ee=O.simpleMap(F.yr0,y.r2l),re=O.simpleMap(F.yr1,y.r2l),fe=ee[1]-ee[0],we=re[1]-re[0];Z[1]=(ee[1]*(1-k)+k*re[1]-ee[1])/(ee[0]-ee[1])*M,Z[3]=M*(1-k+k*we/fe),y.range[0]=T.l2r(ee[0]*(1-k)+k*re[0]),y.range[1]=y.l2r(ee[1]*(1-k)+k*re[1])}else Z[1]=0,Z[3]=M;l.drawOne(c,T,{skipTitle:!0}),l.drawOne(c,y,{skipTitle:!0}),l.redrawComponents(c,[T._id,y._id]);var Oe=W?S/Z[2]:1,ke=$?M/Z[3]:1,Le=W?Z[0]:0,oe=$?Z[1]:0,be=W?Z[0]/Z[2]*S:0,_e=$?Z[1]/Z[3]*M:0,he=T._offset-be,De=y._offset-_e;P.clipRect.call(z.setTranslate,Le,oe).call(z.setScale,1/Oe,1/ke),P.plot.call(z.setTranslate,he,De).call(z.setScale,Oe,ke),z.setPointGroupScale(P.zoomScalePts,1/Oe,1/ke),z.setTextPointsScale(P.zoomScaleTxt,1/Oe,1/ke)}var x;v&&(x=v());function A(){for(var F={},k=0;k<p.length;k++){var P=p[k],T=P.plotinfo.xaxis,y=P.plotinfo.yaxis;P.xr1&&(F[T._name+".range"]=P.xr1.slice()),P.yr1&&(F[y._name+".range"]=P.yr1.slice())}return x&&x(),R.call("relayout",c,F).then(function(){for(var S=0;S<p.length;S++)m(p[S].plotinfo)})}function E(){for(var F={},k=0;k<p.length;k++){var P=p[k],T=P.plotinfo.xaxis,y=P.plotinfo.yaxis;P.xr0&&(F[T._name+".range"]=P.xr0.slice()),P.yr0&&(F[y._name+".range"]=P.yr0.slice())}return R.call("relayout",c,F).then(function(){for(var S=0;S<p.length;S++)m(p[S].plotinfo)})}var D,g,C,I=w.ease(f.easing);c._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(C),C=null,E()});function N(){g=Date.now();for(var F=Math.min(1,(g-D)/f.duration),k=I(F),P=0;P<p.length;P++)_(p[P],k);g-D>f.duration?(A(),C=window.cancelAnimationFrame(N)):C=window.requestAnimationFrame(N)}return D=Date.now(),C=window.requestAnimationFrame(N),Promise.resolve()}}}),Rf=U({"src/plots/cartesian/index.js"(pe){var le=Ze(),w=Mi(),R=ii(),O=tp(),z=ec(),l=Om().getModuleCalcData,u=Tf(),c=pf(),p=E1(),f=R.ensureSingle;function v(D,g,C){return R.ensureSingle(D,g,C,function(I){I.datum(C)})}var h=c.zindexSeparator;pe.name="cartesian",pe.attr=["xaxis","yaxis"],pe.idRoot=["x","y"],pe.idRegex=c.idRegex,pe.attrRegex=c.attrRegex,pe.attributes=Ky(),pe.layoutAttributes=Hg(),pe.supplyLayoutDefaults=c_(),pe.transitionAxes=LE(),pe.finalizeSubplots=function(D,g){var C=g._subplots,I=C.xaxis,N=C.yaxis,F=C.cartesian,k=F,P={},T={},y,S,M;for(y=0;y<k.length;y++){var W=k[y].split("y");P[W[0]]=1,T["y"+W[1]]=1}for(y=0;y<I.length;y++)S=I[y],P[S]||(M=(D[u.id2name(S)]||{}).anchor,c.idRegex.y.test(M)||(M="y"),F.push(S+M),k.push(S+M),T[M]||(T[M]=1,R.pushUnique(N,M)));for(y=0;y<N.length;y++)M=N[y],T[M]||(S=(D[u.id2name(M)]||{}).anchor,c.idRegex.x.test(S)||(S="x"),F.push(S+M),k.push(S+M),P[S]||(P[S]=1,R.pushUnique(I,S)));if(!k.length){S="",M="";for(var $ in D)if(c.attrRegex.test($)){var Z=$.charAt(0);Z==="x"?(!S||+$.substr(5)<+S.substr(5))&&(S=$):(!M||+$.substr(5)<+M.substr(5))&&(M=$)}S=S?u.name2id(S):"x",M=M?u.name2id(M):"y",I.push(S),N.push(M),F.push(S+M)}},pe.plot=function(D,g,C,I){var N=D._fullLayout,F=N._subplots.cartesian,k=D.calcdata,P;if(!Array.isArray(g))for(g=[],P=0;P<k.length;P++)g.push(P);for(var T=N._zindices,y=0;y<T.length;y++){var S=T[y];for(P=0;P<F.length;P++){var M=F[P],W=N._plots[M];if(y>0){var $=W.id;if($.indexOf(h)!==-1)continue;$+=h+(y+1),W=R.extendFlat({},W,{id:$,plot:N._cartesianlayer.selectAll(".subplot").select("."+$)})}for(var Z=[],K,Q=0;Q<k.length;Q++){var J=k[Q],G=J[0].trace;S===(G.zorder||0)&&G.xaxis+G.yaxis===M&&((g.indexOf(G.index)!==-1||G.carpet)&&(K&&K[0].trace.xaxis+K[0].trace.yaxis===M&&["tonextx","tonexty","tonext"].indexOf(G.fill)!==-1&&Z.indexOf(K)===-1&&Z.push(K),Z.push(J)),K=J)}m(D,W,Z,C,I)}}};function m(D,g,C,I,N){for(var F=c.traceLayerClasses,k=D._fullLayout,P=k._zindices,T=k._modules,y,S,M,W=[],$=[],Z=0;Z<P.length;Z++)for(var K=P[Z],Q=0;Q<T.length;Q++){y=T[Q];var J=y.name,G=w.modules[J].categories;if(G.svg){var ee=y.layerName||J+"layer",re=ee+(Z?Number(Z)+1:""),fe=y.plot;S=l(C,fe,K),M=S[0],C=S[1],M.length&&W.push({i:F.indexOf(ee),zindex:Z,className:re,plotMethod:fe,cdModule:M}),G.zoomScale&&$.push("."+re)}}W.sort(function(ke,Le){return(ke.zindex||0)-(Le.zindex||0)||ke.i-Le.i});var we=g.plot.selectAll("g.mlayer").data(W,function(ke){return ke.className});if(we.enter().append("g").attr("class",function(ke){return ke.className}).classed("mlayer",!0).classed("rangeplot",g.isRangePlot),we.exit().remove(),we.order(),we.each(function(ke){var Le=le.select(this),oe=ke.className;ke.plotMethod(D,g,ke.cdModule,Le,I,N),c.clipOnAxisFalseQuery.indexOf("."+oe)===-1&&z.setClipUrl(Le,g.layerClipId,D)}),k._has("scattergl")&&(y=w.getModule("scattergl"),M=l(C,y)[0],y.plot(D,g,M)),!D._context.staticPlot&&(g._hasClipOnAxisFalse&&(g.clipOnAxisFalseTraces=g.plot.selectAll(c.clipOnAxisFalseQuery.join(",")).selectAll(".trace")),$.length)){var Oe=g.plot.selectAll($.join(",")).selectAll(".trace");g.zoomScalePts=Oe.selectAll("path.point"),g.zoomScaleTxt=Oe.selectAll(".textpoint")}}pe.clean=function(D,g,C,I){var N=I._plots||{},F=g._plots||{},k=I._subplots||{},P,T,y;if(I._hasOnlyLargeSploms&&!g._hasOnlyLargeSploms)for(y in N)P=N[y],P.plotgroup&&P.plotgroup.remove();var S=I._has&&I._has("gl"),M=g._has&&g._has("gl");if(S&&!M)for(y in N)P=N[y],P._scene&&P._scene.destroy();if(k.xaxis&&k.yaxis){var W=u.listIds({_fullLayout:I});for(T=0;T<W.length;T++){var $=W[T];g[u.id2name($)]||I._infolayer.selectAll(".g-"+$+"title").remove()}}var Z=I._has&&I._has("cartesian"),K=g._has&&g._has("cartesian");if(Z&&!K)A(I._cartesianlayer.selectAll(".subplot"),I),I._defs.selectAll(".axesclip").remove(),delete I._axisConstraintGroups,delete I._axisMatchGroups;else if(k.cartesian)for(T=0;T<k.cartesian.length;T++){var Q=k.cartesian[T];if(Q.indexOf(h)===-1&&!F[Q]){var J="."+Q+",."+Q+"-x,."+Q+"-y";I._cartesianlayer.selectAll(J).remove(),E(Q,I)}}},pe.drawFramework=function(D){var g=D._fullLayout,C=D.calcdata,I,N={};for(I=0;I<C.length;I++){var F=C[I][0],k=F.trace,P=k.zorder||0;N[P]||(N[P]=[]),N[P].push(F)}var T=Object.keys(N).map(Number).sort(R.sorterAsc);T.length||(T=[0]),g._zindices=T;var y=_(D),S=y.length,M=[];for(I=0;I<S;I++)M[I]=y[I].slice();for(var W=1;W<T.length;W++){var $=[];for(I=0;I<S;I++)$[I]=y[I].slice(),$[I][0]+=h+(W+1);M=M.concat($)}var Z=g._cartesianlayer.selectAll(".subplot").data(M,String);Z.enter().append("g").attr("class",function(K){return"subplot "+K[0]}),Z.order(),Z.exit().call(A,g),Z.each(function(K){var Q=K[0],J=Q.indexOf(h),G=J!==-1,ee=G?Q.slice(0,J):Q,re=g._plots[Q];re||(re=R.extendFlat({},g._plots[ee]),re&&(re.id=Q,g._plots[Q]=re,g._subplots.cartesian.push(Q))),re&&(re.plotgroup=le.select(this),x(D,re),G||(re.draglayer=f(g._draggers,"g",Q)))})},pe.rangePlot=function(D,g,C){x(D,g),m(D,g,C),O.style(D)};function _(D){var g=D._fullLayout,C=g._zindices.length,I=g._subplots.cartesian,N=I.length,F,k,P,T,y,S,M=[],W=[];for(F=0;F<N;F++){P=I[F],T=g._plots[P],y=T.xaxis,S=T.yaxis;var $=y._mainAxis,Z=S._mainAxis,K=$._id+Z._id,Q=g._plots[K];T.overlays=[],K!==P&&Q?(T.mainplot=K,T.mainplotinfo=Q,W.push(P)):(T.mainplot=void 0,T.mainplotinfo=void 0,M.push(P))}for(F=0;F<W.length;F++)P=W[F],T=g._plots[P],T.mainplotinfo.overlays.push(T);var J=M.concat(W),G=[];for(F=0;F<N;F++){P=J[F],T=g._plots[P],y=T.xaxis,S=T.yaxis;for(var ee=[],re=1;re<=C;re++){var fe="";for(re>1&&(fe+=h+re),ee.push(P+fe),k=0;k<T.overlays.length;k++)ee.push(T.overlays[k].id+fe)}ee=ee.concat([y.layer,S.layer,y.overlaying||"",S.overlaying||""]),G.push(ee)}return G}function x(D,g){var C=D._fullLayout,I=g.plotgroup,N=g.id,F=N.indexOf(h),k=F!==-1,P=c.layerValue2layerClass[g.xaxis.layer],T=c.layerValue2layerClass[g.yaxis.layer],y=C._hasOnlyLargeSploms,S=C._zindices.length>1,M=g.mainplotinfo;if(!g.mainplot||S)if(y)g.xlines=f(I,"path","xlines-above"),g.ylines=f(I,"path","ylines-above"),g.xaxislayer=f(I,"g","xaxislayer-above"),g.yaxislayer=f(I,"g","yaxislayer-above");else{if(!k){var W=f(I,"g","layer-subplot");g.shapelayer=f(W,"g","shapelayer"),g.imagelayer=f(W,"g","imagelayer"),M&&S?(g.minorGridlayer=M.minorGridlayer,g.gridlayer=M.gridlayer,g.zerolinelayer=M.zerolinelayer):(g.minorGridlayer=f(I,"g","minor-gridlayer"),g.gridlayer=f(I,"g","gridlayer"),g.zerolinelayer=f(I,"g","zerolinelayer"));var $=f(I,"g","layer-between");g.shapelayerBetween=f($,"g","shapelayer"),g.imagelayerBetween=f($,"g","imagelayer"),f(I,"path","xlines-below"),f(I,"path","ylines-below"),g.overlinesBelow=f(I,"g","overlines-below"),f(I,"g","xaxislayer-below"),f(I,"g","yaxislayer-below"),g.overaxesBelow=f(I,"g","overaxes-below")}g.overplot=f(I,"g","overplot"),g.plot=f(g.overplot,"g",N),M&&S?g.zerolinelayerAbove=M.zerolinelayerAbove:g.zerolinelayerAbove=f(I,"g","zerolinelayer-above"),k||(g.xlines=f(I,"path","xlines-above"),g.ylines=f(I,"path","ylines-above"),g.overlinesAbove=f(I,"g","overlines-above"),f(I,"g","xaxislayer-above"),f(I,"g","yaxislayer-above"),g.overaxesAbove=f(I,"g","overaxes-above"),g.xlines=I.select(".xlines-"+P),g.ylines=I.select(".ylines-"+T),g.xaxislayer=I.select(".xaxislayer-"+P),g.yaxislayer=I.select(".yaxislayer-"+T))}else{var Z=M.plotgroup,K=N+"-x",Q=N+"-y";g.minorGridlayer=M.minorGridlayer,g.gridlayer=M.gridlayer,g.zerolinelayer=M.zerolinelayer,g.zerolinelayerAbove=M.zerolinelayerAbove,f(M.overlinesBelow,"path",K),f(M.overlinesBelow,"path",Q),f(M.overaxesBelow,"g",K),f(M.overaxesBelow,"g",Q),g.plot=f(M.overplot,"g",N),f(M.overlinesAbove,"path",K),f(M.overlinesAbove,"path",Q),f(M.overaxesAbove,"g",K),f(M.overaxesAbove,"g",Q),g.xlines=Z.select(".overlines-"+P).select("."+K),g.ylines=Z.select(".overlines-"+T).select("."+Q),g.xaxislayer=Z.select(".overaxes-"+P).select("."+K),g.yaxislayer=Z.select(".overaxes-"+T).select("."+Q)}k||(y||(v(g.minorGridlayer,"g",g.xaxis._id),v(g.minorGridlayer,"g",g.yaxis._id),g.minorGridlayer.selectAll("g").map(function(J){return J[0]}).sort(u.idSort),v(g.gridlayer,"g",g.xaxis._id),v(g.gridlayer,"g",g.yaxis._id),g.gridlayer.selectAll("g").map(function(J){return J[0]}).sort(u.idSort)),g.xlines.style("fill","none").classed("crisp",!0),g.ylines.style("fill","none").classed("crisp",!0))}function A(D,g){if(D){var C={};D.each(function(T){var y=T[0],S=le.select(this);S.remove(),E(y,g),C[y]=!0});for(var I in g._plots)for(var N=g._plots[I],F=N.overlays||[],k=0;k<F.length;k++){var P=F[k];C[P.id]&&P.plot.selectAll(".trace").remove()}}}function E(D,g){g._draggers.selectAll("g."+D).remove(),g._defs.select("#clip"+g._uid+D+"plot").remove()}pe.toSVG=function(D){var g=D._fullLayout._glimages,C=le.select(D).selectAll(".svg-container"),I=C.filter(function(F,k){return k===C.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function N(){var F=this,k=F.toDataURL("image/png"),P=g.append("svg:image");P.attr({xmlns:p.svg,"xlink:href":k,preserveAspectRatio:"none",x:0,y:0,width:F.style.width,height:F.style.height})}I.each(N)},pe.updateFx=Z_().updateFx}}),K_=U({"src/traces/scatter/index.js"(pe,le){var w=Qd();le.exports={hasLines:w.hasLines,hasMarkers:w.hasMarkers,hasText:w.hasText,isBubble:w.isBubble,attributes:Kc(),layoutAttributes:eg(),supplyDefaults:DE(),crossTraceDefaults:e2(),supplyLayoutDefaults:EA(),calc:my().calc,crossTraceCalc:em(),arraysToCalcdata:zm(),plot:Ob(),colorbar:qg(),formatLabels:AA(),style:z0().style,styleOnSelect:z0().styleOnSelect,hoverPoints:sv(),selectPoints:qd(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:Rf(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}}}),dT=U({"src/components/annotations/draw_arrow_head.js"(pe,le){var w=Ze(),R=Lr(),O=Yo(),z=ii(),l=z.strScale,u=z.strRotate,c=z.strTranslate;le.exports=function(f,v,h){var m=f.node(),_=O[h.arrowhead||0],x=O[h.startarrowhead||0],A=(h.arrowwidth||1)*(h.arrowsize||1),E=(h.arrowwidth||1)*(h.startarrowsize||1),D=v.indexOf("start")>=0,g=v.indexOf("end")>=0,C=_.backoff*A+h.standoff,I=x.backoff*E+h.startstandoff,N,F,k,P;if(m.nodeName==="line"){N={x:+f.attr("x1"),y:+f.attr("y1")},F={x:+f.attr("x2"),y:+f.attr("y2")};var T=N.x-F.x,y=N.y-F.y;if(k=Math.atan2(y,T),P=k+Math.PI,C&&I&&C+I>Math.sqrt(T*T+y*y)){fe();return}if(C){if(C*C>T*T+y*y){fe();return}var S=C*Math.cos(k),M=C*Math.sin(k);F.x+=S,F.y+=M,f.attr({x2:F.x,y2:F.y})}if(I){if(I*I>T*T+y*y){fe();return}var W=I*Math.cos(k),$=I*Math.sin(k);N.x-=W,N.y-=$,f.attr({x1:N.x,y1:N.y})}}else if(m.nodeName==="path"){var Z=m.getTotalLength(),K="";if(Z<C+I){fe();return}var Q=m.getPointAtLength(0),J=m.getPointAtLength(.1);k=Math.atan2(Q.y-J.y,Q.x-J.x),N=m.getPointAtLength(Math.min(I,Z)),K="0px,"+I+"px,";var G=m.getPointAtLength(Z),ee=m.getPointAtLength(Z-.1);P=Math.atan2(G.y-ee.y,G.x-ee.x),F=m.getPointAtLength(Math.max(0,Z-C));var re=K?I+C:C;K+=Z-re+"px,"+Z+"px",f.style("stroke-dasharray",K)}function fe(){f.style("stroke-dasharray","0px,100px")}function we(Oe,ke,Le,oe){Oe.path&&(Oe.noRotate&&(Le=0),w.select(m.parentNode).append("path").attr({class:f.attr("class"),d:Oe.path,transform:c(ke.x,ke.y)+u(Le*180/Math.PI)+l(oe)}).style({fill:R.rgb(h.arrowcolor),"stroke-width":0}))}D&&we(x,N,k,E),g&&we(_,F,P,A)}}}),f_=U({"src/components/annotations/draw.js"(pe,le){var w=Ze(),R=Mi(),O=tp(),z=ii(),l=z.strTranslate,u=Yu(),c=Lr(),p=ec(),f=Dp(),v=ah(),h=i_(),m=Vp(),_=Tc().arrayEditor,x=dT();le.exports={draw:A,drawOne:E,drawRaw:g};function A(C){var I=C._fullLayout;I._infolayer.selectAll(".annotation").remove();for(var N=0;N<I.annotations.length;N++)I.annotations[N].visible&&E(C,N);return O.previousPromises(C)}function E(C,I){var N=C._fullLayout,F=N.annotations[I]||{},k=u.getFromId(C,F.xref),P=u.getFromId(C,F.yref);k&&k.setScale(),P&&P.setScale(),g(C,F,I,!1,k,P)}function D(C,I,N,F,k){var P=k[N],T=k[N+"ref"],y=N.indexOf("y")!==-1,S=u.getRefType(T)==="domain",M=y?F.h:F.w;return C?S?P+(y?-I:I)/C._length:C.p2r(C.r2p(P)+I):P+(y?-I:I)/M}function g(C,I,N,F,k,P){var T=C._fullLayout,y=C._fullLayout._size,S=C._context.edits,M,W;F?(M="annotation-"+F,W=F+".annotations"):(M="annotation",W="annotations");var $=_(C.layout,W,I),Z=$.modifyBase,K=$.modifyItem,Q=$.getUpdateObj;T._infolayer.selectAll("."+M+'[data-index="'+N+'"]').remove();var J="clip"+T._uid+"_ann"+N;if(!I._input||I.visible===!1){w.selectAll("#"+J).remove();return}var G={x:{},y:{}},ee=+I.textangle||0,re=T._infolayer.append("g").classed(M,!0).attr("data-index",String(N)).style("opacity",I.opacity),fe=re.append("g").classed("annotation-text-g",!0),we=S[I.showarrow?"annotationTail":"annotationPosition"],Oe=I.captureevents||S.annotationText||we;function ke(at){var gt={index:N,annotation:I._input,fullAnnotation:I,event:at};return F&&(gt.subplotId=F),gt}var Le=fe.append("g").style("pointer-events",Oe?"all":null).call(h,"pointer").on("click",function(){C._dragging=!1,C.emit("plotly_clickannotation",ke(w.event))});I.hovertext&&Le.on("mouseover",function(){var at=I.hoverlabel,gt=at.font,pt=this.getBoundingClientRect(),Rt=C.getBoundingClientRect();f.loneHover({x0:pt.left-Rt.left,x1:pt.right-Rt.left,y:(pt.top+pt.bottom)/2-Rt.top,text:I.hovertext,color:at.bgcolor,borderColor:at.bordercolor,fontFamily:gt.family,fontSize:gt.size,fontColor:gt.color,fontWeight:gt.weight,fontStyle:gt.style,fontVariant:gt.variant,fontShadow:gt.fontShadow,fontLineposition:gt.fontLineposition,fontTextcase:gt.fontTextcase},{container:T._hoverlayer.node(),outerContainer:T._paper.node(),gd:C})}).on("mouseout",function(){f.loneUnhover(T._hoverlayer.node())});var oe=I.borderwidth,be=I.borderpad,_e=oe+be,he=Le.append("rect").attr("class","bg").style("stroke-width",oe+"px").call(c.stroke,I.bordercolor).call(c.fill,I.bgcolor),De=I.width||I.height,xe=T._topclips.selectAll("#"+J).data(De?[0]:[]);xe.enter().append("clipPath").classed("annclip",!0).attr("id",J).append("rect"),xe.exit().remove();var se=I.font,Ee=T._meta?z.templateString(I.text,T._meta):I.text,Te=Le.append("text").classed("annotation-text",!0).text(Ee);function Be(at){return at.call(p.font,se).attr({"text-anchor":{left:"start",right:"end"}[I.align]||"middle"}),v.convertToTspans(at,C,tt),at}function tt(){var at=Te.selectAll("a");if(at.size()===1&&at.text()===Te.text()){var gt=Le.insert("a",":first-child").attr({"xlink:xlink:href":at.attr("xlink:href"),"xlink:xlink:show":at.attr("xlink:show")}).style({cursor:"pointer"});gt.node().appendChild(he.node())}var pt=Le.select(".annotation-text-math-group"),Rt=!pt.empty(),$t=p.bBox((Rt?pt:Te).node()),Wt=$t.width,Ht=$t.height,Ft=I.width||Wt,st=I.height||Ht,rt=Math.round(Ft+2*_e),Ue=Math.round(st+2*_e);function xt(Ka,Sa){return Sa==="auto"&&(Ka<1/3?Sa="left":Ka>2/3?Sa="right":Sa="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[Sa]}for(var Gt=!1,Jt=["x","y"],Ut=0;Ut<Jt.length;Ut++){var kr=Jt[Ut],Pr=I[kr+"ref"]||kr,$r=I["a"+kr+"ref"],rn={x:k,y:P}[kr],kn=(ee+(kr==="x"?0:-90))*Math.PI/180,Rn=rt*Math.cos(kn),ci=Ue*Math.sin(kn),In=Math.abs(Rn)+Math.abs(ci),Gn=I[kr+"anchor"],mr=I[kr+"shift"]*(kr==="x"?1:-1),St=G[kr],Ot,Et,je,Ye,et,mt=u.getRefType(Pr);if(rn&&mt!=="domain"){var Nt=rn.r2fraction(I[kr]);(Nt<0||Nt>1)&&($r===Pr?(Nt=rn.r2fraction(I["a"+kr]),(Nt<0||Nt>1)&&(Gt=!0)):Gt=!0),Ot=rn._offset+rn.r2p(I[kr]),Ye=.5}else{var lr=mt==="domain";kr==="x"?(je=I[kr],Ot=lr?rn._offset+rn._length*je:Ot=y.l+y.w*je):(je=1-I[kr],Ot=lr?rn._offset+rn._length*je:Ot=y.t+y.h*je),Ye=I.showarrow?.5:je}if(I.showarrow){St.head=Ot;var br=I["a"+kr];if(et=Rn*xt(.5,I.xanchor)-ci*xt(.5,I.yanchor),$r===Pr){var Or=u.getRefType($r);Or==="domain"?(kr==="y"&&(br=1-br),St.tail=rn._offset+rn._length*br):Or==="paper"?kr==="y"?(br=1-br,St.tail=y.t+y.h*br):St.tail=y.l+y.w*br:St.tail=rn._offset+rn.r2p(br),Et=et}else St.tail=Ot+br,Et=et+br;St.text=St.tail+et;var tn=T[kr==="x"?"width":"height"];if(Pr==="paper"&&(St.head=z.constrain(St.head,1,tn-1)),$r==="pixel"){var Jr=-Math.max(St.tail-3,St.text),dn=Math.min(St.tail+3,St.text)-tn;Jr>0?(St.tail+=Jr,St.text+=Jr):dn>0&&(St.tail-=dn,St.text-=dn)}St.tail+=mr,St.head+=mr}else et=In*xt(Ye,Gn),Et=et,St.text=Ot+et;St.text+=mr,et+=mr,Et+=mr,I["_"+kr+"padplus"]=In/2+Et,I["_"+kr+"padminus"]=In/2-Et,I["_"+kr+"size"]=In,I["_"+kr+"shift"]=et}if(Gt){Le.remove();return}var on=0,Nn=0;if(I.align!=="left"&&(on=(Ft-Wt)*(I.align==="center"?.5:1)),I.valign!=="top"&&(Nn=(st-Ht)*(I.valign==="middle"?.5:1)),Rt)pt.select("svg").attr({x:_e+on-1,y:_e+Nn}).call(p.setClipUrl,De?J:null,C);else{var Wi=_e+Nn-$t.top,Oa=_e+on-$t.left;Te.call(v.positionText,Oa,Wi).call(p.setClipUrl,De?J:null,C)}xe.select("rect").call(p.setRect,_e,_e,Ft,st),he.call(p.setRect,oe/2,oe/2,rt-oe,Ue-oe),Le.call(p.setTranslate,Math.round(G.x.text-rt/2),Math.round(G.y.text-Ue/2)),fe.attr({transform:"rotate("+ee+","+G.x.text+","+G.y.text+")"});var Da=function(Ka,Sa){re.selectAll(".annotation-arrow-g").remove();var no=G.x.head,Fo=G.y.head,an=G.x.tail+Ka,Hr=G.y.tail+Sa,nn=G.x.text+Ka,Kr=G.y.text+Sa,$n=z.rotationXYMatrix(ee,nn,Kr),Ai=z.apply2DTransform($n),aa=z.apply2DTransform2($n),Ci=+he.attr("width"),Ta=+he.attr("height"),Na=nn-.5*Ci,ro=Na+Ci,oo=Kr-.5*Ta,xo=oo+Ta,vr=[[Na,oo,Na,xo],[Na,xo,ro,xo],[ro,xo,ro,oo],[ro,oo,Na,oo]].map(aa);if(!vr.reduce(function(wr,gn){return wr^!!z.segmentsIntersect(no,Fo,no+1e6,Fo+1e6,gn[0],gn[1],gn[2],gn[3])},!1)){vr.forEach(function(wr){var gn=z.segmentsIntersect(an,Hr,no,Fo,wr[0],wr[1],wr[2],wr[3]);gn&&(an=gn.x,Hr=gn.y)});var er=I.arrowwidth,si=I.arrowcolor,ei=I.arrowside,Kn=re.append("g").style({opacity:c.opacity(si)}).classed("annotation-arrow-g",!0),qn=Kn.append("path").attr("d","M"+an+","+Hr+"L"+no+","+Fo).style("stroke-width",er+"px").call(c.stroke,c.rgb(si));if(x(qn,ei,I),S.annotationPosition&&qn.node().parentNode&&!F){var pi=no,_i=Fo;if(I.standoff){var fi=Math.sqrt(Math.pow(no-an,2)+Math.pow(Fo-Hr,2));pi+=I.standoff*(an-no)/fi,_i+=I.standoff*(Hr-Fo)/fi}var Ri=Kn.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(an-pi)+","+(Hr-_i),transform:l(pi,_i)}).style("stroke-width",er+6+"px").call(c.stroke,"rgba(0,0,0,0)").call(c.fill,"rgba(0,0,0,0)"),$i,Hi;m.init({element:Ri.node(),gd:C,prepFn:function(){var wr=p.getTranslate(Le);$i=wr.x,Hi=wr.y,k&&k.autorange&&Z(k._name+".autorange",!0),P&&P.autorange&&Z(P._name+".autorange",!0)},moveFn:function(wr,gn){var Xn=Ai($i,Hi),Yi=Xn[0]+wr,ha=Xn[1]+gn;Le.call(p.setTranslate,Yi,ha),K("x",D(k,wr,"x",y,I)),K("y",D(P,gn,"y",y,I)),I.axref===I.xref&&K("ax",D(k,wr,"ax",y,I)),I.ayref===I.yref&&K("ay",D(P,gn,"ay",y,I)),Kn.attr("transform",l(wr,gn)),fe.attr({transform:"rotate("+ee+","+Yi+","+ha+")"})},doneFn:function(){R.call("_guiRelayout",C,Q());var wr=document.querySelector(".js-notes-box-panel");wr&&wr.redraw(wr.selectedObj)}})}}};if(I.showarrow&&Da(0,0),we){var Aa;m.init({element:Le.node(),gd:C,prepFn:function(){Aa=fe.attr("transform")},moveFn:function(Ka,Sa){var no="pointer";if(I.showarrow)I.axref===I.xref?K("ax",D(k,Ka,"ax",y,I)):K("ax",I.ax+Ka),I.ayref===I.yref?K("ay",D(P,Sa,"ay",y.w,I)):K("ay",I.ay+Sa),Da(Ka,Sa);else{if(F)return;var Fo,an;if(k)Fo=D(k,Ka,"x",y,I);else{var Hr=I._xsize/y.w,nn=I.x+(I._xshift-I.xshift)/y.w-Hr/2;Fo=m.align(nn+Ka/y.w,Hr,0,1,I.xanchor)}if(P)an=D(P,Sa,"y",y,I);else{var Kr=I._ysize/y.h,$n=I.y-(I._yshift+I.yshift)/y.h-Kr/2;an=m.align($n-Sa/y.h,Kr,0,1,I.yanchor)}K("x",Fo),K("y",an),(!k||!P)&&(no=m.getCursor(k?.5:Fo,P?.5:an,I.xanchor,I.yanchor))}fe.attr({transform:l(Ka,Sa)+Aa}),h(Le,no)},clickFn:function(Ka,Sa){I.captureevents&&C.emit("plotly_clickannotation",ke(Sa))},doneFn:function(){h(Le),R.call("_guiRelayout",C,Q());var Ka=document.querySelector(".js-notes-box-panel");Ka&&Ka.redraw(Ka.selectedObj)}})}}S.annotationText?Te.call(v.makeEditable,{delegate:Le,gd:C}).call(Be).on("edit",function(at){I.text=at,this.call(Be),K("text",at),k&&k.autorange&&Z(k._name+".autorange",!0),P&&P.autorange&&Z(P._name+".autorange",!0),R.call("_guiRelayout",C,Q())}):Te.call(Be)}}}),Vi=U({"src/components/annotations/click.js"(pe,le){var w=ii(),R=Mi(),O=Tc().arrayEditor;le.exports={hasClickToShow:z,onClick:l};function z(p,f){var v=u(p,f);return v.on.length>0||v.explicitOff.length>0}function l(p,f){var v=u(p,f),h=v.on,m=v.off.concat(v.explicitOff),_={},x=p._fullLayout.annotations,A,E;if(h.length||m.length){for(A=0;A<h.length;A++)E=O(p.layout,"annotations",x[h[A]]),E.modifyItem("visible",!0),w.extendFlat(_,E.getUpdateObj());for(A=0;A<m.length;A++)E=O(p.layout,"annotations",x[m[A]]),E.modifyItem("visible",!1),w.extendFlat(_,E.getUpdateObj());return R.call("update",p,{},_)}}function u(p,f){var v=p._fullLayout.annotations,h=[],m=[],_=[],x=(f||[]).length,A,E,D,g,C,I,N,F;for(A=0;A<v.length;A++)if(D=v[A],g=D.clicktoshow,g){for(E=0;E<x;E++)if(C=f[E],I=C.xaxis,N=C.yaxis,I._id===D.xref&&N._id===D.yref&&I.d2r(C.x)===c(D._xclick,I)&&N.d2r(C.y)===c(D._yclick,N)){D.visible?g==="onout"?F=m:F=_:F=h,F.push(A);break}E===x&&D.visible&&g==="onout"&&m.push(A)}return{on:h,off:m,explicitOff:_}}function c(p,f){return f.type==="log"?f.l2r(p):f.d2r(p)}}}),ab=U({"src/components/annotations/common_defaults.js"(pe,le){var w=ii(),R=Lr();le.exports=function(z,l,u,c){c("opacity");var p=c("bgcolor"),f=c("bordercolor"),v=R.opacity(f);c("borderpad");var h=c("borderwidth"),m=c("showarrow");c("text",m?" ":u._dfltTitle.annotation),c("textangle"),w.coerceFont(c,"font",u.font),c("width"),c("align");var _=c("height");if(_&&c("valign"),m){var x=c("arrowside"),A,E;x.indexOf("end")!==-1&&(A=c("arrowhead"),E=c("arrowsize")),x.indexOf("start")!==-1&&(c("startarrowhead",A),c("startarrowsize",E)),c("arrowcolor",v?l.bordercolor:R.defaultLine),c("arrowwidth",(v&&h||1)*2),c("standoff"),c("startstandoff")}var D=c("hovertext"),g=u.hoverlabel||{};if(D){var C=c("hoverlabel.bgcolor",g.bgcolor||(R.opacity(p)?R.rgb(p):R.defaultLine)),I=c("hoverlabel.bordercolor",g.bordercolor||R.contrast(C)),N=w.extendFlat({},g.font);N.color||(N.color=I),w.coerceFont(c,"hoverlabel.font",N)}c("captureevents",!!D)}}}),wx=U({"src/components/annotations/defaults.js"(pe,le){var w=ii(),R=Yu(),O=_g(),z=ab(),l=Fs();le.exports=function(p,f){O(p,f,{name:"annotations",handleItemDefaults:u})};function u(c,p,f){function v(y,S){return w.coerce(c,p,l,y,S)}var h=v("visible"),m=v("clicktoshow");if(h||m){z(c,p,f,v);for(var _=p.showarrow,x=["x","y"],A=[-10,-30],E={_fullLayout:f},D=0;D<2;D++){var g=x[D],C=R.coerceRef(c,p,E,g,"","paper");if(C!=="paper"){var I=R.getFromId(E,C);I._annIndices.push(p._index)}if(R.coercePosition(p,E,v,C,g,.5),_){var N="a"+g,F=R.coerceRef(c,p,E,N,"pixel",["pixel","paper"]);F!=="pixel"&&F!==C&&(F=p[N]="pixel");var k=F==="pixel"?A[D]:.4;R.coercePosition(p,E,v,F,N,k)}v(g+"anchor"),v(g+"shift")}if(w.noneOrAll(c,p,["x","y"]),_&&w.noneOrAll(c,p,["ax","ay"]),m){var P=v("xclick"),T=v("yclick");p._xclick=P===void 0?p.x:R.cleanPosition(P,E,p.xref),p._yclick=T===void 0?p.y:R.cleanPosition(T,E,p.yref)}}}}}),ob=U({"src/components/annotations/calc_autorange.js"(pe,le){var w=ii(),R=Yu(),O=f_().draw;le.exports=function(c){var p=c._fullLayout,f=w.filterVisible(p.annotations);if(f.length&&c._fullData.length)return w.syncOrAsync([O,z],c)};function z(u){var c=u._fullLayout;w.filterVisible(c.annotations).forEach(function(p){var f=R.getFromId(u,p.xref),v=R.getFromId(u,p.yref),h=R.getRefType(p.xref),m=R.getRefType(p.yref);p._extremes={},h==="range"&&l(p,f),m==="range"&&l(p,v)})}function l(u,c){var p=c._id,f=p.charAt(0),v=u[f],h=u["a"+f],m=u[f+"ref"],_=u["a"+f+"ref"],x=u["_"+f+"padplus"],A=u["_"+f+"padminus"],E={x:1,y:-1}[f]*u[f+"shift"],D=3*u.arrowsize*u.arrowwidth||0,g=D+E,C=D-E,I=3*u.startarrowsize*u.arrowwidth||0,N=I+E,F=I-E,k;if(_===m){var P=R.findExtremes(c,[c.r2c(v)],{ppadplus:g,ppadminus:C}),T=R.findExtremes(c,[c.r2c(h)],{ppadplus:Math.max(x,N),ppadminus:Math.max(A,F)});k={min:[P.min[0],T.min[0]],max:[P.max[0],T.max[0]]}}else N=h?N+h:N,F=h?F-h:F,k=R.findExtremes(c,[c.r2c(v)],{ppadplus:Math.max(x,g,N),ppadminus:Math.max(A,C,F)});u._extremes[p]=k}}}),eh=U({"src/components/annotations/convert_coords.js"(pe,le){var w=_t(),R=Vt();le.exports=function(z,l,u,c){l=l||{};var p=u==="log"&&l.type==="linear",f=u==="linear"&&l.type==="log";if(!(p||f))return;var v=z._fullLayout.annotations,h=l._id.charAt(0),m,_;function x(E){var D=m[E],g=null;p?g=R(D,l.range):g=Math.pow(10,D),w(g)||(g=null),c(_+E,g)}for(var A=0;A<v.length;A++)m=v[A],_="annotations["+A+"].",m[h+"ref"]===l._id&&x(h),m["a"+h+"ref"]===l._id&&x("a"+h)}}}),Sx=U({"src/components/annotations/index.js"(pe,le){var w=f_(),R=Vi();le.exports={moduleType:"component",name:"annotations",layoutAttributes:Fs(),supplyLayoutDefaults:wx(),includeBasePlot:kE()("annotations"),calcAutorange:ob(),draw:w.draw,drawOne:w.drawOne,drawRaw:w.drawRaw,hasClickToShow:R.hasClickToShow,onClick:R.onClick,convertCoords:eh()}}}),hT=U({"src/components/annotations3d/attributes.js"(pe,le){var w=Fs(),R=zl().overrideAll,O=Tc().templatedArray;le.exports=R(O("annotation",{visible:w.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:w.xanchor,xshift:w.xshift,yanchor:w.yanchor,yshift:w.yshift,text:w.text,textangle:w.textangle,font:w.font,width:w.width,height:w.height,opacity:w.opacity,align:w.align,valign:w.valign,bgcolor:w.bgcolor,bordercolor:w.bordercolor,borderpad:w.borderpad,borderwidth:w.borderwidth,showarrow:w.showarrow,arrowcolor:w.arrowcolor,arrowhead:w.arrowhead,startarrowhead:w.startarrowhead,arrowside:w.arrowside,arrowsize:w.arrowsize,startarrowsize:w.startarrowsize,arrowwidth:w.arrowwidth,standoff:w.standoff,startstandoff:w.startstandoff,hovertext:w.hovertext,hoverlabel:w.hoverlabel,captureevents:w.captureevents}),"calc","from-root")}}),J_=U({"src/components/annotations3d/defaults.js"(pe,le){var w=ii(),R=Yu(),O=_g(),z=ab(),l=hT();le.exports=function(p,f,v){O(p,f,{name:"annotations",handleItemDefaults:u,fullLayout:v.fullLayout})};function u(c,p,f,v){function h(x,A){return w.coerce(c,p,l,x,A)}function m(x){var A=x+"axis",E={_fullLayout:{}};return E._fullLayout[A]=f[A],R.coercePosition(p,E,h,x,x,.5)}var _=h("visible");_&&(z(c,p,v.fullLayout,h),m("x"),m("y"),m("z"),w.noneOrAll(c,p,["x","y","z"]),p.xref="x",p.yref="y",p.zref="z",h("xanchor"),h("yanchor"),h("xshift"),h("yshift"),p.showarrow&&(p.axref="pixel",p.ayref="pixel",h("ax",-10),h("ay",-30),w.noneOrAll(c,p,["ax","ay"])))}}}),wv=U({"src/components/annotations3d/convert.js"(pe,le){var w=ii(),R=Yu();le.exports=function(l){for(var u=l.fullSceneLayout,c=u.annotations,p=0;p<c.length;p++)O(c[p],l);l.fullLayout._infolayer.selectAll(".annotation-"+l.id).remove()};function O(z,l){var u=l.fullSceneLayout,c=u.domain,p=l.fullLayout._size,f={pdata:null,type:"linear",autorange:!1,range:[-1/0,1/0]};z._xa={},w.extendFlat(z._xa,f),R.setConvert(z._xa),z._xa._offset=p.l+c.x[0]*p.w,z._xa.l2p=function(){return .5*(1+z._pdata[0]/z._pdata[3])*p.w*(c.x[1]-c.x[0])},z._ya={},w.extendFlat(z._ya,f),R.setConvert(z._ya),z._ya._offset=p.t+(1-c.y[1])*p.h,z._ya.l2p=function(){return .5*(1-z._pdata[1]/z._pdata[3])*p.h*(c.y[1]-c.y[0])}}}}),OE=U({"src/plots/gl3d/project.js"(pe,le){function w(O,z){var l=[0,0,0,0],u,c;for(u=0;u<4;++u)for(c=0;c<4;++c)l[c]+=O[4*u+c]*z[u];return l}function R(O,z){var l=w(O.projection,w(O.view,w(O.model,[z[0],z[1],z[2],1])));return l}le.exports=R}}),mM=U({"src/components/annotations3d/draw.js"(pe,le){var w=f_().drawRaw,R=OE(),O=["x","y","z"];le.exports=function(l){for(var u=l.fullSceneLayout,c=l.dataScale,p=u.annotations,f=0;f<p.length;f++){for(var v=p[f],h=!1,m=0;m<3;m++){var _=O[m],x=v[_],A=u[_+"axis"],E=A.r2fraction(x);if(E<0||E>1){h=!0;break}}h?l.fullLayout._infolayer.select(".annotation-"+l.id+'[data-index="'+f+'"]').remove():(v._pdata=R(l.glplot.cameraParams,[u.xaxis.r2l(v.x)*c[0],u.yaxis.r2l(v.y)*c[1],u.zaxis.r2l(v.z)*c[2]]),w(l.graphDiv,v,f,l.id,v._xa,v._ya))}}}}),nR=U({"src/components/annotations3d/index.js"(pe,le){var w=Mi(),R=ii();le.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:hT()}}},layoutAttributes:hT(),handleDefaults:J_(),includeBasePlot:O,convert:wv(),draw:mM()};function O(z,l){var u=w.subplotsRegistry.gl3d;if(u)for(var c=u.attrRegex,p=Object.keys(z),f=0;f<p.length;f++){var v=p[f];c.test(v)&&(z[v].annotations||[]).length&&(R.pushUnique(l._basePlotModules,u),R.pushUnique(l._subplots.gl3d,v))}}}}),Xk=U({"src/components/shapes/attributes.js"(pe,le){var w=Fs(),R=Ir(),O=Kc().line,z=jl().dash,l=Ar().extendFlat,u=Tc().templatedArray;al();var c=Jn(),p=Js().shapeTexttemplateAttrs,f=Vl();le.exports=u("shape",{visible:l({},c.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:l({},c.legend,{editType:"calc+arraydraw"}),legendgroup:l({},c.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:l({},c.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:R({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:l({},c.legendrank,{editType:"calc+arraydraw"}),legendwidth:l({},c.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:l({},w.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:l({},w.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:l({},O.color,{editType:"arraydraw"}),width:l({},O.width,{editType:"calc+arraydraw"}),dash:l({},z,{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:p({},{keys:Object.keys(f)}),font:R({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"})}}),Zk=U({"src/components/shapes/defaults.js"(pe,le){var w=ii(),R=Yu(),O=_g(),z=Xk(),l=Nm();le.exports=function(f,v){O(f,v,{name:"shapes",handleItemDefaults:c})};function u(p,f){return p?"bottom":f.indexOf("top")!==-1?"top":f.indexOf("bottom")!==-1?"bottom":"middle"}function c(p,f,v){function h(oe,be){return w.coerce(p,f,z,oe,be)}f._isShape=!0;var m=h("visible");if(m){var _=h("showlegend");_&&(h("legend"),h("legendwidth"),h("legendgroup"),h("legendgrouptitle.text"),w.coerceFont(h,"legendgrouptitle.font"),h("legendrank"));var x=h("path"),A=x?"path":"rect",E=h("type",A),D=E!=="path";D&&delete f.path,h("editable"),h("layer"),h("opacity"),h("fillcolor"),h("fillrule");var g=h("line.width");g&&(h("line.color"),h("line.dash"));for(var C=h("xsizemode"),I=h("ysizemode"),N=["x","y"],F=0;F<2;F++){var k=N[F],P=k+"anchor",T=k==="x"?C:I,y={_fullLayout:v},S,M,W,$=R.coerceRef(p,f,y,k,void 0,"paper"),Z=R.getRefType($);if(Z==="range"?(S=R.getFromId(y,$),S._shapeIndices.push(f._index),W=l.rangeToShapePosition(S),M=l.shapePositionToRange(S),(S.type==="category"||S.type==="multicategory")&&(h(k+"0shift"),h(k+"1shift"))):M=W=w.identity,D){var K=.25,Q=.75,J=k+"0",G=k+"1",ee=p[J],re=p[G];p[J]=M(p[J],!0),p[G]=M(p[G],!0),T==="pixel"?(h(J,0),h(G,10)):(R.coercePosition(f,y,h,$,J,K),R.coercePosition(f,y,h,$,G,Q)),f[J]=W(f[J]),f[G]=W(f[G]),p[J]=ee,p[G]=re}if(T==="pixel"){var fe=p[P];p[P]=M(p[P],!0),R.coercePosition(f,y,h,$,P,.25),f[P]=W(f[P]),p[P]=fe}}D&&w.noneOrAll(p,f,["x0","x1","y0","y1"]);var we=E==="line",Oe,ke;if(D&&(Oe=h("label.texttemplate")),Oe||(ke=h("label.text")),ke||Oe){h("label.textangle");var Le=h("label.textposition",we?"middle":"middle center");h("label.xanchor"),h("label.yanchor",u(we,Le)),h("label.padding"),w.coerceFont(h,"label.font",v.font)}}}}}),Sv=U({"src/components/shapes/draw_newshape/defaults.js"(pe,le){var w=Lr(),R=ii();function O(z,l){return z?"bottom":l.indexOf("top")!==-1?"top":l.indexOf("bottom")!==-1?"bottom":"middle"}le.exports=function(l,u,c){c("newshape.visible"),c("newshape.name"),c("newshape.showlegend"),c("newshape.legend"),c("newshape.legendwidth"),c("newshape.legendgroup"),c("newshape.legendgrouptitle.text"),R.coerceFont(c,"newshape.legendgrouptitle.font"),c("newshape.legendrank"),c("newshape.drawdirection"),c("newshape.layer"),c("newshape.fillcolor"),c("newshape.fillrule"),c("newshape.opacity");var p=c("newshape.line.width");if(p){var f=(l||{}).plot_bgcolor||"#FFF";c("newshape.line.color",w.contrast(f)),c("newshape.line.dash")}var v=l.dragmode==="drawline",h=c("newshape.label.text"),m=c("newshape.label.texttemplate");if(h||m){c("newshape.label.textangle");var _=c("newshape.label.textposition",v?"middle":"middle center");c("newshape.label.xanchor"),c("newshape.label.yanchor",O(v,_)),c("newshape.label.padding"),R.coerceFont(c,"newshape.label.font",u.font)}c("activeshape.fillcolor"),c("activeshape.opacity")}}}),gM=U({"src/components/shapes/calc_autorange.js"(pe,le){var w=ii(),R=Yu(),O=eS(),z=Nm();le.exports=function(v){var h=v._fullLayout,m=w.filterVisible(h.shapes);if(!(!m.length||!v._fullData.length))for(var _=0;_<m.length;_++){var x=m[_];x._extremes={};var A,E,D=R.getRefType(x.xref),g=R.getRefType(x.yref);x.xref!=="paper"&&D!=="domain"&&(A=R.getFromId(v,x.xref),E=p(A,x,O.paramIsX),E&&(x._extremes[A._id]=R.findExtremes(A,E,l(x)))),x.yref!=="paper"&&g!=="domain"&&(A=R.getFromId(v,x.yref),E=p(A,x,O.paramIsY),E&&(x._extremes[A._id]=R.findExtremes(A,E,u(x))))}};function l(f){return c(f.line.width,f.xsizemode,f.x0,f.x1,f.path,!1)}function u(f){return c(f.line.width,f.ysizemode,f.y0,f.y1,f.path,!0)}function c(f,v,h,m,_,x){var A=f/2,E=x;if(v==="pixel"){var D=_?z.extractPathCoords(_,x?O.paramIsY:O.paramIsX):[h,m],g=w.aggNums(Math.max,null,D),C=w.aggNums(Math.min,null,D),I=C<0?Math.abs(C)+A:A,N=g>0?g+A:A;return{ppad:A,ppadplus:E?I:N,ppadminus:E?N:I}}else return{ppad:A}}function p(f,v,h){var m=f._id.charAt(0)==="x"?"x":"y",_=f.type==="category"||f.type==="multicategory",x,A,E=0,D=0,g=_?f.r2c:f.d2c,C=v[m+"sizemode"]==="scaled";if(C?(x=v[m+"0"],A=v[m+"1"],_&&(E=v[m+"0shift"],D=v[m+"1shift"])):(x=v[m+"anchor"],A=v[m+"anchor"]),x!==void 0)return[g(x)+E,g(A)+D];if(v.path){var I=1/0,N=-1/0,F=v.path.match(O.segmentRE),k,P,T,y,S;for(f.type==="date"&&(g=z.decodeDate(g)),k=0;k<F.length;k++)P=F[k],T=h[P.charAt(0)].drawn,T!==void 0&&(y=F[k].substr(1).match(O.paramRE),!(!y||y.length<T)&&(S=g(y[T]),S<I&&(I=S),S>N&&(N=S)));if(N>=I)return[I,N]}}}}),NE=U({"src/components/shapes/index.js"(pe,le){var w=dM();le.exports={moduleType:"component",name:"shapes",layoutAttributes:Xk(),supplyLayoutDefaults:Zk(),supplyDrawNewShapeDefaults:Sv(),includeBasePlot:kE()("shapes"),calcAutorange:gM(),draw:w.draw,drawOne:w.drawOne}}}),pT=U({"src/components/images/attributes.js"(pe,le){var w=pf(),R=Tc().templatedArray;al(),le.exports=R("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",w.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",w.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})}}),RA=U({"src/components/images/defaults.js"(pe,le){var w=ii(),R=Yu(),O=_g(),z=pT(),l="images";le.exports=function(p,f){var v={name:l,handleItemDefaults:u};O(p,f,v)};function u(c,p,f){function v(C,I){return w.coerce(c,p,z,C,I)}var h=v("source"),m=v("visible",!!h);if(!m)return p;v("layer"),v("xanchor"),v("yanchor"),v("sizex"),v("sizey"),v("sizing"),v("opacity");for(var _={_fullLayout:f},x=["x","y"],A=0;A<2;A++){var E=x[A],D=R.coerceRef(c,p,_,E,"paper",void 0);if(D!=="paper"){var g=R.getFromId(_,D);g._imgIndices.push(p._index)}R.coercePosition(p,_,v,D,E,0)}return p}}}),Nd=U({"src/components/images/draw.js"(pe,le){var w=Ze(),R=ec(),O=Yu(),z=Tf(),l=E1();le.exports=function(c){var p=c._fullLayout,f=[],v={},h=[],m,_;for(_=0;_<p.images.length;_++){var x=p.images[_];if(x.visible)if(x.layer==="below"&&x.xref!=="paper"&&x.yref!=="paper"){m=z.ref2id(x.xref)+z.ref2id(x.yref);var A=p._plots[m];if(!A){h.push(x);continue}A.mainplot&&(m=A.mainplot.id),v[m]||(v[m]=[]),v[m].push(x)}else x.layer==="above"?f.push(x):h.push(x)}var E={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 D(y){var S=w.select(this);if(this._imgSrc!==y.source)if(S.attr("xmlns",l.svg),!c._context.staticPlot||y.source&&y.source.slice(0,5)==="data:")S.attr("xlink:href",y.source),this._imgSrc=y.source;else{var M=new Promise((function(W){var $=new Image;this.img=$,$.setAttribute("crossOrigin","anonymous"),$.onerror=Z,$.onload=function(){var K=document.createElement("canvas");K.width=this.width,K.height=this.height;var Q=K.getContext("2d",{willReadFrequently:!0});Q.drawImage(this,0,0);var J=K.toDataURL("image/png");S.attr("xlink:href",J),W()},S.on("error",Z),$.src=y.source,this._imgSrc=y.source;function Z(){S.remove(),W()}}).bind(this));c._promises.push(M)}}function g(y){var S=w.select(this),M=O.getFromId(c,y.xref),W=O.getFromId(c,y.yref),$=O.getRefType(y.xref)==="domain",Z=O.getRefType(y.yref)==="domain",K=p._size,Q,J;M!==void 0?Q=typeof y.xref=="string"&&$?M._length*y.sizex:Math.abs(M.l2p(y.sizex)-M.l2p(0)):Q=y.sizex*K.w,W!==void 0?J=typeof y.yref=="string"&&Z?W._length*y.sizey:Math.abs(W.l2p(y.sizey)-W.l2p(0)):J=y.sizey*K.h;var G=Q*E.x[y.xanchor].offset,ee=J*E.y[y.yanchor].offset,re=E.x[y.xanchor].sizing+E.y[y.yanchor].sizing,fe,we;switch(M!==void 0?fe=typeof y.xref=="string"&&$?M._length*y.x+M._offset:M.r2p(y.x)+M._offset:fe=y.x*K.w+K.l,fe+=G,W!==void 0?we=typeof y.yref=="string"&&Z?W._length*(1-y.y)+W._offset:W.r2p(y.y)+W._offset:we=K.h-y.y*K.h+K.t,we+=ee,y.sizing){case"fill":re+=" slice";break;case"stretch":re="none";break}S.attr({x:fe,y:we,width:Q,height:J,preserveAspectRatio:re,opacity:y.opacity});var Oe=M&&O.getRefType(y.xref)!=="domain"?M._id:"",ke=W&&O.getRefType(y.yref)!=="domain"?W._id:"",Le=Oe+ke;R.setClipUrl(S,Le?"clip"+p._uid+Le:null,c)}function C(y){return[y.xref,y.x,y.sizex,y.yref,y.y,y.sizey].join("_")}function I(y,S){return y._index-S._index}var N=p._imageLowerLayer.selectAll("image").data(h,C),F=p._imageUpperLayer.selectAll("image").data(f,C);N.enter().append("image"),F.enter().append("image"),N.exit().remove(),F.exit().remove(),N.each(function(y){D.bind(this)(y),g.bind(this)(y)}),F.each(function(y){D.bind(this)(y),g.bind(this)(y)}),N.sort(I),F.sort(I);var k=Object.keys(p._plots);for(_=0;_<k.length;_++){m=k[_];var P=p._plots[m];if(P.imagelayer){var T=P.imagelayer.selectAll("image").data(v[m]||[],C);T.enter().append("image"),T.exit().remove(),T.each(function(y){D.bind(this)(y),g.bind(this)(y)}),T.sort(I)}}}}}),sb=U({"src/components/images/convert_coords.js"(pe,le){var w=_t(),R=Vt();le.exports=function(z,l,u,c){l=l||{};var p=u==="log"&&l.type==="linear",f=u==="linear"&&l.type==="log";if(p||f){for(var v=z._fullLayout.images,h=l._id.charAt(0),m,_,x=0;x<v.length;x++)if(m=v[x],_="images["+x+"].",m[h+"ref"]===l._id){var A=m[h],E=m["size"+h],D=null,g=null;if(p){D=R(A,l.range);var C=E/Math.pow(10,D)/2;g=2*Math.log(C+Math.sqrt(1+C*C))/Math.LN10}else D=Math.pow(10,A),g=D*(Math.pow(10,E/2)-Math.pow(10,-E/2));w(D)?w(g)||(g=null):(D=null,g=null),c(_+h,D),c(_+"size"+h,g)}}}}}),Nb=U({"src/components/images/index.js"(pe,le){le.exports={moduleType:"component",name:"images",layoutAttributes:pT(),supplyLayoutDefaults:RA(),includeBasePlot:kE()("images"),draw:Nd(),convertCoords:sb()}}}),FE=U({"src/components/updatemenus/constants.js"(pe,le){le.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:"▼"}}}}),Kk=U({"src/components/updatemenus/attributes.js"(pe,le){var w=Ir(),R=jn(),O=Ar().extendFlat,z=zl().overrideAll,l=Za(),u=Tc().templatedArray,c=u("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}});le.exports=z(u("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:c,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:O(l({editType:"arraydraw"}),{}),font:w({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:R.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")}}),kA=U({"src/components/updatemenus/defaults.js"(pe,le){var w=ii(),R=_g(),O=Kk(),z=FE(),l=z.name,u=O.buttons;le.exports=function(v,h){var m={name:l,handleItemDefaults:c};R(v,h,m)};function c(f,v,h){function m(A,E){return w.coerce(f,v,O,A,E)}var _=R(f,v,{name:"buttons",handleItemDefaults:p}),x=m("visible",_.length>0);x&&(m("active"),m("direction"),m("type"),m("showactive"),m("x"),m("y"),w.noneOrAll(f,v,["x","y"]),m("xanchor"),m("yanchor"),m("pad.t"),m("pad.r"),m("pad.b"),m("pad.l"),w.coerceFont(m,"font",h.font),m("bgcolor",h.paper_bgcolor),m("bordercolor"),m("borderwidth"))}function p(f,v){function h(_,x){return w.coerce(f,v,u,_,x)}var m=h("visible",f.method==="skip"||Array.isArray(f.args));m&&(h("method"),h("args"),h("args2"),h("label"),h("execute"))}}}),Tx=U({"src/components/updatemenus/scrollbox.js"(pe,le){le.exports=l;var w=Ze(),R=Lr(),O=ec(),z=ii();function l(u,c,p){this.gd=u,this.container=c,this.id=p,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}l.barWidth=2,l.barLength=20,l.barRadius=2,l.barPad=1,l.barColor="#808BA4",l.prototype.enable=function(c,p,f){var v=this.gd._fullLayout,h=v.width,m=v.height;this.position=c;var _=this.position.l,x=this.position.w,A=this.position.t,E=this.position.h,D=this.position.direction,g=D==="down",C=D==="left",I=D==="right",N=D==="up",F=x,k=E,P,T,y,S;!g&&!C&&!I&&!N&&(this.position.direction="down",g=!0);var M=g||N;M?(P=_,T=P+F,g?(y=A,S=Math.min(y+k,m),k=S-y):(S=A+k,y=Math.max(S-k,0),k=S-y)):(y=A,S=y+k,C?(T=_+F,P=Math.max(T-F,0),F=T-P):(P=_,T=Math.min(P+F,h),F=T-P)),this._box={l:P,t:y,w:F,h:k};var W=x>F,$=l.barLength+2*l.barPad,Z=l.barWidth+2*l.barPad,K=_,Q=A+E;Q+Z>m&&(Q=m-Z);var J=this.container.selectAll("rect.scrollbar-horizontal").data(W?[0]:[]);J.exit().on(".drag",null).remove(),J.enter().append("rect").classed("scrollbar-horizontal",!0).call(R.fill,l.barColor),W?(this.hbar=J.attr({rx:l.barRadius,ry:l.barRadius,x:K,y:Q,width:$,height:Z}),this._hbarXMin=K+$/2,this._hbarTranslateMax=F-$):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var G=E>k,ee=l.barWidth+2*l.barPad,re=l.barLength+2*l.barPad,fe=_+x,we=A;fe+ee>h&&(fe=h-ee);var Oe=this.container.selectAll("rect.scrollbar-vertical").data(G?[0]:[]);Oe.exit().on(".drag",null).remove(),Oe.enter().append("rect").classed("scrollbar-vertical",!0).call(R.fill,l.barColor),G?(this.vbar=Oe.attr({rx:l.barRadius,ry:l.barRadius,x:fe,y:we,width:ee,height:re}),this._vbarYMin=we+re/2,this._vbarTranslateMax=k-re):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var ke=this.id,Le=P-.5,oe=G?T+ee+.5:T+.5,be=y-.5,_e=W?S+Z+.5:S+.5,he=v._topdefs.selectAll("#"+ke).data(W||G?[0]:[]);if(he.exit().remove(),he.enter().append("clipPath").attr("id",ke).append("rect"),W||G?(this._clipRect=he.select("rect").attr({x:Math.floor(Le),y:Math.floor(be),width:Math.ceil(oe)-Math.floor(Le),height:Math.ceil(_e)-Math.floor(be)}),this.container.call(O.setClipUrl,ke,this.gd),this.bg.attr({x:_,y:A,width:x,height:E})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(O.setClipUrl,null),delete this._clipRect),W||G){var De=w.behavior.drag().on("dragstart",function(){w.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(De);var xe=w.behavior.drag().on("dragstart",function(){w.event.sourceEvent.preventDefault(),w.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));W&&this.hbar.on(".drag",null).call(xe),G&&this.vbar.on(".drag",null).call(xe)}this.setTranslate(p,f)},l.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(O.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},l.prototype._onBoxDrag=function(){var c=this.translateX,p=this.translateY;this.hbar&&(c-=w.event.dx),this.vbar&&(p-=w.event.dy),this.setTranslate(c,p)},l.prototype._onBoxWheel=function(){var c=this.translateX,p=this.translateY;this.hbar&&(c+=w.event.deltaY),this.vbar&&(p+=w.event.deltaY),this.setTranslate(c,p)},l.prototype._onBarDrag=function(){var c=this.translateX,p=this.translateY;if(this.hbar){var f=c+this._hbarXMin,v=f+this._hbarTranslateMax,h=z.constrain(w.event.x,f,v),m=(h-f)/(v-f),_=this.position.w-this._box.w;c=m*_}if(this.vbar){var x=p+this._vbarYMin,A=x+this._vbarTranslateMax,E=z.constrain(w.event.y,x,A),D=(E-x)/(A-x),g=this.position.h-this._box.h;p=D*g}this.setTranslate(c,p)},l.prototype.setTranslate=function(c,p){var f=this.position.w-this._box.w,v=this.position.h-this._box.h;if(c=z.constrain(c||0,0,f),p=z.constrain(p||0,0,v),this.translateX=c,this.translateY=p,this.container.call(O.setTranslate,this._box.l-this.position.l-c,this._box.t-this.position.t-p),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+c-.5),y:Math.floor(this.position.t+p-.5)}),this.hbar){var h=c/f;this.hbar.call(O.setTranslate,c+h*this._hbarTranslateMax,p)}if(this.vbar){var m=p/v;this.vbar.call(O.setTranslate,c,p+m*this._vbarTranslateMax)}}}}),lb=U({"src/components/updatemenus/draw.js"(pe,le){var w=Ze(),R=tp(),O=Lr(),z=ec(),l=ii(),u=ah(),c=Tc().arrayEditor,p=tg().LINE_SPACING,f=FE(),v=Tx();le.exports=function($){var Z=$._fullLayout,K=l.filterVisible(Z[f.name]);function Q(ke){R.autoMargin($,y(ke))}var J=Z._menulayer.selectAll("g."+f.containerClassName).data(K.length>0?[0]:[]);if(J.enter().append("g").classed(f.containerClassName,!0).style("cursor","pointer"),J.exit().each(function(){w.select(this).selectAll("g."+f.headerGroupClassName).each(Q)}).remove(),K.length!==0){var G=J.selectAll("g."+f.headerGroupClassName).data(K,h);G.enter().append("g").classed(f.headerGroupClassName,!0);for(var ee=l.ensureSingle(J,"g",f.dropdownButtonGroupClassName,function(ke){ke.style("pointer-events","all")}),re=0;re<K.length;re++){var fe=K[re];T($,fe)}var we="updatemenus"+Z._uid,Oe=new v($,ee,we);G.enter().size()&&(ee.node().parentNode.appendChild(ee.node()),ee.call(M)),G.exit().each(function(ke){ee.call(M),Q(ke)}).remove(),G.each(function(ke){var Le=w.select(this),oe=ke.type==="dropdown"?ee:null;R.manageCommandObserver($,ke,ke.buttons,function(be){x($,ke,ke.buttons[be.index],Le,oe,Oe,be.index,!0)}),ke.type==="dropdown"?(A($,Le,ee,Oe,ke),_(ee,ke)&&E($,Le,ee,Oe,ke)):E($,Le,null,null,ke)})}};function h(W){return W._index}function m(W){return+W.attr(f.menuIndexAttrName)==-1}function _(W,$){return+W.attr(f.menuIndexAttrName)===$._index}function x(W,$,Z,K,Q,J,G,ee){$.active=G,c(W.layout,f.name,$).applyUpdate("active",G),$.type==="buttons"?E(W,K,null,null,$):$.type==="dropdown"&&(Q.attr(f.menuIndexAttrName,"-1"),A(W,K,Q,J,$),ee||E(W,K,Q,J,$))}function A(W,$,Z,K,Q){var J=l.ensureSingle($,"g",f.headerClassName,function(ke){ke.style("pointer-events","all")}),G=Q._dims,ee=Q.active,re=Q.buttons[ee]||f.blankHeaderOpts,fe={y:Q.pad.t,yPad:0,x:Q.pad.l,xPad:0,index:0},we={width:G.headerWidth,height:G.headerHeight};J.call(C,Q,re,W).call(S,Q,fe,we);var Oe=l.ensureSingle($,"text",f.headerArrowClassName,function(ke){ke.attr("text-anchor","end").call(z.font,Q.font).text(f.arrowSymbol[Q.direction])});Oe.attr({x:G.headerWidth-f.arrowOffsetX+Q.pad.l,y:G.headerHeight/2+f.textOffsetY+Q.pad.t}),J.on("click",function(){Z.call(M,String(_(Z,Q)?-1:Q._index)),E(W,$,Z,K,Q)}),J.on("mouseover",function(){J.call(k)}),J.on("mouseout",function(){J.call(P,Q)}),z.setTranslate($,G.lx,G.ly)}function E(W,$,Z,K,Q){Z||(Z=$,Z.attr("pointer-events","all"));var J=!m(Z)||Q.type==="buttons"?Q.buttons:[],G=Q.type==="dropdown"?f.dropdownButtonClassName:f.buttonClassName,ee=Z.selectAll("g."+G).data(l.filterVisible(J)),re=ee.enter().append("g").classed(G,!0),fe=ee.exit();Q.type==="dropdown"?(re.attr("opacity","0").transition().attr("opacity","1"),fe.transition().attr("opacity","0").remove()):fe.remove();var we=0,Oe=0,ke=Q._dims,Le=["up","down"].indexOf(Q.direction)!==-1;Q.type==="dropdown"&&(Le?Oe=ke.headerHeight+f.gapButtonHeader:we=ke.headerWidth+f.gapButtonHeader),Q.type==="dropdown"&&Q.direction==="up"&&(Oe=-f.gapButtonHeader+f.gapButton-ke.openHeight),Q.type==="dropdown"&&Q.direction==="left"&&(we=-f.gapButtonHeader+f.gapButton-ke.openWidth);var oe={x:ke.lx+we+Q.pad.l,y:ke.ly+Oe+Q.pad.t,yPad:f.gapButton,xPad:f.gapButton,index:0},be={l:oe.x+Q.borderwidth,t:oe.y+Q.borderwidth};ee.each(function(_e,he){var De=w.select(this);De.call(C,Q,_e,W).call(S,Q,oe),De.on("click",function(){w.event.defaultPrevented||(_e.execute&&(_e.args2&&Q.active===he?(x(W,Q,_e,$,Z,K,-1),R.executeAPICommand(W,_e.method,_e.args2)):(x(W,Q,_e,$,Z,K,he),R.executeAPICommand(W,_e.method,_e.args))),W.emit("plotly_buttonclicked",{menu:Q,button:_e,active:Q.active}))}),De.on("mouseover",function(){De.call(k)}),De.on("mouseout",function(){De.call(P,Q),ee.call(F,Q)})}),ee.call(F,Q),Le?(be.w=Math.max(ke.openWidth,ke.headerWidth),be.h=oe.y-be.t):(be.w=oe.x-be.l,be.h=Math.max(ke.openHeight,ke.headerHeight)),be.direction=Q.direction,K&&(ee.size()?D(W,$,Z,K,Q,be):g(K))}function D(W,$,Z,K,Q,J){var G=Q.direction,ee=G==="up"||G==="down",re=Q._dims,fe=Q.active,we,Oe,ke;if(ee)for(Oe=0,ke=0;ke<fe;ke++)Oe+=re.heights[ke]+f.gapButton;else for(we=0,ke=0;ke<fe;ke++)we+=re.widths[ke]+f.gapButton;K.enable(J,we,Oe),K.hbar&&K.hbar.attr("opacity","0").transition().attr("opacity","1"),K.vbar&&K.vbar.attr("opacity","0").transition().attr("opacity","1")}function g(W){var $=!!W.hbar,Z=!!W.vbar;$&&W.hbar.transition().attr("opacity","0").each("end",function(){$=!1,Z||W.disable()}),Z&&W.vbar.transition().attr("opacity","0").each("end",function(){Z=!1,$||W.disable()})}function C(W,$,Z,K){W.call(I,$).call(N,$,Z,K)}function I(W,$){var Z=l.ensureSingle(W,"rect",f.itemRectClassName,function(K){K.attr({rx:f.rx,ry:f.ry,"shape-rendering":"crispEdges"})});Z.call(O.stroke,$.bordercolor).call(O.fill,$.bgcolor).style("stroke-width",$.borderwidth+"px")}function N(W,$,Z,K){var Q=l.ensureSingle(W,"text",f.itemTextClassName,function(ee){ee.attr({"text-anchor":"start","data-notex":1})}),J=Z.label,G=K._fullLayout._meta;G&&(J=l.templateString(J,G)),Q.call(z.font,$.font).text(J).call(u.convertToTspans,K)}function F(W,$){var Z=$.active;W.each(function(K,Q){var J=w.select(this);Q===Z&&$.showactive&&J.select("rect."+f.itemRectClassName).call(O.fill,f.activeColor)})}function k(W){W.select("rect."+f.itemRectClassName).call(O.fill,f.hoverColor)}function P(W,$){W.select("rect."+f.itemRectClassName).call(O.fill,$.bgcolor)}function T(W,$){var Z=$._dims={width1:0,height1:0,heights:[],widths:[],totalWidth:0,totalHeight:0,openWidth:0,openHeight:0,lx:0,ly:0},K=z.tester.selectAll("g."+f.dropdownButtonClassName).data(l.filterVisible($.buttons));K.enter().append("g").classed(f.dropdownButtonClassName,!0);var Q=["up","down"].indexOf($.direction)!==-1;K.each(function(we,Oe){var ke=w.select(this);ke.call(C,$,we,W);var Le=ke.select("."+f.itemTextClassName),oe=Le.node()&&z.bBox(Le.node()).width,be=Math.max(oe+f.textPadX,f.minWidth),_e=$.font.size*p,he=u.lineCount(Le),De=Math.max(_e*he,f.minHeight)+f.textOffsetY;De=Math.ceil(De),be=Math.ceil(be),Z.widths[Oe]=be,Z.heights[Oe]=De,Z.height1=Math.max(Z.height1,De),Z.width1=Math.max(Z.width1,be),Q?(Z.totalWidth=Math.max(Z.totalWidth,be),Z.openWidth=Z.totalWidth,Z.totalHeight+=De+f.gapButton,Z.openHeight+=De+f.gapButton):(Z.totalWidth+=be+f.gapButton,Z.openWidth+=be+f.gapButton,Z.totalHeight=Math.max(Z.totalHeight,De),Z.openHeight=Z.totalHeight)}),Q?Z.totalHeight-=f.gapButton:Z.totalWidth-=f.gapButton,Z.headerWidth=Z.width1+f.arrowPadX,Z.headerHeight=Z.height1,$.type==="dropdown"&&(Q?(Z.width1+=f.arrowPadX,Z.totalHeight=Z.height1):Z.totalWidth=Z.width1,Z.totalWidth+=f.arrowPadX),K.remove();var J=Z.totalWidth+$.pad.l+$.pad.r,G=Z.totalHeight+$.pad.t+$.pad.b,ee=W._fullLayout._size;Z.lx=ee.l+ee.w*$.x,Z.ly=ee.t+ee.h*(1-$.y);var re="left";l.isRightAnchor($)&&(Z.lx-=J,re="right"),l.isCenterAnchor($)&&(Z.lx-=J/2,re="center");var fe="top";l.isBottomAnchor($)&&(Z.ly-=G,fe="bottom"),l.isMiddleAnchor($)&&(Z.ly-=G/2,fe="middle"),Z.totalWidth=Math.ceil(Z.totalWidth),Z.totalHeight=Math.ceil(Z.totalHeight),Z.lx=Math.round(Z.lx),Z.ly=Math.round(Z.ly),R.autoMargin(W,y($),{x:$.x,y:$.y,l:J*({right:1,center:.5}[re]||0),r:J*({left:1,center:.5}[re]||0),b:G*({top:1,middle:.5}[fe]||0),t:G*({bottom:1,middle:.5}[fe]||0)})}function y(W){return f.autoMarginIdRoot+W._index}function S(W,$,Z,K){K=K||{};var Q=W.select("."+f.itemRectClassName),J=W.select("."+f.itemTextClassName),G=$.borderwidth,ee=Z.index,re=$._dims;z.setTranslate(W,G+Z.x,G+Z.y);var fe=["up","down"].indexOf($.direction)!==-1,we=K.height||(fe?re.heights[ee]:re.height1);Q.attr({x:0,y:0,width:K.width||(fe?re.width1:re.widths[ee]),height:we});var Oe=$.font.size*p,ke=u.lineCount(J),Le=(ke-1)*Oe/2;u.positionText(J,f.textOffsetX,we/2-Le+f.textOffsetY),fe?Z.y+=re.heights[ee]+Z.yPad:Z.x+=re.widths[ee]+Z.xPad,Z.index++}function M(W,$){W.attr(f.menuIndexAttrName,$||"-1").selectAll("g."+f.dropdownButtonClassName).remove()}}}),IA=U({"src/components/updatemenus/index.js"(pe,le){var w=FE();le.exports={moduleType:"component",name:w.name,layoutAttributes:Kk(),supplyLayoutDefaults:kA(),draw:lb()}}}),vT=U({"src/components/sliders/constants.js"(pe,le){le.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}}}),Qy=U({"src/components/sliders/attributes.js"(pe,le){var w=Ir(),R=Za(),O=Ar().extendDeepAll,z=zl().overrideAll,l=vu(),u=Tc().templatedArray,c=vT(),p=u("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}});le.exports=z(u("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:p,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:O(R({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:l.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:w({})},font:w({}),activebgcolor:{valType:"color",dflt:c.gripBgActiveColor},bgcolor:{valType:"color",dflt:c.railBgColor},bordercolor:{valType:"color",dflt:c.railBorderColor},borderwidth:{valType:"number",min:0,dflt:c.railBorderWidth},ticklen:{valType:"number",min:0,dflt:c.tickLength},tickcolor:{valType:"color",dflt:c.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:c.minorTickLength}}),"arraydraw","from-root")}}),iR=U({"src/components/sliders/defaults.js"(pe,le){var w=ii(),R=_g(),O=Qy(),z=vT(),l=z.name,u=O.steps;le.exports=function(v,h){R(v,h,{name:l,handleItemDefaults:c})};function c(f,v,h){function m(I,N){return w.coerce(f,v,O,I,N)}for(var _=R(f,v,{name:"steps",handleItemDefaults:p}),x=0,A=0;A<_.length;A++)_[A].visible&&x++;var E;if(x<2?E=v.visible=!1:E=m("visible"),!!E){v._stepCount=x;var D=v._visibleSteps=w.filterVisible(_),g=m("active");(_[g]||{}).visible||(v.active=D[0]._index),m("x"),m("y"),w.noneOrAll(f,v,["x","y"]),m("xanchor"),m("yanchor"),m("len"),m("lenmode"),m("pad.t"),m("pad.r"),m("pad.b"),m("pad.l"),w.coerceFont(m,"font",h.font);var C=m("currentvalue.visible");C&&(m("currentvalue.xanchor"),m("currentvalue.prefix"),m("currentvalue.suffix"),m("currentvalue.offset"),w.coerceFont(m,"currentvalue.font",v.font)),m("transition.duration"),m("transition.easing"),m("bgcolor"),m("activebgcolor"),m("bordercolor"),m("borderwidth"),m("ticklen"),m("tickwidth"),m("tickcolor"),m("minorticklen")}}function p(f,v){function h(x,A){return w.coerce(f,v,u,x,A)}var m;if(f.method!=="skip"&&!Array.isArray(f.args)?m=v.visible=!1:m=h("visible"),m){h("method"),h("args");var _=h("label","step-"+v._index);h("value",_),h("execute")}}}}),d_=U({"src/components/sliders/draw.js"(pe,le){var w=Ze(),R=tp(),O=Lr(),z=ec(),l=ii(),u=l.strTranslate,c=ah(),p=Tc().arrayEditor,f=vT(),v=tg(),h=v.LINE_SPACING,m=v.FROM_TL,_=v.FROM_BR;le.exports=function(J){var G=J._context.staticPlot,ee=J._fullLayout,re=A(ee,J),fe=ee._infolayer.selectAll("g."+f.containerClassName).data(re.length>0?[0]:[]);fe.enter().append("g").classed(f.containerClassName,!0).style("cursor",G?null:"ew-resize");function we(oe){oe._commandObserver&&(oe._commandObserver.remove(),delete oe._commandObserver),R.autoMargin(J,x(oe))}if(fe.exit().each(function(){w.select(this).selectAll("g."+f.groupClassName).each(we)}).remove(),re.length!==0){var Oe=fe.selectAll("g."+f.groupClassName).data(re,E);Oe.enter().append("g").classed(f.groupClassName,!0),Oe.exit().each(we).remove();for(var ke=0;ke<re.length;ke++){var Le=re[ke];D(J,Le)}Oe.each(function(oe){var be=w.select(this);S(oe),R.manageCommandObserver(J,oe,oe._visibleSteps,function(_e){var he=be.data()[0];he.active!==_e.index&&(he._dragging||P(J,be,he,_e.index,!1,!0))}),g(J,w.select(this),oe)})}};function x(Q){return f.autoMarginIdRoot+Q._index}function A(Q,J){for(var G=Q[f.name],ee=[],re=0;re<G.length;re++){var fe=G[re];fe.visible&&(fe._gd=J,ee.push(fe))}return ee}function E(Q){return Q._index}function D(Q,J){var G=z.tester.selectAll("g."+f.labelGroupClass).data(J._visibleSteps);G.enter().append("g").classed(f.labelGroupClass,!0);var ee=0,re=0;G.each(function(De){var xe=w.select(this),se=N(xe,{step:De},J),Ee=se.node();if(Ee){var Te=z.bBox(Ee);re=Math.max(re,Te.height),ee=Math.max(ee,Te.width)}}),G.remove();var fe=J._dims={};fe.inputAreaWidth=Math.max(f.railWidth,f.gripHeight);var we=Q._fullLayout._size;fe.lx=we.l+we.w*J.x,fe.ly=we.t+we.h*(1-J.y),J.lenmode==="fraction"?fe.outerLength=Math.round(we.w*J.len):fe.outerLength=J.len,fe.inputAreaStart=0,fe.inputAreaLength=Math.round(fe.outerLength-J.pad.l-J.pad.r);var Oe=fe.inputAreaLength-2*f.stepInset,ke=Oe/(J._stepCount-1),Le=ee+f.labelPadding;if(fe.labelStride=Math.max(1,Math.ceil(Le/ke)),fe.labelHeight=re,fe.currentValueMaxWidth=0,fe.currentValueHeight=0,fe.currentValueTotalHeight=0,fe.currentValueMaxLines=1,J.currentvalue.visible){var oe=z.tester.append("g");G.each(function(De){var xe=C(oe,J,De.label),se=xe.node()&&z.bBox(xe.node())||{width:0,height:0},Ee=c.lineCount(xe);fe.currentValueMaxWidth=Math.max(fe.currentValueMaxWidth,Math.ceil(se.width)),fe.currentValueHeight=Math.max(fe.currentValueHeight,Math.ceil(se.height)),fe.currentValueMaxLines=Math.max(fe.currentValueMaxLines,Ee)}),fe.currentValueTotalHeight=fe.currentValueHeight+J.currentvalue.offset,oe.remove()}fe.height=fe.currentValueTotalHeight+f.tickOffset+J.ticklen+f.labelOffset+fe.labelHeight+J.pad.t+J.pad.b;var be="left";l.isRightAnchor(J)&&(fe.lx-=fe.outerLength,be="right"),l.isCenterAnchor(J)&&(fe.lx-=fe.outerLength/2,be="center");var _e="top";l.isBottomAnchor(J)&&(fe.ly-=fe.height,_e="bottom"),l.isMiddleAnchor(J)&&(fe.ly-=fe.height/2,_e="middle"),fe.outerLength=Math.ceil(fe.outerLength),fe.height=Math.ceil(fe.height),fe.lx=Math.round(fe.lx),fe.ly=Math.round(fe.ly);var he={y:J.y,b:fe.height*_[_e],t:fe.height*m[_e]};J.lenmode==="fraction"?(he.l=0,he.xl=J.x-J.len*m[be],he.r=0,he.xr=J.x+J.len*_[be]):(he.x=J.x,he.l=fe.outerLength*m[be],he.r=fe.outerLength*_[be]),R.autoMargin(Q,x(J),he)}function g(Q,J,G){(G.steps[G.active]||{}).visible||(G.active=G._visibleSteps[0]._index),J.call(C,G).call(K,G).call(F,G).call(y,G).call(Z,Q,G).call(I,Q,G);var ee=G._dims;z.setTranslate(J,ee.lx+G.pad.l,ee.ly+G.pad.t),J.call(M,G,!1),J.call(C,G)}function C(Q,J,G){if(J.currentvalue.visible){var ee=J._dims,re,fe;switch(J.currentvalue.xanchor){case"right":re=ee.inputAreaLength-f.currentValueInset-ee.currentValueMaxWidth,fe="left";break;case"center":re=ee.inputAreaLength*.5,fe="middle";break;default:re=f.currentValueInset,fe="left"}var we=l.ensureSingle(Q,"text",f.labelClass,function(_e){_e.attr({"text-anchor":fe,"data-notex":1})}),Oe=J.currentvalue.prefix?J.currentvalue.prefix:"";if(typeof G=="string")Oe+=G;else{var ke=J.steps[J.active].label,Le=J._gd._fullLayout._meta;Le&&(ke=l.templateString(ke,Le)),Oe+=ke}J.currentvalue.suffix&&(Oe+=J.currentvalue.suffix),we.call(z.font,J.currentvalue.font).text(Oe).call(c.convertToTspans,J._gd);var oe=c.lineCount(we),be=(ee.currentValueMaxLines+1-oe)*J.currentvalue.font.size*h;return c.positionText(we,re,be),we}}function I(Q,J,G){var ee=l.ensureSingle(Q,"rect",f.gripRectClass,function(re){re.call(T,J,Q,G).style("pointer-events","all")});ee.attr({width:f.gripWidth,height:f.gripHeight,rx:f.gripRadius,ry:f.gripRadius}).call(O.stroke,G.bordercolor).call(O.fill,G.bgcolor).style("stroke-width",G.borderwidth+"px")}function N(Q,J,G){var ee=l.ensureSingle(Q,"text",f.labelClass,function(we){we.attr({"text-anchor":"middle","data-notex":1})}),re=J.step.label,fe=G._gd._fullLayout._meta;return fe&&(re=l.templateString(re,fe)),ee.call(z.font,G.font).text(re).call(c.convertToTspans,G._gd),ee}function F(Q,J){var G=l.ensureSingle(Q,"g",f.labelsClass),ee=J._dims,re=G.selectAll("g."+f.labelGroupClass).data(ee.labelSteps);re.enter().append("g").classed(f.labelGroupClass,!0),re.exit().remove(),re.each(function(fe){var we=w.select(this);we.call(N,fe,J),z.setTranslate(we,W(J,fe.fraction),f.tickOffset+J.ticklen+J.font.size*h+f.labelOffset+ee.currentValueTotalHeight)})}function k(Q,J,G,ee,re){var fe=Math.round(ee*(G._stepCount-1)),we=G._visibleSteps[fe]._index;we!==G.active&&P(Q,J,G,we,!0,re)}function P(Q,J,G,ee,re,fe){var we=G.active;G.active=ee,p(Q.layout,f.name,G).applyUpdate("active",ee);var Oe=G.steps[G.active];J.call(M,G,fe),J.call(C,G),Q.emit("plotly_sliderchange",{slider:G,step:G.steps[G.active],interaction:re,previousActive:we}),Oe&&Oe.method&&re&&(J._nextMethod?(J._nextMethod.step=Oe,J._nextMethod.doCallback=re,J._nextMethod.doTransition=fe):(J._nextMethod={step:Oe,doCallback:re,doTransition:fe},J._nextMethodRaf=window.requestAnimationFrame(function(){var ke=J._nextMethod.step;ke.method&&(ke.execute&&R.executeAPICommand(Q,ke.method,ke.args),J._nextMethod=null,J._nextMethodRaf=null)})))}function T(Q,J,G){if(J._context.staticPlot)return;var ee=G.node(),re=w.select(J);function fe(){return G.data()[0]}function we(){var Oe=fe();J.emit("plotly_sliderstart",{slider:Oe});var ke=G.select("."+f.gripRectClass);w.event.stopPropagation(),w.event.preventDefault(),ke.call(O.fill,Oe.activebgcolor);var Le=$(Oe,w.mouse(ee)[0]);k(J,G,Oe,Le,!0),Oe._dragging=!0;function oe(){var _e=fe(),he=$(_e,w.mouse(ee)[0]);k(J,G,_e,he,!1)}re.on("mousemove",oe),re.on("touchmove",oe);function be(){var _e=fe();_e._dragging=!1,ke.call(O.fill,_e.bgcolor),re.on("mouseup",null),re.on("mousemove",null),re.on("touchend",null),re.on("touchmove",null),J.emit("plotly_sliderend",{slider:_e,step:_e.steps[_e.active]})}re.on("mouseup",be),re.on("touchend",be)}Q.on("mousedown",we),Q.on("touchstart",we)}function y(Q,J){var G=Q.selectAll("rect."+f.tickRectClass).data(J._visibleSteps),ee=J._dims;G.enter().append("rect").classed(f.tickRectClass,!0),G.exit().remove(),G.attr({width:J.tickwidth+"px","shape-rendering":"crispEdges"}),G.each(function(re,fe){var we=fe%ee.labelStride===0,Oe=w.select(this);Oe.attr({height:we?J.ticklen:J.minorticklen}).call(O.fill,J.tickcolor),z.setTranslate(Oe,W(J,fe/(J._stepCount-1))-.5*J.tickwidth,(we?f.tickOffset:f.minorTickOffset)+ee.currentValueTotalHeight)})}function S(Q){var J=Q._dims;J.labelSteps=[];for(var G=Q._stepCount,ee=0;ee<G;ee+=J.labelStride)J.labelSteps.push({fraction:ee/(G-1),step:Q._visibleSteps[ee]})}function M(Q,J,G){for(var ee=Q.select("rect."+f.gripRectClass),re=0,fe=0;fe<J._stepCount;fe++)if(J._visibleSteps[fe]._index===J.active){re=fe;break}var we=W(J,re/(J._stepCount-1));if(!J._invokingCommand){var Oe=ee;G&&J.transition.duration>0&&(Oe=Oe.transition().duration(J.transition.duration).ease(J.transition.easing)),Oe.attr("transform",u(we-f.gripWidth*.5,J._dims.currentValueTotalHeight))}}function W(Q,J){var G=Q._dims;return G.inputAreaStart+f.stepInset+(G.inputAreaLength-2*f.stepInset)*Math.min(1,Math.max(0,J))}function $(Q,J){var G=Q._dims;return Math.min(1,Math.max(0,(J-f.stepInset-G.inputAreaStart)/(G.inputAreaLength-2*f.stepInset-2*G.inputAreaStart)))}function Z(Q,J,G){var ee=G._dims,re=l.ensureSingle(Q,"rect",f.railTouchRectClass,function(fe){fe.call(T,J,Q,G).style("pointer-events","all")});re.attr({width:ee.inputAreaLength,height:Math.max(ee.inputAreaWidth,f.tickOffset+G.ticklen+ee.labelHeight)}).call(O.fill,G.bgcolor).attr("opacity",0),z.setTranslate(re,0,ee.currentValueTotalHeight)}function K(Q,J){var G=J._dims,ee=G.inputAreaLength-f.railInset*2,re=l.ensureSingle(Q,"rect",f.railRectClass);re.attr({width:ee,height:f.railWidth,rx:f.railRadius,ry:f.railRadius,"shape-rendering":"crispEdges"}).call(O.stroke,J.bordercolor).call(O.fill,J.bgcolor).style("stroke-width",J.borderwidth+"px"),z.setTranslate(re,f.railInset,(G.inputAreaWidth-f.railWidth)*.5+G.currentValueTotalHeight)}}}),PA=U({"src/components/sliders/index.js"(pe,le){var w=vT();le.exports={moduleType:"component",name:w.name,layoutAttributes:Qy(),supplyLayoutDefaults:iR(),draw:d_()}}}),zE=U({"src/components/rangeslider/attributes.js"(pe,le){var w=jn();le.exports={bgcolor:{valType:"color",dflt:w.background,editType:"plot"},bordercolor:{valType:"color",dflt:w.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"}}}),mT=U({"src/components/rangeslider/oppaxis_attributes.js"(pe,le){le.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"}}}),gT=U({"src/components/rangeslider/constants.js"(pe,le){le.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}}}),Fb=U({"src/components/rangeslider/helpers.js"(pe){var le=Tf(),w=ah(),R=gT(),O=tg().LINE_SPACING,z=R.name;function l(u){var c=u&&u[z];return c&&c.visible}pe.isVisible=l,pe.makeData=function(u){for(var c=le.list({_fullLayout:u},"x",!0),p=u.margin,f=[],v=0;v<c.length;v++){var h=c[v];if(l(h)){f.push(h);var m=h[z];m._id=z+h._id,m._height=(u.height-p.b-p.t)*m.thickness,m._offsetShift=Math.floor(m.borderwidth/2)}}u._rangeSliderData=f},pe.autoMarginOpts=function(u,c){var p=u._fullLayout,f=c[z],v=c._id.charAt(0),h=0,m=0;if(c.side==="bottom"&&(h=c._depth,c.title.text!==p._dfltTitle[v])){m=1.5*c.title.font.size+10+f._offsetShift;var _=(c.title.text.match(w.BR_TAG_ALL)||[]).length;m+=_*c.title.font.size*O}return{x:0,y:c._counterDomainMin,l:0,r:0,t:0,b:f._height+h+Math.max(p.margin.b,m),pad:R.extraPad+f._offsetShift*2}}}}),aR=U({"src/components/rangeslider/defaults.js"(pe,le){var w=ii(),R=Tc(),O=Tf(),z=zE(),l=mT();le.exports=function(c,p,f){var v=c[f],h=p[f];if(!(v.rangeslider||p._requestRangeslider[h._id]))return;w.isPlainObject(v.rangeslider)||(v.rangeslider={});var m=v.rangeslider,_=R.newContainer(h,"rangeslider");function x(S,M){return w.coerce(m,_,z,S,M)}var A,E;function D(S,M){return w.coerce(A,E,l,S,M)}var g=x("visible");if(g){x("bgcolor",p.plot_bgcolor),x("bordercolor"),x("borderwidth"),x("thickness"),x("autorange",!h.isValidRange(m.range)),x("range");var C=p._subplots;if(C)for(var I=C.cartesian.filter(function(S){return S.substr(0,S.indexOf("y"))===O.name2id(f)}).map(function(S){return S.substr(S.indexOf("y"),S.length)}),N=w.simpleMap(I,O.id2name),F=0;F<N.length;F++){var k=N[F];A=m[k]||{},E=R.newContainer(_,k,"yaxis");var P=p[k],T;A.range&&P.isValidRange(A.range)&&(T="fixed");var y=D("rangemode",T);y!=="match"&&D("range",P.range.slice())}_._input=m}}}}),Jk=U({"src/components/rangeslider/calc_autorange.js"(pe,le){var w=Tf().list,R=gx().getAutoRange,O=gT();le.exports=function(l){for(var u=w(l,"x",!0),c=0;c<u.length;c++){var p=u[c],f=p[O.name];f&&f.visible&&f.autorange&&(f._input.autorange=!0,f._input.range=f.range=R(l,p))}}}}),h_=U({"src/components/rangeslider/draw.js"(pe,le){var w=Ze(),R=Mi(),O=tp(),z=ii(),l=z.strTranslate,u=ec(),c=Lr(),p=Nv(),f=Rf(),v=Tf(),h=Vp(),m=i_(),_=gT();le.exports=function(T){for(var y=T._fullLayout,S=y._rangeSliderData,M=0;M<S.length;M++){var W=S[M][_.name];W._clipId=W._id+"-"+y._uid}function $(K){return K._name}var Z=y._infolayer.selectAll("g."+_.containerClassName).data(S,$);Z.exit().each(function(K){var Q=K[_.name];y._topdefs.select("#"+Q._clipId).remove()}).remove(),S.length!==0&&(Z.enter().append("g").classed(_.containerClassName,!0).attr("pointer-events","all"),Z.each(function(K){var Q=w.select(this),J=K[_.name],G=y[v.id2name(K.anchor)],ee=J[v.id2name(K.anchor)];if(J.range){var re=z.simpleMap(J.range,K.r2l),fe=z.simpleMap(K.range,K.r2l),we;fe[0]<fe[1]?we=[Math.min(re[0],fe[0]),Math.max(re[1],fe[1])]:we=[Math.max(re[0],fe[0]),Math.min(re[1],fe[1])],J.range=J._input.range=z.simpleMap(we,K.l2r)}K.cleanRange("rangeslider.range");var Oe=y._size,ke=K.domain;J._width=Oe.w*(ke[1]-ke[0]);var Le=Math.round(Oe.l+Oe.w*ke[0]),oe=Math.round(Oe.t+Oe.h*(1-K._counterDomainMin)+(K.side==="bottom"?K._depth:0)+J._offsetShift+_.extraPad);Q.attr("transform",l(Le,oe)),J._rl=z.simpleMap(J.range,K.r2l);var be=J._rl[0],_e=J._rl[1],he=_e-be;if(J.p2d=function(pt){return pt/J._width*he+be},J.d2p=function(pt){return(pt-be)/he*J._width},K.rangebreaks){var De=K.locateBreaks(be,_e);if(De.length){var xe,se,Ee=0;for(xe=0;xe<De.length;xe++)se=De[xe],Ee+=se.max-se.min;var Te=J._width/(_e-be-Ee),Be=[-Te*be];for(xe=0;xe<De.length;xe++)se=De[xe],Be.push(Be[Be.length-1]-Te*(se.max-se.min));for(J.d2p=function(pt){for(var Rt=Be[0],$t=0;$t<De.length;$t++){var Wt=De[$t];if(pt>=Wt.max)Rt=Be[$t+1];else if(pt<Wt.min)break}return Rt+Te*pt},xe=0;xe<De.length;xe++)se=De[xe],se.pmin=J.d2p(se.min),se.pmax=J.d2p(se.max);J.p2d=function(pt){for(var Rt=Be[0],$t=0;$t<De.length;$t++){var Wt=De[$t];if(pt>=Wt.pmax)Rt=Be[$t+1];else if(pt<Wt.pmin)break}return(pt-Rt)/Te}}}if(ee.rangemode!=="match"){var tt=G.r2l(ee.range[0]),at=G.r2l(ee.range[1]),gt=at-tt;J.d2pOppAxis=function(pt){return(pt-tt)/gt*J._height}}Q.call(g,T,K,J).call(C,T,K,J).call(I,T,K,J).call(F,T,K,J,ee).call(k,T,K,J).call(P,T,K,J),A(Q,T,K,J),D(Q,T,K,J,G,ee),K.side==="bottom"&&p.draw(T,K._id+"title",{propContainer:K,propName:K._name+".title",placeholder:y._dfltTitle.x,attributes:{x:K._offset+K._length/2,y:oe+J._height+J._offsetShift+10+1.5*K.title.font.size,"text-anchor":"middle"}})}))};function x(T){return typeof T.clientX=="number"?T.clientX:T.touches&&T.touches.length>0?T.touches[0].clientX:0}function A(T,y,S,M){if(y._context.staticPlot)return;var W=T.select("rect."+_.slideBoxClassName).node(),$=T.select("rect."+_.grabAreaMinClassName).node(),Z=T.select("rect."+_.grabAreaMaxClassName).node();function K(){var Q=w.event,J=Q.target,G=x(Q),ee=G-T.node().getBoundingClientRect().left,re=M.d2p(S._rl[0]),fe=M.d2p(S._rl[1]),we=h.coverSlip();this.addEventListener("touchmove",Oe),this.addEventListener("touchend",ke),we.addEventListener("mousemove",Oe),we.addEventListener("mouseup",ke);function Oe(Le){var oe=x(Le),be=+oe-G,_e,he,De;switch(J){case W:if(De="ew-resize",re+be>S._length||fe+be<0)return;_e=re+be,he=fe+be;break;case $:if(De="col-resize",re+be>S._length)return;_e=re+be,he=fe;break;case Z:if(De="col-resize",fe+be<0)return;_e=re,he=fe+be;break;default:De="ew-resize",_e=ee,he=ee+be;break}if(he<_e){var xe=he;he=_e,_e=xe}M._pixelMin=_e,M._pixelMax=he,m(w.select(we),De),E(T,y,S,M)}function ke(){we.removeEventListener("mousemove",Oe),we.removeEventListener("mouseup",ke),this.removeEventListener("touchmove",Oe),this.removeEventListener("touchend",ke),z.removeElement(we)}}T.on("mousedown",K),T.on("touchstart",K)}function E(T,y,S,M){function W(K){return S.l2r(z.constrain(K,M._rl[0],M._rl[1]))}var $=W(M.p2d(M._pixelMin)),Z=W(M.p2d(M._pixelMax));window.requestAnimationFrame(function(){R.call("_guiRelayout",y,S._name+".range",[$,Z])})}function D(T,y,S,M,W,$){var Z=_.handleWidth/2;function K(Le){return z.constrain(Le,0,M._width)}function Q(Le){return z.constrain(Le,0,M._height)}function J(Le){return z.constrain(Le,-Z,M._width+Z)}var G=K(M.d2p(S._rl[0])),ee=K(M.d2p(S._rl[1]));if(T.select("rect."+_.slideBoxClassName).attr("x",G).attr("width",ee-G),T.select("rect."+_.maskMinClassName).attr("width",G),T.select("rect."+_.maskMaxClassName).attr("x",ee).attr("width",M._width-ee),$.rangemode!=="match"){var re=M._height-Q(M.d2pOppAxis(W._rl[1])),fe=M._height-Q(M.d2pOppAxis(W._rl[0]));T.select("rect."+_.maskMinOppAxisClassName).attr("x",G).attr("height",re).attr("width",ee-G),T.select("rect."+_.maskMaxOppAxisClassName).attr("x",G).attr("y",fe).attr("height",M._height-fe).attr("width",ee-G),T.select("rect."+_.slideBoxClassName).attr("y",re).attr("height",fe-re)}var we=.5,Oe=Math.round(J(G-Z))-we,ke=Math.round(J(ee-Z))+we;T.select("g."+_.grabberMinClassName).attr("transform",l(Oe,we)),T.select("g."+_.grabberMaxClassName).attr("transform",l(ke,we))}function g(T,y,S,M){var W=z.ensureSingle(T,"rect",_.bgClassName,function(Q){Q.attr({x:0,y:0,"shape-rendering":"crispEdges"})}),$=M.borderwidth%2===0?M.borderwidth:M.borderwidth-1,Z=-M._offsetShift,K=u.crispRound(y,M.borderwidth);W.attr({width:M._width+$,height:M._height+$,transform:l(Z,Z),"stroke-width":K}).call(c.stroke,M.bordercolor).call(c.fill,M.bgcolor)}function C(T,y,S,M){var W=y._fullLayout,$=z.ensureSingleById(W._topdefs,"clipPath",M._clipId,function(Z){Z.append("rect").attr({x:0,y:0})});$.select("rect").attr({width:M._width,height:M._height})}function I(T,y,S,M){var W=y.calcdata,$=T.selectAll("g."+_.rangePlotClassName).data(S._subplotsWith,z.identity);$.enter().append("g").attr("class",function(K){return _.rangePlotClassName+" "+K}).call(u.setClipUrl,M._clipId,y),$.order(),$.exit().remove();var Z;$.each(function(K,Q){var J=w.select(this),G=Q===0,ee=v.getFromId(y,K,"y"),re=ee._name,fe=M[re],we={data:[],layout:{xaxis:{type:S.type,domain:[0,1],range:M.range.slice(),calendar:S.calendar},width:M._width,height:M._height,margin:{t:0,b:0,l:0,r:0}},_context:y._context};S.rangebreaks&&(we.layout.xaxis.rangebreaks=S.rangebreaks),we.layout[re]={type:ee.type,domain:[0,1],range:fe.rangemode!=="match"?fe.range.slice():ee.range.slice(),calendar:ee.calendar},ee.rangebreaks&&(we.layout[re].rangebreaks=ee.rangebreaks),O.supplyDefaults(we);var Oe=we._fullLayout.xaxis,ke=we._fullLayout[re];Oe.clearCalc(),Oe.setScale(),ke.clearCalc(),ke.setScale();var Le={id:K,plotgroup:J,xaxis:Oe,yaxis:ke,isRangePlot:!0};G?Z=Le:(Le.mainplot="xy",Le.mainplotinfo=Z),f.rangePlot(y,Le,N(W,K))})}function N(T,y){for(var S=[],M=0;M<T.length;M++){var W=T[M],$=W[0].trace;$.xaxis+$.yaxis===y&&S.push(W)}return S}function F(T,y,S,M,W){var $=z.ensureSingle(T,"rect",_.maskMinClassName,function(J){J.attr({x:0,y:0,"shape-rendering":"crispEdges"})});$.attr("height",M._height).call(c.fill,_.maskColor);var Z=z.ensureSingle(T,"rect",_.maskMaxClassName,function(J){J.attr({y:0,"shape-rendering":"crispEdges"})});if(Z.attr("height",M._height).call(c.fill,_.maskColor),W.rangemode!=="match"){var K=z.ensureSingle(T,"rect",_.maskMinOppAxisClassName,function(J){J.attr({y:0,"shape-rendering":"crispEdges"})});K.attr("width",M._width).call(c.fill,_.maskOppAxisColor);var Q=z.ensureSingle(T,"rect",_.maskMaxOppAxisClassName,function(J){J.attr({y:0,"shape-rendering":"crispEdges"})});Q.attr("width",M._width).style("border-top",_.maskOppBorder).call(c.fill,_.maskOppAxisColor)}}function k(T,y,S,M){if(!y._context.staticPlot){var W=z.ensureSingle(T,"rect",_.slideBoxClassName,function($){$.attr({y:0,cursor:_.slideBoxCursor,"shape-rendering":"crispEdges"})});W.attr({height:M._height,fill:_.slideBoxFill})}}function P(T,y,S,M){var W=z.ensureSingle(T,"g",_.grabberMinClassName),$=z.ensureSingle(T,"g",_.grabberMaxClassName),Z={x:0,width:_.handleWidth,rx:_.handleRadius,fill:c.background,stroke:c.defaultLine,"stroke-width":_.handleStrokeWidth,"shape-rendering":"crispEdges"},K={y:Math.round(M._height/4),height:Math.round(M._height/2)},Q=z.ensureSingle(W,"rect",_.handleMinClassName,function(fe){fe.attr(Z)});Q.attr(K);var J=z.ensureSingle($,"rect",_.handleMaxClassName,function(fe){fe.attr(Z)});J.attr(K);var G={width:_.grabAreaWidth,x:0,y:0,fill:_.grabAreaFill,cursor:y._context.staticPlot?void 0:_.grabAreaCursor},ee=z.ensureSingle(W,"rect",_.grabAreaMinClassName,function(fe){fe.attr(G)});ee.attr("height",M._height);var re=z.ensureSingle($,"rect",_.grabAreaMaxClassName,function(fe){fe.attr(G)});re.attr("height",M._height)}}}),yT=U({"src/components/rangeslider/index.js"(pe,le){var w=ii(),R=zE(),O=mT(),z=Fb();le.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:w.extendFlat({},R,{yaxis:O})}}},layoutAttributes:zE(),handleDefaults:aR(),calcAutorange:Jk(),draw:h_(),isVisible:z.isVisible,makeData:z.makeData,autoMarginOpts:z.autoMarginOpts}}}),Ef=U({"src/components/rangeselector/attributes.js"(pe,le){var w=Ir(),R=jn(),O=Tc().templatedArray,z=O("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"});le.exports={visible:{valType:"boolean",editType:"plot"},buttons:z,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:w({editType:"plot"}),bgcolor:{valType:"color",dflt:R.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:R.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}}}),p_=U({"src/components/rangeselector/constants.js"(pe,le){le.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}}}),Q_=U({"src/components/rangeselector/defaults.js"(pe,le){var w=ii(),R=Lr(),O=Tc(),z=_g(),l=Ef(),u=p_();le.exports=function(v,h,m,_,x){var A=v.rangeselector||{},E=O.newContainer(h,"rangeselector");function D(F,k){return w.coerce(A,E,l,F,k)}var g=z(A,E,{name:"buttons",handleItemDefaults:c,calendar:x}),C=D("visible",g.length>0);if(C){var I=p(h,m,_);D("x",I[0]),D("y",I[1]),w.noneOrAll(v,h,["x","y"]),D("xanchor"),D("yanchor"),w.coerceFont(D,"font",m.font);var N=D("bgcolor");D("activecolor",R.contrast(N,u.lightAmount,u.darkAmount)),D("bordercolor"),D("borderwidth")}};function c(f,v,h,m){var _=m.calendar;function x(D,g){return w.coerce(f,v,l.buttons,D,g)}var A=x("visible");if(A){var E=x("step");E!=="all"&&(_&&_!=="gregorian"&&(E==="month"||E==="year")?v.stepmode="backward":x("stepmode"),x("count")),x("label")}}function p(f,v,h){for(var m=h.filter(function(E){return v[E].anchor===f._id}),_=0,x=0;x<m.length;x++){var A=v[m[x]].domain;A&&(_=Math.max(A[1],_))}return[f.domain[0],_+u.yPad]}}}),bT=U({"src/components/rangeselector/get_update_object.js"(pe,le){var w=Je(),R=ii().titleCase;le.exports=function(l,u){var c=l._name,p={};if(u.step==="all")p[c+".autorange"]=!0;else{var f=O(l,u);p[c+".range[0]"]=f[0],p[c+".range[1]"]=f[1]}return p};function O(z,l){var u=z.range,c=new Date(z.r2l(u[1])),p=l.step,f=w["utc"+R(p)],v=l.count,h;switch(l.stepmode){case"backward":h=z.l2r(+f.offset(c,-v));break;case"todate":var m=f.offset(c,-v);h=z.l2r(+f.ceil(m));break}var _=u[1];return[h,_]}}}),ub=U({"src/components/rangeselector/draw.js"(pe,le){var w=Ze(),R=Mi(),O=tp(),z=Lr(),l=ec(),u=ii(),c=u.strTranslate,p=ah(),f=Tf(),v=tg(),h=v.LINE_SPACING,m=v.FROM_TL,_=v.FROM_BR,x=p_(),A=bT();le.exports=function(T){var y=T._fullLayout,S=y._infolayer.selectAll(".rangeselector").data(E(T),D);S.enter().append("g").classed("rangeselector",!0),S.exit().remove(),S.style({cursor:"pointer","pointer-events":"all"}),S.each(function(M){var W=w.select(this),$=M,Z=$.rangeselector,K=W.selectAll("g.button").data(u.filterVisible(Z.buttons));K.enter().append("g").classed("button",!0),K.exit().remove(),K.each(function(Q){var J=w.select(this),G=A($,Q);Q._isActive=g($,Q,G),J.call(C,Z,Q),J.call(N,Z,Q,T),J.on("click",function(){T._dragged||R.call("_guiRelayout",T,G)}),J.on("mouseover",function(){Q._isHovered=!0,J.call(C,Z,Q)}),J.on("mouseout",function(){Q._isHovered=!1,J.call(C,Z,Q)})}),k(T,K,Z,$._name,W)})};function E(P){for(var T=f.list(P,"x",!0),y=[],S=0;S<T.length;S++){var M=T[S];M.rangeselector&&M.rangeselector.visible&&y.push(M)}return y}function D(P){return P._id}function g(P,T,y){if(T.step==="all")return P.autorange===!0;var S=Object.keys(y);return P.range[0]===y[S[0]]&&P.range[1]===y[S[1]]}function C(P,T,y){var S=u.ensureSingle(P,"rect","selector-rect",function(M){M.attr("shape-rendering","crispEdges")});S.attr({rx:x.rx,ry:x.ry}),S.call(z.stroke,T.bordercolor).call(z.fill,I(T,y)).style("stroke-width",T.borderwidth+"px")}function I(P,T){return T._isActive||T._isHovered?P.activecolor:P.bgcolor}function N(P,T,y,S){function M($){p.convertToTspans($,S)}var W=u.ensureSingle(P,"text","selector-text",function($){$.attr("text-anchor","middle")});W.call(l.font,T.font).text(F(y,S._fullLayout._meta)).call(M)}function F(P,T){return P.label?T?u.templateString(P.label,T):P.label:P.step==="all"?"all":P.count+P.step.charAt(0)}function k(P,T,y,S,M){var W=0,$=0,Z=y.borderwidth;T.each(function(){var re=w.select(this),fe=re.select(".selector-text"),we=y.font.size*h,Oe=Math.max(we*p.lineCount(fe),16)+3;$=Math.max($,Oe)}),T.each(function(){var re=w.select(this),fe=re.select(".selector-rect"),we=re.select(".selector-text"),Oe=we.node()&&l.bBox(we.node()).width,ke=y.font.size*h,Le=p.lineCount(we),oe=Math.max(Oe+10,x.minButtonWidth);re.attr("transform",c(Z+W,Z)),fe.attr({x:0,y:0,width:oe,height:$}),p.positionText(we,oe/2,$/2-(Le-1)*ke/2+3),W+=oe+5});var K=P._fullLayout._size,Q=K.l+K.w*y.x,J=K.t+K.h*(1-y.y),G="left";u.isRightAnchor(y)&&(Q-=W,G="right"),u.isCenterAnchor(y)&&(Q-=W/2,G="center");var ee="top";u.isBottomAnchor(y)&&(J-=$,ee="bottom"),u.isMiddleAnchor(y)&&(J-=$/2,ee="middle"),W=Math.ceil(W),$=Math.ceil($),Q=Math.round(Q),J=Math.round(J),O.autoMargin(P,S+"-range-selector",{x:y.x,y:y.y,l:W*m[G],r:W*_[G],b:$*_[ee],t:$*m[ee]}),M.attr("transform",c(Q,J))}}}),DA=U({"src/components/rangeselector/index.js"(pe,le){le.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:Ef()}}},layoutAttributes:Ef(),handleDefaults:Q_(),draw:ub()}}}),oh=U({"src/plots/domain.js"(pe){var le=Ar().extendFlat;pe.attributes=function(w,R){w=w||{},R=R||{};var O={valType:"info_array",editType:w.editType,items:[{valType:"number",min:0,max:1,editType:w.editType},{valType:"number",min:0,max:1,editType:w.editType}],dflt:[0,1]};w.name&&w.name+"",w.trace,R.description&&""+R.description;var z={x:le({},O,{}),y:le({},O,{}),editType:w.editType};return w.noGridCell||(z.row={valType:"integer",min:0,dflt:0,editType:w.editType},z.column={valType:"integer",min:0,dflt:0,editType:w.editType}),z},pe.defaults=function(w,R,O,z){var l=z&&z.x||[0,1],u=z&&z.y||[0,1],c=R.grid;if(c){var p=O("domain.column");p!==void 0&&(p<c.columns?l=c._domains.x[p]:delete w.domain.column);var f=O("domain.row");f!==void 0&&(f<c.rows?u=c._domains.y[f]:delete w.domain.row)}var v=O("domain.x",l),h=O("domain.y",u);v[0]<v[1]||(w.domain.x=l.slice()),h[0]<h[1]||(w.domain.y=u.slice())}}}),U0=U({"src/components/grid/index.js"(pe,le){var w=ii(),R=On().counter,O=oh().attributes,z=pf().idRegex,l=Tc(),u={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:[R("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[z.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[z.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:O({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 c(m,_,x){var A=_[x+"axes"],E=Object.keys((m._splomAxes||{})[x]||{});if(Array.isArray(A))return A;if(E.length)return E}function p(m,_){var x=m.grid||{},A=c(_,x,"x"),E=c(_,x,"y");if(!m.grid&&!A&&!E)return;var D=Array.isArray(x.subplots)&&Array.isArray(x.subplots[0]),g=Array.isArray(A),C=Array.isArray(E),I=g&&A!==x.xaxes&&C&&E!==x.yaxes,N,F;D?(N=x.subplots.length,F=x.subplots[0].length):(C&&(N=E.length),g&&(F=A.length));var k=l.newContainer(_,"grid");function P(J,G){return w.coerce(x,k,u,J,G)}var T=P("rows",N),y=P("columns",F);if(!(T*y>1)){delete _.grid;return}if(!D&&!g&&!C){var S=P("pattern")==="independent";S&&(D=!0)}k._hasSubplotGrid=D;var M=P("roworder"),W=M==="top to bottom",$=D?.2:.1,Z=D?.3:.1,K,Q;I&&_._splomGridDflt&&(K=_._splomGridDflt.xside,Q=_._splomGridDflt.yside),k._domains={x:f("x",P,$,K,y),y:f("y",P,Z,Q,T,W)}}function f(m,_,x,A,E,D){var g=_(m+"gap",x),C=_("domain."+m);_(m+"side",A);for(var I=new Array(E),N=C[0],F=(C[1]-N)/(E-g),k=F*(1-g),P=0;P<E;P++){var T=N+F*P;I[D?E-1-P:P]=[T,T+k]}return I}function v(m,_){var x=_.grid;if(!(!x||!x._domains)){var A=m.grid||{},E=_._subplots,D=x._hasSubplotGrid,g=x.rows,C=x.columns,I=x.pattern==="independent",N,F,k,P,T,y,S,M=x._axisMap={};if(D){var W=A.subplots||[];y=x.subplots=new Array(g);var $=1;for(N=0;N<g;N++){var Z=y[N]=new Array(C),K=W[N]||[];for(F=0;F<C;F++)if(I?(T=$===1?"xy":"x"+$+"y"+$,$++):T=K[F],Z[F]="",E.cartesian.indexOf(T)!==-1){if(S=T.indexOf("y"),k=T.slice(0,S),P=T.slice(S),M[k]!==void 0&&M[k]!==F||M[P]!==void 0&&M[P]!==N)continue;Z[F]=T,M[k]=F,M[P]=N}}}else{var Q=c(_,A,"x"),J=c(_,A,"y");x.xaxes=h(Q,E.xaxis,C,M,"x"),x.yaxes=h(J,E.yaxis,g,M,"y")}var G=x._anchors={},ee=x.roworder==="top to bottom";for(var re in M){var fe=re.charAt(0),we=x[fe+"side"],Oe,ke,Le;if(we.length<8)G[re]="free";else if(fe==="x"){if(we.charAt(0)==="t"===ee?(Oe=0,ke=1,Le=g):(Oe=g-1,ke=-1,Le=-1),D){var oe=M[re];for(N=Oe;N!==Le;N+=ke)if(T=y[N][oe],!!T&&(S=T.indexOf("y"),T.slice(0,S)===re)){G[re]=T.slice(S);break}}else for(N=Oe;N!==Le;N+=ke)if(P=x.yaxes[N],E.cartesian.indexOf(re+P)!==-1){G[re]=P;break}}else if(we.charAt(0)==="l"?(Oe=0,ke=1,Le=C):(Oe=C-1,ke=-1,Le=-1),D){var be=M[re];for(N=Oe;N!==Le;N+=ke)if(T=y[be][N],!!T&&(S=T.indexOf("y"),T.slice(S)===re)){G[re]=T.slice(0,S);break}}else for(N=Oe;N!==Le;N+=ke)if(k=x.xaxes[N],E.cartesian.indexOf(k+re)!==-1){G[re]=k;break}}}}function h(m,_,x,A,E){var D=new Array(x),g;function C(I,N){_.indexOf(N)!==-1&&A[N]===void 0?(D[I]=N,A[N]=I):D[I]=""}if(Array.isArray(m))for(g=0;g<x;g++)C(g,m[g]);else for(C(0,E),g=1;g<x;g++)C(g,E+(g+1));return D}le.exports={moduleType:"component",name:"grid",schema:{layout:{grid:u}},layoutAttributes:u,sizeDefaults:p,contentDefaults:v}}}),xT=U({"src/components/errorbars/attributes.js"(pe,le){le.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"}}}),oR=U({"src/components/errorbars/defaults.js"(pe,le){var w=_t(),R=Mi(),O=ii(),z=Tc(),l=xT();le.exports=function(u,c,p,f){var v="error_"+f.axis,h=z.newContainer(c,v),m=u[v]||{};function _(I,N){return O.coerce(m,h,l,I,N)}var x=m.array!==void 0||m.value!==void 0||m.type==="sqrt",A=_("visible",x);if(A!==!1){var E=_("type","array"in m?"data":"percent"),D=!0;E!=="sqrt"&&(D=_("symmetric",!((E==="data"?"arrayminus":"valueminus")in m))),E==="data"?(_("array"),_("traceref"),D||(_("arrayminus"),_("tracerefminus"))):(E==="percent"||E==="constant")&&(_("value"),D||_("valueminus"));var g="copy_"+f.inherit+"style";if(f.inherit){var C=c["error_"+f.inherit];(C||{}).visible&&_(g,!(m.color||w(m.thickness)||w(m.width)))}(!f.inherit||!h[g])&&(_("color",p),_("thickness"),_("width",R.traceIs(c,"gl3d")?0:4))}}}}),nS=U({"src/components/errorbars/compute_error.js"(pe,le){le.exports=function(O){var z=O.type,l=O.symmetric;if(z==="data"){var u=O.array||[];if(l)return function(h,m){var _=+u[m];return[_,_]};var c=O.arrayminus||[];return function(h,m){var _=+u[m],x=+c[m];return!isNaN(_)||!isNaN(x)?[x||0,_||0]:[NaN,NaN]}}else{var p=w(z,O.value),f=w(z,O.valueminus);return l||O.valueminus===void 0?function(h){var m=p(h);return[m,m]}:function(h){return[f(h),p(h)]}}};function w(R,O){if(R==="percent")return function(z){return Math.abs(z*O/100)};if(R==="constant")return function(){return Math.abs(O)};if(R==="sqrt")return function(z){return Math.sqrt(Math.abs(z))}}}}),iS=U({"src/components/errorbars/calc.js"(pe,le){var w=_t(),R=Mi(),O=Yu(),z=ii(),l=nS();le.exports=function(p){for(var f=p.calcdata,v=0;v<f.length;v++){var h=f[v],m=h[0].trace;if(m.visible===!0&&R.traceIs(m,"errorBarsOK")){var _=O.getFromId(p,m.xaxis),x=O.getFromId(p,m.yaxis);u(h,m,_,"x"),u(h,m,x,"y")}}};function u(c,p,f,v){var h=p["error_"+v]||{},m=h.visible&&["linear","log"].indexOf(f.type)!==-1,_=[];if(m){for(var x=l(h),A=0;A<c.length;A++){var E=c[A],D=E.i;if(D===void 0)D=A;else if(D===null)continue;var g=E[v];if(w(f.c2l(g))){var C=x(g,D);if(w(C[0])&&w(C[1])){var I=E[v+"s"]=g-C[0],N=E[v+"h"]=g+C[1];_.push(I,N)}}}var F=f._id,k=p._extremes[F],P=O.findExtremes(f,_,z.extendFlat({tozero:k.opts.tozero},{padded:!0}));k.min=k.min.concat(P.min),k.max=k.max.concat(P.max)}}}}),r2=U({"src/components/errorbars/plot.js"(pe,le){var w=Ze(),R=_t(),O=ec(),z=Qd();le.exports=function(c,p,f,v){var h,m=f.xaxis,_=f.yaxis,x=v&&v.duration>0,A=c._context.staticPlot;p.each(function(E){var D=E[0].trace,g=D.error_x||{},C=D.error_y||{},I;D.ids&&(I=function(P){return P.id});var N=z.hasMarkers(D)&&D.marker.maxdisplayed>0;!C.visible&&!g.visible&&(E=[]);var F=w.select(this).selectAll("g.errorbar").data(E,I);if(F.exit().remove(),!!E.length){g.visible||F.selectAll("path.xerror").remove(),C.visible||F.selectAll("path.yerror").remove(),F.style("opacity",1);var k=F.enter().append("g").classed("errorbar",!0);x&&k.style("opacity",0).transition().duration(v.duration).style("opacity",1),O.setClipUrl(F,f.layerClipId,c),F.each(function(P){var T=w.select(this),y=l(P,m,_);if(!(N&&!P.vis)){var S,M=T.select("path.yerror");if(C.visible&&R(y.x)&&R(y.yh)&&R(y.ys)){var W=C.width;S="M"+(y.x-W)+","+y.yh+"h"+2*W+"m-"+W+",0V"+y.ys,y.noYS||(S+="m-"+W+",0h"+2*W),h=!M.size(),h?M=T.append("path").style("vector-effect",A?"none":"non-scaling-stroke").classed("yerror",!0):x&&(M=M.transition().duration(v.duration).ease(v.easing)),M.attr("d",S)}else M.remove();var $=T.select("path.xerror");if(g.visible&&R(y.y)&&R(y.xh)&&R(y.xs)){var Z=(g.copy_ystyle?C:g).width;S="M"+y.xh+","+(y.y-Z)+"v"+2*Z+"m0,-"+Z+"H"+y.xs,y.noXS||(S+="m0,-"+Z+"v"+2*Z),h=!$.size(),h?$=T.append("path").style("vector-effect",A?"none":"non-scaling-stroke").classed("xerror",!0):x&&($=$.transition().duration(v.duration).ease(v.easing)),$.attr("d",S)}else $.remove()}})}})};function l(u,c,p){var f={x:c.c2p(u.x),y:p.c2p(u.y)};return u.yh!==void 0&&(f.yh=p.c2p(u.yh),f.ys=p.c2p(u.ys),R(f.ys)||(f.noYS=!0,f.ys=p.c2p(u.ys,!0))),u.xh!==void 0&&(f.xh=c.c2p(u.xh),f.xs=c.c2p(u.xs),R(f.xs)||(f.noXS=!0,f.xs=c.c2p(u.xs,!0))),f}}}),yM=U({"src/components/errorbars/style.js"(pe,le){var w=Ze(),R=Lr();le.exports=function(z){z.each(function(l){var u=l[0].trace,c=u.error_y||{},p=u.error_x||{},f=w.select(this);f.selectAll("path.yerror").style("stroke-width",c.thickness+"px").call(R.stroke,c.color),p.copy_ystyle&&(p=c),f.selectAll("path.xerror").style("stroke-width",p.thickness+"px").call(R.stroke,p.color)})}}}),LA=U({"src/components/errorbars/index.js"(pe,le){var w=ii(),R=zl().overrideAll,O=xT(),z={error_x:w.extendFlat({},O),error_y:w.extendFlat({},O)};delete z.error_x.copy_zstyle,delete z.error_y.copy_zstyle,delete z.error_y.copy_ystyle;var l={error_x:w.extendFlat({},O),error_y:w.extendFlat({},O),error_z:w.extendFlat({},O)};delete l.error_x.copy_ystyle,delete l.error_y.copy_ystyle,delete l.error_z.copy_ystyle,delete l.error_z.copy_zstyle,le.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:z,bar:z,histogram:z,scatter3d:R(l,"calc","nested"),scattergl:R(z,"calc","nested")}},supplyDefaults:oR(),calc:iS(),makeComputeError:nS(),plot:r2(),style:yM(),hoverInfo:u};function u(c,p,f){(p.error_y||{}).visible&&(f.yerr=c.yh-c.y,p.error_y.symmetric||(f.yerrneg=c.y-c.ys)),(p.error_x||{}).visible&&(f.xerr=c.xh-c.x,p.error_x.symmetric||(f.xerrneg=c.x-c.xs))}}}),Ex=U({"src/components/colorbar/constants.js"(pe,le){le.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"}}}}),Fd=U({"src/components/colorbar/draw.js"(pe,le){var w=Ze(),R=or(),O=tp(),z=Mi(),l=Yu(),u=Vp(),c=ii(),p=c.strTranslate,f=Ar().extendFlat,v=i_(),h=ec(),m=Lr(),_=Nv(),x=ah(),A=Ug().flipScale,E=CA(),D=MA(),g=Hg(),C=tg(),I=C.LINE_SPACING,N=C.FROM_TL,F=C.FROM_BR,k=Ex().cn;function P($){var Z=$._fullLayout,K=Z._infolayer.selectAll("g."+k.colorbar).data(T($),function(Q){return Q._id});K.enter().append("g").attr("class",function(Q){return Q._id}).classed(k.colorbar,!0),K.each(function(Q){var J=w.select(this);c.ensureSingle(J,"rect",k.cbbg),c.ensureSingle(J,"g",k.cbfills),c.ensureSingle(J,"g",k.cblines),c.ensureSingle(J,"g",k.cbaxis,function(ee){ee.classed(k.crisp,!0)}),c.ensureSingle(J,"g",k.cbtitleunshift,function(ee){ee.append("g").classed(k.cbtitle,!0)}),c.ensureSingle(J,"rect",k.cboutline);var G=y(J,Q,$);G&&G.then&&($._promises||[]).push(G),$._context.edits.colorbarPosition&&S(J,Q,$)}),K.exit().each(function(Q){O.autoMargin($,Q._id)}).remove(),K.order()}function T($){var Z=$._fullLayout,K=$.calcdata,Q=[],J,G,ee,re;function fe(se){return f(se,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function we(){typeof re.calc=="function"?re.calc($,ee,J):(J._fillgradient=G.reversescale?A(G.colorscale):G.colorscale,J._zrange=[G[re.min],G[re.max]])}for(var Oe=0;Oe<K.length;Oe++){var ke=K[Oe];if(ee=ke[0].trace,!!ee._module){var Le=ee._module.colorbar;if(ee.visible===!0&&Le)for(var oe=Array.isArray(Le),be=oe?Le:[Le],_e=0;_e<be.length;_e++){re=be[_e];var he=re.container;G=he?ee[he]:ee,G&&G.showscale&&(J=fe(G.colorbar),J._id="cb"+ee.uid+(oe&&he?"-"+he:""),J._traceIndex=ee.index,J._propPrefix=(he?he+".":"")+"colorbar.",J._meta=ee._meta,we(),Q.push(J))}}}for(var De in Z._colorAxes)if(G=Z[De],G.showscale){var xe=Z._colorAxes[De];J=fe(G.colorbar),J._id="cb"+De,J._propPrefix=De+".colorbar.",J._meta=Z._meta,re={min:"cmin",max:"cmax"},xe[0]!=="heatmap"&&(ee=xe[1],re.calc=ee._module.colorbar.calc),we(),Q.push(J)}return Q}function y($,Z,K){var Q=Z.orientation==="v",J=Z.len,G=Z.lenmode,ee=Z.thickness,re=Z.thicknessmode,fe=Z.outlinewidth,we=Z.borderwidth,Oe=Z.bgcolor,ke=Z.xanchor,Le=Z.yanchor,oe=Z.xpad,be=Z.ypad,_e=Z.x,he=Q?Z.y:1-Z.y,De=Z.yref==="paper",xe=Z.xref==="paper",se=K._fullLayout,Ee=se._size,Te=Z._fillcolor,Be=Z._line,tt=Z.title,at=tt.side,gt=Z._zrange||w.extent((typeof Te=="function"?Te:Be.color).domain()),pt=typeof Be.color=="function"?Be.color:function(){return Be.color},Rt=typeof Te=="function"?Te:function(){return Te},$t=Z._levels,Wt=M(K,Z,gt),Ht=Wt.fill,Ft=Wt.line,st=Math.round(ee*(re==="fraction"?Q?Ee.w:Ee.h:1)),rt=st/(Q?Ee.w:Ee.h),Ue=Math.round(J*(G==="fraction"?Q?Ee.h:Ee.w:1)),xt=Ue/(Q?Ee.h:Ee.w),Gt=xe?Ee.w:K._fullLayout.width,Jt=De?Ee.h:K._fullLayout.height,Ut=Math.round(Q?_e*Gt+oe:he*Jt+be),kr={center:.5,right:1}[ke]||0,Pr={top:1,middle:.5}[Le]||0,$r=Q?_e-kr*rt:he-Pr*rt,rn=Q?he-Pr*xt:_e-kr*xt,kn=Math.round(Q?Jt*(1-rn):Gt*rn);Z._lenFrac=xt,Z._thickFrac=rt,Z._uFrac=$r,Z._vFrac=rn;var Rn=Z._axis=W(K,Z,gt);Rn.position=rt+(Q?_e+oe/Ee.w:he+be/Ee.h);var ci=["top","bottom"].indexOf(at)!==-1;if(Q&&ci&&(Rn.title.side=at,Rn.titlex=_e+oe/Ee.w,Rn.titley=rn+(tt.side==="top"?xt-be/Ee.h:be/Ee.h)),!Q&&!ci&&(Rn.title.side=at,Rn.titley=he+be/Ee.h,Rn.titlex=rn+oe/Ee.w),Be.color&&Z.tickmode==="auto"){Rn.tickmode="linear",Rn.tick0=$t.start;var In=$t.size,Gn=c.constrain(Ue/50,4,15)+1,mr=(gt[1]-gt[0])/((Z.nticks||Gn)*In);if(mr>1){var St=Math.pow(10,Math.floor(Math.log(mr)/Math.LN10));In*=St*c.roundUp(mr/St,[2,5,10]),(Math.abs($t.start)/$t.size+1e-6)%1<2e-6&&(Rn.tick0=0)}Rn.dtick=In}Rn.domain=Q?[rn+be/Ee.h,rn+xt-be/Ee.h]:[rn+oe/Ee.w,rn+xt-oe/Ee.w],Rn.setScale(),$.attr("transform",p(Math.round(Ee.l),Math.round(Ee.t)));var Ot=$.select("."+k.cbtitleunshift).attr("transform",p(-Math.round(Ee.l),-Math.round(Ee.t))),Et=Rn.ticklabelposition,je=Rn.title.font.size,Ye=$.select("."+k.cbaxis),et,mt=0,Nt=0;function lr(dn,on){var Nn={propContainer:Rn,propName:Z._propPrefix+"title",traceIndex:Z._traceIndex,_meta:Z._meta,placeholder:se._dfltTitle.colorbar,containerGroup:$.select("."+k.cbtitle)},Wi=dn.charAt(0)==="h"?dn.substr(1):"h"+dn;$.selectAll("."+Wi+",."+Wi+"-math-group").remove(),_.draw(K,dn,f(Nn,on||{}))}function br(){if(Q&&ci||!Q&&!ci){var dn,on;at==="top"&&(dn=oe+Ee.l+Gt*_e,on=be+Ee.t+Jt*(1-rn-xt)+3+je*.75),at==="bottom"&&(dn=oe+Ee.l+Gt*_e,on=be+Ee.t+Jt*(1-rn)-3-je*.25),at==="right"&&(on=be+Ee.t+Jt*he+3+je*.75,dn=oe+Ee.l+Gt*rn),lr(Rn._id+"title",{attributes:{x:dn,y:on,"text-anchor":Q?"start":"middle"}})}}function Or(){if(Q&&!ci||!Q&&ci){var dn=Rn.position||0,on=Rn._offset+Rn._length/2,Nn,Wi;if(at==="right")Wi=on,Nn=Ee.l+Gt*dn+10+je*(Rn.showticklabels?1:.5);else if(Nn=on,at==="bottom"&&(Wi=Ee.t+Jt*dn+10+(Et.indexOf("inside")===-1?Rn.tickfont.size:0)+(Rn.ticks!=="inside"&&Z.ticklen||0)),at==="top"){var Oa=tt.text.split("<br>").length;Wi=Ee.t+Jt*dn+10-st-I*je*Oa}lr((Q?"h":"v")+Rn._id+"title",{avoid:{selection:w.select(K).selectAll("g."+Rn._id+"tick"),side:at,offsetTop:Q?0:Ee.t,offsetLeft:Q?Ee.l:0,maxShift:Q?se.width:se.height},attributes:{x:Nn,y:Wi,"text-anchor":"middle"},transform:{rotate:Q?-90:0,offset:0}})}}function tn(){if(!Q&&!ci||Q&&ci){var dn=$.select("."+k.cbtitle),on=dn.select("text"),Nn=[-fe/2,fe/2],Wi=dn.select(".h"+Rn._id+"title-math-group").node(),Oa=15.6;on.node()&&(Oa=parseInt(on.node().style.fontSize,10)*I);var Da;if(Wi?(Da=h.bBox(Wi),Nt=Da.width,mt=Da.height,mt>Oa&&(Nn[1]-=(mt-Oa)/2)):on.node()&&!on.classed(k.jsPlaceholder)&&(Da=h.bBox(on.node()),Nt=Da.width,mt=Da.height),Q){if(mt){if(mt+=5,at==="top")Rn.domain[1]-=mt/Ee.h,Nn[1]*=-1;else{Rn.domain[0]+=mt/Ee.h;var Aa=x.lineCount(on);Nn[1]+=(1-Aa)*Oa}dn.attr("transform",p(Nn[0],Nn[1])),Rn.setScale()}}else Nt&&(at==="right"&&(Rn.domain[0]+=(Nt+je/2)/Ee.w),dn.attr("transform",p(Nn[0],Nn[1])),Rn.setScale())}$.selectAll("."+k.cbfills+",."+k.cblines).attr("transform",Q?p(0,Math.round(Ee.h*(1-Rn.domain[1]))):p(Math.round(Ee.w*Rn.domain[0]),0)),Ye.attr("transform",Q?p(0,Math.round(-Ee.t)):p(Math.round(-Ee.l),0));var Ka=$.select("."+k.cbfills).selectAll("rect."+k.cbfill).attr("style","").data(Ht);Ka.enter().append("rect").classed(k.cbfill,!0).attr("style",""),Ka.exit().remove();var Sa=gt.map(Rn.c2p).map(Math.round).sort(function(nn,Kr){return nn-Kr});Ka.each(function(nn,Kr){var $n=[Kr===0?gt[0]:(Ht[Kr]+Ht[Kr-1])/2,Kr===Ht.length-1?gt[1]:(Ht[Kr]+Ht[Kr+1])/2].map(Rn.c2p).map(Math.round);Q&&($n[1]=c.constrain($n[1]+($n[1]>$n[0])?1:-1,Sa[0],Sa[1]));var Ai=w.select(this).attr(Q?"x":"y",Ut).attr(Q?"y":"x",w.min($n)).attr(Q?"width":"height",Math.max(st,2)).attr(Q?"height":"width",Math.max(w.max($n)-w.min($n),2));if(Z._fillgradient)h.gradient(Ai,K,Z._id,Q?"vertical":"horizontalreversed",Z._fillgradient,"fill");else{var aa=Rt(nn).replace("e-","");Ai.attr("fill",R(aa).toHexString())}});var no=$.select("."+k.cblines).selectAll("path."+k.cbline).data(Be.color&&Be.width?Ft:[]);no.enter().append("path").classed(k.cbline,!0),no.exit().remove(),no.each(function(nn){var Kr=Ut,$n=Math.round(Rn.c2p(nn))+Be.width/2%1;w.select(this).attr("d","M"+(Q?Kr+","+$n:$n+","+Kr)+(Q?"h":"v")+st).call(h.lineGroupStyle,Be.width,pt(nn),Be.dash)}),Ye.selectAll("g."+Rn._id+"tick,path").remove();var Fo=Ut+st+(fe||0)/2-(Z.ticks==="outside"?1:0),an=l.calcTicks(Rn),Hr=l.getTickSigns(Rn)[2];return l.drawTicks(K,Rn,{vals:Rn.ticks==="inside"?l.clipEnds(Rn,an):an,layer:Ye,path:l.makeTickPath(Rn,Fo,Hr),transFn:l.makeTransTickFn(Rn)}),l.drawLabels(K,Rn,{vals:an,layer:Ye,transFn:l.makeTransTickLabelFn(Rn),labelFns:l.makeLabelFns(Rn,Fo)})}function Jr(){var dn,on=st+fe/2;Et.indexOf("inside")===-1&&(dn=h.bBox(Ye.node()),on+=Q?dn.width:dn.height),et=Ot.select("text");var Nn=0,Wi=Q&&at==="top",Oa=!Q&&at==="right",Da=0;if(et.node()&&!et.classed(k.jsPlaceholder)){var Aa,Ka=Ot.select(".h"+Rn._id+"title-math-group").node();Ka&&(Q&&ci||!Q&&!ci)?(dn=h.bBox(Ka),Nn=dn.width,Aa=dn.height):(dn=h.bBox(Ot.node()),Nn=dn.right-Ee.l-(Q?Ut:kn),Aa=dn.bottom-Ee.t-(Q?kn:Ut),!Q&&at==="top"&&(on+=dn.height,Da=dn.height)),Oa&&(et.attr("transform",p(Nn/2+je/2,0)),Nn*=2),on=Math.max(on,Q?Nn:Aa)}var Sa=(Q?oe:be)*2+on+we+fe/2,no=0;!Q&&tt.text&&Le==="bottom"&&he<=0&&(no=Sa/2,Sa+=no,Da+=no),se._hColorbarMoveTitle=no,se._hColorbarMoveCBTitle=Da;var Fo=we+fe,an=(Q?Ut:kn)-Fo/2-(Q?oe:0),Hr=(Q?kn:Ut)-(Q?Ue:be+Da-no);$.select("."+k.cbbg).attr("x",an).attr("y",Hr).attr(Q?"width":"height",Math.max(Sa-no,2)).attr(Q?"height":"width",Math.max(Ue+Fo,2)).call(m.fill,Oe).call(m.stroke,Z.bordercolor).style("stroke-width",we);var nn=Oa?Math.max(Nn-10,0):0;$.selectAll("."+k.cboutline).attr("x",(Q?Ut:kn+oe)+nn).attr("y",(Q?kn+be-Ue:Ut)+(Wi?mt:0)).attr(Q?"width":"height",Math.max(st,2)).attr(Q?"height":"width",Math.max(Ue-(Q?2*be+mt:2*oe+nn),2)).call(m.stroke,Z.outlinecolor).style({fill:"none","stroke-width":fe});var Kr=Q?kr*Sa:0,$n=Q?0:(1-Pr)*Sa-Da;if(Kr=xe?Ee.l-Kr:-Kr,$n=De?Ee.t-$n:-$n,$.attr("transform",p(Kr,$n)),!Q&&(we||R(Oe).getAlpha()&&!R.equals(se.paper_bgcolor,Oe))){var Ai=Ye.selectAll("text"),aa=Ai[0].length,Ci=$.select("."+k.cbbg).node(),Ta=h.bBox(Ci),Na=h.getTranslate($),ro=2;Ai.each(function(_i,fi){var Ri=0,$i=aa-1;if(fi===Ri||fi===$i){var Hi=h.bBox(this),wr=h.getTranslate(this),gn;if(fi===$i){var Xn=Hi.right+wr.x,Yi=Ta.right+Na.x+kn-we-ro+_e;gn=Yi-Xn,gn>0&&(gn=0)}else if(fi===Ri){var ha=Hi.left+wr.x,Ca=Ta.left+Na.x+kn+we+ro;gn=Ca-ha,gn<0&&(gn=0)}gn&&(aa<3?this.setAttribute("transform","translate("+gn+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var oo={},xo=N[ke],vr=F[ke],er=N[Le],si=F[Le],ei=Sa-st;Q?(G==="pixels"?(oo.y=he,oo.t=Ue*er,oo.b=Ue*si):(oo.t=oo.b=0,oo.yt=he+J*er,oo.yb=he-J*si),re==="pixels"?(oo.x=_e,oo.l=Sa*xo,oo.r=Sa*vr):(oo.l=ei*xo,oo.r=ei*vr,oo.xl=_e-ee*xo,oo.xr=_e+ee*vr)):(G==="pixels"?(oo.x=_e,oo.l=Ue*xo,oo.r=Ue*vr):(oo.l=oo.r=0,oo.xl=_e+J*xo,oo.xr=_e-J*vr),re==="pixels"?(oo.y=1-he,oo.t=Sa*er,oo.b=Sa*si):(oo.t=ei*er,oo.b=ei*si,oo.yt=he-ee*er,oo.yb=he+ee*si));var Kn=Z.y<.5?"b":"t",qn=Z.x<.5?"l":"r";K._fullLayout._reservedMargin[Z._id]={};var pi={r:se.width-an-Kr,l:an+oo.r,b:se.height-Hr-$n,t:Hr+oo.b};xe&&De?O.autoMargin(K,Z._id,oo):xe?K._fullLayout._reservedMargin[Z._id][Kn]=pi[Kn]:De||Q?K._fullLayout._reservedMargin[Z._id][qn]=pi[qn]:K._fullLayout._reservedMargin[Z._id][Kn]=pi[Kn]}return c.syncOrAsync([O.previousPromises,br,tn,Or,O.previousPromises,Jr],K)}function S($,Z,K){var Q=Z.orientation==="v",J=K._fullLayout,G=J._size,ee,re,fe;u.init({element:$.node(),gd:K,prepFn:function(){ee=$.attr("transform"),v($)},moveFn:function(we,Oe){$.attr("transform",ee+p(we,Oe)),re=u.align((Q?Z._uFrac:Z._vFrac)+we/G.w,Q?Z._thickFrac:Z._lenFrac,0,1,Z.xanchor),fe=u.align((Q?Z._vFrac:1-Z._uFrac)-Oe/G.h,Q?Z._lenFrac:Z._thickFrac,0,1,Z.yanchor);var ke=u.getCursor(re,fe,Z.xanchor,Z.yanchor);v($,ke)},doneFn:function(){if(v($),re!==void 0&&fe!==void 0){var we={};we[Z._propPrefix+"x"]=re,we[Z._propPrefix+"y"]=fe,Z._traceIndex!==void 0?z.call("_guiRestyle",K,we,Z._traceIndex):z.call("_guiRelayout",K,we)}}})}function M($,Z,K){var Q=Z._levels,J=[],G=[],ee,re,fe=Q.end+Q.size/100,we=Q.size,Oe=1.001*K[0]-.001*K[1],ke=1.001*K[1]-.001*K[0];for(re=0;re<1e5&&(ee=Q.start+re*we,!(we>0?ee>=fe:ee<=fe));re++)ee>Oe&&ee<ke&&J.push(ee);if(Z._fillgradient)G=[0];else if(typeof Z._fillcolor=="function"){var Le=Z._filllevels;if(Le)for(fe=Le.end+Le.size/100,we=Le.size,re=0;re<1e5&&(ee=Le.start+re*we,!(we>0?ee>=fe:ee<=fe));re++)ee>K[0]&&ee<K[1]&&G.push(ee);else G=J.map(function(oe){return oe-Q.size/2}),G.push(G[G.length-1]+Q.size)}else Z._fillcolor&&typeof Z._fillcolor=="string"&&(G=[0]);return Q.size<0&&(J.reverse(),G.reverse()),{line:J,fill:G}}function W($,Z,K){var Q=$._fullLayout,J=Z.orientation==="v",G={type:"linear",range:K,tickmode:Z.tickmode,nticks:Z.nticks,tick0:Z.tick0,dtick:Z.dtick,tickvals:Z.tickvals,ticktext:Z.ticktext,ticks:Z.ticks,ticklen:Z.ticklen,tickwidth:Z.tickwidth,tickcolor:Z.tickcolor,showticklabels:Z.showticklabels,labelalias:Z.labelalias,ticklabelposition:Z.ticklabelposition,ticklabeloverflow:Z.ticklabeloverflow,ticklabelstep:Z.ticklabelstep,tickfont:Z.tickfont,tickangle:Z.tickangle,tickformat:Z.tickformat,exponentformat:Z.exponentformat,minexponent:Z.minexponent,separatethousands:Z.separatethousands,showexponent:Z.showexponent,showtickprefix:Z.showtickprefix,tickprefix:Z.tickprefix,showticksuffix:Z.showticksuffix,ticksuffix:Z.ticksuffix,title:Z.title,showline:!0,anchor:"free",side:J?"right":"bottom",position:1},ee=J?"y":"x",re={type:"linear",_id:ee+Z._id},fe={letter:ee,font:Q.font,noAutotickangles:ee==="y",noHover:!0,noTickson:!0,noTicklabelmode:!0,noInsideRange:!0,calendar:Q.calendar};function we(Oe,ke){return c.coerce(G,re,g,Oe,ke)}return E(G,re,we,fe,Q),D(G,re,we,fe),re}le.exports={draw:P}}}),Yp=U({"src/components/colorbar/index.js"(pe,le){le.exports={moduleType:"component",name:"colorbar",attributes:G_(),supplyDefaults:vA(),draw:Fd().draw,hasColorbar:xE()}}}),Mh=U({"src/components/legend/index.js"(pe,le){le.exports={moduleType:"component",name:"legend",layoutAttributes:Q5(),supplyLayoutDefaults:Lb(),draw:Y_(),style:bA()}}}),BE=U({"src/locale-en.js"(pe,le){le.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"}}}}),n2=U({"src/locale-en-us.js"(pe,le){le.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}}}),ym=U({"src/snapshot/cloneplot.js"(pe,le){var w=Mi(),R=ii(),O=R.extendFlat,z=R.extendDeep;function l(c){var p;switch(c){case"themes__thumb":p={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":p={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:p={}}return p}function u(c){var p=["xaxis","yaxis","zaxis"];return p.indexOf(c.slice(0,5))>-1}le.exports=function(p,f){var v,h=p.data,m=p.layout,_=z([],h),x=z({},m,l(f.tileClass)),A=p._context||{};if(f.width&&(x.width=f.width),f.height&&(x.height=f.height),f.tileClass==="thumbnail"||f.tileClass==="themes__thumb"){x.annotations=[];var E=Object.keys(x);for(v=0;v<E.length;v++)u(E[v])&&(x[E[v]].title={text:""});for(v=0;v<_.length;v++){var D=_[v];D.showscale=!1,D.marker&&(D.marker.showscale=!1),w.traceIs(D,"pie-like")&&(D.textposition="none")}}if(Array.isArray(f.annotations))for(v=0;v<f.annotations.length;v++)x.annotations.push(f.annotations[v]);var g=Object.keys(x).filter(function(k){return k.match(/^scene\d*$/)});if(g.length){var C={};for(f.tileClass==="thumbnail"&&(C={title:{text:""},showaxeslabels:!1,showticklabels:!1,linetickenable:!1}),v=0;v<g.length;v++){var I=x[g[v]];I.xaxis||(I.xaxis={}),I.yaxis||(I.yaxis={}),I.zaxis||(I.zaxis={}),O(I.xaxis,C),O(I.yaxis,C),O(I.zaxis,C),I._scene=null}}var N=document.createElement("div");f.tileClass&&(N.className=f.tileClass);var F={gd:N,td:N,layout:x,data:_,config:{staticPlot:f.staticPlot===void 0?!0:f.staticPlot,plotGlPixelRatio:f.plotGlPixelRatio===void 0?2:f.plotGlPixelRatio,displaylogo:f.displaylogo||!1,showLink:f.showLink||!1,showTips:f.showTips||!1,mapboxAccessToken:A.mapboxAccessToken}};return f.setBackground!=="transparent"&&(F.config.setBackground=f.setBackground||"opaque"),F.gd.defaultLayout=l(f.tileClass),F}}}),Gg=U({"src/snapshot/toimage.js"(pe,le){var w=jf().EventEmitter,R=Mi(),O=ii(),z=gm(),l=ym(),u=PE(),c=Sg();function p(f,v){var h=new w,m=l(f,{format:"png"}),_=m.gd;_.style.position="absolute",_.style.left="-5000px",document.body.appendChild(_);function x(){var E=z.getDelay(_._fullLayout);setTimeout(function(){var D=u(_),g=document.createElement("canvas");g.id=O.randstr(),h=c({format:v.format,width:_._fullLayout.width,height:_._fullLayout.height,canvas:g,emitter:h,svg:D}),h.clean=function(){_&&document.body.removeChild(_)}},E)}var A=z.getRedrawFunc(_);return R.call("_doPlot",_,m.data,m.layout,m.config).then(A).then(x).catch(function(E){h.emit("error",E)}),h}le.exports=p}}),I1=U({"src/snapshot/index.js"(pe,le){var w=gm(),R={getDelay:w.getDelay,getRedrawFunc:w.getRedrawFunc,clone:ym(),toSVG:PE(),svgToImg:Sg(),toImage:Gg(),downloadImage:Qw()};le.exports=R}}),ig=U({"src/core.js"(pe){pe.version=Ie().version,Ve(),xh();var le=Mi(),w=pe.register=le.register,R=cT(),O=Object.keys(R);for(l=0;l<O.length;l++)z=O[l],z.charAt(0)!=="_"&&(pe[z]=R[z]),w({moduleType:"apiMethod",name:z,fn:R[z]});var z,l;w(K_()),w([Sx(),nR(),Vf(),NE(),Nb(),IA(),PA(),yT(),DA(),U0(),LA(),vd(),Yp(),Mh(),Dp(),mm()]),w([BE(),n2()]),window.PlotlyLocales&&Array.isArray(window.PlotlyLocales)&&(w(window.PlotlyLocales),delete window.PlotlyLocales),pe.Icons=oT();var u=Dp(),c=tp();pe.Plots={resize:c.resize,graphJson:c.graphJson,sendDataToCloud:c.sendDataToCloud},pe.Fx={hover:u.hover,unhover:u.unhover,loneHover:u.loneHover,loneUnhover:u.loneUnhover},pe.Snapshot=I1(),pe.PlotSchema=ep()}}),sR=U({"lib/core.js"(pe,le){le.exports=ig()}}),th=U({"src/traces/bar/constants.js"(pe,le){le.exports={TEXTPAD:3,eventDataKeys:["value","label"]}}}),rm=U({"src/traces/bar/attributes.js"(pe,le){var w=Kc(),R=Wp().axisHoverFormat,O=Js().hovertemplateAttrs,z=Js().texttemplateAttrs,l=Jd(),u=Ir(),c=th(),p=jl().pattern,f=Ar().extendFlat,v=u({editType:"calc",arrayOk:!0,colorEditType:"style"}),h=w.marker,m=h.line,_=f({},m.width,{dflt:0}),x=f({width:_,editType:"calc"},l("marker.line")),A=f({line:x,editType:"calc"},l("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:p,cornerradius:{valType:"any",editType:"calc"}});le.exports={x:w.x,x0:w.x0,dx:w.dx,y:w.y,y0:w.y0,dy:w.dy,xperiod:w.xperiod,yperiod:w.yperiod,xperiod0:w.xperiod0,yperiod0:w.yperiod0,xperiodalignment:w.xperiodalignment,yperiodalignment:w.yperiodalignment,xhoverformat:R("x"),yhoverformat:R("y"),text:w.text,texttemplate:z({editType:"plot"},{keys:c.eventDataKeys}),hovertext:w.hovertext,hovertemplate:O({},{keys:c.eventDataKeys}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"calc"},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot"},textangle:{valType:"angle",dflt:"auto",editType:"plot"},textfont:f({},v,{}),insidetextfont:f({},v,{}),outsidetextfont:f({},v,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:f({},w.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:A,offsetgroup:w.offsetgroup,alignmentgroup:w.alignmentgroup,selected:{marker:{opacity:w.selected.marker.opacity,color:w.selected.marker.color,editType:"style"},textfont:w.selected.textfont,editType:"style"},unselected:{marker:{opacity:w.unselected.marker.opacity,color:w.unselected.marker.color,editType:"style"},textfont:w.unselected.textfont,editType:"style"},zorder:w.zorder}}}),v_=U({"src/traces/bar/layout_attributes.js"(pe,le){le.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"}}}}),bM=U({"src/traces/bar/style_defaults.js"(pe,le){var w=Lr(),R=Ug().hasColorscale,O=wg(),z=ii().coercePattern;le.exports=function(u,c,p,f,v){var h=p("marker.color",f),m=R(u,"marker");m&&O(u,c,v,p,{prefix:"marker.",cLetter:"c"}),p("marker.line.color",w.defaultLine),R(u,"marker.line")&&O(u,c,v,p,{prefix:"marker.line.",cLetter:"c"}),p("marker.line.width"),p("marker.opacity"),z(p,"marker.pattern",h,m),p("selected.marker.color"),p("unselected.marker.color")}}}),zb=U({"src/traces/bar/defaults.js"(pe,le){var w=_t(),R=ii(),O=Lr(),z=Mi(),l=ib(),u=R1(),c=bM(),p=rg(),f=rm(),v=R.coerceFont;function h(A,E,D,g){function C(P,T){return R.coerce(A,E,f,P,T)}var I=l(A,E,g,C);if(!I){E.visible=!1;return}u(A,E,g,C),C("xhoverformat"),C("yhoverformat"),C("zorder"),C("orientation",E.x&&!E.y?"h":"v"),C("base"),C("offset"),C("width"),C("text"),C("hovertext"),C("hovertemplate");var N=C("textposition");x(A,E,g,C,N,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),c(A,E,C,D,g);var F=(E.marker.line||{}).color,k=z.getComponentMethod("errorbars","supplyDefaults");k(A,E,F||O.defaultLine,{axis:"y"}),k(A,E,F||O.defaultLine,{axis:"x",inherit:"y"}),R.coerceSelectionMarkerOpacity(E,C)}function m(A,E){var D,g;function C(F,k){return R.coerce(g._input,g,f,F,k)}for(var I=0;I<A.length;I++)if(g=A[I],g.type==="bar"){D=g._input;var N=C("marker.cornerradius",E.barcornerradius);g.marker&&(g.marker.cornerradius=_(N)),p(D,g,E,C,E.barmode)}}function _(A){if(w(A)){if(A=+A,A>=0)return A}else if(typeof A=="string"&&(A=A.trim(),A.slice(-1)==="%"&&w(A.slice(0,-1))&&(A=+A.slice(0,-1),A>=0)))return A+"%"}function x(A,E,D,g,C,I){I=I||{};var N=I.moduleHasSelected!==!1,F=I.moduleHasUnselected!==!1,k=I.moduleHasConstrain!==!1,P=I.moduleHasCliponaxis!==!1,T=I.moduleHasTextangle!==!1,y=I.moduleHasInsideanchor!==!1,S=!!I.hasPathbar,M=Array.isArray(C)||C==="auto",W=M||C==="inside",$=M||C==="outside";if(W||$){var Z=v(g,"textfont",D.font),K=R.extendFlat({},Z),Q=A.textfont&&A.textfont.color,J=!Q;if(J&&delete K.color,v(g,"insidetextfont",K),S){var G=R.extendFlat({},Z);J&&delete G.color,v(g,"pathbar.textfont",G)}$&&v(g,"outsidetextfont",Z),N&&g("selected.textfont.color"),F&&g("unselected.textfont.color"),k&&g("constraintext"),P&&g("cliponaxis"),T&&g("textangle"),g("texttemplate")}W&&y&&g("insidetextanchor")}le.exports={supplyDefaults:h,crossTraceDefaults:m,handleText:x,validateCornerradius:_}}}),xM=U({"src/traces/bar/layout_defaults.js"(pe,le){var w=Mi(),R=Yu(),O=ii(),z=v_(),l=zb().validateCornerradius;le.exports=function(u,c,p){function f(N,F){return O.coerce(u,c,z,N,F)}for(var v=!1,h=!1,m=!1,_={},x=f("barmode"),A=x==="group",E=0;E<p.length;E++){var D=p[E];if(w.traceIs(D,"bar")&&D.visible)v=!0;else continue;var g=D.xaxis+D.yaxis;if(A?(_[g]&&(m=!0),_[g]=!0):(g+=D._input.offsetgroup,_.length>0&&!_[g]&&(m=!0),_[g]=!0),D.visible&&D.type==="histogram"){var C=R.getFromId({_fullLayout:c},D[D.orientation==="v"?"xaxis":"yaxis"]);C.type!=="category"&&(h=!0)}}if(!v){delete c.barmode;return}x!=="overlay"&&f("barnorm"),f("bargap",h&&!m?0:.2),f("bargroupgap");var I=f("barcornerradius");c.barcornerradius=l(I)}}}),UE=U({"src/traces/bar/arrays_to_calcdata.js"(pe,le){var w=ii();le.exports=function(O,z){for(var l=0;l<O.length;l++)O[l].i=l;w.mergeArray(z.text,O,"tx"),w.mergeArray(z.hovertext,O,"htx");var u=z.marker;if(u){w.mergeArray(u.opacity,O,"mo",!0),w.mergeArray(u.color,O,"mc");var c=u.line;c&&(w.mergeArray(c.color,O,"mlc"),w.mergeArrayCastPositive(c.width,O,"mlw"))}}}}),aS=U({"src/traces/bar/calc.js"(pe,le){var w=Yu(),R=Zy(),O=Ug().hasColorscale,z=t0(),l=UE(),u=k1();le.exports=function(p,f){var v=w.getFromId(p,f.xaxis||"x"),h=w.getFromId(p,f.yaxis||"y"),m,_,x,A,E,D,g={msUTC:!!(f.base||f.base===0)};f.orientation==="h"?(m=v.makeCalcdata(f,"x",g),x=h.makeCalcdata(f,"y"),A=R(f,h,"y",x),E=!!f.yperiodalignment,D="y"):(m=h.makeCalcdata(f,"y",g),x=v.makeCalcdata(f,"x"),A=R(f,v,"x",x),E=!!f.xperiodalignment,D="x"),_=A.vals;for(var C=Math.min(_.length,m.length),I=new Array(C),N=0;N<C;N++)I[N]={p:_[N],s:m[N]},E&&(I[N].orig_p=x[N],I[N][D+"End"]=A.ends[N],I[N][D+"Start"]=A.starts[N]),f.ids&&(I[N].id=String(f.ids[N]));return O(f,"marker")&&z(p,f,{vals:f.marker.color,containerStr:"marker",cLetter:"c"}),O(f,"marker.line")&&z(p,f,{vals:f.marker.line.color,containerStr:"marker.line",cLetter:"c"}),l(I,f),u(I,f),I}}}),x0=U({"src/traces/bar/uniform_text.js"(pe,le){var w=Ze(),R=ii();function O(c,p,f){var v=c._fullLayout,h=v["_"+f+"Text_minsize"];if(h){var m=v.uniformtext.mode==="hide",_;switch(f){case"funnelarea":case"pie":case"sunburst":_="g.slice";break;case"treemap":case"icicle":_="g.slice, g.pathbar";break;default:_="g.points > g.point"}p.selectAll(_).each(function(x){var A=x.transform;if(A){A.scale=m&&A.hide?0:h/A.fontSize;var E=w.select(this).select("text");R.setTransormAndDisplay(E,A)}})}}function z(c,p,f){if(f.uniformtext.mode){var v=u(c),h=f.uniformtext.minsize,m=p.scale*p.fontSize;p.hide=m<h,f[v]=f[v]||1/0,p.hide||(f[v]=Math.min(f[v],Math.max(m,h)))}}function l(c,p){var f=u(c);p[f]=void 0}function u(c){return"_"+c+"Text_minsize"}le.exports={recordMinTextSize:z,clearMinTextSize:l,resizeText:O}}}),yy=U({"src/traces/bar/helpers.js"(pe){var le=_t(),w=or(),R=ii().isArrayOrTypedArray;pe.coerceString=function(O,z,l){if(typeof z=="string"){if(z||!O.noBlank)return z}else if((typeof z=="number"||z===!0)&&!O.strict)return String(z);return l!==void 0?l:O.dflt},pe.coerceNumber=function(O,z,l){if(le(z)){z=+z;var u=O.min,c=O.max,p=u!==void 0&&z<u||c!==void 0&&z>c;if(!p)return z}return l!==void 0?l:O.dflt},pe.coerceColor=function(O,z,l){return w(z).isValid()?z:l!==void 0?l:O.dflt},pe.coerceEnumerated=function(O,z,l){return O.coerceNumber&&(z=+z),O.values.indexOf(z)!==-1?z:l!==void 0?l:O.dflt},pe.getValue=function(O,z){var l;return R(O)?z<O.length&&(l=O[z]):l=O,l},pe.getLineWidth=function(O,z){var l=0<z.mlw?z.mlw:R(O.marker.line.width)?0:O.marker.line.width;return l}}}),Xp=U({"src/traces/bar/style.js"(pe,le){var w=Ze(),R=Lr(),O=ec(),z=ii(),l=Mi(),u=x0().resizeText,c=rm(),p=c.textfont,f=c.insidetextfont,v=c.outsidetextfont,h=yy();function m(P){var T=w.select(P).selectAll('g[class^="barlayer"]').selectAll("g.trace");u(P,T,"bar");var y=T.size(),S=P._fullLayout;T.style("opacity",function(M){return M[0].trace.opacity}).each(function(M){(S.barmode==="stack"&&y>1||S.bargap===0&&S.bargroupgap===0&&!M[0].trace.marker.line.width)&&w.select(this).attr("shape-rendering","crispEdges")}),T.selectAll("g.points").each(function(M){var W=w.select(this),$=M[0].trace;_(W,$,P)}),l.getComponentMethod("errorbars","style")(T)}function _(P,T,y){O.pointStyle(P.selectAll("path"),T,y),x(P,T,y)}function x(P,T,y){P.selectAll("text").each(function(S){var M=w.select(this),W=z.ensureUniformFontSize(y,g(M,S,T,y));O.font(M,W)})}function A(P,T,y){var S=T[0].trace;S.selectedpoints?E(y,S,P):(_(y,S,P),l.getComponentMethod("errorbars","style")(y))}function E(P,T,y){O.selectedPointStyle(P.selectAll("path"),T),D(P.selectAll("text"),T,y)}function D(P,T,y){P.each(function(S){var M=w.select(this),W;if(S.selected){W=z.ensureUniformFontSize(y,g(M,S,T,y));var $=T.selected.textfont&&T.selected.textfont.color;$&&(W.color=$),O.font(M,W)}else O.selectedTextStyle(M,T)})}function g(P,T,y,S){var M=S._fullLayout.font,W=y.textfont;if(P.classed("bartext-inside")){var $=k(T,y);W=I(y,T.i,M,$)}else P.classed("bartext-outside")&&(W=N(y,T.i,M));return W}function C(P,T,y){return F(p,P.textfont,T,y)}function I(P,T,y,S){var M=C(P,T,y),W=P._input.textfont===void 0||P._input.textfont.color===void 0||Array.isArray(P.textfont.color)&&P.textfont.color[T]===void 0;return W&&(M={color:R.contrast(S),family:M.family,size:M.size,weight:M.weight,style:M.style,variant:M.variant,textcase:M.textcase,lineposition:M.lineposition,shadow:M.shadow}),F(f,P.insidetextfont,T,M)}function N(P,T,y){var S=C(P,T,y);return F(v,P.outsidetextfont,T,S)}function F(P,T,y,S){T=T||{};var M=h.getValue(T.family,y),W=h.getValue(T.size,y),$=h.getValue(T.color,y),Z=h.getValue(T.weight,y),K=h.getValue(T.style,y),Q=h.getValue(T.variant,y),J=h.getValue(T.textcase,y),G=h.getValue(T.lineposition,y),ee=h.getValue(T.shadow,y);return{family:h.coerceString(P.family,M,S.family),size:h.coerceNumber(P.size,W,S.size),color:h.coerceColor(P.color,$,S.color),weight:h.coerceString(P.weight,Z,S.weight),style:h.coerceString(P.style,K,S.style),variant:h.coerceString(P.variant,Q,S.variant),textcase:h.coerceString(P.variant,J,S.textcase),lineposition:h.coerceString(P.variant,G,S.lineposition),shadow:h.coerceString(P.variant,ee,S.shadow)}}function k(P,T){return T.type==="waterfall"?T[P.dir].marker.color:P.mcc||P.mc||T.marker.color}le.exports={style:m,styleTextPoints:x,styleOnSelect:A,getInsideTextFont:I,getOutsideTextFont:N,getBarColor:k,resizeText:u}}}),by=U({"src/traces/bar/plot.js"(pe,le){var w=Ze(),R=_t(),O=ii(),z=ah(),l=Lr(),u=ec(),c=Mi(),p=Yu().tickText,f=x0(),v=f.recordMinTextSize,h=f.clearMinTextSize,m=Xp(),_=yy(),x=th(),A=rm(),E=A.text,D=A.textposition,g=v0().appendArrayPointValue,C=x.TEXTPAD;function I(we){return we.id}function N(we){if(we.ids)return I}function F(we){return(we>0)-(we<0)}function k(we,Oe){return we<Oe?1:-1}function P(we,Oe,ke,Le){var oe=[],be=[],_e=Le?Oe:ke,he=Le?ke:Oe;return oe[0]=_e.c2p(we.s0,!0),be[0]=he.c2p(we.p0,!0),oe[1]=_e.c2p(we.s1,!0),be[1]=he.c2p(we.p1,!0),Le?[oe,be]:[be,oe]}function T(we,Oe,ke,Le){if(!Oe.uniformtext.mode&&y(ke)){var oe;return Le&&(oe=Le()),we.transition().duration(ke.duration).ease(ke.easing).each("end",function(){oe&&oe()}).each("interrupt",function(){oe&&oe()})}else return we}function y(we){return we&&we.duration>0}function S(we,Oe,ke,Le,oe,be){var _e=Oe.xaxis,he=Oe.yaxis,De=we._fullLayout,xe=we._context.staticPlot;oe||(oe={mode:De.barmode,norm:De.barmode,gap:De.bargap,groupgap:De.bargroupgap},h("bar",De));var se=O.makeTraceGroups(Le,ke,"trace bars").each(function(Ee){var Te=w.select(this),Be=Ee[0].trace,tt=Ee[0].t,at=Be.type==="waterfall",gt=Be.type==="funnel",pt=Be.type==="histogram",Rt=Be.type==="bar",$t=Rt||gt,Wt=0;at&&Be.connector.visible&&Be.connector.mode==="between"&&(Wt=Be.connector.line.width/2);var Ht=Be.orientation==="h",Ft=y(oe),st=O.ensureSingle(Te,"g","points"),rt=N(Be),Ue=st.selectAll("g.point").data(O.identity,rt);Ue.enter().append("g").classed("point",!0),Ue.exit().remove(),Ue.each(function(Gt,Jt){var Ut=w.select(this),kr=P(Gt,_e,he,Ht),Pr=kr[0][0],$r=kr[0][1],rn=kr[1][0],kn=kr[1][1],Rn=(Ht?$r-Pr:kn-rn)===0;Rn&&$t&&_.getLineWidth(Be,Gt)&&(Rn=!1),Rn||(Rn=!R(Pr)||!R($r)||!R(rn)||!R(kn)),Gt.isBlank=Rn,Rn&&(Ht?$r=Pr:kn=rn),Wt&&!Rn&&(Ht?(Pr-=k(Pr,$r)*Wt,$r+=k(Pr,$r)*Wt):(rn-=k(rn,kn)*Wt,kn+=k(rn,kn)*Wt));var ci,In;if(Be.type==="waterfall"){if(!Rn){var Gn=Be[Gt.dir].marker;ci=Gn.line.width,In=Gn.color}}else ci=_.getLineWidth(Be,Gt),In=Gt.mc||Be.marker.color;function mr(Fo){var an=w.round(ci/2%1,2);return oe.gap===0&&oe.groupgap===0?w.round(Math.round(Fo)-an,2):Fo}function St(Fo,an,Hr){return Hr&&Fo===an?Fo:Math.abs(Fo-an)>=2?mr(Fo):Fo>an?Math.ceil(Fo):Math.floor(Fo)}var Ot=l.opacity(In),Et=Ot<1||ci>.01?mr:St;we._context.staticPlot||(Pr=Et(Pr,$r,Ht),$r=Et($r,Pr,Ht),rn=Et(rn,kn,!Ht),kn=Et(kn,rn,!Ht));var je=Ht?_e.c2p:he.c2p,Ye;Gt.s0>0?Ye=Gt._sMax:Gt.s0<0?Ye=Gt._sMin:Ye=Gt.s1>0?Gt._sMax:Gt._sMin;function et(Fo,an){if(!Fo)return 0;var Hr=Math.abs(Ht?kn-rn:$r-Pr),nn=Math.abs(Ht?$r-Pr:kn-rn),Kr=Et(Math.abs(je(Ye,!0)-je(0,!0))),$n=Gt.hasB?Math.min(Hr/2,nn/2):Math.min(Hr/2,Kr),Ai;if(an==="%"){var aa=Math.min(50,Fo);Ai=Hr*(aa/100)}else Ai=Fo;return Et(Math.max(Math.min(Ai,$n),0))}var mt=Rt||pt?et(tt.cornerradiusvalue,tt.cornerradiusform):0,Nt,lr,br="M"+Pr+","+rn+"V"+kn+"H"+$r+"V"+rn+"Z",Or=0;if(mt&&Gt.s){var tn=F(Gt.s0)===0||F(Gt.s)===F(Gt.s0)?Gt.s1:Gt.s0;if(Or=Et(Gt.hasB?0:Math.abs(je(Ye,!0)-je(tn,!0))),Or<mt){var Jr=k(Pr,$r),dn=k(rn,kn),on=Jr===-dn?1:0;if(Ht)if(Gt.hasB)Nt="M"+(Pr+mt*Jr)+","+rn+"A "+mt+","+mt+" 0 0 "+on+" "+Pr+","+(rn+mt*dn)+"V"+(kn-mt*dn)+"A "+mt+","+mt+" 0 0 "+on+" "+(Pr+mt*Jr)+","+kn+"H"+($r-mt*Jr)+"A "+mt+","+mt+" 0 0 "+on+" "+$r+","+(kn-mt*dn)+"V"+(rn+mt*dn)+"A "+mt+","+mt+" 0 0 "+on+" "+($r-mt*Jr)+","+rn+"Z";else{lr=Math.abs($r-Pr)+Or;var Nn=lr<mt?mt-Math.sqrt(lr*(2*mt-lr)):0,Wi=Or>0?Math.sqrt(Or*(2*mt-Or)):0,Oa=Jr>0?Math.max:Math.min;Nt="M"+Pr+","+rn+"V"+(kn-Nn*dn)+"H"+Oa($r-(mt-Or)*Jr,Pr)+"A "+mt+","+mt+" 0 0 "+on+" "+$r+","+(kn-mt*dn-Wi)+"V"+(rn+mt*dn+Wi)+"A "+mt+","+mt+" 0 0 "+on+" "+Oa($r-(mt-Or)*Jr,Pr)+","+(rn+Nn*dn)+"Z"}else if(Gt.hasB)Nt="M"+(Pr+mt*Jr)+","+rn+"A "+mt+","+mt+" 0 0 "+on+" "+Pr+","+(rn+mt*dn)+"V"+(kn-mt*dn)+"A "+mt+","+mt+" 0 0 "+on+" "+(Pr+mt*Jr)+","+kn+"H"+($r-mt*Jr)+"A "+mt+","+mt+" 0 0 "+on+" "+$r+","+(kn-mt*dn)+"V"+(rn+mt*dn)+"A "+mt+","+mt+" 0 0 "+on+" "+($r-mt*Jr)+","+rn+"Z";else{lr=Math.abs(kn-rn)+Or;var Da=lr<mt?mt-Math.sqrt(lr*(2*mt-lr)):0,Aa=Or>0?Math.sqrt(Or*(2*mt-Or)):0,Ka=dn>0?Math.max:Math.min;Nt="M"+(Pr+Da*Jr)+","+rn+"V"+Ka(kn-(mt-Or)*dn,rn)+"A "+mt+","+mt+" 0 0 "+on+" "+(Pr+mt*Jr-Aa)+","+kn+"H"+($r-mt*Jr+Aa)+"A "+mt+","+mt+" 0 0 "+on+" "+($r-Da*Jr)+","+Ka(kn-(mt-Or)*dn,rn)+"V"+rn+"Z"}}else Nt=br}else Nt=br;var Sa=T(O.ensureSingle(Ut,"path"),De,oe,be);if(Sa.style("vector-effect",xe?"none":"non-scaling-stroke").attr("d",isNaN(($r-Pr)*(kn-rn))||Rn&&we._context.staticPlot?"M0,0Z":Nt).call(u.setClipUrl,Oe.layerClipId,we),!De.uniformtext.mode&&Ft){var no=u.makePointStyleFns(Be);u.singlePointStyle(Gt,Sa,Be,no,we)}M(we,Oe,Ut,Ee,Jt,Pr,$r,rn,kn,mt,Or,oe,be),Oe.layerClipId&&u.hideOutsideRangePoint(Gt,Ut.select("text"),_e,he,Be.xcalendar,Be.ycalendar)});var xt=Be.cliponaxis===!1;u.setClipUrl(Te,xt?null:Oe.layerClipId,we)});c.getComponentMethod("errorbars","plot")(we,se,Oe,oe)}function M(we,Oe,ke,Le,oe,be,_e,he,De,xe,se,Ee,Te){var Be=Oe.xaxis,tt=Oe.yaxis,at=we._fullLayout,gt;function pt(lr,br,Or){var tn=O.ensureSingle(lr,"text").text(br).attr({class:"bartext bartext-"+gt,"text-anchor":"middle","data-notex":1}).call(u.font,Or).call(z.convertToTspans,we);return tn}var Rt=Le[0].trace,$t=Rt.orientation==="h",Wt=G(at,Le,oe,Be,tt);gt=ee(Rt,oe);var Ht=Ee.mode==="stack"||Ee.mode==="relative",Ft=Le[oe],st=!Ht||Ft._outmost,rt=Ft.hasB,Ue=xe&&xe-se>C;if(!Wt||gt==="none"||(Ft.isBlank||be===_e||he===De)&&(gt==="auto"||gt==="inside")){ke.select("text").remove();return}var xt=at.font,Gt=m.getBarColor(Le[oe],Rt),Jt=m.getInsideTextFont(Rt,oe,xt,Gt),Ut=m.getOutsideTextFont(Rt,oe,xt),kr=Rt.insidetextanchor||"end",Pr=ke.datum();$t?Be.type==="log"&&Pr.s0<=0&&(Be.range[0]<Be.range[1]?be=0:be=Be._length):tt.type==="log"&&Pr.s0<=0&&(tt.range[0]<tt.range[1]?he=tt._length:he=0);var $r=Math.abs(_e-be),rn=Math.abs(De-he),kn=$r-2*C,Rn=rn-2*C,ci,In,Gn,mr,St;if(gt==="outside"&&!st&&!Ft.hasB&&(gt="inside"),gt==="auto")if(st){gt="inside",St=O.ensureUniformFontSize(we,Jt),ci=pt(ke,Wt,St),In=u.bBox(ci.node()),Gn=In.width,mr=In.height;var Ot=Gn>0&&mr>0,Et;Ue?rt?Et=W(kn-2*xe,Rn,Gn,mr,$t)||W(kn,Rn-2*xe,Gn,mr,$t):$t?Et=W(kn-(xe-se),Rn,Gn,mr,$t)||W(kn,Rn-2*(xe-se),Gn,mr,$t):Et=W(kn,Rn-(xe-se),Gn,mr,$t)||W(kn-2*(xe-se),Rn,Gn,mr,$t):Et=W(kn,Rn,Gn,mr,$t),Ot&&Et?gt="inside":(gt="outside",ci.remove(),ci=null)}else gt="inside";if(!ci){St=O.ensureUniformFontSize(we,gt==="outside"?Ut:Jt),ci=pt(ke,Wt,St);var je=ci.attr("transform");if(ci.attr("transform",""),In=u.bBox(ci.node()),Gn=In.width,mr=In.height,ci.attr("transform",je),Gn<=0||mr<=0){ci.remove();return}}var Ye=Rt.textangle,et,mt;gt==="outside"?(mt=Rt.constraintext==="both"||Rt.constraintext==="outside",et=J(be,_e,he,De,In,{isHorizontal:$t,constrained:mt,angle:Ye})):(mt=Rt.constraintext==="both"||Rt.constraintext==="inside",et=K(be,_e,he,De,In,{isHorizontal:$t,constrained:mt,angle:Ye,anchor:kr,hasB:rt,r:xe,overhead:se})),et.fontSize=St.size,v(Rt.type==="histogram"?"bar":Rt.type,et,at),Ft.transform=et;var Nt=T(ci,at,Ee,Te);O.setTransormAndDisplay(Nt,et)}function W(we,Oe,ke,Le,oe){if(we<0||Oe<0)return!1;var be=ke<=we&&Le<=Oe,_e=ke<=Oe&&Le<=we,he=oe?we>=ke*(Oe/Le):Oe>=Le*(we/ke);return be||_e||he}function $(we){return we==="auto"?0:we}function Z(we,Oe){var ke=Math.PI/180*Oe,Le=Math.abs(Math.sin(ke)),oe=Math.abs(Math.cos(ke));return{x:we.width*oe+we.height*Le,y:we.width*Le+we.height*oe}}function K(we,Oe,ke,Le,oe,be){var _e=!!be.isHorizontal,he=!!be.constrained,De=be.angle||0,xe=be.anchor,se=xe==="end",Ee=xe==="start",Te=be.leftToRight||0,Be=(Te+1)/2,tt=1-Be,at=be.hasB,gt=be.r,pt=be.overhead,Rt=oe.width,$t=oe.height,Wt=Math.abs(Oe-we),Ht=Math.abs(Le-ke),Ft=Wt>2*C&&Ht>2*C?C:0;Wt-=2*Ft,Ht-=2*Ft;var st=$(De);De==="auto"&&!(Rt<=Wt&&$t<=Ht)&&(Rt>Wt||$t>Ht)&&(!(Rt>Ht||$t>Wt)||Rt<$t!=Wt<Ht)&&(st+=90);var rt=Z(oe,st),Ue,xt;if(gt&&gt-pt>C){var Gt=Q(we,Oe,ke,Le,rt,gt,pt,_e,at);Ue=Gt.scale,xt=Gt.pad}else Ue=1,he&&(Ue=Math.min(1,Wt/rt.x,Ht/rt.y)),xt=0;var Jt=oe.left*tt+oe.right*Be,Ut=(oe.top+oe.bottom)/2,kr=(we+C)*tt+(Oe-C)*Be,Pr=(ke+Le)/2,$r=0,rn=0;if(Ee||se){var kn=(_e?rt.x:rt.y)/2;gt&&(se||at)&&(Ft+=xt);var Rn=_e?k(we,Oe):k(ke,Le);_e?Ee?(kr=we+Rn*Ft,$r=-Rn*kn):(kr=Oe-Rn*Ft,$r=Rn*kn):Ee?(Pr=ke+Rn*Ft,rn=-Rn*kn):(Pr=Le-Rn*Ft,rn=Rn*kn)}return{textX:Jt,textY:Ut,targetX:kr,targetY:Pr,anchorX:$r,anchorY:rn,scale:Ue,rotate:st}}function Q(we,Oe,ke,Le,oe,be,_e,he,De){var xe=Math.max(0,Math.abs(Oe-we)-2*C),se=Math.max(0,Math.abs(Le-ke)-2*C),Ee=be-C,Te=_e?Ee-Math.sqrt(Ee*Ee-(Ee-_e)*(Ee-_e)):Ee,Be=De?Ee*2:he?Ee-_e:2*Te,tt=De?Ee*2:he?2*Te:Ee-_e,at,gt,pt,Rt,$t;return oe.y/oe.x>=se/(xe-Be)?Rt=se/oe.y:oe.y/oe.x<=(se-tt)/xe?Rt=xe/oe.x:!De&&he?(at=oe.x*oe.x+oe.y*oe.y/4,gt=-2*oe.x*(xe-Ee)-oe.y*(se/2-Ee),pt=(xe-Ee)*(xe-Ee)+(se/2-Ee)*(se/2-Ee)-Ee*Ee,Rt=(-gt+Math.sqrt(gt*gt-4*at*pt))/(2*at)):De?(at=(oe.x*oe.x+oe.y*oe.y)/4,gt=-oe.x*(xe/2-Ee)-oe.y*(se/2-Ee),pt=(xe/2-Ee)*(xe/2-Ee)+(se/2-Ee)*(se/2-Ee)-Ee*Ee,Rt=(-gt+Math.sqrt(gt*gt-4*at*pt))/(2*at)):(at=oe.x*oe.x/4+oe.y*oe.y,gt=-oe.x*(xe/2-Ee)-2*oe.y*(se-Ee),pt=(xe/2-Ee)*(xe/2-Ee)+(se-Ee)*(se-Ee)-Ee*Ee,Rt=(-gt+Math.sqrt(gt*gt-4*at*pt))/(2*at)),Rt=Math.min(1,Rt),he?$t=Math.max(0,Ee-Math.sqrt(Math.max(0,Ee*Ee-(Ee-(se-oe.y*Rt)/2)*(Ee-(se-oe.y*Rt)/2)))-_e):$t=Math.max(0,Ee-Math.sqrt(Math.max(0,Ee*Ee-(Ee-(xe-oe.x*Rt)/2)*(Ee-(xe-oe.x*Rt)/2)))-_e),{scale:Rt,pad:$t}}function J(we,Oe,ke,Le,oe,be){var _e=!!be.isHorizontal,he=!!be.constrained,De=be.angle||0,xe=oe.width,se=oe.height,Ee=Math.abs(Oe-we),Te=Math.abs(Le-ke),Be;_e?Be=Te>2*C?C:0:Be=Ee>2*C?C:0;var tt=1;he&&(tt=_e?Math.min(1,Te/se):Math.min(1,Ee/xe));var at=$(De),gt=Z(oe,at),pt=(_e?gt.x:gt.y)/2,Rt=(oe.left+oe.right)/2,$t=(oe.top+oe.bottom)/2,Wt=(we+Oe)/2,Ht=(ke+Le)/2,Ft=0,st=0,rt=_e?k(Oe,we):k(ke,Le);return _e?(Wt=Oe-rt*Be,Ft=rt*pt):(Ht=Le+rt*Be,st=-rt*pt),{textX:Rt,textY:$t,targetX:Wt,targetY:Ht,anchorX:Ft,anchorY:st,scale:tt,rotate:at}}function G(we,Oe,ke,Le,oe){var be=Oe[0].trace,_e=be.texttemplate,he;return _e?he=re(we,Oe,ke,Le,oe):be.textinfo?he=fe(Oe,ke,Le,oe):he=_.getValue(be.text,ke),_.coerceString(E,he)}function ee(we,Oe){var ke=_.getValue(we.textposition,Oe);return _.coerceEnumerated(D,ke)}function re(we,Oe,ke,Le,oe){var be=Oe[0].trace,_e=O.castOption(be,ke,"texttemplate");if(!_e)return"";var he=be.type==="histogram",De=be.type==="waterfall",xe=be.type==="funnel",se=be.orientation==="h",Ee,Te,Be,tt;se?(Ee="y",Te=oe,Be="x",tt=Le):(Ee="x",Te=Le,Be="y",tt=oe);function at(Ft){return p(Te,Te.c2l(Ft),!0).text}function gt(Ft){return p(tt,tt.c2l(Ft),!0).text}var pt=Oe[ke],Rt={};Rt.label=pt.p,Rt.labelLabel=Rt[Ee+"Label"]=at(pt.p);var $t=O.castOption(be,pt.i,"text");($t===0||$t)&&(Rt.text=$t),Rt.value=pt.s,Rt.valueLabel=Rt[Be+"Label"]=gt(pt.s);var Wt={};g(Wt,be,pt.i),(he||Wt.x===void 0)&&(Wt.x=se?Rt.value:Rt.label),(he||Wt.y===void 0)&&(Wt.y=se?Rt.label:Rt.value),(he||Wt.xLabel===void 0)&&(Wt.xLabel=se?Rt.valueLabel:Rt.labelLabel),(he||Wt.yLabel===void 0)&&(Wt.yLabel=se?Rt.labelLabel:Rt.valueLabel),De&&(Rt.delta=+pt.rawS||pt.s,Rt.deltaLabel=gt(Rt.delta),Rt.final=pt.v,Rt.finalLabel=gt(Rt.final),Rt.initial=Rt.final-Rt.delta,Rt.initialLabel=gt(Rt.initial)),xe&&(Rt.value=pt.s,Rt.valueLabel=gt(Rt.value),Rt.percentInitial=pt.begR,Rt.percentInitialLabel=O.formatPercent(pt.begR),Rt.percentPrevious=pt.difR,Rt.percentPreviousLabel=O.formatPercent(pt.difR),Rt.percentTotal=pt.sumR,Rt.percenTotalLabel=O.formatPercent(pt.sumR));var Ht=O.castOption(be,pt.i,"customdata");return Ht&&(Rt.customdata=Ht),O.texttemplateString(_e,Rt,we._d3locale,Wt,Rt,be._meta||{})}function fe(we,Oe,ke,Le){var oe=we[0].trace,be=oe.orientation==="h",_e=oe.type==="waterfall",he=oe.type==="funnel";function De(Ht){var Ft=be?Le:ke;return p(Ft,Ht,!0).text}function xe(Ht){var Ft=be?ke:Le;return p(Ft,+Ht,!0).text}var se=oe.textinfo,Ee=we[Oe],Te=se.split("+"),Be=[],tt,at=function(Ht){return Te.indexOf(Ht)!==-1};if(at("label")&&Be.push(De(we[Oe].p)),at("text")&&(tt=O.castOption(oe,Ee.i,"text"),(tt===0||tt)&&Be.push(tt)),_e){var gt=+Ee.rawS||Ee.s,pt=Ee.v,Rt=pt-gt;at("initial")&&Be.push(xe(Rt)),at("delta")&&Be.push(xe(gt)),at("final")&&Be.push(xe(pt))}if(he){at("value")&&Be.push(xe(Ee.s));var $t=0;at("percent initial")&&$t++,at("percent previous")&&$t++,at("percent total")&&$t++;var Wt=$t>1;at("percent initial")&&(tt=O.formatPercent(Ee.begR),Wt&&(tt+=" of initial"),Be.push(tt)),at("percent previous")&&(tt=O.formatPercent(Ee.difR),Wt&&(tt+=" of previous"),Be.push(tt)),at("percent total")&&(tt=O.formatPercent(Ee.sumR),Wt&&(tt+=" of total"),Be.push(tt))}return Be.join("<br>")}le.exports={plot:S,toMoveInsideBar:K}}}),P1=U({"src/traces/bar/hover.js"(pe,le){var w=Dp(),R=Mi(),O=Lr(),z=ii().fillText,l=yy().getLineWidth,u=Yu().hoverLabelText,c=Dt().BADNUM;function p(h,m,_,x,A){var E=f(h,m,_,x,A);if(E){var D=E.cd,g=D[0].trace,C=D[E.index];return E.color=v(g,C),R.getComponentMethod("errorbars","hoverInfo")(C,g,E),[E]}}function f(h,m,_,x,A){var E=h.cd,D=E[0].trace,g=E[0].t,C=x==="closest",I=D.type==="waterfall",N=h.maxHoverDistance,F=h.maxSpikeDistance,k,P,T,y,S,M,W;D.orientation==="h"?(k=_,P=m,T="y",y="x",S=Le,M=we):(k=m,P=_,T="x",y="y",M=Le,S=we);var $=D[T+"period"],Z=C||$;function K(tt){return J(tt,-1)}function Q(tt){return J(tt,1)}function J(tt,at){var gt=tt.w;return tt[T]+at*gt/2}function G(tt){return tt[T+"End"]-tt[T+"Start"]}var ee=C?K:$?function(tt){return tt.p-G(tt)/2}:function(tt){return Math.min(K(tt),tt.p-g.bardelta/2)},re=C?Q:$?function(tt){return tt.p+G(tt)/2}:function(tt){return Math.max(Q(tt),tt.p+g.bardelta/2)};function fe(tt,at,gt){return A.finiteRange&&(gt=0),w.inbox(tt-k,at-k,gt+Math.min(1,Math.abs(at-tt)/W)-1)}function we(tt){return fe(ee(tt),re(tt),N)}function Oe(tt){return fe(K(tt),Q(tt),F)}function ke(tt){var at=tt[y];if(I){var gt=Math.abs(tt.rawS)||0;P>0?at+=gt:P<0&&(at-=gt)}return at}function Le(tt){var at=P,gt=tt.b,pt=ke(tt);return w.inbox(gt-at,pt-at,N+(pt-at)/(pt-gt)-1)}function oe(tt){var at=P,gt=tt.b,pt=ke(tt);return w.inbox(gt-at,pt-at,F+(pt-at)/(pt-gt)-1)}var be=h[T+"a"],_e=h[y+"a"];W=Math.abs(be.r2c(be.range[1])-be.r2c(be.range[0]));function he(tt){return(S(tt)+M(tt))/2}var De=w.getDistanceFunction(x,S,M,he);if(w.getClosest(E,De,h),h.index!==!1&&E[h.index].p!==c){Z||(ee=function(tt){return Math.min(K(tt),tt.p-g.bargroupwidth/2)},re=function(tt){return Math.max(Q(tt),tt.p+g.bargroupwidth/2)});var xe=h.index,se=E[xe],Ee=D.base?se.b+se.s:se.s;h[y+"0"]=h[y+"1"]=_e.c2p(se[y],!0),h[y+"LabelVal"]=Ee;var Te=g.extents[g.extents.round(se.p)];h[T+"0"]=be.c2p(C?ee(se):Te[0],!0),h[T+"1"]=be.c2p(C?re(se):Te[1],!0);var Be=se.orig_p!==void 0;return h[T+"LabelVal"]=Be?se.orig_p:se.p,h.labelLabel=u(be,h[T+"LabelVal"],D[T+"hoverformat"]),h.valueLabel=u(_e,h[y+"LabelVal"],D[y+"hoverformat"]),h.baseLabel=u(_e,se.b,D[y+"hoverformat"]),h.spikeDistance=(oe(se)+Oe(se))/2,h[T+"Spike"]=be.c2p(se.p,!0),z(se,D,h),h.hovertemplate=D.hovertemplate,h}}function v(h,m){var _=m.mcc||h.marker.color,x=m.mlcc||h.marker.line.color,A=l(h,m);if(O.opacity(_))return _;if(O.opacity(x)&&A)return x}le.exports={hoverPoints:p,hoverOnBars:f,getTraceColor:v}}}),_M=U({"src/traces/bar/event_data.js"(pe,le){le.exports=function(R,O,z){return R.x="xVal"in O?O.xVal:O.x,R.y="yVal"in O?O.yVal:O.y,O.xa&&(R.xaxis=O.xa),O.ya&&(R.yaxis=O.ya),z.orientation==="h"?(R.label=R.y,R.value=R.x):(R.label=R.x,R.value=R.y),R}}}),i2=U({"src/traces/bar/select.js"(pe,le){le.exports=function(O,z){var l=O.cd,u=O.xaxis,c=O.yaxis,p=l[0].trace,f=p.type==="funnel",v=p.orientation==="h",h=[],m;if(z===!1)for(m=0;m<l.length;m++)l[m].selected=0;else for(m=0;m<l.length;m++){var _=l[m],x="ct"in _?_.ct:w(_,u,c,v,f);z.contains(x,!1,m,O)?(h.push({pointNumber:m,x:u.c2d(_.x),y:c.c2d(_.y)}),_.selected=1):_.selected=0}return h};function w(R,O,z,l,u){var c=O.c2p(l?R.s0:R.p0,!0),p=O.c2p(l?R.s1:R.p1,!0),f=z.c2p(l?R.p0:R.s0,!0),v=z.c2p(l?R.p1:R.s1,!0);return u?[(c+p)/2,(f+v)/2]:l?[p,(f+v)/2]:[(c+p)/2,v]}}}),ew=U({"src/traces/bar/index.js"(pe,le){le.exports={attributes:rm(),layoutAttributes:v_(),supplyDefaults:zb().supplyDefaults,crossTraceDefaults:zb().crossTraceDefaults,supplyLayoutDefaults:xM(),calc:aS(),crossTraceCalc:F0().crossTraceCalc,colorbar:qg(),arraysToCalcdata:UE(),plot:by().plot,style:Xp().style,styleOnSelect:Xp().styleOnSelect,hoverPoints:P1().hoverPoints,eventData:_M(),selectPoints:i2(),moduleType:"trace",name:"bar",basePlotModule:Rf(),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}}}),oS=U({"lib/bar.js"(pe,le){le.exports=ew()}}),HE=U({"src/traces/box/attributes.js"(pe,le){var w=Xc(),R=Kc(),O=rm(),z=jn(),l=Wp().axisHoverFormat,u=Js().hovertemplateAttrs,c=Ar().extendFlat,p=R.marker,f=p.line;le.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:R.xperiod,yperiod:R.yperiod,xperiod0:R.xperiod0,yperiod0:R.yperiod0,xperiodalignment:R.xperiodalignment,yperiodalignment:R.yperiodalignment,xhoverformat:l("x"),yhoverformat:l("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:c({},p.symbol,{arrayOk:!1,editType:"plot"}),opacity:c({},p.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:c({},p.angle,{arrayOk:!1,editType:"calc"}),size:c({},p.size,{arrayOk:!1,editType:"calc"}),color:c({},p.color,{arrayOk:!1,editType:"style"}),line:{color:c({},f.color,{arrayOk:!1,dflt:z.defaultLine,editType:"style"}),width:c({},f.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:w(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:O.offsetgroup,alignmentgroup:O.alignmentgroup,selected:{marker:R.selected.marker,editType:"style"},unselected:{marker:R.unselected.marker,editType:"style"},text:c({},R.text,{}),hovertext:c({},R.hovertext,{}),hovertemplate:u({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"},zorder:R.zorder}}}),jE=U({"src/traces/box/layout_attributes.js"(pe,le){le.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"}}}}),VE=U({"src/traces/box/defaults.js"(pe,le){var w=ii(),R=Mi(),O=Lr(),z=R1(),l=rg(),u=Pb(),c=HE();function p(m,_,x,A){function E(y,S){return w.coerce(m,_,c,y,S)}if(f(m,_,E,A),_.visible!==!1){z(m,_,A,E),E("xhoverformat"),E("yhoverformat");var D=_._hasPreCompStats;D&&(E("lowerfence"),E("upperfence")),E("line.color",(m.marker||{}).color||x),E("line.width"),E("fillcolor",O.addOpacity(_.line.color,.5));var g=!1;if(D){var C=E("mean"),I=E("sd");C&&C.length&&(g=!0,I&&I.length&&(g="sd"))}E("whiskerwidth");var N=E("sizemode"),F;N==="quartiles"&&(F=E("boxmean",g)),E("showwhiskers",N==="quartiles"),(N==="sd"||F==="sd")&&E("sdmultiple"),E("width"),E("quartilemethod");var k=!1;if(D){var P=E("notchspan");P&&P.length&&(k=!0)}else w.validate(m.notchwidth,c.notchwidth)&&(k=!0);var T=E("notched",k);T&&E("notchwidth"),v(m,_,E,{prefix:"box"}),E("zorder")}}function f(m,_,x,A){function E(fe){var we=0;return fe&&fe.length&&(we+=1,w.isArrayOrTypedArray(fe[0])&&fe[0].length&&(we+=1)),we}function D(fe){return w.validate(m[fe],c[fe])}var g=x("y"),C=x("x"),I;if(_.type==="box"){var N=x("q1"),F=x("median"),k=x("q3");_._hasPreCompStats=N&&N.length&&F&&F.length&&k&&k.length,I=Math.min(w.minRowLength(N),w.minRowLength(F),w.minRowLength(k))}var P=E(g),T=E(C),y=P&&w.minRowLength(g),S=T&&w.minRowLength(C),M=A.calendar,W={autotypenumbers:A.autotypenumbers},$,Z;if(_._hasPreCompStats)switch(String(T)+String(P)){case"00":var K=D("x0")||D("dx"),Q=D("y0")||D("dy");Q&&!K?$="h":$="v",Z=I;break;case"10":$="v",Z=Math.min(I,S);break;case"20":$="h",Z=Math.min(I,C.length);break;case"01":$="h",Z=Math.min(I,y);break;case"02":$="v",Z=Math.min(I,g.length);break;case"12":$="v",Z=Math.min(I,S,g.length);break;case"21":$="h",Z=Math.min(I,C.length,y);break;case"11":Z=0;break;case"22":var J=!1,G;for(G=0;G<C.length;G++)if(u(C[G],M,W)==="category"){J=!0;break}if(J)$="v",Z=Math.min(I,S,g.length);else{for(G=0;G<g.length;G++)if(u(g[G],M,W)==="category"){J=!0;break}J?($="h",Z=Math.min(I,C.length,y)):($="v",Z=Math.min(I,S,g.length))}break}else P>0?($="v",T>0?Z=Math.min(S,y):Z=Math.min(y)):T>0?($="h",Z=Math.min(S)):Z=0;if(!Z){_.visible=!1;return}_._length=Z;var ee=x("orientation",$);_._hasPreCompStats?ee==="v"&&T===0?(x("x0",0),x("dx",1)):ee==="h"&&P===0&&(x("y0",0),x("dy",1)):ee==="v"&&T===0?x("x0"):ee==="h"&&P===0&&x("y0");var re=R.getComponentMethod("calendars","handleTraceDefaults");re(m,_,["x","y"],A)}function v(m,_,x,A){var E=A.prefix,D=w.coerce2(m,_,c,"marker.outliercolor"),g=x("marker.line.outliercolor"),C="outliers";_._hasPreCompStats?C="all":(D||g)&&(C="suspectedoutliers");var I=x(E+"points",C);I?(x("jitter",I==="all"?.3:0),x("pointpos",I==="all"?-1.5:0),x("marker.symbol"),x("marker.opacity"),x("marker.size"),x("marker.angle"),x("marker.color",_.line.color),x("marker.line.color"),x("marker.line.width"),I==="suspectedoutliers"&&(x("marker.line.outliercolor",_.marker.color),x("marker.line.outlierwidth")),x("selected.marker.color"),x("unselected.marker.color"),x("selected.marker.size"),x("unselected.marker.size"),x("text"),x("hovertext")):delete _.marker;var N=x("hoveron");(N==="all"||N.indexOf("points")!==-1)&&x("hovertemplate"),w.coerceSelectionMarkerOpacity(_,x)}function h(m,_){var x,A;function E(I){return w.coerce(A._input,A,c,I)}for(var D=0;D<m.length;D++){A=m[D];var g=A.type;if(g==="box"||g==="violin"){x=A._input;var C=_[g+"mode"];C==="group"&&l(x,A,_,E,C)}}}le.exports={supplyDefaults:p,crossTraceDefaults:h,handleSampleDefaults:f,handlePointsDefaults:v}}}),tw=U({"src/traces/box/layout_defaults.js"(pe,le){var w=Mi(),R=ii(),O=jE();function z(u,c,p,f,v){for(var h=v+"Layout",m=!1,_=0;_<p.length;_++){var x=p[_];if(w.traceIs(x,h)){m=!0;break}}m&&(f(v+"mode"),f(v+"gap"),f(v+"groupgap"))}function l(u,c,p){function f(v,h){return R.coerce(u,c,O,v,h)}z(u,c,p,f,"box")}le.exports={supplyLayoutDefaults:l,_supply:z}}}),lR=U({"src/traces/box/calc.js"(pe,le){var w=_t(),R=Yu(),O=Zy(),z=ii(),l=Dt().BADNUM,u=z._;le.exports=function(N,F){var k=N._fullLayout,P=R.getFromId(N,F.xaxis||"x"),T=R.getFromId(N,F.yaxis||"y"),y=[],S=F.type==="violin"?"_numViolins":"_numBoxes",M,W,$,Z,K,Q,J;F.orientation==="h"?($=P,Z="x",K=T,Q="y",J=!!F.yperiodalignment):($=T,Z="y",K=P,Q="x",J=!!F.xperiodalignment);var G=c(F,Q,K,k[S]),ee=G[0],re=G[1],fe=z.distinctVals(ee,K),we=fe.vals,Oe=fe.minDiff/2,ke,Le,oe,be,_e,he,De=(F.boxpoints||F.points)==="all"?z.identity:function(Rn){return Rn.v<ke.lf||Rn.v>ke.uf};if(F._hasPreCompStats){var xe=F[Z],se=function(Rn){return $.d2c((F[Rn]||[])[M])},Ee=1/0,Te=-1/0;for(M=0;M<F._length;M++){var Be=ee[M];if(w(Be)){if(ke={},ke.pos=ke[Q]=Be,J&&re&&(ke.orig_p=re[M]),ke.q1=se("q1"),ke.med=se("median"),ke.q3=se("q3"),Le=[],xe&&z.isArrayOrTypedArray(xe[M]))for(W=0;W<xe[M].length;W++)he=$.d2c(xe[M][W]),he!==l&&(_e={v:he,i:[M,W]},h(_e,F,[M,W]),Le.push(_e));if(ke.pts=Le.sort(_),oe=ke[Z]=Le.map(x),be=oe.length,ke.med!==l&&ke.q1!==l&&ke.q3!==l&&ke.med>=ke.q1&&ke.q3>=ke.med){var tt=se("lowerfence");ke.lf=tt!==l&&tt<=ke.q1?tt:A(ke,oe,be);var at=se("upperfence");ke.uf=at!==l&&at>=ke.q3?at:E(ke,oe,be);var gt=se("mean");ke.mean=gt!==l?gt:be?z.mean(oe,be):(ke.q1+ke.q3)/2;var pt=se("sd");ke.sd=gt!==l&&pt>=0?pt:be?z.stdev(oe,be,ke.mean):ke.q3-ke.q1,ke.lo=D(ke),ke.uo=g(ke);var Rt=se("notchspan");Rt=Rt!==l&&Rt>0?Rt:C(ke,be),ke.ln=ke.med-Rt,ke.un=ke.med+Rt;var $t=ke.lf,Wt=ke.uf;F.boxpoints&&oe.length&&($t=Math.min($t,oe[0]),Wt=Math.max(Wt,oe[be-1])),F.notched&&($t=Math.min($t,ke.ln),Wt=Math.max(Wt,ke.un)),ke.min=$t,ke.max=Wt}else{z.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+ke.q1,"median = "+ke.med,"q3 = "+ke.q3].join(`
`));var Ht;ke.med!==l?Ht=ke.med:ke.q1!==l?ke.q3!==l?Ht=(ke.q1+ke.q3)/2:Ht=ke.q1:ke.q3!==l?Ht=ke.q3:Ht=0,ke.med=Ht,ke.q1=ke.q3=Ht,ke.lf=ke.uf=Ht,ke.mean=ke.sd=Ht,ke.ln=ke.un=Ht,ke.min=ke.max=Ht}Ee=Math.min(Ee,ke.min),Te=Math.max(Te,ke.max),ke.pts2=Le.filter(De),y.push(ke)}}F._extremes[$._id]=R.findExtremes($,[Ee,Te],{padded:!0})}else{var Ft=$.makeCalcdata(F,Z),st=p(we,Oe),rt=we.length,Ue=f(rt);for(M=0;M<F._length;M++)if(he=Ft[M],!!w(he)){var xt=z.findBin(ee[M],st);xt>=0&&xt<rt&&(_e={v:he,i:M},h(_e,F,M),Ue[xt].push(_e))}var Gt=1/0,Jt=-1/0,Ut=F.quartilemethod,kr=Ut==="exclusive",Pr=Ut==="inclusive";for(M=0;M<rt;M++)if(Ue[M].length>0){if(ke={},ke.pos=ke[Q]=we[M],Le=ke.pts=Ue[M].sort(_),oe=ke[Z]=Le.map(x),be=oe.length,ke.min=oe[0],ke.max=oe[be-1],ke.mean=z.mean(oe,be),ke.sd=z.stdev(oe,be,ke.mean)*F.sdmultiple,ke.med=z.interp(oe,.5),be%2&&(kr||Pr)){var $r,rn;kr?($r=oe.slice(0,be/2),rn=oe.slice(be/2+1)):Pr&&($r=oe.slice(0,be/2+1),rn=oe.slice(be/2)),ke.q1=z.interp($r,.5),ke.q3=z.interp(rn,.5)}else ke.q1=z.interp(oe,.25),ke.q3=z.interp(oe,.75);ke.lf=A(ke,oe,be),ke.uf=E(ke,oe,be),ke.lo=D(ke),ke.uo=g(ke);var kn=C(ke,be);ke.ln=ke.med-kn,ke.un=ke.med+kn,Gt=Math.min(Gt,ke.ln),Jt=Math.max(Jt,ke.un),ke.pts2=Le.filter(De),y.push(ke)}F.notched&&z.isTypedArray(Ft)&&(Ft=Array.from(Ft)),F._extremes[$._id]=R.findExtremes($,F.notched?Ft.concat([Gt,Jt]):Ft,{padded:!0})}return m(y,F),y.length>0?(y[0].t={num:k[S],dPos:Oe,posLetter:Q,valLetter:Z,labels:{med:u(N,"median:"),min:u(N,"min:"),q1:u(N,"q1:"),q3:u(N,"q3:"),max:u(N,"max:"),mean:F.boxmean==="sd"||F.sizemode==="sd"?u(N,"mean ± σ:").replace("σ",F.sdmultiple===1?"σ":F.sdmultiple+"σ"):u(N,"mean:"),lf:u(N,"lower fence:"),uf:u(N,"upper fence:")}},k[S]++,y):[{t:{empty:!0}}]};function c(I,N,F,k){var P=N in I,T=N+"0"in I,y="d"+N in I;if(P||T&&y){var S=F.makeCalcdata(I,N),M=O(I,F,N,S).vals;return[M,S]}var W;T?W=I[N+"0"]:"name"in I&&(F.type==="category"||w(I.name)&&["linear","log"].indexOf(F.type)!==-1||z.isDateTime(I.name)&&F.type==="date")?W=I.name:W=k;for(var $=F.type==="multicategory"?F.r2c_just_indices(W):F.d2c(W,0,I[N+"calendar"]),Z=I._length,K=new Array(Z),Q=0;Q<Z;Q++)K[Q]=$;return[K]}function p(I,N){for(var F=I.length,k=new Array(F+1),P=0;P<F;P++)k[P]=I[P]-N;return k[F]=I[F-1]+N,k}function f(I){for(var N=new Array(I),F=0;F<I;F++)N[F]=[];return N}var v={text:"tx",hovertext:"htx"};function h(I,N,F){for(var k in v)z.isArrayOrTypedArray(N[k])&&(Array.isArray(F)?z.isArrayOrTypedArray(N[k][F[0]])&&(I[v[k]]=N[k][F[0]][F[1]]):I[v[k]]=N[k][F])}function m(I,N){if(z.isArrayOrTypedArray(N.selectedpoints))for(var F=0;F<I.length;F++){for(var k=I[F].pts||[],P={},T=0;T<k.length;T++)P[k[T].i]=T;z.tagSelected(k,N,P)}}function _(I,N){return I.v-N.v}function x(I){return I.v}function A(I,N,F){return F===0?I.q1:Math.min(I.q1,N[Math.min(z.findBin(2.5*I.q1-1.5*I.q3,N,!0)+1,F-1)])}function E(I,N,F){return F===0?I.q3:Math.max(I.q3,N[Math.max(z.findBin(2.5*I.q3-1.5*I.q1,N),0)])}function D(I){return 4*I.q1-3*I.q3}function g(I){return 4*I.q3-3*I.q1}function C(I,N){return N===0?0:1.57*(I.q3-I.q1)/Math.sqrt(N)}}}),qE=U({"src/traces/box/cross_trace_calc.js"(pe,le){var w=Yu(),R=ii(),O=lT().getAxisGroup,z=["v","h"];function l(c,p){for(var f=c.calcdata,v=p.xaxis,h=p.yaxis,m=0;m<z.length;m++){for(var _=z[m],x=_==="h"?h:v,A=[],E=0;E<f.length;E++){var D=f[E],g=D[0].t,C=D[0].trace;C.visible===!0&&(C.type==="box"||C.type==="candlestick")&&!g.empty&&(C.orientation||"v")===_&&C.xaxis===v._id&&C.yaxis===h._id&&A.push(E)}u("box",c,A,x)}}function u(c,p,f,v){var h=p.calcdata,m=p._fullLayout,_=v._id,x=_.charAt(0),A,E,D,g=[],C=0;for(A=0;A<f.length;A++)for(D=h[f[A]],E=0;E<D.length;E++)g.push(v.c2l(D[E].pos,!0)),C+=(D[E].pts2||[]).length;if(g.length){var I=R.distinctVals(g);(v.type==="category"||v.type==="multicategory")&&(I.minDiff=1);var N=I.minDiff/2;w.minDtick(v,I.minDiff,I.vals[0],!0);var F=c==="violin"?"_numViolins":"_numBoxes",k=m[F],P=m[c+"mode"]==="group"&&k>1,T=1-m[c+"gap"],y=1-m[c+"groupgap"];for(A=0;A<f.length;A++){D=h[f[A]];var S=D[0].trace,M=D[0].t,W=S.width,$=S.side,Z,K,Q,J;if(W)Z=K=J=W/2,Q=0;else if(Z=N,P){var G=O(m,v._id)+S.orientation,ee=m._alignmentOpts[G]||{},re=ee[S.alignmentgroup]||{},fe=Object.keys(re.offsetGroups||{}).length,we=fe||k,Oe=fe?S._offsetIndex:M.num;K=Z*T*y/we,Q=2*Z*(-.5+(Oe+.5)/we)*T,J=Z*T/we}else K=Z*T*y,Q=0,J=Z;M.dPos=Z,M.bPos=Q,M.bdPos=K,M.wHover=J;var ke,Le,oe=Q+K,be,_e,he,De,xe,se,Ee=!!W,Te=(S.boxpoints||S.points)&&C>0;if($==="positive"?(ke=Z*(W?1:.5),be=oe,Le=be=Q):$==="negative"?(ke=be=Q,Le=Z*(W?1:.5),_e=oe):(ke=Le=Z,be=_e=oe),Te){var Be=S.pointpos,tt=S.jitter,at=S.marker.size/2,gt=0;Be+tt>=0&&(gt=oe*(Be+tt),gt>ke?(Ee=!0,xe=at,he=gt):gt>be&&(xe=at,he=ke)),gt<=ke&&(he=ke);var pt=0;Be-tt<=0&&(pt=-oe*(Be-tt),pt>Le?(Ee=!0,se=at,De=pt):pt>_e&&(se=at,De=Le)),pt<=Le&&(De=Le)}else he=ke,De=Le;var Rt=new Array(D.length);for(E=0;E<D.length;E++)Rt[E]=D[E].pos;S._extremes[_]=w.findExtremes(v,Rt,{padded:Ee,vpadminus:De,vpadplus:he,vpadLinearized:!0,ppadminus:{x:se,y:xe}[x],ppadplus:{x:xe,y:se}[x]})}}}le.exports={crossTraceCalc:l,setPositionOffset:u}}}),OA=U({"src/traces/box/plot.js"(pe,le){var w=Ze(),R=ii(),O=ec(),z=5,l=.01;function u(v,h,m,_){var x=v._context.staticPlot,A=h.xaxis,E=h.yaxis;R.makeTraceGroups(_,m,"trace boxes").each(function(D){var g=w.select(this),C=D[0],I=C.t,N=C.trace;if(I.wdPos=I.bdPos*N.whiskerwidth,N.visible!==!0||I.empty){g.remove();return}var F,k;N.orientation==="h"?(F=E,k=A):(F=A,k=E),c(g,{pos:F,val:k},N,I,x),p(g,{x:A,y:E},N,I),f(g,{pos:F,val:k},N,I)})}function c(v,h,m,_,x){var A=m.orientation==="h",E=h.val,D=h.pos,g=!!D.rangebreaks,C=_.bPos,I=_.wdPos||0,N=_.bPosPxOffset||0,F=m.whiskerwidth||0,k=m.showwhiskers!==!1,P=m.notched||!1,T=P?1-2*m.notchwidth:1,y,S;Array.isArray(_.bdPos)?(y=_.bdPos[0],S=_.bdPos[1]):(y=_.bdPos,S=_.bdPos);var M=v.selectAll("path.box").data(m.type!=="violin"||m.box.visible?R.identity:[]);M.enter().append("path").style("vector-effect",x?"none":"non-scaling-stroke").attr("class","box"),M.exit().remove(),M.each(function(W){if(W.empty)return w.select(this).attr("d","M0,0Z");var $=D.c2l(W.pos+C,!0),Z=D.l2p($-y)+N,K=D.l2p($+S)+N,Q=g?(Z+K)/2:D.l2p($)+N,J=m.whiskerwidth,G=g?Z*J+(1-J)*Q:D.l2p($-I)+N,ee=g?K*J+(1-J)*Q:D.l2p($+I)+N,re=D.l2p($-y*T)+N,fe=D.l2p($+S*T)+N,we=m.sizemode==="sd",Oe=E.c2p(we?W.mean-W.sd:W.q1,!0),ke=we?E.c2p(W.mean+W.sd,!0):E.c2p(W.q3,!0),Le=R.constrain(we?E.c2p(W.mean,!0):E.c2p(W.med,!0),Math.min(Oe,ke)+1,Math.max(Oe,ke)-1),oe=W.lf===void 0||m.boxpoints===!1||we,be=E.c2p(oe?W.min:W.lf,!0),_e=E.c2p(oe?W.max:W.uf,!0),he=E.c2p(W.ln,!0),De=E.c2p(W.un,!0);A?w.select(this).attr("d","M"+Le+","+re+"V"+fe+"M"+Oe+","+Z+"V"+K+(P?"H"+he+"L"+Le+","+fe+"L"+De+","+K:"")+"H"+ke+"V"+Z+(P?"H"+De+"L"+Le+","+re+"L"+he+","+Z:"")+"Z"+(k?"M"+Oe+","+Q+"H"+be+"M"+ke+","+Q+"H"+_e+(F===0?"":"M"+be+","+G+"V"+ee+"M"+_e+","+G+"V"+ee):"")):w.select(this).attr("d","M"+re+","+Le+"H"+fe+"M"+Z+","+Oe+"H"+K+(P?"V"+he+"L"+fe+","+Le+"L"+K+","+De:"")+"V"+ke+"H"+Z+(P?"V"+De+"L"+re+","+Le+"L"+Z+","+he:"")+"Z"+(k?"M"+Q+","+Oe+"V"+be+"M"+Q+","+ke+"V"+_e+(F===0?"":"M"+G+","+be+"H"+ee+"M"+G+","+_e+"H"+ee):""))})}function p(v,h,m,_){var x=h.x,A=h.y,E=_.bdPos,D=_.bPos,g=m.boxpoints||m.points;R.seedPseudoRandom();var C=function(F){return F.forEach(function(k){k.t=_,k.trace=m}),F},I=v.selectAll("g.points").data(g?C:[]);I.enter().append("g").attr("class","points"),I.exit().remove();var N=I.selectAll("path").data(function(F){var k,P=F.pts2,T=Math.max((F.max-F.min)/10,F.q3-F.q1),y=T*1e-9,S=T*l,M=[],W=0,$;if(m.jitter){if(T===0)for(W=1,M=new Array(P.length),k=0;k<P.length;k++)M[k]=1;else for(k=0;k<P.length;k++){var Z=Math.max(0,k-z),K=P[Z].v,Q=Math.min(P.length-1,k+z),J=P[Q].v;g!=="all"&&(P[k].v<F.lf?J=Math.min(J,F.lf):K=Math.max(K,F.uf));var G=Math.sqrt(S*(Q-Z)/(J-K+y))||0;G=R.constrain(Math.abs(G),0,1),M.push(G),W=Math.max(G,W)}$=m.jitter*2/(W||1)}for(k=0;k<P.length;k++){var ee=P[k],re=ee.v,fe=m.jitter?$*M[k]*(R.pseudoRandom()-.5):0,we=F.pos+D+E*(m.pointpos+fe);m.orientation==="h"?(ee.y=we,ee.x=re):(ee.x=we,ee.y=re),g==="suspectedoutliers"&&re<F.uo&&re>F.lo&&(ee.so=!0)}return P});N.enter().append("path").classed("point",!0),N.exit().remove(),N.call(O.translatePoints,x,A)}function f(v,h,m,_){var x=h.val,A=h.pos,E=!!A.rangebreaks,D=_.bPos,g=_.bPosPxOffset||0,C=m.boxmean||(m.meanline||{}).visible,I,N;Array.isArray(_.bdPos)?(I=_.bdPos[0],N=_.bdPos[1]):(I=_.bdPos,N=_.bdPos);var F=v.selectAll("path.mean").data(m.type==="box"&&m.boxmean||m.type==="violin"&&m.box.visible&&m.meanline.visible?R.identity:[]);F.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),F.exit().remove(),F.each(function(k){var P=A.c2l(k.pos+D,!0),T=A.l2p(P-I)+g,y=A.l2p(P+N)+g,S=E?(T+y)/2:A.l2p(P)+g,M=x.c2p(k.mean,!0),W=x.c2p(k.mean-k.sd,!0),$=x.c2p(k.mean+k.sd,!0);m.orientation==="h"?w.select(this).attr("d","M"+M+","+T+"V"+y+(C==="sd"?"m0,0L"+W+","+S+"L"+M+","+T+"L"+$+","+S+"Z":"")):w.select(this).attr("d","M"+T+","+M+"H"+y+(C==="sd"?"m0,0L"+S+","+W+"L"+T+","+M+"L"+S+","+$+"Z":""))})}le.exports={plot:u,plotBoxAndWhiskers:c,plotPoints:p,plotBoxMean:f}}}),NA=U({"src/traces/box/style.js"(pe,le){var w=Ze(),R=Lr(),O=ec();function z(u,c,p){var f=p||w.select(u).selectAll("g.trace.boxes");f.style("opacity",function(v){return v[0].trace.opacity}),f.each(function(v){var h=w.select(this),m=v[0].trace,_=m.line.width;function x(D,g,C,I){D.style("stroke-width",g+"px").call(R.stroke,C).call(R.fill,I)}var A=h.selectAll("path.box");if(m.type==="candlestick")A.each(function(D){if(!D.empty){var g=w.select(this),C=m[D.dir];x(g,C.line.width,C.line.color,C.fillcolor),g.style("opacity",m.selectedpoints&&!D.selected?.3:1)}});else{x(A,_,m.line.color,m.fillcolor),h.selectAll("path.mean").style({"stroke-width":_,"stroke-dasharray":2*_+"px,"+_+"px"}).call(R.stroke,m.line.color);var E=h.selectAll("path.point");O.pointStyle(E,m,u)}})}function l(u,c,p){var f=c[0].trace,v=p.selectAll("path.point");f.selectedpoints?O.selectedPointStyle(v,f):O.pointStyle(v,f,u)}le.exports={style:z,styleOnSelect:l}}}),FA=U({"src/traces/box/hover.js"(pe,le){var w=Yu(),R=ii(),O=Dp(),z=Lr(),l=R.fillText;function u(f,v,h,m){var _=f.cd,x=_[0].trace,A=x.hoveron,E=[],D;return A.indexOf("boxes")!==-1&&(E=E.concat(c(f,v,h,m))),A.indexOf("points")!==-1&&(D=p(f,v,h)),m==="closest"?D?[D]:E:(D&&E.push(D),E)}function c(f,v,h,m){var _=f.cd,x=f.xa,A=f.ya,E=_[0].trace,D=_[0].t,g=E.type==="violin",C,I,N,F,k,P,T,y,S,M,W,$=D.bdPos,Z,K,Q=D.wHover,J=function(pt){return N.c2l(pt.pos)+D.bPos-N.c2l(P)};g&&E.side!=="both"?(E.side==="positive"&&(S=function(pt){var Rt=J(pt);return O.inbox(Rt,Rt+Q,M)},Z=$,K=0),E.side==="negative"&&(S=function(pt){var Rt=J(pt);return O.inbox(Rt-Q,Rt,M)},Z=0,K=$)):(S=function(pt){var Rt=J(pt);return O.inbox(Rt-Q,Rt+Q,M)},Z=K=$);var G;g?G=function(pt){return O.inbox(pt.span[0]-k,pt.span[1]-k,M)}:G=function(pt){return O.inbox(pt.min-k,pt.max-k,M)},E.orientation==="h"?(k=v,P=h,T=G,y=S,C="y",N=A,I="x",F=x):(k=h,P=v,T=S,y=G,C="x",N=x,I="y",F=A);var ee=Math.min(1,$/Math.abs(N.r2c(N.range[1])-N.r2c(N.range[0])));M=f.maxHoverDistance-ee,W=f.maxSpikeDistance-ee;function re(pt){return(T(pt)+y(pt))/2}var fe=O.getDistanceFunction(m,T,y,re);if(O.getClosest(_,fe,f),f.index===!1)return[];var we=_[f.index],Oe=E.line.color,ke=(E.marker||{}).color;z.opacity(Oe)&&E.line.width?f.color=Oe:z.opacity(ke)&&E.boxpoints?f.color=ke:f.color=E.fillcolor,f[C+"0"]=N.c2p(we.pos+D.bPos-K,!0),f[C+"1"]=N.c2p(we.pos+D.bPos+Z,!0),f[C+"LabelVal"]=we.orig_p!==void 0?we.orig_p:we.pos;var Le=C+"Spike";f.spikeDistance=re(we)*W/M,f[Le]=N.c2p(we.pos,!0);var oe=E.boxmean||E.sizemode==="sd"||(E.meanline||{}).visible,be=E.boxpoints||E.points,_e=be&&oe?["max","uf","q3","med","mean","q1","lf","min"]:be&&!oe?["max","uf","q3","med","q1","lf","min"]:!be&&oe?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],he=F.range[1]<F.range[0];E.orientation===(he?"v":"h")&&_e.reverse();for(var De=f.spikeDistance,xe=f[Le],se=[],Ee=0;Ee<_e.length;Ee++){var Te=_e[Ee];if(Te in we){var Be=we[Te],tt=F.c2p(Be,!0),at=R.extendFlat({},f);at.attr=Te,at[I+"0"]=at[I+"1"]=tt,at[I+"LabelVal"]=Be,at[I+"Label"]=(D.labels?D.labels[Te]+" ":"")+w.hoverLabelText(F,Be,E[I+"hoverformat"]),at.hoverOnBox=!0,Te==="mean"&&"sd"in we&&(E.boxmean==="sd"||E.sizemode==="sd")&&(at[I+"err"]=we.sd),at.hovertemplate=!1,se.push(at)}}f.name="",f.spikeDistance=void 0,f[Le]=void 0;for(var gt=0;gt<se.length;gt++)se[gt].attr!=="med"?(se[gt].name="",se[gt].spikeDistance=void 0,se[gt][Le]=void 0):(se[gt].spikeDistance=De,se[gt][Le]=xe);return se}function p(f,v,h){for(var m=f.cd,_=f.xa,x=f.ya,A=m[0].trace,E=_.c2p(v),D=x.c2p(h),g,C=function(G){var ee=Math.max(3,G.mrc||0);return Math.max(Math.abs(_.c2p(G.x)-E)-ee,1-3/ee)},I=function(G){var ee=Math.max(3,G.mrc||0);return Math.max(Math.abs(x.c2p(G.y)-D)-ee,1-3/ee)},N=O.quadrature(C,I),F=!1,k,P,T=0;T<m.length;T++){k=m[T];for(var y=0;y<(k.pts||[]).length;y++){P=k.pts[y];var S=N(P);S<=f.distance&&(f.distance=S,F=[T,y])}}if(!F)return!1;k=m[F[0]],P=k.pts[F[1]];var M=_.c2p(P.x,!0),W=x.c2p(P.y,!0),$=P.mrc||1;g=R.extendFlat({},f,{index:P.i,color:(A.marker||{}).color,name:A.name,x0:M-$,x1:M+$,y0:W-$,y1:W+$,spikeDistance:f.distance,hovertemplate:A.hovertemplate});var Z=k.orig_p,K=Z!==void 0?Z:k.pos,Q;A.orientation==="h"?(Q=x,g.xLabelVal=P.x,g.yLabelVal=K):(Q=_,g.xLabelVal=K,g.yLabelVal=P.y);var J=Q._id.charAt(0);return g[J+"Spike"]=Q.c2p(k.pos,!0),l(P,A,g),g}le.exports={hoverPoints:u,hoverOnBoxes:c,hoverOnPoints:p}}}),zA=U({"src/traces/box/event_data.js"(pe,le){le.exports=function(R,O){return O.hoverOnBox&&(R.hoverOnBox=O.hoverOnBox),"xVal"in O&&(R.x=O.xVal),"yVal"in O&&(R.y=O.yVal),O.xa&&(R.xaxis=O.xa),O.ya&&(R.yaxis=O.ya),R}}}),Qk=U({"src/traces/box/select.js"(pe,le){le.exports=function(R,O){var z=R.cd,l=R.xaxis,u=R.yaxis,c=[],p,f;if(O===!1)for(p=0;p<z.length;p++)for(f=0;f<(z[p].pts||[]).length;f++)z[p].pts[f].selected=0;else for(p=0;p<z.length;p++)for(f=0;f<(z[p].pts||[]).length;f++){var v=z[p].pts[f],h=l.c2p(v.x),m=u.c2p(v.y);O.contains([h,m],null,v.i,R)?(c.push({pointNumber:v.i,x:l.c2d(v.x),y:u.c2d(v.y)}),v.selected=1):v.selected=0}return c}}}),uR=U({"src/traces/box/index.js"(pe,le){le.exports={attributes:HE(),layoutAttributes:jE(),supplyDefaults:VE().supplyDefaults,crossTraceDefaults:VE().crossTraceDefaults,supplyLayoutDefaults:tw().supplyLayoutDefaults,calc:lR(),crossTraceCalc:qE().crossTraceCalc,plot:OA().plot,style:NA().style,styleOnSelect:NA().styleOnSelect,hoverPoints:FA().hoverPoints,eventData:zA(),selectPoints:Qk(),moduleType:"trace",name:"box",basePlotModule:Rf(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","boxLayout","zoomScale"],meta:{}}}}),cR=U({"lib/box.js"(pe,le){le.exports=uR()}}),GE=U({"src/traces/heatmap/attributes.js"(pe,le){var w=Kc(),R=Jn(),O=Ir(),z=Wp().axisHoverFormat,l=Js().hovertemplateAttrs,u=Js().texttemplateAttrs,c=Jd(),p=Ar().extendFlat;le.exports=p({z:{valType:"data_array",editType:"calc"},x:p({},w.x,{impliedEdits:{xtype:"array"}}),x0:p({},w.x0,{impliedEdits:{xtype:"scaled"}}),dx:p({},w.dx,{impliedEdits:{xtype:"scaled"}}),y:p({},w.y,{impliedEdits:{ytype:"array"}}),y0:p({},w.y0,{impliedEdits:{ytype:"scaled"}}),dy:p({},w.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:p({},w.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:p({},w.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:p({},w.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:p({},w.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:p({},w.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:p({},w.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:z("x"),yhoverformat:z("y"),zhoverformat:z("z",1),hovertemplate:l(),texttemplate:u({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),textfont:O({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:p({},R.showlegend,{dflt:!1}),zorder:w.zorder},c("",{cLetter:"z",autoColorDflt:!1}))}}),$E=U({"src/traces/heatmap/xyz_defaults.js"(pe,le){var w=_t(),R=ii(),O=Mi();le.exports=function(c,p,f,v,h,m){var _=f("z");h=h||"x",m=m||"y";var x,A;if(_===void 0||!_.length)return 0;if(R.isArray1D(_)){x=f(h),A=f(m);var E=R.minRowLength(x),D=R.minRowLength(A);if(E===0||D===0)return 0;p._length=Math.min(E,D,_.length)}else{if(x=z(h,f),A=z(m,f),!l(_))return 0;f("transpose"),p._length=null}var g=O.getComponentMethod("calendars","handleTraceDefaults");return g(c,p,[h,m],v),!0};function z(u,c){var p=c(u),f=p?c(u+"type","array"):"scaled";return f==="scaled"&&(c(u+"0"),c("d"+u)),p}function l(u){for(var c=!0,p=!1,f=!1,v,h=0;h<u.length;h++){if(v=u[h],!R.isArrayOrTypedArray(v)){c=!1;break}v.length>0&&(p=!0);for(var m=0;m<v.length;m++)if(w(v[m])){f=!0;break}}return c&&p&&f}}}),BA=U({"src/traces/heatmap/label_defaults.js"(pe,le){var w=ii();le.exports=function(O,z){O("texttemplate");var l=w.extendFlat({},z.font,{color:"auto",size:"auto"});w.coerceFont(O,"textfont",l)}}}),WE=U({"src/traces/heatmap/style_defaults.js"(pe,le){le.exports=function(R,O,z){var l=z("zsmooth");l===!1&&(z("xgap"),z("ygap")),z("zhoverformat")}}}),fR=U({"src/traces/heatmap/defaults.js"(pe,le){var w=ii(),R=$E(),O=BA(),z=R1(),l=WE(),u=wg(),c=GE();le.exports=function(f,v,h,m){function _(A,E){return w.coerce(f,v,c,A,E)}var x=R(f,v,_,m);if(!x){v.visible=!1;return}z(f,v,m,_),_("xhoverformat"),_("yhoverformat"),_("text"),_("hovertext"),_("hovertemplate"),O(_,m),l(f,v,_,m),_("hoverongaps"),_("connectgaps",w.isArray1D(v.z)&&v.zsmooth!==!1),u(f,v,m,_,{prefix:"",cLetter:"z"}),_("zorder")}}}),UA=U({"src/traces/histogram/bin_functions.js"(pe,le){var w=_t();le.exports={count:function(R,O,z){return z[R]++,1},sum:function(R,O,z,l){var u=l[O];return w(u)?(u=Number(u),z[R]+=u,u):0},avg:function(R,O,z,l,u){var c=l[O];return w(c)&&(c=Number(c),z[R]+=c,u[R]++),0},min:function(R,O,z,l){var u=l[O];if(w(u))if(u=Number(u),w(z[R])){if(z[R]>u){var c=u-z[R];return z[R]=u,c}}else return z[R]=u,u;return 0},max:function(R,O,z,l){var u=l[O];if(w(u))if(u=Number(u),w(z[R])){if(z[R]<u){var c=u-z[R];return z[R]=u,c}}else return z[R]=u,u;return 0}}}}),dR=U({"src/traces/histogram/norm_functions.js"(pe,le){le.exports={percent:function(w,R){for(var O=w.length,z=100/R,l=0;l<O;l++)w[l]*=z},probability:function(w,R){for(var O=w.length,z=0;z<O;z++)w[z]/=R},density:function(w,R,O,z){var l=w.length;z=z||1;for(var u=0;u<l;u++)w[u]*=O[u]*z},"probability density":function(w,R,O,z){var l=w.length;z&&(R/=z);for(var u=0;u<l;u++)w[u]*=O[u]/R}}}}),wM=U({"src/traces/histogram/average.js"(pe,le){le.exports=function(R,O){for(var z=R.length,l=0,u=0;u<z;u++)O[u]?(R[u]/=O[u],l+=R[u]):R[u]=null;return l}}}),Gd=U({"src/traces/histogram/bin_label_vals.js"(pe,le){var w=Dt(),R=w.ONEAVGYEAR,O=w.ONEAVGMONTH,z=w.ONEDAY,l=w.ONEHOUR,u=w.ONEMIN,c=w.ONESEC,p=Yu().tickIncrement;le.exports=function(x,A,E,D,g){var C=-1.1*A,I=-.1*A,N=x-I,F=E[0],k=E[1],P=Math.min(f(F+I,F+N,D,g),f(k+I,k+N,D,g)),T=Math.min(f(F+C,F+I,D,g),f(k+C,k+I,D,g)),y,S;if(P>T&&T<Math.abs(k-F)/4e3?(y=P,S=!1):(y=Math.min(P,T),S=!0),D.type==="date"&&y>z){var M=y===R?1:6,W=y===R?"M12":"M1";return function($,Z){var K=D.c2d($,R,g),Q=K.indexOf("-",M);Q>0&&(K=K.substr(0,Q));var J=D.d2c(K,0,g);if(J<$){var G=p(J,W,!1,g);(J+G)/2<$+x&&(J=G)}return Z&&S?p(J,W,!0,g):J}}return function($,Z){var K=y*Math.round($/y);return K+y/10<$&&K+y*.9<$+x&&(K+=y),Z&&S&&(K-=y),K}};function f(_,x,A,E){if(_*x<=0)return 1/0;for(var D=Math.abs(x-_),g=A.type==="date",C=v(D,g),I=0;I<10;I++){var N=v(C*80,g);if(C===N)break;if(h(N,_,x,g,A,E))C=N;else break}return C}function v(_,x){return x&&_>c?_>z?_>R*1.1?R:_>O*1.1?O:z:_>l?l:_>u?u:c:Math.pow(10,Math.floor(Math.log(_)/Math.LN10))}function h(_,x,A,E,D,g){if(E&&_>z){var C=m(x,D,g),I=m(A,D,g),N=_===R?0:1;return C[N]!==I[N]}return Math.floor(A/_)-Math.floor(x/_)>.1}function m(_,x,A){var E=x.c2d(_,R,A).split("-");return E[0]===""&&(E.unshift(),E[0]="-"+E[0]),E}}}),_T=U({"src/traces/histogram/calc.js"(pe,le){var w=_t(),R=ii(),O=Mi(),z=Yu(),{hasColorscale:l}=Ug(),u=t0(),c=UE(),p=UA(),f=dR(),v=wM(),h=Gd();function m(D,g){var C=[],I=[],N=g.orientation==="h",F=z.getFromId(D,N?g.yaxis:g.xaxis),k=N?"y":"x",P={x:"y",y:"x"}[k],T=g[k+"calendar"],y=g.cumulative,S,M=_(D,g,F,k),W=M[0],$=M[1],Z=typeof W.size=="string",K=[],Q=Z?K:W,J=[],G=[],ee=[],re=0,fe=g.histnorm,we=g.histfunc,Oe=fe.indexOf("density")!==-1,ke,Le,oe;y.enabled&&Oe&&(fe=fe.replace(/ ?density$/,""),Oe=!1);var be=we==="max"||we==="min",_e=be?null:0,he=p.count,De=f[fe],xe=!1,se=function(xt){return F.r2c(xt,0,T)},Ee;for(R.isArrayOrTypedArray(g[P])&&we!=="count"&&(Ee=g[P],xe=we==="avg",he=p[we]),S=se(W.start),Le=se(W.end)+(S-z.tickIncrement(S,W.size,!1,T))/1e6;S<Le&&C.length<1e6&&(ke=z.tickIncrement(S,W.size,!1,T),C.push((S+ke)/2),I.push(_e),ee.push([]),K.push(S),Oe&&J.push(1/(ke-S)),xe&&G.push(0),!(ke<=S));)S=ke;K.push(S),!Z&&F.type==="date"&&(Q={start:se(Q.start),end:se(Q.end),size:Q.size}),D._fullLayout._roundFnOpts||(D._fullLayout._roundFnOpts={});var Te=g["_"+k+"bingroup"],Be={leftGap:1/0,rightGap:1/0};Te&&(D._fullLayout._roundFnOpts[Te]||(D._fullLayout._roundFnOpts[Te]=Be),Be=D._fullLayout._roundFnOpts[Te]);var tt=I.length,at=!0,gt=Be.leftGap,pt=Be.rightGap,Rt={};for(S=0;S<$.length;S++){var $t=$[S];oe=R.findBin($t,Q),oe>=0&&oe<tt&&(re+=he(oe,S,I,Ee,G),at&&ee[oe].length&&$t!==$[ee[oe][0]]&&(at=!1),ee[oe].push(S),Rt[S]=oe,gt=Math.min(gt,$t-K[oe]),pt=Math.min(pt,K[oe+1]-$t))}Be.leftGap=gt,Be.rightGap=pt;var Wt;at||(Wt=function(xt,Gt){return function(){var Jt=D._fullLayout._roundFnOpts[Te];return h(Jt.leftGap,Jt.rightGap,K,F,T)(xt,Gt)}}),xe&&(re=v(I,G)),De&&De(I,re,J),y.enabled&&E(I,y.direction,y.currentbin);var Ht=Math.min(C.length,I.length),Ft=[],st=0,rt=Ht-1;for(S=0;S<Ht;S++)if(I[S]){st=S;break}for(S=Ht-1;S>=st;S--)if(I[S]){rt=S;break}for(S=st;S<=rt;S++)if(w(C[S])&&w(I[S])){var Ue={p:C[S],s:I[S],b:0};y.enabled||(Ue.pts=ee[S],at?Ue.ph0=Ue.ph1=ee[S].length?$[ee[S][0]]:C[S]:(g._computePh=!0,Ue.ph0=Wt(K[S]),Ue.ph1=Wt(K[S+1],!0))),Ft.push(Ue)}return Ft.length===1&&(Ft[0].width1=z.tickIncrement(Ft[0].p,W.size,!1,T)-Ft[0].p),l(g,"marker")&&u(D,g,{vals:g.marker.color,containerStr:"marker",cLetter:"c"}),l(g,"marker.line")&&u(D,g,{vals:g.marker.line.color,containerStr:"marker.line",cLetter:"c"}),c(Ft,g),R.isArrayOrTypedArray(g.selectedpoints)&&R.tagSelected(Ft,g,Rt),Ft}function _(D,g,C,I,N){var F=I+"bins",k=D._fullLayout,P=g["_"+I+"bingroup"],T=k._histogramBinOpts[P],y=k.barmode==="overlay",S,M,W,$,Z,K,Q,J=function($t){return C.r2c($t,0,$)},G=function($t){return C.c2r($t,0,$)},ee=C.type==="date"?function($t){return $t||$t===0?R.cleanDate($t,null,$):null}:function($t){return w($t)?Number($t):null};function re($t,Wt,Ht){Wt[$t+"Found"]?(Wt[$t]=ee(Wt[$t]),Wt[$t]===null&&(Wt[$t]=Ht[$t])):(K[$t]=Wt[$t]=Ht[$t],R.nestedProperty(M[0],F+"."+$t).set(Ht[$t]))}if(g["_"+I+"autoBinFinished"])delete g["_"+I+"autoBinFinished"];else{M=T.traces;var fe=[],we=!0,Oe=!1,ke=!1;for(S=0;S<M.length;S++)if(W=M[S],W.visible){var Le=T.dirs[S];Z=W["_"+Le+"pos0"]=C.makeCalcdata(W,Le),fe=R.concat(fe,Z),delete W["_"+I+"autoBinFinished"],g.visible===!0&&(we?we=!1:(delete W._autoBin,W["_"+I+"autoBinFinished"]=1),O.traceIs(W,"2dMap")&&(Oe=!0),W.type==="histogram2dcontour"&&(ke=!0))}$=M[0][I+"calendar"];var oe=z.autoBin(fe,C,T.nbins,Oe,$,T.sizeFound&&T.size),be=M[0]._autoBin={};if(K=be[T.dirs[0]]={},ke&&(T.size||(oe.start=G(z.tickIncrement(J(oe.start),oe.size,!0,$))),T.end===void 0&&(oe.end=G(z.tickIncrement(J(oe.end),oe.size,!1,$)))),y&&!O.traceIs(g,"2dMap")&&oe._dataSpan===0&&C.type!=="category"&&C.type!=="multicategory"&&g.bingroup===""&&typeof g.xbins>"u"){if(N)return[oe,Z,!0];oe=x(D,g,C,I,F)}Q=W.cumulative||{},Q.enabled&&Q.currentbin!=="include"&&(Q.direction==="decreasing"?oe.start=G(z.tickIncrement(J(oe.start),oe.size,!0,$)):oe.end=G(z.tickIncrement(J(oe.end),oe.size,!1,$))),T.size=oe.size,T.sizeFound||(K.size=oe.size,R.nestedProperty(M[0],F+".size").set(oe.size)),re("start",T,oe),re("end",T,oe)}Z=g["_"+I+"pos0"],delete g["_"+I+"pos0"];var _e=g._input[F]||{},he=R.extendFlat({},T),De=T.start,xe=C.r2l(_e.start),se=xe!==void 0;if((T.startFound||se)&&xe!==C.r2l(De)){var Ee=se?xe:R.aggNums(Math.min,null,Z),Te={type:C.type==="category"||C.type==="multicategory"?"linear":C.type,r2l:C.r2l,dtick:T.size,tick0:De,calendar:$,range:[Ee,z.tickIncrement(Ee,T.size,!1,$)].map(C.l2r)},Be=z.tickFirst(Te);Be>C.r2l(Ee)&&(Be=z.tickIncrement(Be,T.size,!0,$)),he.start=C.l2r(Be),se||R.nestedProperty(g,F+".start").set(he.start)}var tt=T.end,at=C.r2l(_e.end),gt=at!==void 0;if((T.endFound||gt)&&at!==C.r2l(tt)){var pt=gt?at:R.aggNums(Math.max,null,Z);he.end=C.l2r(pt),gt||R.nestedProperty(g,F+".start").set(he.end)}var Rt="autobin"+I;return g._input[Rt]===!1&&(g._input[F]=R.extendFlat({},g[F]||{}),delete g._input[Rt],delete g[Rt]),[he,Z]}function x(D,g,C,I,N){var F=D._fullLayout,k=A(D,g),P=!1,T=1/0,y=[g],S,M,W;for(S=0;S<k.length;S++)if(M=k[S],M===g)P=!0;else if(!P)W=F._histogramBinOpts[M["_"+I+"bingroup"]],T=Math.min(T,W.size||M[N].size);else{var $=_(D,M,C,I,!0),Z=$[0],K=$[2];M["_"+I+"autoBinFinished"]=1,M["_"+I+"pos0"]=$[1],K?y.push(M):T=Math.min(T,Z.size)}var Q=new Array(y.length);for(S=0;S<y.length;S++)for(var J=y[S]["_"+I+"pos0"],G=0;G<J.length;G++)if(J[G]!==void 0){Q[S]=J[G];break}for(isFinite(T)||(T=R.distinctVals(Q).minDiff),S=0;S<y.length;S++){M=y[S];var ee=M[I+"calendar"],re={start:C.c2r(Q[S]-T/2,0,ee),end:C.c2r(Q[S]+T/2,0,ee),size:T};M._input[N]=M[N]=re,W=F._histogramBinOpts[M["_"+I+"bingroup"]],W&&R.extendFlat(W,re)}return g[N]}function A(D,g){for(var C=g.xaxis,I=g.yaxis,N=g.orientation,F=[],k=D._fullData,P=0;P<k.length;P++){var T=k[P];T.type==="histogram"&&T.visible===!0&&T.orientation===N&&T.xaxis===C&&T.yaxis===I&&F.push(T)}return F}function E(D,g,C){var I,N,F;function k(T){F=D[T],D[T]/=2}function P(T){N=D[T],D[T]=F+N/2,F+=N}if(C==="half")if(g==="increasing")for(k(0),I=1;I<D.length;I++)P(I);else for(k(D.length-1),I=D.length-2;I>=0;I--)P(I);else if(g==="increasing"){for(I=1;I<D.length;I++)D[I]+=D[I-1];C==="exclude"&&(D.unshift(0),D.pop())}else{for(I=D.length-2;I>=0;I--)D[I]+=D[I+1];C==="exclude"&&(D.push(0),D.shift())}}le.exports={calc:m,calcAllAutoBins:_}}}),HA=U({"src/traces/histogram2d/calc.js"(pe,le){var w=ii(),R=Yu(),O=UA(),z=dR(),l=wM(),u=Gd(),c=_T().calcAllAutoBins;le.exports=function(m,_){var x=R.getFromId(m,_.xaxis),A=R.getFromId(m,_.yaxis),E=_.xcalendar,D=_.ycalendar,g=function(St){return x.r2c(St,0,E)},C=function(St){return A.r2c(St,0,D)},I=function(St){return x.c2r(St,0,E)},N=function(St){return A.c2r(St,0,D)},F,k,P,T,y=c(m,_,x,"x"),S=y[0],M=y[1],W=c(m,_,A,"y"),$=W[0],Z=W[1],K=_._length;M.length>K&&M.splice(K,M.length-K),Z.length>K&&Z.splice(K,Z.length-K);var Q=[],J=[],G=[],ee=typeof S.size=="string",re=typeof $.size=="string",fe=[],we=[],Oe=ee?fe:S,ke=re?we:$,Le=0,oe=[],be=[],_e=_.histnorm,he=_.histfunc,De=_e.indexOf("density")!==-1,xe=he==="max"||he==="min",se=xe?null:0,Ee=O.count,Te=z[_e],Be=!1,tt=[],at=[],gt="z"in _?_.z:"marker"in _&&Array.isArray(_.marker.color)?_.marker.color:"";gt&&he!=="count"&&(Be=he==="avg",Ee=O[he]);var pt=S.size,Rt=g(S.start),$t=g(S.end)+(Rt-R.tickIncrement(Rt,pt,!1,E))/1e6;for(F=Rt;F<$t;F=R.tickIncrement(F,pt,!1,E))J.push(se),fe.push(F),Be&&G.push(0);fe.push(F);var Wt=J.length,Ht=(F-Rt)/Wt,Ft=I(Rt+Ht/2),st=$.size,rt=C($.start),Ue=C($.end)+(rt-R.tickIncrement(rt,st,!1,D))/1e6;for(F=rt;F<Ue;F=R.tickIncrement(F,st,!1,D)){Q.push(J.slice()),we.push(F);var xt=new Array(Wt);for(k=0;k<Wt;k++)xt[k]=[];be.push(xt),Be&&oe.push(G.slice())}we.push(F);var Gt=Q.length,Jt=(F-rt)/Gt,Ut=N(rt+Jt/2);De&&(tt=p(J.length,Oe,Ht,ee),at=p(Q.length,ke,Jt,re)),!ee&&x.type==="date"&&(Oe=f(g,Oe)),!re&&A.type==="date"&&(ke=f(C,ke));var kr=!0,Pr=!0,$r=new Array(Wt),rn=new Array(Gt),kn=1/0,Rn=1/0,ci=1/0,In=1/0;for(F=0;F<K;F++){var Gn=M[F],mr=Z[F];P=w.findBin(Gn,Oe),T=w.findBin(mr,ke),P>=0&&P<Wt&&T>=0&&T<Gt&&(Le+=Ee(P,F,Q[T],gt,oe[T]),be[T][P].push(F),kr&&($r[P]===void 0?$r[P]=Gn:$r[P]!==Gn&&(kr=!1)),Pr&&(rn[T]===void 0?rn[T]=mr:rn[T]!==mr&&(Pr=!1)),kn=Math.min(kn,Gn-fe[P]),Rn=Math.min(Rn,fe[P+1]-Gn),ci=Math.min(ci,mr-we[T]),In=Math.min(In,we[T+1]-mr))}if(Be)for(T=0;T<Gt;T++)Le+=l(Q[T],oe[T]);if(Te)for(T=0;T<Gt;T++)Te(Q[T],Le,tt,at[T]);return{x:M,xRanges:v(fe,kr&&$r,kn,Rn,x,E),x0:Ft,dx:Ht,y:Z,yRanges:v(we,Pr&&rn,ci,In,A,D),y0:Ut,dy:Jt,z:Q,pts:be}};function p(h,m,_,x){var A=new Array(h),E;if(x)for(E=0;E<h;E++)A[E]=1/(m[E+1]-m[E]);else{var D=1/_;for(E=0;E<h;E++)A[E]=D}return A}function f(h,m){return{start:h(m.start),end:h(m.end),size:m.size}}function v(h,m,_,x,A,E){var D,g=h.length-1,C=new Array(g),I=u(_,x,h,A,E);for(D=0;D<g;D++){var N=(m||[])[D];C[D]=N===void 0?[I(h[D]),I(h[D+1],!0)]:[N,N]}return C}}}),a2=U({"src/traces/heatmap/convert_column_xyz.js"(pe,le){var w=ii(),R=Dt().BADNUM,O=Zy();le.exports=function(l,u,c,p,f,v){var h=l._length,m=u.makeCalcdata(l,p),_=c.makeCalcdata(l,f);m=O(l,u,p,m).vals,_=O(l,c,f,_).vals;var x=l.text,A=x!==void 0&&w.isArray1D(x),E=l.hovertext,D=E!==void 0&&w.isArray1D(E),g,C,I=w.distinctVals(m),N=I.vals,F=w.distinctVals(_),k=F.vals,P=[],T,y,S=k.length,M=N.length;for(g=0;g<v.length;g++)P[g]=w.init2dArray(S,M);A&&(T=w.init2dArray(S,M)),D&&(y=w.init2dArray(S,M));var W=w.init2dArray(S,M);for(g=0;g<h;g++)if(m[g]!==R&&_[g]!==R){var $=w.findBin(m[g]+I.minDiff/2,N),Z=w.findBin(_[g]+F.minDiff/2,k);for(C=0;C<v.length;C++){var K=v[C],Q=l[K],J=P[C];J[Z][$]=Q[g],W[Z][$]=g}A&&(T[Z][$]=x[g]),D&&(y[Z][$]=E[g])}for(l["_"+p]=N,l["_"+f]=k,C=0;C<v.length;C++)l["_"+v[C]]=P[C];A&&(l._text=T),D&&(l._hovertext=y),u&&u.type==="category"&&(l["_"+p+"CategoryMap"]=N.map(function(G){return u._categories[G]})),c&&c.type==="category"&&(l["_"+f+"CategoryMap"]=k.map(function(G){return c._categories[G]})),l._after2before=W}}}),wT=U({"src/traces/heatmap/clean_2d_array.js"(pe,le){var w=_t(),R=ii(),O=Dt().BADNUM;le.exports=function(l,u,c,p){var f,v,h,m,_,x;function A(N){if(w(N))return+N}if(u&&u.transpose){for(f=0,_=0;_<l.length;_++)f=Math.max(f,l[_].length);if(f===0)return!1;h=function(N){return N.length},m=function(N,F,k){return(N[k]||[])[F]}}else f=l.length,h=function(N,F){return N[F].length},m=function(N,F,k){return(N[F]||[])[k]};var E=function(N,F,k){return F===O||k===O?O:m(N,F,k)};function D(N){if(u&&u.type!=="carpet"&&u.type!=="contourcarpet"&&N&&N.type==="category"&&u["_"+N._id.charAt(0)].length){var F=N._id.charAt(0),k={},P=u["_"+F+"CategoryMap"]||u[F];for(_=0;_<P.length;_++)k[P[_]]=_;return function(T){var y=k[N._categories[T]];return y+1?y:O}}else return R.identity}var g=D(c),C=D(p);p&&p.type==="category"&&(f=p._categories.length);var I=new Array(f);for(_=0;_<f;_++)for(c&&c.type==="category"?v=c._categories.length:v=h(l,_),I[_]=new Array(v),x=0;x<v;x++)I[_][x]=A(E(l,C(_),g(x)));return I}}}),sS=U({"src/traces/heatmap/interp2d.js"(pe,le){var w=ii(),R=.01,O=[[-1,0],[1,0],[0,-1],[0,1]];function z(u){return .5-.25*Math.min(1,u*.5)}le.exports=function(c,p){var f=1,v;for(l(c,p),v=0;v<p.length&&!(p[v][2]<4);v++);for(p=p.slice(v),v=0;v<100&&f>R;v++)f=l(c,p,z(f));return f>R&&w.log("interp2d didn't converge quickly",f),c};function l(u,c,p){var f=0,v,h,m,_,x,A,E,D,g,C,I,N,F;for(_=0;_<c.length;_++){for(v=c[_],h=v[0],m=v[1],I=u[h][m],C=0,g=0,x=0;x<4;x++)A=O[x],E=u[h+A[0]],E&&(D=E[m+A[1]],D!==void 0&&(C===0?N=F=D:(N=Math.min(N,D),F=Math.max(F,D)),g++,C+=D));if(g===0)throw"iterateInterp2d order is wrong: no defined neighbors";u[h][m]=C/g,I===void 0?g<4&&(f=1):(u[h][m]=(1+p)*u[h][m]-p*I,F>N&&(f=Math.max(f,Math.abs(u[h][m]-I)/(F-N))))}return f}}}),jA=U({"src/traces/heatmap/find_empties.js"(pe,le){var w=ii().maxRowLength;le.exports=function(O){var z=[],l={},u=[],c=O[0],p=[],f=[0,0,0],v=w(O),h,m,_,x,A,E,D,g;for(m=0;m<O.length;m++)for(h=p,p=c,c=O[m+1]||[],_=0;_<v;_++)p[_]===void 0&&(E=(p[_-1]!==void 0?1:0)+(p[_+1]!==void 0?1:0)+(h[_]!==void 0?1:0)+(c[_]!==void 0?1:0),E?(m===0&&E++,_===0&&E++,m===O.length-1&&E++,_===p.length-1&&E++,E<4&&(l[[m,_]]=[m,_,E]),z.push([m,_,E])):u.push([m,_]));for(;u.length;){for(D={},g=!1,A=u.length-1;A>=0;A--)x=u[A],m=x[0],_=x[1],E=((l[[m-1,_]]||f)[2]+(l[[m+1,_]]||f)[2]+(l[[m,_-1]]||f)[2]+(l[[m,_+1]]||f)[2])/20,E&&(D[x]=[m,_,E],u.splice(A,1),g=!0);if(!g)throw"findEmpties iterated with no new neighbors";for(x in D)l[x]=D[x],z.push(D[x])}return z.sort(function(C,I){return I[2]-C[2]})}}}),D1=U({"src/traces/heatmap/make_bound_array.js"(pe,le){var w=Mi(),R=ii().isArrayOrTypedArray;le.exports=function(z,l,u,c,p,f){var v=[],h=w.traceIs(z,"contour"),m=w.traceIs(z,"histogram"),_,x,A,E=R(l)&&l.length>1;if(E&&!m&&f.type!=="category"){var D=l.length;if(D<=p){if(h)v=Array.from(l).slice(0,p);else if(p===1)f.type==="log"?v=[.5*l[0],2*l[0]]:v=[l[0]-.5,l[0]+.5];else if(f.type==="log"){for(v=[Math.pow(l[0],1.5)/Math.pow(l[1],.5)],A=1;A<D;A++)v.push(Math.sqrt(l[A-1]*l[A]));v.push(Math.pow(l[D-1],1.5)/Math.pow(l[D-2],.5))}else{for(v=[1.5*l[0]-.5*l[1]],A=1;A<D;A++)v.push((l[A-1]+l[A])*.5);v.push(1.5*l[D-1]-.5*l[D-2])}if(D<p){var g=v[v.length-1],C;if(f.type==="log")for(C=g/v[v.length-2],A=D;A<p;A++)g*=C,v.push(g);else for(C=g-v[v.length-2],A=D;A<p;A++)g+=C,v.push(g)}}else return h?l.slice(0,p):l.slice(0,p+1)}else{var I=z[f._id.charAt(0)+"calendar"];if(m)_=f.r2c(u,0,I);else if(R(l)&&l.length===1)_=l[0];else if(u===void 0)_=0;else{var N=f.type==="log"?f.d2c:f.r2c;_=N(u,0,I)}for(x=c||1,A=h?0:-.5;A<p;A++)v.push(_+x*A)}return v}}}),YE=U({"src/traces/heatmap/calc.js"(pe,le){var w=Mi(),R=ii(),O=Yu(),z=Zy(),l=HA(),u=t0(),c=a2(),p=wT(),f=sS(),v=jA(),h=D1(),m=Dt().BADNUM;le.exports=function(E,D){var g=O.getFromId(E,D.xaxis||"x"),C=O.getFromId(E,D.yaxis||"y"),I=w.traceIs(D,"contour"),N=w.traceIs(D,"histogram"),F=I?"best":D.zsmooth,k,P,T,y,S,M,W,$,Z,K,Q;if(g._minDtick=0,C._minDtick=0,N)Q=l(E,D),y=Q.orig_x,k=Q.x,P=Q.x0,T=Q.dx,$=Q.orig_y,S=Q.y,M=Q.y0,W=Q.dy,Z=Q.z;else{var J=D.z;R.isArray1D(J)?(c(D,g,C,"x","y",["z"]),k=D._x,S=D._y,J=D._z):(y=D.x?g.makeCalcdata(D,"x"):[],$=D.y?C.makeCalcdata(D,"y"):[],k=z(D,g,"x",y).vals,S=z(D,C,"y",$).vals,D._x=k,D._y=S),P=D.x0,T=D.dx,M=D.y0,W=D.dy,Z=p(J,D,g,C)}(g.rangebreaks||C.rangebreaks)&&(Z=x(k,S,Z),N||(k=_(k),S=_(S),D._x=k,D._y=S)),!N&&(I||D.connectgaps)&&(D._emptypoints=v(Z),f(Z,D._emptypoints));function G(be){F=D._input.zsmooth=D.zsmooth=!1,R.warn('cannot use zsmooth: "fast": '+be)}function ee(be){if(be.length>1){var _e=(be[be.length-1]-be[0])/(be.length-1),he=Math.abs(_e/100);for(K=0;K<be.length-1;K++)if(Math.abs(be[K+1]-be[K]-_e)>he)return!1}return!0}D._islinear=!1,g.type==="log"||C.type==="log"?F==="fast"&&G("log axis found"):ee(k)?ee(S)?D._islinear=!0:F==="fast"&&G("y scale is not linear"):F==="fast"&&G("x scale is not linear");var re=R.maxRowLength(Z),fe=D.xtype==="scaled"?"":k,we=h(D,fe,P,T,re,g),Oe=D.ytype==="scaled"?"":S,ke=h(D,Oe,M,W,Z.length,C);D._extremes[g._id]=O.findExtremes(g,we),D._extremes[C._id]=O.findExtremes(C,ke);var Le={x:we,y:ke,z:Z,text:D._text||D.text,hovertext:D._hovertext||D.hovertext};if(D.xperiodalignment&&y&&(Le.orig_x=y),D.yperiodalignment&&$&&(Le.orig_y=$),fe&&fe.length===we.length-1&&(Le.xCenter=fe),Oe&&Oe.length===ke.length-1&&(Le.yCenter=Oe),N&&(Le.xRanges=Q.xRanges,Le.yRanges=Q.yRanges,Le.pts=Q.pts),I||u(E,D,{vals:Z,cLetter:"z"}),I&&D.contours&&D.contours.coloring==="heatmap"){var oe={type:D.type==="contour"?"heatmap":"histogram2d",xcalendar:D.xcalendar,ycalendar:D.ycalendar};Le.xfill=h(oe,fe,P,T,re,g),Le.yfill=h(oe,Oe,M,W,Z.length,C)}return[Le]};function _(A){for(var E=[],D=A.length,g=0;g<D;g++){var C=A[g];C!==m&&E.push(C)}return E}function x(A,E,D){for(var g=[],C=-1,I=0;I<D.length;I++)if(E[I]!==m){C++,g[C]=[];for(var N=0;N<D[I].length;N++)A[N]!==m&&g[C].push(D[I][N])}return g}}}),o2=U({"src/constants/pixelated_image.js"(pe){pe.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"]],pe.STYLE=pe.CSS_DECLARATIONS.map(function(le){return le.join(": ")+"; "}).join("")}}),VA=U({"src/lib/supports_pixelated_image.js"(pe,le){var w=o2(),R=ec(),O=ii(),z=null;function l(){if(z!==null)return z;z=!1;var u=O.isSafari()||O.isMacWKWebView()||O.isIOS();if(window.navigator.userAgent&&!u){var c=Array.from(w.CSS_DECLARATIONS).reverse(),p=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof p=="function")z=c.some(function(m){return p.apply(null,m)});else{var f=R.tester.append("image").attr("style",w.STYLE),v=window.getComputedStyle(f.node()),h=v.imageRendering;z=c.some(function(m){var _=m[1];return h===_||h===_.toLowerCase()}),f.remove()}}return z}le.exports=l}}),qA=U({"src/traces/heatmap/plot.js"(pe,le){var w=Ze(),R=or(),O=Mi(),z=ec(),l=Yu(),u=ii(),c=ah(),p=AA(),f=Lr(),v=vd().extractOpts,h=vd().makeColorScaleFuncFromTrace,m=E1(),_=tg(),x=_.LINE_SPACING,A=VA(),E=o2().STYLE,D="heatmap-label";function g(k){return k.selectAll("g."+D)}function C(k){g(k).remove()}le.exports=function(k,P,T,y){var S=P.xaxis,M=P.yaxis;u.makeTraceGroups(y,T,"hm").each(function(W){var $=w.select(this),Z=W[0],K=Z.trace,Q=K.xgap||0,J=K.ygap||0,G=Z.z,ee=Z.x,re=Z.y,fe=Z.xCenter,we=Z.yCenter,Oe=O.traceIs(K,"contour"),ke=Oe?"best":K.zsmooth,Le=G.length,oe=u.maxRowLength(G),be=!1,_e=!1,he,De,xe,se,Ee,Te,Be,tt;for(Te=0;he===void 0&&Te<ee.length-1;)he=S.c2p(ee[Te]),Te++;for(Te=ee.length-1;De===void 0&&Te>0;)De=S.c2p(ee[Te]),Te--;for(De<he&&(xe=De,De=he,he=xe,be=!0),Te=0;se===void 0&&Te<re.length-1;)se=M.c2p(re[Te]),Te++;for(Te=re.length-1;Ee===void 0&&Te>0;)Ee=M.c2p(re[Te]),Te--;Ee<se&&(xe=se,se=Ee,Ee=xe,_e=!0),Oe&&(fe=ee,we=re,ee=Z.xfill,re=Z.yfill);var at="default";if(ke?at=ke==="best"?"smooth":"fast":K._islinear&&Q===0&&J===0&&A()&&(at="fast"),at!=="fast"){var gt=ke==="best"?0:.5;he=Math.max(-gt*S._length,he),De=Math.min((1+gt)*S._length,De),se=Math.max(-gt*M._length,se),Ee=Math.min((1+gt)*M._length,Ee)}var pt=Math.round(De-he),Rt=Math.round(Ee-se),$t=he>=S._length||De<=0||se>=M._length||Ee<=0;if($t){var Wt=$.selectAll("image").data([]);Wt.exit().remove(),C($);return}var Ht,Ft;at==="fast"?(Ht=oe,Ft=Le):(Ht=pt,Ft=Rt);var st=document.createElement("canvas");st.width=Ht,st.height=Ft;var rt=st.getContext("2d",{willReadFrequently:!0}),Ue=h(K,{noNumericCheck:!0,returnArray:!0}),xt,Gt;at==="fast"?(xt=be?function(Ea){return oe-1-Ea}:u.identity,Gt=_e?function(Ea){return Le-1-Ea}:u.identity):(xt=function(Ea){return u.constrain(Math.round(S.c2p(ee[Ea])-he),0,pt)},Gt=function(Ea){return u.constrain(Math.round(M.c2p(re[Ea])-se),0,Rt)});var Jt=Gt(0),Ut=[Jt,Jt],kr=be?0:1,Pr=_e?0:1,$r=0,rn=0,kn=0,Rn=0,ci,In,Gn,mr,St;function Ot(Ea,cs){if(Ea!==void 0){var No=Ue(Ea);return No[0]=Math.round(No[0]),No[1]=Math.round(No[1]),No[2]=Math.round(No[2]),$r+=cs,rn+=No[0]*cs,kn+=No[1]*cs,Rn+=No[2]*cs,No}return[0,0,0,0]}function Et(Ea,cs,No,Vs){var pl=Ea[No.bin0];if(pl===void 0)return Ot(void 0,1);var kl=Ea[No.bin1],El=cs[No.bin0],iu=cs[No.bin1],bu=kl-pl||0,yl=El-pl||0,ql;return kl===void 0?iu===void 0?ql=0:El===void 0?ql=2*(iu-pl):ql=(2*iu-El-pl)*2/3:iu===void 0?El===void 0?ql=0:ql=(2*pl-kl-El)*2/3:El===void 0?ql=(2*iu-kl-pl)*2/3:ql=iu+pl-kl-El,Ot(pl+No.frac*bu+Vs.frac*(yl+No.frac*ql))}if(at!=="default"){var je=0,Ye;try{Ye=new Uint8Array(Ht*Ft*4)}catch{Ye=new Array(Ht*Ft*4)}if(at==="smooth"){var et=fe||ee,mt=we||re,Nt=new Array(et.length),lr=new Array(mt.length),br=new Array(pt),Or=fe?N:I,tn=we?N:I,Jr,dn,on;for(Te=0;Te<et.length;Te++)Nt[Te]=Math.round(S.c2p(et[Te])-he);for(Te=0;Te<mt.length;Te++)lr[Te]=Math.round(M.c2p(mt[Te])-se);for(Te=0;Te<pt;Te++)br[Te]=Or(Te,Nt);for(Be=0;Be<Rt;Be++)for(Jr=tn(Be,lr),dn=G[Jr.bin0],on=G[Jr.bin1],Te=0;Te<pt;Te++,je+=4)St=Et(dn,on,br[Te],Jr),F(Ye,je,St)}else for(Be=0;Be<Le;Be++)for(mr=G[Be],Ut=Gt(Be),Te=0;Te<oe;Te++)St=Ot(mr[Te],1),je=(Ut*oe+xt(Te))*4,F(Ye,je,St);var Nn=rt.createImageData(Ht,Ft);try{Nn.data.set(Ye)}catch{var Wi=Nn.data,Oa=Wi.length;for(Be=0;Be<Oa;Be++)Wi[Be]=Ye[Be]}rt.putImageData(Nn,0,0)}else{var Da=Math.floor(Q/2),Aa=Math.floor(J/2);for(Be=0;Be<Le;Be++)if(mr=G[Be],Ut.reverse(),Ut[Pr]=Gt(Be+1),!(Ut[0]===Ut[1]||Ut[0]===void 0||Ut[1]===void 0))for(In=xt(0),ci=[In,In],Te=0;Te<oe;Te++)ci.reverse(),ci[kr]=xt(Te+1),!(ci[0]===ci[1]||ci[0]===void 0||ci[1]===void 0)&&(Gn=mr[Te],St=Ot(Gn,(ci[1]-ci[0])*(Ut[1]-Ut[0])),rt.fillStyle="rgba("+St.join(",")+")",rt.fillRect(ci[0]+Da,Ut[0]+Aa,ci[1]-ci[0]-Q,Ut[1]-Ut[0]-J))}rn=Math.round(rn/$r),kn=Math.round(kn/$r),Rn=Math.round(Rn/$r);var Ka=R("rgb("+rn+","+kn+","+Rn+")");k._hmpixcount=(k._hmpixcount||0)+$r,k._hmlumcount=(k._hmlumcount||0)+$r*Ka.getLuminance();var Sa=$.selectAll("image").data(W);Sa.enter().append("svg:image").attr({xmlns:m.svg,preserveAspectRatio:"none"}),Sa.attr({height:Rt,width:pt,x:he,y:se,"xlink:href":st.toDataURL("image/png")}),at==="fast"&&!ke&&Sa.attr("style",E),C($);var no=K.texttemplate;if(no){var Fo=v(K),an={type:"linear",range:[Fo.min,Fo.max],_separators:S._separators,_numFormat:S._numFormat},Hr=K.type==="histogram2dcontour",nn=K.type==="contour",Kr=nn?1:0,$n=nn?Le-1:Le,Ai=nn?1:0,aa=nn?oe-1:oe,Ci=[];for(Te=Kr;Te<$n;Te++){var Ta;if(nn)Ta=Z.y[Te];else if(Hr){if(Te===0||Te===Le-1)continue;Ta=Z.y[Te]}else if(Z.yCenter)Ta=Z.yCenter[Te];else{if(Te+1===Le&&Z.y[Te+1]===void 0)continue;Ta=(Z.y[Te]+Z.y[Te+1])/2}var Na=Math.round(M.c2p(Ta));if(!(0>Na||Na>M._length))for(Be=Ai;Be<aa;Be++){var ro;if(nn)ro=Z.x[Be];else if(Hr){if(Be===0||Be===oe-1)continue;ro=Z.x[Be]}else if(Z.xCenter)ro=Z.xCenter[Be];else{if(Be+1===oe&&Z.x[Be+1]===void 0)continue;ro=(Z.x[Be]+Z.x[Be+1])/2}var oo=Math.round(S.c2p(ro));if(!(0>oo||oo>S._length)){var xo=p({x:ro,y:Ta},K,k._fullLayout);xo.x=ro,xo.y=Ta;var vr=Z.z[Te][Be];vr===void 0?(xo.z="",xo.zLabel=""):(xo.z=vr,xo.zLabel=l.tickText(an,vr,"hover").text);var er=Z.text&&Z.text[Te]&&Z.text[Te][Be];(er===void 0||er===!1)&&(er=""),xo.text=er;var si=u.texttemplateString(no,xo,k._fullLayout._d3locale,xo,K._meta||{});if(si){var ei=si.split("<br>"),Kn=ei.length,qn=0;for(tt=0;tt<Kn;tt++)qn=Math.max(qn,ei[tt].length);Ci.push({l:Kn,c:qn,t:si,x:oo,y:Na,z:vr})}}}}var pi=K.textfont,_i=pi.size,fi=k._fullLayout.font.size;if(!_i||_i==="auto"){var Ri=1/0,$i=1/0,Hi=0,wr=0;for(tt=0;tt<Ci.length;tt++){var gn=Ci[tt];if(Hi=Math.max(Hi,gn.l),wr=Math.max(wr,gn.c),tt<Ci.length-1){var Xn=Ci[tt+1],Yi=Math.abs(Xn.x-gn.x),ha=Math.abs(Xn.y-gn.y);Yi&&(Ri=Math.min(Ri,Yi)),ha&&($i=Math.min($i,ha))}}!isFinite(Ri)||!isFinite($i)?_i=fi:(Ri-=Q,$i-=J,Ri/=wr,$i/=Hi,Ri/=x/2,$i/=x,_i=Math.min(Math.floor(Ri),Math.floor($i),fi))}if(_i<=0||!isFinite(_i))return;var Ca=function(Ea){return Ea.x},Ba=function(Ea){return Ea.y-_i*(Ea.l*x/2-1)},ji=g($).data(Ci);ji.enter().append("g").classed(D,1).append("text").attr("text-anchor","middle").each(function(Ea){var cs=w.select(this),No=pi.color;(!No||No==="auto")&&(No=f.contrast(Ea.z===void 0?k._fullLayout.plot_bgcolor:"rgba("+Ue(Ea.z).join()+")")),cs.attr("data-notex",1).call(c.positionText,Ca(Ea),Ba(Ea)).call(z.font,{family:pi.family,size:_i,color:No,weight:pi.weight,style:pi.style,variant:pi.variant,textcase:pi.textcase,lineposition:pi.lineposition,shadow:pi.shadow}).text(Ea.t).call(c.convertToTspans,k)})}})};function I(k,P){var T=P.length-2,y=u.constrain(u.findBin(k,P),0,T),S=P[y],M=P[y+1],W=u.constrain(y+(k-S)/(M-S)-.5,0,T),$=Math.round(W),Z=Math.abs(W-$);return!W||W===T||!Z?{bin0:$,bin1:$,frac:0}:{bin0:$,frac:Z,bin1:Math.round($+Z/(W-$))}}function N(k,P){var T=P.length-1,y=u.constrain(u.findBin(k,P),0,T),S=P[y],M=P[y+1],W=(k-S)/(M-S)||0;return W<=0?{bin0:y,bin1:y,frac:0}:W<.5?{bin0:y,bin1:y+1,frac:W}:{bin0:y+1,bin1:y,frac:1-W}}function F(k,P,T){k[P]=T[0],k[P+1]=T[1],k[P+2]=T[2],k[P+3]=Math.round(T[3]*255)}}}),rw=U({"src/traces/heatmap/colorbar.js"(pe,le){le.exports={min:"zmin",max:"zmax"}}}),e1=U({"src/traces/heatmap/style.js"(pe,le){var w=Ze();le.exports=function(O){w.select(O).selectAll(".hm image").style("opacity",function(z){return z.trace.opacity})}}}),Ax=U({"src/traces/heatmap/hover.js"(pe,le){var w=Dp(),R=ii(),O=R.isArrayOrTypedArray,z=Yu(),l=vd().extractOpts;le.exports=function(c,p,f,v,h){h||(h={});var m=h.isContour,_=c.cd[0],x=_.trace,A=c.xa,E=c.ya,D=_.x,g=_.y,C=_.z,I=_.xCenter,N=_.yCenter,F=_.zmask,k=x.zhoverformat,P=D,T=g,y,S,M,W;if(c.index!==!1){try{M=Math.round(c.index[1]),W=Math.round(c.index[0])}catch{R.error("Error hovering on heatmap, pointNumber must be [row,col], found:",c.index);return}if(M<0||M>=C[0].length||W<0||W>C.length)return}else{if(w.inbox(p-D[0],p-D[D.length-1],0)>0||w.inbox(f-g[0],f-g[g.length-1],0)>0)return;if(m){var $;for(P=[2*D[0]-D[1]],$=1;$<D.length;$++)P.push((D[$]+D[$-1])/2);for(P.push([2*D[D.length-1]-D[D.length-2]]),T=[2*g[0]-g[1]],$=1;$<g.length;$++)T.push((g[$]+g[$-1])/2);T.push([2*g[g.length-1]-g[g.length-2]])}M=Math.max(0,Math.min(P.length-2,R.findBin(p,P))),W=Math.max(0,Math.min(T.length-2,R.findBin(f,T)))}var Z=A.c2p(D[M]),K=A.c2p(D[M+1]),Q=E.c2p(g[W]),J=E.c2p(g[W+1]),G,ee;m?(G=_.orig_x||D,ee=_.orig_y||g,K=Z,y=G[M],J=Q,S=ee[W]):(G=_.orig_x||I||D,ee=_.orig_y||N||g,y=I?G[M]:(G[M]+G[M+1])/2,S=N?ee[W]:(ee[W]+ee[W+1])/2,A&&A.type==="category"&&(y=D[M]),E&&E.type==="category"&&(S=g[W]),x.zsmooth&&(Z=K=A.c2p(y),Q=J=E.c2p(S)));var re=C[W][M];if(F&&!F[W][M]&&(re=void 0),!(re===void 0&&!x.hoverongaps)){var fe;O(_.hovertext)&&O(_.hovertext[W])?fe=_.hovertext[W][M]:O(_.text)&&O(_.text[W])&&(fe=_.text[W][M]);var we=l(x),Oe={type:"linear",range:[we.min,we.max],hoverformat:k,_separators:A._separators,_numFormat:A._numFormat},ke=z.tickText(Oe,re,"hover").text;return[R.extendFlat(c,{index:x._after2before?x._after2before[W][M]:[W,M],distance:c.maxHoverDistance,spikeDistance:c.maxSpikeDistance,x0:Z,x1:K,y0:Q,y1:J,xLabelVal:y,yLabelVal:S,zLabelVal:re,zLabel:ke,text:fe})]}}}}),XE=U({"src/traces/heatmap/index.js"(pe,le){le.exports={attributes:GE(),supplyDefaults:fR(),calc:YE(),plot:qA(),colorbar:rw(),style:e1(),hoverPoints:Ax(),moduleType:"trace",name:"heatmap",basePlotModule:Rf(),categories:["cartesian","svg","2dMap","showLegend"],meta:{}}}}),hR=U({"lib/heatmap.js"(pe,le){le.exports=XE()}}),ZE=U({"src/traces/histogram/bin_attributes.js"(pe,le){le.exports=function(R,O){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}}}),eI=U({"src/traces/histogram/constants.js"(pe,le){le.exports={eventDataKeys:["binNumber"]}}}),ST=U({"src/traces/histogram/attributes.js"(pe,le){var w=rm(),R=Wp().axisHoverFormat,O=Js().hovertemplateAttrs,z=Js().texttemplateAttrs,l=Ir(),u=ZE(),c=eI(),p=Ar().extendFlat;le.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:R("x"),yhoverformat:R("y"),text:p({},w.text,{}),hovertext:p({},w.hovertext,{}),orientation:w.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:u("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc"},ybins:u("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc"},autobiny:{valType:"boolean",dflt:null,editType:"calc"},bingroup:{valType:"string",dflt:"",editType:"calc"},hovertemplate:O({},{keys:c.eventDataKeys}),texttemplate:z({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),textposition:p({},w.textposition,{arrayOk:!1}),textfont:l({arrayOk:!1,editType:"plot",colorEditType:"style"}),outsidetextfont:l({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextfont:l({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextanchor:w.insidetextanchor,textangle:w.textangle,cliponaxis:w.cliponaxis,constraintext:w.constraintext,marker:w.marker,offsetgroup:w.offsetgroup,alignmentgroup:w.alignmentgroup,selected:w.selected,unselected:w.unselected,zorder:w.zorder}}}),pR=U({"src/traces/histogram/defaults.js"(pe,le){var w=Mi(),R=ii(),O=Lr(),z=zb().handleText,l=bM(),u=ST();le.exports=function(p,f,v,h){function m(T,y){return R.coerce(p,f,u,T,y)}var _=m("x"),x=m("y"),A=m("cumulative.enabled");A&&(m("cumulative.direction"),m("cumulative.currentbin")),m("text");var E=m("textposition");z(p,f,h,m,E,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),m("hovertext"),m("hovertemplate"),m("xhoverformat"),m("yhoverformat");var D=m("orientation",x&&!_?"h":"v"),g=D==="v"?"x":"y",C=D==="v"?"y":"x",I=_&&x?Math.min(R.minRowLength(_)&&R.minRowLength(x)):R.minRowLength(f[g]||[]);if(!I){f.visible=!1;return}f._length=I;var N=w.getComponentMethod("calendars","handleTraceDefaults");N(p,f,["x","y"],h);var F=f[C];F&&m("histfunc"),m("histnorm"),m("autobin"+g),l(p,f,m,v,h),R.coerceSelectionMarkerOpacity(f,m);var k=(f.marker.line||{}).color,P=w.getComponentMethod("errorbars","supplyDefaults");P(p,f,k||O.defaultLine,{axis:"y"}),P(p,f,k||O.defaultLine,{axis:"x",inherit:"y"}),m("zorder")}}}),KE=U({"src/traces/histogram/cross_trace_defaults.js"(pe,le){var w=ii(),R=Tf(),O=Mi().traceIs,z=rg(),l=zb().validateCornerradius,u=w.nestedProperty,c=lT().getAxisGroup,p=[{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"}],f=["x","y"];le.exports=function(h,m){var _=m._histogramBinOpts={},x=[],A={},E=[],D,g,C,I,N,F,k;function P(ke,Le){return w.coerce(D._input,D,D._module.attributes,ke,Le)}function T(ke){return ke.orientation==="v"?"x":"y"}function y(ke,Le){var oe=R.getFromTrace({_fullLayout:m},ke,Le);return oe.type}function S(ke,Le,oe){var be=ke.uid+"__"+oe;Le||(Le=be);var _e=y(ke,oe),he=ke[oe+"calendar"]||"",De=_[Le],xe=!0;De&&(_e===De.axType&&he===De.calendar?(xe=!1,De.traces.push(ke),De.dirs.push(oe)):(Le=be,_e!==De.axType&&w.warn(["Attempted to group the bins of trace",ke.index,"set on a","type:"+_e,"axis","with bins on","type:"+De.axType,"axis."].join(" ")),he!==De.calendar&&w.warn(["Attempted to group the bins of trace",ke.index,"set with a",he,"calendar","with bins",De.calendar?"on a "+De.calendar+" calendar":"w/o a set calendar"].join(" ")))),xe&&(_[Le]={traces:[ke],dirs:[oe],axType:_e,calendar:ke[oe+"calendar"]||""}),ke["_"+oe+"bingroup"]=Le}for(N=0;N<h.length;N++)if(D=h[N],O(D,"histogram")){if(x.push(D),delete D._xautoBinFinished,delete D._yautoBinFinished,D.type==="histogram"){var M=P("marker.cornerradius",m.barcornerradius);D.marker&&(D.marker.cornerradius=l(M))}O(D,"2dMap")||z(D._input,D,m,P,m.barmode)}var W=m._alignmentOpts||{};for(N=0;N<x.length;N++){if(D=x[N],C="",!O(D,"2dMap")){if(I=T(D),m.barmode==="group"&&D.alignmentgroup){var $=D[I+"axis"],Z=c(m,$)+D.orientation;(W[Z]||{})[D.alignmentgroup]&&(C=Z)}!C&&m.barmode!=="overlay"&&(C=c(m,D.xaxis)+c(m,D.yaxis)+T(D))}C?(A[C]||(A[C]=[]),A[C].push(D)):E.push(D)}for(C in A){if(g=A[C],g.length===1){E.push(g[0]);continue}var K=!1;for(g.length&&(D=g[0],K=P("bingroup")),C=K||C,N=0;N<g.length;N++){D=g[N];var Q=D._input.bingroup;Q&&Q!==C&&w.warn(["Trace",D.index,"must match","within bingroup",C+".","Ignoring its bingroup:",Q,"setting."].join(" ")),D.bingroup=C,S(D,C,T(D))}}for(N=0;N<E.length;N++){D=E[N];var J=P("bingroup");if(O(D,"2dMap"))for(k=0;k<2;k++){I=f[k];var G=P(I+"bingroup",J?J+"__"+I:null);S(D,G,I)}else S(D,J,T(D))}for(C in _){var ee=_[C];for(g=ee.traces,F=0;F<p.length;F++){var re=p[F],fe=re.name,we,Oe;if(!(fe==="nbins"&&ee.sizeFound)){for(N=0;N<g.length;N++){if(D=g[N],I=ee.dirs[N],we=re.aStr[I],u(D._input,we).get()!==void 0){ee[fe]=P(we),ee[fe+"Found"]=!0;break}Oe=(D._autoBin||{})[I]||{},Oe[fe]&&u(D,we).set(Oe[fe])}if(fe==="start"||fe==="end")for(;N<g.length;N++)D=g[N],D["_"+I+"bingroup"]&&(Oe=(D._autoBin||{})[I]||{},P(we,Oe[fe]));fe==="nbins"&&!ee.sizeFound&&!ee.nbinsFound&&(D=g[0],ee[fe]=P(we))}}}}}}),GA=U({"src/traces/histogram/hover.js"(pe,le){var w=P1().hoverPoints,R=Yu().hoverLabelText;le.exports=function(z,l,u,c,p){var f=w(z,l,u,c,p);if(f){z=f[0];var v=z.cd[z.index],h=z.cd[0].trace;if(!h.cumulative.enabled){var m=h.orientation==="h"?"y":"x";z[m+"Label"]=R(z[m+"a"],[v.ph0,v.ph1],h[m+"hoverformat"])}return f}}}}),nw=U({"src/traces/histogram/event_data.js"(pe,le){le.exports=function(R,O,z,l,u){if(R.x="xVal"in O?O.xVal:O.x,R.y="yVal"in O?O.yVal:O.y,"zLabelVal"in O&&(R.z=O.zLabelVal),O.xa&&(R.xaxis=O.xa),O.ya&&(R.yaxis=O.ya),!(z.cumulative||{}).enabled){var c=Array.isArray(u)?l[0].pts[u[0]][u[1]]:l[u].pts;R.pointNumbers=c,R.binNumber=R.pointNumber,delete R.pointNumber,delete R.pointIndex;var p;if(z._indexToPoints){p=[];for(var f=0;f<c.length;f++)p=p.concat(z._indexToPoints[c[f]])}else p=c;R.pointIndices=p}return R}}}),tI=U({"src/traces/histogram/index.js"(pe,le){le.exports={attributes:ST(),layoutAttributes:v_(),supplyDefaults:pR(),crossTraceDefaults:KE(),supplyLayoutDefaults:xM(),calc:_T().calc,crossTraceCalc:F0().crossTraceCalc,plot:by().plot,layerName:"barlayer",style:Xp().style,styleOnSelect:Xp().styleOnSelect,colorbar:qg(),hoverPoints:GA(),selectPoints:i2(),eventData:nw(),moduleType:"trace",name:"histogram",basePlotModule:Rf(),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{}}}}),lS=U({"lib/histogram.js"(pe,le){le.exports=tI()}}),SM=U({"src/traces/histogram2d/attributes.js"(pe,le){var w=ST(),R=ZE(),O=GE(),z=Jn(),l=Wp().axisHoverFormat,u=Js().hovertemplateAttrs,c=Js().texttemplateAttrs,p=Jd(),f=Ar().extendFlat;le.exports=f({x:w.x,y:w.y,z:{valType:"data_array",editType:"calc"},marker:{color:{valType:"data_array",editType:"calc"},editType:"calc"},histnorm:w.histnorm,histfunc:w.histfunc,nbinsx:w.nbinsx,xbins:R("x"),nbinsy:w.nbinsy,ybins:R("y"),autobinx:w.autobinx,autobiny:w.autobiny,bingroup:f({},w.bingroup,{}),xbingroup:f({},w.bingroup,{}),ybingroup:f({},w.bingroup,{}),xgap:O.xgap,ygap:O.ygap,zsmooth:O.zsmooth,xhoverformat:l("x"),yhoverformat:l("y"),zhoverformat:l("z",1),hovertemplate:u({},{keys:"z"}),texttemplate:c({arrayOk:!1,editType:"plot"},{keys:"z"}),textfont:O.textfont,showlegend:f({},z.showlegend,{dflt:!1})},p("",{cLetter:"z",autoColorDflt:!1}))}}),TM=U({"src/traces/histogram2d/sample_defaults.js"(pe,le){var w=Mi(),R=ii();le.exports=function(z,l,u,c){var p=u("x"),f=u("y"),v=R.minRowLength(p),h=R.minRowLength(f);if(!v||!h){l.visible=!1;return}l._length=Math.min(v,h);var m=w.getComponentMethod("calendars","handleTraceDefaults");m(z,l,["x","y"],c);var _=u("z")||u("marker.color");_&&u("histfunc"),u("histnorm"),u("autobinx"),u("autobiny")}}}),TT=U({"src/traces/histogram2d/defaults.js"(pe,le){var w=ii(),R=TM(),O=WE(),z=wg(),l=BA(),u=SM();le.exports=function(p,f,v,h){function m(_,x){return w.coerce(p,f,u,_,x)}R(p,f,m,h),f.visible!==!1&&(O(p,f,m,h),z(p,f,h,m,{prefix:"",cLetter:"z"}),m("hovertemplate"),l(m,h),m("xhoverformat"),m("yhoverformat"))}}}),EM=U({"src/traces/histogram2d/hover.js"(pe,le){var w=Ax(),R=Yu().hoverLabelText;le.exports=function(z,l,u,c,p){var f=w(z,l,u,c,p);if(f){z=f[0];var v=z.index,h=v[0],m=v[1],_=z.cd[0],x=_.trace,A=_.xRanges[m],E=_.yRanges[h];return z.xLabel=R(z.xa,[A[0],A[1]],x.xhoverformat),z.yLabel=R(z.ya,[E[0],E[1]],x.yhoverformat),f}}}}),AM=U({"src/traces/histogram2d/index.js"(pe,le){le.exports={attributes:SM(),supplyDefaults:TT(),crossTraceDefaults:KE(),calc:YE(),plot:qA(),layerName:"heatmaplayer",colorbar:rw(),style:e1(),hoverPoints:EM(),eventData:nw(),moduleType:"trace",name:"histogram2d",basePlotModule:Rf(),categories:["cartesian","svg","2dMap","histogram","showLegend"],meta:{}}}}),rI=U({"lib/histogram2d.js"(pe,le){le.exports=AM()}}),t1=U({"src/constants/filter_ops.js"(pe,le){le.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}}}),s2=U({"src/traces/contour/attributes.js"(pe,le){var w=GE(),R=Kc(),O=Wp(),z=O.axisHoverFormat,l=O.descriptionOnlyNumbers,u=Jd(),c=jl().dash,p=Ir(),f=Ar().extendFlat,v=t1(),h=v.COMPARISON_OPS2,m=v.INTERVAL_OPS,_=R.line;le.exports=f({z:w.z,x:w.x,x0:w.x0,dx:w.dx,y:w.y,y0:w.y0,dy:w.dy,xperiod:w.xperiod,yperiod:w.yperiod,xperiod0:R.xperiod0,yperiod0:R.yperiod0,xperiodalignment:w.xperiodalignment,yperiodalignment:w.yperiodalignment,text:w.text,hovertext:w.hovertext,transpose:w.transpose,xtype:w.xtype,ytype:w.ytype,xhoverformat:z("x"),yhoverformat:z("y"),zhoverformat:z("z",1),hovertemplate:w.hovertemplate,texttemplate:f({},w.texttemplate,{}),textfont:f({},w.textfont,{}),hoverongaps:w.hoverongaps,connectgaps:f({},w.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:p({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:l("contour label")},operation:{valType:"enumerated",values:[].concat(h).concat(m),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:f({},_.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:c,smoothing:f({},_.smoothing,{}),editType:"plot"},zorder:R.zorder},u("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))}}),$A=U({"src/traces/histogram2dcontour/attributes.js"(pe,le){var w=SM(),R=s2(),O=Jd(),z=Wp().axisHoverFormat,l=Ar().extendFlat;le.exports=l({x:w.x,y:w.y,z:w.z,marker:w.marker,histnorm:w.histnorm,histfunc:w.histfunc,nbinsx:w.nbinsx,xbins:w.xbins,nbinsy:w.nbinsy,ybins:w.ybins,autobinx:w.autobinx,autobiny:w.autobiny,bingroup:w.bingroup,xbingroup:w.xbingroup,ybingroup:w.ybingroup,autocontour:R.autocontour,ncontours:R.ncontours,contours:R.contours,line:{color:R.line.color,width:l({},R.line.width,{dflt:.5}),dash:R.line.dash,smoothing:R.line.smoothing,editType:"plot"},xhoverformat:z("x"),yhoverformat:z("y"),zhoverformat:z("z",1),hovertemplate:w.hovertemplate,texttemplate:R.texttemplate,textfont:R.textfont},O("",{cLetter:"z",editTypeOverride:"calc"}))}}),JE=U({"src/traces/contour/contours_defaults.js"(pe,le){le.exports=function(R,O,z,l){var u=l("contours.start"),c=l("contours.end"),p=u===!1||c===!1,f=z("contours.size"),v;p?v=O.autocontour=!0:v=z("autocontour",!1),(v||!f)&&z("ncontours")}}}),CM=U({"src/traces/contour/label_defaults.js"(pe,le){var w=ii();le.exports=function(O,z,l,u){u||(u={});var c=O("contours.showlabels");if(c){var p=z.font;w.coerceFont(O,"contours.labelfont",p,{overrideDflt:{color:l}}),O("contours.labelformat")}u.hasHover!==!1&&O("zhoverformat")}}}),Tg=U({"src/traces/contour/style_defaults.js"(pe,le){var w=wg(),R=CM();le.exports=function(z,l,u,c,p){var f=u("contours.coloring"),v,h="";f==="fill"&&(v=u("contours.showlines")),v!==!1&&(f!=="lines"&&(h=u("line.color","#000")),u("line.width",.5),u("line.dash")),f!=="none"&&(z.showlegend!==!0&&(l.showlegend=!1),l._dfltShowLegend=!1,w(z,l,c,u,{prefix:"",cLetter:"z"})),u("line.smoothing"),R(u,c,h,p)}}}),cb=U({"src/traces/histogram2dcontour/defaults.js"(pe,le){var w=ii(),R=TM(),O=JE(),z=Tg(),l=BA(),u=$A();le.exports=function(p,f,v,h){function m(x,A){return w.coerce(p,f,u,x,A)}function _(x){return w.coerce2(p,f,u,x)}R(p,f,m,h),f.visible!==!1&&(O(p,f,m,_),z(p,f,m,h),m("xhoverformat"),m("yhoverformat"),m("hovertemplate"),f.contours&&f.contours.coloring==="heatmap"&&l(m,h))}}}),QE=U({"src/traces/contour/set_contours.js"(pe,le){var w=Yu(),R=ii();le.exports=function(l,u){var c=l.contours;if(l.autocontour){var p=l.zmin,f=l.zmax;(l.zauto||p===void 0)&&(p=R.aggNums(Math.min,null,u)),(l.zauto||f===void 0)&&(f=R.aggNums(Math.max,null,u));var v=O(p,f,l.ncontours);c.size=v.dtick,c.start=w.tickFirst(v),v.range.reverse(),c.end=w.tickFirst(v),c.start===p&&(c.start+=c.size),c.end===f&&(c.end-=c.size),c.start>c.end&&(c.start=c.end=(c.start+c.end)/2),l._input.contours||(l._input.contours={}),R.extendFlat(l._input.contours,{start:c.start,end:c.end,size:c.size}),l._input.autocontour=!0}else if(c.type!=="constraint"){var h=c.start,m=c.end,_=l._input.contours;if(h>m&&(c.start=_.start=m,m=c.end=_.end=h,h=c.start),!(c.size>0)){var x;h===m?x=1:x=O(h,m,l.ncontours).dtick,_.size=c.size=x}}};function O(z,l,u){var c={type:"linear",range:[z,l]};return w.autoTicks(c,(l-z)/(u||15)),c}}}),l2=U({"src/traces/contour/end_plus.js"(pe,le){le.exports=function(R){return R.end+R.size/1e6}}}),uS=U({"src/traces/contour/calc.js"(pe,le){var w=vd(),R=YE(),O=QE(),z=l2();le.exports=function(u,c){var p=R(u,c),f=p[0].z;O(c,f);var v=c.contours,h=w.extractOpts(c),m;if(v.coloring==="heatmap"&&h.auto&&c.autocontour===!1){var _=v.start,x=z(v),A=v.size||1,E=Math.floor((x-_)/A)+1;isFinite(A)||(A=1,E=1);var D=_-A/2,g=D+E*A;m=[D,g]}else m=f;return w.calc(u,c,{vals:m,cLetter:"z"}),p}}}),iw=U({"src/traces/contour/constants.js"(pe,le){le.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}}}}),MM=U({"src/traces/contour/make_crossings.js"(pe,le){var w=iw();le.exports=function(z){var l=z[0].z,u=l.length,c=l[0].length,p=u===2||c===2,f,v,h,m,_,x,A,E,D;for(v=0;v<u-1;v++)for(m=[],v===0&&(m=m.concat(w.BOTTOMSTART)),v===u-2&&(m=m.concat(w.TOPSTART)),f=0;f<c-1;f++)for(h=m.slice(),f===0&&(h=h.concat(w.LEFTSTART)),f===c-2&&(h=h.concat(w.RIGHTSTART)),_=f+","+v,x=[[l[v][f],l[v][f+1]],[l[v+1][f],l[v+1][f+1]]],D=0;D<z.length;D++)E=z[D],A=R(E.level,x),A&&(E.crossings[_]=A,h.indexOf(A)!==-1&&(E.starts.push([f,v]),p&&h.indexOf(A,h.indexOf(A)+1)!==-1&&E.starts.push([f,v])))};function R(O,z){var l=(z[0][0]>O?0:1)+(z[0][1]>O?0:2)+(z[1][1]>O?0:4)+(z[1][0]>O?0:8);if(l===5||l===10){var u=(z[0][0]+z[0][1]+z[1][0]+z[1][1])/4;return O>u?l===5?713:1114:l===5?104:208}return l===15?0:l}}}),u2=U({"src/traces/contour/find_all_paths.js"(pe,le){var w=ii(),R=iw();le.exports=function(f,v,h){var m,_,x,A,E;for(v=v||.01,h=h||.01,x=0;x<f.length;x++){for(A=f[x],E=0;E<A.starts.length;E++)_=A.starts[E],l(A,_,"edge",v,h);for(m=0;Object.keys(A.crossings).length&&m<1e4;)m++,_=Object.keys(A.crossings)[0].split(",").map(Number),l(A,_,void 0,v,h);m===1e4&&w.log("Infinite loop in contour?")}};function O(p,f,v,h){return Math.abs(p[0]-f[0])<v&&Math.abs(p[1]-f[1])<h}function z(p,f){var v=p[2]-f[2],h=p[3]-f[3];return Math.sqrt(v*v+h*h)}function l(p,f,v,h,m){var _=f.join(","),x=p.crossings[_],A=u(x,v,f),E=[c(p,f,[-A[0],-A[1]])],D=p.z.length,g=p.z[0].length,C=f.slice(),I=A.slice(),N;for(N=0;N<1e4;N++){if(x>20?(x=R.CHOOSESADDLE[x][(A[0]||A[1])<0?0:1],p.crossings[_]=R.SADDLEREMAINDER[x]):delete p.crossings[_],A=R.NEWDELTA[x],!A){w.log("Found bad marching index:",x,f,p.level);break}E.push(c(p,f,A)),f[0]+=A[0],f[1]+=A[1],_=f.join(","),O(E[E.length-1],E[E.length-2],h,m)&&E.pop();var F=A[0]&&(f[0]<0||f[0]>g-2)||A[1]&&(f[1]<0||f[1]>D-2),k=f[0]===C[0]&&f[1]===C[1]&&A[0]===I[0]&&A[1]===I[1];if(k||v&&F)break;x=p.crossings[_]}N===1e4&&w.log("Infinite loop in contour?");var P=O(E[0],E[E.length-1],h,m),T=0,y=.2*p.smoothing,S=[],M=0,W,$,Z,K,Q,J,G,ee,re,fe,we;for(N=1;N<E.length;N++)G=z(E[N],E[N-1]),T+=G,S.push(G);var Oe=T/S.length*y;function ke(be){return E[be%E.length]}for(N=E.length-2;N>=M;N--)if(W=S[N],W<Oe){for(Z=0,$=N-1;$>=M&&W+S[$]<Oe;$--)W+=S[$];if(P&&N===E.length-2)for(Z=0;Z<$&&W+S[Z]<Oe;Z++)W+=S[Z];Q=N-$+Z+1,J=Math.floor((N+$+Z+2)/2),!P&&N===E.length-2?K=E[E.length-1]:!P&&$===-1?K=E[0]:Q%2?K=ke(J):K=[(ke(J)[0]+ke(J+1)[0])/2,(ke(J)[1]+ke(J+1)[1])/2],E.splice($+1,N-$+1,K),N=$+1,Z&&(M=Z),P&&(N===E.length-2?E[Z]=E[E.length-1]:N===0&&(E[E.length-1]=E[0]))}for(E.splice(0,M),N=0;N<E.length;N++)E[N].length=2;if(!(E.length<2))if(P)E.pop(),p.paths.push(E);else{v||w.log("Unclosed interior contour?",p.level,C.join(","),E.join("L"));var Le=!1;for(ee=0;ee<p.edgepaths.length;ee++)if(fe=p.edgepaths[ee],!Le&&O(fe[0],E[E.length-1],h,m)){E.pop(),Le=!0;var oe=!1;for(re=0;re<p.edgepaths.length;re++)if(we=p.edgepaths[re],O(we[we.length-1],E[0],h,m)){oe=!0,E.shift(),p.edgepaths.splice(ee,1),re===ee?p.paths.push(E.concat(we)):(re>ee&&re--,p.edgepaths[re]=we.concat(E,fe));break}oe||(p.edgepaths[ee]=E.concat(fe))}for(ee=0;ee<p.edgepaths.length&&!Le;ee++)fe=p.edgepaths[ee],O(fe[fe.length-1],E[0],h,m)&&(E.shift(),p.edgepaths[ee]=fe.concat(E),Le=!0);Le||p.edgepaths.push(E)}}function u(p,f,v){var h=0,m=0;return p>20&&f?p===208||p===1114?h=v[0]===0?1:-1:m=v[1]===0?1:-1:R.BOTTOMSTART.indexOf(p)!==-1?m=1:R.LEFTSTART.indexOf(p)!==-1?h=1:R.TOPSTART.indexOf(p)!==-1?m=-1:h=-1,[h,m]}function c(p,f,v){var h=f[0]+Math.max(v[0],0),m=f[1]+Math.max(v[1],0),_=p.z[m][h],x=p.xaxis,A=p.yaxis;if(v[1]){var E=(p.level-_)/(p.z[m][h+1]-_),D=(E!==1?(1-E)*x.c2l(p.x[h]):0)+(E!==0?E*x.c2l(p.x[h+1]):0);return[x.c2p(x.l2c(D),!0),A.c2p(p.y[m],!0),h+E,m]}else{var g=(p.level-_)/(p.z[m+1][h]-_),C=(g!==1?(1-g)*A.c2l(p.y[m]):0)+(g!==0?g*A.c2l(p.y[m+1]):0);return[x.c2p(p.x[h],!0),A.c2p(A.l2c(C),!0),h,m+g]}}}}),nI=U({"src/traces/contour/constraint_mapping.js"(pe,le){var w=t1(),R=_t();le.exports={"[]":z("[]"),"][":z("]["),">":l(">"),"<":l("<"),"=":l("=")};function O(u,c){var p=Array.isArray(c),f;function v(h){return R(h)?+h:null}return w.COMPARISON_OPS2.indexOf(u)!==-1?f=v(p?c[0]:c):w.INTERVAL_OPS.indexOf(u)!==-1?f=p?[v(c[0]),v(c[1])]:[v(c),v(c)]:w.SET_OPS.indexOf(u)!==-1&&(f=p?c.map(v):[v(c)]),f}function z(u){return function(c){c=O(u,c);var p=Math.min(c[0],c[1]),f=Math.max(c[0],c[1]);return{start:p,end:f,size:f-p}}}function l(u){return function(c){return c=O(u,c),{start:c,end:1/0,size:1/0}}}}}),lv=U({"src/traces/contour/empty_pathinfo.js"(pe,le){var w=ii(),R=nI(),O=l2();le.exports=function(l,u,c){for(var p=l.type==="constraint"?R[l._operation](l.value):l,f=p.size,v=[],h=O(p),m=c.trace._carpetTrace,_=m?{xaxis:m.aaxis,yaxis:m.baxis,x:c.a,y:c.b}:{xaxis:u.xaxis,yaxis:u.yaxis,x:c.x,y:c.y},x=p.start;x<h;x+=f)if(v.push(w.extendFlat({level:x,crossings:{},starts:[],edgepaths:[],paths:[],z:c.z,smoothing:c.trace.line.smoothing},_)),v.length>1e3){w.warn("Too many contours, clipping at 1000",l);break}return v}}}),xy=U({"src/traces/contour/convert_to_constraints.js"(pe,le){var w=ii();le.exports=function(O,z){var l,u,c,p=function(h){return h.reverse()},f=function(h){return h};switch(z){case"=":case"<":return O;case">":for(O.length!==1&&w.warn("Contour data invalid for the specified inequality operation."),u=O[0],l=0;l<u.edgepaths.length;l++)u.edgepaths[l]=p(u.edgepaths[l]);for(l=0;l<u.paths.length;l++)u.paths[l]=p(u.paths[l]);for(l=0;l<u.starts.length;l++)u.starts[l]=p(u.starts[l]);return O;case"][":var v=p;p=f,f=v;case"[]":for(O.length!==2&&w.warn("Contour data invalid for the specified inequality range operation."),u=R(O[0]),c=R(O[1]),l=0;l<u.edgepaths.length;l++)u.edgepaths[l]=p(u.edgepaths[l]);for(l=0;l<u.paths.length;l++)u.paths[l]=p(u.paths[l]);for(l=0;l<u.starts.length;l++)u.starts[l]=p(u.starts[l]);for(;c.edgepaths.length;)u.edgepaths.push(f(c.edgepaths.shift()));for(;c.paths.length;)u.paths.push(f(c.paths.shift()));for(;c.starts.length;)u.starts.push(f(c.starts.shift()));return[u]}};function R(O){return w.extendFlat({},O,{edgepaths:w.extendDeep([],O.edgepaths),paths:w.extendDeep([],O.paths),starts:w.extendDeep([],O.starts)})}}}),Bb=U({"src/traces/contour/close_boundaries.js"(pe,le){le.exports=function(w,R){var O=w[0],z=O.z,l;switch(R.type){case"levels":var u=Math.min(z[0][0],z[0][1]);for(l=0;l<w.length;l++){var c=w[l];c.prefixBoundary=!c.edgepaths.length&&(u>c.level||c.starts.length&&u===c.level)}break;case"constraint":if(O.prefixBoundary=!1,O.edgepaths.length)return;var p=O.x.length,f=O.y.length,v=-1/0,h=1/0;for(l=0;l<f;l++)h=Math.min(h,z[l][0]),h=Math.min(h,z[l][p-1]),v=Math.max(v,z[l][0]),v=Math.max(v,z[l][p-1]);for(l=1;l<p-1;l++)h=Math.min(h,z[0][l]),h=Math.min(h,z[f-1][l]),v=Math.max(v,z[0][l]),v=Math.max(v,z[f-1][l]);var m=R.value,_,x;switch(R._operation){case">":m>v&&(O.prefixBoundary=!0);break;case"<":(m<h||O.starts.length&&m===h)&&(O.prefixBoundary=!0);break;case"[]":_=Math.min(m[0],m[1]),x=Math.max(m[0],m[1]),(x<h||_>v||O.starts.length&&x===h)&&(O.prefixBoundary=!0);break;case"][":_=Math.min(m[0],m[1]),x=Math.max(m[0],m[1]),_<h&&x>v&&(O.prefixBoundary=!0);break}break}}}}),RM=U({"src/traces/contour/plot.js"(pe){var le=Ze(),w=ii(),R=ec(),O=vd(),z=ah(),l=Yu(),u=Wy(),c=qA(),p=MM(),f=u2(),v=lv(),h=xy(),m=Bb(),_=iw(),x=_.LABELOPTIMIZER;pe.plot=function(k,P,T,y){var S=P.xaxis,M=P.yaxis;w.makeTraceGroups(y,T,"contour").each(function(W){var $=le.select(this),Z=W[0],K=Z.trace,Q=Z.x,J=Z.y,G=K.contours,ee=v(G,P,Z),re=w.ensureSingle($,"g","heatmapcoloring"),fe=[];G.coloring==="heatmap"&&(fe=[W]),c(k,P,fe,re),p(ee),f(ee);var we=S.c2p(Q[0],!0),Oe=S.c2p(Q[Q.length-1],!0),ke=M.c2p(J[0],!0),Le=M.c2p(J[J.length-1],!0),oe=[[we,Le],[Oe,Le],[Oe,ke],[we,ke]],be=ee;G.type==="constraint"&&(be=h(ee,G._operation)),A($,oe,G),E($,be,oe,G),g($,ee,k,Z,G),I($,P,k,Z,oe)})};function A(F,k,P){var T=w.ensureSingle(F,"g","contourbg"),y=T.selectAll("path").data(P.coloring==="fill"?[0]:[]);y.enter().append("path"),y.exit().remove(),y.attr("d","M"+k.join("L")+"Z").style("stroke","none")}function E(F,k,P,T){var y=T.coloring==="fill"||T.type==="constraint"&&T._operation!=="=",S="M"+P.join("L")+"Z";y&&m(k,T);var M=w.ensureSingle(F,"g","contourfill"),W=M.selectAll("path").data(y?k:[]);W.enter().append("path"),W.exit().remove(),W.each(function($){var Z=($.prefixBoundary?S:"")+D($,P);Z?le.select(this).attr("d",Z).style("stroke","none"):le.select(this).remove()})}function D(F,k){var P="",T=0,y=F.edgepaths.map(function(we,Oe){return Oe}),S=!0,M,W,$,Z,K,Q;function J(we){return Math.abs(we[1]-k[0][1])<.01}function G(we){return Math.abs(we[1]-k[2][1])<.01}function ee(we){return Math.abs(we[0]-k[0][0])<.01}function re(we){return Math.abs(we[0]-k[2][0])<.01}for(;y.length;){for(Q=R.smoothopen(F.edgepaths[T],F.smoothing),P+=S?Q:Q.replace(/^M/,"L"),y.splice(y.indexOf(T),1),M=F.edgepaths[T][F.edgepaths[T].length-1],Z=-1,$=0;$<4;$++){if(!M){w.log("Missing end?",T,F);break}for(J(M)&&!re(M)?W=k[1]:ee(M)?W=k[0]:G(M)?W=k[3]:re(M)&&(W=k[2]),K=0;K<F.edgepaths.length;K++){var fe=F.edgepaths[K][0];Math.abs(M[0]-W[0])<.01?Math.abs(M[0]-fe[0])<.01&&(fe[1]-M[1])*(W[1]-fe[1])>=0&&(W=fe,Z=K):Math.abs(M[1]-W[1])<.01?Math.abs(M[1]-fe[1])<.01&&(fe[0]-M[0])*(W[0]-fe[0])>=0&&(W=fe,Z=K):w.log("endpt to newendpt is not vert. or horz.",M,W,fe)}if(M=W,Z>=0)break;P+="L"+W}if(Z===F.edgepaths.length){w.log("unclosed perimeter path");break}T=Z,S=y.indexOf(T)===-1,S&&(T=y[0],P+="Z")}for(T=0;T<F.paths.length;T++)P+=R.smoothclosed(F.paths[T],F.smoothing);return P}function g(F,k,P,T,y){var S=P._context.staticPlot,M=w.ensureSingle(F,"g","contourlines"),W=y.showlines!==!1,$=y.showlabels,Z=W&&$,K=pe.createLines(M,W||$,k,S),Q=pe.createLineClip(M,Z,P,T.trace.uid),J=F.selectAll("g.contourlabels").data($?[0]:[]);if(J.exit().remove(),J.enter().append("g").classed("contourlabels",!0),$){var G=[],ee=[];w.clearLocationCache();var re=pe.labelFormatter(P,T),fe=R.tester.append("text").attr("data-notex",1).call(R.font,y.labelfont),we=k[0].xaxis,Oe=k[0].yaxis,ke=we._length,Le=Oe._length,oe=we.range,be=Oe.range,_e=w.aggNums(Math.min,null,T.x),he=w.aggNums(Math.max,null,T.x),De=w.aggNums(Math.min,null,T.y),xe=w.aggNums(Math.max,null,T.y),se=Math.max(we.c2p(_e,!0),0),Ee=Math.min(we.c2p(he,!0),ke),Te=Math.max(Oe.c2p(xe,!0),0),Be=Math.min(Oe.c2p(De,!0),Le),tt={};oe[0]<oe[1]?(tt.left=se,tt.right=Ee):(tt.left=Ee,tt.right=se),be[0]<be[1]?(tt.top=Te,tt.bottom=Be):(tt.top=Be,tt.bottom=Te),tt.middle=(tt.top+tt.bottom)/2,tt.center=(tt.left+tt.right)/2,G.push([[tt.left,tt.top],[tt.right,tt.top],[tt.right,tt.bottom],[tt.left,tt.bottom]]);var at=Math.sqrt(ke*ke+Le*Le),gt=_.LABELDISTANCE*at/Math.max(1,k.length/_.LABELINCREASE);K.each(function(pt){var Rt=pe.calcTextOpts(pt.level,re,fe,P);le.select(this).selectAll("path").each(function(){var $t=this,Wt=w.getVisibleSegment($t,tt,Rt.height/2);if(Wt&&!(Wt.len<(Rt.width+Rt.height)*_.LABELMIN))for(var Ht=Math.min(Math.ceil(Wt.len/gt),_.LABELMAX),Ft=0;Ft<Ht;Ft++){var st=pe.findBestTextLocation($t,Wt,Rt,ee,tt);if(!st)break;pe.addLabelData(st,Rt,ee,G)}})}),fe.remove(),pe.drawLabels(J,ee,P,Q,Z?G:null)}$&&!W&&K.remove()}pe.createLines=function(F,k,P,T){var y=P[0].smoothing,S=F.selectAll("g.contourlevel").data(k?P:[]);if(S.exit().remove(),S.enter().append("g").classed("contourlevel",!0),k){var M=S.selectAll("path.openline").data(function($){return $.pedgepaths||$.edgepaths});M.exit().remove(),M.enter().append("path").classed("openline",!0),M.attr("d",function($){return R.smoothopen($,y)}).style("stroke-miterlimit",1).style("vector-effect",T?"none":"non-scaling-stroke");var W=S.selectAll("path.closedline").data(function($){return $.ppaths||$.paths});W.exit().remove(),W.enter().append("path").classed("closedline",!0),W.attr("d",function($){return R.smoothclosed($,y)}).style("stroke-miterlimit",1).style("vector-effect",T?"none":"non-scaling-stroke")}return S},pe.createLineClip=function(F,k,P,T){var y=P._fullLayout._clips,S=k?"clipline"+T:null,M=y.selectAll("#"+S).data(k?[0]:[]);return M.exit().remove(),M.enter().append("clipPath").classed("contourlineclip",!0).attr("id",S),R.setClipUrl(F,S,P),M},pe.labelFormatter=function(F,k){var P=F._fullLayout,T=k.trace,y=T.contours,S={type:"linear",_id:"ycontour",showexponent:"all",exponentformat:"B"};if(y.labelformat)S.tickformat=y.labelformat,u(S,P);else{var M=O.extractOpts(T);if(M&&M.colorbar&&M.colorbar._axis)S=M.colorbar._axis;else{if(y.type==="constraint"){var W=y.value;w.isArrayOrTypedArray(W)?S.range=[W[0],W[W.length-1]]:S.range=[W,W]}else S.range=[y.start,y.end],S.nticks=(y.end-y.start)/y.size;S.range[0]===S.range[1]&&(S.range[1]+=S.range[0]||1),S.nticks||(S.nticks=1e3),u(S,P),l.prepTicks(S),S._tmin=null,S._tmax=null}}return function($){return l.tickText(S,$).text}},pe.calcTextOpts=function(F,k,P,T){var y=k(F);P.text(y).call(z.convertToTspans,T);var S=P.node(),M=R.bBox(S,!0);return{text:y,width:M.width,height:M.height,fontSize:+S.style["font-size"].replace("px",""),level:F,dy:(M.top+M.bottom)/2}},pe.findBestTextLocation=function(F,k,P,T,y){var S=P.width,M,W,$,Z,K;k.isClosed?(W=k.len/x.INITIALSEARCHPOINTS,M=k.min+W/2,$=k.max):(W=(k.len-S)/(x.INITIALSEARCHPOINTS+1),M=k.min+W+S/2,$=k.max-(W+S)/2);for(var Q=1/0,J=0;J<x.ITERATIONS;J++){for(var G=M;G<$;G+=W){var ee=w.getTextLocation(F,k.total,G,S),re=C(ee,P,T,y);re<Q&&(Q=re,K=ee,Z=G)}if(Q>x.MAXCOST*2)break;J&&(W/=2),M=Z-W/2,$=M+W*1.5}if(Q<=x.MAXCOST)return K};function C(F,k,P,T){var y=k.width/2,S=k.height/2,M=F.x,W=F.y,$=F.theta,Z=Math.cos($)*y,K=Math.sin($)*y,Q=(M>T.center?T.right-M:M-T.left)/(Z+Math.abs(Math.sin($)*S)),J=(W>T.middle?T.bottom-W:W-T.top)/(Math.abs(K)+Math.cos($)*S);if(Q<1||J<1)return 1/0;var G=x.EDGECOST*(1/(Q-1)+1/(J-1));G+=x.ANGLECOST*$*$;for(var ee=M-Z,re=W-K,fe=M+Z,we=W+K,Oe=0;Oe<P.length;Oe++){var ke=P[Oe],Le=Math.cos(ke.theta)*ke.width/2,oe=Math.sin(ke.theta)*ke.width/2,be=w.segmentDistance(ee,re,fe,we,ke.x-Le,ke.y-oe,ke.x+Le,ke.y+oe)*2/(k.height+ke.height),_e=ke.level===k.level,he=_e?x.SAMELEVELDISTANCE:1;if(be<=he)return 1/0;var De=x.NEIGHBORCOST*(_e?x.SAMELEVELFACTOR:1);G+=De/(be-he)}return G}pe.addLabelData=function(F,k,P,T){var y=k.fontSize,S=k.width+y/3,M=Math.max(0,k.height-y/3),W=F.x,$=F.y,Z=F.theta,K=Math.sin(Z),Q=Math.cos(Z),J=function(ee,re){return[W+ee*Q-re*K,$+ee*K+re*Q]},G=[J(-S/2,-M/2),J(-S/2,M/2),J(S/2,M/2),J(S/2,-M/2)];P.push({text:k.text,x:W,y:$,dy:k.dy,theta:Z,level:k.level,width:S,height:M}),T.push(G)},pe.drawLabels=function(F,k,P,T,y){var S=F.selectAll("text").data(k,function(Z){return Z.text+","+Z.x+","+Z.y+","+Z.theta});if(S.exit().remove(),S.enter().append("text").attr({"data-notex":1,"text-anchor":"middle"}).each(function(Z){var K=Z.x+Math.sin(Z.theta)*Z.dy,Q=Z.y-Math.cos(Z.theta)*Z.dy;le.select(this).text(Z.text).attr({x:K,y:Q,transform:"rotate("+180*Z.theta/Math.PI+" "+K+" "+Q+")"}).call(z.convertToTspans,P)}),y){for(var M="",W=0;W<y.length;W++)M+="M"+y[W].join("L")+"Z";var $=w.ensureSingle(T,"path","");$.attr("d",M)}};function I(F,k,P,T,y){var S=T.trace,M=P._fullLayout._clips,W="clip"+S.uid,$=M.selectAll("#"+W).data(S.connectgaps?[]:[0]);if($.enter().append("clipPath").classed("contourclip",!0).attr("id",W),$.exit().remove(),S.connectgaps===!1){var Z={level:.9,crossings:{},starts:[],edgepaths:[],paths:[],xaxis:k.xaxis,yaxis:k.yaxis,x:T.x,y:T.y,z:N(T),smoothing:0};p([Z]),f([Z]),m([Z],{type:"levels"});var K=w.ensureSingle($,"path","");K.attr("d",(Z.prefixBoundary?"M"+y.join("L")+"Z":"")+D(Z,y))}else W=null;R.setClipUrl(F,W,P)}function N(F){var k=F.trace._emptypoints,P=[],T=F.z.length,y=F.z[0].length,S,M=[],W;for(S=0;S<y;S++)M.push(1);for(S=0;S<T;S++)P.push(M.slice());for(S=0;S<k.length;S++)W=k[S],P[W[0]][W[1]]=0;return F.zmask=P,P}}}),aw=U({"src/traces/contour/make_color_map.js"(pe,le){var w=Ze(),R=vd(),O=l2();le.exports=function(l){var u=l.contours,c=u.start,p=O(u),f=u.size||1,v=Math.floor((p-c)/f)+1,h=u.coloring==="lines"?0:1,m=R.extractOpts(l);isFinite(f)||(f=1,v=1);var _=m.reversescale?R.flipScale(m.colorscale):m.colorscale,x=_.length,A=new Array(x),E=new Array(x),D,g,C=m.min,I=m.max;if(u.coloring==="heatmap"){for(g=0;g<x;g++)D=_[g],A[g]=D[0]*(I-C)+C,E[g]=D[1];var N=w.extent([C,I,u.start,u.start+f*(v-1)]),F=N[C<I?0:1],k=N[C<I?1:0];F!==C&&(A.splice(0,0,F),E.splice(0,0,E[0])),k!==I&&(A.push(k),E.push(E[E.length-1]))}else{var P=l._input&&typeof l._input.zmin=="number"&&typeof l._input.zmax=="number";for(P&&(c<=C||p>=I)&&(c<=C&&(c=C),p>=I&&(p=I),v=Math.floor((p-c)/f)+1,h=0),g=0;g<x;g++)D=_[g],A[g]=(D[0]*(v+h-1)-h/2)*f+c,E[g]=D[1];(P||l.autocontour)&&(A[0]>C&&(A.unshift(C),E.unshift(E[0])),A[A.length-1]<I&&(A.push(I),E.push(E[E.length-1])))}return R.makeColorScaleFunc({domain:A,range:E},{noNumericCheck:!0})}}}),Ub=U({"src/traces/contour/style.js"(pe,le){var w=Ze(),R=ec(),O=e1(),z=aw();le.exports=function(u){var c=w.select(u).selectAll("g.contour");c.style("opacity",function(p){return p[0].trace.opacity}),c.each(function(p){var f=w.select(this),v=p[0].trace,h=v.contours,m=v.line,_=h.size||1,x=h.start,A=h.type==="constraint",E=!A&&h.coloring==="lines",D=!A&&h.coloring==="fill",g=E||D?z(v):null;f.selectAll("g.contourlevel").each(function(N){w.select(this).selectAll("path").call(R.lineGroupStyle,m.width,E?g(N.level):m.color,m.dash)});var C=h.labelfont;if(f.selectAll("g.contourlabels text").each(function(N){R.font(w.select(this),{weight:C.weight,style:C.style,variant:C.variant,textcase:C.textcase,lineposition:C.lineposition,shadow:C.shadow,family:C.family,size:C.size,color:C.color||(E?g(N.level):m.color)})}),A)f.selectAll("g.contourfill path").style("fill",v.fillcolor);else if(D){var I;f.selectAll("g.contourfill path").style("fill",function(N){return I===void 0&&(I=N.level),g(N.level+.5*_)}),I===void 0&&(I=x),f.selectAll("g.contourbg path").style("fill",g(I-.5*_))}}),O(u)}}}),nm=U({"src/traces/contour/colorbar.js"(pe,le){var w=vd(),R=aw(),O=l2();function z(l,u,c){var p=u.contours,f=u.line,v=p.size||1,h=p.coloring,m=R(u,{isColorbar:!0});if(h==="heatmap"){var _=w.extractOpts(u);c._fillgradient=_.reversescale?w.flipScale(_.colorscale):_.colorscale,c._zrange=[_.min,_.max]}else h==="fill"&&(c._fillcolor=m);c._line={color:h==="lines"?m:f.color,width:p.showlines!==!1?f.width:0,dash:f.dash},c._levels={start:p.start,end:O(p),size:v}}le.exports={min:"zmin",max:"zmax",calc:z}}}),m_=U({"src/traces/contour/hover.js"(pe,le){var w=Lr(),R=Ax();le.exports=function(z,l,u,c,p){p||(p={}),p.isContour=!0;var f=R(z,l,u,c,p);return f&&f.forEach(function(v){var h=v.trace;h.contours.type==="constraint"&&(h.fillcolor&&w.opacity(h.fillcolor)?v.color=w.addOpacity(h.fillcolor,1):h.contours.showlines&&w.opacity(h.line.color)&&(v.color=w.addOpacity(h.line.color,1)))}),f}}}),g_=U({"src/traces/histogram2dcontour/index.js"(pe,le){le.exports={attributes:$A(),supplyDefaults:cb(),crossTraceDefaults:KE(),calc:uS(),plot:RM().plot,layerName:"contourlayer",style:Ub(),colorbar:nm(),hoverPoints:m_(),moduleType:"trace",name:"histogram2dcontour",basePlotModule:Rf(),categories:["cartesian","svg","2dMap","contour","histogram","showLegend"],meta:{}}}}),_y=U({"lib/histogram2dcontour.js"(pe,le){le.exports=g_()}}),e3=U({"src/traces/contour/constraint_defaults.js"(pe,le){var w=_t(),R=CM(),O=Lr(),z=O.addOpacity,l=O.opacity,u=t1(),c=ii().isArrayOrTypedArray,p=u.CONSTRAINT_REDUCTION,f=u.COMPARISON_OPS2;le.exports=function(m,_,x,A,E,D){var g=_.contours,C,I,N,F=x("contours.operation");if(g._operation=p[F],v(x,g),F==="="?C=g.showlines=!0:(C=x("contours.showlines"),N=x("fillcolor",z((m.line||{}).color||E,.5))),C){var k=N&&l(N)?z(_.fillcolor,1):E;I=x("line.color",k),x("line.width",2),x("line.dash")}x("line.smoothing"),R(x,A,I,D)};function v(h,m){var _;f.indexOf(m.operation)===-1?(h("contours.value",[0,1]),c(m.value)?m.value.length>2?m.value=m.value.slice(2):m.length===0?m.value=[0,1]:m.length<2?(_=parseFloat(m.value[0]),m.value=[_,_+1]):m.value=[parseFloat(m.value[0]),parseFloat(m.value[1])]:w(m.value)&&(_=parseFloat(m.value),m.value=[_,_+1])):(h("contours.value",0),w(m.value)||(c(m.value)?m.value=parseFloat(m.value[0]):m.value=0))}}}),iI=U({"src/traces/contour/defaults.js"(pe,le){var w=ii(),R=$E(),O=R1(),z=e3(),l=JE(),u=Tg(),c=BA(),p=s2();le.exports=function(v,h,m,_){function x(g,C){return w.coerce(v,h,p,g,C)}function A(g){return w.coerce2(v,h,p,g)}var E=R(v,h,x,_);if(!E){h.visible=!1;return}O(v,h,_,x),x("xhoverformat"),x("yhoverformat"),x("text"),x("hovertext"),x("hoverongaps"),x("hovertemplate");var D=x("contours.type")==="constraint";x("connectgaps",w.isArray1D(h.z)),D?z(v,h,x,_,m):(l(v,h,x,A),u(v,h,x,_)),h.contours&&h.contours.coloring==="heatmap"&&c(x,_),x("zorder")}}}),y_=U({"src/traces/contour/index.js"(pe,le){le.exports={attributes:s2(),supplyDefaults:iI(),calc:uS(),plot:RM().plot,style:Ub(),colorbar:nm(),hoverPoints:m_(),moduleType:"trace",name:"contour",basePlotModule:Rf(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}}}),ow=U({"lib/contour.js"(pe,le){le.exports=y_()}}),ET=U({"src/traces/scatterternary/attributes.js"(pe,le){var w=Js().hovertemplateAttrs,R=Js().texttemplateAttrs,O=Xc(),z=Kc(),l=Jn(),u=Jd(),c=jl().dash,p=Ar().extendFlat,f=z.marker,v=z.line,h=f.line;le.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:p({},z.mode,{dflt:"markers"}),text:p({},z.text,{}),texttemplate:R({editType:"plot"},{keys:["a","b","c","text"]}),hovertext:p({},z.hovertext,{}),line:{color:v.color,width:v.width,dash:c,backoff:v.backoff,shape:p({},v.shape,{values:["linear","spline"]}),smoothing:v.smoothing,editType:"calc"},connectgaps:z.connectgaps,cliponaxis:z.cliponaxis,fill:p({},z.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:O(),marker:p({symbol:f.symbol,opacity:f.opacity,angle:f.angle,angleref:f.angleref,standoff:f.standoff,maxdisplayed:f.maxdisplayed,size:f.size,sizeref:f.sizeref,sizemin:f.sizemin,sizemode:f.sizemode,line:p({width:h.width,editType:"calc"},u("marker.line")),gradient:f.gradient,editType:"calc"},u("marker")),textfont:z.textfont,textposition:z.textposition,selected:z.selected,unselected:z.unselected,hoverinfo:p({},l.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:z.hoveron,hovertemplate:w()}}}),t3=U({"src/traces/scatterternary/defaults.js"(pe,le){var w=ii(),R=hu(),O=Qd(),z=r0(),l=Xy(),u=g0(),c=y0(),p=Ch(),f=ET();le.exports=function(h,m,_,x){function A(F,k){return w.coerce(h,m,f,F,k)}var E=A("a"),D=A("b"),g=A("c"),C;if(E?(C=E.length,D?(C=Math.min(C,D.length),g&&(C=Math.min(C,g.length))):g?C=Math.min(C,g.length):C=0):D&&g&&(C=Math.min(D.length,g.length)),!C){m.visible=!1;return}m._length=C,A("sum"),A("text"),A("hovertext"),m.hoveron!=="fills"&&A("hovertemplate");var I=C<R.PTS_LINESONLY?"lines+markers":"lines";A("mode",I),O.hasMarkers(m)&&z(h,m,_,x,A,{gradient:!0}),O.hasLines(m)&&(l(h,m,_,x,A,{backoff:!0}),u(h,m,A),A("connectgaps")),O.hasText(m)&&(A("texttemplate"),c(h,m,x,A));var N=[];(O.hasMarkers(m)||O.hasText(m))&&(A("cliponaxis"),A("marker.maxdisplayed"),N.push("points")),A("fill"),m.fill!=="none"&&(p(h,m,_,A),O.hasLines(m)||u(h,m,A)),(m.fill==="tonext"||m.fill==="toself")&&N.push("fills"),A("hoveron",N.join("+")||"points"),w.coerceSelectionMarkerOpacity(m,A)}}}),aI=U({"src/traces/scatterternary/format_labels.js"(pe,le){var w=Yu();le.exports=function(O,z,l){var u={},c=l[z.subplot]._subplot;return u.aLabel=w.tickText(c.aaxis,O.a,!0).text,u.bLabel=w.tickText(c.baxis,O.b,!0).text,u.cLabel=w.tickText(c.caxis,O.c,!0).text,u}}}),WA=U({"src/traces/scatterternary/calc.js"(pe,le){var w=_t(),R=b0(),O=zm(),z=k1(),l=my().calcMarkerSize,u=["a","b","c"],c={a:["b","c"],b:["a","c"],c:["a","b"]};le.exports=function(f,v){var h=f._fullLayout[v.subplot],m=h.sum,_=v.sum||m,x={a:v.a,b:v.b,c:v.c},A=v.ids,E,D,g,C,I,N;for(E=0;E<u.length;E++)if(g=u[E],!x[g]){for(I=x[c[g][0]],N=x[c[g][1]],C=new Array(I.length),D=0;D<I.length;D++)C[D]=_-I[D]-N[D];x[g]=C}var F=v._length,k=new Array(F),P,T,y,S,M,W;for(E=0;E<F;E++)P=x.a[E],T=x.b[E],y=x.c[E],w(P)&&w(T)&&w(y)?(P=+P,T=+T,y=+y,S=m/(P+T+y),S!==1&&(P*=S,T*=S,y*=S),W=P,M=y-T,k[E]={x:M,y:W,a:P,b:T,c:y},A&&(k[E].id=A[E])):k[E]={x:!1,y:!1};return l(v,F),R(f,v),O(k,v),z(k,v),k}}}),n0=U({"src/traces/scatterternary/plot.js"(pe,le){var w=Ob();le.exports=function(O,z,l){var u=z.plotContainer;u.select(".scatterlayer").selectAll("*").remove();for(var c=z.xaxis,p=z.yaxis,f={xaxis:c,yaxis:p,plot:u,layerClipId:z._hasClipOnAxisFalse?z.clipIdRelative:null},v=z.layers.frontplot.select("g.scatterlayer"),h=0;h<l.length;h++){var m=l[h];m.length&&(m[0].trace._xA=c,m[0].trace._yA=p)}w(O,f,l,v)}}}),YA=U({"src/traces/scatterternary/hover.js"(pe,le){var w=sv();le.exports=function(O,z,l,u){var c=w(O,z,l,u);if(!c||c[0].index===!1)return;var p=c[0];if(p.index===void 0){var f=1-p.y0/O.ya._length,v=O.xa._length,h=v*f/2,m=v-h;return p.x0=Math.max(Math.min(p.x0,m),h),p.x1=Math.max(Math.min(p.x1,m),h),c}var _=p.cd[p.index],x=p.trace,A=p.subplot;p.a=_.a,p.b=_.b,p.c=_.c,p.xLabelVal=void 0,p.yLabelVal=void 0;var E={};E[x.subplot]={_subplot:A};var D=x._module.formatLabels(_,x,E);p.aLabel=D.aLabel,p.bLabel=D.bLabel,p.cLabel=D.cLabel;var g=_.hi||x.hoverinfo,C=[];function I(F,k){C.push(F._hovertitle+": "+k)}if(!x.hovertemplate){var N=g.split("+");N.indexOf("all")!==-1&&(N=["a","b","c"]),N.indexOf("a")!==-1&&I(A.aaxis,p.aLabel),N.indexOf("b")!==-1&&I(A.baxis,p.bLabel),N.indexOf("c")!==-1&&I(A.caxis,p.cLabel)}return p.extraText=C.join("<br>"),p.hovertemplate=x.hovertemplate,c}}}),vR=U({"src/traces/scatterternary/event_data.js"(pe,le){le.exports=function(R,O,z,l,u){if(O.xa&&(R.xaxis=O.xa),O.ya&&(R.yaxis=O.ya),l[u]){var c=l[u];R.a=c.a,R.b=c.b,R.c=c.c}else R.a=O.a,R.b=O.b,R.c=O.c;return R}}}),kM=U({"src/plots/ternary/ternary.js"(pe,le){var w=Ze(),R=or(),O=Mi(),z=ii(),l=z.strTranslate,u=z._,c=Lr(),p=ec(),f=Wy(),v=Ar().extendFlat,h=tp(),m=Yu(),_=Vp(),x=Dp(),A=m0(),E=A.freeMode,D=A.rectMode,g=Nv(),C=Vf().prepSelect,I=Vf().selectOnClick,N=Vf().clearOutline,F=Vf().clearSelectionsCache,k=pf();function P(G,ee){this.id=G.id,this.graphDiv=G.graphDiv,this.init(ee),this.makeFramework(ee),this.updateFx(ee),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}le.exports=P;var T=P.prototype;T.init=function(G){this.container=G._ternarylayer,this.defs=G._defs,this.layoutId=G._uid,this.traceHash={},this.layers={}},T.plot=function(G,ee){var re=this,fe=ee[re.id],we=ee._size;re._hasClipOnAxisFalse=!1;for(var Oe=0;Oe<G.length;Oe++){var ke=G[Oe][0].trace;if(ke.cliponaxis===!1){re._hasClipOnAxisFalse=!0;break}}re.updateLayers(fe),re.adjustLayout(fe,we),h.generalUpdatePerTraceModule(re.graphDiv,re,G,fe),re.layers.plotbg.select("path").call(c.fill,fe.bgcolor)},T.makeFramework=function(G){var ee=this,re=ee.graphDiv,fe=G[ee.id],we=ee.clipId="clip"+ee.layoutId+ee.id,Oe=ee.clipIdRelative="clip-relative"+ee.layoutId+ee.id;ee.clipDef=z.ensureSingleById(G._clips,"clipPath",we,function(ke){ke.append("path").attr("d","M0,0Z")}),ee.clipDefRelative=z.ensureSingleById(G._clips,"clipPath",Oe,function(ke){ke.append("path").attr("d","M0,0Z")}),ee.plotContainer=z.ensureSingle(ee.container,"g",ee.id),ee.updateLayers(fe),p.setClipUrl(ee.layers.backplot,we,re),p.setClipUrl(ee.layers.grids,we,re)},T.updateFx=function(G){G._ternarylayer.selectAll("g.toplevel").style("cursor",G.dragmode==="pan"?"move":"crosshair")},T.updateLayers=function(G){var ee=this,re=ee.layers,fe=["draglayer","plotbg","backplot","grids"];G.aaxis.layer==="below traces"&&fe.push("aaxis","aline"),G.baxis.layer==="below traces"&&fe.push("baxis","bline"),G.caxis.layer==="below traces"&&fe.push("caxis","cline"),fe.push("frontplot"),G.aaxis.layer==="above traces"&&fe.push("aaxis","aline"),G.baxis.layer==="above traces"&&fe.push("baxis","bline"),G.caxis.layer==="above traces"&&fe.push("caxis","cline");var we=ee.plotContainer.selectAll("g.toplevel").data(fe,String),Oe=["agrid","bgrid","cgrid"];we.enter().append("g").attr("class",function(ke){return"toplevel "+ke}).each(function(ke){var Le=w.select(this);re[ke]=Le,ke==="frontplot"?Le.append("g").classed("scatterlayer",!0):ke==="backplot"?Le.append("g").classed("maplayer",!0):ke==="plotbg"?Le.append("path").attr("d","M0,0Z"):ke==="aline"||ke==="bline"||ke==="cline"?Le.append("path"):ke==="grids"&&Oe.forEach(function(oe){re[oe]=Le.append("g").classed("grid "+oe,!0)})}),we.order()};var y=Math.sqrt(4/3);T.adjustLayout=function(G,ee){var re=this,fe=G.domain,we=(fe.x[0]+fe.x[1])/2,Oe=(fe.y[0]+fe.y[1])/2,ke=fe.x[1]-fe.x[0],Le=fe.y[1]-fe.y[0],oe=ke*ee.w,be=Le*ee.h,_e=G.sum,he=G.aaxis.min,De=G.baxis.min,xe=G.caxis.min,se,Ee,Te,Be,tt,at;oe>y*be?(Be=be,Te=Be*y):(Te=oe,Be=Te/y),tt=ke*Te/oe,at=Le*Be/be,se=ee.l+ee.w*we-Te/2,Ee=ee.t+ee.h*(1-Oe)-Be/2,re.x0=se,re.y0=Ee,re.w=Te,re.h=Be,re.sum=_e,re.xaxis={type:"linear",range:[he+2*xe-_e,_e-he-2*De],domain:[we-tt/2,we+tt/2],_id:"x"},f(re.xaxis,re.graphDiv._fullLayout),re.xaxis.setScale(),re.xaxis.isPtWithinRange=function(xt){return xt.a>=re.aaxis.range[0]&&xt.a<=re.aaxis.range[1]&&xt.b>=re.baxis.range[1]&&xt.b<=re.baxis.range[0]&&xt.c>=re.caxis.range[1]&&xt.c<=re.caxis.range[0]},re.yaxis={type:"linear",range:[he,_e-De-xe],domain:[Oe-at/2,Oe+at/2],_id:"y"},f(re.yaxis,re.graphDiv._fullLayout),re.yaxis.setScale(),re.yaxis.isPtWithinRange=function(){return!0};var gt=re.yaxis.domain[0],pt=re.aaxis=v({},G.aaxis,{range:[he,_e-De-xe],side:"left",tickangle:(+G.aaxis.tickangle||0)-30,domain:[gt,gt+at*y],anchor:"free",position:0,_id:"y",_length:Te});f(pt,re.graphDiv._fullLayout),pt.setScale();var Rt=re.baxis=v({},G.baxis,{range:[_e-he-xe,De],side:"bottom",domain:re.xaxis.domain,anchor:"free",position:0,_id:"x",_length:Te});f(Rt,re.graphDiv._fullLayout),Rt.setScale();var $t=re.caxis=v({},G.caxis,{range:[_e-he-De,xe],side:"right",tickangle:(+G.caxis.tickangle||0)+30,domain:[gt,gt+at*y],anchor:"free",position:0,_id:"y",_length:Te});f($t,re.graphDiv._fullLayout),$t.setScale();var Wt="M"+se+","+(Ee+Be)+"h"+Te+"l-"+Te/2+",-"+Be+"Z";re.clipDef.select("path").attr("d",Wt),re.layers.plotbg.select("path").attr("d",Wt);var Ht="M0,"+Be+"h"+Te+"l-"+Te/2+",-"+Be+"Z";re.clipDefRelative.select("path").attr("d",Ht);var Ft=l(se,Ee);re.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Ft),re.clipDefRelative.select("path").attr("transform",null);var st=l(se-Rt._offset,Ee+Be);re.layers.baxis.attr("transform",st),re.layers.bgrid.attr("transform",st);var rt=l(se+Te/2,Ee)+"rotate(30)"+l(0,-pt._offset);re.layers.aaxis.attr("transform",rt),re.layers.agrid.attr("transform",rt);var Ue=l(se+Te/2,Ee)+"rotate(-30)"+l(0,-$t._offset);re.layers.caxis.attr("transform",Ue),re.layers.cgrid.attr("transform",Ue),re.drawAxes(!0),re.layers.aline.select("path").attr("d",pt.showline?"M"+se+","+(Ee+Be)+"l"+Te/2+",-"+Be:"M0,0").call(c.stroke,pt.linecolor||"#000").style("stroke-width",(pt.linewidth||0)+"px"),re.layers.bline.select("path").attr("d",Rt.showline?"M"+se+","+(Ee+Be)+"h"+Te:"M0,0").call(c.stroke,Rt.linecolor||"#000").style("stroke-width",(Rt.linewidth||0)+"px"),re.layers.cline.select("path").attr("d",$t.showline?"M"+(se+Te/2)+","+Ee+"l"+Te/2+","+Be:"M0,0").call(c.stroke,$t.linecolor||"#000").style("stroke-width",($t.linewidth||0)+"px"),re.graphDiv._context.staticPlot||re.initInteractions(),p.setClipUrl(re.layers.frontplot,re._hasClipOnAxisFalse?null:re.clipId,re.graphDiv)},T.drawAxes=function(G){var ee=this,re=ee.graphDiv,fe=ee.id.substr(7)+"title",we=ee.layers,Oe=ee.aaxis,ke=ee.baxis,Le=ee.caxis;if(ee.drawAx(Oe),ee.drawAx(ke),ee.drawAx(Le),G){var oe=Math.max(Oe.showticklabels?Oe.tickfont.size/2:0,(Le.showticklabels?Le.tickfont.size*.75:0)+(Le.ticks==="outside"?Le.ticklen*.87:0)),be=(ke.showticklabels?ke.tickfont.size:0)+(ke.ticks==="outside"?ke.ticklen:0)+3;we["a-title"]=g.draw(re,"a"+fe,{propContainer:Oe,propName:ee.id+".aaxis.title",placeholder:u(re,"Click to enter Component A title"),attributes:{x:ee.x0+ee.w/2,y:ee.y0-Oe.title.font.size/3-oe,"text-anchor":"middle"}}),we["b-title"]=g.draw(re,"b"+fe,{propContainer:ke,propName:ee.id+".baxis.title",placeholder:u(re,"Click to enter Component B title"),attributes:{x:ee.x0-be,y:ee.y0+ee.h+ke.title.font.size*.83+be,"text-anchor":"middle"}}),we["c-title"]=g.draw(re,"c"+fe,{propContainer:Le,propName:ee.id+".caxis.title",placeholder:u(re,"Click to enter Component C title"),attributes:{x:ee.x0+ee.w+be,y:ee.y0+ee.h+Le.title.font.size*.83+be,"text-anchor":"middle"}})}},T.drawAx=function(G){var ee=this,re=ee.graphDiv,fe=G._name,we=fe.charAt(0),Oe=G._id,ke=ee.layers[fe],Le=30,oe=we+"tickLayout",be=S(G);ee[oe]!==be&&(ke.selectAll("."+Oe+"tick").remove(),ee[oe]=be),G.setScale();var _e=m.calcTicks(G),he=m.clipEnds(G,_e),De=m.makeTransTickFn(G),xe=m.getTickSigns(G)[2],se=z.deg2rad(Le),Ee=xe*(G.linewidth||1)/2,Te=xe*G.ticklen,Be=ee.w,tt=ee.h,at=we==="b"?"M0,"+Ee+"l"+Math.sin(se)*Te+","+Math.cos(se)*Te:"M"+Ee+",0l"+Math.cos(se)*Te+","+-Math.sin(se)*Te,gt={a:"M0,0l"+tt+",-"+Be/2,b:"M0,0l-"+Be/2+",-"+tt,c:"M0,0l-"+tt+","+Be/2}[we];m.drawTicks(re,G,{vals:G.ticks==="inside"?he:_e,layer:ke,path:at,transFn:De,crisp:!1}),m.drawGrid(re,G,{vals:he,layer:ee.layers[we+"grid"],path:gt,transFn:De,crisp:!1}),m.drawLabels(re,G,{vals:_e,layer:ke,transFn:De,labelFns:m.makeLabelFns(G,0,Le)})};function S(G){return G.ticks+String(G.ticklen)+String(G.showticklabels)}var M=k.MINZOOM/2+.87,W="m-0.87,.5h"+M+"v3h-"+(M+5.2)+"l"+(M/2+2.6)+",-"+(M*.87+4.5)+"l2.6,1.5l-"+M/2+","+M*.87+"Z",$="m0.87,.5h-"+M+"v3h"+(M+5.2)+"l-"+(M/2+2.6)+",-"+(M*.87+4.5)+"l-2.6,1.5l"+M/2+","+M*.87+"Z",Z="m0,1l"+M/2+","+M*.87+"l2.6,-1.5l-"+(M/2+2.6)+",-"+(M*.87+4.5)+"l-"+(M/2+2.6)+","+(M*.87+4.5)+"l2.6,1.5l"+M/2+",-"+M*.87+"Z",K="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",Q=!0;T.clearOutline=function(){F(this.dragOptions),N(this.dragOptions.gd)},T.initInteractions=function(){var G=this,ee=G.layers.plotbg.select("path").node(),re=G.graphDiv,fe=re._fullLayout._zoomlayer,we,Oe;this.dragOptions={element:ee,gd:re,plotinfo:{id:G.id,domain:re._fullLayout[G.id].domain,xaxis:G.xaxis,yaxis:G.yaxis},subplot:G.id,prepFn:function(st,rt,Ue){G.dragOptions.xaxes=[G.xaxis],G.dragOptions.yaxes=[G.yaxis],we=re._fullLayout._invScaleX,Oe=re._fullLayout._invScaleY;var xt=G.dragOptions.dragmode=re._fullLayout.dragmode;E(xt)?G.dragOptions.minDrag=1:G.dragOptions.minDrag=void 0,xt==="zoom"?(G.dragOptions.moveFn=Rt,G.dragOptions.clickFn=Be,G.dragOptions.doneFn=$t,tt(st,rt,Ue)):xt==="pan"?(G.dragOptions.moveFn=Ht,G.dragOptions.clickFn=Be,G.dragOptions.doneFn=Ft,Wt(),G.clearOutline(re)):(D(xt)||E(xt))&&C(st,rt,Ue,G.dragOptions,xt)}};var ke,Le,oe,be,_e,he,De,xe,se,Ee;function Te(st){var rt={};return rt[G.id+".aaxis.min"]=st.a,rt[G.id+".baxis.min"]=st.b,rt[G.id+".caxis.min"]=st.c,rt}function Be(st,rt){var Ue=re._fullLayout.clickmode;J(re),st===2&&(re.emit("plotly_doubleclick",null),O.call("_guiRelayout",re,Te({a:0,b:0,c:0}))),Ue.indexOf("select")>-1&&st===1&&I(rt,re,[G.xaxis],[G.yaxis],G.id,G.dragOptions),Ue.indexOf("event")>-1&&x.click(re,rt,G.id)}function tt(st,rt,Ue){var xt=ee.getBoundingClientRect();ke=rt-xt.left,Le=Ue-xt.top,re._fullLayout._calcInverseTransform(re);var Gt=re._fullLayout._invTransform,Jt=z.apply3DTransform(Gt)(ke,Le);ke=Jt[0],Le=Jt[1],oe={a:G.aaxis.range[0],b:G.baxis.range[1],c:G.caxis.range[1]},_e=oe,be=G.aaxis.range[1]-oe.a,he=R(G.graphDiv._fullLayout[G.id].bgcolor).getLuminance(),De="M0,"+G.h+"L"+G.w/2+", 0L"+G.w+","+G.h+"Z",xe=!1,se=fe.append("path").attr("class","zoombox").attr("transform",l(G.x0,G.y0)).style({fill:he>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",De),Ee=fe.append("path").attr("class","zoombox-corners").attr("transform",l(G.x0,G.y0)).style({fill:c.background,stroke:c.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),G.clearOutline(re)}function at(st,rt){return 1-rt/G.h}function gt(st,rt){return 1-(st+(G.h-rt)/Math.sqrt(3))/G.w}function pt(st,rt){return(st-(G.h-rt)/Math.sqrt(3))/G.w}function Rt(st,rt){var Ue=ke+st*we,xt=Le+rt*Oe,Gt=Math.max(0,Math.min(1,at(ke,Le),at(Ue,xt))),Jt=Math.max(0,Math.min(1,gt(ke,Le),gt(Ue,xt))),Ut=Math.max(0,Math.min(1,pt(ke,Le),pt(Ue,xt))),kr=(Gt/2+Ut)*G.w,Pr=(1-Gt/2-Jt)*G.w,$r=(kr+Pr)/2,rn=Pr-kr,kn=(1-Gt)*G.h,Rn=kn-rn/y;rn<k.MINZOOM?(_e=oe,se.attr("d",De),Ee.attr("d","M0,0Z")):(_e={a:oe.a+Gt*be,b:oe.b+Jt*be,c:oe.c+Ut*be},se.attr("d",De+"M"+kr+","+kn+"H"+Pr+"L"+$r+","+Rn+"L"+kr+","+kn+"Z"),Ee.attr("d","M"+ke+","+Le+K+"M"+kr+","+kn+W+"M"+Pr+","+kn+$+"M"+$r+","+Rn+Z)),xe||(se.transition().style("fill",he>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),Ee.transition().style("opacity",1).duration(200),xe=!0),re.emit("plotly_relayouting",Te(_e))}function $t(){J(re),_e!==oe&&(O.call("_guiRelayout",re,Te(_e)),Q&&re.data&&re._context.showTips&&(z.notifier(u(re,"Double-click to zoom back out"),"long"),Q=!1))}function Wt(){oe={a:G.aaxis.range[0],b:G.baxis.range[1],c:G.caxis.range[1]},_e=oe}function Ht(st,rt){var Ue=st/G.xaxis._m,xt=rt/G.yaxis._m;_e={a:oe.a-xt,b:oe.b+(Ue+xt)/2,c:oe.c-(Ue-xt)/2};var Gt=[_e.a,_e.b,_e.c].sort(z.sorterAsc),Jt={a:Gt.indexOf(_e.a),b:Gt.indexOf(_e.b),c:Gt.indexOf(_e.c)};Gt[0]<0&&(Gt[1]+Gt[0]/2<0?(Gt[2]+=Gt[0]+Gt[1],Gt[0]=Gt[1]=0):(Gt[2]+=Gt[0]/2,Gt[1]+=Gt[0]/2,Gt[0]=0),_e={a:Gt[Jt.a],b:Gt[Jt.b],c:Gt[Jt.c]},rt=(oe.a-_e.a)*G.yaxis._m,st=(oe.c-_e.c-oe.b+_e.b)*G.xaxis._m);var Ut=l(G.x0+st,G.y0+rt);G.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Ut);var kr=l(-st,-rt);G.clipDefRelative.select("path").attr("transform",kr),G.aaxis.range=[_e.a,G.sum-_e.b-_e.c],G.baxis.range=[G.sum-_e.a-_e.c,_e.b],G.caxis.range=[G.sum-_e.a-_e.b,_e.c],G.drawAxes(!1),G._hasClipOnAxisFalse&&G.plotContainer.select(".scatterlayer").selectAll(".trace").call(p.hideOutsideRangePoints,G),re.emit("plotly_relayouting",Te(_e))}function Ft(){O.call("_guiRelayout",re,Te(_e))}ee.onmousemove=function(st){x.hover(re,st,G.id),re._fullLayout._lasthover=ee,re._fullLayout._hoversubplot=G.id},ee.onmouseout=function(st){re._dragging||_.unhover(re,st)},_.init(this.dragOptions)};function J(G){w.select(G).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}}}),mR=U({"src/plots/ternary/layout_attributes.js"(pe,le){var w=jn(),R=oh().attributes,O=Hg(),z=zl().overrideAll,l=Ar().extendFlat,u={title:{text:O.title.text,font:O.title.font},color:O.color,tickmode:O.minor.tickmode,nticks:l({},O.nticks,{dflt:6,min:1}),tick0:O.tick0,dtick:O.dtick,tickvals:O.tickvals,ticktext:O.ticktext,ticks:O.ticks,ticklen:O.ticklen,tickwidth:O.tickwidth,tickcolor:O.tickcolor,ticklabelstep:O.ticklabelstep,showticklabels:O.showticklabels,labelalias:O.labelalias,showtickprefix:O.showtickprefix,tickprefix:O.tickprefix,showticksuffix:O.showticksuffix,ticksuffix:O.ticksuffix,showexponent:O.showexponent,exponentformat:O.exponentformat,minexponent:O.minexponent,separatethousands:O.separatethousands,tickfont:O.tickfont,tickangle:O.tickangle,tickformat:O.tickformat,tickformatstops:O.tickformatstops,hoverformat:O.hoverformat,showline:l({},O.showline,{dflt:!0}),linecolor:O.linecolor,linewidth:O.linewidth,showgrid:l({},O.showgrid,{dflt:!0}),gridcolor:O.gridcolor,gridwidth:O.gridwidth,griddash:O.griddash,layer:O.layer,min:{valType:"number",dflt:0,min:0}},c=le.exports=z({domain:R({name:"ternary"}),bgcolor:{valType:"color",dflt:w.background},sum:{valType:"number",dflt:1,min:0},aaxis:u,baxis:u,caxis:u},"plot","from-root");c.uirevision={valType:"any",editType:"none"},c.aaxis.uirevision=c.baxis.uirevision=c.caxis.uirevision={valType:"any",editType:"none"}}}),cS=U({"src/plots/subplot_defaults.js"(pe,le){var w=ii(),R=Tc(),O=oh().defaults;le.exports=function(l,u,c,p){var f=p.type,v=p.attributes,h=p.handleDefaults,m=p.partition||"x",_=u._subplots[f],x=_.length,A=x&&_[0].replace(/\d+$/,""),E,D;function g(F,k){return w.coerce(E,D,v,F,k)}for(var C=0;C<x;C++){var I=_[C];l[I]?E=l[I]:E=l[I]={},D=R.newContainer(u,I,A),p.noUirevision||g("uirevision",u.uirevision);var N={};N[m]=[C/x,(C+1)/x],O(D,u,g,N),p.id=I,h(E,D,g,p)}}}}),H0=U({"src/plots/ternary/layout_defaults.js"(pe,le){var w=Lr(),R=Tc(),O=ii(),z=cS(),l=A1(),u=Xw(),c=rb(),p=n_(),f=Jy(),v=mR(),h=["aaxis","baxis","caxis"];le.exports=function(A,E,D){z(A,E,D,{type:"ternary",attributes:v,handleDefaults:m,font:E.font,paper_bgcolor:E.paper_bgcolor})};function m(x,A,E,D){var g=E("bgcolor"),C=E("sum");D.bgColor=w.combine(g,D.paper_bgcolor);for(var I,N,F,k=0;k<h.length;k++)I=h[k],N=x[I]||{},F=R.newContainer(A,I),F._name=I,_(N,F,D,A);var P=A.aaxis,T=A.baxis,y=A.caxis;P.min+T.min+y.min>=C&&(P.min=0,T.min=0,y.min=0,x.aaxis&&delete x.aaxis.min,x.baxis&&delete x.baxis.min,x.caxis&&delete x.caxis.min)}function _(x,A,E,D){var g=v[A._name];function C(S,M){return O.coerce(x,A,g,S,M)}C("uirevision",D.uirevision),A.type="linear";var I=C("color"),N=I!==g.color.dflt?I:E.font.color,F=A._name,k=F.charAt(0).toUpperCase(),P="Component "+k,T=C("title.text",P);A._hovertitle=T===P?T:k,O.coerceFont(C,"title.font",E.font,{overrideDflt:{size:O.bigFont(E.font.size),color:N}}),C("min"),p(x,A,C,"linear"),u(x,A,C,"linear"),l(x,A,C,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),c(x,A,C,{outerTicks:!0});var y=C("showticklabels");y&&(O.coerceFont(C,"tickfont",E.font,{overrideDflt:{color:N}}),C("tickangle"),C("tickformat")),f(x,A,C,{dfltColor:I,bgColor:E.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:g}),C("hoverformat"),C("layer")}}}),uv=U({"src/plots/ternary/index.js"(pe){var le=kM(),w=Om().getSubplotCalcData,R=ii().counterRegex,O="ternary";pe.name=O;var z=pe.attr="subplot";pe.idRoot=O,pe.idRegex=pe.attrRegex=R(O);var l=pe.attributes={};l[z]={valType:"subplotid",dflt:"ternary",editType:"calc"},pe.layoutAttributes=mR(),pe.supplyLayoutDefaults=H0(),pe.plot=function(c){for(var p=c._fullLayout,f=c.calcdata,v=p._subplots[O],h=0;h<v.length;h++){var m=v[h],_=w(f,O,m),x=p[m]._subplot;x||(x=new le({id:m,graphDiv:c,container:p._ternarylayer.node()},p),p[m]._subplot=x),x.plot(_,p,c._promises)}},pe.clean=function(u,c,p,f){for(var v=f._subplots[O]||[],h=0;h<v.length;h++){var m=v[h],_=f[m]._subplot;!c[m]&&_&&(_.plotContainer.remove(),_.clipDef.remove(),_.clipDefRelative.remove(),_.layers["a-title"].remove(),_.layers["b-title"].remove(),_.layers["c-title"].remove())}},pe.updateFx=function(u){var c=u._fullLayout;c._ternarylayer.selectAll("g.toplevel").style("cursor",c.dragmode==="pan"?"move":"crosshair")}}}),r1=U({"src/traces/scatterternary/index.js"(pe,le){le.exports={attributes:ET(),supplyDefaults:t3(),colorbar:qg(),formatLabels:aI(),calc:WA(),plot:n0(),style:z0().style,styleOnSelect:z0().styleOnSelect,hoverPoints:YA(),selectPoints:qd(),eventData:vR(),moduleType:"trace",name:"scatterternary",basePlotModule:uv(),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}}}),n1=U({"lib/scatterternary.js"(pe,le){le.exports=r1()}}),r3=U({"src/traces/violin/attributes.js"(pe,le){var w=HE(),R=Ar().extendFlat,O=Wp().axisHoverFormat;le.exports={y:w.y,x:w.x,x0:w.x0,y0:w.y0,xhoverformat:O("x"),yhoverformat:O("y"),name:R({},w.name,{}),orientation:R({},w.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:w.fillcolor,points:R({},w.boxpoints,{}),jitter:R({},w.jitter,{}),pointpos:R({},w.pointpos,{}),width:R({},w.width,{}),marker:w.marker,text:w.text,hovertext:w.hovertext,hovertemplate:w.hovertemplate,quartilemethod:w.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:w.offsetgroup,alignmentgroup:w.alignmentgroup,selected:w.selected,unselected:w.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"},zorder:w.zorder}}}),b_=U({"src/traces/violin/layout_attributes.js"(pe,le){var w=jE(),R=ii().extendFlat;le.exports={violinmode:R({},w.boxmode,{}),violingap:R({},w.boxgap,{}),violingroupgap:R({},w.boxgroupgap,{})}}}),Cx=U({"src/traces/violin/defaults.js"(pe,le){var w=ii(),R=Lr(),O=VE(),z=r3();le.exports=function(u,c,p,f){function v(y,S){return w.coerce(u,c,z,y,S)}function h(y,S){return w.coerce2(u,c,z,y,S)}if(O.handleSampleDefaults(u,c,v,f),c.visible!==!1){v("bandwidth"),v("side");var m=v("width");m||(v("scalegroup",c.name),v("scalemode"));var _=v("span"),x;Array.isArray(_)&&(x="manual"),v("spanmode",x);var A=v("line.color",(u.marker||{}).color||p),E=v("line.width"),D=v("fillcolor",R.addOpacity(c.line.color,.5));O.handlePointsDefaults(u,c,v,{prefix:""});var g=h("box.width"),C=h("box.fillcolor",D),I=h("box.line.color",A),N=h("box.line.width",E),F=v("box.visible",!!(g||C||I||N));F||(c.box={visible:!1});var k=h("meanline.color",A),P=h("meanline.width",E),T=v("meanline.visible",!!(k||P));T||(c.meanline={visible:!1}),v("quartilemethod"),v("zorder")}}}}),nf=U({"src/traces/violin/layout_defaults.js"(pe,le){var w=ii(),R=b_(),O=tw();le.exports=function(l,u,c){function p(f,v){return w.coerce(l,u,R,f,v)}O._supply(l,u,c,p,"violin")}}}),x_=U({"src/traces/violin/helpers.js"(pe){var le=ii(),w={gaussian:function(R){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*R*R)}};pe.makeKDE=function(R,O,z){var l=z.length,u=w.gaussian,c=R.bandwidth,p=1/(l*c);return function(f){for(var v=0,h=0;h<l;h++)v+=u((f-z[h])/c);return p*v}},pe.getPositionOnKdePath=function(R,O,z){var l,u;O.orientation==="h"?(l="y",u="x"):(l="x",u="y");var c=le.findPointOnPath(R.path,z,u,{pathLength:R.pathLength}),p=R.posCenterPx,f=c[l],v=O.side==="both"?2*p-f:p;return[f,v]},pe.getKdeValue=function(R,O,z){var l=R.pts.map(pe.extractVal),u=pe.makeKDE(R,O,l);return u(z)/R.posDensityScale},pe.extractVal=function(R){return R.v}}}),L1=U({"src/traces/violin/calc.js"(pe,le){var w=ii(),R=Yu(),O=lR(),z=x_(),l=Dt().BADNUM;le.exports=function(v,h){var m=O(v,h);if(m[0].t.empty)return m;for(var _=v._fullLayout,x=R.getFromId(v,h[h.orientation==="h"?"xaxis":"yaxis"]),A=1/0,E=-1/0,D=0,g=0,C=0;C<m.length;C++){var I=m[C],N=I.pts.map(z.extractVal),F=I.bandwidth=c(h,I,N),k=I.span=p(h,I,x,F);if(I.min===I.max&&F===0)k=I.span=[I.min,I.max],I.density=[{v:1,t:k[0]}],I.bandwidth=F,D=Math.max(D,1);else{var P=k[1]-k[0],T=Math.ceil(P/(F/3)),y=P/T;if(!isFinite(y)||!isFinite(T))return w.error("Something went wrong with computing the violin span"),m[0].t.empty=!0,m;var S=z.makeKDE(I,h,N);I.density=new Array(T);for(var M=0,W=k[0];W<k[1]+y/2;M++,W+=y){var $=S(W);I.density[M]={v:$,t:W},D=Math.max(D,$)}}g=Math.max(g,N.length),A=Math.min(A,k[0]),E=Math.max(E,k[1])}var Z=R.findExtremes(x,[A,E],{padded:!0});if(h._extremes[x._id]=Z,h.width)m[0].t.maxKDE=D;else{var K=_._violinScaleGroupStats,Q=h.scalegroup,J=K[Q];J?(J.maxKDE=Math.max(J.maxKDE,D),J.maxCount=Math.max(J.maxCount,g)):K[Q]={maxKDE:D,maxCount:g}}return m[0].t.labels.kde=w._(v,"kde:"),m};function u(f,v,h){var m=Math.min(v,h/1.349);return 1.059*m*Math.pow(f,-.2)}function c(f,v,h){var m=v.max-v.min;if(!m)return f.bandwidth?f.bandwidth:0;if(f.bandwidth)return Math.max(f.bandwidth,m/1e4);var _=h.length,x=w.stdev(h,_-1,v.mean);return Math.max(u(_,x,v.q3-v.q1),m/100)}function p(f,v,h,m){var _=f.spanmode,x=f.span||[],A=[v.min,v.max],E=[v.min-2*m,v.max+2*m],D;function g(I){var N=x[I],F=h.type==="multicategory"?h.r2c(N):h.d2c(N,0,f[v.valLetter+"calendar"]);return F===l?E[I]:F}_==="soft"?D=E:_==="hard"?D=A:D=[g(0),g(1)];var C={type:"linear",range:D};return R.setConvert(C),C.cleanRange(),D}}}),_0=U({"src/traces/violin/cross_trace_calc.js"(pe,le){var w=qE().setPositionOffset,R=["v","h"];le.exports=function(z,l){for(var u=z.calcdata,c=l.xaxis,p=l.yaxis,f=0;f<R.length;f++){for(var v=R[f],h=v==="h"?p:c,m=[],_=0;_<u.length;_++){var x=u[_],A=x[0].t,E=x[0].trace;E.visible===!0&&E.type==="violin"&&!A.empty&&E.orientation===v&&E.xaxis===c._id&&E.yaxis===p._id&&m.push(_)}w("violin",z,m,h)}}}}),fS=U({"src/traces/violin/plot.js"(pe,le){var w=Ze(),R=ii(),O=ec(),z=OA(),l=tm(),u=x_();le.exports=function(p,f,v,h){var m=p._context.staticPlot,_=p._fullLayout,x=f.xaxis,A=f.yaxis;function E(D,g){var C=l(D,{xaxis:x,yaxis:A,trace:g,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return O.smoothopen(C[0],1)}R.makeTraceGroups(h,v,"trace violins").each(function(D){var g=w.select(this),C=D[0],I=C.t,N=C.trace;if(N.visible!==!0||I.empty){g.remove();return}var F=I.bPos,k=I.bdPos,P=f[I.valLetter+"axis"],T=f[I.posLetter+"axis"],y=N.side==="both",S=y||N.side==="positive",M=y||N.side==="negative",W=g.selectAll("path.violin").data(R.identity);W.enter().append("path").style("vector-effect",m?"none":"non-scaling-stroke").attr("class","violin"),W.exit().remove(),W.each(function(re){var fe=w.select(this),we=re.density,Oe=we.length,ke=T.c2l(re.pos+F,!0),Le=T.l2p(ke),oe;if(N.width)oe=I.maxKDE/k;else{var be=_._violinScaleGroupStats[N.scalegroup];oe=N.scalemode==="count"?be.maxKDE/k*(be.maxCount/re.pts.length):be.maxKDE/k}var _e,he,De,xe,se,Ee,Te;if(S){for(Ee=new Array(Oe),xe=0;xe<Oe;xe++)Te=Ee[xe]={},Te[I.posLetter]=ke+we[xe].v/oe,Te[I.valLetter]=P.c2l(we[xe].t,!0);_e=E(Ee,N)}if(M){for(Ee=new Array(Oe),se=0,xe=Oe-1;se<Oe;se++,xe--)Te=Ee[se]={},Te[I.posLetter]=ke-we[xe].v/oe,Te[I.valLetter]=P.c2l(we[xe].t,!0);he=E(Ee,N)}if(y)De=_e+"L"+he.substr(1)+"Z";else{var Be=[Le,P.c2p(we[0].t)],tt=[Le,P.c2p(we[Oe-1].t)];N.orientation==="h"&&(Be.reverse(),tt.reverse()),S?De="M"+Be+"L"+_e.substr(1)+"L"+tt:De="M"+tt+"L"+he.substr(1)+"L"+Be}fe.attr("d",De),re.posCenterPx=Le,re.posDensityScale=oe*k,re.path=fe.node(),re.pathLength=re.path.getTotalLength()/(y?2:1)});var $=N.box,Z=$.width,K=($.line||{}).width,Q,J;y?(Q=k*Z,J=0):S?(Q=[0,k*Z/2],J=K*{x:1,y:-1}[I.posLetter]):(Q=[k*Z/2,0],J=K*{x:-1,y:1}[I.posLetter]),z.plotBoxAndWhiskers(g,{pos:T,val:P},N,{bPos:F,bdPos:Q,bPosPxOffset:J}),z.plotBoxMean(g,{pos:T,val:P},N,{bPos:F,bdPos:Q,bPosPxOffset:J});var G;!N.box.visible&&N.meanline.visible&&(G=R.identity);var ee=g.selectAll("path.meanline").data(G||[]);ee.enter().append("path").attr("class","meanline").style("fill","none").style("vector-effect",m?"none":"non-scaling-stroke"),ee.exit().remove(),ee.each(function(re){var fe=P.c2p(re.mean,!0),we=u.getPositionOnKdePath(re,N,fe);w.select(this).attr("d",N.orientation==="h"?"M"+fe+","+we[0]+"V"+we[1]:"M"+we[0]+","+fe+"H"+we[1])}),z.plotPoints(g,{x,y:A},N,I)})}}}),Hb=U({"src/traces/violin/style.js"(pe,le){var w=Ze(),R=Lr(),O=z0().stylePoints;le.exports=function(l){var u=w.select(l).selectAll("g.trace.violins");u.style("opacity",function(c){return c[0].trace.opacity}),u.each(function(c){var p=c[0].trace,f=w.select(this),v=p.box||{},h=v.line||{},m=p.meanline||{},_=m.width;f.selectAll("path.violin").style("stroke-width",p.line.width+"px").call(R.stroke,p.line.color).call(R.fill,p.fillcolor),f.selectAll("path.box").style("stroke-width",h.width+"px").call(R.stroke,h.color).call(R.fill,v.fillcolor);var x={"stroke-width":_+"px","stroke-dasharray":2*_+"px,"+_+"px"};f.selectAll("path.mean").style(x).call(R.stroke,m.color),f.selectAll("path.meanline").style(x).call(R.stroke,m.color),O(f,p,l)})}}}),Mx=U({"src/traces/violin/hover.js"(pe,le){var w=Lr(),R=ii(),O=Yu(),z=FA(),l=x_();le.exports=function(c,p,f,v,h){h||(h={});var m=h.hoverLayer,_=c.cd,x=_[0].trace,A=x.hoveron,E=A.indexOf("violins")!==-1,D=A.indexOf("kde")!==-1,g=[],C,I;if(E||D){var N=z.hoverOnBoxes(c,p,f,v);if(D&&N.length>0){var F=c.xa,k=c.ya,P,T,y,S,M;x.orientation==="h"?(M=p,P="y",y=k,T="x",S=F):(M=f,P="x",y=F,T="y",S=k);var W=_[c.index];if(M>=W.span[0]&&M<=W.span[1]){var $=R.extendFlat({},c),Z=S.c2p(M,!0),K=l.getKdeValue(W,x,M),Q=l.getPositionOnKdePath(W,x,Z),J=y._offset,G=y._length;$[P+"0"]=Q[0],$[P+"1"]=Q[1],$[T+"0"]=$[T+"1"]=Z,$[T+"Label"]=T+": "+O.hoverLabelText(S,M,x[T+"hoverformat"])+", "+_[0].t.labels.kde+" "+K.toFixed(3);for(var ee=0,re=0;re<N.length;re++)if(N[re].attr==="med"){ee=re;break}$.spikeDistance=N[ee].spikeDistance;var fe=P+"Spike";$[fe]=N[ee][fe],N[ee].spikeDistance=void 0,N[ee][fe]=void 0,$.hovertemplate=!1,g.push($),I={},I[P+"1"]=R.constrain(J+Q[0],J,J+G),I[P+"2"]=R.constrain(J+Q[1],J,J+G),I[T+"1"]=I[T+"2"]=S._offset+Z}}E&&(g=g.concat(N))}A.indexOf("points")!==-1&&(C=z.hoverOnPoints(c,p,f));var we=m.selectAll(".violinline-"+x.uid).data(I?[0]:[]);return we.enter().append("line").classed("violinline-"+x.uid,!0).attr("stroke-width",1.5),we.exit().remove(),we.attr(I).call(w.stroke,c.color),v==="closest"?C?[C]:g:(C&&g.push(C),g)}}}),rp=U({"src/traces/violin/index.js"(pe,le){le.exports={attributes:r3(),layoutAttributes:b_(),supplyDefaults:Cx(),crossTraceDefaults:VE().crossTraceDefaults,supplyLayoutDefaults:nf(),calc:L1(),crossTraceCalc:_0(),plot:fS(),style:Hb(),styleOnSelect:z0().styleOnSelect,hoverPoints:Mx(),selectPoints:Qk(),moduleType:"trace",name:"violin",basePlotModule:Rf(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}}}),n3=U({"lib/violin.js"(pe,le){le.exports=rp()}}),sw=U({"src/traces/funnel/constants.js"(pe,le){le.exports={eventDataKeys:["percentInitial","percentPrevious","percentTotal"]}}}),c2=U({"src/traces/funnel/attributes.js"(pe,le){var w=rm(),R=Kc().line,O=Jn(),z=Wp().axisHoverFormat,l=Js().hovertemplateAttrs,u=Js().texttemplateAttrs,c=sw(),p=Ar().extendFlat,f=Lr();le.exports={x:w.x,x0:w.x0,dx:w.dx,y:w.y,y0:w.y0,dy:w.dy,xperiod:w.xperiod,yperiod:w.yperiod,xperiod0:w.xperiod0,yperiod0:w.yperiod0,xperiodalignment:w.xperiodalignment,yperiodalignment:w.yperiodalignment,xhoverformat:z("x"),yhoverformat:z("y"),hovertext:w.hovertext,hovertemplate:l({},{keys:c.eventDataKeys}),hoverinfo:p({},O.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:u({editType:"plot"},{keys:c.eventDataKeys.concat(["label","value"])}),text:w.text,textposition:w.textposition,insidetextanchor:p({},w.insidetextanchor,{dflt:"middle"}),textangle:p({},w.textangle,{dflt:0}),textfont:w.textfont,insidetextfont:w.insidetextfont,outsidetextfont:w.outsidetextfont,constraintext:w.constraintext,cliponaxis:w.cliponaxis,orientation:p({},w.orientation,{}),offset:p({},w.offset,{arrayOk:!1}),width:p({},w.width,{arrayOk:!1}),marker:v(),connector:{fillcolor:{valType:"color",editType:"style"},line:{color:p({},R.color,{dflt:f.defaultLine}),width:p({},R.width,{dflt:0,editType:"plot"}),dash:R.dash,editType:"style"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:w.offsetgroup,alignmentgroup:w.alignmentgroup,zorder:w.zorder};function v(){var h=p({},w.marker);return delete h.pattern,delete h.cornerradius,h}}}),j0=U({"src/traces/funnel/layout_attributes.js"(pe,le){le.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"}}}}),w0=U({"src/traces/funnel/defaults.js"(pe,le){var w=ii(),R=rg(),O=zb().handleText,z=ib(),l=R1(),u=c2(),c=Lr();function p(h,m,_,x){function A(F,k){return w.coerce(h,m,u,F,k)}var E=z(h,m,x,A);if(!E){m.visible=!1;return}l(h,m,x,A),A("xhoverformat"),A("yhoverformat"),A("orientation",m.y&&!m.x?"v":"h"),A("offset"),A("width");var D=A("text");A("hovertext"),A("hovertemplate");var g=A("textposition");O(h,m,x,A,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),m.textposition!=="none"&&!m.texttemplate&&A("textinfo",w.isArrayOrTypedArray(D)?"text+value":"value");var C=A("marker.color",_);A("marker.line.color",c.defaultLine),A("marker.line.width");var I=A("connector.visible");if(I){A("connector.fillcolor",f(C));var N=A("connector.line.width");N&&(A("connector.line.color"),A("connector.line.dash"))}A("zorder")}function f(h){var m=w.isArrayOrTypedArray(h)?"#000":h;return c.addOpacity(m,.5*c.opacity(m))}function v(h,m){var _,x;function A(D){return w.coerce(x._input,x,u,D)}for(var E=0;E<h.length;E++)x=h[E],x.type==="funnel"&&(_=x._input,R(_,x,m,A,m.funnelmode))}le.exports={supplyDefaults:p,crossTraceDefaults:v}}}),np=U({"src/traces/funnel/layout_defaults.js"(pe,le){var w=ii(),R=j0();le.exports=function(O,z,l){var u=!1;function c(v,h){return w.coerce(O,z,R,v,h)}for(var p=0;p<l.length;p++){var f=l[p];if(f.visible&&f.type==="funnel"){u=!0;break}}u&&(c("funnelmode"),c("funnelgap",.2),c("funnelgroupgap"))}}}),Rx=U({"src/traces/funnel/arrays_to_calcdata.js"(pe,le){var w=ii();le.exports=function(O,z){for(var l=0;l<O.length;l++)O[l].i=l;w.mergeArray(z.text,O,"tx"),w.mergeArray(z.hovertext,O,"htx");var u=z.marker;if(u){w.mergeArray(u.opacity,O,"mo"),w.mergeArray(u.color,O,"mc");var c=u.line;c&&(w.mergeArray(c.color,O,"mlc"),w.mergeArrayCastPositive(c.width,O,"mlw"))}}}}),V0=U({"src/traces/funnel/calc.js"(pe,le){var w=Yu(),R=Zy(),O=Rx(),z=k1(),l=Dt().BADNUM;le.exports=function(p,f){var v=w.getFromId(p,f.xaxis||"x"),h=w.getFromId(p,f.yaxis||"y"),m,_,x,A,E,D,g,C;f.orientation==="h"?(m=v.makeCalcdata(f,"x"),x=h.makeCalcdata(f,"y"),A=R(f,h,"y",x),E=!!f.yperiodalignment,D="y"):(m=h.makeCalcdata(f,"y"),x=v.makeCalcdata(f,"x"),A=R(f,v,"x",x),E=!!f.xperiodalignment,D="x"),_=A.vals;var I=Math.min(_.length,m.length),N=new Array(I);for(f._base=[],g=0;g<I;g++){m[g]<0&&(m[g]=l);var F=!1;m[g]!==l&&g+1<I&&m[g+1]!==l&&(F=!0),C=N[g]={p:_[g],s:m[g],cNext:F},f._base[g]=-.5*C.s,E&&(N[g].orig_p=x[g],N[g][D+"End"]=A.ends[g],N[g][D+"Start"]=A.starts[g]),f.ids&&(C.id=String(f.ids[g])),g===0&&(N[0].vTotal=0),N[0].vTotal+=u(C.s),C.begR=u(C.s)/u(N[0].s)}var k;for(g=0;g<I;g++)C=N[g],C.s!==l&&(C.sumR=C.s/N[0].vTotal,C.difR=k!==void 0?C.s/k:1,k=C.s);return O(N,f),z(N,f),N};function u(c){return c===l?0:c}}}),jb=U({"src/traces/funnel/cross_trace_calc.js"(pe,le){var w=F0().setGroupPositions;le.exports=function(O,z){var l=O._fullLayout,u=O._fullData,c=O.calcdata,p=z.xaxis,f=z.yaxis,v=[],h=[],m=[],_,x;for(x=0;x<u.length;x++){var A=u[x],E=A.orientation==="h";A.visible===!0&&A.xaxis===p._id&&A.yaxis===f._id&&A.type==="funnel"&&(_=c[x],E?m.push(_):h.push(_),v.push(_))}var D={mode:l.funnelmode,norm:l.funnelnorm,gap:l.funnelgap,groupgap:l.funnelgroupgap};for(w(O,p,f,h,D),w(O,f,p,m,D),x=0;x<v.length;x++){_=v[x];for(var g=0;g<_.length;g++)g+1<_.length&&(_[g].nextP0=_[g+1].p0,_[g].nextS0=_[g+1].s0,_[g].nextP1=_[g+1].p1,_[g].nextS1=_[g+1].s1)}}}}),im=U({"src/traces/funnel/plot.js"(pe,le){var w=Ze(),R=ii(),O=ec(),z=Dt().BADNUM,l=by(),u=x0().clearMinTextSize;le.exports=function(h,m,_,x){var A=h._fullLayout;u("funnel",A),c(h,m,_,x),p(h,m,_,x),l.plot(h,m,_,x,{mode:A.funnelmode,norm:A.funnelmode,gap:A.funnelgap,groupgap:A.funnelgroupgap})};function c(v,h,m,_){var x=h.xaxis,A=h.yaxis;R.makeTraceGroups(_,m,"trace bars").each(function(E){var D=w.select(this),g=E[0].trace,C=R.ensureSingle(D,"g","regions");if(!g.connector||!g.connector.visible){C.remove();return}var I=g.orientation==="h",N=C.selectAll("g.region").data(R.identity);N.enter().append("g").classed("region",!0),N.exit().remove();var F=N.size();N.each(function(k,P){if(!(P!==F-1&&!k.cNext)){var T=f(k,x,A,I),y=T[0],S=T[1],M="";y[0]!==z&&S[0]!==z&&y[1]!==z&&S[1]!==z&&y[2]!==z&&S[2]!==z&&y[3]!==z&&S[3]!==z&&(I?M+="M"+y[0]+","+S[1]+"L"+y[2]+","+S[2]+"H"+y[3]+"L"+y[1]+","+S[1]+"Z":M+="M"+y[1]+","+S[1]+"L"+y[2]+","+S[3]+"V"+S[2]+"L"+y[1]+","+S[0]+"Z"),M===""&&(M="M0,0Z"),R.ensureSingle(w.select(this),"path").attr("d",M).call(O.setClipUrl,h.layerClipId,v)}})})}function p(v,h,m,_){var x=h.xaxis,A=h.yaxis;R.makeTraceGroups(_,m,"trace bars").each(function(E){var D=w.select(this),g=E[0].trace,C=R.ensureSingle(D,"g","lines");if(!g.connector||!g.connector.visible||!g.connector.line.width){C.remove();return}var I=g.orientation==="h",N=C.selectAll("g.line").data(R.identity);N.enter().append("g").classed("line",!0),N.exit().remove();var F=N.size();N.each(function(k,P){if(!(P!==F-1&&!k.cNext)){var T=f(k,x,A,I),y=T[0],S=T[1],M="";y[3]!==void 0&&S[3]!==void 0&&(I?(M+="M"+y[0]+","+S[1]+"L"+y[2]+","+S[2],M+="M"+y[1]+","+S[1]+"L"+y[3]+","+S[2]):(M+="M"+y[1]+","+S[1]+"L"+y[2]+","+S[3],M+="M"+y[1]+","+S[0]+"L"+y[2]+","+S[2])),M===""&&(M="M0,0Z"),R.ensureSingle(w.select(this),"path").attr("d",M).call(O.setClipUrl,h.layerClipId,v)}})})}function f(v,h,m,_){var x=[],A=[],E=_?h:m,D=_?m:h;return x[0]=E.c2p(v.s0,!0),A[0]=D.c2p(v.p0,!0),x[1]=E.c2p(v.s1,!0),A[1]=D.c2p(v.p1,!0),x[2]=E.c2p(v.nextS0,!0),A[2]=D.c2p(v.nextP0,!0),x[3]=E.c2p(v.nextS1,!0),A[3]=D.c2p(v.nextP1,!0),_?[x,A]:[A,x]}}}),f2=U({"src/traces/funnel/style.js"(pe,le){var w=Ze(),R=ec(),O=Lr(),z=Yn().DESELECTDIM,l=Xp(),u=x0().resizeText,c=l.styleTextPoints;function p(f,v,h){var m=h||w.select(f).selectAll('g[class^="funnellayer"]').selectAll("g.trace");u(f,m,"funnel"),m.style("opacity",function(_){return _[0].trace.opacity}),m.each(function(_){var x=w.select(this),A=_[0].trace;x.selectAll(".point > path").each(function(E){if(!E.isBlank){var D=A.marker;w.select(this).call(O.fill,E.mc||D.color).call(O.stroke,E.mlc||D.line.color).call(R.dashLine,D.line.dash,E.mlw||D.line.width).style("opacity",A.selectedpoints&&!E.selected?z:1)}}),c(x,A,f),x.selectAll(".regions").each(function(){w.select(this).selectAll("path").style("stroke-width",0).call(O.fill,A.connector.fillcolor)}),x.selectAll(".lines").each(function(){var E=A.connector.line;R.lineGroupStyle(w.select(this).selectAll("path"),E.width,E.color,E.dash)})})}le.exports={style:p}}}),__=U({"src/traces/funnel/hover.js"(pe,le){var w=Lr().opacity,R=P1().hoverOnBars,O=ii().formatPercent;le.exports=function(u,c,p,f,v){var h=R(u,c,p,f,v);if(h){var m=h.cd,_=m[0].trace,x=_.orientation==="h",A=h.index,E=m[A],D=x?"x":"y";h[D+"LabelVal"]=E.s,h.percentInitial=E.begR,h.percentInitialLabel=O(E.begR,1),h.percentPrevious=E.difR,h.percentPreviousLabel=O(E.difR,1),h.percentTotal=E.sumR,h.percentTotalLabel=O(E.sumR,1);var g=E.hi||_.hoverinfo,C=[];if(g&&g!=="none"&&g!=="skip"){var I=g==="all",N=g.split("+"),F=function(k){return I||N.indexOf(k)!==-1};F("percent initial")&&C.push(h.percentInitialLabel+" of initial"),F("percent previous")&&C.push(h.percentPreviousLabel+" of previous"),F("percent total")&&C.push(h.percentTotalLabel+" of total")}return h.extraText=C.join("<br>"),h.color=z(_,E),[h]}};function z(l,u){var c=l.marker,p=u.mc||c.color,f=u.mlc||c.line.color,v=u.mlw||c.line.width;if(w(p))return p;if(w(f)&&v)return f}}}),AT=U({"src/traces/funnel/event_data.js"(pe,le){le.exports=function(R,O){return R.x="xVal"in O?O.xVal:O.x,R.y="yVal"in O?O.yVal:O.y,"percentInitial"in O&&(R.percentInitial=O.percentInitial),"percentPrevious"in O&&(R.percentPrevious=O.percentPrevious),"percentTotal"in O&&(R.percentTotal=O.percentTotal),O.xa&&(R.xaxis=O.xa),O.ya&&(R.yaxis=O.ya),R}}}),d2=U({"src/traces/funnel/index.js"(pe,le){le.exports={attributes:c2(),layoutAttributes:j0(),supplyDefaults:w0().supplyDefaults,crossTraceDefaults:w0().crossTraceDefaults,supplyLayoutDefaults:np(),calc:V0(),crossTraceCalc:jb(),plot:im(),style:f2().style,hoverPoints:__(),eventData:AT(),selectPoints:i2(),moduleType:"trace",name:"funnel",basePlotModule:Rf(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),CT=U({"lib/funnel.js"(pe,le){le.exports=d2()}}),Zp=U({"src/traces/waterfall/constants.js"(pe,le){le.exports={eventDataKeys:["initial","delta","final"]}}}),XA=U({"src/traces/waterfall/attributes.js"(pe,le){var w=rm(),R=Kc().line,O=Jn(),z=Wp().axisHoverFormat,l=Js().hovertemplateAttrs,u=Js().texttemplateAttrs,c=Zp(),p=Ar().extendFlat,f=Lr();function v(h){return{marker:{color:p({},w.marker.color,{arrayOk:!1,editType:"style"}),line:{color:p({},w.marker.line.color,{arrayOk:!1,editType:"style"}),width:p({},w.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}le.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:w.x,x0:w.x0,dx:w.dx,y:w.y,y0:w.y0,dy:w.dy,xperiod:w.xperiod,yperiod:w.yperiod,xperiod0:w.xperiod0,yperiod0:w.yperiod0,xperiodalignment:w.xperiodalignment,yperiodalignment:w.yperiodalignment,xhoverformat:z("x"),yhoverformat:z("y"),hovertext:w.hovertext,hovertemplate:l({},{keys:c.eventDataKeys}),hoverinfo:p({},O.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:u({editType:"plot"},{keys:c.eventDataKeys.concat(["label"])}),text:w.text,textposition:w.textposition,insidetextanchor:w.insidetextanchor,textangle:w.textangle,textfont:w.textfont,insidetextfont:w.insidetextfont,outsidetextfont:w.outsidetextfont,constraintext:w.constraintext,cliponaxis:w.cliponaxis,orientation:w.orientation,offset:w.offset,width:w.width,increasing:v(),decreasing:v(),totals:v(),connector:{line:{color:p({},R.color,{dflt:f.defaultLine}),width:p({},R.width,{editType:"plot"}),dash:R.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:w.offsetgroup,alignmentgroup:w.alignmentgroup,zorder:w.zorder}}}),dS=U({"src/traces/waterfall/layout_attributes.js"(pe,le){le.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"}}}}),lw=U({"src/constants/delta.js"(pe,le){le.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}}}}),hS=U({"src/traces/waterfall/defaults.js"(pe,le){var w=ii(),R=rg(),O=zb().handleText,z=ib(),l=R1(),u=XA(),c=Lr(),p=lw(),f=p.INCREASING.COLOR,v=p.DECREASING.COLOR,h="#4499FF";function m(A,E,D){A(E+".marker.color",D),A(E+".marker.line.color",c.defaultLine),A(E+".marker.line.width")}function _(A,E,D,g){function C(P,T){return w.coerce(A,E,u,P,T)}var I=z(A,E,g,C);if(!I){E.visible=!1;return}l(A,E,g,C),C("xhoverformat"),C("yhoverformat"),C("measure"),C("orientation",E.x&&!E.y?"h":"v"),C("base"),C("offset"),C("width"),C("text"),C("hovertext"),C("hovertemplate");var N=C("textposition");O(A,E,g,C,N,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),E.textposition!=="none"&&(C("texttemplate"),E.texttemplate||C("textinfo")),m(C,"increasing",f),m(C,"decreasing",v),m(C,"totals",h);var F=C("connector.visible");if(F){C("connector.mode");var k=C("connector.line.width");k&&(C("connector.line.color"),C("connector.line.dash"))}C("zorder")}function x(A,E){var D,g;function C(N){return w.coerce(g._input,g,u,N)}if(E.waterfallmode==="group")for(var I=0;I<A.length;I++)g=A[I],D=g._input,R(D,g,E,C,E.waterfallmode)}le.exports={supplyDefaults:_,crossTraceDefaults:x}}}),Vb=U({"src/traces/waterfall/layout_defaults.js"(pe,le){var w=ii(),R=dS();le.exports=function(O,z,l){var u=!1;function c(v,h){return w.coerce(O,z,R,v,h)}for(var p=0;p<l.length;p++){var f=l[p];if(f.visible&&f.type==="waterfall"){u=!0;break}}u&&(c("waterfallmode"),c("waterfallgap",.2),c("waterfallgroupgap"))}}}),MT=U({"src/traces/waterfall/calc.js"(pe,le){var w=Yu(),R=Zy(),O=ii().mergeArray,z=k1(),l=Dt().BADNUM;function u(p){return p==="a"||p==="absolute"}function c(p){return p==="t"||p==="total"}le.exports=function(f,v){var h=w.getFromId(f,v.xaxis||"x"),m=w.getFromId(f,v.yaxis||"y"),_,x,A,E,D,g;v.orientation==="h"?(_=h.makeCalcdata(v,"x"),A=m.makeCalcdata(v,"y"),E=R(v,m,"y",A),D=!!v.yperiodalignment,g="y"):(_=m.makeCalcdata(v,"y"),A=h.makeCalcdata(v,"x"),E=R(v,h,"x",A),D=!!v.xperiodalignment,g="x"),x=E.vals;for(var C=Math.min(x.length,_.length),I=new Array(C),N=0,F,k=!1,P=0;P<C;P++){var T=_[P]||0,y=!1;(_[P]!==l||c(v.measure[P])||u(v.measure[P]))&&P+1<C&&(_[P+1]!==l||c(v.measure[P+1])||u(v.measure[P+1]))&&(y=!0);var S=I[P]={i:P,p:x[P],s:T,rawS:T,cNext:y};u(v.measure[P])?(N=S.s,S.isSum=!0,S.dir="totals",S.s=N):c(v.measure[P])?(S.isSum=!0,S.dir="totals",S.s=N):(S.isSum=!1,S.dir=S.rawS<0?"decreasing":"increasing",F=S.s,S.s=N+F,N+=F),S.dir==="totals"&&(k=!0),D&&(I[P].orig_p=A[P],I[P][g+"End"]=E.ends[P],I[P][g+"Start"]=E.starts[P]),v.ids&&(S.id=String(v.ids[P])),S.v=(v.base||0)+N}return I.length&&(I[0].hasTotals=k),O(v.text,I,"tx"),O(v.hovertext,I,"htx"),z(I,v),I}}}),uw=U({"src/traces/waterfall/cross_trace_calc.js"(pe,le){var w=F0().setGroupPositions;le.exports=function(O,z){var l=O._fullLayout,u=O._fullData,c=O.calcdata,p=z.xaxis,f=z.yaxis,v=[],h=[],m=[],_,x;for(x=0;x<u.length;x++){var A=u[x];A.visible===!0&&A.xaxis===p._id&&A.yaxis===f._id&&A.type==="waterfall"&&(_=c[x],A.orientation==="h"?m.push(_):h.push(_),v.push(_))}var E={mode:l.waterfallmode,norm:l.waterfallnorm,gap:l.waterfallgap,groupgap:l.waterfallgroupgap};for(w(O,p,f,h,E),w(O,f,p,m,E),x=0;x<v.length;x++){_=v[x];for(var D=0;D<_.length;D++){var g=_[D];g.isSum===!1&&(g.s0+=D===0?0:_[D-1].s),D+1<_.length&&(_[D].nextP0=_[D+1].p0,_[D].nextS0=_[D+1].s0)}}}}}),pS=U({"src/traces/waterfall/plot.js"(pe,le){var w=Ze(),R=ii(),O=ec(),z=Dt().BADNUM,l=by(),u=x0().clearMinTextSize;le.exports=function(v,h,m,_){var x=v._fullLayout;u("waterfall",x),l.plot(v,h,m,_,{mode:x.waterfallmode,norm:x.waterfallmode,gap:x.waterfallgap,groupgap:x.waterfallgroupgap}),c(v,h,m,_)};function c(f,v,h,m){var _=v.xaxis,x=v.yaxis;R.makeTraceGroups(m,h,"trace bars").each(function(A){var E=w.select(this),D=A[0].trace,g=R.ensureSingle(E,"g","lines");if(!D.connector||!D.connector.visible){g.remove();return}var C=D.orientation==="h",I=D.connector.mode,N=g.selectAll("g.line").data(R.identity);N.enter().append("g").classed("line",!0),N.exit().remove();var F=N.size();N.each(function(k,P){if(!(P!==F-1&&!k.cNext)){var T=p(k,_,x,C),y=T[0],S=T[1],M="";y[0]!==z&&S[0]!==z&&y[1]!==z&&S[1]!==z&&(I==="spanning"&&!k.isSum&&P>0&&(C?M+="M"+y[0]+","+S[1]+"V"+S[0]:M+="M"+y[1]+","+S[0]+"H"+y[0]),I!=="between"&&(k.isSum||P<F-1)&&(C?M+="M"+y[1]+","+S[0]+"V"+S[1]:M+="M"+y[0]+","+S[1]+"H"+y[1]),y[2]!==z&&S[2]!==z&&(C?M+="M"+y[1]+","+S[1]+"V"+S[2]:M+="M"+y[1]+","+S[1]+"H"+y[2])),M===""&&(M="M0,0Z"),R.ensureSingle(w.select(this),"path").attr("d",M).call(O.setClipUrl,v.layerClipId,f)}})})}function p(f,v,h,m){var _=[],x=[],A=m?v:h,E=m?h:v;return _[0]=A.c2p(f.s0,!0),x[0]=E.c2p(f.p0,!0),_[1]=A.c2p(f.s1,!0),x[1]=E.c2p(f.p1,!0),_[2]=A.c2p(f.nextS0,!0),x[2]=E.c2p(f.nextP0,!0),m?[_,x]:[x,_]}}}),cw=U({"src/traces/waterfall/style.js"(pe,le){var w=Ze(),R=ec(),O=Lr(),z=Yn().DESELECTDIM,l=Xp(),u=x0().resizeText,c=l.styleTextPoints;function p(f,v,h){var m=h||w.select(f).selectAll('g[class^="waterfalllayer"]').selectAll("g.trace");u(f,m,"waterfall"),m.style("opacity",function(_){return _[0].trace.opacity}),m.each(function(_){var x=w.select(this),A=_[0].trace;x.selectAll(".point > path").each(function(E){if(!E.isBlank){var D=A[E.dir].marker;w.select(this).call(O.fill,D.color).call(O.stroke,D.line.color).call(R.dashLine,D.line.dash,D.line.width).style("opacity",A.selectedpoints&&!E.selected?z:1)}}),c(x,A,f),x.selectAll(".lines").each(function(){var E=A.connector.line;R.lineGroupStyle(w.select(this).selectAll("path"),E.width,E.color,E.dash)})})}le.exports={style:p}}}),vS=U({"src/traces/waterfall/hover.js"(pe,le){var w=Yu().hoverLabelText,R=Lr().opacity,O=P1().hoverOnBars,z=lw(),l={increasing:z.INCREASING.SYMBOL,decreasing:z.DECREASING.SYMBOL};le.exports=function(p,f,v,h,m){var _=O(p,f,v,h,m);if(!_)return;var x=_.cd,A=x[0].trace,E=A.orientation==="h",D=E?"x":"y",g=E?p.xa:p.ya;function C(W){return w(g,W,A[D+"hoverformat"])}var I=_.index,N=x[I],F=N.isSum?N.b+N.s:N.rawS;_.initial=N.b+N.s-F,_.delta=F,_.final=_.initial+_.delta;var k=C(Math.abs(_.delta));_.deltaLabel=F<0?"("+k+")":k,_.finalLabel=C(_.final),_.initialLabel=C(_.initial);var P=N.hi||A.hoverinfo,T=[];if(P&&P!=="none"&&P!=="skip"){var y=P==="all",S=P.split("+"),M=function(W){return y||S.indexOf(W)!==-1};N.isSum||(M("final")&&(E?!M("x"):!M("y"))&&T.push(_.finalLabel),M("delta")&&(F<0?T.push(_.deltaLabel+" "+l.decreasing):T.push(_.deltaLabel+" "+l.increasing)),M("initial")&&T.push("Initial: "+_.initialLabel))}return T.length&&(_.extraText=T.join("<br>")),_.color=u(A,N),[_]};function u(c,p){var f=c[p.dir].marker,v=f.color,h=f.line.color,m=f.line.width;if(R(v))return v;if(R(h)&&m)return h}}}),i3=U({"src/traces/waterfall/event_data.js"(pe,le){le.exports=function(R,O){return R.x="xVal"in O?O.xVal:O.x,R.y="yVal"in O?O.yVal:O.y,"initial"in O&&(R.initial=O.initial),"delta"in O&&(R.delta=O.delta),"final"in O&&(R.final=O.final),O.xa&&(R.xaxis=O.xa),O.ya&&(R.yaxis=O.ya),R}}}),h2=U({"src/traces/waterfall/index.js"(pe,le){le.exports={attributes:XA(),layoutAttributes:dS(),supplyDefaults:hS().supplyDefaults,crossTraceDefaults:hS().crossTraceDefaults,supplyLayoutDefaults:Vb(),calc:MT(),crossTraceCalc:uw(),plot:pS(),style:cw().style,hoverPoints:vS(),eventData:i3(),selectPoints:i2(),moduleType:"trace",name:"waterfall",basePlotModule:Rf(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),fw=U({"lib/waterfall.js"(pe,le){le.exports=h2()}}),qb=U({"src/traces/image/constants.js"(pe,le){le.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(w){return w.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(w){return w.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(w){return w.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(w){var R=w.slice(0,3);return R[1]=R[1]+"%",R[2]=R[2]+"%",R},suffix:["°","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(w){var R=w.slice(0,4);return R[1]=R[1]+"%",R[2]=R[2]+"%",R},suffix:["°","%","%",""]}}}}}),dw=U({"src/traces/image/attributes.js"(pe,le){var w=Jn(),R=Kc().zorder,O=Js().hovertemplateAttrs,z=Ar().extendFlat,l=qb().colormodel,u=["rgb","rgba","rgba256","hsl","hsla"],c=[],p=[];for(v=0;v<u.length;v++)f=l[u[v]],c.push("For the `"+u[v]+"` colormodel, it is ["+(f.zminDflt||f.min).join(", ")+"]."),p.push("For the `"+u[v]+"` colormodel, it is ["+(f.zmaxDflt||f.max).join(", ")+"].");var f,v;le.exports=z({source:{valType:"string",editType:"calc"},z:{valType:"data_array",editType:"calc"},colormodel:{valType:"enumerated",values:u,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"},dy:{valType:"number",dflt:1,editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"data_array",editType:"plot"},hoverinfo:z({},w.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:O({},{keys:["z","color","colormodel"]}),zorder:R})}}),w_=U({"src/traces/image/defaults.js"(pe,le){var w=ii(),R=dw(),O=qb(),z=gm().IMAGE_URL_PREFIX;le.exports=function(u,c){function p(h,m){return w.coerce(u,c,R,h,m)}p("source"),c.source&&!c.source.match(z)&&delete c.source,c._hasSource=!!c.source;var f=p("z");if(c._hasZ=!(f===void 0||!f.length||!f[0]||!f[0].length),!c._hasZ&&!c._hasSource){c.visible=!1;return}p("x0"),p("y0"),p("dx"),p("dy");var v;c._hasZ?(p("colormodel","rgb"),v=O.colormodel[c.colormodel],p("zmin",v.zminDflt||v.min),p("zmax",v.zmaxDflt||v.max)):c._hasSource&&(c.colormodel="rgba256",v=O.colormodel[c.colormodel],c.zmin=v.zminDflt,c.zmax=v.zmaxDflt),p("zsmooth"),p("text"),p("hovertext"),p("hovertemplate"),c._length=null,p("zorder")}}}),q0=U({"node_modules/inherits/inherits_browser.js"(pe,le){typeof Object.create=="function"?le.exports=function(R,O){O&&(R.super_=O,R.prototype=Object.create(O.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}))}:le.exports=function(R,O){if(O){R.super_=O;var z=function(){};z.prototype=O.prototype,R.prototype=new z,R.prototype.constructor=R}}}}),Rh=U({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/stream-browser.js"(pe,le){le.exports=jf().EventEmitter}}),kx=U({"node_modules/base64-js/index.js"(pe){pe.byteLength=c,pe.toByteArray=f,pe.fromByteArray=m;var le=[],w=[],R=typeof Uint8Array<"u"?Uint8Array:Array,O="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(z=0,l=O.length;z<l;++z)le[z]=O[z],w[O.charCodeAt(z)]=z;var z,l;w[45]=62,w[95]=63;function u(_){var x=_.length;if(x%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var A=_.indexOf("=");A===-1&&(A=x);var E=A===x?0:4-A%4;return[A,E]}function c(_){var x=u(_),A=x[0],E=x[1];return(A+E)*3/4-E}function p(_,x,A){return(x+A)*3/4-A}function f(_){var x,A=u(_),E=A[0],D=A[1],g=new R(p(_,E,D)),C=0,I=D>0?E-4:E,N;for(N=0;N<I;N+=4)x=w[_.charCodeAt(N)]<<18|w[_.charCodeAt(N+1)]<<12|w[_.charCodeAt(N+2)]<<6|w[_.charCodeAt(N+3)],g[C++]=x>>16&255,g[C++]=x>>8&255,g[C++]=x&255;return D===2&&(x=w[_.charCodeAt(N)]<<2|w[_.charCodeAt(N+1)]>>4,g[C++]=x&255),D===1&&(x=w[_.charCodeAt(N)]<<10|w[_.charCodeAt(N+1)]<<4|w[_.charCodeAt(N+2)]>>2,g[C++]=x>>8&255,g[C++]=x&255),g}function v(_){return le[_>>18&63]+le[_>>12&63]+le[_>>6&63]+le[_&63]}function h(_,x,A){for(var E,D=[],g=x;g<A;g+=3)E=(_[g]<<16&16711680)+(_[g+1]<<8&65280)+(_[g+2]&255),D.push(v(E));return D.join("")}function m(_){for(var x,A=_.length,E=A%3,D=[],g=16383,C=0,I=A-E;C<I;C+=g)D.push(h(_,C,C+g>I?I:C+g));return E===1?(x=_[A-1],D.push(le[x>>2]+le[x<<4&63]+"==")):E===2&&(x=(_[A-2]<<8)+_[A-1],D.push(le[x>>10]+le[x>>4&63]+le[x<<2&63]+"=")),D.join("")}}}),Gb=U({"node_modules/ieee754/index.js"(pe){pe.read=function(le,w,R,O,z){var l,u,c=z*8-O-1,p=(1<<c)-1,f=p>>1,v=-7,h=R?z-1:0,m=R?-1:1,_=le[w+h];for(h+=m,l=_&(1<<-v)-1,_>>=-v,v+=c;v>0;l=l*256+le[w+h],h+=m,v-=8);for(u=l&(1<<-v)-1,l>>=-v,v+=O;v>0;u=u*256+le[w+h],h+=m,v-=8);if(l===0)l=1-f;else{if(l===p)return u?NaN:(_?-1:1)*(1/0);u=u+Math.pow(2,O),l=l-f}return(_?-1:1)*u*Math.pow(2,l-O)},pe.write=function(le,w,R,O,z,l){var u,c,p,f=l*8-z-1,v=(1<<f)-1,h=v>>1,m=z===23?Math.pow(2,-24)-Math.pow(2,-77):0,_=O?0:l-1,x=O?1:-1,A=w<0||w===0&&1/w<0?1:0;for(w=Math.abs(w),isNaN(w)||w===1/0?(c=isNaN(w)?1:0,u=v):(u=Math.floor(Math.log(w)/Math.LN2),w*(p=Math.pow(2,-u))<1&&(u--,p*=2),u+h>=1?w+=m/p:w+=m*Math.pow(2,1-h),w*p>=2&&(u++,p/=2),u+h>=v?(c=0,u=v):u+h>=1?(c=(w*p-1)*Math.pow(2,z),u=u+h):(c=w*Math.pow(2,h-1)*Math.pow(2,z),u=0));z>=8;le[R+_]=c&255,_+=x,c/=256,z-=8);for(u=u<<z|c,f+=z;f>0;le[R+_]=u&255,_+=x,u/=256,f-=8);le[R+_-x]|=A*128}}}),bp=U({"node_modules/buffer/index.js"(pe){var le=kx(),w=Gb(),R=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;pe.Buffer=u,pe.SlowBuffer=D,pe.INSPECT_MAX_BYTES=50;var O=2147483647;pe.kMaxLength=O,u.TYPED_ARRAY_SUPPORT=z(),!u.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 z(){try{const st=new Uint8Array(1),rt={foo:function(){return 42}};return Object.setPrototypeOf(rt,Uint8Array.prototype),Object.setPrototypeOf(st,rt),st.foo()===42}catch{return!1}}Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}});function l(st){if(st>O)throw new RangeError('The value "'+st+'" is invalid for option "size"');const rt=new Uint8Array(st);return Object.setPrototypeOf(rt,u.prototype),rt}function u(st,rt,Ue){if(typeof st=="number"){if(typeof rt=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return v(st)}return c(st,rt,Ue)}u.poolSize=8192;function c(st,rt,Ue){if(typeof st=="string")return h(st,rt);if(ArrayBuffer.isView(st))return _(st);if(st==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof st);if(Rt(st,ArrayBuffer)||st&&Rt(st.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Rt(st,SharedArrayBuffer)||st&&Rt(st.buffer,SharedArrayBuffer)))return x(st,rt,Ue);if(typeof st=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const xt=st.valueOf&&st.valueOf();if(xt!=null&&xt!==st)return u.from(xt,rt,Ue);const Gt=A(st);if(Gt)return Gt;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof st[Symbol.toPrimitive]=="function")return u.from(st[Symbol.toPrimitive]("string"),rt,Ue);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof st)}u.from=function(st,rt,Ue){return c(st,rt,Ue)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array);function p(st){if(typeof st!="number")throw new TypeError('"size" argument must be of type number');if(st<0)throw new RangeError('The value "'+st+'" is invalid for option "size"')}function f(st,rt,Ue){return p(st),st<=0?l(st):rt!==void 0?typeof Ue=="string"?l(st).fill(rt,Ue):l(st).fill(rt):l(st)}u.alloc=function(st,rt,Ue){return f(st,rt,Ue)};function v(st){return p(st),l(st<0?0:E(st)|0)}u.allocUnsafe=function(st){return v(st)},u.allocUnsafeSlow=function(st){return v(st)};function h(st,rt){if((typeof rt!="string"||rt==="")&&(rt="utf8"),!u.isEncoding(rt))throw new TypeError("Unknown encoding: "+rt);const Ue=g(st,rt)|0;let xt=l(Ue);const Gt=xt.write(st,rt);return Gt!==Ue&&(xt=xt.slice(0,Gt)),xt}function m(st){const rt=st.length<0?0:E(st.length)|0,Ue=l(rt);for(let xt=0;xt<rt;xt+=1)Ue[xt]=st[xt]&255;return Ue}function _(st){if(Rt(st,Uint8Array)){const rt=new Uint8Array(st);return x(rt.buffer,rt.byteOffset,rt.byteLength)}return m(st)}function x(st,rt,Ue){if(rt<0||st.byteLength<rt)throw new RangeError('"offset" is outside of buffer bounds');if(st.byteLength<rt+(Ue||0))throw new RangeError('"length" is outside of buffer bounds');let xt;return rt===void 0&&Ue===void 0?xt=new Uint8Array(st):Ue===void 0?xt=new Uint8Array(st,rt):xt=new Uint8Array(st,rt,Ue),Object.setPrototypeOf(xt,u.prototype),xt}function A(st){if(u.isBuffer(st)){const rt=E(st.length)|0,Ue=l(rt);return Ue.length===0||st.copy(Ue,0,0,rt),Ue}if(st.length!==void 0)return typeof st.length!="number"||$t(st.length)?l(0):m(st);if(st.type==="Buffer"&&Array.isArray(st.data))return m(st.data)}function E(st){if(st>=O)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+O.toString(16)+" bytes");return st|0}function D(st){return+st!=st&&(st=0),u.alloc(+st)}u.isBuffer=function(rt){return rt!=null&&rt._isBuffer===!0&&rt!==u.prototype},u.compare=function(rt,Ue){if(Rt(rt,Uint8Array)&&(rt=u.from(rt,rt.offset,rt.byteLength)),Rt(Ue,Uint8Array)&&(Ue=u.from(Ue,Ue.offset,Ue.byteLength)),!u.isBuffer(rt)||!u.isBuffer(Ue))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(rt===Ue)return 0;let xt=rt.length,Gt=Ue.length;for(let Jt=0,Ut=Math.min(xt,Gt);Jt<Ut;++Jt)if(rt[Jt]!==Ue[Jt]){xt=rt[Jt],Gt=Ue[Jt];break}return xt<Gt?-1:Gt<xt?1:0},u.isEncoding=function(rt){switch(String(rt).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}},u.concat=function(rt,Ue){if(!Array.isArray(rt))throw new TypeError('"list" argument must be an Array of Buffers');if(rt.length===0)return u.alloc(0);let xt;if(Ue===void 0)for(Ue=0,xt=0;xt<rt.length;++xt)Ue+=rt[xt].length;const Gt=u.allocUnsafe(Ue);let Jt=0;for(xt=0;xt<rt.length;++xt){let Ut=rt[xt];if(Rt(Ut,Uint8Array))Jt+Ut.length>Gt.length?(u.isBuffer(Ut)||(Ut=u.from(Ut)),Ut.copy(Gt,Jt)):Uint8Array.prototype.set.call(Gt,Ut,Jt);else if(u.isBuffer(Ut))Ut.copy(Gt,Jt);else throw new TypeError('"list" argument must be an Array of Buffers');Jt+=Ut.length}return Gt};function g(st,rt){if(u.isBuffer(st))return st.length;if(ArrayBuffer.isView(st)||Rt(st,ArrayBuffer))return st.byteLength;if(typeof st!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof st);const Ue=st.length,xt=arguments.length>2&&arguments[2]===!0;if(!xt&&Ue===0)return 0;let Gt=!1;for(;;)switch(rt){case"ascii":case"latin1":case"binary":return Ue;case"utf8":case"utf-8":return Be(st).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ue*2;case"hex":return Ue>>>1;case"base64":return gt(st).length;default:if(Gt)return xt?-1:Be(st).length;rt=(""+rt).toLowerCase(),Gt=!0}}u.byteLength=g;function C(st,rt,Ue){let xt=!1;if((rt===void 0||rt<0)&&(rt=0),rt>this.length||((Ue===void 0||Ue>this.length)&&(Ue=this.length),Ue<=0)||(Ue>>>=0,rt>>>=0,Ue<=rt))return"";for(st||(st="utf8");;)switch(st){case"hex":return J(this,rt,Ue);case"utf8":case"utf-8":return W(this,rt,Ue);case"ascii":return K(this,rt,Ue);case"latin1":case"binary":return Q(this,rt,Ue);case"base64":return M(this,rt,Ue);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,rt,Ue);default:if(xt)throw new TypeError("Unknown encoding: "+st);st=(st+"").toLowerCase(),xt=!0}}u.prototype._isBuffer=!0;function I(st,rt,Ue){const xt=st[rt];st[rt]=st[Ue],st[Ue]=xt}u.prototype.swap16=function(){const rt=this.length;if(rt%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let Ue=0;Ue<rt;Ue+=2)I(this,Ue,Ue+1);return this},u.prototype.swap32=function(){const rt=this.length;if(rt%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let Ue=0;Ue<rt;Ue+=4)I(this,Ue,Ue+3),I(this,Ue+1,Ue+2);return this},u.prototype.swap64=function(){const rt=this.length;if(rt%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let Ue=0;Ue<rt;Ue+=8)I(this,Ue,Ue+7),I(this,Ue+1,Ue+6),I(this,Ue+2,Ue+5),I(this,Ue+3,Ue+4);return this},u.prototype.toString=function(){const rt=this.length;return rt===0?"":arguments.length===0?W(this,0,rt):C.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(rt){if(!u.isBuffer(rt))throw new TypeError("Argument must be a Buffer");return this===rt?!0:u.compare(this,rt)===0},u.prototype.inspect=function(){let rt="";const Ue=pe.INSPECT_MAX_BYTES;return rt=this.toString("hex",0,Ue).replace(/(.{2})/g,"$1 ").trim(),this.length>Ue&&(rt+=" ... "),"<Buffer "+rt+">"},R&&(u.prototype[R]=u.prototype.inspect),u.prototype.compare=function(rt,Ue,xt,Gt,Jt){if(Rt(rt,Uint8Array)&&(rt=u.from(rt,rt.offset,rt.byteLength)),!u.isBuffer(rt))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof rt);if(Ue===void 0&&(Ue=0),xt===void 0&&(xt=rt?rt.length:0),Gt===void 0&&(Gt=0),Jt===void 0&&(Jt=this.length),Ue<0||xt>rt.length||Gt<0||Jt>this.length)throw new RangeError("out of range index");if(Gt>=Jt&&Ue>=xt)return 0;if(Gt>=Jt)return-1;if(Ue>=xt)return 1;if(Ue>>>=0,xt>>>=0,Gt>>>=0,Jt>>>=0,this===rt)return 0;let Ut=Jt-Gt,kr=xt-Ue;const Pr=Math.min(Ut,kr),$r=this.slice(Gt,Jt),rn=rt.slice(Ue,xt);for(let kn=0;kn<Pr;++kn)if($r[kn]!==rn[kn]){Ut=$r[kn],kr=rn[kn];break}return Ut<kr?-1:kr<Ut?1:0};function N(st,rt,Ue,xt,Gt){if(st.length===0)return-1;if(typeof Ue=="string"?(xt=Ue,Ue=0):Ue>2147483647?Ue=2147483647:Ue<-2147483648&&(Ue=-2147483648),Ue=+Ue,$t(Ue)&&(Ue=Gt?0:st.length-1),Ue<0&&(Ue=st.length+Ue),Ue>=st.length){if(Gt)return-1;Ue=st.length-1}else if(Ue<0)if(Gt)Ue=0;else return-1;if(typeof rt=="string"&&(rt=u.from(rt,xt)),u.isBuffer(rt))return rt.length===0?-1:F(st,rt,Ue,xt,Gt);if(typeof rt=="number")return rt=rt&255,typeof Uint8Array.prototype.indexOf=="function"?Gt?Uint8Array.prototype.indexOf.call(st,rt,Ue):Uint8Array.prototype.lastIndexOf.call(st,rt,Ue):F(st,[rt],Ue,xt,Gt);throw new TypeError("val must be string, number or Buffer")}function F(st,rt,Ue,xt,Gt){let Jt=1,Ut=st.length,kr=rt.length;if(xt!==void 0&&(xt=String(xt).toLowerCase(),xt==="ucs2"||xt==="ucs-2"||xt==="utf16le"||xt==="utf-16le")){if(st.length<2||rt.length<2)return-1;Jt=2,Ut/=2,kr/=2,Ue/=2}function Pr(rn,kn){return Jt===1?rn[kn]:rn.readUInt16BE(kn*Jt)}let $r;if(Gt){let rn=-1;for($r=Ue;$r<Ut;$r++)if(Pr(st,$r)===Pr(rt,rn===-1?0:$r-rn)){if(rn===-1&&(rn=$r),$r-rn+1===kr)return rn*Jt}else rn!==-1&&($r-=$r-rn),rn=-1}else for(Ue+kr>Ut&&(Ue=Ut-kr),$r=Ue;$r>=0;$r--){let rn=!0;for(let kn=0;kn<kr;kn++)if(Pr(st,$r+kn)!==Pr(rt,kn)){rn=!1;break}if(rn)return $r}return-1}u.prototype.includes=function(rt,Ue,xt){return this.indexOf(rt,Ue,xt)!==-1},u.prototype.indexOf=function(rt,Ue,xt){return N(this,rt,Ue,xt,!0)},u.prototype.lastIndexOf=function(rt,Ue,xt){return N(this,rt,Ue,xt,!1)};function k(st,rt,Ue,xt){Ue=Number(Ue)||0;const Gt=st.length-Ue;xt?(xt=Number(xt),xt>Gt&&(xt=Gt)):xt=Gt;const Jt=rt.length;xt>Jt/2&&(xt=Jt/2);let Ut;for(Ut=0;Ut<xt;++Ut){const kr=parseInt(rt.substr(Ut*2,2),16);if($t(kr))return Ut;st[Ue+Ut]=kr}return Ut}function P(st,rt,Ue,xt){return pt(Be(rt,st.length-Ue),st,Ue,xt)}function T(st,rt,Ue,xt){return pt(tt(rt),st,Ue,xt)}function y(st,rt,Ue,xt){return pt(gt(rt),st,Ue,xt)}function S(st,rt,Ue,xt){return pt(at(rt,st.length-Ue),st,Ue,xt)}u.prototype.write=function(rt,Ue,xt,Gt){if(Ue===void 0)Gt="utf8",xt=this.length,Ue=0;else if(xt===void 0&&typeof Ue=="string")Gt=Ue,xt=this.length,Ue=0;else if(isFinite(Ue))Ue=Ue>>>0,isFinite(xt)?(xt=xt>>>0,Gt===void 0&&(Gt="utf8")):(Gt=xt,xt=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const Jt=this.length-Ue;if((xt===void 0||xt>Jt)&&(xt=Jt),rt.length>0&&(xt<0||Ue<0)||Ue>this.length)throw new RangeError("Attempt to write outside buffer bounds");Gt||(Gt="utf8");let Ut=!1;for(;;)switch(Gt){case"hex":return k(this,rt,Ue,xt);case"utf8":case"utf-8":return P(this,rt,Ue,xt);case"ascii":case"latin1":case"binary":return T(this,rt,Ue,xt);case"base64":return y(this,rt,Ue,xt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,rt,Ue,xt);default:if(Ut)throw new TypeError("Unknown encoding: "+Gt);Gt=(""+Gt).toLowerCase(),Ut=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function M(st,rt,Ue){return rt===0&&Ue===st.length?le.fromByteArray(st):le.fromByteArray(st.slice(rt,Ue))}function W(st,rt,Ue){Ue=Math.min(st.length,Ue);const xt=[];let Gt=rt;for(;Gt<Ue;){const Jt=st[Gt];let Ut=null,kr=Jt>239?4:Jt>223?3:Jt>191?2:1;if(Gt+kr<=Ue){let Pr,$r,rn,kn;switch(kr){case 1:Jt<128&&(Ut=Jt);break;case 2:Pr=st[Gt+1],(Pr&192)===128&&(kn=(Jt&31)<<6|Pr&63,kn>127&&(Ut=kn));break;case 3:Pr=st[Gt+1],$r=st[Gt+2],(Pr&192)===128&&($r&192)===128&&(kn=(Jt&15)<<12|(Pr&63)<<6|$r&63,kn>2047&&(kn<55296||kn>57343)&&(Ut=kn));break;case 4:Pr=st[Gt+1],$r=st[Gt+2],rn=st[Gt+3],(Pr&192)===128&&($r&192)===128&&(rn&192)===128&&(kn=(Jt&15)<<18|(Pr&63)<<12|($r&63)<<6|rn&63,kn>65535&&kn<1114112&&(Ut=kn))}}Ut===null?(Ut=65533,kr=1):Ut>65535&&(Ut-=65536,xt.push(Ut>>>10&1023|55296),Ut=56320|Ut&1023),xt.push(Ut),Gt+=kr}return Z(xt)}var $=4096;function Z(st){const rt=st.length;if(rt<=$)return String.fromCharCode.apply(String,st);let Ue="",xt=0;for(;xt<rt;)Ue+=String.fromCharCode.apply(String,st.slice(xt,xt+=$));return Ue}function K(st,rt,Ue){let xt="";Ue=Math.min(st.length,Ue);for(let Gt=rt;Gt<Ue;++Gt)xt+=String.fromCharCode(st[Gt]&127);return xt}function Q(st,rt,Ue){let xt="";Ue=Math.min(st.length,Ue);for(let Gt=rt;Gt<Ue;++Gt)xt+=String.fromCharCode(st[Gt]);return xt}function J(st,rt,Ue){const xt=st.length;(!rt||rt<0)&&(rt=0),(!Ue||Ue<0||Ue>xt)&&(Ue=xt);let Gt="";for(let Jt=rt;Jt<Ue;++Jt)Gt+=Wt[st[Jt]];return Gt}function G(st,rt,Ue){const xt=st.slice(rt,Ue);let Gt="";for(let Jt=0;Jt<xt.length-1;Jt+=2)Gt+=String.fromCharCode(xt[Jt]+xt[Jt+1]*256);return Gt}u.prototype.slice=function(rt,Ue){const xt=this.length;rt=~~rt,Ue=Ue===void 0?xt:~~Ue,rt<0?(rt+=xt,rt<0&&(rt=0)):rt>xt&&(rt=xt),Ue<0?(Ue+=xt,Ue<0&&(Ue=0)):Ue>xt&&(Ue=xt),Ue<rt&&(Ue=rt);const Gt=this.subarray(rt,Ue);return Object.setPrototypeOf(Gt,u.prototype),Gt};function ee(st,rt,Ue){if(st%1!==0||st<0)throw new RangeError("offset is not uint");if(st+rt>Ue)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUintLE=u.prototype.readUIntLE=function(rt,Ue,xt){rt=rt>>>0,Ue=Ue>>>0,xt||ee(rt,Ue,this.length);let Gt=this[rt],Jt=1,Ut=0;for(;++Ut<Ue&&(Jt*=256);)Gt+=this[rt+Ut]*Jt;return Gt},u.prototype.readUintBE=u.prototype.readUIntBE=function(rt,Ue,xt){rt=rt>>>0,Ue=Ue>>>0,xt||ee(rt,Ue,this.length);let Gt=this[rt+--Ue],Jt=1;for(;Ue>0&&(Jt*=256);)Gt+=this[rt+--Ue]*Jt;return Gt},u.prototype.readUint8=u.prototype.readUInt8=function(rt,Ue){return rt=rt>>>0,Ue||ee(rt,1,this.length),this[rt]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(rt,Ue){return rt=rt>>>0,Ue||ee(rt,2,this.length),this[rt]|this[rt+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(rt,Ue){return rt=rt>>>0,Ue||ee(rt,2,this.length),this[rt]<<8|this[rt+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(rt,Ue){return rt=rt>>>0,Ue||ee(rt,4,this.length),(this[rt]|this[rt+1]<<8|this[rt+2]<<16)+this[rt+3]*16777216},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(rt,Ue){return rt=rt>>>0,Ue||ee(rt,4,this.length),this[rt]*16777216+(this[rt+1]<<16|this[rt+2]<<8|this[rt+3])},u.prototype.readBigUInt64LE=Ht(function(rt){rt=rt>>>0,xe(rt,"offset");const Ue=this[rt],xt=this[rt+7];(Ue===void 0||xt===void 0)&&se(rt,this.length-8);const Gt=Ue+this[++rt]*2**8+this[++rt]*2**16+this[++rt]*2**24,Jt=this[++rt]+this[++rt]*2**8+this[++rt]*2**16+xt*2**24;return BigInt(Gt)+(BigInt(Jt)<<BigInt(32))}),u.prototype.readBigUInt64BE=Ht(function(rt){rt=rt>>>0,xe(rt,"offset");const Ue=this[rt],xt=this[rt+7];(Ue===void 0||xt===void 0)&&se(rt,this.length-8);const Gt=Ue*2**24+this[++rt]*2**16+this[++rt]*2**8+this[++rt],Jt=this[++rt]*2**24+this[++rt]*2**16+this[++rt]*2**8+xt;return(BigInt(Gt)<<BigInt(32))+BigInt(Jt)}),u.prototype.readIntLE=function(rt,Ue,xt){rt=rt>>>0,Ue=Ue>>>0,xt||ee(rt,Ue,this.length);let Gt=this[rt],Jt=1,Ut=0;for(;++Ut<Ue&&(Jt*=256);)Gt+=this[rt+Ut]*Jt;return Jt*=128,Gt>=Jt&&(Gt-=Math.pow(2,8*Ue)),Gt},u.prototype.readIntBE=function(rt,Ue,xt){rt=rt>>>0,Ue=Ue>>>0,xt||ee(rt,Ue,this.length);let Gt=Ue,Jt=1,Ut=this[rt+--Gt];for(;Gt>0&&(Jt*=256);)Ut+=this[rt+--Gt]*Jt;return Jt*=128,Ut>=Jt&&(Ut-=Math.pow(2,8*Ue)),Ut},u.prototype.readInt8=function(rt,Ue){return rt=rt>>>0,Ue||ee(rt,1,this.length),this[rt]&128?(255-this[rt]+1)*-1:this[rt]},u.prototype.readInt16LE=function(rt,Ue){rt=rt>>>0,Ue||ee(rt,2,this.length);const xt=this[rt]|this[rt+1]<<8;return xt&32768?xt|4294901760:xt},u.prototype.readInt16BE=function(rt,Ue){rt=rt>>>0,Ue||ee(rt,2,this.length);const xt=this[rt+1]|this[rt]<<8;return xt&32768?xt|4294901760:xt},u.prototype.readInt32LE=function(rt,Ue){return rt=rt>>>0,Ue||ee(rt,4,this.length),this[rt]|this[rt+1]<<8|this[rt+2]<<16|this[rt+3]<<24},u.prototype.readInt32BE=function(rt,Ue){return rt=rt>>>0,Ue||ee(rt,4,this.length),this[rt]<<24|this[rt+1]<<16|this[rt+2]<<8|this[rt+3]},u.prototype.readBigInt64LE=Ht(function(rt){rt=rt>>>0,xe(rt,"offset");const Ue=this[rt],xt=this[rt+7];(Ue===void 0||xt===void 0)&&se(rt,this.length-8);const Gt=this[rt+4]+this[rt+5]*2**8+this[rt+6]*2**16+(xt<<24);return(BigInt(Gt)<<BigInt(32))+BigInt(Ue+this[++rt]*2**8+this[++rt]*2**16+this[++rt]*2**24)}),u.prototype.readBigInt64BE=Ht(function(rt){rt=rt>>>0,xe(rt,"offset");const Ue=this[rt],xt=this[rt+7];(Ue===void 0||xt===void 0)&&se(rt,this.length-8);const Gt=(Ue<<24)+this[++rt]*2**16+this[++rt]*2**8+this[++rt];return(BigInt(Gt)<<BigInt(32))+BigInt(this[++rt]*2**24+this[++rt]*2**16+this[++rt]*2**8+xt)}),u.prototype.readFloatLE=function(rt,Ue){return rt=rt>>>0,Ue||ee(rt,4,this.length),w.read(this,rt,!0,23,4)},u.prototype.readFloatBE=function(rt,Ue){return rt=rt>>>0,Ue||ee(rt,4,this.length),w.read(this,rt,!1,23,4)},u.prototype.readDoubleLE=function(rt,Ue){return rt=rt>>>0,Ue||ee(rt,8,this.length),w.read(this,rt,!0,52,8)},u.prototype.readDoubleBE=function(rt,Ue){return rt=rt>>>0,Ue||ee(rt,8,this.length),w.read(this,rt,!1,52,8)};function re(st,rt,Ue,xt,Gt,Jt){if(!u.isBuffer(st))throw new TypeError('"buffer" argument must be a Buffer instance');if(rt>Gt||rt<Jt)throw new RangeError('"value" argument is out of bounds');if(Ue+xt>st.length)throw new RangeError("Index out of range")}u.prototype.writeUintLE=u.prototype.writeUIntLE=function(rt,Ue,xt,Gt){if(rt=+rt,Ue=Ue>>>0,xt=xt>>>0,!Gt){const kr=Math.pow(2,8*xt)-1;re(this,rt,Ue,xt,kr,0)}let Jt=1,Ut=0;for(this[Ue]=rt&255;++Ut<xt&&(Jt*=256);)this[Ue+Ut]=rt/Jt&255;return Ue+xt},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(rt,Ue,xt,Gt){if(rt=+rt,Ue=Ue>>>0,xt=xt>>>0,!Gt){const kr=Math.pow(2,8*xt)-1;re(this,rt,Ue,xt,kr,0)}let Jt=xt-1,Ut=1;for(this[Ue+Jt]=rt&255;--Jt>=0&&(Ut*=256);)this[Ue+Jt]=rt/Ut&255;return Ue+xt},u.prototype.writeUint8=u.prototype.writeUInt8=function(rt,Ue,xt){return rt=+rt,Ue=Ue>>>0,xt||re(this,rt,Ue,1,255,0),this[Ue]=rt&255,Ue+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(rt,Ue,xt){return rt=+rt,Ue=Ue>>>0,xt||re(this,rt,Ue,2,65535,0),this[Ue]=rt&255,this[Ue+1]=rt>>>8,Ue+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(rt,Ue,xt){return rt=+rt,Ue=Ue>>>0,xt||re(this,rt,Ue,2,65535,0),this[Ue]=rt>>>8,this[Ue+1]=rt&255,Ue+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(rt,Ue,xt){return rt=+rt,Ue=Ue>>>0,xt||re(this,rt,Ue,4,4294967295,0),this[Ue+3]=rt>>>24,this[Ue+2]=rt>>>16,this[Ue+1]=rt>>>8,this[Ue]=rt&255,Ue+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(rt,Ue,xt){return rt=+rt,Ue=Ue>>>0,xt||re(this,rt,Ue,4,4294967295,0),this[Ue]=rt>>>24,this[Ue+1]=rt>>>16,this[Ue+2]=rt>>>8,this[Ue+3]=rt&255,Ue+4};function fe(st,rt,Ue,xt,Gt){De(rt,xt,Gt,st,Ue,7);let Jt=Number(rt&BigInt(4294967295));st[Ue++]=Jt,Jt=Jt>>8,st[Ue++]=Jt,Jt=Jt>>8,st[Ue++]=Jt,Jt=Jt>>8,st[Ue++]=Jt;let Ut=Number(rt>>BigInt(32)&BigInt(4294967295));return st[Ue++]=Ut,Ut=Ut>>8,st[Ue++]=Ut,Ut=Ut>>8,st[Ue++]=Ut,Ut=Ut>>8,st[Ue++]=Ut,Ue}function we(st,rt,Ue,xt,Gt){De(rt,xt,Gt,st,Ue,7);let Jt=Number(rt&BigInt(4294967295));st[Ue+7]=Jt,Jt=Jt>>8,st[Ue+6]=Jt,Jt=Jt>>8,st[Ue+5]=Jt,Jt=Jt>>8,st[Ue+4]=Jt;let Ut=Number(rt>>BigInt(32)&BigInt(4294967295));return st[Ue+3]=Ut,Ut=Ut>>8,st[Ue+2]=Ut,Ut=Ut>>8,st[Ue+1]=Ut,Ut=Ut>>8,st[Ue]=Ut,Ue+8}u.prototype.writeBigUInt64LE=Ht(function(rt,Ue=0){return fe(this,rt,Ue,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=Ht(function(rt,Ue=0){return we(this,rt,Ue,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(rt,Ue,xt,Gt){if(rt=+rt,Ue=Ue>>>0,!Gt){const Pr=Math.pow(2,8*xt-1);re(this,rt,Ue,xt,Pr-1,-Pr)}let Jt=0,Ut=1,kr=0;for(this[Ue]=rt&255;++Jt<xt&&(Ut*=256);)rt<0&&kr===0&&this[Ue+Jt-1]!==0&&(kr=1),this[Ue+Jt]=(rt/Ut>>0)-kr&255;return Ue+xt},u.prototype.writeIntBE=function(rt,Ue,xt,Gt){if(rt=+rt,Ue=Ue>>>0,!Gt){const Pr=Math.pow(2,8*xt-1);re(this,rt,Ue,xt,Pr-1,-Pr)}let Jt=xt-1,Ut=1,kr=0;for(this[Ue+Jt]=rt&255;--Jt>=0&&(Ut*=256);)rt<0&&kr===0&&this[Ue+Jt+1]!==0&&(kr=1),this[Ue+Jt]=(rt/Ut>>0)-kr&255;return Ue+xt},u.prototype.writeInt8=function(rt,Ue,xt){return rt=+rt,Ue=Ue>>>0,xt||re(this,rt,Ue,1,127,-128),rt<0&&(rt=255+rt+1),this[Ue]=rt&255,Ue+1},u.prototype.writeInt16LE=function(rt,Ue,xt){return rt=+rt,Ue=Ue>>>0,xt||re(this,rt,Ue,2,32767,-32768),this[Ue]=rt&255,this[Ue+1]=rt>>>8,Ue+2},u.prototype.writeInt16BE=function(rt,Ue,xt){return rt=+rt,Ue=Ue>>>0,xt||re(this,rt,Ue,2,32767,-32768),this[Ue]=rt>>>8,this[Ue+1]=rt&255,Ue+2},u.prototype.writeInt32LE=function(rt,Ue,xt){return rt=+rt,Ue=Ue>>>0,xt||re(this,rt,Ue,4,2147483647,-2147483648),this[Ue]=rt&255,this[Ue+1]=rt>>>8,this[Ue+2]=rt>>>16,this[Ue+3]=rt>>>24,Ue+4},u.prototype.writeInt32BE=function(rt,Ue,xt){return rt=+rt,Ue=Ue>>>0,xt||re(this,rt,Ue,4,2147483647,-2147483648),rt<0&&(rt=4294967295+rt+1),this[Ue]=rt>>>24,this[Ue+1]=rt>>>16,this[Ue+2]=rt>>>8,this[Ue+3]=rt&255,Ue+4},u.prototype.writeBigInt64LE=Ht(function(rt,Ue=0){return fe(this,rt,Ue,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=Ht(function(rt,Ue=0){return we(this,rt,Ue,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Oe(st,rt,Ue,xt,Gt,Jt){if(Ue+xt>st.length)throw new RangeError("Index out of range");if(Ue<0)throw new RangeError("Index out of range")}function ke(st,rt,Ue,xt,Gt){return rt=+rt,Ue=Ue>>>0,Gt||Oe(st,rt,Ue,4),w.write(st,rt,Ue,xt,23,4),Ue+4}u.prototype.writeFloatLE=function(rt,Ue,xt){return ke(this,rt,Ue,!0,xt)},u.prototype.writeFloatBE=function(rt,Ue,xt){return ke(this,rt,Ue,!1,xt)};function Le(st,rt,Ue,xt,Gt){return rt=+rt,Ue=Ue>>>0,Gt||Oe(st,rt,Ue,8),w.write(st,rt,Ue,xt,52,8),Ue+8}u.prototype.writeDoubleLE=function(rt,Ue,xt){return Le(this,rt,Ue,!0,xt)},u.prototype.writeDoubleBE=function(rt,Ue,xt){return Le(this,rt,Ue,!1,xt)},u.prototype.copy=function(rt,Ue,xt,Gt){if(!u.isBuffer(rt))throw new TypeError("argument should be a Buffer");if(xt||(xt=0),!Gt&&Gt!==0&&(Gt=this.length),Ue>=rt.length&&(Ue=rt.length),Ue||(Ue=0),Gt>0&&Gt<xt&&(Gt=xt),Gt===xt||rt.length===0||this.length===0)return 0;if(Ue<0)throw new RangeError("targetStart out of bounds");if(xt<0||xt>=this.length)throw new RangeError("Index out of range");if(Gt<0)throw new RangeError("sourceEnd out of bounds");Gt>this.length&&(Gt=this.length),rt.length-Ue<Gt-xt&&(Gt=rt.length-Ue+xt);const Jt=Gt-xt;return this===rt&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(Ue,xt,Gt):Uint8Array.prototype.set.call(rt,this.subarray(xt,Gt),Ue),Jt},u.prototype.fill=function(rt,Ue,xt,Gt){if(typeof rt=="string"){if(typeof Ue=="string"?(Gt=Ue,Ue=0,xt=this.length):typeof xt=="string"&&(Gt=xt,xt=this.length),Gt!==void 0&&typeof Gt!="string")throw new TypeError("encoding must be a string");if(typeof Gt=="string"&&!u.isEncoding(Gt))throw new TypeError("Unknown encoding: "+Gt);if(rt.length===1){const Ut=rt.charCodeAt(0);(Gt==="utf8"&&Ut<128||Gt==="latin1")&&(rt=Ut)}}else typeof rt=="number"?rt=rt&255:typeof rt=="boolean"&&(rt=Number(rt));if(Ue<0||this.length<Ue||this.length<xt)throw new RangeError("Out of range index");if(xt<=Ue)return this;Ue=Ue>>>0,xt=xt===void 0?this.length:xt>>>0,rt||(rt=0);let Jt;if(typeof rt=="number")for(Jt=Ue;Jt<xt;++Jt)this[Jt]=rt;else{const Ut=u.isBuffer(rt)?rt:u.from(rt,Gt),kr=Ut.length;if(kr===0)throw new TypeError('The value "'+rt+'" is invalid for argument "value"');for(Jt=0;Jt<xt-Ue;++Jt)this[Jt+Ue]=Ut[Jt%kr]}return this};var oe={};function be(st,rt,Ue){oe[st]=class extends Ue{constructor(){super(),Object.defineProperty(this,"message",{value:rt.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${st}]`,this.stack,delete this.name}get code(){return st}set code(Gt){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:Gt,writable:!0})}toString(){return`${this.name} [${st}]: ${this.message}`}}}be("ERR_BUFFER_OUT_OF_BOUNDS",function(st){return st?`${st} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),be("ERR_INVALID_ARG_TYPE",function(st,rt){return`The "${st}" argument must be of type number. Received type ${typeof rt}`},TypeError),be("ERR_OUT_OF_RANGE",function(st,rt,Ue){let xt=`The value of "${st}" is out of range.`,Gt=Ue;return Number.isInteger(Ue)&&Math.abs(Ue)>2**32?Gt=_e(String(Ue)):typeof Ue=="bigint"&&(Gt=String(Ue),(Ue>BigInt(2)**BigInt(32)||Ue<-(BigInt(2)**BigInt(32)))&&(Gt=_e(Gt)),Gt+="n"),xt+=` It must be ${rt}. Received ${Gt}`,xt},RangeError);function _e(st){let rt="",Ue=st.length;const xt=st[0]==="-"?1:0;for(;Ue>=xt+4;Ue-=3)rt=`_${st.slice(Ue-3,Ue)}${rt}`;return`${st.slice(0,Ue)}${rt}`}function he(st,rt,Ue){xe(rt,"offset"),(st[rt]===void 0||st[rt+Ue]===void 0)&&se(rt,st.length-(Ue+1))}function De(st,rt,Ue,xt,Gt,Jt){if(st>Ue||st<rt){const Ut=typeof rt=="bigint"?"n":"";let kr;throw rt===0||rt===BigInt(0)?kr=`>= 0${Ut} and < 2${Ut} ** ${(Jt+1)*8}${Ut}`:kr=`>= -(2${Ut} ** ${(Jt+1)*8-1}${Ut}) and < 2 ** ${(Jt+1)*8-1}${Ut}`,new oe.ERR_OUT_OF_RANGE("value",kr,st)}he(xt,Gt,Jt)}function xe(st,rt){if(typeof st!="number")throw new oe.ERR_INVALID_ARG_TYPE(rt,"number",st)}function se(st,rt,Ue){throw Math.floor(st)!==st?(xe(st,Ue),new oe.ERR_OUT_OF_RANGE("offset","an integer",st)):rt<0?new oe.ERR_BUFFER_OUT_OF_BOUNDS:new oe.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${rt}`,st)}var Ee=/[^+/0-9A-Za-z-_]/g;function Te(st){if(st=st.split("=")[0],st=st.trim().replace(Ee,""),st.length<2)return"";for(;st.length%4!==0;)st=st+"=";return st}function Be(st,rt){rt=rt||1/0;let Ue;const xt=st.length;let Gt=null;const Jt=[];for(let Ut=0;Ut<xt;++Ut){if(Ue=st.charCodeAt(Ut),Ue>55295&&Ue<57344){if(!Gt){if(Ue>56319){(rt-=3)>-1&&Jt.push(239,191,189);continue}else if(Ut+1===xt){(rt-=3)>-1&&Jt.push(239,191,189);continue}Gt=Ue;continue}if(Ue<56320){(rt-=3)>-1&&Jt.push(239,191,189),Gt=Ue;continue}Ue=(Gt-55296<<10|Ue-56320)+65536}else Gt&&(rt-=3)>-1&&Jt.push(239,191,189);if(Gt=null,Ue<128){if((rt-=1)<0)break;Jt.push(Ue)}else if(Ue<2048){if((rt-=2)<0)break;Jt.push(Ue>>6|192,Ue&63|128)}else if(Ue<65536){if((rt-=3)<0)break;Jt.push(Ue>>12|224,Ue>>6&63|128,Ue&63|128)}else if(Ue<1114112){if((rt-=4)<0)break;Jt.push(Ue>>18|240,Ue>>12&63|128,Ue>>6&63|128,Ue&63|128)}else throw new Error("Invalid code point")}return Jt}function tt(st){const rt=[];for(let Ue=0;Ue<st.length;++Ue)rt.push(st.charCodeAt(Ue)&255);return rt}function at(st,rt){let Ue,xt,Gt;const Jt=[];for(let Ut=0;Ut<st.length&&!((rt-=2)<0);++Ut)Ue=st.charCodeAt(Ut),xt=Ue>>8,Gt=Ue%256,Jt.push(Gt),Jt.push(xt);return Jt}function gt(st){return le.toByteArray(Te(st))}function pt(st,rt,Ue,xt){let Gt;for(Gt=0;Gt<xt&&!(Gt+Ue>=rt.length||Gt>=st.length);++Gt)rt[Gt+Ue]=st[Gt];return Gt}function Rt(st,rt){return st instanceof rt||st!=null&&st.constructor!=null&&st.constructor.name!=null&&st.constructor.name===rt.name}function $t(st){return st!==st}var Wt=(function(){const st="0123456789abcdef",rt=new Array(256);for(let Ue=0;Ue<16;++Ue){const xt=Ue*16;for(let Gt=0;Gt<16;++Gt)rt[xt+Gt]=st[Ue]+st[Gt]}return rt})();function Ht(st){return typeof BigInt>"u"?Ft:st}function Ft(){throw new Error("BigInt not supported")}}}),$g=U({"node_modules/has-symbols/shams.js"(pe,le){le.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var R={},O=Symbol("test"),z=Object(O);if(typeof O=="string"||Object.prototype.toString.call(O)!=="[object Symbol]"||Object.prototype.toString.call(z)!=="[object Symbol]")return!1;var l=42;R[O]=l;for(var u in R)return!1;if(typeof Object.keys=="function"&&Object.keys(R).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(R).length!==0)return!1;var c=Object.getOwnPropertySymbols(R);if(c.length!==1||c[0]!==O||!Object.prototype.propertyIsEnumerable.call(R,O))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var p=Object.getOwnPropertyDescriptor(R,O);if(p.value!==l||p.enumerable!==!0)return!1}return!0}}}),Ix=U({"node_modules/has-tostringtag/shams.js"(pe,le){var w=$g();le.exports=function(){return w()&&!!Symbol.toStringTag}}}),$d=U({"node_modules/es-object-atoms/index.js"(pe,le){le.exports=Object}}),kf=U({"node_modules/es-errors/index.js"(pe,le){le.exports=Error}}),xp=U({"node_modules/es-errors/eval.js"(pe,le){le.exports=EvalError}}),Px=U({"node_modules/es-errors/range.js"(pe,le){le.exports=RangeError}}),RT=U({"node_modules/es-errors/ref.js"(pe,le){le.exports=ReferenceError}}),p2=U({"node_modules/es-errors/syntax.js"(pe,le){le.exports=SyntaxError}}),mS=U({"node_modules/es-errors/type.js"(pe,le){le.exports=TypeError}}),kT=U({"node_modules/es-errors/uri.js"(pe,le){le.exports=URIError}}),G0=U({"node_modules/math-intrinsics/abs.js"(pe,le){le.exports=Math.abs}}),Dx=U({"node_modules/math-intrinsics/floor.js"(pe,le){le.exports=Math.floor}}),ZA=U({"node_modules/math-intrinsics/max.js"(pe,le){le.exports=Math.max}}),ag=U({"node_modules/math-intrinsics/min.js"(pe,le){le.exports=Math.min}}),gS=U({"node_modules/math-intrinsics/pow.js"(pe,le){le.exports=Math.pow}}),O1=U({"node_modules/math-intrinsics/round.js"(pe,le){le.exports=Math.round}}),$b=U({"node_modules/math-intrinsics/isNaN.js"(pe,le){le.exports=Number.isNaN||function(R){return R!==R}}}),S_=U({"node_modules/math-intrinsics/sign.js"(pe,le){var w=$b();le.exports=function(O){return w(O)||O===0?O:O<0?-1:1}}}),IM=U({"node_modules/gopd/gOPD.js"(pe,le){le.exports=Object.getOwnPropertyDescriptor}}),v2=U({"node_modules/gopd/index.js"(pe,le){var w=IM();if(w)try{w([],"length")}catch{w=null}le.exports=w}}),Kp=U({"node_modules/es-define-property/index.js"(pe,le){var w=Object.defineProperty||!1;if(w)try{w({},"a",{value:1})}catch{w=!1}le.exports=w}}),PM=U({"node_modules/has-symbols/index.js"(pe,le){var w=typeof Symbol<"u"&&Symbol,R=$g();le.exports=function(){return typeof w!="function"||typeof Symbol!="function"||typeof w("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:R()}}}),hw=U({"node_modules/get-proto/Reflect.getPrototypeOf.js"(pe,le){le.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}}),Lx=U({"node_modules/get-proto/Object.getPrototypeOf.js"(pe,le){var w=$d();le.exports=w.getPrototypeOf||null}}),Bm=U({"node_modules/function-bind/implementation.js"(pe,le){var w="Function.prototype.bind called on incompatible ",R=Object.prototype.toString,O=Math.max,z="[object Function]",l=function(f,v){for(var h=[],m=0;m<f.length;m+=1)h[m]=f[m];for(var _=0;_<v.length;_+=1)h[_+f.length]=v[_];return h},u=function(f,v){for(var h=[],m=v,_=0;m<f.length;m+=1,_+=1)h[_]=f[m];return h},c=function(p,f){for(var v="",h=0;h<p.length;h+=1)v+=p[h],h+1<p.length&&(v+=f);return v};le.exports=function(f){var v=this;if(typeof v!="function"||R.apply(v)!==z)throw new TypeError(w+v);for(var h=u(arguments,1),m,_=function(){if(this instanceof m){var g=v.apply(this,l(h,arguments));return Object(g)===g?g:this}return v.apply(f,l(h,arguments))},x=O(0,v.length-h.length),A=[],E=0;E<x;E++)A[E]="$"+E;if(m=Function("binder","return function ("+c(A,",")+"){ return binder.apply(this,arguments); }")(_),v.prototype){var D=function(){};D.prototype=v.prototype,m.prototype=new D,D.prototype=null}return m}}}),pw=U({"node_modules/function-bind/index.js"(pe,le){var w=Bm();le.exports=Function.prototype.bind||w}}),DM=U({"node_modules/call-bind-apply-helpers/functionCall.js"(pe,le){le.exports=Function.prototype.call}}),gR=U({"node_modules/call-bind-apply-helpers/functionApply.js"(pe,le){le.exports=Function.prototype.apply}}),Fv=U({"node_modules/call-bind-apply-helpers/reflectApply.js"(pe,le){le.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply}}),yR=U({"node_modules/call-bind-apply-helpers/actualApply.js"(pe,le){var w=pw(),R=gR(),O=DM(),z=Fv();le.exports=z||w.call(O,R)}}),vw=U({"node_modules/call-bind-apply-helpers/index.js"(pe,le){var w=pw(),R=mS(),O=DM(),z=yR();le.exports=function(u){if(u.length<1||typeof u[0]!="function")throw new R("a function is required");return z(w,O,u)}}}),mw=U({"node_modules/dunder-proto/get.js"(pe,le){var w=vw(),R=v2(),O;try{O=[].__proto__===Array.prototype}catch(c){if(!c||typeof c!="object"||!("code"in c)||c.code!=="ERR_PROTO_ACCESS")throw c}var z=!!O&&R&&R(Object.prototype,"__proto__"),l=Object,u=l.getPrototypeOf;le.exports=z&&typeof z.get=="function"?w([z.get]):typeof u=="function"?(function(p){return u(p==null?p:l(p))}):!1}}),Eg=U({"node_modules/get-proto/index.js"(pe,le){var w=hw(),R=Lx(),O=mw();le.exports=w?function(l){return w(l)}:R?function(l){if(!l||typeof l!="object"&&typeof l!="function")throw new TypeError("getProto: not an object");return R(l)}:O?function(l){return O(l)}:null}}),KA=U({"node_modules/hasown/index.js"(pe,le){var w=Function.prototype.call,R=Object.prototype.hasOwnProperty,O=pw();le.exports=O.call(w,R)}}),Lp=U({"node_modules/get-intrinsic/index.js"(pe,le){var w,R=$d(),O=kf(),z=xp(),l=Px(),u=RT(),c=p2(),p=mS(),f=kT(),v=G0(),h=Dx(),m=ZA(),_=ag(),x=gS(),A=O1(),E=S_(),D=Function,g=function(he){try{return D('"use strict"; return ('+he+").constructor;")()}catch{}},C=v2(),I=Kp(),N=function(){throw new p},F=C?(function(){try{return arguments.callee,N}catch{try{return C(arguments,"callee").get}catch{return N}}})():N,k=PM()(),P=Eg(),T=Lx(),y=hw(),S=gR(),M=DM(),W={},$=typeof Uint8Array>"u"||!P?w:P(Uint8Array),Z={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?w:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?w:ArrayBuffer,"%ArrayIteratorPrototype%":k&&P?P([][Symbol.iterator]()):w,"%AsyncFromSyncIteratorPrototype%":w,"%AsyncFunction%":W,"%AsyncGenerator%":W,"%AsyncGeneratorFunction%":W,"%AsyncIteratorPrototype%":W,"%Atomics%":typeof Atomics>"u"?w:Atomics,"%BigInt%":typeof BigInt>"u"?w:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?w:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?w:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?w:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":O,"%eval%":eval,"%EvalError%":z,"%Float16Array%":typeof Float16Array>"u"?w:Float16Array,"%Float32Array%":typeof Float32Array>"u"?w:Float32Array,"%Float64Array%":typeof Float64Array>"u"?w:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?w:FinalizationRegistry,"%Function%":D,"%GeneratorFunction%":W,"%Int8Array%":typeof Int8Array>"u"?w:Int8Array,"%Int16Array%":typeof Int16Array>"u"?w:Int16Array,"%Int32Array%":typeof Int32Array>"u"?w:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":k&&P?P(P([][Symbol.iterator]())):w,"%JSON%":typeof JSON=="object"?JSON:w,"%Map%":typeof Map>"u"?w:Map,"%MapIteratorPrototype%":typeof Map>"u"||!k||!P?w:P(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":R,"%Object.getOwnPropertyDescriptor%":C,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?w:Promise,"%Proxy%":typeof Proxy>"u"?w:Proxy,"%RangeError%":l,"%ReferenceError%":u,"%Reflect%":typeof Reflect>"u"?w:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?w:Set,"%SetIteratorPrototype%":typeof Set>"u"||!k||!P?w:P(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?w:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":k&&P?P(""[Symbol.iterator]()):w,"%Symbol%":k?Symbol:w,"%SyntaxError%":c,"%ThrowTypeError%":F,"%TypedArray%":$,"%TypeError%":p,"%Uint8Array%":typeof Uint8Array>"u"?w:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?w:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?w:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?w:Uint32Array,"%URIError%":f,"%WeakMap%":typeof WeakMap>"u"?w:WeakMap,"%WeakRef%":typeof WeakRef>"u"?w:WeakRef,"%WeakSet%":typeof WeakSet>"u"?w:WeakSet,"%Function.prototype.call%":M,"%Function.prototype.apply%":S,"%Object.defineProperty%":I,"%Object.getPrototypeOf%":T,"%Math.abs%":v,"%Math.floor%":h,"%Math.max%":m,"%Math.min%":_,"%Math.pow%":x,"%Math.round%":A,"%Math.sign%":E,"%Reflect.getPrototypeOf%":y};if(P)try{null.error}catch(he){K=P(P(he)),Z["%Error.prototype%"]=K}var K,Q=function he(De){var xe;if(De==="%AsyncFunction%")xe=g("async function () {}");else if(De==="%GeneratorFunction%")xe=g("function* () {}");else if(De==="%AsyncGeneratorFunction%")xe=g("async function* () {}");else if(De==="%AsyncGenerator%"){var se=he("%AsyncGeneratorFunction%");se&&(xe=se.prototype)}else if(De==="%AsyncIteratorPrototype%"){var Ee=he("%AsyncGenerator%");Ee&&P&&(xe=P(Ee.prototype))}return Z[De]=xe,xe},J={__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"]},G=pw(),ee=KA(),re=G.call(M,Array.prototype.concat),fe=G.call(S,Array.prototype.splice),we=G.call(M,String.prototype.replace),Oe=G.call(M,String.prototype.slice),ke=G.call(M,RegExp.prototype.exec),Le=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,oe=/\\(\\)?/g,be=function(De){var xe=Oe(De,0,1),se=Oe(De,-1);if(xe==="%"&&se!=="%")throw new c("invalid intrinsic syntax, expected closing `%`");if(se==="%"&&xe!=="%")throw new c("invalid intrinsic syntax, expected opening `%`");var Ee=[];return we(De,Le,function(Te,Be,tt,at){Ee[Ee.length]=tt?we(at,oe,"$1"):Be||Te}),Ee},_e=function(De,xe){var se=De,Ee;if(ee(J,se)&&(Ee=J[se],se="%"+Ee[0]+"%"),ee(Z,se)){var Te=Z[se];if(Te===W&&(Te=Q(se)),typeof Te>"u"&&!xe)throw new p("intrinsic "+De+" exists, but is not available. Please file an issue!");return{alias:Ee,name:se,value:Te}}throw new c("intrinsic "+De+" does not exist!")};le.exports=function(De,xe){if(typeof De!="string"||De.length===0)throw new p("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof xe!="boolean")throw new p('"allowMissing" argument must be a boolean');if(ke(/^%?[^%]*%?$/,De)===null)throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var se=be(De),Ee=se.length>0?se[0]:"",Te=_e("%"+Ee+"%",xe),Be=Te.name,tt=Te.value,at=!1,gt=Te.alias;gt&&(Ee=gt[0],fe(se,re([0,1],gt)));for(var pt=1,Rt=!0;pt<se.length;pt+=1){var $t=se[pt],Wt=Oe($t,0,1),Ht=Oe($t,-1);if((Wt==='"'||Wt==="'"||Wt==="`"||Ht==='"'||Ht==="'"||Ht==="`")&&Wt!==Ht)throw new c("property names with quotes must have matching quotes");if(($t==="constructor"||!Rt)&&(at=!0),Ee+="."+$t,Be="%"+Ee+"%",ee(Z,Be))tt=Z[Be];else if(tt!=null){if(!($t in tt)){if(!xe)throw new p("base intrinsic for "+De+" exists, but the property is not available.");return}if(C&&pt+1>=se.length){var Ft=C(tt,$t);Rt=!!Ft,Rt&&"get"in Ft&&!("originalValue"in Ft.get)?tt=Ft.get:tt=tt[$t]}else Rt=ee(tt,$t),tt=tt[$t];Rt&&!at&&(Z[Be]=tt)}}return tt}}}),Pd=U({"node_modules/define-data-property/index.js"(pe,le){var w=Kp(),R=p2(),O=mS(),z=v2();le.exports=function(u,c,p){if(!u||typeof u!="object"&&typeof u!="function")throw new O("`obj` must be an object or a function`");if(typeof c!="string"&&typeof c!="symbol")throw new O("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new O("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new O("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new O("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new O("`loose`, if provided, must be a boolean");var f=arguments.length>3?arguments[3]:null,v=arguments.length>4?arguments[4]:null,h=arguments.length>5?arguments[5]:null,m=arguments.length>6?arguments[6]:!1,_=!!z&&z(u,c);if(w)w(u,c,{configurable:h===null&&_?_.configurable:!h,enumerable:f===null&&_?_.enumerable:!f,value:p,writable:v===null&&_?_.writable:!v});else if(m||!f&&!v&&!h)u[c]=p;else throw new R("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}}),sh=U({"node_modules/has-property-descriptors/index.js"(pe,le){var w=Kp(),R=function(){return!!w};R.hasArrayLengthDefineBug=function(){if(!w)return null;try{return w([],"length",{value:1}).length!==1}catch{return!0}},le.exports=R}}),wf=U({"node_modules/set-function-length/index.js"(pe,le){var w=Lp(),R=Pd(),O=sh()(),z=v2(),l=mS(),u=w("%Math.floor%");le.exports=function(p,f){if(typeof p!="function")throw new l("`fn` is not a function");if(typeof f!="number"||f<0||f>4294967295||u(f)!==f)throw new l("`length` must be a positive 32-bit integer");var v=arguments.length>2&&!!arguments[2],h=!0,m=!0;if("length"in p&&z){var _=z(p,"length");_&&!_.configurable&&(h=!1),_&&!_.writable&&(m=!1)}return(h||m||!v)&&(O?R(p,"length",f,!0,!0):R(p,"length",f)),p}}}),Ed=U({"node_modules/call-bind/index.js"(pe,le){var w=pw(),R=Lp(),O=wf(),z=mS(),l=R("%Function.prototype.apply%"),u=R("%Function.prototype.call%"),c=R("%Reflect.apply%",!0)||w.call(u,l),p=Kp(),f=R("%Math.max%");le.exports=function(m){if(typeof m!="function")throw new z("a function is required");var _=c(w,u,arguments);return O(_,1+f(0,m.length-(arguments.length-1)),!0)};var v=function(){return c(w,l,arguments)};p?p(le.exports,"apply",{value:v}):le.exports.apply=v}}),zv=U({"node_modules/call-bind/callBound.js"(pe,le){var w=Lp(),R=Ed(),O=R(w("String.prototype.indexOf"));le.exports=function(l,u){var c=w(l,!!u);return typeof c=="function"&&O(l,".prototype.")>-1?R(c):c}}}),Wb=U({"node_modules/is-arguments/index.js"(pe,le){var w=Ix()(),R=zv(),O=R("Object.prototype.toString"),z=function(p){return w&&p&&typeof p=="object"&&Symbol.toStringTag in p?!1:O(p)==="[object Arguments]"},l=function(p){return z(p)?!0:p!==null&&typeof p=="object"&&typeof p.length=="number"&&p.length>=0&&O(p)!=="[object Array]"&&O(p.callee)==="[object Function]"},u=(function(){return z(arguments)})();z.isLegacyArguments=l,le.exports=u?z:l}}),a3=U({"node_modules/is-generator-function/index.js"(pe,le){var w=Object.prototype.toString,R=Function.prototype.toString,O=/^\s*(?:function)?\*/,z=Ix()(),l=Object.getPrototypeOf,u=function(){if(!z)return!1;try{return Function("return function*() {}")()}catch{}},c;le.exports=function(f){if(typeof f!="function")return!1;if(O.test(R.call(f)))return!0;if(!z){var v=w.call(f);return v==="[object GeneratorFunction]"}if(!l)return!1;if(typeof c>"u"){var h=u();c=h?l(h):!1}return l(f)===c}}}),o3=U({"node_modules/is-callable/index.js"(pe,le){var w=Function.prototype.toString,R=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,O,z;if(typeof R=="function"&&typeof Object.defineProperty=="function")try{O=Object.defineProperty({},"length",{get:function(){throw z}}),z={},R(function(){throw 42},null,O)}catch(C){C!==z&&(R=null)}else R=null;var l=/^\s*class\b/,u=function(I){try{var N=w.call(I);return l.test(N)}catch{return!1}},c=function(I){try{return u(I)?!1:(w.call(I),!0)}catch{return!1}},p=Object.prototype.toString,f="[object Object]",v="[object Function]",h="[object GeneratorFunction]",m="[object HTMLAllCollection]",_="[object HTML document.all class]",x="[object HTMLCollection]",A=typeof Symbol=="function"&&!!Symbol.toStringTag,E=!(0 in[,]),D=function(){return!1};typeof document=="object"&&(g=document.all,p.call(g)===p.call(document.all)&&(D=function(I){if((E||!I)&&(typeof I>"u"||typeof I=="object"))try{var N=p.call(I);return(N===m||N===_||N===x||N===f)&&I("")==null}catch{}return!1}));var g;le.exports=R?function(I){if(D(I))return!0;if(!I||typeof I!="function"&&typeof I!="object")return!1;try{R(I,null,O)}catch(N){if(N!==z)return!1}return!u(I)&&c(I)}:function(I){if(D(I))return!0;if(!I||typeof I!="function"&&typeof I!="object")return!1;if(A)return c(I);if(u(I))return!1;var N=p.call(I);return N!==v&&N!==h&&!/^\[object HTML/.test(N)?!1:c(I)}}}),Yb=U({"node_modules/for-each/index.js"(pe,le){var w=o3(),R=Object.prototype.toString,O=Object.prototype.hasOwnProperty,z=function(f,v,h){for(var m=0,_=f.length;m<_;m++)O.call(f,m)&&(h==null?v(f[m],m,f):v.call(h,f[m],m,f))},l=function(f,v,h){for(var m=0,_=f.length;m<_;m++)h==null?v(f.charAt(m),m,f):v.call(h,f.charAt(m),m,f)},u=function(f,v,h){for(var m in f)O.call(f,m)&&(h==null?v(f[m],m,f):v.call(h,f[m],m,f))},c=function(f,v,h){if(!w(v))throw new TypeError("iterator must be a function");var m;arguments.length>=3&&(m=h),R.call(f)==="[object Array]"?z(f,v,m):typeof f=="string"?l(f,v,m):u(f,v,m)};le.exports=c}}),am=U({"node_modules/available-typed-arrays/index.js"(pe,le){var w=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],R=typeof globalThis>"u"?window:globalThis;le.exports=function(){for(var z=[],l=0;l<w.length;l++)typeof R[w[l]]=="function"&&(z[z.length]=w[l]);return z}}}),T_=U({"node_modules/which-typed-array/index.js"(pe,le){var w=Yb(),R=am(),O=Ed(),z=zv(),l=v2(),u=z("Object.prototype.toString"),c=Ix()(),p=typeof globalThis>"u"?window:globalThis,f=R(),v=z("String.prototype.slice"),h=Object.getPrototypeOf,m=z("Array.prototype.indexOf",!0)||function(D,g){for(var C=0;C<D.length;C+=1)if(D[C]===g)return C;return-1},_={__proto__:null};c&&l&&h?w(f,function(E){var D=new p[E];if(Symbol.toStringTag in D){var g=h(D),C=l(g,Symbol.toStringTag);if(!C){var I=h(g);C=l(I,Symbol.toStringTag)}_["$"+E]=O(C.get)}}):w(f,function(E){var D=new p[E],g=D.slice||D.set;g&&(_["$"+E]=O(g))});var x=function(D){var g=!1;return w(_,function(C,I){if(!g)try{"$"+C(D)===I&&(g=v(I,1))}catch{}}),g},A=function(D){var g=!1;return w(_,function(C,I){if(!g)try{C(D),g=v(I,1)}catch{}}),g};le.exports=function(D){if(!D||typeof D!="object")return!1;if(!c){var g=v(u(D),8,-1);return m(f,g)>-1?g:g!=="Object"?!1:A(D)}return l?x(D):null}}}),gw=U({"node_modules/is-typed-array/index.js"(pe,le){var w=Yb(),R=am(),O=zv(),z=O("Object.prototype.toString"),l=Ix()(),u=v2(),c=typeof globalThis>"u"?window:globalThis,p=R(),f=O("Array.prototype.indexOf",!0)||function(A,E){for(var D=0;D<A.length;D+=1)if(A[D]===E)return D;return-1},v=O("String.prototype.slice"),h={},m=Object.getPrototypeOf;l&&u&&m&&w(p,function(x){var A=new c[x];if(Symbol.toStringTag in A){var E=m(A),D=u(E,Symbol.toStringTag);if(!D){var g=m(E);D=u(g,Symbol.toStringTag)}h[x]=D.get}});var _=function(A){var E=!1;return w(h,function(D,g){if(!E)try{E=D.call(A)===g}catch{}}),E};le.exports=function(A){if(!A||typeof A!="object")return!1;if(!l||!(Symbol.toStringTag in A)){var E=v(z(A),8,-1);return f(p,E)>-1}return u?_(A):!1}}}),yS=U({"node_modules/util/support/types.js"(pe){var le=Wb(),w=a3(),R=T_(),O=gw();function z(at){return at.call.bind(at)}var l=typeof BigInt<"u",u=typeof Symbol<"u",c=z(Object.prototype.toString),p=z(Number.prototype.valueOf),f=z(String.prototype.valueOf),v=z(Boolean.prototype.valueOf);l&&(h=z(BigInt.prototype.valueOf));var h;u&&(m=z(Symbol.prototype.valueOf));var m;function _(at,gt){if(typeof at!="object")return!1;try{return gt(at),!0}catch{return!1}}pe.isArgumentsObject=le,pe.isGeneratorFunction=w,pe.isTypedArray=O;function x(at){return typeof Promise<"u"&&at instanceof Promise||at!==null&&typeof at=="object"&&typeof at.then=="function"&&typeof at.catch=="function"}pe.isPromise=x;function A(at){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(at):O(at)||fe(at)}pe.isArrayBufferView=A;function E(at){return R(at)==="Uint8Array"}pe.isUint8Array=E;function D(at){return R(at)==="Uint8ClampedArray"}pe.isUint8ClampedArray=D;function g(at){return R(at)==="Uint16Array"}pe.isUint16Array=g;function C(at){return R(at)==="Uint32Array"}pe.isUint32Array=C;function I(at){return R(at)==="Int8Array"}pe.isInt8Array=I;function N(at){return R(at)==="Int16Array"}pe.isInt16Array=N;function F(at){return R(at)==="Int32Array"}pe.isInt32Array=F;function k(at){return R(at)==="Float32Array"}pe.isFloat32Array=k;function P(at){return R(at)==="Float64Array"}pe.isFloat64Array=P;function T(at){return R(at)==="BigInt64Array"}pe.isBigInt64Array=T;function y(at){return R(at)==="BigUint64Array"}pe.isBigUint64Array=y;function S(at){return c(at)==="[object Map]"}S.working=typeof Map<"u"&&S(new Map);function M(at){return typeof Map>"u"?!1:S.working?S(at):at instanceof Map}pe.isMap=M;function W(at){return c(at)==="[object Set]"}W.working=typeof Set<"u"&&W(new Set);function $(at){return typeof Set>"u"?!1:W.working?W(at):at instanceof Set}pe.isSet=$;function Z(at){return c(at)==="[object WeakMap]"}Z.working=typeof WeakMap<"u"&&Z(new WeakMap);function K(at){return typeof WeakMap>"u"?!1:Z.working?Z(at):at instanceof WeakMap}pe.isWeakMap=K;function Q(at){return c(at)==="[object WeakSet]"}Q.working=typeof WeakSet<"u"&&Q(new WeakSet);function J(at){return Q(at)}pe.isWeakSet=J;function G(at){return c(at)==="[object ArrayBuffer]"}G.working=typeof ArrayBuffer<"u"&&G(new ArrayBuffer);function ee(at){return typeof ArrayBuffer>"u"?!1:G.working?G(at):at instanceof ArrayBuffer}pe.isArrayBuffer=ee;function re(at){return c(at)==="[object DataView]"}re.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&re(new DataView(new ArrayBuffer(1),0,1));function fe(at){return typeof DataView>"u"?!1:re.working?re(at):at instanceof DataView}pe.isDataView=fe;var we=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function Oe(at){return c(at)==="[object SharedArrayBuffer]"}function ke(at){return typeof we>"u"?!1:(typeof Oe.working>"u"&&(Oe.working=Oe(new we)),Oe.working?Oe(at):at instanceof we)}pe.isSharedArrayBuffer=ke;function Le(at){return c(at)==="[object AsyncFunction]"}pe.isAsyncFunction=Le;function oe(at){return c(at)==="[object Map Iterator]"}pe.isMapIterator=oe;function be(at){return c(at)==="[object Set Iterator]"}pe.isSetIterator=be;function _e(at){return c(at)==="[object Generator]"}pe.isGeneratorObject=_e;function he(at){return c(at)==="[object WebAssembly.Module]"}pe.isWebAssemblyCompiledModule=he;function De(at){return _(at,p)}pe.isNumberObject=De;function xe(at){return _(at,f)}pe.isStringObject=xe;function se(at){return _(at,v)}pe.isBooleanObject=se;function Ee(at){return l&&_(at,h)}pe.isBigIntObject=Ee;function Te(at){return u&&_(at,m)}pe.isSymbolObject=Te;function Be(at){return De(at)||xe(at)||se(at)||Ee(at)||Te(at)}pe.isBoxedPrimitive=Be;function tt(at){return typeof Uint8Array<"u"&&(ee(at)||ke(at))}pe.isAnyArrayBuffer=tt,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(at){Object.defineProperty(pe,at,{enumerable:!1,value:function(){throw new Error(at+" is not supported in userland")}})})}}),Xb=U({"node_modules/util/support/isBufferBrowser.js"(pe,le){le.exports=function(R){return R&&typeof R=="object"&&typeof R.copy=="function"&&typeof R.fill=="function"&&typeof R.readUInt8=="function"}}}),ip=U({"(disabled):node_modules/util/util.js"(pe){var le=Object.getOwnPropertyDescriptors||function(fe){for(var we=Object.keys(fe),Oe={},ke=0;ke<we.length;ke++)Oe[we[ke]]=Object.getOwnPropertyDescriptor(fe,we[ke]);return Oe},w=/%[sdj%]/g;pe.format=function(re){if(!I(re)){for(var fe=[],we=0;we<arguments.length;we++)fe.push(l(arguments[we]));return fe.join(" ")}for(var we=1,Oe=arguments,ke=Oe.length,Le=String(re).replace(w,function(be){if(be==="%%")return"%";if(we>=ke)return be;switch(be){case"%s":return String(Oe[we++]);case"%d":return Number(Oe[we++]);case"%j":try{return JSON.stringify(Oe[we++])}catch{return"[Circular]"}default:return be}}),oe=Oe[we];we<ke;oe=Oe[++we])D(oe)||!P(oe)?Le+=" "+oe:Le+=" "+l(oe);return Le},pe.deprecate=function(re,fe){if(typeof process<"u"&&process.noDeprecation===!0)return re;if(typeof process>"u")return function(){return pe.deprecate(re,fe).apply(this,arguments)};var we=!1;function Oe(){if(!we){if(process.throwDeprecation)throw new Error(fe);process.traceDeprecation?console.trace(fe):console.error(fe),we=!0}return re.apply(this,arguments)}return Oe};var R={},O=/^$/;z="false",z=z.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),O=new RegExp("^"+z+"$","i");var z;pe.debuglog=function(re){if(re=re.toUpperCase(),!R[re])if(O.test(re)){var fe=process.pid;R[re]=function(){var we=pe.format.apply(pe,arguments);console.error("%s %d: %s",re,fe,we)}}else R[re]=function(){};return R[re]};function l(re,fe){var we={seen:[],stylize:c};return arguments.length>=3&&(we.depth=arguments[2]),arguments.length>=4&&(we.colors=arguments[3]),E(fe)?we.showHidden=fe:fe&&pe._extend(we,fe),F(we.showHidden)&&(we.showHidden=!1),F(we.depth)&&(we.depth=2),F(we.colors)&&(we.colors=!1),F(we.customInspect)&&(we.customInspect=!0),we.colors&&(we.stylize=u),f(we,re,we.depth)}pe.inspect=l,l.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function u(re,fe){var we=l.styles[fe];return we?"\x1B["+l.colors[we][0]+"m"+re+"\x1B["+l.colors[we][1]+"m":re}function c(re,fe){return re}function p(re){var fe={};return re.forEach(function(we,Oe){fe[we]=!0}),fe}function f(re,fe,we){if(re.customInspect&&fe&&S(fe.inspect)&&fe.inspect!==pe.inspect&&!(fe.constructor&&fe.constructor.prototype===fe)){var Oe=fe.inspect(we,re);return I(Oe)||(Oe=f(re,Oe,we)),Oe}var ke=v(re,fe);if(ke)return ke;var Le=Object.keys(fe),oe=p(Le);if(re.showHidden&&(Le=Object.getOwnPropertyNames(fe)),y(fe)&&(Le.indexOf("message")>=0||Le.indexOf("description")>=0))return h(fe);if(Le.length===0){if(S(fe)){var be=fe.name?": "+fe.name:"";return re.stylize("[Function"+be+"]","special")}if(k(fe))return re.stylize(RegExp.prototype.toString.call(fe),"regexp");if(T(fe))return re.stylize(Date.prototype.toString.call(fe),"date");if(y(fe))return h(fe)}var _e="",he=!1,De=["{","}"];if(A(fe)&&(he=!0,De=["[","]"]),S(fe)){var xe=fe.name?": "+fe.name:"";_e=" [Function"+xe+"]"}if(k(fe)&&(_e=" "+RegExp.prototype.toString.call(fe)),T(fe)&&(_e=" "+Date.prototype.toUTCString.call(fe)),y(fe)&&(_e=" "+h(fe)),Le.length===0&&(!he||fe.length==0))return De[0]+_e+De[1];if(we<0)return k(fe)?re.stylize(RegExp.prototype.toString.call(fe),"regexp"):re.stylize("[Object]","special");re.seen.push(fe);var se;return he?se=m(re,fe,we,oe,Le):se=Le.map(function(Ee){return _(re,fe,we,oe,Ee,he)}),re.seen.pop(),x(se,_e,De)}function v(re,fe){if(F(fe))return re.stylize("undefined","undefined");if(I(fe)){var we="'"+JSON.stringify(fe).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return re.stylize(we,"string")}if(C(fe))return re.stylize(""+fe,"number");if(E(fe))return re.stylize(""+fe,"boolean");if(D(fe))return re.stylize("null","null")}function h(re){return"["+Error.prototype.toString.call(re)+"]"}function m(re,fe,we,Oe,ke){for(var Le=[],oe=0,be=fe.length;oe<be;++oe)Q(fe,String(oe))?Le.push(_(re,fe,we,Oe,String(oe),!0)):Le.push("");return ke.forEach(function(_e){_e.match(/^\d+$/)||Le.push(_(re,fe,we,Oe,_e,!0))}),Le}function _(re,fe,we,Oe,ke,Le){var oe,be,_e;if(_e=Object.getOwnPropertyDescriptor(fe,ke)||{value:fe[ke]},_e.get?_e.set?be=re.stylize("[Getter/Setter]","special"):be=re.stylize("[Getter]","special"):_e.set&&(be=re.stylize("[Setter]","special")),Q(Oe,ke)||(oe="["+ke+"]"),be||(re.seen.indexOf(_e.value)<0?(D(we)?be=f(re,_e.value,null):be=f(re,_e.value,we-1),be.indexOf(`
`)>-1&&(Le?be=be.split(`
`).map(function(he){return"  "+he}).join(`
`).slice(2):be=`
`+be.split(`
`).map(function(he){return"   "+he}).join(`
`))):be=re.stylize("[Circular]","special")),F(oe)){if(Le&&ke.match(/^\d+$/))return be;oe=JSON.stringify(""+ke),oe.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(oe=oe.slice(1,-1),oe=re.stylize(oe,"name")):(oe=oe.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),oe=re.stylize(oe,"string"))}return oe+": "+be}function x(re,fe,we){var Oe=re.reduce(function(ke,Le){return Le.indexOf(`
`)>=0,ke+Le.replace(/\u001b\[\d\d?m/g,"").length+1},0);return Oe>60?we[0]+(fe===""?"":fe+`
 `)+" "+re.join(`,
  `)+" "+we[1]:we[0]+fe+" "+re.join(", ")+" "+we[1]}pe.types=yS();function A(re){return Array.isArray(re)}pe.isArray=A;function E(re){return typeof re=="boolean"}pe.isBoolean=E;function D(re){return re===null}pe.isNull=D;function g(re){return re==null}pe.isNullOrUndefined=g;function C(re){return typeof re=="number"}pe.isNumber=C;function I(re){return typeof re=="string"}pe.isString=I;function N(re){return typeof re=="symbol"}pe.isSymbol=N;function F(re){return re===void 0}pe.isUndefined=F;function k(re){return P(re)&&W(re)==="[object RegExp]"}pe.isRegExp=k,pe.types.isRegExp=k;function P(re){return typeof re=="object"&&re!==null}pe.isObject=P;function T(re){return P(re)&&W(re)==="[object Date]"}pe.isDate=T,pe.types.isDate=T;function y(re){return P(re)&&(W(re)==="[object Error]"||re instanceof Error)}pe.isError=y,pe.types.isNativeError=y;function S(re){return typeof re=="function"}pe.isFunction=S;function M(re){return re===null||typeof re=="boolean"||typeof re=="number"||typeof re=="string"||typeof re=="symbol"||typeof re>"u"}pe.isPrimitive=M,pe.isBuffer=Xb();function W(re){return Object.prototype.toString.call(re)}function $(re){return re<10?"0"+re.toString(10):re.toString(10)}var Z=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function K(){var re=new Date,fe=[$(re.getHours()),$(re.getMinutes()),$(re.getSeconds())].join(":");return[re.getDate(),Z[re.getMonth()],fe].join(" ")}pe.log=function(){console.log("%s - %s",K(),pe.format.apply(pe,arguments))},pe.inherits=q0(),pe._extend=function(re,fe){if(!fe||!P(fe))return re;for(var we=Object.keys(fe),Oe=we.length;Oe--;)re[we[Oe]]=fe[we[Oe]];return re};function Q(re,fe){return Object.prototype.hasOwnProperty.call(re,fe)}var J=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;pe.promisify=function(fe){if(typeof fe!="function")throw new TypeError('The "original" argument must be of type Function');if(J&&fe[J]){var we=fe[J];if(typeof we!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(we,J,{value:we,enumerable:!1,writable:!1,configurable:!0}),we}function we(){for(var Oe,ke,Le=new Promise(function(_e,he){Oe=_e,ke=he}),oe=[],be=0;be<arguments.length;be++)oe.push(arguments[be]);oe.push(function(_e,he){_e?ke(_e):Oe(he)});try{fe.apply(this,oe)}catch(_e){ke(_e)}return Le}return Object.setPrototypeOf(we,Object.getPrototypeOf(fe)),J&&Object.defineProperty(we,J,{value:we,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(we,le(fe))},pe.promisify.custom=J;function G(re,fe){if(!re){var we=new Error("Promise was rejected with a falsy value");we.reason=re,re=we}return fe(re)}function ee(re){if(typeof re!="function")throw new TypeError('The "original" argument must be of type Function');function fe(){for(var we=[],Oe=0;Oe<arguments.length;Oe++)we.push(arguments[Oe]);var ke=we.pop();if(typeof ke!="function")throw new TypeError("The last argument must be of type Function");var Le=this,oe=function(){return ke.apply(Le,arguments)};re.apply(this,we).then(function(be){process.nextTick(oe.bind(null,null,be))},function(be){process.nextTick(G.bind(null,be,oe))})}return Object.setPrototypeOf(fe,Object.getPrototypeOf(re)),Object.defineProperties(fe,le(re)),fe}pe.callbackify=ee}}),Jp=U({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/buffer_list.js"(pe,le){function w(_,x){var A=Object.keys(_);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(_);x&&(E=E.filter(function(D){return Object.getOwnPropertyDescriptor(_,D).enumerable})),A.push.apply(A,E)}return A}function R(_){for(var x=1;x<arguments.length;x++){var A=arguments[x]!=null?arguments[x]:{};x%2?w(Object(A),!0).forEach(function(E){O(_,E,A[E])}):Object.getOwnPropertyDescriptors?Object.defineProperties(_,Object.getOwnPropertyDescriptors(A)):w(Object(A)).forEach(function(E){Object.defineProperty(_,E,Object.getOwnPropertyDescriptor(A,E))})}return _}function O(_,x,A){return x in _?Object.defineProperty(_,x,{value:A,enumerable:!0,configurable:!0,writable:!0}):_[x]=A,_}function z(_,x){if(!(_ instanceof x))throw new TypeError("Cannot call a class as a function")}function l(_,x){for(var A=0;A<x.length;A++){var E=x[A];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(_,E.key,E)}}function u(_,x,A){return x&&l(_.prototype,x),_}var c=bp(),p=c.Buffer,f=ip(),v=f.inspect,h=v&&v.custom||"inspect";function m(_,x,A){p.prototype.copy.call(_,x,A)}le.exports=(function(){function _(){z(this,_),this.head=null,this.tail=null,this.length=0}return u(_,[{key:"push",value:function(A){var E={data:A,next:null};this.length>0?this.tail.next=E:this.head=E,this.tail=E,++this.length}},{key:"unshift",value:function(A){var E={data:A,next:this.head};this.length===0&&(this.tail=E),this.head=E,++this.length}},{key:"shift",value:function(){if(this.length!==0){var A=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,A}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(A){if(this.length===0)return"";for(var E=this.head,D=""+E.data;E=E.next;)D+=A+E.data;return D}},{key:"concat",value:function(A){if(this.length===0)return p.alloc(0);for(var E=p.allocUnsafe(A>>>0),D=this.head,g=0;D;)m(D.data,E,g),g+=D.data.length,D=D.next;return E}},{key:"consume",value:function(A,E){var D;return A<this.head.data.length?(D=this.head.data.slice(0,A),this.head.data=this.head.data.slice(A)):A===this.head.data.length?D=this.shift():D=E?this._getString(A):this._getBuffer(A),D}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(A){var E=this.head,D=1,g=E.data;for(A-=g.length;E=E.next;){var C=E.data,I=A>C.length?C.length:A;if(I===C.length?g+=C:g+=C.slice(0,A),A-=I,A===0){I===C.length?(++D,E.next?this.head=E.next:this.head=this.tail=null):(this.head=E,E.data=C.slice(I));break}++D}return this.length-=D,g}},{key:"_getBuffer",value:function(A){var E=p.allocUnsafe(A),D=this.head,g=1;for(D.data.copy(E),A-=D.data.length;D=D.next;){var C=D.data,I=A>C.length?C.length:A;if(C.copy(E,E.length-A,0,I),A-=I,A===0){I===C.length?(++g,D.next?this.head=D.next:this.head=this.tail=null):(this.head=D,D.data=C.slice(I));break}++g}return this.length-=g,E}},{key:h,value:function(A,E){return v(this,R({},E,{depth:0,customInspect:!1}))}}]),_})()}}),If=U({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/destroy.js"(pe,le){function w(c,p){var f=this,v=this._readableState&&this._readableState.destroyed,h=this._writableState&&this._writableState.destroyed;return v||h?(p?p(c):c&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(l,this,c)):process.nextTick(l,this,c)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(c||null,function(m){!p&&m?f._writableState?f._writableState.errorEmitted?process.nextTick(O,f):(f._writableState.errorEmitted=!0,process.nextTick(R,f,m)):process.nextTick(R,f,m):p?(process.nextTick(O,f),p(m)):process.nextTick(O,f)}),this)}function R(c,p){l(c,p),O(c)}function O(c){c._writableState&&!c._writableState.emitClose||c._readableState&&!c._readableState.emitClose||c.emit("close")}function z(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function l(c,p){c.emit("error",p)}function u(c,p){var f=c._readableState,v=c._writableState;f&&f.autoDestroy||v&&v.autoDestroy?c.destroy(p):c.emit("error",p)}le.exports={destroy:w,undestroy:z,errorOrDestroy:u}}}),Wd=U({"node_modules/stream-browserify/node_modules/readable-stream/errors-browser.js"(pe,le){function w(p,f){p.prototype=Object.create(f.prototype),p.prototype.constructor=p,p.__proto__=f}var R={};function O(p,f,v){v||(v=Error);function h(_,x,A){return typeof f=="string"?f:f(_,x,A)}var m=(function(_){w(x,_);function x(A,E,D){return _.call(this,h(A,E,D))||this}return x})(v);m.prototype.name=v.name,m.prototype.code=p,R[p]=m}function z(p,f){if(Array.isArray(p)){var v=p.length;return p=p.map(function(h){return String(h)}),v>2?"one of ".concat(f," ").concat(p.slice(0,v-1).join(", "),", or ")+p[v-1]:v===2?"one of ".concat(f," ").concat(p[0]," or ").concat(p[1]):"of ".concat(f," ").concat(p[0])}else return"of ".concat(f," ").concat(String(p))}function l(p,f,v){return p.substr(0,f.length)===f}function u(p,f,v){return(v===void 0||v>p.length)&&(v=p.length),p.substring(v-f.length,v)===f}function c(p,f,v){return typeof v!="number"&&(v=0),v+f.length>p.length?!1:p.indexOf(f,v)!==-1}O("ERR_INVALID_OPT_VALUE",function(p,f){return'The value "'+f+'" is invalid for option "'+p+'"'},TypeError),O("ERR_INVALID_ARG_TYPE",function(p,f,v){var h;typeof f=="string"&&l(f,"not ")?(h="must not be",f=f.replace(/^not /,"")):h="must be";var m;if(u(p," argument"))m="The ".concat(p," ").concat(h," ").concat(z(f,"type"));else{var _=c(p,".")?"property":"argument";m='The "'.concat(p,'" ').concat(_," ").concat(h," ").concat(z(f,"type"))}return m+=". Received type ".concat(typeof v),m},TypeError),O("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),O("ERR_METHOD_NOT_IMPLEMENTED",function(p){return"The "+p+" method is not implemented"}),O("ERR_STREAM_PREMATURE_CLOSE","Premature close"),O("ERR_STREAM_DESTROYED",function(p){return"Cannot call "+p+" after a stream was destroyed"}),O("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),O("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),O("ERR_STREAM_WRITE_AFTER_END","write after end"),O("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),O("ERR_UNKNOWN_ENCODING",function(p){return"Unknown encoding: "+p},TypeError),O("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),le.exports.codes=R}}),cv=U({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/state.js"(pe,le){var w=Wd().codes.ERR_INVALID_OPT_VALUE;function R(z,l,u){return z.highWaterMark!=null?z.highWaterMark:l?z[u]:null}function O(z,l,u,c){var p=R(l,c,u);if(p!=null){if(!(isFinite(p)&&Math.floor(p)===p)||p<0){var f=c?u:"highWaterMark";throw new w(f,p)}return Math.floor(p)}return z.objectMode?16:16*1024}le.exports={getHighWaterMark:O}}}),$0=U({"node_modules/util-deprecate/browser.js"(pe,le){le.exports=w;function w(O,z){if(R("noDeprecation"))return O;var l=!1;function u(){if(!l){if(R("throwDeprecation"))throw new Error(z);R("traceDeprecation")?console.trace(z):console.warn(z),l=!0}return O.apply(this,arguments)}return u}function R(O){try{if(!window.localStorage)return!1}catch{return!1}var z=window.localStorage[O];return z==null?!1:String(z).toLowerCase()==="true"}}}),fb=U({"node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_writable.js"(pe,le){le.exports=T;function w(oe){var be=this;this.next=null,this.entry=null,this.finish=function(){Le(be,oe)}}var R;T.WritableState=k;var O={deprecate:$0()},z=Rh(),l=bp().Buffer,u=window.Uint8Array||function(){};function c(oe){return l.from(oe)}function p(oe){return l.isBuffer(oe)||oe instanceof u}var f=If(),v=cv(),h=v.getHighWaterMark,m=Wd().codes,_=m.ERR_INVALID_ARG_TYPE,x=m.ERR_METHOD_NOT_IMPLEMENTED,A=m.ERR_MULTIPLE_CALLBACK,E=m.ERR_STREAM_CANNOT_PIPE,D=m.ERR_STREAM_DESTROYED,g=m.ERR_STREAM_NULL_VALUES,C=m.ERR_STREAM_WRITE_AFTER_END,I=m.ERR_UNKNOWN_ENCODING,N=f.errorOrDestroy;q0()(T,z);function F(){}function k(oe,be,_e){R=R||W0(),oe=oe||{},typeof _e!="boolean"&&(_e=be instanceof R),this.objectMode=!!oe.objectMode,_e&&(this.objectMode=this.objectMode||!!oe.writableObjectMode),this.highWaterMark=h(this,oe,"writableHighWaterMark",_e),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var he=oe.decodeStrings===!1;this.decodeStrings=!he,this.defaultEncoding=oe.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(De){Q(be,De)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=oe.emitClose!==!1,this.autoDestroy=!!oe.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new w(this)}k.prototype.getBuffer=function(){for(var be=this.bufferedRequest,_e=[];be;)_e.push(be),be=be.next;return _e},(function(){try{Object.defineProperty(k.prototype,"buffer",{get:O.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var P;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(P=Function.prototype[Symbol.hasInstance],Object.defineProperty(T,Symbol.hasInstance,{value:function(be){return P.call(this,be)?!0:this!==T?!1:be&&be._writableState instanceof k}})):P=function(be){return be instanceof this};function T(oe){R=R||W0();var be=this instanceof R;if(!be&&!P.call(T,this))return new T(oe);this._writableState=new k(oe,this,be),this.writable=!0,oe&&(typeof oe.write=="function"&&(this._write=oe.write),typeof oe.writev=="function"&&(this._writev=oe.writev),typeof oe.destroy=="function"&&(this._destroy=oe.destroy),typeof oe.final=="function"&&(this._final=oe.final)),z.call(this)}T.prototype.pipe=function(){N(this,new E)};function y(oe,be){var _e=new C;N(oe,_e),process.nextTick(be,_e)}function S(oe,be,_e,he){var De;return _e===null?De=new g:typeof _e!="string"&&!be.objectMode&&(De=new _("chunk",["string","Buffer"],_e)),De?(N(oe,De),process.nextTick(he,De),!1):!0}T.prototype.write=function(oe,be,_e){var he=this._writableState,De=!1,xe=!he.objectMode&&p(oe);return xe&&!l.isBuffer(oe)&&(oe=c(oe)),typeof be=="function"&&(_e=be,be=null),xe?be="buffer":be||(be=he.defaultEncoding),typeof _e!="function"&&(_e=F),he.ending?y(this,_e):(xe||S(this,he,oe,_e))&&(he.pendingcb++,De=W(this,he,xe,oe,be,_e)),De},T.prototype.cork=function(){this._writableState.corked++},T.prototype.uncork=function(){var oe=this._writableState;oe.corked&&(oe.corked--,!oe.writing&&!oe.corked&&!oe.bufferProcessing&&oe.bufferedRequest&&ee(this,oe))},T.prototype.setDefaultEncoding=function(be){if(typeof be=="string"&&(be=be.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((be+"").toLowerCase())>-1))throw new I(be);return this._writableState.defaultEncoding=be,this},Object.defineProperty(T.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function M(oe,be,_e){return!oe.objectMode&&oe.decodeStrings!==!1&&typeof be=="string"&&(be=l.from(be,_e)),be}Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function W(oe,be,_e,he,De,xe){if(!_e){var se=M(be,he,De);he!==se&&(_e=!0,De="buffer",he=se)}var Ee=be.objectMode?1:he.length;be.length+=Ee;var Te=be.length<be.highWaterMark;if(Te||(be.needDrain=!0),be.writing||be.corked){var Be=be.lastBufferedRequest;be.lastBufferedRequest={chunk:he,encoding:De,isBuf:_e,callback:xe,next:null},Be?Be.next=be.lastBufferedRequest:be.bufferedRequest=be.lastBufferedRequest,be.bufferedRequestCount+=1}else $(oe,be,!1,Ee,he,De,xe);return Te}function $(oe,be,_e,he,De,xe,se){be.writelen=he,be.writecb=se,be.writing=!0,be.sync=!0,be.destroyed?be.onwrite(new D("write")):_e?oe._writev(De,be.onwrite):oe._write(De,xe,be.onwrite),be.sync=!1}function Z(oe,be,_e,he,De){--be.pendingcb,_e?(process.nextTick(De,he),process.nextTick(Oe,oe,be),oe._writableState.errorEmitted=!0,N(oe,he)):(De(he),oe._writableState.errorEmitted=!0,N(oe,he),Oe(oe,be))}function K(oe){oe.writing=!1,oe.writecb=null,oe.length-=oe.writelen,oe.writelen=0}function Q(oe,be){var _e=oe._writableState,he=_e.sync,De=_e.writecb;if(typeof De!="function")throw new A;if(K(_e),be)Z(oe,_e,he,be,De);else{var xe=re(_e)||oe.destroyed;!xe&&!_e.corked&&!_e.bufferProcessing&&_e.bufferedRequest&&ee(oe,_e),he?process.nextTick(J,oe,_e,xe,De):J(oe,_e,xe,De)}}function J(oe,be,_e,he){_e||G(oe,be),be.pendingcb--,he(),Oe(oe,be)}function G(oe,be){be.length===0&&be.needDrain&&(be.needDrain=!1,oe.emit("drain"))}function ee(oe,be){be.bufferProcessing=!0;var _e=be.bufferedRequest;if(oe._writev&&_e&&_e.next){var he=be.bufferedRequestCount,De=new Array(he),xe=be.corkedRequestsFree;xe.entry=_e;for(var se=0,Ee=!0;_e;)De[se]=_e,_e.isBuf||(Ee=!1),_e=_e.next,se+=1;De.allBuffers=Ee,$(oe,be,!0,be.length,De,"",xe.finish),be.pendingcb++,be.lastBufferedRequest=null,xe.next?(be.corkedRequestsFree=xe.next,xe.next=null):be.corkedRequestsFree=new w(be),be.bufferedRequestCount=0}else{for(;_e;){var Te=_e.chunk,Be=_e.encoding,tt=_e.callback,at=be.objectMode?1:Te.length;if($(oe,be,!1,at,Te,Be,tt),_e=_e.next,be.bufferedRequestCount--,be.writing)break}_e===null&&(be.lastBufferedRequest=null)}be.bufferedRequest=_e,be.bufferProcessing=!1}T.prototype._write=function(oe,be,_e){_e(new x("_write()"))},T.prototype._writev=null,T.prototype.end=function(oe,be,_e){var he=this._writableState;return typeof oe=="function"?(_e=oe,oe=null,be=null):typeof be=="function"&&(_e=be,be=null),oe!=null&&this.write(oe,be),he.corked&&(he.corked=1,this.uncork()),he.ending||ke(this,he,_e),this},Object.defineProperty(T.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function re(oe){return oe.ending&&oe.length===0&&oe.bufferedRequest===null&&!oe.finished&&!oe.writing}function fe(oe,be){oe._final(function(_e){be.pendingcb--,_e&&N(oe,_e),be.prefinished=!0,oe.emit("prefinish"),Oe(oe,be)})}function we(oe,be){!be.prefinished&&!be.finalCalled&&(typeof oe._final=="function"&&!be.destroyed?(be.pendingcb++,be.finalCalled=!0,process.nextTick(fe,oe,be)):(be.prefinished=!0,oe.emit("prefinish")))}function Oe(oe,be){var _e=re(be);if(_e&&(we(oe,be),be.pendingcb===0&&(be.finished=!0,oe.emit("finish"),be.autoDestroy))){var he=oe._readableState;(!he||he.autoDestroy&&he.endEmitted)&&oe.destroy()}return _e}function ke(oe,be,_e){be.ending=!0,Oe(oe,be),_e&&(be.finished?process.nextTick(_e):oe.once("finish",_e)),be.ended=!0,oe.writable=!1}function Le(oe,be,_e){var he=oe.entry;for(oe.entry=null;he;){var De=he.callback;be.pendingcb--,De(_e),he=he.next}be.corkedRequestsFree.next=oe}Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(be){this._writableState&&(this._writableState.destroyed=be)}}),T.prototype.destroy=f.destroy,T.prototype._undestroy=f.undestroy,T.prototype._destroy=function(oe,be){be(oe)}}}),W0=U({"node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_duplex.js"(pe,le){var w=Object.keys||function(v){var h=[];for(var m in v)h.push(m);return h};le.exports=c;var R=s3(),O=fb();for(q0()(c,R),z=w(O.prototype),u=0;u<z.length;u++)l=z[u],c.prototype[l]||(c.prototype[l]=O.prototype[l]);var z,l,u;function c(v){if(!(this instanceof c))return new c(v);R.call(this,v),O.call(this,v),this.allowHalfOpen=!0,v&&(v.readable===!1&&(this.readable=!1),v.writable===!1&&(this.writable=!1),v.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",p)))}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function p(){this._writableState.ended||process.nextTick(f,this)}function f(v){v.end()}Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(h){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=h,this._writableState.destroyed=h)}})}}),S0=U({"node_modules/safe-buffer/index.js"(pe,le){var w=bp(),R=w.Buffer;function O(l,u){for(var c in l)u[c]=l[c]}R.from&&R.alloc&&R.allocUnsafe&&R.allocUnsafeSlow?le.exports=w:(O(w,pe),pe.Buffer=z);function z(l,u,c){return R(l,u,c)}z.prototype=Object.create(R.prototype),O(R,z),z.from=function(l,u,c){if(typeof l=="number")throw new TypeError("Argument must not be a number");return R(l,u,c)},z.alloc=function(l,u,c){if(typeof l!="number")throw new TypeError("Argument must be a number");var p=R(l);return u!==void 0?typeof c=="string"?p.fill(u,c):p.fill(u):p.fill(0),p},z.allocUnsafe=function(l){if(typeof l!="number")throw new TypeError("Argument must be a number");return R(l)},z.allocUnsafeSlow=function(l){if(typeof l!="number")throw new TypeError("Argument must be a number");return w.SlowBuffer(l)}}}),wy=U({"node_modules/stream-browserify/node_modules/string_decoder/lib/string_decoder.js"(pe){var le=S0().Buffer,w=le.isEncoding||function(D){switch(D=""+D,D&&D.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 R(D){if(!D)return"utf8";for(var g;;)switch(D){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 D;default:if(g)return;D=(""+D).toLowerCase(),g=!0}}function O(D){var g=R(D);if(typeof g!="string"&&(le.isEncoding===w||!w(D)))throw new Error("Unknown encoding: "+D);return g||D}pe.StringDecoder=z;function z(D){this.encoding=O(D);var g;switch(this.encoding){case"utf16le":this.text=h,this.end=m,g=4;break;case"utf8":this.fillLast=p,g=4;break;case"base64":this.text=_,this.end=x,g=3;break;default:this.write=A,this.end=E;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=le.allocUnsafe(g)}z.prototype.write=function(D){if(D.length===0)return"";var g,C;if(this.lastNeed){if(g=this.fillLast(D),g===void 0)return"";C=this.lastNeed,this.lastNeed=0}else C=0;return C<D.length?g?g+this.text(D,C):this.text(D,C):g||""},z.prototype.end=v,z.prototype.text=f,z.prototype.fillLast=function(D){if(this.lastNeed<=D.length)return D.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);D.copy(this.lastChar,this.lastTotal-this.lastNeed,0,D.length),this.lastNeed-=D.length};function l(D){return D<=127?0:D>>5===6?2:D>>4===14?3:D>>3===30?4:D>>6===2?-1:-2}function u(D,g,C){var I=g.length-1;if(I<C)return 0;var N=l(g[I]);return N>=0?(N>0&&(D.lastNeed=N-1),N):--I<C||N===-2?0:(N=l(g[I]),N>=0?(N>0&&(D.lastNeed=N-2),N):--I<C||N===-2?0:(N=l(g[I]),N>=0?(N>0&&(N===2?N=0:D.lastNeed=N-3),N):0))}function c(D,g,C){if((g[0]&192)!==128)return D.lastNeed=0,"�";if(D.lastNeed>1&&g.length>1){if((g[1]&192)!==128)return D.lastNeed=1,"�";if(D.lastNeed>2&&g.length>2&&(g[2]&192)!==128)return D.lastNeed=2,"�"}}function p(D){var g=this.lastTotal-this.lastNeed,C=c(this,D);if(C!==void 0)return C;if(this.lastNeed<=D.length)return D.copy(this.lastChar,g,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);D.copy(this.lastChar,g,0,D.length),this.lastNeed-=D.length}function f(D,g){var C=u(this,D,g);if(!this.lastNeed)return D.toString("utf8",g);this.lastTotal=C;var I=D.length-(C-this.lastNeed);return D.copy(this.lastChar,0,I),D.toString("utf8",g,I)}function v(D){var g=D&&D.length?this.write(D):"";return this.lastNeed?g+"�":g}function h(D,g){if((D.length-g)%2===0){var C=D.toString("utf16le",g);if(C){var I=C.charCodeAt(C.length-1);if(I>=55296&&I<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=D[D.length-2],this.lastChar[1]=D[D.length-1],C.slice(0,-1)}return C}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=D[D.length-1],D.toString("utf16le",g,D.length-1)}function m(D){var g=D&&D.length?this.write(D):"";if(this.lastNeed){var C=this.lastTotal-this.lastNeed;return g+this.lastChar.toString("utf16le",0,C)}return g}function _(D,g){var C=(D.length-g)%3;return C===0?D.toString("base64",g):(this.lastNeed=3-C,this.lastTotal=3,C===1?this.lastChar[0]=D[D.length-1]:(this.lastChar[0]=D[D.length-2],this.lastChar[1]=D[D.length-1]),D.toString("base64",g,D.length-C))}function x(D){var g=D&&D.length?this.write(D):"";return this.lastNeed?g+this.lastChar.toString("base64",0,3-this.lastNeed):g}function A(D){return D.toString(this.encoding)}function E(D){return D&&D.length?this.write(D):""}}}),fv=U({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(pe,le){var w=Wd().codes.ERR_STREAM_PREMATURE_CLOSE;function R(u){var c=!1;return function(){if(!c){c=!0;for(var p=arguments.length,f=new Array(p),v=0;v<p;v++)f[v]=arguments[v];u.apply(this,f)}}}function O(){}function z(u){return u.setHeader&&typeof u.abort=="function"}function l(u,c,p){if(typeof c=="function")return l(u,null,c);c||(c={}),p=R(p||O);var f=c.readable||c.readable!==!1&&u.readable,v=c.writable||c.writable!==!1&&u.writable,h=function(){u.writable||_()},m=u._writableState&&u._writableState.finished,_=function(){v=!1,m=!0,f||p.call(u)},x=u._readableState&&u._readableState.endEmitted,A=function(){f=!1,x=!0,v||p.call(u)},E=function(I){p.call(u,I)},D=function(){var I;if(f&&!x)return(!u._readableState||!u._readableState.ended)&&(I=new w),p.call(u,I);if(v&&!m)return(!u._writableState||!u._writableState.ended)&&(I=new w),p.call(u,I)},g=function(){u.req.on("finish",_)};return z(u)?(u.on("complete",_),u.on("abort",D),u.req?g():u.on("request",g)):v&&!u._writableState&&(u.on("end",h),u.on("close",h)),u.on("end",A),u.on("finish",_),c.error!==!1&&u.on("error",E),u.on("close",D),function(){u.removeListener("complete",_),u.removeListener("abort",D),u.removeListener("request",g),u.req&&u.req.removeListener("finish",_),u.removeListener("end",h),u.removeListener("close",h),u.removeListener("finish",_),u.removeListener("end",A),u.removeListener("error",E),u.removeListener("close",D)}}le.exports=l}}),Zb=U({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/async_iterator.js"(pe,le){var w;function R(g,C,I){return C in g?Object.defineProperty(g,C,{value:I,enumerable:!0,configurable:!0,writable:!0}):g[C]=I,g}var O=fv(),z=Symbol("lastResolve"),l=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),p=Symbol("lastPromise"),f=Symbol("handlePromise"),v=Symbol("stream");function h(g,C){return{value:g,done:C}}function m(g){var C=g[z];if(C!==null){var I=g[v].read();I!==null&&(g[p]=null,g[z]=null,g[l]=null,C(h(I,!1)))}}function _(g){process.nextTick(m,g)}function x(g,C){return function(I,N){g.then(function(){if(C[c]){I(h(void 0,!0));return}C[f](I,N)},N)}}var A=Object.getPrototypeOf(function(){}),E=Object.setPrototypeOf((w={get stream(){return this[v]},next:function(){var C=this,I=this[u];if(I!==null)return Promise.reject(I);if(this[c])return Promise.resolve(h(void 0,!0));if(this[v].destroyed)return new Promise(function(P,T){process.nextTick(function(){C[u]?T(C[u]):P(h(void 0,!0))})});var N=this[p],F;if(N)F=new Promise(x(N,this));else{var k=this[v].read();if(k!==null)return Promise.resolve(h(k,!1));F=new Promise(this[f])}return this[p]=F,F}},R(w,Symbol.asyncIterator,function(){return this}),R(w,"return",function(){var C=this;return new Promise(function(I,N){C[v].destroy(null,function(F){if(F){N(F);return}I(h(void 0,!0))})})}),w),A),D=function(C){var I,N=Object.create(E,(I={},R(I,v,{value:C,writable:!0}),R(I,z,{value:null,writable:!0}),R(I,l,{value:null,writable:!0}),R(I,u,{value:null,writable:!0}),R(I,c,{value:C._readableState.endEmitted,writable:!0}),R(I,f,{value:function(k,P){var T=N[v].read();T?(N[p]=null,N[z]=null,N[l]=null,k(h(T,!1))):(N[z]=k,N[l]=P)},writable:!0}),I));return N[p]=null,O(C,function(F){if(F&&F.code!=="ERR_STREAM_PREMATURE_CLOSE"){var k=N[l];k!==null&&(N[p]=null,N[z]=null,N[l]=null,k(F)),N[u]=F;return}var P=N[z];P!==null&&(N[p]=null,N[z]=null,N[l]=null,P(h(void 0,!0))),N[c]=!0}),C.on("readable",_.bind(null,N)),N};le.exports=D}}),m2=U({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/from-browser.js"(pe,le){le.exports=function(){throw new Error("Readable.from is not available in the browser")}}}),s3=U({"node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_readable.js"(pe,le){le.exports=y;var w;y.ReadableState=T,jf().EventEmitter;var R=function(se,Ee){return se.listeners(Ee).length},O=Rh(),z=bp().Buffer,l=window.Uint8Array||function(){};function u(xe){return z.from(xe)}function c(xe){return z.isBuffer(xe)||xe instanceof l}var p=ip(),f;p&&p.debuglog?f=p.debuglog("stream"):f=function(){};var v=Jp(),h=If(),m=cv(),_=m.getHighWaterMark,x=Wd().codes,A=x.ERR_INVALID_ARG_TYPE,E=x.ERR_STREAM_PUSH_AFTER_EOF,D=x.ERR_METHOD_NOT_IMPLEMENTED,g=x.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,C,I,N;q0()(y,O);var F=h.errorOrDestroy,k=["error","close","destroy","pause","resume"];function P(xe,se,Ee){if(typeof xe.prependListener=="function")return xe.prependListener(se,Ee);!xe._events||!xe._events[se]?xe.on(se,Ee):Array.isArray(xe._events[se])?xe._events[se].unshift(Ee):xe._events[se]=[Ee,xe._events[se]]}function T(xe,se,Ee){w=w||W0(),xe=xe||{},typeof Ee!="boolean"&&(Ee=se instanceof w),this.objectMode=!!xe.objectMode,Ee&&(this.objectMode=this.objectMode||!!xe.readableObjectMode),this.highWaterMark=_(this,xe,"readableHighWaterMark",Ee),this.buffer=new v,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=xe.emitClose!==!1,this.autoDestroy=!!xe.autoDestroy,this.destroyed=!1,this.defaultEncoding=xe.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,xe.encoding&&(C||(C=wy().StringDecoder),this.decoder=new C(xe.encoding),this.encoding=xe.encoding)}function y(xe){if(w=w||W0(),!(this instanceof y))return new y(xe);var se=this instanceof w;this._readableState=new T(xe,this,se),this.readable=!0,xe&&(typeof xe.read=="function"&&(this._read=xe.read),typeof xe.destroy=="function"&&(this._destroy=xe.destroy)),O.call(this)}Object.defineProperty(y.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(se){this._readableState&&(this._readableState.destroyed=se)}}),y.prototype.destroy=h.destroy,y.prototype._undestroy=h.undestroy,y.prototype._destroy=function(xe,se){se(xe)},y.prototype.push=function(xe,se){var Ee=this._readableState,Te;return Ee.objectMode?Te=!0:typeof xe=="string"&&(se=se||Ee.defaultEncoding,se!==Ee.encoding&&(xe=z.from(xe,se),se=""),Te=!0),S(this,xe,se,!1,Te)},y.prototype.unshift=function(xe){return S(this,xe,null,!0,!1)};function S(xe,se,Ee,Te,Be){f("readableAddChunk",se);var tt=xe._readableState;if(se===null)tt.reading=!1,Q(xe,tt);else{var at;if(Be||(at=W(tt,se)),at)F(xe,at);else if(tt.objectMode||se&&se.length>0)if(typeof se!="string"&&!tt.objectMode&&Object.getPrototypeOf(se)!==z.prototype&&(se=u(se)),Te)tt.endEmitted?F(xe,new g):M(xe,tt,se,!0);else if(tt.ended)F(xe,new E);else{if(tt.destroyed)return!1;tt.reading=!1,tt.decoder&&!Ee?(se=tt.decoder.write(se),tt.objectMode||se.length!==0?M(xe,tt,se,!1):ee(xe,tt)):M(xe,tt,se,!1)}else Te||(tt.reading=!1,ee(xe,tt))}return!tt.ended&&(tt.length<tt.highWaterMark||tt.length===0)}function M(xe,se,Ee,Te){se.flowing&&se.length===0&&!se.sync?(se.awaitDrain=0,xe.emit("data",Ee)):(se.length+=se.objectMode?1:Ee.length,Te?se.buffer.unshift(Ee):se.buffer.push(Ee),se.needReadable&&J(xe)),ee(xe,se)}function W(xe,se){var Ee;return!c(se)&&typeof se!="string"&&se!==void 0&&!xe.objectMode&&(Ee=new A("chunk",["string","Buffer","Uint8Array"],se)),Ee}y.prototype.isPaused=function(){return this._readableState.flowing===!1},y.prototype.setEncoding=function(xe){C||(C=wy().StringDecoder);var se=new C(xe);this._readableState.decoder=se,this._readableState.encoding=this._readableState.decoder.encoding;for(var Ee=this._readableState.buffer.head,Te="";Ee!==null;)Te+=se.write(Ee.data),Ee=Ee.next;return this._readableState.buffer.clear(),Te!==""&&this._readableState.buffer.push(Te),this._readableState.length=Te.length,this};var $=1073741824;function Z(xe){return xe>=$?xe=$:(xe--,xe|=xe>>>1,xe|=xe>>>2,xe|=xe>>>4,xe|=xe>>>8,xe|=xe>>>16,xe++),xe}function K(xe,se){return xe<=0||se.length===0&&se.ended?0:se.objectMode?1:xe!==xe?se.flowing&&se.length?se.buffer.head.data.length:se.length:(xe>se.highWaterMark&&(se.highWaterMark=Z(xe)),xe<=se.length?xe:se.ended?se.length:(se.needReadable=!0,0))}y.prototype.read=function(xe){f("read",xe),xe=parseInt(xe,10);var se=this._readableState,Ee=xe;if(xe!==0&&(se.emittedReadable=!1),xe===0&&se.needReadable&&((se.highWaterMark!==0?se.length>=se.highWaterMark:se.length>0)||se.ended))return f("read: emitReadable",se.length,se.ended),se.length===0&&se.ended?_e(this):J(this),null;if(xe=K(xe,se),xe===0&&se.ended)return se.length===0&&_e(this),null;var Te=se.needReadable;f("need readable",Te),(se.length===0||se.length-xe<se.highWaterMark)&&(Te=!0,f("length less than watermark",Te)),se.ended||se.reading?(Te=!1,f("reading or ended",Te)):Te&&(f("do read"),se.reading=!0,se.sync=!0,se.length===0&&(se.needReadable=!0),this._read(se.highWaterMark),se.sync=!1,se.reading||(xe=K(Ee,se)));var Be;return xe>0?Be=be(xe,se):Be=null,Be===null?(se.needReadable=se.length<=se.highWaterMark,xe=0):(se.length-=xe,se.awaitDrain=0),se.length===0&&(se.ended||(se.needReadable=!0),Ee!==xe&&se.ended&&_e(this)),Be!==null&&this.emit("data",Be),Be};function Q(xe,se){if(f("onEofChunk"),!se.ended){if(se.decoder){var Ee=se.decoder.end();Ee&&Ee.length&&(se.buffer.push(Ee),se.length+=se.objectMode?1:Ee.length)}se.ended=!0,se.sync?J(xe):(se.needReadable=!1,se.emittedReadable||(se.emittedReadable=!0,G(xe)))}}function J(xe){var se=xe._readableState;f("emitReadable",se.needReadable,se.emittedReadable),se.needReadable=!1,se.emittedReadable||(f("emitReadable",se.flowing),se.emittedReadable=!0,process.nextTick(G,xe))}function G(xe){var se=xe._readableState;f("emitReadable_",se.destroyed,se.length,se.ended),!se.destroyed&&(se.length||se.ended)&&(xe.emit("readable"),se.emittedReadable=!1),se.needReadable=!se.flowing&&!se.ended&&se.length<=se.highWaterMark,oe(xe)}function ee(xe,se){se.readingMore||(se.readingMore=!0,process.nextTick(re,xe,se))}function re(xe,se){for(;!se.reading&&!se.ended&&(se.length<se.highWaterMark||se.flowing&&se.length===0);){var Ee=se.length;if(f("maybeReadMore read 0"),xe.read(0),Ee===se.length)break}se.readingMore=!1}y.prototype._read=function(xe){F(this,new D("_read()"))},y.prototype.pipe=function(xe,se){var Ee=this,Te=this._readableState;switch(Te.pipesCount){case 0:Te.pipes=xe;break;case 1:Te.pipes=[Te.pipes,xe];break;default:Te.pipes.push(xe);break}Te.pipesCount+=1,f("pipe count=%d opts=%j",Te.pipesCount,se);var Be=(!se||se.end!==!1)&&xe!==process.stdout&&xe!==process.stderr,tt=Be?gt:rt;Te.endEmitted?process.nextTick(tt):Ee.once("end",tt),xe.on("unpipe",at);function at(Ue,xt){f("onunpipe"),Ue===Ee&&xt&&xt.hasUnpiped===!1&&(xt.hasUnpiped=!0,$t())}function gt(){f("onend"),xe.end()}var pt=fe(Ee);xe.on("drain",pt);var Rt=!1;function $t(){f("cleanup"),xe.removeListener("close",Ft),xe.removeListener("finish",st),xe.removeListener("drain",pt),xe.removeListener("error",Ht),xe.removeListener("unpipe",at),Ee.removeListener("end",gt),Ee.removeListener("end",rt),Ee.removeListener("data",Wt),Rt=!0,Te.awaitDrain&&(!xe._writableState||xe._writableState.needDrain)&&pt()}Ee.on("data",Wt);function Wt(Ue){f("ondata");var xt=xe.write(Ue);f("dest.write",xt),xt===!1&&((Te.pipesCount===1&&Te.pipes===xe||Te.pipesCount>1&&De(Te.pipes,xe)!==-1)&&!Rt&&(f("false write response, pause",Te.awaitDrain),Te.awaitDrain++),Ee.pause())}function Ht(Ue){f("onerror",Ue),rt(),xe.removeListener("error",Ht),R(xe,"error")===0&&F(xe,Ue)}P(xe,"error",Ht);function Ft(){xe.removeListener("finish",st),rt()}xe.once("close",Ft);function st(){f("onfinish"),xe.removeListener("close",Ft),rt()}xe.once("finish",st);function rt(){f("unpipe"),Ee.unpipe(xe)}return xe.emit("pipe",Ee),Te.flowing||(f("pipe resume"),Ee.resume()),xe};function fe(xe){return function(){var Ee=xe._readableState;f("pipeOnDrain",Ee.awaitDrain),Ee.awaitDrain&&Ee.awaitDrain--,Ee.awaitDrain===0&&R(xe,"data")&&(Ee.flowing=!0,oe(xe))}}y.prototype.unpipe=function(xe){var se=this._readableState,Ee={hasUnpiped:!1};if(se.pipesCount===0)return this;if(se.pipesCount===1)return xe&&xe!==se.pipes?this:(xe||(xe=se.pipes),se.pipes=null,se.pipesCount=0,se.flowing=!1,xe&&xe.emit("unpipe",this,Ee),this);if(!xe){var Te=se.pipes,Be=se.pipesCount;se.pipes=null,se.pipesCount=0,se.flowing=!1;for(var tt=0;tt<Be;tt++)Te[tt].emit("unpipe",this,{hasUnpiped:!1});return this}var at=De(se.pipes,xe);return at===-1?this:(se.pipes.splice(at,1),se.pipesCount-=1,se.pipesCount===1&&(se.pipes=se.pipes[0]),xe.emit("unpipe",this,Ee),this)},y.prototype.on=function(xe,se){var Ee=O.prototype.on.call(this,xe,se),Te=this._readableState;return xe==="data"?(Te.readableListening=this.listenerCount("readable")>0,Te.flowing!==!1&&this.resume()):xe==="readable"&&!Te.endEmitted&&!Te.readableListening&&(Te.readableListening=Te.needReadable=!0,Te.flowing=!1,Te.emittedReadable=!1,f("on readable",Te.length,Te.reading),Te.length?J(this):Te.reading||process.nextTick(Oe,this)),Ee},y.prototype.addListener=y.prototype.on,y.prototype.removeListener=function(xe,se){var Ee=O.prototype.removeListener.call(this,xe,se);return xe==="readable"&&process.nextTick(we,this),Ee},y.prototype.removeAllListeners=function(xe){var se=O.prototype.removeAllListeners.apply(this,arguments);return(xe==="readable"||xe===void 0)&&process.nextTick(we,this),se};function we(xe){var se=xe._readableState;se.readableListening=xe.listenerCount("readable")>0,se.resumeScheduled&&!se.paused?se.flowing=!0:xe.listenerCount("data")>0&&xe.resume()}function Oe(xe){f("readable nexttick read 0"),xe.read(0)}y.prototype.resume=function(){var xe=this._readableState;return xe.flowing||(f("resume"),xe.flowing=!xe.readableListening,ke(this,xe)),xe.paused=!1,this};function ke(xe,se){se.resumeScheduled||(se.resumeScheduled=!0,process.nextTick(Le,xe,se))}function Le(xe,se){f("resume",se.reading),se.reading||xe.read(0),se.resumeScheduled=!1,xe.emit("resume"),oe(xe),se.flowing&&!se.reading&&xe.read(0)}y.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function oe(xe){var se=xe._readableState;for(f("flow",se.flowing);se.flowing&&xe.read()!==null;);}y.prototype.wrap=function(xe){var se=this,Ee=this._readableState,Te=!1;xe.on("end",function(){if(f("wrapped end"),Ee.decoder&&!Ee.ended){var at=Ee.decoder.end();at&&at.length&&se.push(at)}se.push(null)}),xe.on("data",function(at){if(f("wrapped data"),Ee.decoder&&(at=Ee.decoder.write(at)),!(Ee.objectMode&&at==null)&&!(!Ee.objectMode&&(!at||!at.length))){var gt=se.push(at);gt||(Te=!0,xe.pause())}});for(var Be in xe)this[Be]===void 0&&typeof xe[Be]=="function"&&(this[Be]=(function(gt){return function(){return xe[gt].apply(xe,arguments)}})(Be));for(var tt=0;tt<k.length;tt++)xe.on(k[tt],this.emit.bind(this,k[tt]));return this._read=function(at){f("wrapped _read",at),Te&&(Te=!1,xe.resume())},this},typeof Symbol=="function"&&(y.prototype[Symbol.asyncIterator]=function(){return I===void 0&&(I=Zb()),I(this)}),Object.defineProperty(y.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(y.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(y.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(se){this._readableState&&(this._readableState.flowing=se)}}),y._fromList=be,Object.defineProperty(y.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function be(xe,se){if(se.length===0)return null;var Ee;return se.objectMode?Ee=se.buffer.shift():!xe||xe>=se.length?(se.decoder?Ee=se.buffer.join(""):se.buffer.length===1?Ee=se.buffer.first():Ee=se.buffer.concat(se.length),se.buffer.clear()):Ee=se.buffer.consume(xe,se.decoder),Ee}function _e(xe){var se=xe._readableState;f("endReadable",se.endEmitted),se.endEmitted||(se.ended=!0,process.nextTick(he,se,xe))}function he(xe,se){if(f("endReadableNT",xe.endEmitted,xe.length),!xe.endEmitted&&xe.length===0&&(xe.endEmitted=!0,se.readable=!1,se.emit("end"),xe.autoDestroy)){var Ee=se._writableState;(!Ee||Ee.autoDestroy&&Ee.finished)&&se.destroy()}}typeof Symbol=="function"&&(y.from=function(xe,se){return N===void 0&&(N=m2()),N(y,xe,se)});function De(xe,se){for(var Ee=0,Te=xe.length;Ee<Te;Ee++)if(xe[Ee]===se)return Ee;return-1}}}),db=U({"node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_transform.js"(pe,le){le.exports=p;var w=Wd().codes,R=w.ERR_METHOD_NOT_IMPLEMENTED,O=w.ERR_MULTIPLE_CALLBACK,z=w.ERR_TRANSFORM_ALREADY_TRANSFORMING,l=w.ERR_TRANSFORM_WITH_LENGTH_0,u=W0();q0()(p,u);function c(h,m){var _=this._transformState;_.transforming=!1;var x=_.writecb;if(x===null)return this.emit("error",new O);_.writechunk=null,_.writecb=null,m!=null&&this.push(m),x(h);var A=this._readableState;A.reading=!1,(A.needReadable||A.length<A.highWaterMark)&&this._read(A.highWaterMark)}function p(h){if(!(this instanceof p))return new p(h);u.call(this,h),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,h&&(typeof h.transform=="function"&&(this._transform=h.transform),typeof h.flush=="function"&&(this._flush=h.flush)),this.on("prefinish",f)}function f(){var h=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(m,_){v(h,m,_)}):v(this,null,null)}p.prototype.push=function(h,m){return this._transformState.needTransform=!1,u.prototype.push.call(this,h,m)},p.prototype._transform=function(h,m,_){_(new R("_transform()"))},p.prototype._write=function(h,m,_){var x=this._transformState;if(x.writecb=_,x.writechunk=h,x.writeencoding=m,!x.transforming){var A=this._readableState;(x.needTransform||A.needReadable||A.length<A.highWaterMark)&&this._read(A.highWaterMark)}},p.prototype._read=function(h){var m=this._transformState;m.writechunk!==null&&!m.transforming?(m.transforming=!0,this._transform(m.writechunk,m.writeencoding,m.afterTransform)):m.needTransform=!0},p.prototype._destroy=function(h,m){u.prototype._destroy.call(this,h,function(_){m(_)})};function v(h,m,_){if(m)return h.emit("error",m);if(_!=null&&h.push(_),h._writableState.length)throw new l;if(h._transformState.transforming)throw new z;return h.push(null)}}}),E_=U({"node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_passthrough.js"(pe,le){le.exports=R;var w=db();q0()(R,w);function R(O){if(!(this instanceof R))return new R(O);w.call(this,O)}R.prototype._transform=function(O,z,l){l(null,O)}}}),IT=U({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/pipeline.js"(pe,le){var w;function R(_){var x=!1;return function(){x||(x=!0,_.apply(void 0,arguments))}}var O=Wd().codes,z=O.ERR_MISSING_ARGS,l=O.ERR_STREAM_DESTROYED;function u(_){if(_)throw _}function c(_){return _.setHeader&&typeof _.abort=="function"}function p(_,x,A,E){E=R(E);var D=!1;_.on("close",function(){D=!0}),w===void 0&&(w=fv()),w(_,{readable:x,writable:A},function(C){if(C)return E(C);D=!0,E()});var g=!1;return function(C){if(!D&&!g){if(g=!0,c(_))return _.abort();if(typeof _.destroy=="function")return _.destroy();E(C||new l("pipe"))}}}function f(_){_()}function v(_,x){return _.pipe(x)}function h(_){return!_.length||typeof _[_.length-1]!="function"?u:_.pop()}function m(){for(var _=arguments.length,x=new Array(_),A=0;A<_;A++)x[A]=arguments[A];var E=h(x);if(Array.isArray(x[0])&&(x=x[0]),x.length<2)throw new z("streams");var D,g=x.map(function(C,I){var N=I<x.length-1,F=I>0;return p(C,N,F,function(k){D||(D=k),k&&g.forEach(f),!N&&(g.forEach(f),E(D))})});return x.reduce(v)}le.exports=m}}),bm=U({"node_modules/stream-browserify/index.js"(pe,le){le.exports=O;var w=jf().EventEmitter,R=q0();R(O,w),O.Readable=s3(),O.Writable=fb(),O.Duplex=W0(),O.Transform=db(),O.PassThrough=E_(),O.finished=fv(),O.pipeline=IT(),O.Stream=O;function O(){w.call(this)}O.prototype.pipe=function(z,l){var u=this;function c(x){z.writable&&z.write(x)===!1&&u.pause&&u.pause()}u.on("data",c);function p(){u.readable&&u.resume&&u.resume()}z.on("drain",p),!z._isStdio&&(!l||l.end!==!1)&&(u.on("end",v),u.on("close",h));var f=!1;function v(){f||(f=!0,z.end())}function h(){f||(f=!0,typeof z.destroy=="function"&&z.destroy())}function m(x){if(_(),w.listenerCount(this,"error")===0)throw x}u.on("error",m),z.on("error",m);function _(){u.removeListener("data",c),z.removeListener("drain",p),u.removeListener("end",v),u.removeListener("close",h),u.removeListener("error",m),z.removeListener("error",m),u.removeListener("end",_),u.removeListener("close",_),z.removeListener("close",_)}return u.on("end",_),u.on("close",_),z.on("close",_),z.emit("pipe",u),z}}}),bS=U({"node_modules/util/util.js"(pe){var le=Object.getOwnPropertyDescriptors||function(fe){for(var we=Object.keys(fe),Oe={},ke=0;ke<we.length;ke++)Oe[we[ke]]=Object.getOwnPropertyDescriptor(fe,we[ke]);return Oe},w=/%[sdj%]/g;pe.format=function(re){if(!I(re)){for(var fe=[],we=0;we<arguments.length;we++)fe.push(l(arguments[we]));return fe.join(" ")}for(var we=1,Oe=arguments,ke=Oe.length,Le=String(re).replace(w,function(be){if(be==="%%")return"%";if(we>=ke)return be;switch(be){case"%s":return String(Oe[we++]);case"%d":return Number(Oe[we++]);case"%j":try{return JSON.stringify(Oe[we++])}catch{return"[Circular]"}default:return be}}),oe=Oe[we];we<ke;oe=Oe[++we])D(oe)||!P(oe)?Le+=" "+oe:Le+=" "+l(oe);return Le},pe.deprecate=function(re,fe){if(typeof process<"u"&&process.noDeprecation===!0)return re;if(typeof process>"u")return function(){return pe.deprecate(re,fe).apply(this,arguments)};var we=!1;function Oe(){if(!we){if(process.throwDeprecation)throw new Error(fe);process.traceDeprecation?console.trace(fe):console.error(fe),we=!0}return re.apply(this,arguments)}return Oe};var R={},O=/^$/;z="false",z=z.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),O=new RegExp("^"+z+"$","i");var z;pe.debuglog=function(re){if(re=re.toUpperCase(),!R[re])if(O.test(re)){var fe=process.pid;R[re]=function(){var we=pe.format.apply(pe,arguments);console.error("%s %d: %s",re,fe,we)}}else R[re]=function(){};return R[re]};function l(re,fe){var we={seen:[],stylize:c};return arguments.length>=3&&(we.depth=arguments[2]),arguments.length>=4&&(we.colors=arguments[3]),E(fe)?we.showHidden=fe:fe&&pe._extend(we,fe),F(we.showHidden)&&(we.showHidden=!1),F(we.depth)&&(we.depth=2),F(we.colors)&&(we.colors=!1),F(we.customInspect)&&(we.customInspect=!0),we.colors&&(we.stylize=u),f(we,re,we.depth)}pe.inspect=l,l.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function u(re,fe){var we=l.styles[fe];return we?"\x1B["+l.colors[we][0]+"m"+re+"\x1B["+l.colors[we][1]+"m":re}function c(re,fe){return re}function p(re){var fe={};return re.forEach(function(we,Oe){fe[we]=!0}),fe}function f(re,fe,we){if(re.customInspect&&fe&&S(fe.inspect)&&fe.inspect!==pe.inspect&&!(fe.constructor&&fe.constructor.prototype===fe)){var Oe=fe.inspect(we,re);return I(Oe)||(Oe=f(re,Oe,we)),Oe}var ke=v(re,fe);if(ke)return ke;var Le=Object.keys(fe),oe=p(Le);if(re.showHidden&&(Le=Object.getOwnPropertyNames(fe)),y(fe)&&(Le.indexOf("message")>=0||Le.indexOf("description")>=0))return h(fe);if(Le.length===0){if(S(fe)){var be=fe.name?": "+fe.name:"";return re.stylize("[Function"+be+"]","special")}if(k(fe))return re.stylize(RegExp.prototype.toString.call(fe),"regexp");if(T(fe))return re.stylize(Date.prototype.toString.call(fe),"date");if(y(fe))return h(fe)}var _e="",he=!1,De=["{","}"];if(A(fe)&&(he=!0,De=["[","]"]),S(fe)){var xe=fe.name?": "+fe.name:"";_e=" [Function"+xe+"]"}if(k(fe)&&(_e=" "+RegExp.prototype.toString.call(fe)),T(fe)&&(_e=" "+Date.prototype.toUTCString.call(fe)),y(fe)&&(_e=" "+h(fe)),Le.length===0&&(!he||fe.length==0))return De[0]+_e+De[1];if(we<0)return k(fe)?re.stylize(RegExp.prototype.toString.call(fe),"regexp"):re.stylize("[Object]","special");re.seen.push(fe);var se;return he?se=m(re,fe,we,oe,Le):se=Le.map(function(Ee){return _(re,fe,we,oe,Ee,he)}),re.seen.pop(),x(se,_e,De)}function v(re,fe){if(F(fe))return re.stylize("undefined","undefined");if(I(fe)){var we="'"+JSON.stringify(fe).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return re.stylize(we,"string")}if(C(fe))return re.stylize(""+fe,"number");if(E(fe))return re.stylize(""+fe,"boolean");if(D(fe))return re.stylize("null","null")}function h(re){return"["+Error.prototype.toString.call(re)+"]"}function m(re,fe,we,Oe,ke){for(var Le=[],oe=0,be=fe.length;oe<be;++oe)Q(fe,String(oe))?Le.push(_(re,fe,we,Oe,String(oe),!0)):Le.push("");return ke.forEach(function(_e){_e.match(/^\d+$/)||Le.push(_(re,fe,we,Oe,_e,!0))}),Le}function _(re,fe,we,Oe,ke,Le){var oe,be,_e;if(_e=Object.getOwnPropertyDescriptor(fe,ke)||{value:fe[ke]},_e.get?_e.set?be=re.stylize("[Getter/Setter]","special"):be=re.stylize("[Getter]","special"):_e.set&&(be=re.stylize("[Setter]","special")),Q(Oe,ke)||(oe="["+ke+"]"),be||(re.seen.indexOf(_e.value)<0?(D(we)?be=f(re,_e.value,null):be=f(re,_e.value,we-1),be.indexOf(`
`)>-1&&(Le?be=be.split(`
`).map(function(he){return"  "+he}).join(`
`).slice(2):be=`
`+be.split(`
`).map(function(he){return"   "+he}).join(`
`))):be=re.stylize("[Circular]","special")),F(oe)){if(Le&&ke.match(/^\d+$/))return be;oe=JSON.stringify(""+ke),oe.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(oe=oe.slice(1,-1),oe=re.stylize(oe,"name")):(oe=oe.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),oe=re.stylize(oe,"string"))}return oe+": "+be}function x(re,fe,we){var Oe=re.reduce(function(ke,Le){return Le.indexOf(`
`)>=0,ke+Le.replace(/\u001b\[\d\d?m/g,"").length+1},0);return Oe>60?we[0]+(fe===""?"":fe+`
 `)+" "+re.join(`,
  `)+" "+we[1]:we[0]+fe+" "+re.join(", ")+" "+we[1]}pe.types=yS();function A(re){return Array.isArray(re)}pe.isArray=A;function E(re){return typeof re=="boolean"}pe.isBoolean=E;function D(re){return re===null}pe.isNull=D;function g(re){return re==null}pe.isNullOrUndefined=g;function C(re){return typeof re=="number"}pe.isNumber=C;function I(re){return typeof re=="string"}pe.isString=I;function N(re){return typeof re=="symbol"}pe.isSymbol=N;function F(re){return re===void 0}pe.isUndefined=F;function k(re){return P(re)&&W(re)==="[object RegExp]"}pe.isRegExp=k,pe.types.isRegExp=k;function P(re){return typeof re=="object"&&re!==null}pe.isObject=P;function T(re){return P(re)&&W(re)==="[object Date]"}pe.isDate=T,pe.types.isDate=T;function y(re){return P(re)&&(W(re)==="[object Error]"||re instanceof Error)}pe.isError=y,pe.types.isNativeError=y;function S(re){return typeof re=="function"}pe.isFunction=S;function M(re){return re===null||typeof re=="boolean"||typeof re=="number"||typeof re=="string"||typeof re=="symbol"||typeof re>"u"}pe.isPrimitive=M,pe.isBuffer=Xb();function W(re){return Object.prototype.toString.call(re)}function $(re){return re<10?"0"+re.toString(10):re.toString(10)}var Z=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function K(){var re=new Date,fe=[$(re.getHours()),$(re.getMinutes()),$(re.getSeconds())].join(":");return[re.getDate(),Z[re.getMonth()],fe].join(" ")}pe.log=function(){console.log("%s - %s",K(),pe.format.apply(pe,arguments))},pe.inherits=q0(),pe._extend=function(re,fe){if(!fe||!P(fe))return re;for(var we=Object.keys(fe),Oe=we.length;Oe--;)re[we[Oe]]=fe[we[Oe]];return re};function Q(re,fe){return Object.prototype.hasOwnProperty.call(re,fe)}var J=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;pe.promisify=function(fe){if(typeof fe!="function")throw new TypeError('The "original" argument must be of type Function');if(J&&fe[J]){var we=fe[J];if(typeof we!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(we,J,{value:we,enumerable:!1,writable:!1,configurable:!0}),we}function we(){for(var Oe,ke,Le=new Promise(function(_e,he){Oe=_e,ke=he}),oe=[],be=0;be<arguments.length;be++)oe.push(arguments[be]);oe.push(function(_e,he){_e?ke(_e):Oe(he)});try{fe.apply(this,oe)}catch(_e){ke(_e)}return Le}return Object.setPrototypeOf(we,Object.getPrototypeOf(fe)),J&&Object.defineProperty(we,J,{value:we,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(we,le(fe))},pe.promisify.custom=J;function G(re,fe){if(!re){var we=new Error("Promise was rejected with a falsy value");we.reason=re,re=we}return fe(re)}function ee(re){if(typeof re!="function")throw new TypeError('The "original" argument must be of type Function');function fe(){for(var we=[],Oe=0;Oe<arguments.length;Oe++)we.push(arguments[Oe]);var ke=we.pop();if(typeof ke!="function")throw new TypeError("The last argument must be of type Function");var Le=this,oe=function(){return ke.apply(Le,arguments)};re.apply(this,we).then(function(be){process.nextTick(oe.bind(null,null,be))},function(be){process.nextTick(G.bind(null,be,oe))})}return Object.setPrototypeOf(fe,Object.getPrototypeOf(re)),Object.defineProperties(fe,le(re)),fe}pe.callbackify=ee}}),i1=U({"node_modules/assert/build/internal/errors.js"(pe,le){function w(C){"@babel/helpers - typeof";return w=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(I){return typeof I}:function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},w(C)}function R(C,I,N){return Object.defineProperty(C,"prototype",{writable:!1}),C}function O(C,I){if(!(C instanceof I))throw new TypeError("Cannot call a class as a function")}function z(C,I){if(typeof I!="function"&&I!==null)throw new TypeError("Super expression must either be null or a function");C.prototype=Object.create(I&&I.prototype,{constructor:{value:C,writable:!0,configurable:!0}}),Object.defineProperty(C,"prototype",{writable:!1}),I&&l(C,I)}function l(C,I){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(F,k){return F.__proto__=k,F},l(C,I)}function u(C){var I=f();return function(){var F=v(C),k;if(I){var P=v(this).constructor;k=Reflect.construct(F,arguments,P)}else k=F.apply(this,arguments);return c(this,k)}}function c(C,I){if(I&&(w(I)==="object"||typeof I=="function"))return I;if(I!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return p(C)}function p(C){if(C===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C}function f(){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 v(C){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(N){return N.__proto__||Object.getPrototypeOf(N)},v(C)}var h={},m,_;function x(C,I,N){N||(N=Error);function F(P,T,y){return typeof I=="string"?I:I(P,T,y)}var k=(function(P){z(y,P);var T=u(y);function y(S,M,W){var $;return O(this,y),$=T.call(this,F(S,M,W)),$.code=C,$}return R(y)})(N);h[C]=k}function A(C,I){if(Array.isArray(C)){var N=C.length;return C=C.map(function(F){return String(F)}),N>2?"one of ".concat(I," ").concat(C.slice(0,N-1).join(", "),", or ")+C[N-1]:N===2?"one of ".concat(I," ").concat(C[0]," or ").concat(C[1]):"of ".concat(I," ").concat(C[0])}else return"of ".concat(I," ").concat(String(C))}function E(C,I,N){return C.substr(0,I.length)===I}function D(C,I,N){return(N===void 0||N>C.length)&&(N=C.length),C.substring(N-I.length,N)===I}function g(C,I,N){return typeof N!="number"&&(N=0),N+I.length>C.length?!1:C.indexOf(I,N)!==-1}x("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),x("ERR_INVALID_ARG_TYPE",function(C,I,N){m===void 0&&(m=ta()),m(typeof C=="string","'name' must be a string");var F;typeof I=="string"&&E(I,"not ")?(F="must not be",I=I.replace(/^not /,"")):F="must be";var k;if(D(C," argument"))k="The ".concat(C," ").concat(F," ").concat(A(I,"type"));else{var P=g(C,".")?"property":"argument";k='The "'.concat(C,'" ').concat(P," ").concat(F," ").concat(A(I,"type"))}return k+=". Received type ".concat(w(N)),k},TypeError),x("ERR_INVALID_ARG_VALUE",function(C,I){var N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";_===void 0&&(_=bS());var F=_.inspect(I);return F.length>128&&(F="".concat(F.slice(0,128),"...")),"The argument '".concat(C,"' ").concat(N,". Received ").concat(F)},TypeError),x("ERR_INVALID_RETURN_VALUE",function(C,I,N){var F;return N&&N.constructor&&N.constructor.name?F="instance of ".concat(N.constructor.name):F="type ".concat(w(N)),"Expected ".concat(C,' to be returned from the "').concat(I,'"')+" function but got ".concat(F,".")},TypeError),x("ERR_MISSING_ARGS",function(){for(var C=arguments.length,I=new Array(C),N=0;N<C;N++)I[N]=arguments[N];m===void 0&&(m=ta()),m(I.length>0,"At least one arg needs to be specified");var F="The ",k=I.length;switch(I=I.map(function(P){return'"'.concat(P,'"')}),k){case 1:F+="".concat(I[0]," argument");break;case 2:F+="".concat(I[0]," and ").concat(I[1]," arguments");break;default:F+=I.slice(0,k-1).join(", "),F+=", and ".concat(I[k-1]," arguments");break}return"".concat(F," must be specified")},TypeError),le.exports.codes=h}}),l3=U({"node_modules/assert/build/internal/assert/assertion_error.js"(pe,le){function w(ee,re){var fe=Object.keys(ee);if(Object.getOwnPropertySymbols){var we=Object.getOwnPropertySymbols(ee);re&&(we=we.filter(function(Oe){return Object.getOwnPropertyDescriptor(ee,Oe).enumerable})),fe.push.apply(fe,we)}return fe}function R(ee){for(var re=1;re<arguments.length;re++){var fe=arguments[re]!=null?arguments[re]:{};re%2?w(Object(fe),!0).forEach(function(we){O(ee,we,fe[we])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ee,Object.getOwnPropertyDescriptors(fe)):w(Object(fe)).forEach(function(we){Object.defineProperty(ee,we,Object.getOwnPropertyDescriptor(fe,we))})}return ee}function O(ee,re,fe){return re=c(re),re in ee?Object.defineProperty(ee,re,{value:fe,enumerable:!0,configurable:!0,writable:!0}):ee[re]=fe,ee}function z(ee,re){if(!(ee instanceof re))throw new TypeError("Cannot call a class as a function")}function l(ee,re){for(var fe=0;fe<re.length;fe++){var we=re[fe];we.enumerable=we.enumerable||!1,we.configurable=!0,"value"in we&&(we.writable=!0),Object.defineProperty(ee,c(we.key),we)}}function u(ee,re,fe){return re&&l(ee.prototype,re),Object.defineProperty(ee,"prototype",{writable:!1}),ee}function c(ee){var re=p(ee,"string");return C(re)==="symbol"?re:String(re)}function p(ee,re){if(C(ee)!=="object"||ee===null)return ee;var fe=ee[Symbol.toPrimitive];if(fe!==void 0){var we=fe.call(ee,re);if(C(we)!=="object")return we;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(ee)}function f(ee,re){if(typeof re!="function"&&re!==null)throw new TypeError("Super expression must either be null or a function");ee.prototype=Object.create(re&&re.prototype,{constructor:{value:ee,writable:!0,configurable:!0}}),Object.defineProperty(ee,"prototype",{writable:!1}),re&&D(ee,re)}function v(ee){var re=A();return function(){var we=g(ee),Oe;if(re){var ke=g(this).constructor;Oe=Reflect.construct(we,arguments,ke)}else Oe=we.apply(this,arguments);return h(this,Oe)}}function h(ee,re){if(re&&(C(re)==="object"||typeof re=="function"))return re;if(re!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return m(ee)}function m(ee){if(ee===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ee}function _(ee){var re=typeof Map=="function"?new Map:void 0;return _=function(we){if(we===null||!E(we))return we;if(typeof we!="function")throw new TypeError("Super expression must either be null or a function");if(typeof re<"u"){if(re.has(we))return re.get(we);re.set(we,Oe)}function Oe(){return x(we,arguments,g(this).constructor)}return Oe.prototype=Object.create(we.prototype,{constructor:{value:Oe,enumerable:!1,writable:!0,configurable:!0}}),D(Oe,we)},_(ee)}function x(ee,re,fe){return A()?x=Reflect.construct.bind():x=function(Oe,ke,Le){var oe=[null];oe.push.apply(oe,ke);var be=Function.bind.apply(Oe,oe),_e=new be;return Le&&D(_e,Le.prototype),_e},x.apply(null,arguments)}function A(){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 E(ee){return Function.toString.call(ee).indexOf("[native code]")!==-1}function D(ee,re){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(we,Oe){return we.__proto__=Oe,we},D(ee,re)}function g(ee){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(fe){return fe.__proto__||Object.getPrototypeOf(fe)},g(ee)}function C(ee){"@babel/helpers - typeof";return C=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(re){return typeof re}:function(re){return re&&typeof Symbol=="function"&&re.constructor===Symbol&&re!==Symbol.prototype?"symbol":typeof re},C(ee)}var I=bS(),N=I.inspect,F=i1(),k=F.codes.ERR_INVALID_ARG_TYPE;function P(ee,re,fe){return(fe===void 0||fe>ee.length)&&(fe=ee.length),ee.substring(fe-re.length,fe)===re}function T(ee,re){if(re=Math.floor(re),ee.length==0||re==0)return"";var fe=ee.length*re;for(re=Math.floor(Math.log(re)/Math.log(2));re;)ee+=ee,re--;return ee+=ee.substring(0,fe-ee.length),ee}var y="",S="",M="",W="",$={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:"},Z=10;function K(ee){var re=Object.keys(ee),fe=Object.create(Object.getPrototypeOf(ee));return re.forEach(function(we){fe[we]=ee[we]}),Object.defineProperty(fe,"message",{value:ee.message}),fe}function Q(ee){return N(ee,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function J(ee,re,fe){var we="",Oe="",ke=0,Le="",oe=!1,be=Q(ee),_e=be.split(`
`),he=Q(re).split(`
`),De=0,xe="";if(fe==="strictEqual"&&C(ee)==="object"&&C(re)==="object"&&ee!==null&&re!==null&&(fe="strictEqualObject"),_e.length===1&&he.length===1&&_e[0]!==he[0]){var se=_e[0].length+he[0].length;if(se<=Z){if((C(ee)!=="object"||ee===null)&&(C(re)!=="object"||re===null)&&(ee!==0||re!==0))return"".concat($[fe],`

`)+"".concat(_e[0]," !== ").concat(he[0],`
`)}else if(fe!=="strictEqualObject"){var Ee=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(se<Ee){for(;_e[0][De]===he[0][De];)De++;De>2&&(xe=`
  `.concat(T(" ",De),"^"),De=0)}}}for(var Te=_e[_e.length-1],Be=he[he.length-1];Te===Be&&(De++<2?Le=`
  `.concat(Te).concat(Le):we=Te,_e.pop(),he.pop(),!(_e.length===0||he.length===0));)Te=_e[_e.length-1],Be=he[he.length-1];var tt=Math.max(_e.length,he.length);if(tt===0){var at=be.split(`
`);if(at.length>30)for(at[26]="".concat(y,"...").concat(W);at.length>27;)at.pop();return"".concat($.notIdentical,`

`).concat(at.join(`
`),`
`)}De>3&&(Le=`
`.concat(y,"...").concat(W).concat(Le),oe=!0),we!==""&&(Le=`
  `.concat(we).concat(Le),we="");var gt=0,pt=$[fe]+`
`.concat(S,"+ actual").concat(W," ").concat(M,"- expected").concat(W),Rt=" ".concat(y,"...").concat(W," Lines skipped");for(De=0;De<tt;De++){var $t=De-ke;if(_e.length<De+1)$t>1&&De>2&&($t>4?(Oe+=`
`.concat(y,"...").concat(W),oe=!0):$t>3&&(Oe+=`
  `.concat(he[De-2]),gt++),Oe+=`
  `.concat(he[De-1]),gt++),ke=De,we+=`
`.concat(M,"-").concat(W," ").concat(he[De]),gt++;else if(he.length<De+1)$t>1&&De>2&&($t>4?(Oe+=`
`.concat(y,"...").concat(W),oe=!0):$t>3&&(Oe+=`
  `.concat(_e[De-2]),gt++),Oe+=`
  `.concat(_e[De-1]),gt++),ke=De,Oe+=`
`.concat(S,"+").concat(W," ").concat(_e[De]),gt++;else{var Wt=he[De],Ht=_e[De],Ft=Ht!==Wt&&(!P(Ht,",")||Ht.slice(0,-1)!==Wt);Ft&&P(Wt,",")&&Wt.slice(0,-1)===Ht&&(Ft=!1,Ht+=","),Ft?($t>1&&De>2&&($t>4?(Oe+=`
`.concat(y,"...").concat(W),oe=!0):$t>3&&(Oe+=`
  `.concat(_e[De-2]),gt++),Oe+=`
  `.concat(_e[De-1]),gt++),ke=De,Oe+=`
`.concat(S,"+").concat(W," ").concat(Ht),we+=`
`.concat(M,"-").concat(W," ").concat(Wt),gt+=2):(Oe+=we,we="",($t===1||De===0)&&(Oe+=`
  `.concat(Ht),gt++))}if(gt>20&&De<tt-2)return"".concat(pt).concat(Rt,`
`).concat(Oe,`
`).concat(y,"...").concat(W).concat(we,`
`)+"".concat(y,"...").concat(W)}return"".concat(pt).concat(oe?Rt:"",`
`).concat(Oe).concat(we).concat(Le).concat(xe)}var G=(function(ee,re){f(we,ee);var fe=v(we);function we(Oe){var ke;if(z(this,we),C(Oe)!=="object"||Oe===null)throw new k("options","Object",Oe);var Le=Oe.message,oe=Oe.operator,be=Oe.stackStartFn,_e=Oe.actual,he=Oe.expected,De=Error.stackTraceLimit;if(Error.stackTraceLimit=0,Le!=null)ke=fe.call(this,String(Le));else if(process.stderr&&process.stderr.isTTY&&(process.stderr&&process.stderr.getColorDepth&&process.stderr.getColorDepth()!==1?(y="\x1B[34m",S="\x1B[32m",W="\x1B[39m",M="\x1B[31m"):(y="",S="",W="",M="")),C(_e)==="object"&&_e!==null&&C(he)==="object"&&he!==null&&"stack"in _e&&_e instanceof Error&&"stack"in he&&he instanceof Error&&(_e=K(_e),he=K(he)),oe==="deepStrictEqual"||oe==="strictEqual")ke=fe.call(this,J(_e,he,oe));else if(oe==="notDeepStrictEqual"||oe==="notStrictEqual"){var xe=$[oe],se=Q(_e).split(`
`);if(oe==="notStrictEqual"&&C(_e)==="object"&&_e!==null&&(xe=$.notStrictEqualObject),se.length>30)for(se[26]="".concat(y,"...").concat(W);se.length>27;)se.pop();se.length===1?ke=fe.call(this,"".concat(xe," ").concat(se[0])):ke=fe.call(this,"".concat(xe,`

`).concat(se.join(`
`),`
`))}else{var Ee=Q(_e),Te="",Be=$[oe];oe==="notDeepEqual"||oe==="notEqual"?(Ee="".concat($[oe],`

`).concat(Ee),Ee.length>1024&&(Ee="".concat(Ee.slice(0,1021),"..."))):(Te="".concat(Q(he)),Ee.length>512&&(Ee="".concat(Ee.slice(0,509),"...")),Te.length>512&&(Te="".concat(Te.slice(0,509),"...")),oe==="deepEqual"||oe==="equal"?Ee="".concat(Be,`

`).concat(Ee,`

should equal

`):Te=" ".concat(oe," ").concat(Te)),ke=fe.call(this,"".concat(Ee).concat(Te))}return Error.stackTraceLimit=De,ke.generatedMessage=!Le,Object.defineProperty(m(ke),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),ke.code="ERR_ASSERTION",ke.actual=_e,ke.expected=he,ke.operator=oe,Error.captureStackTrace&&Error.captureStackTrace(m(ke),be),ke.stack,ke.name="AssertionError",h(ke)}return u(we,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:re,value:function(ke,Le){return N(this,R(R({},Le),{},{customInspect:!1,depth:0}))}}]),we})(_(Error),N.custom);le.exports=G}}),u3=U({"node_modules/object-keys/isArguments.js"(pe,le){var w=Object.prototype.toString;le.exports=function(O){var z=w.call(O),l=z==="[object Arguments]";return l||(l=z!=="[object Array]"&&O!==null&&typeof O=="object"&&typeof O.length=="number"&&O.length>=0&&w.call(O.callee)==="[object Function]"),l}}}),xS=U({"node_modules/object-keys/implementation.js"(pe,le){var w;Object.keys||(R=Object.prototype.hasOwnProperty,O=Object.prototype.toString,z=u3(),l=Object.prototype.propertyIsEnumerable,u=!l.call({toString:null},"toString"),c=l.call(function(){},"prototype"),p=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],f=function(_){var x=_.constructor;return x&&x.prototype===_},v={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},h=(function(){if(typeof window>"u")return!1;for(var _ in window)try{if(!v["$"+_]&&R.call(window,_)&&window[_]!==null&&typeof window[_]=="object")try{f(window[_])}catch{return!0}}catch{return!0}return!1})(),m=function(_){if(typeof window>"u"||!h)return f(_);try{return f(_)}catch{return!1}},w=function(x){var A=x!==null&&typeof x=="object",E=O.call(x)==="[object Function]",D=z(x),g=A&&O.call(x)==="[object String]",C=[];if(!A&&!E&&!D)throw new TypeError("Object.keys called on a non-object");var I=c&&E;if(g&&x.length>0&&!R.call(x,0))for(var N=0;N<x.length;++N)C.push(String(N));if(D&&x.length>0)for(var F=0;F<x.length;++F)C.push(String(F));else for(var k in x)!(I&&k==="prototype")&&R.call(x,k)&&C.push(String(k));if(u)for(var P=m(x),T=0;T<p.length;++T)!(P&&p[T]==="constructor")&&R.call(x,p[T])&&C.push(p[T]);return C});var R,O,z,l,u,c,p,f,v,h,m;le.exports=w}}),Ox=U({"node_modules/object-keys/index.js"(pe,le){var w=Array.prototype.slice,R=u3(),O=Object.keys,z=O?function(c){return O(c)}:xS(),l=Object.keys;z.shim=function(){if(Object.keys){var c=(function(){var p=Object.keys(arguments);return p&&p.length===arguments.length})(1,2);c||(Object.keys=function(f){return R(f)?l(w.call(f)):l(f)})}else Object.keys=z;return Object.keys||z},le.exports=z}}),yw=U({"node_modules/object.assign/implementation.js"(pe,le){var w=Ox(),R=$g()(),O=zv(),z=Object,l=O("Array.prototype.push"),u=O("Object.prototype.propertyIsEnumerable"),c=R?Object.getOwnPropertySymbols:null;le.exports=function(f,v){if(f==null)throw new TypeError("target must be an object");var h=z(f);if(arguments.length===1)return h;for(var m=1;m<arguments.length;++m){var _=z(arguments[m]),x=w(_),A=R&&(Object.getOwnPropertySymbols||c);if(A)for(var E=A(_),D=0;D<E.length;++D){var g=E[D];u(_,g)&&l(x,g)}for(var C=0;C<x.length;++C){var I=x[C];if(u(_,I)){var N=_[I];h[I]=N}}}return h}}}),PT=U({"node_modules/object.assign/polyfill.js"(pe,le){var w=yw(),R=function(){if(!Object.assign)return!1;for(var z="abcdefghijklmnopqrst",l=z.split(""),u={},c=0;c<l.length;++c)u[l[c]]=l[c];var p=Object.assign({},u),f="";for(var v in p)f+=v;return z!==f},O=function(){if(!Object.assign||!Object.preventExtensions)return!1;var z=Object.preventExtensions({1:2});try{Object.assign(z,"xy")}catch{return z[1]==="y"}return!1};le.exports=function(){return!Object.assign||R()||O()?w:Object.assign}}}),g2=U({"node_modules/object-is/implementation.js"(pe,le){var w=function(R){return R!==R};le.exports=function(O,z){return O===0&&z===0?1/O===1/z:!!(O===z||w(O)&&w(z))}}}),c3=U({"node_modules/object-is/polyfill.js"(pe,le){var w=g2();le.exports=function(){return typeof Object.is=="function"?Object.is:w}}}),y2=U({"node_modules/define-properties/index.js"(pe,le){var w=Ox(),R=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",O=Object.prototype.toString,z=Array.prototype.concat,l=Object.defineProperty,u=function(h){return typeof h=="function"&&O.call(h)==="[object Function]"},c=sh()(),p=l&&c,f=function(h,m,_,x){if(m in h){if(x===!0){if(h[m]===_)return}else if(!u(x)||!x())return}p?l(h,m,{configurable:!0,enumerable:!1,value:_,writable:!0}):h[m]=_},v=function(h,m){var _=arguments.length>2?arguments[2]:{},x=w(m);R&&(x=z.call(x,Object.getOwnPropertySymbols(m)));for(var A=0;A<x.length;A+=1)f(h,x[A],m[x[A]],_[x[A]])};v.supportsDescriptors=!!p,le.exports=v}}),LM=U({"node_modules/object-is/shim.js"(pe,le){var w=c3(),R=y2();le.exports=function(){var z=w();return R(Object,{is:z},{is:function(){return Object.is!==z}}),z}}}),Ce=U({"node_modules/object-is/index.js"(pe,le){var w=y2(),R=Ed(),O=g2(),z=c3(),l=LM(),u=R(z(),Object);w(u,{getPolyfill:z,implementation:O,shim:l}),le.exports=u}}),Ne=U({"node_modules/is-nan/implementation.js"(pe,le){le.exports=function(R){return R!==R}}}),Tt=U({"node_modules/is-nan/polyfill.js"(pe,le){var w=Ne();le.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:w}}}),Kt=U({"node_modules/is-nan/shim.js"(pe,le){var w=y2(),R=Tt();le.exports=function(){var z=R();return w(Number,{isNaN:z},{isNaN:function(){return Number.isNaN!==z}}),z}}}),Dr=U({"node_modules/is-nan/index.js"(pe,le){var w=Ed(),R=y2(),O=Ne(),z=Tt(),l=Kt(),u=w(z(),Number);R(u,{getPolyfill:z,implementation:O,shim:l}),le.exports=u}}),pn=U({"node_modules/assert/build/internal/util/comparisons.js"(pe,le){function w(Ft,st){return u(Ft)||l(Ft,st)||O(Ft,st)||R()}function R(){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 O(Ft,st){if(Ft){if(typeof Ft=="string")return z(Ft,st);var rt=Object.prototype.toString.call(Ft).slice(8,-1);if(rt==="Object"&&Ft.constructor&&(rt=Ft.constructor.name),rt==="Map"||rt==="Set")return Array.from(Ft);if(rt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(rt))return z(Ft,st)}}function z(Ft,st){(st==null||st>Ft.length)&&(st=Ft.length);for(var rt=0,Ue=new Array(st);rt<st;rt++)Ue[rt]=Ft[rt];return Ue}function l(Ft,st){var rt=Ft==null?null:typeof Symbol<"u"&&Ft[Symbol.iterator]||Ft["@@iterator"];if(rt!=null){var Ue,xt,Gt,Jt,Ut=[],kr=!0,Pr=!1;try{if(Gt=(rt=rt.call(Ft)).next,st!==0)for(;!(kr=(Ue=Gt.call(rt)).done)&&(Ut.push(Ue.value),Ut.length!==st);kr=!0);}catch($r){Pr=!0,xt=$r}finally{try{if(!kr&&rt.return!=null&&(Jt=rt.return(),Object(Jt)!==Jt))return}finally{if(Pr)throw xt}}return Ut}}function u(Ft){if(Array.isArray(Ft))return Ft}function c(Ft){"@babel/helpers - typeof";return c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(st){return typeof st}:function(st){return st&&typeof Symbol=="function"&&st.constructor===Symbol&&st!==Symbol.prototype?"symbol":typeof st},c(Ft)}var p=/a/g.flags!==void 0,f=function(st){var rt=[];return st.forEach(function(Ue){return rt.push(Ue)}),rt},v=function(st){var rt=[];return st.forEach(function(Ue,xt){return rt.push([xt,Ue])}),rt},h=Object.is?Object.is:Ce(),m=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},_=Number.isNaN?Number.isNaN:Dr();function x(Ft){return Ft.call.bind(Ft)}var A=x(Object.prototype.hasOwnProperty),E=x(Object.prototype.propertyIsEnumerable),D=x(Object.prototype.toString),g=bS().types,C=g.isAnyArrayBuffer,I=g.isArrayBufferView,N=g.isDate,F=g.isMap,k=g.isRegExp,P=g.isSet,T=g.isNativeError,y=g.isBoxedPrimitive,S=g.isNumberObject,M=g.isStringObject,W=g.isBooleanObject,$=g.isBigIntObject,Z=g.isSymbolObject,K=g.isFloat32Array,Q=g.isFloat64Array;function J(Ft){if(Ft.length===0||Ft.length>10)return!0;for(var st=0;st<Ft.length;st++){var rt=Ft.charCodeAt(st);if(rt<48||rt>57)return!0}return Ft.length===10&&Ft>=Math.pow(2,32)}function G(Ft){return Object.keys(Ft).filter(J).concat(m(Ft).filter(Object.prototype.propertyIsEnumerable.bind(Ft)))}function ee(Ft,st){if(Ft===st)return 0;for(var rt=Ft.length,Ue=st.length,xt=0,Gt=Math.min(rt,Ue);xt<Gt;++xt)if(Ft[xt]!==st[xt]){rt=Ft[xt],Ue=st[xt];break}return rt<Ue?-1:Ue<rt?1:0}var re=!0,fe=!1,we=0,Oe=1,ke=2,Le=3;function oe(Ft,st){return p?Ft.source===st.source&&Ft.flags===st.flags:RegExp.prototype.toString.call(Ft)===RegExp.prototype.toString.call(st)}function be(Ft,st){if(Ft.byteLength!==st.byteLength)return!1;for(var rt=0;rt<Ft.byteLength;rt++)if(Ft[rt]!==st[rt])return!1;return!0}function _e(Ft,st){return Ft.byteLength!==st.byteLength?!1:ee(new Uint8Array(Ft.buffer,Ft.byteOffset,Ft.byteLength),new Uint8Array(st.buffer,st.byteOffset,st.byteLength))===0}function he(Ft,st){return Ft.byteLength===st.byteLength&&ee(new Uint8Array(Ft),new Uint8Array(st))===0}function De(Ft,st){return S(Ft)?S(st)&&h(Number.prototype.valueOf.call(Ft),Number.prototype.valueOf.call(st)):M(Ft)?M(st)&&String.prototype.valueOf.call(Ft)===String.prototype.valueOf.call(st):W(Ft)?W(st)&&Boolean.prototype.valueOf.call(Ft)===Boolean.prototype.valueOf.call(st):$(Ft)?$(st)&&BigInt.prototype.valueOf.call(Ft)===BigInt.prototype.valueOf.call(st):Z(st)&&Symbol.prototype.valueOf.call(Ft)===Symbol.prototype.valueOf.call(st)}function xe(Ft,st,rt,Ue){if(Ft===st)return Ft!==0?!0:rt?h(Ft,st):!0;if(rt){if(c(Ft)!=="object")return typeof Ft=="number"&&_(Ft)&&_(st);if(c(st)!=="object"||Ft===null||st===null||Object.getPrototypeOf(Ft)!==Object.getPrototypeOf(st))return!1}else{if(Ft===null||c(Ft)!=="object")return st===null||c(st)!=="object"?Ft==st:!1;if(st===null||c(st)!=="object")return!1}var xt=D(Ft),Gt=D(st);if(xt!==Gt)return!1;if(Array.isArray(Ft)){if(Ft.length!==st.length)return!1;var Jt=G(Ft),Ut=G(st);return Jt.length!==Ut.length?!1:Ee(Ft,st,rt,Ue,Oe,Jt)}if(xt==="[object Object]"&&(!F(Ft)&&F(st)||!P(Ft)&&P(st)))return!1;if(N(Ft)){if(!N(st)||Date.prototype.getTime.call(Ft)!==Date.prototype.getTime.call(st))return!1}else if(k(Ft)){if(!k(st)||!oe(Ft,st))return!1}else if(T(Ft)||Ft instanceof Error){if(Ft.message!==st.message||Ft.name!==st.name)return!1}else if(I(Ft)){if(!rt&&(K(Ft)||Q(Ft))){if(!be(Ft,st))return!1}else if(!_e(Ft,st))return!1;var kr=G(Ft),Pr=G(st);return kr.length!==Pr.length?!1:Ee(Ft,st,rt,Ue,we,kr)}else{if(P(Ft))return!P(st)||Ft.size!==st.size?!1:Ee(Ft,st,rt,Ue,ke);if(F(Ft))return!F(st)||Ft.size!==st.size?!1:Ee(Ft,st,rt,Ue,Le);if(C(Ft)){if(!he(Ft,st))return!1}else if(y(Ft)&&!De(Ft,st))return!1}return Ee(Ft,st,rt,Ue,we)}function se(Ft,st){return st.filter(function(rt){return E(Ft,rt)})}function Ee(Ft,st,rt,Ue,xt,Gt){if(arguments.length===5){Gt=Object.keys(Ft);var Jt=Object.keys(st);if(Gt.length!==Jt.length)return!1}for(var Ut=0;Ut<Gt.length;Ut++)if(!A(st,Gt[Ut]))return!1;if(rt&&arguments.length===5){var kr=m(Ft);if(kr.length!==0){var Pr=0;for(Ut=0;Ut<kr.length;Ut++){var $r=kr[Ut];if(E(Ft,$r)){if(!E(st,$r))return!1;Gt.push($r),Pr++}else if(E(st,$r))return!1}var rn=m(st);if(kr.length!==rn.length&&se(st,rn).length!==Pr)return!1}else{var kn=m(st);if(kn.length!==0&&se(st,kn).length!==0)return!1}}if(Gt.length===0&&(xt===we||xt===Oe&&Ft.length===0||Ft.size===0))return!0;if(Ue===void 0)Ue={val1:new Map,val2:new Map,position:0};else{var Rn=Ue.val1.get(Ft);if(Rn!==void 0){var ci=Ue.val2.get(st);if(ci!==void 0)return Rn===ci}Ue.position++}Ue.val1.set(Ft,Ue.position),Ue.val2.set(st,Ue.position);var In=$t(Ft,st,rt,Gt,Ue,xt);return Ue.val1.delete(Ft),Ue.val2.delete(st),In}function Te(Ft,st,rt,Ue){for(var xt=f(Ft),Gt=0;Gt<xt.length;Gt++){var Jt=xt[Gt];if(xe(st,Jt,rt,Ue))return Ft.delete(Jt),!0}return!1}function Be(Ft){switch(c(Ft)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":Ft=+Ft;case"number":if(_(Ft))return!1}return!0}function tt(Ft,st,rt){var Ue=Be(rt);return Ue??(st.has(Ue)&&!Ft.has(Ue))}function at(Ft,st,rt,Ue,xt){var Gt=Be(rt);if(Gt!=null)return Gt;var Jt=st.get(Gt);return Jt===void 0&&!st.has(Gt)||!xe(Ue,Jt,!1,xt)?!1:!Ft.has(Gt)&&xe(Ue,Jt,!1,xt)}function gt(Ft,st,rt,Ue){for(var xt=null,Gt=f(Ft),Jt=0;Jt<Gt.length;Jt++){var Ut=Gt[Jt];if(c(Ut)==="object"&&Ut!==null)xt===null&&(xt=new Set),xt.add(Ut);else if(!st.has(Ut)){if(rt||!tt(Ft,st,Ut))return!1;xt===null&&(xt=new Set),xt.add(Ut)}}if(xt!==null){for(var kr=f(st),Pr=0;Pr<kr.length;Pr++){var $r=kr[Pr];if(c($r)==="object"&&$r!==null){if(!Te(xt,$r,rt,Ue))return!1}else if(!rt&&!Ft.has($r)&&!Te(xt,$r,rt,Ue))return!1}return xt.size===0}return!0}function pt(Ft,st,rt,Ue,xt,Gt){for(var Jt=f(Ft),Ut=0;Ut<Jt.length;Ut++){var kr=Jt[Ut];if(xe(rt,kr,xt,Gt)&&xe(Ue,st.get(kr),xt,Gt))return Ft.delete(kr),!0}return!1}function Rt(Ft,st,rt,Ue){for(var xt=null,Gt=v(Ft),Jt=0;Jt<Gt.length;Jt++){var Ut=w(Gt[Jt],2),kr=Ut[0],Pr=Ut[1];if(c(kr)==="object"&&kr!==null)xt===null&&(xt=new Set),xt.add(kr);else{var $r=st.get(kr);if($r===void 0&&!st.has(kr)||!xe(Pr,$r,rt,Ue)){if(rt||!at(Ft,st,kr,Pr,Ue))return!1;xt===null&&(xt=new Set),xt.add(kr)}}}if(xt!==null){for(var rn=v(st),kn=0;kn<rn.length;kn++){var Rn=w(rn[kn],2),ci=Rn[0],In=Rn[1];if(c(ci)==="object"&&ci!==null){if(!pt(xt,Ft,ci,In,rt,Ue))return!1}else if(!rt&&(!Ft.has(ci)||!xe(Ft.get(ci),In,!1,Ue))&&!pt(xt,Ft,ci,In,!1,Ue))return!1}return xt.size===0}return!0}function $t(Ft,st,rt,Ue,xt,Gt){var Jt=0;if(Gt===ke){if(!gt(Ft,st,rt,xt))return!1}else if(Gt===Le){if(!Rt(Ft,st,rt,xt))return!1}else if(Gt===Oe)for(;Jt<Ft.length;Jt++)if(A(Ft,Jt)){if(!A(st,Jt)||!xe(Ft[Jt],st[Jt],rt,xt))return!1}else{if(A(st,Jt))return!1;for(var Ut=Object.keys(Ft);Jt<Ut.length;Jt++){var kr=Ut[Jt];if(!A(st,kr)||!xe(Ft[kr],st[kr],rt,xt))return!1}return Ut.length===Object.keys(st).length}for(Jt=0;Jt<Ue.length;Jt++){var Pr=Ue[Jt];if(!xe(Ft[Pr],st[Pr],rt,xt))return!1}return!0}function Wt(Ft,st){return xe(Ft,st,fe)}function Ht(Ft,st){return xe(Ft,st,re)}le.exports={isDeepEqual:Wt,isDeepStrictEqual:Ht}}}),ta=U({"node_modules/assert/build/assert.js"(pe,le){function w(ke){"@babel/helpers - typeof";return w=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Le){return typeof Le}:function(Le){return Le&&typeof Symbol=="function"&&Le.constructor===Symbol&&Le!==Symbol.prototype?"symbol":typeof Le},w(ke)}function R(ke,Le,oe){return Object.defineProperty(ke,"prototype",{writable:!1}),ke}function O(ke,Le){if(!(ke instanceof Le))throw new TypeError("Cannot call a class as a function")}var z=i1(),l=z.codes,u=l.ERR_AMBIGUOUS_ARGUMENT,c=l.ERR_INVALID_ARG_TYPE,p=l.ERR_INVALID_ARG_VALUE,f=l.ERR_INVALID_RETURN_VALUE,v=l.ERR_MISSING_ARGS,h=l3(),m=bS(),_=m.inspect,x=bS().types,A=x.isPromise,E=x.isRegExp,D=PT()(),g=c3()(),C=zv()("RegExp.prototype.test"),I,N;function F(){var ke=pn();I=ke.isDeepEqual,N=ke.isDeepStrictEqual}var k=!1,P=le.exports=W,T={};function y(ke){throw ke.message instanceof Error?ke.message:new h(ke)}function S(ke,Le,oe,be,_e){var he=arguments.length,De;if(he===0)De="Failed";else if(he===1)oe=ke,ke=void 0;else{if(k===!1){k=!0;var xe=process.emitWarning?process.emitWarning:console.warn.bind(console);xe("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}he===2&&(be="!=")}if(oe instanceof Error)throw oe;var se={actual:ke,expected:Le,operator:be===void 0?"fail":be,stackStartFn:_e||S};oe!==void 0&&(se.message=oe);var Ee=new h(se);throw De&&(Ee.message=De,Ee.generatedMessage=!0),Ee}P.fail=S,P.AssertionError=h;function M(ke,Le,oe,be){if(!oe){var _e=!1;if(Le===0)_e=!0,be="No value argument passed to `assert.ok()`";else if(be instanceof Error)throw be;var he=new h({actual:oe,expected:!0,message:be,operator:"==",stackStartFn:ke});throw he.generatedMessage=_e,he}}function W(){for(var ke=arguments.length,Le=new Array(ke),oe=0;oe<ke;oe++)Le[oe]=arguments[oe];M.apply(void 0,[W,Le.length].concat(Le))}P.ok=W,P.equal=function ke(Le,oe,be){if(arguments.length<2)throw new v("actual","expected");Le!=oe&&y({actual:Le,expected:oe,message:be,operator:"==",stackStartFn:ke})},P.notEqual=function ke(Le,oe,be){if(arguments.length<2)throw new v("actual","expected");Le==oe&&y({actual:Le,expected:oe,message:be,operator:"!=",stackStartFn:ke})},P.deepEqual=function ke(Le,oe,be){if(arguments.length<2)throw new v("actual","expected");I===void 0&&F(),I(Le,oe)||y({actual:Le,expected:oe,message:be,operator:"deepEqual",stackStartFn:ke})},P.notDeepEqual=function ke(Le,oe,be){if(arguments.length<2)throw new v("actual","expected");I===void 0&&F(),I(Le,oe)&&y({actual:Le,expected:oe,message:be,operator:"notDeepEqual",stackStartFn:ke})},P.deepStrictEqual=function ke(Le,oe,be){if(arguments.length<2)throw new v("actual","expected");I===void 0&&F(),N(Le,oe)||y({actual:Le,expected:oe,message:be,operator:"deepStrictEqual",stackStartFn:ke})},P.notDeepStrictEqual=$;function $(ke,Le,oe){if(arguments.length<2)throw new v("actual","expected");I===void 0&&F(),N(ke,Le)&&y({actual:ke,expected:Le,message:oe,operator:"notDeepStrictEqual",stackStartFn:$})}P.strictEqual=function ke(Le,oe,be){if(arguments.length<2)throw new v("actual","expected");g(Le,oe)||y({actual:Le,expected:oe,message:be,operator:"strictEqual",stackStartFn:ke})},P.notStrictEqual=function ke(Le,oe,be){if(arguments.length<2)throw new v("actual","expected");g(Le,oe)&&y({actual:Le,expected:oe,message:be,operator:"notStrictEqual",stackStartFn:ke})};var Z=R(function ke(Le,oe,be){var _e=this;O(this,ke),oe.forEach(function(he){he in Le&&(be!==void 0&&typeof be[he]=="string"&&E(Le[he])&&C(Le[he],be[he])?_e[he]=be[he]:_e[he]=Le[he])})});function K(ke,Le,oe,be,_e,he){if(!(oe in ke)||!N(ke[oe],Le[oe])){if(!be){var De=new Z(ke,_e),xe=new Z(Le,_e,ke),se=new h({actual:De,expected:xe,operator:"deepStrictEqual",stackStartFn:he});throw se.actual=ke,se.expected=Le,se.operator=he.name,se}y({actual:ke,expected:Le,message:be,operator:he.name,stackStartFn:he})}}function Q(ke,Le,oe,be){if(typeof Le!="function"){if(E(Le))return C(Le,ke);if(arguments.length===2)throw new c("expected",["Function","RegExp"],Le);if(w(ke)!=="object"||ke===null){var _e=new h({actual:ke,expected:Le,message:oe,operator:"deepStrictEqual",stackStartFn:be});throw _e.operator=be.name,_e}var he=Object.keys(Le);if(Le instanceof Error)he.push("name","message");else if(he.length===0)throw new p("error",Le,"may not be an empty object");return I===void 0&&F(),he.forEach(function(De){typeof ke[De]=="string"&&E(Le[De])&&C(Le[De],ke[De])||K(ke,Le,De,oe,he,be)}),!0}return Le.prototype!==void 0&&ke instanceof Le?!0:Error.isPrototypeOf(Le)?!1:Le.call({},ke)===!0}function J(ke){if(typeof ke!="function")throw new c("fn","Function",ke);try{ke()}catch(Le){return Le}return T}function G(ke){return A(ke)||ke!==null&&w(ke)==="object"&&typeof ke.then=="function"&&typeof ke.catch=="function"}function ee(ke){return Promise.resolve().then(function(){var Le;if(typeof ke=="function"){if(Le=ke(),!G(Le))throw new f("instance of Promise","promiseFn",Le)}else if(G(ke))Le=ke;else throw new c("promiseFn",["Function","Promise"],ke);return Promise.resolve().then(function(){return Le}).then(function(){return T}).catch(function(oe){return oe})})}function re(ke,Le,oe,be){if(typeof oe=="string"){if(arguments.length===4)throw new c("error",["Object","Error","Function","RegExp"],oe);if(w(Le)==="object"&&Le!==null){if(Le.message===oe)throw new u("error/message",'The error message "'.concat(Le.message,'" is identical to the message.'))}else if(Le===oe)throw new u("error/message",'The error "'.concat(Le,'" is identical to the message.'));be=oe,oe=void 0}else if(oe!=null&&w(oe)!=="object"&&typeof oe!="function")throw new c("error",["Object","Error","Function","RegExp"],oe);if(Le===T){var _e="";oe&&oe.name&&(_e+=" (".concat(oe.name,")")),_e+=be?": ".concat(be):".";var he=ke.name==="rejects"?"rejection":"exception";y({actual:void 0,expected:oe,operator:ke.name,message:"Missing expected ".concat(he).concat(_e),stackStartFn:ke})}if(oe&&!Q(Le,oe,be,ke))throw Le}function fe(ke,Le,oe,be){if(Le!==T){if(typeof oe=="string"&&(be=oe,oe=void 0),!oe||Q(Le,oe)){var _e=be?": ".concat(be):".",he=ke.name==="doesNotReject"?"rejection":"exception";y({actual:Le,expected:oe,operator:ke.name,message:"Got unwanted ".concat(he).concat(_e,`
`)+'Actual message: "'.concat(Le&&Le.message,'"'),stackStartFn:ke})}throw Le}}P.throws=function ke(Le){for(var oe=arguments.length,be=new Array(oe>1?oe-1:0),_e=1;_e<oe;_e++)be[_e-1]=arguments[_e];re.apply(void 0,[ke,J(Le)].concat(be))},P.rejects=function ke(Le){for(var oe=arguments.length,be=new Array(oe>1?oe-1:0),_e=1;_e<oe;_e++)be[_e-1]=arguments[_e];return ee(Le).then(function(he){return re.apply(void 0,[ke,he].concat(be))})},P.doesNotThrow=function ke(Le){for(var oe=arguments.length,be=new Array(oe>1?oe-1:0),_e=1;_e<oe;_e++)be[_e-1]=arguments[_e];fe.apply(void 0,[ke,J(Le)].concat(be))},P.doesNotReject=function ke(Le){for(var oe=arguments.length,be=new Array(oe>1?oe-1:0),_e=1;_e<oe;_e++)be[_e-1]=arguments[_e];return ee(Le).then(function(he){return fe.apply(void 0,[ke,he].concat(be))})},P.ifError=function ke(Le){if(Le!=null){var oe="ifError got unwanted exception: ";w(Le)==="object"&&typeof Le.message=="string"?Le.message.length===0&&Le.constructor?oe+=Le.constructor.name:oe+=Le.message:oe+=_(Le);var be=new h({actual:Le,expected:null,operator:"ifError",message:oe,stackStartFn:ke}),_e=Le.stack;if(typeof _e=="string"){var he=_e.split(`
`);he.shift();for(var De=be.stack.split(`
`),xe=0;xe<he.length;xe++){var se=De.indexOf(he[xe]);if(se!==-1){De=De.slice(0,se);break}}be.stack="".concat(De.join(`
`),`
`).concat(he.join(`
`))}throw be}};function we(ke,Le,oe,be,_e){if(!E(Le))throw new c("regexp","RegExp",Le);var he=_e==="match";if(typeof ke!="string"||C(Le,ke)!==he){if(oe instanceof Error)throw oe;var De=!oe;oe=oe||(typeof ke!="string"?'The "string" argument must be of type string. Received type '+"".concat(w(ke)," (").concat(_(ke),")"):(he?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(_(Le),`. Input:

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

`),l=w("IHDR");le.exports=function(u){if(!(u.length<24)&&R(u,0,z)&&R(u,12,l))return{width:O(u,16),height:O(u,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}}}),fu=U({"node_modules/probe-image-size/lib/parse_sync/psd.js"(pe,le){var w=$l().str2arr,R=$l().sliceEq,O=$l().readUInt32BE,z=w("8BPS\0");le.exports=function(l){if(!(l.length<22)&&R(l,0,z))return{width:O(l,18),height:O(l,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}}}),sf=U({"node_modules/probe-image-size/lib/parse_sync/svg.js"(pe,le){function w(m){return m===32||m===9||m===13||m===10}function R(m){return typeof m=="number"&&isFinite(m)&&m>0}function O(m){var _=0,x=m.length;for(m[0]===239&&m[1]===187&&m[2]===191&&(_=3);_<x&&w(m[_]);)_++;return _===x?!1:m[_]===60}var z=/<[-_.:a-zA-Z0-9][^>]*>/,l=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,u=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,c=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,p=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,f=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function v(m){var _=m.match(u),x=m.match(c),A=m.match(p);return{width:_&&(_[1]||_[2]),height:x&&(x[1]||x[2]),viewbox:A&&(A[1]||A[2])}}function h(m){return f.test(m)?m.match(f)[0]:"px"}le.exports=function(m){if(O(m)){for(var _="",x=0;x<m.length;x++)_+=String.fromCharCode(m[x]);var A=(_.match(z)||[""])[0];if(l.test(A)){var E=v(A),D=parseFloat(E.width),g=parseFloat(E.height);if(E.width&&E.height)return!R(D)||!R(g)?void 0:{width:D,height:g,type:"svg",mime:"image/svg+xml",wUnits:h(E.width),hUnits:h(E.height)};var C=(E.viewbox||"").split(" "),I={width:C[2],height:C[3]},N=parseFloat(I.width),F=parseFloat(I.height);if(!(!R(N)||!R(F))&&h(I.width)===h(I.height)){var k=N/F;return E.width?R(D)?{width:D,height:D/k,type:"svg",mime:"image/svg+xml",wUnits:h(E.width),hUnits:h(E.width)}:void 0:E.height?R(g)?{width:g*k,height:g,type:"svg",mime:"image/svg+xml",wUnits:h(E.height),hUnits:h(E.height)}:void 0:{width:N,height:F,type:"svg",mime:"image/svg+xml",wUnits:h(I.width),hUnits:h(I.height)}}}}}}}),Tv=U({"node_modules/probe-image-size/lib/parse_sync/tiff.js"(pe,le){var w=$l().str2arr,R=$l().sliceEq,O=$l().readUInt16LE,z=$l().readUInt16BE,l=$l().readUInt32LE,u=$l().readUInt32BE,c=w("II*\0"),p=w("MM\0*");function f(m,_,x){return x?z(m,_):O(m,_)}function v(m,_,x){return x?u(m,_):l(m,_)}function h(m,_,x){var A=f(m,_+2,x),E=v(m,_+4,x);return E!==1||A!==3&&A!==4?null:A===3?f(m,_+8,x):v(m,_+8,x)}le.exports=function(m){if(!(m.length<8)&&!(!R(m,0,c)&&!R(m,0,p))){var _=m[0]===77,x=v(m,4,_)-8;if(!(x<0)){var A=x+8;if(!(m.length-A<2)){var E=f(m,A+0,_)*12;if(!(E<=0)&&(A+=2,!(m.length-A<E))){var D,g,C,I;for(D=0;D<E;D+=12)I=f(m,A+D,_),I===256?g=h(m,A+D,_):I===257&&(C=h(m,A+D,_));if(g&&C)return{width:g,height:C,type:"tiff",mime:"image/tiff",wUnits:"px",hUnits:"px"}}}}}}}}),Qf=U({"node_modules/probe-image-size/lib/parse_sync/webp.js"(pe,le){var w=$l().str2arr,R=$l().sliceEq,O=$l().readUInt16LE,z=$l().readUInt32LE,l=md(),u=w("RIFF"),c=w("WEBP");function p(h,m){if(!(h[m+3]!==157||h[m+4]!==1||h[m+5]!==42))return{width:O(h,m+6)&16383,height:O(h,m+8)&16383,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function f(h,m){if(h[m]===47){var _=z(h,m+1);return{width:(_&16383)+1,height:(_>>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function v(h,m){return{width:(h[m+6]<<16|h[m+5]<<8|h[m+4])+1,height:(h[m+9]<<m|h[m+8]<<8|h[m+7])+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}le.exports=function(h){if(!(h.length<16)&&!(!R(h,0,u)&&!R(h,8,c))){var m=12,_=null,x=0,A=z(h,4)+8;if(!(A>h.length)){for(;m+8<A;){if(h[m]===0){m++;continue}var E=String.fromCharCode.apply(null,h.slice(m,m+4)),D=z(h,m+4);E==="VP8 "&&D>=10?_=_||p(h,m+8):E==="VP8L"&&D>=9?_=_||f(h,m+8):E==="VP8X"&&D>=10?_=_||v(h,m+8):E==="EXIF"&&(x=l.get_orientation(h.slice(m+8,m+8+D)),m=1/0),m+=8+D}if(_)return x>0&&(_.orientation=x),_}}}}}),_p=U({"node_modules/probe-image-size/lib/parsers_sync.js"(pe,le){le.exports={avif:Kb(),bmp:_S(),gif:wS(),ico:Ps(),jpeg:zo(),png:Bs(),psd:fu(),svg:sf(),tiff:Tv(),webp:Qf()}}}),Ag=U({"node_modules/probe-image-size/sync.js"(pe,le){var w=_p();function R(O){for(var z=Object.keys(w),l=0;l<z.length;l++){var u=w[z[l]](O);if(u)return u}return null}le.exports=function(z){return R(z)},le.exports.parsers=w}}),lh=U({"src/traces/image/helpers.js"(pe){var le=Ag(),w=gm().IMAGE_URL_PREFIX,R=bp().Buffer;pe.getImageSize=function(O){var z=O.replace(w,""),l=new R(z,"base64");return le(l)}}}),A_=U({"src/traces/image/calc.js"(pe,le){var w=ii(),R=qb(),O=_t(),z=Yu(),l=ii().maxRowLength,u=lh().getImageSize;le.exports=function(h,m){var _,x;if(m._hasZ)_=m.z.length,x=l(m.z);else if(m._hasSource){var A=u(m.source);_=A.height,x=A.width}var E=z.getFromId(h,m.xaxis||"x"),D=z.getFromId(h,m.yaxis||"y"),g=E.d2c(m.x0)-m.dx/2,C=D.d2c(m.y0)-m.dy/2,I,N=[g,g+x*m.dx],F=[C,C+_*m.dy];if(E&&E.type==="log")for(I=0;I<x;I++)N.push(g+I*m.dx);if(D&&D.type==="log")for(I=0;I<_;I++)F.push(C+I*m.dy);m._extremes[E._id]=z.findExtremes(E,N),m._extremes[D._id]=z.findExtremes(D,F),m._scaler=f(m);var k={x0:g,y0:C,z:m.z,w:x,h:_};return[k]};function c(v,h,m,_){return function(x){return w.constrain((x-v)*h,m,_)}}function p(v,h){return function(m){return w.constrain(m,v,h)}}function f(v){var h=R.colormodel[v.colormodel],m=h.colormodel||v.colormodel,_=m.length;v._sArray=[];for(var x=0;x<_;x++)h.min[x]!==v.zmin[x]||h.max[x]!==v.zmax[x]?v._sArray.push(c(v.zmin[x],(h.max[x]-h.min[x])/(v.zmax[x]-v.zmin[x]),h.min[x],h.max[x])):v._sArray.push(p(h.min[x],h.max[x]));return function(A){for(var E=A.slice(0,_),D=0;D<_;D++){var g=E[D];if(!O(g))return!1;E[D]=v._sArray[D](g)}return E}}}}),JA=U({"src/traces/image/plot.js"(pe,le){var w=Ze(),R=ii(),O=R.strTranslate,z=E1(),l=qb(),u=VA(),c=o2().STYLE;le.exports=function(f,v,h,m){var _=v.xaxis,x=v.yaxis,A=!f._context._exportedPlot&&u();R.makeTraceGroups(m,h,"im").each(function(E){var D=w.select(this),g=E[0],C=g.trace,I=(C.zsmooth==="fast"||C.zsmooth===!1&&A)&&!C._hasZ&&C._hasSource&&_.type==="linear"&&x.type==="linear";C._realImage=I;var N=g.z,F=g.x0,k=g.y0,P=g.w,T=g.h,y=C.dx,S=C.dy,M,W,$,Z,K,Q;for(Q=0;M===void 0&&Q<P;)M=_.c2p(F+Q*y),Q++;for(Q=P;W===void 0&&Q>0;)W=_.c2p(F+Q*y),Q--;for(Q=0;Z===void 0&&Q<T;)Z=x.c2p(k+Q*S),Q++;for(Q=T;K===void 0&&Q>0;)K=x.c2p(k+Q*S),Q--;if(W<M&&($=W,W=M,M=$),K<Z&&($=Z,Z=K,K=$),!I){var J=.5;M=Math.max(-J*_._length,M),W=Math.min((1+J)*_._length,W),Z=Math.max(-J*x._length,Z),K=Math.min((1+J)*x._length,K)}var G=Math.round(W-M),ee=Math.round(K-Z),re=G<=0||ee<=0;if(re){var fe=D.selectAll("image").data([]);fe.exit().remove();return}function we(se){var Ee=document.createElement("canvas");Ee.width=G,Ee.height=ee;var Te=Ee.getContext("2d",{willReadFrequently:!0}),Be=function(rt){return R.constrain(Math.round(_.c2p(F+rt*y)-M),0,G)},tt=function(rt){return R.constrain(Math.round(x.c2p(k+rt*S)-Z),0,ee)},at=l.colormodel[C.colormodel],gt=at.colormodel||C.colormodel,pt=at.fmt,Rt;for(Q=0;Q<g.w;Q++){var $t=Be(Q),Wt=Be(Q+1);if(!(Wt===$t||isNaN(Wt)||isNaN($t)))for(var Ht=0;Ht<g.h;Ht++){var Ft=tt(Ht),st=tt(Ht+1);st===Ft||isNaN(st)||isNaN(Ft)||!se(Q,Ht)||(Rt=C._scaler(se(Q,Ht)),Rt?Te.fillStyle=gt+"("+pt(Rt).join(",")+")":Te.fillStyle="rgba(0,0,0,0)",Te.fillRect($t,Ft,Wt-$t,st-Ft))}}return Ee}var Oe=D.selectAll("image").data([E]);Oe.enter().append("svg:image").attr({xmlns:z.svg,preserveAspectRatio:"none"}),Oe.exit().remove();var ke=C.zsmooth===!1?c:"";if(I){var Le=R.simpleMap(_.range,_.r2l),oe=R.simpleMap(x.range,x.r2l),be=Le[1]<Le[0],_e=oe[1]>oe[0];if(be||_e){var he=M+G/2,De=Z+ee/2;ke+="transform:"+O(he+"px",De+"px")+"scale("+(be?-1:1)+","+(_e?-1:1)+")"+O(-he+"px",-De+"px")+";"}}Oe.attr("style",ke);var xe=new Promise(function(se){if(C._hasZ)se();else if(C._hasSource)if(C._canvas&&C._canvas.el.width===P&&C._canvas.el.height===T&&C._canvas.source===C.source)se();else{var Ee=document.createElement("canvas");Ee.width=P,Ee.height=T;var Te=Ee.getContext("2d",{willReadFrequently:!0});C._image=C._image||new Image;var Be=C._image;Be.onload=function(){Te.drawImage(Be,0,0),C._canvas={el:Ee,source:C.source},se()},Be.setAttribute("src",C.source)}}).then(function(){var se,Ee;if(C._hasZ)Ee=we(function(tt,at){var gt=N[at][tt];return R.isTypedArray(gt)&&(gt=Array.from(gt)),gt}),se=Ee.toDataURL("image/png");else if(C._hasSource)if(I)se=C.source;else{var Te=C._canvas.el.getContext("2d",{willReadFrequently:!0}),Be=Te.getImageData(0,0,P,T).data;Ee=we(function(tt,at){var gt=4*(at*P+tt);return[Be[gt],Be[gt+1],Be[gt+2],Be[gt+3]]}),se=Ee.toDataURL("image/png")}Oe.attr({"xlink:href":se,height:ee,width:G,x:M,y:Z})});f._promises.push(xe)})}}}),oI=U({"src/traces/image/style.js"(pe,le){var w=Ze();le.exports=function(O){w.select(O).selectAll(".im image").style("opacity",function(z){return z[0].trace.opacity})}}}),f3=U({"src/traces/image/hover.js"(pe,le){var w=Dp(),R=ii(),O=R.isArrayOrTypedArray,z=qb();le.exports=function(u,c,p){var f=u.cd[0],v=f.trace,h=u.xa,m=u.ya;if(!(w.inbox(c-f.x0,c-(f.x0+f.w*v.dx),0)>0||w.inbox(p-f.y0,p-(f.y0+f.h*v.dy),0)>0)){var _=Math.floor((c-f.x0)/v.dx),x=Math.floor(Math.abs(p-f.y0)/v.dy),A;if(v._hasZ?A=f.z[x][_]:v._hasSource&&(A=v._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(_,x,1,1).data),!!A){var E=f.hi||v.hoverinfo,D;if(E){var g=E.split("+");g.indexOf("all")!==-1&&(g=["color"]),g.indexOf("color")!==-1&&(D=!0)}var C=z.colormodel[v.colormodel],I=C.colormodel||v.colormodel,N=I.length,F=v._scaler(A),k=C.suffix,P=[];(v.hovertemplate||D)&&(P.push("["+[F[0]+k[0],F[1]+k[1],F[2]+k[2]].join(", ")),N===4&&P.push(", "+F[3]+k[3]),P.push("]"),P=P.join(""),u.extraText=I.toUpperCase()+": "+P);var T;O(v.hovertext)&&O(v.hovertext[x])?T=v.hovertext[x][_]:O(v.text)&&O(v.text[x])&&(T=v.text[x][_]);var y=m.c2p(f.y0+(x+.5)*v.dy),S=f.x0+(_+.5)*v.dx,M=f.y0+(x+.5)*v.dy,W="["+A.slice(0,v.colormodel.length).join(", ")+"]";return[R.extendFlat(u,{index:[x,_],x0:h.c2p(f.x0+_*v.dx),x1:h.c2p(f.x0+(_+1)*v.dx),y0:y,y1:y,color:F,xVal:S,xLabelVal:S,yVal:M,yLabelVal:M,zLabelVal:W,text:T,hovertemplateLabels:{zLabel:W,colorLabel:P,"color[0]Label":F[0]+k[0],"color[1]Label":F[1]+k[1],"color[2]Label":F[2]+k[2],"color[3]Label":F[3]+k[3]}})]}}}}}),SS=U({"src/traces/image/event_data.js"(pe,le){le.exports=function(R,O){return"xVal"in O&&(R.x=O.xVal),"yVal"in O&&(R.y=O.yVal),O.xa&&(R.xaxis=O.xa),O.ya&&(R.yaxis=O.ya),R.color=O.color,R.colormodel=O.trace.colormodel,R.z||(R.z=O.color),R}}}),bR=U({"src/traces/image/index.js"(pe,le){le.exports={attributes:dw(),supplyDefaults:w_(),calc:A_(),plot:JA(),style:oI(),hoverPoints:f3(),eventData:SS(),moduleType:"trace",name:"image",basePlotModule:Rf(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}}}),AF=U({"lib/image.js"(pe,le){le.exports=bR()}}),TS=U({"src/traces/pie/attributes.js"(pe,le){var w=Jn(),R=oh().attributes,O=Ir(),z=jn(),l=Js().hovertemplateAttrs,u=Js().texttemplateAttrs,c=Ar().extendFlat,p=jl().pattern,f=O({editType:"plot",arrayOk:!0,colorEditType:"plot"});le.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:z.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:p,editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},scalegroup:{valType:"string",dflt:"",editType:"calc"},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc"},hoverinfo:c({},w.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:l({},{keys:["label","color","value","percent","text"]}),texttemplate:u({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:c({},f,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:c({},f,{}),outsidetextfont:c({},f,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:c({},f,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:R({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"}}}}),ES=U({"src/traces/pie/defaults.js"(pe,le){var w=_t(),R=ii(),O=TS(),z=oh().defaults,l=zb().handleText,u=ii().coercePattern;function c(v,h){var m=R.isArrayOrTypedArray(v),_=R.isArrayOrTypedArray(h),x=Math.min(m?v.length:1/0,_?h.length:1/0);if(isFinite(x)||(x=0),x&&_){for(var A,E=0;E<x;E++){var D=h[E];if(w(D)&&D>0){A=!0;break}}A||(x=0)}return{hasLabels:m,hasValues:_,len:x}}function p(v,h,m,_,x){var A=_("marker.line.width");A&&_("marker.line.color",x?void 0:m.paper_bgcolor);var E=_("marker.colors");u(_,"marker.pattern",E),v.marker&&!h.marker.pattern.fgcolor&&(h.marker.pattern.fgcolor=v.marker.colors),h.marker.pattern.bgcolor||(h.marker.pattern.bgcolor=m.paper_bgcolor)}function f(v,h,m,_){function x(M,W){return R.coerce(v,h,O,M,W)}var A=x("labels"),E=x("values"),D=c(A,E),g=D.len;if(h._hasLabels=D.hasLabels,h._hasValues=D.hasValues,!h._hasLabels&&h._hasValues&&(x("label0"),x("dlabel")),!g){h.visible=!1;return}h._length=g,p(v,h,_,x,!0),x("scalegroup");var C=x("text"),I=x("texttemplate"),N;if(I||(N=x("textinfo",R.isArrayOrTypedArray(C)?"text+percent":"percent")),x("hovertext"),x("hovertemplate"),I||N&&N!=="none"){var F=x("textposition");l(v,h,_,x,F,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var k=Array.isArray(F)||F==="auto",P=k||F==="outside";P&&x("automargin"),(F==="inside"||F==="auto"||Array.isArray(F))&&x("insidetextorientation")}else N==="none"&&x("textposition","none");z(h,_,x);var T=x("hole"),y=x("title.text");if(y){var S=x("title.position",T?"middle center":"top center");!T&&S==="middle center"&&(h.title.position="top center"),R.coerceFont(x,"title.font",_.font)}x("sort"),x("direction"),x("rotation"),x("pull")}le.exports={handleLabelsAndValues:c,handleMarkerDefaults:p,supplyDefaults:f}}}),sI=U({"src/traces/pie/layout_attributes.js"(pe,le){le.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),f6=U({"src/traces/pie/layout_defaults.js"(pe,le){var w=ii(),R=sI();le.exports=function(z,l){function u(c,p){return w.coerce(z,l,R,c,p)}u("hiddenlabels"),u("piecolorway",l.colorway),u("extendpiecolors")}}}),QA=U({"src/traces/pie/calc.js"(pe,le){var w=_t(),R=or(),O=Lr(),z={};function l(f,v){var h=[],m=f._fullLayout,_=m.hiddenlabels||[],x=v.labels,A=v.marker.colors||[],E=v.values,D=v._length,g=v._hasValues&&D,C,I;if(v.dlabel)for(x=new Array(D),C=0;C<D;C++)x[C]=String(v.label0+C*v.dlabel);var N={},F=u(m["_"+v.type+"colormap"]),k=0,P=!1;for(C=0;C<D;C++){var T,y,S;if(g){if(T=E[C],!w(T))continue;T=+T}else T=1;y=x[C],(y===void 0||y==="")&&(y=C),y=String(y);var M=N[y];M===void 0?(N[y]=h.length,S=_.indexOf(y)!==-1,S||(k+=T),h.push({v:T,label:y,color:F(A[C],y),i:C,pts:[C],hidden:S})):(P=!0,I=h[M],I.v+=T,I.pts.push(C),I.hidden||(k+=T),I.color===!1&&A[C]&&(I.color=F(A[C],y)))}h=h.filter(function($){return $.v>=0});var W=v.type==="funnelarea"?P:v.sort;return W&&h.sort(function($,Z){return Z.v-$.v}),h[0]&&(h[0].vTotal=k),h}function u(f){return function(h,m){return!h||(h=R(h),!h.isValid())?!1:(h=O.addOpacity(h,h.getAlpha()),f[m]||(f[m]=h),h)}}function c(f,v){var h=(v||{}).type;h||(h="pie");var m=f._fullLayout,_=f.calcdata,x=m[h+"colorway"],A=m["_"+h+"colormap"];m["extend"+h+"colors"]&&(x=p(x,z));for(var E=0,D=0;D<_.length;D++){var g=_[D],C=g[0].trace.type;if(C===h)for(var I=0;I<g.length;I++){var N=g[I];N.color===!1&&(A[N.label]?N.color=A[N.label]:(A[N.label]=N.color=x[E%x.length],E++))}}}function p(f,v){var h,m=JSON.stringify(f),_=v[m];if(!_){for(_=f.slice(),h=0;h<f.length;h++)_.push(R(f[h]).lighten(20).toHexString());for(h=0;h<f.length;h++)_.push(R(f[h]).darken(20).toHexString());v[m]=_}return _}le.exports={calc:l,crossTraceCalc:c,makePullColorFn:u,generateExtendedColors:p}}}),lI=U({"src/traces/pie/event_data.js"(pe,le){var w=v0().appendArrayMultiPointValues;le.exports=function(O,z){var l={curveNumber:z.index,pointNumbers:O.pts,data:z._input,fullData:z,label:O.label,color:O.color,value:O.v,percent:O.percent,text:O.text,bbox:O.bbox,v:O.v};return O.pts.length===1&&(l.pointNumber=l.i=O.pts[0]),w(l,z,O.pts),z.type==="funnelarea"&&(delete l.v,delete l.i),l}}}),uI=U({"src/traces/pie/plot.js"(pe,le){var w=Ze(),R=tp(),O=Dp(),z=Lr(),l=ec(),u=ii(),c=u.strScale,p=u.strTranslate,f=ah(),v=x0(),h=v.recordMinTextSize,m=v.clearMinTextSize,_=th().TEXTPAD,x=dy(),A=lI(),E=ii().isValidTextValue;function D(be,_e){var he=be._context.staticPlot,De=be._fullLayout,xe=De._size;m("pie",De),F(_e,be),fe(_e,xe);var se=u.makeTraceGroups(De._pielayer,_e,"trace").each(function(Ee){var Te=w.select(this),Be=Ee[0],tt=Be.trace;Oe(Ee),Te.attr("stroke-linejoin","round"),Te.each(function(){var at=w.select(this).selectAll("g.slice").data(Ee);at.enter().append("g").classed("slice",!0),at.exit().remove();var gt=[[[],[]],[[],[]]],pt=!1;at.each(function(Ue,xt){if(Ue.hidden){w.select(this).selectAll("path,g").remove();return}Ue.pointNumber=Ue.i,Ue.curveNumber=tt.index,gt[Ue.pxmid[1]<0?0:1][Ue.pxmid[0]<0?0:1].push(Ue);var Gt=Be.cx,Jt=Be.cy,Ut=w.select(this),kr=Ut.selectAll("path.surface").data([Ue]);if(kr.enter().append("path").classed("surface",!0).style({"pointer-events":he?"none":"all"}),Ut.call(C,be,Ee),tt.pull){var Pr=+x.castOption(tt.pull,Ue.pts)||0;Pr>0&&(Gt+=Pr*Ue.pxmid[0],Jt+=Pr*Ue.pxmid[1])}Ue.cxFinal=Gt,Ue.cyFinal=Jt;function $r(mr,St,Ot,Et){var je=Et*(St[0]-mr[0]),Ye=Et*(St[1]-mr[1]);return"a"+Et*Be.r+","+Et*Be.r+" 0 "+Ue.largeArc+(Ot?" 1 ":" 0 ")+je+","+Ye}var rn=tt.hole;if(Ue.v===Be.vTotal){var kn="M"+(Gt+Ue.px0[0])+","+(Jt+Ue.px0[1])+$r(Ue.px0,Ue.pxmid,!0,1)+$r(Ue.pxmid,Ue.px0,!0,1)+"Z";rn?kr.attr("d","M"+(Gt+rn*Ue.px0[0])+","+(Jt+rn*Ue.px0[1])+$r(Ue.px0,Ue.pxmid,!1,rn)+$r(Ue.pxmid,Ue.px0,!1,rn)+"Z"+kn):kr.attr("d",kn)}else{var Rn=$r(Ue.px0,Ue.px1,!0,1);if(rn){var ci=1-rn;kr.attr("d","M"+(Gt+rn*Ue.px1[0])+","+(Jt+rn*Ue.px1[1])+$r(Ue.px1,Ue.px0,!1,rn)+"l"+ci*Ue.px0[0]+","+ci*Ue.px0[1]+Rn+"Z")}else kr.attr("d","M"+Gt+","+Jt+"l"+Ue.px0[0]+","+Ue.px0[1]+Rn+"Z")}Le(be,Ue,Be);var In=x.castOption(tt.textposition,Ue.pts),Gn=Ut.selectAll("g.slicetext").data(Ue.text&&In!=="none"?[0]:[]);Gn.enter().append("g").classed("slicetext",!0),Gn.exit().remove(),Gn.each(function(){var mr=u.ensureSingle(w.select(this),"text","",function(Nt){Nt.attr("data-notex",1)}),St=u.ensureUniformFontSize(be,In==="outside"?I(tt,Ue,De.font):N(tt,Ue,De.font));mr.text(Ue.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(l.font,St).call(f.convertToTspans,be);var Ot=l.bBox(mr.node()),Et;if(In==="outside")Et=Z(Ot,Ue);else if(Et=k(Ot,Ue,Be),In==="auto"&&Et.scale<1){var je=u.ensureUniformFontSize(be,tt.outsidetextfont);mr.call(l.font,je),Ot=l.bBox(mr.node()),Et=Z(Ot,Ue)}var Ye=Et.textPosAngle,et=Ye===void 0?Ue.pxmid:ke(Be.r,Ye);if(Et.targetX=Gt+et[0]*Et.rCenter+(Et.x||0),Et.targetY=Jt+et[1]*Et.rCenter+(Et.y||0),oe(Et,Ot),Et.outside){var mt=Et.targetY;Ue.yLabelMin=mt-Ot.height/2,Ue.yLabelMid=mt,Ue.yLabelMax=mt+Ot.height/2,Ue.labelExtraX=0,Ue.labelExtraY=0,pt=!0}Et.fontSize=St.size,h(tt.type,Et,De),Ee[xt].transform=Et,u.setTransormAndDisplay(mr,Et)})});var Rt=w.select(this).selectAll("g.titletext").data(tt.title.text?[0]:[]);if(Rt.enter().append("g").classed("titletext",!0),Rt.exit().remove(),Rt.each(function(){var Ue=u.ensureSingle(w.select(this),"text","",function(Jt){Jt.attr("data-notex",1)}),xt=tt.title.text;tt._meta&&(xt=u.templateString(xt,tt._meta)),Ue.text(xt).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(l.font,tt.title.font).call(f.convertToTspans,be);var Gt;tt.title.position==="middle center"?Gt=K(Be):Gt=Q(Be,xe),Ue.attr("transform",p(Gt.x,Gt.y)+c(Math.min(1,Gt.scale))+p(Gt.tx,Gt.ty))}),pt&&re(gt,tt),g(at,tt),pt&&tt.automargin){var $t=l.bBox(Te.node()),Wt=tt.domain,Ht=xe.w*(Wt.x[1]-Wt.x[0]),Ft=xe.h*(Wt.y[1]-Wt.y[0]),st=(.5*Ht-Be.r)/xe.w,rt=(.5*Ft-Be.r)/xe.h;R.autoMargin(be,"pie."+tt.uid+".automargin",{xl:Wt.x[0]-st,xr:Wt.x[1]+st,yb:Wt.y[0]-rt,yt:Wt.y[1]+rt,l:Math.max(Be.cx-Be.r-$t.left,0),r:Math.max($t.right-(Be.cx+Be.r),0),b:Math.max($t.bottom-(Be.cy+Be.r),0),t:Math.max(Be.cy-Be.r-$t.top,0),pad:5})}})});setTimeout(function(){se.selectAll("tspan").each(function(){var Ee=w.select(this);Ee.attr("dy")&&Ee.attr("dy",Ee.attr("dy"))})},0)}function g(be,_e){be.each(function(he){var De=w.select(this);if(!he.labelExtraX&&!he.labelExtraY){De.select("path.textline").remove();return}var xe=De.select("g.slicetext text");he.transform.targetX+=he.labelExtraX,he.transform.targetY+=he.labelExtraY,u.setTransormAndDisplay(xe,he.transform);var se=he.cxFinal+he.pxmid[0],Ee=he.cyFinal+he.pxmid[1],Te="M"+se+","+Ee,Be=(he.yLabelMax-he.yLabelMin)*(he.pxmid[0]<0?-1:1)/4;if(he.labelExtraX){var tt=he.labelExtraX*he.pxmid[1]/he.pxmid[0],at=he.yLabelMid+he.labelExtraY-(he.cyFinal+he.pxmid[1]);Math.abs(tt)>Math.abs(at)?Te+="l"+at*he.pxmid[0]/he.pxmid[1]+","+at+"H"+(se+he.labelExtraX+Be):Te+="l"+he.labelExtraX+","+tt+"v"+(at-tt)+"h"+Be}else Te+="V"+(he.yLabelMid+he.labelExtraY)+"h"+Be;u.ensureSingle(De,"path","textline").call(z.stroke,_e.outsidetextfont.color).attr({"stroke-width":Math.min(2,_e.outsidetextfont.size/8),d:Te,fill:"none"})})}function C(be,_e,he){var De=he[0],xe=De.cx,se=De.cy,Ee=De.trace,Te=Ee.type==="funnelarea";"_hasHoverLabel"in Ee||(Ee._hasHoverLabel=!1),"_hasHoverEvent"in Ee||(Ee._hasHoverEvent=!1),be.on("mouseover",function(Be){var tt=_e._fullLayout,at=_e._fullData[Ee.index];if(!(_e._dragging||tt.hovermode===!1)){var gt=at.hoverinfo;if(Array.isArray(gt)&&(gt=O.castHoverinfo({hoverinfo:[x.castOption(gt,Be.pts)],_module:Ee._module},tt,0)),gt==="all"&&(gt="label+text+value+percent+name"),at.hovertemplate||gt!=="none"&&gt!=="skip"&&gt){var pt=Be.rInscribed||0,Rt=xe+Be.pxmid[0]*(1-pt),$t=se+Be.pxmid[1]*(1-pt),Wt=tt.separators,Ht=[];if(gt&&gt.indexOf("label")!==-1&&Ht.push(Be.label),Be.text=x.castOption(at.hovertext||at.text,Be.pts),gt&&gt.indexOf("text")!==-1){var Ft=Be.text;u.isValidTextValue(Ft)&&Ht.push(Ft)}Be.value=Be.v,Be.valueLabel=x.formatPieValue(Be.v,Wt),gt&&gt.indexOf("value")!==-1&&Ht.push(Be.valueLabel),Be.percent=Be.v/De.vTotal,Be.percentLabel=x.formatPiePercent(Be.percent,Wt),gt&&gt.indexOf("percent")!==-1&&Ht.push(Be.percentLabel);var st=at.hoverlabel,rt=st.font,Ue=[];O.loneHover({trace:Ee,x0:Rt-pt*De.r,x1:Rt+pt*De.r,y:$t,_x0:Te?xe+Be.TL[0]:Rt-pt*De.r,_x1:Te?xe+Be.TR[0]:Rt+pt*De.r,_y0:Te?se+Be.TL[1]:$t-pt*De.r,_y1:Te?se+Be.BL[1]:$t+pt*De.r,text:Ht.join("<br>"),name:at.hovertemplate||gt.indexOf("name")!==-1?at.name:void 0,idealAlign:Be.pxmid[0]<0?"left":"right",color:x.castOption(st.bgcolor,Be.pts)||Be.color,borderColor:x.castOption(st.bordercolor,Be.pts),fontFamily:x.castOption(rt.family,Be.pts),fontSize:x.castOption(rt.size,Be.pts),fontColor:x.castOption(rt.color,Be.pts),nameLength:x.castOption(st.namelength,Be.pts),textAlign:x.castOption(st.align,Be.pts),hovertemplate:x.castOption(at.hovertemplate,Be.pts),hovertemplateLabels:Be,eventData:[A(Be,at)]},{container:tt._hoverlayer.node(),outerContainer:tt._paper.node(),gd:_e,inOut_bbox:Ue}),Be.bbox=Ue[0],Ee._hasHoverLabel=!0}Ee._hasHoverEvent=!0,_e.emit("plotly_hover",{points:[A(Be,at)],event:w.event})}}),be.on("mouseout",function(Be){var tt=_e._fullLayout,at=_e._fullData[Ee.index],gt=w.select(this).datum();Ee._hasHoverEvent&&(Be.originalEvent=w.event,_e.emit("plotly_unhover",{points:[A(gt,at)],event:w.event}),Ee._hasHoverEvent=!1),Ee._hasHoverLabel&&(O.loneUnhover(tt._hoverlayer.node()),Ee._hasHoverLabel=!1)}),be.on("click",function(Be){var tt=_e._fullLayout,at=_e._fullData[Ee.index];_e._dragging||tt.hovermode===!1||(_e._hoverdata=[A(Be,at)],O.click(_e,w.event))})}function I(be,_e,he){var De=x.castOption(be.outsidetextfont.color,_e.pts)||x.castOption(be.textfont.color,_e.pts)||he.color,xe=x.castOption(be.outsidetextfont.family,_e.pts)||x.castOption(be.textfont.family,_e.pts)||he.family,se=x.castOption(be.outsidetextfont.size,_e.pts)||x.castOption(be.textfont.size,_e.pts)||he.size,Ee=x.castOption(be.outsidetextfont.weight,_e.pts)||x.castOption(be.textfont.weight,_e.pts)||he.weight,Te=x.castOption(be.outsidetextfont.style,_e.pts)||x.castOption(be.textfont.style,_e.pts)||he.style,Be=x.castOption(be.outsidetextfont.variant,_e.pts)||x.castOption(be.textfont.variant,_e.pts)||he.variant,tt=x.castOption(be.outsidetextfont.textcase,_e.pts)||x.castOption(be.textfont.textcase,_e.pts)||he.textcase,at=x.castOption(be.outsidetextfont.lineposition,_e.pts)||x.castOption(be.textfont.lineposition,_e.pts)||he.lineposition,gt=x.castOption(be.outsidetextfont.shadow,_e.pts)||x.castOption(be.textfont.shadow,_e.pts)||he.shadow;return{color:De,family:xe,size:se,weight:Ee,style:Te,variant:Be,textcase:tt,lineposition:at,shadow:gt}}function N(be,_e,he){var De=x.castOption(be.insidetextfont.color,_e.pts);!De&&be._input.textfont&&(De=x.castOption(be._input.textfont.color,_e.pts));var xe=x.castOption(be.insidetextfont.family,_e.pts)||x.castOption(be.textfont.family,_e.pts)||he.family,se=x.castOption(be.insidetextfont.size,_e.pts)||x.castOption(be.textfont.size,_e.pts)||he.size,Ee=x.castOption(be.insidetextfont.weight,_e.pts)||x.castOption(be.textfont.weight,_e.pts)||he.weight,Te=x.castOption(be.insidetextfont.style,_e.pts)||x.castOption(be.textfont.style,_e.pts)||he.style,Be=x.castOption(be.insidetextfont.variant,_e.pts)||x.castOption(be.textfont.variant,_e.pts)||he.variant,tt=x.castOption(be.insidetextfont.textcase,_e.pts)||x.castOption(be.textfont.textcase,_e.pts)||he.textcase,at=x.castOption(be.insidetextfont.lineposition,_e.pts)||x.castOption(be.textfont.lineposition,_e.pts)||he.lineposition,gt=x.castOption(be.insidetextfont.shadow,_e.pts)||x.castOption(be.textfont.shadow,_e.pts)||he.shadow;return{color:De||z.contrast(_e.color),family:xe,size:se,weight:Ee,style:Te,variant:Be,textcase:tt,lineposition:at,shadow:gt}}function F(be,_e){for(var he,De,xe=0;xe<be.length;xe++)if(he=be[xe][0],De=he.trace,De.title.text){var se=De.title.text;De._meta&&(se=u.templateString(se,De._meta));var Ee=l.tester.append("text").attr("data-notex",1).text(se).call(l.font,De.title.font).call(f.convertToTspans,_e),Te=l.bBox(Ee.node(),!0);he.titleBox={width:Te.width,height:Te.height},Ee.remove()}}function k(be,_e,he){var De=he.r||_e.rpx1,xe=_e.rInscribed,se=_e.startangle===_e.stopangle;if(se)return{rCenter:1-xe,scale:0,rotate:0,textPosAngle:0};var Ee=_e.ring,Te=Ee===1&&Math.abs(_e.startangle-_e.stopangle)===Math.PI*2,Be=_e.halfangle,tt=_e.midangle,at=he.trace.insidetextorientation,gt=at==="horizontal",pt=at==="tangential",Rt=at==="radial",$t=at==="auto",Wt=[],Ht;if(!$t){var Ft=function(Ut,kr){if(P(_e,Ut)){var Pr=Math.abs(Ut-_e.startangle),$r=Math.abs(Ut-_e.stopangle),rn=Pr<$r?Pr:$r;kr==="tan"?Ht=y(be,De,Ee,rn,0):Ht=T(be,De,Ee,rn,Math.PI/2),Ht.textPosAngle=Ut,Wt.push(Ht)}},st;if(gt||pt){for(st=4;st>=-4;st-=2)Ft(Math.PI*st,"tan");for(st=4;st>=-4;st-=2)Ft(Math.PI*(st+1),"tan")}if(gt||Rt){for(st=4;st>=-4;st-=2)Ft(Math.PI*(st+1.5),"rad");for(st=4;st>=-4;st-=2)Ft(Math.PI*(st+.5),"rad")}}if(Te||$t||gt){var rt=Math.sqrt(be.width*be.width+be.height*be.height);if(Ht={scale:xe*De*2/rt,rCenter:1-xe,rotate:0},Ht.textPosAngle=(_e.startangle+_e.stopangle)/2,Ht.scale>=1)return Ht;Wt.push(Ht)}($t||Rt)&&(Ht=T(be,De,Ee,Be,tt),Ht.textPosAngle=(_e.startangle+_e.stopangle)/2,Wt.push(Ht)),($t||pt)&&(Ht=y(be,De,Ee,Be,tt),Ht.textPosAngle=(_e.startangle+_e.stopangle)/2,Wt.push(Ht));for(var Ue=0,xt=0,Gt=0;Gt<Wt.length;Gt++){var Jt=Wt[Gt].scale;if(xt<Jt&&(xt=Jt,Ue=Gt),!$t&&xt>=1)break}return Wt[Ue]}function P(be,_e){var he=be.startangle,De=be.stopangle;return he>_e&&_e>De||he<_e&&_e<De}function T(be,_e,he,De,xe){_e=Math.max(0,_e-2*_);var se=be.width/be.height,Ee=W(se,De,_e,he);return{scale:Ee*2/be.height,rCenter:S(se,Ee/_e),rotate:M(xe)}}function y(be,_e,he,De,xe){_e=Math.max(0,_e-2*_);var se=be.height/be.width,Ee=W(se,De,_e,he);return{scale:Ee*2/be.width,rCenter:S(se,Ee/_e),rotate:M(xe+Math.PI/2)}}function S(be,_e){return Math.cos(_e)-be*_e}function M(be){return(180/Math.PI*be+720)%180-90}function W(be,_e,he,De){var xe=be+1/(2*Math.tan(_e));return he*Math.min(1/(Math.sqrt(xe*xe+.5)+xe),De/(Math.sqrt(be*be+De/2)+be))}function $(be,_e){return be.v===_e.vTotal&&!_e.trace.hole?1:Math.min(1/(1+1/Math.sin(be.halfangle)),be.ring/2)}function Z(be,_e){var he=_e.pxmid[0],De=_e.pxmid[1],xe=be.width/2,se=be.height/2;return he<0&&(xe*=-1),De<0&&(se*=-1),{scale:1,rCenter:1,rotate:0,x:xe+Math.abs(se)*(xe>0?1:-1)/2,y:se/(1+he*he/(De*De)),outside:!0}}function K(be){var _e=Math.sqrt(be.titleBox.width*be.titleBox.width+be.titleBox.height*be.titleBox.height);return{x:be.cx,y:be.cy,scale:be.trace.hole*be.r*2/_e,tx:0,ty:-be.titleBox.height/2+be.trace.title.font.size}}function Q(be,_e){var he=1,De=1,xe,se=be.trace,Ee={x:be.cx,y:be.cy},Te={tx:0,ty:0};Te.ty+=se.title.font.size,xe=ee(se),se.title.position.indexOf("top")!==-1?(Ee.y-=(1+xe)*be.r,Te.ty-=be.titleBox.height):se.title.position.indexOf("bottom")!==-1&&(Ee.y+=(1+xe)*be.r);var Be=J(be.r,be.trace.aspectratio),tt=_e.w*(se.domain.x[1]-se.domain.x[0])/2;return se.title.position.indexOf("left")!==-1?(tt=tt+Be,Ee.x-=(1+xe)*Be,Te.tx+=be.titleBox.width/2):se.title.position.indexOf("center")!==-1?tt*=2:se.title.position.indexOf("right")!==-1&&(tt=tt+Be,Ee.x+=(1+xe)*Be,Te.tx-=be.titleBox.width/2),he=tt/be.titleBox.width,De=G(be,_e)/be.titleBox.height,{x:Ee.x,y:Ee.y,scale:Math.min(he,De),tx:Te.tx,ty:Te.ty}}function J(be,_e){return be/(_e===void 0?1:_e)}function G(be,_e){var he=be.trace,De=_e.h*(he.domain.y[1]-he.domain.y[0]);return Math.min(be.titleBox.height,De/2)}function ee(be){var _e=be.pull;if(!_e)return 0;var he;if(u.isArrayOrTypedArray(_e))for(_e=0,he=0;he<be.pull.length;he++)be.pull[he]>_e&&(_e=be.pull[he]);return _e}function re(be,_e){var he,De,xe,se,Ee,Te,Be,tt,at,gt,pt,Rt,$t;function Wt(rt,Ue){return rt.pxmid[1]-Ue.pxmid[1]}function Ht(rt,Ue){return Ue.pxmid[1]-rt.pxmid[1]}function Ft(rt,Ue){Ue||(Ue={});var xt=Ue.labelExtraY+(De?Ue.yLabelMax:Ue.yLabelMin),Gt=De?rt.yLabelMin:rt.yLabelMax,Jt=De?rt.yLabelMax:rt.yLabelMin,Ut=rt.cyFinal+Ee(rt.px0[1],rt.px1[1]),kr=xt-Gt,Pr,$r,rn,kn,Rn,ci;if(kr*Be>0&&(rt.labelExtraY=kr),!!u.isArrayOrTypedArray(_e.pull))for($r=0;$r<gt.length;$r++)rn=gt[$r],!(rn===rt||(x.castOption(_e.pull,rt.pts)||0)>=(x.castOption(_e.pull,rn.pts)||0))&&((rt.pxmid[1]-rn.pxmid[1])*Be>0?(kn=rn.cyFinal+Ee(rn.px0[1],rn.px1[1]),kr=kn-Gt-rt.labelExtraY,kr*Be>0&&(rt.labelExtraY+=kr)):(Jt+rt.labelExtraY-Ut)*Be>0&&(Pr=3*Te*Math.abs($r-gt.indexOf(rt)),Rn=rn.cxFinal+se(rn.px0[0],rn.px1[0]),ci=Rn+Pr-(rt.cxFinal+rt.pxmid[0])-rt.labelExtraX,ci*Te>0&&(rt.labelExtraX+=ci)))}for(De=0;De<2;De++)for(xe=De?Wt:Ht,Ee=De?Math.max:Math.min,Be=De?1:-1,he=0;he<2;he++){for(se=he?Math.max:Math.min,Te=he?1:-1,tt=be[De][he],tt.sort(xe),at=be[1-De][he],gt=at.concat(tt),Rt=[],pt=0;pt<tt.length;pt++)tt[pt].yLabelMid!==void 0&&Rt.push(tt[pt]);for($t=!1,pt=0;De&&pt<at.length;pt++)if(at[pt].yLabelMid!==void 0){$t=at[pt];break}for(pt=0;pt<Rt.length;pt++){var st=pt&&Rt[pt-1];$t&&!pt&&(st=$t),Ft(Rt[pt],st)}}}function fe(be,_e){for(var he=[],De=0;De<be.length;De++){var xe=be[De][0],se=xe.trace,Ee=se.domain,Te=_e.w*(Ee.x[1]-Ee.x[0]),Be=_e.h*(Ee.y[1]-Ee.y[0]);se.title.text&&se.title.position!=="middle center"&&(Be-=G(xe,_e));var tt=Te/2,at=Be/2;se.type==="funnelarea"&&!se.scalegroup&&(at/=se.aspectratio),xe.r=Math.min(tt,at)/(1+ee(se)),xe.cx=_e.l+_e.w*(se.domain.x[1]+se.domain.x[0])/2,xe.cy=_e.t+_e.h*(1-se.domain.y[0])-Be/2,se.title.text&&se.title.position.indexOf("bottom")!==-1&&(xe.cy-=G(xe,_e)),se.scalegroup&&he.indexOf(se.scalegroup)===-1&&he.push(se.scalegroup)}we(be,he)}function we(be,_e){for(var he,De,xe,se=0;se<_e.length;se++){var Ee=1/0,Te=_e[se];for(De=0;De<be.length;De++)if(he=be[De][0],xe=he.trace,xe.scalegroup===Te){var Be;if(xe.type==="pie")Be=he.r*he.r;else if(xe.type==="funnelarea"){var tt,at;xe.aspectratio>1?(tt=he.r,at=tt/xe.aspectratio):(at=he.r,tt=at*xe.aspectratio),tt*=(1+xe.baseratio)/2,Be=tt*at}Ee=Math.min(Ee,Be/he.vTotal)}for(De=0;De<be.length;De++)if(he=be[De][0],xe=he.trace,xe.scalegroup===Te){var gt=Ee*he.vTotal;xe.type==="funnelarea"&&(gt/=(1+xe.baseratio)/2,gt/=xe.aspectratio),he.r=Math.sqrt(gt)}}}function Oe(be){var _e=be[0],he=_e.r,De=_e.trace,xe=x.getRotationAngle(De.rotation),se=2*Math.PI/_e.vTotal,Ee="px0",Te="px1",Be,tt,at;if(De.direction==="counterclockwise"){for(Be=0;Be<be.length&&be[Be].hidden;Be++);if(Be===be.length)return;xe+=se*be[Be].v,se*=-1,Ee="px1",Te="px0"}for(at=ke(he,xe),Be=0;Be<be.length;Be++)tt=be[Be],!tt.hidden&&(tt[Ee]=at,tt.startangle=xe,xe+=se*tt.v/2,tt.pxmid=ke(he,xe),tt.midangle=xe,xe+=se*tt.v/2,at=ke(he,xe),tt.stopangle=xe,tt[Te]=at,tt.largeArc=tt.v>_e.vTotal/2?1:0,tt.halfangle=Math.PI*Math.min(tt.v/_e.vTotal,.5),tt.ring=1-De.hole,tt.rInscribed=$(tt,_e))}function ke(be,_e){return[be*Math.sin(_e),-be*Math.cos(_e)]}function Le(be,_e,he){var De=be._fullLayout,xe=he.trace,se=xe.texttemplate,Ee=xe.textinfo;if(!se&&Ee&&Ee!=="none"){var Te=Ee.split("+"),Be=function(Ue){return Te.indexOf(Ue)!==-1},tt=Be("label"),at=Be("text"),gt=Be("value"),pt=Be("percent"),Rt=De.separators,$t;if($t=tt?[_e.label]:[],at){var Wt=x.getFirstFilled(xe.text,_e.pts);E(Wt)&&$t.push(Wt)}gt&&$t.push(x.formatPieValue(_e.v,Rt)),pt&&$t.push(x.formatPiePercent(_e.v/he.vTotal,Rt)),_e.text=$t.join("<br>")}function Ht(Ue){return{label:Ue.label,value:Ue.v,valueLabel:x.formatPieValue(Ue.v,De.separators),percent:Ue.v/he.vTotal,percentLabel:x.formatPiePercent(Ue.v/he.vTotal,De.separators),color:Ue.color,text:Ue.text,customdata:u.castOption(xe,Ue.i,"customdata")}}if(se){var Ft=u.castOption(xe,_e.i,"texttemplate");if(!Ft)_e.text="";else{var st=Ht(_e),rt=x.getFirstFilled(xe.text,_e.pts);(E(rt)||rt==="")&&(st.text=rt),_e.text=u.texttemplateString(Ft,st,be._fullLayout._d3locale,st,xe._meta||{})}}}function oe(be,_e){var he=be.rotate*Math.PI/180,De=Math.cos(he),xe=Math.sin(he),se=(_e.left+_e.right)/2,Ee=(_e.top+_e.bottom)/2;be.textX=se*De-Ee*xe,be.textY=se*xe+Ee*De,be.noCenter=!0}le.exports={plot:D,formatSliceLabel:Le,transformInsideText:k,determineInsideTextFont:N,positionTitleOutside:Q,prerenderTitles:F,layoutAreas:fe,attachFxHandlers:C,computeTransform:oe}}}),d6=U({"src/traces/pie/style.js"(pe,le){var w=Ze(),R=aT(),O=x0().resizeText;le.exports=function(l){var u=l._fullLayout._pielayer.selectAll(".trace");O(l,u,"pie"),u.each(function(c){var p=c[0],f=p.trace,v=w.select(this);v.style({opacity:f.opacity}),v.selectAll("path.surface").each(function(h){w.select(this).call(R,h,f,l)})})}}}),CF=U({"src/traces/pie/base_plot.js"(pe){var le=tp();pe.name="pie",pe.plot=function(w,R,O,z){le.plotBasePlot(pe.name,w,R,O,z)},pe.clean=function(w,R,O,z){le.cleanBasePlot(pe.name,w,R,O,z)}}}),A4=U({"src/traces/pie/index.js"(pe,le){le.exports={attributes:TS(),supplyDefaults:ES().supplyDefaults,supplyLayoutDefaults:f6(),layoutAttributes:sI(),calc:QA().calc,crossTraceCalc:QA().crossTraceCalc,plot:uI().plot,style:d6(),styleOne:aT(),moduleType:"trace",name:"pie",basePlotModule:CF(),categories:["pie-like","pie","showLegend"],meta:{}}}}),C4=U({"lib/pie.js"(pe,le){le.exports=A4()}}),MF=U({"src/traces/sunburst/base_plot.js"(pe){var le=tp();pe.name="sunburst",pe.plot=function(w,R,O,z){le.plotBasePlot(pe.name,w,R,O,z)},pe.clean=function(w,R,O,z){le.cleanBasePlot(pe.name,w,R,O,z)}}}),h6=U({"src/traces/sunburst/constants.js"(pe,le){le.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}}}),d3=U({"src/traces/sunburst/attributes.js"(pe,le){var w=Jn(),R=Js().hovertemplateAttrs,O=Js().texttemplateAttrs,z=Jd(),l=oh().attributes,u=TS(),c=h6(),p=Ar().extendFlat,f=jl().pattern;le.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:p({colors:{valType:"data_array",editType:"calc"},line:{color:p({},u.marker.line.color,{dflt:null}),width:p({},u.marker.line.width,{dflt:1}),editType:"calc"},pattern:f,editType:"calc"},z("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:u.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:O({editType:"plot"},{keys:c.eventDataKeys.concat(["label","value"])}),hovertext:u.hovertext,hoverinfo:p({},w.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:R({},{keys:c.eventDataKeys}),textfont:u.textfont,insidetextorientation:u.insidetextorientation,insidetextfont:u.insidetextfont,outsidetextfont:p({},u.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:u.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:l({name:"sunburst",trace:!0,editType:"calc"})}}}),p6=U({"src/traces/sunburst/layout_attributes.js"(pe,le){le.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),v6=U({"src/traces/sunburst/defaults.js"(pe,le){var w=ii(),R=d3(),O=oh().defaults,z=zb().handleText,l=ES().handleMarkerDefaults,u=vd(),c=u.hasColorscale,p=u.handleDefaults;le.exports=function(v,h,m,_){function x(N,F){return w.coerce(v,h,R,N,F)}var A=x("labels"),E=x("parents");if(!A||!A.length||!E||!E.length){h.visible=!1;return}var D=x("values");D&&D.length?x("branchvalues"):x("count"),x("level"),x("maxdepth"),l(v,h,_,x);var g=h._hasColorscale=c(v,"marker","colors")||(v.marker||{}).coloraxis;g&&p(v,h,_,x,{prefix:"marker.",cLetter:"c"}),x("leaf.opacity",g?1:.7);var C=x("text");x("texttemplate"),h.texttemplate||x("textinfo",w.isArrayOrTypedArray(C)?"text+label":"label"),x("hovertext"),x("hovertemplate");var I="auto";z(v,h,_,x,I,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),x("insidetextorientation"),x("sort"),x("rotation"),x("root.color"),O(h,_,x),h._length=null}}}),Uh=U({"src/traces/sunburst/layout_defaults.js"(pe,le){var w=ii(),R=p6();le.exports=function(z,l){function u(c,p){return w.coerce(z,l,R,c,p)}u("sunburstcolorway",l.colorway),u("extendsunburstcolors")}}}),OM=U({"node_modules/d3-hierarchy/dist/d3-hierarchy.js"(pe,le){(function(w,R){typeof pe=="object"&&typeof le<"u"?R(pe):(w=w||self,R(w.d3=w.d3||{}))})(pe,function(w){function R(Et,je){return Et.parent===je.parent?1:2}function O(Et){return Et.reduce(z,0)/Et.length}function z(Et,je){return Et+je.x}function l(Et){return 1+Et.reduce(u,0)}function u(Et,je){return Math.max(Et,je.y)}function c(Et){for(var je;je=Et.children;)Et=je[0];return Et}function p(Et){for(var je;je=Et.children;)Et=je[je.length-1];return Et}function f(){var Et=R,je=1,Ye=1,et=!1;function mt(Nt){var lr,br=0;Nt.eachAfter(function(on){var Nn=on.children;Nn?(on.x=O(Nn),on.y=l(Nn)):(on.x=lr?br+=Et(on,lr):0,on.y=0,lr=on)});var Or=c(Nt),tn=p(Nt),Jr=Or.x-Et(Or,tn)/2,dn=tn.x+Et(tn,Or)/2;return Nt.eachAfter(et?function(on){on.x=(on.x-Nt.x)*je,on.y=(Nt.y-on.y)*Ye}:function(on){on.x=(on.x-Jr)/(dn-Jr)*je,on.y=(1-(Nt.y?on.y/Nt.y:1))*Ye})}return mt.separation=function(Nt){return arguments.length?(Et=Nt,mt):Et},mt.size=function(Nt){return arguments.length?(et=!1,je=+Nt[0],Ye=+Nt[1],mt):et?null:[je,Ye]},mt.nodeSize=function(Nt){return arguments.length?(et=!0,je=+Nt[0],Ye=+Nt[1],mt):et?[je,Ye]:null},mt}function v(Et){var je=0,Ye=Et.children,et=Ye&&Ye.length;if(!et)je=1;else for(;--et>=0;)je+=Ye[et].value;Et.value=je}function h(){return this.eachAfter(v)}function m(Et){var je=this,Ye,et=[je],mt,Nt,lr;do for(Ye=et.reverse(),et=[];je=Ye.pop();)if(Et(je),mt=je.children,mt)for(Nt=0,lr=mt.length;Nt<lr;++Nt)et.push(mt[Nt]);while(et.length);return this}function _(Et){for(var je=this,Ye=[je],et,mt;je=Ye.pop();)if(Et(je),et=je.children,et)for(mt=et.length-1;mt>=0;--mt)Ye.push(et[mt]);return this}function x(Et){for(var je=this,Ye=[je],et=[],mt,Nt,lr;je=Ye.pop();)if(et.push(je),mt=je.children,mt)for(Nt=0,lr=mt.length;Nt<lr;++Nt)Ye.push(mt[Nt]);for(;je=et.pop();)Et(je);return this}function A(Et){return this.eachAfter(function(je){for(var Ye=+Et(je.data)||0,et=je.children,mt=et&&et.length;--mt>=0;)Ye+=et[mt].value;je.value=Ye})}function E(Et){return this.eachBefore(function(je){je.children&&je.children.sort(Et)})}function D(Et){for(var je=this,Ye=g(je,Et),et=[je];je!==Ye;)je=je.parent,et.push(je);for(var mt=et.length;Et!==Ye;)et.splice(mt,0,Et),Et=Et.parent;return et}function g(Et,je){if(Et===je)return Et;var Ye=Et.ancestors(),et=je.ancestors(),mt=null;for(Et=Ye.pop(),je=et.pop();Et===je;)mt=Et,Et=Ye.pop(),je=et.pop();return mt}function C(){for(var Et=this,je=[Et];Et=Et.parent;)je.push(Et);return je}function I(){var Et=[];return this.each(function(je){Et.push(je)}),Et}function N(){var Et=[];return this.eachBefore(function(je){je.children||Et.push(je)}),Et}function F(){var Et=this,je=[];return Et.each(function(Ye){Ye!==Et&&je.push({source:Ye.parent,target:Ye})}),je}function k(Et,je){var Ye=new M(Et),et=+Et.value&&(Ye.value=Et.value),mt,Nt=[Ye],lr,br,Or,tn;for(je==null&&(je=T);mt=Nt.pop();)if(et&&(mt.value=+mt.data.value),(br=je(mt.data))&&(tn=br.length))for(mt.children=new Array(tn),Or=tn-1;Or>=0;--Or)Nt.push(lr=mt.children[Or]=new M(br[Or])),lr.parent=mt,lr.depth=mt.depth+1;return Ye.eachBefore(S)}function P(){return k(this).eachBefore(y)}function T(Et){return Et.children}function y(Et){Et.data=Et.data.data}function S(Et){var je=0;do Et.height=je;while((Et=Et.parent)&&Et.height<++je)}function M(Et){this.data=Et,this.depth=this.height=0,this.parent=null}M.prototype=k.prototype={constructor:M,count:h,each:m,eachAfter:x,eachBefore:_,sum:A,sort:E,path:D,ancestors:C,descendants:I,leaves:N,links:F,copy:P};var W=Array.prototype.slice;function $(Et){for(var je=Et.length,Ye,et;je;)et=Math.random()*je--|0,Ye=Et[je],Et[je]=Et[et],Et[et]=Ye;return Et}function Z(Et){for(var je=0,Ye=(Et=$(W.call(Et))).length,et=[],mt,Nt;je<Ye;)mt=Et[je],Nt&&J(Nt,mt)?++je:(Nt=ee(et=K(et,mt)),je=0);return Nt}function K(Et,je){var Ye,et;if(G(je,Et))return[je];for(Ye=0;Ye<Et.length;++Ye)if(Q(je,Et[Ye])&&G(fe(Et[Ye],je),Et))return[Et[Ye],je];for(Ye=0;Ye<Et.length-1;++Ye)for(et=Ye+1;et<Et.length;++et)if(Q(fe(Et[Ye],Et[et]),je)&&Q(fe(Et[Ye],je),Et[et])&&Q(fe(Et[et],je),Et[Ye])&&G(we(Et[Ye],Et[et],je),Et))return[Et[Ye],Et[et],je];throw new Error}function Q(Et,je){var Ye=Et.r-je.r,et=je.x-Et.x,mt=je.y-Et.y;return Ye<0||Ye*Ye<et*et+mt*mt}function J(Et,je){var Ye=Et.r-je.r+1e-6,et=je.x-Et.x,mt=je.y-Et.y;return Ye>0&&Ye*Ye>et*et+mt*mt}function G(Et,je){for(var Ye=0;Ye<je.length;++Ye)if(!J(Et,je[Ye]))return!1;return!0}function ee(Et){switch(Et.length){case 1:return re(Et[0]);case 2:return fe(Et[0],Et[1]);case 3:return we(Et[0],Et[1],Et[2])}}function re(Et){return{x:Et.x,y:Et.y,r:Et.r}}function fe(Et,je){var Ye=Et.x,et=Et.y,mt=Et.r,Nt=je.x,lr=je.y,br=je.r,Or=Nt-Ye,tn=lr-et,Jr=br-mt,dn=Math.sqrt(Or*Or+tn*tn);return{x:(Ye+Nt+Or/dn*Jr)/2,y:(et+lr+tn/dn*Jr)/2,r:(dn+mt+br)/2}}function we(Et,je,Ye){var et=Et.x,mt=Et.y,Nt=Et.r,lr=je.x,br=je.y,Or=je.r,tn=Ye.x,Jr=Ye.y,dn=Ye.r,on=et-lr,Nn=et-tn,Wi=mt-br,Oa=mt-Jr,Da=Or-Nt,Aa=dn-Nt,Ka=et*et+mt*mt-Nt*Nt,Sa=Ka-lr*lr-br*br+Or*Or,no=Ka-tn*tn-Jr*Jr+dn*dn,Fo=Nn*Wi-on*Oa,an=(Wi*no-Oa*Sa)/(Fo*2)-et,Hr=(Oa*Da-Wi*Aa)/Fo,nn=(Nn*Sa-on*no)/(Fo*2)-mt,Kr=(on*Aa-Nn*Da)/Fo,$n=Hr*Hr+Kr*Kr-1,Ai=2*(Nt+an*Hr+nn*Kr),aa=an*an+nn*nn-Nt*Nt,Ci=-($n?(Ai+Math.sqrt(Ai*Ai-4*$n*aa))/(2*$n):aa/Ai);return{x:et+an+Hr*Ci,y:mt+nn+Kr*Ci,r:Ci}}function Oe(Et,je,Ye){var et=Et.x-je.x,mt,Nt,lr=Et.y-je.y,br,Or,tn=et*et+lr*lr;tn?(Nt=je.r+Ye.r,Nt*=Nt,Or=Et.r+Ye.r,Or*=Or,Nt>Or?(mt=(tn+Or-Nt)/(2*tn),br=Math.sqrt(Math.max(0,Or/tn-mt*mt)),Ye.x=Et.x-mt*et-br*lr,Ye.y=Et.y-mt*lr+br*et):(mt=(tn+Nt-Or)/(2*tn),br=Math.sqrt(Math.max(0,Nt/tn-mt*mt)),Ye.x=je.x+mt*et-br*lr,Ye.y=je.y+mt*lr+br*et)):(Ye.x=je.x+Ye.r,Ye.y=je.y)}function ke(Et,je){var Ye=Et.r+je.r-1e-6,et=je.x-Et.x,mt=je.y-Et.y;return Ye>0&&Ye*Ye>et*et+mt*mt}function Le(Et){var je=Et._,Ye=Et.next._,et=je.r+Ye.r,mt=(je.x*Ye.r+Ye.x*je.r)/et,Nt=(je.y*Ye.r+Ye.y*je.r)/et;return mt*mt+Nt*Nt}function oe(Et){this._=Et,this.next=null,this.previous=null}function be(Et){if(!(mt=Et.length))return 0;var je,Ye,et,mt,Nt,lr,br,Or,tn,Jr,dn;if(je=Et[0],je.x=0,je.y=0,!(mt>1))return je.r;if(Ye=Et[1],je.x=-Ye.r,Ye.x=je.r,Ye.y=0,!(mt>2))return je.r+Ye.r;Oe(Ye,je,et=Et[2]),je=new oe(je),Ye=new oe(Ye),et=new oe(et),je.next=et.previous=Ye,Ye.next=je.previous=et,et.next=Ye.previous=je;e:for(br=3;br<mt;++br){Oe(je._,Ye._,et=Et[br]),et=new oe(et),Or=Ye.next,tn=je.previous,Jr=Ye._.r,dn=je._.r;do if(Jr<=dn){if(ke(Or._,et._)){Ye=Or,je.next=Ye,Ye.previous=je,--br;continue e}Jr+=Or._.r,Or=Or.next}else{if(ke(tn._,et._)){je=tn,je.next=Ye,Ye.previous=je,--br;continue e}dn+=tn._.r,tn=tn.previous}while(Or!==tn.next);for(et.previous=je,et.next=Ye,je.next=Ye.previous=Ye=et,Nt=Le(je);(et=et.next)!==Ye;)(lr=Le(et))<Nt&&(je=et,Nt=lr);Ye=je.next}for(je=[Ye._],et=Ye;(et=et.next)!==Ye;)je.push(et._);for(et=Z(je),br=0;br<mt;++br)je=Et[br],je.x-=et.x,je.y-=et.y;return et.r}function _e(Et){return be(Et),Et}function he(Et){return Et==null?null:De(Et)}function De(Et){if(typeof Et!="function")throw new Error;return Et}function xe(){return 0}function se(Et){return function(){return Et}}function Ee(Et){return Math.sqrt(Et.value)}function Te(){var Et=null,je=1,Ye=1,et=xe;function mt(Nt){return Nt.x=je/2,Nt.y=Ye/2,Et?Nt.eachBefore(Be(Et)).eachAfter(tt(et,.5)).eachBefore(at(1)):Nt.eachBefore(Be(Ee)).eachAfter(tt(xe,1)).eachAfter(tt(et,Nt.r/Math.min(je,Ye))).eachBefore(at(Math.min(je,Ye)/(2*Nt.r))),Nt}return mt.radius=function(Nt){return arguments.length?(Et=he(Nt),mt):Et},mt.size=function(Nt){return arguments.length?(je=+Nt[0],Ye=+Nt[1],mt):[je,Ye]},mt.padding=function(Nt){return arguments.length?(et=typeof Nt=="function"?Nt:se(+Nt),mt):et},mt}function Be(Et){return function(je){je.children||(je.r=Math.max(0,+Et(je)||0))}}function tt(Et,je){return function(Ye){if(et=Ye.children){var et,mt,Nt=et.length,lr=Et(Ye)*je||0,br;if(lr)for(mt=0;mt<Nt;++mt)et[mt].r+=lr;if(br=be(et),lr)for(mt=0;mt<Nt;++mt)et[mt].r-=lr;Ye.r=br+lr}}}function at(Et){return function(je){var Ye=je.parent;je.r*=Et,Ye&&(je.x=Ye.x+Et*je.x,je.y=Ye.y+Et*je.y)}}function gt(Et){Et.x0=Math.round(Et.x0),Et.y0=Math.round(Et.y0),Et.x1=Math.round(Et.x1),Et.y1=Math.round(Et.y1)}function pt(Et,je,Ye,et,mt){for(var Nt=Et.children,lr,br=-1,Or=Nt.length,tn=Et.value&&(et-je)/Et.value;++br<Or;)lr=Nt[br],lr.y0=Ye,lr.y1=mt,lr.x0=je,lr.x1=je+=lr.value*tn}function Rt(){var Et=1,je=1,Ye=0,et=!1;function mt(lr){var br=lr.height+1;return lr.x0=lr.y0=Ye,lr.x1=Et,lr.y1=je/br,lr.eachBefore(Nt(je,br)),et&&lr.eachBefore(gt),lr}function Nt(lr,br){return function(Or){Or.children&&pt(Or,Or.x0,lr*(Or.depth+1)/br,Or.x1,lr*(Or.depth+2)/br);var tn=Or.x0,Jr=Or.y0,dn=Or.x1-Ye,on=Or.y1-Ye;dn<tn&&(tn=dn=(tn+dn)/2),on<Jr&&(Jr=on=(Jr+on)/2),Or.x0=tn,Or.y0=Jr,Or.x1=dn,Or.y1=on}}return mt.round=function(lr){return arguments.length?(et=!!lr,mt):et},mt.size=function(lr){return arguments.length?(Et=+lr[0],je=+lr[1],mt):[Et,je]},mt.padding=function(lr){return arguments.length?(Ye=+lr,mt):Ye},mt}var $t="$",Wt={depth:-1},Ht={};function Ft(Et){return Et.id}function st(Et){return Et.parentId}function rt(){var Et=Ft,je=st;function Ye(et){var mt,Nt,lr=et.length,br,Or,tn,Jr=new Array(lr),dn,on,Nn={};for(Nt=0;Nt<lr;++Nt)mt=et[Nt],tn=Jr[Nt]=new M(mt),(dn=Et(mt,Nt,et))!=null&&(dn+="")&&(on=$t+(tn.id=dn),Nn[on]=on in Nn?Ht:tn);for(Nt=0;Nt<lr;++Nt)if(tn=Jr[Nt],dn=je(et[Nt],Nt,et),dn==null||!(dn+="")){if(br)throw new Error("multiple roots");br=tn}else{if(Or=Nn[$t+dn],!Or)throw new Error("missing: "+dn);if(Or===Ht)throw new Error("ambiguous: "+dn);Or.children?Or.children.push(tn):Or.children=[tn],tn.parent=Or}if(!br)throw new Error("no root");if(br.parent=Wt,br.eachBefore(function(Wi){Wi.depth=Wi.parent.depth+1,--lr}).eachBefore(S),br.parent=null,lr>0)throw new Error("cycle");return br}return Ye.id=function(et){return arguments.length?(Et=De(et),Ye):Et},Ye.parentId=function(et){return arguments.length?(je=De(et),Ye):je},Ye}function Ue(Et,je){return Et.parent===je.parent?1:2}function xt(Et){var je=Et.children;return je?je[0]:Et.t}function Gt(Et){var je=Et.children;return je?je[je.length-1]:Et.t}function Jt(Et,je,Ye){var et=Ye/(je.i-Et.i);je.c-=et,je.s+=Ye,Et.c+=et,je.z+=Ye,je.m+=Ye}function Ut(Et){for(var je=0,Ye=0,et=Et.children,mt=et.length,Nt;--mt>=0;)Nt=et[mt],Nt.z+=je,Nt.m+=je,je+=Nt.s+(Ye+=Nt.c)}function kr(Et,je,Ye){return Et.a.parent===je.parent?Et.a:Ye}function Pr(Et,je){this._=Et,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=je}Pr.prototype=Object.create(M.prototype);function $r(Et){for(var je=new Pr(Et,0),Ye,et=[je],mt,Nt,lr,br;Ye=et.pop();)if(Nt=Ye._.children)for(Ye.children=new Array(br=Nt.length),lr=br-1;lr>=0;--lr)et.push(mt=Ye.children[lr]=new Pr(Nt[lr],lr)),mt.parent=Ye;return(je.parent=new Pr(null,0)).children=[je],je}function rn(){var Et=Ue,je=1,Ye=1,et=null;function mt(tn){var Jr=$r(tn);if(Jr.eachAfter(Nt),Jr.parent.m=-Jr.z,Jr.eachBefore(lr),et)tn.eachBefore(Or);else{var dn=tn,on=tn,Nn=tn;tn.eachBefore(function(Ka){Ka.x<dn.x&&(dn=Ka),Ka.x>on.x&&(on=Ka),Ka.depth>Nn.depth&&(Nn=Ka)});var Wi=dn===on?1:Et(dn,on)/2,Oa=Wi-dn.x,Da=je/(on.x+Wi+Oa),Aa=Ye/(Nn.depth||1);tn.eachBefore(function(Ka){Ka.x=(Ka.x+Oa)*Da,Ka.y=Ka.depth*Aa})}return tn}function Nt(tn){var Jr=tn.children,dn=tn.parent.children,on=tn.i?dn[tn.i-1]:null;if(Jr){Ut(tn);var Nn=(Jr[0].z+Jr[Jr.length-1].z)/2;on?(tn.z=on.z+Et(tn._,on._),tn.m=tn.z-Nn):tn.z=Nn}else on&&(tn.z=on.z+Et(tn._,on._));tn.parent.A=br(tn,on,tn.parent.A||dn[0])}function lr(tn){tn._.x=tn.z+tn.parent.m,tn.m+=tn.parent.m}function br(tn,Jr,dn){if(Jr){for(var on=tn,Nn=tn,Wi=Jr,Oa=on.parent.children[0],Da=on.m,Aa=Nn.m,Ka=Wi.m,Sa=Oa.m,no;Wi=Gt(Wi),on=xt(on),Wi&&on;)Oa=xt(Oa),Nn=Gt(Nn),Nn.a=tn,no=Wi.z+Ka-on.z-Da+Et(Wi._,on._),no>0&&(Jt(kr(Wi,tn,dn),tn,no),Da+=no,Aa+=no),Ka+=Wi.m,Da+=on.m,Sa+=Oa.m,Aa+=Nn.m;Wi&&!Gt(Nn)&&(Nn.t=Wi,Nn.m+=Ka-Aa),on&&!xt(Oa)&&(Oa.t=on,Oa.m+=Da-Sa,dn=tn)}return dn}function Or(tn){tn.x*=je,tn.y=tn.depth*Ye}return mt.separation=function(tn){return arguments.length?(Et=tn,mt):Et},mt.size=function(tn){return arguments.length?(et=!1,je=+tn[0],Ye=+tn[1],mt):et?null:[je,Ye]},mt.nodeSize=function(tn){return arguments.length?(et=!0,je=+tn[0],Ye=+tn[1],mt):et?[je,Ye]:null},mt}function kn(Et,je,Ye,et,mt){for(var Nt=Et.children,lr,br=-1,Or=Nt.length,tn=Et.value&&(mt-Ye)/Et.value;++br<Or;)lr=Nt[br],lr.x0=je,lr.x1=et,lr.y0=Ye,lr.y1=Ye+=lr.value*tn}var Rn=(1+Math.sqrt(5))/2;function ci(Et,je,Ye,et,mt,Nt){for(var lr=[],br=je.children,Or,tn,Jr=0,dn=0,on=br.length,Nn,Wi,Oa=je.value,Da,Aa,Ka,Sa,no,Fo,an;Jr<on;){Nn=mt-Ye,Wi=Nt-et;do Da=br[dn++].value;while(!Da&&dn<on);for(Aa=Ka=Da,Fo=Math.max(Wi/Nn,Nn/Wi)/(Oa*Et),an=Da*Da*Fo,no=Math.max(Ka/an,an/Aa);dn<on;++dn){if(Da+=tn=br[dn].value,tn<Aa&&(Aa=tn),tn>Ka&&(Ka=tn),an=Da*Da*Fo,Sa=Math.max(Ka/an,an/Aa),Sa>no){Da-=tn;break}no=Sa}lr.push(Or={value:Da,dice:Nn<Wi,children:br.slice(Jr,dn)}),Or.dice?pt(Or,Ye,et,mt,Oa?et+=Wi*Da/Oa:Nt):kn(Or,Ye,et,Oa?Ye+=Nn*Da/Oa:mt,Nt),Oa-=Da,Jr=dn}return lr}var In=(function Et(je){function Ye(et,mt,Nt,lr,br){ci(je,et,mt,Nt,lr,br)}return Ye.ratio=function(et){return Et((et=+et)>1?et:1)},Ye})(Rn);function Gn(){var Et=In,je=!1,Ye=1,et=1,mt=[0],Nt=xe,lr=xe,br=xe,Or=xe,tn=xe;function Jr(on){return on.x0=on.y0=0,on.x1=Ye,on.y1=et,on.eachBefore(dn),mt=[0],je&&on.eachBefore(gt),on}function dn(on){var Nn=mt[on.depth],Wi=on.x0+Nn,Oa=on.y0+Nn,Da=on.x1-Nn,Aa=on.y1-Nn;Da<Wi&&(Wi=Da=(Wi+Da)/2),Aa<Oa&&(Oa=Aa=(Oa+Aa)/2),on.x0=Wi,on.y0=Oa,on.x1=Da,on.y1=Aa,on.children&&(Nn=mt[on.depth+1]=Nt(on)/2,Wi+=tn(on)-Nn,Oa+=lr(on)-Nn,Da-=br(on)-Nn,Aa-=Or(on)-Nn,Da<Wi&&(Wi=Da=(Wi+Da)/2),Aa<Oa&&(Oa=Aa=(Oa+Aa)/2),Et(on,Wi,Oa,Da,Aa))}return Jr.round=function(on){return arguments.length?(je=!!on,Jr):je},Jr.size=function(on){return arguments.length?(Ye=+on[0],et=+on[1],Jr):[Ye,et]},Jr.tile=function(on){return arguments.length?(Et=De(on),Jr):Et},Jr.padding=function(on){return arguments.length?Jr.paddingInner(on).paddingOuter(on):Jr.paddingInner()},Jr.paddingInner=function(on){return arguments.length?(Nt=typeof on=="function"?on:se(+on),Jr):Nt},Jr.paddingOuter=function(on){return arguments.length?Jr.paddingTop(on).paddingRight(on).paddingBottom(on).paddingLeft(on):Jr.paddingTop()},Jr.paddingTop=function(on){return arguments.length?(lr=typeof on=="function"?on:se(+on),Jr):lr},Jr.paddingRight=function(on){return arguments.length?(br=typeof on=="function"?on:se(+on),Jr):br},Jr.paddingBottom=function(on){return arguments.length?(Or=typeof on=="function"?on:se(+on),Jr):Or},Jr.paddingLeft=function(on){return arguments.length?(tn=typeof on=="function"?on:se(+on),Jr):tn},Jr}function mr(Et,je,Ye,et,mt){var Nt=Et.children,lr,br=Nt.length,Or,tn=new Array(br+1);for(tn[0]=Or=lr=0;lr<br;++lr)tn[lr+1]=Or+=Nt[lr].value;Jr(0,br,Et.value,je,Ye,et,mt);function Jr(dn,on,Nn,Wi,Oa,Da,Aa){if(dn>=on-1){var Ka=Nt[dn];Ka.x0=Wi,Ka.y0=Oa,Ka.x1=Da,Ka.y1=Aa;return}for(var Sa=tn[dn],no=Nn/2+Sa,Fo=dn+1,an=on-1;Fo<an;){var Hr=Fo+an>>>1;tn[Hr]<no?Fo=Hr+1:an=Hr}no-tn[Fo-1]<tn[Fo]-no&&dn+1<Fo&&--Fo;var nn=tn[Fo]-Sa,Kr=Nn-nn;if(Da-Wi>Aa-Oa){var $n=(Wi*Kr+Da*nn)/Nn;Jr(dn,Fo,nn,Wi,Oa,$n,Aa),Jr(Fo,on,Kr,$n,Oa,Da,Aa)}else{var Ai=(Oa*Kr+Aa*nn)/Nn;Jr(dn,Fo,nn,Wi,Oa,Da,Ai),Jr(Fo,on,Kr,Wi,Ai,Da,Aa)}}}function St(Et,je,Ye,et,mt){(Et.depth&1?kn:pt)(Et,je,Ye,et,mt)}var Ot=(function Et(je){function Ye(et,mt,Nt,lr,br){if((Or=et._squarify)&&Or.ratio===je)for(var Or,tn,Jr,dn,on=-1,Nn,Wi=Or.length,Oa=et.value;++on<Wi;){for(tn=Or[on],Jr=tn.children,dn=tn.value=0,Nn=Jr.length;dn<Nn;++dn)tn.value+=Jr[dn].value;tn.dice?pt(tn,mt,Nt,lr,Nt+=(br-Nt)*tn.value/Oa):kn(tn,mt,Nt,mt+=(lr-mt)*tn.value/Oa,br),Oa-=tn.value}else et._squarify=Or=ci(je,et,mt,Nt,lr,br),Or.ratio=je}return Ye.ratio=function(et){return Et((et=+et)>1?et:1)},Ye})(Rn);w.cluster=f,w.hierarchy=k,w.pack=Te,w.packEnclose=Z,w.packSiblings=_e,w.partition=Rt,w.stratify=rt,w.tree=rn,w.treemap=Gn,w.treemapBinary=mr,w.treemapDice=pt,w.treemapResquarify=Ot,w.treemapSlice=kn,w.treemapSliceDice=St,w.treemapSquarify=In,Object.defineProperty(w,"__esModule",{value:!0})})}}),N1=U({"src/traces/sunburst/calc.js"(pe){var le=OM(),w=_t(),R=ii(),O=vd().makeColorScaleFuncFromTrace,z=QA().makePullColorFn,l=QA().generateExtendedColors,u=vd().calc,c=Dt().ALMOST_EQUAL,p={},f={},v={};pe.calc=function(m,_){var x=m._fullLayout,A=_.ids,E=R.isArrayOrTypedArray(A),D=_.labels,g=_.parents,C=_.values,I=R.isArrayOrTypedArray(C),N=[],F={},k={},P=function(_e,he){F[_e]?F[_e].push(he):F[_e]=[he],k[he]=1},T=function(_e){return _e||typeof _e=="number"},y=function(_e){return!I||w(C[_e])&&C[_e]>=0},S,M,W;E?(S=Math.min(A.length,g.length),M=function(_e){return T(A[_e])&&y(_e)},W=function(_e){return String(A[_e])}):(S=Math.min(D.length,g.length),M=function(_e){return T(D[_e])&&y(_e)},W=function(_e){return String(D[_e])}),I&&(S=Math.min(S,C.length));for(var $=0;$<S;$++)if(M($)){var Z=W($),K=T(g[$])?String(g[$]):"",Q={i:$,id:Z,pid:K,label:T(D[$])?String(D[$]):""};I&&(Q.v=+C[$]),N.push(Q),P(K,Z)}if(F[""]){if(F[""].length>1){for(var ee=R.randstr(),re=0;re<N.length;re++)N[re].pid===""&&(N[re].pid=ee);N.unshift({hasMultipleRoots:!0,id:ee,pid:"",label:""})}}else{var J=[],G;for(G in F)k[G]||J.push(G);if(J.length===1)G=J[0],N.unshift({hasImpliedRoot:!0,id:G,pid:"",label:G});else return R.warn(["Multiple implied roots, cannot build",_.type,"hierarchy of",_.name+".","These roots include:",J.join(", ")].join(" "))}var fe;try{fe=le.stratify().id(function(_e){return _e.id}).parentId(function(_e){return _e.pid})(N)}catch(_e){return R.warn(["Failed to build",_.type,"hierarchy of",_.name+".","Error:",_e.message].join(" "))}var we=le.hierarchy(fe),Oe=!1;if(I)switch(_.branchvalues){case"remainder":we.sum(function(_e){return _e.data.v});break;case"total":we.each(function(_e){var he=_e.data.data,De=he.v;if(_e.children){var xe=_e.children.reduce(function(se,Ee){return se+Ee.data.data.v},0);if((he.hasImpliedRoot||he.hasMultipleRoots)&&(De=xe),De<xe*c)return Oe=!0,R.warn(["Total value for node",_e.data.data.id,"of",_.name,"is smaller than the sum of its children.",`
parent value =`,De,`
children sum =`,xe].join(" "))}_e.value=De});break}else h(we,_,{branches:_.count.indexOf("branches")!==-1,leaves:_.count.indexOf("leaves")!==-1});if(!Oe){_.sort&&we.sort(function(_e,he){return he.value-_e.value});var ke,Le,oe=_.marker.colors||[],be=!!oe.length;return _._hasColorscale?(be||(oe=I?_.values:_._values),u(m,_,{vals:oe,containerStr:"marker",cLetter:"c"}),Le=O(_.marker)):ke=z(x["_"+_.type+"colormap"]),we.each(function(_e){var he=_e.data.data;he.color=_._hasColorscale?Le(oe[he.i]):ke(oe[he.i],he.id)}),N[0].hierarchy=we,N}},pe._runCrossTraceCalc=function(m,_){var x=_._fullLayout,A=_.calcdata,E=x[m+"colorway"],D=x["_"+m+"colormap"];x["extend"+m+"colors"]&&(E=l(E,m==="icicle"?v:m==="treemap"?f:p));var g=0,C;function I(P){var T=P.data.data,y=T.id;T.color===!1&&(D[y]?T.color=D[y]:P.parent?P.parent.parent?T.color=P.parent.data.data.color:(D[y]=T.color=E[g%E.length],g++):T.color=C)}for(var N=0;N<A.length;N++){var F=A[N],k=F[0];k.trace.type===m&&k.hierarchy&&(C=k.trace.root.color,k.hierarchy.each(I))}},pe.crossTraceCalc=function(m){return pe._runCrossTraceCalc("sunburst",m)};function h(m,_,x){var A=0,E=m.children;if(E){for(var D=E.length,g=0;g<D;g++)A+=h(E[g],_,x);x.branches&&A++}else x.leaves&&A++;return m.value=m.data.data.value=A,_._values||(_._values=[]),_._values[m.data.data.i]=A,A}}});function h3(pe,le,w){pe.prototype=le.prototype=w,w.constructor=pe}function NM(pe,le){var w=Object.create(pe.prototype);for(var R in le)w[R]=le[R];return w}var b2=ae({"node_modules/d3-color/src/define.js"(){}});function Af(){}function xR(){return this.rgb().formatHex()}function Sy(){return this.rgb().formatHex8()}function i0(){return wR(this).formatHsl()}function m6(){return this.rgb().formatRgb()}function bw(pe){var le,w;return pe=(pe+"").trim().toLowerCase(),(le=k4.exec(pe))?(w=le[1].length,le=parseInt(le[1],16),w===6?M4(le):w===3?new Y0(le>>8&15|le>>4&240,le>>4&15|le&240,(le&15)<<4|le&15,1):w===8?_R(le>>24&255,le>>16&255,le>>8&255,(le&255)/255):w===4?_R(le>>12&15|le>>8&240,le>>8&15|le>>4&240,le>>4&15|le&240,((le&15)<<4|le&15)/255):null):(le=TR.exec(pe))?new Y0(le[1],le[2],le[3],1):(le=hb.exec(pe))?new Y0(le[1]*255/100,le[2]*255/100,le[3]*255/100,1):(le=tC.exec(pe))?_R(le[1],le[2],le[3],le[4]):(le=_w.exec(pe))?_R(le[1]*255/100,le[2]*255/100,le[3]*255/100,le[4]):(le=dI.exec(pe))?Cg(le[1],le[2]/100,le[3]/100,1):(le=I4.exec(pe))?Cg(le[1],le[2]/100,le[3]/100,le[4]):hI.hasOwnProperty(pe)?M4(hI[pe]):pe==="transparent"?new Y0(NaN,NaN,NaN,0):null}function M4(pe){return new Y0(pe>>16&255,pe>>8&255,pe&255,1)}function _R(pe,le,w,R){return R<=0&&(pe=le=w=NaN),new Y0(pe,le,w,R)}function FM(pe){return pe instanceof Af||(pe=bw(pe)),pe?(pe=pe.rgb(),new Y0(pe.r,pe.g,pe.b,pe.opacity)):new Y0}function dv(pe,le,w,R){return arguments.length===1?FM(pe):new Y0(pe,le,w,R??1)}function Y0(pe,le,w,R){this.r=+pe,this.g=+le,this.b=+w,this.opacity=+R}function X0(){return`#${Ev(this.r)}${Ev(this.g)}${Ev(this.b)}`}function RF(){return`#${Ev(this.r)}${Ev(this.g)}${Ev(this.b)}${Ev((isNaN(this.opacity)?1:this.opacity)*255)}`}function xw(){const pe=eC(this.opacity);return`${pe===1?"rgb(":"rgba("}${C_(this.r)}, ${C_(this.g)}, ${C_(this.b)}${pe===1?")":`, ${pe})`}`}function eC(pe){return isNaN(pe)?1:Math.max(0,Math.min(1,pe))}function C_(pe){return Math.max(0,Math.min(255,Math.round(pe)||0))}function Ev(pe){return pe=C_(pe),(pe<16?"0":"")+pe.toString(16)}function Cg(pe,le,w,R){return R<=0?pe=le=w=NaN:w<=0||w>=1?pe=le=NaN:le<=0&&(pe=NaN),new x2(pe,le,w,R)}function wR(pe){if(pe instanceof x2)return new x2(pe.h,pe.s,pe.l,pe.opacity);if(pe instanceof Af||(pe=bw(pe)),!pe)return new x2;if(pe instanceof x2)return pe;pe=pe.rgb();var le=pe.r/255,w=pe.g/255,R=pe.b/255,O=Math.min(le,w,R),z=Math.max(le,w,R),l=NaN,u=z-O,c=(z+O)/2;return u?(le===z?l=(w-R)/u+(w<R)*6:w===z?l=(R-le)/u+2:l=(le-w)/u+4,u/=c<.5?z+O:2-z-O,l*=60):u=c>0&&c<1?0:l,new x2(l,u,c,pe.opacity)}function SR(pe,le,w,R){return arguments.length===1?wR(pe):new x2(pe,le,w,R??1)}function x2(pe,le,w,R){this.h=+pe,this.s=+le,this.l=+w,this.opacity=+R}function R4(pe){return pe=(pe||0)%360,pe<0?pe+360:pe}function cI(pe){return Math.max(0,Math.min(1,pe||0))}function fI(pe,le,w){return(pe<60?le+(w-le)*pe/60:pe<180?w:pe<240?le+(w-le)*(240-pe)/60:le)*255}var p3,v3,a1,DT,M_,k4,TR,hb,tC,_w,dI,I4,hI,rC=ae({"node_modules/d3-color/src/color.js"(){b2(),p3=.7,v3=1/p3,a1="\\s*([+-]?\\d+)\\s*",DT="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",M_="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",k4=/^#([0-9a-f]{3,8})$/,TR=new RegExp(`^rgb\\(${a1},${a1},${a1}\\)$`),hb=new RegExp(`^rgb\\(${M_},${M_},${M_}\\)$`),tC=new RegExp(`^rgba\\(${a1},${a1},${a1},${DT}\\)$`),_w=new RegExp(`^rgba\\(${M_},${M_},${M_},${DT}\\)$`),dI=new RegExp(`^hsl\\(${DT},${M_},${M_}\\)$`),I4=new RegExp(`^hsla\\(${DT},${M_},${M_},${DT}\\)$`),hI={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},h3(Af,bw,{copy(pe){return Object.assign(new this.constructor,this,pe)},displayable(){return this.rgb().displayable()},hex:xR,formatHex:xR,formatHex8:Sy,formatHsl:i0,formatRgb:m6,toString:m6}),h3(Y0,dv,NM(Af,{brighter(pe){return pe=pe==null?v3:Math.pow(v3,pe),new Y0(this.r*pe,this.g*pe,this.b*pe,this.opacity)},darker(pe){return pe=pe==null?p3:Math.pow(p3,pe),new Y0(this.r*pe,this.g*pe,this.b*pe,this.opacity)},rgb(){return this},clamp(){return new Y0(C_(this.r),C_(this.g),C_(this.b),eC(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:X0,formatHex:X0,formatHex8:RF,formatRgb:xw,toString:xw})),h3(x2,SR,NM(Af,{brighter(pe){return pe=pe==null?v3:Math.pow(v3,pe),new x2(this.h,this.s,this.l*pe,this.opacity)},darker(pe){return pe=pe==null?p3:Math.pow(p3,pe),new x2(this.h,this.s,this.l*pe,this.opacity)},rgb(){var pe=this.h%360+(this.h<0)*360,le=isNaN(pe)||isNaN(this.s)?0:this.s,w=this.l,R=w+(w<.5?w:1-w)*le,O=2*w-R;return new Y0(fI(pe>=240?pe-240:pe+120,O,R),fI(pe,O,R),fI(pe<120?pe+240:pe-120,O,R),this.opacity)},clamp(){return new x2(R4(this.h),cI(this.s),cI(this.l),eC(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 pe=eC(this.opacity);return`${pe===1?"hsl(":"hsla("}${R4(this.h)}, ${cI(this.s)*100}%, ${cI(this.l)*100}%${pe===1?")":`, ${pe})`}`}}))}}),Jb,ww,Dd=ae({"node_modules/d3-color/src/math.js"(){Jb=Math.PI/180,ww=180/Math.PI}});function _2(pe){if(pe instanceof w2)return new w2(pe.l,pe.a,pe.b,pe.opacity);if(pe instanceof LT)return g6(pe);pe instanceof Y0||(pe=FM(pe));var le=pI(pe.r),w=pI(pe.g),R=pI(pe.b),O=m3((.2225045*le+.7168786*w+.0606169*R)/g3),z,l;return le===w&&w===R?z=l=O:(z=m3((.4360747*le+.3850649*w+.1430804*R)/mI),l=m3((.0139322*le+.0971045*w+.7141733*R)/nC)),new w2(116*O-16,500*(z-O),200*(O-l),pe.opacity)}function Nx(pe,le,w,R){return arguments.length===1?_2(pe):new w2(pe,le,w,R??1)}function w2(pe,le,w,R){this.l=+pe,this.a=+le,this.b=+w,this.opacity=+R}function m3(pe){return pe>zM?Math.pow(pe,.3333333333333333):pe/y3+gI}function qp(pe){return pe>iC?pe*pe*pe:y3*(pe-gI)}function P4(pe){return 255*(pe<=.0031308?12.92*pe:1.055*Math.pow(pe,.4166666666666667)-.055)}function pI(pe){return(pe/=255)<=.04045?pe/12.92:Math.pow((pe+.055)/1.055,2.4)}function vI(pe){if(pe instanceof LT)return new LT(pe.h,pe.c,pe.l,pe.opacity);if(pe instanceof w2||(pe=_2(pe)),pe.a===0&&pe.b===0)return new LT(NaN,0<pe.l&&pe.l<100?0:NaN,pe.l,pe.opacity);var le=Math.atan2(pe.b,pe.a)*ww;return new LT(le<0?le+360:le,Math.sqrt(pe.a*pe.a+pe.b*pe.b),pe.l,pe.opacity)}function D4(pe,le,w,R){return arguments.length===1?vI(pe):new LT(pe,le,w,R??1)}function LT(pe,le,w,R){this.h=+pe,this.c=+le,this.l=+w,this.opacity=+R}function g6(pe){if(isNaN(pe.h))return new w2(pe.l,0,0,pe.opacity);var le=pe.h*Jb;return new w2(pe.l,Math.cos(le)*pe.c,Math.sin(le)*pe.c,pe.opacity)}var ER,mI,g3,nC,gI,iC,y3,zM,y6=ae({"node_modules/d3-color/src/lab.js"(){b2(),rC(),Dd(),ER=18,mI=.96422,g3=1,nC=.82521,gI=4/29,iC=6/29,y3=3*iC*iC,zM=iC*iC*iC,h3(w2,Nx,NM(Af,{brighter(pe){return new w2(this.l+ER*(pe??1),this.a,this.b,this.opacity)},darker(pe){return new w2(this.l-ER*(pe??1),this.a,this.b,this.opacity)},rgb(){var pe=(this.l+16)/116,le=isNaN(this.a)?pe:pe+this.a/500,w=isNaN(this.b)?pe:pe-this.b/200;return le=mI*qp(le),pe=g3*qp(pe),w=nC*qp(w),new Y0(P4(3.1338561*le-1.6168667*pe-.4906146*w),P4(-.9787684*le+1.9161415*pe+.033454*w),P4(.0719453*le-.2289914*pe+1.4052427*w),this.opacity)}})),h3(LT,D4,NM(Af,{brighter(pe){return new LT(this.h,this.c,this.l+ER*(pe??1),this.opacity)},darker(pe){return new LT(this.h,this.c,this.l-ER*(pe??1),this.opacity)},rgb(){return g6(this).rgb()}}))}});function yI(pe){if(pe instanceof OT)return new OT(pe.h,pe.s,pe.l,pe.opacity);pe instanceof Y0||(pe=FM(pe));var le=pe.r/255,w=pe.g/255,R=pe.b/255,O=(O4*R+Z0*le-L4*w)/(O4+Z0-L4),z=R-O,l=(Mg*(w-O)-CR*z)/MR,u=Math.sqrt(l*l+z*z)/(Mg*O*(1-O)),c=u?Math.atan2(l,z)*ww-120:NaN;return new OT(c<0?c+360:c,u,O,pe.opacity)}function aC(pe,le,w,R){return arguments.length===1?yI(pe):new OT(pe,le,w,R??1)}function OT(pe,le,w,R){this.h=+pe,this.s=+le,this.l=+w,this.opacity=+R}var b3,AR,CR,MR,Mg,Z0,L4,O4,kF=ae({"node_modules/d3-color/src/cubehelix.js"(){b2(),rC(),Dd(),b3=-.14861,AR=1.78277,CR=-.29227,MR=-.90649,Mg=1.97294,Z0=Mg*MR,L4=Mg*AR,O4=AR*CR-MR*b3,h3(OT,aC,NM(Af,{brighter(pe){return pe=pe==null?v3:Math.pow(v3,pe),new OT(this.h,this.s,this.l*pe,this.opacity)},darker(pe){return pe=pe==null?p3:Math.pow(p3,pe),new OT(this.h,this.s,this.l*pe,this.opacity)},rgb(){var pe=isNaN(this.h)?0:(this.h+120)*Jb,le=+this.l,w=isNaN(this.s)?0:this.s*le*(1-le),R=Math.cos(pe),O=Math.sin(pe);return new Y0(255*(le+w*(b3*R+AR*O)),255*(le+w*(CR*R+MR*O)),255*(le+w*(Mg*R)),this.opacity)}}))}}),AS=ae({"node_modules/d3-color/src/index.js"(){rC(),y6(),kF()}});function RR(pe,le,w,R,O){var z=pe*pe,l=z*pe;return((1-3*pe+3*z-l)*le+(4-6*z+3*l)*w+(1+3*pe+3*z-3*l)*R+l*O)/6}function bI(pe){var le=pe.length-1;return function(w){var R=w<=0?w=0:w>=1?(w=1,le-1):Math.floor(w*le),O=pe[R],z=pe[R+1],l=R>0?pe[R-1]:2*O-z,u=R<le-1?pe[R+2]:2*z-O;return RR((w-R/le)*le,l,O,z,u)}}var N4=ae({"node_modules/d3-interpolate/src/basis.js"(){}});function oC(pe){var le=pe.length;return function(w){var R=Math.floor(((w%=1)<0?++w:w)*le),O=pe[(R+le-1)%le],z=pe[R%le],l=pe[(R+1)%le],u=pe[(R+2)%le];return RR((w-R/le)*le,O,z,l,u)}}var b6=ae({"node_modules/d3-interpolate/src/basisClosed.js"(){N4()}}),BM,F4=ae({"node_modules/d3-interpolate/src/constant.js"(){BM=pe=>()=>pe}});function xI(pe,le){return function(w){return pe+w*le}}function z4(pe,le,w){return pe=Math.pow(pe,w),le=Math.pow(le,w)-pe,w=1/w,function(R){return Math.pow(pe+R*le,w)}}function UM(pe,le){var w=le-pe;return w?xI(pe,w>180||w<-180?w-360*Math.round(w/360):w):BM(isNaN(pe)?le:pe)}function x6(pe){return(pe=+pe)==1?T0:function(le,w){return w-le?z4(le,w,pe):BM(isNaN(le)?w:le)}}function T0(pe,le){var w=le-pe;return w?xI(pe,w):BM(isNaN(pe)?le:pe)}var HM=ae({"node_modules/d3-interpolate/src/color.js"(){F4()}});function sC(pe){return function(le){var w=le.length,R=new Array(w),O=new Array(w),z=new Array(w),l,u;for(l=0;l<w;++l)u=dv(le[l]),R[l]=u.r||0,O[l]=u.g||0,z[l]=u.b||0;return R=pe(R),O=pe(O),z=pe(z),u.opacity=1,function(c){return u.r=R(c),u.g=O(c),u.b=z(c),u+""}}}var jM,_I,kR,wI=ae({"node_modules/d3-interpolate/src/rgb.js"(){AS(),N4(),b6(),HM(),jM=(function pe(le){var w=x6(le);function R(O,z){var l=w((O=dv(O)).r,(z=dv(z)).r),u=w(O.g,z.g),c=w(O.b,z.b),p=T0(O.opacity,z.opacity);return function(f){return O.r=l(f),O.g=u(f),O.b=c(f),O.opacity=p(f),O+""}}return R.gamma=pe,R})(1),_I=sC(bI),kR=sC(oC)}});function SI(pe,le){le||(le=[]);var w=pe?Math.min(le.length,pe.length):0,R=le.slice(),O;return function(z){for(O=0;O<w;++O)R[O]=pe[O]*(1-z)+le[O]*z;return R}}function IR(pe){return ArrayBuffer.isView(pe)&&!(pe instanceof DataView)}var S2=ae({"node_modules/d3-interpolate/src/numberArray.js"(){}});function x3(pe,le){return(IR(le)?SI:NT)(pe,le)}function NT(pe,le){var w=le?le.length:0,R=pe?Math.min(w,pe.length):0,O=new Array(R),z=new Array(w),l;for(l=0;l<R;++l)O[l]=LR(pe[l],le[l]);for(;l<w;++l)z[l]=le[l];return function(u){for(l=0;l<R;++l)z[l]=O[l](u);return z}}var VM=ae({"node_modules/d3-interpolate/src/array.js"(){_3(),S2()}});function qM(pe,le){var w=new Date;return pe=+pe,le=+le,function(R){return w.setTime(pe*(1-R)+le*R),w}}var FT=ae({"node_modules/d3-interpolate/src/date.js"(){}});function CS(pe,le){return pe=+pe,le=+le,function(w){return pe*(1-w)+le*w}}var PR=ae({"node_modules/d3-interpolate/src/number.js"(){}});function GM(pe,le){var w={},R={},O;(pe===null||typeof pe!="object")&&(pe={}),(le===null||typeof le!="object")&&(le={});for(O in le)O in pe?w[O]=LR(pe[O],le[O]):R[O]=le[O];return function(z){for(O in w)R[O]=w[O](z);return R}}var _6=ae({"node_modules/d3-interpolate/src/object.js"(){_3()}});function w6(pe){return function(){return pe}}function TI(pe){return function(le){return pe(le)+""}}function B4(pe,le){var w=EI.lastIndex=lC.lastIndex=0,R,O,z,l=-1,u=[],c=[];for(pe=pe+"",le=le+"";(R=EI.exec(pe))&&(O=lC.exec(le));)(z=O.index)>w&&(z=le.slice(w,z),u[l]?u[l]+=z:u[++l]=z),(R=R[0])===(O=O[0])?u[l]?u[l]+=O:u[++l]=O:(u[++l]=null,c.push({i:l,x:CS(R,O)})),w=lC.lastIndex;return w<le.length&&(z=le.slice(w),u[l]?u[l]+=z:u[++l]=z),u.length<2?c[0]?TI(c[0].x):w6(le):(le=c.length,function(p){for(var f=0,v;f<le;++f)u[(v=c[f]).i]=v.x(p);return u.join("")})}var EI,lC,DR=ae({"node_modules/d3-interpolate/src/string.js"(){PR(),EI=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,lC=new RegExp(EI.source,"g")}});function LR(pe,le){var w=typeof le,R;return le==null||w==="boolean"?BM(le):(w==="number"?CS:w==="string"?(R=bw(le))?(le=R,jM):B4:le instanceof bw?jM:le instanceof Date?qM:IR(le)?SI:Array.isArray(le)?NT:typeof le.valueOf!="function"&&typeof le.toString!="function"||isNaN(le)?GM:CS)(pe,le)}var _3=ae({"node_modules/d3-interpolate/src/value.js"(){AS(),wI(),VM(),FT(),PR(),_6(),DR(),F4(),S2()}});function U4(pe){var le=pe.length;return function(w){return pe[Math.max(0,Math.min(le-1,Math.floor(w*le)))]}}var AI=ae({"node_modules/d3-interpolate/src/discrete.js"(){}});function S6(pe,le){var w=UM(+pe,+le);return function(R){var O=w(R);return O-360*Math.floor(O/360)}}var IF=ae({"node_modules/d3-interpolate/src/hue.js"(){HM()}});function CI(pe,le){return pe=+pe,le=+le,function(w){return Math.round(pe*(1-w)+le*w)}}var te=ae({"node_modules/d3-interpolate/src/round.js"(){}});function ge(pe,le,w,R,O,z){var l,u,c;return(l=Math.sqrt(pe*pe+le*le))&&(pe/=l,le/=l),(c=pe*w+le*R)&&(w-=pe*c,R-=le*c),(u=Math.sqrt(w*w+R*R))&&(w/=u,R/=u,c/=u),pe*R<le*w&&(pe=-pe,le=-le,c=-c,l=-l),{translateX:O,translateY:z,rotate:Math.atan2(le,pe)*qe,skewX:Math.atan(c)*qe,scaleX:l,scaleY:u}}var qe,ct,Xt=ae({"node_modules/d3-interpolate/src/transform/decompose.js"(){qe=180/Math.PI,ct={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}}});function Tr(pe){const le=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(pe+"");return le.isIdentity?ct:ge(le.a,le.b,le.c,le.d,le.e,le.f)}function ri(pe){return pe==null||(Gi||(Gi=document.createElementNS("http://www.w3.org/2000/svg","g")),Gi.setAttribute("transform",pe),!(pe=Gi.transform.baseVal.consolidate()))?ct:(pe=pe.matrix,ge(pe.a,pe.b,pe.c,pe.d,pe.e,pe.f))}var Gi,co=ae({"node_modules/d3-interpolate/src/transform/parse.js"(){Xt()}});function Ts(pe,le,w,R){function O(p){return p.length?p.pop()+" ":""}function z(p,f,v,h,m,_){if(p!==v||f!==h){var x=m.push("translate(",null,le,null,w);_.push({i:x-4,x:CS(p,v)},{i:x-2,x:CS(f,h)})}else(v||h)&&m.push("translate("+v+le+h+w)}function l(p,f,v,h){p!==f?(p-f>180?f+=360:f-p>180&&(p+=360),h.push({i:v.push(O(v)+"rotate(",null,R)-2,x:CS(p,f)})):f&&v.push(O(v)+"rotate("+f+R)}function u(p,f,v,h){p!==f?h.push({i:v.push(O(v)+"skewX(",null,R)-2,x:CS(p,f)}):f&&v.push(O(v)+"skewX("+f+R)}function c(p,f,v,h,m,_){if(p!==v||f!==h){var x=m.push(O(m)+"scale(",null,",",null,")");_.push({i:x-4,x:CS(p,v)},{i:x-2,x:CS(f,h)})}else(v!==1||h!==1)&&m.push(O(m)+"scale("+v+","+h+")")}return function(p,f){var v=[],h=[];return p=pe(p),f=pe(f),z(p.translateX,p.translateY,f.translateX,f.translateY,v,h),l(p.rotate,f.rotate,v,h),u(p.skewX,f.skewX,v,h),c(p.scaleX,p.scaleY,f.scaleX,f.scaleY,v,h),p=f=null,function(m){for(var _=-1,x=h.length,A;++_<x;)v[(A=h[_]).i]=A.x(m);return v.join("")}}}var bl,Dl,Ls=ae({"node_modules/d3-interpolate/src/transform/index.js"(){PR(),co(),bl=Ts(Tr,"px, ","px)","deg)"),Dl=Ts(ri,", ",")",")")}});function Es(pe){return((pe=Math.exp(pe))+1/pe)/2}function qf(pe){return((pe=Math.exp(pe))-1/pe)/2}function Ff(pe){return((pe=Math.exp(2*pe))-1)/(pe+1)}var Bv,ss,Ho=ae({"node_modules/d3-interpolate/src/zoom.js"(){Bv=1e-12,ss=(function pe(le,w,R){function O(z,l){var u=z[0],c=z[1],p=z[2],f=l[0],v=l[1],h=l[2],m=f-u,_=v-c,x=m*m+_*_,A,E;if(x<Bv)E=Math.log(h/p)/le,A=function(F){return[u+F*m,c+F*_,p*Math.exp(le*F*E)]};else{var D=Math.sqrt(x),g=(h*h-p*p+R*x)/(2*p*w*D),C=(h*h-p*p-R*x)/(2*h*w*D),I=Math.log(Math.sqrt(g*g+1)-g),N=Math.log(Math.sqrt(C*C+1)-C);E=(N-I)/le,A=function(F){var k=F*E,P=Es(I),T=p/(w*D)*(P*Ff(le*k+I)-qf(I));return[u+T*m,c+T*_,p*P/Es(le*k+I)]}}return A.duration=E*1e3*le/Math.SQRT2,A}return O.rho=function(z){var l=Math.max(.001,+z),u=l*l,c=u*u;return pe(l,u,c)},O})(Math.SQRT2,2,4)}});function bs(pe){return function(le,w){var R=pe((le=SR(le)).h,(w=SR(w)).h),O=T0(le.s,w.s),z=T0(le.l,w.l),l=T0(le.opacity,w.opacity);return function(u){return le.h=R(u),le.s=O(u),le.l=z(u),le.opacity=l(u),le+""}}}var Cl,Lc,kh=ae({"node_modules/d3-interpolate/src/hsl.js"(){AS(),HM(),Cl=bs(UM),Lc=bs(T0)}});function vf(pe,le){var w=T0((pe=Nx(pe)).l,(le=Nx(le)).l),R=T0(pe.a,le.a),O=T0(pe.b,le.b),z=T0(pe.opacity,le.opacity);return function(l){return pe.l=w(l),pe.a=R(l),pe.b=O(l),pe.opacity=z(l),pe+""}}var Gf=ae({"node_modules/d3-interpolate/src/lab.js"(){AS(),HM()}});function Ty(pe){return function(le,w){var R=pe((le=D4(le)).h,(w=D4(w)).h),O=T0(le.c,w.c),z=T0(le.l,w.l),l=T0(le.opacity,w.opacity);return function(u){return le.h=R(u),le.c=O(u),le.l=z(u),le.opacity=l(u),le+""}}}var Op,zT,PF=ae({"node_modules/d3-interpolate/src/hcl.js"(){AS(),HM(),Op=Ty(UM),zT=Ty(T0)}});function PU(pe){return(function le(w){w=+w;function R(O,z){var l=pe((O=aC(O)).h,(z=aC(z)).h),u=T0(O.s,z.s),c=T0(O.l,z.l),p=T0(O.opacity,z.opacity);return function(f){return O.h=l(f),O.s=u(f),O.l=c(Math.pow(f,w)),O.opacity=p(f),O+""}}return R.gamma=le,R})(1)}var T6,E6,BZ=ae({"node_modules/d3-interpolate/src/cubehelix.js"(){AS(),HM(),T6=PU(UM),E6=PU(T0)}});function UZ(pe,le){le===void 0&&(le=pe,pe=LR);for(var w=0,R=le.length-1,O=le[0],z=new Array(R<0?0:R);w<R;)z[w]=pe(O,O=le[++w]);return function(l){var u=Math.max(0,Math.min(R-1,Math.floor(l*=R)));return z[u](l-u)}}var HZ=ae({"node_modules/d3-interpolate/src/piecewise.js"(){_3()}});function jZ(pe,le){for(var w=new Array(le),R=0;R<le;++R)w[R]=pe(R/(le-1));return w}var VZ=ae({"node_modules/d3-interpolate/src/quantize.js"(){}}),OR={};ve(OR,{interpolate:()=>LR,interpolateArray:()=>x3,interpolateBasis:()=>bI,interpolateBasisClosed:()=>oC,interpolateCubehelix:()=>T6,interpolateCubehelixLong:()=>E6,interpolateDate:()=>qM,interpolateDiscrete:()=>U4,interpolateHcl:()=>Op,interpolateHclLong:()=>zT,interpolateHsl:()=>Cl,interpolateHslLong:()=>Lc,interpolateHue:()=>S6,interpolateLab:()=>vf,interpolateNumber:()=>CS,interpolateNumberArray:()=>SI,interpolateObject:()=>GM,interpolateRgb:()=>jM,interpolateRgbBasis:()=>_I,interpolateRgbBasisClosed:()=>kR,interpolateRound:()=>CI,interpolateString:()=>B4,interpolateTransformCss:()=>bl,interpolateTransformSvg:()=>Dl,interpolateZoom:()=>ss,piecewise:()=>UZ,quantize:()=>jZ});var MI=ae({"node_modules/d3-interpolate/src/index.js"(){_3(),VM(),N4(),b6(),FT(),AI(),IF(),PR(),S2(),_6(),te(),DR(),Ls(),Ho(),wI(),kh(),Gf(),PF(),BZ(),HZ(),VZ()}}),DF=U({"src/traces/sunburst/fill_one.js"(pe,le){var w=ec(),R=Lr();le.exports=function(z,l,u,c,p){var f=l.data.data,v=f.i,h=p||f.color;if(v>=0){l.i=f.i;var m=u.marker;m.pattern?(!m.colors||!m.pattern.shape)&&(m.color=h,l.color=h):(m.color=h,l.color=h),w.pointStyle(z,u,c,l)}else R.fill(z,h)}}}),DU=U({"src/traces/sunburst/style.js"(pe,le){var w=Ze(),R=Lr(),O=ii(),z=x0().resizeText,l=DF();function u(p){var f=p._fullLayout._sunburstlayer.selectAll(".trace");z(p,f,"sunburst"),f.each(function(v){var h=w.select(this),m=v[0],_=m.trace;h.style("opacity",_.opacity),h.selectAll("path.surface").each(function(x){w.select(this).call(c,x,_,p)})})}function c(p,f,v,h){var m=f.data.data,_=!f.children,x=m.i,A=O.castOption(v,x,"marker.line.color")||R.defaultLine,E=O.castOption(v,x,"marker.line.width")||0;p.call(l,f,v,h).style("stroke-width",E).call(R.stroke,A).style("opacity",_?v.leaf.opacity:null)}le.exports={style:u,styleOne:c}}}),$M=U({"src/traces/sunburst/helpers.js"(pe){var le=ii(),w=Lr(),R=i_(),O=dy();pe.findEntryWithLevel=function(c,p){var f;return p&&c.eachAfter(function(v){if(pe.getPtId(v)===p)return f=v.copy()}),f||c},pe.findEntryWithChild=function(c,p){var f;return c.eachAfter(function(v){for(var h=v.children||[],m=0;m<h.length;m++){var _=h[m];if(pe.getPtId(_)===p)return f=v.copy()}}),f||c},pe.isEntry=function(c){return!c.parent},pe.isLeaf=function(c){return!c.children},pe.getPtId=function(c){return c.data.data.id},pe.getPtLabel=function(c){return c.data.data.label},pe.getValue=function(c){return c.value},pe.isHierarchyRoot=function(c){return u(c)===""},pe.setSliceCursor=function(c,p,f){var v=f.isTransitioning;if(!v){var h=c.datum();v=f.hideOnRoot&&pe.isHierarchyRoot(h)||f.hideOnLeaves&&pe.isLeaf(h)}R(c,v?null:"pointer")};function z(c,p,f){return{color:pe.getOutsideTextFontKey("color",c,p,f),family:pe.getOutsideTextFontKey("family",c,p,f),size:pe.getOutsideTextFontKey("size",c,p,f),weight:pe.getOutsideTextFontKey("weight",c,p,f),style:pe.getOutsideTextFontKey("style",c,p,f),variant:pe.getOutsideTextFontKey("variant",c,p,f),textcase:pe.getOutsideTextFontKey("textcase",c,p,f),lineposition:pe.getOutsideTextFontKey("lineposition",c,p,f),shadow:pe.getOutsideTextFontKey("shadow",c,p,f)}}function l(c,p,f,v){var h=(v||{}).onPathbar,m=p.data.data,_=m.i,x=le.castOption(c,_,(h?"pathbar.textfont":"insidetextfont")+".color");return!x&&c._input.textfont&&(x=le.castOption(c._input,_,"textfont.color")),{color:x||w.contrast(m.color),family:pe.getInsideTextFontKey("family",c,p,f,v),size:pe.getInsideTextFontKey("size",c,p,f,v),weight:pe.getInsideTextFontKey("weight",c,p,f,v),style:pe.getInsideTextFontKey("style",c,p,f,v),variant:pe.getInsideTextFontKey("variant",c,p,f,v),textcase:pe.getInsideTextFontKey("textcase",c,p,f,v),lineposition:pe.getInsideTextFontKey("lineposition",c,p,f,v),shadow:pe.getInsideTextFontKey("shadow",c,p,f,v)}}pe.getInsideTextFontKey=function(c,p,f,v,h){var m=(h||{}).onPathbar,_=m?"pathbar.textfont":"insidetextfont",x=f.data.data.i;return le.castOption(p,x,_+"."+c)||le.castOption(p,x,"textfont."+c)||v.size},pe.getOutsideTextFontKey=function(c,p,f,v){var h=f.data.data.i;return le.castOption(p,h,"outsidetextfont."+c)||le.castOption(p,h,"textfont."+c)||v.size},pe.isOutsideText=function(c,p){return!c._hasColorscale&&pe.isHierarchyRoot(p)},pe.determineTextFont=function(c,p,f,v){return pe.isOutsideText(c,p)?z(c,p,f):l(c,p,f,v)},pe.hasTransition=function(c){return!!(c&&c.duration>0)},pe.getMaxDepth=function(c){return c.maxdepth>=0?c.maxdepth:1/0},pe.isHeader=function(c,p){return!(pe.isLeaf(c)||c.depth===p._maxDepth-1)};function u(c){return c.data.data.pid}pe.getParent=function(c,p){return pe.findEntryWithLevel(c,u(p))},pe.listPath=function(c,p){var f=c.parent;if(!f)return[];var v=p?[f.data[p]]:[f];return pe.listPath(f,p).concat(v)},pe.getPath=function(c){return pe.listPath(c,"label").join("/")+"/"},pe.formatValue=O.formatPieValue,pe.formatPercent=function(c,p){var f=le.formatPercent(c,0);return f==="0%"&&(f=O.formatPiePercent(c,p)),f}}}),A6=U({"src/traces/sunburst/fx.js"(pe,le){var w=Ze(),R=Mi(),O=v0().appendArrayPointValue,z=Dp(),l=ii(),u=ih(),c=$M(),p=dy(),f=p.formatPieValue;le.exports=function(m,_,x,A,E){var D=A[0],g=D.trace,C=D.hierarchy,I=g.type==="sunburst",N=g.type==="treemap"||g.type==="icicle";"_hasHoverLabel"in g||(g._hasHoverLabel=!1),"_hasHoverEvent"in g||(g._hasHoverEvent=!1);var F=function(T){var y=x._fullLayout;if(!(x._dragging||y.hovermode===!1)){var S=x._fullData[g.index],M=T.data.data,W=M.i,$=c.isHierarchyRoot(T),Z=c.getParent(C,T),K=c.getValue(T),Q=function(Ee){return l.castOption(S,W,Ee)},J=Q("hovertemplate"),G=z.castHoverinfo(S,y,W),ee=y.separators,re;if(J||G&&G!=="none"&&G!=="skip"){var fe,we;I&&(fe=D.cx+T.pxmid[0]*(1-T.rInscribed),we=D.cy+T.pxmid[1]*(1-T.rInscribed)),N&&(fe=T._hoverX,we=T._hoverY);var Oe={},ke=[],Le=[],oe=function(Ee){return ke.indexOf(Ee)!==-1};G&&(ke=G==="all"?S._module.attributes.hoverinfo.flags:G.split("+")),Oe.label=M.label,oe("label")&&Oe.label&&Le.push(Oe.label),M.hasOwnProperty("v")&&(Oe.value=M.v,Oe.valueLabel=f(Oe.value,ee),oe("value")&&Le.push(Oe.valueLabel)),Oe.currentPath=T.currentPath=c.getPath(T.data),oe("current path")&&!$&&Le.push(Oe.currentPath);var be,_e=[],he=function(){_e.indexOf(be)===-1&&(Le.push(be),_e.push(be))};Oe.percentParent=T.percentParent=K/c.getValue(Z),Oe.parent=T.parentString=c.getPtLabel(Z),oe("percent parent")&&(be=c.formatPercent(Oe.percentParent,ee)+" of "+Oe.parent,he()),Oe.percentEntry=T.percentEntry=K/c.getValue(_),Oe.entry=T.entry=c.getPtLabel(_),oe("percent entry")&&!$&&!T.onPathbar&&(be=c.formatPercent(Oe.percentEntry,ee)+" of "+Oe.entry,he()),Oe.percentRoot=T.percentRoot=K/c.getValue(C),Oe.root=T.root=c.getPtLabel(C),oe("percent root")&&!$&&(be=c.formatPercent(Oe.percentRoot,ee)+" of "+Oe.root,he()),Oe.text=Q("hovertext")||Q("text"),oe("text")&&(be=Oe.text,l.isValidTextValue(be)&&Le.push(be)),re=[v(T,S,E.eventDataKeys)];var De={trace:S,y:we,_x0:T._x0,_x1:T._x1,_y0:T._y0,_y1:T._y1,text:Le.join("<br>"),name:J||oe("name")?S.name:void 0,color:Q("hoverlabel.bgcolor")||M.color,borderColor:Q("hoverlabel.bordercolor"),fontFamily:Q("hoverlabel.font.family"),fontSize:Q("hoverlabel.font.size"),fontColor:Q("hoverlabel.font.color"),fontWeight:Q("hoverlabel.font.weight"),fontStyle:Q("hoverlabel.font.style"),fontVariant:Q("hoverlabel.font.variant"),nameLength:Q("hoverlabel.namelength"),textAlign:Q("hoverlabel.align"),hovertemplate:J,hovertemplateLabels:Oe,eventData:re};I&&(De.x0=fe-T.rInscribed*T.rpx1,De.x1=fe+T.rInscribed*T.rpx1,De.idealAlign=T.pxmid[0]<0?"left":"right"),N&&(De.x=fe,De.idealAlign=fe<0?"left":"right");var xe=[];z.loneHover(De,{container:y._hoverlayer.node(),outerContainer:y._paper.node(),gd:x,inOut_bbox:xe}),re[0].bbox=xe[0],g._hasHoverLabel=!0}if(N){var se=m.select("path.surface");E.styleOne(se,T,S,x,{hovered:!0})}g._hasHoverEvent=!0,x.emit("plotly_hover",{points:re||[v(T,S,E.eventDataKeys)],event:w.event})}},k=function(T){var y=x._fullLayout,S=x._fullData[g.index],M=w.select(this).datum();if(g._hasHoverEvent&&(T.originalEvent=w.event,x.emit("plotly_unhover",{points:[v(M,S,E.eventDataKeys)],event:w.event}),g._hasHoverEvent=!1),g._hasHoverLabel&&(z.loneUnhover(y._hoverlayer.node()),g._hasHoverLabel=!1),N){var W=m.select("path.surface");E.styleOne(W,M,S,x,{hovered:!1})}},P=function(T){var y=x._fullLayout,S=x._fullData[g.index],M=I&&(c.isHierarchyRoot(T)||c.isLeaf(T)),W=c.getPtId(T),$=c.isEntry(T)?c.findEntryWithChild(C,W):c.findEntryWithLevel(C,W),Z=c.getPtId($),K={points:[v(T,S,E.eventDataKeys)],event:w.event};M||(K.nextLevel=Z);var Q=u.triggerHandler(x,"plotly_"+g.type+"click",K);if(Q!==!1&&y.hovermode&&(x._hoverdata=[v(T,S,E.eventDataKeys)],z.click(x,w.event)),!M&&Q!==!1&&!x._dragging&&!x._transitioning){R.call("_storeDirectGUIEdit",S,y._tracePreGUI[S.uid],{level:S.level});var J={data:[{level:Z}],traces:[g.index]},G={frame:{redraw:!1,duration:E.transitionTime},transition:{duration:E.transitionTime,easing:E.transitionEasing},mode:"immediate",fromcurrent:!0};z.loneUnhover(y._hoverlayer.node()),R.call("animate",x,J,G)}};m.on("mouseover",F),m.on("mouseout",k),m.on("click",P)};function v(h,m,_){for(var x=h.data.data,A={curveNumber:m.index,pointNumber:x.i,data:m._input,fullData:m},E=0;E<_.length;E++){var D=_[E];D in h&&(A[D]=h[D])}return"parentString"in h&&!c.isHierarchyRoot(h)&&(A.parent=h.parentString),O(A,m,x.i),A}}}),LF=U({"src/traces/sunburst/plot.js"(pe){var le=Ze(),w=OM(),R=(MI(),Me(OR)).interpolate,O=ec(),z=ii(),l=ah(),u=x0(),c=u.recordMinTextSize,p=u.clearMinTextSize,f=uI(),v=dy().getRotationAngle,h=f.computeTransform,m=f.transformInsideText,_=DU().styleOne,x=Xp().resizeText,A=A6(),E=h6(),D=$M();pe.plot=function(k,P,T,y){var S=k._fullLayout,M=S._sunburstlayer,W,$,Z=!T,K=!S.uniformtext.mode&&D.hasTransition(T);if(p("sunburst",S),W=M.selectAll("g.trace.sunburst").data(P,function(J){return J[0].trace.uid}),W.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),W.order(),K){y&&($=y());var Q=le.transition().duration(T.duration).ease(T.easing).each("end",function(){$&&$()}).each("interrupt",function(){$&&$()});Q.each(function(){M.selectAll("g.trace").each(function(J){g(k,J,this,T)})})}else W.each(function(J){g(k,J,this,T)}),S.uniformtext.mode&&x(k,S._sunburstlayer.selectAll(".trace"),"sunburst");Z&&W.exit().remove()};function g(k,P,T,y){var S=k._context.staticPlot,M=k._fullLayout,W=!M.uniformtext.mode&&D.hasTransition(y),$=le.select(T),Z=$.selectAll("g.slice"),K=P[0],Q=K.trace,J=K.hierarchy,G=D.findEntryWithLevel(J,Q.level),ee=D.getMaxDepth(Q),re=M._size,fe=Q.domain,we=re.w*(fe.x[1]-fe.x[0]),Oe=re.h*(fe.y[1]-fe.y[0]),ke=.5*Math.min(we,Oe),Le=K.cx=re.l+re.w*(fe.x[1]+fe.x[0])/2,oe=K.cy=re.t+re.h*(1-fe.y[0])-Oe/2;if(!G)return Z.remove();var be=null,_e={};W&&Z.each(function(Ue){_e[D.getPtId(Ue)]={rpx0:Ue.rpx0,rpx1:Ue.rpx1,x0:Ue.x0,x1:Ue.x1,transform:Ue.transform},!be&&D.isEntry(Ue)&&(be=Ue)});var he=C(G).descendants(),De=G.height+1,xe=0,se=ee;K.hasMultipleRoots&&D.isHierarchyRoot(G)&&(he=he.slice(1),De-=1,xe=1,se+=1),he=he.filter(function(Ue){return Ue.y1<=se});var Ee=v(Q.rotation);Ee&&he.forEach(function(Ue){Ue.x0+=Ee,Ue.x1+=Ee});var Te=Math.min(De,ee),Be=function(Ue){return(Ue-xe)/Te*ke},tt=function(Ue,xt){return[Ue*Math.cos(xt),-Ue*Math.sin(xt)]},at=function(Ue){return z.pathAnnulus(Ue.rpx0,Ue.rpx1,Ue.x0,Ue.x1,Le,oe)},gt=function(Ue){return Le+N(Ue)[0]*(Ue.transform.rCenter||0)+(Ue.transform.x||0)},pt=function(Ue){return oe+N(Ue)[1]*(Ue.transform.rCenter||0)+(Ue.transform.y||0)};Z=Z.data(he,D.getPtId),Z.enter().append("g").classed("slice",!0),W?Z.exit().transition().each(function(){var Ue=le.select(this),xt=Ue.select("path.surface");xt.transition().attrTween("d",function(Jt){var Ut=Ht(Jt);return function(kr){return at(Ut(kr))}});var Gt=Ue.select("g.slicetext");Gt.attr("opacity",0)}).remove():Z.exit().remove(),Z.order();var Rt=null;if(W&&be){var $t=D.getPtId(be);Z.each(function(Ue){Rt===null&&D.getPtId(Ue)===$t&&(Rt=Ue.x1)})}var Wt=Z;W&&(Wt=Wt.transition().each("end",function(){var Ue=le.select(this);D.setSliceCursor(Ue,k,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),Wt.each(function(Ue){var xt=le.select(this),Gt=z.ensureSingle(xt,"path","surface",function(rn){rn.style("pointer-events",S?"none":"all")});Ue.rpx0=Be(Ue.y0),Ue.rpx1=Be(Ue.y1),Ue.xmid=(Ue.x0+Ue.x1)/2,Ue.pxmid=tt(Ue.rpx1,Ue.xmid),Ue.midangle=-(Ue.xmid-Math.PI/2),Ue.startangle=-(Ue.x0-Math.PI/2),Ue.stopangle=-(Ue.x1-Math.PI/2),Ue.halfangle=.5*Math.min(z.angleDelta(Ue.x0,Ue.x1)||Math.PI,Math.PI),Ue.ring=1-Ue.rpx0/Ue.rpx1,Ue.rInscribed=I(Ue),W?Gt.transition().attrTween("d",function(rn){var kn=Ft(rn);return function(Rn){return at(kn(Rn))}}):Gt.attr("d",at),xt.call(A,G,k,P,{eventDataKeys:E.eventDataKeys,transitionTime:E.CLICK_TRANSITION_TIME,transitionEasing:E.CLICK_TRANSITION_EASING}).call(D.setSliceCursor,k,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:k._transitioning}),Gt.call(_,Ue,Q,k);var Jt=z.ensureSingle(xt,"g","slicetext"),Ut=z.ensureSingle(Jt,"text","",function(rn){rn.attr("data-notex",1)}),kr=z.ensureUniformFontSize(k,D.determineTextFont(Q,Ue,M.font));Ut.text(pe.formatSliceLabel(Ue,G,Q,P,M)).classed("slicetext",!0).attr("text-anchor","middle").call(O.font,kr).call(l.convertToTspans,k);var Pr=O.bBox(Ut.node());Ue.transform=m(Pr,Ue,K),Ue.transform.targetX=gt(Ue),Ue.transform.targetY=pt(Ue);var $r=function(rn,kn){var Rn=rn.transform;return h(Rn,kn),Rn.fontSize=kr.size,c(Q.type,Rn,M),z.getTextTransform(Rn)};W?Ut.transition().attrTween("transform",function(rn){var kn=st(rn);return function(Rn){return $r(kn(Rn),Pr)}}):Ut.attr("transform",$r(Ue,Pr))});function Ht(Ue){var xt=D.getPtId(Ue),Gt=_e[xt],Jt=_e[D.getPtId(G)],Ut;if(Jt){var kr=(Ue.x1>Jt.x1?2*Math.PI:0)+Ee;Ut=Ue.rpx1<Jt.rpx1?{x0:Ue.x0,x1:Ue.x1,rpx0:0,rpx1:0}:{x0:kr,x1:kr,rpx0:Ue.rpx0,rpx1:Ue.rpx1}}else{var Pr,$r=D.getPtId(Ue.parent);Z.each(function(In){if(D.getPtId(In)===$r)return Pr=In});var rn=Pr.children,kn;rn.forEach(function(In,Gn){if(D.getPtId(In)===xt)return kn=Gn});var Rn=rn.length,ci=R(Pr.x0,Pr.x1);Ut={rpx0:ke,rpx1:ke,x0:ci(kn/Rn),x1:ci((kn+1)/Rn)}}return R(Gt,Ut)}function Ft(Ue){var xt=_e[D.getPtId(Ue)],Gt,Jt={x0:Ue.x0,x1:Ue.x1,rpx0:Ue.rpx0,rpx1:Ue.rpx1};if(xt)Gt=xt;else if(be)if(Ue.parent)if(Rt){var Ut=(Ue.x1>Rt?2*Math.PI:0)+Ee;Gt={x0:Ut,x1:Ut}}else Gt={rpx0:ke,rpx1:ke},z.extendFlat(Gt,rt(Ue));else Gt={rpx0:0,rpx1:0};else Gt={x0:Ee,x1:Ee};return R(Gt,Jt)}function st(Ue){var xt=_e[D.getPtId(Ue)],Gt,Jt=Ue.transform;if(xt)Gt=xt;else if(Gt={rpx1:Ue.rpx1,transform:{textPosAngle:Jt.textPosAngle,scale:0,rotate:Jt.rotate,rCenter:Jt.rCenter,x:Jt.x,y:Jt.y}},be)if(Ue.parent)if(Rt){var Ut=Ue.x1>Rt?2*Math.PI:0;Gt.x0=Gt.x1=Ut}else z.extendFlat(Gt,rt(Ue));else Gt.x0=Gt.x1=Ee;else Gt.x0=Gt.x1=Ee;var kr=R(Gt.transform.textPosAngle,Ue.transform.textPosAngle),Pr=R(Gt.rpx1,Ue.rpx1),$r=R(Gt.x0,Ue.x0),rn=R(Gt.x1,Ue.x1),kn=R(Gt.transform.scale,Jt.scale),Rn=R(Gt.transform.rotate,Jt.rotate),ci=Jt.rCenter===0?3:Gt.transform.rCenter===0?1/3:1,In=R(Gt.transform.rCenter,Jt.rCenter),Gn=function(mr){return In(Math.pow(mr,ci))};return function(mr){var St=Pr(mr);$r(mr),rn(mr);var Ot=Gn(mr),Et=kr(mr),je={rpx1:St,transform:{textPosAngle:Et,rCenter:Ot,x:Jt.x,y:Jt.y}};return c(Q.type,Jt,M),{transform:{targetX:gt(je),targetY:pt(je),scale:kn(mr),rotate:Rn(mr),rCenter:Ot}}}}function rt(Ue){var xt=Ue.parent,Gt=_e[D.getPtId(xt)],Jt={};if(Gt){var Ut=xt.children,kr=Ut.indexOf(Ue),Pr=Ut.length,$r=R(Gt.x0,Gt.x1);Jt.x0=$r(kr/Pr),Jt.x1=$r(kr/Pr)}else Jt.x0=Jt.x1=0;return Jt}}function C(k){return w.partition().size([2*Math.PI,k.height+1])(k)}pe.formatSliceLabel=function(k,P,T,y,S){var M=T.texttemplate,W=T.textinfo;if(!M&&(!W||W==="none"))return"";var $=S.separators,Z=y[0],K=k.data.data,Q=Z.hierarchy,J=D.isHierarchyRoot(k),G=D.getParent(Q,k),ee=D.getValue(k);if(!M){var re=W.split("+"),fe=function(xe){return re.indexOf(xe)!==-1},we=[],Oe;if(fe("label")&&K.label&&we.push(K.label),K.hasOwnProperty("v")&&fe("value")&&we.push(D.formatValue(K.v,$)),!J){fe("current path")&&we.push(D.getPath(k.data));var ke=0;fe("percent parent")&&ke++,fe("percent entry")&&ke++,fe("percent root")&&ke++;var Le=ke>1;if(ke){var oe,be=function(xe){Oe=D.formatPercent(oe,$),Le&&(Oe+=" of "+xe),we.push(Oe)};fe("percent parent")&&!J&&(oe=ee/D.getValue(G),be("parent")),fe("percent entry")&&(oe=ee/D.getValue(P),be("entry")),fe("percent root")&&(oe=ee/D.getValue(Q),be("root"))}}return fe("text")&&(Oe=z.castOption(T,K.i,"text"),z.isValidTextValue(Oe)&&we.push(Oe)),we.join("<br>")}var _e=z.castOption(T,K.i,"texttemplate");if(!_e)return"";var he={};K.label&&(he.label=K.label),K.hasOwnProperty("v")&&(he.value=K.v,he.valueLabel=D.formatValue(K.v,$)),he.currentPath=D.getPath(k.data),J||(he.percentParent=ee/D.getValue(G),he.percentParentLabel=D.formatPercent(he.percentParent,$),he.parent=D.getPtLabel(G)),he.percentEntry=ee/D.getValue(P),he.percentEntryLabel=D.formatPercent(he.percentEntry,$),he.entry=D.getPtLabel(P),he.percentRoot=ee/D.getValue(Q),he.percentRootLabel=D.formatPercent(he.percentRoot,$),he.root=D.getPtLabel(Q),K.hasOwnProperty("color")&&(he.color=K.color);var De=z.castOption(T,K.i,"text");return(z.isValidTextValue(De)||De==="")&&(he.text=De),he.customdata=z.castOption(T,K.i,"customdata"),z.texttemplateString(_e,he,S._d3locale,he,T._meta||{})};function I(k){return k.rpx0===0&&z.isFullCircle([k.x0,k.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(k.halfangle)),k.ring/2))}function N(k){return F(k.rpx1,k.transform.textPosAngle)}function F(k,P){return[k*Math.sin(P),-k*Math.cos(P)]}}}),qZ=U({"src/traces/sunburst/index.js"(pe,le){le.exports={moduleType:"trace",name:"sunburst",basePlotModule:MF(),categories:[],animatable:!0,attributes:d3(),layoutAttributes:p6(),supplyDefaults:v6(),supplyLayoutDefaults:Uh(),calc:N1().calc,crossTraceCalc:N1().crossTraceCalc,plot:LF().plot,style:DU().style,colorbar:qg(),meta:{}}}}),GZ=U({"lib/sunburst.js"(pe,le){le.exports=qZ()}}),$Z=U({"src/traces/treemap/base_plot.js"(pe){var le=tp();pe.name="treemap",pe.plot=function(w,R,O,z){le.plotBasePlot(pe.name,w,R,O,z)},pe.clean=function(w,R,O,z){le.cleanBasePlot(pe.name,w,R,O,z)}}}),RI=U({"src/traces/treemap/constants.js"(pe,le){le.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}}}),OF=U({"src/traces/treemap/attributes.js"(pe,le){var w=Js().hovertemplateAttrs,R=Js().texttemplateAttrs,O=Jd(),z=oh().attributes,l=TS(),u=d3(),c=RI(),p=Ar().extendFlat,f=jl().pattern;le.exports={labels:u.labels,parents:u.parents,values:u.values,branchvalues:u.branchvalues,count:u.count,level:u.level,maxdepth:u.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:p({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:u.marker.colors,pattern:f,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:u.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},O("marker",{colorAttr:"colors",anim:!1})),pathbar:{visible:{valType:"boolean",dflt:!0,editType:"plot"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},edgeshape:{valType:"enumerated",values:[">","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:p({},l.textfont,{}),editType:"calc"},text:l.text,textinfo:u.textinfo,texttemplate:R({editType:"plot"},{keys:c.eventDataKeys.concat(["label","value"])}),hovertext:l.hovertext,hoverinfo:u.hoverinfo,hovertemplate:w({},{keys:c.eventDataKeys}),textfont:l.textfont,insidetextfont:l.insidetextfont,outsidetextfont:p({},l.outsidetextfont,{}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot"},sort:l.sort,root:u.root,domain:z({name:"treemap",trace:!0,editType:"calc"})}}}),LU=U({"src/traces/treemap/layout_attributes.js"(pe,le){le.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),WZ=U({"src/traces/treemap/defaults.js"(pe,le){var w=ii(),R=OF(),O=Lr(),z=oh().defaults,l=zb().handleText,u=th().TEXTPAD,c=ES().handleMarkerDefaults,p=vd(),f=p.hasColorscale,v=p.handleDefaults;le.exports=function(m,_,x,A){function E(S,M){return w.coerce(m,_,R,S,M)}var D=E("labels"),g=E("parents");if(!D||!D.length||!g||!g.length){_.visible=!1;return}var C=E("values");C&&C.length?E("branchvalues"):E("count"),E("level"),E("maxdepth");var I=E("tiling.packing");I==="squarify"&&E("tiling.squarifyratio"),E("tiling.flip"),E("tiling.pad");var N=E("text");E("texttemplate"),_.texttemplate||E("textinfo",w.isArrayOrTypedArray(N)?"text+label":"label"),E("hovertext"),E("hovertemplate");var F=E("pathbar.visible"),k="auto";l(m,_,A,E,k,{hasPathbar:F,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),E("textposition");var P=_.textposition.indexOf("bottom")!==-1;c(m,_,A,E);var T=_._hasColorscale=f(m,"marker","colors")||(m.marker||{}).coloraxis;T?v(m,_,A,E,{prefix:"marker.",cLetter:"c"}):E("marker.depthfade",!(_.marker.colors||[]).length);var y=_.textfont.size*2;E("marker.pad.t",P?y/4:y),E("marker.pad.l",y/4),E("marker.pad.r",y/4),E("marker.pad.b",P?y:y/4),E("marker.cornerradius"),_._hovered={marker:{line:{width:2,color:O.contrast(A.paper_bgcolor)}}},F&&(E("pathbar.thickness",_.pathbar.textfont.size+2*u),E("pathbar.side"),E("pathbar.edgeshape")),E("sort"),E("root.color"),z(_,A,E),_._length=null}}}),YZ=U({"src/traces/treemap/layout_defaults.js"(pe,le){var w=ii(),R=LU();le.exports=function(z,l){function u(c,p){return w.coerce(z,l,R,c,p)}u("treemapcolorway",l.colorway),u("extendtreemapcolors")}}}),OU=U({"src/traces/treemap/calc.js"(pe){var le=N1();pe.calc=function(w,R){return le.calc(w,R)},pe.crossTraceCalc=function(w){return le._runCrossTraceCalc("treemap",w)}}}),Ge=U({"src/traces/treemap/flip_tree.js"(pe,le){le.exports=function w(R,O,z){var l;z.swapXY&&(l=R.x0,R.x0=R.y0,R.y0=l,l=R.x1,R.x1=R.y1,R.y1=l),z.flipX&&(l=R.x0,R.x0=O[0]-R.x1,R.x1=O[0]-l),z.flipY&&(l=R.y0,R.y0=O[1]-R.y1,R.y1=O[1]-l);var u=R.children;if(u)for(var c=0;c<u.length;c++)w(u[c],O,z)}}}),ft=U({"src/traces/treemap/partition.js"(pe,le){var w=OM(),R=Ge();le.exports=function(l,u,c){var p=c.flipX,f=c.flipY,v=c.packing==="dice-slice",h=c.pad[f?"bottom":"top"],m=c.pad[p?"right":"left"],_=c.pad[p?"left":"right"],x=c.pad[f?"top":"bottom"],A;v&&(A=m,m=h,h=A,A=_,_=x,x=A);var E=w.treemap().tile(O(c.packing,c.squarifyratio)).paddingInner(c.pad.inner).paddingLeft(m).paddingRight(_).paddingTop(h).paddingBottom(x).size(v?[u[1],u[0]]:u)(l);return(v||p||f)&&R(E,u,{swapXY:v,flipX:p,flipY:f}),E};function O(z,l){switch(z){case"squarify":return w.treemapSquarify.ratio(l);case"binary":return w.treemapBinary;case"dice":return w.treemapDice;case"slice":return w.treemapSlice;default:return w.treemapSliceDice}}}}),ur=U({"src/traces/treemap/style.js"(pe,le){var w=Ze(),R=Lr(),O=ii(),z=$M(),l=x0().resizeText,u=DF();function c(f){var v=f._fullLayout._treemaplayer.selectAll(".trace");l(f,v,"treemap"),v.each(function(h){var m=w.select(this),_=h[0],x=_.trace;m.style("opacity",x.opacity),m.selectAll("path.surface").each(function(A){w.select(this).call(p,A,x,f,{hovered:!1})})})}function p(f,v,h,m,_){var x=(_||{}).hovered,A=v.data.data,E=A.i,D,g,C=A.color,I=z.isHierarchyRoot(v),N=1;if(x)D=h._hovered.marker.line.color,g=h._hovered.marker.line.width;else if(I&&C===h.root.color)N=100,D="rgba(0,0,0,0)",g=0;else if(D=O.castOption(h,E,"marker.line.color")||R.defaultLine,g=O.castOption(h,E,"marker.line.width")||0,!h._hasColorscale&&!v.onPathbar){var F=h.marker.depthfade;if(F){var k=R.combine(R.addOpacity(h._backgroundColor,.75),C),P;if(F===!0){var T=z.getMaxDepth(h);isFinite(T)?z.isLeaf(v)?P=0:P=h._maxVisibleLayers-(v.data.depth-h._entryDepth):P=v.data.height+1}else P=v.data.depth-h._entryDepth,h._atRootLevel||P++;if(P>0)for(var y=0;y<P;y++){var S=.5*y/P;C=R.combine(R.addOpacity(k,S),C)}}}f.call(u,v,h,m,C).style("stroke-width",g).call(R.stroke,D).style("opacity",N)}le.exports={style:c,styleOne:p}}}),fn=U({"src/traces/treemap/draw_ancestors.js"(pe,le){var w=Ze(),R=ii(),O=ec(),z=ah(),l=ft(),u=ur().styleOne,c=RI(),p=$M(),f=A6(),v=!0;le.exports=function(m,_,x,A,E){var D=E.barDifY,g=E.width,C=E.height,I=E.viewX,N=E.viewY,F=E.pathSlice,k=E.toMoveInsideSlice,P=E.strTransform,T=E.hasTransition,y=E.handleSlicesExit,S=E.makeUpdateSliceInterpolator,M=E.makeUpdateTextInterpolator,W={},$=m._context.staticPlot,Z=m._fullLayout,K=_[0],Q=K.trace,J=K.hierarchy,G=g/Q._entryDepth,ee=p.listPath(x.data,"id"),re=l(J.copy(),[g,C],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();re=re.filter(function(we){var Oe=ee.indexOf(we.data.id);return Oe===-1?!1:(we.x0=G*Oe,we.x1=G*(Oe+1),we.y0=D,we.y1=D+C,we.onPathbar=!0,!0)}),re.reverse(),A=A.data(re,p.getPtId),A.enter().append("g").classed("pathbar",!0),y(A,v,W,[g,C],F),A.order();var fe=A;T&&(fe=fe.transition().each("end",function(){var we=w.select(this);p.setSliceCursor(we,m,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),fe.each(function(we){we._x0=I(we.x0),we._x1=I(we.x1),we._y0=N(we.y0),we._y1=N(we.y1),we._hoverX=I(we.x1-Math.min(g,C)/2),we._hoverY=N(we.y1-C/2);var Oe=w.select(this),ke=R.ensureSingle(Oe,"path","surface",function(_e){_e.style("pointer-events",$?"none":"all")});T?ke.transition().attrTween("d",function(_e){var he=S(_e,v,W,[g,C]);return function(De){return F(he(De))}}):ke.attr("d",F),Oe.call(f,x,m,_,{styleOne:u,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(p.setSliceCursor,m,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:m._transitioning}),ke.call(u,we,Q,m,{hovered:!1}),we._text=(p.getPtLabel(we)||"").split("<br>").join(" ")||"";var Le=R.ensureSingle(Oe,"g","slicetext"),oe=R.ensureSingle(Le,"text","",function(_e){_e.attr("data-notex",1)}),be=R.ensureUniformFontSize(m,p.determineTextFont(Q,we,Z.font,{onPathbar:!0}));oe.text(we._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(O.font,be).call(z.convertToTspans,m),we.textBB=O.bBox(oe.node()),we.transform=k(we,{fontSize:be.size,onPathbar:!0}),we.transform.fontSize=be.size,T?oe.transition().attrTween("transform",function(_e){var he=M(_e,v,W,[g,C]);return function(De){return P(he(De))}}):oe.attr("transform",P(we))})}}}),mi=U({"src/traces/treemap/plot_one.js"(pe,le){var w=Ze(),R=(MI(),Me(OR)).interpolate,O=$M(),z=ii(),l=th().TEXTPAD,u=by(),c=u.toMoveInsideBar,p=x0(),f=p.recordMinTextSize,v=RI(),h=fn();function m(_){return O.isHierarchyRoot(_)?"":O.getPtId(_)}le.exports=function(x,A,E,D,g){var C=x._fullLayout,I=A[0],N=I.trace,F=N.type,k=F==="icicle",P=I.hierarchy,T=O.findEntryWithLevel(P,N.level),y=w.select(E),S=y.selectAll("g.pathbar"),M=y.selectAll("g.slice");if(!T){S.remove(),M.remove();return}var W=O.isHierarchyRoot(T),$=!C.uniformtext.mode&&O.hasTransition(D),Z=O.getMaxDepth(N),K=function(In){return In.data.depth-T.data.depth<Z},Q=C._size,J=N.domain,G=Q.w*(J.x[1]-J.x[0]),ee=Q.h*(J.y[1]-J.y[0]),re=G,fe=N.pathbar.thickness,we=N.marker.line.width+v.gapWithPathbar,Oe=N.pathbar.visible?N.pathbar.side.indexOf("bottom")>-1?ee+we:-(fe+we):0,ke={x0:re,x1:re,y0:Oe,y1:Oe+fe},Le=function(In,Gn,mr){var St=N.tiling.pad,Ot=function(et){return et-St<=Gn.x0},Et=function(et){return et+St>=Gn.x1},je=function(et){return et-St<=Gn.y0},Ye=function(et){return et+St>=Gn.y1};return In.x0===Gn.x0&&In.x1===Gn.x1&&In.y0===Gn.y0&&In.y1===Gn.y1?{x0:In.x0,x1:In.x1,y0:In.y0,y1:In.y1}:{x0:Ot(In.x0-St)?0:Et(In.x0-St)?mr[0]:In.x0,x1:Ot(In.x1+St)?0:Et(In.x1+St)?mr[0]:In.x1,y0:je(In.y0-St)?0:Ye(In.y0-St)?mr[1]:In.y0,y1:je(In.y1+St)?0:Ye(In.y1+St)?mr[1]:In.y1}},oe=null,be={},_e={},he=null,De=function(In,Gn){return Gn?be[m(In)]:_e[m(In)]},xe=function(In,Gn,mr,St){if(Gn)return be[m(P)]||ke;var Ot=_e[N.level]||mr;return K(In)?Le(In,Ot,St):{}};I.hasMultipleRoots&&W&&Z++,N._maxDepth=Z,N._backgroundColor=C.paper_bgcolor,N._entryDepth=T.data.depth,N._atRootLevel=W;var se=-G/2+Q.l+Q.w*(J.x[1]+J.x[0])/2,Ee=-ee/2+Q.t+Q.h*(1-(J.y[1]+J.y[0])/2),Te=function(In){return se+In},Be=function(In){return Ee+In},tt=Be(0),at=Te(0),gt=function(In){return at+In},pt=function(In){return tt+In};function Rt(In,Gn){return In+","+Gn}var $t=gt(0),Wt=function(In){In.x=Math.max($t,In.x)},Ht=N.pathbar.edgeshape,Ft=function(In){var Gn=gt(Math.max(Math.min(In.x0,In.x0),0)),mr=gt(Math.min(Math.max(In.x1,In.x1),re)),St=pt(In.y0),Ot=pt(In.y1),Et=fe/2,je={},Ye={};je.x=Gn,Ye.x=mr,je.y=Ye.y=(St+Ot)/2;var et={x:Gn,y:St},mt={x:mr,y:St},Nt={x:mr,y:Ot},lr={x:Gn,y:Ot};return Ht===">"?(et.x-=Et,mt.x-=Et,Nt.x-=Et,lr.x-=Et):Ht==="/"?(Nt.x-=Et,lr.x-=Et,je.x-=Et/2,Ye.x-=Et/2):Ht==="\\"?(et.x-=Et,mt.x-=Et,je.x-=Et/2,Ye.x-=Et/2):Ht==="<"&&(je.x-=Et,Ye.x-=Et),Wt(et),Wt(lr),Wt(je),Wt(mt),Wt(Nt),Wt(Ye),"M"+Rt(et.x,et.y)+"L"+Rt(mt.x,mt.y)+"L"+Rt(Ye.x,Ye.y)+"L"+Rt(Nt.x,Nt.y)+"L"+Rt(lr.x,lr.y)+"L"+Rt(je.x,je.y)+"Z"},st=N[k?"tiling":"marker"].pad,rt=function(In){return N.textposition.indexOf(In)!==-1},Ue=rt("top"),xt=rt("left"),Gt=rt("right"),Jt=rt("bottom"),Ut=function(In){var Gn=Te(In.x0),mr=Te(In.x1),St=Be(In.y0),Ot=Be(In.y1),Et=mr-Gn,je=Ot-St;if(!Et||!je)return"";var Ye=N.marker.cornerradius||0,et=Math.min(Ye,Et/2,je/2);et&&In.data&&In.data.data&&In.data.data.label&&(Ue&&(et=Math.min(et,st.t)),xt&&(et=Math.min(et,st.l)),Gt&&(et=Math.min(et,st.r)),Jt&&(et=Math.min(et,st.b)));var mt=function(Nt,lr){return et?"a"+Rt(et,et)+" 0 0 1 "+Rt(Nt,lr):""};return"M"+Rt(Gn,St+et)+mt(et,-et)+"L"+Rt(mr-et,St)+mt(et,et)+"L"+Rt(mr,Ot-et)+mt(-et,et)+"L"+Rt(Gn+et,Ot)+mt(-et,-et)+"Z"},kr=function(In,Gn){var mr=In.x0,St=In.x1,Ot=In.y0,Et=In.y1,je=In.textBB,Ye=Ue||Gn.isHeader&&!Jt,et=Ye?"start":Jt?"end":"middle",mt=rt("right"),Nt=rt("left")||Gn.onPathbar,lr=Nt?-1:mt?1:0;if(Gn.isHeader){if(mr+=(k?st:st.l)-l,St-=(k?st:st.r)-l,mr>=St){var br=(mr+St)/2;mr=br,St=br}var Or;Jt?(Or=Et-(k?st:st.b),Ot<Or&&Or<Et&&(Ot=Or)):(Or=Ot+(k?st:st.t),Ot<Or&&Or<Et&&(Et=Or))}var tn=c(mr,St,Ot,Et,je,{isHorizontal:!1,constrained:!0,angle:0,anchor:et,leftToRight:lr});return tn.fontSize=Gn.fontSize,tn.targetX=Te(tn.targetX),tn.targetY=Be(tn.targetY),isNaN(tn.targetX)||isNaN(tn.targetY)?{}:(mr!==St&&Ot!==Et&&f(N.type,tn,C),{scale:tn.scale,rotate:tn.rotate,textX:tn.textX,textY:tn.textY,anchorX:tn.anchorX,anchorY:tn.anchorY,targetX:tn.targetX,targetY:tn.targetY})},Pr=function(In,Gn){for(var mr,St=0,Ot=In;!mr&&St<Z;)St++,Ot=Ot.parent,Ot?mr=De(Ot,Gn):St=Z;return mr||{}},$r=function(In,Gn,mr,St){var Ot=De(In,Gn),Et;if(Gn)Et=ke;else{var je=De(T,Gn);je?Et=Le(In,je,St):Et={}}return R(Ot,Et)},rn=function(In,Gn,mr,St,Ot){var Et=De(In,Gn),je;if(Et)je=Et;else if(Gn)je=ke;else if(oe)if(In.parent){var Ye=he||mr;Ye&&!Gn?je=Le(In,Ye,St):(je={},z.extendFlat(je,Pr(In,Gn)))}else je=z.extendFlat({},In),k&&(Ot.orientation==="h"?Ot.flipX?je.x0=In.x1:je.x1=0:Ot.flipY?je.y0=In.y1:je.y1=0);else je={};return R(je,{x0:In.x0,x1:In.x1,y0:In.y0,y1:In.y1})},kn=function(In,Gn,mr,St){var Ot=De(In,Gn),Et={},je=xe(In,Gn,mr,St);z.extendFlat(Et,{transform:kr({x0:je.x0,x1:je.x1,y0:je.y0,y1:je.y1,textBB:In.textBB,_text:In._text},{isHeader:O.isHeader(In,N)})}),Ot?Et=Ot:In.parent&&z.extendFlat(Et,Pr(In,Gn));var Ye=In.transform;return In.x0!==In.x1&&In.y0!==In.y1&&f(N.type,Ye,C),R(Et,{transform:{scale:Ye.scale,rotate:Ye.rotate,textX:Ye.textX,textY:Ye.textY,anchorX:Ye.anchorX,anchorY:Ye.anchorY,targetX:Ye.targetX,targetY:Ye.targetY}})},Rn=function(In,Gn,mr,St,Ot){var Et=St[0],je=St[1];$?In.exit().transition().each(function(){var Ye=w.select(this),et=Ye.select("path.surface");et.transition().attrTween("d",function(Nt){var lr=$r(Nt,Gn,mr,[Et,je]);return function(br){return Ot(lr(br))}});var mt=Ye.select("g.slicetext");mt.attr("opacity",0)}).remove():In.exit().remove()},ci=function(In){var Gn=In.transform;return In.x0!==In.x1&&In.y0!==In.y1&&f(N.type,Gn,C),z.getTextTransform({textX:Gn.textX,textY:Gn.textY,anchorX:Gn.anchorX,anchorY:Gn.anchorY,targetX:Gn.targetX,targetY:Gn.targetY,scale:Gn.scale,rotate:Gn.rotate})};$&&(S.each(function(In){be[m(In)]={x0:In.x0,x1:In.x1,y0:In.y0,y1:In.y1},In.transform&&(be[m(In)].transform={textX:In.transform.textX,textY:In.transform.textY,anchorX:In.transform.anchorX,anchorY:In.transform.anchorY,targetX:In.transform.targetX,targetY:In.transform.targetY,scale:In.transform.scale,rotate:In.transform.rotate})}),M.each(function(In){_e[m(In)]={x0:In.x0,x1:In.x1,y0:In.y0,y1:In.y1},In.transform&&(_e[m(In)].transform={textX:In.transform.textX,textY:In.transform.textY,anchorX:In.transform.anchorX,anchorY:In.transform.anchorY,targetX:In.transform.targetX,targetY:In.transform.targetY,scale:In.transform.scale,rotate:In.transform.rotate}),!oe&&O.isEntry(In)&&(oe=In)})),he=g(x,A,T,M,{width:G,height:ee,viewX:Te,viewY:Be,pathSlice:Ut,toMoveInsideSlice:kr,prevEntry:oe,makeUpdateSliceInterpolator:rn,makeUpdateTextInterpolator:kn,handleSlicesExit:Rn,hasTransition:$,strTransform:ci}),N.pathbar.visible?h(x,A,T,S,{barDifY:Oe,width:re,height:fe,viewX:gt,viewY:pt,pathSlice:Ft,toMoveInsideSlice:kr,makeUpdateSliceInterpolator:rn,makeUpdateTextInterpolator:kn,handleSlicesExit:Rn,hasTransition:$,strTransform:ci}):S.remove()}}}),la=U({"src/traces/treemap/draw.js"(pe,le){var w=Ze(),R=$M(),O=x0(),z=O.clearMinTextSize,l=Xp().resizeText,u=mi();le.exports=function(p,f,v,h,m){var _=m.type,x=m.drawDescendants,A=p._fullLayout,E=A["_"+_+"layer"],D,g,C=!v;if(z(_,A),D=E.selectAll("g.trace."+_).data(f,function(N){return N[0].trace.uid}),D.enter().append("g").classed("trace",!0).classed(_,!0),D.order(),!A.uniformtext.mode&&R.hasTransition(v)){h&&(g=h());var I=w.transition().duration(v.duration).ease(v.easing).each("end",function(){g&&g()}).each("interrupt",function(){g&&g()});I.each(function(){E.selectAll("g.trace").each(function(N){u(p,N,this,v,x)})})}else D.each(function(N){u(p,N,this,v,x)}),A.uniformtext.mode&&l(p,E.selectAll(".trace"),_);C&&D.exit().remove()}}}),lo=U({"src/traces/treemap/draw_descendants.js"(pe,le){var w=Ze(),R=ii(),O=ec(),z=ah(),l=ft(),u=ur().styleOne,c=RI(),p=$M(),f=A6(),v=LF().formatSliceLabel,h=!1;le.exports=function(_,x,A,E,D){var g=D.width,C=D.height,I=D.viewX,N=D.viewY,F=D.pathSlice,k=D.toMoveInsideSlice,P=D.strTransform,T=D.hasTransition,y=D.handleSlicesExit,S=D.makeUpdateSliceInterpolator,M=D.makeUpdateTextInterpolator,W=D.prevEntry,$={},Z=_._context.staticPlot,K=_._fullLayout,Q=x[0],J=Q.trace,G=J.textposition.indexOf("left")!==-1,ee=J.textposition.indexOf("right")!==-1,re=J.textposition.indexOf("bottom")!==-1,fe=!re&&!J.marker.pad.t||re&&!J.marker.pad.b,we=l(A,[g,C],{packing:J.tiling.packing,squarifyratio:J.tiling.squarifyratio,flipX:J.tiling.flip.indexOf("x")>-1,flipY:J.tiling.flip.indexOf("y")>-1,pad:{inner:J.tiling.pad,top:J.marker.pad.t,left:J.marker.pad.l,right:J.marker.pad.r,bottom:J.marker.pad.b}}),Oe=we.descendants(),ke=1/0,Le=-1/0;Oe.forEach(function(De){var xe=De.depth;xe>=J._maxDepth?(De.x0=De.x1=(De.x0+De.x1)/2,De.y0=De.y1=(De.y0+De.y1)/2):(ke=Math.min(ke,xe),Le=Math.max(Le,xe))}),E=E.data(Oe,p.getPtId),J._maxVisibleLayers=isFinite(Le)?Le-ke+1:0,E.enter().append("g").classed("slice",!0),y(E,h,$,[g,C],F),E.order();var oe=null;if(T&&W){var be=p.getPtId(W);E.each(function(De){oe===null&&p.getPtId(De)===be&&(oe={x0:De.x0,x1:De.x1,y0:De.y0,y1:De.y1})})}var _e=function(){return oe||{x0:0,x1:g,y0:0,y1:C}},he=E;return T&&(he=he.transition().each("end",function(){var De=w.select(this);p.setSliceCursor(De,_,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),he.each(function(De){var xe=p.isHeader(De,J);De._x0=I(De.x0),De._x1=I(De.x1),De._y0=N(De.y0),De._y1=N(De.y1),De._hoverX=I(De.x1-J.marker.pad.r),De._hoverY=N(re?De.y1-J.marker.pad.b/2:De.y0+J.marker.pad.t/2);var se=w.select(this),Ee=R.ensureSingle(se,"path","surface",function(pt){pt.style("pointer-events",Z?"none":"all")});T?Ee.transition().attrTween("d",function(pt){var Rt=S(pt,h,_e(),[g,C]);return function($t){return F(Rt($t))}}):Ee.attr("d",F),se.call(f,A,_,x,{styleOne:u,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(p.setSliceCursor,_,{isTransitioning:_._transitioning}),Ee.call(u,De,J,_,{hovered:!1}),De.x0===De.x1||De.y0===De.y1?De._text="":xe?De._text=fe?"":p.getPtLabel(De)||"":De._text=v(De,A,J,x,K)||"";var Te=R.ensureSingle(se,"g","slicetext"),Be=R.ensureSingle(Te,"text","",function(pt){pt.attr("data-notex",1)}),tt=R.ensureUniformFontSize(_,p.determineTextFont(J,De,K.font)),at=De._text||" ",gt=xe&&at.indexOf("<br>")===-1;Be.text(at).classed("slicetext",!0).attr("text-anchor",ee?"end":G||gt?"start":"middle").call(O.font,tt).call(z.convertToTspans,_),De.textBB=O.bBox(Be.node()),De.transform=k(De,{fontSize:tt.size,isHeader:xe}),De.transform.fontSize=tt.size,T?Be.transition().attrTween("transform",function(pt){var Rt=M(pt,h,_e(),[g,C]);return function($t){return P(Rt($t))}}):Be.attr("transform",P(De))}),oe}}}),Lo=U({"src/traces/treemap/plot.js"(pe,le){var w=la(),R=lo();le.exports=function(z,l,u,c){return w(z,l,u,c,{type:"treemap",drawDescendants:R})}}}),ds=U({"src/traces/treemap/index.js"(pe,le){le.exports={moduleType:"trace",name:"treemap",basePlotModule:$Z(),categories:[],animatable:!0,attributes:OF(),layoutAttributes:LU(),supplyDefaults:WZ(),supplyLayoutDefaults:YZ(),calc:OU().calc,crossTraceCalc:OU().crossTraceCalc,plot:Lo(),style:ur().style,colorbar:qg(),meta:{}}}}),Ll=U({"lib/treemap.js"(pe,le){le.exports=ds()}}),Nl=U({"src/traces/icicle/base_plot.js"(pe){var le=tp();pe.name="icicle",pe.plot=function(w,R,O,z){le.plotBasePlot(pe.name,w,R,O,z)},pe.clean=function(w,R,O,z){le.cleanBasePlot(pe.name,w,R,O,z)}}}),Kl=U({"src/traces/icicle/attributes.js"(pe,le){var w=Js().hovertemplateAttrs,R=Js().texttemplateAttrs,O=Jd(),z=oh().attributes,l=TS(),u=d3(),c=OF(),p=RI(),f=Ar().extendFlat,v=jl().pattern;le.exports={labels:u.labels,parents:u.parents,values:u.values,branchvalues:u.branchvalues,count:u.count,level:u.level,maxdepth:u.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:c.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:f({colors:u.marker.colors,line:u.marker.line,pattern:v,editType:"calc"},O("marker",{colorAttr:"colors",anim:!1})),leaf:u.leaf,pathbar:c.pathbar,text:l.text,textinfo:u.textinfo,texttemplate:R({editType:"plot"},{keys:p.eventDataKeys.concat(["label","value"])}),hovertext:l.hovertext,hoverinfo:u.hoverinfo,hovertemplate:w({},{keys:p.eventDataKeys}),textfont:l.textfont,insidetextfont:l.insidetextfont,outsidetextfont:c.outsidetextfont,textposition:c.textposition,sort:l.sort,root:u.root,domain:z({name:"icicle",trace:!0,editType:"calc"})}}}),vc=U({"src/traces/icicle/layout_attributes.js"(pe,le){le.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),lf=U({"src/traces/icicle/defaults.js"(pe,le){var w=ii(),R=Kl(),O=Lr(),z=oh().defaults,l=zb().handleText,u=th().TEXTPAD,c=ES().handleMarkerDefaults,p=vd(),f=p.hasColorscale,v=p.handleDefaults;le.exports=function(m,_,x,A){function E(P,T){return w.coerce(m,_,R,P,T)}var D=E("labels"),g=E("parents");if(!D||!D.length||!g||!g.length){_.visible=!1;return}var C=E("values");C&&C.length?E("branchvalues"):E("count"),E("level"),E("maxdepth"),E("tiling.orientation"),E("tiling.flip"),E("tiling.pad");var I=E("text");E("texttemplate"),_.texttemplate||E("textinfo",w.isArrayOrTypedArray(I)?"text+label":"label"),E("hovertext"),E("hovertemplate");var N=E("pathbar.visible"),F="auto";l(m,_,A,E,F,{hasPathbar:N,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),E("textposition"),c(m,_,A,E);var k=_._hasColorscale=f(m,"marker","colors")||(m.marker||{}).coloraxis;k&&v(m,_,A,E,{prefix:"marker.",cLetter:"c"}),E("leaf.opacity",k?1:.7),_._hovered={marker:{line:{width:2,color:O.contrast(A.paper_bgcolor)}}},N&&(E("pathbar.thickness",_.pathbar.textfont.size+2*u),E("pathbar.side"),E("pathbar.edgeshape")),E("sort"),E("root.color"),z(_,A,E),_._length=null}}}),ad=U({"src/traces/icicle/layout_defaults.js"(pe,le){var w=ii(),R=vc();le.exports=function(z,l){function u(c,p){return w.coerce(z,l,R,c,p)}u("iciclecolorway",l.colorway),u("extendiciclecolors")}}}),_h=U({"src/traces/icicle/calc.js"(pe){var le=N1();pe.calc=function(w,R){return le.calc(w,R)},pe.crossTraceCalc=function(w){return le._runCrossTraceCalc("icicle",w)}}}),od=U({"src/traces/icicle/partition.js"(pe,le){var w=OM(),R=Ge();le.exports=function(z,l,u){var c=u.flipX,p=u.flipY,f=u.orientation==="h",v=u.maxDepth,h=l[0],m=l[1];v&&(h=(z.height+1)*l[0]/Math.min(z.height+1,v),m=(z.height+1)*l[1]/Math.min(z.height+1,v));var _=w.partition().padding(u.pad.inner).size(f?[l[1],h]:[l[0],m])(z);return(f||c||p)&&R(_,l,{swapXY:f,flipX:c,flipY:p}),_}}}),ap=U({"src/traces/icicle/style.js"(pe,le){var w=Ze(),R=Lr(),O=ii(),z=x0().resizeText,l=DF();function u(p){var f=p._fullLayout._iciclelayer.selectAll(".trace");z(p,f,"icicle"),f.each(function(v){var h=w.select(this),m=v[0],_=m.trace;h.style("opacity",_.opacity),h.selectAll("path.surface").each(function(x){w.select(this).call(c,x,_,p)})})}function c(p,f,v,h){var m=f.data.data,_=!f.children,x=m.i,A=O.castOption(v,x,"marker.line.color")||R.defaultLine,E=O.castOption(v,x,"marker.line.width")||0;p.call(l,f,v,h).style("stroke-width",E).call(R.stroke,A).style("opacity",_?v.leaf.opacity:null)}le.exports={style:u,styleOne:c}}}),Gp=U({"src/traces/icicle/draw_descendants.js"(pe,le){var w=Ze(),R=ii(),O=ec(),z=ah(),l=od(),u=ap().styleOne,c=RI(),p=$M(),f=A6(),v=LF().formatSliceLabel,h=!1;le.exports=function(_,x,A,E,D){var g=D.width,C=D.height,I=D.viewX,N=D.viewY,F=D.pathSlice,k=D.toMoveInsideSlice,P=D.strTransform,T=D.hasTransition,y=D.handleSlicesExit,S=D.makeUpdateSliceInterpolator,M=D.makeUpdateTextInterpolator,W=D.prevEntry,$={},Z=_._context.staticPlot,K=_._fullLayout,Q=x[0],J=Q.trace,G=J.textposition.indexOf("left")!==-1,ee=J.textposition.indexOf("right")!==-1,re=J.textposition.indexOf("bottom")!==-1,fe=l(A,[g,C],{flipX:J.tiling.flip.indexOf("x")>-1,flipY:J.tiling.flip.indexOf("y")>-1,orientation:J.tiling.orientation,pad:{inner:J.tiling.pad},maxDepth:J._maxDepth}),we=fe.descendants(),Oe=1/0,ke=-1/0;we.forEach(function(he){var De=he.depth;De>=J._maxDepth?(he.x0=he.x1=(he.x0+he.x1)/2,he.y0=he.y1=(he.y0+he.y1)/2):(Oe=Math.min(Oe,De),ke=Math.max(ke,De))}),E=E.data(we,p.getPtId),J._maxVisibleLayers=isFinite(ke)?ke-Oe+1:0,E.enter().append("g").classed("slice",!0),y(E,h,$,[g,C],F),E.order();var Le=null;if(T&&W){var oe=p.getPtId(W);E.each(function(he){Le===null&&p.getPtId(he)===oe&&(Le={x0:he.x0,x1:he.x1,y0:he.y0,y1:he.y1})})}var be=function(){return Le||{x0:0,x1:g,y0:0,y1:C}},_e=E;return T&&(_e=_e.transition().each("end",function(){var he=w.select(this);p.setSliceCursor(he,_,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),_e.each(function(he){he._x0=I(he.x0),he._x1=I(he.x1),he._y0=N(he.y0),he._y1=N(he.y1),he._hoverX=I(he.x1-J.tiling.pad),he._hoverY=N(re?he.y1-J.tiling.pad/2:he.y0+J.tiling.pad/2);var De=w.select(this),xe=R.ensureSingle(De,"path","surface",function(Be){Be.style("pointer-events",Z?"none":"all")});T?xe.transition().attrTween("d",function(Be){var tt=S(Be,h,be(),[g,C],{orientation:J.tiling.orientation,flipX:J.tiling.flip.indexOf("x")>-1,flipY:J.tiling.flip.indexOf("y")>-1});return function(at){return F(tt(at))}}):xe.attr("d",F),De.call(f,A,_,x,{styleOne:u,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(p.setSliceCursor,_,{isTransitioning:_._transitioning}),xe.call(u,he,J,_,{hovered:!1}),he.x0===he.x1||he.y0===he.y1?he._text="":he._text=v(he,A,J,x,K)||"";var se=R.ensureSingle(De,"g","slicetext"),Ee=R.ensureSingle(se,"text","",function(Be){Be.attr("data-notex",1)}),Te=R.ensureUniformFontSize(_,p.determineTextFont(J,he,K.font));Ee.text(he._text||" ").classed("slicetext",!0).attr("text-anchor",ee?"end":G?"start":"middle").call(O.font,Te).call(z.convertToTspans,_),he.textBB=O.bBox(Ee.node()),he.transform=k(he,{fontSize:Te.size}),he.transform.fontSize=Te.size,T?Ee.transition().attrTween("transform",function(Be){var tt=M(Be,h,be(),[g,C]);return function(at){return P(tt(at))}}):Ee.attr("transform",P(he))}),Le}}}),T2=U({"src/traces/icicle/plot.js"(pe,le){var w=la(),R=Gp();le.exports=function(z,l,u,c){return w(z,l,u,c,{type:"icicle",drawDescendants:R})}}}),R_=U({"src/traces/icicle/index.js"(pe,le){le.exports={moduleType:"trace",name:"icicle",basePlotModule:Nl(),categories:[],animatable:!0,attributes:Kl(),layoutAttributes:vc(),supplyDefaults:lf(),supplyLayoutDefaults:ad(),calc:_h().calc,crossTraceCalc:_h().crossTraceCalc,plot:T2(),style:ap().style,colorbar:qg(),meta:{}}}}),E2=U({"lib/icicle.js"(pe,le){le.exports=R_()}}),Ey=U({"src/traces/funnelarea/base_plot.js"(pe){var le=tp();pe.name="funnelarea",pe.plot=function(w,R,O,z){le.plotBasePlot(pe.name,w,R,O,z)},pe.clean=function(w,R,O,z){le.cleanBasePlot(pe.name,w,R,O,z)}}}),MS=U({"src/traces/funnelarea/attributes.js"(pe,le){var w=TS(),R=Jn(),O=oh().attributes,z=Js().hovertemplateAttrs,l=Js().texttemplateAttrs,u=Ar().extendFlat;le.exports={labels:w.labels,label0:w.label0,dlabel:w.dlabel,values:w.values,marker:{colors:w.marker.colors,line:{color:u({},w.marker.line.color,{dflt:null}),width:u({},w.marker.line.width,{dflt:1}),editType:"calc"},pattern:w.marker.pattern,editType:"calc"},text:w.text,hovertext:w.hovertext,scalegroup:u({},w.scalegroup,{}),textinfo:u({},w.textinfo,{flags:["label","text","value","percent"]}),texttemplate:l({editType:"plot"},{keys:["label","color","value","text","percent"]}),hoverinfo:u({},R.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:z({},{keys:["label","color","value","text","percent"]}),textposition:u({},w.textposition,{values:["inside","none"],dflt:"inside"}),textfont:w.textfont,insidetextfont:w.insidetextfont,title:{text:w.title.text,font:w.title.font,position:u({},w.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:O({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"}}}}),w3=U({"src/traces/funnelarea/layout_attributes.js"(pe,le){var w=sI().hiddenlabels;le.exports={hiddenlabels:w,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),NU=U({"src/traces/funnelarea/defaults.js"(pe,le){var w=ii(),R=MS(),O=oh().defaults,z=zb().handleText,l=ES().handleLabelsAndValues,u=ES().handleMarkerDefaults;le.exports=function(p,f,v,h){function m(F,k){return w.coerce(p,f,R,F,k)}var _=m("labels"),x=m("values"),A=l(_,x),E=A.len;if(f._hasLabels=A.hasLabels,f._hasValues=A.hasValues,!f._hasLabels&&f._hasValues&&(m("label0"),m("dlabel")),!E){f.visible=!1;return}f._length=E,u(p,f,h,m),m("scalegroup");var D=m("text"),g=m("texttemplate"),C;if(g||(C=m("textinfo",Array.isArray(D)?"text+percent":"percent")),m("hovertext"),m("hovertemplate"),g||C&&C!=="none"){var I=m("textposition");z(p,f,h,m,I,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else C==="none"&&m("textposition","none");O(f,h,m);var N=m("title.text");N&&(m("title.position"),w.coerceFont(m,"title.font",h.font)),m("aspectratio"),m("baseratio")}}}),mKe=U({"src/traces/funnelarea/layout_defaults.js"(pe,le){var w=ii(),R=w3();le.exports=function(z,l){function u(c,p){return w.coerce(z,l,R,c,p)}u("hiddenlabels"),u("funnelareacolorway",l.colorway),u("extendfunnelareacolors")}}}),xbe=U({"src/traces/funnelarea/calc.js"(pe,le){var w=QA();function R(z,l){return w.calc(z,l)}function O(z){w.crossTraceCalc(z,{type:"funnelarea"})}le.exports={calc:R,crossTraceCalc:O}}}),gKe=U({"src/traces/funnelarea/plot.js"(pe,le){var w=Ze(),R=ec(),O=ii(),z=O.strScale,l=O.strTranslate,u=ah(),c=by(),p=c.toMoveInsideBar,f=x0(),v=f.recordMinTextSize,h=f.clearMinTextSize,m=dy(),_=uI(),x=_.attachFxHandlers,A=_.determineInsideTextFont,E=_.layoutAreas,D=_.prerenderTitles,g=_.positionTitleOutside,C=_.formatSliceLabel;le.exports=function(P,T){var y=P._context.staticPlot,S=P._fullLayout;h("funnelarea",S),D(T,P),E(T,S._size),O.makeTraceGroups(S._funnelarealayer,T,"trace").each(function(M){var W=w.select(this),$=M[0],Z=$.trace;F(M),W.each(function(){var K=w.select(this).selectAll("g.slice").data(M);K.enter().append("g").classed("slice",!0),K.exit().remove(),K.each(function(J,G){if(J.hidden){w.select(this).selectAll("path,g").remove();return}J.pointNumber=J.i,J.curveNumber=Z.index;var ee=$.cx,re=$.cy,fe=w.select(this),we=fe.selectAll("path.surface").data([J]);we.enter().append("path").classed("surface",!0).style({"pointer-events":y?"none":"all"}),fe.call(x,P,M);var Oe="M"+(ee+J.TR[0])+","+(re+J.TR[1])+I(J.TR,J.BR)+I(J.BR,J.BL)+I(J.BL,J.TL)+"Z";we.attr("d",Oe),C(P,J,$);var ke=m.castOption(Z.textposition,J.pts),Le=fe.selectAll("g.slicetext").data(J.text&&ke!=="none"?[0]:[]);Le.enter().append("g").classed("slicetext",!0),Le.exit().remove(),Le.each(function(){var oe=O.ensureSingle(w.select(this),"text","",function(Te){Te.attr("data-notex",1)}),be=O.ensureUniformFontSize(P,A(Z,J,S.font));oe.text(J.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(R.font,be).call(u.convertToTspans,P);var _e=R.bBox(oe.node()),he,De,xe,se=Math.min(J.BL[1],J.BR[1])+re,Ee=Math.max(J.TL[1],J.TR[1])+re;De=Math.max(J.TL[0],J.BL[0])+ee,xe=Math.min(J.TR[0],J.BR[0])+ee,he=p(De,xe,se,Ee,_e,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),he.fontSize=be.size,v(Z.type,he,S),M[G].transform=he,O.setTransormAndDisplay(oe,he)})});var Q=w.select(this).selectAll("g.titletext").data(Z.title.text?[0]:[]);Q.enter().append("g").classed("titletext",!0),Q.exit().remove(),Q.each(function(){var J=O.ensureSingle(w.select(this),"text","",function(re){re.attr("data-notex",1)}),G=Z.title.text;Z._meta&&(G=O.templateString(G,Z._meta)),J.text(G).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(R.font,Z.title.font).call(u.convertToTspans,P);var ee=g($,S._size);J.attr("transform",l(ee.x,ee.y)+z(Math.min(1,ee.scale))+l(ee.tx,ee.ty))})})})};function I(k,P){var T=P[0]-k[0],y=P[1]-k[1];return"l"+T+","+y}function N(k,P){return[.5*(k[0]+P[0]),.5*(k[1]+P[1])]}function F(k){if(!k.length)return;var P=k[0],T=P.trace,y=T.aspectratio,S=T.baseratio;S>.999&&(S=.999);var M=Math.pow(S,2),W=P.vTotal,$=W*M/(1-M),Z=W,K=$/W;function Q(){var Be=Math.sqrt(K);return{x:Be,y:-Be}}function J(){var Be=Q();return[Be.x,Be.y]}var G,ee=[];ee.push(J());var re,fe;for(re=k.length-1;re>-1;re--)if(fe=k[re],!fe.hidden){var we=fe.v/Z;K+=we,ee.push(J())}var Oe=1/0,ke=-1/0;for(re=0;re<ee.length;re++)G=ee[re],Oe=Math.min(Oe,G[1]),ke=Math.max(ke,G[1]);for(re=0;re<ee.length;re++)ee[re][1]-=(ke+Oe)/2;var Le=ee[ee.length-1][0],oe=P.r,be=(ke-Oe)/2,_e=oe/Le,he=oe/be*y;for(P.r=he*be,re=0;re<ee.length;re++)ee[re][0]*=_e,ee[re][1]*=he;G=ee[0];var De=[-G[0],G[1]],xe=[G[0],G[1]],se=0;for(re=k.length-1;re>-1;re--)if(fe=k[re],!fe.hidden){se+=1;var Ee=ee[se][0],Te=ee[se][1];fe.TL=[-Ee,Te],fe.TR=[Ee,Te],fe.BL=De,fe.BR=xe,fe.pxmid=N(fe.TR,fe.BR),De=fe.TL,xe=fe.TR}}}}),yKe=U({"src/traces/funnelarea/style.js"(pe,le){var w=Ze(),R=aT(),O=x0().resizeText;le.exports=function(l){var u=l._fullLayout._funnelarealayer.selectAll(".trace");O(l,u,"funnelarea"),u.each(function(c){var p=c[0],f=p.trace,v=w.select(this);v.style({opacity:f.opacity}),v.selectAll("path.surface").each(function(h){w.select(this).call(R,h,f,l)})})}}}),bKe=U({"src/traces/funnelarea/index.js"(pe,le){le.exports={moduleType:"trace",name:"funnelarea",basePlotModule:Ey(),categories:["pie-like","funnelarea","showLegend"],attributes:MS(),layoutAttributes:w3(),supplyDefaults:NU(),supplyLayoutDefaults:mKe(),calc:xbe().calc,crossTraceCalc:xbe().crossTraceCalc,plot:gKe(),style:yKe(),styleOne:aT(),meta:{}}}}),xKe=U({"lib/funnelarea.js"(pe,le){le.exports=bKe()}}),Fx=U({"stackgl_modules/index.js"(pe,le){(function(){var w={1964:(function(l,u,c){l.exports={alpha_shape:c(3502),convex_hull:c(7352),delaunay_triangulate:c(7642),gl_cone3d:c(6405),gl_error3d:c(9165),gl_line3d:c(5714),gl_mesh3d:c(7201),gl_plot3d:c(4100),gl_scatter3d:c(8418),gl_streamtube3d:c(7815),gl_surface3d:c(9499),ndarray:c(9618),ndarray_linear_interpolate:c(4317)}}),4793:(function(l,u,c){function p(je,Ye){if(!(je instanceof Ye))throw new TypeError("Cannot call a class as a function")}function f(je,Ye){for(var et=0;et<Ye.length;et++){var mt=Ye[et];mt.enumerable=mt.enumerable||!1,mt.configurable=!0,"value"in mt&&(mt.writable=!0),Object.defineProperty(je,h(mt.key),mt)}}function v(je,Ye,et){return Ye&&f(je.prototype,Ye),Object.defineProperty(je,"prototype",{writable:!1}),je}function h(je){var Ye=m(je,"string");return I(Ye)=="symbol"?Ye:Ye+""}function m(je,Ye){if(I(je)!="object"||!je)return je;var et=je[Symbol.toPrimitive];if(et!==void 0){var mt=et.call(je,Ye);if(I(mt)!="object")return mt;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(je)}function _(je,Ye,et){return Ye=D(Ye),x(je,E()?Reflect.construct(Ye,[],D(je).constructor):Ye.apply(je,et))}function x(je,Ye){if(Ye&&(I(Ye)=="object"||typeof Ye=="function"))return Ye;if(Ye!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return A(je)}function A(je){if(je===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return je}function E(){try{var je=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(E=function(){return!!je})()}function D(je){return D=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Ye){return Ye.__proto__||Object.getPrototypeOf(Ye)},D(je)}function g(je,Ye){if(typeof Ye!="function"&&Ye!==null)throw new TypeError("Super expression must either be null or a function");je.prototype=Object.create(Ye&&Ye.prototype,{constructor:{value:je,writable:!0,configurable:!0}}),Object.defineProperty(je,"prototype",{writable:!1}),Ye&&C(je,Ye)}function C(je,Ye){return C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(et,mt){return et.__proto__=mt,et},C(je,Ye)}function I(je){"@babel/helpers - typeof";return I=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ye){return typeof Ye}:function(Ye){return Ye&&typeof Symbol=="function"&&Ye.constructor===Symbol&&Ye!==Symbol.prototype?"symbol":typeof Ye},I(je)}var N=c(7507),F=c(3778),k=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;u.hp=S,u.IS=50;var P=2147483647;S.TYPED_ARRAY_SUPPORT=T(),!S.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 T(){try{var je=new Uint8Array(1),Ye={foo:function(){return 42}};return Object.setPrototypeOf(Ye,Uint8Array.prototype),Object.setPrototypeOf(je,Ye),je.foo()===42}catch{return!1}}Object.defineProperty(S.prototype,"parent",{enumerable:!0,get:function(){if(S.isBuffer(this))return this.buffer}}),Object.defineProperty(S.prototype,"offset",{enumerable:!0,get:function(){if(S.isBuffer(this))return this.byteOffset}});function y(je){if(je>P)throw new RangeError('The value "'+je+'" is invalid for option "size"');var Ye=new Uint8Array(je);return Object.setPrototypeOf(Ye,S.prototype),Ye}function S(je,Ye,et){if(typeof je=="number"){if(typeof Ye=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Z(je)}return M(je,Ye,et)}S.poolSize=8192;function M(je,Ye,et){if(typeof je=="string")return K(je,Ye);if(ArrayBuffer.isView(je))return J(je);if(je==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+I(je));if(Gn(je,ArrayBuffer)||je&&Gn(je.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Gn(je,SharedArrayBuffer)||je&&Gn(je.buffer,SharedArrayBuffer)))return G(je,Ye,et);if(typeof je=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var mt=je.valueOf&&je.valueOf();if(mt!=null&&mt!==je)return S.from(mt,Ye,et);var Nt=ee(je);if(Nt)return Nt;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof je[Symbol.toPrimitive]=="function")return S.from(je[Symbol.toPrimitive]("string"),Ye,et);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+I(je))}S.from=function(je,Ye,et){return M(je,Ye,et)},Object.setPrototypeOf(S.prototype,Uint8Array.prototype),Object.setPrototypeOf(S,Uint8Array);function W(je){if(typeof je!="number")throw new TypeError('"size" argument must be of type number');if(je<0)throw new RangeError('The value "'+je+'" is invalid for option "size"')}function $(je,Ye,et){return W(je),je<=0?y(je):Ye!==void 0?typeof et=="string"?y(je).fill(Ye,et):y(je).fill(Ye):y(je)}S.alloc=function(je,Ye,et){return $(je,Ye,et)};function Z(je){return W(je),y(je<0?0:re(je)|0)}S.allocUnsafe=function(je){return Z(je)},S.allocUnsafeSlow=function(je){return Z(je)};function K(je,Ye){if((typeof Ye!="string"||Ye==="")&&(Ye="utf8"),!S.isEncoding(Ye))throw new TypeError("Unknown encoding: "+Ye);var et=fe(je,Ye)|0,mt=y(et),Nt=mt.write(je,Ye);return Nt!==et&&(mt=mt.slice(0,Nt)),mt}function Q(je){for(var Ye=je.length<0?0:re(je.length)|0,et=y(Ye),mt=0;mt<Ye;mt+=1)et[mt]=je[mt]&255;return et}function J(je){if(Gn(je,Uint8Array)){var Ye=new Uint8Array(je);return G(Ye.buffer,Ye.byteOffset,Ye.byteLength)}return Q(je)}function G(je,Ye,et){if(Ye<0||je.byteLength<Ye)throw new RangeError('"offset" is outside of buffer bounds');if(je.byteLength<Ye+(et||0))throw new RangeError('"length" is outside of buffer bounds');var mt;return Ye===void 0&&et===void 0?mt=new Uint8Array(je):et===void 0?mt=new Uint8Array(je,Ye):mt=new Uint8Array(je,Ye,et),Object.setPrototypeOf(mt,S.prototype),mt}function ee(je){if(S.isBuffer(je)){var Ye=re(je.length)|0,et=y(Ye);return et.length===0||je.copy(et,0,0,Ye),et}if(je.length!==void 0)return typeof je.length!="number"||mr(je.length)?y(0):Q(je);if(je.type==="Buffer"&&Array.isArray(je.data))return Q(je.data)}function re(je){if(je>=P)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+P.toString(16)+" bytes");return je|0}S.isBuffer=function(Ye){return Ye!=null&&Ye._isBuffer===!0&&Ye!==S.prototype},S.compare=function(Ye,et){if(Gn(Ye,Uint8Array)&&(Ye=S.from(Ye,Ye.offset,Ye.byteLength)),Gn(et,Uint8Array)&&(et=S.from(et,et.offset,et.byteLength)),!S.isBuffer(Ye)||!S.isBuffer(et))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Ye===et)return 0;for(var mt=Ye.length,Nt=et.length,lr=0,br=Math.min(mt,Nt);lr<br;++lr)if(Ye[lr]!==et[lr]){mt=Ye[lr],Nt=et[lr];break}return mt<Nt?-1:Nt<mt?1:0},S.isEncoding=function(Ye){switch(String(Ye).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}},S.concat=function(Ye,et){if(!Array.isArray(Ye))throw new TypeError('"list" argument must be an Array of Buffers');if(Ye.length===0)return S.alloc(0);var mt;if(et===void 0)for(et=0,mt=0;mt<Ye.length;++mt)et+=Ye[mt].length;var Nt=S.allocUnsafe(et),lr=0;for(mt=0;mt<Ye.length;++mt){var br=Ye[mt];if(Gn(br,Uint8Array))lr+br.length>Nt.length?(S.isBuffer(br)||(br=S.from(br)),br.copy(Nt,lr)):Uint8Array.prototype.set.call(Nt,br,lr);else if(S.isBuffer(br))br.copy(Nt,lr);else throw new TypeError('"list" argument must be an Array of Buffers');lr+=br.length}return Nt};function fe(je,Ye){if(S.isBuffer(je))return je.length;if(ArrayBuffer.isView(je)||Gn(je,ArrayBuffer))return je.byteLength;if(typeof je!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+I(je));var et=je.length,mt=arguments.length>2&&arguments[2]===!0;if(!mt&&et===0)return 0;for(var Nt=!1;;)switch(Ye){case"ascii":case"latin1":case"binary":return et;case"utf8":case"utf-8":return rn(je).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return et*2;case"hex":return et>>>1;case"base64":return ci(je).length;default:if(Nt)return mt?-1:rn(je).length;Ye=(""+Ye).toLowerCase(),Nt=!0}}S.byteLength=fe;function we(je,Ye,et){var mt=!1;if((Ye===void 0||Ye<0)&&(Ye=0),Ye>this.length||((et===void 0||et>this.length)&&(et=this.length),et<=0)||(et>>>=0,Ye>>>=0,et<=Ye))return"";for(je||(je="utf8");;)switch(je){case"hex":return at(this,Ye,et);case"utf8":case"utf-8":return se(this,Ye,et);case"ascii":return Be(this,Ye,et);case"latin1":case"binary":return tt(this,Ye,et);case"base64":return xe(this,Ye,et);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return gt(this,Ye,et);default:if(mt)throw new TypeError("Unknown encoding: "+je);je=(je+"").toLowerCase(),mt=!0}}S.prototype._isBuffer=!0;function Oe(je,Ye,et){var mt=je[Ye];je[Ye]=je[et],je[et]=mt}S.prototype.swap16=function(){var Ye=this.length;if(Ye%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var et=0;et<Ye;et+=2)Oe(this,et,et+1);return this},S.prototype.swap32=function(){var Ye=this.length;if(Ye%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var et=0;et<Ye;et+=4)Oe(this,et,et+3),Oe(this,et+1,et+2);return this},S.prototype.swap64=function(){var Ye=this.length;if(Ye%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var et=0;et<Ye;et+=8)Oe(this,et,et+7),Oe(this,et+1,et+6),Oe(this,et+2,et+5),Oe(this,et+3,et+4);return this},S.prototype.toString=function(){var Ye=this.length;return Ye===0?"":arguments.length===0?se(this,0,Ye):we.apply(this,arguments)},S.prototype.toLocaleString=S.prototype.toString,S.prototype.equals=function(Ye){if(!S.isBuffer(Ye))throw new TypeError("Argument must be a Buffer");return this===Ye?!0:S.compare(this,Ye)===0},S.prototype.inspect=function(){var Ye="",et=u.IS;return Ye=this.toString("hex",0,et).replace(/(.{2})/g,"$1 ").trim(),this.length>et&&(Ye+=" ... "),"<Buffer "+Ye+">"},k&&(S.prototype[k]=S.prototype.inspect),S.prototype.compare=function(Ye,et,mt,Nt,lr){if(Gn(Ye,Uint8Array)&&(Ye=S.from(Ye,Ye.offset,Ye.byteLength)),!S.isBuffer(Ye))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+I(Ye));if(et===void 0&&(et=0),mt===void 0&&(mt=Ye?Ye.length:0),Nt===void 0&&(Nt=0),lr===void 0&&(lr=this.length),et<0||mt>Ye.length||Nt<0||lr>this.length)throw new RangeError("out of range index");if(Nt>=lr&&et>=mt)return 0;if(Nt>=lr)return-1;if(et>=mt)return 1;if(et>>>=0,mt>>>=0,Nt>>>=0,lr>>>=0,this===Ye)return 0;for(var br=lr-Nt,Or=mt-et,tn=Math.min(br,Or),Jr=this.slice(Nt,lr),dn=Ye.slice(et,mt),on=0;on<tn;++on)if(Jr[on]!==dn[on]){br=Jr[on],Or=dn[on];break}return br<Or?-1:Or<br?1:0};function ke(je,Ye,et,mt,Nt){if(je.length===0)return-1;if(typeof et=="string"?(mt=et,et=0):et>2147483647?et=2147483647:et<-2147483648&&(et=-2147483648),et=+et,mr(et)&&(et=Nt?0:je.length-1),et<0&&(et=je.length+et),et>=je.length){if(Nt)return-1;et=je.length-1}else if(et<0)if(Nt)et=0;else return-1;if(typeof Ye=="string"&&(Ye=S.from(Ye,mt)),S.isBuffer(Ye))return Ye.length===0?-1:Le(je,Ye,et,mt,Nt);if(typeof Ye=="number")return Ye=Ye&255,typeof Uint8Array.prototype.indexOf=="function"?Nt?Uint8Array.prototype.indexOf.call(je,Ye,et):Uint8Array.prototype.lastIndexOf.call(je,Ye,et):Le(je,[Ye],et,mt,Nt);throw new TypeError("val must be string, number or Buffer")}function Le(je,Ye,et,mt,Nt){var lr=1,br=je.length,Or=Ye.length;if(mt!==void 0&&(mt=String(mt).toLowerCase(),mt==="ucs2"||mt==="ucs-2"||mt==="utf16le"||mt==="utf-16le")){if(je.length<2||Ye.length<2)return-1;lr=2,br/=2,Or/=2,et/=2}function tn(Wi,Oa){return lr===1?Wi[Oa]:Wi.readUInt16BE(Oa*lr)}var Jr;if(Nt){var dn=-1;for(Jr=et;Jr<br;Jr++)if(tn(je,Jr)===tn(Ye,dn===-1?0:Jr-dn)){if(dn===-1&&(dn=Jr),Jr-dn+1===Or)return dn*lr}else dn!==-1&&(Jr-=Jr-dn),dn=-1}else for(et+Or>br&&(et=br-Or),Jr=et;Jr>=0;Jr--){for(var on=!0,Nn=0;Nn<Or;Nn++)if(tn(je,Jr+Nn)!==tn(Ye,Nn)){on=!1;break}if(on)return Jr}return-1}S.prototype.includes=function(Ye,et,mt){return this.indexOf(Ye,et,mt)!==-1},S.prototype.indexOf=function(Ye,et,mt){return ke(this,Ye,et,mt,!0)},S.prototype.lastIndexOf=function(Ye,et,mt){return ke(this,Ye,et,mt,!1)};function oe(je,Ye,et,mt){et=Number(et)||0;var Nt=je.length-et;mt?(mt=Number(mt),mt>Nt&&(mt=Nt)):mt=Nt;var lr=Ye.length;mt>lr/2&&(mt=lr/2);var br;for(br=0;br<mt;++br){var Or=parseInt(Ye.substr(br*2,2),16);if(mr(Or))return br;je[et+br]=Or}return br}function be(je,Ye,et,mt){return In(rn(Ye,je.length-et),je,et,mt)}function _e(je,Ye,et,mt){return In(kn(Ye),je,et,mt)}function he(je,Ye,et,mt){return In(ci(Ye),je,et,mt)}function De(je,Ye,et,mt){return In(Rn(Ye,je.length-et),je,et,mt)}S.prototype.write=function(Ye,et,mt,Nt){if(et===void 0)Nt="utf8",mt=this.length,et=0;else if(mt===void 0&&typeof et=="string")Nt=et,mt=this.length,et=0;else if(isFinite(et))et=et>>>0,isFinite(mt)?(mt=mt>>>0,Nt===void 0&&(Nt="utf8")):(Nt=mt,mt=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var lr=this.length-et;if((mt===void 0||mt>lr)&&(mt=lr),Ye.length>0&&(mt<0||et<0)||et>this.length)throw new RangeError("Attempt to write outside buffer bounds");Nt||(Nt="utf8");for(var br=!1;;)switch(Nt){case"hex":return oe(this,Ye,et,mt);case"utf8":case"utf-8":return be(this,Ye,et,mt);case"ascii":case"latin1":case"binary":return _e(this,Ye,et,mt);case"base64":return he(this,Ye,et,mt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return De(this,Ye,et,mt);default:if(br)throw new TypeError("Unknown encoding: "+Nt);Nt=(""+Nt).toLowerCase(),br=!0}},S.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function xe(je,Ye,et){return Ye===0&&et===je.length?N.fromByteArray(je):N.fromByteArray(je.slice(Ye,et))}function se(je,Ye,et){et=Math.min(je.length,et);for(var mt=[],Nt=Ye;Nt<et;){var lr=je[Nt],br=null,Or=lr>239?4:lr>223?3:lr>191?2:1;if(Nt+Or<=et){var tn=void 0,Jr=void 0,dn=void 0,on=void 0;switch(Or){case 1:lr<128&&(br=lr);break;case 2:tn=je[Nt+1],(tn&192)===128&&(on=(lr&31)<<6|tn&63,on>127&&(br=on));break;case 3:tn=je[Nt+1],Jr=je[Nt+2],(tn&192)===128&&(Jr&192)===128&&(on=(lr&15)<<12|(tn&63)<<6|Jr&63,on>2047&&(on<55296||on>57343)&&(br=on));break;case 4:tn=je[Nt+1],Jr=je[Nt+2],dn=je[Nt+3],(tn&192)===128&&(Jr&192)===128&&(dn&192)===128&&(on=(lr&15)<<18|(tn&63)<<12|(Jr&63)<<6|dn&63,on>65535&&on<1114112&&(br=on))}}br===null?(br=65533,Or=1):br>65535&&(br-=65536,mt.push(br>>>10&1023|55296),br=56320|br&1023),mt.push(br),Nt+=Or}return Te(mt)}var Ee=4096;function Te(je){var Ye=je.length;if(Ye<=Ee)return String.fromCharCode.apply(String,je);for(var et="",mt=0;mt<Ye;)et+=String.fromCharCode.apply(String,je.slice(mt,mt+=Ee));return et}function Be(je,Ye,et){var mt="";et=Math.min(je.length,et);for(var Nt=Ye;Nt<et;++Nt)mt+=String.fromCharCode(je[Nt]&127);return mt}function tt(je,Ye,et){var mt="";et=Math.min(je.length,et);for(var Nt=Ye;Nt<et;++Nt)mt+=String.fromCharCode(je[Nt]);return mt}function at(je,Ye,et){var mt=je.length;(!Ye||Ye<0)&&(Ye=0),(!et||et<0||et>mt)&&(et=mt);for(var Nt="",lr=Ye;lr<et;++lr)Nt+=St[je[lr]];return Nt}function gt(je,Ye,et){for(var mt=je.slice(Ye,et),Nt="",lr=0;lr<mt.length-1;lr+=2)Nt+=String.fromCharCode(mt[lr]+mt[lr+1]*256);return Nt}S.prototype.slice=function(Ye,et){var mt=this.length;Ye=~~Ye,et=et===void 0?mt:~~et,Ye<0?(Ye+=mt,Ye<0&&(Ye=0)):Ye>mt&&(Ye=mt),et<0?(et+=mt,et<0&&(et=0)):et>mt&&(et=mt),et<Ye&&(et=Ye);var Nt=this.subarray(Ye,et);return Object.setPrototypeOf(Nt,S.prototype),Nt};function pt(je,Ye,et){if(je%1!==0||je<0)throw new RangeError("offset is not uint");if(je+Ye>et)throw new RangeError("Trying to access beyond buffer length")}S.prototype.readUintLE=S.prototype.readUIntLE=function(Ye,et,mt){Ye=Ye>>>0,et=et>>>0,mt||pt(Ye,et,this.length);for(var Nt=this[Ye],lr=1,br=0;++br<et&&(lr*=256);)Nt+=this[Ye+br]*lr;return Nt},S.prototype.readUintBE=S.prototype.readUIntBE=function(Ye,et,mt){Ye=Ye>>>0,et=et>>>0,mt||pt(Ye,et,this.length);for(var Nt=this[Ye+--et],lr=1;et>0&&(lr*=256);)Nt+=this[Ye+--et]*lr;return Nt},S.prototype.readUint8=S.prototype.readUInt8=function(Ye,et){return Ye=Ye>>>0,et||pt(Ye,1,this.length),this[Ye]},S.prototype.readUint16LE=S.prototype.readUInt16LE=function(Ye,et){return Ye=Ye>>>0,et||pt(Ye,2,this.length),this[Ye]|this[Ye+1]<<8},S.prototype.readUint16BE=S.prototype.readUInt16BE=function(Ye,et){return Ye=Ye>>>0,et||pt(Ye,2,this.length),this[Ye]<<8|this[Ye+1]},S.prototype.readUint32LE=S.prototype.readUInt32LE=function(Ye,et){return Ye=Ye>>>0,et||pt(Ye,4,this.length),(this[Ye]|this[Ye+1]<<8|this[Ye+2]<<16)+this[Ye+3]*16777216},S.prototype.readUint32BE=S.prototype.readUInt32BE=function(Ye,et){return Ye=Ye>>>0,et||pt(Ye,4,this.length),this[Ye]*16777216+(this[Ye+1]<<16|this[Ye+2]<<8|this[Ye+3])},S.prototype.readBigUInt64LE=Ot(function(Ye){Ye=Ye>>>0,Ut(Ye,"offset");var et=this[Ye],mt=this[Ye+7];(et===void 0||mt===void 0)&&kr(Ye,this.length-8);var Nt=et+this[++Ye]*Math.pow(2,8)+this[++Ye]*Math.pow(2,16)+this[++Ye]*Math.pow(2,24),lr=this[++Ye]+this[++Ye]*Math.pow(2,8)+this[++Ye]*Math.pow(2,16)+mt*Math.pow(2,24);return BigInt(Nt)+(BigInt(lr)<<BigInt(32))}),S.prototype.readBigUInt64BE=Ot(function(Ye){Ye=Ye>>>0,Ut(Ye,"offset");var et=this[Ye],mt=this[Ye+7];(et===void 0||mt===void 0)&&kr(Ye,this.length-8);var Nt=et*Math.pow(2,24)+this[++Ye]*Math.pow(2,16)+this[++Ye]*Math.pow(2,8)+this[++Ye],lr=this[++Ye]*Math.pow(2,24)+this[++Ye]*Math.pow(2,16)+this[++Ye]*Math.pow(2,8)+mt;return(BigInt(Nt)<<BigInt(32))+BigInt(lr)}),S.prototype.readIntLE=function(Ye,et,mt){Ye=Ye>>>0,et=et>>>0,mt||pt(Ye,et,this.length);for(var Nt=this[Ye],lr=1,br=0;++br<et&&(lr*=256);)Nt+=this[Ye+br]*lr;return lr*=128,Nt>=lr&&(Nt-=Math.pow(2,8*et)),Nt},S.prototype.readIntBE=function(Ye,et,mt){Ye=Ye>>>0,et=et>>>0,mt||pt(Ye,et,this.length);for(var Nt=et,lr=1,br=this[Ye+--Nt];Nt>0&&(lr*=256);)br+=this[Ye+--Nt]*lr;return lr*=128,br>=lr&&(br-=Math.pow(2,8*et)),br},S.prototype.readInt8=function(Ye,et){return Ye=Ye>>>0,et||pt(Ye,1,this.length),this[Ye]&128?(255-this[Ye]+1)*-1:this[Ye]},S.prototype.readInt16LE=function(Ye,et){Ye=Ye>>>0,et||pt(Ye,2,this.length);var mt=this[Ye]|this[Ye+1]<<8;return mt&32768?mt|4294901760:mt},S.prototype.readInt16BE=function(Ye,et){Ye=Ye>>>0,et||pt(Ye,2,this.length);var mt=this[Ye+1]|this[Ye]<<8;return mt&32768?mt|4294901760:mt},S.prototype.readInt32LE=function(Ye,et){return Ye=Ye>>>0,et||pt(Ye,4,this.length),this[Ye]|this[Ye+1]<<8|this[Ye+2]<<16|this[Ye+3]<<24},S.prototype.readInt32BE=function(Ye,et){return Ye=Ye>>>0,et||pt(Ye,4,this.length),this[Ye]<<24|this[Ye+1]<<16|this[Ye+2]<<8|this[Ye+3]},S.prototype.readBigInt64LE=Ot(function(Ye){Ye=Ye>>>0,Ut(Ye,"offset");var et=this[Ye],mt=this[Ye+7];(et===void 0||mt===void 0)&&kr(Ye,this.length-8);var Nt=this[Ye+4]+this[Ye+5]*Math.pow(2,8)+this[Ye+6]*Math.pow(2,16)+(mt<<24);return(BigInt(Nt)<<BigInt(32))+BigInt(et+this[++Ye]*Math.pow(2,8)+this[++Ye]*Math.pow(2,16)+this[++Ye]*Math.pow(2,24))}),S.prototype.readBigInt64BE=Ot(function(Ye){Ye=Ye>>>0,Ut(Ye,"offset");var et=this[Ye],mt=this[Ye+7];(et===void 0||mt===void 0)&&kr(Ye,this.length-8);var Nt=(et<<24)+this[++Ye]*Math.pow(2,16)+this[++Ye]*Math.pow(2,8)+this[++Ye];return(BigInt(Nt)<<BigInt(32))+BigInt(this[++Ye]*Math.pow(2,24)+this[++Ye]*Math.pow(2,16)+this[++Ye]*Math.pow(2,8)+mt)}),S.prototype.readFloatLE=function(Ye,et){return Ye=Ye>>>0,et||pt(Ye,4,this.length),F.read(this,Ye,!0,23,4)},S.prototype.readFloatBE=function(Ye,et){return Ye=Ye>>>0,et||pt(Ye,4,this.length),F.read(this,Ye,!1,23,4)},S.prototype.readDoubleLE=function(Ye,et){return Ye=Ye>>>0,et||pt(Ye,8,this.length),F.read(this,Ye,!0,52,8)},S.prototype.readDoubleBE=function(Ye,et){return Ye=Ye>>>0,et||pt(Ye,8,this.length),F.read(this,Ye,!1,52,8)};function Rt(je,Ye,et,mt,Nt,lr){if(!S.isBuffer(je))throw new TypeError('"buffer" argument must be a Buffer instance');if(Ye>Nt||Ye<lr)throw new RangeError('"value" argument is out of bounds');if(et+mt>je.length)throw new RangeError("Index out of range")}S.prototype.writeUintLE=S.prototype.writeUIntLE=function(Ye,et,mt,Nt){if(Ye=+Ye,et=et>>>0,mt=mt>>>0,!Nt){var lr=Math.pow(2,8*mt)-1;Rt(this,Ye,et,mt,lr,0)}var br=1,Or=0;for(this[et]=Ye&255;++Or<mt&&(br*=256);)this[et+Or]=Ye/br&255;return et+mt},S.prototype.writeUintBE=S.prototype.writeUIntBE=function(Ye,et,mt,Nt){if(Ye=+Ye,et=et>>>0,mt=mt>>>0,!Nt){var lr=Math.pow(2,8*mt)-1;Rt(this,Ye,et,mt,lr,0)}var br=mt-1,Or=1;for(this[et+br]=Ye&255;--br>=0&&(Or*=256);)this[et+br]=Ye/Or&255;return et+mt},S.prototype.writeUint8=S.prototype.writeUInt8=function(Ye,et,mt){return Ye=+Ye,et=et>>>0,mt||Rt(this,Ye,et,1,255,0),this[et]=Ye&255,et+1},S.prototype.writeUint16LE=S.prototype.writeUInt16LE=function(Ye,et,mt){return Ye=+Ye,et=et>>>0,mt||Rt(this,Ye,et,2,65535,0),this[et]=Ye&255,this[et+1]=Ye>>>8,et+2},S.prototype.writeUint16BE=S.prototype.writeUInt16BE=function(Ye,et,mt){return Ye=+Ye,et=et>>>0,mt||Rt(this,Ye,et,2,65535,0),this[et]=Ye>>>8,this[et+1]=Ye&255,et+2},S.prototype.writeUint32LE=S.prototype.writeUInt32LE=function(Ye,et,mt){return Ye=+Ye,et=et>>>0,mt||Rt(this,Ye,et,4,4294967295,0),this[et+3]=Ye>>>24,this[et+2]=Ye>>>16,this[et+1]=Ye>>>8,this[et]=Ye&255,et+4},S.prototype.writeUint32BE=S.prototype.writeUInt32BE=function(Ye,et,mt){return Ye=+Ye,et=et>>>0,mt||Rt(this,Ye,et,4,4294967295,0),this[et]=Ye>>>24,this[et+1]=Ye>>>16,this[et+2]=Ye>>>8,this[et+3]=Ye&255,et+4};function $t(je,Ye,et,mt,Nt){Jt(Ye,mt,Nt,je,et,7);var lr=Number(Ye&BigInt(4294967295));je[et++]=lr,lr=lr>>8,je[et++]=lr,lr=lr>>8,je[et++]=lr,lr=lr>>8,je[et++]=lr;var br=Number(Ye>>BigInt(32)&BigInt(4294967295));return je[et++]=br,br=br>>8,je[et++]=br,br=br>>8,je[et++]=br,br=br>>8,je[et++]=br,et}function Wt(je,Ye,et,mt,Nt){Jt(Ye,mt,Nt,je,et,7);var lr=Number(Ye&BigInt(4294967295));je[et+7]=lr,lr=lr>>8,je[et+6]=lr,lr=lr>>8,je[et+5]=lr,lr=lr>>8,je[et+4]=lr;var br=Number(Ye>>BigInt(32)&BigInt(4294967295));return je[et+3]=br,br=br>>8,je[et+2]=br,br=br>>8,je[et+1]=br,br=br>>8,je[et]=br,et+8}S.prototype.writeBigUInt64LE=Ot(function(Ye){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return $t(this,Ye,et,BigInt(0),BigInt("0xffffffffffffffff"))}),S.prototype.writeBigUInt64BE=Ot(function(Ye){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Wt(this,Ye,et,BigInt(0),BigInt("0xffffffffffffffff"))}),S.prototype.writeIntLE=function(Ye,et,mt,Nt){if(Ye=+Ye,et=et>>>0,!Nt){var lr=Math.pow(2,8*mt-1);Rt(this,Ye,et,mt,lr-1,-lr)}var br=0,Or=1,tn=0;for(this[et]=Ye&255;++br<mt&&(Or*=256);)Ye<0&&tn===0&&this[et+br-1]!==0&&(tn=1),this[et+br]=(Ye/Or>>0)-tn&255;return et+mt},S.prototype.writeIntBE=function(Ye,et,mt,Nt){if(Ye=+Ye,et=et>>>0,!Nt){var lr=Math.pow(2,8*mt-1);Rt(this,Ye,et,mt,lr-1,-lr)}var br=mt-1,Or=1,tn=0;for(this[et+br]=Ye&255;--br>=0&&(Or*=256);)Ye<0&&tn===0&&this[et+br+1]!==0&&(tn=1),this[et+br]=(Ye/Or>>0)-tn&255;return et+mt},S.prototype.writeInt8=function(Ye,et,mt){return Ye=+Ye,et=et>>>0,mt||Rt(this,Ye,et,1,127,-128),Ye<0&&(Ye=255+Ye+1),this[et]=Ye&255,et+1},S.prototype.writeInt16LE=function(Ye,et,mt){return Ye=+Ye,et=et>>>0,mt||Rt(this,Ye,et,2,32767,-32768),this[et]=Ye&255,this[et+1]=Ye>>>8,et+2},S.prototype.writeInt16BE=function(Ye,et,mt){return Ye=+Ye,et=et>>>0,mt||Rt(this,Ye,et,2,32767,-32768),this[et]=Ye>>>8,this[et+1]=Ye&255,et+2},S.prototype.writeInt32LE=function(Ye,et,mt){return Ye=+Ye,et=et>>>0,mt||Rt(this,Ye,et,4,2147483647,-2147483648),this[et]=Ye&255,this[et+1]=Ye>>>8,this[et+2]=Ye>>>16,this[et+3]=Ye>>>24,et+4},S.prototype.writeInt32BE=function(Ye,et,mt){return Ye=+Ye,et=et>>>0,mt||Rt(this,Ye,et,4,2147483647,-2147483648),Ye<0&&(Ye=4294967295+Ye+1),this[et]=Ye>>>24,this[et+1]=Ye>>>16,this[et+2]=Ye>>>8,this[et+3]=Ye&255,et+4},S.prototype.writeBigInt64LE=Ot(function(Ye){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return $t(this,Ye,et,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),S.prototype.writeBigInt64BE=Ot(function(Ye){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Wt(this,Ye,et,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ht(je,Ye,et,mt,Nt,lr){if(et+mt>je.length)throw new RangeError("Index out of range");if(et<0)throw new RangeError("Index out of range")}function Ft(je,Ye,et,mt,Nt){return Ye=+Ye,et=et>>>0,Nt||Ht(je,Ye,et,4),F.write(je,Ye,et,mt,23,4),et+4}S.prototype.writeFloatLE=function(Ye,et,mt){return Ft(this,Ye,et,!0,mt)},S.prototype.writeFloatBE=function(Ye,et,mt){return Ft(this,Ye,et,!1,mt)};function st(je,Ye,et,mt,Nt){return Ye=+Ye,et=et>>>0,Nt||Ht(je,Ye,et,8),F.write(je,Ye,et,mt,52,8),et+8}S.prototype.writeDoubleLE=function(Ye,et,mt){return st(this,Ye,et,!0,mt)},S.prototype.writeDoubleBE=function(Ye,et,mt){return st(this,Ye,et,!1,mt)},S.prototype.copy=function(Ye,et,mt,Nt){if(!S.isBuffer(Ye))throw new TypeError("argument should be a Buffer");if(mt||(mt=0),!Nt&&Nt!==0&&(Nt=this.length),et>=Ye.length&&(et=Ye.length),et||(et=0),Nt>0&&Nt<mt&&(Nt=mt),Nt===mt||Ye.length===0||this.length===0)return 0;if(et<0)throw new RangeError("targetStart out of bounds");if(mt<0||mt>=this.length)throw new RangeError("Index out of range");if(Nt<0)throw new RangeError("sourceEnd out of bounds");Nt>this.length&&(Nt=this.length),Ye.length-et<Nt-mt&&(Nt=Ye.length-et+mt);var lr=Nt-mt;return this===Ye&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(et,mt,Nt):Uint8Array.prototype.set.call(Ye,this.subarray(mt,Nt),et),lr},S.prototype.fill=function(Ye,et,mt,Nt){if(typeof Ye=="string"){if(typeof et=="string"?(Nt=et,et=0,mt=this.length):typeof mt=="string"&&(Nt=mt,mt=this.length),Nt!==void 0&&typeof Nt!="string")throw new TypeError("encoding must be a string");if(typeof Nt=="string"&&!S.isEncoding(Nt))throw new TypeError("Unknown encoding: "+Nt);if(Ye.length===1){var lr=Ye.charCodeAt(0);(Nt==="utf8"&&lr<128||Nt==="latin1")&&(Ye=lr)}}else typeof Ye=="number"?Ye=Ye&255:typeof Ye=="boolean"&&(Ye=Number(Ye));if(et<0||this.length<et||this.length<mt)throw new RangeError("Out of range index");if(mt<=et)return this;et=et>>>0,mt=mt===void 0?this.length:mt>>>0,Ye||(Ye=0);var br;if(typeof Ye=="number")for(br=et;br<mt;++br)this[br]=Ye;else{var Or=S.isBuffer(Ye)?Ye:S.from(Ye,Nt),tn=Or.length;if(tn===0)throw new TypeError('The value "'+Ye+'" is invalid for argument "value"');for(br=0;br<mt-et;++br)this[br+et]=Or[br%tn]}return this};var rt={};function Ue(je,Ye,et){rt[je]=(function(mt){function Nt(){var lr;return p(this,Nt),lr=_(this,Nt),Object.defineProperty(lr,"message",{value:Ye.apply(lr,arguments),writable:!0,configurable:!0}),lr.name="".concat(lr.name," [").concat(je,"]"),lr.stack,delete lr.name,lr}return g(Nt,mt),v(Nt,[{key:"code",get:function(){return je},set:function(br){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:br,writable:!0})}},{key:"toString",value:function(){return"".concat(this.name," [").concat(je,"]: ").concat(this.message)}}])})(et)}Ue("ERR_BUFFER_OUT_OF_BOUNDS",function(je){return je?"".concat(je," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),Ue("ERR_INVALID_ARG_TYPE",function(je,Ye){return'The "'.concat(je,'" argument must be of type number. Received type ').concat(I(Ye))},TypeError),Ue("ERR_OUT_OF_RANGE",function(je,Ye,et){var mt='The value of "'.concat(je,'" is out of range.'),Nt=et;return Number.isInteger(et)&&Math.abs(et)>Math.pow(2,32)?Nt=xt(String(et)):typeof et=="bigint"&&(Nt=String(et),(et>Math.pow(BigInt(2),BigInt(32))||et<-Math.pow(BigInt(2),BigInt(32)))&&(Nt=xt(Nt)),Nt+="n"),mt+=" It must be ".concat(Ye,". Received ").concat(Nt),mt},RangeError);function xt(je){for(var Ye="",et=je.length,mt=je[0]==="-"?1:0;et>=mt+4;et-=3)Ye="_".concat(je.slice(et-3,et)).concat(Ye);return"".concat(je.slice(0,et)).concat(Ye)}function Gt(je,Ye,et){Ut(Ye,"offset"),(je[Ye]===void 0||je[Ye+et]===void 0)&&kr(Ye,je.length-(et+1))}function Jt(je,Ye,et,mt,Nt,lr){if(je>et||je<Ye){var br=typeof Ye=="bigint"?"n":"",Or;throw Ye===0||Ye===BigInt(0)?Or=">= 0".concat(br," and < 2").concat(br," ** ").concat((lr+1)*8).concat(br):Or=">= -(2".concat(br," ** ").concat((lr+1)*8-1).concat(br,") and < 2 ** ")+"".concat((lr+1)*8-1).concat(br),new rt.ERR_OUT_OF_RANGE("value",Or,je)}Gt(mt,Nt,lr)}function Ut(je,Ye){if(typeof je!="number")throw new rt.ERR_INVALID_ARG_TYPE(Ye,"number",je)}function kr(je,Ye,et){throw Math.floor(je)!==je?(Ut(je,et),new rt.ERR_OUT_OF_RANGE("offset","an integer",je)):Ye<0?new rt.ERR_BUFFER_OUT_OF_BOUNDS:new rt.ERR_OUT_OF_RANGE("offset",">= ".concat(0," and <= ").concat(Ye),je)}var Pr=/[^+/0-9A-Za-z-_]/g;function $r(je){if(je=je.split("=")[0],je=je.trim().replace(Pr,""),je.length<2)return"";for(;je.length%4!==0;)je=je+"=";return je}function rn(je,Ye){Ye=Ye||1/0;for(var et,mt=je.length,Nt=null,lr=[],br=0;br<mt;++br){if(et=je.charCodeAt(br),et>55295&&et<57344){if(!Nt){if(et>56319){(Ye-=3)>-1&&lr.push(239,191,189);continue}else if(br+1===mt){(Ye-=3)>-1&&lr.push(239,191,189);continue}Nt=et;continue}if(et<56320){(Ye-=3)>-1&&lr.push(239,191,189),Nt=et;continue}et=(Nt-55296<<10|et-56320)+65536}else Nt&&(Ye-=3)>-1&&lr.push(239,191,189);if(Nt=null,et<128){if((Ye-=1)<0)break;lr.push(et)}else if(et<2048){if((Ye-=2)<0)break;lr.push(et>>6|192,et&63|128)}else if(et<65536){if((Ye-=3)<0)break;lr.push(et>>12|224,et>>6&63|128,et&63|128)}else if(et<1114112){if((Ye-=4)<0)break;lr.push(et>>18|240,et>>12&63|128,et>>6&63|128,et&63|128)}else throw new Error("Invalid code point")}return lr}function kn(je){for(var Ye=[],et=0;et<je.length;++et)Ye.push(je.charCodeAt(et)&255);return Ye}function Rn(je,Ye){for(var et,mt,Nt,lr=[],br=0;br<je.length&&!((Ye-=2)<0);++br)et=je.charCodeAt(br),mt=et>>8,Nt=et%256,lr.push(Nt),lr.push(mt);return lr}function ci(je){return N.toByteArray($r(je))}function In(je,Ye,et,mt){var Nt;for(Nt=0;Nt<mt&&!(Nt+et>=Ye.length||Nt>=je.length);++Nt)Ye[Nt+et]=je[Nt];return Nt}function Gn(je,Ye){return je instanceof Ye||je!=null&&je.constructor!=null&&je.constructor.name!=null&&je.constructor.name===Ye.name}function mr(je){return je!==je}var St=(function(){for(var je="0123456789abcdef",Ye=new Array(256),et=0;et<16;++et)for(var mt=et*16,Nt=0;Nt<16;++Nt)Ye[mt+Nt]=je[et]+je[Nt];return Ye})();function Ot(je){return typeof BigInt>"u"?Et:je}function Et(){throw new Error("BigInt not supported")}}),9216:(function(l){l.exports=f,l.exports.isMobile=f,l.exports.default=f;var u=/(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,c=/CrOS/,p=/android|ipad|playbook|silk/i;function f(v){v||(v={});var h=v.ua;if(!h&&typeof navigator<"u"&&(h=navigator.userAgent),h&&h.headers&&typeof h.headers["user-agent"]=="string"&&(h=h.headers["user-agent"]),typeof h!="string")return!1;var m=u.test(h)&&!c.test(h)||!!v.tablet&&p.test(h);return!m&&v.tablet&&v.featureDetect&&navigator&&navigator.maxTouchPoints>1&&h.indexOf("Macintosh")!==-1&&h.indexOf("Safari")!==-1&&(m=!0),m}}),6296:(function(l,u,c){l.exports=_;var p=c(7261),f=c(9977),v=c(1811);function h(x,A){this._controllerNames=Object.keys(x),this._controllerList=this._controllerNames.map(function(E){return x[E]}),this._mode=A,this._active=x[A],this._active||(this._mode="turntable",this._active=x.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 m=h.prototype;m.flush=function(x){for(var A=this._controllerList,E=0;E<A.length;++E)A[E].flush(x)},m.idle=function(x){for(var A=this._controllerList,E=0;E<A.length;++E)A[E].idle(x)},m.lookAt=function(x,A,E,D){for(var g=this._controllerList,C=0;C<g.length;++C)g[C].lookAt(x,A,E,D)},m.rotate=function(x,A,E,D){for(var g=this._controllerList,C=0;C<g.length;++C)g[C].rotate(x,A,E,D)},m.pan=function(x,A,E,D){for(var g=this._controllerList,C=0;C<g.length;++C)g[C].pan(x,A,E,D)},m.translate=function(x,A,E,D){for(var g=this._controllerList,C=0;C<g.length;++C)g[C].translate(x,A,E,D)},m.setMatrix=function(x,A){for(var E=this._controllerList,D=0;D<E.length;++D)E[D].setMatrix(x,A)},m.setDistanceLimits=function(x,A){for(var E=this._controllerList,D=0;D<E.length;++D)E[D].setDistanceLimits(x,A)},m.setDistance=function(x,A){for(var E=this._controllerList,D=0;D<E.length;++D)E[D].setDistance(x,A)},m.recalcMatrix=function(x){this._active.recalcMatrix(x)},m.getDistance=function(x){return this._active.getDistance(x)},m.getDistanceLimits=function(x){return this._active.getDistanceLimits(x)},m.lastT=function(){return this._active.lastT()},m.setMode=function(x){if(x!==this._mode){var A=this._controllerNames.indexOf(x);if(!(A<0)){var E=this._active,D=this._controllerList[A],g=Math.max(E.lastT(),D.lastT());E.recalcMatrix(g),D.setMatrix(g,E.computedMatrix),this._active=D,this._mode=x,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}}},m.getMode=function(){return this._mode};function _(x){x=x||{};var A=x.eye||[0,0,1],E=x.center||[0,0,0],D=x.up||[0,1,0],g=x.distanceLimits||[0,1/0],C=x.mode||"turntable",I=p(),N=f(),F=v();return I.setDistanceLimits(g[0],g[1]),I.lookAt(0,A,E,D),N.setDistanceLimits(g[0],g[1]),N.lookAt(0,A,E,D),F.setDistanceLimits(g[0],g[1]),F.lookAt(0,A,E,D),new h({turntable:I,orbit:N,matrix:F},C)}}),7169:(function(l,u,c){var p=typeof WeakMap>"u"?c(1538):WeakMap,f=c(2762),v=c(8116),h=new p;function m(_){var x=h.get(_),A=x&&(x._triangleBuffer.handle||x._triangleBuffer.buffer);if(!A||!_.isBuffer(A)){var E=f(_,new Float32Array([-1,-1,-1,4,4,-1]));x=v(_,[{buffer:E,type:_.FLOAT,size:2}]),x._triangleBuffer=E,h.set(_,x)}x.bind(),_.drawArrays(_.TRIANGLES,0,3),x.unbind()}l.exports=m}),1085:(function(l,u,c){var p=c(1371);l.exports=f;function f(v,h,m){h=typeof h=="number"?h:1,m=m||": ";var _=v.split(/\r?\n/),x=String(_.length+h-1).length;return _.map(function(A,E){var D=E+h,g=String(D).length,C=p(D,x-g);return C+m+A}).join(`
`)}}),3952:(function(l,u,c){l.exports=v;var p=c(3250);function f(h,m){for(var _=new Array(m+1),x=0;x<h.length;++x)_[x]=h[x];for(var x=0;x<=h.length;++x){for(var A=h.length;A<=m;++A){for(var E=new Array(m),D=0;D<m;++D)E[D]=Math.pow(A+1-x,D);_[A]=E}var g=p.apply(void 0,_);if(g)return!0}return!1}function v(h){var m=h.length;if(m===0)return[];if(m===1)return[0];for(var _=h[0].length,x=[h[0]],A=[0],E=1;E<m;++E){if(x.push(h[E]),!f(x,_)){x.pop();continue}if(A.push(E),A.length===_+1)return A}return A}}),5995:(function(l,u,c){l.exports=v;var p=c(7642),f=c(6037);function v(h,m){return p(m).filter(function(_){for(var x=new Array(_.length),A=0;A<_.length;++A)x[A]=m[_[A]];return f(x)*h<1})}}),3502:(function(l,u,c){l.exports=v;var p=c(5995),f=c(9127);function v(h,m){return f(p(h,m))}}),6468:(function(l){l.exports=function(c){return atob(c)}}),2642:(function(l,u,c){l.exports=v;var p=c(727);function f(h){for(var m=0,_=0;_<h.length;++_)m+=h[_];return m}function v(h,m){for(var _=m.length,x=new Array(_+1),A=0;A<_;++A){for(var E=new Array(_+1),D=0;D<=_;++D)E[D]=h[D][A];x[A]=E}x[_]=new Array(_+1);for(var A=0;A<=_;++A)x[_][A]=1;for(var g=new Array(_+1),A=0;A<_;++A)g[A]=m[A];g[_]=1;var C=p(x,g),I=f(C[_+1]);I===0&&(I=1);for(var N=new Array(_+1),A=0;A<=_;++A)N[A]=f(C[A])/I;return N}}),7507:(function(l,u){u.byteLength=x,u.toByteArray=E,u.fromByteArray=C;for(var c=[],p=[],f=typeof Uint8Array<"u"?Uint8Array:Array,v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,m=v.length;h<m;++h)c[h]=v[h],p[v.charCodeAt(h)]=h;p[45]=62,p[95]=63;function _(I){var N=I.length;if(N%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var F=I.indexOf("=");F===-1&&(F=N);var k=F===N?0:4-F%4;return[F,k]}function x(I){var N=_(I),F=N[0],k=N[1];return(F+k)*3/4-k}function A(I,N,F){return(N+F)*3/4-F}function E(I){var N,F=_(I),k=F[0],P=F[1],T=new f(A(I,k,P)),y=0,S=P>0?k-4:k,M;for(M=0;M<S;M+=4)N=p[I.charCodeAt(M)]<<18|p[I.charCodeAt(M+1)]<<12|p[I.charCodeAt(M+2)]<<6|p[I.charCodeAt(M+3)],T[y++]=N>>16&255,T[y++]=N>>8&255,T[y++]=N&255;return P===2&&(N=p[I.charCodeAt(M)]<<2|p[I.charCodeAt(M+1)]>>4,T[y++]=N&255),P===1&&(N=p[I.charCodeAt(M)]<<10|p[I.charCodeAt(M+1)]<<4|p[I.charCodeAt(M+2)]>>2,T[y++]=N>>8&255,T[y++]=N&255),T}function D(I){return c[I>>18&63]+c[I>>12&63]+c[I>>6&63]+c[I&63]}function g(I,N,F){for(var k,P=[],T=N;T<F;T+=3)k=(I[T]<<16&16711680)+(I[T+1]<<8&65280)+(I[T+2]&255),P.push(D(k));return P.join("")}function C(I){for(var N,F=I.length,k=F%3,P=[],T=16383,y=0,S=F-k;y<S;y+=T)P.push(g(I,y,y+T>S?S:y+T));return k===1?(N=I[F-1],P.push(c[N>>2]+c[N<<4&63]+"==")):k===2&&(N=(I[F-2]<<8)+I[F-1],P.push(c[N>>10]+c[N>>4&63]+c[N<<2&63]+"=")),P.join("")}}),3865:(function(l,u,c){var p=c(869);l.exports=f;function f(v,h){return p(v[0].mul(h[1]).add(h[0].mul(v[1])),v[1].mul(h[1]))}}),1318:(function(l){l.exports=u;function u(c,p){return c[0].mul(p[1]).cmp(p[0].mul(c[1]))}}),8697:(function(l,u,c){var p=c(869);l.exports=f;function f(v,h){return p(v[0].mul(h[1]),v[1].mul(h[0]))}}),7842:(function(l,u,c){var p=c(6330),f=c(1533),v=c(2651),h=c(6768),m=c(869),_=c(8697);l.exports=x;function x(A,E){if(p(A))return E?_(A,x(E)):[A[0].clone(),A[1].clone()];var D=0,g,C;if(f(A))g=A.clone();else if(typeof A=="string")g=h(A);else{if(A===0)return[v(0),v(1)];if(A===Math.floor(A))g=v(A);else{for(;A!==Math.floor(A);)A=A*Math.pow(2,256),D-=256;g=v(A)}}if(p(E))g.mul(E[1]),C=E[0].clone();else if(f(E))C=E.clone();else if(typeof E=="string")C=h(E);else if(!E)C=v(1);else if(E===Math.floor(E))C=v(E);else{for(;E!==Math.floor(E);)E=E*Math.pow(2,256),D+=256;C=v(E)}return D>0?g=g.ushln(D):D<0&&(C=C.ushln(-D)),m(g,C)}}),6330:(function(l,u,c){var p=c(1533);l.exports=f;function f(v){return Array.isArray(v)&&v.length===2&&p(v[0])&&p(v[1])}}),5716:(function(l,u,c){var p=c(6859);l.exports=f;function f(v){return v.cmp(new p(0))}}),1369:(function(l,u,c){var p=c(5716);l.exports=f;function f(v){var h=v.length,m=v.words,_=0;if(h===1)_=m[0];else if(h===2)_=m[0]+m[1]*67108864;else for(var x=0;x<h;x++){var A=m[x];_+=A*Math.pow(67108864,x)}return p(v)*_}}),4025:(function(l,u,c){var p=c(2361),f=c(8828).countTrailingZeros;l.exports=v;function v(h){var m=f(p.lo(h));if(m<32)return m;var _=f(p.hi(h));return _>20?52:_+32}}),1533:(function(l,u,c){c(6859),l.exports=p;function p(f){return f&&typeof f=="object"&&!!f.words}}),2651:(function(l,u,c){var p=c(6859),f=c(2361);l.exports=v;function v(h){var m=f.exponent(h);return m<52?new p(h):new p(h*Math.pow(2,52-m)).ushln(m-52)}}),869:(function(l,u,c){var p=c(2651),f=c(5716);l.exports=v;function v(h,m){var _=f(h),x=f(m);if(_===0)return[p(0),p(1)];if(x===0)return[p(0),p(0)];x<0&&(h=h.neg(),m=m.neg());var A=h.gcd(m);return A.cmpn(1)?[h.div(A),m.div(A)]:[h,m]}}),6768:(function(l,u,c){var p=c(6859);l.exports=f;function f(v){return new p(v)}}),6504:(function(l,u,c){var p=c(869);l.exports=f;function f(v,h){return p(v[0].mul(h[0]),v[1].mul(h[1]))}}),7721:(function(l,u,c){var p=c(5716);l.exports=f;function f(v){return p(v[0])*p(v[1])}}),5572:(function(l,u,c){var p=c(869);l.exports=f;function f(v,h){return p(v[0].mul(h[1]).sub(v[1].mul(h[0])),v[1].mul(h[1]))}}),946:(function(l,u,c){var p=c(1369),f=c(4025);l.exports=v;function v(h){var m=h[0],_=h[1];if(m.cmpn(0)===0)return 0;var x=m.abs().divmod(_.abs()),A=x.div,E=p(A),D=x.mod,g=m.negative!==_.negative?-1:1;if(D.cmpn(0)===0)return g*E;if(E){var C=f(E)+4,I=p(D.ushln(C).divRound(_));return g*(E+I*Math.pow(2,-C))}else{var N=_.bitLength()-D.bitLength()+53,I=p(D.ushln(N).divRound(_));return N<1023?g*I*Math.pow(2,-N):(I*=Math.pow(2,-1023),g*I*Math.pow(2,1023-N))}}}),2478:(function(l){function u(m,_,x,A,E){for(var D=E+1;A<=E;){var g=A+E>>>1,C=m[g],I=x!==void 0?x(C,_):C-_;I>=0?(D=g,E=g-1):A=g+1}return D}function c(m,_,x,A,E){for(var D=E+1;A<=E;){var g=A+E>>>1,C=m[g],I=x!==void 0?x(C,_):C-_;I>0?(D=g,E=g-1):A=g+1}return D}function p(m,_,x,A,E){for(var D=A-1;A<=E;){var g=A+E>>>1,C=m[g],I=x!==void 0?x(C,_):C-_;I<0?(D=g,A=g+1):E=g-1}return D}function f(m,_,x,A,E){for(var D=A-1;A<=E;){var g=A+E>>>1,C=m[g],I=x!==void 0?x(C,_):C-_;I<=0?(D=g,A=g+1):E=g-1}return D}function v(m,_,x,A,E){for(;A<=E;){var D=A+E>>>1,g=m[D],C=x!==void 0?x(g,_):g-_;if(C===0)return D;C<=0?A=D+1:E=D-1}return-1}function h(m,_,x,A,E,D){return typeof x=="function"?D(m,_,x,A===void 0?0:A|0,E===void 0?m.length-1:E|0):D(m,_,void 0,x===void 0?0:x|0,A===void 0?m.length-1:A|0)}l.exports={ge:function(m,_,x,A,E){return h(m,_,x,A,E,u)},gt:function(m,_,x,A,E){return h(m,_,x,A,E,c)},lt:function(m,_,x,A,E){return h(m,_,x,A,E,p)},le:function(m,_,x,A,E){return h(m,_,x,A,E,f)},eq:function(m,_,x,A,E){return h(m,_,x,A,E,v)}}}),8828:(function(l,u){"use restrict";var c=32;u.INT_BITS=c,u.INT_MAX=2147483647,u.INT_MIN=-1<<c-1,u.sign=function(v){return(v>0)-(v<0)},u.abs=function(v){var h=v>>c-1;return(v^h)-h},u.min=function(v,h){return h^(v^h)&-(v<h)},u.max=function(v,h){return v^(v^h)&-(v<h)},u.isPow2=function(v){return!(v&v-1)&&!!v},u.log2=function(v){var h,m;return h=(v>65535)<<4,v>>>=h,m=(v>255)<<3,v>>>=m,h|=m,m=(v>15)<<2,v>>>=m,h|=m,m=(v>3)<<1,v>>>=m,h|=m,h|v>>1},u.log10=function(v){return v>=1e9?9:v>=1e8?8:v>=1e7?7:v>=1e6?6:v>=1e5?5:v>=1e4?4:v>=1e3?3:v>=100?2:v>=10?1:0},u.popCount=function(v){return v=v-(v>>>1&1431655765),v=(v&858993459)+(v>>>2&858993459),(v+(v>>>4)&252645135)*16843009>>>24};function p(v){var h=32;return v&=-v,v&&h--,v&65535&&(h-=16),v&16711935&&(h-=8),v&252645135&&(h-=4),v&858993459&&(h-=2),v&1431655765&&(h-=1),h}u.countTrailingZeros=p,u.nextPow2=function(v){return v+=v===0,--v,v|=v>>>1,v|=v>>>2,v|=v>>>4,v|=v>>>8,v|=v>>>16,v+1},u.prevPow2=function(v){return v|=v>>>1,v|=v>>>2,v|=v>>>4,v|=v>>>8,v|=v>>>16,v-(v>>>1)},u.parity=function(v){return v^=v>>>16,v^=v>>>8,v^=v>>>4,v&=15,27030>>>v&1};var f=new Array(256);(function(v){for(var h=0;h<256;++h){var m=h,_=h,x=7;for(m>>>=1;m;m>>>=1)_<<=1,_|=m&1,--x;v[h]=_<<x&255}})(f),u.reverse=function(v){return f[v&255]<<24|f[v>>>8&255]<<16|f[v>>>16&255]<<8|f[v>>>24&255]},u.interleave2=function(v,h){return v&=65535,v=(v|v<<8)&16711935,v=(v|v<<4)&252645135,v=(v|v<<2)&858993459,v=(v|v<<1)&1431655765,h&=65535,h=(h|h<<8)&16711935,h=(h|h<<4)&252645135,h=(h|h<<2)&858993459,h=(h|h<<1)&1431655765,v|h<<1},u.deinterleave2=function(v,h){return v=v>>>h&1431655765,v=(v|v>>>1)&858993459,v=(v|v>>>2)&252645135,v=(v|v>>>4)&16711935,v=(v|v>>>16)&65535,v<<16>>16},u.interleave3=function(v,h,m){return v&=1023,v=(v|v<<16)&4278190335,v=(v|v<<8)&251719695,v=(v|v<<4)&3272356035,v=(v|v<<2)&1227133513,h&=1023,h=(h|h<<16)&4278190335,h=(h|h<<8)&251719695,h=(h|h<<4)&3272356035,h=(h|h<<2)&1227133513,v|=h<<1,m&=1023,m=(m|m<<16)&4278190335,m=(m|m<<8)&251719695,m=(m|m<<4)&3272356035,m=(m|m<<2)&1227133513,v|m<<2},u.deinterleave3=function(v,h){return v=v>>>h&1227133513,v=(v|v>>>2)&3272356035,v=(v|v>>>4)&251719695,v=(v|v>>>8)&4278190335,v=(v|v>>>16)&1023,v<<22>>22},u.nextCombination=function(v){var h=v|v-1;return h+1|(~h&-~h)-1>>>p(v)+1}}),6859:(function(l,u,c){l=c.nmd(l),(function(p,f){function v(J,G){if(!J)throw new Error(G||"Assertion failed")}function h(J,G){J.super_=G;var ee=function(){};ee.prototype=G.prototype,J.prototype=new ee,J.prototype.constructor=J}function m(J,G,ee){if(m.isBN(J))return J;this.negative=0,this.words=null,this.length=0,this.red=null,J!==null&&((G==="le"||G==="be")&&(ee=G,G=10),this._init(J||0,G||10,ee||"be"))}typeof p=="object"?p.exports=m:f.BN=m,m.BN=m,m.wordSize=26;var _;try{typeof window<"u"&&typeof window.Buffer<"u"?_=window.Buffer:_=c(7790).Buffer}catch{}m.isBN=function(G){return G instanceof m?!0:G!==null&&typeof G=="object"&&G.constructor.wordSize===m.wordSize&&Array.isArray(G.words)},m.max=function(G,ee){return G.cmp(ee)>0?G:ee},m.min=function(G,ee){return G.cmp(ee)<0?G:ee},m.prototype._init=function(G,ee,re){if(typeof G=="number")return this._initNumber(G,ee,re);if(typeof G=="object")return this._initArray(G,ee,re);ee==="hex"&&(ee=16),v(ee===(ee|0)&&ee>=2&&ee<=36),G=G.toString().replace(/\s+/g,"");var fe=0;G[0]==="-"&&(fe++,this.negative=1),fe<G.length&&(ee===16?this._parseHex(G,fe,re):(this._parseBase(G,ee,fe),re==="le"&&this._initArray(this.toArray(),ee,re)))},m.prototype._initNumber=function(G,ee,re){G<0&&(this.negative=1,G=-G),G<67108864?(this.words=[G&67108863],this.length=1):G<4503599627370496?(this.words=[G&67108863,G/67108864&67108863],this.length=2):(v(G<9007199254740992),this.words=[G&67108863,G/67108864&67108863,1],this.length=3),re==="le"&&this._initArray(this.toArray(),ee,re)},m.prototype._initArray=function(G,ee,re){if(v(typeof G.length=="number"),G.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(G.length/3),this.words=new Array(this.length);for(var fe=0;fe<this.length;fe++)this.words[fe]=0;var we,Oe,ke=0;if(re==="be")for(fe=G.length-1,we=0;fe>=0;fe-=3)Oe=G[fe]|G[fe-1]<<8|G[fe-2]<<16,this.words[we]|=Oe<<ke&67108863,this.words[we+1]=Oe>>>26-ke&67108863,ke+=24,ke>=26&&(ke-=26,we++);else if(re==="le")for(fe=0,we=0;fe<G.length;fe+=3)Oe=G[fe]|G[fe+1]<<8|G[fe+2]<<16,this.words[we]|=Oe<<ke&67108863,this.words[we+1]=Oe>>>26-ke&67108863,ke+=24,ke>=26&&(ke-=26,we++);return this.strip()};function x(J,G){var ee=J.charCodeAt(G);return ee>=65&&ee<=70?ee-55:ee>=97&&ee<=102?ee-87:ee-48&15}function A(J,G,ee){var re=x(J,ee);return ee-1>=G&&(re|=x(J,ee-1)<<4),re}m.prototype._parseHex=function(G,ee,re){this.length=Math.ceil((G.length-ee)/6),this.words=new Array(this.length);for(var fe=0;fe<this.length;fe++)this.words[fe]=0;var we=0,Oe=0,ke;if(re==="be")for(fe=G.length-1;fe>=ee;fe-=2)ke=A(G,ee,fe)<<we,this.words[Oe]|=ke&67108863,we>=18?(we-=18,Oe+=1,this.words[Oe]|=ke>>>26):we+=8;else{var Le=G.length-ee;for(fe=Le%2===0?ee+1:ee;fe<G.length;fe+=2)ke=A(G,ee,fe)<<we,this.words[Oe]|=ke&67108863,we>=18?(we-=18,Oe+=1,this.words[Oe]|=ke>>>26):we+=8}this.strip()};function E(J,G,ee,re){for(var fe=0,we=Math.min(J.length,ee),Oe=G;Oe<we;Oe++){var ke=J.charCodeAt(Oe)-48;fe*=re,ke>=49?fe+=ke-49+10:ke>=17?fe+=ke-17+10:fe+=ke}return fe}m.prototype._parseBase=function(G,ee,re){this.words=[0],this.length=1;for(var fe=0,we=1;we<=67108863;we*=ee)fe++;fe--,we=we/ee|0;for(var Oe=G.length-re,ke=Oe%fe,Le=Math.min(Oe,Oe-ke)+re,oe=0,be=re;be<Le;be+=fe)oe=E(G,be,be+fe,ee),this.imuln(we),this.words[0]+oe<67108864?this.words[0]+=oe:this._iaddn(oe);if(ke!==0){var _e=1;for(oe=E(G,be,G.length,ee),be=0;be<ke;be++)_e*=ee;this.imuln(_e),this.words[0]+oe<67108864?this.words[0]+=oe:this._iaddn(oe)}this.strip()},m.prototype.copy=function(G){G.words=new Array(this.length);for(var ee=0;ee<this.length;ee++)G.words[ee]=this.words[ee];G.length=this.length,G.negative=this.negative,G.red=this.red},m.prototype.clone=function(){var G=new m(null);return this.copy(G),G},m.prototype._expand=function(G){for(;this.length<G;)this.words[this.length++]=0;return this},m.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},m.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},m.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var D=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],g=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],C=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];m.prototype.toString=function(G,ee){G=G||10,ee=ee|0||1;var re;if(G===16||G==="hex"){re="";for(var fe=0,we=0,Oe=0;Oe<this.length;Oe++){var ke=this.words[Oe],Le=((ke<<fe|we)&16777215).toString(16);we=ke>>>24-fe&16777215,we!==0||Oe!==this.length-1?re=D[6-Le.length]+Le+re:re=Le+re,fe+=2,fe>=26&&(fe-=26,Oe--)}for(we!==0&&(re=we.toString(16)+re);re.length%ee!==0;)re="0"+re;return this.negative!==0&&(re="-"+re),re}if(G===(G|0)&&G>=2&&G<=36){var oe=g[G],be=C[G];re="";var _e=this.clone();for(_e.negative=0;!_e.isZero();){var he=_e.modn(be).toString(G);_e=_e.idivn(be),_e.isZero()?re=he+re:re=D[oe-he.length]+he+re}for(this.isZero()&&(re="0"+re);re.length%ee!==0;)re="0"+re;return this.negative!==0&&(re="-"+re),re}v(!1,"Base should be between 2 and 36")},m.prototype.toNumber=function(){var G=this.words[0];return this.length===2?G+=this.words[1]*67108864:this.length===3&&this.words[2]===1?G+=4503599627370496+this.words[1]*67108864:this.length>2&&v(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-G:G},m.prototype.toJSON=function(){return this.toString(16)},m.prototype.toBuffer=function(G,ee){return v(typeof _<"u"),this.toArrayLike(_,G,ee)},m.prototype.toArray=function(G,ee){return this.toArrayLike(Array,G,ee)},m.prototype.toArrayLike=function(G,ee,re){var fe=this.byteLength(),we=re||Math.max(1,fe);v(fe<=we,"byte array longer than desired length"),v(we>0,"Requested array length <= 0"),this.strip();var Oe=ee==="le",ke=new G(we),Le,oe,be=this.clone();if(Oe){for(oe=0;!be.isZero();oe++)Le=be.andln(255),be.iushrn(8),ke[oe]=Le;for(;oe<we;oe++)ke[oe]=0}else{for(oe=0;oe<we-fe;oe++)ke[oe]=0;for(oe=0;!be.isZero();oe++)Le=be.andln(255),be.iushrn(8),ke[we-oe-1]=Le}return ke},Math.clz32?m.prototype._countBits=function(G){return 32-Math.clz32(G)}:m.prototype._countBits=function(G){var ee=G,re=0;return ee>=4096&&(re+=13,ee>>>=13),ee>=64&&(re+=7,ee>>>=7),ee>=8&&(re+=4,ee>>>=4),ee>=2&&(re+=2,ee>>>=2),re+ee},m.prototype._zeroBits=function(G){if(G===0)return 26;var ee=G,re=0;return(ee&8191)===0&&(re+=13,ee>>>=13),(ee&127)===0&&(re+=7,ee>>>=7),(ee&15)===0&&(re+=4,ee>>>=4),(ee&3)===0&&(re+=2,ee>>>=2),(ee&1)===0&&re++,re},m.prototype.bitLength=function(){var G=this.words[this.length-1],ee=this._countBits(G);return(this.length-1)*26+ee};function I(J){for(var G=new Array(J.bitLength()),ee=0;ee<G.length;ee++){var re=ee/26|0,fe=ee%26;G[ee]=(J.words[re]&1<<fe)>>>fe}return G}m.prototype.zeroBits=function(){if(this.isZero())return 0;for(var G=0,ee=0;ee<this.length;ee++){var re=this._zeroBits(this.words[ee]);if(G+=re,re!==26)break}return G},m.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},m.prototype.toTwos=function(G){return this.negative!==0?this.abs().inotn(G).iaddn(1):this.clone()},m.prototype.fromTwos=function(G){return this.testn(G-1)?this.notn(G).iaddn(1).ineg():this.clone()},m.prototype.isNeg=function(){return this.negative!==0},m.prototype.neg=function(){return this.clone().ineg()},m.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},m.prototype.iuor=function(G){for(;this.length<G.length;)this.words[this.length++]=0;for(var ee=0;ee<G.length;ee++)this.words[ee]=this.words[ee]|G.words[ee];return this.strip()},m.prototype.ior=function(G){return v((this.negative|G.negative)===0),this.iuor(G)},m.prototype.or=function(G){return this.length>G.length?this.clone().ior(G):G.clone().ior(this)},m.prototype.uor=function(G){return this.length>G.length?this.clone().iuor(G):G.clone().iuor(this)},m.prototype.iuand=function(G){var ee;this.length>G.length?ee=G:ee=this;for(var re=0;re<ee.length;re++)this.words[re]=this.words[re]&G.words[re];return this.length=ee.length,this.strip()},m.prototype.iand=function(G){return v((this.negative|G.negative)===0),this.iuand(G)},m.prototype.and=function(G){return this.length>G.length?this.clone().iand(G):G.clone().iand(this)},m.prototype.uand=function(G){return this.length>G.length?this.clone().iuand(G):G.clone().iuand(this)},m.prototype.iuxor=function(G){var ee,re;this.length>G.length?(ee=this,re=G):(ee=G,re=this);for(var fe=0;fe<re.length;fe++)this.words[fe]=ee.words[fe]^re.words[fe];if(this!==ee)for(;fe<ee.length;fe++)this.words[fe]=ee.words[fe];return this.length=ee.length,this.strip()},m.prototype.ixor=function(G){return v((this.negative|G.negative)===0),this.iuxor(G)},m.prototype.xor=function(G){return this.length>G.length?this.clone().ixor(G):G.clone().ixor(this)},m.prototype.uxor=function(G){return this.length>G.length?this.clone().iuxor(G):G.clone().iuxor(this)},m.prototype.inotn=function(G){v(typeof G=="number"&&G>=0);var ee=Math.ceil(G/26)|0,re=G%26;this._expand(ee),re>0&&ee--;for(var fe=0;fe<ee;fe++)this.words[fe]=~this.words[fe]&67108863;return re>0&&(this.words[fe]=~this.words[fe]&67108863>>26-re),this.strip()},m.prototype.notn=function(G){return this.clone().inotn(G)},m.prototype.setn=function(G,ee){v(typeof G=="number"&&G>=0);var re=G/26|0,fe=G%26;return this._expand(re+1),ee?this.words[re]=this.words[re]|1<<fe:this.words[re]=this.words[re]&~(1<<fe),this.strip()},m.prototype.iadd=function(G){var ee;if(this.negative!==0&&G.negative===0)return this.negative=0,ee=this.isub(G),this.negative^=1,this._normSign();if(this.negative===0&&G.negative!==0)return G.negative=0,ee=this.isub(G),G.negative=1,ee._normSign();var re,fe;this.length>G.length?(re=this,fe=G):(re=G,fe=this);for(var we=0,Oe=0;Oe<fe.length;Oe++)ee=(re.words[Oe]|0)+(fe.words[Oe]|0)+we,this.words[Oe]=ee&67108863,we=ee>>>26;for(;we!==0&&Oe<re.length;Oe++)ee=(re.words[Oe]|0)+we,this.words[Oe]=ee&67108863,we=ee>>>26;if(this.length=re.length,we!==0)this.words[this.length]=we,this.length++;else if(re!==this)for(;Oe<re.length;Oe++)this.words[Oe]=re.words[Oe];return this},m.prototype.add=function(G){var ee;return G.negative!==0&&this.negative===0?(G.negative=0,ee=this.sub(G),G.negative^=1,ee):G.negative===0&&this.negative!==0?(this.negative=0,ee=G.sub(this),this.negative=1,ee):this.length>G.length?this.clone().iadd(G):G.clone().iadd(this)},m.prototype.isub=function(G){if(G.negative!==0){G.negative=0;var ee=this.iadd(G);return G.negative=1,ee._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(G),this.negative=1,this._normSign();var re=this.cmp(G);if(re===0)return this.negative=0,this.length=1,this.words[0]=0,this;var fe,we;re>0?(fe=this,we=G):(fe=G,we=this);for(var Oe=0,ke=0;ke<we.length;ke++)ee=(fe.words[ke]|0)-(we.words[ke]|0)+Oe,Oe=ee>>26,this.words[ke]=ee&67108863;for(;Oe!==0&&ke<fe.length;ke++)ee=(fe.words[ke]|0)+Oe,Oe=ee>>26,this.words[ke]=ee&67108863;if(Oe===0&&ke<fe.length&&fe!==this)for(;ke<fe.length;ke++)this.words[ke]=fe.words[ke];return this.length=Math.max(this.length,ke),fe!==this&&(this.negative=1),this.strip()},m.prototype.sub=function(G){return this.clone().isub(G)};function N(J,G,ee){ee.negative=G.negative^J.negative;var re=J.length+G.length|0;ee.length=re,re=re-1|0;var fe=J.words[0]|0,we=G.words[0]|0,Oe=fe*we,ke=Oe&67108863,Le=Oe/67108864|0;ee.words[0]=ke;for(var oe=1;oe<re;oe++){for(var be=Le>>>26,_e=Le&67108863,he=Math.min(oe,G.length-1),De=Math.max(0,oe-J.length+1);De<=he;De++){var xe=oe-De|0;fe=J.words[xe]|0,we=G.words[De]|0,Oe=fe*we+_e,be+=Oe/67108864|0,_e=Oe&67108863}ee.words[oe]=_e|0,Le=be|0}return Le!==0?ee.words[oe]=Le|0:ee.length--,ee.strip()}var F=function(G,ee,re){var fe=G.words,we=ee.words,Oe=re.words,ke=0,Le,oe,be,_e=fe[0]|0,he=_e&8191,De=_e>>>13,xe=fe[1]|0,se=xe&8191,Ee=xe>>>13,Te=fe[2]|0,Be=Te&8191,tt=Te>>>13,at=fe[3]|0,gt=at&8191,pt=at>>>13,Rt=fe[4]|0,$t=Rt&8191,Wt=Rt>>>13,Ht=fe[5]|0,Ft=Ht&8191,st=Ht>>>13,rt=fe[6]|0,Ue=rt&8191,xt=rt>>>13,Gt=fe[7]|0,Jt=Gt&8191,Ut=Gt>>>13,kr=fe[8]|0,Pr=kr&8191,$r=kr>>>13,rn=fe[9]|0,kn=rn&8191,Rn=rn>>>13,ci=we[0]|0,In=ci&8191,Gn=ci>>>13,mr=we[1]|0,St=mr&8191,Ot=mr>>>13,Et=we[2]|0,je=Et&8191,Ye=Et>>>13,et=we[3]|0,mt=et&8191,Nt=et>>>13,lr=we[4]|0,br=lr&8191,Or=lr>>>13,tn=we[5]|0,Jr=tn&8191,dn=tn>>>13,on=we[6]|0,Nn=on&8191,Wi=on>>>13,Oa=we[7]|0,Da=Oa&8191,Aa=Oa>>>13,Ka=we[8]|0,Sa=Ka&8191,no=Ka>>>13,Fo=we[9]|0,an=Fo&8191,Hr=Fo>>>13;re.negative=G.negative^ee.negative,re.length=19,Le=Math.imul(he,In),oe=Math.imul(he,Gn),oe=oe+Math.imul(De,In)|0,be=Math.imul(De,Gn);var nn=(ke+Le|0)+((oe&8191)<<13)|0;ke=(be+(oe>>>13)|0)+(nn>>>26)|0,nn&=67108863,Le=Math.imul(se,In),oe=Math.imul(se,Gn),oe=oe+Math.imul(Ee,In)|0,be=Math.imul(Ee,Gn),Le=Le+Math.imul(he,St)|0,oe=oe+Math.imul(he,Ot)|0,oe=oe+Math.imul(De,St)|0,be=be+Math.imul(De,Ot)|0;var Kr=(ke+Le|0)+((oe&8191)<<13)|0;ke=(be+(oe>>>13)|0)+(Kr>>>26)|0,Kr&=67108863,Le=Math.imul(Be,In),oe=Math.imul(Be,Gn),oe=oe+Math.imul(tt,In)|0,be=Math.imul(tt,Gn),Le=Le+Math.imul(se,St)|0,oe=oe+Math.imul(se,Ot)|0,oe=oe+Math.imul(Ee,St)|0,be=be+Math.imul(Ee,Ot)|0,Le=Le+Math.imul(he,je)|0,oe=oe+Math.imul(he,Ye)|0,oe=oe+Math.imul(De,je)|0,be=be+Math.imul(De,Ye)|0;var $n=(ke+Le|0)+((oe&8191)<<13)|0;ke=(be+(oe>>>13)|0)+($n>>>26)|0,$n&=67108863,Le=Math.imul(gt,In),oe=Math.imul(gt,Gn),oe=oe+Math.imul(pt,In)|0,be=Math.imul(pt,Gn),Le=Le+Math.imul(Be,St)|0,oe=oe+Math.imul(Be,Ot)|0,oe=oe+Math.imul(tt,St)|0,be=be+Math.imul(tt,Ot)|0,Le=Le+Math.imul(se,je)|0,oe=oe+Math.imul(se,Ye)|0,oe=oe+Math.imul(Ee,je)|0,be=be+Math.imul(Ee,Ye)|0,Le=Le+Math.imul(he,mt)|0,oe=oe+Math.imul(he,Nt)|0,oe=oe+Math.imul(De,mt)|0,be=be+Math.imul(De,Nt)|0;var Ai=(ke+Le|0)+((oe&8191)<<13)|0;ke=(be+(oe>>>13)|0)+(Ai>>>26)|0,Ai&=67108863,Le=Math.imul($t,In),oe=Math.imul($t,Gn),oe=oe+Math.imul(Wt,In)|0,be=Math.imul(Wt,Gn),Le=Le+Math.imul(gt,St)|0,oe=oe+Math.imul(gt,Ot)|0,oe=oe+Math.imul(pt,St)|0,be=be+Math.imul(pt,Ot)|0,Le=Le+Math.imul(Be,je)|0,oe=oe+Math.imul(Be,Ye)|0,oe=oe+Math.imul(tt,je)|0,be=be+Math.imul(tt,Ye)|0,Le=Le+Math.imul(se,mt)|0,oe=oe+Math.imul(se,Nt)|0,oe=oe+Math.imul(Ee,mt)|0,be=be+Math.imul(Ee,Nt)|0,Le=Le+Math.imul(he,br)|0,oe=oe+Math.imul(he,Or)|0,oe=oe+Math.imul(De,br)|0,be=be+Math.imul(De,Or)|0;var aa=(ke+Le|0)+((oe&8191)<<13)|0;ke=(be+(oe>>>13)|0)+(aa>>>26)|0,aa&=67108863,Le=Math.imul(Ft,In),oe=Math.imul(Ft,Gn),oe=oe+Math.imul(st,In)|0,be=Math.imul(st,Gn),Le=Le+Math.imul($t,St)|0,oe=oe+Math.imul($t,Ot)|0,oe=oe+Math.imul(Wt,St)|0,be=be+Math.imul(Wt,Ot)|0,Le=Le+Math.imul(gt,je)|0,oe=oe+Math.imul(gt,Ye)|0,oe=oe+Math.imul(pt,je)|0,be=be+Math.imul(pt,Ye)|0,Le=Le+Math.imul(Be,mt)|0,oe=oe+Math.imul(Be,Nt)|0,oe=oe+Math.imul(tt,mt)|0,be=be+Math.imul(tt,Nt)|0,Le=Le+Math.imul(se,br)|0,oe=oe+Math.imul(se,Or)|0,oe=oe+Math.imul(Ee,br)|0,be=be+Math.imul(Ee,Or)|0,Le=Le+Math.imul(he,Jr)|0,oe=oe+Math.imul(he,dn)|0,oe=oe+Math.imul(De,Jr)|0,be=be+Math.imul(De,dn)|0;var Ci=(ke+Le|0)+((oe&8191)<<13)|0;ke=(be+(oe>>>13)|0)+(Ci>>>26)|0,Ci&=67108863,Le=Math.imul(Ue,In),oe=Math.imul(Ue,Gn),oe=oe+Math.imul(xt,In)|0,be=Math.imul(xt,Gn),Le=Le+Math.imul(Ft,St)|0,oe=oe+Math.imul(Ft,Ot)|0,oe=oe+Math.imul(st,St)|0,be=be+Math.imul(st,Ot)|0,Le=Le+Math.imul($t,je)|0,oe=oe+Math.imul($t,Ye)|0,oe=oe+Math.imul(Wt,je)|0,be=be+Math.imul(Wt,Ye)|0,Le=Le+Math.imul(gt,mt)|0,oe=oe+Math.imul(gt,Nt)|0,oe=oe+Math.imul(pt,mt)|0,be=be+Math.imul(pt,Nt)|0,Le=Le+Math.imul(Be,br)|0,oe=oe+Math.imul(Be,Or)|0,oe=oe+Math.imul(tt,br)|0,be=be+Math.imul(tt,Or)|0,Le=Le+Math.imul(se,Jr)|0,oe=oe+Math.imul(se,dn)|0,oe=oe+Math.imul(Ee,Jr)|0,be=be+Math.imul(Ee,dn)|0,Le=Le+Math.imul(he,Nn)|0,oe=oe+Math.imul(he,Wi)|0,oe=oe+Math.imul(De,Nn)|0,be=be+Math.imul(De,Wi)|0;var Ta=(ke+Le|0)+((oe&8191)<<13)|0;ke=(be+(oe>>>13)|0)+(Ta>>>26)|0,Ta&=67108863,Le=Math.imul(Jt,In),oe=Math.imul(Jt,Gn),oe=oe+Math.imul(Ut,In)|0,be=Math.imul(Ut,Gn),Le=Le+Math.imul(Ue,St)|0,oe=oe+Math.imul(Ue,Ot)|0,oe=oe+Math.imul(xt,St)|0,be=be+Math.imul(xt,Ot)|0,Le=Le+Math.imul(Ft,je)|0,oe=oe+Math.imul(Ft,Ye)|0,oe=oe+Math.imul(st,je)|0,be=be+Math.imul(st,Ye)|0,Le=Le+Math.imul($t,mt)|0,oe=oe+Math.imul($t,Nt)|0,oe=oe+Math.imul(Wt,mt)|0,be=be+Math.imul(Wt,Nt)|0,Le=Le+Math.imul(gt,br)|0,oe=oe+Math.imul(gt,Or)|0,oe=oe+Math.imul(pt,br)|0,be=be+Math.imul(pt,Or)|0,Le=Le+Math.imul(Be,Jr)|0,oe=oe+Math.imul(Be,dn)|0,oe=oe+Math.imul(tt,Jr)|0,be=be+Math.imul(tt,dn)|0,Le=Le+Math.imul(se,Nn)|0,oe=oe+Math.imul(se,Wi)|0,oe=oe+Math.imul(Ee,Nn)|0,be=be+Math.imul(Ee,Wi)|0,Le=Le+Math.imul(he,Da)|0,oe=oe+Math.imul(he,Aa)|0,oe=oe+Math.imul(De,Da)|0,be=be+Math.imul(De,Aa)|0;var Na=(ke+Le|0)+((oe&8191)<<13)|0;ke=(be+(oe>>>13)|0)+(Na>>>26)|0,Na&=67108863,Le=Math.imul(Pr,In),oe=Math.imul(Pr,Gn),oe=oe+Math.imul($r,In)|0,be=Math.imul($r,Gn),Le=Le+Math.imul(Jt,St)|0,oe=oe+Math.imul(Jt,Ot)|0,oe=oe+Math.imul(Ut,St)|0,be=be+Math.imul(Ut,Ot)|0,Le=Le+Math.imul(Ue,je)|0,oe=oe+Math.imul(Ue,Ye)|0,oe=oe+Math.imul(xt,je)|0,be=be+Math.imul(xt,Ye)|0,Le=Le+Math.imul(Ft,mt)|0,oe=oe+Math.imul(Ft,Nt)|0,oe=oe+Math.imul(st,mt)|0,be=be+Math.imul(st,Nt)|0,Le=Le+Math.imul($t,br)|0,oe=oe+Math.imul($t,Or)|0,oe=oe+Math.imul(Wt,br)|0,be=be+Math.imul(Wt,Or)|0,Le=Le+Math.imul(gt,Jr)|0,oe=oe+Math.imul(gt,dn)|0,oe=oe+Math.imul(pt,Jr)|0,be=be+Math.imul(pt,dn)|0,Le=Le+Math.imul(Be,Nn)|0,oe=oe+Math.imul(Be,Wi)|0,oe=oe+Math.imul(tt,Nn)|0,be=be+Math.imul(tt,Wi)|0,Le=Le+Math.imul(se,Da)|0,oe=oe+Math.imul(se,Aa)|0,oe=oe+Math.imul(Ee,Da)|0,be=be+Math.imul(Ee,Aa)|0,Le=Le+Math.imul(he,Sa)|0,oe=oe+Math.imul(he,no)|0,oe=oe+Math.imul(De,Sa)|0,be=be+Math.imul(De,no)|0;var ro=(ke+Le|0)+((oe&8191)<<13)|0;ke=(be+(oe>>>13)|0)+(ro>>>26)|0,ro&=67108863,Le=Math.imul(kn,In),oe=Math.imul(kn,Gn),oe=oe+Math.imul(Rn,In)|0,be=Math.imul(Rn,Gn),Le=Le+Math.imul(Pr,St)|0,oe=oe+Math.imul(Pr,Ot)|0,oe=oe+Math.imul($r,St)|0,be=be+Math.imul($r,Ot)|0,Le=Le+Math.imul(Jt,je)|0,oe=oe+Math.imul(Jt,Ye)|0,oe=oe+Math.imul(Ut,je)|0,be=be+Math.imul(Ut,Ye)|0,Le=Le+Math.imul(Ue,mt)|0,oe=oe+Math.imul(Ue,Nt)|0,oe=oe+Math.imul(xt,mt)|0,be=be+Math.imul(xt,Nt)|0,Le=Le+Math.imul(Ft,br)|0,oe=oe+Math.imul(Ft,Or)|0,oe=oe+Math.imul(st,br)|0,be=be+Math.imul(st,Or)|0,Le=Le+Math.imul($t,Jr)|0,oe=oe+Math.imul($t,dn)|0,oe=oe+Math.imul(Wt,Jr)|0,be=be+Math.imul(Wt,dn)|0,Le=Le+Math.imul(gt,Nn)|0,oe=oe+Math.imul(gt,Wi)|0,oe=oe+Math.imul(pt,Nn)|0,be=be+Math.imul(pt,Wi)|0,Le=Le+Math.imul(Be,Da)|0,oe=oe+Math.imul(Be,Aa)|0,oe=oe+Math.imul(tt,Da)|0,be=be+Math.imul(tt,Aa)|0,Le=Le+Math.imul(se,Sa)|0,oe=oe+Math.imul(se,no)|0,oe=oe+Math.imul(Ee,Sa)|0,be=be+Math.imul(Ee,no)|0,Le=Le+Math.imul(he,an)|0,oe=oe+Math.imul(he,Hr)|0,oe=oe+Math.imul(De,an)|0,be=be+Math.imul(De,Hr)|0;var oo=(ke+Le|0)+((oe&8191)<<13)|0;ke=(be+(oe>>>13)|0)+(oo>>>26)|0,oo&=67108863,Le=Math.imul(kn,St),oe=Math.imul(kn,Ot),oe=oe+Math.imul(Rn,St)|0,be=Math.imul(Rn,Ot),Le=Le+Math.imul(Pr,je)|0,oe=oe+Math.imul(Pr,Ye)|0,oe=oe+Math.imul($r,je)|0,be=be+Math.imul($r,Ye)|0,Le=Le+Math.imul(Jt,mt)|0,oe=oe+Math.imul(Jt,Nt)|0,oe=oe+Math.imul(Ut,mt)|0,be=be+Math.imul(Ut,Nt)|0,Le=Le+Math.imul(Ue,br)|0,oe=oe+Math.imul(Ue,Or)|0,oe=oe+Math.imul(xt,br)|0,be=be+Math.imul(xt,Or)|0,Le=Le+Math.imul(Ft,Jr)|0,oe=oe+Math.imul(Ft,dn)|0,oe=oe+Math.imul(st,Jr)|0,be=be+Math.imul(st,dn)|0,Le=Le+Math.imul($t,Nn)|0,oe=oe+Math.imul($t,Wi)|0,oe=oe+Math.imul(Wt,Nn)|0,be=be+Math.imul(Wt,Wi)|0,Le=Le+Math.imul(gt,Da)|0,oe=oe+Math.imul(gt,Aa)|0,oe=oe+Math.imul(pt,Da)|0,be=be+Math.imul(pt,Aa)|0,Le=Le+Math.imul(Be,Sa)|0,oe=oe+Math.imul(Be,no)|0,oe=oe+Math.imul(tt,Sa)|0,be=be+Math.imul(tt,no)|0,Le=Le+Math.imul(se,an)|0,oe=oe+Math.imul(se,Hr)|0,oe=oe+Math.imul(Ee,an)|0,be=be+Math.imul(Ee,Hr)|0;var xo=(ke+Le|0)+((oe&8191)<<13)|0;ke=(be+(oe>>>13)|0)+(xo>>>26)|0,xo&=67108863,Le=Math.imul(kn,je),oe=Math.imul(kn,Ye),oe=oe+Math.imul(Rn,je)|0,be=Math.imul(Rn,Ye),Le=Le+Math.imul(Pr,mt)|0,oe=oe+Math.imul(Pr,Nt)|0,oe=oe+Math.imul($r,mt)|0,be=be+Math.imul($r,Nt)|0,Le=Le+Math.imul(Jt,br)|0,oe=oe+Math.imul(Jt,Or)|0,oe=oe+Math.imul(Ut,br)|0,be=be+Math.imul(Ut,Or)|0,Le=Le+Math.imul(Ue,Jr)|0,oe=oe+Math.imul(Ue,dn)|0,oe=oe+Math.imul(xt,Jr)|0,be=be+Math.imul(xt,dn)|0,Le=Le+Math.imul(Ft,Nn)|0,oe=oe+Math.imul(Ft,Wi)|0,oe=oe+Math.imul(st,Nn)|0,be=be+Math.imul(st,Wi)|0,Le=Le+Math.imul($t,Da)|0,oe=oe+Math.imul($t,Aa)|0,oe=oe+Math.imul(Wt,Da)|0,be=be+Math.imul(Wt,Aa)|0,Le=Le+Math.imul(gt,Sa)|0,oe=oe+Math.imul(gt,no)|0,oe=oe+Math.imul(pt,Sa)|0,be=be+Math.imul(pt,no)|0,Le=Le+Math.imul(Be,an)|0,oe=oe+Math.imul(Be,Hr)|0,oe=oe+Math.imul(tt,an)|0,be=be+Math.imul(tt,Hr)|0;var vr=(ke+Le|0)+((oe&8191)<<13)|0;ke=(be+(oe>>>13)|0)+(vr>>>26)|0,vr&=67108863,Le=Math.imul(kn,mt),oe=Math.imul(kn,Nt),oe=oe+Math.imul(Rn,mt)|0,be=Math.imul(Rn,Nt),Le=Le+Math.imul(Pr,br)|0,oe=oe+Math.imul(Pr,Or)|0,oe=oe+Math.imul($r,br)|0,be=be+Math.imul($r,Or)|0,Le=Le+Math.imul(Jt,Jr)|0,oe=oe+Math.imul(Jt,dn)|0,oe=oe+Math.imul(Ut,Jr)|0,be=be+Math.imul(Ut,dn)|0,Le=Le+Math.imul(Ue,Nn)|0,oe=oe+Math.imul(Ue,Wi)|0,oe=oe+Math.imul(xt,Nn)|0,be=be+Math.imul(xt,Wi)|0,Le=Le+Math.imul(Ft,Da)|0,oe=oe+Math.imul(Ft,Aa)|0,oe=oe+Math.imul(st,Da)|0,be=be+Math.imul(st,Aa)|0,Le=Le+Math.imul($t,Sa)|0,oe=oe+Math.imul($t,no)|0,oe=oe+Math.imul(Wt,Sa)|0,be=be+Math.imul(Wt,no)|0,Le=Le+Math.imul(gt,an)|0,oe=oe+Math.imul(gt,Hr)|0,oe=oe+Math.imul(pt,an)|0,be=be+Math.imul(pt,Hr)|0;var er=(ke+Le|0)+((oe&8191)<<13)|0;ke=(be+(oe>>>13)|0)+(er>>>26)|0,er&=67108863,Le=Math.imul(kn,br),oe=Math.imul(kn,Or),oe=oe+Math.imul(Rn,br)|0,be=Math.imul(Rn,Or),Le=Le+Math.imul(Pr,Jr)|0,oe=oe+Math.imul(Pr,dn)|0,oe=oe+Math.imul($r,Jr)|0,be=be+Math.imul($r,dn)|0,Le=Le+Math.imul(Jt,Nn)|0,oe=oe+Math.imul(Jt,Wi)|0,oe=oe+Math.imul(Ut,Nn)|0,be=be+Math.imul(Ut,Wi)|0,Le=Le+Math.imul(Ue,Da)|0,oe=oe+Math.imul(Ue,Aa)|0,oe=oe+Math.imul(xt,Da)|0,be=be+Math.imul(xt,Aa)|0,Le=Le+Math.imul(Ft,Sa)|0,oe=oe+Math.imul(Ft,no)|0,oe=oe+Math.imul(st,Sa)|0,be=be+Math.imul(st,no)|0,Le=Le+Math.imul($t,an)|0,oe=oe+Math.imul($t,Hr)|0,oe=oe+Math.imul(Wt,an)|0,be=be+Math.imul(Wt,Hr)|0;var si=(ke+Le|0)+((oe&8191)<<13)|0;ke=(be+(oe>>>13)|0)+(si>>>26)|0,si&=67108863,Le=Math.imul(kn,Jr),oe=Math.imul(kn,dn),oe=oe+Math.imul(Rn,Jr)|0,be=Math.imul(Rn,dn),Le=Le+Math.imul(Pr,Nn)|0,oe=oe+Math.imul(Pr,Wi)|0,oe=oe+Math.imul($r,Nn)|0,be=be+Math.imul($r,Wi)|0,Le=Le+Math.imul(Jt,Da)|0,oe=oe+Math.imul(Jt,Aa)|0,oe=oe+Math.imul(Ut,Da)|0,be=be+Math.imul(Ut,Aa)|0,Le=Le+Math.imul(Ue,Sa)|0,oe=oe+Math.imul(Ue,no)|0,oe=oe+Math.imul(xt,Sa)|0,be=be+Math.imul(xt,no)|0,Le=Le+Math.imul(Ft,an)|0,oe=oe+Math.imul(Ft,Hr)|0,oe=oe+Math.imul(st,an)|0,be=be+Math.imul(st,Hr)|0;var ei=(ke+Le|0)+((oe&8191)<<13)|0;ke=(be+(oe>>>13)|0)+(ei>>>26)|0,ei&=67108863,Le=Math.imul(kn,Nn),oe=Math.imul(kn,Wi),oe=oe+Math.imul(Rn,Nn)|0,be=Math.imul(Rn,Wi),Le=Le+Math.imul(Pr,Da)|0,oe=oe+Math.imul(Pr,Aa)|0,oe=oe+Math.imul($r,Da)|0,be=be+Math.imul($r,Aa)|0,Le=Le+Math.imul(Jt,Sa)|0,oe=oe+Math.imul(Jt,no)|0,oe=oe+Math.imul(Ut,Sa)|0,be=be+Math.imul(Ut,no)|0,Le=Le+Math.imul(Ue,an)|0,oe=oe+Math.imul(Ue,Hr)|0,oe=oe+Math.imul(xt,an)|0,be=be+Math.imul(xt,Hr)|0;var Kn=(ke+Le|0)+((oe&8191)<<13)|0;ke=(be+(oe>>>13)|0)+(Kn>>>26)|0,Kn&=67108863,Le=Math.imul(kn,Da),oe=Math.imul(kn,Aa),oe=oe+Math.imul(Rn,Da)|0,be=Math.imul(Rn,Aa),Le=Le+Math.imul(Pr,Sa)|0,oe=oe+Math.imul(Pr,no)|0,oe=oe+Math.imul($r,Sa)|0,be=be+Math.imul($r,no)|0,Le=Le+Math.imul(Jt,an)|0,oe=oe+Math.imul(Jt,Hr)|0,oe=oe+Math.imul(Ut,an)|0,be=be+Math.imul(Ut,Hr)|0;var qn=(ke+Le|0)+((oe&8191)<<13)|0;ke=(be+(oe>>>13)|0)+(qn>>>26)|0,qn&=67108863,Le=Math.imul(kn,Sa),oe=Math.imul(kn,no),oe=oe+Math.imul(Rn,Sa)|0,be=Math.imul(Rn,no),Le=Le+Math.imul(Pr,an)|0,oe=oe+Math.imul(Pr,Hr)|0,oe=oe+Math.imul($r,an)|0,be=be+Math.imul($r,Hr)|0;var pi=(ke+Le|0)+((oe&8191)<<13)|0;ke=(be+(oe>>>13)|0)+(pi>>>26)|0,pi&=67108863,Le=Math.imul(kn,an),oe=Math.imul(kn,Hr),oe=oe+Math.imul(Rn,an)|0,be=Math.imul(Rn,Hr);var _i=(ke+Le|0)+((oe&8191)<<13)|0;return ke=(be+(oe>>>13)|0)+(_i>>>26)|0,_i&=67108863,Oe[0]=nn,Oe[1]=Kr,Oe[2]=$n,Oe[3]=Ai,Oe[4]=aa,Oe[5]=Ci,Oe[6]=Ta,Oe[7]=Na,Oe[8]=ro,Oe[9]=oo,Oe[10]=xo,Oe[11]=vr,Oe[12]=er,Oe[13]=si,Oe[14]=ei,Oe[15]=Kn,Oe[16]=qn,Oe[17]=pi,Oe[18]=_i,ke!==0&&(Oe[19]=ke,re.length++),re};Math.imul||(F=N);function k(J,G,ee){ee.negative=G.negative^J.negative,ee.length=J.length+G.length;for(var re=0,fe=0,we=0;we<ee.length-1;we++){var Oe=fe;fe=0;for(var ke=re&67108863,Le=Math.min(we,G.length-1),oe=Math.max(0,we-J.length+1);oe<=Le;oe++){var be=we-oe,_e=J.words[be]|0,he=G.words[oe]|0,De=_e*he,xe=De&67108863;Oe=Oe+(De/67108864|0)|0,xe=xe+ke|0,ke=xe&67108863,Oe=Oe+(xe>>>26)|0,fe+=Oe>>>26,Oe&=67108863}ee.words[we]=ke,re=Oe,Oe=fe}return re!==0?ee.words[we]=re:ee.length--,ee.strip()}function P(J,G,ee){var re=new T;return re.mulp(J,G,ee)}m.prototype.mulTo=function(G,ee){var re,fe=this.length+G.length;return this.length===10&&G.length===10?re=F(this,G,ee):fe<63?re=N(this,G,ee):fe<1024?re=k(this,G,ee):re=P(this,G,ee),re};function T(J,G){this.x=J,this.y=G}T.prototype.makeRBT=function(G){for(var ee=new Array(G),re=m.prototype._countBits(G)-1,fe=0;fe<G;fe++)ee[fe]=this.revBin(fe,re,G);return ee},T.prototype.revBin=function(G,ee,re){if(G===0||G===re-1)return G;for(var fe=0,we=0;we<ee;we++)fe|=(G&1)<<ee-we-1,G>>=1;return fe},T.prototype.permute=function(G,ee,re,fe,we,Oe){for(var ke=0;ke<Oe;ke++)fe[ke]=ee[G[ke]],we[ke]=re[G[ke]]},T.prototype.transform=function(G,ee,re,fe,we,Oe){this.permute(Oe,G,ee,re,fe,we);for(var ke=1;ke<we;ke<<=1)for(var Le=ke<<1,oe=Math.cos(2*Math.PI/Le),be=Math.sin(2*Math.PI/Le),_e=0;_e<we;_e+=Le)for(var he=oe,De=be,xe=0;xe<ke;xe++){var se=re[_e+xe],Ee=fe[_e+xe],Te=re[_e+xe+ke],Be=fe[_e+xe+ke],tt=he*Te-De*Be;Be=he*Be+De*Te,Te=tt,re[_e+xe]=se+Te,fe[_e+xe]=Ee+Be,re[_e+xe+ke]=se-Te,fe[_e+xe+ke]=Ee-Be,xe!==Le&&(tt=oe*he-be*De,De=oe*De+be*he,he=tt)}},T.prototype.guessLen13b=function(G,ee){var re=Math.max(ee,G)|1,fe=re&1,we=0;for(re=re/2|0;re;re=re>>>1)we++;return 1<<we+1+fe},T.prototype.conjugate=function(G,ee,re){if(!(re<=1))for(var fe=0;fe<re/2;fe++){var we=G[fe];G[fe]=G[re-fe-1],G[re-fe-1]=we,we=ee[fe],ee[fe]=-ee[re-fe-1],ee[re-fe-1]=-we}},T.prototype.normalize13b=function(G,ee){for(var re=0,fe=0;fe<ee/2;fe++){var we=Math.round(G[2*fe+1]/ee)*8192+Math.round(G[2*fe]/ee)+re;G[fe]=we&67108863,we<67108864?re=0:re=we/67108864|0}return G},T.prototype.convert13b=function(G,ee,re,fe){for(var we=0,Oe=0;Oe<ee;Oe++)we=we+(G[Oe]|0),re[2*Oe]=we&8191,we=we>>>13,re[2*Oe+1]=we&8191,we=we>>>13;for(Oe=2*ee;Oe<fe;++Oe)re[Oe]=0;v(we===0),v((we&-8192)===0)},T.prototype.stub=function(G){for(var ee=new Array(G),re=0;re<G;re++)ee[re]=0;return ee},T.prototype.mulp=function(G,ee,re){var fe=2*this.guessLen13b(G.length,ee.length),we=this.makeRBT(fe),Oe=this.stub(fe),ke=new Array(fe),Le=new Array(fe),oe=new Array(fe),be=new Array(fe),_e=new Array(fe),he=new Array(fe),De=re.words;De.length=fe,this.convert13b(G.words,G.length,ke,fe),this.convert13b(ee.words,ee.length,be,fe),this.transform(ke,Oe,Le,oe,fe,we),this.transform(be,Oe,_e,he,fe,we);for(var xe=0;xe<fe;xe++){var se=Le[xe]*_e[xe]-oe[xe]*he[xe];oe[xe]=Le[xe]*he[xe]+oe[xe]*_e[xe],Le[xe]=se}return this.conjugate(Le,oe,fe),this.transform(Le,oe,De,Oe,fe,we),this.conjugate(De,Oe,fe),this.normalize13b(De,fe),re.negative=G.negative^ee.negative,re.length=G.length+ee.length,re.strip()},m.prototype.mul=function(G){var ee=new m(null);return ee.words=new Array(this.length+G.length),this.mulTo(G,ee)},m.prototype.mulf=function(G){var ee=new m(null);return ee.words=new Array(this.length+G.length),P(this,G,ee)},m.prototype.imul=function(G){return this.clone().mulTo(G,this)},m.prototype.imuln=function(G){v(typeof G=="number"),v(G<67108864);for(var ee=0,re=0;re<this.length;re++){var fe=(this.words[re]|0)*G,we=(fe&67108863)+(ee&67108863);ee>>=26,ee+=fe/67108864|0,ee+=we>>>26,this.words[re]=we&67108863}return ee!==0&&(this.words[re]=ee,this.length++),this},m.prototype.muln=function(G){return this.clone().imuln(G)},m.prototype.sqr=function(){return this.mul(this)},m.prototype.isqr=function(){return this.imul(this.clone())},m.prototype.pow=function(G){var ee=I(G);if(ee.length===0)return new m(1);for(var re=this,fe=0;fe<ee.length&&ee[fe]===0;fe++,re=re.sqr());if(++fe<ee.length)for(var we=re.sqr();fe<ee.length;fe++,we=we.sqr())ee[fe]!==0&&(re=re.mul(we));return re},m.prototype.iushln=function(G){v(typeof G=="number"&&G>=0);var ee=G%26,re=(G-ee)/26,fe=67108863>>>26-ee<<26-ee,we;if(ee!==0){var Oe=0;for(we=0;we<this.length;we++){var ke=this.words[we]&fe,Le=(this.words[we]|0)-ke<<ee;this.words[we]=Le|Oe,Oe=ke>>>26-ee}Oe&&(this.words[we]=Oe,this.length++)}if(re!==0){for(we=this.length-1;we>=0;we--)this.words[we+re]=this.words[we];for(we=0;we<re;we++)this.words[we]=0;this.length+=re}return this.strip()},m.prototype.ishln=function(G){return v(this.negative===0),this.iushln(G)},m.prototype.iushrn=function(G,ee,re){v(typeof G=="number"&&G>=0);var fe;ee?fe=(ee-ee%26)/26:fe=0;var we=G%26,Oe=Math.min((G-we)/26,this.length),ke=67108863^67108863>>>we<<we,Le=re;if(fe-=Oe,fe=Math.max(0,fe),Le){for(var oe=0;oe<Oe;oe++)Le.words[oe]=this.words[oe];Le.length=Oe}if(Oe!==0)if(this.length>Oe)for(this.length-=Oe,oe=0;oe<this.length;oe++)this.words[oe]=this.words[oe+Oe];else this.words[0]=0,this.length=1;var be=0;for(oe=this.length-1;oe>=0&&(be!==0||oe>=fe);oe--){var _e=this.words[oe]|0;this.words[oe]=be<<26-we|_e>>>we,be=_e&ke}return Le&&be!==0&&(Le.words[Le.length++]=be),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},m.prototype.ishrn=function(G,ee,re){return v(this.negative===0),this.iushrn(G,ee,re)},m.prototype.shln=function(G){return this.clone().ishln(G)},m.prototype.ushln=function(G){return this.clone().iushln(G)},m.prototype.shrn=function(G){return this.clone().ishrn(G)},m.prototype.ushrn=function(G){return this.clone().iushrn(G)},m.prototype.testn=function(G){v(typeof G=="number"&&G>=0);var ee=G%26,re=(G-ee)/26,fe=1<<ee;if(this.length<=re)return!1;var we=this.words[re];return!!(we&fe)},m.prototype.imaskn=function(G){v(typeof G=="number"&&G>=0);var ee=G%26,re=(G-ee)/26;if(v(this.negative===0,"imaskn works only with positive numbers"),this.length<=re)return this;if(ee!==0&&re++,this.length=Math.min(re,this.length),ee!==0){var fe=67108863^67108863>>>ee<<ee;this.words[this.length-1]&=fe}return this.strip()},m.prototype.maskn=function(G){return this.clone().imaskn(G)},m.prototype.iaddn=function(G){return v(typeof G=="number"),v(G<67108864),G<0?this.isubn(-G):this.negative!==0?this.length===1&&(this.words[0]|0)<G?(this.words[0]=G-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(G),this.negative=1,this):this._iaddn(G)},m.prototype._iaddn=function(G){this.words[0]+=G;for(var ee=0;ee<this.length&&this.words[ee]>=67108864;ee++)this.words[ee]-=67108864,ee===this.length-1?this.words[ee+1]=1:this.words[ee+1]++;return this.length=Math.max(this.length,ee+1),this},m.prototype.isubn=function(G){if(v(typeof G=="number"),v(G<67108864),G<0)return this.iaddn(-G);if(this.negative!==0)return this.negative=0,this.iaddn(G),this.negative=1,this;if(this.words[0]-=G,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var ee=0;ee<this.length&&this.words[ee]<0;ee++)this.words[ee]+=67108864,this.words[ee+1]-=1;return this.strip()},m.prototype.addn=function(G){return this.clone().iaddn(G)},m.prototype.subn=function(G){return this.clone().isubn(G)},m.prototype.iabs=function(){return this.negative=0,this},m.prototype.abs=function(){return this.clone().iabs()},m.prototype._ishlnsubmul=function(G,ee,re){var fe=G.length+re,we;this._expand(fe);var Oe,ke=0;for(we=0;we<G.length;we++){Oe=(this.words[we+re]|0)+ke;var Le=(G.words[we]|0)*ee;Oe-=Le&67108863,ke=(Oe>>26)-(Le/67108864|0),this.words[we+re]=Oe&67108863}for(;we<this.length-re;we++)Oe=(this.words[we+re]|0)+ke,ke=Oe>>26,this.words[we+re]=Oe&67108863;if(ke===0)return this.strip();for(v(ke===-1),ke=0,we=0;we<this.length;we++)Oe=-(this.words[we]|0)+ke,ke=Oe>>26,this.words[we]=Oe&67108863;return this.negative=1,this.strip()},m.prototype._wordDiv=function(G,ee){var re=this.length-G.length,fe=this.clone(),we=G,Oe=we.words[we.length-1]|0,ke=this._countBits(Oe);re=26-ke,re!==0&&(we=we.ushln(re),fe.iushln(re),Oe=we.words[we.length-1]|0);var Le=fe.length-we.length,oe;if(ee!=="mod"){oe=new m(null),oe.length=Le+1,oe.words=new Array(oe.length);for(var be=0;be<oe.length;be++)oe.words[be]=0}var _e=fe.clone()._ishlnsubmul(we,1,Le);_e.negative===0&&(fe=_e,oe&&(oe.words[Le]=1));for(var he=Le-1;he>=0;he--){var De=(fe.words[we.length+he]|0)*67108864+(fe.words[we.length+he-1]|0);for(De=Math.min(De/Oe|0,67108863),fe._ishlnsubmul(we,De,he);fe.negative!==0;)De--,fe.negative=0,fe._ishlnsubmul(we,1,he),fe.isZero()||(fe.negative^=1);oe&&(oe.words[he]=De)}return oe&&oe.strip(),fe.strip(),ee!=="div"&&re!==0&&fe.iushrn(re),{div:oe||null,mod:fe}},m.prototype.divmod=function(G,ee,re){if(v(!G.isZero()),this.isZero())return{div:new m(0),mod:new m(0)};var fe,we,Oe;return this.negative!==0&&G.negative===0?(Oe=this.neg().divmod(G,ee),ee!=="mod"&&(fe=Oe.div.neg()),ee!=="div"&&(we=Oe.mod.neg(),re&&we.negative!==0&&we.iadd(G)),{div:fe,mod:we}):this.negative===0&&G.negative!==0?(Oe=this.divmod(G.neg(),ee),ee!=="mod"&&(fe=Oe.div.neg()),{div:fe,mod:Oe.mod}):(this.negative&G.negative)!==0?(Oe=this.neg().divmod(G.neg(),ee),ee!=="div"&&(we=Oe.mod.neg(),re&&we.negative!==0&&we.isub(G)),{div:Oe.div,mod:we}):G.length>this.length||this.cmp(G)<0?{div:new m(0),mod:this}:G.length===1?ee==="div"?{div:this.divn(G.words[0]),mod:null}:ee==="mod"?{div:null,mod:new m(this.modn(G.words[0]))}:{div:this.divn(G.words[0]),mod:new m(this.modn(G.words[0]))}:this._wordDiv(G,ee)},m.prototype.div=function(G){return this.divmod(G,"div",!1).div},m.prototype.mod=function(G){return this.divmod(G,"mod",!1).mod},m.prototype.umod=function(G){return this.divmod(G,"mod",!0).mod},m.prototype.divRound=function(G){var ee=this.divmod(G);if(ee.mod.isZero())return ee.div;var re=ee.div.negative!==0?ee.mod.isub(G):ee.mod,fe=G.ushrn(1),we=G.andln(1),Oe=re.cmp(fe);return Oe<0||we===1&&Oe===0?ee.div:ee.div.negative!==0?ee.div.isubn(1):ee.div.iaddn(1)},m.prototype.modn=function(G){v(G<=67108863);for(var ee=(1<<26)%G,re=0,fe=this.length-1;fe>=0;fe--)re=(ee*re+(this.words[fe]|0))%G;return re},m.prototype.idivn=function(G){v(G<=67108863);for(var ee=0,re=this.length-1;re>=0;re--){var fe=(this.words[re]|0)+ee*67108864;this.words[re]=fe/G|0,ee=fe%G}return this.strip()},m.prototype.divn=function(G){return this.clone().idivn(G)},m.prototype.egcd=function(G){v(G.negative===0),v(!G.isZero());var ee=this,re=G.clone();ee.negative!==0?ee=ee.umod(G):ee=ee.clone();for(var fe=new m(1),we=new m(0),Oe=new m(0),ke=new m(1),Le=0;ee.isEven()&&re.isEven();)ee.iushrn(1),re.iushrn(1),++Le;for(var oe=re.clone(),be=ee.clone();!ee.isZero();){for(var _e=0,he=1;(ee.words[0]&he)===0&&_e<26;++_e,he<<=1);if(_e>0)for(ee.iushrn(_e);_e-- >0;)(fe.isOdd()||we.isOdd())&&(fe.iadd(oe),we.isub(be)),fe.iushrn(1),we.iushrn(1);for(var De=0,xe=1;(re.words[0]&xe)===0&&De<26;++De,xe<<=1);if(De>0)for(re.iushrn(De);De-- >0;)(Oe.isOdd()||ke.isOdd())&&(Oe.iadd(oe),ke.isub(be)),Oe.iushrn(1),ke.iushrn(1);ee.cmp(re)>=0?(ee.isub(re),fe.isub(Oe),we.isub(ke)):(re.isub(ee),Oe.isub(fe),ke.isub(we))}return{a:Oe,b:ke,gcd:re.iushln(Le)}},m.prototype._invmp=function(G){v(G.negative===0),v(!G.isZero());var ee=this,re=G.clone();ee.negative!==0?ee=ee.umod(G):ee=ee.clone();for(var fe=new m(1),we=new m(0),Oe=re.clone();ee.cmpn(1)>0&&re.cmpn(1)>0;){for(var ke=0,Le=1;(ee.words[0]&Le)===0&&ke<26;++ke,Le<<=1);if(ke>0)for(ee.iushrn(ke);ke-- >0;)fe.isOdd()&&fe.iadd(Oe),fe.iushrn(1);for(var oe=0,be=1;(re.words[0]&be)===0&&oe<26;++oe,be<<=1);if(oe>0)for(re.iushrn(oe);oe-- >0;)we.isOdd()&&we.iadd(Oe),we.iushrn(1);ee.cmp(re)>=0?(ee.isub(re),fe.isub(we)):(re.isub(ee),we.isub(fe))}var _e;return ee.cmpn(1)===0?_e=fe:_e=we,_e.cmpn(0)<0&&_e.iadd(G),_e},m.prototype.gcd=function(G){if(this.isZero())return G.abs();if(G.isZero())return this.abs();var ee=this.clone(),re=G.clone();ee.negative=0,re.negative=0;for(var fe=0;ee.isEven()&&re.isEven();fe++)ee.iushrn(1),re.iushrn(1);do{for(;ee.isEven();)ee.iushrn(1);for(;re.isEven();)re.iushrn(1);var we=ee.cmp(re);if(we<0){var Oe=ee;ee=re,re=Oe}else if(we===0||re.cmpn(1)===0)break;ee.isub(re)}while(!0);return re.iushln(fe)},m.prototype.invm=function(G){return this.egcd(G).a.umod(G)},m.prototype.isEven=function(){return(this.words[0]&1)===0},m.prototype.isOdd=function(){return(this.words[0]&1)===1},m.prototype.andln=function(G){return this.words[0]&G},m.prototype.bincn=function(G){v(typeof G=="number");var ee=G%26,re=(G-ee)/26,fe=1<<ee;if(this.length<=re)return this._expand(re+1),this.words[re]|=fe,this;for(var we=fe,Oe=re;we!==0&&Oe<this.length;Oe++){var ke=this.words[Oe]|0;ke+=we,we=ke>>>26,ke&=67108863,this.words[Oe]=ke}return we!==0&&(this.words[Oe]=we,this.length++),this},m.prototype.isZero=function(){return this.length===1&&this.words[0]===0},m.prototype.cmpn=function(G){var ee=G<0;if(this.negative!==0&&!ee)return-1;if(this.negative===0&&ee)return 1;this.strip();var re;if(this.length>1)re=1;else{ee&&(G=-G),v(G<=67108863,"Number is too big");var fe=this.words[0]|0;re=fe===G?0:fe<G?-1:1}return this.negative!==0?-re|0:re},m.prototype.cmp=function(G){if(this.negative!==0&&G.negative===0)return-1;if(this.negative===0&&G.negative!==0)return 1;var ee=this.ucmp(G);return this.negative!==0?-ee|0:ee},m.prototype.ucmp=function(G){if(this.length>G.length)return 1;if(this.length<G.length)return-1;for(var ee=0,re=this.length-1;re>=0;re--){var fe=this.words[re]|0,we=G.words[re]|0;if(fe!==we){fe<we?ee=-1:fe>we&&(ee=1);break}}return ee},m.prototype.gtn=function(G){return this.cmpn(G)===1},m.prototype.gt=function(G){return this.cmp(G)===1},m.prototype.gten=function(G){return this.cmpn(G)>=0},m.prototype.gte=function(G){return this.cmp(G)>=0},m.prototype.ltn=function(G){return this.cmpn(G)===-1},m.prototype.lt=function(G){return this.cmp(G)===-1},m.prototype.lten=function(G){return this.cmpn(G)<=0},m.prototype.lte=function(G){return this.cmp(G)<=0},m.prototype.eqn=function(G){return this.cmpn(G)===0},m.prototype.eq=function(G){return this.cmp(G)===0},m.red=function(G){return new K(G)},m.prototype.toRed=function(G){return v(!this.red,"Already a number in reduction context"),v(this.negative===0,"red works only with positives"),G.convertTo(this)._forceRed(G)},m.prototype.fromRed=function(){return v(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},m.prototype._forceRed=function(G){return this.red=G,this},m.prototype.forceRed=function(G){return v(!this.red,"Already a number in reduction context"),this._forceRed(G)},m.prototype.redAdd=function(G){return v(this.red,"redAdd works only with red numbers"),this.red.add(this,G)},m.prototype.redIAdd=function(G){return v(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,G)},m.prototype.redSub=function(G){return v(this.red,"redSub works only with red numbers"),this.red.sub(this,G)},m.prototype.redISub=function(G){return v(this.red,"redISub works only with red numbers"),this.red.isub(this,G)},m.prototype.redShl=function(G){return v(this.red,"redShl works only with red numbers"),this.red.shl(this,G)},m.prototype.redMul=function(G){return v(this.red,"redMul works only with red numbers"),this.red._verify2(this,G),this.red.mul(this,G)},m.prototype.redIMul=function(G){return v(this.red,"redMul works only with red numbers"),this.red._verify2(this,G),this.red.imul(this,G)},m.prototype.redSqr=function(){return v(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},m.prototype.redISqr=function(){return v(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},m.prototype.redSqrt=function(){return v(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},m.prototype.redInvm=function(){return v(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},m.prototype.redNeg=function(){return v(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},m.prototype.redPow=function(G){return v(this.red&&!G.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,G)};var y={k256:null,p224:null,p192:null,p25519:null};function S(J,G){this.name=J,this.p=new m(G,16),this.n=this.p.bitLength(),this.k=new m(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}S.prototype._tmp=function(){var G=new m(null);return G.words=new Array(Math.ceil(this.n/13)),G},S.prototype.ireduce=function(G){var ee=G,re;do this.split(ee,this.tmp),ee=this.imulK(ee),ee=ee.iadd(this.tmp),re=ee.bitLength();while(re>this.n);var fe=re<this.n?-1:ee.ucmp(this.p);return fe===0?(ee.words[0]=0,ee.length=1):fe>0?ee.isub(this.p):ee.strip!==void 0?ee.strip():ee._strip(),ee},S.prototype.split=function(G,ee){G.iushrn(this.n,0,ee)},S.prototype.imulK=function(G){return G.imul(this.k)};function M(){S.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}h(M,S),M.prototype.split=function(G,ee){for(var re=4194303,fe=Math.min(G.length,9),we=0;we<fe;we++)ee.words[we]=G.words[we];if(ee.length=fe,G.length<=9){G.words[0]=0,G.length=1;return}var Oe=G.words[9];for(ee.words[ee.length++]=Oe&re,we=10;we<G.length;we++){var ke=G.words[we]|0;G.words[we-10]=(ke&re)<<4|Oe>>>22,Oe=ke}Oe>>>=22,G.words[we-10]=Oe,Oe===0&&G.length>10?G.length-=10:G.length-=9},M.prototype.imulK=function(G){G.words[G.length]=0,G.words[G.length+1]=0,G.length+=2;for(var ee=0,re=0;re<G.length;re++){var fe=G.words[re]|0;ee+=fe*977,G.words[re]=ee&67108863,ee=fe*64+(ee/67108864|0)}return G.words[G.length-1]===0&&(G.length--,G.words[G.length-1]===0&&G.length--),G};function W(){S.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}h(W,S);function $(){S.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}h($,S);function Z(){S.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}h(Z,S),Z.prototype.imulK=function(G){for(var ee=0,re=0;re<G.length;re++){var fe=(G.words[re]|0)*19+ee,we=fe&67108863;fe>>>=26,G.words[re]=we,ee=fe}return ee!==0&&(G.words[G.length++]=ee),G},m._prime=function(G){if(y[G])return y[G];var ee;if(G==="k256")ee=new M;else if(G==="p224")ee=new W;else if(G==="p192")ee=new $;else if(G==="p25519")ee=new Z;else throw new Error("Unknown prime "+G);return y[G]=ee,ee};function K(J){if(typeof J=="string"){var G=m._prime(J);this.m=G.p,this.prime=G}else v(J.gtn(1),"modulus must be greater than 1"),this.m=J,this.prime=null}K.prototype._verify1=function(G){v(G.negative===0,"red works only with positives"),v(G.red,"red works only with red numbers")},K.prototype._verify2=function(G,ee){v((G.negative|ee.negative)===0,"red works only with positives"),v(G.red&&G.red===ee.red,"red works only with red numbers")},K.prototype.imod=function(G){return this.prime?this.prime.ireduce(G)._forceRed(this):G.umod(this.m)._forceRed(this)},K.prototype.neg=function(G){return G.isZero()?G.clone():this.m.sub(G)._forceRed(this)},K.prototype.add=function(G,ee){this._verify2(G,ee);var re=G.add(ee);return re.cmp(this.m)>=0&&re.isub(this.m),re._forceRed(this)},K.prototype.iadd=function(G,ee){this._verify2(G,ee);var re=G.iadd(ee);return re.cmp(this.m)>=0&&re.isub(this.m),re},K.prototype.sub=function(G,ee){this._verify2(G,ee);var re=G.sub(ee);return re.cmpn(0)<0&&re.iadd(this.m),re._forceRed(this)},K.prototype.isub=function(G,ee){this._verify2(G,ee);var re=G.isub(ee);return re.cmpn(0)<0&&re.iadd(this.m),re},K.prototype.shl=function(G,ee){return this._verify1(G),this.imod(G.ushln(ee))},K.prototype.imul=function(G,ee){return this._verify2(G,ee),this.imod(G.imul(ee))},K.prototype.mul=function(G,ee){return this._verify2(G,ee),this.imod(G.mul(ee))},K.prototype.isqr=function(G){return this.imul(G,G.clone())},K.prototype.sqr=function(G){return this.mul(G,G)},K.prototype.sqrt=function(G){if(G.isZero())return G.clone();var ee=this.m.andln(3);if(v(ee%2===1),ee===3){var re=this.m.add(new m(1)).iushrn(2);return this.pow(G,re)}for(var fe=this.m.subn(1),we=0;!fe.isZero()&&fe.andln(1)===0;)we++,fe.iushrn(1);v(!fe.isZero());var Oe=new m(1).toRed(this),ke=Oe.redNeg(),Le=this.m.subn(1).iushrn(1),oe=this.m.bitLength();for(oe=new m(2*oe*oe).toRed(this);this.pow(oe,Le).cmp(ke)!==0;)oe.redIAdd(ke);for(var be=this.pow(oe,fe),_e=this.pow(G,fe.addn(1).iushrn(1)),he=this.pow(G,fe),De=we;he.cmp(Oe)!==0;){for(var xe=he,se=0;xe.cmp(Oe)!==0;se++)xe=xe.redSqr();v(se<De);var Ee=this.pow(be,new m(1).iushln(De-se-1));_e=_e.redMul(Ee),be=Ee.redSqr(),he=he.redMul(be),De=se}return _e},K.prototype.invm=function(G){var ee=G._invmp(this.m);return ee.negative!==0?(ee.negative=0,this.imod(ee).redNeg()):this.imod(ee)},K.prototype.pow=function(G,ee){if(ee.isZero())return new m(1).toRed(this);if(ee.cmpn(1)===0)return G.clone();var re=4,fe=new Array(1<<re);fe[0]=new m(1).toRed(this),fe[1]=G;for(var we=2;we<fe.length;we++)fe[we]=this.mul(fe[we-1],G);var Oe=fe[0],ke=0,Le=0,oe=ee.bitLength()%26;for(oe===0&&(oe=26),we=ee.length-1;we>=0;we--){for(var be=ee.words[we],_e=oe-1;_e>=0;_e--){var he=be>>_e&1;if(Oe!==fe[0]&&(Oe=this.sqr(Oe)),he===0&&ke===0){Le=0;continue}ke<<=1,ke|=he,Le++,!(Le!==re&&(we!==0||_e!==0))&&(Oe=this.mul(Oe,fe[ke]),Le=0,ke=0)}oe=26}return Oe},K.prototype.convertTo=function(G){var ee=G.umod(this.m);return ee===G?ee.clone():ee},K.prototype.convertFrom=function(G){var ee=G.clone();return ee.red=null,ee},m.mont=function(G){return new Q(G)};function Q(J){K.call(this,J),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new m(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}h(Q,K),Q.prototype.convertTo=function(G){return this.imod(G.ushln(this.shift))},Q.prototype.convertFrom=function(G){var ee=this.imod(G.mul(this.rinv));return ee.red=null,ee},Q.prototype.imul=function(G,ee){if(G.isZero()||ee.isZero())return G.words[0]=0,G.length=1,G;var re=G.imul(ee),fe=re.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),we=re.isub(fe).iushrn(this.shift),Oe=we;return we.cmp(this.m)>=0?Oe=we.isub(this.m):we.cmpn(0)<0&&(Oe=we.iadd(this.m)),Oe._forceRed(this)},Q.prototype.mul=function(G,ee){if(G.isZero()||ee.isZero())return new m(0)._forceRed(this);var re=G.mul(ee),fe=re.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),we=re.isub(fe).iushrn(this.shift),Oe=we;return we.cmp(this.m)>=0?Oe=we.isub(this.m):we.cmpn(0)<0&&(Oe=we.iadd(this.m)),Oe._forceRed(this)},Q.prototype.invm=function(G){var ee=this.imod(G._invmp(this.m).mul(this.r2));return ee._forceRed(this)}})(l,this)}),6204:(function(l){l.exports=u;function u(c){var p,f,v,h=c.length,m=0;for(p=0;p<h;++p)m+=c[p].length;var _=new Array(m),x=0;for(p=0;p<h;++p){var A=c[p],E=A.length;for(f=0;f<E;++f){var D=_[x++]=new Array(E-1),g=0;for(v=0;v<E;++v)v!==f&&(D[g++]=A[v]);if(f&1){var C=D[1];D[1]=D[0],D[0]=C}}}return _}}),6867:(function(l,u,c){l.exports=g;var p=c(1888),f=c(855),v=c(7150);function h(C,I){for(var N=0;N<C;++N)if(!(I[N]<=I[N+C]))return!0;return!1}function m(C,I,N,F){for(var k=0,P=0,T=0,y=C.length;T<y;++T){var S=C[T];if(!h(I,S)){for(var M=0;M<2*I;++M)N[k++]=S[M];F[P++]=T}}return P}function _(C,I,N,F){var k=C.length,P=I.length;if(!(k<=0||P<=0)){var T=C[0].length>>>1;if(!(T<=0)){var y,S=p.mallocDouble(2*T*k),M=p.mallocInt32(k);if(k=m(C,T,S,M),k>0){if(T===1&&F)f.init(k),y=f.sweepComplete(T,N,0,k,S,M,0,k,S,M);else{var W=p.mallocDouble(2*T*P),$=p.mallocInt32(P);P=m(I,T,W,$),P>0&&(f.init(k+P),T===1?y=f.sweepBipartite(T,N,0,k,S,M,0,P,W,$):y=v(T,N,F,k,S,M,P,W,$),p.free(W),p.free($))}p.free(S),p.free(M)}return y}}}var x;function A(C,I){x.push([C,I])}function E(C){return x=[],_(C,C,A,!0),x}function D(C,I){return x=[],_(C,I,A,!1),x}function g(C,I,N){switch(arguments.length){case 1:return E(C);case 2:return typeof I=="function"?_(C,C,I,!0):D(C,I);case 3:return _(C,I,N,!1);default:throw new Error("box-intersect: Invalid arguments")}}}),2455:(function(l,u){function c(){function v(_,x,A,E,D,g,C,I,N,F,k){for(var P=2*_,T=E,y=P*E;T<D;++T,y+=P){var S=g[x+y],M=g[x+y+_],W=C[T];e:for(var $=I,Z=P*I;$<N;++$,Z+=P){var K=F[x+Z],Q=F[x+Z+_],J=k[$];if(!(Q<S||M<K)){for(var G=x+1;G<_;++G){var ee=g[G+y],re=g[G+_+y],fe=F[G+Z],we=F[G+_+Z];if(re<fe||we<ee)continue e}var Oe=A(W,J);if(Oe!==void 0)return Oe}}}}function h(_,x,A,E,D,g,C,I,N,F,k){for(var P=2*_,T=I,y=P*I;T<N;++T,y+=P){var S=F[x+y],M=F[x+y+_],W=k[T];e:for(var $=E,Z=P*E;$<D;++$,Z+=P){var K=g[x+Z],Q=g[x+Z+_],J=C[$];if(!(M<K||Q<S)){for(var G=x+1;G<_;++G){var ee=g[G+Z],re=g[G+_+Z],fe=F[G+y],we=F[G+_+y];if(re<fe||we<ee)continue e}var Oe=A(J,W);if(Oe!==void 0)return Oe}}}}function m(_,x,A,E,D,g,C,I,N,F,k){return D-E>N-I?v(_,x,A,E,D,g,C,I,N,F,k):h(_,x,A,E,D,g,C,I,N,F,k)}return m}function p(){function v(A,E,D,g,C,I,N,F,k,P,T){for(var y=2*A,S=g,M=y*g;S<C;++S,M+=y){var W=I[E+M],$=I[E+M+A],Z=N[S];e:for(var K=F,Q=y*F;K<k;++K,Q+=y){var J=P[E+Q],G=T[K];if(!(J<=W||$<J)){for(var ee=E+1;ee<A;++ee){var re=I[ee+M],fe=I[ee+A+M],we=P[ee+Q],Oe=P[ee+A+Q];if(fe<we||Oe<re)continue e}var ke=D(G,Z);if(ke!==void 0)return ke}}}}function h(A,E,D,g,C,I,N,F,k,P,T){for(var y=2*A,S=g,M=y*g;S<C;++S,M+=y){var W=I[E+M],$=I[E+M+A],Z=N[S];e:for(var K=F,Q=y*F;K<k;++K,Q+=y){var J=P[E+Q],G=T[K];if(!(J<W||$<J)){for(var ee=E+1;ee<A;++ee){var re=I[ee+M],fe=I[ee+A+M],we=P[ee+Q],Oe=P[ee+A+Q];if(fe<we||Oe<re)continue e}var ke=D(Z,G);if(ke!==void 0)return ke}}}}function m(A,E,D,g,C,I,N,F,k,P,T){for(var y=2*A,S=F,M=y*F;S<k;++S,M+=y){var W=P[E+M],$=T[S];e:for(var Z=g,K=y*g;Z<C;++Z,K+=y){var Q=I[E+K],J=I[E+K+A],G=N[Z];if(!(W<=Q||J<W)){for(var ee=E+1;ee<A;++ee){var re=I[ee+K],fe=I[ee+A+K],we=P[ee+M],Oe=P[ee+A+M];if(fe<we||Oe<re)continue e}var ke=D($,G);if(ke!==void 0)return ke}}}}function _(A,E,D,g,C,I,N,F,k,P,T){for(var y=2*A,S=F,M=y*F;S<k;++S,M+=y){var W=P[E+M],$=T[S];e:for(var Z=g,K=y*g;Z<C;++Z,K+=y){var Q=I[E+K],J=I[E+K+A],G=N[Z];if(!(W<Q||J<W)){for(var ee=E+1;ee<A;++ee){var re=I[ee+K],fe=I[ee+A+K],we=P[ee+M],Oe=P[ee+A+M];if(fe<we||Oe<re)continue e}var ke=D(G,$);if(ke!==void 0)return ke}}}}function x(A,E,D,g,C,I,N,F,k,P,T,y){return I-C>P-k?g?v(A,E,D,C,I,N,F,k,P,T,y):h(A,E,D,C,I,N,F,k,P,T,y):g?m(A,E,D,C,I,N,F,k,P,T,y):_(A,E,D,C,I,N,F,k,P,T,y)}return x}function f(v){return v?c():p()}u.partial=f(!1),u.full=f(!0)}),7150:(function(l,u,c){l.exports=J;var p=c(1888),f=c(8828),v=c(2455),h=v.partial,m=v.full,_=c(855),x=c(3545),A=c(8105),E=128,D=1<<22,g=1<<22,C=A("!(lo>=p0)&&!(p1>=hi)"),I=A("lo===p0"),N=A("lo<p0"),F=A("hi<=p0"),k=A("lo<=p0&&p0<=hi"),P=A("lo<p0&&p0<=hi"),T=6,y=2,S=1024,M=p.mallocInt32(S),W=p.mallocDouble(S);function $(G,ee){var re=8*f.log2(ee+1)*(G+1)|0,fe=f.nextPow2(T*re);M.length<fe&&(p.free(M),M=p.mallocInt32(fe));var we=f.nextPow2(y*re);W.length<we&&(p.free(W),W=p.mallocDouble(we))}function Z(G,ee,re,fe,we,Oe,ke,Le,oe){var be=T*G;M[be]=ee,M[be+1]=re,M[be+2]=fe,M[be+3]=we,M[be+4]=Oe,M[be+5]=ke;var _e=y*G;W[_e]=Le,W[_e+1]=oe}function K(G,ee,re,fe,we,Oe,ke,Le,oe,be,_e){var he=2*G,De=oe*he,xe=be[De+ee];e:for(var se=we,Ee=we*he;se<Oe;++se,Ee+=he){var Te=ke[Ee+ee],Be=ke[Ee+ee+G];if(!(xe<Te||Be<xe)&&!(fe&&xe===Te)){for(var tt=Le[se],at=ee+1;at<G;++at){var Te=ke[Ee+at],Be=ke[Ee+at+G],gt=be[De+at],pt=be[De+at+G];if(Be<gt||pt<Te)continue e}var Rt;if(fe?Rt=re(_e,tt):Rt=re(tt,_e),Rt!==void 0)return Rt}}}function Q(G,ee,re,fe,we,Oe,ke,Le,oe,be){var _e=2*G,he=Le*_e,De=oe[he+ee];e:for(var xe=fe,se=fe*_e;xe<we;++xe,se+=_e){var Ee=ke[xe];if(Ee!==be){var Te=Oe[se+ee],Be=Oe[se+ee+G];if(!(De<Te||Be<De)){for(var tt=ee+1;tt<G;++tt){var Te=Oe[se+tt],Be=Oe[se+tt+G],at=oe[he+tt],gt=oe[he+tt+G];if(Be<at||gt<Te)continue e}var pt=re(Ee,be);if(pt!==void 0)return pt}}}}function J(G,ee,re,fe,we,Oe,ke,Le,oe){$(G,fe+ke);var be=0,_e=2*G,he;for(Z(be++,0,0,fe,0,ke,re?16:0,-1/0,1/0),re||Z(be++,0,0,ke,0,fe,1,-1/0,1/0);be>0;){be-=1;var De=be*T,xe=M[De],se=M[De+1],Ee=M[De+2],Te=M[De+3],Be=M[De+4],tt=M[De+5],at=be*y,gt=W[at],pt=W[at+1],Rt=tt&1,$t=!!(tt&16),Wt=we,Ht=Oe,Ft=Le,st=oe;if(Rt&&(Wt=Le,Ht=oe,Ft=we,st=Oe),!(tt&2&&(Ee=N(G,xe,se,Ee,Wt,Ht,pt),se>=Ee))&&!(tt&4&&(se=F(G,xe,se,Ee,Wt,Ht,gt),se>=Ee))){var rt=Ee-se,Ue=Be-Te;if($t){if(G*rt*(rt+Ue)<g){if(he=_.scanComplete(G,xe,ee,se,Ee,Wt,Ht,Te,Be,Ft,st),he!==void 0)return he;continue}}else if(G*Math.min(rt,Ue)<E){if(he=h(G,xe,ee,Rt,se,Ee,Wt,Ht,Te,Be,Ft,st),he!==void 0)return he;continue}else if(G*rt*Ue<D){if(he=_.scanBipartite(G,xe,ee,Rt,se,Ee,Wt,Ht,Te,Be,Ft,st),he!==void 0)return he;continue}var xt=C(G,xe,se,Ee,Wt,Ht,gt,pt);if(se<xt)if(G*(xt-se)<E){if(he=m(G,xe+1,ee,se,xt,Wt,Ht,Te,Be,Ft,st),he!==void 0)return he}else if(xe===G-2){if(Rt?he=_.sweepBipartite(G,ee,Te,Be,Ft,st,se,xt,Wt,Ht):he=_.sweepBipartite(G,ee,se,xt,Wt,Ht,Te,Be,Ft,st),he!==void 0)return he}else Z(be++,xe+1,se,xt,Te,Be,Rt,-1/0,1/0),Z(be++,xe+1,Te,Be,se,xt,Rt^1,-1/0,1/0);if(xt<Ee){var Gt=x(G,xe,Te,Be,Ft,st),Jt=Ft[_e*Gt+xe],Ut=I(G,xe,Gt,Be,Ft,st,Jt);if(Ut<Be&&Z(be++,xe,xt,Ee,Ut,Be,(Rt|4)+($t?16:0),Jt,pt),Te<Gt&&Z(be++,xe,xt,Ee,Te,Gt,(Rt|2)+($t?16:0),gt,Jt),Gt+1===Ut){if($t?he=Q(G,xe,ee,xt,Ee,Wt,Ht,Gt,Ft,st[Gt]):he=K(G,xe,ee,Rt,xt,Ee,Wt,Ht,Gt,Ft,st[Gt]),he!==void 0)return he}else if(Gt<Ut){var kr;if($t){if(kr=k(G,xe,xt,Ee,Wt,Ht,Jt),xt<kr){var Pr=I(G,xe,xt,kr,Wt,Ht,Jt);if(xe===G-2){if(xt<Pr&&(he=_.sweepComplete(G,ee,xt,Pr,Wt,Ht,Gt,Ut,Ft,st),he!==void 0)||Pr<kr&&(he=_.sweepBipartite(G,ee,Pr,kr,Wt,Ht,Gt,Ut,Ft,st),he!==void 0))return he}else xt<Pr&&Z(be++,xe+1,xt,Pr,Gt,Ut,16,-1/0,1/0),Pr<kr&&(Z(be++,xe+1,Pr,kr,Gt,Ut,0,-1/0,1/0),Z(be++,xe+1,Gt,Ut,Pr,kr,1,-1/0,1/0))}}else Rt?kr=P(G,xe,xt,Ee,Wt,Ht,Jt):kr=k(G,xe,xt,Ee,Wt,Ht,Jt),xt<kr&&(xe===G-2?Rt?he=_.sweepBipartite(G,ee,Gt,Ut,Ft,st,xt,kr,Wt,Ht):he=_.sweepBipartite(G,ee,xt,kr,Wt,Ht,Gt,Ut,Ft,st):(Z(be++,xe+1,xt,kr,Gt,Ut,Rt,-1/0,1/0),Z(be++,xe+1,Gt,Ut,xt,kr,Rt^1,-1/0,1/0)))}}}}}}),3545:(function(l,u,c){l.exports=m;var p=c(8105),f=p("lo<p0"),v=8;function h(_,x,A,E,D,g){for(var C=2*_,I=C*(A+1)+x,N=A+1;N<E;++N,I+=C)for(var F=D[I],k=N,P=C*(N-1);k>A&&D[P+x]>F;--k,P-=C){for(var T=P,y=P+C,S=0;S<C;++S,++T,++y){var M=D[T];D[T]=D[y],D[y]=M}var W=g[k];g[k]=g[k-1],g[k-1]=W}}function m(_,x,A,E,D,g){if(E<=A+1)return A;for(var C=A,I=E,N=E+A>>>1,F=2*_,k=N,P=D[F*N+x];C<I;){if(I-C<v){h(_,x,C,I,D,g),P=D[F*N+x];break}var T=I-C,y=Math.random()*T+C|0,S=D[F*y+x],M=Math.random()*T+C|0,W=D[F*M+x],$=Math.random()*T+C|0,Z=D[F*$+x];S<=W?Z>=W?(k=M,P=W):S>=Z?(k=y,P=S):(k=$,P=Z):W>=Z?(k=M,P=W):Z>=S?(k=y,P=S):(k=$,P=Z);for(var J=F*(I-1),G=F*k,K=0;K<F;++K,++J,++G){var Q=D[J];D[J]=D[G],D[G]=Q}var ee=g[I-1];g[I-1]=g[k],g[k]=ee,k=f(_,x,C,I-1,D,g,P);for(var J=F*(I-1),G=F*k,K=0;K<F;++K,++J,++G){var Q=D[J];D[J]=D[G],D[G]=Q}var ee=g[I-1];if(g[I-1]=g[k],g[k]=ee,N<k){for(I=k-1;C<I&&D[F*(I-1)+x]===P;)I-=1;I+=1}else if(k<N)for(C=k+1;C<I&&D[F*C+x]===P;)C+=1;else break}return f(_,x,A,N,D,g,D[F*N+x])}}),8105:(function(l){l.exports=c;var u={"lo===p0":p,"lo<p0":f,"lo<=p0":v,"hi<=p0":h,"lo<p0&&p0<=hi":_,"lo<=p0&&p0<=hi":m,"!(lo>=p0)&&!(p1>=hi)":x};function c(A){return u[A]}function p(A,E,D,g,C,I,N){for(var F=2*A,k=F*D,P=k,T=D,y=E,S=A+E,M=D;g>M;++M,k+=F){var W=C[k+y];if(W===N)if(T===M)T+=1,P+=F;else{for(var $=0;F>$;++$){var Z=C[k+$];C[k+$]=C[P],C[P++]=Z}var K=I[M];I[M]=I[T],I[T++]=K}}return T}function f(A,E,D,g,C,I,N){for(var F=2*A,k=F*D,P=k,T=D,y=E,S=A+E,M=D;g>M;++M,k+=F){var W=C[k+y];if(W<N)if(T===M)T+=1,P+=F;else{for(var $=0;F>$;++$){var Z=C[k+$];C[k+$]=C[P],C[P++]=Z}var K=I[M];I[M]=I[T],I[T++]=K}}return T}function v(A,E,D,g,C,I,N){for(var F=2*A,k=F*D,P=k,T=D,y=E,S=A+E,M=D;g>M;++M,k+=F){var W=C[k+S];if(W<=N)if(T===M)T+=1,P+=F;else{for(var $=0;F>$;++$){var Z=C[k+$];C[k+$]=C[P],C[P++]=Z}var K=I[M];I[M]=I[T],I[T++]=K}}return T}function h(A,E,D,g,C,I,N){for(var F=2*A,k=F*D,P=k,T=D,y=E,S=A+E,M=D;g>M;++M,k+=F){var W=C[k+S];if(W<=N)if(T===M)T+=1,P+=F;else{for(var $=0;F>$;++$){var Z=C[k+$];C[k+$]=C[P],C[P++]=Z}var K=I[M];I[M]=I[T],I[T++]=K}}return T}function m(A,E,D,g,C,I,N){for(var F=2*A,k=F*D,P=k,T=D,y=E,S=A+E,M=D;g>M;++M,k+=F){var W=C[k+y],$=C[k+S];if(W<=N&&N<=$)if(T===M)T+=1,P+=F;else{for(var Z=0;F>Z;++Z){var K=C[k+Z];C[k+Z]=C[P],C[P++]=K}var Q=I[M];I[M]=I[T],I[T++]=Q}}return T}function _(A,E,D,g,C,I,N){for(var F=2*A,k=F*D,P=k,T=D,y=E,S=A+E,M=D;g>M;++M,k+=F){var W=C[k+y],$=C[k+S];if(W<N&&N<=$)if(T===M)T+=1,P+=F;else{for(var Z=0;F>Z;++Z){var K=C[k+Z];C[k+Z]=C[P],C[P++]=K}var Q=I[M];I[M]=I[T],I[T++]=Q}}return T}function x(A,E,D,g,C,I,N,F){for(var k=2*A,P=k*D,T=P,y=D,S=E,M=A+E,W=D;g>W;++W,P+=k){var $=C[P+S],Z=C[P+M];if(!($>=N)&&!(F>=Z))if(y===W)y+=1,T+=k;else{for(var K=0;k>K;++K){var Q=C[P+K];C[P+K]=C[T],C[T++]=Q}var J=I[W];I[W]=I[y],I[y++]=J}}return y}}),4192:(function(l){l.exports=c;var u=32;function c(E,D){D<=4*u?p(0,D-1,E):A(0,D-1,E)}function p(E,D,g){for(var C=2*(E+1),I=E+1;I<=D;++I){for(var N=g[C++],F=g[C++],k=I,P=C-2;k-- >E;){var T=g[P-2],y=g[P-1];if(T<N)break;if(T===N&&y<F)break;g[P]=T,g[P+1]=y,P-=2}g[P]=N,g[P+1]=F}}function f(E,D,g){E*=2,D*=2;var C=g[E],I=g[E+1];g[E]=g[D],g[E+1]=g[D+1],g[D]=C,g[D+1]=I}function v(E,D,g){E*=2,D*=2,g[E]=g[D],g[E+1]=g[D+1]}function h(E,D,g,C){E*=2,D*=2,g*=2;var I=C[E],N=C[E+1];C[E]=C[D],C[E+1]=C[D+1],C[D]=C[g],C[D+1]=C[g+1],C[g]=I,C[g+1]=N}function m(E,D,g,C,I){E*=2,D*=2,I[E]=I[D],I[D]=g,I[E+1]=I[D+1],I[D+1]=C}function _(E,D,g){E*=2,D*=2;var C=g[E],I=g[D];return C<I?!1:C===I?g[E+1]>g[D+1]:!0}function x(E,D,g,C){E*=2;var I=C[E];return I<D?!0:I===D?C[E+1]<g:!1}function A(E,D,g){var C=(D-E+1)/6|0,I=E+C,N=D-C,F=E+D>>1,k=F-C,P=F+C,T=I,y=k,S=F,M=P,W=N,$=E+1,Z=D-1,K=0;_(T,y,g)&&(K=T,T=y,y=K),_(M,W,g)&&(K=M,M=W,W=K),_(T,S,g)&&(K=T,T=S,S=K),_(y,S,g)&&(K=y,y=S,S=K),_(T,M,g)&&(K=T,T=M,M=K),_(S,M,g)&&(K=S,S=M,M=K),_(y,W,g)&&(K=y,y=W,W=K),_(y,S,g)&&(K=y,y=S,S=K),_(M,W,g)&&(K=M,M=W,W=K);for(var Q=g[2*y],J=g[2*y+1],G=g[2*M],ee=g[2*M+1],re=2*T,fe=2*S,we=2*W,Oe=2*I,ke=2*F,Le=2*N,oe=0;oe<2;++oe){var be=g[re+oe],_e=g[fe+oe],he=g[we+oe];g[Oe+oe]=be,g[ke+oe]=_e,g[Le+oe]=he}v(k,E,g),v(P,D,g);for(var De=$;De<=Z;++De)if(x(De,Q,J,g))De!==$&&f(De,$,g),++$;else if(!x(De,G,ee,g))for(;;)if(x(Z,G,ee,g)){x(Z,Q,J,g)?(h(De,$,Z,g),++$,--Z):(f(De,Z,g),--Z);break}else{if(--Z<De)break;continue}m(E,$-1,Q,J,g),m(D,Z+1,G,ee,g),$-2-E<=u?p(E,$-2,g):A(E,$-2,g),D-(Z+2)<=u?p(Z+2,D,g):A(Z+2,D,g),Z-$<=u?p($,Z,g):A($,Z,g)}}),855:(function(l,u,c){l.exports={init:I,sweepBipartite:k,sweepComplete:P,scanBipartite:T,scanComplete:y};var p=c(1888),f=c(8828),v=c(4192),h=1<<28,m=1024,_=p.mallocInt32(m),x=p.mallocInt32(m),A=p.mallocInt32(m),E=p.mallocInt32(m),D=p.mallocInt32(m),g=p.mallocInt32(m),C=p.mallocDouble(m*8);function I(S){var M=f.nextPow2(S);_.length<M&&(p.free(_),_=p.mallocInt32(M)),x.length<M&&(p.free(x),x=p.mallocInt32(M)),A.length<M&&(p.free(A),A=p.mallocInt32(M)),E.length<M&&(p.free(E),E=p.mallocInt32(M)),D.length<M&&(p.free(D),D=p.mallocInt32(M)),g.length<M&&(p.free(g),g=p.mallocInt32(M));var W=8*M;C.length<W&&(p.free(C),C=p.mallocDouble(W))}function N(S,M,W,$){var Z=M[$],K=S[W-1];S[Z]=K,M[K]=Z}function F(S,M,W,$){S[W]=$,M[$]=W}function k(S,M,W,$,Z,K,Q,J,G,ee){for(var re=0,fe=2*S,we=S-1,Oe=fe-1,ke=W;ke<$;++ke){var Le=K[ke],oe=fe*ke;C[re++]=Z[oe+we],C[re++]=-(Le+1),C[re++]=Z[oe+Oe],C[re++]=Le}for(var ke=Q;ke<J;++ke){var Le=ee[ke]+h,be=fe*ke;C[re++]=G[be+we],C[re++]=-Le,C[re++]=G[be+Oe],C[re++]=Le}var _e=re>>>1;v(C,_e);for(var he=0,De=0,ke=0;ke<_e;++ke){var xe=C[2*ke+1]|0;if(xe>=h)xe=xe-h|0,N(A,E,De--,xe);else if(xe>=0)N(_,x,he--,xe);else if(xe<=-h){xe=-xe-h|0;for(var se=0;se<he;++se){var Ee=M(_[se],xe);if(Ee!==void 0)return Ee}F(A,E,De++,xe)}else{xe=-xe-1|0;for(var se=0;se<De;++se){var Ee=M(xe,A[se]);if(Ee!==void 0)return Ee}F(_,x,he++,xe)}}}function P(S,M,W,$,Z,K,Q,J,G,ee){for(var re=0,fe=2*S,we=S-1,Oe=fe-1,ke=W;ke<$;++ke){var Le=K[ke]+1<<1,oe=fe*ke;C[re++]=Z[oe+we],C[re++]=-Le,C[re++]=Z[oe+Oe],C[re++]=Le}for(var ke=Q;ke<J;++ke){var Le=ee[ke]+1<<1,be=fe*ke;C[re++]=G[be+we],C[re++]=-Le|1,C[re++]=G[be+Oe],C[re++]=Le|1}var _e=re>>>1;v(C,_e);for(var he=0,De=0,xe=0,ke=0;ke<_e;++ke){var se=C[2*ke+1]|0,Ee=se&1;if(ke<_e-1&&se>>1===C[2*ke+3]>>1&&(Ee=2,ke+=1),se<0){for(var Te=-(se>>1)-1,Be=0;Be<xe;++Be){var tt=M(D[Be],Te);if(tt!==void 0)return tt}if(Ee!==0)for(var Be=0;Be<he;++Be){var tt=M(_[Be],Te);if(tt!==void 0)return tt}if(Ee!==1)for(var Be=0;Be<De;++Be){var tt=M(A[Be],Te);if(tt!==void 0)return tt}Ee===0?F(_,x,he++,Te):Ee===1?F(A,E,De++,Te):Ee===2&&F(D,g,xe++,Te)}else{var Te=(se>>1)-1;Ee===0?N(_,x,he--,Te):Ee===1?N(A,E,De--,Te):Ee===2&&N(D,g,xe--,Te)}}}function T(S,M,W,$,Z,K,Q,J,G,ee,re,fe){var we=0,Oe=2*S,ke=M,Le=M+S,oe=1,be=1;$?be=h:oe=h;for(var _e=Z;_e<K;++_e){var he=_e+oe,De=Oe*_e;C[we++]=Q[De+ke],C[we++]=-he,C[we++]=Q[De+Le],C[we++]=he}for(var _e=G;_e<ee;++_e){var he=_e+be,xe=Oe*_e;C[we++]=re[xe+ke],C[we++]=-he}var se=we>>>1;v(C,se);for(var Ee=0,_e=0;_e<se;++_e){var Te=C[2*_e+1]|0;if(Te<0){var he=-Te,Be=!1;if(he>=h?(Be=!$,he-=h):(Be=!!$,he-=1),Be)F(_,x,Ee++,he);else{var tt=fe[he],at=Oe*he,gt=re[at+M+1],pt=re[at+M+1+S];e:for(var Rt=0;Rt<Ee;++Rt){var $t=_[Rt],Wt=Oe*$t;if(!(pt<Q[Wt+M+1]||Q[Wt+M+1+S]<gt)){for(var Ht=M+2;Ht<S;++Ht)if(re[at+Ht+S]<Q[Wt+Ht]||Q[Wt+Ht+S]<re[at+Ht])continue e;var Ft=J[$t],st;if($?st=W(tt,Ft):st=W(Ft,tt),st!==void 0)return st}}}}else N(_,x,Ee--,Te-oe)}}function y(S,M,W,$,Z,K,Q,J,G,ee,re){for(var fe=0,we=2*S,Oe=M,ke=M+S,Le=$;Le<Z;++Le){var oe=Le+h,be=we*Le;C[fe++]=K[be+Oe],C[fe++]=-oe,C[fe++]=K[be+ke],C[fe++]=oe}for(var Le=J;Le<G;++Le){var oe=Le+1,_e=we*Le;C[fe++]=ee[_e+Oe],C[fe++]=-oe}var he=fe>>>1;v(C,he);for(var De=0,Le=0;Le<he;++Le){var xe=C[2*Le+1]|0;if(xe<0){var oe=-xe;if(oe>=h)_[De++]=oe-h;else{oe-=1;var se=re[oe],Ee=we*oe,Te=ee[Ee+M+1],Be=ee[Ee+M+1+S];e:for(var tt=0;tt<De;++tt){var at=_[tt],gt=Q[at];if(gt===se)break;var pt=we*at;if(!(Be<K[pt+M+1]||K[pt+M+1+S]<Te)){for(var Rt=M+2;Rt<S;++Rt)if(ee[Ee+Rt+S]<K[pt+Rt]||K[pt+Rt+S]<ee[Ee+Rt])continue e;var $t=W(gt,se);if($t!==void 0)return $t}}}}else{for(var oe=xe-h,tt=De-1;tt>=0;--tt)if(_[tt]===oe){for(var Rt=tt+1;Rt<De;++Rt)_[Rt-1]=_[Rt];break}--De}}}}),2538:(function(l,u,c){var p=c(8902),f=c(5542),v=c(2272),h=c(5023);l.exports=E;function m(D){return[Math.min(D[0],D[1]),Math.max(D[0],D[1])]}function _(D,g){return D[0]-g[0]||D[1]-g[1]}function x(D){return D.map(m).sort(_)}function A(D,g,C){return g in D?D[g]:C}function E(D,g,C){Array.isArray(g)?(C=C||{},g=g||[]):(C=g||{},g=[]);var I=!!A(C,"delaunay",!0),N=!!A(C,"interior",!0),F=!!A(C,"exterior",!0),k=!!A(C,"infinity",!1);if(!N&&!F||D.length===0)return[];var P=p(D,g);if(I||N!==F||k){for(var T=f(D.length,x(g)),y=0;y<P.length;++y){var S=P[y];T.addTriangle(S[0],S[1],S[2])}return I&&v(D,T),F?N?k?h(T,0,k):T.cells():h(T,1,k):h(T,-1)}else return P}}),2272:(function(l,u,c){var p=c(2646)[4];c(2478),l.exports=v;function f(h,m,_,x,A,E){var D=m.opposite(x,A);if(!(D<0)){if(A<x){var g=x;x=A,A=g,g=E,E=D,D=g}m.isConstraint(x,A)||p(h[x],h[A],h[E],h[D])<0&&_.push(x,A)}}function v(h,m){for(var _=[],x=h.length,A=m.stars,E=0;E<x;++E)for(var D=A[E],g=1;g<D.length;g+=2){var C=D[g];if(!(C<E)&&!m.isConstraint(E,C)){for(var I=D[g-1],N=-1,F=1;F<D.length;F+=2)if(D[F-1]===C){N=D[F];break}N<0||p(h[E],h[C],h[I],h[N])<0&&_.push(E,C)}}for(;_.length>0;){for(var C=_.pop(),E=_.pop(),I=-1,N=-1,D=A[E],k=1;k<D.length;k+=2){var P=D[k-1],T=D[k];P===C?N=T:T===C&&(I=P)}I<0||N<0||p(h[E],h[C],h[I],h[N])>=0||(m.flip(E,C),f(h,m,_,I,E,N),f(h,m,_,E,N,I),f(h,m,_,N,C,I),f(h,m,_,C,I,N))}}}),5023:(function(l,u,c){var p=c(2478);l.exports=x;function f(A,E,D,g,C,I,N){this.cells=A,this.neighbor=E,this.flags=g,this.constraint=D,this.active=C,this.next=I,this.boundary=N}var v=f.prototype;function h(A,E){return A[0]-E[0]||A[1]-E[1]||A[2]-E[2]}v.locate=(function(){var A=[0,0,0];return function(E,D,g){var C=E,I=D,N=g;return D<g?D<E&&(C=D,I=g,N=E):g<E&&(C=g,I=E,N=D),C<0?-1:(A[0]=C,A[1]=I,A[2]=N,p.eq(this.cells,A,h))}})();function m(A,E){for(var D=A.cells(),g=D.length,C=0;C<g;++C){var I=D[C],N=I[0],F=I[1],k=I[2];F<k?F<N&&(I[0]=F,I[1]=k,I[2]=N):k<N&&(I[0]=k,I[1]=N,I[2]=F)}D.sort(h);for(var P=new Array(g),C=0;C<P.length;++C)P[C]=0;var T=[],y=[],S=new Array(3*g),M=new Array(3*g),W=null;E&&(W=[]);for(var $=new f(D,S,M,P,T,y,W),C=0;C<g;++C)for(var I=D[C],Z=0;Z<3;++Z){var N=I[Z],F=I[(Z+1)%3],K=S[3*C+Z]=$.locate(F,N,A.opposite(F,N)),Q=M[3*C+Z]=A.isConstraint(N,F);K<0&&(Q?y.push(C):(T.push(C),P[C]=1),E&&W.push([F,N,-1]))}return $}function _(A,E,D){for(var g=0,C=0;C<A.length;++C)E[C]===D&&(A[g++]=A[C]);return A.length=g,A}function x(A,E,D){var g=m(A,D);if(E===0)return D?g.cells.concat(g.boundary):g.cells;for(var C=1,I=g.active,N=g.next,F=g.flags,k=g.cells,P=g.constraint,T=g.neighbor;I.length>0||N.length>0;){for(;I.length>0;){var y=I.pop();if(F[y]!==-C){F[y]=C,k[y];for(var S=0;S<3;++S){var M=T[3*y+S];M>=0&&F[M]===0&&(P[3*y+S]?N.push(M):(I.push(M),F[M]=C))}}}var W=N;N=I,I=W,N.length=0,C=-C}var $=_(k,F,E);return D?$.concat(g.boundary):$}}),8902:(function(l,u,c){var p=c(2478),f=c(3250)[3],v=0,h=1,m=2;l.exports=N;function _(F,k,P,T,y){this.a=F,this.b=k,this.idx=P,this.lowerIds=T,this.upperIds=y}function x(F,k,P,T){this.a=F,this.b=k,this.type=P,this.idx=T}function A(F,k){var P=F.a[0]-k.a[0]||F.a[1]-k.a[1]||F.type-k.type;return P||F.type!==v&&(P=f(F.a,F.b,k.b),P)?P:F.idx-k.idx}function E(F,k){return f(F.a,F.b,k)}function D(F,k,P,T,y){for(var S=p.lt(k,T,E),M=p.gt(k,T,E),W=S;W<M;++W){for(var $=k[W],Z=$.lowerIds,Q=Z.length;Q>1&&f(P[Z[Q-2]],P[Z[Q-1]],T)>0;)F.push([Z[Q-1],Z[Q-2],y]),Q-=1;Z.length=Q,Z.push(y);for(var K=$.upperIds,Q=K.length;Q>1&&f(P[K[Q-2]],P[K[Q-1]],T)<0;)F.push([K[Q-2],K[Q-1],y]),Q-=1;K.length=Q,K.push(y)}}function g(F,k){var P;return F.a[0]<k.a[0]?P=f(F.a,F.b,k.a):P=f(k.b,k.a,F.a),P||(k.b[0]<F.b[0]?P=f(F.a,F.b,k.b):P=f(k.b,k.a,F.b),P||F.idx-k.idx)}function C(F,k,P){var T=p.le(F,P,g),y=F[T],S=y.upperIds,M=S[S.length-1];y.upperIds=[M],F.splice(T+1,0,new _(P.a,P.b,P.idx,[M],S))}function I(F,k,P){var T=P.a;P.a=P.b,P.b=T;var y=p.eq(F,P,g),S=F[y],M=F[y-1];M.upperIds=S.upperIds,F.splice(y,1)}function N(F,k){for(var P=F.length,T=k.length,y=[],S=0;S<P;++S)y.push(new x(F[S],null,v,S));for(var S=0;S<T;++S){var M=k[S],W=F[M[0]],$=F[M[1]];W[0]<$[0]?y.push(new x(W,$,m,S),new x($,W,h,S)):W[0]>$[0]&&y.push(new x($,W,m,S),new x(W,$,h,S))}y.sort(A);for(var Z=y[0].a[0]-(1+Math.abs(y[0].a[0]))*Math.pow(2,-52),K=[new _([Z,1],[Z,0],-1,[],[])],Q=[],S=0,J=y.length;S<J;++S){var G=y[S],ee=G.type;ee===v?D(Q,K,F,G.a,G.idx):ee===m?C(K,F,G):I(K,F,G)}return Q}}),5542:(function(l,u,c){var p=c(2478);l.exports=m;function f(_,x){this.stars=_,this.edges=x}var v=f.prototype;function h(_,x,A){for(var E=1,D=_.length;E<D;E+=2)if(_[E-1]===x&&_[E]===A){_[E-1]=_[D-2],_[E]=_[D-1],_.length=D-2;return}}v.isConstraint=(function(){var _=[0,0];function x(A,E){return A[0]-E[0]||A[1]-E[1]}return function(A,E){return _[0]=Math.min(A,E),_[1]=Math.max(A,E),p.eq(this.edges,_,x)>=0}})(),v.removeTriangle=function(_,x,A){var E=this.stars;h(E[_],x,A),h(E[x],A,_),h(E[A],_,x)},v.addTriangle=function(_,x,A){var E=this.stars;E[_].push(x,A),E[x].push(A,_),E[A].push(_,x)},v.opposite=function(_,x){for(var A=this.stars[x],E=1,D=A.length;E<D;E+=2)if(A[E]===_)return A[E-1];return-1},v.flip=function(_,x){var A=this.opposite(_,x),E=this.opposite(x,_);this.removeTriangle(_,x,A),this.removeTriangle(x,_,E),this.addTriangle(_,E,A),this.addTriangle(x,A,E)},v.edges=function(){for(var _=this.stars,x=[],A=0,E=_.length;A<E;++A)for(var D=_[A],g=0,C=D.length;g<C;g+=2)x.push([D[g],D[g+1]]);return x},v.cells=function(){for(var _=this.stars,x=[],A=0,E=_.length;A<E;++A)for(var D=_[A],g=0,C=D.length;g<C;g+=2){var I=D[g],N=D[g+1];A<Math.min(I,N)&&x.push([A,I,N])}return x};function m(_,x){for(var A=new Array(_),E=0;E<_;++E)A[E]=[];return new f(A,x)}}),2419:(function(l){l.exports=u;function u(c){for(var p=1,f=1;f<c.length;++f)for(var v=0;v<f;++v)if(c[f]<c[v])p=-p;else if(c[v]===c[f])return 0;return p}}),3628:(function(l,u,c){var p=c(1338),f=c(727);function v(_,x){for(var A=0,E=_.length,D=0;D<E;++D)A+=_[D]*x[D];return A}function h(_){var x=_.length;if(x===0)return[];_[0].length;var A=p([_.length+1,_.length+1],1),E=p([_.length+1],1);A[x][x]=0;for(var D=0;D<x;++D){for(var g=0;g<=D;++g)A[g][D]=A[D][g]=2*v(_[D],_[g]);E[D]=v(_[D],_[D])}for(var C=f(A,E),I=0,N=C[x+1],D=0;D<N.length;++D)I+=N[D];for(var F=new Array(x),D=0;D<x;++D){for(var N=C[D],k=0,g=0;g<N.length;++g)k+=N[g];F[D]=k/I}return F}function m(_){if(_.length===0)return[];for(var x=_[0].length,A=p([x]),E=h(_),D=0;D<_.length;++D)for(var g=0;g<x;++g)A[g]+=_[D][g]*E[D];return A}m.barycenetric=h,l.exports=m}),6037:(function(l,u,c){l.exports=f;var p=c(3628);function f(v){for(var h=p(v),m=0,_=0;_<v.length;++_)for(var x=v[_],A=0;A<h.length;++A)m+=Math.pow(x[A]-h[A],2);return Math.sqrt(m/v.length)}}),332:(function(l,u,c){l.exports=W;var p=c(1755),f=c(6867),v=c(1125),h=c(7842),m=c(1318),_=c(946),x=c(5838),A=c(1278),E=c(3637);function D($){var Z=_($);return[A(Z,-1/0),A(Z,1/0)]}function g($,Z){for(var K=new Array(Z.length),Q=0;Q<Z.length;++Q){var J=Z[Q],G=$[J[0]],ee=$[J[1]];K[Q]=[A(Math.min(G[0],ee[0]),-1/0),A(Math.min(G[1],ee[1]),-1/0),A(Math.max(G[0],ee[0]),1/0),A(Math.max(G[1],ee[1]),1/0)]}return K}function C($){for(var Z=new Array($.length),K=0;K<$.length;++K){var Q=$[K];Z[K]=[A(Q[0],-1/0),A(Q[1],-1/0),A(Q[0],1/0),A(Q[1],1/0)]}return Z}function I($,Z,K){var Q=[];return f(K,function(J,G){var ee=Z[J],re=Z[G];if(!(ee[0]===re[0]||ee[0]===re[1]||ee[1]===re[0]||ee[1]===re[1])){var fe=$[ee[0]],we=$[ee[1]],Oe=$[re[0]],ke=$[re[1]];v(fe,we,Oe,ke)&&Q.push([J,G])}}),Q}function N($,Z,K,Q){var J=[];return f(K,Q,function(G,ee){var re=Z[G];if(!(re[0]===ee||re[1]===ee)){var fe=$[ee],we=$[re[0]],Oe=$[re[1]];v(we,Oe,fe,fe)&&J.push([G,ee])}}),J}function F($,Z,K,Q,J){var G,ee,re=$.map(function(at){return[h(at[0]),h(at[1])]});for(G=0;G<K.length;++G){var fe=K[G];ee=fe[0];var we=fe[1],Oe=Z[ee],ke=Z[we],Le=E(x($[Oe[0]]),x($[Oe[1]]),x($[ke[0]]),x($[ke[1]]));if(Le){var oe=$.length;$.push([_(Le[0]),_(Le[1])]),re.push(Le),Q.push([ee,oe],[we,oe])}}for(Q.sort(function(at,gt){if(at[0]!==gt[0])return at[0]-gt[0];var pt=re[at[1]],Rt=re[gt[1]];return m(pt[0],Rt[0])||m(pt[1],Rt[1])}),G=Q.length-1;G>=0;--G){var be=Q[G];ee=be[0];var _e=Z[ee],he=_e[0],De=_e[1],xe=$[he],se=$[De];if((xe[0]-se[0]||xe[1]-se[1])<0){var Ee=he;he=De,De=Ee}_e[0]=he;var Te=_e[1]=be[1],Be;for(J&&(Be=_e[2]);G>0&&Q[G-1][0]===ee;){var be=Q[--G],tt=be[1];J?Z.push([Te,tt,Be]):Z.push([Te,tt]),Te=tt}J?Z.push([Te,De,Be]):Z.push([Te,De])}return re}function k($,Z,K){for(var Q=Z.length,J=new p(Q),G=[],ee=0;ee<Z.length;++ee){var re=Z[ee],fe=D(re[0]),we=D(re[1]);G.push([A(fe[0],-1/0),A(we[0],-1/0),A(fe[1],1/0),A(we[1],1/0)])}f(G,function(be,_e){J.link(be,_e)});for(var Oe=!0,ke=new Array(Q),ee=0;ee<Q;++ee){var Le=J.find(ee);Le!==ee&&(Oe=!1,$[Le]=[Math.min($[ee][0],$[Le][0]),Math.min($[ee][1],$[Le][1])])}if(Oe)return null;for(var oe=0,ee=0;ee<Q;++ee){var Le=J.find(ee);Le===ee?(ke[ee]=oe,$[oe++]=$[ee]):ke[ee]=-1}$.length=oe;for(var ee=0;ee<Q;++ee)ke[ee]<0&&(ke[ee]=ke[J.find(ee)]);return ke}function P($,Z){return $[0]-Z[0]||$[1]-Z[1]}function T($,Z){var K=$[0]-Z[0]||$[1]-Z[1];return K||($[2]<Z[2]?-1:$[2]>Z[2]?1:0)}function y($,Z,K){if($.length!==0){if(Z)for(var Q=0;Q<$.length;++Q){var J=$[Q],G=Z[J[0]],ee=Z[J[1]];J[0]=Math.min(G,ee),J[1]=Math.max(G,ee)}else for(var Q=0;Q<$.length;++Q){var J=$[Q],G=J[0],ee=J[1];J[0]=Math.min(G,ee),J[1]=Math.max(G,ee)}K?$.sort(T):$.sort(P);for(var re=1,Q=1;Q<$.length;++Q){var fe=$[Q-1],we=$[Q];we[0]===fe[0]&&we[1]===fe[1]&&(!K||we[2]===fe[2])||($[re++]=we)}$.length=re}}function S($,Z,K){var Q=k($,[],C($));return y(Z,Q,K),!!Q}function M($,Z,K){var Q=g($,Z),J=I($,Z,Q),G=C($),ee=N($,Z,Q,G),re=F($,Z,J,ee,K),fe=k($,re);return y(Z,fe,K),fe?!0:J.length>0||ee.length>0}function W($,Z,K){var Q;if(K){Q=Z;for(var J=new Array(Z.length),G=0;G<Z.length;++G){var ee=Z[G];J[G]=[ee[0],ee[1],K[G]]}Z=J}for(var re=S($,Z,!!K);M($,Z,!!K);)re=!0;if(K&&re){Q.length=0,K.length=0;for(var G=0;G<Z.length;++G){var ee=Z[G];Q.push([ee[0],ee[1]]),K.push(ee[2])}}return re}}),3637:(function(l,u,c){l.exports=E;var p=c(6504),f=c(8697),v=c(5572),h=c(7721),m=c(544),_=c(2653),x=c(8987);function A(D,g){return v(p(D[0],g[1]),p(D[1],g[0]))}function E(D,g,C,I){var N=m(g,D),F=m(I,C),k=A(N,F);if(h(k)===0)return null;var P=m(D,C),T=A(F,P),y=f(T,k),S=x(N,y),M=_(D,S);return M}}),3642:(function(l){l.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]}]}}),6729:(function(l,u,c){var p=c(3642),f=c(395);l.exports=v;function v(x){var A,E,D,g,C,I,N,F,y,k,P;if(x||(x={}),F=(x.nshades||72)-1,N=x.format||"hex",I=x.colormap,I||(I="jet"),typeof I=="string"){if(I=I.toLowerCase(),!p[I])throw Error(I+" not a supported colorscale");C=p[I]}else if(Array.isArray(I))C=I.slice();else throw Error("unsupported colormap option",I);if(C.length>F+1)throw new Error(I+" map requires nshades to be at least size "+C.length);Array.isArray(x.alpha)?x.alpha.length!==2?k=[1,1]:k=x.alpha.slice():typeof x.alpha=="number"?k=[x.alpha,x.alpha]:k=[1,1],A=C.map(function(W){return Math.round(W.index*F)}),k[0]=Math.min(Math.max(k[0],0),1),k[1]=Math.min(Math.max(k[1],0),1);var T=C.map(function(W,$){var Z=C[$].index,K=C[$].rgb.slice();return K.length===4&&K[3]>=0&&K[3]<=1||(K[3]=k[0]+(k[1]-k[0])*Z),K}),y=[];for(P=0;P<A.length-1;++P){g=A[P+1]-A[P],E=T[P],D=T[P+1];for(var S=0;S<g;S++){var M=S/g;y.push([Math.round(f(E[0],D[0],M)),Math.round(f(E[1],D[1],M)),Math.round(f(E[2],D[2],M)),f(E[3],D[3],M)])}}return y.push(C[C.length-1].rgb.concat(k[1])),N==="hex"?y=y.map(m):N==="rgbaString"?y=y.map(_):N==="float"&&(y=y.map(h)),y}function h(x){return[x[0]/255,x[1]/255,x[2]/255,x[3]]}function m(x){for(var A,E="#",D=0;D<3;++D)A=x[D],A=A.toString(16),E+=("00"+A).substr(A.length);return E}function _(x){return"rgba("+x.join(",")+")"}}),3140:(function(l,u,c){l.exports=x;var p=c(3250),f=c(8572),v=c(9362),h=c(5382),m=c(8210);function _(A,E,D){var g=v(A[0],-E[0]),C=v(A[1],-E[1]),I=v(D[0],-E[0]),N=v(D[1],-E[1]),F=m(h(g,I),h(C,N));return F[F.length-1]>=0}function x(A,E,D,g){var C=p(E,D,g);if(C===0){var I=f(p(A,E,D)),N=f(p(A,E,g));if(I===N){if(I===0){var F=_(A,E,D),k=_(A,E,g);return F===k?0:F?1:-1}return 0}else{if(N===0)return I>0||_(A,E,g)?-1:1;if(I===0)return N>0||_(A,E,D)?1:-1}return f(N-I)}var P=p(A,E,D);if(P>0)return C>0&&p(A,E,g)>0?1:-1;if(P<0)return C>0||p(A,E,g)>0?1:-1;var T=p(A,E,g);return T>0||_(A,E,D)?1:-1}}),8572:(function(l){l.exports=function(c){return c<0?-1:c>0?1:0}}),8507:(function(l){l.exports=p;var u=Math.min;function c(f,v){return f-v}function p(f,v){var h=f.length,m=f.length-v.length;if(m)return m;switch(h){case 0:return 0;case 1:return f[0]-v[0];case 2:return f[0]+f[1]-v[0]-v[1]||u(f[0],f[1])-u(v[0],v[1]);case 3:var _=f[0]+f[1],x=v[0]+v[1];if(m=_+f[2]-(x+v[2]),m)return m;var A=u(f[0],f[1]),E=u(v[0],v[1]);return u(A,f[2])-u(E,v[2])||u(A+f[2],_)-u(E+v[2],x);case 4:var D=f[0],g=f[1],C=f[2],I=f[3],N=v[0],F=v[1],k=v[2],P=v[3];return D+g+C+I-(N+F+k+P)||u(D,g,C,I)-u(N,F,k,P,N)||u(D+g,D+C,D+I,g+C,g+I,C+I)-u(N+F,N+k,N+P,F+k,F+P,k+P)||u(D+g+C,D+g+I,D+C+I,g+C+I)-u(N+F+k,N+F+P,N+k+P,F+k+P);default:for(var T=f.slice().sort(c),y=v.slice().sort(c),S=0;S<h;++S)if(m=T[S]-y[S],m)return m;return 0}}}),3788:(function(l,u,c){var p=c(8507),f=c(2419);l.exports=v;function v(h,m){return p(h,m)||f(h)-f(m)}}),7352:(function(l,u,c){var p=c(5721),f=c(4750),v=c(2690);l.exports=h;function h(m){var _=m.length;if(_===0)return[];if(_===1)return[[0]];var x=m[0].length;return x===0?[]:x===1?p(m):x===2?f(m):v(m,x)}}),5721:(function(l){l.exports=u;function u(c){for(var p=0,f=0,v=1;v<c.length;++v)c[v][0]<c[p][0]&&(p=v),c[v][0]>c[f][0]&&(f=v);return p<f?[[p],[f]]:p>f?[[f],[p]]:[[p]]}}),4750:(function(l,u,c){l.exports=f;var p=c(3090);function f(v){var h=p(v),m=h.length;if(m<=2)return[];for(var _=new Array(m),x=h[m-1],A=0;A<m;++A){var E=h[A];_[A]=[x,E],x=E}return _}}),2690:(function(l,u,c){l.exports=m;var p=c(8954),f=c(3952);function v(_,x){for(var A=_.length,E=new Array(A),D=0;D<x.length;++D)E[D]=_[x[D]];for(var g=x.length,D=0;D<A;++D)x.indexOf(D)<0&&(E[g++]=_[D]);return E}function h(_,x){for(var A=_.length,E=x.length,D=0;D<A;++D)for(var g=_[D],C=0;C<g.length;++C){var I=g[C];if(I<E)g[C]=x[I];else{I=I-E;for(var N=0;N<E;++N)I>=x[N]&&(I+=1);g[C]=I}}return _}function m(_,x){try{return p(_,!0)}catch{var A=f(_);if(A.length<=x)return[];var E=v(_,A),D=p(E,!0);return h(D,A)}}}),4769:(function(l){function u(p,f,v,h,m,_){var x=6*m*m-6*m,A=3*m*m-4*m+1,E=-6*m*m+6*m,D=3*m*m-2*m;if(p.length){_||(_=new Array(p.length));for(var g=p.length-1;g>=0;--g)_[g]=x*p[g]+A*f[g]+E*v[g]+D*h[g];return _}return x*p+A*f+E*v[g]+D*h}function c(p,f,v,h,m,_){var x=m-1,A=m*m,E=x*x,D=(1+2*m)*E,g=m*E,C=A*(3-2*m),I=A*x;if(p.length){_||(_=new Array(p.length));for(var N=p.length-1;N>=0;--N)_[N]=D*p[N]+g*f[N]+C*v[N]+I*h[N];return _}return D*p+g*f+C*v+I*h}l.exports=c,l.exports.derivative=u}),7642:(function(l,u,c){var p=c(8954),f=c(1682);l.exports=_;function v(x,A){this.point=x,this.index=A}function h(x,A){for(var E=x.point,D=A.point,g=E.length,C=0;C<g;++C){var I=D[C]-E[C];if(I)return I}return 0}function m(x,A,E){if(x===1)return E?[[-1,0]]:[];var D=A.map(function(F,k){return[F[0],k]});D.sort(function(F,k){return F[0]-k[0]});for(var g=new Array(x-1),C=1;C<x;++C){var I=D[C-1],N=D[C];g[C-1]=[I[1],N[1]]}return E&&g.push([-1,g[0][1]],[g[x-1][1],-1]),g}function _(x,A){var E=x.length;if(E===0)return[];var D=x[0].length;if(D<1)return[];if(D===1)return m(E,x,A);for(var g=new Array(E),C=1,I=0;I<E;++I){for(var N=x[I],F=new Array(D+1),k=0,P=0;P<D;++P){var T=N[P];F[P]=T,k+=T*T}F[D]=k,g[I]=new v(F,I),C=Math.max(k,C)}f(g,h),E=g.length;for(var y=new Array(E+D+1),S=new Array(E+D+1),M=(D+1)*(D+1)*C,W=new Array(D+1),I=0;I<=D;++I)W[I]=0;W[D]=M,y[0]=W.slice(),S[0]=-1;for(var I=0;I<=D;++I){var F=W.slice();F[I]=1,y[I+1]=F,S[I+1]=-1}for(var I=0;I<E;++I){var $=g[I];y[I+D+1]=$.point,S[I+D+1]=$.index}var Z=p(y,!1);if(A?Z=Z.filter(function(K){for(var Q=0,J=0;J<=D;++J){var G=S[K[J]];if(G<0&&++Q>=2)return!1;K[J]=G}return!0}):Z=Z.filter(function(K){for(var Q=0;Q<=D;++Q){var J=S[K[Q]];if(J<0)return!1;K[Q]=J}return!0}),D&1)for(var I=0;I<Z.length;++I){var $=Z[I],F=$[0];$[0]=$[1],$[1]=F}return Z}}),2361:(function(l){var u=!1;if(typeof Float64Array<"u"){var c=new Float64Array(1),p=new Uint32Array(c.buffer);if(c[0]=1,u=!0,p[1]===1072693248){let v=function(_,x){return p[0]=_,p[1]=x,c[0]},h=function(_){return c[0]=_,p[0]},m=function(_){return c[0]=_,p[1]};l.exports=function(x){return c[0]=x,[p[0],p[1]]},l.exports.pack=v,l.exports.lo=h,l.exports.hi=m}else if(p[0]===1072693248){let v=function(_,x){return p[1]=_,p[0]=x,c[0]},h=function(_){return c[0]=_,p[1]},m=function(_){return c[0]=_,p[0]};l.exports=function(x){return c[0]=x,[p[1],p[0]]},l.exports.pack=v,l.exports.lo=h,l.exports.hi=m}else u=!1}if(!u){let v=function(_,x){return f.writeUInt32LE(_,0,!0),f.writeUInt32LE(x,4,!0),f.readDoubleLE(0,!0)},h=function(_){return f.writeDoubleLE(_,0,!0),f.readUInt32LE(0,!0)},m=function(_){return f.writeDoubleLE(_,0,!0),f.readUInt32LE(4,!0)};var f=new Buffer(8);l.exports=function(x){return f.writeDoubleLE(x,0,!0),[f.readUInt32LE(0,!0),f.readUInt32LE(4,!0)]},l.exports.pack=v,l.exports.lo=h,l.exports.hi=m}l.exports.sign=function(v){return l.exports.hi(v)>>>31},l.exports.exponent=function(v){var h=l.exports.hi(v);return(h<<1>>>21)-1023},l.exports.fraction=function(v){var h=l.exports.lo(v),m=l.exports.hi(v),_=m&(1<<20)-1;return m&2146435072&&(_+=1048576),[h,_]},l.exports.denormalized=function(v){var h=l.exports.hi(v);return!(h&2146435072)}}),1338:(function(l){function u(f,v,h){var m=f[h]|0;if(m<=0)return[];var _=new Array(m),x;if(h===f.length-1)for(x=0;x<m;++x)_[x]=v;else for(x=0;x<m;++x)_[x]=u(f,v,h+1);return _}function c(f,v){var h,m;for(h=new Array(f),m=0;m<f;++m)h[m]=v;return h}function p(f,v){switch(typeof v>"u"&&(v=0),typeof f){case"number":if(f>0)return c(f|0,v);break;case"object":if(typeof f.length=="number")return u(f,v,0);break}return[]}l.exports=p}),3134:(function(l,u,c){l.exports=f;var p=c(1682);function f(v,h){var m=v.length;if(typeof h!="number"){h=0;for(var _=0;_<m;++_){var x=v[_];h=Math.max(h,x[0],x[1])}h=(h|0)+1}h=h|0;for(var A=new Array(h),_=0;_<h;++_)A[_]=[];for(var _=0;_<m;++_){var x=v[_];A[x[0]].push(x[1]),A[x[1]].push(x[0])}for(var E=0;E<h;++E)p(A[E],function(D,g){return D-g});return A}}),5033:(function(l){l.exports=u;function u(c,p,f){var v=p||0,h=f||1;return[[c[12]+c[0],c[13]+c[1],c[14]+c[2],c[15]+c[3]],[c[12]-c[0],c[13]-c[1],c[14]-c[2],c[15]-c[3]],[c[12]+c[4],c[13]+c[5],c[14]+c[6],c[15]+c[7]],[c[12]-c[4],c[13]-c[5],c[14]-c[6],c[15]-c[7]],[v*c[12]+c[8],v*c[13]+c[9],v*c[14]+c[10],v*c[15]+c[11]],[h*c[12]-c[8],h*c[13]-c[9],h*c[14]-c[10],h*c[15]-c[11]]]}}),9215:(function(l,u,c){l.exports=x;var p=c(4769),f=c(2478);function v(A,E,D){return Math.min(E,Math.max(A,D))}function h(A,E,D){this.dimension=A.length,this.bounds=[new Array(this.dimension),new Array(this.dimension)];for(var g=0;g<this.dimension;++g)this.bounds[0][g]=-1/0,this.bounds[1][g]=1/0;this._state=A.slice().reverse(),this._velocity=E.slice().reverse(),this._time=[D],this._scratch=[A.slice(),A.slice(),A.slice(),A.slice(),A.slice()]}var m=h.prototype;m.flush=function(A){var E=f.gt(this._time,A)-1;E<=0||(this._time.splice(0,E),this._state.splice(0,E*this.dimension),this._velocity.splice(0,E*this.dimension))},m.curve=function(A){var E=this._time,D=E.length,g=f.le(E,A),C=this._scratch[0],I=this._state,N=this._velocity,F=this.dimension,k=this.bounds;if(g<0)for(var P=F-1,T=0;T<F;++T,--P)C[T]=I[P];else if(g>=D-1)for(var P=I.length-1,y=A-E[D-1],T=0;T<F;++T,--P)C[T]=I[P]+y*N[P];else{for(var P=F*(g+1)-1,S=E[g],M=E[g+1],W=M-S||1,$=this._scratch[1],Z=this._scratch[2],K=this._scratch[3],Q=this._scratch[4],J=!0,T=0;T<F;++T,--P)$[T]=I[P],K[T]=N[P]*W,Z[T]=I[P+F],Q[T]=N[P+F]*W,J=J&&$[T]===Z[T]&&K[T]===Q[T]&&K[T]===0;if(J)for(var T=0;T<F;++T)C[T]=$[T];else p($,K,Z,Q,(A-S)/W,C)}for(var G=k[0],ee=k[1],T=0;T<F;++T)C[T]=v(G[T],ee[T],C[T]);return C},m.dcurve=function(A){var E=this._time,D=E.length,g=f.le(E,A),C=this._scratch[0],I=this._state,N=this._velocity,F=this.dimension;if(g>=D-1){var k=I.length-1;A-E[D-1];for(var P=0;P<F;++P,--k)C[P]=N[k]}else{for(var k=F*(g+1)-1,T=E[g],y=E[g+1],S=y-T||1,M=this._scratch[1],W=this._scratch[2],$=this._scratch[3],Z=this._scratch[4],K=!0,P=0;P<F;++P,--k)M[P]=I[k],$[P]=N[k]*S,W[P]=I[k+F],Z[P]=N[k+F]*S,K=K&&M[P]===W[P]&&$[P]===Z[P]&&$[P]===0;if(K)for(var P=0;P<F;++P)C[P]=0;else{p.derivative(M,$,W,Z,(A-T)/S,C);for(var P=0;P<F;++P)C[P]/=S}}return C},m.lastT=function(){var A=this._time;return A[A.length-1]},m.stable=function(){for(var A=this._velocity,E=A.length,D=this.dimension-1;D>=0;--D)if(A[--E])return!1;return!0},m.jump=function(A){var E=this.lastT(),D=this.dimension;if(!(A<E||arguments.length!==D+1)){var g=this._state,C=this._velocity,I=g.length-this.dimension,N=this.bounds,F=N[0],k=N[1];this._time.push(E,A);for(var P=0;P<2;++P)for(var T=0;T<D;++T)g.push(g[I++]),C.push(0);this._time.push(A);for(var T=D;T>0;--T)g.push(v(F[T-1],k[T-1],arguments[T])),C.push(0)}},m.push=function(A){var E=this.lastT(),D=this.dimension;if(!(A<E||arguments.length!==D+1)){var g=this._state,C=this._velocity,I=g.length-this.dimension,N=A-E,F=this.bounds,k=F[0],P=F[1],T=N>1e-6?1/N:0;this._time.push(A);for(var y=D;y>0;--y){var S=v(k[y-1],P[y-1],arguments[y]);g.push(S),C.push((S-g[I++])*T)}}},m.set=function(A){var E=this.dimension;if(!(A<this.lastT()||arguments.length!==E+1)){var D=this._state,g=this._velocity,C=this.bounds,I=C[0],N=C[1];this._time.push(A);for(var F=E;F>0;--F)D.push(v(I[F-1],N[F-1],arguments[F])),g.push(0)}},m.move=function(A){var E=this.lastT(),D=this.dimension;if(!(A<=E||arguments.length!==D+1)){var g=this._state,C=this._velocity,I=g.length-this.dimension,N=this.bounds,F=N[0],k=N[1],P=A-E,T=P>1e-6?1/P:0;this._time.push(A);for(var y=D;y>0;--y){var S=arguments[y];g.push(v(F[y-1],k[y-1],g[I++]+S)),C.push(S*T)}}},m.idle=function(A){var E=this.lastT();if(!(A<E)){var D=this.dimension,g=this._state,C=this._velocity,I=g.length-D,N=this.bounds,F=N[0],k=N[1],P=A-E;this._time.push(A);for(var T=D-1;T>=0;--T)g.push(v(F[T],k[T],g[I]+P*C[I])),C.push(0),I+=1}};function _(A){for(var E=new Array(A),D=0;D<A;++D)E[D]=0;return E}function x(A,E,D){switch(arguments.length){case 0:return new h([0],[0],0);case 1:if(typeof A=="number"){var g=_(A);return new h(g,g,0)}else return new h(A,_(A.length),0);case 2:if(typeof E=="number"){var g=_(A.length);return new h(A,g,+E)}else D=0;case 3:if(A.length!==E.length)throw new Error("state and velocity lengths must match");return new h(A,E,D)}}}),3840:(function(l){l.exports=F;var u=0,c=1;function p(k,P,T,y,S,M){this._color=k,this.key=P,this.value=T,this.left=y,this.right=S,this._count=M}function f(k){return new p(k._color,k.key,k.value,k.left,k.right,k._count)}function v(k,P){return new p(k,P.key,P.value,P.left,P.right,P._count)}function h(k){k._count=1+(k.left?k.left._count:0)+(k.right?k.right._count:0)}function m(k,P){this._compare=k,this.root=P}var _=m.prototype;Object.defineProperty(_,"keys",{get:function(){var k=[];return this.forEach(function(P,T){k.push(P)}),k}}),Object.defineProperty(_,"values",{get:function(){var k=[];return this.forEach(function(P,T){k.push(T)}),k}}),Object.defineProperty(_,"length",{get:function(){return this.root?this.root._count:0}}),_.insert=function(k,P){for(var T=this._compare,y=this.root,S=[],M=[];y;){var W=T(k,y.key);S.push(y),M.push(W),W<=0?y=y.left:y=y.right}S.push(new p(u,k,P,null,null,1));for(var $=S.length-2;$>=0;--$){var y=S[$];M[$]<=0?S[$]=new p(y._color,y.key,y.value,S[$+1],y.right,y._count+1):S[$]=new p(y._color,y.key,y.value,y.left,S[$+1],y._count+1)}for(var $=S.length-1;$>1;--$){var Z=S[$-1],y=S[$];if(Z._color===c||y._color===c)break;var K=S[$-2];if(K.left===Z)if(Z.left===y){var Q=K.right;if(Q&&Q._color===u)Z._color=c,K.right=v(c,Q),K._color=u,$-=1;else{if(K._color=u,K.left=Z.right,Z._color=c,Z.right=K,S[$-2]=Z,S[$-1]=y,h(K),h(Z),$>=3){var J=S[$-3];J.left===K?J.left=Z:J.right=Z}break}}else{var Q=K.right;if(Q&&Q._color===u)Z._color=c,K.right=v(c,Q),K._color=u,$-=1;else{if(Z.right=y.left,K._color=u,K.left=y.right,y._color=c,y.left=Z,y.right=K,S[$-2]=y,S[$-1]=Z,h(K),h(Z),h(y),$>=3){var J=S[$-3];J.left===K?J.left=y:J.right=y}break}}else if(Z.right===y){var Q=K.left;if(Q&&Q._color===u)Z._color=c,K.left=v(c,Q),K._color=u,$-=1;else{if(K._color=u,K.right=Z.left,Z._color=c,Z.left=K,S[$-2]=Z,S[$-1]=y,h(K),h(Z),$>=3){var J=S[$-3];J.right===K?J.right=Z:J.left=Z}break}}else{var Q=K.left;if(Q&&Q._color===u)Z._color=c,K.left=v(c,Q),K._color=u,$-=1;else{if(Z.left=y.right,K._color=u,K.right=y.left,y._color=c,y.right=Z,y.left=K,S[$-2]=y,S[$-1]=Z,h(K),h(Z),h(y),$>=3){var J=S[$-3];J.right===K?J.right=y:J.left=y}break}}}return S[0]._color=c,new m(T,S[0])};function x(k,P){if(P.left){var T=x(k,P.left);if(T)return T}var T=k(P.key,P.value);if(T)return T;if(P.right)return x(k,P.right)}function A(k,P,T,y){var S=P(k,y.key);if(S<=0){if(y.left){var M=A(k,P,T,y.left);if(M)return M}var M=T(y.key,y.value);if(M)return M}if(y.right)return A(k,P,T,y.right)}function E(k,P,T,y,S){var M=T(k,S.key),W=T(P,S.key),$;if(M<=0&&(S.left&&($=E(k,P,T,y,S.left),$)||W>0&&($=y(S.key,S.value),$)))return $;if(W>0&&S.right)return E(k,P,T,y,S.right)}_.forEach=function(P,T,y){if(this.root)switch(arguments.length){case 1:return x(P,this.root);case 2:return A(T,this._compare,P,this.root);case 3:return this._compare(T,y)>=0?void 0:E(T,y,this._compare,P,this.root)}},Object.defineProperty(_,"begin",{get:function(){for(var k=[],P=this.root;P;)k.push(P),P=P.left;return new D(this,k)}}),Object.defineProperty(_,"end",{get:function(){for(var k=[],P=this.root;P;)k.push(P),P=P.right;return new D(this,k)}}),_.at=function(k){if(k<0)return new D(this,[]);for(var P=this.root,T=[];;){if(T.push(P),P.left){if(k<P.left._count){P=P.left;continue}k-=P.left._count}if(!k)return new D(this,T);if(k-=1,P.right){if(k>=P.right._count)break;P=P.right}else break}return new D(this,[])},_.ge=function(k){for(var P=this._compare,T=this.root,y=[],S=0;T;){var M=P(k,T.key);y.push(T),M<=0&&(S=y.length),M<=0?T=T.left:T=T.right}return y.length=S,new D(this,y)},_.gt=function(k){for(var P=this._compare,T=this.root,y=[],S=0;T;){var M=P(k,T.key);y.push(T),M<0&&(S=y.length),M<0?T=T.left:T=T.right}return y.length=S,new D(this,y)},_.lt=function(k){for(var P=this._compare,T=this.root,y=[],S=0;T;){var M=P(k,T.key);y.push(T),M>0&&(S=y.length),M<=0?T=T.left:T=T.right}return y.length=S,new D(this,y)},_.le=function(k){for(var P=this._compare,T=this.root,y=[],S=0;T;){var M=P(k,T.key);y.push(T),M>=0&&(S=y.length),M<0?T=T.left:T=T.right}return y.length=S,new D(this,y)},_.find=function(k){for(var P=this._compare,T=this.root,y=[];T;){var S=P(k,T.key);if(y.push(T),S===0)return new D(this,y);S<=0?T=T.left:T=T.right}return new D(this,[])},_.remove=function(k){var P=this.find(k);return P?P.remove():this},_.get=function(k){for(var P=this._compare,T=this.root;T;){var y=P(k,T.key);if(y===0)return T.value;y<=0?T=T.left:T=T.right}};function D(k,P){this.tree=k,this._stack=P}var g=D.prototype;Object.defineProperty(g,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(g,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),g.clone=function(){return new D(this.tree,this._stack.slice())};function C(k,P){k.key=P.key,k.value=P.value,k.left=P.left,k.right=P.right,k._color=P._color,k._count=P._count}function I(k){for(var P,T,y,S,M=k.length-1;M>=0;--M){if(P=k[M],M===0){P._color=c;return}if(T=k[M-1],T.left===P){if(y=T.right,y.right&&y.right._color===u){if(y=T.right=f(y),S=y.right=f(y.right),T.right=y.left,y.left=T,y.right=S,y._color=T._color,P._color=c,T._color=c,S._color=c,h(T),h(y),M>1){var W=k[M-2];W.left===T?W.left=y:W.right=y}k[M-1]=y;return}else if(y.left&&y.left._color===u){if(y=T.right=f(y),S=y.left=f(y.left),T.right=S.left,y.left=S.right,S.left=T,S.right=y,S._color=T._color,T._color=c,y._color=c,P._color=c,h(T),h(y),h(S),M>1){var W=k[M-2];W.left===T?W.left=S:W.right=S}k[M-1]=S;return}if(y._color===c)if(T._color===u){T._color=c,T.right=v(u,y);return}else{T.right=v(u,y);continue}else{if(y=f(y),T.right=y.left,y.left=T,y._color=T._color,T._color=u,h(T),h(y),M>1){var W=k[M-2];W.left===T?W.left=y:W.right=y}k[M-1]=y,k[M]=T,M+1<k.length?k[M+1]=P:k.push(P),M=M+2}}else{if(y=T.left,y.left&&y.left._color===u){if(y=T.left=f(y),S=y.left=f(y.left),T.left=y.right,y.right=T,y.left=S,y._color=T._color,P._color=c,T._color=c,S._color=c,h(T),h(y),M>1){var W=k[M-2];W.right===T?W.right=y:W.left=y}k[M-1]=y;return}else if(y.right&&y.right._color===u){if(y=T.left=f(y),S=y.right=f(y.right),T.left=S.right,y.right=S.left,S.right=T,S.left=y,S._color=T._color,T._color=c,y._color=c,P._color=c,h(T),h(y),h(S),M>1){var W=k[M-2];W.right===T?W.right=S:W.left=S}k[M-1]=S;return}if(y._color===c)if(T._color===u){T._color=c,T.left=v(u,y);return}else{T.left=v(u,y);continue}else{if(y=f(y),T.left=y.right,y.right=T,y._color=T._color,T._color=u,h(T),h(y),M>1){var W=k[M-2];W.right===T?W.right=y:W.left=y}k[M-1]=y,k[M]=T,M+1<k.length?k[M+1]=P:k.push(P),M=M+2}}}}g.remove=function(){var k=this._stack;if(k.length===0)return this.tree;var P=new Array(k.length),T=k[k.length-1];P[P.length-1]=new p(T._color,T.key,T.value,T.left,T.right,T._count);for(var y=k.length-2;y>=0;--y){var T=k[y];T.left===k[y+1]?P[y]=new p(T._color,T.key,T.value,P[y+1],T.right,T._count):P[y]=new p(T._color,T.key,T.value,T.left,P[y+1],T._count)}if(T=P[P.length-1],T.left&&T.right){var S=P.length;for(T=T.left;T.right;)P.push(T),T=T.right;var M=P[S-1];P.push(new p(T._color,M.key,M.value,T.left,T.right,T._count)),P[S-1].key=T.key,P[S-1].value=T.value;for(var y=P.length-2;y>=S;--y)T=P[y],P[y]=new p(T._color,T.key,T.value,T.left,P[y+1],T._count);P[S-1].left=P[S]}if(T=P[P.length-1],T._color===u){var W=P[P.length-2];W.left===T?W.left=null:W.right===T&&(W.right=null),P.pop();for(var y=0;y<P.length;++y)P[y]._count--;return new m(this.tree._compare,P[0])}else if(T.left||T.right){T.left?C(T,T.left):T.right&&C(T,T.right),T._color=c;for(var y=0;y<P.length-1;++y)P[y]._count--;return new m(this.tree._compare,P[0])}else{if(P.length===1)return new m(this.tree._compare,null);for(var y=0;y<P.length;++y)P[y]._count--;var $=P[P.length-2];I(P),$.left===T?$.left=null:$.right=null}return new m(this.tree._compare,P[0])},Object.defineProperty(g,"key",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(g,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(g,"index",{get:function(){var k=0,P=this._stack;if(P.length===0){var T=this.tree.root;return T?T._count:0}else P[P.length-1].left&&(k=P[P.length-1].left._count);for(var y=P.length-2;y>=0;--y)P[y+1]===P[y].right&&(++k,P[y].left&&(k+=P[y].left._count));return k},enumerable:!0}),g.next=function(){var k=this._stack;if(k.length!==0){var P=k[k.length-1];if(P.right)for(P=P.right;P;)k.push(P),P=P.left;else for(k.pop();k.length>0&&k[k.length-1].right===P;)P=k[k.length-1],k.pop()}},Object.defineProperty(g,"hasNext",{get:function(){var k=this._stack;if(k.length===0)return!1;if(k[k.length-1].right)return!0;for(var P=k.length-1;P>0;--P)if(k[P-1].left===k[P])return!0;return!1}}),g.update=function(k){var P=this._stack;if(P.length===0)throw new Error("Can't update empty node!");var T=new Array(P.length),y=P[P.length-1];T[T.length-1]=new p(y._color,y.key,k,y.left,y.right,y._count);for(var S=P.length-2;S>=0;--S)y=P[S],y.left===P[S+1]?T[S]=new p(y._color,y.key,y.value,T[S+1],y.right,y._count):T[S]=new p(y._color,y.key,y.value,y.left,T[S+1],y._count);return new m(this.tree._compare,T[0])},g.prev=function(){var k=this._stack;if(k.length!==0){var P=k[k.length-1];if(P.left)for(P=P.left;P;)k.push(P),P=P.right;else for(k.pop();k.length>0&&k[k.length-1].left===P;)P=k[k.length-1],k.pop()}},Object.defineProperty(g,"hasPrev",{get:function(){var k=this._stack;if(k.length===0)return!1;if(k[k.length-1].left)return!0;for(var P=k.length-1;P>0;--P)if(k[P-1].right===k[P])return!0;return!1}});function N(k,P){return k<P?-1:k>P?1:0}function F(k){return new m(k||N,null)}}),3837:(function(l,u,c){l.exports=$;var p=c(4935),f=c(501),v=c(5304),h=c(6429),m=c(6444),_=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),x=ArrayBuffer,A=DataView;function E(Z){return x.isView(Z)&&!(Z instanceof A)}function D(Z){return Array.isArray(Z)||E(Z)}function g(Z,K){return Z[0]=K[0],Z[1]=K[1],Z[2]=K[2],Z}function C(Z){this.gl=Z,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=v(Z)}var I=C.prototype;I.update=function(Z){Z=Z||{};function K(he,De,xe){if(xe in Z){var se=Z[xe],Ee=this[xe],Te;(he?D(se)&&D(se[0]):D(se))?this[xe]=Te=[De(se[0]),De(se[1]),De(se[2])]:this[xe]=Te=[De(se),De(se),De(se)];for(var Be=0;Be<3;++Be)if(Te[Be]!==Ee[Be])return!0}return!1}var Q=K.bind(this,!1,Number),J=K.bind(this,!1,Boolean),G=K.bind(this,!1,String),ee=K.bind(this,!0,function(he){if(D(he)){if(he.length===3)return[+he[0],+he[1],+he[2],1];if(he.length===4)return[+he[0],+he[1],+he[2],+he[3]]}return[0,0,0,1]}),re,fe=!1,we=!1;if("bounds"in Z)for(var Oe=Z.bounds,ke=0;ke<2;++ke)for(var Le=0;Le<3;++Le)Oe[ke][Le]!==this.bounds[ke][Le]&&(we=!0),this.bounds[ke][Le]=Oe[ke][Le];if("ticks"in Z){re=Z.ticks,fe=!0,this.autoTicks=!1;for(var ke=0;ke<3;++ke)this.tickSpacing[ke]=0}else Q("tickSpacing")&&(this.autoTicks=!0,we=!0);if(this._firstInit&&("ticks"in Z||"tickSpacing"in Z||(this.autoTicks=!0),we=!0,fe=!0,this._firstInit=!1),we&&this.autoTicks&&(re=m.create(this.bounds,this.tickSpacing),fe=!0),fe){for(var ke=0;ke<3;++ke)re[ke].sort(function(De,xe){return De.x-xe.x});m.equal(re,this.ticks)?fe=!1:this.ticks=re}J("tickEnable"),G("tickFont")&&(fe=!0),G("tickFontStyle")&&(fe=!0),G("tickFontWeight")&&(fe=!0),G("tickFontVariant")&&(fe=!0),Q("tickSize"),Q("tickAngle"),Q("tickPad"),ee("tickColor");var oe=G("labels");G("labelFont")&&(oe=!0),G("labelFontStyle")&&(oe=!0),G("labelFontWeight")&&(oe=!0),G("labelFontVariant")&&(oe=!0),J("labelEnable"),Q("labelSize"),Q("labelPad"),ee("labelColor"),J("lineEnable"),J("lineMirror"),Q("lineWidth"),ee("lineColor"),J("lineTickEnable"),J("lineTickMirror"),Q("lineTickLength"),Q("lineTickWidth"),ee("lineTickColor"),J("gridEnable"),Q("gridWidth"),ee("gridColor"),J("zeroEnable"),ee("zeroLineColor"),Q("zeroLineWidth"),J("backgroundEnable"),ee("backgroundColor");var be=[{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]}],_e=[{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&&(oe||fe)&&this._text.update(this.bounds,this.labels,be,this.ticks,_e):this._text=p(this.gl,this.bounds,this.labels,be,this.ticks,_e),this._lines&&fe&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=f(this.gl,this.bounds,this.ticks))};function N(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var F=[new N,new N,new N];function k(Z,K,Q,J,G){for(var ee=Z.primalOffset,re=Z.primalMinor,fe=Z.mirrorOffset,we=Z.mirrorMinor,Oe=J[K],ke=0;ke<3;++ke)if(K!==ke){var Le=ee,oe=fe,be=re,_e=we;Oe&1<<ke&&(Le=fe,oe=ee,be=we,_e=re),Le[ke]=Q[0][ke],oe[ke]=Q[1][ke],G[ke]>0?(be[ke]=-1,_e[ke]=0):(be[ke]=0,_e[ke]=1)}}var P=[0,0,0],T={model:_,view:_,projection:_,_ortho:!1};I.isOpaque=function(){return!0},I.isTransparent=function(){return!1},I.drawTransparent=function(Z){};var y=0,S=[0,0,0],M=[0,0,0],W=[0,0,0];I.draw=function(Z){Z=Z||T;for(var xe=this.gl,K=Z.model||_,Q=Z.view||_,J=Z.projection||_,G=this.bounds,ee=Z._ortho||!1,re=h(K,Q,J,G,ee),fe=re.cubeEdges,we=re.axis,Oe=Q[12],ke=Q[13],Le=Q[14],oe=Q[15],be=ee?2:1,_e=be*this.pixelRatio*(J[3]*Oe+J[7]*ke+J[11]*Le+J[15]*oe)/xe.drawingBufferHeight,he=0;he<3;++he)this.lastCubeProps.cubeEdges[he]=fe[he],this.lastCubeProps.axis[he]=we[he];for(var De=F,he=0;he<3;++he)k(F[he],he,this.bounds,fe,we);for(var xe=this.gl,se=P,he=0;he<3;++he)this.backgroundEnable[he]?se[he]=we[he]:se[he]=0;this._background.draw(K,Q,J,G,se,this.backgroundColor),this._lines.bind(K,Q,J,this);for(var he=0;he<3;++he){var Ee=[0,0,0];we[he]>0?Ee[he]=G[1][he]:Ee[he]=G[0][he];for(var Te=0;Te<2;++Te){var Be=(he+1+Te)%3,tt=(he+1+(Te^1))%3;this.gridEnable[Be]&&this._lines.drawGrid(Be,tt,this.bounds,Ee,this.gridColor[Be],this.gridWidth[Be]*this.pixelRatio)}for(var Te=0;Te<2;++Te){var Be=(he+1+Te)%3,tt=(he+1+(Te^1))%3;this.zeroEnable[tt]&&Math.min(G[0][tt],G[1][tt])<=0&&Math.max(G[0][tt],G[1][tt])>=0&&this._lines.drawZero(Be,tt,this.bounds,Ee,this.zeroLineColor[tt],this.zeroLineWidth[tt]*this.pixelRatio)}}for(var he=0;he<3;++he){this.lineEnable[he]&&this._lines.drawAxisLine(he,this.bounds,De[he].primalOffset,this.lineColor[he],this.lineWidth[he]*this.pixelRatio),this.lineMirror[he]&&this._lines.drawAxisLine(he,this.bounds,De[he].mirrorOffset,this.lineColor[he],this.lineWidth[he]*this.pixelRatio);for(var at=g(S,De[he].primalMinor),gt=g(M,De[he].mirrorMinor),pt=this.lineTickLength,Te=0;Te<3;++Te){var Rt=_e/K[5*Te];at[Te]*=pt[Te]*Rt,gt[Te]*=pt[Te]*Rt}this.lineTickEnable[he]&&this._lines.drawAxisTicks(he,De[he].primalOffset,at,this.lineTickColor[he],this.lineTickWidth[he]*this.pixelRatio),this.lineTickMirror[he]&&this._lines.drawAxisTicks(he,De[he].mirrorOffset,gt,this.lineTickColor[he],this.lineTickWidth[he]*this.pixelRatio)}this._lines.unbind(),this._text.bind(K,Q,J,this.pixelRatio);var $t,Wt=.5,Ht,Ft;function st(Ut){Ft=[0,0,0],Ft[Ut]=1}function rt(Ut,kr,Pr){var $r=(Ut+1)%3,rn=(Ut+2)%3,kn=kr[$r],Rn=kr[rn],ci=Pr[$r],In=Pr[rn];if(kn>0&&In>0){st($r);return}else if(kn>0&&In<0){st($r);return}else if(kn<0&&In>0){st($r);return}else if(kn<0&&In<0){st($r);return}else if(Rn>0&&ci>0){st(rn);return}else if(Rn>0&&ci<0){st(rn);return}else if(Rn<0&&ci>0){st(rn);return}else if(Rn<0&&ci<0){st(rn);return}}for(var he=0;he<3;++he){for(var Ue=De[he].primalMinor,xt=De[he].mirrorMinor,Gt=g(W,De[he].primalOffset),Te=0;Te<3;++Te)this.lineTickEnable[he]&&(Gt[Te]+=_e*Ue[Te]*Math.max(this.lineTickLength[Te],0)/K[5*Te]);var Jt=[0,0,0];if(Jt[he]=1,this.tickEnable[he]){this.tickAngle[he]===-3600?(this.tickAngle[he]=0,this.tickAlign[he]="auto"):this.tickAlign[he]=-1,Ht=1,$t=[this.tickAlign[he],Wt,Ht],$t[0]==="auto"?$t[0]=y:$t[0]=parseInt(""+$t[0]),Ft=[0,0,0],rt(he,Ue,xt);for(var Te=0;Te<3;++Te)Gt[Te]+=_e*Ue[Te]*this.tickPad[Te]/K[5*Te];this._text.drawTicks(he,this.tickSize[he],this.tickAngle[he],Gt,this.tickColor[he],Jt,Ft,$t)}if(this.labelEnable[he]){Ht=0,Ft=[0,0,0],this.labels[he].length>4&&(st(he),Ht=1),$t=[this.labelAlign[he],Wt,Ht],$t[0]==="auto"?$t[0]=y:$t[0]=parseInt(""+$t[0]);for(var Te=0;Te<3;++Te)Gt[Te]+=_e*Ue[Te]*this.labelPad[Te]/K[5*Te];Gt[he]+=.5*(G[0][he]+G[1][he]),this._text.drawLabel(he,this.labelSize[he],this.labelAngle[he],Gt,this.labelColor[he],[0,0,0],Ft,$t)}}this._text.unbind()},I.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function $(Z,K){var Q=new C(Z);return Q.update(K),Q}}),5304:(function(l,u,c){l.exports=_;var p=c(2762),f=c(8116),v=c(1879).bg;function h(x,A,E,D){this.gl=x,this.buffer=A,this.vao=E,this.shader=D}var m=h.prototype;m.draw=function(x,A,E,D,g,C){for(var I=!1,N=0;N<3;++N)I=I||g[N];if(I){var F=this.gl;F.enable(F.POLYGON_OFFSET_FILL),F.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:x,view:A,projection:E,bounds:D,enable:g,colors:C},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),F.disable(F.POLYGON_OFFSET_FILL)}},m.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function _(x){for(var A=[],E=[],D=0,g=0;g<3;++g)for(var C=(g+1)%3,I=(g+2)%3,N=[0,0,0],F=[0,0,0],k=-1;k<=1;k+=2){E.push(D,D+2,D+1,D+1,D+2,D+3),N[g]=k,F[g]=k;for(var P=-1;P<=1;P+=2){N[C]=P;for(var T=-1;T<=1;T+=2)N[I]=T,A.push(N[0],N[1],N[2],F[0],F[1],F[2]),D+=1}var y=C;C=I,I=y}var S=p(x,new Float32Array(A)),M=p(x,new Uint16Array(E),x.ELEMENT_ARRAY_BUFFER),W=f(x,[{buffer:S,type:x.FLOAT,size:3,offset:0,stride:24},{buffer:S,type:x.FLOAT,size:3,offset:12,stride:24}],M),$=v(x);return $.attributes.position.location=0,$.attributes.normal.location=1,new h(x,S,W,$)}}),6429:(function(l,u,c){l.exports=k;var p=c(8828),f=c(6760),v=c(5202),h=c(3250),m=new Array(16),_=new Array(8),x=new Array(8),A=new Array(3),E=[0,0,0];(function(){for(var P=0;P<8;++P)_[P]=[1,1,1,1],x[P]=[1,1,1]})();function D(P,T,y){for(var S=0;S<4;++S){P[S]=y[12+S];for(var M=0;M<3;++M)P[S]+=T[M]*y[4*M+S]}}var g=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function C(P){for(var T=0;T<g.length;++T)if(P=v.positive(P,g[T]),P.length<3)return 0;for(var y=P[0],S=y[0]/y[3],M=y[1]/y[3],W=0,T=1;T+1<P.length;++T){var $=P[T],Z=P[T+1],K=$[0]/$[3],Q=$[1]/$[3],J=Z[0]/Z[3],G=Z[1]/Z[3],ee=K-S,re=Q-M,fe=J-S,we=G-M;W+=Math.abs(ee*we-re*fe)}return W}var I=[1,1,1],N=[0,0,0],F={cubeEdges:I,axis:N};function k(P,T,y,S,M){f(m,T,P),f(m,y,m);for(var W=0,$=0;$<2;++$){A[2]=S[$][2];for(var Z=0;Z<2;++Z){A[1]=S[Z][1];for(var K=0;K<2;++K)A[0]=S[K][0],D(_[W],A,m),W+=1}}for(var Q=-1,$=0;$<8;++$){for(var J=_[$][3],G=0;G<3;++G)x[$][G]=_[$][G]/J;M&&(x[$][2]*=-1),J<0&&(Q<0||x[$][2]<x[Q][2])&&(Q=$)}if(Q<0){Q=0;for(var ee=0;ee<3;++ee){for(var re=(ee+2)%3,fe=(ee+1)%3,we=-1,Oe=-1,ke=0;ke<2;++ke){var Le=ke<<ee,oe=Le+(ke<<re)+(1-ke<<fe),be=Le+(1-ke<<re)+(ke<<fe);h(x[Le],x[oe],x[be],E)<0||(ke?we=1:Oe=1)}if(we<0||Oe<0){Oe>we&&(Q|=1<<ee);continue}for(var ke=0;ke<2;++ke){var Le=ke<<ee,oe=Le+(ke<<re)+(1-ke<<fe),be=Le+(1-ke<<re)+(ke<<fe),_e=C([_[Le],_[oe],_[be],_[Le+(1<<re)+(1<<fe)]]);ke?we=_e:Oe=_e}if(Oe>we){Q|=1<<ee;continue}}}for(var he=7^Q,De=-1,$=0;$<8;++$)$===Q||$===he||(De<0||x[De][1]>x[$][1])&&(De=$);for(var xe=-1,$=0;$<3;++$){var se=De^1<<$;if(!(se===Q||se===he)){xe<0&&(xe=se);var fe=x[se];fe[0]<x[xe][0]&&(xe=se)}}for(var Ee=-1,$=0;$<3;++$){var se=De^1<<$;if(!(se===Q||se===he||se===xe)){Ee<0&&(Ee=se);var fe=x[se];fe[0]>x[Ee][0]&&(Ee=se)}}var Te=I;Te[0]=Te[1]=Te[2]=0,Te[p.log2(xe^De)]=De&xe,Te[p.log2(De^Ee)]=De&Ee;var Be=Ee^7;Be===Q||Be===he?(Be=xe^7,Te[p.log2(Ee^Be)]=Be&Ee):Te[p.log2(xe^Be)]=Be&xe;for(var tt=N,at=Q,ee=0;ee<3;++ee)at&1<<ee?tt[ee]=-1:tt[ee]=1;return F}}),501:(function(l,u,c){l.exports=I;var p=c(2762),f=c(8116),v=c(1879).n,h=[0,0,0],m=[0,0,0],_=[0,0,0],x=[0,0,0],A=[1,1];function E(N){return N[0]=N[1]=N[2]=0,N}function D(N,F){return N[0]=F[0],N[1]=F[1],N[2]=F[2],N}function g(N,F,k,P,T,y,S,M){this.gl=N,this.vertBuffer=F,this.vao=k,this.shader=P,this.tickCount=T,this.tickOffset=y,this.gridCount=S,this.gridOffset=M}var C=g.prototype;C.bind=function(N,F,k){this.shader.bind(),this.shader.uniforms.model=N,this.shader.uniforms.view=F,this.shader.uniforms.projection=k,A[0]=this.gl.drawingBufferWidth,A[1]=this.gl.drawingBufferHeight,this.shader.uniforms.screenShape=A,this.vao.bind()},C.unbind=function(){this.vao.unbind()},C.drawAxisLine=function(N,F,k,P,T){var y=E(m);this.shader.uniforms.majorAxis=m,y[N]=F[1][N]-F[0][N],this.shader.uniforms.minorAxis=y;var S=D(x,k);S[N]+=F[0][N],this.shader.uniforms.offset=S,this.shader.uniforms.lineWidth=T,this.shader.uniforms.color=P;var M=E(_);M[(N+2)%3]=1,this.shader.uniforms.screenAxis=M,this.vao.draw(this.gl.TRIANGLES,6);var M=E(_);M[(N+1)%3]=1,this.shader.uniforms.screenAxis=M,this.vao.draw(this.gl.TRIANGLES,6)},C.drawAxisTicks=function(N,F,k,P,T){if(this.tickCount[N]){var y=E(h);y[N]=1,this.shader.uniforms.majorAxis=y,this.shader.uniforms.offset=F,this.shader.uniforms.minorAxis=k,this.shader.uniforms.color=P,this.shader.uniforms.lineWidth=T;var S=E(_);S[N]=1,this.shader.uniforms.screenAxis=S,this.vao.draw(this.gl.TRIANGLES,this.tickCount[N],this.tickOffset[N])}},C.drawGrid=function(N,F,k,P,T,y){if(this.gridCount[N]){var S=E(m);S[F]=k[1][F]-k[0][F],this.shader.uniforms.minorAxis=S;var M=D(x,P);M[F]+=k[0][F],this.shader.uniforms.offset=M;var W=E(h);W[N]=1,this.shader.uniforms.majorAxis=W;var $=E(_);$[N]=1,this.shader.uniforms.screenAxis=$,this.shader.uniforms.lineWidth=y,this.shader.uniforms.color=T,this.vao.draw(this.gl.TRIANGLES,this.gridCount[N],this.gridOffset[N])}},C.drawZero=function(N,F,k,P,T,y){var S=E(m);this.shader.uniforms.majorAxis=S,S[N]=k[1][N]-k[0][N],this.shader.uniforms.minorAxis=S;var M=D(x,P);M[N]+=k[0][N],this.shader.uniforms.offset=M;var W=E(_);W[F]=1,this.shader.uniforms.screenAxis=W,this.shader.uniforms.lineWidth=y,this.shader.uniforms.color=T,this.vao.draw(this.gl.TRIANGLES,6)},C.dispose=function(){this.vao.dispose(),this.vertBuffer.dispose(),this.shader.dispose()};function I(N,F,k){var P=[],T=[0,0,0],y=[0,0,0],S=[0,0,0],M=[0,0,0];P.push(0,0,1,0,1,1,0,0,-1,0,0,-1,0,1,1,0,1,-1);for(var W=0;W<3;++W){for(var K=P.length/3|0,$=0;$<k[W].length;++$){var Z=+k[W][$].x;P.push(Z,0,1,Z,1,1,Z,0,-1,Z,0,-1,Z,1,1,Z,1,-1)}var J=P.length/3|0;T[W]=K,y[W]=J-K;for(var K=P.length/3|0,Q=0;Q<k[W].length;++Q){var Z=+k[W][Q].x;P.push(Z,0,1,Z,1,1,Z,0,-1,Z,0,-1,Z,1,1,Z,1,-1)}var J=P.length/3|0;S[W]=K,M[W]=J-K}var G=p(N,new Float32Array(P)),ee=f(N,[{buffer:G,type:N.FLOAT,size:3,stride:0,offset:0}]),re=v(N);return re.attributes.position.location=0,new g(N,G,ee,re,y,T,M,S)}}),1879:(function(l,u,c){var p=c(3236),f=c(9405),v=p([`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);
}
`]),h=p([`precision highp float;
#define GLSLIFY 1

uniform vec4 color;
void main() {
  gl_FragColor = color;
}`]);u.n=function(E){return f(E,v,h,null,[{name:"position",type:"vec3"}])};var m=p([`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);
}
`]),_=p([`precision highp float;
#define GLSLIFY 1

uniform vec4 color;
void main() {
  gl_FragColor = color;
}`]);u.Q=function(E){return f(E,m,_,null,[{name:"position",type:"vec3"}])};var x=p([`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);
}
`]),A=p([`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];
}`]);u.bg=function(E){return f(E,x,A,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}}),4935:(function(l,u,c){l.exports=C;var p=c(2762),f=c(8116),v=c(4359),h=c(1879).Q,m=window||process.global||{},_=m.__TEXT_CACHE||{};m.__TEXT_CACHE={};var x=3;function A(I,N,F,k){this.gl=I,this.shader=N,this.buffer=F,this.vao=k,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var E=A.prototype,D=[0,0];E.bind=function(I,N,F,k){this.vao.bind(),this.shader.bind();var P=this.shader.uniforms;P.model=I,P.view=N,P.projection=F,P.pixelScale=k,D[0]=this.gl.drawingBufferWidth,D[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=D},E.unbind=function(){this.vao.unbind()},E.update=function(I,N,F,k,P){var T=[];function y(ee,re,fe,we,Oe,ke){var Le=[fe.style,fe.weight,fe.variant,fe.family].join("_"),oe=_[Le];oe||(oe=_[Le]={});var be=oe[re];be||(be=oe[re]=g(re,{triangles:!0,font:fe.family,fontStyle:fe.style,fontWeight:fe.weight,fontVariant:fe.variant,textAlign:"center",textBaseline:"middle",lineSpacing:Oe,styletags:ke}));for(var _e=(we||12)/12,he=be.positions,De=be.cells,xe=0,se=De.length;xe<se;++xe)for(var Ee=De[xe],Te=2;Te>=0;--Te){var Be=he[Ee[Te]];T.push(_e*Be[0],-_e*Be[1],ee)}}for(var S=[0,0,0],M=[0,0,0],W=[0,0,0],$=[0,0,0],Z=1.25,K={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},Q=0;Q<3;++Q){W[Q]=T.length/x|0,y(.5*(I[0][Q]+I[1][Q]),N[Q],F[Q],12,Z,K),$[Q]=(T.length/x|0)-W[Q],S[Q]=T.length/x|0;for(var J=0;J<k[Q].length;++J)if(k[Q][J].text){var G={family:k[Q][J].font||P[Q].family,style:P[Q].fontStyle||P[Q].style,weight:P[Q].fontWeight||P[Q].weight,variant:P[Q].fontVariant||P[Q].variant};y(k[Q][J].x,k[Q][J].text,G,k[Q][J].fontSize||12,Z,K)}M[Q]=(T.length/x|0)-S[Q]}this.buffer.update(T),this.tickOffset=S,this.tickCount=M,this.labelOffset=W,this.labelCount=$},E.drawTicks=function(I,N,F,k,P,T,y,S){this.tickCount[I]&&(this.shader.uniforms.axis=T,this.shader.uniforms.color=P,this.shader.uniforms.angle=F,this.shader.uniforms.scale=N,this.shader.uniforms.offset=k,this.shader.uniforms.alignDir=y,this.shader.uniforms.alignOpt=S,this.vao.draw(this.gl.TRIANGLES,this.tickCount[I],this.tickOffset[I]))},E.drawLabel=function(I,N,F,k,P,T,y,S){this.labelCount[I]&&(this.shader.uniforms.axis=T,this.shader.uniforms.color=P,this.shader.uniforms.angle=F,this.shader.uniforms.scale=N,this.shader.uniforms.offset=k,this.shader.uniforms.alignDir=y,this.shader.uniforms.alignOpt=S,this.vao.draw(this.gl.TRIANGLES,this.labelCount[I],this.labelOffset[I]))},E.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()};function g(I,N){try{return v(I,N)}catch(F){return console.warn('error vectorizing text:"'+I+'" error:',F),{cells:[],positions:[]}}}function C(I,N,F,k,P,T){var y=p(I),S=f(I,[{buffer:y,size:3}]),M=h(I);M.attributes.position.location=0;var W=new A(I,M,y,S);return W.update(N,F,k,P,T),W}}),6444:(function(l,u){u.create=p,u.equal=f;function c(v,h){var m=v+"",_=m.indexOf("."),x=0;_>=0&&(x=m.length-_-1);var A=Math.pow(10,x),E=Math.round(v*h*A),D=E+"";if(D.indexOf("e")>=0)return D;var g=E/A,C=E%A;E<0?(g=-Math.ceil(g)|0,C=-C|0):(g=Math.floor(g)|0,C=C|0);var I=""+g;if(E<0&&(I="-"+I),x){for(var N=""+C;N.length<x;)N="0"+N;return I+"."+N}else return I}function p(v,h){for(var m=[],_=0;_<3;++_){var x=[];.5*(v[0][_]+v[1][_]);for(var A=0;A*h[_]<=v[1][_];++A)x.push({x:A*h[_],text:c(h[_],A)});for(var A=-1;A*h[_]>=v[0][_];--A)x.push({x:A*h[_],text:c(h[_],A)});m.push(x)}return m}function f(v,h){for(var m=0;m<3;++m){if(v[m].length!==h[m].length)return!1;for(var _=0;_<v[m].length;++_){var x=v[m][_],A=h[m][_];if(x.x!==A.x||x.text!==A.text||x.font!==A.font||x.fontColor!==A.fontColor||x.fontSize!==A.fontSize||x.dx!==A.dx||x.dy!==A.dy)return!1}}return!0}}),5445:(function(l,u,c){l.exports=F;var p=c(5033),f=c(5202),v=c(6429),h=c(6760),m=c(5665),_=c(5352),x=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),A=new Float32Array(16);function E(k,P,T){this.lo=k,this.hi=P,this.pixelsPerDataUnit=T}var D=[0,0,0,1],g=[0,0,0,1];function C(k,P,T,y,S){for(var M=0;M<3;++M){for(var W=D,$=g,Z=0;Z<3;++Z)$[Z]=W[Z]=T[Z];$[3]=W[3]=1,$[M]+=1,_($,$,P),$[3]<0&&(k[M]=1/0),W[M]-=1,_(W,W,P),W[3]<0&&(k[M]=1/0);var K=(W[0]/W[3]-$[0]/$[3])*y,Q=(W[1]/W[3]-$[1]/$[3])*S;k[M]=.25*Math.sqrt(K*K+Q*Q)}return k}var I=[new E(1/0,-1/0,1/0),new E(1/0,-1/0,1/0),new E(1/0,-1/0,1/0)],N=[0,0,0];function F(k,P,T,y,Q){var M=P.model||x,W=P.view||x,$=P.projection||x,Z=P._ortho||!1,K=k.bounds,Q=Q||v(M,W,$,K,Z),J=Q.axis;h(A,W,M),h(A,$,A);for(var G=I,ee=0;ee<3;++ee)G[ee].lo=1/0,G[ee].hi=-1/0,G[ee].pixelsPerDataUnit=1/0;var re=p(m(A,A));m(A,A);for(var fe=0;fe<3;++fe){var we=(fe+1)%3,Oe=(fe+2)%3,ke=N;e:for(var ee=0;ee<2;++ee){var Le=[];if(J[fe]<0!=!!ee){ke[fe]=K[ee][fe];for(var oe=0;oe<2;++oe){ke[we]=K[oe^ee][we];for(var be=0;be<2;++be)ke[Oe]=K[be^oe^ee][Oe],Le.push(ke.slice())}for(var _e=Z?5:4,oe=_e;oe===_e;++oe){if(Le.length===0)continue e;Le=f.positive(Le,re[oe])}for(var oe=0;oe<Le.length;++oe)for(var Oe=Le[oe],he=C(N,A,Oe,T,y),be=0;be<3;++be)G[be].lo=Math.min(G[be].lo,Oe[be]),G[be].hi=Math.max(G[be].hi,Oe[be]),be!==fe&&(G[be].pixelsPerDataUnit=Math.min(G[be].pixelsPerDataUnit,Math.abs(he[be])))}}}return G}}),2762:(function(l,u,c){var p=c(1888),f=c(5298),v=c(9618),h=["uint8","uint8_clamped","uint16","uint32","int8","int16","int32","float32"];function m(g,C,I,N,F){this.gl=g,this.type=C,this.handle=I,this.length=N,this.usage=F}var _=m.prototype;_.bind=function(){this.gl.bindBuffer(this.type,this.handle)},_.unbind=function(){this.gl.bindBuffer(this.type,null)},_.dispose=function(){this.gl.deleteBuffer(this.handle)};function x(g,C,I,N,F,k){var P=F.length*F.BYTES_PER_ELEMENT;if(k<0)return g.bufferData(C,F,N),P;if(P+k>I)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return g.bufferSubData(C,k,F),I}function A(g,C){for(var I=p.malloc(g.length,C),N=g.length,F=0;F<N;++F)I[F]=g[F];return I}function E(g,C){for(var I=1,N=C.length-1;N>=0;--N){if(C[N]!==I)return!1;I*=g[N]}return!0}_.update=function(g,C){if(typeof C!="number"&&(C=-1),this.bind(),typeof g=="object"&&typeof g.shape<"u"){var I=g.dtype;if(h.indexOf(I)<0&&(I="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var N=gl.getExtension("OES_element_index_uint");N&&I!=="uint16"?I="uint32":I="uint16"}if(I===g.dtype&&E(g.shape,g.stride))g.offset===0&&g.data.length===g.shape[0]?this.length=x(this.gl,this.type,this.length,this.usage,g.data,C):this.length=x(this.gl,this.type,this.length,this.usage,g.data.subarray(g.offset,g.shape[0]),C);else{var F=p.malloc(g.size,I),k=v(F,g.shape);f.assign(k,g),C<0?this.length=x(this.gl,this.type,this.length,this.usage,F,C):this.length=x(this.gl,this.type,this.length,this.usage,F.subarray(0,g.size),C),p.free(F)}}else if(Array.isArray(g)){var P;this.type===this.gl.ELEMENT_ARRAY_BUFFER?P=A(g,"uint16"):P=A(g,"float32"),C<0?this.length=x(this.gl,this.type,this.length,this.usage,P,C):this.length=x(this.gl,this.type,this.length,this.usage,P.subarray(0,g.length),C),p.free(P)}else if(typeof g=="object"&&typeof g.length=="number")this.length=x(this.gl,this.type,this.length,this.usage,g,C);else if(typeof g=="number"||g===void 0){if(C>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");g=g|0,g<=0&&(g=1),this.gl.bufferData(this.type,g|0,this.usage),this.length=g}else throw new Error("gl-buffer: Invalid data type")};function D(g,C,I,N){if(I=I||g.ARRAY_BUFFER,N=N||g.DYNAMIC_DRAW,I!==g.ARRAY_BUFFER&&I!==g.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(N!==g.DYNAMIC_DRAW&&N!==g.STATIC_DRAW&&N!==g.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var F=g.createBuffer(),k=new m(g,I,F,0,N);return k.update(C),k}l.exports=D}),6405:(function(l,u,c){var p=c(2931);l.exports=function(v,h){var m=v.positions,_=v.vectors,x={positions:[],vertexIntensity:[],vertexIntensityBounds:v.vertexIntensityBounds,vectors:[],cells:[],coneOffset:v.coneOffset,colormap:v.colormap};if(v.positions.length===0)return h&&(h[0]=[0,0,0],h[1]=[0,0,0]),x;for(var A=0,E=1/0,D=-1/0,g=1/0,C=-1/0,I=1/0,N=-1/0,F=null,k=null,P=[],T=1/0,y=!1,S=v.coneSizemode==="raw",M=0;M<m.length;M++){var W=m[M];E=Math.min(W[0],E),D=Math.max(W[0],D),g=Math.min(W[1],g),C=Math.max(W[1],C),I=Math.min(W[2],I),N=Math.max(W[2],N);var $=_[M];if(p.length($)>A&&(A=p.length($)),M&&!S){var Z=2*p.distance(F,W)/(p.length(k)+p.length($));Z?(T=Math.min(T,Z),y=!1):y=!0}y||(F=W,k=$),P.push($)}var K=[E,g,I],Q=[D,C,N];h&&(h[0]=K,h[1]=Q),A===0&&(A=1);var J=1/A;isFinite(T)||(T=1),x.vectorScale=T;var G=v.coneSize||(S?1:.5);v.absoluteConeSize&&(G=v.absoluteConeSize*J),x.coneScale=G;for(var M=0,ee=0;M<m.length;M++)for(var W=m[M],re=W[0],fe=W[1],we=W[2],Oe=P[M],ke=p.length(Oe)*J,Le=0,oe=8;Le<oe;Le++){x.positions.push([re,fe,we,ee++]),x.positions.push([re,fe,we,ee++]),x.positions.push([re,fe,we,ee++]),x.positions.push([re,fe,we,ee++]),x.positions.push([re,fe,we,ee++]),x.positions.push([re,fe,we,ee++]),x.vectors.push(Oe),x.vectors.push(Oe),x.vectors.push(Oe),x.vectors.push(Oe),x.vectors.push(Oe),x.vectors.push(Oe),x.vertexIntensity.push(ke,ke,ke),x.vertexIntensity.push(ke,ke,ke);var be=x.positions.length;x.cells.push([be-6,be-5,be-4],[be-3,be-2,be-1])}return x};var f=c(614);l.exports.createMesh=c(9060),l.exports.createConeMesh=function(v,h){return l.exports.createMesh(v,h,{shaders:f,traceType:"cone"})}}),9060:(function(l,u,c){var p=c(9405),f=c(2762),v=c(8116),h=c(7766),m=c(6760),_=c(7608),x=c(9618),A=c(6729),E=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function D(P,T,y,S,M,W,$,Z,K,Q,J){this.gl=P,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=T,this.dirty=!0,this.triShader=y,this.pickShader=S,this.trianglePositions=M,this.triangleVectors=W,this.triangleColors=Z,this.triangleUVs=K,this.triangleIds=$,this.triangleVAO=Q,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=J,this.tubeScale=1,this.coneScale=2,this.vectorScale=1,this.coneOffset=.25,this._model=E,this._view=E,this._projection=E,this._resolution=[1,1]}var g=D.prototype;g.isOpaque=function(){return this.opacity>=1},g.isTransparent=function(){return this.opacity<1},g.pickSlots=1,g.setPickBase=function(P){this.pickId=P};function C(P){for(var T=A({colormap:P,nshades:256,format:"rgba"}),y=new Uint8Array(256*4),S=0;S<256;++S){for(var M=T[S],W=0;W<3;++W)y[4*S+W]=M[W];y[4*S+3]=M[3]*255}return x(y,[256,256,4],[4,0,1])}function I(P){for(var T=P.length,y=new Array(T),S=0;S<T;++S)y[S]=P[S][2];return y}g.update=function(P){P=P||{};var T=this.gl;this.dirty=!0,"lightPosition"in P&&(this.lightPosition=P.lightPosition),"opacity"in P&&(this.opacity=P.opacity),"ambient"in P&&(this.ambientLight=P.ambient),"diffuse"in P&&(this.diffuseLight=P.diffuse),"specular"in P&&(this.specularLight=P.specular),"roughness"in P&&(this.roughness=P.roughness),"fresnel"in P&&(this.fresnel=P.fresnel),P.tubeScale!==void 0&&(this.tubeScale=P.tubeScale),P.vectorScale!==void 0&&(this.vectorScale=P.vectorScale),P.coneScale!==void 0&&(this.coneScale=P.coneScale),P.coneOffset!==void 0&&(this.coneOffset=P.coneOffset),P.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=T.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=T.LINEAR,this.texture.setPixels(C(P.colormap)),this.texture.generateMipmap());var y=P.cells,S=P.positions,M=P.vectors;if(!(!S||!y||!M)){var W=[],$=[],Z=[],K=[],Q=[];this.cells=y,this.positions=S,this.vectors=M;var J=P.meshColor||[1,1,1,1],G=P.vertexIntensity,ee=1/0,re=-1/0;if(G)if(P.vertexIntensityBounds)ee=+P.vertexIntensityBounds[0],re=+P.vertexIntensityBounds[1];else for(var fe=0;fe<G.length;++fe){var we=G[fe];ee=Math.min(ee,we),re=Math.max(re,we)}else for(var fe=0;fe<S.length;++fe){var we=S[fe][2];ee=Math.min(ee,we),re=Math.max(re,we)}G?this.intensity=G:this.intensity=I(S),this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(var fe=0;fe<S.length;++fe)for(var Oe=S[fe],ke=0;ke<3;++ke)isNaN(Oe[ke])||!isFinite(Oe[ke])||(this.bounds[0][ke]=Math.min(this.bounds[0][ke],Oe[ke]),this.bounds[1][ke]=Math.max(this.bounds[1][ke],Oe[ke]));var Le=0;e:for(var fe=0;fe<y.length;++fe){var oe=y[fe];switch(oe.length){case 3:for(var ke=0;ke<3;++ke)for(var be=oe[ke],Oe=S[be],_e=0;_e<3;++_e)if(isNaN(Oe[_e])||!isFinite(Oe[_e]))continue e;for(var ke=0;ke<3;++ke){var be=oe[2-ke],Oe=S[be];W.push(Oe[0],Oe[1],Oe[2],Oe[3]);var he=M[be];$.push(he[0],he[1],he[2],he[3]||0);var De=J;De.length===3?Z.push(De[0],De[1],De[2],1):Z.push(De[0],De[1],De[2],De[3]);var xe;G?xe=[(G[be]-ee)/(re-ee),0]:xe=[(Oe[2]-ee)/(re-ee),0],K.push(xe[0],xe[1]),Q.push(fe)}Le+=1;break}}this.triangleCount=Le,this.trianglePositions.update(W),this.triangleVectors.update($),this.triangleColors.update(Z),this.triangleUVs.update(K),this.triangleIds.update(new Uint32Array(Q))}},g.drawTransparent=g.draw=function(P){P=P||{};for(var T=this.gl,y=P.model||E,S=P.view||E,M=P.projection||E,W=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],$=0;$<3;++$)W[0][$]=Math.max(W[0][$],this.clipBounds[0][$]),W[1][$]=Math.min(W[1][$],this.clipBounds[1][$]);var Z={model:y,view:S,projection:M,inverseModel:E.slice(),clipBounds:W,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};Z.inverseModel=_(Z.inverseModel,Z.model),T.disable(T.CULL_FACE),this.texture.bind(0);var K=new Array(16);m(K,Z.view,Z.model),m(K,Z.projection,K),_(K,K);for(var $=0;$<3;++$)Z.eyePosition[$]=K[12+$]/K[15];for(var Q=K[15],$=0;$<3;++$)Q+=this.lightPosition[$]*K[4*$+3];for(var $=0;$<3;++$){for(var J=K[12+$],G=0;G<3;++G)J+=K[4*G+$]*this.lightPosition[G];Z.lightPosition[$]=J/Q}if(this.triangleCount>0){var ee=this.triShader;ee.bind(),ee.uniforms=Z,this.triangleVAO.bind(),T.drawArrays(T.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},g.drawPick=function(P){P=P||{};for(var T=this.gl,y=P.model||E,S=P.view||E,M=P.projection||E,W=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],$=0;$<3;++$)W[0][$]=Math.max(W[0][$],this.clipBounds[0][$]),W[1][$]=Math.min(W[1][$],this.clipBounds[1][$]);this._model=[].slice.call(y),this._view=[].slice.call(S),this._projection=[].slice.call(M),this._resolution=[T.drawingBufferWidth,T.drawingBufferHeight];var Z={model:y,view:S,projection:M,clipBounds:W,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},K=this.pickShader;K.bind(),K.uniforms=Z,this.triangleCount>0&&(this.triangleVAO.bind(),T.drawArrays(T.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},g.pick=function(P){if(!P||P.id!==this.pickId)return null;var T=P.value[0]+256*P.value[1]+65536*P.value[2],y=this.cells[T],S=this.positions[y[1]].slice(0,3),M={position:S,dataCoordinate:S,index:Math.floor(y[1]/48)};return this.traceType==="cone"?M.index=Math.floor(y[1]/48):this.traceType==="streamtube"&&(M.intensity=this.intensity[y[1]],M.velocity=this.vectors[y[1]].slice(0,3),M.divergence=this.vectors[y[1]][3],M.index=T),M},g.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()};function N(P,T){var y=p(P,T.meshShader.vertex,T.meshShader.fragment,null,T.meshShader.attributes);return y.attributes.position.location=0,y.attributes.color.location=2,y.attributes.uv.location=3,y.attributes.vector.location=4,y}function F(P,T){var y=p(P,T.pickShader.vertex,T.pickShader.fragment,null,T.pickShader.attributes);return y.attributes.position.location=0,y.attributes.id.location=1,y.attributes.vector.location=4,y}function k(P,T,y){var S=y.shaders;arguments.length===1&&(T=P,P=T.gl);var M=N(P,S),W=F(P,S),$=h(P,x(new Uint8Array([255,255,255,255]),[1,1,4]));$.generateMipmap(),$.minFilter=P.LINEAR_MIPMAP_LINEAR,$.magFilter=P.LINEAR;var Z=f(P),K=f(P),Q=f(P),J=f(P),G=f(P),ee=v(P,[{buffer:Z,type:P.FLOAT,size:4},{buffer:G,type:P.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:Q,type:P.FLOAT,size:4},{buffer:J,type:P.FLOAT,size:2},{buffer:K,type:P.FLOAT,size:4}]),re=new D(P,$,M,W,Z,K,G,Q,J,ee,y.traceType||"cone");return re.update(T),re}l.exports=k}),614:(function(l,u,c){var p=c(3236),f=p([`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;
}
`]),v=p([`#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;
}
`]),h=p([`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;
}
`]),m=p([`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);
}`]);u.meshShader={vertex:f,fragment:v,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},u.pickShader={vertex:h,fragment:m,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}}),737:(function(l){l.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}}),5171:(function(l,u,c){var p=c(737);l.exports=function(v){return p[v]}}),9165:(function(l,u,c){l.exports=D;var p=c(2762),f=c(8116),v=c(3436),h=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function m(g,C,I,N){this.gl=g,this.shader=N,this.buffer=C,this.vao=I,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 _=m.prototype;_.isOpaque=function(){return!this.hasAlpha},_.isTransparent=function(){return this.hasAlpha},_.drawTransparent=_.draw=function(g){var C=this.gl,I=this.shader.uniforms;this.shader.bind();var N=I.view=g.view||h,F=I.projection=g.projection||h;I.model=g.model||h,I.clipBounds=this.clipBounds,I.opacity=this.opacity;var k=N[12],P=N[13],T=N[14],y=N[15],S=g._ortho||!1,M=S?2:1,W=M*this.pixelRatio*(F[3]*k+F[7]*P+F[11]*T+F[15]*y)/C.drawingBufferHeight;this.vao.bind();for(var $=0;$<3;++$)C.lineWidth(this.lineWidth[$]*this.pixelRatio),I.capSize=this.capSize[$]*W,this.lineCount[$]&&C.drawArrays(C.LINES,this.lineOffset[$],this.lineCount[$]);this.vao.unbind()};function x(g,C){for(var I=0;I<3;++I)g[0][I]=Math.min(g[0][I],C[I]),g[1][I]=Math.max(g[1][I],C[I])}var A=(function(){for(var g=new Array(3),C=0;C<3;++C){for(var I=[],N=1;N<=2;++N)for(var F=-1;F<=1;F+=2){var k=(N+C)%3,P=[0,0,0];P[k]=F,I.push(P)}g[C]=I}return g})();function E(g,C,I,N){for(var F=A[N],k=0;k<F.length;++k){var P=F[k];g.push(C[0],C[1],C[2],I[0],I[1],I[2],I[3],P[0],P[1],P[2])}return F.length}_.update=function(g){g=g||{},"lineWidth"in g&&(this.lineWidth=g.lineWidth,Array.isArray(this.lineWidth)||(this.lineWidth=[this.lineWidth,this.lineWidth,this.lineWidth])),"capSize"in g&&(this.capSize=g.capSize,Array.isArray(this.capSize)||(this.capSize=[this.capSize,this.capSize,this.capSize])),this.hasAlpha=!1,"opacity"in g&&(this.opacity=+g.opacity,this.opacity<1&&(this.hasAlpha=!0));var C=g.color||[[0,0,0],[0,0,0],[0,0,0]],I=g.position,N=g.error;if(Array.isArray(C[0])||(C=[C,C,C]),I&&N){var F=[],k=I.length,P=0;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.lineCount=[0,0,0];for(var T=0;T<3;++T){this.lineOffset[T]=P;e:for(var y=0;y<k;++y){for(var S=I[y],M=0;M<3;++M)if(isNaN(S[M])||!isFinite(S[M]))continue e;var W=N[y],$=C[T];if(Array.isArray($[0])&&($=C[y]),$.length===3?$=[$[0],$[1],$[2],1]:$.length===4&&($=[$[0],$[1],$[2],$[3]],!this.hasAlpha&&$[3]<1&&(this.hasAlpha=!0)),!(isNaN(W[0][T])||isNaN(W[1][T]))){if(W[0][T]<0){var Z=S.slice();Z[T]+=W[0][T],F.push(S[0],S[1],S[2],$[0],$[1],$[2],$[3],0,0,0,Z[0],Z[1],Z[2],$[0],$[1],$[2],$[3],0,0,0),x(this.bounds,Z),P+=2+E(F,Z,$,T)}if(W[1][T]>0){var Z=S.slice();Z[T]+=W[1][T],F.push(S[0],S[1],S[2],$[0],$[1],$[2],$[3],0,0,0,Z[0],Z[1],Z[2],$[0],$[1],$[2],$[3],0,0,0),x(this.bounds,Z),P+=2+E(F,Z,$,T)}}}this.lineCount[T]=P-this.lineOffset[T]}this.buffer.update(F)}},_.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function D(g){var C=g.gl,I=p(C),N=f(C,[{buffer:I,type:C.FLOAT,size:3,offset:0,stride:40},{buffer:I,type:C.FLOAT,size:4,offset:12,stride:40},{buffer:I,type:C.FLOAT,size:3,offset:28,stride:40}]),F=v(C);F.attributes.position.location=0,F.attributes.color.location=1,F.attributes.offset.location=2;var k=new m(C,I,N,F);return k.update(g),k}}),3436:(function(l,u,c){var p=c(3236),f=c(9405),v=p([`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;
}`]),h=p([`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;
}`]);l.exports=function(m){return f(m,v,h,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}}),2260:(function(l,u,c){var p=c(7766);l.exports=P;var f=null,v,h,m,_;function x(T){var y=T.getParameter(T.FRAMEBUFFER_BINDING),S=T.getParameter(T.RENDERBUFFER_BINDING),M=T.getParameter(T.TEXTURE_BINDING_2D);return[y,S,M]}function A(T,y){T.bindFramebuffer(T.FRAMEBUFFER,y[0]),T.bindRenderbuffer(T.RENDERBUFFER,y[1]),T.bindTexture(T.TEXTURE_2D,y[2])}function E(T,y){var S=T.getParameter(y.MAX_COLOR_ATTACHMENTS_WEBGL);f=new Array(S+1);for(var M=0;M<=S;++M){for(var W=new Array(S),$=0;$<M;++$)W[$]=T.COLOR_ATTACHMENT0+$;for(var $=M;$<S;++$)W[$]=T.NONE;f[M]=W}}function D(T){switch(T){case v:throw new Error("gl-fbo: Framebuffer unsupported");case h:throw new Error("gl-fbo: Framebuffer incomplete attachment");case m:throw new Error("gl-fbo: Framebuffer incomplete dimensions");case _:throw new Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw new Error("gl-fbo: Framebuffer failed for unspecified reason")}}function g(T,y,S,M,W,$){if(!M)return null;var Z=p(T,y,S,W,M);return Z.magFilter=T.NEAREST,Z.minFilter=T.NEAREST,Z.mipSamples=1,Z.bind(),T.framebufferTexture2D(T.FRAMEBUFFER,$,T.TEXTURE_2D,Z.handle,0),Z}function C(T,y,S,M,W){var $=T.createRenderbuffer();return T.bindRenderbuffer(T.RENDERBUFFER,$),T.renderbufferStorage(T.RENDERBUFFER,M,y,S),T.framebufferRenderbuffer(T.FRAMEBUFFER,W,T.RENDERBUFFER,$),$}function I(T){var y=x(T.gl),S=T.gl,M=T.handle=S.createFramebuffer(),W=T._shape[0],$=T._shape[1],Z=T.color.length,K=T._ext,Q=T._useStencil,J=T._useDepth,G=T._colorType;S.bindFramebuffer(S.FRAMEBUFFER,M);for(var ee=0;ee<Z;++ee)T.color[ee]=g(S,W,$,G,S.RGBA,S.COLOR_ATTACHMENT0+ee);Z===0?(T._color_rb=C(S,W,$,S.RGBA4,S.COLOR_ATTACHMENT0),K&&K.drawBuffersWEBGL(f[0])):Z>1&&K.drawBuffersWEBGL(f[Z]);var re=S.getExtension("WEBGL_depth_texture");re?Q?T.depth=g(S,W,$,re.UNSIGNED_INT_24_8_WEBGL,S.DEPTH_STENCIL,S.DEPTH_STENCIL_ATTACHMENT):J&&(T.depth=g(S,W,$,S.UNSIGNED_SHORT,S.DEPTH_COMPONENT,S.DEPTH_ATTACHMENT)):J&&Q?T._depth_rb=C(S,W,$,S.DEPTH_STENCIL,S.DEPTH_STENCIL_ATTACHMENT):J?T._depth_rb=C(S,W,$,S.DEPTH_COMPONENT16,S.DEPTH_ATTACHMENT):Q&&(T._depth_rb=C(S,W,$,S.STENCIL_INDEX,S.STENCIL_ATTACHMENT));var fe=S.checkFramebufferStatus(S.FRAMEBUFFER);if(fe!==S.FRAMEBUFFER_COMPLETE){T._destroyed=!0,S.bindFramebuffer(S.FRAMEBUFFER,null),S.deleteFramebuffer(T.handle),T.handle=null,T.depth&&(T.depth.dispose(),T.depth=null),T._depth_rb&&(S.deleteRenderbuffer(T._depth_rb),T._depth_rb=null);for(var ee=0;ee<T.color.length;++ee)T.color[ee].dispose(),T.color[ee]=null;T._color_rb&&(S.deleteRenderbuffer(T._color_rb),T._color_rb=null),A(S,y),D(fe)}A(S,y)}function N(T,y,S,M,W,$,Z,K){this.gl=T,this._shape=[y|0,S|0],this._destroyed=!1,this._ext=K,this.color=new Array(W);for(var Q=0;Q<W;++Q)this.color[Q]=null;this._color_rb=null,this.depth=null,this._depth_rb=null,this._colorType=M,this._useDepth=$,this._useStencil=Z;var J=this,G=[y|0,S|0];Object.defineProperties(G,{0:{get:function(){return J._shape[0]},set:function(ee){return J.width=ee}},1:{get:function(){return J._shape[1]},set:function(ee){return J.height=ee}}}),this._shapeVector=G,I(this)}var F=N.prototype;function k(T,y,S){if(T._destroyed)throw new Error("gl-fbo: Can't resize destroyed FBO");if(!(T._shape[0]===y&&T._shape[1]===S)){var M=T.gl,W=M.getParameter(M.MAX_RENDERBUFFER_SIZE);if(y<0||y>W||S<0||S>W)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");T._shape[0]=y,T._shape[1]=S;for(var $=x(M),Z=0;Z<T.color.length;++Z)T.color[Z].shape=T._shape;T._color_rb&&(M.bindRenderbuffer(M.RENDERBUFFER,T._color_rb),M.renderbufferStorage(M.RENDERBUFFER,M.RGBA4,T._shape[0],T._shape[1])),T.depth&&(T.depth.shape=T._shape),T._depth_rb&&(M.bindRenderbuffer(M.RENDERBUFFER,T._depth_rb),T._useDepth&&T._useStencil?M.renderbufferStorage(M.RENDERBUFFER,M.DEPTH_STENCIL,T._shape[0],T._shape[1]):T._useDepth?M.renderbufferStorage(M.RENDERBUFFER,M.DEPTH_COMPONENT16,T._shape[0],T._shape[1]):T._useStencil&&M.renderbufferStorage(M.RENDERBUFFER,M.STENCIL_INDEX,T._shape[0],T._shape[1])),M.bindFramebuffer(M.FRAMEBUFFER,T.handle);var K=M.checkFramebufferStatus(M.FRAMEBUFFER);K!==M.FRAMEBUFFER_COMPLETE&&(T.dispose(),A(M,$),D(K)),A(M,$)}}Object.defineProperties(F,{shape:{get:function(){return this._destroyed?[0,0]:this._shapeVector},set:function(T){if(Array.isArray(T)||(T=[T|0,T|0]),T.length!==2)throw new Error("gl-fbo: Shape vector must be length 2");var y=T[0]|0,S=T[1]|0;return k(this,y,S),[y,S]},enumerable:!1},width:{get:function(){return this._destroyed?0:this._shape[0]},set:function(T){return T=T|0,k(this,T,this._shape[1]),T},enumerable:!1},height:{get:function(){return this._destroyed?0:this._shape[1]},set:function(T){return T=T|0,k(this,this._shape[0],T),T},enumerable:!1}}),F.bind=function(){if(!this._destroyed){var T=this.gl;T.bindFramebuffer(T.FRAMEBUFFER,this.handle),T.viewport(0,0,this._shape[0],this._shape[1])}},F.dispose=function(){if(!this._destroyed){this._destroyed=!0;var T=this.gl;T.deleteFramebuffer(this.handle),this.handle=null,this.depth&&(this.depth.dispose(),this.depth=null),this._depth_rb&&(T.deleteRenderbuffer(this._depth_rb),this._depth_rb=null);for(var y=0;y<this.color.length;++y)this.color[y].dispose(),this.color[y]=null;this._color_rb&&(T.deleteRenderbuffer(this._color_rb),this._color_rb=null)}};function P(T,y,S,M){v||(v=T.FRAMEBUFFER_UNSUPPORTED,h=T.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,m=T.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,_=T.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var W=T.getExtension("WEBGL_draw_buffers");if(!f&&W&&E(T,W),Array.isArray(y)&&(M=S,S=y[1]|0,y=y[0]|0),typeof y!="number")throw new Error("gl-fbo: Missing shape parameter");var $=T.getParameter(T.MAX_RENDERBUFFER_SIZE);if(y<0||y>$||S<0||S>$)throw new Error("gl-fbo: Parameters are too large for FBO");M=M||{};var Z=1;if("color"in M){if(Z=Math.max(M.color|0,0),Z<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(Z>1)if(W){if(Z>T.getParameter(W.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+Z+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var K=T.UNSIGNED_BYTE,Q=T.getExtension("OES_texture_float");if(M.float&&Z>0){if(!Q)throw new Error("gl-fbo: Context does not support floating point textures");K=T.FLOAT}else M.preferFloat&&Z>0&&Q&&(K=T.FLOAT);var J=!0;"depth"in M&&(J=!!M.depth);var G=!1;return"stencil"in M&&(G=!!M.stencil),new N(T,y,S,K,Z,J,G,W)}}),2992:(function(l,u,c){var p=c(3387).sprintf,f=c(5171),v=c(1848),h=c(1085);l.exports=m;function m(_,x,A){var E=v(x)||"of unknown name (see npm glsl-shader-name)",D="unknown type";A!==void 0&&(D=A===f.FRAGMENT_SHADER?"fragment":"vertex");for(var g=p(`Error compiling %s shader %s:
`,D,E),C=p("%s%s",g,_),I=_.split(`
`),N={},F=0;F<I.length;F++){var k=I[F];if(!(k===""||k==="\0")){var P=parseInt(k.split(":")[2]);if(isNaN(P))throw new Error(p("Could not parse error: %s",k));N[P]=k}}for(var T=h(x).split(`
`),F=0;F<T.length;F++)if(!(!N[F+3]&&!N[F+2]&&!N[F+1])){var y=T[F];if(g+=y+`
`,N[F+1]){var S=N[F+1];S=S.substr(S.split(":",3).join(":").length+1).trim(),g+=p(`^^^ %s

`,S)}}return{long:g.trim(),short:C.trim()}}}),7319:(function(l,u,c){var p=c(3236),f=c(9405),v=p([`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;
}
`]),h=p([`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;
}
`]),m=p([`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);
}`]),_=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];u.createShader=function(x){return f(x,v,h,null,_)},u.createPickShader=function(x){return f(x,v,m,null,_)}}),5714:(function(l,u,c){l.exports=T;var p=c(2762),f=c(8116),v=c(7766),h=new Uint8Array(4),m=new Float32Array(h.buffer);function _(y,S,M,W){return h[0]=W,h[1]=M,h[2]=S,h[3]=y,m[0]}var x=c(2478),A=c(9618),E=c(7319),D=E.createShader,g=E.createPickShader,C=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function I(y,S){for(var M=0,W=0;W<3;++W){var $=y[W]-S[W];M+=$*$}return Math.sqrt(M)}function N(y){for(var S=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],M=0;M<3;++M)S[0][M]=Math.max(y[0][M],S[0][M]),S[1][M]=Math.min(y[1][M],S[1][M]);return S}function F(y,S,M,W){this.arcLength=y,this.position=S,this.index=M,this.dataCoordinate=W}function k(y,S,M,W,$,Z){this.gl=y,this.shader=S,this.pickShader=M,this.buffer=W,this.vao=$,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=Z,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var P=k.prototype;P.isTransparent=function(){return this.hasAlpha},P.isOpaque=function(){return!this.hasAlpha},P.pickSlots=1,P.setPickBase=function(y){this.pickId=y},P.drawTransparent=P.draw=function(y){if(this.vertexCount){var S=this.gl,M=this.shader,W=this.vao;M.bind(),M.uniforms={model:y.model||C,view:y.view||C,projection:y.projection||C,clipBounds:N(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[S.drawingBufferWidth,S.drawingBufferHeight],pixelRatio:this.pixelRatio},W.bind(),W.draw(S.TRIANGLE_STRIP,this.vertexCount),W.unbind()}},P.drawPick=function(y){if(this.vertexCount){var S=this.gl,M=this.pickShader,W=this.vao;M.bind(),M.uniforms={model:y.model||C,view:y.view||C,projection:y.projection||C,pickId:this.pickId,clipBounds:N(this.clipBounds),screenShape:[S.drawingBufferWidth,S.drawingBufferHeight],pixelRatio:this.pixelRatio},W.bind(),W.draw(S.TRIANGLE_STRIP,this.vertexCount),W.unbind()}},P.update=function(y){var S,M;this.dirty=!0;var W=!!y.connectGaps;"dashScale"in y&&(this.dashScale=y.dashScale),this.hasAlpha=!1,"opacity"in y&&(this.opacity=+y.opacity,this.opacity<1&&(this.hasAlpha=!0));var $=[],Z=[],K=[],Q=0,J=0,G=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],ee=y.position||y.positions;if(ee){var re=y.color||y.colors||[0,0,0,1],fe=y.lineWidth||1,we=!1;e:for(S=1;S<ee.length;++S){var Oe=ee[S-1],ke=ee[S];for(Z.push(Q),K.push(Oe.slice()),M=0;M<3;++M){if(isNaN(Oe[M])||isNaN(ke[M])||!isFinite(Oe[M])||!isFinite(ke[M])){if(!W&&$.length>0){for(var Le=0;Le<24;++Le)$.push($[$.length-12]);J+=2,we=!0}continue e}G[0][M]=Math.min(G[0][M],Oe[M],ke[M]),G[1][M]=Math.max(G[1][M],Oe[M],ke[M])}var oe,be;Array.isArray(re[0])?(oe=re.length>S-1?re[S-1]:re.length>0?re[re.length-1]:[0,0,0,1],be=re.length>S?re[S]:re.length>0?re[re.length-1]:[0,0,0,1]):oe=be=re,oe.length===3&&(oe=[oe[0],oe[1],oe[2],1]),be.length===3&&(be=[be[0],be[1],be[2],1]),!this.hasAlpha&&oe[3]<1&&(this.hasAlpha=!0);var _e;Array.isArray(fe)?_e=fe.length>S-1?fe[S-1]:fe.length>0?fe[fe.length-1]:[0,0,0,1]:_e=fe;var he=Q;if(Q+=I(Oe,ke),we){for(M=0;M<2;++M)$.push(Oe[0],Oe[1],Oe[2],ke[0],ke[1],ke[2],he,_e,oe[0],oe[1],oe[2],oe[3]);J+=2,we=!1}$.push(Oe[0],Oe[1],Oe[2],ke[0],ke[1],ke[2],he,_e,oe[0],oe[1],oe[2],oe[3],Oe[0],Oe[1],Oe[2],ke[0],ke[1],ke[2],he,-_e,oe[0],oe[1],oe[2],oe[3],ke[0],ke[1],ke[2],Oe[0],Oe[1],Oe[2],Q,-_e,be[0],be[1],be[2],be[3],ke[0],ke[1],ke[2],Oe[0],Oe[1],Oe[2],Q,_e,be[0],be[1],be[2],be[3]),J+=4}}if(this.buffer.update($),Z.push(Q),K.push(ee[ee.length-1].slice()),this.bounds=G,this.vertexCount=J,this.points=K,this.arcLength=Z,"dashes"in y){var De=y.dashes,xe=De.slice();for(xe.unshift(0),S=1;S<xe.length;++S)xe[S]=xe[S-1]+xe[S];var se=A(new Array(256*4),[256,1,4]);for(S=0;S<256;++S){for(M=0;M<4;++M)se.set(S,0,M,0);x.le(xe,xe[xe.length-1]*S/255)&1?se.set(S,0,0,0):se.set(S,0,0,255)}this.texture.setPixels(se)}},P.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()},P.pick=function(y){if(!y||y.id!==this.pickId)return null;var S=_(y.value[0],y.value[1],y.value[2],0),M=x.le(this.arcLength,S);if(M<0)return null;if(M===this.arcLength.length-1)return new F(this.arcLength[this.arcLength.length-1],this.points[this.points.length-1].slice(),M);for(var W=this.points[M],$=this.points[Math.min(M+1,this.points.length-1)],Z=(S-this.arcLength[M])/(this.arcLength[M+1]-this.arcLength[M]),K=1-Z,Q=[0,0,0],J=0;J<3;++J)Q[J]=K*W[J]+Z*$[J];var G=Math.min(Z<.5?M:M+1,this.points.length-1);return new F(S,Q,G,this.points[G])};function T(y){var S=y.gl||y.scene&&y.scene.gl,M=D(S);M.attributes.position.location=0,M.attributes.nextPosition.location=1,M.attributes.arcLength.location=2,M.attributes.lineWidth.location=3,M.attributes.color.location=4;var W=g(S);W.attributes.position.location=0,W.attributes.nextPosition.location=1,W.attributes.arcLength.location=2,W.attributes.lineWidth.location=3,W.attributes.color.location=4;for(var $=p(S),Z=f(S,[{buffer:$,size:3,offset:0,stride:48},{buffer:$,size:3,offset:12,stride:48},{buffer:$,size:1,offset:24,stride:48},{buffer:$,size:1,offset:28,stride:48},{buffer:$,size:4,offset:32,stride:48}]),K=A(new Array(256*4),[256,1,4]),Q=0;Q<1024;++Q)K.data[Q]=255;var J=v(S,K);J.wrap=S.REPEAT;var G=new k(S,M,W,$,Z,J);return G.update(y),G}}),1903:(function(l){l.exports=u;function u(c){var p=new Float32Array(16);return p[0]=c[0],p[1]=c[1],p[2]=c[2],p[3]=c[3],p[4]=c[4],p[5]=c[5],p[6]=c[6],p[7]=c[7],p[8]=c[8],p[9]=c[9],p[10]=c[10],p[11]=c[11],p[12]=c[12],p[13]=c[13],p[14]=c[14],p[15]=c[15],p}}),6864:(function(l){l.exports=u;function u(){var c=new Float32Array(16);return c[0]=1,c[1]=0,c[2]=0,c[3]=0,c[4]=0,c[5]=1,c[6]=0,c[7]=0,c[8]=0,c[9]=0,c[10]=1,c[11]=0,c[12]=0,c[13]=0,c[14]=0,c[15]=1,c}}),9921:(function(l){l.exports=u;function u(c){var p=c[0],f=c[1],v=c[2],h=c[3],m=c[4],_=c[5],x=c[6],A=c[7],E=c[8],D=c[9],g=c[10],C=c[11],I=c[12],N=c[13],F=c[14],k=c[15],P=p*_-f*m,T=p*x-v*m,y=p*A-h*m,S=f*x-v*_,M=f*A-h*_,W=v*A-h*x,$=E*N-D*I,Z=E*F-g*I,K=E*k-C*I,Q=D*F-g*N,J=D*k-C*N,G=g*k-C*F;return P*G-T*J+y*Q+S*K-M*Z+W*$}}),7399:(function(l){l.exports=u;function u(c,p){var f=p[0],v=p[1],h=p[2],m=p[3],_=f+f,x=v+v,A=h+h,E=f*_,D=v*_,g=v*x,C=h*_,I=h*x,N=h*A,F=m*_,k=m*x,P=m*A;return c[0]=1-g-N,c[1]=D+P,c[2]=C-k,c[3]=0,c[4]=D-P,c[5]=1-E-N,c[6]=I+F,c[7]=0,c[8]=C+k,c[9]=I-F,c[10]=1-E-g,c[11]=0,c[12]=0,c[13]=0,c[14]=0,c[15]=1,c}}),6743:(function(l){l.exports=u;function u(c,p,f){var v=p[0],h=p[1],m=p[2],_=p[3],x=v+v,A=h+h,E=m+m,D=v*x,g=v*A,C=v*E,I=h*A,N=h*E,F=m*E,k=_*x,P=_*A,T=_*E;return c[0]=1-(I+F),c[1]=g+T,c[2]=C-P,c[3]=0,c[4]=g-T,c[5]=1-(D+F),c[6]=N+k,c[7]=0,c[8]=C+P,c[9]=N-k,c[10]=1-(D+I),c[11]=0,c[12]=f[0],c[13]=f[1],c[14]=f[2],c[15]=1,c}}),7894:(function(l){l.exports=u;function u(c){return c[0]=1,c[1]=0,c[2]=0,c[3]=0,c[4]=0,c[5]=1,c[6]=0,c[7]=0,c[8]=0,c[9]=0,c[10]=1,c[11]=0,c[12]=0,c[13]=0,c[14]=0,c[15]=1,c}}),7608:(function(l){l.exports=u;function u(c,p){var f=p[0],v=p[1],h=p[2],m=p[3],_=p[4],x=p[5],A=p[6],E=p[7],D=p[8],g=p[9],C=p[10],I=p[11],N=p[12],F=p[13],k=p[14],P=p[15],T=f*x-v*_,y=f*A-h*_,S=f*E-m*_,M=v*A-h*x,W=v*E-m*x,$=h*E-m*A,Z=D*F-g*N,K=D*k-C*N,Q=D*P-I*N,J=g*k-C*F,G=g*P-I*F,ee=C*P-I*k,re=T*ee-y*G+S*J+M*Q-W*K+$*Z;return re?(re=1/re,c[0]=(x*ee-A*G+E*J)*re,c[1]=(h*G-v*ee-m*J)*re,c[2]=(F*$-k*W+P*M)*re,c[3]=(C*W-g*$-I*M)*re,c[4]=(A*Q-_*ee-E*K)*re,c[5]=(f*ee-h*Q+m*K)*re,c[6]=(k*S-N*$-P*y)*re,c[7]=(D*$-C*S+I*y)*re,c[8]=(_*G-x*Q+E*Z)*re,c[9]=(v*Q-f*G-m*Z)*re,c[10]=(N*W-F*S+P*T)*re,c[11]=(g*S-D*W-I*T)*re,c[12]=(x*K-_*J-A*Z)*re,c[13]=(f*J-v*K+h*Z)*re,c[14]=(F*y-N*M-k*T)*re,c[15]=(D*M-g*y+C*T)*re,c):null}}),6582:(function(l,u,c){var p=c(7894);l.exports=f;function f(v,h,m,_){var x,A,E,D,g,C,I,N,F,k,P=h[0],T=h[1],y=h[2],S=_[0],M=_[1],W=_[2],$=m[0],Z=m[1],K=m[2];return Math.abs(P-$)<1e-6&&Math.abs(T-Z)<1e-6&&Math.abs(y-K)<1e-6?p(v):(I=P-$,N=T-Z,F=y-K,k=1/Math.sqrt(I*I+N*N+F*F),I*=k,N*=k,F*=k,x=M*F-W*N,A=W*I-S*F,E=S*N-M*I,k=Math.sqrt(x*x+A*A+E*E),k?(k=1/k,x*=k,A*=k,E*=k):(x=0,A=0,E=0),D=N*E-F*A,g=F*x-I*E,C=I*A-N*x,k=Math.sqrt(D*D+g*g+C*C),k?(k=1/k,D*=k,g*=k,C*=k):(D=0,g=0,C=0),v[0]=x,v[1]=D,v[2]=I,v[3]=0,v[4]=A,v[5]=g,v[6]=N,v[7]=0,v[8]=E,v[9]=C,v[10]=F,v[11]=0,v[12]=-(x*P+A*T+E*y),v[13]=-(D*P+g*T+C*y),v[14]=-(I*P+N*T+F*y),v[15]=1,v)}}),6760:(function(l){l.exports=u;function u(c,p,f){var v=p[0],h=p[1],m=p[2],_=p[3],x=p[4],A=p[5],E=p[6],D=p[7],g=p[8],C=p[9],I=p[10],N=p[11],F=p[12],k=p[13],P=p[14],T=p[15],y=f[0],S=f[1],M=f[2],W=f[3];return c[0]=y*v+S*x+M*g+W*F,c[1]=y*h+S*A+M*C+W*k,c[2]=y*m+S*E+M*I+W*P,c[3]=y*_+S*D+M*N+W*T,y=f[4],S=f[5],M=f[6],W=f[7],c[4]=y*v+S*x+M*g+W*F,c[5]=y*h+S*A+M*C+W*k,c[6]=y*m+S*E+M*I+W*P,c[7]=y*_+S*D+M*N+W*T,y=f[8],S=f[9],M=f[10],W=f[11],c[8]=y*v+S*x+M*g+W*F,c[9]=y*h+S*A+M*C+W*k,c[10]=y*m+S*E+M*I+W*P,c[11]=y*_+S*D+M*N+W*T,y=f[12],S=f[13],M=f[14],W=f[15],c[12]=y*v+S*x+M*g+W*F,c[13]=y*h+S*A+M*C+W*k,c[14]=y*m+S*E+M*I+W*P,c[15]=y*_+S*D+M*N+W*T,c}}),4040:(function(l){l.exports=u;function u(c,p,f,v,h,m,_){var x=1/(p-f),A=1/(v-h),E=1/(m-_);return c[0]=-2*x,c[1]=0,c[2]=0,c[3]=0,c[4]=0,c[5]=-2*A,c[6]=0,c[7]=0,c[8]=0,c[9]=0,c[10]=2*E,c[11]=0,c[12]=(p+f)*x,c[13]=(h+v)*A,c[14]=(_+m)*E,c[15]=1,c}}),4772:(function(l){l.exports=u;function u(c,p,f,v,h){var m=1/Math.tan(p/2),_=1/(v-h);return c[0]=m/f,c[1]=0,c[2]=0,c[3]=0,c[4]=0,c[5]=m,c[6]=0,c[7]=0,c[8]=0,c[9]=0,c[10]=(h+v)*_,c[11]=-1,c[12]=0,c[13]=0,c[14]=2*h*v*_,c[15]=0,c}}),6079:(function(l){l.exports=u;function u(c,p,f,v){var h=v[0],m=v[1],_=v[2],x=Math.sqrt(h*h+m*m+_*_),A,E,D,g,C,I,N,F,k,P,T,y,S,M,W,$,Z,K,Q,J,G,ee,re,fe;return Math.abs(x)<1e-6?null:(x=1/x,h*=x,m*=x,_*=x,A=Math.sin(f),E=Math.cos(f),D=1-E,g=p[0],C=p[1],I=p[2],N=p[3],F=p[4],k=p[5],P=p[6],T=p[7],y=p[8],S=p[9],M=p[10],W=p[11],$=h*h*D+E,Z=m*h*D+_*A,K=_*h*D-m*A,Q=h*m*D-_*A,J=m*m*D+E,G=_*m*D+h*A,ee=h*_*D+m*A,re=m*_*D-h*A,fe=_*_*D+E,c[0]=g*$+F*Z+y*K,c[1]=C*$+k*Z+S*K,c[2]=I*$+P*Z+M*K,c[3]=N*$+T*Z+W*K,c[4]=g*Q+F*J+y*G,c[5]=C*Q+k*J+S*G,c[6]=I*Q+P*J+M*G,c[7]=N*Q+T*J+W*G,c[8]=g*ee+F*re+y*fe,c[9]=C*ee+k*re+S*fe,c[10]=I*ee+P*re+M*fe,c[11]=N*ee+T*re+W*fe,p!==c&&(c[12]=p[12],c[13]=p[13],c[14]=p[14],c[15]=p[15]),c)}}),5567:(function(l){l.exports=u;function u(c,p,f){var v=Math.sin(f),h=Math.cos(f),m=p[4],_=p[5],x=p[6],A=p[7],E=p[8],D=p[9],g=p[10],C=p[11];return p!==c&&(c[0]=p[0],c[1]=p[1],c[2]=p[2],c[3]=p[3],c[12]=p[12],c[13]=p[13],c[14]=p[14],c[15]=p[15]),c[4]=m*h+E*v,c[5]=_*h+D*v,c[6]=x*h+g*v,c[7]=A*h+C*v,c[8]=E*h-m*v,c[9]=D*h-_*v,c[10]=g*h-x*v,c[11]=C*h-A*v,c}}),2408:(function(l){l.exports=u;function u(c,p,f){var v=Math.sin(f),h=Math.cos(f),m=p[0],_=p[1],x=p[2],A=p[3],E=p[8],D=p[9],g=p[10],C=p[11];return p!==c&&(c[4]=p[4],c[5]=p[5],c[6]=p[6],c[7]=p[7],c[12]=p[12],c[13]=p[13],c[14]=p[14],c[15]=p[15]),c[0]=m*h-E*v,c[1]=_*h-D*v,c[2]=x*h-g*v,c[3]=A*h-C*v,c[8]=m*v+E*h,c[9]=_*v+D*h,c[10]=x*v+g*h,c[11]=A*v+C*h,c}}),7089:(function(l){l.exports=u;function u(c,p,f){var v=Math.sin(f),h=Math.cos(f),m=p[0],_=p[1],x=p[2],A=p[3],E=p[4],D=p[5],g=p[6],C=p[7];return p!==c&&(c[8]=p[8],c[9]=p[9],c[10]=p[10],c[11]=p[11],c[12]=p[12],c[13]=p[13],c[14]=p[14],c[15]=p[15]),c[0]=m*h+E*v,c[1]=_*h+D*v,c[2]=x*h+g*v,c[3]=A*h+C*v,c[4]=E*h-m*v,c[5]=D*h-_*v,c[6]=g*h-x*v,c[7]=C*h-A*v,c}}),2504:(function(l){l.exports=u;function u(c,p,f){var v=f[0],h=f[1],m=f[2];return c[0]=p[0]*v,c[1]=p[1]*v,c[2]=p[2]*v,c[3]=p[3]*v,c[4]=p[4]*h,c[5]=p[5]*h,c[6]=p[6]*h,c[7]=p[7]*h,c[8]=p[8]*m,c[9]=p[9]*m,c[10]=p[10]*m,c[11]=p[11]*m,c[12]=p[12],c[13]=p[13],c[14]=p[14],c[15]=p[15],c}}),7656:(function(l){l.exports=u;function u(c,p,f){var v=f[0],h=f[1],m=f[2],_,x,A,E,D,g,C,I,N,F,k,P;return p===c?(c[12]=p[0]*v+p[4]*h+p[8]*m+p[12],c[13]=p[1]*v+p[5]*h+p[9]*m+p[13],c[14]=p[2]*v+p[6]*h+p[10]*m+p[14],c[15]=p[3]*v+p[7]*h+p[11]*m+p[15]):(_=p[0],x=p[1],A=p[2],E=p[3],D=p[4],g=p[5],C=p[6],I=p[7],N=p[8],F=p[9],k=p[10],P=p[11],c[0]=_,c[1]=x,c[2]=A,c[3]=E,c[4]=D,c[5]=g,c[6]=C,c[7]=I,c[8]=N,c[9]=F,c[10]=k,c[11]=P,c[12]=_*v+D*h+N*m+p[12],c[13]=x*v+g*h+F*m+p[13],c[14]=A*v+C*h+k*m+p[14],c[15]=E*v+I*h+P*m+p[15]),c}}),5665:(function(l){l.exports=u;function u(c,p){if(c===p){var f=p[1],v=p[2],h=p[3],m=p[6],_=p[7],x=p[11];c[1]=p[4],c[2]=p[8],c[3]=p[12],c[4]=f,c[6]=p[9],c[7]=p[13],c[8]=v,c[9]=m,c[11]=p[14],c[12]=h,c[13]=_,c[14]=x}else c[0]=p[0],c[1]=p[4],c[2]=p[8],c[3]=p[12],c[4]=p[1],c[5]=p[5],c[6]=p[9],c[7]=p[13],c[8]=p[2],c[9]=p[6],c[10]=p[10],c[11]=p[14],c[12]=p[3],c[13]=p[7],c[14]=p[11],c[15]=p[15];return c}}),7626:(function(l,u,c){var p=c(2642),f=c(9346);l.exports=x;function v(A,E){for(var D=[0,0,0,0],g=0;g<4;++g)for(var C=0;C<4;++C)D[C]+=A[4*g+C]*E[g];return D}function h(A,E,D,g,C){for(var I=v(g,v(D,v(E,[A[0],A[1],A[2],1]))),N=0;N<3;++N)I[N]/=I[3];return[.5*C[0]*(1+I[0]),.5*C[1]*(1-I[1])]}function m(A,E){if(A.length===2){for(var D=0,g=0,C=0;C<2;++C)D+=Math.pow(E[C]-A[0][C],2),g+=Math.pow(E[C]-A[1][C],2);return D=Math.sqrt(D),g=Math.sqrt(g),D+g<1e-6?[1,0]:[g/(D+g),D/(g+D)]}else if(A.length===3){var I=[0,0];return f(A[0],A[1],A[2],E,I),p(A,I)}return[]}function _(A,E){for(var D=[0,0,0],g=0;g<A.length;++g)for(var C=A[g],I=E[g],N=0;N<3;++N)D[N]+=I*C[N];return D}function x(A,E,D,g,C,I){if(A.length===1)return[0,A[0].slice()];for(var N=new Array(A.length),F=0;F<A.length;++F)N[F]=h(A[F],D,g,C,I);for(var k=0,P=1/0,F=0;F<N.length;++F){for(var T=0,y=0;y<2;++y)T+=Math.pow(N[F][y]-E[y],2);T<P&&(P=T,k=F)}for(var S=m(N,E),M=0,F=0;F<3;++F){if(S[F]<-.001||S[F]>1.0001)return null;M+=S[F]}return Math.abs(M-1)>.001?null:[k,_(A,S),S]}}),840:(function(l,u,c){var p=c(3236),f=p([`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;
}
`]),v=p([`#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;
}
`]),h=p([`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;
}`]),m=p([`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;
}`]),_=p([`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;
}`]),x=p([`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;
}`]),A=p([`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;
}`]),E=p([`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);
}`]),D=p([`precision highp float;
#define GLSLIFY 1

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

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

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

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

attribute vec3  position;
attribute float pointSize;
attribute vec4  id;

uniform mat4 model, view, projection;
uniform vec3 clipBounds[2];

varying vec3 f_position;
varying vec4 f_id;

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

    gl_Position = vec4(0.0, 0.0, 0.0, 0.0);
  } else {
    gl_Position  = projection * (view * (model * vec4(position, 1.0)));
    gl_PointSize = pointSize;
  }
  f_id         = id;
  f_position   = position;
}`]),g=p([`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)));
}`]),C=p([`precision highp float;
#define GLSLIFY 1

uniform vec3 contourColor;

void main() {
  gl_FragColor = vec4(contourColor, 1.0);
}
`]);u.meshShader={vertex:f,fragment:v,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},u.wireShader={vertex:h,fragment:m,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},u.pointShader={vertex:_,fragment:x,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},u.pickShader={vertex:A,fragment:E,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},u.pointPickShader={vertex:D,fragment:E,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},u.contourShader={vertex:g,fragment:C,attributes:[{name:"position",type:"vec3"}]}}),7201:(function(l,u,c){var p=1e-6,f=1e-6,v=c(9405),h=c(2762),m=c(8116),_=c(7766),x=c(8406),A=c(6760),E=c(7608),D=c(9618),g=c(6729),C=c(7765),I=c(1888),N=c(840),F=c(7626),k=N.meshShader,P=N.wireShader,T=N.pointShader,y=N.pickShader,S=N.pointPickShader,M=N.contourShader,W=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function $(Le,oe,be,_e,he,De,xe,se,Ee,Te,Be,tt,at,gt,pt,Rt,$t,Wt,Ht,Ft,st,rt,Ue,xt,Gt,Jt,Ut){this.gl=Le,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=oe,this.dirty=!0,this.triShader=be,this.lineShader=_e,this.pointShader=he,this.pickShader=De,this.pointPickShader=xe,this.contourShader=se,this.trianglePositions=Ee,this.triangleColors=Be,this.triangleNormals=at,this.triangleUVs=tt,this.triangleIds=Te,this.triangleVAO=gt,this.triangleCount=0,this.lineWidth=1,this.edgePositions=pt,this.edgeColors=$t,this.edgeUVs=Wt,this.edgeIds=Rt,this.edgeVAO=Ht,this.edgeCount=0,this.pointPositions=Ft,this.pointColors=rt,this.pointUVs=Ue,this.pointSizes=xt,this.pointIds=st,this.pointVAO=Gt,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=Jt,this.contourVAO=Ut,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=W,this._view=W,this._projection=W,this._resolution=[1,1]}var Z=$.prototype;Z.isOpaque=function(){return!this.hasAlpha},Z.isTransparent=function(){return this.hasAlpha},Z.pickSlots=1,Z.setPickBase=function(Le){this.pickId=Le};function K(Le,oe){if(!oe||!oe.length)return 1;for(var be=0;be<oe.length;++be){if(oe.length<2)return 1;if(oe[be][0]===Le)return oe[be][1];if(oe[be][0]>Le&&be>0){var _e=(oe[be][0]-Le)/(oe[be][0]-oe[be-1][0]);return oe[be][1]*(1-_e)+_e*oe[be-1][1]}}return 1}function Q(Le,oe){for(var be=g({colormap:Le,nshades:256,format:"rgba"}),_e=new Uint8Array(256*4),he=0;he<256;++he){for(var De=be[he],xe=0;xe<3;++xe)_e[4*he+xe]=De[xe];oe?_e[4*he+3]=255*K(he/255,oe):_e[4*he+3]=255*De[3]}return D(_e,[256,256,4],[4,0,1])}function J(Le){for(var oe=Le.length,be=new Array(oe),_e=0;_e<oe;++_e)be[_e]=Le[_e][2];return be}Z.highlight=function(Le){if(!Le||!this.contourEnable){this.contourCount=0;return}for(var oe=C(this.cells,this.intensity,Le.intensity),be=oe.cells,_e=oe.vertexIds,he=oe.vertexWeights,De=be.length,xe=I.mallocFloat32(6*De),se=0,Ee=0;Ee<De;++Ee)for(var Te=be[Ee],Be=0;Be<2;++Be){var tt=Te[0];Te.length===2&&(tt=Te[Be]);for(var at=_e[tt][0],gt=_e[tt][1],pt=he[tt],Rt=1-pt,$t=this.positions[at],Wt=this.positions[gt],Ht=0;Ht<3;++Ht)xe[se++]=pt*$t[Ht]+Rt*Wt[Ht]}this.contourCount=se/3|0,this.contourPositions.update(xe.subarray(0,se)),I.free(xe)},Z.update=function(Le){Le=Le||{};var oe=this.gl;this.dirty=!0,"contourEnable"in Le&&(this.contourEnable=Le.contourEnable),"contourColor"in Le&&(this.contourColor=Le.contourColor),"lineWidth"in Le&&(this.lineWidth=Le.lineWidth),"lightPosition"in Le&&(this.lightPosition=Le.lightPosition),this.hasAlpha=!1,"opacity"in Le&&(this.opacity=Le.opacity,this.opacity<1&&(this.hasAlpha=!0)),"opacityscale"in Le&&(this.opacityscale=Le.opacityscale,this.hasAlpha=!0),"ambient"in Le&&(this.ambientLight=Le.ambient),"diffuse"in Le&&(this.diffuseLight=Le.diffuse),"specular"in Le&&(this.specularLight=Le.specular),"roughness"in Le&&(this.roughness=Le.roughness),"fresnel"in Le&&(this.fresnel=Le.fresnel),Le.texture?(this.texture.dispose(),this.texture=_(oe,Le.texture)):Le.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=oe.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=oe.LINEAR,this.texture.setPixels(Q(Le.colormap,this.opacityscale)),this.texture.generateMipmap());var be=Le.cells,_e=Le.positions;if(!(!_e||!be)){var he=[],De=[],xe=[],se=[],Ee=[],Te=[],Be=[],tt=[],at=[],gt=[],pt=[],Rt=[],$t=[],Wt=[];this.cells=be,this.positions=_e;var Ht=Le.vertexNormals,Ft=Le.cellNormals,st=Le.vertexNormalsEpsilon===void 0?p:Le.vertexNormalsEpsilon,rt=Le.faceNormalsEpsilon===void 0?f:Le.faceNormalsEpsilon;Le.useFacetNormals&&!Ft&&(Ft=x.faceNormals(be,_e,rt)),!Ft&&!Ht&&(Ht=x.vertexNormals(be,_e,st));var Ue=Le.vertexColors,xt=Le.cellColors,Gt=Le.meshColor||[1,1,1,1],Jt=Le.vertexUVs,Ut=Le.vertexIntensity,kr=Le.cellUVs,Pr=Le.cellIntensity,$r=1/0,rn=-1/0;if(!Jt&&!kr)if(Ut)if(Le.vertexIntensityBounds)$r=+Le.vertexIntensityBounds[0],rn=+Le.vertexIntensityBounds[1];else for(var kn=0;kn<Ut.length;++kn){var Rn=Ut[kn];$r=Math.min($r,Rn),rn=Math.max(rn,Rn)}else if(Pr)if(Le.cellIntensityBounds)$r=+Le.cellIntensityBounds[0],rn=+Le.cellIntensityBounds[1];else for(var kn=0;kn<Pr.length;++kn){var Rn=Pr[kn];$r=Math.min($r,Rn),rn=Math.max(rn,Rn)}else for(var kn=0;kn<_e.length;++kn){var Rn=_e[kn][2];$r=Math.min($r,Rn),rn=Math.max(rn,Rn)}Ut?this.intensity=Ut:Pr?this.intensity=Pr:this.intensity=J(_e),this.pickVertex=!(Pr||xt);var ci=Le.pointSizes,In=Le.pointSize||1;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(var kn=0;kn<_e.length;++kn)for(var Gn=_e[kn],mr=0;mr<3;++mr)isNaN(Gn[mr])||!isFinite(Gn[mr])||(this.bounds[0][mr]=Math.min(this.bounds[0][mr],Gn[mr]),this.bounds[1][mr]=Math.max(this.bounds[1][mr],Gn[mr]));var St=0,Ot=0,Et=0;e:for(var kn=0;kn<be.length;++kn){var je=be[kn];switch(je.length){case 1:for(var Ye=je[0],Gn=_e[Ye],mr=0;mr<3;++mr)if(isNaN(Gn[mr])||!isFinite(Gn[mr]))continue e;gt.push(Gn[0],Gn[1],Gn[2]);var et;Ue?et=Ue[Ye]:xt?et=xt[kn]:et=Gt,this.opacityscale&&Ut?De.push(et[0],et[1],et[2],this.opacity*K((Ut[Ye]-$r)/(rn-$r),this.opacityscale)):et.length===3?pt.push(et[0],et[1],et[2],this.opacity):(pt.push(et[0],et[1],et[2],et[3]*this.opacity),et[3]<1&&(this.hasAlpha=!0));var mt;Jt?mt=Jt[Ye]:Ut?mt=[(Ut[Ye]-$r)/(rn-$r),0]:kr?mt=kr[kn]:Pr?mt=[(Pr[kn]-$r)/(rn-$r),0]:mt=[(Gn[2]-$r)/(rn-$r),0],Rt.push(mt[0],mt[1]),ci?$t.push(ci[Ye]):$t.push(In),Wt.push(kn),Et+=1;break;case 2:for(var mr=0;mr<2;++mr)for(var Ye=je[mr],Gn=_e[Ye],Nt=0;Nt<3;++Nt)if(isNaN(Gn[Nt])||!isFinite(Gn[Nt]))continue e;for(var mr=0;mr<2;++mr){var Ye=je[mr],Gn=_e[Ye];Te.push(Gn[0],Gn[1],Gn[2]);var et;Ue?et=Ue[Ye]:xt?et=xt[kn]:et=Gt,this.opacityscale&&Ut?De.push(et[0],et[1],et[2],this.opacity*K((Ut[Ye]-$r)/(rn-$r),this.opacityscale)):et.length===3?Be.push(et[0],et[1],et[2],this.opacity):(Be.push(et[0],et[1],et[2],et[3]*this.opacity),et[3]<1&&(this.hasAlpha=!0));var mt;Jt?mt=Jt[Ye]:Ut?mt=[(Ut[Ye]-$r)/(rn-$r),0]:kr?mt=kr[kn]:Pr?mt=[(Pr[kn]-$r)/(rn-$r),0]:mt=[(Gn[2]-$r)/(rn-$r),0],tt.push(mt[0],mt[1]),at.push(kn)}Ot+=1;break;case 3:for(var mr=0;mr<3;++mr)for(var Ye=je[mr],Gn=_e[Ye],Nt=0;Nt<3;++Nt)if(isNaN(Gn[Nt])||!isFinite(Gn[Nt]))continue e;for(var mr=0;mr<3;++mr){var Ye=je[2-mr],Gn=_e[Ye];he.push(Gn[0],Gn[1],Gn[2]);var et;Ue?et=Ue[Ye]:xt?et=xt[kn]:et=Gt,et?this.opacityscale&&Ut?De.push(et[0],et[1],et[2],this.opacity*K((Ut[Ye]-$r)/(rn-$r),this.opacityscale)):et.length===3?De.push(et[0],et[1],et[2],this.opacity):(De.push(et[0],et[1],et[2],et[3]*this.opacity),et[3]<1&&(this.hasAlpha=!0)):De.push(.5,.5,.5,1);var mt;Jt?mt=Jt[Ye]:Ut?mt=[(Ut[Ye]-$r)/(rn-$r),0]:kr?mt=kr[kn]:Pr?mt=[(Pr[kn]-$r)/(rn-$r),0]:mt=[(Gn[2]-$r)/(rn-$r),0],se.push(mt[0],mt[1]);var lr;Ht?lr=Ht[Ye]:lr=Ft[kn],xe.push(lr[0],lr[1],lr[2]),Ee.push(kn)}St+=1;break}}this.pointCount=Et,this.edgeCount=Ot,this.triangleCount=St,this.pointPositions.update(gt),this.pointColors.update(pt),this.pointUVs.update(Rt),this.pointSizes.update($t),this.pointIds.update(new Uint32Array(Wt)),this.edgePositions.update(Te),this.edgeColors.update(Be),this.edgeUVs.update(tt),this.edgeIds.update(new Uint32Array(at)),this.trianglePositions.update(he),this.triangleColors.update(De),this.triangleUVs.update(se),this.triangleNormals.update(xe),this.triangleIds.update(new Uint32Array(Ee))}},Z.drawTransparent=Z.draw=function(Le){Le=Le||{};for(var oe=this.gl,be=Le.model||W,_e=Le.view||W,he=Le.projection||W,De=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],xe=0;xe<3;++xe)De[0][xe]=Math.max(De[0][xe],this.clipBounds[0][xe]),De[1][xe]=Math.min(De[1][xe],this.clipBounds[1][xe]);var se={model:be,view:_e,projection:he,inverseModel:W.slice(),clipBounds:De,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};se.inverseModel=E(se.inverseModel,se.model),oe.disable(oe.CULL_FACE),this.texture.bind(0);var Ee=new Array(16);A(Ee,se.view,se.model),A(Ee,se.projection,Ee),E(Ee,Ee);for(var xe=0;xe<3;++xe)se.eyePosition[xe]=Ee[12+xe]/Ee[15];for(var Te=Ee[15],xe=0;xe<3;++xe)Te+=this.lightPosition[xe]*Ee[4*xe+3];for(var xe=0;xe<3;++xe){for(var Be=Ee[12+xe],tt=0;tt<3;++tt)Be+=Ee[4*tt+xe]*this.lightPosition[tt];se.lightPosition[xe]=Be/Te}if(this.triangleCount>0){var at=this.triShader;at.bind(),at.uniforms=se,this.triangleVAO.bind(),oe.drawArrays(oe.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var at=this.lineShader;at.bind(),at.uniforms=se,this.edgeVAO.bind(),oe.lineWidth(this.lineWidth*this.pixelRatio),oe.drawArrays(oe.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var at=this.pointShader;at.bind(),at.uniforms=se,this.pointVAO.bind(),oe.drawArrays(oe.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var at=this.contourShader;at.bind(),at.uniforms=se,this.contourVAO.bind(),oe.drawArrays(oe.LINES,0,this.contourCount),this.contourVAO.unbind()}},Z.drawPick=function(Le){Le=Le||{};for(var oe=this.gl,be=Le.model||W,_e=Le.view||W,he=Le.projection||W,De=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],xe=0;xe<3;++xe)De[0][xe]=Math.max(De[0][xe],this.clipBounds[0][xe]),De[1][xe]=Math.min(De[1][xe],this.clipBounds[1][xe]);this._model=[].slice.call(be),this._view=[].slice.call(_e),this._projection=[].slice.call(he),this._resolution=[oe.drawingBufferWidth,oe.drawingBufferHeight];var se={model:be,view:_e,projection:he,clipBounds:De,pickId:this.pickId/255},Ee=this.pickShader;if(Ee.bind(),Ee.uniforms=se,this.triangleCount>0&&(this.triangleVAO.bind(),oe.drawArrays(oe.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),oe.lineWidth(this.lineWidth*this.pixelRatio),oe.drawArrays(oe.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var Ee=this.pointPickShader;Ee.bind(),Ee.uniforms=se,this.pointVAO.bind(),oe.drawArrays(oe.POINTS,0,this.pointCount),this.pointVAO.unbind()}},Z.pick=function(Le){if(!Le||Le.id!==this.pickId)return null;for(var oe=Le.value[0]+256*Le.value[1]+65536*Le.value[2],be=this.cells[oe],_e=this.positions,he=new Array(be.length),De=0;De<be.length;++De)he[De]=_e[be[De]];var xe=Le.coord[0],se=Le.coord[1];if(!this.pickVertex){var Ee=this.positions[be[0]],Te=this.positions[be[1]],Be=this.positions[be[2]],tt=[(Ee[0]+Te[0]+Be[0])/3,(Ee[1]+Te[1]+Be[1])/3,(Ee[2]+Te[2]+Be[2])/3];return{_cellCenter:!0,position:[xe,se],index:oe,cell:be,cellId:oe,intensity:this.intensity[oe],dataCoordinate:tt}}var at=F(he,[xe*this.pixelRatio,this._resolution[1]-se*this.pixelRatio],this._model,this._view,this._projection,this._resolution);if(!at)return null;for(var gt=at[2],pt=0,De=0;De<be.length;++De)pt+=gt[De]*this.intensity[be[De]];return{position:at[1],index:be[at[0]],cell:be,cellId:oe,intensity:pt,dataCoordinate:this.positions[be[at[0]]]}},Z.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 G(Le){var oe=v(Le,k.vertex,k.fragment);return oe.attributes.position.location=0,oe.attributes.color.location=2,oe.attributes.uv.location=3,oe.attributes.normal.location=4,oe}function ee(Le){var oe=v(Le,P.vertex,P.fragment);return oe.attributes.position.location=0,oe.attributes.color.location=2,oe.attributes.uv.location=3,oe}function re(Le){var oe=v(Le,T.vertex,T.fragment);return oe.attributes.position.location=0,oe.attributes.color.location=2,oe.attributes.uv.location=3,oe.attributes.pointSize.location=4,oe}function fe(Le){var oe=v(Le,y.vertex,y.fragment);return oe.attributes.position.location=0,oe.attributes.id.location=1,oe}function we(Le){var oe=v(Le,S.vertex,S.fragment);return oe.attributes.position.location=0,oe.attributes.id.location=1,oe.attributes.pointSize.location=4,oe}function Oe(Le){var oe=v(Le,M.vertex,M.fragment);return oe.attributes.position.location=0,oe}function ke(Le,oe){arguments.length===1&&(oe=Le,Le=oe.gl);var be=Le.getExtension("OES_standard_derivatives")||Le.getExtension("MOZ_OES_standard_derivatives")||Le.getExtension("WEBKIT_OES_standard_derivatives");if(!be)throw new Error("derivatives not supported");var _e=G(Le),he=ee(Le),De=re(Le),xe=fe(Le),se=we(Le),Ee=Oe(Le),Te=_(Le,D(new Uint8Array([255,255,255,255]),[1,1,4]));Te.generateMipmap(),Te.minFilter=Le.LINEAR_MIPMAP_LINEAR,Te.magFilter=Le.LINEAR;var Be=h(Le),tt=h(Le),at=h(Le),gt=h(Le),pt=h(Le),Rt=m(Le,[{buffer:Be,type:Le.FLOAT,size:3},{buffer:pt,type:Le.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:tt,type:Le.FLOAT,size:4},{buffer:at,type:Le.FLOAT,size:2},{buffer:gt,type:Le.FLOAT,size:3}]),$t=h(Le),Wt=h(Le),Ht=h(Le),Ft=h(Le),st=m(Le,[{buffer:$t,type:Le.FLOAT,size:3},{buffer:Ft,type:Le.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:Wt,type:Le.FLOAT,size:4},{buffer:Ht,type:Le.FLOAT,size:2}]),rt=h(Le),Ue=h(Le),xt=h(Le),Gt=h(Le),Jt=h(Le),Ut=m(Le,[{buffer:rt,type:Le.FLOAT,size:3},{buffer:Jt,type:Le.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:Ue,type:Le.FLOAT,size:4},{buffer:xt,type:Le.FLOAT,size:2},{buffer:Gt,type:Le.FLOAT,size:1}]),kr=h(Le),Pr=m(Le,[{buffer:kr,type:Le.FLOAT,size:3}]),$r=new $(Le,Te,_e,he,De,xe,se,Ee,Be,pt,tt,at,gt,Rt,$t,Ft,Wt,Ht,st,rt,Jt,Ue,xt,Gt,Ut,kr,Pr);return $r.update(oe),$r}l.exports=ke}),4437:(function(l,u,c){l.exports=x;var p=c(3025),f=c(6296),v=c(351),h=c(8512),m=c(24),_=c(7520);function x(A,E){A=A||document.body,E=E||{};var D=[.01,1/0];"distanceLimits"in E&&(D[0]=E.distanceLimits[0],D[1]=E.distanceLimits[1]),"zoomMin"in E&&(D[0]=E.zoomMin),"zoomMax"in E&&(D[1]=E.zoomMax);var g=f({center:E.center||[0,0,0],up:E.up||[0,1,0],eye:E.eye||[0,0,10],mode:E.mode||"orbit",distanceLimits:D}),C=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],I=0,N=A.clientWidth,F=A.clientHeight,k={keyBindingMode:"rotate",enableWheel:!0,view:g,element:A,delay:E.delay||16,rotateSpeed:E.rotateSpeed||1,zoomSpeed:E.zoomSpeed||1,translateSpeed:E.translateSpeed||1,flipX:!!E.flipX,flipY:!!E.flipY,modes:g.modes,_ortho:E._ortho||E.projection&&E.projection.type==="orthographic"||!1,tick:function(){var P=p(),T=this.delay,y=P-2*T;g.idle(P-T),g.recalcMatrix(y),g.flush(P-(100+T*2));for(var S=!0,M=g.computedMatrix,W=0;W<16;++W)S=S&&C[W]===M[W],C[W]=M[W];var $=A.clientWidth===N&&A.clientHeight===F;return N=A.clientWidth,F=A.clientHeight,S?!$:(I=Math.exp(g.computedRadius[0]),!0)},lookAt:function(P,T,y){g.lookAt(g.lastT(),P,T,y)},rotate:function(P,T,y){g.rotate(g.lastT(),P,T,y)},pan:function(P,T,y){g.pan(g.lastT(),P,T,y)},translate:function(P,T,y){g.translate(g.lastT(),P,T,y)}};return Object.defineProperties(k,{matrix:{get:function(){return g.computedMatrix},set:function(P){return g.setMatrix(g.lastT(),P),g.computedMatrix},enumerable:!0},mode:{get:function(){return g.getMode()},set:function(P){var T=g.computedUp.slice(),y=g.computedEye.slice(),S=g.computedCenter.slice();if(g.setMode(P),P==="turntable"){var M=p();g._active.lookAt(M,y,S,T),g._active.lookAt(M+500,y,S,[0,0,1]),g._active.flush(M)}return g.getMode()},enumerable:!0},center:{get:function(){return g.computedCenter},set:function(P){return g.lookAt(g.lastT(),null,P),g.computedCenter},enumerable:!0},eye:{get:function(){return g.computedEye},set:function(P){return g.lookAt(g.lastT(),P),g.computedEye},enumerable:!0},up:{get:function(){return g.computedUp},set:function(P){return g.lookAt(g.lastT(),null,null,P),g.computedUp},enumerable:!0},distance:{get:function(){return I},set:function(P){return g.setDistance(g.lastT(),P),P},enumerable:!0},distanceLimits:{get:function(){return g.getDistanceLimits(D)},set:function(P){return g.setDistanceLimits(P),P},enumerable:!0}}),A.addEventListener("contextmenu",function(P){return P.preventDefault(),!1}),k._lastX=-1,k._lastY=-1,k._lastMods={shift:!1,control:!1,alt:!1,meta:!1},k.enableMouseListeners=function(){k.mouseListener=v(A,P),A.addEventListener("touchstart",function(T){var y=m(T.changedTouches[0],A);P(0,y[0],y[1],k._lastMods),P(1,y[0],y[1],k._lastMods)},_?{passive:!0}:!1),A.addEventListener("touchmove",function(T){var y=m(T.changedTouches[0],A);P(1,y[0],y[1],k._lastMods),T.preventDefault()},_?{passive:!1}:!1),A.addEventListener("touchend",function(T){P(0,k._lastX,k._lastY,k._lastMods)},_?{passive:!0}:!1);function P(T,y,S,M){var W=k.keyBindingMode;if(W!==!1){var $=W==="rotate",Z=W==="pan",K=W==="zoom",Q=!!M.control,J=!!M.alt,G=!!M.shift,ee=!!(T&1),re=!!(T&2),fe=!!(T&4),we=1/A.clientHeight,Oe=we*(y-k._lastX),ke=we*(S-k._lastY),Le=k.flipX?1:-1,oe=k.flipY?1:-1,be=Math.PI*k.rotateSpeed,_e=p();if(k._lastX!==-1&&k._lastY!==-1&&(($&&ee&&!Q&&!J&&!G||ee&&!Q&&!J&&G)&&g.rotate(_e,Le*be*Oe,-oe*be*ke,0),(Z&&ee&&!Q&&!J&&!G||re||ee&&Q&&!J&&!G)&&g.pan(_e,-k.translateSpeed*Oe*I,k.translateSpeed*ke*I,0),K&&ee&&!Q&&!J&&!G||fe||ee&&!Q&&J&&!G)){var he=-k.zoomSpeed*ke/window.innerHeight*(_e-g.lastT())*100;g.pan(_e,0,0,I*(Math.exp(he)-1))}return k._lastX=y,k._lastY=S,k._lastMods=M,!0}}k.wheelListener=h(A,function(T,y){if(k.keyBindingMode!==!1&&k.enableWheel){var S=k.flipX?1:-1,M=k.flipY?1:-1,W=p();if(Math.abs(T)>Math.abs(y))g.rotate(W,0,0,-T*S*Math.PI*k.rotateSpeed/window.innerWidth);else if(!k._ortho){var $=-k.zoomSpeed*M*y/window.innerHeight*(W-g.lastT())/20;g.pan(W,0,0,I*(Math.exp($)-1))}}},!0)},k.enableMouseListeners(),k}}),799:(function(l,u,c){var p=c(3236),f=c(9405),v=p([`precision mediump float;
#define GLSLIFY 1
attribute vec2 position;
varying vec2 uv;
void main() {
  uv = position;
  gl_Position = vec4(position, 0, 1);
}`]),h=p([`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);
}`]);l.exports=function(m){return f(m,v,h,null,[{name:"position",type:"vec2"}])}}),4100:(function(l,u,c){var p=c(4437),f=c(3837),v=c(5445),h=c(4449),m=c(3589),_=c(2260),x=c(7169),A=c(351),E=c(4772),D=c(4040),g=c(799),C=c(9216)({tablet:!0,featureDetect:!0});l.exports={createScene:P,createCamera:p};function I(){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 N(y,S){var M=null;try{M=y.getContext("webgl",S),M||(M=y.getContext("experimental-webgl",S))}catch{return null}return M}function F(y){var S=Math.round(Math.log(Math.abs(y))/Math.log(10));if(S<0){var M=Math.round(Math.pow(10,-S));return Math.ceil(y*M)/M}else if(S>0){var M=Math.round(Math.pow(10,S));return Math.ceil(y/M)*M}return Math.ceil(y)}function k(y){return typeof y=="boolean"?y:!0}function P(y){y=y||{},y.camera=y.camera||{};var S=y.canvas;if(!S)if(S=document.createElement("canvas"),y.container){var M=y.container;M.appendChild(S)}else document.body.appendChild(S);var W=y.gl;if(W||(y.glOptions&&(C=!!y.glOptions.preserveDrawingBuffer),W=N(S,y.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:C})),!W)throw new Error("webgl not supported");var $=y.bounds||[[-10,-10,-10],[10,10,10]],Z=new I,K=_(W,W.drawingBufferWidth,W.drawingBufferHeight,{preferFloat:!C}),Q=g(W),J=y.cameraObject&&y.cameraObject._ortho===!0||y.camera.projection&&y.camera.projection.type==="orthographic"||!1,G={eye:y.camera.eye||[2,0,0],center:y.camera.center||[0,0,0],up:y.camera.up||[0,1,0],zoomMin:y.camera.zoomMax||.1,zoomMax:y.camera.zoomMin||100,mode:y.camera.mode||"turntable",_ortho:J},ee=y.axes||{},re=f(W,ee);re.enable=!ee.disable;var fe=y.spikes||{},we=h(W,fe),Oe=[],ke=[],Le=[],oe=[],be=!0,xe=!0,_e=new Array(16),he=new Array(16),De={view:null,projection:_e,model:he,_ortho:!1},xe=!0,se=[W.drawingBufferWidth,W.drawingBufferHeight],Ee=y.cameraObject||p(S,G),Te={gl:W,contextLost:!1,pixelRatio:y.pixelRatio||1,canvas:S,selection:Z,camera:Ee,axes:re,axesPixels:null,spikes:we,bounds:$,objects:Oe,shape:se,aspect:y.aspectRatio||[1,1,1],pickRadius:y.pickRadius||10,zNear:y.zNear||.01,zFar:y.zFar||1e3,fovy:y.fovy||Math.PI/4,clearColor:y.clearColor||[0,0,0,0],autoResize:k(y.autoResize),autoBounds:k(y.autoBounds),autoScale:!!y.autoScale,autoCenter:k(y.autoCenter),clipToBounds:k(y.clipToBounds),snapToData:!!y.snapToData,onselect:y.onselect||null,onrender:y.onrender||null,onclick:y.onclick||null,cameraParams:De,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(Ft){this.aspect[0]=Ft.x,this.aspect[1]=Ft.y,this.aspect[2]=Ft.z,xe=!0},setBounds:function(Ft,st){this.bounds[0][Ft]=st.min,this.bounds[1][Ft]=st.max},setClearColor:function(Ft){this.clearColor=Ft},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)}},Be=[W.drawingBufferWidth/Te.pixelRatio|0,W.drawingBufferHeight/Te.pixelRatio|0];function tt(){if(!Te._stopped&&Te.autoResize){var Ft=S.parentNode,st=1,rt=1;Ft&&Ft!==document.body?(st=Ft.clientWidth,rt=Ft.clientHeight):(st=window.innerWidth,rt=window.innerHeight);var Ue=Math.ceil(st*Te.pixelRatio)|0,xt=Math.ceil(rt*Te.pixelRatio)|0;if(Ue!==S.width||xt!==S.height){S.width=Ue,S.height=xt;var Gt=S.style;Gt.position=Gt.position||"absolute",Gt.left="0px",Gt.top="0px",Gt.width=st+"px",Gt.height=rt+"px",be=!0}}}Te.autoResize&&tt(),window.addEventListener("resize",tt);function at(){for(var Ft=Oe.length,st=oe.length,rt=0;rt<st;++rt)Le[rt]=0;e:for(var rt=0;rt<Ft;++rt){var Ue=Oe[rt],xt=Ue.pickSlots;if(!xt){ke[rt]=-1;continue}for(var Gt=0;Gt<st;++Gt)if(Le[Gt]+xt<255){ke[rt]=Gt,Ue.setPickBase(Le[Gt]+1),Le[Gt]+=xt;continue e}var Jt=m(W,se);ke[rt]=st,oe.push(Jt),Le.push(xt),Ue.setPickBase(1),st+=1}for(;st>0&&Le[st-1]===0;)Le.pop(),oe.pop().dispose()}Te.update=function(Ft){Te._stopped||(be=!0,xe=!0)},Te.add=function(Ft){Te._stopped||(Ft.axes=re,Oe.push(Ft),ke.push(-1),be=!0,xe=!0,at())},Te.remove=function(Ft){if(!Te._stopped){var st=Oe.indexOf(Ft);st<0||(Oe.splice(st,1),ke.pop(),be=!0,xe=!0,at())}},Te.dispose=function(){if(!Te._stopped&&(Te._stopped=!0,window.removeEventListener("resize",tt),S.removeEventListener("webglcontextlost",gt),Te.mouseListener.enabled=!1,!Te.contextLost)){re.dispose(),we.dispose();for(var Ft=0;Ft<Oe.length;++Ft)Oe[Ft].dispose();K.dispose();for(var Ft=0;Ft<oe.length;++Ft)oe[Ft].dispose();Q.dispose(),W=null,re=null,we=null,Oe=[]}},Te._mouseRotating=!1,Te._prevButtons=0,Te.enableMouseListeners=function(){Te.mouseListener=A(S,function(Ft,st,rt){if(!Te._stopped){var Ue=oe.length,xt=Oe.length,Gt=Z.object;Z.distance=1/0,Z.mouse[0]=st,Z.mouse[1]=rt,Z.object=null,Z.screen=null,Z.dataCoordinate=Z.dataPosition=null;var Jt=!1;if(Ft&&Te._prevButtons)Te._mouseRotating=!0;else{Te._mouseRotating&&(xe=!0),Te._mouseRotating=!1;for(var Ut=0;Ut<Ue;++Ut){var kr=oe[Ut].query(st,Be[1]-rt-1,Te.pickRadius);if(kr){if(kr.distance>Z.distance)continue;for(var Pr=0;Pr<xt;++Pr){var $r=Oe[Pr];if(ke[Pr]===Ut){var rn=$r.pick(kr);rn&&(Z.buttons=Ft,Z.screen=kr.coord,Z.distance=kr.distance,Z.object=$r,Z.index=rn.distance,Z.dataPosition=rn.position,Z.dataCoordinate=rn.dataCoordinate,Z.data=rn,Jt=!0)}}}}}Gt&&Gt!==Z.object&&(Gt.highlight&&Gt.highlight(null),be=!0),Z.object&&(Z.object.highlight&&Z.object.highlight(Z.data),be=!0),Jt=Jt||Z.object!==Gt,Jt&&Te.onselect&&Te.onselect(Z),Ft&1&&!(Te._prevButtons&1)&&Te.onclick&&Te.onclick(Z),Te._prevButtons=Ft}})};function gt(){if(Te.contextLost)return!0;W.isContextLost()&&(Te.contextLost=!0,Te.mouseListener.enabled=!1,Te.selection.object=null,Te.oncontextloss&&Te.oncontextloss())}S.addEventListener("webglcontextlost",gt);function pt(){if(!gt()){W.colorMask(!0,!0,!0,!0),W.depthMask(!0),W.disable(W.BLEND),W.enable(W.DEPTH_TEST),W.depthFunc(W.LEQUAL);for(var Ft=Oe.length,st=oe.length,rt=0;rt<st;++rt){var Ue=oe[rt];Ue.shape=Be,Ue.begin();for(var xt=0;xt<Ft;++xt)if(ke[xt]===rt){var Gt=Oe[xt];Gt.drawPick&&(Gt.pixelRatio=1,Gt.drawPick(De))}Ue.end()}}}var Rt=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],$t=[Rt[0].slice(),Rt[1].slice()];function Wt(){if(!gt()){tt();var Ft=Te.camera.tick();De.view=Te.camera.matrix,be=be||Ft,xe=xe||Ft,re.pixelRatio=Te.pixelRatio,we.pixelRatio=Te.pixelRatio;var st=Oe.length,rt=Rt[0],Ue=Rt[1];rt[0]=rt[1]=rt[2]=1/0,Ue[0]=Ue[1]=Ue[2]=-1/0;for(var xt=0;xt<st;++xt){var Gt=Oe[xt];Gt.pixelRatio=Te.pixelRatio,Gt.axes=Te.axes,be=be||!!Gt.dirty,xe=xe||!!Gt.dirty;var Jt=Gt.bounds;if(Jt)for(var Ut=Jt[0],kr=Jt[1],Pr=0;Pr<3;++Pr)rt[Pr]=Math.min(rt[Pr],Ut[Pr]),Ue[Pr]=Math.max(Ue[Pr],kr[Pr])}var $r=Te.bounds;if(Te.autoBounds)for(var Pr=0;Pr<3;++Pr){if(Ue[Pr]<rt[Pr])rt[Pr]=-1,Ue[Pr]=1;else{rt[Pr]===Ue[Pr]&&(rt[Pr]-=1,Ue[Pr]+=1);var rn=.05*(Ue[Pr]-rt[Pr]);rt[Pr]=rt[Pr]-rn,Ue[Pr]=Ue[Pr]+rn}$r[0][Pr]=rt[Pr],$r[1][Pr]=Ue[Pr]}for(var kn=!1,Pr=0;Pr<3;++Pr)kn=kn||$t[0][Pr]!==$r[0][Pr]||$t[1][Pr]!==$r[1][Pr],$t[0][Pr]=$r[0][Pr],$t[1][Pr]=$r[1][Pr];if(xe=xe||kn,be=be||kn,!!be){if(kn){for(var Rn=[0,0,0],xt=0;xt<3;++xt)Rn[xt]=F(($r[1][xt]-$r[0][xt])/10);re.autoTicks?re.update({bounds:$r,tickSpacing:Rn}):re.update({bounds:$r})}var ci=W.drawingBufferWidth,In=W.drawingBufferHeight;se[0]=ci,se[1]=In,Be[0]=Math.max(ci/Te.pixelRatio,1)|0,Be[1]=Math.max(In/Te.pixelRatio,1)|0,T(Te,J);for(var xt=0;xt<st;++xt){var Gt=Oe[xt];Gt.axesBounds=$r,Te.clipToBounds&&(Gt.clipBounds=$r)}Z.object&&(Te.snapToData?we.position=Z.dataCoordinate:we.position=Z.dataPosition,we.bounds=$r),xe&&(xe=!1,pt()),Te.axesPixels=v(Te.axes,De,ci,In),Te.onrender&&Te.onrender(),W.bindFramebuffer(W.FRAMEBUFFER,null),W.viewport(0,0,ci,In),Te.clearRGBA(),W.depthMask(!0),W.colorMask(!0,!0,!0,!0),W.enable(W.DEPTH_TEST),W.depthFunc(W.LEQUAL),W.disable(W.BLEND),W.disable(W.CULL_FACE);var Gn=!1;re.enable&&(Gn=Gn||re.isTransparent(),re.draw(De)),we.axes=re,Z.object&&we.draw(De),W.disable(W.CULL_FACE);for(var xt=0;xt<st;++xt){var Gt=Oe[xt];Gt.axes=re,Gt.pixelRatio=Te.pixelRatio,Gt.isOpaque&&Gt.isOpaque()&&Gt.draw(De),Gt.isTransparent&&Gt.isTransparent()&&(Gn=!0)}if(Gn){K.shape=se,K.bind(),W.clear(W.DEPTH_BUFFER_BIT),W.colorMask(!1,!1,!1,!1),W.depthMask(!0),W.depthFunc(W.LESS),re.enable&&re.isTransparent()&&re.drawTransparent(De);for(var xt=0;xt<st;++xt){var Gt=Oe[xt];Gt.isOpaque&&Gt.isOpaque()&&Gt.draw(De)}W.enable(W.BLEND),W.blendEquation(W.FUNC_ADD),W.blendFunc(W.ONE,W.ONE_MINUS_SRC_ALPHA),W.colorMask(!0,!0,!0,!0),W.depthMask(!1),W.clearColor(0,0,0,0),W.clear(W.COLOR_BUFFER_BIT),re.isTransparent()&&re.drawTransparent(De);for(var xt=0;xt<st;++xt){var Gt=Oe[xt];Gt.isTransparent&&Gt.isTransparent()&&Gt.drawTransparent(De)}W.bindFramebuffer(W.FRAMEBUFFER,null),W.blendFunc(W.ONE,W.ONE_MINUS_SRC_ALPHA),W.disable(W.DEPTH_TEST),Q.bind(),K.color[0].bind(0),Q.uniforms.accumBuffer=0,x(W),W.disable(W.BLEND)}be=!1;for(var xt=0;xt<st;++xt)Oe[xt].dirty=!1}}}function Ht(){Te._stopped||Te.contextLost||(Wt(),requestAnimationFrame(Ht))}return Te.enableMouseListeners(),Ht(),Te.redraw=function(){Te._stopped||(be=!0,Wt())},Te}function T(y,S){var M=y.bounds,W=y.cameraParams,$=W.projection,Z=W.model,K=y.gl.drawingBufferWidth,Q=y.gl.drawingBufferHeight,J=y.zNear,G=y.zFar,ee=y.fovy,re=K/Q;S?(D($,-re,re,-1,1,J,G),W._ortho=!0):(E($,ee,re,J,G),W._ortho=!1);for(var fe=0;fe<16;++fe)Z[fe]=0;Z[15]=1;for(var we=0,fe=0;fe<3;++fe)we=Math.max(we,M[1][fe]-M[0][fe]);for(var fe=0;fe<3;++fe)y.autoScale?Z[5*fe]=y.aspect[fe]/(M[1][fe]-M[0][fe]):Z[5*fe]=1/we,y.autoCenter&&(Z[12+fe]=-Z[5*fe]*.5*(M[0][fe]+M[1][fe]))}}),783:(function(l){l.exports=u;function u(c,p,f,v){var h=p[0],m=p[1],_=p[2],x=p[3],A=f[0],E=f[1],D=f[2],g=f[3],C,I,N,F,k;return I=h*A+m*E+_*D+x*g,I<0&&(I=-I,A=-A,E=-E,D=-D,g=-g),1-I>1e-6?(C=Math.acos(I),N=Math.sin(C),F=Math.sin((1-v)*C)/N,k=Math.sin(v*C)/N):(F=1-v,k=v),c[0]=F*h+k*A,c[1]=F*m+k*E,c[2]=F*_+k*D,c[3]=F*x+k*g,c}}),5964:(function(l){l.exports=function(u){return!u&&u!==0?"":u.toString()}}),9366:(function(l,u,c){var p=c(4359);l.exports=v;var f={};function v(h,m,_){var x=[m.style,m.weight,m.variant,m.family].join("_"),A=f[x];if(A||(A=f[x]={}),h in A)return A[h];var E={textAlign:"center",textBaseline:"middle",lineHeight:1,font:m.family,fontStyle:m.style,fontWeight:m.weight,fontVariant:m.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};E.triangles=!0;var D=p(h,E);E.triangles=!1;var g=p(h,E),C,I;if(_&&_!==1){for(C=0;C<D.positions.length;++C)for(I=0;I<D.positions[C].length;++I)D.positions[C][I]/=_;for(C=0;C<g.positions.length;++C)for(I=0;I<g.positions[C].length;++I)g.positions[C][I]/=_}var N=[[1/0,1/0],[-1/0,-1/0]],F=g.positions.length;for(C=0;C<F;++C){var k=g.positions[C];for(I=0;I<2;++I)N[0][I]=Math.min(N[0][I],k[I]),N[1][I]=Math.max(N[1][I],k[I])}return A[h]=[D,g,N]}}),1283:(function(l,u,c){var p=c(9405),f=c(3236),v=f([`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;
  }
}`]),h=f([`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;
  }
}`]),m=f([`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;
  }
}
`]),_=f([`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;
}
`]),x=f([`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);
}`]),A=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],E={vertex:v,fragment:_,attributes:A},D={vertex:h,fragment:_,attributes:A},g={vertex:m,fragment:_,attributes:A},C={vertex:v,fragment:x,attributes:A},I={vertex:h,fragment:x,attributes:A},N={vertex:m,fragment:x,attributes:A};function F(k,P){var T=p(k,P),y=T.attributes;return y.position.location=0,y.color.location=1,y.glyph.location=2,y.id.location=3,T}u.createPerspective=function(k){return F(k,E)},u.createOrtho=function(k){return F(k,D)},u.createProject=function(k){return F(k,g)},u.createPickPerspective=function(k){return F(k,C)},u.createPickOrtho=function(k){return F(k,I)},u.createPickProject=function(k){return F(k,N)}}),8418:(function(l,u,c){var p=c(5219),f=c(2762),v=c(8116),h=c(1888),m=c(6760),_=c(1283),x=c(9366),A=c(5964),E=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],D=ArrayBuffer,g=DataView;function C(he){return D.isView(he)&&!(he instanceof g)}function I(he){return Array.isArray(he)||C(he)}l.exports=_e;function N(he,De){var xe=he[0],se=he[1],Ee=he[2],Te=he[3];return he[0]=De[0]*xe+De[4]*se+De[8]*Ee+De[12]*Te,he[1]=De[1]*xe+De[5]*se+De[9]*Ee+De[13]*Te,he[2]=De[2]*xe+De[6]*se+De[10]*Ee+De[14]*Te,he[3]=De[3]*xe+De[7]*se+De[11]*Ee+De[15]*Te,he}function F(he,De,xe,se){return N(se,se),N(se,se),N(se,se)}function k(he,De){this.index=he,this.dataCoordinate=this.position=De}function P(he){return he===!0||he>1?1:he}function T(he,De,xe,se,Ee,Te,Be,tt,at,gt,pt,Rt){this.gl=he,this.pixelRatio=1,this.shader=De,this.orthoShader=xe,this.projectShader=se,this.pointBuffer=Ee,this.colorBuffer=Te,this.glyphBuffer=Be,this.idBuffer=tt,this.vao=at,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=gt,this.pickOrthoShader=pt,this.pickProjectShader=Rt,this.points=[],this._selectResult=new k(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}var y=T.prototype;y.pickSlots=1,y.setPickBase=function(he){this.pickId=he},y.isTransparent=function(){if(this.hasAlpha)return!0;for(var he=0;he<3;++he)if(this.axesProject[he]&&this.projectHasAlpha)return!0;return!1},y.isOpaque=function(){if(!this.hasAlpha)return!0;for(var he=0;he<3;++he)if(this.axesProject[he]&&!this.projectHasAlpha)return!0;return!1};var S=[0,0],M=[0,0,0],W=[0,0,0],$=[0,0,0,1],Z=[0,0,0,1],K=E.slice(),Q=[0,0,0],J=[[0,0,0],[0,0,0]];function G(he){return he[0]=he[1]=he[2]=0,he}function ee(he,De){return he[0]=De[0],he[1]=De[1],he[2]=De[2],he[3]=1,he}function re(he,De,xe,se){return he[0]=De[0],he[1]=De[1],he[2]=De[2],he[xe]=se,he}function fe(he){for(var De=J,xe=0;xe<2;++xe)for(var se=0;se<3;++se)De[xe][se]=Math.max(Math.min(he[xe][se],1e8),-1e8);return De}function we(he,De,xe,se){var Ee=De.axesProject,Te=De.gl,Be=he.uniforms,tt=xe.model||E,at=xe.view||E,gt=xe.projection||E,pt=De.axesBounds,Rt=fe(De.clipBounds),$t;De.axes&&De.axes.lastCubeProps?$t=De.axes.lastCubeProps.axis:$t=[1,1,1],S[0]=2/Te.drawingBufferWidth,S[1]=2/Te.drawingBufferHeight,he.bind(),Be.view=at,Be.projection=gt,Be.screenSize=S,Be.highlightId=De.highlightId,Be.highlightScale=De.highlightScale,Be.clipBounds=Rt,Be.pickGroup=De.pickId/255,Be.pixelRatio=se;for(var Wt=0;Wt<3;++Wt)if(Ee[Wt]){Be.scale=De.projectScale[Wt],Be.opacity=De.projectOpacity[Wt];for(var Ht=K,Ft=0;Ft<16;++Ft)Ht[Ft]=0;for(var Ft=0;Ft<4;++Ft)Ht[5*Ft]=1;Ht[5*Wt]=0,$t[Wt]<0?Ht[12+Wt]=pt[0][Wt]:Ht[12+Wt]=pt[1][Wt],m(Ht,tt,Ht),Be.model=Ht;var st=(Wt+1)%3,rt=(Wt+2)%3,Ue=G(M),xt=G(W);Ue[st]=1,xt[rt]=1;var Gt=F(gt,at,tt,ee($,Ue)),Jt=F(gt,at,tt,ee(Z,xt));if(Math.abs(Gt[1])>Math.abs(Jt[1])){var Ut=Gt;Gt=Jt,Jt=Ut,Ut=Ue,Ue=xt,xt=Ut;var kr=st;st=rt,rt=kr}Gt[0]<0&&(Ue[st]=-1),Jt[1]>0&&(xt[rt]=-1);for(var Pr=0,$r=0,Ft=0;Ft<4;++Ft)Pr+=Math.pow(tt[4*st+Ft],2),$r+=Math.pow(tt[4*rt+Ft],2);Ue[st]/=Math.sqrt(Pr),xt[rt]/=Math.sqrt($r),Be.axes[0]=Ue,Be.axes[1]=xt,Be.fragClipBounds[0]=re(Q,Rt[0],Wt,-1e8),Be.fragClipBounds[1]=re(Q,Rt[1],Wt,1e8),De.vao.bind(),De.vao.draw(Te.TRIANGLES,De.vertexCount),De.lineWidth>0&&(Te.lineWidth(De.lineWidth*se),De.vao.draw(Te.LINES,De.lineVertexCount,De.vertexCount)),De.vao.unbind()}}var Oe=[-1e8,-1e8,-1e8],ke=[1e8,1e8,1e8],Le=[Oe,ke];function oe(he,De,xe,se,Ee,Te,Be){var tt=xe.gl;if((Te===xe.projectHasAlpha||Be)&&we(De,xe,se,Ee),Te===xe.hasAlpha||Be){he.bind();var at=he.uniforms;at.model=se.model||E,at.view=se.view||E,at.projection=se.projection||E,S[0]=2/tt.drawingBufferWidth,S[1]=2/tt.drawingBufferHeight,at.screenSize=S,at.highlightId=xe.highlightId,at.highlightScale=xe.highlightScale,at.fragClipBounds=Le,at.clipBounds=xe.axes.bounds,at.opacity=xe.opacity,at.pickGroup=xe.pickId/255,at.pixelRatio=Ee,xe.vao.bind(),xe.vao.draw(tt.TRIANGLES,xe.vertexCount),xe.lineWidth>0&&(tt.lineWidth(xe.lineWidth*Ee),xe.vao.draw(tt.LINES,xe.lineVertexCount,xe.vertexCount)),xe.vao.unbind()}}y.draw=function(he){var De=this.useOrtho?this.orthoShader:this.shader;oe(De,this.projectShader,this,he,this.pixelRatio,!1,!1)},y.drawTransparent=function(he){var De=this.useOrtho?this.orthoShader:this.shader;oe(De,this.projectShader,this,he,this.pixelRatio,!0,!1)},y.drawPick=function(he){var De=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;oe(De,this.pickProjectShader,this,he,1,!0,!0)},y.pick=function(he){if(!he||he.id!==this.pickId)return null;var De=he.value[2]+(he.value[1]<<8)+(he.value[0]<<16);if(De>=this.pointCount||De<0)return null;var xe=this.points[De],se=this._selectResult;se.index=De;for(var Ee=0;Ee<3;++Ee)se.position[Ee]=se.dataCoordinate[Ee]=xe[Ee];return se},y.highlight=function(he){if(!he)this.highlightId=[1,1,1,1];else{var De=he.index,xe=De&255,se=De>>8&255,Ee=De>>16&255;this.highlightId=[xe/255,se/255,Ee/255,0]}};function be(he,De,xe,se){var Ee;I(he)?De<he.length?Ee=he[De]:Ee=void 0:Ee=he,Ee=A(Ee);var Te=!0;p(Ee)&&(Ee="▼",Te=!1),xe||(xe={});var Be=xe.family;I(Be)&&(Be=Be[De]),Be||(Be="normal");var tt=xe.weight;I(tt)&&(tt=tt[De]),tt||(tt="normal");var at=xe.style;I(at)&&(at=at[De]),at||(at="normal");var gt=xe.variant;I(gt)&&(gt=gt[De]),gt||(gt="normal");var pt=x(Ee,{family:Be,weight:tt,style:at,variant:gt},se),pt=x(Ee,xe,se);return{mesh:pt[0],lines:pt[1],bounds:pt[2],visible:Te}}y.update=function(he){if(he=he||{},"perspective"in he&&(this.useOrtho=!he.perspective),"orthographic"in he&&(this.useOrtho=!!he.orthographic),"lineWidth"in he&&(this.lineWidth=he.lineWidth),"project"in he)if(I(he.project))this.axesProject=he.project;else{var De=!!he.project;this.axesProject=[De,De,De]}if("projectScale"in he)if(I(he.projectScale))this.projectScale=he.projectScale.slice();else{var xe=+he.projectScale;this.projectScale=[xe,xe,xe]}if(this.projectHasAlpha=!1,"projectOpacity"in he){if(I(he.projectOpacity))this.projectOpacity=he.projectOpacity.slice();else{var xe=+he.projectOpacity;this.projectOpacity=[xe,xe,xe]}for(var se=0;se<3;++se)this.projectOpacity[se]=P(this.projectOpacity[se]),this.projectOpacity[se]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in he&&(this.opacity=P(he.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var Ee=he.position,Te={family:he.font||"normal",style:he.fontStyle||"normal",weight:he.fontWeight||"normal",variant:he.fontVariant||"normal"},Be=he.alignment||[0,0],tt,at;if(Be.length===2)tt=Be[0],at=Be[1];else{tt=[],at=[];for(var se=0;se<Be.length;++se)tt[se]=Be[se][0],at[se]=Be[se][1]}var gt=[1/0,1/0,1/0],pt=[-1/0,-1/0,-1/0],Rt=he.glyph,$t=he.color,Wt=he.size,Ht=he.angle,Ft=he.lineColor,st=-1,rt=0,Ue=0,xt=0;if(Ee.length){xt=Ee.length;e:for(var se=0;se<xt;++se){for(var Gt=Ee[se],Jt=0;Jt<3;++Jt)if(isNaN(Gt[Jt])||!isFinite(Gt[Jt]))continue e;var Ut=be(Rt,se,Te,this.pixelRatio),kr=Ut.mesh,Pr=Ut.lines,$r=Ut.bounds;rt+=kr.cells.length*3,Ue+=Pr.edges.length*2}}var rn=rt+Ue,kn=h.mallocFloat(3*rn),Rn=h.mallocFloat(4*rn),ci=h.mallocFloat(2*rn),In=h.mallocUint32(rn);if(rn>0){var Gn=0,mr=rt,St=[0,0,0,1],Ot=[0,0,0,1],Et=I($t)&&I($t[0]),je=I(Ft)&&I(Ft[0]);e:for(var se=0;se<xt;++se){st+=1;for(var Gt=Ee[se],Jt=0;Jt<3;++Jt){if(isNaN(Gt[Jt])||!isFinite(Gt[Jt]))continue e;pt[Jt]=Math.max(pt[Jt],Gt[Jt]),gt[Jt]=Math.min(gt[Jt],Gt[Jt])}var Ut=be(Rt,se,Te,this.pixelRatio),kr=Ut.mesh,Pr=Ut.lines,$r=Ut.bounds,Ye=Ut.visible;if(!Ye)St=[1,1,1,0];else if(I($t)){var et;if(Et?se<$t.length?et=$t[se]:et=[0,0,0,0]:et=$t,et.length===3){for(var Jt=0;Jt<3;++Jt)St[Jt]=et[Jt];St[3]=1}else if(et.length===4){for(var Jt=0;Jt<4;++Jt)St[Jt]=et[Jt];!this.hasAlpha&&et[3]<1&&(this.hasAlpha=!0)}}else St[0]=St[1]=St[2]=0,St[3]=1;if(!Ye)Ot=[1,1,1,0];else if(I(Ft)){var et;if(je?se<Ft.length?et=Ft[se]:et=[0,0,0,0]:et=Ft,et.length===3){for(var Jt=0;Jt<3;++Jt)Ot[Jt]=et[Jt];Ot[Jt]=1}else if(et.length===4){for(var Jt=0;Jt<4;++Jt)Ot[Jt]=et[Jt];!this.hasAlpha&&et[3]<1&&(this.hasAlpha=!0)}}else Ot[0]=Ot[1]=Ot[2]=0,Ot[3]=1;var mt=.5;Ye?I(Wt)?se<Wt.length?mt=+Wt[se]:mt=12:Wt?mt=+Wt:this.useOrtho&&(mt=12):mt=0;var Nt=0;I(Ht)?se<Ht.length?Nt=+Ht[se]:Nt=0:Ht&&(Nt=+Ht);for(var lr=Math.cos(Nt),br=Math.sin(Nt),Gt=Ee[se],Jt=0;Jt<3;++Jt)pt[Jt]=Math.max(pt[Jt],Gt[Jt]),gt[Jt]=Math.min(gt[Jt],Gt[Jt]);var Or=tt,tn=at,Or=0;I(tt)?se<tt.length?Or=tt[se]:Or=0:tt&&(Or=tt);var tn=0;I(at)?se<at.length?tn=at[se]:tn=0:at&&(tn=at),Or*=Or>0?1-$r[0][0]:Or<0?1+$r[1][0]:1,tn*=tn>0?1-$r[0][1]:tn<0?1+$r[1][1]:1;for(var Jr=[Or,tn],Oa=kr.cells||[],Da=kr.positions||[],Jt=0;Jt<Oa.length;++Jt)for(var dn=Oa[Jt],on=0;on<3;++on){for(var Nn=0;Nn<3;++Nn)kn[3*Gn+Nn]=Gt[Nn];for(var Nn=0;Nn<4;++Nn)Rn[4*Gn+Nn]=St[Nn];In[Gn]=st;var Wi=Da[dn[on]];ci[2*Gn]=mt*(lr*Wi[0]-br*Wi[1]+Jr[0]),ci[2*Gn+1]=mt*(br*Wi[0]+lr*Wi[1]+Jr[1]),Gn+=1}for(var Oa=Pr.edges,Da=Pr.positions,Jt=0;Jt<Oa.length;++Jt)for(var dn=Oa[Jt],on=0;on<2;++on){for(var Nn=0;Nn<3;++Nn)kn[3*mr+Nn]=Gt[Nn];for(var Nn=0;Nn<4;++Nn)Rn[4*mr+Nn]=Ot[Nn];In[mr]=st;var Wi=Da[dn[on]];ci[2*mr]=mt*(lr*Wi[0]-br*Wi[1]+Jr[0]),ci[2*mr+1]=mt*(br*Wi[0]+lr*Wi[1]+Jr[1]),mr+=1}}}this.bounds=[gt,pt],this.points=Ee,this.pointCount=Ee.length,this.vertexCount=rt,this.lineVertexCount=Ue,this.pointBuffer.update(kn),this.colorBuffer.update(Rn),this.glyphBuffer.update(ci),this.idBuffer.update(In),h.free(kn),h.free(Rn),h.free(ci),h.free(In)},y.dispose=function(){this.shader.dispose(),this.orthoShader.dispose(),this.pickPerspectiveShader.dispose(),this.pickOrthoShader.dispose(),this.vao.dispose(),this.pointBuffer.dispose(),this.colorBuffer.dispose(),this.glyphBuffer.dispose(),this.idBuffer.dispose()};function _e(he){var De=he.gl,xe=_.createPerspective(De),se=_.createOrtho(De),Ee=_.createProject(De),Te=_.createPickPerspective(De),Be=_.createPickOrtho(De),tt=_.createPickProject(De),at=f(De),gt=f(De),pt=f(De),Rt=f(De),$t=v(De,[{buffer:at,size:3,type:De.FLOAT},{buffer:gt,size:4,type:De.FLOAT},{buffer:pt,size:2,type:De.FLOAT},{buffer:Rt,size:4,type:De.UNSIGNED_BYTE,normalized:!0}]),Wt=new T(De,xe,se,Ee,at,gt,pt,Rt,$t,Te,Be,tt);return Wt.update(he),Wt}}),3589:(function(l,u,c){l.exports=E;var p=c(2260),f=c(1888),v=c(9618),h=c(8828).nextPow2,m=function(D,g,C){for(var I=1e8,N=-1,F=-1,k=D.shape[0],P=D.shape[1],T=0;T<k;T++)for(var y=0;y<P;y++){var S=D.get(T,y,0),M=D.get(T,y,1),W=D.get(T,y,2),$=D.get(T,y,3);if(S<255||M<255||W<255||$<255){var Z=g-T,K=C-y,Q=Z*Z+K*K;Q<I&&(I=Q,N=T,F=y)}}return[N,F,I]};function _(D,g,C,I,N){this.coord=[D,g],this.id=C,this.value=I,this.distance=N}function x(D,g,C){this.gl=D,this.fbo=g,this.buffer=C,this._readTimeout=null;var I=this;this._readCallback=function(){I.gl&&(g.bind(),D.readPixels(0,0,g.shape[0],g.shape[1],D.RGBA,D.UNSIGNED_BYTE,I.buffer),I._readTimeout=null)}}var A=x.prototype;Object.defineProperty(A,"shape",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(D){if(this.gl){this.fbo.shape=D;var g=this.fbo.shape[0],C=this.fbo.shape[1];if(C*g*4>this.buffer.length){f.free(this.buffer);for(var I=this.buffer=f.mallocUint8(h(C*g*4)),N=0;N<C*g*4;++N)I[N]=255}return D}}}),A.begin=function(){var D=this.gl;this.shape,D&&(this.fbo.bind(),D.clearColor(1,1,1,1),D.clear(D.COLOR_BUFFER_BIT|D.DEPTH_BUFFER_BIT))},A.end=function(){var D=this.gl;D&&(D.bindFramebuffer(D.FRAMEBUFFER,null),this._readTimeout||clearTimeout(this._readTimeout),this._readTimeout=setTimeout(this._readCallback,1))},A.query=function(D,g,C){if(!this.gl)return null;var I=this.fbo.shape.slice();D=D|0,g=g|0,typeof C!="number"&&(C=1);var N=Math.min(Math.max(D-C,0),I[0])|0,F=Math.min(Math.max(D+C,0),I[0])|0,k=Math.min(Math.max(g-C,0),I[1])|0,P=Math.min(Math.max(g+C,0),I[1])|0;if(F<=N||P<=k)return null;var T=[F-N,P-k],y=v(this.buffer,[T[0],T[1],4],[4,I[0]*4,1],4*(N+I[0]*k)),S=m(y.hi(T[0],T[1],1),C,C),M=S[0],W=S[1];if(M<0||Math.pow(this.radius,2)<S[2])return null;var $=y.get(M,W,0),Z=y.get(M,W,1),K=y.get(M,W,2),Q=y.get(M,W,3);return new _(M+N|0,W+k|0,$,[Z,K,Q],Math.sqrt(S[2]))},A.dispose=function(){this.gl&&(this.fbo.dispose(),f.free(this.buffer),this.gl=null,this._readTimeout&&clearTimeout(this._readTimeout))};function E(D,g){var C=g[0],I=g[1],N={},F=p(D,C,I,N),k=f.mallocUint8(C*I*4);return new x(D,F,k)}}),9405:(function(l,u,c){var p=c(3327),f=c(8731),v=c(216),h=c(5091),m=c(2145),_=c(8866);function x(g){this.gl=g,this.gl.lastAttribCount=0,this._vref=this._fref=this._relink=this.vertShader=this.fragShader=this.program=this.attributes=this.uniforms=this.types=null}var A=x.prototype;A.bind=function(){this.program||this._relink();var g,C=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_ATTRIBUTES),I=this.gl.lastAttribCount;if(C>I)for(g=I;g<C;g++)this.gl.enableVertexAttribArray(g);else if(I>C)for(g=C;g<I;g++)this.gl.disableVertexAttribArray(g);this.gl.lastAttribCount=C,this.gl.useProgram(this.program)},A.dispose=function(){for(var g=this.gl.lastAttribCount,C=0;C<g;C++)this.gl.disableVertexAttribArray(C);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 E(g,C){return g.name<C.name?-1:1}A.update=function(g,C,I,N){if(!C||arguments.length===1){var F=g;g=F.vertex,C=F.fragment,I=F.uniforms,N=F.attributes}var k=this,P=k.gl,T=k._vref;k._vref=h.shader(P,P.VERTEX_SHADER,g),T&&T.dispose(),k.vertShader=k._vref.shader;var y=this._fref;if(k._fref=h.shader(P,P.FRAGMENT_SHADER,C),y&&y.dispose(),k.fragShader=k._fref.shader,!I||!N){var S=P.createProgram();if(P.attachShader(S,k.fragShader),P.attachShader(S,k.vertShader),P.linkProgram(S),!P.getProgramParameter(S,P.LINK_STATUS)){var M=P.getProgramInfoLog(S);throw new _(M,"Error linking program:"+M)}I=I||m.uniforms(P,S),N=N||m.attributes(P,S),P.deleteProgram(S)}N=N.slice(),N.sort(E);var W=[],$=[],Z=[],K;for(K=0;K<N.length;++K){var Q=N[K];if(Q.type.indexOf("mat")>=0){for(var J=Q.type.charAt(Q.type.length-1)|0,G=new Array(J),ee=0;ee<J;++ee)G[ee]=Z.length,$.push(Q.name+"["+ee+"]"),typeof Q.location=="number"?Z.push(Q.location+ee):Array.isArray(Q.location)&&Q.location.length===J&&typeof Q.location[ee]=="number"?Z.push(Q.location[ee]|0):Z.push(-1);W.push({name:Q.name,type:Q.type,locations:G})}else W.push({name:Q.name,type:Q.type,locations:[Z.length]}),$.push(Q.name),typeof Q.location=="number"?Z.push(Q.location|0):Z.push(-1)}var re=0;for(K=0;K<Z.length;++K)if(Z[K]<0){for(;Z.indexOf(re)>=0;)re+=1;Z[K]=re}var fe=new Array(I.length);function we(){k.program=h.program(P,k._vref,k._fref,$,Z);for(var Oe=0;Oe<I.length;++Oe)fe[Oe]=P.getUniformLocation(k.program,I[Oe].name)}we(),k._relink=we,k.types={uniforms:v(I),attributes:v(N)},k.attributes=f(P,k,W,Z),Object.defineProperty(k,"uniforms",p(P,k,I,fe))};function D(g,C,I,N,F){var k=new x(g);return k.update(C,I,N,F),k}l.exports=D}),8866:(function(l){function u(c,p,f){this.shortMessage=p||"",this.longMessage=f||"",this.rawError=c||"",this.message="gl-shader: "+(p||c||"")+(f?`
`+f:""),this.stack=new Error().stack}u.prototype=new Error,u.prototype.name="GLError",u.prototype.constructor=u,l.exports=u}),8731:(function(l,u,c){l.exports=x;var p=c(8866);function f(A,E,D,g,C,I){this._gl=A,this._wrapper=E,this._index=D,this._locations=g,this._dimension=C,this._constFunc=I}var v=f.prototype;v.pointer=function(E,D,g,C){var I=this,N=I._gl,F=I._locations[I._index];N.vertexAttribPointer(F,I._dimension,E||N.FLOAT,!!D,g||0,C||0),N.enableVertexAttribArray(F)},v.set=function(A,E,D,g){return this._constFunc(this._locations[this._index],A,E,D,g)},Object.defineProperty(v,"location",{get:function(){return this._locations[this._index]},set:function(A){return A!==this._locations[this._index]&&(this._locations[this._index]=A|0,this._wrapper.program=null),A|0}});var h=[function(A,E,D){return D.length===void 0?A.vertexAttrib1f(E,D):A.vertexAttrib1fv(E,D)},function(A,E,D,g){return D.length===void 0?A.vertexAttrib2f(E,D,g):A.vertexAttrib2fv(E,D)},function(A,E,D,g,C){return D.length===void 0?A.vertexAttrib3f(E,D,g,C):A.vertexAttrib3fv(E,D)},function(A,E,D,g,C,I){return D.length===void 0?A.vertexAttrib4f(E,D,g,C,I):A.vertexAttrib4fv(E,D)}];function m(A,E,D,g,C,I,N){var F=h[C],k=new f(A,E,D,g,C,F);Object.defineProperty(I,N,{set:function(P){return A.disableVertexAttribArray(g[D]),F(A,g[D],P),P},get:function(){return k},enumerable:!0})}function _(A,E,D,g,C,I,N){for(var F=new Array(C),k=new Array(C),P=0;P<C;++P)m(A,E,D[P],g,C,F,P),k[P]=F[P];Object.defineProperty(F,"location",{set:function(S){if(Array.isArray(S))for(var M=0;M<C;++M)k[M].location=S[M];else for(var M=0;M<C;++M)k[M].location=S+M;return S},get:function(){for(var S=new Array(C),M=0;M<C;++M)S[M]=g[D[M]];return S},enumerable:!0}),F.pointer=function(S,M,W,$){S=S||A.FLOAT,M=!!M,W=W||C*C,$=$||0;for(var Z=0;Z<C;++Z){var K=g[D[Z]];A.vertexAttribPointer(K,C,S,M,W,$+Z*C),A.enableVertexAttribArray(K)}};var T=new Array(C),y=A["vertexAttrib"+C+"fv"];Object.defineProperty(I,N,{set:function(S){for(var M=0;M<C;++M){var W=g[D[M]];if(A.disableVertexAttribArray(W),Array.isArray(S[0]))y.call(A,W,S[M]);else{for(var $=0;$<C;++$)T[$]=S[C*M+$];y.call(A,W,T)}}return S},get:function(){return F},enumerable:!0})}function x(A,E,D,g){for(var C={},I=0,N=D.length;I<N;++I){var F=D[I],k=F.name,P=F.type,T=F.locations;switch(P){case"bool":case"int":case"float":m(A,E,T[0],g,1,C,k);break;default:if(P.indexOf("vec")>=0){var y=P.charCodeAt(P.length-1)-48;if(y<2||y>4)throw new p("","Invalid data type for attribute "+k+": "+P);m(A,E,T[0],g,y,C,k)}else if(P.indexOf("mat")>=0){var y=P.charCodeAt(P.length-1)-48;if(y<2||y>4)throw new p("","Invalid data type for attribute "+k+": "+P);_(A,E,T,g,y,C,k)}else throw new p("","Unknown data type for attribute "+k+": "+P);break}}return C}}),3327:(function(l,u,c){var p=c(216),f=c(8866);l.exports=m;function v(_){return function(){return _}}function h(_,x){for(var A=new Array(_),E=0;E<_;++E)A[E]=x;return A}function m(_,x,A,E){function D(P){return function(T,y,S){return T.getUniform(y.program,S[P])}}function g(P){return function(y){for(var S=C("",P),M=0;M<S.length;++M){var W=S[M],$=W[0],Z=W[1];if(E[Z]){var K=y;if(typeof $=="string"&&($.indexOf(".")===0||$.indexOf("[")===0)){var Q=$;if($.indexOf(".")===0&&(Q=$.slice(1)),Q.indexOf("]")===Q.length-1){var J=Q.indexOf("["),G=Q.slice(0,J),ee=Q.slice(J+1,Q.length-1);K=G?y[G][ee]:y[ee]}else K=y[Q]}var re=A[Z].type,fe;switch(re){case"bool":case"int":case"sampler2D":case"samplerCube":_.uniform1i(E[Z],K);break;case"float":_.uniform1f(E[Z],K);break;default:var we=re.indexOf("vec");if(0<=we&&we<=1&&re.length===4+we){if(fe=re.charCodeAt(re.length-1)-48,fe<2||fe>4)throw new f("","Invalid data type");switch(re.charAt(0)){case"b":case"i":_["uniform"+fe+"iv"](E[Z],K);break;case"v":_["uniform"+fe+"fv"](E[Z],K);break;default:throw new f("","Unrecognized data type for vector "+name+": "+re)}}else if(re.indexOf("mat")===0&&re.length===4){if(fe=re.charCodeAt(re.length-1)-48,fe<2||fe>4)throw new f("","Invalid uniform dimension type for matrix "+name+": "+re);_["uniformMatrix"+fe+"fv"](E[Z],!1,K);break}else throw new f("","Unknown uniform data type for "+name+": "+re)}}}}}function C(P,T){if(typeof T!="object")return[[P,T]];var y=[];for(var S in T){var M=T[S],W=P;parseInt(S)+""===S?W+="["+S+"]":W+="."+S,typeof M=="object"?y.push.apply(y,C(W,M)):y.push([W,M])}return y}function I(P){switch(P){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var T=P.indexOf("vec");if(0<=T&&T<=1&&P.length===4+T){var y=P.charCodeAt(P.length-1)-48;if(y<2||y>4)throw new f("","Invalid data type");return P.charAt(0)==="b"?h(y,!1):h(y,0)}else if(P.indexOf("mat")===0&&P.length===4){var y=P.charCodeAt(P.length-1)-48;if(y<2||y>4)throw new f("","Invalid uniform dimension type for matrix "+name+": "+P);return h(y*y,0)}else throw new f("","Unknown uniform data type for "+name+": "+P)}}function N(P,T,y){if(typeof y=="object"){var S=F(y);Object.defineProperty(P,T,{get:v(S),set:g(y),enumerable:!0,configurable:!1})}else E[y]?Object.defineProperty(P,T,{get:D(y),set:g(y),enumerable:!0,configurable:!1}):P[T]=I(A[y].type)}function F(P){var T;if(Array.isArray(P)){T=new Array(P.length);for(var y=0;y<P.length;++y)N(T,y,P[y])}else{T={};for(var S in P)N(T,S,P[S])}return T}var k=p(A,!0);return{get:v(F(k)),set:g(k),enumerable:!0,configurable:!0}}}),216:(function(l){l.exports=u;function u(c,p){for(var f={},v=0;v<c.length;++v)for(var h=c[v].name,m=h.split("."),_=f,x=0;x<m.length;++x){var A=m[x].split("[");if(A.length>1){A[0]in _||(_[A[0]]=[]),_=_[A[0]];for(var E=1;E<A.length;++E){var D=parseInt(A[E]);E<A.length-1||x<m.length-1?(D in _||(E<A.length-1?_[D]=[]:_[D]={}),_=_[D]):p?_[D]=v:_[D]=c[v].type}}else x<m.length-1?(A[0]in _||(_[A[0]]={}),_=_[A[0]]):p?_[A[0]]=v:_[A[0]]=c[v].type}return f}}),2145:(function(l,u){u.uniforms=v,u.attributes=h;var c={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"},p=null;function f(m,_){if(!p){var x=Object.keys(c);p={};for(var A=0;A<x.length;++A){var E=x[A];p[m[E]]=c[E]}}return p[_]}function v(m,_){for(var x=m.getProgramParameter(_,m.ACTIVE_UNIFORMS),A=[],E=0;E<x;++E){var D=m.getActiveUniform(_,E);if(D){var g=f(m,D.type);if(D.size>1)for(var C=0;C<D.size;++C)A.push({name:D.name.replace("[0]","["+C+"]"),type:g});else A.push({name:D.name,type:g})}}return A}function h(m,_){for(var x=m.getProgramParameter(_,m.ACTIVE_ATTRIBUTES),A=[],E=0;E<x;++E){var D=m.getActiveAttrib(_,E);D&&A.push({name:D.name,type:f(m,D.type)})}return A}}),5091:(function(l,u,c){u.shader=C,u.program=I;var p=c(8866),f=c(2992),v=typeof WeakMap>"u"?c(606):WeakMap,h=new v,m=0;function _(N,F,k,P,T,y,S){this.id=N,this.src=F,this.type=k,this.shader=P,this.count=y,this.programs=[],this.cache=S}_.prototype.dispose=function(){if(--this.count===0){for(var N=this.cache,F=N.gl,k=this.programs,P=0,T=k.length;P<T;++P){var y=N.programs[k[P]];y&&(delete N.programs[P],F.deleteProgram(y))}F.deleteShader(this.shader),delete N.shaders[this.type===F.FRAGMENT_SHADER|0][this.src]}};function x(N){this.gl=N,this.shaders=[{},{}],this.programs={}}var A=x.prototype;function E(N,F,k){var P=N.createShader(F);if(N.shaderSource(P,k),N.compileShader(P),!N.getShaderParameter(P,N.COMPILE_STATUS)){var T=N.getShaderInfoLog(P);try{var y=f(T,k,F)}catch(S){throw console.warn("Failed to format compiler error: "+S),new p(T,`Error compiling shader:
`+T)}throw new p(T,y.short,y.long)}return P}A.getShaderReference=function(N,F){var k=this.gl,P=this.shaders[N===k.FRAGMENT_SHADER|0],T=P[F];if(!T||!k.isShader(T.shader)){var y=E(k,N,F);T=P[F]=new _(m++,F,N,y,[],1,this)}else T.count+=1;return T};function D(N,F,k,P,T){var y=N.createProgram();N.attachShader(y,F),N.attachShader(y,k);for(var S=0;S<P.length;++S)N.bindAttribLocation(y,T[S],P[S]);if(N.linkProgram(y),!N.getProgramParameter(y,N.LINK_STATUS)){var M=N.getProgramInfoLog(y);throw new p(M,"Error linking program: "+M)}return y}A.getProgram=function(N,F,k,P){var T=[N.id,F.id,k.join(":"),P.join(":")].join("@"),y=this.programs[T];return(!y||!this.gl.isProgram(y))&&(this.programs[T]=y=D(this.gl,N.shader,F.shader,k,P),N.programs.push(T),F.programs.push(T)),y};function g(N){var F=h.get(N);return F||(F=new x(N),h.set(N,F)),F}function C(N,F,k){return g(N).getShaderReference(F,k)}function I(N,F,k,P,T){return g(N).getProgram(F,k,P,T)}}),1493:(function(l,u,c){var p=c(3236),f=c(9405),v=p([`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];
}
`]),h=p([`precision mediump float;
#define GLSLIFY 1

varying vec4 fragColor;

void main() {
  gl_FragColor = fragColor;
}`]);l.exports=function(m){return f(m,v,h,null,[{name:"position",type:"vec3"},{name:"color",type:"vec3"},{name:"weight",type:"float"}])}}),4449:(function(l,u,c){var p=c(2762),f=c(8116),v=c(1493);l.exports=D;var h=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function m(g,C,I,N){this.gl=g,this.buffer=C,this.vao=I,this.shader=N,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 _=m.prototype,x=[0,0,0],A=[0,0,0],E=[0,0];_.isTransparent=function(){return!1},_.drawTransparent=function(g){},_.draw=function(g){var C=this.gl,I=this.vao,N=this.shader;I.bind(),N.bind();var F=g.model||h,k=g.view||h,P=g.projection||h,T;this.axes&&(T=this.axes.lastCubeProps.axis);for(var y=x,S=A,M=0;M<3;++M)T&&T[M]<0?(y[M]=this.bounds[0][M],S[M]=this.bounds[1][M]):(y[M]=this.bounds[1][M],S[M]=this.bounds[0][M]);E[0]=C.drawingBufferWidth,E[1]=C.drawingBufferHeight,N.uniforms.model=F,N.uniforms.view=k,N.uniforms.projection=P,N.uniforms.coordinates=[this.position,y,S],N.uniforms.colors=this.colors,N.uniforms.screenShape=E;for(var M=0;M<3;++M)N.uniforms.lineWidth=this.lineWidth[M]*this.pixelRatio,this.enabled[M]&&(I.draw(C.TRIANGLES,6,6*M),this.drawSides[M]&&I.draw(C.TRIANGLES,12,18+12*M));I.unbind()},_.update=function(g){g&&("bounds"in g&&(this.bounds=g.bounds),"position"in g&&(this.position=g.position),"lineWidth"in g&&(this.lineWidth=g.lineWidth),"colors"in g&&(this.colors=g.colors),"enabled"in g&&(this.enabled=g.enabled),"drawSides"in g&&(this.drawSides=g.drawSides))},_.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function D(g,C){var I=[];function N(y,S,M,W,$,Z){var K=[y,S,M,0,0,0,1];K[W+3]=1,K[W]=$,I.push.apply(I,K),K[6]=-1,I.push.apply(I,K),K[W]=Z,I.push.apply(I,K),I.push.apply(I,K),K[6]=1,I.push.apply(I,K),K[W]=$,I.push.apply(I,K)}N(0,0,0,0,0,1),N(0,0,0,1,0,1),N(0,0,0,2,0,1),N(1,0,0,1,-1,1),N(1,0,0,2,-1,1),N(0,1,0,0,-1,1),N(0,1,0,2,-1,1),N(0,0,1,0,-1,1),N(0,0,1,1,-1,1);var F=p(g,I),k=f(g,[{type:g.FLOAT,buffer:F,size:3,offset:0,stride:28},{type:g.FLOAT,buffer:F,size:3,offset:12,stride:28},{type:g.FLOAT,buffer:F,size:1,offset:24,stride:28}]),P=v(g);P.attributes.position.location=0,P.attributes.color.location=1,P.attributes.weight.location=2;var T=new m(g,F,k,P);return T.update(C),T}}),6740:(function(l,u,c){var p=c(3236),f=p([`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;
}
`]),v=p([`#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;
}
`]),h=p([`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;
}
`]),m=p([`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);
}`]);u.meshShader={vertex:f,fragment:v,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},u.pickShader={vertex:h,fragment:m,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}}),7815:(function(l,u,c){var p=c(2931),f=c(9970),v=["xyz","xzy","yxz","yzx","zxy","zyx"],h=function(I,N,F,k){for(var P=I.points,T=I.velocities,y=I.divergences,S=[],M=[],W=[],$=[],Z=[],K=[],Q=0,J=0,G=f.create(),ee=f.create(),re=8,fe=0;fe<P.length;fe++){var we=P[fe],Oe=T[fe],ke=y[fe];N===0&&(ke=F*.05),J=p.length(Oe)/k,G=f.create(),p.copy(G,Oe),G[3]=ke;for(var Le=0;Le<re;Le++)Z[Le]=[we[0],we[1],we[2],Le];if($.length>0)for(var Le=0;Le<re;Le++){var oe=(Le+1)%re;S.push($[Le],Z[Le],Z[oe],Z[oe],$[oe],$[Le]),W.push(ee,G,G,G,ee,ee),K.push(Q,J,J,J,Q,Q);var be=S.length;M.push([be-6,be-5,be-4],[be-3,be-2,be-1])}var _e=$;$=Z,Z=_e;var he=ee;ee=G,G=he;var De=Q;Q=J,J=De}return{positions:S,cells:M,vectors:W,vertexIntensity:K}},m=function(I,N,F,k){for(var P=0,T=0;T<I.length;T++)for(var y=I[T].velocities,S=0;S<y.length;S++)P=Math.max(P,p.length(y[S]));for(var M=I.map(function(fe){return h(fe,F,k,P)}),W=[],$=[],Z=[],K=[],T=0;T<M.length;T++){var Q=M[T],J=W.length;W=W.concat(Q.positions),Z=Z.concat(Q.vectors),K=K.concat(Q.vertexIntensity);for(var S=0;S<Q.cells.length;S++){var G=Q.cells[S],ee=[];$.push(ee);for(var re=0;re<G.length;re++)ee.push(G[re]+J)}}return{positions:W,cells:$,vectors:Z,vertexIntensity:K,colormap:N}},_=function(I,N){var F=I.length,k;for(k=0;k<F;k++){var P=I[k];if(P===N)return k;if(P>N)return k-1}return k},x=function(I,N,F){return I<N?N:I>F?F:I},A=function(I,N,F){var k=N.vectors,P=N.meshgrid,T=I[0],y=I[1],S=I[2],M=P[0].length,W=P[1].length,$=P[2].length,Z=_(P[0],T),K=_(P[1],y),Q=_(P[2],S),J=Z+1,G=K+1,ee=Q+1;if(Z=x(Z,0,M-1),J=x(J,0,M-1),K=x(K,0,W-1),G=x(G,0,W-1),Q=x(Q,0,$-1),ee=x(ee,0,$-1),Z<0||K<0||Q<0||J>M-1||G>W-1||ee>$-1)return p.create();var re=P[0][Z],fe=P[0][J],we=P[1][K],Oe=P[1][G],ke=P[2][Q],Le=P[2][ee],oe=(T-re)/(fe-re),be=(y-we)/(Oe-we),_e=(S-ke)/(Le-ke);isFinite(oe)||(oe=.5),isFinite(be)||(be=.5),isFinite(_e)||(_e=.5);var he,De,xe,se,Ee,Te;switch(F.reversedX&&(Z=M-1-Z,J=M-1-J),F.reversedY&&(K=W-1-K,G=W-1-G),F.reversedZ&&(Q=$-1-Q,ee=$-1-ee),F.filled){case 5:Ee=Q,Te=ee,xe=K*$,se=G*$,he=Z*$*W,De=J*$*W;break;case 4:Ee=Q,Te=ee,he=Z*$,De=J*$,xe=K*$*M,se=G*$*M;break;case 3:xe=K,se=G,Ee=Q*W,Te=ee*W,he=Z*W*$,De=J*W*$;break;case 2:xe=K,se=G,he=Z*W,De=J*W,Ee=Q*W*M,Te=ee*W*M;break;case 1:he=Z,De=J,Ee=Q*M,Te=ee*M,xe=K*M*$,se=G*M*$;break;default:he=Z,De=J,xe=K*M,se=G*M,Ee=Q*M*W,Te=ee*M*W;break}var Be=k[he+xe+Ee],tt=k[he+xe+Te],at=k[he+se+Ee],gt=k[he+se+Te],pt=k[De+xe+Ee],Rt=k[De+xe+Te],$t=k[De+se+Ee],Wt=k[De+se+Te],Ht=p.create(),Ft=p.create(),st=p.create(),rt=p.create();p.lerp(Ht,Be,pt,oe),p.lerp(Ft,tt,Rt,oe),p.lerp(st,at,$t,oe),p.lerp(rt,gt,Wt,oe);var Ue=p.create(),xt=p.create();p.lerp(Ue,Ht,st,be),p.lerp(xt,Ft,rt,be);var Gt=p.create();return p.lerp(Gt,Ue,xt,_e),Gt},E=function(I){var N=1/0;I.sort(function(T,y){return T-y});for(var F=I.length,k=1;k<F;k++){var P=Math.abs(I[k]-I[k-1]);P<N&&(N=P)}return N},D=function(I){for(var N=[],F=[],k=[],P={},T={},y={},S=I.length,M=0;M<S;M++){var W=I[M],$=W[0],Z=W[1],K=W[2];P[$]||(N.push($),P[$]=!0),T[Z]||(F.push(Z),T[Z]=!0),y[K]||(k.push(K),y[K]=!0)}var Q=E(N),J=E(F),G=E(k),ee=Math.min(Q,J,G);return isFinite(ee)?ee:1};l.exports=function(I,N){var F=I.startingPositions,k=I.maxLength||1e3,P=I.tubeSize||1,T=I.absoluteTubeSize,y=I.gridFill||"+x+y+z",S={};y.indexOf("-x")!==-1&&(S.reversedX=!0),y.indexOf("-y")!==-1&&(S.reversedY=!0),y.indexOf("-z")!==-1&&(S.reversedZ=!0),S.filled=v.indexOf(y.replace(/-/g,"").replace(/\+/g,""));var M=I.getVelocity||function(Rt){return A(Rt,I,S)},W=I.getDivergence||function(Rt,$t){var Wt=p.create(),Ht=1e-4;p.add(Wt,Rt,[Ht,0,0]);var Ft=M(Wt);p.subtract(Ft,Ft,$t),p.scale(Ft,Ft,1/Ht),p.add(Wt,Rt,[0,Ht,0]);var st=M(Wt);p.subtract(st,st,$t),p.scale(st,st,1/Ht),p.add(Wt,Rt,[0,0,Ht]);var rt=M(Wt);return p.subtract(rt,rt,$t),p.scale(rt,rt,1/Ht),p.add(Wt,Ft,st),p.add(Wt,Wt,rt),Wt},$=[],Z=N[0][0],K=N[0][1],Q=N[0][2],J=N[1][0],G=N[1][1],ee=N[1][2],re=function(Rt){var $t=Rt[0],Wt=Rt[1],Ht=Rt[2];return!($t<Z||$t>J||Wt<K||Wt>G||Ht<Q||Ht>ee)},fe=p.distance(N[0],N[1]),we=10*fe/k,Oe=we*we,ke=1,Le=0,oe=F.length;oe>1&&(ke=D(F));for(var be=0;be<oe;be++){var _e=p.create();p.copy(_e,F[be]);var he=[_e],De=[],xe=M(_e),se=_e;De.push(xe);var Ee=[],Te=W(_e,xe),Be=p.length(Te);isFinite(Be)&&Be>Le&&(Le=Be),Ee.push(Be),$.push({points:he,velocities:De,divergences:Ee});for(var tt=0;tt<k*100&&he.length<k&&re(_e);){tt++;var at=p.clone(xe),gt=p.squaredLength(at);if(gt===0)break;if(gt>Oe&&p.scale(at,at,we/Math.sqrt(gt)),p.add(at,at,_e),xe=M(at),p.squaredDistance(se,at)-Oe>-1e-4*Oe){he.push(at),se=at,De.push(xe);var Te=W(at,xe),Be=p.length(Te);isFinite(Be)&&Be>Le&&(Le=Be),Ee.push(Be)}_e=at}}var pt=m($,I.colormap,Le,ke);return T?pt.tubeScale=T:(Le===0&&(Le=1),pt.tubeScale=P*.5*ke/Le),pt};var g=c(6740),C=c(6405).createMesh;l.exports.createTubeMesh=function(I,N){return C(I,N,{shaders:g,traceType:"streamtube"})}}),990:(function(l,u,c){var p=c(9405),f=c(3236),v=f([`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);
}
`]),h=f([`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;
}
`]),m=f([`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);
}
`]),_=f([`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));
}
`]);u.createShader=function(x){var A=p(x,v,h,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return A.attributes.uv.location=0,A.attributes.f.location=1,A.attributes.normal.location=2,A},u.createPickShader=function(x){var A=p(x,v,_,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return A.attributes.uv.location=0,A.attributes.f.location=1,A.attributes.normal.location=2,A},u.createContourShader=function(x){var A=p(x,m,h,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return A.attributes.uv.location=0,A.attributes.f.location=1,A},u.createPickContourShader=function(x){var A=p(x,m,_,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return A.attributes.uv.location=0,A.attributes.f.location=1,A}}),9499:(function(l,u,c){l.exports=De;var p=c(8828),f=c(2762),v=c(8116),h=c(7766),m=c(1888),_=c(6729),x=c(5298),A=c(9994),E=c(9618),D=c(3711),g=c(6760),C=c(7608),I=c(2478),N=c(6199),F=c(990),k=F.createShader,P=F.createContourShader,T=F.createPickShader,y=F.createPickContourShader,S=40,M=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],W=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],$=[[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 xe=0;xe<3;++xe){var se=$[xe],Ee=(xe+1)%3,Te=(xe+2)%3;se[Ee+0]=1,se[Te+3]=1,se[xe+6]=1}})();function Z(xe,se,Ee,Te,Be){this.position=xe,this.index=se,this.uv=Ee,this.level=Te,this.dataCoordinate=Be}var K=256;function Q(xe,se,Ee,Te,Be,tt,at,gt,pt,Rt,$t,Wt,Ht,Ft,st){this.gl=xe,this.shape=se,this.bounds=Ee,this.objectOffset=st,this.intensityBounds=[],this._shader=Te,this._pickShader=Be,this._coordinateBuffer=tt,this._vao=at,this._colorMap=gt,this._contourShader=pt,this._contourPickShader=Rt,this._contourBuffer=$t,this._contourVAO=Wt,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new Z([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=Ht,this._dynamicVAO=Ft,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=[E(m.mallocFloat(1024),[0,0]),E(m.mallocFloat(1024),[0,0]),E(m.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var J=Q.prototype;J.genColormap=function(xe,se){var Ee=!1,Te=A([_({colormap:xe,nshades:K,format:"rgba"}).map(function(Be,tt){var at=se?G(tt/255,se):Be[3];return at<1&&(Ee=!0),[Be[0],Be[1],Be[2],255*at]})]);return x.divseq(Te,255),this.hasAlphaScale=Ee,Te},J.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},J.isOpaque=function(){return!this.isTransparent()},J.pickSlots=1,J.setPickBase=function(xe){this.pickId=xe};function G(xe,se){if(!se||!se.length)return 1;for(var Ee=0;Ee<se.length;++Ee){if(se.length<2)return 1;if(se[Ee][0]===xe)return se[Ee][1];if(se[Ee][0]>xe&&Ee>0){var Te=(se[Ee][0]-xe)/(se[Ee][0]-se[Ee-1][0]);return se[Ee][1]*(1-Te)+Te*se[Ee-1][1]}}return 1}var ee=[0,0,0],re={showSurface:!1,showContour:!1,projections:[M.slice(),M.slice(),M.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function fe(xe,se){var Ee,Te,Be,tt=se.axes&&se.axes.lastCubeProps.axis||ee,at=se.showSurface,gt=se.showContour;for(Ee=0;Ee<3;++Ee)for(at=at||se.surfaceProject[Ee],Te=0;Te<3;++Te)gt=gt||se.contourProject[Ee][Te];for(Ee=0;Ee<3;++Ee){var pt=re.projections[Ee];for(Te=0;Te<16;++Te)pt[Te]=0;for(Te=0;Te<4;++Te)pt[5*Te]=1;pt[5*Ee]=0,pt[12+Ee]=se.axesBounds[+(tt[Ee]>0)][Ee],g(pt,xe.model,pt);var Rt=re.clipBounds[Ee];for(Be=0;Be<2;++Be)for(Te=0;Te<3;++Te)Rt[Be][Te]=xe.clipBounds[Be][Te];Rt[0][Ee]=-1e8,Rt[1][Ee]=1e8}return re.showSurface=at,re.showContour=gt,re}var we={model:M,view:M,projection:M,inverseModel:M.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},Oe=M.slice(),ke=[1,0,0,0,1,0,0,0,1];function Le(xe,se){xe=xe||{};var Ee=this.gl;Ee.disable(Ee.CULL_FACE),this._colorMap.bind(0);var Te=we;Te.model=xe.model||M,Te.view=xe.view||M,Te.projection=xe.projection||M,Te.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],Te.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],Te.objectOffset=this.objectOffset,Te.contourColor=this.contourColor[0],Te.inverseModel=C(Te.inverseModel,Te.model);for(var Be=0;Be<2;++Be)for(var tt=Te.clipBounds[Be],at=0;at<3;++at)tt[at]=Math.min(Math.max(this.clipBounds[Be][at],-1e8),1e8);Te.kambient=this.ambientLight,Te.kdiffuse=this.diffuseLight,Te.kspecular=this.specularLight,Te.roughness=this.roughness,Te.fresnel=this.fresnel,Te.opacity=this.opacity,Te.height=0,Te.permutation=ke,Te.vertexColor=this.vertexColor;var gt=Oe;for(g(gt,Te.view,Te.model),g(gt,Te.projection,gt),C(gt,gt),Be=0;Be<3;++Be)Te.eyePosition[Be]=gt[12+Be]/gt[15];var pt=gt[15];for(Be=0;Be<3;++Be)pt+=this.lightPosition[Be]*gt[4*Be+3];for(Be=0;Be<3;++Be){var Rt=gt[12+Be];for(at=0;at<3;++at)Rt+=gt[4*at+Be]*this.lightPosition[at];Te.lightPosition[Be]=Rt/pt}var $t=fe(Te,this);if($t.showSurface){for(this._shader.bind(),this._shader.uniforms=Te,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(Ee.TRIANGLES,this._vertexCount),Be=0;Be<3;++Be)!this.surfaceProject[Be]||!this.vertexCount||(this._shader.uniforms.model=$t.projections[Be],this._shader.uniforms.clipBounds=$t.clipBounds[Be],this._vao.draw(Ee.TRIANGLES,this._vertexCount));this._vao.unbind()}if($t.showContour){var Wt=this._contourShader;Te.kambient=1,Te.kdiffuse=0,Te.kspecular=0,Te.opacity=1,Wt.bind(),Wt.uniforms=Te;var Ht=this._contourVAO;for(Ht.bind(),Be=0;Be<3;++Be)for(Wt.uniforms.permutation=$[Be],Ee.lineWidth(this.contourWidth[Be]*this.pixelRatio),at=0;at<this.contourLevels[Be].length;++at)at===this.highlightLevel[Be]?(Wt.uniforms.contourColor=this.highlightColor[Be],Wt.uniforms.contourTint=this.highlightTint[Be]):(at===0||at-1===this.highlightLevel[Be])&&(Wt.uniforms.contourColor=this.contourColor[Be],Wt.uniforms.contourTint=this.contourTint[Be]),this._contourCounts[Be][at]&&(Wt.uniforms.height=this.contourLevels[Be][at],Ht.draw(Ee.LINES,this._contourCounts[Be][at],this._contourOffsets[Be][at]));for(Be=0;Be<3;++Be)for(Wt.uniforms.model=$t.projections[Be],Wt.uniforms.clipBounds=$t.clipBounds[Be],at=0;at<3;++at)if(this.contourProject[Be][at]){Wt.uniforms.permutation=$[at],Ee.lineWidth(this.contourWidth[at]*this.pixelRatio);for(var Ft=0;Ft<this.contourLevels[at].length;++Ft)Ft===this.highlightLevel[at]?(Wt.uniforms.contourColor=this.highlightColor[at],Wt.uniforms.contourTint=this.highlightTint[at]):(Ft===0||Ft-1===this.highlightLevel[at])&&(Wt.uniforms.contourColor=this.contourColor[at],Wt.uniforms.contourTint=this.contourTint[at]),this._contourCounts[at][Ft]&&(Wt.uniforms.height=this.contourLevels[at][Ft],Ht.draw(Ee.LINES,this._contourCounts[at][Ft],this._contourOffsets[at][Ft]))}for(Ht.unbind(),Ht=this._dynamicVAO,Ht.bind(),Be=0;Be<3;++Be)if(this._dynamicCounts[Be]!==0)for(Wt.uniforms.model=Te.model,Wt.uniforms.clipBounds=Te.clipBounds,Wt.uniforms.permutation=$[Be],Ee.lineWidth(this.dynamicWidth[Be]*this.pixelRatio),Wt.uniforms.contourColor=this.dynamicColor[Be],Wt.uniforms.contourTint=this.dynamicTint[Be],Wt.uniforms.height=this.dynamicLevel[Be],Ht.draw(Ee.LINES,this._dynamicCounts[Be],this._dynamicOffsets[Be]),at=0;at<3;++at)this.contourProject[at][Be]&&(Wt.uniforms.model=$t.projections[at],Wt.uniforms.clipBounds=$t.clipBounds[at],Ht.draw(Ee.LINES,this._dynamicCounts[Be],this._dynamicOffsets[Be]));Ht.unbind()}}J.draw=function(xe){return Le.call(this,xe,!1)},J.drawTransparent=function(xe){return Le.call(this,xe,!0)};var oe={model:M,view:M,projection:M,inverseModel:M,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]};J.drawPick=function(xe){xe=xe||{};var se=this.gl;se.disable(se.CULL_FACE);var Ee=oe;Ee.model=xe.model||M,Ee.view=xe.view||M,Ee.projection=xe.projection||M,Ee.shape=this._field[2].shape,Ee.pickId=this.pickId/255,Ee.lowerBound=this.bounds[0],Ee.upperBound=this.bounds[1],Ee.objectOffset=this.objectOffset,Ee.permutation=ke;for(var Te=0;Te<2;++Te)for(var Be=Ee.clipBounds[Te],tt=0;tt<3;++tt)Be[tt]=Math.min(Math.max(this.clipBounds[Te][tt],-1e8),1e8);var at=fe(Ee,this);if(at.showSurface){for(this._pickShader.bind(),this._pickShader.uniforms=Ee,this._vao.bind(),this._vao.draw(se.TRIANGLES,this._vertexCount),Te=0;Te<3;++Te)this.surfaceProject[Te]&&(this._pickShader.uniforms.model=at.projections[Te],this._pickShader.uniforms.clipBounds=at.clipBounds[Te],this._vao.draw(se.TRIANGLES,this._vertexCount));this._vao.unbind()}if(at.showContour){var gt=this._contourPickShader;gt.bind(),gt.uniforms=Ee;var pt=this._contourVAO;for(pt.bind(),tt=0;tt<3;++tt)for(se.lineWidth(this.contourWidth[tt]*this.pixelRatio),gt.uniforms.permutation=$[tt],Te=0;Te<this.contourLevels[tt].length;++Te)this._contourCounts[tt][Te]&&(gt.uniforms.height=this.contourLevels[tt][Te],pt.draw(se.LINES,this._contourCounts[tt][Te],this._contourOffsets[tt][Te]));for(Te=0;Te<3;++Te)for(gt.uniforms.model=at.projections[Te],gt.uniforms.clipBounds=at.clipBounds[Te],tt=0;tt<3;++tt)if(this.contourProject[Te][tt]){gt.uniforms.permutation=$[tt],se.lineWidth(this.contourWidth[tt]*this.pixelRatio);for(var Rt=0;Rt<this.contourLevels[tt].length;++Rt)this._contourCounts[tt][Rt]&&(gt.uniforms.height=this.contourLevels[tt][Rt],pt.draw(se.LINES,this._contourCounts[tt][Rt],this._contourOffsets[tt][Rt]))}pt.unbind()}},J.pick=function(xe){if(!xe||xe.id!==this.pickId)return null;var se=this._field[2].shape,Ee=this._pickResult,Te=se[0]*(xe.value[0]+(xe.value[2]>>4)/16)/255,Be=Math.floor(Te),tt=Te-Be,at=se[1]*(xe.value[1]+(xe.value[2]&15)/16)/255,gt=Math.floor(at),pt=at-gt;Be+=1,gt+=1;var Rt=Ee.position;Rt[0]=Rt[1]=Rt[2]=0;for(var $t=0;$t<2;++$t)for(var Wt=$t?tt:1-tt,Ht=0;Ht<2;++Ht)for(var Ft=Ht?pt:1-pt,st=Be+$t,rt=gt+Ht,Ue=Wt*Ft,xt=0;xt<3;++xt)Rt[xt]+=this._field[xt].get(st,rt)*Ue;for(var Gt=this._pickResult.level,Jt=0;Jt<3;++Jt)if(Gt[Jt]=I.le(this.contourLevels[Jt],Rt[Jt]),Gt[Jt]<0)this.contourLevels[Jt].length>0&&(Gt[Jt]=0);else if(Gt[Jt]<this.contourLevels[Jt].length-1){var Ut=this.contourLevels[Jt][Gt[Jt]],kr=this.contourLevels[Jt][Gt[Jt]+1];Math.abs(Ut-Rt[Jt])>Math.abs(kr-Rt[Jt])&&(Gt[Jt]+=1)}for(Ee.index[0]=tt<.5?Be:Be+1,Ee.index[1]=pt<.5?gt:gt+1,Ee.uv[0]=Te/se[0],Ee.uv[1]=at/se[1],xt=0;xt<3;++xt)Ee.dataCoordinate[xt]=this._field[xt].get(Ee.index[0],Ee.index[1]);return Ee},J.padField=function(xe,se){var Ee=se.shape.slice(),Te=xe.shape.slice();x.assign(xe.lo(1,1).hi(Ee[0],Ee[1]),se),x.assign(xe.lo(1).hi(Ee[0],1),se.hi(Ee[0],1)),x.assign(xe.lo(1,Te[1]-1).hi(Ee[0],1),se.lo(0,Ee[1]-1).hi(Ee[0],1)),x.assign(xe.lo(0,1).hi(1,Ee[1]),se.hi(1)),x.assign(xe.lo(Te[0]-1,1).hi(1,Ee[1]),se.lo(Ee[0]-1)),xe.set(0,0,se.get(0,0)),xe.set(0,Te[1]-1,se.get(0,Ee[1]-1)),xe.set(Te[0]-1,0,se.get(Ee[0]-1,0)),xe.set(Te[0]-1,Te[1]-1,se.get(Ee[0]-1,Ee[1]-1))};function be(xe,se){return Array.isArray(xe)?[se(xe[0]),se(xe[1]),se(xe[2])]:[se(xe),se(xe),se(xe)]}function _e(xe){return Array.isArray(xe)?xe.length===3?[xe[0],xe[1],xe[2],1]:[xe[0],xe[1],xe[2],xe[3]]:[0,0,0,1]}function he(xe){if(Array.isArray(xe)){if(Array.isArray(xe))return[_e(xe[0]),_e(xe[1]),_e(xe[2])];var se=_e(xe);return[se.slice(),se.slice(),se.slice()]}}J.update=function(xe){xe=xe||{},this.objectOffset=xe.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in xe&&(this.contourWidth=be(xe.contourWidth,Number)),"showContour"in xe&&(this.showContour=be(xe.showContour,Boolean)),"showSurface"in xe&&(this.showSurface=!!xe.showSurface),"contourTint"in xe&&(this.contourTint=be(xe.contourTint,Boolean)),"contourColor"in xe&&(this.contourColor=he(xe.contourColor)),"contourProject"in xe&&(this.contourProject=be(xe.contourProject,function(xo){return be(xo,Boolean)})),"surfaceProject"in xe&&(this.surfaceProject=xe.surfaceProject),"dynamicColor"in xe&&(this.dynamicColor=he(xe.dynamicColor)),"dynamicTint"in xe&&(this.dynamicTint=be(xe.dynamicTint,Number)),"dynamicWidth"in xe&&(this.dynamicWidth=be(xe.dynamicWidth,Number)),"opacity"in xe&&(this.opacity=xe.opacity),"opacityscale"in xe&&(this.opacityscale=xe.opacityscale),"colorBounds"in xe&&(this.colorBounds=xe.colorBounds),"vertexColor"in xe&&(this.vertexColor=xe.vertexColor?1:0),"colormap"in xe&&this._colorMap.setPixels(this.genColormap(xe.colormap,this.opacityscale));var se=xe.field||xe.coords&&xe.coords[2]||null,Ee=!1;if(se||(this._field[2].shape[0]||this._field[2].shape[2]?se=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):se=this._field[2].hi(0,0)),"field"in xe||"coords"in xe){var Te=(se.shape[0]+2)*(se.shape[1]+2);Te>this._field[2].data.length&&(m.freeFloat(this._field[2].data),this._field[2].data=m.mallocFloat(p.nextPow2(Te))),this._field[2]=E(this._field[2].data,[se.shape[0]+2,se.shape[1]+2]),this.padField(this._field[2],se),this.shape=se.shape.slice();for(var Be=this.shape,tt=0;tt<2;++tt)this._field[2].size>this._field[tt].data.length&&(m.freeFloat(this._field[tt].data),this._field[tt].data=m.mallocFloat(this._field[2].size)),this._field[tt]=E(this._field[tt].data,[Be[0]+2,Be[1]+2]);if(xe.coords){var at=xe.coords;if(!Array.isArray(at)||at.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(tt=0;tt<2;++tt){var gt=at[tt];for(Ht=0;Ht<2;++Ht)if(gt.shape[Ht]!==Be[Ht])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[tt],gt)}}else if(xe.ticks){var pt=xe.ticks;if(!Array.isArray(pt)||pt.length!==2)throw new Error("gl-surface: invalid ticks");for(tt=0;tt<2;++tt){var Rt=pt[tt];if((Array.isArray(Rt)||Rt.length)&&(Rt=E(Rt)),Rt.shape[0]!==Be[tt])throw new Error("gl-surface: invalid tick length");var $t=E(Rt.data,Be);$t.stride[tt]=Rt.stride[0],$t.stride[tt^1]=0,this.padField(this._field[tt],$t)}}else{for(tt=0;tt<2;++tt){var Wt=[0,0];Wt[tt]=1,this._field[tt]=E(this._field[tt].data,[Be[0]+2,Be[1]+2],Wt,0)}this._field[0].set(0,0,0);for(var Ht=0;Ht<Be[0];++Ht)this._field[0].set(Ht+1,0,Ht);for(this._field[0].set(Be[0]+1,0,Be[0]-1),this._field[1].set(0,0,0),Ht=0;Ht<Be[1];++Ht)this._field[1].set(0,Ht+1,Ht);this._field[1].set(0,Be[1]+1,Be[1]-1)}var Ft=this._field,st=E(m.mallocFloat(Ft[2].size*3*2),[3,Be[0]+2,Be[1]+2,2]);for(tt=0;tt<3;++tt)N(st.pick(tt),Ft[tt],"mirror");var rt=E(m.mallocFloat(Ft[2].size*3),[Be[0]+2,Be[1]+2,3]);for(tt=0;tt<Be[0]+2;++tt)for(Ht=0;Ht<Be[1]+2;++Ht){var Ue=st.get(0,tt,Ht,0),xt=st.get(0,tt,Ht,1),Gt=st.get(1,tt,Ht,0),Jt=st.get(1,tt,Ht,1),Ut=st.get(2,tt,Ht,0),kr=st.get(2,tt,Ht,1),Pr=Gt*kr-Jt*Ut,$r=Ut*xt-kr*Ue,rn=Ue*Jt-xt*Gt,kn=Math.sqrt(Pr*Pr+$r*$r+rn*rn);kn<1e-8?(kn=Math.max(Math.abs(Pr),Math.abs($r),Math.abs(rn)),kn<1e-8?(rn=1,$r=Pr=0,kn=1):kn=1/kn):kn=1/Math.sqrt(kn),rt.set(tt,Ht,0,Pr*kn),rt.set(tt,Ht,1,$r*kn),rt.set(tt,Ht,2,rn*kn)}m.free(st.data);var Rn=[1/0,1/0,1/0],ci=[-1/0,-1/0,-1/0],In=1/0,Gn=-1/0,mr=(Be[0]-1)*(Be[1]-1)*6,St=m.mallocFloat(p.nextPow2(10*mr)),Ot=0,Et=0;for(tt=0;tt<Be[0]-1;++tt)e:for(Ht=0;Ht<Be[1]-1;++Ht){for(var je=0;je<2;++je)for(var Ye=0;Ye<2;++Ye)for(var et=0;et<3;++et){var mt=this._field[et].get(1+tt+je,1+Ht+Ye);if(isNaN(mt)||!isFinite(mt))continue e}for(et=0;et<6;++et){var Nt=tt+W[et][0],lr=Ht+W[et][1],br=this._field[0].get(Nt+1,lr+1),Or=this._field[1].get(Nt+1,lr+1);mt=this._field[2].get(Nt+1,lr+1),Pr=rt.get(Nt+1,lr+1,0),$r=rt.get(Nt+1,lr+1,1),rn=rt.get(Nt+1,lr+1,2),xe.intensity&&(tn=xe.intensity.get(Nt,lr));var tn=xe.intensity?xe.intensity.get(Nt,lr):mt+this.objectOffset[2];St[Ot++]=Nt,St[Ot++]=lr,St[Ot++]=br,St[Ot++]=Or,St[Ot++]=mt,St[Ot++]=0,St[Ot++]=tn,St[Ot++]=Pr,St[Ot++]=$r,St[Ot++]=rn,Rn[0]=Math.min(Rn[0],br+this.objectOffset[0]),Rn[1]=Math.min(Rn[1],Or+this.objectOffset[1]),Rn[2]=Math.min(Rn[2],mt+this.objectOffset[2]),In=Math.min(In,tn),ci[0]=Math.max(ci[0],br+this.objectOffset[0]),ci[1]=Math.max(ci[1],Or+this.objectOffset[1]),ci[2]=Math.max(ci[2],mt+this.objectOffset[2]),Gn=Math.max(Gn,tn),Et+=1}}for(xe.intensityBounds&&(In=+xe.intensityBounds[0],Gn=+xe.intensityBounds[1]),tt=6;tt<Ot;tt+=10)St[tt]=(St[tt]-In)/(Gn-In);this._vertexCount=Et,this._coordinateBuffer.update(St.subarray(0,Ot)),m.freeFloat(St),m.free(rt.data),this.bounds=[Rn,ci],this.intensity=xe.intensity||this._field[2],(this.intensityBounds[0]!==In||this.intensityBounds[1]!==Gn)&&(Ee=!0),this.intensityBounds=[In,Gn]}if("levels"in xe){var Jr=xe.levels;for(Array.isArray(Jr[0])?Jr=Jr.slice():Jr=[[],[],Jr],tt=0;tt<3;++tt)Jr[tt]=Jr[tt].slice(),Jr[tt].sort(function(xo,vr){return xo-vr});for(tt=0;tt<3;++tt)for(Ht=0;Ht<Jr[tt].length;++Ht)Jr[tt][Ht]-=this.objectOffset[tt];e:for(tt=0;tt<3;++tt){if(Jr[tt].length!==this.contourLevels[tt].length){Ee=!0;break}for(Ht=0;Ht<Jr[tt].length;++Ht)if(Jr[tt][Ht]!==this.contourLevels[tt][Ht]){Ee=!0;break e}}this.contourLevels=Jr}if(Ee){Ft=this._field,Be=this.shape;for(var dn=[],on=0;on<3;++on){var Nn=this.contourLevels[on],Wi=[],Oa=[],Da=[0,0,0];for(tt=0;tt<Nn.length;++tt){var Aa=D(this._field[on],Nn[tt]);Wi.push(dn.length/5|0),Et=0;e:for(Ht=0;Ht<Aa.cells.length;++Ht){var Ka=Aa.cells[Ht];for(et=0;et<2;++et){var Sa=Aa.positions[Ka[et]],no=Sa[0],Fo=Math.floor(no)|0,an=no-Fo,Hr=Sa[1],nn=Math.floor(Hr)|0,Kr=Hr-nn,$n=!1;t:for(var Ai=0;Ai<3;++Ai){Da[Ai]=0;var aa=(on+Ai+1)%3;for(je=0;je<2;++je){var Ci=je?an:1-an;for(Nt=Math.min(Math.max(Fo+je,0),Be[0])|0,Ye=0;Ye<2;++Ye){var Ta=Ye?Kr:1-Kr;if(lr=Math.min(Math.max(nn+Ye,0),Be[1])|0,Ai<2?mt=this._field[aa].get(Nt,lr):mt=(this.intensity.get(Nt,lr)-this.intensityBounds[0])/(this.intensityBounds[1]-this.intensityBounds[0]),!isFinite(mt)||isNaN(mt)){$n=!0;break t}var Na=Ci*Ta;Da[Ai]+=Na*mt}}}if(!$n)dn.push(Da[0],Da[1],Sa[0],Sa[1],Da[2]),Et+=1;else{if(et>0){for(var ro=0;ro<5;++ro)dn.pop();Et-=1}continue e}}}Oa.push(Et)}this._contourOffsets[on]=Wi,this._contourCounts[on]=Oa}var oo=m.mallocFloat(dn.length);for(tt=0;tt<dn.length;++tt)oo[tt]=dn[tt];this._contourBuffer.update(oo),m.freeFloat(oo)}},J.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 xe=0;xe<3;++xe)m.freeFloat(this._field[xe].data)},J.highlight=function(xe){var se;if(!xe){this._dynamicCounts=[0,0,0],this.dyanamicLevel=[NaN,NaN,NaN],this.highlightLevel=[-1,-1,-1];return}for(se=0;se<3;++se)this.enableHighlight[se]?this.highlightLevel[se]=xe.level[se]:this.highlightLevel[se]=-1;var Ee;for(this.snapToData?Ee=xe.dataCoordinate:Ee=xe.position,se=0;se<3;++se)Ee[se]-=this.objectOffset[se];if(!((!this.enableDynamic[0]||Ee[0]===this.dynamicLevel[0])&&(!this.enableDynamic[1]||Ee[1]===this.dynamicLevel[1])&&(!this.enableDynamic[2]||Ee[2]===this.dynamicLevel[2]))){for(var Te=0,Be=this.shape,tt=m.mallocFloat(12*Be[0]*Be[1]),at=0;at<3;++at){if(!this.enableDynamic[at]){this.dynamicLevel[at]=NaN,this._dynamicCounts[at]=0;continue}this.dynamicLevel[at]=Ee[at];var gt=(at+1)%3,pt=(at+2)%3,Rt=this._field[at],$t=this._field[gt],Wt=this._field[pt],Ht=D(Rt,Ee[at]),Ft=Ht.cells,st=Ht.positions;for(this._dynamicOffsets[at]=Te,se=0;se<Ft.length;++se)for(var rt=Ft[se],Ue=0;Ue<2;++Ue){var xt=st[rt[Ue]],Gt=+xt[0],Jt=Gt|0,Ut=Math.min(Jt+1,Be[0])|0,kr=Gt-Jt,Pr=1-kr,$r=+xt[1],rn=$r|0,kn=Math.min(rn+1,Be[1])|0,Rn=$r-rn,ci=1-Rn,In=Pr*ci,Gn=Pr*Rn,mr=kr*ci,St=kr*Rn,Ot=In*$t.get(Jt,rn)+Gn*$t.get(Jt,kn)+mr*$t.get(Ut,rn)+St*$t.get(Ut,kn),Et=In*Wt.get(Jt,rn)+Gn*Wt.get(Jt,kn)+mr*Wt.get(Ut,rn)+St*Wt.get(Ut,kn);if(isNaN(Ot)||isNaN(Et)){Ue&&(Te-=1);break}tt[2*Te+0]=Ot,tt[2*Te+1]=Et,Te+=1}this._dynamicCounts[at]=Te-this._dynamicOffsets[at]}this._dynamicBuffer.update(tt.subarray(0,2*Te)),m.freeFloat(tt)}};function De(xe){var se=xe.gl,Ee=k(se),Te=T(se),Be=P(se),tt=y(se),at=f(se),gt=v(se,[{buffer:at,size:4,stride:S,offset:0},{buffer:at,size:3,stride:S,offset:16},{buffer:at,size:3,stride:S,offset:28}]),pt=f(se),Rt=v(se,[{buffer:pt,size:4,stride:20,offset:0},{buffer:pt,size:1,stride:20,offset:16}]),$t=f(se),Wt=v(se,[{buffer:$t,size:2,type:se.FLOAT}]),Ht=h(se,1,K,se.RGBA,se.UNSIGNED_BYTE);Ht.minFilter=se.LINEAR,Ht.magFilter=se.LINEAR;var Ft=new Q(se,[0,0],[[0,0,0],[0,0,0]],Ee,Te,at,gt,Ht,Be,tt,pt,Rt,$t,Wt,[0,0,0]),st={levels:[[],[],[]]};for(var rt in xe)st[rt]=xe[rt];return st.colormap=st.colormap||"jet",Ft.update(st),Ft}}),7766:(function(l,u,c){var p=c(9618),f=c(5298),v=c(1888);l.exports=y;var h=null,m=null,_=null;function x(S){h=[S.LINEAR,S.NEAREST_MIPMAP_LINEAR,S.LINEAR_MIPMAP_NEAREST,S.LINEAR_MIPMAP_NEAREST],m=[S.NEAREST,S.LINEAR,S.NEAREST_MIPMAP_NEAREST,S.NEAREST_MIPMAP_LINEAR,S.LINEAR_MIPMAP_NEAREST,S.LINEAR_MIPMAP_LINEAR],_=[S.REPEAT,S.CLAMP_TO_EDGE,S.MIRRORED_REPEAT]}function A(S){return typeof HTMLCanvasElement<"u"&&S instanceof HTMLCanvasElement||typeof HTMLImageElement<"u"&&S instanceof HTMLImageElement||typeof HTMLVideoElement<"u"&&S instanceof HTMLVideoElement||typeof ImageData<"u"&&S instanceof ImageData}var E=function(S,M){f.muls(S,M,255)};function D(S,M,W){var $=S.gl,Z=$.getParameter($.MAX_TEXTURE_SIZE);if(M<0||M>Z||W<0||W>Z)throw new Error("gl-texture2d: Invalid texture size");return S._shape=[M,W],S.bind(),$.texImage2D($.TEXTURE_2D,0,S.format,M,W,0,S.format,S.type,null),S._mipLevels=[0],S}function g(S,M,W,$,Z,K){this.gl=S,this.handle=M,this.format=Z,this.type=K,this._shape=[W,$],this._mipLevels=[0],this._magFilter=S.NEAREST,this._minFilter=S.NEAREST,this._wrapS=S.CLAMP_TO_EDGE,this._wrapT=S.CLAMP_TO_EDGE,this._anisoSamples=1;var Q=this,J=[this._wrapS,this._wrapT];Object.defineProperties(J,[{get:function(){return Q._wrapS},set:function(ee){return Q.wrapS=ee}},{get:function(){return Q._wrapT},set:function(ee){return Q.wrapT=ee}}]),this._wrapVector=J;var G=[this._shape[0],this._shape[1]];Object.defineProperties(G,[{get:function(){return Q._shape[0]},set:function(ee){return Q.width=ee}},{get:function(){return Q._shape[1]},set:function(ee){return Q.height=ee}}]),this._shapeVector=G}var C=g.prototype;Object.defineProperties(C,{minFilter:{get:function(){return this._minFilter},set:function(S){this.bind();var M=this.gl;if(this.type===M.FLOAT&&h.indexOf(S)>=0&&(M.getExtension("OES_texture_float_linear")||(S=M.NEAREST)),m.indexOf(S)<0)throw new Error("gl-texture2d: Unknown filter mode "+S);return M.texParameteri(M.TEXTURE_2D,M.TEXTURE_MIN_FILTER,S),this._minFilter=S}},magFilter:{get:function(){return this._magFilter},set:function(S){this.bind();var M=this.gl;if(this.type===M.FLOAT&&h.indexOf(S)>=0&&(M.getExtension("OES_texture_float_linear")||(S=M.NEAREST)),m.indexOf(S)<0)throw new Error("gl-texture2d: Unknown filter mode "+S);return M.texParameteri(M.TEXTURE_2D,M.TEXTURE_MAG_FILTER,S),this._magFilter=S}},mipSamples:{get:function(){return this._anisoSamples},set:function(S){var M=this._anisoSamples;if(this._anisoSamples=Math.max(S,1)|0,M!==this._anisoSamples){var W=this.gl.getExtension("EXT_texture_filter_anisotropic");W&&this.gl.texParameterf(this.gl.TEXTURE_2D,W.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(S){if(this.bind(),_.indexOf(S)<0)throw new Error("gl-texture2d: Unknown wrap mode "+S);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,S),this._wrapS=S}},wrapT:{get:function(){return this._wrapT},set:function(S){if(this.bind(),_.indexOf(S)<0)throw new Error("gl-texture2d: Unknown wrap mode "+S);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,S),this._wrapT=S}},wrap:{get:function(){return this._wrapVector},set:function(S){if(Array.isArray(S)||(S=[S,S]),S.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var M=0;M<2;++M)if(_.indexOf(S[M])<0)throw new Error("gl-texture2d: Unknown wrap mode "+S);this._wrapS=S[0],this._wrapT=S[1];var W=this.gl;return this.bind(),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_WRAP_S,this._wrapS),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_WRAP_T,this._wrapT),S}},shape:{get:function(){return this._shapeVector},set:function(S){if(!Array.isArray(S))S=[S|0,S|0];else if(S.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return D(this,S[0]|0,S[1]|0),[S[0]|0,S[1]|0]}},width:{get:function(){return this._shape[0]},set:function(S){return S=S|0,D(this,S,this._shape[1]),S}},height:{get:function(){return this._shape[1]},set:function(S){return S=S|0,D(this,this._shape[0],S),S}}}),C.bind=function(S){var M=this.gl;return S!==void 0&&M.activeTexture(M.TEXTURE0+(S|0)),M.bindTexture(M.TEXTURE_2D,this.handle),S!==void 0?S|0:M.getParameter(M.ACTIVE_TEXTURE)-M.TEXTURE0},C.dispose=function(){this.gl.deleteTexture(this.handle)},C.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var S=Math.min(this._shape[0],this._shape[1]),M=0;S>0;++M,S>>>=1)this._mipLevels.indexOf(M)<0&&this._mipLevels.push(M)},C.setPixels=function(S,M,W,$){var Z=this.gl;this.bind(),Array.isArray(M)?($=W,W=M[1]|0,M=M[0]|0):(M=M||0,W=W||0),$=$||0;var K=A(S)?S:S.raw;if(K){var Q=this._mipLevels.indexOf($)<0;Q?(Z.texImage2D(Z.TEXTURE_2D,0,this.format,this.format,this.type,K),this._mipLevels.push($)):Z.texSubImage2D(Z.TEXTURE_2D,$,M,W,this.format,this.type,K)}else if(S.shape&&S.stride&&S.data){if(S.shape.length<2||M+S.shape[1]>this._shape[1]>>>$||W+S.shape[0]>this._shape[0]>>>$||M<0||W<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");N(Z,M,W,$,this.format,this.type,this._mipLevels,S)}else throw new Error("gl-texture2d: Unsupported data type")};function I(S,M){return S.length===3?M[2]===1&&M[1]===S[0]*S[2]&&M[0]===S[2]:M[0]===1&&M[1]===S[0]}function N(S,M,W,$,Z,K,Q,J){var G=J.dtype,ee=J.shape.slice();if(ee.length<2||ee.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var re=0,fe=0,we=I(ee,J.stride.slice());if(G==="float32"?re=S.FLOAT:G==="float64"?(re=S.FLOAT,we=!1,G="float32"):G==="uint8"?re=S.UNSIGNED_BYTE:(re=S.UNSIGNED_BYTE,we=!1,G="uint8"),ee.length===2)fe=S.LUMINANCE,ee=[ee[0],ee[1],1],J=p(J.data,ee,[J.stride[0],J.stride[1],1],J.offset);else if(ee.length===3){if(ee[2]===1)fe=S.ALPHA;else if(ee[2]===2)fe=S.LUMINANCE_ALPHA;else if(ee[2]===3)fe=S.RGB;else if(ee[2]===4)fe=S.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");ee[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((fe===S.LUMINANCE||fe===S.ALPHA)&&(Z===S.LUMINANCE||Z===S.ALPHA)&&(fe=Z),fe!==Z)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var Oe=J.size,ke=Q.indexOf($)<0;if(ke&&Q.push($),re===K&&we)J.offset===0&&J.data.length===Oe?ke?S.texImage2D(S.TEXTURE_2D,$,Z,ee[0],ee[1],0,Z,K,J.data):S.texSubImage2D(S.TEXTURE_2D,$,M,W,ee[0],ee[1],Z,K,J.data):ke?S.texImage2D(S.TEXTURE_2D,$,Z,ee[0],ee[1],0,Z,K,J.data.subarray(J.offset,J.offset+Oe)):S.texSubImage2D(S.TEXTURE_2D,$,M,W,ee[0],ee[1],Z,K,J.data.subarray(J.offset,J.offset+Oe));else{var Le;K===S.FLOAT?Le=v.mallocFloat32(Oe):Le=v.mallocUint8(Oe);var oe=p(Le,ee,[ee[2],ee[2]*ee[0],1]);re===S.FLOAT&&K===S.UNSIGNED_BYTE?E(oe,J):f.assign(oe,J),ke?S.texImage2D(S.TEXTURE_2D,$,Z,ee[0],ee[1],0,Z,K,Le.subarray(0,Oe)):S.texSubImage2D(S.TEXTURE_2D,$,M,W,ee[0],ee[1],Z,K,Le.subarray(0,Oe)),K===S.FLOAT?v.freeFloat32(Le):v.freeUint8(Le)}}function F(S){var M=S.createTexture();return S.bindTexture(S.TEXTURE_2D,M),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_MIN_FILTER,S.NEAREST),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_MAG_FILTER,S.NEAREST),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_WRAP_S,S.CLAMP_TO_EDGE),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_WRAP_T,S.CLAMP_TO_EDGE),M}function k(S,M,W,$,Z){var K=S.getParameter(S.MAX_TEXTURE_SIZE);if(M<0||M>K||W<0||W>K)throw new Error("gl-texture2d: Invalid texture shape");if(Z===S.FLOAT&&!S.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var Q=F(S);return S.texImage2D(S.TEXTURE_2D,0,$,M,W,0,$,Z,null),new g(S,Q,M,W,$,Z)}function P(S,M,W,$,Z,K){var Q=F(S);return S.texImage2D(S.TEXTURE_2D,0,Z,Z,K,M),new g(S,Q,W,$,Z,K)}function T(S,M){var W=M.dtype,$=M.shape.slice(),Z=S.getParameter(S.MAX_TEXTURE_SIZE);if($[0]<0||$[0]>Z||$[1]<0||$[1]>Z)throw new Error("gl-texture2d: Invalid texture size");var K=I($,M.stride.slice()),Q=0;W==="float32"?Q=S.FLOAT:W==="float64"?(Q=S.FLOAT,K=!1,W="float32"):W==="uint8"?Q=S.UNSIGNED_BYTE:(Q=S.UNSIGNED_BYTE,K=!1,W="uint8");var J=0;if($.length===2)J=S.LUMINANCE,$=[$[0],$[1],1],M=p(M.data,$,[M.stride[0],M.stride[1],1],M.offset);else if($.length===3)if($[2]===1)J=S.ALPHA;else if($[2]===2)J=S.LUMINANCE_ALPHA;else if($[2]===3)J=S.RGB;else if($[2]===4)J=S.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");Q===S.FLOAT&&!S.getExtension("OES_texture_float")&&(Q=S.UNSIGNED_BYTE,K=!1);var G,ee,re=M.size;if(K)M.offset===0&&M.data.length===re?G=M.data:G=M.data.subarray(M.offset,M.offset+re);else{var fe=[$[2],$[2]*$[0],1];ee=v.malloc(re,W);var we=p(ee,$,fe,0);(W==="float32"||W==="float64")&&Q===S.UNSIGNED_BYTE?E(we,M):f.assign(we,M),G=ee.subarray(0,re)}var Oe=F(S);return S.texImage2D(S.TEXTURE_2D,0,J,$[0],$[1],0,J,Q,G),K||v.free(ee),new g(S,Oe,$[0],$[1],J,Q)}function y(S){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(h||x(S),typeof arguments[1]=="number")return k(S,arguments[1],arguments[2],arguments[3]||S.RGBA,arguments[4]||S.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return k(S,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||S.RGBA,arguments[3]||S.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var M=arguments[1],W=A(M)?M:M.raw;if(W)return P(S,W,M.width|0,M.height|0,arguments[2]||S.RGBA,arguments[3]||S.UNSIGNED_BYTE);if(M.shape&&M.data&&M.stride)return T(S,M)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}}),1433:(function(l){function u(c,p,f){p?p.bind():c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,null);var v=c.getParameter(c.MAX_VERTEX_ATTRIBS)|0;if(f){if(f.length>v)throw new Error("gl-vao: Too many vertex attributes");for(var h=0;h<f.length;++h){var m=f[h];if(m.buffer){var _=m.buffer,x=m.size||4,A=m.type||c.FLOAT,E=!!m.normalized,D=m.stride||0,g=m.offset||0;_.bind(),c.enableVertexAttribArray(h),c.vertexAttribPointer(h,x,A,E,D,g)}else{if(typeof m=="number")c.vertexAttrib1f(h,m);else if(m.length===1)c.vertexAttrib1f(h,m[0]);else if(m.length===2)c.vertexAttrib2f(h,m[0],m[1]);else if(m.length===3)c.vertexAttrib3f(h,m[0],m[1],m[2]);else if(m.length===4)c.vertexAttrib4f(h,m[0],m[1],m[2],m[3]);else throw new Error("gl-vao: Invalid vertex attribute");c.disableVertexAttribArray(h)}}for(;h<v;++h)c.disableVertexAttribArray(h)}else{c.bindBuffer(c.ARRAY_BUFFER,null);for(var h=0;h<v;++h)c.disableVertexAttribArray(h)}}l.exports=u}),870:(function(l,u,c){var p=c(1433);function f(h){this.gl=h,this._elements=null,this._attributes=null,this._elementsType=h.UNSIGNED_SHORT}f.prototype.bind=function(){p(this.gl,this._elements,this._attributes)},f.prototype.update=function(h,m,_){this._elements=m,this._attributes=h,this._elementsType=_||this.gl.UNSIGNED_SHORT},f.prototype.dispose=function(){},f.prototype.unbind=function(){},f.prototype.draw=function(h,m,_){_=_||0;var x=this.gl;this._elements?x.drawElements(h,m,this._elementsType,_):x.drawArrays(h,_,m)};function v(h){return new f(h)}l.exports=v}),7518:(function(l,u,c){var p=c(1433);function f(m,_,x,A,E,D){this.location=m,this.dimension=_,this.a=x,this.b=A,this.c=E,this.d=D}f.prototype.bind=function(m){switch(this.dimension){case 1:m.vertexAttrib1f(this.location,this.a);break;case 2:m.vertexAttrib2f(this.location,this.a,this.b);break;case 3:m.vertexAttrib3f(this.location,this.a,this.b,this.c);break;case 4:m.vertexAttrib4f(this.location,this.a,this.b,this.c,this.d);break}};function v(m,_,x){this.gl=m,this._ext=_,this.handle=x,this._attribs=[],this._useElements=!1,this._elementsType=m.UNSIGNED_SHORT}v.prototype.bind=function(){this._ext.bindVertexArrayOES(this.handle);for(var m=0;m<this._attribs.length;++m)this._attribs[m].bind(this.gl)},v.prototype.unbind=function(){this._ext.bindVertexArrayOES(null)},v.prototype.dispose=function(){this._ext.deleteVertexArrayOES(this.handle)},v.prototype.update=function(m,_,x){if(this.bind(),p(this.gl,_,m),this.unbind(),this._attribs.length=0,m)for(var A=0;A<m.length;++A){var E=m[A];typeof E=="number"?this._attribs.push(new f(A,1,E)):Array.isArray(E)&&this._attribs.push(new f(A,E.length,E[0],E[1],E[2],E[3]))}this._useElements=!!_,this._elementsType=x||this.gl.UNSIGNED_SHORT},v.prototype.draw=function(m,_,x){x=x||0;var A=this.gl;this._useElements?A.drawElements(m,_,this._elementsType,x):A.drawArrays(m,x,_)};function h(m,_){return new v(m,_,_.createVertexArrayOES())}l.exports=h}),8116:(function(l,u,c){var p=c(7518),f=c(870);function v(m){this.bindVertexArrayOES=m.bindVertexArray.bind(m),this.createVertexArrayOES=m.createVertexArray.bind(m),this.deleteVertexArrayOES=m.deleteVertexArray.bind(m)}function h(m,_,x,A){var E=m.createVertexArray?new v(m):m.getExtension("OES_vertex_array_object"),D;return E?D=p(m,E):D=f(m),D.update(_,x,A),D}l.exports=h}),5632:(function(l){l.exports=u;function u(c,p,f){return c[0]=p[0]+f[0],c[1]=p[1]+f[1],c[2]=p[2]+f[2],c}}),8192:(function(l,u,c){l.exports=h;var p=c(2825),f=c(3536),v=c(244);function h(m,_){var x=p(m[0],m[1],m[2]),A=p(_[0],_[1],_[2]);f(x,x),f(A,A);var E=v(x,A);return E>1?0:Math.acos(E)}}),9226:(function(l){l.exports=u;function u(c,p){return c[0]=Math.ceil(p[0]),c[1]=Math.ceil(p[1]),c[2]=Math.ceil(p[2]),c}}),3126:(function(l){l.exports=u;function u(c){var p=new Float32Array(3);return p[0]=c[0],p[1]=c[1],p[2]=c[2],p}}),3990:(function(l){l.exports=u;function u(c,p){return c[0]=p[0],c[1]=p[1],c[2]=p[2],c}}),1091:(function(l){l.exports=u;function u(){var c=new Float32Array(3);return c[0]=0,c[1]=0,c[2]=0,c}}),5911:(function(l){l.exports=u;function u(c,p,f){var v=p[0],h=p[1],m=p[2],_=f[0],x=f[1],A=f[2];return c[0]=h*A-m*x,c[1]=m*_-v*A,c[2]=v*x-h*_,c}}),5455:(function(l,u,c){l.exports=c(7056)}),7056:(function(l){l.exports=u;function u(c,p){var f=p[0]-c[0],v=p[1]-c[1],h=p[2]-c[2];return Math.sqrt(f*f+v*v+h*h)}}),4008:(function(l,u,c){l.exports=c(6690)}),6690:(function(l){l.exports=u;function u(c,p,f){return c[0]=p[0]/f[0],c[1]=p[1]/f[1],c[2]=p[2]/f[2],c}}),244:(function(l){l.exports=u;function u(c,p){return c[0]*p[0]+c[1]*p[1]+c[2]*p[2]}}),2613:(function(l){l.exports=1e-6}),9922:(function(l,u,c){l.exports=f;var p=c(2613);function f(v,h){var m=v[0],_=v[1],x=v[2],A=h[0],E=h[1],D=h[2];return Math.abs(m-A)<=p*Math.max(1,Math.abs(m),Math.abs(A))&&Math.abs(_-E)<=p*Math.max(1,Math.abs(_),Math.abs(E))&&Math.abs(x-D)<=p*Math.max(1,Math.abs(x),Math.abs(D))}}),9265:(function(l){l.exports=u;function u(c,p){return c[0]===p[0]&&c[1]===p[1]&&c[2]===p[2]}}),2681:(function(l){l.exports=u;function u(c,p){return c[0]=Math.floor(p[0]),c[1]=Math.floor(p[1]),c[2]=Math.floor(p[2]),c}}),5137:(function(l,u,c){l.exports=f;var p=c(1091)();function f(v,h,m,_,x,A){var E,D;for(h||(h=3),m||(m=0),_?D=Math.min(_*h+m,v.length):D=v.length,E=m;E<D;E+=h)p[0]=v[E],p[1]=v[E+1],p[2]=v[E+2],x(p,p,A),v[E]=p[0],v[E+1]=p[1],v[E+2]=p[2];return v}}),2825:(function(l){l.exports=u;function u(c,p,f){var v=new Float32Array(3);return v[0]=c,v[1]=p,v[2]=f,v}}),2931:(function(l,u,c){l.exports={EPSILON:c(2613),create:c(1091),clone:c(3126),angle:c(8192),fromValues:c(2825),copy:c(3990),set:c(1463),equals:c(9922),exactEquals:c(9265),add:c(5632),subtract:c(6843),sub:c(2229),multiply:c(5847),mul:c(4505),divide:c(6690),div:c(4008),min:c(8107),max:c(7417),floor:c(2681),ceil:c(9226),round:c(2447),scale:c(6621),scaleAndAdd:c(8489),distance:c(7056),dist:c(5455),squaredDistance:c(2953),sqrDist:c(6141),length:c(1387),len:c(868),squaredLength:c(3066),sqrLen:c(5486),negate:c(5093),inverse:c(811),normalize:c(3536),dot:c(244),cross:c(5911),lerp:c(6658),random:c(7636),transformMat4:c(5673),transformMat3:c(492),transformQuat:c(264),rotateX:c(6894),rotateY:c(109),rotateZ:c(8692),forEach:c(5137)}}),811:(function(l){l.exports=u;function u(c,p){return c[0]=1/p[0],c[1]=1/p[1],c[2]=1/p[2],c}}),868:(function(l,u,c){l.exports=c(1387)}),1387:(function(l){l.exports=u;function u(c){var p=c[0],f=c[1],v=c[2];return Math.sqrt(p*p+f*f+v*v)}}),6658:(function(l){l.exports=u;function u(c,p,f,v){var h=p[0],m=p[1],_=p[2];return c[0]=h+v*(f[0]-h),c[1]=m+v*(f[1]-m),c[2]=_+v*(f[2]-_),c}}),7417:(function(l){l.exports=u;function u(c,p,f){return c[0]=Math.max(p[0],f[0]),c[1]=Math.max(p[1],f[1]),c[2]=Math.max(p[2],f[2]),c}}),8107:(function(l){l.exports=u;function u(c,p,f){return c[0]=Math.min(p[0],f[0]),c[1]=Math.min(p[1],f[1]),c[2]=Math.min(p[2],f[2]),c}}),4505:(function(l,u,c){l.exports=c(5847)}),5847:(function(l){l.exports=u;function u(c,p,f){return c[0]=p[0]*f[0],c[1]=p[1]*f[1],c[2]=p[2]*f[2],c}}),5093:(function(l){l.exports=u;function u(c,p){return c[0]=-p[0],c[1]=-p[1],c[2]=-p[2],c}}),3536:(function(l){l.exports=u;function u(c,p){var f=p[0],v=p[1],h=p[2],m=f*f+v*v+h*h;return m>0&&(m=1/Math.sqrt(m),c[0]=p[0]*m,c[1]=p[1]*m,c[2]=p[2]*m),c}}),7636:(function(l){l.exports=u;function u(c,p){p=p||1;var f=Math.random()*2*Math.PI,v=Math.random()*2-1,h=Math.sqrt(1-v*v)*p;return c[0]=Math.cos(f)*h,c[1]=Math.sin(f)*h,c[2]=v*p,c}}),6894:(function(l){l.exports=u;function u(c,p,f,v){var h=f[1],m=f[2],_=p[1]-h,x=p[2]-m,A=Math.sin(v),E=Math.cos(v);return c[0]=p[0],c[1]=h+_*E-x*A,c[2]=m+_*A+x*E,c}}),109:(function(l){l.exports=u;function u(c,p,f,v){var h=f[0],m=f[2],_=p[0]-h,x=p[2]-m,A=Math.sin(v),E=Math.cos(v);return c[0]=h+x*A+_*E,c[1]=p[1],c[2]=m+x*E-_*A,c}}),8692:(function(l){l.exports=u;function u(c,p,f,v){var h=f[0],m=f[1],_=p[0]-h,x=p[1]-m,A=Math.sin(v),E=Math.cos(v);return c[0]=h+_*E-x*A,c[1]=m+_*A+x*E,c[2]=p[2],c}}),2447:(function(l){l.exports=u;function u(c,p){return c[0]=Math.round(p[0]),c[1]=Math.round(p[1]),c[2]=Math.round(p[2]),c}}),6621:(function(l){l.exports=u;function u(c,p,f){return c[0]=p[0]*f,c[1]=p[1]*f,c[2]=p[2]*f,c}}),8489:(function(l){l.exports=u;function u(c,p,f,v){return c[0]=p[0]+f[0]*v,c[1]=p[1]+f[1]*v,c[2]=p[2]+f[2]*v,c}}),1463:(function(l){l.exports=u;function u(c,p,f,v){return c[0]=p,c[1]=f,c[2]=v,c}}),6141:(function(l,u,c){l.exports=c(2953)}),5486:(function(l,u,c){l.exports=c(3066)}),2953:(function(l){l.exports=u;function u(c,p){var f=p[0]-c[0],v=p[1]-c[1],h=p[2]-c[2];return f*f+v*v+h*h}}),3066:(function(l){l.exports=u;function u(c){var p=c[0],f=c[1],v=c[2];return p*p+f*f+v*v}}),2229:(function(l,u,c){l.exports=c(6843)}),6843:(function(l){l.exports=u;function u(c,p,f){return c[0]=p[0]-f[0],c[1]=p[1]-f[1],c[2]=p[2]-f[2],c}}),492:(function(l){l.exports=u;function u(c,p,f){var v=p[0],h=p[1],m=p[2];return c[0]=v*f[0]+h*f[3]+m*f[6],c[1]=v*f[1]+h*f[4]+m*f[7],c[2]=v*f[2]+h*f[5]+m*f[8],c}}),5673:(function(l){l.exports=u;function u(c,p,f){var v=p[0],h=p[1],m=p[2],_=f[3]*v+f[7]*h+f[11]*m+f[15];return _=_||1,c[0]=(f[0]*v+f[4]*h+f[8]*m+f[12])/_,c[1]=(f[1]*v+f[5]*h+f[9]*m+f[13])/_,c[2]=(f[2]*v+f[6]*h+f[10]*m+f[14])/_,c}}),264:(function(l){l.exports=u;function u(c,p,f){var v=p[0],h=p[1],m=p[2],_=f[0],x=f[1],A=f[2],E=f[3],D=E*v+x*m-A*h,g=E*h+A*v-_*m,C=E*m+_*h-x*v,I=-_*v-x*h-A*m;return c[0]=D*E+I*-_+g*-A-C*-x,c[1]=g*E+I*-x+C*-_-D*-A,c[2]=C*E+I*-A+D*-x-g*-_,c}}),4361:(function(l){l.exports=u;function u(c,p,f){return c[0]=p[0]+f[0],c[1]=p[1]+f[1],c[2]=p[2]+f[2],c[3]=p[3]+f[3],c}}),2335:(function(l){l.exports=u;function u(c){var p=new Float32Array(4);return p[0]=c[0],p[1]=c[1],p[2]=c[2],p[3]=c[3],p}}),2933:(function(l){l.exports=u;function u(c,p){return c[0]=p[0],c[1]=p[1],c[2]=p[2],c[3]=p[3],c}}),7536:(function(l){l.exports=u;function u(){var c=new Float32Array(4);return c[0]=0,c[1]=0,c[2]=0,c[3]=0,c}}),4691:(function(l){l.exports=u;function u(c,p){var f=p[0]-c[0],v=p[1]-c[1],h=p[2]-c[2],m=p[3]-c[3];return Math.sqrt(f*f+v*v+h*h+m*m)}}),1373:(function(l){l.exports=u;function u(c,p,f){return c[0]=p[0]/f[0],c[1]=p[1]/f[1],c[2]=p[2]/f[2],c[3]=p[3]/f[3],c}}),3750:(function(l){l.exports=u;function u(c,p){return c[0]*p[0]+c[1]*p[1]+c[2]*p[2]+c[3]*p[3]}}),3390:(function(l){l.exports=u;function u(c,p,f,v){var h=new Float32Array(4);return h[0]=c,h[1]=p,h[2]=f,h[3]=v,h}}),9970:(function(l,u,c){l.exports={create:c(7536),clone:c(2335),fromValues:c(3390),copy:c(2933),set:c(4578),add:c(4361),subtract:c(6860),multiply:c(3576),divide:c(1373),min:c(2334),max:c(160),scale:c(9288),scaleAndAdd:c(4844),distance:c(4691),squaredDistance:c(7960),length:c(6808),squaredLength:c(483),negate:c(1498),inverse:c(4494),normalize:c(5177),dot:c(3750),lerp:c(2573),random:c(9131),transformMat4:c(5352),transformQuat:c(4041)}}),4494:(function(l){l.exports=u;function u(c,p){return c[0]=1/p[0],c[1]=1/p[1],c[2]=1/p[2],c[3]=1/p[3],c}}),6808:(function(l){l.exports=u;function u(c){var p=c[0],f=c[1],v=c[2],h=c[3];return Math.sqrt(p*p+f*f+v*v+h*h)}}),2573:(function(l){l.exports=u;function u(c,p,f,v){var h=p[0],m=p[1],_=p[2],x=p[3];return c[0]=h+v*(f[0]-h),c[1]=m+v*(f[1]-m),c[2]=_+v*(f[2]-_),c[3]=x+v*(f[3]-x),c}}),160:(function(l){l.exports=u;function u(c,p,f){return c[0]=Math.max(p[0],f[0]),c[1]=Math.max(p[1],f[1]),c[2]=Math.max(p[2],f[2]),c[3]=Math.max(p[3],f[3]),c}}),2334:(function(l){l.exports=u;function u(c,p,f){return c[0]=Math.min(p[0],f[0]),c[1]=Math.min(p[1],f[1]),c[2]=Math.min(p[2],f[2]),c[3]=Math.min(p[3],f[3]),c}}),3576:(function(l){l.exports=u;function u(c,p,f){return c[0]=p[0]*f[0],c[1]=p[1]*f[1],c[2]=p[2]*f[2],c[3]=p[3]*f[3],c}}),1498:(function(l){l.exports=u;function u(c,p){return c[0]=-p[0],c[1]=-p[1],c[2]=-p[2],c[3]=-p[3],c}}),5177:(function(l){l.exports=u;function u(c,p){var f=p[0],v=p[1],h=p[2],m=p[3],_=f*f+v*v+h*h+m*m;return _>0&&(_=1/Math.sqrt(_),c[0]=f*_,c[1]=v*_,c[2]=h*_,c[3]=m*_),c}}),9131:(function(l,u,c){var p=c(5177),f=c(9288);l.exports=v;function v(h,m){return m=m||1,h[0]=Math.random(),h[1]=Math.random(),h[2]=Math.random(),h[3]=Math.random(),p(h,h),f(h,h,m),h}}),9288:(function(l){l.exports=u;function u(c,p,f){return c[0]=p[0]*f,c[1]=p[1]*f,c[2]=p[2]*f,c[3]=p[3]*f,c}}),4844:(function(l){l.exports=u;function u(c,p,f,v){return c[0]=p[0]+f[0]*v,c[1]=p[1]+f[1]*v,c[2]=p[2]+f[2]*v,c[3]=p[3]+f[3]*v,c}}),4578:(function(l){l.exports=u;function u(c,p,f,v,h){return c[0]=p,c[1]=f,c[2]=v,c[3]=h,c}}),7960:(function(l){l.exports=u;function u(c,p){var f=p[0]-c[0],v=p[1]-c[1],h=p[2]-c[2],m=p[3]-c[3];return f*f+v*v+h*h+m*m}}),483:(function(l){l.exports=u;function u(c){var p=c[0],f=c[1],v=c[2],h=c[3];return p*p+f*f+v*v+h*h}}),6860:(function(l){l.exports=u;function u(c,p,f){return c[0]=p[0]-f[0],c[1]=p[1]-f[1],c[2]=p[2]-f[2],c[3]=p[3]-f[3],c}}),5352:(function(l){l.exports=u;function u(c,p,f){var v=p[0],h=p[1],m=p[2],_=p[3];return c[0]=f[0]*v+f[4]*h+f[8]*m+f[12]*_,c[1]=f[1]*v+f[5]*h+f[9]*m+f[13]*_,c[2]=f[2]*v+f[6]*h+f[10]*m+f[14]*_,c[3]=f[3]*v+f[7]*h+f[11]*m+f[15]*_,c}}),4041:(function(l){l.exports=u;function u(c,p,f){var v=p[0],h=p[1],m=p[2],_=f[0],x=f[1],A=f[2],E=f[3],D=E*v+x*m-A*h,g=E*h+A*v-_*m,C=E*m+_*h-x*v,I=-_*v-x*h-A*m;return c[0]=D*E+I*-_+g*-A-C*-x,c[1]=g*E+I*-x+C*-_-D*-A,c[2]=C*E+I*-A+D*-x-g*-_,c[3]=p[3],c}}),1848:(function(l,u,c){var p=c(4905),f=c(6468);l.exports=v;function v(h){for(var m=Array.isArray(h)?h:p(h),_=0;_<m.length;_++){var x=m[_];if(x.type==="preprocessor"){var A=x.data.match(/\#define\s+SHADER_NAME(_B64)?\s+(.+)$/);if(A&&A[2]){var E=A[1],D=A[2];return(E?f(D):D).trim()}}}}}),5874:(function(l,u,c){l.exports=M;var p=c(620),f=c(7827),v=c(6852),h=c(7932),m=c(3508),_=999,x=9999,A=0,E=1,D=2,g=3,C=4,I=5,N=6,F=7,k=8,P=9,T=10,y=11,S=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"];function M(W){var $=0,Z=0,K=_,Q,J,G=[],ee=[],re=1,fe=0,we=0,Oe=!1,ke=!1,Le="",oe;W=W||{};var be=v,_e=p;W.version==="300 es"&&(be=m,_e=h);for(var he={},De={},$=0;$<be.length;$++)he[be[$]]=!0;for(var $=0;$<_e.length;$++)De[_e[$]]=!0;return function(st){return ee=[],st!==null?se(st):Ee()};function xe(st){st.length&&ee.push({type:S[K],data:st,position:we,line:re,column:fe})}function se(st){$=0,st.toString&&(st=st.toString()),Le+=st.replace(/\r\n/g,`
`),oe=Le.length;for(var rt;Q=Le[$],$<oe;){switch(rt=$,K){case A:$=gt();break;case E:$=at();break;case D:$=tt();break;case g:$=pt();break;case C:$=Wt();break;case y:$=$t();break;case I:$=Ht();break;case x:$=Ft();break;case P:$=Be();break;case _:$=Te();break}if(rt!==$)switch(Le[rt]){case`
`:fe=0,++re;break;default:++fe;break}}return Z+=$,Le=Le.slice($),ee}function Ee(st){return G.length&&xe(G.join("")),K=T,xe("(eof)"),ee}function Te(){return G=G.length?[]:G,J==="/"&&Q==="*"?(we=Z+$-1,K=A,J=Q,$+1):J==="/"&&Q==="/"?(we=Z+$-1,K=E,J=Q,$+1):Q==="#"?(K=D,we=Z+$,$):/\s/.test(Q)?(K=P,we=Z+$,$):(Oe=/\d/.test(Q),ke=/[^\w_]/.test(Q),we=Z+$,K=Oe?C:ke?g:x,$)}function Be(){return/[^\s]/g.test(Q)?(xe(G.join("")),K=_,$):(G.push(Q),J=Q,$+1)}function tt(){return(Q==="\r"||Q===`
`)&&J!=="\\"?(xe(G.join("")),K=_,$):(G.push(Q),J=Q,$+1)}function at(){return tt()}function gt(){return Q==="/"&&J==="*"?(G.push(Q),xe(G.join("")),K=_,$+1):(G.push(Q),J=Q,$+1)}function pt(){if(J==="."&&/\d/.test(Q))return K=I,$;if(J==="/"&&Q==="*")return K=A,$;if(J==="/"&&Q==="/")return K=E,$;if(Q==="."&&G.length){for(;Rt(G););return K=I,$}if(Q===";"||Q===")"||Q==="("){if(G.length)for(;Rt(G););return xe(Q),K=_,$+1}var st=G.length===2&&Q!=="=";if(/[\w_\d\s]/.test(Q)||st){for(;Rt(G););return K=_,$}return G.push(Q),J=Q,$+1}function Rt(st){var rt=0,Ue,xt;do{if(Ue=f.indexOf(st.slice(0,st.length+rt).join("")),xt=f[Ue],Ue===-1){if(rt--+st.length>0)continue;xt=st.slice(0,1).join("")}return xe(xt),we+=xt.length,G=G.slice(xt.length),G.length}while(!0)}function $t(){return/[^a-fA-F0-9]/.test(Q)?(xe(G.join("")),K=_,$):(G.push(Q),J=Q,$+1)}function Wt(){return Q==="."||/[eE]/.test(Q)?(G.push(Q),K=I,J=Q,$+1):Q==="x"&&G.length===1&&G[0]==="0"?(K=y,G.push(Q),J=Q,$+1):/[^\d]/.test(Q)?(xe(G.join("")),K=_,$):(G.push(Q),J=Q,$+1)}function Ht(){return Q==="f"&&(G.push(Q),J=Q,$+=1),/[eE]/.test(Q)||(Q==="-"||Q==="+")&&/[eE]/.test(J)?(G.push(Q),J=Q,$+1):/[^\d]/.test(Q)?(xe(G.join("")),K=_,$):(G.push(Q),J=Q,$+1)}function Ft(){if(/[^\d\w_]/.test(Q)){var st=G.join("");return De[st]?K=k:he[st]?K=F:K=N,xe(G.join("")),K=_,$}return G.push(Q),J=Q,$+1}}}),3508:(function(l,u,c){var p=c(6852);p=p.slice().filter(function(f){return!/^(gl\_|texture)/.test(f)}),l.exports=p.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])}),6852:(function(l){l.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]}),7932:(function(l,u,c){var p=c(620);l.exports=p.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])}),620:(function(l){l.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]}),7827:(function(l){l.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]}),4905:(function(l,u,c){var p=c(5874);l.exports=f;function f(v,h){var m=p(h),_=[];return _=_.concat(m(v)),_=_.concat(m(null)),_}}),3236:(function(l){l.exports=function(u){typeof u=="string"&&(u=[u]);for(var c=[].slice.call(arguments,1),p=[],f=0;f<u.length-1;f++)p.push(u[f],c[f]||"");return p.push(u[f]),p.join("")}}),7520:(function(l,u,c){var p=c(9507);function f(){var v=!1;try{var h=Object.defineProperty({},"passive",{get:function(){v=!0}});window.addEventListener("test",null,h),window.removeEventListener("test",null,h)}catch{v=!1}return v}l.exports=p&&f()}),3778:(function(l,u){u.read=function(c,p,f,v,h){var m,_,x=h*8-v-1,A=(1<<x)-1,E=A>>1,D=-7,g=f?h-1:0,C=f?-1:1,I=c[p+g];for(g+=C,m=I&(1<<-D)-1,I>>=-D,D+=x;D>0;m=m*256+c[p+g],g+=C,D-=8);for(_=m&(1<<-D)-1,m>>=-D,D+=v;D>0;_=_*256+c[p+g],g+=C,D-=8);if(m===0)m=1-E;else{if(m===A)return _?NaN:(I?-1:1)*(1/0);_=_+Math.pow(2,v),m=m-E}return(I?-1:1)*_*Math.pow(2,m-v)},u.write=function(c,p,f,v,h,m){var _,x,A,E=m*8-h-1,D=(1<<E)-1,g=D>>1,C=h===23?Math.pow(2,-24)-Math.pow(2,-77):0,I=v?0:m-1,N=v?1:-1,F=p<0||p===0&&1/p<0?1:0;for(p=Math.abs(p),isNaN(p)||p===1/0?(x=isNaN(p)?1:0,_=D):(_=Math.floor(Math.log(p)/Math.LN2),p*(A=Math.pow(2,-_))<1&&(_--,A*=2),_+g>=1?p+=C/A:p+=C*Math.pow(2,1-g),p*A>=2&&(_++,A/=2),_+g>=D?(x=0,_=D):_+g>=1?(x=(p*A-1)*Math.pow(2,h),_=_+g):(x=p*Math.pow(2,g-1)*Math.pow(2,h),_=0));h>=8;c[f+I]=x&255,I+=N,x/=256,h-=8);for(_=_<<h|x,E+=h;E>0;c[f+I]=_&255,I+=N,_/=256,E-=8);c[f+I-N]|=F*128}}),8954:(function(l,u,c){l.exports=g;var p=c(3250),f=c(6803).Fw;function v(C,I,N){this.vertices=C,this.adjacent=I,this.boundary=N,this.lastVisited=-1}v.prototype.flip=function(){var C=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=C;var I=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=I};function h(C,I,N){this.vertices=C,this.cell=I,this.index=N}function m(C,I){return f(C.vertices,I.vertices)}function _(C){return function(){var I=this.tuple;return C.apply(this,I)}}function x(C){var I=p[C+1];return I||(I=p),_(I)}var A=[];function E(C,I,N){this.dimension=C,this.vertices=I,this.simplices=N,this.interior=N.filter(function(P){return!P.boundary}),this.tuple=new Array(C+1);for(var F=0;F<=C;++F)this.tuple[F]=this.vertices[F];var k=A[C];k||(k=A[C]=x(C)),this.orient=k}var D=E.prototype;D.handleBoundaryDegeneracy=function(C,I){var N=this.dimension,F=this.vertices.length-1,k=this.tuple,P=this.vertices,T=[C];for(C.lastVisited=-F;T.length>0;){C=T.pop();for(var y=C.adjacent,S=0;S<=N;++S){var M=y[S];if(!(!M.boundary||M.lastVisited<=-F)){for(var W=M.vertices,$=0;$<=N;++$){var Z=W[$];Z<0?k[$]=I:k[$]=P[Z]}var K=this.orient();if(K>0)return M;M.lastVisited=-F,K===0&&T.push(M)}}}return null},D.walk=function(C,I){var N=this.vertices.length-1,F=this.dimension,k=this.vertices,P=this.tuple,T=I?this.interior.length*Math.random()|0:this.interior.length-1,y=this.interior[T];e:for(;!y.boundary;){for(var S=y.vertices,M=y.adjacent,W=0;W<=F;++W)P[W]=k[S[W]];y.lastVisited=N;for(var W=0;W<=F;++W){var $=M[W];if(!($.lastVisited>=N)){var Z=P[W];P[W]=C;var K=this.orient();if(P[W]=Z,K<0){y=$;continue e}else $.boundary?$.lastVisited=-N:$.lastVisited=N}}return}return y},D.addPeaks=function(C,I){var N=this.vertices.length-1,F=this.dimension,k=this.vertices,P=this.tuple,T=this.interior,y=this.simplices,S=[I];I.lastVisited=N,I.vertices[I.vertices.indexOf(-1)]=N,I.boundary=!1,T.push(I);for(var M=[];S.length>0;){var I=S.pop(),W=I.vertices,$=I.adjacent,Z=W.indexOf(N);if(!(Z<0)){for(var K=0;K<=F;++K)if(K!==Z){var Q=$[K];if(!(!Q.boundary||Q.lastVisited>=N)){var J=Q.vertices;if(Q.lastVisited!==-N){for(var G=0,ee=0;ee<=F;++ee)J[ee]<0?(G=ee,P[ee]=C):P[ee]=k[J[ee]];var re=this.orient();if(re>0){J[G]=N,Q.boundary=!1,T.push(Q),S.push(Q),Q.lastVisited=N;continue}else Q.lastVisited=-N}var fe=Q.adjacent,we=W.slice(),Oe=$.slice(),ke=new v(we,Oe,!0);y.push(ke);var Le=fe.indexOf(I);if(!(Le<0)){fe[Le]=ke,Oe[Z]=Q,we[K]=-1,Oe[K]=I,$[K]=ke,ke.flip();for(var ee=0;ee<=F;++ee){var oe=we[ee];if(!(oe<0||oe===N)){for(var be=new Array(F-1),_e=0,he=0;he<=F;++he){var De=we[he];De<0||he===ee||(be[_e++]=De)}M.push(new h(be,ke,ee))}}}}}}}M.sort(m);for(var K=0;K+1<M.length;K+=2){var xe=M[K],se=M[K+1],Ee=xe.index,Te=se.index;Ee<0||Te<0||(xe.cell.adjacent[xe.index]=se.cell,se.cell.adjacent[se.index]=xe.cell)}},D.insert=function(C,I){var N=this.vertices;N.push(C);var F=this.walk(C,I);if(F){for(var k=this.dimension,P=this.tuple,T=0;T<=k;++T){var y=F.vertices[T];y<0?P[T]=C:P[T]=N[y]}var S=this.orient(P);S<0||S===0&&(F=this.handleBoundaryDegeneracy(F,C),!F)||this.addPeaks(C,F)}},D.boundary=function(){for(var C=this.dimension,I=[],N=this.simplices,F=N.length,k=0;k<F;++k){var P=N[k];if(P.boundary){for(var T=new Array(C),y=P.vertices,S=0,M=0,W=0;W<=C;++W)y[W]>=0?T[S++]=y[W]:M=W&1;if(M===(C&1)){var $=T[0];T[0]=T[1],T[1]=$}I.push(T)}}return I};function g(C,I){var N=C.length;if(N===0)throw new Error("Must have at least d+1 points");var F=C[0].length;if(N<=F)throw new Error("Must input at least d+1 points");var k=C.slice(0,F+1),P=p.apply(void 0,k);if(P===0)throw new Error("Input not in general position");for(var T=new Array(F+1),y=0;y<=F;++y)T[y]=y;P<0&&(T[0]=1,T[1]=0);for(var S=new v(T,new Array(F+1),!1),M=S.adjacent,W=new Array(F+2),y=0;y<=F;++y){for(var $=T.slice(),Z=0;Z<=F;++Z)Z===y&&($[Z]=-1);var K=$[0];$[0]=$[1],$[1]=K;var Q=new v($,new Array(F+1),!0);M[y]=Q,W[y]=Q}W[F+1]=S;for(var y=0;y<=F;++y)for(var $=M[y].vertices,J=M[y].adjacent,Z=0;Z<=F;++Z){var G=$[Z];if(G<0){J[Z]=S;continue}for(var ee=0;ee<=F;++ee)M[ee].vertices.indexOf(G)<0&&(J[Z]=M[ee])}for(var re=new E(F,k,W),fe=!!I,y=F+1;y<N;++y)re.insert(C[y],fe);return re.boundary()}}),3352:(function(l,u,c){var p=c(2478),f=0,v=1,h=2;l.exports=S;function m(M,W,$,Z,K){this.mid=M,this.left=W,this.right=$,this.leftPoints=Z,this.rightPoints=K,this.count=(W?W.count:0)+($?$.count:0)+Z.length}var _=m.prototype;function x(M,W){M.mid=W.mid,M.left=W.left,M.right=W.right,M.leftPoints=W.leftPoints,M.rightPoints=W.rightPoints,M.count=W.count}function A(M,W){var $=P(W);M.mid=$.mid,M.left=$.left,M.right=$.right,M.leftPoints=$.leftPoints,M.rightPoints=$.rightPoints,M.count=$.count}function E(M,W){var $=M.intervals([]);$.push(W),A(M,$)}function D(M,W){var $=M.intervals([]),Z=$.indexOf(W);return Z<0?f:($.splice(Z,1),A(M,$),v)}_.intervals=function(M){return M.push.apply(M,this.leftPoints),this.left&&this.left.intervals(M),this.right&&this.right.intervals(M),M},_.insert=function(M){var W=this.count-this.leftPoints.length;if(this.count+=1,M[1]<this.mid)this.left?4*(this.left.count+1)>3*(W+1)?E(this,M):this.left.insert(M):this.left=P([M]);else if(M[0]>this.mid)this.right?4*(this.right.count+1)>3*(W+1)?E(this,M):this.right.insert(M):this.right=P([M]);else{var $=p.ge(this.leftPoints,M,F),Z=p.ge(this.rightPoints,M,k);this.leftPoints.splice($,0,M),this.rightPoints.splice(Z,0,M)}},_.remove=function(M){var W=this.count-this.leftPoints;if(M[1]<this.mid){if(!this.left)return f;var $=this.right?this.right.count:0;if(4*$>3*(W-1))return D(this,M);var Z=this.left.remove(M);return Z===h?(this.left=null,this.count-=1,v):(Z===v&&(this.count-=1),Z)}else if(M[0]>this.mid){if(!this.right)return f;var K=this.left?this.left.count:0;if(4*K>3*(W-1))return D(this,M);var Z=this.right.remove(M);return Z===h?(this.right=null,this.count-=1,v):(Z===v&&(this.count-=1),Z)}else{if(this.count===1)return this.leftPoints[0]===M?h:f;if(this.leftPoints.length===1&&this.leftPoints[0]===M){if(this.left&&this.right){for(var Q=this,J=this.left;J.right;)Q=J,J=J.right;if(Q===this)J.right=this.right;else{var G=this.left,Z=this.right;Q.count-=J.count,Q.right=J.left,J.left=G,J.right=Z}x(this,J),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?x(this,this.left):x(this,this.right);return v}for(var G=p.ge(this.leftPoints,M,F);G<this.leftPoints.length&&this.leftPoints[G][0]===M[0];++G)if(this.leftPoints[G]===M){this.count-=1,this.leftPoints.splice(G,1);for(var Z=p.ge(this.rightPoints,M,k);Z<this.rightPoints.length&&this.rightPoints[Z][1]===M[1];++Z)if(this.rightPoints[Z]===M)return this.rightPoints.splice(Z,1),v}return f}};function g(M,W,$){for(var Z=0;Z<M.length&&M[Z][0]<=W;++Z){var K=$(M[Z]);if(K)return K}}function C(M,W,$){for(var Z=M.length-1;Z>=0&&M[Z][1]>=W;--Z){var K=$(M[Z]);if(K)return K}}function I(M,W){for(var $=0;$<M.length;++$){var Z=W(M[$]);if(Z)return Z}}_.queryPoint=function(M,W){if(M<this.mid){if(this.left){var $=this.left.queryPoint(M,W);if($)return $}return g(this.leftPoints,M,W)}else if(M>this.mid){if(this.right){var $=this.right.queryPoint(M,W);if($)return $}return C(this.rightPoints,M,W)}else return I(this.leftPoints,W)},_.queryInterval=function(M,W,$){if(M<this.mid&&this.left){var Z=this.left.queryInterval(M,W,$);if(Z)return Z}if(W>this.mid&&this.right){var Z=this.right.queryInterval(M,W,$);if(Z)return Z}return W<this.mid?g(this.leftPoints,W,$):M>this.mid?C(this.rightPoints,M,$):I(this.leftPoints,$)};function N(M,W){return M-W}function F(M,W){var $=M[0]-W[0];return $||M[1]-W[1]}function k(M,W){var $=M[1]-W[1];return $||M[0]-W[0]}function P(M){if(M.length===0)return null;for(var W=[],$=0;$<M.length;++$)W.push(M[$][0],M[$][1]);W.sort(N);for(var Z=W[W.length>>1],K=[],Q=[],J=[],$=0;$<M.length;++$){var G=M[$];G[1]<Z?K.push(G):Z<G[0]?Q.push(G):J.push(G)}var ee=J,re=J.slice();return ee.sort(F),re.sort(k),new m(Z,P(K),P(Q),ee,re)}function T(M){this.root=M}var y=T.prototype;y.insert=function(M){this.root?this.root.insert(M):this.root=new m(M[0],null,null,[M],[M])},y.remove=function(M){if(this.root){var W=this.root.remove(M);return W===h&&(this.root=null),W!==f}return!1},y.queryPoint=function(M,W){if(this.root)return this.root.queryPoint(M,W)},y.queryInterval=function(M,W,$){if(M<=W&&this.root)return this.root.queryInterval(M,W,$)},Object.defineProperty(y,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(y,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}});function S(M){return!M||M.length===0?new T(null):new T(P(M))}}),9507:(function(l){l.exports=!0}),7163:(function(l){l.exports=function(p){return p!=null&&(u(p)||c(p)||!!p._isBuffer)};function u(p){return!!p.constructor&&typeof p.constructor.isBuffer=="function"&&p.constructor.isBuffer(p)}function c(p){return typeof p.readFloatLE=="function"&&typeof p.slice=="function"&&u(p.slice(0,0))}}),5219:(function(l){l.exports=function(u){for(var c=u.length,p,f=0;f<c;f++)if(p=u.charCodeAt(f),(p<9||p>13)&&p!==32&&p!==133&&p!==160&&p!==5760&&p!==6158&&(p<8192||p>8205)&&p!==8232&&p!==8233&&p!==8239&&p!==8287&&p!==8288&&p!==12288&&p!==65279)return!1;return!0}}),395:(function(l){function u(c,p,f){return c*(1-f)+p*f}l.exports=u}),2652:(function(l,u,c){var p=c(4335),f=c(6864),v=c(1903),h=c(9921),m=c(7608),_=c(5665),x={length:c(1387),normalize:c(3536),dot:c(244),cross:c(5911)},A=f(),E=f(),D=[0,0,0,0],g=[[0,0,0],[0,0,0],[0,0,0]],C=[0,0,0];l.exports=function(P,T,y,S,M,W){if(T||(T=[0,0,0]),y||(y=[0,0,0]),S||(S=[0,0,0]),M||(M=[0,0,0,1]),W||(W=[0,0,0,1]),!p(A,P)||(v(E,A),E[3]=0,E[7]=0,E[11]=0,E[15]=1,Math.abs(h(E)<1e-8)))return!1;var $=A[3],Z=A[7],K=A[11],Q=A[12],J=A[13],G=A[14],ee=A[15];if($!==0||Z!==0||K!==0){D[0]=$,D[1]=Z,D[2]=K,D[3]=ee;var re=m(E,E);if(!re)return!1;_(E,E),I(M,D,E)}else M[0]=M[1]=M[2]=0,M[3]=1;if(T[0]=Q,T[1]=J,T[2]=G,N(g,A),y[0]=x.length(g[0]),x.normalize(g[0],g[0]),S[0]=x.dot(g[0],g[1]),F(g[1],g[1],g[0],1,-S[0]),y[1]=x.length(g[1]),x.normalize(g[1],g[1]),S[0]/=y[1],S[1]=x.dot(g[0],g[2]),F(g[2],g[2],g[0],1,-S[1]),S[2]=x.dot(g[1],g[2]),F(g[2],g[2],g[1],1,-S[2]),y[2]=x.length(g[2]),x.normalize(g[2],g[2]),S[1]/=y[2],S[2]/=y[2],x.cross(C,g[1],g[2]),x.dot(g[0],C)<0)for(var fe=0;fe<3;fe++)y[fe]*=-1,g[fe][0]*=-1,g[fe][1]*=-1,g[fe][2]*=-1;return W[0]=.5*Math.sqrt(Math.max(1+g[0][0]-g[1][1]-g[2][2],0)),W[1]=.5*Math.sqrt(Math.max(1-g[0][0]+g[1][1]-g[2][2],0)),W[2]=.5*Math.sqrt(Math.max(1-g[0][0]-g[1][1]+g[2][2],0)),W[3]=.5*Math.sqrt(Math.max(1+g[0][0]+g[1][1]+g[2][2],0)),g[2][1]>g[1][2]&&(W[0]=-W[0]),g[0][2]>g[2][0]&&(W[1]=-W[1]),g[1][0]>g[0][1]&&(W[2]=-W[2]),!0};function I(k,P,T){var y=P[0],S=P[1],M=P[2],W=P[3];return k[0]=T[0]*y+T[4]*S+T[8]*M+T[12]*W,k[1]=T[1]*y+T[5]*S+T[9]*M+T[13]*W,k[2]=T[2]*y+T[6]*S+T[10]*M+T[14]*W,k[3]=T[3]*y+T[7]*S+T[11]*M+T[15]*W,k}function N(k,P){k[0][0]=P[0],k[0][1]=P[1],k[0][2]=P[2],k[1][0]=P[4],k[1][1]=P[5],k[1][2]=P[6],k[2][0]=P[8],k[2][1]=P[9],k[2][2]=P[10]}function F(k,P,T,y,S){k[0]=P[0]*y+T[0]*S,k[1]=P[1]*y+T[1]*S,k[2]=P[2]*y+T[2]*S}}),4335:(function(l){l.exports=function(c,p){var f=p[15];if(f===0)return!1;for(var v=1/f,h=0;h<16;h++)c[h]=p[h]*v;return!0}}),7442:(function(l,u,c){var p=c(6658),f=c(7182),v=c(2652),h=c(9921),m=c(8648),_=D(),x=D(),A=D();l.exports=E;function E(I,N,F,k){if(h(N)===0||h(F)===0)return!1;var P=v(N,_.translate,_.scale,_.skew,_.perspective,_.quaternion),T=v(F,x.translate,x.scale,x.skew,x.perspective,x.quaternion);return!P||!T?!1:(p(A.translate,_.translate,x.translate,k),p(A.skew,_.skew,x.skew,k),p(A.scale,_.scale,x.scale,k),p(A.perspective,_.perspective,x.perspective,k),m(A.quaternion,_.quaternion,x.quaternion,k),f(I,A.translate,A.scale,A.skew,A.perspective,A.quaternion),!0)}function D(){return{translate:g(),scale:g(1),skew:g(),perspective:C(),quaternion:C()}}function g(I){return[I||0,I||0,I||0]}function C(){return[0,0,0,1]}}),7182:(function(l,u,c){var p={identity:c(7894),translate:c(7656),multiply:c(6760),create:c(6864),scale:c(2504),fromRotationTranslation:c(6743)};p.create();var f=p.create();l.exports=function(h,m,_,x,A,E){return p.identity(h),p.fromRotationTranslation(h,E,m),h[3]=A[0],h[7]=A[1],h[11]=A[2],h[15]=A[3],p.identity(f),x[2]!==0&&(f[9]=x[2],p.multiply(h,h,f)),x[1]!==0&&(f[9]=0,f[8]=x[1],p.multiply(h,h,f)),x[0]!==0&&(f[8]=0,f[4]=x[0],p.multiply(h,h,f)),p.scale(h,h,_),h}}),1811:(function(l,u,c){var p=c(2478),f=c(7442),v=c(7608),h=c(5567),m=c(2408),_=c(7089),x=c(6582),A=c(7656);c(2504);var E=c(3536),D=[0,0,0];l.exports=N;function g(F){this._components=F.slice(),this._time=[0],this.prevMatrix=F.slice(),this.nextMatrix=F.slice(),this.computedMatrix=F.slice(),this.computedInverse=F.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=g.prototype;C.recalcMatrix=function(F){var k=this._time,P=p.le(k,F),T=this.computedMatrix;if(!(P<0)){var y=this._components;if(P===k.length-1)for(var S=16*P,M=0;M<16;++M)T[M]=y[S++];else{for(var W=k[P+1]-k[P],S=16*P,$=this.prevMatrix,Z=!0,M=0;M<16;++M)$[M]=y[S++];for(var K=this.nextMatrix,M=0;M<16;++M)K[M]=y[S++],Z=Z&&$[M]===K[M];if(W<1e-6||Z)for(var M=0;M<16;++M)T[M]=$[M];else f(T,$,K,(F-k[P])/W)}var Q=this.computedUp;Q[0]=T[1],Q[1]=T[5],Q[2]=T[9],E(Q,Q);var J=this.computedInverse;v(J,T);var G=this.computedEye,ee=J[15];G[0]=J[12]/ee,G[1]=J[13]/ee,G[2]=J[14]/ee;for(var re=this.computedCenter,fe=Math.exp(this.computedRadius[0]),M=0;M<3;++M)re[M]=G[M]-T[2+4*M]*fe}},C.idle=function(F){if(!(F<this.lastT())){for(var k=this._components,P=k.length-16,T=0;T<16;++T)k.push(k[P++]);this._time.push(F)}},C.flush=function(F){var k=p.gt(this._time,F)-2;k<0||(this._time.splice(0,k),this._components.splice(0,16*k))},C.lastT=function(){return this._time[this._time.length-1]},C.lookAt=function(F,k,P,T){this.recalcMatrix(F),k=k||this.computedEye,P=P||D,T=T||this.computedUp,this.setMatrix(F,x(this.computedMatrix,k,P,T));for(var y=0,S=0;S<3;++S)y+=Math.pow(P[S]-k[S],2);y=Math.log(Math.sqrt(y)),this.computedRadius[0]=y},C.rotate=function(F,k,P,T){this.recalcMatrix(F);var y=this.computedInverse;k&&m(y,y,k),P&&h(y,y,P),T&&_(y,y,T),this.setMatrix(F,v(this.computedMatrix,y))};var I=[0,0,0];C.pan=function(F,k,P,T){I[0]=-(k||0),I[1]=-(P||0),I[2]=-(T||0),this.recalcMatrix(F);var y=this.computedInverse;A(y,y,I),this.setMatrix(F,v(y,y))},C.translate=function(F,k,P,T){I[0]=k||0,I[1]=P||0,I[2]=T||0,this.recalcMatrix(F);var y=this.computedMatrix;A(y,y,I),this.setMatrix(F,y)},C.setMatrix=function(F,k){if(!(F<this.lastT())){this._time.push(F);for(var P=0;P<16;++P)this._components.push(k[P])}},C.setDistance=function(F,k){this.computedRadius[0]=k},C.setDistanceLimits=function(F,k){var P=this._limits;P[0]=F,P[1]=k},C.getDistanceLimits=function(F){var k=this._limits;return F?(F[0]=k[0],F[1]=k[1],F):k};function N(F){F=F||{};var k=F.matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return new g(k)}}),3090:(function(l,u,c){l.exports=f;var p=c(3250)[3];function f(v){var h=v.length;if(h<3){for(var C=new Array(h),m=0;m<h;++m)C[m]=m;return h===2&&v[0][0]===v[1][0]&&v[0][1]===v[1][1]?[0]:C}for(var _=new Array(h),m=0;m<h;++m)_[m]=m;_.sort(function(k,P){var T=v[k][0]-v[P][0];return T||v[k][1]-v[P][1]});for(var x=[_[0],_[1]],A=[_[0],_[1]],m=2;m<h;++m){for(var E=_[m],D=v[E],g=x.length;g>1&&p(v[x[g-2]],v[x[g-1]],D)<=0;)g-=1,x.pop();for(x.push(E),g=A.length;g>1&&p(v[A[g-2]],v[A[g-1]],D)>=0;)g-=1,A.pop();A.push(E)}for(var C=new Array(A.length+x.length-2),I=0,m=0,N=x.length;m<N;++m)C[I++]=x[m];for(var F=A.length-2;F>0;--F)C[I++]=A[F];return C}}),351:(function(l,u,c){l.exports=f;var p=c(4687);function f(v,h){h||(h=v,v=window);var m=0,_=0,x=0,A={shift:!1,alt:!1,control:!1,meta:!1},E=!1;function D(M){var W=!1;return"altKey"in M&&(W=W||M.altKey!==A.alt,A.alt=!!M.altKey),"shiftKey"in M&&(W=W||M.shiftKey!==A.shift,A.shift=!!M.shiftKey),"ctrlKey"in M&&(W=W||M.ctrlKey!==A.control,A.control=!!M.ctrlKey),"metaKey"in M&&(W=W||M.metaKey!==A.meta,A.meta=!!M.metaKey),W}function g(M,W){var $=p.x(W),Z=p.y(W);"buttons"in W&&(M=W.buttons|0),(M!==m||$!==_||Z!==x||D(W))&&(m=M|0,_=$||0,x=Z||0,h&&h(m,_,x,A))}function C(M){g(0,M)}function I(){(m||_||x||A.shift||A.alt||A.meta||A.control)&&(_=x=0,m=0,A.shift=A.alt=A.control=A.meta=!1,h&&h(0,0,0,A))}function N(M){D(M)&&h&&h(m,_,x,A)}function F(M){p.buttons(M)===0?g(0,M):g(m,M)}function k(M){g(m|p.buttons(M),M)}function P(M){g(m&~p.buttons(M),M)}function T(){E||(E=!0,v.addEventListener("mousemove",F),v.addEventListener("mousedown",k),v.addEventListener("mouseup",P),v.addEventListener("mouseleave",C),v.addEventListener("mouseenter",C),v.addEventListener("mouseout",C),v.addEventListener("mouseover",C),v.addEventListener("blur",I),v.addEventListener("keyup",N),v.addEventListener("keydown",N),v.addEventListener("keypress",N),v!==window&&(window.addEventListener("blur",I),window.addEventListener("keyup",N),window.addEventListener("keydown",N),window.addEventListener("keypress",N)))}function y(){E&&(E=!1,v.removeEventListener("mousemove",F),v.removeEventListener("mousedown",k),v.removeEventListener("mouseup",P),v.removeEventListener("mouseleave",C),v.removeEventListener("mouseenter",C),v.removeEventListener("mouseout",C),v.removeEventListener("mouseover",C),v.removeEventListener("blur",I),v.removeEventListener("keyup",N),v.removeEventListener("keydown",N),v.removeEventListener("keypress",N),v!==window&&(window.removeEventListener("blur",I),window.removeEventListener("keyup",N),window.removeEventListener("keydown",N),window.removeEventListener("keypress",N)))}T();var S={element:v};return Object.defineProperties(S,{enabled:{get:function(){return E},set:function(M){M?T():y()},enumerable:!0},buttons:{get:function(){return m},enumerable:!0},x:{get:function(){return _},enumerable:!0},y:{get:function(){return x},enumerable:!0},mods:{get:function(){return A},enumerable:!0}}),S}}),24:(function(l){var u={left:0,top:0};l.exports=c;function c(f,v,h){v=v||f.currentTarget||f.srcElement,Array.isArray(h)||(h=[0,0]);var m=f.clientX||0,_=f.clientY||0,x=p(v);return h[0]=m-x.left,h[1]=_-x.top,h}function p(f){return f===window||f===document||f===document.body?u:f.getBoundingClientRect()}}),4687:(function(l,u){function c(h){if(typeof h=="object"){if("buttons"in h)return h.buttons;if("which"in h){var m=h.which;if(m===2)return 4;if(m===3)return 2;if(m>0)return 1<<m-1}else if("button"in h){var m=h.button;if(m===1)return 4;if(m===2)return 2;if(m>=0)return 1<<m}}return 0}u.buttons=c;function p(h){return h.target||h.srcElement||window}u.element=p;function f(h){if(typeof h=="object"){if("offsetX"in h)return h.offsetX;var m=p(h),_=m.getBoundingClientRect();return h.clientX-_.left}return 0}u.x=f;function v(h){if(typeof h=="object"){if("offsetY"in h)return h.offsetY;var m=p(h),_=m.getBoundingClientRect();return h.clientY-_.top}return 0}u.y=v}),8512:(function(l,u,c){var p=c(665);l.exports=f;function f(v,h,m){typeof v=="function"&&(m=!!h,h=v,v=window);var _=p("ex",v),x=function(A){m&&A.preventDefault();var E=A.deltaX||0,D=A.deltaY||0,g=A.deltaZ||0,C=A.deltaMode,I=1;switch(C){case 1:I=_;break;case 2:I=window.innerHeight;break}if(E*=I,D*=I,g*=I,E||D||g)return h(E,D,g,A)};return v.addEventListener("wheel",x),x}}),2640:(function(l,u,c){var p=c(1888);l.exports=h;var f={"false,0,1":function(_,x,A,E,D){return function(C,I,N,F){var k=C.shape[0]|0,P=C.shape[1]|0,T=C.data,y=C.offset|0,S=C.stride[0]|0,M=C.stride[1]|0,W=y,$,Z=-S|0,K=0,Q=-M|0,J=0,G=-S-M|0,ee=0,re=S|0,fe=M-S*k|0,we=0,Oe=0,ke=0,Le=2*k|0,oe=E(Le),be=E(Le),_e=0,he=0,De=-1,xe=-1,se=0,Ee=-k|0,Te=k|0,Be=0,tt=-k-1|0,at=k-1|0,gt=0,pt=0,Rt=0;for(we=0;we<k;++we)oe[_e++]=A(T[W],I,N,F),W+=re;if(W+=fe,P>0){if(Oe=1,oe[_e++]=A(T[W],I,N,F),W+=re,k>0)for(we=1,$=T[W],he=oe[_e]=A($,I,N,F),se=oe[_e+De],Be=oe[_e+Ee],gt=oe[_e+tt],(he!==se||he!==Be||he!==gt)&&(K=T[W+Z],J=T[W+Q],ee=T[W+G],_(we,Oe,$,K,J,ee,he,se,Be,gt,I,N,F),pt=be[_e]=ke++),_e+=1,W+=re,we=2;we<k;++we)$=T[W],he=oe[_e]=A($,I,N,F),se=oe[_e+De],Be=oe[_e+Ee],gt=oe[_e+tt],(he!==se||he!==Be||he!==gt)&&(K=T[W+Z],J=T[W+Q],ee=T[W+G],_(we,Oe,$,K,J,ee,he,se,Be,gt,I,N,F),pt=be[_e]=ke++,gt!==se&&x(be[_e+De],pt,ee,K,gt,se,I,N,F)),_e+=1,W+=re;for(W+=fe,_e=0,Rt=De,De=xe,xe=Rt,Rt=Ee,Ee=Te,Te=Rt,Rt=tt,tt=at,at=Rt,Oe=2;Oe<P;++Oe){if(oe[_e++]=A(T[W],I,N,F),W+=re,k>0)for(we=1,$=T[W],he=oe[_e]=A($,I,N,F),se=oe[_e+De],Be=oe[_e+Ee],gt=oe[_e+tt],(he!==se||he!==Be||he!==gt)&&(K=T[W+Z],J=T[W+Q],ee=T[W+G],_(we,Oe,$,K,J,ee,he,se,Be,gt,I,N,F),pt=be[_e]=ke++,gt!==Be&&x(be[_e+Ee],pt,J,ee,Be,gt,I,N,F)),_e+=1,W+=re,we=2;we<k;++we)$=T[W],he=oe[_e]=A($,I,N,F),se=oe[_e+De],Be=oe[_e+Ee],gt=oe[_e+tt],(he!==se||he!==Be||he!==gt)&&(K=T[W+Z],J=T[W+Q],ee=T[W+G],_(we,Oe,$,K,J,ee,he,se,Be,gt,I,N,F),pt=be[_e]=ke++,gt!==Be&&x(be[_e+Ee],pt,J,ee,Be,gt,I,N,F),gt!==se&&x(be[_e+De],pt,ee,K,gt,se,I,N,F)),_e+=1,W+=re;Oe&1&&(_e=0),Rt=De,De=xe,xe=Rt,Rt=Ee,Ee=Te,Te=Rt,Rt=tt,tt=at,at=Rt,W+=fe}}D(be),D(oe)}},"false,1,0":function(_,x,A,E,D){return function(C,I,N,F){var k=C.shape[0]|0,P=C.shape[1]|0,T=C.data,y=C.offset|0,S=C.stride[0]|0,M=C.stride[1]|0,W=y,$,Z=-S|0,K=0,Q=-M|0,J=0,G=-S-M|0,ee=0,re=M|0,fe=S-M*P|0,we=0,Oe=0,ke=0,Le=2*P|0,oe=E(Le),be=E(Le),_e=0,he=0,De=-1,xe=-1,se=0,Ee=-P|0,Te=P|0,Be=0,tt=-P-1|0,at=P-1|0,gt=0,pt=0,Rt=0;for(Oe=0;Oe<P;++Oe)oe[_e++]=A(T[W],I,N,F),W+=re;if(W+=fe,k>0){if(we=1,oe[_e++]=A(T[W],I,N,F),W+=re,P>0)for(Oe=1,$=T[W],he=oe[_e]=A($,I,N,F),Be=oe[_e+Ee],se=oe[_e+De],gt=oe[_e+tt],(he!==Be||he!==se||he!==gt)&&(K=T[W+Z],J=T[W+Q],ee=T[W+G],_(we,Oe,$,K,J,ee,he,Be,se,gt,I,N,F),pt=be[_e]=ke++),_e+=1,W+=re,Oe=2;Oe<P;++Oe)$=T[W],he=oe[_e]=A($,I,N,F),Be=oe[_e+Ee],se=oe[_e+De],gt=oe[_e+tt],(he!==Be||he!==se||he!==gt)&&(K=T[W+Z],J=T[W+Q],ee=T[W+G],_(we,Oe,$,K,J,ee,he,Be,se,gt,I,N,F),pt=be[_e]=ke++,gt!==se&&x(be[_e+De],pt,J,ee,se,gt,I,N,F)),_e+=1,W+=re;for(W+=fe,_e=0,Rt=Ee,Ee=Te,Te=Rt,Rt=De,De=xe,xe=Rt,Rt=tt,tt=at,at=Rt,we=2;we<k;++we){if(oe[_e++]=A(T[W],I,N,F),W+=re,P>0)for(Oe=1,$=T[W],he=oe[_e]=A($,I,N,F),Be=oe[_e+Ee],se=oe[_e+De],gt=oe[_e+tt],(he!==Be||he!==se||he!==gt)&&(K=T[W+Z],J=T[W+Q],ee=T[W+G],_(we,Oe,$,K,J,ee,he,Be,se,gt,I,N,F),pt=be[_e]=ke++,gt!==Be&&x(be[_e+Ee],pt,ee,K,gt,Be,I,N,F)),_e+=1,W+=re,Oe=2;Oe<P;++Oe)$=T[W],he=oe[_e]=A($,I,N,F),Be=oe[_e+Ee],se=oe[_e+De],gt=oe[_e+tt],(he!==Be||he!==se||he!==gt)&&(K=T[W+Z],J=T[W+Q],ee=T[W+G],_(we,Oe,$,K,J,ee,he,Be,se,gt,I,N,F),pt=be[_e]=ke++,gt!==se&&x(be[_e+De],pt,J,ee,se,gt,I,N,F),gt!==Be&&x(be[_e+Ee],pt,ee,K,gt,Be,I,N,F)),_e+=1,W+=re;we&1&&(_e=0),Rt=Ee,Ee=Te,Te=Rt,Rt=De,De=xe,xe=Rt,Rt=tt,tt=at,at=Rt,W+=fe}}D(be),D(oe)}}};function v(m,_,x,A,E,D){var g=[D,E].join(","),C=f[g];return C(m,_,x,p.mallocUint32,p.freeUint32)}function h(m){function _(I){throw new Error("ndarray-extract-contour: "+I)}typeof m!="object"&&_("Must specify arguments");var x=m.order;Array.isArray(x)||_("Must specify order");var A=m.arrayArguments||1;A<1&&_("Must have at least one array argument");var E=m.scalarArguments||0;E<0&&_("Scalar arg count must be > 0"),typeof m.vertex!="function"&&_("Must specify vertex creation function"),typeof m.cell!="function"&&_("Must specify cell creation function"),typeof m.phase!="function"&&_("Must specify phase function");for(var D=m.getters||[],g=new Array(A),C=0;C<A;++C)D.indexOf(C)>=0?g[C]=!0:g[C]=!1;return v(m.vertex,m.cell,m.phase,E,x,g)}}),6199:(function(l,u,c){var p=c(1338),f={zero:function(N,F,k,P){var T=N[0],y=k[0];P|=0;var S=0,M=y;for(S=0;S<T;++S)F[P]=0,P+=M},fdTemplate1:function(N,F,k,P,T,y,S){var M=N[0],W=k[0],$=y[0],Z=-1*W,K=W;P|=0,S|=0;var Q=0,J=W,G=$;for(Q=0;Q<M;++Q)T[S]=.5*(F[P+Z]-F[P+K]),P+=J,S+=G},fdTemplate2:function(N,F,k,P,T,y,S,M,W,$){var Z=N[0],K=N[1],Q=k[0],J=k[1],G=y[0],ee=y[1],re=W[0],fe=W[1],we=-1*Q,Oe=Q,ke=-1*J,Le=J;P|=0,S|=0,$|=0;var oe=0,be=0,_e=J,he=Q-K*J,De=ee,xe=G-K*ee,se=fe,Ee=re-K*fe;for(be=0;be<Z;++be){for(oe=0;oe<K;++oe)T[S]=.5*(F[P+we]-F[P+Oe]),M[$]=.5*(F[P+ke]-F[P+Le]),P+=_e,S+=De,$+=se;P+=he,S+=xe,$+=Ee}}},v={cdiff:function(N){var F={};return function(P,T,y){var S=P.dtype,M=P.order,W=T.dtype,$=T.order,Z=y.dtype,K=y.order,Q=[S,M.join(),W,$.join(),Z,K.join()].join(),J=F[Q];return J||(F[Q]=J=N([S,M,W,$,Z,K])),J(P.shape.slice(0),P.data,P.stride,P.offset|0,T.data,T.stride,T.offset|0,y.data,y.stride,y.offset|0)}},zero:function(N){var F={};return function(P){var T=P.dtype,y=P.order,S=[T,y.join()].join(),M=F[S];return M||(F[S]=M=N([T,y])),M(P.shape.slice(0),P.data,P.stride,P.offset|0)}},fdTemplate1:function(N){var F={};return function(P,T){var y=P.dtype,S=P.order,M=T.dtype,W=T.order,$=[y,S.join(),M,W.join()].join(),Z=F[$];return Z||(F[$]=Z=N([y,S,M,W])),Z(P.shape.slice(0),P.data,P.stride,P.offset|0,T.data,T.stride,T.offset|0)}},fdTemplate2:function(N){var F={};return function(P,T,y){var S=P.dtype,M=P.order,W=T.dtype,$=T.order,Z=y.dtype,K=y.order,Q=[S,M.join(),W,$.join(),Z,K.join()].join(),J=F[Q];return J||(F[Q]=J=N([S,M,W,$,Z,K])),J(P.shape.slice(0),P.data,P.stride,P.offset|0,T.data,T.stride,T.offset|0,y.data,y.stride,y.offset|0)}}};function h(N){var F=v[N.funcName];return F(m.bind(void 0,N))}function m(N){return f[N.funcName]}function _(N){return h({funcName:N.funcName})}var x={},A={},E=_({funcName:"cdiff"}),D=_({funcName:"zero"});function g(N){return N in x?x[N]:x[N]=_({funcName:"fdTemplate"+N})}function C(N,F,k,P){return function(T,y){var S=y.shape.slice();return S[0]>2&&S[1]>2&&P(y.pick(-1,-1).lo(1,1).hi(S[0]-2,S[1]-2),T.pick(-1,-1,0).lo(1,1).hi(S[0]-2,S[1]-2),T.pick(-1,-1,1).lo(1,1).hi(S[0]-2,S[1]-2)),S[1]>2&&(k(y.pick(0,-1).lo(1).hi(S[1]-2),T.pick(0,-1,1).lo(1).hi(S[1]-2)),F(T.pick(0,-1,0).lo(1).hi(S[1]-2))),S[1]>2&&(k(y.pick(S[0]-1,-1).lo(1).hi(S[1]-2),T.pick(S[0]-1,-1,1).lo(1).hi(S[1]-2)),F(T.pick(S[0]-1,-1,0).lo(1).hi(S[1]-2))),S[0]>2&&(k(y.pick(-1,0).lo(1).hi(S[0]-2),T.pick(-1,0,0).lo(1).hi(S[0]-2)),F(T.pick(-1,0,1).lo(1).hi(S[0]-2))),S[0]>2&&(k(y.pick(-1,S[1]-1).lo(1).hi(S[0]-2),T.pick(-1,S[1]-1,0).lo(1).hi(S[0]-2)),F(T.pick(-1,S[1]-1,1).lo(1).hi(S[0]-2))),T.set(0,0,0,0),T.set(0,0,1,0),T.set(S[0]-1,0,0,0),T.set(S[0]-1,0,1,0),T.set(0,S[1]-1,0,0),T.set(0,S[1]-1,1,0),T.set(S[0]-1,S[1]-1,0,0),T.set(S[0]-1,S[1]-1,1,0),T}}function I(N){var F=N.join(),S=A[F];if(S)return S;for(var k=N.length,P=[E,D],T=1;T<=k;++T)P.push(g(T));var y=C,S=y.apply(void 0,P);return A[F]=S,S}l.exports=function(F,k,P){if(Array.isArray(P)||(typeof P=="string"?P=p(k.dimension,P):P=p(k.dimension,"clamp")),k.size===0)return F;if(k.dimension===0)return F.set(0),F;var T=I(P);return T(F,k)}}),4317:(function(l){function u(h,m){var _=Math.floor(m),x=m-_,A=0<=_&&_<h.shape[0],E=0<=_+1&&_+1<h.shape[0],D=A?+h.get(_):0,g=E?+h.get(_+1):0;return(1-x)*D+x*g}function c(h,m,_){var x=Math.floor(m),A=m-x,E=0<=x&&x<h.shape[0],D=0<=x+1&&x+1<h.shape[0],g=Math.floor(_),C=_-g,I=0<=g&&g<h.shape[1],N=0<=g+1&&g+1<h.shape[1],F=E&&I?h.get(x,g):0,k=E&&N?h.get(x,g+1):0,P=D&&I?h.get(x+1,g):0,T=D&&N?h.get(x+1,g+1):0;return(1-C)*((1-A)*F+A*P)+C*((1-A)*k+A*T)}function p(h,m,_,x){var A=Math.floor(m),E=m-A,D=0<=A&&A<h.shape[0],g=0<=A+1&&A+1<h.shape[0],C=Math.floor(_),I=_-C,N=0<=C&&C<h.shape[1],F=0<=C+1&&C+1<h.shape[1],k=Math.floor(x),P=x-k,T=0<=k&&k<h.shape[2],y=0<=k+1&&k+1<h.shape[2],S=D&&N&&T?h.get(A,C,k):0,M=D&&F&&T?h.get(A,C+1,k):0,W=g&&N&&T?h.get(A+1,C,k):0,$=g&&F&&T?h.get(A+1,C+1,k):0,Z=D&&N&&y?h.get(A,C,k+1):0,K=D&&F&&y?h.get(A,C+1,k+1):0,Q=g&&N&&y?h.get(A+1,C,k+1):0,J=g&&F&&y?h.get(A+1,C+1,k+1):0;return(1-P)*((1-I)*((1-E)*S+E*W)+I*((1-E)*M+E*$))+P*((1-I)*((1-E)*Z+E*Q)+I*((1-E)*K+E*J))}function f(h){var m=h.shape.length|0,_=new Array(m),x=new Array(m),A=new Array(m),E=new Array(m),D,g;for(D=0;D<m;++D)g=+arguments[D+1],_[D]=Math.floor(g),x[D]=g-_[D],A[D]=0<=_[D]&&_[D]<h.shape[D],E[D]=0<=_[D]+1&&_[D]+1<h.shape[D];var C=0,I,N,F;e:for(D=0;D<1<<m;++D){for(N=1,F=h.offset,I=0;I<m;++I)if(D&1<<I){if(!E[I])continue e;N*=x[I],F+=h.stride[I]*(_[I]+1)}else{if(!A[I])continue e;N*=1-x[I],F+=h.stride[I]*_[I]}C+=N*h.data[F]}return C}function v(h,m,_,x){switch(h.shape.length){case 0:return 0;case 1:return u(h,m);case 2:return c(h,m,_);case 3:return p(h,m,_,x);default:return f.apply(void 0,arguments)}}l.exports=v,l.exports.d1=u,l.exports.d2=c,l.exports.d3=p}),5298:(function(l,u){var c={"float64,2,1,0":function(){return function(A,E,D,g,C){var I=A[0],N=A[1],F=A[2],k=D[0],P=D[1],T=D[2];g|=0;var y=0,S=0,M=0,W=T,$=P-F*T,Z=k-N*P;for(M=0;M<I;++M){for(S=0;S<N;++S){for(y=0;y<F;++y)E[g]/=C,g+=W;g+=$}g+=Z}}},"uint8,2,0,1,float64,2,1,0":function(){return function(A,E,D,g,C,I,N,F){var k=A[0],P=A[1],T=A[2],y=D[0],S=D[1],M=D[2],W=I[0],$=I[1],Z=I[2];g|=0,N|=0;for(var K=g,Q=N,J=A[0]|0;J>0;){J<64?(k=J,J=0):(k=64,J-=64);for(var G=A[1]|0;G>0;){G<64?(P=G,G=0):(P=64,G-=64),g=K+J*y+G*S,N=Q+J*W+G*$;var ee=0,re=0,fe=0,we=M,Oe=y-T*M,ke=S-k*y,Le=Z,oe=W-T*Z,be=$-k*W;for(fe=0;fe<P;++fe){for(re=0;re<k;++re){for(ee=0;ee<T;++ee)E[g]=C[N]*F,g+=we,N+=Le;g+=Oe,N+=oe}g+=ke,N+=be}}}}},"float32,1,0,float32,1,0":function(){return function(A,E,D,g,C,I,N){var F=A[0],k=A[1],P=D[0],T=D[1],y=I[0],S=I[1];g|=0,N|=0;var M=0,W=0,$=T,Z=P-k*T,K=S,Q=y-k*S;for(W=0;W<F;++W){for(M=0;M<k;++M)E[g]=C[N],g+=$,N+=K;g+=Z,N+=Q}}},"float32,1,0,float32,0,1":function(){return function(A,E,D,g,C,I,N){var F=A[0],k=A[1],P=D[0],T=D[1],y=I[0],S=I[1];g|=0,N|=0;for(var M=g,W=N,$=A[1]|0;$>0;){$<64?(k=$,$=0):(k=64,$-=64);for(var Z=A[0]|0;Z>0;){Z<64?(F=Z,Z=0):(F=64,Z-=64),g=M+$*T+Z*P,N=W+$*S+Z*y;var K=0,Q=0,J=T,G=P-k*T,ee=S,re=y-k*S;for(Q=0;Q<F;++Q){for(K=0;K<k;++K)E[g]=C[N],g+=J,N+=ee;g+=G,N+=re}}}}},"uint8,2,0,1,uint8,1,2,0":function(){return function(A,E,D,g,C,I,N){var F=A[0],k=A[1],P=A[2],T=D[0],y=D[1],S=D[2],M=I[0],W=I[1],$=I[2];g|=0,N|=0;for(var Z=g,K=N,Q=A[2]|0;Q>0;){Q<64?(P=Q,Q=0):(P=64,Q-=64);for(var J=A[0]|0;J>0;){J<64?(F=J,J=0):(F=64,J-=64);for(var G=A[1]|0;G>0;){G<64?(k=G,G=0):(k=64,G-=64),g=Z+Q*S+J*T+G*y,N=K+Q*$+J*M+G*W;var ee=0,re=0,fe=0,we=S,Oe=T-P*S,ke=y-F*T,Le=$,oe=M-P*$,be=W-F*M;for(fe=0;fe<k;++fe){for(re=0;re<F;++re){for(ee=0;ee<P;++ee)E[g]=C[N],g+=we,N+=Le;g+=Oe,N+=oe}g+=ke,N+=be}}}}}},"uint8,2,0,1,array,2,0,1":function(){return function(A,E,D,g,C,I,N){var F=A[0],k=A[1],P=A[2],T=D[0],y=D[1],S=D[2],M=I[0],W=I[1],$=I[2];g|=0,N|=0;var Z=0,K=0,Q=0,J=S,G=T-P*S,ee=y-F*T,re=$,fe=M-P*$,we=W-F*M;for(Q=0;Q<k;++Q){for(K=0;K<F;++K){for(Z=0;Z<P;++Z)E[g]=C[N],g+=J,N+=re;g+=G,N+=fe}g+=ee,N+=we}}}};function p(x,A){var E=A.join(","),D=c[E];return D()}var f=p,v={mul:function(x){var A={};return function(D,g,C){var I=D.dtype,N=D.order,F=g.dtype,k=g.order,P=C.dtype,T=C.order,y=[I,N.join(),F,k.join(),P,T.join()].join(),S=A[y];return S||(A[y]=S=x([I,N,F,k,P,T])),S(D.shape.slice(0),D.data,D.stride,D.offset|0,g.data,g.stride,g.offset|0,C.data,C.stride,C.offset|0)}},muls:function(x){var A={};return function(D,g,C){var I=D.dtype,N=D.order,F=g.dtype,k=g.order,P=[I,N.join(),F,k.join()].join(),T=A[P];return T||(A[P]=T=x([I,N,F,k])),T(D.shape.slice(0),D.data,D.stride,D.offset|0,g.data,g.stride,g.offset|0,C)}},mulseq:function(x){var A={};return function(D,g){var C=D.dtype,I=D.order,N=[C,I.join()].join(),F=A[N];return F||(A[N]=F=x([C,I])),F(D.shape.slice(0),D.data,D.stride,D.offset|0,g)}},div:function(x){var A={};return function(D,g,C){var I=D.dtype,N=D.order,F=g.dtype,k=g.order,P=C.dtype,T=C.order,y=[I,N.join(),F,k.join(),P,T.join()].join(),S=A[y];return S||(A[y]=S=x([I,N,F,k,P,T])),S(D.shape.slice(0),D.data,D.stride,D.offset|0,g.data,g.stride,g.offset|0,C.data,C.stride,C.offset|0)}},divs:function(x){var A={};return function(D,g,C){var I=D.dtype,N=D.order,F=g.dtype,k=g.order,P=[I,N.join(),F,k.join()].join(),T=A[P];return T||(A[P]=T=x([I,N,F,k])),T(D.shape.slice(0),D.data,D.stride,D.offset|0,g.data,g.stride,g.offset|0,C)}},divseq:function(x){var A={};return function(D,g){var C=D.dtype,I=D.order,N=[C,I.join()].join(),F=A[N];return F||(A[N]=F=x([C,I])),F(D.shape.slice(0),D.data,D.stride,D.offset|0,g)}},assign:function(x){var A={};return function(D,g){var C=D.dtype,I=D.order,N=g.dtype,F=g.order,k=[C,I.join(),N,F.join()].join(),P=A[k];return P||(A[k]=P=x([C,I,N,F])),P(D.shape.slice(0),D.data,D.stride,D.offset|0,g.data,g.stride,g.offset|0)}}};function h(x){var A=v[x.funcName];return A(f.bind(void 0,x))}function m(x){return h({funcName:x.funcName})}var _={mul:"*",div:"/"};(function(){for(var x in _)u[x]=m({funcName:x}),u[x+"s"]=m({funcName:x+"s"}),u[x+"seq"]=m({funcName:x+"seq"})})(),u.assign=m({funcName:"assign"})}),9994:(function(l,u,c){var p=c(9618),f=c(8277);l.exports=function(h,m){for(var _=[],x=h,A=1;Array.isArray(x);)_.push(x.length),A*=x.length,x=x[0];return _.length===0?p():(m||(m=p(new Float64Array(A),_)),f(m,h),m)}}),8277:(function(l){function u(){return function(m,_,x,A,E){var D=m[0],g=m[1],C=m[2],I=x[0],N=x[1],F=x[2],k=[0,0,0];A|=0;var P=0,T=0,y=0,S=F,M=N-C*F,W=I-g*N;for(y=0;y<D;++y){for(T=0;T<g;++T){for(P=0;P<C;++P){{var $=E,Z;for(Z=0;Z<k.length-1;++Z)$=$[k[Z]];_[A]=$[k[k.length-1]]}A+=S,++k[2]}A+=M,k[2]-=C,++k[1]}A+=W,k[1]-=g,++k[0]}}}function c(){return u()}var p=c;function f(m){var _={};return function(A,E){var D=A.dtype,g=A.order,C=[D,g.join()].join(),I=_[C];return I||(_[C]=I=m([D,g])),I(A.shape.slice(0),A.data,A.stride,A.offset|0,E)}}function v(m){return f(p.bind(void 0,m))}function h(m){return v({funcName:m.funcName})}l.exports=h({funcName:"convert"})}),7640:(function(l,u,c){var p=c(1888);function f(E){switch(E){case"uint32":return[p.mallocUint32,p.freeUint32];default:return null}}var v={"uint32,1,0":function(E,D){return function(C,I,N,F,k,P,T,y,S,M,W){var $,Z,K,Q=C*k+F,J,G=E(y),ee,re,fe,we;for($=C+1;$<=I;++$){for(Z=$,Q+=k,K=Q,ee=0,re=Q,J=0;J<y;++J)G[ee++]=N[re],re+=S;e:for(;Z-- >C;){ee=0,re=K-k;t:for(J=0;J<y;++J){if(fe=N[re],we=G[ee],fe<we)break e;if(fe>we)break t;re+=M,ee+=W}for(ee=K,re=K-k,J=0;J<y;++J)N[ee]=N[re],ee+=S,re+=S;K-=k}for(ee=K,re=0,J=0;J<y;++J)N[ee]=G[re++],ee+=S}D(G)}}};function h(E,D){var g=f(D),C=[D,E].join(","),I=v[C];return g?I(g[0],g[1]):I()}var m={"uint32,1,0":function(E,D,g){return function C(I,N,F,k,P,T,y,S,M,W,$){var Z=(N-I+1)/6|0,K=I+Z,Q=N-Z,J=I+N>>1,G=J-Z,ee=J+Z,re=K,fe=G,we=J,Oe=ee,ke=Q,Le=I+1,oe=N-1,be=!0,_e,he,De,xe,se,Ee,Te,Be,tt,at=0,gt=0,pt=0,Rt,$t,Wt,Ht,Ft,st,rt,Ue,xt,Gt,Jt,Ut,kr,Pr,$r,rn,kn=S,Rn=D(kn),ci=D(kn);$t=P*re,Wt=P*fe,rn=k;e:for(Rt=0;Rt<S;++Rt){if(Te=$t+rn,Be=Wt+rn,pt=F[Te]-F[Be],pt>0){he=re,re=fe,fe=he;break e}if(pt<0)break e;rn+=W}$t=P*Oe,Wt=P*ke,rn=k;e:for(Rt=0;Rt<S;++Rt){if(Te=$t+rn,Be=Wt+rn,pt=F[Te]-F[Be],pt>0){he=Oe,Oe=ke,ke=he;break e}if(pt<0)break e;rn+=W}$t=P*re,Wt=P*we,rn=k;e:for(Rt=0;Rt<S;++Rt){if(Te=$t+rn,Be=Wt+rn,pt=F[Te]-F[Be],pt>0){he=re,re=we,we=he;break e}if(pt<0)break e;rn+=W}$t=P*fe,Wt=P*we,rn=k;e:for(Rt=0;Rt<S;++Rt){if(Te=$t+rn,Be=Wt+rn,pt=F[Te]-F[Be],pt>0){he=fe,fe=we,we=he;break e}if(pt<0)break e;rn+=W}$t=P*re,Wt=P*Oe,rn=k;e:for(Rt=0;Rt<S;++Rt){if(Te=$t+rn,Be=Wt+rn,pt=F[Te]-F[Be],pt>0){he=re,re=Oe,Oe=he;break e}if(pt<0)break e;rn+=W}$t=P*we,Wt=P*Oe,rn=k;e:for(Rt=0;Rt<S;++Rt){if(Te=$t+rn,Be=Wt+rn,pt=F[Te]-F[Be],pt>0){he=we,we=Oe,Oe=he;break e}if(pt<0)break e;rn+=W}$t=P*fe,Wt=P*ke,rn=k;e:for(Rt=0;Rt<S;++Rt){if(Te=$t+rn,Be=Wt+rn,pt=F[Te]-F[Be],pt>0){he=fe,fe=ke,ke=he;break e}if(pt<0)break e;rn+=W}$t=P*fe,Wt=P*we,rn=k;e:for(Rt=0;Rt<S;++Rt){if(Te=$t+rn,Be=Wt+rn,pt=F[Te]-F[Be],pt>0){he=fe,fe=we,we=he;break e}if(pt<0)break e;rn+=W}$t=P*Oe,Wt=P*ke,rn=k;e:for(Rt=0;Rt<S;++Rt){if(Te=$t+rn,Be=Wt+rn,pt=F[Te]-F[Be],pt>0){he=Oe,Oe=ke,ke=he;break e}if(pt<0)break e;rn+=W}for($t=P*re,Wt=P*fe,Ht=P*we,Ft=P*Oe,st=P*ke,rt=P*K,Ue=P*J,xt=P*Q,$r=0,rn=k,Rt=0;Rt<S;++Rt)Te=$t+rn,Be=Wt+rn,tt=Ht+rn,Gt=Ft+rn,Jt=st+rn,Ut=rt+rn,kr=Ue+rn,Pr=xt+rn,Rn[$r]=F[Be],ci[$r]=F[Gt],be=be&&Rn[$r]===ci[$r],De=F[Te],xe=F[tt],se=F[Jt],F[Ut]=De,F[kr]=xe,F[Pr]=se,++$r,rn+=M;for($t=P*G,Wt=P*I,rn=k,Rt=0;Rt<S;++Rt)Te=$t+rn,Be=Wt+rn,F[Te]=F[Be],rn+=M;for($t=P*ee,Wt=P*N,rn=k,Rt=0;Rt<S;++Rt)Te=$t+rn,Be=Wt+rn,F[Te]=F[Be],rn+=M;if(be)for(Ee=Le;Ee<=oe;++Ee){Te=k+Ee*P,$r=0;e:for(Rt=0;Rt<S;++Rt){if(pt=F[Te]-Rn[$r],pt!==0)break e;$r+=$,Te+=W}if(pt!==0)if(pt<0){if(Ee!==Le)for($t=P*Ee,Wt=P*Le,rn=k,Rt=0;Rt<S;++Rt)Te=$t+rn,Be=Wt+rn,_e=F[Te],F[Te]=F[Be],F[Be]=_e,rn+=M;++Le}else for(;;){Te=k+oe*P,$r=0;e:for(Rt=0;Rt<S;++Rt){if(pt=F[Te]-Rn[$r],pt!==0)break e;$r+=$,Te+=W}if(pt>0)oe--;else if(pt<0){for($t=P*Ee,Wt=P*Le,Ht=P*oe,rn=k,Rt=0;Rt<S;++Rt)Te=$t+rn,Be=Wt+rn,tt=Ht+rn,_e=F[Te],F[Te]=F[Be],F[Be]=F[tt],F[tt]=_e,rn+=M;++Le,--oe;break}else{for($t=P*Ee,Wt=P*oe,rn=k,Rt=0;Rt<S;++Rt)Te=$t+rn,Be=Wt+rn,_e=F[Te],F[Te]=F[Be],F[Be]=_e,rn+=M;--oe;break}}}else for(Ee=Le;Ee<=oe;++Ee){Te=k+Ee*P,$r=0;e:for(Rt=0;Rt<S;++Rt){if(at=F[Te]-Rn[$r],at!==0)break e;$r+=$,Te+=W}if(at<0){if(Ee!==Le)for($t=P*Ee,Wt=P*Le,rn=k,Rt=0;Rt<S;++Rt)Te=$t+rn,Be=Wt+rn,_e=F[Te],F[Te]=F[Be],F[Be]=_e,rn+=M;++Le}else{Te=k+Ee*P,$r=0;e:for(Rt=0;Rt<S;++Rt){if(gt=F[Te]-ci[$r],gt!==0)break e;$r+=$,Te+=W}if(gt>0)for(;;){Te=k+oe*P,$r=0;e:for(Rt=0;Rt<S;++Rt){if(pt=F[Te]-ci[$r],pt!==0)break e;$r+=$,Te+=W}if(pt>0){if(--oe<Ee)break;continue}else{Te=k+oe*P,$r=0;e:for(Rt=0;Rt<S;++Rt){if(pt=F[Te]-Rn[$r],pt!==0)break e;$r+=$,Te+=W}if(pt<0){for($t=P*Ee,Wt=P*Le,Ht=P*oe,rn=k,Rt=0;Rt<S;++Rt)Te=$t+rn,Be=Wt+rn,tt=Ht+rn,_e=F[Te],F[Te]=F[Be],F[Be]=F[tt],F[tt]=_e,rn+=M;++Le,--oe}else{for($t=P*Ee,Wt=P*oe,rn=k,Rt=0;Rt<S;++Rt)Te=$t+rn,Be=Wt+rn,_e=F[Te],F[Te]=F[Be],F[Be]=_e,rn+=M;--oe}break}}}}for($t=P*I,Wt=P*(Le-1),$r=0,rn=k,Rt=0;Rt<S;++Rt)Te=$t+rn,Be=Wt+rn,F[Te]=F[Be],F[Be]=Rn[$r],++$r,rn+=M;for($t=P*N,Wt=P*(oe+1),$r=0,rn=k,Rt=0;Rt<S;++Rt)Te=$t+rn,Be=Wt+rn,F[Te]=F[Be],F[Be]=ci[$r],++$r,rn+=M;if(Le-2-I<=32?E(I,Le-2,F,k,P,T,y,S,M,W,$):C(I,Le-2,F,k,P,T,y,S,M,W,$),N-(oe+2)<=32?E(oe+2,N,F,k,P,T,y,S,M,W,$):C(oe+2,N,F,k,P,T,y,S,M,W,$),be){g(Rn),g(ci);return}if(Le<K&&oe>Q){e:for(;;){for(Te=k+Le*P,$r=0,rn=k,Rt=0;Rt<S;++Rt){if(F[Te]!==Rn[$r])break e;++$r,Te+=M}++Le}e:for(;;){for(Te=k+oe*P,$r=0,rn=k,Rt=0;Rt<S;++Rt){if(F[Te]!==ci[$r])break e;++$r,Te+=M}--oe}for(Ee=Le;Ee<=oe;++Ee){Te=k+Ee*P,$r=0;e:for(Rt=0;Rt<S;++Rt){if(at=F[Te]-Rn[$r],at!==0)break e;$r+=$,Te+=W}if(at===0){if(Ee!==Le)for($t=P*Ee,Wt=P*Le,rn=k,Rt=0;Rt<S;++Rt)Te=$t+rn,Be=Wt+rn,_e=F[Te],F[Te]=F[Be],F[Be]=_e,rn+=M;++Le}else{Te=k+Ee*P,$r=0;e:for(Rt=0;Rt<S;++Rt){if(gt=F[Te]-ci[$r],gt!==0)break e;$r+=$,Te+=W}if(gt===0)for(;;){Te=k+oe*P,$r=0;e:for(Rt=0;Rt<S;++Rt){if(pt=F[Te]-ci[$r],pt!==0)break e;$r+=$,Te+=W}if(pt===0){if(--oe<Ee)break;continue}else{Te=k+oe*P,$r=0;e:for(Rt=0;Rt<S;++Rt){if(pt=F[Te]-Rn[$r],pt!==0)break e;$r+=$,Te+=W}if(pt<0){for($t=P*Ee,Wt=P*Le,Ht=P*oe,rn=k,Rt=0;Rt<S;++Rt)Te=$t+rn,Be=Wt+rn,tt=Ht+rn,_e=F[Te],F[Te]=F[Be],F[Be]=F[tt],F[tt]=_e,rn+=M;++Le,--oe}else{for($t=P*Ee,Wt=P*oe,rn=k,Rt=0;Rt<S;++Rt)Te=$t+rn,Be=Wt+rn,_e=F[Te],F[Te]=F[Be],F[Be]=_e,rn+=M;--oe}break}}}}}g(Rn),g(ci),oe-Le<=32?E(Le,oe,F,k,P,T,y,S,M,W,$):C(Le,oe,F,k,P,T,y,S,M,W,$)}}};function _(E,D,g){var C=f(D),I=[D,E].join(","),N=m[I];return E.length>1&&C?N(g,C[0],C[1]):N(g)}var x={"uint32,1,0":function(E,D){return function(g){var C=g.data,I=g.offset|0,N=g.shape,F=g.stride,k=F[0]|0,P=N[0]|0,T=F[1]|0,y=N[1]|0,S=T,M=T,W=1;P<=32?E(0,P-1,C,I,k,T,P,y,S,M,W):D(0,P-1,C,I,k,T,P,y,S,M,W)}}};function A(E,D){var g=[D,E].join(","),C=x[g],I=h(E,D),N=_(E,D,I);return C(I,N)}l.exports=A}),446:(function(l,u,c){var p=c(7640),f={};function v(h){var m=h.order,_=h.dtype,x=[m,_],A=x.join(":"),E=f[A];return E||(f[A]=E=p(m,_)),E(h),h}l.exports=v}),9618:(function(l,u,c){var p=c(7163),f=typeof Float64Array<"u";function v(D,g){return D[0]-g[0]}function h(){var D=this.stride,g=new Array(D.length),C;for(C=0;C<g.length;++C)g[C]=[Math.abs(D[C]),C];g.sort(v);var I=new Array(g.length);for(C=0;C<I.length;++C)I[C]=g[C][1];return I}var m={T:function(D){function g(I){this.data=I}var C=g.prototype;return C.dtype=D,C.index=function(){return-1},C.size=0,C.dimension=-1,C.shape=C.stride=C.order=[],C.lo=C.hi=C.transpose=C.step=function(){return new g(this.data)},C.get=C.set=function(){},C.pick=function(){return null},function(N){return new g(N)}},0:function(D,g){function C(N,F){this.data=N,this.offset=F}var I=C.prototype;return I.dtype=D,I.index=function(){return this.offset},I.dimension=0,I.size=1,I.shape=I.stride=I.order=[],I.lo=I.hi=I.transpose=I.step=function(){return new C(this.data,this.offset)},I.pick=function(){return g(this.data)},I.valueOf=I.get=function(){return D==="generic"?this.data.get(this.offset):this.data[this.offset]},I.set=function(F){return D==="generic"?this.data.set(this.offset,F):this.data[this.offset]=F},function(F,k,P,T){return new C(F,T)}},1:function(D,g,C){function I(F,k,P,T){this.data=F,this.shape=[k],this.stride=[P],this.offset=T|0}var N=I.prototype;return N.dtype=D,N.dimension=1,Object.defineProperty(N,"size",{get:function(){return this.shape[0]}}),N.order=[0],N.set=function(k,P){return D==="generic"?this.data.set(this.offset+this.stride[0]*k,P):this.data[this.offset+this.stride[0]*k]=P},N.get=function(k){return D==="generic"?this.data.get(this.offset+this.stride[0]*k):this.data[this.offset+this.stride[0]*k]},N.index=function(k){return this.offset+this.stride[0]*k},N.hi=function(k){return new I(this.data,typeof k!="number"||k<0?this.shape[0]:k|0,this.stride[0],this.offset)},N.lo=function(k){var P=this.offset,T=0,y=this.shape[0],S=this.stride[0];return typeof k=="number"&&k>=0&&(T=k|0,P+=S*T,y-=T),new I(this.data,y,S,P)},N.step=function(k){var P=this.shape[0],T=this.stride[0],y=this.offset,S=0,M=Math.ceil;return typeof k=="number"&&(S=k|0,S<0?(y+=T*(P-1),P=M(-P/S)):P=M(P/S),T*=S),new I(this.data,P,T,y)},N.transpose=function(k){k=k===void 0?0:k|0;var P=this.shape,T=this.stride;return new I(this.data,P[k],T[k],this.offset)},N.pick=function(k){var P=[],T=[],y=this.offset;typeof k=="number"&&k>=0?y=y+this.stride[0]*k|0:(P.push(this.shape[0]),T.push(this.stride[0]));var S=g[P.length+1];return S(this.data,P,T,y)},function(k,P,T,y){return new I(k,P[0],T[0],y)}},2:function(D,g,C){function I(F,k,P,T,y,S){this.data=F,this.shape=[k,P],this.stride=[T,y],this.offset=S|0}var N=I.prototype;return N.dtype=D,N.dimension=2,Object.defineProperty(N,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(N,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),N.set=function(k,P,T){return D==="generic"?this.data.set(this.offset+this.stride[0]*k+this.stride[1]*P,T):this.data[this.offset+this.stride[0]*k+this.stride[1]*P]=T},N.get=function(k,P){return D==="generic"?this.data.get(this.offset+this.stride[0]*k+this.stride[1]*P):this.data[this.offset+this.stride[0]*k+this.stride[1]*P]},N.index=function(k,P){return this.offset+this.stride[0]*k+this.stride[1]*P},N.hi=function(k,P){return new I(this.data,typeof k!="number"||k<0?this.shape[0]:k|0,typeof P!="number"||P<0?this.shape[1]:P|0,this.stride[0],this.stride[1],this.offset)},N.lo=function(k,P){var T=this.offset,y=0,S=this.shape[0],M=this.shape[1],W=this.stride[0],$=this.stride[1];return typeof k=="number"&&k>=0&&(y=k|0,T+=W*y,S-=y),typeof P=="number"&&P>=0&&(y=P|0,T+=$*y,M-=y),new I(this.data,S,M,W,$,T)},N.step=function(k,P){var T=this.shape[0],y=this.shape[1],S=this.stride[0],M=this.stride[1],W=this.offset,$=0,Z=Math.ceil;return typeof k=="number"&&($=k|0,$<0?(W+=S*(T-1),T=Z(-T/$)):T=Z(T/$),S*=$),typeof P=="number"&&($=P|0,$<0?(W+=M*(y-1),y=Z(-y/$)):y=Z(y/$),M*=$),new I(this.data,T,y,S,M,W)},N.transpose=function(k,P){k=k===void 0?0:k|0,P=P===void 0?1:P|0;var T=this.shape,y=this.stride;return new I(this.data,T[k],T[P],y[k],y[P],this.offset)},N.pick=function(k,P){var T=[],y=[],S=this.offset;typeof k=="number"&&k>=0?S=S+this.stride[0]*k|0:(T.push(this.shape[0]),y.push(this.stride[0])),typeof P=="number"&&P>=0?S=S+this.stride[1]*P|0:(T.push(this.shape[1]),y.push(this.stride[1]));var M=g[T.length+1];return M(this.data,T,y,S)},function(k,P,T,y){return new I(k,P[0],P[1],T[0],T[1],y)}},3:function(D,g,C){function I(F,k,P,T,y,S,M,W){this.data=F,this.shape=[k,P,T],this.stride=[y,S,M],this.offset=W|0}var N=I.prototype;return N.dtype=D,N.dimension=3,Object.defineProperty(N,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(N,"order",{get:function(){var k=Math.abs(this.stride[0]),P=Math.abs(this.stride[1]),T=Math.abs(this.stride[2]);return k>P?P>T?[2,1,0]:k>T?[1,2,0]:[1,0,2]:k>T?[2,0,1]:T>P?[0,1,2]:[0,2,1]}}),N.set=function(k,P,T,y){return D==="generic"?this.data.set(this.offset+this.stride[0]*k+this.stride[1]*P+this.stride[2]*T,y):this.data[this.offset+this.stride[0]*k+this.stride[1]*P+this.stride[2]*T]=y},N.get=function(k,P,T){return D==="generic"?this.data.get(this.offset+this.stride[0]*k+this.stride[1]*P+this.stride[2]*T):this.data[this.offset+this.stride[0]*k+this.stride[1]*P+this.stride[2]*T]},N.index=function(k,P,T){return this.offset+this.stride[0]*k+this.stride[1]*P+this.stride[2]*T},N.hi=function(k,P,T){return new I(this.data,typeof k!="number"||k<0?this.shape[0]:k|0,typeof P!="number"||P<0?this.shape[1]:P|0,typeof T!="number"||T<0?this.shape[2]:T|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},N.lo=function(k,P,T){var y=this.offset,S=0,M=this.shape[0],W=this.shape[1],$=this.shape[2],Z=this.stride[0],K=this.stride[1],Q=this.stride[2];return typeof k=="number"&&k>=0&&(S=k|0,y+=Z*S,M-=S),typeof P=="number"&&P>=0&&(S=P|0,y+=K*S,W-=S),typeof T=="number"&&T>=0&&(S=T|0,y+=Q*S,$-=S),new I(this.data,M,W,$,Z,K,Q,y)},N.step=function(k,P,T){var y=this.shape[0],S=this.shape[1],M=this.shape[2],W=this.stride[0],$=this.stride[1],Z=this.stride[2],K=this.offset,Q=0,J=Math.ceil;return typeof k=="number"&&(Q=k|0,Q<0?(K+=W*(y-1),y=J(-y/Q)):y=J(y/Q),W*=Q),typeof P=="number"&&(Q=P|0,Q<0?(K+=$*(S-1),S=J(-S/Q)):S=J(S/Q),$*=Q),typeof T=="number"&&(Q=T|0,Q<0?(K+=Z*(M-1),M=J(-M/Q)):M=J(M/Q),Z*=Q),new I(this.data,y,S,M,W,$,Z,K)},N.transpose=function(k,P,T){k=k===void 0?0:k|0,P=P===void 0?1:P|0,T=T===void 0?2:T|0;var y=this.shape,S=this.stride;return new I(this.data,y[k],y[P],y[T],S[k],S[P],S[T],this.offset)},N.pick=function(k,P,T){var y=[],S=[],M=this.offset;typeof k=="number"&&k>=0?M=M+this.stride[0]*k|0:(y.push(this.shape[0]),S.push(this.stride[0])),typeof P=="number"&&P>=0?M=M+this.stride[1]*P|0:(y.push(this.shape[1]),S.push(this.stride[1])),typeof T=="number"&&T>=0?M=M+this.stride[2]*T|0:(y.push(this.shape[2]),S.push(this.stride[2]));var W=g[y.length+1];return W(this.data,y,S,M)},function(k,P,T,y){return new I(k,P[0],P[1],P[2],T[0],T[1],T[2],y)}},4:function(D,g,C){function I(F,k,P,T,y,S,M,W,$,Z){this.data=F,this.shape=[k,P,T,y],this.stride=[S,M,W,$],this.offset=Z|0}var N=I.prototype;return N.dtype=D,N.dimension=4,Object.defineProperty(N,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(N,"order",{get:C}),N.set=function(k,P,T,y,S){return D==="generic"?this.data.set(this.offset+this.stride[0]*k+this.stride[1]*P+this.stride[2]*T+this.stride[3]*y,S):this.data[this.offset+this.stride[0]*k+this.stride[1]*P+this.stride[2]*T+this.stride[3]*y]=S},N.get=function(k,P,T,y){return D==="generic"?this.data.get(this.offset+this.stride[0]*k+this.stride[1]*P+this.stride[2]*T+this.stride[3]*y):this.data[this.offset+this.stride[0]*k+this.stride[1]*P+this.stride[2]*T+this.stride[3]*y]},N.index=function(k,P,T,y){return this.offset+this.stride[0]*k+this.stride[1]*P+this.stride[2]*T+this.stride[3]*y},N.hi=function(k,P,T,y){return new I(this.data,typeof k!="number"||k<0?this.shape[0]:k|0,typeof P!="number"||P<0?this.shape[1]:P|0,typeof T!="number"||T<0?this.shape[2]:T|0,typeof y!="number"||y<0?this.shape[3]:y|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},N.lo=function(k,P,T,y){var S=this.offset,M=0,W=this.shape[0],$=this.shape[1],Z=this.shape[2],K=this.shape[3],Q=this.stride[0],J=this.stride[1],G=this.stride[2],ee=this.stride[3];return typeof k=="number"&&k>=0&&(M=k|0,S+=Q*M,W-=M),typeof P=="number"&&P>=0&&(M=P|0,S+=J*M,$-=M),typeof T=="number"&&T>=0&&(M=T|0,S+=G*M,Z-=M),typeof y=="number"&&y>=0&&(M=y|0,S+=ee*M,K-=M),new I(this.data,W,$,Z,K,Q,J,G,ee,S)},N.step=function(k,P,T,y){var S=this.shape[0],M=this.shape[1],W=this.shape[2],$=this.shape[3],Z=this.stride[0],K=this.stride[1],Q=this.stride[2],J=this.stride[3],G=this.offset,ee=0,re=Math.ceil;return typeof k=="number"&&(ee=k|0,ee<0?(G+=Z*(S-1),S=re(-S/ee)):S=re(S/ee),Z*=ee),typeof P=="number"&&(ee=P|0,ee<0?(G+=K*(M-1),M=re(-M/ee)):M=re(M/ee),K*=ee),typeof T=="number"&&(ee=T|0,ee<0?(G+=Q*(W-1),W=re(-W/ee)):W=re(W/ee),Q*=ee),typeof y=="number"&&(ee=y|0,ee<0?(G+=J*($-1),$=re(-$/ee)):$=re($/ee),J*=ee),new I(this.data,S,M,W,$,Z,K,Q,J,G)},N.transpose=function(k,P,T,y){k=k===void 0?0:k|0,P=P===void 0?1:P|0,T=T===void 0?2:T|0,y=y===void 0?3:y|0;var S=this.shape,M=this.stride;return new I(this.data,S[k],S[P],S[T],S[y],M[k],M[P],M[T],M[y],this.offset)},N.pick=function(k,P,T,y){var S=[],M=[],W=this.offset;typeof k=="number"&&k>=0?W=W+this.stride[0]*k|0:(S.push(this.shape[0]),M.push(this.stride[0])),typeof P=="number"&&P>=0?W=W+this.stride[1]*P|0:(S.push(this.shape[1]),M.push(this.stride[1])),typeof T=="number"&&T>=0?W=W+this.stride[2]*T|0:(S.push(this.shape[2]),M.push(this.stride[2])),typeof y=="number"&&y>=0?W=W+this.stride[3]*y|0:(S.push(this.shape[3]),M.push(this.stride[3]));var $=g[S.length+1];return $(this.data,S,M,W)},function(k,P,T,y){return new I(k,P[0],P[1],P[2],P[3],T[0],T[1],T[2],T[3],y)}},5:function(g,C,I){function N(k,P,T,y,S,M,W,$,Z,K,Q,J){this.data=k,this.shape=[P,T,y,S,M],this.stride=[W,$,Z,K,Q],this.offset=J|0}var F=N.prototype;return F.dtype=g,F.dimension=5,Object.defineProperty(F,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(F,"order",{get:I}),F.set=function(P,T,y,S,M,W){return g==="generic"?this.data.set(this.offset+this.stride[0]*P+this.stride[1]*T+this.stride[2]*y+this.stride[3]*S+this.stride[4]*M,W):this.data[this.offset+this.stride[0]*P+this.stride[1]*T+this.stride[2]*y+this.stride[3]*S+this.stride[4]*M]=W},F.get=function(P,T,y,S,M){return g==="generic"?this.data.get(this.offset+this.stride[0]*P+this.stride[1]*T+this.stride[2]*y+this.stride[3]*S+this.stride[4]*M):this.data[this.offset+this.stride[0]*P+this.stride[1]*T+this.stride[2]*y+this.stride[3]*S+this.stride[4]*M]},F.index=function(P,T,y,S,M){return this.offset+this.stride[0]*P+this.stride[1]*T+this.stride[2]*y+this.stride[3]*S+this.stride[4]*M},F.hi=function(P,T,y,S,M){return new N(this.data,typeof P!="number"||P<0?this.shape[0]:P|0,typeof T!="number"||T<0?this.shape[1]:T|0,typeof y!="number"||y<0?this.shape[2]:y|0,typeof S!="number"||S<0?this.shape[3]:S|0,typeof M!="number"||M<0?this.shape[4]:M|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},F.lo=function(P,T,y,S,M){var W=this.offset,$=0,Z=this.shape[0],K=this.shape[1],Q=this.shape[2],J=this.shape[3],G=this.shape[4],ee=this.stride[0],re=this.stride[1],fe=this.stride[2],we=this.stride[3],Oe=this.stride[4];return typeof P=="number"&&P>=0&&($=P|0,W+=ee*$,Z-=$),typeof T=="number"&&T>=0&&($=T|0,W+=re*$,K-=$),typeof y=="number"&&y>=0&&($=y|0,W+=fe*$,Q-=$),typeof S=="number"&&S>=0&&($=S|0,W+=we*$,J-=$),typeof M=="number"&&M>=0&&($=M|0,W+=Oe*$,G-=$),new N(this.data,Z,K,Q,J,G,ee,re,fe,we,Oe,W)},F.step=function(P,T,y,S,M){var W=this.shape[0],$=this.shape[1],Z=this.shape[2],K=this.shape[3],Q=this.shape[4],J=this.stride[0],G=this.stride[1],ee=this.stride[2],re=this.stride[3],fe=this.stride[4],we=this.offset,Oe=0,ke=Math.ceil;return typeof P=="number"&&(Oe=P|0,Oe<0?(we+=J*(W-1),W=ke(-W/Oe)):W=ke(W/Oe),J*=Oe),typeof T=="number"&&(Oe=T|0,Oe<0?(we+=G*($-1),$=ke(-$/Oe)):$=ke($/Oe),G*=Oe),typeof y=="number"&&(Oe=y|0,Oe<0?(we+=ee*(Z-1),Z=ke(-Z/Oe)):Z=ke(Z/Oe),ee*=Oe),typeof S=="number"&&(Oe=S|0,Oe<0?(we+=re*(K-1),K=ke(-K/Oe)):K=ke(K/Oe),re*=Oe),typeof M=="number"&&(Oe=M|0,Oe<0?(we+=fe*(Q-1),Q=ke(-Q/Oe)):Q=ke(Q/Oe),fe*=Oe),new N(this.data,W,$,Z,K,Q,J,G,ee,re,fe,we)},F.transpose=function(P,T,y,S,M){P=P===void 0?0:P|0,T=T===void 0?1:T|0,y=y===void 0?2:y|0,S=S===void 0?3:S|0,M=M===void 0?4:M|0;var W=this.shape,$=this.stride;return new N(this.data,W[P],W[T],W[y],W[S],W[M],$[P],$[T],$[y],$[S],$[M],this.offset)},F.pick=function(P,T,y,S,M){var W=[],$=[],Z=this.offset;typeof P=="number"&&P>=0?Z=Z+this.stride[0]*P|0:(W.push(this.shape[0]),$.push(this.stride[0])),typeof T=="number"&&T>=0?Z=Z+this.stride[1]*T|0:(W.push(this.shape[1]),$.push(this.stride[1])),typeof y=="number"&&y>=0?Z=Z+this.stride[2]*y|0:(W.push(this.shape[2]),$.push(this.stride[2])),typeof S=="number"&&S>=0?Z=Z+this.stride[3]*S|0:(W.push(this.shape[3]),$.push(this.stride[3])),typeof M=="number"&&M>=0?Z=Z+this.stride[4]*M|0:(W.push(this.shape[4]),$.push(this.stride[4]));var K=C[W.length+1];return K(this.data,W,$,Z)},function(P,T,y,S){return new N(P,T[0],T[1],T[2],T[3],T[4],y[0],y[1],y[2],y[3],y[4],S)}}};function _(D,g){var C=g===-1?"T":String(g),I=m[C];return g===-1?I(D):g===0?I(D,A[D][0]):I(D,A[D],h)}function x(D){if(p(D))return"buffer";if(f)switch(Object.prototype.toString.call(D)){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(D)?"array":"generic"}var A={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function E(D,g,C,I){if(D===void 0){var y=A.array[0];return y([])}else typeof D=="number"&&(D=[D]);g===void 0&&(g=[D.length]);var N=g.length;if(C===void 0){C=new Array(N);for(var F=N-1,k=1;F>=0;--F)C[F]=k,k*=g[F]}if(I===void 0){I=0;for(var F=0;F<N;++F)C[F]<0&&(I-=(g[F]-1)*C[F])}for(var P=x(D),T=A[P];T.length<=N+1;)T.push(_(P,T.length-1));var y=T[N+1];return y(D,g,C,I)}l.exports=E}),1278:(function(l,u,c){var p=c(2361),f=Math.pow(2,-1074),v=-1>>>0;l.exports=h;function h(m,_){if(isNaN(m)||isNaN(_))return NaN;if(m===_)return m;if(m===0)return _<0?-f:f;var x=p.hi(m),A=p.lo(m);return _>m==m>0?A===v?(x+=1,A=0):A+=1:A===0?(A=v,x-=1):A-=1,p.pack(A,x)}}),8406:(function(l,u){var c=1e-6,p=1e-6;u.vertexNormals=function(f,v,h){for(var m=v.length,_=new Array(m),x=h===void 0?c:h,A=0;A<m;++A)_[A]=[0,0,0];for(var A=0;A<f.length;++A)for(var E=f[A],D=0,g=E[E.length-1],C=E[0],I=0;I<E.length;++I){D=g,g=C,C=E[(I+1)%E.length];for(var N=v[D],F=v[g],k=v[C],P=new Array(3),T=0,y=new Array(3),S=0,M=0;M<3;++M)P[M]=N[M]-F[M],T+=P[M]*P[M],y[M]=k[M]-F[M],S+=y[M]*y[M];if(T*S>x)for(var W=_[g],$=1/Math.sqrt(T*S),M=0;M<3;++M){var Z=(M+1)%3,K=(M+2)%3;W[M]+=$*(y[Z]*P[K]-y[K]*P[Z])}}for(var A=0;A<m;++A){for(var W=_[A],Q=0,M=0;M<3;++M)Q+=W[M]*W[M];if(Q>x)for(var $=1/Math.sqrt(Q),M=0;M<3;++M)W[M]*=$;else for(var M=0;M<3;++M)W[M]=0}return _},u.faceNormals=function(f,v,h){for(var m=f.length,_=new Array(m),x=h===void 0?p:h,A=0;A<m;++A){for(var E=f[A],D=new Array(3),g=0;g<3;++g)D[g]=v[E[g]];for(var C=new Array(3),I=new Array(3),g=0;g<3;++g)C[g]=D[1][g]-D[0][g],I[g]=D[2][g]-D[0][g];for(var N=new Array(3),F=0,g=0;g<3;++g){var k=(g+1)%3,P=(g+2)%3;N[g]=C[k]*I[P]-C[P]*I[k],F+=N[g]*N[g]}F>x?F=1/Math.sqrt(F):F=0;for(var g=0;g<3;++g)N[g]*=F;_[A]=N}return _}}),4081:(function(l){l.exports=u;function u(c,p,f,v,h,m,_,x,A,E){var D=p+m+E;if(g>0){var g=Math.sqrt(D+1);c[0]=.5*(_-A)/g,c[1]=.5*(x-v)/g,c[2]=.5*(f-m)/g,c[3]=.5*g}else{var C=Math.max(p,m,E),g=Math.sqrt(2*C-D+1);p>=C?(c[0]=.5*g,c[1]=.5*(h+f)/g,c[2]=.5*(x+v)/g,c[3]=.5*(_-A)/g):m>=C?(c[0]=.5*(f+h)/g,c[1]=.5*g,c[2]=.5*(A+_)/g,c[3]=.5*(x-v)/g):(c[0]=.5*(v+x)/g,c[1]=.5*(_+A)/g,c[2]=.5*g,c[3]=.5*(f-h)/g)}return c}}),9977:(function(l,u,c){l.exports=g;var p=c(9215),f=c(6582),v=c(7399),h=c(7608),m=c(4081);function _(C,I,N){return Math.sqrt(Math.pow(C,2)+Math.pow(I,2)+Math.pow(N,2))}function x(C,I,N,F){return Math.sqrt(Math.pow(C,2)+Math.pow(I,2)+Math.pow(N,2)+Math.pow(F,2))}function A(C,I){var N=I[0],F=I[1],k=I[2],P=I[3],T=x(N,F,k,P);T>1e-6?(C[0]=N/T,C[1]=F/T,C[2]=k/T,C[3]=P/T):(C[0]=C[1]=C[2]=0,C[3]=1)}function E(C,I,N){this.radius=p([N]),this.center=p(I),this.rotation=p(C),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var D=E.prototype;D.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},D.recalcMatrix=function(C){this.radius.curve(C),this.center.curve(C),this.rotation.curve(C);var I=this.computedRotation;A(I,I);var N=this.computedMatrix;v(N,I);var F=this.computedCenter,k=this.computedEye,P=this.computedUp,T=Math.exp(this.computedRadius[0]);k[0]=F[0]+T*N[2],k[1]=F[1]+T*N[6],k[2]=F[2]+T*N[10],P[0]=N[1],P[1]=N[5],P[2]=N[9];for(var y=0;y<3;++y){for(var S=0,M=0;M<3;++M)S+=N[y+4*M]*k[M];N[12+y]=-S}},D.getMatrix=function(C,I){this.recalcMatrix(C);var N=this.computedMatrix;if(I){for(var F=0;F<16;++F)I[F]=N[F];return I}return N},D.idle=function(C){this.center.idle(C),this.radius.idle(C),this.rotation.idle(C)},D.flush=function(C){this.center.flush(C),this.radius.flush(C),this.rotation.flush(C)},D.pan=function(C,I,N,F){I=I||0,N=N||0,F=F||0,this.recalcMatrix(C);var k=this.computedMatrix,P=k[1],T=k[5],y=k[9],S=_(P,T,y);P/=S,T/=S,y/=S;var M=k[0],W=k[4],$=k[8],Z=M*P+W*T+$*y;M-=P*Z,W-=T*Z,$-=y*Z;var K=_(M,W,$);M/=K,W/=K,$/=K,k[2],k[6],k[10];var Q=M*I+P*N,J=W*I+T*N,G=$*I+y*N;this.center.move(C,Q,J,G);var ee=Math.exp(this.computedRadius[0]);ee=Math.max(1e-4,ee+F),this.radius.set(C,Math.log(ee))},D.rotate=function(C,I,N,F){this.recalcMatrix(C),I=I||0,N=N||0;var k=this.computedMatrix,P=k[0],T=k[4],y=k[8],S=k[1],M=k[5],W=k[9],$=k[2],Z=k[6],K=k[10],Q=I*P+N*S,J=I*T+N*M,G=I*y+N*W,ee=-(Z*G-K*J),re=-(K*Q-$*G),fe=-($*J-Z*Q),we=Math.sqrt(Math.max(0,1-Math.pow(ee,2)-Math.pow(re,2)-Math.pow(fe,2))),Oe=x(ee,re,fe,we);Oe>1e-6?(ee/=Oe,re/=Oe,fe/=Oe,we/=Oe):(ee=re=fe=0,we=1);var ke=this.computedRotation,Le=ke[0],oe=ke[1],be=ke[2],_e=ke[3],he=Le*we+_e*ee+oe*fe-be*re,De=oe*we+_e*re+be*ee-Le*fe,xe=be*we+_e*fe+Le*re-oe*ee,se=_e*we-Le*ee-oe*re-be*fe;if(F){ee=$,re=Z,fe=K;var Ee=Math.sin(F)/_(ee,re,fe);ee*=Ee,re*=Ee,fe*=Ee,we=Math.cos(I),he=he*we+se*ee+De*fe-xe*re,De=De*we+se*re+xe*ee-he*fe,xe=xe*we+se*fe+he*re-De*ee,se=se*we-he*ee-De*re-xe*fe}var Te=x(he,De,xe,se);Te>1e-6?(he/=Te,De/=Te,xe/=Te,se/=Te):(he=De=xe=0,se=1),this.rotation.set(C,he,De,xe,se)},D.lookAt=function(C,I,N,F){this.recalcMatrix(C),N=N||this.computedCenter,I=I||this.computedEye,F=F||this.computedUp;var k=this.computedMatrix;f(k,I,N,F);var P=this.computedRotation;m(P,k[0],k[1],k[2],k[4],k[5],k[6],k[8],k[9],k[10]),A(P,P),this.rotation.set(C,P[0],P[1],P[2],P[3]);for(var T=0,y=0;y<3;++y)T+=Math.pow(N[y]-I[y],2);this.radius.set(C,.5*Math.log(Math.max(T,1e-6))),this.center.set(C,N[0],N[1],N[2])},D.translate=function(C,I,N,F){this.center.move(C,I||0,N||0,F||0)},D.setMatrix=function(C,I){var N=this.computedRotation;m(N,I[0],I[1],I[2],I[4],I[5],I[6],I[8],I[9],I[10]),A(N,N),this.rotation.set(C,N[0],N[1],N[2],N[3]);var F=this.computedMatrix;h(F,I);var k=F[15];if(Math.abs(k)>1e-6){var P=F[12]/k,T=F[13]/k,y=F[14]/k;this.recalcMatrix(C);var S=Math.exp(this.computedRadius[0]);this.center.set(C,P-F[2]*S,T-F[6]*S,y-F[10]*S),this.radius.idle(C)}else this.center.idle(C),this.radius.idle(C)},D.setDistance=function(C,I){I>0&&this.radius.set(C,Math.log(I))},D.setDistanceLimits=function(C,I){C>0?C=Math.log(C):C=-1/0,I>0?I=Math.log(I):I=1/0,I=Math.max(I,C),this.radius.bounds[0][0]=C,this.radius.bounds[1][0]=I},D.getDistanceLimits=function(C){var I=this.radius.bounds;return C?(C[0]=Math.exp(I[0][0]),C[1]=Math.exp(I[1][0]),C):[Math.exp(I[0][0]),Math.exp(I[1][0])]},D.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},D.fromJSON=function(C){var I=this.lastT(),N=C.center;N&&this.center.set(I,N[0],N[1],N[2]);var F=C.rotation;F&&this.rotation.set(I,F[0],F[1],F[2],F[3]);var k=C.distance;k&&k>0&&this.radius.set(I,Math.log(k)),this.setDistanceLimits(C.zoomMin,C.zoomMax)};function g(C){C=C||{};var I=C.center||[0,0,0],N=C.rotation||[0,0,0,1],F=C.radius||1;I=[].slice.call(I,0,3),N=[].slice.call(N,0,4),A(N,N);var k=new E(N,I,Math.log(F));return k.setDistanceLimits(C.zoomMin,C.zoomMax),("eye"in C||"up"in C)&&k.lookAt(0,C.eye,C.center,C.up),k}}),1371:(function(l,u,c){var p=c(3233);l.exports=function(v,h,m){return m=typeof m<"u"?m+"":" ",p(m,h)+v}}),3202:(function(l){l.exports=function(c,p){p||(p=[0,""]),c=String(c);var f=parseFloat(c,10);return p[0]=f,p[1]=c.match(/[\d.\-\+]*\s*(.*)/)[1]||"",p}}),3088:(function(l,u,c){l.exports=f;var p=c(3140);function f(v,h){for(var m=h.length|0,_=v.length,x=[new Array(m),new Array(m)],A=0;A<m;++A)x[0][A]=[],x[1][A]=[];for(var A=0;A<_;++A){var E=v[A];x[0][E[0]].push(E),x[1][E[1]].push(E)}for(var D=[],A=0;A<m;++A)x[0][A].length+x[1][A].length===0&&D.push([A]);function g(T,y){var S=x[y][T[y]];S.splice(S.indexOf(T),1)}function C(T,y,S){for(var M,W,$,Z=0;Z<2;++Z)if(x[Z][y].length>0){M=x[Z][y][0],$=Z;break}W=M[$^1];for(var K=0;K<2;++K)for(var Q=x[K][y],J=0;J<Q.length;++J){var G=Q[J],ee=G[K^1],re=p(h[T],h[y],h[W],h[ee]);re>0&&(M=G,W=ee,$=K)}return S||M&&g(M,$),W}function I(T,y){var S=x[y][T][0],M=[T];g(S,y);for(var W=S[y^1];;){for(;W!==T;)M.push(W),W=C(M[M.length-2],W,!1);if(x[0][T].length+x[1][T].length===0)break;var $=M[M.length-1],Z=T,K=M[1],Q=C($,Z,!0);if(p(h[$],h[Z],h[K],h[Q])<0)break;M.push(T),W=C($,Z)}return M}function N(T,y){return y[1]===y[y.length-1]}for(var A=0;A<m;++A)for(var F=0;F<2;++F){for(var k=[];x[F][A].length>0;){x[0][A].length;var P=I(A,F);N(k,P)?k.push.apply(k,P):(k.length>0&&D.push(k),k=P)}k.length>0&&D.push(k)}return D}}),5609:(function(l,u,c){l.exports=f;var p=c(3134);function f(v,h){for(var m=p(v,h.length),_=new Array(h.length),x=new Array(h.length),A=[],E=0;E<h.length;++E){var D=m[E].length;x[E]=D,_[E]=!0,D<=1&&A.push(E)}for(;A.length>0;){var g=A.pop();_[g]=!1;for(var C=m[g],E=0;E<C.length;++E){var I=C[E];--x[I]===0&&A.push(I)}}for(var N=new Array(h.length),F=[],E=0;E<h.length;++E)if(_[E]){var g=F.length;N[E]=g,F.push(h[E])}else N[E]=-1;for(var k=[],E=0;E<v.length;++E){var P=v[E];_[P[0]]&&_[P[1]]&&k.push([N[P[0]],N[P[1]]])}return[k,F]}}),2095:(function(l,u,c){l.exports=D;var p=c(3134),f=c(3088),v=c(5085),h=c(5250),m=c(8210),_=c(1682),x=c(5609);function A(g,C){for(var I=new Array(g),N=0;N<g;++N)I[N]=C;return I}function E(g){for(var C=new Array(g),I=0;I<g;++I)C[I]=[];return C}function D(g,C){var se=x(g,C);g=se[0],C=se[1];var I=C.length;g.length;for(var N=p(g,C.length),F=0;F<I;++F)if(N[F].length%2===1)throw new Error("planar-graph-to-polyline: graph must be manifold");var k=f(g,C);function P(pt){for(var Rt=pt.length,$t=[0],Wt=0;Wt<Rt;++Wt){var Ht=C[pt[Wt]],Ft=C[pt[(Wt+1)%Rt]],st=h(-Ht[0],Ht[1]),rt=h(-Ht[0],Ft[1]),Ue=h(Ft[0],Ht[1]),xt=h(Ft[0],Ft[1]);$t=m($t,m(m(st,rt),m(Ue,xt)))}return $t[$t.length-1]>0}k=k.filter(P);for(var T=k.length,y=new Array(T),S=new Array(T),F=0;F<T;++F){y[F]=F;var M=new Array(T),W=k[F].map(function(Rt){return C[Rt]}),$=v([W]),Z=0;e:for(var K=0;K<T;++K)if(M[K]=0,F!==K){for(var Q=k[K],J=Q.length,G=0;G<J;++G){var ee=$(C[Q[G]]);if(ee!==0){ee<0&&(M[K]=1,Z+=1);continue e}}M[K]=1,Z+=1}S[F]=[Z,F,M]}S.sort(function(pt,Rt){return Rt[0]-pt[0]});for(var F=0;F<T;++F)for(var M=S[F],re=M[1],fe=M[2],K=0;K<T;++K)fe[K]&&(y[K]=re);for(var we=E(T),F=0;F<T;++F)we[F].push(y[F]),we[y[F]].push(F);for(var Oe={},ke=A(I,!1),F=0;F<T;++F)for(var Q=k[F],J=Q.length,K=0;K<J;++K){var Le=Q[K],oe=Q[(K+1)%J],be=Math.min(Le,oe)+":"+Math.max(Le,oe);if(be in Oe){var _e=Oe[be];we[_e].push(F),we[F].push(_e),ke[Le]=ke[oe]=!0}else Oe[be]=F}function he(pt){for(var Rt=pt.length,$t=0;$t<Rt;++$t)if(!ke[pt[$t]])return!1;return!0}for(var De=[],xe=A(T,-1),F=0;F<T;++F)y[F]===F&&!he(k[F])?(De.push(F),xe[F]=0):xe[F]=-1;for(var se=[];De.length>0;){var Ee=De.pop(),Te=we[Ee];_(Te,function(pt,Rt){return pt-Rt});var Be=Te.length,tt=xe[Ee],at;if(tt===0){var Q=k[Ee];at=[Q]}for(var F=0;F<Be;++F){var gt=Te[F];if(!(xe[gt]>=0)&&(xe[gt]=tt^1,De.push(gt),tt===0)){var Q=k[gt];he(Q)||(Q.reverse(),at.push(Q))}}tt===0&&se.push(at)}return se}}),5085:(function(l,u,c){l.exports=C;var p=c(3250)[3],f=c(4209),v=c(3352),h=c(2478);function m(){return!0}function _(I){return function(N,F){var k=I[N];return k?!!k.queryPoint(F,m):!1}}function x(I){for(var N={},F=0;F<I.length;++F){var k=I[F],P=k[0][0],T=k[0][1],y=k[1][1],S=[Math.min(T,y),Math.max(T,y)];P in N?N[P].push(S):N[P]=[S]}for(var M={},W=Object.keys(N),F=0;F<W.length;++F){var $=N[W[F]];M[W[F]]=v($)}return _(M)}function A(I,N){return function(F){var k=h.le(N,F[0]);if(k<0)return 1;var P=I[k];if(!P)if(k>0&&N[k]===F[0])P=I[k-1];else return 1;for(var T=1;P;){var y=P.key,S=p(F,y[0],y[1]);if(y[0][0]<y[1][0])if(S<0)P=P.left;else if(S>0)T=-1,P=P.right;else return 0;else if(S>0)P=P.left;else if(S<0)T=1,P=P.right;else return 0}return T}}function E(I){return 1}function D(I){return function(F){return I(F[0],F[1])?0:1}}function g(I,N){return function(k){return I(k[0],k[1])?0:N(k)}}function C(I){for(var N=I.length,F=[],k=[],P=0;P<N;++P)for(var T=I[P],y=T.length,S=y-1,M=0;M<y;S=M++){var W=T[S],$=T[M];W[0]===$[0]?k.push([W,$]):F.push([W,$])}if(F.length===0)return k.length===0?E:D(x(k));var Z=f(F),K=A(Z.slabs,Z.coordinates);return k.length===0?K:g(x(k),K)}}),9346:(function(l){var u=new Float64Array(4),c=new Float64Array(4),p=new Float64Array(4);function f(v,h,m,_,x){u.length<_.length&&(u=new Float64Array(_.length),c=new Float64Array(_.length),p=new Float64Array(_.length));for(var A=0;A<_.length;++A)u[A]=v[A]-_[A],c[A]=h[A]-v[A],p[A]=m[A]-v[A];for(var E=0,D=0,g=0,C=0,I=0,N=0,A=0;A<_.length;++A){var F=c[A],k=p[A],P=u[A];E+=F*F,D+=F*k,g+=k*k,C+=P*F,I+=P*k,N+=P*P}var T=Math.abs(E*g-D*D),y=D*I-g*C,S=D*C-E*I,M;if(y+S<=T)if(y<0)S<0&&C<0?(S=0,-C>=E?(y=1,M=E+2*C+N):(y=-C/E,M=C*y+N)):(y=0,I>=0?(S=0,M=N):-I>=g?(S=1,M=g+2*I+N):(S=-I/g,M=I*S+N));else if(S<0)S=0,C>=0?(y=0,M=N):-C>=E?(y=1,M=E+2*C+N):(y=-C/E,M=C*y+N);else{var W=1/T;y*=W,S*=W,M=y*(E*y+D*S+2*C)+S*(D*y+g*S+2*I)+N}else{var $,Z,K,Q;y<0?($=D+C,Z=g+I,Z>$?(K=Z-$,Q=E-2*D+g,K>=Q?(y=1,S=0,M=E+2*C+N):(y=K/Q,S=1-y,M=y*(E*y+D*S+2*C)+S*(D*y+g*S+2*I)+N)):(y=0,Z<=0?(S=1,M=g+2*I+N):I>=0?(S=0,M=N):(S=-I/g,M=I*S+N))):S<0?($=D+I,Z=E+C,Z>$?(K=Z-$,Q=E-2*D+g,K>=Q?(S=1,y=0,M=g+2*I+N):(S=K/Q,y=1-S,M=y*(E*y+D*S+2*C)+S*(D*y+g*S+2*I)+N)):(S=0,Z<=0?(y=1,M=E+2*C+N):C>=0?(y=0,M=N):(y=-C/E,M=C*y+N))):(K=g+I-D-C,K<=0?(y=0,S=1,M=g+2*I+N):(Q=E-2*D+g,K>=Q?(y=1,S=0,M=E+2*C+N):(y=K/Q,S=1-y,M=y*(E*y+D*S+2*C)+S*(D*y+g*S+2*I)+N)))}for(var J=1-y-S,A=0;A<_.length;++A)x[A]=J*v[A]+y*h[A]+S*m[A];return M<0?0:M}l.exports=f}),8648:(function(l,u,c){l.exports=c(783)}),2653:(function(l,u,c){var p=c(3865);l.exports=f;function f(v,h){for(var m=v.length,_=new Array(m),x=0;x<m;++x)_[x]=p(v[x],h[x]);return _}}),5838:(function(l,u,c){l.exports=f;var p=c(7842);function f(v){for(var h=new Array(v.length),m=0;m<v.length;++m)h[m]=p(v[m]);return h}}),8987:(function(l,u,c){var p=c(7842),f=c(6504);l.exports=v;function v(h,m){for(var _=p(m),x=h.length,A=new Array(x),E=0;E<x;++E)A[E]=f(h[E],_);return A}}),544:(function(l,u,c){var p=c(5572);l.exports=f;function f(v,h){for(var m=v.length,_=new Array(m),x=0;x<m;++x)_[x]=p(v[x],h[x]);return _}}),5771:(function(l,u,c){var p=c(8507),f=c(3788),v=c(2419);l.exports=h;function h(m){m.sort(f);for(var _=m.length,x=0,A=0;A<_;++A){var E=m[A],D=v(E);if(D!==0){if(x>0){var g=m[x-1];if(p(E,g)===0&&v(g)!==D){x-=1;continue}}m[x++]=E}}return m.length=x,m}}),3233:(function(l){var u="",c;l.exports=p;function p(f,v){if(typeof f!="string")throw new TypeError("expected a string");if(v===1)return f;if(v===2)return f+f;var h=f.length*v;if(c!==f||typeof c>"u")c=f,u="";else if(u.length>=h)return u.substr(0,h);for(;h>u.length&&v>1;)v&1&&(u+=f),v>>=1,f+=f;return u+=f,u=u.substr(0,h),u}}),3025:(function(l,u,c){l.exports=c.g.performance&&c.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}}),7004:(function(l){l.exports=u;function u(c){for(var p=c.length,f=c[c.length-1],v=p,h=p-2;h>=0;--h){var m=f,_=c[h];f=m+_;var x=f-m,A=_-x;A&&(c[--v]=f,f=A)}for(var E=0,h=v;h<p;++h){var m=c[h],_=f;f=m+_;var x=f-m,A=_-x;A&&(c[E++]=A)}return c[E++]=f,c.length=E,c}}),2962:(function(l,u,c){var p=c(5250),f=c(8210),v=c(3012),h=c(7004),m=6;function _(N,F,k,P){return function(y){return P(N(k(y[0][0],y[1][1]),k(-y[0][1],y[1][0])))}}function x(N,F,k,P){return function(y){return P(N(F(N(k(y[1][1],y[2][2]),k(-y[1][2],y[2][1])),y[0][0]),N(F(N(k(y[1][0],y[2][2]),k(-y[1][2],y[2][0])),-y[0][1]),F(N(k(y[1][0],y[2][1]),k(-y[1][1],y[2][0])),y[0][2]))))}}function A(N,F,k,P){return function(y){return P(N(N(F(N(F(N(k(y[2][2],y[3][3]),k(-y[2][3],y[3][2])),y[1][1]),N(F(N(k(y[2][1],y[3][3]),k(-y[2][3],y[3][1])),-y[1][2]),F(N(k(y[2][1],y[3][2]),k(-y[2][2],y[3][1])),y[1][3]))),y[0][0]),F(N(F(N(k(y[2][2],y[3][3]),k(-y[2][3],y[3][2])),y[1][0]),N(F(N(k(y[2][0],y[3][3]),k(-y[2][3],y[3][0])),-y[1][2]),F(N(k(y[2][0],y[3][2]),k(-y[2][2],y[3][0])),y[1][3]))),-y[0][1])),N(F(N(F(N(k(y[2][1],y[3][3]),k(-y[2][3],y[3][1])),y[1][0]),N(F(N(k(y[2][0],y[3][3]),k(-y[2][3],y[3][0])),-y[1][1]),F(N(k(y[2][0],y[3][1]),k(-y[2][1],y[3][0])),y[1][3]))),y[0][2]),F(N(F(N(k(y[2][1],y[3][2]),k(-y[2][2],y[3][1])),y[1][0]),N(F(N(k(y[2][0],y[3][2]),k(-y[2][2],y[3][0])),-y[1][1]),F(N(k(y[2][0],y[3][1]),k(-y[2][1],y[3][0])),y[1][2]))),-y[0][3]))))}}function E(N,F,k,P){return function(y){return P(N(N(F(N(N(F(N(F(N(k(y[3][3],y[4][4]),k(-y[3][4],y[4][3])),y[2][2]),N(F(N(k(y[3][2],y[4][4]),k(-y[3][4],y[4][2])),-y[2][3]),F(N(k(y[3][2],y[4][3]),k(-y[3][3],y[4][2])),y[2][4]))),y[1][1]),F(N(F(N(k(y[3][3],y[4][4]),k(-y[3][4],y[4][3])),y[2][1]),N(F(N(k(y[3][1],y[4][4]),k(-y[3][4],y[4][1])),-y[2][3]),F(N(k(y[3][1],y[4][3]),k(-y[3][3],y[4][1])),y[2][4]))),-y[1][2])),N(F(N(F(N(k(y[3][2],y[4][4]),k(-y[3][4],y[4][2])),y[2][1]),N(F(N(k(y[3][1],y[4][4]),k(-y[3][4],y[4][1])),-y[2][2]),F(N(k(y[3][1],y[4][2]),k(-y[3][2],y[4][1])),y[2][4]))),y[1][3]),F(N(F(N(k(y[3][2],y[4][3]),k(-y[3][3],y[4][2])),y[2][1]),N(F(N(k(y[3][1],y[4][3]),k(-y[3][3],y[4][1])),-y[2][2]),F(N(k(y[3][1],y[4][2]),k(-y[3][2],y[4][1])),y[2][3]))),-y[1][4]))),y[0][0]),F(N(N(F(N(F(N(k(y[3][3],y[4][4]),k(-y[3][4],y[4][3])),y[2][2]),N(F(N(k(y[3][2],y[4][4]),k(-y[3][4],y[4][2])),-y[2][3]),F(N(k(y[3][2],y[4][3]),k(-y[3][3],y[4][2])),y[2][4]))),y[1][0]),F(N(F(N(k(y[3][3],y[4][4]),k(-y[3][4],y[4][3])),y[2][0]),N(F(N(k(y[3][0],y[4][4]),k(-y[3][4],y[4][0])),-y[2][3]),F(N(k(y[3][0],y[4][3]),k(-y[3][3],y[4][0])),y[2][4]))),-y[1][2])),N(F(N(F(N(k(y[3][2],y[4][4]),k(-y[3][4],y[4][2])),y[2][0]),N(F(N(k(y[3][0],y[4][4]),k(-y[3][4],y[4][0])),-y[2][2]),F(N(k(y[3][0],y[4][2]),k(-y[3][2],y[4][0])),y[2][4]))),y[1][3]),F(N(F(N(k(y[3][2],y[4][3]),k(-y[3][3],y[4][2])),y[2][0]),N(F(N(k(y[3][0],y[4][3]),k(-y[3][3],y[4][0])),-y[2][2]),F(N(k(y[3][0],y[4][2]),k(-y[3][2],y[4][0])),y[2][3]))),-y[1][4]))),-y[0][1])),N(F(N(N(F(N(F(N(k(y[3][3],y[4][4]),k(-y[3][4],y[4][3])),y[2][1]),N(F(N(k(y[3][1],y[4][4]),k(-y[3][4],y[4][1])),-y[2][3]),F(N(k(y[3][1],y[4][3]),k(-y[3][3],y[4][1])),y[2][4]))),y[1][0]),F(N(F(N(k(y[3][3],y[4][4]),k(-y[3][4],y[4][3])),y[2][0]),N(F(N(k(y[3][0],y[4][4]),k(-y[3][4],y[4][0])),-y[2][3]),F(N(k(y[3][0],y[4][3]),k(-y[3][3],y[4][0])),y[2][4]))),-y[1][1])),N(F(N(F(N(k(y[3][1],y[4][4]),k(-y[3][4],y[4][1])),y[2][0]),N(F(N(k(y[3][0],y[4][4]),k(-y[3][4],y[4][0])),-y[2][1]),F(N(k(y[3][0],y[4][1]),k(-y[3][1],y[4][0])),y[2][4]))),y[1][3]),F(N(F(N(k(y[3][1],y[4][3]),k(-y[3][3],y[4][1])),y[2][0]),N(F(N(k(y[3][0],y[4][3]),k(-y[3][3],y[4][0])),-y[2][1]),F(N(k(y[3][0],y[4][1]),k(-y[3][1],y[4][0])),y[2][3]))),-y[1][4]))),y[0][2]),N(F(N(N(F(N(F(N(k(y[3][2],y[4][4]),k(-y[3][4],y[4][2])),y[2][1]),N(F(N(k(y[3][1],y[4][4]),k(-y[3][4],y[4][1])),-y[2][2]),F(N(k(y[3][1],y[4][2]),k(-y[3][2],y[4][1])),y[2][4]))),y[1][0]),F(N(F(N(k(y[3][2],y[4][4]),k(-y[3][4],y[4][2])),y[2][0]),N(F(N(k(y[3][0],y[4][4]),k(-y[3][4],y[4][0])),-y[2][2]),F(N(k(y[3][0],y[4][2]),k(-y[3][2],y[4][0])),y[2][4]))),-y[1][1])),N(F(N(F(N(k(y[3][1],y[4][4]),k(-y[3][4],y[4][1])),y[2][0]),N(F(N(k(y[3][0],y[4][4]),k(-y[3][4],y[4][0])),-y[2][1]),F(N(k(y[3][0],y[4][1]),k(-y[3][1],y[4][0])),y[2][4]))),y[1][2]),F(N(F(N(k(y[3][1],y[4][2]),k(-y[3][2],y[4][1])),y[2][0]),N(F(N(k(y[3][0],y[4][2]),k(-y[3][2],y[4][0])),-y[2][1]),F(N(k(y[3][0],y[4][1]),k(-y[3][1],y[4][0])),y[2][2]))),-y[1][4]))),-y[0][3]),F(N(N(F(N(F(N(k(y[3][2],y[4][3]),k(-y[3][3],y[4][2])),y[2][1]),N(F(N(k(y[3][1],y[4][3]),k(-y[3][3],y[4][1])),-y[2][2]),F(N(k(y[3][1],y[4][2]),k(-y[3][2],y[4][1])),y[2][3]))),y[1][0]),F(N(F(N(k(y[3][2],y[4][3]),k(-y[3][3],y[4][2])),y[2][0]),N(F(N(k(y[3][0],y[4][3]),k(-y[3][3],y[4][0])),-y[2][2]),F(N(k(y[3][0],y[4][2]),k(-y[3][2],y[4][0])),y[2][3]))),-y[1][1])),N(F(N(F(N(k(y[3][1],y[4][3]),k(-y[3][3],y[4][1])),y[2][0]),N(F(N(k(y[3][0],y[4][3]),k(-y[3][3],y[4][0])),-y[2][1]),F(N(k(y[3][0],y[4][1]),k(-y[3][1],y[4][0])),y[2][3]))),y[1][2]),F(N(F(N(k(y[3][1],y[4][2]),k(-y[3][2],y[4][1])),y[2][0]),N(F(N(k(y[3][0],y[4][2]),k(-y[3][2],y[4][0])),-y[2][1]),F(N(k(y[3][0],y[4][1]),k(-y[3][1],y[4][0])),y[2][2]))),-y[1][3]))),y[0][4])))))}}function D(N){var F=N===2?_:N===3?x:N===4?A:N===5?E:void 0;return F(f,v,p,h)}var g=[function(){return[0]},function(F){return[F[0][0]]}];function C(N,F,k,P,T,y,S,M){return function($){switch($.length){case 0:return N($);case 1:return F($);case 2:return k($);case 3:return P($);case 4:return T($);case 5:return y($)}var Z=S[$.length];return Z||(Z=S[$.length]=M($.length)),Z($)}}function I(){for(;g.length<m;)g.push(D(g.length));l.exports=C.apply(void 0,g.concat([g,D]));for(var N=0;N<g.length;++N)l.exports[N]=g[N]}I()}),1944:(function(l,u,c){var p=c(5250),f=c(8210);l.exports=v;function v(h,m){for(var _=p(h[0],m[0]),x=1;x<h.length;++x)_=f(_,p(h[x],m[x]));return _}}),2646:(function(l,u,c){var p=c(5250),f=c(8210),v=c(8545),h=c(3012),m=6;function _(T){var y=T===3?D:T===4?g:T===5?C:I;return y(f,v,p,h)}function x(){return 0}function A(){return 0}function E(){return 0}function D(T,y,S,M){function W($,Z,K){var Q=S($[0],$[0]),J=M(Q,Z[0]),G=M(Q,K[0]),ee=S(Z[0],Z[0]),re=M(ee,$[0]),fe=M(ee,K[0]),we=S(K[0],K[0]),Oe=M(we,$[0]),ke=M(we,Z[0]),Le=T(y(ke,fe),y(re,J)),oe=y(Oe,G),be=y(Le,oe);return be[be.length-1]}return W}function g(T,y,S,M){function W($,Z,K,Q){var J=T(S($[0],$[0]),S($[1],$[1])),G=M(J,Z[0]),ee=M(J,K[0]),re=M(J,Q[0]),fe=T(S(Z[0],Z[0]),S(Z[1],Z[1])),we=M(fe,$[0]),Oe=M(fe,K[0]),ke=M(fe,Q[0]),Le=T(S(K[0],K[0]),S(K[1],K[1])),oe=M(Le,$[0]),be=M(Le,Z[0]),_e=M(Le,Q[0]),he=T(S(Q[0],Q[0]),S(Q[1],Q[1])),De=M(he,$[0]),xe=M(he,Z[0]),se=M(he,K[0]),Ee=T(T(M(y(se,_e),Z[1]),T(M(y(xe,ke),-K[1]),M(y(be,Oe),Q[1]))),T(M(y(xe,ke),$[1]),T(M(y(De,re),-Z[1]),M(y(we,G),Q[1])))),Te=T(T(M(y(se,_e),$[1]),T(M(y(De,re),-K[1]),M(y(oe,ee),Q[1]))),T(M(y(be,Oe),$[1]),T(M(y(oe,ee),-Z[1]),M(y(we,G),K[1])))),Be=y(Ee,Te);return Be[Be.length-1]}return W}function C(T,y,S,M){function W($,Z,K,Q,J){var G=T(S($[0],$[0]),T(S($[1],$[1]),S($[2],$[2]))),ee=M(G,Z[0]),re=M(G,K[0]),fe=M(G,Q[0]),we=M(G,J[0]),Oe=T(S(Z[0],Z[0]),T(S(Z[1],Z[1]),S(Z[2],Z[2]))),ke=M(Oe,$[0]),Le=M(Oe,K[0]),oe=M(Oe,Q[0]),be=M(Oe,J[0]),_e=T(S(K[0],K[0]),T(S(K[1],K[1]),S(K[2],K[2]))),he=M(_e,$[0]),De=M(_e,Z[0]),xe=M(_e,Q[0]),se=M(_e,J[0]),Ee=T(S(Q[0],Q[0]),T(S(Q[1],Q[1]),S(Q[2],Q[2]))),Te=M(Ee,$[0]),Be=M(Ee,Z[0]),tt=M(Ee,K[0]),at=M(Ee,J[0]),gt=T(S(J[0],J[0]),T(S(J[1],J[1]),S(J[2],J[2]))),pt=M(gt,$[0]),Rt=M(gt,Z[0]),$t=M(gt,K[0]),Wt=M(gt,Q[0]),Ht=T(T(T(M(T(M(y(Wt,at),K[1]),T(M(y($t,se),-Q[1]),M(y(tt,xe),J[1]))),Z[2]),T(M(T(M(y(Wt,at),Z[1]),T(M(y(Rt,be),-Q[1]),M(y(Be,oe),J[1]))),-K[2]),M(T(M(y($t,se),Z[1]),T(M(y(Rt,be),-K[1]),M(y(De,Le),J[1]))),Q[2]))),T(M(T(M(y(tt,xe),Z[1]),T(M(y(Be,oe),-K[1]),M(y(De,Le),Q[1]))),-J[2]),T(M(T(M(y(Wt,at),Z[1]),T(M(y(Rt,be),-Q[1]),M(y(Be,oe),J[1]))),$[2]),M(T(M(y(Wt,at),$[1]),T(M(y(pt,we),-Q[1]),M(y(Te,fe),J[1]))),-Z[2])))),T(T(M(T(M(y(Rt,be),$[1]),T(M(y(pt,we),-Z[1]),M(y(ke,ee),J[1]))),Q[2]),T(M(T(M(y(Be,oe),$[1]),T(M(y(Te,fe),-Z[1]),M(y(ke,ee),Q[1]))),-J[2]),M(T(M(y(tt,xe),Z[1]),T(M(y(Be,oe),-K[1]),M(y(De,Le),Q[1]))),$[2]))),T(M(T(M(y(tt,xe),$[1]),T(M(y(Te,fe),-K[1]),M(y(he,re),Q[1]))),-Z[2]),T(M(T(M(y(Be,oe),$[1]),T(M(y(Te,fe),-Z[1]),M(y(ke,ee),Q[1]))),K[2]),M(T(M(y(De,Le),$[1]),T(M(y(he,re),-Z[1]),M(y(ke,ee),K[1]))),-Q[2]))))),Ft=T(T(T(M(T(M(y(Wt,at),K[1]),T(M(y($t,se),-Q[1]),M(y(tt,xe),J[1]))),$[2]),M(T(M(y(Wt,at),$[1]),T(M(y(pt,we),-Q[1]),M(y(Te,fe),J[1]))),-K[2])),T(M(T(M(y($t,se),$[1]),T(M(y(pt,we),-K[1]),M(y(he,re),J[1]))),Q[2]),M(T(M(y(tt,xe),$[1]),T(M(y(Te,fe),-K[1]),M(y(he,re),Q[1]))),-J[2]))),T(T(M(T(M(y($t,se),Z[1]),T(M(y(Rt,be),-K[1]),M(y(De,Le),J[1]))),$[2]),M(T(M(y($t,se),$[1]),T(M(y(pt,we),-K[1]),M(y(he,re),J[1]))),-Z[2])),T(M(T(M(y(Rt,be),$[1]),T(M(y(pt,we),-Z[1]),M(y(ke,ee),J[1]))),K[2]),M(T(M(y(De,Le),$[1]),T(M(y(he,re),-Z[1]),M(y(ke,ee),K[1]))),-J[2])))),st=y(Ht,Ft);return st[st.length-1]}return W}function I(T,y,S,M){function W($,Z,K,Q,J,G){var ee=T(T(S($[0],$[0]),S($[1],$[1])),T(S($[2],$[2]),S($[3],$[3]))),re=M(ee,Z[0]),fe=M(ee,K[0]),we=M(ee,Q[0]),Oe=M(ee,J[0]),ke=M(ee,G[0]),Le=T(T(S(Z[0],Z[0]),S(Z[1],Z[1])),T(S(Z[2],Z[2]),S(Z[3],Z[3]))),oe=M(Le,$[0]),be=M(Le,K[0]),_e=M(Le,Q[0]),he=M(Le,J[0]),De=M(Le,G[0]),xe=T(T(S(K[0],K[0]),S(K[1],K[1])),T(S(K[2],K[2]),S(K[3],K[3]))),se=M(xe,$[0]),Ee=M(xe,Z[0]),Te=M(xe,Q[0]),Be=M(xe,J[0]),tt=M(xe,G[0]),at=T(T(S(Q[0],Q[0]),S(Q[1],Q[1])),T(S(Q[2],Q[2]),S(Q[3],Q[3]))),gt=M(at,$[0]),pt=M(at,Z[0]),Rt=M(at,K[0]),$t=M(at,J[0]),Wt=M(at,G[0]),Ht=T(T(S(J[0],J[0]),S(J[1],J[1])),T(S(J[2],J[2]),S(J[3],J[3]))),Ft=M(Ht,$[0]),st=M(Ht,Z[0]),rt=M(Ht,K[0]),Ue=M(Ht,Q[0]),xt=M(Ht,G[0]),Gt=T(T(S(G[0],G[0]),S(G[1],G[1])),T(S(G[2],G[2]),S(G[3],G[3]))),Jt=M(Gt,$[0]),Ut=M(Gt,Z[0]),kr=M(Gt,K[0]),Pr=M(Gt,Q[0]),$r=M(Gt,J[0]),rn=T(T(T(M(T(T(M(T(M(y($r,xt),Q[1]),T(M(y(Pr,Wt),-J[1]),M(y(Ue,$t),G[1]))),K[2]),M(T(M(y($r,xt),K[1]),T(M(y(kr,tt),-J[1]),M(y(rt,Be),G[1]))),-Q[2])),T(M(T(M(y(Pr,Wt),K[1]),T(M(y(kr,tt),-Q[1]),M(y(Rt,Te),G[1]))),J[2]),M(T(M(y(Ue,$t),K[1]),T(M(y(rt,Be),-Q[1]),M(y(Rt,Te),J[1]))),-G[2]))),Z[3]),T(M(T(T(M(T(M(y($r,xt),Q[1]),T(M(y(Pr,Wt),-J[1]),M(y(Ue,$t),G[1]))),Z[2]),M(T(M(y($r,xt),Z[1]),T(M(y(Ut,De),-J[1]),M(y(st,he),G[1]))),-Q[2])),T(M(T(M(y(Pr,Wt),Z[1]),T(M(y(Ut,De),-Q[1]),M(y(pt,_e),G[1]))),J[2]),M(T(M(y(Ue,$t),Z[1]),T(M(y(st,he),-Q[1]),M(y(pt,_e),J[1]))),-G[2]))),-K[3]),M(T(T(M(T(M(y($r,xt),K[1]),T(M(y(kr,tt),-J[1]),M(y(rt,Be),G[1]))),Z[2]),M(T(M(y($r,xt),Z[1]),T(M(y(Ut,De),-J[1]),M(y(st,he),G[1]))),-K[2])),T(M(T(M(y(kr,tt),Z[1]),T(M(y(Ut,De),-K[1]),M(y(Ee,be),G[1]))),J[2]),M(T(M(y(rt,Be),Z[1]),T(M(y(st,he),-K[1]),M(y(Ee,be),J[1]))),-G[2]))),Q[3]))),T(T(M(T(T(M(T(M(y(Pr,Wt),K[1]),T(M(y(kr,tt),-Q[1]),M(y(Rt,Te),G[1]))),Z[2]),M(T(M(y(Pr,Wt),Z[1]),T(M(y(Ut,De),-Q[1]),M(y(pt,_e),G[1]))),-K[2])),T(M(T(M(y(kr,tt),Z[1]),T(M(y(Ut,De),-K[1]),M(y(Ee,be),G[1]))),Q[2]),M(T(M(y(Rt,Te),Z[1]),T(M(y(pt,_e),-K[1]),M(y(Ee,be),Q[1]))),-G[2]))),-J[3]),M(T(T(M(T(M(y(Ue,$t),K[1]),T(M(y(rt,Be),-Q[1]),M(y(Rt,Te),J[1]))),Z[2]),M(T(M(y(Ue,$t),Z[1]),T(M(y(st,he),-Q[1]),M(y(pt,_e),J[1]))),-K[2])),T(M(T(M(y(rt,Be),Z[1]),T(M(y(st,he),-K[1]),M(y(Ee,be),J[1]))),Q[2]),M(T(M(y(Rt,Te),Z[1]),T(M(y(pt,_e),-K[1]),M(y(Ee,be),Q[1]))),-J[2]))),G[3])),T(M(T(T(M(T(M(y($r,xt),Q[1]),T(M(y(Pr,Wt),-J[1]),M(y(Ue,$t),G[1]))),Z[2]),M(T(M(y($r,xt),Z[1]),T(M(y(Ut,De),-J[1]),M(y(st,he),G[1]))),-Q[2])),T(M(T(M(y(Pr,Wt),Z[1]),T(M(y(Ut,De),-Q[1]),M(y(pt,_e),G[1]))),J[2]),M(T(M(y(Ue,$t),Z[1]),T(M(y(st,he),-Q[1]),M(y(pt,_e),J[1]))),-G[2]))),$[3]),M(T(T(M(T(M(y($r,xt),Q[1]),T(M(y(Pr,Wt),-J[1]),M(y(Ue,$t),G[1]))),$[2]),M(T(M(y($r,xt),$[1]),T(M(y(Jt,ke),-J[1]),M(y(Ft,Oe),G[1]))),-Q[2])),T(M(T(M(y(Pr,Wt),$[1]),T(M(y(Jt,ke),-Q[1]),M(y(gt,we),G[1]))),J[2]),M(T(M(y(Ue,$t),$[1]),T(M(y(Ft,Oe),-Q[1]),M(y(gt,we),J[1]))),-G[2]))),-Z[3])))),T(T(T(M(T(T(M(T(M(y($r,xt),Z[1]),T(M(y(Ut,De),-J[1]),M(y(st,he),G[1]))),$[2]),M(T(M(y($r,xt),$[1]),T(M(y(Jt,ke),-J[1]),M(y(Ft,Oe),G[1]))),-Z[2])),T(M(T(M(y(Ut,De),$[1]),T(M(y(Jt,ke),-Z[1]),M(y(oe,re),G[1]))),J[2]),M(T(M(y(st,he),$[1]),T(M(y(Ft,Oe),-Z[1]),M(y(oe,re),J[1]))),-G[2]))),Q[3]),M(T(T(M(T(M(y(Pr,Wt),Z[1]),T(M(y(Ut,De),-Q[1]),M(y(pt,_e),G[1]))),$[2]),M(T(M(y(Pr,Wt),$[1]),T(M(y(Jt,ke),-Q[1]),M(y(gt,we),G[1]))),-Z[2])),T(M(T(M(y(Ut,De),$[1]),T(M(y(Jt,ke),-Z[1]),M(y(oe,re),G[1]))),Q[2]),M(T(M(y(pt,_e),$[1]),T(M(y(gt,we),-Z[1]),M(y(oe,re),Q[1]))),-G[2]))),-J[3])),T(M(T(T(M(T(M(y(Ue,$t),Z[1]),T(M(y(st,he),-Q[1]),M(y(pt,_e),J[1]))),$[2]),M(T(M(y(Ue,$t),$[1]),T(M(y(Ft,Oe),-Q[1]),M(y(gt,we),J[1]))),-Z[2])),T(M(T(M(y(st,he),$[1]),T(M(y(Ft,Oe),-Z[1]),M(y(oe,re),J[1]))),Q[2]),M(T(M(y(pt,_e),$[1]),T(M(y(gt,we),-Z[1]),M(y(oe,re),Q[1]))),-J[2]))),G[3]),M(T(T(M(T(M(y(Pr,Wt),K[1]),T(M(y(kr,tt),-Q[1]),M(y(Rt,Te),G[1]))),Z[2]),M(T(M(y(Pr,Wt),Z[1]),T(M(y(Ut,De),-Q[1]),M(y(pt,_e),G[1]))),-K[2])),T(M(T(M(y(kr,tt),Z[1]),T(M(y(Ut,De),-K[1]),M(y(Ee,be),G[1]))),Q[2]),M(T(M(y(Rt,Te),Z[1]),T(M(y(pt,_e),-K[1]),M(y(Ee,be),Q[1]))),-G[2]))),$[3]))),T(T(M(T(T(M(T(M(y(Pr,Wt),K[1]),T(M(y(kr,tt),-Q[1]),M(y(Rt,Te),G[1]))),$[2]),M(T(M(y(Pr,Wt),$[1]),T(M(y(Jt,ke),-Q[1]),M(y(gt,we),G[1]))),-K[2])),T(M(T(M(y(kr,tt),$[1]),T(M(y(Jt,ke),-K[1]),M(y(se,fe),G[1]))),Q[2]),M(T(M(y(Rt,Te),$[1]),T(M(y(gt,we),-K[1]),M(y(se,fe),Q[1]))),-G[2]))),-Z[3]),M(T(T(M(T(M(y(Pr,Wt),Z[1]),T(M(y(Ut,De),-Q[1]),M(y(pt,_e),G[1]))),$[2]),M(T(M(y(Pr,Wt),$[1]),T(M(y(Jt,ke),-Q[1]),M(y(gt,we),G[1]))),-Z[2])),T(M(T(M(y(Ut,De),$[1]),T(M(y(Jt,ke),-Z[1]),M(y(oe,re),G[1]))),Q[2]),M(T(M(y(pt,_e),$[1]),T(M(y(gt,we),-Z[1]),M(y(oe,re),Q[1]))),-G[2]))),K[3])),T(M(T(T(M(T(M(y(kr,tt),Z[1]),T(M(y(Ut,De),-K[1]),M(y(Ee,be),G[1]))),$[2]),M(T(M(y(kr,tt),$[1]),T(M(y(Jt,ke),-K[1]),M(y(se,fe),G[1]))),-Z[2])),T(M(T(M(y(Ut,De),$[1]),T(M(y(Jt,ke),-Z[1]),M(y(oe,re),G[1]))),K[2]),M(T(M(y(Ee,be),$[1]),T(M(y(se,fe),-Z[1]),M(y(oe,re),K[1]))),-G[2]))),-Q[3]),M(T(T(M(T(M(y(Rt,Te),Z[1]),T(M(y(pt,_e),-K[1]),M(y(Ee,be),Q[1]))),$[2]),M(T(M(y(Rt,Te),$[1]),T(M(y(gt,we),-K[1]),M(y(se,fe),Q[1]))),-Z[2])),T(M(T(M(y(pt,_e),$[1]),T(M(y(gt,we),-Z[1]),M(y(oe,re),Q[1]))),K[2]),M(T(M(y(Ee,be),$[1]),T(M(y(se,fe),-Z[1]),M(y(oe,re),K[1]))),-Q[2]))),G[3]))))),kn=T(T(T(M(T(T(M(T(M(y($r,xt),Q[1]),T(M(y(Pr,Wt),-J[1]),M(y(Ue,$t),G[1]))),K[2]),M(T(M(y($r,xt),K[1]),T(M(y(kr,tt),-J[1]),M(y(rt,Be),G[1]))),-Q[2])),T(M(T(M(y(Pr,Wt),K[1]),T(M(y(kr,tt),-Q[1]),M(y(Rt,Te),G[1]))),J[2]),M(T(M(y(Ue,$t),K[1]),T(M(y(rt,Be),-Q[1]),M(y(Rt,Te),J[1]))),-G[2]))),$[3]),T(M(T(T(M(T(M(y($r,xt),Q[1]),T(M(y(Pr,Wt),-J[1]),M(y(Ue,$t),G[1]))),$[2]),M(T(M(y($r,xt),$[1]),T(M(y(Jt,ke),-J[1]),M(y(Ft,Oe),G[1]))),-Q[2])),T(M(T(M(y(Pr,Wt),$[1]),T(M(y(Jt,ke),-Q[1]),M(y(gt,we),G[1]))),J[2]),M(T(M(y(Ue,$t),$[1]),T(M(y(Ft,Oe),-Q[1]),M(y(gt,we),J[1]))),-G[2]))),-K[3]),M(T(T(M(T(M(y($r,xt),K[1]),T(M(y(kr,tt),-J[1]),M(y(rt,Be),G[1]))),$[2]),M(T(M(y($r,xt),$[1]),T(M(y(Jt,ke),-J[1]),M(y(Ft,Oe),G[1]))),-K[2])),T(M(T(M(y(kr,tt),$[1]),T(M(y(Jt,ke),-K[1]),M(y(se,fe),G[1]))),J[2]),M(T(M(y(rt,Be),$[1]),T(M(y(Ft,Oe),-K[1]),M(y(se,fe),J[1]))),-G[2]))),Q[3]))),T(T(M(T(T(M(T(M(y(Pr,Wt),K[1]),T(M(y(kr,tt),-Q[1]),M(y(Rt,Te),G[1]))),$[2]),M(T(M(y(Pr,Wt),$[1]),T(M(y(Jt,ke),-Q[1]),M(y(gt,we),G[1]))),-K[2])),T(M(T(M(y(kr,tt),$[1]),T(M(y(Jt,ke),-K[1]),M(y(se,fe),G[1]))),Q[2]),M(T(M(y(Rt,Te),$[1]),T(M(y(gt,we),-K[1]),M(y(se,fe),Q[1]))),-G[2]))),-J[3]),M(T(T(M(T(M(y(Ue,$t),K[1]),T(M(y(rt,Be),-Q[1]),M(y(Rt,Te),J[1]))),$[2]),M(T(M(y(Ue,$t),$[1]),T(M(y(Ft,Oe),-Q[1]),M(y(gt,we),J[1]))),-K[2])),T(M(T(M(y(rt,Be),$[1]),T(M(y(Ft,Oe),-K[1]),M(y(se,fe),J[1]))),Q[2]),M(T(M(y(Rt,Te),$[1]),T(M(y(gt,we),-K[1]),M(y(se,fe),Q[1]))),-J[2]))),G[3])),T(M(T(T(M(T(M(y($r,xt),K[1]),T(M(y(kr,tt),-J[1]),M(y(rt,Be),G[1]))),Z[2]),M(T(M(y($r,xt),Z[1]),T(M(y(Ut,De),-J[1]),M(y(st,he),G[1]))),-K[2])),T(M(T(M(y(kr,tt),Z[1]),T(M(y(Ut,De),-K[1]),M(y(Ee,be),G[1]))),J[2]),M(T(M(y(rt,Be),Z[1]),T(M(y(st,he),-K[1]),M(y(Ee,be),J[1]))),-G[2]))),$[3]),M(T(T(M(T(M(y($r,xt),K[1]),T(M(y(kr,tt),-J[1]),M(y(rt,Be),G[1]))),$[2]),M(T(M(y($r,xt),$[1]),T(M(y(Jt,ke),-J[1]),M(y(Ft,Oe),G[1]))),-K[2])),T(M(T(M(y(kr,tt),$[1]),T(M(y(Jt,ke),-K[1]),M(y(se,fe),G[1]))),J[2]),M(T(M(y(rt,Be),$[1]),T(M(y(Ft,Oe),-K[1]),M(y(se,fe),J[1]))),-G[2]))),-Z[3])))),T(T(T(M(T(T(M(T(M(y($r,xt),Z[1]),T(M(y(Ut,De),-J[1]),M(y(st,he),G[1]))),$[2]),M(T(M(y($r,xt),$[1]),T(M(y(Jt,ke),-J[1]),M(y(Ft,Oe),G[1]))),-Z[2])),T(M(T(M(y(Ut,De),$[1]),T(M(y(Jt,ke),-Z[1]),M(y(oe,re),G[1]))),J[2]),M(T(M(y(st,he),$[1]),T(M(y(Ft,Oe),-Z[1]),M(y(oe,re),J[1]))),-G[2]))),K[3]),M(T(T(M(T(M(y(kr,tt),Z[1]),T(M(y(Ut,De),-K[1]),M(y(Ee,be),G[1]))),$[2]),M(T(M(y(kr,tt),$[1]),T(M(y(Jt,ke),-K[1]),M(y(se,fe),G[1]))),-Z[2])),T(M(T(M(y(Ut,De),$[1]),T(M(y(Jt,ke),-Z[1]),M(y(oe,re),G[1]))),K[2]),M(T(M(y(Ee,be),$[1]),T(M(y(se,fe),-Z[1]),M(y(oe,re),K[1]))),-G[2]))),-J[3])),T(M(T(T(M(T(M(y(rt,Be),Z[1]),T(M(y(st,he),-K[1]),M(y(Ee,be),J[1]))),$[2]),M(T(M(y(rt,Be),$[1]),T(M(y(Ft,Oe),-K[1]),M(y(se,fe),J[1]))),-Z[2])),T(M(T(M(y(st,he),$[1]),T(M(y(Ft,Oe),-Z[1]),M(y(oe,re),J[1]))),K[2]),M(T(M(y(Ee,be),$[1]),T(M(y(se,fe),-Z[1]),M(y(oe,re),K[1]))),-J[2]))),G[3]),M(T(T(M(T(M(y(Ue,$t),K[1]),T(M(y(rt,Be),-Q[1]),M(y(Rt,Te),J[1]))),Z[2]),M(T(M(y(Ue,$t),Z[1]),T(M(y(st,he),-Q[1]),M(y(pt,_e),J[1]))),-K[2])),T(M(T(M(y(rt,Be),Z[1]),T(M(y(st,he),-K[1]),M(y(Ee,be),J[1]))),Q[2]),M(T(M(y(Rt,Te),Z[1]),T(M(y(pt,_e),-K[1]),M(y(Ee,be),Q[1]))),-J[2]))),$[3]))),T(T(M(T(T(M(T(M(y(Ue,$t),K[1]),T(M(y(rt,Be),-Q[1]),M(y(Rt,Te),J[1]))),$[2]),M(T(M(y(Ue,$t),$[1]),T(M(y(Ft,Oe),-Q[1]),M(y(gt,we),J[1]))),-K[2])),T(M(T(M(y(rt,Be),$[1]),T(M(y(Ft,Oe),-K[1]),M(y(se,fe),J[1]))),Q[2]),M(T(M(y(Rt,Te),$[1]),T(M(y(gt,we),-K[1]),M(y(se,fe),Q[1]))),-J[2]))),-Z[3]),M(T(T(M(T(M(y(Ue,$t),Z[1]),T(M(y(st,he),-Q[1]),M(y(pt,_e),J[1]))),$[2]),M(T(M(y(Ue,$t),$[1]),T(M(y(Ft,Oe),-Q[1]),M(y(gt,we),J[1]))),-Z[2])),T(M(T(M(y(st,he),$[1]),T(M(y(Ft,Oe),-Z[1]),M(y(oe,re),J[1]))),Q[2]),M(T(M(y(pt,_e),$[1]),T(M(y(gt,we),-Z[1]),M(y(oe,re),Q[1]))),-J[2]))),K[3])),T(M(T(T(M(T(M(y(rt,Be),Z[1]),T(M(y(st,he),-K[1]),M(y(Ee,be),J[1]))),$[2]),M(T(M(y(rt,Be),$[1]),T(M(y(Ft,Oe),-K[1]),M(y(se,fe),J[1]))),-Z[2])),T(M(T(M(y(st,he),$[1]),T(M(y(Ft,Oe),-Z[1]),M(y(oe,re),J[1]))),K[2]),M(T(M(y(Ee,be),$[1]),T(M(y(se,fe),-Z[1]),M(y(oe,re),K[1]))),-J[2]))),-Q[3]),M(T(T(M(T(M(y(Rt,Te),Z[1]),T(M(y(pt,_e),-K[1]),M(y(Ee,be),Q[1]))),$[2]),M(T(M(y(Rt,Te),$[1]),T(M(y(gt,we),-K[1]),M(y(se,fe),Q[1]))),-Z[2])),T(M(T(M(y(pt,_e),$[1]),T(M(y(gt,we),-Z[1]),M(y(oe,re),Q[1]))),K[2]),M(T(M(y(Ee,be),$[1]),T(M(y(se,fe),-Z[1]),M(y(oe,re),K[1]))),-Q[2]))),J[3]))))),Rn=y(rn,kn);return Rn[Rn.length-1]}return W}var N=[x,A,E];function F(T){var y=N[T.length];return y||(y=N[T.length]=_(T.length)),y.apply(void 0,T)}function k(T,y,S,M,W,$,Z,K){function Q(J,G,ee,re,fe,we){switch(arguments.length){case 0:case 1:return 0;case 2:return M(J,G);case 3:return W(J,G,ee);case 4:return $(J,G,ee,re);case 5:return Z(J,G,ee,re,fe);case 6:return K(J,G,ee,re,fe,we)}for(var Oe=new Array(arguments.length),ke=0;ke<arguments.length;++ke)Oe[ke]=arguments[ke];return T(Oe)}return Q}function P(){for(;N.length<=m;)N.push(_(N.length));l.exports=k.apply(void 0,[F].concat(N));for(var T=0;T<=m;++T)l.exports[T]=N[T]}P()}),727:(function(l,u,c){var p=c(2962),f=6;function v(N){var F=N===2?_:N===3?x:N===4?A:N===5?E:D;return N<6?F(p[N]):F(p)}function h(){return[[0]]}function m(N,F){return[[F[0]],[N[0][0]]]}function _(N){return function(k,P){return[N([[+P[0],+k[0][1]],[+P[1],+k[1][1]]]),N([[+k[0][0],+P[0]],[+k[1][0],+P[1]]]),N(k)]}}function x(N){return function(k,P){return[N([[+P[0],+k[0][1],+k[0][2]],[+P[1],+k[1][1],+k[1][2]],[+P[2],+k[2][1],+k[2][2]]]),N([[+k[0][0],+P[0],+k[0][2]],[+k[1][0],+P[1],+k[1][2]],[+k[2][0],+P[2],+k[2][2]]]),N([[+k[0][0],+k[0][1],+P[0]],[+k[1][0],+k[1][1],+P[1]],[+k[2][0],+k[2][1],+P[2]]]),N(k)]}}function A(N){return function(k,P){return[N([[+P[0],+k[0][1],+k[0][2],+k[0][3]],[+P[1],+k[1][1],+k[1][2],+k[1][3]],[+P[2],+k[2][1],+k[2][2],+k[2][3]],[+P[3],+k[3][1],+k[3][2],+k[3][3]]]),N([[+k[0][0],+P[0],+k[0][2],+k[0][3]],[+k[1][0],+P[1],+k[1][2],+k[1][3]],[+k[2][0],+P[2],+k[2][2],+k[2][3]],[+k[3][0],+P[3],+k[3][2],+k[3][3]]]),N([[+k[0][0],+k[0][1],+P[0],+k[0][3]],[+k[1][0],+k[1][1],+P[1],+k[1][3]],[+k[2][0],+k[2][1],+P[2],+k[2][3]],[+k[3][0],+k[3][1],+P[3],+k[3][3]]]),N([[+k[0][0],+k[0][1],+k[0][2],+P[0]],[+k[1][0],+k[1][1],+k[1][2],+P[1]],[+k[2][0],+k[2][1],+k[2][2],+P[2]],[+k[3][0],+k[3][1],+k[3][2],+P[3]]]),N(k)]}}function E(N){return function(k,P){return[N([[+P[0],+k[0][1],+k[0][2],+k[0][3],+k[0][4]],[+P[1],+k[1][1],+k[1][2],+k[1][3],+k[1][4]],[+P[2],+k[2][1],+k[2][2],+k[2][3],+k[2][4]],[+P[3],+k[3][1],+k[3][2],+k[3][3],+k[3][4]],[+P[4],+k[4][1],+k[4][2],+k[4][3],+k[4][4]]]),N([[+k[0][0],+P[0],+k[0][2],+k[0][3],+k[0][4]],[+k[1][0],+P[1],+k[1][2],+k[1][3],+k[1][4]],[+k[2][0],+P[2],+k[2][2],+k[2][3],+k[2][4]],[+k[3][0],+P[3],+k[3][2],+k[3][3],+k[3][4]],[+k[4][0],+P[4],+k[4][2],+k[4][3],+k[4][4]]]),N([[+k[0][0],+k[0][1],+P[0],+k[0][3],+k[0][4]],[+k[1][0],+k[1][1],+P[1],+k[1][3],+k[1][4]],[+k[2][0],+k[2][1],+P[2],+k[2][3],+k[2][4]],[+k[3][0],+k[3][1],+P[3],+k[3][3],+k[3][4]],[+k[4][0],+k[4][1],+P[4],+k[4][3],+k[4][4]]]),N([[+k[0][0],+k[0][1],+k[0][2],+P[0],+k[0][4]],[+k[1][0],+k[1][1],+k[1][2],+P[1],+k[1][4]],[+k[2][0],+k[2][1],+k[2][2],+P[2],+k[2][4]],[+k[3][0],+k[3][1],+k[3][2],+P[3],+k[3][4]],[+k[4][0],+k[4][1],+k[4][2],+P[4],+k[4][4]]]),N([[+k[0][0],+k[0][1],+k[0][2],+k[0][3],+P[0]],[+k[1][0],+k[1][1],+k[1][2],+k[1][3],+P[1]],[+k[2][0],+k[2][1],+k[2][2],+k[2][3],+P[2]],[+k[3][0],+k[3][1],+k[3][2],+k[3][3],+P[3]],[+k[4][0],+k[4][1],+k[4][2],+k[4][3],+P[4]]]),N(k)]}}function D(N){return function(k,P){return[N([[+P[0],+k[0][1],+k[0][2],+k[0][3],+k[0][4],+k[0][5]],[+P[1],+k[1][1],+k[1][2],+k[1][3],+k[1][4],+k[1][5]],[+P[2],+k[2][1],+k[2][2],+k[2][3],+k[2][4],+k[2][5]],[+P[3],+k[3][1],+k[3][2],+k[3][3],+k[3][4],+k[3][5]],[+P[4],+k[4][1],+k[4][2],+k[4][3],+k[4][4],+k[4][5]],[+P[5],+k[5][1],+k[5][2],+k[5][3],+k[5][4],+k[5][5]]]),N([[+k[0][0],+P[0],+k[0][2],+k[0][3],+k[0][4],+k[0][5]],[+k[1][0],+P[1],+k[1][2],+k[1][3],+k[1][4],+k[1][5]],[+k[2][0],+P[2],+k[2][2],+k[2][3],+k[2][4],+k[2][5]],[+k[3][0],+P[3],+k[3][2],+k[3][3],+k[3][4],+k[3][5]],[+k[4][0],+P[4],+k[4][2],+k[4][3],+k[4][4],+k[4][5]],[+k[5][0],+P[5],+k[5][2],+k[5][3],+k[5][4],+k[5][5]]]),N([[+k[0][0],+k[0][1],+P[0],+k[0][3],+k[0][4],+k[0][5]],[+k[1][0],+k[1][1],+P[1],+k[1][3],+k[1][4],+k[1][5]],[+k[2][0],+k[2][1],+P[2],+k[2][3],+k[2][4],+k[2][5]],[+k[3][0],+k[3][1],+P[3],+k[3][3],+k[3][4],+k[3][5]],[+k[4][0],+k[4][1],+P[4],+k[4][3],+k[4][4],+k[4][5]],[+k[5][0],+k[5][1],+P[5],+k[5][3],+k[5][4],+k[5][5]]]),N([[+k[0][0],+k[0][1],+k[0][2],+P[0],+k[0][4],+k[0][5]],[+k[1][0],+k[1][1],+k[1][2],+P[1],+k[1][4],+k[1][5]],[+k[2][0],+k[2][1],+k[2][2],+P[2],+k[2][4],+k[2][5]],[+k[3][0],+k[3][1],+k[3][2],+P[3],+k[3][4],+k[3][5]],[+k[4][0],+k[4][1],+k[4][2],+P[4],+k[4][4],+k[4][5]],[+k[5][0],+k[5][1],+k[5][2],+P[5],+k[5][4],+k[5][5]]]),N([[+k[0][0],+k[0][1],+k[0][2],+k[0][3],+P[0],+k[0][5]],[+k[1][0],+k[1][1],+k[1][2],+k[1][3],+P[1],+k[1][5]],[+k[2][0],+k[2][1],+k[2][2],+k[2][3],+P[2],+k[2][5]],[+k[3][0],+k[3][1],+k[3][2],+k[3][3],+P[3],+k[3][5]],[+k[4][0],+k[4][1],+k[4][2],+k[4][3],+P[4],+k[4][5]],[+k[5][0],+k[5][1],+k[5][2],+k[5][3],+P[5],+k[5][5]]]),N([[+k[0][0],+k[0][1],+k[0][2],+k[0][3],+k[0][4],+P[0]],[+k[1][0],+k[1][1],+k[1][2],+k[1][3],+k[1][4],+P[1]],[+k[2][0],+k[2][1],+k[2][2],+k[2][3],+k[2][4],+P[2]],[+k[3][0],+k[3][1],+k[3][2],+k[3][3],+k[3][4],+P[3]],[+k[4][0],+k[4][1],+k[4][2],+k[4][3],+k[4][4],+P[4]],[+k[5][0],+k[5][1],+k[5][2],+k[5][3],+k[5][4],+P[5]]]),N(k)]}}var g=[h,m];function C(N,F,k,P,T,y,S,M){return function($,Z){switch($.length){case 0:return N($,Z);case 1:return F($,Z);case 2:return k($,Z);case 3:return P($,Z);case 4:return T($,Z);case 5:return y($,Z)}var K=S[$.length];return K||(K=S[$.length]=M($.length)),K($,Z)}}function I(){for(;g.length<f;)g.push(v(g.length));l.exports=C.apply(void 0,g.concat([g,v]));for(var N=0;N<f;++N)l.exports[N]=g[N]}I()}),3250:(function(l,u,c){var p=c(5250),f=c(8210),v=c(3012),h=c(8545),m=5,_=11102230246251565e-32,x=(3+16*_)*_,A=(7+56*_)*_;function E(y,S,M,W){return function(Z,K,Q){var J=y(y(S(K[1],Q[0]),S(-Q[1],K[0])),y(S(Z[1],K[0]),S(-K[1],Z[0]))),G=y(S(Z[1],Q[0]),S(-Q[1],Z[0])),ee=W(J,G);return ee[ee.length-1]}}function D(y,S,M,W){return function(Z,K,Q,J){var G=y(y(M(y(S(Q[1],J[0]),S(-J[1],Q[0])),K[2]),y(M(y(S(K[1],J[0]),S(-J[1],K[0])),-Q[2]),M(y(S(K[1],Q[0]),S(-Q[1],K[0])),J[2]))),y(M(y(S(K[1],J[0]),S(-J[1],K[0])),Z[2]),y(M(y(S(Z[1],J[0]),S(-J[1],Z[0])),-K[2]),M(y(S(Z[1],K[0]),S(-K[1],Z[0])),J[2])))),ee=y(y(M(y(S(Q[1],J[0]),S(-J[1],Q[0])),Z[2]),y(M(y(S(Z[1],J[0]),S(-J[1],Z[0])),-Q[2]),M(y(S(Z[1],Q[0]),S(-Q[1],Z[0])),J[2]))),y(M(y(S(K[1],Q[0]),S(-Q[1],K[0])),Z[2]),y(M(y(S(Z[1],Q[0]),S(-Q[1],Z[0])),-K[2]),M(y(S(Z[1],K[0]),S(-K[1],Z[0])),Q[2])))),re=W(G,ee);return re[re.length-1]}}function g(y,S,M,W){return function(Z,K,Q,J,G){var ee=y(y(y(M(y(M(y(S(J[1],G[0]),S(-G[1],J[0])),Q[2]),y(M(y(S(Q[1],G[0]),S(-G[1],Q[0])),-J[2]),M(y(S(Q[1],J[0]),S(-J[1],Q[0])),G[2]))),K[3]),y(M(y(M(y(S(J[1],G[0]),S(-G[1],J[0])),K[2]),y(M(y(S(K[1],G[0]),S(-G[1],K[0])),-J[2]),M(y(S(K[1],J[0]),S(-J[1],K[0])),G[2]))),-Q[3]),M(y(M(y(S(Q[1],G[0]),S(-G[1],Q[0])),K[2]),y(M(y(S(K[1],G[0]),S(-G[1],K[0])),-Q[2]),M(y(S(K[1],Q[0]),S(-Q[1],K[0])),G[2]))),J[3]))),y(M(y(M(y(S(Q[1],J[0]),S(-J[1],Q[0])),K[2]),y(M(y(S(K[1],J[0]),S(-J[1],K[0])),-Q[2]),M(y(S(K[1],Q[0]),S(-Q[1],K[0])),J[2]))),-G[3]),y(M(y(M(y(S(J[1],G[0]),S(-G[1],J[0])),K[2]),y(M(y(S(K[1],G[0]),S(-G[1],K[0])),-J[2]),M(y(S(K[1],J[0]),S(-J[1],K[0])),G[2]))),Z[3]),M(y(M(y(S(J[1],G[0]),S(-G[1],J[0])),Z[2]),y(M(y(S(Z[1],G[0]),S(-G[1],Z[0])),-J[2]),M(y(S(Z[1],J[0]),S(-J[1],Z[0])),G[2]))),-K[3])))),y(y(M(y(M(y(S(K[1],G[0]),S(-G[1],K[0])),Z[2]),y(M(y(S(Z[1],G[0]),S(-G[1],Z[0])),-K[2]),M(y(S(Z[1],K[0]),S(-K[1],Z[0])),G[2]))),J[3]),y(M(y(M(y(S(K[1],J[0]),S(-J[1],K[0])),Z[2]),y(M(y(S(Z[1],J[0]),S(-J[1],Z[0])),-K[2]),M(y(S(Z[1],K[0]),S(-K[1],Z[0])),J[2]))),-G[3]),M(y(M(y(S(Q[1],J[0]),S(-J[1],Q[0])),K[2]),y(M(y(S(K[1],J[0]),S(-J[1],K[0])),-Q[2]),M(y(S(K[1],Q[0]),S(-Q[1],K[0])),J[2]))),Z[3]))),y(M(y(M(y(S(Q[1],J[0]),S(-J[1],Q[0])),Z[2]),y(M(y(S(Z[1],J[0]),S(-J[1],Z[0])),-Q[2]),M(y(S(Z[1],Q[0]),S(-Q[1],Z[0])),J[2]))),-K[3]),y(M(y(M(y(S(K[1],J[0]),S(-J[1],K[0])),Z[2]),y(M(y(S(Z[1],J[0]),S(-J[1],Z[0])),-K[2]),M(y(S(Z[1],K[0]),S(-K[1],Z[0])),J[2]))),Q[3]),M(y(M(y(S(K[1],Q[0]),S(-Q[1],K[0])),Z[2]),y(M(y(S(Z[1],Q[0]),S(-Q[1],Z[0])),-K[2]),M(y(S(Z[1],K[0]),S(-K[1],Z[0])),Q[2]))),-J[3]))))),re=y(y(y(M(y(M(y(S(J[1],G[0]),S(-G[1],J[0])),Q[2]),y(M(y(S(Q[1],G[0]),S(-G[1],Q[0])),-J[2]),M(y(S(Q[1],J[0]),S(-J[1],Q[0])),G[2]))),Z[3]),M(y(M(y(S(J[1],G[0]),S(-G[1],J[0])),Z[2]),y(M(y(S(Z[1],G[0]),S(-G[1],Z[0])),-J[2]),M(y(S(Z[1],J[0]),S(-J[1],Z[0])),G[2]))),-Q[3])),y(M(y(M(y(S(Q[1],G[0]),S(-G[1],Q[0])),Z[2]),y(M(y(S(Z[1],G[0]),S(-G[1],Z[0])),-Q[2]),M(y(S(Z[1],Q[0]),S(-Q[1],Z[0])),G[2]))),J[3]),M(y(M(y(S(Q[1],J[0]),S(-J[1],Q[0])),Z[2]),y(M(y(S(Z[1],J[0]),S(-J[1],Z[0])),-Q[2]),M(y(S(Z[1],Q[0]),S(-Q[1],Z[0])),J[2]))),-G[3]))),y(y(M(y(M(y(S(Q[1],G[0]),S(-G[1],Q[0])),K[2]),y(M(y(S(K[1],G[0]),S(-G[1],K[0])),-Q[2]),M(y(S(K[1],Q[0]),S(-Q[1],K[0])),G[2]))),Z[3]),M(y(M(y(S(Q[1],G[0]),S(-G[1],Q[0])),Z[2]),y(M(y(S(Z[1],G[0]),S(-G[1],Z[0])),-Q[2]),M(y(S(Z[1],Q[0]),S(-Q[1],Z[0])),G[2]))),-K[3])),y(M(y(M(y(S(K[1],G[0]),S(-G[1],K[0])),Z[2]),y(M(y(S(Z[1],G[0]),S(-G[1],Z[0])),-K[2]),M(y(S(Z[1],K[0]),S(-K[1],Z[0])),G[2]))),Q[3]),M(y(M(y(S(K[1],Q[0]),S(-Q[1],K[0])),Z[2]),y(M(y(S(Z[1],Q[0]),S(-Q[1],Z[0])),-K[2]),M(y(S(Z[1],K[0]),S(-K[1],Z[0])),Q[2]))),-G[3])))),fe=W(ee,re);return fe[fe.length-1]}}function C(y){var S=y===3?E:y===4?D:g;return S(f,p,v,h)}var I=C(3),N=C(4),F=[function(){return 0},function(){return 0},function(S,M){return M[0]-S[0]},function(S,M,W){var $=(S[1]-W[1])*(M[0]-W[0]),Z=(S[0]-W[0])*(M[1]-W[1]),K=$-Z,Q;if($>0){if(Z<=0)return K;Q=$+Z}else if($<0){if(Z>=0)return K;Q=-($+Z)}else return K;var J=x*Q;return K>=J||K<=-J?K:I(S,M,W)},function(S,M,W,$){var Z=S[0]-$[0],K=M[0]-$[0],Q=W[0]-$[0],J=S[1]-$[1],G=M[1]-$[1],ee=W[1]-$[1],re=S[2]-$[2],fe=M[2]-$[2],we=W[2]-$[2],Oe=K*ee,ke=Q*G,Le=Q*J,oe=Z*ee,be=Z*G,_e=K*J,he=re*(Oe-ke)+fe*(Le-oe)+we*(be-_e),De=(Math.abs(Oe)+Math.abs(ke))*Math.abs(re)+(Math.abs(Le)+Math.abs(oe))*Math.abs(fe)+(Math.abs(be)+Math.abs(_e))*Math.abs(we),xe=A*De;return he>xe||-he>xe?he:N(S,M,W,$)}];function k(y){var S=F[y.length];return S||(S=F[y.length]=C(y.length)),S.apply(void 0,y)}function P(y,S,M,W,$,Z,K){return function(J,G,ee,re,fe){switch(arguments.length){case 0:case 1:return 0;case 2:return W(J,G);case 3:return $(J,G,ee);case 4:return Z(J,G,ee,re);case 5:return K(J,G,ee,re,fe)}for(var we=new Array(arguments.length),Oe=0;Oe<arguments.length;++Oe)we[Oe]=arguments[Oe];return y(we)}}function T(){for(;F.length<=m;)F.push(C(F.length));l.exports=P.apply(void 0,[k].concat(F));for(var y=0;y<=m;++y)l.exports[y]=F[y]}T()}),5382:(function(l,u,c){var p=c(8210),f=c(3012);l.exports=v;function v(h,m){if(h.length===1)return f(m,h[0]);if(m.length===1)return f(h,m[0]);if(h.length===0||m.length===0)return[0];var _=[0];if(h.length<m.length)for(var x=0;x<h.length;++x)_=p(_,f(m,h[x]));else for(var x=0;x<m.length;++x)_=p(_,f(h,m[x]));return _}}),3012:(function(l,u,c){var p=c(5250),f=c(9362);l.exports=v;function v(h,m){var _=h.length;if(_===1){var x=p(h[0],m);return x[0]?x:[x[1]]}var A=new Array(2*_),E=[.1,.1],D=[.1,.1],g=0;p(h[0],m,E),E[0]&&(A[g++]=E[0]);for(var C=1;C<_;++C){p(h[C],m,D);var I=E[1];f(I,D[0],E),E[0]&&(A[g++]=E[0]);var N=D[1],F=E[1],k=N+F,P=k-N,T=F-P;E[1]=k,T&&(A[g++]=T)}return E[1]&&(A[g++]=E[1]),g===0&&(A[g++]=0),A.length=g,A}}),1125:(function(l,u,c){l.exports=v;var p=c(3250)[3];function f(h,m,_,x){for(var A=0;A<2;++A){var E=h[A],D=m[A],g=Math.min(E,D),C=Math.max(E,D),I=_[A],N=x[A],F=Math.min(I,N),k=Math.max(I,N);if(k<g||C<F)return!1}return!0}function v(h,m,_,x){var A=p(h,_,x),E=p(m,_,x);if(A>0&&E>0||A<0&&E<0)return!1;var D=p(_,h,m),g=p(x,h,m);return D>0&&g>0||D<0&&g<0?!1:A===0&&E===0&&D===0&&g===0?f(h,m,_,x):!0}}),8545:(function(l){l.exports=c;function u(p,f){var v=p+f,h=v-p,m=v-h,_=f-h,x=p-m,A=x+_;return A?[A,v]:[v]}function c(p,f){var v=p.length|0,h=f.length|0;if(v===1&&h===1)return u(p[0],-f[0]);var m=v+h,_=new Array(m),x=0,A=0,E=0,D=Math.abs,g=p[A],C=D(g),I=-f[E],N=D(I),F,k;C<N?(k=g,A+=1,A<v&&(g=p[A],C=D(g))):(k=I,E+=1,E<h&&(I=-f[E],N=D(I))),A<v&&C<N||E>=h?(F=g,A+=1,A<v&&(g=p[A],C=D(g))):(F=I,E+=1,E<h&&(I=-f[E],N=D(I)));for(var P=F+k,T=P-F,y=k-T,S=y,M=P,W,$,Z,K,Q;A<v&&E<h;)C<N?(F=g,A+=1,A<v&&(g=p[A],C=D(g))):(F=I,E+=1,E<h&&(I=-f[E],N=D(I))),k=S,P=F+k,T=P-F,y=k-T,y&&(_[x++]=y),W=M+P,$=W-M,Z=W-$,K=P-$,Q=M-Z,S=Q+K,M=W;for(;A<v;)F=g,k=S,P=F+k,T=P-F,y=k-T,y&&(_[x++]=y),W=M+P,$=W-M,Z=W-$,K=P-$,Q=M-Z,S=Q+K,M=W,A+=1,A<v&&(g=p[A]);for(;E<h;)F=I,k=S,P=F+k,T=P-F,y=k-T,y&&(_[x++]=y),W=M+P,$=W-M,Z=W-$,K=P-$,Q=M-Z,S=Q+K,M=W,E+=1,E<h&&(I=-f[E]);return S&&(_[x++]=S),M&&(_[x++]=M),x||(_[x++]=0),_.length=x,_}}),8210:(function(l){l.exports=c;function u(p,f){var v=p+f,h=v-p,m=v-h,_=f-h,x=p-m,A=x+_;return A?[A,v]:[v]}function c(p,f){var v=p.length|0,h=f.length|0;if(v===1&&h===1)return u(p[0],f[0]);var m=v+h,_=new Array(m),x=0,A=0,E=0,D=Math.abs,g=p[A],C=D(g),I=f[E],N=D(I),F,k;C<N?(k=g,A+=1,A<v&&(g=p[A],C=D(g))):(k=I,E+=1,E<h&&(I=f[E],N=D(I))),A<v&&C<N||E>=h?(F=g,A+=1,A<v&&(g=p[A],C=D(g))):(F=I,E+=1,E<h&&(I=f[E],N=D(I)));for(var P=F+k,T=P-F,y=k-T,S=y,M=P,W,$,Z,K,Q;A<v&&E<h;)C<N?(F=g,A+=1,A<v&&(g=p[A],C=D(g))):(F=I,E+=1,E<h&&(I=f[E],N=D(I))),k=S,P=F+k,T=P-F,y=k-T,y&&(_[x++]=y),W=M+P,$=W-M,Z=W-$,K=P-$,Q=M-Z,S=Q+K,M=W;for(;A<v;)F=g,k=S,P=F+k,T=P-F,y=k-T,y&&(_[x++]=y),W=M+P,$=W-M,Z=W-$,K=P-$,Q=M-Z,S=Q+K,M=W,A+=1,A<v&&(g=p[A]);for(;E<h;)F=I,k=S,P=F+k,T=P-F,y=k-T,y&&(_[x++]=y),W=M+P,$=W-M,Z=W-$,K=P-$,Q=M-Z,S=Q+K,M=W,E+=1,E<h&&(I=f[E]);return S&&(_[x++]=S),M&&(_[x++]=M),x||(_[x++]=0),_.length=x,_}}),9127:(function(l,u,c){l.exports=v;var p=c(6204),f=c(5771);function v(h){return f(p(h))}}),7765:(function(l,u,c){l.exports=g;var p=c(9618),f=c(1888),v=c(446),h=c(1570);function m(C){for(var I=C.length,N=0,F=0;F<I;++F)N=Math.max(N,C[F].length)|0;return N-1}function _(C,I){for(var N=C.length,F=f.mallocUint8(N),k=0;k<N;++k)F[k]=C[k]<I|0;return F}function x(C,I){for(var N=C.length,F=I*(I+1)/2*N|0,k=f.mallocUint32(F*2),P=0,T=0;T<N;++T)for(var y=C[T],I=y.length,S=0;S<I;++S)for(var M=0;M<S;++M){var W=y[M],$=y[S];k[P++]=Math.min(W,$)|0,k[P++]=Math.max(W,$)|0}var Z=P/2|0;v(p(k,[Z,2]));for(var K=2,T=2;T<P;T+=2)k[T-2]===k[T]&&k[T-1]===k[T+1]||(k[K++]=k[T],k[K++]=k[T+1]);return p(k,[K/2|0,2])}function A(C,I,N,F){for(var k=C.data,P=C.shape[0],T=f.mallocDouble(P),y=0,S=0;S<P;++S){var M=k[2*S],W=k[2*S+1];if(N[M]!==N[W]){var $=I[M],Z=I[W];k[2*y]=M,k[2*y+1]=W,T[y++]=(Z-F)/(Z-$)}}return C.shape[0]=y,p(T,[y])}function E(C,I){var N=f.mallocInt32(I*2),F=C.shape[0],k=C.data;N[0]=0;for(var P=0,T=0;T<F;++T){var y=k[2*T];if(y!==P){for(N[2*P+1]=T;++P<y;)N[2*P]=T,N[2*P+1]=T;N[2*P]=T}}for(N[2*P+1]=F;++P<I;)N[2*P]=N[2*P+1]=F;return N}function D(C){for(var I=C.shape[0]|0,N=C.data,F=new Array(I),k=0;k<I;++k)F[k]=[N[2*k],N[2*k+1]];return F}function g(C,I,N,F){N=N||0,typeof F>"u"&&(F=m(C));var k=C.length;if(k===0||F<1)return{cells:[],vertexIds:[],vertexWeights:[]};var P=_(I,+N),T=x(C,F),y=A(T,I,P,+N),S=E(T,I.length|0),M=h(F)(C,T.data,S,P),W=D(T),$=[].slice.call(y.data,0,y.shape[0]);return f.free(P),f.free(T.data),f.free(y.data),f.free(S),{cells:M,vertexIds:W,vertexWeights:$}}}),1570:(function(l){l.exports=c;var u=[function(){function f(v,h,m,_){for(var x=v.length,A=[],E=0;E<x;++E){var D=v[E];D.length}return A}return f},function(){function f(h,m,_,x){for(var A=Math.min(_,x)|0,E=Math.max(_,x)|0,D=h[2*A],g=h[2*A+1];D<g;){var C=D+g>>1,I=m[2*C+1];if(I===E)return C;E<I?g=C:D=C+1}return D}function v(h,m,_,x){for(var A=h.length,E=[],D=0;D<A;++D){var g=h[D],C=g.length;if(C===2){var I=(x[g[0]]<<0)+(x[g[1]]<<1);if(I===0||I===3)continue;switch(I){case 0:break;case 1:E.push([f(_,m,g[0],g[1])]);break;case 2:E.push([f(_,m,g[1],g[0])]);break}}}return E}return v},function(){function f(h,m,_,x){for(var A=Math.min(_,x)|0,E=Math.max(_,x)|0,D=h[2*A],g=h[2*A+1];D<g;){var C=D+g>>1,I=m[2*C+1];if(I===E)return C;E<I?g=C:D=C+1}return D}function v(h,m,_,x){for(var A=h.length,E=[],D=0;D<A;++D){var g=h[D],C=g.length;if(C===3){var I=(x[g[0]]<<0)+(x[g[1]]<<1)+(x[g[2]]<<2);if(I===0||I===7)continue;switch(I){case 0:break;case 1:E.push([f(_,m,g[0],g[2]),f(_,m,g[0],g[1])]);break;case 2:E.push([f(_,m,g[1],g[0]),f(_,m,g[1],g[2])]);break;case 3:E.push([f(_,m,g[0],g[2]),f(_,m,g[1],g[2])]);break;case 4:E.push([f(_,m,g[2],g[1]),f(_,m,g[2],g[0])]);break;case 5:E.push([f(_,m,g[2],g[1]),f(_,m,g[0],g[1])]);break;case 6:E.push([f(_,m,g[1],g[0]),f(_,m,g[2],g[0])]);break}}else if(C===2){var I=(x[g[0]]<<0)+(x[g[1]]<<1);if(I===0||I===3)continue;switch(I){case 0:break;case 1:E.push([f(_,m,g[0],g[1])]);break;case 2:E.push([f(_,m,g[1],g[0])]);break}}}return E}return v},function(){function f(h,m,_,x){for(var A=Math.min(_,x)|0,E=Math.max(_,x)|0,D=h[2*A],g=h[2*A+1];D<g;){var C=D+g>>1,I=m[2*C+1];if(I===E)return C;E<I?g=C:D=C+1}return D}function v(h,m,_,x){for(var A=h.length,E=[],D=0;D<A;++D){var g=h[D],C=g.length;if(C===4){var I=(x[g[0]]<<0)+(x[g[1]]<<1)+(x[g[2]]<<2)+(x[g[3]]<<3);if(I===0||I===15)continue;switch(I){case 0:break;case 1:E.push([f(_,m,g[0],g[1]),f(_,m,g[0],g[2]),f(_,m,g[0],g[3])]);break;case 2:E.push([f(_,m,g[1],g[2]),f(_,m,g[1],g[0]),f(_,m,g[1],g[3])]);break;case 3:E.push([f(_,m,g[1],g[2]),f(_,m,g[0],g[2]),f(_,m,g[0],g[3])],[f(_,m,g[1],g[3]),f(_,m,g[1],g[2]),f(_,m,g[0],g[3])]);break;case 4:E.push([f(_,m,g[2],g[0]),f(_,m,g[2],g[1]),f(_,m,g[2],g[3])]);break;case 5:E.push([f(_,m,g[0],g[1]),f(_,m,g[2],g[1]),f(_,m,g[0],g[3])],[f(_,m,g[2],g[1]),f(_,m,g[2],g[3]),f(_,m,g[0],g[3])]);break;case 6:E.push([f(_,m,g[2],g[0]),f(_,m,g[1],g[0]),f(_,m,g[1],g[3])],[f(_,m,g[2],g[3]),f(_,m,g[2],g[0]),f(_,m,g[1],g[3])]);break;case 7:E.push([f(_,m,g[0],g[3]),f(_,m,g[1],g[3]),f(_,m,g[2],g[3])]);break;case 8:E.push([f(_,m,g[3],g[1]),f(_,m,g[3],g[0]),f(_,m,g[3],g[2])]);break;case 9:E.push([f(_,m,g[3],g[1]),f(_,m,g[0],g[1]),f(_,m,g[0],g[2])],[f(_,m,g[3],g[2]),f(_,m,g[3],g[1]),f(_,m,g[0],g[2])]);break;case 10:E.push([f(_,m,g[1],g[0]),f(_,m,g[3],g[0]),f(_,m,g[1],g[2])],[f(_,m,g[3],g[0]),f(_,m,g[3],g[2]),f(_,m,g[1],g[2])]);break;case 11:E.push([f(_,m,g[1],g[2]),f(_,m,g[0],g[2]),f(_,m,g[3],g[2])]);break;case 12:E.push([f(_,m,g[3],g[0]),f(_,m,g[2],g[0]),f(_,m,g[2],g[1])],[f(_,m,g[3],g[1]),f(_,m,g[3],g[0]),f(_,m,g[2],g[1])]);break;case 13:E.push([f(_,m,g[0],g[1]),f(_,m,g[2],g[1]),f(_,m,g[3],g[1])]);break;case 14:E.push([f(_,m,g[2],g[0]),f(_,m,g[1],g[0]),f(_,m,g[3],g[0])]);break}}else if(C===3){var I=(x[g[0]]<<0)+(x[g[1]]<<1)+(x[g[2]]<<2);if(I===0||I===7)continue;switch(I){case 0:break;case 1:E.push([f(_,m,g[0],g[2]),f(_,m,g[0],g[1])]);break;case 2:E.push([f(_,m,g[1],g[0]),f(_,m,g[1],g[2])]);break;case 3:E.push([f(_,m,g[0],g[2]),f(_,m,g[1],g[2])]);break;case 4:E.push([f(_,m,g[2],g[1]),f(_,m,g[2],g[0])]);break;case 5:E.push([f(_,m,g[2],g[1]),f(_,m,g[0],g[1])]);break;case 6:E.push([f(_,m,g[1],g[0]),f(_,m,g[2],g[0])]);break}}else if(C===2){var I=(x[g[0]]<<0)+(x[g[1]]<<1);if(I===0||I===3)continue;switch(I){case 0:break;case 1:E.push([f(_,m,g[0],g[1])]);break;case 2:E.push([f(_,m,g[1],g[0])]);break}}}return E}return v}];function c(p){return u[p]()}}),6803:(function(l,u,c){c(8828),c(1755);function p(f,v){var h=f.length,m=f.length-v.length,_=Math.min;if(m)return m;switch(h){case 0:return 0;case 1:return f[0]-v[0];case 2:var g=f[0]+f[1]-v[0]-v[1];return g||_(f[0],f[1])-_(v[0],v[1]);case 3:var x=f[0]+f[1],A=v[0]+v[1];if(g=x+f[2]-(A+v[2]),g)return g;var E=_(f[0],f[1]),D=_(v[0],v[1]),g=_(E,f[2])-_(D,v[2]);return g||_(E+f[2],x)-_(D+v[2],A);default:var C=f.slice(0);C.sort();var I=v.slice(0);I.sort();for(var N=0;N<h;++N)if(m=C[N]-I[N],m)return m;return 0}}u.Fw=p}),3105:(function(l,u){"use restrict";var c=32;u.INT_BITS=c,u.INT_MAX=2147483647,u.INT_MIN=-1<<c-1,u.sign=function(v){return(v>0)-(v<0)},u.abs=function(v){var h=v>>c-1;return(v^h)-h},u.min=function(v,h){return h^(v^h)&-(v<h)},u.max=function(v,h){return v^(v^h)&-(v<h)},u.isPow2=function(v){return!(v&v-1)&&!!v},u.log2=function(v){var h,m;return h=(v>65535)<<4,v>>>=h,m=(v>255)<<3,v>>>=m,h|=m,m=(v>15)<<2,v>>>=m,h|=m,m=(v>3)<<1,v>>>=m,h|=m,h|v>>1},u.log10=function(v){return v>=1e9?9:v>=1e8?8:v>=1e7?7:v>=1e6?6:v>=1e5?5:v>=1e4?4:v>=1e3?3:v>=100?2:v>=10?1:0},u.popCount=function(v){return v=v-(v>>>1&1431655765),v=(v&858993459)+(v>>>2&858993459),(v+(v>>>4)&252645135)*16843009>>>24};function p(v){var h=32;return v&=-v,v&&h--,v&65535&&(h-=16),v&16711935&&(h-=8),v&252645135&&(h-=4),v&858993459&&(h-=2),v&1431655765&&(h-=1),h}u.countTrailingZeros=p,u.nextPow2=function(v){return v+=v===0,--v,v|=v>>>1,v|=v>>>2,v|=v>>>4,v|=v>>>8,v|=v>>>16,v+1},u.prevPow2=function(v){return v|=v>>>1,v|=v>>>2,v|=v>>>4,v|=v>>>8,v|=v>>>16,v-(v>>>1)},u.parity=function(v){return v^=v>>>16,v^=v>>>8,v^=v>>>4,v&=15,27030>>>v&1};var f=new Array(256);(function(v){for(var h=0;h<256;++h){var m=h,_=h,x=7;for(m>>>=1;m;m>>>=1)_<<=1,_|=m&1,--x;v[h]=_<<x&255}})(f),u.reverse=function(v){return f[v&255]<<24|f[v>>>8&255]<<16|f[v>>>16&255]<<8|f[v>>>24&255]},u.interleave2=function(v,h){return v&=65535,v=(v|v<<8)&16711935,v=(v|v<<4)&252645135,v=(v|v<<2)&858993459,v=(v|v<<1)&1431655765,h&=65535,h=(h|h<<8)&16711935,h=(h|h<<4)&252645135,h=(h|h<<2)&858993459,h=(h|h<<1)&1431655765,v|h<<1},u.deinterleave2=function(v,h){return v=v>>>h&1431655765,v=(v|v>>>1)&858993459,v=(v|v>>>2)&252645135,v=(v|v>>>4)&16711935,v=(v|v>>>16)&65535,v<<16>>16},u.interleave3=function(v,h,m){return v&=1023,v=(v|v<<16)&4278190335,v=(v|v<<8)&251719695,v=(v|v<<4)&3272356035,v=(v|v<<2)&1227133513,h&=1023,h=(h|h<<16)&4278190335,h=(h|h<<8)&251719695,h=(h|h<<4)&3272356035,h=(h|h<<2)&1227133513,v|=h<<1,m&=1023,m=(m|m<<16)&4278190335,m=(m|m<<8)&251719695,m=(m|m<<4)&3272356035,m=(m|m<<2)&1227133513,v|m<<2},u.deinterleave3=function(v,h){return v=v>>>h&1227133513,v=(v|v>>>2)&3272356035,v=(v|v>>>4)&251719695,v=(v|v>>>8)&4278190335,v=(v|v>>>16)&1023,v<<22>>22},u.nextCombination=function(v){var h=v|v-1;return h+1|(~h&-~h)-1>>>p(v)+1}}),2014:(function(l,u,c){"use restrict";var p=c(3105),f=c(4623);function v(y){for(var S=0,M=Math.max,W=0,$=y.length;W<$;++W)S=M(S,y[W].length);return S-1}u.dimension=v;function h(y){for(var S=-1,M=Math.max,W=0,$=y.length;W<$;++W)for(var Z=y[W],K=0,Q=Z.length;K<Q;++K)S=M(S,Z[K]);return S+1}u.countVertices=h;function m(y){for(var S=new Array(y.length),M=0,W=y.length;M<W;++M)S[M]=y[M].slice(0);return S}u.cloneCells=m;function _(y,S){var M=y.length,W=y.length-S.length,$=Math.min;if(W)return W;switch(M){case 0:return 0;case 1:return y[0]-S[0];case 2:var G=y[0]+y[1]-S[0]-S[1];return G||$(y[0],y[1])-$(S[0],S[1]);case 3:var Z=y[0]+y[1],K=S[0]+S[1];if(G=Z+y[2]-(K+S[2]),G)return G;var Q=$(y[0],y[1]),J=$(S[0],S[1]),G=$(Q,y[2])-$(J,S[2]);return G||$(Q+y[2],Z)-$(J+S[2],K);default:var ee=y.slice(0);ee.sort();var re=S.slice(0);re.sort();for(var fe=0;fe<M;++fe)if(W=ee[fe]-re[fe],W)return W;return 0}}u.compareCells=_;function x(y,S){return _(y[0],S[0])}function A(y,S){if(S){for(var M=y.length,W=new Array(M),$=0;$<M;++$)W[$]=[y[$],S[$]];W.sort(x);for(var $=0;$<M;++$)y[$]=W[$][0],S[$]=W[$][1];return y}else return y.sort(_),y}u.normalize=A;function E(y){if(y.length===0)return[];for(var S=1,M=y.length,W=1;W<M;++W){var $=y[W];if(_($,y[W-1])){if(W===S){S++;continue}y[S++]=$}}return y.length=S,y}u.unique=E;function D(y,S){for(var M=0,W=y.length-1,$=-1;M<=W;){var Z=M+W>>1,K=_(y[Z],S);K<=0?(K===0&&($=Z),M=Z+1):K>0&&(W=Z-1)}return $}u.findCell=D;function g(y,S){for(var M=new Array(y.length),W=0,$=M.length;W<$;++W)M[W]=[];for(var Z=[],W=0,K=S.length;W<K;++W)for(var Q=S[W],J=Q.length,G=1,ee=1<<J;G<ee;++G){Z.length=p.popCount(G);for(var re=0,fe=0;fe<J;++fe)G&1<<fe&&(Z[re++]=Q[fe]);var we=D(y,Z);if(!(we<0))for(;M[we++].push(W),!(we>=y.length||_(y[we],Z)!==0););}return M}u.incidence=g;function C(y,S){if(!S)return g(E(N(y,0)),y);for(var M=new Array(S),W=0;W<S;++W)M[W]=[];for(var W=0,$=y.length;W<$;++W)for(var Z=y[W],K=0,Q=Z.length;K<Q;++K)M[Z[K]].push(W);return M}u.dual=C;function I(y){for(var S=[],M=0,W=y.length;M<W;++M)for(var $=y[M],Z=$.length|0,K=1,Q=1<<Z;K<Q;++K){for(var J=[],G=0;G<Z;++G)K>>>G&1&&J.push($[G]);S.push(J)}return A(S)}u.explode=I;function N(y,S){if(S<0)return[];for(var M=[],W=(1<<S+1)-1,$=0;$<y.length;++$)for(var Z=y[$],K=W;K<1<<Z.length;K=p.nextCombination(K)){for(var Q=new Array(S+1),J=0,G=0;G<Z.length;++G)K&1<<G&&(Q[J++]=Z[G]);M.push(Q)}return A(M)}u.skeleton=N;function F(y){for(var S=[],M=0,W=y.length;M<W;++M)for(var $=y[M],Z=0,K=$.length;Z<K;++Z){for(var Q=new Array($.length-1),J=0,G=0;J<K;++J)J!==Z&&(Q[G++]=$[J]);S.push(Q)}return A(S)}u.boundary=F;function k(y,S){for(var M=new f(S),W=0;W<y.length;++W)for(var $=y[W],Z=0;Z<$.length;++Z)for(var K=Z+1;K<$.length;++K)M.link($[Z],$[K]);for(var Q=[],J=M.ranks,W=0;W<J.length;++W)J[W]=-1;for(var W=0;W<y.length;++W){var G=M.find(y[W][0]);J[G]<0?(J[G]=Q.length,Q.push([y[W].slice(0)])):Q[J[G]].push(y[W].slice(0))}return Q}function P(y){for(var S=E(A(N(y,0))),M=new f(S.length),W=0;W<y.length;++W)for(var $=y[W],Z=0;Z<$.length;++Z)for(var K=D(S,[$[Z]]),Q=Z+1;Q<$.length;++Q)M.link(K,D(S,[$[Q]]));for(var J=[],G=M.ranks,W=0;W<G.length;++W)G[W]=-1;for(var W=0;W<y.length;++W){var ee=M.find(D(S,[y[W][0]]));G[ee]<0?(G[ee]=J.length,J.push([y[W].slice(0)])):J[G[ee]].push(y[W].slice(0))}return J}function T(y,S){return S?k(y,S):P(y)}u.connectedComponents=T}),4623:(function(l){"use restrict";l.exports=u;function u(c){this.roots=new Array(c),this.ranks=new Array(c);for(var p=0;p<c;++p)this.roots[p]=p,this.ranks[p]=0}u.prototype.length=function(){return this.roots.length},u.prototype.makeSet=function(){var c=this.roots.length;return this.roots.push(c),this.ranks.push(0),c},u.prototype.find=function(c){for(var p=this.roots;p[c]!==c;){var f=p[c];p[c]=p[f],c=f}return c},u.prototype.link=function(c,p){var f=this.find(c),v=this.find(p);if(f!==v){var h=this.ranks,m=this.roots,_=h[f],x=h[v];_<x?m[f]=v:x<_?m[v]=f:(m[v]=f,++h[f])}}}),5878:(function(l,u,c){l.exports=h;var p=c(3250),f=c(2014);function v(m,_,x){var A=Math.abs(p(m,_,x)),E=Math.sqrt(Math.pow(_[0]-x[0],2)+Math.pow(_[1]-x[1],2));return A/E}function h(m,_,x){for(var A=_.length,E=m.length,D=new Array(A),g=new Array(A),C=new Array(A),I=new Array(A),N=0;N<A;++N)D[N]=g[N]=-1,C[N]=1/0,I[N]=!1;for(var N=0;N<E;++N){var F=m[N];if(F.length!==2)throw new Error("Input must be a graph");var k=F[1],P=F[0];g[P]!==-1?g[P]=-2:g[P]=k,D[k]!==-1?D[k]=-2:D[k]=P}function T(Le){if(I[Le])return 1/0;var oe=D[Le],be=g[Le];return oe<0||be<0?1/0:v(_[Le],_[oe],_[be])}function y(Le,oe){var be=J[Le],_e=J[oe];J[Le]=_e,J[oe]=be,G[be]=oe,G[_e]=Le}function S(Le){return C[J[Le]]}function M(Le){return Le&1?Le-1>>1:(Le>>1)-1}function W(Le){for(var oe=S(Le);;){var be=oe,_e=2*Le+1,he=2*(Le+1),De=Le;if(_e<re){var xe=S(_e);xe<be&&(De=_e,be=xe)}if(he<re){var se=S(he);se<be&&(De=he)}if(De===Le)return Le;y(Le,De),Le=De}}function $(Le){for(var oe=S(Le);Le>0;){var be=M(Le);if(be>=0){var _e=S(be);if(oe<_e){y(Le,be),Le=be;continue}}return Le}}function Z(){if(re>0){var Le=J[0];return y(0,re-1),re-=1,W(0),Le}return-1}function K(Le,oe){var be=J[Le];return C[be]===oe?Le:(C[be]=-1/0,$(Le),Z(),C[be]=oe,re+=1,$(re-1))}function Q(Le){if(!I[Le]){I[Le]=!0;var oe=D[Le],be=g[Le];D[be]>=0&&(D[be]=oe),g[oe]>=0&&(g[oe]=be),G[oe]>=0&&K(G[oe],T(oe)),G[be]>=0&&K(G[be],T(be))}}for(var J=[],G=new Array(A),N=0;N<A;++N){var ee=C[N]=T(N);ee<1/0?(G[N]=J.length,J.push(N)):G[N]=-1}for(var re=J.length,N=re>>1;N>=0;--N)W(N);for(;;){var fe=Z();if(fe<0||C[fe]>x)break;Q(fe)}for(var we=[],N=0;N<A;++N)I[N]||(G[N]=we.length,we.push(_[N].slice()));we.length;function Oe(Le,oe){if(Le[oe]<0)return oe;var be=oe,_e=oe;do{var he=Le[_e];if(!I[_e]||he<0||he===_e||(_e=he,he=Le[_e],!I[_e]||he<0||he===_e))break;_e=he,be=Le[be]}while(be!==_e);for(var De=oe;De!==_e;De=Le[De])Le[De]=_e;return _e}var ke=[];return m.forEach(function(Le){var oe=Oe(D,Le[0]),be=Oe(g,Le[1]);if(oe>=0&&be>=0&&oe!==be){var _e=G[oe],he=G[be];_e!==he&&ke.push([_e,he])}}),f.unique(f.normalize(ke)),{positions:we,edges:ke}}}),1303:(function(l,u,c){l.exports=v;var p=c(3250);function f(h,m){var _,x;if(m[0][0]<m[1][0])_=m[0],x=m[1];else if(m[0][0]>m[1][0])_=m[1],x=m[0];else{var A=Math.min(h[0][1],h[1][1]),E=Math.max(h[0][1],h[1][1]),D=Math.min(m[0][1],m[1][1]),g=Math.max(m[0][1],m[1][1]);return E<D?E-D:A>g?A-g:E-g}var C,I;h[0][1]<h[1][1]?(C=h[0],I=h[1]):(C=h[1],I=h[0]);var N=p(x,_,C);return N||(N=p(x,_,I),N)?N:I-x}function v(h,m){var _,x;if(m[0][0]<m[1][0])_=m[0],x=m[1];else if(m[0][0]>m[1][0])_=m[1],x=m[0];else return f(m,h);var A,E;if(h[0][0]<h[1][0])A=h[0],E=h[1];else if(h[0][0]>h[1][0])A=h[1],E=h[0];else return-f(h,m);var D=p(_,x,E),g=p(_,x,A);if(D<0){if(g<=0)return D}else if(D>0){if(g>=0)return D}else if(g)return g;if(D=p(E,A,x),g=p(E,A,_),D<0){if(g<=0)return D}else if(D>0){if(g>=0)return D}else if(g)return g;return x[0]-E[0]}}),4209:(function(l,u,c){l.exports=g;var p=c(2478),f=c(3840),v=c(3250),h=c(1303);function m(C,I,N){this.slabs=C,this.coordinates=I,this.horizontal=N}var _=m.prototype;function x(C,I){return C.y-I}function A(C,I){for(var N=null;C;){var F=C.key,k,P;F[0][0]<F[1][0]?(k=F[0],P=F[1]):(k=F[1],P=F[0]);var T=v(k,P,I);if(T<0)C=C.left;else if(T>0)if(I[0]!==F[1][0])N=C,C=C.right;else{var y=A(C.right,I);if(y)return y;C=C.left}else{if(I[0]!==F[1][0])return C;var y=A(C.right,I);if(y)return y;C=C.left}}return N}_.castUp=function(C){var I=p.le(this.coordinates,C[0]);if(I<0)return-1;this.slabs[I];var N=A(this.slabs[I],C),F=-1;if(N&&(F=N.value),this.coordinates[I]===C[0]){var k=null;if(N&&(k=N.key),I>0){var P=A(this.slabs[I-1],C);P&&(k?h(P.key,k)>0&&(k=P.key,F=P.value):(F=P.value,k=P.key))}var T=this.horizontal[I];if(T.length>0){var y=p.ge(T,C[1],x);if(y<T.length){var S=T[y];if(C[1]===S.y){if(S.closed)return S.index;for(;y<T.length-1&&T[y+1].y===C[1];)if(y=y+1,S=T[y],S.closed)return S.index;if(S.y===C[1]&&!S.start){if(y=y+1,y>=T.length)return F;S=T[y]}}if(S.start)if(k){var M=v(k[0],k[1],[C[0],S.y]);k[0][0]>k[1][0]&&(M=-M),M>0&&(F=S.index)}else F=S.index;else S.y!==C[1]&&(F=S.index)}}}return F};function E(C,I,N,F){this.y=C,this.index=I,this.start=N,this.closed=F}function D(C,I,N,F){this.x=C,this.segment=I,this.create=N,this.index=F}function g(C){for(var I=C.length,N=2*I,F=new Array(N),k=0;k<I;++k){var P=C[k],T=P[0][0]<P[1][0];F[2*k]=new D(P[0][0],P,T,k),F[2*k+1]=new D(P[1][0],P,!T,k)}F.sort(function(Q,J){var G=Q.x-J.x;return G||(G=Q.create-J.create,G)?G:Math.min(Q.segment[0][1],Q.segment[1][1])-Math.min(J.segment[0][1],J.segment[1][1])});for(var y=f(h),S=[],M=[],W=[],k=0;k<N;){for(var $=F[k].x,Z=[];k<N;){var K=F[k];if(K.x!==$)break;k+=1,K.segment[0][0]===K.x&&K.segment[1][0]===K.x?K.create&&(K.segment[0][1]<K.segment[1][1]?(Z.push(new E(K.segment[0][1],K.index,!0,!0)),Z.push(new E(K.segment[1][1],K.index,!1,!1))):(Z.push(new E(K.segment[1][1],K.index,!0,!1)),Z.push(new E(K.segment[0][1],K.index,!1,!0)))):K.create?y=y.insert(K.segment,K.index):y=y.remove(K.segment)}S.push(y.root),M.push($),W.push(Z)}return new m(S,M,W)}}),5202:(function(l,u,c){var p=c(1944),f=c(8210);l.exports=m,l.exports.positive=_,l.exports.negative=x;function v(A,E){var D=f(p(A,E),[E[E.length-1]]);return D[D.length-1]}function h(A,E,D,g){var C=g-E,I=-E/C;I<0?I=0:I>1&&(I=1);for(var N=1-I,F=A.length,k=new Array(F),P=0;P<F;++P)k[P]=I*A[P]+N*D[P];return k}function m(A,E){for(var D=[],g=[],C=v(A[A.length-1],E),I=A[A.length-1],N=A[0],F=0;F<A.length;++F,I=N){N=A[F];var k=v(N,E);if(C<0&&k>0||C>0&&k<0){var P=h(I,k,N,C);D.push(P),g.push(P.slice())}k<0?g.push(N.slice()):k>0?D.push(N.slice()):(D.push(N.slice()),g.push(N.slice())),C=k}return{positive:D,negative:g}}function _(A,E){for(var D=[],g=v(A[A.length-1],E),C=A[A.length-1],I=A[0],N=0;N<A.length;++N,C=I){I=A[N];var F=v(I,E);(g<0&&F>0||g>0&&F<0)&&D.push(h(C,F,I,g)),F>=0&&D.push(I.slice()),g=F}return D}function x(A,E){for(var D=[],g=v(A[A.length-1],E),C=A[A.length-1],I=A[0],N=0;N<A.length;++N,C=I){I=A[N];var F=v(I,E);(g<0&&F>0||g>0&&F<0)&&D.push(h(C,F,I,g)),F<=0&&D.push(I.slice()),g=F}return D}}),3387:(function(l,u,c){var p;(function(){var f={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 v(A){return m(x(A),arguments)}function h(A,E){return v.apply(null,[A].concat(E||[]))}function m(A,E){var D=1,g=A.length,C,I="",N,F,k,P,T,y,S,M;for(N=0;N<g;N++)if(typeof A[N]=="string")I+=A[N];else if(typeof A[N]=="object"){if(k=A[N],k.keys)for(C=E[D],F=0;F<k.keys.length;F++){if(C==null)throw new Error(v('[sprintf] Cannot access property "%s" of undefined value "%s"',k.keys[F],k.keys[F-1]));C=C[k.keys[F]]}else k.param_no?C=E[k.param_no]:C=E[D++];if(f.not_type.test(k.type)&&f.not_primitive.test(k.type)&&C instanceof Function&&(C=C()),f.numeric_arg.test(k.type)&&typeof C!="number"&&isNaN(C))throw new TypeError(v("[sprintf] expecting number but found %T",C));switch(f.number.test(k.type)&&(S=C>=0),k.type){case"b":C=parseInt(C,10).toString(2);break;case"c":C=String.fromCharCode(parseInt(C,10));break;case"d":case"i":C=parseInt(C,10);break;case"j":C=JSON.stringify(C,null,k.width?parseInt(k.width):0);break;case"e":C=k.precision?parseFloat(C).toExponential(k.precision):parseFloat(C).toExponential();break;case"f":C=k.precision?parseFloat(C).toFixed(k.precision):parseFloat(C);break;case"g":C=k.precision?String(Number(C.toPrecision(k.precision))):parseFloat(C);break;case"o":C=(parseInt(C,10)>>>0).toString(8);break;case"s":C=String(C),C=k.precision?C.substring(0,k.precision):C;break;case"t":C=String(!!C),C=k.precision?C.substring(0,k.precision):C;break;case"T":C=Object.prototype.toString.call(C).slice(8,-1).toLowerCase(),C=k.precision?C.substring(0,k.precision):C;break;case"u":C=parseInt(C,10)>>>0;break;case"v":C=C.valueOf(),C=k.precision?C.substring(0,k.precision):C;break;case"x":C=(parseInt(C,10)>>>0).toString(16);break;case"X":C=(parseInt(C,10)>>>0).toString(16).toUpperCase();break}f.json.test(k.type)?I+=C:(f.number.test(k.type)&&(!S||k.sign)?(M=S?"+":"-",C=C.toString().replace(f.sign,"")):M="",T=k.pad_char?k.pad_char==="0"?"0":k.pad_char.charAt(1):" ",y=k.width-(M+C).length,P=k.width&&y>0?T.repeat(y):"",I+=k.align?M+C+P:T==="0"?M+P+C:P+M+C)}return I}var _=Object.create(null);function x(A){if(_[A])return _[A];for(var E=A,D,g=[],C=0;E;){if((D=f.text.exec(E))!==null)g.push(D[0]);else if((D=f.modulo.exec(E))!==null)g.push("%");else if((D=f.placeholder.exec(E))!==null){if(D[2]){C|=1;var I=[],N=D[2],F=[];if((F=f.key.exec(N))!==null)for(I.push(F[1]);(N=N.substring(F[0].length))!=="";)if((F=f.key_access.exec(N))!==null)I.push(F[1]);else if((F=f.index_access.exec(N))!==null)I.push(F[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");D[2]=I}else C|=2;if(C===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");g.push({placeholder:D[0],param_no:D[1],keys:D[2],sign:D[3],pad_char:D[4],align:D[5],width:D[6],precision:D[7],type:D[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");E=E.substring(D[0].length)}return _[A]=g}u.sprintf=v,u.vsprintf=h,typeof window<"u"&&(window.sprintf=v,window.vsprintf=h,p=(function(){return{sprintf:v,vsprintf:h}}).call(u,c,u,l),p!==void 0&&(l.exports=p))})()}),3711:(function(l,u,c){l.exports=x;var p=c(2640),f=c(781),v={"2d":function(A,E,D){var g=A({order:E,scalarArguments:3,getters:D==="generic"?[0]:void 0,phase:function(I,N,F,k){return I>k|0},vertex:function(I,N,F,k,P,T,y,S,M,W,$,Z,K){var Q=(y<<0)+(S<<1)+(M<<2)+(W<<3)|0;if(!(Q===0||Q===15))switch(Q){case 0:$.push([I-.5,N-.5]);break;case 1:$.push([I-.25-.25*(k+F-2*K)/(F-k),N-.25-.25*(P+F-2*K)/(F-P)]);break;case 2:$.push([I-.75-.25*(-k-F+2*K)/(k-F),N-.25-.25*(T+k-2*K)/(k-T)]);break;case 3:$.push([I-.5,N-.5-.5*(P+F+T+k-4*K)/(F-P+k-T)]);break;case 4:$.push([I-.25-.25*(T+P-2*K)/(P-T),N-.75-.25*(-P-F+2*K)/(P-F)]);break;case 5:$.push([I-.5-.5*(k+F+T+P-4*K)/(F-k+P-T),N-.5]);break;case 6:$.push([I-.5-.25*(-k-F+T+P)/(k-F+P-T),N-.5-.25*(-P-F+T+k)/(P-F+k-T)]);break;case 7:$.push([I-.75-.25*(T+P-2*K)/(P-T),N-.75-.25*(T+k-2*K)/(k-T)]);break;case 8:$.push([I-.75-.25*(-T-P+2*K)/(T-P),N-.75-.25*(-T-k+2*K)/(T-k)]);break;case 9:$.push([I-.5-.25*(k+F+-T-P)/(F-k+T-P),N-.5-.25*(P+F+-T-k)/(F-P+T-k)]);break;case 10:$.push([I-.5-.5*(-k-F+-T-P+4*K)/(k-F+T-P),N-.5]);break;case 11:$.push([I-.25-.25*(-T-P+2*K)/(T-P),N-.75-.25*(P+F-2*K)/(F-P)]);break;case 12:$.push([I-.5,N-.5-.5*(-P-F+-T-k+4*K)/(P-F+T-k)]);break;case 13:$.push([I-.75-.25*(k+F-2*K)/(F-k),N-.25-.25*(-T-k+2*K)/(T-k)]);break;case 14:$.push([I-.25-.25*(-k-F+2*K)/(k-F),N-.25-.25*(-P-F+2*K)/(P-F)]);break;case 15:$.push([I-.5,N-.5]);break}},cell:function(I,N,F,k,P,T,y,S,M){P?S.push([I,N]):S.push([N,I])}});return function(C,I){var N=[],F=[];return g(C,N,F,I),{positions:N,cells:F}}}};function h(A,E){var D=A.length+"d",g=v[D];if(g)return g(p,A,E)}function m(A,E){for(var D=f(A,E),g=D.length,C=new Array(g),I=new Array(g),N=0;N<g;++N)C[N]=[D[N]],I[N]=[N];return{positions:C,cells:I}}var _={};function x(A,C){if(A.dimension<=0)return{positions:[],cells:[]};if(A.dimension===1)return m(A,C);var D=A.order.join()+"-"+A.dtype,g=_[D],C=+C||0;return g||(g=_[D]=h(A.order,A.dtype)),g(A,C)}}),665:(function(l,u,c){var p=c(3202);l.exports=m;var f=96;function v(_,x){var A=p(getComputedStyle(_).getPropertyValue(x));return A[0]*m(A[1],_)}function h(_,x){var A=document.createElement("div");A.style["font-size"]="128"+_,x.appendChild(A);var E=v(A,"font-size")/128;return x.removeChild(A),E}function m(_,x){switch(x=x||document.body,_=(_||"px").trim().toLowerCase(),(x===window||x===document)&&(x=document.body),_){case"%":return x.clientHeight/100;case"ch":case"ex":return h(_,x);case"em":return v(x,"font-size");case"rem":return v(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 f;case"cm":return f/2.54;case"mm":return f/25.4;case"pt":return f/72;case"pc":return f/6}return 1}}),7261:(function(l,u,c){l.exports=I;var p=c(9215),f=c(7608),v=c(6079),h=c(5911),m=c(3536),_=c(244);function x(N,F,k){return Math.sqrt(Math.pow(N,2)+Math.pow(F,2)+Math.pow(k,2))}function A(N){return Math.min(1,Math.max(-1,N))}function E(N){var F=Math.abs(N[0]),k=Math.abs(N[1]),P=Math.abs(N[2]),T=[0,0,0];F>Math.max(k,P)?T[2]=1:k>Math.max(F,P)?T[0]=1:T[1]=1;for(var y=0,S=0,M=0;M<3;++M)y+=N[M]*N[M],S+=T[M]*N[M];for(var M=0;M<3;++M)T[M]-=S/y*N[M];return m(T,T),T}function D(N,F,k,P,T,y,S,M){this.center=p(k),this.up=p(P),this.right=p(T),this.radius=p([y]),this.angle=p([S,M]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(N,F),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 W=0;W<16;++W)this.computedMatrix[W]=.5;this.recalcMatrix(0)}var g=D.prototype;g.setDistanceLimits=function(N,F){N>0?N=Math.log(N):N=-1/0,F>0?F=Math.log(F):F=1/0,F=Math.max(F,N),this.radius.bounds[0][0]=N,this.radius.bounds[1][0]=F},g.getDistanceLimits=function(N){var F=this.radius.bounds[0];return N?(N[0]=Math.exp(F[0][0]),N[1]=Math.exp(F[1][0]),N):[Math.exp(F[0][0]),Math.exp(F[1][0])]},g.recalcMatrix=function(N){this.center.curve(N),this.up.curve(N),this.right.curve(N),this.radius.curve(N),this.angle.curve(N);for(var F=this.computedUp,k=this.computedRight,P=0,T=0,y=0;y<3;++y)T+=F[y]*k[y],P+=F[y]*F[y];for(var S=Math.sqrt(P),M=0,y=0;y<3;++y)k[y]-=F[y]*T/P,M+=k[y]*k[y],F[y]/=S;for(var W=Math.sqrt(M),y=0;y<3;++y)k[y]/=W;var $=this.computedToward;h($,F,k),m($,$);for(var Z=Math.exp(this.computedRadius[0]),K=this.computedAngle[0],Q=this.computedAngle[1],J=Math.cos(K),G=Math.sin(K),ee=Math.cos(Q),re=Math.sin(Q),fe=this.computedCenter,we=J*ee,Oe=G*ee,ke=re,Le=-J*re,oe=-G*re,be=ee,_e=this.computedEye,he=this.computedMatrix,y=0;y<3;++y){var De=we*k[y]+Oe*$[y]+ke*F[y];he[4*y+1]=Le*k[y]+oe*$[y]+be*F[y],he[4*y+2]=De,he[4*y+3]=0}var xe=he[1],se=he[5],Ee=he[9],Te=he[2],Be=he[6],tt=he[10],at=se*tt-Ee*Be,gt=Ee*Te-xe*tt,pt=xe*Be-se*Te,Rt=x(at,gt,pt);at/=Rt,gt/=Rt,pt/=Rt,he[0]=at,he[4]=gt,he[8]=pt;for(var y=0;y<3;++y)_e[y]=fe[y]+he[2+4*y]*Z;for(var y=0;y<3;++y){for(var M=0,$t=0;$t<3;++$t)M+=he[y+4*$t]*_e[$t];he[12+y]=-M}he[15]=1},g.getMatrix=function(N,F){this.recalcMatrix(N);var k=this.computedMatrix;if(F){for(var P=0;P<16;++P)F[P]=k[P];return F}return k};var C=[0,0,0];g.rotate=function(N,F,k,P){if(this.angle.move(N,F,k),P){this.recalcMatrix(N);var T=this.computedMatrix;C[0]=T[2],C[1]=T[6],C[2]=T[10];for(var y=this.computedUp,S=this.computedRight,M=this.computedToward,W=0;W<3;++W)T[4*W]=y[W],T[4*W+1]=S[W],T[4*W+2]=M[W];v(T,T,P,C);for(var W=0;W<3;++W)y[W]=T[4*W],S[W]=T[4*W+1];this.up.set(N,y[0],y[1],y[2]),this.right.set(N,S[0],S[1],S[2])}},g.pan=function(N,F,k,P){F=F||0,k=k||0,P=P||0,this.recalcMatrix(N);var T=this.computedMatrix;Math.exp(this.computedRadius[0]);var y=T[1],S=T[5],M=T[9],W=x(y,S,M);y/=W,S/=W,M/=W;var $=T[0],Z=T[4],K=T[8],Q=$*y+Z*S+K*M;$-=y*Q,Z-=S*Q,K-=M*Q;var J=x($,Z,K);$/=J,Z/=J,K/=J;var G=$*F+y*k,ee=Z*F+S*k,re=K*F+M*k;this.center.move(N,G,ee,re);var fe=Math.exp(this.computedRadius[0]);fe=Math.max(1e-4,fe+P),this.radius.set(N,Math.log(fe))},g.translate=function(N,F,k,P){this.center.move(N,F||0,k||0,P||0)},g.setMatrix=function(N,F,k,P){var T=1;typeof k=="number"&&(T=k|0),(T<0||T>3)&&(T=1);var y=(T+2)%3;F||(this.recalcMatrix(N),F=this.computedMatrix);var S=F[T],M=F[T+4],W=F[T+8];if(P){var Z=Math.abs(S),K=Math.abs(M),Q=Math.abs(W),J=Math.max(Z,K,Q);Z===J?(S=S<0?-1:1,M=W=0):Q===J?(W=W<0?-1:1,S=M=0):(M=M<0?-1:1,S=W=0)}else{var $=x(S,M,W);S/=$,M/=$,W/=$}var G=F[y],ee=F[y+4],re=F[y+8],fe=G*S+ee*M+re*W;G-=S*fe,ee-=M*fe,re-=W*fe;var we=x(G,ee,re);G/=we,ee/=we,re/=we;var Oe=M*re-W*ee,ke=W*G-S*re,Le=S*ee-M*G,oe=x(Oe,ke,Le);Oe/=oe,ke/=oe,Le/=oe,this.center.jump(N,st,rt,Ue),this.radius.idle(N),this.up.jump(N,S,M,W),this.right.jump(N,G,ee,re);var be,_e;if(T===2){var he=F[1],De=F[5],xe=F[9],se=he*G+De*ee+xe*re,Ee=he*Oe+De*ke+xe*Le;at<0?be=-Math.PI/2:be=Math.PI/2,_e=Math.atan2(Ee,se)}else{var Te=F[2],Be=F[6],tt=F[10],at=Te*S+Be*M+tt*W,gt=Te*G+Be*ee+tt*re,pt=Te*Oe+Be*ke+tt*Le;be=Math.asin(A(at)),_e=Math.atan2(pt,gt)}this.angle.jump(N,_e,be),this.recalcMatrix(N);var Rt=F[2],$t=F[6],Wt=F[10],Ht=this.computedMatrix;f(Ht,F);var Ft=Ht[15],st=Ht[12]/Ft,rt=Ht[13]/Ft,Ue=Ht[14]/Ft,xt=Math.exp(this.computedRadius[0]);this.center.jump(N,st-Rt*xt,rt-$t*xt,Ue-Wt*xt)},g.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},g.idle=function(N){this.center.idle(N),this.up.idle(N),this.right.idle(N),this.radius.idle(N),this.angle.idle(N)},g.flush=function(N){this.center.flush(N),this.up.flush(N),this.right.flush(N),this.radius.flush(N),this.angle.flush(N)},g.setDistance=function(N,F){F>0&&this.radius.set(N,Math.log(F))},g.lookAt=function(N,F,k,P){this.recalcMatrix(N),F=F||this.computedEye,k=k||this.computedCenter,P=P||this.computedUp;var T=P[0],y=P[1],S=P[2],M=x(T,y,S);if(!(M<1e-6)){T/=M,y/=M,S/=M;var W=F[0]-k[0],$=F[1]-k[1],Z=F[2]-k[2],K=x(W,$,Z);if(!(K<1e-6)){W/=K,$/=K,Z/=K;var Q=this.computedRight,J=Q[0],G=Q[1],ee=Q[2],re=T*J+y*G+S*ee;J-=re*T,G-=re*y,ee-=re*S;var fe=x(J,G,ee);if(!(fe<.01&&(J=y*Z-S*$,G=S*W-T*Z,ee=T*$-y*W,fe=x(J,G,ee),fe<1e-6))){J/=fe,G/=fe,ee/=fe,this.up.set(N,T,y,S),this.right.set(N,J,G,ee),this.center.set(N,k[0],k[1],k[2]),this.radius.set(N,Math.log(K));var we=y*ee-S*G,Oe=S*J-T*ee,ke=T*G-y*J,Le=x(we,Oe,ke);we/=Le,Oe/=Le,ke/=Le;var oe=T*W+y*$+S*Z,be=J*W+G*$+ee*Z,_e=we*W+Oe*$+ke*Z,he=Math.asin(A(oe)),De=Math.atan2(_e,be),xe=this.angle._state,se=xe[xe.length-1],Ee=xe[xe.length-2];se=se%(2*Math.PI);var Te=Math.abs(se+2*Math.PI-De),Be=Math.abs(se-De),tt=Math.abs(se-2*Math.PI-De);Te<Be&&(se+=2*Math.PI),tt<Be&&(se-=2*Math.PI),this.angle.jump(this.angle.lastT(),se,Ee),this.angle.set(N,De,he)}}}};function I(N){N=N||{};var F=N.center||[0,0,0],k=N.up||[0,1,0],P=N.right||E(k),T=N.radius||1,y=N.theta||0,S=N.phi||0;if(F=[].slice.call(F,0,3),k=[].slice.call(k,0,3),m(k,k),P=[].slice.call(P,0,3),m(P,P),"eye"in N){var M=N.eye,W=[M[0]-F[0],M[1]-F[1],M[2]-F[2]];h(P,W,k),x(P[0],P[1],P[2])<1e-6?P=E(k):m(P,P),T=x(W[0],W[1],W[2]);var $=_(k,W)/T,Z=_(P,W)/T;S=Math.acos($),y=Math.acos(Z)}return T=Math.log(T),new D(N.zoomMin,N.zoomMax,F,k,P,T,y,S)}}),5250:(function(l){l.exports=c;var u=+(Math.pow(2,27)+1);function c(p,f,v){var h=p*f,m=u*p,_=m-p,x=m-_,A=p-x,E=u*f,D=E-f,g=E-D,C=f-g,I=h-x*g,N=I-A*g,F=N-x*C,k=A*C-F;return v?(v[0]=k,v[1]=h,v):[k,h]}}),9362:(function(l){l.exports=u;function u(c,p,f){var v=c+p,h=v-c,m=v-h,_=p-h,x=c-m;return f?(f[0]=x+_,f[1]=v,f):[x+_,v]}}),1888:(function(l,u,c){var p=c(8828),f=c(1338),v=c(4793).hp;c.g.__TYPEDARRAY_POOL||(c.g.__TYPEDARRAY_POOL={UINT8:f([32,0]),UINT16:f([32,0]),UINT32:f([32,0]),BIGUINT64:f([32,0]),INT8:f([32,0]),INT16:f([32,0]),INT32:f([32,0]),BIGINT64:f([32,0]),FLOAT:f([32,0]),DOUBLE:f([32,0]),DATA:f([32,0]),UINT8C:f([32,0]),BUFFER:f([32,0])});var h=typeof Uint8ClampedArray<"u",m=typeof BigUint64Array<"u",_=typeof BigInt64Array<"u",x=c.g.__TYPEDARRAY_POOL;x.UINT8C||(x.UINT8C=f([32,0])),x.BIGUINT64||(x.BIGUINT64=f([32,0])),x.BIGINT64||(x.BIGINT64=f([32,0])),x.BUFFER||(x.BUFFER=f([32,0]));var A=x.DATA,E=x.BUFFER;u.free=function(J){if(v.isBuffer(J))E[p.log2(J.length)].push(J);else{if(Object.prototype.toString.call(J)!=="[object ArrayBuffer]"&&(J=J.buffer),!J)return;var G=J.length||J.byteLength,ee=p.log2(G)|0;A[ee].push(J)}};function D(Q){if(Q){var J=Q.length||Q.byteLength,G=p.log2(J);A[G].push(Q)}}function g(Q){D(Q.buffer)}u.freeUint8=u.freeUint16=u.freeUint32=u.freeBigUint64=u.freeInt8=u.freeInt16=u.freeInt32=u.freeBigInt64=u.freeFloat32=u.freeFloat=u.freeFloat64=u.freeDouble=u.freeUint8Clamped=u.freeDataView=g,u.freeArrayBuffer=D,u.freeBuffer=function(J){E[p.log2(J.length)].push(J)},u.malloc=function(J,G){if(G===void 0||G==="arraybuffer")return C(J);switch(G){case"uint8":return I(J);case"uint16":return N(J);case"uint32":return F(J);case"int8":return k(J);case"int16":return P(J);case"int32":return T(J);case"float":case"float32":return y(J);case"double":case"float64":return S(J);case"uint8_clamped":return M(J);case"bigint64":return $(J);case"biguint64":return W(J);case"buffer":return K(J);case"data":case"dataview":return Z(J);default:return null}return null};function C(J){var J=p.nextPow2(J),G=p.log2(J),ee=A[G];return ee.length>0?ee.pop():new ArrayBuffer(J)}u.mallocArrayBuffer=C;function I(Q){return new Uint8Array(C(Q),0,Q)}u.mallocUint8=I;function N(Q){return new Uint16Array(C(2*Q),0,Q)}u.mallocUint16=N;function F(Q){return new Uint32Array(C(4*Q),0,Q)}u.mallocUint32=F;function k(Q){return new Int8Array(C(Q),0,Q)}u.mallocInt8=k;function P(Q){return new Int16Array(C(2*Q),0,Q)}u.mallocInt16=P;function T(Q){return new Int32Array(C(4*Q),0,Q)}u.mallocInt32=T;function y(Q){return new Float32Array(C(4*Q),0,Q)}u.mallocFloat32=u.mallocFloat=y;function S(Q){return new Float64Array(C(8*Q),0,Q)}u.mallocFloat64=u.mallocDouble=S;function M(Q){return h?new Uint8ClampedArray(C(Q),0,Q):I(Q)}u.mallocUint8Clamped=M;function W(Q){return m?new BigUint64Array(C(8*Q),0,Q):null}u.mallocBigUint64=W;function $(Q){return _?new BigInt64Array(C(8*Q),0,Q):null}u.mallocBigInt64=$;function Z(Q){return new DataView(C(Q),0,Q)}u.mallocDataView=Z;function K(Q){Q=p.nextPow2(Q);var J=p.log2(Q),G=E[J];return G.length>0?G.pop():new v(Q)}u.mallocBuffer=K,u.clearCache=function(){for(var J=0;J<32;++J)x.UINT8[J].length=0,x.UINT16[J].length=0,x.UINT32[J].length=0,x.INT8[J].length=0,x.INT16[J].length=0,x.INT32[J].length=0,x.FLOAT[J].length=0,x.DOUBLE[J].length=0,x.BIGUINT64[J].length=0,x.BIGINT64[J].length=0,x.UINT8C[J].length=0,A[J].length=0,E[J].length=0}}),1755:(function(l){"use restrict";l.exports=u;function u(p){this.roots=new Array(p),this.ranks=new Array(p);for(var f=0;f<p;++f)this.roots[f]=f,this.ranks[f]=0}var c=u.prototype;Object.defineProperty(c,"length",{get:function(){return this.roots.length}}),c.makeSet=function(){var p=this.roots.length;return this.roots.push(p),this.ranks.push(0),p},c.find=function(p){for(var f=p,v=this.roots;v[p]!==p;)p=v[p];for(;v[f]!==p;){var h=v[f];v[f]=p,f=h}return p},c.link=function(p,f){var v=this.find(p),h=this.find(f);if(v!==h){var m=this.ranks,_=this.roots,x=m[v],A=m[h];x<A?_[v]=h:A<x?_[h]=v:(_[h]=v,++m[v])}}}),1682:(function(l){function u(f,v){for(var h=1,m=f.length,_=f[0],x=f[0],A=1;A<m;++A)if(x=_,_=f[A],v(_,x)){if(A===h){h++;continue}f[h++]=_}return f.length=h,f}function c(f){for(var v=1,h=f.length,m=f[0],_=f[0],x=1;x<h;++x,_=m)if(_=m,m=f[x],m!==_){if(x===v){v++;continue}f[v++]=m}return f.length=v,f}function p(f,v,h){return f.length===0?f:v?(h||f.sort(v),u(f,v)):(h||f.sort(),c(f))}l.exports=p}),4359:(function(l,u,c){l.exports=h;var p=c(7718),f=null,v=null;typeof document<"u"&&(f=document.createElement("canvas"),f.width=8192,f.height=1024,v=f.getContext("2d"));function h(m,_){return(typeof _!="object"||_===null)&&(_={}),p(m,_.canvas||f,_.context||v,_)}}),7718:(function(l,u,c){l.exports=$,l.exports.processPixels=W;var p=c(3711),f=c(9618),v=c(5878),h=c(332),m=c(2538),_=c(2095),x="b",A="b|",E="i",D="i|",g="sup",C="+",I="+1",N="sub",F="-",k="-1";function P(Z,K,Q,J){for(var G="<"+Z+">",ee="</"+Z+">",re=G.length,fe=ee.length,we=K[0]===C||K[0]===F,Oe=0,ke=-fe;Oe>-1&&(Oe=Q.indexOf(G,Oe),!(Oe===-1||(ke=Q.indexOf(ee,Oe+re),ke===-1)||ke<=Oe));){for(var Le=Oe;Le<ke+fe;++Le)if(Le<Oe+re||Le>=ke)J[Le]=null,Q=Q.substr(0,Le)+" "+Q.substr(Le+1);else if(J[Le]!==null){var oe=J[Le].indexOf(K[0]);oe===-1?J[Le]+=K:we&&(J[Le]=J[Le].substr(0,oe+1)+(1+parseInt(J[Le][oe+1]))+J[Le].substr(oe+2))}var be=Oe+re,_e=Q.substr(be,ke-be),he=_e.indexOf(G);he!==-1?Oe=he:Oe=ke+fe}return J}function T(Z,K,Q){for(var J=K.textAlign||"start",G=K.textBaseline||"alphabetic",ee=[1<<30,1<<30],re=[0,0],fe=Z.length,we=0;we<fe;++we)for(var Oe=Z[we],ke=0;ke<2;++ke)ee[ke]=Math.min(ee[ke],Oe[ke])|0,re[ke]=Math.max(re[ke],Oe[ke])|0;var Le=0;switch(J){case"center":Le=-.5*(ee[0]+re[0]);break;case"right":case"end":Le=-re[0];break;case"left":case"start":Le=-ee[0];break;default:throw new Error("vectorize-text: Unrecognized textAlign: '"+J+"'")}var oe=0;switch(G){case"hanging":case"top":oe=-ee[1];break;case"middle":oe=-.5*(ee[1]+re[1]);break;case"alphabetic":case"ideographic":oe=-3*Q;break;case"bottom":oe=-re[1];break;default:throw new Error("vectorize-text: Unrecoginized textBaseline: '"+G+"'")}var be=1/Q;return"lineHeight"in K?be*=+K.lineHeight:"width"in K?be=K.width/(re[0]-ee[0]):"height"in K&&(be=K.height/(re[1]-ee[1])),Z.map(function(_e){return[be*(_e[0]+Le),be*(_e[1]+oe)]})}function y(Z,K,Q,J,G,ee){Q=Q.replace(/\n/g,""),ee.breaklines===!0?Q=Q.replace(/\<br\>/g,`
`):Q=Q.replace(/\<br\>/g," ");var re="",fe=[];for(se=0;se<Q.length;++se)fe[se]=re;ee.bolds===!0&&(fe=P(x,A,Q,fe)),ee.italics===!0&&(fe=P(E,D,Q,fe)),ee.superscripts===!0&&(fe=P(g,I,Q,fe)),ee.subscripts===!0&&(fe=P(N,k,Q,fe));var we=[],Oe="";for(se=0;se<Q.length;++se)fe[se]!==null&&(Oe+=Q[se],we.push(fe[se]));var ke=Oe.split(`
`),Le=ke.length,oe=Math.round(G*J),be=J,_e=J*2,he=0,De=Le*oe+_e;Z.height<De&&(Z.height=De),K.fillStyle="#000",K.fillRect(0,0,Z.width,Z.height),K.fillStyle="#fff";var xe,se,Ee,Te,Be,tt=0,at="";function gt(){if(at!==""){var Ue=K.measureText(at).width;K.fillText(at,be+Ee,_e+Te),Ee+=Ue}}function pt(){return""+Math.round(Be)+"px "}function Rt(Ue,xt){var Gt=""+K.font;if(ee.subscripts===!0){var Jt=Ue.indexOf(F),Ut=xt.indexOf(F),kr=Jt>-1?parseInt(Ue[1+Jt]):0,Pr=Ut>-1?parseInt(xt[1+Ut]):0;kr!==Pr&&(Gt=Gt.replace(pt(),"?px "),Be*=Math.pow(.75,Pr-kr),Gt=Gt.replace("?px ",pt())),Te+=.25*oe*(Pr-kr)}if(ee.superscripts===!0){var $r=Ue.indexOf(C),rn=xt.indexOf(C),kn=$r>-1?parseInt(Ue[1+$r]):0,Rn=rn>-1?parseInt(xt[1+rn]):0;kn!==Rn&&(Gt=Gt.replace(pt(),"?px "),Be*=Math.pow(.75,Rn-kn),Gt=Gt.replace("?px ",pt())),Te-=.25*oe*(Rn-kn)}if(ee.bolds===!0){var ci=Ue.indexOf(A)>-1,In=xt.indexOf(A)>-1;!ci&&In&&(Gn?Gt=Gt.replace("italic ","italic bold "):Gt="bold "+Gt),ci&&!In&&(Gt=Gt.replace("bold ",""))}if(ee.italics===!0){var Gn=Ue.indexOf(D)>-1,mr=xt.indexOf(D)>-1;!Gn&&mr&&(Gt="italic "+Gt),Gn&&!mr&&(Gt=Gt.replace("italic ",""))}K.font=Gt}for(xe=0;xe<Le;++xe){var $t=ke[xe]+`
`;for(Ee=0,Te=xe*oe,Be=J,at="",se=0;se<$t.length;++se){var Wt=se+tt<we.length?we[se+tt]:we[we.length-1];re===Wt?at+=$t[se]:(gt(),at=$t[se],Wt!==void 0&&(Rt(re,Wt),re=Wt))}gt(),tt+=$t.length;var Ht=Math.round(Ee+2*be)|0;he<Ht&&(he=Ht)}var Ft=he,st=_e+oe*Le,rt=f(K.getImageData(0,0,Ft,st).data,[st,Ft,4]);return rt.pick(-1,-1,0).transpose(1,0)}function S(Z,K){var Q=p(Z,128);return K?v(Q.cells,Q.positions,.25):{edges:Q.cells,positions:Q.positions}}function M(Z,K,Q,J){var G=S(Z,J),ee=T(G.positions,K,Q),re=G.edges,fe=K.orientation==="ccw";if(h(ee,re),K.polygons||K.polygon||K.polyline){for(var we=_(re,ee),Oe=new Array(we.length),ke=0;ke<we.length;++ke){for(var Le=we[ke],oe=new Array(Le.length),be=0;be<Le.length;++be){for(var _e=Le[be],he=new Array(_e.length),De=0;De<_e.length;++De)he[De]=ee[_e[De]].slice();fe&&he.reverse(),oe[be]=he}Oe[ke]=oe}return Oe}else return K.triangles||K.triangulate||K.triangle?{cells:m(ee,re,{delaunay:!1,exterior:!1,interior:!0}),positions:ee}:{edges:re,positions:ee}}function W(Z,K,Q){try{return M(Z,K,Q,!0)}catch{}try{return M(Z,K,Q,!1)}catch{}return K.polygons||K.polyline||K.polygon?[]:K.triangles||K.triangulate||K.triangle?{cells:[],positions:[]}:{edges:[],positions:[]}}function $(Z,K,Q,J){var G=64,ee=1.25,re={breaklines:!1,bolds:!1,italics:!1,subscripts:!1,superscripts:!1};J&&(J.size&&J.size>0&&(G=J.size),J.lineSpacing&&J.lineSpacing>0&&(ee=J.lineSpacing),J.styletags&&J.styletags.breaklines&&(re.breaklines=!!J.styletags.breaklines),J.styletags&&J.styletags.bolds&&(re.bolds=!!J.styletags.bolds),J.styletags&&J.styletags.italics&&(re.italics=!!J.styletags.italics),J.styletags&&J.styletags.subscripts&&(re.subscripts=!!J.styletags.subscripts),J.styletags&&J.styletags.superscripts&&(re.superscripts=!!J.styletags.superscripts)),Q.font=[J.fontStyle,J.fontVariant,J.fontWeight,G+"px",J.font].filter(function(we){return we}).join(" "),Q.textAlign="start",Q.textBaseline="alphabetic",Q.direction="ltr";var fe=y(K,Q,Z,G,ee,re);return W(fe,J,G)}}),1538:(function(l){(function(){if(typeof ses<"u"&&ses.ok&&!ses.ok())return;function c(S){S.permitHostObjects___&&S.permitHostObjects___(c)}typeof ses<"u"&&(ses.weakMapPermitHostObjects=c);var p=!1;if(typeof WeakMap=="function"){var f=WeakMap;if(!(typeof navigator<"u"&&/Firefox/.test(navigator.userAgent))){var v=new f,h=Object.freeze({});if(v.set(h,1),v.get(h)!==1)p=!0;else{l.exports=WeakMap;return}}}var m=Object.getOwnPropertyNames,_=Object.defineProperty,x=Object.isExtensible,A="weakmap:",E=A+"ident:"+Math.random()+"___";if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var D=new ArrayBuffer(25),g=new Uint8Array(D);crypto.getRandomValues(g),E=A+"rand:"+Array.prototype.map.call(g,function(S){return(S%36).toString(36)}).join("")+"___"}function C(S){return!(S.substr(0,A.length)==A&&S.substr(S.length-3)==="___")}if(_(Object,"getOwnPropertyNames",{value:function(M){return m(M).filter(C)}}),"getPropertyNames"in Object){var I=Object.getPropertyNames;_(Object,"getPropertyNames",{value:function(M){return I(M).filter(C)}})}function N(S){if(S!==Object(S))throw new TypeError("Not an object: "+S);var M=S[E];if(M&&M.key===S)return M;if(x(S)){M={key:S};try{return _(S,E,{value:M,writable:!1,enumerable:!1,configurable:!1}),M}catch{return}}}(function(){var S=Object.freeze;_(Object,"freeze",{value:function(Z){return N(Z),S(Z)}});var M=Object.seal;_(Object,"seal",{value:function(Z){return N(Z),M(Z)}});var W=Object.preventExtensions;_(Object,"preventExtensions",{value:function(Z){return N(Z),W(Z)}})})();function F(S){return S.prototype=null,Object.freeze(S)}var k=!1;function P(){!k&&typeof console<"u"&&(k=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var T=0,y=function(){this instanceof y||P();var S=[],M=[],W=T++;function $(J,G){var ee,re=N(J);return re?W in re?re[W]:G:(ee=S.indexOf(J),ee>=0?M[ee]:G)}function Z(J){var G=N(J);return G?W in G:S.indexOf(J)>=0}function K(J,G){var ee,re=N(J);return re?re[W]=G:(ee=S.indexOf(J),ee>=0?M[ee]=G:(ee=S.length,M[ee]=G,S[ee]=J)),this}function Q(J){var G=N(J),ee,re;return G?W in G&&delete G[W]:(ee=S.indexOf(J),ee<0?!1:(re=S.length-1,S[ee]=void 0,M[ee]=M[re],S[ee]=S[re],S.length=re,M.length=re,!0))}return Object.create(y.prototype,{get___:{value:F($)},has___:{value:F(Z)},set___:{value:F(K)},delete___:{value:F(Q)}})};y.prototype=Object.create(Object.prototype,{get:{value:function(M,W){return this.get___(M,W)},writable:!0,configurable:!0},has:{value:function(M){return this.has___(M)},writable:!0,configurable:!0},set:{value:function(M,W){return this.set___(M,W)},writable:!0,configurable:!0},delete:{value:function(M){return this.delete___(M)},writable:!0,configurable:!0}}),typeof f=="function"?(function(){p&&typeof Proxy<"u"&&(Proxy=void 0);function S(){this instanceof y||P();var M=new f,W=void 0,$=!1;function Z(G,ee){return W?M.has(G)?M.get(G):W.get___(G,ee):M.get(G,ee)}function K(G){return M.has(G)||(W?W.has___(G):!1)}var Q;p?Q=function(G,ee){return M.set(G,ee),M.has(G)||(W||(W=new y),W.set(G,ee)),this}:Q=function(G,ee){if($)try{M.set(G,ee)}catch{W||(W=new y),W.set___(G,ee)}else M.set(G,ee);return this};function J(G){var ee=!!M.delete(G);return W&&W.delete___(G)||ee}return Object.create(y.prototype,{get___:{value:F(Z)},has___:{value:F(K)},set___:{value:F(Q)},delete___:{value:F(J)},permitHostObjects___:{value:F(function(G){if(G===c)$=!0;else throw new Error("bogus call to permitHostObjects___")})}})}S.prototype=y.prototype,l.exports=S,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})})():(typeof Proxy<"u"&&(Proxy=void 0),l.exports=y)})()}),236:(function(l,u,c){var p=c(8284);l.exports=f;function f(){var v={};return function(h){if((typeof h!="object"||h===null)&&typeof h!="function")throw new Error("Weakmap-shim: Key must be object");var m=h.valueOf(v);return m&&m.identity===v?m:p(h,v)}}}),8284:(function(l){l.exports=u;function u(c,p){var f={identity:p},v=c.valueOf;return Object.defineProperty(c,"valueOf",{value:function(h){return h!==p?v.apply(this,arguments):f},writable:!0}),f}}),606:(function(l,u,c){var p=c(236);l.exports=f;function f(){var v=p();return{get:function(h,m){var _=v(h);return _.hasOwnProperty("value")?_.value:m},set:function(h,m){return v(h).value=m,this},has:function(h){return"value"in v(h)},delete:function(h){return delete v(h).value}}}}),3349:(function(l){function u(){return function(m,_,x,A,E,D){var g=m[0],C=x[0],I=[0],N=C;A|=0;var F=0,k=C;for(F=0;F<g;++F){{var P=_[A]-D,T=_[A+N]-D;P>=0!=T>=0&&E.push(I[0]+.5+.5*(P+T)/(P-T))}A+=k,++I[0]}}}function c(){return u()}var p=c;function f(m){var _={};return function(A,E,D){var g=A.dtype,C=A.order,I=[g,C.join()].join(),N=_[I];return N||(_[I]=N=m([g,C])),N(A.shape.slice(0),A.data,A.stride,A.offset|0,E,D)}}function v(m){return f(p.bind(void 0,m))}function h(m){return v({funcName:m.funcName})}l.exports=h({funcName:"zeroCrossings"})}),781:(function(l,u,c){l.exports=f;var p=c(3349);function f(v,h){var m=[];return h=+h||0,p(v.hi(v.shape[0]-1),m,h),m}}),7790:(function(){})},R={};function O(l){var u=R[l];if(u!==void 0)return u.exports;var c=R[l]={id:l,loaded:!1,exports:{}};return w[l].call(c.exports,c,c.exports,O),c.loaded=!0,c.exports}(function(){O.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})()})(),(function(){O.nmd=function(l){return l.paths=[],l.children||(l.children=[]),l}})();var z=O(1964);le.exports=z})()}}),_be=U({"node_modules/color-name/index.js"(pe,le){le.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]}}}),_Ke=U({"node_modules/color-normalize/node_modules/color-parse/index.js"(pe,le){var w=_be();le.exports=O;var R={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function O(z){var l,u=[],c=1,p;if(typeof z=="string")if(z=z.toLowerCase(),w[z])u=w[z].slice(),p="rgb";else if(z==="transparent")c=0,p="rgb",u=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(z)){var f=z.slice(1),v=f.length,h=v<=4;c=1,h?(u=[parseInt(f[0]+f[0],16),parseInt(f[1]+f[1],16),parseInt(f[2]+f[2],16)],v===4&&(c=parseInt(f[3]+f[3],16)/255)):(u=[parseInt(f[0]+f[1],16),parseInt(f[2]+f[3],16),parseInt(f[4]+f[5],16)],v===8&&(c=parseInt(f[6]+f[7],16)/255)),u[0]||(u[0]=0),u[1]||(u[1]=0),u[2]||(u[2]=0),p="rgb"}else if(l=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(z)){var m=l[1],_=m==="rgb",f=m.replace(/a$/,"");p=f;var v=f==="cmyk"?4:f==="gray"?1:3;u=l[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(E,D){if(/%$/.test(E))return D===v?parseFloat(E)/100:f==="rgb"?parseFloat(E)*255/100:parseFloat(E);if(f[D]==="h"){if(/deg$/.test(E))return parseFloat(E);if(R[E]!==void 0)return R[E]}return parseFloat(E)}),m===f&&u.push(1),c=_||u[v]===void 0?1:u[v],u=u.slice(0,v)}else z.length>10&&/[0-9](?:\s|\/)/.test(z)&&(u=z.match(/([0-9]+)/g).map(function(x){return parseFloat(x)}),p=z.match(/([a-z])/ig).join("").toLowerCase());else isNaN(z)?Array.isArray(z)||z.length?(u=[z[0],z[1],z[2]],p="rgb",c=z.length===4?z[3]:1):z instanceof Object&&(z.r!=null||z.red!=null||z.R!=null?(p="rgb",u=[z.r||z.red||z.R||0,z.g||z.green||z.G||0,z.b||z.blue||z.B||0]):(p="hsl",u=[z.h||z.hue||z.H||0,z.s||z.saturation||z.S||0,z.l||z.lightness||z.L||z.b||z.brightness]),c=z.a||z.alpha||z.opacity||1,z.opacity!=null&&(c/=100)):(p="rgb",u=[z>>>16,(z&65280)>>>8,z&255]);return{space:p,values:u,alpha:c}}}}),wKe=U({"node_modules/color-normalize/node_modules/color-rgba/index.js"(pe,le){var w=_Ke();le.exports=function(z){Array.isArray(z)&&z.raw&&(z=String.raw.apply(null,arguments));var l,u=w(z);if(!u.space)return[];var c=[0,0,0],p=u.space[0]==="h"?[360,100,100]:[255,255,255];return l=Array(3),l[0]=Math.min(Math.max(u.values[0],c[0]),p[0]),l[1]=Math.min(Math.max(u.values[1],c[1]),p[1]),l[2]=Math.min(Math.max(u.values[2],c[2]),p[2]),u.space[0]==="h"&&(l=R(l)),l.push(Math.min(Math.max(u.alpha,0),1)),l};function R(O){var z=O[0]/360,l=O[1]/100,u=O[2]/100,c,p,f,v,h,m=0;if(l===0)return h=u*255,[h,h,h];for(p=u<.5?u*(1+l):u+l-u*l,c=2*u-p,v=[0,0,0];m<3;)f=z+1/3*-(m-1),f<0?f++:f>1&&f--,h=6*f<1?c+(p-c)*6*f:2*f<1?p:3*f<2?c+(p-c)*(2/3-f)*6:c,v[m++]=h*255;return v}}}),FU=U({"node_modules/clamp/index.js"(pe,le){le.exports=w;function w(R,O,z){return O<z?R<O?O:R>z?z:R:R<z?z:R>O?O:R}}}),XZ=U({"node_modules/dtype/index.js"(pe,le){le.exports=function(w){switch(w){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}}}}),H4=U({"node_modules/color-normalize/index.js"(pe,le){var w=wKe(),R=FU(),O=XZ();le.exports=function(u,c){(c==="float"||!c)&&(c="array"),c==="uint"&&(c="uint8"),c==="uint_clamped"&&(c="uint8_clamped");var p=O(c),f=new p(4),v=c!=="uint8"&&c!=="uint8_clamped";return(!u.length||typeof u=="string")&&(u=w(u),u[0]/=255,u[1]/=255,u[2]/=255),z(u)?(f[0]=u[0],f[1]=u[1],f[2]=u[2],f[3]=u[3]!=null?u[3]:255,v&&(f[0]/=255,f[1]/=255,f[2]/=255,f[3]/=255),f):(v?(f[0]=u[0],f[1]=u[1],f[2]=u[2],f[3]=u[3]!=null?u[3]:1):(f[0]=R(Math.floor(u[0]*255),0,255),f[1]=R(Math.floor(u[1]*255),0,255),f[2]=R(Math.floor(u[2]*255),0,255),f[3]=u[3]==null?255:R(Math.floor(u[3]*255),0,255)),f)};function z(l){return!!(l instanceof Uint8Array||l instanceof Uint8ClampedArray||Array.isArray(l)&&(l[0]>1||l[0]===0)&&(l[1]>1||l[1]===0)&&(l[2]>1||l[2]===0)&&(!l[3]||l[3]>1))}}}),kI=U({"src/lib/str2rgbarray.js"(pe,le){var w=H4();function R(O){return O?w(O):[0,0,0,1]}le.exports=R}}),II=U({"src/lib/gl_format_color.js"(pe,le){var w=_t(),R=or(),O=H4(),z=vd(),l=jn().defaultLine,u=dr().isArrayOrTypedArray,c=O(l),p=1;function f(x,A){var E=x;return E[3]*=A,E}function v(x){if(w(x))return c;var A=O(x);return A.length?A:c}function h(x){return w(x)?x:p}function m(x,A,E){var D=x.color;D&&D._inputArray&&(D=D._inputArray);var g=u(D),C=u(A),I=z.extractOpts(x),N=[],F,k,P,T,y;if(I.colorscale!==void 0?F=z.makeColorScaleFuncFromTrace(x):F=v,g?k=function(M,W){return M[W]===void 0?c:O(F(M[W]))}:k=v,C?P=function(M,W){return M[W]===void 0?p:h(M[W])}:P=h,g||C)for(var S=0;S<E;S++)T=k(D,S),y=P(A,S),N[S]=f(T,y);else N=f(O(D),A);return N}function _(x){var A=z.extractOpts(x),E=A.colorscale;return A.reversescale&&(E=z.flipScale(A.colorscale)),E.map(function(D){var g=D[0],C=R(D[1]),I=C.toRgb();return{index:g,rgb:[I.r,I.g,I.b,I.a]}})}le.exports={formatColor:m,parseColorScale:_}}}),wbe=U({"src/constants/gl3d_dashes.js"(pe,le){le.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]}}}),ZZ=U({"src/constants/gl3d_markers.js"(pe,le){le.exports={circle:"●","circle-open":"○",square:"■","square-open":"□",diamond:"◆","diamond-open":"◇",cross:"+",x:"❌"}}}),SKe=U({"src/traces/scatter3d/calc_errors.js"(pe,le){var w=Mi();function R(l,u,c,p){if(!u||!u.visible)return null;for(var f=w.getComponentMethod("errorbars","makeComputeError")(u),v=new Array(l.length),h=0;h<l.length;h++){var m=f(+l[h],h);if(p.type==="log"){var _=p.c2l(l[h]),x=l[h]-m[0],A=l[h]+m[1];if(v[h]=[(p.c2l(x,!0)-_)*c,(p.c2l(A,!0)-_)*c],x>0){var E=p.c2l(x);p._lowerLogErrorBound||(p._lowerLogErrorBound=E),p._lowerErrorBound=Math.min(p._lowerLogErrorBound,E)}}else v[h]=[-m[0]*c,m[1]*c]}return v}function O(l){for(var u=0;u<l.length;u++)if(l[u])return l[u].length;return 0}function z(l,u,c){var p=[R(l.x,l.error_x,u[0],c.xaxis),R(l.y,l.error_y,u[1],c.yaxis),R(l.z,l.error_z,u[2],c.zaxis)],f=O(p);if(f===0)return null;for(var v=new Array(f),h=0;h<f;h++){for(var m=[[0,0,0],[0,0,0]],_=0;_<3;_++)if(p[_])for(var x=0;x<2;x++)m[x][_]=p[_][h][x];v[h]=m}return v}le.exports=z}}),TKe=U({"src/traces/scatter3d/convert.js"(pe,le){var w=Fx().gl_line3d,R=Fx().gl_scatter3d,O=Fx().gl_error3d,z=Fx().gl_mesh3d,l=Fx().delaunay_triangulate,u=ii(),c=kI(),p=II().formatColor,f=$_(),v=wbe(),h=ZZ(),m=Yu(),_=v0().appendArrayPointValue,x=SKe();function A(W,$){this.scene=W,this.uid=$,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 E=A.prototype;E.handlePick=function(W){if(W.object&&(W.object===this.linePlot||W.object===this.delaunayMesh||W.object===this.textMarkers||W.object===this.scatterPlot)){var $=W.index=W.data.index;return W.object.highlight&&W.object.highlight(null),this.scatterPlot&&(W.object=this.scatterPlot,this.scatterPlot.highlight(W.data)),W.textLabel="",this.textLabels&&(u.isArrayOrTypedArray(this.textLabels)?(this.textLabels[$]||this.textLabels[$]===0)&&(W.textLabel=this.textLabels[$]):W.textLabel=this.textLabels),W.traceCoordinate=[this.data.x[$],this.data.y[$],this.data.z[$]],!0}};function D(W,$,Z){var K=(Z+1)%3,Q=(Z+2)%3,J=[],G=[],ee;for(ee=0;ee<W.length;++ee){var re=W[ee];isNaN(re[K])||!isFinite(re[K])||isNaN(re[Q])||!isFinite(re[Q])||(J.push([re[K],re[Q]]),G.push(ee))}var fe=l(J);for(ee=0;ee<fe.length;++ee)for(var we=fe[ee],Oe=0;Oe<we.length;++Oe)we[Oe]=G[we[Oe]];return{positions:W,cells:fe,meshColor:$}}function g(W){for(var $=[0,0,0],Z=[[0,0,0],[0,0,0],[0,0,0]],K=[1,1,1],Q=0;Q<3;Q++){var J=W[Q];J&&J.copy_zstyle!==!1&&W[2].visible!==!1&&(J=W[2]),!(!J||!J.visible)&&($[Q]=J.width/2,Z[Q]=c(J.color),K[Q]=J.thickness)}return{capSize:$,color:Z,lineWidth:K}}function C(W){return W==null?0:W.indexOf("left")>-1?-1:W.indexOf("right")>-1?1:0}function I(W){return W==null?0:W.indexOf("top")>-1?-1:W.indexOf("bottom")>-1?1:0}function N(W){var $=0,Z=0,K=[$,Z];if(Array.isArray(W))for(var Q=0;Q<W.length;Q++)K[Q]=[$,Z],W[Q]&&(K[Q][0]=C(W[Q]),K[Q][1]=I(W[Q]));else K[0]=C(W),K[1]=I(W);return K}function F(W,$){return $(W*4)}function k(W){return h[W]}function P(W,$,Z,K,Q){var J=null;if(u.isArrayOrTypedArray(W)){J=[];for(var G=0;G<$;G++)W[G]===void 0?J[G]=K:J[G]=Z(W[G],Q)}else J=Z(W,u.identity);return J}function T(W,$){var Z=[],K=W.fullSceneLayout,Q=W.dataScale,J=K.xaxis,G=K.yaxis,ee=K.zaxis,re=$.marker,fe=$.line,we=$.x||[],Oe=$.y||[],ke=$.z||[],Le=we.length,oe=$.xcalendar,be=$.ycalendar,_e=$.zcalendar,he,De,xe,se,Ee,Te;for(Ee=0;Ee<Le;Ee++)he=J.d2l(we[Ee],0,oe)*Q[0],De=G.d2l(Oe[Ee],0,be)*Q[1],xe=ee.d2l(ke[Ee],0,_e)*Q[2],Z[Ee]=[he,De,xe];if(Array.isArray($.text))Te=$.text;else if(u.isTypedArray($.text))Te=Array.from($.text);else if($.text!==void 0)for(Te=new Array(Le),Ee=0;Ee<Le;Ee++)Te[Ee]=$.text;function Be(Jt,Ut){var kr=K[Jt];return m.tickText(kr,kr.d2l(Ut),!0).text}var tt=$.texttemplate;if(tt){var at=W.fullLayout,gt=at._d3locale,pt=Array.isArray(tt),Rt=pt?Math.min(tt.length,Le):Le,$t=pt?function(Jt){return tt[Jt]}:function(){return tt};for(Te=new Array(Rt),Ee=0;Ee<Rt;Ee++){var Wt={x:we[Ee],y:Oe[Ee],z:ke[Ee]},Ht={xLabel:Be("xaxis",we[Ee]),yLabel:Be("yaxis",Oe[Ee]),zLabel:Be("zaxis",ke[Ee])},Ft={};_(Ft,$,Ee);var st=$._meta||{};Te[Ee]=u.texttemplateString($t(Ee),Ht,gt,Ft,Wt,st)}}if(se={position:Z,mode:$.mode,text:Te},"line"in $&&(se.lineColor=p(fe,1,Le),se.lineWidth=fe.width,se.lineDashes=fe.dash),"marker"in $){var rt=f($);se.scatterColor=p(re,1,Le),se.scatterSize=P(re.size,Le,F,20,rt),se.scatterMarker=P(re.symbol,Le,k,"●"),se.scatterLineWidth=re.line.width,se.scatterLineColor=p(re.line,1,Le),se.scatterAngle=0}"textposition"in $&&(se.textOffset=N($.textposition),se.textColor=p($.textfont,1,Le),se.textSize=P($.textfont.size,Le,u.identity,12),se.textFontFamily=$.textfont.family,se.textFontWeight=$.textfont.weight,se.textFontStyle=$.textfont.style,se.textFontVariant=$.textfont.variant,se.textAngle=0);var Ue=["x","y","z"];for(se.project=[!1,!1,!1],se.projectScale=[1,1,1],se.projectOpacity=[1,1,1],Ee=0;Ee<3;++Ee){var xt=$.projection[Ue[Ee]];(se.project[Ee]=xt.show)&&(se.projectOpacity[Ee]=xt.opacity,se.projectScale[Ee]=xt.scale)}se.errorBounds=x($,Q,K);var Gt=g([$.error_x,$.error_y,$.error_z]);return se.errorColor=Gt.color,se.errorLineWidth=Gt.lineWidth,se.errorCapSize=Gt.capSize,se.delaunayAxis=$.surfaceaxis,se.delaunayColor=c($.surfacecolor),se}function y(W){if(u.isArrayOrTypedArray(W)){var $=W[0];return u.isArrayOrTypedArray($)&&(W=$),"rgb("+W.slice(0,3).map(function(Z){return Math.round(Z*255)})+")"}return null}function S(W){return u.isArrayOrTypedArray(W)?W.length===4&&typeof W[0]=="number"?y(W):W.map(y):null}E.update=function(W){var $=this.scene.glplot.gl,Z,K,Q,J,G=v.solid;this.data=W;var ee=T(this.scene,W);"mode"in ee&&(this.mode=ee.mode),"lineDashes"in ee&&ee.lineDashes in v&&(G=v[ee.lineDashes]),this.color=S(ee.scatterColor)||S(ee.lineColor),this.dataPoints=ee.position,Z={gl:this.scene.glplot.gl,position:ee.position,color:ee.lineColor,lineWidth:ee.lineWidth||1,dashes:G[0],dashScale:G[1],opacity:W.opacity,connectGaps:W.connectgaps},this.mode.indexOf("lines")!==-1?this.linePlot?this.linePlot.update(Z):(this.linePlot=w(Z),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 re=W.opacity;if(W.marker&&W.marker.opacity!==void 0&&(re*=W.marker.opacity),K={gl:this.scene.glplot.gl,position:ee.position,color:ee.scatterColor,size:ee.scatterSize,glyph:ee.scatterMarker,opacity:re,orthographic:!0,lineWidth:ee.scatterLineWidth,lineColor:ee.scatterLineColor,project:ee.project,projectScale:ee.projectScale,projectOpacity:ee.projectOpacity},this.mode.indexOf("markers")!==-1?this.scatterPlot?this.scatterPlot.update(K):(this.scatterPlot=R(K),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),J={gl:this.scene.glplot.gl,position:ee.position,glyph:ee.text,color:ee.textColor,size:ee.textSize,angle:ee.textAngle,alignment:ee.textOffset,font:ee.textFontFamily,fontWeight:ee.textFontWeight,fontStyle:ee.textFontStyle,fontVariant:ee.textFontVariant,orthographic:!0,lineWidth:0,project:!1,opacity:W.opacity},this.textLabels=W.hovertext||W.text,this.mode.indexOf("text")!==-1?this.textMarkers?this.textMarkers.update(J):(this.textMarkers=R(J),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),Q={gl:this.scene.glplot.gl,position:ee.position,color:ee.errorColor,error:ee.errorBounds,lineWidth:ee.errorLineWidth,capSize:ee.errorCapSize,opacity:W.opacity},this.errorBars?ee.errorBounds?this.errorBars.update(Q):(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose(),this.errorBars=null):ee.errorBounds&&(this.errorBars=O(Q),this.errorBars._trace=this,this.scene.glplot.add(this.errorBars)),ee.delaunayAxis>=0){var fe=D(ee.position,ee.delaunayColor,ee.delaunayAxis);fe.opacity=W.opacity,this.delaunayMesh?this.delaunayMesh.update(fe):(fe.gl=$,this.delaunayMesh=z(fe),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)},E.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 M(W,$){var Z=new A(W,$.uid);return Z.update($),Z}le.exports=M}}),Sbe=U({"src/traces/scatter3d/attributes.js"(pe,le){var w=Kc(),R=Ir(),O=Jd(),z=Wp().axisHoverFormat,l=Js().hovertemplateAttrs,u=Js().texttemplateAttrs,c=Jn(),p=wbe(),f=ZZ(),v=Ar().extendFlat,h=zl().overrideAll,m=pa(),_=w.line,x=w.marker,A=x.line,E=v({width:_.width,dash:{valType:"enumerated",values:m(p),dflt:"solid"}},O("line"));function D(C){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 g=le.exports=h({x:w.x,y:w.y,z:{valType:"data_array"},text:v({},w.text,{}),texttemplate:u({},{}),hovertext:v({},w.hovertext,{}),hovertemplate:l(),xhoverformat:z("x"),yhoverformat:z("y"),zhoverformat:z("z"),mode:v({},w.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:D(),y:D(),z:D()},connectgaps:w.connectgaps,line:E,marker:v({symbol:{valType:"enumerated",values:m(f),dflt:"circle",arrayOk:!0},size:v({},x.size,{dflt:8}),sizeref:x.sizeref,sizemin:x.sizemin,sizemode:x.sizemode,opacity:v({},x.opacity,{arrayOk:!1}),colorbar:x.colorbar,line:v({width:v({},A.width,{arrayOk:!1})},O("marker.line"))},O("marker")),textposition:v({},w.textposition,{dflt:"top center"}),textfont:R({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:c.opacity,hoverinfo:v({},c.hoverinfo)},"calc","nested");g.x.editType=g.y.editType=g.z.editType="calc+clearAxisTypes"}}),EKe=U({"src/traces/scatter3d/defaults.js"(pe,le){var w=Mi(),R=ii(),O=Qd(),z=r0(),l=Xy(),u=y0(),c=Sbe();le.exports=function(v,h,m,_){function x(F,k){return R.coerce(v,h,c,F,k)}var A=p(v,h,x,_);if(!A){h.visible=!1;return}x("text"),x("hovertext"),x("hovertemplate"),x("xhoverformat"),x("yhoverformat"),x("zhoverformat"),x("mode"),O.hasMarkers(h)&&z(v,h,m,_,x,{noSelect:!0,noAngle:!0}),O.hasLines(h)&&(x("connectgaps"),l(v,h,m,_,x)),O.hasText(h)&&(x("texttemplate"),u(v,h,_,x,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var E=(h.line||{}).color,D=(h.marker||{}).color;x("surfaceaxis")>=0&&x("surfacecolor",E||D);for(var g=["x","y","z"],C=0;C<3;++C){var I="projection."+g[C];x(I+".show")&&(x(I+".opacity"),x(I+".scale"))}var N=w.getComponentMethod("errorbars","supplyDefaults");N(v,h,E||D||m,{axis:"z"}),N(v,h,E||D||m,{axis:"y",inherit:"z"}),N(v,h,E||D||m,{axis:"x",inherit:"z"})};function p(f,v,h,m){var _=0,x=h("x"),A=h("y"),E=h("z"),D=w.getComponentMethod("calendars","handleTraceDefaults");return D(f,v,["x","y","z"],m),x&&A&&E&&(_=Math.min(x.length,A.length,E.length),v._length=v._xlength=v._ylength=v._zlength=_),_}}}),AKe=U({"src/traces/scatter3d/calc.js"(pe,le){var w=zm(),R=b0();le.exports=function(z,l){var u=[{x:!1,y:!1,trace:l,t:{}}];return w(u,l),R(z,l),u}}}),CKe=U({"node_modules/get-canvas-context/index.js"(pe,le){le.exports=w;function w(R,O){if(typeof R!="string")throw new TypeError("must specify type string");if(O=O||{},typeof document>"u"&&!O.canvas)return null;var z=O.canvas||document.createElement("canvas");typeof O.width=="number"&&(z.width=O.width),typeof O.height=="number"&&(z.height=O.height);var l=O,u;try{var c=[R];R.indexOf("webgl")===0&&c.push("experimental-"+R);for(var p=0;p<c.length;p++)if(u=z.getContext(c[p],l),u)return u}catch{u=null}return u||null}}}),MKe=U({"node_modules/webgl-context/index.js"(pe,le){var w=CKe();le.exports=function(O){return w("webgl",O)}}}),Tbe=U({"src/lib/show_no_webgl_msg.js"(pe,le){var w=Lr(),R=function(){};le.exports=function(z){for(var l in z)typeof z[l]=="function"&&(z[l]=R);z.destroy=function(){z.container.parentNode.removeChild(z.container)};var u=document.createElement("div");u.className="no-webgl",u.style.cursor="pointer",u.style.fontSize="24px",u.style.color=w.defaults[0],u.style.position="absolute",u.style.left=u.style.top="0px",u.style.width=u.style.height="100%",u.style["background-color"]=w.lightLine,u.style["z-index"]=30;var c=document.createElement("p");return c.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",c.style.position="relative",c.style.top="50%",c.style.left="50%",c.style.height="30%",c.style.width="50%",c.style.margin="-15% 0 0 -25%",u.appendChild(c),z.container.appendChild(u),z.container.style.background="#FFFFFF",z.container.onclick=function(){window.open("https://get.webgl.org")},!1}}}),RKe=U({"src/plots/gl3d/layout/convert.js"(pe,le){var w=kI(),R=ii(),O=["xaxis","yaxis","zaxis"];function z(){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 l=z.prototype;l.merge=function(c,p){for(var f=this,v=0;v<3;++v){var h=p[O[v]];if(!h.visible){f.tickEnable[v]=!1,f.labelEnable[v]=!1,f.lineEnable[v]=!1,f.lineTickEnable[v]=!1,f.gridEnable[v]=!1,f.zeroEnable[v]=!1,f.backgroundEnable[v]=!1;continue}f.labels[v]=c._meta?R.templateString(h.title.text,c._meta):h.title.text,"font"in h.title&&(h.title.font.color&&(f.labelColor[v]=w(h.title.font.color)),h.title.font.family&&(f.labelFont[v]=h.title.font.family),h.title.font.size&&(f.labelSize[v]=h.title.font.size),h.title.font.weight&&(f.labelFontWeight[v]=h.title.font.weight),h.title.font.style&&(f.labelFontStyle[v]=h.title.font.style),h.title.font.variant&&(f.labelFontVariant[v]=h.title.font.variant)),"showline"in h&&(f.lineEnable[v]=h.showline),"linecolor"in h&&(f.lineColor[v]=w(h.linecolor)),"linewidth"in h&&(f.lineWidth[v]=h.linewidth),"showgrid"in h&&(f.gridEnable[v]=h.showgrid),"gridcolor"in h&&(f.gridColor[v]=w(h.gridcolor)),"gridwidth"in h&&(f.gridWidth[v]=h.gridwidth),h.type==="log"?f.zeroEnable[v]=!1:"zeroline"in h&&(f.zeroEnable[v]=h.zeroline),"zerolinecolor"in h&&(f.zeroLineColor[v]=w(h.zerolinecolor)),"zerolinewidth"in h&&(f.zeroLineWidth[v]=h.zerolinewidth),"ticks"in h&&h.ticks?f.lineTickEnable[v]=!0:f.lineTickEnable[v]=!1,"ticklen"in h&&(f.lineTickLength[v]=f._defaultLineTickLength[v]=h.ticklen),"tickcolor"in h&&(f.lineTickColor[v]=w(h.tickcolor)),"tickwidth"in h&&(f.lineTickWidth[v]=h.tickwidth),"tickangle"in h&&(f.tickAngle[v]=h.tickangle==="auto"?-3600:Math.PI*-h.tickangle/180),"showticklabels"in h&&(f.tickEnable[v]=h.showticklabels),"tickfont"in h&&(h.tickfont.color&&(f.tickColor[v]=w(h.tickfont.color)),h.tickfont.family&&(f.tickFont[v]=h.tickfont.family),h.tickfont.size&&(f.tickSize[v]=h.tickfont.size),h.tickfont.weight&&(f.tickFontWeight[v]=h.tickfont.weight),h.tickfont.style&&(f.tickFontStyle[v]=h.tickfont.style),h.tickfont.variant&&(f.tickFontVariant[v]=h.tickfont.variant)),"mirror"in h?["ticks","all","allticks"].indexOf(h.mirror)!==-1?(f.lineTickMirror[v]=!0,f.lineMirror[v]=!0):h.mirror===!0?(f.lineTickMirror[v]=!1,f.lineMirror[v]=!0):(f.lineTickMirror[v]=!1,f.lineMirror[v]=!1):f.lineMirror[v]=!1,"showbackground"in h&&h.showbackground!==!1?(f.backgroundEnable[v]=!0,f.backgroundColor[v]=w(h.backgroundcolor)):f.backgroundEnable[v]=!1}};function u(c,p){var f=new z;return f.merge(c,p),f}le.exports=u}}),kKe=U({"src/plots/gl3d/layout/spikes.js"(pe,le){var w=kI(),R=["xaxis","yaxis","zaxis"];function O(){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 z=O.prototype;z.merge=function(u){for(var c=0;c<3;++c){var p=u[R[c]];if(!p.visible){this.enabled[c]=!1,this.drawSides[c]=!1;continue}this.enabled[c]=p.showspikes,this.colors[c]=w(p.spikecolor),this.drawSides[c]=p.spikesides,this.lineWidth[c]=p.spikethickness}};function l(u){var c=new O;return c.merge(u),c}le.exports=l}}),IKe=U({"src/plots/gl3d/layout/tick_marks.js"(pe,le){le.exports=l;var w=Yu(),R=ii(),O=["xaxis","yaxis","zaxis"];function z(u){for(var c=new Array(3),p=0;p<3;++p){for(var f=u[p],v=new Array(f.length),h=0;h<f.length;++h)v[h]=f[h].x;c[p]=v}return c}function l(u){for(var c=u.axesOptions,p=u.glplot.axesPixels,f=u.fullSceneLayout,v=[[],[],[]],h=0;h<3;++h){var m=f[O[h]];if(m._length=(p[h].hi-p[h].lo)*p[h].pixelsPerDataUnit/u.dataScale[h],Math.abs(m._length)===1/0||isNaN(m._length))v[h]=[];else{m._input_range=m.range.slice(),m.range[0]=p[h].lo/u.dataScale[h],m.range[1]=p[h].hi/u.dataScale[h],m._m=1/(u.dataScale[h]*p[h].pixelsPerDataUnit),m.range[0]===m.range[1]&&(m.range[0]-=1,m.range[1]+=1);var _=m.tickmode;if(m.tickmode==="auto"){m.tickmode="linear";var x=m.nticks||R.constrain(m._length/40,4,9);w.autoTicks(m,Math.abs(m.range[1]-m.range[0])/x)}for(var A=w.calcTicks(m,{msUTC:!0}),E=0;E<A.length;++E)A[E].x=A[E].x*u.dataScale[h],m.type==="date"&&(A[E].text=A[E].text.replace(/\<br\>/g," "));v[h]=A,m.tickmode=_}}c.ticks=v;for(var h=0;h<3;++h){.5*(u.glplot.bounds[0][h]+u.glplot.bounds[1][h]);for(var E=0;E<2;++E)c.bounds[E][h]=u.glplot.bounds[E][h]}u.contourLevels=z(v)}}}),PKe=U({"src/plots/gl3d/scene.js"(pe,le){var w=Fx().gl_plot3d,R=w.createCamera,O=w.createScene,z=MKe(),l=gA(),u=Mi(),c=ii(),p=c.preserveDrawingBuffer(),f=Yu(),v=Dp(),h=kI(),m=Tbe(),_=OE(),x=RKe(),A=kKe(),E=IKe(),D=gx().applyAutorangeOptions,g,C,I=!1;function N(Z,K){var Q=document.createElement("div"),J=Z.container;this.graphDiv=Z.graphDiv;var G=document.createElementNS("http://www.w3.org/2000/svg","svg");G.style.position="absolute",G.style.top=G.style.left="0px",G.style.width=G.style.height="100%",G.style["z-index"]=20,G.style["pointer-events"]="none",Q.appendChild(G),this.svgContainer=G,Q.id=Z.id,Q.style.position="absolute",Q.style.top=Q.style.left="0px",Q.style.width=Q.style.height="100%",J.appendChild(Q),this.fullLayout=K,this.id=Z.id||"scene",this.fullSceneLayout=K[this.id],this.plotArgs=[[],{},{}],this.axesOptions=x(K,K[this.id]),this.spikeOptions=A(K[this.id]),this.container=Q,this.staticMode=!!Z.staticPlot,this.pixelRatio=this.pixelRatio||Z.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=u.getComponentMethod("annotations3d","convert"),this.drawAnnotations=u.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var F=N.prototype;F.prepareOptions=function(){var Z=this,K={canvas:Z.canvas,gl:Z.gl,glOptions:{preserveDrawingBuffer:p,premultipliedAlpha:!0,antialias:!0},container:Z.container,axes:Z.axesOptions,spikes:Z.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:Z.camera,pixelRatio:Z.pixelRatio};if(Z.staticMode){if(!C&&(g=document.createElement("canvas"),C=z({canvas:g,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!C))throw new Error("error creating static canvas/context for image server");K.gl=C,K.canvas=g}return K};var k=!0;F.tryCreatePlot=function(){var Z=this,K=Z.prepareOptions(),Q=!0;try{Z.glplot=O(K)}catch{if(Z.staticMode||!k||p)Q=!1;else{c.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{p=K.glOptions.preserveDrawingBuffer=!0,Z.glplot=O(K)}catch{p=K.glOptions.preserveDrawingBuffer=!1,Q=!1}}}return k=!1,Q},F.initializeGLCamera=function(){var Z=this,K=Z.fullSceneLayout.camera,Q=K.projection.type==="orthographic";Z.camera=R(Z.container,{center:[K.center.x,K.center.y,K.center.z],eye:[K.eye.x,K.eye.y,K.eye.z],up:[K.up.x,K.up.y,K.up.z],_ortho:Q,zoomMin:.01,zoomMax:100,mode:"orbit"})},F.initializeGLPlot=function(){var Z=this;Z.initializeGLCamera();var K=Z.tryCreatePlot();if(!K)return m(Z);Z.traces={},Z.make4thDimension();var Q=Z.graphDiv,J=Q.layout,G=function(){var re={};return Z.isCameraChanged(J)&&(re[Z.id+".camera"]=Z.getCamera()),Z.isAspectChanged(J)&&(re[Z.id+".aspectratio"]=Z.glplot.getAspectratio(),J[Z.id].aspectmode!=="manual"&&(Z.fullSceneLayout.aspectmode=J[Z.id].aspectmode=re[Z.id+".aspectmode"]="manual")),re},ee=function(re){if(re.fullSceneLayout.dragmode!==!1){var fe=G();re.saveLayout(J),re.graphDiv.emit("plotly_relayout",fe)}};return Z.glplot.canvas&&(Z.glplot.canvas.addEventListener("mouseup",function(){ee(Z)}),Z.glplot.canvas.addEventListener("touchstart",function(){I=!0}),Z.glplot.canvas.addEventListener("wheel",function(re){if(Q._context._scrollZoom.gl3d){if(Z.camera._ortho){var fe=re.deltaX>re.deltaY?1.1:.9090909090909091,we=Z.glplot.getAspectratio();Z.glplot.setAspectratio({x:fe*we.x,y:fe*we.y,z:fe*we.z})}ee(Z)}},l?{passive:!1}:!1),Z.glplot.canvas.addEventListener("mousemove",function(){if(Z.fullSceneLayout.dragmode!==!1&&Z.camera.mouseListener.buttons!==0){var re=G();Z.graphDiv.emit("plotly_relayouting",re)}}),Z.staticMode||Z.glplot.canvas.addEventListener("webglcontextlost",function(re){Q&&Q.emit&&Q.emit("plotly_webglcontextlost",{event:re,layer:Z.id})},!1)),Z.glplot.oncontextloss=function(){Z.recoverContext()},Z.glplot.onrender=function(){Z.render()},!0},F.render=function(){var Z=this,K=Z.graphDiv,Q,J=Z.svgContainer,G=Z.container.getBoundingClientRect();K._fullLayout._calcInverseTransform(K);var ee=K._fullLayout._invScaleX,re=K._fullLayout._invScaleY,fe=G.width*ee,we=G.height*re;J.setAttributeNS(null,"viewBox","0 0 "+fe+" "+we),J.setAttributeNS(null,"width",fe),J.setAttributeNS(null,"height",we),E(Z),Z.glplot.axes.update(Z.axesOptions);for(var Oe=Object.keys(Z.traces),ke=null,Le=Z.glplot.selection,oe=0;oe<Oe.length;++oe)Q=Z.traces[Oe[oe]],Q.data.hoverinfo!=="skip"&&Q.handlePick(Le)&&(ke=Q),Q.setContourLevels&&Q.setContourLevels();function be(Rt,$t,Wt){var Ht=Z.fullSceneLayout[Rt+"axis"];return Ht.type!=="log"&&($t=Ht.d2l($t)),f.hoverLabelText(Ht,$t,Wt)}if(ke!==null){var _e=_(Z.glplot.cameraParams,Le.dataCoordinate);Q=ke.data;var he=K._fullData[Q.index],De=Le.index,xe={xLabel:be("x",Le.traceCoordinate[0],Q.xhoverformat),yLabel:be("y",Le.traceCoordinate[1],Q.yhoverformat),zLabel:be("z",Le.traceCoordinate[2],Q.zhoverformat)},se=v.castHoverinfo(he,Z.fullLayout,De),Ee=(se||"").split("+"),Te=se&&se==="all";!he.hovertemplate&&!Te&&(Ee.indexOf("x")===-1&&(xe.xLabel=void 0),Ee.indexOf("y")===-1&&(xe.yLabel=void 0),Ee.indexOf("z")===-1&&(xe.zLabel=void 0),Ee.indexOf("text")===-1&&(Le.textLabel=void 0),Ee.indexOf("name")===-1&&(ke.name=void 0));var Be,tt=[];Q.type==="cone"||Q.type==="streamtube"?(xe.uLabel=be("x",Le.traceCoordinate[3],Q.uhoverformat),(Te||Ee.indexOf("u")!==-1)&&tt.push("u: "+xe.uLabel),xe.vLabel=be("y",Le.traceCoordinate[4],Q.vhoverformat),(Te||Ee.indexOf("v")!==-1)&&tt.push("v: "+xe.vLabel),xe.wLabel=be("z",Le.traceCoordinate[5],Q.whoverformat),(Te||Ee.indexOf("w")!==-1)&&tt.push("w: "+xe.wLabel),xe.normLabel=Le.traceCoordinate[6].toPrecision(3),(Te||Ee.indexOf("norm")!==-1)&&tt.push("norm: "+xe.normLabel),Q.type==="streamtube"&&(xe.divergenceLabel=Le.traceCoordinate[7].toPrecision(3),(Te||Ee.indexOf("divergence")!==-1)&&tt.push("divergence: "+xe.divergenceLabel)),Le.textLabel&&tt.push(Le.textLabel),Be=tt.join("<br>")):Q.type==="isosurface"||Q.type==="volume"?(xe.valueLabel=f.hoverLabelText(Z._mockAxis,Z._mockAxis.d2l(Le.traceCoordinate[3]),Q.valuehoverformat),tt.push("value: "+xe.valueLabel),Le.textLabel&&tt.push(Le.textLabel),Be=tt.join("<br>")):Be=Le.textLabel;var at={x:Le.traceCoordinate[0],y:Le.traceCoordinate[1],z:Le.traceCoordinate[2],data:he._input,fullData:he,curveNumber:he.index,pointNumber:De};v.appendArrayPointValue(at,he,De),Q._module.eventData&&(at=he._module.eventData(at,Le,he,{},De));var gt={points:[at]};if(Z.fullSceneLayout.hovermode){var pt=[];v.loneHover({trace:he,x:(.5+.5*_e[0]/_e[3])*fe,y:(.5-.5*_e[1]/_e[3])*we,xLabel:xe.xLabel,yLabel:xe.yLabel,zLabel:xe.zLabel,text:Be,name:ke.name,color:v.castHoverOption(he,De,"bgcolor")||ke.color,borderColor:v.castHoverOption(he,De,"bordercolor"),fontFamily:v.castHoverOption(he,De,"font.family"),fontSize:v.castHoverOption(he,De,"font.size"),fontColor:v.castHoverOption(he,De,"font.color"),nameLength:v.castHoverOption(he,De,"namelength"),textAlign:v.castHoverOption(he,De,"align"),hovertemplate:c.castOption(he,De,"hovertemplate"),hovertemplateLabels:c.extendFlat({},at,xe),eventData:[at]},{container:J,gd:K,inOut_bbox:pt}),at.bbox=pt[0]}Le.distance<5&&(Le.buttons||I)?K.emit("plotly_click",gt):K.emit("plotly_hover",gt),this.oldEventData=gt}else v.loneUnhover(J),this.oldEventData&&K.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;Z.drawAnnotations(Z)},F.recoverContext=function(){var Z=this;Z.glplot.dispose();var K=function(){if(Z.glplot.gl.isContextLost()){requestAnimationFrame(K);return}if(!Z.initializeGLPlot()){c.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}Z.plot.apply(Z,Z.plotArgs)};requestAnimationFrame(K)};var P=["xaxis","yaxis","zaxis"];function T(Z,K,Q){for(var J=Z.fullSceneLayout,G=0;G<3;G++){var ee=P[G],re=ee.charAt(0),fe=J[ee],we=K[re],Oe=K[re+"calendar"],ke=K["_"+re+"length"];if(!c.isArrayOrTypedArray(we))Q[0][G]=Math.min(Q[0][G],0),Q[1][G]=Math.max(Q[1][G],ke-1);else for(var Le,oe=0;oe<(ke||we.length);oe++)if(c.isArrayOrTypedArray(we[oe]))for(var be=0;be<we[oe].length;++be)Le=fe.d2l(we[oe][be],0,Oe),!isNaN(Le)&&isFinite(Le)&&(Q[0][G]=Math.min(Q[0][G],Le),Q[1][G]=Math.max(Q[1][G],Le));else Le=fe.d2l(we[oe],0,Oe),!isNaN(Le)&&isFinite(Le)&&(Q[0][G]=Math.min(Q[0][G],Le),Q[1][G]=Math.max(Q[1][G],Le))}}function y(Z,K){for(var Q=Z.fullSceneLayout,J=Q.annotations||[],G=0;G<3;G++)for(var ee=P[G],re=ee.charAt(0),fe=Q[ee],we=0;we<J.length;we++){var Oe=J[we];if(Oe.visible){var ke=fe.r2l(Oe[re]);!isNaN(ke)&&isFinite(ke)&&(K[0][G]=Math.min(K[0][G],ke),K[1][G]=Math.max(K[1][G],ke))}}}F.plot=function(Z,K,Q){var J=this;if(J.plotArgs=[Z,K,Q],!J.glplot.contextLost){var G,ee,re,fe,we,Oe,ke=K[J.id],Le=Q[J.id];J.fullLayout=K,J.fullSceneLayout=ke,J.axesOptions.merge(K,ke),J.spikeOptions.merge(ke),J.setViewport(ke),J.updateFx(ke.dragmode,ke.hovermode),J.camera.enableWheel=J.graphDiv._context._scrollZoom.gl3d,J.glplot.setClearColor(h(ke.bgcolor)),J.setConvert(we),Z?Array.isArray(Z)||(Z=[Z]):Z=[];var oe=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(re=0;re<Z.length;++re)G=Z[re],!(G.visible!==!0||G._length===0)&&T(this,G,oe);y(this,oe);var be=[1,1,1];for(fe=0;fe<3;++fe)oe[1][fe]===oe[0][fe]?be[fe]=1:be[fe]=1/(oe[1][fe]-oe[0][fe]);for(J.dataScale=be,J.convertAnnotations(this),re=0;re<Z.length;++re)G=Z[re],!(G.visible!==!0||G._length===0)&&(ee=J.traces[G.uid],ee?ee.data.type===G.type?ee.update(G):(ee.dispose(),ee=G._module.plot(this,G),J.traces[G.uid]=ee):(ee=G._module.plot(this,G),J.traces[G.uid]=ee),ee.name=G.name);var _e=Object.keys(J.traces);e:for(re=0;re<_e.length;++re){for(fe=0;fe<Z.length;++fe)if(Z[fe].uid===_e[re]&&Z[fe].visible===!0&&Z[fe]._length!==0)continue e;ee=J.traces[_e[re]],ee.dispose(),delete J.traces[_e[re]]}J.glplot.objects.sort(function(Jt,Ut){return Jt._trace.data.index-Ut._trace.data.index});var he=[[0,0,0],[0,0,0]],De={};for(re=0;re<3;++re){we=ke[P[re]],Oe=we.type,Oe in De?(De[Oe].acc*=be[re],De[Oe].count+=1):De[Oe]={acc:be[re],count:1};var xe;if(we.autorange){he[0][re]=1/0,he[1][re]=-1/0;var se=J.glplot.objects,Ee=J.fullSceneLayout.annotations||[],Te=we._name.charAt(0);for(fe=0;fe<se.length;fe++){var Be=se[fe],tt=Be.bounds,at=Be._trace.data._pad||0;Be.constructor.name==="ErrorBars"&&we._lowerLogErrorBound?he[0][re]=Math.min(he[0][re],we._lowerLogErrorBound):he[0][re]=Math.min(he[0][re],tt[0][re]/be[re]-at),he[1][re]=Math.max(he[1][re],tt[1][re]/be[re]+at)}for(fe=0;fe<Ee.length;fe++){var gt=Ee[fe];if(gt.visible){var pt=we.r2l(gt[Te]);he[0][re]=Math.min(he[0][re],pt),he[1][re]=Math.max(he[1][re],pt)}}if("rangemode"in we&&we.rangemode==="tozero"&&(he[0][re]=Math.min(he[0][re],0),he[1][re]=Math.max(he[1][re],0)),he[0][re]>he[1][re])he[0][re]=-1,he[1][re]=1;else{var Rt=he[1][re]-he[0][re];he[0][re]-=Rt/32,he[1][re]+=Rt/32}if(xe=[he[0][re],he[1][re]],xe=D(xe,we),he[0][re]=xe[0],he[1][re]=xe[1],we.isReversed()){var $t=he[0][re];he[0][re]=he[1][re],he[1][re]=$t}}else xe=we.range,he[0][re]=we.r2l(xe[0]),he[1][re]=we.r2l(xe[1]);he[0][re]===he[1][re]&&(he[0][re]-=1,he[1][re]+=1),we.range=[he[0][re],he[1][re]],we.limitRange(),J.glplot.setBounds(re,{min:we.range[0]*be[re],max:we.range[1]*be[re]})}var Wt,Ht=ke.aspectmode;if(Ht==="cube")Wt=[1,1,1];else if(Ht==="manual"){var Ft=ke.aspectratio;Wt=[Ft.x,Ft.y,Ft.z]}else if(Ht==="auto"||Ht==="data"){var st=[1,1,1];for(re=0;re<3;++re){we=ke[P[re]],Oe=we.type;var rt=De[Oe];st[re]=Math.pow(rt.acc,1/rt.count)/be[re]}Ht==="data"||Math.max.apply(null,st)/Math.min.apply(null,st)<=4?Wt=st:Wt=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");ke.aspectratio.x=Le.aspectratio.x=Wt[0],ke.aspectratio.y=Le.aspectratio.y=Wt[1],ke.aspectratio.z=Le.aspectratio.z=Wt[2],J.glplot.setAspectratio(ke.aspectratio),J.viewInitial.aspectratio||(J.viewInitial.aspectratio={x:ke.aspectratio.x,y:ke.aspectratio.y,z:ke.aspectratio.z}),J.viewInitial.aspectmode||(J.viewInitial.aspectmode=ke.aspectmode);var Ue=ke.domain||null,xt=K._size||null;if(Ue&&xt){var Gt=J.container.style;Gt.position="absolute",Gt.left=xt.l+Ue.x[0]*xt.w+"px",Gt.top=xt.t+(1-Ue.y[1])*xt.h+"px",Gt.width=xt.w*(Ue.x[1]-Ue.x[0])+"px",Gt.height=xt.h*(Ue.y[1]-Ue.y[0])+"px"}J.glplot.redraw()}},F.destroy=function(){var Z=this;Z.glplot&&(Z.camera.mouseListener.enabled=!1,Z.container.removeEventListener("wheel",Z.camera.wheelListener),Z.camera=null,Z.glplot.dispose(),Z.container.parentNode.removeChild(Z.container),Z.glplot=null)};function S(Z){return[[Z.eye.x,Z.eye.y,Z.eye.z],[Z.center.x,Z.center.y,Z.center.z],[Z.up.x,Z.up.y,Z.up.z]]}function M(Z){return{up:{x:Z.up[0],y:Z.up[1],z:Z.up[2]},center:{x:Z.center[0],y:Z.center[1],z:Z.center[2]},eye:{x:Z.eye[0],y:Z.eye[1],z:Z.eye[2]},projection:{type:Z._ortho===!0?"orthographic":"perspective"}}}F.getCamera=function(){var Z=this;return Z.camera.view.recalcMatrix(Z.camera.view.lastT()),M(Z.camera)},F.setViewport=function(Z){var K=this,Q=Z.camera;K.camera.lookAt.apply(this,S(Q)),K.glplot.setAspectratio(Z.aspectratio);var J=Q.projection.type==="orthographic",G=K.camera._ortho;J!==G&&(K.glplot.redraw(),K.glplot.clearRGBA(),K.glplot.dispose(),K.initializeGLPlot())},F.isCameraChanged=function(Z){var K=this,Q=K.getCamera(),J=c.nestedProperty(Z,K.id+".camera"),G=J.get();function ee(Oe,ke,Le,oe){var be=["up","center","eye"],_e=["x","y","z"];return ke[be[Le]]&&Oe[be[Le]][_e[oe]]===ke[be[Le]][_e[oe]]}var re=!1;if(G===void 0)re=!0;else{for(var fe=0;fe<3;fe++)for(var we=0;we<3;we++)if(!ee(Q,G,fe,we)){re=!0;break}(!G.projection||Q.projection&&Q.projection.type!==G.projection.type)&&(re=!0)}return re},F.isAspectChanged=function(Z){var K=this,Q=K.glplot.getAspectratio(),J=c.nestedProperty(Z,K.id+".aspectratio"),G=J.get();return G===void 0||G.x!==Q.x||G.y!==Q.y||G.z!==Q.z},F.saveLayout=function(Z){var K=this,Q=K.fullLayout,J,G,ee,re,fe,we,Oe=K.isCameraChanged(Z),ke=K.isAspectChanged(Z),Le=Oe||ke;if(Le){var oe={};if(Oe&&(J=K.getCamera(),G=c.nestedProperty(Z,K.id+".camera"),ee=G.get(),oe[K.id+".camera"]=ee),ke&&(re=K.glplot.getAspectratio(),fe=c.nestedProperty(Z,K.id+".aspectratio"),we=fe.get(),oe[K.id+".aspectratio"]=we),u.call("_storeDirectGUIEdit",Z,Q._preGUI,oe),Oe){G.set(J);var be=c.nestedProperty(Q,K.id+".camera");be.set(J)}if(ke){fe.set(re);var _e=c.nestedProperty(Q,K.id+".aspectratio");_e.set(re),K.glplot.redraw()}}return Le},F.updateFx=function(Z,K){var Q=this,J=Q.camera;if(J)if(Z==="orbit")J.mode="orbit",J.keyBindingMode="rotate";else if(Z==="turntable"){J.up=[0,0,1],J.mode="turntable",J.keyBindingMode="rotate";var G=Q.graphDiv,ee=G._fullLayout,re=Q.fullSceneLayout.camera,fe=re.up.x,we=re.up.y,Oe=re.up.z;if(Oe/Math.sqrt(fe*fe+we*we+Oe*Oe)<.999){var ke=Q.id+".camera.up",Le={x:0,y:0,z:1},oe={};oe[ke]=Le;var be=G.layout;u.call("_storeDirectGUIEdit",be,ee._preGUI,oe),re.up=Le,c.nestedProperty(be,ke).set(Le)}}else J.keyBindingMode=Z;Q.fullSceneLayout.hovermode=K};function W(Z,K,Q){for(var J=0,G=Q-1;J<G;++J,--G)for(var ee=0;ee<K;++ee)for(var re=0;re<4;++re){var fe=4*(K*J+ee)+re,we=4*(K*G+ee)+re,Oe=Z[fe];Z[fe]=Z[we],Z[we]=Oe}}function $(Z,K,Q){for(var J=0;J<Q;++J)for(var G=0;G<K;++G){var ee=4*(K*J+G),re=Z[ee+3];if(re>0)for(var fe=255/re,we=0;we<3;++we)Z[ee+we]=Math.min(fe*Z[ee+we],255)}}F.toImage=function(Z){var K=this;Z||(Z="png"),K.staticMode&&K.container.appendChild(g),K.glplot.redraw();var Q=K.glplot.gl,J=Q.drawingBufferWidth,G=Q.drawingBufferHeight;Q.bindFramebuffer(Q.FRAMEBUFFER,null);var ee=new Uint8Array(J*G*4);Q.readPixels(0,0,J,G,Q.RGBA,Q.UNSIGNED_BYTE,ee),W(ee,J,G),$(ee,J,G);var re=document.createElement("canvas");re.width=J,re.height=G;var fe=re.getContext("2d",{willReadFrequently:!0}),we=fe.createImageData(J,G);we.data.set(ee),fe.putImageData(we,0,0);var Oe;switch(Z){case"jpeg":Oe=re.toDataURL("image/jpeg");break;case"webp":Oe=re.toDataURL("image/webp");break;default:Oe=re.toDataURL("image/png")}return K.staticMode&&K.container.removeChild(g),Oe},F.setConvert=function(){for(var Z=this,K=0;K<3;K++){var Q=Z.fullSceneLayout[P[K]];f.setConvert(Q,Z.fullLayout),Q.setScale=c.noop}},F.make4thDimension=function(){var Z=this,K=Z.graphDiv,Q=K._fullLayout;Z._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},f.setConvert(Z._mockAxis,Q)},le.exports=N}}),DKe=U({"src/plots/gl3d/layout/attributes.js"(pe,le){le.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}}}),Ebe=U({"src/plots/gl3d/layout/axis_attributes.js"(pe,le){var w=Lr(),R=Hg(),O=Ar().extendFlat,z=zl().overrideAll;le.exports=z({visible:R.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:w.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:R.color,categoryorder:R.categoryorder,categoryarray:R.categoryarray,title:{text:R.title.text,font:R.title.font},type:O({},R.type,{values:["-","linear","log","date","category"]}),autotypenumbers:R.autotypenumbers,autorange:R.autorange,autorangeoptions:{minallowed:R.autorangeoptions.minallowed,maxallowed:R.autorangeoptions.maxallowed,clipmin:R.autorangeoptions.clipmin,clipmax:R.autorangeoptions.clipmax,include:R.autorangeoptions.include,editType:"plot"},rangemode:R.rangemode,minallowed:R.minallowed,maxallowed:R.maxallowed,range:O({},R.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:R.minor.tickmode,nticks:R.nticks,tick0:R.tick0,dtick:R.dtick,tickvals:R.tickvals,ticktext:R.ticktext,ticks:R.ticks,mirror:R.mirror,ticklen:R.ticklen,tickwidth:R.tickwidth,tickcolor:R.tickcolor,showticklabels:R.showticklabels,labelalias:R.labelalias,tickfont:R.tickfont,tickangle:R.tickangle,tickprefix:R.tickprefix,showtickprefix:R.showtickprefix,ticksuffix:R.ticksuffix,showticksuffix:R.showticksuffix,showexponent:R.showexponent,exponentformat:R.exponentformat,minexponent:R.minexponent,separatethousands:R.separatethousands,tickformat:R.tickformat,tickformatstops:R.tickformatstops,hoverformat:R.hoverformat,showline:R.showline,linecolor:R.linecolor,linewidth:R.linewidth,showgrid:R.showgrid,gridcolor:O({},R.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:R.gridwidth,zeroline:R.zeroline,zerolinecolor:R.zerolinecolor,zerolinewidth:R.zerolinewidth},"plot","from-root")}}),Abe=U({"src/plots/gl3d/layout/layout_attributes.js"(pe,le){var w=Ebe(),R=oh().attributes,O=Ar().extendFlat,z=ii().counterRegex;function l(u,c,p){return{x:{valType:"number",dflt:u,editType:"camera"},y:{valType:"number",dflt:c,editType:"camera"},z:{valType:"number",dflt:p,editType:"camera"},editType:"camera"}}le.exports={_arrayAttrRegexps:[z("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:O(l(0,0,1),{}),center:O(l(0,0,0),{}),eye:O(l(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:R({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:w,yaxis:w,zaxis:w,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"}}}),LKe=U({"src/plots/gl3d/layout/axis_defaults.js"(pe,le){var w=or().mix,R=ii(),O=Tc(),z=Ebe(),l=B0(),u=CA(),c=["xaxis","yaxis","zaxis"],p=13600/187;le.exports=function(v,h,m){var _,x;function A(g,C){return R.coerce(_,x,z,g,C)}for(var E=0;E<c.length;E++){var D=c[E];_=v[D]||{},x=O.newContainer(h,D),x._id=D[0]+m.scene,x._name=D,l(_,x,A,m),u(_,x,A,{font:m.font,letter:D[0],data:m.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:m.bgColor,calendar:m.calendar},m.fullLayout),A("gridcolor",w(x.color,m.bgColor,p).toRgbString()),A("title.text",D[0]),x.setScale=R.noop,A("showspikes")&&(A("spikesides"),A("spikethickness"),A("spikecolor",x.color)),A("showaxeslabels"),A("showbackground")&&A("backgroundcolor")}}}}),OKe=U({"src/plots/gl3d/layout/defaults.js"(pe,le){var w=ii(),R=Lr(),O=Mi(),z=cS(),l=LKe(),u=Abe(),c=Om().getSubplotData,p="gl3d";le.exports=function(h,m,_){var x=m._basePlotModules.length>1;function A(E){if(!x){var D=w.validate(h[E],u[E]);if(D)return h[E]}}z(h,m,_,{type:p,attributes:u,handleDefaults:f,fullLayout:m,font:m.font,fullData:_,getDfltFromLayout:A,autotypenumbersDflt:m.autotypenumbers,paper_bgcolor:m.paper_bgcolor,calendar:m.calendar})};function f(v,h,m,_){for(var x=m("bgcolor"),A=R.combine(x,_.paper_bgcolor),E=["up","center","eye"],D=0;D<E.length;D++)m("camera."+E[D]+".x"),m("camera."+E[D]+".y"),m("camera."+E[D]+".z");m("camera.projection.type");var g=!!m("aspectratio.x")&&!!m("aspectratio.y")&&!!m("aspectratio.z"),C=g?"manual":"auto",I=m("aspectmode",C);g||(v.aspectratio=h.aspectratio={x:1,y:1,z:1},I==="manual"&&(h.aspectmode="auto"),v.aspectmode=h.aspectmode);var N=c(_.fullData,p,_.id);l(v,h,{font:_.font,scene:_.id,data:N,bgColor:A,calendar:_.calendar,autotypenumbersDflt:_.autotypenumbersDflt,fullLayout:_.fullLayout}),O.getComponentMethod("annotations3d","handleDefaults")(v,h,_);var F=_.getDfltFromLayout("dragmode");if(F!==!1&&!F)if(F="orbit",v.camera&&v.camera.up){var k=v.camera.up.x,P=v.camera.up.y,T=v.camera.up.z;T!==0&&(!k||!P||!T||T/Math.sqrt(k*k+P*P+T*T)>.999)&&(F="turntable")}else F="turntable";m("dragmode",F),m("hovermode",_.getDfltFromLayout("hovermode"))}}}),j4=U({"src/plots/gl3d/index.js"(pe){var le=zl().overrideAll,w=Un(),R=PKe(),O=Om().getSubplotData,z=ii(),l=E1(),u="gl3d",c="scene";pe.name=u,pe.attr=c,pe.idRoot=c,pe.idRegex=pe.attrRegex=z.counterRegex("scene"),pe.attributes=DKe(),pe.layoutAttributes=Abe(),pe.baseLayoutAttrOverrides=le({hoverlabel:w.hoverlabel},"plot","nested"),pe.supplyLayoutDefaults=OKe(),pe.plot=function(f){for(var v=f._fullLayout,h=f._fullData,m=v._subplots[u],_=0;_<m.length;_++){var x=m[_],A=O(h,u,x),E=v[x],D=E.camera,g=E._scene;g||(g=new R({id:x,graphDiv:f,container:f.querySelector(".gl-container"),staticPlot:f._context.staticPlot,plotGlPixelRatio:f._context.plotGlPixelRatio,camera:D},v),E._scene=g),g.viewInitial||(g.viewInitial={up:{x:D.up.x,y:D.up.y,z:D.up.z},eye:{x:D.eye.x,y:D.eye.y,z:D.eye.z},center:{x:D.center.x,y:D.center.y,z:D.center.z}}),g.plot(A,v,f.layout)}},pe.clean=function(p,f,v,h){for(var m=h._subplots[u]||[],_=0;_<m.length;_++){var x=m[_];!f[x]&&h[x]._scene&&(h[x]._scene.destroy(),h._infolayer&&h._infolayer.selectAll(".annotation-"+x).remove())}},pe.toSVG=function(p){for(var f=p._fullLayout,v=f._subplots[u],h=f._size,m=0;m<v.length;m++){var _=f[v[m]],x=_.domain,A=_._scene,E=A.toImage("png"),D=f._glimages.append("svg:image");D.attr({xmlns:l.svg,"xlink:href":E,x:h.l+h.w*x.x[0],y:h.t+h.h*(1-x.y[1]),width:h.w*(x.x[1]-x.x[0]),height:h.h*(x.y[1]-x.y[0]),preserveAspectRatio:"none"}),A.destroy()}},pe.cleanId=function(f){if(f.match(/^scene[0-9]*$/)){var v=f.substr(5);return v==="1"&&(v=""),c+v}},pe.updateFx=function(p){for(var f=p._fullLayout,v=f._subplots[u],h=0;h<v.length;h++){var m=f[v[h]]._scene;m.updateFx(f.dragmode,f.hovermode)}}}}),NKe=U({"src/traces/scatter3d/index.js"(pe,le){le.exports={plot:TKe(),attributes:Sbe(),markerSymbols:ZZ(),supplyDefaults:EKe(),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:AKe(),moduleType:"trace",name:"scatter3d",basePlotModule:j4(),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}}}),FKe=U({"lib/scatter3d.js"(pe,le){le.exports=NKe()}}),zU=U({"src/traces/surface/attributes.js"(pe,le){var w=Lr(),R=Jd(),O=Wp().axisHoverFormat,z=Js().hovertemplateAttrs,l=Jn(),u=Ar().extendFlat,c=zl().overrideAll;function p(h){return{valType:"boolean",dflt:!1}}function f(h){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:p(),y:p(),z:p()},color:{valType:"color",dflt:w.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:w.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var v=le.exports=c(u({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:z(),xhoverformat:O("x"),yhoverformat:O("y"),zhoverformat:O("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},R("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:f(),y:f(),z:f()},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},roughness:{valType:"number",min:0,max:1,dflt:.5},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},hoverinfo:u({},l.hoverinfo),showlegend:u({},l.showlegend,{dflt:!1})}),"calc","nested");v.x.editType=v.y.editType=v.z.editType="calc+clearAxisTypes"}}),Cbe=U({"src/traces/surface/defaults.js"(pe,le){var w=Mi(),R=ii(),O=wg(),z=zU(),l=.1;function u(v,h){for(var m=[],_=32,x=0;x<_;x++){var A=x/(_-1),E=h+(1-h)*(1-Math.pow(Math.sin(v*A*Math.PI),2));m.push([A,Math.max(0,Math.min(1,E))])}return m}function c(v){var h=0;if(!Array.isArray(v)||v.length<2||!v[0]||!v[v.length-1]||+v[0][0]!=0||+v[v.length-1][0]!=1)return!1;for(var m=0;m<v.length;m++){var _=v[m];if(_.length!==2||+_[0]<h)return!1;h=+_[0]}return!0}function p(v,h,m,_){var x,A;function E(T,y){return R.coerce(v,h,z,T,y)}var D=E("x"),g=E("y"),C=E("z");if(!C||!C.length||D&&D.length<1||g&&g.length<1){h.visible=!1;return}h._xlength=Array.isArray(D)&&R.isArrayOrTypedArray(D[0])?C.length:C[0].length,h._ylength=C.length;var I=w.getComponentMethod("calendars","handleTraceDefaults");I(v,h,["x","y","z"],_),E("text"),E("hovertext"),E("hovertemplate"),E("xhoverformat"),E("yhoverformat"),E("zhoverformat"),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lightposition.x","lightposition.y","lightposition.z","hidesurface","connectgaps","opacity"].forEach(function(T){E(T)}),E("surfacecolor");var N=["x","y","z"];for(x=0;x<3;++x){var F="contours."+N[x],k=E(F+".show"),P=E(F+".highlight");if(k||P)for(A=0;A<3;++A)E(F+".project."+N[A]);k&&(E(F+".color"),E(F+".width"),E(F+".usecolormap")),P&&(E(F+".highlightcolor"),E(F+".highlightwidth")),E(F+".start"),E(F+".end"),E(F+".size")}O(v,h,_,E,{prefix:"",cLetter:"c"}),f(v,h,_,E),h._length=null}function f(v,h,m,_){var x=_("opacityscale");x==="max"?h.opacityscale=[[0,l],[1,1]]:x==="min"?h.opacityscale=[[0,1],[1,l]]:x==="extremes"?h.opacityscale=u(1,l):c(x)||(h.opacityscale=void 0)}le.exports={supplyDefaults:p,opacityscaleDefaults:f}}}),zKe=U({"src/traces/surface/calc.js"(pe,le){var w=t0();le.exports=function(O,z){z.surfacecolor?w(O,z,{vals:z.surfacecolor,containerStr:"",cLetter:"c"}):w(O,z,{vals:z.z,containerStr:"",cLetter:"c"})}}}),BKe=U({"src/traces/surface/convert.js"(pe,le){var w=Fx().gl_surface3d,R=Fx().ndarray,O=Fx().ndarray_linear_interpolate.d2,z=sS(),l=jA(),u=ii().isArrayOrTypedArray,c=II().parseColorScale,p=kI(),f=vd().extractOpts;function v(S,M,W){this.scene=S,this.uid=W,this.surface=M,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 h=v.prototype;h.getXat=function(S,M,W,$){var Z=u(this.data.x)?u(this.data.x[0])?this.data.x[M][S]:this.data.x[S]:S;return W===void 0?Z:$.d2l(Z,0,W)},h.getYat=function(S,M,W,$){var Z=u(this.data.y)?u(this.data.y[0])?this.data.y[M][S]:this.data.y[M]:M;return W===void 0?Z:$.d2l(Z,0,W)},h.getZat=function(S,M,W,$){var Z=this.data.z[M][S];return Z===null&&this.data.connectgaps&&this.data._interpolatedZ&&(Z=this.data._interpolatedZ[M][S]),W===void 0?Z:$.d2l(Z,0,W)},h.handlePick=function(S){if(S.object===this.surface){var M=(S.data.index[0]-1)/this.dataScaleX-1,W=(S.data.index[1]-1)/this.dataScaleY-1,$=Math.max(Math.min(Math.round(M),this.data.z[0].length-1),0),Z=Math.max(Math.min(Math.round(W),this.data._ylength-1),0);S.index=[$,Z],S.traceCoordinate=[this.getXat($,Z),this.getYat($,Z),this.getZat($,Z)],S.dataCoordinate=[this.getXat($,Z,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat($,Z,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat($,Z,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var K=0;K<3;K++){var Q=S.dataCoordinate[K];Q!=null&&(S.dataCoordinate[K]*=this.scene.dataScale[K])}var J=this.data.hovertext||this.data.text;return u(J)&&J[Z]&&J[Z][$]!==void 0?S.textLabel=J[Z][$]:J?S.textLabel=J:S.textLabel="",S.data.dataCoordinate=S.dataCoordinate.slice(),this.surface.highlight(S.data),this.scene.glplot.spikes.position=S.dataCoordinate,!0}};function m(S){var M=S[0].rgb,W=S[S.length-1].rgb;return M[0]===W[0]&&M[1]===W[1]&&M[2]===W[2]&&M[3]===W[3]}var _=[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 x(S,M){if(S<M)return 0;for(var W=0;Math.floor(S%M)===0;)S/=M,W++;return W}function A(S){for(var M=[],W=0;W<_.length;W++){var $=_[W];M.push(x(S,$))}return M}function E(S){for(var M=A(S),W=S,$=0;$<_.length;$++)if(M[$]>0){W=_[$];break}return W}function D(S,M){if(!(S<1||M<1)){for(var W=A(S),$=A(M),Z=1,K=0;K<_.length;K++)Z*=Math.pow(_[K],Math.max(W[K],$[K]));return Z}}function g(S){if(S.length!==0){for(var M=1,W=0;W<S.length;W++)M=D(M,S[W]);return M}}h.calcXnums=function(S){var M,W=[];for(M=1;M<S;M++){var $=this.getXat(M-1,0),Z=this.getXat(M,0);Z!==$&&$!==void 0&&$!==null&&Z!==void 0&&Z!==null?W[M-1]=Math.abs(Z-$):W[M-1]=0}var K=0;for(M=1;M<S;M++)K+=W[M-1];for(M=1;M<S;M++)W[M-1]===0?W[M-1]=1:W[M-1]=Math.round(K/W[M-1]);return W},h.calcYnums=function(S){var M,W=[];for(M=1;M<S;M++){var $=this.getYat(0,M-1),Z=this.getYat(0,M);Z!==$&&$!==void 0&&$!==null&&Z!==void 0&&Z!==null?W[M-1]=Math.abs(Z-$):W[M-1]=0}var K=0;for(M=1;M<S;M++)K+=W[M-1];for(M=1;M<S;M++)W[M-1]===0?W[M-1]=1:W[M-1]=Math.round(K/W[M-1]);return W};var C=[1,2,4,6,12,24,36,48,60,120,180,240,360,720,840,1260],I=C[9],N=C[13];h.estimateScale=function(S,M){for(var W=M===0?this.calcXnums(S):this.calcYnums(S),$=1+g(W);$<I;)$*=2;for(;$>N;)$--,$/=E($),$++,$<I&&($=N);var Z=Math.round($/S);return Z>1?Z:1};function F(S,M,W){var $=W[8]+W[2]*M[0]+W[5]*M[1];return S[0]=(W[6]+W[0]*M[0]+W[3]*M[1])/$,S[1]=(W[7]+W[1]*M[0]+W[4]*M[1])/$,S}function k(S,M,W){return P(S,M,F,W),S}function P(S,M,W,$){for(var Z=[0,0],K=S.shape[0],Q=S.shape[1],J=0;J<K;J++)for(var G=0;G<Q;G++)W(Z,[J,G],$),S.set(J,G,O(M,Z[0],Z[1]));return S}h.refineCoords=function(S){for(var M=this.dataScaleX,W=this.dataScaleY,$=S[0].shape[0],Z=S[0].shape[1],K=Math.floor(S[0].shape[0]*M+1)|0,Q=Math.floor(S[0].shape[1]*W+1)|0,J=1+$+1,G=1+Z+1,ee=R(new Float32Array(J*G),[J,G]),re=[1/M,0,0,0,1/W,0,0,0,1],fe=0;fe<S.length;++fe){this.surface.padField(ee,S[fe]);var we=R(new Float32Array(K*Q),[K,Q]);k(we,ee,re),S[fe]=we}};function T(S,M){for(var W=!1,$=0;$<S.length;$++)if(M===S[$]){W=!0;break}W===!1&&S.push(M)}h.setContourLevels=function(){var S=[[],[],[]],M=[!1,!1,!1],W=!1,$,Z,K;for($=0;$<3;++$)if(this.showContour[$]&&(W=!0,this.contourSize[$]>0&&this.contourStart[$]!==null&&this.contourEnd[$]!==null&&this.contourEnd[$]>this.contourStart[$]))for(M[$]=!0,Z=this.contourStart[$];Z<this.contourEnd[$];Z+=this.contourSize[$])K=Z*this.scene.dataScale[$],T(S[$],K);if(W){var Q=[[],[],[]];for($=0;$<3;++$)this.showContour[$]&&(Q[$]=M[$]?S[$]:this.scene.contourLevels[$]);this.surface.update({levels:Q})}},h.update=function(S){var M=this.scene,W=M.fullSceneLayout,$=this.surface,Z=c(S),K=M.dataScale,Q=S.z[0].length,J=S._ylength,G=M.contourLevels;this.data=S;var ee,re,fe,we,Oe=[];for(ee=0;ee<3;ee++)for(Oe[ee]=[],re=0;re<Q;re++)Oe[ee][re]=[];for(re=0;re<Q;re++)for(fe=0;fe<J;fe++)Oe[0][re][fe]=this.getXat(re,fe,S.xcalendar,W.xaxis),Oe[1][re][fe]=this.getYat(re,fe,S.ycalendar,W.yaxis),Oe[2][re][fe]=this.getZat(re,fe,S.zcalendar,W.zaxis);if(S.connectgaps)for(S._emptypoints=l(Oe[2]),z(Oe[2],S._emptypoints),S._interpolatedZ=[],re=0;re<Q;re++)for(S._interpolatedZ[re]=[],fe=0;fe<J;fe++)S._interpolatedZ[re][fe]=Oe[2][re][fe];for(ee=0;ee<3;ee++)for(re=0;re<Q;re++)for(fe=0;fe<J;fe++)we=Oe[ee][re][fe],we==null?Oe[ee][re][fe]=NaN:we=Oe[ee][re][fe]*=K[ee];for(ee=0;ee<3;ee++)for(re=0;re<Q;re++)for(fe=0;fe<J;fe++)we=Oe[ee][re][fe],we!=null&&(this.minValues[ee]>we&&(this.minValues[ee]=we),this.maxValues[ee]<we&&(this.maxValues[ee]=we));for(ee=0;ee<3;ee++)this.objectOffset[ee]=.5*(this.minValues[ee]+this.maxValues[ee]);for(ee=0;ee<3;ee++)for(re=0;re<Q;re++)for(fe=0;fe<J;fe++)we=Oe[ee][re][fe],we!=null&&(Oe[ee][re][fe]-=this.objectOffset[ee]);var ke=[R(new Float32Array(Q*J),[Q,J]),R(new Float32Array(Q*J),[Q,J]),R(new Float32Array(Q*J),[Q,J])];for(ee=0;ee<3;ee++)for(re=0;re<Q;re++)for(fe=0;fe<J;fe++)ke[ee].set(re,fe,Oe[ee][re][fe]);Oe=[];var Le={colormap:Z,levels:[[],[],[]],showContour:[!0,!0,!0],showSurface:!S.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:S.opacityscale,opacity:S.opacity},oe=f(S);if(Le.intensityBounds=[oe.min,oe.max],S.surfacecolor){var be=R(new Float32Array(Q*J),[Q,J]);for(re=0;re<Q;re++)for(fe=0;fe<J;fe++)be.set(re,fe,S.surfacecolor[fe][re]);ke.push(be)}else Le.intensityBounds[0]*=K[2],Le.intensityBounds[1]*=K[2];(N<ke[0].shape[0]||N<ke[0].shape[1])&&(this.refineData=!1),this.refineData===!0&&(this.dataScaleX=this.estimateScale(ke[0].shape[0],0),this.dataScaleY=this.estimateScale(ke[0].shape[1],1),(this.dataScaleX!==1||this.dataScaleY!==1)&&this.refineCoords(ke)),S.surfacecolor&&(Le.intensity=ke.pop());var _e=[!0,!0,!0],he=["x","y","z"];for(ee=0;ee<3;++ee){var De=S.contours[he[ee]];_e[ee]=De.highlight,Le.showContour[ee]=De.show||De.highlight,Le.showContour[ee]&&(Le.contourProject[ee]=[De.project.x,De.project.y,De.project.z],De.show?(this.showContour[ee]=!0,Le.levels[ee]=G[ee],$.highlightColor[ee]=Le.contourColor[ee]=p(De.color),De.usecolormap?$.highlightTint[ee]=Le.contourTint[ee]=0:$.highlightTint[ee]=Le.contourTint[ee]=1,Le.contourWidth[ee]=De.width,this.contourStart[ee]=De.start,this.contourEnd[ee]=De.end,this.contourSize[ee]=De.size):(this.showContour[ee]=!1,this.contourStart[ee]=null,this.contourEnd[ee]=null,this.contourSize[ee]=0),De.highlight&&(Le.dynamicColor[ee]=p(De.highlightcolor),Le.dynamicWidth[ee]=De.highlightwidth))}m(Z)&&(Le.vertexColor=!0),Le.objectOffset=this.objectOffset,Le.coords=ke,$.update(Le),$.visible=S.visible,$.enableDynamic=_e,$.enableHighlight=_e,$.snapToData=!0,"lighting"in S&&($.ambientLight=S.lighting.ambient,$.diffuseLight=S.lighting.diffuse,$.specularLight=S.lighting.specular,$.roughness=S.lighting.roughness,$.fresnel=S.lighting.fresnel),"lightposition"in S&&($.lightPosition=[S.lightposition.x,S.lightposition.y,S.lightposition.z])},h.dispose=function(){this.scene.glplot.remove(this.surface),this.surface.dispose()};function y(S,M){var W=S.glplot.gl,$=w({gl:W}),Z=new v(S,$,M.uid);return $._trace=Z,Z.update(M),S.glplot.add($),Z}le.exports=y}}),UKe=U({"src/traces/surface/index.js"(pe,le){le.exports={attributes:zU(),supplyDefaults:Cbe().supplyDefaults,colorbar:{min:"cmin",max:"cmax"},calc:zKe(),plot:BKe(),moduleType:"trace",name:"surface",basePlotModule:j4(),categories:["gl3d","2dMap","showLegend"],meta:{}}}}),HKe=U({"lib/surface.js"(pe,le){le.exports=UKe()}}),NF=U({"src/traces/mesh3d/attributes.js"(pe,le){var w=Jd(),R=Wp().axisHoverFormat,O=Js().hovertemplateAttrs,z=zU(),l=Jn(),u=Ar().extendFlat;le.exports=u({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:O({editType:"calc"}),xhoverformat:R("x"),yhoverformat:R("y"),zhoverformat:R("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"}},w("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:z.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:u({},z.contours.x.show,{}),color:z.contours.x.color,width:z.contours.x.width,editType:"calc"},lightposition:{x:u({},z.lightposition.x,{dflt:1e5}),y:u({},z.lightposition.y,{dflt:1e5}),z:u({},z.lightposition.z,{dflt:0}),editType:"calc"},lighting:u({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc"},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc"},editType:"calc"},z.lighting),hoverinfo:u({},l.hoverinfo,{editType:"calc"}),showlegend:u({},l.showlegend,{dflt:!1})})}}),KZ=U({"src/traces/isosurface/attributes.js"(pe,le){var w=Jd(),R=Wp().axisHoverFormat,O=Js().hovertemplateAttrs,z=NF(),l=Jn(),u=Ar().extendFlat,c=zl().overrideAll;function p(h){return{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}}function f(h){return{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}}var v=le.exports=c(u({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:p(),y:p(),z:p()},caps:{x:f(),y:f(),z:f()},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:O(),xhoverformat:R("x"),yhoverformat:R("y"),zhoverformat:R("z"),valuehoverformat:R("value",1),showlegend:u({},l.showlegend,{dflt:!1})},w("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:z.opacity,lightposition:z.lightposition,lighting:z.lighting,flatshading:z.flatshading,contour:z.contour,hoverinfo:u({},l.hoverinfo)}),"calc","nested");v.flatshading.dflt=!0,v.lighting.facenormalsepsilon.dflt=0,v.x.editType=v.y.editType=v.z.editType=v.value.editType="calc+clearAxisTypes"}}),Mbe=U({"src/traces/isosurface/defaults.js"(pe,le){var w=ii(),R=Mi(),O=KZ(),z=wg();function l(c,p,f,v){function h(m,_){return w.coerce(c,p,O,m,_)}u(c,p,f,v,h)}function u(c,p,f,v,h){var m=h("isomin"),_=h("isomax");_!=null&&m!==void 0&&m!==null&&m>_&&(p.isomin=null,p.isomax=null);var x=h("x"),A=h("y"),E=h("z"),D=h("value");if(!x||!x.length||!A||!A.length||!E||!E.length||!D||!D.length){p.visible=!1;return}var g=R.getComponentMethod("calendars","handleTraceDefaults");g(c,p,["x","y","z"],v),h("valuehoverformat"),["x","y","z"].forEach(function(F){h(F+"hoverformat");var k="caps."+F,P=h(k+".show");P&&h(k+".fill");var T="slices."+F,y=h(T+".show");y&&(h(T+".fill"),h(T+".locations"))});var C=h("spaceframe.show");C&&h("spaceframe.fill");var I=h("surface.show");I&&(h("surface.count"),h("surface.fill"),h("surface.pattern"));var N=h("contour.show");N&&(h("contour.color"),h("contour.width")),["text","hovertext","hovertemplate","lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","opacity"].forEach(function(F){h(F)}),z(c,p,v,h,{prefix:"",cLetter:"c"}),p._length=null}le.exports={supplyDefaults:l,supplyIsoDefaults:u}}}),JZ=U({"src/traces/streamtube/calc.js"(pe,le){var w=ii(),R=t0();function O(c,p){p._len=Math.min(p.u.length,p.v.length,p.w.length,p.x.length,p.y.length,p.z.length),p._u=u(p.u,p._len),p._v=u(p.v,p._len),p._w=u(p.w,p._len),p._x=u(p.x,p._len),p._y=u(p.y,p._len),p._z=u(p.z,p._len);var f=z(p);p._gridFill=f.fill,p._Xs=f.Xs,p._Ys=f.Ys,p._Zs=f.Zs,p._len=f.len;var v=0,h,m,_;p.starts&&(h=u(p.starts.x||[]),m=u(p.starts.y||[]),_=u(p.starts.z||[]),v=Math.min(h.length,m.length,_.length)),p._startsX=h||[],p._startsY=m||[],p._startsZ=_||[];var x=0,A=1/0,E;for(E=0;E<p._len;E++){var D=p._u[E],g=p._v[E],C=p._w[E],I=Math.sqrt(D*D+g*g+C*C);x=Math.max(x,I),A=Math.min(A,I)}for(R(c,p,{vals:[A,x],containerStr:"",cLetter:"c"}),E=0;E<v;E++){var N=h[E];f.xMax=Math.max(f.xMax,N),f.xMin=Math.min(f.xMin,N);var F=m[E];f.yMax=Math.max(f.yMax,F),f.yMin=Math.min(f.yMin,F);var k=_[E];f.zMax=Math.max(f.zMax,k),f.zMin=Math.min(f.zMin,k)}p._slen=v,p._normMax=x,p._xbnds=[f.xMin,f.xMax],p._ybnds=[f.yMin,f.yMax],p._zbnds=[f.zMin,f.zMax]}function z(c){var p=c._x,f=c._y,v=c._z,h=c._len,m,_,x,A=-1/0,E=1/0,D=-1/0,g=1/0,C=-1/0,I=1/0,N="",F,k,P,T,y,S,M,W,$;for(h&&(T=p[0],S=f[0],W=v[0]),h>1&&(y=p[h-1],M=f[h-1],$=v[h-1]),m=0;m<h;m++)A=Math.max(A,p[m]),E=Math.min(E,p[m]),D=Math.max(D,f[m]),g=Math.min(g,f[m]),C=Math.max(C,v[m]),I=Math.min(I,v[m]),!F&&p[m]!==T&&(F=!0,N+="x"),!k&&f[m]!==S&&(k=!0,N+="y"),!P&&v[m]!==W&&(P=!0,N+="z");F||(N+="x"),k||(N+="y"),P||(N+="z");var Z=l(c._x),K=l(c._y),Q=l(c._z);N=N.replace("x",(T>y?"-":"+")+"x"),N=N.replace("y",(S>M?"-":"+")+"y"),N=N.replace("z",(W>$?"-":"+")+"z");var J=function(){h=0,Z=[],K=[],Q=[]};(!h||h<Z.length*K.length*Q.length)&&J();var G=function(tt){return tt==="x"?p:tt==="y"?f:v},ee=function(tt){return tt==="x"?Z:tt==="y"?K:Q},re=function(tt){return tt[h-1]<tt[0]?-1:1},fe=G(N[1]),we=G(N[3]),Oe=G(N[5]),ke=ee(N[1]).length,Le=ee(N[3]).length,oe=ee(N[5]).length,be=!1,_e=function(tt,at,gt){return ke*(Le*tt+at)+gt},he=re(G(N[1])),De=re(G(N[3])),xe=re(G(N[5]));for(m=0;m<oe-1;m++){for(_=0;_<Le-1;_++){for(x=0;x<ke-1;x++){var se=_e(m,_,x),Ee=_e(m,_,x+1),Te=_e(m,_+1,x),Be=_e(m+1,_,x);if((!(fe[se]*he<fe[Ee]*he)||!(we[se]*De<we[Te]*De)||!(Oe[se]*xe<Oe[Be]*xe))&&(be=!0),be)break}if(be)break}if(be)break}return be&&(w.warn("Encountered arbitrary coordinates! Unable to input data grid."),J()),{xMin:E,yMin:g,zMin:I,xMax:A,yMax:D,zMax:C,Xs:Z,Ys:K,Zs:Q,len:h,fill:N}}function l(c){return w.distinctVals(c).vals}function u(c,p){if(p===void 0&&(p=c.length),w.isTypedArray(c))return c.subarray(0,p);for(var f=[],v=0;v<p;v++)f[v]=+c[v];return f}le.exports={calc:O,filter:u,processGrid:z}}}),Rbe=U({"src/traces/isosurface/calc.js"(pe,le){var w=t0(),R=JZ().processGrid,O=JZ().filter;le.exports=function(l,u){u._len=Math.min(u.x.length,u.y.length,u.z.length,u.value.length),u._x=O(u.x,u._len),u._y=O(u.y,u._len),u._z=O(u.z,u._len),u._value=O(u.value,u._len);var c=R(u);u._gridFill=c.fill,u._Xs=c.Xs,u._Ys=c.Ys,u._Zs=c.Zs,u._len=c.len;for(var p=1/0,f=-1/0,v=0;v<u._len;v++){var h=u._value[v];p=Math.min(p,h),f=Math.max(f,h)}u._minValues=p,u._maxValues=f,u._vMin=u.isomin===void 0||u.isomin===null?p:u.isomin,u._vMax=u.isomax===void 0||u.isomax===null?f:u.isomax,w(l,u,{vals:[u._vMin,u._vMax],containerStr:"",cLetter:"c"})}}}),FF=U({"src/plots/gl3d/zip3.js"(pe,le){le.exports=function(R,O,z,l){l=l||R.length;for(var u=new Array(l),c=0;c<l;c++)u[c]=[R[c],O[c],z[c]];return u}}}),QZ=U({"src/traces/isosurface/convert.js"(pe,le){var w=Fx().gl_mesh3d,R=II().parseColorScale,O=ii().isArrayOrTypedArray,z=kI(),l=vd().extractOpts,u=FF(),c=function(_,x){for(var A=x.length-1;A>0;A--){var E=Math.min(x[A],x[A-1]),D=Math.max(x[A],x[A-1]);if(D>E&&E<_&&_<=D)return{id:A,distRatio:(D-_)/(D-E)}}return{id:0,distRatio:0}};function p(_,x,A){this.scene=_,this.uid=A,this.mesh=x,this.name="",this.data=null,this.showContour=!1}var f=p.prototype;f.handlePick=function(_){if(_.object===this.mesh){var x=_.data.index,A=this.data._meshX[x],E=this.data._meshY[x],D=this.data._meshZ[x],g=this.data._Ys.length,C=this.data._Zs.length,I=c(A,this.data._Xs).id,N=c(E,this.data._Ys).id,F=c(D,this.data._Zs).id,k=_.index=F+C*N+C*g*I;_.traceCoordinate=[this.data._meshX[k],this.data._meshY[k],this.data._meshZ[k],this.data._value[k]];var P=this.data.hovertext||this.data.text;return O(P)&&P[k]!==void 0?_.textLabel=P[k]:P&&(_.textLabel=P),!0}},f.update=function(_){var x=this.scene,A=x.fullSceneLayout;this.data=h(_);function E(N,F,k,P){return F.map(function(T){return N.d2l(T,0,P)*k})}var D=u(E(A.xaxis,_._meshX,x.dataScale[0],_.xcalendar),E(A.yaxis,_._meshY,x.dataScale[1],_.ycalendar),E(A.zaxis,_._meshZ,x.dataScale[2],_.zcalendar)),g=u(_._meshI,_._meshJ,_._meshK),C={positions:D,cells:g,lightPosition:[_.lightposition.x,_.lightposition.y,_.lightposition.z],ambient:_.lighting.ambient,diffuse:_.lighting.diffuse,specular:_.lighting.specular,roughness:_.lighting.roughness,fresnel:_.lighting.fresnel,vertexNormalsEpsilon:_.lighting.vertexnormalsepsilon,faceNormalsEpsilon:_.lighting.facenormalsepsilon,opacity:_.opacity,contourEnable:_.contour.show,contourColor:z(_.contour.color).slice(0,3),contourWidth:_.contour.width,useFacetNormals:_.flatshading},I=l(_);C.vertexIntensity=_._meshIntensity,C.vertexIntensityBounds=[I.min,I.max],C.colormap=R(_),this.mesh.update(C)},f.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};var v=["xyz","xzy","yxz","yzx","zxy","zyx"];function h(_){_._meshI=[],_._meshJ=[],_._meshK=[];var x=_.surface.show,A=_.spaceframe.show,E=_.surface.fill,D=_.spaceframe.fill,g=!1,C=!1,I=0,N,F,k=_._Xs,P=_._Ys,T=_._Zs,y=k.length,S=P.length,M=T.length,W=v.indexOf(_._gridFill.replace(/-/g,"").replace(/\+/g,"")),$=function(mr,St,Ot){switch(W){case 5:return Ot+M*St+M*S*mr;case 4:return Ot+M*mr+M*y*St;case 3:return St+S*Ot+S*M*mr;case 2:return St+S*mr+S*y*Ot;case 1:return mr+y*Ot+y*M*St;default:return mr+y*St+y*S*Ot}},Z=_._minValues,K=_._maxValues,Q=_._vMin,J=_._vMax,G,ee,re,fe;function we(mr,St,Ot){for(var Et=fe.length,je=F;je<Et;je++)if(mr===G[je]&&St===ee[je]&&Ot===re[je])return je;return-1}function Oe(){F=N}function ke(){G=[],ee=[],re=[],fe=[],N=0,Oe()}function Le(mr,St,Ot,Et){return G.push(mr),ee.push(St),re.push(Ot),fe.push(Et),N++,N-1}function oe(mr,St,Ot){return _._meshI.push(mr),_._meshJ.push(St),_._meshK.push(Ot),I++,I-1}function be(mr,St,Ot){for(var Et=[],je=0;je<mr.length;je++)Et[je]=(mr[je]+St[je]+Ot[je])/3;return Et}function _e(mr,St,Ot){for(var Et=[],je=0;je<mr.length;je++)Et[je]=mr[je]*(1-Ot)+Ot*St[je];return Et}var he;function De(mr){he=mr}function xe(mr,St){var Ot=mr[0],Et=mr[1],je=mr[2],Ye=be(Ot,Et,je),et=Math.sqrt(1-he),mt=_e(Ye,Ot,et),Nt=_e(Ye,Et,et),lr=_e(Ye,je,et),br=St[0],Or=St[1],tn=St[2];return{xyzv:[[Ot,Et,Nt],[Nt,mt,Ot],[Et,je,lr],[lr,Nt,Et],[je,Ot,mt],[mt,lr,je]],abc:[[br,Or,-1],[-1,-1,br],[Or,tn,-1],[-1,-1,Or],[tn,br,-1],[-1,-1,tn]]}}function se(mr,St){return mr==="all"||mr===null?!0:mr.indexOf(St)>-1}function Ee(mr,St){return mr===null?St:mr}function Te(mr,St,Ot){Oe();var Et=[St],je=[Ot];if(he>=1)Et=[St],je=[Ot];else if(he>0){var Ye=xe(St,Ot);Et=Ye.xyzv,je=Ye.abc}for(var et=0;et<Et.length;et++){St=Et[et],Ot=je[et];for(var mt=[],Nt=0;Nt<3;Nt++){var lr=St[Nt][0],br=St[Nt][1],Or=St[Nt][2],tn=St[Nt][3],Jr=Ot[Nt]>-1?Ot[Nt]:we(lr,br,Or);Jr>-1?mt[Nt]=Jr:mt[Nt]=Le(lr,br,Or,Ee(mr,tn))}oe(mt[0],mt[1],mt[2])}}function Be(mr,St,Ot){var Et=function(je,Ye,et){Te(mr,[St[je],St[Ye],St[et]],[Ot[je],Ot[Ye],Ot[et]])};Et(0,1,2),Et(2,3,0)}function tt(mr,St,Ot){var Et=function(je,Ye,et){Te(mr,[St[je],St[Ye],St[et]],[Ot[je],Ot[Ye],Ot[et]])};Et(0,1,2),Et(3,0,1),Et(2,3,0),Et(1,2,3)}function at(mr,St,Ot,Et){var je=mr[3];je<Ot&&(je=Ot),je>Et&&(je=Et);for(var Ye=(mr[3]-je)/(mr[3]-St[3]+1e-9),et=[],mt=0;mt<4;mt++)et[mt]=(1-Ye)*mr[mt]+Ye*St[mt];return et}function gt(mr,St,Ot){return mr>=St&&mr<=Ot}function pt(mr){var St=.001*(J-Q);return mr>=Q-St&&mr<=J+St}function Rt(mr){for(var St=[],Ot=0;Ot<4;Ot++){var Et=mr[Ot];St.push([_._x[Et],_._y[Et],_._z[Et],_._value[Et]])}return St}var $t=3;function Wt(mr,St,Ot,Et,je,Ye){Ye||(Ye=1),Ot=[-1,-1,-1];var et=!1,mt=[gt(St[0][3],Et,je),gt(St[1][3],Et,je),gt(St[2][3],Et,je)];if(!mt[0]&&!mt[1]&&!mt[2])return!1;var Nt=function(br,Or,tn){return pt(Or[0][3])&&pt(Or[1][3])&&pt(Or[2][3])?(Te(br,Or,tn),!0):Ye<$t?Wt(br,Or,tn,Q,J,++Ye):!1};if(mt[0]&&mt[1]&&mt[2])return Nt(mr,St,Ot)||et;var lr=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach(function(br){if(mt[br[0]]&&mt[br[1]]&&!mt[br[2]]){var Or=St[br[0]],tn=St[br[1]],Jr=St[br[2]],dn=at(Jr,Or,Et,je),on=at(Jr,tn,Et,je);et=Nt(mr,[on,dn,Or],[-1,-1,Ot[br[0]]])||et,et=Nt(mr,[Or,tn,on],[Ot[br[0]],Ot[br[1]],-1])||et,lr=!0}}),lr||[[0,1,2],[1,2,0],[2,0,1]].forEach(function(br){if(mt[br[0]]&&!mt[br[1]]&&!mt[br[2]]){var Or=St[br[0]],tn=St[br[1]],Jr=St[br[2]],dn=at(tn,Or,Et,je),on=at(Jr,Or,Et,je);et=Nt(mr,[on,dn,Or],[-1,-1,Ot[br[0]]])||et,lr=!0}}),et}function Ht(mr,St,Ot,Et){var je=!1,Ye=Rt(St),et=[gt(Ye[0][3],Ot,Et),gt(Ye[1][3],Ot,Et),gt(Ye[2][3],Ot,Et),gt(Ye[3][3],Ot,Et)];if(!et[0]&&!et[1]&&!et[2]&&!et[3])return je;if(et[0]&&et[1]&&et[2]&&et[3])return C&&(je=tt(mr,Ye,St)||je),je;var mt=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach(function(Nt){if(et[Nt[0]]&&et[Nt[1]]&&et[Nt[2]]&&!et[Nt[3]]){var lr=Ye[Nt[0]],br=Ye[Nt[1]],Or=Ye[Nt[2]],tn=Ye[Nt[3]];if(C)je=Te(mr,[lr,br,Or],[St[Nt[0]],St[Nt[1]],St[Nt[2]]])||je;else{var Jr=at(tn,lr,Ot,Et),dn=at(tn,br,Ot,Et),on=at(tn,Or,Ot,Et);je=Te(null,[Jr,dn,on],[-1,-1,-1])||je}mt=!0}}),mt||([[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(Nt){if(et[Nt[0]]&&et[Nt[1]]&&!et[Nt[2]]&&!et[Nt[3]]){var lr=Ye[Nt[0]],br=Ye[Nt[1]],Or=Ye[Nt[2]],tn=Ye[Nt[3]],Jr=at(Or,lr,Ot,Et),dn=at(Or,br,Ot,Et),on=at(tn,br,Ot,Et),Nn=at(tn,lr,Ot,Et);C?(je=Te(mr,[lr,Nn,Jr],[St[Nt[0]],-1,-1])||je,je=Te(mr,[br,dn,on],[St[Nt[1]],-1,-1])||je):je=Be(null,[Jr,dn,on,Nn],[-1,-1,-1,-1])||je,mt=!0}}),mt)||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach(function(Nt){if(et[Nt[0]]&&!et[Nt[1]]&&!et[Nt[2]]&&!et[Nt[3]]){var lr=Ye[Nt[0]],br=Ye[Nt[1]],Or=Ye[Nt[2]],tn=Ye[Nt[3]],Jr=at(br,lr,Ot,Et),dn=at(Or,lr,Ot,Et),on=at(tn,lr,Ot,Et);C?(je=Te(mr,[lr,Jr,dn],[St[Nt[0]],-1,-1])||je,je=Te(mr,[lr,dn,on],[St[Nt[0]],-1,-1])||je,je=Te(mr,[lr,on,Jr],[St[Nt[0]],-1,-1])||je):je=Te(null,[Jr,dn,on],[-1,-1,-1])||je,mt=!0}}),je}function Ft(mr,St,Ot,Et,je,Ye,et,mt,Nt,lr,br){var Or=!1;return g&&(se(mr,"A")&&(Or=Ht(null,[St,Ot,Et,Ye],lr,br)||Or),se(mr,"B")&&(Or=Ht(null,[Ot,Et,je,Nt],lr,br)||Or),se(mr,"C")&&(Or=Ht(null,[Ot,Ye,et,Nt],lr,br)||Or),se(mr,"D")&&(Or=Ht(null,[Et,Ye,mt,Nt],lr,br)||Or),se(mr,"E")&&(Or=Ht(null,[Ot,Et,Ye,Nt],lr,br)||Or)),C&&(Or=Ht(mr,[Ot,Et,Ye,Nt],lr,br)||Or),Or}function st(mr,St,Ot,Et,je,Ye,et,mt){return[mt[0]===!0?!0:Wt(mr,Rt([St,Ot,Et]),[St,Ot,Et],Ye,et),mt[1]===!0?!0:Wt(mr,Rt([Et,je,St]),[Et,je,St],Ye,et)]}function rt(mr,St,Ot,Et,je,Ye,et,mt,Nt){return mt?st(mr,St,Ot,je,Et,Ye,et,Nt):st(mr,Ot,je,Et,St,Ye,et,Nt)}function Ue(mr,St,Ot,Et,je,Ye,et){var mt=!1,Nt,lr,br,Or,tn=function(){mt=Wt(mr,[Nt,lr,br],[-1,-1,-1],je,Ye)||mt,mt=Wt(mr,[br,Or,Nt],[-1,-1,-1],je,Ye)||mt},Jr=et[0],dn=et[1],on=et[2];return Jr&&(Nt=_e(Rt([$(St,Ot-0,Et-0)])[0],Rt([$(St-1,Ot-0,Et-0)])[0],Jr),lr=_e(Rt([$(St,Ot-0,Et-1)])[0],Rt([$(St-1,Ot-0,Et-1)])[0],Jr),br=_e(Rt([$(St,Ot-1,Et-1)])[0],Rt([$(St-1,Ot-1,Et-1)])[0],Jr),Or=_e(Rt([$(St,Ot-1,Et-0)])[0],Rt([$(St-1,Ot-1,Et-0)])[0],Jr),tn()),dn&&(Nt=_e(Rt([$(St-0,Ot,Et-0)])[0],Rt([$(St-0,Ot-1,Et-0)])[0],dn),lr=_e(Rt([$(St-0,Ot,Et-1)])[0],Rt([$(St-0,Ot-1,Et-1)])[0],dn),br=_e(Rt([$(St-1,Ot,Et-1)])[0],Rt([$(St-1,Ot-1,Et-1)])[0],dn),Or=_e(Rt([$(St-1,Ot,Et-0)])[0],Rt([$(St-1,Ot-1,Et-0)])[0],dn),tn()),on&&(Nt=_e(Rt([$(St-0,Ot-0,Et)])[0],Rt([$(St-0,Ot-0,Et-1)])[0],on),lr=_e(Rt([$(St-0,Ot-1,Et)])[0],Rt([$(St-0,Ot-1,Et-1)])[0],on),br=_e(Rt([$(St-1,Ot-1,Et)])[0],Rt([$(St-1,Ot-1,Et-1)])[0],on),Or=_e(Rt([$(St-1,Ot-0,Et)])[0],Rt([$(St-1,Ot-0,Et-1)])[0],on),tn()),mt}function xt(mr,St,Ot,Et,je,Ye,et,mt,Nt,lr,br,Or){var tn=mr;return Or?(g&&mr==="even"&&(tn=null),Ft(tn,St,Ot,Et,je,Ye,et,mt,Nt,lr,br)):(g&&mr==="odd"&&(tn=null),Ft(tn,Nt,mt,et,Ye,je,Et,Ot,St,lr,br))}function Gt(mr,St,Ot,Et,je){for(var Ye=[],et=0,mt=0;mt<St.length;mt++)for(var Nt=St[mt],lr=1;lr<M;lr++)for(var br=1;br<S;br++)Ye.push(rt(mr,$(Nt,br-1,lr-1),$(Nt,br-1,lr),$(Nt,br,lr-1),$(Nt,br,lr),Ot,Et,(Nt+br+lr)%2,je&&je[et]?je[et]:[])),et++;return Ye}function Jt(mr,St,Ot,Et,je){for(var Ye=[],et=0,mt=0;mt<St.length;mt++)for(var Nt=St[mt],lr=1;lr<y;lr++)for(var br=1;br<M;br++)Ye.push(rt(mr,$(lr-1,Nt,br-1),$(lr,Nt,br-1),$(lr-1,Nt,br),$(lr,Nt,br),Ot,Et,(lr+Nt+br)%2,je&&je[et]?je[et]:[])),et++;return Ye}function Ut(mr,St,Ot,Et,je){for(var Ye=[],et=0,mt=0;mt<St.length;mt++)for(var Nt=St[mt],lr=1;lr<S;lr++)for(var br=1;br<y;br++)Ye.push(rt(mr,$(br-1,lr-1,Nt),$(br-1,lr,Nt),$(br,lr-1,Nt),$(br,lr,Nt),Ot,Et,(br+lr+Nt)%2,je&&je[et]?je[et]:[])),et++;return Ye}function kr(mr,St,Ot){for(var Et=1;Et<M;Et++)for(var je=1;je<S;je++)for(var Ye=1;Ye<y;Ye++)xt(mr,$(Ye-1,je-1,Et-1),$(Ye-1,je-1,Et),$(Ye-1,je,Et-1),$(Ye-1,je,Et),$(Ye,je-1,Et-1),$(Ye,je-1,Et),$(Ye,je,Et-1),$(Ye,je,Et),St,Ot,(Ye+je+Et)%2)}function Pr(mr,St,Ot){C=!0,kr(mr,St,Ot),C=!1}function $r(mr,St,Ot){g=!0,kr(mr,St,Ot),g=!1}function rn(mr,St,Ot,Et,je,Ye){for(var et=[],mt=0,Nt=0;Nt<St.length;Nt++)for(var lr=St[Nt],br=1;br<M;br++)for(var Or=1;Or<S;Or++)et.push(Ue(mr,lr,Or,br,Ot,Et,je[Nt],Ye&&Ye[mt]?Ye[mt]:[])),mt++;return et}function kn(mr,St,Ot,Et,je,Ye){for(var et=[],mt=0,Nt=0;Nt<St.length;Nt++)for(var lr=St[Nt],br=1;br<y;br++)for(var Or=1;Or<M;Or++)et.push(Ue(mr,br,lr,Or,Ot,Et,je[Nt],Ye&&Ye[mt]?Ye[mt]:[])),mt++;return et}function Rn(mr,St,Ot,Et,je,Ye){for(var et=[],mt=0,Nt=0;Nt<St.length;Nt++)for(var lr=St[Nt],br=1;br<S;br++)for(var Or=1;Or<y;Or++)et.push(Ue(mr,Or,br,lr,Ot,Et,je[Nt],Ye&&Ye[mt]?Ye[mt]:[])),mt++;return et}function ci(mr,St){for(var Ot=[],Et=mr;Et<St;Et++)Ot.push(Et);return Ot}function In(){for(var mr=0;mr<y;mr++)for(var St=0;St<S;St++)for(var Ot=0;Ot<M;Ot++){var Et=$(mr,St,Ot);Le(_._x[Et],_._y[Et],_._z[Et],_._value[Et])}}function Gn(){ke(),In();var mr=null;if(A&&D&&(De(D),Pr(mr,Q,J)),x&&E){De(E);for(var St=_.surface.pattern,Ot=_.surface.count,Et=0;Et<Ot;Et++){var je=Ot===1?.5:Et/(Ot-1),Ye=(1-je)*Q+je*J,et=Math.abs(Ye-Z),mt=Math.abs(Ye-K),Nt=et>mt?[Z,Ye]:[Ye,K];$r(St,Nt[0],Nt[1])}}var lr=[[Math.min(Q,K),Math.max(Q,K)],[Math.min(Z,J),Math.max(Z,J)]];["x","y","z"].forEach(function(br){for(var Or=[],tn=0;tn<lr.length;tn++){var Jr=0,dn=lr[tn][0],on=lr[tn][1],Nn=_.slices[br];if(Nn.show&&Nn.fill){De(Nn.fill);var Wi=[],Oa=[],Da=[];if(Nn.locations.length)for(var Aa=0;Aa<Nn.locations.length;Aa++){var Ka=c(Nn.locations[Aa],br==="x"?k:br==="y"?P:T);Ka.distRatio===0?Wi.push(Ka.id):Ka.id>0&&(Oa.push(Ka.id),br==="x"?Da.push([Ka.distRatio,0,0]):br==="y"?Da.push([0,Ka.distRatio,0]):Da.push([0,0,Ka.distRatio]))}else br==="x"?Wi=ci(1,y-1):br==="y"?Wi=ci(1,S-1):Wi=ci(1,M-1);Oa.length>0&&(br==="x"?Or[Jr]=rn(mr,Oa,dn,on,Da,Or[Jr]):br==="y"?Or[Jr]=kn(mr,Oa,dn,on,Da,Or[Jr]):Or[Jr]=Rn(mr,Oa,dn,on,Da,Or[Jr]),Jr++),Wi.length>0&&(br==="x"?Or[Jr]=Gt(mr,Wi,dn,on,Or[Jr]):br==="y"?Or[Jr]=Jt(mr,Wi,dn,on,Or[Jr]):Or[Jr]=Ut(mr,Wi,dn,on,Or[Jr]),Jr++)}var Sa=_.caps[br];Sa.show&&Sa.fill&&(De(Sa.fill),br==="x"?Or[Jr]=Gt(mr,[0,y-1],dn,on,Or[Jr]):br==="y"?Or[Jr]=Jt(mr,[0,S-1],dn,on,Or[Jr]):Or[Jr]=Ut(mr,[0,M-1],dn,on,Or[Jr]),Jr++)}}),I===0&&ke(),_._meshX=G,_._meshY=ee,_._meshZ=re,_._meshIntensity=fe,_._Xs=k,_._Ys=P,_._Zs=T}return Gn(),_}function m(_,x){var A=_.glplot.gl,E=w({gl:A}),D=new p(_,E,x.uid);return E._trace=D,D.update(x),_.glplot.add(E),D}le.exports={findNearestOnAxis:c,generateIsoMeshes:h,createIsosurfaceTrace:m}}}),jKe=U({"src/traces/isosurface/index.js"(pe,le){le.exports={attributes:KZ(),supplyDefaults:Mbe().supplyDefaults,calc:Rbe(),colorbar:{min:"cmin",max:"cmax"},plot:QZ().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:j4(),categories:["gl3d","showLegend"],meta:{}}}}),VKe=U({"lib/isosurface.js"(pe,le){le.exports=jKe()}}),kbe=U({"src/traces/volume/attributes.js"(pe,le){var w=Jd(),R=KZ(),O=zU(),z=Jn(),l=Ar().extendFlat,u=zl().overrideAll,c=le.exports=u(l({x:R.x,y:R.y,z:R.z,value:R.value,isomin:R.isomin,isomax:R.isomax,surface:R.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:R.slices,caps:R.caps,text:R.text,hovertext:R.hovertext,xhoverformat:R.xhoverformat,yhoverformat:R.yhoverformat,zhoverformat:R.zhoverformat,valuehoverformat:R.valuehoverformat,hovertemplate:R.hovertemplate},w("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:R.colorbar,opacity:R.opacity,opacityscale:O.opacityscale,lightposition:R.lightposition,lighting:R.lighting,flatshading:R.flatshading,contour:R.contour,hoverinfo:l({},z.hoverinfo),showlegend:l({},z.showlegend,{dflt:!1})}),"calc","nested");c.x.editType=c.y.editType=c.z.editType=c.value.editType="calc+clearAxisTypes"}}),qKe=U({"src/traces/volume/defaults.js"(pe,le){var w=ii(),R=kbe(),O=Mbe().supplyIsoDefaults,z=Cbe().opacityscaleDefaults;le.exports=function(u,c,p,f){function v(h,m){return w.coerce(u,c,R,h,m)}O(u,c,p,f,v),z(u,c,f,v)}}}),GKe=U({"src/traces/volume/convert.js"(pe,le){var w=Fx().gl_mesh3d,R=II().parseColorScale,O=ii().isArrayOrTypedArray,z=kI(),l=vd().extractOpts,u=FF(),c=QZ().findNearestOnAxis,p=QZ().generateIsoMeshes;function f(m,_,x){this.scene=m,this.uid=x,this.mesh=_,this.name="",this.data=null,this.showContour=!1}var v=f.prototype;v.handlePick=function(m){if(m.object===this.mesh){var _=m.data.index,x=this.data._meshX[_],A=this.data._meshY[_],E=this.data._meshZ[_],D=this.data._Ys.length,g=this.data._Zs.length,C=c(x,this.data._Xs).id,I=c(A,this.data._Ys).id,N=c(E,this.data._Zs).id,F=m.index=N+g*I+g*D*C;m.traceCoordinate=[this.data._meshX[F],this.data._meshY[F],this.data._meshZ[F],this.data._value[F]];var k=this.data.hovertext||this.data.text;return O(k)&&k[F]!==void 0?m.textLabel=k[F]:k&&(m.textLabel=k),!0}},v.update=function(m){var _=this.scene,x=_.fullSceneLayout;this.data=p(m);function A(I,N,F,k){return N.map(function(P){return I.d2l(P,0,k)*F})}var E=u(A(x.xaxis,m._meshX,_.dataScale[0],m.xcalendar),A(x.yaxis,m._meshY,_.dataScale[1],m.ycalendar),A(x.zaxis,m._meshZ,_.dataScale[2],m.zcalendar)),D=u(m._meshI,m._meshJ,m._meshK),g={positions:E,cells:D,lightPosition:[m.lightposition.x,m.lightposition.y,m.lightposition.z],ambient:m.lighting.ambient,diffuse:m.lighting.diffuse,specular:m.lighting.specular,roughness:m.lighting.roughness,fresnel:m.lighting.fresnel,vertexNormalsEpsilon:m.lighting.vertexnormalsepsilon,faceNormalsEpsilon:m.lighting.facenormalsepsilon,opacity:m.opacity,opacityscale:m.opacityscale,contourEnable:m.contour.show,contourColor:z(m.contour.color).slice(0,3),contourWidth:m.contour.width,useFacetNormals:m.flatshading},C=l(m);g.vertexIntensity=m._meshIntensity,g.vertexIntensityBounds=[C.min,C.max],g.colormap=R(m),this.mesh.update(g)},v.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function h(m,_){var x=m.glplot.gl,A=w({gl:x}),E=new f(m,A,_.uid);return A._trace=E,E.update(_),m.glplot.add(A),E}le.exports=h}}),$Ke=U({"src/traces/volume/index.js"(pe,le){le.exports={attributes:kbe(),supplyDefaults:qKe(),calc:Rbe(),colorbar:{min:"cmin",max:"cmax"},plot:GKe(),moduleType:"trace",name:"volume",basePlotModule:j4(),categories:["gl3d","showLegend"],meta:{}}}}),WKe=U({"lib/volume.js"(pe,le){le.exports=$Ke()}}),YKe=U({"src/traces/mesh3d/defaults.js"(pe,le){var w=Mi(),R=ii(),O=wg(),z=NF();le.exports=function(u,c,p,f){function v(A,E){return R.coerce(u,c,z,A,E)}function h(A){var E=A.map(function(D){var g=v(D);return g&&R.isArrayOrTypedArray(g)?g:null});return E.every(function(D){return D&&D.length===E[0].length})&&E}var m=h(["x","y","z"]);if(!m){c.visible=!1;return}if(h(["i","j","k"]),c.i&&(!c.j||!c.k)||c.j&&(!c.k||!c.i)||c.k&&(!c.i||!c.j)){c.visible=!1;return}var _=w.getComponentMethod("calendars","handleTraceDefaults");_(u,c,["x","y","z"],f),["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(A){v(A)});var x=v("contour.show");x&&(v("contour.color"),v("contour.width")),"intensity"in u?(v("intensity"),v("intensitymode"),O(u,c,f,v,{prefix:"",cLetter:"c"})):(c.showscale=!1,"facecolor"in u?v("facecolor"):"vertexcolor"in u?v("vertexcolor"):v("color",p)),v("text"),v("hovertext"),v("hovertemplate"),v("xhoverformat"),v("yhoverformat"),v("zhoverformat"),c._length=null}}}),XKe=U({"src/traces/mesh3d/calc.js"(pe,le){var w=t0();le.exports=function(O,z){z.intensity&&w(O,z,{vals:z.intensity,containerStr:"",cLetter:"c"})}}}),ZKe=U({"src/traces/mesh3d/convert.js"(pe,le){var w=Fx().gl_mesh3d,R=Fx().delaunay_triangulate,O=Fx().alpha_shape,z=Fx().convex_hull,l=II().parseColorScale,u=ii().isArrayOrTypedArray,c=kI(),p=vd().extractOpts,f=FF();function v(g,C,I){this.scene=g,this.uid=I,this.mesh=C,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var h=v.prototype;h.handlePick=function(g){if(g.object===this.mesh){var C=g.index=g.data.index;g.data._cellCenter?g.traceCoordinate=g.data.dataCoordinate:g.traceCoordinate=[this.data.x[C],this.data.y[C],this.data.z[C]];var I=this.data.hovertext||this.data.text;return u(I)&&I[C]!==void 0?g.textLabel=I[C]:I&&(g.textLabel=I),!0}};function m(g){for(var C=[],I=g.length,N=0;N<I;N++)C[N]=c(g[N]);return C}function _(g,C,I,N){for(var F=[],k=C.length,P=0;P<k;P++)F[P]=g.d2l(C[P],0,N)*I;return F}function x(g){for(var C=[],I=g.length,N=0;N<I;N++)C[N]=Math.round(g[N]);return C}function A(g,C){for(var I=["x","y","z"].indexOf(g),N=[],F=C.length,k=0;k<F;k++)N[k]=[C[k][(I+1)%3],C[k][(I+2)%3]];return R(N)}function E(g,C){for(var I=g.length,N=0;N<I;N++)if(g[N]<=-.5||g[N]>=C-.5)return!1;return!0}h.update=function(g){var C=this.scene,I=C.fullSceneLayout;this.data=g;var N=g.x.length,F=f(_(I.xaxis,g.x,C.dataScale[0],g.xcalendar),_(I.yaxis,g.y,C.dataScale[1],g.ycalendar),_(I.zaxis,g.z,C.dataScale[2],g.zcalendar)),k;if(g.i&&g.j&&g.k){if(g.i.length!==g.j.length||g.j.length!==g.k.length||!E(g.i,N)||!E(g.j,N)||!E(g.k,N))return;k=f(x(g.i),x(g.j),x(g.k))}else g.alphahull===0?k=z(F):g.alphahull>0?k=O(g.alphahull,F):k=A(g.delaunayaxis,F);var P={positions:F,cells:k,lightPosition:[g.lightposition.x,g.lightposition.y,g.lightposition.z],ambient:g.lighting.ambient,diffuse:g.lighting.diffuse,specular:g.lighting.specular,roughness:g.lighting.roughness,fresnel:g.lighting.fresnel,vertexNormalsEpsilon:g.lighting.vertexnormalsepsilon,faceNormalsEpsilon:g.lighting.facenormalsepsilon,opacity:g.opacity,contourEnable:g.contour.show,contourColor:c(g.contour.color).slice(0,3),contourWidth:g.contour.width,useFacetNormals:g.flatshading};if(g.intensity){var T=p(g);this.color="#fff";var y=g.intensitymode;P[y+"Intensity"]=g.intensity,P[y+"IntensityBounds"]=[T.min,T.max],P.colormap=l(g)}else g.vertexcolor?(this.color=g.vertexcolor[0],P.vertexColors=m(g.vertexcolor)):g.facecolor?(this.color=g.facecolor[0],P.cellColors=m(g.facecolor)):(this.color=g.color,P.meshColor=c(g.color));this.mesh.update(P)},h.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function D(g,C){var I=g.glplot.gl,N=w({gl:I}),F=new v(g,N,C.uid);return N._trace=F,F.update(C),g.glplot.add(N),F}le.exports=D}}),KKe=U({"src/traces/mesh3d/index.js"(pe,le){le.exports={attributes:NF(),supplyDefaults:YKe(),calc:XKe(),colorbar:{min:"cmin",max:"cmax"},plot:ZKe(),moduleType:"trace",name:"mesh3d",basePlotModule:j4(),categories:["gl3d","showLegend"],meta:{}}}}),JKe=U({"lib/mesh3d.js"(pe,le){le.exports=KKe()}}),Ibe=U({"src/traces/cone/attributes.js"(pe,le){var w=Jd(),R=Wp().axisHoverFormat,O=Js().hovertemplateAttrs,z=NF(),l=Jn(),u=Ar().extendFlat,c={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:O({editType:"calc"},{keys:["norm"]}),uhoverformat:R("u",1),vhoverformat:R("v",1),whoverformat:R("w",1),xhoverformat:R("x"),yhoverformat:R("y"),zhoverformat:R("z"),showlegend:u({},l.showlegend,{dflt:!1})};u(c,w("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var p=["opacity","lightposition","lighting"];p.forEach(function(f){c[f]=z[f]}),c.hoverinfo=u({},l.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),le.exports=c}}),QKe=U({"src/traces/cone/defaults.js"(pe,le){var w=ii(),R=wg(),O=Ibe();le.exports=function(l,u,c,p){function f(D,g){return w.coerce(l,u,O,D,g)}var v=f("u"),h=f("v"),m=f("w"),_=f("x"),x=f("y"),A=f("z");if(!v||!v.length||!h||!h.length||!m||!m.length||!_||!_.length||!x||!x.length||!A||!A.length){u.visible=!1;return}var E=f("sizemode");f("sizeref",E==="raw"?1:.5),f("anchor"),f("lighting.ambient"),f("lighting.diffuse"),f("lighting.specular"),f("lighting.roughness"),f("lighting.fresnel"),f("lightposition.x"),f("lightposition.y"),f("lightposition.z"),R(l,u,p,f,{prefix:"",cLetter:"c"}),f("text"),f("hovertext"),f("hovertemplate"),f("uhoverformat"),f("vhoverformat"),f("whoverformat"),f("xhoverformat"),f("yhoverformat"),f("zhoverformat"),u._length=null}}}),eJe=U({"src/traces/cone/calc.js"(pe,le){var w=t0();le.exports=function(O,z){for(var l=z.u,u=z.v,c=z.w,p=Math.min(z.x.length,z.y.length,z.z.length,l.length,u.length,c.length),f=-1/0,v=1/0,h=0;h<p;h++){var m=l[h],_=u[h],x=c[h],A=Math.sqrt(m*m+_*_+x*x);f=Math.max(f,A),v=Math.min(v,A)}z._len=p,z._normMax=f,w(O,z,{vals:[v,f],containerStr:"",cLetter:"c"})}}}),tJe=U({"src/traces/cone/convert.js"(pe,le){var w=Fx().gl_cone3d,R=Fx().gl_cone3d.createConeMesh,O=ii().simpleMap,z=II().parseColorScale,l=vd().extractOpts,u=ii().isArrayOrTypedArray,c=FF();function p(A,E){this.scene=A,this.uid=E,this.mesh=null,this.data=null}var f=p.prototype;f.handlePick=function(A){if(A.object===this.mesh){var E=A.index=A.data.index,D=this.data.x[E],g=this.data.y[E],C=this.data.z[E],I=this.data.u[E],N=this.data.v[E],F=this.data.w[E];A.traceCoordinate=[D,g,C,I,N,F,Math.sqrt(I*I+N*N+F*F)];var k=this.data.hovertext||this.data.text;return u(k)&&k[E]!==void 0?A.textLabel=k[E]:k&&(A.textLabel=k),!0}};var v={xaxis:0,yaxis:1,zaxis:2},h={tip:1,tail:0,cm:.25,center:.5},m={tip:1,tail:1,cm:.75,center:.5};function _(A,E){var D=A.fullSceneLayout,g=A.dataScale,C={};function I(T,y){var S=D[y],M=g[v[y]];return O(T,function(W){return S.d2l(W)*M})}C.vectors=c(I(E.u,"xaxis"),I(E.v,"yaxis"),I(E.w,"zaxis"),E._len),C.positions=c(I(E.x,"xaxis"),I(E.y,"yaxis"),I(E.z,"zaxis"),E._len);var N=l(E);C.colormap=z(E),C.vertexIntensityBounds=[N.min/E._normMax,N.max/E._normMax],C.coneOffset=h[E.anchor];var F=E.sizemode;F==="scaled"?C.coneSize=E.sizeref||.5:F==="absolute"?C.coneSize=E.sizeref&&E._normMax?E.sizeref/E._normMax:.5:F==="raw"&&(C.coneSize=E.sizeref),C.coneSizemode=F;var k=w(C),P=E.lightposition;return k.lightPosition=[P.x,P.y,P.z],k.ambient=E.lighting.ambient,k.diffuse=E.lighting.diffuse,k.specular=E.lighting.specular,k.roughness=E.lighting.roughness,k.fresnel=E.lighting.fresnel,k.opacity=E.opacity,E._pad=m[E.anchor]*k.vectorScale*k.coneScale*E._normMax,k}f.update=function(A){this.data=A;var E=_(this.scene,A);this.mesh.update(E)},f.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function x(A,E){var D=A.glplot.gl,g=_(A,E),C=R(D,g),I=new p(A,E.uid);return I.mesh=C,I.data=E,C._trace=I,A.glplot.add(C),I}le.exports=x}}),rJe=U({"src/traces/cone/index.js"(pe,le){le.exports={moduleType:"trace",name:"cone",basePlotModule:j4(),categories:["gl3d","showLegend"],attributes:Ibe(),supplyDefaults:QKe(),colorbar:{min:"cmin",max:"cmax"},calc:eJe(),plot:tJe(),eventData:function(w,R){return w.norm=R.traceCoordinate[6],w},meta:{}}}}),nJe=U({"lib/cone.js"(pe,le){le.exports=rJe()}}),Pbe=U({"src/traces/streamtube/attributes.js"(pe,le){var w=Jd(),R=Wp().axisHoverFormat,O=Js().hovertemplateAttrs,z=NF(),l=Jn(),u=Ar().extendFlat,c={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:O({editType:"calc"},{keys:["tubex","tubey","tubez","tubeu","tubev","tubew","norm","divergence"]}),uhoverformat:R("u",1),vhoverformat:R("v",1),whoverformat:R("w",1),xhoverformat:R("x"),yhoverformat:R("y"),zhoverformat:R("z"),showlegend:u({},l.showlegend,{dflt:!1})};u(c,w("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var p=["opacity","lightposition","lighting"];p.forEach(function(f){c[f]=z[f]}),c.hoverinfo=u({},l.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","divergence","text","name"],dflt:"x+y+z+norm+text+name"}),le.exports=c}}),iJe=U({"src/traces/streamtube/defaults.js"(pe,le){var w=ii(),R=wg(),O=Pbe();le.exports=function(l,u,c,p){function f(E,D){return w.coerce(l,u,O,E,D)}var v=f("u"),h=f("v"),m=f("w"),_=f("x"),x=f("y"),A=f("z");if(!v||!v.length||!h||!h.length||!m||!m.length||!_||!_.length||!x||!x.length||!A||!A.length){u.visible=!1;return}f("starts.x"),f("starts.y"),f("starts.z"),f("maxdisplayed"),f("sizeref"),f("lighting.ambient"),f("lighting.diffuse"),f("lighting.specular"),f("lighting.roughness"),f("lighting.fresnel"),f("lightposition.x"),f("lightposition.y"),f("lightposition.z"),R(l,u,p,f,{prefix:"",cLetter:"c"}),f("text"),f("hovertext"),f("hovertemplate"),f("uhoverformat"),f("vhoverformat"),f("whoverformat"),f("xhoverformat"),f("yhoverformat"),f("zhoverformat"),u._length=null}}}),aJe=U({"src/traces/streamtube/convert.js"(pe,le){var w=Fx().gl_streamtube3d,R=w.createTubeMesh,O=ii(),z=II().parseColorScale,l=vd().extractOpts,u=FF(),c={xaxis:0,yaxis:1,zaxis:2};function p(x,A){this.scene=x,this.uid=A,this.mesh=null,this.data=null}var f=p.prototype;f.handlePick=function(x){var A=this.scene.fullSceneLayout,E=this.scene.dataScale;function D(I,N){var F=A[N],k=E[c[N]];return F.l2c(I)/k}if(x.object===this.mesh){var g=x.data.position,C=x.data.velocity;return x.traceCoordinate=[D(g[0],"xaxis"),D(g[1],"yaxis"),D(g[2],"zaxis"),D(C[0],"xaxis"),D(C[1],"yaxis"),D(C[2],"zaxis"),x.data.intensity*this.data._normMax,x.data.divergence],x.textLabel=this.data.hovertext||this.data.text,!0}};function v(x){var A=x.length,E;return A>2?E=x.slice(1,A-1):A===2?E=[(x[0]+x[1])/2]:E=x,E}function h(x){var A=x.length;return A===1?[.5,.5]:[x[1]-x[0],x[A-1]-x[A-2]]}function m(x,A){var E=x.fullSceneLayout,D=x.dataScale,g=A._len,C={};function I(Le,oe){var be=E[oe],_e=D[c[oe]];return O.simpleMap(Le,function(he){return be.d2l(he)*_e})}if(C.vectors=u(I(A._u,"xaxis"),I(A._v,"yaxis"),I(A._w,"zaxis"),g),!g)return{positions:[],cells:[]};var N=I(A._Xs,"xaxis"),F=I(A._Ys,"yaxis"),k=I(A._Zs,"zaxis");C.meshgrid=[N,F,k],C.gridFill=A._gridFill;var P=A._slen;if(P)C.startingPositions=u(I(A._startsX,"xaxis"),I(A._startsY,"yaxis"),I(A._startsZ,"zaxis"));else{for(var T=F[0],y=v(N),S=v(k),M=new Array(y.length*S.length),W=0,$=0;$<y.length;$++)for(var Z=0;Z<S.length;Z++)M[W++]=[y[$],T,S[Z]];C.startingPositions=M}C.colormap=z(A),C.tubeSize=A.sizeref,C.maxLength=A.maxdisplayed;var K=I(A._xbnds,"xaxis"),Q=I(A._ybnds,"yaxis"),J=I(A._zbnds,"zaxis"),G=h(N),ee=h(F),re=h(k),fe=[[K[0]-G[0],Q[0]-ee[0],J[0]-re[0]],[K[1]+G[1],Q[1]+ee[1],J[1]+re[1]]],we=w(C,fe),Oe=l(A);we.vertexIntensityBounds=[Oe.min/A._normMax,Oe.max/A._normMax];var ke=A.lightposition;return we.lightPosition=[ke.x,ke.y,ke.z],we.ambient=A.lighting.ambient,we.diffuse=A.lighting.diffuse,we.specular=A.lighting.specular,we.roughness=A.lighting.roughness,we.fresnel=A.lighting.fresnel,we.opacity=A.opacity,A._pad=we.tubeScale*A.sizeref*2,we}f.update=function(x){this.data=x;var A=m(this.scene,x);this.mesh.update(A)},f.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function _(x,A){var E=x.glplot.gl,D=m(x,A),g=R(E,D),C=new p(x,A.uid);return C.mesh=g,C.data=A,g._trace=C,x.glplot.add(g),C}le.exports=_}}),oJe=U({"src/traces/streamtube/index.js"(pe,le){le.exports={moduleType:"trace",name:"streamtube",basePlotModule:j4(),categories:["gl3d","showLegend"],attributes:Pbe(),supplyDefaults:iJe(),colorbar:{min:"cmin",max:"cmax"},calc:JZ().calc,plot:aJe(),eventData:function(w,R){return w.tubex=w.x,w.tubey=w.y,w.tubez=w.z,w.tubeu=R.traceCoordinate[3],w.tubev=R.traceCoordinate[4],w.tubew=R.traceCoordinate[5],w.norm=R.traceCoordinate[6],w.divergence=R.traceCoordinate[7],delete w.x,delete w.y,delete w.z,w},meta:{}}}}),sJe=U({"lib/streamtube.js"(pe,le){le.exports=oJe()}}),C6=U({"src/traces/scattergeo/attributes.js"(pe,le){var w=Js().hovertemplateAttrs,R=Js().texttemplateAttrs,O=Xc(),z=Kc(),l=Jn(),u=Jd(),c=jl().dash,p=Ar().extendFlat,f=zl().overrideAll,v=z.marker,h=z.line,m=v.line;le.exports=f({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:p({},z.mode,{dflt:"markers"}),text:p({},z.text,{}),texttemplate:R({editType:"plot"},{keys:["lat","lon","location","text"]}),hovertext:p({},z.hovertext,{}),textfont:z.textfont,textposition:z.textposition,line:{color:h.color,width:h.width,dash:c},connectgaps:z.connectgaps,marker:p({symbol:v.symbol,opacity:v.opacity,angle:v.angle,angleref:p({},v.angleref,{values:["previous","up","north"]}),standoff:v.standoff,size:v.size,sizeref:v.sizeref,sizemin:v.sizemin,sizemode:v.sizemode,colorbar:v.colorbar,line:p({width:m.width},u("marker.line")),gradient:v.gradient},u("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:O(),selected:z.selected,unselected:z.unselected,hoverinfo:p({},l.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:w()},"calc","nested")}}),lJe=U({"src/traces/scattergeo/defaults.js"(pe,le){var w=ii(),R=Qd(),O=r0(),z=Xy(),l=y0(),u=Ch(),c=C6(),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(" ");le.exports=function(v,h,m,_){function x(F,k){return w.coerce(v,h,c,F,k)}var A=x("locations"),E;if(A&&A.length){var D=x("geojson"),g;(typeof D=="string"&&D!==""||w.isPlainObject(D))&&(g="geojson-id");var C=x("locationmode",g);C==="country names"&&w.warn(p),C==="geojson-id"&&x("featureidkey"),E=A.length}else{var I=x("lon")||[],N=x("lat")||[];E=Math.min(I.length,N.length)}if(!E){h.visible=!1;return}h._length=E,x("text"),x("hovertext"),x("hovertemplate"),x("mode"),R.hasMarkers(h)&&O(v,h,m,_,x,{gradient:!0}),R.hasLines(h)&&(z(v,h,m,_,x),x("connectgaps")),R.hasText(h)&&(x("texttemplate"),l(v,h,_,x)),x("fill"),h.fill!=="none"&&u(v,h,m,x),w.coerceSelectionMarkerOpacity(h,x)}}}),uJe=U({"src/traces/scattergeo/format_labels.js"(pe,le){var w=Yu();le.exports=function(O,z,l){var u={},c=l[z.geo]._subplot,p=c.mockAxis,f=O.lonlat;return u.lonLabel=w.tickText(p,p.c2l(f[0]),!0).text,u.latLabel=w.tickText(p,p.c2l(f[1]),!0).text,u}}}),eK=U({"src/traces/scattergeo/calc.js"(pe,le){var w=_t(),R=Dt().BADNUM,O=b0(),z=zm(),l=k1(),u=ii().isArrayOrTypedArray,c=ii()._;function p(f){return f&&typeof f=="string"}le.exports=function(v,h){var m=u(h.locations),_=m?h.locations.length:h._length,x=new Array(_),A;h.geojson?A=function(N){return p(N)||w(N)}:A=p;for(var E=0;E<_;E++){var D=x[E]={};if(m){var g=h.locations[E];D.loc=A(g)?g:null}else{var C=h.lon[E],I=h.lat[E];w(C)&&w(I)?D.lonlat=[+C,+I]:D.lonlat=[R,R]}}return z(x,h),O(v,h),l(x,h),_&&(x[0].t={labels:{lat:c(v,"lat:")+" ",lon:c(v,"lon:")+" "}}),x}}}),BU=U({"src/plots/geo/constants.js"(pe){pe.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"},pe.axesNames=["lonaxis","lataxis"],pe.lonaxisSpan={orthographic:180,"azimuthal equal area":360,"azimuthal equidistant":360,"conic conformal":180,gnomonic:160,stereographic:180,"transverse mercator":180,"*":360},pe.lataxisSpan={"conic conformal":150,stereographic:179.5,"*":180},pe.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]}},pe.clipPad=.001,pe.precision=.1,pe.landColor="#F0DC82",pe.waterColor="#3399FF",pe.locationmodeToLayer={"ISO-3":"countries","USA-states":"subunits","country names":"countries"},pe.sphereSVG={type:"Sphere"},pe.fillLayers={ocean:1,land:1,lakes:1},pe.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1},pe.layers=["bg","ocean","land","lakes","subunits","countries","coastlines","rivers","lataxis","lonaxis","frame","backplot","frontplot"],pe.layersForChoropleth=["bg","ocean","land","subunits","countries","coastlines","lataxis","lonaxis","frame","backplot","rivers","lakes","frontplot"],pe.layerNameToAdjective={ocean:"ocean",land:"land",lakes:"lake",subunits:"subunit",countries:"country",coastlines:"coastline",rivers:"river",frame:"frame"}}}),Dbe=U({"node_modules/topojson-client/dist/topojson-client.js"(pe,le){(function(w,R){typeof pe=="object"&&typeof le<"u"?R(pe):(w=w||self,R(w.topojson=w.topojson||{}))})(pe,function(w){function R(I){return I}function O(I){if(I==null)return R;var N,F,k=I.scale[0],P=I.scale[1],T=I.translate[0],y=I.translate[1];return function(S,M){M||(N=F=0);var W=2,$=S.length,Z=new Array($);for(Z[0]=(N+=S[0])*k+T,Z[1]=(F+=S[1])*P+y;W<$;)Z[W]=S[W],++W;return Z}}function z(I){var N=O(I.transform),F,k=1/0,P=k,T=-k,y=-k;function S(W){W=N(W),W[0]<k&&(k=W[0]),W[0]>T&&(T=W[0]),W[1]<P&&(P=W[1]),W[1]>y&&(y=W[1])}function M(W){switch(W.type){case"GeometryCollection":W.geometries.forEach(M);break;case"Point":S(W.coordinates);break;case"MultiPoint":W.coordinates.forEach(S);break}}I.arcs.forEach(function(W){for(var $=-1,Z=W.length,K;++$<Z;)K=N(W[$],$),K[0]<k&&(k=K[0]),K[0]>T&&(T=K[0]),K[1]<P&&(P=K[1]),K[1]>y&&(y=K[1])});for(F in I.objects)M(I.objects[F]);return[k,P,T,y]}function l(I,N){for(var F,k=I.length,P=k-N;P<--k;)F=I[P],I[P++]=I[k],I[k]=F}function u(I,N){return typeof N=="string"&&(N=I.objects[N]),N.type==="GeometryCollection"?{type:"FeatureCollection",features:N.geometries.map(function(F){return c(I,F)})}:c(I,N)}function c(I,N){var F=N.id,k=N.bbox,P=N.properties==null?{}:N.properties,T=p(I,N);return F==null&&k==null?{type:"Feature",properties:P,geometry:T}:k==null?{type:"Feature",id:F,properties:P,geometry:T}:{type:"Feature",id:F,bbox:k,properties:P,geometry:T}}function p(I,N){var F=O(I.transform),k=I.arcs;function P($,Z){Z.length&&Z.pop();for(var K=k[$<0?~$:$],Q=0,J=K.length;Q<J;++Q)Z.push(F(K[Q],Q));$<0&&l(Z,J)}function T($){return F($)}function y($){for(var Z=[],K=0,Q=$.length;K<Q;++K)P($[K],Z);return Z.length<2&&Z.push(Z[0]),Z}function S($){for(var Z=y($);Z.length<4;)Z.push(Z[0]);return Z}function M($){return $.map(S)}function W($){var Z=$.type,K;switch(Z){case"GeometryCollection":return{type:Z,geometries:$.geometries.map(W)};case"Point":K=T($.coordinates);break;case"MultiPoint":K=$.coordinates.map(T);break;case"LineString":K=y($.arcs);break;case"MultiLineString":K=$.arcs.map(y);break;case"Polygon":K=M($.arcs);break;case"MultiPolygon":K=$.arcs.map(M);break;default:return null}return{type:Z,coordinates:K}}return W(N)}function f(I,N){var F={},k={},P={},T=[],y=-1;N.forEach(function(W,$){var Z=I.arcs[W<0?~W:W],K;Z.length<3&&!Z[1][0]&&!Z[1][1]&&(K=N[++y],N[y]=W,N[$]=K)}),N.forEach(function(W){var $=S(W),Z=$[0],K=$[1],Q,J;if(Q=P[Z])if(delete P[Q.end],Q.push(W),Q.end=K,J=k[K]){delete k[J.start];var G=J===Q?Q:Q.concat(J);k[G.start=Q.start]=P[G.end=J.end]=G}else k[Q.start]=P[Q.end]=Q;else if(Q=k[K])if(delete k[Q.start],Q.unshift(W),Q.start=Z,J=P[Z]){delete P[J.end];var ee=J===Q?Q:J.concat(Q);k[ee.start=J.start]=P[ee.end=Q.end]=ee}else k[Q.start]=P[Q.end]=Q;else Q=[W],k[Q.start=Z]=P[Q.end=K]=Q});function S(W){var $=I.arcs[W<0?~W:W],Z=$[0],K;return I.transform?(K=[0,0],$.forEach(function(Q){K[0]+=Q[0],K[1]+=Q[1]})):K=$[$.length-1],W<0?[K,Z]:[Z,K]}function M(W,$){for(var Z in W){var K=W[Z];delete $[K.start],delete K.start,delete K.end,K.forEach(function(Q){F[Q<0?~Q:Q]=1}),T.push(K)}}return M(P,k),M(k,P),N.forEach(function(W){F[W<0?~W:W]||T.push([W])}),T}function v(I){return p(I,h.apply(this,arguments))}function h(I,N,F){var k,P,T;if(arguments.length>1)k=m(I,N,F);else for(P=0,k=new Array(T=I.arcs.length);P<T;++P)k[P]=P;return{type:"MultiLineString",arcs:f(I,k)}}function m(I,N,F){var k=[],P=[],T;function y(Z){var K=Z<0?~Z:Z;(P[K]||(P[K]=[])).push({i:Z,g:T})}function S(Z){Z.forEach(y)}function M(Z){Z.forEach(S)}function W(Z){Z.forEach(M)}function $(Z){switch(T=Z,Z.type){case"GeometryCollection":Z.geometries.forEach($);break;case"LineString":S(Z.arcs);break;case"MultiLineString":case"Polygon":M(Z.arcs);break;case"MultiPolygon":W(Z.arcs);break}}return $(N),P.forEach(F==null?function(Z){k.push(Z[0].i)}:function(Z){F(Z[0].g,Z[Z.length-1].g)&&k.push(Z[0].i)}),k}function _(I){for(var N=-1,F=I.length,k,P=I[F-1],T=0;++N<F;)k=P,P=I[N],T+=k[0]*P[1]-k[1]*P[0];return Math.abs(T)}function x(I){return p(I,A.apply(this,arguments))}function A(I,N){var F={},k=[],P=[];N.forEach(T);function T(M){switch(M.type){case"GeometryCollection":M.geometries.forEach(T);break;case"Polygon":y(M.arcs);break;case"MultiPolygon":M.arcs.forEach(y);break}}function y(M){M.forEach(function(W){W.forEach(function($){(F[$=$<0?~$:$]||(F[$]=[])).push(M)})}),k.push(M)}function S(M){return _(p(I,{type:"Polygon",arcs:[M]}).coordinates[0])}return k.forEach(function(M){if(!M._){var W=[],$=[M];for(M._=1,P.push(W);M=$.pop();)W.push(M),M.forEach(function(Z){Z.forEach(function(K){F[K<0?~K:K].forEach(function(Q){Q._||(Q._=1,$.push(Q))})})})}}),k.forEach(function(M){delete M._}),{type:"MultiPolygon",arcs:P.map(function(M){var W=[],$;if(M.forEach(function(G){G.forEach(function(ee){ee.forEach(function(re){F[re<0?~re:re].length<2&&W.push(re)})})}),W=f(I,W),($=W.length)>1)for(var Z=1,K=S(W[0]),Q,J;Z<$;++Z)(Q=S(W[Z]))>K&&(J=W[0],W[0]=W[Z],W[Z]=J,K=Q);return W}).filter(function(M){return M.length>0})}}function E(I,N){for(var F=0,k=I.length;F<k;){var P=F+k>>>1;I[P]<N?F=P+1:k=P}return F}function D(I){var N={},F=I.map(function(){return[]});function k(G,ee){G.forEach(function(re){re<0&&(re=~re);var fe=N[re];fe?fe.push(ee):N[re]=[ee]})}function P(G,ee){G.forEach(function(re){k(re,ee)})}function T(G,ee){G.type==="GeometryCollection"?G.geometries.forEach(function(re){T(re,ee)}):G.type in y&&y[G.type](G.arcs,ee)}var y={LineString:k,MultiLineString:P,Polygon:P,MultiPolygon:function(G,ee){G.forEach(function(re){P(re,ee)})}};I.forEach(T);for(var S in N)for(var M=N[S],W=M.length,$=0;$<W;++$)for(var Z=$+1;Z<W;++Z){var K=M[$],Q=M[Z],J;(J=F[K])[S=E(J,Q)]!==Q&&J.splice(S,0,Q),(J=F[Q])[S=E(J,K)]!==K&&J.splice(S,0,K)}return F}function g(I){if(I==null)return R;var N,F,k=I.scale[0],P=I.scale[1],T=I.translate[0],y=I.translate[1];return function(S,M){M||(N=F=0);var W=2,$=S.length,Z=new Array($),K=Math.round((S[0]-T)/k),Q=Math.round((S[1]-y)/P);for(Z[0]=K-N,N=K,Z[1]=Q-F,F=Q;W<$;)Z[W]=S[W],++W;return Z}}function C(I,N){if(I.transform)throw new Error("already quantized");if(!N||!N.scale){if(!((y=Math.floor(N))>=2))throw new Error("n must be ≥2");M=I.bbox||z(I);var F=M[0],k=M[1],P=M[2],T=M[3],y;N={scale:[P-F?(P-F)/(y-1):1,T-k?(T-k)/(y-1):1],translate:[F,k]}}else M=I.bbox;var S=g(N),M,W,$=I.objects,Z={};function K(G){return S(G)}function Q(G){var ee;switch(G.type){case"GeometryCollection":ee={type:"GeometryCollection",geometries:G.geometries.map(Q)};break;case"Point":ee={type:"Point",coordinates:K(G.coordinates)};break;case"MultiPoint":ee={type:"MultiPoint",coordinates:G.coordinates.map(K)};break;default:return G}return G.id!=null&&(ee.id=G.id),G.bbox!=null&&(ee.bbox=G.bbox),G.properties!=null&&(ee.properties=G.properties),ee}function J(G){var ee=0,re=1,fe=G.length,we,Oe=new Array(fe);for(Oe[0]=S(G[0],0);++ee<fe;)((we=S(G[ee],ee))[0]||we[1])&&(Oe[re++]=we);return re===1&&(Oe[re++]=[0,0]),Oe.length=re,Oe}for(W in $)Z[W]=Q($[W]);return{type:"Topology",bbox:M,transform:N,objects:Z,arcs:I.arcs.map(J)}}w.bbox=z,w.feature=u,w.merge=x,w.mergeArcs=A,w.mesh=v,w.meshArcs=h,w.neighbors=D,w.quantize=C,w.transform=O,w.untransform=g,Object.defineProperty(w,"__esModule",{value:!0})})}}),tK=U({"src/lib/topojson_utils.js"(pe,le){var w=le.exports={},R=BU().locationmodeToLayer,O=Dbe().feature;w.getTopojsonName=function(z){return[z.scope.replace(/ /g,"-"),"_",z.resolution.toString(),"m"].join("")},w.getTopojsonPath=function(z,l){return z+=z.endsWith("/")?"":"/",`${z}${l}.json`},w.getTopojsonFeatures=function(z,l){var u=R[z.locationmode],c=l.objects[u];return O(l,c).features}}}),V4=U({"src/lib/geojson_utils.js"(pe){var le=Dt().BADNUM;pe.calcTraceToLineCoords=function(w){for(var R=w[0].trace,O=R.connectgaps,z=[],l=[],u=0;u<w.length;u++){var c=w[u],p=c.lonlat;p[0]!==le?l.push(p):!O&&l.length>0&&(z.push(l),l=[])}return l.length>0&&z.push(l),z},pe.makeLine=function(w){return w.length===1?{type:"LineString",coordinates:w[0]}:{type:"MultiLineString",coordinates:w}},pe.makePolygon=function(w){if(w.length===1)return{type:"Polygon",coordinates:w};for(var R=new Array(w.length),O=0;O<w.length;O++)R[O]=[w[O]];return{type:"MultiPolygon",coordinates:R}},pe.makeBlank=function(){return{type:"Point",coordinates:[]}}}}),cJe=U({"node_modules/country-regex/index.js"(pe,le){le.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"}}}),rK=U({"node_modules/@turf/helpers/dist/cjs/index.cjs"(pe){Object.defineProperty(pe,"__esModule",{value:!0});var le=63710088e-1,w={centimeters:le*100,centimetres:le*100,degrees:360/(2*Math.PI),feet:le*3.28084,inches:le*39.37,kilometers:le/1e3,kilometres:le/1e3,meters:le,metres:le,miles:le/1609.344,millimeters:le*1e3,millimetres:le*1e3,nauticalmiles:le/1852,radians:1,yards:le*1.0936},R={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:29155334959812285e-23,millimeters:1e6,millimetres:1e6,yards:1.195990046};function O($,Z,K={}){const Q={type:"Feature"};return(K.id===0||K.id)&&(Q.id=K.id),K.bbox&&(Q.bbox=K.bbox),Q.properties=Z||{},Q.geometry=$,Q}function z($,Z,K={}){switch($){case"Point":return l(Z).geometry;case"LineString":return f(Z).geometry;case"Polygon":return c(Z).geometry;case"MultiPoint":return _(Z).geometry;case"MultiLineString":return m(Z).geometry;case"MultiPolygon":return x(Z).geometry;default:throw new Error($+" is invalid")}}function l($,Z,K={}){if(!$)throw new Error("coordinates is required");if(!Array.isArray($))throw new Error("coordinates must be an Array");if($.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!y($[0])||!y($[1]))throw new Error("coordinates must contain numbers");return O({type:"Point",coordinates:$},Z,K)}function u($,Z,K={}){return h($.map(Q=>l(Q,Z)),K)}function c($,Z,K={}){for(const J of $){if(J.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(J[J.length-1].length!==J[0].length)throw new Error("First and last Position are not equivalent.");for(let G=0;G<J[J.length-1].length;G++)if(J[J.length-1][G]!==J[0][G])throw new Error("First and last Position are not equivalent.")}return O({type:"Polygon",coordinates:$},Z,K)}function p($,Z,K={}){return h($.map(Q=>c(Q,Z)),K)}function f($,Z,K={}){if($.length<2)throw new Error("coordinates must be an array of two or more positions");return O({type:"LineString",coordinates:$},Z,K)}function v($,Z,K={}){return h($.map(Q=>f(Q,Z)),K)}function h($,Z={}){const K={type:"FeatureCollection"};return Z.id&&(K.id=Z.id),Z.bbox&&(K.bbox=Z.bbox),K.features=$,K}function m($,Z,K={}){return O({type:"MultiLineString",coordinates:$},Z,K)}function _($,Z,K={}){return O({type:"MultiPoint",coordinates:$},Z,K)}function x($,Z,K={}){return O({type:"MultiPolygon",coordinates:$},Z,K)}function A($,Z,K={}){return O({type:"GeometryCollection",geometries:$},Z,K)}function E($,Z=0){if(Z&&!(Z>=0))throw new Error("precision must be a positive number");const K=Math.pow(10,Z||0);return Math.round($*K)/K}function D($,Z="kilometers"){const K=w[Z];if(!K)throw new Error(Z+" units is invalid");return $*K}function g($,Z="kilometers"){const K=w[Z];if(!K)throw new Error(Z+" units is invalid");return $/K}function C($,Z){return F(g($,Z))}function I($){let Z=$%360;return Z<0&&(Z+=360),Z}function N($){return $=$%360,$>180?$-360:$<-180?$+360:$}function F($){return $%(2*Math.PI)*180/Math.PI}function k($){return $%360*Math.PI/180}function P($,Z="kilometers",K="kilometers"){if(!($>=0))throw new Error("length must be a positive number");return D(g($,Z),K)}function T($,Z="meters",K="kilometers"){if(!($>=0))throw new Error("area must be a positive number");const Q=R[Z];if(!Q)throw new Error("invalid original units");const J=R[K];if(!J)throw new Error("invalid final units");return $/Q*J}function y($){return!isNaN($)&&$!==null&&!Array.isArray($)}function S($){return $!==null&&typeof $=="object"&&!Array.isArray($)}function M($){if(!$)throw new Error("bbox is required");if(!Array.isArray($))throw new Error("bbox must be an Array");if($.length!==4&&$.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");$.forEach(Z=>{if(!y(Z))throw new Error("bbox must only contain numbers")})}function W($){if(!$)throw new Error("id is required");if(["string","number"].indexOf(typeof $)===-1)throw new Error("id must be a number or a string")}pe.areaFactors=R,pe.azimuthToBearing=N,pe.bearingToAzimuth=I,pe.convertArea=T,pe.convertLength=P,pe.degreesToRadians=k,pe.earthRadius=le,pe.factors=w,pe.feature=O,pe.featureCollection=h,pe.geometry=z,pe.geometryCollection=A,pe.isNumber=y,pe.isObject=S,pe.lengthToDegrees=C,pe.lengthToRadians=g,pe.lineString=f,pe.lineStrings=v,pe.multiLineString=m,pe.multiPoint=_,pe.multiPolygon=x,pe.point=l,pe.points=u,pe.polygon=c,pe.polygons=p,pe.radiansToDegrees=F,pe.radiansToLength=D,pe.round=E,pe.validateBBox=M,pe.validateId=W}}),nK=U({"node_modules/@turf/meta/dist/cjs/index.cjs"(pe){Object.defineProperty(pe,"__esModule",{value:!0});var le=rK();function w(g,C,I){if(g!==null)for(var N,F,k,P,T,y,S,M=0,W=0,$,Z=g.type,K=Z==="FeatureCollection",Q=Z==="Feature",J=K?g.features.length:1,G=0;G<J;G++){S=K?g.features[G].geometry:Q?g.geometry:g,$=S?S.type==="GeometryCollection":!1,T=$?S.geometries.length:1;for(var ee=0;ee<T;ee++){var re=0,fe=0;if(P=$?S.geometries[ee]:S,P!==null){y=P.coordinates;var we=P.type;switch(M=I&&(we==="Polygon"||we==="MultiPolygon")?1:0,we){case null:break;case"Point":if(C(y,W,G,re,fe)===!1)return!1;W++,re++;break;case"LineString":case"MultiPoint":for(N=0;N<y.length;N++){if(C(y[N],W,G,re,fe)===!1)return!1;W++,we==="MultiPoint"&&re++}we==="LineString"&&re++;break;case"Polygon":case"MultiLineString":for(N=0;N<y.length;N++){for(F=0;F<y[N].length-M;F++){if(C(y[N][F],W,G,re,fe)===!1)return!1;W++}we==="MultiLineString"&&re++,we==="Polygon"&&fe++}we==="Polygon"&&re++;break;case"MultiPolygon":for(N=0;N<y.length;N++){for(fe=0,F=0;F<y[N].length;F++){for(k=0;k<y[N][F].length-M;k++){if(C(y[N][F][k],W,G,re,fe)===!1)return!1;W++}fe++}re++}break;case"GeometryCollection":for(N=0;N<P.geometries.length;N++)if(w(P.geometries[N],C,I)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function R(g,C,I,N){var F=I;return w(g,function(k,P,T,y,S){P===0&&I===void 0?F=k:F=C(F,k,P,T,y,S)},N),F}function O(g,C){var I;switch(g.type){case"FeatureCollection":for(I=0;I<g.features.length&&C(g.features[I].properties,I)!==!1;I++);break;case"Feature":C(g.properties,0);break}}function z(g,C,I){var N=I;return O(g,function(F,k){k===0&&I===void 0?N=F:N=C(N,F,k)}),N}function l(g,C){if(g.type==="Feature")C(g,0);else if(g.type==="FeatureCollection")for(var I=0;I<g.features.length&&C(g.features[I],I)!==!1;I++);}function u(g,C,I){var N=I;return l(g,function(F,k){k===0&&I===void 0?N=F:N=C(N,F,k)}),N}function c(g){var C=[];return w(g,function(I){C.push(I)}),C}function p(g,C){var I,N,F,k,P,T,y,S,M,W,$=0,Z=g.type==="FeatureCollection",K=g.type==="Feature",Q=Z?g.features.length:1;for(I=0;I<Q;I++){for(T=Z?g.features[I].geometry:K?g.geometry:g,S=Z?g.features[I].properties:K?g.properties:{},M=Z?g.features[I].bbox:K?g.bbox:void 0,W=Z?g.features[I].id:K?g.id:void 0,y=T?T.type==="GeometryCollection":!1,P=y?T.geometries.length:1,F=0;F<P;F++){if(k=y?T.geometries[F]:T,k===null){if(C(null,$,S,M,W)===!1)return!1;continue}switch(k.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(C(k,$,S,M,W)===!1)return!1;break}case"GeometryCollection":{for(N=0;N<k.geometries.length;N++)if(C(k.geometries[N],$,S,M,W)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}$++}}function f(g,C,I){var N=I;return p(g,function(F,k,P,T,y){k===0&&I===void 0?N=F:N=C(N,F,k,P,T,y)}),N}function v(g,C){p(g,function(I,N,F,k,P){var T=I===null?null:I.type;switch(T){case null:case"Point":case"LineString":case"Polygon":return C(le.feature.call(void 0,I,F,{bbox:k,id:P}),N,0)===!1?!1:void 0}var y;switch(T){case"MultiPoint":y="Point";break;case"MultiLineString":y="LineString";break;case"MultiPolygon":y="Polygon";break}for(var S=0;S<I.coordinates.length;S++){var M=I.coordinates[S],W={type:y,coordinates:M};if(C(le.feature.call(void 0,W,F),N,S)===!1)return!1}})}function h(g,C,I){var N=I;return v(g,function(F,k,P){k===0&&P===0&&I===void 0?N=F:N=C(N,F,k,P)}),N}function m(g,C){v(g,function(I,N,F){var k=0;if(I.geometry){var P=I.geometry.type;if(!(P==="Point"||P==="MultiPoint")){var T,y=0,S=0,M=0;if(w(I,function(W,$,Z,K,Q){if(T===void 0||N>y||K>S||Q>M){T=W,y=N,S=K,M=Q,k=0;return}var J=le.lineString.call(void 0,[T,W],I.properties);if(C(J,N,F,Q,k)===!1)return!1;k++,T=W})===!1)return!1}}})}function _(g,C,I){var N=I,F=!1;return m(g,function(k,P,T,y,S){F===!1&&I===void 0?N=k:N=C(N,k,P,T,y,S),F=!0}),N}function x(g,C){if(!g)throw new Error("geojson is required");v(g,function(I,N,F){if(I.geometry!==null){var k=I.geometry.type,P=I.geometry.coordinates;switch(k){case"LineString":if(C(I,N,F,0,0)===!1)return!1;break;case"Polygon":for(var T=0;T<P.length;T++)if(C(le.lineString.call(void 0,P[T],I.properties),N,F,T)===!1)return!1;break}}})}function A(g,C,I){var N=I;return x(g,function(F,k,P,T){k===0&&I===void 0?N=F:N=C(N,F,k,P,T)}),N}function E(g,C){if(C=C||{},!le.isObject.call(void 0,C))throw new Error("options is invalid");var I=C.featureIndex||0,N=C.multiFeatureIndex||0,F=C.geometryIndex||0,k=C.segmentIndex||0,P=C.properties,T;switch(g.type){case"FeatureCollection":I<0&&(I=g.features.length+I),P=P||g.features[I].properties,T=g.features[I].geometry;break;case"Feature":P=P||g.properties,T=g.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":T=g;break;default:throw new Error("geojson is invalid")}if(T===null)return null;var y=T.coordinates;switch(T.type){case"Point":case"MultiPoint":return null;case"LineString":return k<0&&(k=y.length+k-1),le.lineString.call(void 0,[y[k],y[k+1]],P,C);case"Polygon":return F<0&&(F=y.length+F),k<0&&(k=y[F].length+k-1),le.lineString.call(void 0,[y[F][k],y[F][k+1]],P,C);case"MultiLineString":return N<0&&(N=y.length+N),k<0&&(k=y[N].length+k-1),le.lineString.call(void 0,[y[N][k],y[N][k+1]],P,C);case"MultiPolygon":return N<0&&(N=y.length+N),F<0&&(F=y[N].length+F),k<0&&(k=y[N][F].length-k-1),le.lineString.call(void 0,[y[N][F][k],y[N][F][k+1]],P,C)}throw new Error("geojson is invalid")}function D(g,C){if(C=C||{},!le.isObject.call(void 0,C))throw new Error("options is invalid");var I=C.featureIndex||0,N=C.multiFeatureIndex||0,F=C.geometryIndex||0,k=C.coordIndex||0,P=C.properties,T;switch(g.type){case"FeatureCollection":I<0&&(I=g.features.length+I),P=P||g.features[I].properties,T=g.features[I].geometry;break;case"Feature":P=P||g.properties,T=g.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":T=g;break;default:throw new Error("geojson is invalid")}if(T===null)return null;var y=T.coordinates;switch(T.type){case"Point":return le.point.call(void 0,y,P,C);case"MultiPoint":return N<0&&(N=y.length+N),le.point.call(void 0,y[N],P,C);case"LineString":return k<0&&(k=y.length+k),le.point.call(void 0,y[k],P,C);case"Polygon":return F<0&&(F=y.length+F),k<0&&(k=y[F].length+k),le.point.call(void 0,y[F][k],P,C);case"MultiLineString":return N<0&&(N=y.length+N),k<0&&(k=y[N].length+k),le.point.call(void 0,y[N][k],P,C);case"MultiPolygon":return N<0&&(N=y.length+N),F<0&&(F=y[N].length+F),k<0&&(k=y[N][F].length-k),le.point.call(void 0,y[N][F][k],P,C)}throw new Error("geojson is invalid")}pe.coordAll=c,pe.coordEach=w,pe.coordReduce=R,pe.featureEach=l,pe.featureReduce=u,pe.findPoint=D,pe.findSegment=E,pe.flattenEach=v,pe.flattenReduce=h,pe.geomEach=p,pe.geomReduce=f,pe.lineEach=x,pe.lineReduce=A,pe.propEach=O,pe.propReduce=z,pe.segmentEach=m,pe.segmentReduce=_}}),fJe=U({"node_modules/@turf/area/dist/cjs/index.cjs"(pe){Object.defineProperty(pe,"__esModule",{value:!0});var le=rK(),w=nK();function R(f){return w.geomReduce.call(void 0,f,(v,h)=>v+O(h),0)}function O(f){let v=0,h;switch(f.type){case"Polygon":return z(f.coordinates);case"MultiPolygon":for(h=0;h<f.coordinates.length;h++)v+=z(f.coordinates[h]);return v;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}function z(f){let v=0;if(f&&f.length>0){v+=Math.abs(c(f[0]));for(let h=1;h<f.length;h++)v-=Math.abs(c(f[h]))}return v}var l=le.earthRadius*le.earthRadius/2,u=Math.PI/180;function c(f){const v=f.length-1;if(v<=2)return 0;let h=0,m=0;for(;m<v;){const _=f[m],x=f[m+1===v?0:m+1],A=f[m+2>=v?(m+2)%v:m+2],E=_[0]*u,D=x[1]*u,g=A[0]*u;h+=(g-E)*Math.sin(D),m++}return h*l}var p=R;pe.area=R,pe.default=p}}),dJe=U({"node_modules/@turf/centroid/dist/cjs/index.cjs"(pe){Object.defineProperty(pe,"__esModule",{value:!0});var le=rK(),w=nK();function R(z,l={}){let u=0,c=0,p=0;return w.coordEach.call(void 0,z,function(f){u+=f[0],c+=f[1],p++},!0),le.point.call(void 0,[u/p,c/p],l.properties)}var O=R;pe.centroid=R,pe.default=O}}),hJe=U({"node_modules/@turf/bbox/dist/cjs/index.cjs"(pe){Object.defineProperty(pe,"__esModule",{value:!0});var le=nK();function w(O,z={}){if(O.bbox!=null&&z.recompute!==!0)return O.bbox;const l=[1/0,1/0,-1/0,-1/0];return le.coordEach.call(void 0,O,u=>{l[0]>u[0]&&(l[0]=u[0]),l[1]>u[1]&&(l[1]=u[1]),l[2]<u[0]&&(l[2]=u[0]),l[3]<u[1]&&(l[3]=u[1])}),l}var R=w;pe.bbox=w,pe.default=R}}),q4=U({"src/lib/geo_location_utils.js"(pe,le){var w=Ze(),R=cJe(),{area:O}=fJe(),{centroid:z}=dJe(),{bbox:l}=hJe(),u=Dn(),c=gi(),p=Lt(),f=Zt(),v=RE(),h=Object.keys(R),m={"ISO-3":u,"USA-states":u,"country names":_};function _(N){for(var F=0;F<h.length;F++){var k=h[F],P=new RegExp(R[k]);if(P.test(N.trim().toLowerCase()))return k}return c.log("Unrecognized country name: "+N+"."),!1}function x(N,F,k){if(!F||typeof F!="string")return!1;var P=m[N](F),T,y,S;if(P){if(N==="USA-states")for(T=[],S=0;S<k.length;S++)y=k[S],y.properties&&y.properties.gu&&y.properties.gu==="USA"&&T.push(y);else T=k;for(S=0;S<T.length;S++)if(y=T[S],y.id===P)return y;c.log(["Location with id",P,"does not have a matching topojson feature at this resolution."].join(" "))}return!1}function A(N){var F=N.geometry,k=F.coordinates,P=N.id,T=[],y,S,M,W;function $(Z){for(var K=0;K<Z.length-1;K++)if(Z[K][0]>0&&Z[K+1][0]<0)return K;return null}switch(P==="RUS"||P==="FJI"?y=function(Z){var K;if($(Z)===null)K=Z;else for(K=new Array(Z.length),W=0;W<Z.length;W++)K[W]=[Z[W][0]<0?Z[W][0]+360:Z[W][0],Z[W][1]];T.push(v.tester(K))}:P==="ATA"?y=function(Z){var K=$(Z);if(K===null)return T.push(v.tester(Z));var Q=new Array(Z.length+1),J=0;for(W=0;W<Z.length;W++)W>K?Q[J++]=[Z[W][0]+360,Z[W][1]]:W===K?(Q[J++]=Z[W],Q[J++]=[Z[W][0],-90]):Q[J++]=Z[W];var G=v.tester(Q);G.pts.pop(),T.push(G)}:y=function(Z){T.push(v.tester(Z))},F.type){case"MultiPolygon":for(S=0;S<k.length;S++)for(M=0;M<k[S].length;M++)y(k[S][M]);break;case"Polygon":for(S=0;S<k.length;S++)y(k[S]);break}return T}function E(N){var F=N.geojson,k=window.PlotlyGeoAssets||{},P=typeof F=="string"?k[F]:F;return p(P)?P:(c.error("Oops ... something went wrong when fetching "+F),!1)}function D(N){var F=N[0].trace,k=E(F);if(!k)return!1;var P={},T=[],y;for(y=0;y<F._length;y++){var S=N[y];(S.loc||S.loc===0)&&(P[S.loc]=S)}function M(Z){var K=f(Z,F.featureidkey||"id").get(),Q=P[K];if(Q){var J=Z.geometry;if(J.type==="Polygon"||J.type==="MultiPolygon"){var G={type:"Feature",id:K,geometry:J,properties:{}};G.geometry.coordinates.length>0?G.properties.ct=g(G):G.properties.ct=[NaN,NaN],Q.fIn=Z,Q.fOut=G,T.push(G)}else c.log(["Location",Q.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete P[K]}switch(k.type){case"FeatureCollection":var W=k.features;for(y=0;y<W.length;y++)M(W[y]);break;case"Feature":M(k);break;default:return c.warn(["Invalid GeoJSON type",(k.type||"none")+".","Traces with locationmode *geojson-id* only support","*FeatureCollection* and *Feature* types."].join(" ")),!1}for(var $ in P)c.log(["Location *"+$+"*","does not have a matching feature with id-key","*"+F.featureidkey+"*."].join(" "));return T}function g(N){var F=N.geometry,k;if(F.type==="MultiPolygon")for(var P=F.coordinates,T=0,y=0;y<P.length;y++){var S={type:"Polygon",coordinates:P[y]},M=O(S);M>T&&(T=M,k=S)}else k=F;return z(k).geometry.coordinates}function C(N){var F=window.PlotlyGeoAssets||{},k=[];function P(W){return new Promise(function($,Z){w.json(W,function(K,Q){if(K){delete F[W];var J=K.status===404?'GeoJSON at URL "'+W+'" does not exist.':"Unexpected error while fetching from "+W;return Z(new Error(J))}return F[W]=Q,$(Q)})})}function T(W){return new Promise(function($,Z){var K=0,Q=setInterval(function(){if(F[W]&&F[W]!=="pending")return clearInterval(Q),$(F[W]);if(K>100)return clearInterval(Q),Z("Unexpected error while fetching from "+W);K++},50)})}for(var y=0;y<N.length;y++){var S=N[y][0].trace,M=S.geojson;typeof M=="string"&&(F[M]?F[M]==="pending"&&k.push(T(M)):(F[M]="pending",k.push(P(M))))}return k}function I(N){return l(N)}le.exports={locationToFeature:x,feature2polygons:A,getTraceGeojson:E,extractTraceFeature:D,fetchTraceGeoData:C,computeBbox:I}}}),Lbe=U({"src/traces/scattergeo/style.js"(pe,le){var w=Ze(),R=ec(),O=Lr(),z=z0(),l=z.stylePoints,u=z.styleText;le.exports=function(f,v){v&&c(f,v)};function c(p,f){var v=f[0].trace,h=f[0].node3;h.style("opacity",f[0].trace.opacity),l(h,v,p),u(h,v,p),h.selectAll("path.js-line").style("fill","none").each(function(m){var _=w.select(this),x=m.trace,A=x.line||{};_.call(O.stroke,A.color).call(R.dashLine,A.dash||"",A.width||0),x.fill!=="none"&&_.call(O.fill,x.fillcolor)})}}}),Obe=U({"src/traces/scattergeo/plot.js"(pe,le){var w=Ze(),R=ii(),O=tK().getTopojsonFeatures,z=V4(),l=q4(),u=gx().findExtremes,c=Dt().BADNUM,p=my().calcMarkerSize,f=Qd(),v=Lbe();function h(_,x,A){var E=x.layers.frontplot.select(".scatterlayer"),D=R.makeTraceGroups(E,A,"trace scattergeo");function g(C,I){C.lonlat[0]===c&&w.select(I).remove()}D.selectAll("*").remove(),D.each(function(C){var I=w.select(this),N=C[0].trace;if(f.hasLines(N)||N.fill!=="none"){var F=z.calcTraceToLineCoords(C),k=N.fill!=="none"?z.makePolygon(F):z.makeLine(F);I.selectAll("path.js-line").data([{geojson:k,trace:N}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}f.hasMarkers(N)&&I.selectAll("path.point").data(R.identity).enter().append("path").classed("point",!0).each(function(P){g(P,this)}),f.hasText(N)&&I.selectAll("g").data(R.identity).enter().append("g").append("text").each(function(P){g(P,this)}),v(_,C)})}function m(_,x){var A=_[0].trace,E=x[A.geo],D=E._subplot,g=A._length,C,I;if(R.isArrayOrTypedArray(A.locations)){var N=A.locationmode,F=N==="geojson-id"?l.extractTraceFeature(_):O(A,D.topojson);for(C=0;C<g;C++){I=_[C];var k=N==="geojson-id"?I.fOut:l.locationToFeature(N,I.loc,F);I.lonlat=k?k.properties.ct:[c,c]}}var P={padded:!0},T,y;if(E.fitbounds==="geojson"&&A.locationmode==="geojson-id"){var S=l.computeBbox(l.getTraceGeojson(A));T=[S[0],S[2]],y=[S[1],S[3]]}else{for(T=new Array(g),y=new Array(g),C=0;C<g;C++)I=_[C],T[C]=I.lonlat[0],y[C]=I.lonlat[1];P.ppad=p(A,g)}A._extremes.lon=u(E.lonaxis._ax,T,P),A._extremes.lat=u(E.lataxis._ax,y,P)}le.exports={calcGeoJSON:m,plot:h}}}),pJe=U({"src/traces/scattergeo/hover.js"(pe,le){var w=Dp(),R=Dt().BADNUM,O=ng(),z=ii().fillText,l=C6();le.exports=function(p,f,v){var h=p.cd,m=h[0].trace,_=p.xa,x=p.ya,A=p.subplot,E=A.projection.isLonLatOverEdges,D=A.project;function g(T){var y=T.lonlat;if(y[0]===R||E(y))return 1/0;var S=D(y),M=D([f,v]),W=Math.abs(S[0]-M[0]),$=Math.abs(S[1]-M[1]),Z=Math.max(3,T.mrc||0);return Math.max(Math.sqrt(W*W+$*$)-Z,1-3/Z)}if(w.getClosest(h,g,p),p.index!==!1){var C=h[p.index],I=C.lonlat,N=[_.c2p(I),x.c2p(I)],F=C.mrc||1;p.x0=N[0]-F,p.x1=N[0]+F,p.y0=N[1]-F,p.y1=N[1]+F,p.loc=C.loc,p.lon=I[0],p.lat=I[1];var k={};k[m.geo]={_subplot:A};var P=m._module.formatLabels(C,m,k);return p.lonLabel=P.lonLabel,p.latLabel=P.latLabel,p.color=O(m,C),p.extraText=u(m,C,p,h[0].t.labels),p.hovertemplate=m.hovertemplate,[p]}};function u(c,p,f,v){if(c.hovertemplate)return;var h=p.hi||c.hoverinfo,m=h==="all"?l.hoverinfo.flags:h.split("+"),_=m.indexOf("location")!==-1&&Array.isArray(c.locations),x=m.indexOf("lon")!==-1,A=m.indexOf("lat")!==-1,E=m.indexOf("text")!==-1,D=[];function g(C){return C+"°"}return _?D.push(p.loc):x&&A?D.push("("+g(f.latLabel)+", "+g(f.lonLabel)+")"):x?D.push(v.lon+g(f.lonLabel)):A&&D.push(v.lat+g(f.latLabel)),E&&z(p,c,D),D.join("<br>")}}}),vJe=U({"src/traces/scattergeo/event_data.js"(pe,le){le.exports=function(R,O,z,l,u){R.lon=O.lon,R.lat=O.lat,R.location=O.loc?O.loc:null;var c=l[u];return c.fIn&&c.fIn.properties&&(R.properties=c.fIn.properties),R}}}),mJe=U({"src/traces/scattergeo/select.js"(pe,le){var w=Qd(),R=Dt().BADNUM;le.exports=function(z,l){var u=z.cd,c=z.xaxis,p=z.yaxis,f=[],v=u[0].trace,h,m,_,x,A,E=!w.hasMarkers(v)&&!w.hasText(v);if(E)return[];if(l===!1)for(A=0;A<u.length;A++)u[A].selected=0;else for(A=0;A<u.length;A++)h=u[A],m=h.lonlat,m[0]!==R&&(_=c.c2p(m),x=p.c2p(m),l.contains([_,x],null,A,z)?(f.push({pointNumber:A,lon:m[0],lat:m[1]}),h.selected=1):h.selected=0);return f}}}),UU=U({"node_modules/d3-array/dist/d3-array.js"(pe,le){(function(w,R){R(typeof pe=="object"&&typeof le<"u"?pe:w.d3=w.d3||{})})(pe,function(w){function R(_e,he){return _e<he?-1:_e>he?1:_e>=he?0:NaN}function O(_e){return _e.length===1&&(_e=z(_e)),{left:function(he,De,xe,se){for(xe==null&&(xe=0),se==null&&(se=he.length);xe<se;){var Ee=xe+se>>>1;_e(he[Ee],De)<0?xe=Ee+1:se=Ee}return xe},right:function(he,De,xe,se){for(xe==null&&(xe=0),se==null&&(se=he.length);xe<se;){var Ee=xe+se>>>1;_e(he[Ee],De)>0?se=Ee:xe=Ee+1}return xe}}}function z(_e){return function(he,De){return R(_e(he),De)}}var l=O(R),u=l.right,c=l.left;function p(_e,he){he==null&&(he=f);for(var De=0,xe=_e.length-1,se=_e[0],Ee=new Array(xe<0?0:xe);De<xe;)Ee[De]=he(se,se=_e[++De]);return Ee}function f(_e,he){return[_e,he]}function v(_e,he,De){var xe=_e.length,se=he.length,Ee=new Array(xe*se),Te,Be,tt,at;for(De==null&&(De=f),Te=tt=0;Te<xe;++Te)for(at=_e[Te],Be=0;Be<se;++Be,++tt)Ee[tt]=De(at,he[Be]);return Ee}function h(_e,he){return he<_e?-1:he>_e?1:he>=_e?0:NaN}function m(_e){return _e===null?NaN:+_e}function _(_e,he){var De=_e.length,xe=0,se=-1,Ee=0,Te,Be,tt=0;if(he==null)for(;++se<De;)isNaN(Te=m(_e[se]))||(Be=Te-Ee,Ee+=Be/++xe,tt+=Be*(Te-Ee));else for(;++se<De;)isNaN(Te=m(he(_e[se],se,_e)))||(Be=Te-Ee,Ee+=Be/++xe,tt+=Be*(Te-Ee));if(xe>1)return tt/(xe-1)}function x(_e,he){var De=_(_e,he);return De&&Math.sqrt(De)}function A(_e,he){var De=_e.length,xe=-1,se,Ee,Te;if(he==null){for(;++xe<De;)if((se=_e[xe])!=null&&se>=se)for(Ee=Te=se;++xe<De;)(se=_e[xe])!=null&&(Ee>se&&(Ee=se),Te<se&&(Te=se))}else for(;++xe<De;)if((se=he(_e[xe],xe,_e))!=null&&se>=se)for(Ee=Te=se;++xe<De;)(se=he(_e[xe],xe,_e))!=null&&(Ee>se&&(Ee=se),Te<se&&(Te=se));return[Ee,Te]}var E=Array.prototype,D=E.slice,g=E.map;function C(_e){return function(){return _e}}function I(_e){return _e}function N(_e,he,De){_e=+_e,he=+he,De=(se=arguments.length)<2?(he=_e,_e=0,1):se<3?1:+De;for(var xe=-1,se=Math.max(0,Math.ceil((he-_e)/De))|0,Ee=new Array(se);++xe<se;)Ee[xe]=_e+xe*De;return Ee}var F=Math.sqrt(50),k=Math.sqrt(10),P=Math.sqrt(2);function T(_e,he,De){var xe,se=-1,Ee,Te,Be;if(he=+he,_e=+_e,De=+De,_e===he&&De>0)return[_e];if((xe=he<_e)&&(Ee=_e,_e=he,he=Ee),(Be=y(_e,he,De))===0||!isFinite(Be))return[];if(Be>0)for(_e=Math.ceil(_e/Be),he=Math.floor(he/Be),Te=new Array(Ee=Math.ceil(he-_e+1));++se<Ee;)Te[se]=(_e+se)*Be;else for(_e=Math.floor(_e*Be),he=Math.ceil(he*Be),Te=new Array(Ee=Math.ceil(_e-he+1));++se<Ee;)Te[se]=(_e-se)/Be;return xe&&Te.reverse(),Te}function y(_e,he,De){var xe=(he-_e)/Math.max(0,De),se=Math.floor(Math.log(xe)/Math.LN10),Ee=xe/Math.pow(10,se);return se>=0?(Ee>=F?10:Ee>=k?5:Ee>=P?2:1)*Math.pow(10,se):-Math.pow(10,-se)/(Ee>=F?10:Ee>=k?5:Ee>=P?2:1)}function S(_e,he,De){var xe=Math.abs(he-_e)/Math.max(0,De),se=Math.pow(10,Math.floor(Math.log(xe)/Math.LN10)),Ee=xe/se;return Ee>=F?se*=10:Ee>=k?se*=5:Ee>=P&&(se*=2),he<_e?-se:se}function M(_e){return Math.ceil(Math.log(_e.length)/Math.LN2)+1}function W(){var _e=I,he=A,De=M;function xe(se){var Ee,Te=se.length,Be,tt=new Array(Te);for(Ee=0;Ee<Te;++Ee)tt[Ee]=_e(se[Ee],Ee,se);var at=he(tt),gt=at[0],pt=at[1],Rt=De(tt,gt,pt);Array.isArray(Rt)||(Rt=S(gt,pt,Rt),Rt=N(Math.ceil(gt/Rt)*Rt,pt,Rt));for(var $t=Rt.length;Rt[0]<=gt;)Rt.shift(),--$t;for(;Rt[$t-1]>pt;)Rt.pop(),--$t;var Wt=new Array($t+1),Ht;for(Ee=0;Ee<=$t;++Ee)Ht=Wt[Ee]=[],Ht.x0=Ee>0?Rt[Ee-1]:gt,Ht.x1=Ee<$t?Rt[Ee]:pt;for(Ee=0;Ee<Te;++Ee)Be=tt[Ee],gt<=Be&&Be<=pt&&Wt[u(Rt,Be,0,$t)].push(se[Ee]);return Wt}return xe.value=function(se){return arguments.length?(_e=typeof se=="function"?se:C(se),xe):_e},xe.domain=function(se){return arguments.length?(he=typeof se=="function"?se:C([se[0],se[1]]),xe):he},xe.thresholds=function(se){return arguments.length?(De=typeof se=="function"?se:Array.isArray(se)?C(D.call(se)):C(se),xe):De},xe}function $(_e,he,De){if(De==null&&(De=m),!!(xe=_e.length)){if((he=+he)<=0||xe<2)return+De(_e[0],0,_e);if(he>=1)return+De(_e[xe-1],xe-1,_e);var xe,se=(xe-1)*he,Ee=Math.floor(se),Te=+De(_e[Ee],Ee,_e),Be=+De(_e[Ee+1],Ee+1,_e);return Te+(Be-Te)*(se-Ee)}}function Z(_e,he,De){return _e=g.call(_e,m).sort(R),Math.ceil((De-he)/(2*($(_e,.75)-$(_e,.25))*Math.pow(_e.length,-1/3)))}function K(_e,he,De){return Math.ceil((De-he)/(3.5*x(_e)*Math.pow(_e.length,-1/3)))}function Q(_e,he){var De=_e.length,xe=-1,se,Ee;if(he==null){for(;++xe<De;)if((se=_e[xe])!=null&&se>=se)for(Ee=se;++xe<De;)(se=_e[xe])!=null&&se>Ee&&(Ee=se)}else for(;++xe<De;)if((se=he(_e[xe],xe,_e))!=null&&se>=se)for(Ee=se;++xe<De;)(se=he(_e[xe],xe,_e))!=null&&se>Ee&&(Ee=se);return Ee}function J(_e,he){var De=_e.length,xe=De,se=-1,Ee,Te=0;if(he==null)for(;++se<De;)isNaN(Ee=m(_e[se]))?--xe:Te+=Ee;else for(;++se<De;)isNaN(Ee=m(he(_e[se],se,_e)))?--xe:Te+=Ee;if(xe)return Te/xe}function G(_e,he){var De=_e.length,xe=-1,se,Ee=[];if(he==null)for(;++xe<De;)isNaN(se=m(_e[xe]))||Ee.push(se);else for(;++xe<De;)isNaN(se=m(he(_e[xe],xe,_e)))||Ee.push(se);return $(Ee.sort(R),.5)}function ee(_e){for(var he=_e.length,De,xe=-1,se=0,Ee,Te;++xe<he;)se+=_e[xe].length;for(Ee=new Array(se);--he>=0;)for(Te=_e[he],De=Te.length;--De>=0;)Ee[--se]=Te[De];return Ee}function re(_e,he){var De=_e.length,xe=-1,se,Ee;if(he==null){for(;++xe<De;)if((se=_e[xe])!=null&&se>=se)for(Ee=se;++xe<De;)(se=_e[xe])!=null&&Ee>se&&(Ee=se)}else for(;++xe<De;)if((se=he(_e[xe],xe,_e))!=null&&se>=se)for(Ee=se;++xe<De;)(se=he(_e[xe],xe,_e))!=null&&Ee>se&&(Ee=se);return Ee}function fe(_e,he){for(var De=he.length,xe=new Array(De);De--;)xe[De]=_e[he[De]];return xe}function we(_e,he){if(De=_e.length){var De,xe=0,se=0,Ee,Te=_e[se];for(he==null&&(he=R);++xe<De;)(he(Ee=_e[xe],Te)<0||he(Te,Te)!==0)&&(Te=Ee,se=xe);if(he(Te,Te)===0)return se}}function Oe(_e,he,De){for(var xe=(De??_e.length)-(he=he==null?0:+he),se,Ee;xe;)Ee=Math.random()*xe--|0,se=_e[xe+he],_e[xe+he]=_e[Ee+he],_e[Ee+he]=se;return _e}function ke(_e,he){var De=_e.length,xe=-1,se,Ee=0;if(he==null)for(;++xe<De;)(se=+_e[xe])&&(Ee+=se);else for(;++xe<De;)(se=+he(_e[xe],xe,_e))&&(Ee+=se);return Ee}function Le(_e){if(!(Ee=_e.length))return[];for(var he=-1,De=re(_e,oe),xe=new Array(De);++he<De;)for(var se=-1,Ee,Te=xe[he]=new Array(Ee);++se<Ee;)Te[se]=_e[se][he];return xe}function oe(_e){return _e.length}function be(){return Le(arguments)}w.bisect=u,w.bisectRight=u,w.bisectLeft=c,w.ascending=R,w.bisector=O,w.cross=v,w.descending=h,w.deviation=x,w.extent=A,w.histogram=W,w.thresholdFreedmanDiaconis=Z,w.thresholdScott=K,w.thresholdSturges=M,w.max=Q,w.mean=J,w.median=G,w.merge=ee,w.min=re,w.pairs=p,w.permute=fe,w.quantile=$,w.range=N,w.scan=we,w.shuffle=Oe,w.sum=ke,w.ticks=T,w.tickIncrement=y,w.tickStep=S,w.transpose=Le,w.variance=_,w.zip=be,Object.defineProperty(w,"__esModule",{value:!0})})}}),Nbe=U({"node_modules/d3-geo/dist/d3-geo.js"(pe,le){(function(w,R){typeof pe=="object"&&typeof le<"u"?R(pe,UU()):(w=w||self,R(w.d3=w.d3||{},w.d3))})(pe,function(w,R){function O(){return new z}function z(){this.reset()}z.prototype={constructor:z,reset:function(){this.s=this.t=0},add:function(sn){u(l,sn,this.t),u(this,l.s,this.s),this.s?this.t+=l.t:this.s=l.t},valueOf:function(){return this.s}};var l=new z;function u(sn,Fn,Li){var Si=sn.s=Fn+Li,ma=Si-Fn,yo=Si-ma;sn.t=Fn-yo+(Li-ma)}var c=1e-6,p=1e-12,f=Math.PI,v=f/2,h=f/4,m=f*2,_=180/f,x=f/180,A=Math.abs,E=Math.atan,D=Math.atan2,g=Math.cos,C=Math.ceil,I=Math.exp,N=Math.log,F=Math.pow,k=Math.sin,P=Math.sign||function(sn){return sn>0?1:sn<0?-1:0},T=Math.sqrt,y=Math.tan;function S(sn){return sn>1?0:sn<-1?f:Math.acos(sn)}function M(sn){return sn>1?v:sn<-1?-v:Math.asin(sn)}function W(sn){return(sn=k(sn/2))*sn}function $(){}function Z(sn,Fn){sn&&Q.hasOwnProperty(sn.type)&&Q[sn.type](sn,Fn)}var K={Feature:function(sn,Fn){Z(sn.geometry,Fn)},FeatureCollection:function(sn,Fn){for(var Li=sn.features,Si=-1,ma=Li.length;++Si<ma;)Z(Li[Si].geometry,Fn)}},Q={Sphere:function(sn,Fn){Fn.sphere()},Point:function(sn,Fn){sn=sn.coordinates,Fn.point(sn[0],sn[1],sn[2])},MultiPoint:function(sn,Fn){for(var Li=sn.coordinates,Si=-1,ma=Li.length;++Si<ma;)sn=Li[Si],Fn.point(sn[0],sn[1],sn[2])},LineString:function(sn,Fn){J(sn.coordinates,Fn,0)},MultiLineString:function(sn,Fn){for(var Li=sn.coordinates,Si=-1,ma=Li.length;++Si<ma;)J(Li[Si],Fn,0)},Polygon:function(sn,Fn){G(sn.coordinates,Fn)},MultiPolygon:function(sn,Fn){for(var Li=sn.coordinates,Si=-1,ma=Li.length;++Si<ma;)G(Li[Si],Fn)},GeometryCollection:function(sn,Fn){for(var Li=sn.geometries,Si=-1,ma=Li.length;++Si<ma;)Z(Li[Si],Fn)}};function J(sn,Fn,Li){var Si=-1,ma=sn.length-Li,yo;for(Fn.lineStart();++Si<ma;)yo=sn[Si],Fn.point(yo[0],yo[1],yo[2]);Fn.lineEnd()}function G(sn,Fn){var Li=-1,Si=sn.length;for(Fn.polygonStart();++Li<Si;)J(sn[Li],Fn,1);Fn.polygonEnd()}function ee(sn,Fn){sn&&K.hasOwnProperty(sn.type)?K[sn.type](sn,Fn):Z(sn,Fn)}var re=O(),fe=O(),we,Oe,ke,Le,oe,be={point:$,lineStart:$,lineEnd:$,polygonStart:function(){re.reset(),be.lineStart=_e,be.lineEnd=he},polygonEnd:function(){var sn=+re;fe.add(sn<0?m+sn:sn),this.lineStart=this.lineEnd=this.point=$},sphere:function(){fe.add(m)}};function _e(){be.point=De}function he(){xe(we,Oe)}function De(sn,Fn){be.point=xe,we=sn,Oe=Fn,sn*=x,Fn*=x,ke=sn,Le=g(Fn=Fn/2+h),oe=k(Fn)}function xe(sn,Fn){sn*=x,Fn*=x,Fn=Fn/2+h;var Li=sn-ke,Si=Li>=0?1:-1,ma=Si*Li,yo=g(Fn),uo=k(Fn),rs=oe*uo,hs=Le*yo+rs*g(ma),Ws=rs*Si*k(ma);re.add(D(Ws,hs)),ke=sn,Le=yo,oe=uo}function se(sn){return fe.reset(),ee(sn,be),fe*2}function Ee(sn){return[D(sn[1],sn[0]),M(sn[2])]}function Te(sn){var Fn=sn[0],Li=sn[1],Si=g(Li);return[Si*g(Fn),Si*k(Fn),k(Li)]}function Be(sn,Fn){return sn[0]*Fn[0]+sn[1]*Fn[1]+sn[2]*Fn[2]}function tt(sn,Fn){return[sn[1]*Fn[2]-sn[2]*Fn[1],sn[2]*Fn[0]-sn[0]*Fn[2],sn[0]*Fn[1]-sn[1]*Fn[0]]}function at(sn,Fn){sn[0]+=Fn[0],sn[1]+=Fn[1],sn[2]+=Fn[2]}function gt(sn,Fn){return[sn[0]*Fn,sn[1]*Fn,sn[2]*Fn]}function pt(sn){var Fn=T(sn[0]*sn[0]+sn[1]*sn[1]+sn[2]*sn[2]);sn[0]/=Fn,sn[1]/=Fn,sn[2]/=Fn}var Rt,$t,Wt,Ht,Ft,st,rt,Ue,xt=O(),Gt,Jt,Ut={point:kr,lineStart:$r,lineEnd:rn,polygonStart:function(){Ut.point=kn,Ut.lineStart=Rn,Ut.lineEnd=ci,xt.reset(),be.polygonStart()},polygonEnd:function(){be.polygonEnd(),Ut.point=kr,Ut.lineStart=$r,Ut.lineEnd=rn,re<0?(Rt=-(Wt=180),$t=-(Ht=90)):xt>c?Ht=90:xt<-c&&($t=-90),Jt[0]=Rt,Jt[1]=Wt},sphere:function(){Rt=-(Wt=180),$t=-(Ht=90)}};function kr(sn,Fn){Gt.push(Jt=[Rt=sn,Wt=sn]),Fn<$t&&($t=Fn),Fn>Ht&&(Ht=Fn)}function Pr(sn,Fn){var Li=Te([sn*x,Fn*x]);if(Ue){var Si=tt(Ue,Li),ma=[Si[1],-Si[0],0],yo=tt(ma,Si);pt(yo),yo=Ee(yo);var uo=sn-Ft,rs=uo>0?1:-1,hs=yo[0]*_*rs,Ws,Bo=A(uo)>180;Bo^(rs*Ft<hs&&hs<rs*sn)?(Ws=yo[1]*_,Ws>Ht&&(Ht=Ws)):(hs=(hs+360)%360-180,Bo^(rs*Ft<hs&&hs<rs*sn)?(Ws=-yo[1]*_,Ws<$t&&($t=Ws)):(Fn<$t&&($t=Fn),Fn>Ht&&(Ht=Fn))),Bo?sn<Ft?In(Rt,sn)>In(Rt,Wt)&&(Wt=sn):In(sn,Wt)>In(Rt,Wt)&&(Rt=sn):Wt>=Rt?(sn<Rt&&(Rt=sn),sn>Wt&&(Wt=sn)):sn>Ft?In(Rt,sn)>In(Rt,Wt)&&(Wt=sn):In(sn,Wt)>In(Rt,Wt)&&(Rt=sn)}else Gt.push(Jt=[Rt=sn,Wt=sn]);Fn<$t&&($t=Fn),Fn>Ht&&(Ht=Fn),Ue=Li,Ft=sn}function $r(){Ut.point=Pr}function rn(){Jt[0]=Rt,Jt[1]=Wt,Ut.point=kr,Ue=null}function kn(sn,Fn){if(Ue){var Li=sn-Ft;xt.add(A(Li)>180?Li+(Li>0?360:-360):Li)}else st=sn,rt=Fn;be.point(sn,Fn),Pr(sn,Fn)}function Rn(){be.lineStart()}function ci(){kn(st,rt),be.lineEnd(),A(xt)>c&&(Rt=-(Wt=180)),Jt[0]=Rt,Jt[1]=Wt,Ue=null}function In(sn,Fn){return(Fn-=sn)<0?Fn+360:Fn}function Gn(sn,Fn){return sn[0]-Fn[0]}function mr(sn,Fn){return sn[0]<=sn[1]?sn[0]<=Fn&&Fn<=sn[1]:Fn<sn[0]||sn[1]<Fn}function St(sn){var Fn,Li,Si,ma,yo,uo,rs;if(Ht=Wt=-(Rt=$t=1/0),Gt=[],ee(sn,Ut),Li=Gt.length){for(Gt.sort(Gn),Fn=1,Si=Gt[0],yo=[Si];Fn<Li;++Fn)ma=Gt[Fn],mr(Si,ma[0])||mr(Si,ma[1])?(In(Si[0],ma[1])>In(Si[0],Si[1])&&(Si[1]=ma[1]),In(ma[0],Si[1])>In(Si[0],Si[1])&&(Si[0]=ma[0])):yo.push(Si=ma);for(uo=-1/0,Li=yo.length-1,Fn=0,Si=yo[Li];Fn<=Li;Si=ma,++Fn)ma=yo[Fn],(rs=In(Si[1],ma[0]))>uo&&(uo=rs,Rt=ma[0],Wt=Si[1])}return Gt=Jt=null,Rt===1/0||$t===1/0?[[NaN,NaN],[NaN,NaN]]:[[Rt,$t],[Wt,Ht]]}var Ot,Et,je,Ye,et,mt,Nt,lr,br,Or,tn,Jr,dn,on,Nn,Wi,Oa={sphere:$,point:Da,lineStart:Ka,lineEnd:Fo,polygonStart:function(){Oa.lineStart=an,Oa.lineEnd=Hr},polygonEnd:function(){Oa.lineStart=Ka,Oa.lineEnd=Fo}};function Da(sn,Fn){sn*=x,Fn*=x;var Li=g(Fn);Aa(Li*g(sn),Li*k(sn),k(Fn))}function Aa(sn,Fn,Li){++Ot,je+=(sn-je)/Ot,Ye+=(Fn-Ye)/Ot,et+=(Li-et)/Ot}function Ka(){Oa.point=Sa}function Sa(sn,Fn){sn*=x,Fn*=x;var Li=g(Fn);on=Li*g(sn),Nn=Li*k(sn),Wi=k(Fn),Oa.point=no,Aa(on,Nn,Wi)}function no(sn,Fn){sn*=x,Fn*=x;var Li=g(Fn),Si=Li*g(sn),ma=Li*k(sn),yo=k(Fn),uo=D(T((uo=Nn*yo-Wi*ma)*uo+(uo=Wi*Si-on*yo)*uo+(uo=on*ma-Nn*Si)*uo),on*Si+Nn*ma+Wi*yo);Et+=uo,mt+=uo*(on+(on=Si)),Nt+=uo*(Nn+(Nn=ma)),lr+=uo*(Wi+(Wi=yo)),Aa(on,Nn,Wi)}function Fo(){Oa.point=Da}function an(){Oa.point=nn}function Hr(){Kr(Jr,dn),Oa.point=Da}function nn(sn,Fn){Jr=sn,dn=Fn,sn*=x,Fn*=x,Oa.point=Kr;var Li=g(Fn);on=Li*g(sn),Nn=Li*k(sn),Wi=k(Fn),Aa(on,Nn,Wi)}function Kr(sn,Fn){sn*=x,Fn*=x;var Li=g(Fn),Si=Li*g(sn),ma=Li*k(sn),yo=k(Fn),uo=Nn*yo-Wi*ma,rs=Wi*Si-on*yo,hs=on*ma-Nn*Si,Ws=T(uo*uo+rs*rs+hs*hs),Bo=M(Ws),As=Ws&&-Bo/Ws;br+=As*uo,Or+=As*rs,tn+=As*hs,Et+=Bo,mt+=Bo*(on+(on=Si)),Nt+=Bo*(Nn+(Nn=ma)),lr+=Bo*(Wi+(Wi=yo)),Aa(on,Nn,Wi)}function $n(sn){Ot=Et=je=Ye=et=mt=Nt=lr=br=Or=tn=0,ee(sn,Oa);var Fn=br,Li=Or,Si=tn,ma=Fn*Fn+Li*Li+Si*Si;return ma<p&&(Fn=mt,Li=Nt,Si=lr,Et<c&&(Fn=je,Li=Ye,Si=et),ma=Fn*Fn+Li*Li+Si*Si,ma<p)?[NaN,NaN]:[D(Li,Fn)*_,M(Si/T(ma))*_]}function Ai(sn){return function(){return sn}}function aa(sn,Fn){function Li(Si,ma){return Si=sn(Si,ma),Fn(Si[0],Si[1])}return sn.invert&&Fn.invert&&(Li.invert=function(Si,ma){return Si=Fn.invert(Si,ma),Si&&sn.invert(Si[0],Si[1])}),Li}function Ci(sn,Fn){return[A(sn)>f?sn+Math.round(-sn/m)*m:sn,Fn]}Ci.invert=Ci;function Ta(sn,Fn,Li){return(sn%=m)?Fn||Li?aa(ro(sn),oo(Fn,Li)):ro(sn):Fn||Li?oo(Fn,Li):Ci}function Na(sn){return function(Fn,Li){return Fn+=sn,[Fn>f?Fn-m:Fn<-f?Fn+m:Fn,Li]}}function ro(sn){var Fn=Na(sn);return Fn.invert=Na(-sn),Fn}function oo(sn,Fn){var Li=g(sn),Si=k(sn),ma=g(Fn),yo=k(Fn);function uo(rs,hs){var Ws=g(hs),Bo=g(rs)*Ws,As=k(rs)*Ws,Jo=k(hs),Io=Jo*Li+Bo*Si;return[D(As*ma-Io*yo,Bo*Li-Jo*Si),M(Io*ma+As*yo)]}return uo.invert=function(rs,hs){var Ws=g(hs),Bo=g(rs)*Ws,As=k(rs)*Ws,Jo=k(hs),Io=Jo*ma-As*yo;return[D(As*ma+Jo*yo,Bo*Li+Io*Si),M(Io*Li-Bo*Si)]},uo}function xo(sn){sn=Ta(sn[0]*x,sn[1]*x,sn.length>2?sn[2]*x:0);function Fn(Li){return Li=sn(Li[0]*x,Li[1]*x),Li[0]*=_,Li[1]*=_,Li}return Fn.invert=function(Li){return Li=sn.invert(Li[0]*x,Li[1]*x),Li[0]*=_,Li[1]*=_,Li},Fn}function vr(sn,Fn,Li,Si,ma,yo){if(Li){var uo=g(Fn),rs=k(Fn),hs=Si*Li;ma==null?(ma=Fn+Si*m,yo=Fn-hs/2):(ma=er(uo,ma),yo=er(uo,yo),(Si>0?ma<yo:ma>yo)&&(ma+=Si*m));for(var Ws,Bo=ma;Si>0?Bo>yo:Bo<yo;Bo-=hs)Ws=Ee([uo,-rs*g(Bo),-rs*k(Bo)]),sn.point(Ws[0],Ws[1])}}function er(sn,Fn){Fn=Te(Fn),Fn[0]-=sn,pt(Fn);var Li=S(-Fn[1]);return((-Fn[2]<0?-Li:Li)+m-c)%m}function si(){var sn=Ai([0,0]),Fn=Ai(90),Li=Ai(6),Si,ma,yo={point:uo};function uo(hs,Ws){Si.push(hs=ma(hs,Ws)),hs[0]*=_,hs[1]*=_}function rs(){var hs=sn.apply(this,arguments),Ws=Fn.apply(this,arguments)*x,Bo=Li.apply(this,arguments)*x;return Si=[],ma=Ta(-hs[0]*x,-hs[1]*x,0).invert,vr(yo,Ws,Bo,1),hs={type:"Polygon",coordinates:[Si]},Si=ma=null,hs}return rs.center=function(hs){return arguments.length?(sn=typeof hs=="function"?hs:Ai([+hs[0],+hs[1]]),rs):sn},rs.radius=function(hs){return arguments.length?(Fn=typeof hs=="function"?hs:Ai(+hs),rs):Fn},rs.precision=function(hs){return arguments.length?(Li=typeof hs=="function"?hs:Ai(+hs),rs):Li},rs}function ei(){var sn=[],Fn;return{point:function(Li,Si,ma){Fn.push([Li,Si,ma])},lineStart:function(){sn.push(Fn=[])},lineEnd:$,rejoin:function(){sn.length>1&&sn.push(sn.pop().concat(sn.shift()))},result:function(){var Li=sn;return sn=[],Fn=null,Li}}}function Kn(sn,Fn){return A(sn[0]-Fn[0])<c&&A(sn[1]-Fn[1])<c}function qn(sn,Fn,Li,Si){this.x=sn,this.z=Fn,this.o=Li,this.e=Si,this.v=!1,this.n=this.p=null}function pi(sn,Fn,Li,Si,ma){var yo=[],uo=[],rs,hs;if(sn.forEach(function(ll){if(!((Tu=ll.length-1)<=0)){var Tu,du=ll[0],ku=ll[Tu],Au;if(Kn(du,ku)){if(!du[2]&&!ku[2]){for(ma.lineStart(),rs=0;rs<Tu;++rs)ma.point((du=ll[rs])[0],du[1]);ma.lineEnd();return}ku[0]+=2*c}yo.push(Au=new qn(du,ll,null,!0)),uo.push(Au.o=new qn(du,null,Au,!1)),yo.push(Au=new qn(ku,ll,null,!1)),uo.push(Au.o=new qn(ku,null,Au,!0))}}),!!yo.length){for(uo.sort(Fn),_i(yo),_i(uo),rs=0,hs=uo.length;rs<hs;++rs)uo[rs].e=Li=!Li;for(var Ws=yo[0],Bo,As;;){for(var Jo=Ws,Io=!0;Jo.v;)if((Jo=Jo.n)===Ws)return;Bo=Jo.z,ma.lineStart();do{if(Jo.v=Jo.o.v=!0,Jo.e){if(Io)for(rs=0,hs=Bo.length;rs<hs;++rs)ma.point((As=Bo[rs])[0],As[1]);else Si(Jo.x,Jo.n.x,1,ma);Jo=Jo.n}else{if(Io)for(Bo=Jo.p.z,rs=Bo.length-1;rs>=0;--rs)ma.point((As=Bo[rs])[0],As[1]);else Si(Jo.x,Jo.p.x,-1,ma);Jo=Jo.p}Jo=Jo.o,Bo=Jo.z,Io=!Io}while(!Jo.v);ma.lineEnd()}}}function _i(sn){if(Fn=sn.length){for(var Fn,Li=0,Si=sn[0],ma;++Li<Fn;)Si.n=ma=sn[Li],ma.p=Si,Si=ma;Si.n=ma=sn[0],ma.p=Si}}var fi=O();function Ri(sn){return A(sn[0])<=f?sn[0]:P(sn[0])*((A(sn[0])+f)%m-f)}function $i(sn,Fn){var Li=Ri(Fn),Si=Fn[1],ma=k(Si),yo=[k(Li),-g(Li),0],uo=0,rs=0;fi.reset(),ma===1?Si=v+c:ma===-1&&(Si=-v-c);for(var hs=0,Ws=sn.length;hs<Ws;++hs)if(As=(Bo=sn[hs]).length)for(var Bo,As,Jo=Bo[As-1],Io=Ri(Jo),ll=Jo[1]/2+h,Tu=k(ll),du=g(ll),ku=0;ku<As;++ku,Io=cl,Tu=Vu,du=Nc,Jo=Au){var Au=Bo[ku],cl=Ri(Au),Os=Au[1]/2+h,Vu=k(Os),Nc=g(Os),Sf=cl-Io,sd=Sf>=0?1:-1,Cf=sd*Sf,ld=Cf>f,Jc=Tu*Vu;if(fi.add(D(Jc*sd*k(Cf),du*Nc+Jc*g(Cf))),uo+=ld?Sf+sd*m:Sf,ld^Io>=Li^cl>=Li){var wh=tt(Te(Jo),Te(Au));pt(wh);var vh=tt(yo,wh);pt(vh);var rd=(ld^Sf>=0?-1:1)*M(vh[2]);(Si>rd||Si===rd&&(wh[0]||wh[1]))&&(rs+=ld^Sf>=0?1:-1)}}return(uo<-c||uo<c&&fi<-c)^rs&1}function Hi(sn,Fn,Li,Si){return function(ma){var yo=Fn(ma),uo=ei(),rs=Fn(uo),hs=!1,Ws,Bo,As,Jo={point:Io,lineStart:Tu,lineEnd:du,polygonStart:function(){Jo.point=ku,Jo.lineStart=Au,Jo.lineEnd=cl,Bo=[],Ws=[]},polygonEnd:function(){Jo.point=Io,Jo.lineStart=Tu,Jo.lineEnd=du,Bo=R.merge(Bo);var Os=$i(Ws,Si);Bo.length?(hs||(ma.polygonStart(),hs=!0),pi(Bo,gn,Os,Li,ma)):Os&&(hs||(ma.polygonStart(),hs=!0),ma.lineStart(),Li(null,null,1,ma),ma.lineEnd()),hs&&(ma.polygonEnd(),hs=!1),Bo=Ws=null},sphere:function(){ma.polygonStart(),ma.lineStart(),Li(null,null,1,ma),ma.lineEnd(),ma.polygonEnd()}};function Io(Os,Vu){sn(Os,Vu)&&ma.point(Os,Vu)}function ll(Os,Vu){yo.point(Os,Vu)}function Tu(){Jo.point=ll,yo.lineStart()}function du(){Jo.point=Io,yo.lineEnd()}function ku(Os,Vu){As.push([Os,Vu]),rs.point(Os,Vu)}function Au(){rs.lineStart(),As=[]}function cl(){ku(As[0][0],As[0][1]),rs.lineEnd();var Os=rs.clean(),Vu=uo.result(),Nc,Sf=Vu.length,sd,Cf,ld;if(As.pop(),Ws.push(As),As=null,!!Sf){if(Os&1){if(Cf=Vu[0],(sd=Cf.length-1)>0){for(hs||(ma.polygonStart(),hs=!0),ma.lineStart(),Nc=0;Nc<sd;++Nc)ma.point((ld=Cf[Nc])[0],ld[1]);ma.lineEnd()}return}Sf>1&&Os&2&&Vu.push(Vu.pop().concat(Vu.shift())),Bo.push(Vu.filter(wr))}}return Jo}}function wr(sn){return sn.length>1}function gn(sn,Fn){return((sn=sn.x)[0]<0?sn[1]-v-c:v-sn[1])-((Fn=Fn.x)[0]<0?Fn[1]-v-c:v-Fn[1])}var Xn=Hi(function(){return!0},Yi,Ca,[-f,-v]);function Yi(sn){var Fn=NaN,Li=NaN,Si=NaN,ma;return{lineStart:function(){sn.lineStart(),ma=1},point:function(yo,uo){var rs=yo>0?f:-f,hs=A(yo-Fn);A(hs-f)<c?(sn.point(Fn,Li=(Li+uo)/2>0?v:-v),sn.point(Si,Li),sn.lineEnd(),sn.lineStart(),sn.point(rs,Li),sn.point(yo,Li),ma=0):Si!==rs&&hs>=f&&(A(Fn-Si)<c&&(Fn-=Si*c),A(yo-rs)<c&&(yo-=rs*c),Li=ha(Fn,Li,yo,uo),sn.point(Si,Li),sn.lineEnd(),sn.lineStart(),sn.point(rs,Li),ma=0),sn.point(Fn=yo,Li=uo),Si=rs},lineEnd:function(){sn.lineEnd(),Fn=Li=NaN},clean:function(){return 2-ma}}}function ha(sn,Fn,Li,Si){var ma,yo,uo=k(sn-Li);return A(uo)>c?E((k(Fn)*(yo=g(Si))*k(Li)-k(Si)*(ma=g(Fn))*k(sn))/(ma*yo*uo)):(Fn+Si)/2}function Ca(sn,Fn,Li,Si){var ma;if(sn==null)ma=Li*v,Si.point(-f,ma),Si.point(0,ma),Si.point(f,ma),Si.point(f,0),Si.point(f,-ma),Si.point(0,-ma),Si.point(-f,-ma),Si.point(-f,0),Si.point(-f,ma);else if(A(sn[0]-Fn[0])>c){var yo=sn[0]<Fn[0]?f:-f;ma=Li*yo/2,Si.point(-yo,ma),Si.point(0,ma),Si.point(yo,ma)}else Si.point(Fn[0],Fn[1])}function Ba(sn){var Fn=g(sn),Li=6*x,Si=Fn>0,ma=A(Fn)>c;function yo(Bo,As,Jo,Io){vr(Io,sn,Li,Jo,Bo,As)}function uo(Bo,As){return g(Bo)*g(As)>Fn}function rs(Bo){var As,Jo,Io,ll,Tu;return{lineStart:function(){ll=Io=!1,Tu=1},point:function(du,ku){var Au=[du,ku],cl,Os=uo(du,ku),Vu=Si?Os?0:Ws(du,ku):Os?Ws(du+(du<0?f:-f),ku):0;if(!As&&(ll=Io=Os)&&Bo.lineStart(),Os!==Io&&(cl=hs(As,Au),(!cl||Kn(As,cl)||Kn(Au,cl))&&(Au[2]=1)),Os!==Io)Tu=0,Os?(Bo.lineStart(),cl=hs(Au,As),Bo.point(cl[0],cl[1])):(cl=hs(As,Au),Bo.point(cl[0],cl[1],2),Bo.lineEnd()),As=cl;else if(ma&&As&&Si^Os){var Nc;!(Vu&Jo)&&(Nc=hs(Au,As,!0))&&(Tu=0,Si?(Bo.lineStart(),Bo.point(Nc[0][0],Nc[0][1]),Bo.point(Nc[1][0],Nc[1][1]),Bo.lineEnd()):(Bo.point(Nc[1][0],Nc[1][1]),Bo.lineEnd(),Bo.lineStart(),Bo.point(Nc[0][0],Nc[0][1],3)))}Os&&(!As||!Kn(As,Au))&&Bo.point(Au[0],Au[1]),As=Au,Io=Os,Jo=Vu},lineEnd:function(){Io&&Bo.lineEnd(),As=null},clean:function(){return Tu|(ll&&Io)<<1}}}function hs(Bo,As,Jo){var Io=Te(Bo),ll=Te(As),Tu=[1,0,0],du=tt(Io,ll),ku=Be(du,du),Au=du[0],cl=ku-Au*Au;if(!cl)return!Jo&&Bo;var Os=Fn*ku/cl,Vu=-Fn*Au/cl,Nc=tt(Tu,du),Sf=gt(Tu,Os),sd=gt(du,Vu);at(Sf,sd);var Cf=Nc,ld=Be(Sf,Cf),Jc=Be(Cf,Cf),wh=ld*ld-Jc*(Be(Sf,Sf)-1);if(!(wh<0)){var vh=T(wh),rd=gt(Cf,(-ld-vh)/Jc);if(at(rd,Sf),rd=Ee(rd),!Jo)return rd;var Wl=Bo[0],lc=As[0],Bf=Bo[1],gf=As[1],rv;lc<Wl&&(rv=Wl,Wl=lc,lc=rv);var nv=lc-Wl,vv=A(nv-f)<c,kg=vv||nv<c;if(!vv&&gf<Bf&&(rv=Bf,Bf=gf,gf=rv),kg?vv?Bf+gf>0^rd[1]<(A(rd[0]-Wl)<c?Bf:gf):Bf<=rd[1]&&rd[1]<=gf:nv>f^(Wl<=rd[0]&&rd[0]<=lc)){var iv=gt(Cf,(-ld+vh)/Jc);return at(iv,Sf),[rd,Ee(iv)]}}}function Ws(Bo,As){var Jo=Si?sn:f-sn,Io=0;return Bo<-Jo?Io|=1:Bo>Jo&&(Io|=2),As<-Jo?Io|=4:As>Jo&&(Io|=8),Io}return Hi(uo,rs,yo,Si?[0,-sn]:[-f,sn-f])}function ji(sn,Fn,Li,Si,ma,yo){var uo=sn[0],rs=sn[1],hs=Fn[0],Ws=Fn[1],Bo=0,As=1,Jo=hs-uo,Io=Ws-rs,ll;if(ll=Li-uo,!(!Jo&&ll>0)){if(ll/=Jo,Jo<0){if(ll<Bo)return;ll<As&&(As=ll)}else if(Jo>0){if(ll>As)return;ll>Bo&&(Bo=ll)}if(ll=ma-uo,!(!Jo&&ll<0)){if(ll/=Jo,Jo<0){if(ll>As)return;ll>Bo&&(Bo=ll)}else if(Jo>0){if(ll<Bo)return;ll<As&&(As=ll)}if(ll=Si-rs,!(!Io&&ll>0)){if(ll/=Io,Io<0){if(ll<Bo)return;ll<As&&(As=ll)}else if(Io>0){if(ll>As)return;ll>Bo&&(Bo=ll)}if(ll=yo-rs,!(!Io&&ll<0)){if(ll/=Io,Io<0){if(ll>As)return;ll>Bo&&(Bo=ll)}else if(Io>0){if(ll<Bo)return;ll<As&&(As=ll)}return Bo>0&&(sn[0]=uo+Bo*Jo,sn[1]=rs+Bo*Io),As<1&&(Fn[0]=uo+As*Jo,Fn[1]=rs+As*Io),!0}}}}}var Ea=1e9,cs=-Ea;function No(sn,Fn,Li,Si){function ma(Ws,Bo){return sn<=Ws&&Ws<=Li&&Fn<=Bo&&Bo<=Si}function yo(Ws,Bo,As,Jo){var Io=0,ll=0;if(Ws==null||(Io=uo(Ws,As))!==(ll=uo(Bo,As))||hs(Ws,Bo)<0^As>0)do Jo.point(Io===0||Io===3?sn:Li,Io>1?Si:Fn);while((Io=(Io+As+4)%4)!==ll);else Jo.point(Bo[0],Bo[1])}function uo(Ws,Bo){return A(Ws[0]-sn)<c?Bo>0?0:3:A(Ws[0]-Li)<c?Bo>0?2:1:A(Ws[1]-Fn)<c?Bo>0?1:0:Bo>0?3:2}function rs(Ws,Bo){return hs(Ws.x,Bo.x)}function hs(Ws,Bo){var As=uo(Ws,1),Jo=uo(Bo,1);return As!==Jo?As-Jo:As===0?Bo[1]-Ws[1]:As===1?Ws[0]-Bo[0]:As===2?Ws[1]-Bo[1]:Bo[0]-Ws[0]}return function(Ws){var Bo=Ws,As=ei(),Jo,Io,ll,Tu,du,ku,Au,cl,Os,Vu,Nc,Sf={point:sd,lineStart:wh,lineEnd:vh,polygonStart:ld,polygonEnd:Jc};function sd(Wl,lc){ma(Wl,lc)&&Bo.point(Wl,lc)}function Cf(){for(var Wl=0,lc=0,Bf=Io.length;lc<Bf;++lc)for(var gf=Io[lc],rv=1,nv=gf.length,vv=gf[0],kg,iv,$m=vv[0],Sh=vv[1];rv<nv;++rv)kg=$m,iv=Sh,vv=gf[rv],$m=vv[0],Sh=vv[1],iv<=Si?Sh>Si&&($m-kg)*(Si-iv)>(Sh-iv)*(sn-kg)&&++Wl:Sh<=Si&&($m-kg)*(Si-iv)<(Sh-iv)*(sn-kg)&&--Wl;return Wl}function ld(){Bo=As,Jo=[],Io=[],Nc=!0}function Jc(){var Wl=Cf(),lc=Nc&&Wl,Bf=(Jo=R.merge(Jo)).length;(lc||Bf)&&(Ws.polygonStart(),lc&&(Ws.lineStart(),yo(null,null,1,Ws),Ws.lineEnd()),Bf&&pi(Jo,rs,Wl,yo,Ws),Ws.polygonEnd()),Bo=Ws,Jo=Io=ll=null}function wh(){Sf.point=rd,Io&&Io.push(ll=[]),Vu=!0,Os=!1,Au=cl=NaN}function vh(){Jo&&(rd(Tu,du),ku&&Os&&As.rejoin(),Jo.push(As.result())),Sf.point=sd,Os&&Bo.lineEnd()}function rd(Wl,lc){var Bf=ma(Wl,lc);if(Io&&ll.push([Wl,lc]),Vu)Tu=Wl,du=lc,ku=Bf,Vu=!1,Bf&&(Bo.lineStart(),Bo.point(Wl,lc));else if(Bf&&Os)Bo.point(Wl,lc);else{var gf=[Au=Math.max(cs,Math.min(Ea,Au)),cl=Math.max(cs,Math.min(Ea,cl))],rv=[Wl=Math.max(cs,Math.min(Ea,Wl)),lc=Math.max(cs,Math.min(Ea,lc))];ji(gf,rv,sn,Fn,Li,Si)?(Os||(Bo.lineStart(),Bo.point(gf[0],gf[1])),Bo.point(rv[0],rv[1]),Bf||Bo.lineEnd(),Nc=!1):Bf&&(Bo.lineStart(),Bo.point(Wl,lc),Nc=!1)}Au=Wl,cl=lc,Os=Bf}return Sf}}function Vs(){var sn=0,Fn=0,Li=960,Si=500,ma,yo,uo;return uo={stream:function(rs){return ma&&yo===rs?ma:ma=No(sn,Fn,Li,Si)(yo=rs)},extent:function(rs){return arguments.length?(sn=+rs[0][0],Fn=+rs[0][1],Li=+rs[1][0],Si=+rs[1][1],ma=yo=null,uo):[[sn,Fn],[Li,Si]]}}}var pl=O(),kl,El,iu,bu={sphere:$,point:$,lineStart:yl,lineEnd:$,polygonStart:$,polygonEnd:$};function yl(){bu.point=rc,bu.lineEnd=ql}function ql(){bu.point=bu.lineEnd=$}function rc(sn,Fn){sn*=x,Fn*=x,kl=sn,El=k(Fn),iu=g(Fn),bu.point=zc}function zc(sn,Fn){sn*=x,Fn*=x;var Li=k(Fn),Si=g(Fn),ma=A(sn-kl),yo=g(ma),uo=k(ma),rs=Si*uo,hs=iu*Li-El*Si*yo,Ws=El*Li+iu*Si*yo;pl.add(D(T(rs*rs+hs*hs),Ws)),kl=sn,El=Li,iu=Si}function Pf(sn){return pl.reset(),ee(sn,bu),+pl}var ju=[null,null],Ql={type:"LineString",coordinates:ju};function lu(sn,Fn){return ju[0]=sn,ju[1]=Fn,Pf(Ql)}var dc={Feature:function(sn,Fn){return mc(sn.geometry,Fn)},FeatureCollection:function(sn,Fn){for(var Li=sn.features,Si=-1,ma=Li.length;++Si<ma;)if(mc(Li[Si].geometry,Fn))return!0;return!1}},wc={Sphere:function(){return!0},Point:function(sn,Fn){return xu(sn.coordinates,Fn)},MultiPoint:function(sn,Fn){for(var Li=sn.coordinates,Si=-1,ma=Li.length;++Si<ma;)if(xu(Li[Si],Fn))return!0;return!1},LineString:function(sn,Fn){return qu(sn.coordinates,Fn)},MultiLineString:function(sn,Fn){for(var Li=sn.coordinates,Si=-1,ma=Li.length;++Si<ma;)if(qu(Li[Si],Fn))return!0;return!1},Polygon:function(sn,Fn){return xf(sn.coordinates,Fn)},MultiPolygon:function(sn,Fn){for(var Li=sn.coordinates,Si=-1,ma=Li.length;++Si<ma;)if(xf(Li[Si],Fn))return!0;return!1},GeometryCollection:function(sn,Fn){for(var Li=sn.geometries,Si=-1,ma=Li.length;++Si<ma;)if(mc(Li[Si],Fn))return!0;return!1}};function mc(sn,Fn){return sn&&wc.hasOwnProperty(sn.type)?wc[sn.type](sn,Fn):!1}function xu(sn,Fn){return lu(sn,Fn)===0}function qu(sn,Fn){for(var Li,Si,ma,yo=0,uo=sn.length;yo<uo;yo++){if(Si=lu(sn[yo],Fn),Si===0||yo>0&&(ma=lu(sn[yo],sn[yo-1]),ma>0&&Li<=ma&&Si<=ma&&(Li+Si-ma)*(1-Math.pow((Li-Si)/ma,2))<p*ma))return!0;Li=Si}return!1}function xf(sn,Fn){return!!$i(sn.map(ed),Df(Fn))}function ed(sn){return sn=sn.map(Df),sn.pop(),sn}function Df(sn){return[sn[0]*x,sn[1]*x]}function Sc(sn,Fn){return(sn&&dc.hasOwnProperty(sn.type)?dc[sn.type]:mc)(sn,Fn)}function Qo(sn,Fn,Li){var Si=R.range(sn,Fn-c,Li).concat(Fn);return function(ma){return Si.map(function(yo){return[ma,yo]})}}function Sl(sn,Fn,Li){var Si=R.range(sn,Fn-c,Li).concat(Fn);return function(ma){return Si.map(function(yo){return[yo,ma]})}}function gd(){var sn,Fn,Li,Si,ma,yo,uo,rs,hs=10,Ws=hs,Bo=90,As=360,Jo,Io,ll,Tu,du=2.5;function ku(){return{type:"MultiLineString",coordinates:Au()}}function Au(){return R.range(C(Si/Bo)*Bo,Li,Bo).map(ll).concat(R.range(C(rs/As)*As,uo,As).map(Tu)).concat(R.range(C(Fn/hs)*hs,sn,hs).filter(function(cl){return A(cl%Bo)>c}).map(Jo)).concat(R.range(C(yo/Ws)*Ws,ma,Ws).filter(function(cl){return A(cl%As)>c}).map(Io))}return ku.lines=function(){return Au().map(function(cl){return{type:"LineString",coordinates:cl}})},ku.outline=function(){return{type:"Polygon",coordinates:[ll(Si).concat(Tu(uo).slice(1),ll(Li).reverse().slice(1),Tu(rs).reverse().slice(1))]}},ku.extent=function(cl){return arguments.length?ku.extentMajor(cl).extentMinor(cl):ku.extentMinor()},ku.extentMajor=function(cl){return arguments.length?(Si=+cl[0][0],Li=+cl[1][0],rs=+cl[0][1],uo=+cl[1][1],Si>Li&&(cl=Si,Si=Li,Li=cl),rs>uo&&(cl=rs,rs=uo,uo=cl),ku.precision(du)):[[Si,rs],[Li,uo]]},ku.extentMinor=function(cl){return arguments.length?(Fn=+cl[0][0],sn=+cl[1][0],yo=+cl[0][1],ma=+cl[1][1],Fn>sn&&(cl=Fn,Fn=sn,sn=cl),yo>ma&&(cl=yo,yo=ma,ma=cl),ku.precision(du)):[[Fn,yo],[sn,ma]]},ku.step=function(cl){return arguments.length?ku.stepMajor(cl).stepMinor(cl):ku.stepMinor()},ku.stepMajor=function(cl){return arguments.length?(Bo=+cl[0],As=+cl[1],ku):[Bo,As]},ku.stepMinor=function(cl){return arguments.length?(hs=+cl[0],Ws=+cl[1],ku):[hs,Ws]},ku.precision=function(cl){return arguments.length?(du=+cl,Jo=Qo(yo,ma,90),Io=Sl(Fn,sn,du),ll=Qo(rs,uo,90),Tu=Sl(Si,Li,du),ku):du},ku.extentMajor([[-180,-90+c],[180,90-c]]).extentMinor([[-180,-80-c],[180,80+c]])}function $f(){return gd()()}function wu(sn,Fn){var Li=sn[0]*x,Si=sn[1]*x,ma=Fn[0]*x,yo=Fn[1]*x,uo=g(Si),rs=k(Si),hs=g(yo),Ws=k(yo),Bo=uo*g(Li),As=uo*k(Li),Jo=hs*g(ma),Io=hs*k(ma),ll=2*M(T(W(yo-Si)+uo*hs*W(ma-Li))),Tu=k(ll),du=ll?function(ku){var Au=k(ku*=ll)/Tu,cl=k(ll-ku)/Tu,Os=cl*Bo+Au*Jo,Vu=cl*As+Au*Io,Nc=cl*rs+Au*Ws;return[D(Vu,Os)*_,D(Nc,T(Os*Os+Vu*Vu))*_]}:function(){return[Li*_,Si*_]};return du.distance=ll,du}function Ad(sn){return sn}var Bc=O(),uf=O(),Cd,Tl,Xu,pu,Zc={point:$,lineStart:$,lineEnd:$,polygonStart:function(){Zc.lineStart=Md,Zc.lineEnd=op},polygonEnd:function(){Zc.lineStart=Zc.lineEnd=Zc.point=$,Bc.add(A(uf)),uf.reset()},result:function(){var sn=Bc/2;return Bc.reset(),sn}};function Md(){Zc.point=uu}function uu(sn,Fn){Zc.point=Lf,Cd=Xu=sn,Tl=pu=Fn}function Lf(sn,Fn){uf.add(pu*sn-Xu*Fn),Xu=sn,pu=Fn}function op(){Lf(Cd,Tl)}var zd=1/0,Qp=zd,hh=-zd,td=hh,ev={point:Um,lineStart:$,lineEnd:$,polygonStart:$,polygonEnd:$,result:function(){var sn=[[zd,Qp],[hh,td]];return hh=td=-(Qp=zd=1/0),sn}};function Um(sn,Fn){sn<zd&&(zd=sn),sn>hh&&(hh=sn),Fn<Qp&&(Qp=Fn),Fn>td&&(td=Fn)}var Hm=0,om=0,K0=0,o1=0,Of=0,xm=0,J0=0,wp=0,sp=0,Sp,sm,yd,lp,Uc={point:zf,lineStart:jm,lineEnd:Bd,polygonStart:function(){Uc.lineStart=z1,Uc.lineEnd=Oc},polygonEnd:function(){Uc.point=zf,Uc.lineStart=jm,Uc.lineEnd=Bd},result:function(){var sn=sp?[J0/sp,wp/sp]:xm?[o1/xm,Of/xm]:K0?[Hm/K0,om/K0]:[NaN,NaN];return Hm=om=K0=o1=Of=xm=J0=wp=sp=0,sn}};function zf(sn,Fn){Hm+=sn,om+=Fn,++K0}function jm(){Uc.point=hv}function hv(sn,Fn){Uc.point=og,zf(yd=sn,lp=Fn)}function og(sn,Fn){var Li=sn-yd,Si=Fn-lp,ma=T(Li*Li+Si*Si);o1+=ma*(yd+sn)/2,Of+=ma*(lp+Fn)/2,xm+=ma,zf(yd=sn,lp=Fn)}function Bd(){Uc.point=zf}function z1(){Uc.point=pb}function Oc(){mf(Sp,sm)}function pb(sn,Fn){Uc.point=mf,zf(Sp=yd=sn,sm=lp=Fn)}function mf(sn,Fn){var Li=sn-yd,Si=Fn-lp,ma=T(Li*Li+Si*Si);o1+=ma*(yd+sn)/2,Of+=ma*(lp+Fn)/2,xm+=ma,ma=lp*sn-yd*Fn,J0+=ma*(yd+sn),wp+=ma*(lp+Fn),sp+=ma*3,zf(yd=sn,lp=Fn)}function mu(sn){this._context=sn}mu.prototype={_radius:4.5,pointRadius:function(sn){return this._radius=sn,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(sn,Fn){switch(this._point){case 0:{this._context.moveTo(sn,Fn),this._point=1;break}case 1:{this._context.lineTo(sn,Fn);break}default:{this._context.moveTo(sn+this._radius,Fn),this._context.arc(sn,Fn,this._radius,0,m);break}}},result:$};var Wg=O(),lm,Hh,Q0,sg,a0,up={point:$,lineStart:function(){up.point=s1},lineEnd:function(){lm&&Ay(Hh,Q0),up.point=$},polygonStart:function(){lm=!0},polygonEnd:function(){lm=null},result:function(){var sn=+Wg;return Wg.reset(),sn}};function s1(sn,Fn){up.point=Ay,Hh=sg=sn,Q0=a0=Fn}function Ay(sn,Fn){sg-=sn,a0-=Fn,Wg.add(T(sg*sg+a0*a0)),sg=sn,a0=Fn}function o0(){this._string=[]}o0.prototype={_radius:4.5,_circle:lg(4.5),pointRadius:function(sn){return(sn=+sn)!==this._radius&&(this._radius=sn,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(sn,Fn){switch(this._point){case 0:{this._string.push("M",sn,",",Fn),this._point=1;break}case 1:{this._string.push("L",sn,",",Fn);break}default:{this._circle==null&&(this._circle=lg(this._radius)),this._string.push("M",sn,",",Fn,this._circle);break}}},result:function(){if(this._string.length){var sn=this._string.join("");return this._string=[],sn}else return null}};function lg(sn){return"m0,"+sn+"a"+sn+","+sn+" 0 1,1 0,"+-2*sn+"a"+sn+","+sn+" 0 1,1 0,"+2*sn+"z"}function ey(sn,Fn){var Li=4.5,Si,ma;function yo(uo){return uo&&(typeof Li=="function"&&ma.pointRadius(+Li.apply(this,arguments)),ee(uo,Si(ma))),ma.result()}return yo.area=function(uo){return ee(uo,Si(Zc)),Zc.result()},yo.measure=function(uo){return ee(uo,Si(up)),up.result()},yo.bounds=function(uo){return ee(uo,Si(ev)),ev.result()},yo.centroid=function(uo){return ee(uo,Si(Uc)),Uc.result()},yo.projection=function(uo){return arguments.length?(Si=uo==null?(sn=null,Ad):(sn=uo).stream,yo):sn},yo.context=function(uo){return arguments.length?(ma=uo==null?(Fn=null,new o0):new mu(Fn=uo),typeof Li!="function"&&ma.pointRadius(Li),yo):Fn},yo.pointRadius=function(uo){return arguments.length?(Li=typeof uo=="function"?uo:(ma.pointRadius(+uo),+uo),yo):Li},yo.projection(sn).context(Fn)}function ty(sn){return{stream:um(sn)}}function um(sn){return function(Fn){var Li=new Cy;for(var Si in sn)Li[Si]=sn[Si];return Li.stream=Fn,Li}}function Cy(){}Cy.prototype={constructor:Cy,point:function(sn,Fn){this.stream.point(sn,Fn)},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 Vm(sn,Fn,Li){var Si=sn.clipExtent&&sn.clipExtent();return sn.scale(150).translate([0,0]),Si!=null&&sn.clipExtent(null),ee(Li,sn.stream(ev)),Fn(ev.result()),Si!=null&&sn.clipExtent(Si),sn}function _m(sn,Fn,Li){return Vm(sn,function(Si){var ma=Fn[1][0]-Fn[0][0],yo=Fn[1][1]-Fn[0][1],uo=Math.min(ma/(Si[1][0]-Si[0][0]),yo/(Si[1][1]-Si[0][1])),rs=+Fn[0][0]+(ma-uo*(Si[1][0]+Si[0][0]))/2,hs=+Fn[0][1]+(yo-uo*(Si[1][1]+Si[0][1]))/2;sn.scale(150*uo).translate([rs,hs])},Li)}function cp(sn,Fn,Li){return _m(sn,[[0,0],Fn],Li)}function Rg(sn,Fn,Li){return Vm(sn,function(Si){var ma=+Fn,yo=ma/(Si[1][0]-Si[0][0]),uo=(ma-yo*(Si[1][0]+Si[0][0]))/2,rs=-yo*Si[0][1];sn.scale(150*yo).translate([uo,rs])},Li)}function ry(sn,Fn,Li){return Vm(sn,function(Si){var ma=+Fn,yo=ma/(Si[1][1]-Si[0][1]),uo=-yo*Si[0][0],rs=(ma-yo*(Si[1][1]+Si[0][1]))/2;sn.scale(150*yo).translate([uo,rs])},Li)}var Wf=16,E0=g(30*x);function B1(sn,Fn){return+Fn?s0(sn,Fn):My(sn)}function My(sn){return um({point:function(Fn,Li){Fn=sn(Fn,Li),this.stream.point(Fn[0],Fn[1])}})}function s0(sn,Fn){function Li(Si,ma,yo,uo,rs,hs,Ws,Bo,As,Jo,Io,ll,Tu,du){var ku=Ws-Si,Au=Bo-ma,cl=ku*ku+Au*Au;if(cl>4*Fn&&Tu--){var Os=uo+Jo,Vu=rs+Io,Nc=hs+ll,Sf=T(Os*Os+Vu*Vu+Nc*Nc),sd=M(Nc/=Sf),Cf=A(A(Nc)-1)<c||A(yo-As)<c?(yo+As)/2:D(Vu,Os),ld=sn(Cf,sd),Jc=ld[0],wh=ld[1],vh=Jc-Si,rd=wh-ma,Wl=Au*vh-ku*rd;(Wl*Wl/cl>Fn||A((ku*vh+Au*rd)/cl-.5)>.3||uo*Jo+rs*Io+hs*ll<E0)&&(Li(Si,ma,yo,uo,rs,hs,Jc,wh,Cf,Os/=Sf,Vu/=Sf,Nc,Tu,du),du.point(Jc,wh),Li(Jc,wh,Cf,Os,Vu,Nc,Ws,Bo,As,Jo,Io,ll,Tu,du))}}return function(Si){var ma,yo,uo,rs,hs,Ws,Bo,As,Jo,Io,ll,Tu,du={point:ku,lineStart:Au,lineEnd:Os,polygonStart:function(){Si.polygonStart(),du.lineStart=Vu},polygonEnd:function(){Si.polygonEnd(),du.lineStart=Au}};function ku(sd,Cf){sd=sn(sd,Cf),Si.point(sd[0],sd[1])}function Au(){As=NaN,du.point=cl,Si.lineStart()}function cl(sd,Cf){var ld=Te([sd,Cf]),Jc=sn(sd,Cf);Li(As,Jo,Bo,Io,ll,Tu,As=Jc[0],Jo=Jc[1],Bo=sd,Io=ld[0],ll=ld[1],Tu=ld[2],Wf,Si),Si.point(As,Jo)}function Os(){du.point=ku,Si.lineEnd()}function Vu(){Au(),du.point=Nc,du.lineEnd=Sf}function Nc(sd,Cf){cl(ma=sd,Cf),yo=As,uo=Jo,rs=Io,hs=ll,Ws=Tu,du.point=cl}function Sf(){Li(As,Jo,Bo,Io,ll,Tu,yo,uo,ma,rs,hs,Ws,Wf,Si),du.lineEnd=Os,Os()}return du}}var Ry=um({point:function(sn,Fn){this.stream.point(sn*x,Fn*x)}});function Av(sn){return um({point:function(Fn,Li){var Si=sn(Fn,Li);return this.stream.point(Si[0],Si[1])}})}function ky(sn,Fn,Li,Si,ma){function yo(uo,rs){return uo*=Si,rs*=ma,[Fn+sn*uo,Li-sn*rs]}return yo.invert=function(uo,rs){return[(uo-Fn)/sn*Si,(Li-rs)/sn*ma]},yo}function uh(sn,Fn,Li,Si,ma,yo){var uo=g(yo),rs=k(yo),hs=uo*sn,Ws=rs*sn,Bo=uo/sn,As=rs/sn,Jo=(rs*Li-uo*Fn)/sn,Io=(rs*Fn+uo*Li)/sn;function ll(Tu,du){return Tu*=Si,du*=ma,[hs*Tu-Ws*du+Fn,Li-Ws*Tu-hs*du]}return ll.invert=function(Tu,du){return[Si*(Bo*Tu-As*du+Jo),ma*(Io-As*Tu-Bo*du)]},ll}function Cv(sn){return ug(function(){return sn})()}function ug(sn){var Fn,Li=150,Si=480,ma=250,yo=0,uo=0,rs=0,hs=0,Ws=0,Bo,As=0,Jo=1,Io=1,ll=null,Tu=Xn,du=null,ku,Au,cl,Os=Ad,Vu=.5,Nc,Sf,sd,Cf,ld;function Jc(Wl){return sd(Wl[0]*x,Wl[1]*x)}function wh(Wl){return Wl=sd.invert(Wl[0],Wl[1]),Wl&&[Wl[0]*_,Wl[1]*_]}Jc.stream=function(Wl){return Cf&&ld===Wl?Cf:Cf=Ry(Av(Bo)(Tu(Nc(Os(ld=Wl)))))},Jc.preclip=function(Wl){return arguments.length?(Tu=Wl,ll=void 0,rd()):Tu},Jc.postclip=function(Wl){return arguments.length?(Os=Wl,du=ku=Au=cl=null,rd()):Os},Jc.clipAngle=function(Wl){return arguments.length?(Tu=+Wl?Ba(ll=Wl*x):(ll=null,Xn),rd()):ll*_},Jc.clipExtent=function(Wl){return arguments.length?(Os=Wl==null?(du=ku=Au=cl=null,Ad):No(du=+Wl[0][0],ku=+Wl[0][1],Au=+Wl[1][0],cl=+Wl[1][1]),rd()):du==null?null:[[du,ku],[Au,cl]]},Jc.scale=function(Wl){return arguments.length?(Li=+Wl,vh()):Li},Jc.translate=function(Wl){return arguments.length?(Si=+Wl[0],ma=+Wl[1],vh()):[Si,ma]},Jc.center=function(Wl){return arguments.length?(yo=Wl[0]%360*x,uo=Wl[1]%360*x,vh()):[yo*_,uo*_]},Jc.rotate=function(Wl){return arguments.length?(rs=Wl[0]%360*x,hs=Wl[1]%360*x,Ws=Wl.length>2?Wl[2]%360*x:0,vh()):[rs*_,hs*_,Ws*_]},Jc.angle=function(Wl){return arguments.length?(As=Wl%360*x,vh()):As*_},Jc.reflectX=function(Wl){return arguments.length?(Jo=Wl?-1:1,vh()):Jo<0},Jc.reflectY=function(Wl){return arguments.length?(Io=Wl?-1:1,vh()):Io<0},Jc.precision=function(Wl){return arguments.length?(Nc=B1(Sf,Vu=Wl*Wl),rd()):T(Vu)},Jc.fitExtent=function(Wl,lc){return _m(Jc,Wl,lc)},Jc.fitSize=function(Wl,lc){return cp(Jc,Wl,lc)},Jc.fitWidth=function(Wl,lc){return Rg(Jc,Wl,lc)},Jc.fitHeight=function(Wl,lc){return ry(Jc,Wl,lc)};function vh(){var Wl=uh(Li,0,0,Jo,Io,As).apply(null,Fn(yo,uo)),lc=(As?uh:ky)(Li,Si-Wl[0],ma-Wl[1],Jo,Io,As);return Bo=Ta(rs,hs,Ws),Sf=aa(Fn,lc),sd=aa(Bo,Sf),Nc=B1(Sf,Vu),rd()}function rd(){return Cf=ld=null,Jc}return function(){return Fn=sn.apply(this,arguments),Jc.invert=Fn.invert&&wh,vh()}}function bd(sn){var Fn=0,Li=f/3,Si=ug(sn),ma=Si(Fn,Li);return ma.parallels=function(yo){return arguments.length?Si(Fn=yo[0]*x,Li=yo[1]*x):[Fn*_,Li*_]},ma}function qm(sn){var Fn=g(sn);function Li(Si,ma){return[Si*Fn,k(ma)/Fn]}return Li.invert=function(Si,ma){return[Si/Fn,M(ma*Fn)]},Li}function tv(sn,Fn){var Li=k(sn),Si=(Li+k(Fn))/2;if(A(Si)<c)return qm(sn);var ma=1+Li*(2*Si-Li),yo=T(ma)/Si;function uo(rs,hs){var Ws=T(ma-2*Si*k(hs))/Si;return[Ws*k(rs*=Si),yo-Ws*g(rs)]}return uo.invert=function(rs,hs){var Ws=yo-hs,Bo=D(rs,A(Ws))*P(Ws);return Ws*Si<0&&(Bo-=f*P(rs)*P(Ws)),[Bo/Si,M((ma-(rs*rs+Ws*Ws)*Si*Si)/(2*Si))]},uo}function Mv(){return bd(tv).scale(155.424).center([0,33.6442])}function Ud(){return Mv().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Yg(sn){var Fn=sn.length;return{point:function(Li,Si){for(var ma=-1;++ma<Fn;)sn[ma].point(Li,Si)},sphere:function(){for(var Li=-1;++Li<Fn;)sn[Li].sphere()},lineStart:function(){for(var Li=-1;++Li<Fn;)sn[Li].lineStart()},lineEnd:function(){for(var Li=-1;++Li<Fn;)sn[Li].lineEnd()},polygonStart:function(){for(var Li=-1;++Li<Fn;)sn[Li].polygonStart()},polygonEnd:function(){for(var Li=-1;++Li<Fn;)sn[Li].polygonEnd()}}}function wm(){var sn,Fn,Li=Ud(),Si,ma=Mv().rotate([154,0]).center([-2,58.5]).parallels([55,65]),yo,uo=Mv().rotate([157,0]).center([-3,19.9]).parallels([8,18]),rs,hs,Ws={point:function(Jo,Io){hs=[Jo,Io]}};function Bo(Jo){var Io=Jo[0],ll=Jo[1];return hs=null,Si.point(Io,ll),hs||(yo.point(Io,ll),hs)||(rs.point(Io,ll),hs)}Bo.invert=function(Jo){var Io=Li.scale(),ll=Li.translate(),Tu=(Jo[0]-ll[0])/Io,du=(Jo[1]-ll[1])/Io;return(du>=.12&&du<.234&&Tu>=-.425&&Tu<-.214?ma:du>=.166&&du<.234&&Tu>=-.214&&Tu<-.115?uo:Li).invert(Jo)},Bo.stream=function(Jo){return sn&&Fn===Jo?sn:sn=Yg([Li.stream(Fn=Jo),ma.stream(Jo),uo.stream(Jo)])},Bo.precision=function(Jo){return arguments.length?(Li.precision(Jo),ma.precision(Jo),uo.precision(Jo),As()):Li.precision()},Bo.scale=function(Jo){return arguments.length?(Li.scale(Jo),ma.scale(Jo*.35),uo.scale(Jo),Bo.translate(Li.translate())):Li.scale()},Bo.translate=function(Jo){if(!arguments.length)return Li.translate();var Io=Li.scale(),ll=+Jo[0],Tu=+Jo[1];return Si=Li.translate(Jo).clipExtent([[ll-.455*Io,Tu-.238*Io],[ll+.455*Io,Tu+.238*Io]]).stream(Ws),yo=ma.translate([ll-.307*Io,Tu+.201*Io]).clipExtent([[ll-.425*Io+c,Tu+.12*Io+c],[ll-.214*Io-c,Tu+.234*Io-c]]).stream(Ws),rs=uo.translate([ll-.205*Io,Tu+.212*Io]).clipExtent([[ll-.214*Io+c,Tu+.166*Io+c],[ll-.115*Io-c,Tu+.234*Io-c]]).stream(Ws),As()},Bo.fitExtent=function(Jo,Io){return _m(Bo,Jo,Io)},Bo.fitSize=function(Jo,Io){return cp(Bo,Jo,Io)},Bo.fitWidth=function(Jo,Io){return Rg(Bo,Jo,Io)},Bo.fitHeight=function(Jo,Io){return ry(Bo,Jo,Io)};function As(){return sn=Fn=null,Bo}return Bo.scale(1070)}function cg(sn){return function(Fn,Li){var Si=g(Fn),ma=g(Li),yo=sn(Si*ma);return[yo*ma*k(Fn),yo*k(Li)]}}function A0(sn){return function(Fn,Li){var Si=T(Fn*Fn+Li*Li),ma=sn(Si),yo=k(ma),uo=g(ma);return[D(Fn*yo,Si*uo),M(Si&&Li*yo/Si)]}}var U1=cg(function(sn){return T(2/(1+sn))});U1.invert=A0(function(sn){return 2*M(sn/2)});function Qb(){return Cv(U1).scale(124.75).clipAngle(180-.001)}var Xg=cg(function(sn){return(sn=S(sn))&&sn/k(sn)});Xg.invert=A0(function(sn){return sn});function C0(){return Cv(Xg).scale(79.4188).clipAngle(180-.001)}function Uv(sn,Fn){return[sn,N(y((v+Fn)/2))]}Uv.invert=function(sn,Fn){return[sn,2*E(I(Fn))-v]};function M0(){return Tp(Uv).scale(961/m)}function Tp(sn){var Fn=Cv(sn),Li=Fn.center,Si=Fn.scale,ma=Fn.translate,yo=Fn.clipExtent,uo=null,rs,hs,Ws;Fn.scale=function(As){return arguments.length?(Si(As),Bo()):Si()},Fn.translate=function(As){return arguments.length?(ma(As),Bo()):ma()},Fn.center=function(As){return arguments.length?(Li(As),Bo()):Li()},Fn.clipExtent=function(As){return arguments.length?(As==null?uo=rs=hs=Ws=null:(uo=+As[0][0],rs=+As[0][1],hs=+As[1][0],Ws=+As[1][1]),Bo()):uo==null?null:[[uo,rs],[hs,Ws]]};function Bo(){var As=f*Si(),Jo=Fn(xo(Fn.rotate()).invert([0,0]));return yo(uo==null?[[Jo[0]-As,Jo[1]-As],[Jo[0]+As,Jo[1]+As]]:sn===Uv?[[Math.max(Jo[0]-As,uo),rs],[Math.min(Jo[0]+As,hs),Ws]]:[[uo,Math.max(Jo[1]-As,rs)],[hs,Math.min(Jo[1]+As,Ws)]])}return Bo()}function Zg(sn){return y((v+sn)/2)}function Iy(sn,Fn){var Li=g(sn),Si=sn===Fn?k(sn):N(Li/g(Fn))/N(Zg(Fn)/Zg(sn)),ma=Li*F(Zg(sn),Si)/Si;if(!Si)return Uv;function yo(uo,rs){ma>0?rs<-v+c&&(rs=-v+c):rs>v-c&&(rs=v-c);var hs=ma/F(Zg(rs),Si);return[hs*k(Si*uo),ma-hs*g(Si*uo)]}return yo.invert=function(uo,rs){var hs=ma-rs,Ws=P(Si)*T(uo*uo+hs*hs),Bo=D(uo,A(hs))*P(hs);return hs*Si<0&&(Bo-=f*P(uo)*P(hs)),[Bo/Si,2*E(F(ma/Ws,1/Si))-v]},yo}function Kg(){return bd(Iy).scale(109.5).parallels([30,30])}function Rd(sn,Fn){return[sn,Fn]}Rd.invert=Rd;function Rv(){return Cv(Rd).scale(152.63)}function cm(sn,Fn){var Li=g(sn),Si=sn===Fn?k(sn):(Li-g(Fn))/(Fn-sn),ma=Li/Si+sn;if(A(Si)<c)return Rd;function yo(uo,rs){var hs=ma-rs,Ws=Si*uo;return[hs*k(Ws),ma-hs*g(Ws)]}return yo.invert=function(uo,rs){var hs=ma-rs,Ws=D(uo,A(hs))*P(hs);return hs*Si<0&&(Ws-=f*P(uo)*P(hs)),[Ws/Si,ma-P(Si)*T(uo*uo+hs*hs)]},yo}function ny(){return bd(cm).scale(131.154).center([0,13.9389])}var Ld=1.340264,l0=-.081106,fg=893e-6,Hv=.003796,u0=T(3)/2,Sm=12;function c0(sn,Fn){var Li=M(u0*k(Fn)),Si=Li*Li,ma=Si*Si*Si;return[sn*g(Li)/(u0*(Ld+3*l0*Si+ma*(7*fg+9*Hv*Si))),Li*(Ld+l0*Si+ma*(fg+Hv*Si))]}c0.invert=function(sn,Fn){for(var Li=Fn,Si=Li*Li,ma=Si*Si*Si,yo=0,uo,rs,hs;yo<Sm&&(rs=Li*(Ld+l0*Si+ma*(fg+Hv*Si))-Fn,hs=Ld+3*l0*Si+ma*(7*fg+9*Hv*Si),Li-=uo=rs/hs,Si=Li*Li,ma=Si*Si*Si,!(A(uo)<p));++yo);return[u0*sn*(Ld+3*l0*Si+ma*(7*fg+9*Hv*Si))/g(Li),M(k(Li)/u0)]};function H1(){return Cv(c0).scale(177.158)}function Np(sn,Fn){var Li=g(Fn),Si=g(sn)*Li;return[Li*k(sn)/Si,k(Fn)/Si]}Np.invert=A0(E);function Py(){return Cv(Np).scale(144.049).clipAngle(60)}function jv(){var sn=1,Fn=0,Li=0,Si=1,ma=1,yo=0,uo,rs,hs=null,Ws,Bo,As,Jo=1,Io=1,ll=um({point:function(Os,Vu){var Nc=cl([Os,Vu]);this.stream.point(Nc[0],Nc[1])}}),Tu=Ad,du,ku;function Au(){return Jo=sn*Si,Io=sn*ma,du=ku=null,cl}function cl(Os){var Vu=Os[0]*Jo,Nc=Os[1]*Io;if(yo){var Sf=Nc*uo-Vu*rs;Vu=Vu*uo+Nc*rs,Nc=Sf}return[Vu+Fn,Nc+Li]}return cl.invert=function(Os){var Vu=Os[0]-Fn,Nc=Os[1]-Li;if(yo){var Sf=Nc*uo+Vu*rs;Vu=Vu*uo-Nc*rs,Nc=Sf}return[Vu/Jo,Nc/Io]},cl.stream=function(Os){return du&&ku===Os?du:du=ll(Tu(ku=Os))},cl.postclip=function(Os){return arguments.length?(Tu=Os,hs=Ws=Bo=As=null,Au()):Tu},cl.clipExtent=function(Os){return arguments.length?(Tu=Os==null?(hs=Ws=Bo=As=null,Ad):No(hs=+Os[0][0],Ws=+Os[0][1],Bo=+Os[1][0],As=+Os[1][1]),Au()):hs==null?null:[[hs,Ws],[Bo,As]]},cl.scale=function(Os){return arguments.length?(sn=+Os,Au()):sn},cl.translate=function(Os){return arguments.length?(Fn=+Os[0],Li=+Os[1],Au()):[Fn,Li]},cl.angle=function(Os){return arguments.length?(yo=Os%360*x,rs=k(yo),uo=g(yo),Au()):yo*_},cl.reflectX=function(Os){return arguments.length?(Si=Os?-1:1,Au()):Si<0},cl.reflectY=function(Os){return arguments.length?(ma=Os?-1:1,Au()):ma<0},cl.fitExtent=function(Os,Vu){return _m(cl,Os,Vu)},cl.fitSize=function(Os,Vu){return cp(cl,Os,Vu)},cl.fitWidth=function(Os,Vu){return Rg(cl,Os,Vu)},cl.fitHeight=function(Os,Vu){return ry(cl,Os,Vu)},cl}function Gm(sn,Fn){var Li=Fn*Fn,Si=Li*Li;return[sn*(.8707-.131979*Li+Si*(-.013791+Si*(.003971*Li-.001529*Si))),Fn*(1.007226+Li*(.015085+Si*(-.044475+.028874*Li-.005916*Si)))]}Gm.invert=function(sn,Fn){var Li=Fn,Si=25,ma;do{var yo=Li*Li,uo=yo*yo;Li-=ma=(Li*(1.007226+yo*(.015085+uo*(-.044475+.028874*yo-.005916*uo)))-Fn)/(1.007226+yo*(.015085*3+uo*(-.044475*7+.028874*9*yo-.005916*11*uo)))}while(A(ma)>c&&--Si>0);return[sn/(.8707+(yo=Li*Li)*(-.131979+yo*(-.013791+yo*yo*yo*(.003971-.001529*yo)))),Li]};function Tm(){return Cv(Gm).scale(175.295)}function ph(sn,Fn){return[g(Fn)*k(sn),k(Fn)]}ph.invert=A0(M);function pv(){return Cv(ph).scale(249.5).clipAngle(90+c)}function Yd(sn,Fn){var Li=g(Fn),Si=1+g(sn)*Li;return[Li*k(sn)/Si,k(Fn)/Si]}Yd.invert=A0(function(sn){return 2*E(sn)});function dg(){return Cv(Yd).scale(250).clipAngle(142)}function Em(sn,Fn){return[N(y((v+Fn)/2)),-sn]}Em.invert=function(sn,Fn){return[-Fn,2*E(I(sn))-v]};function iy(){var sn=Tp(Em),Fn=sn.center,Li=sn.rotate;return sn.center=function(Si){return arguments.length?Fn([-Si[1],Si[0]]):(Si=Fn(),[Si[1],-Si[0]])},sn.rotate=function(Si){return arguments.length?Li([Si[0],Si[1],Si.length>2?Si[2]+90:90]):(Si=Li(),[Si[0],Si[1],Si[2]-90])},Li([0,0,90]).scale(159.155)}w.geoAlbers=Ud,w.geoAlbersUsa=wm,w.geoArea=se,w.geoAzimuthalEqualArea=Qb,w.geoAzimuthalEqualAreaRaw=U1,w.geoAzimuthalEquidistant=C0,w.geoAzimuthalEquidistantRaw=Xg,w.geoBounds=St,w.geoCentroid=$n,w.geoCircle=si,w.geoClipAntimeridian=Xn,w.geoClipCircle=Ba,w.geoClipExtent=Vs,w.geoClipRectangle=No,w.geoConicConformal=Kg,w.geoConicConformalRaw=Iy,w.geoConicEqualArea=Mv,w.geoConicEqualAreaRaw=tv,w.geoConicEquidistant=ny,w.geoConicEquidistantRaw=cm,w.geoContains=Sc,w.geoDistance=lu,w.geoEqualEarth=H1,w.geoEqualEarthRaw=c0,w.geoEquirectangular=Rv,w.geoEquirectangularRaw=Rd,w.geoGnomonic=Py,w.geoGnomonicRaw=Np,w.geoGraticule=gd,w.geoGraticule10=$f,w.geoIdentity=jv,w.geoInterpolate=wu,w.geoLength=Pf,w.geoMercator=M0,w.geoMercatorRaw=Uv,w.geoNaturalEarth1=Tm,w.geoNaturalEarth1Raw=Gm,w.geoOrthographic=pv,w.geoOrthographicRaw=ph,w.geoPath=ey,w.geoProjection=Cv,w.geoProjectionMutator=ug,w.geoRotation=xo,w.geoStereographic=dg,w.geoStereographicRaw=Yd,w.geoStream=ee,w.geoTransform=ty,w.geoTransverseMercator=iy,w.geoTransverseMercatorRaw=Em,Object.defineProperty(w,"__esModule",{value:!0})})}}),gJe=U({"node_modules/d3-geo-projection/dist/d3-geo-projection.js"(pe,le){(function(w,R){typeof pe=="object"&&typeof le<"u"?R(pe,Nbe(),UU()):R(w.d3=w.d3||{},w.d3,w.d3)})(pe,function(w,R,O){var z=Math.abs,l=Math.atan,u=Math.atan2,c=Math.cos,p=Math.exp,f=Math.floor,v=Math.log,h=Math.max,m=Math.min,_=Math.pow,x=Math.round,A=Math.sign||function(kt){return kt>0?1:kt<0?-1:0},E=Math.sin,D=Math.tan,g=1e-6,C=1e-12,I=Math.PI,N=I/2,F=I/4,k=Math.SQRT1_2,P=K(2),T=K(I),y=I*2,S=180/I,M=I/180;function W(kt){return kt?kt/Math.sin(kt):1}function $(kt){return kt>1?N:kt<-1?-N:Math.asin(kt)}function Z(kt){return kt>1?0:kt<-1?I:Math.acos(kt)}function K(kt){return kt>0?Math.sqrt(kt):0}function Q(kt){return kt=p(2*kt),(kt-1)/(kt+1)}function J(kt){return(p(kt)-p(-kt))/2}function G(kt){return(p(kt)+p(-kt))/2}function ee(kt){return v(kt+K(kt*kt+1))}function re(kt){return v(kt+K(kt*kt-1))}function fe(kt){var zt=D(kt/2),Qt=2*v(c(kt/2))/(zt*zt);function cr(Sr,gr){var Nr=c(Sr),vn=c(gr),An=E(gr),Ln=vn*Nr,ai=-((1-Ln?v((1+Ln)/2)/(1-Ln):-.5)+Qt/(1+Ln));return[ai*vn*E(Sr),ai*An]}return cr.invert=function(Sr,gr){var Nr=K(Sr*Sr+gr*gr),vn=-kt/2,An=50,Ln;if(!Nr)return[0,0];do{var ai=vn/2,ki=c(ai),ra=E(ai),oa=ra/ki,Ma=-v(z(ki));vn-=Ln=(2/oa*Ma-Qt*oa-Nr)/(-Ma/(ra*ra)+1-Qt/(2*ki*ki))*(ki<0?.7:1)}while(z(Ln)>g&&--An>0);var mo=E(vn);return[u(Sr*mo,Nr*c(vn)),$(gr*mo/Nr)]},cr}function we(){var kt=N,zt=R.geoProjectionMutator(fe),Qt=zt(kt);return Qt.radius=function(cr){return arguments.length?zt(kt=cr*M):kt*S},Qt.scale(179.976).clipAngle(147)}function Oe(kt,zt){var Qt=c(zt),cr=W(Z(Qt*c(kt/=2)));return[2*Qt*E(kt)*cr,E(zt)*cr]}Oe.invert=function(kt,zt){if(!(kt*kt+4*zt*zt>I*I+g)){var Qt=kt,cr=zt,Sr=25;do{var gr=E(Qt),Nr=E(Qt/2),vn=c(Qt/2),An=E(cr),Ln=c(cr),ai=E(2*cr),ki=An*An,ra=Ln*Ln,oa=Nr*Nr,Ma=1-ra*vn*vn,mo=Ma?Z(Ln*vn)*K(ns=1/Ma):ns=0,ns,$o=2*mo*Ln*Nr-kt,as=mo*An-zt,fl=ns*(ra*oa+mo*Ln*vn*ki),Zl=ns*(.5*gr*ai-mo*2*An*Nr),Fl=ns*.25*(ai*Nr-mo*An*ra*gr),Du=ns*(ki*vn+mo*oa*Ln),qc=Zl*Fl-Du*fl;if(!qc)break;var Gc=(as*Zl-$o*Du)/qc,_c=($o*Fl-as*fl)/qc;Qt-=Gc,cr-=_c}while((z(Gc)>g||z(_c)>g)&&--Sr>0);return[Qt,cr]}};function ke(){return R.geoProjection(Oe).scale(152.63)}function Le(kt){var zt=E(kt),Qt=c(kt),cr=kt>=0?1:-1,Sr=D(cr*kt),gr=(1+zt-Qt)/2;function Nr(vn,An){var Ln=c(An),ai=c(vn/=2);return[(1+Ln)*E(vn),(cr*An>-u(ai,Sr)-.001?0:-cr*10)+gr+E(An)*Qt-(1+Ln)*zt*ai]}return Nr.invert=function(vn,An){var Ln=0,ai=0,ki=50;do{var ra=c(Ln),oa=E(Ln),Ma=c(ai),mo=E(ai),ns=1+Ma,$o=ns*oa-vn,as=gr+mo*Qt-ns*zt*ra-An,fl=ns*ra/2,Zl=-oa*mo,Fl=zt*ns*oa/2,Du=Qt*Ma+zt*ra*mo,qc=Zl*Fl-Du*fl,Gc=(as*Zl-$o*Du)/qc/2,_c=($o*Fl-as*fl)/qc;z(_c)>2&&(_c/=2),Ln-=Gc,ai-=_c}while((z(Gc)>g||z(_c)>g)&&--ki>0);return cr*ai>-u(c(Ln),Sr)-.001?[Ln*2,ai]:null},Nr}function oe(){var kt=20*M,zt=kt>=0?1:-1,Qt=D(zt*kt),cr=R.geoProjectionMutator(Le),Sr=cr(kt),gr=Sr.stream;return Sr.parallel=function(Nr){return arguments.length?(Qt=D((zt=(kt=Nr*M)>=0?1:-1)*kt),cr(kt)):kt*S},Sr.stream=function(Nr){var vn=Sr.rotate(),An=gr(Nr),Ln=(Sr.rotate([0,0]),gr(Nr)),ai=Sr.precision();return Sr.rotate(vn),An.sphere=function(){Ln.polygonStart(),Ln.lineStart();for(var ki=zt*-180;zt*ki<180;ki+=zt*90)Ln.point(ki,zt*90);if(kt)for(;zt*(ki-=3*zt*ai)>=-180;)Ln.point(ki,zt*-u(c(ki*M/2),Qt)*S);Ln.lineEnd(),Ln.polygonEnd()},An},Sr.scale(218.695).center([0,28.0974])}function be(kt,zt){var Qt=D(zt/2),cr=K(1-Qt*Qt),Sr=1+cr*c(kt/=2),gr=E(kt)*cr/Sr,Nr=Qt/Sr,vn=gr*gr,An=Nr*Nr;return[4/3*gr*(3+vn-3*An),4/3*Nr*(3+3*vn-An)]}be.invert=function(kt,zt){if(kt*=3/8,zt*=3/8,!kt&&z(zt)>1)return null;var Qt=kt*kt,cr=zt*zt,Sr=1+Qt+cr,gr=K((Sr-K(Sr*Sr-4*zt*zt))/2),Nr=$(gr)/3,vn=gr?re(z(zt/gr))/3:ee(z(kt))/3,An=c(Nr),Ln=G(vn),ai=Ln*Ln-An*An;return[A(kt)*2*u(J(vn)*An,.25-ai),A(zt)*2*u(Ln*E(Nr),.25+ai)]};function _e(){return R.geoProjection(be).scale(66.1603)}var he=K(8),De=v(1+P);function xe(kt,zt){var Qt=z(zt);return Qt<F?[kt,v(D(F+zt/2))]:[kt*c(Qt)*(2*P-1/E(Qt)),A(zt)*(2*P*(Qt-F)-v(D(Qt/2)))]}xe.invert=function(kt,zt){if((gr=z(zt))<De)return[kt,2*l(p(zt))-N];var Qt=F,cr=25,Sr,gr;do{var Nr=c(Qt/2),vn=D(Qt/2);Qt-=Sr=(he*(Qt-F)-v(vn)-gr)/(he-Nr*Nr/(2*vn))}while(z(Sr)>C&&--cr>0);return[kt/(c(Qt)*(he-1/E(Qt))),A(zt)*Qt]};function se(){return R.geoProjection(xe).scale(112.314)}function Ee(kt){var zt=2*I/kt;function Qt(cr,Sr){var gr=R.geoAzimuthalEquidistantRaw(cr,Sr);if(z(cr)>N){var Nr=u(gr[1],gr[0]),vn=K(gr[0]*gr[0]+gr[1]*gr[1]),An=zt*x((Nr-N)/zt)+N,Ln=u(E(Nr-=An),2-c(Nr));Nr=An+$(I/vn*E(Ln))-Ln,gr[0]=vn*c(Nr),gr[1]=vn*E(Nr)}return gr}return Qt.invert=function(cr,Sr){var gr=K(cr*cr+Sr*Sr);if(gr>N){var Nr=u(Sr,cr),vn=zt*x((Nr-N)/zt)+N,An=Nr>vn?-1:1,Ln=gr*c(vn-Nr),ai=1/D(An*Z((Ln-I)/K(I*(I-2*Ln)+gr*gr)));Nr=vn+2*l((ai+An*K(ai*ai-3))/3),cr=gr*c(Nr),Sr=gr*E(Nr)}return R.geoAzimuthalEquidistantRaw.invert(cr,Sr)},Qt}function Te(){var kt=5,zt=R.geoProjectionMutator(Ee),Qt=zt(kt),cr=Qt.stream,Sr=.01,gr=-c(Sr*M),Nr=E(Sr*M);return Qt.lobes=function(vn){return arguments.length?zt(kt=+vn):kt},Qt.stream=function(vn){var An=Qt.rotate(),Ln=cr(vn),ai=(Qt.rotate([0,0]),cr(vn));return Qt.rotate(An),Ln.sphere=function(){ai.polygonStart(),ai.lineStart();for(var ki=0,ra=360/kt,oa=2*I/kt,Ma=90-180/kt,mo=N;ki<kt;++ki,Ma-=ra,mo-=oa)ai.point(u(Nr*c(mo),gr)*S,$(Nr*E(mo))*S),Ma<-90?(ai.point(-90,-180-Ma-Sr),ai.point(-90,-180-Ma+Sr)):(ai.point(90,Ma+Sr),ai.point(90,Ma-Sr));ai.lineEnd(),ai.polygonEnd()},Ln},Qt.scale(87.8076).center([0,17.1875]).clipAngle(180-.001)}function Be(kt,zt){if(arguments.length<2&&(zt=kt),zt===1)return R.geoAzimuthalEqualAreaRaw;if(zt===1/0)return tt;function Qt(cr,Sr){var gr=R.geoAzimuthalEqualAreaRaw(cr/zt,Sr);return gr[0]*=kt,gr}return Qt.invert=function(cr,Sr){var gr=R.geoAzimuthalEqualAreaRaw.invert(cr/kt,Sr);return gr[0]*=zt,gr},Qt}function tt(kt,zt){return[kt*c(zt)/c(zt/=2),2*E(zt)]}tt.invert=function(kt,zt){var Qt=2*$(zt/2);return[kt*c(Qt/2)/c(Qt),Qt]};function at(){var kt=2,zt=R.geoProjectionMutator(Be),Qt=zt(kt);return Qt.coefficient=function(cr){return arguments.length?zt(kt=+cr):kt},Qt.scale(169.529)}function gt(kt,zt,Qt){var cr=100,Sr,gr,Nr;Qt=Qt===void 0?0:+Qt,zt=+zt;do gr=kt(Qt),Nr=kt(Qt+g),gr===Nr&&(Nr=gr+g),Qt-=Sr=-1*g*(gr-zt)/(gr-Nr);while(cr-- >0&&z(Sr)>g);return cr<0?NaN:Qt}function pt(kt,zt,Qt){return zt===void 0&&(zt=40),Qt===void 0&&(Qt=C),function(cr,Sr,gr,Nr){var vn,An,Ln;gr=gr===void 0?0:+gr,Nr=Nr===void 0?0:+Nr;for(var ai=0;ai<zt;ai++){var ki=kt(gr,Nr),ra=ki[0]-cr,oa=ki[1]-Sr;if(z(ra)<Qt&&z(oa)<Qt)break;var Ma=ra*ra+oa*oa;if(Ma>vn){gr-=An/=2,Nr-=Ln/=2;continue}vn=Ma;var mo=(gr>0?-1:1)*Qt,ns=(Nr>0?-1:1)*Qt,$o=kt(gr+mo,Nr),as=kt(gr,Nr+ns),fl=($o[0]-ki[0])/mo,Zl=($o[1]-ki[1])/mo,Fl=(as[0]-ki[0])/ns,Du=(as[1]-ki[1])/ns,qc=Du*fl-Zl*Fl,Gc=(z(qc)<.5?.5:1)/qc;if(An=(oa*Fl-ra*Du)*Gc,Ln=(ra*Zl-oa*fl)*Gc,gr+=An,Nr+=Ln,z(An)<Qt&&z(Ln)<Qt)break}return[gr,Nr]}}function Rt(){var kt=Be(1.68,2),zt=1.4,Qt=12;function cr(Sr,gr){if(Sr+gr<-zt){var Nr=(Sr-gr+1.6)*(Sr+gr+zt)/8;Sr+=Nr,gr-=.8*Nr*E(gr+I/2)}var vn=kt(Sr,gr),An=(1-c(Sr*gr))/Qt;return vn[1]<0&&(vn[0]*=1+An),vn[1]>0&&(vn[1]*=1+An/1.5*vn[0]*vn[0]),vn}return cr.invert=pt(cr),cr}function $t(){return R.geoProjection(Rt()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function Wt(kt,zt){var Qt=kt*E(zt),cr=30,Sr;do zt-=Sr=(zt+E(zt)-Qt)/(1+c(zt));while(z(Sr)>g&&--cr>0);return zt/2}function Ht(kt,zt,Qt){function cr(Sr,gr){return[kt*Sr*c(gr=Wt(Qt,gr)),zt*E(gr)]}return cr.invert=function(Sr,gr){return gr=$(gr/zt),[Sr/(kt*c(gr)),$((2*gr+E(2*gr))/Qt)]},cr}var Ft=Ht(P/N,P,I);function st(){return R.geoProjection(Ft).scale(169.529)}var rt=2.00276,Ue=1.11072;function xt(kt,zt){var Qt=Wt(I,zt);return[rt*kt/(1/c(zt)+Ue/c(Qt)),(zt+P*E(Qt))/rt]}xt.invert=function(kt,zt){var Qt=rt*zt,cr=zt<0?-F:F,Sr=25,gr,Nr;do Nr=Qt-P*E(cr),cr-=gr=(E(2*cr)+2*cr-I*E(Nr))/(2*c(2*cr)+2+I*c(Nr)*P*c(cr));while(z(gr)>g&&--Sr>0);return Nr=Qt-P*E(cr),[kt*(1/c(Nr)+Ue/c(cr))/rt,Nr]};function Gt(){return R.geoProjection(xt).scale(160.857)}function Jt(kt){var zt=0,Qt=R.geoProjectionMutator(kt),cr=Qt(zt);return cr.parallel=function(Sr){return arguments.length?Qt(zt=Sr*M):zt*S},cr}function Ut(kt,zt){return[kt*c(zt),zt]}Ut.invert=function(kt,zt){return[kt/c(zt),zt]};function kr(){return R.geoProjection(Ut).scale(152.63)}function Pr(kt){if(!kt)return Ut;var zt=1/D(kt);function Qt(cr,Sr){var gr=zt+kt-Sr,Nr=gr&&cr*c(Sr)/gr;return[gr*E(Nr),zt-gr*c(Nr)]}return Qt.invert=function(cr,Sr){var gr=K(cr*cr+(Sr=zt-Sr)*Sr),Nr=zt+kt-gr;return[gr/c(Nr)*u(cr,Sr),Nr]},Qt}function $r(){return Jt(Pr).scale(123.082).center([0,26.1441]).parallel(45)}function rn(kt){function zt(Qt,cr){var Sr=N-cr,gr=Sr&&Qt*kt*E(Sr)/Sr;return[Sr*E(gr)/kt,N-Sr*c(gr)]}return zt.invert=function(Qt,cr){var Sr=Qt*kt,gr=N-cr,Nr=K(Sr*Sr+gr*gr),vn=u(Sr,gr);return[(Nr?Nr/E(Nr):1)*vn/kt,N-Nr]},zt}function kn(){var kt=.5,zt=R.geoProjectionMutator(rn),Qt=zt(kt);return Qt.fraction=function(cr){return arguments.length?zt(kt=+cr):kt},Qt.scale(158.837)}var Rn=Ht(1,4/I,I);function ci(){return R.geoProjection(Rn).scale(152.63)}function In(kt,zt,Qt,cr,Sr,gr){var Nr=c(gr),vn;if(z(kt)>1||z(gr)>1)vn=Z(Qt*Sr+zt*cr*Nr);else{var An=E(kt/2),Ln=E(gr/2);vn=2*$(K(An*An+zt*cr*Ln*Ln))}return z(vn)>g?[vn,u(cr*E(gr),zt*Sr-Qt*cr*Nr)]:[0,0]}function Gn(kt,zt,Qt){return Z((kt*kt+zt*zt-Qt*Qt)/(2*kt*zt))}function mr(kt){return kt-2*I*f((kt+I)/(2*I))}function St(kt,zt,Qt){for(var cr=[[kt[0],kt[1],E(kt[1]),c(kt[1])],[zt[0],zt[1],E(zt[1]),c(zt[1])],[Qt[0],Qt[1],E(Qt[1]),c(Qt[1])]],Sr=cr[2],gr,Nr=0;Nr<3;++Nr,Sr=gr)gr=cr[Nr],Sr.v=In(gr[1]-Sr[1],Sr[3],Sr[2],gr[3],gr[2],gr[0]-Sr[0]),Sr.point=[0,0];var vn=Gn(cr[0].v[0],cr[2].v[0],cr[1].v[0]),An=Gn(cr[0].v[0],cr[1].v[0],cr[2].v[0]),Ln=I-vn;cr[2].point[1]=0,cr[0].point[0]=-(cr[1].point[0]=cr[0].v[0]/2);var ai=[cr[2].point[0]=cr[0].point[0]+cr[2].v[0]*c(vn),2*(cr[0].point[1]=cr[1].point[1]=cr[2].v[0]*E(vn))];function ki(ra,oa){var Ma=E(oa),mo=c(oa),ns=new Array(3),$o;for($o=0;$o<3;++$o){var as=cr[$o];if(ns[$o]=In(oa-as[1],as[3],as[2],mo,Ma,ra-as[0]),!ns[$o][0])return as.point;ns[$o][1]=mr(ns[$o][1]-as.v[1])}var fl=ai.slice();for($o=0;$o<3;++$o){var Zl=$o==2?0:$o+1,Fl=Gn(cr[$o].v[0],ns[$o][0],ns[Zl][0]);ns[$o][1]<0&&(Fl=-Fl),$o?$o==1?(Fl=An-Fl,fl[0]-=ns[$o][0]*c(Fl),fl[1]-=ns[$o][0]*E(Fl)):(Fl=Ln-Fl,fl[0]+=ns[$o][0]*c(Fl),fl[1]+=ns[$o][0]*E(Fl)):(fl[0]+=ns[$o][0]*c(Fl),fl[1]-=ns[$o][0]*E(Fl))}return fl[0]/=3,fl[1]/=3,fl}return ki}function Ot(kt){return kt[0]*=M,kt[1]*=M,kt}function Et(){return je([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function je(kt,zt,Qt){var cr=R.geoCentroid({type:"MultiPoint",coordinates:[kt,zt,Qt]}),Sr=[-cr[0],-cr[1]],gr=R.geoRotation(Sr),Nr=St(Ot(gr(kt)),Ot(gr(zt)),Ot(gr(Qt)));Nr.invert=pt(Nr);var vn=R.geoProjection(Nr).rotate(Sr),An=vn.center;return delete vn.rotate,vn.center=function(Ln){return arguments.length?An(gr(Ln)):gr.invert(An())},vn.clipAngle(90)}function Ye(kt,zt){var Qt=K(1-E(zt));return[2/T*kt*Qt,T*(1-Qt)]}Ye.invert=function(kt,zt){var Qt=(Qt=zt/T-1)*Qt;return[Qt>0?kt*K(I/Qt)/2:0,$(1-Qt)]};function et(){return R.geoProjection(Ye).scale(95.6464).center([0,30])}function mt(kt){var zt=D(kt);function Qt(cr,Sr){return[cr,(cr?cr/E(cr):1)*(E(Sr)*c(cr)-zt*c(Sr))]}return Qt.invert=zt?function(cr,Sr){cr&&(Sr*=E(cr)/cr);var gr=c(cr);return[cr,2*u(K(gr*gr+zt*zt-Sr*Sr)-gr,zt-Sr)]}:function(cr,Sr){return[cr,$(cr?Sr*D(cr)/cr:Sr)]},Qt}function Nt(){return Jt(mt).scale(249.828).clipAngle(90)}var lr=K(3);function br(kt,zt){return[lr*kt*(2*c(2*zt/3)-1)/T,lr*T*E(zt/3)]}br.invert=function(kt,zt){var Qt=3*$(zt/(lr*T));return[T*kt/(lr*(2*c(2*Qt/3)-1)),Qt]};function Or(){return R.geoProjection(br).scale(156.19)}function tn(kt){var zt=c(kt);function Qt(cr,Sr){return[cr*zt,E(Sr)/zt]}return Qt.invert=function(cr,Sr){return[cr/zt,$(Sr*zt)]},Qt}function Jr(){return Jt(tn).parallel(38.58).scale(195.044)}function dn(kt){var zt=c(kt);function Qt(cr,Sr){return[cr*zt,(1+zt)*D(Sr/2)]}return Qt.invert=function(cr,Sr){return[cr/zt,l(Sr/(1+zt))*2]},Qt}function on(){return Jt(dn).scale(124.75)}function Nn(kt,zt){var Qt=K(8/(3*I));return[Qt*kt*(1-z(zt)/I),Qt*zt]}Nn.invert=function(kt,zt){var Qt=K(8/(3*I)),cr=zt/Qt;return[kt/(Qt*(1-z(cr)/I)),cr]};function Wi(){return R.geoProjection(Nn).scale(165.664)}function Oa(kt,zt){var Qt=K(4-3*E(z(zt)));return[2/K(6*I)*kt*Qt,A(zt)*K(2*I/3)*(2-Qt)]}Oa.invert=function(kt,zt){var Qt=2-z(zt)/K(2*I/3);return[kt*K(6*I)/(2*Qt),A(zt)*$((4-Qt*Qt)/3)]};function Da(){return R.geoProjection(Oa).scale(165.664)}function Aa(kt,zt){var Qt=K(I*(4+I));return[2/Qt*kt*(1+K(1-4*zt*zt/(I*I))),4/Qt*zt]}Aa.invert=function(kt,zt){var Qt=K(I*(4+I))/2;return[kt*Qt/(1+K(1-zt*zt*(4+I)/(4*I))),zt*Qt/2]};function Ka(){return R.geoProjection(Aa).scale(180.739)}function Sa(kt,zt){var Qt=(2+N)*E(zt);zt/=2;for(var cr=0,Sr=1/0;cr<10&&z(Sr)>g;cr++){var gr=c(zt);zt-=Sr=(zt+E(zt)*(gr+2)-Qt)/(2*gr*(1+gr))}return[2/K(I*(4+I))*kt*(1+c(zt)),2*K(I/(4+I))*E(zt)]}Sa.invert=function(kt,zt){var Qt=zt*K((4+I)/I)/2,cr=$(Qt),Sr=c(cr);return[kt/(2/K(I*(4+I))*(1+Sr)),$((cr+Qt*(Sr+2))/(2+N))]};function no(){return R.geoProjection(Sa).scale(180.739)}function Fo(kt,zt){return[kt*(1+c(zt))/K(2+I),2*zt/K(2+I)]}Fo.invert=function(kt,zt){var Qt=K(2+I),cr=zt*Qt/2;return[Qt*kt/(1+c(cr)),cr]};function an(){return R.geoProjection(Fo).scale(173.044)}function Hr(kt,zt){for(var Qt=(1+N)*E(zt),cr=0,Sr=1/0;cr<10&&z(Sr)>g;cr++)zt-=Sr=(zt+E(zt)-Qt)/(1+c(zt));return Qt=K(2+I),[kt*(1+c(zt))/Qt,2*zt/Qt]}Hr.invert=function(kt,zt){var Qt=1+N,cr=K(Qt/2);return[kt*2*cr/(1+c(zt*=cr)),$((zt+E(zt))/Qt)]};function nn(){return R.geoProjection(Hr).scale(173.044)}var Kr=3+2*P;function $n(kt,zt){var Qt=E(kt/=2),cr=c(kt),Sr=K(c(zt)),gr=c(zt/=2),Nr=E(zt)/(gr+P*cr*Sr),vn=K(2/(1+Nr*Nr)),An=K((P*gr+(cr+Qt)*Sr)/(P*gr+(cr-Qt)*Sr));return[Kr*(vn*(An-1/An)-2*v(An)),Kr*(vn*Nr*(An+1/An)-2*l(Nr))]}$n.invert=function(kt,zt){if(!(gr=be.invert(kt/1.2,zt*1.065)))return null;var Qt=gr[0],cr=gr[1],Sr=20,gr;kt/=Kr,zt/=Kr;do{var Nr=Qt/2,vn=cr/2,An=E(Nr),Ln=c(Nr),ai=E(vn),ki=c(vn),ra=c(cr),oa=K(ra),Ma=ai/(ki+P*Ln*oa),mo=Ma*Ma,ns=K(2/(1+mo)),$o=P*ki+(Ln+An)*oa,as=P*ki+(Ln-An)*oa,fl=$o/as,Zl=K(fl),Fl=Zl-1/Zl,Du=Zl+1/Zl,qc=ns*Fl-2*v(Zl)-kt,Gc=ns*Ma*Du-2*l(Ma)-zt,_c=ai&&k*oa*An*mo/ai,ef=(P*Ln*ki+oa)/(2*(ki+P*Ln*oa)*(ki+P*Ln*oa)*oa),Xd=-.5*Ma*ns*ns*ns,kd=Xd*_c,Ec=Xd*ef,Ac=(Ac=2*ki+P*oa*(Ln-An))*Ac*Zl,Ih=(P*Ln*ki*oa+ra)/Ac,Ep=-(P*An*ai)/(oa*Ac),Iv=Fl*kd-2*Ih/Zl+ns*(Ih+Ih/fl),$e=Fl*Ec-2*Ep/Zl+ns*(Ep+Ep/fl),vt=Ma*Du*kd-2*_c/(1+mo)+ns*Du*_c+ns*Ma*(Ih-Ih/fl),Bt=Ma*Du*Ec-2*ef/(1+mo)+ns*Du*ef+ns*Ma*(Ep-Ep/fl),fr=$e*vt-Bt*Iv;if(!fr)break;var pr=(Gc*$e-qc*Bt)/fr,_r=(qc*vt-Gc*Iv)/fr;Qt-=pr,cr=h(-N,m(N,cr-_r))}while((z(pr)>g||z(_r)>g)&&--Sr>0);return z(z(cr)-N)<g?[0,cr]:Sr&&[Qt,cr]};function Ai(){return R.geoProjection($n).scale(62.5271)}var aa=c(35*M);function Ci(kt,zt){var Qt=D(zt/2);return[kt*aa*K(1-Qt*Qt),(1+aa)*Qt]}Ci.invert=function(kt,zt){var Qt=zt/(1+aa);return[kt&&kt/(aa*K(1-Qt*Qt)),2*l(Qt)]};function Ta(){return R.geoProjection(Ci).scale(137.152)}function Na(kt,zt){var Qt=zt/2,cr=c(Qt);return[2*kt/T*c(zt)*cr*cr,T*D(Qt)]}Na.invert=function(kt,zt){var Qt=l(zt/T),cr=c(Qt),Sr=2*Qt;return[kt*T/2/(c(Sr)*cr*cr),Sr]};function ro(){return R.geoProjection(Na).scale(135.264)}function oo(kt){var zt=1-kt,Qt=gr(I,0)[0]-gr(-I,0)[0],cr=gr(0,N)[1]-gr(0,-N)[1],Sr=K(2*cr/Qt);function gr(An,Ln){var ai=c(Ln),ki=E(Ln);return[ai/(zt+kt*ai)*An,zt*Ln+kt*ki]}function Nr(An,Ln){var ai=gr(An,Ln);return[ai[0]*Sr,ai[1]/Sr]}function vn(An){return Nr(0,An)[1]}return Nr.invert=function(An,Ln){var ai=gt(vn,Ln),ki=An/Sr*(kt+zt/c(ai));return[ki,ai]},Nr}function xo(){var kt=.5,zt=R.geoProjectionMutator(oo),Qt=zt(kt);return Qt.alpha=function(cr){return arguments.length?zt(kt=+cr):kt},Qt.scale(168.725)}function vr(kt){return[kt[0]/2,$(D(kt[1]/2*M))*S]}function er(kt){return[kt[0]*2,2*l(E(kt[1]*M))*S]}function si(kt){kt==null&&(kt=R.geoOrthographic);var zt=kt(),Qt=R.geoEquirectangular().scale(S).precision(0).clipAngle(null).translate([0,0]);function cr(gr){return zt(vr(gr))}zt.invert&&(cr.invert=function(gr){return er(zt.invert(gr))}),cr.stream=function(gr){var Nr=zt.stream(gr),vn=Qt.stream({point:function(An,Ln){Nr.point(An/2,$(D(-Ln/2*M))*S)},lineStart:function(){Nr.lineStart()},lineEnd:function(){Nr.lineEnd()},polygonStart:function(){Nr.polygonStart()},polygonEnd:function(){Nr.polygonEnd()}});return vn.sphere=Nr.sphere,vn};function Sr(gr){cr[gr]=function(){return arguments.length?(zt[gr].apply(zt,arguments),cr):zt[gr]()}}return cr.rotate=function(gr){return arguments.length?(Qt.rotate(gr),cr):Qt.rotate()},cr.center=function(gr){return arguments.length?(zt.center(vr(gr)),cr):er(zt.center())},Sr("angle"),Sr("clipAngle"),Sr("clipExtent"),Sr("fitExtent"),Sr("fitHeight"),Sr("fitSize"),Sr("fitWidth"),Sr("scale"),Sr("translate"),Sr("precision"),cr.scale(249.5)}function ei(kt,zt){var Qt=2*I/zt,cr=kt*kt;function Sr(gr,Nr){var vn=R.geoAzimuthalEquidistantRaw(gr,Nr),An=vn[0],Ln=vn[1],ai=An*An+Ln*Ln;if(ai>cr){var ki=K(ai),ra=u(Ln,An),oa=Qt*x(ra/Qt),Ma=ra-oa,mo=kt*c(Ma),ns=(kt*E(Ma)-Ma*E(mo))/(N-mo),$o=Kn(Ma,ns),as=(I-kt)/qn($o,mo,I);An=ki;var fl=50,Zl;do An-=Zl=(kt+qn($o,mo,An)*as-ki)/($o(An)*as);while(z(Zl)>g&&--fl>0);Ln=Ma*E(An),An<N&&(Ln-=ns*(An-N));var Fl=E(oa),Du=c(oa);vn[0]=An*Du-Ln*Fl,vn[1]=An*Fl+Ln*Du}return vn}return Sr.invert=function(gr,Nr){var vn=gr*gr+Nr*Nr;if(vn>cr){var An=K(vn),Ln=u(Nr,gr),ai=Qt*x(Ln/Qt),ki=Ln-ai;gr=An*c(ki),Nr=An*E(ki);for(var ra=gr-N,oa=E(gr),Ma=Nr/oa,mo=gr<N?1/0:0,ns=10;;){var $o=kt*E(Ma),as=kt*c(Ma),fl=E(as),Zl=N-as,Fl=($o-Ma*fl)/Zl,Du=Kn(Ma,Fl);if(z(mo)<C||!--ns)break;Ma-=mo=(Ma*oa-Fl*ra-Nr)/(oa-ra*2*(Zl*(as+Ma*$o*c(as)-fl)-$o*($o-Ma*fl))/(Zl*Zl))}An=kt+qn(Du,as,gr)*(I-kt)/qn(Du,as,I),Ln=ai+Ma,gr=An*c(Ln),Nr=An*E(Ln)}return R.geoAzimuthalEquidistantRaw.invert(gr,Nr)},Sr}function Kn(kt,zt){return function(Qt){var cr=kt*c(Qt);return Qt<N&&(cr-=zt),K(1+cr*cr)}}function qn(kt,zt,Qt){for(var cr=50,Sr=(Qt-zt)/cr,gr=kt(zt)+kt(Qt),Nr=1,vn=zt;Nr<cr;++Nr)gr+=2*kt(vn+=Sr);return gr*.5*Sr}function pi(){var kt=6,zt=30*M,Qt=c(zt),cr=E(zt),Sr=R.geoProjectionMutator(ei),gr=Sr(zt,kt),Nr=gr.stream,vn=.01,An=-c(vn*M),Ln=E(vn*M);return gr.radius=function(ai){return arguments.length?(Qt=c(zt=ai*M),cr=E(zt),Sr(zt,kt)):zt*S},gr.lobes=function(ai){return arguments.length?Sr(zt,kt=+ai):kt},gr.stream=function(ai){var ki=gr.rotate(),ra=Nr(ai),oa=(gr.rotate([0,0]),Nr(ai));return gr.rotate(ki),ra.sphere=function(){oa.polygonStart(),oa.lineStart();for(var Ma=0,mo=2*I/kt,ns=0;Ma<kt;++Ma,ns-=mo)oa.point(u(Ln*c(ns),An)*S,$(Ln*E(ns))*S),oa.point(u(cr*c(ns-mo/2),Qt)*S,$(cr*E(ns-mo/2))*S);oa.lineEnd(),oa.polygonEnd()},ra},gr.rotate([90,-40]).scale(91.7095).clipAngle(180-.001)}function _i(kt,zt,Qt,cr,Sr,gr,Nr,vn){arguments.length<8&&(vn=0);function An(Ln,ai){if(!ai)return[kt*Ln/I,0];var ki=ai*ai,ra=kt+ki*(zt+ki*(Qt+ki*cr)),oa=ai*(Sr-1+ki*(gr-vn+ki*Nr)),Ma=(ra*ra+oa*oa)/(2*oa),mo=Ln*$(ra/Ma)/I;return[Ma*E(mo),ai*(1+ki*vn)+Ma*(1-c(mo))]}return An.invert=function(Ln,ai){var ki=I*Ln/kt,ra=ai,oa,Ma,mo=50;do{var ns=ra*ra,$o=kt+ns*(zt+ns*(Qt+ns*cr)),as=ra*(Sr-1+ns*(gr-vn+ns*Nr)),fl=$o*$o+as*as,Zl=2*as,Fl=fl/Zl,Du=Fl*Fl,qc=$($o/Fl)/I,Gc=ki*qc,_c=$o*$o,ef=(2*zt+ns*(4*Qt+ns*6*cr))*ra,Xd=Sr+ns*(3*gr+ns*5*Nr),kd=2*($o*ef+as*(Xd-1)),Ec=2*(Xd-1),Ac=(kd*Zl-fl*Ec)/(Zl*Zl),Ih=c(Gc),Ep=E(Gc),Iv=Fl*Ih,$e=Fl*Ep,vt=ki/I*(1/K(1-_c/Du))*(ef*Fl-$o*Ac)/Du,Bt=$e-Ln,fr=ra*(1+ns*vn)+Fl-Iv-ai,pr=Ac*Ep+Iv*vt,_r=Iv*qc,Yr=1+Ac-(Ac*Ih-$e*vt),Wr=$e*qc,yn=pr*Wr-Yr*_r;if(!yn)break;ki-=oa=(fr*pr-Bt*Yr)/yn,ra-=Ma=(Bt*Wr-fr*_r)/yn}while((z(oa)>g||z(Ma)>g)&&--mo>0);return[ki,ra]},An}var fi=_i(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function Ri(){return R.geoProjection(fi).scale(149.995)}var $i=_i(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function Hi(){return R.geoProjection($i).scale(153.93)}var wr=_i(5/6*I,-.62636,-.0344,0,1.3493,-.05524,0,.045);function gn(){return R.geoProjection(wr).scale(130.945)}function Xn(kt,zt){var Qt=kt*kt,cr=zt*zt;return[kt*(1-.162388*cr)*(.87-952426e-9*Qt*Qt),zt*(1+cr/12)]}Xn.invert=function(kt,zt){var Qt=kt,cr=zt,Sr=50,gr;do{var Nr=cr*cr;cr-=gr=(cr*(1+Nr/12)-zt)/(1+Nr/4)}while(z(gr)>g&&--Sr>0);Sr=50,kt/=1-.162388*Nr;do{var vn=(vn=Qt*Qt)*vn;Qt-=gr=(Qt*(.87-952426e-9*vn)-kt)/(.87-.00476213*vn)}while(z(gr)>g&&--Sr>0);return[Qt,cr]};function Yi(){return R.geoProjection(Xn).scale(131.747)}var ha=_i(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Ca(){return R.geoProjection(ha).scale(131.087)}function Ba(kt){var zt=kt(N,0)[0]-kt(-N,0)[0];function Qt(cr,Sr){var gr=cr>0?-.5:.5,Nr=kt(cr+gr*I,Sr);return Nr[0]-=gr*zt,Nr}return kt.invert&&(Qt.invert=function(cr,Sr){var gr=cr>0?-.5:.5,Nr=kt.invert(cr+gr*zt,Sr),vn=Nr[0]-gr*I;return vn<-I?vn+=2*I:vn>I&&(vn-=2*I),Nr[0]=vn,Nr}),Qt}function ji(kt,zt){var Qt=A(kt),cr=A(zt),Sr=c(zt),gr=c(kt)*Sr,Nr=E(kt)*Sr,vn=E(cr*zt);kt=z(u(Nr,vn)),zt=$(gr),z(kt-N)>g&&(kt%=N);var An=Ea(kt>I/4?N-kt:kt,zt);return kt>I/4&&(vn=An[0],An[0]=-An[1],An[1]=-vn),An[0]*=Qt,An[1]*=-cr,An}ji.invert=function(kt,zt){z(kt)>1&&(kt=A(kt)*2-kt),z(zt)>1&&(zt=A(zt)*2-zt);var Qt=A(kt),cr=A(zt),Sr=-Qt*kt,gr=-cr*zt,Nr=gr/Sr<1,vn=cs(Nr?gr:Sr,Nr?Sr:gr),An=vn[0],Ln=vn[1],ai=c(Ln);return Nr&&(An=-N-An),[Qt*(u(E(An)*ai,-E(Ln))+I),cr*$(c(An)*ai)]};function Ea(kt,zt){if(zt===N)return[0,0];var Qt=E(zt),cr=Qt*Qt,Sr=cr*cr,gr=1+Sr,Nr=1+3*Sr,vn=1-Sr,An=$(1/K(gr)),Ln=vn+cr*gr*An,ai=(1-Qt)/Ln,ki=K(ai),ra=ai*gr,oa=K(ra),Ma=ki*vn,mo,ns;if(kt===0)return[0,-(Ma+cr*oa)];var $o=c(zt),as=1/$o,fl=2*Qt*$o,Zl=(-3*cr+An*Nr)*fl,Fl=(-Ln*$o-(1-Qt)*Zl)/(Ln*Ln),Du=.5*Fl/ki,qc=vn*Du-2*cr*ki*fl,Gc=cr*gr*Fl+ai*Nr*fl,_c=-as*fl,ef=-as*Gc,Xd=-2*as*qc,kd=4*kt/I,Ec;if(kt>.222*I||zt<I/4&&kt>.175*I){if(mo=(Ma+cr*K(ra*(1+Sr)-Ma*Ma))/(1+Sr),kt>I/4)return[mo,mo];var Ac=mo,Ih=.5*mo;mo=.5*(Ih+Ac),ns=50;do{var Ep=K(ra-mo*mo),Iv=mo*(Xd+_c*Ep)+ef*$(mo/oa)-kd;if(!Iv)break;Iv<0?Ih=mo:Ac=mo,mo=.5*(Ih+Ac)}while(z(Ac-Ih)>g&&--ns>0)}else{mo=g,ns=25;do{var $e=mo*mo,vt=K(ra-$e),Bt=Xd+_c*vt,fr=mo*Bt+ef*$(mo/oa)-kd,pr=Bt+(ef-_c*$e)/vt;mo-=Ec=vt?fr/pr:0}while(z(Ec)>g&&--ns>0)}return[mo,-Ma-cr*K(ra-mo*mo)]}function cs(kt,zt){for(var Qt=0,cr=1,Sr=.5,gr=50;;){var Nr=Sr*Sr,vn=K(Sr),An=$(1/K(1+Nr)),Ln=1-Nr+Sr*(1+Nr)*An,ai=(1-vn)/Ln,ki=K(ai),ra=ai*(1+Nr),oa=ki*(1-Nr),Ma=ra-kt*kt,mo=K(Ma),ns=zt+oa+Sr*mo;if(z(cr-Qt)<C||--gr===0||ns===0)break;ns>0?Qt=Sr:cr=Sr,Sr=.5*(Qt+cr)}if(!gr)return null;var $o=$(vn),as=c($o),fl=1/as,Zl=2*vn*as,Fl=(-3*Sr+An*(1+3*Nr))*Zl,Du=(-Ln*as-(1-vn)*Fl)/(Ln*Ln),qc=.5*Du/ki,Gc=(1-Nr)*qc-2*Sr*ki*Zl,_c=-2*fl*Gc,ef=-fl*Zl,Xd=-fl*(Sr*(1+Nr)*Du+ai*(1+3*Nr)*Zl);return[I/4*(kt*(_c+ef*mo)+Xd*$(kt/K(ra))),$o]}function No(){return R.geoProjection(Ba(ji)).scale(239.75)}function Vs(kt,zt,Qt){var cr,Sr,gr;return kt?(cr=pl(kt,Qt),zt?(Sr=pl(zt,1-Qt),gr=Sr[1]*Sr[1]+Qt*cr[0]*cr[0]*Sr[0]*Sr[0],[[cr[0]*Sr[2]/gr,cr[1]*cr[2]*Sr[0]*Sr[1]/gr],[cr[1]*Sr[1]/gr,-cr[0]*cr[2]*Sr[0]*Sr[2]/gr],[cr[2]*Sr[1]*Sr[2]/gr,-Qt*cr[0]*cr[1]*Sr[0]/gr]]):[[cr[0],0],[cr[1],0],[cr[2],0]]):(Sr=pl(zt,1-Qt),[[0,Sr[0]/Sr[1]],[1/Sr[1],0],[Sr[2]/Sr[1],0]])}function pl(kt,zt){var Qt,cr,Sr,gr,Nr;if(zt<g)return gr=E(kt),cr=c(kt),Qt=zt*(kt-gr*cr)/4,[gr-Qt*cr,cr+Qt*gr,1-zt*gr*gr/2,kt-Qt];if(zt>=1-g)return Qt=(1-zt)/4,cr=G(kt),gr=Q(kt),Sr=1/cr,Nr=cr*J(kt),[gr+Qt*(Nr-kt)/(cr*cr),Sr-Qt*gr*Sr*(Nr-kt),Sr+Qt*gr*Sr*(Nr+kt),2*l(p(kt))-N+Qt*(Nr-kt)/cr];var vn=[1,0,0,0,0,0,0,0,0],An=[K(zt),0,0,0,0,0,0,0,0],Ln=0;for(cr=K(1-zt),Nr=1;z(An[Ln]/vn[Ln])>g&&Ln<8;)Qt=vn[Ln++],An[Ln]=(Qt-cr)/2,vn[Ln]=(Qt+cr)/2,cr=K(Qt*cr),Nr*=2;Sr=Nr*vn[Ln]*kt;do gr=An[Ln]*E(cr=Sr)/vn[Ln],Sr=($(gr)+Sr)/2;while(--Ln);return[E(Sr),gr=c(Sr),gr/c(Sr-cr),Sr]}function kl(kt,zt,Qt){var cr=z(kt),Sr=z(zt),gr=J(Sr);if(cr){var Nr=1/E(cr),vn=1/(D(cr)*D(cr)),An=-(vn+Qt*(gr*gr*Nr*Nr)-1+Qt),Ln=(Qt-1)*vn,ai=(-An+K(An*An-4*Ln))/2;return[El(l(1/K(ai)),Qt)*A(kt),El(l(K((ai/vn-1)/Qt)),1-Qt)*A(zt)]}return[0,El(l(gr),1-Qt)*A(zt)]}function El(kt,zt){if(!zt)return kt;if(zt===1)return v(D(kt/2+F));for(var Qt=1,cr=K(1-zt),Sr=K(zt),gr=0;z(Sr)>g;gr++){if(kt%I){var Nr=l(cr*D(kt)/Qt);Nr<0&&(Nr+=I),kt+=Nr+~~(kt/I)*I}else kt+=kt;Sr=(Qt+cr)/2,cr=K(Qt*cr),Sr=((Qt=Sr)-cr)/2}return kt/(_(2,gr)*Qt)}function iu(kt,zt){var Qt=(P-1)/(P+1),cr=K(1-Qt*Qt),Sr=El(N,cr*cr),gr=-1,Nr=v(D(I/4+z(zt)/2)),vn=p(gr*Nr)/K(Qt),An=bu(vn*c(gr*kt),vn*E(gr*kt)),Ln=kl(An[0],An[1],cr*cr);return[-Ln[1],(zt>=0?1:-1)*(.5*Sr-Ln[0])]}function bu(kt,zt){var Qt=kt*kt,cr=zt+1,Sr=1-Qt-zt*zt;return[.5*((kt>=0?N:-N)-u(Sr,2*kt)),-.25*v(Sr*Sr+4*Qt)+.5*v(cr*cr+Qt)]}function yl(kt,zt){var Qt=zt[0]*zt[0]+zt[1]*zt[1];return[(kt[0]*zt[0]+kt[1]*zt[1])/Qt,(kt[1]*zt[0]-kt[0]*zt[1])/Qt]}iu.invert=function(kt,zt){var Qt=(P-1)/(P+1),cr=K(1-Qt*Qt),Sr=El(N,cr*cr),gr=-1,Nr=Vs(.5*Sr-zt,-kt,cr*cr),vn=yl(Nr[0],Nr[1]),An=u(vn[1],vn[0])/gr;return[An,2*l(p(.5/gr*v(Qt*vn[0]*vn[0]+Qt*vn[1]*vn[1])))-N]};function ql(){return R.geoProjection(Ba(iu)).scale(151.496)}function rc(kt){var zt=E(kt),Qt=c(kt),cr=zc(kt);cr.invert=zc(-kt);function Sr(gr,Nr){var vn=cr(gr,Nr);gr=vn[0],Nr=vn[1];var An=E(Nr),Ln=c(Nr),ai=c(gr),ki=Z(zt*An+Qt*Ln*ai),ra=E(ki),oa=z(ra)>g?ki/ra:1;return[oa*Qt*E(gr),(z(gr)>N?oa:-oa)*(zt*Ln-Qt*An*ai)]}return Sr.invert=function(gr,Nr){var vn=K(gr*gr+Nr*Nr),An=-E(vn),Ln=c(vn),ai=vn*Ln,ki=-Nr*An,ra=vn*zt,oa=K(ai*ai+ki*ki-ra*ra),Ma=u(ai*ra+ki*oa,ki*ra-ai*oa),mo=(vn>N?-1:1)*u(gr*An,vn*c(Ma)*Ln+Nr*E(Ma)*An);return cr.invert(mo,Ma)},Sr}function zc(kt){var zt=E(kt),Qt=c(kt);return function(cr,Sr){var gr=c(Sr),Nr=c(cr)*gr,vn=E(cr)*gr,An=E(Sr);return[u(vn,Nr*Qt-An*zt),$(An*Qt+Nr*zt)]}}function Pf(){var kt=0,zt=R.geoProjectionMutator(rc),Qt=zt(kt),cr=Qt.rotate,Sr=Qt.stream,gr=R.geoCircle();return Qt.parallel=function(Nr){if(!arguments.length)return kt*S;var vn=Qt.rotate();return zt(kt=Nr*M).rotate(vn)},Qt.rotate=function(Nr){return arguments.length?(cr.call(Qt,[Nr[0],Nr[1]-kt*S]),gr.center([-Nr[0],-Nr[1]]),Qt):(Nr=cr.call(Qt),Nr[1]+=kt*S,Nr)},Qt.stream=function(Nr){return Nr=Sr(Nr),Nr.sphere=function(){Nr.polygonStart();var vn=.01,An=gr.radius(90-vn)().coordinates[0],Ln=An.length-1,ai=-1,ki;for(Nr.lineStart();++ai<Ln;)Nr.point((ki=An[ai])[0],ki[1]);for(Nr.lineEnd(),An=gr.radius(90+vn)().coordinates[0],Ln=An.length-1,Nr.lineStart();--ai>=0;)Nr.point((ki=An[ai])[0],ki[1]);Nr.lineEnd(),Nr.polygonEnd()},Nr},Qt.scale(79.4187).parallel(45).clipAngle(180-.001)}var ju=3,Ql=$(1-1/ju)*S,lu=tn(0);function dc(kt){var zt=Ql*M,Qt=Ye(I,zt)[0]-Ye(-I,zt)[0],cr=lu(0,zt)[1],Sr=Ye(0,zt)[1],gr=T-Sr,Nr=y/kt,vn=4/y,An=cr+gr*gr*4/y;function Ln(ai,ki){var ra,oa=z(ki);if(oa>zt){var Ma=m(kt-1,h(0,f((ai+I)/Nr)));ai+=I*(kt-1)/kt-Ma*Nr,ra=Ye(ai,oa),ra[0]=ra[0]*y/Qt-y*(kt-1)/(2*kt)+Ma*y/kt,ra[1]=cr+(ra[1]-Sr)*4*gr/y,ki<0&&(ra[1]=-ra[1])}else ra=lu(ai,ki);return ra[0]*=vn,ra[1]/=An,ra}return Ln.invert=function(ai,ki){ai/=vn,ki*=An;var ra=z(ki);if(ra>cr){var oa=m(kt-1,h(0,f((ai+I)/Nr)));ai=(ai+I*(kt-1)/kt-oa*Nr)*Qt/y;var Ma=Ye.invert(ai,.25*(ra-cr)*y/gr+Sr);return Ma[0]-=I*(kt-1)/kt-oa*Nr,ki<0&&(Ma[1]=-Ma[1]),Ma}return lu.invert(ai,ki)},Ln}function wc(kt,zt){return[kt,zt&1?90-g:Ql]}function mc(kt,zt){return[kt,zt&1?-90+g:-Ql]}function xu(kt){return[kt[0]*(1-g),kt[1]]}function qu(kt){var zt=[].concat(O.range(-180,180+kt/2,kt).map(wc),O.range(180,-180-kt/2,-kt).map(mc));return{type:"Polygon",coordinates:[kt===180?zt.map(xu):zt]}}function xf(){var kt=4,zt=R.geoProjectionMutator(dc),Qt=zt(kt),cr=Qt.stream;return Qt.lobes=function(Sr){return arguments.length?zt(kt=+Sr):kt},Qt.stream=function(Sr){var gr=Qt.rotate(),Nr=cr(Sr),vn=(Qt.rotate([0,0]),cr(Sr));return Qt.rotate(gr),Nr.sphere=function(){R.geoStream(qu(180/kt),vn)},Nr},Qt.scale(239.75)}function ed(kt){var zt=1+kt,Qt=E(1/zt),cr=$(Qt),Sr=2*K(I/(gr=I+4*cr*zt)),gr,Nr=.5*Sr*(zt+K(kt*(2+kt))),vn=kt*kt,An=zt*zt;function Ln(ai,ki){var ra=1-E(ki),oa,Ma;if(ra&&ra<2){var mo=N-ki,ns=25,$o;do{var as=E(mo),fl=c(mo),Zl=cr+u(as,zt-fl),Fl=1+An-2*zt*fl;mo-=$o=(mo-vn*cr-zt*as+Fl*Zl-.5*ra*gr)/(2*zt*as*Zl)}while(z($o)>C&&--ns>0);oa=Sr*K(Fl),Ma=ai*Zl/I}else oa=Sr*(kt+ra),Ma=ai*cr/I;return[oa*E(Ma),Nr-oa*c(Ma)]}return Ln.invert=function(ai,ki){var ra=ai*ai+(ki-=Nr)*ki,oa=(1+An-ra/(Sr*Sr))/(2*zt),Ma=Z(oa),mo=E(Ma),ns=cr+u(mo,zt-oa);return[$(ai/K(ra))*I/ns,$(1-2*(Ma-vn*cr-zt*mo+(1+An-2*zt*oa)*ns)/gr)]},Ln}function Df(){var kt=1,zt=R.geoProjectionMutator(ed),Qt=zt(kt);return Qt.ratio=function(cr){return arguments.length?zt(kt=+cr):kt},Qt.scale(167.774).center([0,18.67])}var Sc=.7109889596207567,Qo=.0528035274542;function Sl(kt,zt){return zt>-Sc?(kt=Ft(kt,zt),kt[1]+=Qo,kt):Ut(kt,zt)}Sl.invert=function(kt,zt){return zt>-Sc?Ft.invert(kt,zt-Qo):Ut.invert(kt,zt)};function gd(){return R.geoProjection(Sl).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function $f(kt,zt){return z(zt)>Sc?(kt=Ft(kt,zt),kt[1]-=zt>0?Qo:-Qo,kt):Ut(kt,zt)}$f.invert=function(kt,zt){return z(zt)>Sc?Ft.invert(kt,zt+(zt>0?Qo:-Qo)):Ut.invert(kt,zt)};function wu(){return R.geoProjection($f).scale(152.63)}function Ad(kt,zt,Qt,cr){var Sr=K(4*I/(2*Qt+(1+kt-zt/2)*E(2*Qt)+(kt+zt)/2*E(4*Qt)+zt/2*E(6*Qt))),gr=K(cr*E(Qt)*K((1+kt*c(2*Qt)+zt*c(4*Qt))/(1+kt+zt))),Nr=Qt*An(1);function vn(ki){return K(1+kt*c(2*ki)+zt*c(4*ki))}function An(ki){var ra=ki*Qt;return(2*ra+(1+kt-zt/2)*E(2*ra)+(kt+zt)/2*E(4*ra)+zt/2*E(6*ra))/Qt}function Ln(ki){return vn(ki)*E(ki)}var ai=function(ki,ra){var oa=Qt*gt(An,Nr*E(ra)/Qt,ra/I);isNaN(oa)&&(oa=Qt*A(ra));var Ma=Sr*vn(oa);return[Ma*gr*ki/I*c(oa),Ma/gr*E(oa)]};return ai.invert=function(ki,ra){var oa=gt(Ln,ra*gr/Sr);return[ki*I/(c(oa)*Sr*gr*vn(oa)),$(Qt*An(oa/Qt)/Nr)]},Qt===0&&(Sr=K(cr/I),ai=function(ki,ra){return[ki*Sr,E(ra)/Sr]},ai.invert=function(ki,ra){return[ki/Sr,$(ra*Sr)]}),ai}function Bc(){var kt=1,zt=0,Qt=45*M,cr=2,Sr=R.geoProjectionMutator(Ad),gr=Sr(kt,zt,Qt,cr);return gr.a=function(Nr){return arguments.length?Sr(kt=+Nr,zt,Qt,cr):kt},gr.b=function(Nr){return arguments.length?Sr(kt,zt=+Nr,Qt,cr):zt},gr.psiMax=function(Nr){return arguments.length?Sr(kt,zt,Qt=+Nr*M,cr):Qt*S},gr.ratio=function(Nr){return arguments.length?Sr(kt,zt,Qt,cr=+Nr):cr},gr.scale(180.739)}function uf(kt,zt,Qt,cr,Sr,gr,Nr,vn,An,Ln,ai){if(ai.nanEncountered)return NaN;var ki,ra,oa,Ma,mo,ns,$o,as,fl,Zl;if(ki=Qt-zt,ra=kt(zt+ki*.25),oa=kt(Qt-ki*.25),isNaN(ra)){ai.nanEncountered=!0;return}if(isNaN(oa)){ai.nanEncountered=!0;return}return Ma=ki*(cr+4*ra+Sr)/12,mo=ki*(Sr+4*oa+gr)/12,ns=Ma+mo,Zl=(ns-Nr)/15,Ln>An?(ai.maxDepthCount++,ns+Zl):Math.abs(Zl)<vn?ns+Zl:($o=zt+ki*.5,as=uf(kt,zt,$o,cr,ra,Sr,Ma,vn*.5,An,Ln+1,ai),isNaN(as)?(ai.nanEncountered=!0,NaN):(fl=uf(kt,$o,Qt,Sr,oa,gr,mo,vn*.5,An,Ln+1,ai),isNaN(fl)?(ai.nanEncountered=!0,NaN):as+fl))}function Cd(kt,zt,Qt,cr,Sr){var gr={maxDepthCount:0,nanEncountered:!1};Sr===void 0&&(Sr=20);var Nr=kt(zt),vn=kt(.5*(zt+Qt)),An=kt(Qt),Ln=(Nr+4*vn+An)*(Qt-zt)/6,ai=uf(kt,zt,Qt,Nr,vn,An,Ln,cr,Sr,1,gr);return ai}function Tl(kt,zt,Qt){function cr(oa){return kt+(1-kt)*_(1-_(oa,zt),1/zt)}function Sr(oa){return Cd(cr,0,oa,1e-4)}for(var gr=1/Sr(1),Nr=1e3,vn=(1+1e-8)*gr,An=[],Ln=0;Ln<=Nr;Ln++)An.push(Sr(Ln/Nr)*vn);function ai(oa){var Ma=0,mo=Nr,ns=Nr>>1;do An[ns]>oa?mo=ns:Ma=ns,ns=Ma+mo>>1;while(ns>Ma);var $o=An[ns+1]-An[ns];return $o&&($o=(oa-An[ns+1])/$o),(ns+1+$o)/Nr}var ki=2*ai(1)/I*gr/Qt,ra=function(oa,Ma){var mo=ai(z(E(Ma))),ns=cr(mo)*oa;return mo/=ki,[ns,Ma>=0?mo:-mo]};return ra.invert=function(oa,Ma){var mo;return Ma*=ki,z(Ma)<1&&(mo=A(Ma)*$(Sr(z(Ma))*gr)),[oa/cr(z(Ma)),mo]},ra}function Xu(){var kt=0,zt=2.5,Qt=1.183136,cr=R.geoProjectionMutator(Tl),Sr=cr(kt,zt,Qt);return Sr.alpha=function(gr){return arguments.length?cr(kt=+gr,zt,Qt):kt},Sr.k=function(gr){return arguments.length?cr(kt,zt=+gr,Qt):zt},Sr.gamma=function(gr){return arguments.length?cr(kt,zt,Qt=+gr):Qt},Sr.scale(152.63)}function pu(kt,zt){return z(kt[0]-zt[0])<g&&z(kt[1]-zt[1])<g}function Zc(kt,zt){for(var Qt=-1,cr=kt.length,Sr=kt[0],gr,Nr,vn,An=[];++Qt<cr;){gr=kt[Qt],Nr=(gr[0]-Sr[0])/zt,vn=(gr[1]-Sr[1])/zt;for(var Ln=0;Ln<zt;++Ln)An.push([Sr[0]+Ln*Nr,Sr[1]+Ln*vn]);Sr=gr}return An.push(gr),An}function Md(kt){var zt=[],Qt,cr,Sr,gr,Nr,vn,An,Ln=kt[0].length;for(An=0;An<Ln;++An)Qt=kt[0][An],cr=Qt[0][0],Sr=Qt[0][1],gr=Qt[1][1],Nr=Qt[2][0],vn=Qt[2][1],zt.push(Zc([[cr+g,Sr+g],[cr+g,gr-g],[Nr-g,gr-g],[Nr-g,vn+g]],30));for(An=kt[1].length-1;An>=0;--An)Qt=kt[1][An],cr=Qt[0][0],Sr=Qt[0][1],gr=Qt[1][1],Nr=Qt[2][0],vn=Qt[2][1],zt.push(Zc([[Nr-g,vn-g],[Nr-g,gr+g],[cr+g,gr+g],[cr+g,Sr-g]],30));return{type:"Polygon",coordinates:[O.merge(zt)]}}function uu(kt,zt,Qt){var cr,Sr;function gr(An,Ln){for(var ai=Ln<0?-1:1,ki=zt[+(Ln<0)],ra=0,oa=ki.length-1;ra<oa&&An>ki[ra][2][0];++ra);var Ma=kt(An-ki[ra][1][0],Ln);return Ma[0]+=kt(ki[ra][1][0],ai*Ln>ai*ki[ra][0][1]?ki[ra][0][1]:Ln)[0],Ma}Qt?gr.invert=Qt(gr):kt.invert&&(gr.invert=function(An,Ln){for(var ai=Sr[+(Ln<0)],ki=zt[+(Ln<0)],ra=0,oa=ai.length;ra<oa;++ra){var Ma=ai[ra];if(Ma[0][0]<=An&&An<Ma[1][0]&&Ma[0][1]<=Ln&&Ln<Ma[1][1]){var mo=kt.invert(An-kt(ki[ra][1][0],0)[0],Ln);return mo[0]+=ki[ra][1][0],pu(gr(mo[0],mo[1]),[An,Ln])?mo:null}}});var Nr=R.geoProjection(gr),vn=Nr.stream;return Nr.stream=function(An){var Ln=Nr.rotate(),ai=vn(An),ki=(Nr.rotate([0,0]),vn(An));return Nr.rotate(Ln),ai.sphere=function(){R.geoStream(cr,ki)},ai},Nr.lobes=function(An){return arguments.length?(cr=Md(An),zt=An.map(function(Ln){return Ln.map(function(ai){return[[ai[0][0]*M,ai[0][1]*M],[ai[1][0]*M,ai[1][1]*M],[ai[2][0]*M,ai[2][1]*M]]})}),Sr=zt.map(function(Ln){return Ln.map(function(ai){var ki=kt(ai[0][0],ai[0][1])[0],ra=kt(ai[2][0],ai[2][1])[0],oa=kt(ai[1][0],ai[0][1])[1],Ma=kt(ai[1][0],ai[1][1])[1],mo;return oa>Ma&&(mo=oa,oa=Ma,Ma=mo),[[ki,oa],[ra,Ma]]})}),Nr):zt.map(function(Ln){return Ln.map(function(ai){return[[ai[0][0]*S,ai[0][1]*S],[ai[1][0]*S,ai[1][1]*S],[ai[2][0]*S,ai[2][1]*S]]})})},zt!=null&&Nr.lobes(zt),Nr}var Lf=[[[[-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 op(){return uu(xt,Lf).scale(160.857)}var zd=[[[[-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 Qp(){return uu($f,zd).scale(152.63)}var hh=[[[[-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 td(){return uu(Ft,hh).scale(169.529)}var ev=[[[[-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 Um(){return uu(Ft,ev).scale(169.529).rotate([20,0])}var Hm=[[[[-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 om(){return uu(Sl,Hm,pt).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var K0=[[[[-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 o1(){return uu(Ut,K0).scale(152.63).rotate([-20,0])}function Of(kt,zt){return[3/y*kt*K(I*I/3-zt*zt),zt]}Of.invert=function(kt,zt){return[y/3*kt/K(I*I/3-zt*zt),zt]};function xm(){return R.geoProjection(Of).scale(158.837)}function J0(kt){function zt(Qt,cr){if(z(z(cr)-N)<g)return[0,cr<0?-2:2];var Sr=E(cr),gr=_((1+Sr)/(1-Sr),kt/2),Nr=.5*(gr+1/gr)+c(Qt*=kt);return[2*E(Qt)/Nr,(gr-1/gr)/Nr]}return zt.invert=function(Qt,cr){var Sr=z(cr);if(z(Sr-2)<g)return Qt?null:[0,A(cr)*N];if(Sr>2)return null;Qt/=2,cr/=2;var gr=Qt*Qt,Nr=cr*cr,vn=2*cr/(1+gr+Nr);return vn=_((1+vn)/(1-vn),1/kt),[u(2*Qt,1-gr-Nr)/kt,$((vn-1)/(vn+1))]},zt}function wp(){var kt=.5,zt=R.geoProjectionMutator(J0),Qt=zt(kt);return Qt.spacing=function(cr){return arguments.length?zt(kt=+cr):kt},Qt.scale(124.75)}var sp=I/P;function Sp(kt,zt){return[kt*(1+K(c(zt)))/2,zt/(c(zt/2)*c(kt/6))]}Sp.invert=function(kt,zt){var Qt=z(kt),cr=z(zt),Sr=g,gr=N;cr<sp?gr*=cr/sp:Sr+=6*Z(sp/cr);for(var Nr=0;Nr<25;Nr++){var vn=E(gr),An=K(c(gr)),Ln=E(gr/2),ai=c(gr/2),ki=E(Sr/6),ra=c(Sr/6),oa=.5*Sr*(1+An)-Qt,Ma=gr/(ai*ra)-cr,mo=An?-.25*Sr*vn/An:0,ns=.5*(1+An),$o=(1+.5*gr*Ln/ai)/(ai*ra),as=gr/ai*(ki/6)/(ra*ra),fl=mo*as-$o*ns,Zl=(oa*as-Ma*ns)/fl,Fl=(Ma*mo-oa*$o)/fl;if(gr-=Zl,Sr-=Fl,z(Zl)<g&&z(Fl)<g)break}return[kt<0?-Sr:Sr,zt<0?-gr:gr]};function sm(){return R.geoProjection(Sp).scale(97.2672)}function yd(kt,zt){var Qt=kt*kt,cr=zt*zt;return[kt*(.975534+cr*(-.119161+Qt*-.0143059+cr*-.0547009)),zt*(1.00384+Qt*(.0802894+cr*-.02855+Qt*199025e-9)+cr*(.0998909+cr*-.0491032))]}yd.invert=function(kt,zt){var Qt=A(kt)*I,cr=zt/2,Sr=50;do{var gr=Qt*Qt,Nr=cr*cr,vn=Qt*cr,An=Qt*(.975534+Nr*(-.119161+gr*-.0143059+Nr*-.0547009))-kt,Ln=cr*(1.00384+gr*(.0802894+Nr*-.02855+gr*199025e-9)+Nr*(.0998909+Nr*-.0491032))-zt,ai=.975534-Nr*(.119161+3*gr*.0143059+Nr*.0547009),ki=-vn*(2*.119161+4*.0547009*Nr+2*.0143059*gr),ra=vn*(2*.0802894+4*199025e-9*gr+2*-.02855*Nr),oa=1.00384+gr*(.0802894+199025e-9*gr)+Nr*(3*(.0998909-.02855*gr)-5*.0491032*Nr),Ma=ki*ra-oa*ai,mo=(Ln*ki-An*oa)/Ma,ns=(An*ra-Ln*ai)/Ma;Qt-=mo,cr-=ns}while((z(mo)>g||z(ns)>g)&&--Sr>0);return Sr&&[Qt,cr]};function lp(){return R.geoProjection(yd).scale(139.98)}function Uc(kt,zt){return[E(kt)/c(zt),D(zt)*c(kt)]}Uc.invert=function(kt,zt){var Qt=kt*kt,cr=zt*zt,Sr=cr+1,gr=Qt+Sr,Nr=kt?k*K((gr-K(gr*gr-4*Qt))/Qt):1/K(Sr);return[$(kt*Nr),A(zt)*Z(Nr)]};function zf(){return R.geoProjection(Uc).scale(144.049).clipAngle(90-.001)}function jm(kt){var zt=c(kt),Qt=D(F+kt/2);function cr(Sr,gr){var Nr=gr-kt,vn=z(Nr)<g?Sr*zt:z(vn=F+gr/2)<g||z(z(vn)-N)<g?0:Sr*Nr/v(D(vn)/Qt);return[vn,Nr]}return cr.invert=function(Sr,gr){var Nr,vn=gr+kt;return[z(gr)<g?Sr/zt:z(Nr=F+vn/2)<g||z(z(Nr)-N)<g?0:Sr*v(D(Nr)/Qt)/gr,vn]},cr}function hv(){return Jt(jm).parallel(40).scale(158.837)}function og(kt,zt){return[kt,1.25*v(D(F+.4*zt))]}og.invert=function(kt,zt){return[kt,2.5*l(p(.8*zt))-.625*I]};function Bd(){return R.geoProjection(og).scale(108.318)}function z1(kt){var zt=kt.length-1;function Qt(cr,Sr){for(var gr=c(Sr),Nr=2/(1+gr*c(cr)),vn=Nr*gr*E(cr),An=Nr*E(Sr),Ln=zt,ai=kt[Ln],ki=ai[0],ra=ai[1],oa;--Ln>=0;)ai=kt[Ln],ki=ai[0]+vn*(oa=ki)-An*ra,ra=ai[1]+vn*ra+An*oa;return ki=vn*(oa=ki)-An*ra,ra=vn*ra+An*oa,[ki,ra]}return Qt.invert=function(cr,Sr){var gr=20,Nr=cr,vn=Sr;do{for(var An=zt,Ln=kt[An],ai=Ln[0],ki=Ln[1],ra=0,oa=0,Ma;--An>=0;)Ln=kt[An],ra=ai+Nr*(Ma=ra)-vn*oa,oa=ki+Nr*oa+vn*Ma,ai=Ln[0]+Nr*(Ma=ai)-vn*ki,ki=Ln[1]+Nr*ki+vn*Ma;ra=ai+Nr*(Ma=ra)-vn*oa,oa=ki+Nr*oa+vn*Ma,ai=Nr*(Ma=ai)-vn*ki-cr,ki=Nr*ki+vn*Ma-Sr;var mo=ra*ra+oa*oa,ns,$o;Nr-=ns=(ai*ra+ki*oa)/mo,vn-=$o=(ki*ra-ai*oa)/mo}while(z(ns)+z($o)>g*g&&--gr>0);if(gr){var as=K(Nr*Nr+vn*vn),fl=2*l(as*.5),Zl=E(fl);return[u(Nr*Zl,as*c(fl)),as?$(vn*Zl/as):0]}},Qt}var Oc=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],pb=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],mf=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],mu=[[.9245,0],[0,0],[.01943,0]],Wg=[[.721316,0],[0,0],[-.00881625,-.00617325]];function lm(){return up(Oc,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function Hh(){return up(pb,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Q0(){return up(mf,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function sg(){return up(mu,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function a0(){return up(Wg,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function up(kt,zt){var Qt=R.geoProjection(z1(kt)).rotate(zt).clipAngle(90),cr=R.geoRotation(zt),Sr=Qt.center;return delete Qt.rotate,Qt.center=function(gr){return arguments.length?Sr(cr(gr)):cr.invert(Sr())},Qt}var s1=K(6),Ay=K(7);function o0(kt,zt){var Qt=$(7*E(zt)/(3*s1));return[s1*kt*(2*c(2*Qt/3)-1)/Ay,9*E(Qt/3)/Ay]}o0.invert=function(kt,zt){var Qt=3*$(zt*Ay/9);return[kt*Ay/(s1*(2*c(2*Qt/3)-1)),$(E(Qt)*3*s1/7)]};function lg(){return R.geoProjection(o0).scale(164.859)}function ey(kt,zt){for(var Qt=(1+k)*E(zt),cr=zt,Sr=0,gr;Sr<25&&(cr-=gr=(E(cr/2)+E(cr)-Qt)/(.5*c(cr/2)+c(cr)),!(z(gr)<g));Sr++);return[kt*(1+2*c(cr)/c(cr/2))/(3*P),2*K(3)*E(cr/2)/K(2+P)]}ey.invert=function(kt,zt){var Qt=zt*K(2+P)/(2*K(3)),cr=2*$(Qt);return[3*P*kt/(1+2*c(cr)/c(cr/2)),$((Qt+E(cr))/(1+k))]};function ty(){return R.geoProjection(ey).scale(188.209)}function um(kt,zt){for(var Qt=K(6/(4+I)),cr=(1+I/4)*E(zt),Sr=zt/2,gr=0,Nr;gr<25&&(Sr-=Nr=(Sr/2+E(Sr)-cr)/(.5+c(Sr)),!(z(Nr)<g));gr++);return[Qt*(.5+c(Sr))*kt/1.5,Qt*Sr]}um.invert=function(kt,zt){var Qt=K(6/(4+I)),cr=zt/Qt;return z(z(cr)-N)<g&&(cr=cr<0?-N:N),[1.5*kt/(Qt*(.5+c(cr))),$((cr/2+E(cr))/(1+I/4))]};function Cy(){return R.geoProjection(um).scale(166.518)}function Vm(kt,zt){var Qt=zt*zt,cr=Qt*Qt,Sr=Qt*cr;return[kt*(.84719-.13063*Qt+Sr*Sr*(-.04515+.05494*Qt-.02326*cr+.00331*Sr)),zt*(1.01183+cr*cr*(-.02625+.01926*Qt-.00396*cr))]}Vm.invert=function(kt,zt){var Qt=zt,cr=25,Sr,gr,Nr,vn;do gr=Qt*Qt,Nr=gr*gr,Qt-=Sr=(Qt*(1.01183+Nr*Nr*(-.02625+.01926*gr-.00396*Nr))-zt)/(1.01183+Nr*Nr*(9*-.02625+11*.01926*gr+13*-.00396*Nr));while(z(Sr)>C&&--cr>0);return gr=Qt*Qt,Nr=gr*gr,vn=gr*Nr,[kt/(.84719-.13063*gr+vn*vn*(-.04515+.05494*gr-.02326*Nr+.00331*vn)),Qt]};function _m(){return R.geoProjection(Vm).scale(175.295)}function cp(kt,zt){return[kt*(1+c(zt))/2,2*(zt-D(zt/2))]}cp.invert=function(kt,zt){for(var Qt=zt/2,cr=0,Sr=1/0;cr<10&&z(Sr)>g;++cr){var gr=c(zt/2);zt-=Sr=(zt-D(zt/2)-Qt)/(1-.5/(gr*gr))}return[2*kt/(1+c(zt)),zt]};function Rg(){return R.geoProjection(cp).scale(152.63)}var ry=[[[[-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 Wf(){return uu(Be(1/0),ry).rotate([20,0]).scale(152.63)}function E0(kt,zt){var Qt=E(zt),cr=c(zt),Sr=A(kt);if(kt===0||z(zt)===N)return[0,zt];if(zt===0)return[kt,0];if(z(kt)===N)return[kt*cr,N*Qt];var gr=I/(2*kt)-2*kt/I,Nr=2*zt/I,vn=(1-Nr*Nr)/(Qt-Nr),An=gr*gr,Ln=vn*vn,ai=1+An/Ln,ki=1+Ln/An,ra=(gr*Qt/vn-gr/2)/ai,oa=(Ln*Qt/An+vn/2)/ki,Ma=ra*ra+cr*cr/ai,mo=oa*oa-(Ln*Qt*Qt/An+vn*Qt-1)/ki;return[N*(ra+K(Ma)*Sr),N*(oa+K(mo<0?0:mo)*A(-zt*gr)*Sr)]}E0.invert=function(kt,zt){kt/=N,zt/=N;var Qt=kt*kt,cr=zt*zt,Sr=Qt+cr,gr=I*I;return[kt?(Sr-1+K((1-Sr)*(1-Sr)+4*Qt))/(2*kt)*N:0,gt(function(Nr){return Sr*(I*E(Nr)-2*Nr)*I+4*Nr*Nr*(zt-E(Nr))+2*I*Nr-gr*zt},0)]};function B1(){return R.geoProjection(E0).scale(127.267)}var My=1.0148,s0=.23185,Ry=-.14499,Av=.02406,ky=My,uh=5*s0,Cv=7*Ry,ug=9*Av,bd=1.790857183;function qm(kt,zt){var Qt=zt*zt;return[kt,zt*(My+Qt*Qt*(s0+Qt*(Ry+Av*Qt)))]}qm.invert=function(kt,zt){zt>bd?zt=bd:zt<-bd&&(zt=-bd);var Qt=zt,cr;do{var Sr=Qt*Qt;Qt-=cr=(Qt*(My+Sr*Sr*(s0+Sr*(Ry+Av*Sr)))-zt)/(ky+Sr*Sr*(uh+Sr*(Cv+ug*Sr)))}while(z(cr)>g);return[kt,Qt]};function tv(){return R.geoProjection(qm).scale(139.319)}function Mv(kt,zt){if(z(zt)<g)return[kt,0];var Qt=D(zt),cr=kt*E(zt);return[E(cr)/Qt,zt+(1-c(cr))/Qt]}Mv.invert=function(kt,zt){if(z(zt)<g)return[kt,0];var Qt=kt*kt+zt*zt,cr=zt*.5,Sr=10,gr;do{var Nr=D(cr),vn=1/c(cr),An=Qt-2*zt*cr+cr*cr;cr-=gr=(Nr*An+2*(cr-zt))/(2+An*vn*vn+2*(cr-zt)*Nr)}while(z(gr)>g&&--Sr>0);return Nr=D(cr),[(z(zt)<z(cr+1/Nr)?$(kt*Nr):A(zt)*A(kt)*(Z(z(kt*Nr))+N))/E(cr),cr]};function Ud(){return R.geoProjection(Mv).scale(103.74)}function Yg(kt,zt){var Qt=A0(kt[1],kt[0]),cr=A0(zt[1],zt[0]),Sr=Qb(Qt,cr),gr=U1(Qt)/U1(cr);return cg([1,0,kt[0][0],0,1,kt[0][1]],cg([gr,0,0,0,gr,0],cg([c(Sr),E(Sr),0,-E(Sr),c(Sr),0],[1,0,-zt[0][0],0,1,-zt[0][1]])))}function wm(kt){var zt=1/(kt[0]*kt[4]-kt[1]*kt[3]);return[zt*kt[4],-zt*kt[1],zt*(kt[1]*kt[5]-kt[2]*kt[4]),-zt*kt[3],zt*kt[0],zt*(kt[2]*kt[3]-kt[0]*kt[5])]}function cg(kt,zt){return[kt[0]*zt[0]+kt[1]*zt[3],kt[0]*zt[1]+kt[1]*zt[4],kt[0]*zt[2]+kt[1]*zt[5]+kt[2],kt[3]*zt[0]+kt[4]*zt[3],kt[3]*zt[1]+kt[4]*zt[4],kt[3]*zt[2]+kt[4]*zt[5]+kt[5]]}function A0(kt,zt){return[kt[0]-zt[0],kt[1]-zt[1]]}function U1(kt){return K(kt[0]*kt[0]+kt[1]*kt[1])}function Qb(kt,zt){return u(kt[0]*zt[1]-kt[1]*zt[0],kt[0]*zt[0]+kt[1]*zt[1])}function Xg(kt,zt,Qt){cr(kt,{transform:null});function cr(Ln,ai){if(Ln.edges=Tp(Ln.face),ai.face){var ki=Ln.shared=M0(Ln.face,ai.face),ra=Yg(ki.map(ai.project),ki.map(Ln.project));Ln.transform=ai.transform?cg(ai.transform,ra):ra;for(var oa=ai.edges,Ma=0,mo=oa.length;Ma<mo;++Ma)Uv(ki[0],oa[Ma][1])&&Uv(ki[1],oa[Ma][0])&&(oa[Ma]=Ln),Uv(ki[0],oa[Ma][0])&&Uv(ki[1],oa[Ma][1])&&(oa[Ma]=Ln);for(oa=Ln.edges,Ma=0,mo=oa.length;Ma<mo;++Ma)Uv(ki[0],oa[Ma][0])&&Uv(ki[1],oa[Ma][1])&&(oa[Ma]=ai),Uv(ki[0],oa[Ma][1])&&Uv(ki[1],oa[Ma][0])&&(oa[Ma]=ai)}else Ln.transform=ai.transform;return Ln.children&&Ln.children.forEach(function(ns){cr(ns,Ln)}),Ln}function Sr(Ln,ai){var ki=zt(Ln,ai),ra=ki.project([Ln*S,ai*S]),oa;return(oa=ki.transform)?[oa[0]*ra[0]+oa[1]*ra[1]+oa[2],-(oa[3]*ra[0]+oa[4]*ra[1]+oa[5])]:(ra[1]=-ra[1],ra)}Zg(kt)&&(Sr.invert=function(Ln,ai){var ki=gr(kt,[Ln,-ai]);return ki&&(ki[0]*=M,ki[1]*=M,ki)});function gr(Ln,ai){var ki=Ln.project.invert,ra=Ln.transform,oa=ai;if(ra&&(ra=wm(ra),oa=[ra[0]*oa[0]+ra[1]*oa[1]+ra[2],ra[3]*oa[0]+ra[4]*oa[1]+ra[5]]),ki&&Ln===Nr(Ma=ki(oa)))return Ma;for(var Ma,mo=Ln.children,ns=0,$o=mo&&mo.length;ns<$o;++ns)if(Ma=gr(mo[ns],ai))return Ma}function Nr(Ln){return zt(Ln[0]*M,Ln[1]*M)}var vn=R.geoProjection(Sr),An=vn.stream;return vn.stream=function(Ln){var ai=vn.rotate(),ki=An(Ln),ra=(vn.rotate([0,0]),An(Ln));return vn.rotate(ai),ki.sphere=function(){ra.polygonStart(),ra.lineStart(),C0(ra,kt),ra.lineEnd(),ra.polygonEnd()},ki},vn.angle(Qt==null?-30:Qt*S)}function C0(kt,zt,Qt){var cr,Sr=zt.edges,gr=Sr.length,Nr,vn={type:"MultiPoint",coordinates:zt.face},An=zt.face.filter(function(mo){return z(mo[1])!==90}),Ln=R.geoBounds({type:"MultiPoint",coordinates:An}),ai=!1,ki=-1,ra=Ln[1][0]-Ln[0][0],oa=ra===180||ra===360?[(Ln[0][0]+Ln[1][0])/2,(Ln[0][1]+Ln[1][1])/2]:R.geoCentroid(vn);if(Qt)for(;++ki<gr&&Sr[ki]!==Qt;);++ki;for(var Ma=0;Ma<gr;++Ma)Nr=Sr[(Ma+ki)%gr],Array.isArray(Nr)?(ai||(kt.point((cr=R.geoInterpolate(Nr[0],oa)(g))[0],cr[1]),ai=!0),kt.point((cr=R.geoInterpolate(Nr[1],oa)(g))[0],cr[1])):(ai=!1,Nr!==Qt&&C0(kt,Nr,zt))}function Uv(kt,zt){return kt&&zt&&kt[0]===zt[0]&&kt[1]===zt[1]}function M0(kt,zt){for(var Qt,cr,Sr=kt.length,gr=null,Nr=0;Nr<Sr;++Nr){Qt=kt[Nr];for(var vn=zt.length;--vn>=0;)if(cr=zt[vn],Qt[0]===cr[0]&&Qt[1]===cr[1]){if(gr)return[gr,Qt];gr=Qt}}}function Tp(kt){for(var zt=kt.length,Qt=[],cr=kt[zt-1],Sr=0;Sr<zt;++Sr)Qt.push([cr,cr=kt[Sr]]);return Qt}function Zg(kt){return kt.project.invert||kt.children&&kt.children.some(Zg)}var Iy=[[0,90],[-90,0],[0,0],[90,0],[180,0],[0,-90]],Kg=[[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(kt){return kt.map(function(zt){return Iy[zt]})});function Rd(kt){kt=kt||function(Qt){var cr=R.geoCentroid({type:"MultiPoint",coordinates:Qt});return R.geoGnomonic().scale(1).translate([0,0]).rotate([-cr[0],-cr[1]])};var zt=Kg.map(function(Qt){return{face:Qt,project:kt(Qt)}});return[-1,0,0,1,0,1,4,5].forEach(function(Qt,cr){var Sr=zt[Qt];Sr&&(Sr.children||(Sr.children=[])).push(zt[cr])}),Xg(zt[0],function(Qt,cr){return zt[Qt<-I/2?cr<0?6:4:Qt<0?cr<0?2:0:Qt<I/2?cr<0?3:1:cr<0?7:5]}).angle(-30).scale(101.858).center([0,45])}var Rv=2/K(3);function cm(kt,zt){var Qt=Ye(kt,zt);return[Qt[0]*Rv,Qt[1]]}cm.invert=function(kt,zt){return Ye.invert(kt/Rv,zt)};function ny(kt){kt=kt||function(Qt){var cr=R.geoCentroid({type:"MultiPoint",coordinates:Qt});return R.geoProjection(cm).translate([0,0]).scale(1).rotate(cr[1]>0?[-cr[0],0]:[180-cr[0],180])};var zt=Kg.map(function(Qt){return{face:Qt,project:kt(Qt)}});return[-1,0,0,1,0,1,4,5].forEach(function(Qt,cr){var Sr=zt[Qt];Sr&&(Sr.children||(Sr.children=[])).push(zt[cr])}),Xg(zt[0],function(Qt,cr){return zt[Qt<-I/2?cr<0?6:4:Qt<0?cr<0?2:0:Qt<I/2?cr<0?3:1:cr<0?7:5]}).angle(-30).scale(121.906).center([0,48.5904])}function Ld(kt){kt=kt||function(Nr){var vn=Nr.length===6?R.geoCentroid({type:"MultiPoint",coordinates:Nr}):Nr[0];return R.geoGnomonic().scale(1).translate([0,0]).rotate([-vn[0],-vn[1]])};var zt=Kg.map(function(Nr){for(var vn=Nr.map(u0),An=vn.length,Ln=vn[An-1],ai,ki=[],ra=0;ra<An;++ra)ai=vn[ra],ki.push(Hv([Ln[0]*.9486832980505138+ai[0]*.31622776601683794,Ln[1]*.9486832980505138+ai[1]*.31622776601683794,Ln[2]*.9486832980505138+ai[2]*.31622776601683794]),Hv([ai[0]*.9486832980505138+Ln[0]*.31622776601683794,ai[1]*.9486832980505138+Ln[1]*.31622776601683794,ai[2]*.9486832980505138+Ln[2]*.31622776601683794])),Ln=ai;return ki}),Qt=[],cr=[-1,0,0,1,0,1,4,5];zt.forEach(function(Nr,vn){for(var An=Kg[vn],Ln=An.length,ai=Qt[vn]=[],ki=0;ki<Ln;++ki)zt.push([An[ki],Nr[(ki*2+2)%(2*Ln)],Nr[(ki*2+1)%(2*Ln)]]),cr.push(vn),ai.push(fg(u0(Nr[(ki*2+2)%(2*Ln)]),u0(Nr[(ki*2+1)%(2*Ln)])))});var Sr=zt.map(function(Nr){return{project:kt(Nr),face:Nr}});cr.forEach(function(Nr,vn){var An=Sr[Nr];An&&(An.children||(An.children=[])).push(Sr[vn])});function gr(Nr,vn){var An=c(vn),Ln=[An*c(Nr),An*E(Nr),E(vn)],ai=Nr<-I/2?vn<0?6:4:Nr<0?vn<0?2:0:Nr<I/2?vn<0?3:1:vn<0?7:5,ki=Qt[ai];return Sr[l0(ki[0],Ln)<0?8+3*ai:l0(ki[1],Ln)<0?8+3*ai+1:l0(ki[2],Ln)<0?8+3*ai+2:ai]}return Xg(Sr[0],gr).angle(-30).scale(110.625).center([0,45])}function l0(kt,zt){for(var Qt=0,cr=kt.length,Sr=0;Qt<cr;++Qt)Sr+=kt[Qt]*zt[Qt];return Sr}function fg(kt,zt){return[kt[1]*zt[2]-kt[2]*zt[1],kt[2]*zt[0]-kt[0]*zt[2],kt[0]*zt[1]-kt[1]*zt[0]]}function Hv(kt){return[u(kt[1],kt[0])*S,$(h(-1,m(1,kt[2])))*S]}function u0(kt){var zt=kt[0]*M,Qt=kt[1]*M,cr=c(Qt);return[cr*c(zt),cr*E(zt),E(Qt)]}function Sm(){}function c0(kt){if((Qt=kt.length)<4)return!1;for(var zt=0,Qt,cr=kt[Qt-1][1]*kt[0][0]-kt[Qt-1][0]*kt[0][1];++zt<Qt;)cr+=kt[zt-1][1]*kt[zt][0]-kt[zt-1][0]*kt[zt][1];return cr<=0}function H1(kt,zt){for(var Qt=zt[0],cr=zt[1],Sr=!1,gr=0,Nr=kt.length,vn=Nr-1;gr<Nr;vn=gr++){var An=kt[gr],Ln=An[0],ai=An[1],ki=kt[vn],ra=ki[0],oa=ki[1];ai>cr^oa>cr&&Qt<(ra-Ln)*(cr-ai)/(oa-ai)+Ln&&(Sr=!Sr)}return Sr}function Np(kt,zt){var Qt=zt.stream,cr;if(!Qt)throw new Error("invalid projection");switch(kt&&kt.type){case"Feature":cr=jv;break;case"FeatureCollection":cr=Py;break;default:cr=Tm;break}return cr(kt,Qt)}function Py(kt,zt){return{type:"FeatureCollection",features:kt.features.map(function(Qt){return jv(Qt,zt)})}}function jv(kt,zt){return{type:"Feature",id:kt.id,properties:kt.properties,geometry:Tm(kt.geometry,zt)}}function Gm(kt,zt){return{type:"GeometryCollection",geometries:kt.geometries.map(function(Qt){return Tm(Qt,zt)})}}function Tm(kt,zt){if(!kt)return null;if(kt.type==="GeometryCollection")return Gm(kt,zt);var Qt;switch(kt.type){case"Point":Qt=Yd;break;case"MultiPoint":Qt=Yd;break;case"LineString":Qt=dg;break;case"MultiLineString":Qt=dg;break;case"Polygon":Qt=Em;break;case"MultiPolygon":Qt=Em;break;case"Sphere":Qt=Em;break;default:return null}return R.geoStream(kt,zt(Qt)),Qt.result()}var ph=[],pv=[],Yd={point:function(kt,zt){ph.push([kt,zt])},result:function(){var kt=ph.length?ph.length<2?{type:"Point",coordinates:ph[0]}:{type:"MultiPoint",coordinates:ph}:null;return ph=[],kt}},dg={lineStart:Sm,point:function(kt,zt){ph.push([kt,zt])},lineEnd:function(){ph.length&&(pv.push(ph),ph=[])},result:function(){var kt=pv.length?pv.length<2?{type:"LineString",coordinates:pv[0]}:{type:"MultiLineString",coordinates:pv}:null;return pv=[],kt}},Em={polygonStart:Sm,lineStart:Sm,point:function(kt,zt){ph.push([kt,zt])},lineEnd:function(){var kt=ph.length;if(kt){do ph.push(ph[0].slice());while(++kt<4);pv.push(ph),ph=[]}},polygonEnd:Sm,result:function(){if(!pv.length)return null;var kt=[],zt=[];return pv.forEach(function(Qt){c0(Qt)?kt.push([Qt]):zt.push(Qt)}),zt.forEach(function(Qt){var cr=Qt[0];kt.some(function(Sr){if(H1(Sr[0],cr))return Sr.push(Qt),!0})||kt.push([Qt])}),pv=[],kt.length?kt.length>1?{type:"MultiPolygon",coordinates:kt}:{type:"Polygon",coordinates:kt[0]}:null}};function iy(kt){var zt=kt(N,0)[0]-kt(-N,0)[0];function Qt(cr,Sr){var gr=z(cr)<N,Nr=kt(gr?cr:cr>0?cr-I:cr+I,Sr),vn=(Nr[0]-Nr[1])*k,An=(Nr[0]+Nr[1])*k;if(gr)return[vn,An];var Ln=zt*k,ai=vn>0^An>0?-1:1;return[ai*vn-A(An)*Ln,ai*An-A(vn)*Ln]}return kt.invert&&(Qt.invert=function(cr,Sr){var gr=(cr+Sr)*k,Nr=(Sr-cr)*k,vn=z(gr)<.5*zt&&z(Nr)<.5*zt;if(!vn){var An=zt*k,Ln=gr>0^Nr>0?-1:1,ai=-Ln*cr+(Nr>0?1:-1)*An,ki=-Ln*Sr+(gr>0?1:-1)*An;gr=(-ai-ki)*k,Nr=(ai-ki)*k}var ra=kt.invert(gr,Nr);return vn||(ra[0]+=gr>0?I:-I),ra}),R.geoProjection(Qt).rotate([-90,-90,45]).clipAngle(180-.001)}function sn(){return iy(ji).scale(176.423)}function Fn(){return iy(iu).scale(111.48)}function Li(kt,zt){if(!(0<=(zt=+zt)&&zt<=20))throw new Error("invalid digits");function Qt(Ln){var ai=Ln.length,ki=2,ra=new Array(ai);for(ra[0]=+Ln[0].toFixed(zt),ra[1]=+Ln[1].toFixed(zt);ki<ai;)ra[ki]=Ln[ki],++ki;return ra}function cr(Ln){return Ln.map(Qt)}function Sr(Ln){for(var ai=Qt(Ln[0]),ki=[ai],ra=1;ra<Ln.length;ra++){var oa=Qt(Ln[ra]);(oa.length>2||oa[0]!=ai[0]||oa[1]!=ai[1])&&(ki.push(oa),ai=oa)}return ki.length===1&&Ln.length>1&&ki.push(Qt(Ln[Ln.length-1])),ki}function gr(Ln){return Ln.map(Sr)}function Nr(Ln){if(Ln==null)return Ln;var ai;switch(Ln.type){case"GeometryCollection":ai={type:"GeometryCollection",geometries:Ln.geometries.map(Nr)};break;case"Point":ai={type:"Point",coordinates:Qt(Ln.coordinates)};break;case"MultiPoint":ai={type:Ln.type,coordinates:cr(Ln.coordinates)};break;case"LineString":ai={type:Ln.type,coordinates:Sr(Ln.coordinates)};break;case"MultiLineString":case"Polygon":ai={type:Ln.type,coordinates:gr(Ln.coordinates)};break;case"MultiPolygon":ai={type:"MultiPolygon",coordinates:Ln.coordinates.map(gr)};break;default:return Ln}return Ln.bbox!=null&&(ai.bbox=Ln.bbox),ai}function vn(Ln){var ai={type:"Feature",properties:Ln.properties,geometry:Nr(Ln.geometry)};return Ln.id!=null&&(ai.id=Ln.id),Ln.bbox!=null&&(ai.bbox=Ln.bbox),ai}if(kt!=null)switch(kt.type){case"Feature":return vn(kt);case"FeatureCollection":{var An={type:"FeatureCollection",features:kt.features.map(vn)};return kt.bbox!=null&&(An.bbox=kt.bbox),An}default:return Nr(kt)}return kt}function Si(kt){var zt=E(kt);function Qt(cr,Sr){var gr=zt?D(cr*zt/2)/zt:cr/2;if(!Sr)return[2*gr,-kt];var Nr=2*l(gr*E(Sr)),vn=1/D(Sr);return[E(Nr)*vn,Sr+(1-c(Nr))*vn-kt]}return Qt.invert=function(cr,Sr){if(z(Sr+=kt)<g)return[zt?2*l(zt*cr/2)/zt:cr,0];var gr=cr*cr+Sr*Sr,Nr=0,vn=10,An;do{var Ln=D(Nr),ai=1/c(Nr),ki=gr-2*Sr*Nr+Nr*Nr;Nr-=An=(Ln*ki+2*(Nr-Sr))/(2+ki*ai*ai+2*(Nr-Sr)*Ln)}while(z(An)>g&&--vn>0);var ra=cr*(Ln=D(Nr)),oa=D(z(Sr)<z(Nr+1/Ln)?$(ra)*.5:Z(ra)*.5+I/4)/E(Nr);return[zt?2*l(zt*oa)/zt:2*oa,Nr]},Qt}function ma(){return Jt(Si).scale(131.215)}var yo=[[.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]];yo.forEach(function(kt){kt[1]*=1.0144});function uo(kt,zt){var Qt=m(18,z(zt)*36/I),cr=f(Qt),Sr=Qt-cr,gr=(ki=yo[cr])[0],Nr=ki[1],vn=(ki=yo[++cr])[0],An=ki[1],Ln=(ki=yo[m(19,++cr)])[0],ai=ki[1],ki;return[kt*(vn+Sr*(Ln-gr)/2+Sr*Sr*(Ln-2*vn+gr)/2),(zt>0?N:-N)*(An+Sr*(ai-Nr)/2+Sr*Sr*(ai-2*An+Nr)/2)]}uo.invert=function(kt,zt){var Qt=zt/N,cr=Qt*90,Sr=m(18,z(cr/5)),gr=h(0,f(Sr));do{var Nr=yo[gr][1],vn=yo[gr+1][1],An=yo[m(19,gr+2)][1],Ln=An-Nr,ai=An-2*vn+Nr,ki=2*(z(Qt)-vn)/Ln,ra=ai/Ln,oa=ki*(1-ra*ki*(1-2*ra*ki));if(oa>=0||gr===1){cr=(zt>=0?5:-5)*(oa+Sr);var Ma=50,mo;do Sr=m(18,z(cr)/5),gr=f(Sr),oa=Sr-gr,Nr=yo[gr][1],vn=yo[gr+1][1],An=yo[m(19,gr+2)][1],cr-=(mo=(zt>=0?N:-N)*(vn+oa*(An-Nr)/2+oa*oa*(An-2*vn+Nr)/2)-zt)*S;while(z(mo)>C&&--Ma>0);break}}while(--gr>=0);var ns=yo[gr][0],$o=yo[gr+1][0],as=yo[m(19,gr+2)][0];return[kt/($o+oa*(as-ns)/2+oa*oa*(as-2*$o+ns)/2),cr*M]};function rs(){return R.geoProjection(uo).scale(152.63)}function hs(kt){function zt(Qt,cr){var Sr=c(cr),gr=(kt-1)/(kt-Sr*c(Qt));return[gr*Sr*E(Qt),gr*E(cr)]}return zt.invert=function(Qt,cr){var Sr=Qt*Qt+cr*cr,gr=K(Sr),Nr=(kt-K(1-Sr*(kt+1)/(kt-1)))/((kt-1)/gr+gr/(kt-1));return[u(Qt*Nr,gr*K(1-Nr*Nr)),gr?$(cr*Nr/gr):0]},zt}function Ws(kt,zt){var Qt=hs(kt);if(!zt)return Qt;var cr=c(zt),Sr=E(zt);function gr(Nr,vn){var An=Qt(Nr,vn),Ln=An[1],ai=Ln*Sr/(kt-1)+cr;return[An[0]*cr/ai,Ln/ai]}return gr.invert=function(Nr,vn){var An=(kt-1)/(kt-1-vn*Sr);return Qt.invert(An*Nr,An*vn*cr)},gr}function Bo(){var kt=2,zt=0,Qt=R.geoProjectionMutator(Ws),cr=Qt(kt,zt);return cr.distance=function(Sr){return arguments.length?Qt(kt=+Sr,zt):kt},cr.tilt=function(Sr){return arguments.length?Qt(kt,zt=Sr*M):zt*S},cr.scale(432.147).clipAngle(Z(1/kt)*S-1e-6)}var As=1e-4,Jo=1e4,Io=-180,ll=Io+As,Tu=180,du=Tu-As,ku=-90,Au=ku+As,cl=90,Os=cl-As;function Vu(kt){return kt.length>0}function Nc(kt){return Math.floor(kt*Jo)/Jo}function Sf(kt){return kt===ku||kt===cl?[0,kt]:[Io,Nc(kt)]}function sd(kt){var zt=kt[0],Qt=kt[1],cr=!1;return zt<=ll?(zt=Io,cr=!0):zt>=du&&(zt=Tu,cr=!0),Qt<=Au?(Qt=ku,cr=!0):Qt>=Os&&(Qt=cl,cr=!0),cr?[zt,Qt]:kt}function Cf(kt){return kt.map(sd)}function ld(kt,zt,Qt){for(var cr=0,Sr=kt.length;cr<Sr;++cr){var gr=kt[cr].slice();Qt.push({index:-1,polygon:zt,ring:gr});for(var Nr=0,vn=gr.length;Nr<vn;++Nr){var An=gr[Nr],Ln=An[0],ai=An[1];if(Ln<=ll||Ln>=du||ai<=Au||ai>=Os){gr[Nr]=sd(An);for(var ki=Nr+1;ki<vn;++ki){var ra=gr[ki],oa=ra[0],Ma=ra[1];if(oa>ll&&oa<du&&Ma>Au&&Ma<Os)break}if(ki===Nr+1)continue;if(Nr){var mo={index:-1,polygon:zt,ring:gr.slice(0,Nr+1)};mo.ring[mo.ring.length-1]=Sf(ai),Qt[Qt.length-1]=mo}else Qt.pop();if(ki>=vn)break;Qt.push({index:-1,polygon:zt,ring:gr=gr.slice(ki-1)}),gr[0]=Sf(gr[0][1]),Nr=-1,vn=gr.length}}}}function Jc(kt){var zt,Qt=kt.length,cr={},Sr={},gr,Nr,vn,An,Ln;for(zt=0;zt<Qt;++zt){if(gr=kt[zt],Nr=gr.ring[0],An=gr.ring[gr.ring.length-1],Nr[0]===An[0]&&Nr[1]===An[1]){gr.polygon.push(gr.ring),kt[zt]=null;continue}gr.index=zt,cr[Nr]=Sr[An]=gr}for(zt=0;zt<Qt;++zt)if(gr=kt[zt],gr){if(Nr=gr.ring[0],An=gr.ring[gr.ring.length-1],vn=Sr[Nr],Ln=cr[An],delete cr[Nr],delete Sr[An],Nr[0]===An[0]&&Nr[1]===An[1]){gr.polygon.push(gr.ring);continue}vn?(delete Sr[Nr],delete cr[vn.ring[0]],vn.ring.pop(),kt[vn.index]=null,gr={index:-1,polygon:vn.polygon,ring:vn.ring.concat(gr.ring)},vn===Ln?gr.polygon.push(gr.ring):(gr.index=Qt++,kt.push(cr[gr.ring[0]]=Sr[gr.ring[gr.ring.length-1]]=gr))):Ln?(delete cr[An],delete Sr[Ln.ring[Ln.ring.length-1]],gr.ring.pop(),gr={index:Qt++,polygon:Ln.polygon,ring:gr.ring.concat(Ln.ring)},kt[Ln.index]=null,kt.push(cr[gr.ring[0]]=Sr[gr.ring[gr.ring.length-1]]=gr)):(gr.ring.push(gr.ring[0]),gr.polygon.push(gr.ring))}}function wh(kt){var zt={type:"Feature",geometry:vh(kt.geometry)};return kt.id!=null&&(zt.id=kt.id),kt.bbox!=null&&(zt.bbox=kt.bbox),kt.properties!=null&&(zt.properties=kt.properties),zt}function vh(kt){if(kt==null)return kt;var zt,Qt,cr,Sr;switch(kt.type){case"GeometryCollection":zt={type:"GeometryCollection",geometries:kt.geometries.map(vh)};break;case"Point":zt={type:"Point",coordinates:sd(kt.coordinates)};break;case"MultiPoint":case"LineString":zt={type:kt.type,coordinates:Cf(kt.coordinates)};break;case"MultiLineString":zt={type:"MultiLineString",coordinates:kt.coordinates.map(Cf)};break;case"Polygon":{var gr=[];ld(kt.coordinates,gr,Qt=[]),Jc(Qt),zt={type:"Polygon",coordinates:gr};break}case"MultiPolygon":{Qt=[],cr=-1,Sr=kt.coordinates.length;for(var Nr=new Array(Sr);++cr<Sr;)ld(kt.coordinates[cr],Nr[cr]=[],Qt);Jc(Qt),zt={type:"MultiPolygon",coordinates:Nr.filter(Vu)};break}default:return kt}return kt.bbox!=null&&(zt.bbox=kt.bbox),zt}function rd(kt){if(kt==null)return kt;switch(kt.type){case"Feature":return wh(kt);case"FeatureCollection":{var zt={type:"FeatureCollection",features:kt.features.map(wh)};return kt.bbox!=null&&(zt.bbox=kt.bbox),zt}default:return vh(kt)}}function Wl(kt,zt){var Qt=D(zt/2),cr=E(F*Qt);return[kt*(.74482-.34588*cr*cr),1.70711*Qt]}Wl.invert=function(kt,zt){var Qt=zt/1.70711,cr=E(F*Qt);return[kt/(.74482-.34588*cr*cr),2*l(Qt)]};function lc(){return R.geoProjection(Wl).scale(146.153)}function Bf(kt,zt,Qt){var cr=R.geoInterpolate(zt,Qt),Sr=cr(.5),gr=R.geoRotation([-Sr[0],-Sr[1]])(zt),Nr=cr.distance/2,vn=-$(E(gr[1]*M)/E(Nr)),An=[-Sr[0],-Sr[1],-(gr[0]>0?I-vn:vn)*S],Ln=R.geoProjection(kt(Nr)).rotate(An),ai=R.geoRotation(An),ki=Ln.center;return delete Ln.rotate,Ln.center=function(ra){return arguments.length?ki(ai(ra)):ai.invert(ki())},Ln.clipAngle(90)}function gf(kt){var zt=c(kt);function Qt(cr,Sr){var gr=R.geoGnomonicRaw(cr,Sr);return gr[0]*=zt,gr}return Qt.invert=function(cr,Sr){return R.geoGnomonicRaw.invert(cr/zt,Sr)},Qt}function rv(){return nv([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function nv(kt,zt){return Bf(gf,kt,zt)}function vv(kt){if(!(kt*=2))return R.geoAzimuthalEquidistantRaw;var zt=-kt/2,Qt=-zt,cr=kt*kt,Sr=D(Qt),gr=.5/E(Qt);function Nr(vn,An){var Ln=Z(c(An)*c(vn-zt)),ai=Z(c(An)*c(vn-Qt)),ki=An<0?-1:1;return Ln*=Ln,ai*=ai,[(Ln-ai)/(2*kt),ki*K(4*cr*ai-(cr-Ln+ai)*(cr-Ln+ai))/(2*kt)]}return Nr.invert=function(vn,An){var Ln=An*An,ai=c(K(Ln+(ra=vn+zt)*ra)),ki=c(K(Ln+(ra=vn+Qt)*ra)),ra,oa;return[u(oa=ai-ki,ra=(ai+ki)*Sr),(An<0?-1:1)*Z(K(ra*ra+oa*oa)*gr)]},Nr}function kg(){return iv([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function iv(kt,zt){return Bf(vv,kt,zt)}function $m(kt,zt){if(z(zt)<g)return[kt,0];var Qt=z(zt/N),cr=$(Qt);if(z(kt)<g||z(z(zt)-N)<g)return[0,A(zt)*I*D(cr/2)];var Sr=c(cr),gr=z(I/kt-kt/I)/2,Nr=gr*gr,vn=Sr/(Qt+Sr-1),An=vn*(2/Qt-1),Ln=An*An,ai=Ln+Nr,ki=vn-Ln,ra=Nr+vn;return[A(kt)*I*(gr*ki+K(Nr*ki*ki-ai*(vn*vn-Ln)))/ai,A(zt)*I*(An*ra-gr*K((Nr+1)*ai-ra*ra))/ai]}$m.invert=function(kt,zt){if(z(zt)<g)return[kt,0];if(z(kt)<g)return[0,N*E(2*l(zt/I))];var Qt=(kt/=I)*kt,cr=(zt/=I)*zt,Sr=Qt+cr,gr=Sr*Sr,Nr=-z(zt)*(1+Sr),vn=Nr-2*cr+Qt,An=-2*Nr+1+2*cr+gr,Ln=cr/An+(2*vn*vn*vn/(An*An*An)-9*Nr*vn/(An*An))/27,ai=(Nr-vn*vn/(3*An))/An,ki=2*K(-ai/3),ra=Z(3*Ln/(ai*ki))/3;return[I*(Sr-1+K(1+2*(Qt-cr)+gr))/(2*kt),A(zt)*I*(-ki*c(ra+I/3)-vn/(3*An))]};function Sh(){return R.geoProjection($m).scale(79.4183)}function Wm(kt,zt){if(z(zt)<g)return[kt,0];var Qt=z(zt/N),cr=$(Qt);if(z(kt)<g||z(z(zt)-N)<g)return[0,A(zt)*I*D(cr/2)];var Sr=c(cr),gr=z(I/kt-kt/I)/2,Nr=gr*gr,vn=Sr*(K(1+Nr)-gr*Sr)/(1+Nr*Qt*Qt);return[A(kt)*I*vn,A(zt)*I*K(1-vn*(2*gr+vn))]}Wm.invert=function(kt,zt){if(!kt)return[0,N*E(2*l(zt/I))];var Qt=z(kt/I),cr=(1-Qt*Qt-(zt/=I)*zt)/(2*Qt),Sr=cr*cr,gr=K(Sr+1);return[A(kt)*I*(gr-cr),A(zt)*N*E(2*u(K((1-2*cr*Qt)*(cr+gr)-Qt),K(gr+cr+Qt)))]};function Iu(){return R.geoProjection(Wm).scale(79.4183)}function Gu(kt,zt){if(z(zt)<g)return[kt,0];var Qt=zt/N,cr=$(Qt);if(z(kt)<g||z(z(zt)-N)<g)return[0,I*D(cr/2)];var Sr=(I/kt-kt/I)/2,gr=Qt/(1+c(cr));return[I*(A(kt)*K(Sr*Sr+1-gr*gr)-Sr),I*gr]}Gu.invert=function(kt,zt){if(!zt)return[kt,0];var Qt=zt/I,cr=(I*I*(1-Qt*Qt)-kt*kt)/(2*I*kt);return[kt?I*(A(kt)*K(cr*cr+1)-cr):0,N*E(2*l(Qt))]};function Ym(){return R.geoProjection(Gu).scale(79.4183)}function Vv(kt,zt){if(!zt)return[kt,0];var Qt=z(zt);if(!kt||Qt===N)return[0,zt];var cr=Qt/N,Sr=cr*cr,gr=(8*cr-Sr*(Sr+2)-5)/(2*Sr*(cr-1)),Nr=gr*gr,vn=cr*gr,An=Sr+Nr+2*vn,Ln=cr+3*gr,ai=kt/N,ki=ai+1/ai,ra=A(z(kt)-N)*K(ki*ki-4),oa=ra*ra,Ma=An*(Sr+Nr*oa-1)+(1-Sr)*(Sr*(Ln*Ln+4*Nr)+12*vn*Nr+4*Nr*Nr),mo=(ra*(An+Nr-1)+2*K(Ma))/(4*An+oa);return[A(kt)*N*mo,A(zt)*N*K(1+ra*z(mo)-mo*mo)]}Vv.invert=function(kt,zt){var Qt;if(!kt||!zt)return[kt,zt];zt/=I;var cr=A(kt)*kt/N,Sr=(cr*cr-1+4*zt*zt)/z(cr),gr=Sr*Sr,Nr=2*zt,vn=50;do{var An=Nr*Nr,Ln=(8*Nr-An*(An+2)-5)/(2*An*(Nr-1)),ai=(3*Nr-An*Nr-10)/(2*An*Nr),ki=Ln*Ln,ra=Nr*Ln,oa=Nr+Ln,Ma=oa*oa,mo=Nr+3*Ln,ns=Ma*(An+ki*gr-1)+(1-An)*(An*(mo*mo+4*ki)+ki*(12*ra+4*ki)),$o=-2*oa*(4*ra*ki+(1-4*An+3*An*An)*(1+ai)+ki*(-6+14*An-gr+(-8+8*An-2*gr)*ai)+ra*(-8+12*An+(-10+10*An-gr)*ai)),as=K(ns),fl=Sr*(Ma+ki-1)+2*as-cr*(4*Ma+gr),Zl=Sr*(2*Ln*ai+2*oa*(1+ai))+$o/as-8*oa*(Sr*(-1+ki+Ma)+2*as)*(1+ai)/(gr+4*Ma);Nr-=Qt=fl/Zl}while(Qt>g&&--vn>0);return[A(kt)*(K(Sr*Sr+4)+Sr)*I/4,N*Nr]};function kv(){return R.geoProjection(Vv).scale(127.16)}function wt(kt,zt,Qt,cr,Sr){function gr(Nr,vn){var An=Qt*E(cr*vn),Ln=K(1-An*An),ai=K(2/(1+Ln*c(Nr*=Sr)));return[kt*Ln*ai*E(Nr),zt*An*ai]}return gr.invert=function(Nr,vn){var An=Nr/kt,Ln=vn/zt,ai=K(An*An+Ln*Ln),ki=2*$(ai/2);return[u(Nr*D(ki),kt*ai)/Sr,ai&&$(vn*E(ki)/(zt*Qt*ai))/cr]},gr}function q(kt,zt,Qt,cr){var Sr=I/3;kt=h(kt,g),zt=h(zt,g),kt=m(kt,N),zt=m(zt,I-g),Qt=h(Qt,0),Qt=m(Qt,100-g),cr=h(cr,g);var gr=Qt/100+1,Nr=cr/100,vn=Z(gr*c(Sr))/Sr,An=E(kt)/E(vn*N),Ln=zt/I,ai=K(Nr*E(kt/2)/E(zt/2)),ki=ai/K(Ln*An*vn),ra=1/(ai*K(Ln*An*vn));return wt(ki,ra,An,vn,Ln)}function Ae(){var kt=65*M,zt=60*M,Qt=20,cr=200,Sr=R.geoProjectionMutator(q),gr=Sr(kt,zt,Qt,cr);return gr.poleline=function(Nr){return arguments.length?Sr(kt=+Nr*M,zt,Qt,cr):kt*S},gr.parallels=function(Nr){return arguments.length?Sr(kt,zt=+Nr*M,Qt,cr):zt*S},gr.inflation=function(Nr){return arguments.length?Sr(kt,zt,Qt=+Nr,cr):Qt},gr.ratio=function(Nr){return arguments.length?Sr(kt,zt,Qt,cr=+Nr):cr},gr.scale(163.775)}function it(){return Ae().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var ot=4*I+3*K(3),bt=2*K(2*I*K(3)/ot),ar=Ht(bt*K(3)/I,bt,ot/6);function yr(){return R.geoProjection(ar).scale(176.84)}function Ur(kt,zt){return[kt*K(1-3*zt*zt/(I*I)),zt]}Ur.invert=function(kt,zt){return[kt/K(1-3*zt*zt/(I*I)),zt]};function ln(){return R.geoProjection(Ur).scale(152.63)}function Cn(kt,zt){var Qt=c(zt),cr=c(kt)*Qt,Sr=1-cr,gr=c(kt=u(E(kt)*Qt,-E(zt))),Nr=E(kt);return Qt=K(1-cr*cr),[Nr*Qt-gr*Sr,-gr*Qt-Nr*Sr]}Cn.invert=function(kt,zt){var Qt=(kt*kt+zt*zt)/-2,cr=K(-Qt*(2+Qt)),Sr=zt*Qt+kt*cr,gr=kt*Qt-zt*cr,Nr=K(gr*gr+Sr*Sr);return[u(cr*Sr,Nr*(1+Qt)),Nr?-$(cr*gr/Nr):0]};function Pn(){return R.geoProjection(Cn).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function vi(kt,zt){var Qt=Oe(kt,zt);return[(Qt[0]+kt/N)/2,(Qt[1]+zt)/2]}vi.invert=function(kt,zt){var Qt=kt,cr=zt,Sr=25;do{var gr=c(cr),Nr=E(cr),vn=E(2*cr),An=Nr*Nr,Ln=gr*gr,ai=E(Qt),ki=c(Qt/2),ra=E(Qt/2),oa=ra*ra,Ma=1-Ln*ki*ki,mo=Ma?Z(gr*ki)*K(ns=1/Ma):ns=0,ns,$o=.5*(2*mo*gr*ra+Qt/N)-kt,as=.5*(mo*Nr+cr)-zt,fl=.5*ns*(Ln*oa+mo*gr*ki*An)+.5/N,Zl=ns*(ai*vn/4-mo*Nr*ra),Fl=.125*ns*(vn*ra-mo*Nr*Ln*ai),Du=.5*ns*(An*ki+mo*oa*gr)+.5,qc=Zl*Fl-Du*fl,Gc=(as*Zl-$o*Du)/qc,_c=($o*Fl-as*fl)/qc;Qt-=Gc,cr-=_c}while((z(Gc)>g||z(_c)>g)&&--Sr>0);return[Qt,cr]};function Ui(){return R.geoProjection(vi).scale(158.837)}w.geoNaturalEarth=R.geoNaturalEarth1,w.geoNaturalEarthRaw=R.geoNaturalEarth1Raw,w.geoAiry=we,w.geoAiryRaw=fe,w.geoAitoff=ke,w.geoAitoffRaw=Oe,w.geoArmadillo=oe,w.geoArmadilloRaw=Le,w.geoAugust=_e,w.geoAugustRaw=be,w.geoBaker=se,w.geoBakerRaw=xe,w.geoBerghaus=Te,w.geoBerghausRaw=Ee,w.geoBertin1953=$t,w.geoBertin1953Raw=Rt,w.geoBoggs=Gt,w.geoBoggsRaw=xt,w.geoBonne=$r,w.geoBonneRaw=Pr,w.geoBottomley=kn,w.geoBottomleyRaw=rn,w.geoBromley=ci,w.geoBromleyRaw=Rn,w.geoChamberlin=je,w.geoChamberlinRaw=St,w.geoChamberlinAfrica=Et,w.geoCollignon=et,w.geoCollignonRaw=Ye,w.geoCraig=Nt,w.geoCraigRaw=mt,w.geoCraster=Or,w.geoCrasterRaw=br,w.geoCylindricalEqualArea=Jr,w.geoCylindricalEqualAreaRaw=tn,w.geoCylindricalStereographic=on,w.geoCylindricalStereographicRaw=dn,w.geoEckert1=Wi,w.geoEckert1Raw=Nn,w.geoEckert2=Da,w.geoEckert2Raw=Oa,w.geoEckert3=Ka,w.geoEckert3Raw=Aa,w.geoEckert4=no,w.geoEckert4Raw=Sa,w.geoEckert5=an,w.geoEckert5Raw=Fo,w.geoEckert6=nn,w.geoEckert6Raw=Hr,w.geoEisenlohr=Ai,w.geoEisenlohrRaw=$n,w.geoFahey=Ta,w.geoFaheyRaw=Ci,w.geoFoucaut=ro,w.geoFoucautRaw=Na,w.geoFoucautSinusoidal=xo,w.geoFoucautSinusoidalRaw=oo,w.geoGilbert=si,w.geoGingery=pi,w.geoGingeryRaw=ei,w.geoGinzburg4=Ri,w.geoGinzburg4Raw=fi,w.geoGinzburg5=Hi,w.geoGinzburg5Raw=$i,w.geoGinzburg6=gn,w.geoGinzburg6Raw=wr,w.geoGinzburg8=Yi,w.geoGinzburg8Raw=Xn,w.geoGinzburg9=Ca,w.geoGinzburg9Raw=ha,w.geoGringorten=No,w.geoGringortenRaw=ji,w.geoGuyou=ql,w.geoGuyouRaw=iu,w.geoHammer=at,w.geoHammerRaw=Be,w.geoHammerRetroazimuthal=Pf,w.geoHammerRetroazimuthalRaw=rc,w.geoHealpix=xf,w.geoHealpixRaw=dc,w.geoHill=Df,w.geoHillRaw=ed,w.geoHomolosine=wu,w.geoHomolosineRaw=$f,w.geoHufnagel=Bc,w.geoHufnagelRaw=Ad,w.geoHyperelliptical=Xu,w.geoHyperellipticalRaw=Tl,w.geoInterrupt=uu,w.geoInterruptedBoggs=op,w.geoInterruptedHomolosine=Qp,w.geoInterruptedMollweide=td,w.geoInterruptedMollweideHemispheres=Um,w.geoInterruptedSinuMollweide=om,w.geoInterruptedSinusoidal=o1,w.geoKavrayskiy7=xm,w.geoKavrayskiy7Raw=Of,w.geoLagrange=wp,w.geoLagrangeRaw=J0,w.geoLarrivee=sm,w.geoLarriveeRaw=Sp,w.geoLaskowski=lp,w.geoLaskowskiRaw=yd,w.geoLittrow=zf,w.geoLittrowRaw=Uc,w.geoLoximuthal=hv,w.geoLoximuthalRaw=jm,w.geoMiller=Bd,w.geoMillerRaw=og,w.geoModifiedStereographic=up,w.geoModifiedStereographicRaw=z1,w.geoModifiedStereographicAlaska=lm,w.geoModifiedStereographicGs48=Hh,w.geoModifiedStereographicGs50=Q0,w.geoModifiedStereographicMiller=sg,w.geoModifiedStereographicLee=a0,w.geoMollweide=st,w.geoMollweideRaw=Ft,w.geoMtFlatPolarParabolic=lg,w.geoMtFlatPolarParabolicRaw=o0,w.geoMtFlatPolarQuartic=ty,w.geoMtFlatPolarQuarticRaw=ey,w.geoMtFlatPolarSinusoidal=Cy,w.geoMtFlatPolarSinusoidalRaw=um,w.geoNaturalEarth2=_m,w.geoNaturalEarth2Raw=Vm,w.geoNellHammer=Rg,w.geoNellHammerRaw=cp,w.geoInterruptedQuarticAuthalic=Wf,w.geoNicolosi=B1,w.geoNicolosiRaw=E0,w.geoPatterson=tv,w.geoPattersonRaw=qm,w.geoPolyconic=Ud,w.geoPolyconicRaw=Mv,w.geoPolyhedral=Xg,w.geoPolyhedralButterfly=Rd,w.geoPolyhedralCollignon=ny,w.geoPolyhedralWaterman=Ld,w.geoProject=Np,w.geoGringortenQuincuncial=sn,w.geoPeirceQuincuncial=Fn,w.geoPierceQuincuncial=Fn,w.geoQuantize=Li,w.geoQuincuncial=iy,w.geoRectangularPolyconic=ma,w.geoRectangularPolyconicRaw=Si,w.geoRobinson=rs,w.geoRobinsonRaw=uo,w.geoSatellite=Bo,w.geoSatelliteRaw=Ws,w.geoSinuMollweide=gd,w.geoSinuMollweideRaw=Sl,w.geoSinusoidal=kr,w.geoSinusoidalRaw=Ut,w.geoStitch=rd,w.geoTimes=lc,w.geoTimesRaw=Wl,w.geoTwoPointAzimuthal=nv,w.geoTwoPointAzimuthalRaw=gf,w.geoTwoPointAzimuthalUsa=rv,w.geoTwoPointEquidistant=iv,w.geoTwoPointEquidistantRaw=vv,w.geoTwoPointEquidistantUsa=kg,w.geoVanDerGrinten=Sh,w.geoVanDerGrintenRaw=$m,w.geoVanDerGrinten2=Iu,w.geoVanDerGrinten2Raw=Wm,w.geoVanDerGrinten3=Ym,w.geoVanDerGrinten3Raw=Gu,w.geoVanDerGrinten4=kv,w.geoVanDerGrinten4Raw=Vv,w.geoWagner=Ae,w.geoWagner7=it,w.geoWagnerRaw=q,w.geoWagner4=yr,w.geoWagner4Raw=ar,w.geoWagner6=ln,w.geoWagner6Raw=Ur,w.geoWiechel=Pn,w.geoWiechelRaw=Cn,w.geoWinkel3=Ui,w.geoWinkel3Raw=vi,Object.defineProperty(w,"__esModule",{value:!0})})}}),yJe=U({"src/plots/geo/zoom.js"(pe,le){var w=Ze(),R=ii(),O=Mi(),z=Math.PI/180,l=180/Math.PI,u={cursor:"pointer"},c={cursor:"auto"};function p(S,M){var W=S.projection,$;return M._isScoped?$=h:M._isClipped?$=_:$=m,$(S,W)}le.exports=p;function f(S,M){return w.behavior.zoom().translate(M.translate()).scale(M.scale())}function v(S,M,W){var $=S.id,Z=S.graphDiv,K=Z.layout,Q=K[$],J=Z._fullLayout,G=J[$],ee={},re={};function fe(we,Oe){ee[$+"."+we]=R.nestedProperty(Q,we).get(),O.call("_storeDirectGUIEdit",K,J._preGUI,ee);var ke=R.nestedProperty(G,we);ke.get()!==Oe&&(ke.set(Oe),R.nestedProperty(Q,we).set(Oe),re[$+"."+we]=Oe)}W(fe),fe("projection.scale",M.scale()/S.fitScale),fe("fitbounds",!1),Z.emit("plotly_relayout",re)}function h(S,M){var W=f(S,M);function $(){w.select(this).style(u)}function Z(){M.scale(w.event.scale).translate(w.event.translate),S.render(!0);var J=M.invert(S.midPt);S.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":M.scale()/S.fitScale,"geo.center.lon":J[0],"geo.center.lat":J[1]})}function K(J){var G=M.invert(S.midPt);J("center.lon",G[0]),J("center.lat",G[1])}function Q(){w.select(this).style(c),v(S,M,K)}return W.on("zoomstart",$).on("zoom",Z).on("zoomend",Q),W}function m(S,M){var W=f(S,M),$=2,Z,K,Q,J,G,ee,re,fe,we;function Oe(he){return M.invert(he)}function ke(he){var De=Oe(he);if(!De)return!0;var xe=M(De);return Math.abs(xe[0]-he[0])>$||Math.abs(xe[1]-he[1])>$}function Le(){w.select(this).style(u),Z=w.mouse(this),K=M.rotate(),Q=M.translate(),J=K,G=Oe(Z)}function oe(){if(ee=w.mouse(this),ke(Z)){W.scale(M.scale()),W.translate(M.translate());return}M.scale(w.event.scale),M.translate([Q[0],w.event.translate[1]]),G?Oe(ee)&&(fe=Oe(ee),re=[J[0]+(fe[0]-G[0]),K[1],K[2]],M.rotate(re),J=re):(Z=ee,G=Oe(Z)),we=!0,S.render(!0);var he=M.rotate(),De=M.invert(S.midPt);S.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":M.scale()/S.fitScale,"geo.center.lon":De[0],"geo.center.lat":De[1],"geo.projection.rotation.lon":-he[0]})}function be(){w.select(this).style(c),we&&v(S,M,_e)}function _e(he){var De=M.rotate(),xe=M.invert(S.midPt);he("projection.rotation.lon",-De[0]),he("center.lon",xe[0]),he("center.lat",xe[1])}return W.on("zoomstart",Le).on("zoom",oe).on("zoomend",be),W}function _(S,M){M.rotate(),M.scale();var W=f(S,M),$=y(W,"zoomstart","zoom","zoomend"),Z=0,K=W.on,Q;W.on("zoomstart",function(){w.select(this).style(u);var fe=w.mouse(this),we=M.rotate(),Oe=we,ke=M.translate(),Le=A(we);Q=x(M,fe),K.call(W,"zoom",function(){var oe=w.mouse(this);if(M.scale(w.event.scale),!Q)fe=oe,Q=x(M,fe);else if(x(M,oe)){M.rotate(we).translate(ke);var be=x(M,oe),_e=D(Q,be),he=F(E(Le,_e)),De=g(he,Q,Oe);(!isFinite(De[0])||!isFinite(De[1])||!isFinite(De[2]))&&(De=Oe),M.rotate(De),Oe=De}G($.of(this,arguments))}),J($.of(this,arguments))}).on("zoomend",function(){w.select(this).style(c),K.call(W,"zoom",null),ee($.of(this,arguments)),v(S,M,re)}).on("zoom.redraw",function(){S.render(!0);var fe=M.rotate();S.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":M.scale()/S.fitScale,"geo.projection.rotation.lon":-fe[0],"geo.projection.rotation.lat":-fe[1]})});function J(fe){Z++||fe({type:"zoomstart"})}function G(fe){fe({type:"zoom"})}function ee(fe){--Z||fe({type:"zoomend"})}function re(fe){var we=M.rotate();fe("projection.rotation.lon",-we[0]),fe("projection.rotation.lat",-we[1])}return w.rebind(W,$,"on")}function x(S,M){var W=S.invert(M);return W&&isFinite(W[0])&&isFinite(W[1])&&k(W)}function A(S){var M=.5*S[0]*z,W=.5*S[1]*z,$=.5*S[2]*z,Z=Math.sin(M),K=Math.cos(M),Q=Math.sin(W),J=Math.cos(W),G=Math.sin($),ee=Math.cos($);return[K*J*ee+Z*Q*G,Z*J*ee-K*Q*G,K*Q*ee+Z*J*G,K*J*G-Z*Q*ee]}function E(S,M){var W=S[0],$=S[1],Z=S[2],K=S[3],Q=M[0],J=M[1],G=M[2],ee=M[3];return[W*Q-$*J-Z*G-K*ee,W*J+$*Q+Z*ee-K*G,W*G-$*ee+Z*Q+K*J,W*ee+$*G-Z*J+K*Q]}function D(S,M){if(!(!S||!M)){var W=T(S,M),$=Math.sqrt(P(W,W)),Z=.5*Math.acos(Math.max(-1,Math.min(1,P(S,M)))),K=Math.sin(Z)/$;return $&&[Math.cos(Z),W[2]*K,-W[1]*K,W[0]*K]}}function g(S,M,W){var $=N(M,2,S[0]);$=N($,1,S[1]),$=N($,0,S[2]-W[2]);var Z=M[0],K=M[1],Q=M[2],J=$[0],G=$[1],ee=$[2],re=Math.atan2(K,Z)*l,fe=Math.sqrt(Z*Z+K*K),we,Oe;Math.abs(G)>fe?(Oe=(G>0?90:-90)-re,we=0):(Oe=Math.asin(G/fe)*l-re,we=Math.sqrt(fe*fe-G*G));var ke=180-Oe-2*re,Le=(Math.atan2(ee,J)-Math.atan2(Q,we))*l,oe=(Math.atan2(ee,J)-Math.atan2(Q,-we))*l,be=C(W[0],W[1],Oe,Le),_e=C(W[0],W[1],ke,oe);return be<=_e?[Oe,Le,W[2]]:[ke,oe,W[2]]}function C(S,M,W,$){var Z=I(W-S),K=I($-M);return Math.sqrt(Z*Z+K*K)}function I(S){return(S%360+540)%360-180}function N(S,M,W){var $=W*z,Z=S.slice(),K=M===0?1:0,Q=M===2?1:2,J=Math.cos($),G=Math.sin($);return Z[K]=S[K]*J-S[Q]*G,Z[Q]=S[Q]*J+S[K]*G,Z}function F(S){return[Math.atan2(2*(S[0]*S[1]+S[2]*S[3]),1-2*(S[1]*S[1]+S[2]*S[2]))*l,Math.asin(Math.max(-1,Math.min(1,2*(S[0]*S[2]-S[3]*S[1]))))*l,Math.atan2(2*(S[0]*S[3]+S[1]*S[2]),1-2*(S[2]*S[2]+S[3]*S[3]))*l]}function k(S){var M=S[0]*z,W=S[1]*z,$=Math.cos(W);return[$*Math.cos(M),$*Math.sin(M),Math.sin(W)]}function P(S,M){for(var W=0,$=0,Z=S.length;$<Z;++$)W+=S[$]*M[$];return W}function T(S,M){return[S[1]*M[2]-S[2]*M[1],S[2]*M[0]-S[0]*M[2],S[0]*M[1]-S[1]*M[0]]}function y(S){for(var M=0,W=arguments.length,$=[];++M<W;)$.push(arguments[M]);var Z=w.dispatch.apply(null,$);return Z.of=function(K,Q){return function(J){var G;try{G=J.sourceEvent=w.event,J.target=S,w.event=J,Z[J.type].apply(K,Q)}finally{w.event=G}}},Z}}}),bJe=U({"src/plots/geo/geo.js"(pe,le){var w=Ze(),R=Nbe(),O=R.geoPath,z=R.geoDistance,l=gJe(),u=Mi(),c=ii(),p=c.strTranslate,f=Lr(),v=ec(),h=Dp(),m=tp(),_=Yu(),x=gx().getAutoRange,A=Vp(),E=Vf().prepSelect,D=Vf().clearOutline,g=Vf().selectOnClick,C=yJe(),I=BU(),N=q4(),F=tK(),k=Dbe().feature;function P(W){this.id=W.id,this.graphDiv=W.graphDiv,this.container=W.container,this.topojsonURL=W.topojsonURL,this.isStatic=W.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 T=P.prototype;le.exports=function($){return new P($)},T.plot=function(W,$,Z,K){var Q=this;if(K)return Q.update(W,$,!0);Q._geoCalcData=W,Q._fullLayout=$;var J=$[this.id],G=[],ee=!1;for(var re in I.layerNameToAdjective)if(re!=="frame"&&J["show"+re]){ee=!0;break}for(var fe=!1,we=0;we<W.length;we++){var Oe=W[0][0].trace;Oe._geo=Q,Oe.locationmode&&(ee=!0);var ke=Oe.marker;if(ke){var Le=ke.angle,oe=ke.angleref;(Le||oe==="north"||oe==="previous")&&(fe=!0)}}if(this._hasMarkerAngles=fe,ee){var be=F.getTopojsonName(J);(Q.topojson===null||be!==Q.topojsonName)&&(Q.topojsonName=be,PlotlyGeoAssets.topojson[Q.topojsonName]===void 0&&G.push(Q.fetchTopojson()))}G=G.concat(N.fetchTraceGeoData(W)),Z.push(new Promise(function(_e,he){Promise.all(G).then(function(){Q.topojson=PlotlyGeoAssets.topojson[Q.topojsonName],Q.update(W,$),_e()}).catch(he)}))},T.fetchTopojson=function(){var W=this,$=F.getTopojsonPath(W.topojsonURL,W.topojsonName);return new Promise(function(Z,K){w.json($,function(Q,J){if(Q)return Q.status===404?K(new Error(["plotly.js could not find topojson file at",$+".","Make sure the *topojsonURL* plot config option","is set properly."].join(" "))):K(new Error(["unexpected error while fetching topojson file at",$].join(" ")));PlotlyGeoAssets.topojson[W.topojsonName]=J,Z()})})},T.update=function(W,$,Z){var K=$[this.id];this.hasChoropleth=!1;for(var Q=0;Q<W.length;Q++){var J=W[Q],G=J[0].trace;G.type==="choropleth"&&(this.hasChoropleth=!0),G.visible===!0&&G._length>0&&G._module.calcGeoJSON(J,$)}if(!Z){var ee=this.updateProjection(W,$);if(ee)return;(!this.viewInitial||this.scope!==K.scope)&&this.saveViewInitial(K)}this.scope=K.scope,this.updateBaseLayers($,K),this.updateDims($,K),this.updateFx($,K),m.generalUpdatePerTraceModule(this.graphDiv,this,W,K);var re=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=re.selectAll(".point"),this.dataPoints.text=re.selectAll("text"),this.dataPaths.line=re.selectAll(".js-line");var fe=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=fe.selectAll("path"),this._render()},T.updateProjection=function(W,$){var Z=this.graphDiv,K=$[this.id],Q=$._size,J=K.domain,G=K.projection,ee=K.lonaxis,re=K.lataxis,fe=ee._ax,we=re._ax,Oe=this.projection=y(K),ke=[[Q.l+Q.w*J.x[0],Q.t+Q.h*(1-J.y[1])],[Q.l+Q.w*J.x[1],Q.t+Q.h*(1-J.y[0])]],Le=K.center||{},oe=G.rotation||{},be=ee.range||[],_e=re.range||[];if(K.fitbounds){fe._length=ke[1][0]-ke[0][0],we._length=ke[1][1]-ke[0][1],fe.range=x(Z,fe),we.range=x(Z,we);var he=(fe.range[0]+fe.range[1])/2,De=(we.range[0]+we.range[1])/2;if(K._isScoped)Le={lon:he,lat:De};else if(K._isClipped){Le={lon:he,lat:De},oe={lon:he,lat:De,roll:oe.roll};var xe=G.type,se=I.lonaxisSpan[xe]/2||180,Ee=I.lataxisSpan[xe]/2||90;be=[he-se,he+se],_e=[De-Ee,De+Ee]}else Le={lon:he,lat:De},oe={lon:he,lat:oe.lat,roll:oe.roll}}Oe.center([Le.lon-oe.lon,Le.lat-oe.lat]).rotate([-oe.lon,-oe.lat,oe.roll]).parallels(G.parallels);var Te=M(be,_e);Oe.fitExtent(ke,Te);var Be=this.bounds=Oe.getBounds(Te),tt=this.fitScale=Oe.scale(),at=Oe.translate();if(K.fitbounds){var gt=Oe.getBounds(M(fe.range,we.range)),pt=Math.min((Be[1][0]-Be[0][0])/(gt[1][0]-gt[0][0]),(Be[1][1]-Be[0][1])/(gt[1][1]-gt[0][1]));isFinite(pt)?Oe.scale(pt*tt):c.warn("Something went wrong during"+this.id+"fitbounds computations.")}else Oe.scale(G.scale*tt);var Rt=this.midPt=[(Be[0][0]+Be[1][0])/2,(Be[0][1]+Be[1][1])/2];if(Oe.translate([at[0]+(Rt[0]-at[0]),at[1]+(Rt[1]-at[1])]).clipExtent(Be),K._isAlbersUsa){var $t=Oe([Le.lon,Le.lat]),Wt=Oe.translate();Oe.translate([Wt[0]-($t[0]-Wt[0]),Wt[1]-($t[1]-Wt[1])])}},T.updateBaseLayers=function(W,$){var Z=this,K=Z.topojson,Q=Z.layers,J=Z.basePaths;function G(ke){return ke==="lonaxis"||ke==="lataxis"}function ee(ke){return!!I.lineLayers[ke]}function re(ke){return!!I.fillLayers[ke]}var fe=this.hasChoropleth?I.layersForChoropleth:I.layers,we=fe.filter(function(ke){return ee(ke)||re(ke)?$["show"+ke]:G(ke)?$[ke].showgrid:!0}),Oe=Z.framework.selectAll(".layer").data(we,String);Oe.exit().each(function(ke){delete Q[ke],delete J[ke],w.select(this).remove()}),Oe.enter().append("g").attr("class",function(ke){return"layer "+ke}).each(function(ke){var Le=Q[ke]=w.select(this);ke==="bg"?Z.bgRect=Le.append("rect").style("pointer-events","all"):G(ke)?J[ke]=Le.append("path").style("fill","none"):ke==="backplot"?Le.append("g").classed("choroplethlayer",!0):ke==="frontplot"?Le.append("g").classed("scatterlayer",!0):ee(ke)?J[ke]=Le.append("path").style("fill","none").style("stroke-miterlimit",2):re(ke)&&(J[ke]=Le.append("path").style("stroke","none"))}),Oe.order(),Oe.each(function(ke){var Le=J[ke],oe=I.layerNameToAdjective[ke];ke==="frame"?Le.datum(I.sphereSVG):ee(ke)||re(ke)?Le.datum(k(K,K.objects[ke])):G(ke)&&Le.datum(S(ke,$,W)).call(f.stroke,$[ke].gridcolor).call(v.dashLine,$[ke].griddash,$[ke].gridwidth),ee(ke)?Le.call(f.stroke,$[oe+"color"]).call(v.dashLine,"",$[oe+"width"]):re(ke)&&Le.call(f.fill,$[oe+"color"])})},T.updateDims=function(W,$){var Z=this.bounds,K=($.framewidth||0)/2,Q=Z[0][0]-K,J=Z[0][1]-K,G=Z[1][0]-Q+K,ee=Z[1][1]-J+K;v.setRect(this.clipRect,Q,J,G,ee),this.bgRect.call(v.setRect,Q,J,G,ee).call(f.fill,$.bgcolor),this.xaxis._offset=Q,this.xaxis._length=G,this.yaxis._offset=J,this.yaxis._length=ee},T.updateFx=function(W,$){var Z=this,K=Z.graphDiv,Q=Z.bgRect,J=W.dragmode,G=W.clickmode;if(Z.isStatic)return;function ee(){var Oe=Z.viewInitial,ke={};for(var Le in Oe)ke[Z.id+"."+Le]=Oe[Le];u.call("_guiRelayout",K,ke),K.emit("plotly_doubleclick",null)}function re(Oe){return Z.projection.invert([Oe[0]+Z.xaxis._offset,Oe[1]+Z.yaxis._offset])}var fe=function(Oe,ke){if(ke.isRect){var Le=Oe.range={};Le[Z.id]=[re([ke.xmin,ke.ymin]),re([ke.xmax,ke.ymax])]}else{var oe=Oe.lassoPoints={};oe[Z.id]=ke.map(re)}},we={element:Z.bgRect.node(),gd:K,plotinfo:{id:Z.id,xaxis:Z.xaxis,yaxis:Z.yaxis,fillRangeItems:fe},xaxes:[Z.xaxis],yaxes:[Z.yaxis],subplot:Z.id,clickFn:function(Oe){Oe===2&&D(K)}};J==="pan"?(Q.node().onmousedown=null,Q.call(C(Z,$)),Q.on("dblclick.zoom",ee),K._context._scrollZoom.geo||Q.on("wheel.zoom",null)):(J==="select"||J==="lasso")&&(Q.on(".zoom",null),we.prepFn=function(Oe,ke,Le){E(Oe,ke,Le,we,J)},A.init(we)),Q.on("mousemove",function(){var Oe=Z.projection.invert(c.getPositionFromD3Event());if(!Oe)return A.unhover(K,w.event);Z.xaxis.p2c=function(){return Oe[0]},Z.yaxis.p2c=function(){return Oe[1]},h.hover(K,w.event,Z.id)}),Q.on("mouseout",function(){K._dragging||A.unhover(K,w.event)}),Q.on("click",function(){J!=="select"&&J!=="lasso"&&(G.indexOf("select")>-1&&g(w.event,K,[Z.xaxis],[Z.yaxis],Z.id,we),G.indexOf("event")>-1&&h.click(K,w.event))})},T.makeFramework=function(){var W=this,$=W.graphDiv,Z=$._fullLayout,K="clip"+Z._uid+W.id;W.clipDef=Z._clips.append("clipPath").attr("id",K),W.clipRect=W.clipDef.append("rect"),W.framework=w.select(W.container).append("g").attr("class","geo "+W.id).call(v.setClipUrl,K,$),W.project=function(Q){var J=W.projection(Q);return J?[J[0]-W.xaxis._offset,J[1]-W.yaxis._offset]:[null,null]},W.xaxis={_id:"x",c2p:function(Q){return W.project(Q)[0]}},W.yaxis={_id:"y",c2p:function(Q){return W.project(Q)[1]}},W.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},_.setConvert(W.mockAxis,Z)},T.saveViewInitial=function(W){var $=W.center||{},Z=W.projection,K=Z.rotation||{};this.viewInitial={fitbounds:W.fitbounds,"projection.scale":Z.scale};var Q;W._isScoped?Q={"center.lon":$.lon,"center.lat":$.lat}:W._isClipped?Q={"projection.rotation.lon":K.lon,"projection.rotation.lat":K.lat}:Q={"center.lon":$.lon,"center.lat":$.lat,"projection.rotation.lon":K.lon},c.extendFlat(this.viewInitial,Q)},T.render=function(W){this._hasMarkerAngles&&W?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},T._render=function(){var W=this.projection,$=W.getPath(),Z;function K(J){var G=W(J.lonlat);return G?p(G[0],G[1]):null}function Q(J){return W.isLonLatOverEdges(J.lonlat)?"none":null}for(Z in this.basePaths)this.basePaths[Z].attr("d",$);for(Z in this.dataPaths)this.dataPaths[Z].attr("d",function(J){return $(J.geojson)});for(Z in this.dataPoints)this.dataPoints[Z].attr("display",Q).attr("transform",K)};function y(W){var $=W.projection,Z=$.type,K=I.projNames[Z];K="geo"+c.titleCase(K);for(var Q=R[K]||l[K],J=Q(),G=W._isSatellite?Math.acos(1/$.distance)*180/Math.PI:W._isClipped?I.lonaxisSpan[Z]/2:null,ee=["center","rotate","parallels","clipExtent"],re=function(Oe){return Oe?J:[]},fe=0;fe<ee.length;fe++){var we=ee[fe];typeof J[we]!="function"&&(J[we]=re)}return J.isLonLatOverEdges=function(Oe){if(J(Oe)===null)return!0;if(G){var ke=J.rotate(),Le=z(Oe,[-ke[0],-ke[1]]),oe=G*Math.PI/180;return Le>oe}else return!1},J.getPath=function(){return O().projection(J)},J.getBounds=function(Oe){return J.getPath().bounds(Oe)},J.precision(I.precision),W._isSatellite&&J.tilt($.tilt).distance($.distance),G&&J.clipAngle(G-I.clipPad),J}function S(W,$,Z){var K=1e-6,Q=2.5,J=$[W],G=I.scopeDefaults[$.scope],ee,re,fe;W==="lonaxis"?(ee=G.lonaxisRange,re=G.lataxisRange,fe=function(De,xe){return[De,xe]}):W==="lataxis"&&(ee=G.lataxisRange,re=G.lonaxisRange,fe=function(De,xe){return[xe,De]});var we={type:"linear",range:[ee[0],ee[1]-K],tick0:J.tick0,dtick:J.dtick};_.setConvert(we,Z);var Oe=_.calcTicks(we);!$.isScoped&&W==="lonaxis"&&Oe.pop();for(var ke=Oe.length,Le=new Array(ke),oe=0;oe<ke;oe++)for(var be=Oe[oe].x,_e=Le[oe]=[],he=re[0];he<re[1]+Q;he+=Q)_e.push(fe(be,he));return{type:"MultiLineString",coordinates:Le}}function M(W,$){var Z=I.clipPad,K=W[0]+Z,Q=W[1]-Z,J=$[0]+Z,G=$[1]-Z;K>0&&Q<0&&(Q+=360);var ee=(Q-K)/4;return{type:"Polygon",coordinates:[[[K,J],[K,G],[K+ee,G],[K+2*ee,G],[K+3*ee,G],[Q,G],[Q,J],[Q-ee,J],[Q-2*ee,J],[Q-3*ee,J],[K,J]]]}}}}),Fbe=U({"src/plots/geo/layout_attributes.js"(pe,le){var w=jn(),R=oh().attributes,O=jl().dash,z=BU(),l=zl().overrideAll,u=pa(),c={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:w.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:O},p=le.exports=l({domain:R({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:u(z.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:u(z.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:w.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:z.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:z.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:z.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:z.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:w.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:w.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:w.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:w.background},lonaxis:c,lataxis:c},"plot","from-root");p.uirevision={valType:"any",editType:"none"}}}),xJe=U({"src/plots/geo/layout_defaults.js"(pe,le){var w=ii(),R=cS(),O=Om().getSubplotData,z=BU(),l=Fbe(),u=z.axesNames;le.exports=function(f,v,h){R(f,v,h,{type:"geo",attributes:l,handleDefaults:c,fullData:h,partition:"y"})};function c(p,f,v,h){var m=O(h.fullData,"geo",h.id),_=m.map(function(_e){return _e.index}),x=v("resolution"),A=v("scope"),E=z.scopeDefaults[A],D=v("projection.type",E.projType),g=f._isAlbersUsa=D==="albers usa";g&&(A=f.scope="usa");var C=f._isScoped=A!=="world",I=f._isSatellite=D==="satellite",N=f._isConic=D.indexOf("conic")!==-1||D==="albers",F=f._isClipped=!!z.lonaxisSpan[D];if(p.visible===!1){var k=w.extendDeep({},f._template);k.showcoastlines=!1,k.showcountries=!1,k.showframe=!1,k.showlakes=!1,k.showland=!1,k.showocean=!1,k.showrivers=!1,k.showsubunits=!1,k.lonaxis&&(k.lonaxis.showgrid=!1),k.lataxis&&(k.lataxis.showgrid=!1),f._template=k}for(var P=v("visible"),T,y=0;y<u.length;y++){var S=u[y],M=[30,10][y],W;if(C)W=E[S+"Range"];else{var $=z[S+"Span"],Z=($[D]||$["*"])/2,K=v("projection.rotation."+S.substr(0,3),E.projRotate[y]);W=[K-Z,K+Z]}var Q=v(S+".range",W);v(S+".tick0"),v(S+".dtick",M),T=v(S+".showgrid",P?void 0:!1),T&&(v(S+".gridcolor"),v(S+".gridwidth"),v(S+".griddash")),f[S]._ax={type:"linear",_id:S.slice(0,3),_traceIndices:_,setScale:w.identity,c2l:w.identity,r2l:w.identity,autorange:!0,range:Q.slice(),_m:1,_input:{}}}var J=f.lonaxis.range,G=f.lataxis.range,ee=J[0],re=J[1];ee>0&&re<0&&(re+=360);var fe=(ee+re)/2,we;if(!g){var Oe=C?E.projRotate:[fe,0,0];we=v("projection.rotation.lon",Oe[0]),v("projection.rotation.lat",Oe[1]),v("projection.rotation.roll",Oe[2]),T=v("showcoastlines",!C&&P),T&&(v("coastlinecolor"),v("coastlinewidth")),T=v("showocean",P?void 0:!1),T&&v("oceancolor")}var ke,Le;if(g?(ke=-96.6,Le=38.7):(ke=C?fe:we,Le=(G[0]+G[1])/2),v("center.lon",ke),v("center.lat",Le),I&&(v("projection.tilt"),v("projection.distance")),N){var oe=E.projParallels||[0,60];v("projection.parallels",oe)}v("projection.scale"),T=v("showland",P?void 0:!1),T&&v("landcolor"),T=v("showlakes",P?void 0:!1),T&&v("lakecolor"),T=v("showrivers",P?void 0:!1),T&&(v("rivercolor"),v("riverwidth")),T=v("showcountries",C&&A!=="usa"&&P),T&&(v("countrycolor"),v("countrywidth")),(A==="usa"||A==="north america"&&x===50)&&(v("showsubunits",P),v("subunitcolor"),v("subunitwidth")),C||(T=v("showframe",P),T&&(v("framecolor"),v("framewidth"))),v("bgcolor");var be=v("fitbounds");be&&(delete f.projection.scale,C?(delete f.center.lon,delete f.center.lat):F?(delete f.center.lon,delete f.center.lat,delete f.projection.rotation.lon,delete f.projection.rotation.lat,delete f.lonaxis.range,delete f.lataxis.range):(delete f.center.lon,delete f.center.lat,delete f.projection.rotation.lon))}}}),zbe=U({"src/plots/geo/index.js"(pe,le){var w=Om().getSubplotCalcData,R=ii().counterRegex,O=bJe(),z="geo",l=R(z),u={};u[z]={valType:"subplotid",dflt:z,editType:"calc"};function c(v){for(var h=v._fullLayout,m=v.calcdata,_=h._subplots[z],x=0;x<_.length;x++){var A=_[x],E=w(m,z,A),D=h[A],g=D._subplot;g||(g=O({id:A,graphDiv:v,container:h._geolayer.node(),topojsonURL:v._context.topojsonURL,staticPlot:v._context.staticPlot}),h[A]._subplot=g),g.plot(E,h,v._promises)}}function p(v,h,m,_){for(var x=_._subplots[z]||[],A=0;A<x.length;A++){var E=x[A],D=_[E]._subplot;!h[E]&&D&&(D.framework.remove(),D.clipDef.remove())}}function f(v){for(var h=v._fullLayout,m=h._subplots[z],_=0;_<m.length;_++){var x=h[m[_]],A=x._subplot;A.updateFx(h,x)}}le.exports={attr:z,name:z,idRoot:z,idRegex:l,attrRegex:l,attributes:u,layoutAttributes:Fbe(),supplyLayoutDefaults:xJe(),plot:c,updateFx:f,clean:p}}}),_Je=U({"src/traces/scattergeo/index.js"(pe,le){le.exports={attributes:C6(),supplyDefaults:lJe(),colorbar:qg(),formatLabels:uJe(),calc:eK(),calcGeoJSON:Obe().calcGeoJSON,plot:Obe().plot,style:Lbe(),styleOnSelect:z0().styleOnSelect,hoverPoints:pJe(),eventData:vJe(),selectPoints:mJe(),moduleType:"trace",name:"scattergeo",basePlotModule:zbe(),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}}}),wJe=U({"lib/scattergeo.js"(pe,le){le.exports=_Je()}}),zF=U({"src/traces/choropleth/attributes.js"(pe,le){var w=Js().hovertemplateAttrs,R=C6(),O=Jd(),z=Jn(),l=jn().defaultLine,u=Ar().extendFlat,c=R.marker.line;le.exports=u({locations:{valType:"data_array",editType:"calc"},locationmode:R.locationmode,z:{valType:"data_array",editType:"calc"},geojson:u({},R.geojson,{}),featureidkey:R.featureidkey,text:u({},R.text,{}),hovertext:u({},R.hovertext,{}),marker:{line:{color:u({},c.color,{dflt:l}),width:u({},c.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:R.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:R.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:u({},z.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:w(),showlegend:u({},z.showlegend,{dflt:!1})},O("",{cLetter:"z",editTypeOverride:"calc"}))}}),SJe=U({"src/traces/choropleth/defaults.js"(pe,le){var w=ii(),R=wg(),O=zF(),z=["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(" ");le.exports=function(u,c,p,f){function v(D,g){return w.coerce(u,c,O,D,g)}var h=v("locations"),m=v("z");if(!(h&&h.length&&w.isArrayOrTypedArray(m)&&m.length)){c.visible=!1;return}c._length=Math.min(h.length,m.length);var _=v("geojson"),x;(typeof _=="string"&&_!==""||w.isPlainObject(_))&&(x="geojson-id");var A=v("locationmode",x);A==="country names"&&w.warn(z),A==="geojson-id"&&v("featureidkey"),v("text"),v("hovertext"),v("hovertemplate");var E=v("marker.line.width");E&&v("marker.line.color"),v("marker.opacity"),R(u,c,f,v,{prefix:"",cLetter:"z"}),w.coerceSelectionMarkerOpacity(c,v)}}}),iK=U({"src/traces/choropleth/calc.js"(pe,le){var w=_t(),R=Dt().BADNUM,O=t0(),z=zm(),l=k1();function u(c){return c&&typeof c=="string"}le.exports=function(p,f){var v=f._length,h=new Array(v),m;f.geojson?m=function(D){return u(D)||w(D)}:m=u;for(var _=0;_<v;_++){var x=h[_]={},A=f.locations[_],E=f.z[_];m(A)&&w(E)?(x.loc=A,x.z=E):(x.loc=null,x.z=R),x.index=_}return z(h,f),O(p,f,{vals:f.z,containerStr:"",cLetter:"z"}),l(h,f),h}}}),aK=U({"src/traces/choropleth/style.js"(pe,le){var w=Ze(),R=Lr(),O=ec(),z=vd();function l(p,f){f&&u(p,f)}function u(p,f){var v=f[0].trace,h=f[0].node3,m=h.selectAll(".choroplethlocation"),_=v.marker||{},x=_.line||{},A=z.makeColorScaleFuncFromTrace(v);m.each(function(E){w.select(this).attr("fill",A(E.z)).call(R.stroke,E.mlc||x.color).call(O.dashLine,"",E.mlw||x.width||0).style("opacity",_.opacity)}),O.selectedPointStyle(m,v)}function c(p,f){var v=f[0].node3,h=f[0].trace;h.selectedpoints?O.selectedPointStyle(v.selectAll(".choroplethlocation"),h):u(p,f)}le.exports={style:l,styleOnSelect:c}}}),Bbe=U({"src/traces/choropleth/plot.js"(pe,le){var w=Ze(),R=ii(),O=q4(),z=tK().getTopojsonFeatures,l=gx().findExtremes,u=aK().style;function c(f,v,h){var m=v.layers.backplot.select(".choroplethlayer");R.makeTraceGroups(m,h,"trace choropleth").each(function(_){var x=w.select(this),A=x.selectAll("path.choroplethlocation").data(R.identity);A.enter().append("path").classed("choroplethlocation",!0),A.exit().remove(),u(f,_)})}function p(f,v){for(var h=f[0].trace,m=v[h.geo],_=m._subplot,x=h.locationmode,A=h._length,E=x==="geojson-id"?O.extractTraceFeature(f):z(h,_.topojson),D=[],g=[],C=0;C<A;C++){var I=f[C],N=x==="geojson-id"?I.fOut:O.locationToFeature(x,I.loc,E);if(N){I.geojson=N,I.ct=N.properties.ct,I._polygons=O.feature2polygons(N);var F=O.computeBbox(N);D.push(F[0],F[2]),g.push(F[1],F[3])}else I.geojson=null}if(m.fitbounds==="geojson"&&x==="geojson-id"){var k=O.computeBbox(O.getTraceGeojson(h));D=[k[0],k[2]],g=[k[1],k[3]]}var P={padded:!0};h._extremes.lon=l(m.lonaxis._ax,D,P),h._extremes.lat=l(m.lataxis._ax,g,P)}le.exports={calcGeoJSON:p,plot:c}}}),oK=U({"src/traces/choropleth/hover.js"(pe,le){var w=Yu(),R=zF(),O=ii().fillText;le.exports=function(u,c,p){var f=u.cd,v=f[0].trace,h=u.subplot,m,_,x,A,E=[c,p],D=[c+360,p];for(_=0;_<f.length;_++)if(m=f[_],A=!1,m._polygons){for(x=0;x<m._polygons.length;x++)m._polygons[x].contains(E)&&(A=!A),m._polygons[x].contains(D)&&(A=!A);if(A)break}if(!(!A||!m))return u.x0=u.x1=u.xa.c2p(m.ct),u.y0=u.y1=u.ya.c2p(m.ct),u.index=m.index,u.location=m.loc,u.z=m.z,u.zLabel=w.tickText(h.mockAxis,h.mockAxis.c2l(m.z),"hover").text,u.hovertemplate=m.hovertemplate,z(u,v,m),[u]};function z(l,u,c){if(!u.hovertemplate){var p=c.hi||u.hoverinfo,f=String(c.loc),v=p==="all"?R.hoverinfo.flags:p.split("+"),h=v.indexOf("name")!==-1,m=v.indexOf("location")!==-1,_=v.indexOf("z")!==-1,x=v.indexOf("text")!==-1,A=!h&&m,E=[];A?l.nameOverride=f:(h&&(l.nameOverride=u.name),m&&E.push(f)),_&&E.push(l.zLabel),x&&O(c,u,E),l.extraText=E.join("<br>")}}}}),sK=U({"src/traces/choropleth/event_data.js"(pe,le){le.exports=function(R,O,z,l,u){R.location=O.location,R.z=O.z;var c=l[u];return c.fIn&&c.fIn.properties&&(R.properties=c.fIn.properties),R.ct=c.ct,R}}}),lK=U({"src/traces/choropleth/select.js"(pe,le){le.exports=function(R,O){var z=R.cd,l=R.xaxis,u=R.yaxis,c=[],p,f,v,h,m;if(O===!1)for(p=0;p<z.length;p++)z[p].selected=0;else for(p=0;p<z.length;p++)f=z[p],v=f.ct,v&&(h=l.c2p(v),m=u.c2p(v),O.contains([h,m],null,p,R)?(c.push({pointNumber:p,lon:v[0],lat:v[1]}),f.selected=1):f.selected=0);return c}}}),TJe=U({"src/traces/choropleth/index.js"(pe,le){le.exports={attributes:zF(),supplyDefaults:SJe(),colorbar:rw(),calc:iK(),calcGeoJSON:Bbe().calcGeoJSON,plot:Bbe().plot,style:aK().style,styleOnSelect:aK().styleOnSelect,hoverPoints:oK(),eventData:sK(),selectPoints:lK(),moduleType:"trace",name:"choropleth",basePlotModule:zbe(),categories:["geo","noOpacity","showLegend"],meta:{}}}}),EJe=U({"lib/choropleth.js"(pe,le){le.exports=TJe()}}),uK=U({"src/traces/scattergl/hover.js"(pe,le){var w=Mi(),R=ii(),O=ng();function z(u,c,p,f){var v=u.cd,h=v[0].t,m=v[0].trace,_=u.xa,x=u.ya,A=h.x,E=h.y,D=_.c2p(c),g=x.c2p(p),C=u.distance,I;if(h.tree){var N=_.p2c(D-C),F=_.p2c(D+C),k=x.p2c(g-C),P=x.p2c(g+C);f==="x"?I=h.tree.range(Math.min(N,F),Math.min(x._rl[0],x._rl[1]),Math.max(N,F),Math.max(x._rl[0],x._rl[1])):I=h.tree.range(Math.min(N,F),Math.min(k,P),Math.max(N,F),Math.max(k,P))}else I=h.ids;var T,y,S,M,W,$,Z,K,Q,J=C;if(f==="x"){var G=!!m.xperiodalignment,ee=!!m.yperiodalignment;for(W=0;W<I.length;W++){if(T=I[W],S=A[T],$=Math.abs(_.c2p(S)-D),G){var re=_.c2p(m._xStarts[T]),fe=_.c2p(m._xEnds[T]);$=D>=Math.min(re,fe)&&D<=Math.max(re,fe)?0:1/0}if($<J){if(J=$,M=E[T],Z=x.c2p(M)-g,ee){var we=x.c2p(m._yStarts[T]),Oe=x.c2p(m._yEnds[T]);Z=g>=Math.min(we,Oe)&&g<=Math.max(we,Oe)?0:1/0}Q=Math.sqrt($*$+Z*Z),y=I[W]}}}else for(W=I.length-1;W>-1;W--)T=I[W],S=A[T],M=E[T],$=_.c2p(S)-D,Z=x.c2p(M)-g,K=Math.sqrt($*$+Z*Z),K<J&&(J=Q=K,y=T);return u.index=y,u.distance=J,u.dxy=Q,y===void 0?[u]:[l(u,A,E,m)]}function l(u,c,p,f){var v=u.xa,h=u.ya,m=u.distance,_=u.dxy,x=u.index,A={pointNumber:x,x:c[x],y:p[x]};A.tx=R.isArrayOrTypedArray(f.text)?f.text[x]:f.text,A.htx=Array.isArray(f.hovertext)?f.hovertext[x]:f.hovertext,A.data=Array.isArray(f.customdata)?f.customdata[x]:f.customdata,A.tp=Array.isArray(f.textposition)?f.textposition[x]:f.textposition;var E=f.textfont;E&&(A.ts=R.isArrayOrTypedArray(E.size)?E.size[x]:E.size,A.tc=R.isArrayOrTypedArray(E.color)?E.color[x]:E.color,A.tf=Array.isArray(E.family)?E.family[x]:E.family,A.tw=Array.isArray(E.weight)?E.weight[x]:E.weight,A.ty=Array.isArray(E.style)?E.style[x]:E.style,A.tv=Array.isArray(E.variant)?E.variant[x]:E.variant);var D=f.marker;D&&(A.ms=R.isArrayOrTypedArray(D.size)?D.size[x]:D.size,A.mo=R.isArrayOrTypedArray(D.opacity)?D.opacity[x]:D.opacity,A.mx=R.isArrayOrTypedArray(D.symbol)?D.symbol[x]:D.symbol,A.ma=R.isArrayOrTypedArray(D.angle)?D.angle[x]:D.angle,A.mc=R.isArrayOrTypedArray(D.color)?D.color[x]:D.color);var g=D&&D.line;g&&(A.mlc=Array.isArray(g.color)?g.color[x]:g.color,A.mlw=R.isArrayOrTypedArray(g.width)?g.width[x]:g.width);var C=D&&D.gradient;C&&C.type!=="none"&&(A.mgt=Array.isArray(C.type)?C.type[x]:C.type,A.mgc=Array.isArray(C.color)?C.color[x]:C.color);var I=v.c2p(A.x,!0),N=h.c2p(A.y,!0),F=A.mrc||1,k=f.hoverlabel;k&&(A.hbg=Array.isArray(k.bgcolor)?k.bgcolor[x]:k.bgcolor,A.hbc=Array.isArray(k.bordercolor)?k.bordercolor[x]:k.bordercolor,A.hts=R.isArrayOrTypedArray(k.font.size)?k.font.size[x]:k.font.size,A.htc=Array.isArray(k.font.color)?k.font.color[x]:k.font.color,A.htf=Array.isArray(k.font.family)?k.font.family[x]:k.font.family,A.hnl=R.isArrayOrTypedArray(k.namelength)?k.namelength[x]:k.namelength);var P=f.hoverinfo;P&&(A.hi=Array.isArray(P)?P[x]:P);var T=f.hovertemplate;T&&(A.ht=Array.isArray(T)?T[x]:T);var y={};y[u.index]=A;var S=f._origX,M=f._origY,W=R.extendFlat({},u,{color:O(f,A),x0:I-F,x1:I+F,xLabelVal:S?S[x]:A.x,y0:N-F,y1:N+F,yLabelVal:M?M[x]:A.y,cd:y,distance:m,spikeDistance:_,hovertemplate:A.ht});return A.htx?W.text=A.htx:A.tx?W.text=A.tx:f.text&&(W.text=f.text),R.fillText(A,f,W),w.getComponentMethod("errorbars","hoverInfo")(A,f,W),W}le.exports={hoverPoints:z,calcHover:l}}}),G4=U({"src/traces/scattergl/constants.js"(pe,le){var w=20;le.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:w,SYMBOL_STROKE:w/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]}}}}),HU=U({"src/traces/scattergl/attributes.js"(pe,le){var w=Jn(),R=Ir(),O=Xc(),z=Kc(),l=Wp().axisHoverFormat,u=Jd(),c=pa(),p=Ar().extendFlat,f=zl().overrideAll,v=G4().DASHES,h=z.line,m=z.marker,_=m.line,x=le.exports=f({x:z.x,x0:z.x0,dx:z.dx,y:z.y,y0:z.y0,dy:z.dy,xperiod:z.xperiod,yperiod:z.yperiod,xperiod0:z.xperiod0,yperiod0:z.yperiod0,xperiodalignment:z.xperiodalignment,yperiodalignment:z.yperiodalignment,xhoverformat:l("x"),yhoverformat:l("y"),text:z.text,hovertext:z.hovertext,textposition:z.textposition,textfont:R({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:h.color,width:h.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},dash:{valType:"enumerated",values:c(v),dflt:"solid"}},marker:p({},u("marker"),{symbol:m.symbol,angle:m.angle,size:m.size,sizeref:m.sizeref,sizemin:m.sizemin,sizemode:m.sizemode,opacity:m.opacity,colorbar:m.colorbar,line:p({},u("marker.line"),{width:_.width})}),connectgaps:z.connectgaps,fill:p({},z.fill,{dflt:"none"}),fillcolor:O(),selected:{marker:z.selected.marker,textfont:z.selected.textfont},unselected:{marker:z.unselected.marker,textfont:z.unselected.textfont},opacity:w.opacity},"calc","nested");x.x.editType=x.y.editType=x.x0.editType=x.y0.editType="calc+clearAxisTypes",x.hovertemplate=z.hovertemplate,x.texttemplate=z.texttemplate}}),cK=U({"src/traces/scattergl/helpers.js"(pe){var le=G4();pe.isOpenSymbol=function(w){return typeof w=="string"?le.OPEN_RE.test(w):w%200>100},pe.isDotSymbol=function(w){return typeof w=="string"?le.DOT_RE.test(w):w>200}}}),AJe=U({"src/traces/scattergl/defaults.js"(pe,le){var w=ii(),R=Mi(),O=cK(),z=HU(),l=hu(),u=Qd(),c=ib(),p=R1(),f=r0(),v=Xy(),h=Ch(),m=y0();le.exports=function(x,A,E,D){function g(y,S){return w.coerce(x,A,z,y,S)}var C=x.marker?O.isOpenSymbol(x.marker.symbol):!1,I=u.isBubble(x),N=c(x,A,D,g);if(!N){A.visible=!1;return}p(x,A,D,g),g("xhoverformat"),g("yhoverformat");var F=N<l.PTS_LINESONLY?"lines+markers":"lines";g("text"),g("hovertext"),g("hovertemplate"),g("mode",F),u.hasMarkers(A)&&(f(x,A,E,D,g,{noAngleRef:!0,noStandOff:!0}),g("marker.line.width",C||I?1:0)),u.hasLines(A)&&(g("connectgaps"),v(x,A,E,D,g),g("line.shape")),u.hasText(A)&&(g("texttemplate"),m(x,A,D,g,{noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var k=(A.line||{}).color,P=(A.marker||{}).color;g("fill"),A.fill!=="none"&&h(x,A,E,g);var T=R.getComponentMethod("errorbars","supplyDefaults");T(x,A,k||P||E,{axis:"y"}),T(x,A,k||P||E,{axis:"x",inherit:"y"}),w.coerceSelectionMarkerOpacity(A,g)}}}),CJe=U({"src/traces/scattergl/format_labels.js"(pe,le){var w=AA();le.exports=function(O,z,l){var u=O.i;return"x"in O||(O.x=z._x[u]),"y"in O||(O.y=z._y[u]),w(O,z,l)}}}),MJe=U({"node_modules/binary-search-bounds/search-bounds.js"(pe,le){function w(c,p,f,v,h){for(var m=h+1;v<=h;){var _=v+h>>>1,x=c[_],A=f!==void 0?f(x,p):x-p;A>=0?(m=_,h=_-1):v=_+1}return m}function R(c,p,f,v,h){for(var m=h+1;v<=h;){var _=v+h>>>1,x=c[_],A=f!==void 0?f(x,p):x-p;A>0?(m=_,h=_-1):v=_+1}return m}function O(c,p,f,v,h){for(var m=v-1;v<=h;){var _=v+h>>>1,x=c[_],A=f!==void 0?f(x,p):x-p;A<0?(m=_,v=_+1):h=_-1}return m}function z(c,p,f,v,h){for(var m=v-1;v<=h;){var _=v+h>>>1,x=c[_],A=f!==void 0?f(x,p):x-p;A<=0?(m=_,v=_+1):h=_-1}return m}function l(c,p,f,v,h){for(;v<=h;){var m=v+h>>>1,_=c[m],x=f!==void 0?f(_,p):_-p;if(x===0)return m;x<=0?v=m+1:h=m-1}return-1}function u(c,p,f,v,h,m){return typeof f=="function"?m(c,p,f,v===void 0?0:v|0,h===void 0?c.length-1:h|0):m(c,p,void 0,f===void 0?0:f|0,v===void 0?c.length-1:v|0)}le.exports={ge:function(c,p,f,v,h){return u(c,p,f,v,h,w)},gt:function(c,p,f,v,h){return u(c,p,f,v,h,R)},lt:function(c,p,f,v,h){return u(c,p,f,v,h,O)},le:function(c,p,f,v,h){return u(c,p,f,v,h,z)},eq:function(c,p,f,v,h){return u(c,p,f,v,h,l)}}}}),NR=U({"node_modules/pick-by-alias/index.js"(pe,le){le.exports=function(z,l,u){var c={},p,f;if(typeof l=="string"&&(l=R(l)),Array.isArray(l)){var v={};for(f=0;f<l.length;f++)v[l[f]]=!0;l=v}for(p in l)l[p]=R(l[p]);var h={};for(p in l){var m=l[p];if(Array.isArray(m))for(f=0;f<m.length;f++){var _=m[f];if(u&&(h[_]=!0),_ in z){if(c[p]=z[_],u)for(var x=f;x<m.length;x++)h[m[x]]=!0;break}}else p in z&&(l[p]&&(c[p]=z[p]),u&&(h[p]=!0))}if(u)for(p in z)h[p]||(c[p]=z[p]);return c};var w={};function R(O){return w[O]?w[O]:(typeof O=="string"&&(O=w[O]=O.split(/\s*,\s*|\s+/)),O)}}}),BF=U({"node_modules/parse-rect/index.js"(pe,le){var w=NR();le.exports=R;function R(O){var z;return arguments.length>1&&(O=arguments),typeof O=="string"?O=O.split(/\s/).map(parseFloat):typeof O=="number"&&(O=[O]),O.length&&typeof O[0]=="number"?O.length===1?z={width:O[0],height:O[0],x:0,y:0}:O.length===2?z={width:O[0],height:O[1],x:0,y:0}:z={x:O[0],y:O[1],width:O[2]-O[0]||0,height:O[3]-O[1]||0}:O&&(O=w(O,{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"}),z={x:O.left||0,y:O.top||0},O.width==null?O.right?z.width=O.right-z.x:z.width=0:z.width=O.width,O.height==null?O.bottom?z.height=O.bottom-z.y:z.height=0:z.height=O.height),z}}}),M6=U({"node_modules/array-bounds/index.js"(pe,le){le.exports=w;function w(R,O){if(!R||R.length==null)throw Error("Argument should be an array");O==null?O=1:O=Math.floor(O);for(var z=Array(O*2),l=0;l<O;l++){for(var u=-1/0,c=1/0,p=l,f=R.length;p<f;p+=O)R[p]>u&&(u=R[p]),R[p]<c&&(c=R[p]);z[l]=c,z[O+l]=u}return z}}}),RJe=U({"node_modules/defined/index.js"(pe,le){le.exports=function(){for(var w=0;w<arguments.length;w++)if(arguments[w]!==void 0)return arguments[w]}}}),R6=U({"node_modules/flatten-vertex-data/index.js"(pe,le){var w=XZ();le.exports=R;function R(O,z,l){if(!O)throw new TypeError("must specify data as first parameter");if(l=+(l||0)|0,Array.isArray(O)&&O[0]&&typeof O[0][0]=="number"){var u=O[0].length,c=O.length*u,p,f,v,h;(!z||typeof z=="string")&&(z=new(w(z||"float32"))(c+l));var m=z.length-l;if(c!==m)throw new Error("source length "+c+" ("+u+"x"+O.length+") does not match destination length "+m);for(p=0,v=l;p<O.length;p++)for(f=0;f<u;f++)z[v++]=O[p][f]===null?NaN:O[p][f]}else if(!z||typeof z=="string"){var _=w(z||"float32");if(Array.isArray(O)||z==="array")for(z=new _(O.length+l),p=0,v=l,h=z.length;v<h;v++,p++)z[v]=O[p]===null?NaN:O[p];else l===0?z=new _(O):(z=new _(O.length+l),z.set(O,l))}else z.set(O,l);return z}}}),kJe=U({"node_modules/is-obj/index.js"(pe,le){le.exports=function(w){var R=typeof w;return w!==null&&(R==="object"||R==="function")}}}),IJe=U({"node_modules/math-log2/index.js"(pe,le){le.exports=Math.log2||function(w){return Math.log(w)*Math.LOG2E}}}),PJe=U({"node_modules/@plotly/point-cluster/quad.js"(pe,le){var w=MJe(),R=FU(),O=BF(),z=M6(),l=NR(),u=RJe(),c=R6(),p=kJe(),f=XZ(),v=IJe(),h=1073741824;le.exports=function(x,A){A||(A={}),x=c(x,"float64"),A=l(A,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});let E=u(A.maxDepth,255),D=u(A.bounds,z(x,2));D[0]===D[2]&&D[2]++,D[1]===D[3]&&D[3]++;let g=m(x,D),C=x.length>>>1,I;A.dtype||(A.dtype="array"),typeof A.dtype=="string"?I=new(f(A.dtype))(C):A.dtype&&(I=A.dtype,Array.isArray(I)&&(I.length=C));for(let $=0;$<C;++$)I[$]=$;let N=[],F=[],k=[],P=[];y(0,0,1,I,0,1);let T=0;for(let $=0;$<N.length;$++){let Z=N[$];if(I.set)I.set(Z,T);else for(let Q=0,J=Z.length;Q<J;Q++)I[Q+T]=Z[Q];let K=T+N[$].length;P[$]=[T,K],T=K}return I.range=S,I;function y($,Z,K,Q,J,G){if(!Q.length)return null;let ee=N[J]||(N[J]=[]),re=k[J]||(k[J]=[]),fe=F[J]||(F[J]=[]),we=ee.length;if(J++,J>E||G>h){for(let De=0;De<Q.length;De++)ee.push(Q[De]),re.push(G),fe.push(null,null,null,null);return we}if(ee.push(Q[0]),re.push(G),Q.length<=1)return fe.push(null,null,null,null),we;let Oe=K*.5,ke=$+Oe,Le=Z+Oe,oe=[],be=[],_e=[],he=[];for(let De=1,xe=Q.length;De<xe;De++){let se=Q[De],Ee=g[se*2],Te=g[se*2+1];Ee<ke?Te<Le?oe.push(se):be.push(se):Te<Le?_e.push(se):he.push(se)}return G<<=2,fe.push(y($,Z,Oe,oe,J,G),y($,Le,Oe,be,J,G+1),y(ke,Z,Oe,_e,J,G+2),y(ke,Le,Oe,he,J,G+3)),we}function S(...$){let Z;if(p($[$.length-1])){let _e=$.pop();!$.length&&(_e.x!=null||_e.l!=null||_e.left!=null)&&($=[_e],Z={}),Z=l(_e,{level:"level maxLevel",d:"d diam diameter r radius px pxSize pixel pixelSize maxD size minSize",lod:"lod details ranges offsets"})}else Z={};$.length||($=D);let K=O(...$),[Q,J,G,ee]=[Math.min(K.x,K.x+K.width),Math.min(K.y,K.y+K.height),Math.max(K.x,K.x+K.width),Math.max(K.y,K.y+K.height)],[re,fe,we,Oe]=m([Q,J,G,ee],D),ke=u(Z.level,N.length);if(Z.d!=null){let _e;typeof Z.d=="number"?_e=[Z.d,Z.d]:Z.d.length&&(_e=Z.d),ke=Math.min(Math.max(Math.ceil(-v(Math.abs(_e[0])/(D[2]-D[0]))),Math.ceil(-v(Math.abs(_e[1])/(D[3]-D[1])))),ke)}if(ke=Math.min(ke,N.length),Z.lod)return M(re,fe,we,Oe,ke);let Le=[];oe(0,0,1,0,0,1);function oe(_e,he,De,xe,se,Ee){if(se===null||Ee===null)return;let Te=_e+De,Be=he+De;if(re>Te||fe>Be||we<_e||Oe<he||xe>=ke||se===Ee)return;let tt=N[xe];Ee===void 0&&(Ee=tt.length);for(let st=se;st<Ee;st++){let rt=tt[st],Ue=x[rt*2],xt=x[rt*2+1];Ue>=Q&&Ue<=G&&xt>=J&&xt<=ee&&Le.push(rt)}let at=F[xe],gt=at[se*4+0],pt=at[se*4+1],Rt=at[se*4+2],$t=at[se*4+3],Wt=be(at,se+1),Ht=De*.5,Ft=xe+1;oe(_e,he,Ht,Ft,gt,pt||Rt||$t||Wt),oe(_e,he+Ht,Ht,Ft,pt,Rt||$t||Wt),oe(_e+Ht,he,Ht,Ft,Rt,$t||Wt),oe(_e+Ht,he+Ht,Ht,Ft,$t,Wt)}function be(_e,he){let De=null,xe=0;for(;De===null;)if(De=_e[he*4+xe],xe++,xe>_e.length)return null;return De}return Le}function M($,Z,K,Q,J){let G=[];for(let ee=0;ee<J;ee++){let re=k[ee],fe=P[ee][0],we=W($,Z,ee),Oe=W(K,Q,ee),ke=w.ge(re,we),Le=w.gt(re,Oe,ke,re.length-1);G[ee]=[ke+fe,Le+fe]}return G}function W($,Z,K){let Q=1,J=.5,G=.5,ee=.5;for(let re=0;re<K;re++)Q<<=2,Q+=$<J?Z<G?0:1:Z<G?2:3,ee*=.5,J+=$<J?-ee:ee,G+=Z<G?-ee:ee;return Q}};function m(_,x){let[A,E,D,g]=x,C=1/(D-A),I=1/(g-E),N=new Array(_.length);for(let F=0,k=_.length/2;F<k;F++)N[2*F]=R((_[2*F]-A)*C,0,1),N[2*F+1]=R((_[2*F+1]-E)*I,0,1);return N}}}),fK=U({"node_modules/@plotly/point-cluster/index.js"(pe,le){le.exports=PJe()}}),Ube=U({"node_modules/abs-svg-path/index.js"(pe,le){le.exports=w;function w(R){var O=0,z=0,l=0,u=0;return R.map(function(c){c=c.slice();var p=c[0],f=p.toUpperCase();if(p!=f)switch(c[0]=f,p){case"a":c[6]+=l,c[7]+=u;break;case"v":c[1]+=u;break;case"h":c[1]+=l;break;default:for(var v=1;v<c.length;)c[v++]+=l,c[v++]+=u}switch(f){case"Z":l=O,u=z;break;case"H":l=c[1];break;case"V":u=c[1];break;case"M":l=O=c[1],u=z=c[2];break;default:l=c[c.length-2],u=c[c.length-1]}return c})}}}),DJe=U({"node_modules/svg-arc-to-cubic-bezier/cjs/index.js"(pe,le){Object.defineProperty(pe,"__esModule",{value:!0});var w=(function(){function p(f,v){var h=[],m=!0,_=!1,x=void 0;try{for(var A=f[Symbol.iterator](),E;!(m=(E=A.next()).done)&&(h.push(E.value),!(v&&h.length===v));m=!0);}catch(D){_=!0,x=D}finally{try{!m&&A.return&&A.return()}finally{if(_)throw x}}return h}return function(f,v){if(Array.isArray(f))return f;if(Symbol.iterator in Object(f))return p(f,v);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),R=Math.PI*2,O=function(f,v,h,m,_,x,A){var E=f.x,D=f.y;E*=v,D*=h;var g=m*E-_*D,C=_*E+m*D;return{x:g+x,y:C+A}},z=function(f,v){var h=v===1.5707963267948966?.551915024494:v===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(v/4),m=Math.cos(f),_=Math.sin(f),x=Math.cos(f+v),A=Math.sin(f+v);return[{x:m-_*h,y:_+m*h},{x:x+A*h,y:A-x*h},{x,y:A}]},l=function(f,v,h,m){var _=f*m-v*h<0?-1:1,x=f*h+v*m;return x>1&&(x=1),x<-1&&(x=-1),_*Math.acos(x)},u=function(f,v,h,m,_,x,A,E,D,g,C,I){var N=Math.pow(_,2),F=Math.pow(x,2),k=Math.pow(C,2),P=Math.pow(I,2),T=N*F-N*P-F*k;T<0&&(T=0),T/=N*P+F*k,T=Math.sqrt(T)*(A===E?-1:1);var y=T*_/x*I,S=T*-x/_*C,M=g*y-D*S+(f+h)/2,W=D*y+g*S+(v+m)/2,$=(C-y)/_,Z=(I-S)/x,K=(-C-y)/_,Q=(-I-S)/x,J=l(1,0,$,Z),G=l($,Z,K,Q);return E===0&&G>0&&(G-=R),E===1&&G<0&&(G+=R),[M,W,J,G]},c=function(f){var v=f.px,h=f.py,m=f.cx,_=f.cy,x=f.rx,A=f.ry,E=f.xAxisRotation,D=E===void 0?0:E,g=f.largeArcFlag,C=g===void 0?0:g,I=f.sweepFlag,N=I===void 0?0:I,F=[];if(x===0||A===0)return[];var k=Math.sin(D*R/360),P=Math.cos(D*R/360),T=P*(v-m)/2+k*(h-_)/2,y=-k*(v-m)/2+P*(h-_)/2;if(T===0&&y===0)return[];x=Math.abs(x),A=Math.abs(A);var S=Math.pow(T,2)/Math.pow(x,2)+Math.pow(y,2)/Math.pow(A,2);S>1&&(x*=Math.sqrt(S),A*=Math.sqrt(S));var M=u(v,h,m,_,x,A,C,N,k,P,T,y),W=w(M,4),$=W[0],Z=W[1],K=W[2],Q=W[3],J=Math.abs(Q)/(R/4);Math.abs(1-J)<1e-7&&(J=1);var G=Math.max(Math.ceil(J),1);Q/=G;for(var ee=0;ee<G;ee++)F.push(z(K,Q)),K+=Q;return F.map(function(re){var fe=O(re[0],x,A,P,k,$,Z),we=fe.x,Oe=fe.y,ke=O(re[1],x,A,P,k,$,Z),Le=ke.x,oe=ke.y,be=O(re[2],x,A,P,k,$,Z),_e=be.x,he=be.y;return{x1:we,y1:Oe,x2:Le,y2:oe,x:_e,y:he}})};pe.default=c,le.exports=pe.default}}),LJe=U({"node_modules/svg-path-bounds/node_modules/normalize-svg-path/index.js"(pe,le){le.exports=R;var w=DJe();function R(l){for(var u,c=[],p=0,f=0,v=0,h=0,m=null,_=null,x=0,A=0,E=0,D=l.length;E<D;E++){var g=l[E],C=g[0];switch(C){case"M":v=g[1],h=g[2];break;case"A":var I=w({px:x,py:A,cx:g[6],cy:g[7],rx:g[1],ry:g[2],xAxisRotation:g[3],largeArcFlag:g[4],sweepFlag:g[5]});if(!I.length)continue;for(var N=0,F;N<I.length;N++)F=I[N],g=["C",F.x1,F.y1,F.x2,F.y2,F.x,F.y],N<I.length-1&&c.push(g);break;case"S":var k=x,P=A;(u=="C"||u=="S")&&(k+=k-p,P+=P-f),g=["C",k,P,g[1],g[2],g[3],g[4]];break;case"T":u=="Q"||u=="T"?(m=x*2-m,_=A*2-_):(m=x,_=A),g=z(x,A,m,_,g[1],g[2]);break;case"Q":m=g[1],_=g[2],g=z(x,A,g[1],g[2],g[3],g[4]);break;case"L":g=O(x,A,g[1],g[2]);break;case"H":g=O(x,A,g[1],A);break;case"V":g=O(x,A,x,g[1]);break;case"Z":g=O(x,A,v,h);break}u=C,x=g[g.length-2],A=g[g.length-1],g.length>4?(p=g[g.length-4],f=g[g.length-3]):(p=x,f=A),c.push(g)}return c}function O(l,u,c,p){return["C",l,u,c,p,c,p]}function z(l,u,c,p,f,v){return["C",l/3+2/3*c,u/3+2/3*p,f/3+2/3*c,v/3+2/3*p,f,v]}}}),Hbe=U({"node_modules/is-svg-path/index.js"(pe,le){le.exports=function(R){return typeof R!="string"?!1:(R=R.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(R)&&/[\dz]$/i.test(R)&&R.length>4))}}}),OJe=U({"node_modules/svg-path-bounds/index.js"(pe,le){var w=mA(),R=Ube(),O=LJe(),z=Hbe(),l=ta();le.exports=u;function u(c){if(Array.isArray(c)&&c.length===1&&typeof c[0]=="string"&&(c=c[0]),typeof c=="string"&&(l(z(c),"String is not an SVG path."),c=w(c)),l(Array.isArray(c),"Argument should be a string or an array of path segments."),c=R(c),c=O(c),!c.length)return[0,0,0,0];for(var p=[1/0,1/0,-1/0,-1/0],f=0,v=c.length;f<v;f++)for(var h=c[f].slice(1),m=0;m<h.length;m+=2)h[m+0]<p[0]&&(p[0]=h[m+0]),h[m+1]<p[1]&&(p[1]=h[m+1]),h[m+0]>p[2]&&(p[2]=h[m+0]),h[m+1]>p[3]&&(p[3]=h[m+1]);return p}}}),NJe=U({"node_modules/normalize-svg-path/index.js"(pe,le){var w=Math.PI,R=p(120);le.exports=O;function O(f){for(var v,h=[],m=0,_=0,x=0,A=0,E=null,D=null,g=0,C=0,I=0,N=f.length;I<N;I++){var F=f[I],k=F[0];switch(k){case"M":x=F[1],A=F[2];break;case"A":F=u(g,C,F[1],F[2],p(F[3]),F[4],F[5],F[6],F[7]),F.unshift("C"),F.length>7&&(h.push(F.splice(0,7)),F.unshift("C"));break;case"S":var P=g,T=C;(v=="C"||v=="S")&&(P+=P-m,T+=T-_),F=["C",P,T,F[1],F[2],F[3],F[4]];break;case"T":v=="Q"||v=="T"?(E=g*2-E,D=C*2-D):(E=g,D=C),F=l(g,C,E,D,F[1],F[2]);break;case"Q":E=F[1],D=F[2],F=l(g,C,F[1],F[2],F[3],F[4]);break;case"L":F=z(g,C,F[1],F[2]);break;case"H":F=z(g,C,F[1],C);break;case"V":F=z(g,C,g,F[1]);break;case"Z":F=z(g,C,x,A);break}v=k,g=F[F.length-2],C=F[F.length-1],F.length>4?(m=F[F.length-4],_=F[F.length-3]):(m=g,_=C),h.push(F)}return h}function z(f,v,h,m){return["C",f,v,h,m,h,m]}function l(f,v,h,m,_,x){return["C",f/3+2/3*h,v/3+2/3*m,_/3+2/3*h,x/3+2/3*m,_,x]}function u(f,v,h,m,_,x,A,E,D,g){if(g)M=g[0],W=g[1],y=g[2],S=g[3];else{var C=c(f,v,-_);f=C.x,v=C.y,C=c(E,D,-_),E=C.x,D=C.y;var I=(f-E)/2,N=(v-D)/2,F=I*I/(h*h)+N*N/(m*m);F>1&&(F=Math.sqrt(F),h=F*h,m=F*m);var k=h*h,P=m*m,T=(x==A?-1:1)*Math.sqrt(Math.abs((k*P-k*N*N-P*I*I)/(k*N*N+P*I*I)));T==1/0&&(T=1);var y=T*h*N/m+(f+E)/2,S=T*-m*I/h+(v+D)/2,M=Math.asin(((v-S)/m).toFixed(9)),W=Math.asin(((D-S)/m).toFixed(9));M=f<y?w-M:M,W=E<y?w-W:W,M<0&&(M=w*2+M),W<0&&(W=w*2+W),A&&M>W&&(M=M-w*2),!A&&W>M&&(W=W-w*2)}if(Math.abs(W-M)>R){var $=W,Z=E,K=D;W=M+R*(A&&W>M?1:-1),E=y+h*Math.cos(W),D=S+m*Math.sin(W);var Q=u(E,D,h,m,_,0,A,Z,K,[W,$,y,S])}var J=Math.tan((W-M)/4),G=4/3*h*J,ee=4/3*m*J,re=[2*f-(f+G*Math.sin(M)),2*v-(v-ee*Math.cos(M)),E+G*Math.sin(W),D-ee*Math.cos(W),E,D];if(g)return re;Q&&(re=re.concat(Q));for(var fe=0;fe<re.length;){var we=c(re[fe],re[fe+1],_);re[fe++]=we.x,re[fe++]=we.y}return re}function c(f,v,h){return{x:f*Math.cos(h)-v*Math.sin(h),y:f*Math.sin(h)+v*Math.cos(h)}}function p(f){return f*(w/180)}}}),FJe=U({"node_modules/draw-svg-path/index.js"(pe,le){var w=Ube(),R=NJe(),O={M:"moveTo",C:"bezierCurveTo"};le.exports=function(z,l){z.beginPath(),R(w(l)).forEach(function(u){var c=u[0],p=u.slice(1);z[O[c]].apply(z,p)}),z.closePath()}}}),zJe=U({"node_modules/bitmap-sdf/index.js"(pe,le){var w=FU();le.exports=O;var R=1e20;function O(u,c){c||(c={});var p=c.cutoff==null?.25:c.cutoff,f=c.radius==null?8:c.radius,v=c.channel||0,h,m,_,x,A,E,D,g,C,I,N;if(ArrayBuffer.isView(u)||Array.isArray(u)){if(!c.width||!c.height)throw Error("For raw data width and height should be provided by options");h=c.width,m=c.height,x=u,c.stride?E=c.stride:E=Math.floor(u.length/h/m)}else window.HTMLCanvasElement&&u instanceof window.HTMLCanvasElement?(g=u,D=g.getContext("2d"),h=g.width,m=g.height,C=D.getImageData(0,0,h,m),x=C.data,E=4):window.CanvasRenderingContext2D&&u instanceof window.CanvasRenderingContext2D?(g=u.canvas,D=u,h=g.width,m=g.height,C=D.getImageData(0,0,h,m),x=C.data,E=4):window.ImageData&&u instanceof window.ImageData&&(C=u,h=u.width,m=u.height,x=C.data,E=4);if(_=Math.max(h,m),window.Uint8ClampedArray&&x instanceof window.Uint8ClampedArray||window.Uint8Array&&x instanceof window.Uint8Array)for(A=x,x=Array(h*m),I=0,N=A.length;I<N;I++)x[I]=A[I*E+v]/255;else if(E!==1)throw Error("Raw data can have only 1 value per pixel");var F=Array(h*m),k=Array(h*m),P=Array(_),T=Array(_),y=Array(_+1),S=Array(_);for(I=0,N=h*m;I<N;I++){var M=x[I];F[I]=M===1?0:M===0?R:Math.pow(Math.max(0,.5-M),2),k[I]=M===1?R:M===0?0:Math.pow(Math.max(0,M-.5),2)}z(F,h,m,P,T,S,y),z(k,h,m,P,T,S,y);var W=window.Float32Array?new Float32Array(h*m):new Array(h*m);for(I=0,N=h*m;I<N;I++)W[I]=w(1-((F[I]-k[I])/f+p),0,1);return W}function z(u,c,p,f,v,h,m){for(var _=0;_<c;_++){for(var x=0;x<p;x++)f[x]=u[x*c+_];for(l(f,v,h,m,p),x=0;x<p;x++)u[x*c+_]=v[x]}for(x=0;x<p;x++){for(_=0;_<c;_++)f[_]=u[x*c+_];for(l(f,v,h,m,c),_=0;_<c;_++)u[x*c+_]=Math.sqrt(v[_])}}function l(u,c,p,f,v){p[0]=0,f[0]=-R,f[1]=+R;for(var h=1,m=0;h<v;h++){for(var _=(u[h]+h*h-(u[p[m]]+p[m]*p[m]))/(2*h-2*p[m]);_<=f[m];)m--,_=(u[h]+h*h-(u[p[m]]+p[m]*p[m]))/(2*h-2*p[m]);m++,p[m]=h,f[m]=_,f[m+1]=+R}for(h=0,m=0;h<v;h++){for(;f[m+1]<h;)m++;c[h]=(h-p[m])*(h-p[m])+u[p[m]]}}}}),BJe=U({"node_modules/svg-path-sdf/index.js"(pe,le){var w=OJe(),R=mA(),O=FJe(),z=Hbe(),l=zJe(),u=document.createElement("canvas"),c=u.getContext("2d");le.exports=p;function p(h,m){if(!z(h))throw Error("Argument should be valid svg path string");m||(m={});var _,x;m.shape?(_=m.shape[0],x=m.shape[1]):(_=u.width=m.w||m.width||200,x=u.height=m.h||m.height||200);var A=Math.min(_,x),E=m.stroke||0,D=m.viewbox||m.viewBox||w(h),g=[_/(D[2]-D[0]),x/(D[3]-D[1])],C=Math.min(g[0]||0,g[1]||0)/2;if(c.fillStyle="black",c.fillRect(0,0,_,x),c.fillStyle="white",E&&(typeof E!="number"&&(E=1),E>0?c.strokeStyle="white":c.strokeStyle="black",c.lineWidth=Math.abs(E)),c.translate(_*.5,x*.5),c.scale(C,C),v()){var I=new Path2D(h);c.fill(I),E&&c.stroke(I)}else{var N=R(h);O(c,N),c.fill(),E&&c.stroke()}c.setTransform(1,0,0,1,0,0);var F=l(c,{cutoff:m.cutoff!=null?m.cutoff:.5,radius:m.radius!=null?m.radius:A*.5});return F}var f;function v(){if(f!=null)return f;var h=document.createElement("canvas").getContext("2d");if(h.canvas.width=h.canvas.height=1,!window.Path2D)return f=!1;var m=new Path2D("M0,0h1v1h-1v-1Z");h.fillStyle="black",h.fill(m);var _=h.getImageData(0,0,1,1);return f=_&&_.data&&_.data[3]===255}}}),k6=U({"src/traces/scattergl/convert.js"(pe,le){var w=_t(),R=BJe(),O=H4(),z=Mi(),l=ii(),u=l.isArrayOrTypedArray,c=ec(),p=Tf(),f=II().formatColor,v=Qd(),h=$_(),m=cK(),_=G4(),x=Yn().DESELECTDIM,A={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},E=v0().appendArrayPointValue;function D(Q,J){var G,ee={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},re=Q._context.plotGlPixelRatio;if(J.visible!==!0)return ee;if(v.hasText(J)&&(ee.text=g(Q,J),ee.textSel=F(Q,J,J.selected),ee.textUnsel=F(Q,J,J.unselected)),v.hasMarkers(J)&&(ee.marker=I(Q,J),ee.markerSel=N(Q,J,J.selected),ee.markerUnsel=N(Q,J,J.unselected),!J.unselected&&u(J.marker.opacity))){var fe=J.marker.opacity;for(ee.markerUnsel.opacity=new Array(fe.length),G=0;G<fe.length;G++)ee.markerUnsel.opacity[G]=x*fe[G]}if(v.hasLines(J)){ee.line={overlay:!0,thickness:J.line.width*re,color:J.line.color,opacity:J.opacity};var we=(_.DASHES[J.line.dash]||[1]).slice();for(G=0;G<we.length;++G)we[G]*=J.line.width*re;ee.line.dashes=we}return J.error_x&&J.error_x.visible&&(ee.errorX=k(J,J.error_x,re)),J.error_y&&J.error_y.visible&&(ee.errorY=k(J,J.error_y,re)),J.fill&&J.fill!=="none"&&(ee.fill={closed:!0,fill:J.fillcolor,thickness:0}),ee}function g(Q,J){var G=Q._fullLayout,ee=J._length,re=J.textfont,fe=J.textposition,we=u(fe)?fe:[fe],Oe=re.color,ke=re.size,Le=re.family,oe=re.weight,be=re.style,_e=re.variant,he={},De,xe=Q._context.plotGlPixelRatio,se=J.texttemplate;if(se){he.text=[];var Ee=G._d3locale,Te=Array.isArray(se),Be=Te?Math.min(se.length,ee):ee,tt=Te?function(Ht){return se[Ht]}:function(){return se};for(De=0;De<Be;De++){var at={i:De},gt=J._module.formatLabels(at,J,G),pt={};E(pt,J,De);var Rt=J._meta||{};he.text.push(l.texttemplateString(tt(De),gt,Ee,pt,at,Rt))}}else u(J.text)&&J.text.length<ee?he.text=J.text.slice():he.text=J.text;if(u(he.text))for(De=he.text.length;De<ee;De++)he.text[De]="";for(he.opacity=J.opacity,he.font={},he.align=[],he.baseline=[],De=0;De<we.length;De++){var $t=we[De].split(/\s+/);switch($t[1]){case"left":he.align.push("right");break;case"right":he.align.push("left");break;default:he.align.push($t[1])}switch($t[0]){case"top":he.baseline.push("bottom");break;case"bottom":he.baseline.push("top");break;default:he.baseline.push($t[0])}}if(u(Oe))for(he.color=new Array(ee),De=0;De<ee;De++)he.color[De]=Oe[De];else he.color=Oe;if(u(ke)||Array.isArray(Le)||u(oe)||Array.isArray(be)||Array.isArray(_e))for(he.font=new Array(ee),De=0;De<ee;De++){var Wt=he.font[De]={};Wt.size=(l.isTypedArray(ke)?ke[De]:u(ke)?w(ke[De])?ke[De]:0:ke)*xe,Wt.family=Array.isArray(Le)?Le[De]:Le,Wt.weight=C(u(oe)?oe[De]:oe),Wt.style=Array.isArray(be)?be[De]:be,Wt.variant=Array.isArray(_e)?_e[De]:_e}else he.font={size:ke*xe,family:Le,weight:C(oe),style:be,variant:_e};return he}function C(Q){return Q<=1e3?Q>500?"bold":"normal":Q}function I(Q,J){var G=J._length,ee=J.marker,re={},fe,we=u(ee.symbol),Oe=u(ee.angle),ke=u(ee.color),Le=u(ee.line.color),oe=u(ee.opacity),be=u(ee.size),_e=u(ee.line.width),he;if(we||(he=m.isOpenSymbol(ee.symbol)),we||ke||Le||oe||Oe){re.symbols=new Array(G),re.angles=new Array(G),re.colors=new Array(G),re.borderColors=new Array(G);var De=ee.symbol,xe=ee.angle,se=f(ee,ee.opacity,G),Ee=f(ee.line,ee.opacity,G);if(!u(Ee[0])){var Te=Ee;for(Ee=Array(G),fe=0;fe<G;fe++)Ee[fe]=Te}if(!u(se[0])){var Be=se;for(se=Array(G),fe=0;fe<G;fe++)se[fe]=Be}if(!u(De)){var tt=De;for(De=Array(G),fe=0;fe<G;fe++)De[fe]=tt}if(!u(xe)){var at=xe;for(xe=Array(G),fe=0;fe<G;fe++)xe[fe]=at}for(re.symbols=De,re.angles=xe,re.colors=se,re.borderColors=Ee,fe=0;fe<G;fe++)we&&(he=m.isOpenSymbol(ee.symbol[fe])),he&&(Ee[fe]=se[fe].slice(),se[fe]=se[fe].slice(),se[fe][3]=0);for(re.opacity=J.opacity,re.markers=new Array(G),fe=0;fe<G;fe++)re.markers[fe]=W({mx:re.symbols[fe],ma:re.angles[fe]},J)}else he?(re.color=O(ee.color,"uint8"),re.color[3]=0,re.borderColor=O(ee.color,"uint8")):(re.color=O(ee.color,"uint8"),re.borderColor=O(ee.line.color,"uint8")),re.opacity=J.opacity*ee.opacity,re.marker=W({mx:ee.symbol,ma:ee.angle},J);var gt=1,pt=h(J,gt),Rt;if(be||_e){var $t=re.sizes=new Array(G),Wt=re.borderSizes=new Array(G),Ht=0,Ft;if(be){for(fe=0;fe<G;fe++)$t[fe]=pt(ee.size[fe]),Ht+=$t[fe];Ft=Ht/G}else for(Rt=pt(ee.size),fe=0;fe<G;fe++)$t[fe]=Rt;if(_e)for(fe=0;fe<G;fe++)Wt[fe]=ee.line.width[fe];else for(Rt=ee.line.width,fe=0;fe<G;fe++)Wt[fe]=Rt;re.sizeAvg=Ft}else re.size=pt(ee&&ee.size||10),re.borderSizes=pt(ee.line.width);return re}function N(Q,J,G){var ee=J.marker,re={};return G&&(G.marker&&G.marker.symbol?re=I(Q,l.extendFlat({},ee,G.marker)):G.marker&&(G.marker.size&&(re.size=G.marker.size),G.marker.color&&(re.colors=G.marker.color),G.marker.opacity!==void 0&&(re.opacity=G.marker.opacity))),re}function F(Q,J,G){var ee={};if(!G)return ee;if(G.textfont){var re={opacity:1,text:J.text,texttemplate:J.texttemplate,textposition:J.textposition,textfont:l.extendFlat({},J.textfont)};G.textfont&&l.extendFlat(re.textfont,G.textfont),ee=g(Q,re)}return ee}function k(Q,J,G){var ee={capSize:J.width*2*G,lineWidth:J.thickness*G,color:J.color};return J.copy_ystyle&&(ee=Q.error_y),ee}var P=_.SYMBOL_SDF_SIZE,T=_.SYMBOL_SIZE,y=_.SYMBOL_STROKE,S={},M=c.symbolFuncs[0](T*.05);function W(Q,J){var G=Q.mx;if(G==="circle")return null;var ee,re,fe=c.symbolNumber(G),we=c.symbolFuncs[fe%100],Oe=!!c.symbolNoDot[fe%100],ke=!!c.symbolNoFill[fe%100],Le=m.isDotSymbol(G);if(Q.ma&&(G+="_"+Q.ma),S[G])return S[G];var oe=c.getMarkerAngle(Q,J);return Le&&!Oe?ee=we(T*1.1,oe)+M:ee=we(T,oe),re=R(ee,{w:P,h:P,viewBox:[-T,-T,T,T],stroke:ke?y:-y}),S[G]=re,re||null}function $(Q,J,G){var ee=G.length,re=ee/2,fe,we;if(v.hasLines(J)&&re)if(J.line.shape==="hv"){for(fe=[],we=0;we<re-1;we++)isNaN(G[we*2])||isNaN(G[we*2+1])?fe.push(NaN,NaN,NaN,NaN):(fe.push(G[we*2],G[we*2+1]),!isNaN(G[we*2+2])&&!isNaN(G[we*2+3])?fe.push(G[we*2+2],G[we*2+1]):fe.push(NaN,NaN));fe.push(G[ee-2],G[ee-1])}else if(J.line.shape==="hvh"){for(fe=[],we=0;we<re-1;we++)if(isNaN(G[we*2])||isNaN(G[we*2+1])||isNaN(G[we*2+2])||isNaN(G[we*2+3]))!isNaN(G[we*2])&&!isNaN(G[we*2+1])?fe.push(G[we*2],G[we*2+1]):fe.push(NaN,NaN),fe.push(NaN,NaN);else{var Oe=(G[we*2]+G[we*2+2])/2;fe.push(G[we*2],G[we*2+1],Oe,G[we*2+1],Oe,G[we*2+3])}fe.push(G[ee-2],G[ee-1])}else if(J.line.shape==="vhv"){for(fe=[],we=0;we<re-1;we++)if(isNaN(G[we*2])||isNaN(G[we*2+1])||isNaN(G[we*2+2])||isNaN(G[we*2+3]))!isNaN(G[we*2])&&!isNaN(G[we*2+1])?fe.push(G[we*2],G[we*2+1]):fe.push(NaN,NaN),fe.push(NaN,NaN);else{var ke=(G[we*2+1]+G[we*2+3])/2;fe.push(G[we*2],G[we*2+1],G[we*2],ke,G[we*2+2],ke)}fe.push(G[ee-2],G[ee-1])}else if(J.line.shape==="vh"){for(fe=[],we=0;we<re-1;we++)isNaN(G[we*2])||isNaN(G[we*2+1])?fe.push(NaN,NaN,NaN,NaN):(fe.push(G[we*2],G[we*2+1]),!isNaN(G[we*2+2])&&!isNaN(G[we*2+3])?fe.push(G[we*2],G[we*2+3]):fe.push(NaN,NaN));fe.push(G[ee-2],G[ee-1])}else fe=G;var Le=!1;for(we=0;we<fe.length;we++)if(isNaN(fe[we])){Le=!0;break}var oe=Le||fe.length>_.TOO_MANY_POINTS||v.hasMarkers(J)?"rect":"round";if(Le&&J.connectgaps){var be=fe[0],_e=fe[1];for(we=0;we<fe.length;we+=2)isNaN(fe[we])||isNaN(fe[we+1])?(fe[we]=be,fe[we+1]=_e):(be=fe[we],_e=fe[we+1])}return{join:oe,positions:fe}}function Z(Q,J,G,ee,re){var fe=z.getComponentMethod("errorbars","makeComputeError"),we=p.getFromId(Q,J.xaxis,"x"),Oe=p.getFromId(Q,J.yaxis,"y"),ke=G.length/2,Le={};function oe(be,_e){var he=_e._id.charAt(0),De=J["error_"+he];if(De&&De.visible&&(_e.type==="linear"||_e.type==="log")){for(var xe=fe(De),se={x:0,y:1}[he],Ee={x:[0,1,2,3],y:[2,3,0,1]}[he],Te=new Float64Array(4*ke),Be=1/0,tt=-1/0,at=0,gt=0;at<ke;at++,gt+=4){var pt=be[at];if(w(pt)){var Rt=G[at*2+se],$t=xe(pt,at),Wt=$t[0],Ht=$t[1];if(w(Wt)&&w(Ht)){var Ft=pt-Wt,st=pt+Ht;Te[gt+Ee[0]]=Rt-_e.c2l(Ft),Te[gt+Ee[1]]=_e.c2l(st)-Rt,Te[gt+Ee[2]]=0,Te[gt+Ee[3]]=0,Be=Math.min(Be,pt-Wt),tt=Math.max(tt,pt+Ht)}}}Le[he]={positions:G,errors:Te,_bnds:[Be,tt]}}}return oe(ee,we),oe(re,Oe),Le}function K(Q,J,G,ee){var re=J._length,fe={},we;if(v.hasMarkers(J)){var Oe=G.font,ke=G.align,Le=G.baseline;for(fe.offset=new Array(re),we=0;we<re;we++){var oe=ee.sizes?ee.sizes[we]:ee.size,be=u(Oe)?Oe[we].size:Oe.size,_e=u(ke)?ke.length>1?ke[we]:ke[0]:ke,he=u(Le)?Le.length>1?Le[we]:Le[0]:Le,De=A[_e],xe=A[he],se=oe?oe/.8+1:0,Ee=-xe*se-xe*.5;fe.offset[we]=[De*se/be,Ee/be]}}return fe}le.exports={style:D,markerStyle:I,markerSelection:N,linePositions:$,errorBarPositions:Z,textPosition:K}}}),jbe=U({"src/traces/scattergl/scene_update.js"(pe,le){var w=ii();le.exports=function(O,z){var l=z._scene,u={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},c={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return z._scene||(l=z._scene={},l.init=function(){w.extendFlat(l,c,u)},l.init(),l.update=function(f){var v=w.repeat(f,l.count);if(l.fill2d&&l.fill2d.update(v),l.scatter2d&&l.scatter2d.update(v),l.line2d&&l.line2d.update(v),l.error2d&&l.error2d.update(v.concat(v)),l.select2d&&l.select2d.update(v),l.glText)for(var h=0;h<l.count;h++)l.glText[h].update(f)},l.draw=function(){for(var f=l.count,v=l.fill2d,h=l.error2d,m=l.line2d,_=l.scatter2d,x=l.glText,A=l.select2d,E=l.selectBatch,D=l.unselectBatch,g=0;g<f;g++){if(v&&l.fillOrder[g]&&v.draw(l.fillOrder[g]),m&&l.lineOptions[g]&&m.draw(g),h&&(l.errorXOptions[g]&&h.draw(g),l.errorYOptions[g]&&h.draw(g+f)),_&&l.markerOptions[g])if(D[g].length){var C=w.repeat([],l.count);C[g]=D[g],_.draw(C)}else E[g].length||_.draw(g);x[g]&&l.textOptions[g]&&x[g].render()}A&&A.draw(E),l.dirty=!1},l.destroy=function(){l.fill2d&&l.fill2d.destroy&&l.fill2d.destroy(),l.scatter2d&&l.scatter2d.destroy&&l.scatter2d.destroy(),l.error2d&&l.error2d.destroy&&l.error2d.destroy(),l.line2d&&l.line2d.destroy&&l.line2d.destroy(),l.select2d&&l.select2d.destroy&&l.select2d.destroy(),l.glText&&l.glText.forEach(function(f){f.destroy&&f.destroy()}),l.lineOptions=null,l.fillOptions=null,l.markerOptions=null,l.markerSelectedOptions=null,l.markerUnselectedOptions=null,l.errorXOptions=null,l.errorYOptions=null,l.textOptions=null,l.textSelectedOptions=null,l.textUnselectedOptions=null,l.selectBatch=null,l.unselectBatch=null,z._scene=null}),l.dirty||w.extendFlat(l,u),l}}}),UJe=U({"src/traces/scattergl/calc.js"(pe,le){var w=fK(),R=ii(),O=Tf(),z=gx().findExtremes,l=Zy(),u=my(),c=u.calcMarkerSize,p=u.calcAxisExpansion,f=u.setFirstScatter,v=b0(),h=k6(),m=jbe(),_=Dt().BADNUM,x=G4().TOO_MANY_POINTS;le.exports=function(g,C){var I=g._fullLayout,N=C._xA=O.getFromId(g,C.xaxis,"x"),F=C._yA=O.getFromId(g,C.yaxis,"y"),k=I._plots[C.xaxis+C.yaxis],P=C._length,T=P>=x,y=P*2,S={},M,W=N.makeCalcdata(C,"x"),$=F.makeCalcdata(C,"y"),Z=l(C,N,"x",W),K=l(C,F,"y",$),Q=Z.vals,J=K.vals;C._x=Q,C._y=J,C.xperiodalignment&&(C._origX=W,C._xStarts=Z.starts,C._xEnds=Z.ends),C.yperiodalignment&&(C._origY=$,C._yStarts=K.starts,C._yEnds=K.ends);var G=new Array(y),ee=new Array(P);for(M=0;M<P;M++)G[M*2]=Q[M]===_?NaN:Q[M],G[M*2+1]=J[M]===_?NaN:J[M],ee[M]=M;if(N.type==="log")for(M=0;M<y;M+=2)G[M]=N.c2l(G[M]);if(F.type==="log")for(M=1;M<y;M+=2)G[M]=F.c2l(G[M]);T&&N.type!=="log"&&F.type!=="log"?S.tree=w(G):S.ids=ee,v(g,C);var re=E(g,k,C,G,Q,J),fe=m(g,k);f(I,C);var we;return T?re.marker&&(we=re.marker.sizeAvg||Math.max(re.marker.size,3)):we=c(C,P),p(g,C,N,F,Q,J,we),re.errorX&&A(C,N,re.errorX),re.errorY&&A(C,F,re.errorY),re.fill&&!fe.fill2d&&(fe.fill2d=!0),re.marker&&!fe.scatter2d&&(fe.scatter2d=!0),re.line&&!fe.line2d&&(fe.line2d=!0),(re.errorX||re.errorY)&&!fe.error2d&&(fe.error2d=!0),re.text&&!fe.glText&&(fe.glText=!0),re.marker&&(re.marker.snap=P),fe.lineOptions.push(re.line),fe.errorXOptions.push(re.errorX),fe.errorYOptions.push(re.errorY),fe.fillOptions.push(re.fill),fe.markerOptions.push(re.marker),fe.markerSelectedOptions.push(re.markerSel),fe.markerUnselectedOptions.push(re.markerUnsel),fe.textOptions.push(re.text),fe.textSelectedOptions.push(re.textSel),fe.textUnselectedOptions.push(re.textUnsel),fe.selectBatch.push([]),fe.unselectBatch.push([]),S._scene=fe,S.index=fe.count,S.x=Q,S.y=J,S.positions=G,fe.count++,[{x:!1,y:!1,t:S,trace:C}]};function A(D,g,C){var I=D._extremes[g._id],N=z(g,C._bnds,{padded:!0});I.min=I.min.concat(N.min),I.max=I.max.concat(N.max)}function E(D,g,C,I,N,F){var k=h.style(D,C);if(k.marker&&(k.marker.positions=I),k.line&&I.length>1&&R.extendFlat(k.line,h.linePositions(D,C,I)),k.errorX||k.errorY){var P=h.errorBarPositions(D,C,I,N,F);k.errorX&&R.extendFlat(k.errorX,P.x),k.errorY&&R.extendFlat(k.errorY,P.y)}return k.text&&(R.extendFlat(k.text,{positions:I},h.textPosition(D,C,k.text,k.marker)),R.extendFlat(k.textSel,{positions:I},h.textPosition(D,C,k.text,k.markerSel)),R.extendFlat(k.textUnsel,{positions:I},h.textPosition(D,C,k.text,k.markerUnsel))),k}}}),Vbe=U({"src/traces/scattergl/edit_style.js"(pe,le){var w=ii(),R=Lr(),O=Yn().DESELECTDIM;function z(l){var u=l[0],c=u.trace,p=u.t,f=p._scene,v=p.index,h=f.selectBatch[v],m=f.unselectBatch[v],_=f.textOptions[v],x=f.textSelectedOptions[v]||{},A=f.textUnselectedOptions[v]||{},E=w.extendFlat({},_),D,g;if(h.length||m.length){var C=x.color,I=A.color,N=_.color,F=w.isArrayOrTypedArray(N);for(E.color=new Array(c._length),D=0;D<h.length;D++)g=h[D],E.color[g]=C||(F?N[g]:N);for(D=0;D<m.length;D++){g=m[D];var k=F?N[g]:N;E.color[g]=I||(C?k:R.addOpacity(k,O))}}f.glText[v].update(E)}le.exports={styleTextSelection:z}}}),qbe=U({"src/traces/scattergl/select.js"(pe,le){var w=Qd(),R=Vbe().styleTextSelection;le.exports=function(z,l){var u=z.cd,c=z.xaxis,p=z.yaxis,f=[],v=u[0].trace,h=u[0].t,m=v._length,_=h.x,x=h.y,A=h._scene,E=h.index;if(!A)return f;var D=w.hasText(v),g=w.hasMarkers(v),C=!g&&!D;if(v.visible!==!0||C)return f;var I=[],N=[];if(l!==!1&&!l.degenerate)for(var F=0;F<m;F++)l.contains([h.xpx[F],h.ypx[F]],!1,F,z)?(I.push(F),f.push({pointNumber:F,x:c.c2d(_[F]),y:p.c2d(x[F])})):N.push(F);if(g){var k=A.scatter2d;if(!I.length&&!N.length){var P=new Array(A.count);P[E]=A.markerOptions[E],k.update.apply(k,P)}else if(!A.selectBatch[E].length&&!A.unselectBatch[E].length){var T=new Array(A.count);T[E]=A.markerUnselectedOptions[E],k.update.apply(k,T)}}return A.selectBatch[E]=I,A.unselectBatch[E]=N,D&&R(u),f}}}),HJe=U({"src/traces/scattergl/base_index.js"(pe,le){var w=uK();le.exports={moduleType:"trace",name:"scattergl",basePlotModule:Rf(),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:HU(),supplyDefaults:AJe(),crossTraceDefaults:e2(),colorbar:qg(),formatLabels:CJe(),calc:UJe(),hoverPoints:w.hoverPoints,selectPoints:qbe(),meta:{}}}}),jJe=U({"node_modules/color-id/index.js"(pe,le){var w=FU();le.exports=R,le.exports.to=R,le.exports.from=O;function R(z,l){l==null&&(l=!0);var u=z[0],c=z[1],p=z[2],f=z[3];f==null&&(f=l?1:255),l&&(u*=255,c*=255,p*=255,f*=255),u=w(u,0,255)&255,c=w(c,0,255)&255,p=w(p,0,255)&255,f=w(f,0,255)&255;var v=u*16777216+(c<<16)+(p<<8)+f;return v}function O(z,l){z=+z;var u=z>>>24,c=(z&16711680)>>>16,p=(z&65280)>>>8,f=z&255;return l===!1?[u,c,p,f]:[u/255,c/255,p/255,f/255]}}}),F1=U({"node_modules/object-assign/index.js"(pe,le){var w=Object.getOwnPropertySymbols,R=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable;function z(u){if(u==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(u)}function l(){try{if(!Object.assign)return!1;var u=new String("abc");if(u[5]="de",Object.getOwnPropertyNames(u)[0]==="5")return!1;for(var c={},p=0;p<10;p++)c["_"+String.fromCharCode(p)]=p;var f=Object.getOwnPropertyNames(c).map(function(h){return c[h]});if(f.join("")!=="0123456789")return!1;var v={};return"abcdefghijklmnopqrst".split("").forEach(function(h){v[h]=h}),Object.keys(Object.assign({},v)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}le.exports=l()?Object.assign:function(u,c){for(var p,f=z(u),v,h=1;h<arguments.length;h++){p=Object(arguments[h]);for(var m in p)R.call(p,m)&&(f[m]=p[m]);if(w){v=w(p);for(var _=0;_<v.length;_++)O.call(p,v[_])&&(f[v[_]]=p[v[_]])}}return f}}}),VJe=U({"node_modules/glslify/browser.js"(pe,le){le.exports=function(w){typeof w=="string"&&(w=[w]);for(var R=[].slice.call(arguments,1),O=[],z=0;z<w.length-1;z++)O.push(w[z],R[z]||"");return O.push(w[z]),O.join("")}}}),Gbe=U({"node_modules/update-diff/index.js"(pe,le){le.exports=function(R,O,z){Array.isArray(z)||(z=[].slice.call(arguments,2));for(var l=0,u=z.length;l<u;l++){var c=z[l];for(var p in c)if(!(O[p]!==void 0&&!Array.isArray(O[p])&&R[p]===O[p])&&p in O){var f;if(c[p]===!0)f=O[p];else{if(c[p]===!1)continue;if(typeof c[p]=="function"&&(f=c[p](O[p],R,O),f===void 0))continue}R[p]=f}}return R}}}),qJe=U({"node_modules/is-iexplorer/index.js"(pe,le){le.exports=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))}}),dK=U({"node_modules/to-float32/index.js"(pe,le){le.exports=O,le.exports.float32=le.exports.float=O,le.exports.fract32=le.exports.fract=R;var w=new Float32Array(1);function R(z,l){if(z.length){if(z instanceof Float32Array)return new Float32Array(z.length);l instanceof Float32Array||(l=O(z));for(var u=0,c=l.length;u<c;u++)l[u]=z[u]-l[u];return l}return O(z-O(z))}function O(z){return z.length?z instanceof Float32Array?z:new Float32Array(z):(w[0]=z,w[0])}}}),$be=U({"node_modules/regl-scatter2d/bundle.js"(pe,le){function w(S,M){var W=S==null?null:typeof Symbol<"u"&&S[Symbol.iterator]||S["@@iterator"];if(W!=null){var $,Z,K,Q,J=[],G=!0,ee=!1;try{if(K=(W=W.call(S)).next,M!==0)for(;!(G=($=K.call(W)).done)&&(J.push($.value),J.length!==M);G=!0);}catch(re){ee=!0,Z=re}finally{try{if(!G&&W.return!=null&&(Q=W.return(),Object(Q)!==Q))return}finally{if(ee)throw Z}}return J}}function R(S,M){return l(S)||w(S,M)||c(S,M)||v()}function O(S){return z(S)||u(S)||c(S)||f()}function z(S){if(Array.isArray(S))return p(S)}function l(S){if(Array.isArray(S))return S}function u(S){if(typeof Symbol<"u"&&S[Symbol.iterator]!=null||S["@@iterator"]!=null)return Array.from(S)}function c(S,M){if(S){if(typeof S=="string")return p(S,M);var W=Object.prototype.toString.call(S).slice(8,-1);if(W==="Object"&&S.constructor&&(W=S.constructor.name),W==="Map"||W==="Set")return Array.from(S);if(W==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(W))return p(S,M)}}function p(S,M){(M==null||M>S.length)&&(M=S.length);for(var W=0,$=new Array(M);W<M;W++)$[W]=S[W];return $}function f(){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 v(){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 h=H4(),m=M6(),_=jJe(),x=fK(),A=F1(),E=VJe(),D=NR(),g=Gbe(),C=R6(),I=qJe(),N=dK(),F=BF(),k=P;function P(S,M){var W=this;if(!(this instanceof P))return new P(S,M);typeof S=="function"?(M||(M={}),M.regl=S):(M=S,S=null),M&&M.length&&(M.positions=M),S=M.regl;var $=S._gl,Z,K=[],Q={},J=[],G=[null],ee=[null],re=255,fe=100;this.tooManyColors=I,Z=S.texture({data:new Uint8Array(re*4),width:re,height:1,type:"uint8",format:"rgba",wrapS:"clamp",wrapT:"clamp",mag:"nearest",min:"nearest"}),A(this,{regl:S,gl:$,groups:J,markerCache:ee,markerTextures:G,palette:K,paletteIds:Q,paletteTexture:Z,maxColors:re,maxSize:fe,canvas:$.canvas}),this.update(M);var we={uniforms:{constPointSize:!!M.constPointSize,opacity:S.prop("opacity"),paletteSize:function(oe,be){return[W.tooManyColors?0:re,Z.height]},pixelRatio:S.context("pixelRatio"),scale:S.prop("scale"),scaleFract:S.prop("scaleFract"),translate:S.prop("translate"),translateFract:S.prop("translateFract"),markerTexture:S.prop("markerTexture"),paletteTexture:Z},attributes:{x:function(oe,be){return be.xAttr||{buffer:be.positionBuffer,stride:8,offset:0}},y:function(oe,be){return be.yAttr||{buffer:be.positionBuffer,stride:8,offset:4}},xFract:function(oe,be){return be.xAttr?{constant:[0,0]}:{buffer:be.positionFractBuffer,stride:8,offset:0}},yFract:function(oe,be){return be.yAttr?{constant:[0,0]}:{buffer:be.positionFractBuffer,stride:8,offset:4}},size:function(oe,be){return be.size.length?{buffer:be.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(be.size*255/W.maxSize)]}},borderSize:function(oe,be){return be.borderSize.length?{buffer:be.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(be.borderSize*255/W.maxSize)]}},colorId:function(oe,be){return be.color.length?{buffer:be.colorBuffer,stride:W.tooManyColors?8:4,offset:0}:{constant:W.tooManyColors?K.slice(be.color*4,be.color*4+4):[be.color]}},borderColorId:function(oe,be){return be.borderColor.length?{buffer:be.colorBuffer,stride:W.tooManyColors?8:4,offset:W.tooManyColors?4:2}:{constant:W.tooManyColors?K.slice(be.borderColor*4,be.borderColor*4+4):[be.borderColor]}},isActive:function(oe,be){return be.activation===!0?{constant:[1]}:be.activation?be.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:S.prop("viewport")},viewport:S.prop("viewport"),stencil:{enable:!1},depth:{enable:!1},elements:S.prop("elements"),count:S.prop("count"),offset:S.prop("offset"),primitive:"points"},Oe=A({},we);Oe.frag=E([`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;
  }

}
`]),Oe.vert=E([`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=S(Oe);var ke=A({},we);ke.frag=E([`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;
}
`]),ke.vert=E([`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;
}
`]),I&&(ke.frag=ke.frag.replace("smoothstep","smoothStep"),Oe.frag=Oe.frag.replace("smoothstep","smoothStep")),this.drawCircle=S(ke)}P.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},P.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},P.prototype.draw=function(){for(var S=this,M=arguments.length,W=new Array(M),$=0;$<M;$++)W[$]=arguments[$];var Z=this.groups;if(W.length===1&&Array.isArray(W[0])&&(W[0][0]===null||Array.isArray(W[0][0]))&&(W=W[0]),this.regl._refresh(),W.length)for(var K=0;K<W.length;K++)this.drawItem(K,W[K]);else Z.forEach(function(Q,J){S.drawItem(J)});return this},P.prototype.drawItem=function(S,M){var W=this.groups,$=W[S];if(typeof M=="number"&&(S=M,$=W[M],M=null),!!($&&$.count&&$.opacity)){$.activation[0]&&this.drawCircle(this.getMarkerDrawOptions(0,$,M));for(var Z=[],K=1;K<$.activation.length;K++)!$.activation[K]||$.activation[K]!==!0&&!$.activation[K].data.length||Z.push.apply(Z,O(this.getMarkerDrawOptions(K,$,M)));Z.length&&this.drawMarker(Z)}},P.prototype.getMarkerDrawOptions=function(S,M,W){var $=M.range,Z=M.tree,K=M.viewport,Q=M.activation,J=M.selectionBuffer,G=M.count;if(this.regl,!Z)return W?[A({},M,{markerTexture:this.markerTextures[S],activation:Q[S],count:W.length,elements:W,offset:0})]:[A({},M,{markerTexture:this.markerTextures[S],activation:Q[S],offset:0})];var ee=[],re=Z.range($,{lod:!0,px:[($[2]-$[0])/K.width,($[3]-$[1])/K.height]});if(W){for(var fe=Q[S],we=fe.data,Oe=new Uint8Array(G),ke=0;ke<W.length;ke++){var Le=W[ke];Oe[Le]=we?we[Le]:1}J.subdata(Oe)}for(var oe=re.length;oe--;){var be=R(re[oe],2),_e=be[0],he=be[1];ee.push(A({},M,{markerTexture:this.markerTextures[S],activation:W?J:Q[S],offset:_e,count:he-_e}))}return ee},P.prototype.update=function(){for(var S=this,M=arguments.length,W=new Array(M),$=0;$<M;$++)W[$]=arguments[$];if(W.length){W.length===1&&Array.isArray(W[0])&&(W=W[0]);var Z=this.groups,K=this.gl,Q=this.regl,J=this.maxSize,G=this.maxColors,ee=this.palette;this.groups=Z=W.map(function(re,fe){var we=Z[fe];if(re===void 0)return we;re===null?re={positions:null}:typeof re=="function"?re={ondraw:re}:typeof re[0]=="number"&&(re={positions:re}),re=D(re,{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"}),re.positions===null&&(re.positions=[]),re.tooManyColors!=null&&(S.tooManyColors=re.tooManyColors),we||(Z[fe]=we={id:fe,scale:null,translate:null,scaleFract:null,translateFract:null,activation:[],selectionBuffer:Q.buffer({data:new Uint8Array(0),usage:"stream",type:"uint8"}),sizeBuffer:Q.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),colorBuffer:Q.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),positionBuffer:Q.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"}),positionFractBuffer:Q.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"})},re=A({},P.defaults,re)),re.positions&&!("marker"in re)&&(re.marker=we.marker,delete we.marker),re.marker&&!("positions"in re)&&(re.positions=we.positions,delete we.positions);var Oe=0,ke=0;if(g(we,re,[{snap:!0,size:function(Ht,Ft){return Ht==null&&(Ht=P.defaults.size),Oe+=Ht&&Ht.length?1:0,Ht},borderSize:function(Ht,Ft){return Ht==null&&(Ht=P.defaults.borderSize),Oe+=Ht&&Ht.length?1:0,Ht},opacity:parseFloat,color:function(Ht,Ft){return Ht==null&&(Ht=P.defaults.color),Ht=S.updateColor(Ht),ke++,Ht},borderColor:function(Ht,Ft){return Ht==null&&(Ht=P.defaults.borderColor),Ht=S.updateColor(Ht),ke++,Ht},bounds:function(Ht,Ft,st){return"range"in st||(st.range=null),Ht},positions:function(Ht,Ft,st){var rt=Ft.snap,Ue=Ft.positionBuffer,xt=Ft.positionFractBuffer,Gt=Ft.selectionBuffer;if(Ht.x||Ht.y)return Ht.x.length?Ft.xAttr={buffer:Q.buffer(Ht.x),offset:0,stride:4,count:Ht.x.length}:Ft.xAttr={buffer:Ht.x.buffer,offset:Ht.x.offset*4||0,stride:(Ht.x.stride||1)*4,count:Ht.x.count},Ht.y.length?Ft.yAttr={buffer:Q.buffer(Ht.y),offset:0,stride:4,count:Ht.y.length}:Ft.yAttr={buffer:Ht.y.buffer,offset:Ht.y.offset*4||0,stride:(Ht.y.stride||1)*4,count:Ht.y.count},Ft.count=Math.max(Ft.xAttr.count,Ft.yAttr.count),Ht;Ht=C(Ht,"float64");var Jt=Ft.count=Math.floor(Ht.length/2),Ut=Ft.bounds=Jt?m(Ht,2):null;if(!st.range&&!Ft.range&&(delete Ft.range,st.range=Ut),!st.marker&&!Ft.marker&&(delete Ft.marker,st.marker=null),rt&&(rt===!0||Jt>rt)?Ft.tree=x(Ht,{bounds:Ut}):rt&&rt.length&&(Ft.tree=rt),Ft.tree){var kr={primitive:"points",usage:"static",data:Ft.tree,type:"uint32"};Ft.elements?Ft.elements(kr):Ft.elements=Q.elements(kr)}var Pr=N.float32(Ht);Ue({data:Pr,usage:"dynamic"});var $r=N.fract32(Ht,Pr);return xt({data:$r,usage:"dynamic"}),Gt({data:new Uint8Array(Jt),type:"uint8",usage:"stream"}),Ht}},{marker:function(Ht,Ft,st){var rt=Ft.activation;if(rt.forEach(function($r){return $r&&$r.destroy&&$r.destroy()}),rt.length=0,!Ht||typeof Ht[0]=="number"){var Ue=S.addMarker(Ht);rt[Ue]=!0}else{for(var xt=[],Gt=0,Jt=Math.min(Ht.length,Ft.count);Gt<Jt;Gt++){var Ut=S.addMarker(Ht[Gt]);xt[Ut]||(xt[Ut]=new Uint8Array(Ft.count)),xt[Ut][Gt]=1}for(var kr=0;kr<xt.length;kr++)if(xt[kr]){var Pr={data:xt[kr],type:"uint8",usage:"static"};rt[kr]?rt[kr](Pr):rt[kr]=Q.buffer(Pr),rt[kr].data=xt[kr]}}return Ht},range:function(Ht,Ft,st){var rt=Ft.bounds;if(rt)return Ht||(Ht=rt),Ft.scale=[1/(Ht[2]-Ht[0]),1/(Ht[3]-Ht[1])],Ft.translate=[-Ht[0],-Ht[1]],Ft.scaleFract=N.fract(Ft.scale),Ft.translateFract=N.fract(Ft.translate),Ht},viewport:function(Ht){var Ft=F(Ht||[K.drawingBufferWidth,K.drawingBufferHeight]);return Ft}}]),Oe){var Le=we,oe=Le.count,be=Le.size,_e=Le.borderSize,he=Le.sizeBuffer,De=new Uint8Array(oe*2);if(be.length||_e.length)for(var xe=0;xe<oe;xe++)De[xe*2]=Math.round((be[xe]==null?be:be[xe])*255/J),De[xe*2+1]=Math.round((_e[xe]==null?_e:_e[xe])*255/J);he({data:De,usage:"dynamic"})}if(ke){var se=we,Ee=se.count,Te=se.color,Be=se.borderColor,tt=se.colorBuffer,at;if(S.tooManyColors){if(Te.length||Be.length){at=new Uint8Array(Ee*8);for(var gt=0;gt<Ee;gt++){var pt=Te[gt];at[gt*8]=ee[pt*4],at[gt*8+1]=ee[pt*4+1],at[gt*8+2]=ee[pt*4+2],at[gt*8+3]=ee[pt*4+3];var Rt=Be[gt];at[gt*8+4]=ee[Rt*4],at[gt*8+5]=ee[Rt*4+1],at[gt*8+6]=ee[Rt*4+2],at[gt*8+7]=ee[Rt*4+3]}}}else if(Te.length||Be.length){at=new Uint8Array(Ee*4+2);for(var $t=0;$t<Ee;$t++)Te[$t]!=null&&(at[$t*4]=Te[$t]%G,at[$t*4+1]=Math.floor(Te[$t]/G)),Be[$t]!=null&&(at[$t*4+2]=Be[$t]%G,at[$t*4+3]=Math.floor(Be[$t]/G))}tt({data:at||new Uint8Array(0),type:"uint8",usage:"dynamic"})}return we})}},P.prototype.addMarker=function(S){var M=this.markerTextures,W=this.regl,$=this.markerCache,Z=S==null?0:$.indexOf(S);if(Z>=0)return Z;var K;if(S instanceof Uint8Array||S instanceof Uint8ClampedArray)K=S;else{K=new Uint8Array(S.length);for(var Q=0,J=S.length;Q<J;Q++)K[Q]=S[Q]*255}var G=Math.floor(Math.sqrt(K.length));return Z=M.length,$.push(S),M.push(W.texture({channels:1,data:K,radius:G,mag:"linear",min:"linear"})),Z},P.prototype.updateColor=function(S){var M=this.paletteIds,W=this.palette,$=this.maxColors;Array.isArray(S)||(S=[S]);var Z=[];if(typeof S[0]=="number"){var K=[];if(Array.isArray(S))for(var Q=0;Q<S.length;Q+=4)K.push(S.slice(Q,Q+4));else for(var J=0;J<S.length;J+=4)K.push(S.subarray(J,J+4));S=K}for(var G=0;G<S.length;G++){var ee=S[G];ee=h(ee,"uint8");var re=_(ee,!1);if(M[re]==null){var fe=W.length;M[re]=Math.floor(fe/4),W[fe]=ee[0],W[fe+1]=ee[1],W[fe+2]=ee[2],W[fe+3]=ee[3]}Z[G]=M[re]}return!this.tooManyColors&&W.length>$*4&&(this.tooManyColors=!0),this.updatePalette(W),Z.length===1?Z[0]:Z},P.prototype.updatePalette=function(S){if(!this.tooManyColors){var M=this.maxColors,W=this.paletteTexture,$=Math.ceil(S.length*.25/M);if($>1){S=S.slice();for(var Z=S.length*.25%M;Z<$*M;Z++)S.push(0,0,0,0)}W.height<$&&W.resize(M,$),W.subimage({width:Math.min(S.length*.25,M),height:$,data:S},0,0)}},P.prototype.destroy=function(){return this.groups.forEach(function(S){S.sizeBuffer.destroy(),S.positionBuffer.destroy(),S.positionFractBuffer.destroy(),S.colorBuffer.destroy(),S.activation.forEach(function(M){return M&&M.destroy&&M.destroy()}),S.selectionBuffer.destroy(),S.elements&&S.elements.destroy()}),this.groups.length=0,this.paletteTexture.destroy(),this.markerTextures.forEach(function(S){return S&&S.destroy&&S.destroy()}),this};var T=F1(),y=function(M,W){var $=new k(M,W),Z=$.render.bind($);return T(Z,{render:Z,update:$.update.bind($),draw:$.draw.bind($),destroy:$.destroy.bind($),regl:$.regl,gl:$.gl,canvas:$.gl.canvas,groups:$.groups,markers:$.markerCache,palette:$.palette}),Z};le.exports=y}}),GJe=U({"node_modules/earcut/src/earcut.js"(pe,le){le.exports=w,le.exports.default=w;function w(Q,J,G){G=G||2;var ee=J&&J.length,re=ee?J[0]*G:Q.length,fe=R(Q,0,re,G,!0),we=[];if(!fe||fe.next===fe.prev)return we;var Oe,ke,Le,oe,be,_e,he;if(ee&&(fe=f(Q,J,fe,G)),Q.length>80*G){Oe=Le=Q[0],ke=oe=Q[1];for(var De=G;De<re;De+=G)be=Q[De],_e=Q[De+1],be<Oe&&(Oe=be),_e<ke&&(ke=_e),be>Le&&(Le=be),_e>oe&&(oe=_e);he=Math.max(Le-Oe,oe-ke),he=he!==0?32767/he:0}return z(fe,we,G,Oe,ke,he,0),we}function R(Q,J,G,ee,re){var fe,we;if(re===K(Q,J,G,ee)>0)for(fe=J;fe<G;fe+=ee)we=W(fe,Q[fe],Q[fe+1],we);else for(fe=G-ee;fe>=J;fe-=ee)we=W(fe,Q[fe],Q[fe+1],we);return we&&N(we,we.next)&&($(we),we=we.next),we}function O(Q,J){if(!Q)return Q;J||(J=Q);var G=Q,ee;do if(ee=!1,!G.steiner&&(N(G,G.next)||I(G.prev,G,G.next)===0)){if($(G),G=J=G.prev,G===G.next)break;ee=!0}else G=G.next;while(ee||G!==J);return J}function z(Q,J,G,ee,re,fe,we){if(Q){!we&&fe&&x(Q,ee,re,fe);for(var Oe=Q,ke,Le;Q.prev!==Q.next;){if(ke=Q.prev,Le=Q.next,fe?u(Q,ee,re,fe):l(Q)){J.push(ke.i/G|0),J.push(Q.i/G|0),J.push(Le.i/G|0),$(Q),Q=Le.next,Oe=Le.next;continue}if(Q=Le,Q===Oe){we?we===1?(Q=c(O(Q),J,G),z(Q,J,G,ee,re,fe,2)):we===2&&p(Q,J,G,ee,re,fe):z(O(Q),J,G,ee,re,fe,1);break}}}}function l(Q){var J=Q.prev,G=Q,ee=Q.next;if(I(J,G,ee)>=0)return!1;for(var re=J.x,fe=G.x,we=ee.x,Oe=J.y,ke=G.y,Le=ee.y,oe=re<fe?re<we?re:we:fe<we?fe:we,be=Oe<ke?Oe<Le?Oe:Le:ke<Le?ke:Le,_e=re>fe?re>we?re:we:fe>we?fe:we,he=Oe>ke?Oe>Le?Oe:Le:ke>Le?ke:Le,De=ee.next;De!==J;){if(De.x>=oe&&De.x<=_e&&De.y>=be&&De.y<=he&&g(re,Oe,fe,ke,we,Le,De.x,De.y)&&I(De.prev,De,De.next)>=0)return!1;De=De.next}return!0}function u(Q,J,G,ee){var re=Q.prev,fe=Q,we=Q.next;if(I(re,fe,we)>=0)return!1;for(var Oe=re.x,ke=fe.x,Le=we.x,oe=re.y,be=fe.y,_e=we.y,he=Oe<ke?Oe<Le?Oe:Le:ke<Le?ke:Le,De=oe<be?oe<_e?oe:_e:be<_e?be:_e,xe=Oe>ke?Oe>Le?Oe:Le:ke>Le?ke:Le,se=oe>be?oe>_e?oe:_e:be>_e?be:_e,Ee=E(he,De,J,G,ee),Te=E(xe,se,J,G,ee),Be=Q.prevZ,tt=Q.nextZ;Be&&Be.z>=Ee&&tt&&tt.z<=Te;){if(Be.x>=he&&Be.x<=xe&&Be.y>=De&&Be.y<=se&&Be!==re&&Be!==we&&g(Oe,oe,ke,be,Le,_e,Be.x,Be.y)&&I(Be.prev,Be,Be.next)>=0||(Be=Be.prevZ,tt.x>=he&&tt.x<=xe&&tt.y>=De&&tt.y<=se&&tt!==re&&tt!==we&&g(Oe,oe,ke,be,Le,_e,tt.x,tt.y)&&I(tt.prev,tt,tt.next)>=0))return!1;tt=tt.nextZ}for(;Be&&Be.z>=Ee;){if(Be.x>=he&&Be.x<=xe&&Be.y>=De&&Be.y<=se&&Be!==re&&Be!==we&&g(Oe,oe,ke,be,Le,_e,Be.x,Be.y)&&I(Be.prev,Be,Be.next)>=0)return!1;Be=Be.prevZ}for(;tt&&tt.z<=Te;){if(tt.x>=he&&tt.x<=xe&&tt.y>=De&&tt.y<=se&&tt!==re&&tt!==we&&g(Oe,oe,ke,be,Le,_e,tt.x,tt.y)&&I(tt.prev,tt,tt.next)>=0)return!1;tt=tt.nextZ}return!0}function c(Q,J,G){var ee=Q;do{var re=ee.prev,fe=ee.next.next;!N(re,fe)&&F(re,ee,ee.next,fe)&&y(re,fe)&&y(fe,re)&&(J.push(re.i/G|0),J.push(ee.i/G|0),J.push(fe.i/G|0),$(ee),$(ee.next),ee=Q=fe),ee=ee.next}while(ee!==Q);return O(ee)}function p(Q,J,G,ee,re,fe){var we=Q;do{for(var Oe=we.next.next;Oe!==we.prev;){if(we.i!==Oe.i&&C(we,Oe)){var ke=M(we,Oe);we=O(we,we.next),ke=O(ke,ke.next),z(we,J,G,ee,re,fe,0),z(ke,J,G,ee,re,fe,0);return}Oe=Oe.next}we=we.next}while(we!==Q)}function f(Q,J,G,ee){var re=[],fe,we,Oe,ke,Le;for(fe=0,we=J.length;fe<we;fe++)Oe=J[fe]*ee,ke=fe<we-1?J[fe+1]*ee:Q.length,Le=R(Q,Oe,ke,ee,!1),Le===Le.next&&(Le.steiner=!0),re.push(D(Le));for(re.sort(v),fe=0;fe<re.length;fe++)G=h(re[fe],G);return G}function v(Q,J){return Q.x-J.x}function h(Q,J){var G=m(Q,J);if(!G)return J;var ee=M(G,Q);return O(ee,ee.next),O(G,G.next)}function m(Q,J){var G=J,ee=Q.x,re=Q.y,fe=-1/0,we;do{if(re<=G.y&&re>=G.next.y&&G.next.y!==G.y){var Oe=G.x+(re-G.y)*(G.next.x-G.x)/(G.next.y-G.y);if(Oe<=ee&&Oe>fe&&(fe=Oe,we=G.x<G.next.x?G:G.next,Oe===ee))return we}G=G.next}while(G!==J);if(!we)return null;var ke=we,Le=we.x,oe=we.y,be=1/0,_e;G=we;do ee>=G.x&&G.x>=Le&&ee!==G.x&&g(re<oe?ee:fe,re,Le,oe,re<oe?fe:ee,re,G.x,G.y)&&(_e=Math.abs(re-G.y)/(ee-G.x),y(G,Q)&&(_e<be||_e===be&&(G.x>we.x||G.x===we.x&&_(we,G)))&&(we=G,be=_e)),G=G.next;while(G!==ke);return we}function _(Q,J){return I(Q.prev,Q,J.prev)<0&&I(J.next,Q,Q.next)<0}function x(Q,J,G,ee){var re=Q;do re.z===0&&(re.z=E(re.x,re.y,J,G,ee)),re.prevZ=re.prev,re.nextZ=re.next,re=re.next;while(re!==Q);re.prevZ.nextZ=null,re.prevZ=null,A(re)}function A(Q){var J,G,ee,re,fe,we,Oe,ke,Le=1;do{for(G=Q,Q=null,fe=null,we=0;G;){for(we++,ee=G,Oe=0,J=0;J<Le&&(Oe++,ee=ee.nextZ,!!ee);J++);for(ke=Le;Oe>0||ke>0&&ee;)Oe!==0&&(ke===0||!ee||G.z<=ee.z)?(re=G,G=G.nextZ,Oe--):(re=ee,ee=ee.nextZ,ke--),fe?fe.nextZ=re:Q=re,re.prevZ=fe,fe=re;G=ee}fe.nextZ=null,Le*=2}while(we>1);return Q}function E(Q,J,G,ee,re){return Q=(Q-G)*re|0,J=(J-ee)*re|0,Q=(Q|Q<<8)&16711935,Q=(Q|Q<<4)&252645135,Q=(Q|Q<<2)&858993459,Q=(Q|Q<<1)&1431655765,J=(J|J<<8)&16711935,J=(J|J<<4)&252645135,J=(J|J<<2)&858993459,J=(J|J<<1)&1431655765,Q|J<<1}function D(Q){var J=Q,G=Q;do(J.x<G.x||J.x===G.x&&J.y<G.y)&&(G=J),J=J.next;while(J!==Q);return G}function g(Q,J,G,ee,re,fe,we,Oe){return(re-we)*(J-Oe)>=(Q-we)*(fe-Oe)&&(Q-we)*(ee-Oe)>=(G-we)*(J-Oe)&&(G-we)*(fe-Oe)>=(re-we)*(ee-Oe)}function C(Q,J){return Q.next.i!==J.i&&Q.prev.i!==J.i&&!T(Q,J)&&(y(Q,J)&&y(J,Q)&&S(Q,J)&&(I(Q.prev,Q,J.prev)||I(Q,J.prev,J))||N(Q,J)&&I(Q.prev,Q,Q.next)>0&&I(J.prev,J,J.next)>0)}function I(Q,J,G){return(J.y-Q.y)*(G.x-J.x)-(J.x-Q.x)*(G.y-J.y)}function N(Q,J){return Q.x===J.x&&Q.y===J.y}function F(Q,J,G,ee){var re=P(I(Q,J,G)),fe=P(I(Q,J,ee)),we=P(I(G,ee,Q)),Oe=P(I(G,ee,J));return!!(re!==fe&&we!==Oe||re===0&&k(Q,G,J)||fe===0&&k(Q,ee,J)||we===0&&k(G,Q,ee)||Oe===0&&k(G,J,ee))}function k(Q,J,G){return J.x<=Math.max(Q.x,G.x)&&J.x>=Math.min(Q.x,G.x)&&J.y<=Math.max(Q.y,G.y)&&J.y>=Math.min(Q.y,G.y)}function P(Q){return Q>0?1:Q<0?-1:0}function T(Q,J){var G=Q;do{if(G.i!==Q.i&&G.next.i!==Q.i&&G.i!==J.i&&G.next.i!==J.i&&F(G,G.next,Q,J))return!0;G=G.next}while(G!==Q);return!1}function y(Q,J){return I(Q.prev,Q,Q.next)<0?I(Q,J,Q.next)>=0&&I(Q,Q.prev,J)>=0:I(Q,J,Q.prev)<0||I(Q,Q.next,J)<0}function S(Q,J){var G=Q,ee=!1,re=(Q.x+J.x)/2,fe=(Q.y+J.y)/2;do G.y>fe!=G.next.y>fe&&G.next.y!==G.y&&re<(G.next.x-G.x)*(fe-G.y)/(G.next.y-G.y)+G.x&&(ee=!ee),G=G.next;while(G!==Q);return ee}function M(Q,J){var G=new Z(Q.i,Q.x,Q.y),ee=new Z(J.i,J.x,J.y),re=Q.next,fe=J.prev;return Q.next=J,J.prev=Q,G.next=re,re.prev=G,ee.next=G,G.prev=ee,fe.next=ee,ee.prev=fe,ee}function W(Q,J,G,ee){var re=new Z(Q,J,G);return ee?(re.next=ee.next,re.prev=ee,ee.next.prev=re,ee.next=re):(re.prev=re,re.next=re),re}function $(Q){Q.next.prev=Q.prev,Q.prev.next=Q.next,Q.prevZ&&(Q.prevZ.nextZ=Q.nextZ),Q.nextZ&&(Q.nextZ.prevZ=Q.prevZ)}function Z(Q,J,G){this.i=Q,this.x=J,this.y=G,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}w.deviation=function(Q,J,G,ee){var re=J&&J.length,fe=re?J[0]*G:Q.length,we=Math.abs(K(Q,0,fe,G));if(re)for(var Oe=0,ke=J.length;Oe<ke;Oe++){var Le=J[Oe]*G,oe=Oe<ke-1?J[Oe+1]*G:Q.length;we-=Math.abs(K(Q,Le,oe,G))}var be=0;for(Oe=0;Oe<ee.length;Oe+=3){var _e=ee[Oe]*G,he=ee[Oe+1]*G,De=ee[Oe+2]*G;be+=Math.abs((Q[_e]-Q[De])*(Q[he+1]-Q[_e+1])-(Q[_e]-Q[he])*(Q[De+1]-Q[_e+1]))}return we===0&&be===0?0:Math.abs((be-we)/we)};function K(Q,J,G,ee){for(var re=0,fe=J,we=G-ee;fe<G;fe+=ee)re+=(Q[we]-Q[fe])*(Q[fe+1]+Q[we+1]),we=fe;return re}w.flatten=function(Q){for(var J=Q[0][0].length,G={vertices:[],holes:[],dimensions:J},ee=0,re=0;re<Q.length;re++){for(var fe=0;fe<Q[re].length;fe++)for(var we=0;we<J;we++)G.vertices.push(Q[re][fe][we]);re>0&&(ee+=Q[re-1].length,G.holes.push(ee))}return G}}}),$Je=U({"node_modules/array-normalize/index.js"(pe,le){var w=M6();le.exports=R;function R(O,z,l){if(!O||O.length==null)throw Error("Argument should be an array");z==null&&(z=1),l==null&&(l=w(O,z));for(var u=0;u<z;u++){var c=l[z+u],p=l[u],f=u,v=O.length;if(c===1/0&&p===-1/0)for(f=u;f<v;f+=z)O[f]=O[f]===c?1:O[f]===p?0:.5;else if(c===1/0)for(f=u;f<v;f+=z)O[f]=O[f]===c?1:0;else if(p===-1/0)for(f=u;f<v;f+=z)O[f]=O[f]===p?0:1;else{var h=c-p;for(f=u;f<v;f+=z)isNaN(O[f])||(O[f]=h===0?.5:(O[f]-p)/h)}}return O}}}),WJe=U({"node_modules/es6-weak-map/is-implemented.js"(pe,le){le.exports=function(){var w,R;if(typeof WeakMap!="function")return!1;try{w=new WeakMap([[R={},"one"],[{},"two"],[{},"three"]])}catch{return!1}return!(String(w)!=="[object WeakMap]"||typeof w.set!="function"||w.set({},1)!==w||typeof w.delete!="function"||typeof w.has!="function"||w.get(R)!=="one")}}}),YJe=U({"node_modules/es5-ext/function/noop.js"(pe,le){le.exports=function(){}}}),$4=U({"node_modules/es5-ext/object/is-value.js"(pe,le){var w=YJe()();le.exports=function(R){return R!==w&&R!==null}}}),Wbe=U({"node_modules/es5-ext/object/set-prototype-of/is-implemented.js"(pe,le){var w=Object.create,R=Object.getPrototypeOf,O={};le.exports=function(){var z=Object.setPrototypeOf,l=arguments[0]||w;return typeof z!="function"?!1:R(z(l(null),O))===O}}}),Ybe=U({"node_modules/es5-ext/object/is-object.js"(pe,le){var w=$4(),R={function:!0,object:!0};le.exports=function(O){return w(O)&&R[typeof O]||!1}}}),PI=U({"node_modules/es5-ext/object/valid-value.js"(pe,le){var w=$4();le.exports=function(R){if(!w(R))throw new TypeError("Cannot use null or undefined");return R}}}),XJe=U({"node_modules/es5-ext/object/create.js"(pe,le){var w=Object.create,R;Wbe()()||(R=Xbe()),le.exports=(function(){var O,z,l;return!R||R.level!==1?w:(O={},z={},l={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(u){if(u==="__proto__"){z[u]={configurable:!0,enumerable:!1,writable:!0,value:void 0};return}z[u]=l}),Object.defineProperties(O,z),Object.defineProperty(R,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:O}),function(u,c){return w(u===null?O:u,c)})})()}}),Xbe=U({"node_modules/es5-ext/object/set-prototype-of/shim.js"(pe,le){var w=Ybe(),R=PI(),O=Object.prototype.isPrototypeOf,z=Object.defineProperty,l={configurable:!0,enumerable:!1,writable:!0,value:void 0},u;u=function(c,p){if(R(c),p===null||w(p))return c;throw new TypeError("Prototype must be null or an object")},le.exports=(function(c){var p,f;return c?(c.level===2?c.set?(f=c.set,p=function(v,h){return f.call(u(v,h),h),v}):p=function(v,h){return u(v,h).__proto__=h,v}:p=function v(h,m){var _;return u(h,m),_=O.call(v.nullPolyfill,h),_&&delete v.nullPolyfill.__proto__,m===null&&(m=v.nullPolyfill),h.__proto__=m,_&&z(v.nullPolyfill,"__proto__",l),h},Object.defineProperty(p,"level",{configurable:!1,enumerable:!1,writable:!1,value:c.level})):null})((function(){var c=Object.create(null),p={},f,v=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(v){try{f=v.set,f.call(c,p)}catch{}if(Object.getPrototypeOf(c)===p)return{set:f,level:2}}return c.__proto__=p,Object.getPrototypeOf(c)===p?{level:2}:(c={},c.__proto__=p,Object.getPrototypeOf(c)===p?{level:1}:!1)})()),XJe()}}),hK=U({"node_modules/es5-ext/object/set-prototype-of/index.js"(pe,le){le.exports=Wbe()()?Object.setPrototypeOf:Xbe()}}),ZJe=U({"node_modules/es5-ext/object/valid-object.js"(pe,le){var w=Ybe();le.exports=function(R){if(!w(R))throw new TypeError(R+" is not an Object");return R}}}),KJe=U({"node_modules/es5-ext/string/random-uniq.js"(pe,le){var w=Object.create(null),R=Math.random;le.exports=function(){var O;do O=R().toString(36).slice(2);while(w[O]);return O}}}),I6=U({"node_modules/type/value/is.js"(pe,le){var w=void 0;le.exports=function(R){return R!==w&&R!==null}}}),pK=U({"node_modules/type/object/is.js"(pe,le){var w=I6(),R={object:!0,function:!0,undefined:!0};le.exports=function(O){return w(O)?hasOwnProperty.call(R,typeof O):!1}}}),JJe=U({"node_modules/type/prototype/is.js"(pe,le){var w=pK();le.exports=function(R){if(!w(R))return!1;try{return R.constructor?R.constructor.prototype===R:!1}catch{return!1}}}}),QJe=U({"node_modules/type/function/is.js"(pe,le){var w=JJe();le.exports=function(R){if(typeof R!="function"||!hasOwnProperty.call(R,"length"))return!1;try{if(typeof R.length!="number"||typeof R.call!="function"||typeof R.apply!="function")return!1}catch{return!1}return!w(R)}}}),Zbe=U({"node_modules/type/plain-function/is.js"(pe,le){var w=QJe(),R=/^\s*class[\s{/}]/,O=Function.prototype.toString;le.exports=function(z){return!(!w(z)||R.test(O.call(z)))}}}),eQe=U({"node_modules/es5-ext/object/assign/is-implemented.js"(pe,le){le.exports=function(){var w=Object.assign,R;return typeof w!="function"?!1:(R={foo:"raz"},w(R,{bar:"dwa"},{trzy:"trzy"}),R.foo+R.bar+R.trzy==="razdwatrzy")}}}),tQe=U({"node_modules/es5-ext/object/keys/is-implemented.js"(pe,le){le.exports=function(){try{return Object.keys("primitive"),!0}catch{return!1}}}}),rQe=U({"node_modules/es5-ext/object/keys/shim.js"(pe,le){var w=$4(),R=Object.keys;le.exports=function(O){return R(w(O)?Object(O):O)}}}),nQe=U({"node_modules/es5-ext/object/keys/index.js"(pe,le){le.exports=tQe()()?Object.keys:rQe()}}),iQe=U({"node_modules/es5-ext/object/assign/shim.js"(pe,le){var w=nQe(),R=PI(),O=Math.max;le.exports=function(z,l){var u,c,p=O(arguments.length,2),f;for(z=Object(R(z)),f=function(v){try{z[v]=l[v]}catch(h){u||(u=h)}},c=1;c<p;++c)l=arguments[c],w(l).forEach(f);if(u!==void 0)throw u;return z}}}),vK=U({"node_modules/es5-ext/object/assign/index.js"(pe,le){le.exports=eQe()()?Object.assign:iQe()}}),Kbe=U({"node_modules/es5-ext/object/normalize-options.js"(pe,le){var w=$4(),R=Array.prototype.forEach,O=Object.create,z=function(l,u){var c;for(c in l)u[c]=l[c]};le.exports=function(l){var u=O(null);return R.call(arguments,function(c){w(c)&&z(Object(c),u)}),u}}}),aQe=U({"node_modules/es5-ext/string/#/contains/is-implemented.js"(pe,le){var w="razdwatrzy";le.exports=function(){return typeof w.contains!="function"?!1:w.contains("dwa")===!0&&w.contains("foo")===!1}}}),oQe=U({"node_modules/es5-ext/string/#/contains/shim.js"(pe,le){var w=String.prototype.indexOf;le.exports=function(R){return w.call(this,R,arguments[1])>-1}}}),Jbe=U({"node_modules/es5-ext/string/#/contains/index.js"(pe,le){le.exports=aQe()()?String.prototype.contains:oQe()}}),DI=U({"node_modules/d/index.js"(pe,le){var w=I6(),R=Zbe(),O=vK(),z=Kbe(),l=Jbe(),u=le.exports=function(c,p){var f,v,h,m,_;return arguments.length<2||typeof c!="string"?(m=p,p=c,c=null):m=arguments[2],w(c)?(f=l.call(c,"c"),v=l.call(c,"e"),h=l.call(c,"w")):(f=h=!0,v=!1),_={value:p,configurable:f,enumerable:v,writable:h},m?O(z(m),_):_};u.gs=function(c,p,f){var v,h,m,_;return typeof c!="string"?(m=f,f=p,p=c,c=null):m=arguments[3],w(p)?R(p)?w(f)?R(f)||(m=f,f=void 0):f=void 0:(m=p,p=f=void 0):p=void 0,w(c)?(v=l.call(c,"c"),h=l.call(c,"e")):(v=!0,h=!1),_={get:p,set:f,configurable:v,enumerable:h},m?O(z(m),_):_}}}),jU=U({"node_modules/es5-ext/function/is-arguments.js"(pe,le){var w=Object.prototype.toString,R=w.call((function(){return arguments})());le.exports=function(O){return w.call(O)===R}}}),VU=U({"node_modules/es5-ext/string/is-string.js"(pe,le){var w=Object.prototype.toString,R=w.call("");le.exports=function(O){return typeof O=="string"||O&&typeof O=="object"&&(O instanceof String||w.call(O)===R)||!1}}}),sQe=U({"node_modules/ext/global-this/is-implemented.js"(pe,le){le.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}}}),lQe=U({"node_modules/ext/global-this/implementation.js"(pe,le){var w=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};le.exports=(function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return w()}try{return __global__||w()}finally{delete Object.prototype.__global__}})()}}),qU=U({"node_modules/ext/global-this/index.js"(pe,le){le.exports=sQe()()?globalThis:lQe()}}),uQe=U({"node_modules/es6-symbol/is-implemented.js"(pe,le){var w=qU(),R={object:!0,symbol:!0};le.exports=function(){var O=w.Symbol,z;if(typeof O!="function")return!1;z=O("test symbol");try{String(z)}catch{return!1}return!(!R[typeof O.iterator]||!R[typeof O.toPrimitive]||!R[typeof O.toStringTag])}}}),cQe=U({"node_modules/es6-symbol/is-symbol.js"(pe,le){le.exports=function(w){return w?typeof w=="symbol"?!0:!w.constructor||w.constructor.name!=="Symbol"?!1:w[w.constructor.toStringTag]==="Symbol":!1}}}),Qbe=U({"node_modules/es6-symbol/validate-symbol.js"(pe,le){var w=cQe();le.exports=function(R){if(!w(R))throw new TypeError(R+" is not a symbol");return R}}}),fQe=U({"node_modules/es6-symbol/lib/private/generate-name.js"(pe,le){var w=DI(),R=Object.create,O=Object.defineProperty,z=Object.prototype,l=R(null);le.exports=function(u){for(var c=0,p,f;l[u+(c||"")];)++c;return u+=c||"",l[u]=!0,p="@@"+u,O(z,p,w.gs(null,function(v){f||(f=!0,O(this,p,w(v)),f=!1)})),p}}}),dQe=U({"node_modules/es6-symbol/lib/private/setup/standard-symbols.js"(pe,le){var w=DI(),R=qU().Symbol;le.exports=function(O){return Object.defineProperties(O,{hasInstance:w("",R&&R.hasInstance||O("hasInstance")),isConcatSpreadable:w("",R&&R.isConcatSpreadable||O("isConcatSpreadable")),iterator:w("",R&&R.iterator||O("iterator")),match:w("",R&&R.match||O("match")),replace:w("",R&&R.replace||O("replace")),search:w("",R&&R.search||O("search")),species:w("",R&&R.species||O("species")),split:w("",R&&R.split||O("split")),toPrimitive:w("",R&&R.toPrimitive||O("toPrimitive")),toStringTag:w("",R&&R.toStringTag||O("toStringTag")),unscopables:w("",R&&R.unscopables||O("unscopables"))})}}}),hQe=U({"node_modules/es6-symbol/lib/private/setup/symbol-registry.js"(pe,le){var w=DI(),R=Qbe(),O=Object.create(null);le.exports=function(z){return Object.defineProperties(z,{for:w(function(l){return O[l]?O[l]:O[l]=z(String(l))}),keyFor:w(function(l){var u;R(l);for(u in O)if(O[u]===l)return u})})}}}),pQe=U({"node_modules/es6-symbol/polyfill.js"(pe,le){var w=DI(),R=Qbe(),O=qU().Symbol,z=fQe(),l=dQe(),u=hQe(),c=Object.create,p=Object.defineProperties,f=Object.defineProperty,v,h,m;if(typeof O=="function")try{String(O()),m=!0}catch{}else O=null;h=function(x){if(this instanceof h)throw new TypeError("Symbol is not a constructor");return v(x)},le.exports=v=function _(x){var A;if(this instanceof _)throw new TypeError("Symbol is not a constructor");return m?O(x):(A=c(h.prototype),x=x===void 0?"":String(x),p(A,{__description__:w("",x),__name__:w("",z(x))}))},l(v),u(v),p(h.prototype,{constructor:w(v),toString:w("",function(){return this.__name__})}),p(v.prototype,{toString:w(function(){return"Symbol ("+R(this).__description__+")"}),valueOf:w(function(){return R(this)})}),f(v.prototype,v.toPrimitive,w("",function(){var _=R(this);return typeof _=="symbol"?_:_.toString()})),f(v.prototype,v.toStringTag,w("c","Symbol")),f(h.prototype,v.toStringTag,w("c",v.prototype[v.toStringTag])),f(h.prototype,v.toPrimitive,w("c",v.prototype[v.toPrimitive]))}}),W4=U({"node_modules/es6-symbol/index.js"(pe,le){le.exports=uQe()()?qU().Symbol:pQe()}}),vQe=U({"node_modules/es5-ext/array/#/clear.js"(pe,le){var w=PI();le.exports=function(){return w(this).length=0,this}}}),UF=U({"node_modules/es5-ext/object/valid-callable.js"(pe,le){le.exports=function(w){if(typeof w!="function")throw new TypeError(w+" is not a function");return w}}}),mQe=U({"node_modules/type/string/coerce.js"(pe,le){var w=I6(),R=pK(),O=Object.prototype.toString;le.exports=function(z){if(!w(z))return null;if(R(z)){var l=z.toString;if(typeof l!="function"||l===O)return null}try{return""+z}catch{return null}}}}),gQe=U({"node_modules/type/lib/safe-to-string.js"(pe,le){le.exports=function(w){try{return w.toString()}catch{try{return String(w)}catch{return null}}}}}),yQe=U({"node_modules/type/lib/to-short-string.js"(pe,le){var w=gQe(),R=/[\n\r\u2028\u2029]/g;le.exports=function(O){var z=w(O);return z===null?"<Non-coercible to string value>":(z.length>100&&(z=z.slice(0,99)+"…"),z=z.replace(R,function(l){switch(l){case`
`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),z)}}}),exe=U({"node_modules/type/lib/resolve-exception.js"(pe,le){var w=I6(),R=pK(),O=mQe(),z=yQe(),l=function(u,c){return u.replace("%v",z(c))};le.exports=function(u,c,p){if(!R(p))throw new TypeError(l(c,u));if(!w(u)){if("default"in p)return p.default;if(p.isOptional)return null}var f=O(p.errorMessage);throw w(f)||(f=c),new TypeError(l(f,u))}}}),bQe=U({"node_modules/type/value/ensure.js"(pe,le){var w=exe(),R=I6();le.exports=function(O){return R(O)?O:w(O,"Cannot use %v",arguments[1])}}}),xQe=U({"node_modules/type/plain-function/ensure.js"(pe,le){var w=exe(),R=Zbe();le.exports=function(O){return R(O)?O:w(O,"%v is not a plain function",arguments[1])}}}),_Qe=U({"node_modules/es5-ext/array/from/is-implemented.js"(pe,le){le.exports=function(){var w=Array.from,R,O;return typeof w!="function"?!1:(R=["raz","dwa"],O=w(R),!!(O&&O!==R&&O[1]==="dwa"))}}}),wQe=U({"node_modules/es5-ext/function/is-function.js"(pe,le){var w=Object.prototype.toString,R=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);le.exports=function(O){return typeof O=="function"&&R(w.call(O))}}}),SQe=U({"node_modules/es5-ext/math/sign/is-implemented.js"(pe,le){le.exports=function(){var w=Math.sign;return typeof w!="function"?!1:w(10)===1&&w(-20)===-1}}}),TQe=U({"node_modules/es5-ext/math/sign/shim.js"(pe,le){le.exports=function(w){return w=Number(w),isNaN(w)||w===0?w:w>0?1:-1}}}),EQe=U({"node_modules/es5-ext/math/sign/index.js"(pe,le){le.exports=SQe()()?Math.sign:TQe()}}),AQe=U({"node_modules/es5-ext/number/to-integer.js"(pe,le){var w=EQe(),R=Math.abs,O=Math.floor;le.exports=function(z){return isNaN(z)?0:(z=Number(z),z===0||!isFinite(z)?z:w(z)*O(R(z)))}}}),CQe=U({"node_modules/es5-ext/number/to-pos-integer.js"(pe,le){var w=AQe(),R=Math.max;le.exports=function(O){return R(0,w(O))}}}),MQe=U({"node_modules/es5-ext/array/from/shim.js"(pe,le){var w=W4().iterator,R=jU(),O=wQe(),z=CQe(),l=UF(),u=PI(),c=$4(),p=VU(),f=Array.isArray,v=Function.prototype.call,h={configurable:!0,enumerable:!0,writable:!0,value:null},m=Object.defineProperty;le.exports=function(_){var x=arguments[1],A=arguments[2],E,D,g,C,I,N,F,k,P,T;if(_=Object(u(_)),c(x)&&l(x),!this||this===Array||!O(this)){if(!x){if(R(_))return I=_.length,I!==1?Array.apply(null,_):(C=new Array(1),C[0]=_[0],C);if(f(_)){for(C=new Array(I=_.length),D=0;D<I;++D)C[D]=_[D];return C}}C=[]}else E=this;if(!f(_)){if((P=_[w])!==void 0){for(F=l(P).call(_),E&&(C=new E),k=F.next(),D=0;!k.done;)T=x?v.call(x,A,k.value,D):k.value,E?(h.value=T,m(C,D,h)):C[D]=T,k=F.next(),++D;I=D}else if(p(_)){for(I=_.length,E&&(C=new E),D=0,g=0;D<I;++D)T=_[D],D+1<I&&(N=T.charCodeAt(0),N>=55296&&N<=56319&&(T+=_[++D])),T=x?v.call(x,A,T,g):T,E?(h.value=T,m(C,g,h)):C[g]=T,++g;I=g}}if(I===void 0)for(I=z(_.length),E&&(C=new E(I)),D=0;D<I;++D)T=x?v.call(x,A,_[D],D):_[D],E?(h.value=T,m(C,D,h)):C[D]=T;return E&&(h.value=null,C.length=I),C}}}),RQe=U({"node_modules/es5-ext/array/from/index.js"(pe,le){le.exports=_Qe()()?Array.from:MQe()}}),kQe=U({"node_modules/es5-ext/object/copy.js"(pe,le){var w=RQe(),R=vK(),O=PI();le.exports=function(z){var l=Object(O(z)),u=arguments[1],c=Object(arguments[2]);if(l!==z&&!u)return l;var p={};return u?w(u,function(f){(c.ensure||f in z)&&(p[f]=z[f])}):R(p,z),p}}}),IQe=U({"node_modules/es5-ext/object/_iterate.js"(pe,le){var w=UF(),R=PI(),O=Function.prototype.bind,z=Function.prototype.call,l=Object.keys,u=Object.prototype.propertyIsEnumerable;le.exports=function(c,p){return function(f,v){var h,m=arguments[2],_=arguments[3];return f=Object(R(f)),w(v),h=l(f),_&&h.sort(typeof _=="function"?O.call(_,f):void 0),typeof c!="function"&&(c=h[c]),z.call(c,h,function(x,A){return u.call(f,x)?z.call(v,m,f[x],x,f,A):p})}}}}),PQe=U({"node_modules/es5-ext/object/for-each.js"(pe,le){le.exports=IQe()("forEach")}}),DQe=U({"node_modules/es5-ext/object/map.js"(pe,le){var w=UF(),R=PQe(),O=Function.prototype.call;le.exports=function(z,l){var u={},c=arguments[2];return w(l),R(z,function(p,f,v,h){u[f]=O.call(l,c,p,f,v,h)}),u}}}),LQe=U({"node_modules/d/auto-bind.js"(pe,le){var w=I6(),R=bQe(),O=xQe(),z=kQe(),l=Kbe(),u=DQe(),c=Function.prototype.bind,p=Object.defineProperty,f=Object.prototype.hasOwnProperty,v;v=function(h,m,_){var x=R(m)&&O(m.value),A;return A=z(m),delete A.writable,delete A.value,A.get=function(){return!_.overwriteDefinition&&f.call(this,h)?x:(m.value=c.call(x,_.resolveContext?_.resolveContext(this):this),p(this,h,m),this[h])},A},le.exports=function(h){var m=l(arguments[1]);return w(m.resolveContext)&&O(m.resolveContext),u(h,function(_,x){return v(x,_,m)})}}}),txe=U({"node_modules/es6-iterator/index.js"(pe,le){var w=vQe(),R=vK(),O=UF(),z=PI(),l=DI(),u=LQe(),c=W4(),p=Object.defineProperty,f=Object.defineProperties,v;le.exports=v=function(h,m){if(!(this instanceof v))throw new TypeError("Constructor requires 'new'");f(this,{__list__:l("w",z(h)),__context__:l("w",m),__nextIndex__:l("w",0)}),m&&(O(m.on),m.on("_add",this._onAdd),m.on("_delete",this._onDelete),m.on("_clear",this._onClear))},delete v.prototype.constructor,f(v.prototype,R({_next:l(function(){var h;if(this.__list__){if(this.__redo__&&(h=this.__redo__.shift(),h!==void 0))return h;if(this.__nextIndex__<this.__list__.length)return this.__nextIndex__++;this._unBind()}}),next:l(function(){return this._createResult(this._next())}),_createResult:l(function(h){return h===void 0?{done:!0,value:void 0}:{done:!1,value:this._resolve(h)}}),_resolve:l(function(h){return this.__list__[h]}),_unBind:l(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:l(function(){return"[object "+(this[c.toStringTag]||"Object")+"]"})},u({_onAdd:l(function(h){if(!(h>=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){p(this,"__redo__",l("c",[h]));return}this.__redo__.forEach(function(m,_){m>=h&&(this.__redo__[_]=++m)},this),this.__redo__.push(h)}}),_onDelete:l(function(h){var m;h>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(m=this.__redo__.indexOf(h),m!==-1&&this.__redo__.splice(m,1),this.__redo__.forEach(function(_,x){_>h&&(this.__redo__[x]=--_)},this)))}),_onClear:l(function(){this.__redo__&&w.call(this.__redo__),this.__nextIndex__=0})}))),p(v.prototype,c.iterator,l(function(){return this}))}}),OQe=U({"node_modules/es6-iterator/array.js"(pe,le){var w=hK(),R=Jbe(),O=DI(),z=W4(),l=txe(),u=Object.defineProperty,c;c=le.exports=function(p,f){if(!(this instanceof c))throw new TypeError("Constructor requires 'new'");l.call(this,p),f?R.call(f,"key+value")?f="key+value":R.call(f,"key")?f="key":f="value":f="value",u(this,"__kind__",O("",f))},w&&w(c,l),delete c.prototype.constructor,c.prototype=Object.create(l.prototype,{_resolve:O(function(p){return this.__kind__==="value"?this.__list__[p]:this.__kind__==="key+value"?[p,this.__list__[p]]:p})}),u(c.prototype,z.toStringTag,O("c","Array Iterator"))}}),NQe=U({"node_modules/es6-iterator/string.js"(pe,le){var w=hK(),R=DI(),O=W4(),z=txe(),l=Object.defineProperty,u;u=le.exports=function(c){if(!(this instanceof u))throw new TypeError("Constructor requires 'new'");c=String(c),z.call(this,c),l(this,"__length__",R("",c.length))},w&&w(u,z),delete u.prototype.constructor,u.prototype=Object.create(z.prototype,{_next:R(function(){if(this.__list__){if(this.__nextIndex__<this.__length__)return this.__nextIndex__++;this._unBind()}}),_resolve:R(function(c){var p=this.__list__[c],f;return this.__nextIndex__===this.__length__?p:(f=p.charCodeAt(0),f>=55296&&f<=56319?p+this.__list__[this.__nextIndex__++]:p)})}),l(u.prototype,O.toStringTag,R("c","String Iterator"))}}),FQe=U({"node_modules/es6-iterator/is-iterable.js"(pe,le){var w=jU(),R=$4(),O=VU(),z=W4().iterator,l=Array.isArray;le.exports=function(u){return R(u)?l(u)||O(u)||w(u)?!0:typeof u[z]=="function":!1}}}),zQe=U({"node_modules/es6-iterator/valid-iterable.js"(pe,le){var w=FQe();le.exports=function(R){if(!w(R))throw new TypeError(R+" is not iterable");return R}}}),rxe=U({"node_modules/es6-iterator/get.js"(pe,le){var w=jU(),R=VU(),O=OQe(),z=NQe(),l=zQe(),u=W4().iterator;le.exports=function(c){return typeof l(c)[u]=="function"?c[u]():w(c)?new O(c):R(c)?new z(c):new O(c)}}}),BQe=U({"node_modules/es6-iterator/for-of.js"(pe,le){var w=jU(),R=UF(),O=VU(),z=rxe(),l=Array.isArray,u=Function.prototype.call,c=Array.prototype.some;le.exports=function(p,f){var v,h=arguments[2],m,_,x,A,E,D,g;if(l(p)||w(p)?v="array":O(p)?v="string":p=z(p),R(f),_=function(){x=!0},v==="array"){c.call(p,function(C){return u.call(f,h,C,_),x});return}if(v==="string"){for(E=p.length,A=0;A<E&&(D=p[A],A+1<E&&(g=D.charCodeAt(0),g>=55296&&g<=56319&&(D+=p[++A])),u.call(f,h,D,_),!x);++A);return}for(m=p.next();!m.done;){if(u.call(f,h,m.value,_),x)return;m=p.next()}}}}),UQe=U({"node_modules/es6-weak-map/is-native-implemented.js"(pe,le){le.exports=(function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"})()}}),HQe=U({"node_modules/es6-weak-map/polyfill.js"(pe,le){var w=$4(),R=hK(),O=ZJe(),z=PI(),l=KJe(),u=DI(),c=rxe(),p=BQe(),f=W4().toStringTag,v=UQe(),h=Array.isArray,m=Object.defineProperty,_=Object.prototype.hasOwnProperty,x=Object.getPrototypeOf,A;le.exports=A=function(){var E=arguments[0],D;if(!(this instanceof A))throw new TypeError("Constructor requires 'new'");return D=v&&R&&WeakMap!==A?R(new WeakMap,x(this)):this,w(E)&&(h(E)||(E=c(E))),m(D,"__weakMapData__",u("c","$weakMap$"+l())),E&&p(E,function(g){z(g),D.set(g[0],g[1])}),D},v&&(R&&R(A,WeakMap),A.prototype=Object.create(WeakMap.prototype,{constructor:u(A)})),Object.defineProperties(A.prototype,{delete:u(function(E){return _.call(O(E),this.__weakMapData__)?(delete E[this.__weakMapData__],!0):!1}),get:u(function(E){if(_.call(O(E),this.__weakMapData__))return E[this.__weakMapData__]}),has:u(function(E){return _.call(O(E),this.__weakMapData__)}),set:u(function(E,D){return m(O(E),this.__weakMapData__,u("c",D)),this}),toString:u(function(){return"[object WeakMap]"})}),m(A.prototype,f,u("c","WeakMap"))}}),nxe=U({"node_modules/es6-weak-map/index.js"(pe,le){le.exports=WJe()()?WeakMap:HQe()}}),jQe=U({"node_modules/array-find-index/index.js"(pe,le){le.exports=function(w,R,O){if(typeof Array.prototype.findIndex=="function")return w.findIndex(R,O);if(typeof R!="function")throw new TypeError("predicate must be a function");var z=Object(w),l=z.length;if(l===0)return-1;for(var u=0;u<l;u++)if(R.call(O,z[u],u,z))return u;return-1}}}),ixe=U({"node_modules/regl-line2d/index.js"(pe,le){var w=H4(),R=M6(),O=F1(),z=NR(),l=R6(),u=GJe(),c=$Je(),{float32:p,fract32:f}=dK(),v=nxe(),h=BF(),m=jQe(),_=`
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.;
}
`,x=`
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;
}
`,A=`
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;
}
`,E=`
precision highp float;
varying vec4 fragColor;

void main() {
	gl_FragColor = fragColor;
}
`,D=`
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;
		}
	}
}
`,g=`
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;
}
`;le.exports=C;function C(I,N){if(!(this instanceof C))return new C(I,N);if(typeof I=="function"?(N||(N={}),N.regl=I):N=I,N.length&&(N.positions=N),I=N.regl,!I.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=I._gl,this.regl=I,this.passes=[],this.shaders=C.shaders.has(I)?C.shaders.get(I):C.shaders.set(I,C.createShaders(I)).get(I),this.update(N)}C.dashMult=2,C.maxPatternLength=256,C.precisionThreshold=3e6,C.maxPoints=1e4,C.maxLines=2048,C.shaders=new v,C.createShaders=function(I){let N=I.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),F={primitive:"triangle strip",instances:I.prop("count"),count:4,offset:0,uniforms:{miterMode:(y,S)=>S.join==="round"?2:1,miterLimit:I.prop("miterLimit"),scale:I.prop("scale"),scaleFract:I.prop("scaleFract"),translateFract:I.prop("translateFract"),translate:I.prop("translate"),thickness:I.prop("thickness"),dashTexture:I.prop("dashTexture"),opacity:I.prop("opacity"),pixelRatio:I.context("pixelRatio"),id:I.prop("id"),dashLength:I.prop("dashLength"),viewport:(y,S)=>[S.viewport.x,S.viewport.y,y.viewportWidth,y.viewportHeight],depth:I.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:(y,S)=>!S.overlay},stencil:{enable:!1},scissor:{enable:!0,box:I.prop("viewport")},viewport:I.prop("viewport")},k=I(O({vert:_,frag:x,attributes:{lineEnd:{buffer:N,divisor:0,stride:8,offset:0},lineTop:{buffer:N,divisor:0,stride:8,offset:4},aCoord:{buffer:I.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:I.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:I.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:I.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:I.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},F)),P;try{P=I(O({cull:{enable:!0,face:"back"},vert:D,frag:g,attributes:{lineEnd:{buffer:N,divisor:0,stride:8,offset:0},lineTop:{buffer:N,divisor:0,stride:8,offset:4},aColor:{buffer:I.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:I.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:I.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:I.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:I.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:I.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},F))}catch{P=k}return{fill:I({primitive:"triangle",elements:(y,S)=>S.triangles,offset:0,vert:A,frag:E,uniforms:{scale:I.prop("scale"),color:I.prop("fill"),scaleFract:I.prop("scaleFract"),translateFract:I.prop("translateFract"),translate:I.prop("translate"),opacity:I.prop("opacity"),pixelRatio:I.context("pixelRatio"),id:I.prop("id"),viewport:(y,S)=>[S.viewport.x,S.viewport.y,y.viewportWidth,y.viewportHeight]},attributes:{position:{buffer:I.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:I.prop("positionFractBuffer"),stride:8,offset:8}},blend:F.blend,depth:{enable:!1},scissor:F.scissor,stencil:F.stencil,viewport:F.viewport}),rect:k,miter:P}},C.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},C.prototype.render=function(...I){I.length&&this.update(...I),this.draw()},C.prototype.draw=function(...I){return(I.length?I:this.passes).forEach((N,F)=>{if(N&&Array.isArray(N))return this.draw(...N);typeof N=="number"&&(N=this.passes[N]),N&&N.count>1&&N.opacity&&(this.regl._refresh(),N.fill&&N.triangles&&N.triangles.length>2&&this.shaders.fill(N),N.thickness&&(N.scale[0]*N.viewport.width>C.precisionThreshold||N.scale[1]*N.viewport.height>C.precisionThreshold?this.shaders.rect(N):N.join==="rect"||!N.join&&(N.thickness<=2||N.count>=C.maxPoints)?this.shaders.rect(N):this.shaders.miter(N)))}),this},C.prototype.update=function(I){if(!I)return;I.length!=null?typeof I[0]=="number"&&(I=[{positions:I}]):Array.isArray(I)||(I=[I]);let{regl:N,gl:F}=this;if(I.forEach((P,T)=>{let y=this.passes[T];if(P!==void 0){if(P===null){this.passes[T]=null;return}if(typeof P[0]=="number"&&(P={positions:P}),P=z(P,{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"}),y||(this.passes[T]=y={id:T,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:N.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:N.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:N.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:N.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},P=O({},C.defaults,P)),P.thickness!=null&&(y.thickness=parseFloat(P.thickness)),P.opacity!=null&&(y.opacity=parseFloat(P.opacity)),P.miterLimit!=null&&(y.miterLimit=parseFloat(P.miterLimit)),P.overlay!=null&&(y.overlay=!!P.overlay,T<C.maxLines&&(y.depth=2*(C.maxLines-1-T%C.maxLines)/C.maxLines-1)),P.join!=null&&(y.join=P.join),P.hole!=null&&(y.hole=P.hole),P.fill!=null&&(y.fill=P.fill?w(P.fill,"uint8"):null),P.viewport!=null&&(y.viewport=h(P.viewport)),y.viewport||(y.viewport=h([F.drawingBufferWidth,F.drawingBufferHeight])),P.close!=null&&(y.close=P.close),P.positions===null&&(P.positions=[]),P.positions){let W,$;if(P.positions.x&&P.positions.y){let J=P.positions.x,G=P.positions.y;$=y.count=Math.max(J.length,G.length),W=new Float64Array($*2);for(let ee=0;ee<$;ee++)W[ee*2]=J[ee],W[ee*2+1]=G[ee]}else W=l(P.positions,"float64"),$=y.count=Math.floor(W.length/2);let Z=y.bounds=R(W,2);if(y.fill){let J=[],G={},ee=0;for(let re=0,fe=0,we=y.count;re<we;re++){let Oe=W[re*2],ke=W[re*2+1];isNaN(Oe)||isNaN(ke)||Oe==null||ke==null?(Oe=W[ee*2],ke=W[ee*2+1],G[re]=ee):ee=re,J[fe++]=Oe,J[fe++]=ke}if(P.splitNull){y.count-1 in G||(G[y.count]=y.count-1);let re=Object.keys(G).map(Number).sort((ke,Le)=>ke-Le),fe=[],we=0,Oe=y.hole!=null?y.hole[0]:null;if(Oe!=null){let ke=m(re,Le=>Le>=Oe);re=re.slice(0,ke),re.push(Oe)}for(let ke=0;ke<re.length;ke++){let Le=J.slice(we*2,re[ke]*2).concat(Oe?J.slice(Oe*2):[]),oe=(y.hole||[]).map(_e=>_e-Oe+(re[ke]-we)),be=u(Le,oe);be=be.map(_e=>_e+we+(_e+we<re[ke]?0:Oe-re[ke])),fe.push(...be),we=re[ke]+1}for(let ke=0,Le=fe.length;ke<Le;ke++)G[fe[ke]]!=null&&(fe[ke]=G[fe[ke]]);y.triangles=fe}else{let re=u(J,y.hole||[]);for(let fe=0,we=re.length;fe<we;fe++)G[re[fe]]!=null&&(re[fe]=G[re[fe]]);y.triangles=re}}let K=new Float64Array(W);c(K,2,Z);let Q=new Float64Array($*2+6);y.close?W[0]===W[$*2-2]&&W[1]===W[$*2-1]?(Q[0]=K[$*2-4],Q[1]=K[$*2-3]):(Q[0]=K[$*2-2],Q[1]=K[$*2-1]):(Q[0]=K[0],Q[1]=K[1]),Q.set(K,2),y.close?W[0]===W[$*2-2]&&W[1]===W[$*2-1]?(Q[$*2+2]=K[2],Q[$*2+3]=K[3],y.count-=1):(Q[$*2+2]=K[0],Q[$*2+3]=K[1],Q[$*2+4]=K[2],Q[$*2+5]=K[3]):(Q[$*2+2]=K[$*2-2],Q[$*2+3]=K[$*2-1],Q[$*2+4]=K[$*2-2],Q[$*2+5]=K[$*2-1]);var S=p(Q);y.positionBuffer(S);var M=f(Q,S);y.positionFractBuffer(M)}if(P.range?y.range=P.range:y.range||(y.range=y.bounds),(P.range||P.positions)&&y.count){let W=y.bounds,$=W[2]-W[0],Z=W[3]-W[1],K=y.range[2]-y.range[0],Q=y.range[3]-y.range[1];y.scale=[$/K,Z/Q],y.translate=[-y.range[0]/K+W[0]/K||0,-y.range[1]/Q+W[1]/Q||0],y.scaleFract=f(y.scale),y.translateFract=f(y.translate)}if(P.dashes){let W=0,$;if(!P.dashes||P.dashes.length<2)W=1,$=new Uint8Array([255,255,255,255,255,255,255,255]);else{W=0;for(let Q=0;Q<P.dashes.length;++Q)W+=P.dashes[Q];$=new Uint8Array(W*C.dashMult);let Z=0,K=255;for(let Q=0;Q<2;Q++)for(let J=0;J<P.dashes.length;++J){for(let G=0,ee=P.dashes[J]*C.dashMult*.5;G<ee;++G)$[Z++]=K;K^=255}}y.dashLength=W,y.dashTexture({channels:1,data:$,width:$.length,height:1,mag:"linear",min:"linear"},0,0)}if(P.color){let W=y.count,$=P.color;$||($="transparent");let Z=new Uint8Array(W*4+4);if(!Array.isArray($)||typeof $[0]=="number"){let K=w($,"uint8");for(let Q=0;Q<W+1;Q++)Z.set(K,Q*4)}else{for(let K=0;K<W;K++){let Q=w($[K],"uint8");Z.set(Q,K*4)}Z.set(w($[0],"uint8"),W*4)}y.colorBuffer({usage:"dynamic",type:"uint8",data:Z})}}}),I.length<this.passes.length){for(let P=I.length;P<this.passes.length;P++){let T=this.passes[P];T&&(T.colorBuffer.destroy(),T.positionBuffer.destroy(),T.dashTexture.destroy())}this.passes.length=I.length}let k=[];for(let P=0;P<this.passes.length;P++)this.passes[P]!==null&&k.push(this.passes[P]);return this.passes=k,this},C.prototype.destroy=function(){return this.passes.forEach(I=>{I.colorBuffer.destroy(),I.positionBuffer.destroy(),I.dashTexture.destroy()}),this.passes.length=0,this}}}),VQe=U({"node_modules/regl-error2d/index.js"(pe,le){var w=M6(),R=H4(),O=Gbe(),z=NR(),l=F1(),u=R6(),{float32:c,fract32:p}=dK();le.exports=v;var f=[[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 v(h,m){if(typeof h=="function"?(m||(m={}),m.regl=h):m=h,m.length&&(m.positions=m),h=m.regl,!h.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let _=h._gl,x,A,E,D,g,C,I={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},N=[];return D=h.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),A=h.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),E=h.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),g=h.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),C=h.buffer({usage:"static",type:"float",data:f}),T(m),x=h({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:h.prop("range"),lineWidth:h.prop("lineWidth"),capSize:h.prop("capSize"),opacity:h.prop("opacity"),scale:h.prop("scale"),translate:h.prop("translate"),scaleFract:h.prop("scaleFract"),translateFract:h.prop("translateFract"),viewport:(S,M)=>[M.viewport.x,M.viewport.y,S.viewportWidth,S.viewportHeight]},attributes:{color:{buffer:D,offset:(S,M)=>M.offset*4,divisor:1},position:{buffer:A,offset:(S,M)=>M.offset*8,divisor:1},positionFract:{buffer:E,offset:(S,M)=>M.offset*8,divisor:1},error:{buffer:g,offset:(S,M)=>M.offset*16,divisor:1},direction:{buffer:C,stride:24,offset:0},lineOffset:{buffer:C,stride:24,offset:8},capOffset:{buffer:C,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:h.prop("viewport")},viewport:h.prop("viewport"),stencil:!1,instances:h.prop("count"),count:f.length}),l(F,{update:T,draw:k,destroy:y,regl:h,gl:_,canvas:_.canvas,groups:N}),F;function F(S){S?T(S):S===null&&y(),k()}function k(S){if(typeof S=="number")return P(S);S&&!Array.isArray(S)&&(S=[S]),h._refresh(),N.forEach((M,W)=>{if(M){if(S&&(S[W]?M.draw=!0:M.draw=!1),!M.draw){M.draw=!0;return}P(W)}})}function P(S){typeof S=="number"&&(S=N[S]),S!=null&&S&&S.count&&S.color&&S.opacity&&S.positions&&S.positions.length>1&&(S.scaleRatio=[S.scale[0]*S.viewport.width,S.scale[1]*S.viewport.height],x(S),S.after&&S.after(S))}function T(S){if(!S)return;S.length!=null?typeof S[0]=="number"&&(S=[{positions:S}]):Array.isArray(S)||(S=[S]);let M=0,W=0;if(F.groups=N=S.map((K,Q)=>{let J=N[Q];if(K)typeof K=="function"?K={after:K}:typeof K[0]=="number"&&(K={positions:K});else return J;return K=z(K,{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"}),J||(N[Q]=J={id:Q,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},K=l({},I,K)),O(J,K,[{lineWidth:G=>+G*.5,capSize:G=>+G*.5,opacity:parseFloat,errors:G=>(G=u(G),W+=G.length,G),positions:(G,ee)=>(G=u(G,"float64"),ee.count=Math.floor(G.length/2),ee.bounds=w(G,2),ee.offset=M,M+=ee.count,G)},{color:(G,ee)=>{let re=ee.count;if(G||(G="transparent"),!Array.isArray(G)||typeof G[0]=="number"){let we=G;G=Array(re);for(let Oe=0;Oe<re;Oe++)G[Oe]=we}if(G.length<re)throw Error("Not enough colors");let fe=new Uint8Array(re*4);for(let we=0;we<re;we++){let Oe=R(G[we],"uint8");fe.set(Oe,we*4)}return fe},range:(G,ee,re)=>{let fe=ee.bounds;return G||(G=fe),ee.scale=[1/(G[2]-G[0]),1/(G[3]-G[1])],ee.translate=[-G[0],-G[1]],ee.scaleFract=p(ee.scale),ee.translateFract=p(ee.translate),G},viewport:G=>{let ee;return Array.isArray(G)?ee={x:G[0],y:G[1],width:G[2]-G[0],height:G[3]-G[1]}:G?(ee={x:G.x||G.left||0,y:G.y||G.top||0},G.right?ee.width=G.right-ee.x:ee.width=G.w||G.width||0,G.bottom?ee.height=G.bottom-ee.y:ee.height=G.h||G.height||0):ee={x:0,y:0,width:_.drawingBufferWidth,height:_.drawingBufferHeight},ee}}]),J}),M||W){let K=N.reduce((ee,re,fe)=>ee+(re?re.count:0),0),Q=new Float64Array(K*2),J=new Uint8Array(K*4),G=new Float32Array(K*4);N.forEach((ee,re)=>{if(!ee)return;let{positions:fe,count:we,offset:Oe,color:ke,errors:Le}=ee;we&&(J.set(ke,Oe*4),G.set(Le,Oe*4),Q.set(fe,Oe*2))});var $=c(Q);A($);var Z=p(Q,$);E(Z),D(J),g(G)}}function y(){A.destroy(),E.destroy(),D.destroy(),g.destroy(),C.destroy()}}}}),qQe=U({"node_modules/unquote/index.js"(pe,le){var w=/[\'\"]/;le.exports=function(O){return O?(w.test(O.charAt(0))&&(O=O.substr(1)),w.test(O.charAt(O.length-1))&&(O=O.substr(0,O.length-1)),O):""}}}),axe=U({"node_modules/css-global-keywords/index.json"(pe,le){le.exports=["inherit","initial","unset"]}}),oxe=U({"node_modules/css-system-font-keywords/index.json"(pe,le){le.exports=["caption","icon","menu","message-box","small-caption","status-bar"]}}),sxe=U({"node_modules/css-font-weight-keywords/index.json"(pe,le){le.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]}}),lxe=U({"node_modules/css-font-style-keywords/index.json"(pe,le){le.exports=["normal","italic","oblique"]}}),uxe=U({"node_modules/css-font-stretch-keywords/index.json"(pe,le){le.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]}}),GQe=U({"node_modules/parenthesis/index.js"(pe,le){function w(z,l){if(typeof z!="string")return[z];var u=[z];typeof l=="string"||Array.isArray(l)?l={brackets:l}:l||(l={});var c=l.brackets?Array.isArray(l.brackets)?l.brackets:[l.brackets]:["{}","[]","()"],p=l.escape||"___",f=!!l.flat;c.forEach(function(m){var _=new RegExp(["\\",m[0],"[^\\",m[0],"\\",m[1],"]*\\",m[1]].join("")),x=[];function A(E,D,g){var C=u.push(E.slice(m[0].length,-m[1].length))-1;return x.push(C),p+C+p}u.forEach(function(E,D){for(var g,C=0;E!=g;)if(g=E,E=E.replace(_,A),C++>1e4)throw Error("References have circular dependency. Please, check them.");u[D]=E}),x=x.reverse(),u=u.map(function(E){return x.forEach(function(D){E=E.replace(new RegExp("(\\"+p+D+"\\"+p+")","g"),m[0]+"$1"+m[1])}),E})});var v=new RegExp("\\"+p+"([0-9]+)\\"+p);function h(m,_,x){for(var A=[],E,D=0;E=v.exec(m);){if(D++>1e4)throw Error("Circular references in parenthesis");A.push(m.slice(0,E.index)),A.push(h(_[E[1]],_)),m=m.slice(E.index+E[0].length)}return A.push(m),A}return f?u:h(u[0],u)}function R(z,l){if(l&&l.flat){var u=l&&l.escape||"___",c=z[0],p;if(!c)return"";for(var f=new RegExp("\\"+u+"([0-9]+)\\"+u),v=0;c!=p;){if(v++>1e4)throw Error("Circular references in "+z);p=c,c=c.replace(f,h)}return c}return z.reduce(function m(_,x){return Array.isArray(x)&&(x=x.reduce(m,"")),_+x},"");function h(m,_){if(z[_]==null)throw Error("Reference "+_+"is undefined");return z[_]}}function O(z,l){return Array.isArray(z)?R(z,l):w(z,l)}O.parse=w,O.stringify=R,le.exports=O}}),$Qe=U({"node_modules/string-split-by/index.js"(pe,le){var w=GQe();le.exports=function(O,z,l){if(O==null)throw Error("First argument should be a string");if(z==null)throw Error("Separator should be a string or a RegExp");l?(typeof l=="string"||Array.isArray(l))&&(l={ignore:l}):l={},l.escape==null&&(l.escape=!0),l.ignore==null?l.ignore=["[]","()","{}","<>",'""',"''","``","“”","«»"]:(typeof l.ignore=="string"&&(l.ignore=[l.ignore]),l.ignore=l.ignore.map(function(_){return _.length===1&&(_=_+_),_}));var u=w.parse(O,{flat:!0,brackets:l.ignore}),c=u[0],p=c.split(z);if(l.escape){for(var f=[],v=0;v<p.length;v++){var h=p[v],m=p[v+1];h[h.length-1]==="\\"&&h[h.length-2]!=="\\"?(f.push(h+z+m),v++):f.push(h)}p=f}for(var v=0;v<p.length;v++)u[0]=p[v],p[v]=w.stringify(u,{flat:!0});return p}}}),WQe=U({"node_modules/css-font-size-keywords/index.json"(pe,le){le.exports=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]}}),cxe=U({"node_modules/css-font/lib/util.js"(pe,le){var w=WQe();le.exports={isSize:function(O){return/^[\d\.]/.test(O)||O.indexOf("/")!==-1||w.indexOf(O)!==-1}}}}),YQe=U({"node_modules/css-font/parse.js"(pe,le){var w=qQe(),R=axe(),O=oxe(),z=sxe(),l=lxe(),u=uxe(),c=$Qe(),p=cxe().isSize;le.exports=v;var f=v.cache={};function v(m){if(typeof m!="string")throw new Error("Font argument must be a string.");if(f[m])return f[m];if(m==="")throw new Error("Cannot parse an empty string.");if(O.indexOf(m)!==-1)return f[m]={system:m};for(var _={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},x=c(m,/\s+/),A;A=x.shift();){if(R.indexOf(A)!==-1)return["style","variant","weight","stretch"].forEach(function(D){_[D]=A}),f[m]=_;if(l.indexOf(A)!==-1){_.style=A;continue}if(A==="normal"||A==="small-caps"){_.variant=A;continue}if(u.indexOf(A)!==-1){_.stretch=A;continue}if(z.indexOf(A)!==-1){_.weight=A;continue}if(p(A)){var E=c(A,"/");if(_.size=E[0],E[1]!=null?_.lineHeight=h(E[1]):x[0]==="/"&&(x.shift(),_.lineHeight=h(x.shift())),!x.length)throw new Error("Missing required font-family.");return _.family=c(x.join(" "),/\s*,\s*/).map(w),f[m]=_}throw new Error("Unknown or unsupported font token: "+A)}throw new Error("Missing required font-size.")}function h(m){var _=parseFloat(m);return _.toString()===m?_:m}}}),fxe=U({"node_modules/css-font/stringify.js"(pe,le){var w=NR(),R=cxe().isSize,O=m(axe()),z=m(oxe()),l=m(sxe()),u=m(lxe()),c=m(uxe()),p={normal:1,"small-caps":1},f={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},v={size:"1rem",family:"serif"};le.exports=function(x){if(x=w(x,{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"}),x.system)return x.system&&h(x.system,z),x.system;if(h(x.style,u),h(x.variant,p),h(x.weight,l),h(x.stretch,c),x.size==null&&(x.size=v.size),typeof x.size=="number"&&(x.size+="px"),!R)throw Error("Bad size value `"+x.size+"`");x.family||(x.family=v.family),Array.isArray(x.family)&&(x.family.length||(x.family=[v.family]),x.family=x.family.map(function(E){return f[E]?E:'"'+E+'"'}).join(", "));var A=[];return A.push(x.style),x.variant!==x.style&&A.push(x.variant),x.weight!==x.variant&&x.weight!==x.style&&A.push(x.weight),x.stretch!==x.weight&&x.stretch!==x.variant&&x.stretch!==x.style&&A.push(x.stretch),A.push(x.size+(x.lineHeight==null||x.lineHeight==="normal"||x.lineHeight+""=="1"?"":"/"+x.lineHeight)),A.push(x.family),A.filter(Boolean).join(" ")};function h(_,x){if(_&&!x[_]&&!O[_])throw Error("Unknown keyword `"+_+"`");return _}function m(_){for(var x={},A=0;A<_.length;A++)x[_[A]]=1;return x}}}),XQe=U({"node_modules/css-font/index.js"(pe,le){le.exports={parse:YQe(),stringify:fxe()}}}),ZQe=U({"node_modules/regl/dist/regl.unchecked.js"(pe,le){(function(w,R){typeof pe=="object"&&typeof le<"u"?le.exports=R():w.createREGL=R()})(pe,function(){var w=function(rr,mn){for(var En=Object.keys(mn),ia=0;ia<En.length;++ia)rr[En[ia]]=mn[En[ia]];return rr},R=0,O=0,z=5,l=6;function u(rr,mn){this.id=R++,this.type=rr,this.data=mn}function c(rr){return rr.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function p(rr){if(rr.length===0)return[];var mn=rr.charAt(0),En=rr.charAt(rr.length-1);if(rr.length>1&&mn===En&&(mn==='"'||mn==="'"))return['"'+c(rr.substr(1,rr.length-2))+'"'];var ia=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(rr);if(ia)return p(rr.substr(0,ia.index)).concat(p(ia[1])).concat(p(rr.substr(ia.index+ia[0].length)));var Wa=rr.split(".");if(Wa.length===1)return['"'+c(rr)+'"'];for(var zi=[],Fi=0;Fi<Wa.length;++Fi)zi=zi.concat(p(Wa[Fi]));return zi}function f(rr){return"["+p(rr).join("][")+"]"}function v(rr,mn){return new u(rr,f(mn+""))}function h(rr){return typeof rr=="function"&&!rr._reglType||rr instanceof u}function m(rr,mn){if(typeof rr=="function")return new u(O,rr);if(typeof rr=="number"||typeof rr=="boolean")return new u(z,rr);if(Array.isArray(rr))return new u(l,rr.map(function(En,ia){return m(En)}));if(rr instanceof u)return rr}var _={DynamicVariable:u,define:v,isDynamic:h,unbox:m,accessor:f},x={next:typeof requestAnimationFrame=="function"?function(rr){return requestAnimationFrame(rr)}:function(rr){return setTimeout(rr,16)},cancel:typeof cancelAnimationFrame=="function"?function(rr){return cancelAnimationFrame(rr)}:clearTimeout},A=typeof performance<"u"&&performance.now?function(){return performance.now()}:function(){return+new Date};function E(){var rr={"":0},mn=[""];return{id:function(En){var ia=rr[En];return ia||(ia=rr[En]=mn.length,mn.push(En),ia)},str:function(En){return mn[En]}}}function D(rr,mn,En){var ia=document.createElement("canvas");w(ia.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),rr.appendChild(ia),rr===document.body&&(ia.style.position="absolute",w(rr.style,{margin:0,padding:0}));function Wa(){var Ao=window.innerWidth,To=window.innerHeight;if(rr!==document.body){var Eo=ia.getBoundingClientRect();Ao=Eo.right-Eo.left,To=Eo.bottom-Eo.top}ia.width=En*Ao,ia.height=En*To}var zi;rr!==document.body&&typeof ResizeObserver=="function"?(zi=new ResizeObserver(function(){setTimeout(Wa)}),zi.observe(rr)):window.addEventListener("resize",Wa,!1);function Fi(){zi?zi.disconnect():window.removeEventListener("resize",Wa),rr.removeChild(ia)}return Wa(),{canvas:ia,onDestroy:Fi}}function g(rr,mn){function En(ia){try{return rr.getContext(ia,mn)}catch{return null}}return En("webgl")||En("experimental-webgl")||En("webgl-experimental")}function C(rr){return typeof rr.nodeName=="string"&&typeof rr.appendChild=="function"&&typeof rr.getBoundingClientRect=="function"}function I(rr){return typeof rr.drawArrays=="function"||typeof rr.drawElements=="function"}function N(rr){return typeof rr=="string"?rr.split():rr}function F(rr){return typeof rr=="string"?document.querySelector(rr):rr}function k(rr){var mn=rr||{},En,ia,Wa,zi,Fi={},Ao=[],To=[],Eo=typeof window>"u"?1:window.devicePixelRatio,qo=!1,qs={},xs=function(xi){},Uo=function(){};if(typeof mn=="string"?En=document.querySelector(mn):typeof mn=="object"&&(C(mn)?En=mn:I(mn)?(zi=mn,Wa=zi.canvas):("gl"in mn?zi=mn.gl:"canvas"in mn?Wa=F(mn.canvas):"container"in mn&&(ia=F(mn.container)),"attributes"in mn&&(Fi=mn.attributes),"extensions"in mn&&(Ao=N(mn.extensions)),"optionalExtensions"in mn&&(To=N(mn.optionalExtensions)),"onDone"in mn&&(xs=mn.onDone),"profile"in mn&&(qo=!!mn.profile),"pixelRatio"in mn&&(Eo=+mn.pixelRatio),"cachedCode"in mn&&(qs=mn.cachedCode))),En&&(En.nodeName.toLowerCase()==="canvas"?Wa=En:ia=En),!zi){if(!Wa){var io=D(ia||document.body,xs,Eo);if(!io)return null;Wa=io.canvas,Uo=io.onDestroy}Fi.premultipliedAlpha===void 0&&(Fi.premultipliedAlpha=!0),zi=g(Wa,Fi)}return zi?{gl:zi,canvas:Wa,container:ia,extensions:Ao,optionalExtensions:To,pixelRatio:Eo,profile:qo,cachedCode:qs,onDone:xs,onDestroy:Uo}:(Uo(),xs("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function P(rr,mn){var En={};function ia(Fi){var Ao=Fi.toLowerCase(),To;try{To=En[Ao]=rr.getExtension(Ao)}catch{}return!!To}for(var Wa=0;Wa<mn.extensions.length;++Wa){var zi=mn.extensions[Wa];if(!ia(zi))return mn.onDestroy(),mn.onDone('"'+zi+'" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return mn.optionalExtensions.forEach(ia),{extensions:En,restore:function(){Object.keys(En).forEach(function(Fi){if(En[Fi]&&!ia(Fi))throw new Error("(regl): error restoring extension "+Fi)})}}}function T(rr,mn){for(var En=Array(rr),ia=0;ia<rr;++ia)En[ia]=mn(ia);return En}var y=5120,S=5121,M=5122,W=5123,$=5124,Z=5125,K=5126;function Q(rr){for(var mn=16;mn<=1<<28;mn*=16)if(rr<=mn)return mn;return 0}function J(rr){var mn,En;return mn=(rr>65535)<<4,rr>>>=mn,En=(rr>255)<<3,rr>>>=En,mn|=En,En=(rr>15)<<2,rr>>>=En,mn|=En,En=(rr>3)<<1,rr>>>=En,mn|=En,mn|rr>>1}function G(){var rr=T(8,function(){return[]});function mn(zi){var Fi=Q(zi),Ao=rr[J(Fi)>>2];return Ao.length>0?Ao.pop():new ArrayBuffer(Fi)}function En(zi){rr[J(zi.byteLength)>>2].push(zi)}function ia(zi,Fi){var Ao=null;switch(zi){case y:Ao=new Int8Array(mn(Fi),0,Fi);break;case S:Ao=new Uint8Array(mn(Fi),0,Fi);break;case M:Ao=new Int16Array(mn(2*Fi),0,Fi);break;case W:Ao=new Uint16Array(mn(2*Fi),0,Fi);break;case $:Ao=new Int32Array(mn(4*Fi),0,Fi);break;case Z:Ao=new Uint32Array(mn(4*Fi),0,Fi);break;case K:Ao=new Float32Array(mn(4*Fi),0,Fi);break;default:return null}return Ao.length!==Fi?Ao.subarray(0,Fi):Ao}function Wa(zi){En(zi.buffer)}return{alloc:mn,free:En,allocType:ia,freeType:Wa}}var ee=G();ee.zero=G();var re=3408,fe=3410,we=3411,Oe=3412,ke=3413,Le=3414,oe=3415,be=33901,_e=33902,he=3379,De=3386,xe=34921,se=36347,Ee=36348,Te=35661,Be=35660,tt=34930,at=36349,gt=34076,pt=34024,Rt=7936,$t=7937,Wt=7938,Ht=35724,Ft=34047,st=36063,rt=34852,Ue=3553,xt=34067,Gt=34069,Jt=33984,Ut=6408,kr=5126,Pr=5121,$r=36160,rn=36053,kn=36064,Rn=16384,ci=function(rr,mn){var En=1;mn.ext_texture_filter_anisotropic&&(En=rr.getParameter(Ft));var ia=1,Wa=1;mn.webgl_draw_buffers&&(ia=rr.getParameter(rt),Wa=rr.getParameter(st));var zi=!!mn.oes_texture_float;if(zi){var Fi=rr.createTexture();rr.bindTexture(Ue,Fi),rr.texImage2D(Ue,0,Ut,1,1,0,Ut,kr,null);var Ao=rr.createFramebuffer();if(rr.bindFramebuffer($r,Ao),rr.framebufferTexture2D($r,kn,Ue,Fi,0),rr.bindTexture(Ue,null),rr.checkFramebufferStatus($r)!==rn)zi=!1;else{rr.viewport(0,0,1,1),rr.clearColor(1,0,0,1),rr.clear(Rn);var To=ee.allocType(kr,4);rr.readPixels(0,0,1,1,Ut,kr,To),rr.getError()?zi=!1:(rr.deleteFramebuffer(Ao),rr.deleteTexture(Fi),zi=To[0]===1),ee.freeType(To)}}var Eo=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),qo=!0;if(!Eo){var qs=rr.createTexture(),xs=ee.allocType(Pr,36);rr.activeTexture(Jt),rr.bindTexture(xt,qs),rr.texImage2D(Gt,0,Ut,3,3,0,Ut,Pr,xs),ee.freeType(xs),rr.bindTexture(xt,null),rr.deleteTexture(qs),qo=!rr.getError()}return{colorBits:[rr.getParameter(fe),rr.getParameter(we),rr.getParameter(Oe),rr.getParameter(ke)],depthBits:rr.getParameter(Le),stencilBits:rr.getParameter(oe),subpixelBits:rr.getParameter(re),extensions:Object.keys(mn).filter(function(Uo){return!!mn[Uo]}),maxAnisotropic:En,maxDrawbuffers:ia,maxColorAttachments:Wa,pointSizeDims:rr.getParameter(be),lineWidthDims:rr.getParameter(_e),maxViewportDims:rr.getParameter(De),maxCombinedTextureUnits:rr.getParameter(Te),maxCubeMapSize:rr.getParameter(gt),maxRenderbufferSize:rr.getParameter(pt),maxTextureUnits:rr.getParameter(tt),maxTextureSize:rr.getParameter(he),maxAttributes:rr.getParameter(xe),maxVertexUniforms:rr.getParameter(se),maxVertexTextureUnits:rr.getParameter(Be),maxVaryingVectors:rr.getParameter(Ee),maxFragmentUniforms:rr.getParameter(at),glsl:rr.getParameter(Ht),renderer:rr.getParameter($t),vendor:rr.getParameter(Rt),version:rr.getParameter(Wt),readFloat:zi,npotTextureCube:qo}},In=function(rr){return rr instanceof Uint8Array||rr instanceof Uint16Array||rr instanceof Uint32Array||rr instanceof Int8Array||rr instanceof Int16Array||rr instanceof Int32Array||rr instanceof Float32Array||rr instanceof Float64Array||rr instanceof Uint8ClampedArray};function Gn(rr){return!!rr&&typeof rr=="object"&&Array.isArray(rr.shape)&&Array.isArray(rr.stride)&&typeof rr.offset=="number"&&rr.shape.length===rr.stride.length&&(Array.isArray(rr.data)||In(rr.data))}var mr=function(rr){return Object.keys(rr).map(function(mn){return rr[mn]})},St={shape:mt,flatten:et};function Ot(rr,mn,En){for(var ia=0;ia<mn;++ia)En[ia]=rr[ia]}function Et(rr,mn,En,ia){for(var Wa=0,zi=0;zi<mn;++zi)for(var Fi=rr[zi],Ao=0;Ao<En;++Ao)ia[Wa++]=Fi[Ao]}function je(rr,mn,En,ia,Wa,zi){for(var Fi=zi,Ao=0;Ao<mn;++Ao)for(var To=rr[Ao],Eo=0;Eo<En;++Eo)for(var qo=To[Eo],qs=0;qs<ia;++qs)Wa[Fi++]=qo[qs]}function Ye(rr,mn,En,ia,Wa){for(var zi=1,Fi=En+1;Fi<mn.length;++Fi)zi*=mn[Fi];var Ao=mn[En];if(mn.length-En===4){var To=mn[En+1],Eo=mn[En+2],qo=mn[En+3];for(Fi=0;Fi<Ao;++Fi)je(rr[Fi],To,Eo,qo,ia,Wa),Wa+=zi}else for(Fi=0;Fi<Ao;++Fi)Ye(rr[Fi],mn,En+1,ia,Wa),Wa+=zi}function et(rr,mn,En,ia){var Wa=1;if(mn.length)for(var zi=0;zi<mn.length;++zi)Wa*=mn[zi];else Wa=0;var Fi=ia||ee.allocType(En,Wa);switch(mn.length){case 0:break;case 1:Ot(rr,mn[0],Fi);break;case 2:Et(rr,mn[0],mn[1],Fi);break;case 3:je(rr,mn[0],mn[1],mn[2],Fi,0);break;default:Ye(rr,mn,0,Fi,0)}return Fi}function mt(rr){for(var mn=[],En=rr;En.length;En=En[0])mn.push(En.length);return mn}var Nt={"[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},lr=5120,br=5122,Or=5124,tn=5121,Jr=5123,dn=5125,on=5126,Nn=5126,Wi={int8:lr,int16:br,int32:Or,uint8:tn,uint16:Jr,uint32:dn,float:on,float32:Nn},Oa=35048,Da=35040,Aa={dynamic:Oa,stream:Da,static:35044},Ka=St.flatten,Sa=St.shape,no=35044,Fo=35040,an=5121,Hr=5126,nn=[];nn[5120]=1,nn[5122]=2,nn[5124]=4,nn[5121]=1,nn[5123]=2,nn[5125]=4,nn[5126]=4;function Kr(rr){return Nt[Object.prototype.toString.call(rr)]|0}function $n(rr,mn){for(var En=0;En<mn.length;++En)rr[En]=mn[En]}function Ai(rr,mn,En,ia,Wa,zi,Fi){for(var Ao=0,To=0;To<En;++To)for(var Eo=0;Eo<ia;++Eo)rr[Ao++]=mn[Wa*To+zi*Eo+Fi]}function aa(rr,mn,En,ia){var Wa=0,zi={};function Fi(xi){this.id=Wa++,this.buffer=rr.createBuffer(),this.type=xi,this.usage=no,this.byteLength=0,this.dimension=1,this.dtype=an,this.persistentData=null,En.profile&&(this.stats={size:0})}Fi.prototype.bind=function(){rr.bindBuffer(this.type,this.buffer)},Fi.prototype.destroy=function(){xs(this)};var Ao=[];function To(xi,ga){var Fa=Ao.pop();return Fa||(Fa=new Fi(xi)),Fa.bind(),qs(Fa,ga,Fo,0,1,!1),Fa}function Eo(xi){Ao.push(xi)}function qo(xi,ga,Fa){xi.byteLength=ga.byteLength,rr.bufferData(xi.type,ga,Fa)}function qs(xi,ga,Fa,so,Ua,vs){var Po;if(xi.usage=Fa,Array.isArray(ga)){if(xi.dtype=so||Hr,ga.length>0){var zs;if(Array.isArray(ga[0])){Po=Sa(ga);for(var Ha=1,Ra=1;Ra<Po.length;++Ra)Ha*=Po[Ra];xi.dimension=Ha,zs=Ka(ga,Po,xi.dtype),qo(xi,zs,Fa),vs?xi.persistentData=zs:ee.freeType(zs)}else if(typeof ga[0]=="number"){xi.dimension=Ua;var ls=ee.allocType(xi.dtype,ga.length);$n(ls,ga),qo(xi,ls,Fa),vs?xi.persistentData=ls:ee.freeType(ls)}else In(ga[0])&&(xi.dimension=ga[0].length,xi.dtype=so||Kr(ga[0])||Hr,zs=Ka(ga,[ga.length,ga[0].length],xi.dtype),qo(xi,zs,Fa),vs?xi.persistentData=zs:ee.freeType(zs))}}else if(In(ga))xi.dtype=so||Kr(ga),xi.dimension=Ua,qo(xi,ga,Fa),vs&&(xi.persistentData=new Uint8Array(new Uint8Array(ga.buffer)));else if(Gn(ga)){Po=ga.shape;var ua=ga.stride,Wo=ga.offset,Mo=0,Hs=0,au=0,ws=0;Po.length===1?(Mo=Po[0],Hs=1,au=ua[0],ws=0):Po.length===2&&(Mo=Po[0],Hs=Po[1],au=ua[0],ws=ua[1]),xi.dtype=so||Kr(ga.data)||Hr,xi.dimension=Hs;var Xs=ee.allocType(xi.dtype,Mo*Hs);Ai(Xs,ga.data,Mo,Hs,au,ws,Wo),qo(xi,Xs,Fa),vs?xi.persistentData=Xs:ee.freeType(Xs)}else ga instanceof ArrayBuffer&&(xi.dtype=an,xi.dimension=Ua,qo(xi,ga,Fa),vs&&(xi.persistentData=new Uint8Array(new Uint8Array(ga))))}function xs(xi){mn.bufferCount--,ia(xi);var ga=xi.buffer;rr.deleteBuffer(ga),xi.buffer=null,delete zi[xi.id]}function Uo(xi,ga,Fa,so){mn.bufferCount++;var Ua=new Fi(ga);zi[Ua.id]=Ua;function vs(Ha){var Ra=no,ls=null,ua=0,Wo=0,Mo=1;return Array.isArray(Ha)||In(Ha)||Gn(Ha)||Ha instanceof ArrayBuffer?ls=Ha:typeof Ha=="number"?ua=Ha|0:Ha&&("data"in Ha&&(ls=Ha.data),"usage"in Ha&&(Ra=Aa[Ha.usage]),"type"in Ha&&(Wo=Wi[Ha.type]),"dimension"in Ha&&(Mo=Ha.dimension|0),"length"in Ha&&(ua=Ha.length|0)),Ua.bind(),ls?qs(Ua,ls,Ra,Wo,Mo,so):(ua&&rr.bufferData(Ua.type,ua,Ra),Ua.dtype=Wo||an,Ua.usage=Ra,Ua.dimension=Mo,Ua.byteLength=ua),En.profile&&(Ua.stats.size=Ua.byteLength*nn[Ua.dtype]),vs}function Po(Ha,Ra){rr.bufferSubData(Ua.type,Ra,Ha)}function zs(Ha,Ra){var ls=(Ra||0)|0,ua;if(Ua.bind(),In(Ha)||Ha instanceof ArrayBuffer)Po(Ha,ls);else if(Array.isArray(Ha)){if(Ha.length>0){if(typeof Ha[0]=="number"){var Wo=ee.allocType(Ua.dtype,Ha.length);$n(Wo,Ha),Po(Wo,ls),ee.freeType(Wo)}else if(Array.isArray(Ha[0])||In(Ha[0])){ua=Sa(Ha);var Mo=Ka(Ha,ua,Ua.dtype);Po(Mo,ls),ee.freeType(Mo)}}}else if(Gn(Ha)){ua=Ha.shape;var Hs=Ha.stride,au=0,ws=0,Xs=0,jo=0;ua.length===1?(au=ua[0],ws=1,Xs=Hs[0],jo=0):ua.length===2&&(au=ua[0],ws=ua[1],Xs=Hs[0],jo=Hs[1]);var Jl=Array.isArray(Ha.data)?Ua.dtype:Kr(Ha.data),Mu=ee.allocType(Jl,au*ws);Ai(Mu,Ha.data,au,ws,Xs,jo,Ha.offset),Po(Mu,ls),ee.freeType(Mu)}return vs}return Fa||vs(xi),vs._reglType="buffer",vs._buffer=Ua,vs.subdata=zs,En.profile&&(vs.stats=Ua.stats),vs.destroy=function(){xs(Ua)},vs}function io(){mr(zi).forEach(function(xi){xi.buffer=rr.createBuffer(),rr.bindBuffer(xi.type,xi.buffer),rr.bufferData(xi.type,xi.persistentData||xi.byteLength,xi.usage)})}return En.profile&&(mn.getTotalBufferSize=function(){var xi=0;return Object.keys(zi).forEach(function(ga){xi+=zi[ga].stats.size}),xi}),{create:Uo,createStream:To,destroyStream:Eo,clear:function(){mr(zi).forEach(xs),Ao.forEach(xs)},getBuffer:function(xi){return xi&&xi._buffer instanceof Fi?xi._buffer:null},restore:io,_initBuffer:qs}}var Ci=0,Ta=0,Na=1,ro=1,oo=4,xo=4,vr={points:Ci,point:Ta,lines:Na,line:ro,triangles:oo,triangle:xo,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},er=0,si=1,ei=4,Kn=5120,qn=5121,pi=5122,_i=5123,fi=5124,Ri=5125,$i=34963,Hi=35040,wr=35044;function gn(rr,mn,En,ia){var Wa={},zi=0,Fi={uint8:qn,uint16:_i};mn.oes_element_index_uint&&(Fi.uint32=Ri);function Ao(io){this.id=zi++,Wa[this.id]=this,this.buffer=io,this.primType=ei,this.vertCount=0,this.type=0}Ao.prototype.bind=function(){this.buffer.bind()};var To=[];function Eo(io){var xi=To.pop();return xi||(xi=new Ao(En.create(null,$i,!0,!1)._buffer)),qs(xi,io,Hi,-1,-1,0,0),xi}function qo(io){To.push(io)}function qs(io,xi,ga,Fa,so,Ua,vs){io.buffer.bind();var Po;if(xi){var zs=vs;!vs&&(!In(xi)||Gn(xi)&&!In(xi.data))&&(zs=mn.oes_element_index_uint?Ri:_i),En._initBuffer(io.buffer,xi,ga,zs,3)}else rr.bufferData($i,Ua,ga),io.buffer.dtype=Po||qn,io.buffer.usage=ga,io.buffer.dimension=3,io.buffer.byteLength=Ua;if(Po=vs,!vs){switch(io.buffer.dtype){case qn:case Kn:Po=qn;break;case _i:case pi:Po=_i;break;case Ri:case fi:Po=Ri;break}io.buffer.dtype=Po}io.type=Po;var Ha=so;Ha<0&&(Ha=io.buffer.byteLength,Po===_i?Ha>>=1:Po===Ri&&(Ha>>=2)),io.vertCount=Ha;var Ra=Fa;if(Fa<0){Ra=ei;var ls=io.buffer.dimension;ls===1&&(Ra=er),ls===2&&(Ra=si),ls===3&&(Ra=ei)}io.primType=Ra}function xs(io){ia.elementsCount--,delete Wa[io.id],io.buffer.destroy(),io.buffer=null}function Uo(io,xi){var ga=En.create(null,$i,!0),Fa=new Ao(ga._buffer);ia.elementsCount++;function so(Ua){if(!Ua)ga(),Fa.primType=ei,Fa.vertCount=0,Fa.type=qn;else if(typeof Ua=="number")ga(Ua),Fa.primType=ei,Fa.vertCount=Ua|0,Fa.type=qn;else{var vs=null,Po=wr,zs=-1,Ha=-1,Ra=0,ls=0;Array.isArray(Ua)||In(Ua)||Gn(Ua)?vs=Ua:("data"in Ua&&(vs=Ua.data),"usage"in Ua&&(Po=Aa[Ua.usage]),"primitive"in Ua&&(zs=vr[Ua.primitive]),"count"in Ua&&(Ha=Ua.count|0),"type"in Ua&&(ls=Fi[Ua.type]),"length"in Ua?Ra=Ua.length|0:(Ra=Ha,ls===_i||ls===pi?Ra*=2:(ls===Ri||ls===fi)&&(Ra*=4))),qs(Fa,vs,Po,zs,Ha,Ra,ls)}return so}return so(io),so._reglType="elements",so._elements=Fa,so.subdata=function(Ua,vs){return ga.subdata(Ua,vs),so},so.destroy=function(){xs(Fa)},so}return{create:Uo,createStream:Eo,destroyStream:qo,getElements:function(io){return typeof io=="function"&&io._elements instanceof Ao?io._elements:null},clear:function(){mr(Wa).forEach(xs)}}}var Xn=new Float32Array(1),Yi=new Uint32Array(Xn.buffer),ha=5123;function Ca(rr){for(var mn=ee.allocType(ha,rr.length),En=0;En<rr.length;++En)if(isNaN(rr[En]))mn[En]=65535;else if(rr[En]===1/0)mn[En]=31744;else if(rr[En]===-1/0)mn[En]=64512;else{Xn[0]=rr[En];var ia=Yi[0],Wa=ia>>>31<<15,zi=(ia<<1>>>24)-127,Fi=ia>>13&1023;if(zi<-24)mn[En]=Wa;else if(zi<-14){var Ao=-14-zi;mn[En]=Wa+(Fi+1024>>Ao)}else zi>15?mn[En]=Wa+31744:mn[En]=Wa+(zi+15<<10)+Fi}return mn}function Ba(rr){return Array.isArray(rr)||In(rr)}var ji=34467,Ea=3553,cs=34067,No=34069,Vs=6408,pl=6406,kl=6407,El=6409,iu=6410,bu=32854,yl=32855,ql=36194,rc=32819,zc=32820,Pf=33635,ju=34042,Ql=6402,lu=34041,dc=35904,wc=35906,mc=36193,xu=33776,qu=33777,xf=33778,ed=33779,Df=35986,Sc=35987,Qo=34798,Sl=35840,gd=35841,$f=35842,wu=35843,Ad=36196,Bc=5121,uf=5123,Cd=5125,Tl=5126,Xu=10242,pu=10243,Zc=10497,Md=33071,uu=33648,Lf=10240,op=10241,zd=9728,Qp=9729,hh=9984,td=9985,ev=9986,Um=9987,Hm=33170,om=4352,K0=4353,o1=4354,Of=34046,xm=3317,J0=37440,wp=37441,sp=37443,Sp=37444,sm=33984,yd=[hh,ev,td,Um],lp=[0,El,iu,kl,Vs],Uc={};Uc[El]=Uc[pl]=Uc[Ql]=1,Uc[lu]=Uc[iu]=2,Uc[kl]=Uc[dc]=3,Uc[Vs]=Uc[wc]=4;function zf(rr){return"[object "+rr+"]"}var jm=zf("HTMLCanvasElement"),hv=zf("OffscreenCanvas"),og=zf("CanvasRenderingContext2D"),Bd=zf("ImageBitmap"),z1=zf("HTMLImageElement"),Oc=zf("HTMLVideoElement"),pb=Object.keys(Nt).concat([jm,hv,og,Bd,z1,Oc]),mf=[];mf[Bc]=1,mf[Tl]=4,mf[mc]=2,mf[uf]=2,mf[Cd]=4;var mu=[];mu[bu]=2,mu[yl]=2,mu[ql]=2,mu[lu]=4,mu[xu]=.5,mu[qu]=.5,mu[xf]=1,mu[ed]=1,mu[Df]=.5,mu[Sc]=1,mu[Qo]=1,mu[Sl]=.5,mu[gd]=.25,mu[$f]=.5,mu[wu]=.25,mu[Ad]=.5;function Wg(rr){return Array.isArray(rr)&&(rr.length===0||typeof rr[0]=="number")}function lm(rr){if(!Array.isArray(rr))return!1;var mn=rr.length;return!(mn===0||!Ba(rr[0]))}function Hh(rr){return Object.prototype.toString.call(rr)}function Q0(rr){return Hh(rr)===jm}function sg(rr){return Hh(rr)===hv}function a0(rr){return Hh(rr)===og}function up(rr){return Hh(rr)===Bd}function s1(rr){return Hh(rr)===z1}function Ay(rr){return Hh(rr)===Oc}function o0(rr){if(!rr)return!1;var mn=Hh(rr);return pb.indexOf(mn)>=0?!0:Wg(rr)||lm(rr)||Gn(rr)}function lg(rr){return Nt[Object.prototype.toString.call(rr)]|0}function ey(rr,mn){var En=mn.length;switch(rr.type){case Bc:case uf:case Cd:case Tl:var ia=ee.allocType(rr.type,En);ia.set(mn),rr.data=ia;break;case mc:rr.data=Ca(mn);break}}function ty(rr,mn){return ee.allocType(rr.type===mc?Tl:rr.type,mn)}function um(rr,mn){rr.type===mc?(rr.data=Ca(mn),ee.freeType(mn)):rr.data=mn}function Cy(rr,mn,En,ia,Wa,zi){for(var Fi=rr.width,Ao=rr.height,To=rr.channels,Eo=Fi*Ao*To,qo=ty(rr,Eo),qs=0,xs=0;xs<Ao;++xs)for(var Uo=0;Uo<Fi;++Uo)for(var io=0;io<To;++io)qo[qs++]=mn[En*Uo+ia*xs+Wa*io+zi];um(rr,qo)}function Vm(rr,mn,En,ia,Wa,zi){var Fi;if(typeof mu[rr]<"u"?Fi=mu[rr]:Fi=Uc[rr]*mf[mn],zi&&(Fi*=6),Wa){for(var Ao=0,To=En;To>=1;)Ao+=Fi*To*To,To/=2;return Ao}else return Fi*En*ia}function _m(rr,mn,En,ia,Wa,zi,Fi){var Ao={"don't care":om,"dont care":om,nice:o1,fast:K0},To={repeat:Zc,clamp:Md,mirror:uu},Eo={nearest:zd,linear:Qp},qo=w({mipmap:Um,"nearest mipmap nearest":hh,"linear mipmap nearest":td,"nearest mipmap linear":ev,"linear mipmap linear":Um},Eo),qs={none:0,browser:Sp},xs={uint8:Bc,rgba4:rc,rgb565:Pf,"rgb5 a1":zc},Uo={alpha:pl,luminance:El,"luminance alpha":iu,rgb:kl,rgba:Vs,rgba4:bu,"rgb5 a1":yl,rgb565:ql},io={};mn.ext_srgb&&(Uo.srgb=dc,Uo.srgba=wc),mn.oes_texture_float&&(xs.float32=xs.float=Tl),mn.oes_texture_half_float&&(xs.float16=xs["half float"]=mc),mn.webgl_depth_texture&&(w(Uo,{depth:Ql,"depth stencil":lu}),w(xs,{uint16:uf,uint32:Cd,"depth stencil":ju})),mn.webgl_compressed_texture_s3tc&&w(io,{"rgb s3tc dxt1":xu,"rgba s3tc dxt1":qu,"rgba s3tc dxt3":xf,"rgba s3tc dxt5":ed}),mn.webgl_compressed_texture_atc&&w(io,{"rgb atc":Df,"rgba atc explicit alpha":Sc,"rgba atc interpolated alpha":Qo}),mn.webgl_compressed_texture_pvrtc&&w(io,{"rgb pvrtc 4bppv1":Sl,"rgb pvrtc 2bppv1":gd,"rgba pvrtc 4bppv1":$f,"rgba pvrtc 2bppv1":wu}),mn.webgl_compressed_texture_etc1&&(io["rgb etc1"]=Ad);var xi=Array.prototype.slice.call(rr.getParameter(ji));Object.keys(io).forEach(function(ne){var Fe=io[ne];xi.indexOf(Fe)>=0&&(Uo[ne]=Fe)});var ga=Object.keys(Uo);En.textureFormats=ga;var Fa=[];Object.keys(Uo).forEach(function(ne){var Fe=Uo[ne];Fa[Fe]=ne});var so=[];Object.keys(xs).forEach(function(ne){var Fe=xs[ne];so[Fe]=ne});var Ua=[];Object.keys(Eo).forEach(function(ne){var Fe=Eo[ne];Ua[Fe]=ne});var vs=[];Object.keys(qo).forEach(function(ne){var Fe=qo[ne];vs[Fe]=ne});var Po=[];Object.keys(To).forEach(function(ne){var Fe=To[ne];Po[Fe]=ne});var zs=ga.reduce(function(ne,Fe){var me=Uo[Fe];return me===El||me===pl||me===El||me===iu||me===Ql||me===lu||mn.ext_srgb&&(me===dc||me===wc)?ne[me]=me:me===yl||Fe.indexOf("rgba")>=0?ne[me]=Vs:ne[me]=kl,ne},{});function Ha(){this.internalformat=Vs,this.format=Vs,this.type=Bc,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=Sp,this.width=0,this.height=0,this.channels=0}function Ra(ne,Fe){ne.internalformat=Fe.internalformat,ne.format=Fe.format,ne.type=Fe.type,ne.compressed=Fe.compressed,ne.premultiplyAlpha=Fe.premultiplyAlpha,ne.flipY=Fe.flipY,ne.unpackAlignment=Fe.unpackAlignment,ne.colorSpace=Fe.colorSpace,ne.width=Fe.width,ne.height=Fe.height,ne.channels=Fe.channels}function ls(ne,Fe){if(!(typeof Fe!="object"||!Fe)){if("premultiplyAlpha"in Fe&&(ne.premultiplyAlpha=Fe.premultiplyAlpha),"flipY"in Fe&&(ne.flipY=Fe.flipY),"alignment"in Fe&&(ne.unpackAlignment=Fe.alignment),"colorSpace"in Fe&&(ne.colorSpace=qs[Fe.colorSpace]),"type"in Fe){var me=Fe.type;ne.type=xs[me]}var We=ne.width,At=ne.height,Yt=ne.channels,tr=!1;"shape"in Fe?(We=Fe.shape[0],At=Fe.shape[1],Fe.shape.length===3&&(Yt=Fe.shape[2],tr=!0)):("radius"in Fe&&(We=At=Fe.radius),"width"in Fe&&(We=Fe.width),"height"in Fe&&(At=Fe.height),"channels"in Fe&&(Yt=Fe.channels,tr=!0)),ne.width=We|0,ne.height=At|0,ne.channels=Yt|0;var Pt=!1;if("format"in Fe){var jt=Fe.format,hr=ne.internalformat=Uo[jt];ne.format=zs[hr],jt in xs&&("type"in Fe||(ne.type=xs[jt])),jt in io&&(ne.compressed=!0),Pt=!0}!tr&&Pt?ne.channels=Uc[ne.format]:tr&&!Pt&&ne.channels!==lp[ne.format]&&(ne.format=ne.internalformat=lp[ne.channels])}}function ua(ne){rr.pixelStorei(J0,ne.flipY),rr.pixelStorei(wp,ne.premultiplyAlpha),rr.pixelStorei(sp,ne.colorSpace),rr.pixelStorei(xm,ne.unpackAlignment)}function Wo(){Ha.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Mo(ne,Fe){var me=null;if(o0(Fe)?me=Fe:Fe&&(ls(ne,Fe),"x"in Fe&&(ne.xOffset=Fe.x|0),"y"in Fe&&(ne.yOffset=Fe.y|0),o0(Fe.data)&&(me=Fe.data)),Fe.copy){var We=Wa.viewportWidth,At=Wa.viewportHeight;ne.width=ne.width||We-ne.xOffset,ne.height=ne.height||At-ne.yOffset,ne.needsCopy=!0}else if(!me)ne.width=ne.width||1,ne.height=ne.height||1,ne.channels=ne.channels||4;else if(In(me))ne.channels=ne.channels||4,ne.data=me,!("type"in Fe)&&ne.type===Bc&&(ne.type=lg(me));else if(Wg(me))ne.channels=ne.channels||4,ey(ne,me),ne.alignment=1,ne.needsFree=!0;else if(Gn(me)){var Yt=me.data;!Array.isArray(Yt)&&ne.type===Bc&&(ne.type=lg(Yt));var tr=me.shape,Pt=me.stride,jt,hr,qr,zr,Gr,en;tr.length===3?(qr=tr[2],en=Pt[2]):(qr=1,en=1),jt=tr[0],hr=tr[1],zr=Pt[0],Gr=Pt[1],ne.alignment=1,ne.width=jt,ne.height=hr,ne.channels=qr,ne.format=ne.internalformat=lp[qr],ne.needsFree=!0,Cy(ne,Yt,zr,Gr,en,me.offset)}else if(Q0(me)||sg(me)||a0(me))Q0(me)||sg(me)?ne.element=me:ne.element=me.canvas,ne.width=ne.element.width,ne.height=ne.element.height,ne.channels=4;else if(up(me))ne.element=me,ne.width=me.width,ne.height=me.height,ne.channels=4;else if(s1(me))ne.element=me,ne.width=me.naturalWidth,ne.height=me.naturalHeight,ne.channels=4;else if(Ay(me))ne.element=me,ne.width=me.videoWidth,ne.height=me.videoHeight,ne.channels=4;else if(lm(me)){var Xr=ne.width||me[0].length,Rr=ne.height||me.length,jr=ne.channels;Ba(me[0][0])?jr=jr||me[0][0].length:jr=jr||1;for(var Br=St.shape(me),Bn=1,ui=0;ui<Br.length;++ui)Bn*=Br[ui];var Ii=ty(ne,Bn);St.flatten(me,Br,"",Ii),um(ne,Ii),ne.alignment=1,ne.width=Xr,ne.height=Rr,ne.channels=jr,ne.format=ne.internalformat=lp[jr],ne.needsFree=!0}ne.type===Tl||ne.type}function Hs(ne,Fe,me){var We=ne.element,At=ne.data,Yt=ne.internalformat,tr=ne.format,Pt=ne.type,jt=ne.width,hr=ne.height;ua(ne),We?rr.texImage2D(Fe,me,tr,tr,Pt,We):ne.compressed?rr.compressedTexImage2D(Fe,me,Yt,jt,hr,0,At):ne.needsCopy?(ia(),rr.copyTexImage2D(Fe,me,tr,ne.xOffset,ne.yOffset,jt,hr,0)):rr.texImage2D(Fe,me,tr,jt,hr,0,tr,Pt,At||null)}function au(ne,Fe,me,We,At){var Yt=ne.element,tr=ne.data,Pt=ne.internalformat,jt=ne.format,hr=ne.type,qr=ne.width,zr=ne.height;ua(ne),Yt?rr.texSubImage2D(Fe,At,me,We,jt,hr,Yt):ne.compressed?rr.compressedTexSubImage2D(Fe,At,me,We,Pt,qr,zr,tr):ne.needsCopy?(ia(),rr.copyTexSubImage2D(Fe,At,me,We,ne.xOffset,ne.yOffset,qr,zr)):rr.texSubImage2D(Fe,At,me,We,qr,zr,jt,hr,tr)}var ws=[];function Xs(){return ws.pop()||new Wo}function jo(ne){ne.needsFree&&ee.freeType(ne.data),Wo.call(ne),ws.push(ne)}function Jl(){Ha.call(this),this.genMipmaps=!1,this.mipmapHint=om,this.mipmask=0,this.images=Array(16)}function Mu(ne,Fe,me){var We=ne.images[0]=Xs();ne.mipmask=1,We.width=ne.width=Fe,We.height=ne.height=me,We.channels=ne.channels=4}function Fu(ne,Fe){var me=null;if(o0(Fe))me=ne.images[0]=Xs(),Ra(me,ne),Mo(me,Fe),ne.mipmask=1;else if(ls(ne,Fe),Array.isArray(Fe.mipmap))for(var We=Fe.mipmap,At=0;At<We.length;++At)me=ne.images[At]=Xs(),Ra(me,ne),me.width>>=At,me.height>>=At,Mo(me,We[At]),ne.mipmask|=1<<At;else me=ne.images[0]=Xs(),Ra(me,ne),Mo(me,Fe),ne.mipmask=1;Ra(ne,ne.images[0]),ne.compressed&&(ne.internalformat===xu||ne.internalformat===qu||ne.internalformat===xf||ne.internalformat)}function cf(ne,Fe){for(var me=ne.images,We=0;We<me.length;++We){if(!me[We])return;Hs(me[We],Fe,We)}}var zu=[];function mh(){var ne=zu.pop()||new Jl;Ha.call(ne),ne.mipmask=0;for(var Fe=0;Fe<16;++Fe)ne.images[Fe]=null;return ne}function Wc(ne){for(var Fe=ne.images,me=0;me<Fe.length;++me)Fe[me]&&jo(Fe[me]),Fe[me]=null;zu.push(ne)}function Zd(){this.minFilter=zd,this.magFilter=zd,this.wrapS=Md,this.wrapT=Md,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=om}function jh(ne,Fe){if("min"in Fe){var me=Fe.min;ne.minFilter=qo[me],yd.indexOf(ne.minFilter)>=0&&!("faces"in Fe)&&(ne.genMipmaps=!0)}if("mag"in Fe){var We=Fe.mag;ne.magFilter=Eo[We]}var At=ne.wrapS,Yt=ne.wrapT;if("wrap"in Fe){var tr=Fe.wrap;typeof tr=="string"?At=Yt=To[tr]:Array.isArray(tr)&&(At=To[tr[0]],Yt=To[tr[1]])}else{if("wrapS"in Fe){var Pt=Fe.wrapS;At=To[Pt]}if("wrapT"in Fe){var jt=Fe.wrapT;Yt=To[jt]}}if(ne.wrapS=At,ne.wrapT=Yt,"anisotropic"in Fe&&(Fe.anisotropic,ne.anisotropic=Fe.anisotropic),"mipmap"in Fe){var hr=!1;switch(typeof Fe.mipmap){case"string":ne.mipmapHint=Ao[Fe.mipmap],ne.genMipmaps=!0,hr=!0;break;case"boolean":hr=ne.genMipmaps=Fe.mipmap;break;case"object":ne.genMipmaps=!1,hr=!0;break}hr&&!("min"in Fe)&&(ne.minFilter=hh)}}function fp(ne,Fe){rr.texParameteri(Fe,op,ne.minFilter),rr.texParameteri(Fe,Lf,ne.magFilter),rr.texParameteri(Fe,Xu,ne.wrapS),rr.texParameteri(Fe,pu,ne.wrapT),mn.ext_texture_filter_anisotropic&&rr.texParameteri(Fe,Of,ne.anisotropic),ne.genMipmaps&&(rr.hint(Hm,ne.mipmapHint),rr.generateMipmap(Fe))}var Am=0,_d={},Hd=En.maxTextureUnits,Ol=Array(Hd).map(function(){return null});function dp(ne){Ha.call(this),this.mipmask=0,this.internalformat=Vs,this.id=Am++,this.refCount=1,this.target=ne,this.texture=rr.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new Zd,Fi.profile&&(this.stats={size:0})}function Fc(ne){rr.activeTexture(sm),rr.bindTexture(ne.target,ne.texture)}function Hf(){var ne=Ol[0];ne?rr.bindTexture(ne.target,ne.texture):rr.bindTexture(Ea,null)}function Fp(ne){var Fe=ne.texture,me=ne.unit,We=ne.target;me>=0&&(rr.activeTexture(sm+me),rr.bindTexture(We,null),Ol[me]=null),rr.deleteTexture(Fe),ne.texture=null,ne.params=null,ne.pixels=null,ne.refCount=0,delete _d[ne.id],zi.textureCount--}w(dp.prototype,{bind:function(){var ne=this;ne.bindCount+=1;var Fe=ne.unit;if(Fe<0){for(var me=0;me<Hd;++me){var We=Ol[me];if(We){if(We.bindCount>0)continue;We.unit=-1}Ol[me]=ne,Fe=me;break}Fi.profile&&zi.maxTextureUnits<Fe+1&&(zi.maxTextureUnits=Fe+1),ne.unit=Fe,rr.activeTexture(sm+Fe),rr.bindTexture(ne.target,ne.texture)}return Fe},unbind:function(){this.bindCount-=1},decRef:function(){--this.refCount<=0&&Fp(this)}});function zp(ne,Fe){var me=new dp(Ea);_d[me.id]=me,zi.textureCount++;function We(tr,Pt){var jt=me.texInfo;Zd.call(jt);var hr=mh();return typeof tr=="number"?typeof Pt=="number"?Mu(hr,tr|0,Pt|0):Mu(hr,tr|0,tr|0):tr?(jh(jt,tr),Fu(hr,tr)):Mu(hr,1,1),jt.genMipmaps&&(hr.mipmask=(hr.width<<1)-1),me.mipmask=hr.mipmask,Ra(me,hr),me.internalformat=hr.internalformat,We.width=hr.width,We.height=hr.height,Fc(me),cf(hr,Ea),fp(jt,Ea),Hf(),Wc(hr),Fi.profile&&(me.stats.size=Vm(me.internalformat,me.type,hr.width,hr.height,jt.genMipmaps,!1)),We.format=Fa[me.internalformat],We.type=so[me.type],We.mag=Ua[jt.magFilter],We.min=vs[jt.minFilter],We.wrapS=Po[jt.wrapS],We.wrapT=Po[jt.wrapT],We}function At(tr,Pt,jt,hr){var qr=Pt|0,zr=jt|0,Gr=hr|0,en=Xs();return Ra(en,me),en.width=0,en.height=0,Mo(en,tr),en.width=en.width||(me.width>>Gr)-qr,en.height=en.height||(me.height>>Gr)-zr,Fc(me),au(en,Ea,qr,zr,Gr),Hf(),jo(en),We}function Yt(tr,Pt){var jt=tr|0,hr=Pt|0||jt;if(jt===me.width&&hr===me.height)return We;We.width=me.width=jt,We.height=me.height=hr,Fc(me);for(var qr=0;me.mipmask>>qr;++qr){var zr=jt>>qr,Gr=hr>>qr;if(!zr||!Gr)break;rr.texImage2D(Ea,qr,me.format,zr,Gr,0,me.format,me.type,null)}return Hf(),Fi.profile&&(me.stats.size=Vm(me.internalformat,me.type,jt,hr,!1,!1)),We}return We(ne,Fe),We.subimage=At,We.resize=Yt,We._reglType="texture2d",We._texture=me,Fi.profile&&(We.stats=me.stats),We.destroy=function(){me.decRef()},We}function tu(ne,Fe,me,We,At,Yt){var tr=new dp(cs);_d[tr.id]=tr,zi.cubeCount++;var Pt=new Array(6);function jt(zr,Gr,en,Xr,Rr,jr){var Br,Bn=tr.texInfo;for(Zd.call(Bn),Br=0;Br<6;++Br)Pt[Br]=mh();if(typeof zr=="number"||!zr){var ui=zr|0||1;for(Br=0;Br<6;++Br)Mu(Pt[Br],ui,ui)}else if(typeof zr=="object")if(Gr)Fu(Pt[0],zr),Fu(Pt[1],Gr),Fu(Pt[2],en),Fu(Pt[3],Xr),Fu(Pt[4],Rr),Fu(Pt[5],jr);else if(jh(Bn,zr),ls(tr,zr),"faces"in zr){var Ii=zr.faces;for(Br=0;Br<6;++Br)Ra(Pt[Br],tr),Fu(Pt[Br],Ii[Br])}else for(Br=0;Br<6;++Br)Fu(Pt[Br],zr);for(Ra(tr,Pt[0]),Bn.genMipmaps?tr.mipmask=(Pt[0].width<<1)-1:tr.mipmask=Pt[0].mipmask,tr.internalformat=Pt[0].internalformat,jt.width=Pt[0].width,jt.height=Pt[0].height,Fc(tr),Br=0;Br<6;++Br)cf(Pt[Br],No+Br);for(fp(Bn,cs),Hf(),Fi.profile&&(tr.stats.size=Vm(tr.internalformat,tr.type,jt.width,jt.height,Bn.genMipmaps,!0)),jt.format=Fa[tr.internalformat],jt.type=so[tr.type],jt.mag=Ua[Bn.magFilter],jt.min=vs[Bn.minFilter],jt.wrapS=Po[Bn.wrapS],jt.wrapT=Po[Bn.wrapT],Br=0;Br<6;++Br)Wc(Pt[Br]);return jt}function hr(zr,Gr,en,Xr,Rr){var jr=en|0,Br=Xr|0,Bn=Rr|0,ui=Xs();return Ra(ui,tr),ui.width=0,ui.height=0,Mo(ui,Gr),ui.width=ui.width||(tr.width>>Bn)-jr,ui.height=ui.height||(tr.height>>Bn)-Br,Fc(tr),au(ui,No+zr,jr,Br,Bn),Hf(),jo(ui),jt}function qr(zr){var Gr=zr|0;if(Gr!==tr.width){jt.width=tr.width=Gr,jt.height=tr.height=Gr,Fc(tr);for(var en=0;en<6;++en)for(var Xr=0;tr.mipmask>>Xr;++Xr)rr.texImage2D(No+en,Xr,tr.format,Gr>>Xr,Gr>>Xr,0,tr.format,tr.type,null);return Hf(),Fi.profile&&(tr.stats.size=Vm(tr.internalformat,tr.type,jt.width,jt.height,!1,!0)),jt}}return jt(ne,Fe,me,We,At,Yt),jt.subimage=hr,jt.resize=qr,jt._reglType="textureCube",jt._texture=tr,Fi.profile&&(jt.stats=tr.stats),jt.destroy=function(){tr.decRef()},jt}function tc(){for(var ne=0;ne<Hd;++ne)rr.activeTexture(sm+ne),rr.bindTexture(Ea,null),Ol[ne]=null;mr(_d).forEach(Fp),zi.cubeCount=0,zi.textureCount=0}Fi.profile&&(zi.getTotalTextureSize=function(){var ne=0;return Object.keys(_d).forEach(function(Fe){ne+=_d[Fe].stats.size}),ne});function uc(){for(var ne=0;ne<Hd;++ne){var Fe=Ol[ne];Fe&&(Fe.bindCount=0,Fe.unit=-1,Ol[ne]=null)}mr(_d).forEach(function(me){me.texture=rr.createTexture(),rr.bindTexture(me.target,me.texture);for(var We=0;We<32;++We)if((me.mipmask&1<<We)!==0)if(me.target===Ea)rr.texImage2D(Ea,We,me.internalformat,me.width>>We,me.height>>We,0,me.internalformat,me.type,null);else for(var At=0;At<6;++At)rr.texImage2D(No+At,We,me.internalformat,me.width>>We,me.height>>We,0,me.internalformat,me.type,null);fp(me.texInfo,me.target)})}function Xe(){for(var ne=0;ne<Hd;++ne){var Fe=Ol[ne];Fe&&(Fe.bindCount=0,Fe.unit=-1,Ol[ne]=null),rr.activeTexture(sm+ne),rr.bindTexture(Ea,null),rr.bindTexture(cs,null)}}return{create2D:zp,createCube:tu,clear:tc,getTexture:function(ne){return null},restore:uc,refresh:Xe}}var cp=36161,Rg=32854,ry=32855,Wf=36194,E0=33189,B1=36168,My=34041,s0=35907,Ry=34836,Av=34842,ky=34843,uh=[];uh[Rg]=2,uh[ry]=2,uh[Wf]=2,uh[E0]=2,uh[B1]=1,uh[My]=4,uh[s0]=4,uh[Ry]=16,uh[Av]=8,uh[ky]=6;function Cv(rr,mn,En){return uh[rr]*mn*En}var ug=function(rr,mn,En,ia,Wa){var zi={rgba4:Rg,rgb565:Wf,"rgb5 a1":ry,depth:E0,stencil:B1,"depth stencil":My};mn.ext_srgb&&(zi.srgba=s0),mn.ext_color_buffer_half_float&&(zi.rgba16f=Av,zi.rgb16f=ky),mn.webgl_color_buffer_float&&(zi.rgba32f=Ry);var Fi=[];Object.keys(zi).forEach(function(Uo){var io=zi[Uo];Fi[io]=Uo});var Ao=0,To={};function Eo(Uo){this.id=Ao++,this.refCount=1,this.renderbuffer=Uo,this.format=Rg,this.width=0,this.height=0,Wa.profile&&(this.stats={size:0})}Eo.prototype.decRef=function(){--this.refCount<=0&&qo(this)};function qo(Uo){var io=Uo.renderbuffer;rr.bindRenderbuffer(cp,null),rr.deleteRenderbuffer(io),Uo.renderbuffer=null,Uo.refCount=0,delete To[Uo.id],ia.renderbufferCount--}function qs(Uo,io){var xi=new Eo(rr.createRenderbuffer());To[xi.id]=xi,ia.renderbufferCount++;function ga(so,Ua){var vs=0,Po=0,zs=Rg;if(typeof so=="object"&&so){var Ha=so;if("shape"in Ha){var Ra=Ha.shape;vs=Ra[0]|0,Po=Ra[1]|0}else"radius"in Ha&&(vs=Po=Ha.radius|0),"width"in Ha&&(vs=Ha.width|0),"height"in Ha&&(Po=Ha.height|0);"format"in Ha&&(zs=zi[Ha.format])}else typeof so=="number"?(vs=so|0,typeof Ua=="number"?Po=Ua|0:Po=vs):so||(vs=Po=1);if(!(vs===xi.width&&Po===xi.height&&zs===xi.format))return ga.width=xi.width=vs,ga.height=xi.height=Po,xi.format=zs,rr.bindRenderbuffer(cp,xi.renderbuffer),rr.renderbufferStorage(cp,zs,vs,Po),Wa.profile&&(xi.stats.size=Cv(xi.format,xi.width,xi.height)),ga.format=Fi[xi.format],ga}function Fa(so,Ua){var vs=so|0,Po=Ua|0||vs;return vs===xi.width&&Po===xi.height||(ga.width=xi.width=vs,ga.height=xi.height=Po,rr.bindRenderbuffer(cp,xi.renderbuffer),rr.renderbufferStorage(cp,xi.format,vs,Po),Wa.profile&&(xi.stats.size=Cv(xi.format,xi.width,xi.height))),ga}return ga(Uo,io),ga.resize=Fa,ga._reglType="renderbuffer",ga._renderbuffer=xi,Wa.profile&&(ga.stats=xi.stats),ga.destroy=function(){xi.decRef()},ga}Wa.profile&&(ia.getTotalRenderbufferSize=function(){var Uo=0;return Object.keys(To).forEach(function(io){Uo+=To[io].stats.size}),Uo});function xs(){mr(To).forEach(function(Uo){Uo.renderbuffer=rr.createRenderbuffer(),rr.bindRenderbuffer(cp,Uo.renderbuffer),rr.renderbufferStorage(cp,Uo.format,Uo.width,Uo.height)}),rr.bindRenderbuffer(cp,null)}return{create:qs,clear:function(){mr(To).forEach(qo)},restore:xs}},bd=36160,qm=36161,tv=3553,Mv=34069,Ud=36064,Yg=36096,wm=36128,cg=33306,A0=36053,U1=36193,Qb=5121,Xg=5126,C0=6407,Uv=6408,M0=[];M0[Uv]=4,M0[C0]=3;var Tp=[];Tp[Qb]=1,Tp[Xg]=4,Tp[U1]=2;function Zg(rr,mn,En,ia,Wa,zi){var Fi={cur:null,next:null,dirty:!1,setFBO:null},Ao=["rgba"],To=["rgba4","rgb565","rgb5 a1"];mn.ext_srgb&&To.push("srgba"),mn.ext_color_buffer_half_float&&To.push("rgba16f","rgb16f"),mn.webgl_color_buffer_float&&To.push("rgba32f"),mn.oes_texture_half_float,mn.oes_texture_float;function Eo(ua,Wo,Mo){this.target=ua,this.texture=Wo,this.renderbuffer=Mo;var Hs=0,au=0;Wo?(Hs=Wo.width,au=Wo.height):Mo&&(Hs=Mo.width,au=Mo.height),this.width=Hs,this.height=au}function qo(ua){ua&&(ua.texture&&ua.texture._texture.decRef(),ua.renderbuffer&&ua.renderbuffer._renderbuffer.decRef())}function qs(ua,Wo,Mo){if(ua)if(ua.texture){var Hs=ua.texture._texture;Math.max(1,Hs.width),Math.max(1,Hs.height),Hs.refCount+=1}else{var au=ua.renderbuffer._renderbuffer;au.refCount+=1}}function xs(ua,Wo){Wo&&(Wo.texture?rr.framebufferTexture2D(bd,ua,Wo.target,Wo.texture._texture.texture,0):rr.framebufferRenderbuffer(bd,ua,qm,Wo.renderbuffer._renderbuffer.renderbuffer))}function Uo(ua){var Wo=tv,Mo=null,Hs=null,au=ua;typeof ua=="object"&&(au=ua.data,"target"in ua&&(Wo=ua.target|0));var ws=au._reglType;return ws==="texture2d"||ws==="textureCube"?Mo=au:ws==="renderbuffer"&&(Hs=au,Wo=qm),new Eo(Wo,Mo,Hs)}function io(ua,Wo,Mo,Hs,au){if(Mo){var ws=ia.create2D({width:ua,height:Wo,format:Hs,type:au});return ws._texture.refCount=0,new Eo(tv,ws,null)}else{var Xs=Wa.create({width:ua,height:Wo,format:Hs});return Xs._renderbuffer.refCount=0,new Eo(qm,null,Xs)}}function xi(ua){return ua&&(ua.texture||ua.renderbuffer)}function ga(ua,Wo,Mo){ua&&(ua.texture?ua.texture.resize(Wo,Mo):ua.renderbuffer&&ua.renderbuffer.resize(Wo,Mo),ua.width=Wo,ua.height=Mo)}var Fa=0,so={};function Ua(){this.id=Fa++,so[this.id]=this,this.framebuffer=rr.createFramebuffer(),this.width=0,this.height=0,this.colorAttachments=[],this.depthAttachment=null,this.stencilAttachment=null,this.depthStencilAttachment=null}function vs(ua){ua.colorAttachments.forEach(qo),qo(ua.depthAttachment),qo(ua.stencilAttachment),qo(ua.depthStencilAttachment)}function Po(ua){var Wo=ua.framebuffer;rr.deleteFramebuffer(Wo),ua.framebuffer=null,zi.framebufferCount--,delete so[ua.id]}function zs(ua){var Wo;rr.bindFramebuffer(bd,ua.framebuffer);var Mo=ua.colorAttachments;for(Wo=0;Wo<Mo.length;++Wo)xs(Ud+Wo,Mo[Wo]);for(Wo=Mo.length;Wo<En.maxColorAttachments;++Wo)rr.framebufferTexture2D(bd,Ud+Wo,tv,null,0);rr.framebufferTexture2D(bd,cg,tv,null,0),rr.framebufferTexture2D(bd,Yg,tv,null,0),rr.framebufferTexture2D(bd,wm,tv,null,0),xs(Yg,ua.depthAttachment),xs(wm,ua.stencilAttachment),xs(cg,ua.depthStencilAttachment);var Hs=rr.checkFramebufferStatus(bd);rr.isContextLost(),rr.bindFramebuffer(bd,Fi.next?Fi.next.framebuffer:null),Fi.cur=Fi.next,rr.getError()}function Ha(ua,Wo){var Mo=new Ua;zi.framebufferCount++;function Hs(ws,Xs){var jo,Jl=0,Mu=0,Fu=!0,cf=!0,zu=null,mh=!0,Wc="rgba",Zd="uint8",jh=1,fp=null,Am=null,_d=null,Hd=!1;if(typeof ws=="number")Jl=ws|0,Mu=Xs|0||Jl;else if(!ws)Jl=Mu=1;else{var Ol=ws;if("shape"in Ol){var dp=Ol.shape;Jl=dp[0],Mu=dp[1]}else"radius"in Ol&&(Jl=Mu=Ol.radius),"width"in Ol&&(Jl=Ol.width),"height"in Ol&&(Mu=Ol.height);("color"in Ol||"colors"in Ol)&&(zu=Ol.color||Ol.colors),zu||("colorCount"in Ol&&(jh=Ol.colorCount|0),"colorTexture"in Ol&&(mh=!!Ol.colorTexture,Wc="rgba4"),"colorType"in Ol&&(Zd=Ol.colorType,mh||(Zd==="half float"||Zd==="float16"?Wc="rgba16f":(Zd==="float"||Zd==="float32")&&(Wc="rgba32f"))),"colorFormat"in Ol&&(Wc=Ol.colorFormat,Ao.indexOf(Wc)>=0?mh=!0:To.indexOf(Wc)>=0&&(mh=!1))),("depthTexture"in Ol||"depthStencilTexture"in Ol)&&(Hd=!!(Ol.depthTexture||Ol.depthStencilTexture)),"depth"in Ol&&(typeof Ol.depth=="boolean"?Fu=Ol.depth:(fp=Ol.depth,cf=!1)),"stencil"in Ol&&(typeof Ol.stencil=="boolean"?cf=Ol.stencil:(Am=Ol.stencil,Fu=!1)),"depthStencil"in Ol&&(typeof Ol.depthStencil=="boolean"?Fu=cf=Ol.depthStencil:(_d=Ol.depthStencil,Fu=!1,cf=!1))}var Fc=null,Hf=null,Fp=null,zp=null;if(Array.isArray(zu))Fc=zu.map(Uo);else if(zu)Fc=[Uo(zu)];else for(Fc=new Array(jh),jo=0;jo<jh;++jo)Fc[jo]=io(Jl,Mu,mh,Wc,Zd);for(Jl=Jl||Fc[0].width,Mu=Mu||Fc[0].height,fp?Hf=Uo(fp):Fu&&!cf&&(Hf=io(Jl,Mu,Hd,"depth","uint32")),Am?Fp=Uo(Am):cf&&!Fu&&(Fp=io(Jl,Mu,!1,"stencil","uint8")),_d?zp=Uo(_d):!fp&&!Am&&cf&&Fu&&(zp=io(Jl,Mu,Hd,"depth stencil","depth stencil")),jo=0;jo<Fc.length;++jo)qs(Fc[jo]),Fc[jo]&&Fc[jo].texture&&M0[Fc[jo].texture._texture.format]*Tp[Fc[jo].texture._texture.type];return qs(Hf),qs(Fp),qs(zp),vs(Mo),Mo.width=Jl,Mo.height=Mu,Mo.colorAttachments=Fc,Mo.depthAttachment=Hf,Mo.stencilAttachment=Fp,Mo.depthStencilAttachment=zp,Hs.color=Fc.map(xi),Hs.depth=xi(Hf),Hs.stencil=xi(Fp),Hs.depthStencil=xi(zp),Hs.width=Mo.width,Hs.height=Mo.height,zs(Mo),Hs}function au(ws,Xs){var jo=Math.max(ws|0,1),Jl=Math.max(Xs|0||jo,1);if(jo===Mo.width&&Jl===Mo.height)return Hs;for(var Mu=Mo.colorAttachments,Fu=0;Fu<Mu.length;++Fu)ga(Mu[Fu],jo,Jl);return ga(Mo.depthAttachment,jo,Jl),ga(Mo.stencilAttachment,jo,Jl),ga(Mo.depthStencilAttachment,jo,Jl),Mo.width=Hs.width=jo,Mo.height=Hs.height=Jl,zs(Mo),Hs}return Hs(ua,Wo),w(Hs,{resize:au,_reglType:"framebuffer",_framebuffer:Mo,destroy:function(){Po(Mo),vs(Mo)},use:function(ws){Fi.setFBO({framebuffer:Hs},ws)}})}function Ra(ua){var Wo=Array(6);function Mo(au){var ws,Xs={color:null},jo=0,Jl=null,Mu="rgba",Fu="uint8",cf=1;if(typeof au=="number")jo=au|0;else if(!au)jo=1;else{var zu=au;if("shape"in zu){var mh=zu.shape;jo=mh[0]}else"radius"in zu&&(jo=zu.radius|0),"width"in zu?jo=zu.width|0:"height"in zu&&(jo=zu.height|0);("color"in zu||"colors"in zu)&&(Jl=zu.color||zu.colors),Jl||("colorCount"in zu&&(cf=zu.colorCount|0),"colorType"in zu&&(Fu=zu.colorType),"colorFormat"in zu&&(Mu=zu.colorFormat)),"depth"in zu&&(Xs.depth=zu.depth),"stencil"in zu&&(Xs.stencil=zu.stencil),"depthStencil"in zu&&(Xs.depthStencil=zu.depthStencil)}var Wc;if(Jl)if(Array.isArray(Jl))for(Wc=[],ws=0;ws<Jl.length;++ws)Wc[ws]=Jl[ws];else Wc=[Jl];else{Wc=Array(cf);var Zd={radius:jo,format:Mu,type:Fu};for(ws=0;ws<cf;++ws)Wc[ws]=ia.createCube(Zd)}for(Xs.color=Array(Wc.length),ws=0;ws<Wc.length;++ws){var jh=Wc[ws];jo=jo||jh.width,Xs.color[ws]={target:Mv,data:Wc[ws]}}for(ws=0;ws<6;++ws){for(var fp=0;fp<Wc.length;++fp)Xs.color[fp].target=Mv+ws;ws>0&&(Xs.depth=Wo[0].depth,Xs.stencil=Wo[0].stencil,Xs.depthStencil=Wo[0].depthStencil),Wo[ws]?Wo[ws](Xs):Wo[ws]=Ha(Xs)}return w(Mo,{width:jo,height:jo,color:Wc})}function Hs(au){var ws,Xs=au|0;if(Xs===Mo.width)return Mo;var jo=Mo.color;for(ws=0;ws<jo.length;++ws)jo[ws].resize(Xs);for(ws=0;ws<6;++ws)Wo[ws].resize(Xs);return Mo.width=Mo.height=Xs,Mo}return Mo(ua),w(Mo,{faces:Wo,resize:Hs,_reglType:"framebufferCube",destroy:function(){Wo.forEach(function(au){au.destroy()})}})}function ls(){Fi.cur=null,Fi.next=null,Fi.dirty=!0,mr(so).forEach(function(ua){ua.framebuffer=rr.createFramebuffer(),zs(ua)})}return w(Fi,{getFramebuffer:function(ua){if(typeof ua=="function"&&ua._reglType==="framebuffer"){var Wo=ua._framebuffer;if(Wo instanceof Ua)return Wo}return null},create:Ha,createCube:Ra,clear:function(){mr(so).forEach(Po)},restore:ls})}var Iy=5126,Kg=34962,Rd=34963;function Rv(){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=Iy,this.offset=0,this.stride=0,this.divisor=0}function cm(rr,mn,En,ia,Wa,zi,Fi){for(var Ao=En.maxAttributes,To=new Array(Ao),Eo=0;Eo<Ao;++Eo)To[Eo]=new Rv;var qo=0,qs={},xs={Record:Rv,scope:{},state:To,currentVAO:null,targetVAO:null,restore:io()?Po:function(){},createVAO:zs,getVAO:ga,destroyBuffer:Uo,setVAO:io()?Fa:so,clear:io()?Ua:function(){}};function Uo(Ha){for(var Ra=0;Ra<To.length;++Ra){var ls=To[Ra];ls.buffer===Ha&&(rr.disableVertexAttribArray(Ra),ls.buffer=null)}}function io(){return mn.oes_vertex_array_object}function xi(){return mn.angle_instanced_arrays}function ga(Ha){return typeof Ha=="function"&&Ha._vao?Ha._vao:null}function Fa(Ha){if(Ha!==xs.currentVAO){var Ra=io();Ha?Ra.bindVertexArrayOES(Ha.vao):Ra.bindVertexArrayOES(null),xs.currentVAO=Ha}}function so(Ha){if(Ha!==xs.currentVAO){if(Ha)Ha.bindAttrs();else{for(var Ra=xi(),ls=0;ls<To.length;++ls){var ua=To[ls];ua.buffer?(rr.enableVertexAttribArray(ls),ua.buffer.bind(),rr.vertexAttribPointer(ls,ua.size,ua.type,ua.normalized,ua.stride,ua.offfset),Ra&&ua.divisor&&Ra.vertexAttribDivisorANGLE(ls,ua.divisor)):(rr.disableVertexAttribArray(ls),rr.vertexAttrib4f(ls,ua.x,ua.y,ua.z,ua.w))}Fi.elements?rr.bindBuffer(Rd,Fi.elements.buffer.buffer):rr.bindBuffer(Rd,null)}xs.currentVAO=Ha}}function Ua(){mr(qs).forEach(function(Ha){Ha.destroy()})}function vs(){this.id=++qo,this.attributes=[],this.elements=null,this.ownsElements=!1,this.count=0,this.offset=0,this.instances=-1,this.primitive=4;var Ha=io();Ha?this.vao=Ha.createVertexArrayOES():this.vao=null,qs[this.id]=this,this.buffers=[]}vs.prototype.bindAttrs=function(){for(var Ha=xi(),Ra=this.attributes,ls=0;ls<Ra.length;++ls){var ua=Ra[ls];ua.buffer?(rr.enableVertexAttribArray(ls),rr.bindBuffer(Kg,ua.buffer.buffer),rr.vertexAttribPointer(ls,ua.size,ua.type,ua.normalized,ua.stride,ua.offset),Ha&&ua.divisor&&Ha.vertexAttribDivisorANGLE(ls,ua.divisor)):(rr.disableVertexAttribArray(ls),rr.vertexAttrib4f(ls,ua.x,ua.y,ua.z,ua.w))}for(var Wo=Ra.length;Wo<Ao;++Wo)rr.disableVertexAttribArray(Wo);var Mo=zi.getElements(this.elements);Mo?rr.bindBuffer(Rd,Mo.buffer.buffer):rr.bindBuffer(Rd,null)},vs.prototype.refresh=function(){var Ha=io();Ha&&(Ha.bindVertexArrayOES(this.vao),this.bindAttrs(),xs.currentVAO=null,Ha.bindVertexArrayOES(null))},vs.prototype.destroy=function(){if(this.vao){var Ha=io();this===xs.currentVAO&&(xs.currentVAO=null,Ha.bindVertexArrayOES(null)),Ha.deleteVertexArrayOES(this.vao),this.vao=null}this.ownsElements&&(this.elements.destroy(),this.elements=null,this.ownsElements=!1),qs[this.id]&&(delete qs[this.id],ia.vaoCount-=1)};function Po(){var Ha=io();Ha&&mr(qs).forEach(function(Ra){Ra.refresh()})}function zs(Ha){var Ra=new vs;ia.vaoCount+=1;function ls(ua){var Wo;if(Array.isArray(ua))Wo=ua,Ra.elements&&Ra.ownsElements&&Ra.elements.destroy(),Ra.elements=null,Ra.ownsElements=!1,Ra.offset=0,Ra.count=0,Ra.instances=-1,Ra.primitive=4;else{if(ua.elements){var Mo=ua.elements;Ra.ownsElements?typeof Mo=="function"&&Mo._reglType==="elements"?(Ra.elements.destroy(),Ra.ownsElements=!1):(Ra.elements(Mo),Ra.ownsElements=!1):zi.getElements(ua.elements)?(Ra.elements=ua.elements,Ra.ownsElements=!1):(Ra.elements=zi.create(ua.elements),Ra.ownsElements=!0)}else Ra.elements=null,Ra.ownsElements=!1;Wo=ua.attributes,Ra.offset=0,Ra.count=-1,Ra.instances=-1,Ra.primitive=4,Ra.elements&&(Ra.count=Ra.elements._elements.vertCount,Ra.primitive=Ra.elements._elements.primType),"offset"in ua&&(Ra.offset=ua.offset|0),"count"in ua&&(Ra.count=ua.count|0),"instances"in ua&&(Ra.instances=ua.instances|0),"primitive"in ua&&(Ra.primitive=vr[ua.primitive])}var Hs={},au=Ra.attributes;au.length=Wo.length;for(var ws=0;ws<Wo.length;++ws){var Xs=Wo[ws],jo=au[ws]=new Rv,Jl=Xs.data||Xs;if(Array.isArray(Jl)||In(Jl)||Gn(Jl)){var Mu;Ra.buffers[ws]&&(Mu=Ra.buffers[ws],In(Jl)&&Mu._buffer.byteLength>=Jl.byteLength?Mu.subdata(Jl):(Mu.destroy(),Ra.buffers[ws]=null)),Ra.buffers[ws]||(Mu=Ra.buffers[ws]=Wa.create(Xs,Kg,!1,!0)),jo.buffer=Wa.getBuffer(Mu),jo.size=jo.buffer.dimension|0,jo.normalized=!1,jo.type=jo.buffer.dtype,jo.offset=0,jo.stride=0,jo.divisor=0,jo.state=1,Hs[ws]=1}else Wa.getBuffer(Xs)?(jo.buffer=Wa.getBuffer(Xs),jo.size=jo.buffer.dimension|0,jo.normalized=!1,jo.type=jo.buffer.dtype,jo.offset=0,jo.stride=0,jo.divisor=0,jo.state=1):Wa.getBuffer(Xs.buffer)?(jo.buffer=Wa.getBuffer(Xs.buffer),jo.size=(+Xs.size||jo.buffer.dimension)|0,jo.normalized=!!Xs.normalized||!1,"type"in Xs?jo.type=Wi[Xs.type]:jo.type=jo.buffer.dtype,jo.offset=(Xs.offset||0)|0,jo.stride=(Xs.stride||0)|0,jo.divisor=(Xs.divisor||0)|0,jo.state=1):"x"in Xs&&(jo.x=+Xs.x||0,jo.y=+Xs.y||0,jo.z=+Xs.z||0,jo.w=+Xs.w||0,jo.state=2)}for(var Fu=0;Fu<Ra.buffers.length;++Fu)!Hs[Fu]&&Ra.buffers[Fu]&&(Ra.buffers[Fu].destroy(),Ra.buffers[Fu]=null);return Ra.refresh(),ls}return ls.destroy=function(){for(var ua=0;ua<Ra.buffers.length;++ua)Ra.buffers[ua]&&Ra.buffers[ua].destroy();Ra.buffers.length=0,Ra.ownsElements&&(Ra.elements.destroy(),Ra.elements=null,Ra.ownsElements=!1),Ra.destroy()},ls._vao=Ra,ls._reglType="vao",ls(Ha)}return xs}var ny=35632,Ld=35633,l0=35718,fg=35721;function Hv(rr,mn,En,ia){var Wa={},zi={};function Fi(xi,ga,Fa,so){this.name=xi,this.id=ga,this.location=Fa,this.info=so}function Ao(xi,ga){for(var Fa=0;Fa<xi.length;++Fa)if(xi[Fa].id===ga.id){xi[Fa].location=ga.location;return}xi.push(ga)}function To(xi,ga,Fa){var so=xi===ny?Wa:zi,Ua=so[ga];if(!Ua){var vs=mn.str(ga);Ua=rr.createShader(xi),rr.shaderSource(Ua,vs),rr.compileShader(Ua),so[ga]=Ua}return Ua}var Eo={},qo=[],qs=0;function xs(xi,ga){this.id=qs++,this.fragId=xi,this.vertId=ga,this.program=null,this.uniforms=[],this.attributes=[],this.refCount=1,ia.profile&&(this.stats={uniformsCount:0,attributesCount:0})}function Uo(xi,ga,Fa){var so,Ua,vs=To(ny,xi.fragId),Po=To(Ld,xi.vertId),zs=xi.program=rr.createProgram();if(rr.attachShader(zs,vs),rr.attachShader(zs,Po),Fa)for(so=0;so<Fa.length;++so){var Ha=Fa[so];rr.bindAttribLocation(zs,Ha[0],Ha[1])}rr.linkProgram(zs);var Ra=rr.getProgramParameter(zs,l0);ia.profile&&(xi.stats.uniformsCount=Ra);var ls=xi.uniforms;for(so=0;so<Ra;++so)if(Ua=rr.getActiveUniform(zs,so),Ua)if(Ua.size>1)for(var ua=0;ua<Ua.size;++ua){var Wo=Ua.name.replace("[0]","["+ua+"]");Ao(ls,new Fi(Wo,mn.id(Wo),rr.getUniformLocation(zs,Wo),Ua))}else Ao(ls,new Fi(Ua.name,mn.id(Ua.name),rr.getUniformLocation(zs,Ua.name),Ua));var Mo=rr.getProgramParameter(zs,fg);ia.profile&&(xi.stats.attributesCount=Mo);var Hs=xi.attributes;for(so=0;so<Mo;++so)Ua=rr.getActiveAttrib(zs,so),Ua&&Ao(Hs,new Fi(Ua.name,mn.id(Ua.name),rr.getAttribLocation(zs,Ua.name),Ua))}ia.profile&&(En.getMaxUniformsCount=function(){var xi=0;return qo.forEach(function(ga){ga.stats.uniformsCount>xi&&(xi=ga.stats.uniformsCount)}),xi},En.getMaxAttributesCount=function(){var xi=0;return qo.forEach(function(ga){ga.stats.attributesCount>xi&&(xi=ga.stats.attributesCount)}),xi});function io(){Wa={},zi={};for(var xi=0;xi<qo.length;++xi)Uo(qo[xi],null,qo[xi].attributes.map(function(ga){return[ga.location,ga.name]}))}return{clear:function(){var xi=rr.deleteShader.bind(rr);mr(Wa).forEach(xi),Wa={},mr(zi).forEach(xi),zi={},qo.forEach(function(ga){rr.deleteProgram(ga.program)}),qo.length=0,Eo={},En.shaderCount=0},program:function(xi,ga,Fa,so){var Ua=Eo[ga];Ua||(Ua=Eo[ga]={});var vs=Ua[xi];if(vs&&(vs.refCount++,!so))return vs;var Po=new xs(ga,xi);return En.shaderCount++,Uo(Po,Fa,so),vs||(Ua[xi]=Po),qo.push(Po),w(Po,{destroy:function(){if(Po.refCount--,Po.refCount<=0){rr.deleteProgram(Po.program);var zs=qo.indexOf(Po);qo.splice(zs,1),En.shaderCount--}Ua[Po.vertId].refCount<=0&&(rr.deleteShader(zi[Po.vertId]),delete zi[Po.vertId],delete Eo[Po.fragId][Po.vertId]),Object.keys(Eo[Po.fragId]).length||(rr.deleteShader(Wa[Po.fragId]),delete Wa[Po.fragId],delete Eo[Po.fragId])}})},restore:io,shader:To,frag:-1,vert:-1}}var u0=6408,Sm=5121,c0=3333,H1=5126;function Np(rr,mn,En,ia,Wa,zi,Fi){function Ao(qo){var qs;mn.next===null?qs=Sm:qs=mn.next.colorAttachments[0].texture._texture.type;var xs=0,Uo=0,io=ia.framebufferWidth,xi=ia.framebufferHeight,ga=null;In(qo)?ga=qo:qo&&(xs=qo.x|0,Uo=qo.y|0,io=(qo.width||ia.framebufferWidth-xs)|0,xi=(qo.height||ia.framebufferHeight-Uo)|0,ga=qo.data||null),En();var Fa=io*xi*4;return ga||(qs===Sm?ga=new Uint8Array(Fa):qs===H1&&(ga=ga||new Float32Array(Fa))),rr.pixelStorei(c0,4),rr.readPixels(xs,Uo,io,xi,u0,qs,ga),ga}function To(qo){var qs;return mn.setFBO({framebuffer:qo.framebuffer},function(){qs=Ao(qo)}),qs}function Eo(qo){return!qo||!("framebuffer"in qo)?Ao(qo):To(qo)}return Eo}function Py(rr){return Gm(jv(Tm(rr)))}function jv(rr){return pv(yo(ph(rr),rr.length*8))}function Gm(rr){for(var mn="0123456789abcdef",En="",ia,Wa=0;Wa<rr.length;Wa++)ia=rr.charCodeAt(Wa),En+=mn.charAt(ia>>>4&15)+mn.charAt(ia&15);return En}function Tm(rr){for(var mn="",En=-1,ia,Wa;++En<rr.length;)ia=rr.charCodeAt(En),Wa=En+1<rr.length?rr.charCodeAt(En+1):0,55296<=ia&&ia<=56319&&56320<=Wa&&Wa<=57343&&(ia=65536+((ia&1023)<<10)+(Wa&1023),En++),ia<=127?mn+=String.fromCharCode(ia):ia<=2047?mn+=String.fromCharCode(192|ia>>>6&31,128|ia&63):ia<=65535?mn+=String.fromCharCode(224|ia>>>12&15,128|ia>>>6&63,128|ia&63):ia<=2097151&&(mn+=String.fromCharCode(240|ia>>>18&7,128|ia>>>12&63,128|ia>>>6&63,128|ia&63));return mn}function ph(rr){for(var mn=Array(rr.length>>2),En=0;En<mn.length;En++)mn[En]=0;for(var En=0;En<rr.length*8;En+=8)mn[En>>5]|=(rr.charCodeAt(En/8)&255)<<24-En%32;return mn}function pv(rr){for(var mn="",En=0;En<rr.length*32;En+=8)mn+=String.fromCharCode(rr[En>>5]>>>24-En%32&255);return mn}function Yd(rr,mn){return rr>>>mn|rr<<32-mn}function dg(rr,mn){return rr>>>mn}function Em(rr,mn,En){return rr&mn^~rr&En}function iy(rr,mn,En){return rr&mn^rr&En^mn&En}function sn(rr){return Yd(rr,2)^Yd(rr,13)^Yd(rr,22)}function Fn(rr){return Yd(rr,6)^Yd(rr,11)^Yd(rr,25)}function Li(rr){return Yd(rr,7)^Yd(rr,18)^dg(rr,3)}function Si(rr){return Yd(rr,17)^Yd(rr,19)^dg(rr,10)}var ma=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 yo(rr,mn){var En=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),ia=new Array(64),Wa,zi,Fi,Ao,To,Eo,qo,qs,xs,Uo,io,xi;for(rr[mn>>5]|=128<<24-mn%32,rr[(mn+64>>9<<4)+15]=mn,xs=0;xs<rr.length;xs+=16){for(Wa=En[0],zi=En[1],Fi=En[2],Ao=En[3],To=En[4],Eo=En[5],qo=En[6],qs=En[7],Uo=0;Uo<64;Uo++)Uo<16?ia[Uo]=rr[Uo+xs]:ia[Uo]=uo(uo(uo(Si(ia[Uo-2]),ia[Uo-7]),Li(ia[Uo-15])),ia[Uo-16]),io=uo(uo(uo(uo(qs,Fn(To)),Em(To,Eo,qo)),ma[Uo]),ia[Uo]),xi=uo(sn(Wa),iy(Wa,zi,Fi)),qs=qo,qo=Eo,Eo=To,To=uo(Ao,io),Ao=Fi,Fi=zi,zi=Wa,Wa=uo(io,xi);En[0]=uo(Wa,En[0]),En[1]=uo(zi,En[1]),En[2]=uo(Fi,En[2]),En[3]=uo(Ao,En[3]),En[4]=uo(To,En[4]),En[5]=uo(Eo,En[5]),En[6]=uo(qo,En[6]),En[7]=uo(qs,En[7])}return En}function uo(rr,mn){var En=(rr&65535)+(mn&65535),ia=(rr>>16)+(mn>>16)+(En>>16);return ia<<16|En&65535}function rs(rr){return Array.prototype.slice.call(rr)}function hs(rr){return rs(rr).join("")}function Ws(rr){var mn=rr&&rr.cache,En=0,ia=[],Wa=[],zi=[];function Fi(io,xi){var ga=xi&&xi.stable;if(!ga){for(var Fa=0;Fa<Wa.length;++Fa)if(Wa[Fa]===io&&!zi[Fa])return ia[Fa]}var so="g"+En++;return ia.push(so),Wa.push(io),zi.push(ga),so}function Ao(){var io=[];function xi(){io.push.apply(io,rs(arguments))}var ga=[];function Fa(){var so="v"+En++;return ga.push(so),arguments.length>0&&(io.push(so,"="),io.push.apply(io,rs(arguments)),io.push(";")),so}return w(xi,{def:Fa,toString:function(){return hs([ga.length>0?"var "+ga.join(",")+";":"",hs(io)])}})}function To(){var io=Ao(),xi=Ao(),ga=io.toString,Fa=xi.toString;function so(Ua,vs){xi(Ua,vs,"=",io.def(Ua,vs),";")}return w(function(){io.apply(io,rs(arguments))},{def:io.def,entry:io,exit:xi,save:so,set:function(Ua,vs,Po){so(Ua,vs),io(Ua,vs,"=",Po,";")},toString:function(){return ga()+Fa()}})}function Eo(){var io=hs(arguments),xi=To(),ga=To(),Fa=xi.toString,so=ga.toString;return w(xi,{then:function(){return xi.apply(xi,rs(arguments)),this},else:function(){return ga.apply(ga,rs(arguments)),this},toString:function(){var Ua=so();return Ua&&(Ua="else{"+Ua+"}"),hs(["if(",io,"){",Fa(),"}",Ua])}})}var qo=Ao(),qs={};function xs(io,xi){var ga=[];function Fa(){var zs="a"+ga.length;return ga.push(zs),zs}xi=xi||0;for(var so=0;so<xi;++so)Fa();var Ua=To(),vs=Ua.toString,Po=qs[io]=w(Ua,{arg:Fa,toString:function(){return hs(["function(",ga.join(),"){",vs(),"}"])}});return Po}function Uo(){var io=['"use strict";',qo,"return {"];Object.keys(qs).forEach(function(so){io.push('"',so,'":',qs[so].toString(),",")}),io.push("}");var xi=hs(io).replace(/;/g,`;
`).replace(/}/g,`}
`).replace(/{/g,`{
`),ga;if(mn&&(ga=Py(xi),mn[ga]))return mn[ga].apply(null,Wa);var Fa=Function.apply(null,ia.concat(xi));return mn&&(mn[ga]=Fa),Fa.apply(null,Wa)}return{global:qo,link:Fi,block:Ao,proc:xs,scope:To,cond:Eo,compile:Uo}}var Bo="xyzw".split(""),As=5121,Jo=1,Io=2,ll=0,Tu=1,du=2,ku=3,Au=4,cl=5,Os=6,Vu="dither",Nc="blend.enable",Sf="blend.color",sd="blend.equation",Cf="blend.func",ld="depth.enable",Jc="depth.func",wh="depth.range",vh="depth.mask",rd="colorMask",Wl="cull.enable",lc="cull.face",Bf="frontFace",gf="lineWidth",rv="polygonOffset.enable",nv="polygonOffset.offset",vv="sample.alpha",kg="sample.enable",iv="sample.coverage",$m="stencil.enable",Sh="stencil.mask",Wm="stencil.func",Iu="stencil.opFront",Gu="stencil.opBack",Ym="scissor.enable",Vv="scissor.box",kv="viewport",wt="profile",q="framebuffer",Ae="vert",it="frag",ot="elements",bt="primitive",ar="count",yr="offset",Ur="instances",ln="vao",Cn="Width",Pn="Height",vi=q+Cn,Ui=q+Pn,kt=kv+Cn,zt=kv+Pn,Qt="drawingBuffer",cr=Qt+Cn,Sr=Qt+Pn,gr=[Cf,sd,Wm,Iu,Gu,iv,kv,Vv,nv],Nr=34962,vn=34963,An=2884,Ln=3042,ai=3024,ki=2960,ra=2929,oa=3089,Ma=32823,mo=32926,ns=32928,$o=5126,as=35664,fl=35665,Zl=35666,Fl=5124,Du=35667,qc=35668,Gc=35669,_c=35670,ef=35671,Xd=35672,kd=35673,Ec=35674,Ac=35675,Ih=35676,Ep=35678,Iv=35680,$e=4,vt=1028,Bt=1029,fr=2304,pr=2305,_r=32775,Yr=32776,Wr=519,yn=7680,li=0,ni=1,Pi=32774,Ji=513,na=36160,_o=36064,ca={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},La={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},qa={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},bo={cw:fr,ccw:pr};function So(rr){return Array.isArray(rr)||In(rr)||Gn(rr)}function Va(rr){return rr.sort(function(mn,En){return mn===kv?-1:En===kv?1:mn<En?-1:1})}function os(rr,mn,En,ia){this.thisDep=rr,this.contextDep=mn,this.propDep=En,this.append=ia}function ul(rr){return rr&&!(rr.thisDep||rr.contextDep||rr.propDep)}function Us(rr){return new os(!1,!1,!1,rr)}function rl(rr,mn){var En=rr.type;if(En===ll){var ia=rr.data.length;return new os(!0,ia>=1,ia>=2,mn)}else if(En===Au){var Wa=rr.data;return new os(Wa.thisDep,Wa.contextDep,Wa.propDep,mn)}else{if(En===cl)return new os(!1,!1,!1,mn);if(En===Os){for(var zi=!1,Fi=!1,Ao=!1,To=0;To<rr.data.length;++To){var Eo=rr.data[To];if(Eo.type===Tu)Ao=!0;else if(Eo.type===du)Fi=!0;else if(Eo.type===ku)zi=!0;else if(Eo.type===ll){zi=!0;var qo=Eo.data;qo>=1&&(Fi=!0),qo>=2&&(Ao=!0)}else Eo.type===Au&&(zi=zi||Eo.data.thisDep,Fi=Fi||Eo.data.contextDep,Ao=Ao||Eo.data.propDep)}return new os(zi,Fi,Ao,mn)}else return new os(En===ku,En===du,En===Tu,mn)}}var Yl=new os(!1,!1,!1,function(){});function eu(rr,mn,En,ia,Wa,zi,Fi,Ao,To,Eo,qo,qs,xs,Uo,io,xi){var ga=Eo.Record,Fa={add:32774,subtract:32778,"reverse subtract":32779};En.ext_blend_minmax&&(Fa.min=_r,Fa.max=Yr);var so=En.angle_instanced_arrays,Ua=En.webgl_draw_buffers,vs=En.oes_vertex_array_object,Po={dirty:!0,profile:xi.profile},zs={},Ha=[],Ra={},ls={};function ua(Pt){return Pt.replace(".","_")}function Wo(Pt,jt,hr){var qr=ua(Pt);Ha.push(Pt),zs[qr]=Po[qr]=!!hr,Ra[qr]=jt}function Mo(Pt,jt,hr){var qr=ua(Pt);Ha.push(Pt),Array.isArray(hr)?(Po[qr]=hr.slice(),zs[qr]=hr.slice()):Po[qr]=zs[qr]=hr,ls[qr]=jt}function Hs(Pt){return!!isNaN(Pt)}Wo(Vu,ai),Wo(Nc,Ln),Mo(Sf,"blendColor",[0,0,0,0]),Mo(sd,"blendEquationSeparate",[Pi,Pi]),Mo(Cf,"blendFuncSeparate",[ni,li,ni,li]),Wo(ld,ra,!0),Mo(Jc,"depthFunc",Ji),Mo(wh,"depthRange",[0,1]),Mo(vh,"depthMask",!0),Mo(rd,rd,[!0,!0,!0,!0]),Wo(Wl,An),Mo(lc,"cullFace",Bt),Mo(Bf,Bf,pr),Mo(gf,gf,1),Wo(rv,Ma),Mo(nv,"polygonOffset",[0,0]),Wo(vv,mo),Wo(kg,ns),Mo(iv,"sampleCoverage",[1,!1]),Wo($m,ki),Mo(Sh,"stencilMask",-1),Mo(Wm,"stencilFunc",[Wr,0,-1]),Mo(Iu,"stencilOpSeparate",[vt,yn,yn,yn]),Mo(Gu,"stencilOpSeparate",[Bt,yn,yn,yn]),Wo(Ym,oa),Mo(Vv,"scissor",[0,0,rr.drawingBufferWidth,rr.drawingBufferHeight]),Mo(kv,kv,[0,0,rr.drawingBufferWidth,rr.drawingBufferHeight]);var au={gl:rr,context:xs,strings:mn,next:zs,current:Po,draw:qs,elements:zi,buffer:Wa,shader:qo,attributes:Eo.state,vao:Eo,uniforms:To,framebuffer:Ao,extensions:En,timer:Uo,isBufferArgs:So},ws={primTypes:vr,compareFuncs:La,blendFuncs:ca,blendEquations:Fa,stencilOps:qa,glTypes:Wi,orientationType:bo};Ua&&(ws.backBuffer=[Bt],ws.drawBuffer=T(ia.maxDrawbuffers,function(Pt){return Pt===0?[0]:T(Pt,function(jt){return _o+jt})}));var Xs=0;function jo(){var Pt=Ws({cache:io}),jt=Pt.link,hr=Pt.global;Pt.id=Xs++,Pt.batchId="0";var qr=jt(au),zr=Pt.shared={props:"a0"};Object.keys(au).forEach(function(jr){zr[jr]=hr.def(qr,".",jr)});var Gr=Pt.next={},en=Pt.current={};Object.keys(ls).forEach(function(jr){Array.isArray(Po[jr])&&(Gr[jr]=hr.def(zr.next,".",jr),en[jr]=hr.def(zr.current,".",jr))});var Xr=Pt.constants={};Object.keys(ws).forEach(function(jr){Xr[jr]=hr.def(JSON.stringify(ws[jr]))}),Pt.invoke=function(jr,Br){switch(Br.type){case ll:var Bn=["this",zr.context,zr.props,Pt.batchId];return jr.def(jt(Br.data),".call(",Bn.slice(0,Math.max(Br.data.length+1,4)),")");case Tu:return jr.def(zr.props,Br.data);case du:return jr.def(zr.context,Br.data);case ku:return jr.def("this",Br.data);case Au:return Br.data.append(Pt,jr),Br.data.ref;case cl:return Br.data.toString();case Os:return Br.data.map(function(ui){return Pt.invoke(jr,ui)})}},Pt.attribCache={};var Rr={};return Pt.scopeAttrib=function(jr){var Br=mn.id(jr);if(Br in Rr)return Rr[Br];var Bn=Eo.scope[Br];Bn||(Bn=Eo.scope[Br]=new ga);var ui=Rr[Br]=jt(Bn);return ui},Pt}function Jl(Pt){var jt=Pt.static,hr=Pt.dynamic,qr;if(wt in jt){var zr=!!jt[wt];qr=Us(function(en,Xr){return zr}),qr.enable=zr}else if(wt in hr){var Gr=hr[wt];qr=rl(Gr,function(en,Xr){return en.invoke(Xr,Gr)})}return qr}function Mu(Pt,jt){var hr=Pt.static,qr=Pt.dynamic;if(q in hr){var zr=hr[q];return zr?(zr=Ao.getFramebuffer(zr),Us(function(en,Xr){var Rr=en.link(zr),jr=en.shared;Xr.set(jr.framebuffer,".next",Rr);var Br=jr.context;return Xr.set(Br,"."+vi,Rr+".width"),Xr.set(Br,"."+Ui,Rr+".height"),Rr})):Us(function(en,Xr){var Rr=en.shared;Xr.set(Rr.framebuffer,".next","null");var jr=Rr.context;return Xr.set(jr,"."+vi,jr+"."+cr),Xr.set(jr,"."+Ui,jr+"."+Sr),"null"})}else if(q in qr){var Gr=qr[q];return rl(Gr,function(en,Xr){var Rr=en.invoke(Xr,Gr),jr=en.shared,Br=jr.framebuffer,Bn=Xr.def(Br,".getFramebuffer(",Rr,")");Xr.set(Br,".next",Bn);var ui=jr.context;return Xr.set(ui,"."+vi,Bn+"?"+Bn+".width:"+ui+"."+cr),Xr.set(ui,"."+Ui,Bn+"?"+Bn+".height:"+ui+"."+Sr),Bn})}else return null}function Fu(Pt,jt,hr){var qr=Pt.static,zr=Pt.dynamic;function Gr(Rr){if(Rr in qr){var jr=qr[Rr],Br=!0,Bn=jr.x|0,ui=jr.y|0,Ii,Ga;return"width"in jr?Ii=jr.width|0:Br=!1,"height"in jr?Ga=jr.height|0:Br=!1,new os(!Br&&jt&&jt.thisDep,!Br&&jt&&jt.contextDep,!Br&&jt&&jt.propDep,function($a,Ja){var wo=$a.shared.context,Ya=Ii;"width"in jr||(Ya=Ja.def(wo,".",vi,"-",Bn));var Ro=Ga;return"height"in jr||(Ro=Ja.def(wo,".",Ui,"-",ui)),[Bn,ui,Ya,Ro]})}else if(Rr in zr){var ka=zr[Rr],wa=rl(ka,function($a,Ja){var wo=$a.invoke(Ja,ka),Ya=$a.shared.context,Ro=Ja.def(wo,".x|0"),Xo=Ja.def(wo,".y|0"),Rs=Ja.def('"width" in ',wo,"?",wo,".width|0:","(",Ya,".",vi,"-",Ro,")"),Qs=Ja.def('"height" in ',wo,"?",wo,".height|0:","(",Ya,".",Ui,"-",Xo,")");return[Ro,Xo,Rs,Qs]});return jt&&(wa.thisDep=wa.thisDep||jt.thisDep,wa.contextDep=wa.contextDep||jt.contextDep,wa.propDep=wa.propDep||jt.propDep),wa}else return jt?new os(jt.thisDep,jt.contextDep,jt.propDep,function($a,Ja){var wo=$a.shared.context;return[0,0,Ja.def(wo,".",vi),Ja.def(wo,".",Ui)]}):null}var en=Gr(kv);if(en){var Xr=en;en=new os(en.thisDep,en.contextDep,en.propDep,function(Rr,jr){var Br=Xr.append(Rr,jr),Bn=Rr.shared.context;return jr.set(Bn,"."+kt,Br[2]),jr.set(Bn,"."+zt,Br[3]),Br})}return{viewport:en,scissor_box:Gr(Vv)}}function cf(Pt,jt){var hr=Pt.static,qr=typeof hr[it]=="string"&&typeof hr[Ae]=="string";if(qr){if(Object.keys(jt.dynamic).length>0)return null;var zr=jt.static,Gr=Object.keys(zr);if(Gr.length>0&&typeof zr[Gr[0]]=="number"){for(var en=[],Xr=0;Xr<Gr.length;++Xr)en.push([zr[Gr[Xr]]|0,Gr[Xr]]);return en}}return null}function zu(Pt,jt,hr){var qr=Pt.static,zr=Pt.dynamic;function Gr(Br){if(Br in qr){var Bn=mn.id(qr[Br]),ui=Us(function(){return Bn});return ui.id=Bn,ui}else if(Br in zr){var Ii=zr[Br];return rl(Ii,function(Ga,ka){var wa=Ga.invoke(ka,Ii),$a=ka.def(Ga.shared.strings,".id(",wa,")");return $a})}return null}var en=Gr(it),Xr=Gr(Ae),Rr=null,jr;return ul(en)&&ul(Xr)?(Rr=qo.program(Xr.id,en.id,null,hr),jr=Us(function(Br,Bn){return Br.link(Rr)})):jr=new os(en&&en.thisDep||Xr&&Xr.thisDep,en&&en.contextDep||Xr&&Xr.contextDep,en&&en.propDep||Xr&&Xr.propDep,function(Br,Bn){var ui=Br.shared.shader,Ii;en?Ii=en.append(Br,Bn):Ii=Bn.def(ui,".",it);var Ga;Xr?Ga=Xr.append(Br,Bn):Ga=Bn.def(ui,".",Ae);var ka=ui+".program("+Ga+","+Ii;return Bn.def(ka+")")}),{frag:en,vert:Xr,progVar:jr,program:Rr}}function mh(Pt,jt){var hr=Pt.static,qr=Pt.dynamic,zr={},Gr=!1;function en(){if(ln in hr){var Ja=hr[ln];return Ja!==null&&Eo.getVAO(Ja)===null&&(Ja=Eo.createVAO(Ja)),Gr=!0,zr.vao=Ja,Us(function(Ya){var Ro=Eo.getVAO(Ja);return Ro?Ya.link(Ro):"null"})}else if(ln in qr){Gr=!0;var wo=qr[ln];return rl(wo,function(Ya,Ro){var Xo=Ya.invoke(Ro,wo);return Ro.def(Ya.shared.vao+".getVAO("+Xo+")")})}return null}var Xr=en(),Rr=!1;function jr(){if(ot in hr){var Ja=hr[ot];if(zr.elements=Ja,So(Ja)){var wo=zr.elements=zi.create(Ja,!0);Ja=zi.getElements(wo),Rr=!0}else Ja&&(Ja=zi.getElements(Ja),Rr=!0);var Ya=Us(function(Xo,Rs){if(Ja){var Qs=Xo.link(Ja);return Xo.ELEMENTS=Qs,Qs}return Xo.ELEMENTS=null,null});return Ya.value=Ja,Ya}else if(ot in qr){Rr=!0;var Ro=qr[ot];return rl(Ro,function(Xo,Rs){var Qs=Xo.shared,cc=Qs.isBufferArgs,ac=Qs.elements,yf=Xo.invoke(Rs,Ro),ff=Rs.def("null"),_f=Rs.def(cc,"(",yf,")"),bf=Xo.cond(_f).then(ff,"=",ac,".createStream(",yf,");").else(ff,"=",ac,".getElements(",yf,");");return Rs.entry(bf),Rs.exit(Xo.cond(_f).then(ac,".destroyStream(",ff,");")),Xo.ELEMENTS=ff,ff})}else if(Gr)return new os(Xr.thisDep,Xr.contextDep,Xr.propDep,function(Xo,Rs){return Rs.def(Xo.shared.vao+".currentVAO?"+Xo.shared.elements+".getElements("+Xo.shared.vao+".currentVAO.elements):null")});return null}var Br=jr();function Bn(){if(bt in hr){var Ja=hr[bt];return zr.primitive=Ja,Us(function(Ya,Ro){return vr[Ja]})}else if(bt in qr){var wo=qr[bt];return rl(wo,function(Ya,Ro){var Xo=Ya.constants.primTypes,Rs=Ya.invoke(Ro,wo);return Ro.def(Xo,"[",Rs,"]")})}else{if(Rr)return ul(Br)?Br.value?Us(function(Ya,Ro){return Ro.def(Ya.ELEMENTS,".primType")}):Us(function(){return $e}):new os(Br.thisDep,Br.contextDep,Br.propDep,function(Ya,Ro){var Xo=Ya.ELEMENTS;return Ro.def(Xo,"?",Xo,".primType:",$e)});if(Gr)return new os(Xr.thisDep,Xr.contextDep,Xr.propDep,function(Ya,Ro){return Ro.def(Ya.shared.vao+".currentVAO?"+Ya.shared.vao+".currentVAO.primitive:"+$e)})}return null}function ui(Ja,wo){if(Ja in hr){var Ya=hr[Ja]|0;return wo?zr.offset=Ya:zr.instances=Ya,Us(function(Xo,Rs){return wo&&(Xo.OFFSET=Ya),Ya})}else if(Ja in qr){var Ro=qr[Ja];return rl(Ro,function(Xo,Rs){var Qs=Xo.invoke(Rs,Ro);return wo&&(Xo.OFFSET=Qs),Qs})}else if(wo){if(Rr)return Us(function(Xo,Rs){return Xo.OFFSET=0,0});if(Gr)return new os(Xr.thisDep,Xr.contextDep,Xr.propDep,function(Xo,Rs){return Rs.def(Xo.shared.vao+".currentVAO?"+Xo.shared.vao+".currentVAO.offset:0")})}else if(Gr)return new os(Xr.thisDep,Xr.contextDep,Xr.propDep,function(Xo,Rs){return Rs.def(Xo.shared.vao+".currentVAO?"+Xo.shared.vao+".currentVAO.instances:-1")});return null}var Ii=ui(yr,!0);function Ga(){if(ar in hr){var Ja=hr[ar]|0;return zr.count=Ja,Us(function(){return Ja})}else if(ar in qr){var wo=qr[ar];return rl(wo,function(Rs,Qs){var cc=Rs.invoke(Qs,wo);return cc})}else if(Rr)if(ul(Br)){if(Br)return Ii?new os(Ii.thisDep,Ii.contextDep,Ii.propDep,function(Rs,Qs){var cc=Qs.def(Rs.ELEMENTS,".vertCount-",Rs.OFFSET);return cc}):Us(function(Rs,Qs){return Qs.def(Rs.ELEMENTS,".vertCount")});var Ya=Us(function(){return-1});return Ya}else{var Ro=new os(Br.thisDep||Ii.thisDep,Br.contextDep||Ii.contextDep,Br.propDep||Ii.propDep,function(Rs,Qs){var cc=Rs.ELEMENTS;return Rs.OFFSET?Qs.def(cc,"?",cc,".vertCount-",Rs.OFFSET,":-1"):Qs.def(cc,"?",cc,".vertCount:-1")});return Ro}else if(Gr){var Xo=new os(Xr.thisDep,Xr.contextDep,Xr.propDep,function(Rs,Qs){return Qs.def(Rs.shared.vao,".currentVAO?",Rs.shared.vao,".currentVAO.count:-1")});return Xo}return null}var ka=Bn(),wa=Ga(),$a=ui(Ur,!1);return{elements:Br,primitive:ka,count:wa,instances:$a,offset:Ii,vao:Xr,vaoActive:Gr,elementsActive:Rr,static:zr}}function Wc(Pt,jt){var hr=Pt.static,qr=Pt.dynamic,zr={};return Ha.forEach(function(Gr){var en=ua(Gr);function Xr(Rr,jr){if(Gr in hr){var Br=Rr(hr[Gr]);zr[en]=Us(function(){return Br})}else if(Gr in qr){var Bn=qr[Gr];zr[en]=rl(Bn,function(ui,Ii){return jr(ui,Ii,ui.invoke(Ii,Bn))})}}switch(Gr){case Wl:case Nc:case Vu:case $m:case ld:case Ym:case rv:case vv:case kg:case vh:return Xr(function(Rr){return Rr},function(Rr,jr,Br){return Br});case Jc:return Xr(function(Rr){return La[Rr]},function(Rr,jr,Br){var Bn=Rr.constants.compareFuncs;return jr.def(Bn,"[",Br,"]")});case wh:return Xr(function(Rr){return Rr},function(Rr,jr,Br){var Bn=jr.def("+",Br,"[0]"),ui=jr.def("+",Br,"[1]");return[Bn,ui]});case Cf:return Xr(function(Rr){var jr="srcRGB"in Rr?Rr.srcRGB:Rr.src,Br="srcAlpha"in Rr?Rr.srcAlpha:Rr.src,Bn="dstRGB"in Rr?Rr.dstRGB:Rr.dst,ui="dstAlpha"in Rr?Rr.dstAlpha:Rr.dst;return[ca[jr],ca[Bn],ca[Br],ca[ui]]},function(Rr,jr,Br){var Bn=Rr.constants.blendFuncs;function ui(wo,Ya){var Ro=jr.def('"',wo,Ya,'" in ',Br,"?",Br,".",wo,Ya,":",Br,".",wo);return Ro}var Ii=ui("src","RGB"),Ga=ui("dst","RGB"),ka=jr.def(Bn,"[",Ii,"]"),wa=jr.def(Bn,"[",ui("src","Alpha"),"]"),$a=jr.def(Bn,"[",Ga,"]"),Ja=jr.def(Bn,"[",ui("dst","Alpha"),"]");return[ka,$a,wa,Ja]});case sd:return Xr(function(Rr){if(typeof Rr=="string")return[Fa[Rr],Fa[Rr]];if(typeof Rr=="object")return[Fa[Rr.rgb],Fa[Rr.alpha]]},function(Rr,jr,Br){var Bn=Rr.constants.blendEquations,ui=jr.def(),Ii=jr.def(),Ga=Rr.cond("typeof ",Br,'==="string"');return Ga.then(ui,"=",Ii,"=",Bn,"[",Br,"];"),Ga.else(ui,"=",Bn,"[",Br,".rgb];",Ii,"=",Bn,"[",Br,".alpha];"),jr(Ga),[ui,Ii]});case Sf:return Xr(function(Rr){return T(4,function(jr){return+Rr[jr]})},function(Rr,jr,Br){return T(4,function(Bn){return jr.def("+",Br,"[",Bn,"]")})});case Sh:return Xr(function(Rr){return Rr|0},function(Rr,jr,Br){return jr.def(Br,"|0")});case Wm:return Xr(function(Rr){var jr=Rr.cmp||"keep",Br=Rr.ref||0,Bn="mask"in Rr?Rr.mask:-1;return[La[jr],Br,Bn]},function(Rr,jr,Br){var Bn=Rr.constants.compareFuncs,ui=jr.def('"cmp" in ',Br,"?",Bn,"[",Br,".cmp]",":",yn),Ii=jr.def(Br,".ref|0"),Ga=jr.def('"mask" in ',Br,"?",Br,".mask|0:-1");return[ui,Ii,Ga]});case Iu:case Gu:return Xr(function(Rr){var jr=Rr.fail||"keep",Br=Rr.zfail||"keep",Bn=Rr.zpass||"keep";return[Gr===Gu?Bt:vt,qa[jr],qa[Br],qa[Bn]]},function(Rr,jr,Br){var Bn=Rr.constants.stencilOps;function ui(Ii){return jr.def('"',Ii,'" in ',Br,"?",Bn,"[",Br,".",Ii,"]:",yn)}return[Gr===Gu?Bt:vt,ui("fail"),ui("zfail"),ui("zpass")]});case nv:return Xr(function(Rr){var jr=Rr.factor|0,Br=Rr.units|0;return[jr,Br]},function(Rr,jr,Br){var Bn=jr.def(Br,".factor|0"),ui=jr.def(Br,".units|0");return[Bn,ui]});case lc:return Xr(function(Rr){var jr=0;return Rr==="front"?jr=vt:Rr==="back"&&(jr=Bt),jr},function(Rr,jr,Br){return jr.def(Br,'==="front"?',vt,":",Bt)});case gf:return Xr(function(Rr){return Rr},function(Rr,jr,Br){return Br});case Bf:return Xr(function(Rr){return bo[Rr]},function(Rr,jr,Br){return jr.def(Br+'==="cw"?'+fr+":"+pr)});case rd:return Xr(function(Rr){return Rr.map(function(jr){return!!jr})},function(Rr,jr,Br){return T(4,function(Bn){return"!!"+Br+"["+Bn+"]"})});case iv:return Xr(function(Rr){var jr="value"in Rr?Rr.value:1,Br=!!Rr.invert;return[jr,Br]},function(Rr,jr,Br){var Bn=jr.def('"value" in ',Br,"?+",Br,".value:1"),ui=jr.def("!!",Br,".invert");return[Bn,ui]})}}),zr}function Zd(Pt,jt){var hr=Pt.static,qr=Pt.dynamic,zr={};return Object.keys(hr).forEach(function(Gr){var en=hr[Gr],Xr;if(typeof en=="number"||typeof en=="boolean")Xr=Us(function(){return en});else if(typeof en=="function"){var Rr=en._reglType;Rr==="texture2d"||Rr==="textureCube"?Xr=Us(function(jr){return jr.link(en)}):(Rr==="framebuffer"||Rr==="framebufferCube")&&(Xr=Us(function(jr){return jr.link(en.color[0])}))}else Ba(en)&&(Xr=Us(function(jr){var Br=jr.global.def("[",T(en.length,function(Bn){return en[Bn]}),"]");return Br}));Xr.value=en,zr[Gr]=Xr}),Object.keys(qr).forEach(function(Gr){var en=qr[Gr];zr[Gr]=rl(en,function(Xr,Rr){return Xr.invoke(Rr,en)})}),zr}function jh(Pt,jt){var hr=Pt.static,qr=Pt.dynamic,zr={};return Object.keys(hr).forEach(function(Gr){var en=hr[Gr],Xr=mn.id(Gr),Rr=new ga;if(So(en))Rr.state=Jo,Rr.buffer=Wa.getBuffer(Wa.create(en,Nr,!1,!0)),Rr.type=0;else{var jr=Wa.getBuffer(en);if(jr)Rr.state=Jo,Rr.buffer=jr,Rr.type=0;else if("constant"in en){var Br=en.constant;Rr.buffer="null",Rr.state=Io,typeof Br=="number"?Rr.x=Br:Bo.forEach(function($a,Ja){Ja<Br.length&&(Rr[$a]=Br[Ja])})}else{So(en.buffer)?jr=Wa.getBuffer(Wa.create(en.buffer,Nr,!1,!0)):jr=Wa.getBuffer(en.buffer);var Bn=en.offset|0,ui=en.stride|0,Ii=en.size|0,Ga=!!en.normalized,ka=0;"type"in en&&(ka=Wi[en.type]);var wa=en.divisor|0;Rr.buffer=jr,Rr.state=Jo,Rr.size=Ii,Rr.normalized=Ga,Rr.type=ka||jr.dtype,Rr.offset=Bn,Rr.stride=ui,Rr.divisor=wa}}zr[Gr]=Us(function($a,Ja){var wo=$a.attribCache;if(Xr in wo)return wo[Xr];var Ya={isStream:!1};return Object.keys(Rr).forEach(function(Ro){Ya[Ro]=Rr[Ro]}),Rr.buffer&&(Ya.buffer=$a.link(Rr.buffer),Ya.type=Ya.type||Ya.buffer+".dtype"),wo[Xr]=Ya,Ya})}),Object.keys(qr).forEach(function(Gr){var en=qr[Gr];function Xr(Rr,jr){var Br=Rr.invoke(jr,en),Bn=Rr.shared,ui=Rr.constants,Ii=Bn.isBufferArgs,Ga=Bn.buffer,ka={isStream:jr.def(!1)},wa=new ga;wa.state=Jo,Object.keys(wa).forEach(function(Ya){ka[Ya]=jr.def(""+wa[Ya])});var $a=ka.buffer,Ja=ka.type;jr("if(",Ii,"(",Br,")){",ka.isStream,"=true;",$a,"=",Ga,".createStream(",Nr,",",Br,");",Ja,"=",$a,".dtype;","}else{",$a,"=",Ga,".getBuffer(",Br,");","if(",$a,"){",Ja,"=",$a,".dtype;",'}else if("constant" in ',Br,"){",ka.state,"=",Io,";","if(typeof "+Br+'.constant === "number"){',ka[Bo[0]],"=",Br,".constant;",Bo.slice(1).map(function(Ya){return ka[Ya]}).join("="),"=0;","}else{",Bo.map(function(Ya,Ro){return ka[Ya]+"="+Br+".constant.length>"+Ro+"?"+Br+".constant["+Ro+"]:0;"}).join(""),"}}else{","if(",Ii,"(",Br,".buffer)){",$a,"=",Ga,".createStream(",Nr,",",Br,".buffer);","}else{",$a,"=",Ga,".getBuffer(",Br,".buffer);","}",Ja,'="type" in ',Br,"?",ui.glTypes,"[",Br,".type]:",$a,".dtype;",ka.normalized,"=!!",Br,".normalized;");function wo(Ya){jr(ka[Ya],"=",Br,".",Ya,"|0;")}return wo("size"),wo("offset"),wo("stride"),wo("divisor"),jr("}}"),jr.exit("if(",ka.isStream,"){",Ga,".destroyStream(",$a,");","}"),ka}zr[Gr]=rl(en,Xr)}),zr}function fp(Pt){var jt=Pt.static,hr=Pt.dynamic,qr={};return Object.keys(jt).forEach(function(zr){var Gr=jt[zr];qr[zr]=Us(function(en,Xr){return typeof Gr=="number"||typeof Gr=="boolean"?""+Gr:en.link(Gr)})}),Object.keys(hr).forEach(function(zr){var Gr=hr[zr];qr[zr]=rl(Gr,function(en,Xr){return en.invoke(Xr,Gr)})}),qr}function Am(Pt,jt,hr,qr,zr){Pt.static,Pt.dynamic;var Gr=cf(Pt,jt),en=Mu(Pt),Xr=Fu(Pt,en),Rr=mh(Pt),jr=Wc(Pt),Br=zu(Pt,zr,Gr);function Bn($a){var Ja=Xr[$a];Ja&&(jr[$a]=Ja)}Bn(kv),Bn(ua(Vv));var ui=Object.keys(jr).length>0,Ii={framebuffer:en,draw:Rr,shader:Br,state:jr,dirty:ui,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Ii.profile=Jl(Pt),Ii.uniforms=Zd(hr),Ii.drawVAO=Ii.scopeVAO=Rr.vao,!Ii.drawVAO&&Br.program&&!Gr&&En.angle_instanced_arrays&&Rr.static.elements){var Ga=!0,ka=Br.program.attributes.map(function($a){var Ja=jt.static[$a];return Ga=Ga&&!!Ja,Ja});if(Ga&&ka.length>0){var wa=Eo.getVAO(Eo.createVAO({attributes:ka,elements:Rr.static.elements}));Ii.drawVAO=new os(null,null,null,function($a,Ja){return $a.link(wa)}),Ii.useVAO=!0}}return Gr?Ii.useVAO=!0:Ii.attributes=jh(jt),Ii.context=fp(qr),Ii}function _d(Pt,jt,hr){var qr=Pt.shared,zr=qr.context,Gr=Pt.scope();Object.keys(hr).forEach(function(en){jt.save(zr,"."+en);var Xr=hr[en],Rr=Xr.append(Pt,jt);Array.isArray(Rr)?Gr(zr,".",en,"=[",Rr.join(),"];"):Gr(zr,".",en,"=",Rr,";")}),jt(Gr)}function Hd(Pt,jt,hr,qr){var zr=Pt.shared,Gr=zr.gl,en=zr.framebuffer,Xr;Ua&&(Xr=jt.def(zr.extensions,".webgl_draw_buffers"));var Rr=Pt.constants,jr=Rr.drawBuffer,Br=Rr.backBuffer,Bn;hr?Bn=hr.append(Pt,jt):Bn=jt.def(en,".next"),qr||jt("if(",Bn,"!==",en,".cur){"),jt("if(",Bn,"){",Gr,".bindFramebuffer(",na,",",Bn,".framebuffer);"),Ua&&jt(Xr,".drawBuffersWEBGL(",jr,"[",Bn,".colorAttachments.length]);"),jt("}else{",Gr,".bindFramebuffer(",na,",null);"),Ua&&jt(Xr,".drawBuffersWEBGL(",Br,");"),jt("}",en,".cur=",Bn,";"),qr||jt("}")}function Ol(Pt,jt,hr){var qr=Pt.shared,zr=qr.gl,Gr=Pt.current,en=Pt.next,Xr=qr.current,Rr=qr.next,jr=Pt.cond(Xr,".dirty");Ha.forEach(function(Br){var Bn=ua(Br);if(!(Bn in hr.state)){var ui,Ii;if(Bn in en){ui=en[Bn],Ii=Gr[Bn];var Ga=T(Po[Bn].length,function(wa){return jr.def(ui,"[",wa,"]")});jr(Pt.cond(Ga.map(function(wa,$a){return wa+"!=="+Ii+"["+$a+"]"}).join("||")).then(zr,".",ls[Bn],"(",Ga,");",Ga.map(function(wa,$a){return Ii+"["+$a+"]="+wa}).join(";"),";"))}else{ui=jr.def(Rr,".",Bn);var ka=Pt.cond(ui,"!==",Xr,".",Bn);jr(ka),Bn in Ra?ka(Pt.cond(ui).then(zr,".enable(",Ra[Bn],");").else(zr,".disable(",Ra[Bn],");"),Xr,".",Bn,"=",ui,";"):ka(zr,".",ls[Bn],"(",ui,");",Xr,".",Bn,"=",ui,";")}}}),Object.keys(hr.state).length===0&&jr(Xr,".dirty=false;"),jt(jr)}function dp(Pt,jt,hr,qr){var zr=Pt.shared,Gr=Pt.current,en=zr.current,Xr=zr.gl,Rr;Va(Object.keys(hr)).forEach(function(jr){var Br=hr[jr];if(!(qr&&!qr(Br))){var Bn=Br.append(Pt,jt);if(Ra[jr]){var ui=Ra[jr];ul(Br)?(Rr=Pt.link(Bn,{stable:!0}),jt(Pt.cond(Rr).then(Xr,".enable(",ui,");").else(Xr,".disable(",ui,");")),jt(en,".",jr,"=",Rr,";")):(jt(Pt.cond(Bn).then(Xr,".enable(",ui,");").else(Xr,".disable(",ui,");")),jt(en,".",jr,"=",Bn,";"))}else if(Ba(Bn)){var Ii=Gr[jr];jt(Xr,".",ls[jr],"(",Bn,");",Bn.map(function(Ga,ka){return Ii+"["+ka+"]="+Ga}).join(";"),";")}else ul(Br)?(Rr=Pt.link(Bn,{stable:!0}),jt(Xr,".",ls[jr],"(",Rr,");",en,".",jr,"=",Rr,";")):jt(Xr,".",ls[jr],"(",Bn,");",en,".",jr,"=",Bn,";")}})}function Fc(Pt,jt){so&&(Pt.instancing=jt.def(Pt.shared.extensions,".angle_instanced_arrays"))}function Hf(Pt,jt,hr,qr,zr){var Gr=Pt.shared,en=Pt.stats,Xr=Gr.current,Rr=Gr.timer,jr=hr.profile;function Br(){return typeof performance>"u"?"Date.now()":"performance.now()"}var Bn,ui;function Ii(wo){Bn=jt.def(),wo(Bn,"=",Br(),";"),typeof zr=="string"?wo(en,".count+=",zr,";"):wo(en,".count++;"),Uo&&(qr?(ui=jt.def(),wo(ui,"=",Rr,".getNumPendingQueries();")):wo(Rr,".beginQuery(",en,");"))}function Ga(wo){wo(en,".cpuTime+=",Br(),"-",Bn,";"),Uo&&(qr?wo(Rr,".pushScopeStats(",ui,",",Rr,".getNumPendingQueries(),",en,");"):wo(Rr,".endQuery();"))}function ka(wo){var Ya=jt.def(Xr,".profile");jt(Xr,".profile=",wo,";"),jt.exit(Xr,".profile=",Ya,";")}var wa;if(jr){if(ul(jr)){jr.enable?(Ii(jt),Ga(jt.exit),ka("true")):ka("false");return}wa=jr.append(Pt,jt),ka(wa)}else wa=jt.def(Xr,".profile");var $a=Pt.block();Ii($a),jt("if(",wa,"){",$a,"}");var Ja=Pt.block();Ga(Ja),jt.exit("if(",wa,"){",Ja,"}")}function Fp(Pt,jt,hr,qr,zr){var Gr=Pt.shared;function en(Rr){switch(Rr){case as:case Du:case ef:return 2;case fl:case qc:case Xd:return 3;case Zl:case Gc:case kd:return 4;default:return 1}}function Xr(Rr,jr,Br){var Bn=Gr.gl,ui=jt.def(Rr,".location"),Ii=jt.def(Gr.attributes,"[",ui,"]"),Ga=Br.state,ka=Br.buffer,wa=[Br.x,Br.y,Br.z,Br.w],$a=["buffer","normalized","offset","stride"];function Ja(){jt("if(!",Ii,".buffer){",Bn,".enableVertexAttribArray(",ui,");}");var Ya=Br.type,Ro;if(Br.size?Ro=jt.def(Br.size,"||",jr):Ro=jr,jt("if(",Ii,".type!==",Ya,"||",Ii,".size!==",Ro,"||",$a.map(function(Rs){return Ii+"."+Rs+"!=="+Br[Rs]}).join("||"),"){",Bn,".bindBuffer(",Nr,",",ka,".buffer);",Bn,".vertexAttribPointer(",[ui,Ro,Ya,Br.normalized,Br.stride,Br.offset],");",Ii,".type=",Ya,";",Ii,".size=",Ro,";",$a.map(function(Rs){return Ii+"."+Rs+"="+Br[Rs]+";"}).join(""),"}"),so){var Xo=Br.divisor;jt("if(",Ii,".divisor!==",Xo,"){",Pt.instancing,".vertexAttribDivisorANGLE(",[ui,Xo],");",Ii,".divisor=",Xo,";}")}}function wo(){jt("if(",Ii,".buffer){",Bn,".disableVertexAttribArray(",ui,");",Ii,".buffer=null;","}if(",Bo.map(function(Ya,Ro){return Ii+"."+Ya+"!=="+wa[Ro]}).join("||"),"){",Bn,".vertexAttrib4f(",ui,",",wa,");",Bo.map(function(Ya,Ro){return Ii+"."+Ya+"="+wa[Ro]+";"}).join(""),"}")}Ga===Jo?Ja():Ga===Io?wo():(jt("if(",Ga,"===",Jo,"){"),Ja(),jt("}else{"),wo(),jt("}"))}qr.forEach(function(Rr){var jr=Rr.name,Br=hr.attributes[jr],Bn;if(Br){if(!zr(Br))return;Bn=Br.append(Pt,jt)}else{if(!zr(Yl))return;var ui=Pt.scopeAttrib(jr);Bn={},Object.keys(new ga).forEach(function(Ii){Bn[Ii]=jt.def(ui,".",Ii)})}Xr(Pt.link(Rr),en(Rr.info.type),Bn)})}function zp(Pt,jt,hr,qr,zr,Gr){for(var en=Pt.shared,Xr=en.gl,Rr,jr=0;jr<qr.length;++jr){var Br=qr[jr],Bn=Br.name,ui=Br.info.type,Ii=hr.uniforms[Bn],Ga=Pt.link(Br),ka=Ga+".location",wa;if(Ii){if(!zr(Ii))continue;if(ul(Ii)){var $a=Ii.value;if(ui===Ep||ui===Iv){var Ja=Pt.link($a._texture||$a.color[0]._texture);jt(Xr,".uniform1i(",ka,",",Ja+".bind());"),jt.exit(Ja,".unbind();")}else if(ui===Ec||ui===Ac||ui===Ih){var wo=Pt.global.def("new Float32Array(["+Array.prototype.slice.call($a)+"])"),Ya=2;ui===Ac?Ya=3:ui===Ih&&(Ya=4),jt(Xr,".uniformMatrix",Ya,"fv(",ka,",false,",wo,");")}else{switch(ui){case $o:Rr="1f";break;case as:Rr="2f";break;case fl:Rr="3f";break;case Zl:Rr="4f";break;case _c:Rr="1i";break;case Fl:Rr="1i";break;case ef:Rr="2i";break;case Du:Rr="2i";break;case Xd:Rr="3i";break;case qc:Rr="3i";break;case kd:Rr="4i";break;case Gc:Rr="4i";break}jt(Xr,".uniform",Rr,"(",ka,",",Ba($a)?Array.prototype.slice.call($a):$a,");")}continue}else wa=Ii.append(Pt,jt)}else{if(!zr(Yl))continue;wa=jt.def(en.uniforms,"[",mn.id(Bn),"]")}ui===Ep?jt("if(",wa,"&&",wa,'._reglType==="framebuffer"){',wa,"=",wa,".color[0];","}"):ui===Iv&&jt("if(",wa,"&&",wa,'._reglType==="framebufferCube"){',wa,"=",wa,".color[0];","}");var Ro=1;switch(ui){case Ep:case Iv:var Xo=jt.def(wa,"._texture");jt(Xr,".uniform1i(",ka,",",Xo,".bind());"),jt.exit(Xo,".unbind();");continue;case Fl:case _c:Rr="1i";break;case Du:case ef:Rr="2i",Ro=2;break;case qc:case Xd:Rr="3i",Ro=3;break;case Gc:case kd:Rr="4i",Ro=4;break;case $o:Rr="1f";break;case as:Rr="2f",Ro=2;break;case fl:Rr="3f",Ro=3;break;case Zl:Rr="4f",Ro=4;break;case Ec:Rr="Matrix2fv";break;case Ac:Rr="Matrix3fv";break;case Ih:Rr="Matrix4fv";break}if(Rr.charAt(0)==="M"){jt(Xr,".uniform",Rr,"(",ka,",");var Rs=Math.pow(ui-Ec+2,2),Qs=Pt.global.def("new Float32Array(",Rs,")");Array.isArray(wa)?jt("false,(",T(Rs,function(_f){return Qs+"["+_f+"]="+wa[_f]}),",",Qs,")"):jt("false,(Array.isArray(",wa,")||",wa," instanceof Float32Array)?",wa,":(",T(Rs,function(_f){return Qs+"["+_f+"]="+wa+"["+_f+"]"}),",",Qs,")"),jt(");")}else if(Ro>1){for(var cc=[],ac=[],yf=0;yf<Ro;++yf)Array.isArray(wa)?ac.push(wa[yf]):ac.push(jt.def(wa+"["+yf+"]")),Gr&&cc.push(jt.def());Gr&&jt("if(!",Pt.batchId,"||",cc.map(function(_f,bf){return _f+"!=="+ac[bf]}).join("||"),"){",cc.map(function(_f,bf){return _f+"="+ac[bf]+";"}).join("")),jt(Xr,".uniform",Rr,"(",ka,",",ac.join(","),");"),Gr&&jt("}")}else{if(Gr){var ff=jt.def();jt("if(!",Pt.batchId,"||",ff,"!==",wa,"){",ff,"=",wa,";")}jt(Xr,".uniform",Rr,"(",ka,",",wa,");"),Gr&&jt("}")}}}function tu(Pt,jt,hr,qr){var zr=Pt.shared,Gr=zr.gl,en=zr.draw,Xr=qr.draw;function Rr(){var Ro=Xr.elements,Xo,Rs=jt;return Ro?((Ro.contextDep&&qr.contextDynamic||Ro.propDep)&&(Rs=hr),Xo=Ro.append(Pt,Rs),Xr.elementsActive&&Rs("if("+Xo+")"+Gr+".bindBuffer("+vn+","+Xo+".buffer.buffer);")):(Xo=Rs.def(),Rs(Xo,"=",en,".",ot,";","if(",Xo,"){",Gr,".bindBuffer(",vn,",",Xo,".buffer.buffer);}","else if(",zr.vao,".currentVAO){",Xo,"=",Pt.shared.elements+".getElements("+zr.vao,".currentVAO.elements);",vs?"":"if("+Xo+")"+Gr+".bindBuffer("+vn+","+Xo+".buffer.buffer);","}")),Xo}function jr(){var Ro=Xr.count,Xo,Rs=jt;return Ro?((Ro.contextDep&&qr.contextDynamic||Ro.propDep)&&(Rs=hr),Xo=Ro.append(Pt,Rs)):Xo=Rs.def(en,".",ar),Xo}var Br=Rr();function Bn(Ro){var Xo=Xr[Ro];return Xo?Xo.contextDep&&qr.contextDynamic||Xo.propDep?Xo.append(Pt,hr):Xo.append(Pt,jt):jt.def(en,".",Ro)}var ui=Bn(bt),Ii=Bn(yr),Ga=jr();if(typeof Ga=="number"){if(Ga===0)return}else hr("if(",Ga,"){"),hr.exit("}");var ka,wa;so&&(ka=Bn(Ur),wa=Pt.instancing);var $a=Br+".type",Ja=Xr.elements&&ul(Xr.elements)&&!Xr.vaoActive;function wo(){function Ro(){hr(wa,".drawElementsInstancedANGLE(",[ui,Ga,$a,Ii+"<<(("+$a+"-"+As+")>>1)",ka],");")}function Xo(){hr(wa,".drawArraysInstancedANGLE(",[ui,Ii,Ga,ka],");")}Br&&Br!=="null"?Ja?Ro():(hr("if(",Br,"){"),Ro(),hr("}else{"),Xo(),hr("}")):Xo()}function Ya(){function Ro(){hr(Gr+".drawElements("+[ui,Ga,$a,Ii+"<<(("+$a+"-"+As+")>>1)"]+");")}function Xo(){hr(Gr+".drawArrays("+[ui,Ii,Ga]+");")}Br&&Br!=="null"?Ja?Ro():(hr("if(",Br,"){"),Ro(),hr("}else{"),Xo(),hr("}")):Xo()}so&&(typeof ka!="number"||ka>=0)?typeof ka=="string"?(hr("if(",ka,">0){"),wo(),hr("}else if(",ka,"<0){"),Ya(),hr("}")):wo():Ya()}function tc(Pt,jt,hr,qr,zr){var Gr=jo(),en=Gr.proc("body",zr);return so&&(Gr.instancing=en.def(Gr.shared.extensions,".angle_instanced_arrays")),Pt(Gr,en,hr,qr),Gr.compile().body}function uc(Pt,jt,hr,qr){Fc(Pt,jt),hr.useVAO?hr.drawVAO?jt(Pt.shared.vao,".setVAO(",hr.drawVAO.append(Pt,jt),");"):jt(Pt.shared.vao,".setVAO(",Pt.shared.vao,".targetVAO);"):(jt(Pt.shared.vao,".setVAO(null);"),Fp(Pt,jt,hr,qr.attributes,function(){return!0})),zp(Pt,jt,hr,qr.uniforms,function(){return!0},!1),tu(Pt,jt,jt,hr)}function Xe(Pt,jt){var hr=Pt.proc("draw",1);Fc(Pt,hr),_d(Pt,hr,jt.context),Hd(Pt,hr,jt.framebuffer),Ol(Pt,hr,jt),dp(Pt,hr,jt.state),Hf(Pt,hr,jt,!1,!0);var qr=jt.shader.progVar.append(Pt,hr);if(hr(Pt.shared.gl,".useProgram(",qr,".program);"),jt.shader.program)uc(Pt,hr,jt,jt.shader.program);else{hr(Pt.shared.vao,".setVAO(null);");var zr=Pt.global.def("{}"),Gr=hr.def(qr,".id"),en=hr.def(zr,"[",Gr,"]");hr(Pt.cond(en).then(en,".call(this,a0);").else(en,"=",zr,"[",Gr,"]=",Pt.link(function(Xr){return tc(uc,Pt,jt,Xr,1)}),"(",qr,");",en,".call(this,a0);"))}Object.keys(jt.state).length>0&&hr(Pt.shared.current,".dirty=true;"),Pt.shared.vao&&hr(Pt.shared.vao,".setVAO(null);")}function ne(Pt,jt,hr,qr){Pt.batchId="a1",Fc(Pt,jt);function zr(){return!0}Fp(Pt,jt,hr,qr.attributes,zr),zp(Pt,jt,hr,qr.uniforms,zr,!1),tu(Pt,jt,jt,hr)}function Fe(Pt,jt,hr,qr){Fc(Pt,jt);var zr=hr.contextDep,Gr=jt.def(),en="a0",Xr="a1",Rr=jt.def();Pt.shared.props=Rr,Pt.batchId=Gr;var jr=Pt.scope(),Br=Pt.scope();jt(jr.entry,"for(",Gr,"=0;",Gr,"<",Xr,";++",Gr,"){",Rr,"=",en,"[",Gr,"];",Br,"}",jr.exit);function Bn($a){return $a.contextDep&&zr||$a.propDep}function ui($a){return!Bn($a)}if(hr.needsContext&&_d(Pt,Br,hr.context),hr.needsFramebuffer&&Hd(Pt,Br,hr.framebuffer),dp(Pt,Br,hr.state,Bn),hr.profile&&Bn(hr.profile)&&Hf(Pt,Br,hr,!1,!0),qr)hr.useVAO?hr.drawVAO?Bn(hr.drawVAO)?Br(Pt.shared.vao,".setVAO(",hr.drawVAO.append(Pt,Br),");"):jr(Pt.shared.vao,".setVAO(",hr.drawVAO.append(Pt,jr),");"):jr(Pt.shared.vao,".setVAO(",Pt.shared.vao,".targetVAO);"):(jr(Pt.shared.vao,".setVAO(null);"),Fp(Pt,jr,hr,qr.attributes,ui),Fp(Pt,Br,hr,qr.attributes,Bn)),zp(Pt,jr,hr,qr.uniforms,ui,!1),zp(Pt,Br,hr,qr.uniforms,Bn,!0),tu(Pt,jr,Br,hr);else{var Ii=Pt.global.def("{}"),Ga=hr.shader.progVar.append(Pt,Br),ka=Br.def(Ga,".id"),wa=Br.def(Ii,"[",ka,"]");Br(Pt.shared.gl,".useProgram(",Ga,".program);","if(!",wa,"){",wa,"=",Ii,"[",ka,"]=",Pt.link(function($a){return tc(ne,Pt,hr,$a,2)}),"(",Ga,");}",wa,".call(this,a0[",Gr,"],",Gr,");")}}function me(Pt,jt){var hr=Pt.proc("batch",2);Pt.batchId="0",Fc(Pt,hr);var qr=!1,zr=!0;Object.keys(jt.context).forEach(function(Ii){qr=qr||jt.context[Ii].propDep}),qr||(_d(Pt,hr,jt.context),zr=!1);var Gr=jt.framebuffer,en=!1;Gr?(Gr.propDep?qr=en=!0:Gr.contextDep&&qr&&(en=!0),en||Hd(Pt,hr,Gr)):Hd(Pt,hr,null),jt.state.viewport&&jt.state.viewport.propDep&&(qr=!0);function Xr(Ii){return Ii.contextDep&&qr||Ii.propDep}Ol(Pt,hr,jt),dp(Pt,hr,jt.state,function(Ii){return!Xr(Ii)}),(!jt.profile||!Xr(jt.profile))&&Hf(Pt,hr,jt,!1,"a1"),jt.contextDep=qr,jt.needsContext=zr,jt.needsFramebuffer=en;var Rr=jt.shader.progVar;if(Rr.contextDep&&qr||Rr.propDep)Fe(Pt,hr,jt,null);else{var jr=Rr.append(Pt,hr);if(hr(Pt.shared.gl,".useProgram(",jr,".program);"),jt.shader.program)Fe(Pt,hr,jt,jt.shader.program);else{hr(Pt.shared.vao,".setVAO(null);");var Br=Pt.global.def("{}"),Bn=hr.def(jr,".id"),ui=hr.def(Br,"[",Bn,"]");hr(Pt.cond(ui).then(ui,".call(this,a0,a1);").else(ui,"=",Br,"[",Bn,"]=",Pt.link(function(Ii){return tc(Fe,Pt,jt,Ii,2)}),"(",jr,");",ui,".call(this,a0,a1);"))}}Object.keys(jt.state).length>0&&hr(Pt.shared.current,".dirty=true;"),Pt.shared.vao&&hr(Pt.shared.vao,".setVAO(null);")}function We(Pt,jt){var hr=Pt.proc("scope",3);Pt.batchId="a2";var qr=Pt.shared,zr=qr.current;if(_d(Pt,hr,jt.context),jt.framebuffer&&jt.framebuffer.append(Pt,hr),Va(Object.keys(jt.state)).forEach(function(Xr){var Rr=jt.state[Xr],jr=Rr.append(Pt,hr);Ba(jr)?jr.forEach(function(Br,Bn){Hs(Br)?hr.set(Pt.next[Xr],"["+Bn+"]",Br):hr.set(Pt.next[Xr],"["+Bn+"]",Pt.link(Br,{stable:!0}))}):ul(Rr)?hr.set(qr.next,"."+Xr,Pt.link(jr,{stable:!0})):hr.set(qr.next,"."+Xr,jr)}),Hf(Pt,hr,jt,!0,!0),[ot,yr,ar,Ur,bt].forEach(function(Xr){var Rr=jt.draw[Xr];if(Rr){var jr=Rr.append(Pt,hr);Hs(jr)?hr.set(qr.draw,"."+Xr,jr):hr.set(qr.draw,"."+Xr,Pt.link(jr),{stable:!0})}}),Object.keys(jt.uniforms).forEach(function(Xr){var Rr=jt.uniforms[Xr].append(Pt,hr);Array.isArray(Rr)&&(Rr="["+Rr.map(function(jr){return Hs(jr)?jr:Pt.link(jr,{stable:!0})})+"]"),hr.set(qr.uniforms,"["+Pt.link(mn.id(Xr),{stable:!0})+"]",Rr)}),Object.keys(jt.attributes).forEach(function(Xr){var Rr=jt.attributes[Xr].append(Pt,hr),jr=Pt.scopeAttrib(Xr);Object.keys(new ga).forEach(function(Br){hr.set(jr,"."+Br,Rr[Br])})}),jt.scopeVAO){var Gr=jt.scopeVAO.append(Pt,hr);Hs(Gr)?hr.set(qr.vao,".targetVAO",Gr):hr.set(qr.vao,".targetVAO",Pt.link(Gr,{stable:!0}))}function en(Xr){var Rr=jt.shader[Xr];if(Rr){var jr=Rr.append(Pt,hr);Hs(jr)?hr.set(qr.shader,"."+Xr,jr):hr.set(qr.shader,"."+Xr,Pt.link(jr,{stable:!0}))}}en(Ae),en(it),Object.keys(jt.state).length>0&&(hr(zr,".dirty=true;"),hr.exit(zr,".dirty=true;")),hr("a1(",Pt.shared.context,",a0,",Pt.batchId,");")}function At(Pt){if(!(typeof Pt!="object"||Ba(Pt))){for(var jt=Object.keys(Pt),hr=0;hr<jt.length;++hr)if(_.isDynamic(Pt[jt[hr]]))return!0;return!1}}function Yt(Pt,jt,hr){var qr=jt.static[hr];if(!qr||!At(qr))return;var zr=Pt.global,Gr=Object.keys(qr),en=!1,Xr=!1,Rr=!1,jr=Pt.global.def("{}");Gr.forEach(function(Bn){var ui=qr[Bn];if(_.isDynamic(ui)){typeof ui=="function"&&(ui=qr[Bn]=_.unbox(ui));var Ii=rl(ui,null);en=en||Ii.thisDep,Rr=Rr||Ii.propDep,Xr=Xr||Ii.contextDep}else{switch(zr(jr,".",Bn,"="),typeof ui){case"number":zr(ui);break;case"string":zr('"',ui,'"');break;case"object":Array.isArray(ui)&&zr("[",ui.join(),"]");break;default:zr(Pt.link(ui));break}zr(";")}});function Br(Bn,ui){Gr.forEach(function(Ii){var Ga=qr[Ii];if(_.isDynamic(Ga)){var ka=Bn.invoke(ui,Ga);ui(jr,".",Ii,"=",ka,";")}})}jt.dynamic[hr]=new _.DynamicVariable(Au,{thisDep:en,contextDep:Xr,propDep:Rr,ref:jr,append:Br}),delete jt.static[hr]}function tr(Pt,jt,hr,qr,zr){var Gr=jo();Gr.stats=Gr.link(zr),Object.keys(jt.static).forEach(function(Xr){Yt(Gr,jt,Xr)}),gr.forEach(function(Xr){Yt(Gr,Pt,Xr)});var en=Am(Pt,jt,hr,qr,Gr);return en.shader.program&&(en.shader.program.attributes.sort(function(Xr,Rr){return Xr.name<Rr.name?-1:1}),en.shader.program.uniforms.sort(function(Xr,Rr){return Xr.name<Rr.name?-1:1})),Xe(Gr,en),We(Gr,en),me(Gr,en),w(Gr.compile(),{destroy:function(){en.shader.program.destroy()}})}return{next:zs,current:Po,procs:(function(){var Pt=jo(),jt=Pt.proc("poll"),hr=Pt.proc("refresh"),qr=Pt.block();jt(qr),hr(qr);var zr=Pt.shared,Gr=zr.gl,en=zr.next,Xr=zr.current;qr(Xr,".dirty=false;"),Hd(Pt,jt),Hd(Pt,hr,null,!0);var Rr;so&&(Rr=Pt.link(so)),En.oes_vertex_array_object&&hr(Pt.link(En.oes_vertex_array_object),".bindVertexArrayOES(null);");var jr=hr.def(zr.attributes),Br=hr.def(0),Bn=Pt.cond(Br,".buffer");Bn.then(Gr,".enableVertexAttribArray(i);",Gr,".bindBuffer(",Nr,",",Br,".buffer.buffer);",Gr,".vertexAttribPointer(i,",Br,".size,",Br,".type,",Br,".normalized,",Br,".stride,",Br,".offset);").else(Gr,".disableVertexAttribArray(i);",Gr,".vertexAttrib4f(i,",Br,".x,",Br,".y,",Br,".z,",Br,".w);",Br,".buffer=null;");var ui=Pt.link(ia.maxAttributes,{stable:!0});return hr("for(var i=0;i<",ui,";++i){",Br,"=",jr,"[i];",Bn,"}"),so&&hr("for(var i=0;i<",ui,";++i){",Rr,".vertexAttribDivisorANGLE(i,",jr,"[i].divisor);","}"),hr(Pt.shared.vao,".currentVAO=null;",Pt.shared.vao,".setVAO(",Pt.shared.vao,".targetVAO);"),Object.keys(Ra).forEach(function(Ii){var Ga=Ra[Ii],ka=qr.def(en,".",Ii),wa=Pt.block();wa("if(",ka,"){",Gr,".enable(",Ga,")}else{",Gr,".disable(",Ga,")}",Xr,".",Ii,"=",ka,";"),hr(wa),jt("if(",ka,"!==",Xr,".",Ii,"){",wa,"}")}),Object.keys(ls).forEach(function(Ii){var Ga=ls[Ii],ka=Po[Ii],wa,$a,Ja=Pt.block();if(Ja(Gr,".",Ga,"("),Ba(ka)){var wo=ka.length;wa=Pt.global.def(en,".",Ii),$a=Pt.global.def(Xr,".",Ii),Ja(T(wo,function(Ya){return wa+"["+Ya+"]"}),");",T(wo,function(Ya){return $a+"["+Ya+"]="+wa+"["+Ya+"];"}).join("")),jt("if(",T(wo,function(Ya){return wa+"["+Ya+"]!=="+$a+"["+Ya+"]"}).join("||"),"){",Ja,"}")}else wa=qr.def(en,".",Ii),$a=qr.def(Xr,".",Ii),Ja(wa,");",Xr,".",Ii,"=",wa,";"),jt("if(",wa,"!==",$a,"){",Ja,"}");hr(Ja)}),Pt.compile()})(),compile:tr}}function Vc(){return{vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0}}var ou=34918,Zu=34919,Qc=35007,Ph=function(rr,mn){if(!mn.ext_disjoint_timer_query)return null;var En=[];function ia(){return En.pop()||mn.ext_disjoint_timer_query.createQueryEXT()}function Wa(Fa){En.push(Fa)}var zi=[];function Fi(Fa){var so=ia();mn.ext_disjoint_timer_query.beginQueryEXT(Qc,so),zi.push(so),Uo(zi.length-1,zi.length,Fa)}function Ao(){mn.ext_disjoint_timer_query.endQueryEXT(Qc)}function To(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}var Eo=[];function qo(){return Eo.pop()||new To}function qs(Fa){Eo.push(Fa)}var xs=[];function Uo(Fa,so,Ua){var vs=qo();vs.startQueryIndex=Fa,vs.endQueryIndex=so,vs.sum=0,vs.stats=Ua,xs.push(vs)}var io=[],xi=[];function ga(){var Fa,so,Ua=zi.length;if(Ua!==0){xi.length=Math.max(xi.length,Ua+1),io.length=Math.max(io.length,Ua+1),io[0]=0,xi[0]=0;var vs=0;for(Fa=0,so=0;so<zi.length;++so){var Po=zi[so];mn.ext_disjoint_timer_query.getQueryObjectEXT(Po,Zu)?(vs+=mn.ext_disjoint_timer_query.getQueryObjectEXT(Po,ou),Wa(Po)):zi[Fa++]=Po,io[so+1]=vs,xi[so+1]=Fa}for(zi.length=Fa,Fa=0,so=0;so<xs.length;++so){var zs=xs[so],Ha=zs.startQueryIndex,Ra=zs.endQueryIndex;zs.sum+=io[Ra]-io[Ha];var ls=xi[Ha],ua=xi[Ra];ua===ls?(zs.stats.gpuTime+=zs.sum/1e6,qs(zs)):(zs.startQueryIndex=ls,zs.endQueryIndex=ua,xs[Fa++]=zs)}xs.length=Fa}}return{beginQuery:Fi,endQuery:Ao,pushScopeStats:Uo,update:ga,getNumPendingQueries:function(){return zi.length},clear:function(){En.push.apply(En,zi);for(var Fa=0;Fa<En.length;Fa++)mn.ext_disjoint_timer_query.deleteQueryEXT(En[Fa]);zi.length=0,En.length=0},restore:function(){zi.length=0,En.length=0}}},xd=16384,Rl=256,Cc=1024,$c=34962,ud="webglcontextlost",Uf="webglcontextrestored",mv=1,Mf=2,cd=3;function qv(rr,mn){for(var En=0;En<rr.length;++En)if(rr[En]===mn)return En;return-1}function Th(rr){var mn=k(rr);if(!mn)return null;var En=mn.gl,ia=En.getContextAttributes();En.isContextLost();var Wa=P(En,mn);if(!Wa)return null;var zi=E(),Fi=Vc(),Ao=mn.cachedCode||{},To=Wa.extensions,Eo=Ph(En,To),qo=A(),qs=En.drawingBufferWidth,xs=En.drawingBufferHeight,Uo={tick:0,time:0,viewportWidth:qs,viewportHeight:xs,framebufferWidth:qs,framebufferHeight:xs,drawingBufferWidth:qs,drawingBufferHeight:xs,pixelRatio:mn.pixelRatio},io={},xi={elements:null,primitive:4,count:-1,offset:0,instances:-1},ga=ci(En,To),Fa=aa(En,Fi,mn,vs),so=gn(En,To,Fa,Fi),Ua=cm(En,To,ga,Fi,Fa,so,xi);function vs(tu){return Ua.destroyBuffer(tu)}var Po=Hv(En,zi,Fi,mn),zs=_m(En,To,ga,function(){ls.procs.poll()},Uo,Fi,mn),Ha=ug(En,To,ga,Fi,mn),Ra=Zg(En,To,ga,zs,Ha,Fi),ls=eu(En,zi,To,ga,Fa,so,zs,Ra,io,Ua,Po,xi,Uo,Eo,Ao,mn),ua=Np(En,Ra,ls.procs.poll,Uo),Wo=ls.next,Mo=En.canvas,Hs=[],au=[],ws=[],Xs=[mn.onDestroy],jo=null;function Jl(){if(Hs.length===0){Eo&&Eo.update(),jo=null;return}jo=x.next(Jl),Hd();for(var tu=Hs.length-1;tu>=0;--tu){var tc=Hs[tu];tc&&tc(Uo,null,0)}En.flush(),Eo&&Eo.update()}function Mu(){!jo&&Hs.length>0&&(jo=x.next(Jl))}function Fu(){jo&&(x.cancel(Jl),jo=null)}function cf(tu){tu.preventDefault(),Fu(),au.forEach(function(tc){tc()})}function zu(tu){En.getError(),Wa.restore(),Po.restore(),Fa.restore(),zs.restore(),Ha.restore(),Ra.restore(),Ua.restore(),Eo&&Eo.restore(),ls.procs.refresh(),Mu(),ws.forEach(function(tc){tc()})}Mo&&(Mo.addEventListener(ud,cf,!1),Mo.addEventListener(Uf,zu,!1));function mh(){Hs.length=0,Fu(),Mo&&(Mo.removeEventListener(ud,cf),Mo.removeEventListener(Uf,zu)),Po.clear(),Ra.clear(),Ha.clear(),Ua.clear(),zs.clear(),so.clear(),Fa.clear(),Eo&&Eo.clear(),Xs.forEach(function(tu){tu()})}function Wc(tu){function tc(zr){var Gr=w({},zr);delete Gr.uniforms,delete Gr.attributes,delete Gr.context,delete Gr.vao,"stencil"in Gr&&Gr.stencil.op&&(Gr.stencil.opBack=Gr.stencil.opFront=Gr.stencil.op,delete Gr.stencil.op);function en(Xr){if(Xr in Gr){var Rr=Gr[Xr];delete Gr[Xr],Object.keys(Rr).forEach(function(jr){Gr[Xr+"."+jr]=Rr[jr]})}}return en("blend"),en("depth"),en("cull"),en("stencil"),en("polygonOffset"),en("scissor"),en("sample"),"vao"in zr&&(Gr.vao=zr.vao),Gr}function uc(zr,Gr){var en={},Xr={};return Object.keys(zr).forEach(function(Rr){var jr=zr[Rr];if(_.isDynamic(jr)){Xr[Rr]=_.unbox(jr,Rr);return}else if(Gr&&Array.isArray(jr)){for(var Br=0;Br<jr.length;++Br)if(_.isDynamic(jr[Br])){Xr[Rr]=_.unbox(jr,Rr);return}}en[Rr]=jr}),{dynamic:Xr,static:en}}var Xe=uc(tu.context||{},!0),ne=uc(tu.uniforms||{},!0),Fe=uc(tu.attributes||{},!1),me=uc(tc(tu),!1),We={gpuTime:0,cpuTime:0,count:0},At=ls.compile(me,Fe,ne,Xe,We),Yt=At.draw,tr=At.batch,Pt=At.scope,jt=[];function hr(zr){for(;jt.length<zr;)jt.push(null);return jt}function qr(zr,Gr){var en;if(typeof zr=="function")return Pt.call(this,null,zr,0);if(typeof Gr=="function")if(typeof zr=="number")for(en=0;en<zr;++en)Pt.call(this,null,Gr,en);else if(Array.isArray(zr))for(en=0;en<zr.length;++en)Pt.call(this,zr[en],Gr,en);else return Pt.call(this,zr,Gr,0);else if(typeof zr=="number"){if(zr>0)return tr.call(this,hr(zr|0),zr|0)}else if(Array.isArray(zr)){if(zr.length)return tr.call(this,zr,zr.length)}else return Yt.call(this,zr)}return w(qr,{stats:We,destroy:function(){At.destroy()}})}var Zd=Ra.setFBO=Wc({framebuffer:_.define.call(null,mv,"framebuffer")});function jh(tu,tc){var uc=0;ls.procs.poll();var Xe=tc.color;Xe&&(En.clearColor(+Xe[0]||0,+Xe[1]||0,+Xe[2]||0,+Xe[3]||0),uc|=xd),"depth"in tc&&(En.clearDepth(+tc.depth),uc|=Rl),"stencil"in tc&&(En.clearStencil(tc.stencil|0),uc|=Cc),En.clear(uc)}function fp(tu){if("framebuffer"in tu)if(tu.framebuffer&&tu.framebuffer_reglType==="framebufferCube")for(var tc=0;tc<6;++tc)Zd(w({framebuffer:tu.framebuffer.faces[tc]},tu),jh);else Zd(tu,jh);else jh(null,tu)}function Am(tu){Hs.push(tu);function tc(){var uc=qv(Hs,tu);function Xe(){var ne=qv(Hs,Xe);Hs[ne]=Hs[Hs.length-1],Hs.length-=1,Hs.length<=0&&Fu()}Hs[uc]=Xe}return Mu(),{cancel:tc}}function _d(){var tu=Wo.viewport,tc=Wo.scissor_box;tu[0]=tu[1]=tc[0]=tc[1]=0,Uo.viewportWidth=Uo.framebufferWidth=Uo.drawingBufferWidth=tu[2]=tc[2]=En.drawingBufferWidth,Uo.viewportHeight=Uo.framebufferHeight=Uo.drawingBufferHeight=tu[3]=tc[3]=En.drawingBufferHeight}function Hd(){Uo.tick+=1,Uo.time=dp(),_d(),ls.procs.poll()}function Ol(){zs.refresh(),_d(),ls.procs.refresh(),Eo&&Eo.update()}function dp(){return(A()-qo)/1e3}Ol();function Fc(tu,tc){var uc;switch(tu){case"frame":return Am(tc);case"lost":uc=au;break;case"restore":uc=ws;break;case"destroy":uc=Xs;break}return uc.push(tc),{cancel:function(){for(var Xe=0;Xe<uc.length;++Xe)if(uc[Xe]===tc){uc[Xe]=uc[uc.length-1],uc.pop();return}}}}function Hf(){return Ao}function Fp(tu){Object.entries(tu).forEach(function(tc){Ao[tc[0]]=tc[1]})}var zp=w(Wc,{clear:fp,prop:_.define.bind(null,mv),context:_.define.bind(null,Mf),this:_.define.bind(null,cd),draw:Wc({}),buffer:function(tu){return Fa.create(tu,$c,!1,!1)},elements:function(tu){return so.create(tu,!1)},texture:zs.create2D,cube:zs.createCube,renderbuffer:Ha.create,framebuffer:Ra.create,framebufferCube:Ra.createCube,vao:Ua.createVAO,attributes:ia,frame:Am,on:Fc,limits:ga,hasExtension:function(tu){return ga.extensions.indexOf(tu.toLowerCase())>=0},read:ua,destroy:mh,_gl:En,_refresh:Ol,poll:function(){Hd(),Eo&&Eo.update()},now:dp,stats:Fi,getCachedCode:Hf,preloadCachedCode:Fp});return mn.onDone(null,zp),zp}return Th})}}),KQe=U({"node_modules/gl-util/context.js"(pe,le){var w=NR();le.exports=function(p){if(p?typeof p=="string"&&(p={container:p}):p={},O(p)?p={container:p}:z(p)?p={container:p}:l(p)?p={gl:p}:p=w(p,{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),p.pixelRatio||(p.pixelRatio=window.pixelRatio||1),p.gl)return p.gl;if(p.canvas&&(p.container=p.canvas.parentNode),p.container){if(typeof p.container=="string"){var f=document.querySelector(p.container);if(!f)throw Error("Element "+p.container+" is not found");p.container=f}O(p.container)?(p.canvas=p.container,p.container=p.canvas.parentNode):p.canvas||(p.canvas=u(),p.container.appendChild(p.canvas),R(p))}else if(!p.canvas)if(typeof document<"u")p.container=document.body||document.documentElement,p.canvas=u(),p.container.appendChild(p.canvas),R(p);else throw Error("Not DOM environment. Use headless-gl.");return p.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(v){try{p.gl=p.canvas.getContext(v,p.attrs)}catch{}return p.gl}),p.gl};function R(c){if(c.container)if(c.container==document.body)document.body.style.width||(c.canvas.width=c.width||c.pixelRatio*window.innerWidth),document.body.style.height||(c.canvas.height=c.height||c.pixelRatio*window.innerHeight);else{var p=c.container.getBoundingClientRect();c.canvas.width=c.width||p.right-p.left,c.canvas.height=c.height||p.bottom-p.top}}function O(c){return typeof c.getContext=="function"&&"width"in c&&"height"in c}function z(c){return typeof c.nodeName=="string"&&typeof c.appendChild=="function"&&typeof c.getBoundingClientRect=="function"}function l(c){return typeof c.drawArrays=="function"||typeof c.drawElements=="function"}function u(){var c=document.createElement("canvas");return c.style.position="absolute",c.style.top=0,c.style.left=0,c}}}),JQe=U({"node_modules/font-atlas/index.js"(pe,le){var w=fxe(),R=[32,126];le.exports=O;function O(z){z=z||{};var l=z.shape?z.shape:z.canvas?[z.canvas.width,z.canvas.height]:[512,512],u=z.canvas||document.createElement("canvas"),c=z.font,p=typeof z.step=="number"?[z.step,z.step]:z.step||[32,32],f=z.chars||R;if(c&&typeof c!="string"&&(c=w(c)),!Array.isArray(f))f=String(f).split("");else if(f.length===2&&typeof f[0]=="number"&&typeof f[1]=="number"){for(var v=[],h=f[0],m=0;h<=f[1];h++)v[m++]=String.fromCharCode(h);f=v}l=l.slice(),u.width=l[0],u.height=l[1];var _=u.getContext("2d");_.fillStyle="#000",_.fillRect(0,0,u.width,u.height),_.font=c,_.textAlign="center",_.textBaseline="middle",_.fillStyle="#fff";for(var x=p[0]/2,A=p[1]/2,h=0;h<f.length;h++)_.fillText(f[h],x,A),(x+=p[0])>l[0]-p[0]/2&&(x=p[0]/2,A+=p[1]);return u}}}),dxe=U({"node_modules/bit-twiddle/twiddle.js"(pe){"use restrict";var le=32;pe.INT_BITS=le,pe.INT_MAX=2147483647,pe.INT_MIN=-1<<le-1,pe.sign=function(O){return(O>0)-(O<0)},pe.abs=function(O){var z=O>>le-1;return(O^z)-z},pe.min=function(O,z){return z^(O^z)&-(O<z)},pe.max=function(O,z){return O^(O^z)&-(O<z)},pe.isPow2=function(O){return!(O&O-1)&&!!O},pe.log2=function(O){var z,l;return z=(O>65535)<<4,O>>>=z,l=(O>255)<<3,O>>>=l,z|=l,l=(O>15)<<2,O>>>=l,z|=l,l=(O>3)<<1,O>>>=l,z|=l,z|O>>1},pe.log10=function(O){return O>=1e9?9:O>=1e8?8:O>=1e7?7:O>=1e6?6:O>=1e5?5:O>=1e4?4:O>=1e3?3:O>=100?2:O>=10?1:0},pe.popCount=function(O){return O=O-(O>>>1&1431655765),O=(O&858993459)+(O>>>2&858993459),(O+(O>>>4)&252645135)*16843009>>>24};function w(O){var z=32;return O&=-O,O&&z--,O&65535&&(z-=16),O&16711935&&(z-=8),O&252645135&&(z-=4),O&858993459&&(z-=2),O&1431655765&&(z-=1),z}pe.countTrailingZeros=w,pe.nextPow2=function(O){return O+=O===0,--O,O|=O>>>1,O|=O>>>2,O|=O>>>4,O|=O>>>8,O|=O>>>16,O+1},pe.prevPow2=function(O){return O|=O>>>1,O|=O>>>2,O|=O>>>4,O|=O>>>8,O|=O>>>16,O-(O>>>1)},pe.parity=function(O){return O^=O>>>16,O^=O>>>8,O^=O>>>4,O&=15,27030>>>O&1};var R=new Array(256);(function(O){for(var z=0;z<256;++z){var l=z,u=z,c=7;for(l>>>=1;l;l>>>=1)u<<=1,u|=l&1,--c;O[z]=u<<c&255}})(R),pe.reverse=function(O){return R[O&255]<<24|R[O>>>8&255]<<16|R[O>>>16&255]<<8|R[O>>>24&255]},pe.interleave2=function(O,z){return O&=65535,O=(O|O<<8)&16711935,O=(O|O<<4)&252645135,O=(O|O<<2)&858993459,O=(O|O<<1)&1431655765,z&=65535,z=(z|z<<8)&16711935,z=(z|z<<4)&252645135,z=(z|z<<2)&858993459,z=(z|z<<1)&1431655765,O|z<<1},pe.deinterleave2=function(O,z){return O=O>>>z&1431655765,O=(O|O>>>1)&858993459,O=(O|O>>>2)&252645135,O=(O|O>>>4)&16711935,O=(O|O>>>16)&65535,O<<16>>16},pe.interleave3=function(O,z,l){return O&=1023,O=(O|O<<16)&4278190335,O=(O|O<<8)&251719695,O=(O|O<<4)&3272356035,O=(O|O<<2)&1227133513,z&=1023,z=(z|z<<16)&4278190335,z=(z|z<<8)&251719695,z=(z|z<<4)&3272356035,z=(z|z<<2)&1227133513,O|=z<<1,l&=1023,l=(l|l<<16)&4278190335,l=(l|l<<8)&251719695,l=(l|l<<4)&3272356035,l=(l|l<<2)&1227133513,O|l<<2},pe.deinterleave3=function(O,z){return O=O>>>z&1227133513,O=(O|O>>>2)&3272356035,O=(O|O>>>4)&251719695,O=(O|O>>>8)&4278190335,O=(O|O>>>16)&1023,O<<22>>22},pe.nextCombination=function(O){var z=O|O-1;return z+1|(~z&-~z)-1>>>w(O)+1}}}),QQe=U({"node_modules/dup/dup.js"(pe,le){function w(z,l,u){var c=z[u]|0;if(c<=0)return[];var p=new Array(c),f;if(u===z.length-1)for(f=0;f<c;++f)p[f]=l;else for(f=0;f<c;++f)p[f]=w(z,l,u+1);return p}function R(z,l){var u,c;for(u=new Array(z),c=0;c<z;++c)u[c]=l;return u}function O(z,l){switch(typeof l>"u"&&(l=0),typeof z){case"number":if(z>0)return R(z|0,l);break;case"object":if(typeof z.length=="number")return w(z,l,0);break}return[]}le.exports=O}}),eet=U({"node_modules/typedarray-pool/pool.js"(pe){var le=dxe(),w=QQe(),R=bp().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:w([32,0]),UINT16:w([32,0]),UINT32:w([32,0]),BIGUINT64:w([32,0]),INT8:w([32,0]),INT16:w([32,0]),INT32:w([32,0]),BIGINT64:w([32,0]),FLOAT:w([32,0]),DOUBLE:w([32,0]),DATA:w([32,0]),UINT8C:w([32,0]),BUFFER:w([32,0])});var O=typeof Uint8ClampedArray<"u",z=typeof BigUint64Array<"u",l=typeof BigInt64Array<"u",u=window.__TYPEDARRAY_POOL;u.UINT8C||(u.UINT8C=w([32,0])),u.BIGUINT64||(u.BIGUINT64=w([32,0])),u.BIGINT64||(u.BIGINT64=w([32,0])),u.BUFFER||(u.BUFFER=w([32,0]));var c=u.DATA,p=u.BUFFER;pe.free=function(y){if(R.isBuffer(y))p[le.log2(y.length)].push(y);else{if(Object.prototype.toString.call(y)!=="[object ArrayBuffer]"&&(y=y.buffer),!y)return;var S=y.length||y.byteLength,M=le.log2(S)|0;c[M].push(y)}};function f(T){if(T){var y=T.length||T.byteLength,S=le.log2(y);c[S].push(T)}}function v(T){f(T.buffer)}pe.freeUint8=pe.freeUint16=pe.freeUint32=pe.freeBigUint64=pe.freeInt8=pe.freeInt16=pe.freeInt32=pe.freeBigInt64=pe.freeFloat32=pe.freeFloat=pe.freeFloat64=pe.freeDouble=pe.freeUint8Clamped=pe.freeDataView=v,pe.freeArrayBuffer=f,pe.freeBuffer=function(y){p[le.log2(y.length)].push(y)},pe.malloc=function(y,S){if(S===void 0||S==="arraybuffer")return h(y);switch(S){case"uint8":return m(y);case"uint16":return _(y);case"uint32":return x(y);case"int8":return A(y);case"int16":return E(y);case"int32":return D(y);case"float":case"float32":return g(y);case"double":case"float64":return C(y);case"uint8_clamped":return I(y);case"bigint64":return F(y);case"biguint64":return N(y);case"buffer":return P(y);case"data":case"dataview":return k(y);default:return null}return null};function h(y){var y=le.nextPow2(y),S=le.log2(y),M=c[S];return M.length>0?M.pop():new ArrayBuffer(y)}pe.mallocArrayBuffer=h;function m(T){return new Uint8Array(h(T),0,T)}pe.mallocUint8=m;function _(T){return new Uint16Array(h(2*T),0,T)}pe.mallocUint16=_;function x(T){return new Uint32Array(h(4*T),0,T)}pe.mallocUint32=x;function A(T){return new Int8Array(h(T),0,T)}pe.mallocInt8=A;function E(T){return new Int16Array(h(2*T),0,T)}pe.mallocInt16=E;function D(T){return new Int32Array(h(4*T),0,T)}pe.mallocInt32=D;function g(T){return new Float32Array(h(4*T),0,T)}pe.mallocFloat32=pe.mallocFloat=g;function C(T){return new Float64Array(h(8*T),0,T)}pe.mallocFloat64=pe.mallocDouble=C;function I(T){return O?new Uint8ClampedArray(h(T),0,T):m(T)}pe.mallocUint8Clamped=I;function N(T){return z?new BigUint64Array(h(8*T),0,T):null}pe.mallocBigUint64=N;function F(T){return l?new BigInt64Array(h(8*T),0,T):null}pe.mallocBigInt64=F;function k(T){return new DataView(h(T),0,T)}pe.mallocDataView=k;function P(T){T=le.nextPow2(T);var y=le.log2(T),S=p[y];return S.length>0?S.pop():new R(T)}pe.mallocBuffer=P,pe.clearCache=function(){for(var y=0;y<32;++y)u.UINT8[y].length=0,u.UINT16[y].length=0,u.UINT32[y].length=0,u.INT8[y].length=0,u.INT16[y].length=0,u.INT32[y].length=0,u.FLOAT[y].length=0,u.DOUBLE[y].length=0,u.BIGUINT64[y].length=0,u.BIGINT64[y].length=0,u.UINT8C[y].length=0,c[y].length=0,p[y].length=0}}}),tet=U({"node_modules/is-plain-obj/index.js"(pe,le){var w=Object.prototype.toString;le.exports=function(R){var O;return w.call(R)==="[object Object]"&&(O=Object.getPrototypeOf(R),O===null||O===Object.getPrototypeOf({}))}}}),hxe=U({"node_modules/parse-unit/index.js"(pe,le){le.exports=function(R,O){O||(O=[0,""]),R=String(R);var z=parseFloat(R,10);return O[0]=z,O[1]=R.match(/[\d.\-\+]*\s*(.*)/)[1]||"",O}}}),ret=U({"node_modules/to-px/topx.js"(pe,le){var w=hxe();le.exports=l;var R=96;function O(u,c){var p=w(getComputedStyle(u).getPropertyValue(c));return p[0]*l(p[1],u)}function z(u,c){var p=document.createElement("div");p.style["font-size"]="128"+u,c.appendChild(p);var f=O(p,"font-size")/128;return c.removeChild(p),f}function l(u,c){switch(c=c||document.body,u=(u||"px").trim().toLowerCase(),(c===window||c===document)&&(c=document.body),u){case"%":return c.clientHeight/100;case"ch":case"ex":return z(u,c);case"em":return O(c,"font-size");case"rem":return O(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 R;case"cm":return R/2.54;case"mm":return R/25.4;case"pt":return R/72;case"pc":return R/6}return 1}}}),net=U({"node_modules/detect-kerning/index.js"(pe,le){le.exports=z;var w=z.canvas=document.createElement("canvas"),R=w.getContext("2d"),O=l([32,126]);z.createPairs=l,z.ascii=O;function z(u,c){Array.isArray(u)&&(u=u.join(", "));var p={},f,v=16,h=.05;c&&(c.length===2&&typeof c[0]=="number"?f=l(c):Array.isArray(c)?f=c:(c.o?f=l(c.o):c.pairs&&(f=c.pairs),c.fontSize&&(v=c.fontSize),c.threshold!=null&&(h=c.threshold))),f||(f=O),R.font=v+"px "+u;for(var m=0;m<f.length;m++){var _=f[m],x=R.measureText(_[0]).width+R.measureText(_[1]).width,A=R.measureText(_).width;if(Math.abs(x-A)>v*h){var E=(A-x)/v;p[_]=E*1e3}}return p}function l(u){for(var c=[],p=u[0];p<=u[1];p++)for(var f=String.fromCharCode(p),v=u[0];v<u[1];v++){var h=String.fromCharCode(v),m=f+h;c.push(m)}return c}}}),iet=U({"node_modules/font-measure/index.js"(pe,le){le.exports=w,w.canvas=document.createElement("canvas"),w.cache={};function w(h,u){u||(u={}),(typeof h=="string"||Array.isArray(h))&&(u.family=h);var c=Array.isArray(u.family)?u.family.join(", "):u.family;if(!c)throw Error("`family` must be defined");var p=u.size||u.fontSize||u.em||48,f=u.weight||u.fontWeight||"",v=u.style||u.fontStyle||"",h=[v,f,p].join(" ")+"px "+c,m=u.origin||"top";if(w.cache[c]&&p<=w.cache[c].em)return R(w.cache[c],m);var _=u.canvas||w.canvas,x=_.getContext("2d"),A={upper:u.upper!==void 0?u.upper:"H",lower:u.lower!==void 0?u.lower:"x",descent:u.descent!==void 0?u.descent:"p",ascent:u.ascent!==void 0?u.ascent:"h",tittle:u.tittle!==void 0?u.tittle:"i",overshoot:u.overshoot!==void 0?u.overshoot:"O"},E=Math.ceil(p*1.5);_.height=E,_.width=E*.5,x.font=h;var D="H",g={top:0};x.clearRect(0,0,E,E),x.textBaseline="top",x.fillStyle="black",x.fillText(D,0,0);var C=O(x.getImageData(0,0,E,E));x.clearRect(0,0,E,E),x.textBaseline="bottom",x.fillText(D,0,E);var I=O(x.getImageData(0,0,E,E));g.lineHeight=g.bottom=E-I+C,x.clearRect(0,0,E,E),x.textBaseline="alphabetic",x.fillText(D,0,E);var N=O(x.getImageData(0,0,E,E)),F=E-N-1+C;g.baseline=g.alphabetic=F,x.clearRect(0,0,E,E),x.textBaseline="middle",x.fillText(D,0,E*.5);var k=O(x.getImageData(0,0,E,E));g.median=g.middle=E-k-1+C-E*.5,x.clearRect(0,0,E,E),x.textBaseline="hanging",x.fillText(D,0,E*.5);var P=O(x.getImageData(0,0,E,E));g.hanging=E-P-1+C-E*.5,x.clearRect(0,0,E,E),x.textBaseline="ideographic",x.fillText(D,0,E);var T=O(x.getImageData(0,0,E,E));if(g.ideographic=E-T-1+C,A.upper&&(x.clearRect(0,0,E,E),x.textBaseline="top",x.fillText(A.upper,0,0),g.upper=O(x.getImageData(0,0,E,E)),g.capHeight=g.baseline-g.upper),A.lower&&(x.clearRect(0,0,E,E),x.textBaseline="top",x.fillText(A.lower,0,0),g.lower=O(x.getImageData(0,0,E,E)),g.xHeight=g.baseline-g.lower),A.tittle&&(x.clearRect(0,0,E,E),x.textBaseline="top",x.fillText(A.tittle,0,0),g.tittle=O(x.getImageData(0,0,E,E))),A.ascent&&(x.clearRect(0,0,E,E),x.textBaseline="top",x.fillText(A.ascent,0,0),g.ascent=O(x.getImageData(0,0,E,E))),A.descent&&(x.clearRect(0,0,E,E),x.textBaseline="top",x.fillText(A.descent,0,0),g.descent=z(x.getImageData(0,0,E,E))),A.overshoot){x.clearRect(0,0,E,E),x.textBaseline="top",x.fillText(A.overshoot,0,0);var y=z(x.getImageData(0,0,E,E));g.overshoot=y-F}for(var S in g)g[S]/=p;return g.em=p,w.cache[c]=g,R(g,m)}function R(l,u){var c={};typeof u=="string"&&(u=l[u]);for(var p in l)p!=="em"&&(c[p]=l[p]-u);return c}function O(l){for(var u=l.height,c=l.data,p=3;p<c.length;p+=4)if(c[p]!==0)return Math.floor((p-3)*.25/u)}function z(l){for(var u=l.height,c=l.data,p=c.length-1;p>0;p-=4)if(c[p]!==0)return Math.floor((p-3)*.25/u)}}}),aet=U({"node_modules/gl-text/dist.js"(pe,le){var w=XQe(),R=NR(),O=ZQe(),z=KQe(),l=nxe(),u=H4(),c=JQe(),p=eet(),f=BF(),v=tet(),h=hxe(),m=ret(),_=net(),x=F1(),A=iet(),E=R6(),D=dxe(),g=D.nextPow2,C=new l,I=!1;document.body&&(N=document.body.appendChild(document.createElement("div")),N.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(N).fontStretch&&(I=!0),document.body.removeChild(N));var N,F=function(T){k(T)?(T={regl:T},this.gl=T.regl._gl):this.gl=z(T),this.shader=C.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=T.regl||O({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(),C.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(v(T)?T:{})};F.prototype.createShader=function(){var T=this.regl,y=T({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:T.prop("count"),offset:T.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:T.this("sizeBuffer")},width:{offset:0,stride:8,buffer:T.this("sizeBuffer")},char:T.this("charBuffer"),position:T.this("position")},uniforms:{atlasSize:function(M,W){return[W.atlas.width,W.atlas.height]},atlasDim:function(M,W){return[W.atlas.cols,W.atlas.rows]},atlas:function(M,W){return W.atlas.texture},charStep:function(M,W){return W.atlas.step},em:function(M,W){return W.atlas.em},color:T.prop("color"),opacity:T.prop("opacity"),viewport:T.this("viewportArray"),scale:T.this("scale"),align:T.prop("align"),baseline:T.prop("baseline"),translate:T.this("translate"),positionOffset:T.prop("positionOffset")},primitive:"points",viewport:T.this("viewport"),vert:`
			precision highp float;
			attribute float width, charOffset, char;
			attribute vec2 position;
			uniform float fontSize, charStep, em, align, baseline;
			uniform vec4 viewport;
			uniform vec4 color;
			uniform vec2 atlasSize, atlasDim, scale, translate, positionOffset;
			varying vec2 charCoord, charId;
			varying float charWidth;
			varying vec4 fontColor;
			void main () {
				vec2 offset = floor(em * (vec2(align + charOffset, baseline)
					+ vec2(positionOffset.x, -positionOffset.y)))
					/ (viewport.zw * scale.xy);

				vec2 position = (position + translate) * scale;
				position += offset * scale;

				charCoord = position * viewport.zw + viewport.xy;

				gl_Position = vec4(position * 2. - 1., 0, 1);

				gl_PointSize = charStep;

				charId.x = mod(char, atlasDim.x);
				charId.y = floor(char / atlasDim.x);

				charWidth = width * em;

				fontColor = color / 255.;
			}`,frag:`
			precision highp float;
			uniform float fontSize, charStep, opacity;
			uniform vec2 atlasSize;
			uniform vec4 viewport;
			uniform sampler2D atlas;
			varying vec4 fontColor;
			varying vec2 charCoord, charId;
			varying float charWidth;

			float lightness(vec4 color) {
				return color.r * 0.299 + color.g * 0.587 + color.b * 0.114;
			}

			void main () {
				vec2 uv = gl_FragCoord.xy - charCoord + charStep * .5;
				float halfCharStep = floor(charStep * .5 + .5);

				// invert y and shift by 1px (FF expecially needs that)
				uv.y = charStep - uv.y;

				// ignore points outside of character bounding box
				float halfCharWidth = ceil(charWidth * .5);
				if (floor(uv.x) > halfCharStep + halfCharWidth ||
					floor(uv.x) < halfCharStep - halfCharWidth) return;

				uv += charId * charStep;
				uv = uv / atlasSize;

				vec4 color = fontColor;
				vec4 mask = texture2D(atlas, uv);

				float maskY = lightness(mask);
				// float colorY = lightness(color);
				color.a *= maskY;
				color.a *= opacity;

				// color.a += .1;

				// antialiasing, see yiq color space y-channel formula
				// color.rgb += (1. - color.rgb) * (1. - mask.rgb);

				gl_FragColor = color;
			}`}),S={};return{regl:T,draw:y,atlas:S}},F.prototype.update=function(T){var y=this;if(typeof T=="string")T={text:T};else if(!T)return;T=R(T,{position:"position positions coord coords coordinates",font:"font fontFace fontface typeface cssFont css-font family fontFamily",fontSize:"fontSize fontsize size font-size",text:"text texts chars characters value values symbols",align:"align alignment textAlign textbaseline",baseline:"baseline textBaseline textbaseline",direction:"dir direction textDirection",color:"color colour fill fill-color fillColor textColor textcolor",kerning:"kerning kern",range:"range dataBox",viewport:"vp viewport viewBox viewbox viewPort",opacity:"opacity alpha transparency visible visibility opaque",offset:"offset positionOffset padding shift indent indentation"},!0),T.opacity!=null&&(Array.isArray(T.opacity)?this.opacity=T.opacity.map(function(Ue){return parseFloat(Ue)}):this.opacity=parseFloat(T.opacity)),T.viewport!=null&&(this.viewport=f(T.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),this.viewport==null&&(this.viewport={x:0,y:0,width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight},this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),T.kerning!=null&&(this.kerning=T.kerning),T.offset!=null&&(typeof T.offset=="number"&&(T.offset=[T.offset,0]),this.positionOffset=E(T.offset)),T.direction&&(this.direction=T.direction),T.range&&(this.range=T.range,this.scale=[1/(T.range[2]-T.range[0]),1/(T.range[3]-T.range[1])],this.translate=[-T.range[0],-T.range[1]]),T.scale&&(this.scale=T.scale),T.translate&&(this.translate=T.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!T.font&&(T.font=F.baseFontSize+"px sans-serif");var S=!1,M=!1;if(T.font&&(Array.isArray(T.font)?T.font:[T.font]).forEach(function(Ue,xt){if(typeof Ue=="string")try{Ue=w.parse(Ue)}catch{Ue=w.parse(F.baseFontSize+"px "+Ue)}else{var Gt=Ue.style,Jt=Ue.weight,Ut=Ue.stretch,kr=Ue.variant;Ue=w.parse(w.stringify(Ue)),Gt&&(Ue.style=Gt),Jt&&(Ue.weight=Jt),Ut&&(Ue.stretch=Ut),kr&&(Ue.variant=kr)}var Pr=w.stringify({size:F.baseFontSize,family:Ue.family,stretch:I?Ue.stretch:void 0,variant:Ue.variant,weight:Ue.weight,style:Ue.style}),$r=h(Ue.size),rn=Math.round($r[0]*m($r[1]));if(rn!==y.fontSize[xt]&&(M=!0,y.fontSize[xt]=rn),(!y.font[xt]||Pr!=y.font[xt].baseString)&&(S=!0,y.font[xt]=F.fonts[Pr],!y.font[xt])){var kn=Ue.family.join(", "),Rn=[Ue.style];Ue.style!=Ue.variant&&Rn.push(Ue.variant),Ue.variant!=Ue.weight&&Rn.push(Ue.weight),I&&Ue.weight!=Ue.stretch&&Rn.push(Ue.stretch),y.font[xt]={baseString:Pr,family:kn,weight:Ue.weight,stretch:Ue.stretch,style:Ue.style,variant:Ue.variant,width:{},kerning:{},metrics:A(kn,{origin:"top",fontSize:F.baseFontSize,fontStyle:Rn.join(" ")})},F.fonts[Pr]=y.font[xt]}}),(S||M)&&this.font.forEach(function(Ue,xt){var Gt=w.stringify({size:y.fontSize[xt],family:Ue.family,stretch:I?Ue.stretch:void 0,variant:Ue.variant,weight:Ue.weight,style:Ue.style});if(y.fontAtlas[xt]=y.shader.atlas[Gt],!y.fontAtlas[xt]){var Jt=Ue.metrics;y.shader.atlas[Gt]=y.fontAtlas[xt]={fontString:Gt,step:Math.ceil(y.fontSize[xt]*Jt.bottom*.5)*2,em:y.fontSize[xt],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:y.regl.texture()}}T.text==null&&(T.text=y.text)}),typeof T.text=="string"&&T.position&&T.position.length>2){for(var W=Array(T.position.length*.5),$=0;$<W.length;$++)W[$]=T.text;T.text=W}var Z;if(T.text!=null||S){if(this.textOffsets=[0],Array.isArray(T.text)){this.count=T.text[0].length,this.counts=[this.count];for(var K=1;K<T.text.length;K++)this.textOffsets[K]=this.textOffsets[K-1]+T.text[K-1].length,this.count+=T.text[K].length,this.counts.push(T.text[K].length);this.text=T.text.join("")}else this.text=T.text,this.count=this.text.length,this.counts=[this.count];Z=[],this.font.forEach(function(Ue,xt){F.atlasContext.font=Ue.baseString;for(var Gt=y.fontAtlas[xt],Jt=0;Jt<y.text.length;Jt++){var Ut=y.text.charAt(Jt);if(Gt.ids[Ut]==null&&(Gt.ids[Ut]=Gt.chars.length,Gt.chars.push(Ut),Z.push(Ut)),Ue.width[Ut]==null&&(Ue.width[Ut]=F.atlasContext.measureText(Ut).width/F.baseFontSize,y.kerning)){var kr=[];for(var Pr in Ue.width)kr.push(Pr+Ut,Ut+Pr);x(Ue.kerning,_(Ue.family,{pairs:kr}))}}})}if(T.position)if(T.position.length>2){for(var Q=!T.position[0].length,J=p.mallocFloat(this.count*2),G=0,ee=0;G<this.counts.length;G++){var re=this.counts[G];if(Q)for(var fe=0;fe<re;fe++)J[ee++]=T.position[G*2],J[ee++]=T.position[G*2+1];else for(var we=0;we<re;we++)J[ee++]=T.position[G][0],J[ee++]=T.position[G][1]}this.position.call?this.position({type:"float",data:J}):this.position=this.regl.buffer({type:"float",data:J}),p.freeFloat(J)}else this.position.destroy&&this.position.destroy(),this.position={constant:T.position};if(T.text||S){var Oe=p.mallocUint8(this.count),ke=p.mallocFloat(this.count*2);this.textWidth=[];for(var Le=0,oe=0;Le<this.counts.length;Le++){for(var be=this.counts[Le],_e=this.font[Le]||this.font[0],he=this.fontAtlas[Le]||this.fontAtlas[0],De=0;De<be;De++){var xe=this.text.charAt(oe),se=this.text.charAt(oe-1);if(Oe[oe]=he.ids[xe],ke[oe*2]=_e.width[xe],De){var Ee=ke[oe*2-2],Te=ke[oe*2],Be=ke[oe*2-1],tt=Be+Ee*.5+Te*.5;if(this.kerning){var at=_e.kerning[se+xe];at&&(tt+=at*.001)}ke[oe*2+1]=tt}else ke[oe*2+1]=ke[oe*2]*.5;oe++}this.textWidth.push(ke.length?ke[oe*2-2]*.5+ke[oe*2-1]:0)}T.align||(T.align=this.align),this.charBuffer({data:Oe,type:"uint8",usage:"stream"}),this.sizeBuffer({data:ke,type:"float",usage:"stream"}),p.freeUint8(Oe),p.freeFloat(ke),Z.length&&this.font.forEach(function(Ue,xt){var Gt=y.fontAtlas[xt],Jt=Gt.step,Ut=Math.floor(F.maxAtlasSize/Jt),kr=Math.min(Ut,Gt.chars.length),Pr=Math.ceil(Gt.chars.length/kr),$r=g(kr*Jt),rn=g(Pr*Jt);Gt.width=$r,Gt.height=rn,Gt.rows=Pr,Gt.cols=kr,Gt.em&&Gt.texture({data:c({canvas:F.atlasCanvas,font:Gt.fontString,chars:Gt.chars,shape:[$r,rn],step:[Jt,Jt]})})})}if(T.align&&(this.align=T.align,this.alignOffset=this.textWidth.map(function(Ue,xt){var Gt=Array.isArray(y.align)?y.align.length>1?y.align[xt]:y.align[0]:y.align;if(typeof Gt=="number")return Gt;switch(Gt){case"right":case"end":return-Ue;case"center":case"centre":case"middle":return-Ue*.5}return 0})),this.baseline==null&&T.baseline==null&&(T.baseline=0),T.baseline!=null&&(this.baseline=T.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(Ue,xt){var Gt=(y.font[xt]||y.font[0]).metrics,Jt=0;return Jt+=Gt.bottom*.5,typeof Ue=="number"?Jt+=Ue-Gt.baseline:Jt+=-Gt[Ue],Jt*=-1,Jt})),T.color!=null)if(T.color||(T.color="transparent"),typeof T.color=="string"||!isNaN(T.color))this.color=u(T.color,"uint8");else{var gt;if(typeof T.color[0]=="number"&&T.color.length>this.counts.length){var pt=T.color.length;gt=p.mallocUint8(pt);for(var Rt=(T.color.subarray||T.color.slice).bind(T.color),$t=0;$t<pt;$t+=4)gt.set(u(Rt($t,$t+4),"uint8"),$t)}else{var Wt=T.color.length;gt=p.mallocUint8(Wt*4);for(var Ht=0;Ht<Wt;Ht++)gt.set(u(T.color[Ht]||0,"uint8"),Ht*4)}this.color=gt}if(T.position||T.text||T.color||T.baseline||T.align||T.font||T.offset||T.opacity){var Ft=this.color.length>4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(Ft){var st=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(st);for(var rt=0;rt<this.batch.length;rt++)this.batch[rt]={count:this.counts.length>1?this.counts[rt]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[rt]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(rt*4,rt*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[rt]:this.opacity,baseline:this.baselineOffset[rt]!=null?this.baselineOffset[rt]:this.baselineOffset[0],align:this.align?this.alignOffset[rt]!=null?this.alignOffset[rt]:this.alignOffset[0]:0,atlas:this.fontAtlas[rt]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(rt*2,rt*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=[]}},F.prototype.destroy=function(){},F.prototype.kerning=!0,F.prototype.position={constant:new Float32Array(2)},F.prototype.translate=null,F.prototype.scale=null,F.prototype.font=null,F.prototype.text="",F.prototype.positionOffset=[0,0],F.prototype.opacity=1,F.prototype.color=new Uint8Array([0,0,0,255]),F.prototype.alignOffset=[0,0],F.maxAtlasSize=1024,F.atlasCanvas=document.createElement("canvas"),F.atlasContext=F.atlasCanvas.getContext("2d",{alpha:!1}),F.baseFontSize=64,F.fonts={};function k(P){return typeof P=="function"&&P._gl&&P.prop&&P.texture&&P.buffer}le.exports=F}}),oet=U({"node_modules/@plotly/regl/dist/regl.unchecked.js"(pe,le){(function(w,R){typeof pe=="object"&&typeof le<"u"?le.exports=R():w.createREGL=R()})(pe,function(){var w=function(rr,mn){for(var En=Object.keys(mn),ia=0;ia<En.length;++ia)rr[En[ia]]=mn[En[ia]];return rr},R=0,O=0,z=5,l=6;function u(rr,mn){this.id=R++,this.type=rr,this.data=mn}function c(rr){return rr.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function p(rr){if(rr.length===0)return[];var mn=rr.charAt(0),En=rr.charAt(rr.length-1);if(rr.length>1&&mn===En&&(mn==='"'||mn==="'"))return['"'+c(rr.substr(1,rr.length-2))+'"'];var ia=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(rr);if(ia)return p(rr.substr(0,ia.index)).concat(p(ia[1])).concat(p(rr.substr(ia.index+ia[0].length)));var Wa=rr.split(".");if(Wa.length===1)return['"'+c(rr)+'"'];for(var zi=[],Fi=0;Fi<Wa.length;++Fi)zi=zi.concat(p(Wa[Fi]));return zi}function f(rr){return"["+p(rr).join("][")+"]"}function v(rr,mn){return new u(rr,f(mn+""))}function h(rr){return typeof rr=="function"&&!rr._reglType||rr instanceof u}function m(rr,mn){if(typeof rr=="function")return new u(O,rr);if(typeof rr=="number"||typeof rr=="boolean")return new u(z,rr);if(Array.isArray(rr))return new u(l,rr.map(function(En,ia){return m(En)}));if(rr instanceof u)return rr}var _={DynamicVariable:u,define:v,isDynamic:h,unbox:m,accessor:f},x={next:typeof requestAnimationFrame=="function"?function(rr){return requestAnimationFrame(rr)}:function(rr){return setTimeout(rr,16)},cancel:typeof cancelAnimationFrame=="function"?function(rr){return cancelAnimationFrame(rr)}:clearTimeout},A=typeof performance<"u"&&performance.now?function(){return performance.now()}:function(){return+new Date};function E(){var rr={"":0},mn=[""];return{id:function(En){var ia=rr[En];return ia||(ia=rr[En]=mn.length,mn.push(En),ia)},str:function(En){return mn[En]}}}function D(rr,mn,En){var ia=document.createElement("canvas");w(ia.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),rr.appendChild(ia),rr===document.body&&(ia.style.position="absolute",w(rr.style,{margin:0,padding:0}));function Wa(){var Ao=window.innerWidth,To=window.innerHeight;if(rr!==document.body){var Eo=ia.getBoundingClientRect();Ao=Eo.right-Eo.left,To=Eo.bottom-Eo.top}ia.width=En*Ao,ia.height=En*To}var zi;rr!==document.body&&typeof ResizeObserver=="function"?(zi=new ResizeObserver(function(){setTimeout(Wa)}),zi.observe(rr)):window.addEventListener("resize",Wa,!1);function Fi(){zi?zi.disconnect():window.removeEventListener("resize",Wa),rr.removeChild(ia)}return Wa(),{canvas:ia,onDestroy:Fi}}function g(rr,mn){function En(ia){try{return rr.getContext(ia,mn)}catch{return null}}return En("webgl")||En("experimental-webgl")||En("webgl-experimental")}function C(rr){return typeof rr.nodeName=="string"&&typeof rr.appendChild=="function"&&typeof rr.getBoundingClientRect=="function"}function I(rr){return typeof rr.drawArrays=="function"||typeof rr.drawElements=="function"}function N(rr){return typeof rr=="string"?rr.split():rr}function F(rr){return typeof rr=="string"?document.querySelector(rr):rr}function k(rr){var mn=rr||{},En,ia,Wa,zi,Fi={},Ao=[],To=[],Eo=typeof window>"u"?1:window.devicePixelRatio,qo=!1,qs={},xs=function(xi){},Uo=function(){};if(typeof mn=="string"?En=document.querySelector(mn):typeof mn=="object"&&(C(mn)?En=mn:I(mn)?(zi=mn,Wa=zi.canvas):("gl"in mn?zi=mn.gl:"canvas"in mn?Wa=F(mn.canvas):"container"in mn&&(ia=F(mn.container)),"attributes"in mn&&(Fi=mn.attributes),"extensions"in mn&&(Ao=N(mn.extensions)),"optionalExtensions"in mn&&(To=N(mn.optionalExtensions)),"onDone"in mn&&(xs=mn.onDone),"profile"in mn&&(qo=!!mn.profile),"pixelRatio"in mn&&(Eo=+mn.pixelRatio),"cachedCode"in mn&&(qs=mn.cachedCode))),En&&(En.nodeName.toLowerCase()==="canvas"?Wa=En:ia=En),!zi){if(!Wa){var io=D(ia||document.body,xs,Eo);if(!io)return null;Wa=io.canvas,Uo=io.onDestroy}Fi.premultipliedAlpha===void 0&&(Fi.premultipliedAlpha=!0),zi=g(Wa,Fi)}return zi?{gl:zi,canvas:Wa,container:ia,extensions:Ao,optionalExtensions:To,pixelRatio:Eo,profile:qo,cachedCode:qs,onDone:xs,onDestroy:Uo}:(Uo(),xs("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function P(rr,mn){var En={};function ia(Fi){var Ao=Fi.toLowerCase(),To;try{To=En[Ao]=rr.getExtension(Ao)}catch{}return!!To}for(var Wa=0;Wa<mn.extensions.length;++Wa){var zi=mn.extensions[Wa];if(!ia(zi))return mn.onDestroy(),mn.onDone('"'+zi+'" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return mn.optionalExtensions.forEach(ia),{extensions:En,restore:function(){Object.keys(En).forEach(function(Fi){if(En[Fi]&&!ia(Fi))throw new Error("(regl): error restoring extension "+Fi)})}}}function T(rr,mn){for(var En=Array(rr),ia=0;ia<rr;++ia)En[ia]=mn(ia);return En}var y=5120,S=5121,M=5122,W=5123,$=5124,Z=5125,K=5126;function Q(rr){for(var mn=16;mn<=1<<28;mn*=16)if(rr<=mn)return mn;return 0}function J(rr){var mn,En;return mn=(rr>65535)<<4,rr>>>=mn,En=(rr>255)<<3,rr>>>=En,mn|=En,En=(rr>15)<<2,rr>>>=En,mn|=En,En=(rr>3)<<1,rr>>>=En,mn|=En,mn|rr>>1}function G(){var rr=T(8,function(){return[]});function mn(zi){var Fi=Q(zi),Ao=rr[J(Fi)>>2];return Ao.length>0?Ao.pop():new ArrayBuffer(Fi)}function En(zi){rr[J(zi.byteLength)>>2].push(zi)}function ia(zi,Fi){var Ao=null;switch(zi){case y:Ao=new Int8Array(mn(Fi),0,Fi);break;case S:Ao=new Uint8Array(mn(Fi),0,Fi);break;case M:Ao=new Int16Array(mn(2*Fi),0,Fi);break;case W:Ao=new Uint16Array(mn(2*Fi),0,Fi);break;case $:Ao=new Int32Array(mn(4*Fi),0,Fi);break;case Z:Ao=new Uint32Array(mn(4*Fi),0,Fi);break;case K:Ao=new Float32Array(mn(4*Fi),0,Fi);break;default:return null}return Ao.length!==Fi?Ao.subarray(0,Fi):Ao}function Wa(zi){En(zi.buffer)}return{alloc:mn,free:En,allocType:ia,freeType:Wa}}var ee=G();ee.zero=G();var re=3408,fe=3410,we=3411,Oe=3412,ke=3413,Le=3414,oe=3415,be=33901,_e=33902,he=3379,De=3386,xe=34921,se=36347,Ee=36348,Te=35661,Be=35660,tt=34930,at=36349,gt=34076,pt=34024,Rt=7936,$t=7937,Wt=7938,Ht=35724,Ft=34047,st=36063,rt=34852,Ue=3553,xt=34067,Gt=34069,Jt=33984,Ut=6408,kr=5126,Pr=5121,$r=36160,rn=36053,kn=36064,Rn=16384,ci=function(rr,mn){var En=1;mn.ext_texture_filter_anisotropic&&(En=rr.getParameter(Ft));var ia=1,Wa=1;mn.webgl_draw_buffers&&(ia=rr.getParameter(rt),Wa=rr.getParameter(st));var zi=!!mn.oes_texture_float;if(zi){var Fi=rr.createTexture();rr.bindTexture(Ue,Fi),rr.texImage2D(Ue,0,Ut,1,1,0,Ut,kr,null);var Ao=rr.createFramebuffer();if(rr.bindFramebuffer($r,Ao),rr.framebufferTexture2D($r,kn,Ue,Fi,0),rr.bindTexture(Ue,null),rr.checkFramebufferStatus($r)!==rn)zi=!1;else{rr.viewport(0,0,1,1),rr.clearColor(1,0,0,1),rr.clear(Rn);var To=ee.allocType(kr,4);rr.readPixels(0,0,1,1,Ut,kr,To),rr.getError()?zi=!1:(rr.deleteFramebuffer(Ao),rr.deleteTexture(Fi),zi=To[0]===1),ee.freeType(To)}}var Eo=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),qo=!0;if(!Eo){var qs=rr.createTexture(),xs=ee.allocType(Pr,36);rr.activeTexture(Jt),rr.bindTexture(xt,qs),rr.texImage2D(Gt,0,Ut,3,3,0,Ut,Pr,xs),ee.freeType(xs),rr.bindTexture(xt,null),rr.deleteTexture(qs),qo=!rr.getError()}return{colorBits:[rr.getParameter(fe),rr.getParameter(we),rr.getParameter(Oe),rr.getParameter(ke)],depthBits:rr.getParameter(Le),stencilBits:rr.getParameter(oe),subpixelBits:rr.getParameter(re),extensions:Object.keys(mn).filter(function(Uo){return!!mn[Uo]}),maxAnisotropic:En,maxDrawbuffers:ia,maxColorAttachments:Wa,pointSizeDims:rr.getParameter(be),lineWidthDims:rr.getParameter(_e),maxViewportDims:rr.getParameter(De),maxCombinedTextureUnits:rr.getParameter(Te),maxCubeMapSize:rr.getParameter(gt),maxRenderbufferSize:rr.getParameter(pt),maxTextureUnits:rr.getParameter(tt),maxTextureSize:rr.getParameter(he),maxAttributes:rr.getParameter(xe),maxVertexUniforms:rr.getParameter(se),maxVertexTextureUnits:rr.getParameter(Be),maxVaryingVectors:rr.getParameter(Ee),maxFragmentUniforms:rr.getParameter(at),glsl:rr.getParameter(Ht),renderer:rr.getParameter($t),vendor:rr.getParameter(Rt),version:rr.getParameter(Wt),readFloat:zi,npotTextureCube:qo}},In=function(rr){return rr instanceof Uint8Array||rr instanceof Uint16Array||rr instanceof Uint32Array||rr instanceof Int8Array||rr instanceof Int16Array||rr instanceof Int32Array||rr instanceof Float32Array||rr instanceof Float64Array||rr instanceof Uint8ClampedArray};function Gn(rr){return!!rr&&typeof rr=="object"&&Array.isArray(rr.shape)&&Array.isArray(rr.stride)&&typeof rr.offset=="number"&&rr.shape.length===rr.stride.length&&(Array.isArray(rr.data)||In(rr.data))}var mr=function(rr){return Object.keys(rr).map(function(mn){return rr[mn]})},St={shape:mt,flatten:et};function Ot(rr,mn,En){for(var ia=0;ia<mn;++ia)En[ia]=rr[ia]}function Et(rr,mn,En,ia){for(var Wa=0,zi=0;zi<mn;++zi)for(var Fi=rr[zi],Ao=0;Ao<En;++Ao)ia[Wa++]=Fi[Ao]}function je(rr,mn,En,ia,Wa,zi){for(var Fi=zi,Ao=0;Ao<mn;++Ao)for(var To=rr[Ao],Eo=0;Eo<En;++Eo)for(var qo=To[Eo],qs=0;qs<ia;++qs)Wa[Fi++]=qo[qs]}function Ye(rr,mn,En,ia,Wa){for(var zi=1,Fi=En+1;Fi<mn.length;++Fi)zi*=mn[Fi];var Ao=mn[En];if(mn.length-En===4){var To=mn[En+1],Eo=mn[En+2],qo=mn[En+3];for(Fi=0;Fi<Ao;++Fi)je(rr[Fi],To,Eo,qo,ia,Wa),Wa+=zi}else for(Fi=0;Fi<Ao;++Fi)Ye(rr[Fi],mn,En+1,ia,Wa),Wa+=zi}function et(rr,mn,En,ia){var Wa=1;if(mn.length)for(var zi=0;zi<mn.length;++zi)Wa*=mn[zi];else Wa=0;var Fi=ia||ee.allocType(En,Wa);switch(mn.length){case 0:break;case 1:Ot(rr,mn[0],Fi);break;case 2:Et(rr,mn[0],mn[1],Fi);break;case 3:je(rr,mn[0],mn[1],mn[2],Fi,0);break;default:Ye(rr,mn,0,Fi,0)}return Fi}function mt(rr){for(var mn=[],En=rr;En.length;En=En[0])mn.push(En.length);return mn}var Nt={"[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},lr=5120,br=5122,Or=5124,tn=5121,Jr=5123,dn=5125,on=5126,Nn=5126,Wi={int8:lr,int16:br,int32:Or,uint8:tn,uint16:Jr,uint32:dn,float:on,float32:Nn},Oa=35048,Da=35040,Aa={dynamic:Oa,stream:Da,static:35044},Ka=St.flatten,Sa=St.shape,no=35044,Fo=35040,an=5121,Hr=5126,nn=[];nn[5120]=1,nn[5122]=2,nn[5124]=4,nn[5121]=1,nn[5123]=2,nn[5125]=4,nn[5126]=4;function Kr(rr){return Nt[Object.prototype.toString.call(rr)]|0}function $n(rr,mn){for(var En=0;En<mn.length;++En)rr[En]=mn[En]}function Ai(rr,mn,En,ia,Wa,zi,Fi){for(var Ao=0,To=0;To<En;++To)for(var Eo=0;Eo<ia;++Eo)rr[Ao++]=mn[Wa*To+zi*Eo+Fi]}function aa(rr,mn,En,ia){var Wa=0,zi={};function Fi(xi){this.id=Wa++,this.buffer=rr.createBuffer(),this.type=xi,this.usage=no,this.byteLength=0,this.dimension=1,this.dtype=an,this.persistentData=null,En.profile&&(this.stats={size:0})}Fi.prototype.bind=function(){rr.bindBuffer(this.type,this.buffer)},Fi.prototype.destroy=function(){xs(this)};var Ao=[];function To(xi,ga){var Fa=Ao.pop();return Fa||(Fa=new Fi(xi)),Fa.bind(),qs(Fa,ga,Fo,0,1,!1),Fa}function Eo(xi){Ao.push(xi)}function qo(xi,ga,Fa){xi.byteLength=ga.byteLength,rr.bufferData(xi.type,ga,Fa)}function qs(xi,ga,Fa,so,Ua,vs){var Po;if(xi.usage=Fa,Array.isArray(ga)){if(xi.dtype=so||Hr,ga.length>0){var zs;if(Array.isArray(ga[0])){Po=Sa(ga);for(var Ha=1,Ra=1;Ra<Po.length;++Ra)Ha*=Po[Ra];xi.dimension=Ha,zs=Ka(ga,Po,xi.dtype),qo(xi,zs,Fa),vs?xi.persistentData=zs:ee.freeType(zs)}else if(typeof ga[0]=="number"){xi.dimension=Ua;var ls=ee.allocType(xi.dtype,ga.length);$n(ls,ga),qo(xi,ls,Fa),vs?xi.persistentData=ls:ee.freeType(ls)}else In(ga[0])&&(xi.dimension=ga[0].length,xi.dtype=so||Kr(ga[0])||Hr,zs=Ka(ga,[ga.length,ga[0].length],xi.dtype),qo(xi,zs,Fa),vs?xi.persistentData=zs:ee.freeType(zs))}}else if(In(ga))xi.dtype=so||Kr(ga),xi.dimension=Ua,qo(xi,ga,Fa),vs&&(xi.persistentData=new Uint8Array(new Uint8Array(ga.buffer)));else if(Gn(ga)){Po=ga.shape;var ua=ga.stride,Wo=ga.offset,Mo=0,Hs=0,au=0,ws=0;Po.length===1?(Mo=Po[0],Hs=1,au=ua[0],ws=0):Po.length===2&&(Mo=Po[0],Hs=Po[1],au=ua[0],ws=ua[1]),xi.dtype=so||Kr(ga.data)||Hr,xi.dimension=Hs;var Xs=ee.allocType(xi.dtype,Mo*Hs);Ai(Xs,ga.data,Mo,Hs,au,ws,Wo),qo(xi,Xs,Fa),vs?xi.persistentData=Xs:ee.freeType(Xs)}else ga instanceof ArrayBuffer&&(xi.dtype=an,xi.dimension=Ua,qo(xi,ga,Fa),vs&&(xi.persistentData=new Uint8Array(new Uint8Array(ga))))}function xs(xi){mn.bufferCount--,ia(xi);var ga=xi.buffer;rr.deleteBuffer(ga),xi.buffer=null,delete zi[xi.id]}function Uo(xi,ga,Fa,so){mn.bufferCount++;var Ua=new Fi(ga);zi[Ua.id]=Ua;function vs(Ha){var Ra=no,ls=null,ua=0,Wo=0,Mo=1;return Array.isArray(Ha)||In(Ha)||Gn(Ha)||Ha instanceof ArrayBuffer?ls=Ha:typeof Ha=="number"?ua=Ha|0:Ha&&("data"in Ha&&(ls=Ha.data),"usage"in Ha&&(Ra=Aa[Ha.usage]),"type"in Ha&&(Wo=Wi[Ha.type]),"dimension"in Ha&&(Mo=Ha.dimension|0),"length"in Ha&&(ua=Ha.length|0)),Ua.bind(),ls?qs(Ua,ls,Ra,Wo,Mo,so):(ua&&rr.bufferData(Ua.type,ua,Ra),Ua.dtype=Wo||an,Ua.usage=Ra,Ua.dimension=Mo,Ua.byteLength=ua),En.profile&&(Ua.stats.size=Ua.byteLength*nn[Ua.dtype]),vs}function Po(Ha,Ra){rr.bufferSubData(Ua.type,Ra,Ha)}function zs(Ha,Ra){var ls=(Ra||0)|0,ua;if(Ua.bind(),In(Ha)||Ha instanceof ArrayBuffer)Po(Ha,ls);else if(Array.isArray(Ha)){if(Ha.length>0){if(typeof Ha[0]=="number"){var Wo=ee.allocType(Ua.dtype,Ha.length);$n(Wo,Ha),Po(Wo,ls),ee.freeType(Wo)}else if(Array.isArray(Ha[0])||In(Ha[0])){ua=Sa(Ha);var Mo=Ka(Ha,ua,Ua.dtype);Po(Mo,ls),ee.freeType(Mo)}}}else if(Gn(Ha)){ua=Ha.shape;var Hs=Ha.stride,au=0,ws=0,Xs=0,jo=0;ua.length===1?(au=ua[0],ws=1,Xs=Hs[0],jo=0):ua.length===2&&(au=ua[0],ws=ua[1],Xs=Hs[0],jo=Hs[1]);var Jl=Array.isArray(Ha.data)?Ua.dtype:Kr(Ha.data),Mu=ee.allocType(Jl,au*ws);Ai(Mu,Ha.data,au,ws,Xs,jo,Ha.offset),Po(Mu,ls),ee.freeType(Mu)}return vs}return Fa||vs(xi),vs._reglType="buffer",vs._buffer=Ua,vs.subdata=zs,En.profile&&(vs.stats=Ua.stats),vs.destroy=function(){xs(Ua)},vs}function io(){mr(zi).forEach(function(xi){xi.buffer=rr.createBuffer(),rr.bindBuffer(xi.type,xi.buffer),rr.bufferData(xi.type,xi.persistentData||xi.byteLength,xi.usage)})}return En.profile&&(mn.getTotalBufferSize=function(){var xi=0;return Object.keys(zi).forEach(function(ga){xi+=zi[ga].stats.size}),xi}),{create:Uo,createStream:To,destroyStream:Eo,clear:function(){mr(zi).forEach(xs),Ao.forEach(xs)},getBuffer:function(xi){return xi&&xi._buffer instanceof Fi?xi._buffer:null},restore:io,_initBuffer:qs}}var Ci=0,Ta=0,Na=1,ro=1,oo=4,xo=4,vr={points:Ci,point:Ta,lines:Na,line:ro,triangles:oo,triangle:xo,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},er=0,si=1,ei=4,Kn=5120,qn=5121,pi=5122,_i=5123,fi=5124,Ri=5125,$i=34963,Hi=35040,wr=35044;function gn(rr,mn,En,ia){var Wa={},zi=0,Fi={uint8:qn,uint16:_i};mn.oes_element_index_uint&&(Fi.uint32=Ri);function Ao(io){this.id=zi++,Wa[this.id]=this,this.buffer=io,this.primType=ei,this.vertCount=0,this.type=0}Ao.prototype.bind=function(){this.buffer.bind()};var To=[];function Eo(io){var xi=To.pop();return xi||(xi=new Ao(En.create(null,$i,!0,!1)._buffer)),qs(xi,io,Hi,-1,-1,0,0),xi}function qo(io){To.push(io)}function qs(io,xi,ga,Fa,so,Ua,vs){io.buffer.bind();var Po;if(xi){var zs=vs;!vs&&(!In(xi)||Gn(xi)&&!In(xi.data))&&(zs=mn.oes_element_index_uint?Ri:_i),En._initBuffer(io.buffer,xi,ga,zs,3)}else rr.bufferData($i,Ua,ga),io.buffer.dtype=Po||qn,io.buffer.usage=ga,io.buffer.dimension=3,io.buffer.byteLength=Ua;if(Po=vs,!vs){switch(io.buffer.dtype){case qn:case Kn:Po=qn;break;case _i:case pi:Po=_i;break;case Ri:case fi:Po=Ri;break}io.buffer.dtype=Po}io.type=Po;var Ha=so;Ha<0&&(Ha=io.buffer.byteLength,Po===_i?Ha>>=1:Po===Ri&&(Ha>>=2)),io.vertCount=Ha;var Ra=Fa;if(Fa<0){Ra=ei;var ls=io.buffer.dimension;ls===1&&(Ra=er),ls===2&&(Ra=si),ls===3&&(Ra=ei)}io.primType=Ra}function xs(io){ia.elementsCount--,delete Wa[io.id],io.buffer.destroy(),io.buffer=null}function Uo(io,xi){var ga=En.create(null,$i,!0),Fa=new Ao(ga._buffer);ia.elementsCount++;function so(Ua){if(!Ua)ga(),Fa.primType=ei,Fa.vertCount=0,Fa.type=qn;else if(typeof Ua=="number")ga(Ua),Fa.primType=ei,Fa.vertCount=Ua|0,Fa.type=qn;else{var vs=null,Po=wr,zs=-1,Ha=-1,Ra=0,ls=0;Array.isArray(Ua)||In(Ua)||Gn(Ua)?vs=Ua:("data"in Ua&&(vs=Ua.data),"usage"in Ua&&(Po=Aa[Ua.usage]),"primitive"in Ua&&(zs=vr[Ua.primitive]),"count"in Ua&&(Ha=Ua.count|0),"type"in Ua&&(ls=Fi[Ua.type]),"length"in Ua?Ra=Ua.length|0:(Ra=Ha,ls===_i||ls===pi?Ra*=2:(ls===Ri||ls===fi)&&(Ra*=4))),qs(Fa,vs,Po,zs,Ha,Ra,ls)}return so}return so(io),so._reglType="elements",so._elements=Fa,so.subdata=function(Ua,vs){return ga.subdata(Ua,vs),so},so.destroy=function(){xs(Fa)},so}return{create:Uo,createStream:Eo,destroyStream:qo,getElements:function(io){return typeof io=="function"&&io._elements instanceof Ao?io._elements:null},clear:function(){mr(Wa).forEach(xs)}}}var Xn=new Float32Array(1),Yi=new Uint32Array(Xn.buffer),ha=5123;function Ca(rr){for(var mn=ee.allocType(ha,rr.length),En=0;En<rr.length;++En)if(isNaN(rr[En]))mn[En]=65535;else if(rr[En]===1/0)mn[En]=31744;else if(rr[En]===-1/0)mn[En]=64512;else{Xn[0]=rr[En];var ia=Yi[0],Wa=ia>>>31<<15,zi=(ia<<1>>>24)-127,Fi=ia>>13&1023;if(zi<-24)mn[En]=Wa;else if(zi<-14){var Ao=-14-zi;mn[En]=Wa+(Fi+1024>>Ao)}else zi>15?mn[En]=Wa+31744:mn[En]=Wa+(zi+15<<10)+Fi}return mn}function Ba(rr){return Array.isArray(rr)||In(rr)}var ji=34467,Ea=3553,cs=34067,No=34069,Vs=6408,pl=6406,kl=6407,El=6409,iu=6410,bu=32854,yl=32855,ql=36194,rc=32819,zc=32820,Pf=33635,ju=34042,Ql=6402,lu=34041,dc=35904,wc=35906,mc=36193,xu=33776,qu=33777,xf=33778,ed=33779,Df=35986,Sc=35987,Qo=34798,Sl=35840,gd=35841,$f=35842,wu=35843,Ad=36196,Bc=5121,uf=5123,Cd=5125,Tl=5126,Xu=10242,pu=10243,Zc=10497,Md=33071,uu=33648,Lf=10240,op=10241,zd=9728,Qp=9729,hh=9984,td=9985,ev=9986,Um=9987,Hm=33170,om=4352,K0=4353,o1=4354,Of=34046,xm=3317,J0=37440,wp=37441,sp=37443,Sp=37444,sm=33984,yd=[hh,ev,td,Um],lp=[0,El,iu,kl,Vs],Uc={};Uc[El]=Uc[pl]=Uc[Ql]=1,Uc[lu]=Uc[iu]=2,Uc[kl]=Uc[dc]=3,Uc[Vs]=Uc[wc]=4;function zf(rr){return"[object "+rr+"]"}var jm=zf("HTMLCanvasElement"),hv=zf("OffscreenCanvas"),og=zf("CanvasRenderingContext2D"),Bd=zf("ImageBitmap"),z1=zf("HTMLImageElement"),Oc=zf("HTMLVideoElement"),pb=Object.keys(Nt).concat([jm,hv,og,Bd,z1,Oc]),mf=[];mf[Bc]=1,mf[Tl]=4,mf[mc]=2,mf[uf]=2,mf[Cd]=4;var mu=[];mu[bu]=2,mu[yl]=2,mu[ql]=2,mu[lu]=4,mu[xu]=.5,mu[qu]=.5,mu[xf]=1,mu[ed]=1,mu[Df]=.5,mu[Sc]=1,mu[Qo]=1,mu[Sl]=.5,mu[gd]=.25,mu[$f]=.5,mu[wu]=.25,mu[Ad]=.5;function Wg(rr){return Array.isArray(rr)&&(rr.length===0||typeof rr[0]=="number")}function lm(rr){if(!Array.isArray(rr))return!1;var mn=rr.length;return!(mn===0||!Ba(rr[0]))}function Hh(rr){return Object.prototype.toString.call(rr)}function Q0(rr){return Hh(rr)===jm}function sg(rr){return Hh(rr)===hv}function a0(rr){return Hh(rr)===og}function up(rr){return Hh(rr)===Bd}function s1(rr){return Hh(rr)===z1}function Ay(rr){return Hh(rr)===Oc}function o0(rr){if(!rr)return!1;var mn=Hh(rr);return pb.indexOf(mn)>=0?!0:Wg(rr)||lm(rr)||Gn(rr)}function lg(rr){return Nt[Object.prototype.toString.call(rr)]|0}function ey(rr,mn){var En=mn.length;switch(rr.type){case Bc:case uf:case Cd:case Tl:var ia=ee.allocType(rr.type,En);ia.set(mn),rr.data=ia;break;case mc:rr.data=Ca(mn);break}}function ty(rr,mn){return ee.allocType(rr.type===mc?Tl:rr.type,mn)}function um(rr,mn){rr.type===mc?(rr.data=Ca(mn),ee.freeType(mn)):rr.data=mn}function Cy(rr,mn,En,ia,Wa,zi){for(var Fi=rr.width,Ao=rr.height,To=rr.channels,Eo=Fi*Ao*To,qo=ty(rr,Eo),qs=0,xs=0;xs<Ao;++xs)for(var Uo=0;Uo<Fi;++Uo)for(var io=0;io<To;++io)qo[qs++]=mn[En*Uo+ia*xs+Wa*io+zi];um(rr,qo)}function Vm(rr,mn,En,ia,Wa,zi){var Fi;if(typeof mu[rr]<"u"?Fi=mu[rr]:Fi=Uc[rr]*mf[mn],zi&&(Fi*=6),Wa){for(var Ao=0,To=En;To>=1;)Ao+=Fi*To*To,To/=2;return Ao}else return Fi*En*ia}function _m(rr,mn,En,ia,Wa,zi,Fi){var Ao={"don't care":om,"dont care":om,nice:o1,fast:K0},To={repeat:Zc,clamp:Md,mirror:uu},Eo={nearest:zd,linear:Qp},qo=w({mipmap:Um,"nearest mipmap nearest":hh,"linear mipmap nearest":td,"nearest mipmap linear":ev,"linear mipmap linear":Um},Eo),qs={none:0,browser:Sp},xs={uint8:Bc,rgba4:rc,rgb565:Pf,"rgb5 a1":zc},Uo={alpha:pl,luminance:El,"luminance alpha":iu,rgb:kl,rgba:Vs,rgba4:bu,"rgb5 a1":yl,rgb565:ql},io={};mn.ext_srgb&&(Uo.srgb=dc,Uo.srgba=wc),mn.oes_texture_float&&(xs.float32=xs.float=Tl),mn.oes_texture_half_float&&(xs.float16=xs["half float"]=mc),mn.webgl_depth_texture&&(w(Uo,{depth:Ql,"depth stencil":lu}),w(xs,{uint16:uf,uint32:Cd,"depth stencil":ju})),mn.webgl_compressed_texture_s3tc&&w(io,{"rgb s3tc dxt1":xu,"rgba s3tc dxt1":qu,"rgba s3tc dxt3":xf,"rgba s3tc dxt5":ed}),mn.webgl_compressed_texture_atc&&w(io,{"rgb atc":Df,"rgba atc explicit alpha":Sc,"rgba atc interpolated alpha":Qo}),mn.webgl_compressed_texture_pvrtc&&w(io,{"rgb pvrtc 4bppv1":Sl,"rgb pvrtc 2bppv1":gd,"rgba pvrtc 4bppv1":$f,"rgba pvrtc 2bppv1":wu}),mn.webgl_compressed_texture_etc1&&(io["rgb etc1"]=Ad);var xi=Array.prototype.slice.call(rr.getParameter(ji));Object.keys(io).forEach(function(ne){var Fe=io[ne];xi.indexOf(Fe)>=0&&(Uo[ne]=Fe)});var ga=Object.keys(Uo);En.textureFormats=ga;var Fa=[];Object.keys(Uo).forEach(function(ne){var Fe=Uo[ne];Fa[Fe]=ne});var so=[];Object.keys(xs).forEach(function(ne){var Fe=xs[ne];so[Fe]=ne});var Ua=[];Object.keys(Eo).forEach(function(ne){var Fe=Eo[ne];Ua[Fe]=ne});var vs=[];Object.keys(qo).forEach(function(ne){var Fe=qo[ne];vs[Fe]=ne});var Po=[];Object.keys(To).forEach(function(ne){var Fe=To[ne];Po[Fe]=ne});var zs=ga.reduce(function(ne,Fe){var me=Uo[Fe];return me===El||me===pl||me===El||me===iu||me===Ql||me===lu||mn.ext_srgb&&(me===dc||me===wc)?ne[me]=me:me===yl||Fe.indexOf("rgba")>=0?ne[me]=Vs:ne[me]=kl,ne},{});function Ha(){this.internalformat=Vs,this.format=Vs,this.type=Bc,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=Sp,this.width=0,this.height=0,this.channels=0}function Ra(ne,Fe){ne.internalformat=Fe.internalformat,ne.format=Fe.format,ne.type=Fe.type,ne.compressed=Fe.compressed,ne.premultiplyAlpha=Fe.premultiplyAlpha,ne.flipY=Fe.flipY,ne.unpackAlignment=Fe.unpackAlignment,ne.colorSpace=Fe.colorSpace,ne.width=Fe.width,ne.height=Fe.height,ne.channels=Fe.channels}function ls(ne,Fe){if(!(typeof Fe!="object"||!Fe)){if("premultiplyAlpha"in Fe&&(ne.premultiplyAlpha=Fe.premultiplyAlpha),"flipY"in Fe&&(ne.flipY=Fe.flipY),"alignment"in Fe&&(ne.unpackAlignment=Fe.alignment),"colorSpace"in Fe&&(ne.colorSpace=qs[Fe.colorSpace]),"type"in Fe){var me=Fe.type;ne.type=xs[me]}var We=ne.width,At=ne.height,Yt=ne.channels,tr=!1;"shape"in Fe?(We=Fe.shape[0],At=Fe.shape[1],Fe.shape.length===3&&(Yt=Fe.shape[2],tr=!0)):("radius"in Fe&&(We=At=Fe.radius),"width"in Fe&&(We=Fe.width),"height"in Fe&&(At=Fe.height),"channels"in Fe&&(Yt=Fe.channels,tr=!0)),ne.width=We|0,ne.height=At|0,ne.channels=Yt|0;var Pt=!1;if("format"in Fe){var jt=Fe.format,hr=ne.internalformat=Uo[jt];ne.format=zs[hr],jt in xs&&("type"in Fe||(ne.type=xs[jt])),jt in io&&(ne.compressed=!0),Pt=!0}!tr&&Pt?ne.channels=Uc[ne.format]:tr&&!Pt&&ne.channels!==lp[ne.format]&&(ne.format=ne.internalformat=lp[ne.channels])}}function ua(ne){rr.pixelStorei(J0,ne.flipY),rr.pixelStorei(wp,ne.premultiplyAlpha),rr.pixelStorei(sp,ne.colorSpace),rr.pixelStorei(xm,ne.unpackAlignment)}function Wo(){Ha.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Mo(ne,Fe){var me=null;if(o0(Fe)?me=Fe:Fe&&(ls(ne,Fe),"x"in Fe&&(ne.xOffset=Fe.x|0),"y"in Fe&&(ne.yOffset=Fe.y|0),o0(Fe.data)&&(me=Fe.data)),Fe.copy){var We=Wa.viewportWidth,At=Wa.viewportHeight;ne.width=ne.width||We-ne.xOffset,ne.height=ne.height||At-ne.yOffset,ne.needsCopy=!0}else if(!me)ne.width=ne.width||1,ne.height=ne.height||1,ne.channels=ne.channels||4;else if(In(me))ne.channels=ne.channels||4,ne.data=me,!("type"in Fe)&&ne.type===Bc&&(ne.type=lg(me));else if(Wg(me))ne.channels=ne.channels||4,ey(ne,me),ne.alignment=1,ne.needsFree=!0;else if(Gn(me)){var Yt=me.data;!Array.isArray(Yt)&&ne.type===Bc&&(ne.type=lg(Yt));var tr=me.shape,Pt=me.stride,jt,hr,qr,zr,Gr,en;tr.length===3?(qr=tr[2],en=Pt[2]):(qr=1,en=1),jt=tr[0],hr=tr[1],zr=Pt[0],Gr=Pt[1],ne.alignment=1,ne.width=jt,ne.height=hr,ne.channels=qr,ne.format=ne.internalformat=lp[qr],ne.needsFree=!0,Cy(ne,Yt,zr,Gr,en,me.offset)}else if(Q0(me)||sg(me)||a0(me))Q0(me)||sg(me)?ne.element=me:ne.element=me.canvas,ne.width=ne.element.width,ne.height=ne.element.height,ne.channels=4;else if(up(me))ne.element=me,ne.width=me.width,ne.height=me.height,ne.channels=4;else if(s1(me))ne.element=me,ne.width=me.naturalWidth,ne.height=me.naturalHeight,ne.channels=4;else if(Ay(me))ne.element=me,ne.width=me.videoWidth,ne.height=me.videoHeight,ne.channels=4;else if(lm(me)){var Xr=ne.width||me[0].length,Rr=ne.height||me.length,jr=ne.channels;Ba(me[0][0])?jr=jr||me[0][0].length:jr=jr||1;for(var Br=St.shape(me),Bn=1,ui=0;ui<Br.length;++ui)Bn*=Br[ui];var Ii=ty(ne,Bn);St.flatten(me,Br,"",Ii),um(ne,Ii),ne.alignment=1,ne.width=Xr,ne.height=Rr,ne.channels=jr,ne.format=ne.internalformat=lp[jr],ne.needsFree=!0}ne.type===Tl||ne.type}function Hs(ne,Fe,me){var We=ne.element,At=ne.data,Yt=ne.internalformat,tr=ne.format,Pt=ne.type,jt=ne.width,hr=ne.height;ua(ne),We?rr.texImage2D(Fe,me,tr,tr,Pt,We):ne.compressed?rr.compressedTexImage2D(Fe,me,Yt,jt,hr,0,At):ne.needsCopy?(ia(),rr.copyTexImage2D(Fe,me,tr,ne.xOffset,ne.yOffset,jt,hr,0)):rr.texImage2D(Fe,me,tr,jt,hr,0,tr,Pt,At||null)}function au(ne,Fe,me,We,At){var Yt=ne.element,tr=ne.data,Pt=ne.internalformat,jt=ne.format,hr=ne.type,qr=ne.width,zr=ne.height;ua(ne),Yt?rr.texSubImage2D(Fe,At,me,We,jt,hr,Yt):ne.compressed?rr.compressedTexSubImage2D(Fe,At,me,We,Pt,qr,zr,tr):ne.needsCopy?(ia(),rr.copyTexSubImage2D(Fe,At,me,We,ne.xOffset,ne.yOffset,qr,zr)):rr.texSubImage2D(Fe,At,me,We,qr,zr,jt,hr,tr)}var ws=[];function Xs(){return ws.pop()||new Wo}function jo(ne){ne.needsFree&&ee.freeType(ne.data),Wo.call(ne),ws.push(ne)}function Jl(){Ha.call(this),this.genMipmaps=!1,this.mipmapHint=om,this.mipmask=0,this.images=Array(16)}function Mu(ne,Fe,me){var We=ne.images[0]=Xs();ne.mipmask=1,We.width=ne.width=Fe,We.height=ne.height=me,We.channels=ne.channels=4}function Fu(ne,Fe){var me=null;if(o0(Fe))me=ne.images[0]=Xs(),Ra(me,ne),Mo(me,Fe),ne.mipmask=1;else if(ls(ne,Fe),Array.isArray(Fe.mipmap))for(var We=Fe.mipmap,At=0;At<We.length;++At)me=ne.images[At]=Xs(),Ra(me,ne),me.width>>=At,me.height>>=At,Mo(me,We[At]),ne.mipmask|=1<<At;else me=ne.images[0]=Xs(),Ra(me,ne),Mo(me,Fe),ne.mipmask=1;Ra(ne,ne.images[0]),ne.compressed&&(ne.internalformat===xu||ne.internalformat===qu||ne.internalformat===xf||ne.internalformat)}function cf(ne,Fe){for(var me=ne.images,We=0;We<me.length;++We){if(!me[We])return;Hs(me[We],Fe,We)}}var zu=[];function mh(){var ne=zu.pop()||new Jl;Ha.call(ne),ne.mipmask=0;for(var Fe=0;Fe<16;++Fe)ne.images[Fe]=null;return ne}function Wc(ne){for(var Fe=ne.images,me=0;me<Fe.length;++me)Fe[me]&&jo(Fe[me]),Fe[me]=null;zu.push(ne)}function Zd(){this.minFilter=zd,this.magFilter=zd,this.wrapS=Md,this.wrapT=Md,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=om}function jh(ne,Fe){if("min"in Fe){var me=Fe.min;ne.minFilter=qo[me],yd.indexOf(ne.minFilter)>=0&&!("faces"in Fe)&&(ne.genMipmaps=!0)}if("mag"in Fe){var We=Fe.mag;ne.magFilter=Eo[We]}var At=ne.wrapS,Yt=ne.wrapT;if("wrap"in Fe){var tr=Fe.wrap;typeof tr=="string"?At=Yt=To[tr]:Array.isArray(tr)&&(At=To[tr[0]],Yt=To[tr[1]])}else{if("wrapS"in Fe){var Pt=Fe.wrapS;At=To[Pt]}if("wrapT"in Fe){var jt=Fe.wrapT;Yt=To[jt]}}if(ne.wrapS=At,ne.wrapT=Yt,"anisotropic"in Fe&&(Fe.anisotropic,ne.anisotropic=Fe.anisotropic),"mipmap"in Fe){var hr=!1;switch(typeof Fe.mipmap){case"string":ne.mipmapHint=Ao[Fe.mipmap],ne.genMipmaps=!0,hr=!0;break;case"boolean":hr=ne.genMipmaps=Fe.mipmap;break;case"object":ne.genMipmaps=!1,hr=!0;break}hr&&!("min"in Fe)&&(ne.minFilter=hh)}}function fp(ne,Fe){rr.texParameteri(Fe,op,ne.minFilter),rr.texParameteri(Fe,Lf,ne.magFilter),rr.texParameteri(Fe,Xu,ne.wrapS),rr.texParameteri(Fe,pu,ne.wrapT),mn.ext_texture_filter_anisotropic&&rr.texParameteri(Fe,Of,ne.anisotropic),ne.genMipmaps&&(rr.hint(Hm,ne.mipmapHint),rr.generateMipmap(Fe))}var Am=0,_d={},Hd=En.maxTextureUnits,Ol=Array(Hd).map(function(){return null});function dp(ne){Ha.call(this),this.mipmask=0,this.internalformat=Vs,this.id=Am++,this.refCount=1,this.target=ne,this.texture=rr.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new Zd,Fi.profile&&(this.stats={size:0})}function Fc(ne){rr.activeTexture(sm),rr.bindTexture(ne.target,ne.texture)}function Hf(){var ne=Ol[0];ne?rr.bindTexture(ne.target,ne.texture):rr.bindTexture(Ea,null)}function Fp(ne){var Fe=ne.texture,me=ne.unit,We=ne.target;me>=0&&(rr.activeTexture(sm+me),rr.bindTexture(We,null),Ol[me]=null),rr.deleteTexture(Fe),ne.texture=null,ne.params=null,ne.pixels=null,ne.refCount=0,delete _d[ne.id],zi.textureCount--}w(dp.prototype,{bind:function(){var ne=this;ne.bindCount+=1;var Fe=ne.unit;if(Fe<0){for(var me=0;me<Hd;++me){var We=Ol[me];if(We){if(We.bindCount>0)continue;We.unit=-1}Ol[me]=ne,Fe=me;break}Fi.profile&&zi.maxTextureUnits<Fe+1&&(zi.maxTextureUnits=Fe+1),ne.unit=Fe,rr.activeTexture(sm+Fe),rr.bindTexture(ne.target,ne.texture)}return Fe},unbind:function(){this.bindCount-=1},decRef:function(){--this.refCount<=0&&Fp(this)}});function zp(ne,Fe){var me=new dp(Ea);_d[me.id]=me,zi.textureCount++;function We(tr,Pt){var jt=me.texInfo;Zd.call(jt);var hr=mh();return typeof tr=="number"?typeof Pt=="number"?Mu(hr,tr|0,Pt|0):Mu(hr,tr|0,tr|0):tr?(jh(jt,tr),Fu(hr,tr)):Mu(hr,1,1),jt.genMipmaps&&(hr.mipmask=(hr.width<<1)-1),me.mipmask=hr.mipmask,Ra(me,hr),me.internalformat=hr.internalformat,We.width=hr.width,We.height=hr.height,Fc(me),cf(hr,Ea),fp(jt,Ea),Hf(),Wc(hr),Fi.profile&&(me.stats.size=Vm(me.internalformat,me.type,hr.width,hr.height,jt.genMipmaps,!1)),We.format=Fa[me.internalformat],We.type=so[me.type],We.mag=Ua[jt.magFilter],We.min=vs[jt.minFilter],We.wrapS=Po[jt.wrapS],We.wrapT=Po[jt.wrapT],We}function At(tr,Pt,jt,hr){var qr=Pt|0,zr=jt|0,Gr=hr|0,en=Xs();return Ra(en,me),en.width=0,en.height=0,Mo(en,tr),en.width=en.width||(me.width>>Gr)-qr,en.height=en.height||(me.height>>Gr)-zr,Fc(me),au(en,Ea,qr,zr,Gr),Hf(),jo(en),We}function Yt(tr,Pt){var jt=tr|0,hr=Pt|0||jt;if(jt===me.width&&hr===me.height)return We;We.width=me.width=jt,We.height=me.height=hr,Fc(me);for(var qr=0;me.mipmask>>qr;++qr){var zr=jt>>qr,Gr=hr>>qr;if(!zr||!Gr)break;rr.texImage2D(Ea,qr,me.format,zr,Gr,0,me.format,me.type,null)}return Hf(),Fi.profile&&(me.stats.size=Vm(me.internalformat,me.type,jt,hr,!1,!1)),We}return We(ne,Fe),We.subimage=At,We.resize=Yt,We._reglType="texture2d",We._texture=me,Fi.profile&&(We.stats=me.stats),We.destroy=function(){me.decRef()},We}function tu(ne,Fe,me,We,At,Yt){var tr=new dp(cs);_d[tr.id]=tr,zi.cubeCount++;var Pt=new Array(6);function jt(zr,Gr,en,Xr,Rr,jr){var Br,Bn=tr.texInfo;for(Zd.call(Bn),Br=0;Br<6;++Br)Pt[Br]=mh();if(typeof zr=="number"||!zr){var ui=zr|0||1;for(Br=0;Br<6;++Br)Mu(Pt[Br],ui,ui)}else if(typeof zr=="object")if(Gr)Fu(Pt[0],zr),Fu(Pt[1],Gr),Fu(Pt[2],en),Fu(Pt[3],Xr),Fu(Pt[4],Rr),Fu(Pt[5],jr);else if(jh(Bn,zr),ls(tr,zr),"faces"in zr){var Ii=zr.faces;for(Br=0;Br<6;++Br)Ra(Pt[Br],tr),Fu(Pt[Br],Ii[Br])}else for(Br=0;Br<6;++Br)Fu(Pt[Br],zr);for(Ra(tr,Pt[0]),Bn.genMipmaps?tr.mipmask=(Pt[0].width<<1)-1:tr.mipmask=Pt[0].mipmask,tr.internalformat=Pt[0].internalformat,jt.width=Pt[0].width,jt.height=Pt[0].height,Fc(tr),Br=0;Br<6;++Br)cf(Pt[Br],No+Br);for(fp(Bn,cs),Hf(),Fi.profile&&(tr.stats.size=Vm(tr.internalformat,tr.type,jt.width,jt.height,Bn.genMipmaps,!0)),jt.format=Fa[tr.internalformat],jt.type=so[tr.type],jt.mag=Ua[Bn.magFilter],jt.min=vs[Bn.minFilter],jt.wrapS=Po[Bn.wrapS],jt.wrapT=Po[Bn.wrapT],Br=0;Br<6;++Br)Wc(Pt[Br]);return jt}function hr(zr,Gr,en,Xr,Rr){var jr=en|0,Br=Xr|0,Bn=Rr|0,ui=Xs();return Ra(ui,tr),ui.width=0,ui.height=0,Mo(ui,Gr),ui.width=ui.width||(tr.width>>Bn)-jr,ui.height=ui.height||(tr.height>>Bn)-Br,Fc(tr),au(ui,No+zr,jr,Br,Bn),Hf(),jo(ui),jt}function qr(zr){var Gr=zr|0;if(Gr!==tr.width){jt.width=tr.width=Gr,jt.height=tr.height=Gr,Fc(tr);for(var en=0;en<6;++en)for(var Xr=0;tr.mipmask>>Xr;++Xr)rr.texImage2D(No+en,Xr,tr.format,Gr>>Xr,Gr>>Xr,0,tr.format,tr.type,null);return Hf(),Fi.profile&&(tr.stats.size=Vm(tr.internalformat,tr.type,jt.width,jt.height,!1,!0)),jt}}return jt(ne,Fe,me,We,At,Yt),jt.subimage=hr,jt.resize=qr,jt._reglType="textureCube",jt._texture=tr,Fi.profile&&(jt.stats=tr.stats),jt.destroy=function(){tr.decRef()},jt}function tc(){for(var ne=0;ne<Hd;++ne)rr.activeTexture(sm+ne),rr.bindTexture(Ea,null),Ol[ne]=null;mr(_d).forEach(Fp),zi.cubeCount=0,zi.textureCount=0}Fi.profile&&(zi.getTotalTextureSize=function(){var ne=0;return Object.keys(_d).forEach(function(Fe){ne+=_d[Fe].stats.size}),ne});function uc(){for(var ne=0;ne<Hd;++ne){var Fe=Ol[ne];Fe&&(Fe.bindCount=0,Fe.unit=-1,Ol[ne]=null)}mr(_d).forEach(function(me){me.texture=rr.createTexture(),rr.bindTexture(me.target,me.texture);for(var We=0;We<32;++We)if((me.mipmask&1<<We)!==0)if(me.target===Ea)rr.texImage2D(Ea,We,me.internalformat,me.width>>We,me.height>>We,0,me.internalformat,me.type,null);else for(var At=0;At<6;++At)rr.texImage2D(No+At,We,me.internalformat,me.width>>We,me.height>>We,0,me.internalformat,me.type,null);fp(me.texInfo,me.target)})}function Xe(){for(var ne=0;ne<Hd;++ne){var Fe=Ol[ne];Fe&&(Fe.bindCount=0,Fe.unit=-1,Ol[ne]=null),rr.activeTexture(sm+ne),rr.bindTexture(Ea,null),rr.bindTexture(cs,null)}}return{create2D:zp,createCube:tu,clear:tc,getTexture:function(ne){return null},restore:uc,refresh:Xe}}var cp=36161,Rg=32854,ry=32855,Wf=36194,E0=33189,B1=36168,My=34041,s0=35907,Ry=34836,Av=34842,ky=34843,uh=[];uh[Rg]=2,uh[ry]=2,uh[Wf]=2,uh[E0]=2,uh[B1]=1,uh[My]=4,uh[s0]=4,uh[Ry]=16,uh[Av]=8,uh[ky]=6;function Cv(rr,mn,En){return uh[rr]*mn*En}var ug=function(rr,mn,En,ia,Wa){var zi={rgba4:Rg,rgb565:Wf,"rgb5 a1":ry,depth:E0,stencil:B1,"depth stencil":My};mn.ext_srgb&&(zi.srgba=s0),mn.ext_color_buffer_half_float&&(zi.rgba16f=Av,zi.rgb16f=ky),mn.webgl_color_buffer_float&&(zi.rgba32f=Ry);var Fi=[];Object.keys(zi).forEach(function(Uo){var io=zi[Uo];Fi[io]=Uo});var Ao=0,To={};function Eo(Uo){this.id=Ao++,this.refCount=1,this.renderbuffer=Uo,this.format=Rg,this.width=0,this.height=0,Wa.profile&&(this.stats={size:0})}Eo.prototype.decRef=function(){--this.refCount<=0&&qo(this)};function qo(Uo){var io=Uo.renderbuffer;rr.bindRenderbuffer(cp,null),rr.deleteRenderbuffer(io),Uo.renderbuffer=null,Uo.refCount=0,delete To[Uo.id],ia.renderbufferCount--}function qs(Uo,io){var xi=new Eo(rr.createRenderbuffer());To[xi.id]=xi,ia.renderbufferCount++;function ga(so,Ua){var vs=0,Po=0,zs=Rg;if(typeof so=="object"&&so){var Ha=so;if("shape"in Ha){var Ra=Ha.shape;vs=Ra[0]|0,Po=Ra[1]|0}else"radius"in Ha&&(vs=Po=Ha.radius|0),"width"in Ha&&(vs=Ha.width|0),"height"in Ha&&(Po=Ha.height|0);"format"in Ha&&(zs=zi[Ha.format])}else typeof so=="number"?(vs=so|0,typeof Ua=="number"?Po=Ua|0:Po=vs):so||(vs=Po=1);if(!(vs===xi.width&&Po===xi.height&&zs===xi.format))return ga.width=xi.width=vs,ga.height=xi.height=Po,xi.format=zs,rr.bindRenderbuffer(cp,xi.renderbuffer),rr.renderbufferStorage(cp,zs,vs,Po),Wa.profile&&(xi.stats.size=Cv(xi.format,xi.width,xi.height)),ga.format=Fi[xi.format],ga}function Fa(so,Ua){var vs=so|0,Po=Ua|0||vs;return vs===xi.width&&Po===xi.height||(ga.width=xi.width=vs,ga.height=xi.height=Po,rr.bindRenderbuffer(cp,xi.renderbuffer),rr.renderbufferStorage(cp,xi.format,vs,Po),Wa.profile&&(xi.stats.size=Cv(xi.format,xi.width,xi.height))),ga}return ga(Uo,io),ga.resize=Fa,ga._reglType="renderbuffer",ga._renderbuffer=xi,Wa.profile&&(ga.stats=xi.stats),ga.destroy=function(){xi.decRef()},ga}Wa.profile&&(ia.getTotalRenderbufferSize=function(){var Uo=0;return Object.keys(To).forEach(function(io){Uo+=To[io].stats.size}),Uo});function xs(){mr(To).forEach(function(Uo){Uo.renderbuffer=rr.createRenderbuffer(),rr.bindRenderbuffer(cp,Uo.renderbuffer),rr.renderbufferStorage(cp,Uo.format,Uo.width,Uo.height)}),rr.bindRenderbuffer(cp,null)}return{create:qs,clear:function(){mr(To).forEach(qo)},restore:xs}},bd=36160,qm=36161,tv=3553,Mv=34069,Ud=36064,Yg=36096,wm=36128,cg=33306,A0=36053,U1=36193,Qb=5121,Xg=5126,C0=6407,Uv=6408,M0=[];M0[Uv]=4,M0[C0]=3;var Tp=[];Tp[Qb]=1,Tp[Xg]=4,Tp[U1]=2;function Zg(rr,mn,En,ia,Wa,zi){var Fi={cur:null,next:null,dirty:!1,setFBO:null},Ao=["rgba"],To=["rgba4","rgb565","rgb5 a1"];mn.ext_srgb&&To.push("srgba"),mn.ext_color_buffer_half_float&&To.push("rgba16f","rgb16f"),mn.webgl_color_buffer_float&&To.push("rgba32f"),mn.oes_texture_half_float,mn.oes_texture_float;function Eo(ua,Wo,Mo){this.target=ua,this.texture=Wo,this.renderbuffer=Mo;var Hs=0,au=0;Wo?(Hs=Wo.width,au=Wo.height):Mo&&(Hs=Mo.width,au=Mo.height),this.width=Hs,this.height=au}function qo(ua){ua&&(ua.texture&&ua.texture._texture.decRef(),ua.renderbuffer&&ua.renderbuffer._renderbuffer.decRef())}function qs(ua,Wo,Mo){if(ua)if(ua.texture){var Hs=ua.texture._texture;Math.max(1,Hs.width),Math.max(1,Hs.height),Hs.refCount+=1}else{var au=ua.renderbuffer._renderbuffer;au.refCount+=1}}function xs(ua,Wo){Wo&&(Wo.texture?rr.framebufferTexture2D(bd,ua,Wo.target,Wo.texture._texture.texture,0):rr.framebufferRenderbuffer(bd,ua,qm,Wo.renderbuffer._renderbuffer.renderbuffer))}function Uo(ua){var Wo=tv,Mo=null,Hs=null,au=ua;typeof ua=="object"&&(au=ua.data,"target"in ua&&(Wo=ua.target|0));var ws=au._reglType;return ws==="texture2d"||ws==="textureCube"?Mo=au:ws==="renderbuffer"&&(Hs=au,Wo=qm),new Eo(Wo,Mo,Hs)}function io(ua,Wo,Mo,Hs,au){if(Mo){var ws=ia.create2D({width:ua,height:Wo,format:Hs,type:au});return ws._texture.refCount=0,new Eo(tv,ws,null)}else{var Xs=Wa.create({width:ua,height:Wo,format:Hs});return Xs._renderbuffer.refCount=0,new Eo(qm,null,Xs)}}function xi(ua){return ua&&(ua.texture||ua.renderbuffer)}function ga(ua,Wo,Mo){ua&&(ua.texture?ua.texture.resize(Wo,Mo):ua.renderbuffer&&ua.renderbuffer.resize(Wo,Mo),ua.width=Wo,ua.height=Mo)}var Fa=0,so={};function Ua(){this.id=Fa++,so[this.id]=this,this.framebuffer=rr.createFramebuffer(),this.width=0,this.height=0,this.colorAttachments=[],this.depthAttachment=null,this.stencilAttachment=null,this.depthStencilAttachment=null}function vs(ua){ua.colorAttachments.forEach(qo),qo(ua.depthAttachment),qo(ua.stencilAttachment),qo(ua.depthStencilAttachment)}function Po(ua){var Wo=ua.framebuffer;rr.deleteFramebuffer(Wo),ua.framebuffer=null,zi.framebufferCount--,delete so[ua.id]}function zs(ua){var Wo;rr.bindFramebuffer(bd,ua.framebuffer);var Mo=ua.colorAttachments;for(Wo=0;Wo<Mo.length;++Wo)xs(Ud+Wo,Mo[Wo]);for(Wo=Mo.length;Wo<En.maxColorAttachments;++Wo)rr.framebufferTexture2D(bd,Ud+Wo,tv,null,0);rr.framebufferTexture2D(bd,cg,tv,null,0),rr.framebufferTexture2D(bd,Yg,tv,null,0),rr.framebufferTexture2D(bd,wm,tv,null,0),xs(Yg,ua.depthAttachment),xs(wm,ua.stencilAttachment),xs(cg,ua.depthStencilAttachment);var Hs=rr.checkFramebufferStatus(bd);rr.isContextLost(),rr.bindFramebuffer(bd,Fi.next?Fi.next.framebuffer:null),Fi.cur=Fi.next,rr.getError()}function Ha(ua,Wo){var Mo=new Ua;zi.framebufferCount++;function Hs(ws,Xs){var jo,Jl=0,Mu=0,Fu=!0,cf=!0,zu=null,mh=!0,Wc="rgba",Zd="uint8",jh=1,fp=null,Am=null,_d=null,Hd=!1;if(typeof ws=="number")Jl=ws|0,Mu=Xs|0||Jl;else if(!ws)Jl=Mu=1;else{var Ol=ws;if("shape"in Ol){var dp=Ol.shape;Jl=dp[0],Mu=dp[1]}else"radius"in Ol&&(Jl=Mu=Ol.radius),"width"in Ol&&(Jl=Ol.width),"height"in Ol&&(Mu=Ol.height);("color"in Ol||"colors"in Ol)&&(zu=Ol.color||Ol.colors),zu||("colorCount"in Ol&&(jh=Ol.colorCount|0),"colorTexture"in Ol&&(mh=!!Ol.colorTexture,Wc="rgba4"),"colorType"in Ol&&(Zd=Ol.colorType,mh||(Zd==="half float"||Zd==="float16"?Wc="rgba16f":(Zd==="float"||Zd==="float32")&&(Wc="rgba32f"))),"colorFormat"in Ol&&(Wc=Ol.colorFormat,Ao.indexOf(Wc)>=0?mh=!0:To.indexOf(Wc)>=0&&(mh=!1))),("depthTexture"in Ol||"depthStencilTexture"in Ol)&&(Hd=!!(Ol.depthTexture||Ol.depthStencilTexture)),"depth"in Ol&&(typeof Ol.depth=="boolean"?Fu=Ol.depth:(fp=Ol.depth,cf=!1)),"stencil"in Ol&&(typeof Ol.stencil=="boolean"?cf=Ol.stencil:(Am=Ol.stencil,Fu=!1)),"depthStencil"in Ol&&(typeof Ol.depthStencil=="boolean"?Fu=cf=Ol.depthStencil:(_d=Ol.depthStencil,Fu=!1,cf=!1))}var Fc=null,Hf=null,Fp=null,zp=null;if(Array.isArray(zu))Fc=zu.map(Uo);else if(zu)Fc=[Uo(zu)];else for(Fc=new Array(jh),jo=0;jo<jh;++jo)Fc[jo]=io(Jl,Mu,mh,Wc,Zd);for(Jl=Jl||Fc[0].width,Mu=Mu||Fc[0].height,fp?Hf=Uo(fp):Fu&&!cf&&(Hf=io(Jl,Mu,Hd,"depth","uint32")),Am?Fp=Uo(Am):cf&&!Fu&&(Fp=io(Jl,Mu,!1,"stencil","uint8")),_d?zp=Uo(_d):!fp&&!Am&&cf&&Fu&&(zp=io(Jl,Mu,Hd,"depth stencil","depth stencil")),jo=0;jo<Fc.length;++jo)qs(Fc[jo]),Fc[jo]&&Fc[jo].texture&&M0[Fc[jo].texture._texture.format]*Tp[Fc[jo].texture._texture.type];return qs(Hf),qs(Fp),qs(zp),vs(Mo),Mo.width=Jl,Mo.height=Mu,Mo.colorAttachments=Fc,Mo.depthAttachment=Hf,Mo.stencilAttachment=Fp,Mo.depthStencilAttachment=zp,Hs.color=Fc.map(xi),Hs.depth=xi(Hf),Hs.stencil=xi(Fp),Hs.depthStencil=xi(zp),Hs.width=Mo.width,Hs.height=Mo.height,zs(Mo),Hs}function au(ws,Xs){var jo=Math.max(ws|0,1),Jl=Math.max(Xs|0||jo,1);if(jo===Mo.width&&Jl===Mo.height)return Hs;for(var Mu=Mo.colorAttachments,Fu=0;Fu<Mu.length;++Fu)ga(Mu[Fu],jo,Jl);return ga(Mo.depthAttachment,jo,Jl),ga(Mo.stencilAttachment,jo,Jl),ga(Mo.depthStencilAttachment,jo,Jl),Mo.width=Hs.width=jo,Mo.height=Hs.height=Jl,zs(Mo),Hs}return Hs(ua,Wo),w(Hs,{resize:au,_reglType:"framebuffer",_framebuffer:Mo,destroy:function(){Po(Mo),vs(Mo)},use:function(ws){Fi.setFBO({framebuffer:Hs},ws)}})}function Ra(ua){var Wo=Array(6);function Mo(au){var ws,Xs={color:null},jo=0,Jl=null,Mu="rgba",Fu="uint8",cf=1;if(typeof au=="number")jo=au|0;else if(!au)jo=1;else{var zu=au;if("shape"in zu){var mh=zu.shape;jo=mh[0]}else"radius"in zu&&(jo=zu.radius|0),"width"in zu?jo=zu.width|0:"height"in zu&&(jo=zu.height|0);("color"in zu||"colors"in zu)&&(Jl=zu.color||zu.colors),Jl||("colorCount"in zu&&(cf=zu.colorCount|0),"colorType"in zu&&(Fu=zu.colorType),"colorFormat"in zu&&(Mu=zu.colorFormat)),"depth"in zu&&(Xs.depth=zu.depth),"stencil"in zu&&(Xs.stencil=zu.stencil),"depthStencil"in zu&&(Xs.depthStencil=zu.depthStencil)}var Wc;if(Jl)if(Array.isArray(Jl))for(Wc=[],ws=0;ws<Jl.length;++ws)Wc[ws]=Jl[ws];else Wc=[Jl];else{Wc=Array(cf);var Zd={radius:jo,format:Mu,type:Fu};for(ws=0;ws<cf;++ws)Wc[ws]=ia.createCube(Zd)}for(Xs.color=Array(Wc.length),ws=0;ws<Wc.length;++ws){var jh=Wc[ws];jo=jo||jh.width,Xs.color[ws]={target:Mv,data:Wc[ws]}}for(ws=0;ws<6;++ws){for(var fp=0;fp<Wc.length;++fp)Xs.color[fp].target=Mv+ws;ws>0&&(Xs.depth=Wo[0].depth,Xs.stencil=Wo[0].stencil,Xs.depthStencil=Wo[0].depthStencil),Wo[ws]?Wo[ws](Xs):Wo[ws]=Ha(Xs)}return w(Mo,{width:jo,height:jo,color:Wc})}function Hs(au){var ws,Xs=au|0;if(Xs===Mo.width)return Mo;var jo=Mo.color;for(ws=0;ws<jo.length;++ws)jo[ws].resize(Xs);for(ws=0;ws<6;++ws)Wo[ws].resize(Xs);return Mo.width=Mo.height=Xs,Mo}return Mo(ua),w(Mo,{faces:Wo,resize:Hs,_reglType:"framebufferCube",destroy:function(){Wo.forEach(function(au){au.destroy()})}})}function ls(){Fi.cur=null,Fi.next=null,Fi.dirty=!0,mr(so).forEach(function(ua){ua.framebuffer=rr.createFramebuffer(),zs(ua)})}return w(Fi,{getFramebuffer:function(ua){if(typeof ua=="function"&&ua._reglType==="framebuffer"){var Wo=ua._framebuffer;if(Wo instanceof Ua)return Wo}return null},create:Ha,createCube:Ra,clear:function(){mr(so).forEach(Po)},restore:ls})}var Iy=5126,Kg=34962,Rd=34963;function Rv(){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=Iy,this.offset=0,this.stride=0,this.divisor=0}function cm(rr,mn,En,ia,Wa,zi,Fi){for(var Ao=En.maxAttributes,To=new Array(Ao),Eo=0;Eo<Ao;++Eo)To[Eo]=new Rv;var qo=0,qs={},xs={Record:Rv,scope:{},state:To,currentVAO:null,targetVAO:null,restore:io()?Po:function(){},createVAO:zs,getVAO:ga,destroyBuffer:Uo,setVAO:io()?Fa:so,clear:io()?Ua:function(){}};function Uo(Ha){for(var Ra=0;Ra<To.length;++Ra){var ls=To[Ra];ls.buffer===Ha&&(rr.disableVertexAttribArray(Ra),ls.buffer=null)}}function io(){return mn.oes_vertex_array_object}function xi(){return mn.angle_instanced_arrays}function ga(Ha){return typeof Ha=="function"&&Ha._vao?Ha._vao:null}function Fa(Ha){if(Ha!==xs.currentVAO){var Ra=io();Ha?Ra.bindVertexArrayOES(Ha.vao):Ra.bindVertexArrayOES(null),xs.currentVAO=Ha}}function so(Ha){if(Ha!==xs.currentVAO){if(Ha)Ha.bindAttrs();else{for(var Ra=xi(),ls=0;ls<To.length;++ls){var ua=To[ls];ua.buffer?(rr.enableVertexAttribArray(ls),ua.buffer.bind(),rr.vertexAttribPointer(ls,ua.size,ua.type,ua.normalized,ua.stride,ua.offfset),Ra&&ua.divisor&&Ra.vertexAttribDivisorANGLE(ls,ua.divisor)):(rr.disableVertexAttribArray(ls),rr.vertexAttrib4f(ls,ua.x,ua.y,ua.z,ua.w))}Fi.elements?rr.bindBuffer(Rd,Fi.elements.buffer.buffer):rr.bindBuffer(Rd,null)}xs.currentVAO=Ha}}function Ua(){mr(qs).forEach(function(Ha){Ha.destroy()})}function vs(){this.id=++qo,this.attributes=[],this.elements=null,this.ownsElements=!1,this.count=0,this.offset=0,this.instances=-1,this.primitive=4;var Ha=io();Ha?this.vao=Ha.createVertexArrayOES():this.vao=null,qs[this.id]=this,this.buffers=[]}vs.prototype.bindAttrs=function(){for(var Ha=xi(),Ra=this.attributes,ls=0;ls<Ra.length;++ls){var ua=Ra[ls];ua.buffer?(rr.enableVertexAttribArray(ls),rr.bindBuffer(Kg,ua.buffer.buffer),rr.vertexAttribPointer(ls,ua.size,ua.type,ua.normalized,ua.stride,ua.offset),Ha&&ua.divisor&&Ha.vertexAttribDivisorANGLE(ls,ua.divisor)):(rr.disableVertexAttribArray(ls),rr.vertexAttrib4f(ls,ua.x,ua.y,ua.z,ua.w))}for(var Wo=Ra.length;Wo<Ao;++Wo)rr.disableVertexAttribArray(Wo);var Mo=zi.getElements(this.elements);Mo?rr.bindBuffer(Rd,Mo.buffer.buffer):rr.bindBuffer(Rd,null)},vs.prototype.refresh=function(){var Ha=io();Ha&&(Ha.bindVertexArrayOES(this.vao),this.bindAttrs(),xs.currentVAO=null,Ha.bindVertexArrayOES(null))},vs.prototype.destroy=function(){if(this.vao){var Ha=io();this===xs.currentVAO&&(xs.currentVAO=null,Ha.bindVertexArrayOES(null)),Ha.deleteVertexArrayOES(this.vao),this.vao=null}this.ownsElements&&(this.elements.destroy(),this.elements=null,this.ownsElements=!1),qs[this.id]&&(delete qs[this.id],ia.vaoCount-=1)};function Po(){var Ha=io();Ha&&mr(qs).forEach(function(Ra){Ra.refresh()})}function zs(Ha){var Ra=new vs;ia.vaoCount+=1;function ls(ua){var Wo;if(Array.isArray(ua))Wo=ua,Ra.elements&&Ra.ownsElements&&Ra.elements.destroy(),Ra.elements=null,Ra.ownsElements=!1,Ra.offset=0,Ra.count=0,Ra.instances=-1,Ra.primitive=4;else{if(ua.elements){var Mo=ua.elements;Ra.ownsElements?typeof Mo=="function"&&Mo._reglType==="elements"?(Ra.elements.destroy(),Ra.ownsElements=!1):(Ra.elements(Mo),Ra.ownsElements=!1):zi.getElements(ua.elements)?(Ra.elements=ua.elements,Ra.ownsElements=!1):(Ra.elements=zi.create(ua.elements),Ra.ownsElements=!0)}else Ra.elements=null,Ra.ownsElements=!1;Wo=ua.attributes,Ra.offset=0,Ra.count=-1,Ra.instances=-1,Ra.primitive=4,Ra.elements&&(Ra.count=Ra.elements._elements.vertCount,Ra.primitive=Ra.elements._elements.primType),"offset"in ua&&(Ra.offset=ua.offset|0),"count"in ua&&(Ra.count=ua.count|0),"instances"in ua&&(Ra.instances=ua.instances|0),"primitive"in ua&&(Ra.primitive=vr[ua.primitive])}var Hs={},au=Ra.attributes;au.length=Wo.length;for(var ws=0;ws<Wo.length;++ws){var Xs=Wo[ws],jo=au[ws]=new Rv,Jl=Xs.data||Xs;if(Array.isArray(Jl)||In(Jl)||Gn(Jl)){var Mu;Ra.buffers[ws]&&(Mu=Ra.buffers[ws],In(Jl)&&Mu._buffer.byteLength>=Jl.byteLength?Mu.subdata(Jl):(Mu.destroy(),Ra.buffers[ws]=null)),Ra.buffers[ws]||(Mu=Ra.buffers[ws]=Wa.create(Xs,Kg,!1,!0)),jo.buffer=Wa.getBuffer(Mu),jo.size=jo.buffer.dimension|0,jo.normalized=!1,jo.type=jo.buffer.dtype,jo.offset=0,jo.stride=0,jo.divisor=0,jo.state=1,Hs[ws]=1}else Wa.getBuffer(Xs)?(jo.buffer=Wa.getBuffer(Xs),jo.size=jo.buffer.dimension|0,jo.normalized=!1,jo.type=jo.buffer.dtype,jo.offset=0,jo.stride=0,jo.divisor=0,jo.state=1):Wa.getBuffer(Xs.buffer)?(jo.buffer=Wa.getBuffer(Xs.buffer),jo.size=(+Xs.size||jo.buffer.dimension)|0,jo.normalized=!!Xs.normalized||!1,"type"in Xs?jo.type=Wi[Xs.type]:jo.type=jo.buffer.dtype,jo.offset=(Xs.offset||0)|0,jo.stride=(Xs.stride||0)|0,jo.divisor=(Xs.divisor||0)|0,jo.state=1):"x"in Xs&&(jo.x=+Xs.x||0,jo.y=+Xs.y||0,jo.z=+Xs.z||0,jo.w=+Xs.w||0,jo.state=2)}for(var Fu=0;Fu<Ra.buffers.length;++Fu)!Hs[Fu]&&Ra.buffers[Fu]&&(Ra.buffers[Fu].destroy(),Ra.buffers[Fu]=null);return Ra.refresh(),ls}return ls.destroy=function(){for(var ua=0;ua<Ra.buffers.length;++ua)Ra.buffers[ua]&&Ra.buffers[ua].destroy();Ra.buffers.length=0,Ra.ownsElements&&(Ra.elements.destroy(),Ra.elements=null,Ra.ownsElements=!1),Ra.destroy()},ls._vao=Ra,ls._reglType="vao",ls(Ha)}return xs}var ny=35632,Ld=35633,l0=35718,fg=35721;function Hv(rr,mn,En,ia){var Wa={},zi={};function Fi(xi,ga,Fa,so){this.name=xi,this.id=ga,this.location=Fa,this.info=so}function Ao(xi,ga){for(var Fa=0;Fa<xi.length;++Fa)if(xi[Fa].id===ga.id){xi[Fa].location=ga.location;return}xi.push(ga)}function To(xi,ga,Fa){var so=xi===ny?Wa:zi,Ua=so[ga];if(!Ua){var vs=mn.str(ga);Ua=rr.createShader(xi),rr.shaderSource(Ua,vs),rr.compileShader(Ua),so[ga]=Ua}return Ua}var Eo={},qo=[],qs=0;function xs(xi,ga){this.id=qs++,this.fragId=xi,this.vertId=ga,this.program=null,this.uniforms=[],this.attributes=[],this.refCount=1,ia.profile&&(this.stats={uniformsCount:0,attributesCount:0})}function Uo(xi,ga,Fa){var so,Ua,vs=To(ny,xi.fragId),Po=To(Ld,xi.vertId),zs=xi.program=rr.createProgram();if(rr.attachShader(zs,vs),rr.attachShader(zs,Po),Fa)for(so=0;so<Fa.length;++so){var Ha=Fa[so];rr.bindAttribLocation(zs,Ha[0],Ha[1])}rr.linkProgram(zs);var Ra=rr.getProgramParameter(zs,l0);ia.profile&&(xi.stats.uniformsCount=Ra);var ls=xi.uniforms;for(so=0;so<Ra;++so)if(Ua=rr.getActiveUniform(zs,so),Ua)if(Ua.size>1)for(var ua=0;ua<Ua.size;++ua){var Wo=Ua.name.replace("[0]","["+ua+"]");Ao(ls,new Fi(Wo,mn.id(Wo),rr.getUniformLocation(zs,Wo),Ua))}else Ao(ls,new Fi(Ua.name,mn.id(Ua.name),rr.getUniformLocation(zs,Ua.name),Ua));var Mo=rr.getProgramParameter(zs,fg);ia.profile&&(xi.stats.attributesCount=Mo);var Hs=xi.attributes;for(so=0;so<Mo;++so)Ua=rr.getActiveAttrib(zs,so),Ua&&Ao(Hs,new Fi(Ua.name,mn.id(Ua.name),rr.getAttribLocation(zs,Ua.name),Ua))}ia.profile&&(En.getMaxUniformsCount=function(){var xi=0;return qo.forEach(function(ga){ga.stats.uniformsCount>xi&&(xi=ga.stats.uniformsCount)}),xi},En.getMaxAttributesCount=function(){var xi=0;return qo.forEach(function(ga){ga.stats.attributesCount>xi&&(xi=ga.stats.attributesCount)}),xi});function io(){Wa={},zi={};for(var xi=0;xi<qo.length;++xi)Uo(qo[xi],null,qo[xi].attributes.map(function(ga){return[ga.location,ga.name]}))}return{clear:function(){var xi=rr.deleteShader.bind(rr);mr(Wa).forEach(xi),Wa={},mr(zi).forEach(xi),zi={},qo.forEach(function(ga){rr.deleteProgram(ga.program)}),qo.length=0,Eo={},En.shaderCount=0},program:function(xi,ga,Fa,so){var Ua=Eo[ga];Ua||(Ua=Eo[ga]={});var vs=Ua[xi];if(vs&&(vs.refCount++,!so))return vs;var Po=new xs(ga,xi);return En.shaderCount++,Uo(Po,Fa,so),vs||(Ua[xi]=Po),qo.push(Po),w(Po,{destroy:function(){if(Po.refCount--,Po.refCount<=0){rr.deleteProgram(Po.program);var zs=qo.indexOf(Po);qo.splice(zs,1),En.shaderCount--}Ua[Po.vertId].refCount<=0&&(rr.deleteShader(zi[Po.vertId]),delete zi[Po.vertId],delete Eo[Po.fragId][Po.vertId]),Object.keys(Eo[Po.fragId]).length||(rr.deleteShader(Wa[Po.fragId]),delete Wa[Po.fragId],delete Eo[Po.fragId])}})},restore:io,shader:To,frag:-1,vert:-1}}var u0=6408,Sm=5121,c0=3333,H1=5126;function Np(rr,mn,En,ia,Wa,zi,Fi){function Ao(qo){var qs;mn.next===null?qs=Sm:qs=mn.next.colorAttachments[0].texture._texture.type;var xs=0,Uo=0,io=ia.framebufferWidth,xi=ia.framebufferHeight,ga=null;In(qo)?ga=qo:qo&&(xs=qo.x|0,Uo=qo.y|0,io=(qo.width||ia.framebufferWidth-xs)|0,xi=(qo.height||ia.framebufferHeight-Uo)|0,ga=qo.data||null),En();var Fa=io*xi*4;return ga||(qs===Sm?ga=new Uint8Array(Fa):qs===H1&&(ga=ga||new Float32Array(Fa))),rr.pixelStorei(c0,4),rr.readPixels(xs,Uo,io,xi,u0,qs,ga),ga}function To(qo){var qs;return mn.setFBO({framebuffer:qo.framebuffer},function(){qs=Ao(qo)}),qs}function Eo(qo){return!qo||!("framebuffer"in qo)?Ao(qo):To(qo)}return Eo}function Py(rr){return Gm(jv(Tm(rr)))}function jv(rr){return pv(yo(ph(rr),rr.length*8))}function Gm(rr){for(var mn="0123456789abcdef",En="",ia,Wa=0;Wa<rr.length;Wa++)ia=rr.charCodeAt(Wa),En+=mn.charAt(ia>>>4&15)+mn.charAt(ia&15);return En}function Tm(rr){for(var mn="",En=-1,ia,Wa;++En<rr.length;)ia=rr.charCodeAt(En),Wa=En+1<rr.length?rr.charCodeAt(En+1):0,55296<=ia&&ia<=56319&&56320<=Wa&&Wa<=57343&&(ia=65536+((ia&1023)<<10)+(Wa&1023),En++),ia<=127?mn+=String.fromCharCode(ia):ia<=2047?mn+=String.fromCharCode(192|ia>>>6&31,128|ia&63):ia<=65535?mn+=String.fromCharCode(224|ia>>>12&15,128|ia>>>6&63,128|ia&63):ia<=2097151&&(mn+=String.fromCharCode(240|ia>>>18&7,128|ia>>>12&63,128|ia>>>6&63,128|ia&63));return mn}function ph(rr){for(var mn=Array(rr.length>>2),En=0;En<mn.length;En++)mn[En]=0;for(var En=0;En<rr.length*8;En+=8)mn[En>>5]|=(rr.charCodeAt(En/8)&255)<<24-En%32;return mn}function pv(rr){for(var mn="",En=0;En<rr.length*32;En+=8)mn+=String.fromCharCode(rr[En>>5]>>>24-En%32&255);return mn}function Yd(rr,mn){return rr>>>mn|rr<<32-mn}function dg(rr,mn){return rr>>>mn}function Em(rr,mn,En){return rr&mn^~rr&En}function iy(rr,mn,En){return rr&mn^rr&En^mn&En}function sn(rr){return Yd(rr,2)^Yd(rr,13)^Yd(rr,22)}function Fn(rr){return Yd(rr,6)^Yd(rr,11)^Yd(rr,25)}function Li(rr){return Yd(rr,7)^Yd(rr,18)^dg(rr,3)}function Si(rr){return Yd(rr,17)^Yd(rr,19)^dg(rr,10)}var ma=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 yo(rr,mn){var En=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),ia=new Array(64),Wa,zi,Fi,Ao,To,Eo,qo,qs,xs,Uo,io,xi;for(rr[mn>>5]|=128<<24-mn%32,rr[(mn+64>>9<<4)+15]=mn,xs=0;xs<rr.length;xs+=16){for(Wa=En[0],zi=En[1],Fi=En[2],Ao=En[3],To=En[4],Eo=En[5],qo=En[6],qs=En[7],Uo=0;Uo<64;Uo++)Uo<16?ia[Uo]=rr[Uo+xs]:ia[Uo]=uo(uo(uo(Si(ia[Uo-2]),ia[Uo-7]),Li(ia[Uo-15])),ia[Uo-16]),io=uo(uo(uo(uo(qs,Fn(To)),Em(To,Eo,qo)),ma[Uo]),ia[Uo]),xi=uo(sn(Wa),iy(Wa,zi,Fi)),qs=qo,qo=Eo,Eo=To,To=uo(Ao,io),Ao=Fi,Fi=zi,zi=Wa,Wa=uo(io,xi);En[0]=uo(Wa,En[0]),En[1]=uo(zi,En[1]),En[2]=uo(Fi,En[2]),En[3]=uo(Ao,En[3]),En[4]=uo(To,En[4]),En[5]=uo(Eo,En[5]),En[6]=uo(qo,En[6]),En[7]=uo(qs,En[7])}return En}function uo(rr,mn){var En=(rr&65535)+(mn&65535),ia=(rr>>16)+(mn>>16)+(En>>16);return ia<<16|En&65535}function rs(rr){return Array.prototype.slice.call(rr)}function hs(rr){return rs(rr).join("")}function Ws(rr){var mn=rr&&rr.cache,En=0,ia=[],Wa=[],zi=[];function Fi(io,xi){var ga=xi&&xi.stable;if(!ga){for(var Fa=0;Fa<Wa.length;++Fa)if(Wa[Fa]===io&&!zi[Fa])return ia[Fa]}var so="g"+En++;return ia.push(so),Wa.push(io),zi.push(ga),so}function Ao(){var io=[];function xi(){io.push.apply(io,rs(arguments))}var ga=[];function Fa(){var so="v"+En++;return ga.push(so),arguments.length>0&&(io.push(so,"="),io.push.apply(io,rs(arguments)),io.push(";")),so}return w(xi,{def:Fa,toString:function(){return hs([ga.length>0?"var "+ga.join(",")+";":"",hs(io)])}})}function To(){var io=Ao(),xi=Ao(),ga=io.toString,Fa=xi.toString;function so(Ua,vs){xi(Ua,vs,"=",io.def(Ua,vs),";")}return w(function(){io.apply(io,rs(arguments))},{def:io.def,entry:io,exit:xi,save:so,set:function(Ua,vs,Po){so(Ua,vs),io(Ua,vs,"=",Po,";")},toString:function(){return ga()+Fa()}})}function Eo(){var io=hs(arguments),xi=To(),ga=To(),Fa=xi.toString,so=ga.toString;return w(xi,{then:function(){return xi.apply(xi,rs(arguments)),this},else:function(){return ga.apply(ga,rs(arguments)),this},toString:function(){var Ua=so();return Ua&&(Ua="else{"+Ua+"}"),hs(["if(",io,"){",Fa(),"}",Ua])}})}var qo=Ao(),qs={};function xs(io,xi){var ga=[];function Fa(){var zs="a"+ga.length;return ga.push(zs),zs}xi=xi||0;for(var so=0;so<xi;++so)Fa();var Ua=To(),vs=Ua.toString,Po=qs[io]=w(Ua,{arg:Fa,toString:function(){return hs(["function(",ga.join(),"){",vs(),"}"])}});return Po}function Uo(){var io=['"use strict";',qo,"return {"];Object.keys(qs).forEach(function(so){io.push('"',so,'":',qs[so].toString(),",")}),io.push("}");var xi=hs(io).replace(/;/g,`;
`).replace(/}/g,`}
`).replace(/{/g,`{
`),ga;if(mn&&(ga=Py(xi),mn[ga]))return mn[ga].apply(null,Wa);var Fa=Function.apply(null,ia.concat(xi));return mn&&(mn[ga]=Fa),Fa.apply(null,Wa)}return{global:qo,link:Fi,block:Ao,proc:xs,scope:To,cond:Eo,compile:Uo}}var Bo="xyzw".split(""),As=5121,Jo=1,Io=2,ll=0,Tu=1,du=2,ku=3,Au=4,cl=5,Os=6,Vu="dither",Nc="blend.enable",Sf="blend.color",sd="blend.equation",Cf="blend.func",ld="depth.enable",Jc="depth.func",wh="depth.range",vh="depth.mask",rd="colorMask",Wl="cull.enable",lc="cull.face",Bf="frontFace",gf="lineWidth",rv="polygonOffset.enable",nv="polygonOffset.offset",vv="sample.alpha",kg="sample.enable",iv="sample.coverage",$m="stencil.enable",Sh="stencil.mask",Wm="stencil.func",Iu="stencil.opFront",Gu="stencil.opBack",Ym="scissor.enable",Vv="scissor.box",kv="viewport",wt="profile",q="framebuffer",Ae="vert",it="frag",ot="elements",bt="primitive",ar="count",yr="offset",Ur="instances",ln="vao",Cn="Width",Pn="Height",vi=q+Cn,Ui=q+Pn,kt=kv+Cn,zt=kv+Pn,Qt="drawingBuffer",cr=Qt+Cn,Sr=Qt+Pn,gr=[Cf,sd,Wm,Iu,Gu,iv,kv,Vv,nv],Nr=34962,vn=34963,An=2884,Ln=3042,ai=3024,ki=2960,ra=2929,oa=3089,Ma=32823,mo=32926,ns=32928,$o=5126,as=35664,fl=35665,Zl=35666,Fl=5124,Du=35667,qc=35668,Gc=35669,_c=35670,ef=35671,Xd=35672,kd=35673,Ec=35674,Ac=35675,Ih=35676,Ep=35678,Iv=35680,$e=4,vt=1028,Bt=1029,fr=2304,pr=2305,_r=32775,Yr=32776,Wr=519,yn=7680,li=0,ni=1,Pi=32774,Ji=513,na=36160,_o=36064,ca={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},La={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},qa={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},bo={cw:fr,ccw:pr};function So(rr){return Array.isArray(rr)||In(rr)||Gn(rr)}function Va(rr){return rr.sort(function(mn,En){return mn===kv?-1:En===kv?1:mn<En?-1:1})}function os(rr,mn,En,ia){this.thisDep=rr,this.contextDep=mn,this.propDep=En,this.append=ia}function ul(rr){return rr&&!(rr.thisDep||rr.contextDep||rr.propDep)}function Us(rr){return new os(!1,!1,!1,rr)}function rl(rr,mn){var En=rr.type;if(En===ll){var ia=rr.data.length;return new os(!0,ia>=1,ia>=2,mn)}else if(En===Au){var Wa=rr.data;return new os(Wa.thisDep,Wa.contextDep,Wa.propDep,mn)}else{if(En===cl)return new os(!1,!1,!1,mn);if(En===Os){for(var zi=!1,Fi=!1,Ao=!1,To=0;To<rr.data.length;++To){var Eo=rr.data[To];if(Eo.type===Tu)Ao=!0;else if(Eo.type===du)Fi=!0;else if(Eo.type===ku)zi=!0;else if(Eo.type===ll){zi=!0;var qo=Eo.data;qo>=1&&(Fi=!0),qo>=2&&(Ao=!0)}else Eo.type===Au&&(zi=zi||Eo.data.thisDep,Fi=Fi||Eo.data.contextDep,Ao=Ao||Eo.data.propDep)}return new os(zi,Fi,Ao,mn)}else return new os(En===ku,En===du,En===Tu,mn)}}var Yl=new os(!1,!1,!1,function(){});function eu(rr,mn,En,ia,Wa,zi,Fi,Ao,To,Eo,qo,qs,xs,Uo,io,xi){var ga=Eo.Record,Fa={add:32774,subtract:32778,"reverse subtract":32779};En.ext_blend_minmax&&(Fa.min=_r,Fa.max=Yr);var so=En.angle_instanced_arrays,Ua=En.webgl_draw_buffers,vs=En.oes_vertex_array_object,Po={dirty:!0,profile:xi.profile},zs={},Ha=[],Ra={},ls={};function ua(Pt){return Pt.replace(".","_")}function Wo(Pt,jt,hr){var qr=ua(Pt);Ha.push(Pt),zs[qr]=Po[qr]=!!hr,Ra[qr]=jt}function Mo(Pt,jt,hr){var qr=ua(Pt);Ha.push(Pt),Array.isArray(hr)?(Po[qr]=hr.slice(),zs[qr]=hr.slice()):Po[qr]=zs[qr]=hr,ls[qr]=jt}function Hs(Pt){return!!isNaN(Pt)}Wo(Vu,ai),Wo(Nc,Ln),Mo(Sf,"blendColor",[0,0,0,0]),Mo(sd,"blendEquationSeparate",[Pi,Pi]),Mo(Cf,"blendFuncSeparate",[ni,li,ni,li]),Wo(ld,ra,!0),Mo(Jc,"depthFunc",Ji),Mo(wh,"depthRange",[0,1]),Mo(vh,"depthMask",!0),Mo(rd,rd,[!0,!0,!0,!0]),Wo(Wl,An),Mo(lc,"cullFace",Bt),Mo(Bf,Bf,pr),Mo(gf,gf,1),Wo(rv,Ma),Mo(nv,"polygonOffset",[0,0]),Wo(vv,mo),Wo(kg,ns),Mo(iv,"sampleCoverage",[1,!1]),Wo($m,ki),Mo(Sh,"stencilMask",-1),Mo(Wm,"stencilFunc",[Wr,0,-1]),Mo(Iu,"stencilOpSeparate",[vt,yn,yn,yn]),Mo(Gu,"stencilOpSeparate",[Bt,yn,yn,yn]),Wo(Ym,oa),Mo(Vv,"scissor",[0,0,rr.drawingBufferWidth,rr.drawingBufferHeight]),Mo(kv,kv,[0,0,rr.drawingBufferWidth,rr.drawingBufferHeight]);var au={gl:rr,context:xs,strings:mn,next:zs,current:Po,draw:qs,elements:zi,buffer:Wa,shader:qo,attributes:Eo.state,vao:Eo,uniforms:To,framebuffer:Ao,extensions:En,timer:Uo,isBufferArgs:So},ws={primTypes:vr,compareFuncs:La,blendFuncs:ca,blendEquations:Fa,stencilOps:qa,glTypes:Wi,orientationType:bo};Ua&&(ws.backBuffer=[Bt],ws.drawBuffer=T(ia.maxDrawbuffers,function(Pt){return Pt===0?[0]:T(Pt,function(jt){return _o+jt})}));var Xs=0;function jo(){var Pt=Ws({cache:io}),jt=Pt.link,hr=Pt.global;Pt.id=Xs++,Pt.batchId="0";var qr=jt(au),zr=Pt.shared={props:"a0"};Object.keys(au).forEach(function(jr){zr[jr]=hr.def(qr,".",jr)});var Gr=Pt.next={},en=Pt.current={};Object.keys(ls).forEach(function(jr){Array.isArray(Po[jr])&&(Gr[jr]=hr.def(zr.next,".",jr),en[jr]=hr.def(zr.current,".",jr))});var Xr=Pt.constants={};Object.keys(ws).forEach(function(jr){Xr[jr]=hr.def(JSON.stringify(ws[jr]))}),Pt.invoke=function(jr,Br){switch(Br.type){case ll:var Bn=["this",zr.context,zr.props,Pt.batchId];return jr.def(jt(Br.data),".call(",Bn.slice(0,Math.max(Br.data.length+1,4)),")");case Tu:return jr.def(zr.props,Br.data);case du:return jr.def(zr.context,Br.data);case ku:return jr.def("this",Br.data);case Au:return Br.data.append(Pt,jr),Br.data.ref;case cl:return Br.data.toString();case Os:return Br.data.map(function(ui){return Pt.invoke(jr,ui)})}},Pt.attribCache={};var Rr={};return Pt.scopeAttrib=function(jr){var Br=mn.id(jr);if(Br in Rr)return Rr[Br];var Bn=Eo.scope[Br];Bn||(Bn=Eo.scope[Br]=new ga);var ui=Rr[Br]=jt(Bn);return ui},Pt}function Jl(Pt){var jt=Pt.static,hr=Pt.dynamic,qr;if(wt in jt){var zr=!!jt[wt];qr=Us(function(en,Xr){return zr}),qr.enable=zr}else if(wt in hr){var Gr=hr[wt];qr=rl(Gr,function(en,Xr){return en.invoke(Xr,Gr)})}return qr}function Mu(Pt,jt){var hr=Pt.static,qr=Pt.dynamic;if(q in hr){var zr=hr[q];return zr?(zr=Ao.getFramebuffer(zr),Us(function(en,Xr){var Rr=en.link(zr),jr=en.shared;Xr.set(jr.framebuffer,".next",Rr);var Br=jr.context;return Xr.set(Br,"."+vi,Rr+".width"),Xr.set(Br,"."+Ui,Rr+".height"),Rr})):Us(function(en,Xr){var Rr=en.shared;Xr.set(Rr.framebuffer,".next","null");var jr=Rr.context;return Xr.set(jr,"."+vi,jr+"."+cr),Xr.set(jr,"."+Ui,jr+"."+Sr),"null"})}else if(q in qr){var Gr=qr[q];return rl(Gr,function(en,Xr){var Rr=en.invoke(Xr,Gr),jr=en.shared,Br=jr.framebuffer,Bn=Xr.def(Br,".getFramebuffer(",Rr,")");Xr.set(Br,".next",Bn);var ui=jr.context;return Xr.set(ui,"."+vi,Bn+"?"+Bn+".width:"+ui+"."+cr),Xr.set(ui,"."+Ui,Bn+"?"+Bn+".height:"+ui+"."+Sr),Bn})}else return null}function Fu(Pt,jt,hr){var qr=Pt.static,zr=Pt.dynamic;function Gr(Rr){if(Rr in qr){var jr=qr[Rr],Br=!0,Bn=jr.x|0,ui=jr.y|0,Ii,Ga;return"width"in jr?Ii=jr.width|0:Br=!1,"height"in jr?Ga=jr.height|0:Br=!1,new os(!Br&&jt&&jt.thisDep,!Br&&jt&&jt.contextDep,!Br&&jt&&jt.propDep,function($a,Ja){var wo=$a.shared.context,Ya=Ii;"width"in jr||(Ya=Ja.def(wo,".",vi,"-",Bn));var Ro=Ga;return"height"in jr||(Ro=Ja.def(wo,".",Ui,"-",ui)),[Bn,ui,Ya,Ro]})}else if(Rr in zr){var ka=zr[Rr],wa=rl(ka,function($a,Ja){var wo=$a.invoke(Ja,ka),Ya=$a.shared.context,Ro=Ja.def(wo,".x|0"),Xo=Ja.def(wo,".y|0"),Rs=Ja.def('"width" in ',wo,"?",wo,".width|0:","(",Ya,".",vi,"-",Ro,")"),Qs=Ja.def('"height" in ',wo,"?",wo,".height|0:","(",Ya,".",Ui,"-",Xo,")");return[Ro,Xo,Rs,Qs]});return jt&&(wa.thisDep=wa.thisDep||jt.thisDep,wa.contextDep=wa.contextDep||jt.contextDep,wa.propDep=wa.propDep||jt.propDep),wa}else return jt?new os(jt.thisDep,jt.contextDep,jt.propDep,function($a,Ja){var wo=$a.shared.context;return[0,0,Ja.def(wo,".",vi),Ja.def(wo,".",Ui)]}):null}var en=Gr(kv);if(en){var Xr=en;en=new os(en.thisDep,en.contextDep,en.propDep,function(Rr,jr){var Br=Xr.append(Rr,jr),Bn=Rr.shared.context;return jr.set(Bn,"."+kt,Br[2]),jr.set(Bn,"."+zt,Br[3]),Br})}return{viewport:en,scissor_box:Gr(Vv)}}function cf(Pt,jt){var hr=Pt.static,qr=typeof hr[it]=="string"&&typeof hr[Ae]=="string";if(qr){if(Object.keys(jt.dynamic).length>0)return null;var zr=jt.static,Gr=Object.keys(zr);if(Gr.length>0&&typeof zr[Gr[0]]=="number"){for(var en=[],Xr=0;Xr<Gr.length;++Xr)en.push([zr[Gr[Xr]]|0,Gr[Xr]]);return en}}return null}function zu(Pt,jt,hr){var qr=Pt.static,zr=Pt.dynamic;function Gr(Br){if(Br in qr){var Bn=mn.id(qr[Br]),ui=Us(function(){return Bn});return ui.id=Bn,ui}else if(Br in zr){var Ii=zr[Br];return rl(Ii,function(Ga,ka){var wa=Ga.invoke(ka,Ii),$a=ka.def(Ga.shared.strings,".id(",wa,")");return $a})}return null}var en=Gr(it),Xr=Gr(Ae),Rr=null,jr;return ul(en)&&ul(Xr)?(Rr=qo.program(Xr.id,en.id,null,hr),jr=Us(function(Br,Bn){return Br.link(Rr)})):jr=new os(en&&en.thisDep||Xr&&Xr.thisDep,en&&en.contextDep||Xr&&Xr.contextDep,en&&en.propDep||Xr&&Xr.propDep,function(Br,Bn){var ui=Br.shared.shader,Ii;en?Ii=en.append(Br,Bn):Ii=Bn.def(ui,".",it);var Ga;Xr?Ga=Xr.append(Br,Bn):Ga=Bn.def(ui,".",Ae);var ka=ui+".program("+Ga+","+Ii;return Bn.def(ka+")")}),{frag:en,vert:Xr,progVar:jr,program:Rr}}function mh(Pt,jt){var hr=Pt.static,qr=Pt.dynamic,zr={},Gr=!1;function en(){if(ln in hr){var Ja=hr[ln];return Ja!==null&&Eo.getVAO(Ja)===null&&(Ja=Eo.createVAO(Ja)),Gr=!0,zr.vao=Ja,Us(function(Ya){var Ro=Eo.getVAO(Ja);return Ro?Ya.link(Ro):"null"})}else if(ln in qr){Gr=!0;var wo=qr[ln];return rl(wo,function(Ya,Ro){var Xo=Ya.invoke(Ro,wo);return Ro.def(Ya.shared.vao+".getVAO("+Xo+")")})}return null}var Xr=en(),Rr=!1;function jr(){if(ot in hr){var Ja=hr[ot];if(zr.elements=Ja,So(Ja)){var wo=zr.elements=zi.create(Ja,!0);Ja=zi.getElements(wo),Rr=!0}else Ja&&(Ja=zi.getElements(Ja),Rr=!0);var Ya=Us(function(Xo,Rs){if(Ja){var Qs=Xo.link(Ja);return Xo.ELEMENTS=Qs,Qs}return Xo.ELEMENTS=null,null});return Ya.value=Ja,Ya}else if(ot in qr){Rr=!0;var Ro=qr[ot];return rl(Ro,function(Xo,Rs){var Qs=Xo.shared,cc=Qs.isBufferArgs,ac=Qs.elements,yf=Xo.invoke(Rs,Ro),ff=Rs.def("null"),_f=Rs.def(cc,"(",yf,")"),bf=Xo.cond(_f).then(ff,"=",ac,".createStream(",yf,");").else(ff,"=",ac,".getElements(",yf,");");return Rs.entry(bf),Rs.exit(Xo.cond(_f).then(ac,".destroyStream(",ff,");")),Xo.ELEMENTS=ff,ff})}else if(Gr)return new os(Xr.thisDep,Xr.contextDep,Xr.propDep,function(Xo,Rs){return Rs.def(Xo.shared.vao+".currentVAO?"+Xo.shared.elements+".getElements("+Xo.shared.vao+".currentVAO.elements):null")});return null}var Br=jr();function Bn(){if(bt in hr){var Ja=hr[bt];return zr.primitive=Ja,Us(function(Ya,Ro){return vr[Ja]})}else if(bt in qr){var wo=qr[bt];return rl(wo,function(Ya,Ro){var Xo=Ya.constants.primTypes,Rs=Ya.invoke(Ro,wo);return Ro.def(Xo,"[",Rs,"]")})}else{if(Rr)return ul(Br)?Br.value?Us(function(Ya,Ro){return Ro.def(Ya.ELEMENTS,".primType")}):Us(function(){return $e}):new os(Br.thisDep,Br.contextDep,Br.propDep,function(Ya,Ro){var Xo=Ya.ELEMENTS;return Ro.def(Xo,"?",Xo,".primType:",$e)});if(Gr)return new os(Xr.thisDep,Xr.contextDep,Xr.propDep,function(Ya,Ro){return Ro.def(Ya.shared.vao+".currentVAO?"+Ya.shared.vao+".currentVAO.primitive:"+$e)})}return null}function ui(Ja,wo){if(Ja in hr){var Ya=hr[Ja]|0;return wo?zr.offset=Ya:zr.instances=Ya,Us(function(Xo,Rs){return wo&&(Xo.OFFSET=Ya),Ya})}else if(Ja in qr){var Ro=qr[Ja];return rl(Ro,function(Xo,Rs){var Qs=Xo.invoke(Rs,Ro);return wo&&(Xo.OFFSET=Qs),Qs})}else if(wo){if(Rr)return Us(function(Xo,Rs){return Xo.OFFSET=0,0});if(Gr)return new os(Xr.thisDep,Xr.contextDep,Xr.propDep,function(Xo,Rs){return Rs.def(Xo.shared.vao+".currentVAO?"+Xo.shared.vao+".currentVAO.offset:0")})}else if(Gr)return new os(Xr.thisDep,Xr.contextDep,Xr.propDep,function(Xo,Rs){return Rs.def(Xo.shared.vao+".currentVAO?"+Xo.shared.vao+".currentVAO.instances:-1")});return null}var Ii=ui(yr,!0);function Ga(){if(ar in hr){var Ja=hr[ar]|0;return zr.count=Ja,Us(function(){return Ja})}else if(ar in qr){var wo=qr[ar];return rl(wo,function(Rs,Qs){var cc=Rs.invoke(Qs,wo);return cc})}else if(Rr)if(ul(Br)){if(Br)return Ii?new os(Ii.thisDep,Ii.contextDep,Ii.propDep,function(Rs,Qs){var cc=Qs.def(Rs.ELEMENTS,".vertCount-",Rs.OFFSET);return cc}):Us(function(Rs,Qs){return Qs.def(Rs.ELEMENTS,".vertCount")});var Ya=Us(function(){return-1});return Ya}else{var Ro=new os(Br.thisDep||Ii.thisDep,Br.contextDep||Ii.contextDep,Br.propDep||Ii.propDep,function(Rs,Qs){var cc=Rs.ELEMENTS;return Rs.OFFSET?Qs.def(cc,"?",cc,".vertCount-",Rs.OFFSET,":-1"):Qs.def(cc,"?",cc,".vertCount:-1")});return Ro}else if(Gr){var Xo=new os(Xr.thisDep,Xr.contextDep,Xr.propDep,function(Rs,Qs){return Qs.def(Rs.shared.vao,".currentVAO?",Rs.shared.vao,".currentVAO.count:-1")});return Xo}return null}var ka=Bn(),wa=Ga(),$a=ui(Ur,!1);return{elements:Br,primitive:ka,count:wa,instances:$a,offset:Ii,vao:Xr,vaoActive:Gr,elementsActive:Rr,static:zr}}function Wc(Pt,jt){var hr=Pt.static,qr=Pt.dynamic,zr={};return Ha.forEach(function(Gr){var en=ua(Gr);function Xr(Rr,jr){if(Gr in hr){var Br=Rr(hr[Gr]);zr[en]=Us(function(){return Br})}else if(Gr in qr){var Bn=qr[Gr];zr[en]=rl(Bn,function(ui,Ii){return jr(ui,Ii,ui.invoke(Ii,Bn))})}}switch(Gr){case Wl:case Nc:case Vu:case $m:case ld:case Ym:case rv:case vv:case kg:case vh:return Xr(function(Rr){return Rr},function(Rr,jr,Br){return Br});case Jc:return Xr(function(Rr){return La[Rr]},function(Rr,jr,Br){var Bn=Rr.constants.compareFuncs;return jr.def(Bn,"[",Br,"]")});case wh:return Xr(function(Rr){return Rr},function(Rr,jr,Br){var Bn=jr.def("+",Br,"[0]"),ui=jr.def("+",Br,"[1]");return[Bn,ui]});case Cf:return Xr(function(Rr){var jr="srcRGB"in Rr?Rr.srcRGB:Rr.src,Br="srcAlpha"in Rr?Rr.srcAlpha:Rr.src,Bn="dstRGB"in Rr?Rr.dstRGB:Rr.dst,ui="dstAlpha"in Rr?Rr.dstAlpha:Rr.dst;return[ca[jr],ca[Bn],ca[Br],ca[ui]]},function(Rr,jr,Br){var Bn=Rr.constants.blendFuncs;function ui(wo,Ya){var Ro=jr.def('"',wo,Ya,'" in ',Br,"?",Br,".",wo,Ya,":",Br,".",wo);return Ro}var Ii=ui("src","RGB"),Ga=ui("dst","RGB"),ka=jr.def(Bn,"[",Ii,"]"),wa=jr.def(Bn,"[",ui("src","Alpha"),"]"),$a=jr.def(Bn,"[",Ga,"]"),Ja=jr.def(Bn,"[",ui("dst","Alpha"),"]");return[ka,$a,wa,Ja]});case sd:return Xr(function(Rr){if(typeof Rr=="string")return[Fa[Rr],Fa[Rr]];if(typeof Rr=="object")return[Fa[Rr.rgb],Fa[Rr.alpha]]},function(Rr,jr,Br){var Bn=Rr.constants.blendEquations,ui=jr.def(),Ii=jr.def(),Ga=Rr.cond("typeof ",Br,'==="string"');return Ga.then(ui,"=",Ii,"=",Bn,"[",Br,"];"),Ga.else(ui,"=",Bn,"[",Br,".rgb];",Ii,"=",Bn,"[",Br,".alpha];"),jr(Ga),[ui,Ii]});case Sf:return Xr(function(Rr){return T(4,function(jr){return+Rr[jr]})},function(Rr,jr,Br){return T(4,function(Bn){return jr.def("+",Br,"[",Bn,"]")})});case Sh:return Xr(function(Rr){return Rr|0},function(Rr,jr,Br){return jr.def(Br,"|0")});case Wm:return Xr(function(Rr){var jr=Rr.cmp||"keep",Br=Rr.ref||0,Bn="mask"in Rr?Rr.mask:-1;return[La[jr],Br,Bn]},function(Rr,jr,Br){var Bn=Rr.constants.compareFuncs,ui=jr.def('"cmp" in ',Br,"?",Bn,"[",Br,".cmp]",":",yn),Ii=jr.def(Br,".ref|0"),Ga=jr.def('"mask" in ',Br,"?",Br,".mask|0:-1");return[ui,Ii,Ga]});case Iu:case Gu:return Xr(function(Rr){var jr=Rr.fail||"keep",Br=Rr.zfail||"keep",Bn=Rr.zpass||"keep";return[Gr===Gu?Bt:vt,qa[jr],qa[Br],qa[Bn]]},function(Rr,jr,Br){var Bn=Rr.constants.stencilOps;function ui(Ii){return jr.def('"',Ii,'" in ',Br,"?",Bn,"[",Br,".",Ii,"]:",yn)}return[Gr===Gu?Bt:vt,ui("fail"),ui("zfail"),ui("zpass")]});case nv:return Xr(function(Rr){var jr=Rr.factor|0,Br=Rr.units|0;return[jr,Br]},function(Rr,jr,Br){var Bn=jr.def(Br,".factor|0"),ui=jr.def(Br,".units|0");return[Bn,ui]});case lc:return Xr(function(Rr){var jr=0;return Rr==="front"?jr=vt:Rr==="back"&&(jr=Bt),jr},function(Rr,jr,Br){return jr.def(Br,'==="front"?',vt,":",Bt)});case gf:return Xr(function(Rr){return Rr},function(Rr,jr,Br){return Br});case Bf:return Xr(function(Rr){return bo[Rr]},function(Rr,jr,Br){return jr.def(Br+'==="cw"?'+fr+":"+pr)});case rd:return Xr(function(Rr){return Rr.map(function(jr){return!!jr})},function(Rr,jr,Br){return T(4,function(Bn){return"!!"+Br+"["+Bn+"]"})});case iv:return Xr(function(Rr){var jr="value"in Rr?Rr.value:1,Br=!!Rr.invert;return[jr,Br]},function(Rr,jr,Br){var Bn=jr.def('"value" in ',Br,"?+",Br,".value:1"),ui=jr.def("!!",Br,".invert");return[Bn,ui]})}}),zr}function Zd(Pt,jt){var hr=Pt.static,qr=Pt.dynamic,zr={};return Object.keys(hr).forEach(function(Gr){var en=hr[Gr],Xr;if(typeof en=="number"||typeof en=="boolean")Xr=Us(function(){return en});else if(typeof en=="function"){var Rr=en._reglType;Rr==="texture2d"||Rr==="textureCube"?Xr=Us(function(jr){return jr.link(en)}):(Rr==="framebuffer"||Rr==="framebufferCube")&&(Xr=Us(function(jr){return jr.link(en.color[0])}))}else Ba(en)&&(Xr=Us(function(jr){var Br=jr.global.def("[",T(en.length,function(Bn){return en[Bn]}),"]");return Br}));Xr.value=en,zr[Gr]=Xr}),Object.keys(qr).forEach(function(Gr){var en=qr[Gr];zr[Gr]=rl(en,function(Xr,Rr){return Xr.invoke(Rr,en)})}),zr}function jh(Pt,jt){var hr=Pt.static,qr=Pt.dynamic,zr={};return Object.keys(hr).forEach(function(Gr){var en=hr[Gr],Xr=mn.id(Gr),Rr=new ga;if(So(en))Rr.state=Jo,Rr.buffer=Wa.getBuffer(Wa.create(en,Nr,!1,!0)),Rr.type=0;else{var jr=Wa.getBuffer(en);if(jr)Rr.state=Jo,Rr.buffer=jr,Rr.type=0;else if("constant"in en){var Br=en.constant;Rr.buffer="null",Rr.state=Io,typeof Br=="number"?Rr.x=Br:Bo.forEach(function($a,Ja){Ja<Br.length&&(Rr[$a]=Br[Ja])})}else{So(en.buffer)?jr=Wa.getBuffer(Wa.create(en.buffer,Nr,!1,!0)):jr=Wa.getBuffer(en.buffer);var Bn=en.offset|0,ui=en.stride|0,Ii=en.size|0,Ga=!!en.normalized,ka=0;"type"in en&&(ka=Wi[en.type]);var wa=en.divisor|0;Rr.buffer=jr,Rr.state=Jo,Rr.size=Ii,Rr.normalized=Ga,Rr.type=ka||jr.dtype,Rr.offset=Bn,Rr.stride=ui,Rr.divisor=wa}}zr[Gr]=Us(function($a,Ja){var wo=$a.attribCache;if(Xr in wo)return wo[Xr];var Ya={isStream:!1};return Object.keys(Rr).forEach(function(Ro){Ya[Ro]=Rr[Ro]}),Rr.buffer&&(Ya.buffer=$a.link(Rr.buffer),Ya.type=Ya.type||Ya.buffer+".dtype"),wo[Xr]=Ya,Ya})}),Object.keys(qr).forEach(function(Gr){var en=qr[Gr];function Xr(Rr,jr){var Br=Rr.invoke(jr,en),Bn=Rr.shared,ui=Rr.constants,Ii=Bn.isBufferArgs,Ga=Bn.buffer,ka={isStream:jr.def(!1)},wa=new ga;wa.state=Jo,Object.keys(wa).forEach(function(Ya){ka[Ya]=jr.def(""+wa[Ya])});var $a=ka.buffer,Ja=ka.type;jr("if(",Ii,"(",Br,")){",ka.isStream,"=true;",$a,"=",Ga,".createStream(",Nr,",",Br,");",Ja,"=",$a,".dtype;","}else{",$a,"=",Ga,".getBuffer(",Br,");","if(",$a,"){",Ja,"=",$a,".dtype;",'}else if("constant" in ',Br,"){",ka.state,"=",Io,";","if(typeof "+Br+'.constant === "number"){',ka[Bo[0]],"=",Br,".constant;",Bo.slice(1).map(function(Ya){return ka[Ya]}).join("="),"=0;","}else{",Bo.map(function(Ya,Ro){return ka[Ya]+"="+Br+".constant.length>"+Ro+"?"+Br+".constant["+Ro+"]:0;"}).join(""),"}}else{","if(",Ii,"(",Br,".buffer)){",$a,"=",Ga,".createStream(",Nr,",",Br,".buffer);","}else{",$a,"=",Ga,".getBuffer(",Br,".buffer);","}",Ja,'="type" in ',Br,"?",ui.glTypes,"[",Br,".type]:",$a,".dtype;",ka.normalized,"=!!",Br,".normalized;");function wo(Ya){jr(ka[Ya],"=",Br,".",Ya,"|0;")}return wo("size"),wo("offset"),wo("stride"),wo("divisor"),jr("}}"),jr.exit("if(",ka.isStream,"){",Ga,".destroyStream(",$a,");","}"),ka}zr[Gr]=rl(en,Xr)}),zr}function fp(Pt){var jt=Pt.static,hr=Pt.dynamic,qr={};return Object.keys(jt).forEach(function(zr){var Gr=jt[zr];qr[zr]=Us(function(en,Xr){return typeof Gr=="number"||typeof Gr=="boolean"?""+Gr:en.link(Gr)})}),Object.keys(hr).forEach(function(zr){var Gr=hr[zr];qr[zr]=rl(Gr,function(en,Xr){return en.invoke(Xr,Gr)})}),qr}function Am(Pt,jt,hr,qr,zr){Pt.static,Pt.dynamic;var Gr=cf(Pt,jt),en=Mu(Pt),Xr=Fu(Pt,en),Rr=mh(Pt),jr=Wc(Pt),Br=zu(Pt,zr,Gr);function Bn($a){var Ja=Xr[$a];Ja&&(jr[$a]=Ja)}Bn(kv),Bn(ua(Vv));var ui=Object.keys(jr).length>0,Ii={framebuffer:en,draw:Rr,shader:Br,state:jr,dirty:ui,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Ii.profile=Jl(Pt),Ii.uniforms=Zd(hr),Ii.drawVAO=Ii.scopeVAO=Rr.vao,!Ii.drawVAO&&Br.program&&!Gr&&En.angle_instanced_arrays&&Rr.static.elements){var Ga=!0,ka=Br.program.attributes.map(function($a){var Ja=jt.static[$a];return Ga=Ga&&!!Ja,Ja});if(Ga&&ka.length>0){var wa=Eo.getVAO(Eo.createVAO({attributes:ka,elements:Rr.static.elements}));Ii.drawVAO=new os(null,null,null,function($a,Ja){return $a.link(wa)}),Ii.useVAO=!0}}return Gr?Ii.useVAO=!0:Ii.attributes=jh(jt),Ii.context=fp(qr),Ii}function _d(Pt,jt,hr){var qr=Pt.shared,zr=qr.context,Gr=Pt.scope();Object.keys(hr).forEach(function(en){jt.save(zr,"."+en);var Xr=hr[en],Rr=Xr.append(Pt,jt);Array.isArray(Rr)?Gr(zr,".",en,"=[",Rr.join(),"];"):Gr(zr,".",en,"=",Rr,";")}),jt(Gr)}function Hd(Pt,jt,hr,qr){var zr=Pt.shared,Gr=zr.gl,en=zr.framebuffer,Xr;Ua&&(Xr=jt.def(zr.extensions,".webgl_draw_buffers"));var Rr=Pt.constants,jr=Rr.drawBuffer,Br=Rr.backBuffer,Bn;hr?Bn=hr.append(Pt,jt):Bn=jt.def(en,".next"),qr||jt("if(",Bn,"!==",en,".cur){"),jt("if(",Bn,"){",Gr,".bindFramebuffer(",na,",",Bn,".framebuffer);"),Ua&&jt(Xr,".drawBuffersWEBGL(",jr,"[",Bn,".colorAttachments.length]);"),jt("}else{",Gr,".bindFramebuffer(",na,",null);"),Ua&&jt(Xr,".drawBuffersWEBGL(",Br,");"),jt("}",en,".cur=",Bn,";"),qr||jt("}")}function Ol(Pt,jt,hr){var qr=Pt.shared,zr=qr.gl,Gr=Pt.current,en=Pt.next,Xr=qr.current,Rr=qr.next,jr=Pt.cond(Xr,".dirty");Ha.forEach(function(Br){var Bn=ua(Br);if(!(Bn in hr.state)){var ui,Ii;if(Bn in en){ui=en[Bn],Ii=Gr[Bn];var Ga=T(Po[Bn].length,function(wa){return jr.def(ui,"[",wa,"]")});jr(Pt.cond(Ga.map(function(wa,$a){return wa+"!=="+Ii+"["+$a+"]"}).join("||")).then(zr,".",ls[Bn],"(",Ga,");",Ga.map(function(wa,$a){return Ii+"["+$a+"]="+wa}).join(";"),";"))}else{ui=jr.def(Rr,".",Bn);var ka=Pt.cond(ui,"!==",Xr,".",Bn);jr(ka),Bn in Ra?ka(Pt.cond(ui).then(zr,".enable(",Ra[Bn],");").else(zr,".disable(",Ra[Bn],");"),Xr,".",Bn,"=",ui,";"):ka(zr,".",ls[Bn],"(",ui,");",Xr,".",Bn,"=",ui,";")}}}),Object.keys(hr.state).length===0&&jr(Xr,".dirty=false;"),jt(jr)}function dp(Pt,jt,hr,qr){var zr=Pt.shared,Gr=Pt.current,en=zr.current,Xr=zr.gl,Rr;Va(Object.keys(hr)).forEach(function(jr){var Br=hr[jr];if(!(qr&&!qr(Br))){var Bn=Br.append(Pt,jt);if(Ra[jr]){var ui=Ra[jr];ul(Br)?(Rr=Pt.link(Bn,{stable:!0}),jt(Pt.cond(Rr).then(Xr,".enable(",ui,");").else(Xr,".disable(",ui,");")),jt(en,".",jr,"=",Rr,";")):(jt(Pt.cond(Bn).then(Xr,".enable(",ui,");").else(Xr,".disable(",ui,");")),jt(en,".",jr,"=",Bn,";"))}else if(Ba(Bn)){var Ii=Gr[jr];jt(Xr,".",ls[jr],"(",Bn,");",Bn.map(function(Ga,ka){return Ii+"["+ka+"]="+Ga}).join(";"),";")}else ul(Br)?(Rr=Pt.link(Bn,{stable:!0}),jt(Xr,".",ls[jr],"(",Rr,");",en,".",jr,"=",Rr,";")):jt(Xr,".",ls[jr],"(",Bn,");",en,".",jr,"=",Bn,";")}})}function Fc(Pt,jt){so&&(Pt.instancing=jt.def(Pt.shared.extensions,".angle_instanced_arrays"))}function Hf(Pt,jt,hr,qr,zr){var Gr=Pt.shared,en=Pt.stats,Xr=Gr.current,Rr=Gr.timer,jr=hr.profile;function Br(){return typeof performance>"u"?"Date.now()":"performance.now()"}var Bn,ui;function Ii(wo){Bn=jt.def(),wo(Bn,"=",Br(),";"),typeof zr=="string"?wo(en,".count+=",zr,";"):wo(en,".count++;"),Uo&&(qr?(ui=jt.def(),wo(ui,"=",Rr,".getNumPendingQueries();")):wo(Rr,".beginQuery(",en,");"))}function Ga(wo){wo(en,".cpuTime+=",Br(),"-",Bn,";"),Uo&&(qr?wo(Rr,".pushScopeStats(",ui,",",Rr,".getNumPendingQueries(),",en,");"):wo(Rr,".endQuery();"))}function ka(wo){var Ya=jt.def(Xr,".profile");jt(Xr,".profile=",wo,";"),jt.exit(Xr,".profile=",Ya,";")}var wa;if(jr){if(ul(jr)){jr.enable?(Ii(jt),Ga(jt.exit),ka("true")):ka("false");return}wa=jr.append(Pt,jt),ka(wa)}else wa=jt.def(Xr,".profile");var $a=Pt.block();Ii($a),jt("if(",wa,"){",$a,"}");var Ja=Pt.block();Ga(Ja),jt.exit("if(",wa,"){",Ja,"}")}function Fp(Pt,jt,hr,qr,zr){var Gr=Pt.shared;function en(Rr){switch(Rr){case as:case Du:case ef:return 2;case fl:case qc:case Xd:return 3;case Zl:case Gc:case kd:return 4;default:return 1}}function Xr(Rr,jr,Br){var Bn=Gr.gl,ui=jt.def(Rr,".location"),Ii=jt.def(Gr.attributes,"[",ui,"]"),Ga=Br.state,ka=Br.buffer,wa=[Br.x,Br.y,Br.z,Br.w],$a=["buffer","normalized","offset","stride"];function Ja(){jt("if(!",Ii,".buffer){",Bn,".enableVertexAttribArray(",ui,");}");var Ya=Br.type,Ro;if(Br.size?Ro=jt.def(Br.size,"||",jr):Ro=jr,jt("if(",Ii,".type!==",Ya,"||",Ii,".size!==",Ro,"||",$a.map(function(Rs){return Ii+"."+Rs+"!=="+Br[Rs]}).join("||"),"){",Bn,".bindBuffer(",Nr,",",ka,".buffer);",Bn,".vertexAttribPointer(",[ui,Ro,Ya,Br.normalized,Br.stride,Br.offset],");",Ii,".type=",Ya,";",Ii,".size=",Ro,";",$a.map(function(Rs){return Ii+"."+Rs+"="+Br[Rs]+";"}).join(""),"}"),so){var Xo=Br.divisor;jt("if(",Ii,".divisor!==",Xo,"){",Pt.instancing,".vertexAttribDivisorANGLE(",[ui,Xo],");",Ii,".divisor=",Xo,";}")}}function wo(){jt("if(",Ii,".buffer){",Bn,".disableVertexAttribArray(",ui,");",Ii,".buffer=null;","}if(",Bo.map(function(Ya,Ro){return Ii+"."+Ya+"!=="+wa[Ro]}).join("||"),"){",Bn,".vertexAttrib4f(",ui,",",wa,");",Bo.map(function(Ya,Ro){return Ii+"."+Ya+"="+wa[Ro]+";"}).join(""),"}")}Ga===Jo?Ja():Ga===Io?wo():(jt("if(",Ga,"===",Jo,"){"),Ja(),jt("}else{"),wo(),jt("}"))}qr.forEach(function(Rr){var jr=Rr.name,Br=hr.attributes[jr],Bn;if(Br){if(!zr(Br))return;Bn=Br.append(Pt,jt)}else{if(!zr(Yl))return;var ui=Pt.scopeAttrib(jr);Bn={},Object.keys(new ga).forEach(function(Ii){Bn[Ii]=jt.def(ui,".",Ii)})}Xr(Pt.link(Rr),en(Rr.info.type),Bn)})}function zp(Pt,jt,hr,qr,zr,Gr){for(var en=Pt.shared,Xr=en.gl,Rr,jr=0;jr<qr.length;++jr){var Br=qr[jr],Bn=Br.name,ui=Br.info.type,Ii=hr.uniforms[Bn],Ga=Pt.link(Br),ka=Ga+".location",wa;if(Ii){if(!zr(Ii))continue;if(ul(Ii)){var $a=Ii.value;if(ui===Ep||ui===Iv){var Ja=Pt.link($a._texture||$a.color[0]._texture);jt(Xr,".uniform1i(",ka,",",Ja+".bind());"),jt.exit(Ja,".unbind();")}else if(ui===Ec||ui===Ac||ui===Ih){var wo=Pt.global.def("new Float32Array(["+Array.prototype.slice.call($a)+"])"),Ya=2;ui===Ac?Ya=3:ui===Ih&&(Ya=4),jt(Xr,".uniformMatrix",Ya,"fv(",ka,",false,",wo,");")}else{switch(ui){case $o:Rr="1f";break;case as:Rr="2f";break;case fl:Rr="3f";break;case Zl:Rr="4f";break;case _c:Rr="1i";break;case Fl:Rr="1i";break;case ef:Rr="2i";break;case Du:Rr="2i";break;case Xd:Rr="3i";break;case qc:Rr="3i";break;case kd:Rr="4i";break;case Gc:Rr="4i";break}jt(Xr,".uniform",Rr,"(",ka,",",Ba($a)?Array.prototype.slice.call($a):$a,");")}continue}else wa=Ii.append(Pt,jt)}else{if(!zr(Yl))continue;wa=jt.def(en.uniforms,"[",mn.id(Bn),"]")}ui===Ep?jt("if(",wa,"&&",wa,'._reglType==="framebuffer"){',wa,"=",wa,".color[0];","}"):ui===Iv&&jt("if(",wa,"&&",wa,'._reglType==="framebufferCube"){',wa,"=",wa,".color[0];","}");var Ro=1;switch(ui){case Ep:case Iv:var Xo=jt.def(wa,"._texture");jt(Xr,".uniform1i(",ka,",",Xo,".bind());"),jt.exit(Xo,".unbind();");continue;case Fl:case _c:Rr="1i";break;case Du:case ef:Rr="2i",Ro=2;break;case qc:case Xd:Rr="3i",Ro=3;break;case Gc:case kd:Rr="4i",Ro=4;break;case $o:Rr="1f";break;case as:Rr="2f",Ro=2;break;case fl:Rr="3f",Ro=3;break;case Zl:Rr="4f",Ro=4;break;case Ec:Rr="Matrix2fv";break;case Ac:Rr="Matrix3fv";break;case Ih:Rr="Matrix4fv";break}if(Rr.charAt(0)==="M"){jt(Xr,".uniform",Rr,"(",ka,",");var Rs=Math.pow(ui-Ec+2,2),Qs=Pt.global.def("new Float32Array(",Rs,")");Array.isArray(wa)?jt("false,(",T(Rs,function(_f){return Qs+"["+_f+"]="+wa[_f]}),",",Qs,")"):jt("false,(Array.isArray(",wa,")||",wa," instanceof Float32Array)?",wa,":(",T(Rs,function(_f){return Qs+"["+_f+"]="+wa+"["+_f+"]"}),",",Qs,")"),jt(");")}else if(Ro>1){for(var cc=[],ac=[],yf=0;yf<Ro;++yf)Array.isArray(wa)?ac.push(wa[yf]):ac.push(jt.def(wa+"["+yf+"]")),Gr&&cc.push(jt.def());Gr&&jt("if(!",Pt.batchId,"||",cc.map(function(_f,bf){return _f+"!=="+ac[bf]}).join("||"),"){",cc.map(function(_f,bf){return _f+"="+ac[bf]+";"}).join("")),jt(Xr,".uniform",Rr,"(",ka,",",ac.join(","),");"),Gr&&jt("}")}else{if(Gr){var ff=jt.def();jt("if(!",Pt.batchId,"||",ff,"!==",wa,"){",ff,"=",wa,";")}jt(Xr,".uniform",Rr,"(",ka,",",wa,");"),Gr&&jt("}")}}}function tu(Pt,jt,hr,qr){var zr=Pt.shared,Gr=zr.gl,en=zr.draw,Xr=qr.draw;function Rr(){var Ro=Xr.elements,Xo,Rs=jt;return Ro?((Ro.contextDep&&qr.contextDynamic||Ro.propDep)&&(Rs=hr),Xo=Ro.append(Pt,Rs),Xr.elementsActive&&Rs("if("+Xo+")"+Gr+".bindBuffer("+vn+","+Xo+".buffer.buffer);")):(Xo=Rs.def(),Rs(Xo,"=",en,".",ot,";","if(",Xo,"){",Gr,".bindBuffer(",vn,",",Xo,".buffer.buffer);}","else if(",zr.vao,".currentVAO){",Xo,"=",Pt.shared.elements+".getElements("+zr.vao,".currentVAO.elements);",vs?"":"if("+Xo+")"+Gr+".bindBuffer("+vn+","+Xo+".buffer.buffer);","}")),Xo}function jr(){var Ro=Xr.count,Xo,Rs=jt;return Ro?((Ro.contextDep&&qr.contextDynamic||Ro.propDep)&&(Rs=hr),Xo=Ro.append(Pt,Rs)):Xo=Rs.def(en,".",ar),Xo}var Br=Rr();function Bn(Ro){var Xo=Xr[Ro];return Xo?Xo.contextDep&&qr.contextDynamic||Xo.propDep?Xo.append(Pt,hr):Xo.append(Pt,jt):jt.def(en,".",Ro)}var ui=Bn(bt),Ii=Bn(yr),Ga=jr();if(typeof Ga=="number"){if(Ga===0)return}else hr("if(",Ga,"){"),hr.exit("}");var ka,wa;so&&(ka=Bn(Ur),wa=Pt.instancing);var $a=Br+".type",Ja=Xr.elements&&ul(Xr.elements)&&!Xr.vaoActive;function wo(){function Ro(){hr(wa,".drawElementsInstancedANGLE(",[ui,Ga,$a,Ii+"<<(("+$a+"-"+As+")>>1)",ka],");")}function Xo(){hr(wa,".drawArraysInstancedANGLE(",[ui,Ii,Ga,ka],");")}Br&&Br!=="null"?Ja?Ro():(hr("if(",Br,"){"),Ro(),hr("}else{"),Xo(),hr("}")):Xo()}function Ya(){function Ro(){hr(Gr+".drawElements("+[ui,Ga,$a,Ii+"<<(("+$a+"-"+As+")>>1)"]+");")}function Xo(){hr(Gr+".drawArrays("+[ui,Ii,Ga]+");")}Br&&Br!=="null"?Ja?Ro():(hr("if(",Br,"){"),Ro(),hr("}else{"),Xo(),hr("}")):Xo()}so&&(typeof ka!="number"||ka>=0)?typeof ka=="string"?(hr("if(",ka,">0){"),wo(),hr("}else if(",ka,"<0){"),Ya(),hr("}")):wo():Ya()}function tc(Pt,jt,hr,qr,zr){var Gr=jo(),en=Gr.proc("body",zr);return so&&(Gr.instancing=en.def(Gr.shared.extensions,".angle_instanced_arrays")),Pt(Gr,en,hr,qr),Gr.compile().body}function uc(Pt,jt,hr,qr){Fc(Pt,jt),hr.useVAO?hr.drawVAO?jt(Pt.shared.vao,".setVAO(",hr.drawVAO.append(Pt,jt),");"):jt(Pt.shared.vao,".setVAO(",Pt.shared.vao,".targetVAO);"):(jt(Pt.shared.vao,".setVAO(null);"),Fp(Pt,jt,hr,qr.attributes,function(){return!0})),zp(Pt,jt,hr,qr.uniforms,function(){return!0},!1),tu(Pt,jt,jt,hr)}function Xe(Pt,jt){var hr=Pt.proc("draw",1);Fc(Pt,hr),_d(Pt,hr,jt.context),Hd(Pt,hr,jt.framebuffer),Ol(Pt,hr,jt),dp(Pt,hr,jt.state),Hf(Pt,hr,jt,!1,!0);var qr=jt.shader.progVar.append(Pt,hr);if(hr(Pt.shared.gl,".useProgram(",qr,".program);"),jt.shader.program)uc(Pt,hr,jt,jt.shader.program);else{hr(Pt.shared.vao,".setVAO(null);");var zr=Pt.global.def("{}"),Gr=hr.def(qr,".id"),en=hr.def(zr,"[",Gr,"]");hr(Pt.cond(en).then(en,".call(this,a0);").else(en,"=",zr,"[",Gr,"]=",Pt.link(function(Xr){return tc(uc,Pt,jt,Xr,1)}),"(",qr,");",en,".call(this,a0);"))}Object.keys(jt.state).length>0&&hr(Pt.shared.current,".dirty=true;"),Pt.shared.vao&&hr(Pt.shared.vao,".setVAO(null);")}function ne(Pt,jt,hr,qr){Pt.batchId="a1",Fc(Pt,jt);function zr(){return!0}Fp(Pt,jt,hr,qr.attributes,zr),zp(Pt,jt,hr,qr.uniforms,zr,!1),tu(Pt,jt,jt,hr)}function Fe(Pt,jt,hr,qr){Fc(Pt,jt);var zr=hr.contextDep,Gr=jt.def(),en="a0",Xr="a1",Rr=jt.def();Pt.shared.props=Rr,Pt.batchId=Gr;var jr=Pt.scope(),Br=Pt.scope();jt(jr.entry,"for(",Gr,"=0;",Gr,"<",Xr,";++",Gr,"){",Rr,"=",en,"[",Gr,"];",Br,"}",jr.exit);function Bn($a){return $a.contextDep&&zr||$a.propDep}function ui($a){return!Bn($a)}if(hr.needsContext&&_d(Pt,Br,hr.context),hr.needsFramebuffer&&Hd(Pt,Br,hr.framebuffer),dp(Pt,Br,hr.state,Bn),hr.profile&&Bn(hr.profile)&&Hf(Pt,Br,hr,!1,!0),qr)hr.useVAO?hr.drawVAO?Bn(hr.drawVAO)?Br(Pt.shared.vao,".setVAO(",hr.drawVAO.append(Pt,Br),");"):jr(Pt.shared.vao,".setVAO(",hr.drawVAO.append(Pt,jr),");"):jr(Pt.shared.vao,".setVAO(",Pt.shared.vao,".targetVAO);"):(jr(Pt.shared.vao,".setVAO(null);"),Fp(Pt,jr,hr,qr.attributes,ui),Fp(Pt,Br,hr,qr.attributes,Bn)),zp(Pt,jr,hr,qr.uniforms,ui,!1),zp(Pt,Br,hr,qr.uniforms,Bn,!0),tu(Pt,jr,Br,hr);else{var Ii=Pt.global.def("{}"),Ga=hr.shader.progVar.append(Pt,Br),ka=Br.def(Ga,".id"),wa=Br.def(Ii,"[",ka,"]");Br(Pt.shared.gl,".useProgram(",Ga,".program);","if(!",wa,"){",wa,"=",Ii,"[",ka,"]=",Pt.link(function($a){return tc(ne,Pt,hr,$a,2)}),"(",Ga,");}",wa,".call(this,a0[",Gr,"],",Gr,");")}}function me(Pt,jt){var hr=Pt.proc("batch",2);Pt.batchId="0",Fc(Pt,hr);var qr=!1,zr=!0;Object.keys(jt.context).forEach(function(Ii){qr=qr||jt.context[Ii].propDep}),qr||(_d(Pt,hr,jt.context),zr=!1);var Gr=jt.framebuffer,en=!1;Gr?(Gr.propDep?qr=en=!0:Gr.contextDep&&qr&&(en=!0),en||Hd(Pt,hr,Gr)):Hd(Pt,hr,null),jt.state.viewport&&jt.state.viewport.propDep&&(qr=!0);function Xr(Ii){return Ii.contextDep&&qr||Ii.propDep}Ol(Pt,hr,jt),dp(Pt,hr,jt.state,function(Ii){return!Xr(Ii)}),(!jt.profile||!Xr(jt.profile))&&Hf(Pt,hr,jt,!1,"a1"),jt.contextDep=qr,jt.needsContext=zr,jt.needsFramebuffer=en;var Rr=jt.shader.progVar;if(Rr.contextDep&&qr||Rr.propDep)Fe(Pt,hr,jt,null);else{var jr=Rr.append(Pt,hr);if(hr(Pt.shared.gl,".useProgram(",jr,".program);"),jt.shader.program)Fe(Pt,hr,jt,jt.shader.program);else{hr(Pt.shared.vao,".setVAO(null);");var Br=Pt.global.def("{}"),Bn=hr.def(jr,".id"),ui=hr.def(Br,"[",Bn,"]");hr(Pt.cond(ui).then(ui,".call(this,a0,a1);").else(ui,"=",Br,"[",Bn,"]=",Pt.link(function(Ii){return tc(Fe,Pt,jt,Ii,2)}),"(",jr,");",ui,".call(this,a0,a1);"))}}Object.keys(jt.state).length>0&&hr(Pt.shared.current,".dirty=true;"),Pt.shared.vao&&hr(Pt.shared.vao,".setVAO(null);")}function We(Pt,jt){var hr=Pt.proc("scope",3);Pt.batchId="a2";var qr=Pt.shared,zr=qr.current;if(_d(Pt,hr,jt.context),jt.framebuffer&&jt.framebuffer.append(Pt,hr),Va(Object.keys(jt.state)).forEach(function(Xr){var Rr=jt.state[Xr],jr=Rr.append(Pt,hr);Ba(jr)?jr.forEach(function(Br,Bn){Hs(Br)?hr.set(Pt.next[Xr],"["+Bn+"]",Br):hr.set(Pt.next[Xr],"["+Bn+"]",Pt.link(Br,{stable:!0}))}):ul(Rr)?hr.set(qr.next,"."+Xr,Pt.link(jr,{stable:!0})):hr.set(qr.next,"."+Xr,jr)}),Hf(Pt,hr,jt,!0,!0),[ot,yr,ar,Ur,bt].forEach(function(Xr){var Rr=jt.draw[Xr];if(Rr){var jr=Rr.append(Pt,hr);Hs(jr)?hr.set(qr.draw,"."+Xr,jr):hr.set(qr.draw,"."+Xr,Pt.link(jr),{stable:!0})}}),Object.keys(jt.uniforms).forEach(function(Xr){var Rr=jt.uniforms[Xr].append(Pt,hr);Array.isArray(Rr)&&(Rr="["+Rr.map(function(jr){return Hs(jr)?jr:Pt.link(jr,{stable:!0})})+"]"),hr.set(qr.uniforms,"["+Pt.link(mn.id(Xr),{stable:!0})+"]",Rr)}),Object.keys(jt.attributes).forEach(function(Xr){var Rr=jt.attributes[Xr].append(Pt,hr),jr=Pt.scopeAttrib(Xr);Object.keys(new ga).forEach(function(Br){hr.set(jr,"."+Br,Rr[Br])})}),jt.scopeVAO){var Gr=jt.scopeVAO.append(Pt,hr);Hs(Gr)?hr.set(qr.vao,".targetVAO",Gr):hr.set(qr.vao,".targetVAO",Pt.link(Gr,{stable:!0}))}function en(Xr){var Rr=jt.shader[Xr];if(Rr){var jr=Rr.append(Pt,hr);Hs(jr)?hr.set(qr.shader,"."+Xr,jr):hr.set(qr.shader,"."+Xr,Pt.link(jr,{stable:!0}))}}en(Ae),en(it),Object.keys(jt.state).length>0&&(hr(zr,".dirty=true;"),hr.exit(zr,".dirty=true;")),hr("a1(",Pt.shared.context,",a0,",Pt.batchId,");")}function At(Pt){if(!(typeof Pt!="object"||Ba(Pt))){for(var jt=Object.keys(Pt),hr=0;hr<jt.length;++hr)if(_.isDynamic(Pt[jt[hr]]))return!0;return!1}}function Yt(Pt,jt,hr){var qr=jt.static[hr];if(!qr||!At(qr))return;var zr=Pt.global,Gr=Object.keys(qr),en=!1,Xr=!1,Rr=!1,jr=Pt.global.def("{}");Gr.forEach(function(Bn){var ui=qr[Bn];if(_.isDynamic(ui)){typeof ui=="function"&&(ui=qr[Bn]=_.unbox(ui));var Ii=rl(ui,null);en=en||Ii.thisDep,Rr=Rr||Ii.propDep,Xr=Xr||Ii.contextDep}else{switch(zr(jr,".",Bn,"="),typeof ui){case"number":zr(ui);break;case"string":zr('"',ui,'"');break;case"object":Array.isArray(ui)&&zr("[",ui.join(),"]");break;default:zr(Pt.link(ui));break}zr(";")}});function Br(Bn,ui){Gr.forEach(function(Ii){var Ga=qr[Ii];if(_.isDynamic(Ga)){var ka=Bn.invoke(ui,Ga);ui(jr,".",Ii,"=",ka,";")}})}jt.dynamic[hr]=new _.DynamicVariable(Au,{thisDep:en,contextDep:Xr,propDep:Rr,ref:jr,append:Br}),delete jt.static[hr]}function tr(Pt,jt,hr,qr,zr){var Gr=jo();Gr.stats=Gr.link(zr),Object.keys(jt.static).forEach(function(Xr){Yt(Gr,jt,Xr)}),gr.forEach(function(Xr){Yt(Gr,Pt,Xr)});var en=Am(Pt,jt,hr,qr,Gr);return en.shader.program&&(en.shader.program.attributes.sort(function(Xr,Rr){return Xr.name<Rr.name?-1:1}),en.shader.program.uniforms.sort(function(Xr,Rr){return Xr.name<Rr.name?-1:1})),Xe(Gr,en),We(Gr,en),me(Gr,en),w(Gr.compile(),{destroy:function(){en.shader.program.destroy()}})}return{next:zs,current:Po,procs:(function(){var Pt=jo(),jt=Pt.proc("poll"),hr=Pt.proc("refresh"),qr=Pt.block();jt(qr),hr(qr);var zr=Pt.shared,Gr=zr.gl,en=zr.next,Xr=zr.current;qr(Xr,".dirty=false;"),Hd(Pt,jt),Hd(Pt,hr,null,!0);var Rr;so&&(Rr=Pt.link(so)),En.oes_vertex_array_object&&hr(Pt.link(En.oes_vertex_array_object),".bindVertexArrayOES(null);");var jr=hr.def(zr.attributes),Br=hr.def(0),Bn=Pt.cond(Br,".buffer");Bn.then(Gr,".enableVertexAttribArray(i);",Gr,".bindBuffer(",Nr,",",Br,".buffer.buffer);",Gr,".vertexAttribPointer(i,",Br,".size,",Br,".type,",Br,".normalized,",Br,".stride,",Br,".offset);").else(Gr,".disableVertexAttribArray(i);",Gr,".vertexAttrib4f(i,",Br,".x,",Br,".y,",Br,".z,",Br,".w);",Br,".buffer=null;");var ui=Pt.link(ia.maxAttributes,{stable:!0});return hr("for(var i=0;i<",ui,";++i){",Br,"=",jr,"[i];",Bn,"}"),so&&hr("for(var i=0;i<",ui,";++i){",Rr,".vertexAttribDivisorANGLE(i,",jr,"[i].divisor);","}"),hr(Pt.shared.vao,".currentVAO=null;",Pt.shared.vao,".setVAO(",Pt.shared.vao,".targetVAO);"),Object.keys(Ra).forEach(function(Ii){var Ga=Ra[Ii],ka=qr.def(en,".",Ii),wa=Pt.block();wa("if(",ka,"){",Gr,".enable(",Ga,")}else{",Gr,".disable(",Ga,")}",Xr,".",Ii,"=",ka,";"),hr(wa),jt("if(",ka,"!==",Xr,".",Ii,"){",wa,"}")}),Object.keys(ls).forEach(function(Ii){var Ga=ls[Ii],ka=Po[Ii],wa,$a,Ja=Pt.block();if(Ja(Gr,".",Ga,"("),Ba(ka)){var wo=ka.length;wa=Pt.global.def(en,".",Ii),$a=Pt.global.def(Xr,".",Ii),Ja(T(wo,function(Ya){return wa+"["+Ya+"]"}),");",T(wo,function(Ya){return $a+"["+Ya+"]="+wa+"["+Ya+"];"}).join("")),jt("if(",T(wo,function(Ya){return wa+"["+Ya+"]!=="+$a+"["+Ya+"]"}).join("||"),"){",Ja,"}")}else wa=qr.def(en,".",Ii),$a=qr.def(Xr,".",Ii),Ja(wa,");",Xr,".",Ii,"=",wa,";"),jt("if(",wa,"!==",$a,"){",Ja,"}");hr(Ja)}),Pt.compile()})(),compile:tr}}function Vc(){return{vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0}}var ou=34918,Zu=34919,Qc=35007,Ph=function(rr,mn){if(!mn.ext_disjoint_timer_query)return null;var En=[];function ia(){return En.pop()||mn.ext_disjoint_timer_query.createQueryEXT()}function Wa(Fa){En.push(Fa)}var zi=[];function Fi(Fa){var so=ia();mn.ext_disjoint_timer_query.beginQueryEXT(Qc,so),zi.push(so),Uo(zi.length-1,zi.length,Fa)}function Ao(){mn.ext_disjoint_timer_query.endQueryEXT(Qc)}function To(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}var Eo=[];function qo(){return Eo.pop()||new To}function qs(Fa){Eo.push(Fa)}var xs=[];function Uo(Fa,so,Ua){var vs=qo();vs.startQueryIndex=Fa,vs.endQueryIndex=so,vs.sum=0,vs.stats=Ua,xs.push(vs)}var io=[],xi=[];function ga(){var Fa,so,Ua=zi.length;if(Ua!==0){xi.length=Math.max(xi.length,Ua+1),io.length=Math.max(io.length,Ua+1),io[0]=0,xi[0]=0;var vs=0;for(Fa=0,so=0;so<zi.length;++so){var Po=zi[so];mn.ext_disjoint_timer_query.getQueryObjectEXT(Po,Zu)?(vs+=mn.ext_disjoint_timer_query.getQueryObjectEXT(Po,ou),Wa(Po)):zi[Fa++]=Po,io[so+1]=vs,xi[so+1]=Fa}for(zi.length=Fa,Fa=0,so=0;so<xs.length;++so){var zs=xs[so],Ha=zs.startQueryIndex,Ra=zs.endQueryIndex;zs.sum+=io[Ra]-io[Ha];var ls=xi[Ha],ua=xi[Ra];ua===ls?(zs.stats.gpuTime+=zs.sum/1e6,qs(zs)):(zs.startQueryIndex=ls,zs.endQueryIndex=ua,xs[Fa++]=zs)}xs.length=Fa}}return{beginQuery:Fi,endQuery:Ao,pushScopeStats:Uo,update:ga,getNumPendingQueries:function(){return zi.length},clear:function(){En.push.apply(En,zi);for(var Fa=0;Fa<En.length;Fa++)mn.ext_disjoint_timer_query.deleteQueryEXT(En[Fa]);zi.length=0,En.length=0},restore:function(){zi.length=0,En.length=0}}},xd=16384,Rl=256,Cc=1024,$c=34962,ud="webglcontextlost",Uf="webglcontextrestored",mv=1,Mf=2,cd=3;function qv(rr,mn){for(var En=0;En<rr.length;++En)if(rr[En]===mn)return En;return-1}function Th(rr){var mn=k(rr);if(!mn)return null;var En=mn.gl,ia=En.getContextAttributes();En.isContextLost();var Wa=P(En,mn);if(!Wa)return null;var zi=E(),Fi=Vc(),Ao=mn.cachedCode||{},To=Wa.extensions,Eo=Ph(En,To),qo=A(),qs=En.drawingBufferWidth,xs=En.drawingBufferHeight,Uo={tick:0,time:0,viewportWidth:qs,viewportHeight:xs,framebufferWidth:qs,framebufferHeight:xs,drawingBufferWidth:qs,drawingBufferHeight:xs,pixelRatio:mn.pixelRatio},io={},xi={elements:null,primitive:4,count:-1,offset:0,instances:-1},ga=ci(En,To),Fa=aa(En,Fi,mn,vs),so=gn(En,To,Fa,Fi),Ua=cm(En,To,ga,Fi,Fa,so,xi);function vs(tu){return Ua.destroyBuffer(tu)}var Po=Hv(En,zi,Fi,mn),zs=_m(En,To,ga,function(){ls.procs.poll()},Uo,Fi,mn),Ha=ug(En,To,ga,Fi,mn),Ra=Zg(En,To,ga,zs,Ha,Fi),ls=eu(En,zi,To,ga,Fa,so,zs,Ra,io,Ua,Po,xi,Uo,Eo,Ao,mn),ua=Np(En,Ra,ls.procs.poll,Uo),Wo=ls.next,Mo=En.canvas,Hs=[],au=[],ws=[],Xs=[mn.onDestroy],jo=null;function Jl(){if(Hs.length===0){Eo&&Eo.update(),jo=null;return}jo=x.next(Jl),Hd();for(var tu=Hs.length-1;tu>=0;--tu){var tc=Hs[tu];tc&&tc(Uo,null,0)}En.flush(),Eo&&Eo.update()}function Mu(){!jo&&Hs.length>0&&(jo=x.next(Jl))}function Fu(){jo&&(x.cancel(Jl),jo=null)}function cf(tu){tu.preventDefault(),Fu(),au.forEach(function(tc){tc()})}function zu(tu){En.getError(),Wa.restore(),Po.restore(),Fa.restore(),zs.restore(),Ha.restore(),Ra.restore(),Ua.restore(),Eo&&Eo.restore(),ls.procs.refresh(),Mu(),ws.forEach(function(tc){tc()})}Mo&&(Mo.addEventListener(ud,cf,!1),Mo.addEventListener(Uf,zu,!1));function mh(){Hs.length=0,Fu(),Mo&&(Mo.removeEventListener(ud,cf),Mo.removeEventListener(Uf,zu)),Po.clear(),Ra.clear(),Ha.clear(),Ua.clear(),zs.clear(),so.clear(),Fa.clear(),Eo&&Eo.clear(),Xs.forEach(function(tu){tu()})}function Wc(tu){function tc(zr){var Gr=w({},zr);delete Gr.uniforms,delete Gr.attributes,delete Gr.context,delete Gr.vao,"stencil"in Gr&&Gr.stencil.op&&(Gr.stencil.opBack=Gr.stencil.opFront=Gr.stencil.op,delete Gr.stencil.op);function en(Xr){if(Xr in Gr){var Rr=Gr[Xr];delete Gr[Xr],Object.keys(Rr).forEach(function(jr){Gr[Xr+"."+jr]=Rr[jr]})}}return en("blend"),en("depth"),en("cull"),en("stencil"),en("polygonOffset"),en("scissor"),en("sample"),"vao"in zr&&(Gr.vao=zr.vao),Gr}function uc(zr,Gr){var en={},Xr={};return Object.keys(zr).forEach(function(Rr){var jr=zr[Rr];if(_.isDynamic(jr)){Xr[Rr]=_.unbox(jr,Rr);return}else if(Gr&&Array.isArray(jr)){for(var Br=0;Br<jr.length;++Br)if(_.isDynamic(jr[Br])){Xr[Rr]=_.unbox(jr,Rr);return}}en[Rr]=jr}),{dynamic:Xr,static:en}}var Xe=uc(tu.context||{},!0),ne=uc(tu.uniforms||{},!0),Fe=uc(tu.attributes||{},!1),me=uc(tc(tu),!1),We={gpuTime:0,cpuTime:0,count:0},At=ls.compile(me,Fe,ne,Xe,We),Yt=At.draw,tr=At.batch,Pt=At.scope,jt=[];function hr(zr){for(;jt.length<zr;)jt.push(null);return jt}function qr(zr,Gr){var en;if(typeof zr=="function")return Pt.call(this,null,zr,0);if(typeof Gr=="function")if(typeof zr=="number")for(en=0;en<zr;++en)Pt.call(this,null,Gr,en);else if(Array.isArray(zr))for(en=0;en<zr.length;++en)Pt.call(this,zr[en],Gr,en);else return Pt.call(this,zr,Gr,0);else if(typeof zr=="number"){if(zr>0)return tr.call(this,hr(zr|0),zr|0)}else if(Array.isArray(zr)){if(zr.length)return tr.call(this,zr,zr.length)}else return Yt.call(this,zr)}return w(qr,{stats:We,destroy:function(){At.destroy()}})}var Zd=Ra.setFBO=Wc({framebuffer:_.define.call(null,mv,"framebuffer")});function jh(tu,tc){var uc=0;ls.procs.poll();var Xe=tc.color;Xe&&(En.clearColor(+Xe[0]||0,+Xe[1]||0,+Xe[2]||0,+Xe[3]||0),uc|=xd),"depth"in tc&&(En.clearDepth(+tc.depth),uc|=Rl),"stencil"in tc&&(En.clearStencil(tc.stencil|0),uc|=Cc),En.clear(uc)}function fp(tu){if("framebuffer"in tu)if(tu.framebuffer&&tu.framebuffer_reglType==="framebufferCube")for(var tc=0;tc<6;++tc)Zd(w({framebuffer:tu.framebuffer.faces[tc]},tu),jh);else Zd(tu,jh);else jh(null,tu)}function Am(tu){Hs.push(tu);function tc(){var uc=qv(Hs,tu);function Xe(){var ne=qv(Hs,Xe);Hs[ne]=Hs[Hs.length-1],Hs.length-=1,Hs.length<=0&&Fu()}Hs[uc]=Xe}return Mu(),{cancel:tc}}function _d(){var tu=Wo.viewport,tc=Wo.scissor_box;tu[0]=tu[1]=tc[0]=tc[1]=0,Uo.viewportWidth=Uo.framebufferWidth=Uo.drawingBufferWidth=tu[2]=tc[2]=En.drawingBufferWidth,Uo.viewportHeight=Uo.framebufferHeight=Uo.drawingBufferHeight=tu[3]=tc[3]=En.drawingBufferHeight}function Hd(){Uo.tick+=1,Uo.time=dp(),_d(),ls.procs.poll()}function Ol(){zs.refresh(),_d(),ls.procs.refresh(),Eo&&Eo.update()}function dp(){return(A()-qo)/1e3}Ol();function Fc(tu,tc){var uc;switch(tu){case"frame":return Am(tc);case"lost":uc=au;break;case"restore":uc=ws;break;case"destroy":uc=Xs;break}return uc.push(tc),{cancel:function(){for(var Xe=0;Xe<uc.length;++Xe)if(uc[Xe]===tc){uc[Xe]=uc[uc.length-1],uc.pop();return}}}}function Hf(){return Ao}function Fp(tu){Object.entries(tu).forEach(function(tc){Ao[tc[0]]=tc[1]})}var zp=w(Wc,{clear:fp,prop:_.define.bind(null,mv),context:_.define.bind(null,Mf),this:_.define.bind(null,cd),draw:Wc({}),buffer:function(tu){return Fa.create(tu,$c,!1,!1)},elements:function(tu){return so.create(tu,!1)},texture:zs.create2D,cube:zs.createCube,renderbuffer:Ha.create,framebuffer:Ra.create,framebufferCube:Ra.createCube,vao:Ua.createVAO,attributes:ia,frame:Am,on:Fc,limits:ga,hasExtension:function(tu){return ga.extensions.indexOf(tu.toLowerCase())>=0},read:ua,destroy:mh,_gl:En,_refresh:Ol,poll:function(){Hd(),Eo&&Eo.update()},now:dp,stats:Fi,getCachedCode:Hf,preloadCachedCode:Fp});return mn.onDone(null,zp),zp}return Th})}}),mK=U({"src/lib/prepare_regl.js"(pe,le){var w=Tbe(),R=oet();le.exports=function(z,l,u){var c=z._fullLayout,p=!0;return c._glcanvas.each(function(f){if(f.regl){f.regl.preloadCachedCode(u);return}if(!(f.pick&&!c._has("parcoords"))){try{f.regl=R({canvas:this,attributes:{antialias:!f.pick,preserveDrawingBuffer:!0},pixelRatio:z._context.plotGlPixelRatio||window.devicePixelRatio,extensions:l||[],cachedCode:u||{}})}catch{p=!1}f.regl||(p=!1),p&&this.addEventListener("webglcontextlost",function(v){z&&z.emit&&z.emit("plotly_webglcontextlost",{event:v,layer:f.key})},!1)}}),p||w({container:c._glcontainer.node()}),p}}}),pxe=U({"src/traces/scattergl/plot.js"(_,le){var w=$be(),R=ixe(),O=VQe(),z=aet(),l=ii(),u=m0().selectMode,c=mK(),p=Qd(),f=u_(),v=Vbe().styleTextSelection,h={};function m(x,A,E,D){var g=x._size,C=x.width*D,I=x.height*D,N=g.l*D,F=g.b*D,k=g.r*D,P=g.t*D,T=g.w*D,y=g.h*D;return[N+A.domain[0]*T,F+E.domain[0]*y,C-k-(1-A.domain[1])*T,I-P-(1-E.domain[1])*y]}var _=le.exports=function(A,E,D){if(D.length){var g=A._fullLayout,C=E._scene,I=E.xaxis,N=E.yaxis,F,k;if(C){var P=c(A,["ANGLE_instanced_arrays","OES_element_index_uint"],h);if(!P){C.init();return}var T=C.count,y=g._glcanvas.data()[0].regl;if(f(A,E,D),C.dirty){if((C.line2d||C.error2d)&&!(C.scatter2d||C.fill2d||C.glText)&&y.clear({color:!0,depth:!0}),C.error2d===!0&&(C.error2d=O(y)),C.line2d===!0&&(C.line2d=R(y)),C.scatter2d===!0&&(C.scatter2d=w(y)),C.fill2d===!0&&(C.fill2d=R(y)),C.glText===!0)for(C.glText=new Array(T),F=0;F<T;F++)C.glText[F]=new z(y);if(C.glText){if(T>C.glText.length){var S=T-C.glText.length;for(F=0;F<S;F++)C.glText.push(new z(y))}else if(T<C.glText.length){var M=C.glText.length-T,W=C.glText.splice(T,M);W.forEach(function(se){se.destroy()})}for(F=0;F<T;F++)C.glText[F].update(C.textOptions[F])}if(C.line2d&&(C.line2d.update(C.lineOptions),C.lineOptions=C.lineOptions.map(function(se){if(se&&se.positions){for(var Ee=se.positions,Te=0;Te<Ee.length&&(isNaN(Ee[Te])||isNaN(Ee[Te+1]));)Te+=2;for(var Be=Ee.length-2;Be>Te&&(isNaN(Ee[Be])||isNaN(Ee[Be+1]));)Be-=2;se.positions=Ee.slice(Te,Be+2)}return se}),C.line2d.update(C.lineOptions)),C.error2d){var $=(C.errorXOptions||[]).concat(C.errorYOptions||[]);C.error2d.update($)}C.scatter2d&&C.scatter2d.update(C.markerOptions),C.fillOrder=l.repeat(null,T),C.fill2d&&(C.fillOptions=C.fillOptions.map(function(se,Ee){var Te=D[Ee];if(!(!se||!Te||!Te[0]||!Te[0].trace)){var Be=Te[0],tt=Be.trace,at=Be.t,gt=C.lineOptions[Ee],pt,Rt,$t=[];tt._ownfill&&$t.push(Ee),tt._nexttrace&&$t.push(Ee+1),$t.length&&(C.fillOrder[Ee]=$t);var Wt=[],Ht=gt&&gt.positions||at.positions,Ft,st;if(tt.fill==="tozeroy"){for(Ft=0;Ft<Ht.length&&isNaN(Ht[Ft+1]);)Ft+=2;for(st=Ht.length-2;st>Ft&&isNaN(Ht[st+1]);)st-=2;Ht[Ft+1]!==0&&(Wt=[Ht[Ft],0]),Wt=Wt.concat(Ht.slice(Ft,st+2)),Ht[st+1]!==0&&(Wt=Wt.concat([Ht[st],0]))}else if(tt.fill==="tozerox"){for(Ft=0;Ft<Ht.length&&isNaN(Ht[Ft]);)Ft+=2;for(st=Ht.length-2;st>Ft&&isNaN(Ht[st]);)st-=2;Ht[Ft]!==0&&(Wt=[0,Ht[Ft+1]]),Wt=Wt.concat(Ht.slice(Ft,st+2)),Ht[st]!==0&&(Wt=Wt.concat([0,Ht[st+1]]))}else if(tt.fill==="toself"||tt.fill==="tonext"){for(Wt=[],pt=0,se.splitNull=!0,Rt=0;Rt<Ht.length;Rt+=2)(isNaN(Ht[Rt])||isNaN(Ht[Rt+1]))&&(Wt=Wt.concat(Ht.slice(pt,Rt)),Wt.push(Ht[pt],Ht[pt+1]),Wt.push(null,null),pt=Rt+2);Wt=Wt.concat(Ht.slice(pt)),pt&&Wt.push(Ht[pt],Ht[pt+1])}else{var rt=tt._nexttrace;if(rt){var Ue=C.lineOptions[Ee+1];if(Ue){var xt=Ue.positions;if(tt.fill==="tonexty"){for(Wt=Ht.slice(),Ee=Math.floor(xt.length/2);Ee--;){var Gt=xt[Ee*2],Jt=xt[Ee*2+1];isNaN(Gt)||isNaN(Jt)||Wt.push(Gt,Jt)}se.fill=rt.fillcolor}}}}if(tt._prevtrace&&tt._prevtrace.fill==="tonext"){var Ut=C.lineOptions[Ee-1].positions,kr=Wt.length/2;pt=kr;var Pr=[pt];for(Rt=0;Rt<Ut.length;Rt+=2)(isNaN(Ut[Rt])||isNaN(Ut[Rt+1]))&&(Pr.push(Rt/2+kr+1),pt=Rt+2);Wt=Wt.concat(Ut),se.hole=Pr}return se.fillmode=tt.fill,se.opacity=tt.opacity,se.positions=Wt,se}}),C.fill2d.update(C.fillOptions))}var Z=g.dragmode,K=u(Z),Q=g.clickmode.indexOf("select")>-1;for(F=0;F<T;F++){var J=D[F][0],G=J.trace,ee=J.t,re=ee.index,fe=G._length,we=ee.x,Oe=ee.y;if(G.selectedpoints||K||Q){if(K||(K=!0),G.selectedpoints){var ke=C.selectBatch[re]=l.selIndices2selPoints(G),Le={};for(k=0;k<ke.length;k++)Le[ke[k]]=1;var oe=[];for(k=0;k<fe;k++)Le[k]||oe.push(k);C.unselectBatch[re]=oe}var be=ee.xpx=new Array(fe),_e=ee.ypx=new Array(fe);for(k=0;k<fe;k++)be[k]=I.c2p(we[k]),_e[k]=N.c2p(Oe[k])}else ee.xpx=ee.ypx=null}if(K){if(C.select2d||(C.select2d=w(g._glcanvas.data()[1].regl)),C.scatter2d){var he=new Array(T);for(F=0;F<T;F++)he[F]=C.selectBatch[F].length||C.unselectBatch[F].length?C.markerUnselectedOptions[F]:{};C.scatter2d.update(he)}C.select2d&&(C.select2d.update(C.markerOptions),C.select2d.update(C.markerSelectedOptions)),C.glText&&D.forEach(function(se){var Ee=((se||[])[0]||{}).trace||{};p.hasText(Ee)&&v(se)})}else C.scatter2d&&C.scatter2d.update(C.markerOptions);var De={viewport:m(g,I,N,A._context.plotGlPixelRatio),range:[(I._rl||I.range)[0],(N._rl||N.range)[0],(I._rl||I.range)[1],(N._rl||N.range)[1]]},xe=l.repeat(De,C.count);C.fill2d&&C.fill2d.update(xe),C.line2d&&C.line2d.update(xe),C.error2d&&C.error2d.update(xe.concat(xe)),C.scatter2d&&C.scatter2d.update(xe),C.select2d&&C.select2d.update(xe),C.glText&&C.glText.forEach(function(se){se.update(De)})}}};_.reglPrecompiled=h}}),set=U({"src/traces/scattergl/index.js"(pe,le){var w=HJe();w.plot=pxe(),le.exports=w}}),uet=U({"lib/scattergl.js"(pe,le){le.exports=set()}}),vxe=U({"src/traces/splom/attributes.js"(pe,le){var w=Kc(),R=Jd(),O=Wp().axisHoverFormat,z=Js().hovertemplateAttrs,l=HU(),u=pf().idRegex,c=Tc().templatedArray,p=Ar().extendFlat,f=w.marker,v=f.line,h=p(R("marker.line",{editTypeOverride:"calc"}),{width:p({},v.width,{editType:"calc"}),editType:"calc"}),m=p(R("marker"),{symbol:f.symbol,angle:f.angle,size:p({},f.size,{editType:"markerSize"}),sizeref:f.sizeref,sizemin:f.sizemin,sizemode:f.sizemode,opacity:f.opacity,colorbar:f.colorbar,line:h,editType:"calc"});m.color.editType=m.cmin.editType=m.cmax.editType="style";function _(x){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:u[x],editType:"plot"}}}le.exports={dimensions:c("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:p({},l.text,{}),hovertext:p({},l.hovertext,{}),hovertemplate:z(),xhoverformat:O("x"),yhoverformat:O("y"),marker:m,xaxes:_("x"),yaxes:_("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:l.selected.marker,editType:"calc"},unselected:{marker:l.unselected.marker,editType:"calc"},opacity:l.opacity}}}),gK=U({"src/traces/parcoords/merge_length.js"(pe,le){le.exports=function(w,R,O,z){z||(z=1/0);var l,u;for(l=0;l<R.length;l++)u=R[l],u.visible&&(z=Math.min(z,u[O].length));for(z===1/0&&(z=0),w._length=z,l=0;l<R.length;l++)u=R[l],u.visible&&(u._length=z);return z}}}),cet=U({"src/traces/splom/defaults.js"(pe,le){var w=ii(),R=_g(),O=vxe(),z=Qd(),l=r0(),u=gK(),c=cK().isOpenSymbol;le.exports=function(h,m,_,x){function A(k,P){return w.coerce(h,m,O,k,P)}var E=R(h,m,{name:"dimensions",handleItemDefaults:p}),D=A("diagonal.visible"),g=A("showupperhalf"),C=A("showlowerhalf"),I=u(m,E,"values");if(!I||!D&&!g&&!C){m.visible=!1;return}A("text"),A("hovertext"),A("hovertemplate"),A("xhoverformat"),A("yhoverformat"),l(h,m,_,x,A,{noAngleRef:!0,noStandOff:!0});var N=c(m.marker.symbol),F=z.isBubble(m);A("marker.line.width",N||F?1:0),f(h,m,x,A),w.coerceSelectionMarkerOpacity(m,A)};function p(v,h){function m(x,A){return w.coerce(v,h,O.dimensions,x,A)}m("label");var _=m("values");_&&_.length?m("visible"):h.visible=!1,m("axis.type"),m("axis.matches")}function f(v,h,m,_){var x=h.dimensions,A=x.length,E=h.showupperhalf,D=h.showlowerhalf,g=h.diagonal.visible,C,I,N=new Array(A),F=new Array(A);for(C=0;C<A;C++){var k=C?C+1:"";N[C]="x"+k,F[C]="y"+k}var P=_("xaxes",N),T=_("yaxes",F),y=h._diag=new Array(A);h._xaxes={},h._yaxes={};var S=[],M=[];function W(fe,we,Oe,ke){if(fe){var Le=fe.charAt(0),oe=m._splomAxes[Le];if(h["_"+Le+"axes"][fe]=1,ke.push(fe),!(fe in oe)){var be=oe[fe]={};Oe&&(be.label=Oe.label||"",Oe.visible&&Oe.axis&&(Oe.axis.type&&(be.type=Oe.axis.type),Oe.axis.matches&&(be.matches=we)))}}}var $=!g&&!D,Z=!g&&!E;for(h._axesDim={},C=0;C<A;C++){var K=x[C],Q=C===0,J=C===A-1,G=Q&&$||J&&Z?void 0:P[C],ee=Q&&Z||J&&$?void 0:T[C];W(G,ee,K,S),W(ee,G,K,M),y[C]=[G,ee],h._axesDim[G]=C,h._axesDim[ee]=C}for(C=0;C<S.length;C++)for(I=0;I<M.length;I++){var re=S[C]+M[I];(C>I&&E||C<I&&D||C===I&&(g||!D||!E))&&(m._splomSubplots[re]=1)}(!D||!g&&E&&D)&&(m._splomGridDflt.xside="bottom",m._splomGridDflt.yside="left")}}}),fet=U({"src/traces/splom/scene_update.js"(pe,le){var w=ii();le.exports=function(O,z){var l=O._fullLayout,u=z.uid,c=l._splomScenes;c||(c=l._splomScenes={});var p={dirty:!0,selectBatch:[],unselectBatch:[]},f={matrix:!1,selectBatch:[],unselectBatch:[]},v=c[z.uid];return v||(v=c[u]=w.extendFlat({},p,f),v.draw=function(){v.matrix&&v.matrix.draw&&(v.selectBatch.length||v.unselectBatch.length?v.matrix.draw(v.unselectBatch,v.selectBatch):v.matrix.draw()),v.dirty=!1},v.destroy=function(){v.matrix&&v.matrix.destroy&&v.matrix.destroy(),v.matrixOptions=null,v.selectBatch=null,v.unselectBatch=null,v=null}),v.dirty||w.extendFlat(v,p),v}}}),det=U({"src/traces/splom/calc.js"(pe,le){var w=ii(),R=Tf(),O=my().calcMarkerSize,z=my().calcAxisExpansion,l=b0(),u=k6().markerSelection,c=k6().markerStyle,p=fet(),f=Dt().BADNUM,v=G4().TOO_MANY_POINTS;le.exports=function(m,_){var x=_.dimensions,A=_._length,E={},D=E.cdata=[],g=E.data=[],C=_._visibleDims=[],I,N,F,k,P;function T($,Z){for(var K=$.makeCalcdata({v:Z.values,vcalendar:_.calendar},"v"),Q=0;Q<K.length;Q++)K[Q]=K[Q]===f?NaN:K[Q];D.push(K),g.push($.type==="log"?w.simpleMap(K,$.c2l):K)}for(I=0;I<x.length;I++)if(F=x[I],F.visible){if(k=R.getFromId(m,_._diag[I][0]),P=R.getFromId(m,_._diag[I][1]),k&&P&&k.type!==P.type){w.log("Skipping splom dimension "+I+" with conflicting axis types");continue}k?(T(k,F),P&&P.type==="category"&&(P._categories=k._categories.slice())):T(P,F),C.push(I)}l(m,_),w.extendFlat(E,c(m,_));var y=D.length,S=y*A>v,M;for(S?M=E.sizeAvg||Math.max(E.size,3):M=O(_,A),N=0;N<C.length;N++)I=C[N],F=x[I],k=R.getFromId(m,_._diag[I][0])||{},P=R.getFromId(m,_._diag[I][1])||{},z(m,_,k,P,D[N],D[N],M);var W=p(m,_);return W.matrix||(W.matrix=!0),W.matrixOptions=E,W.selectedOptions=u(m,_,_.selected),W.unselectedOptions=u(m,_,_.unselected),[{x:!1,y:!1,t:{},trace:_}]}}}),het=U({"node_modules/performance-now/lib/performance-now.js"(pe,le){(function(){var w,R,O,z,l,u;typeof performance<"u"&&performance!==null&&performance.now?le.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(le.exports=function(){return(w()-l)/1e6},R=process.hrtime,w=function(){var c;return c=R(),c[0]*1e9+c[1]},z=w(),u=process.uptime()*1e9,l=z-u):Date.now?(le.exports=function(){return Date.now()-O},O=Date.now()):(le.exports=function(){return new Date().getTime()-O},O=new Date().getTime())}).call(pe)}}),pet=U({"node_modules/raf/index.js"(pe,le){var w=het(),R=window,O=["moz","webkit"],z="AnimationFrame",l=R["request"+z],u=R["cancel"+z]||R["cancelRequest"+z];for(c=0;!l&&c<O.length;c++)l=R[O[c]+"Request"+z],u=R[O[c]+"Cancel"+z]||R[O[c]+"CancelRequest"+z];var c;(!l||!u)&&(p=0,f=0,v=[],h=1e3/60,l=function(m){if(v.length===0){var _=w(),x=Math.max(0,h-(_-p));p=x+_,setTimeout(function(){var A=v.slice(0);v.length=0;for(var E=0;E<A.length;E++)if(!A[E].cancelled)try{A[E].callback(p)}catch(D){setTimeout(function(){throw D},0)}},Math.round(x))}return v.push({handle:++f,callback:m,cancelled:!1}),f},u=function(m){for(var _=0;_<v.length;_++)v[_].handle===m&&(v[_].cancelled=!0)});var p,f,v,h;le.exports=function(m){return l.call(R,m)},le.exports.cancel=function(){u.apply(R,arguments)},le.exports.polyfill=function(m){m||(m=R),m.requestAnimationFrame=l,m.cancelAnimationFrame=u}}}),vet=U({"node_modules/array-range/index.js"(pe,le){le.exports=function(R,O){var z=typeof R=="number",l=typeof O=="number";z&&!l?(O=R,R=0):!z&&!l&&(R=0,O=0),R=R|0,O=O|0;var u=O-R;if(u<0)throw new Error("array length must be positive");for(var c=new Array(u),p=0,f=R;p<u;p++,f++)c[p]=f;return c}}}),met=U({"node_modules/regl-splom/index.js"(pe,le){var w=$be(),R=NR(),O=M6(),z=pet(),l=vet(),u=BF(),c=R6();le.exports=p;function p(m,_){if(!(this instanceof p))return new p(m);this.traces=[],this.passes={},this.regl=m,this.scatter=w(m),this.canvas=this.scatter.canvas}p.prototype.render=function(...m){return m.length&&this.update(...m),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?this.planned==null&&(this.planned=z(()=>{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,z(()=>{this.dirty=!1})),this)},p.prototype.update=function(...m){if(!m.length)return;for(let A=0;A<m.length;A++)this.updateItem(A,m[A]);this.traces=this.traces.filter(Boolean);let _=[],x=0;for(let A=0;A<this.traces.length;A++){let E=this.traces[A],D=this.traces[A].passes;for(let g=0;g<D.length;g++)_.push(this.passes[D[g]]);E.passOffset=x,x+=E.passes.length}return this.scatter.update(..._),this},p.prototype.updateItem=function(m,_){let{regl:x}=this;if(_===null)return this.traces[m]=null,this;if(!_)return this;let A=R(_,{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"}),E=this.traces[m]||(this.traces[m]={id:m,buffer:x.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),color:"black",marker:null,size:12,borderColor:"transparent",borderSize:1,viewport:u([x._gl.drawingBufferWidth,x._gl.drawingBufferHeight]),padding:[0,0,0,0],opacity:1,diagonal:!0,upper:!0,lower:!0});if(A.color!=null&&(E.color=A.color),A.size!=null&&(E.size=A.size),A.marker!=null&&(E.marker=A.marker),A.borderColor!=null&&(E.borderColor=A.borderColor),A.borderSize!=null&&(E.borderSize=A.borderSize),A.opacity!=null&&(E.opacity=A.opacity),A.viewport&&(E.viewport=u(A.viewport)),A.diagonal!=null&&(E.diagonal=A.diagonal),A.upper!=null&&(E.upper=A.upper),A.lower!=null&&(E.lower=A.lower),A.data){E.buffer(c(A.data)),E.columns=A.data.length,E.count=A.data[0].length,E.bounds=[];for(let S=0;S<E.columns;S++)E.bounds[S]=O(A.data[S],1)}let D;A.range&&(E.range=A.range,D=E.range&&typeof E.range[0]!="number"),A.domain&&(E.domain=A.domain);let g=!1;A.padding!=null&&(Array.isArray(A.padding)&&A.padding.length===E.columns&&typeof A.padding[A.padding.length-1]=="number"?(E.padding=A.padding.map(h),g=!0):E.padding=h(A.padding));let C=E.columns,I=E.count,N=E.viewport.width,F=E.viewport.height,k=E.viewport.x,P=E.viewport.y,T=N/C,y=F/C;E.passes=[];for(let S=0;S<C;S++)for(let M=0;M<C;M++){if(!E.diagonal&&M===S||!E.upper&&S>M||!E.lower&&S<M)continue;let W=f(E.id,S,M),$=this.passes[W]||(this.passes[W]={});if(A.data&&(A.transpose?$.positions={x:{buffer:E.buffer,offset:M,count:I,stride:C},y:{buffer:E.buffer,offset:S,count:I,stride:C}}:$.positions={x:{buffer:E.buffer,offset:M*I,count:I},y:{buffer:E.buffer,offset:S*I,count:I}},$.bounds=v(E.bounds,S,M)),A.domain||A.viewport||A.data){let Z=g?v(E.padding,S,M):E.padding;if(E.domain){let[K,Q,J,G]=v(E.domain,S,M);$.viewport=[k+K*N+Z[0],P+Q*F+Z[1],k+J*N-Z[2],P+G*F-Z[3]]}else $.viewport=[k+M*T+T*Z[0],P+S*y+y*Z[1],k+(M+1)*T-T*Z[2],P+(S+1)*y-y*Z[3]]}A.color&&($.color=E.color),A.size&&($.size=E.size),A.marker&&($.marker=E.marker),A.borderSize&&($.borderSize=E.borderSize),A.borderColor&&($.borderColor=E.borderColor),A.opacity&&($.opacity=E.opacity),A.range&&($.range=D?v(E.range,S,M):E.range||$.bounds),E.passes.push(W)}return this},p.prototype.draw=function(...m){if(!m.length)this.scatter.draw();else{let _=[];for(let x=0;x<m.length;x++)if(typeof m[x]=="number"){let{passes:A,passOffset:E}=this.traces[m[x]];_.push(...l(E,E+A.length))}else if(m[x].length){let A=m[x],{passes:E,passOffset:D}=this.traces[x];E=E.map((g,C)=>{_[D+C]=A})}this.scatter.draw(..._)}return this},p.prototype.destroy=function(){return this.traces.forEach(m=>{m.buffer&&m.buffer.destroy&&m.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this};function f(m,_,x){let A=m.id!=null?m.id:m,E=_,D=x;return A<<16|(E&255)<<8|D&255}function v(m,_,x){let A,E,D,g,C=m[_],I=m[x];return C.length>2?(C[0],C[2],A=C[1],E=C[3]):C.length?(A=C[0],E=C[1]):(C.x,A=C.y,C.x+C.width,E=C.y+C.height),I.length>2?(D=I[0],g=I[2],I[1],I[3]):I.length?(D=I[0],g=I[1]):(D=I.x,I.y,g=I.x+I.width,I.y+I.height),[D,A,g,E]}function h(m){if(typeof m=="number")return[m,m,m,m];if(m.length===2)return[m[0],m[1],m[0],m[1]];{let _=u(m);return[_.x,_.y,_.x+_.width,_.y+_.height]}}}}),get=U({"src/traces/splom/plot.js"(pe,le){var w=met(),R=ii(),O=Tf(),z=m0().selectMode;le.exports=function(c,p,f){if(f.length)for(var v=0;v<f.length;v++)l(c,f[v][0])};function l(u,c){var p=u._fullLayout,f=p._size,v=c.trace,h=c.t,m=p._splomScenes[v.uid],_=m.matrixOptions,x=_.cdata,A=p._glcanvas.data()[0].regl,E=p.dragmode,D,g,C,I,N;if(x.length!==0){_.lower=v.showupperhalf,_.upper=v.showlowerhalf,_.diagonal=v.diagonal.visible;var F=v._visibleDims,k=x.length,P=m.viewOpts={};for(P.ranges=new Array(k),P.domains=new Array(k),N=0;N<F.length;N++){C=F[N];var T=P.ranges[N]=new Array(4),y=P.domains[N]=new Array(4);D=O.getFromId(u,v._diag[C][0]),D&&(T[0]=D._rl[0],T[2]=D._rl[1],y[0]=D.domain[0],y[2]=D.domain[1]),g=O.getFromId(u,v._diag[C][1]),g&&(T[1]=g._rl[0],T[3]=g._rl[1],y[1]=g.domain[0],y[3]=g.domain[1])}var S=u._context.plotGlPixelRatio,M=f.l*S,W=f.b*S,$=f.w*S,Z=f.h*S;P.viewport=[M,W,$+M,Z+W],m.matrix===!0&&(m.matrix=w(A));var K=p.clickmode.indexOf("select")>-1,Q=z(E)||!!v.selectedpoints||K,J=!0;if(Q){var G=v._length;if(v.selectedpoints){m.selectBatch=v.selectedpoints;var ee=v.selectedpoints,re={};for(C=0;C<ee.length;C++)re[ee[C]]=!0;var fe=[];for(C=0;C<G;C++)re[C]||fe.push(C);m.unselectBatch=fe}var we=h.xpx=new Array(k),Oe=h.ypx=new Array(k);for(N=0;N<F.length;N++){if(C=F[N],D=O.getFromId(u,v._diag[C][0]),D)for(we[N]=new Array(G),I=0;I<G;I++)we[N][I]=D.c2p(x[N][I]);if(g=O.getFromId(u,v._diag[C][1]),g)for(Oe[N]=new Array(G),I=0;I<G;I++)Oe[N][I]=g.c2p(x[N][I])}if(m.selectBatch.length||m.unselectBatch.length){var ke=R.extendFlat({},_,m.unselectedOptions,P),Le=R.extendFlat({},_,m.selectedOptions,P);m.matrix.update(ke,Le),J=!1}}else h.xpx=h.ypx=null;if(J){var oe=R.extendFlat({},_,P);m.matrix.update(oe,null)}}}}}),mxe=U({"src/traces/splom/helpers.js"(pe){pe.getDimIndex=function(w,R){for(var O=R._id,z=O.charAt(0),l={x:0,y:1}[z],u=w._visibleDims,c=0;c<u.length;c++){var p=u[c];if(w._diag[p][l]===O)return c}return!1}}}),yet=U({"src/traces/splom/hover.js"(pe,le){var w=mxe(),R=uK().calcHover,O=Yu().getFromId,z=Ar().extendFlat;function l(c,p,f,v,h){h||(h={});var m=(v||"").charAt(0)==="x",_=(v||"").charAt(0)==="y",x=u(c,p,f);if((m||_)&&h.hoversubplots==="axis"&&x[0])for(var A=(m?c.xa:c.ya)._subplotsWith,E=h.gd,D=z({},c),g=0;g<A.length;g++){var C=A[g];if(C!==c.xa._id+c.ya._id){_?D.xa=O(E,C,"x"):D.ya=O(E,C,"y");var I=m||_,N=u(D,p,f,I);x=x.concat(N)}}return x}function u(c,p,f,v){var h=c.cd,m=h[0].trace,_=c.scene,x=_.matrixOptions.cdata,A=c.xa,E=c.ya,D=A.c2p(p),g=E.c2p(f),C=c.distance,I=w.getDimIndex(m,A),N=w.getDimIndex(m,E);if(I===!1||N===!1)return[c];for(var F=x[I],k=x[N],P,T,y=C,S=0;S<F.length;S++)if(!(v&&S!==c.index)){var M=F[S],W=k[S],$=A.c2p(M)-D,Z=E.c2p(W)-g,K=Math.sqrt($*$+Z*Z);(v||K<y)&&(y=T=K,P=S)}return c.index=P,c.distance=y,c.dxy=T,P===void 0?[c]:[R(c,F,k,m)]}le.exports={hoverPoints:l}}}),bet=U({"src/traces/splom/select.js"(pe,le){var w=ii(),R=w.pushUnique,O=Qd(),z=mxe();le.exports=function(u,c){var p=u.cd,f=p[0].trace,v=p[0].t,h=u.scene,m=h.matrixOptions.cdata,_=u.xaxis,x=u.yaxis,A=[];if(!h)return A;var E=!O.hasMarkers(f)&&!O.hasText(f);if(f.visible!==!0||E)return A;var D=z.getDimIndex(f,_),g=z.getDimIndex(f,x);if(D===!1||g===!1)return A;var C=v.xpx[D],I=v.ypx[g],N=m[D],F=m[g],k=(u.scene.selectBatch||[]).slice(),P=[];if(c!==!1&&!c.degenerate)for(var T=0;T<N.length;T++)c.contains([C[T],I[T]],null,T,u)?(A.push({pointNumber:T,x:N[T],y:F[T]}),R(k,T)):k.indexOf(T)!==-1?R(k,T):P.push(T);var y=h.matrixOptions;return!k.length&&!P.length?h.matrix.update(y,null):!h.selectBatch.length&&!h.unselectBatch.length&&h.matrix.update(h.unselectedOptions,w.extendFlat({},y,h.selectedOptions,h.viewOpts)),h.selectBatch=k,h.unselectBatch=P,A}}}),xet=U({"src/traces/splom/edit_style.js"(pe,le){var w=ii(),R=b0(),O=k6().markerStyle;le.exports=function(l,u){var c=u.trace,p=l._fullLayout._splomScenes[c.uid];if(p){R(l,c),w.extendFlat(p.matrixOptions,O(l,c));var f=w.extendFlat({},p.matrixOptions,p.viewOpts);p.matrix.update(f,null)}}}}),_et=U({"src/traces/splom/base_index.js"(pe,le){var w=Mi(),R=U0();le.exports={moduleType:"trace",name:"splom",categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:vxe(),supplyDefaults:cet(),colorbar:qg(),calc:det(),plot:get(),hoverPoints:yet().hoverPoints,selectPoints:bet(),editStyle:xet(),meta:{}},w.register(R)}}),wet=U({"src/traces/splom/base_plot.js"(pe,le){var w=ixe(),R=Mi(),O=mK(),z=Om().getModuleCalcData,l=Rf(),u=Tf().getFromId,c=Yu().shouldShowZeroLine,p="splom",f={};function v(E){var D=E._fullLayout,g=R.getModule(p),C=z(E.calcdata,g)[0],I=O(E,["ANGLE_instanced_arrays","OES_element_index_uint"],f);I&&(D._hasOnlyLargeSploms&&_(E),g.plot(E,{},C))}function h(E){var D=E.calcdata,g=E._fullLayout;g._hasOnlyLargeSploms&&_(E);for(var C=0;C<D.length;C++){var I=D[C][0],N=I.trace,F=g._splomScenes[N.uid];N.type==="splom"&&F&&F.matrix&&m(E,N,F)}}function m(E,D,g){for(var C=g.matrixOptions.data.length,I=D._visibleDims,N=g.viewOpts.ranges=new Array(C),F=0;F<I.length;F++){var k=I[F],P=N[F]=new Array(4),T=u(E,D._diag[k][0]);T&&(P[0]=T.r2l(T.range[0]),P[2]=T.r2l(T.range[1]));var y=u(E,D._diag[k][1]);y&&(P[1]=y.r2l(y.range[0]),P[3]=y.r2l(y.range[1]))}g.selectBatch.length||g.unselectBatch.length?g.matrix.update({ranges:N},{ranges:N}):g.matrix.update({ranges:N})}function _(E){var D=E._fullLayout,g=D._glcanvas.data()[0].regl,C=D._splomGrid;C||(C=D._splomGrid=w(g)),C.update(x(E))}function x(E){var D=E._context.plotGlPixelRatio,g=E._fullLayout,C=g._size,I=[0,0,g.width*D,g.height*D],N={},F;function k(fe,we,Oe,ke,Le,oe){Oe*=D,ke*=D,Le*=D,oe*=D;var be=we[fe+"color"],_e=we[fe+"width"],he=String(be+_e);he in N?N[he].data.push(NaN,NaN,Oe,ke,Le,oe):N[he]={data:[Oe,ke,Le,oe],join:"rect",thickness:_e*D,color:be,viewport:I,range:I,overlay:!1}}for(F in g._splomSubplots){var P=g._plots[F],T=P.xaxis,y=P.yaxis,S=T._gridVals,M=y._gridVals,W=T._offset,$=T._length,Z=y._length,K=C.b+y.domain[0]*C.h,Q=-y._m,J=-Q*y.r2l(y.range[0],y.calendar),G,ee;if(T.showgrid)for(F=0;F<S.length;F++)G=W+T.l2p(S[F].x),k("grid",T,G,K,G,K+Z);if(y.showgrid)for(F=0;F<M.length;F++)ee=K+J+Q*M[F].x,k("grid",y,W,ee,W+$,ee);c(E,T,y)&&(G=W+T.l2p(0),k("zeroline",T,G,K,G,K+Z)),c(E,y,T)&&(ee=K+J+0,k("zeroline",y,W,ee,W+$,ee))}var re=[];for(F in N)re.push(N[F]);return re}function A(E,D,g,C){var I={},N;if(C._splomScenes){for(N=0;N<E.length;N++){var F=E[N];F.type==="splom"&&(I[F.uid]=1)}for(N=0;N<g.length;N++){var k=g[N];if(!I[k.uid]){var P=C._splomScenes[k.uid];P&&P.destroy&&P.destroy(),C._splomScenes[k.uid]=null,delete C._splomScenes[k.uid]}}}Object.keys(C._splomScenes||{}).length===0&&delete C._splomScenes,C._splomGrid&&!D._hasOnlyLargeSploms&&C._hasOnlyLargeSploms&&(C._splomGrid.destroy(),C._splomGrid=null,delete C._splomGrid),l.clean(E,D,g,C)}le.exports={name:p,attr:l.attr,attrRegex:l.attrRegex,layoutAttributes:l.layoutAttributes,supplyLayoutDefaults:l.supplyLayoutDefaults,drawFramework:l.drawFramework,plot:v,drag:h,updateGrid:_,clean:A,updateFx:l.updateFx,toSVG:l.toSVG,reglPrecompiled:f}}}),Tet=U({"src/traces/splom/index.js"(pe,le){var w=_et();w.basePlotModule=wet(),le.exports=w}}),Eet=U({"lib/splom.js"(pe,le){le.exports=Tet()}}),gxe=U({"src/traces/parcoords/attributes.js"(pe,le){var w=Jd(),R=Hg(),O=Ir(),z=oh().attributes,l=Ar().extendFlat,u=Tc().templatedArray;le.exports={domain:z({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:O({editType:"plot"}),tickfont:O({autoShadowDflt:!0,editType:"plot"}),rangefont:O({editType:"plot"}),dimensions:u("dimension",{label:{valType:"string",editType:"plot"},tickvals:l({},R.tickvals,{editType:"plot"}),ticktext:l({},R.ticktext,{editType:"plot"}),tickformat:l({},R.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:l({editType:"calc"},w("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"}}}}),GU=U({"src/traces/parcoords/constants.js"(pe,le){le.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"}}}}),FR=U({"src/lib/gup.js"(pe,le){var w=Dn();function R(O){return[O]}le.exports={keyFun:function(O){return O.key},repeat:R,descend:w,wrap:R,unwrap:function(O){return O[0]}}}}),yxe=U({"src/traces/parcoords/axisbrush.js"(pe,le){var w=GU(),R=Ze(),O=FR().keyFun,z=FR().repeat,l=ii().sorterAsc,u=ii().strTranslate,c=w.bar.snapRatio;function p(re,fe){return re*(1-c)+fe*c}var f=w.bar.snapClose;function v(re,fe){return re*(1-f)+fe*f}function h(re,fe,we,Oe){if(m(we,Oe))return we;var ke=re?-1:1,Le=0,oe=fe.length-1;if(ke<0){var be=Le;Le=oe,oe=be}for(var _e=fe[Le],he=_e,De=Le;ke*De<ke*oe;De+=ke){var xe=De+ke,se=fe[xe];if(ke*we<ke*v(_e,se))return p(_e,he);if(ke*we<ke*se||xe===oe)return p(se,_e);he=_e,_e=se}}function m(re,fe){for(var we=0;we<fe.length;we++)if(re>=fe[we][0]&&re<=fe[we][1])return!0;return!1}function _(re){re.attr("x",-w.bar.captureWidth/2).attr("width",w.bar.captureWidth)}function x(re){re.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function A(re){if(!re.brush.filterSpecified)return"0,"+re.height;for(var fe=E(re.brush.filter.getConsolidated(),re.height),we=[0],Oe,ke,Le,oe=fe.length?fe[0][0]:null,be=0;be<fe.length;be++)Oe=fe[be],ke=Oe[1]-Oe[0],we.push(oe),we.push(ke),Le=be+1,Le<fe.length&&(oe=fe[Le][0]-Oe[1]);return we.push(re.height),we}function E(re,fe){return re.map(function(we){return we.map(function(Oe){return Math.max(0,Oe*fe)}).sort(l)})}function D(re,fe){var we=w.bar.handleHeight;if(!(fe>re[1]+we||fe<re[0]-we))return fe>=.9*re[1]+.1*re[0]?"n":fe<=.9*re[0]+.1*re[1]?"s":"ns"}function g(){R.select(document.body).style("cursor",null)}function C(re){re.attr("stroke-dasharray",A)}function I(re,fe){var we=R.select(re).selectAll(".highlight, .highlight-shadow"),Oe=fe?we.transition().duration(w.bar.snapDuration).each("end",fe):we;C(Oe)}function N(re,fe){var we=re.brush,Oe=we.filterSpecified,ke=NaN,Le={},oe;if(Oe){var be=re.height,_e=we.filter.getConsolidated(),he=E(_e,be),De=NaN,xe=NaN,se=NaN;for(oe=0;oe<=he.length;oe++){var Ee=he[oe];if(Ee&&Ee[0]<=fe&&fe<=Ee[1]){De=oe;break}else if(xe=oe?oe-1:NaN,Ee&&Ee[0]>fe){se=oe;break}}if(ke=De,isNaN(ke)&&(isNaN(xe)||isNaN(se)?ke=isNaN(xe)?se:xe:ke=fe-he[xe][1]<he[se][0]-fe?xe:se),!isNaN(ke)){var Te=he[ke],Be=D(Te,fe);Be&&(Le.interval=_e[ke],Le.intervalPix=Te,Le.region=Be)}}if(re.ordinal&&!Le.region){var tt=re.unitTickvals,at=re.unitToPaddedPx.invert(fe);for(oe=0;oe<tt.length;oe++){var gt=[tt[Math.max(oe-1,0)]*.25+tt[oe]*.75,tt[Math.min(oe+1,tt.length-1)]*.25+tt[oe]*.75];if(at>=gt[0]&&at<=gt[1]){Le.clickableOrdinalRange=gt;break}}}return Le}function F(re,fe){R.event.sourceEvent.stopPropagation();var we=fe.height-R.mouse(re)[1]-2*w.verticalPadding,Oe=fe.unitToPaddedPx.invert(we),ke=fe.brush,Le=N(fe,we),oe=Le.interval,be=ke.svgBrush;if(be.wasDragged=!1,be.grabbingBar=Le.region==="ns",be.grabbingBar){var _e=oe.map(fe.unitToPaddedPx);be.grabPoint=we-_e[0]-w.verticalPadding,be.barLength=_e[1]-_e[0]}be.clickableOrdinalRange=Le.clickableOrdinalRange,be.stayingIntervals=fe.multiselect&&ke.filterSpecified?ke.filter.getConsolidated():[],oe&&(be.stayingIntervals=be.stayingIntervals.filter(function(he){return he[0]!==oe[0]&&he[1]!==oe[1]})),be.startExtent=Le.region?oe[Le.region==="s"?1:0]:Oe,fe.parent.inBrushDrag=!0,be.brushStartCallback()}function k(re,fe){R.event.sourceEvent.stopPropagation();var we=fe.height-R.mouse(re)[1]-2*w.verticalPadding,Oe=fe.brush.svgBrush;Oe.wasDragged=!0,Oe._dragging=!0,Oe.grabbingBar?Oe.newExtent=[we-Oe.grabPoint,we+Oe.barLength-Oe.grabPoint].map(fe.unitToPaddedPx.invert):Oe.newExtent=[Oe.startExtent,fe.unitToPaddedPx.invert(we)].sort(l),fe.brush.filterSpecified=!0,Oe.extent=Oe.stayingIntervals.concat([Oe.newExtent]),Oe.brushCallback(fe),I(re.parentNode)}function P(re,fe){var we=fe.brush,Oe=we.filter,ke=we.svgBrush;ke._dragging||(T(re,fe),k(re,fe),fe.brush.svgBrush.wasDragged=!1),ke._dragging=!1;var Le=R.event;Le.sourceEvent.stopPropagation();var oe=ke.grabbingBar;if(ke.grabbingBar=!1,ke.grabLocation=void 0,fe.parent.inBrushDrag=!1,g(),!ke.wasDragged){ke.wasDragged=void 0,ke.clickableOrdinalRange?we.filterSpecified&&fe.multiselect?ke.extent.push(ke.clickableOrdinalRange):(ke.extent=[ke.clickableOrdinalRange],we.filterSpecified=!0):oe?(ke.extent=ke.stayingIntervals,ke.extent.length===0&&Z(we)):Z(we),ke.brushCallback(fe),I(re.parentNode),ke.brushEndCallback(we.filterSpecified?Oe.getConsolidated():[]);return}var be=function(){Oe.set(Oe.getConsolidated())};if(fe.ordinal){var _e=fe.unitTickvals;_e[_e.length-1]<_e[0]&&_e.reverse(),ke.newExtent=[h(0,_e,ke.newExtent[0],ke.stayingIntervals),h(1,_e,ke.newExtent[1],ke.stayingIntervals)];var he=ke.newExtent[1]>ke.newExtent[0];ke.extent=ke.stayingIntervals.concat(he?[ke.newExtent]:[]),ke.extent.length||Z(we),ke.brushCallback(fe),he?I(re.parentNode,be):(be(),I(re.parentNode))}else be();ke.brushEndCallback(we.filterSpecified?Oe.getConsolidated():[])}function T(re,fe){var we=fe.height-R.mouse(re)[1]-2*w.verticalPadding,Oe=N(fe,we),ke="crosshair";Oe.clickableOrdinalRange?ke="pointer":Oe.region&&(ke=Oe.region+"-resize"),R.select(document.body).style("cursor",ke)}function y(re){re.on("mousemove",function(fe){R.event.preventDefault(),fe.parent.inBrushDrag||T(this,fe)}).on("mouseleave",function(fe){fe.parent.inBrushDrag||g()}).call(R.behavior.drag().on("dragstart",function(fe){F(this,fe)}).on("drag",function(fe){k(this,fe)}).on("dragend",function(fe){P(this,fe)}))}function S(re,fe){return re[0]-fe[0]}function M(re,fe,we){var Oe=we._context.staticPlot,ke=re.selectAll(".background").data(z);ke.enter().append("rect").classed("background",!0).call(_).call(x).style("pointer-events",Oe?"none":"auto").attr("transform",u(0,w.verticalPadding)),ke.call(y).attr("height",function(be){return be.height-w.verticalPadding});var Le=re.selectAll(".highlight-shadow").data(z);Le.enter().append("line").classed("highlight-shadow",!0).attr("x",-w.bar.width/2).attr("stroke-width",w.bar.width+w.bar.strokeWidth).attr("stroke",fe).attr("opacity",w.bar.strokeOpacity).attr("stroke-linecap","butt"),Le.attr("y1",function(be){return be.height}).call(C);var oe=re.selectAll(".highlight").data(z);oe.enter().append("line").classed("highlight",!0).attr("x",-w.bar.width/2).attr("stroke-width",w.bar.width-w.bar.strokeWidth).attr("stroke",w.bar.fillColor).attr("opacity",w.bar.fillOpacity).attr("stroke-linecap","butt"),oe.attr("y1",function(be){return be.height}).call(C)}function W(re,fe,we){var Oe=re.selectAll("."+w.cn.axisBrush).data(z,O);Oe.enter().append("g").classed(w.cn.axisBrush,!0),M(Oe,fe,we)}function $(re){return re.svgBrush.extent.map(function(fe){return fe.slice()})}function Z(re){re.filterSpecified=!1,re.svgBrush.extent=[[-1/0,1/0]]}function K(re){return function(we){var Oe=we.brush,ke=$(Oe),Le=ke.slice();Oe.filter.set(Le),re()}}function Q(re){for(var fe=re.slice(),we=[],Oe,ke=fe.shift();ke;){for(Oe=ke.slice();(ke=fe.shift())&&ke[0]<=Oe[1];)Oe[1]=Math.max(Oe[1],ke[1]);we.push(Oe)}return we.length===1&&we[0][0]>we[0][1]&&(we=[]),we}function J(){var re=[],fe,we;return{set:function(Oe){re=Oe.map(function(ke){return ke.slice().sort(l)}).sort(S),re.length===1&&re[0][0]===-1/0&&re[0][1]===1/0&&(re=[[0,-1]]),fe=Q(re),we=re.reduce(function(ke,Le){return[Math.min(ke[0],Le[0]),Math.max(ke[1],Le[1])]},[1/0,-1/0])},get:function(){return re.slice()},getConsolidated:function(){return fe},getBounds:function(){return we}}}function G(re,fe,we,Oe,ke,Le){var oe=J();return oe.set(we),{filter:oe,filterSpecified:fe,svgBrush:{extent:[],brushStartCallback:Oe,brushCallback:K(ke),brushEndCallback:Le}}}function ee(re,fe){if(Array.isArray(re[0])?(re=re.map(function(Oe){return Oe.sort(l)}),fe.multiselect?re=Q(re.sort(S)):re=[re[0]]):re=[re.sort(l)],fe.tickvals){var we=fe.tickvals.slice().sort(l);if(re=re.map(function(Oe){var ke=[h(0,we,Oe[0],[]),h(1,we,Oe[1],[])];if(ke[1]>ke[0])return ke}).filter(function(Oe){return Oe}),!re.length)return}return re.length>1?re:re[0]}le.exports={makeBrush:G,ensureAxisBrush:W,cleanRanges:ee}}}),Aet=U({"src/traces/parcoords/defaults.js"(pe,le){var w=ii(),R=Ug().hasColorscale,O=wg(),z=oh().defaults,l=_g(),u=Yu(),c=gxe(),p=yxe(),f=GU().maxDimensionCount,v=gK();function h(_,x,A,E,D){var g=D("line.color",A);if(R(_,"line")&&w.isArrayOrTypedArray(g)){if(g.length)return D("line.colorscale"),O(_,x,E,D,{prefix:"line.",cLetter:"c"}),g.length;x.line.color=A}return 1/0}function m(_,x,A,E){function D(F,k){return w.coerce(_,x,c.dimensions,F,k)}var g=D("values"),C=D("visible");if(g&&g.length||(C=x.visible=!1),C){D("label"),D("tickvals"),D("ticktext"),D("tickformat");var I=D("range");x._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:I},u.setConvert(x._ax,E.layout),D("multiselect");var N=D("constraintrange");N&&(x.constraintrange=p.cleanRanges(N,x))}}le.exports=function(x,A,E,D){function g(k,P){return w.coerce(x,A,c,k,P)}var C=x.dimensions;Array.isArray(C)&&C.length>f&&(w.log("parcoords traces support up to "+f+" dimensions at the moment"),C.splice(f));var I=l(x,A,{name:"dimensions",layout:D,handleItemDefaults:m}),N=h(x,A,E,D,g);z(A,D,g),(!Array.isArray(I)||!I.length)&&(A.visible=!1),v(A,I,"values",N);var F=w.extendFlat({},D.font,{size:Math.round(D.font.size/1.2)});w.coerceFont(g,"labelfont",F),w.coerceFont(g,"tickfont",F,{autoShadowDflt:!0}),w.coerceFont(g,"rangefont",F),g("labelangle"),g("labelside"),g("unselected.line.color"),g("unselected.line.opacity")}}}),Cet=U({"src/traces/parcoords/calc.js"(pe,le){var w=ii().isArrayOrTypedArray,R=vd(),O=FR().wrap;le.exports=function(u,c){var p,f;return R.hasColorscale(c,"line")&&w(c.line.color)?(p=c.line.color,f=R.extractOpts(c.line).colorscale,R.calc(u,c,{vals:p,containerStr:"line",cLetter:"c"})):(p=z(c._length),f=[[0,c.line.color],[1,c.line.color]]),O({lineColor:p,cscale:f})};function z(l){for(var u=new Array(l),c=0;c<l;c++)u[c]=.5;return u}}});function Met(pe){var le,w,R,O=[],z=1,l;if(typeof pe=="number")return{space:"rgb",values:[pe>>>16,(pe&65280)>>>8,pe&255],alpha:1};if(typeof pe=="number")return{space:"rgb",values:[pe>>>16,(pe&65280)>>>8,pe&255],alpha:1};if(pe=String(pe).toLowerCase(),yK.default[pe])O=yK.default[pe].slice(),l="rgb";else if(pe==="transparent")z=0,l="rgb",O=[0,0,0];else if(pe[0]==="#"){var u=pe.slice(1),c=u.length,p=c<=4;z=1,p?(O=[parseInt(u[0]+u[0],16),parseInt(u[1]+u[1],16),parseInt(u[2]+u[2],16)],c===4&&(z=parseInt(u[3]+u[3],16)/255)):(O=[parseInt(u[0]+u[1],16),parseInt(u[2]+u[3],16),parseInt(u[4]+u[5],16)],c===8&&(z=parseInt(u[6]+u[7],16)/255)),O[0]||(O[0]=0),O[1]||(O[1]=0),O[2]||(O[2]=0),l="rgb"}else if(R=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(pe)){var f=R[1];l=f.replace(/a$/,"");var v=l==="cmyk"?4:l==="gray"?1:3;O=R[2].trim().split(/\s*[,\/]\s*|\s+/),l==="color"&&(l=O.shift()),O=O.map(function(h,m){if(h[h.length-1]==="%")return h=parseFloat(h)/100,m===3?h:l==="rgb"?h*255:l[0]==="h"||l[0]==="l"&&!m?h*100:l==="lab"?h*125:l==="lch"?m<2?h*150:h*360:l[0]==="o"&&!m?h:l==="oklab"?h*.4:l==="oklch"?m<2?h*.4:h*360:h;if(l[m]==="h"||m===2&&l[l.length-1]==="h"){if(bK[h]!==void 0)return bK[h];if(h.endsWith("deg"))return parseFloat(h);if(h.endsWith("turn"))return parseFloat(h)*360;if(h.endsWith("grad"))return parseFloat(h)*360/400;if(h.endsWith("rad"))return parseFloat(h)*180/Math.PI}return h==="none"?0:parseFloat(h)}),z=O.length>v?O.pop():1}else/[0-9](?:\s|\/|,)/.test(pe)&&(O=pe.match(/([0-9]+)/g).map(function(h){return parseFloat(h)}),l=((w=(le=pe.match(/([a-z])/ig))==null?void 0:le.join(""))==null?void 0:w.toLowerCase())||"rgb");return{space:l,values:O,alpha:z}}var yK,bxe,bK,Ret=ae({"node_modules/color-parse/index.js"(){yK=Pe(_be()),bxe=Met,bK={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}}),$U,xxe=ae({"node_modules/color-space/rgb.js"(){$U={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}}}),WU,ket=ae({"node_modules/color-space/hsl.js"(){xxe(),WU={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(pe){var le=pe[0]/360,w=pe[1]/100,R=pe[2]/100,O,z,l,u,c,p=0;if(w===0)return c=R*255,[c,c,c];for(z=R<.5?R*(1+w):R+w-R*w,O=2*R-z,u=[0,0,0];p<3;)l=le+1/3*-(p-1),l<0?l++:l>1&&l--,c=6*l<1?O+(z-O)*6*l:2*l<1?z:3*l<2?O+(z-O)*(2/3-l)*6:O,u[p++]=c*255;return u}},$U.hsl=function(pe){var le=pe[0]/255,w=pe[1]/255,R=pe[2]/255,O=Math.min(le,w,R),z=Math.max(le,w,R),l=z-O,u,c,p;return z===O?u=0:le===z?u=(w-R)/l:w===z?u=2+(R-le)/l:R===z&&(u=4+(le-w)/l),u=Math.min(u*60,360),u<0&&(u+=360),p=(O+z)/2,z===O?c=0:p<=.5?c=l/(z+O):c=l/(2-z-O),[u,c*100,p*100]}}}),_xe={};ve(_xe,{default:()=>Iet});function Iet(pe){Array.isArray(pe)&&pe.raw&&(pe=String.raw(...arguments)),pe instanceof Number&&(pe=+pe);var le,w=bxe(pe);if(!w.space)return[];const R=w.space[0]==="h"?WU.min:$U.min,O=w.space[0]==="h"?WU.max:$U.max;return le=Array(3),le[0]=Math.min(Math.max(w.values[0],R[0]),O[0]),le[1]=Math.min(Math.max(w.values[1],R[1]),O[1]),le[2]=Math.min(Math.max(w.values[2],R[2]),O[2]),w.space[0]==="h"&&(le=WU.rgb(le)),le.push(Math.min(Math.max(w.alpha,0),1)),le}var Pet=ae({"node_modules/color-rgba/index.js"(){Ret(),xxe(),ket()}}),wxe=U({"src/traces/parcoords/helpers.js"(pe){var le=ii().isTypedArray;pe.convertTypedArray=function(w){return le(w)?Array.prototype.slice.call(w):w},pe.isOrdinal=function(w){return!!w.tickvals},pe.isVisible=function(w){return w.visible||!("visible"in w)}}}),Det=U({"src/traces/parcoords/lines.js"(pe,le){var w=["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(`
`),R=["precision highp float;","","varying vec4 fragColor;","","void main() {","    gl_FragColor = fragColor;","}"].join(`
`),O=GU().maxDimensionCount,z=ii(),l=1e-6,u=2048,c=new Uint8Array(4),p=new Uint8Array(4),f={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function v(P){P.read({x:0,y:0,width:1,height:1,data:c})}function h(P,T,y,S,M){var W=P._gl;W.enable(W.SCISSOR_TEST),W.scissor(T,y,S,M),P.clear({color:[0,0,0,0],depth:1})}function m(P,T,y,S,M,W){var $=W.key;function Z(K){var Q=Math.min(S,M-K*S);K===0&&(window.cancelAnimationFrame(y.currentRafs[$]),delete y.currentRafs[$],h(P,W.scissorX,W.scissorY,W.scissorWidth,W.viewBoxSize[1])),!y.clearOnly&&(W.count=2*Q,W.offset=2*K*S,T(W),K*S+Q<M&&(y.currentRafs[$]=window.requestAnimationFrame(function(){Z(K+1)})),y.drawCompleted=!1)}y.drawCompleted||(v(P),y.drawCompleted=!0),Z(0)}function _(P){return Math.max(l,Math.min(1-l,P))}function x(P,T){for(var y=new Array(256),S=0;S<256;S++)y[S]=P(S/255).concat(T);return y}function A(P,T){return(P>>>8*T)%256/255}function E(P,T,y){for(var S=new Array(P*(O+4)),M=0,W=0;W<P;W++){for(var $=0;$<O;$++)S[M++]=$<T.length?T[$].paddedUnitValues[W]:.5;S[M++]=A(W,2),S[M++]=A(W,1),S[M++]=A(W,0),S[M++]=_(y[W])}return S}function D(P,T,y){for(var S=new Array(T*8),M=0,W=0;W<T;W++)for(var $=0;$<2;$++)for(var Z=0;Z<4;Z++){var K=P*4+Z,Q=y[W*64+K];K===63&&$===0&&(Q*=-1),S[M++]=Q}return S}function g(P){var T="0"+P;return T.substr(T.length-2)}function C(P){return P<O?"p"+g(P+1)+"_"+g(P+4):"colors"}function I(P,T,y){for(var S=0;S<=O;S+=4)P[C(S)](D(S/4,T,y))}function N(P){for(var T={},y=0;y<=O;y+=4)T[C(y)]=P.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)});return T}function F(P,T,y,S,M,W,$,Z,K,Q,J,G,ee,re){for(var fe=[[],[]],we=0;we<64;we++)fe[0][we]=we===M?1:0,fe[1][we]=we===W?1:0;$*=re,Z*=re,K*=re,Q*=re;var Oe=P.lines.canvasOverdrag*re,ke=P.domain,Le=P.canvasWidth*re,oe=P.canvasHeight*re,be=P.pad.l*re,_e=P.pad.b*re,he=P.layoutHeight*re,De=P.layoutWidth*re,xe=P.deselectedLines.color,se=P.deselectedLines.opacity,Ee=z.extendFlat({key:J,resolution:[Le,oe],viewBoxPos:[$+Oe,Z],viewBoxSize:[K,Q],i0:M,i1:W,dim0A:fe[0].slice(0,16),dim0B:fe[0].slice(16,32),dim0C:fe[0].slice(32,48),dim0D:fe[0].slice(48,64),dim1A:fe[1].slice(0,16),dim1B:fe[1].slice(16,32),dim1C:fe[1].slice(32,48),dim1D:fe[1].slice(48,64),drwLayer:G,contextColor:[xe[0]/255,xe[1]/255,xe[2]/255,se!=="auto"?xe[3]*se:Math.max(1/255,Math.pow(1/P.lines.color.length,1/3))],scissorX:(S===T?0:$+Oe)+(be-Oe)+De*ke.x[0],scissorWidth:(S===y?Le-$+Oe:K+.5)+(S===T?$+Oe:0),scissorY:Z+_e+he*ke.y[0],scissorHeight:Q,viewportX:be-Oe+De*ke.x[0],viewportY:_e+he*ke.y[0],viewportWidth:Le,viewportHeight:oe},ee);return Ee}function k(P){var T=u-1,y=Math.max(0,Math.floor(P[0]*T),0),S=Math.min(T,Math.ceil(P[1]*T),T);return[Math.min(y,S),Math.max(y,S)]}le.exports=function(P,T){var y=T.context,S=T.pick,M=T.regl,W=M._gl,$=W.getParameter(W.ALIASED_LINE_WIDTH_RANGE),Z=Math.max($[0],Math.min($[1],T.viewModel.plotGlPixelRatio)),K={currentRafs:{},drawCompleted:!0,clearOnly:!1},Q,J,G,ee,re=N(M),fe,we=M.texture(f),Oe=[];Le(T);var ke=M({profile:!1,blend:{enable:y,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:!y,mask:!0,func:"less",range:[0,1]},cull:{enable:!0,face:"back"},scissor:{enable:!0,box:{x:M.prop("scissorX"),y:M.prop("scissorY"),width:M.prop("scissorWidth"),height:M.prop("scissorHeight")}},viewport:{x:M.prop("viewportX"),y:M.prop("viewportY"),width:M.prop("viewportWidth"),height:M.prop("viewportHeight")},dither:!1,vert:w,frag:R,primitive:"lines",lineWidth:Z,attributes:re,uniforms:{resolution:M.prop("resolution"),viewBoxPos:M.prop("viewBoxPos"),viewBoxSize:M.prop("viewBoxSize"),dim0A:M.prop("dim0A"),dim1A:M.prop("dim1A"),dim0B:M.prop("dim0B"),dim1B:M.prop("dim1B"),dim0C:M.prop("dim0C"),dim1C:M.prop("dim1C"),dim0D:M.prop("dim0D"),dim1D:M.prop("dim1D"),loA:M.prop("loA"),hiA:M.prop("hiA"),loB:M.prop("loB"),hiB:M.prop("hiB"),loC:M.prop("loC"),hiC:M.prop("hiC"),loD:M.prop("loD"),hiD:M.prop("hiD"),palette:we,contextColor:M.prop("contextColor"),maskTexture:M.prop("maskTexture"),drwLayer:M.prop("drwLayer"),maskHeight:M.prop("maskHeight")},offset:M.prop("offset"),count:M.prop("count")});function Le(xe){Q=xe.model,J=xe.viewModel,G=J.dimensions.slice(),ee=G[0]?G[0].values.length:0;var se=Q.lines,Ee=S?se.color.map(function(Be,tt){return tt/se.color.length}):se.color,Te=E(ee,G,Ee);I(re,ee,Te),!y&&!S&&(we=M.texture(z.extendFlat({data:x(Q.unitToColor,255)},f)))}function oe(xe){var se,Ee,Te,Be=[[],[]];for(Te=0;Te<64;Te++){var tt=!xe&&Te<G.length?G[Te].brush.filter.getBounds():[-1/0,1/0];Be[0][Te]=tt[0],Be[1][Te]=tt[1]}var at=u*8,gt=new Array(at);for(se=0;se<at;se++)gt[se]=255;if(!xe)for(se=0;se<G.length;se++){var pt=se%8,Rt=(se-pt)/8,$t=Math.pow(2,pt),Wt=G[se],Ht=Wt.brush.filter.get();if(!(Ht.length<2)){var Ft=k(Ht[0])[1];for(Ee=1;Ee<Ht.length;Ee++){var st=k(Ht[Ee]);for(Te=Ft+1;Te<st[0];Te++)gt[Te*8+Rt]&=~$t;Ft=Math.max(Ft,st[1])}}}var rt={shape:[8,u],format:"alpha",type:"uint8",mag:"nearest",min:"nearest",data:gt};return fe?fe(rt):fe=M.texture(rt),{maskTexture:fe,maskHeight:u,loA:Be[0].slice(0,16),loB:Be[0].slice(16,32),loC:Be[0].slice(32,48),loD:Be[0].slice(48,64),hiA:Be[1].slice(0,16),hiB:Be[1].slice(16,32),hiC:Be[1].slice(32,48),hiD:Be[1].slice(48,64)}}function be(xe,se,Ee){var Te=xe.length,Be,tt,at,gt=1/0,pt=-1/0;for(Be=0;Be<Te;Be++)xe[Be].dim0.canvasX<gt&&(gt=xe[Be].dim0.canvasX,tt=Be),xe[Be].dim1.canvasX>pt&&(pt=xe[Be].dim1.canvasX,at=Be);Te===0&&h(M,0,0,Q.canvasWidth,Q.canvasHeight);var Rt=oe(y);for(Be=0;Be<Te;Be++){var $t=xe[Be],Wt=$t.dim0.crossfilterDimensionIndex,Ht=$t.dim1.crossfilterDimensionIndex,Ft=$t.canvasX,st=$t.canvasY,rt=Ft+$t.panelSizeX,Ue=$t.plotGlPixelRatio;if(se||!Oe[Wt]||Oe[Wt][0]!==Ft||Oe[Wt][1]!==rt){Oe[Wt]=[Ft,rt];var xt=F(Q,tt,at,Be,Wt,Ht,Ft,st,$t.panelSizeX,$t.panelSizeY,$t.dim0.crossfilterDimensionIndex,y?0:S?2:1,Rt,Ue);K.clearOnly=Ee;var Gt=se?Q.lines.blockLineCount:ee;m(M,ke,K,Gt,ee,xt)}}}function _e(xe,se){return M.read({x:xe,y:se,width:1,height:1,data:p}),p}function he(xe,se,Ee,Te){var Be=new Uint8Array(4*Ee*Te);return M.read({x:xe,y:se,width:Ee,height:Te,data:Be}),Be}function De(){P.style["pointer-events"]="none",we.destroy(),fe&&fe.destroy();for(var xe in re)re[xe].destroy()}return{render:be,readPixel:_e,readPixels:he,destroy:De,update:Le}}}}),Let=U({"src/traces/parcoords/parcoords.js"(pe,le){var w=Ze(),R=ii(),O=R.isArrayOrTypedArray,z=R.numberFormat,l=(Pet(),Me(_xe)).default,u=Yu(),c=R.strRotate,p=R.strTranslate,f=ah(),v=ec(),h=vd(),m=FR(),_=m.keyFun,x=m.repeat,A=m.unwrap,E=wxe(),D=GU(),g=yxe(),C=Det();function I(Oe,ke,Le){return R.aggNums(Oe,null,ke,Le)}function N(Oe,ke){return k(I(Math.min,Oe,ke),I(Math.max,Oe,ke))}function F(Oe){var ke=Oe.range;return ke?k(ke[0],ke[1]):N(Oe.values,Oe._length)}function k(Oe,ke){return(isNaN(Oe)||!isFinite(Oe))&&(Oe=0),(isNaN(ke)||!isFinite(ke))&&(ke=0),Oe===ke&&(Oe===0?(Oe-=1,ke+=1):(Oe*=.9,ke*=1.1)),[Oe,ke]}function P(Oe,ke){return ke?function(Le,oe){var be=ke[oe];return be??Oe(Le)}:Oe}function T(Oe,ke,Le,oe,be){var _e=F(Le);return oe?w.scale.ordinal().domain(oe.map(P(z(Le.tickformat),be))).range(oe.map(function(he){var De=(he-_e[0])/(_e[1]-_e[0]);return Oe-ke+De*(2*ke-Oe)})):w.scale.linear().domain(_e).range([Oe-ke,ke])}function y(Oe,ke){return w.scale.linear().range([ke,Oe-ke])}function S(Oe,ke){return w.scale.linear().domain(F(Oe)).range([ke,1-ke])}function M(Oe){if(Oe.tickvals){var ke=F(Oe);return w.scale.ordinal().domain(Oe.tickvals).range(Oe.tickvals.map(function(Le){return(Le-ke[0])/(ke[1]-ke[0])}))}}function W(Oe){var ke=Oe.map(function(_e){return _e[0]}),Le=Oe.map(function(_e){var he=l(_e[1]);return w.rgb("rgb("+he[0]+","+he[1]+","+he[2]+")")}),oe=function(_e){return function(he){return he[_e]}},be="rgb".split("").map(function(_e){return w.scale.linear().clamp(!0).domain(ke).range(Le.map(oe(_e)))});return function(_e){return be.map(function(he){return he(_e)})}}function $(Oe){return Oe.dimensions.some(function(ke){return ke.brush.filterSpecified})}function Z(Oe,ke,Le){var oe=A(ke),be=oe.trace,_e=E.convertTypedArray(oe.lineColor),he=be.line,De={color:l(be.unselected.line.color),opacity:be.unselected.line.opacity},xe=h.extractOpts(he),se=xe.reversescale?h.flipScale(oe.cscale):oe.cscale,Ee=be.domain,Te=be.dimensions,Be=Oe.width,tt=be.labelangle,at=be.labelside,gt=be.labelfont,pt=be.tickfont,Rt=be.rangefont,$t=R.extendDeepNoArrays({},he,{color:_e.map(w.scale.linear().domain(F({values:_e,range:[xe.min,xe.max],_length:be._length}))),blockLineCount:D.blockLineCount,canvasOverdrag:D.overdrag*D.canvasPixelRatio}),Wt=Math.floor(Be*(Ee.x[1]-Ee.x[0])),Ht=Math.floor(Oe.height*(Ee.y[1]-Ee.y[0])),Ft=Oe.margin||{l:80,r:80,t:100,b:80},st=Wt,rt=Ht;return{key:Le,colCount:Te.filter(E.isVisible).length,dimensions:Te,tickDistance:D.tickDistance,unitToColor:W(se),lines:$t,deselectedLines:De,labelAngle:tt,labelSide:at,labelFont:gt,tickFont:pt,rangeFont:Rt,layoutWidth:Be,layoutHeight:Oe.height,domain:Ee,translateX:Ee.x[0]*Be,translateY:Oe.height-Ee.y[1]*Oe.height,pad:Ft,canvasWidth:st*D.canvasPixelRatio+2*$t.canvasOverdrag,canvasHeight:rt*D.canvasPixelRatio,width:st,height:rt,canvasPixelRatio:D.canvasPixelRatio}}function K(Oe,ke,Le){var oe=Le.width,be=Le.height,_e=Le.dimensions,he=Le.canvasPixelRatio,De=function(Be){return oe*Be/Math.max(1,Le.colCount-1)},xe=D.verticalPadding/be,se=y(be,D.verticalPadding),Ee={key:Le.key,xScale:De,model:Le,inBrushDrag:!1},Te={};return Ee.dimensions=_e.filter(E.isVisible).map(function(Be,tt){var at=S(Be,xe),gt=Te[Be.label];Te[Be.label]=(gt||0)+1;var pt=Be.label+(gt?"__"+gt:""),Rt=Be.constraintrange,$t=Rt&&Rt.length;$t&&!O(Rt[0])&&(Rt=[Rt]);var Wt=$t?Rt.map(function(kr){return kr.map(at)}):[[-1/0,1/0]],Ht=function(){var kr=Ee;kr.focusLayer&&kr.focusLayer.render(kr.panels,!0);var Pr=$(kr);!Oe.contextShown()&&Pr?(kr.contextLayer&&kr.contextLayer.render(kr.panels,!0),Oe.contextShown(!0)):Oe.contextShown()&&!Pr&&(kr.contextLayer&&kr.contextLayer.render(kr.panels,!0,!0),Oe.contextShown(!1))},Ft=Be.values;Ft.length>Be._length&&(Ft=Ft.slice(0,Be._length));var st=Be.tickvals,rt;function Ue(kr,Pr){return{val:kr,text:rt[Pr]}}function xt(kr,Pr){return kr.val-Pr.val}if(O(st)&&st.length){R.isTypedArray(st)&&(st=Array.from(st)),rt=Be.ticktext,!O(rt)||!rt.length?rt=st.map(z(Be.tickformat)):rt.length>st.length?rt=rt.slice(0,st.length):st.length>rt.length&&(st=st.slice(0,rt.length));for(var Gt=1;Gt<st.length;Gt++)if(st[Gt]<st[Gt-1]){for(var Jt=st.map(Ue).sort(xt),Ut=0;Ut<st.length;Ut++)st[Ut]=Jt[Ut].val,rt[Ut]=Jt[Ut].text;break}}else st=void 0;return Ft=E.convertTypedArray(Ft),{key:pt,label:Be.label,tickFormat:Be.tickformat,tickvals:st,ticktext:rt,ordinal:E.isOrdinal(Be),multiselect:Be.multiselect,xIndex:tt,crossfilterDimensionIndex:tt,visibleIndex:Be._index,height:be,values:Ft,paddedUnitValues:Ft.map(at),unitTickvals:st&&st.map(at),xScale:De,x:De(tt),canvasX:De(tt)*he,unitToPaddedPx:se,domainScale:T(be,D.verticalPadding,Be,st,rt),ordinalScale:M(Be),parent:Ee,model:Le,brush:g.makeBrush(Oe,$t,Wt,function(){Oe.linePickActive(!1)},Ht,function(kr){if(Ee.focusLayer.render(Ee.panels,!0),Ee.pickLayer&&Ee.pickLayer.render(Ee.panels,!0),Oe.linePickActive(!0),ke&&ke.filterChanged){var Pr=at.invert,$r=kr.map(function(rn){return rn.map(Pr).sort(R.sorterAsc)}).sort(function(rn,kn){return rn[0]-kn[0]});ke.filterChanged(Ee.key,Be._index,$r)}})}}),Ee}function Q(Oe){Oe.classed(D.cn.axisExtentText,!0).attr("text-anchor","middle").style("cursor","default")}function J(){var Oe=!0,ke=!1;return{linePickActive:function(Le){return arguments.length?Oe=!!Le:Oe},contextShown:function(Le){return arguments.length?ke=!!Le:ke}}}function G(Oe,ke){var Le=ke==="top"?1:-1,oe=Oe*Math.PI/180,be=Math.sin(oe),_e=Math.cos(oe);return{dir:Le,dx:be,dy:_e,degrees:Oe}}function ee(Oe,ke,Le){for(var oe=ke.panels||(ke.panels=[]),be=Oe.data(),_e=0;_e<be.length-1;_e++){var he=oe[_e]||(oe[_e]={}),De=be[_e],xe=be[_e+1];he.dim0=De,he.dim1=xe,he.canvasX=De.canvasX,he.panelSizeX=xe.canvasX-De.canvasX,he.panelSizeY=ke.model.canvasHeight,he.y=0,he.canvasY=0,he.plotGlPixelRatio=Le}}function re(Oe){for(var ke=0;ke<Oe.length;ke++)for(var Le=0;Le<Oe[ke].length;Le++)for(var oe=Oe[ke][Le].trace,be=oe.dimensions,_e=0;_e<be.length;_e++){var he=be[_e].values,De=be[_e]._ax;De&&(De.range?De.range=k(De.range[0],De.range[1]):De.range=N(he,oe._length),De.dtick||(De.dtick=.01*(Math.abs(De.range[1]-De.range[0])||1)),De.tickformat=be[_e].tickformat,u.calcTicks(De),De.cleanRange())}}function fe(Oe,ke){return u.tickText(Oe._ax,ke,!1).text}function we(Oe,ke){if(Oe.ordinal)return"";var Le=Oe.domainScale.domain(),oe=Le[ke?Le.length-1:0];return fe(Oe.model.dimensions[Oe.visibleIndex],oe)}le.exports=function(ke,Le,oe,be){var _e=ke._context.staticPlot,he=ke._fullLayout,De=he._toppaper,xe=he._glcontainer,se=ke._context.plotGlPixelRatio,Ee=ke._fullLayout.paper_bgcolor;re(Le);var Te=J(),Be=Le.filter(function(Ut){return A(Ut).trace.visible}).map(Z.bind(0,oe)).map(K.bind(0,Te,be));xe.each(function(Ut,kr){return R.extendFlat(Ut,Be[kr])});var tt=xe.selectAll(".gl-canvas").each(function(Ut){Ut.viewModel=Be[0],Ut.viewModel.plotGlPixelRatio=se,Ut.viewModel.paperColor=Ee,Ut.model=Ut.viewModel?Ut.viewModel.model:null}),at=null,gt=tt.filter(function(Ut){return Ut.pick});gt.style("pointer-events",_e?"none":"auto").on("mousemove",function(Ut){if(Te.linePickActive()&&Ut.lineLayer&&be&&be.hover){var kr=w.event,Pr=this.width,$r=this.height,rn=w.mouse(this),kn=rn[0],Rn=rn[1];if(kn<0||Rn<0||kn>=Pr||Rn>=$r)return;var ci=Ut.lineLayer.readPixel(kn,$r-1-Rn),In=ci[3]!==0,Gn=In?ci[2]+256*(ci[1]+256*ci[0]):null,mr={x:kn,y:Rn,clientX:kr.clientX,clientY:kr.clientY,dataIndex:Ut.model.key,curveNumber:Gn};Gn!==at&&(In?be.hover(mr):be.unhover&&be.unhover(mr),at=Gn)}}),tt.style("opacity",function(Ut){return Ut.pick?0:1}),De.style("background","rgba(255, 255, 255, 0)");var pt=De.selectAll("."+D.cn.parcoords).data(Be,_);pt.exit().remove(),pt.enter().append("g").classed(D.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),pt.attr("transform",function(Ut){return p(Ut.model.translateX,Ut.model.translateY)});var Rt=pt.selectAll("."+D.cn.parcoordsControlView).data(x,_);Rt.enter().append("g").classed(D.cn.parcoordsControlView,!0),Rt.attr("transform",function(Ut){return p(Ut.model.pad.l,Ut.model.pad.t)});var $t=Rt.selectAll("."+D.cn.yAxis).data(function(Ut){return Ut.dimensions},_);$t.enter().append("g").classed(D.cn.yAxis,!0),Rt.each(function(Ut){ee($t,Ut,se)}),tt.each(function(Ut){if(Ut.viewModel){!Ut.lineLayer||be?Ut.lineLayer=C(this,Ut):Ut.lineLayer.update(Ut),(Ut.key||Ut.key===0)&&(Ut.viewModel[Ut.key]=Ut.lineLayer);var kr=!Ut.context||be;Ut.lineLayer.render(Ut.viewModel.panels,kr)}}),$t.attr("transform",function(Ut){return p(Ut.xScale(Ut.xIndex),0)}),$t.call(w.behavior.drag().origin(function(Ut){return Ut}).on("drag",function(Ut){var kr=Ut.parent;Te.linePickActive(!1),Ut.x=Math.max(-D.overdrag,Math.min(Ut.model.width+D.overdrag,w.event.x)),Ut.canvasX=Ut.x*Ut.model.canvasPixelRatio,$t.sort(function(Pr,$r){return Pr.x-$r.x}).each(function(Pr,$r){Pr.xIndex=$r,Pr.x=Ut===Pr?Pr.x:Pr.xScale(Pr.xIndex),Pr.canvasX=Pr.x*Pr.model.canvasPixelRatio}),ee($t,kr,se),$t.filter(function(Pr){return Math.abs(Ut.xIndex-Pr.xIndex)!==0}).attr("transform",function(Pr){return p(Pr.xScale(Pr.xIndex),0)}),w.select(this).attr("transform",p(Ut.x,0)),$t.each(function(Pr,$r,rn){rn===Ut.parent.key&&(kr.dimensions[$r]=Pr)}),kr.contextLayer&&kr.contextLayer.render(kr.panels,!1,!$(kr)),kr.focusLayer.render&&kr.focusLayer.render(kr.panels)}).on("dragend",function(Ut){var kr=Ut.parent;Ut.x=Ut.xScale(Ut.xIndex),Ut.canvasX=Ut.x*Ut.model.canvasPixelRatio,ee($t,kr,se),w.select(this).attr("transform",function(Pr){return p(Pr.x,0)}),kr.contextLayer&&kr.contextLayer.render(kr.panels,!1,!$(kr)),kr.focusLayer&&kr.focusLayer.render(kr.panels),kr.pickLayer&&kr.pickLayer.render(kr.panels,!0),Te.linePickActive(!0),be&&be.axesMoved&&be.axesMoved(kr.key,kr.dimensions.map(function(Pr){return Pr.crossfilterDimensionIndex}))})),$t.exit().remove();var Wt=$t.selectAll("."+D.cn.axisOverlays).data(x,_);Wt.enter().append("g").classed(D.cn.axisOverlays,!0),Wt.selectAll("."+D.cn.axis).remove();var Ht=Wt.selectAll("."+D.cn.axis).data(x,_);Ht.enter().append("g").classed(D.cn.axis,!0),Ht.each(function(Ut){var kr=Ut.model.height/Ut.model.tickDistance,Pr=Ut.domainScale,$r=Pr.domain();w.select(this).call(w.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(kr,Ut.tickFormat).tickValues(Ut.ordinal?$r:null).tickFormat(function(rn){return E.isOrdinal(Ut)?rn:fe(Ut.model.dimensions[Ut.visibleIndex],rn)}).scale(Pr)),v.font(Ht.selectAll("text"),Ut.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 Ft=Wt.selectAll("."+D.cn.axisHeading).data(x,_);Ft.enter().append("g").classed(D.cn.axisHeading,!0);var st=Ft.selectAll("."+D.cn.axisTitle).data(x,_);st.enter().append("text").classed(D.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",_e?"none":"auto"),st.text(function(Ut){return Ut.label}).each(function(Ut){var kr=w.select(this);v.font(kr,Ut.model.labelFont),f.convertToTspans(kr,ke)}).attr("transform",function(Ut){var kr=G(Ut.model.labelAngle,Ut.model.labelSide),Pr=D.axisTitleOffset;return(kr.dir>0?"":p(0,2*Pr+Ut.model.height))+c(kr.degrees)+p(-Pr*kr.dx,-Pr*kr.dy)}).attr("text-anchor",function(Ut){var kr=G(Ut.model.labelAngle,Ut.model.labelSide),Pr=Math.abs(kr.dx),$r=Math.abs(kr.dy);return 2*Pr>$r?kr.dir*kr.dx<0?"start":"end":"middle"});var rt=Wt.selectAll("."+D.cn.axisExtent).data(x,_);rt.enter().append("g").classed(D.cn.axisExtent,!0);var Ue=rt.selectAll("."+D.cn.axisExtentTop).data(x,_);Ue.enter().append("g").classed(D.cn.axisExtentTop,!0),Ue.attr("transform",p(0,-D.axisExtentOffset));var xt=Ue.selectAll("."+D.cn.axisExtentTopText).data(x,_);xt.enter().append("text").classed(D.cn.axisExtentTopText,!0).call(Q),xt.text(function(Ut){return we(Ut,!0)}).each(function(Ut){v.font(w.select(this),Ut.model.rangeFont)});var Gt=rt.selectAll("."+D.cn.axisExtentBottom).data(x,_);Gt.enter().append("g").classed(D.cn.axisExtentBottom,!0),Gt.attr("transform",function(Ut){return p(0,Ut.model.height+D.axisExtentOffset)});var Jt=Gt.selectAll("."+D.cn.axisExtentBottomText).data(x,_);Jt.enter().append("text").classed(D.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(Q),Jt.text(function(Ut){return we(Ut,!1)}).each(function(Ut){v.font(w.select(this),Ut.model.rangeFont)}),g.ensureAxisBrush(Wt,Ee,ke)}}}),Sxe=U({"src/traces/parcoords/plot.js"(c,le){var w=Let(),R=mK(),O=wxe().isVisible,z={};function l(p,f,v){var h=f.indexOf(v),m=p.indexOf(h);return m===-1&&(m+=f.length),m}function u(p,f){return function(h,m){return l(p,f,h)-l(p,f,m)}}var c=le.exports=function(f,v){var h=f._fullLayout,m=R(f,[],z);if(m){var _={},x={},A={},E={},D=h._size;v.forEach(function(F,k){var P=F[0].trace;A[k]=P.index;var T=E[k]=P.index;_[k]=f.data[T].dimensions,x[k]=f.data[T].dimensions.slice()});var g=function(F,k,P){var T=x[F][k],y=P.map(function(K){return K.slice()}),S="dimensions["+k+"].constraintrange",M=h._tracePreGUI[f._fullData[A[F]]._fullInput.uid];if(M[S]===void 0){var W=T.constraintrange;M[S]=W||null}var $=f._fullData[A[F]].dimensions[k];y.length?(y.length===1&&(y=y[0]),T.constraintrange=y,$.constraintrange=y.slice(),y=[y]):(delete T.constraintrange,delete $.constraintrange,y=null);var Z={};Z[S]=y,f.emit("plotly_restyle",[Z,[E[F]]])},C=function(F){f.emit("plotly_hover",F)},I=function(F){f.emit("plotly_unhover",F)},N=function(F,k){var P=u(k,x[F].filter(O));_[F].sort(P),x[F].filter(function(T){return!O(T)}).sort(function(T){return x[F].indexOf(T)}).forEach(function(T){_[F].splice(_[F].indexOf(T),1),_[F].splice(x[F].indexOf(T),0,T)}),f.emit("plotly_restyle",[{dimensions:[_[F]]},[E[F]]])};w(f,v,{width:D.w,height:D.h,margin:{t:D.t,r:D.r,b:D.b,l:D.l}},{filterChanged:g,hover:C,unhover:I,axesMoved:N})}};c.reglPrecompiled=z}}),Oet=U({"src/traces/parcoords/base_plot.js"(pe){var le=Ze(),w=Om().getModuleCalcData,R=Sxe(),O=E1();pe.name="parcoords",pe.plot=function(z){var l=w(z.calcdata,"parcoords")[0];l.length&&R(z,l)},pe.clean=function(z,l,u,c){var p=c._has&&c._has("parcoords"),f=l._has&&l._has("parcoords");p&&!f&&(c._paperdiv.selectAll(".parcoords").remove(),c._glimages.selectAll("*").remove())},pe.toSVG=function(z){var l=z._fullLayout._glimages,u=le.select(z).selectAll(".svg-container"),c=u.filter(function(f,v){return v===u.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function p(){var f=this,v=f.toDataURL("image/png"),h=l.append("svg:image");h.attr({xmlns:O.svg,"xlink:href":v,preserveAspectRatio:"none",x:0,y:0,width:f.style.width,height:f.style.height})}c.each(p),window.setTimeout(function(){le.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}}}),Net=U({"src/traces/parcoords/base_index.js"(pe,le){le.exports={attributes:gxe(),supplyDefaults:Aet(),calc:Cet(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:Oet(),categories:["gl","regl","noOpacity","noHover"],meta:{}}}}),Fet=U({"src/traces/parcoords/index.js"(pe,le){var w=Net();w.plot=Sxe(),le.exports=w}}),zet=U({"lib/parcoords.js"(pe,le){le.exports=Fet()}}),Txe=U({"src/traces/parcats/attributes.js"(pe,le){var w=Ar().extendFlat,R=Jn(),O=Ir(),z=Jd(),l=Js().hovertemplateAttrs,u=oh().attributes,c=w({editType:"calc"},z("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:l({editType:"plot",arrayOk:!1},{keys:["count","probability"]})});le.exports={domain:u({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:w({},R.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:l({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),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:O({editType:"calc"}),tickfont:O({autoShadowDflt:!0,editType:"calc"}),dimensions:{_isLinkedToArray:"dimension",label:{valType:"string",editType:"calc"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},values:{valType:"data_array",dflt:[],editType:"calc"},displayindex:{valType:"integer",editType:"calc"},editType:"calc",visible:{valType:"boolean",dflt:!0,editType:"calc"}},line:c,counts:{valType:"number",min:0,dflt:1,arrayOk:!0,editType:"calc"},customdata:void 0,hoverlabel:void 0,ids:void 0,legend:void 0,legendgroup:void 0,legendrank:void 0,opacity:void 0,selectedpoints:void 0,showlegend:void 0}}}),Bet=U({"src/traces/parcats/defaults.js"(pe,le){var w=ii(),R=Ug().hasColorscale,O=wg(),z=oh().defaults,l=_g(),u=Txe(),c=gK(),p=dr().isTypedArraySpec;function f(h,m,_,x,A){A("line.shape"),A("line.hovertemplate");var E=A("line.color",x.colorway[0]);if(R(h,"line")&&w.isArrayOrTypedArray(E)){if(E.length)return A("line.colorscale"),O(h,m,x,A,{prefix:"line.",cLetter:"c"}),E.length;m.line.color=_}return 1/0}function v(h,m){function _(I,N){return w.coerce(h,m,u.dimensions,I,N)}var x=_("values"),A=_("visible");if(x&&x.length||(A=m.visible=!1),A){_("label"),_("displayindex",m._index);var E=h.categoryarray,D=w.isArrayOrTypedArray(E)&&E.length>0||p(E),g;D&&(g="array");var C=_("categoryorder",g);C==="array"?(_("categoryarray"),_("ticktext")):(delete h.categoryarray,delete h.ticktext),!D&&C==="array"&&(m.categoryorder="trace")}}le.exports=function(m,_,x,A){function E(I,N){return w.coerce(m,_,u,I,N)}var D=l(m,_,{name:"dimensions",handleItemDefaults:v}),g=f(m,_,x,A,E);z(_,A,E),(!Array.isArray(D)||!D.length)&&(_.visible=!1),c(_,D,"values",g),E("hoveron"),E("hovertemplate"),E("arrangement"),E("bundlecolors"),E("sortpaths"),E("counts");var C=A.font;w.coerceFont(E,"labelfont",C,{overrideDflt:{size:Math.round(C.size)}}),w.coerceFont(E,"tickfont",C,{autoShadowDflt:!0,overrideDflt:{size:Math.round(C.size/1.2)}})}}}),Uet=U({"src/traces/parcats/calc.js"(pe,le){var w=FR().wrap,R=Ug().hasColorscale,O=t0(),z=ic(),l=ec(),u=ii(),c=_t();le.exports=function(C,I){var N=u.filterVisible(I.dimensions);if(N.length===0)return[];var F=N.map(function(oe){var be;if(oe.categoryorder==="trace")be=null;else if(oe.categoryorder==="array")be=oe.categoryarray;else{be=z(oe.values);for(var _e=!0,he=0;he<be.length;he++)if(!c(be[he])){_e=!1;break}be.sort(_e?u.sorterAsc:void 0),oe.categoryorder==="category descending"&&(be=be.reverse())}return x(oe.values,be)}),k,P,T;u.isArrayOrTypedArray(I.counts)?k=I.counts:k=[I.counts],A(N),N.forEach(function(oe,be){E(oe,F[be])});var y=I.line,S;y?(R(I,"line")&&O(C,I,{vals:I.line.color,containerStr:"line",cLetter:"c"}),S=l.tryColorscale(y)):S=u.identity;function M(oe){var be,_e;return u.isArrayOrTypedArray(y.color)?(be=y.color[oe%y.color.length],_e=be):be=y.color,{color:S(be),rawColor:_e}}var W=N[0].values.length,$={},Z=F.map(function(oe){return oe.inds});T=0;var K,Q;for(K=0;K<W;K++){var J=[];for(Q=0;Q<Z.length;Q++)J.push(Z[Q][K]);P=k[K%k.length],T+=P;var G=M(K),ee=J+"-"+G.rawColor;$[ee]===void 0&&($[ee]=m(J,G.color,G.rawColor)),_($[ee],K,P)}var re=N.map(function(oe,be){return f(be,oe._index,oe._displayindex,oe.label,T)});for(K=0;K<W;K++)for(P=k[K%k.length],Q=0;Q<re.length;Q++){var fe=re[Q].containerInd,we=F[Q].inds[K],Oe=re[Q].categories;if(Oe[we]===void 0){var ke=I.dimensions[fe]._categoryarray[we],Le=I.dimensions[fe]._ticktext[we];Oe[we]=v(Q,we,ke,Le)}h(Oe[we],K,P)}return w(p(re,$,T))};function p(g,C,I){var N=g.map(function(F){return F.categories.length}).reduce(function(F,k){return Math.max(F,k)});return{dimensions:g,paths:C,trace:void 0,maxCats:N,count:I}}function f(g,C,I,N,F){return{dimensionInd:g,containerInd:C,displayInd:I,dimensionLabel:N,count:F,categories:[],dragX:null}}function v(g,C,I,N){return{dimensionInd:g,categoryInd:C,categoryValue:I,displayInd:C,categoryLabel:N,valueInds:[],count:0,dragY:null}}function h(g,C,I){g.valueInds.push(C),g.count+=I}function m(g,C,I){return{categoryInds:g,color:C,rawColor:I,valueInds:[],count:0}}function _(g,C,I){g.valueInds.push(C),g.count+=I}function x(g,C){C==null?C=[]:C=C.map(function(S){return S});var I={},N={},F=[];C.forEach(function(S,M){I[S]=0,N[S]=M});for(var k=0;k<g.length;k++){var P=g[k],T;I[P]===void 0?(I[P]=1,T=C.push(P)-1,N[P]=T):(I[P]++,T=N[P]),F.push(T)}var y=C.map(function(S){return I[S]});return{uniqueValues:C,uniqueCounts:y,inds:F}}function A(g){var C=g.map(function(N){return N.displayindex}),I;if(D(C))for(I=0;I<g.length;I++)g[I]._displayindex=g[I].displayindex;else for(I=0;I<g.length;I++)g[I]._displayindex=I}function E(g,C){g._categoryarray=C.uniqueValues,g.ticktext===null||g.ticktext===void 0?g._ticktext=[]:g._ticktext=g.ticktext.slice();for(var I=g._ticktext.length;I<C.uniqueValues.length;I++)g._ticktext.push(C.uniqueValues[I])}function D(g){for(var C=new Array(g.length),I=0;I<g.length;I++){if(g[I]<0||g[I]>=g.length||C[g[I]]!==void 0)return!1;C[g[I]]=!0}return!0}}}),Het=U({"src/traces/parcats/parcats.js"(pe,le){var w=Ze(),R=(MI(),Me(OR)).interpolateNumber,O=Bh(),z=Dp(),l=ii(),u=l.strTranslate,c=ec(),p=or(),f=ah();function v(he,De,xe,se){var Ee=De._context.staticPlot,Te=he.map(ke.bind(0,De,xe)),Be=se.selectAll("g.parcatslayer").data([null]);Be.enter().append("g").attr("class","parcatslayer").style("pointer-events",Ee?"none":"all");var tt=Be.selectAll("g.trace.parcats").data(Te,h),at=tt.enter().append("g").attr("class","trace parcats");tt.attr("transform",function(Ue){return u(Ue.x,Ue.y)}),at.append("g").attr("class","paths");var gt=tt.select("g.paths"),pt=gt.selectAll("path.path").data(function(Ue){return Ue.paths},h);pt.attr("fill",function(Ue){return Ue.model.color});var Rt=pt.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(Ue){return Ue.model.color}).attr("fill-opacity",0);C(Rt),pt.attr("d",function(Ue){return Ue.svgD}),Rt.empty()||pt.sort(_),pt.exit().remove(),pt.on("mouseover",x).on("mouseout",A).on("click",g),at.append("g").attr("class","dimensions");var $t=tt.select("g.dimensions"),Wt=$t.selectAll("g.dimension").data(function(Ue){return Ue.dimensions},h);Wt.enter().append("g").attr("class","dimension"),Wt.attr("transform",function(Ue){return u(Ue.x,0)}),Wt.exit().remove();var Ht=Wt.selectAll("g.category").data(function(Ue){return Ue.categories},h),Ft=Ht.enter().append("g").attr("class","category");Ht.attr("transform",function(Ue){return u(0,Ue.y)}),Ft.append("rect").attr("class","catrect").attr("pointer-events","none"),Ht.select("rect.catrect").attr("fill","none").attr("width",function(Ue){return Ue.width}).attr("height",function(Ue){return Ue.height}),F(Ft);var st=Ht.selectAll("rect.bandrect").data(function(Ue){return Ue.bands},h);st.each(function(){l.raiseToTop(this)}),st.attr("fill",function(Ue){return Ue.color});var rt=st.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(Ue){return Ue.color}).attr("fill-opacity",0);st.attr("fill",function(Ue){return Ue.color}).attr("width",function(Ue){return Ue.width}).attr("height",function(Ue){return Ue.height}).attr("y",function(Ue){return Ue.y}).attr("cursor",function(Ue){return Ue.parcatsViewModel.arrangement==="fixed"?"default":Ue.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),P(rt),st.exit().remove(),Ft.append("text").attr("class","catlabel").attr("pointer-events","none"),Ht.select("text.catlabel").attr("text-anchor",function(Ue){return m(Ue)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(Ue){return m(Ue)?Ue.width+5:-5}).attr("y",function(Ue){return Ue.height/2}).text(function(Ue){return Ue.model.categoryLabel}).each(function(Ue){c.font(w.select(this),Ue.parcatsViewModel.categorylabelfont),f.convertToTspans(w.select(this),De)}),Ft.append("text").attr("class","dimlabel"),Ht.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(Ue){return Ue.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(Ue){return Ue.width/2}).attr("y",-5).text(function(Ue,xt){return xt===0?Ue.parcatsViewModel.model.dimensions[Ue.model.dimensionInd].dimensionLabel:null}).each(function(Ue){c.font(w.select(this),Ue.parcatsViewModel.labelfont)}),Ht.selectAll("rect.bandrect").on("mouseover",Q).on("mouseout",J),Ht.exit().remove(),Wt.call(w.behavior.drag().origin(function(Ue){return{x:Ue.x,y:0}}).on("dragstart",G).on("drag",ee).on("dragend",re)),tt.each(function(Ue){Ue.traceSelection=w.select(this),Ue.pathSelection=w.select(this).selectAll("g.paths").selectAll("path.path"),Ue.dimensionSelection=w.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),tt.exit().remove()}le.exports=function(he,De,xe,se){v(xe,he,se,De)};function h(he){return he.key}function m(he){var De=he.parcatsViewModel.dimensions.length,xe=he.parcatsViewModel.dimensions[De-1].model.dimensionInd;return he.model.dimensionInd===xe}function _(he,De){return he.model.rawColor>De.model.rawColor?1:he.model.rawColor<De.model.rawColor?-1:0}function x(he){if(!he.parcatsViewModel.dragDimension&&he.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){l.raiseToTop(this),I(w.select(this));var De=E(he),xe=D(he);if(he.parcatsViewModel.graphDiv.emit("plotly_hover",{points:De,event:w.event,constraints:xe}),he.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var se=w.mouse(this)[0],Ee=he.parcatsViewModel.graphDiv,Te=he.parcatsViewModel.trace,Be=Ee._fullLayout,tt=Be._paperdiv.node().getBoundingClientRect(),at=he.parcatsViewModel.graphDiv.getBoundingClientRect(),gt,pt,Rt;for(Rt=0;Rt<he.leftXs.length-1;Rt++)if(he.leftXs[Rt]+he.dimWidths[Rt]-2<=se&&se<=he.leftXs[Rt+1]+2){var $t=he.parcatsViewModel.dimensions[Rt],Wt=he.parcatsViewModel.dimensions[Rt+1];gt=($t.x+$t.width+Wt.x)/2,pt=(he.topYs[Rt]+he.topYs[Rt+1]+he.height)/2;break}var Ht=he.parcatsViewModel.x+gt,Ft=he.parcatsViewModel.y+pt,st=p.mostReadable(he.model.color,["black","white"]),rt=he.model.count,Ue=rt/he.parcatsViewModel.model.count,xt={countLabel:rt,probabilityLabel:Ue.toFixed(3)},Gt=[];he.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&Gt.push(["Count:",xt.countLabel].join(" ")),he.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&Gt.push(["P:",xt.probabilityLabel].join(" "));var Jt=Gt.join("<br>"),Ut=w.mouse(Ee)[0];z.loneHover({trace:Te,x:Ht-tt.left+at.left,y:Ft-tt.top+at.top,text:Jt,color:he.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:st,idealAlign:Ut<Ht?"right":"left",hovertemplate:(Te.line||{}).hovertemplate,hovertemplateLabels:xt,eventData:[{data:Te._input,fullData:Te,count:rt,probability:Ue}]},{container:Be._hoverlayer.node(),outerContainer:Be._paper.node(),gd:Ee})}}}function A(he){if(!he.parcatsViewModel.dragDimension&&(C(w.select(this)),z.loneUnhover(he.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()),he.parcatsViewModel.pathSelection.sort(_),he.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1)){var De=E(he),xe=D(he);he.parcatsViewModel.graphDiv.emit("plotly_unhover",{points:De,event:w.event,constraints:xe})}}function E(he){for(var De=[],xe=fe(he.parcatsViewModel),se=0;se<he.model.valueInds.length;se++){var Ee=he.model.valueInds[se];De.push({curveNumber:xe,pointNumber:Ee})}return De}function D(he){for(var De={},xe=he.parcatsViewModel.model.dimensions,se=0;se<xe.length;se++){var Ee=xe[se],Te=Ee.categories[he.model.categoryInds[se]];De[Ee.containerInd]=Te.categoryValue}return he.model.rawColor!==void 0&&(De.color=he.model.rawColor),De}function g(he){if(he.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var De=E(he),xe=D(he);he.parcatsViewModel.graphDiv.emit("plotly_click",{points:De,event:w.event,constraints:xe})}}function C(he){he.attr("fill",function(De){return De.model.color}).attr("fill-opacity",.6).attr("stroke","lightgray").attr("stroke-width",.2).attr("stroke-opacity",1)}function I(he){he.attr("fill-opacity",.8).attr("stroke",function(De){return p.mostReadable(De.model.color,["black","white"])}).attr("stroke-width",.3)}function N(he){he.select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}function F(he){he.select("rect.catrect").attr("stroke","black").attr("stroke-width",1).attr("stroke-opacity",1)}function k(he){he.attr("stroke","black").attr("stroke-width",1.5)}function P(he){he.attr("stroke","black").attr("stroke-width",.2).attr("stroke-opacity",1).attr("fill-opacity",1)}function T(he){var De=he.parcatsViewModel.pathSelection,xe=he.categoryViewModel.model.dimensionInd,se=he.categoryViewModel.model.categoryInd;return De.filter(function(Ee){return Ee.model.categoryInds[xe]===se&&Ee.model.color===he.color})}function y(he){var De=w.select(he.parentNode).selectAll("rect.bandrect");De.each(function(xe){var se=T(xe);I(se),se.each(function(){l.raiseToTop(this)})}),N(w.select(he.parentNode))}function S(he){var De=w.select(he).datum(),xe=T(De);I(xe),xe.each(function(){l.raiseToTop(this)}),w.select(he.parentNode).selectAll("rect.bandrect").filter(function(se){return se.color===De.color}).each(function(){l.raiseToTop(this),k(w.select(this))})}function M(he,De,xe){var se=w.select(he).datum(),Ee=se.categoryViewModel.model,Te=se.parcatsViewModel.graphDiv,Be=w.select(he.parentNode).selectAll("rect.bandrect"),tt=[];Be.each(function(gt){var pt=T(gt);pt.each(function(Rt){Array.prototype.push.apply(tt,E(Rt))})});var at={};at[Ee.dimensionInd]=Ee.categoryValue,Te.emit(De,{points:tt,event:xe,constraints:at})}function W(he,De,xe){var se=w.select(he).datum(),Ee=se.categoryViewModel.model,Te=se.parcatsViewModel.graphDiv,Be=T(se),tt=[];Be.each(function(gt){Array.prototype.push.apply(tt,E(gt))});var at={};at[Ee.dimensionInd]=Ee.categoryValue,se.rawColor!==void 0&&(at.color=se.rawColor),Te.emit(De,{points:tt,event:xe,constraints:at})}function $(he,De,xe){he._fullLayout._calcInverseTransform(he);var se=he._fullLayout._invScaleX,Ee=he._fullLayout._invScaleY,Te=w.select(xe.parentNode).select("rect.catrect"),Be=Te.node().getBoundingClientRect(),tt=Te.datum(),at=tt.parcatsViewModel,gt=at.model.dimensions[tt.model.dimensionInd],pt=at.trace,Rt=Be.top+Be.height/2,$t,Wt;at.dimensions.length>1&&gt.displayInd===at.dimensions.length-1?($t=Be.left,Wt="left"):($t=Be.left+Be.width,Wt="right");var Ht=tt.model.count,Ft=tt.model.categoryLabel,st=Ht/tt.parcatsViewModel.model.count,rt={countLabel:Ht,categoryLabel:Ft,probabilityLabel:st.toFixed(3)},Ue=[];tt.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&Ue.push(["Count:",rt.countLabel].join(" ")),tt.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&Ue.push(["P("+rt.categoryLabel+"):",rt.probabilityLabel].join(" "));var xt=Ue.join("<br>");return{trace:pt,x:se*($t-De.left),y:Ee*(Rt-De.top),text:xt,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:Wt,hovertemplate:pt.hovertemplate,hovertemplateLabels:rt,eventData:[{data:pt._input,fullData:pt,count:Ht,category:Ft,probability:st}]}}function Z(he,De,xe){var se=[];return w.select(xe.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var Ee=this;se.push($(he,De,Ee))}),se}function K(he,De,xe){he._fullLayout._calcInverseTransform(he);var se=he._fullLayout._invScaleX,Ee=he._fullLayout._invScaleY,Te=xe.getBoundingClientRect(),Be=w.select(xe).datum(),tt=Be.categoryViewModel,at=tt.parcatsViewModel,gt=at.model.dimensions[tt.model.dimensionInd],pt=at.trace,Rt=Te.y+Te.height/2,$t,Wt;at.dimensions.length>1&&gt.displayInd===at.dimensions.length-1?($t=Te.left,Wt="left"):($t=Te.left+Te.width,Wt="right");var Ht=tt.model.categoryLabel,Ft=Be.parcatsViewModel.model.count,st=0;Be.categoryViewModel.bands.forEach(function(rn){rn.color===Be.color&&(st+=rn.count)});var rt=tt.model.count,Ue=0;at.pathSelection.each(function(rn){rn.model.color===Be.color&&(Ue+=rn.model.count)});var xt=st/Ft,Gt=st/Ue,Jt=st/rt,Ut={countLabel:st,categoryLabel:Ht,probabilityLabel:xt.toFixed(3)},kr=[];tt.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&kr.push(["Count:",Ut.countLabel].join(" ")),tt.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(kr.push("P(color ∩ "+Ht+"): "+Ut.probabilityLabel),kr.push("P("+Ht+" | color): "+Gt.toFixed(3)),kr.push("P(color | "+Ht+"): "+Jt.toFixed(3)));var Pr=kr.join("<br>"),$r=p.mostReadable(Be.color,["black","white"]);return{trace:pt,x:se*($t-De.left),y:Ee*(Rt-De.top),text:Pr,color:Be.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:$r,fontSize:10,idealAlign:Wt,hovertemplate:pt.hovertemplate,hovertemplateLabels:Ut,eventData:[{data:pt._input,fullData:pt,category:Ht,count:Ft,probability:xt,categorycount:rt,colorcount:Ue,bandcolorcount:st}]}}function Q(he){if(!he.parcatsViewModel.dragDimension&&he.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var De=w.mouse(this)[1];if(De<-1)return;var xe=he.parcatsViewModel.graphDiv,se=xe._fullLayout,Ee=se._paperdiv.node().getBoundingClientRect(),Te=he.parcatsViewModel.hoveron,Be=this;if(Te==="color"?(S(Be),W(Be,"plotly_hover",w.event)):(y(Be),M(Be,"plotly_hover",w.event)),he.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var tt;Te==="category"?tt=$(xe,Ee,Be):Te==="color"?tt=K(xe,Ee,Be):Te==="dimension"&&(tt=Z(xe,Ee,Be)),tt&&z.loneHover(tt,{container:se._hoverlayer.node(),outerContainer:se._paper.node(),gd:xe})}}}function J(he){var De=he.parcatsViewModel;if(!De.dragDimension&&(C(De.pathSelection),F(De.dimensionSelection.selectAll("g.category")),P(De.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),z.loneUnhover(De.graphDiv._fullLayout._hoverlayer.node()),De.pathSelection.sort(_),De.hoverinfoItems.indexOf("skip")===-1)){var xe=he.parcatsViewModel.hoveron,se=this;xe==="color"?W(se,"plotly_unhover",w.event):M(se,"plotly_unhover",w.event)}}function G(he){he.parcatsViewModel.arrangement!=="fixed"&&(he.dragDimensionDisplayInd=he.model.displayInd,he.initialDragDimensionDisplayInds=he.parcatsViewModel.model.dimensions.map(function(De){return De.displayInd}),he.dragHasMoved=!1,he.dragCategoryDisplayInd=null,w.select(this).selectAll("g.category").select("rect.catrect").each(function(De){var xe=w.mouse(this)[0],se=w.mouse(this)[1];-2<=xe&&xe<=De.width+2&&-2<=se&&se<=De.height+2&&(he.dragCategoryDisplayInd=De.model.displayInd,he.initialDragCategoryDisplayInds=he.model.categories.map(function(Ee){return Ee.displayInd}),De.model.dragY=De.y,l.raiseToTop(this.parentNode),w.select(this.parentNode).selectAll("rect.bandrect").each(function(Ee){Ee.y<se&&se<=Ee.y+Ee.height&&(he.potentialClickBand=this)}))}),he.parcatsViewModel.dragDimension=he,z.loneUnhover(he.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()))}function ee(he){if(he.parcatsViewModel.arrangement!=="fixed"&&(he.dragHasMoved=!0,he.dragDimensionDisplayInd!==null)){var De=he.dragDimensionDisplayInd,xe=De-1,se=De+1,Ee=he.parcatsViewModel.dimensions[De];if(he.dragCategoryDisplayInd!==null){var Te=Ee.categories[he.dragCategoryDisplayInd];Te.model.dragY+=w.event.dy;var Be=Te.model.dragY,tt=Te.model.displayInd,at=Ee.categories,gt=at[tt-1],pt=at[tt+1];gt!==void 0&&Be<gt.y+gt.height/2&&(Te.model.displayInd=gt.model.displayInd,gt.model.displayInd=tt),pt!==void 0&&Be+Te.height>pt.y+pt.height/2&&(Te.model.displayInd=pt.model.displayInd,pt.model.displayInd=tt),he.dragCategoryDisplayInd=Te.model.displayInd}if(he.dragCategoryDisplayInd===null||he.parcatsViewModel.arrangement==="freeform"){Ee.model.dragX=w.event.x;var Rt=he.parcatsViewModel.dimensions[xe],$t=he.parcatsViewModel.dimensions[se];Rt!==void 0&&Ee.model.dragX<Rt.x+Rt.width&&(Ee.model.displayInd=Rt.model.displayInd,Rt.model.displayInd=De),$t!==void 0&&Ee.model.dragX+Ee.width>$t.x&&(Ee.model.displayInd=$t.model.displayInd,$t.model.displayInd=he.dragDimensionDisplayInd),he.dragDimensionDisplayInd=Ee.model.displayInd}be(he.parcatsViewModel),oe(he.parcatsViewModel),Oe(he.parcatsViewModel),we(he.parcatsViewModel)}}function re(he){if(he.parcatsViewModel.arrangement!=="fixed"&&he.dragDimensionDisplayInd!==null){w.select(this).selectAll("text").attr("font-weight","normal");var De={},xe=fe(he.parcatsViewModel),se=he.parcatsViewModel.model.dimensions.map(function($t){return $t.displayInd}),Ee=he.initialDragDimensionDisplayInds.some(function($t,Wt){return $t!==se[Wt]});Ee&&se.forEach(function($t,Wt){var Ht=he.parcatsViewModel.model.dimensions[Wt].containerInd;De["dimensions["+Ht+"].displayindex"]=$t});var Te=!1;if(he.dragCategoryDisplayInd!==null){var Be=he.model.categories.map(function($t){return $t.displayInd});if(Te=he.initialDragCategoryDisplayInds.some(function($t,Wt){return $t!==Be[Wt]}),Te){var tt=he.model.categories.slice().sort(function($t,Wt){return $t.displayInd-Wt.displayInd}),at=tt.map(function($t){return $t.categoryValue}),gt=tt.map(function($t){return $t.categoryLabel});De["dimensions["+he.model.containerInd+"].categoryarray"]=[at],De["dimensions["+he.model.containerInd+"].ticktext"]=[gt],De["dimensions["+he.model.containerInd+"].categoryorder"]="array"}}if(he.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!he.dragHasMoved&&he.potentialClickBand&&(he.parcatsViewModel.hoveron==="color"?W(he.potentialClickBand,"plotly_click",w.event.sourceEvent):M(he.potentialClickBand,"plotly_click",w.event.sourceEvent)),he.model.dragX=null,he.dragCategoryDisplayInd!==null){var pt=he.parcatsViewModel.dimensions[he.dragDimensionDisplayInd].categories[he.dragCategoryDisplayInd];pt.model.dragY=null,he.dragCategoryDisplayInd=null}he.dragDimensionDisplayInd=null,he.parcatsViewModel.dragDimension=null,he.dragHasMoved=null,he.potentialClickBand=null,be(he.parcatsViewModel),oe(he.parcatsViewModel);var Rt=w.transition().duration(300).ease("cubic-in-out");Rt.each(function(){Oe(he.parcatsViewModel,!0),we(he.parcatsViewModel,!0)}).each("end",function(){(Ee||Te)&&O.restyle(he.parcatsViewModel.graphDiv,De,[xe])})}}function fe(he){for(var De,xe=he.graphDiv._fullData,se=0;se<xe.length;se++)if(he.key===xe[se].uid){De=se;break}return De}function we(he,De){De===void 0&&(De=!1);function xe(se){return De?se.transition():se}he.pathSelection.data(function(se){return se.paths},h),xe(he.pathSelection).attr("d",function(se){return se.svgD})}function Oe(he,De){De===void 0&&(De=!1);function xe(at){return De?at.transition():at}he.dimensionSelection.data(function(at){return at.dimensions},h);var se=he.dimensionSelection.selectAll("g.category").data(function(at){return at.categories},h);xe(he.dimensionSelection).attr("transform",function(at){return u(at.x,0)}),xe(se).attr("transform",function(at){return u(0,at.y)});var Ee=se.select(".dimlabel");Ee.text(function(at,gt){return gt===0?at.parcatsViewModel.model.dimensions[at.model.dimensionInd].dimensionLabel:null});var Te=se.select(".catlabel");Te.attr("text-anchor",function(at){return m(at)?"start":"end"}).attr("x",function(at){return m(at)?at.width+5:-5}).each(function(at){var gt,pt;m(at)?(gt=at.width+5,pt="start"):(gt=-5,pt="end"),w.select(this).selectAll("tspan").attr("x",gt).attr("text-anchor",pt)});var Be=se.selectAll("rect.bandrect").data(function(at){return at.bands},h),tt=Be.enter().append("rect").attr("class","bandrect").attr("cursor","move").attr("stroke-opacity",0).attr("fill",function(at){return at.color}).attr("fill-opacity",0);Be.attr("fill",function(at){return at.color}).attr("width",function(at){return at.width}).attr("height",function(at){return at.height}).attr("y",function(at){return at.y}),P(tt),Be.each(function(){l.raiseToTop(this)}),Be.exit().remove()}function ke(he,De,xe){var se=xe[0],Ee=De.margin||{l:80,r:80,t:100,b:80},Te=se.trace,Be=Te.domain,tt=De.width,at=De.height,gt=Math.floor(tt*(Be.x[1]-Be.x[0])),pt=Math.floor(at*(Be.y[1]-Be.y[0])),Rt=Be.x[0]*tt+Ee.l,$t=De.height-Be.y[1]*De.height+Ee.t,Wt=Te.line.shape,Ht;Te.hoverinfo==="all"?Ht=["count","probability"]:Ht=(Te.hoverinfo||"").split("+");var Ft={trace:Te,key:Te.uid,model:se,x:Rt,y:$t,width:gt,height:pt,hoveron:Te.hoveron,hoverinfoItems:Ht,arrangement:Te.arrangement,bundlecolors:Te.bundlecolors,sortpaths:Te.sortpaths,labelfont:Te.labelfont,categorylabelfont:Te.tickfont,pathShape:Wt,dragDimension:null,margin:Ee,paths:[],dimensions:[],graphDiv:he,traceSelection:null,pathSelection:null,dimensionSelection:null};return se.dimensions&&(be(Ft),oe(Ft)),Ft}function Le(he,De,xe,se,Ee){var Te=[],Be=[],tt,at;for(at=0;at<xe.length-1;at++)tt=R(xe[at]+he[at],he[at+1]),Te.push(tt(Ee)),Be.push(tt(1-Ee));var gt="M "+he[0]+","+De[0];for(gt+="l"+xe[0]+",0 ",at=1;at<xe.length;at++)gt+="C"+Te[at-1]+","+De[at-1]+" "+Be[at-1]+","+De[at]+" "+he[at]+","+De[at],gt+="l"+xe[at]+",0 ";for(gt+="l0,"+se+" ",gt+="l -"+xe[xe.length-1]+",0 ",at=xe.length-2;at>=0;at--)gt+="C"+Be[at]+","+(De[at+1]+se)+" "+Te[at]+","+(De[at]+se)+" "+(he[at]+xe[at])+","+(De[at]+se),gt+="l-"+xe[at]+",0 ";return gt+="Z",gt}function oe(he){var De=he.dimensions,xe=he.model,se=De.map(function(ci){return ci.categories.map(function(In){return In.y})}),Ee=he.model.dimensions.map(function(ci){return ci.categories.map(function(In){return In.displayInd})}),Te=he.model.dimensions.map(function(ci){return ci.displayInd}),Be=he.dimensions.map(function(ci){return ci.model.dimensionInd}),tt=De.map(function(ci){return ci.x}),at=De.map(function(ci){return ci.width}),gt=[];for(var pt in xe.paths)xe.paths.hasOwnProperty(pt)&&gt.push(xe.paths[pt]);function Rt(ci){var In=ci.categoryInds.map(function(mr,St){return Ee[St][mr]}),Gn=Be.map(function(mr){return In[mr]});return Gn}gt.sort(function(ci,In){var Gn=Rt(ci),mr=Rt(In);return he.sortpaths==="backward"&&(Gn.reverse(),mr.reverse()),Gn.push(ci.valueInds[0]),mr.push(In.valueInds[0]),he.bundlecolors&&(Gn.unshift(ci.rawColor),mr.unshift(In.rawColor)),Gn<mr?-1:Gn>mr?1:0});for(var $t=new Array(gt.length),Wt=De[0].model.count,Ht=De[0].categories.map(function(ci){return ci.height}).reduce(function(ci,In){return ci+In}),Ft=0;Ft<gt.length;Ft++){var st=gt[Ft],rt;Wt>0?rt=Ht*(st.count/Wt):rt=0;for(var Ue=new Array(se.length),xt=0;xt<st.categoryInds.length;xt++){var Gt=st.categoryInds[xt],Jt=Ee[xt][Gt],Ut=Te[xt];Ue[Ut]=se[Ut][Jt],se[Ut][Jt]+=rt;var kr=he.dimensions[Ut].categories[Jt],Pr=kr.bands.length,$r=kr.bands[Pr-1];if($r===void 0||st.rawColor!==$r.rawColor){var rn=$r===void 0?0:$r.y+$r.height;kr.bands.push({key:rn,color:st.color,rawColor:st.rawColor,height:rt,width:kr.width,count:st.count,y:rn,categoryViewModel:kr,parcatsViewModel:he})}else{var kn=kr.bands[Pr-1];kn.height+=rt,kn.count+=st.count}}var Rn;he.pathShape==="hspline"?Rn=Le(tt,Ue,at,rt,.5):Rn=Le(tt,Ue,at,rt,0),$t[Ft]={key:st.valueInds[0],model:st,height:rt,leftXs:tt,topYs:Ue,dimWidths:at,svgD:Rn,parcatsViewModel:he}}he.paths=$t}function be(he){var De=he.model.dimensions.map(function(Be){return{displayInd:Be.displayInd,dimensionInd:Be.dimensionInd}});De.sort(function(Be,tt){return Be.displayInd-tt.displayInd});var xe=[];for(var se in De){var Ee=De[se].dimensionInd,Te=he.model.dimensions[Ee];xe.push(_e(he,Te))}he.dimensions=xe}function _e(he,De){var xe=40,se=16,Ee=he.model.dimensions.length,Te=De.displayInd,Be,tt,at;Ee>1?Be=(he.width-2*xe-se)/(Ee-1):Be=0,tt=xe,at=tt+Be*Te;var gt=[],pt=he.model.maxCats,Rt=De.categories.length,$t=8,Wt=De.count,Ht=he.height-$t*(pt-1),Ft,st,rt,Ue,xt,Gt=(pt-Rt)*$t/2,Jt=De.categories.map(function(Ut){return{displayInd:Ut.displayInd,categoryInd:Ut.categoryInd}});for(Jt.sort(function(Ut,kr){return Ut.displayInd-kr.displayInd}),xt=0;xt<Rt;xt++)Ue=Jt[xt].categoryInd,st=De.categories[Ue],Wt>0?Ft=st.count/Wt*Ht:Ft=0,rt={key:st.valueInds[0],model:st,width:se,height:Ft,y:st.dragY!==null?st.dragY:Gt,bands:[],parcatsViewModel:he},Gt=Gt+Ft+$t,gt.push(rt);return{key:De.dimensionInd,x:De.dragX!==null?De.dragX:at,y:0,width:se,model:De,categories:gt,parcatsViewModel:he,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}}}),Exe=U({"src/traces/parcats/plot.js"(pe,le){var w=Het();le.exports=function(O,z,l,u){var c=O._fullLayout,p=c._paper,f=c._size;w(O,p,z,{width:f.w,height:f.h,margin:{t:f.t,r:f.r,b:f.b,l:f.l}},l,u)}}}),jet=U({"src/traces/parcats/base_plot.js"(pe){var le=Om().getModuleCalcData,w=Exe(),R="parcats";pe.name=R,pe.plot=function(O,z,l,u){var c=le(O.calcdata,R);if(c.length){var p=c[0];w(O,p,l,u)}},pe.clean=function(O,z,l,u){var c=u._has&&u._has("parcats"),p=z._has&&z._has("parcats");c&&!p&&u._paperdiv.selectAll(".parcats").remove()}}}),Vet=U({"src/traces/parcats/index.js"(pe,le){le.exports={attributes:Txe(),supplyDefaults:Bet(),calc:Uet(),plot:Exe(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:jet(),categories:["noOpacity"],meta:{}}}}),qet=U({"lib/parcats.js"(pe,le){le.exports=Vet()}}),LI=U({"src/plots/mapbox/constants.js"(pe,le){var w=pa(),R="1.13.4",O='© <a target="_blank" href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',z=['© <a target="_blank" href="https://carto.com/">Carto</a>',O].join(" "),l=['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(" "),u=['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(" "),c={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:O,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:z,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:z,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:l,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:l,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:u,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"}},p=w(c);le.exports={requiredVersion:R,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:c,styleValuesNonMapbox:p,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@"+R+"."].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:",p.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')`}}}}),YU=U({"src/plots/mapbox/layout_attributes.js"(pe,le){var w=ii(),R=Lr().defaultLine,O=oh().attributes,z=Ir(),l=Kc().textposition,u=zl().overrideAll,c=Tc().templatedArray,p=LI(),f=z({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});f.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var v=le.exports=u({_arrayAttrRegexps:[w.counterRegex("mapbox",".layers",!0)],domain:O({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:p.styleValuesMapbox.concat(p.styleValuesNonMapbox),dflt:p.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:c("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:R},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:R}},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:f,textposition:w.extendFlat({},l,{arrayOk:!1})}})},"plot","from-root");v.uirevision={valType:"any",editType:"none"}}}),xK=U({"src/traces/scattermapbox/attributes.js"(pe,le){var w=Js().hovertemplateAttrs,R=Js().texttemplateAttrs,O=Xc(),z=C6(),l=Kc(),u=YU(),c=Jn(),p=Jd(),f=Ar().extendFlat,v=zl().overrideAll,h=YU(),m=z.line,_=z.marker;le.exports=v({lon:z.lon,lat:z.lat,cluster:{enabled:{valType:"boolean"},maxzoom:f({},h.layers.maxzoom,{}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1},size:{valType:"number",arrayOk:!0,dflt:20,min:0},color:{valType:"color",arrayOk:!0},opacity:f({},_.opacity,{dflt:1})},mode:f({},l.mode,{dflt:"markers"}),text:f({},l.text,{}),texttemplate:R({editType:"plot"},{keys:["lat","lon","text"]}),hovertext:f({},l.hovertext,{}),line:{color:m.color,width:m.width},connectgaps:l.connectgaps,marker:f({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:_.opacity,size:_.size,sizeref:_.sizeref,sizemin:_.sizemin,sizemode:_.sizemode},p("marker")),fill:z.fill,fillcolor:O(),textfont:u.layers.symbol.textfont,textposition:u.layers.symbol.textposition,below:{valType:"string"},selected:{marker:l.selected.marker},unselected:{marker:l.unselected.marker},hoverinfo:f({},c.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:w()},"calc","nested")}}),Axe=U({"src/traces/scattermapbox/constants.js"(pe,le){var w=["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"];le.exports={isSupportedFont:function(R){return w.indexOf(R)!==-1}}}}),Get=U({"src/traces/scattermapbox/defaults.js"(pe,le){var w=ii(),R=Qd(),O=r0(),z=Xy(),l=y0(),u=Ch(),c=xK(),p=Axe().isSupportedFont;le.exports=function(h,m,_,x){function A(S,M){return w.coerce(h,m,c,S,M)}function E(S,M){return w.coerce2(h,m,c,S,M)}var D=f(h,m,A);if(!D){m.visible=!1;return}if(A("text"),A("texttemplate"),A("hovertext"),A("hovertemplate"),A("mode"),A("below"),R.hasMarkers(m)){O(h,m,_,x,A,{noLine:!0,noAngle:!0}),A("marker.allowoverlap"),A("marker.angle");var g=m.marker;g.symbol!=="circle"&&(w.isArrayOrTypedArray(g.size)&&(g.size=g.size[0]),w.isArrayOrTypedArray(g.color)&&(g.color=g.color[0]))}R.hasLines(m)&&(z(h,m,_,x,A,{noDash:!0}),A("connectgaps"));var C=E("cluster.maxzoom"),I=E("cluster.step"),N=E("cluster.color",m.marker&&m.marker.color||_),F=E("cluster.size"),k=E("cluster.opacity"),P=C!==!1||I!==!1||N!==!1||F!==!1||k!==!1,T=A("cluster.enabled",P);if(T||R.hasText(m)){var y=x.font.family;l(h,m,x,A,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:p(y)?y:"Open Sans Regular",weight:x.font.weight,style:x.font.style,size:x.font.size,color:x.font.color}})}A("fill"),m.fill!=="none"&&u(h,m,_,A),w.coerceSelectionMarkerOpacity(m,A)};function f(v,h,m){var _=m("lon")||[],x=m("lat")||[],A=Math.min(_.length,x.length);return h._length=A,A}}}),Cxe=U({"src/traces/scattermapbox/format_labels.js"(pe,le){var w=Yu();le.exports=function(O,z,l){var u={},c=l[z.subplot]._subplot,p=c.mockAxis,f=O.lonlat;return u.lonLabel=w.tickText(p,p.c2l(f[0]),!0).text,u.latLabel=w.tickText(p,p.c2l(f[1]),!0).text,u}}}),Mxe=U({"src/plots/mapbox/convert_text_opts.js"(pe,le){var w=ii();le.exports=function(O,z){var l=O.split(" "),u=l[0],c=l[1],p=w.isArrayOrTypedArray(z)?w.mean(z):z,f=.5+p/100,v=1.5+p/100,h=["",""],m=[0,0];switch(u){case"top":h[0]="top",m[1]=-v;break;case"bottom":h[0]="bottom",m[1]=v;break}switch(c){case"left":h[1]="right",m[0]=-f;break;case"right":h[1]="left",m[0]=f;break}var _;return h[0]&&h[1]?_=h.join("-"):h[0]?_=h[0]:h[1]?_=h[1]:_="center",{anchor:_,offset:m}}}}),$et=U({"src/traces/scattermapbox/convert.js"(pe,le){var w=_t(),R=ii(),O=Dt().BADNUM,z=V4(),l=vd(),u=ec(),c=$_(),p=Qd(),f=Axe().isSupportedFont,v=Mxe(),h=v0().appendArrayPointValue,m=ah().NEWLINES,_=ah().BR_TAG_ALL;le.exports=function(k,P){var T=P[0].trace,y=T.visible===!0&&T._length!==0,S=T.fill!=="none",M=p.hasLines(T),W=p.hasMarkers(T),$=p.hasText(T),Z=W&&T.marker.symbol==="circle",K=W&&T.marker.symbol!=="circle",Q=T.cluster&&T.cluster.enabled,J=x("fill"),G=x("line"),ee=x("circle"),re=x("symbol"),fe={fill:J,line:G,circle:ee,symbol:re};if(!y)return fe;var we;if((S||M)&&(we=z.calcTraceToLineCoords(P)),S&&(J.geojson=z.makePolygon(we),J.layout.visibility="visible",R.extendFlat(J.paint,{"fill-color":T.fillcolor})),M&&(G.geojson=z.makeLine(we),G.layout.visibility="visible",R.extendFlat(G.paint,{"line-width":T.line.width,"line-color":T.line.color,"line-opacity":T.opacity})),Z){var Oe=A(P);ee.geojson=Oe.geojson,ee.layout.visibility="visible",Q&&(ee.filter=["!",["has","point_count"]],fe.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":I(T.cluster.color,T.cluster.step),"circle-radius":I(T.cluster.size,T.cluster.step),"circle-opacity":I(T.cluster.opacity,T.cluster.step)}},fe.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":N(T),"text-size":12}}),R.extendFlat(ee.paint,{"circle-color":Oe.mcc,"circle-radius":Oe.mrc,"circle-opacity":Oe.mo})}if(Z&&Q&&(ee.filter=["!",["has","point_count"]]),(K||$)&&(re.geojson=E(P,k),R.extendFlat(re.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),K&&(R.extendFlat(re.layout,{"icon-size":T.marker.size/10}),"angle"in T.marker&&T.marker.angle!=="auto"&&R.extendFlat(re.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),re.layout["icon-allow-overlap"]=T.marker.allowoverlap,R.extendFlat(re.paint,{"icon-opacity":T.opacity*T.marker.opacity,"icon-color":T.marker.color})),$)){var ke=(T.marker||{}).size,Le=v(T.textposition,ke);R.extendFlat(re.layout,{"text-size":T.textfont.size,"text-anchor":Le.anchor,"text-offset":Le.offset,"text-font":N(T)}),R.extendFlat(re.paint,{"text-color":T.textfont.color,"text-opacity":T.opacity})}return fe};function x(F){return{type:F,geojson:z.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function A(F){var k=F[0].trace,P=k.marker,T=k.selectedpoints,y=R.isArrayOrTypedArray(P.color),S=R.isArrayOrTypedArray(P.size),M=R.isArrayOrTypedArray(P.opacity),W;function $(ke){return k.opacity*ke}function Z(ke){return ke/2}var K;y&&(l.hasColorscale(k,"marker")?K=l.makeColorScaleFuncFromTrace(P):K=R.identity);var Q;S&&(Q=c(k));var J;M&&(J=function(ke){var Le=w(ke)?+R.constrain(ke,0,1):0;return $(Le)});var G=[];for(W=0;W<F.length;W++){var ee=F[W],re=ee.lonlat;if(!C(re)){var fe={};K&&(fe.mcc=ee.mcc=K(ee.mc)),Q&&(fe.mrc=ee.mrc=Q(ee.ms)),J&&(fe.mo=J(ee.mo)),T&&(fe.selected=ee.selected||0),G.push({type:"Feature",id:W+1,geometry:{type:"Point",coordinates:re},properties:fe})}}var we;if(T)for(we=u.makeSelectedPointStyleFns(k),W=0;W<G.length;W++){var Oe=G[W].properties;we.selectedOpacityFn&&(Oe.mo=$(we.selectedOpacityFn(Oe))),we.selectedColorFn&&(Oe.mcc=we.selectedColorFn(Oe)),we.selectedSizeFn&&(Oe.mrc=we.selectedSizeFn(Oe))}return{geojson:{type:"FeatureCollection",features:G},mcc:y||we&&we.selectedColorFn?{type:"identity",property:"mcc"}:P.color,mrc:S||we&&we.selectedSizeFn?{type:"identity",property:"mrc"}:Z(P.size),mo:M||we&&we.selectedOpacityFn?{type:"identity",property:"mo"}:$(P.opacity)}}function E(F,k){for(var P=k._fullLayout,T=F[0].trace,y=T.marker||{},S=y.symbol,M=y.angle,W=S!=="circle"?D(S):g,$=M!=="auto"?D(M,!0):g,Z=p.hasText(T)?D(T.text):g,K=[],Q=0;Q<F.length;Q++){var J=F[Q];if(!C(J.lonlat)){var G=T.texttemplate,ee;if(G){var re=Array.isArray(G)?G[Q]||"":G,fe=T._module.formatLabels(J,T,P),we={};h(we,T,J.i);var Oe=T._meta||{};ee=R.texttemplateString(re,fe,P._d3locale,we,J,Oe)}else ee=Z(Q);ee&&(ee=ee.replace(m,"").replace(_,`
`)),K.push({type:"Feature",geometry:{type:"Point",coordinates:J.lonlat},properties:{symbol:W(Q),angle:$(Q),text:ee}})}}return{type:"FeatureCollection",features:K}}function D(F,k){return R.isArrayOrTypedArray(F)?k?function(P){return w(F[P])?+F[P]:0}:function(P){return F[P]}:F?function(){return F}:g}function g(){return""}function C(F){return F[0]===O}function I(F,k){var P;if(R.isArrayOrTypedArray(F)&&R.isArrayOrTypedArray(k)){P=["step",["get","point_count"],F[0]];for(var T=1;T<F.length;T++)P.push(k[T-1],F[T])}else P=F;return P}function N(F){var k=F.textfont,P=k.family,T=k.style,y=k.weight,S=P.split(" "),M=S[S.length-1]==="Italic";M&&S.pop(),M=M||T==="italic";var W=S.join(" ");y==="bold"&&S.indexOf("Bold")===-1?W+=" Bold":y<=1e3&&(S[0]==="Metropolis"?(W="Metropolis",y>850?W+=" Black":y>750?W+=" Extra Bold":y>650?W+=" Bold":y>550?W+=" Semi Bold":y>450?W+=" Medium":y>350?W+=" Regular":y>250?W+=" Light":y>150?W+=" Extra Light":W+=" Thin"):S.slice(0,2).join(" ")==="Open Sans"?(W="Open Sans",y>750?W+=" Extrabold":y>650?W+=" Bold":y>550?W+=" Semibold":y>350?W+=" Regular":W+=" Light"):S.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(W="Klokantech Noto Sans",S[3]==="CJK"&&(W+=" CJK"),W+=y>500?" Bold":" Regular")),M&&(W+=" Italic"),W==="Open Sans Regular Italic"?W="Open Sans Italic":W==="Open Sans Regular Bold"?W="Open Sans Bold":W==="Open Sans Regular Bold Italic"?W="Open Sans Bold Italic":W==="Klokantech Noto Sans Regular Italic"&&(W="Klokantech Noto Sans Italic"),f(W)||(W=P);var $=W.split(", ");return $}}}),Wet=U({"src/traces/scattermapbox/plot.js"(pe,le){var w=ii(),R=$et(),O=LI().traceLayerPrefix,z={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function l(c,p,f,v){this.type="scattermapbox",this.subplot=c,this.uid=p,this.clusterEnabled=f,this.isHidden=v,this.sourceIds={fill:"source-"+p+"-fill",line:"source-"+p+"-line",circle:"source-"+p+"-circle",symbol:"source-"+p+"-symbol",cluster:"source-"+p+"-circle",clusterCount:"source-"+p+"-circle"},this.layerIds={fill:O+p+"-fill",line:O+p+"-line",circle:O+p+"-circle",symbol:O+p+"-symbol",cluster:O+p+"-cluster",clusterCount:O+p+"-cluster-count"},this.below=null}var u=l.prototype;u.addSource=function(c,p,f){var v={type:"geojson",data:p.geojson};f&&f.enabled&&w.extendFlat(v,{cluster:!0,clusterMaxZoom:f.maxzoom});var h=this.subplot.map.getSource(this.sourceIds[c]);h?h.setData(p.geojson):this.subplot.map.addSource(this.sourceIds[c],v)},u.setSourceData=function(c,p){this.subplot.map.getSource(this.sourceIds[c]).setData(p.geojson)},u.addLayer=function(c,p,f){var v={type:p.type,id:this.layerIds[c],source:this.sourceIds[c],layout:p.layout,paint:p.paint};p.filter&&(v.filter=p.filter);for(var h=this.layerIds[c],m,_=this.subplot.getMapLayers(),x=0;x<_.length;x++)if(_[x].id===h){m=!0;break}m?(this.subplot.setOptions(h,"setLayoutProperty",v.layout),v.layout.visibility==="visible"&&this.subplot.setOptions(h,"setPaintProperty",v.paint)):this.subplot.addLayer(v,f)},u.update=function(p){var f=p[0].trace,v=this.subplot,h=v.map,m=R(v.gd,p),_=v.belowLookup["trace-"+this.uid],x=!!(f.cluster&&f.cluster.enabled),A=!!this.clusterEnabled,E=this;function D(y){y||E.addSource("circle",m.circle,f.cluster);for(var S=z.cluster,M=0;M<S.length;M++){var W=S[M],$=m[W];E.addLayer(W,$,_)}}function g(y){for(var S=z.cluster,M=S.length-1;M>=0;M--){var W=S[M];h.removeLayer(E.layerIds[W])}y||h.removeSource(E.sourceIds.circle)}function C(y){for(var S=z.nonCluster,M=0;M<S.length;M++){var W=S[M],$=m[W];y||E.addSource(W,$),E.addLayer(W,$,_)}}function I(y){for(var S=z.nonCluster,M=S.length-1;M>=0;M--){var W=S[M];h.removeLayer(E.layerIds[W]),y||h.removeSource(E.sourceIds[W])}}function N(y){A?g(y):I(y)}function F(y){x?D(y):C(y)}function k(){for(var y=x?z.cluster:z.nonCluster,S=0;S<y.length;S++){var M=y[S],W=m[M];W&&(v.setOptions(E.layerIds[M],"setLayoutProperty",W.layout),W.layout.visibility==="visible"&&(M!=="cluster"&&E.setSourceData(M,W),v.setOptions(E.layerIds[M],"setPaintProperty",W.paint)))}}var P=this.isHidden,T=f.visible!==!0;T?P||N():P?T||F():A!==x?(N(),F()):(this.below!==_&&(N(!0),F(!0)),k()),this.clusterEnabled=x,this.isHidden=T,this.below=_,p[0].trace._glTrace=this},u.dispose=function(){for(var p=this.subplot.map,f=this.clusterEnabled?z.cluster:z.nonCluster,v=f.length-1;v>=0;v--){var h=f[v];p.removeLayer(this.layerIds[h]),p.removeSource(this.sourceIds[h])}},le.exports=function(p,f){var v=f[0].trace,h=v.cluster&&v.cluster.enabled,m=v.visible!==!0,_=new l(p,v.uid,h,m),x=R(p.gd,f),A=_.below=p.belowLookup["trace-"+v.uid],E,D,g;if(h)for(_.addSource("circle",x.circle,v.cluster),E=0;E<z.cluster.length;E++)D=z.cluster[E],g=x[D],_.addLayer(D,g,A);else for(E=0;E<z.nonCluster.length;E++)D=z.nonCluster[E],g=x[D],_.addSource(D,g,v.cluster),_.addLayer(D,g,A);return f[0].trace._glTrace=_,_}}}),_K=U({"src/traces/scattermapbox/hover.js"(pe,le){var w=Dp(),R=ii(),O=ng(),z=R.fillText,l=Dt().BADNUM,u=LI().traceLayerPrefix;function c(f,v,h){var m=f.cd,_=m[0].trace,x=f.xa,A=f.ya,E=f.subplot,D=[],g=u+_.uid+"-circle",C=_.cluster&&_.cluster.enabled;if(C){var I=E.map.queryRenderedFeatures(null,{layers:[g]});D=I.map(function(Q){return Q.id})}var N=v>=0?Math.floor((v+180)/360):Math.ceil((v-180)/360),F=N*360,k=v-F;function P(Q){var J=Q.lonlat;if(J[0]===l||C&&D.indexOf(Q.i+1)===-1)return 1/0;var G=R.modHalf(J[0],360),ee=J[1],re=E.project([G,ee]),fe=re.x-x.c2p([k,ee]),we=re.y-A.c2p([G,h]),Oe=Math.max(3,Q.mrc||0);return Math.max(Math.sqrt(fe*fe+we*we)-Oe,1-3/Oe)}if(w.getClosest(m,P,f),f.index!==!1){var T=m[f.index],y=T.lonlat,S=[R.modHalf(y[0],360)+F,y[1]],M=x.c2p(S),W=A.c2p(S),$=T.mrc||1;f.x0=M-$,f.x1=M+$,f.y0=W-$,f.y1=W+$;var Z={};Z[_.subplot]={_subplot:E};var K=_._module.formatLabels(T,_,Z);return f.lonLabel=K.lonLabel,f.latLabel=K.latLabel,f.color=O(_,T),f.extraText=p(_,T,m[0].t.labels),f.hovertemplate=_.hovertemplate,[f]}}function p(f,v,h){if(f.hovertemplate)return;var m=v.hi||f.hoverinfo,_=m.split("+"),x=_.indexOf("all")!==-1,A=_.indexOf("lon")!==-1,E=_.indexOf("lat")!==-1,D=v.lonlat,g=[];function C(I){return I+"°"}return x||A&&E?g.push("("+C(D[1])+", "+C(D[0])+")"):A?g.push(h.lon+C(D[0])):E&&g.push(h.lat+C(D[1])),(x||_.indexOf("text")!==-1)&&z(v,f,g),g.join("<br>")}le.exports={hoverPoints:c,getExtraText:p}}}),Yet=U({"src/traces/scattermapbox/event_data.js"(pe,le){le.exports=function(R,O){return R.lon=O.lon,R.lat=O.lat,R}}}),Xet=U({"src/traces/scattermapbox/select.js"(pe,le){var w=ii(),R=Qd(),O=Dt().BADNUM;le.exports=function(l,u){var c=l.cd,p=l.xaxis,f=l.yaxis,v=[],h=c[0].trace,m;if(!R.hasMarkers(h))return[];if(u===!1)for(m=0;m<c.length;m++)c[m].selected=0;else for(m=0;m<c.length;m++){var _=c[m],x=_.lonlat;if(x[0]!==O){var A=[w.modHalf(x[0],360),x[1]],E=[p.c2p(A),f.c2p(A)];u.contains(E,null,m,l)?(v.push({pointNumber:m,lon:x[0],lat:x[1]}),_.selected=1):_.selected=0}}return v}}}),Rxe=U({"node_modules/@plotly/mapbox-gl/dist/mapbox-gl-unminified.js"(pe,le){(function(w,R){typeof pe=="object"&&typeof le<"u"?le.exports=R():(w=w||self,w.mapboxgl=R())})(pe,function(){var w,R,O;function z(l,u){if(!w)w=u;else if(!R)R=u;else{var c="var sharedChunk = {}; ("+w+")(sharedChunk); ("+R+")(sharedChunk);",p={};w(p),O=u(p),typeof window<"u"&&(O.workerUrl=window.URL.createObjectURL(new Blob([c],{type:"text/javascript"})))}}return z(["exports"],function(l){function u(H,j){return j={exports:{}},H(j,j.exports),j.exports}var c="1.13.4",p=f;function f(H,j,ue,Re){this.cx=3*H,this.bx=3*(ue-H)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*j,this.by=3*(Re-j)-this.cy,this.ay=1-this.cy-this.by,this.p1x=H,this.p1y=Re,this.p2x=ue,this.p2y=Re}f.prototype.sampleCurveX=function(H){return((this.ax*H+this.bx)*H+this.cx)*H},f.prototype.sampleCurveY=function(H){return((this.ay*H+this.by)*H+this.cy)*H},f.prototype.sampleCurveDerivativeX=function(H){return(3*this.ax*H+2*this.bx)*H+this.cx},f.prototype.solveCurveX=function(H,j){typeof j>"u"&&(j=1e-6);var ue,Re,Qe,dt,Mt;for(Qe=H,Mt=0;Mt<8;Mt++){if(dt=this.sampleCurveX(Qe)-H,Math.abs(dt)<j)return Qe;var ir=this.sampleCurveDerivativeX(Qe);if(Math.abs(ir)<1e-6)break;Qe=Qe-dt/ir}if(ue=0,Re=1,Qe=H,Qe<ue)return ue;if(Qe>Re)return Re;for(;ue<Re;){if(dt=this.sampleCurveX(Qe),Math.abs(dt-H)<j)return Qe;H>dt?ue=Qe:Re=Qe,Qe=(Re-ue)*.5+ue}return Qe},f.prototype.solve=function(H,j){return this.sampleCurveY(this.solveCurveX(H,j))};var v=h;function h(H,j){this.x=H,this.y=j}h.prototype={clone:function(){return new h(this.x,this.y)},add:function(H){return this.clone()._add(H)},sub:function(H){return this.clone()._sub(H)},multByPoint:function(H){return this.clone()._multByPoint(H)},divByPoint:function(H){return this.clone()._divByPoint(H)},mult:function(H){return this.clone()._mult(H)},div:function(H){return this.clone()._div(H)},rotate:function(H){return this.clone()._rotate(H)},rotateAround:function(H,j){return this.clone()._rotateAround(H,j)},matMult:function(H){return this.clone()._matMult(H)},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(H){return this.x===H.x&&this.y===H.y},dist:function(H){return Math.sqrt(this.distSqr(H))},distSqr:function(H){var j=H.x-this.x,ue=H.y-this.y;return j*j+ue*ue},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(H){return Math.atan2(this.y-H.y,this.x-H.x)},angleWith:function(H){return this.angleWithSep(H.x,H.y)},angleWithSep:function(H,j){return Math.atan2(this.x*j-this.y*H,this.x*H+this.y*j)},_matMult:function(H){var j=H[0]*this.x+H[1]*this.y,ue=H[2]*this.x+H[3]*this.y;return this.x=j,this.y=ue,this},_add:function(H){return this.x+=H.x,this.y+=H.y,this},_sub:function(H){return this.x-=H.x,this.y-=H.y,this},_mult:function(H){return this.x*=H,this.y*=H,this},_div:function(H){return this.x/=H,this.y/=H,this},_multByPoint:function(H){return this.x*=H.x,this.y*=H.y,this},_divByPoint:function(H){return this.x/=H.x,this.y/=H.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var H=this.y;return this.y=this.x,this.x=-H,this},_rotate:function(H){var j=Math.cos(H),ue=Math.sin(H),Re=j*this.x-ue*this.y,Qe=ue*this.x+j*this.y;return this.x=Re,this.y=Qe,this},_rotateAround:function(H,j){var ue=Math.cos(H),Re=Math.sin(H),Qe=j.x+ue*(this.x-j.x)-Re*(this.y-j.y),dt=j.y+Re*(this.x-j.x)+ue*(this.y-j.y);return this.x=Qe,this.y=dt,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},h.convert=function(H){return H instanceof h?H:Array.isArray(H)?new h(H[0],H[1]):H};var m=typeof self<"u"?self:{};function _(H,j){if(Array.isArray(H)){if(!Array.isArray(j)||H.length!==j.length)return!1;for(var ue=0;ue<H.length;ue++)if(!_(H[ue],j[ue]))return!1;return!0}if(typeof H=="object"&&H!==null&&j!==null){if(typeof j!="object")return!1;var Re=Object.keys(H);if(Re.length!==Object.keys(j).length)return!1;for(var Qe in H)if(!_(H[Qe],j[Qe]))return!1;return!0}return H===j}var x=Math.pow(2,53)-1;function A(H){if(H<=0)return 0;if(H>=1)return 1;var j=H*H,ue=j*H;return 4*(H<.5?ue:3*(H-j)+ue-.75)}function E(H,j,ue,Re){var Qe=new p(H,j,ue,Re);return function(dt){return Qe.solve(dt)}}var D=E(.25,.1,.25,1);function g(H,j,ue){return Math.min(ue,Math.max(j,H))}function C(H,j,ue){var Re=ue-j,Qe=((H-j)%Re+Re)%Re+j;return Qe===j?ue:Qe}function I(H,j,ue){if(!H.length)return ue(null,[]);var Re=H.length,Qe=new Array(H.length),dt=null;H.forEach(function(Mt,ir){j(Mt,function(Fr,Zr){Fr&&(dt=Fr),Qe[ir]=Zr,--Re===0&&ue(dt,Qe)})})}function N(H){var j=[];for(var ue in H)j.push(H[ue]);return j}function F(H,j){var ue=[];for(var Re in H)Re in j||ue.push(Re);return ue}function k(H){for(var j=[],ue=arguments.length-1;ue-- >0;)j[ue]=arguments[ue+1];for(var Re=0,Qe=j;Re<Qe.length;Re+=1){var dt=Qe[Re];for(var Mt in dt)H[Mt]=dt[Mt]}return H}function P(H,j){for(var ue={},Re=0;Re<j.length;Re++){var Qe=j[Re];Qe in H&&(ue[Qe]=H[Qe])}return ue}var T=1;function y(){return T++}function S(){function H(j){return j?(j^Math.random()*16>>j/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,H)}return H()}function M(H){return H<=1?1:Math.pow(2,Math.ceil(Math.log(H)/Math.LN2))}function W(H){return H?/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(H):!1}function $(H,j){H.forEach(function(ue){j[ue]&&(j[ue]=j[ue].bind(j))})}function Z(H,j){return H.indexOf(j,H.length-j.length)!==-1}function K(H,j,ue){var Re={};for(var Qe in H)Re[Qe]=j.call(ue||this,H[Qe],Qe,H);return Re}function Q(H,j,ue){var Re={};for(var Qe in H)j.call(ue||this,H[Qe],Qe,H)&&(Re[Qe]=H[Qe]);return Re}function J(H){return Array.isArray(H)?H.map(J):typeof H=="object"&&H?K(H,J):H}function G(H,j){for(var ue=0;ue<H.length;ue++)if(j.indexOf(H[ue])>=0)return!0;return!1}var ee={};function re(H){ee[H]||(typeof console<"u"&&console.warn(H),ee[H]=!0)}function fe(H,j,ue){return(ue.y-H.y)*(j.x-H.x)>(j.y-H.y)*(ue.x-H.x)}function we(H){for(var j=0,ue=0,Re=H.length,Qe=Re-1,dt=void 0,Mt=void 0;ue<Re;Qe=ue++)dt=H[ue],Mt=H[Qe],j+=(Mt.x-dt.x)*(dt.y+Mt.y);return j}function Oe(H){var j=H[0],ue=H[1],Re=H[2];return ue+=90,ue*=Math.PI/180,Re*=Math.PI/180,{x:j*Math.cos(ue)*Math.sin(Re),y:j*Math.sin(ue)*Math.sin(Re),z:j*Math.cos(Re)}}function ke(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}function Le(H){var j=/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,ue={};if(H.replace(j,function(Qe,dt,Mt,ir){var Fr=Mt||ir;return ue[dt]=Fr?Fr.toLowerCase():!0,""}),ue["max-age"]){var Re=parseInt(ue["max-age"],10);isNaN(Re)?delete ue["max-age"]:ue["max-age"]=Re}return ue}var oe=null;function be(H){if(oe==null){var j=H.navigator?H.navigator.userAgent:null;oe=!!H.safari||!!(j&&(/\b(iPad|iPhone|iPod)\b/.test(j)||j.match("Safari")&&!j.match("Chrome")))}return oe}function _e(H){try{var j=m[H];return j.setItem("_mapbox_test_",1),j.removeItem("_mapbox_test_"),!0}catch{return!1}}function he(H){return m.btoa(encodeURIComponent(H).replace(/%([0-9A-F]{2})/g,function(j,ue){return String.fromCharCode(+("0x"+ue))}))}function De(H){return decodeURIComponent(m.atob(H).split("").map(function(j){return"%"+("00"+j.charCodeAt(0).toString(16)).slice(-2)}).join(""))}var xe=m.performance&&m.performance.now?m.performance.now.bind(m.performance):Date.now.bind(Date),se=m.requestAnimationFrame||m.mozRequestAnimationFrame||m.webkitRequestAnimationFrame||m.msRequestAnimationFrame,Ee=m.cancelAnimationFrame||m.mozCancelAnimationFrame||m.webkitCancelAnimationFrame||m.msCancelAnimationFrame,Te,Be,tt={now:xe,frame:function(j){var ue=se(j);return{cancel:function(){return Ee(ue)}}},getImageData:function(j,ue){ue===void 0&&(ue=0);var Re=m.document.createElement("canvas"),Qe=Re.getContext("2d");if(!Qe)throw new Error("failed to create canvas 2d context");return Re.width=j.width,Re.height=j.height,Qe.drawImage(j,0,0,j.width,j.height),Qe.getImageData(-ue,-ue,j.width+2*ue,j.height+2*ue)},resolveURL:function(j){return Te||(Te=m.document.createElement("a")),Te.href=j,Te.href},hardwareConcurrency:m.navigator&&m.navigator.hardwareConcurrency||4,get devicePixelRatio(){return m.devicePixelRatio},get prefersReducedMotion(){return m.matchMedia?(Be==null&&(Be=m.matchMedia("(prefers-reduced-motion: reduce)")),Be.matches):!1}},at={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},gt={supported:!1,testSupport:Ht},pt,Rt=!1,$t,Wt=!1;m.document&&($t=m.document.createElement("img"),$t.onload=function(){pt&&Ft(pt),pt=null,Wt=!0},$t.onerror=function(){Rt=!0,pt=null},$t.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");function Ht(H){Rt||!$t||(Wt?Ft(H):pt=H)}function Ft(H){var j=H.createTexture();H.bindTexture(H.TEXTURE_2D,j);try{if(H.texImage2D(H.TEXTURE_2D,0,H.RGBA,H.RGBA,H.UNSIGNED_BYTE,$t),H.isContextLost())return;gt.supported=!0}catch{}H.deleteTexture(j),Rt=!0}var st="01";function rt(){for(var H="1",j="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",ue="",Re=0;Re<10;Re++)ue+=j[Math.floor(Math.random()*62)];var Qe=720*60*1e3,dt=[H,st,ue].join(""),Mt=Date.now()+Qe;return{token:dt,tokenExpiresAt:Mt}}var Ue=function(j,ue){this._transformRequestFn=j,this._customAccessToken=ue,this._createSkuToken()};Ue.prototype._createSkuToken=function(){var j=rt();this._skuToken=j.token,this._skuTokenExpiresAt=j.tokenExpiresAt},Ue.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},Ue.prototype.transformRequest=function(j,ue){return this._transformRequestFn?this._transformRequestFn(j,ue)||{url:j}:{url:j}},Ue.prototype.normalizeStyleURL=function(j,ue){if(!xt(j))return j;var Re=$r(j);return Re.path="/styles/v1"+Re.path,this._makeAPIURL(Re,this._customAccessToken||ue)},Ue.prototype.normalizeGlyphsURL=function(j,ue){if(!xt(j))return j;var Re=$r(j);return Re.path="/fonts/v1"+Re.path,this._makeAPIURL(Re,this._customAccessToken||ue)},Ue.prototype.normalizeSourceURL=function(j,ue){if(!xt(j))return j;var Re=$r(j);return Re.path="/v4/"+Re.authority+".json",Re.params.push("secure"),this._makeAPIURL(Re,this._customAccessToken||ue)},Ue.prototype.normalizeSpriteURL=function(j,ue,Re,Qe){var dt=$r(j);return xt(j)?(dt.path="/styles/v1"+dt.path+"/sprite"+ue+Re,this._makeAPIURL(dt,this._customAccessToken||Qe)):(dt.path+=""+ue+Re,rn(dt))},Ue.prototype.normalizeTileURL=function(j,ue){if(this._isSkuTokenExpired()&&this._createSkuToken(),j&&!xt(j))return j;var Re=$r(j),Qe=/(\.(png|jpg)\d*)(?=$)/,dt=/^.+\/v4\//,Mt=tt.devicePixelRatio>=2||ue===512?"@2x":"",ir=gt.supported?".webp":"$1";Re.path=Re.path.replace(Qe,""+Mt+ir),Re.path=Re.path.replace(dt,"/"),Re.path="/v4"+Re.path;var Fr=this._customAccessToken||kr(Re.params)||at.ACCESS_TOKEN;return at.REQUIRE_ACCESS_TOKEN&&Fr&&this._skuToken&&Re.params.push("sku="+this._skuToken),this._makeAPIURL(Re,Fr)},Ue.prototype.canonicalizeTileURL=function(j,ue){var Re="/v4/",Qe=/\.[\w]+$/,dt=$r(j);if(!dt.path.match(/(^\/v4\/)/)||!dt.path.match(Qe))return j;var Mt="mapbox://tiles/";Mt+=dt.path.replace(Re,"");var ir=dt.params;return ue&&(ir=ir.filter(function(Fr){return!Fr.match(/^access_token=/)})),ir.length&&(Mt+="?"+ir.join("&")),Mt},Ue.prototype.canonicalizeTileset=function(j,ue){for(var Re=ue?xt(ue):!1,Qe=[],dt=0,Mt=j.tiles||[];dt<Mt.length;dt+=1){var ir=Mt[dt];Jt(ir)?Qe.push(this.canonicalizeTileURL(ir,Re)):Qe.push(ir)}return Qe},Ue.prototype._makeAPIURL=function(j,ue){var Re="See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes",Qe=$r(at.API_URL);if(j.protocol=Qe.protocol,j.authority=Qe.authority,j.protocol==="http"){var dt=j.params.indexOf("secure");dt>=0&&j.params.splice(dt,1)}if(Qe.path!=="/"&&(j.path=""+Qe.path+j.path),!at.REQUIRE_ACCESS_TOKEN)return rn(j);if(ue=ue||at.ACCESS_TOKEN,!ue)throw new Error("An API access token is required to use Mapbox GL. "+Re);if(ue[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+Re);return j.params=j.params.filter(function(Mt){return Mt.indexOf("access_token")===-1}),j.params.push("access_token="+ue),rn(j)};function xt(H){return H.indexOf("mapbox:")===0}var Gt=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function Jt(H){return Gt.test(H)}function Ut(H){return H.indexOf("sku=")>0&&Jt(H)}function kr(H){for(var j=0,ue=H;j<ue.length;j+=1){var Re=ue[j],Qe=Re.match(/^access_token=(.*)$/);if(Qe)return Qe[1]}return null}var Pr=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function $r(H){var j=H.match(Pr);if(!j)throw new Error("Unable to parse URL object");return{protocol:j[1],authority:j[2],path:j[3]||"/",params:j[4]?j[4].split("&"):[]}}function rn(H){var j=H.params.length?"?"+H.params.join("&"):"";return H.protocol+"://"+H.authority+H.path+j}var kn="mapbox.eventData";function Rn(H){if(!H)return null;var j=H.split(".");if(!j||j.length!==3)return null;try{var ue=JSON.parse(De(j[1]));return ue}catch{return null}}var ci=function(j){this.type=j,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};ci.prototype.getStorageKey=function(j){var ue=Rn(at.ACCESS_TOKEN),Re="";return ue&&ue.u?Re=he(ue.u):Re=at.ACCESS_TOKEN||"",j?kn+"."+j+":"+Re:kn+":"+Re},ci.prototype.fetchEventData=function(){var j=_e("localStorage"),ue=this.getStorageKey(),Re=this.getStorageKey("uuid");if(j)try{var Qe=m.localStorage.getItem(ue);Qe&&(this.eventData=JSON.parse(Qe));var dt=m.localStorage.getItem(Re);dt&&(this.anonId=dt)}catch{re("Unable to read from LocalStorage")}},ci.prototype.saveEventData=function(){var j=_e("localStorage"),ue=this.getStorageKey(),Re=this.getStorageKey("uuid");if(j)try{m.localStorage.setItem(Re,this.anonId),Object.keys(this.eventData).length>=1&&m.localStorage.setItem(ue,JSON.stringify(this.eventData))}catch{re("Unable to write to LocalStorage")}},ci.prototype.processRequests=function(j){},ci.prototype.postEvent=function(j,ue,Re,Qe){var dt=this;if(at.EVENTS_URL){var Mt=$r(at.EVENTS_URL);Mt.params.push("access_token="+(Qe||at.ACCESS_TOKEN||""));var ir={event:this.type,created:new Date(j).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:c,skuId:st,userId:this.anonId},Fr=ue?k(ir,ue):ir,Zr={url:rn(Mt),headers:{"Content-Type":"text/plain"},body:JSON.stringify([Fr])};this.pendingRequest=Ci(Zr,function(un){dt.pendingRequest=null,Re(un),dt.saveEventData(),dt.processRequests(Qe)})}},ci.prototype.queueRequest=function(j,ue){this.queue.push(j),this.processRequests(ue)};var In=(function(H){function j(){H.call(this,"map.load"),this.success={},this.skuToken=""}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype.postMapLoadEvent=function(Re,Qe,dt,Mt){this.skuToken=dt,(at.EVENTS_URL&&Mt||at.ACCESS_TOKEN&&Array.isArray(Re)&&Re.some(function(ir){return xt(ir)||Jt(ir)}))&&this.queueRequest({id:Qe,timestamp:Date.now()},Mt)},j.prototype.processRequests=function(Re){var Qe=this;if(!(this.pendingRequest||this.queue.length===0)){var dt=this.queue.shift(),Mt=dt.id,ir=dt.timestamp;Mt&&this.success[Mt]||(this.anonId||this.fetchEventData(),W(this.anonId)||(this.anonId=S()),this.postEvent(ir,{skuToken:this.skuToken},function(Fr){Fr||Mt&&(Qe.success[Mt]=!0)},Re))}},j})(ci),Gn=(function(H){function j(ue){H.call(this,"appUserTurnstile"),this._customAccessToken=ue}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype.postTurnstileEvent=function(Re,Qe){at.EVENTS_URL&&at.ACCESS_TOKEN&&Array.isArray(Re)&&Re.some(function(dt){return xt(dt)||Jt(dt)})&&this.queueRequest(Date.now(),Qe)},j.prototype.processRequests=function(Re){var Qe=this;if(!(this.pendingRequest||this.queue.length===0)){(!this.anonId||!this.eventData.lastSuccess||!this.eventData.tokenU)&&this.fetchEventData();var dt=Rn(at.ACCESS_TOKEN),Mt=dt?dt.u:at.ACCESS_TOKEN,ir=Mt!==this.eventData.tokenU;W(this.anonId)||(this.anonId=S(),ir=!0);var Fr=this.queue.shift();if(this.eventData.lastSuccess){var Zr=new Date(this.eventData.lastSuccess),un=new Date(Fr),Hn=(Fr-this.eventData.lastSuccess)/(1440*60*1e3);ir=ir||Hn>=1||Hn<-1||Zr.getDate()!==un.getDate()}else ir=!0;if(!ir)return this.processRequests();this.postEvent(Fr,{"enabled.telemetry":!1},function(yi){yi||(Qe.eventData.lastSuccess=Fr,Qe.eventData.tokenU=Mt)},Re)}},j})(ci),mr=new Gn,St=mr.postTurnstileEvent.bind(mr),Ot=new In,Et=Ot.postMapLoadEvent.bind(Ot),je="mapbox-tiles",Ye=500,et=50,mt=1e3*60*7,Nt;function lr(){m.caches&&!Nt&&(Nt=m.caches.open(je))}var br;function Or(H,j){if(br===void 0)try{new Response(new ReadableStream),br=!0}catch{br=!1}br?j(H.body):H.blob().then(j)}function tn(H,j,ue){if(lr(),!!Nt){var Re={status:j.status,statusText:j.statusText,headers:new m.Headers};j.headers.forEach(function(Mt,ir){return Re.headers.set(ir,Mt)});var Qe=Le(j.headers.get("Cache-Control")||"");if(!Qe["no-store"]){Qe["max-age"]&&Re.headers.set("Expires",new Date(ue+Qe["max-age"]*1e3).toUTCString());var dt=new Date(Re.headers.get("Expires")).getTime()-ue;dt<mt||Or(j,function(Mt){var ir=new m.Response(Mt,Re);lr(),Nt&&Nt.then(function(Fr){return Fr.put(Jr(H.url),ir)}).catch(function(Fr){return re(Fr.message)})})}}}function Jr(H){var j=H.indexOf("?");return j<0?H:H.slice(0,j)}function dn(H,j){if(lr(),!Nt)return j(null);var ue=Jr(H.url);Nt.then(function(Re){Re.match(ue).then(function(Qe){var dt=on(Qe);Re.delete(ue),dt&&Re.put(ue,Qe.clone()),j(null,Qe,dt)}).catch(j)}).catch(j)}function on(H){if(!H)return!1;var j=new Date(H.headers.get("Expires")||0),ue=Le(H.headers.get("Cache-Control")||"");return j>Date.now()&&!ue["no-cache"]}var Nn=1/0;function Wi(H){Nn++,Nn>et&&(H.getActor().send("enforceCacheSizeLimit",Ye),Nn=0)}function Oa(H){lr(),Nt&&Nt.then(function(j){j.keys().then(function(ue){for(var Re=0;Re<ue.length-H;Re++)j.delete(ue[Re])})})}function Da(H){var j=m.caches.delete(je);H&&j.catch(H).then(function(){return H()})}function Aa(H,j){Ye=H,et=j}var Ka;function Sa(){return Ka==null&&(Ka=m.OffscreenCanvas&&new m.OffscreenCanvas(1,1).getContext("2d")&&typeof m.createImageBitmap=="function"),Ka}var no={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};typeof Object.freeze=="function"&&Object.freeze(no);var Fo=(function(H){function j(ue,Re,Qe){Re===401&&Jt(Qe)&&(ue+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),H.call(this,ue),this.status=Re,this.url=Qe,this.name=this.constructor.name,this.message=ue}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},j})(Error),an=ke()?function(){return self.worker&&self.worker.referrer}:function(){return(m.location.protocol==="blob:"?m.parent:m).location.href},Hr=function(H){return/^file:/.test(H)||/^file:/.test(an())&&!/^\w+:/.test(H)};function nn(H,j){var ue=new m.AbortController,Re=new m.Request(H.url,{method:H.method||"GET",body:H.body,credentials:H.credentials,headers:H.headers,referrer:an(),signal:ue.signal}),Qe=!1,dt=!1,Mt=Ut(Re.url);H.type==="json"&&Re.headers.set("Accept","application/json");var ir=function(Zr,un,Hn){if(!dt){if(Zr&&Zr.message!=="SecurityError"&&re(Zr),un&&Hn)return Fr(un);var yi=Date.now();m.fetch(Re).then(function(di){if(di.ok){var qi=Mt?di.clone():null;return Fr(di,qi,yi)}else return j(new Fo(di.statusText,di.status,H.url))}).catch(function(di){di.code!==20&&j(new Error(di.message))})}},Fr=function(Zr,un,Hn){(H.type==="arrayBuffer"?Zr.arrayBuffer():H.type==="json"?Zr.json():Zr.text()).then(function(yi){dt||(un&&Hn&&tn(Re,un,Hn),Qe=!0,j(null,yi,Zr.headers.get("Cache-Control"),Zr.headers.get("Expires")))}).catch(function(yi){dt||j(new Error(yi.message))})};return Mt?dn(Re,ir):ir(null,null),{cancel:function(){dt=!0,Qe||ue.abort()}}}function Kr(H,j){var ue=new m.XMLHttpRequest;ue.open(H.method||"GET",H.url,!0),H.type==="arrayBuffer"&&(ue.responseType="arraybuffer");for(var Re in H.headers)ue.setRequestHeader(Re,H.headers[Re]);return H.type==="json"&&(ue.responseType="text",ue.setRequestHeader("Accept","application/json")),ue.withCredentials=H.credentials==="include",ue.onerror=function(){j(new Error(ue.statusText))},ue.onload=function(){if((ue.status>=200&&ue.status<300||ue.status===0)&&ue.response!==null){var Qe=ue.response;if(H.type==="json")try{Qe=JSON.parse(ue.response)}catch(dt){return j(dt)}j(null,Qe,ue.getResponseHeader("Cache-Control"),ue.getResponseHeader("Expires"))}else j(new Fo(ue.statusText,ue.status,H.url))},ue.send(H.body),{cancel:function(){return ue.abort()}}}var $n=function(H,j){if(!Hr(H.url)){if(m.fetch&&m.Request&&m.AbortController&&m.Request.prototype.hasOwnProperty("signal"))return nn(H,j);if(ke()&&self.worker&&self.worker.actor){var ue=!0;return self.worker.actor.send("getResource",H,j,void 0,ue)}}return Kr(H,j)},Ai=function(H,j){return $n(k(H,{type:"json"}),j)},aa=function(H,j){return $n(k(H,{type:"arrayBuffer"}),j)},Ci=function(H,j){return $n(k(H,{method:"POST"}),j)};function Ta(H){var j=m.document.createElement("a");return j.href=H,j.protocol===m.document.location.protocol&&j.host===m.document.location.host}var Na="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function ro(H,j,ue,Re){var Qe=new m.Image,dt=m.URL;Qe.onload=function(){j(null,Qe),dt.revokeObjectURL(Qe.src),Qe.onload=null,m.requestAnimationFrame(function(){Qe.src=Na})},Qe.onerror=function(){return j(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 Mt=new m.Blob([new Uint8Array(H)],{type:"image/png"});Qe.cacheControl=ue,Qe.expires=Re,Qe.src=H.byteLength?dt.createObjectURL(Mt):Na}function oo(H,j){var ue=new m.Blob([new Uint8Array(H)],{type:"image/png"});m.createImageBitmap(ue).then(function(Re){j(null,Re)}).catch(function(Re){j(new Error("Could not load image because of "+Re.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}var xo,vr,er=function(){xo=[],vr=0};er();var si=function(H,j){if(gt.supported&&(H.headers||(H.headers={}),H.headers.accept="image/webp,*/*"),vr>=at.MAX_PARALLEL_IMAGE_REQUESTS){var ue={requestParameters:H,callback:j,cancelled:!1,cancel:function(){this.cancelled=!0}};return xo.push(ue),ue}vr++;var Re=!1,Qe=function(){if(!Re)for(Re=!0,vr--;xo.length&&vr<at.MAX_PARALLEL_IMAGE_REQUESTS;){var Mt=xo.shift(),ir=Mt.requestParameters,Fr=Mt.callback,Zr=Mt.cancelled;Zr||(Mt.cancel=si(ir,Fr).cancel)}},dt=aa(H,function(Mt,ir,Fr,Zr){Qe(),Mt?j(Mt):ir&&(Sa()?oo(ir,j):ro(ir,j,Fr,Zr))});return{cancel:function(){dt.cancel(),Qe()}}},ei=function(H,j){var ue=m.document.createElement("video");ue.muted=!0,ue.onloadstart=function(){j(null,ue)};for(var Re=0;Re<H.length;Re++){var Qe=m.document.createElement("source");Ta(H[Re])||(ue.crossOrigin="Anonymous"),Qe.src=H[Re],ue.appendChild(Qe)}return{cancel:function(){}}};function Kn(H,j,ue){var Re=ue[H]&&ue[H].indexOf(j)!==-1;Re||(ue[H]=ue[H]||[],ue[H].push(j))}function qn(H,j,ue){if(ue&&ue[H]){var Re=ue[H].indexOf(j);Re!==-1&&ue[H].splice(Re,1)}}var pi=function(j,ue){ue===void 0&&(ue={}),k(this,ue),this.type=j},_i=(function(H){function j(ue,Re){Re===void 0&&(Re={}),H.call(this,"error",k({error:ue},Re))}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j})(pi),fi=function(){};fi.prototype.on=function(j,ue){return this._listeners=this._listeners||{},Kn(j,ue,this._listeners),this},fi.prototype.off=function(j,ue){return qn(j,ue,this._listeners),qn(j,ue,this._oneTimeListeners),this},fi.prototype.once=function(j,ue){return this._oneTimeListeners=this._oneTimeListeners||{},Kn(j,ue,this._oneTimeListeners),this},fi.prototype.fire=function(j,ue){typeof j=="string"&&(j=new pi(j,ue||{}));var Re=j.type;if(this.listens(Re)){j.target=this;for(var Qe=this._listeners&&this._listeners[Re]?this._listeners[Re].slice():[],dt=0,Mt=Qe;dt<Mt.length;dt+=1){var ir=Mt[dt];ir.call(this,j)}for(var Fr=this._oneTimeListeners&&this._oneTimeListeners[Re]?this._oneTimeListeners[Re].slice():[],Zr=0,un=Fr;Zr<un.length;Zr+=1){var Hn=un[Zr];qn(Re,Hn,this._oneTimeListeners),Hn.call(this,j)}var yi=this._eventedParent;yi&&(k(j,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),yi.fire(j))}else j instanceof _i&&console.error(j.error);return this},fi.prototype.listens=function(j){return this._listeners&&this._listeners[j]&&this._listeners[j].length>0||this._oneTimeListeners&&this._oneTimeListeners[j]&&this._oneTimeListeners[j].length>0||this._eventedParent&&this._eventedParent.listens(j)},fi.prototype.setEventedParent=function(j,ue){return this._eventedParent=j,this._eventedParentData=ue,this};var Ri=8,$i={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"}},Hi={"*":{type:"source"}},wr=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],gn={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:"*"}},Xn={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:"*"}},Yi={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:"*"}},ha={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"}},Ca={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"}}},Ba={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"}}},ji={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"}},Ea=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],cs={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},No={"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"}},Vs={"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"}},pl={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},kl={"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"}},El={"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"}},iu={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},bu={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},yl={type:"array",value:"*"},ql={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},rc={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},zc={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},Pf={type:"array",value:"*",minimum:1},ju={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}},Ql=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],lu={"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"}},dc={"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"}},wc={"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"}},mc={"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"}},xu={"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"}},qu={"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"}},xf={"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"}},ed={"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"}},Df={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},Sc={"*":{type:"string"}},Qo={$version:Ri,$root:$i,sources:Hi,source:wr,source_vector:gn,source_raster:Xn,source_raster_dem:Yi,source_geojson:ha,source_video:Ca,source_image:Ba,layer:ji,layout:Ea,layout_background:cs,layout_fill:No,layout_circle:Vs,layout_heatmap:pl,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:kl,layout_symbol:El,layout_raster:iu,layout_hillshade:bu,filter:yl,filter_operator:ql,geometry_type:rc,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:zc,expression:Pf,light:ju,paint:Ql,paint_fill:lu,"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:dc,paint_circle:wc,paint_heatmap:mc,paint_symbol:xu,paint_raster:qu,paint_hillshade:xf,paint_background:ed,transition:Df,"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:Sc},Sl=function(j,ue,Re,Qe){this.message=(j?j+": ":"")+Re,Qe&&(this.identifier=Qe),ue!=null&&ue.__line__&&(this.line=ue.__line__)};function gd(H){var j=H.key,ue=H.value;return ue?[new Sl(j,ue,"constants have been deprecated as of v8")]:[]}function $f(H){for(var j=[],ue=arguments.length-1;ue-- >0;)j[ue]=arguments[ue+1];for(var Re=0,Qe=j;Re<Qe.length;Re+=1){var dt=Qe[Re];for(var Mt in dt)H[Mt]=dt[Mt]}return H}function wu(H){return H instanceof Number||H instanceof String||H instanceof Boolean?H.valueOf():H}function Ad(H){if(Array.isArray(H))return H.map(Ad);if(H instanceof Object&&!(H instanceof Number||H instanceof String||H instanceof Boolean)){var j={};for(var ue in H)j[ue]=Ad(H[ue]);return j}return wu(H)}var Bc=(function(H){function j(ue,Re){H.call(this,Re),this.message=Re,this.key=ue}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j})(Error),uf=function(j,ue){ue===void 0&&(ue=[]),this.parent=j,this.bindings={};for(var Re=0,Qe=ue;Re<Qe.length;Re+=1){var dt=Qe[Re],Mt=dt[0],ir=dt[1];this.bindings[Mt]=ir}};uf.prototype.concat=function(j){return new uf(this,j)},uf.prototype.get=function(j){if(this.bindings[j])return this.bindings[j];if(this.parent)return this.parent.get(j);throw new Error(j+" not found in scope.")},uf.prototype.has=function(j){return this.bindings[j]?!0:this.parent?this.parent.has(j):!1};var Cd={kind:"null"},Tl={kind:"number"},Xu={kind:"string"},pu={kind:"boolean"},Zc={kind:"color"},Md={kind:"object"},uu={kind:"value"},Lf={kind:"error"},op={kind:"collator"},zd={kind:"formatted"},Qp={kind:"resolvedImage"};function hh(H,j){return{kind:"array",itemType:H,N:j}}function td(H){if(H.kind==="array"){var j=td(H.itemType);return typeof H.N=="number"?"array<"+j+", "+H.N+">":H.itemType.kind==="value"?"array":"array<"+j+">"}else return H.kind}var ev=[Cd,Tl,Xu,pu,Zc,zd,Md,hh(uu),Qp];function Um(H,j){if(j.kind==="error")return null;if(H.kind==="array"){if(j.kind==="array"&&(j.N===0&&j.itemType.kind==="value"||!Um(H.itemType,j.itemType))&&(typeof H.N!="number"||H.N===j.N))return null}else{if(H.kind===j.kind)return null;if(H.kind==="value")for(var ue=0,Re=ev;ue<Re.length;ue+=1){var Qe=Re[ue];if(!Um(Qe,j))return null}}return"Expected "+td(H)+" but found "+td(j)+" instead."}function Hm(H,j){return j.some(function(ue){return ue.kind===H.kind})}function om(H,j){return j.some(function(ue){return ue==="null"?H===null:ue==="array"?Array.isArray(H):ue==="object"?H&&!Array.isArray(H)&&typeof H=="object":ue===typeof H})}var K0=u(function(H,j){var ue={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 Re(Zr){return Zr=Math.round(Zr),Zr<0?0:Zr>255?255:Zr}function Qe(Zr){return Zr<0?0:Zr>1?1:Zr}function dt(Zr){return Zr[Zr.length-1]==="%"?Re(parseFloat(Zr)/100*255):Re(parseInt(Zr))}function Mt(Zr){return Zr[Zr.length-1]==="%"?Qe(parseFloat(Zr)/100):Qe(parseFloat(Zr))}function ir(Zr,un,Hn){return Hn<0?Hn+=1:Hn>1&&(Hn-=1),Hn*6<1?Zr+(un-Zr)*Hn*6:Hn*2<1?un:Hn*3<2?Zr+(un-Zr)*(2/3-Hn)*6:Zr}function Fr(Zr){var un=Zr.replace(/ /g,"").toLowerCase();if(un in ue)return ue[un].slice();if(un[0]==="#"){if(un.length===4){var Hn=parseInt(un.substr(1),16);return Hn>=0&&Hn<=4095?[(Hn&3840)>>4|(Hn&3840)>>8,Hn&240|(Hn&240)>>4,Hn&15|(Hn&15)<<4,1]:null}else if(un.length===7){var Hn=parseInt(un.substr(1),16);return Hn>=0&&Hn<=16777215?[(Hn&16711680)>>16,(Hn&65280)>>8,Hn&255,1]:null}return null}var yi=un.indexOf("("),di=un.indexOf(")");if(yi!==-1&&di+1===un.length){var qi=un.substr(0,yi),Ia=un.substr(yi+1,di-(yi+1)).split(","),Do=1;switch(qi){case"rgba":if(Ia.length!==4)return null;Do=Mt(Ia.pop());case"rgb":return Ia.length!==3?null:[dt(Ia[0]),dt(Ia[1]),dt(Ia[2]),Do];case"hsla":if(Ia.length!==4)return null;Do=Mt(Ia.pop());case"hsl":if(Ia.length!==3)return null;var ho=(parseFloat(Ia[0])%360+360)%360/360,gs=Mt(Ia[1]),Zo=Mt(Ia[2]),ms=Zo<=.5?Zo*(gs+1):Zo+gs-Zo*gs,Is=Zo*2-ms;return[Re(ir(Is,ms,ho+1/3)*255),Re(ir(Is,ms,ho)*255),Re(ir(Is,ms,ho-1/3)*255),Do];default:return null}}return null}try{j.parseCSSColor=Fr}catch{}}),o1=K0.parseCSSColor,Of=function(j,ue,Re,Qe){Qe===void 0&&(Qe=1),this.r=j,this.g=ue,this.b=Re,this.a=Qe};Of.parse=function(j){if(j){if(j instanceof Of)return j;if(typeof j=="string"){var ue=o1(j);if(ue)return new Of(ue[0]/255*ue[3],ue[1]/255*ue[3],ue[2]/255*ue[3],ue[3])}}},Of.prototype.toString=function(){var j=this.toArray(),ue=j[0],Re=j[1],Qe=j[2],dt=j[3];return"rgba("+Math.round(ue)+","+Math.round(Re)+","+Math.round(Qe)+","+dt+")"},Of.prototype.toArray=function(){var j=this,ue=j.r,Re=j.g,Qe=j.b,dt=j.a;return dt===0?[0,0,0,0]:[ue*255/dt,Re*255/dt,Qe*255/dt,dt]},Of.black=new Of(0,0,0,1),Of.white=new Of(1,1,1,1),Of.transparent=new Of(0,0,0,0),Of.red=new Of(1,0,0,1);var xm=function(j,ue,Re){j?this.sensitivity=ue?"variant":"case":this.sensitivity=ue?"accent":"base",this.locale=Re,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};xm.prototype.compare=function(j,ue){return this.collator.compare(j,ue)},xm.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var J0=function(j,ue,Re,Qe,dt){this.text=j,this.image=ue,this.scale=Re,this.fontStack=Qe,this.textColor=dt},wp=function(j){this.sections=j};wp.fromString=function(j){return new wp([new J0(j,null,null,null,null)])},wp.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(j){return j.text.length!==0||j.image&&j.image.name.length!==0})},wp.factory=function(j){return j instanceof wp?j:wp.fromString(j)},wp.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(j){return j.text}).join("")},wp.prototype.serialize=function(){for(var j=["format"],ue=0,Re=this.sections;ue<Re.length;ue+=1){var Qe=Re[ue];if(Qe.image){j.push(["image",Qe.image.name]);continue}j.push(Qe.text);var dt={};Qe.fontStack&&(dt["text-font"]=["literal",Qe.fontStack.split(",")]),Qe.scale&&(dt["font-scale"]=Qe.scale),Qe.textColor&&(dt["text-color"]=["rgba"].concat(Qe.textColor.toArray())),j.push(dt)}return j};var sp=function(j){this.name=j.name,this.available=j.available};sp.prototype.toString=function(){return this.name},sp.fromString=function(j){return j?new sp({name:j,available:!1}):null},sp.prototype.serialize=function(){return["image",this.name]};function Sp(H,j,ue,Re){if(!(typeof H=="number"&&H>=0&&H<=255&&typeof j=="number"&&j>=0&&j<=255&&typeof ue=="number"&&ue>=0&&ue<=255)){var Qe=typeof Re=="number"?[H,j,ue,Re]:[H,j,ue];return"Invalid rgba value ["+Qe.join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}return typeof Re>"u"||typeof Re=="number"&&Re>=0&&Re<=1?null:"Invalid rgba value ["+[H,j,ue,Re].join(", ")+"]: 'a' must be between 0 and 1."}function sm(H){if(H===null)return!0;if(typeof H=="string")return!0;if(typeof H=="boolean")return!0;if(typeof H=="number")return!0;if(H instanceof Of)return!0;if(H instanceof xm)return!0;if(H instanceof wp)return!0;if(H instanceof sp)return!0;if(Array.isArray(H)){for(var j=0,ue=H;j<ue.length;j+=1){var Re=ue[j];if(!sm(Re))return!1}return!0}else if(typeof H=="object"){for(var Qe in H)if(!sm(H[Qe]))return!1;return!0}else return!1}function yd(H){if(H===null)return Cd;if(typeof H=="string")return Xu;if(typeof H=="boolean")return pu;if(typeof H=="number")return Tl;if(H instanceof Of)return Zc;if(H instanceof xm)return op;if(H instanceof wp)return zd;if(H instanceof sp)return Qp;if(Array.isArray(H)){for(var j=H.length,ue,Re=0,Qe=H;Re<Qe.length;Re+=1){var dt=Qe[Re],Mt=yd(dt);if(!ue)ue=Mt;else{if(ue===Mt)continue;ue=uu;break}}return hh(ue||uu,j)}else return Md}function lp(H){var j=typeof H;return H===null?"":j==="string"||j==="number"||j==="boolean"?String(H):H instanceof Of||H instanceof wp||H instanceof sp?H.toString():JSON.stringify(H)}var Uc=function(j,ue){this.type=j,this.value=ue};Uc.parse=function(j,ue){if(j.length!==2)return ue.error("'literal' expression requires exactly one argument, but found "+(j.length-1)+" instead.");if(!sm(j[1]))return ue.error("invalid value");var Re=j[1],Qe=yd(Re),dt=ue.expectedType;return Qe.kind==="array"&&Qe.N===0&&dt&&dt.kind==="array"&&(typeof dt.N!="number"||dt.N===0)&&(Qe=dt),new Uc(Qe,Re)},Uc.prototype.evaluate=function(){return this.value},Uc.prototype.eachChild=function(){},Uc.prototype.outputDefined=function(){return!0},Uc.prototype.serialize=function(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof Of?["rgba"].concat(this.value.toArray()):this.value instanceof wp?this.value.serialize():this.value};var zf=function(j){this.name="ExpressionEvaluationError",this.message=j};zf.prototype.toJSON=function(){return this.message};var jm={string:Xu,number:Tl,boolean:pu,object:Md},hv=function(j,ue){this.type=j,this.args=ue};hv.parse=function(j,ue){if(j.length<2)return ue.error("Expected at least one argument.");var Re=1,Qe,dt=j[0];if(dt==="array"){var Mt;if(j.length>2){var ir=j[1];if(typeof ir!="string"||!(ir in jm)||ir==="object")return ue.error('The item type argument of "array" must be one of string, number, boolean',1);Mt=jm[ir],Re++}else Mt=uu;var Fr;if(j.length>3){if(j[2]!==null&&(typeof j[2]!="number"||j[2]<0||j[2]!==Math.floor(j[2])))return ue.error('The length argument to "array" must be a positive integer literal',2);Fr=j[2],Re++}Qe=hh(Mt,Fr)}else Qe=jm[dt];for(var Zr=[];Re<j.length;Re++){var un=ue.parse(j[Re],Re,uu);if(!un)return null;Zr.push(un)}return new hv(Qe,Zr)},hv.prototype.evaluate=function(j){for(var ue=0;ue<this.args.length;ue++){var Re=this.args[ue].evaluate(j),Qe=Um(this.type,yd(Re));if(Qe){if(ue===this.args.length-1)throw new zf("Expected value to be of type "+td(this.type)+", but found "+td(yd(Re))+" instead.")}else return Re}return null},hv.prototype.eachChild=function(j){this.args.forEach(j)},hv.prototype.outputDefined=function(){return this.args.every(function(j){return j.outputDefined()})},hv.prototype.serialize=function(){var j=this.type,ue=[j.kind];if(j.kind==="array"){var Re=j.itemType;if(Re.kind==="string"||Re.kind==="number"||Re.kind==="boolean"){ue.push(Re.kind);var Qe=j.N;(typeof Qe=="number"||this.args.length>1)&&ue.push(Qe)}}return ue.concat(this.args.map(function(dt){return dt.serialize()}))};var og=function(j){this.type=zd,this.sections=j};og.parse=function(j,ue){if(j.length<2)return ue.error("Expected at least one argument.");var Re=j[1];if(!Array.isArray(Re)&&typeof Re=="object")return ue.error("First argument must be an image or text section.");for(var Qe=[],dt=!1,Mt=1;Mt<=j.length-1;++Mt){var ir=j[Mt];if(dt&&typeof ir=="object"&&!Array.isArray(ir)){dt=!1;var Fr=null;if(ir["font-scale"]&&(Fr=ue.parse(ir["font-scale"],1,Tl),!Fr))return null;var Zr=null;if(ir["text-font"]&&(Zr=ue.parse(ir["text-font"],1,hh(Xu)),!Zr))return null;var un=null;if(ir["text-color"]&&(un=ue.parse(ir["text-color"],1,Zc),!un))return null;var Hn=Qe[Qe.length-1];Hn.scale=Fr,Hn.font=Zr,Hn.textColor=un}else{var yi=ue.parse(j[Mt],1,uu);if(!yi)return null;var di=yi.type.kind;if(di!=="string"&&di!=="value"&&di!=="null"&&di!=="resolvedImage")return ue.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");dt=!0,Qe.push({content:yi,scale:null,font:null,textColor:null})}}return new og(Qe)},og.prototype.evaluate=function(j){var ue=function(Re){var Qe=Re.content.evaluate(j);return yd(Qe)===Qp?new J0("",Qe,null,null,null):new J0(lp(Qe),null,Re.scale?Re.scale.evaluate(j):null,Re.font?Re.font.evaluate(j).join(","):null,Re.textColor?Re.textColor.evaluate(j):null)};return new wp(this.sections.map(ue))},og.prototype.eachChild=function(j){for(var ue=0,Re=this.sections;ue<Re.length;ue+=1){var Qe=Re[ue];j(Qe.content),Qe.scale&&j(Qe.scale),Qe.font&&j(Qe.font),Qe.textColor&&j(Qe.textColor)}},og.prototype.outputDefined=function(){return!1},og.prototype.serialize=function(){for(var j=["format"],ue=0,Re=this.sections;ue<Re.length;ue+=1){var Qe=Re[ue];j.push(Qe.content.serialize());var dt={};Qe.scale&&(dt["font-scale"]=Qe.scale.serialize()),Qe.font&&(dt["text-font"]=Qe.font.serialize()),Qe.textColor&&(dt["text-color"]=Qe.textColor.serialize()),j.push(dt)}return j};var Bd=function(j){this.type=Qp,this.input=j};Bd.parse=function(j,ue){if(j.length!==2)return ue.error("Expected two arguments.");var Re=ue.parse(j[1],1,Xu);return Re?new Bd(Re):ue.error("No image name provided.")},Bd.prototype.evaluate=function(j){var ue=this.input.evaluate(j),Re=sp.fromString(ue);return Re&&j.availableImages&&(Re.available=j.availableImages.indexOf(ue)>-1),Re},Bd.prototype.eachChild=function(j){j(this.input)},Bd.prototype.outputDefined=function(){return!1},Bd.prototype.serialize=function(){return["image",this.input.serialize()]};var z1={"to-boolean":pu,"to-color":Zc,"to-number":Tl,"to-string":Xu},Oc=function(j,ue){this.type=j,this.args=ue};Oc.parse=function(j,ue){if(j.length<2)return ue.error("Expected at least one argument.");var Re=j[0];if((Re==="to-boolean"||Re==="to-string")&&j.length!==2)return ue.error("Expected one argument.");for(var Qe=z1[Re],dt=[],Mt=1;Mt<j.length;Mt++){var ir=ue.parse(j[Mt],Mt,uu);if(!ir)return null;dt.push(ir)}return new Oc(Qe,dt)},Oc.prototype.evaluate=function(j){if(this.type.kind==="boolean")return!!this.args[0].evaluate(j);if(this.type.kind==="color"){for(var ue,Re,Qe=0,dt=this.args;Qe<dt.length;Qe+=1){var Mt=dt[Qe];if(ue=Mt.evaluate(j),Re=null,ue instanceof Of)return ue;if(typeof ue=="string"){var ir=j.parseColor(ue);if(ir)return ir}else if(Array.isArray(ue)&&(ue.length<3||ue.length>4?Re="Invalid rbga value "+JSON.stringify(ue)+": expected an array containing either three or four numeric values.":Re=Sp(ue[0],ue[1],ue[2],ue[3]),!Re))return new Of(ue[0]/255,ue[1]/255,ue[2]/255,ue[3])}throw new zf(Re||"Could not parse color from value '"+(typeof ue=="string"?ue:String(JSON.stringify(ue)))+"'")}else if(this.type.kind==="number"){for(var Fr=null,Zr=0,un=this.args;Zr<un.length;Zr+=1){var Hn=un[Zr];if(Fr=Hn.evaluate(j),Fr===null)return 0;var yi=Number(Fr);if(!isNaN(yi))return yi}throw new zf("Could not convert "+JSON.stringify(Fr)+" to number.")}else return this.type.kind==="formatted"?wp.fromString(lp(this.args[0].evaluate(j))):this.type.kind==="resolvedImage"?sp.fromString(lp(this.args[0].evaluate(j))):lp(this.args[0].evaluate(j))},Oc.prototype.eachChild=function(j){this.args.forEach(j)},Oc.prototype.outputDefined=function(){return this.args.every(function(j){return j.outputDefined()})},Oc.prototype.serialize=function(){if(this.type.kind==="formatted")return new og([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new Bd(this.args[0]).serialize();var j=["to-"+this.type.kind];return this.eachChild(function(ue){j.push(ue.serialize())}),j};var pb=["Unknown","Point","LineString","Polygon"],mf=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null};mf.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},mf.prototype.geometryType=function(){return this.feature?typeof this.feature.type=="number"?pb[this.feature.type]:this.feature.type:null},mf.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},mf.prototype.canonicalID=function(){return this.canonical},mf.prototype.properties=function(){return this.feature&&this.feature.properties||{}},mf.prototype.parseColor=function(j){var ue=this._parseColorCache[j];return ue||(ue=this._parseColorCache[j]=Of.parse(j)),ue};var mu=function(j,ue,Re,Qe){this.name=j,this.type=ue,this._evaluate=Re,this.args=Qe};mu.prototype.evaluate=function(j){return this._evaluate(j,this.args)},mu.prototype.eachChild=function(j){this.args.forEach(j)},mu.prototype.outputDefined=function(){return!1},mu.prototype.serialize=function(){return[this.name].concat(this.args.map(function(j){return j.serialize()}))},mu.parse=function(j,ue){var Re,Qe=j[0],dt=mu.definitions[Qe];if(!dt)return ue.error('Unknown expression "'+Qe+'". If you wanted a literal array, use ["literal", [...]].',0);for(var Mt=Array.isArray(dt)?dt[0]:dt.type,ir=Array.isArray(dt)?[[dt[1],dt[2]]]:dt.overloads,Fr=ir.filter(function(Ju){var oc=Ju[0];return!Array.isArray(oc)||oc.length===j.length-1}),Zr=null,un=0,Hn=Fr;un<Hn.length;un+=1){var yi=Hn[un],di=yi[0],qi=yi[1];Zr=new bd(ue.registry,ue.path,null,ue.scope);for(var Ia=[],Do=!1,ho=1;ho<j.length;ho++){var gs=j[ho],Zo=Array.isArray(di)?di[ho-1]:di.type,ms=Zr.parse(gs,1+Ia.length,Zo);if(!ms){Do=!0;break}Ia.push(ms)}if(!Do){if(Array.isArray(di)&&di.length!==Ia.length){Zr.error("Expected "+di.length+" arguments, but found "+Ia.length+" instead.");continue}for(var Is=0;Is<Ia.length;Is++){var dl=Array.isArray(di)?di[Is]:di.type,Xl=Ia[Is];Zr.concat(Is+1).checkSubtype(dl,Xl.type)}if(Zr.errors.length===0)return new mu(Qe,Mt,qi,Ia)}}if(Fr.length===1)(Re=ue.errors).push.apply(Re,Zr.errors);else{for(var Bl=Fr.length?Fr:ir,Ku=Bl.map(function(Ju){var oc=Ju[0];return Wg(oc)}).join(" | "),_u=[],Ou=1;Ou<j.length;Ou++){var hf=ue.parse(j[Ou],1+_u.length);if(!hf)return null;_u.push(td(hf.type))}ue.error("Expected arguments of type "+Ku+", but found ("+_u.join(", ")+") instead.")}return null},mu.register=function(j,ue){mu.definitions=ue;for(var Re in ue)j[Re]=mu};function Wg(H){return Array.isArray(H)?"("+H.map(td).join(", ")+")":"("+td(H.type)+"...)"}var lm=function(j,ue,Re){this.type=op,this.locale=Re,this.caseSensitive=j,this.diacriticSensitive=ue};lm.parse=function(j,ue){if(j.length!==2)return ue.error("Expected one argument.");var Re=j[1];if(typeof Re!="object"||Array.isArray(Re))return ue.error("Collator options argument must be an object.");var Qe=ue.parse(Re["case-sensitive"]===void 0?!1:Re["case-sensitive"],1,pu);if(!Qe)return null;var dt=ue.parse(Re["diacritic-sensitive"]===void 0?!1:Re["diacritic-sensitive"],1,pu);if(!dt)return null;var Mt=null;return Re.locale&&(Mt=ue.parse(Re.locale,1,Xu),!Mt)?null:new lm(Qe,dt,Mt)},lm.prototype.evaluate=function(j){return new xm(this.caseSensitive.evaluate(j),this.diacriticSensitive.evaluate(j),this.locale?this.locale.evaluate(j):null)},lm.prototype.eachChild=function(j){j(this.caseSensitive),j(this.diacriticSensitive),this.locale&&j(this.locale)},lm.prototype.outputDefined=function(){return!1},lm.prototype.serialize=function(){var j={};return j["case-sensitive"]=this.caseSensitive.serialize(),j["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(j.locale=this.locale.serialize()),["collator",j]};var Hh=8192;function Q0(H,j){H[0]=Math.min(H[0],j[0]),H[1]=Math.min(H[1],j[1]),H[2]=Math.max(H[2],j[0]),H[3]=Math.max(H[3],j[1])}function sg(H){return(180+H)/360}function a0(H){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+H*Math.PI/360)))/360}function up(H,j){return!(H[0]<=j[0]||H[2]>=j[2]||H[1]<=j[1]||H[3]>=j[3])}function s1(H,j){var ue=sg(H[0]),Re=a0(H[1]),Qe=Math.pow(2,j.z);return[Math.round(ue*Qe*Hh),Math.round(Re*Qe*Hh)]}function Ay(H,j,ue){var Re=H[0]-j[0],Qe=H[1]-j[1],dt=H[0]-ue[0],Mt=H[1]-ue[1];return Re*Mt-dt*Qe===0&&Re*dt<=0&&Qe*Mt<=0}function o0(H,j,ue){return j[1]>H[1]!=ue[1]>H[1]&&H[0]<(ue[0]-j[0])*(H[1]-j[1])/(ue[1]-j[1])+j[0]}function lg(H,j){for(var ue=!1,Re=0,Qe=j.length;Re<Qe;Re++)for(var dt=j[Re],Mt=0,ir=dt.length;Mt<ir-1;Mt++){if(Ay(H,dt[Mt],dt[Mt+1]))return!1;o0(H,dt[Mt],dt[Mt+1])&&(ue=!ue)}return ue}function ey(H,j){for(var ue=0;ue<j.length;ue++)if(lg(H,j[ue]))return!0;return!1}function ty(H,j){return H[0]*j[1]-H[1]*j[0]}function um(H,j,ue,Re){var Qe=H[0]-ue[0],dt=H[1]-ue[1],Mt=j[0]-ue[0],ir=j[1]-ue[1],Fr=Re[0]-ue[0],Zr=Re[1]-ue[1],un=Qe*Zr-Fr*dt,Hn=Mt*Zr-Fr*ir;return un>0&&Hn<0||un<0&&Hn>0}function Cy(H,j,ue,Re){var Qe=[j[0]-H[0],j[1]-H[1]],dt=[Re[0]-ue[0],Re[1]-ue[1]];return ty(dt,Qe)===0?!1:!!(um(H,j,ue,Re)&&um(ue,Re,H,j))}function Vm(H,j,ue){for(var Re=0,Qe=ue;Re<Qe.length;Re+=1)for(var dt=Qe[Re],Mt=0;Mt<dt.length-1;++Mt)if(Cy(H,j,dt[Mt],dt[Mt+1]))return!0;return!1}function _m(H,j){for(var ue=0;ue<H.length;++ue)if(!lg(H[ue],j))return!1;for(var Re=0;Re<H.length-1;++Re)if(Vm(H[Re],H[Re+1],j))return!1;return!0}function cp(H,j){for(var ue=0;ue<j.length;ue++)if(_m(H,j[ue]))return!0;return!1}function Rg(H,j,ue){for(var Re=[],Qe=0;Qe<H.length;Qe++){for(var dt=[],Mt=0;Mt<H[Qe].length;Mt++){var ir=s1(H[Qe][Mt],ue);Q0(j,ir),dt.push(ir)}Re.push(dt)}return Re}function ry(H,j,ue){for(var Re=[],Qe=0;Qe<H.length;Qe++){var dt=Rg(H[Qe],j,ue);Re.push(dt)}return Re}function Wf(H,j,ue,Re){if(H[0]<ue[0]||H[0]>ue[2]){var Qe=Re*.5,dt=H[0]-ue[0]>Qe?-Re:ue[0]-H[0]>Qe?Re:0;dt===0&&(dt=H[0]-ue[2]>Qe?-Re:ue[2]-H[0]>Qe?Re:0),H[0]+=dt}Q0(j,H)}function E0(H){H[0]=H[1]=1/0,H[2]=H[3]=-1/0}function B1(H,j,ue,Re){for(var Qe=Math.pow(2,Re.z)*Hh,dt=[Re.x*Hh,Re.y*Hh],Mt=[],ir=0,Fr=H;ir<Fr.length;ir+=1)for(var Zr=Fr[ir],un=0,Hn=Zr;un<Hn.length;un+=1){var yi=Hn[un],di=[yi.x+dt[0],yi.y+dt[1]];Wf(di,j,ue,Qe),Mt.push(di)}return Mt}function My(H,j,ue,Re){for(var Qe=Math.pow(2,Re.z)*Hh,dt=[Re.x*Hh,Re.y*Hh],Mt=[],ir=0,Fr=H;ir<Fr.length;ir+=1){for(var Zr=Fr[ir],un=[],Hn=0,yi=Zr;Hn<yi.length;Hn+=1){var di=yi[Hn],qi=[di.x+dt[0],di.y+dt[1]];Q0(j,qi),un.push(qi)}Mt.push(un)}if(j[2]-j[0]<=Qe/2){E0(j);for(var Ia=0,Do=Mt;Ia<Do.length;Ia+=1)for(var ho=Do[Ia],gs=0,Zo=ho;gs<Zo.length;gs+=1){var ms=Zo[gs];Wf(ms,j,ue,Qe)}}return Mt}function s0(H,j){var ue=[1/0,1/0,-1/0,-1/0],Re=[1/0,1/0,-1/0,-1/0],Qe=H.canonicalID();if(j.type==="Polygon"){var dt=Rg(j.coordinates,Re,Qe),Mt=B1(H.geometry(),ue,Re,Qe);if(!up(ue,Re))return!1;for(var ir=0,Fr=Mt;ir<Fr.length;ir+=1){var Zr=Fr[ir];if(!lg(Zr,dt))return!1}}if(j.type==="MultiPolygon"){var un=ry(j.coordinates,Re,Qe),Hn=B1(H.geometry(),ue,Re,Qe);if(!up(ue,Re))return!1;for(var yi=0,di=Hn;yi<di.length;yi+=1){var qi=di[yi];if(!ey(qi,un))return!1}}return!0}function Ry(H,j){var ue=[1/0,1/0,-1/0,-1/0],Re=[1/0,1/0,-1/0,-1/0],Qe=H.canonicalID();if(j.type==="Polygon"){var dt=Rg(j.coordinates,Re,Qe),Mt=My(H.geometry(),ue,Re,Qe);if(!up(ue,Re))return!1;for(var ir=0,Fr=Mt;ir<Fr.length;ir+=1){var Zr=Fr[ir];if(!_m(Zr,dt))return!1}}if(j.type==="MultiPolygon"){var un=ry(j.coordinates,Re,Qe),Hn=My(H.geometry(),ue,Re,Qe);if(!up(ue,Re))return!1;for(var yi=0,di=Hn;yi<di.length;yi+=1){var qi=di[yi];if(!cp(qi,un))return!1}}return!0}var Av=function(j,ue){this.type=pu,this.geojson=j,this.geometries=ue};Av.parse=function(j,ue){if(j.length!==2)return ue.error("'within' expression requires exactly one argument, but found "+(j.length-1)+" instead.");if(sm(j[1])){var Re=j[1];if(Re.type==="FeatureCollection")for(var Qe=0;Qe<Re.features.length;++Qe){var dt=Re.features[Qe].geometry.type;if(dt==="Polygon"||dt==="MultiPolygon")return new Av(Re,Re.features[Qe].geometry)}else if(Re.type==="Feature"){var Mt=Re.geometry.type;if(Mt==="Polygon"||Mt==="MultiPolygon")return new Av(Re,Re.geometry)}else if(Re.type==="Polygon"||Re.type==="MultiPolygon")return new Av(Re,Re)}return ue.error("'within' expression requires valid geojson object that contains polygon geometry type.")},Av.prototype.evaluate=function(j){if(j.geometry()!=null&&j.canonicalID()!=null){if(j.geometryType()==="Point")return s0(j,this.geometries);if(j.geometryType()==="LineString")return Ry(j,this.geometries)}return!1},Av.prototype.eachChild=function(){},Av.prototype.outputDefined=function(){return!0},Av.prototype.serialize=function(){return["within",this.geojson]};function ky(H){if(H instanceof mu){if(H.name==="get"&&H.args.length===1)return!1;if(H.name==="feature-state")return!1;if(H.name==="has"&&H.args.length===1)return!1;if(H.name==="properties"||H.name==="geometry-type"||H.name==="id")return!1;if(/^filter-/.test(H.name))return!1}if(H instanceof Av)return!1;var j=!0;return H.eachChild(function(ue){j&&!ky(ue)&&(j=!1)}),j}function uh(H){if(H instanceof mu&&H.name==="feature-state")return!1;var j=!0;return H.eachChild(function(ue){j&&!uh(ue)&&(j=!1)}),j}function Cv(H,j){if(H instanceof mu&&j.indexOf(H.name)>=0)return!1;var ue=!0;return H.eachChild(function(Re){ue&&!Cv(Re,j)&&(ue=!1)}),ue}var ug=function(j,ue){this.type=ue.type,this.name=j,this.boundExpression=ue};ug.parse=function(j,ue){if(j.length!==2||typeof j[1]!="string")return ue.error("'var' expression requires exactly one string literal argument.");var Re=j[1];return ue.scope.has(Re)?new ug(Re,ue.scope.get(Re)):ue.error('Unknown variable "'+Re+'". Make sure "'+Re+'" has been bound in an enclosing "let" expression before using it.',1)},ug.prototype.evaluate=function(j){return this.boundExpression.evaluate(j)},ug.prototype.eachChild=function(){},ug.prototype.outputDefined=function(){return!1},ug.prototype.serialize=function(){return["var",this.name]};var bd=function(j,ue,Re,Qe,dt){ue===void 0&&(ue=[]),Qe===void 0&&(Qe=new uf),dt===void 0&&(dt=[]),this.registry=j,this.path=ue,this.key=ue.map(function(Mt){return"["+Mt+"]"}).join(""),this.scope=Qe,this.errors=dt,this.expectedType=Re};bd.prototype.parse=function(j,ue,Re,Qe,dt){return dt===void 0&&(dt={}),ue?this.concat(ue,Re,Qe)._parse(j,dt):this._parse(j,dt)},bd.prototype._parse=function(j,ue){(j===null||typeof j=="string"||typeof j=="boolean"||typeof j=="number")&&(j=["literal",j]);function Re(un,Hn,yi){return yi==="assert"?new hv(Hn,[un]):yi==="coerce"?new Oc(Hn,[un]):un}if(Array.isArray(j)){if(j.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var Qe=j[0];if(typeof Qe!="string")return this.error("Expression name must be a string, but found "+typeof Qe+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var dt=this.registry[Qe];if(dt){var Mt=dt.parse(j,this);if(!Mt)return null;if(this.expectedType){var ir=this.expectedType,Fr=Mt.type;if((ir.kind==="string"||ir.kind==="number"||ir.kind==="boolean"||ir.kind==="object"||ir.kind==="array")&&Fr.kind==="value")Mt=Re(Mt,ir,ue.typeAnnotation||"assert");else if((ir.kind==="color"||ir.kind==="formatted"||ir.kind==="resolvedImage")&&(Fr.kind==="value"||Fr.kind==="string"))Mt=Re(Mt,ir,ue.typeAnnotation||"coerce");else if(this.checkSubtype(ir,Fr))return null}if(!(Mt instanceof Uc)&&Mt.type.kind!=="resolvedImage"&&qm(Mt)){var Zr=new mf;try{Mt=new Uc(Mt.type,Mt.evaluate(Zr))}catch(un){return this.error(un.message),null}}return Mt}return this.error('Unknown expression "'+Qe+'". If you wanted a literal array, use ["literal", [...]].',0)}else return typeof j>"u"?this.error("'undefined' value invalid. Use null instead."):typeof j=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof j+" instead.")},bd.prototype.concat=function(j,ue,Re){var Qe=typeof j=="number"?this.path.concat(j):this.path,dt=Re?this.scope.concat(Re):this.scope;return new bd(this.registry,Qe,ue||null,dt,this.errors)},bd.prototype.error=function(j){for(var ue=[],Re=arguments.length-1;Re-- >0;)ue[Re]=arguments[Re+1];var Qe=""+this.key+ue.map(function(dt){return"["+dt+"]"}).join("");this.errors.push(new Bc(Qe,j))},bd.prototype.checkSubtype=function(j,ue){var Re=Um(j,ue);return Re&&this.error(Re),Re};function qm(H){if(H instanceof ug)return qm(H.boundExpression);if(H instanceof mu&&H.name==="error")return!1;if(H instanceof lm)return!1;if(H instanceof Av)return!1;var j=H instanceof Oc||H instanceof hv,ue=!0;return H.eachChild(function(Re){j?ue=ue&&qm(Re):ue=ue&&Re instanceof Uc}),ue?ky(H)&&Cv(H,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}function tv(H,j){for(var ue=H.length-1,Re=0,Qe=ue,dt=0,Mt,ir;Re<=Qe;)if(dt=Math.floor((Re+Qe)/2),Mt=H[dt],ir=H[dt+1],Mt<=j){if(dt===ue||j<ir)return dt;Re=dt+1}else if(Mt>j)Qe=dt-1;else throw new zf("Input is not a number.");return 0}var Mv=function(j,ue,Re){this.type=j,this.input=ue,this.labels=[],this.outputs=[];for(var Qe=0,dt=Re;Qe<dt.length;Qe+=1){var Mt=dt[Qe],ir=Mt[0],Fr=Mt[1];this.labels.push(ir),this.outputs.push(Fr)}};Mv.parse=function(j,ue){if(j.length-1<4)return ue.error("Expected at least 4 arguments, but found only "+(j.length-1)+".");if((j.length-1)%2!==0)return ue.error("Expected an even number of arguments.");var Re=ue.parse(j[1],1,Tl);if(!Re)return null;var Qe=[],dt=null;ue.expectedType&&ue.expectedType.kind!=="value"&&(dt=ue.expectedType);for(var Mt=1;Mt<j.length;Mt+=2){var ir=Mt===1?-1/0:j[Mt],Fr=j[Mt+1],Zr=Mt,un=Mt+1;if(typeof ir!="number")return ue.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',Zr);if(Qe.length&&Qe[Qe.length-1][0]>=ir)return ue.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Zr);var Hn=ue.parse(Fr,un,dt);if(!Hn)return null;dt=dt||Hn.type,Qe.push([ir,Hn])}return new Mv(dt,Re,Qe)},Mv.prototype.evaluate=function(j){var ue=this.labels,Re=this.outputs;if(ue.length===1)return Re[0].evaluate(j);var Qe=this.input.evaluate(j);if(Qe<=ue[0])return Re[0].evaluate(j);var dt=ue.length;if(Qe>=ue[dt-1])return Re[dt-1].evaluate(j);var Mt=tv(ue,Qe);return Re[Mt].evaluate(j)},Mv.prototype.eachChild=function(j){j(this.input);for(var ue=0,Re=this.outputs;ue<Re.length;ue+=1){var Qe=Re[ue];j(Qe)}},Mv.prototype.outputDefined=function(){return this.outputs.every(function(j){return j.outputDefined()})},Mv.prototype.serialize=function(){for(var j=["step",this.input.serialize()],ue=0;ue<this.labels.length;ue++)ue>0&&j.push(this.labels[ue]),j.push(this.outputs[ue].serialize());return j};function Ud(H,j,ue){return H*(1-ue)+j*ue}function Yg(H,j,ue){return new Of(Ud(H.r,j.r,ue),Ud(H.g,j.g,ue),Ud(H.b,j.b,ue),Ud(H.a,j.a,ue))}function wm(H,j,ue){return H.map(function(Re,Qe){return Ud(Re,j[Qe],ue)})}var cg=Object.freeze({__proto__:null,number:Ud,color:Yg,array:wm}),A0=.95047,U1=1,Qb=1.08883,Xg=4/29,C0=6/29,Uv=3*C0*C0,M0=C0*C0*C0,Tp=Math.PI/180,Zg=180/Math.PI;function Iy(H){return H>M0?Math.pow(H,1/3):H/Uv+Xg}function Kg(H){return H>C0?H*H*H:Uv*(H-Xg)}function Rd(H){return 255*(H<=.0031308?12.92*H:1.055*Math.pow(H,1/2.4)-.055)}function Rv(H){return H/=255,H<=.04045?H/12.92:Math.pow((H+.055)/1.055,2.4)}function cm(H){var j=Rv(H.r),ue=Rv(H.g),Re=Rv(H.b),Qe=Iy((.4124564*j+.3575761*ue+.1804375*Re)/A0),dt=Iy((.2126729*j+.7151522*ue+.072175*Re)/U1),Mt=Iy((.0193339*j+.119192*ue+.9503041*Re)/Qb);return{l:116*dt-16,a:500*(Qe-dt),b:200*(dt-Mt),alpha:H.a}}function ny(H){var j=(H.l+16)/116,ue=isNaN(H.a)?j:j+H.a/500,Re=isNaN(H.b)?j:j-H.b/200;return j=U1*Kg(j),ue=A0*Kg(ue),Re=Qb*Kg(Re),new Of(Rd(3.2404542*ue-1.5371385*j-.4985314*Re),Rd(-.969266*ue+1.8760108*j+.041556*Re),Rd(.0556434*ue-.2040259*j+1.0572252*Re),H.alpha)}function Ld(H,j,ue){return{l:Ud(H.l,j.l,ue),a:Ud(H.a,j.a,ue),b:Ud(H.b,j.b,ue),alpha:Ud(H.alpha,j.alpha,ue)}}function l0(H){var j=cm(H),ue=j.l,Re=j.a,Qe=j.b,dt=Math.atan2(Qe,Re)*Zg;return{h:dt<0?dt+360:dt,c:Math.sqrt(Re*Re+Qe*Qe),l:ue,alpha:H.a}}function fg(H){var j=H.h*Tp,ue=H.c,Re=H.l;return ny({l:Re,a:Math.cos(j)*ue,b:Math.sin(j)*ue,alpha:H.alpha})}function Hv(H,j,ue){var Re=j-H;return H+ue*(Re>180||Re<-180?Re-360*Math.round(Re/360):Re)}function u0(H,j,ue){return{h:Hv(H.h,j.h,ue),c:Ud(H.c,j.c,ue),l:Ud(H.l,j.l,ue),alpha:Ud(H.alpha,j.alpha,ue)}}var Sm={forward:cm,reverse:ny,interpolate:Ld},c0={forward:l0,reverse:fg,interpolate:u0},H1=Object.freeze({__proto__:null,lab:Sm,hcl:c0}),Np=function(j,ue,Re,Qe,dt){this.type=j,this.operator=ue,this.interpolation=Re,this.input=Qe,this.labels=[],this.outputs=[];for(var Mt=0,ir=dt;Mt<ir.length;Mt+=1){var Fr=ir[Mt],Zr=Fr[0],un=Fr[1];this.labels.push(Zr),this.outputs.push(un)}};Np.interpolationFactor=function(j,ue,Re,Qe){var dt=0;if(j.name==="exponential")dt=Py(ue,j.base,Re,Qe);else if(j.name==="linear")dt=Py(ue,1,Re,Qe);else if(j.name==="cubic-bezier"){var Mt=j.controlPoints,ir=new p(Mt[0],Mt[1],Mt[2],Mt[3]);dt=ir.solve(Py(ue,1,Re,Qe))}return dt},Np.parse=function(j,ue){var Re=j[0],Qe=j[1],dt=j[2],Mt=j.slice(3);if(!Array.isArray(Qe)||Qe.length===0)return ue.error("Expected an interpolation type expression.",1);if(Qe[0]==="linear")Qe={name:"linear"};else if(Qe[0]==="exponential"){var ir=Qe[1];if(typeof ir!="number")return ue.error("Exponential interpolation requires a numeric base.",1,1);Qe={name:"exponential",base:ir}}else if(Qe[0]==="cubic-bezier"){var Fr=Qe.slice(1);if(Fr.length!==4||Fr.some(function(ho){return typeof ho!="number"||ho<0||ho>1}))return ue.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);Qe={name:"cubic-bezier",controlPoints:Fr}}else return ue.error("Unknown interpolation type "+String(Qe[0]),1,0);if(j.length-1<4)return ue.error("Expected at least 4 arguments, but found only "+(j.length-1)+".");if((j.length-1)%2!==0)return ue.error("Expected an even number of arguments.");if(dt=ue.parse(dt,2,Tl),!dt)return null;var Zr=[],un=null;Re==="interpolate-hcl"||Re==="interpolate-lab"?un=Zc:ue.expectedType&&ue.expectedType.kind!=="value"&&(un=ue.expectedType);for(var Hn=0;Hn<Mt.length;Hn+=2){var yi=Mt[Hn],di=Mt[Hn+1],qi=Hn+3,Ia=Hn+4;if(typeof yi!="number")return ue.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',qi);if(Zr.length&&Zr[Zr.length-1][0]>=yi)return ue.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',qi);var Do=ue.parse(di,Ia,un);if(!Do)return null;un=un||Do.type,Zr.push([yi,Do])}return un.kind!=="number"&&un.kind!=="color"&&!(un.kind==="array"&&un.itemType.kind==="number"&&typeof un.N=="number")?ue.error("Type "+td(un)+" is not interpolatable."):new Np(un,Re,Qe,dt,Zr)},Np.prototype.evaluate=function(j){var ue=this.labels,Re=this.outputs;if(ue.length===1)return Re[0].evaluate(j);var Qe=this.input.evaluate(j);if(Qe<=ue[0])return Re[0].evaluate(j);var dt=ue.length;if(Qe>=ue[dt-1])return Re[dt-1].evaluate(j);var Mt=tv(ue,Qe),ir=ue[Mt],Fr=ue[Mt+1],Zr=Np.interpolationFactor(this.interpolation,Qe,ir,Fr),un=Re[Mt].evaluate(j),Hn=Re[Mt+1].evaluate(j);return this.operator==="interpolate"?cg[this.type.kind.toLowerCase()](un,Hn,Zr):this.operator==="interpolate-hcl"?c0.reverse(c0.interpolate(c0.forward(un),c0.forward(Hn),Zr)):Sm.reverse(Sm.interpolate(Sm.forward(un),Sm.forward(Hn),Zr))},Np.prototype.eachChild=function(j){j(this.input);for(var ue=0,Re=this.outputs;ue<Re.length;ue+=1){var Qe=Re[ue];j(Qe)}},Np.prototype.outputDefined=function(){return this.outputs.every(function(j){return j.outputDefined()})},Np.prototype.serialize=function(){var j;this.interpolation.name==="linear"?j=["linear"]:this.interpolation.name==="exponential"?this.interpolation.base===1?j=["linear"]:j=["exponential",this.interpolation.base]:j=["cubic-bezier"].concat(this.interpolation.controlPoints);for(var ue=[this.operator,j,this.input.serialize()],Re=0;Re<this.labels.length;Re++)ue.push(this.labels[Re],this.outputs[Re].serialize());return ue};function Py(H,j,ue,Re){var Qe=Re-ue,dt=H-ue;return Qe===0?0:j===1?dt/Qe:(Math.pow(j,dt)-1)/(Math.pow(j,Qe)-1)}var jv=function(j,ue){this.type=j,this.args=ue};jv.parse=function(j,ue){if(j.length<2)return ue.error("Expectected at least one argument.");var Re=null,Qe=ue.expectedType;Qe&&Qe.kind!=="value"&&(Re=Qe);for(var dt=[],Mt=0,ir=j.slice(1);Mt<ir.length;Mt+=1){var Fr=ir[Mt],Zr=ue.parse(Fr,1+dt.length,Re,void 0,{typeAnnotation:"omit"});if(!Zr)return null;Re=Re||Zr.type,dt.push(Zr)}var un=Qe&&dt.some(function(Hn){return Um(Qe,Hn.type)});return un?new jv(uu,dt):new jv(Re,dt)},jv.prototype.evaluate=function(j){for(var ue=null,Re=0,Qe,dt=0,Mt=this.args;dt<Mt.length;dt+=1){var ir=Mt[dt];if(Re++,ue=ir.evaluate(j),ue&&ue instanceof sp&&!ue.available&&(Qe||(Qe=ue.name),ue=null,Re===this.args.length&&(ue=Qe)),ue!==null)break}return ue},jv.prototype.eachChild=function(j){this.args.forEach(j)},jv.prototype.outputDefined=function(){return this.args.every(function(j){return j.outputDefined()})},jv.prototype.serialize=function(){var j=["coalesce"];return this.eachChild(function(ue){j.push(ue.serialize())}),j};var Gm=function(j,ue){this.type=ue.type,this.bindings=[].concat(j),this.result=ue};Gm.prototype.evaluate=function(j){return this.result.evaluate(j)},Gm.prototype.eachChild=function(j){for(var ue=0,Re=this.bindings;ue<Re.length;ue+=1){var Qe=Re[ue];j(Qe[1])}j(this.result)},Gm.parse=function(j,ue){if(j.length<4)return ue.error("Expected at least 3 arguments, but found "+(j.length-1)+" instead.");for(var Re=[],Qe=1;Qe<j.length-1;Qe+=2){var dt=j[Qe];if(typeof dt!="string")return ue.error("Expected string, but found "+typeof dt+" instead.",Qe);if(/[^a-zA-Z0-9_]/.test(dt))return ue.error("Variable names must contain only alphanumeric characters or '_'.",Qe);var Mt=ue.parse(j[Qe+1],Qe+1);if(!Mt)return null;Re.push([dt,Mt])}var ir=ue.parse(j[j.length-1],j.length-1,ue.expectedType,Re);return ir?new Gm(Re,ir):null},Gm.prototype.outputDefined=function(){return this.result.outputDefined()},Gm.prototype.serialize=function(){for(var j=["let"],ue=0,Re=this.bindings;ue<Re.length;ue+=1){var Qe=Re[ue],dt=Qe[0],Mt=Qe[1];j.push(dt,Mt.serialize())}return j.push(this.result.serialize()),j};var Tm=function(j,ue,Re){this.type=j,this.index=ue,this.input=Re};Tm.parse=function(j,ue){if(j.length!==3)return ue.error("Expected 2 arguments, but found "+(j.length-1)+" instead.");var Re=ue.parse(j[1],1,Tl),Qe=ue.parse(j[2],2,hh(ue.expectedType||uu));if(!Re||!Qe)return null;var dt=Qe.type;return new Tm(dt.itemType,Re,Qe)},Tm.prototype.evaluate=function(j){var ue=this.index.evaluate(j),Re=this.input.evaluate(j);if(ue<0)throw new zf("Array index out of bounds: "+ue+" < 0.");if(ue>=Re.length)throw new zf("Array index out of bounds: "+ue+" > "+(Re.length-1)+".");if(ue!==Math.floor(ue))throw new zf("Array index must be an integer, but found "+ue+" instead.");return Re[ue]},Tm.prototype.eachChild=function(j){j(this.index),j(this.input)},Tm.prototype.outputDefined=function(){return!1},Tm.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var ph=function(j,ue){this.type=pu,this.needle=j,this.haystack=ue};ph.parse=function(j,ue){if(j.length!==3)return ue.error("Expected 2 arguments, but found "+(j.length-1)+" instead.");var Re=ue.parse(j[1],1,uu),Qe=ue.parse(j[2],2,uu);return!Re||!Qe?null:Hm(Re.type,[pu,Xu,Tl,Cd,uu])?new ph(Re,Qe):ue.error("Expected first argument to be of type boolean, string, number or null, but found "+td(Re.type)+" instead")},ph.prototype.evaluate=function(j){var ue=this.needle.evaluate(j),Re=this.haystack.evaluate(j);if(!Re)return!1;if(!om(ue,["boolean","string","number","null"]))throw new zf("Expected first argument to be of type boolean, string, number or null, but found "+td(yd(ue))+" instead.");if(!om(Re,["string","array"]))throw new zf("Expected second argument to be of type array or string, but found "+td(yd(Re))+" instead.");return Re.indexOf(ue)>=0},ph.prototype.eachChild=function(j){j(this.needle),j(this.haystack)},ph.prototype.outputDefined=function(){return!0},ph.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var pv=function(j,ue,Re){this.type=Tl,this.needle=j,this.haystack=ue,this.fromIndex=Re};pv.parse=function(j,ue){if(j.length<=2||j.length>=5)return ue.error("Expected 3 or 4 arguments, but found "+(j.length-1)+" instead.");var Re=ue.parse(j[1],1,uu),Qe=ue.parse(j[2],2,uu);if(!Re||!Qe)return null;if(!Hm(Re.type,[pu,Xu,Tl,Cd,uu]))return ue.error("Expected first argument to be of type boolean, string, number or null, but found "+td(Re.type)+" instead");if(j.length===4){var dt=ue.parse(j[3],3,Tl);return dt?new pv(Re,Qe,dt):null}else return new pv(Re,Qe)},pv.prototype.evaluate=function(j){var ue=this.needle.evaluate(j),Re=this.haystack.evaluate(j);if(!om(ue,["boolean","string","number","null"]))throw new zf("Expected first argument to be of type boolean, string, number or null, but found "+td(yd(ue))+" instead.");if(!om(Re,["string","array"]))throw new zf("Expected second argument to be of type array or string, but found "+td(yd(Re))+" instead.");if(this.fromIndex){var Qe=this.fromIndex.evaluate(j);return Re.indexOf(ue,Qe)}return Re.indexOf(ue)},pv.prototype.eachChild=function(j){j(this.needle),j(this.haystack),this.fromIndex&&j(this.fromIndex)},pv.prototype.outputDefined=function(){return!1},pv.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var j=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),j]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var Yd=function(j,ue,Re,Qe,dt,Mt){this.inputType=j,this.type=ue,this.input=Re,this.cases=Qe,this.outputs=dt,this.otherwise=Mt};Yd.parse=function(j,ue){if(j.length<5)return ue.error("Expected at least 4 arguments, but found only "+(j.length-1)+".");if(j.length%2!==1)return ue.error("Expected an even number of arguments.");var Re,Qe;ue.expectedType&&ue.expectedType.kind!=="value"&&(Qe=ue.expectedType);for(var dt={},Mt=[],ir=2;ir<j.length-1;ir+=2){var Fr=j[ir],Zr=j[ir+1];Array.isArray(Fr)||(Fr=[Fr]);var un=ue.concat(ir);if(Fr.length===0)return un.error("Expected at least one branch label.");for(var Hn=0,yi=Fr;Hn<yi.length;Hn+=1){var di=yi[Hn];if(typeof di!="number"&&typeof di!="string")return un.error("Branch labels must be numbers or strings.");if(typeof di=="number"&&Math.abs(di)>Number.MAX_SAFE_INTEGER)return un.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof di=="number"&&Math.floor(di)!==di)return un.error("Numeric branch labels must be integer values.");if(!Re)Re=yd(di);else if(un.checkSubtype(Re,yd(di)))return null;if(typeof dt[String(di)]<"u")return un.error("Branch labels must be unique.");dt[String(di)]=Mt.length}var qi=ue.parse(Zr,ir,Qe);if(!qi)return null;Qe=Qe||qi.type,Mt.push(qi)}var Ia=ue.parse(j[1],1,uu);if(!Ia)return null;var Do=ue.parse(j[j.length-1],j.length-1,Qe);return!Do||Ia.type.kind!=="value"&&ue.concat(1).checkSubtype(Re,Ia.type)?null:new Yd(Re,Qe,Ia,dt,Mt,Do)},Yd.prototype.evaluate=function(j){var ue=this.input.evaluate(j),Re=yd(ue)===this.inputType&&this.outputs[this.cases[ue]]||this.otherwise;return Re.evaluate(j)},Yd.prototype.eachChild=function(j){j(this.input),this.outputs.forEach(j),j(this.otherwise)},Yd.prototype.outputDefined=function(){return this.outputs.every(function(j){return j.outputDefined()})&&this.otherwise.outputDefined()},Yd.prototype.serialize=function(){for(var j=this,ue=["match",this.input.serialize()],Re=Object.keys(this.cases).sort(),Qe=[],dt={},Mt=0,ir=Re;Mt<ir.length;Mt+=1){var Fr=ir[Mt],Zr=dt[this.cases[Fr]];Zr===void 0?(dt[this.cases[Fr]]=Qe.length,Qe.push([this.cases[Fr],[Fr]])):Qe[Zr][1].push(Fr)}for(var un=function(Ia){return j.inputType.kind==="number"?Number(Ia):Ia},Hn=0,yi=Qe;Hn<yi.length;Hn+=1){var di=yi[Hn],Zr=di[0],qi=di[1];qi.length===1?ue.push(un(qi[0])):ue.push(qi.map(un)),ue.push(this.outputs[outputIndex$1].serialize())}return ue.push(this.otherwise.serialize()),ue};var dg=function(j,ue,Re){this.type=j,this.branches=ue,this.otherwise=Re};dg.parse=function(j,ue){if(j.length<4)return ue.error("Expected at least 3 arguments, but found only "+(j.length-1)+".");if(j.length%2!==0)return ue.error("Expected an odd number of arguments.");var Re;ue.expectedType&&ue.expectedType.kind!=="value"&&(Re=ue.expectedType);for(var Qe=[],dt=1;dt<j.length-1;dt+=2){var Mt=ue.parse(j[dt],dt,pu);if(!Mt)return null;var ir=ue.parse(j[dt+1],dt+1,Re);if(!ir)return null;Qe.push([Mt,ir]),Re=Re||ir.type}var Fr=ue.parse(j[j.length-1],j.length-1,Re);return Fr?new dg(Re,Qe,Fr):null},dg.prototype.evaluate=function(j){for(var ue=0,Re=this.branches;ue<Re.length;ue+=1){var Qe=Re[ue],dt=Qe[0],Mt=Qe[1];if(dt.evaluate(j))return Mt.evaluate(j)}return this.otherwise.evaluate(j)},dg.prototype.eachChild=function(j){for(var ue=0,Re=this.branches;ue<Re.length;ue+=1){var Qe=Re[ue],dt=Qe[0],Mt=Qe[1];j(dt),j(Mt)}j(this.otherwise)},dg.prototype.outputDefined=function(){return this.branches.every(function(j){j[0];var ue=j[1];return ue.outputDefined()})&&this.otherwise.outputDefined()},dg.prototype.serialize=function(){var j=["case"];return this.eachChild(function(ue){j.push(ue.serialize())}),j};var Em=function(j,ue,Re,Qe){this.type=j,this.input=ue,this.beginIndex=Re,this.endIndex=Qe};Em.parse=function(j,ue){if(j.length<=2||j.length>=5)return ue.error("Expected 3 or 4 arguments, but found "+(j.length-1)+" instead.");var Re=ue.parse(j[1],1,uu),Qe=ue.parse(j[2],2,Tl);if(!Re||!Qe)return null;if(!Hm(Re.type,[hh(uu),Xu,uu]))return ue.error("Expected first argument to be of type array or string, but found "+td(Re.type)+" instead");if(j.length===4){var dt=ue.parse(j[3],3,Tl);return dt?new Em(Re.type,Re,Qe,dt):null}else return new Em(Re.type,Re,Qe)},Em.prototype.evaluate=function(j){var ue=this.input.evaluate(j),Re=this.beginIndex.evaluate(j);if(!om(ue,["string","array"]))throw new zf("Expected first argument to be of type array or string, but found "+td(yd(ue))+" instead.");if(this.endIndex){var Qe=this.endIndex.evaluate(j);return ue.slice(Re,Qe)}return ue.slice(Re)},Em.prototype.eachChild=function(j){j(this.input),j(this.beginIndex),this.endIndex&&j(this.endIndex)},Em.prototype.outputDefined=function(){return!1},Em.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var j=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),j]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};function iy(H,j){return H==="=="||H==="!="?j.kind==="boolean"||j.kind==="string"||j.kind==="number"||j.kind==="null"||j.kind==="value":j.kind==="string"||j.kind==="number"||j.kind==="value"}function sn(H,j,ue){return j===ue}function Fn(H,j,ue){return j!==ue}function Li(H,j,ue){return j<ue}function Si(H,j,ue){return j>ue}function ma(H,j,ue){return j<=ue}function yo(H,j,ue){return j>=ue}function uo(H,j,ue,Re){return Re.compare(j,ue)===0}function rs(H,j,ue,Re){return!uo(H,j,ue,Re)}function hs(H,j,ue,Re){return Re.compare(j,ue)<0}function Ws(H,j,ue,Re){return Re.compare(j,ue)>0}function Bo(H,j,ue,Re){return Re.compare(j,ue)<=0}function As(H,j,ue,Re){return Re.compare(j,ue)>=0}function Jo(H,j,ue){var Re=H!=="=="&&H!=="!=";return(function(){function Qe(dt,Mt,ir){this.type=pu,this.lhs=dt,this.rhs=Mt,this.collator=ir,this.hasUntypedArgument=dt.type.kind==="value"||Mt.type.kind==="value"}return Qe.parse=function(Mt,ir){if(Mt.length!==3&&Mt.length!==4)return ir.error("Expected two or three arguments.");var Fr=Mt[0],Zr=ir.parse(Mt[1],1,uu);if(!Zr)return null;if(!iy(Fr,Zr.type))return ir.concat(1).error('"'+Fr+`" comparisons are not supported for type '`+td(Zr.type)+"'.");var un=ir.parse(Mt[2],2,uu);if(!un)return null;if(!iy(Fr,un.type))return ir.concat(2).error('"'+Fr+`" comparisons are not supported for type '`+td(un.type)+"'.");if(Zr.type.kind!==un.type.kind&&Zr.type.kind!=="value"&&un.type.kind!=="value")return ir.error("Cannot compare types '"+td(Zr.type)+"' and '"+td(un.type)+"'.");Re&&(Zr.type.kind==="value"&&un.type.kind!=="value"?Zr=new hv(un.type,[Zr]):Zr.type.kind!=="value"&&un.type.kind==="value"&&(un=new hv(Zr.type,[un])));var Hn=null;if(Mt.length===4){if(Zr.type.kind!=="string"&&un.type.kind!=="string"&&Zr.type.kind!=="value"&&un.type.kind!=="value")return ir.error("Cannot use collator to compare non-string types.");if(Hn=ir.parse(Mt[3],3,op),!Hn)return null}return new Qe(Zr,un,Hn)},Qe.prototype.evaluate=function(Mt){var ir=this.lhs.evaluate(Mt),Fr=this.rhs.evaluate(Mt);if(Re&&this.hasUntypedArgument){var Zr=yd(ir),un=yd(Fr);if(Zr.kind!==un.kind||!(Zr.kind==="string"||Zr.kind==="number"))throw new zf('Expected arguments for "'+H+'" to be (string, string) or (number, number), but found ('+Zr.kind+", "+un.kind+") instead.")}if(this.collator&&!Re&&this.hasUntypedArgument){var Hn=yd(ir),yi=yd(Fr);if(Hn.kind!=="string"||yi.kind!=="string")return j(Mt,ir,Fr)}return this.collator?ue(Mt,ir,Fr,this.collator.evaluate(Mt)):j(Mt,ir,Fr)},Qe.prototype.eachChild=function(Mt){Mt(this.lhs),Mt(this.rhs),this.collator&&Mt(this.collator)},Qe.prototype.outputDefined=function(){return!0},Qe.prototype.serialize=function(){var Mt=[H];return this.eachChild(function(ir){Mt.push(ir.serialize())}),Mt},Qe})()}var Io=Jo("==",sn,uo),ll=Jo("!=",Fn,rs),Tu=Jo("<",Li,hs),du=Jo(">",Si,Ws),ku=Jo("<=",ma,Bo),Au=Jo(">=",yo,As),cl=function(j,ue,Re,Qe,dt){this.type=Xu,this.number=j,this.locale=ue,this.currency=Re,this.minFractionDigits=Qe,this.maxFractionDigits=dt};cl.parse=function(j,ue){if(j.length!==3)return ue.error("Expected two arguments.");var Re=ue.parse(j[1],1,Tl);if(!Re)return null;var Qe=j[2];if(typeof Qe!="object"||Array.isArray(Qe))return ue.error("NumberFormat options argument must be an object.");var dt=null;if(Qe.locale&&(dt=ue.parse(Qe.locale,1,Xu),!dt))return null;var Mt=null;if(Qe.currency&&(Mt=ue.parse(Qe.currency,1,Xu),!Mt))return null;var ir=null;if(Qe["min-fraction-digits"]&&(ir=ue.parse(Qe["min-fraction-digits"],1,Tl),!ir))return null;var Fr=null;return Qe["max-fraction-digits"]&&(Fr=ue.parse(Qe["max-fraction-digits"],1,Tl),!Fr)?null:new cl(Re,dt,Mt,ir,Fr)},cl.prototype.evaluate=function(j){return new Intl.NumberFormat(this.locale?this.locale.evaluate(j):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(j):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(j):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(j):void 0}).format(this.number.evaluate(j))},cl.prototype.eachChild=function(j){j(this.number),this.locale&&j(this.locale),this.currency&&j(this.currency),this.minFractionDigits&&j(this.minFractionDigits),this.maxFractionDigits&&j(this.maxFractionDigits)},cl.prototype.outputDefined=function(){return!1},cl.prototype.serialize=function(){var j={};return this.locale&&(j.locale=this.locale.serialize()),this.currency&&(j.currency=this.currency.serialize()),this.minFractionDigits&&(j["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(j["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),j]};var Os=function(j){this.type=Tl,this.input=j};Os.parse=function(j,ue){if(j.length!==2)return ue.error("Expected 1 argument, but found "+(j.length-1)+" instead.");var Re=ue.parse(j[1],1);return Re?Re.type.kind!=="array"&&Re.type.kind!=="string"&&Re.type.kind!=="value"?ue.error("Expected argument of type string or array, but found "+td(Re.type)+" instead."):new Os(Re):null},Os.prototype.evaluate=function(j){var ue=this.input.evaluate(j);if(typeof ue=="string")return ue.length;if(Array.isArray(ue))return ue.length;throw new zf("Expected value to be of type string or array, but found "+td(yd(ue))+" instead.")},Os.prototype.eachChild=function(j){j(this.input)},Os.prototype.outputDefined=function(){return!1},Os.prototype.serialize=function(){var j=["length"];return this.eachChild(function(ue){j.push(ue.serialize())}),j};var Vu={"==":Io,"!=":ll,">":du,"<":Tu,">=":Au,"<=":ku,array:hv,at:Tm,boolean:hv,case:dg,coalesce:jv,collator:lm,format:og,image:Bd,in:ph,"index-of":pv,interpolate:Np,"interpolate-hcl":Np,"interpolate-lab":Np,length:Os,let:Gm,literal:Uc,match:Yd,number:hv,"number-format":cl,object:hv,slice:Em,step:Mv,string:hv,"to-boolean":Oc,"to-color":Oc,"to-number":Oc,"to-string":Oc,var:ug,within:Av};function Nc(H,j){var ue=j[0],Re=j[1],Qe=j[2],dt=j[3];ue=ue.evaluate(H),Re=Re.evaluate(H),Qe=Qe.evaluate(H);var Mt=dt?dt.evaluate(H):1,ir=Sp(ue,Re,Qe,Mt);if(ir)throw new zf(ir);return new Of(ue/255*Mt,Re/255*Mt,Qe/255*Mt,Mt)}function Sf(H,j){return H in j}function sd(H,j){var ue=j[H];return typeof ue>"u"?null:ue}function Cf(H,j,ue,Re){for(;ue<=Re;){var Qe=ue+Re>>1;if(j[Qe]===H)return!0;j[Qe]>H?Re=Qe-1:ue=Qe+1}return!1}function ld(H){return{type:H}}mu.register(Vu,{error:[Lf,[Xu],function(H,j){var ue=j[0];throw new zf(ue.evaluate(H))}],typeof:[Xu,[uu],function(H,j){var ue=j[0];return td(yd(ue.evaluate(H)))}],"to-rgba":[hh(Tl,4),[Zc],function(H,j){var ue=j[0];return ue.evaluate(H).toArray()}],rgb:[Zc,[Tl,Tl,Tl],Nc],rgba:[Zc,[Tl,Tl,Tl,Tl],Nc],has:{type:pu,overloads:[[[Xu],function(H,j){var ue=j[0];return Sf(ue.evaluate(H),H.properties())}],[[Xu,Md],function(H,j){var ue=j[0],Re=j[1];return Sf(ue.evaluate(H),Re.evaluate(H))}]]},get:{type:uu,overloads:[[[Xu],function(H,j){var ue=j[0];return sd(ue.evaluate(H),H.properties())}],[[Xu,Md],function(H,j){var ue=j[0],Re=j[1];return sd(ue.evaluate(H),Re.evaluate(H))}]]},"feature-state":[uu,[Xu],function(H,j){var ue=j[0];return sd(ue.evaluate(H),H.featureState||{})}],properties:[Md,[],function(H){return H.properties()}],"geometry-type":[Xu,[],function(H){return H.geometryType()}],id:[uu,[],function(H){return H.id()}],zoom:[Tl,[],function(H){return H.globals.zoom}],"heatmap-density":[Tl,[],function(H){return H.globals.heatmapDensity||0}],"line-progress":[Tl,[],function(H){return H.globals.lineProgress||0}],accumulated:[uu,[],function(H){return H.globals.accumulated===void 0?null:H.globals.accumulated}],"+":[Tl,ld(Tl),function(H,j){for(var ue=0,Re=0,Qe=j;Re<Qe.length;Re+=1){var dt=Qe[Re];ue+=dt.evaluate(H)}return ue}],"*":[Tl,ld(Tl),function(H,j){for(var ue=1,Re=0,Qe=j;Re<Qe.length;Re+=1){var dt=Qe[Re];ue*=dt.evaluate(H)}return ue}],"-":{type:Tl,overloads:[[[Tl,Tl],function(H,j){var ue=j[0],Re=j[1];return ue.evaluate(H)-Re.evaluate(H)}],[[Tl],function(H,j){var ue=j[0];return-ue.evaluate(H)}]]},"/":[Tl,[Tl,Tl],function(H,j){var ue=j[0],Re=j[1];return ue.evaluate(H)/Re.evaluate(H)}],"%":[Tl,[Tl,Tl],function(H,j){var ue=j[0],Re=j[1];return ue.evaluate(H)%Re.evaluate(H)}],ln2:[Tl,[],function(){return Math.LN2}],pi:[Tl,[],function(){return Math.PI}],e:[Tl,[],function(){return Math.E}],"^":[Tl,[Tl,Tl],function(H,j){var ue=j[0],Re=j[1];return Math.pow(ue.evaluate(H),Re.evaluate(H))}],sqrt:[Tl,[Tl],function(H,j){var ue=j[0];return Math.sqrt(ue.evaluate(H))}],log10:[Tl,[Tl],function(H,j){var ue=j[0];return Math.log(ue.evaluate(H))/Math.LN10}],ln:[Tl,[Tl],function(H,j){var ue=j[0];return Math.log(ue.evaluate(H))}],log2:[Tl,[Tl],function(H,j){var ue=j[0];return Math.log(ue.evaluate(H))/Math.LN2}],sin:[Tl,[Tl],function(H,j){var ue=j[0];return Math.sin(ue.evaluate(H))}],cos:[Tl,[Tl],function(H,j){var ue=j[0];return Math.cos(ue.evaluate(H))}],tan:[Tl,[Tl],function(H,j){var ue=j[0];return Math.tan(ue.evaluate(H))}],asin:[Tl,[Tl],function(H,j){var ue=j[0];return Math.asin(ue.evaluate(H))}],acos:[Tl,[Tl],function(H,j){var ue=j[0];return Math.acos(ue.evaluate(H))}],atan:[Tl,[Tl],function(H,j){var ue=j[0];return Math.atan(ue.evaluate(H))}],min:[Tl,ld(Tl),function(H,j){return Math.min.apply(Math,j.map(function(ue){return ue.evaluate(H)}))}],max:[Tl,ld(Tl),function(H,j){return Math.max.apply(Math,j.map(function(ue){return ue.evaluate(H)}))}],abs:[Tl,[Tl],function(H,j){var ue=j[0];return Math.abs(ue.evaluate(H))}],round:[Tl,[Tl],function(H,j){var ue=j[0],Re=ue.evaluate(H);return Re<0?-Math.round(-Re):Math.round(Re)}],floor:[Tl,[Tl],function(H,j){var ue=j[0];return Math.floor(ue.evaluate(H))}],ceil:[Tl,[Tl],function(H,j){var ue=j[0];return Math.ceil(ue.evaluate(H))}],"filter-==":[pu,[Xu,uu],function(H,j){var ue=j[0],Re=j[1];return H.properties()[ue.value]===Re.value}],"filter-id-==":[pu,[uu],function(H,j){var ue=j[0];return H.id()===ue.value}],"filter-type-==":[pu,[Xu],function(H,j){var ue=j[0];return H.geometryType()===ue.value}],"filter-<":[pu,[Xu,uu],function(H,j){var ue=j[0],Re=j[1],Qe=H.properties()[ue.value],dt=Re.value;return typeof Qe==typeof dt&&Qe<dt}],"filter-id-<":[pu,[uu],function(H,j){var ue=j[0],Re=H.id(),Qe=ue.value;return typeof Re==typeof Qe&&Re<Qe}],"filter->":[pu,[Xu,uu],function(H,j){var ue=j[0],Re=j[1],Qe=H.properties()[ue.value],dt=Re.value;return typeof Qe==typeof dt&&Qe>dt}],"filter-id->":[pu,[uu],function(H,j){var ue=j[0],Re=H.id(),Qe=ue.value;return typeof Re==typeof Qe&&Re>Qe}],"filter-<=":[pu,[Xu,uu],function(H,j){var ue=j[0],Re=j[1],Qe=H.properties()[ue.value],dt=Re.value;return typeof Qe==typeof dt&&Qe<=dt}],"filter-id-<=":[pu,[uu],function(H,j){var ue=j[0],Re=H.id(),Qe=ue.value;return typeof Re==typeof Qe&&Re<=Qe}],"filter->=":[pu,[Xu,uu],function(H,j){var ue=j[0],Re=j[1],Qe=H.properties()[ue.value],dt=Re.value;return typeof Qe==typeof dt&&Qe>=dt}],"filter-id->=":[pu,[uu],function(H,j){var ue=j[0],Re=H.id(),Qe=ue.value;return typeof Re==typeof Qe&&Re>=Qe}],"filter-has":[pu,[uu],function(H,j){var ue=j[0];return ue.value in H.properties()}],"filter-has-id":[pu,[],function(H){return H.id()!==null&&H.id()!==void 0}],"filter-type-in":[pu,[hh(Xu)],function(H,j){var ue=j[0];return ue.value.indexOf(H.geometryType())>=0}],"filter-id-in":[pu,[hh(uu)],function(H,j){var ue=j[0];return ue.value.indexOf(H.id())>=0}],"filter-in-small":[pu,[Xu,hh(uu)],function(H,j){var ue=j[0],Re=j[1];return Re.value.indexOf(H.properties()[ue.value])>=0}],"filter-in-large":[pu,[Xu,hh(uu)],function(H,j){var ue=j[0],Re=j[1];return Cf(H.properties()[ue.value],Re.value,0,Re.value.length-1)}],all:{type:pu,overloads:[[[pu,pu],function(H,j){var ue=j[0],Re=j[1];return ue.evaluate(H)&&Re.evaluate(H)}],[ld(pu),function(H,j){for(var ue=0,Re=j;ue<Re.length;ue+=1){var Qe=Re[ue];if(!Qe.evaluate(H))return!1}return!0}]]},any:{type:pu,overloads:[[[pu,pu],function(H,j){var ue=j[0],Re=j[1];return ue.evaluate(H)||Re.evaluate(H)}],[ld(pu),function(H,j){for(var ue=0,Re=j;ue<Re.length;ue+=1){var Qe=Re[ue];if(Qe.evaluate(H))return!0}return!1}]]},"!":[pu,[pu],function(H,j){var ue=j[0];return!ue.evaluate(H)}],"is-supported-script":[pu,[Xu],function(H,j){var ue=j[0],Re=H.globals&&H.globals.isSupportedScript;return Re?Re(ue.evaluate(H)):!0}],upcase:[Xu,[Xu],function(H,j){var ue=j[0];return ue.evaluate(H).toUpperCase()}],downcase:[Xu,[Xu],function(H,j){var ue=j[0];return ue.evaluate(H).toLowerCase()}],concat:[Xu,ld(uu),function(H,j){return j.map(function(ue){return lp(ue.evaluate(H))}).join("")}],"resolved-locale":[Xu,[op],function(H,j){var ue=j[0];return ue.evaluate(H).resolvedLocale()}]});function Jc(H){return{result:"success",value:H}}function wh(H){return{result:"error",value:H}}function vh(H){return H["property-type"]==="data-driven"||H["property-type"]==="cross-faded-data-driven"}function rd(H){return!!H.expression&&H.expression.parameters.indexOf("zoom")>-1}function Wl(H){return!!H.expression&&H.expression.interpolated}function lc(H){return H instanceof Number?"number":H instanceof String?"string":H instanceof Boolean?"boolean":Array.isArray(H)?"array":H===null?"null":typeof H}function Bf(H){return typeof H=="object"&&H!==null&&!Array.isArray(H)}function gf(H){return H}function rv(H,j){var ue=j.type==="color",Re=H.stops&&typeof H.stops[0][0]=="object",Qe=Re||H.property!==void 0,dt=Re||!Qe,Mt=H.type||(Wl(j)?"exponential":"interval");if(ue&&(H=$f({},H),H.stops&&(H.stops=H.stops.map(function(Bl){return[Bl[0],Of.parse(Bl[1])]})),H.default?H.default=Of.parse(H.default):H.default=Of.parse(j.default)),H.colorSpace&&H.colorSpace!=="rgb"&&!H1[H.colorSpace])throw new Error("Unknown color space: "+H.colorSpace);var ir,Fr,Zr;if(Mt==="exponential")ir=iv;else if(Mt==="interval")ir=kg;else if(Mt==="categorical"){ir=vv,Fr=Object.create(null);for(var un=0,Hn=H.stops;un<Hn.length;un+=1){var yi=Hn[un];Fr[yi[0]]=yi[1]}Zr=typeof H.stops[0][0]}else if(Mt==="identity")ir=$m;else throw new Error('Unknown function type "'+Mt+'"');if(Re){for(var di={},qi=[],Ia=0;Ia<H.stops.length;Ia++){var Do=H.stops[Ia],ho=Do[0].zoom;di[ho]===void 0&&(di[ho]={zoom:ho,type:H.type,property:H.property,default:H.default,stops:[]},qi.push(ho)),di[ho].stops.push([Do[0].value,Do[1]])}for(var gs=[],Zo=0,ms=qi;Zo<ms.length;Zo+=1){var Is=ms[Zo];gs.push([di[Is].zoom,rv(di[Is],j)])}var dl={name:"linear"};return{kind:"composite",interpolationType:dl,interpolationFactor:Np.interpolationFactor.bind(void 0,dl),zoomStops:gs.map(function(Bl){return Bl[0]}),evaluate:function(Ku,_u){var Ou=Ku.zoom;return iv({stops:gs,base:H.base},j,Ou).evaluate(Ou,_u)}}}else if(dt){var Xl=Mt==="exponential"?{name:"exponential",base:H.base!==void 0?H.base:1}:null;return{kind:"camera",interpolationType:Xl,interpolationFactor:Np.interpolationFactor.bind(void 0,Xl),zoomStops:H.stops.map(function(Bl){return Bl[0]}),evaluate:function(Bl){var Ku=Bl.zoom;return ir(H,j,Ku,Fr,Zr)}}}else return{kind:"source",evaluate:function(Ku,_u){var Ou=_u&&_u.properties?_u.properties[H.property]:void 0;return Ou===void 0?nv(H.default,j.default):ir(H,j,Ou,Fr,Zr)}}}function nv(H,j,ue){if(H!==void 0)return H;if(j!==void 0)return j;if(ue!==void 0)return ue}function vv(H,j,ue,Re,Qe){var dt=typeof ue===Qe?Re[ue]:void 0;return nv(dt,H.default,j.default)}function kg(H,j,ue){if(lc(ue)!=="number")return nv(H.default,j.default);var Re=H.stops.length;if(Re===1||ue<=H.stops[0][0])return H.stops[0][1];if(ue>=H.stops[Re-1][0])return H.stops[Re-1][1];var Qe=tv(H.stops.map(function(dt){return dt[0]}),ue);return H.stops[Qe][1]}function iv(H,j,ue){var Re=H.base!==void 0?H.base:1;if(lc(ue)!=="number")return nv(H.default,j.default);var Qe=H.stops.length;if(Qe===1||ue<=H.stops[0][0])return H.stops[0][1];if(ue>=H.stops[Qe-1][0])return H.stops[Qe-1][1];var dt=tv(H.stops.map(function(Hn){return Hn[0]}),ue),Mt=Sh(ue,Re,H.stops[dt][0],H.stops[dt+1][0]),ir=H.stops[dt][1],Fr=H.stops[dt+1][1],Zr=cg[j.type]||gf;if(H.colorSpace&&H.colorSpace!=="rgb"){var un=H1[H.colorSpace];Zr=function(Hn,yi){return un.reverse(un.interpolate(un.forward(Hn),un.forward(yi),Mt))}}return typeof ir.evaluate=="function"?{evaluate:function(){for(var yi=[],di=arguments.length;di--;)yi[di]=arguments[di];var qi=ir.evaluate.apply(void 0,yi),Ia=Fr.evaluate.apply(void 0,yi);if(!(qi===void 0||Ia===void 0))return Zr(qi,Ia,Mt)}}:Zr(ir,Fr,Mt)}function $m(H,j,ue){return j.type==="color"?ue=Of.parse(ue):j.type==="formatted"?ue=wp.fromString(ue.toString()):j.type==="resolvedImage"?ue=sp.fromString(ue.toString()):lc(ue)!==j.type&&(j.type!=="enum"||!j.values[ue])&&(ue=void 0),nv(ue,H.default,j.default)}function Sh(H,j,ue,Re){var Qe=Re-ue,dt=H-ue;return Qe===0?0:j===1?dt/Qe:(Math.pow(j,dt)-1)/(Math.pow(j,Qe)-1)}var Wm=function(j,ue){this.expression=j,this._warningHistory={},this._evaluator=new mf,this._defaultValue=ue?ot(ue):null,this._enumValues=ue&&ue.type==="enum"?ue.values:null};Wm.prototype.evaluateWithoutErrorHandling=function(j,ue,Re,Qe,dt,Mt){return this._evaluator.globals=j,this._evaluator.feature=ue,this._evaluator.featureState=Re,this._evaluator.canonical=Qe,this._evaluator.availableImages=dt||null,this._evaluator.formattedSection=Mt,this.expression.evaluate(this._evaluator)},Wm.prototype.evaluate=function(j,ue,Re,Qe,dt,Mt){this._evaluator.globals=j,this._evaluator.feature=ue||null,this._evaluator.featureState=Re||null,this._evaluator.canonical=Qe,this._evaluator.availableImages=dt||null,this._evaluator.formattedSection=Mt||null;try{var ir=this.expression.evaluate(this._evaluator);if(ir==null||typeof ir=="number"&&ir!==ir)return this._defaultValue;if(this._enumValues&&!(ir in this._enumValues))throw new zf("Expected value to be one of "+Object.keys(this._enumValues).map(function(Fr){return JSON.stringify(Fr)}).join(", ")+", but found "+JSON.stringify(ir)+" instead.");return ir}catch(Fr){return this._warningHistory[Fr.message]||(this._warningHistory[Fr.message]=!0,typeof console<"u"&&console.warn(Fr.message)),this._defaultValue}};function Iu(H){return Array.isArray(H)&&H.length>0&&typeof H[0]=="string"&&H[0]in Vu}function Gu(H,j){var ue=new bd(Vu,[],j?it(j):void 0),Re=ue.parse(H,void 0,void 0,void 0,j&&j.type==="string"?{typeAnnotation:"coerce"}:void 0);return Re?Jc(new Wm(Re,j)):wh(ue.errors)}var Ym=function(j,ue){this.kind=j,this._styleExpression=ue,this.isStateDependent=j!=="constant"&&!uh(ue.expression)};Ym.prototype.evaluateWithoutErrorHandling=function(j,ue,Re,Qe,dt,Mt){return this._styleExpression.evaluateWithoutErrorHandling(j,ue,Re,Qe,dt,Mt)},Ym.prototype.evaluate=function(j,ue,Re,Qe,dt,Mt){return this._styleExpression.evaluate(j,ue,Re,Qe,dt,Mt)};var Vv=function(j,ue,Re,Qe){this.kind=j,this.zoomStops=Re,this._styleExpression=ue,this.isStateDependent=j!=="camera"&&!uh(ue.expression),this.interpolationType=Qe};Vv.prototype.evaluateWithoutErrorHandling=function(j,ue,Re,Qe,dt,Mt){return this._styleExpression.evaluateWithoutErrorHandling(j,ue,Re,Qe,dt,Mt)},Vv.prototype.evaluate=function(j,ue,Re,Qe,dt,Mt){return this._styleExpression.evaluate(j,ue,Re,Qe,dt,Mt)},Vv.prototype.interpolationFactor=function(j,ue,Re){return this.interpolationType?Np.interpolationFactor(this.interpolationType,j,ue,Re):0};function kv(H,j){if(H=Gu(H,j),H.result==="error")return H;var ue=H.value.expression,Re=ky(ue);if(!Re&&!vh(j))return wh([new Bc("","data expressions not supported")]);var Qe=Cv(ue,["zoom"]);if(!Qe&&!rd(j))return wh([new Bc("","zoom expressions not supported")]);var dt=Ae(ue);if(!dt&&!Qe)return wh([new Bc("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(dt instanceof Bc)return wh([dt]);if(dt instanceof Np&&!Wl(j))return wh([new Bc("",'"interpolate" expressions cannot be used with this property')]);if(!dt)return Jc(Re?new Ym("constant",H.value):new Ym("source",H.value));var Mt=dt instanceof Np?dt.interpolation:void 0;return Jc(Re?new Vv("camera",H.value,dt.labels,Mt):new Vv("composite",H.value,dt.labels,Mt))}var wt=function(j,ue){this._parameters=j,this._specification=ue,$f(this,rv(this._parameters,this._specification))};wt.deserialize=function(j){return new wt(j._parameters,j._specification)},wt.serialize=function(j){return{_parameters:j._parameters,_specification:j._specification}};function q(H,j){if(Bf(H))return new wt(H,j);if(Iu(H)){var ue=kv(H,j);if(ue.result==="error")throw new Error(ue.value.map(function(Qe){return Qe.key+": "+Qe.message}).join(", "));return ue.value}else{var Re=H;return typeof H=="string"&&j.type==="color"&&(Re=Of.parse(H)),{kind:"constant",evaluate:function(){return Re}}}}function Ae(H){var j=null;if(H instanceof Gm)j=Ae(H.result);else if(H instanceof jv)for(var ue=0,Re=H.args;ue<Re.length;ue+=1){var Qe=Re[ue];if(j=Ae(Qe),j)break}else(H instanceof Mv||H instanceof Np)&&H.input instanceof mu&&H.input.name==="zoom"&&(j=H);return j instanceof Bc||H.eachChild(function(dt){var Mt=Ae(dt);Mt instanceof Bc?j=Mt:!j&&Mt?j=new Bc("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):j&&Mt&&j!==Mt&&(j=new Bc("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),j}function it(H){var j={color:Zc,string:Xu,number:Tl,enum:Xu,boolean:pu,formatted:zd,resolvedImage:Qp};return H.type==="array"?hh(j[H.value]||uu,H.length):j[H.type]}function ot(H){return H.type==="color"&&Bf(H.default)?new Of(0,0,0,0):H.type==="color"?Of.parse(H.default)||null:H.default===void 0?null:H.default}function bt(H){var j=H.key,ue=H.value,Re=H.valueSpec||{},Qe=H.objectElementValidators||{},dt=H.style,Mt=H.styleSpec,ir=[],Fr=lc(ue);if(Fr!=="object")return[new Sl(j,ue,"object expected, "+Fr+" found")];for(var Zr in ue){var un=Zr.split(".")[0],Hn=Re[un]||Re["*"],yi=void 0;if(Qe[un])yi=Qe[un];else if(Re[un])yi=Gc;else if(Qe["*"])yi=Qe["*"];else if(Re["*"])yi=Gc;else{ir.push(new Sl(j,ue[Zr],'unknown property "'+Zr+'"'));continue}ir=ir.concat(yi({key:(j&&j+".")+Zr,value:ue[Zr],valueSpec:Hn,style:dt,styleSpec:Mt,object:ue,objectKey:Zr},ue))}for(var di in Re)Qe[di]||Re[di].required&&Re[di].default===void 0&&ue[di]===void 0&&ir.push(new Sl(j,ue,'missing required property "'+di+'"'));return ir}function ar(H){var j=H.value,ue=H.valueSpec,Re=H.style,Qe=H.styleSpec,dt=H.key,Mt=H.arrayElementValidator||Gc;if(lc(j)!=="array")return[new Sl(dt,j,"array expected, "+lc(j)+" found")];if(ue.length&&j.length!==ue.length)return[new Sl(dt,j,"array length "+ue.length+" expected, length "+j.length+" found")];if(ue["min-length"]&&j.length<ue["min-length"])return[new Sl(dt,j,"array length at least "+ue["min-length"]+" expected, length "+j.length+" found")];var ir={type:ue.value,values:ue.values};Qe.$version<7&&(ir.function=ue.function),lc(ue.value)==="object"&&(ir=ue.value);for(var Fr=[],Zr=0;Zr<j.length;Zr++)Fr=Fr.concat(Mt({array:j,arrayIndex:Zr,value:j[Zr],valueSpec:ir,style:Re,styleSpec:Qe,key:dt+"["+Zr+"]"}));return Fr}function yr(H){var j=H.key,ue=H.value,Re=H.valueSpec,Qe=lc(ue);return Qe==="number"&&ue!==ue&&(Qe="NaN"),Qe!=="number"?[new Sl(j,ue,"number expected, "+Qe+" found")]:"minimum"in Re&&ue<Re.minimum?[new Sl(j,ue,ue+" is less than the minimum value "+Re.minimum)]:"maximum"in Re&&ue>Re.maximum?[new Sl(j,ue,ue+" is greater than the maximum value "+Re.maximum)]:[]}function Ur(H){var j=H.valueSpec,ue=wu(H.value.type),Re,Qe={},dt,Mt,ir=ue!=="categorical"&&H.value.property===void 0,Fr=!ir,Zr=lc(H.value.stops)==="array"&&lc(H.value.stops[0])==="array"&&lc(H.value.stops[0][0])==="object",un=bt({key:H.key,value:H.value,valueSpec:H.styleSpec.function,style:H.style,styleSpec:H.styleSpec,objectElementValidators:{stops:Hn,default:qi}});return ue==="identity"&&ir&&un.push(new Sl(H.key,H.value,'missing required property "property"')),ue!=="identity"&&!H.value.stops&&un.push(new Sl(H.key,H.value,'missing required property "stops"')),ue==="exponential"&&H.valueSpec.expression&&!Wl(H.valueSpec)&&un.push(new Sl(H.key,H.value,"exponential functions not supported")),H.styleSpec.$version>=8&&(Fr&&!vh(H.valueSpec)?un.push(new Sl(H.key,H.value,"property functions not supported")):ir&&!rd(H.valueSpec)&&un.push(new Sl(H.key,H.value,"zoom functions not supported"))),(ue==="categorical"||Zr)&&H.value.property===void 0&&un.push(new Sl(H.key,H.value,'"property" property is required')),un;function Hn(Ia){if(ue==="identity")return[new Sl(Ia.key,Ia.value,'identity function may not have a "stops" property')];var Do=[],ho=Ia.value;return Do=Do.concat(ar({key:Ia.key,value:ho,valueSpec:Ia.valueSpec,style:Ia.style,styleSpec:Ia.styleSpec,arrayElementValidator:yi})),lc(ho)==="array"&&ho.length===0&&Do.push(new Sl(Ia.key,ho,"array must have at least one stop")),Do}function yi(Ia){var Do=[],ho=Ia.value,gs=Ia.key;if(lc(ho)!=="array")return[new Sl(gs,ho,"array expected, "+lc(ho)+" found")];if(ho.length!==2)return[new Sl(gs,ho,"array length 2 expected, length "+ho.length+" found")];if(Zr){if(lc(ho[0])!=="object")return[new Sl(gs,ho,"object expected, "+lc(ho[0])+" found")];if(ho[0].zoom===void 0)return[new Sl(gs,ho,"object stop key must have zoom")];if(ho[0].value===void 0)return[new Sl(gs,ho,"object stop key must have value")];if(Mt&&Mt>wu(ho[0].zoom))return[new Sl(gs,ho[0].zoom,"stop zoom values must appear in ascending order")];wu(ho[0].zoom)!==Mt&&(Mt=wu(ho[0].zoom),dt=void 0,Qe={}),Do=Do.concat(bt({key:gs+"[0]",value:ho[0],valueSpec:{zoom:{}},style:Ia.style,styleSpec:Ia.styleSpec,objectElementValidators:{zoom:yr,value:di}}))}else Do=Do.concat(di({key:gs+"[0]",value:ho[0],style:Ia.style,styleSpec:Ia.styleSpec},ho));return Iu(Ad(ho[1]))?Do.concat([new Sl(gs+"[1]",ho[1],"expressions are not allowed in function stops.")]):Do.concat(Gc({key:gs+"[1]",value:ho[1],valueSpec:j,style:Ia.style,styleSpec:Ia.styleSpec}))}function di(Ia,Do){var ho=lc(Ia.value),gs=wu(Ia.value),Zo=Ia.value!==null?Ia.value:Do;if(!Re)Re=ho;else if(ho!==Re)return[new Sl(Ia.key,Zo,ho+" stop domain type must match previous stop domain type "+Re)];if(ho!=="number"&&ho!=="string"&&ho!=="boolean")return[new Sl(Ia.key,Zo,"stop domain value must be a number, string, or boolean")];if(ho!=="number"&&ue!=="categorical"){var ms="number expected, "+ho+" found";return vh(j)&&ue===void 0&&(ms+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Sl(Ia.key,Zo,ms)]}return ue==="categorical"&&ho==="number"&&(!isFinite(gs)||Math.floor(gs)!==gs)?[new Sl(Ia.key,Zo,"integer expected, found "+gs)]:ue!=="categorical"&&ho==="number"&&dt!==void 0&&gs<dt?[new Sl(Ia.key,Zo,"stop domain values must appear in ascending order")]:(dt=gs,ue==="categorical"&&gs in Qe?[new Sl(Ia.key,Zo,"stop domain values must be unique")]:(Qe[gs]=!0,[]))}function qi(Ia){return Gc({key:Ia.key,value:Ia.value,valueSpec:j,style:Ia.style,styleSpec:Ia.styleSpec})}}function ln(H){var j=(H.expressionContext==="property"?kv:Gu)(Ad(H.value),H.valueSpec);if(j.result==="error")return j.value.map(function(Re){return new Sl(""+H.key+Re.key,H.value,Re.message)});var ue=j.value.expression||j.value._styleExpression.expression;if(H.expressionContext==="property"&&H.propertyKey==="text-font"&&!ue.outputDefined())return[new Sl(H.key,H.value,'Invalid data expression for "'+H.propertyKey+'". Output values must be contained as literals within the expression.')];if(H.expressionContext==="property"&&H.propertyType==="layout"&&!uh(ue))return[new Sl(H.key,H.value,'"feature-state" data expressions are not supported with layout properties.')];if(H.expressionContext==="filter"&&!uh(ue))return[new Sl(H.key,H.value,'"feature-state" data expressions are not supported with filters.')];if(H.expressionContext&&H.expressionContext.indexOf("cluster")===0){if(!Cv(ue,["zoom","feature-state"]))return[new Sl(H.key,H.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(H.expressionContext==="cluster-initial"&&!ky(ue))return[new Sl(H.key,H.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Cn(H){var j=H.value,ue=H.key,Re=lc(j);return Re!=="boolean"?[new Sl(ue,j,"boolean expected, "+Re+" found")]:[]}function Pn(H){var j=H.key,ue=H.value,Re=lc(ue);return Re!=="string"?[new Sl(j,ue,"color expected, "+Re+" found")]:o1(ue)===null?[new Sl(j,ue,'color expected, "'+ue+'" found')]:[]}function vi(H){var j=H.key,ue=H.value,Re=H.valueSpec,Qe=[];return Array.isArray(Re.values)?Re.values.indexOf(wu(ue))===-1&&Qe.push(new Sl(j,ue,"expected one of ["+Re.values.join(", ")+"], "+JSON.stringify(ue)+" found")):Object.keys(Re.values).indexOf(wu(ue))===-1&&Qe.push(new Sl(j,ue,"expected one of ["+Object.keys(Re.values).join(", ")+"], "+JSON.stringify(ue)+" found")),Qe}function Ui(H){if(H===!0||H===!1)return!0;if(!Array.isArray(H)||H.length===0)return!1;switch(H[0]){case"has":return H.length>=2&&H[1]!=="$id"&&H[1]!=="$type";case"in":return H.length>=3&&(typeof H[1]!="string"||Array.isArray(H[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return H.length!==3||Array.isArray(H[1])||Array.isArray(H[2]);case"any":case"all":for(var j=0,ue=H.slice(1);j<ue.length;j+=1){var Re=ue[j];if(!Ui(Re)&&typeof Re!="boolean")return!1}return!0;default:return!0}}var kt={type:"boolean",default:!1};function zt(H){if(H==null)return{filter:function(){return!0},needGeometry:!1};Ui(H)||(H=Sr(H));var j=Gu(H,kt);if(j.result==="error")throw new Error(j.value.map(function(Re){return Re.key+": "+Re.message}).join(", "));var ue=cr(H);return{filter:function(Re,Qe,dt){return j.value.evaluate(Re,Qe,{},dt)},needGeometry:ue}}function Qt(H,j){return H<j?-1:H>j?1:0}function cr(H){if(!Array.isArray(H))return!1;if(H[0]==="within")return!0;for(var j=1;j<H.length;j++)if(cr(H[j]))return!0;return!1}function Sr(H){if(!H)return!0;var j=H[0];if(H.length<=1)return j!=="any";var ue=j==="=="?gr(H[1],H[2],"=="):j==="!="?Ln(gr(H[1],H[2],"==")):j==="<"||j===">"||j==="<="||j===">="?gr(H[1],H[2],j):j==="any"?Nr(H.slice(1)):j==="all"?["all"].concat(H.slice(1).map(Sr)):j==="none"?["all"].concat(H.slice(1).map(Sr).map(Ln)):j==="in"?vn(H[1],H.slice(2)):j==="!in"?Ln(vn(H[1],H.slice(2))):j==="has"?An(H[1]):j==="!has"?Ln(An(H[1])):j==="within"?H:!0;return ue}function gr(H,j,ue){switch(H){case"$type":return["filter-type-"+ue,j];case"$id":return["filter-id-"+ue,j];default:return["filter-"+ue,H,j]}}function Nr(H){return["any"].concat(H.map(Sr))}function vn(H,j){if(j.length===0)return!1;switch(H){case"$type":return["filter-type-in",["literal",j]];case"$id":return["filter-id-in",["literal",j]];default:return j.length>200&&!j.some(function(ue){return typeof ue!=typeof j[0]})?["filter-in-large",H,["literal",j.sort(Qt)]]:["filter-in-small",H,["literal",j]]}}function An(H){switch(H){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",H]}}function Ln(H){return["!",H]}function ai(H){return Ui(Ad(H.value))?ln($f({},H,{expressionContext:"filter",valueSpec:{value:"boolean"}})):ki(H)}function ki(H){var j=H.value,ue=H.key;if(lc(j)!=="array")return[new Sl(ue,j,"array expected, "+lc(j)+" found")];var Re=H.styleSpec,Qe,dt=[];if(j.length<1)return[new Sl(ue,j,"filter array must have at least 1 element")];switch(dt=dt.concat(vi({key:ue+"[0]",value:j[0],valueSpec:Re.filter_operator,style:H.style,styleSpec:H.styleSpec})),wu(j[0])){case"<":case"<=":case">":case">=":j.length>=2&&wu(j[1])==="$type"&&dt.push(new Sl(ue,j,'"$type" cannot be use with operator "'+j[0]+'"'));case"==":case"!=":j.length!==3&&dt.push(new Sl(ue,j,'filter array for operator "'+j[0]+'" must have 3 elements'));case"in":case"!in":j.length>=2&&(Qe=lc(j[1]),Qe!=="string"&&dt.push(new Sl(ue+"[1]",j[1],"string expected, "+Qe+" found")));for(var Mt=2;Mt<j.length;Mt++)Qe=lc(j[Mt]),wu(j[1])==="$type"?dt=dt.concat(vi({key:ue+"["+Mt+"]",value:j[Mt],valueSpec:Re.geometry_type,style:H.style,styleSpec:H.styleSpec})):Qe!=="string"&&Qe!=="number"&&Qe!=="boolean"&&dt.push(new Sl(ue+"["+Mt+"]",j[Mt],"string, number, or boolean expected, "+Qe+" found"));break;case"any":case"all":case"none":for(var ir=1;ir<j.length;ir++)dt=dt.concat(ki({key:ue+"["+ir+"]",value:j[ir],style:H.style,styleSpec:H.styleSpec}));break;case"has":case"!has":Qe=lc(j[1]),j.length!==2?dt.push(new Sl(ue,j,'filter array for "'+j[0]+'" operator must have 2 elements')):Qe!=="string"&&dt.push(new Sl(ue+"[1]",j[1],"string expected, "+Qe+" found"));break;case"within":Qe=lc(j[1]),j.length!==2?dt.push(new Sl(ue,j,'filter array for "'+j[0]+'" operator must have 2 elements')):Qe!=="object"&&dt.push(new Sl(ue+"[1]",j[1],"object expected, "+Qe+" found"));break}return dt}function ra(H,j){var ue=H.key,Re=H.style,Qe=H.styleSpec,dt=H.value,Mt=H.objectKey,ir=Qe[j+"_"+H.layerType];if(!ir)return[];var Fr=Mt.match(/^(.*)-transition$/);if(j==="paint"&&Fr&&ir[Fr[1]]&&ir[Fr[1]].transition)return Gc({key:ue,value:dt,valueSpec:Qe.transition,style:Re,styleSpec:Qe});var Zr=H.valueSpec||ir[Mt];if(!Zr)return[new Sl(ue,dt,'unknown property "'+Mt+'"')];var un;if(lc(dt)==="string"&&vh(Zr)&&!Zr.tokens&&(un=/^{([^}]+)}$/.exec(dt)))return[new Sl(ue,dt,'"'+Mt+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(un[1])+" }`.")];var Hn=[];return H.layerType==="symbol"&&(Mt==="text-field"&&Re&&!Re.glyphs&&Hn.push(new Sl(ue,dt,'use of "text-field" requires a style "glyphs" property')),Mt==="text-font"&&Bf(Ad(dt))&&wu(dt.type)==="identity"&&Hn.push(new Sl(ue,dt,'"text-font" does not support identity functions'))),Hn.concat(Gc({key:H.key,value:dt,valueSpec:Zr,style:Re,styleSpec:Qe,expressionContext:"property",propertyType:j,propertyKey:Mt}))}function oa(H){return ra(H,"paint")}function Ma(H){return ra(H,"layout")}function mo(H){var j=[],ue=H.value,Re=H.key,Qe=H.style,dt=H.styleSpec;!ue.type&&!ue.ref&&j.push(new Sl(Re,ue,'either "type" or "ref" is required'));var Mt=wu(ue.type),ir=wu(ue.ref);if(ue.id)for(var Fr=wu(ue.id),Zr=0;Zr<H.arrayIndex;Zr++){var un=Qe.layers[Zr];wu(un.id)===Fr&&j.push(new Sl(Re,ue.id,'duplicate layer id "'+ue.id+'", previously used at line '+un.id.__line__))}if("ref"in ue){["type","source","source-layer","filter","layout"].forEach(function(qi){qi in ue&&j.push(new Sl(Re,ue[qi],'"'+qi+'" is prohibited for ref layers'))});var Hn;Qe.layers.forEach(function(qi){wu(qi.id)===ir&&(Hn=qi)}),Hn?Hn.ref?j.push(new Sl(Re,ue.ref,"ref cannot reference another ref layer")):Mt=wu(Hn.type):j.push(new Sl(Re,ue.ref,'ref layer "'+ir+'" not found'))}else if(Mt!=="background")if(!ue.source)j.push(new Sl(Re,ue,'missing required property "source"'));else{var yi=Qe.sources&&Qe.sources[ue.source],di=yi&&wu(yi.type);yi?di==="vector"&&Mt==="raster"?j.push(new Sl(Re,ue.source,'layer "'+ue.id+'" requires a raster source')):di==="raster"&&Mt!=="raster"?j.push(new Sl(Re,ue.source,'layer "'+ue.id+'" requires a vector source')):di==="vector"&&!ue["source-layer"]?j.push(new Sl(Re,ue,'layer "'+ue.id+'" must specify a "source-layer"')):di==="raster-dem"&&Mt!=="hillshade"?j.push(new Sl(Re,ue.source,"raster-dem source can only be used with layer type 'hillshade'.")):Mt==="line"&&ue.paint&&ue.paint["line-gradient"]&&(di!=="geojson"||!yi.lineMetrics)&&j.push(new Sl(Re,ue,'layer "'+ue.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):j.push(new Sl(Re,ue.source,'source "'+ue.source+'" not found'))}return j=j.concat(bt({key:Re,value:ue,valueSpec:dt.layer,style:H.style,styleSpec:H.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return Gc({key:Re+".type",value:ue.type,valueSpec:dt.layer.type,style:H.style,styleSpec:H.styleSpec,object:ue,objectKey:"type"})},filter:ai,layout:function(Ia){return bt({layer:ue,key:Ia.key,value:Ia.value,style:Ia.style,styleSpec:Ia.styleSpec,objectElementValidators:{"*":function(ho){return Ma($f({layerType:Mt},ho))}}})},paint:function(Ia){return bt({layer:ue,key:Ia.key,value:Ia.value,style:Ia.style,styleSpec:Ia.styleSpec,objectElementValidators:{"*":function(ho){return oa($f({layerType:Mt},ho))}}})}}})),j}function ns(H){var j=H.value,ue=H.key,Re=lc(j);return Re!=="string"?[new Sl(ue,j,"string expected, "+Re+" found")]:[]}var $o={promoteId:fl};function as(H){var j=H.value,ue=H.key,Re=H.styleSpec,Qe=H.style;if(!j.type)return[new Sl(ue,j,'"type" is required')];var dt=wu(j.type),Mt;switch(dt){case"vector":case"raster":case"raster-dem":return Mt=bt({key:ue,value:j,valueSpec:Re["source_"+dt.replace("-","_")],style:H.style,styleSpec:Re,objectElementValidators:$o}),Mt;case"geojson":if(Mt=bt({key:ue,value:j,valueSpec:Re.source_geojson,style:Qe,styleSpec:Re,objectElementValidators:$o}),j.cluster)for(var ir in j.clusterProperties){var Fr=j.clusterProperties[ir],Zr=Fr[0],un=Fr[1],Hn=typeof Zr=="string"?[Zr,["accumulated"],["get",ir]]:Zr;Mt.push.apply(Mt,ln({key:ue+"."+ir+".map",value:un,expressionContext:"cluster-map"})),Mt.push.apply(Mt,ln({key:ue+"."+ir+".reduce",value:Hn,expressionContext:"cluster-reduce"}))}return Mt;case"video":return bt({key:ue,value:j,valueSpec:Re.source_video,style:Qe,styleSpec:Re});case"image":return bt({key:ue,value:j,valueSpec:Re.source_image,style:Qe,styleSpec:Re});case"canvas":return[new Sl(ue,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return vi({key:ue+".type",value:j.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function fl(H){var j=H.key,ue=H.value;if(lc(ue)==="string")return ns({key:j,value:ue});var Re=[];for(var Qe in ue)Re.push.apply(Re,ns({key:j+"."+Qe,value:ue[Qe]}));return Re}function Zl(H){var j=H.value,ue=H.styleSpec,Re=ue.light,Qe=H.style,dt=[],Mt=lc(j);if(j===void 0)return dt;if(Mt!=="object")return dt=dt.concat([new Sl("light",j,"object expected, "+Mt+" found")]),dt;for(var ir in j){var Fr=ir.match(/^(.*)-transition$/);Fr&&Re[Fr[1]]&&Re[Fr[1]].transition?dt=dt.concat(Gc({key:ir,value:j[ir],valueSpec:ue.transition,style:Qe,styleSpec:ue})):Re[ir]?dt=dt.concat(Gc({key:ir,value:j[ir],valueSpec:Re[ir],style:Qe,styleSpec:ue})):dt=dt.concat([new Sl(ir,j[ir],'unknown property "'+ir+'"')])}return dt}function Fl(H){return ns(H).length===0?[]:ln(H)}function Du(H){return ns(H).length===0?[]:ln(H)}var qc={"*":function(){return[]},array:ar,boolean:Cn,number:yr,color:Pn,constants:gd,enum:vi,filter:ai,function:Ur,layer:mo,object:bt,source:as,light:Zl,string:ns,formatted:Fl,resolvedImage:Du};function Gc(H){var j=H.value,ue=H.valueSpec,Re=H.styleSpec;if(ue.expression&&Bf(wu(j)))return Ur(H);if(ue.expression&&Iu(Ad(j)))return ln(H);if(ue.type&&qc[ue.type])return qc[ue.type](H);var Qe=bt($f({},H,{valueSpec:ue.type?Re[ue.type]:ue}));return Qe}function _c(H){var j=H.value,ue=H.key,Re=ns(H);return Re.length||(j.indexOf("{fontstack}")===-1&&Re.push(new Sl(ue,j,'"glyphs" url must include a "{fontstack}" token')),j.indexOf("{range}")===-1&&Re.push(new Sl(ue,j,'"glyphs" url must include a "{range}" token'))),Re}function ef(H,j){j===void 0&&(j=Qo);var ue=[];return ue=ue.concat(Gc({key:"",value:H,valueSpec:j.$root,styleSpec:j,style:H,objectElementValidators:{glyphs:_c,"*":function(){return[]}}})),H.constants&&(ue=ue.concat(gd({key:"constants",value:H.constants}))),Xd(ue)}ef.source=kd(as),ef.light=kd(Zl),ef.layer=kd(mo),ef.filter=kd(ai),ef.paintProperty=kd(oa),ef.layoutProperty=kd(Ma);function Xd(H){return[].concat(H).sort(function(j,ue){return j.line-ue.line})}function kd(H){return function(){for(var j=[],ue=arguments.length;ue--;)j[ue]=arguments[ue];return Xd(H.apply(this,j))}}var Ec=ef,Ac=Ec.light,Ih=Ec.paintProperty,Ep=Ec.layoutProperty;function Iv(H,j){var ue=!1;if(j&&j.length)for(var Re=0,Qe=j;Re<Qe.length;Re+=1){var dt=Qe[Re];H.fire(new _i(new Error(dt.message))),ue=!0}return ue}var $e=Bt,vt=3;function Bt(H,j,ue){var Re=this.cells=[];if(H instanceof ArrayBuffer){this.arrayBuffer=H;var Qe=new Int32Array(this.arrayBuffer);H=Qe[0],j=Qe[1],ue=Qe[2],this.d=j+2*ue;for(var dt=0;dt<this.d*this.d;dt++){var Mt=Qe[vt+dt],ir=Qe[vt+dt+1];Re.push(Mt===ir?null:Qe.subarray(Mt,ir))}var Fr=Qe[vt+Re.length],Zr=Qe[vt+Re.length+1];this.keys=Qe.subarray(Fr,Zr),this.bboxes=Qe.subarray(Zr),this.insert=this._insertReadonly}else{this.d=j+2*ue;for(var un=0;un<this.d*this.d;un++)Re.push([]);this.keys=[],this.bboxes=[]}this.n=j,this.extent=H,this.padding=ue,this.scale=j/H,this.uid=0;var Hn=ue/j*H;this.min=-Hn,this.max=H+Hn}Bt.prototype.insert=function(H,j,ue,Re,Qe){this._forEachCell(j,ue,Re,Qe,this._insertCell,this.uid++),this.keys.push(H),this.bboxes.push(j),this.bboxes.push(ue),this.bboxes.push(Re),this.bboxes.push(Qe)},Bt.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},Bt.prototype._insertCell=function(H,j,ue,Re,Qe,dt){this.cells[Qe].push(dt)},Bt.prototype.query=function(H,j,ue,Re,Qe){var dt=this.min,Mt=this.max;if(H<=dt&&j<=dt&&Mt<=ue&&Mt<=Re&&!Qe)return Array.prototype.slice.call(this.keys);var ir=[],Fr={};return this._forEachCell(H,j,ue,Re,this._queryCell,ir,Fr,Qe),ir},Bt.prototype._queryCell=function(H,j,ue,Re,Qe,dt,Mt,ir){var Fr=this.cells[Qe];if(Fr!==null)for(var Zr=this.keys,un=this.bboxes,Hn=0;Hn<Fr.length;Hn++){var yi=Fr[Hn];if(Mt[yi]===void 0){var di=yi*4;(ir?ir(un[di+0],un[di+1],un[di+2],un[di+3]):H<=un[di+2]&&j<=un[di+3]&&ue>=un[di+0]&&Re>=un[di+1])?(Mt[yi]=!0,dt.push(Zr[yi])):Mt[yi]=!1}}},Bt.prototype._forEachCell=function(H,j,ue,Re,Qe,dt,Mt,ir){for(var Fr=this._convertToCellCoord(H),Zr=this._convertToCellCoord(j),un=this._convertToCellCoord(ue),Hn=this._convertToCellCoord(Re),yi=Fr;yi<=un;yi++)for(var di=Zr;di<=Hn;di++){var qi=this.d*di+yi;if(!(ir&&!ir(this._convertFromCellCoord(yi),this._convertFromCellCoord(di),this._convertFromCellCoord(yi+1),this._convertFromCellCoord(di+1)))&&Qe.call(this,H,j,ue,Re,qi,dt,Mt,ir))return}},Bt.prototype._convertFromCellCoord=function(H){return(H-this.padding)/this.scale},Bt.prototype._convertToCellCoord=function(H){return Math.max(0,Math.min(this.d-1,Math.floor(H*this.scale)+this.padding))},Bt.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var H=this.cells,j=vt+this.cells.length+1+1,ue=0,Re=0;Re<this.cells.length;Re++)ue+=this.cells[Re].length;var Qe=new Int32Array(j+ue+this.keys.length+this.bboxes.length);Qe[0]=this.extent,Qe[1]=this.n,Qe[2]=this.padding;for(var dt=j,Mt=0;Mt<H.length;Mt++){var ir=H[Mt];Qe[vt+Mt]=dt,Qe.set(ir,dt),dt+=ir.length}return Qe[vt+H.length]=dt,Qe.set(this.keys,dt),dt+=this.keys.length,Qe[vt+H.length+1]=dt,Qe.set(this.bboxes,dt),dt+=this.bboxes.length,Qe.buffer};var fr=m.ImageData,pr=m.ImageBitmap,_r={};function Yr(H,j,ue){ue===void 0&&(ue={}),Object.defineProperty(j,"_classRegistryKey",{value:H,writeable:!1}),_r[H]={klass:j,omit:ue.omit||[],shallow:ue.shallow||[]}}Yr("Object",Object),$e.serialize=function(j,ue){var Re=j.toArrayBuffer();return ue&&ue.push(Re),{buffer:Re}},$e.deserialize=function(j){return new $e(j.buffer)},Yr("Grid",$e),Yr("Color",Of),Yr("Error",Error),Yr("ResolvedImage",sp),Yr("StylePropertyFunction",wt),Yr("StyleExpression",Wm,{omit:["_evaluator"]}),Yr("ZoomDependentExpression",Vv),Yr("ZoomConstantExpression",Ym),Yr("CompoundExpression",mu,{omit:["_evaluate"]});for(var Wr in Vu)Vu[Wr]._classRegistryKey||Yr("Expression_"+Wr,Vu[Wr]);function yn(H){return H&&typeof ArrayBuffer<"u"&&(H instanceof ArrayBuffer||H.constructor&&H.constructor.name==="ArrayBuffer")}function li(H){return pr&&H instanceof pr}function ni(H,j){if(H==null||typeof H=="boolean"||typeof H=="number"||typeof H=="string"||H instanceof Boolean||H instanceof Number||H instanceof String||H instanceof Date||H instanceof RegExp)return H;if(yn(H)||li(H))return j&&j.push(H),H;if(ArrayBuffer.isView(H)){var ue=H;return j&&j.push(ue.buffer),ue}if(H instanceof fr)return j&&j.push(H.data.buffer),H;if(Array.isArray(H)){for(var Re=[],Qe=0,dt=H;Qe<dt.length;Qe+=1){var Mt=dt[Qe];Re.push(ni(Mt,j))}return Re}if(typeof H=="object"){var ir=H.constructor,Fr=ir._classRegistryKey;if(!Fr)throw new Error("can't serialize object of unregistered class");var Zr=ir.serialize?ir.serialize(H,j):{};if(!ir.serialize){for(var un in H)if(H.hasOwnProperty(un)&&!(_r[Fr].omit.indexOf(un)>=0)){var Hn=H[un];Zr[un]=_r[Fr].shallow.indexOf(un)>=0?Hn:ni(Hn,j)}H instanceof Error&&(Zr.message=H.message)}if(Zr.$name)throw new Error("$name property is reserved for worker serialization logic.");return Fr!=="Object"&&(Zr.$name=Fr),Zr}throw new Error("can't serialize object of type "+typeof H)}function Pi(H){if(H==null||typeof H=="boolean"||typeof H=="number"||typeof H=="string"||H instanceof Boolean||H instanceof Number||H instanceof String||H instanceof Date||H instanceof RegExp||yn(H)||li(H)||ArrayBuffer.isView(H)||H instanceof fr)return H;if(Array.isArray(H))return H.map(Pi);if(typeof H=="object"){var j=H.$name||"Object",ue=_r[j],Re=ue.klass;if(!Re)throw new Error("can't deserialize unregistered class "+j);if(Re.deserialize)return Re.deserialize(H);for(var Qe=Object.create(Re.prototype),dt=0,Mt=Object.keys(H);dt<Mt.length;dt+=1){var ir=Mt[dt];if(ir!=="$name"){var Fr=H[ir];Qe[ir]=_r[j].shallow.indexOf(ir)>=0?Fr:Pi(Fr)}}return Qe}throw new Error("can't deserialize object of type "+typeof H)}var Ji=function(){this.first=!0};Ji.prototype.update=function(j,ue){var Re=Math.floor(j);return this.first?(this.first=!1,this.lastIntegerZoom=Re,this.lastIntegerZoomTime=0,this.lastZoom=j,this.lastFloorZoom=Re,!0):(this.lastFloorZoom>Re?(this.lastIntegerZoom=Re+1,this.lastIntegerZoomTime=ue):this.lastFloorZoom<Re&&(this.lastIntegerZoom=Re,this.lastIntegerZoomTime=ue),j!==this.lastZoom?(this.lastZoom=j,this.lastFloorZoom=Re,!0):!1)};var na={"Latin-1 Supplement":function(H){return H>=128&&H<=255},Arabic:function(H){return H>=1536&&H<=1791},"Arabic Supplement":function(H){return H>=1872&&H<=1919},"Arabic Extended-A":function(H){return H>=2208&&H<=2303},"Hangul Jamo":function(H){return H>=4352&&H<=4607},"Unified Canadian Aboriginal Syllabics":function(H){return H>=5120&&H<=5759},Khmer:function(H){return H>=6016&&H<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(H){return H>=6320&&H<=6399},"General Punctuation":function(H){return H>=8192&&H<=8303},"Letterlike Symbols":function(H){return H>=8448&&H<=8527},"Number Forms":function(H){return H>=8528&&H<=8591},"Miscellaneous Technical":function(H){return H>=8960&&H<=9215},"Control Pictures":function(H){return H>=9216&&H<=9279},"Optical Character Recognition":function(H){return H>=9280&&H<=9311},"Enclosed Alphanumerics":function(H){return H>=9312&&H<=9471},"Geometric Shapes":function(H){return H>=9632&&H<=9727},"Miscellaneous Symbols":function(H){return H>=9728&&H<=9983},"Miscellaneous Symbols and Arrows":function(H){return H>=11008&&H<=11263},"CJK Radicals Supplement":function(H){return H>=11904&&H<=12031},"Kangxi Radicals":function(H){return H>=12032&&H<=12255},"Ideographic Description Characters":function(H){return H>=12272&&H<=12287},"CJK Symbols and Punctuation":function(H){return H>=12288&&H<=12351},Hiragana:function(H){return H>=12352&&H<=12447},Katakana:function(H){return H>=12448&&H<=12543},Bopomofo:function(H){return H>=12544&&H<=12591},"Hangul Compatibility Jamo":function(H){return H>=12592&&H<=12687},Kanbun:function(H){return H>=12688&&H<=12703},"Bopomofo Extended":function(H){return H>=12704&&H<=12735},"CJK Strokes":function(H){return H>=12736&&H<=12783},"Katakana Phonetic Extensions":function(H){return H>=12784&&H<=12799},"Enclosed CJK Letters and Months":function(H){return H>=12800&&H<=13055},"CJK Compatibility":function(H){return H>=13056&&H<=13311},"CJK Unified Ideographs Extension A":function(H){return H>=13312&&H<=19903},"Yijing Hexagram Symbols":function(H){return H>=19904&&H<=19967},"CJK Unified Ideographs":function(H){return H>=19968&&H<=40959},"Yi Syllables":function(H){return H>=40960&&H<=42127},"Yi Radicals":function(H){return H>=42128&&H<=42191},"Hangul Jamo Extended-A":function(H){return H>=43360&&H<=43391},"Hangul Syllables":function(H){return H>=44032&&H<=55215},"Hangul Jamo Extended-B":function(H){return H>=55216&&H<=55295},"Private Use Area":function(H){return H>=57344&&H<=63743},"CJK Compatibility Ideographs":function(H){return H>=63744&&H<=64255},"Arabic Presentation Forms-A":function(H){return H>=64336&&H<=65023},"Vertical Forms":function(H){return H>=65040&&H<=65055},"CJK Compatibility Forms":function(H){return H>=65072&&H<=65103},"Small Form Variants":function(H){return H>=65104&&H<=65135},"Arabic Presentation Forms-B":function(H){return H>=65136&&H<=65279},"Halfwidth and Fullwidth Forms":function(H){return H>=65280&&H<=65519}};function _o(H){for(var j=0,ue=H;j<ue.length;j+=1){var Re=ue[j];if(bo(Re.charCodeAt(0)))return!0}return!1}function ca(H){for(var j=0,ue=H;j<ue.length;j+=1){var Re=ue[j];if(!La(Re.charCodeAt(0)))return!1}return!0}function La(H){return!(na.Arabic(H)||na["Arabic Supplement"](H)||na["Arabic Extended-A"](H)||na["Arabic Presentation Forms-A"](H)||na["Arabic Presentation Forms-B"](H))}function qa(H){return H<11904?!1:!!(na["Bopomofo Extended"](H)||na.Bopomofo(H)||na["CJK Compatibility Forms"](H)||na["CJK Compatibility Ideographs"](H)||na["CJK Compatibility"](H)||na["CJK Radicals Supplement"](H)||na["CJK Strokes"](H)||na["CJK Symbols and Punctuation"](H)||na["CJK Unified Ideographs Extension A"](H)||na["CJK Unified Ideographs"](H)||na["Enclosed CJK Letters and Months"](H)||na["Halfwidth and Fullwidth Forms"](H)||na.Hiragana(H)||na["Ideographic Description Characters"](H)||na["Kangxi Radicals"](H)||na["Katakana Phonetic Extensions"](H)||na.Katakana(H)||na["Vertical Forms"](H)||na["Yi Radicals"](H)||na["Yi Syllables"](H))}function bo(H){return H===746||H===747?!0:H<4352?!1:!!(na["Bopomofo Extended"](H)||na.Bopomofo(H)||na["CJK Compatibility Forms"](H)&&!(H>=65097&&H<=65103)||na["CJK Compatibility Ideographs"](H)||na["CJK Compatibility"](H)||na["CJK Radicals Supplement"](H)||na["CJK Strokes"](H)||na["CJK Symbols and Punctuation"](H)&&!(H>=12296&&H<=12305)&&!(H>=12308&&H<=12319)&&H!==12336||na["CJK Unified Ideographs Extension A"](H)||na["CJK Unified Ideographs"](H)||na["Enclosed CJK Letters and Months"](H)||na["Hangul Compatibility Jamo"](H)||na["Hangul Jamo Extended-A"](H)||na["Hangul Jamo Extended-B"](H)||na["Hangul Jamo"](H)||na["Hangul Syllables"](H)||na.Hiragana(H)||na["Ideographic Description Characters"](H)||na.Kanbun(H)||na["Kangxi Radicals"](H)||na["Katakana Phonetic Extensions"](H)||na.Katakana(H)&&H!==12540||na["Halfwidth and Fullwidth Forms"](H)&&H!==65288&&H!==65289&&H!==65293&&!(H>=65306&&H<=65310)&&H!==65339&&H!==65341&&H!==65343&&!(H>=65371&&H<=65503)&&H!==65507&&!(H>=65512&&H<=65519)||na["Small Form Variants"](H)&&!(H>=65112&&H<=65118)&&!(H>=65123&&H<=65126)||na["Unified Canadian Aboriginal Syllabics"](H)||na["Unified Canadian Aboriginal Syllabics Extended"](H)||na["Vertical Forms"](H)||na["Yijing Hexagram Symbols"](H)||na["Yi Syllables"](H)||na["Yi Radicals"](H))}function So(H){return!!(na["Latin-1 Supplement"](H)&&(H===167||H===169||H===174||H===177||H===188||H===189||H===190||H===215||H===247)||na["General Punctuation"](H)&&(H===8214||H===8224||H===8225||H===8240||H===8241||H===8251||H===8252||H===8258||H===8263||H===8264||H===8265||H===8273)||na["Letterlike Symbols"](H)||na["Number Forms"](H)||na["Miscellaneous Technical"](H)&&(H>=8960&&H<=8967||H>=8972&&H<=8991||H>=8996&&H<=9e3||H===9003||H>=9085&&H<=9114||H>=9150&&H<=9165||H===9167||H>=9169&&H<=9179||H>=9186&&H<=9215)||na["Control Pictures"](H)&&H!==9251||na["Optical Character Recognition"](H)||na["Enclosed Alphanumerics"](H)||na["Geometric Shapes"](H)||na["Miscellaneous Symbols"](H)&&!(H>=9754&&H<=9759)||na["Miscellaneous Symbols and Arrows"](H)&&(H>=11026&&H<=11055||H>=11088&&H<=11097||H>=11192&&H<=11243)||na["CJK Symbols and Punctuation"](H)||na.Katakana(H)||na["Private Use Area"](H)||na["CJK Compatibility Forms"](H)||na["Small Form Variants"](H)||na["Halfwidth and Fullwidth Forms"](H)||H===8734||H===8756||H===8757||H>=9984&&H<=10087||H>=10102&&H<=10131||H===65532||H===65533)}function Va(H){return!(bo(H)||So(H))}function os(H){return na.Arabic(H)||na["Arabic Supplement"](H)||na["Arabic Extended-A"](H)||na["Arabic Presentation Forms-A"](H)||na["Arabic Presentation Forms-B"](H)}function ul(H){return H>=1424&&H<=2303||na["Arabic Presentation Forms-A"](H)||na["Arabic Presentation Forms-B"](H)}function Us(H,j){return!(!j&&ul(H)||H>=2304&&H<=3583||H>=3840&&H<=4255||na.Khmer(H))}function rl(H){for(var j=0,ue=H;j<ue.length;j+=1){var Re=ue[j];if(ul(Re.charCodeAt(0)))return!0}return!1}function Yl(H,j){for(var ue=0,Re=H;ue<Re.length;ue+=1){var Qe=Re[ue];if(!Us(Qe.charCodeAt(0),j))return!1}return!0}var eu={unavailable:"unavailable",deferred:"deferred",loading:"loading",loaded:"loaded",error:"error"},Vc=null,ou=eu.unavailable,Zu=null,Qc=function(H){H&&typeof H=="string"&&H.indexOf("NetworkError")>-1&&(ou=eu.error),Vc&&Vc(H)};function Ph(){xd.fire(new pi("pluginStateChange",{pluginStatus:ou,pluginURL:Zu}))}var xd=new fi,Rl=function(){return ou},Cc=function(H){return H({pluginStatus:ou,pluginURL:Zu}),xd.on("pluginStateChange",H),H},$c=function(H,j,ue){if(ue===void 0&&(ue=!1),ou===eu.deferred||ou===eu.loading||ou===eu.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");Zu=tt.resolveURL(H),ou=eu.deferred,Vc=j,Ph(),ue||ud()},ud=function(){if(ou!==eu.deferred||!Zu)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");ou=eu.loading,Ph(),Zu&&aa({url:Zu},function(H){H?Qc(H):(ou=eu.loaded,Ph())})},Uf={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return ou===eu.loaded||Uf.applyArabicShaping!=null},isLoading:function(){return ou===eu.loading},setState:function(j){ou=j.pluginStatus,Zu=j.pluginURL},isParsed:function(){return Uf.applyArabicShaping!=null&&Uf.processBidirectionalText!=null&&Uf.processStyledBidirectionalText!=null},getPluginURL:function(){return Zu}},mv=function(){!Uf.isLoading()&&!Uf.isLoaded()&&Rl()==="deferred"&&ud()},Mf=function(j,ue){this.zoom=j,ue?(this.now=ue.now,this.fadeDuration=ue.fadeDuration,this.zoomHistory=ue.zoomHistory,this.transition=ue.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Ji,this.transition={})};Mf.prototype.isSupportedScript=function(j){return Yl(j,Uf.isLoaded())},Mf.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},Mf.prototype.getCrossfadeParameters=function(){var j=this.zoom,ue=j-Math.floor(j),Re=this.crossFadingFactor();return j>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:ue+(1-ue)*Re}:{fromScale:.5,toScale:1,t:1-(1-Re)*ue}};var cd=function(j,ue){this.property=j,this.value=ue,this.expression=q(ue===void 0?j.specification.default:ue,j.specification)};cd.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},cd.prototype.possiblyEvaluate=function(j,ue,Re){return this.property.possiblyEvaluate(this,j,ue,Re)};var qv=function(j){this.property=j,this.value=new cd(j,void 0)};qv.prototype.transitioned=function(j,ue){return new rr(this.property,this.value,ue,k({},j.transition,this.transition),j.now)},qv.prototype.untransitioned=function(){return new rr(this.property,this.value,null,{},0)};var Th=function(j){this._properties=j,this._values=Object.create(j.defaultTransitionablePropertyValues)};Th.prototype.getValue=function(j){return J(this._values[j].value.value)},Th.prototype.setValue=function(j,ue){this._values.hasOwnProperty(j)||(this._values[j]=new qv(this._values[j].property)),this._values[j].value=new cd(this._values[j].property,ue===null?void 0:J(ue))},Th.prototype.getTransition=function(j){return J(this._values[j].transition)},Th.prototype.setTransition=function(j,ue){this._values.hasOwnProperty(j)||(this._values[j]=new qv(this._values[j].property)),this._values[j].transition=J(ue)||void 0},Th.prototype.serialize=function(){for(var j={},ue=0,Re=Object.keys(this._values);ue<Re.length;ue+=1){var Qe=Re[ue],dt=this.getValue(Qe);dt!==void 0&&(j[Qe]=dt);var Mt=this.getTransition(Qe);Mt!==void 0&&(j[Qe+"-transition"]=Mt)}return j},Th.prototype.transitioned=function(j,ue){for(var Re=new mn(this._properties),Qe=0,dt=Object.keys(this._values);Qe<dt.length;Qe+=1){var Mt=dt[Qe];Re._values[Mt]=this._values[Mt].transitioned(j,ue._values[Mt])}return Re},Th.prototype.untransitioned=function(){for(var j=new mn(this._properties),ue=0,Re=Object.keys(this._values);ue<Re.length;ue+=1){var Qe=Re[ue];j._values[Qe]=this._values[Qe].untransitioned()}return j};var rr=function(j,ue,Re,Qe,dt){this.property=j,this.value=ue,this.begin=dt+Qe.delay||0,this.end=this.begin+Qe.duration||0,j.specification.transition&&(Qe.delay||Qe.duration)&&(this.prior=Re)};rr.prototype.possiblyEvaluate=function(j,ue,Re){var Qe=j.now||0,dt=this.value.possiblyEvaluate(j,ue,Re),Mt=this.prior;if(Mt){if(Qe>this.end)return this.prior=null,dt;if(this.value.isDataDriven())return this.prior=null,dt;if(Qe<this.begin)return Mt.possiblyEvaluate(j,ue,Re);var ir=(Qe-this.begin)/(this.end-this.begin);return this.property.interpolate(Mt.possiblyEvaluate(j,ue,Re),dt,A(ir))}else return dt};var mn=function(j){this._properties=j,this._values=Object.create(j.defaultTransitioningPropertyValues)};mn.prototype.possiblyEvaluate=function(j,ue,Re){for(var Qe=new Wa(this._properties),dt=0,Mt=Object.keys(this._values);dt<Mt.length;dt+=1){var ir=Mt[dt];Qe._values[ir]=this._values[ir].possiblyEvaluate(j,ue,Re)}return Qe},mn.prototype.hasTransition=function(){for(var j=0,ue=Object.keys(this._values);j<ue.length;j+=1){var Re=ue[j];if(this._values[Re].prior)return!0}return!1};var En=function(j){this._properties=j,this._values=Object.create(j.defaultPropertyValues)};En.prototype.getValue=function(j){return J(this._values[j].value)},En.prototype.setValue=function(j,ue){this._values[j]=new cd(this._values[j].property,ue===null?void 0:J(ue))},En.prototype.serialize=function(){for(var j={},ue=0,Re=Object.keys(this._values);ue<Re.length;ue+=1){var Qe=Re[ue],dt=this.getValue(Qe);dt!==void 0&&(j[Qe]=dt)}return j},En.prototype.possiblyEvaluate=function(j,ue,Re){for(var Qe=new Wa(this._properties),dt=0,Mt=Object.keys(this._values);dt<Mt.length;dt+=1){var ir=Mt[dt];Qe._values[ir]=this._values[ir].possiblyEvaluate(j,ue,Re)}return Qe};var ia=function(j,ue,Re){this.property=j,this.value=ue,this.parameters=Re};ia.prototype.isConstant=function(){return this.value.kind==="constant"},ia.prototype.constantOr=function(j){return this.value.kind==="constant"?this.value.value:j},ia.prototype.evaluate=function(j,ue,Re,Qe){return this.property.evaluate(this.value,this.parameters,j,ue,Re,Qe)};var Wa=function(j){this._properties=j,this._values=Object.create(j.defaultPossiblyEvaluatedValues)};Wa.prototype.get=function(j){return this._values[j]};var zi=function(j){this.specification=j};zi.prototype.possiblyEvaluate=function(j,ue){return j.expression.evaluate(ue)},zi.prototype.interpolate=function(j,ue,Re){var Qe=cg[this.specification.type];return Qe?Qe(j,ue,Re):j};var Fi=function(j,ue){this.specification=j,this.overrides=ue};Fi.prototype.possiblyEvaluate=function(j,ue,Re,Qe){return j.expression.kind==="constant"||j.expression.kind==="camera"?new ia(this,{kind:"constant",value:j.expression.evaluate(ue,null,{},Re,Qe)},ue):new ia(this,j.expression,ue)},Fi.prototype.interpolate=function(j,ue,Re){if(j.value.kind!=="constant"||ue.value.kind!=="constant")return j;if(j.value.value===void 0||ue.value.value===void 0)return new ia(this,{kind:"constant",value:void 0},j.parameters);var Qe=cg[this.specification.type];return Qe?new ia(this,{kind:"constant",value:Qe(j.value.value,ue.value.value,Re)},j.parameters):j},Fi.prototype.evaluate=function(j,ue,Re,Qe,dt,Mt){return j.kind==="constant"?j.value:j.evaluate(ue,Re,Qe,dt,Mt)};var Ao=(function(H){function j(){H.apply(this,arguments)}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype.possiblyEvaluate=function(Re,Qe,dt,Mt){if(Re.value===void 0)return new ia(this,{kind:"constant",value:void 0},Qe);if(Re.expression.kind==="constant"){var ir=Re.expression.evaluate(Qe,null,{},dt,Mt),Fr=Re.property.specification.type==="resolvedImage",Zr=Fr&&typeof ir!="string"?ir.name:ir,un=this._calculate(Zr,Zr,Zr,Qe);return new ia(this,{kind:"constant",value:un},Qe)}else if(Re.expression.kind==="camera"){var Hn=this._calculate(Re.expression.evaluate({zoom:Qe.zoom-1}),Re.expression.evaluate({zoom:Qe.zoom}),Re.expression.evaluate({zoom:Qe.zoom+1}),Qe);return new ia(this,{kind:"constant",value:Hn},Qe)}else return new ia(this,Re.expression,Qe)},j.prototype.evaluate=function(Re,Qe,dt,Mt,ir,Fr){if(Re.kind==="source"){var Zr=Re.evaluate(Qe,dt,Mt,ir,Fr);return this._calculate(Zr,Zr,Zr,Qe)}else return Re.kind==="composite"?this._calculate(Re.evaluate({zoom:Math.floor(Qe.zoom)-1},dt,Mt),Re.evaluate({zoom:Math.floor(Qe.zoom)},dt,Mt),Re.evaluate({zoom:Math.floor(Qe.zoom)+1},dt,Mt),Qe):Re.value},j.prototype._calculate=function(Re,Qe,dt,Mt){var ir=Mt.zoom;return ir>Mt.zoomHistory.lastIntegerZoom?{from:Re,to:Qe}:{from:dt,to:Qe}},j.prototype.interpolate=function(Re){return Re},j})(Fi),To=function(j){this.specification=j};To.prototype.possiblyEvaluate=function(j,ue,Re,Qe){if(j.value!==void 0)if(j.expression.kind==="constant"){var dt=j.expression.evaluate(ue,null,{},Re,Qe);return this._calculate(dt,dt,dt,ue)}else return this._calculate(j.expression.evaluate(new Mf(Math.floor(ue.zoom-1),ue)),j.expression.evaluate(new Mf(Math.floor(ue.zoom),ue)),j.expression.evaluate(new Mf(Math.floor(ue.zoom+1),ue)),ue)},To.prototype._calculate=function(j,ue,Re,Qe){var dt=Qe.zoom;return dt>Qe.zoomHistory.lastIntegerZoom?{from:j,to:ue}:{from:Re,to:ue}},To.prototype.interpolate=function(j){return j};var Eo=function(j){this.specification=j};Eo.prototype.possiblyEvaluate=function(j,ue,Re,Qe){return!!j.expression.evaluate(ue,null,{},Re,Qe)},Eo.prototype.interpolate=function(){return!1};var qo=function(j){this.properties=j,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(var ue in j){var Re=j[ue];Re.specification.overridable&&this.overridableProperties.push(ue);var Qe=this.defaultPropertyValues[ue]=new cd(Re,void 0),dt=this.defaultTransitionablePropertyValues[ue]=new qv(Re);this.defaultTransitioningPropertyValues[ue]=dt.untransitioned(),this.defaultPossiblyEvaluatedValues[ue]=Qe.possiblyEvaluate({})}};Yr("DataDrivenProperty",Fi),Yr("DataConstantProperty",zi),Yr("CrossFadedDataDrivenProperty",Ao),Yr("CrossFadedProperty",To),Yr("ColorRampProperty",Eo);var qs="-transition",xs=(function(H){function j(ue,Re){if(H.call(this),this.id=ue.id,this.type=ue.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},ue.type!=="custom"&&(ue=ue,this.metadata=ue.metadata,this.minzoom=ue.minzoom,this.maxzoom=ue.maxzoom,ue.type!=="background"&&(this.source=ue.source,this.sourceLayer=ue["source-layer"],this.filter=ue.filter),Re.layout&&(this._unevaluatedLayout=new En(Re.layout)),Re.paint)){this._transitionablePaint=new Th(Re.paint);for(var Qe in ue.paint)this.setPaintProperty(Qe,ue.paint[Qe],{validate:!1});for(var dt in ue.layout)this.setLayoutProperty(dt,ue.layout[dt],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Wa(Re.paint)}}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},j.prototype.getLayoutProperty=function(Re){return Re==="visibility"?this.visibility:this._unevaluatedLayout.getValue(Re)},j.prototype.setLayoutProperty=function(Re,Qe,dt){if(dt===void 0&&(dt={}),Qe!=null){var Mt="layers."+this.id+".layout."+Re;if(this._validate(Ep,Mt,Re,Qe,dt))return}if(Re==="visibility"){this.visibility=Qe;return}this._unevaluatedLayout.setValue(Re,Qe)},j.prototype.getPaintProperty=function(Re){return Z(Re,qs)?this._transitionablePaint.getTransition(Re.slice(0,-qs.length)):this._transitionablePaint.getValue(Re)},j.prototype.setPaintProperty=function(Re,Qe,dt){if(dt===void 0&&(dt={}),Qe!=null){var Mt="layers."+this.id+".paint."+Re;if(this._validate(Ih,Mt,Re,Qe,dt))return!1}if(Z(Re,qs))return this._transitionablePaint.setTransition(Re.slice(0,-qs.length),Qe||void 0),!1;var ir=this._transitionablePaint._values[Re],Fr=ir.property.specification["property-type"]==="cross-faded-data-driven",Zr=ir.value.isDataDriven(),un=ir.value;this._transitionablePaint.setValue(Re,Qe),this._handleSpecialPaintPropertyUpdate(Re);var Hn=this._transitionablePaint._values[Re].value,yi=Hn.isDataDriven();return yi||Zr||Fr||this._handleOverridablePaintPropertyUpdate(Re,un,Hn)},j.prototype._handleSpecialPaintPropertyUpdate=function(Re){},j.prototype._handleOverridablePaintPropertyUpdate=function(Re,Qe,dt){return!1},j.prototype.isHidden=function(Re){return this.minzoom&&Re<this.minzoom||this.maxzoom&&Re>=this.maxzoom?!0:this.visibility==="none"},j.prototype.updateTransitions=function(Re){this._transitioningPaint=this._transitionablePaint.transitioned(Re,this._transitioningPaint)},j.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},j.prototype.recalculate=function(Re,Qe){Re.getCrossfadeParameters&&(this._crossfadeParameters=Re.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(Re,void 0,Qe)),this.paint=this._transitioningPaint.possiblyEvaluate(Re,void 0,Qe)},j.prototype.serialize=function(){var Re={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&&(Re.layout=Re.layout||{},Re.layout.visibility=this.visibility),Q(Re,function(Qe,dt){return Qe!==void 0&&!(dt==="layout"&&!Object.keys(Qe).length)&&!(dt==="paint"&&!Object.keys(Qe).length)})},j.prototype._validate=function(Re,Qe,dt,Mt,ir){return ir===void 0&&(ir={}),ir&&ir.validate===!1?!1:Iv(this,Re.call(Ec,{key:Qe,layerType:this.type,objectKey:dt,value:Mt,styleSpec:Qo,style:{glyphs:!0,sprite:!0}}))},j.prototype.is3D=function(){return!1},j.prototype.isTileClipped=function(){return!1},j.prototype.hasOffscreenPass=function(){return!1},j.prototype.resize=function(){},j.prototype.isStateDependent=function(){for(var Re in this.paint._values){var Qe=this.paint.get(Re);if(!(!(Qe instanceof ia)||!vh(Qe.property.specification))&&(Qe.value.kind==="source"||Qe.value.kind==="composite")&&Qe.value.isStateDependent)return!0}return!1},j})(fi),Uo={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},io=function(j,ue){this._structArray=j,this._pos1=ue*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},xi=128,ga=5,Fa=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};Fa.serialize=function(j,ue){return j._trim(),ue&&(j.isTransferred=!0,ue.push(j.arrayBuffer)),{length:j.length,arrayBuffer:j.arrayBuffer}},Fa.deserialize=function(j){var ue=Object.create(this.prototype);return ue.arrayBuffer=j.arrayBuffer,ue.length=j.length,ue.capacity=j.arrayBuffer.byteLength/ue.bytesPerElement,ue._refreshViews(),ue},Fa.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Fa.prototype.clear=function(){this.length=0},Fa.prototype.resize=function(j){this.reserve(j),this.length=j},Fa.prototype.reserve=function(j){if(j>this.capacity){this.capacity=Math.max(j,Math.floor(this.capacity*ga),xi),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var ue=this.uint8;this._refreshViews(),ue&&this.uint8.set(ue)}},Fa.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};function so(H,j){j===void 0&&(j=1);var ue=0,Re=0,Qe=H.map(function(Mt){var ir=Ua(Mt.type),Fr=ue=vs(ue,Math.max(j,ir)),Zr=Mt.components||1;return Re=Math.max(Re,ir),ue+=ir*Zr,{name:Mt.name,type:Mt.type,components:Zr,offset:Fr}}),dt=vs(ue,Math.max(Re,j));return{members:Qe,size:dt,alignment:j}}function Ua(H){return Uo[H].BYTES_PER_ELEMENT}function vs(H,j){return Math.ceil(H/j)*j}var Po=(function(H){function j(){H.apply(this,arguments)}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},j.prototype.emplaceBack=function(Re,Qe){var dt=this.length;return this.resize(dt+1),this.emplace(dt,Re,Qe)},j.prototype.emplace=function(Re,Qe,dt){var Mt=Re*2;return this.int16[Mt+0]=Qe,this.int16[Mt+1]=dt,Re},j})(Fa);Po.prototype.bytesPerElement=4,Yr("StructArrayLayout2i4",Po);var zs=(function(H){function j(){H.apply(this,arguments)}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},j.prototype.emplaceBack=function(Re,Qe,dt,Mt){var ir=this.length;return this.resize(ir+1),this.emplace(ir,Re,Qe,dt,Mt)},j.prototype.emplace=function(Re,Qe,dt,Mt,ir){var Fr=Re*4;return this.int16[Fr+0]=Qe,this.int16[Fr+1]=dt,this.int16[Fr+2]=Mt,this.int16[Fr+3]=ir,Re},j})(Fa);zs.prototype.bytesPerElement=8,Yr("StructArrayLayout4i8",zs);var Ha=(function(H){function j(){H.apply(this,arguments)}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},j.prototype.emplaceBack=function(Re,Qe,dt,Mt,ir,Fr){var Zr=this.length;return this.resize(Zr+1),this.emplace(Zr,Re,Qe,dt,Mt,ir,Fr)},j.prototype.emplace=function(Re,Qe,dt,Mt,ir,Fr,Zr){var un=Re*6;return this.int16[un+0]=Qe,this.int16[un+1]=dt,this.int16[un+2]=Mt,this.int16[un+3]=ir,this.int16[un+4]=Fr,this.int16[un+5]=Zr,Re},j})(Fa);Ha.prototype.bytesPerElement=12,Yr("StructArrayLayout2i4i12",Ha);var Ra=(function(H){function j(){H.apply(this,arguments)}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},j.prototype.emplaceBack=function(Re,Qe,dt,Mt,ir,Fr){var Zr=this.length;return this.resize(Zr+1),this.emplace(Zr,Re,Qe,dt,Mt,ir,Fr)},j.prototype.emplace=function(Re,Qe,dt,Mt,ir,Fr,Zr){var un=Re*4,Hn=Re*8;return this.int16[un+0]=Qe,this.int16[un+1]=dt,this.uint8[Hn+4]=Mt,this.uint8[Hn+5]=ir,this.uint8[Hn+6]=Fr,this.uint8[Hn+7]=Zr,Re},j})(Fa);Ra.prototype.bytesPerElement=8,Yr("StructArrayLayout2i4ub8",Ra);var ls=(function(H){function j(){H.apply(this,arguments)}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},j.prototype.emplaceBack=function(Re,Qe){var dt=this.length;return this.resize(dt+1),this.emplace(dt,Re,Qe)},j.prototype.emplace=function(Re,Qe,dt){var Mt=Re*2;return this.float32[Mt+0]=Qe,this.float32[Mt+1]=dt,Re},j})(Fa);ls.prototype.bytesPerElement=8,Yr("StructArrayLayout2f8",ls);var ua=(function(H){function j(){H.apply(this,arguments)}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},j.prototype.emplaceBack=function(Re,Qe,dt,Mt,ir,Fr,Zr,un,Hn,yi){var di=this.length;return this.resize(di+1),this.emplace(di,Re,Qe,dt,Mt,ir,Fr,Zr,un,Hn,yi)},j.prototype.emplace=function(Re,Qe,dt,Mt,ir,Fr,Zr,un,Hn,yi,di){var qi=Re*10;return this.uint16[qi+0]=Qe,this.uint16[qi+1]=dt,this.uint16[qi+2]=Mt,this.uint16[qi+3]=ir,this.uint16[qi+4]=Fr,this.uint16[qi+5]=Zr,this.uint16[qi+6]=un,this.uint16[qi+7]=Hn,this.uint16[qi+8]=yi,this.uint16[qi+9]=di,Re},j})(Fa);ua.prototype.bytesPerElement=20,Yr("StructArrayLayout10ui20",ua);var Wo=(function(H){function j(){H.apply(this,arguments)}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},j.prototype.emplaceBack=function(Re,Qe,dt,Mt,ir,Fr,Zr,un,Hn,yi,di,qi){var Ia=this.length;return this.resize(Ia+1),this.emplace(Ia,Re,Qe,dt,Mt,ir,Fr,Zr,un,Hn,yi,di,qi)},j.prototype.emplace=function(Re,Qe,dt,Mt,ir,Fr,Zr,un,Hn,yi,di,qi,Ia){var Do=Re*12;return this.int16[Do+0]=Qe,this.int16[Do+1]=dt,this.int16[Do+2]=Mt,this.int16[Do+3]=ir,this.uint16[Do+4]=Fr,this.uint16[Do+5]=Zr,this.uint16[Do+6]=un,this.uint16[Do+7]=Hn,this.int16[Do+8]=yi,this.int16[Do+9]=di,this.int16[Do+10]=qi,this.int16[Do+11]=Ia,Re},j})(Fa);Wo.prototype.bytesPerElement=24,Yr("StructArrayLayout4i4ui4i24",Wo);var Mo=(function(H){function j(){H.apply(this,arguments)}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},j.prototype.emplaceBack=function(Re,Qe,dt){var Mt=this.length;return this.resize(Mt+1),this.emplace(Mt,Re,Qe,dt)},j.prototype.emplace=function(Re,Qe,dt,Mt){var ir=Re*3;return this.float32[ir+0]=Qe,this.float32[ir+1]=dt,this.float32[ir+2]=Mt,Re},j})(Fa);Mo.prototype.bytesPerElement=12,Yr("StructArrayLayout3f12",Mo);var Hs=(function(H){function j(){H.apply(this,arguments)}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},j.prototype.emplaceBack=function(Re){var Qe=this.length;return this.resize(Qe+1),this.emplace(Qe,Re)},j.prototype.emplace=function(Re,Qe){var dt=Re*1;return this.uint32[dt+0]=Qe,Re},j})(Fa);Hs.prototype.bytesPerElement=4,Yr("StructArrayLayout1ul4",Hs);var au=(function(H){function j(){H.apply(this,arguments)}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.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)},j.prototype.emplaceBack=function(Re,Qe,dt,Mt,ir,Fr,Zr,un,Hn){var yi=this.length;return this.resize(yi+1),this.emplace(yi,Re,Qe,dt,Mt,ir,Fr,Zr,un,Hn)},j.prototype.emplace=function(Re,Qe,dt,Mt,ir,Fr,Zr,un,Hn,yi){var di=Re*10,qi=Re*5;return this.int16[di+0]=Qe,this.int16[di+1]=dt,this.int16[di+2]=Mt,this.int16[di+3]=ir,this.int16[di+4]=Fr,this.int16[di+5]=Zr,this.uint32[qi+3]=un,this.uint16[di+8]=Hn,this.uint16[di+9]=yi,Re},j})(Fa);au.prototype.bytesPerElement=20,Yr("StructArrayLayout6i1ul2ui20",au);var ws=(function(H){function j(){H.apply(this,arguments)}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},j.prototype.emplaceBack=function(Re,Qe,dt,Mt,ir,Fr){var Zr=this.length;return this.resize(Zr+1),this.emplace(Zr,Re,Qe,dt,Mt,ir,Fr)},j.prototype.emplace=function(Re,Qe,dt,Mt,ir,Fr,Zr){var un=Re*6;return this.int16[un+0]=Qe,this.int16[un+1]=dt,this.int16[un+2]=Mt,this.int16[un+3]=ir,this.int16[un+4]=Fr,this.int16[un+5]=Zr,Re},j})(Fa);ws.prototype.bytesPerElement=12,Yr("StructArrayLayout2i2i2i12",ws);var Xs=(function(H){function j(){H.apply(this,arguments)}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},j.prototype.emplaceBack=function(Re,Qe,dt,Mt,ir){var Fr=this.length;return this.resize(Fr+1),this.emplace(Fr,Re,Qe,dt,Mt,ir)},j.prototype.emplace=function(Re,Qe,dt,Mt,ir,Fr){var Zr=Re*4,un=Re*8;return this.float32[Zr+0]=Qe,this.float32[Zr+1]=dt,this.float32[Zr+2]=Mt,this.int16[un+6]=ir,this.int16[un+7]=Fr,Re},j})(Fa);Xs.prototype.bytesPerElement=16,Yr("StructArrayLayout2f1f2i16",Xs);var jo=(function(H){function j(){H.apply(this,arguments)}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},j.prototype.emplaceBack=function(Re,Qe,dt,Mt){var ir=this.length;return this.resize(ir+1),this.emplace(ir,Re,Qe,dt,Mt)},j.prototype.emplace=function(Re,Qe,dt,Mt,ir){var Fr=Re*12,Zr=Re*3;return this.uint8[Fr+0]=Qe,this.uint8[Fr+1]=dt,this.float32[Zr+1]=Mt,this.float32[Zr+2]=ir,Re},j})(Fa);jo.prototype.bytesPerElement=12,Yr("StructArrayLayout2ub2f12",jo);var Jl=(function(H){function j(){H.apply(this,arguments)}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},j.prototype.emplaceBack=function(Re,Qe,dt){var Mt=this.length;return this.resize(Mt+1),this.emplace(Mt,Re,Qe,dt)},j.prototype.emplace=function(Re,Qe,dt,Mt){var ir=Re*3;return this.uint16[ir+0]=Qe,this.uint16[ir+1]=dt,this.uint16[ir+2]=Mt,Re},j})(Fa);Jl.prototype.bytesPerElement=6,Yr("StructArrayLayout3ui6",Jl);var Mu=(function(H){function j(){H.apply(this,arguments)}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.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)},j.prototype.emplaceBack=function(Re,Qe,dt,Mt,ir,Fr,Zr,un,Hn,yi,di,qi,Ia,Do,ho,gs,Zo){var ms=this.length;return this.resize(ms+1),this.emplace(ms,Re,Qe,dt,Mt,ir,Fr,Zr,un,Hn,yi,di,qi,Ia,Do,ho,gs,Zo)},j.prototype.emplace=function(Re,Qe,dt,Mt,ir,Fr,Zr,un,Hn,yi,di,qi,Ia,Do,ho,gs,Zo,ms){var Is=Re*24,dl=Re*12,Xl=Re*48;return this.int16[Is+0]=Qe,this.int16[Is+1]=dt,this.uint16[Is+2]=Mt,this.uint16[Is+3]=ir,this.uint32[dl+2]=Fr,this.uint32[dl+3]=Zr,this.uint32[dl+4]=un,this.uint16[Is+10]=Hn,this.uint16[Is+11]=yi,this.uint16[Is+12]=di,this.float32[dl+7]=qi,this.float32[dl+8]=Ia,this.uint8[Xl+36]=Do,this.uint8[Xl+37]=ho,this.uint8[Xl+38]=gs,this.uint32[dl+10]=Zo,this.int16[Is+22]=ms,Re},j})(Fa);Mu.prototype.bytesPerElement=48,Yr("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Mu);var Fu=(function(H){function j(){H.apply(this,arguments)}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.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)},j.prototype.emplaceBack=function(Re,Qe,dt,Mt,ir,Fr,Zr,un,Hn,yi,di,qi,Ia,Do,ho,gs,Zo,ms,Is,dl,Xl,Bl,Ku,_u,Ou,hf,Ju,oc){var nd=this.length;return this.resize(nd+1),this.emplace(nd,Re,Qe,dt,Mt,ir,Fr,Zr,un,Hn,yi,di,qi,Ia,Do,ho,gs,Zo,ms,Is,dl,Xl,Bl,Ku,_u,Ou,hf,Ju,oc)},j.prototype.emplace=function(Re,Qe,dt,Mt,ir,Fr,Zr,un,Hn,yi,di,qi,Ia,Do,ho,gs,Zo,ms,Is,dl,Xl,Bl,Ku,_u,Ou,hf,Ju,oc,nd){var tf=Re*34,qh=Re*17;return this.int16[tf+0]=Qe,this.int16[tf+1]=dt,this.int16[tf+2]=Mt,this.int16[tf+3]=ir,this.int16[tf+4]=Fr,this.int16[tf+5]=Zr,this.int16[tf+6]=un,this.int16[tf+7]=Hn,this.uint16[tf+8]=yi,this.uint16[tf+9]=di,this.uint16[tf+10]=qi,this.uint16[tf+11]=Ia,this.uint16[tf+12]=Do,this.uint16[tf+13]=ho,this.uint16[tf+14]=gs,this.uint16[tf+15]=Zo,this.uint16[tf+16]=ms,this.uint16[tf+17]=Is,this.uint16[tf+18]=dl,this.uint16[tf+19]=Xl,this.uint16[tf+20]=Bl,this.uint16[tf+21]=Ku,this.uint16[tf+22]=_u,this.uint32[qh+12]=Ou,this.float32[qh+13]=hf,this.float32[qh+14]=Ju,this.float32[qh+15]=oc,this.float32[qh+16]=nd,Re},j})(Fa);Fu.prototype.bytesPerElement=68,Yr("StructArrayLayout8i15ui1ul4f68",Fu);var cf=(function(H){function j(){H.apply(this,arguments)}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},j.prototype.emplaceBack=function(Re){var Qe=this.length;return this.resize(Qe+1),this.emplace(Qe,Re)},j.prototype.emplace=function(Re,Qe){var dt=Re*1;return this.float32[dt+0]=Qe,Re},j})(Fa);cf.prototype.bytesPerElement=4,Yr("StructArrayLayout1f4",cf);var zu=(function(H){function j(){H.apply(this,arguments)}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},j.prototype.emplaceBack=function(Re,Qe,dt){var Mt=this.length;return this.resize(Mt+1),this.emplace(Mt,Re,Qe,dt)},j.prototype.emplace=function(Re,Qe,dt,Mt){var ir=Re*3;return this.int16[ir+0]=Qe,this.int16[ir+1]=dt,this.int16[ir+2]=Mt,Re},j})(Fa);zu.prototype.bytesPerElement=6,Yr("StructArrayLayout3i6",zu);var mh=(function(H){function j(){H.apply(this,arguments)}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},j.prototype.emplaceBack=function(Re,Qe,dt){var Mt=this.length;return this.resize(Mt+1),this.emplace(Mt,Re,Qe,dt)},j.prototype.emplace=function(Re,Qe,dt,Mt){var ir=Re*2,Fr=Re*4;return this.uint32[ir+0]=Qe,this.uint16[Fr+2]=dt,this.uint16[Fr+3]=Mt,Re},j})(Fa);mh.prototype.bytesPerElement=8,Yr("StructArrayLayout1ul2ui8",mh);var Wc=(function(H){function j(){H.apply(this,arguments)}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},j.prototype.emplaceBack=function(Re,Qe){var dt=this.length;return this.resize(dt+1),this.emplace(dt,Re,Qe)},j.prototype.emplace=function(Re,Qe,dt){var Mt=Re*2;return this.uint16[Mt+0]=Qe,this.uint16[Mt+1]=dt,Re},j})(Fa);Wc.prototype.bytesPerElement=4,Yr("StructArrayLayout2ui4",Wc);var Zd=(function(H){function j(){H.apply(this,arguments)}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},j.prototype.emplaceBack=function(Re){var Qe=this.length;return this.resize(Qe+1),this.emplace(Qe,Re)},j.prototype.emplace=function(Re,Qe){var dt=Re*1;return this.uint16[dt+0]=Qe,Re},j})(Fa);Zd.prototype.bytesPerElement=2,Yr("StructArrayLayout1ui2",Zd);var jh=(function(H){function j(){H.apply(this,arguments)}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},j.prototype.emplaceBack=function(Re,Qe,dt,Mt){var ir=this.length;return this.resize(ir+1),this.emplace(ir,Re,Qe,dt,Mt)},j.prototype.emplace=function(Re,Qe,dt,Mt,ir){var Fr=Re*4;return this.float32[Fr+0]=Qe,this.float32[Fr+1]=dt,this.float32[Fr+2]=Mt,this.float32[Fr+3]=ir,Re},j})(Fa);jh.prototype.bytesPerElement=16,Yr("StructArrayLayout4f16",jh);var fp=(function(H){function j(){H.apply(this,arguments)}H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j;var ue={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 ue.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},ue.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},ue.x1.get=function(){return this._structArray.int16[this._pos2+2]},ue.y1.get=function(){return this._structArray.int16[this._pos2+3]},ue.x2.get=function(){return this._structArray.int16[this._pos2+4]},ue.y2.get=function(){return this._structArray.int16[this._pos2+5]},ue.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},ue.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},ue.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},ue.anchorPoint.get=function(){return new v(this.anchorPointX,this.anchorPointY)},Object.defineProperties(j.prototype,ue),j})(io);fp.prototype.size=20;var Am=(function(H){function j(){H.apply(this,arguments)}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype.get=function(Re){return new fp(this,Re)},j})(au);Yr("CollisionBoxArray",Am);var _d=(function(H){function j(){H.apply(this,arguments)}H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j;var ue={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 ue.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},ue.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},ue.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},ue.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},ue.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},ue.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},ue.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},ue.segment.get=function(){return this._structArray.uint16[this._pos2+10]},ue.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},ue.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},ue.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},ue.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},ue.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},ue.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},ue.placedOrientation.set=function(Re){this._structArray.uint8[this._pos1+37]=Re},ue.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},ue.hidden.set=function(Re){this._structArray.uint8[this._pos1+38]=Re},ue.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},ue.crossTileID.set=function(Re){this._structArray.uint32[this._pos4+10]=Re},ue.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(j.prototype,ue),j})(io);_d.prototype.size=48;var Hd=(function(H){function j(){H.apply(this,arguments)}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype.get=function(Re){return new _d(this,Re)},j})(Mu);Yr("PlacedSymbolArray",Hd);var Ol=(function(H){function j(){H.apply(this,arguments)}H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j;var ue={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 ue.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},ue.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},ue.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},ue.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},ue.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},ue.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},ue.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},ue.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},ue.key.get=function(){return this._structArray.uint16[this._pos2+8]},ue.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},ue.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},ue.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},ue.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},ue.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},ue.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},ue.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},ue.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},ue.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},ue.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},ue.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},ue.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},ue.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},ue.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},ue.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},ue.crossTileID.set=function(Re){this._structArray.uint32[this._pos4+12]=Re},ue.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},ue.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},ue.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},ue.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(j.prototype,ue),j})(io);Ol.prototype.size=68;var dp=(function(H){function j(){H.apply(this,arguments)}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype.get=function(Re){return new Ol(this,Re)},j})(Fu);Yr("SymbolInstanceArray",dp);var Fc=(function(H){function j(){H.apply(this,arguments)}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype.getoffsetX=function(Re){return this.float32[Re*1+0]},j})(cf);Yr("GlyphOffsetArray",Fc);var Hf=(function(H){function j(){H.apply(this,arguments)}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype.getx=function(Re){return this.int16[Re*3+0]},j.prototype.gety=function(Re){return this.int16[Re*3+1]},j.prototype.gettileUnitDistanceFromAnchor=function(Re){return this.int16[Re*3+2]},j})(zu);Yr("SymbolLineVertexArray",Hf);var Fp=(function(H){function j(){H.apply(this,arguments)}H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j;var ue={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return ue.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},ue.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},ue.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(j.prototype,ue),j})(io);Fp.prototype.size=8;var zp=(function(H){function j(){H.apply(this,arguments)}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype.get=function(Re){return new Fp(this,Re)},j})(mh);Yr("FeatureIndexArray",zp);var tu=so([{name:"a_pos",components:2,type:"Int16"}],4),tc=tu.members,uc=function(j){j===void 0&&(j=[]),this.segments=j};uc.prototype.prepareSegment=function(j,ue,Re,Qe){var dt=this.segments[this.segments.length-1];return j>uc.MAX_VERTEX_ARRAY_LENGTH&&re("Max vertices per segment is "+uc.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+j),(!dt||dt.vertexLength+j>uc.MAX_VERTEX_ARRAY_LENGTH||dt.sortKey!==Qe)&&(dt={vertexOffset:ue.length,primitiveOffset:Re.length,vertexLength:0,primitiveLength:0},Qe!==void 0&&(dt.sortKey=Qe),this.segments.push(dt)),dt},uc.prototype.get=function(){return this.segments},uc.prototype.destroy=function(){for(var j=0,ue=this.segments;j<ue.length;j+=1){var Re=ue[j];for(var Qe in Re.vaos)Re.vaos[Qe].destroy()}},uc.simpleSegment=function(j,ue,Re,Qe){return new uc([{vertexOffset:j,primitiveOffset:ue,vertexLength:Re,primitiveLength:Qe,vaos:{},sortKey:0}])},uc.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Yr("SegmentVector",uc);function Xe(H,j){return H=g(Math.floor(H),0,255),j=g(Math.floor(j),0,255),256*H+j}var ne=so([{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"}]),Fe=u(function(H){function j(ue,Re){var Qe,dt,Mt,ir,Fr,Zr,un,Hn;for(Qe=ue.length&3,dt=ue.length-Qe,Mt=Re,Fr=3432918353,Zr=461845907,Hn=0;Hn<dt;)un=ue.charCodeAt(Hn)&255|(ue.charCodeAt(++Hn)&255)<<8|(ue.charCodeAt(++Hn)&255)<<16|(ue.charCodeAt(++Hn)&255)<<24,++Hn,un=(un&65535)*Fr+(((un>>>16)*Fr&65535)<<16)&4294967295,un=un<<15|un>>>17,un=(un&65535)*Zr+(((un>>>16)*Zr&65535)<<16)&4294967295,Mt^=un,Mt=Mt<<13|Mt>>>19,ir=(Mt&65535)*5+(((Mt>>>16)*5&65535)<<16)&4294967295,Mt=(ir&65535)+27492+(((ir>>>16)+58964&65535)<<16);switch(un=0,Qe){case 3:un^=(ue.charCodeAt(Hn+2)&255)<<16;case 2:un^=(ue.charCodeAt(Hn+1)&255)<<8;case 1:un^=ue.charCodeAt(Hn)&255,un=(un&65535)*Fr+(((un>>>16)*Fr&65535)<<16)&4294967295,un=un<<15|un>>>17,un=(un&65535)*Zr+(((un>>>16)*Zr&65535)<<16)&4294967295,Mt^=un}return Mt^=ue.length,Mt^=Mt>>>16,Mt=(Mt&65535)*2246822507+(((Mt>>>16)*2246822507&65535)<<16)&4294967295,Mt^=Mt>>>13,Mt=(Mt&65535)*3266489909+(((Mt>>>16)*3266489909&65535)<<16)&4294967295,Mt^=Mt>>>16,Mt>>>0}H.exports=j}),me=u(function(H){function j(ue,Re){for(var Qe=ue.length,dt=Re^Qe,Mt=0,ir;Qe>=4;)ir=ue.charCodeAt(Mt)&255|(ue.charCodeAt(++Mt)&255)<<8|(ue.charCodeAt(++Mt)&255)<<16|(ue.charCodeAt(++Mt)&255)<<24,ir=(ir&65535)*1540483477+(((ir>>>16)*1540483477&65535)<<16),ir^=ir>>>24,ir=(ir&65535)*1540483477+(((ir>>>16)*1540483477&65535)<<16),dt=(dt&65535)*1540483477+(((dt>>>16)*1540483477&65535)<<16)^ir,Qe-=4,++Mt;switch(Qe){case 3:dt^=(ue.charCodeAt(Mt+2)&255)<<16;case 2:dt^=(ue.charCodeAt(Mt+1)&255)<<8;case 1:dt^=ue.charCodeAt(Mt)&255,dt=(dt&65535)*1540483477+(((dt>>>16)*1540483477&65535)<<16)}return dt^=dt>>>13,dt=(dt&65535)*1540483477+(((dt>>>16)*1540483477&65535)<<16),dt^=dt>>>15,dt>>>0}H.exports=j}),We=Fe,At=Fe,Yt=me;We.murmur3=At,We.murmur2=Yt;var tr=function(){this.ids=[],this.positions=[],this.indexed=!1};tr.prototype.add=function(j,ue,Re,Qe){this.ids.push(jt(j)),this.positions.push(ue,Re,Qe)},tr.prototype.getPositions=function(j){for(var ue=jt(j),Re=0,Qe=this.ids.length-1;Re<Qe;){var dt=Re+Qe>>1;this.ids[dt]>=ue?Qe=dt:Re=dt+1}for(var Mt=[];this.ids[Re]===ue;){var ir=this.positions[3*Re],Fr=this.positions[3*Re+1],Zr=this.positions[3*Re+2];Mt.push({index:ir,start:Fr,end:Zr}),Re++}return Mt},tr.serialize=function(j,ue){var Re=new Float64Array(j.ids),Qe=new Uint32Array(j.positions);return hr(Re,Qe,0,Re.length-1),ue&&ue.push(Re.buffer,Qe.buffer),{ids:Re,positions:Qe}},tr.deserialize=function(j){var ue=new tr;return ue.ids=j.ids,ue.positions=j.positions,ue.indexed=!0,ue};var Pt=Math.pow(2,53)-1;function jt(H){var j=+H;return!isNaN(j)&&j<=Pt?j:We(String(H))}function hr(H,j,ue,Re){for(;ue<Re;){for(var Qe=H[ue+Re>>1],dt=ue-1,Mt=Re+1;;){do dt++;while(H[dt]<Qe);do Mt--;while(H[Mt]>Qe);if(dt>=Mt)break;qr(H,dt,Mt),qr(j,3*dt,3*Mt),qr(j,3*dt+1,3*Mt+1),qr(j,3*dt+2,3*Mt+2)}Mt-ue<Re-Mt?(hr(H,j,ue,Mt),ue=Mt+1):(hr(H,j,Mt+1,Re),Re=Mt)}}function qr(H,j,ue){var Re=H[j];H[j]=H[ue],H[ue]=Re}Yr("FeaturePositionMap",tr);var zr=function(j,ue){this.gl=j.gl,this.location=ue},Gr=(function(H){function j(ue,Re){H.call(this,ue,Re),this.current=0}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype.set=function(Re){this.current!==Re&&(this.current=Re,this.gl.uniform1i(this.location,Re))},j})(zr),en=(function(H){function j(ue,Re){H.call(this,ue,Re),this.current=0}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype.set=function(Re){this.current!==Re&&(this.current=Re,this.gl.uniform1f(this.location,Re))},j})(zr),Xr=(function(H){function j(ue,Re){H.call(this,ue,Re),this.current=[0,0]}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype.set=function(Re){(Re[0]!==this.current[0]||Re[1]!==this.current[1])&&(this.current=Re,this.gl.uniform2f(this.location,Re[0],Re[1]))},j})(zr),Rr=(function(H){function j(ue,Re){H.call(this,ue,Re),this.current=[0,0,0]}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype.set=function(Re){(Re[0]!==this.current[0]||Re[1]!==this.current[1]||Re[2]!==this.current[2])&&(this.current=Re,this.gl.uniform3f(this.location,Re[0],Re[1],Re[2]))},j})(zr),jr=(function(H){function j(ue,Re){H.call(this,ue,Re),this.current=[0,0,0,0]}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype.set=function(Re){(Re[0]!==this.current[0]||Re[1]!==this.current[1]||Re[2]!==this.current[2]||Re[3]!==this.current[3])&&(this.current=Re,this.gl.uniform4f(this.location,Re[0],Re[1],Re[2],Re[3]))},j})(zr),Br=(function(H){function j(ue,Re){H.call(this,ue,Re),this.current=Of.transparent}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype.set=function(Re){(Re.r!==this.current.r||Re.g!==this.current.g||Re.b!==this.current.b||Re.a!==this.current.a)&&(this.current=Re,this.gl.uniform4f(this.location,Re.r,Re.g,Re.b,Re.a))},j})(zr),Bn=new Float32Array(16),ui=(function(H){function j(ue,Re){H.call(this,ue,Re),this.current=Bn}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype.set=function(Re){if(Re[12]!==this.current[12]||Re[0]!==this.current[0]){this.current=Re,this.gl.uniformMatrix4fv(this.location,!1,Re);return}for(var Qe=1;Qe<16;Qe++)if(Re[Qe]!==this.current[Qe]){this.current=Re,this.gl.uniformMatrix4fv(this.location,!1,Re);break}},j})(zr);function Ii(H){return[Xe(255*H.r,255*H.g),Xe(255*H.b,255*H.a)]}var Ga=function(j,ue,Re){this.value=j,this.uniformNames=ue.map(function(Qe){return"u_"+Qe}),this.type=Re};Ga.prototype.setUniform=function(j,ue,Re){j.set(Re.constantOr(this.value))},Ga.prototype.getBinding=function(j,ue,Re){return this.type==="color"?new Br(j,ue):new en(j,ue)};var ka=function(j,ue){this.uniformNames=ue.map(function(Re){return"u_"+Re}),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1};ka.prototype.setConstantPatternPositions=function(j,ue){this.pixelRatioFrom=ue.pixelRatio,this.pixelRatioTo=j.pixelRatio,this.patternFrom=ue.tlbr,this.patternTo=j.tlbr},ka.prototype.setUniform=function(j,ue,Re,Qe){var dt=Qe==="u_pattern_to"?this.patternTo:Qe==="u_pattern_from"?this.patternFrom:Qe==="u_pixel_ratio_to"?this.pixelRatioTo:Qe==="u_pixel_ratio_from"?this.pixelRatioFrom:null;dt&&j.set(dt)},ka.prototype.getBinding=function(j,ue,Re){return Re.substr(0,9)==="u_pattern"?new jr(j,ue):new en(j,ue)};var wa=function(j,ue,Re,Qe){this.expression=j,this.type=Re,this.maxValue=0,this.paintVertexAttributes=ue.map(function(dt){return{name:"a_"+dt,type:"Float32",components:Re==="color"?2:1,offset:0}}),this.paintVertexArray=new Qe};wa.prototype.populatePaintArray=function(j,ue,Re,Qe,dt){var Mt=this.paintVertexArray.length,ir=this.expression.evaluate(new Mf(0),ue,{},Qe,[],dt);this.paintVertexArray.resize(j),this._setPaintValue(Mt,j,ir)},wa.prototype.updatePaintArray=function(j,ue,Re,Qe){var dt=this.expression.evaluate({zoom:0},Re,Qe);this._setPaintValue(j,ue,dt)},wa.prototype._setPaintValue=function(j,ue,Re){if(this.type==="color")for(var Qe=Ii(Re),dt=j;dt<ue;dt++)this.paintVertexArray.emplace(dt,Qe[0],Qe[1]);else{for(var Mt=j;Mt<ue;Mt++)this.paintVertexArray.emplace(Mt,Re);this.maxValue=Math.max(this.maxValue,Math.abs(Re))}},wa.prototype.upload=function(j){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=j.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},wa.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()};var $a=function(j,ue,Re,Qe,dt,Mt){this.expression=j,this.uniformNames=ue.map(function(ir){return"u_"+ir+"_t"}),this.type=Re,this.useIntegerZoom=Qe,this.zoom=dt,this.maxValue=0,this.paintVertexAttributes=ue.map(function(ir){return{name:"a_"+ir,type:"Float32",components:Re==="color"?4:2,offset:0}}),this.paintVertexArray=new Mt};$a.prototype.populatePaintArray=function(j,ue,Re,Qe,dt){var Mt=this.expression.evaluate(new Mf(this.zoom),ue,{},Qe,[],dt),ir=this.expression.evaluate(new Mf(this.zoom+1),ue,{},Qe,[],dt),Fr=this.paintVertexArray.length;this.paintVertexArray.resize(j),this._setPaintValue(Fr,j,Mt,ir)},$a.prototype.updatePaintArray=function(j,ue,Re,Qe){var dt=this.expression.evaluate({zoom:this.zoom},Re,Qe),Mt=this.expression.evaluate({zoom:this.zoom+1},Re,Qe);this._setPaintValue(j,ue,dt,Mt)},$a.prototype._setPaintValue=function(j,ue,Re,Qe){if(this.type==="color")for(var dt=Ii(Re),Mt=Ii(Qe),ir=j;ir<ue;ir++)this.paintVertexArray.emplace(ir,dt[0],dt[1],Mt[0],Mt[1]);else{for(var Fr=j;Fr<ue;Fr++)this.paintVertexArray.emplace(Fr,Re,Qe);this.maxValue=Math.max(this.maxValue,Math.abs(Re),Math.abs(Qe))}},$a.prototype.upload=function(j){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=j.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},$a.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},$a.prototype.setUniform=function(j,ue){var Re=this.useIntegerZoom?Math.floor(ue.zoom):ue.zoom,Qe=g(this.expression.interpolationFactor(Re,this.zoom,this.zoom+1),0,1);j.set(Qe)},$a.prototype.getBinding=function(j,ue,Re){return new en(j,ue)};var Ja=function(j,ue,Re,Qe,dt,Mt){this.expression=j,this.type=ue,this.useIntegerZoom=Re,this.zoom=Qe,this.layerId=Mt,this.zoomInPaintVertexArray=new dt,this.zoomOutPaintVertexArray=new dt};Ja.prototype.populatePaintArray=function(j,ue,Re){var Qe=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(j),this.zoomOutPaintVertexArray.resize(j),this._setPaintValues(Qe,j,ue.patterns&&ue.patterns[this.layerId],Re)},Ja.prototype.updatePaintArray=function(j,ue,Re,Qe,dt){this._setPaintValues(j,ue,Re.patterns&&Re.patterns[this.layerId],dt)},Ja.prototype._setPaintValues=function(j,ue,Re,Qe){if(!(!Qe||!Re)){var dt=Re.min,Mt=Re.mid,ir=Re.max,Fr=Qe[dt],Zr=Qe[Mt],un=Qe[ir];if(!(!Fr||!Zr||!un))for(var Hn=j;Hn<ue;Hn++)this.zoomInPaintVertexArray.emplace(Hn,Zr.tl[0],Zr.tl[1],Zr.br[0],Zr.br[1],Fr.tl[0],Fr.tl[1],Fr.br[0],Fr.br[1],Zr.pixelRatio,Fr.pixelRatio),this.zoomOutPaintVertexArray.emplace(Hn,Zr.tl[0],Zr.tl[1],Zr.br[0],Zr.br[1],un.tl[0],un.tl[1],un.br[0],un.br[1],Zr.pixelRatio,un.pixelRatio)}},Ja.prototype.upload=function(j){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=j.createVertexBuffer(this.zoomInPaintVertexArray,ne.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=j.createVertexBuffer(this.zoomOutPaintVertexArray,ne.members,this.expression.isStateDependent))},Ja.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()};var wo=function(j,ue,Re){this.binders={},this._buffers=[];var Qe=[];for(var dt in j.paint._values)if(Re(dt)){var Mt=j.paint.get(dt);if(!(!(Mt instanceof ia)||!vh(Mt.property.specification))){var ir=Ro(dt,j.type),Fr=Mt.value,Zr=Mt.property.specification.type,un=Mt.property.useIntegerZoom,Hn=Mt.property.specification["property-type"],yi=Hn==="cross-faded"||Hn==="cross-faded-data-driven";if(Fr.kind==="constant")this.binders[dt]=yi?new ka(Fr.value,ir):new Ga(Fr.value,ir,Zr),Qe.push("/u_"+dt);else if(Fr.kind==="source"||yi){var di=Rs(dt,Zr,"source");this.binders[dt]=yi?new Ja(Fr,Zr,un,ue,di,j.id):new wa(Fr,ir,Zr,di),Qe.push("/a_"+dt)}else{var qi=Rs(dt,Zr,"composite");this.binders[dt]=new $a(Fr,ir,Zr,un,ue,qi),Qe.push("/z_"+dt)}}}this.cacheKey=Qe.sort().join("")};wo.prototype.getMaxValue=function(j){var ue=this.binders[j];return ue instanceof wa||ue instanceof $a?ue.maxValue:0},wo.prototype.populatePaintArrays=function(j,ue,Re,Qe,dt){for(var Mt in this.binders){var ir=this.binders[Mt];(ir instanceof wa||ir instanceof $a||ir instanceof Ja)&&ir.populatePaintArray(j,ue,Re,Qe,dt)}},wo.prototype.setConstantPatternPositions=function(j,ue){for(var Re in this.binders){var Qe=this.binders[Re];Qe instanceof ka&&Qe.setConstantPatternPositions(j,ue)}},wo.prototype.updatePaintArrays=function(j,ue,Re,Qe,dt){var Mt=!1;for(var ir in j)for(var Fr=ue.getPositions(ir),Zr=0,un=Fr;Zr<un.length;Zr+=1){var Hn=un[Zr],yi=Re.feature(Hn.index);for(var di in this.binders){var qi=this.binders[di];if((qi instanceof wa||qi instanceof $a||qi instanceof Ja)&&qi.expression.isStateDependent===!0){var Ia=Qe.paint.get(di);qi.expression=Ia.value,qi.updatePaintArray(Hn.start,Hn.end,yi,j[ir],dt),Mt=!0}}}return Mt},wo.prototype.defines=function(){var j=[];for(var ue in this.binders){var Re=this.binders[ue];(Re instanceof Ga||Re instanceof ka)&&j.push.apply(j,Re.uniformNames.map(function(Qe){return"#define HAS_UNIFORM_"+Qe}))}return j},wo.prototype.getBinderAttributes=function(){var j=[];for(var ue in this.binders){var Re=this.binders[ue];if(Re instanceof wa||Re instanceof $a)for(var Qe=0;Qe<Re.paintVertexAttributes.length;Qe++)j.push(Re.paintVertexAttributes[Qe].name);else if(Re instanceof Ja)for(var dt=0;dt<ne.members.length;dt++)j.push(ne.members[dt].name)}return j},wo.prototype.getBinderUniforms=function(){var j=[];for(var ue in this.binders){var Re=this.binders[ue];if(Re instanceof Ga||Re instanceof ka||Re instanceof $a)for(var Qe=0,dt=Re.uniformNames;Qe<dt.length;Qe+=1){var Mt=dt[Qe];j.push(Mt)}}return j},wo.prototype.getPaintVertexBuffers=function(){return this._buffers},wo.prototype.getUniforms=function(j,ue){var Re=[];for(var Qe in this.binders){var dt=this.binders[Qe];if(dt instanceof Ga||dt instanceof ka||dt instanceof $a)for(var Mt=0,ir=dt.uniformNames;Mt<ir.length;Mt+=1){var Fr=ir[Mt];if(ue[Fr]){var Zr=dt.getBinding(j,ue[Fr],Fr);Re.push({name:Fr,property:Qe,binding:Zr})}}}return Re},wo.prototype.setUniforms=function(j,ue,Re,Qe){for(var dt=0,Mt=ue;dt<Mt.length;dt+=1){var ir=Mt[dt],Fr=ir.name,Zr=ir.property,un=ir.binding;this.binders[Zr].setUniform(un,Qe,Re.get(Zr),Fr)}},wo.prototype.updatePaintBuffers=function(j){this._buffers=[];for(var ue in this.binders){var Re=this.binders[ue];if(j&&Re instanceof Ja){var Qe=j.fromScale===2?Re.zoomInPaintVertexBuffer:Re.zoomOutPaintVertexBuffer;Qe&&this._buffers.push(Qe)}else(Re instanceof wa||Re instanceof $a)&&Re.paintVertexBuffer&&this._buffers.push(Re.paintVertexBuffer)}},wo.prototype.upload=function(j){for(var ue in this.binders){var Re=this.binders[ue];(Re instanceof wa||Re instanceof $a||Re instanceof Ja)&&Re.upload(j)}this.updatePaintBuffers()},wo.prototype.destroy=function(){for(var j in this.binders){var ue=this.binders[j];(ue instanceof wa||ue instanceof $a||ue instanceof Ja)&&ue.destroy()}};var Ya=function(j,ue,Re){Re===void 0&&(Re=function(){return!0}),this.programConfigurations={};for(var Qe=0,dt=j;Qe<dt.length;Qe+=1){var Mt=dt[Qe];this.programConfigurations[Mt.id]=new wo(Mt,ue,Re)}this.needsUpload=!1,this._featureMap=new tr,this._bufferOffset=0};Ya.prototype.populatePaintArrays=function(j,ue,Re,Qe,dt,Mt){for(var ir in this.programConfigurations)this.programConfigurations[ir].populatePaintArrays(j,ue,Qe,dt,Mt);ue.id!==void 0&&this._featureMap.add(ue.id,Re,this._bufferOffset,j),this._bufferOffset=j,this.needsUpload=!0},Ya.prototype.updatePaintArrays=function(j,ue,Re,Qe){for(var dt=0,Mt=Re;dt<Mt.length;dt+=1){var ir=Mt[dt];this.needsUpload=this.programConfigurations[ir.id].updatePaintArrays(j,this._featureMap,ue,ir,Qe)||this.needsUpload}},Ya.prototype.get=function(j){return this.programConfigurations[j]},Ya.prototype.upload=function(j){if(this.needsUpload){for(var ue in this.programConfigurations)this.programConfigurations[ue].upload(j);this.needsUpload=!1}},Ya.prototype.destroy=function(){for(var j in this.programConfigurations)this.programConfigurations[j].destroy()};function Ro(H,j){var ue={"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 ue[H]||[H.replace(j+"-","").replace(/-/g,"_")]}function Xo(H){var j={"line-pattern":{source:ua,composite:ua},"fill-pattern":{source:ua,composite:ua},"fill-extrusion-pattern":{source:ua,composite:ua}};return j[H]}function Rs(H,j,ue){var Re={color:{source:ls,composite:jh},number:{source:cf,composite:ls}},Qe=Xo(H);return Qe&&Qe[ue]||Re[j][ue]}Yr("ConstantBinder",Ga),Yr("CrossFadedConstantBinder",ka),Yr("SourceExpressionBinder",wa),Yr("CrossFadedCompositeBinder",Ja),Yr("CompositeExpressionBinder",$a),Yr("ProgramConfiguration",wo,{omit:["_buffers"]}),Yr("ProgramConfigurationSet",Ya);var Qs=8192,cc=15,ac=Math.pow(2,cc-1)-1,yf=-ac-1;function ff(H){for(var j=Qs/H.extent,ue=H.loadGeometry(),Re=0;Re<ue.length;Re++)for(var Qe=ue[Re],dt=0;dt<Qe.length;dt++){var Mt=Qe[dt],ir=Math.round(Mt.x*j),Fr=Math.round(Mt.y*j);Mt.x=g(ir,yf,ac),Mt.y=g(Fr,yf,ac),(ir<Mt.x||ir>Mt.x+1||Fr<Mt.y||Fr>Mt.y+1)&&re("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return ue}function _f(H,j){return{type:H.type,id:H.id,properties:H.properties,geometry:j?ff(H):[]}}function bf(H,j,ue,Re,Qe){H.emplaceBack(j*2+(Re+1)/2,ue*2+(Qe+1)/2)}var hp=function(j){this.zoom=j.zoom,this.overscaling=j.overscaling,this.layers=j.layers,this.layerIds=this.layers.map(function(ue){return ue.id}),this.index=j.index,this.hasPattern=!1,this.layoutVertexArray=new Po,this.indexArray=new Jl,this.segments=new uc,this.programConfigurations=new Ya(j.layers,j.zoom),this.stateDependentLayerIds=this.layers.filter(function(ue){return ue.isStateDependent()}).map(function(ue){return ue.id})};hp.prototype.populate=function(j,ue,Re){var Qe=this.layers[0],dt=[],Mt=null;Qe.type==="circle"&&(Mt=Qe.layout.get("circle-sort-key"));for(var ir=0,Fr=j;ir<Fr.length;ir+=1){var Zr=Fr[ir],un=Zr.feature,Hn=Zr.id,yi=Zr.index,di=Zr.sourceLayerIndex,qi=this.layers[0]._featureFilter.needGeometry,Ia=_f(un,qi);if(this.layers[0]._featureFilter.filter(new Mf(this.zoom),Ia,Re)){var Do=Mt?Mt.evaluate(Ia,{},Re):void 0,ho={id:Hn,properties:un.properties,type:un.type,sourceLayerIndex:di,index:yi,geometry:qi?Ia.geometry:ff(un),patterns:{},sortKey:Do};dt.push(ho)}}Mt&&dt.sort(function(_u,Ou){return _u.sortKey-Ou.sortKey});for(var gs=0,Zo=dt;gs<Zo.length;gs+=1){var ms=Zo[gs],Is=ms,dl=Is.geometry,Xl=Is.index,Bl=Is.sourceLayerIndex,Ku=j[Xl].feature;this.addFeature(ms,dl,Xl,Re),ue.featureIndex.insert(Ku,dl,Xl,Bl,this.index)}},hp.prototype.update=function(j,ue,Re){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(j,ue,this.stateDependentLayers,Re)},hp.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},hp.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},hp.prototype.upload=function(j){this.uploaded||(this.layoutVertexBuffer=j.createVertexBuffer(this.layoutVertexArray,tc),this.indexBuffer=j.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(j),this.uploaded=!0},hp.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},hp.prototype.addFeature=function(j,ue,Re,Qe){for(var dt=0,Mt=ue;dt<Mt.length;dt+=1)for(var ir=Mt[dt],Fr=0,Zr=ir;Fr<Zr.length;Fr+=1){var un=Zr[Fr],Hn=un.x,yi=un.y;if(!(Hn<0||Hn>=Qs||yi<0||yi>=Qs)){var di=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,j.sortKey),qi=di.vertexLength;bf(this.layoutVertexArray,Hn,yi,-1,-1),bf(this.layoutVertexArray,Hn,yi,1,-1),bf(this.layoutVertexArray,Hn,yi,1,1),bf(this.layoutVertexArray,Hn,yi,-1,1),this.indexArray.emplaceBack(qi,qi+1,qi+2),this.indexArray.emplaceBack(qi,qi+3,qi+2),di.vertexLength+=4,di.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,j,Re,{},Qe)},Yr("CircleBucket",hp,{omit:["layers"]});function af(H,j){for(var ue=0;ue<H.length;ue++)if(tx(j,H[ue]))return!0;for(var Re=0;Re<j.length;Re++)if(tx(H,j[Re]))return!0;return!!Ew(H,j)}function ch(H,j,ue){return!!(tx(H,j)||A2(j,H,ue))}function Ig(H,j){if(H.length===1)return RS(j,H[0]);for(var ue=0;ue<j.length;ue++)for(var Re=j[ue],Qe=0;Qe<Re.length;Qe++)if(tx(H,Re[Qe]))return!0;for(var dt=0;dt<H.length;dt++)if(RS(j,H[dt]))return!0;for(var Mt=0;Mt<j.length;Mt++)if(Ew(H,j[Mt]))return!0;return!1}function R0(H,j,ue){for(var Re=0;Re<j.length;Re++){var Qe=j[Re];if(H.length>=3){for(var dt=0;dt<Qe.length;dt++)if(tx(H,Qe[dt]))return!0}if(Tw(H,Qe,ue))return!0}return!1}function Tw(H,j,ue){if(H.length>1){if(Ew(H,j))return!0;for(var Re=0;Re<j.length;Re++)if(A2(j[Re],H,ue))return!0}for(var Qe=0;Qe<H.length;Qe++)if(A2(H[Qe],j,ue))return!0;return!1}function Ew(H,j){if(H.length===0||j.length===0)return!1;for(var ue=0;ue<H.length-1;ue++)for(var Re=H[ue],Qe=H[ue+1],dt=0;dt<j.length-1;dt++){var Mt=j[dt],ir=j[dt+1];if(ex(Re,Qe,Mt,ir))return!0}return!1}function ex(H,j,ue,Re){return fe(H,ue,Re)!==fe(j,ue,Re)&&fe(H,j,ue)!==fe(H,j,Re)}function A2(H,j,ue){var Re=ue*ue;if(j.length===1)return H.distSqr(j[0])<Re;for(var Qe=1;Qe<j.length;Qe++){var dt=j[Qe-1],Mt=j[Qe];if(uC(H,dt,Mt)<Re)return!0}return!1}function uC(H,j,ue){var Re=j.distSqr(ue);if(Re===0)return H.distSqr(j);var Qe=((H.x-j.x)*(ue.x-j.x)+(H.y-j.y)*(ue.y-j.y))/Re;return Qe<0?H.distSqr(j):Qe>1?H.distSqr(ue):H.distSqr(ue.sub(j)._mult(Qe)._add(j))}function RS(H,j){for(var ue=!1,Re,Qe,dt,Mt=0;Mt<H.length;Mt++){Re=H[Mt];for(var ir=0,Fr=Re.length-1;ir<Re.length;Fr=ir++)Qe=Re[ir],dt=Re[Fr],Qe.y>j.y!=dt.y>j.y&&j.x<(dt.x-Qe.x)*(j.y-Qe.y)/(dt.y-Qe.y)+Qe.x&&(ue=!ue)}return ue}function tx(H,j){for(var ue=!1,Re=0,Qe=H.length-1;Re<H.length;Qe=Re++){var dt=H[Re],Mt=H[Qe];dt.y>j.y!=Mt.y>j.y&&j.x<(Mt.x-dt.x)*(j.y-dt.y)/(Mt.y-dt.y)+dt.x&&(ue=!ue)}return ue}function kS(H,j,ue,Re,Qe){for(var dt=0,Mt=H;dt<Mt.length;dt+=1){var ir=Mt[dt];if(j<=ir.x&&ue<=ir.y&&Re>=ir.x&&Qe>=ir.y)return!0}var Fr=[new v(j,ue),new v(j,Qe),new v(Re,Qe),new v(Re,ue)];if(H.length>2)for(var Zr=0,un=Fr;Zr<un.length;Zr+=1){var Hn=un[Zr];if(tx(H,Hn))return!0}for(var yi=0;yi<H.length-1;yi++){var di=H[yi],qi=H[yi+1];if(zx(di,qi,Fr))return!0}return!1}function zx(H,j,ue){var Re=ue[0],Qe=ue[2];if(H.x<Re.x&&j.x<Re.x||H.x>Qe.x&&j.x>Qe.x||H.y<Re.y&&j.y<Re.y||H.y>Qe.y&&j.y>Qe.y)return!1;var dt=fe(H,j,ue[0]);return dt!==fe(H,j,ue[1])||dt!==fe(H,j,ue[2])||dt!==fe(H,j,ue[3])}function rx(H,j,ue){var Re=j.paint.get(H).value;return Re.kind==="constant"?Re.value:ue.programConfigurations.get(j.id).getMaxValue(H)}function Aw(H){return Math.sqrt(H[0]*H[0]+H[1]*H[1])}function C2(H,j,ue,Re,Qe){if(!j[0]&&!j[1])return H;var dt=v.convert(j)._mult(Qe);ue==="viewport"&&dt._rotate(-Re);for(var Mt=[],ir=0;ir<H.length;ir++){var Fr=H[ir];Mt.push(Fr.sub(dt))}return Mt}var Cw=new qo({"circle-sort-key":new Fi(Qo.layout_circle["circle-sort-key"])}),zR=new qo({"circle-radius":new Fi(Qo.paint_circle["circle-radius"]),"circle-color":new Fi(Qo.paint_circle["circle-color"]),"circle-blur":new Fi(Qo.paint_circle["circle-blur"]),"circle-opacity":new Fi(Qo.paint_circle["circle-opacity"]),"circle-translate":new zi(Qo.paint_circle["circle-translate"]),"circle-translate-anchor":new zi(Qo.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new zi(Qo.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new zi(Qo.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Fi(Qo.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Fi(Qo.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Fi(Qo.paint_circle["circle-stroke-opacity"])}),cC={paint:zR,layout:Cw},Dy=typeof Float32Array<"u"?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var H=arguments,j=0,ue=arguments.length;ue--;)j+=H[ue]*H[ue];return Math.sqrt(j)});function fC(){var H=new Dy(4);return Dy!=Float32Array&&(H[1]=0,H[2]=0),H[0]=1,H[3]=1,H}function BR(H,j,ue){var Re=j[0],Qe=j[1],dt=j[2],Mt=j[3],ir=Math.sin(ue),Fr=Math.cos(ue);return H[0]=Re*Fr+dt*ir,H[1]=Qe*Fr+Mt*ir,H[2]=Re*-ir+dt*Fr,H[3]=Qe*-ir+Mt*Fr,H}function j1(){var H=new Dy(9);return Dy!=Float32Array&&(H[1]=0,H[2]=0,H[3]=0,H[5]=0,H[6]=0,H[7]=0),H[0]=1,H[4]=1,H[8]=1,H}function WM(H,j){var ue=Math.sin(j),Re=Math.cos(j);return H[0]=Re,H[1]=ue,H[2]=0,H[3]=-ue,H[4]=Re,H[5]=0,H[6]=0,H[7]=0,H[8]=1,H}function OI(){var H=new Dy(16);return Dy!=Float32Array&&(H[1]=0,H[2]=0,H[3]=0,H[4]=0,H[6]=0,H[7]=0,H[8]=0,H[9]=0,H[11]=0,H[12]=0,H[13]=0,H[14]=0),H[0]=1,H[5]=1,H[10]=1,H[15]=1,H}function NI(H){var j=new Dy(16);return j[0]=H[0],j[1]=H[1],j[2]=H[2],j[3]=H[3],j[4]=H[4],j[5]=H[5],j[6]=H[6],j[7]=H[7],j[8]=H[8],j[9]=H[9],j[10]=H[10],j[11]=H[11],j[12]=H[12],j[13]=H[13],j[14]=H[14],j[15]=H[15],j}function UR(H){return H[0]=1,H[1]=0,H[2]=0,H[3]=0,H[4]=0,H[5]=1,H[6]=0,H[7]=0,H[8]=0,H[9]=0,H[10]=1,H[11]=0,H[12]=0,H[13]=0,H[14]=0,H[15]=1,H}function YM(H,j){var ue=j[0],Re=j[1],Qe=j[2],dt=j[3],Mt=j[4],ir=j[5],Fr=j[6],Zr=j[7],un=j[8],Hn=j[9],yi=j[10],di=j[11],qi=j[12],Ia=j[13],Do=j[14],ho=j[15],gs=ue*ir-Re*Mt,Zo=ue*Fr-Qe*Mt,ms=ue*Zr-dt*Mt,Is=Re*Fr-Qe*ir,dl=Re*Zr-dt*ir,Xl=Qe*Zr-dt*Fr,Bl=un*Ia-Hn*qi,Ku=un*Do-yi*qi,_u=un*ho-di*qi,Ou=Hn*Do-yi*Ia,hf=Hn*ho-di*Ia,Ju=yi*ho-di*Do,oc=gs*Ju-Zo*hf+ms*Ou+Is*_u-dl*Ku+Xl*Bl;return oc?(oc=1/oc,H[0]=(ir*Ju-Fr*hf+Zr*Ou)*oc,H[1]=(Qe*hf-Re*Ju-dt*Ou)*oc,H[2]=(Ia*Xl-Do*dl+ho*Is)*oc,H[3]=(yi*dl-Hn*Xl-di*Is)*oc,H[4]=(Fr*_u-Mt*Ju-Zr*Ku)*oc,H[5]=(ue*Ju-Qe*_u+dt*Ku)*oc,H[6]=(Do*ms-qi*Xl-ho*Zo)*oc,H[7]=(un*Xl-yi*ms+di*Zo)*oc,H[8]=(Mt*hf-ir*_u+Zr*Bl)*oc,H[9]=(Re*_u-ue*hf-dt*Bl)*oc,H[10]=(qi*dl-Ia*ms+ho*gs)*oc,H[11]=(Hn*ms-un*dl-di*gs)*oc,H[12]=(ir*Ku-Mt*Ou-Fr*Bl)*oc,H[13]=(ue*Ou-Re*Ku+Qe*Bl)*oc,H[14]=(Ia*Zo-qi*Is-Do*gs)*oc,H[15]=(un*Is-Hn*Zo+yi*gs)*oc,H):null}function XM(H,j,ue){var Re=j[0],Qe=j[1],dt=j[2],Mt=j[3],ir=j[4],Fr=j[5],Zr=j[6],un=j[7],Hn=j[8],yi=j[9],di=j[10],qi=j[11],Ia=j[12],Do=j[13],ho=j[14],gs=j[15],Zo=ue[0],ms=ue[1],Is=ue[2],dl=ue[3];return H[0]=Zo*Re+ms*ir+Is*Hn+dl*Ia,H[1]=Zo*Qe+ms*Fr+Is*yi+dl*Do,H[2]=Zo*dt+ms*Zr+Is*di+dl*ho,H[3]=Zo*Mt+ms*un+Is*qi+dl*gs,Zo=ue[4],ms=ue[5],Is=ue[6],dl=ue[7],H[4]=Zo*Re+ms*ir+Is*Hn+dl*Ia,H[5]=Zo*Qe+ms*Fr+Is*yi+dl*Do,H[6]=Zo*dt+ms*Zr+Is*di+dl*ho,H[7]=Zo*Mt+ms*un+Is*qi+dl*gs,Zo=ue[8],ms=ue[9],Is=ue[10],dl=ue[11],H[8]=Zo*Re+ms*ir+Is*Hn+dl*Ia,H[9]=Zo*Qe+ms*Fr+Is*yi+dl*Do,H[10]=Zo*dt+ms*Zr+Is*di+dl*ho,H[11]=Zo*Mt+ms*un+Is*qi+dl*gs,Zo=ue[12],ms=ue[13],Is=ue[14],dl=ue[15],H[12]=Zo*Re+ms*ir+Is*Hn+dl*Ia,H[13]=Zo*Qe+ms*Fr+Is*yi+dl*Do,H[14]=Zo*dt+ms*Zr+Is*di+dl*ho,H[15]=Zo*Mt+ms*un+Is*qi+dl*gs,H}function Cm(H,j,ue){var Re=ue[0],Qe=ue[1],dt=ue[2],Mt,ir,Fr,Zr,un,Hn,yi,di,qi,Ia,Do,ho;return j===H?(H[12]=j[0]*Re+j[4]*Qe+j[8]*dt+j[12],H[13]=j[1]*Re+j[5]*Qe+j[9]*dt+j[13],H[14]=j[2]*Re+j[6]*Qe+j[10]*dt+j[14],H[15]=j[3]*Re+j[7]*Qe+j[11]*dt+j[15]):(Mt=j[0],ir=j[1],Fr=j[2],Zr=j[3],un=j[4],Hn=j[5],yi=j[6],di=j[7],qi=j[8],Ia=j[9],Do=j[10],ho=j[11],H[0]=Mt,H[1]=ir,H[2]=Fr,H[3]=Zr,H[4]=un,H[5]=Hn,H[6]=yi,H[7]=di,H[8]=qi,H[9]=Ia,H[10]=Do,H[11]=ho,H[12]=Mt*Re+un*Qe+qi*dt+j[12],H[13]=ir*Re+Hn*Qe+Ia*dt+j[13],H[14]=Fr*Re+yi*Qe+Do*dt+j[14],H[15]=Zr*Re+di*Qe+ho*dt+j[15]),H}function Bp(H,j,ue){var Re=ue[0],Qe=ue[1],dt=ue[2];return H[0]=j[0]*Re,H[1]=j[1]*Re,H[2]=j[2]*Re,H[3]=j[3]*Re,H[4]=j[4]*Qe,H[5]=j[5]*Qe,H[6]=j[6]*Qe,H[7]=j[7]*Qe,H[8]=j[8]*dt,H[9]=j[9]*dt,H[10]=j[10]*dt,H[11]=j[11]*dt,H[12]=j[12],H[13]=j[13],H[14]=j[14],H[15]=j[15],H}function nx(H,j,ue){var Re=Math.sin(ue),Qe=Math.cos(ue),dt=j[4],Mt=j[5],ir=j[6],Fr=j[7],Zr=j[8],un=j[9],Hn=j[10],yi=j[11];return j!==H&&(H[0]=j[0],H[1]=j[1],H[2]=j[2],H[3]=j[3],H[12]=j[12],H[13]=j[13],H[14]=j[14],H[15]=j[15]),H[4]=dt*Qe+Zr*Re,H[5]=Mt*Qe+un*Re,H[6]=ir*Qe+Hn*Re,H[7]=Fr*Qe+yi*Re,H[8]=Zr*Qe-dt*Re,H[9]=un*Qe-Mt*Re,H[10]=Hn*Qe-ir*Re,H[11]=yi*Qe-Fr*Re,H}function HR(H,j,ue){var Re=Math.sin(ue),Qe=Math.cos(ue),dt=j[0],Mt=j[1],ir=j[2],Fr=j[3],Zr=j[4],un=j[5],Hn=j[6],yi=j[7];return j!==H&&(H[8]=j[8],H[9]=j[9],H[10]=j[10],H[11]=j[11],H[12]=j[12],H[13]=j[13],H[14]=j[14],H[15]=j[15]),H[0]=dt*Qe+Zr*Re,H[1]=Mt*Qe+un*Re,H[2]=ir*Qe+Hn*Re,H[3]=Fr*Qe+yi*Re,H[4]=Zr*Qe-dt*Re,H[5]=un*Qe-Mt*Re,H[6]=Hn*Qe-ir*Re,H[7]=yi*Qe-Fr*Re,H}function FI(H,j,ue,Re,Qe){var dt=1/Math.tan(j/2),Mt;return H[0]=dt/ue,H[1]=0,H[2]=0,H[3]=0,H[4]=0,H[5]=dt,H[6]=0,H[7]=0,H[8]=0,H[9]=0,H[11]=-1,H[12]=0,H[13]=0,H[15]=0,Qe!=null&&Qe!==1/0?(Mt=1/(Re-Qe),H[10]=(Qe+Re)*Mt,H[14]=2*Qe*Re*Mt):(H[10]=-1,H[14]=-2*Re),H}function gv(H,j,ue,Re,Qe,dt,Mt){var ir=1/(j-ue),Fr=1/(Re-Qe),Zr=1/(dt-Mt);return H[0]=-2*ir,H[1]=0,H[2]=0,H[3]=0,H[4]=0,H[5]=-2*Fr,H[6]=0,H[7]=0,H[8]=0,H[9]=0,H[10]=2*Zr,H[11]=0,H[12]=(j+ue)*ir,H[13]=(Qe+Re)*Fr,H[14]=(Mt+dt)*Zr,H[15]=1,H}var X4=XM;function ZM(){var H=new Dy(3);return Dy!=Float32Array&&(H[0]=0,H[1]=0,H[2]=0),H}function P6(H){var j=new Dy(3);return j[0]=H[0],j[1]=H[1],j[2]=H[2],j}function Mw(H,j,ue){return H[0]=j[0]+ue[0],H[1]=j[1]+ue[1],H[2]=j[2]+ue[2],H}function KM(H,j,ue){return H[0]=j[0]-ue[0],H[1]=j[1]-ue[1],H[2]=j[2]-ue[2],H}function D6(H,j,ue){return H[0]=j[0]*ue,H[1]=j[1]*ue,H[2]=j[2]*ue,H}function Z4(H,j){var ue=j[0],Re=j[1],Qe=j[2],dt=ue*ue+Re*Re+Qe*Qe;return dt>0&&(dt=1/Math.sqrt(dt)),H[0]=j[0]*dt,H[1]=j[1]*dt,H[2]=j[2]*dt,H}function NK(H,j){return H[0]*j[0]+H[1]*j[1]+H[2]*j[2]}function FK(H,j,ue){var Re=j[0],Qe=j[1],dt=j[2],Mt=ue[0],ir=ue[1],Fr=ue[2];return H[0]=Qe*Fr-dt*ir,H[1]=dt*Mt-Re*Fr,H[2]=Re*ir-Qe*Mt,H}function zK(H,j,ue){var Re=j[0],Qe=j[1],dt=j[2];return H[0]=Re*ue[0]+Qe*ue[3]+dt*ue[6],H[1]=Re*ue[1]+Qe*ue[4]+dt*ue[7],H[2]=Re*ue[2]+Qe*ue[5]+dt*ue[8],H}var BK=KM;(function(){var H=ZM();return function(j,ue,Re,Qe,dt,Mt){var ir,Fr;for(ue||(ue=3),Re||(Re=0),Qe?Fr=Math.min(Qe*ue+Re,j.length):Fr=j.length,ir=Re;ir<Fr;ir+=ue)H[0]=j[ir],H[1]=j[ir+1],H[2]=j[ir+2],dt(H,H,Mt),j[ir]=H[0],j[ir+1]=H[1],j[ir+2]=H[2];return j}})();function UK(){var H=new Dy(4);return Dy!=Float32Array&&(H[0]=0,H[1]=0,H[2]=0,H[3]=0),H}function HK(H,j,ue){return H[0]=j[0]*ue,H[1]=j[1]*ue,H[2]=j[2]*ue,H[3]=j[3]*ue,H}function jK(H,j){return H[0]*j[0]+H[1]*j[1]+H[2]*j[2]+H[3]*j[3]}function L6(H,j,ue){var Re=j[0],Qe=j[1],dt=j[2],Mt=j[3];return H[0]=ue[0]*Re+ue[4]*Qe+ue[8]*dt+ue[12]*Mt,H[1]=ue[1]*Re+ue[5]*Qe+ue[9]*dt+ue[13]*Mt,H[2]=ue[2]*Re+ue[6]*Qe+ue[10]*dt+ue[14]*Mt,H[3]=ue[3]*Re+ue[7]*Qe+ue[11]*dt+ue[15]*Mt,H}(function(){var H=UK();return function(j,ue,Re,Qe,dt,Mt){var ir,Fr;for(ue||(ue=4),Re||(Re=0),Qe?Fr=Math.min(Qe*ue+Re,j.length):Fr=j.length,ir=Re;ir<Fr;ir+=ue)H[0]=j[ir],H[1]=j[ir+1],H[2]=j[ir+2],H[3]=j[ir+3],dt(H,H,Mt),j[ir]=H[0],j[ir+1]=H[1],j[ir+2]=H[2],j[ir+3]=H[3];return j}})();function O6(){var H=new Dy(2);return Dy!=Float32Array&&(H[0]=0,H[1]=0),H}function zI(H){var j=H[0],ue=H[1];return j*j+ue*ue}var KU=zI;(function(){var H=O6();return function(j,ue,Re,Qe,dt,Mt){var ir,Fr;for(ue||(ue=2),Re||(Re=0),Qe?Fr=Math.min(Qe*ue+Re,j.length):Fr=j.length,ir=Re;ir<Fr;ir+=ue)H[0]=j[ir],H[1]=j[ir+1],dt(H,H,Mt),j[ir]=H[0],j[ir+1]=H[1];return j}})();var HF=(function(H){function j(ue){H.call(this,ue,cC)}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype.createBucket=function(Re){return new hp(Re)},j.prototype.queryRadius=function(Re){var Qe=Re;return rx("circle-radius",this,Qe)+rx("circle-stroke-width",this,Qe)+Aw(this.paint.get("circle-translate"))},j.prototype.queryIntersectsFeature=function(Re,Qe,dt,Mt,ir,Fr,Zr,un){for(var Hn=C2(Re,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),Fr.angle,Zr),yi=this.paint.get("circle-radius").evaluate(Qe,dt),di=this.paint.get("circle-stroke-width").evaluate(Qe,dt),qi=yi+di,Ia=this.paint.get("circle-pitch-alignment")==="map",Do=Ia?Hn:VK(Hn,un),ho=Ia?qi*Zr:qi,gs=0,Zo=Mt;gs<Zo.length;gs+=1)for(var ms=Zo[gs],Is=0,dl=ms;Is<dl.length;Is+=1){var Xl=dl[Is],Bl=Ia?Xl:N6(Xl,un),Ku=ho,_u=L6([],[Xl.x,Xl.y,0,1],un);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?Ku*=_u[3]/Fr.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(Ku*=Fr.cameraToCenterDistance/_u[3]),ch(Do,Bl,Ku))return!0}return!1},j})(xs);function N6(H,j){var ue=L6([],[H.x,H.y,0,1],j);return new v(ue[0]/ue[3],ue[1]/ue[3])}function VK(H,j){return H.map(function(ue){return N6(ue,j)})}var JU=(function(H){function j(){H.apply(this,arguments)}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j})(hp);Yr("HeatmapBucket",JU,{omit:["layers"]});function jF(H,j,ue,Re){var Qe=j.width,dt=j.height;if(!Re)Re=new Uint8Array(Qe*dt*ue);else if(Re instanceof Uint8ClampedArray)Re=new Uint8Array(Re.buffer);else if(Re.length!==Qe*dt*ue)throw new RangeError("mismatched image size");return H.width=Qe,H.height=dt,H.data=Re,H}function VF(H,j,ue){var Re=j.width,Qe=j.height;if(!(Re===H.width&&Qe===H.height)){var dt=jF({},{width:Re,height:Qe},ue);F6(H,dt,{x:0,y:0},{x:0,y:0},{width:Math.min(H.width,Re),height:Math.min(H.height,Qe)},ue),H.width=Re,H.height=Qe,H.data=dt.data}}function F6(H,j,ue,Re,Qe,dt){if(Qe.width===0||Qe.height===0)return j;if(Qe.width>H.width||Qe.height>H.height||ue.x>H.width-Qe.width||ue.y>H.height-Qe.height)throw new RangeError("out of range source coordinates for image copy");if(Qe.width>j.width||Qe.height>j.height||Re.x>j.width-Qe.width||Re.y>j.height-Qe.height)throw new RangeError("out of range destination coordinates for image copy");for(var Mt=H.data,ir=j.data,Fr=0;Fr<Qe.height;Fr++)for(var Zr=((ue.y+Fr)*H.width+ue.x)*dt,un=((Re.y+Fr)*j.width+Re.x)*dt,Hn=0;Hn<Qe.width*dt;Hn++)ir[un+Hn]=Mt[Zr+Hn];return j}var Ly=function(j,ue){jF(this,j,1,ue)};Ly.prototype.resize=function(j){VF(this,j,1)},Ly.prototype.clone=function(){return new Ly({width:this.width,height:this.height},new Uint8Array(this.data))},Ly.copy=function(j,ue,Re,Qe,dt){F6(j,ue,Re,Qe,dt,1)};var vb=function(j,ue){jF(this,j,4,ue)};vb.prototype.resize=function(j){VF(this,j,4)},vb.prototype.replace=function(j,ue){ue?this.data.set(j):j instanceof Uint8ClampedArray?this.data=new Uint8Array(j.buffer):this.data=j},vb.prototype.clone=function(){return new vb({width:this.width,height:this.height},new Uint8Array(this.data))},vb.copy=function(j,ue,Re,Qe,dt){F6(j,ue,Re,Qe,dt,4)},Yr("AlphaImage",Ly),Yr("RGBAImage",vb);var QU=new qo({"heatmap-radius":new Fi(Qo.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Fi(Qo.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new zi(Qo.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Eo(Qo.paint_heatmap["heatmap-color"]),"heatmap-opacity":new zi(Qo.paint_heatmap["heatmap-opacity"])}),JM={paint:QU};function BI(H){var j={},ue=H.resolution||256,Re=H.clips?H.clips.length:1,Qe=H.image||new vb({width:ue,height:Re}),dt=function(gs,Zo,ms){j[H.evaluationKey]=ms;var Is=H.expression.evaluate(j);Qe.data[gs+Zo+0]=Math.floor(Is.r*255/Is.a),Qe.data[gs+Zo+1]=Math.floor(Is.g*255/Is.a),Qe.data[gs+Zo+2]=Math.floor(Is.b*255/Is.a),Qe.data[gs+Zo+3]=Math.floor(Is.a*255)};if(H.clips)for(var Zr=0,un=0;Zr<Re;++Zr,un+=ue*4)for(var Hn=0,yi=0;Hn<ue;Hn++,yi+=4){var di=Hn/(ue-1),qi=H.clips[Zr],Ia=qi.start,Do=qi.end,ho=Ia*(1-di)+Do*di;dt(un,yi,ho)}else for(var Mt=0,ir=0;Mt<ue;Mt++,ir+=4){var Fr=Mt/(ue-1);dt(0,ir,Fr)}return Qe}var K4=(function(H){function j(ue){H.call(this,ue,JM),this._updateColorRamp()}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype.createBucket=function(Re){return new JU(Re)},j.prototype._handleSpecialPaintPropertyUpdate=function(Re){Re==="heatmap-color"&&this._updateColorRamp()},j.prototype._updateColorRamp=function(){var Re=this._transitionablePaint._values["heatmap-color"].value.expression;this.colorRamp=BI({expression:Re,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null},j.prototype.resize=function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)},j.prototype.queryRadius=function(){return 0},j.prototype.queryIntersectsFeature=function(){return!1},j.prototype.hasOffscreenPass=function(){return this.paint.get("heatmap-opacity")!==0&&this.visibility!=="none"},j})(xs),UI=new qo({"hillshade-illumination-direction":new zi(Qo.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new zi(Qo.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new zi(Qo.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new zi(Qo.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new zi(Qo.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new zi(Qo.paint_hillshade["hillshade-accent-color"])}),z6={paint:UI},B6=(function(H){function j(ue){H.call(this,ue,z6)}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype.hasOffscreenPass=function(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"},j})(xs),qK=so([{name:"a_pos",components:2,type:"Int16"}],4),GK=qK.members,U6=H6,eH=H6;function H6(H,j,ue){ue=ue||2;var Re=j&&j.length,Qe=Re?j[0]*ue:H.length,dt=qF(H,0,Qe,ue,!0),Mt=[];if(!dt||dt.next===dt.prev)return Mt;var ir,Fr,Zr,un,Hn,yi,di;if(Re&&(dt=rH(H,j,dt,ue)),H.length>80*ue){ir=Zr=H[0],Fr=un=H[1];for(var qi=ue;qi<Qe;qi+=ue)Hn=H[qi],yi=H[qi+1],Hn<ir&&(ir=Hn),yi<Fr&&(Fr=yi),Hn>Zr&&(Zr=Hn),yi>un&&(un=yi);di=Math.max(Zr-ir,un-Fr),di=di!==0?1/di:0}return jR(dt,Mt,ue,ir,Fr,di),Mt}function qF(H,j,ue,Re,Qe){var dt,Mt;if(Qe===ZF(H,j,ue,Re)>0)for(dt=j;dt<ue;dt+=Re)Mt=iH(dt,H[dt],H[dt+1],Mt);else for(dt=ue-Re;dt>=j;dt-=Re)Mt=iH(dt,H[dt],H[dt+1],Mt);return Mt&&HI(Mt,Mt.next)&&(tD(Mt),Mt=Mt.next),Mt}function dC(H,j){if(!H)return H;j||(j=H);var ue=H,Re;do if(Re=!1,!ue.steiner&&(HI(ue,ue.next)||Jg(ue.prev,ue,ue.next)===0)){if(tD(ue),ue=j=ue.prev,ue===ue.next)break;Re=!0}else ue=ue.next;while(Re||ue!==j);return j}function jR(H,j,ue,Re,Qe,dt,Mt){if(H){!Mt&&dt&&$F(H,Re,Qe,dt);for(var ir=H,Fr,Zr;H.prev!==H.next;){if(Fr=H.prev,Zr=H.next,dt?$K(H,Re,Qe,dt):GF(H)){j.push(Fr.i/ue),j.push(H.i/ue),j.push(Zr.i/ue),tD(H),H=Zr.next,ir=Zr.next;continue}if(H=Zr,H===ir){Mt?Mt===1?(H=WK(dC(H),j,ue),jR(H,j,ue,Re,Qe,dt,2)):Mt===2&&tH(H,j,ue,Re,Qe,dt):jR(dC(H),j,ue,Re,Qe,dt,1);break}}}}function GF(H){var j=H.prev,ue=H,Re=H.next;if(Jg(j,ue,Re)>=0)return!1;for(var Qe=H.next.next;Qe!==H.prev;){if(e5(j.x,j.y,ue.x,ue.y,Re.x,Re.y,Qe.x,Qe.y)&&Jg(Qe.prev,Qe,Qe.next)>=0)return!1;Qe=Qe.next}return!0}function $K(H,j,ue,Re){var Qe=H.prev,dt=H,Mt=H.next;if(Jg(Qe,dt,Mt)>=0)return!1;for(var ir=Qe.x<dt.x?Qe.x<Mt.x?Qe.x:Mt.x:dt.x<Mt.x?dt.x:Mt.x,Fr=Qe.y<dt.y?Qe.y<Mt.y?Qe.y:Mt.y:dt.y<Mt.y?dt.y:Mt.y,Zr=Qe.x>dt.x?Qe.x>Mt.x?Qe.x:Mt.x:dt.x>Mt.x?dt.x:Mt.x,un=Qe.y>dt.y?Qe.y>Mt.y?Qe.y:Mt.y:dt.y>Mt.y?dt.y:Mt.y,Hn=WF(ir,Fr,j,ue,Re),yi=WF(Zr,un,j,ue,Re),di=H.prevZ,qi=H.nextZ;di&&di.z>=Hn&&qi&&qi.z<=yi;){if(di!==H.prev&&di!==H.next&&e5(Qe.x,Qe.y,dt.x,dt.y,Mt.x,Mt.y,di.x,di.y)&&Jg(di.prev,di,di.next)>=0||(di=di.prevZ,qi!==H.prev&&qi!==H.next&&e5(Qe.x,Qe.y,dt.x,dt.y,Mt.x,Mt.y,qi.x,qi.y)&&Jg(qi.prev,qi,qi.next)>=0))return!1;qi=qi.nextZ}for(;di&&di.z>=Hn;){if(di!==H.prev&&di!==H.next&&e5(Qe.x,Qe.y,dt.x,dt.y,Mt.x,Mt.y,di.x,di.y)&&Jg(di.prev,di,di.next)>=0)return!1;di=di.prevZ}for(;qi&&qi.z<=yi;){if(qi!==H.prev&&qi!==H.next&&e5(Qe.x,Qe.y,dt.x,dt.y,Mt.x,Mt.y,qi.x,qi.y)&&Jg(qi.prev,qi,qi.next)>=0)return!1;qi=qi.nextZ}return!0}function WK(H,j,ue){var Re=H;do{var Qe=Re.prev,dt=Re.next.next;!HI(Qe,dt)&&VR(Qe,Re,Re.next,dt)&&jI(Qe,dt)&&jI(dt,Qe)&&(j.push(Qe.i/ue),j.push(Re.i/ue),j.push(dt.i/ue),tD(Re),tD(Re.next),Re=H=dt),Re=Re.next}while(Re!==H);return dC(Re)}function tH(H,j,ue,Re,Qe,dt){var Mt=H;do{for(var ir=Mt.next.next;ir!==Mt.prev;){if(Mt.i!==ir.i&&XK(Mt,ir)){var Fr=XF(Mt,ir);Mt=dC(Mt,Mt.next),Fr=dC(Fr,Fr.next),jR(Mt,j,ue,Re,Qe,dt),jR(Fr,j,ue,Re,Qe,dt);return}ir=ir.next}Mt=Mt.next}while(Mt!==H)}function rH(H,j,ue,Re){var Qe=[],dt,Mt,ir,Fr,Zr;for(dt=0,Mt=j.length;dt<Mt;dt++)ir=j[dt]*Re,Fr=dt<Mt-1?j[dt+1]*Re:H.length,Zr=qF(H,ir,Fr,Re,!1),Zr===Zr.next&&(Zr.steiner=!0),Qe.push(j6(Zr));for(Qe.sort(J4),dt=0;dt<Qe.length;dt++)S3(Qe[dt],ue),ue=dC(ue,ue.next);return ue}function J4(H,j){return H.x-j.x}function S3(H,j){if(j=QM(H,j),j){var ue=XF(j,H);dC(j,j.next),dC(ue,ue.next)}}function QM(H,j){var ue=j,Re=H.x,Qe=H.y,dt=-1/0,Mt;do{if(Qe<=ue.y&&Qe>=ue.next.y&&ue.next.y!==ue.y){var ir=ue.x+(Qe-ue.y)*(ue.next.x-ue.x)/(ue.next.y-ue.y);if(ir<=Re&&ir>dt){if(dt=ir,ir===Re){if(Qe===ue.y)return ue;if(Qe===ue.next.y)return ue.next}Mt=ue.x<ue.next.x?ue:ue.next}}ue=ue.next}while(ue!==j);if(!Mt)return null;if(Re===dt)return Mt;var Fr=Mt,Zr=Mt.x,un=Mt.y,Hn=1/0,yi;ue=Mt;do Re>=ue.x&&ue.x>=Zr&&Re!==ue.x&&e5(Qe<un?Re:dt,Qe,Zr,un,Qe<un?dt:Re,Qe,ue.x,ue.y)&&(yi=Math.abs(Qe-ue.y)/(Re-ue.x),jI(ue,H)&&(yi<Hn||yi===Hn&&(ue.x>Mt.x||ue.x===Mt.x&&nH(Mt,ue)))&&(Mt=ue,Hn=yi)),ue=ue.next;while(ue!==Fr);return Mt}function nH(H,j){return Jg(H.prev,H,j.prev)<0&&Jg(j.next,H,H.next)<0}function $F(H,j,ue,Re){var Qe=H;do Qe.z===null&&(Qe.z=WF(Qe.x,Qe.y,j,ue,Re)),Qe.prevZ=Qe.prev,Qe.nextZ=Qe.next,Qe=Qe.next;while(Qe!==H);Qe.prevZ.nextZ=null,Qe.prevZ=null,YK(Qe)}function YK(H){var j,ue,Re,Qe,dt,Mt,ir,Fr,Zr=1;do{for(ue=H,H=null,dt=null,Mt=0;ue;){for(Mt++,Re=ue,ir=0,j=0;j<Zr&&(ir++,Re=Re.nextZ,!!Re);j++);for(Fr=Zr;ir>0||Fr>0&&Re;)ir!==0&&(Fr===0||!Re||ue.z<=Re.z)?(Qe=ue,ue=ue.nextZ,ir--):(Qe=Re,Re=Re.nextZ,Fr--),dt?dt.nextZ=Qe:H=Qe,Qe.prevZ=dt,dt=Qe;ue=Re}dt.nextZ=null,Zr*=2}while(Mt>1);return H}function WF(H,j,ue,Re,Qe){return H=32767*(H-ue)*Qe,j=32767*(j-Re)*Qe,H=(H|H<<8)&16711935,H=(H|H<<4)&252645135,H=(H|H<<2)&858993459,H=(H|H<<1)&1431655765,j=(j|j<<8)&16711935,j=(j|j<<4)&252645135,j=(j|j<<2)&858993459,j=(j|j<<1)&1431655765,H|j<<1}function j6(H){var j=H,ue=H;do(j.x<ue.x||j.x===ue.x&&j.y<ue.y)&&(ue=j),j=j.next;while(j!==H);return ue}function e5(H,j,ue,Re,Qe,dt,Mt,ir){return(Qe-Mt)*(j-ir)-(H-Mt)*(dt-ir)>=0&&(H-Mt)*(Re-ir)-(ue-Mt)*(j-ir)>=0&&(ue-Mt)*(dt-ir)-(Qe-Mt)*(Re-ir)>=0}function XK(H,j){return H.next.i!==j.i&&H.prev.i!==j.i&&!YF(H,j)&&(jI(H,j)&&jI(j,H)&&V6(H,j)&&(Jg(H.prev,H,j.prev)||Jg(H,j.prev,j))||HI(H,j)&&Jg(H.prev,H,H.next)>0&&Jg(j.prev,j,j.next)>0)}function Jg(H,j,ue){return(j.y-H.y)*(ue.x-j.x)-(j.x-H.x)*(ue.y-j.y)}function HI(H,j){return H.x===j.x&&H.y===j.y}function VR(H,j,ue,Re){var Qe=eD(Jg(H,j,ue)),dt=eD(Jg(H,j,Re)),Mt=eD(Jg(ue,Re,H)),ir=eD(Jg(ue,Re,j));return!!(Qe!==dt&&Mt!==ir||Qe===0&&Q4(H,ue,j)||dt===0&&Q4(H,Re,j)||Mt===0&&Q4(ue,H,Re)||ir===0&&Q4(ue,j,Re))}function Q4(H,j,ue){return j.x<=Math.max(H.x,ue.x)&&j.x>=Math.min(H.x,ue.x)&&j.y<=Math.max(H.y,ue.y)&&j.y>=Math.min(H.y,ue.y)}function eD(H){return H>0?1:H<0?-1:0}function YF(H,j){var ue=H;do{if(ue.i!==H.i&&ue.next.i!==H.i&&ue.i!==j.i&&ue.next.i!==j.i&&VR(ue,ue.next,H,j))return!0;ue=ue.next}while(ue!==H);return!1}function jI(H,j){return Jg(H.prev,H,H.next)<0?Jg(H,j,H.next)>=0&&Jg(H,H.prev,j)>=0:Jg(H,j,H.prev)<0||Jg(H,H.next,j)<0}function V6(H,j){var ue=H,Re=!1,Qe=(H.x+j.x)/2,dt=(H.y+j.y)/2;do ue.y>dt!=ue.next.y>dt&&ue.next.y!==ue.y&&Qe<(ue.next.x-ue.x)*(dt-ue.y)/(ue.next.y-ue.y)+ue.x&&(Re=!Re),ue=ue.next;while(ue!==H);return Re}function XF(H,j){var ue=new q6(H.i,H.x,H.y),Re=new q6(j.i,j.x,j.y),Qe=H.next,dt=j.prev;return H.next=j,j.prev=H,ue.next=Qe,Qe.prev=ue,Re.next=ue,ue.prev=Re,dt.next=Re,Re.prev=dt,Re}function iH(H,j,ue,Re){var Qe=new q6(H,j,ue);return Re?(Qe.next=Re.next,Qe.prev=Re,Re.next.prev=Qe,Re.next=Qe):(Qe.prev=Qe,Qe.next=Qe),Qe}function tD(H){H.next.prev=H.prev,H.prev.next=H.next,H.prevZ&&(H.prevZ.nextZ=H.nextZ),H.nextZ&&(H.nextZ.prevZ=H.prevZ)}function q6(H,j,ue){this.i=H,this.x=j,this.y=ue,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}H6.deviation=function(H,j,ue,Re){var Qe=j&&j.length,dt=Qe?j[0]*ue:H.length,Mt=Math.abs(ZF(H,0,dt,ue));if(Qe)for(var ir=0,Fr=j.length;ir<Fr;ir++){var Zr=j[ir]*ue,un=ir<Fr-1?j[ir+1]*ue:H.length;Mt-=Math.abs(ZF(H,Zr,un,ue))}var Hn=0;for(ir=0;ir<Re.length;ir+=3){var yi=Re[ir]*ue,di=Re[ir+1]*ue,qi=Re[ir+2]*ue;Hn+=Math.abs((H[yi]-H[qi])*(H[di+1]-H[yi+1])-(H[yi]-H[di])*(H[qi+1]-H[yi+1]))}return Mt===0&&Hn===0?0:Math.abs((Hn-Mt)/Mt)};function ZF(H,j,ue,Re){for(var Qe=0,dt=j,Mt=ue-Re;dt<ue;dt+=Re)Qe+=(H[Mt]-H[dt])*(H[dt+1]+H[Mt+1]),Mt=dt;return Qe}H6.flatten=function(H){for(var j=H[0][0].length,ue={vertices:[],holes:[],dimensions:j},Re=0,Qe=0;Qe<H.length;Qe++){for(var dt=0;dt<H[Qe].length;dt++)for(var Mt=0;Mt<j;Mt++)ue.vertices.push(H[Qe][dt][Mt]);Qe>0&&(Re+=H[Qe-1].length,ue.holes.push(Re))}return ue},U6.default=eH;function ZK(H,j,ue,Re,Qe){aH(H,j,ue,Re||H.length-1,Qe||KF)}function aH(H,j,ue,Re,Qe){for(;Re>ue;){if(Re-ue>600){var dt=Re-ue+1,Mt=j-ue+1,ir=Math.log(dt),Fr=.5*Math.exp(2*ir/3),Zr=.5*Math.sqrt(ir*Fr*(dt-Fr)/dt)*(Mt-dt/2<0?-1:1),un=Math.max(ue,Math.floor(j-Mt*Fr/dt+Zr)),Hn=Math.min(Re,Math.floor(j+(dt-Mt)*Fr/dt+Zr));aH(H,j,un,Hn,Qe)}var yi=H[j],di=ue,qi=Re;for(rD(H,ue,j),Qe(H[Re],yi)>0&&rD(H,ue,Re);di<qi;){for(rD(H,di,qi),di++,qi--;Qe(H[di],yi)<0;)di++;for(;Qe(H[qi],yi)>0;)qi--}Qe(H[ue],yi)===0?rD(H,ue,qi):(qi++,rD(H,qi,Re)),qi<=j&&(ue=qi+1),j<=qi&&(Re=qi-1)}}function rD(H,j,ue){var Re=H[j];H[j]=H[ue],H[ue]=Re}function KF(H,j){return H<j?-1:H>j?1:0}function T3(H,j){var ue=H.length;if(ue<=1)return[H];for(var Re=[],Qe,dt,Mt=0;Mt<ue;Mt++){var ir=we(H[Mt]);ir!==0&&(H[Mt].area=Math.abs(ir),dt===void 0&&(dt=ir<0),dt===ir<0?(Qe&&Re.push(Qe),Qe=[H[Mt]]):Qe.push(H[Mt]))}if(Qe&&Re.push(Qe),j>1)for(var Fr=0;Fr<Re.length;Fr++)Re[Fr].length<=j||(ZK(Re[Fr],j,1,Re[Fr].length-1,oH),Re[Fr]=Re[Fr].slice(0,j));return Re}function oH(H,j){return j.area-H.area}function G6(H,j,ue){for(var Re=ue.patternDependencies,Qe=!1,dt=0,Mt=j;dt<Mt.length;dt+=1){var ir=Mt[dt],Fr=ir.paint.get(H+"-pattern");Fr.isConstant()||(Qe=!0);var Zr=Fr.constantOr(null);Zr&&(Qe=!0,Re[Zr.to]=!0,Re[Zr.from]=!0)}return Qe}function $6(H,j,ue,Re,Qe){for(var dt=Qe.patternDependencies,Mt=0,ir=j;Mt<ir.length;Mt+=1){var Fr=ir[Mt],Zr=Fr.paint.get(H+"-pattern"),un=Zr.value;if(un.kind!=="constant"){var Hn=un.evaluate({zoom:Re-1},ue,{},Qe.availableImages),yi=un.evaluate({zoom:Re},ue,{},Qe.availableImages),di=un.evaluate({zoom:Re+1},ue,{},Qe.availableImages);Hn=Hn&&Hn.name?Hn.name:Hn,yi=yi&&yi.name?yi.name:yi,di=di&&di.name?di.name:di,dt[Hn]=!0,dt[yi]=!0,dt[di]=!0,ue.patterns[Fr.id]={min:Hn,mid:yi,max:di}}}return ue}var sH=500,IS=function(j){this.zoom=j.zoom,this.overscaling=j.overscaling,this.layers=j.layers,this.layerIds=this.layers.map(function(ue){return ue.id}),this.index=j.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Po,this.indexArray=new Jl,this.indexArray2=new Wc,this.programConfigurations=new Ya(j.layers,j.zoom),this.segments=new uc,this.segments2=new uc,this.stateDependentLayerIds=this.layers.filter(function(ue){return ue.isStateDependent()}).map(function(ue){return ue.id})};IS.prototype.populate=function(j,ue,Re){this.hasPattern=G6("fill",this.layers,ue);for(var Qe=this.layers[0].layout.get("fill-sort-key"),dt=[],Mt=0,ir=j;Mt<ir.length;Mt+=1){var Fr=ir[Mt],Zr=Fr.feature,un=Fr.id,Hn=Fr.index,yi=Fr.sourceLayerIndex,di=this.layers[0]._featureFilter.needGeometry,qi=_f(Zr,di);if(this.layers[0]._featureFilter.filter(new Mf(this.zoom),qi,Re)){var Ia=Qe?Qe.evaluate(qi,{},Re,ue.availableImages):void 0,Do={id:un,properties:Zr.properties,type:Zr.type,sourceLayerIndex:yi,index:Hn,geometry:di?qi.geometry:ff(Zr),patterns:{},sortKey:Ia};dt.push(Do)}}Qe&&dt.sort(function(_u,Ou){return _u.sortKey-Ou.sortKey});for(var ho=0,gs=dt;ho<gs.length;ho+=1){var Zo=gs[ho],ms=Zo,Is=ms.geometry,dl=ms.index,Xl=ms.sourceLayerIndex;if(this.hasPattern){var Bl=$6("fill",this.layers,Zo,this.zoom,ue);this.patternFeatures.push(Bl)}else this.addFeature(Zo,Is,dl,Re,{});var Ku=j[dl].feature;ue.featureIndex.insert(Ku,Is,dl,Xl,this.index)}},IS.prototype.update=function(j,ue,Re){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(j,ue,this.stateDependentLayers,Re)},IS.prototype.addFeatures=function(j,ue,Re){for(var Qe=0,dt=this.patternFeatures;Qe<dt.length;Qe+=1){var Mt=dt[Qe];this.addFeature(Mt,Mt.geometry,Mt.index,ue,Re)}},IS.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},IS.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},IS.prototype.upload=function(j){this.uploaded||(this.layoutVertexBuffer=j.createVertexBuffer(this.layoutVertexArray,GK),this.indexBuffer=j.createIndexBuffer(this.indexArray),this.indexBuffer2=j.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(j),this.uploaded=!0},IS.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},IS.prototype.addFeature=function(j,ue,Re,Qe,dt){for(var Mt=0,ir=T3(ue,sH);Mt<ir.length;Mt+=1){for(var Fr=ir[Mt],Zr=0,un=0,Hn=Fr;un<Hn.length;un+=1){var yi=Hn[un];Zr+=yi.length}for(var di=this.segments.prepareSegment(Zr,this.layoutVertexArray,this.indexArray),qi=di.vertexLength,Ia=[],Do=[],ho=0,gs=Fr;ho<gs.length;ho+=1){var Zo=gs[ho];if(Zo.length!==0){Zo!==Fr[0]&&Do.push(Ia.length/2);var ms=this.segments2.prepareSegment(Zo.length,this.layoutVertexArray,this.indexArray2),Is=ms.vertexLength;this.layoutVertexArray.emplaceBack(Zo[0].x,Zo[0].y),this.indexArray2.emplaceBack(Is+Zo.length-1,Is),Ia.push(Zo[0].x),Ia.push(Zo[0].y);for(var dl=1;dl<Zo.length;dl++)this.layoutVertexArray.emplaceBack(Zo[dl].x,Zo[dl].y),this.indexArray2.emplaceBack(Is+dl-1,Is+dl),Ia.push(Zo[dl].x),Ia.push(Zo[dl].y);ms.vertexLength+=Zo.length,ms.primitiveLength+=Zo.length}}for(var Xl=U6(Ia,Do),Bl=0;Bl<Xl.length;Bl+=3)this.indexArray.emplaceBack(qi+Xl[Bl],qi+Xl[Bl+1],qi+Xl[Bl+2]);di.vertexLength+=Zr,di.primitiveLength+=Xl.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,j,Re,dt,Qe)},Yr("FillBucket",IS,{omit:["layers","patternFeatures"]});var JF=new qo({"fill-sort-key":new Fi(Qo.layout_fill["fill-sort-key"])}),nD=new qo({"fill-antialias":new zi(Qo.paint_fill["fill-antialias"]),"fill-opacity":new Fi(Qo.paint_fill["fill-opacity"]),"fill-color":new Fi(Qo.paint_fill["fill-color"]),"fill-outline-color":new Fi(Qo.paint_fill["fill-outline-color"]),"fill-translate":new zi(Qo.paint_fill["fill-translate"]),"fill-translate-anchor":new zi(Qo.paint_fill["fill-translate-anchor"]),"fill-pattern":new Ao(Qo.paint_fill["fill-pattern"])}),lH={paint:nD,layout:JF},QF=(function(H){function j(ue){H.call(this,ue,lH)}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype.recalculate=function(Re,Qe){H.prototype.recalculate.call(this,Re,Qe);var dt=this.paint._values["fill-outline-color"];dt.value.kind==="constant"&&dt.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},j.prototype.createBucket=function(Re){return new IS(Re)},j.prototype.queryRadius=function(){return Aw(this.paint.get("fill-translate"))},j.prototype.queryIntersectsFeature=function(Re,Qe,dt,Mt,ir,Fr,Zr){var un=C2(Re,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),Fr.angle,Zr);return Ig(un,Mt)},j.prototype.isTileClipped=function(){return!0},j})(xs),uH=so([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),M2=uH.members,VI=qR;function qR(H,j,ue,Re,Qe){this.properties={},this.extent=ue,this.type=0,this._pbf=H,this._geometry=-1,this._keys=Re,this._values=Qe,H.readFields(cH,this,j)}function cH(H,j,ue){H==1?j.id=ue.readVarint():H==2?fH(ue,j):H==3?j.type=ue.readVarint():H==4&&(j._geometry=ue.pos)}function fH(H,j){for(var ue=H.readVarint()+H.pos;H.pos<ue;){var Re=j._keys[H.readVarint()],Qe=j._values[H.readVarint()];j.properties[Re]=Qe}}qR.types=["Unknown","Point","LineString","Polygon"],qR.prototype.loadGeometry=function(){var H=this._pbf;H.pos=this._geometry;for(var j=H.readVarint()+H.pos,ue=1,Re=0,Qe=0,dt=0,Mt=[],ir;H.pos<j;){if(Re<=0){var Fr=H.readVarint();ue=Fr&7,Re=Fr>>3}if(Re--,ue===1||ue===2)Qe+=H.readSVarint(),dt+=H.readSVarint(),ue===1&&(ir&&Mt.push(ir),ir=[]),ir.push(new v(Qe,dt));else if(ue===7)ir&&ir.push(ir[0].clone());else throw new Error("unknown command "+ue)}return ir&&Mt.push(ir),Mt},qR.prototype.bbox=function(){var H=this._pbf;H.pos=this._geometry;for(var j=H.readVarint()+H.pos,ue=1,Re=0,Qe=0,dt=0,Mt=1/0,ir=-1/0,Fr=1/0,Zr=-1/0;H.pos<j;){if(Re<=0){var un=H.readVarint();ue=un&7,Re=un>>3}if(Re--,ue===1||ue===2)Qe+=H.readSVarint(),dt+=H.readSVarint(),Qe<Mt&&(Mt=Qe),Qe>ir&&(ir=Qe),dt<Fr&&(Fr=dt),dt>Zr&&(Zr=dt);else if(ue!==7)throw new Error("unknown command "+ue)}return[Mt,Fr,ir,Zr]},qR.prototype.toGeoJSON=function(H,j,ue){var Re=this.extent*Math.pow(2,ue),Qe=this.extent*H,dt=this.extent*j,Mt=this.loadGeometry(),ir=qR.types[this.type],Fr,Zr;function un(di){for(var qi=0;qi<di.length;qi++){var Ia=di[qi],Do=180-(Ia.y+dt)*360/Re;di[qi]=[(Ia.x+Qe)*360/Re-180,360/Math.PI*Math.atan(Math.exp(Do*Math.PI/180))-90]}}switch(this.type){case 1:var Hn=[];for(Fr=0;Fr<Mt.length;Fr++)Hn[Fr]=Mt[Fr][0];Mt=Hn,un(Mt);break;case 2:for(Fr=0;Fr<Mt.length;Fr++)un(Mt[Fr]);break;case 3:for(Mt=dH(Mt),Fr=0;Fr<Mt.length;Fr++)for(Zr=0;Zr<Mt[Fr].length;Zr++)un(Mt[Fr][Zr]);break}Mt.length===1?Mt=Mt[0]:ir="Multi"+ir;var yi={type:"Feature",geometry:{type:ir,coordinates:Mt},properties:this.properties};return"id"in this&&(yi.id=this.id),yi};function dH(H){var j=H.length;if(j<=1)return[H];for(var ue=[],Re,Qe,dt=0;dt<j;dt++){var Mt=hH(H[dt]);Mt!==0&&(Qe===void 0&&(Qe=Mt<0),Qe===Mt<0?(Re&&ue.push(Re),Re=[H[dt]]):Re.push(H[dt]))}return Re&&ue.push(Re),ue}function hH(H){for(var j=0,ue=0,Re=H.length,Qe=Re-1,dt,Mt;ue<Re;Qe=ue++)dt=H[ue],Mt=H[Qe],j+=(Mt.x-dt.x)*(dt.y+Mt.y);return j}var e7=pH;function pH(H,j){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=H,this._keys=[],this._values=[],this._features=[],H.readFields(vH,this,j),this.length=this._features.length}function vH(H,j,ue){H===15?j.version=ue.readVarint():H===1?j.name=ue.readString():H===5?j.extent=ue.readVarint():H===2?j._features.push(ue.pos):H===3?j._keys.push(ue.readString()):H===4&&j._values.push(t5(ue))}function t5(H){for(var j=null,ue=H.readVarint()+H.pos;H.pos<ue;){var Re=H.readVarint()>>3;j=Re===1?H.readString():Re===2?H.readFloat():Re===3?H.readDouble():Re===4?H.readVarint64():Re===5?H.readVarint():Re===6?H.readSVarint():Re===7?H.readBoolean():null}return j}pH.prototype.feature=function(H){if(H<0||H>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[H];var j=this._pbf.readVarint()+this._pbf.pos;return new VI(this._pbf,j,this.extent,this._keys,this._values)};var mH=gH;function gH(H,j){this.layers=H.readFields(yH,{},j)}function yH(H,j,ue){if(H===3){var Re=new e7(ue,ue.readVarint()+ue.pos);Re.length&&(j[Re.name]=Re)}}var bH=mH,KK=VI,JK=e7,GR={VectorTile:bH,VectorTileFeature:KK,VectorTileLayer:JK},qI=GR.VectorTileFeature.types,xH=500,GI=Math.pow(2,13);function $I(H,j,ue,Re,Qe,dt,Mt,ir){H.emplaceBack(j,ue,Math.floor(Re*GI)*2+Mt,Qe*GI*2,dt*GI*2,Math.round(ir))}var Rw=function(j){this.zoom=j.zoom,this.overscaling=j.overscaling,this.layers=j.layers,this.layerIds=this.layers.map(function(ue){return ue.id}),this.index=j.index,this.hasPattern=!1,this.layoutVertexArray=new Ha,this.indexArray=new Jl,this.programConfigurations=new Ya(j.layers,j.zoom),this.segments=new uc,this.stateDependentLayerIds=this.layers.filter(function(ue){return ue.isStateDependent()}).map(function(ue){return ue.id})};Rw.prototype.populate=function(j,ue,Re){this.features=[],this.hasPattern=G6("fill-extrusion",this.layers,ue);for(var Qe=0,dt=j;Qe<dt.length;Qe+=1){var Mt=dt[Qe],ir=Mt.feature,Fr=Mt.id,Zr=Mt.index,un=Mt.sourceLayerIndex,Hn=this.layers[0]._featureFilter.needGeometry,yi=_f(ir,Hn);if(this.layers[0]._featureFilter.filter(new Mf(this.zoom),yi,Re)){var di={id:Fr,sourceLayerIndex:un,index:Zr,geometry:Hn?yi.geometry:ff(ir),properties:ir.properties,type:ir.type,patterns:{}};this.hasPattern?this.features.push($6("fill-extrusion",this.layers,di,this.zoom,ue)):this.addFeature(di,di.geometry,Zr,Re,{}),ue.featureIndex.insert(ir,di.geometry,Zr,un,this.index,!0)}}},Rw.prototype.addFeatures=function(j,ue,Re){for(var Qe=0,dt=this.features;Qe<dt.length;Qe+=1){var Mt=dt[Qe],ir=Mt.geometry;this.addFeature(Mt,ir,Mt.index,ue,Re)}},Rw.prototype.update=function(j,ue,Re){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(j,ue,this.stateDependentLayers,Re)},Rw.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},Rw.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Rw.prototype.upload=function(j){this.uploaded||(this.layoutVertexBuffer=j.createVertexBuffer(this.layoutVertexArray,M2),this.indexBuffer=j.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(j),this.uploaded=!0},Rw.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Rw.prototype.addFeature=function(j,ue,Re,Qe,dt){for(var Mt=0,ir=T3(ue,xH);Mt<ir.length;Mt+=1){for(var Fr=ir[Mt],Zr=0,un=0,Hn=Fr;un<Hn.length;un+=1){var yi=Hn[un];Zr+=yi.length}for(var di=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),qi=0,Ia=Fr;qi<Ia.length;qi+=1){var Do=Ia[qi];if(Do.length!==0&&!Y6(Do))for(var ho=0,gs=0;gs<Do.length;gs++){var Zo=Do[gs];if(gs>=1){var ms=Do[gs-1];if(!W6(Zo,ms)){di.vertexLength+4>uc.MAX_VERTEX_ARRAY_LENGTH&&(di=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var Is=Zo.sub(ms)._perp()._unit(),dl=ms.dist(Zo);ho+dl>32768&&(ho=0),$I(this.layoutVertexArray,Zo.x,Zo.y,Is.x,Is.y,0,0,ho),$I(this.layoutVertexArray,Zo.x,Zo.y,Is.x,Is.y,0,1,ho),ho+=dl,$I(this.layoutVertexArray,ms.x,ms.y,Is.x,Is.y,0,0,ho),$I(this.layoutVertexArray,ms.x,ms.y,Is.x,Is.y,0,1,ho);var Xl=di.vertexLength;this.indexArray.emplaceBack(Xl,Xl+2,Xl+1),this.indexArray.emplaceBack(Xl+1,Xl+2,Xl+3),di.vertexLength+=4,di.primitiveLength+=2}}}}if(di.vertexLength+Zr>uc.MAX_VERTEX_ARRAY_LENGTH&&(di=this.segments.prepareSegment(Zr,this.layoutVertexArray,this.indexArray)),qI[j.type]==="Polygon"){for(var Bl=[],Ku=[],_u=di.vertexLength,Ou=0,hf=Fr;Ou<hf.length;Ou+=1){var Ju=hf[Ou];if(Ju.length!==0){Ju!==Fr[0]&&Ku.push(Bl.length/2);for(var oc=0;oc<Ju.length;oc++){var nd=Ju[oc];$I(this.layoutVertexArray,nd.x,nd.y,0,0,1,1,0),Bl.push(nd.x),Bl.push(nd.y)}}}for(var tf=U6(Bl,Ku),qh=0;qh<tf.length;qh+=3)this.indexArray.emplaceBack(_u+tf[qh],_u+tf[qh+2],_u+tf[qh+1]);di.primitiveLength+=tf.length/3,di.vertexLength+=Zr}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,j,Re,dt,Qe)},Yr("FillExtrusionBucket",Rw,{omit:["layers","features"]});function W6(H,j){return H.x===j.x&&(H.x<0||H.x>Qs)||H.y===j.y&&(H.y<0||H.y>Qs)}function Y6(H){return H.every(function(j){return j.x<0})||H.every(function(j){return j.x>Qs})||H.every(function(j){return j.y<0})||H.every(function(j){return j.y>Qs})}var QK=new qo({"fill-extrusion-opacity":new zi(Qo["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Fi(Qo["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new zi(Qo["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new zi(Qo["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Ao(Qo["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Fi(Qo["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Fi(Qo["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new zi(Qo["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])}),eJ={paint:QK},tJ=(function(H){function j(ue){H.call(this,ue,eJ)}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype.createBucket=function(Re){return new Rw(Re)},j.prototype.queryRadius=function(){return Aw(this.paint.get("fill-extrusion-translate"))},j.prototype.is3D=function(){return!0},j.prototype.queryIntersectsFeature=function(Re,Qe,dt,Mt,ir,Fr,Zr,un){var Hn=C2(Re,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),Fr.angle,Zr),yi=this.paint.get("fill-extrusion-height").evaluate(Qe,dt),di=this.paint.get("fill-extrusion-base").evaluate(Qe,dt),qi=_H(Hn,un,Fr,0),Ia=t7(Mt,di,yi,un),Do=Ia[0],ho=Ia[1];return r5(Do,ho,qi)},j})(xs);function E3(H,j){return H.x*j.x+H.y*j.y}function V1(H,j){if(H.length===1){for(var ue=0,Re=j[ue++],Qe;!Qe||Re.equals(Qe);)if(Qe=j[ue++],!Qe)return 1/0;for(;ue<j.length;ue++){var dt=j[ue],Mt=H[0],ir=Qe.sub(Re),Fr=dt.sub(Re),Zr=Mt.sub(Re),un=E3(ir,ir),Hn=E3(ir,Fr),yi=E3(Fr,Fr),di=E3(Zr,ir),qi=E3(Zr,Fr),Ia=un*yi-Hn*Hn,Do=(yi*di-Hn*qi)/Ia,ho=(un*qi-Hn*di)/Ia,gs=1-Do-ho,Zo=Re.z*gs+Qe.z*Do+dt.z*ho;if(isFinite(Zo))return Zo}return 1/0}else{for(var ms=1/0,Is=0,dl=j;Is<dl.length;Is+=1){var Xl=dl[Is];ms=Math.min(ms,Xl.z)}return ms}}function r5(H,j,ue){var Re=1/0;Ig(ue,j)&&(Re=V1(ue,j[0]));for(var Qe=0;Qe<j.length;Qe++)for(var dt=j[Qe],Mt=H[Qe],ir=0;ir<dt.length-1;ir++){var Fr=dt[ir],Zr=dt[ir+1],un=Mt[ir],Hn=Mt[ir+1],yi=[Fr,Zr,Hn,un,Fr];af(ue,yi)&&(Re=Math.min(Re,V1(ue,yi)))}return Re===1/0?!1:Re}function t7(H,j,ue,Re){for(var Qe=[],dt=[],Mt=Re[8]*j,ir=Re[9]*j,Fr=Re[10]*j,Zr=Re[11]*j,un=Re[8]*ue,Hn=Re[9]*ue,yi=Re[10]*ue,di=Re[11]*ue,qi=0,Ia=H;qi<Ia.length;qi+=1){for(var Do=Ia[qi],ho=[],gs=[],Zo=0,ms=Do;Zo<ms.length;Zo+=1){var Is=ms[Zo],dl=Is.x,Xl=Is.y,Bl=Re[0]*dl+Re[4]*Xl+Re[12],Ku=Re[1]*dl+Re[5]*Xl+Re[13],_u=Re[2]*dl+Re[6]*Xl+Re[14],Ou=Re[3]*dl+Re[7]*Xl+Re[15],hf=Bl+Mt,Ju=Ku+ir,oc=_u+Fr,nd=Ou+Zr,tf=Bl+un,qh=Ku+Hn,Lv=_u+yi,Gh=Ou+di,$h=new v(hf/nd,Ju/nd);$h.z=oc/nd,ho.push($h);var Dh=new v(tf/Gh,qh/Gh);Dh.z=Lv/Gh,gs.push(Dh)}Qe.push(ho),dt.push(gs)}return[Qe,dt]}function _H(H,j,ue,Re){for(var Qe=[],dt=0,Mt=H;dt<Mt.length;dt+=1){var ir=Mt[dt],Fr=[ir.x,ir.y,Re,1];L6(Fr,Fr,j),Qe.push(new v(Fr[0]/Fr[3],Fr[1]/Fr[3]))}return Qe}var wH=so([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),r7=wH.members,rJ=so([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),SH=rJ.members,TH=GR.VectorTileFeature.types,EH=63,AH=Math.cos(75/2*(Math.PI/180)),n7=15,i7=20,CH=15,WI=1/2,X6=Math.pow(2,CH-1)/WI,mb=function(j){var ue=this;this.zoom=j.zoom,this.overscaling=j.overscaling,this.layers=j.layers,this.layerIds=this.layers.map(function(Re){return Re.id}),this.index=j.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(function(Re){ue.gradients[Re.id]={}}),this.layoutVertexArray=new Ra,this.layoutVertexArray2=new ls,this.indexArray=new Jl,this.programConfigurations=new Ya(j.layers,j.zoom),this.segments=new uc,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(function(Re){return Re.isStateDependent()}).map(function(Re){return Re.id})};mb.prototype.populate=function(j,ue,Re){this.hasPattern=G6("line",this.layers,ue);for(var Qe=this.layers[0].layout.get("line-sort-key"),dt=[],Mt=0,ir=j;Mt<ir.length;Mt+=1){var Fr=ir[Mt],Zr=Fr.feature,un=Fr.id,Hn=Fr.index,yi=Fr.sourceLayerIndex,di=this.layers[0]._featureFilter.needGeometry,qi=_f(Zr,di);if(this.layers[0]._featureFilter.filter(new Mf(this.zoom),qi,Re)){var Ia=Qe?Qe.evaluate(qi,{},Re):void 0,Do={id:un,properties:Zr.properties,type:Zr.type,sourceLayerIndex:yi,index:Hn,geometry:di?qi.geometry:ff(Zr),patterns:{},sortKey:Ia};dt.push(Do)}}Qe&&dt.sort(function(_u,Ou){return _u.sortKey-Ou.sortKey});for(var ho=0,gs=dt;ho<gs.length;ho+=1){var Zo=gs[ho],ms=Zo,Is=ms.geometry,dl=ms.index,Xl=ms.sourceLayerIndex;if(this.hasPattern){var Bl=$6("line",this.layers,Zo,this.zoom,ue);this.patternFeatures.push(Bl)}else this.addFeature(Zo,Is,dl,Re,{});var Ku=j[dl].feature;ue.featureIndex.insert(Ku,Is,dl,Xl,this.index)}},mb.prototype.update=function(j,ue,Re){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(j,ue,this.stateDependentLayers,Re)},mb.prototype.addFeatures=function(j,ue,Re){for(var Qe=0,dt=this.patternFeatures;Qe<dt.length;Qe+=1){var Mt=dt[Qe];this.addFeature(Mt,Mt.geometry,Mt.index,ue,Re)}},mb.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},mb.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},mb.prototype.upload=function(j){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=j.createVertexBuffer(this.layoutVertexArray2,SH)),this.layoutVertexBuffer=j.createVertexBuffer(this.layoutVertexArray,r7),this.indexBuffer=j.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(j),this.uploaded=!0},mb.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},mb.prototype.lineFeatureClips=function(j){if(j.properties&&j.properties.hasOwnProperty("mapbox_clip_start")&&j.properties.hasOwnProperty("mapbox_clip_end")){var ue=+j.properties.mapbox_clip_start,Re=+j.properties.mapbox_clip_end;return{start:ue,end:Re}}},mb.prototype.addFeature=function(j,ue,Re,Qe,dt){var Mt=this.layers[0].layout,ir=Mt.get("line-join").evaluate(j,{}),Fr=Mt.get("line-cap"),Zr=Mt.get("line-miter-limit"),un=Mt.get("line-round-limit");this.lineClips=this.lineFeatureClips(j);for(var Hn=0,yi=ue;Hn<yi.length;Hn+=1){var di=yi[Hn];this.addLine(di,j,ir,Fr,Zr,un)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,j,Re,dt,Qe)},mb.prototype.addLine=function(j,ue,Re,Qe,dt,Mt){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(var ir=0;ir<j.length-1;ir++)this.totalDistance+=j[ir].dist(j[ir+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}for(var Fr=TH[ue.type]==="Polygon",Zr=j.length;Zr>=2&&j[Zr-1].equals(j[Zr-2]);)Zr--;for(var un=0;un<Zr-1&&j[un].equals(j[un+1]);)un++;if(!(Zr<(Fr?3:2))){Re==="bevel"&&(dt=1.05);var Hn=this.overscaling<=16?n7*Qs/(512*this.overscaling):0,yi=this.segments.prepareSegment(Zr*10,this.layoutVertexArray,this.indexArray),di,qi=void 0,Ia=void 0,Do=void 0,ho=void 0;this.e1=this.e2=-1,Fr&&(di=j[Zr-2],ho=j[un].sub(di)._unit()._perp());for(var gs=un;gs<Zr;gs++)if(Ia=gs===Zr-1?Fr?j[un+1]:void 0:j[gs+1],!(Ia&&j[gs].equals(Ia))){ho&&(Do=ho),di&&(qi=di),di=j[gs],ho=Ia?Ia.sub(di)._unit()._perp():Do,Do=Do||ho;var Zo=Do.add(ho);(Zo.x!==0||Zo.y!==0)&&Zo._unit();var ms=Do.x*ho.x+Do.y*ho.y,Is=Zo.x*ho.x+Zo.y*ho.y,dl=Is!==0?1/Is:1/0,Xl=2*Math.sqrt(2-2*Is),Bl=Is<AH&&qi&&Ia,Ku=Do.x*ho.y-Do.y*ho.x>0;if(Bl&&gs>un){var _u=di.dist(qi);if(_u>2*Hn){var Ou=di.sub(di.sub(qi)._mult(Hn/_u)._round());this.updateDistance(qi,Ou),this.addCurrentVertex(Ou,Do,0,0,yi),qi=Ou}}var hf=qi&&Ia,Ju=hf?Re:Fr?"butt":Qe;if(hf&&Ju==="round"&&(dl<Mt?Ju="miter":dl<=2&&(Ju="fakeround")),Ju==="miter"&&dl>dt&&(Ju="bevel"),Ju==="bevel"&&(dl>2&&(Ju="flipbevel"),dl<dt&&(Ju="miter")),qi&&this.updateDistance(qi,di),Ju==="miter")Zo._mult(dl),this.addCurrentVertex(di,Zo,0,0,yi);else if(Ju==="flipbevel"){if(dl>100)Zo=ho.mult(-1);else{var oc=dl*Do.add(ho).mag()/Do.sub(ho).mag();Zo._perp()._mult(oc*(Ku?-1:1))}this.addCurrentVertex(di,Zo,0,0,yi),this.addCurrentVertex(di,Zo.mult(-1),0,0,yi)}else if(Ju==="bevel"||Ju==="fakeround"){var nd=-Math.sqrt(dl*dl-1),tf=Ku?nd:0,qh=Ku?0:nd;if(qi&&this.addCurrentVertex(di,Do,tf,qh,yi),Ju==="fakeround")for(var Lv=Math.round(Xl*180/Math.PI/i7),Gh=1;Gh<Lv;Gh++){var $h=Gh/Lv;if($h!==.5){var Dh=$h-.5,hm=1.0904+ms*(-3.2452+ms*(3.55645-ms*1.43519)),km=.848013+ms*(-1.06021+ms*.215638);$h=$h+$h*Dh*($h-1)*(hm*Dh*Dh+km)}var f0=ho.sub(Do)._mult($h)._add(Do)._unit()._mult(Ku?-1:1);this.addHalfVertex(di,f0.x,f0.y,!1,Ku,0,yi)}Ia&&this.addCurrentVertex(di,ho,-tf,-qh,yi)}else if(Ju==="butt")this.addCurrentVertex(di,Zo,0,0,yi);else if(Ju==="square"){var I0=qi?1:-1;this.addCurrentVertex(di,Zo,I0,I0,yi)}else Ju==="round"&&(qi&&(this.addCurrentVertex(di,Do,0,0,yi),this.addCurrentVertex(di,Do,1,1,yi,!0)),Ia&&(this.addCurrentVertex(di,ho,-1,-1,yi,!0),this.addCurrentVertex(di,ho,0,0,yi)));if(Bl&&gs<Zr-1){var W1=di.dist(Ia);if(W1>2*Hn){var By=di.add(Ia.sub(di)._mult(Hn/W1)._round());this.updateDistance(di,By),this.addCurrentVertex(By,ho,0,0,yi),di=By}}}}},mb.prototype.addCurrentVertex=function(j,ue,Re,Qe,dt,Mt){Mt===void 0&&(Mt=!1);var ir=ue.x+ue.y*Re,Fr=ue.y-ue.x*Re,Zr=-ue.x+ue.y*Qe,un=-ue.y-ue.x*Qe;this.addHalfVertex(j,ir,Fr,Mt,!1,Re,dt),this.addHalfVertex(j,Zr,un,Mt,!0,-Qe,dt),this.distance>X6/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(j,ue,Re,Qe,dt,Mt))},mb.prototype.addHalfVertex=function(j,ue,Re,Qe,dt,Mt,ir){var Fr=j.x,Zr=j.y,un=this.lineClips?this.scaledDistance*(X6-1):this.scaledDistance,Hn=un*WI;if(this.layoutVertexArray.emplaceBack((Fr<<1)+(Qe?1:0),(Zr<<1)+(dt?1:0),Math.round(EH*ue)+128,Math.round(EH*Re)+128,(Mt===0?0:Mt<0?-1:1)+1|(Hn&63)<<2,Hn>>6),this.lineClips){var yi=this.scaledDistance-this.lineClips.start,di=this.lineClips.end-this.lineClips.start,qi=yi/di;this.layoutVertexArray2.emplaceBack(qi,this.lineClipsArray.length)}var Ia=ir.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Ia),ir.primitiveLength++),dt?this.e2=Ia:this.e1=Ia},mb.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},mb.prototype.updateDistance=function(j,ue){this.distance+=j.dist(ue),this.updateScaledDistance()},Yr("LineBucket",mb,{omit:["layers","patternFeatures"]});var a7=new qo({"line-cap":new zi(Qo.layout_line["line-cap"]),"line-join":new Fi(Qo.layout_line["line-join"]),"line-miter-limit":new zi(Qo.layout_line["line-miter-limit"]),"line-round-limit":new zi(Qo.layout_line["line-round-limit"]),"line-sort-key":new Fi(Qo.layout_line["line-sort-key"])}),Z6=new qo({"line-opacity":new Fi(Qo.paint_line["line-opacity"]),"line-color":new Fi(Qo.paint_line["line-color"]),"line-translate":new zi(Qo.paint_line["line-translate"]),"line-translate-anchor":new zi(Qo.paint_line["line-translate-anchor"]),"line-width":new Fi(Qo.paint_line["line-width"]),"line-gap-width":new Fi(Qo.paint_line["line-gap-width"]),"line-offset":new Fi(Qo.paint_line["line-offset"]),"line-blur":new Fi(Qo.paint_line["line-blur"]),"line-dasharray":new To(Qo.paint_line["line-dasharray"]),"line-pattern":new Ao(Qo.paint_line["line-pattern"]),"line-gradient":new Eo(Qo.paint_line["line-gradient"])}),YI={paint:Z6,layout:a7},o7=(function(H){function j(){H.apply(this,arguments)}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype.possiblyEvaluate=function(Re,Qe){return Qe=new Mf(Math.floor(Qe.zoom),{now:Qe.now,fadeDuration:Qe.fadeDuration,zoomHistory:Qe.zoomHistory,transition:Qe.transition}),H.prototype.possiblyEvaluate.call(this,Re,Qe)},j.prototype.evaluate=function(Re,Qe,dt,Mt){return Qe=k({},Qe,{zoom:Math.floor(Qe.zoom)}),H.prototype.evaluate.call(this,Re,Qe,dt,Mt)},j})(Fi),K6=new o7(YI.paint.properties["line-width"].specification);K6.useIntegerZoom=!0;var s7=(function(H){function j(ue){H.call(this,ue,YI),this.gradientVersion=0}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype._handleSpecialPaintPropertyUpdate=function(Re){if(Re==="line-gradient"){var Qe=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=Qe._styleExpression.expression instanceof Mv,this.gradientVersion=(this.gradientVersion+1)%x}},j.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},j.prototype.recalculate=function(Re,Qe){H.prototype.recalculate.call(this,Re,Qe),this.paint._values["line-floorwidth"]=K6.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,Re)},j.prototype.createBucket=function(Re){return new mb(Re)},j.prototype.queryRadius=function(Re){var Qe=Re,dt=MH(rx("line-width",this,Qe),rx("line-gap-width",this,Qe)),Mt=rx("line-offset",this,Qe);return dt/2+Math.abs(Mt)+Aw(this.paint.get("line-translate"))},j.prototype.queryIntersectsFeature=function(Re,Qe,dt,Mt,ir,Fr,Zr){var un=C2(Re,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),Fr.angle,Zr),Hn=Zr/2*MH(this.paint.get("line-width").evaluate(Qe,dt),this.paint.get("line-gap-width").evaluate(Qe,dt)),yi=this.paint.get("line-offset").evaluate(Qe,dt);return yi&&(Mt=ce(Mt,yi*Zr)),R0(un,Mt,Hn)},j.prototype.isTileClipped=function(){return!0},j})(xs);function MH(H,j){return j>0?j+2*H:H}function ce(H,j){for(var ue=[],Re=new v(0,0),Qe=0;Qe<H.length;Qe++){for(var dt=H[Qe],Mt=[],ir=0;ir<dt.length;ir++){var Fr=dt[ir-1],Zr=dt[ir],un=dt[ir+1],Hn=ir===0?Re:Zr.sub(Fr)._unit()._perp(),yi=ir===dt.length-1?Re:un.sub(Zr)._unit()._perp(),di=Hn._add(yi)._unit(),qi=di.x*yi.x+di.y*yi.y;di._mult(1/qi),Mt.push(di._mult(j)._add(Zr))}ue.push(Mt)}return ue}var Y=so([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),ye=so([{name:"a_projected_pos",components:3,type:"Float32"}],4);so([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);var He=so([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]);so([{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 lt=so([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),Ct=so([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);so([{name:"triangle",components:3,type:"Uint16"}]),so([{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"}]),so([{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"}]),so([{type:"Float32",name:"offsetX"}]),so([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);function It(H,j,ue){var Re=j.layout.get("text-transform").evaluate(ue,{});return Re==="uppercase"?H=H.toLocaleUpperCase():Re==="lowercase"&&(H=H.toLocaleLowerCase()),Uf.applyArabicShaping&&(H=Uf.applyArabicShaping(H)),H}function nr(H,j,ue){return H.sections.forEach(function(Re){Re.text=It(Re.text,j,ue)}),H}function xr(H){var j={},ue={},Re=[],Qe=0;function dt(ho){Re.push(H[ho]),Qe++}function Mt(ho,gs,Zo){var ms=ue[ho];return delete ue[ho],ue[gs]=ms,Re[ms].geometry[0].pop(),Re[ms].geometry[0]=Re[ms].geometry[0].concat(Zo[0]),ms}function ir(ho,gs,Zo){var ms=j[gs];return delete j[gs],j[ho]=ms,Re[ms].geometry[0].shift(),Re[ms].geometry[0]=Zo[0].concat(Re[ms].geometry[0]),ms}function Fr(ho,gs,Zo){var ms=Zo?gs[0][gs[0].length-1]:gs[0][0];return ho+":"+ms.x+":"+ms.y}for(var Zr=0;Zr<H.length;Zr++){var un=H[Zr],Hn=un.geometry,yi=un.text?un.text.toString():null;if(!yi){dt(Zr);continue}var di=Fr(yi,Hn),qi=Fr(yi,Hn,!0);if(di in ue&&qi in j&&ue[di]!==j[qi]){var Ia=ir(di,qi,Hn),Do=Mt(di,qi,Re[Ia].geometry);delete j[di],delete ue[qi],ue[Fr(yi,Re[Do].geometry,!0)]=Do,Re[Ia].geometry=null}else di in ue?Mt(di,qi,Hn):qi in j?ir(di,qi,Hn):(dt(Zr),j[di]=Qe-1,ue[qi]=Qe-1)}return Re.filter(function(ho){return ho.geometry})}var Vr={"!":"︕","#":"＃",$:"＄","%":"％","&":"＆","(":"︵",")":"︶","*":"＊","+":"＋",",":"︐","-":"︲",".":"・","/":"／",":":"︓",";":"︔","<":"︿","=":"＝",">":"﹀","?":"︖","@":"＠","[":"﹇","\\":"＼","]":"﹈","^":"＾",_:"︳","`":"｀","{":"︷","|":"―","}":"︸","~":"～","¢":"￠","£":"￡","¥":"￥","¦":"￤","¬":"￢","¯":"￣","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"￦","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","！":"︕","（":"︵","）":"︶","，":"︐","－":"︲","．":"・","：":"︓","；":"︔","＜":"︿","＞":"﹀","？":"︖","［":"﹇","］":"﹈","＿":"︳","｛":"︷","｜":"―","｝":"︸","｟":"︵","｠":"︶","｡":"︒","｢":"﹁","｣":"﹂"};function hn(H){for(var j="",ue=0;ue<H.length;ue++){var Re=H.charCodeAt(ue+1)||null,Qe=H.charCodeAt(ue-1)||null,dt=(!Re||!Va(Re)||Vr[H[ue+1]])&&(!Qe||!Va(Qe)||Vr[H[ue-1]]);dt&&Vr[H[ue]]?j+=Vr[H[ue]]:j+=H[ue]}return j}var wn=24,Zn=function(H,j,ue,Re,Qe){var dt,Mt,ir=Qe*8-Re-1,Fr=(1<<ir)-1,Zr=Fr>>1,un=-7,Hn=ue?Qe-1:0,yi=ue?-1:1,di=H[j+Hn];for(Hn+=yi,dt=di&(1<<-un)-1,di>>=-un,un+=ir;un>0;dt=dt*256+H[j+Hn],Hn+=yi,un-=8);for(Mt=dt&(1<<-un)-1,dt>>=-un,un+=Re;un>0;Mt=Mt*256+H[j+Hn],Hn+=yi,un-=8);if(dt===0)dt=1-Zr;else{if(dt===Fr)return Mt?NaN:(di?-1:1)*(1/0);Mt=Mt+Math.pow(2,Re),dt=dt-Zr}return(di?-1:1)*Mt*Math.pow(2,dt-Re)},hi=function(H,j,ue,Re,Qe,dt){var Mt,ir,Fr,Zr=dt*8-Qe-1,un=(1<<Zr)-1,Hn=un>>1,yi=Qe===23?Math.pow(2,-24)-Math.pow(2,-77):0,di=Re?0:dt-1,qi=Re?1:-1,Ia=j<0||j===0&&1/j<0?1:0;for(j=Math.abs(j),isNaN(j)||j===1/0?(ir=isNaN(j)?1:0,Mt=un):(Mt=Math.floor(Math.log(j)/Math.LN2),j*(Fr=Math.pow(2,-Mt))<1&&(Mt--,Fr*=2),Mt+Hn>=1?j+=yi/Fr:j+=yi*Math.pow(2,1-Hn),j*Fr>=2&&(Mt++,Fr/=2),Mt+Hn>=un?(ir=0,Mt=un):Mt+Hn>=1?(ir=(j*Fr-1)*Math.pow(2,Qe),Mt=Mt+Hn):(ir=j*Math.pow(2,Hn-1)*Math.pow(2,Qe),Mt=0));Qe>=8;H[ue+di]=ir&255,di+=qi,ir/=256,Qe-=8);for(Mt=Mt<<Qe|ir,Zr+=Qe;Zr>0;H[ue+di]=Mt&255,di+=qi,Mt/=256,Zr-=8);H[ue+di-qi]|=Ia*128},Di={read:Zn,write:hi},Xi=ya;function ya(H){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(H)?H:new Uint8Array(H||0),this.pos=0,this.type=0,this.length=this.buf.length}ya.Varint=0,ya.Fixed64=1,ya.Bytes=2,ya.Fixed32=5;var eo=65536*65536,us=1/eo,ko=12,es=typeof TextDecoder>"u"?null:new TextDecoder("utf8");ya.prototype={destroy:function(){this.buf=null},readFields:function(H,j,ue){for(ue=ue||this.length;this.pos<ue;){var Re=this.readVarint(),Qe=Re>>3,dt=this.pos;this.type=Re&7,H(Qe,j,this),this.pos===dt&&this.skip(Re)}return j},readMessage:function(H,j){return this.readFields(H,j,this.readVarint()+this.pos)},readFixed32:function(){var H=k_(this.buf,this.pos);return this.pos+=4,H},readSFixed32:function(){var H=Oy(this.buf,this.pos);return this.pos+=4,H},readFixed64:function(){var H=k_(this.buf,this.pos)+k_(this.buf,this.pos+4)*eo;return this.pos+=8,H},readSFixed64:function(){var H=k_(this.buf,this.pos)+Oy(this.buf,this.pos+4)*eo;return this.pos+=8,H},readFloat:function(){var H=Di.read(this.buf,this.pos,!0,23,4);return this.pos+=4,H},readDouble:function(){var H=Di.read(this.buf,this.pos,!0,52,8);return this.pos+=8,H},readVarint:function(H){var j=this.buf,ue,Re;return Re=j[this.pos++],ue=Re&127,Re<128||(Re=j[this.pos++],ue|=(Re&127)<<7,Re<128)||(Re=j[this.pos++],ue|=(Re&127)<<14,Re<128)||(Re=j[this.pos++],ue|=(Re&127)<<21,Re<128)?ue:(Re=j[this.pos],ue|=(Re&15)<<28,js(ue,H,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var H=this.readVarint();return H%2===1?(H+1)/-2:H/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var H=this.readVarint()+this.pos,j=this.pos;return this.pos=H,H-j>=ko&&es?Ux(this.buf,j,H):Bx(this.buf,j,H)},readBytes:function(){var H=this.readVarint()+this.pos,j=this.buf.subarray(this.pos,H);return this.pos=H,j},readPackedVarint:function(H,j){if(this.type!==ya.Bytes)return H.push(this.readVarint(j));var ue=Pl(this);for(H=H||[];this.pos<ue;)H.push(this.readVarint(j));return H},readPackedSVarint:function(H){if(this.type!==ya.Bytes)return H.push(this.readSVarint());var j=Pl(this);for(H=H||[];this.pos<j;)H.push(this.readSVarint());return H},readPackedBoolean:function(H){if(this.type!==ya.Bytes)return H.push(this.readBoolean());var j=Pl(this);for(H=H||[];this.pos<j;)H.push(this.readBoolean());return H},readPackedFloat:function(H){if(this.type!==ya.Bytes)return H.push(this.readFloat());var j=Pl(this);for(H=H||[];this.pos<j;)H.push(this.readFloat());return H},readPackedDouble:function(H){if(this.type!==ya.Bytes)return H.push(this.readDouble());var j=Pl(this);for(H=H||[];this.pos<j;)H.push(this.readDouble());return H},readPackedFixed32:function(H){if(this.type!==ya.Bytes)return H.push(this.readFixed32());var j=Pl(this);for(H=H||[];this.pos<j;)H.push(this.readFixed32());return H},readPackedSFixed32:function(H){if(this.type!==ya.Bytes)return H.push(this.readSFixed32());var j=Pl(this);for(H=H||[];this.pos<j;)H.push(this.readSFixed32());return H},readPackedFixed64:function(H){if(this.type!==ya.Bytes)return H.push(this.readFixed64());var j=Pl(this);for(H=H||[];this.pos<j;)H.push(this.readFixed64());return H},readPackedSFixed64:function(H){if(this.type!==ya.Bytes)return H.push(this.readSFixed64());var j=Pl(this);for(H=H||[];this.pos<j;)H.push(this.readSFixed64());return H},skip:function(H){var j=H&7;if(j===ya.Varint)for(;this.buf[this.pos++]>127;);else if(j===ya.Bytes)this.pos=this.readVarint()+this.pos;else if(j===ya.Fixed32)this.pos+=4;else if(j===ya.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+j)},writeTag:function(H,j){this.writeVarint(H<<3|j)},realloc:function(H){for(var j=this.length||16;j<this.pos+H;)j*=2;if(j!==this.length){var ue=new Uint8Array(j);ue.set(this.buf),this.buf=ue,this.length=j}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(H){this.realloc(4),k0(this.buf,H,this.pos),this.pos+=4},writeSFixed32:function(H){this.realloc(4),k0(this.buf,H,this.pos),this.pos+=4},writeFixed64:function(H){this.realloc(8),k0(this.buf,H&-1,this.pos),k0(this.buf,Math.floor(H*us),this.pos+4),this.pos+=8},writeSFixed64:function(H){this.realloc(8),k0(this.buf,H&-1,this.pos),k0(this.buf,Math.floor(H*us),this.pos+4),this.pos+=8},writeVarint:function(H){if(H=+H||0,H>268435455||H<0){df(H,this);return}this.realloc(4),this.buf[this.pos++]=H&127|(H>127?128:0),!(H<=127)&&(this.buf[this.pos++]=(H>>>=7)&127|(H>127?128:0),!(H<=127)&&(this.buf[this.pos++]=(H>>>=7)&127|(H>127?128:0),!(H<=127)&&(this.buf[this.pos++]=H>>>7&127)))},writeSVarint:function(H){this.writeVarint(H<0?-H*2-1:H*2)},writeBoolean:function(H){this.writeVarint(!!H)},writeString:function(H){H=String(H),this.realloc(H.length*4),this.pos++;var j=this.pos;this.pos=Hx(this.buf,H,this.pos);var ue=this.pos-j;ue>=128&&Ic(j,ue,this),this.pos=j-1,this.writeVarint(ue),this.pos+=ue},writeFloat:function(H){this.realloc(4),Di.write(this.buf,H,this.pos,!0,23,4),this.pos+=4},writeDouble:function(H){this.realloc(8),Di.write(this.buf,H,this.pos,!0,52,8),this.pos+=8},writeBytes:function(H){var j=H.length;this.writeVarint(j),this.realloc(j);for(var ue=0;ue<j;ue++)this.buf[this.pos++]=H[ue]},writeRawMessage:function(H,j){this.pos++;var ue=this.pos;H(j,this);var Re=this.pos-ue;Re>=128&&Ic(ue,Re,this),this.pos=ue-1,this.writeVarint(Re),this.pos+=Re},writeMessage:function(H,j,ue){this.writeTag(H,ya.Bytes),this.writeRawMessage(j,ue)},writePackedVarint:function(H,j){j.length&&this.writeMessage(H,xc,j)},writePackedSVarint:function(H,j){j.length&&this.writeMessage(H,fc,j)},writePackedBoolean:function(H,j){j.length&&this.writeMessage(H,Pc,j)},writePackedFloat:function(H,j){j.length&&this.writeMessage(H,hl,j)},writePackedDouble:function(H,j){j.length&&this.writeMessage(H,Hc,j)},writePackedFixed32:function(H,j){j.length&&this.writeMessage(H,Nf,j)},writePackedSFixed32:function(H,j){j.length&&this.writeMessage(H,fm,j)},writePackedFixed64:function(H,j){j.length&&this.writeMessage(H,Gv,j)},writePackedSFixed64:function(H,j){j.length&&this.writeMessage(H,l1,j)},writeBytesField:function(H,j){this.writeTag(H,ya.Bytes),this.writeBytes(j)},writeFixed32Field:function(H,j){this.writeTag(H,ya.Fixed32),this.writeFixed32(j)},writeSFixed32Field:function(H,j){this.writeTag(H,ya.Fixed32),this.writeSFixed32(j)},writeFixed64Field:function(H,j){this.writeTag(H,ya.Fixed64),this.writeFixed64(j)},writeSFixed64Field:function(H,j){this.writeTag(H,ya.Fixed64),this.writeSFixed64(j)},writeVarintField:function(H,j){this.writeTag(H,ya.Varint),this.writeVarint(j)},writeSVarintField:function(H,j){this.writeTag(H,ya.Varint),this.writeSVarint(j)},writeStringField:function(H,j){this.writeTag(H,ya.Bytes),this.writeString(j)},writeFloatField:function(H,j){this.writeTag(H,ya.Fixed32),this.writeFloat(j)},writeDoubleField:function(H,j){this.writeTag(H,ya.Fixed64),this.writeDouble(j)},writeBooleanField:function(H,j){this.writeVarintField(H,!!j)}};function js(H,j,ue){var Re=ue.buf,Qe,dt;if(dt=Re[ue.pos++],Qe=(dt&112)>>4,dt<128||(dt=Re[ue.pos++],Qe|=(dt&127)<<3,dt<128)||(dt=Re[ue.pos++],Qe|=(dt&127)<<10,dt<128)||(dt=Re[ue.pos++],Qe|=(dt&127)<<17,dt<128)||(dt=Re[ue.pos++],Qe|=(dt&127)<<24,dt<128)||(dt=Re[ue.pos++],Qe|=(dt&1)<<31,dt<128))return Lu(H,Qe,j);throw new Error("Expected varint not more than 10 bytes")}function Pl(H){return H.type===ya.Bytes?H.readVarint()+H.pos:H.pos+1}function Lu(H,j,ue){return ue?j*4294967296+(H>>>0):(j>>>0)*4294967296+(H>>>0)}function df(H,j){var ue,Re;if(H>=0?(ue=H%4294967296|0,Re=H/4294967296|0):(ue=~(-H%4294967296),Re=~(-H/4294967296),ue^4294967295?ue=ue+1|0:(ue=0,Re=Re+1|0)),H>=18446744073709552e3||H<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");j.realloc(10),$u(ue,Re,j),Pu(Re,j)}function $u(H,j,ue){ue.buf[ue.pos++]=H&127|128,H>>>=7,ue.buf[ue.pos++]=H&127|128,H>>>=7,ue.buf[ue.pos++]=H&127|128,H>>>=7,ue.buf[ue.pos++]=H&127|128,H>>>=7,ue.buf[ue.pos]=H&127}function Pu(H,j){var ue=(H&7)<<4;j.buf[j.pos++]|=ue|((H>>>=3)?128:0),H&&(j.buf[j.pos++]=H&127|((H>>>=7)?128:0),H&&(j.buf[j.pos++]=H&127|((H>>>=7)?128:0),H&&(j.buf[j.pos++]=H&127|((H>>>=7)?128:0),H&&(j.buf[j.pos++]=H&127|((H>>>=7)?128:0),H&&(j.buf[j.pos++]=H&127)))))}function Ic(H,j,ue){var Re=j<=16383?1:j<=2097151?2:j<=268435455?3:Math.floor(Math.log(j)/(Math.LN2*7));ue.realloc(Re);for(var Qe=ue.pos-1;Qe>=H;Qe--)ue.buf[Qe+Re]=ue.buf[Qe]}function xc(H,j){for(var ue=0;ue<H.length;ue++)j.writeVarint(H[ue])}function fc(H,j){for(var ue=0;ue<H.length;ue++)j.writeSVarint(H[ue])}function hl(H,j){for(var ue=0;ue<H.length;ue++)j.writeFloat(H[ue])}function Hc(H,j){for(var ue=0;ue<H.length;ue++)j.writeDouble(H[ue])}function Pc(H,j){for(var ue=0;ue<H.length;ue++)j.writeBoolean(H[ue])}function Nf(H,j){for(var ue=0;ue<H.length;ue++)j.writeFixed32(H[ue])}function fm(H,j){for(var ue=0;ue<H.length;ue++)j.writeSFixed32(H[ue])}function Gv(H,j){for(var ue=0;ue<H.length;ue++)j.writeFixed64(H[ue])}function l1(H,j){for(var ue=0;ue<H.length;ue++)j.writeSFixed64(H[ue])}function k_(H,j){return(H[j]|H[j+1]<<8|H[j+2]<<16)+H[j+3]*16777216}function k0(H,j,ue){H[ue]=j,H[ue+1]=j>>>8,H[ue+2]=j>>>16,H[ue+3]=j>>>24}function Oy(H,j){return(H[j]|H[j+1]<<8|H[j+2]<<16)+(H[j+3]<<24)}function Bx(H,j,ue){for(var Re="",Qe=j;Qe<ue;){var dt=H[Qe],Mt=null,ir=dt>239?4:dt>223?3:dt>191?2:1;if(Qe+ir>ue)break;var Fr,Zr,un;ir===1?dt<128&&(Mt=dt):ir===2?(Fr=H[Qe+1],(Fr&192)===128&&(Mt=(dt&31)<<6|Fr&63,Mt<=127&&(Mt=null))):ir===3?(Fr=H[Qe+1],Zr=H[Qe+2],(Fr&192)===128&&(Zr&192)===128&&(Mt=(dt&15)<<12|(Fr&63)<<6|Zr&63,(Mt<=2047||Mt>=55296&&Mt<=57343)&&(Mt=null))):ir===4&&(Fr=H[Qe+1],Zr=H[Qe+2],un=H[Qe+3],(Fr&192)===128&&(Zr&192)===128&&(un&192)===128&&(Mt=(dt&15)<<18|(Fr&63)<<12|(Zr&63)<<6|un&63,(Mt<=65535||Mt>=1114112)&&(Mt=null))),Mt===null?(Mt=65533,ir=1):Mt>65535&&(Mt-=65536,Re+=String.fromCharCode(Mt>>>10&1023|55296),Mt=56320|Mt&1023),Re+=String.fromCharCode(Mt),Qe+=ir}return Re}function Ux(H,j,ue){return es.decode(H.subarray(j,ue))}function Hx(H,j,ue){for(var Re=0,Qe,dt;Re<j.length;Re++){if(Qe=j.charCodeAt(Re),Qe>55295&&Qe<57344)if(dt)if(Qe<56320){H[ue++]=239,H[ue++]=191,H[ue++]=189,dt=Qe;continue}else Qe=dt-55296<<10|Qe-56320|65536,dt=null;else{Qe>56319||Re+1===j.length?(H[ue++]=239,H[ue++]=191,H[ue++]=189):dt=Qe;continue}else dt&&(H[ue++]=239,H[ue++]=191,H[ue++]=189,dt=null);Qe<128?H[ue++]=Qe:(Qe<2048?H[ue++]=Qe>>6|192:(Qe<65536?H[ue++]=Qe>>12|224:(H[ue++]=Qe>>18|240,H[ue++]=Qe>>12&63|128),H[ue++]=Qe>>6&63|128),H[ue++]=Qe&63|128)}return ue}var Pg=3;function u1(H,j,ue){H===1&&ue.readMessage(ix,j)}function ix(H,j,ue){if(H===3){var Re=ue.readMessage(gb,{}),Qe=Re.id,dt=Re.bitmap,Mt=Re.width,ir=Re.height,Fr=Re.left,Zr=Re.top,un=Re.advance;j.push({id:Qe,bitmap:new Ly({width:Mt+2*Pg,height:ir+2*Pg},dt),metrics:{width:Mt,height:ir,left:Fr,top:Zr,advance:un}})}}function gb(H,j,ue){H===1?j.id=ue.readVarint():H===2?j.bitmap=ue.readBytes():H===3?j.width=ue.readVarint():H===4?j.height=ue.readVarint():H===5?j.left=ue.readSVarint():H===6?j.top=ue.readSVarint():H===7&&(j.advance=ue.readVarint())}function jx(H){return new Xi(H).readFields(u1,[])}var q1=Pg;function kw(H){for(var j=0,ue=0,Re=0,Qe=H;Re<Qe.length;Re+=1){var dt=Qe[Re];j+=dt.w*dt.h,ue=Math.max(ue,dt.w)}H.sort(function(Do,ho){return ho.h-Do.h});for(var Mt=Math.max(Math.ceil(Math.sqrt(j/.95)),ue),ir=[{x:0,y:0,w:Mt,h:1/0}],Fr=0,Zr=0,un=0,Hn=H;un<Hn.length;un+=1)for(var yi=Hn[un],di=ir.length-1;di>=0;di--){var qi=ir[di];if(!(yi.w>qi.w||yi.h>qi.h)){if(yi.x=qi.x,yi.y=qi.y,Zr=Math.max(Zr,yi.y+yi.h),Fr=Math.max(Fr,yi.x+yi.w),yi.w===qi.w&&yi.h===qi.h){var Ia=ir.pop();di<ir.length&&(ir[di]=Ia)}else yi.h===qi.h?(qi.x+=yi.w,qi.w-=yi.w):yi.w===qi.w?(qi.y+=yi.h,qi.h-=yi.h):(ir.push({x:qi.x+yi.w,y:qi.y,w:qi.w-yi.w,h:yi.h}),qi.y+=yi.h,qi.h-=yi.h);break}}return{w:Fr,h:Zr,fill:j/(Fr*Zr)||0}}var Mm=1,Vh=function(j,ue){var Re=ue.pixelRatio,Qe=ue.version,dt=ue.stretchX,Mt=ue.stretchY,ir=ue.content;this.paddedRect=j,this.pixelRatio=Re,this.stretchX=dt,this.stretchY=Mt,this.content=ir,this.version=Qe},yv={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};yv.tl.get=function(){return[this.paddedRect.x+Mm,this.paddedRect.y+Mm]},yv.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-Mm,this.paddedRect.y+this.paddedRect.h-Mm]},yv.tlbr.get=function(){return this.tl.concat(this.br)},yv.displaySize.get=function(){return[(this.paddedRect.w-Mm*2)/this.pixelRatio,(this.paddedRect.h-Mm*2)/this.pixelRatio]},Object.defineProperties(Vh.prototype,yv);var Pv=function(j,ue){var Re={},Qe={};this.haveRenderCallbacks=[];var dt=[];this.addImages(j,Re,dt),this.addImages(ue,Qe,dt);var Mt=kw(dt),ir=Mt.w,Fr=Mt.h,Zr=new vb({width:ir||1,height:Fr||1});for(var un in j){var Hn=j[un],yi=Re[un].paddedRect;vb.copy(Hn.data,Zr,{x:0,y:0},{x:yi.x+Mm,y:yi.y+Mm},Hn.data)}for(var di in ue){var qi=ue[di],Ia=Qe[di].paddedRect,Do=Ia.x+Mm,ho=Ia.y+Mm,gs=qi.data.width,Zo=qi.data.height;vb.copy(qi.data,Zr,{x:0,y:0},{x:Do,y:ho},qi.data),vb.copy(qi.data,Zr,{x:0,y:Zo-1},{x:Do,y:ho-1},{width:gs,height:1}),vb.copy(qi.data,Zr,{x:0,y:0},{x:Do,y:ho+Zo},{width:gs,height:1}),vb.copy(qi.data,Zr,{x:gs-1,y:0},{x:Do-1,y:ho},{width:1,height:Zo}),vb.copy(qi.data,Zr,{x:0,y:0},{x:Do+gs,y:ho},{width:1,height:Zo})}this.image=Zr,this.iconPositions=Re,this.patternPositions=Qe};Pv.prototype.addImages=function(j,ue,Re){for(var Qe in j){var dt=j[Qe],Mt={x:0,y:0,w:dt.data.width+2*Mm,h:dt.data.height+2*Mm};Re.push(Mt),ue[Qe]=new Vh(Mt,dt),dt.hasRenderCallback&&this.haveRenderCallbacks.push(Qe)}},Pv.prototype.patchUpdatedImages=function(j,ue){j.dispatchRenderCallbacks(this.haveRenderCallbacks);for(var Re in j.updatedImages)this.patchUpdatedImage(this.iconPositions[Re],j.getImage(Re),ue),this.patchUpdatedImage(this.patternPositions[Re],j.getImage(Re),ue)},Pv.prototype.patchUpdatedImage=function(j,ue,Re){if(!(!j||!ue)&&j.version!==ue.version){j.version=ue.version;var Qe=j.tl,dt=Qe[0],Mt=Qe[1];Re.update(ue.data,void 0,{x:dt,y:Mt})}},Yr("ImagePosition",Vh),Yr("ImageAtlas",Pv);var hg={horizontal:1,vertical:2,horizontalOnly:3},Rm=-17;function XI(H){for(var j=0,ue=H;j<ue.length;j+=1){var Re=ue[j];if(Re.positionedGlyphs.length!==0)return!1}return!0}var BT=57344,UT=63743,ax=function(){this.scale=1,this.fontStack="",this.imageName=null};ax.forText=function(j,ue){var Re=new ax;return Re.scale=j||1,Re.fontStack=ue,Re},ax.forImage=function(j){var ue=new ax;return ue.imageName=j,ue};var dm=function(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null};dm.fromFeature=function(j,ue){for(var Re=new dm,Qe=0;Qe<j.sections.length;Qe++){var dt=j.sections[Qe];dt.image?Re.addImageSection(dt):Re.addTextSection(dt,ue)}return Re},dm.prototype.length=function(){return this.text.length},dm.prototype.getSection=function(j){return this.sections[this.sectionIndex[j]]},dm.prototype.getSectionIndex=function(j){return this.sectionIndex[j]},dm.prototype.getCharCode=function(j){return this.text.charCodeAt(j)},dm.prototype.verticalizePunctuation=function(){this.text=hn(this.text)},dm.prototype.trim=function(){for(var j=0,ue=0;ue<this.text.length&&Iw[this.text.charCodeAt(ue)];ue++)j++;for(var Re=this.text.length,Qe=this.text.length-1;Qe>=0&&Qe>=j&&Iw[this.text.charCodeAt(Qe)];Qe--)Re--;this.text=this.text.substring(j,Re),this.sectionIndex=this.sectionIndex.slice(j,Re)},dm.prototype.substring=function(j,ue){var Re=new dm;return Re.text=this.text.substring(j,ue),Re.sectionIndex=this.sectionIndex.slice(j,ue),Re.sections=this.sections,Re},dm.prototype.toString=function(){return this.text},dm.prototype.getMaxScale=function(){var j=this;return this.sectionIndex.reduce(function(ue,Re){return Math.max(ue,j.sections[Re].scale)},0)},dm.prototype.addTextSection=function(j,ue){this.text+=j.text,this.sections.push(ax.forText(j.scale,j.fontStack||ue));for(var Re=this.sections.length-1,Qe=0;Qe<j.text.length;++Qe)this.sectionIndex.push(Re)},dm.prototype.addImageSection=function(j){var ue=j.image?j.image.name:"";if(ue.length===0){re("Can't add FormattedSection with an empty image.");return}var Re=this.getNextImageSectionCharCode();if(!Re){re("Reached maximum number of images "+(UT-BT+2));return}this.text+=String.fromCharCode(Re),this.sections.push(ax.forImage(ue)),this.sectionIndex.push(this.sections.length-1)},dm.prototype.getNextImageSectionCharCode=function(){return this.imageSectionID?this.imageSectionID>=UT?null:++this.imageSectionID:(this.imageSectionID=BT,this.imageSectionID)};function G1(H,j){for(var ue=[],Re=H.text,Qe=0,dt=0,Mt=j;dt<Mt.length;dt+=1){var ir=Mt[dt];ue.push(H.substring(Qe,ir)),Qe=ir}return Qe<Re.length&&ue.push(H.substring(Qe,Re.length)),ue}function PS(H,j,ue,Re,Qe,dt,Mt,ir,Fr,Zr,un,Hn,yi,di,qi,Ia){var Do=dm.fromFeature(H,Qe);Hn===hg.vertical&&Do.verticalizePunctuation();var ho,gs=Uf.processBidirectionalText,Zo=Uf.processStyledBidirectionalText;if(gs&&Do.sections.length===1){ho=[];for(var ms=gs(Do.toString(),d7(Do,Zr,dt,j,Re,di,qi)),Is=0,dl=ms;Is<dl.length;Is+=1){var Xl=dl[Is],Bl=new dm;Bl.text=Xl,Bl.sections=Do.sections;for(var Ku=0;Ku<Xl.length;Ku++)Bl.sectionIndex.push(0);ho.push(Bl)}}else if(Zo){ho=[];for(var _u=Zo(Do.text,Do.sectionIndex,d7(Do,Zr,dt,j,Re,di,qi)),Ou=0,hf=_u;Ou<hf.length;Ou+=1){var Ju=hf[Ou],oc=new dm;oc.text=Ju[0],oc.sectionIndex=Ju[1],oc.sections=Do.sections,ho.push(oc)}}else ho=G1(Do,d7(Do,Zr,dt,j,Re,di,qi));var nd=[],tf={positionedLines:nd,text:Do.toString(),top:un[1],bottom:un[1],left:un[0],right:un[0],writingMode:Hn,iconsInText:!1,verticalizable:!1};return nJ(tf,j,ue,Re,ho,Mt,ir,Fr,Hn,Zr,yi,Ia),XI(nd)?!1:tf}var Iw={};Iw[9]=!0,Iw[10]=!0,Iw[11]=!0,Iw[12]=!0,Iw[13]=!0,Iw[32]=!0;var Vx={};Vx[10]=!0,Vx[32]=!0,Vx[38]=!0,Vx[40]=!0,Vx[41]=!0,Vx[43]=!0,Vx[45]=!0,Vx[47]=!0,Vx[173]=!0,Vx[183]=!0,Vx[8203]=!0,Vx[8208]=!0,Vx[8211]=!0,Vx[8231]=!0;function l7(H,j,ue,Re,Qe,dt){if(j.imageName){var Fr=Re[j.imageName];return Fr?Fr.displaySize[0]*j.scale*wn/dt+Qe:0}else{var Mt=ue[j.fontStack],ir=Mt&&Mt[H];return ir?ir.metrics.advance*j.scale+Qe:0}}function u7(H,j,ue,Re,Qe,dt){for(var Mt=0,ir=0;ir<H.length();ir++){var Fr=H.getSection(ir);Mt+=l7(H.getCharCode(ir),Fr,Re,Qe,j,dt)}var Zr=Math.max(1,Math.ceil(Mt/ue));return Mt/Zr}function J6(H,j,ue,Re){var Qe=Math.pow(H-j,2);return Re?H<j?Qe/2:Qe*2:Qe+Math.abs(ue)*ue}function hC(H,j,ue){var Re=0;return H===10&&(Re-=1e4),ue&&(Re+=150),(H===40||H===65288)&&(Re+=50),(j===41||j===65289)&&(Re+=50),Re}function c7(H,j,ue,Re,Qe,dt){for(var Mt=null,ir=J6(j,ue,Qe,dt),Fr=0,Zr=Re;Fr<Zr.length;Fr+=1){var un=Zr[Fr],Hn=j-un.x,yi=J6(Hn,ue,Qe,dt)+un.badness;yi<=ir&&(Mt=un,ir=yi)}return{index:H,x:j,priorBreak:Mt,badness:ir}}function f7(H){return H?f7(H.priorBreak).concat(H.index):[]}function d7(H,j,ue,Re,Qe,dt,Mt){if(dt!=="point")return[];if(!H)return[];for(var ir=[],Fr=u7(H,j,ue,Re,Qe,Mt),Zr=H.text.indexOf("​")>=0,un=0,Hn=0;Hn<H.length();Hn++){var yi=H.getSection(Hn),di=H.getCharCode(Hn);if(Iw[di]||(un+=l7(di,yi,Re,Qe,j,Mt)),Hn<H.length()-1){var qi=qa(di);(Vx[di]||qi||yi.imageName)&&ir.push(c7(Hn+1,un,Fr,ir,hC(di,H.getCharCode(Hn+1),qi&&Zr),!1))}}return f7(c7(H.length(),un,Fr,ir,0,!0))}function h7(H){var j=.5,ue=.5;switch(H){case"right":case"top-right":case"bottom-right":j=1;break;case"left":case"top-left":case"bottom-left":j=0;break}switch(H){case"bottom":case"bottom-right":case"bottom-left":ue=1;break;case"top":case"top-right":case"top-left":ue=0;break}return{horizontalAlign:j,verticalAlign:ue}}function nJ(H,j,ue,Re,Qe,dt,Mt,ir,Fr,Zr,un,Hn){for(var yi=0,di=Rm,qi=0,Ia=0,Do=ir==="right"?1:ir==="left"?0:.5,ho=0,gs=0,Zo=Qe;gs<Zo.length;gs+=1){var ms=Zo[gs];ms.trim();var Is=ms.getMaxScale(),dl=(Is-1)*wn,Xl={positionedGlyphs:[],lineOffset:0};H.positionedLines[ho]=Xl;var Bl=Xl.positionedGlyphs,Ku=0;if(!ms.length()){di+=dt,++ho;continue}for(var _u=0;_u<ms.length();_u++){var Ou=ms.getSection(_u),hf=ms.getSectionIndex(_u),Ju=ms.getCharCode(_u),oc=0,nd=null,tf=null,qh=null,Lv=wn,Gh=!(Fr===hg.horizontal||!un&&!bo(Ju)||un&&(Iw[Ju]||os(Ju)));if(Ou.imageName){var f0=Re[Ou.imageName];if(!f0)continue;qh=Ou.imageName,H.iconsInText=H.iconsInText||!0,tf=f0.paddedRect;var I0=f0.displaySize;Ou.scale=Ou.scale*wn/Hn,nd={width:I0[0],height:I0[1],left:Mm,top:-q1,advance:Gh?I0[1]:I0[0]};var W1=wn-I0[1]*Ou.scale;oc=dl+W1,Lv=nd.advance;var By=Gh?I0[0]*Ou.scale-wn*Is:I0[1]*Ou.scale-wn*Is;By>0&&By>Ku&&(Ku=By)}else{var $h=ue[Ou.fontStack],Dh=$h&&$h[Ju];if(Dh&&Dh.rect)tf=Dh.rect,nd=Dh.metrics;else{var hm=j[Ou.fontStack],km=hm&&hm[Ju];if(!km)continue;nd=km.metrics}oc=(Is-Ou.scale)*wn}Gh?(H.verticalizable=!0,Bl.push({glyph:Ju,imageName:qh,x:yi,y:di+oc,vertical:Gh,scale:Ou.scale,fontStack:Ou.fontStack,sectionIndex:hf,metrics:nd,rect:tf}),yi+=Lv*Ou.scale+Zr):(Bl.push({glyph:Ju,imageName:qh,x:yi,y:di+oc,vertical:Gh,scale:Ou.scale,fontStack:Ou.fontStack,sectionIndex:hf,metrics:nd,rect:tf}),yi+=nd.advance*Ou.scale+Zr)}if(Bl.length!==0){var qx=yi-Zr;qi=Math.max(qx,qi),iJ(Bl,0,Bl.length-1,Do,Ku)}yi=0;var Gx=dt*Is+Ku;Xl.lineOffset=Math.max(Ku,dl),di+=Gx,Ia=Math.max(Gx,Ia),++ho}var Y1=di-Rm,I_=h7(Mt),P_=I_.horizontalAlign,c1=I_.verticalAlign;aJ(H.positionedLines,Do,P_,c1,qi,Ia,dt,Y1,Qe.length),H.top+=-c1*Y1,H.bottom=H.top+Y1,H.left+=-P_*qi,H.right=H.left+qi}function iJ(H,j,ue,Re,Qe){if(!(!Re&&!Qe))for(var dt=H[ue],Mt=dt.metrics.advance*dt.scale,ir=(H[ue].x+Mt)*Re,Fr=j;Fr<=ue;Fr++)H[Fr].x-=ir,H[Fr].y+=Qe}function aJ(H,j,ue,Re,Qe,dt,Mt,ir,Fr){var Zr=(j-ue)*Qe,un=0;dt!==Mt?un=-ir*Re-Rm:un=(-Re*Fr+.5)*Mt;for(var Hn=0,yi=H;Hn<yi.length;Hn+=1)for(var di=yi[Hn],qi=0,Ia=di.positionedGlyphs;qi<Ia.length;qi+=1){var Do=Ia[qi];Do.x+=Zr,Do.y+=un}}function oJ(H,j,ue){var Re=h7(ue),Qe=Re.horizontalAlign,dt=Re.verticalAlign,Mt=j[0],ir=j[1],Fr=Mt-H.displaySize[0]*Qe,Zr=Fr+H.displaySize[0],un=ir-H.displaySize[1]*dt,Hn=un+H.displaySize[1];return{image:H,top:un,bottom:Hn,left:Fr,right:Zr}}function RH(H,j,ue,Re,Qe,dt){var Mt=H.image,ir;if(Mt.content){var Fr=Mt.content,Zr=Mt.pixelRatio||1;ir=[Fr[0]/Zr,Fr[1]/Zr,Mt.displaySize[0]-Fr[2]/Zr,Mt.displaySize[1]-Fr[3]/Zr]}var un=j.left*dt,Hn=j.right*dt,yi,di,qi,Ia;ue==="width"||ue==="both"?(Ia=Qe[0]+un-Re[3],di=Qe[0]+Hn+Re[1]):(Ia=Qe[0]+(un+Hn-Mt.displaySize[0])/2,di=Ia+Mt.displaySize[0]);var Do=j.top*dt,ho=j.bottom*dt;return ue==="height"||ue==="both"?(yi=Qe[1]+Do-Re[0],qi=Qe[1]+ho+Re[2]):(yi=Qe[1]+(Do+ho-Mt.displaySize[1])/2,qi=yi+Mt.displaySize[1]),{image:Mt,top:yi,right:di,bottom:qi,left:Ia,collisionPadding:ir}}var ZI=(function(H){function j(ue,Re,Qe,dt){H.call(this,ue,Re),this.angle=Qe,dt!==void 0&&(this.segment=dt)}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype.clone=function(){return new j(this.x,this.y,this.angle,this.segment)},j})(v);Yr("Anchor",ZI);var Ny=128;function KI(H,j){var ue=j.expression;if(ue.kind==="constant"){var Re=ue.evaluate(new Mf(H+1));return{kind:"constant",layoutSize:Re}}else{if(ue.kind==="source")return{kind:"source"};for(var Qe=ue.zoomStops,dt=ue.interpolationType,Mt=0;Mt<Qe.length&&Qe[Mt]<=H;)Mt++;Mt=Math.max(0,Mt-1);for(var ir=Mt;ir<Qe.length&&Qe[ir]<H+1;)ir++;ir=Math.min(Qe.length-1,ir);var Fr=Qe[Mt],Zr=Qe[ir];if(ue.kind==="composite")return{kind:"composite",minZoom:Fr,maxZoom:Zr,interpolationType:dt};var un=ue.evaluate(new Mf(Fr)),Hn=ue.evaluate(new Mf(Zr));return{kind:"camera",minZoom:Fr,maxZoom:Zr,minSize:un,maxSize:Hn,interpolationType:dt}}}function p7(H,j,ue){var Re=j.uSize,Qe=j.uSizeT,dt=ue.lowerSize,Mt=ue.upperSize;return H.kind==="source"?dt/Ny:H.kind==="composite"?Ud(dt/Ny,Mt/Ny,Qe):Re}function kH(H,j){var ue=0,Re=0;if(H.kind==="constant")Re=H.layoutSize;else if(H.kind!=="source"){var Qe=H.interpolationType,dt=H.minZoom,Mt=H.maxZoom,ir=Qe?g(Np.interpolationFactor(Qe,j,dt,Mt),0,1):0;H.kind==="camera"?Re=Ud(H.minSize,H.maxSize,ir):ue=ir}return{uSizeT:ue,uSize:Re}}var sJ=Object.freeze({__proto__:null,getSizeData:KI,evaluateSizeForFeature:p7,evaluateSizeForZoom:kH,SIZE_PACK_FACTOR:Ny});function IH(H,j,ue,Re,Qe){if(j.segment===void 0)return!0;for(var dt=j,Mt=j.segment+1,ir=0;ir>-ue/2;){if(Mt--,Mt<0)return!1;ir-=H[Mt].dist(dt),dt=H[Mt]}ir+=H[Mt].dist(H[Mt+1]),Mt++;for(var Fr=[],Zr=0;ir<ue/2;){var un=H[Mt-1],Hn=H[Mt],yi=H[Mt+1];if(!yi)return!1;var di=un.angleTo(Hn)-Hn.angleTo(yi);for(di=Math.abs((di+3*Math.PI)%(Math.PI*2)-Math.PI),Fr.push({distance:ir,angleDelta:di}),Zr+=di;ir-Fr[0].distance>Re;)Zr-=Fr.shift().angleDelta;if(Zr>Qe)return!1;Mt++,ir+=Hn.dist(yi)}return!0}function yb(H){for(var j=0,ue=0;ue<H.length-1;ue++)j+=H[ue].dist(H[ue+1]);return j}function Pw(H,j,ue){return H?3/5*j*ue:0}function n5(H,j){return Math.max(H?H.right-H.left:0,j?j.right-j.left:0)}function HT(H,j,ue,Re,Qe,dt){for(var Mt=Pw(ue,Qe,dt),ir=n5(ue,Re)*dt,Fr=0,Zr=yb(H)/2,un=0;un<H.length-1;un++){var Hn=H[un],yi=H[un+1],di=Hn.dist(yi);if(Fr+di>Zr){var qi=(Zr-Fr)/di,Ia=Ud(Hn.x,yi.x,qi),Do=Ud(Hn.y,yi.y,qi),ho=new ZI(Ia,Do,yi.angleTo(Hn),un);return ho._round(),!Mt||IH(H,ho,ir,Mt,j)?ho:void 0}Fr+=di}}function $R(H,j,ue,Re,Qe,dt,Mt,ir,Fr){var Zr=Pw(Re,dt,Mt),un=n5(Re,Qe),Hn=un*Mt,yi=H[0].x===0||H[0].x===Fr||H[0].y===0||H[0].y===Fr;j-Hn<j/4&&(j=Hn+j/4);var di=dt*2,qi=yi?j/2*ir%j:(un/2+di)*Mt*ir%j;return jT(H,qi,j,Zr,ue,Hn,yi,!1,Fr)}function jT(H,j,ue,Re,Qe,dt,Mt,ir,Fr){for(var Zr=dt/2,un=yb(H),Hn=0,yi=j-ue,di=[],qi=0;qi<H.length-1;qi++){for(var Ia=H[qi],Do=H[qi+1],ho=Ia.dist(Do),gs=Do.angleTo(Ia);yi+ue<Hn+ho;){yi+=ue;var Zo=(yi-Hn)/ho,ms=Ud(Ia.x,Do.x,Zo),Is=Ud(Ia.y,Do.y,Zo);if(ms>=0&&ms<Fr&&Is>=0&&Is<Fr&&yi-Zr>=0&&yi+Zr<=un){var dl=new ZI(ms,Is,gs,qi);dl._round(),(!Re||IH(H,dl,dt,Re,Qe))&&di.push(dl)}}Hn+=ho}return!ir&&!di.length&&!Mt&&(di=jT(H,Hn/2,ue,Re,Qe,dt,Mt,!0,Fr)),di}function m_e(H,j,ue,Re,Qe){for(var dt=[],Mt=0;Mt<H.length;Mt++)for(var ir=H[Mt],Fr=void 0,Zr=0;Zr<ir.length-1;Zr++){var un=ir[Zr],Hn=ir[Zr+1];un.x<j&&Hn.x<j||(un.x<j?un=new v(j,un.y+(Hn.y-un.y)*((j-un.x)/(Hn.x-un.x)))._round():Hn.x<j&&(Hn=new v(j,un.y+(Hn.y-un.y)*((j-un.x)/(Hn.x-un.x)))._round()),!(un.y<ue&&Hn.y<ue)&&(un.y<ue?un=new v(un.x+(Hn.x-un.x)*((ue-un.y)/(Hn.y-un.y)),ue)._round():Hn.y<ue&&(Hn=new v(un.x+(Hn.x-un.x)*((ue-un.y)/(Hn.y-un.y)),ue)._round()),!(un.x>=Re&&Hn.x>=Re)&&(un.x>=Re?un=new v(Re,un.y+(Hn.y-un.y)*((Re-un.x)/(Hn.x-un.x)))._round():Hn.x>=Re&&(Hn=new v(Re,un.y+(Hn.y-un.y)*((Re-un.x)/(Hn.x-un.x)))._round()),!(un.y>=Qe&&Hn.y>=Qe)&&(un.y>=Qe?un=new v(un.x+(Hn.x-un.x)*((Qe-un.y)/(Hn.y-un.y)),Qe)._round():Hn.y>=Qe&&(Hn=new v(un.x+(Hn.x-un.x)*((Qe-un.y)/(Hn.y-un.y)),Qe)._round()),(!Fr||!un.equals(Fr[Fr.length-1]))&&(Fr=[un],dt.push(Fr)),Fr.push(Hn)))))}return dt}var Q6=Mm;function g_e(H,j,ue,Re){var Qe=[],dt=H.image,Mt=dt.pixelRatio,ir=dt.paddedRect.w-2*Q6,Fr=dt.paddedRect.h-2*Q6,Zr=H.right-H.left,un=H.bottom-H.top,Hn=dt.stretchX||[[0,ir]],yi=dt.stretchY||[[0,Fr]],di=function($h,Dh){return $h+Dh[1]-Dh[0]},qi=Hn.reduce(di,0),Ia=yi.reduce(di,0),Do=ir-qi,ho=Fr-Ia,gs=0,Zo=qi,ms=0,Is=Ia,dl=0,Xl=Do,Bl=0,Ku=ho;if(dt.content&&Re){var _u=dt.content;gs=PH(Hn,0,_u[0]),ms=PH(yi,0,_u[1]),Zo=PH(Hn,_u[0],_u[2]),Is=PH(yi,_u[1],_u[3]),dl=_u[0]-gs,Bl=_u[1]-ms,Xl=_u[2]-_u[0]-Zo,Ku=_u[3]-_u[1]-Is}var Ou=function($h,Dh,hm,km){var f0=DH($h.stretch-gs,Zo,Zr,H.left),I0=LH($h.fixed-dl,Xl,$h.stretch,qi),W1=DH(Dh.stretch-ms,Is,un,H.top),By=LH(Dh.fixed-Bl,Ku,Dh.stretch,Ia),qx=DH(hm.stretch-gs,Zo,Zr,H.left),Gx=LH(hm.fixed-dl,Xl,hm.stretch,qi),Y1=DH(km.stretch-ms,Is,un,H.top),I_=LH(km.fixed-Bl,Ku,km.stretch,Ia),P_=new v(f0,W1),c1=new v(qx,W1),D_=new v(qx,Y1),DS=new v(f0,Y1),XR=new v(I0/Mt,By/Mt),eP=new v(Gx/Mt,I_/Mt),tP=j*Math.PI/180;if(tP){var rP=Math.sin(tP),sO=Math.cos(tP),A3=[sO,-rP,rP,sO];P_._matMult(A3),c1._matMult(A3),DS._matMult(A3),D_._matMult(A3)}var UH=$h.stretch+$h.fixed,vJ=hm.stretch+hm.fixed,HH=Dh.stretch+Dh.fixed,mJ=km.stretch+km.fixed,VT={x:dt.paddedRect.x+Q6+UH,y:dt.paddedRect.y+Q6+HH,w:vJ-UH,h:mJ-HH},lO=Xl/Mt/Zr,jH=Ku/Mt/un;return{tl:P_,tr:c1,bl:DS,br:D_,tex:VT,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:XR,pixelOffsetBR:eP,minFontScaleX:lO,minFontScaleY:jH,isSDF:ue}};if(!Re||!dt.stretchX&&!dt.stretchY)Qe.push(Ou({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:ir+1},{fixed:0,stretch:Fr+1}));else for(var hf=y_e(Hn,Do,qi),Ju=y_e(yi,ho,Ia),oc=0;oc<hf.length-1;oc++)for(var nd=hf[oc],tf=hf[oc+1],qh=0;qh<Ju.length-1;qh++){var Lv=Ju[qh],Gh=Ju[qh+1];Qe.push(Ou(nd,Lv,tf,Gh))}return Qe}function PH(H,j,ue){for(var Re=0,Qe=0,dt=H;Qe<dt.length;Qe+=1){var Mt=dt[Qe];Re+=Math.max(j,Math.min(ue,Mt[1]))-Math.max(j,Math.min(ue,Mt[0]))}return Re}function y_e(H,j,ue){for(var Re=[{fixed:-Q6,stretch:0}],Qe=0,dt=H;Qe<dt.length;Qe+=1){var Mt=dt[Qe],ir=Mt[0],Fr=Mt[1],Zr=Re[Re.length-1];Re.push({fixed:ir-Zr.stretch,stretch:Zr.stretch}),Re.push({fixed:ir-Zr.stretch,stretch:Zr.stretch+(Fr-ir)})}return Re.push({fixed:j+Q6,stretch:ue}),Re}function DH(H,j,ue,Re){return H/j*ue+Re}function LH(H,j,ue,Re){return H-j*ue/Re}function Znt(H,j,ue,Re,Qe,dt,Mt,ir){for(var Fr=Re.layout.get("text-rotate").evaluate(dt,{})*Math.PI/180,Zr=[],un=0,Hn=j.positionedLines;un<Hn.length;un+=1)for(var yi=Hn[un],di=0,qi=yi.positionedGlyphs;di<qi.length;di+=1){var Ia=qi[di];if(Ia.rect){var Do=Ia.rect||{},ho=1,gs=q1+ho,Zo=!0,ms=1,Is=0,dl=(Qe||ir)&&Ia.vertical,Xl=Ia.metrics.advance*Ia.scale/2;if(ir&&j.verticalizable){var Bl=(Ia.scale-1)*wn,Ku=(wn-Ia.metrics.width*Ia.scale)/2;Is=yi.lineOffset/2-(Ia.imageName?-Ku:Bl)}if(Ia.imageName){var _u=Mt[Ia.imageName];Zo=_u.sdf,ms=_u.pixelRatio,gs=Mm/ms}var Ou=Qe?[Ia.x+Xl,Ia.y]:[0,0],hf=Qe?[0,0]:[Ia.x+Xl+ue[0],Ia.y+ue[1]-Is],Ju=[0,0];dl&&(Ju=hf,hf=[0,0]);var oc=(Ia.metrics.left-gs)*Ia.scale-Xl+hf[0],nd=(-Ia.metrics.top-gs)*Ia.scale+hf[1],tf=oc+Do.w*Ia.scale/ms,qh=nd+Do.h*Ia.scale/ms,Lv=new v(oc,nd),Gh=new v(tf,nd),$h=new v(oc,qh),Dh=new v(tf,qh);if(dl){var hm=new v(-Xl,Xl-Rm),km=-Math.PI/2,f0=wn/2-Xl,I0=Ia.imageName?f0:0,W1=new v(5-Rm-f0,-I0),By=new(Function.prototype.bind.apply(v,[null].concat(Ju)));Lv._rotateAround(km,hm)._add(W1)._add(By),Gh._rotateAround(km,hm)._add(W1)._add(By),$h._rotateAround(km,hm)._add(W1)._add(By),Dh._rotateAround(km,hm)._add(W1)._add(By)}if(Fr){var qx=Math.sin(Fr),Gx=Math.cos(Fr),Y1=[Gx,-qx,qx,Gx];Lv._matMult(Y1),Gh._matMult(Y1),$h._matMult(Y1),Dh._matMult(Y1)}var I_=new v(0,0),P_=new v(0,0),c1=0,D_=0;Zr.push({tl:Lv,tr:Gh,bl:$h,br:Dh,tex:Do,writingMode:j.writingMode,glyphOffset:Ou,sectionIndex:Ia.sectionIndex,isSDF:Zo,pixelOffsetTL:I_,pixelOffsetBR:P_,minFontScaleX:c1,minFontScaleY:D_})}}return Zr}var OH=function(j,ue,Re,Qe,dt,Mt,ir,Fr,Zr,un){if(this.boxStartIndex=j.length,Zr){var Hn=Mt.top,yi=Mt.bottom,di=Mt.collisionPadding;di&&(Hn-=di[1],yi+=di[3]);var qi=yi-Hn;qi>0&&(qi=Math.max(10,qi),this.circleDiameter=qi)}else{var Ia=Mt.top*ir-Fr,Do=Mt.bottom*ir+Fr,ho=Mt.left*ir-Fr,gs=Mt.right*ir+Fr,Zo=Mt.collisionPadding;if(Zo&&(ho-=Zo[0]*ir,Ia-=Zo[1]*ir,gs+=Zo[2]*ir,Do+=Zo[3]*ir),un){var ms=new v(ho,Ia),Is=new v(gs,Ia),dl=new v(ho,Do),Xl=new v(gs,Do),Bl=un*Math.PI/180;ms._rotate(Bl),Is._rotate(Bl),dl._rotate(Bl),Xl._rotate(Bl),ho=Math.min(ms.x,Is.x,dl.x,Xl.x),gs=Math.max(ms.x,Is.x,dl.x,Xl.x),Ia=Math.min(ms.y,Is.y,dl.y,Xl.y),Do=Math.max(ms.y,Is.y,dl.y,Xl.y)}j.emplaceBack(ue.x,ue.y,ho,Ia,gs,Do,Re,Qe,dt)}this.boxEndIndex=j.length},eO=function(j,ue){if(j===void 0&&(j=[]),ue===void 0&&(ue=Knt),this.data=j,this.length=this.data.length,this.compare=ue,this.length>0)for(var Re=(this.length>>1)-1;Re>=0;Re--)this._down(Re)};eO.prototype.push=function(j){this.data.push(j),this.length++,this._up(this.length-1)},eO.prototype.pop=function(){if(this.length!==0){var j=this.data[0],ue=this.data.pop();return this.length--,this.length>0&&(this.data[0]=ue,this._down(0)),j}},eO.prototype.peek=function(){return this.data[0]},eO.prototype._up=function(j){for(var ue=this,Re=ue.data,Qe=ue.compare,dt=Re[j];j>0;){var Mt=j-1>>1,ir=Re[Mt];if(Qe(dt,ir)>=0)break;Re[j]=ir,j=Mt}Re[j]=dt},eO.prototype._down=function(j){for(var ue=this,Re=ue.data,Qe=ue.compare,dt=this.length>>1,Mt=Re[j];j<dt;){var ir=(j<<1)+1,Fr=Re[ir],Zr=ir+1;if(Zr<this.length&&Qe(Re[Zr],Fr)<0&&(ir=Zr,Fr=Re[Zr]),Qe(Fr,Mt)>=0)break;Re[j]=Fr,j=ir}Re[j]=Mt};function Knt(H,j){return H<j?-1:H>j?1:0}function Jnt(H,j,ue){ue===void 0&&(ue=!1);for(var Re=1/0,Qe=1/0,dt=-1/0,Mt=-1/0,ir=H[0],Fr=0;Fr<ir.length;Fr++){var Zr=ir[Fr];(!Fr||Zr.x<Re)&&(Re=Zr.x),(!Fr||Zr.y<Qe)&&(Qe=Zr.y),(!Fr||Zr.x>dt)&&(dt=Zr.x),(!Fr||Zr.y>Mt)&&(Mt=Zr.y)}var un=dt-Re,Hn=Mt-Qe,yi=Math.min(un,Hn),di=yi/2,qi=new eO([],Qnt);if(yi===0)return new v(Re,Qe);for(var Ia=Re;Ia<dt;Ia+=yi)for(var Do=Qe;Do<Mt;Do+=yi)qi.push(new tO(Ia+di,Do+di,di,H));for(var ho=tit(H),gs=qi.length;qi.length;){var Zo=qi.pop();(Zo.d>ho.d||!ho.d)&&(ho=Zo,ue&&console.log("found best %d after %d probes",Math.round(1e4*Zo.d)/1e4,gs)),!(Zo.max-ho.d<=j)&&(di=Zo.h/2,qi.push(new tO(Zo.p.x-di,Zo.p.y-di,di,H)),qi.push(new tO(Zo.p.x+di,Zo.p.y-di,di,H)),qi.push(new tO(Zo.p.x-di,Zo.p.y+di,di,H)),qi.push(new tO(Zo.p.x+di,Zo.p.y+di,di,H)),gs+=4)}return ue&&(console.log("num probes: "+gs),console.log("best distance: "+ho.d)),ho.p}function Qnt(H,j){return j.max-H.max}function tO(H,j,ue,Re){this.p=new v(H,j),this.h=ue,this.d=eit(this.p,Re),this.max=this.d+this.h*Math.SQRT2}function eit(H,j){for(var ue=!1,Re=1/0,Qe=0;Qe<j.length;Qe++)for(var dt=j[Qe],Mt=0,ir=dt.length,Fr=ir-1;Mt<ir;Fr=Mt++){var Zr=dt[Mt],un=dt[Fr];Zr.y>H.y!=un.y>H.y&&H.x<(un.x-Zr.x)*(H.y-Zr.y)/(un.y-Zr.y)+Zr.x&&(ue=!ue),Re=Math.min(Re,uC(H,Zr,un))}return(ue?1:-1)*Math.sqrt(Re)}function tit(H){for(var j=0,ue=0,Re=0,Qe=H[0],dt=0,Mt=Qe.length,ir=Mt-1;dt<Mt;ir=dt++){var Fr=Qe[dt],Zr=Qe[ir],un=Fr.x*Zr.y-Zr.x*Fr.y;ue+=(Fr.x+Zr.x)*un,Re+=(Fr.y+Zr.y)*un,j+=un*3}return new tO(ue/j,Re/j,0,H)}var rO=7,lJ=Number.POSITIVE_INFINITY;function b_e(H,j){function ue(Qe,dt){var Mt=0,ir=0;dt<0&&(dt=0);var Fr=dt/Math.sqrt(2);switch(Qe){case"top-right":case"top-left":ir=Fr-rO;break;case"bottom-right":case"bottom-left":ir=-Fr+rO;break;case"bottom":ir=-dt+rO;break;case"top":ir=dt-rO;break}switch(Qe){case"top-right":case"bottom-right":Mt=-Fr;break;case"top-left":case"bottom-left":Mt=Fr;break;case"left":Mt=dt;break;case"right":Mt=-dt;break}return[Mt,ir]}function Re(Qe,dt,Mt){var ir=0,Fr=0;switch(dt=Math.abs(dt),Mt=Math.abs(Mt),Qe){case"top-right":case"top-left":case"top":Fr=Mt-rO;break;case"bottom-right":case"bottom-left":case"bottom":Fr=-Mt+rO;break}switch(Qe){case"top-right":case"bottom-right":case"right":ir=-dt;break;case"top-left":case"bottom-left":case"left":ir=dt;break}return[ir,Fr]}return j[1]!==lJ?Re(H,j[0],j[1]):ue(H,j[0])}function rit(H,j,ue,Re,Qe,dt,Mt){H.createArrays();var ir=512*H.overscaling;H.tilePixelRatio=Qs/ir,H.compareText={},H.iconsNeedLinear=!1;var Fr=H.layers[0].layout,Zr=H.layers[0]._unevaluatedLayout._values,un={};if(H.textSizeData.kind==="composite"){var Hn=H.textSizeData,yi=Hn.minZoom,di=Hn.maxZoom;un.compositeTextSizes=[Zr["text-size"].possiblyEvaluate(new Mf(yi),Mt),Zr["text-size"].possiblyEvaluate(new Mf(di),Mt)]}if(H.iconSizeData.kind==="composite"){var qi=H.iconSizeData,Ia=qi.minZoom,Do=qi.maxZoom;un.compositeIconSizes=[Zr["icon-size"].possiblyEvaluate(new Mf(Ia),Mt),Zr["icon-size"].possiblyEvaluate(new Mf(Do),Mt)]}un.layoutTextSize=Zr["text-size"].possiblyEvaluate(new Mf(H.zoom+1),Mt),un.layoutIconSize=Zr["icon-size"].possiblyEvaluate(new Mf(H.zoom+1),Mt),un.textMaxSize=Zr["text-size"].possiblyEvaluate(new Mf(18));for(var ho=Fr.get("text-line-height")*wn,gs=Fr.get("text-rotation-alignment")==="map"&&Fr.get("symbol-placement")!=="point",Zo=Fr.get("text-keep-upright"),ms=Fr.get("text-size"),Is=function(){var Bl=Xl[dl],Ku=Fr.get("text-font").evaluate(Bl,{},Mt).join(","),_u=ms.evaluate(Bl,{},Mt),Ou=un.layoutTextSize.evaluate(Bl,{},Mt),hf=un.layoutIconSize.evaluate(Bl,{},Mt),Ju={horizontal:{},vertical:void 0},oc=Bl.text,nd=[0,0];if(oc){var tf=oc.toString(),qh=Fr.get("text-letter-spacing").evaluate(Bl,{},Mt)*wn,Lv=ca(tf)?qh:0,Gh=Fr.get("text-anchor").evaluate(Bl,{},Mt),$h=Fr.get("text-variable-anchor");if(!$h){var Dh=Fr.get("text-radial-offset").evaluate(Bl,{},Mt);Dh?nd=b_e(Gh,[Dh*wn,lJ]):nd=Fr.get("text-offset").evaluate(Bl,{},Mt).map(function(XR){return XR*wn})}var hm=gs?"center":Fr.get("text-justify").evaluate(Bl,{},Mt),km=Fr.get("symbol-placement"),f0=km==="point"?Fr.get("text-max-width").evaluate(Bl,{},Mt)*wn:0,I0=function(){H.allowVerticalPlacement&&_o(tf)&&(Ju.vertical=PS(oc,j,ue,Qe,Ku,f0,ho,Gh,"left",Lv,nd,hg.vertical,!0,km,Ou,_u))};if(!gs&&$h){for(var W1=hm==="auto"?$h.map(function(XR){return uJ(XR)}):[hm],By=!1,qx=0;qx<W1.length;qx++){var Gx=W1[qx];if(!Ju.horizontal[Gx])if(By)Ju.horizontal[Gx]=Ju.horizontal[0];else{var Y1=PS(oc,j,ue,Qe,Ku,f0,ho,"center",Gx,Lv,nd,hg.horizontal,!1,km,Ou,_u);Y1&&(Ju.horizontal[Gx]=Y1,By=Y1.positionedLines.length===1)}}I0()}else{hm==="auto"&&(hm=uJ(Gh));var I_=PS(oc,j,ue,Qe,Ku,f0,ho,Gh,hm,Lv,nd,hg.horizontal,!1,km,Ou,_u);I_&&(Ju.horizontal[hm]=I_),I0(),_o(tf)&&gs&&Zo&&(Ju.vertical=PS(oc,j,ue,Qe,Ku,f0,ho,Gh,hm,Lv,nd,hg.vertical,!1,km,Ou,_u))}}var P_=void 0,c1=!1;if(Bl.icon&&Bl.icon.name){var D_=Re[Bl.icon.name];D_&&(P_=oJ(Qe[Bl.icon.name],Fr.get("icon-offset").evaluate(Bl,{},Mt),Fr.get("icon-anchor").evaluate(Bl,{},Mt)),c1=D_.sdf,H.sdfIcons===void 0?H.sdfIcons=D_.sdf:H.sdfIcons!==D_.sdf&&re("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(D_.pixelRatio!==H.pixelRatio||Fr.get("icon-rotate").constantOr(1)!==0)&&(H.iconsNeedLinear=!0))}var DS=__e(Ju.horizontal)||Ju.vertical;H.iconsInText=DS?DS.iconsInText:!1,(DS||P_)&&nit(H,Bl,Ju,P_,Re,un,Ou,hf,nd,c1,Mt)},dl=0,Xl=H.features;dl<Xl.length;dl+=1)Is();dt&&H.generateCollisionDebugBuffers()}function uJ(H){switch(H){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function nit(H,j,ue,Re,Qe,dt,Mt,ir,Fr,Zr,un){var Hn=dt.textMaxSize.evaluate(j,{});Hn===void 0&&(Hn=Mt);var yi=H.layers[0].layout,di=yi.get("icon-offset").evaluate(j,{},un),qi=__e(ue.horizontal),Ia=24,Do=Mt/Ia,ho=H.tilePixelRatio*Do,gs=H.tilePixelRatio*Hn/Ia,Zo=H.tilePixelRatio*ir,ms=H.tilePixelRatio*yi.get("symbol-spacing"),Is=yi.get("text-padding")*H.tilePixelRatio,dl=yi.get("icon-padding")*H.tilePixelRatio,Xl=yi.get("text-max-angle")/180*Math.PI,Bl=yi.get("text-rotation-alignment")==="map"&&yi.get("symbol-placement")!=="point",Ku=yi.get("icon-rotation-alignment")==="map"&&yi.get("symbol-placement")!=="point",_u=yi.get("symbol-placement"),Ou=ms/2,hf=yi.get("icon-text-fit"),Ju;Re&&hf!=="none"&&(H.allowVerticalPlacement&&ue.vertical&&(Ju=RH(Re,ue.vertical,hf,yi.get("icon-text-fit-padding"),di,Do)),qi&&(Re=RH(Re,qi,hf,yi.get("icon-text-fit-padding"),di,Do)));var oc=function(sO,A3){A3.x<0||A3.x>=Qs||A3.y<0||A3.y>=Qs||iit(H,A3,sO,ue,Re,Qe,Ju,H.layers[0],H.collisionBoxArray,j.index,j.sourceLayerIndex,H.index,ho,Is,Bl,Fr,Zo,dl,Ku,di,j,dt,Zr,un,Mt)};if(_u==="line")for(var nd=0,tf=m_e(j.geometry,0,0,Qs,Qs);nd<tf.length;nd+=1)for(var qh=tf[nd],Lv=$R(qh,ms,Xl,ue.vertical||qi,Re,Ia,gs,H.overscaling,Qs),Gh=0,$h=Lv;Gh<$h.length;Gh+=1){var Dh=$h[Gh],hm=qi;(!hm||!ait(H,hm.text,Ou,Dh))&&oc(qh,Dh)}else if(_u==="line-center")for(var km=0,f0=j.geometry;km<f0.length;km+=1){var I0=f0[km];if(I0.length>1){var W1=HT(I0,Xl,ue.vertical||qi,Re,Ia,gs);W1&&oc(I0,W1)}}else if(j.type==="Polygon")for(var By=0,qx=T3(j.geometry,0);By<qx.length;By+=1){var Gx=qx[By],Y1=Jnt(Gx,16);oc(Gx[0],new ZI(Y1.x,Y1.y,0))}else if(j.type==="LineString")for(var I_=0,P_=j.geometry;I_<P_.length;I_+=1){var c1=P_[I_];oc(c1,new ZI(c1[0].x,c1[0].y,0))}else if(j.type==="Point")for(var D_=0,DS=j.geometry;D_<DS.length;D_+=1)for(var XR=DS[D_],eP=0,tP=XR;eP<tP.length;eP+=1){var rP=tP[eP];oc([rP],new ZI(rP.x,rP.y,0))}}var v7=255,JI=v7*Ny;function x_e(H,j,ue,Re,Qe,dt,Mt,ir,Fr,Zr,un,Hn,yi,di,qi){var Ia=Znt(j,ue,ir,Qe,dt,Mt,Re,H.allowVerticalPlacement),Do=H.textSizeData,ho=null;Do.kind==="source"?(ho=[Ny*Qe.layout.get("text-size").evaluate(Mt,{})],ho[0]>JI&&re(H.layerIds[0]+': Value for "text-size" is >= '+v7+'. Reduce your "text-size".')):Do.kind==="composite"&&(ho=[Ny*di.compositeTextSizes[0].evaluate(Mt,{},qi),Ny*di.compositeTextSizes[1].evaluate(Mt,{},qi)],(ho[0]>JI||ho[1]>JI)&&re(H.layerIds[0]+': Value for "text-size" is >= '+v7+'. Reduce your "text-size".')),H.addSymbols(H.text,Ia,ho,ir,dt,Mt,Zr,j,Fr.lineStartIndex,Fr.lineLength,yi,qi);for(var gs=0,Zo=un;gs<Zo.length;gs+=1){var ms=Zo[gs];Hn[ms]=H.text.placedSymbolArray.length-1}return Ia.length*4}function __e(H){for(var j in H)return H[j];return null}function iit(H,j,ue,Re,Qe,dt,Mt,ir,Fr,Zr,un,Hn,yi,di,qi,Ia,Do,ho,gs,Zo,ms,Is,dl,Xl,Bl){var Ku,_u=H.addToLineVertexArray(j,ue),Ou,hf,Ju,oc,nd=0,tf=0,qh=0,Lv=0,Gh=-1,$h=-1,Dh={},hm=We(""),km=0,f0=0;if(ir._unevaluatedLayout.getValue("text-radial-offset")===void 0?(Ku=ir.layout.get("text-offset").evaluate(ms,{},Xl).map(function(y7){return y7*wn}),km=Ku[0],f0=Ku[1]):(km=ir.layout.get("text-radial-offset").evaluate(ms,{},Xl)*wn,f0=lJ),H.allowVerticalPlacement&&Re.vertical){var I0=ir.layout.get("text-rotate").evaluate(ms,{},Xl),W1=I0+90,By=Re.vertical;Ju=new OH(Fr,j,Zr,un,Hn,By,yi,di,qi,W1),Mt&&(oc=new OH(Fr,j,Zr,un,Hn,Mt,Do,ho,qi,W1))}if(Qe){var qx=ir.layout.get("icon-rotate").evaluate(ms,{}),Gx=ir.layout.get("icon-text-fit")!=="none",Y1=g_e(Qe,qx,dl,Gx),I_=Mt?g_e(Mt,qx,dl,Gx):void 0;hf=new OH(Fr,j,Zr,un,Hn,Qe,Do,ho,!1,qx),nd=Y1.length*4;var P_=H.iconSizeData,c1=null;P_.kind==="source"?(c1=[Ny*ir.layout.get("icon-size").evaluate(ms,{})],c1[0]>JI&&re(H.layerIds[0]+': Value for "icon-size" is >= '+v7+'. Reduce your "icon-size".')):P_.kind==="composite"&&(c1=[Ny*Is.compositeIconSizes[0].evaluate(ms,{},Xl),Ny*Is.compositeIconSizes[1].evaluate(ms,{},Xl)],(c1[0]>JI||c1[1]>JI)&&re(H.layerIds[0]+': Value for "icon-size" is >= '+v7+'. Reduce your "icon-size".')),H.addSymbols(H.icon,Y1,c1,Zo,gs,ms,!1,j,_u.lineStartIndex,_u.lineLength,-1,Xl),Gh=H.icon.placedSymbolArray.length-1,I_&&(tf=I_.length*4,H.addSymbols(H.icon,I_,c1,Zo,gs,ms,hg.vertical,j,_u.lineStartIndex,_u.lineLength,-1,Xl),$h=H.icon.placedSymbolArray.length-1)}for(var D_ in Re.horizontal){var DS=Re.horizontal[D_];if(!Ou){hm=We(DS.text);var XR=ir.layout.get("text-rotate").evaluate(ms,{},Xl);Ou=new OH(Fr,j,Zr,un,Hn,DS,yi,di,qi,XR)}var eP=DS.positionedLines.length===1;if(qh+=x_e(H,j,DS,dt,ir,qi,ms,Ia,_u,Re.vertical?hg.horizontal:hg.horizontalOnly,eP?Object.keys(Re.horizontal):[D_],Dh,Gh,Is,Xl),eP)break}Re.vertical&&(Lv+=x_e(H,j,Re.vertical,dt,ir,qi,ms,Ia,_u,hg.vertical,["vertical"],Dh,$h,Is,Xl));var tP=Ou?Ou.boxStartIndex:H.collisionBoxArray.length,rP=Ou?Ou.boxEndIndex:H.collisionBoxArray.length,sO=Ju?Ju.boxStartIndex:H.collisionBoxArray.length,A3=Ju?Ju.boxEndIndex:H.collisionBoxArray.length,UH=hf?hf.boxStartIndex:H.collisionBoxArray.length,vJ=hf?hf.boxEndIndex:H.collisionBoxArray.length,HH=oc?oc.boxStartIndex:H.collisionBoxArray.length,mJ=oc?oc.boxEndIndex:H.collisionBoxArray.length,VT=-1,lO=function(y7,F_e){return y7&&y7.circleDiameter?Math.max(y7.circleDiameter,F_e):F_e};VT=lO(Ou,VT),VT=lO(Ju,VT),VT=lO(hf,VT),VT=lO(oc,VT);var jH=VT>-1?1:0;jH&&(VT*=Bl/wn),H.glyphOffsetArray.length>=Dv.MAX_GLYPHS&&re("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),ms.sortKey!==void 0&&H.addToSortKeyRanges(H.symbolInstances.length,ms.sortKey),H.symbolInstances.emplaceBack(j.x,j.y,Dh.right>=0?Dh.right:-1,Dh.center>=0?Dh.center:-1,Dh.left>=0?Dh.left:-1,Dh.vertical||-1,Gh,$h,hm,tP,rP,sO,A3,UH,vJ,HH,mJ,Zr,qh,Lv,nd,tf,jH,0,yi,km,f0,VT)}function ait(H,j,ue,Re){var Qe=H.compareText;if(!(j in Qe))Qe[j]=[];else for(var dt=Qe[j],Mt=dt.length-1;Mt>=0;Mt--)if(Re.dist(dt[Mt])<ue)return!0;return Qe[j].push(Re),!1}var oit=GR.VectorTileFeature.types,sit=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function NH(H,j,ue,Re,Qe,dt,Mt,ir,Fr,Zr,un,Hn,yi){var di=ir?Math.min(JI,Math.round(ir[0])):0,qi=ir?Math.min(JI,Math.round(ir[1])):0;H.emplaceBack(j,ue,Math.round(Re*32),Math.round(Qe*32),dt,Mt,(di<<1)+(Fr?1:0),qi,Zr*16,un*16,Hn*256,yi*256)}function cJ(H,j,ue){H.emplaceBack(j.x,j.y,ue),H.emplaceBack(j.x,j.y,ue),H.emplaceBack(j.x,j.y,ue),H.emplaceBack(j.x,j.y,ue)}function lit(H){for(var j=0,ue=H.sections;j<ue.length;j+=1){var Re=ue[j];if(rl(Re.text))return!0}return!1}var nO=function(j){this.layoutVertexArray=new Wo,this.indexArray=new Jl,this.programConfigurations=j,this.segments=new uc,this.dynamicLayoutVertexArray=new Mo,this.opacityVertexArray=new Hs,this.placedSymbolArray=new Hd};nO.prototype.isEmpty=function(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0},nO.prototype.upload=function(j,ue,Re,Qe){this.isEmpty()||(Re&&(this.layoutVertexBuffer=j.createVertexBuffer(this.layoutVertexArray,Y.members),this.indexBuffer=j.createIndexBuffer(this.indexArray,ue),this.dynamicLayoutVertexBuffer=j.createVertexBuffer(this.dynamicLayoutVertexArray,ye.members,!0),this.opacityVertexBuffer=j.createVertexBuffer(this.opacityVertexArray,sit,!0),this.opacityVertexBuffer.itemSize=1),(Re||Qe)&&this.programConfigurations.upload(j))},nO.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())},Yr("SymbolBuffers",nO);var m7=function(j,ue,Re){this.layoutVertexArray=new j,this.layoutAttributes=ue,this.indexArray=new Re,this.segments=new uc,this.collisionVertexArray=new jo};m7.prototype.upload=function(j){this.layoutVertexBuffer=j.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=j.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=j.createVertexBuffer(this.collisionVertexArray,He.members,!0)},m7.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},Yr("CollisionBuffers",m7);var Dv=function(j){this.collisionBoxArray=j.collisionBoxArray,this.zoom=j.zoom,this.overscaling=j.overscaling,this.layers=j.layers,this.layerIds=this.layers.map(function(Fr){return Fr.id}),this.index=j.index,this.pixelRatio=j.pixelRatio,this.sourceLayerIndex=j.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=UR([]),this.placementViewportMatrix=UR([]);var ue=this.layers[0],Re=ue._unevaluatedLayout._values;this.textSizeData=KI(this.zoom,Re["text-size"]),this.iconSizeData=KI(this.zoom,Re["icon-size"]);var Qe=this.layers[0].layout,dt=Qe.get("symbol-sort-key"),Mt=Qe.get("symbol-z-order");this.canOverlap=Qe.get("text-allow-overlap")||Qe.get("icon-allow-overlap")||Qe.get("text-ignore-placement")||Qe.get("icon-ignore-placement"),this.sortFeaturesByKey=Mt!=="viewport-y"&&dt.constantOr(1)!==void 0;var ir=Mt==="viewport-y"||Mt==="auto"&&!this.sortFeaturesByKey;this.sortFeaturesByY=ir&&this.canOverlap,Qe.get("symbol-placement")==="point"&&(this.writingModes=Qe.get("text-writing-mode").map(function(Fr){return hg[Fr]})),this.stateDependentLayerIds=this.layers.filter(function(Fr){return Fr.isStateDependent()}).map(function(Fr){return Fr.id}),this.sourceID=j.sourceID};Dv.prototype.createArrays=function(){this.text=new nO(new Ya(this.layers,this.zoom,function(j){return/^text/.test(j)})),this.icon=new nO(new Ya(this.layers,this.zoom,function(j){return/^icon/.test(j)})),this.glyphOffsetArray=new Fc,this.lineVertexArray=new Hf,this.symbolInstances=new dp},Dv.prototype.calculateGlyphDependencies=function(j,ue,Re,Qe,dt){for(var Mt=0;Mt<j.length;Mt++)if(ue[j.charCodeAt(Mt)]=!0,(Re||Qe)&&dt){var ir=Vr[j.charAt(Mt)];ir&&(ue[ir.charCodeAt(0)]=!0)}},Dv.prototype.populate=function(j,ue,Re){var Qe=this.layers[0],dt=Qe.layout,Mt=dt.get("text-font"),ir=dt.get("text-field"),Fr=dt.get("icon-image"),Zr=(ir.value.kind!=="constant"||ir.value.value instanceof wp&&!ir.value.value.isEmpty()||ir.value.value.toString().length>0)&&(Mt.value.kind!=="constant"||Mt.value.value.length>0),un=Fr.value.kind!=="constant"||!!Fr.value.value||Object.keys(Fr.parameters).length>0,Hn=dt.get("symbol-sort-key");if(this.features=[],!(!Zr&&!un)){for(var yi=ue.iconDependencies,di=ue.glyphDependencies,qi=ue.availableImages,Ia=new Mf(this.zoom),Do=0,ho=j;Do<ho.length;Do+=1){var gs=ho[Do],Zo=gs.feature,ms=gs.id,Is=gs.index,dl=gs.sourceLayerIndex,Xl=Qe._featureFilter.needGeometry,Bl=_f(Zo,Xl);if(Qe._featureFilter.filter(Ia,Bl,Re)){Xl||(Bl.geometry=ff(Zo));var Ku=void 0;if(Zr){var _u=Qe.getValueAndResolveTokens("text-field",Bl,Re,qi),Ou=wp.factory(_u);lit(Ou)&&(this.hasRTLText=!0),(!this.hasRTLText||Rl()==="unavailable"||this.hasRTLText&&Uf.isParsed())&&(Ku=nr(Ou,Qe,Bl))}var hf=void 0;if(un){var Ju=Qe.getValueAndResolveTokens("icon-image",Bl,Re,qi);Ju instanceof sp?hf=Ju:hf=sp.fromString(Ju)}if(!(!Ku&&!hf)){var oc=this.sortFeaturesByKey?Hn.evaluate(Bl,{},Re):void 0,nd={id:ms,text:Ku,icon:hf,index:Is,sourceLayerIndex:dl,geometry:Bl.geometry,properties:Zo.properties,type:oit[Zo.type],sortKey:oc};if(this.features.push(nd),hf&&(yi[hf.name]=!0),Ku){var tf=Mt.evaluate(Bl,{},Re).join(","),qh=dt.get("text-rotation-alignment")==="map"&&dt.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(hg.vertical)>=0;for(var Lv=0,Gh=Ku.sections;Lv<Gh.length;Lv+=1){var $h=Gh[Lv];if($h.image)yi[$h.image.name]=!0;else{var Dh=_o(Ku.toString()),hm=$h.fontStack||tf,km=di[hm]=di[hm]||{};this.calculateGlyphDependencies($h.text,km,qh,this.allowVerticalPlacement,Dh)}}}}}}dt.get("symbol-placement")==="line"&&(this.features=xr(this.features)),this.sortFeaturesByKey&&this.features.sort(function(f0,I0){return f0.sortKey-I0.sortKey})}},Dv.prototype.update=function(j,ue,Re){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(j,ue,this.layers,Re),this.icon.programConfigurations.updatePaintArrays(j,ue,this.layers,Re))},Dv.prototype.isEmpty=function(){return this.symbolInstances.length===0&&!this.hasRTLText},Dv.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},Dv.prototype.upload=function(j){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(j),this.iconCollisionBox.upload(j)),this.text.upload(j,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(j,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0},Dv.prototype.destroyDebugData=function(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()},Dv.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()},Dv.prototype.addToLineVertexArray=function(j,ue){var Re=this.lineVertexArray.length;if(j.segment!==void 0){for(var Qe=j.dist(ue[j.segment+1]),dt=j.dist(ue[j.segment]),Mt={},ir=j.segment+1;ir<ue.length;ir++)Mt[ir]={x:ue[ir].x,y:ue[ir].y,tileUnitDistanceFromAnchor:Qe},ir<ue.length-1&&(Qe+=ue[ir+1].dist(ue[ir]));for(var Fr=j.segment||0;Fr>=0;Fr--)Mt[Fr]={x:ue[Fr].x,y:ue[Fr].y,tileUnitDistanceFromAnchor:dt},Fr>0&&(dt+=ue[Fr-1].dist(ue[Fr]));for(var Zr=0;Zr<ue.length;Zr++){var un=Mt[Zr];this.lineVertexArray.emplaceBack(un.x,un.y,un.tileUnitDistanceFromAnchor)}}return{lineStartIndex:Re,lineLength:this.lineVertexArray.length-Re}},Dv.prototype.addSymbols=function(j,ue,Re,Qe,dt,Mt,ir,Fr,Zr,un,Hn,yi){for(var di=j.indexArray,qi=j.layoutVertexArray,Ia=j.segments.prepareSegment(4*ue.length,qi,di,this.canOverlap?Mt.sortKey:void 0),Do=this.glyphOffsetArray.length,ho=Ia.vertexLength,gs=this.allowVerticalPlacement&&ir===hg.vertical?Math.PI/2:0,Zo=Mt.text&&Mt.text.sections,ms=0;ms<ue.length;ms++){var Is=ue[ms],dl=Is.tl,Xl=Is.tr,Bl=Is.bl,Ku=Is.br,_u=Is.tex,Ou=Is.pixelOffsetTL,hf=Is.pixelOffsetBR,Ju=Is.minFontScaleX,oc=Is.minFontScaleY,nd=Is.glyphOffset,tf=Is.isSDF,qh=Is.sectionIndex,Lv=Ia.vertexLength,Gh=nd[1];NH(qi,Fr.x,Fr.y,dl.x,Gh+dl.y,_u.x,_u.y,Re,tf,Ou.x,Ou.y,Ju,oc),NH(qi,Fr.x,Fr.y,Xl.x,Gh+Xl.y,_u.x+_u.w,_u.y,Re,tf,hf.x,Ou.y,Ju,oc),NH(qi,Fr.x,Fr.y,Bl.x,Gh+Bl.y,_u.x,_u.y+_u.h,Re,tf,Ou.x,hf.y,Ju,oc),NH(qi,Fr.x,Fr.y,Ku.x,Gh+Ku.y,_u.x+_u.w,_u.y+_u.h,Re,tf,hf.x,hf.y,Ju,oc),cJ(j.dynamicLayoutVertexArray,Fr,gs),di.emplaceBack(Lv,Lv+1,Lv+2),di.emplaceBack(Lv+1,Lv+2,Lv+3),Ia.vertexLength+=4,Ia.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(nd[0]),(ms===ue.length-1||qh!==ue[ms+1].sectionIndex)&&j.programConfigurations.populatePaintArrays(qi.length,Mt,Mt.index,{},yi,Zo&&Zo[qh])}j.placedSymbolArray.emplaceBack(Fr.x,Fr.y,Do,this.glyphOffsetArray.length-Do,ho,Zr,un,Fr.segment,Re?Re[0]:0,Re?Re[1]:0,Qe[0],Qe[1],ir,0,!1,0,Hn)},Dv.prototype._addCollisionDebugVertex=function(j,ue,Re,Qe,dt,Mt){return ue.emplaceBack(0,0),j.emplaceBack(Re.x,Re.y,Qe,dt,Math.round(Mt.x),Math.round(Mt.y))},Dv.prototype.addCollisionDebugVertices=function(j,ue,Re,Qe,dt,Mt,ir){var Fr=dt.segments.prepareSegment(4,dt.layoutVertexArray,dt.indexArray),Zr=Fr.vertexLength,un=dt.layoutVertexArray,Hn=dt.collisionVertexArray,yi=ir.anchorX,di=ir.anchorY;this._addCollisionDebugVertex(un,Hn,Mt,yi,di,new v(j,ue)),this._addCollisionDebugVertex(un,Hn,Mt,yi,di,new v(Re,ue)),this._addCollisionDebugVertex(un,Hn,Mt,yi,di,new v(Re,Qe)),this._addCollisionDebugVertex(un,Hn,Mt,yi,di,new v(j,Qe)),Fr.vertexLength+=4;var qi=dt.indexArray;qi.emplaceBack(Zr,Zr+1),qi.emplaceBack(Zr+1,Zr+2),qi.emplaceBack(Zr+2,Zr+3),qi.emplaceBack(Zr+3,Zr),Fr.primitiveLength+=4},Dv.prototype.addDebugCollisionBoxes=function(j,ue,Re,Qe){for(var dt=j;dt<ue;dt++){var Mt=this.collisionBoxArray.get(dt),ir=Mt.x1,Fr=Mt.y1,Zr=Mt.x2,un=Mt.y2;this.addCollisionDebugVertices(ir,Fr,Zr,un,Qe?this.textCollisionBox:this.iconCollisionBox,Mt.anchorPoint,Re)}},Dv.prototype.generateCollisionDebugBuffers=function(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new m7(ws,lt.members,Wc),this.iconCollisionBox=new m7(ws,lt.members,Wc);for(var j=0;j<this.symbolInstances.length;j++){var ue=this.symbolInstances.get(j);this.addDebugCollisionBoxes(ue.textBoxStartIndex,ue.textBoxEndIndex,ue,!0),this.addDebugCollisionBoxes(ue.verticalTextBoxStartIndex,ue.verticalTextBoxEndIndex,ue,!0),this.addDebugCollisionBoxes(ue.iconBoxStartIndex,ue.iconBoxEndIndex,ue,!1),this.addDebugCollisionBoxes(ue.verticalIconBoxStartIndex,ue.verticalIconBoxEndIndex,ue,!1)}},Dv.prototype._deserializeCollisionBoxesForSymbol=function(j,ue,Re,Qe,dt,Mt,ir,Fr,Zr){for(var un={},Hn=ue;Hn<Re;Hn++){var yi=j.get(Hn);un.textBox={x1:yi.x1,y1:yi.y1,x2:yi.x2,y2:yi.y2,anchorPointX:yi.anchorPointX,anchorPointY:yi.anchorPointY},un.textFeatureIndex=yi.featureIndex;break}for(var di=Qe;di<dt;di++){var qi=j.get(di);un.verticalTextBox={x1:qi.x1,y1:qi.y1,x2:qi.x2,y2:qi.y2,anchorPointX:qi.anchorPointX,anchorPointY:qi.anchorPointY},un.verticalTextFeatureIndex=qi.featureIndex;break}for(var Ia=Mt;Ia<ir;Ia++){var Do=j.get(Ia);un.iconBox={x1:Do.x1,y1:Do.y1,x2:Do.x2,y2:Do.y2,anchorPointX:Do.anchorPointX,anchorPointY:Do.anchorPointY},un.iconFeatureIndex=Do.featureIndex;break}for(var ho=Fr;ho<Zr;ho++){var gs=j.get(ho);un.verticalIconBox={x1:gs.x1,y1:gs.y1,x2:gs.x2,y2:gs.y2,anchorPointX:gs.anchorPointX,anchorPointY:gs.anchorPointY},un.verticalIconFeatureIndex=gs.featureIndex;break}return un},Dv.prototype.deserializeCollisionBoxes=function(j){this.collisionArrays=[];for(var ue=0;ue<this.symbolInstances.length;ue++){var Re=this.symbolInstances.get(ue);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(j,Re.textBoxStartIndex,Re.textBoxEndIndex,Re.verticalTextBoxStartIndex,Re.verticalTextBoxEndIndex,Re.iconBoxStartIndex,Re.iconBoxEndIndex,Re.verticalIconBoxStartIndex,Re.verticalIconBoxEndIndex))}},Dv.prototype.hasTextData=function(){return this.text.segments.get().length>0},Dv.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Dv.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Dv.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Dv.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Dv.prototype.addIndicesForPlacedSymbol=function(j,ue){for(var Re=j.placedSymbolArray.get(ue),Qe=Re.vertexStartIndex+Re.numGlyphs*4,dt=Re.vertexStartIndex;dt<Qe;dt+=4)j.indexArray.emplaceBack(dt,dt+1,dt+2),j.indexArray.emplaceBack(dt+1,dt+2,dt+3)},Dv.prototype.getSortedSymbolIndexes=function(j){if(this.sortedAngle===j&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;for(var ue=Math.sin(j),Re=Math.cos(j),Qe=[],dt=[],Mt=[],ir=0;ir<this.symbolInstances.length;++ir){Mt.push(ir);var Fr=this.symbolInstances.get(ir);Qe.push(Math.round(ue*Fr.anchorX+Re*Fr.anchorY)|0),dt.push(Fr.featureIndex)}return Mt.sort(function(Zr,un){return Qe[Zr]-Qe[un]||dt[un]-dt[Zr]}),Mt},Dv.prototype.addToSortKeyRanges=function(j,ue){var Re=this.sortKeyRanges[this.sortKeyRanges.length-1];Re&&Re.sortKey===ue?Re.symbolInstanceEnd=j+1:this.sortKeyRanges.push({sortKey:ue,symbolInstanceStart:j,symbolInstanceEnd:j+1})},Dv.prototype.sortFeatures=function(j){var ue=this;if(this.sortFeaturesByY&&this.sortedAngle!==j&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(j),this.sortedAngle=j,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var Re=0,Qe=this.symbolInstanceIndexes;Re<Qe.length;Re+=1){var dt=Qe[Re],Mt=this.symbolInstances.get(dt);this.featureSortOrder.push(Mt.featureIndex),[Mt.rightJustifiedTextSymbolIndex,Mt.centerJustifiedTextSymbolIndex,Mt.leftJustifiedTextSymbolIndex].forEach(function(ir,Fr,Zr){ir>=0&&Zr.indexOf(ir)===Fr&&ue.addIndicesForPlacedSymbol(ue.text,ir)}),Mt.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,Mt.verticalPlacedTextSymbolIndex),Mt.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Mt.placedIconSymbolIndex),Mt.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Mt.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},Yr("SymbolBucket",Dv,{omit:["layers","collisionBoxArray","features","compareText"]}),Dv.MAX_GLYPHS=65535,Dv.addDynamicAttributes=cJ;function uit(H,j){return j.replace(/{([^{}]+)}/g,function(ue,Re){return Re in H?String(H[Re]):""})}var cit=new qo({"symbol-placement":new zi(Qo.layout_symbol["symbol-placement"]),"symbol-spacing":new zi(Qo.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new zi(Qo.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Fi(Qo.layout_symbol["symbol-sort-key"]),"symbol-z-order":new zi(Qo.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new zi(Qo.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new zi(Qo.layout_symbol["icon-ignore-placement"]),"icon-optional":new zi(Qo.layout_symbol["icon-optional"]),"icon-rotation-alignment":new zi(Qo.layout_symbol["icon-rotation-alignment"]),"icon-size":new Fi(Qo.layout_symbol["icon-size"]),"icon-text-fit":new zi(Qo.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new zi(Qo.layout_symbol["icon-text-fit-padding"]),"icon-image":new Fi(Qo.layout_symbol["icon-image"]),"icon-rotate":new Fi(Qo.layout_symbol["icon-rotate"]),"icon-padding":new zi(Qo.layout_symbol["icon-padding"]),"icon-keep-upright":new zi(Qo.layout_symbol["icon-keep-upright"]),"icon-offset":new Fi(Qo.layout_symbol["icon-offset"]),"icon-anchor":new Fi(Qo.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new zi(Qo.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new zi(Qo.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new zi(Qo.layout_symbol["text-rotation-alignment"]),"text-field":new Fi(Qo.layout_symbol["text-field"]),"text-font":new Fi(Qo.layout_symbol["text-font"]),"text-size":new Fi(Qo.layout_symbol["text-size"]),"text-max-width":new Fi(Qo.layout_symbol["text-max-width"]),"text-line-height":new zi(Qo.layout_symbol["text-line-height"]),"text-letter-spacing":new Fi(Qo.layout_symbol["text-letter-spacing"]),"text-justify":new Fi(Qo.layout_symbol["text-justify"]),"text-radial-offset":new Fi(Qo.layout_symbol["text-radial-offset"]),"text-variable-anchor":new zi(Qo.layout_symbol["text-variable-anchor"]),"text-anchor":new Fi(Qo.layout_symbol["text-anchor"]),"text-max-angle":new zi(Qo.layout_symbol["text-max-angle"]),"text-writing-mode":new zi(Qo.layout_symbol["text-writing-mode"]),"text-rotate":new Fi(Qo.layout_symbol["text-rotate"]),"text-padding":new zi(Qo.layout_symbol["text-padding"]),"text-keep-upright":new zi(Qo.layout_symbol["text-keep-upright"]),"text-transform":new Fi(Qo.layout_symbol["text-transform"]),"text-offset":new Fi(Qo.layout_symbol["text-offset"]),"text-allow-overlap":new zi(Qo.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new zi(Qo.layout_symbol["text-ignore-placement"]),"text-optional":new zi(Qo.layout_symbol["text-optional"])}),fit=new qo({"icon-opacity":new Fi(Qo.paint_symbol["icon-opacity"]),"icon-color":new Fi(Qo.paint_symbol["icon-color"]),"icon-halo-color":new Fi(Qo.paint_symbol["icon-halo-color"]),"icon-halo-width":new Fi(Qo.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Fi(Qo.paint_symbol["icon-halo-blur"]),"icon-translate":new zi(Qo.paint_symbol["icon-translate"]),"icon-translate-anchor":new zi(Qo.paint_symbol["icon-translate-anchor"]),"text-opacity":new Fi(Qo.paint_symbol["text-opacity"]),"text-color":new Fi(Qo.paint_symbol["text-color"],{runtimeType:Zc,getOverride:function(H){return H.textColor},hasOverride:function(H){return!!H.textColor}}),"text-halo-color":new Fi(Qo.paint_symbol["text-halo-color"]),"text-halo-width":new Fi(Qo.paint_symbol["text-halo-width"]),"text-halo-blur":new Fi(Qo.paint_symbol["text-halo-blur"]),"text-translate":new zi(Qo.paint_symbol["text-translate"]),"text-translate-anchor":new zi(Qo.paint_symbol["text-translate-anchor"])}),fJ={paint:fit,layout:cit},iO=function(j){this.type=j.property.overrides?j.property.overrides.runtimeType:Cd,this.defaultValue=j};iO.prototype.evaluate=function(j){if(j.formattedSection){var ue=this.defaultValue.property.overrides;if(ue&&ue.hasOverride(j.formattedSection))return ue.getOverride(j.formattedSection)}return j.feature&&j.featureState?this.defaultValue.evaluate(j.feature,j.featureState):this.defaultValue.property.specification.default},iO.prototype.eachChild=function(j){if(!this.defaultValue.isConstant()){var ue=this.defaultValue.value;j(ue._styleExpression.expression)}},iO.prototype.outputDefined=function(){return!1},iO.prototype.serialize=function(){return null},Yr("FormatSectionOverride",iO,{omit:["defaultValue"]});var dit=(function(H){function j(ue){H.call(this,ue,fJ)}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype.recalculate=function(Re,Qe){if(H.prototype.recalculate.call(this,Re,Qe),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 dt=this.layout.get("text-writing-mode");if(dt){for(var Mt=[],ir=0,Fr=dt;ir<Fr.length;ir+=1){var Zr=Fr[ir];Mt.indexOf(Zr)<0&&Mt.push(Zr)}this.layout._values["text-writing-mode"]=Mt}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()},j.prototype.getValueAndResolveTokens=function(Re,Qe,dt,Mt){var ir=this.layout.get(Re).evaluate(Qe,{},dt,Mt),Fr=this._unevaluatedLayout._values[Re];return!Fr.isDataDriven()&&!Iu(Fr.value)&&ir?uit(Qe.properties,ir):ir},j.prototype.createBucket=function(Re){return new Dv(Re)},j.prototype.queryRadius=function(){return 0},j.prototype.queryIntersectsFeature=function(){return!1},j.prototype._setPaintOverrides=function(){for(var Re=0,Qe=fJ.paint.overridableProperties;Re<Qe.length;Re+=1){var dt=Qe[Re];if(j.hasPaintOverride(this.layout,dt)){var Mt=this.paint.get(dt),ir=new iO(Mt),Fr=new Wm(ir,Mt.property.specification),Zr=null;Mt.value.kind==="constant"||Mt.value.kind==="source"?Zr=new Ym("source",Fr):Zr=new Vv("composite",Fr,Mt.value.zoomStops,Mt.value._interpolationType),this.paint._values[dt]=new ia(Mt.property,Zr,Mt.parameters)}}},j.prototype._handleOverridablePaintPropertyUpdate=function(Re,Qe,dt){return!this.layout||Qe.isDataDriven()||dt.isDataDriven()?!1:j.hasPaintOverride(this.layout,Re)},j.hasPaintOverride=function(Re,Qe){var dt=Re.get("text-field"),Mt=fJ.paint.properties[Qe],ir=!1,Fr=function(Hn){for(var yi=0,di=Hn;yi<di.length;yi+=1){var qi=di[yi];if(Mt.overrides&&Mt.overrides.hasOverride(qi)){ir=!0;return}}};if(dt.value.kind==="constant"&&dt.value.value instanceof wp)Fr(dt.value.value.sections);else if(dt.value.kind==="source"){var Zr=function(Hn){if(!ir)if(Hn instanceof Uc&&yd(Hn.value)===zd){var yi=Hn.value;Fr(yi.sections)}else Hn instanceof og?Fr(Hn.sections):Hn.eachChild(Zr)},un=dt.value;un._styleExpression&&Zr(un._styleExpression.expression)}return ir},j})(xs),hit=new qo({"background-color":new zi(Qo.paint_background["background-color"]),"background-pattern":new To(Qo.paint_background["background-pattern"]),"background-opacity":new zi(Qo.paint_background["background-opacity"])}),pit={paint:hit},vit=(function(H){function j(ue){H.call(this,ue,pit)}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j})(xs),mit=new qo({"raster-opacity":new zi(Qo.paint_raster["raster-opacity"]),"raster-hue-rotate":new zi(Qo.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new zi(Qo.paint_raster["raster-brightness-min"]),"raster-brightness-max":new zi(Qo.paint_raster["raster-brightness-max"]),"raster-saturation":new zi(Qo.paint_raster["raster-saturation"]),"raster-contrast":new zi(Qo.paint_raster["raster-contrast"]),"raster-resampling":new zi(Qo.paint_raster["raster-resampling"]),"raster-fade-duration":new zi(Qo.paint_raster["raster-fade-duration"])}),git={paint:mit},yit=(function(H){function j(ue){H.call(this,ue,git)}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j})(xs);function bit(H){var j=[],ue=H.id;return ue===void 0&&j.push({message:"layers."+ue+': missing required property "id"'}),H.render===void 0&&j.push({message:"layers."+ue+': missing required method "render"'}),H.renderingMode&&H.renderingMode!=="2d"&&H.renderingMode!=="3d"&&j.push({message:"layers."+ue+': property "renderingMode" must be either "2d" or "3d"'}),j}var xit=(function(H){function j(ue){H.call(this,ue,{}),this.implementation=ue}return H&&(j.__proto__=H),j.prototype=Object.create(H&&H.prototype),j.prototype.constructor=j,j.prototype.is3D=function(){return this.implementation.renderingMode==="3d"},j.prototype.hasOffscreenPass=function(){return this.implementation.prerender!==void 0},j.prototype.recalculate=function(){},j.prototype.updateTransitions=function(){},j.prototype.hasTransition=function(){},j.prototype.serialize=function(){},j.prototype.onAdd=function(Re){this.implementation.onAdd&&this.implementation.onAdd(Re,Re.painter.context.gl)},j.prototype.onRemove=function(Re){this.implementation.onRemove&&this.implementation.onRemove(Re,Re.painter.context.gl)},j})(xs),_it={circle:HF,heatmap:K4,hillshade:B6,fill:QF,"fill-extrusion":tJ,line:s7,symbol:dit,background:vit,raster:yit};function wit(H){return H.type==="custom"?new xit(H):new _it[H.type](H)}var w_e=m.HTMLImageElement,S_e=m.HTMLCanvasElement,T_e=m.HTMLVideoElement,E_e=m.ImageData,FH=m.ImageBitmap,iD=function(j,ue,Re,Qe){this.context=j,this.format=Re,this.texture=j.gl.createTexture(),this.update(ue,Qe)};iD.prototype.update=function(j,ue,Re){var Qe=j.width,dt=j.height,Mt=(!this.size||this.size[0]!==Qe||this.size[1]!==dt)&&!Re,ir=this,Fr=ir.context,Zr=Fr.gl;if(this.useMipmap=!!(ue&&ue.useMipmap),Zr.bindTexture(Zr.TEXTURE_2D,this.texture),Fr.pixelStoreUnpackFlipY.set(!1),Fr.pixelStoreUnpack.set(1),Fr.pixelStoreUnpackPremultiplyAlpha.set(this.format===Zr.RGBA&&(!ue||ue.premultiply!==!1)),Mt)this.size=[Qe,dt],j instanceof w_e||j instanceof S_e||j instanceof T_e||j instanceof E_e||FH&&j instanceof FH?Zr.texImage2D(Zr.TEXTURE_2D,0,this.format,this.format,Zr.UNSIGNED_BYTE,j):Zr.texImage2D(Zr.TEXTURE_2D,0,this.format,Qe,dt,0,this.format,Zr.UNSIGNED_BYTE,j.data);else{var un=Re||{x:0,y:0},Hn=un.x,yi=un.y;j instanceof w_e||j instanceof S_e||j instanceof T_e||j instanceof E_e||FH&&j instanceof FH?Zr.texSubImage2D(Zr.TEXTURE_2D,0,Hn,yi,Zr.RGBA,Zr.UNSIGNED_BYTE,j):Zr.texSubImage2D(Zr.TEXTURE_2D,0,Hn,yi,Qe,dt,Zr.RGBA,Zr.UNSIGNED_BYTE,j.data)}this.useMipmap&&this.isSizePowerOfTwo()&&Zr.generateMipmap(Zr.TEXTURE_2D)},iD.prototype.bind=function(j,ue,Re){var Qe=this,dt=Qe.context,Mt=dt.gl;Mt.bindTexture(Mt.TEXTURE_2D,this.texture),Re===Mt.LINEAR_MIPMAP_NEAREST&&!this.isSizePowerOfTwo()&&(Re=Mt.LINEAR),j!==this.filter&&(Mt.texParameteri(Mt.TEXTURE_2D,Mt.TEXTURE_MAG_FILTER,j),Mt.texParameteri(Mt.TEXTURE_2D,Mt.TEXTURE_MIN_FILTER,Re||j),this.filter=j),ue!==this.wrap&&(Mt.texParameteri(Mt.TEXTURE_2D,Mt.TEXTURE_WRAP_S,ue),Mt.texParameteri(Mt.TEXTURE_2D,Mt.TEXTURE_WRAP_T,ue),this.wrap=ue)},iD.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1===0},iD.prototype.destroy=function(){var j=this.context,ue=j.gl;ue.deleteTexture(this.texture),this.texture=null};var dJ=function(j){var ue=this;this._callback=j,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=function(){ue._triggered=!1,ue._callback()})};dJ.prototype.trigger=function(){var j=this;this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(function(){j._triggered=!1,j._callback()},0))},dJ.prototype.remove=function(){delete this._channel,this._callback=function(){}};var aO=function(j,ue,Re){this.target=j,this.parent=ue,this.mapId=Re,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},$(["receive","process"],this),this.invoker=new dJ(this.process),this.target.addEventListener("message",this.receive,!1),this.globalScope=ke()?j:m};aO.prototype.send=function(j,ue,Re,Qe,dt){var Mt=this;dt===void 0&&(dt=!1);var ir=Math.round(Math.random()*1e18).toString(36).substring(0,10);Re&&(this.callbacks[ir]=Re);var Fr=be(this.globalScope)?void 0:[];return this.target.postMessage({id:ir,type:j,hasCallback:!!Re,targetMapId:Qe,mustQueue:dt,sourceMapId:this.mapId,data:ni(ue,Fr)},Fr),{cancel:function(){Re&&delete Mt.callbacks[ir],Mt.target.postMessage({id:ir,type:"<cancel>",targetMapId:Qe,sourceMapId:Mt.mapId})}}},aO.prototype.receive=function(j){var ue=j.data,Re=ue.id;if(Re&&!(ue.targetMapId&&this.mapId!==ue.targetMapId))if(ue.type==="<cancel>"){delete this.tasks[Re];var Qe=this.cancelCallbacks[Re];delete this.cancelCallbacks[Re],Qe&&Qe()}else ke()||ue.mustQueue?(this.tasks[Re]=ue,this.taskQueue.push(Re),this.invoker.trigger()):this.processTask(Re,ue)},aO.prototype.process=function(){if(this.taskQueue.length){var j=this.taskQueue.shift(),ue=this.tasks[j];delete this.tasks[j],this.taskQueue.length&&this.invoker.trigger(),ue&&this.processTask(j,ue)}},aO.prototype.processTask=function(j,ue){var Re=this;if(ue.type==="<response>"){var Qe=this.callbacks[j];delete this.callbacks[j],Qe&&(ue.error?Qe(Pi(ue.error)):Qe(null,Pi(ue.data)))}else{var dt=!1,Mt=be(this.globalScope)?void 0:[],ir=ue.hasCallback?function(yi,di){dt=!0,delete Re.cancelCallbacks[j],Re.target.postMessage({id:j,type:"<response>",sourceMapId:Re.mapId,error:yi?ni(yi):null,data:ni(di,Mt)},Mt)}:function(yi){dt=!0},Fr=null,Zr=Pi(ue.data);if(this.parent[ue.type])Fr=this.parent[ue.type](ue.sourceMapId,Zr,ir);else if(this.parent.getWorkerSource){var un=ue.type.split("."),Hn=this.parent.getWorkerSource(ue.sourceMapId,un[0],Zr.source);Fr=Hn[un[1]](Zr,ir)}else ir(new Error("Could not find function "+ue.type));!dt&&Fr&&Fr.cancel&&(this.cancelCallbacks[j]=Fr.cancel)}},aO.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};function Sit(H,j,ue){j=Math.pow(2,ue)-j-1;var Re=A_e(H*256,j*256,ue),Qe=A_e((H+1)*256,(j+1)*256,ue);return Re[0]+","+Re[1]+","+Qe[0]+","+Qe[1]}function A_e(H,j,ue){var Re=2*Math.PI*6378137/256/Math.pow(2,ue),Qe=H*Re-2*Math.PI*6378137/2,dt=j*Re-2*Math.PI*6378137/2;return[Qe,dt]}var Fy=function(j,ue){j&&(ue?this.setSouthWest(j).setNorthEast(ue):j.length===4?this.setSouthWest([j[0],j[1]]).setNorthEast([j[2],j[3]]):this.setSouthWest(j[0]).setNorthEast(j[1]))};Fy.prototype.setNorthEast=function(j){return this._ne=j instanceof pg?new pg(j.lng,j.lat):pg.convert(j),this},Fy.prototype.setSouthWest=function(j){return this._sw=j instanceof pg?new pg(j.lng,j.lat):pg.convert(j),this},Fy.prototype.extend=function(j){var ue=this._sw,Re=this._ne,Qe,dt;if(j instanceof pg)Qe=j,dt=j;else if(j instanceof Fy){if(Qe=j._sw,dt=j._ne,!Qe||!dt)return this}else{if(Array.isArray(j))if(j.length===4||j.every(Array.isArray)){var Mt=j;return this.extend(Fy.convert(Mt))}else{var ir=j;return this.extend(pg.convert(ir))}return this}return!ue&&!Re?(this._sw=new pg(Qe.lng,Qe.lat),this._ne=new pg(dt.lng,dt.lat)):(ue.lng=Math.min(Qe.lng,ue.lng),ue.lat=Math.min(Qe.lat,ue.lat),Re.lng=Math.max(dt.lng,Re.lng),Re.lat=Math.max(dt.lat,Re.lat)),this},Fy.prototype.getCenter=function(){return new pg((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Fy.prototype.getSouthWest=function(){return this._sw},Fy.prototype.getNorthEast=function(){return this._ne},Fy.prototype.getNorthWest=function(){return new pg(this.getWest(),this.getNorth())},Fy.prototype.getSouthEast=function(){return new pg(this.getEast(),this.getSouth())},Fy.prototype.getWest=function(){return this._sw.lng},Fy.prototype.getSouth=function(){return this._sw.lat},Fy.prototype.getEast=function(){return this._ne.lng},Fy.prototype.getNorth=function(){return this._ne.lat},Fy.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Fy.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Fy.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Fy.prototype.contains=function(j){var ue=pg.convert(j),Re=ue.lng,Qe=ue.lat,dt=this._sw.lat<=Qe&&Qe<=this._ne.lat,Mt=this._sw.lng<=Re&&Re<=this._ne.lng;return this._sw.lng>this._ne.lng&&(Mt=this._sw.lng>=Re&&Re>=this._ne.lng),dt&&Mt},Fy.convert=function(j){return!j||j instanceof Fy?j:new Fy(j)};var C_e=63710088e-1,pg=function(j,ue){if(isNaN(j)||isNaN(ue))throw new Error("Invalid LngLat object: ("+j+", "+ue+")");if(this.lng=+j,this.lat=+ue,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};pg.prototype.wrap=function(){return new pg(C(this.lng,-180,180),this.lat)},pg.prototype.toArray=function(){return[this.lng,this.lat]},pg.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},pg.prototype.distanceTo=function(j){var ue=Math.PI/180,Re=this.lat*ue,Qe=j.lat*ue,dt=Math.sin(Re)*Math.sin(Qe)+Math.cos(Re)*Math.cos(Qe)*Math.cos((j.lng-this.lng)*ue),Mt=C_e*Math.acos(Math.min(dt,1));return Mt},pg.prototype.toBounds=function(j){j===void 0&&(j=0);var ue=40075017,Re=360*j/ue,Qe=Re/Math.cos(Math.PI/180*this.lat);return new Fy(new pg(this.lng-Qe,this.lat-Re),new pg(this.lng+Qe,this.lat+Re))},pg.convert=function(j){if(j instanceof pg)return j;if(Array.isArray(j)&&(j.length===2||j.length===3))return new pg(Number(j[0]),Number(j[1]));if(!Array.isArray(j)&&typeof j=="object"&&j!==null)return new pg(Number("lng"in j?j.lng:j.lon),Number(j.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 M_e=2*Math.PI*C_e;function R_e(H){return M_e*Math.cos(H*Math.PI/180)}function k_e(H){return(180+H)/360}function I_e(H){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+H*Math.PI/360)))/360}function P_e(H,j){return H/R_e(j)}function Tit(H){return H*360-180}function hJ(H){var j=180-H*360;return 360/Math.PI*Math.atan(Math.exp(j*Math.PI/180))-90}function Eit(H,j){return H*R_e(hJ(j))}function Ait(H){return 1/Math.cos(H*Math.PI/180)}var aD=function(j,ue,Re){Re===void 0&&(Re=0),this.x=+j,this.y=+ue,this.z=+Re};aD.fromLngLat=function(j,ue){ue===void 0&&(ue=0);var Re=pg.convert(j);return new aD(k_e(Re.lng),I_e(Re.lat),P_e(ue,Re.lat))},aD.prototype.toLngLat=function(){return new pg(Tit(this.x),hJ(this.y))},aD.prototype.toAltitude=function(){return Eit(this.z,this.y)},aD.prototype.meterInMercatorCoordinateUnits=function(){return 1/M_e*Ait(hJ(this.y))};var oD=function(j,ue,Re){this.z=j,this.x=ue,this.y=Re,this.key=g7(0,j,j,ue,Re)};oD.prototype.equals=function(j){return this.z===j.z&&this.x===j.x&&this.y===j.y},oD.prototype.url=function(j,ue){var Re=Sit(this.x,this.y,this.z),Qe=Cit(this.z,this.x,this.y);return j[(this.x+this.y)%j.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(ue==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",Qe).replace("{bbox-epsg-3857}",Re)},oD.prototype.getTilePoint=function(j){var ue=Math.pow(2,this.z);return new v((j.x*ue-this.x)*Qs,(j.y*ue-this.y)*Qs)},oD.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var D_e=function(j,ue){this.wrap=j,this.canonical=ue,this.key=g7(j,ue.z,ue.z,ue.x,ue.y)},zy=function(j,ue,Re,Qe,dt){this.overscaledZ=j,this.wrap=ue,this.canonical=new oD(Re,+Qe,+dt),this.key=g7(ue,j,Re,Qe,dt)};zy.prototype.equals=function(j){return this.overscaledZ===j.overscaledZ&&this.wrap===j.wrap&&this.canonical.equals(j.canonical)},zy.prototype.scaledTo=function(j){var ue=this.canonical.z-j;return j>this.canonical.z?new zy(j,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new zy(j,this.wrap,j,this.canonical.x>>ue,this.canonical.y>>ue)},zy.prototype.calculateScaledKey=function(j,ue){var Re=this.canonical.z-j;return j>this.canonical.z?g7(this.wrap*+ue,j,this.canonical.z,this.canonical.x,this.canonical.y):g7(this.wrap*+ue,j,j,this.canonical.x>>Re,this.canonical.y>>Re)},zy.prototype.isChildOf=function(j){if(j.wrap!==this.wrap)return!1;var ue=this.canonical.z-j.canonical.z;return j.overscaledZ===0||j.overscaledZ<this.overscaledZ&&j.canonical.x===this.canonical.x>>ue&&j.canonical.y===this.canonical.y>>ue},zy.prototype.children=function(j){if(this.overscaledZ>=j)return[new zy(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var ue=this.canonical.z+1,Re=this.canonical.x*2,Qe=this.canonical.y*2;return[new zy(ue,this.wrap,ue,Re,Qe),new zy(ue,this.wrap,ue,Re+1,Qe),new zy(ue,this.wrap,ue,Re,Qe+1),new zy(ue,this.wrap,ue,Re+1,Qe+1)]},zy.prototype.isLessThan=function(j){return this.wrap<j.wrap?!0:this.wrap>j.wrap?!1:this.overscaledZ<j.overscaledZ?!0:this.overscaledZ>j.overscaledZ?!1:this.canonical.x<j.canonical.x?!0:this.canonical.x>j.canonical.x?!1:this.canonical.y<j.canonical.y},zy.prototype.wrapped=function(){return new zy(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},zy.prototype.unwrapTo=function(j){return new zy(this.overscaledZ,j,this.canonical.z,this.canonical.x,this.canonical.y)},zy.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},zy.prototype.toUnwrapped=function(){return new D_e(this.wrap,this.canonical)},zy.prototype.toString=function(){return this.overscaledZ+"/"+this.canonical.x+"/"+this.canonical.y},zy.prototype.getTilePoint=function(j){return this.canonical.getTilePoint(new aD(j.x-this.wrap,j.y))};function g7(H,j,ue,Re,Qe){H*=2,H<0&&(H=H*-1-1);var dt=1<<ue;return(dt*dt*H+dt*Qe+Re).toString(36)+ue.toString(36)+j.toString(36)}function Cit(H,j,ue){for(var Re="",Qe,dt=H;dt>0;dt--)Qe=1<<dt-1,Re+=(j&Qe?1:0)+(ue&Qe?2:0);return Re}Yr("CanonicalTileID",oD),Yr("OverscaledTileID",zy,{omit:["posMatrix"]});var WR=function(j,ue,Re){if(this.uid=j,ue.height!==ue.width)throw new RangeError("DEM tiles must be square");if(Re&&Re!=="mapbox"&&Re!=="terrarium")return re('"'+Re+'" is not a valid encoding type. Valid types include "mapbox" and "terrarium".');this.stride=ue.height;var Qe=this.dim=ue.height-2;this.data=new Uint32Array(ue.data.buffer),this.encoding=Re||"mapbox";for(var dt=0;dt<Qe;dt++)this.data[this._idx(-1,dt)]=this.data[this._idx(0,dt)],this.data[this._idx(Qe,dt)]=this.data[this._idx(Qe-1,dt)],this.data[this._idx(dt,-1)]=this.data[this._idx(dt,0)],this.data[this._idx(dt,Qe)]=this.data[this._idx(dt,Qe-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(Qe,-1)]=this.data[this._idx(Qe-1,0)],this.data[this._idx(-1,Qe)]=this.data[this._idx(0,Qe-1)],this.data[this._idx(Qe,Qe)]=this.data[this._idx(Qe-1,Qe-1)]};WR.prototype.get=function(j,ue){var Re=new Uint8Array(this.data.buffer),Qe=this._idx(j,ue)*4,dt=this.encoding==="terrarium"?this._unpackTerrarium:this._unpackMapbox;return dt(Re[Qe],Re[Qe+1],Re[Qe+2])},WR.prototype.getUnpackVector=function(){return this.encoding==="terrarium"?[256,1,1/256,32768]:[6553.6,25.6,.1,1e4]},WR.prototype._idx=function(j,ue){if(j<-1||j>=this.dim+1||ue<-1||ue>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(ue+1)*this.stride+(j+1)},WR.prototype._unpackMapbox=function(j,ue,Re){return(j*256*256+ue*256+Re)/10-1e4},WR.prototype._unpackTerrarium=function(j,ue,Re){return j*256+ue+Re/256-32768},WR.prototype.getPixels=function(){return new vb({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},WR.prototype.backfillBorder=function(j,ue,Re){if(this.dim!==j.dim)throw new Error("dem dimension mismatch");var Qe=ue*this.dim,dt=ue*this.dim+this.dim,Mt=Re*this.dim,ir=Re*this.dim+this.dim;switch(ue){case-1:Qe=dt-1;break;case 1:dt=Qe+1;break}switch(Re){case-1:Mt=ir-1;break;case 1:ir=Mt+1;break}for(var Fr=-ue*this.dim,Zr=-Re*this.dim,un=Mt;un<ir;un++)for(var Hn=Qe;Hn<dt;Hn++)this.data[this._idx(Hn,un)]=j.data[this._idx(Hn+Fr,un+Zr)]},Yr("DEMData",WR);function Mit(H,j){var ue={};if(!j)return ue;for(var Re=function(){var Mt=dt[Qe],ir=Mt.layerIds.map(function(Hn){return j.getLayer(Hn)}).filter(Boolean);if(ir.length!==0){Mt.layers=ir,Mt.stateDependentLayerIds&&(Mt.stateDependentLayers=Mt.stateDependentLayerIds.map(function(Hn){return ir.filter(function(yi){return yi.id===Hn})[0]}));for(var Fr=0,Zr=ir;Fr<Zr.length;Fr+=1){var un=Zr[Fr];ue[un.id]=Mt}}},Qe=0,dt=H;Qe<dt.length;Qe+=1)Re();return ue}var zH=function(j){this._stringToNumber={},this._numberToString=[];for(var ue=0;ue<j.length;ue++){var Re=j[ue];this._stringToNumber[Re]=ue,this._numberToString[ue]=Re}};zH.prototype.encode=function(j){return this._stringToNumber[j]},zH.prototype.decode=function(j){return this._numberToString[j]};var BH=function(j,ue,Re,Qe,dt){this.type="Feature",this._vectorTileFeature=j,j._z=ue,j._x=Re,j._y=Qe,this.properties=j.properties,this.id=dt},pJ={geometry:{configurable:!0}};pJ.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},pJ.geometry.set=function(H){this._geometry=H},BH.prototype.toJSON=function(){var j={geometry:this.geometry};for(var ue in this)ue==="_geometry"||ue==="_vectorTileFeature"||(j[ue]=this[ue]);return j},Object.defineProperties(BH.prototype,pJ);var oO=function(){this.state={},this.stateChanges={},this.deletedStates={}};oO.prototype.updateState=function(j,ue,Re){var Qe=String(ue);if(this.stateChanges[j]=this.stateChanges[j]||{},this.stateChanges[j][Qe]=this.stateChanges[j][Qe]||{},k(this.stateChanges[j][Qe],Re),this.deletedStates[j]===null){this.deletedStates[j]={};for(var dt in this.state[j])dt!==Qe&&(this.deletedStates[j][dt]=null)}else{var Mt=this.deletedStates[j]&&this.deletedStates[j][Qe]===null;if(Mt){this.deletedStates[j][Qe]={};for(var ir in this.state[j][Qe])Re[ir]||(this.deletedStates[j][Qe][ir]=null)}else for(var Fr in Re){var Zr=this.deletedStates[j]&&this.deletedStates[j][Qe]&&this.deletedStates[j][Qe][Fr]===null;Zr&&delete this.deletedStates[j][Qe][Fr]}}},oO.prototype.removeFeatureState=function(j,ue,Re){var Qe=this.deletedStates[j]===null;if(!Qe){var dt=String(ue);if(this.deletedStates[j]=this.deletedStates[j]||{},Re&&ue!==void 0)this.deletedStates[j][dt]!==null&&(this.deletedStates[j][dt]=this.deletedStates[j][dt]||{},this.deletedStates[j][dt][Re]=null);else if(ue!==void 0){var Mt=this.stateChanges[j]&&this.stateChanges[j][dt];if(Mt){this.deletedStates[j][dt]={};for(Re in this.stateChanges[j][dt])this.deletedStates[j][dt][Re]=null}else this.deletedStates[j][dt]=null}else this.deletedStates[j]=null}},oO.prototype.getState=function(j,ue){var Re=String(ue),Qe=this.state[j]||{},dt=this.stateChanges[j]||{},Mt=k({},Qe[Re],dt[Re]);if(this.deletedStates[j]===null)return{};if(this.deletedStates[j]){var ir=this.deletedStates[j][ue];if(ir===null)return{};for(var Fr in ir)delete Mt[Fr]}return Mt},oO.prototype.initializeTileState=function(j,ue){j.setFeatureState(this.state,ue)},oO.prototype.coalesceChanges=function(j,ue){var Re={};for(var Qe in this.stateChanges){this.state[Qe]=this.state[Qe]||{};var dt={};for(var Mt in this.stateChanges[Qe])this.state[Qe][Mt]||(this.state[Qe][Mt]={}),k(this.state[Qe][Mt],this.stateChanges[Qe][Mt]),dt[Mt]=this.state[Qe][Mt];Re[Qe]=dt}for(var ir in this.deletedStates){this.state[ir]=this.state[ir]||{};var Fr={};if(this.deletedStates[ir]===null)for(var Zr in this.state[ir])Fr[Zr]={},this.state[ir][Zr]={};else for(var un in this.deletedStates[ir]){var Hn=this.deletedStates[ir][un]===null;if(Hn)this.state[ir][un]={};else for(var yi=0,di=Object.keys(this.deletedStates[ir][un]);yi<di.length;yi+=1){var qi=di[yi];delete this.state[ir][un][qi]}Fr[un]=this.state[ir][un]}Re[ir]=Re[ir]||{},k(Re[ir],Fr)}if(this.stateChanges={},this.deletedStates={},Object.keys(Re).length!==0)for(var Ia in j){var Do=j[Ia];Do.setFeatureState(Re,ue)}};var YR=function(j,ue){this.tileID=j,this.x=j.canonical.x,this.y=j.canonical.y,this.z=j.canonical.z,this.grid=new $e(Qs,16,0),this.grid3D=new $e(Qs,16,0),this.featureIndexArray=new zp,this.promoteId=ue};YR.prototype.insert=function(j,ue,Re,Qe,dt,Mt){var ir=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(Re,Qe,dt);for(var Fr=Mt?this.grid3D:this.grid,Zr=0;Zr<ue.length;Zr++){for(var un=ue[Zr],Hn=[1/0,1/0,-1/0,-1/0],yi=0;yi<un.length;yi++){var di=un[yi];Hn[0]=Math.min(Hn[0],di.x),Hn[1]=Math.min(Hn[1],di.y),Hn[2]=Math.max(Hn[2],di.x),Hn[3]=Math.max(Hn[3],di.y)}Hn[0]<Qs&&Hn[1]<Qs&&Hn[2]>=0&&Hn[3]>=0&&Fr.insert(ir,Hn[0],Hn[1],Hn[2],Hn[3])}},YR.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new GR.VectorTile(new Xi(this.rawTileData)).layers,this.sourceLayerCoder=new zH(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},YR.prototype.query=function(j,ue,Re,Qe){var dt=this;this.loadVTLayers();for(var Mt=j.params||{},ir=Qs/j.tileSize/j.scale,Fr=zt(Mt.filter),Zr=j.queryGeometry,un=j.queryPadding*ir,Hn=O_e(Zr),yi=this.grid.query(Hn.minX-un,Hn.minY-un,Hn.maxX+un,Hn.maxY+un),di=O_e(j.cameraQueryGeometry),qi=this.grid3D.query(di.minX-un,di.minY-un,di.maxX+un,di.maxY+un,function(dl,Xl,Bl,Ku){return kS(j.cameraQueryGeometry,dl-un,Xl-un,Bl+un,Ku+un)}),Ia=0,Do=qi;Ia<Do.length;Ia+=1){var ho=Do[Ia];yi.push(ho)}yi.sort(Rit);for(var gs={},Zo,ms=function(dl){var Xl=yi[dl];if(Xl!==Zo){Zo=Xl;var Bl=dt.featureIndexArray.get(Xl),Ku=null;dt.loadMatchingFeature(gs,Bl.bucketIndex,Bl.sourceLayerIndex,Bl.featureIndex,Fr,Mt.layers,Mt.availableImages,ue,Re,Qe,function(_u,Ou,hf){return Ku||(Ku=ff(_u)),Ou.queryIntersectsFeature(Zr,_u,hf,Ku,dt.z,j.transform,ir,j.pixelPosMatrix)})}},Is=0;Is<yi.length;Is++)ms(Is);return gs},YR.prototype.loadMatchingFeature=function(j,ue,Re,Qe,dt,Mt,ir,Fr,Zr,un,Hn){var yi=this.bucketLayerIDs[ue];if(!(Mt&&!G(Mt,yi))){var di=this.sourceLayerCoder.decode(Re),qi=this.vtLayers[di],Ia=qi.feature(Qe);if(dt.needGeometry){var Do=_f(Ia,!0);if(!dt.filter(new Mf(this.tileID.overscaledZ),Do,this.tileID.canonical))return}else if(!dt.filter(new Mf(this.tileID.overscaledZ),Ia))return;for(var ho=this.getId(Ia,di),gs=0;gs<yi.length;gs++){var Zo=yi[gs];if(!(Mt&&Mt.indexOf(Zo)<0)){var ms=Fr[Zo];if(ms){var Is={};ho!==void 0&&un&&(Is=un.getState(ms.sourceLayer||"_geojsonTileLayer",ho));var dl=k({},Zr[Zo]);dl.paint=L_e(dl.paint,ms.paint,Ia,Is,ir),dl.layout=L_e(dl.layout,ms.layout,Ia,Is,ir);var Xl=!Hn||Hn(Ia,ms,Is);if(Xl){var Bl=new BH(Ia,this.z,this.x,this.y,ho);Bl.layer=dl;var Ku=j[Zo];Ku===void 0&&(Ku=j[Zo]=[]),Ku.push({featureIndex:Qe,feature:Bl,intersectionZ:Xl})}}}}}},YR.prototype.lookupSymbolFeatures=function(j,ue,Re,Qe,dt,Mt,ir,Fr){var Zr={};this.loadVTLayers();for(var un=zt(dt),Hn=0,yi=j;Hn<yi.length;Hn+=1){var di=yi[Hn];this.loadMatchingFeature(Zr,Re,Qe,di,un,Mt,ir,Fr,ue)}return Zr},YR.prototype.hasLayer=function(j){for(var ue=0,Re=this.bucketLayerIDs;ue<Re.length;ue+=1)for(var Qe=Re[ue],dt=0,Mt=Qe;dt<Mt.length;dt+=1){var ir=Mt[dt];if(j===ir)return!0}return!1},YR.prototype.getId=function(j,ue){var Re=j.id;if(this.promoteId){var Qe=typeof this.promoteId=="string"?this.promoteId:this.promoteId[ue];Re=j.properties[Qe],typeof Re=="boolean"&&(Re=Number(Re))}return Re},Yr("FeatureIndex",YR,{omit:["rawTileData","sourceLayerCoder"]});function L_e(H,j,ue,Re,Qe){return K(H,function(dt,Mt){var ir=j instanceof Wa?j.get(Mt):null;return ir&&ir.evaluate?ir.evaluate(ue,Re,Qe):ir})}function O_e(H){for(var j=1/0,ue=1/0,Re=-1/0,Qe=-1/0,dt=0,Mt=H;dt<Mt.length;dt+=1){var ir=Mt[dt];j=Math.min(j,ir.x),ue=Math.min(ue,ir.y),Re=Math.max(Re,ir.x),Qe=Math.max(Qe,ir.y)}return{minX:j,minY:ue,maxX:Re,maxY:Qe}}function Rit(H,j){return j-H}var kit=3e4,$1=function(j,ue){this.tileID=j,this.uid=y(),this.uses=0,this.tileSize=ue,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.expiredRequestCount=0,this.state="loading"};$1.prototype.registerFadeDuration=function(j){var ue=j+this.timeAdded;ue<tt.now()||this.fadeEndTime&&ue<this.fadeEndTime||(this.fadeEndTime=ue)},$1.prototype.wasRequested=function(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"},$1.prototype.loadVectorData=function(j,ue,Re){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",!j){this.collisionBoxArray=new Am;return}j.featureIndex&&(this.latestFeatureIndex=j.featureIndex,j.rawTileData?(this.latestRawTileData=j.rawTileData,this.latestFeatureIndex.rawTileData=j.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=j.collisionBoxArray,this.buckets=Mit(j.buckets,ue.style),this.hasSymbolBuckets=!1;for(var Qe in this.buckets){var dt=this.buckets[Qe];if(dt instanceof Dv)if(this.hasSymbolBuckets=!0,Re)dt.justReloaded=!0;else break}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(var Mt in this.buckets){var ir=this.buckets[Mt];if(ir instanceof Dv&&ir.hasRTLText){this.hasRTLText=!0,mv();break}}this.queryPadding=0;for(var Fr in this.buckets){var Zr=this.buckets[Fr];this.queryPadding=Math.max(this.queryPadding,ue.style.getLayer(Fr).queryRadius(Zr))}j.imageAtlas&&(this.imageAtlas=j.imageAtlas),j.glyphAtlasImage&&(this.glyphAtlasImage=j.glyphAtlasImage)},$1.prototype.unloadVectorData=function(){for(var j in this.buckets)this.buckets[j].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"},$1.prototype.getBucket=function(j){return this.buckets[j.id]},$1.prototype.upload=function(j){for(var ue in this.buckets){var Re=this.buckets[ue];Re.uploadPending()&&Re.upload(j)}var Qe=j.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new iD(j,this.imageAtlas.image,Qe.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new iD(j,this.glyphAtlasImage,Qe.ALPHA),this.glyphAtlasImage=null)},$1.prototype.prepare=function(j){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(j,this.imageAtlasTexture)},$1.prototype.queryRenderedFeatures=function(j,ue,Re,Qe,dt,Mt,ir,Fr,Zr,un){return!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData?{}:this.latestFeatureIndex.query({queryGeometry:Qe,cameraQueryGeometry:dt,scale:Mt,tileSize:this.tileSize,pixelPosMatrix:un,transform:Fr,params:ir,queryPadding:this.queryPadding*Zr},j,ue,Re)},$1.prototype.querySourceFeatures=function(j,ue){var Re=this.latestFeatureIndex;if(!(!Re||!Re.rawTileData)){var Qe=Re.loadVTLayers(),dt=ue?ue.sourceLayer:"",Mt=Qe._geojsonTileLayer||Qe[dt];if(Mt)for(var ir=zt(ue&&ue.filter),Fr=this.tileID.canonical,Zr=Fr.z,un=Fr.x,Hn=Fr.y,yi={z:Zr,x:un,y:Hn},di=0;di<Mt.length;di++){var qi=Mt.feature(di);if(ir.needGeometry){var Ia=_f(qi,!0);if(!ir.filter(new Mf(this.tileID.overscaledZ),Ia,this.tileID.canonical))continue}else if(!ir.filter(new Mf(this.tileID.overscaledZ),qi))continue;var Do=Re.getId(qi,dt),ho=new BH(qi,Zr,un,Hn,Do);ho.tile=yi,j.push(ho)}}},$1.prototype.hasData=function(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"},$1.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},$1.prototype.setExpiryData=function(j){var ue=this.expirationTime;if(j.cacheControl){var Re=Le(j.cacheControl);Re["max-age"]&&(this.expirationTime=Date.now()+Re["max-age"]*1e3)}else j.expires&&(this.expirationTime=new Date(j.expires).getTime());if(this.expirationTime){var Qe=Date.now(),dt=!1;if(this.expirationTime>Qe)dt=!1;else if(!ue)dt=!0;else if(this.expirationTime<ue)dt=!0;else{var Mt=this.expirationTime-ue;Mt?this.expirationTime=Qe+Math.max(Mt,kit):dt=!0}dt?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}},$1.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)},$1.prototype.setFeatureState=function(j,ue){if(!(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||Object.keys(j).length===0)){var Re=this.latestFeatureIndex.loadVTLayers();for(var Qe in this.buckets)if(ue.style.hasLayer(Qe)){var dt=this.buckets[Qe],Mt=dt.layers[0].sourceLayer||"_geojsonTileLayer",ir=Re[Mt],Fr=j[Mt];if(!(!ir||!Fr||Object.keys(Fr).length===0)){dt.update(Fr,ir,this.imageAtlas&&this.imageAtlas.patternPositions||{});var Zr=ue&&ue.style&&ue.style.getLayer(Qe);Zr&&(this.queryPadding=Math.max(this.queryPadding,Zr.queryRadius(dt)))}}}},$1.prototype.holdingForFade=function(){return this.symbolFadeHoldUntil!==void 0},$1.prototype.symbolFadeFinished=function(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<tt.now()},$1.prototype.clearFadeHold=function(){this.symbolFadeHoldUntil=void 0},$1.prototype.setHoldDuration=function(j){this.symbolFadeHoldUntil=tt.now()+j},$1.prototype.setDependencies=function(j,ue){for(var Re={},Qe=0,dt=ue;Qe<dt.length;Qe+=1){var Mt=dt[Qe];Re[Mt]=!0}this.dependencies[j]=Re},$1.prototype.hasDependency=function(j,ue){for(var Re=0,Qe=j;Re<Qe.length;Re+=1){var dt=Qe[Re],Mt=this.dependencies[dt];if(Mt)for(var ir=0,Fr=ue;ir<Fr.length;ir+=1){var Zr=Fr[ir];if(Mt[Zr])return!0}}return!1};var Iit=["type","source","source-layer","minzoom","maxzoom","filter","layout"],QI=m.performance,N_e=function(j){this._marks={start:[j.url,"start"].join("#"),end:[j.url,"end"].join("#"),measure:j.url.toString()},QI.mark(this._marks.start)};N_e.prototype.finish=function(){QI.mark(this._marks.end);var j=QI.getEntriesByName(this._marks.measure);return j.length===0&&(QI.measure(this._marks.measure,this._marks.start,this._marks.end),j=QI.getEntriesByName(this._marks.measure),QI.clearMarks(this._marks.start),QI.clearMarks(this._marks.end),QI.clearMeasures(this._marks.measure)),j},l.Actor=aO,l.AlphaImage=Ly,l.CanonicalTileID=oD,l.CollisionBoxArray=Am,l.Color=Of,l.DEMData=WR,l.DataConstantProperty=zi,l.DictionaryCoder=zH,l.EXTENT=Qs,l.ErrorEvent=_i,l.EvaluationParameters=Mf,l.Event=pi,l.Evented=fi,l.FeatureIndex=YR,l.FillBucket=IS,l.FillExtrusionBucket=Rw,l.ImageAtlas=Pv,l.ImagePosition=Vh,l.LineBucket=mb,l.LngLat=pg,l.LngLatBounds=Fy,l.MercatorCoordinate=aD,l.ONE_EM=wn,l.OverscaledTileID=zy,l.Point=v,l.Point$1=v,l.Properties=qo,l.Protobuf=Xi,l.RGBAImage=vb,l.RequestManager=Ue,l.RequestPerformance=N_e,l.ResourceType=no,l.SegmentVector=uc,l.SourceFeatureState=oO,l.StructArrayLayout1ui2=Zd,l.StructArrayLayout2f1f2i16=Xs,l.StructArrayLayout2i4=Po,l.StructArrayLayout3ui6=Jl,l.StructArrayLayout4i8=zs,l.SymbolBucket=Dv,l.Texture=iD,l.Tile=$1,l.Transitionable=Th,l.Uniform1f=en,l.Uniform1i=Gr,l.Uniform2f=Xr,l.Uniform3f=Rr,l.Uniform4f=jr,l.UniformColor=Br,l.UniformMatrix4f=ui,l.UnwrappedTileID=D_e,l.ValidationError=Sl,l.WritingMode=hg,l.ZoomHistory=Ji,l.add=Mw,l.addDynamicAttributes=cJ,l.asyncAll=I,l.bezier=E,l.bindAll=$,l.browser=tt,l.cacheEntryPossiblyAdded=Wi,l.clamp=g,l.clearTileCache=Da,l.clipLine=m_e,l.clone=NI,l.clone$1=J,l.clone$2=P6,l.collisionCircleLayout=Ct,l.config=at,l.create=OI,l.create$1=j1,l.create$2=fC,l.createCommonjsModule=u,l.createExpression=Gu,l.createLayout=so,l.createStyleLayer=wit,l.cross=FK,l.deepEqual=_,l.dot=NK,l.dot$1=jK,l.ease=D,l.emitValidationErrors=Iv,l.endsWith=Z,l.enforceCacheSizeLimit=Oa,l.evaluateSizeForFeature=p7,l.evaluateSizeForZoom=kH,l.evaluateVariableOffset=b_e,l.evented=xd,l.extend=k,l.featureFilter=zt,l.filterObject=Q,l.fromRotation=WM,l.getAnchorAlignment=h7,l.getAnchorJustification=uJ,l.getArrayBuffer=aa,l.getImage=si,l.getJSON=Ai,l.getRTLTextPluginStatus=Rl,l.getReferrer=an,l.getVideo=ei,l.identity=UR,l.invert=YM,l.isChar=na,l.isMapboxURL=xt,l.keysDifference=F,l.makeRequest=$n,l.mapObject=K,l.mercatorXfromLng=k_e,l.mercatorYfromLat=I_e,l.mercatorZfromAltitude=P_e,l.mul=X4,l.multiply=XM,l.mvt=GR,l.nextPowerOfTwo=M,l.normalize=Z4,l.number=Ud,l.offscreenCanvasSupported=Sa,l.ortho=gv,l.parseGlyphPBF=jx,l.pbf=Xi,l.performSymbolLayout=rit,l.perspective=FI,l.pick=P,l.plugin=Uf,l.polygonIntersectsPolygon=af,l.postMapLoadEvent=Et,l.postTurnstileEvent=St,l.potpack=kw,l.refProperties=Iit,l.register=Yr,l.registerForPluginStateChange=Cc,l.renderColorRamp=BI,l.rotate=BR,l.rotateX=nx,l.rotateZ=HR,l.scale=Bp,l.scale$1=HK,l.scale$2=D6,l.setCacheLimits=Aa,l.setRTLTextPlugin=$c,l.sphericalToCartesian=Oe,l.sqrLen=KU,l.styleSpec=Qo,l.sub=BK,l.symbolSize=sJ,l.transformMat3=zK,l.transformMat4=L6,l.translate=Cm,l.triggerPluginCompletionEvent=Qc,l.uniqueId=y,l.validateCustomStyleLayer=bit,l.validateLight=Ac,l.validateStyle=Ec,l.values=N,l.vectorTile=GR,l.version=c,l.warnOnce=re,l.webpSupported=gt,l.window=m,l.wrap=C}),z(["./shared"],function(l){function u(an){var Hr=typeof an;if(Hr==="number"||Hr==="boolean"||Hr==="string"||an===void 0||an===null)return JSON.stringify(an);if(Array.isArray(an)){for(var nn="[",Kr=0,$n=an;Kr<$n.length;Kr+=1){var Ai=$n[Kr];nn+=u(Ai)+","}return nn+"]"}for(var aa=Object.keys(an).sort(),Ci="{",Ta=0;Ta<aa.length;Ta++)Ci+=JSON.stringify(aa[Ta])+":"+u(an[aa[Ta]])+",";return Ci+"}"}function c(an){for(var Hr="",nn=0,Kr=l.refProperties;nn<Kr.length;nn+=1){var $n=Kr[nn];Hr+="/"+u(an[$n])}return Hr}function p(an,Hr){for(var nn={},Kr=0;Kr<an.length;Kr++){var $n=Hr&&Hr[an[Kr].id]||c(an[Kr]);Hr&&(Hr[an[Kr].id]=$n);var Ai=nn[$n];Ai||(Ai=nn[$n]=[]),Ai.push(an[Kr])}var aa=[];for(var Ci in nn)aa.push(nn[Ci]);return aa}var f=function(Hr){this.keyCache={},Hr&&this.replace(Hr)};f.prototype.replace=function(Hr){this._layerConfigs={},this._layers={},this.update(Hr,[])},f.prototype.update=function(Hr,nn){for(var Kr=this,$n=0,Ai=Hr;$n<Ai.length;$n+=1){var aa=Ai[$n];this._layerConfigs[aa.id]=aa;var Ci=this._layers[aa.id]=l.createStyleLayer(aa);Ci._featureFilter=l.featureFilter(Ci.filter),this.keyCache[aa.id]&&delete this.keyCache[aa.id]}for(var Ta=0,Na=nn;Ta<Na.length;Ta+=1){var ro=Na[Ta];delete this.keyCache[ro],delete this._layerConfigs[ro],delete this._layers[ro]}this.familiesBySource={};for(var oo=p(l.values(this._layerConfigs),this.keyCache),xo=0,vr=oo;xo<vr.length;xo+=1){var er=vr[xo],si=er.map(function(fi){return Kr._layers[fi.id]}),ei=si[0];if(ei.visibility!=="none"){var Kn=ei.source||"",qn=this.familiesBySource[Kn];qn||(qn=this.familiesBySource[Kn]={});var pi=ei.sourceLayer||"_geojsonTileLayer",_i=qn[pi];_i||(_i=qn[pi]=[]),_i.push(si)}}};var v=1,h=function(Hr){var nn={},Kr=[];for(var $n in Hr){var Ai=Hr[$n],aa=nn[$n]={};for(var Ci in Ai){var Ta=Ai[+Ci];if(!(!Ta||Ta.bitmap.width===0||Ta.bitmap.height===0)){var Na={x:0,y:0,w:Ta.bitmap.width+2*v,h:Ta.bitmap.height+2*v};Kr.push(Na),aa[Ci]={rect:Na,metrics:Ta.metrics}}}}var ro=l.potpack(Kr),oo=ro.w,xo=ro.h,vr=new l.AlphaImage({width:oo||1,height:xo||1});for(var er in Hr){var si=Hr[er];for(var ei in si){var Kn=si[+ei];if(!(!Kn||Kn.bitmap.width===0||Kn.bitmap.height===0)){var qn=nn[er][ei].rect;l.AlphaImage.copy(Kn.bitmap,vr,{x:0,y:0},{x:qn.x+v,y:qn.y+v},Kn.bitmap)}}}this.image=vr,this.positions=nn};l.register("GlyphAtlas",h);var m=function(Hr){this.tileID=new l.OverscaledTileID(Hr.tileID.overscaledZ,Hr.tileID.wrap,Hr.tileID.canonical.z,Hr.tileID.canonical.x,Hr.tileID.canonical.y),this.uid=Hr.uid,this.zoom=Hr.zoom,this.pixelRatio=Hr.pixelRatio,this.tileSize=Hr.tileSize,this.source=Hr.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Hr.showCollisionBoxes,this.collectResourceTiming=!!Hr.collectResourceTiming,this.returnDependencies=!!Hr.returnDependencies,this.promoteId=Hr.promoteId};m.prototype.parse=function(Hr,nn,Kr,$n,Ai){var aa=this;this.status="parsing",this.data=Hr,this.collisionBoxArray=new l.CollisionBoxArray;var Ci=new l.DictionaryCoder(Object.keys(Hr.layers).sort()),Ta=new l.FeatureIndex(this.tileID,this.promoteId);Ta.bucketLayerIDs=[];var Na={},ro={featureIndex:Ta,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:Kr},oo=nn.familiesBySource[this.source];for(var xo in oo){var vr=Hr.layers[xo];if(vr){vr.version===1&&l.warnOnce('Vector tile source "'+this.source+'" layer "'+xo+'" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var er=Ci.encode(xo),si=[],ei=0;ei<vr.length;ei++){var Kn=vr.feature(ei),qn=Ta.getId(Kn,xo);si.push({feature:Kn,id:qn,index:ei,sourceLayerIndex:er})}for(var pi=0,_i=oo[xo];pi<_i.length;pi+=1){var fi=_i[pi],Ri=fi[0];if(!(Ri.minzoom&&this.zoom<Math.floor(Ri.minzoom))&&!(Ri.maxzoom&&this.zoom>=Ri.maxzoom)&&Ri.visibility!=="none"){_(fi,this.zoom,Kr);var $i=Na[Ri.id]=Ri.createBucket({index:Ta.bucketLayerIDs.length,layers:fi,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:er,sourceID:this.source});$i.populate(si,ro,this.tileID.canonical),Ta.bucketLayerIDs.push(fi.map(function(ji){return ji.id}))}}}}var Hi,wr,gn,Xn,Yi=l.mapObject(ro.glyphDependencies,function(ji){return Object.keys(ji).map(Number)});Object.keys(Yi).length?$n.send("getGlyphs",{uid:this.uid,stacks:Yi},function(ji,Ea){Hi||(Hi=ji,wr=Ea,Ba.call(aa))}):wr={};var ha=Object.keys(ro.iconDependencies);ha.length?$n.send("getImages",{icons:ha,source:this.source,tileID:this.tileID,type:"icons"},function(ji,Ea){Hi||(Hi=ji,gn=Ea,Ba.call(aa))}):gn={};var Ca=Object.keys(ro.patternDependencies);Ca.length?$n.send("getImages",{icons:Ca,source:this.source,tileID:this.tileID,type:"patterns"},function(ji,Ea){Hi||(Hi=ji,Xn=Ea,Ba.call(aa))}):Xn={},Ba.call(this);function Ba(){if(Hi)return Ai(Hi);if(wr&&gn&&Xn){var ji=new h(wr),Ea=new l.ImageAtlas(gn,Xn);for(var cs in Na){var No=Na[cs];No instanceof l.SymbolBucket?(_(No.layers,this.zoom,Kr),l.performSymbolLayout(No,wr,ji.positions,gn,Ea.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):No.hasPattern&&(No instanceof l.LineBucket||No instanceof l.FillBucket||No instanceof l.FillExtrusionBucket)&&(_(No.layers,this.zoom,Kr),No.addFeatures(ro,this.tileID.canonical,Ea.patternPositions))}this.status="done",Ai(null,{buckets:l.values(Na).filter(function(Vs){return!Vs.isEmpty()}),featureIndex:Ta,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:ji.image,imageAtlas:Ea,glyphMap:this.returnDependencies?wr:null,iconMap:this.returnDependencies?gn:null,glyphPositions:this.returnDependencies?ji.positions:null})}}};function _(an,Hr,nn){for(var Kr=new l.EvaluationParameters(Hr),$n=0,Ai=an;$n<Ai.length;$n+=1){var aa=Ai[$n];aa.recalculate(Kr,nn)}}function x(an,Hr){var nn=l.getArrayBuffer(an.request,function(Kr,$n,Ai,aa){Kr?Hr(Kr):$n&&Hr(null,{vectorTile:new l.vectorTile.VectorTile(new l.pbf($n)),rawData:$n,cacheControl:Ai,expires:aa})});return function(){nn.cancel(),Hr()}}var A=function(Hr,nn,Kr,$n){this.actor=Hr,this.layerIndex=nn,this.availableImages=Kr,this.loadVectorData=$n||x,this.loading={},this.loaded={}};A.prototype.loadTile=function(Hr,nn){var Kr=this,$n=Hr.uid;this.loading||(this.loading={});var Ai=Hr&&Hr.request&&Hr.request.collectResourceTiming?new l.RequestPerformance(Hr.request):!1,aa=this.loading[$n]=new m(Hr);aa.abort=this.loadVectorData(Hr,function(Ci,Ta){if(delete Kr.loading[$n],Ci||!Ta)return aa.status="done",Kr.loaded[$n]=aa,nn(Ci);var Na=Ta.rawData,ro={};Ta.expires&&(ro.expires=Ta.expires),Ta.cacheControl&&(ro.cacheControl=Ta.cacheControl);var oo={};if(Ai){var xo=Ai.finish();xo&&(oo.resourceTiming=JSON.parse(JSON.stringify(xo)))}aa.vectorTile=Ta.vectorTile,aa.parse(Ta.vectorTile,Kr.layerIndex,Kr.availableImages,Kr.actor,function(vr,er){if(vr||!er)return nn(vr);nn(null,l.extend({rawTileData:Na.slice(0)},er,ro,oo))}),Kr.loaded=Kr.loaded||{},Kr.loaded[$n]=aa})},A.prototype.reloadTile=function(Hr,nn){var Kr=this,$n=this.loaded,Ai=Hr.uid,aa=this;if($n&&$n[Ai]){var Ci=$n[Ai];Ci.showCollisionBoxes=Hr.showCollisionBoxes;var Ta=function(Na,ro){var oo=Ci.reloadCallback;oo&&(delete Ci.reloadCallback,Ci.parse(Ci.vectorTile,aa.layerIndex,Kr.availableImages,aa.actor,oo)),nn(Na,ro)};Ci.status==="parsing"?Ci.reloadCallback=Ta:Ci.status==="done"&&(Ci.vectorTile?Ci.parse(Ci.vectorTile,this.layerIndex,this.availableImages,this.actor,Ta):Ta())}},A.prototype.abortTile=function(Hr,nn){var Kr=this.loading,$n=Hr.uid;Kr&&Kr[$n]&&Kr[$n].abort&&(Kr[$n].abort(),delete Kr[$n]),nn()},A.prototype.removeTile=function(Hr,nn){var Kr=this.loaded,$n=Hr.uid;Kr&&Kr[$n]&&delete Kr[$n],nn()};var E=l.window.ImageBitmap,D=function(){this.loaded={}};D.prototype.loadTile=function(Hr,nn){var Kr=Hr.uid,$n=Hr.encoding,Ai=Hr.rawImageData,aa=E&&Ai instanceof E?this.getImageData(Ai):Ai,Ci=new l.DEMData(Kr,aa,$n);this.loaded=this.loaded||{},this.loaded[Kr]=Ci,nn(null,Ci)},D.prototype.getImageData=function(Hr){(!this.offscreenCanvas||!this.offscreenCanvasContext)&&(this.offscreenCanvas=new OffscreenCanvas(Hr.width,Hr.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=Hr.width,this.offscreenCanvas.height=Hr.height,this.offscreenCanvasContext.drawImage(Hr,0,0,Hr.width,Hr.height);var nn=this.offscreenCanvasContext.getImageData(-1,-1,Hr.width+2,Hr.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new l.RGBAImage({width:nn.width,height:nn.height},nn.data)},D.prototype.removeTile=function(Hr){var nn=this.loaded,Kr=Hr.uid;nn&&nn[Kr]&&delete nn[Kr]};var g=C;function C(an,Hr){var nn=an&&an.type,Kr;if(nn==="FeatureCollection")for(Kr=0;Kr<an.features.length;Kr++)C(an.features[Kr],Hr);else if(nn==="GeometryCollection")for(Kr=0;Kr<an.geometries.length;Kr++)C(an.geometries[Kr],Hr);else if(nn==="Feature")C(an.geometry,Hr);else if(nn==="Polygon")I(an.coordinates,Hr);else if(nn==="MultiPolygon")for(Kr=0;Kr<an.coordinates.length;Kr++)I(an.coordinates[Kr],Hr);return an}function I(an,Hr){if(an.length!==0){N(an[0],Hr);for(var nn=1;nn<an.length;nn++)N(an[nn],!Hr)}}function N(an,Hr){for(var nn=0,Kr=0,$n=an.length,Ai=$n-1;Kr<$n;Ai=Kr++)nn+=(an[Kr][0]-an[Ai][0])*(an[Ai][1]+an[Kr][1]);nn>=0!=!!Hr&&an.reverse()}var F=l.vectorTile.VectorTileFeature.prototype.toGeoJSON,k=function(Hr){this._feature=Hr,this.extent=l.EXTENT,this.type=Hr.type,this.properties=Hr.tags,"id"in Hr&&!isNaN(Hr.id)&&(this.id=parseInt(Hr.id,10))};k.prototype.loadGeometry=function(){if(this._feature.type===1){for(var Hr=[],nn=0,Kr=this._feature.geometry;nn<Kr.length;nn+=1){var $n=Kr[nn];Hr.push([new l.Point$1($n[0],$n[1])])}return Hr}else{for(var Ai=[],aa=0,Ci=this._feature.geometry;aa<Ci.length;aa+=1){for(var Ta=Ci[aa],Na=[],ro=0,oo=Ta;ro<oo.length;ro+=1){var xo=oo[ro];Na.push(new l.Point$1(xo[0],xo[1]))}Ai.push(Na)}return Ai}},k.prototype.toGeoJSON=function(Hr,nn,Kr){return F.call(this,Hr,nn,Kr)};var P=function(Hr){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=l.EXTENT,this.length=Hr.length,this._features=Hr};P.prototype.feature=function(Hr){return new k(this._features[Hr])};var T=l.vectorTile.VectorTileFeature,y=S;function S(an,Hr){this.options=Hr||{},this.features=an,this.length=an.length}S.prototype.feature=function(an){return new M(this.features[an],this.options.extent)};function M(an,Hr){this.id=typeof an.id=="number"?an.id:void 0,this.type=an.type,this.rawGeometry=an.type===1?[an.geometry]:an.geometry,this.properties=an.tags,this.extent=Hr||4096}M.prototype.loadGeometry=function(){var an=this.rawGeometry;this.geometry=[];for(var Hr=0;Hr<an.length;Hr++){for(var nn=an[Hr],Kr=[],$n=0;$n<nn.length;$n++)Kr.push(new l.Point$1(nn[$n][0],nn[$n][1]));this.geometry.push(Kr)}return this.geometry},M.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var an=this.geometry,Hr=1/0,nn=-1/0,Kr=1/0,$n=-1/0,Ai=0;Ai<an.length;Ai++)for(var aa=an[Ai],Ci=0;Ci<aa.length;Ci++){var Ta=aa[Ci];Hr=Math.min(Hr,Ta.x),nn=Math.max(nn,Ta.x),Kr=Math.min(Kr,Ta.y),$n=Math.max($n,Ta.y)}return[Hr,Kr,nn,$n]},M.prototype.toGeoJSON=T.prototype.toGeoJSON;var W=Q,$=Q,Z=J,K=y;function Q(an){var Hr=new l.pbf;return G(an,Hr),Hr.finish()}function J(an,Hr){Hr=Hr||{};var nn={};for(var Kr in an)nn[Kr]=new y(an[Kr].features,Hr),nn[Kr].name=Kr,nn[Kr].version=Hr.version,nn[Kr].extent=Hr.extent;return Q({layers:nn})}function G(an,Hr){for(var nn in an.layers)Hr.writeMessage(3,ee,an.layers[nn])}function ee(an,Hr){Hr.writeVarintField(15,an.version||1),Hr.writeStringField(1,an.name||""),Hr.writeVarintField(5,an.extent||4096);var nn,Kr={keys:[],values:[],keycache:{},valuecache:{}};for(nn=0;nn<an.length;nn++)Kr.feature=an.feature(nn),Hr.writeMessage(2,re,Kr);var $n=Kr.keys;for(nn=0;nn<$n.length;nn++)Hr.writeStringField(3,$n[nn]);var Ai=Kr.values;for(nn=0;nn<Ai.length;nn++)Hr.writeMessage(4,Le,Ai[nn])}function re(an,Hr){var nn=an.feature;nn.id!==void 0&&Hr.writeVarintField(1,nn.id),Hr.writeMessage(2,fe,an),Hr.writeVarintField(3,nn.type),Hr.writeMessage(4,ke,nn)}function fe(an,Hr){var nn=an.feature,Kr=an.keys,$n=an.values,Ai=an.keycache,aa=an.valuecache;for(var Ci in nn.properties){var Ta=Ai[Ci];typeof Ta>"u"&&(Kr.push(Ci),Ta=Kr.length-1,Ai[Ci]=Ta),Hr.writeVarint(Ta);var Na=nn.properties[Ci],ro=typeof Na;ro!=="string"&&ro!=="boolean"&&ro!=="number"&&(Na=JSON.stringify(Na));var oo=ro+":"+Na,xo=aa[oo];typeof xo>"u"&&($n.push(Na),xo=$n.length-1,aa[oo]=xo),Hr.writeVarint(xo)}}function we(an,Hr){return(Hr<<3)+(an&7)}function Oe(an){return an<<1^an>>31}function ke(an,Hr){for(var nn=an.loadGeometry(),Kr=an.type,$n=0,Ai=0,aa=nn.length,Ci=0;Ci<aa;Ci++){var Ta=nn[Ci],Na=1;Kr===1&&(Na=Ta.length),Hr.writeVarint(we(1,Na));for(var ro=Kr===3?Ta.length-1:Ta.length,oo=0;oo<ro;oo++){oo===1&&Kr!==1&&Hr.writeVarint(we(2,ro-1));var xo=Ta[oo].x-$n,vr=Ta[oo].y-Ai;Hr.writeVarint(Oe(xo)),Hr.writeVarint(Oe(vr)),$n+=xo,Ai+=vr}Kr===3&&Hr.writeVarint(we(7,1))}}function Le(an,Hr){var nn=typeof an;nn==="string"?Hr.writeStringField(1,an):nn==="boolean"?Hr.writeBooleanField(7,an):nn==="number"&&(an%1!==0?Hr.writeDoubleField(3,an):an<0?Hr.writeSVarintField(6,an):Hr.writeVarintField(5,an))}W.fromVectorTileJs=$,W.fromGeojsonVt=Z,W.GeoJSONWrapper=K;function oe(an,Hr,nn,Kr,$n,Ai){if(!($n-Kr<=nn)){var aa=Kr+$n>>1;be(an,Hr,aa,Kr,$n,Ai%2),oe(an,Hr,nn,Kr,aa-1,Ai+1),oe(an,Hr,nn,aa+1,$n,Ai+1)}}function be(an,Hr,nn,Kr,$n,Ai){for(;$n>Kr;){if($n-Kr>600){var aa=$n-Kr+1,Ci=nn-Kr+1,Ta=Math.log(aa),Na=.5*Math.exp(2*Ta/3),ro=.5*Math.sqrt(Ta*Na*(aa-Na)/aa)*(Ci-aa/2<0?-1:1),oo=Math.max(Kr,Math.floor(nn-Ci*Na/aa+ro)),xo=Math.min($n,Math.floor(nn+(aa-Ci)*Na/aa+ro));be(an,Hr,nn,oo,xo,Ai)}var vr=Hr[2*nn+Ai],er=Kr,si=$n;for(_e(an,Hr,Kr,nn),Hr[2*$n+Ai]>vr&&_e(an,Hr,Kr,$n);er<si;){for(_e(an,Hr,er,si),er++,si--;Hr[2*er+Ai]<vr;)er++;for(;Hr[2*si+Ai]>vr;)si--}Hr[2*Kr+Ai]===vr?_e(an,Hr,Kr,si):(si++,_e(an,Hr,si,$n)),si<=nn&&(Kr=si+1),nn<=si&&($n=si-1)}}function _e(an,Hr,nn,Kr){he(an,nn,Kr),he(Hr,2*nn,2*Kr),he(Hr,2*nn+1,2*Kr+1)}function he(an,Hr,nn){var Kr=an[Hr];an[Hr]=an[nn],an[nn]=Kr}function De(an,Hr,nn,Kr,$n,Ai,aa){for(var Ci=[0,an.length-1,0],Ta=[],Na,ro;Ci.length;){var oo=Ci.pop(),xo=Ci.pop(),vr=Ci.pop();if(xo-vr<=aa){for(var er=vr;er<=xo;er++)Na=Hr[2*er],ro=Hr[2*er+1],Na>=nn&&Na<=$n&&ro>=Kr&&ro<=Ai&&Ta.push(an[er]);continue}var si=Math.floor((vr+xo)/2);Na=Hr[2*si],ro=Hr[2*si+1],Na>=nn&&Na<=$n&&ro>=Kr&&ro<=Ai&&Ta.push(an[si]);var ei=(oo+1)%2;(oo===0?nn<=Na:Kr<=ro)&&(Ci.push(vr),Ci.push(si-1),Ci.push(ei)),(oo===0?$n>=Na:Ai>=ro)&&(Ci.push(si+1),Ci.push(xo),Ci.push(ei))}return Ta}function xe(an,Hr,nn,Kr,$n,Ai){for(var aa=[0,an.length-1,0],Ci=[],Ta=$n*$n;aa.length;){var Na=aa.pop(),ro=aa.pop(),oo=aa.pop();if(ro-oo<=Ai){for(var xo=oo;xo<=ro;xo++)se(Hr[2*xo],Hr[2*xo+1],nn,Kr)<=Ta&&Ci.push(an[xo]);continue}var vr=Math.floor((oo+ro)/2),er=Hr[2*vr],si=Hr[2*vr+1];se(er,si,nn,Kr)<=Ta&&Ci.push(an[vr]);var ei=(Na+1)%2;(Na===0?nn-$n<=er:Kr-$n<=si)&&(aa.push(oo),aa.push(vr-1),aa.push(ei)),(Na===0?nn+$n>=er:Kr+$n>=si)&&(aa.push(vr+1),aa.push(ro),aa.push(ei))}return Ci}function se(an,Hr,nn,Kr){var $n=an-nn,Ai=Hr-Kr;return $n*$n+Ai*Ai}var Ee=function(an){return an[0]},Te=function(an){return an[1]},Be=function(Hr,nn,Kr,$n,Ai){nn===void 0&&(nn=Ee),Kr===void 0&&(Kr=Te),$n===void 0&&($n=64),Ai===void 0&&(Ai=Float64Array),this.nodeSize=$n,this.points=Hr;for(var aa=Hr.length<65536?Uint16Array:Uint32Array,Ci=this.ids=new aa(Hr.length),Ta=this.coords=new Ai(Hr.length*2),Na=0;Na<Hr.length;Na++)Ci[Na]=Na,Ta[2*Na]=nn(Hr[Na]),Ta[2*Na+1]=Kr(Hr[Na]);oe(Ci,Ta,$n,0,Ci.length-1,0)};Be.prototype.range=function(Hr,nn,Kr,$n){return De(this.ids,this.coords,Hr,nn,Kr,$n,this.nodeSize)},Be.prototype.within=function(Hr,nn,Kr){return xe(this.ids,this.coords,Hr,nn,Kr,this.nodeSize)};var tt={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(an){return an}},at=function(Hr){this.options=rt(Object.create(tt),Hr),this.trees=new Array(this.options.maxZoom+1)};at.prototype.load=function(Hr){var nn=this.options,Kr=nn.log,$n=nn.minZoom,Ai=nn.maxZoom,aa=nn.nodeSize;Kr&&console.time("total time");var Ci="prepare "+Hr.length+" points";Kr&&console.time(Ci),this.points=Hr;for(var Ta=[],Na=0;Na<Hr.length;Na++)Hr[Na].geometry&&Ta.push(pt(Hr[Na],Na));this.trees[Ai+1]=new Be(Ta,Ue,xt,aa,Float32Array),Kr&&console.timeEnd(Ci);for(var ro=Ai;ro>=$n;ro--){var oo=+Date.now();Ta=this._cluster(Ta,ro),this.trees[ro]=new Be(Ta,Ue,xt,aa,Float32Array),Kr&&console.log("z%d: %d clusters in %dms",ro,Ta.length,+Date.now()-oo)}return Kr&&console.timeEnd("total time"),this},at.prototype.getClusters=function(Hr,nn){var Kr=((Hr[0]+180)%360+360)%360-180,$n=Math.max(-90,Math.min(90,Hr[1])),Ai=Hr[2]===180?180:((Hr[2]+180)%360+360)%360-180,aa=Math.max(-90,Math.min(90,Hr[3]));if(Hr[2]-Hr[0]>=360)Kr=-180,Ai=180;else if(Kr>Ai){var Ci=this.getClusters([Kr,$n,180,aa],nn),Ta=this.getClusters([-180,$n,Ai,aa],nn);return Ci.concat(Ta)}for(var Na=this.trees[this._limitZoom(nn)],ro=Na.range(Wt(Kr),Ht(aa),Wt(Ai),Ht($n)),oo=[],xo=0,vr=ro;xo<vr.length;xo+=1){var er=vr[xo],si=Na.points[er];oo.push(si.numPoints?Rt(si):this.points[si.index])}return oo},at.prototype.getChildren=function(Hr){var nn=this._getOriginId(Hr),Kr=this._getOriginZoom(Hr),$n="No cluster with the specified id.",Ai=this.trees[Kr];if(!Ai)throw new Error($n);var aa=Ai.points[nn];if(!aa)throw new Error($n);for(var Ci=this.options.radius/(this.options.extent*Math.pow(2,Kr-1)),Ta=Ai.within(aa.x,aa.y,Ci),Na=[],ro=0,oo=Ta;ro<oo.length;ro+=1){var xo=oo[ro],vr=Ai.points[xo];vr.parentId===Hr&&Na.push(vr.numPoints?Rt(vr):this.points[vr.index])}if(Na.length===0)throw new Error($n);return Na},at.prototype.getLeaves=function(Hr,nn,Kr){nn=nn||10,Kr=Kr||0;var $n=[];return this._appendLeaves($n,Hr,nn,Kr,0),$n},at.prototype.getTile=function(Hr,nn,Kr){var $n=this.trees[this._limitZoom(Hr)],Ai=Math.pow(2,Hr),aa=this.options,Ci=aa.extent,Ta=aa.radius,Na=Ta/Ci,ro=(Kr-Na)/Ai,oo=(Kr+1+Na)/Ai,xo={features:[]};return this._addTileFeatures($n.range((nn-Na)/Ai,ro,(nn+1+Na)/Ai,oo),$n.points,nn,Kr,Ai,xo),nn===0&&this._addTileFeatures($n.range(1-Na/Ai,ro,1,oo),$n.points,Ai,Kr,Ai,xo),nn===Ai-1&&this._addTileFeatures($n.range(0,ro,Na/Ai,oo),$n.points,-1,Kr,Ai,xo),xo.features.length?xo:null},at.prototype.getClusterExpansionZoom=function(Hr){for(var nn=this._getOriginZoom(Hr)-1;nn<=this.options.maxZoom;){var Kr=this.getChildren(Hr);if(nn++,Kr.length!==1)break;Hr=Kr[0].properties.cluster_id}return nn},at.prototype._appendLeaves=function(Hr,nn,Kr,$n,Ai){for(var aa=this.getChildren(nn),Ci=0,Ta=aa;Ci<Ta.length;Ci+=1){var Na=Ta[Ci],ro=Na.properties;if(ro&&ro.cluster?Ai+ro.point_count<=$n?Ai+=ro.point_count:Ai=this._appendLeaves(Hr,ro.cluster_id,Kr,$n,Ai):Ai<$n?Ai++:Hr.push(Na),Hr.length===Kr)break}return Ai},at.prototype._addTileFeatures=function(Hr,nn,Kr,$n,Ai,aa){for(var Ci=0,Ta=Hr;Ci<Ta.length;Ci+=1){var Na=Ta[Ci],ro=nn[Na],oo=ro.numPoints,xo={type:1,geometry:[[Math.round(this.options.extent*(ro.x*Ai-Kr)),Math.round(this.options.extent*(ro.y*Ai-$n))]],tags:oo?$t(ro):this.points[ro.index].properties},vr=void 0;oo?vr=ro.id:this.options.generateId?vr=ro.index:this.points[ro.index].id&&(vr=this.points[ro.index].id),vr!==void 0&&(xo.id=vr),aa.features.push(xo)}},at.prototype._limitZoom=function(Hr){return Math.max(this.options.minZoom,Math.min(+Hr,this.options.maxZoom+1))},at.prototype._cluster=function(Hr,nn){for(var Kr=[],$n=this.options,Ai=$n.radius,aa=$n.extent,Ci=$n.reduce,Ta=$n.minPoints,Na=Ai/(aa*Math.pow(2,nn)),ro=0;ro<Hr.length;ro++){var oo=Hr[ro];if(!(oo.zoom<=nn)){oo.zoom=nn;for(var xo=this.trees[nn+1],vr=xo.within(oo.x,oo.y,Na),er=oo.numPoints||1,si=er,ei=0,Kn=vr;ei<Kn.length;ei+=1){var qn=Kn[ei],pi=xo.points[qn];pi.zoom>nn&&(si+=pi.numPoints||1)}if(si>=Ta){for(var _i=oo.x*er,fi=oo.y*er,Ri=Ci&&er>1?this._map(oo,!0):null,$i=(ro<<5)+(nn+1)+this.points.length,Hi=0,wr=vr;Hi<wr.length;Hi+=1){var gn=wr[Hi],Xn=xo.points[gn];if(!(Xn.zoom<=nn)){Xn.zoom=nn;var Yi=Xn.numPoints||1;_i+=Xn.x*Yi,fi+=Xn.y*Yi,Xn.parentId=$i,Ci&&(Ri||(Ri=this._map(oo,!0)),Ci(Ri,this._map(Xn)))}}oo.parentId=$i,Kr.push(gt(_i/si,fi/si,$i,si,Ri))}else if(Kr.push(oo),si>1)for(var ha=0,Ca=vr;ha<Ca.length;ha+=1){var Ba=Ca[ha],ji=xo.points[Ba];ji.zoom<=nn||(ji.zoom=nn,Kr.push(ji))}}}return Kr},at.prototype._getOriginId=function(Hr){return Hr-this.points.length>>5},at.prototype._getOriginZoom=function(Hr){return(Hr-this.points.length)%32},at.prototype._map=function(Hr,nn){if(Hr.numPoints)return nn?rt({},Hr.properties):Hr.properties;var Kr=this.points[Hr.index].properties,$n=this.options.map(Kr);return nn&&$n===Kr?rt({},$n):$n};function gt(an,Hr,nn,Kr,$n){return{x:an,y:Hr,zoom:1/0,id:nn,parentId:-1,numPoints:Kr,properties:$n}}function pt(an,Hr){var nn=an.geometry.coordinates,Kr=nn[0],$n=nn[1];return{x:Wt(Kr),y:Ht($n),zoom:1/0,index:Hr,parentId:-1}}function Rt(an){return{type:"Feature",id:an.id,properties:$t(an),geometry:{type:"Point",coordinates:[Ft(an.x),st(an.y)]}}}function $t(an){var Hr=an.numPoints,nn=Hr>=1e4?Math.round(Hr/1e3)+"k":Hr>=1e3?Math.round(Hr/100)/10+"k":Hr;return rt(rt({},an.properties),{cluster:!0,cluster_id:an.id,point_count:Hr,point_count_abbreviated:nn})}function Wt(an){return an/360+.5}function Ht(an){var Hr=Math.sin(an*Math.PI/180),nn=.5-.25*Math.log((1+Hr)/(1-Hr))/Math.PI;return nn<0?0:nn>1?1:nn}function Ft(an){return(an-.5)*360}function st(an){var Hr=(180-an*360)*Math.PI/180;return 360*Math.atan(Math.exp(Hr))/Math.PI-90}function rt(an,Hr){for(var nn in Hr)an[nn]=Hr[nn];return an}function Ue(an){return an.x}function xt(an){return an.y}function Gt(an,Hr,nn,Kr){for(var $n=Kr,Ai=nn-Hr>>1,aa=nn-Hr,Ci,Ta=an[Hr],Na=an[Hr+1],ro=an[nn],oo=an[nn+1],xo=Hr+3;xo<nn;xo+=3){var vr=Jt(an[xo],an[xo+1],Ta,Na,ro,oo);if(vr>$n)Ci=xo,$n=vr;else if(vr===$n){var er=Math.abs(xo-Ai);er<aa&&(Ci=xo,aa=er)}}$n>Kr&&(Ci-Hr>3&&Gt(an,Hr,Ci,Kr),an[Ci+2]=$n,nn-Ci>3&&Gt(an,Ci,nn,Kr))}function Jt(an,Hr,nn,Kr,$n,Ai){var aa=$n-nn,Ci=Ai-Kr;if(aa!==0||Ci!==0){var Ta=((an-nn)*aa+(Hr-Kr)*Ci)/(aa*aa+Ci*Ci);Ta>1?(nn=$n,Kr=Ai):Ta>0&&(nn+=aa*Ta,Kr+=Ci*Ta)}return aa=an-nn,Ci=Hr-Kr,aa*aa+Ci*Ci}function Ut(an,Hr,nn,Kr){var $n={id:typeof an>"u"?null:an,type:Hr,geometry:nn,tags:Kr,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return kr($n),$n}function kr(an){var Hr=an.geometry,nn=an.type;if(nn==="Point"||nn==="MultiPoint"||nn==="LineString")Pr(an,Hr);else if(nn==="Polygon"||nn==="MultiLineString")for(var Kr=0;Kr<Hr.length;Kr++)Pr(an,Hr[Kr]);else if(nn==="MultiPolygon")for(Kr=0;Kr<Hr.length;Kr++)for(var $n=0;$n<Hr[Kr].length;$n++)Pr(an,Hr[Kr][$n])}function Pr(an,Hr){for(var nn=0;nn<Hr.length;nn+=3)an.minX=Math.min(an.minX,Hr[nn]),an.minY=Math.min(an.minY,Hr[nn+1]),an.maxX=Math.max(an.maxX,Hr[nn]),an.maxY=Math.max(an.maxY,Hr[nn+1])}function $r(an,Hr){var nn=[];if(an.type==="FeatureCollection")for(var Kr=0;Kr<an.features.length;Kr++)rn(nn,an.features[Kr],Hr,Kr);else an.type==="Feature"?rn(nn,an,Hr):rn(nn,{geometry:an},Hr);return nn}function rn(an,Hr,nn,Kr){if(Hr.geometry){var $n=Hr.geometry.coordinates,Ai=Hr.geometry.type,aa=Math.pow(nn.tolerance/((1<<nn.maxZoom)*nn.extent),2),Ci=[],Ta=Hr.id;if(nn.promoteId?Ta=Hr.properties[nn.promoteId]:nn.generateId&&(Ta=Kr||0),Ai==="Point")kn($n,Ci);else if(Ai==="MultiPoint")for(var Na=0;Na<$n.length;Na++)kn($n[Na],Ci);else if(Ai==="LineString")Rn($n,Ci,aa,!1);else if(Ai==="MultiLineString")if(nn.lineMetrics){for(Na=0;Na<$n.length;Na++)Ci=[],Rn($n[Na],Ci,aa,!1),an.push(Ut(Ta,"LineString",Ci,Hr.properties));return}else ci($n,Ci,aa,!1);else if(Ai==="Polygon")ci($n,Ci,aa,!0);else if(Ai==="MultiPolygon")for(Na=0;Na<$n.length;Na++){var ro=[];ci($n[Na],ro,aa,!0),Ci.push(ro)}else if(Ai==="GeometryCollection"){for(Na=0;Na<Hr.geometry.geometries.length;Na++)rn(an,{id:Ta,geometry:Hr.geometry.geometries[Na],properties:Hr.properties},nn,Kr);return}else throw new Error("Input data is not a valid GeoJSON object.");an.push(Ut(Ta,Ai,Ci,Hr.properties))}}function kn(an,Hr){Hr.push(In(an[0])),Hr.push(Gn(an[1])),Hr.push(0)}function Rn(an,Hr,nn,Kr){for(var $n,Ai,aa=0,Ci=0;Ci<an.length;Ci++){var Ta=In(an[Ci][0]),Na=Gn(an[Ci][1]);Hr.push(Ta),Hr.push(Na),Hr.push(0),Ci>0&&(Kr?aa+=($n*Na-Ta*Ai)/2:aa+=Math.sqrt(Math.pow(Ta-$n,2)+Math.pow(Na-Ai,2))),$n=Ta,Ai=Na}var ro=Hr.length-3;Hr[2]=1,Gt(Hr,0,ro,nn),Hr[ro+2]=1,Hr.size=Math.abs(aa),Hr.start=0,Hr.end=Hr.size}function ci(an,Hr,nn,Kr){for(var $n=0;$n<an.length;$n++){var Ai=[];Rn(an[$n],Ai,nn,Kr),Hr.push(Ai)}}function In(an){return an/360+.5}function Gn(an){var Hr=Math.sin(an*Math.PI/180),nn=.5-.25*Math.log((1+Hr)/(1-Hr))/Math.PI;return nn<0?0:nn>1?1:nn}function mr(an,Hr,nn,Kr,$n,Ai,aa,Ci){if(nn/=Hr,Kr/=Hr,Ai>=nn&&aa<Kr)return an;if(aa<nn||Ai>=Kr)return null;for(var Ta=[],Na=0;Na<an.length;Na++){var ro=an[Na],oo=ro.geometry,xo=ro.type,vr=$n===0?ro.minX:ro.minY,er=$n===0?ro.maxX:ro.maxY;if(vr>=nn&&er<Kr){Ta.push(ro);continue}else if(er<nn||vr>=Kr)continue;var si=[];if(xo==="Point"||xo==="MultiPoint")St(oo,si,nn,Kr,$n);else if(xo==="LineString")Ot(oo,si,nn,Kr,$n,!1,Ci.lineMetrics);else if(xo==="MultiLineString")je(oo,si,nn,Kr,$n,!1);else if(xo==="Polygon")je(oo,si,nn,Kr,$n,!0);else if(xo==="MultiPolygon")for(var ei=0;ei<oo.length;ei++){var Kn=[];je(oo[ei],Kn,nn,Kr,$n,!0),Kn.length&&si.push(Kn)}if(si.length){if(Ci.lineMetrics&&xo==="LineString"){for(ei=0;ei<si.length;ei++)Ta.push(Ut(ro.id,xo,si[ei],ro.tags));continue}(xo==="LineString"||xo==="MultiLineString")&&(si.length===1?(xo="LineString",si=si[0]):xo="MultiLineString"),(xo==="Point"||xo==="MultiPoint")&&(xo=si.length===3?"Point":"MultiPoint"),Ta.push(Ut(ro.id,xo,si,ro.tags))}}return Ta.length?Ta:null}function St(an,Hr,nn,Kr,$n){for(var Ai=0;Ai<an.length;Ai+=3){var aa=an[Ai+$n];aa>=nn&&aa<=Kr&&(Hr.push(an[Ai]),Hr.push(an[Ai+1]),Hr.push(an[Ai+2]))}}function Ot(an,Hr,nn,Kr,$n,Ai,aa){for(var Ci=Et(an),Ta=$n===0?et:mt,Na=an.start,ro,oo,xo=0;xo<an.length-3;xo+=3){var vr=an[xo],er=an[xo+1],si=an[xo+2],ei=an[xo+3],Kn=an[xo+4],qn=$n===0?vr:er,pi=$n===0?ei:Kn,_i=!1;aa&&(ro=Math.sqrt(Math.pow(vr-ei,2)+Math.pow(er-Kn,2))),qn<nn?pi>nn&&(oo=Ta(Ci,vr,er,ei,Kn,nn),aa&&(Ci.start=Na+ro*oo)):qn>Kr?pi<Kr&&(oo=Ta(Ci,vr,er,ei,Kn,Kr),aa&&(Ci.start=Na+ro*oo)):Ye(Ci,vr,er,si),pi<nn&&qn>=nn&&(oo=Ta(Ci,vr,er,ei,Kn,nn),_i=!0),pi>Kr&&qn<=Kr&&(oo=Ta(Ci,vr,er,ei,Kn,Kr),_i=!0),!Ai&&_i&&(aa&&(Ci.end=Na+ro*oo),Hr.push(Ci),Ci=Et(an)),aa&&(Na+=ro)}var fi=an.length-3;vr=an[fi],er=an[fi+1],si=an[fi+2],qn=$n===0?vr:er,qn>=nn&&qn<=Kr&&Ye(Ci,vr,er,si),fi=Ci.length-3,Ai&&fi>=3&&(Ci[fi]!==Ci[0]||Ci[fi+1]!==Ci[1])&&Ye(Ci,Ci[0],Ci[1],Ci[2]),Ci.length&&Hr.push(Ci)}function Et(an){var Hr=[];return Hr.size=an.size,Hr.start=an.start,Hr.end=an.end,Hr}function je(an,Hr,nn,Kr,$n,Ai){for(var aa=0;aa<an.length;aa++)Ot(an[aa],Hr,nn,Kr,$n,Ai,!1)}function Ye(an,Hr,nn,Kr){an.push(Hr),an.push(nn),an.push(Kr)}function et(an,Hr,nn,Kr,$n,Ai){var aa=(Ai-Hr)/(Kr-Hr);return an.push(Ai),an.push(nn+($n-nn)*aa),an.push(1),aa}function mt(an,Hr,nn,Kr,$n,Ai){var aa=(Ai-nn)/($n-nn);return an.push(Hr+(Kr-Hr)*aa),an.push(Ai),an.push(1),aa}function Nt(an,Hr){var nn=Hr.buffer/Hr.extent,Kr=an,$n=mr(an,1,-1-nn,nn,0,-1,2,Hr),Ai=mr(an,1,1-nn,2+nn,0,-1,2,Hr);return($n||Ai)&&(Kr=mr(an,1,-nn,1+nn,0,-1,2,Hr)||[],$n&&(Kr=lr($n,1).concat(Kr)),Ai&&(Kr=Kr.concat(lr(Ai,-1)))),Kr}function lr(an,Hr){for(var nn=[],Kr=0;Kr<an.length;Kr++){var $n=an[Kr],Ai=$n.type,aa;if(Ai==="Point"||Ai==="MultiPoint"||Ai==="LineString")aa=br($n.geometry,Hr);else if(Ai==="MultiLineString"||Ai==="Polygon"){aa=[];for(var Ci=0;Ci<$n.geometry.length;Ci++)aa.push(br($n.geometry[Ci],Hr))}else if(Ai==="MultiPolygon")for(aa=[],Ci=0;Ci<$n.geometry.length;Ci++){for(var Ta=[],Na=0;Na<$n.geometry[Ci].length;Na++)Ta.push(br($n.geometry[Ci][Na],Hr));aa.push(Ta)}nn.push(Ut($n.id,Ai,aa,$n.tags))}return nn}function br(an,Hr){var nn=[];nn.size=an.size,an.start!==void 0&&(nn.start=an.start,nn.end=an.end);for(var Kr=0;Kr<an.length;Kr+=3)nn.push(an[Kr]+Hr,an[Kr+1],an[Kr+2]);return nn}function Or(an,Hr){if(an.transformed)return an;var nn=1<<an.z,Kr=an.x,$n=an.y,Ai,aa,Ci;for(Ai=0;Ai<an.features.length;Ai++){var Ta=an.features[Ai],Na=Ta.geometry,ro=Ta.type;if(Ta.geometry=[],ro===1)for(aa=0;aa<Na.length;aa+=2)Ta.geometry.push(tn(Na[aa],Na[aa+1],Hr,nn,Kr,$n));else for(aa=0;aa<Na.length;aa++){var oo=[];for(Ci=0;Ci<Na[aa].length;Ci+=2)oo.push(tn(Na[aa][Ci],Na[aa][Ci+1],Hr,nn,Kr,$n));Ta.geometry.push(oo)}}return an.transformed=!0,an}function tn(an,Hr,nn,Kr,$n,Ai){return[Math.round(nn*(an*Kr-$n)),Math.round(nn*(Hr*Kr-Ai))]}function Jr(an,Hr,nn,Kr,$n){for(var Ai=Hr===$n.maxZoom?0:$n.tolerance/((1<<Hr)*$n.extent),aa={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:nn,y:Kr,z:Hr,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},Ci=0;Ci<an.length;Ci++){aa.numFeatures++,dn(aa,an[Ci],Ai,$n);var Ta=an[Ci].minX,Na=an[Ci].minY,ro=an[Ci].maxX,oo=an[Ci].maxY;Ta<aa.minX&&(aa.minX=Ta),Na<aa.minY&&(aa.minY=Na),ro>aa.maxX&&(aa.maxX=ro),oo>aa.maxY&&(aa.maxY=oo)}return aa}function dn(an,Hr,nn,Kr){var $n=Hr.geometry,Ai=Hr.type,aa=[];if(Ai==="Point"||Ai==="MultiPoint")for(var Ci=0;Ci<$n.length;Ci+=3)aa.push($n[Ci]),aa.push($n[Ci+1]),an.numPoints++,an.numSimplified++;else if(Ai==="LineString")on(aa,$n,an,nn,!1,!1);else if(Ai==="MultiLineString"||Ai==="Polygon")for(Ci=0;Ci<$n.length;Ci++)on(aa,$n[Ci],an,nn,Ai==="Polygon",Ci===0);else if(Ai==="MultiPolygon")for(var Ta=0;Ta<$n.length;Ta++){var Na=$n[Ta];for(Ci=0;Ci<Na.length;Ci++)on(aa,Na[Ci],an,nn,!0,Ci===0)}if(aa.length){var ro=Hr.tags||null;if(Ai==="LineString"&&Kr.lineMetrics){ro={};for(var oo in Hr.tags)ro[oo]=Hr.tags[oo];ro.mapbox_clip_start=$n.start/$n.size,ro.mapbox_clip_end=$n.end/$n.size}var xo={geometry:aa,type:Ai==="Polygon"||Ai==="MultiPolygon"?3:Ai==="LineString"||Ai==="MultiLineString"?2:1,tags:ro};Hr.id!==null&&(xo.id=Hr.id),an.features.push(xo)}}function on(an,Hr,nn,Kr,$n,Ai){var aa=Kr*Kr;if(Kr>0&&Hr.size<($n?aa:Kr)){nn.numPoints+=Hr.length/3;return}for(var Ci=[],Ta=0;Ta<Hr.length;Ta+=3)(Kr===0||Hr[Ta+2]>aa)&&(nn.numSimplified++,Ci.push(Hr[Ta]),Ci.push(Hr[Ta+1])),nn.numPoints++;$n&&Nn(Ci,Ai),an.push(Ci)}function Nn(an,Hr){for(var nn=0,Kr=0,$n=an.length,Ai=$n-2;Kr<$n;Ai=Kr,Kr+=2)nn+=(an[Kr]-an[Ai])*(an[Kr+1]+an[Ai+1]);if(nn>0===Hr)for(Kr=0,$n=an.length;Kr<$n/2;Kr+=2){var aa=an[Kr],Ci=an[Kr+1];an[Kr]=an[$n-2-Kr],an[Kr+1]=an[$n-1-Kr],an[$n-2-Kr]=aa,an[$n-1-Kr]=Ci}}function Wi(an,Hr){return new Oa(an,Hr)}function Oa(an,Hr){Hr=this.options=Aa(Object.create(this.options),Hr);var nn=Hr.debug;if(nn&&console.time("preprocess data"),Hr.maxZoom<0||Hr.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(Hr.promoteId&&Hr.generateId)throw new Error("promoteId and generateId cannot be used together.");var Kr=$r(an,Hr);this.tiles={},this.tileCoords=[],nn&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",Hr.indexMaxZoom,Hr.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),Kr=Nt(Kr,Hr),Kr.length&&this.splitTile(Kr,0,0,0),nn&&(Kr.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)))}Oa.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Oa.prototype.splitTile=function(an,Hr,nn,Kr,$n,Ai,aa){for(var Ci=[an,Hr,nn,Kr],Ta=this.options,Na=Ta.debug;Ci.length;){Kr=Ci.pop(),nn=Ci.pop(),Hr=Ci.pop(),an=Ci.pop();var ro=1<<Hr,oo=Da(Hr,nn,Kr),xo=this.tiles[oo];if(!xo&&(Na>1&&console.time("creation"),xo=this.tiles[oo]=Jr(an,Hr,nn,Kr,Ta),this.tileCoords.push({z:Hr,x:nn,y:Kr}),Na)){Na>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Hr,nn,Kr,xo.numFeatures,xo.numPoints,xo.numSimplified),console.timeEnd("creation"));var vr="z"+Hr;this.stats[vr]=(this.stats[vr]||0)+1,this.total++}if(xo.source=an,$n){if(Hr===Ta.maxZoom||Hr===$n)continue;var er=1<<$n-Hr;if(nn!==Math.floor(Ai/er)||Kr!==Math.floor(aa/er))continue}else if(Hr===Ta.indexMaxZoom||xo.numPoints<=Ta.indexMaxPoints)continue;if(xo.source=null,an.length!==0){Na>1&&console.time("clipping");var si=.5*Ta.buffer/Ta.extent,ei=.5-si,Kn=.5+si,qn=1+si,pi,_i,fi,Ri,$i,Hi;pi=_i=fi=Ri=null,$i=mr(an,ro,nn-si,nn+Kn,0,xo.minX,xo.maxX,Ta),Hi=mr(an,ro,nn+ei,nn+qn,0,xo.minX,xo.maxX,Ta),an=null,$i&&(pi=mr($i,ro,Kr-si,Kr+Kn,1,xo.minY,xo.maxY,Ta),_i=mr($i,ro,Kr+ei,Kr+qn,1,xo.minY,xo.maxY,Ta),$i=null),Hi&&(fi=mr(Hi,ro,Kr-si,Kr+Kn,1,xo.minY,xo.maxY,Ta),Ri=mr(Hi,ro,Kr+ei,Kr+qn,1,xo.minY,xo.maxY,Ta),Hi=null),Na>1&&console.timeEnd("clipping"),Ci.push(pi||[],Hr+1,nn*2,Kr*2),Ci.push(_i||[],Hr+1,nn*2,Kr*2+1),Ci.push(fi||[],Hr+1,nn*2+1,Kr*2),Ci.push(Ri||[],Hr+1,nn*2+1,Kr*2+1)}}},Oa.prototype.getTile=function(an,Hr,nn){var Kr=this.options,$n=Kr.extent,Ai=Kr.debug;if(an<0||an>24)return null;var aa=1<<an;Hr=(Hr%aa+aa)%aa;var Ci=Da(an,Hr,nn);if(this.tiles[Ci])return Or(this.tiles[Ci],$n);Ai>1&&console.log("drilling down to z%d-%d-%d",an,Hr,nn);for(var Ta=an,Na=Hr,ro=nn,oo;!oo&&Ta>0;)Ta--,Na=Math.floor(Na/2),ro=Math.floor(ro/2),oo=this.tiles[Da(Ta,Na,ro)];return!oo||!oo.source?null:(Ai>1&&console.log("found parent tile z%d-%d-%d",Ta,Na,ro),Ai>1&&console.time("drilling down"),this.splitTile(oo.source,Ta,Na,ro,an,Hr,nn),Ai>1&&console.timeEnd("drilling down"),this.tiles[Ci]?Or(this.tiles[Ci],$n):null)};function Da(an,Hr,nn){return((1<<an)*nn+Hr)*32+an}function Aa(an,Hr){for(var nn in Hr)an[nn]=Hr[nn];return an}function Ka(an,Hr){var nn=an.tileID.canonical;if(!this._geoJSONIndex)return Hr(null,null);var Kr=this._geoJSONIndex.getTile(nn.z,nn.x,nn.y);if(!Kr)return Hr(null,null);var $n=new P(Kr.features),Ai=W($n);(Ai.byteOffset!==0||Ai.byteLength!==Ai.buffer.byteLength)&&(Ai=new Uint8Array(Ai)),Hr(null,{vectorTile:$n,rawData:Ai.buffer})}var Sa=(function(an){function Hr(nn,Kr,$n,Ai){an.call(this,nn,Kr,$n,Ka),Ai&&(this.loadGeoJSON=Ai)}return an&&(Hr.__proto__=an),Hr.prototype=Object.create(an&&an.prototype),Hr.prototype.constructor=Hr,Hr.prototype.loadData=function(Kr,$n){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=$n,this._pendingLoadDataParams=Kr,this._state&&this._state!=="Idle"?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},Hr.prototype._loadData=function(){var Kr=this;if(!(!this._pendingCallback||!this._pendingLoadDataParams)){var $n=this._pendingCallback,Ai=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var aa=Ai&&Ai.request&&Ai.request.collectResourceTiming?new l.RequestPerformance(Ai.request):!1;this.loadGeoJSON(Ai,function(Ci,Ta){if(Ci||!Ta)return $n(Ci);if(typeof Ta!="object")return $n(new Error("Input data given to '"+Ai.source+"' is not a valid GeoJSON object."));g(Ta,!0);try{if(Ai.filter){var Na=l.createExpression(Ai.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(Na.result==="error")throw new Error(Na.value.map(function(vr){return vr.key+": "+vr.message}).join(", "));var ro=Ta.features.filter(function(vr){return Na.value.evaluate({zoom:0},vr)});Ta={type:"FeatureCollection",features:ro}}Kr._geoJSONIndex=Ai.cluster?new at(no(Ai)).load(Ta.features):Wi(Ta,Ai.geojsonVtOptions)}catch(vr){return $n(vr)}Kr.loaded={};var oo={};if(aa){var xo=aa.finish();xo&&(oo.resourceTiming={},oo.resourceTiming[Ai.source]=JSON.parse(JSON.stringify(xo)))}$n(null,oo)})}},Hr.prototype.coalesce=function(){this._state==="Coalescing"?this._state="Idle":this._state==="NeedsLoadData"&&(this._state="Coalescing",this._loadData())},Hr.prototype.reloadTile=function(Kr,$n){var Ai=this.loaded,aa=Kr.uid;return Ai&&Ai[aa]?an.prototype.reloadTile.call(this,Kr,$n):this.loadTile(Kr,$n)},Hr.prototype.loadGeoJSON=function(Kr,$n){if(Kr.request)l.getJSON(Kr.request,$n);else if(typeof Kr.data=="string")try{return $n(null,JSON.parse(Kr.data))}catch{return $n(new Error("Input data given to '"+Kr.source+"' is not a valid GeoJSON object."))}else return $n(new Error("Input data given to '"+Kr.source+"' is not a valid GeoJSON object."))},Hr.prototype.removeSource=function(Kr,$n){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),$n()},Hr.prototype.getClusterExpansionZoom=function(Kr,$n){try{$n(null,this._geoJSONIndex.getClusterExpansionZoom(Kr.clusterId))}catch(Ai){$n(Ai)}},Hr.prototype.getClusterChildren=function(Kr,$n){try{$n(null,this._geoJSONIndex.getChildren(Kr.clusterId))}catch(Ai){$n(Ai)}},Hr.prototype.getClusterLeaves=function(Kr,$n){try{$n(null,this._geoJSONIndex.getLeaves(Kr.clusterId,Kr.limit,Kr.offset))}catch(Ai){$n(Ai)}},Hr})(A);function no(an){var Hr=an.superclusterOptions,nn=an.clusterProperties;if(!nn||!Hr)return Hr;for(var Kr={},$n={},Ai={accumulated:null,zoom:0},aa={properties:null},Ci=Object.keys(nn),Ta=0,Na=Ci;Ta<Na.length;Ta+=1){var ro=Na[Ta],oo=nn[ro],xo=oo[0],vr=oo[1],er=l.createExpression(vr),si=l.createExpression(typeof xo=="string"?[xo,["accumulated"],["get",ro]]:xo);Kr[ro]=er.value,$n[ro]=si.value}return Hr.map=function(ei){aa.properties=ei;for(var Kn={},qn=0,pi=Ci;qn<pi.length;qn+=1){var _i=pi[qn];Kn[_i]=Kr[_i].evaluate(Ai,aa)}return Kn},Hr.reduce=function(ei,Kn){aa.properties=Kn;for(var qn=0,pi=Ci;qn<pi.length;qn+=1){var _i=pi[qn];Ai.accumulated=ei[_i],ei[_i]=$n[_i].evaluate(Ai,aa)}},Hr}var Fo=function(Hr){var nn=this;this.self=Hr,this.actor=new l.Actor(Hr,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:A,geojson:Sa},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(Kr,$n){if(nn.workerSourceTypes[Kr])throw new Error('Worker source with name "'+Kr+'" already registered.');nn.workerSourceTypes[Kr]=$n},this.self.registerRTLTextPlugin=function(Kr){if(l.plugin.isParsed())throw new Error("RTL text plugin already registered.");l.plugin.applyArabicShaping=Kr.applyArabicShaping,l.plugin.processBidirectionalText=Kr.processBidirectionalText,l.plugin.processStyledBidirectionalText=Kr.processStyledBidirectionalText}};return Fo.prototype.setReferrer=function(Hr,nn){this.referrer=nn},Fo.prototype.setImages=function(Hr,nn,Kr){this.availableImages[Hr]=nn;for(var $n in this.workerSources[Hr]){var Ai=this.workerSources[Hr][$n];for(var aa in Ai)Ai[aa].availableImages=nn}Kr()},Fo.prototype.setLayers=function(Hr,nn,Kr){this.getLayerIndex(Hr).replace(nn),Kr()},Fo.prototype.updateLayers=function(Hr,nn,Kr){this.getLayerIndex(Hr).update(nn.layers,nn.removedIds),Kr()},Fo.prototype.loadTile=function(Hr,nn,Kr){this.getWorkerSource(Hr,nn.type,nn.source).loadTile(nn,Kr)},Fo.prototype.loadDEMTile=function(Hr,nn,Kr){this.getDEMWorkerSource(Hr,nn.source).loadTile(nn,Kr)},Fo.prototype.reloadTile=function(Hr,nn,Kr){this.getWorkerSource(Hr,nn.type,nn.source).reloadTile(nn,Kr)},Fo.prototype.abortTile=function(Hr,nn,Kr){this.getWorkerSource(Hr,nn.type,nn.source).abortTile(nn,Kr)},Fo.prototype.removeTile=function(Hr,nn,Kr){this.getWorkerSource(Hr,nn.type,nn.source).removeTile(nn,Kr)},Fo.prototype.removeDEMTile=function(Hr,nn){this.getDEMWorkerSource(Hr,nn.source).removeTile(nn)},Fo.prototype.removeSource=function(Hr,nn,Kr){if(!(!this.workerSources[Hr]||!this.workerSources[Hr][nn.type]||!this.workerSources[Hr][nn.type][nn.source])){var $n=this.workerSources[Hr][nn.type][nn.source];delete this.workerSources[Hr][nn.type][nn.source],$n.removeSource!==void 0?$n.removeSource(nn,Kr):Kr()}},Fo.prototype.loadWorkerSource=function(Hr,nn,Kr){try{this.self.importScripts(nn.url),Kr()}catch($n){Kr($n.toString())}},Fo.prototype.syncRTLPluginState=function(Hr,nn,Kr){try{l.plugin.setState(nn);var $n=l.plugin.getPluginURL();if(l.plugin.isLoaded()&&!l.plugin.isParsed()&&$n!=null){this.self.importScripts($n);var Ai=l.plugin.isParsed(),aa=Ai?void 0:new Error("RTL Text Plugin failed to import scripts from "+$n);Kr(aa,Ai)}}catch(Ci){Kr(Ci.toString())}},Fo.prototype.getAvailableImages=function(Hr){var nn=this.availableImages[Hr];return nn||(nn=[]),nn},Fo.prototype.getLayerIndex=function(Hr){var nn=this.layerIndexes[Hr];return nn||(nn=this.layerIndexes[Hr]=new f),nn},Fo.prototype.getWorkerSource=function(Hr,nn,Kr){var $n=this;if(this.workerSources[Hr]||(this.workerSources[Hr]={}),this.workerSources[Hr][nn]||(this.workerSources[Hr][nn]={}),!this.workerSources[Hr][nn][Kr]){var Ai={send:function(aa,Ci,Ta){$n.actor.send(aa,Ci,Ta,Hr)}};this.workerSources[Hr][nn][Kr]=new this.workerSourceTypes[nn](Ai,this.getLayerIndex(Hr),this.getAvailableImages(Hr))}return this.workerSources[Hr][nn][Kr]},Fo.prototype.getDEMWorkerSource=function(Hr,nn){return this.demWorkerSources[Hr]||(this.demWorkerSources[Hr]={}),this.demWorkerSources[Hr][nn]||(this.demWorkerSources[Hr][nn]=new D),this.demWorkerSources[Hr][nn]},Fo.prototype.enforceCacheSizeLimit=function(Hr,nn){l.enforceCacheSizeLimit(nn)},typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope&&(self.worker=new Fo(self)),Fo}),z(["./shared"],function(l){var u=l.createCommonjsModule(function(Xe){Xe.exports?Xe.exports=ne:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=ne,window.mapboxgl.notSupportedReason=Fe);function ne(Rr){return!Fe(Rr)}function Fe(Rr){if(!me())return"not a browser";if(!We())return"insufficent Array support";if(!At())return"insufficient Function support";if(!Yt())return"insufficient Object support";if(!tr())return"insufficient JSON support";if(!Pt())return"insufficient worker support";if(!jt())return"insufficient Uint8ClampedArray support";if(!hr())return"insufficient ArrayBuffer support";if(!qr())return"insufficient Canvas/getImageData support";if(!Gr(Rr&&Rr.failIfMajorPerformanceCaveat))return"insufficient WebGL support"}function me(){return typeof window<"u"&&typeof document<"u"}function We(){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 At(){return Function.prototype&&Function.prototype.bind}function Yt(){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 tr(){return"JSON"in window&&"parse"in JSON&&"stringify"in JSON}function Pt(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var Rr=new Blob([""],{type:"text/javascript"}),jr=URL.createObjectURL(Rr),Br,Bn;try{Bn=new Worker(jr),Br=!0}catch{Br=!1}return Bn&&Bn.terminate(),URL.revokeObjectURL(jr),Br}function jt(){return"Uint8ClampedArray"in window}function hr(){return ArrayBuffer.isView}function qr(){var Rr=document.createElement("canvas");Rr.width=Rr.height=1;var jr=Rr.getContext("2d");if(!jr)return!1;var Br=jr.getImageData(0,0,1,1);return Br&&Br.width===Rr.width}var zr={};function Gr(Rr){return zr[Rr]===void 0&&(zr[Rr]=Xr(Rr)),zr[Rr]}ne.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0};function en(Rr){var jr=document.createElement("canvas"),Br=Object.create(ne.webGLContextAttributes);return Br.failIfMajorPerformanceCaveat=Rr,jr.probablySupportsContext?jr.probablySupportsContext("webgl",Br)||jr.probablySupportsContext("experimental-webgl",Br):jr.supportsContext?jr.supportsContext("webgl",Br)||jr.supportsContext("experimental-webgl",Br):jr.getContext("webgl",Br)||jr.getContext("experimental-webgl",Br)}function Xr(Rr){var jr=en(Rr);if(!jr)return!1;var Br=jr.createShader(jr.VERTEX_SHADER);return!Br||jr.isContextLost()?!1:(jr.shaderSource(Br,"void main() {}"),jr.compileShader(Br),jr.getShaderParameter(Br,jr.COMPILE_STATUS)===!0)}}),c={};c.create=function(Xe,ne,Fe){var me=l.window.document.createElement(Xe);return ne!==void 0&&(me.className=ne),Fe&&Fe.appendChild(me),me},c.createNS=function(Xe,ne){var Fe=l.window.document.createElementNS(Xe,ne);return Fe};var p=l.window.document&&l.window.document.documentElement.style;function f(Xe){if(!p)return Xe[0];for(var ne=0;ne<Xe.length;ne++)if(Xe[ne]in p)return Xe[ne];return Xe[0]}var v=f(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]),h;c.disableDrag=function(){p&&v&&(h=p[v],p[v]="none")},c.enableDrag=function(){p&&v&&(p[v]=h)};var m=f(["transform","WebkitTransform"]);c.setTransform=function(Xe,ne){Xe.style[m]=ne};var _=!1;try{var x=Object.defineProperty({},"passive",{get:function(){_=!0}});l.window.addEventListener("test",x,x),l.window.removeEventListener("test",x,x)}catch{_=!1}c.addEventListener=function(Xe,ne,Fe,me){me===void 0&&(me={}),"passive"in me&&_?Xe.addEventListener(ne,Fe,me):Xe.addEventListener(ne,Fe,me.capture)},c.removeEventListener=function(Xe,ne,Fe,me){me===void 0&&(me={}),"passive"in me&&_?Xe.removeEventListener(ne,Fe,me):Xe.removeEventListener(ne,Fe,me.capture)};var A=function(Xe){Xe.preventDefault(),Xe.stopPropagation(),l.window.removeEventListener("click",A,!0)};c.suppressClick=function(){l.window.addEventListener("click",A,!0),l.window.setTimeout(function(){l.window.removeEventListener("click",A,!0)},0)},c.mousePos=function(Xe,ne){var Fe=Xe.getBoundingClientRect();return new l.Point(ne.clientX-Fe.left-Xe.clientLeft,ne.clientY-Fe.top-Xe.clientTop)},c.touchPos=function(Xe,ne){for(var Fe=Xe.getBoundingClientRect(),me=[],We=0;We<ne.length;We++)me.push(new l.Point(ne[We].clientX-Fe.left-Xe.clientLeft,ne[We].clientY-Fe.top-Xe.clientTop));return me},c.mouseButton=function(Xe){return typeof l.window.InstallTrigger<"u"&&Xe.button===2&&Xe.ctrlKey&&l.window.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:Xe.button},c.remove=function(Xe){Xe.parentNode&&Xe.parentNode.removeChild(Xe)};function E(Xe,ne,Fe){var me,We,At,Yt=l.browser.devicePixelRatio>1?"@2x":"",tr=l.getJSON(ne.transformRequest(ne.normalizeSpriteURL(Xe,Yt,".json"),l.ResourceType.SpriteJSON),function(hr,qr){tr=null,At||(At=hr,me=qr,jt())}),Pt=l.getImage(ne.transformRequest(ne.normalizeSpriteURL(Xe,Yt,".png"),l.ResourceType.SpriteImage),function(hr,qr){Pt=null,At||(At=hr,We=qr,jt())});function jt(){if(At)Fe(At);else if(me&&We){var hr=l.browser.getImageData(We),qr={};for(var zr in me){var Gr=me[zr],en=Gr.width,Xr=Gr.height,Rr=Gr.x,jr=Gr.y,Br=Gr.sdf,Bn=Gr.pixelRatio,ui=Gr.stretchX,Ii=Gr.stretchY,Ga=Gr.content,ka=new l.RGBAImage({width:en,height:Xr});l.RGBAImage.copy(hr,ka,{x:Rr,y:jr},{x:0,y:0},{width:en,height:Xr}),qr[zr]={data:ka,pixelRatio:Bn,sdf:Br,stretchX:ui,stretchY:Ii,content:Ga}}Fe(null,qr)}}return{cancel:function(){tr&&(tr.cancel(),tr=null),Pt&&(Pt.cancel(),Pt=null)}}}function D(Xe){var ne=Xe.userImage;if(ne&&ne.render){var Fe=ne.render();if(Fe)return Xe.data.replace(new Uint8Array(ne.data.buffer)),!0}return!1}var g=1,C=(function(Xe){function ne(){Xe.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new l.RGBAImage({width:1,height:1}),this.dirty=!0}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.isLoaded=function(){return this.loaded},ne.prototype.setLoaded=function(me){if(this.loaded!==me&&(this.loaded=me,me)){for(var We=0,At=this.requestors;We<At.length;We+=1){var Yt=At[We],tr=Yt.ids,Pt=Yt.callback;this._notify(tr,Pt)}this.requestors=[]}},ne.prototype.getImage=function(me){return this.images[me]},ne.prototype.addImage=function(me,We){this._validate(me,We)&&(this.images[me]=We)},ne.prototype._validate=function(me,We){var At=!0;return this._validateStretch(We.stretchX,We.data&&We.data.width)||(this.fire(new l.ErrorEvent(new Error('Image "'+me+'" has invalid "stretchX" value'))),At=!1),this._validateStretch(We.stretchY,We.data&&We.data.height)||(this.fire(new l.ErrorEvent(new Error('Image "'+me+'" has invalid "stretchY" value'))),At=!1),this._validateContent(We.content,We)||(this.fire(new l.ErrorEvent(new Error('Image "'+me+'" has invalid "content" value'))),At=!1),At},ne.prototype._validateStretch=function(me,We){if(!me)return!0;for(var At=0,Yt=0,tr=me;Yt<tr.length;Yt+=1){var Pt=tr[Yt];if(Pt[0]<At||Pt[1]<Pt[0]||We<Pt[1])return!1;At=Pt[1]}return!0},ne.prototype._validateContent=function(me,We){return me?!(me.length!==4||me[0]<0||We.data.width<me[0]||me[1]<0||We.data.height<me[1]||me[2]<0||We.data.width<me[2]||me[3]<0||We.data.height<me[3]||me[2]<me[0]||me[3]<me[1]):!0},ne.prototype.updateImage=function(me,We){var At=this.images[me];We.version=At.version+1,this.images[me]=We,this.updatedImages[me]=!0},ne.prototype.removeImage=function(me){var We=this.images[me];delete this.images[me],delete this.patterns[me],We.userImage&&We.userImage.onRemove&&We.userImage.onRemove()},ne.prototype.listImages=function(){return Object.keys(this.images)},ne.prototype.getImages=function(me,We){var At=!0;if(!this.isLoaded())for(var Yt=0,tr=me;Yt<tr.length;Yt+=1){var Pt=tr[Yt];this.images[Pt]||(At=!1)}this.isLoaded()||At?this._notify(me,We):this.requestors.push({ids:me,callback:We})},ne.prototype._notify=function(me,We){for(var At={},Yt=0,tr=me;Yt<tr.length;Yt+=1){var Pt=tr[Yt];this.images[Pt]||this.fire(new l.Event("styleimagemissing",{id:Pt}));var jt=this.images[Pt];jt?At[Pt]={data:jt.data.clone(),pixelRatio:jt.pixelRatio,sdf:jt.sdf,version:jt.version,stretchX:jt.stretchX,stretchY:jt.stretchY,content:jt.content,hasRenderCallback:!!(jt.userImage&&jt.userImage.render)}:l.warnOnce('Image "'+Pt+'" 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.')}We(null,At)},ne.prototype.getPixelSize=function(){var me=this.atlasImage,We=me.width,At=me.height;return{width:We,height:At}},ne.prototype.getPattern=function(me){var We=this.patterns[me],At=this.getImage(me);if(!At)return null;if(We&&We.position.version===At.version)return We.position;if(We)We.position.version=At.version;else{var Yt=At.data.width+g*2,tr=At.data.height+g*2,Pt={w:Yt,h:tr,x:0,y:0},jt=new l.ImagePosition(Pt,At);this.patterns[me]={bin:Pt,position:jt}}return this._updatePatternAtlas(),this.patterns[me].position},ne.prototype.bind=function(me){var We=me.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new l.Texture(me,this.atlasImage,We.RGBA),this.atlasTexture.bind(We.LINEAR,We.CLAMP_TO_EDGE)},ne.prototype._updatePatternAtlas=function(){var me=[];for(var We in this.patterns)me.push(this.patterns[We].bin);var At=l.potpack(me),Yt=At.w,tr=At.h,Pt=this.atlasImage;Pt.resize({width:Yt||1,height:tr||1});for(var jt in this.patterns){var hr=this.patterns[jt],qr=hr.bin,zr=qr.x+g,Gr=qr.y+g,en=this.images[jt].data,Xr=en.width,Rr=en.height;l.RGBAImage.copy(en,Pt,{x:0,y:0},{x:zr,y:Gr},{width:Xr,height:Rr}),l.RGBAImage.copy(en,Pt,{x:0,y:Rr-1},{x:zr,y:Gr-1},{width:Xr,height:1}),l.RGBAImage.copy(en,Pt,{x:0,y:0},{x:zr,y:Gr+Rr},{width:Xr,height:1}),l.RGBAImage.copy(en,Pt,{x:Xr-1,y:0},{x:zr-1,y:Gr},{width:1,height:Rr}),l.RGBAImage.copy(en,Pt,{x:0,y:0},{x:zr+Xr,y:Gr},{width:1,height:Rr})}this.dirty=!0},ne.prototype.beginFrame=function(){this.callbackDispatchedThisFrame={}},ne.prototype.dispatchRenderCallbacks=function(me){for(var We=0,At=me;We<At.length;We+=1){var Yt=At[We];if(!this.callbackDispatchedThisFrame[Yt]){this.callbackDispatchedThisFrame[Yt]=!0;var tr=this.images[Yt],Pt=D(tr);Pt&&this.updateImage(Yt,tr)}}},ne})(l.Evented);function I(Xe,ne,Fe,me,We){var At=ne*256,Yt=At+255,tr=me.transformRequest(me.normalizeGlyphsURL(Fe).replace("{fontstack}",Xe).replace("{range}",At+"-"+Yt),l.ResourceType.Glyphs);l.getArrayBuffer(tr,function(Pt,jt){if(Pt)We(Pt);else if(jt){for(var hr={},qr=0,zr=l.parseGlyphPBF(jt);qr<zr.length;qr+=1){var Gr=zr[qr];hr[Gr.id]=Gr}We(null,hr)}})}var N=P,F=P,k=1e20;function P(Xe,ne,Fe,me,We,At){this.fontSize=Xe||24,this.buffer=ne===void 0?3:ne,this.cutoff=me||.25,this.fontFamily=We||"sans-serif",this.fontWeight=At||"normal",this.radius=Fe||8;var Yt=this.size=this.fontSize+this.buffer*2;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=Yt,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(Yt*Yt),this.gridInner=new Float64Array(Yt*Yt),this.f=new Float64Array(Yt),this.d=new Float64Array(Yt),this.z=new Float64Array(Yt+1),this.v=new Int16Array(Yt),this.middle=Math.round(Yt/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}P.prototype.draw=function(Xe){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(Xe,this.buffer,this.middle);for(var ne=this.ctx.getImageData(0,0,this.size,this.size),Fe=new Uint8ClampedArray(this.size*this.size),me=0;me<this.size*this.size;me++){var We=ne.data[me*4+3]/255;this.gridOuter[me]=We===1?0:We===0?k:Math.pow(Math.max(0,.5-We),2),this.gridInner[me]=We===1?k:We===0?0:Math.pow(Math.max(0,We-.5),2)}for(T(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),T(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),me=0;me<this.size*this.size;me++){var At=this.gridOuter[me]-this.gridInner[me];Fe[me]=Math.max(0,Math.min(255,Math.round(255-255*(At/this.radius+this.cutoff))))}return Fe};function T(Xe,ne,Fe,me,We,At,Yt){for(var tr=0;tr<ne;tr++){for(var Pt=0;Pt<Fe;Pt++)me[Pt]=Xe[Pt*ne+tr];for(y(me,We,At,Yt,Fe),Pt=0;Pt<Fe;Pt++)Xe[Pt*ne+tr]=We[Pt]}for(Pt=0;Pt<Fe;Pt++){for(tr=0;tr<ne;tr++)me[tr]=Xe[Pt*ne+tr];for(y(me,We,At,Yt,ne),tr=0;tr<ne;tr++)Xe[Pt*ne+tr]=Math.sqrt(We[tr])}}function y(Xe,ne,Fe,me,We){Fe[0]=0,me[0]=-k,me[1]=+k;for(var At=1,Yt=0;At<We;At++){for(var tr=(Xe[At]+At*At-(Xe[Fe[Yt]]+Fe[Yt]*Fe[Yt]))/(2*At-2*Fe[Yt]);tr<=me[Yt];)Yt--,tr=(Xe[At]+At*At-(Xe[Fe[Yt]]+Fe[Yt]*Fe[Yt]))/(2*At-2*Fe[Yt]);Yt++,Fe[Yt]=At,me[Yt]=tr,me[Yt+1]=+k}for(At=0,Yt=0;At<We;At++){for(;me[Yt+1]<At;)Yt++;ne[At]=(At-Fe[Yt])*(At-Fe[Yt])+Xe[Fe[Yt]]}}N.default=F;var S=function(ne,Fe){this.requestManager=ne,this.localIdeographFontFamily=Fe,this.entries={}};S.prototype.setURL=function(ne){this.url=ne},S.prototype.getGlyphs=function(ne,Fe){var me=this,We=[];for(var At in ne)for(var Yt=0,tr=ne[At];Yt<tr.length;Yt+=1){var Pt=tr[Yt];We.push({stack:At,id:Pt})}l.asyncAll(We,function(jt,hr){var qr=jt.stack,zr=jt.id,Gr=me.entries[qr];Gr||(Gr=me.entries[qr]={glyphs:{},requests:{},ranges:{}});var en=Gr.glyphs[zr];if(en!==void 0){hr(null,{stack:qr,id:zr,glyph:en});return}if(en=me._tinySDF(Gr,qr,zr),en){Gr.glyphs[zr]=en,hr(null,{stack:qr,id:zr,glyph:en});return}var Xr=Math.floor(zr/256);if(Xr*256>65535){hr(new Error("glyphs > 65535 not supported"));return}if(Gr.ranges[Xr]){hr(null,{stack:qr,id:zr,glyph:en});return}var Rr=Gr.requests[Xr];Rr||(Rr=Gr.requests[Xr]=[],S.loadGlyphRange(qr,Xr,me.url,me.requestManager,function(jr,Br){if(Br){for(var Bn in Br)me._doesCharSupportLocalGlyph(+Bn)||(Gr.glyphs[+Bn]=Br[+Bn]);Gr.ranges[Xr]=!0}for(var ui=0,Ii=Rr;ui<Ii.length;ui+=1){var Ga=Ii[ui];Ga(jr,Br)}delete Gr.requests[Xr]})),Rr.push(function(jr,Br){jr?hr(jr):Br&&hr(null,{stack:qr,id:zr,glyph:Br[zr]||null})})},function(jt,hr){if(jt)Fe(jt);else if(hr){for(var qr={},zr=0,Gr=hr;zr<Gr.length;zr+=1){var en=Gr[zr],Xr=en.stack,Rr=en.id,jr=en.glyph;(qr[Xr]||(qr[Xr]={}))[Rr]=jr&&{id:jr.id,bitmap:jr.bitmap.clone(),metrics:jr.metrics}}Fe(null,qr)}})},S.prototype._doesCharSupportLocalGlyph=function(ne){return!!this.localIdeographFontFamily&&(l.isChar["CJK Unified Ideographs"](ne)||l.isChar["Hangul Syllables"](ne)||l.isChar.Hiragana(ne)||l.isChar.Katakana(ne))},S.prototype._tinySDF=function(ne,Fe,me){var We=this.localIdeographFontFamily;if(We&&this._doesCharSupportLocalGlyph(me)){var At=ne.tinySDF;if(!At){var Yt="400";/bold/i.test(Fe)?Yt="900":/medium/i.test(Fe)?Yt="500":/light/i.test(Fe)&&(Yt="200"),At=ne.tinySDF=new S.TinySDF(24,3,8,.25,We,Yt)}return{id:me,bitmap:new l.AlphaImage({width:30,height:30},At.draw(String.fromCharCode(me))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},S.loadGlyphRange=I,S.TinySDF=N;var M=function(){this.specification=l.styleSpec.light.position};M.prototype.possiblyEvaluate=function(ne,Fe){return l.sphericalToCartesian(ne.expression.evaluate(Fe))},M.prototype.interpolate=function(ne,Fe,me){return{x:l.number(ne.x,Fe.x,me),y:l.number(ne.y,Fe.y,me),z:l.number(ne.z,Fe.z,me)}};var W=new l.Properties({anchor:new l.DataConstantProperty(l.styleSpec.light.anchor),position:new M,color:new l.DataConstantProperty(l.styleSpec.light.color),intensity:new l.DataConstantProperty(l.styleSpec.light.intensity)}),$="-transition",Z=(function(Xe){function ne(Fe){Xe.call(this),this._transitionable=new l.Transitionable(W),this.setLight(Fe),this._transitioning=this._transitionable.untransitioned()}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.getLight=function(){return this._transitionable.serialize()},ne.prototype.setLight=function(me,We){if(We===void 0&&(We={}),!this._validate(l.validateLight,me,We))for(var At in me){var Yt=me[At];l.endsWith(At,$)?this._transitionable.setTransition(At.slice(0,-$.length),Yt):this._transitionable.setValue(At,Yt)}},ne.prototype.updateTransitions=function(me){this._transitioning=this._transitionable.transitioned(me,this._transitioning)},ne.prototype.hasTransition=function(){return this._transitioning.hasTransition()},ne.prototype.recalculate=function(me){this.properties=this._transitioning.possiblyEvaluate(me)},ne.prototype._validate=function(me,We,At){return At&&At.validate===!1?!1:l.emitValidationErrors(this,me.call(l.validateStyle,l.extend({value:We,style:{glyphs:!0,sprite:!0},styleSpec:l.styleSpec})))},ne})(l.Evented),K=function(ne,Fe){this.width=ne,this.height=Fe,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}};K.prototype.getDash=function(ne,Fe){var me=ne.join(",")+String(Fe);return this.dashEntry[me]||(this.dashEntry[me]=this.addDash(ne,Fe)),this.dashEntry[me]},K.prototype.getDashRanges=function(ne,Fe,me){var We=ne.length%2===1,At=[],Yt=We?-ne[ne.length-1]*me:0,tr=ne[0]*me,Pt=!0;At.push({left:Yt,right:tr,isDash:Pt,zeroLength:ne[0]===0});for(var jt=ne[0],hr=1;hr<ne.length;hr++){Pt=!Pt;var qr=ne[hr];Yt=jt*me,jt+=qr,tr=jt*me,At.push({left:Yt,right:tr,isDash:Pt,zeroLength:qr===0})}return At},K.prototype.addRoundDash=function(ne,Fe,me){for(var We=Fe/2,At=-me;At<=me;At++)for(var Yt=this.nextRow+me+At,tr=this.width*Yt,Pt=0,jt=ne[Pt],hr=0;hr<this.width;hr++){hr/jt.right>1&&(jt=ne[++Pt]);var qr=Math.abs(hr-jt.left),zr=Math.abs(hr-jt.right),Gr=Math.min(qr,zr),en=void 0,Xr=At/me*(We+1);if(jt.isDash){var Rr=We-Math.abs(Xr);en=Math.sqrt(Gr*Gr+Rr*Rr)}else en=We-Math.sqrt(Gr*Gr+Xr*Xr);this.data[tr+hr]=Math.max(0,Math.min(255,en+128))}},K.prototype.addRegularDash=function(ne){for(var Fe=ne.length-1;Fe>=0;--Fe){var me=ne[Fe],We=ne[Fe+1];me.zeroLength?ne.splice(Fe,1):We&&We.isDash===me.isDash&&(We.left=me.left,ne.splice(Fe,1))}var At=ne[0],Yt=ne[ne.length-1];At.isDash===Yt.isDash&&(At.left=Yt.left-this.width,Yt.right=At.right+this.width);for(var tr=this.width*this.nextRow,Pt=0,jt=ne[Pt],hr=0;hr<this.width;hr++){hr/jt.right>1&&(jt=ne[++Pt]);var qr=Math.abs(hr-jt.left),zr=Math.abs(hr-jt.right),Gr=Math.min(qr,zr),en=jt.isDash?Gr:-Gr;this.data[tr+hr]=Math.max(0,Math.min(255,en+128))}},K.prototype.addDash=function(ne,Fe){var me=Fe?7:0,We=2*me+1;if(this.nextRow+We>this.height)return l.warnOnce("LineAtlas out of space"),null;for(var At=0,Yt=0;Yt<ne.length;Yt++)At+=ne[Yt];if(At!==0){var tr=this.width/At,Pt=this.getDashRanges(ne,this.width,tr);Fe?this.addRoundDash(Pt,tr,me):this.addRegularDash(Pt)}var jt={y:(this.nextRow+me+.5)/this.height,height:2*me/this.height,width:At};return this.nextRow+=We,this.dirty=!0,jt},K.prototype.bind=function(ne){var Fe=ne.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))};var Q=function Xe(ne,Fe){this.workerPool=ne,this.actors=[],this.currentActor=0,this.id=l.uniqueId();for(var me=this.workerPool.acquire(this.id),We=0;We<me.length;We++){var At=me[We],Yt=new Xe.Actor(At,Fe,this.id);Yt.name="Worker "+We,this.actors.push(Yt)}};Q.prototype.broadcast=function(ne,Fe,me){me=me||function(){},l.asyncAll(this.actors,function(We,At){We.send(ne,Fe,At)},me)},Q.prototype.getActor=function(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]},Q.prototype.remove=function(){this.actors.forEach(function(ne){ne.remove()}),this.actors=[],this.workerPool.release(this.id)},Q.Actor=l.Actor;function J(Xe,ne,Fe){var me=function(We,At){if(We)return Fe(We);if(At){var Yt=l.pick(l.extend(At,Xe),["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","scheme","tileSize","encoding"]);At.vector_layers&&(Yt.vectorLayers=At.vector_layers,Yt.vectorLayerIds=Yt.vectorLayers.map(function(tr){return tr.id})),Yt.tiles=ne.canonicalizeTileset(Yt,Xe.url),Fe(null,Yt)}};return Xe.url?l.getJSON(ne.transformRequest(ne.normalizeSourceURL(Xe.url),l.ResourceType.Source),me):l.browser.frame(function(){return me(null,Xe)})}var G=function(ne,Fe,me){this.bounds=l.LngLatBounds.convert(this.validateBounds(ne)),this.minzoom=Fe||0,this.maxzoom=me||24};G.prototype.validateBounds=function(ne){return!Array.isArray(ne)||ne.length!==4?[-180,-90,180,90]:[Math.max(-180,ne[0]),Math.max(-90,ne[1]),Math.min(180,ne[2]),Math.min(90,ne[3])]},G.prototype.contains=function(ne){var Fe=Math.pow(2,ne.z),me={minX:Math.floor(l.mercatorXfromLng(this.bounds.getWest())*Fe),minY:Math.floor(l.mercatorYfromLat(this.bounds.getNorth())*Fe),maxX:Math.ceil(l.mercatorXfromLng(this.bounds.getEast())*Fe),maxY:Math.ceil(l.mercatorYfromLat(this.bounds.getSouth())*Fe)},We=ne.x>=me.minX&&ne.x<me.maxX&&ne.y>=me.minY&&ne.y<me.maxY;return We};var ee=(function(Xe){function ne(Fe,me,We,At){if(Xe.call(this),this.id=Fe,this.dispatcher=We,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,l.extend(this,l.pick(me,["url","scheme","tileSize","promoteId"])),this._options=l.extend({type:"vector"},me),this._collectResourceTiming=me.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(At)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.load=function(){var me=this;this._loaded=!1,this.fire(new l.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=J(this._options,this.map._requestManager,function(We,At){me._tileJSONRequest=null,me._loaded=!0,We?me.fire(new l.ErrorEvent(We)):At&&(l.extend(me,At),At.bounds&&(me.tileBounds=new G(At.bounds,me.minzoom,me.maxzoom)),l.postTurnstileEvent(At.tiles,me.map._requestManager._customAccessToken),l.postMapLoadEvent(At.tiles,me.map._getMapId(),me.map._requestManager._skuToken,me.map._requestManager._customAccessToken),me.fire(new l.Event("data",{dataType:"source",sourceDataType:"metadata"})),me.fire(new l.Event("data",{dataType:"source",sourceDataType:"content"})))})},ne.prototype.loaded=function(){return this._loaded},ne.prototype.hasTile=function(me){return!this.tileBounds||this.tileBounds.contains(me.canonical)},ne.prototype.onAdd=function(me){this.map=me,this.load()},ne.prototype.setSourceProperty=function(me){this._tileJSONRequest&&this._tileJSONRequest.cancel(),me();var We=this.map.style.sourceCaches[this.id];We.clearTiles(),this.load()},ne.prototype.setTiles=function(me){var We=this;return this.setSourceProperty(function(){We._options.tiles=me}),this},ne.prototype.setUrl=function(me){var We=this;return this.setSourceProperty(function(){We.url=me,We._options.url=me}),this},ne.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},ne.prototype.serialize=function(){return l.extend({},this._options)},ne.prototype.loadTile=function(me,We){var At=this.map._requestManager.normalizeTileURL(me.tileID.canonical.url(this.tiles,this.scheme)),Yt={request:this.map._requestManager.transformRequest(At,l.ResourceType.Tile),uid:me.uid,tileID:me.tileID,zoom:me.tileID.overscaledZ,tileSize:this.tileSize*me.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:l.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};Yt.request.collectResourceTiming=this._collectResourceTiming,!me.actor||me.state==="expired"?(me.actor=this.dispatcher.getActor(),me.request=me.actor.send("loadTile",Yt,tr.bind(this))):me.state==="loading"?me.reloadCallback=We:me.request=me.actor.send("reloadTile",Yt,tr.bind(this));function tr(Pt,jt){if(delete me.request,me.aborted)return We(null);if(Pt&&Pt.status!==404)return We(Pt);jt&&jt.resourceTiming&&(me.resourceTiming=jt.resourceTiming),this.map._refreshExpiredTiles&&jt&&me.setExpiryData(jt),me.loadVectorData(jt,this.map.painter),l.cacheEntryPossiblyAdded(this.dispatcher),We(null),me.reloadCallback&&(this.loadTile(me,me.reloadCallback),me.reloadCallback=null)}},ne.prototype.abortTile=function(me){me.request&&(me.request.cancel(),delete me.request),me.actor&&me.actor.send("abortTile",{uid:me.uid,type:this.type,source:this.id},void 0)},ne.prototype.unloadTile=function(me){me.unloadVectorData(),me.actor&&me.actor.send("removeTile",{uid:me.uid,type:this.type,source:this.id},void 0)},ne.prototype.hasTransition=function(){return!1},ne})(l.Evented),re=(function(Xe){function ne(Fe,me,We,At){Xe.call(this),this.id=Fe,this.dispatcher=We,this.setEventedParent(At),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=l.extend({type:"raster"},me),l.extend(this,l.pick(me,["url","scheme","tileSize"]))}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.load=function(){var me=this;this._loaded=!1,this.fire(new l.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=J(this._options,this.map._requestManager,function(We,At){me._tileJSONRequest=null,me._loaded=!0,We?me.fire(new l.ErrorEvent(We)):At&&(l.extend(me,At),At.bounds&&(me.tileBounds=new G(At.bounds,me.minzoom,me.maxzoom)),l.postTurnstileEvent(At.tiles),l.postMapLoadEvent(At.tiles,me.map._getMapId(),me.map._requestManager._skuToken),me.fire(new l.Event("data",{dataType:"source",sourceDataType:"metadata"})),me.fire(new l.Event("data",{dataType:"source",sourceDataType:"content"})))})},ne.prototype.loaded=function(){return this._loaded},ne.prototype.onAdd=function(me){this.map=me,this.load()},ne.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},ne.prototype.serialize=function(){return l.extend({},this._options)},ne.prototype.hasTile=function(me){return!this.tileBounds||this.tileBounds.contains(me.canonical)},ne.prototype.loadTile=function(me,We){var At=this,Yt=this.map._requestManager.normalizeTileURL(me.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);me.request=l.getImage(this.map._requestManager.transformRequest(Yt,l.ResourceType.Tile),function(tr,Pt){if(delete me.request,me.aborted)me.state="unloaded",We(null);else if(tr)me.state="errored",We(tr);else if(Pt){At.map._refreshExpiredTiles&&me.setExpiryData(Pt),delete Pt.cacheControl,delete Pt.expires;var jt=At.map.painter.context,hr=jt.gl;me.texture=At.map.painter.getTileTexture(Pt.width),me.texture?me.texture.update(Pt,{useMipmap:!0}):(me.texture=new l.Texture(jt,Pt,hr.RGBA,{useMipmap:!0}),me.texture.bind(hr.LINEAR,hr.CLAMP_TO_EDGE,hr.LINEAR_MIPMAP_NEAREST),jt.extTextureFilterAnisotropic&&hr.texParameterf(hr.TEXTURE_2D,jt.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,jt.extTextureFilterAnisotropicMax)),me.state="loaded",l.cacheEntryPossiblyAdded(At.dispatcher),We(null)}})},ne.prototype.abortTile=function(me,We){me.request&&(me.request.cancel(),delete me.request),We()},ne.prototype.unloadTile=function(me,We){me.texture&&this.map.painter.saveTileTexture(me.texture),We()},ne.prototype.hasTransition=function(){return!1},ne})(l.Evented),fe=(function(Xe){function ne(Fe,me,We,At){Xe.call(this,Fe,me,We,At),this.type="raster-dem",this.maxzoom=22,this._options=l.extend({type:"raster-dem"},me),this.encoding=me.encoding||"mapbox"}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.serialize=function(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},ne.prototype.loadTile=function(me,We){var At=this.map._requestManager.normalizeTileURL(me.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);me.request=l.getImage(this.map._requestManager.transformRequest(At,l.ResourceType.Tile),Yt.bind(this)),me.neighboringTiles=this._getNeighboringTiles(me.tileID);function Yt(Pt,jt){if(delete me.request,me.aborted)me.state="unloaded",We(null);else if(Pt)me.state="errored",We(Pt);else if(jt){this.map._refreshExpiredTiles&&me.setExpiryData(jt),delete jt.cacheControl,delete jt.expires;var hr=l.window.ImageBitmap&&jt instanceof l.window.ImageBitmap&&l.offscreenCanvasSupported(),qr=hr?jt:l.browser.getImageData(jt,1),zr={uid:me.uid,coord:me.tileID,source:this.id,rawImageData:qr,encoding:this.encoding};(!me.actor||me.state==="expired")&&(me.actor=this.dispatcher.getActor(),me.actor.send("loadDEMTile",zr,tr.bind(this)))}}function tr(Pt,jt){Pt&&(me.state="errored",We(Pt)),jt&&(me.dem=jt,me.needsHillshadePrepare=!0,me.state="loaded",We(null))}},ne.prototype._getNeighboringTiles=function(me){var We=me.canonical,At=Math.pow(2,We.z),Yt=(We.x-1+At)%At,tr=We.x===0?me.wrap-1:me.wrap,Pt=(We.x+1+At)%At,jt=We.x+1===At?me.wrap+1:me.wrap,hr={};return hr[new l.OverscaledTileID(me.overscaledZ,tr,We.z,Yt,We.y).key]={backfilled:!1},hr[new l.OverscaledTileID(me.overscaledZ,jt,We.z,Pt,We.y).key]={backfilled:!1},We.y>0&&(hr[new l.OverscaledTileID(me.overscaledZ,tr,We.z,Yt,We.y-1).key]={backfilled:!1},hr[new l.OverscaledTileID(me.overscaledZ,me.wrap,We.z,We.x,We.y-1).key]={backfilled:!1},hr[new l.OverscaledTileID(me.overscaledZ,jt,We.z,Pt,We.y-1).key]={backfilled:!1}),We.y+1<At&&(hr[new l.OverscaledTileID(me.overscaledZ,tr,We.z,Yt,We.y+1).key]={backfilled:!1},hr[new l.OverscaledTileID(me.overscaledZ,me.wrap,We.z,We.x,We.y+1).key]={backfilled:!1},hr[new l.OverscaledTileID(me.overscaledZ,jt,We.z,Pt,We.y+1).key]={backfilled:!1}),hr},ne.prototype.unloadTile=function(me){me.demTexture&&this.map.painter.saveTileTexture(me.demTexture),me.fbo&&(me.fbo.destroy(),delete me.fbo),me.dem&&delete me.dem,delete me.neighboringTiles,me.state="unloaded",me.actor&&me.actor.send("removeDEMTile",{uid:me.uid,source:this.id})},ne})(re),we=(function(Xe){function ne(Fe,me,We,At){Xe.call(this),this.id=Fe,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=We.getActor(),this.setEventedParent(At),this._data=me.data,this._options=l.extend({},me),this._collectResourceTiming=me.collectResourceTiming,this._resourceTiming=[],me.maxzoom!==void 0&&(this.maxzoom=me.maxzoom),me.type&&(this.type=me.type),me.attribution&&(this.attribution=me.attribution),this.promoteId=me.promoteId;var Yt=l.EXTENT/this.tileSize;this.workerOptions=l.extend({source:this.id,cluster:me.cluster||!1,geojsonVtOptions:{buffer:(me.buffer!==void 0?me.buffer:128)*Yt,tolerance:(me.tolerance!==void 0?me.tolerance:.375)*Yt,extent:l.EXTENT,maxZoom:this.maxzoom,lineMetrics:me.lineMetrics||!1,generateId:me.generateId||!1},superclusterOptions:{maxZoom:me.clusterMaxZoom!==void 0?Math.min(me.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,minPoints:Math.max(2,me.clusterMinPoints||2),extent:l.EXTENT,radius:(me.clusterRadius||50)*Yt,log:!1,generateId:me.generateId||!1},clusterProperties:me.clusterProperties,filter:me.filter},me.workerOptions)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.load=function(){var me=this;this.fire(new l.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(We){if(We){me.fire(new l.ErrorEvent(We));return}var At={dataType:"source",sourceDataType:"metadata"};me._collectResourceTiming&&me._resourceTiming&&me._resourceTiming.length>0&&(At.resourceTiming=me._resourceTiming,me._resourceTiming=[]),me.fire(new l.Event("data",At))})},ne.prototype.onAdd=function(me){this.map=me,this.load()},ne.prototype.setData=function(me){var We=this;return this._data=me,this.fire(new l.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(At){if(At){We.fire(new l.ErrorEvent(At));return}var Yt={dataType:"source",sourceDataType:"content"};We._collectResourceTiming&&We._resourceTiming&&We._resourceTiming.length>0&&(Yt.resourceTiming=We._resourceTiming,We._resourceTiming=[]),We.fire(new l.Event("data",Yt))}),this},ne.prototype.getClusterExpansionZoom=function(me,We){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:me,source:this.id},We),this},ne.prototype.getClusterChildren=function(me,We){return this.actor.send("geojson.getClusterChildren",{clusterId:me,source:this.id},We),this},ne.prototype.getClusterLeaves=function(me,We,At,Yt){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:me,limit:We,offset:At},Yt),this},ne.prototype._updateWorkerData=function(me){var We=this;this._loaded=!1;var At=l.extend({},this.workerOptions),Yt=this._data;typeof Yt=="string"?(At.request=this.map._requestManager.transformRequest(l.browser.resolveURL(Yt),l.ResourceType.Source),At.request.collectResourceTiming=this._collectResourceTiming):At.data=JSON.stringify(Yt),this.actor.send(this.type+".loadData",At,function(tr,Pt){We._removed||Pt&&Pt.abandoned||(We._loaded=!0,Pt&&Pt.resourceTiming&&Pt.resourceTiming[We.id]&&(We._resourceTiming=Pt.resourceTiming[We.id].slice(0)),We.actor.send(We.type+".coalesce",{source:At.source},null),me(tr))})},ne.prototype.loaded=function(){return this._loaded},ne.prototype.loadTile=function(me,We){var At=this,Yt=me.actor?"reloadTile":"loadTile";me.actor=this.actor;var tr={type:this.type,uid:me.uid,tileID:me.tileID,zoom:me.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:l.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};me.request=this.actor.send(Yt,tr,function(Pt,jt){return delete me.request,me.unloadVectorData(),me.aborted?We(null):Pt?We(Pt):(me.loadVectorData(jt,At.map.painter,Yt==="reloadTile"),We(null))})},ne.prototype.abortTile=function(me){me.request&&(me.request.cancel(),delete me.request),me.aborted=!0},ne.prototype.unloadTile=function(me){me.unloadVectorData(),this.actor.send("removeTile",{uid:me.uid,type:this.type,source:this.id})},ne.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},ne.prototype.serialize=function(){return l.extend({},this._options,{type:this.type,data:this._data})},ne.prototype.hasTransition=function(){return!1},ne})(l.Evented),Oe=l.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),ke=(function(Xe){function ne(Fe,me,We,At){Xe.call(this),this.id=Fe,this.dispatcher=We,this.coordinates=me.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(At),this.options=me}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.load=function(me,We){var At=this;this._loaded=!1,this.fire(new l.Event("dataloading",{dataType:"source"})),this.url=this.options.url,l.getImage(this.map._requestManager.transformRequest(this.url,l.ResourceType.Image),function(Yt,tr){At._loaded=!0,Yt?At.fire(new l.ErrorEvent(Yt)):tr&&(At.image=tr,me&&(At.coordinates=me),We&&We(),At._finishLoading())})},ne.prototype.loaded=function(){return this._loaded},ne.prototype.updateImage=function(me){var We=this;return!this.image||!me.url?this:(this.options.url=me.url,this.load(me.coordinates,function(){We.texture=null}),this)},ne.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new l.Event("data",{dataType:"source",sourceDataType:"metadata"})))},ne.prototype.onAdd=function(me){this.map=me,this.load()},ne.prototype.setCoordinates=function(me){var We=this;this.coordinates=me;var At=me.map(l.MercatorCoordinate.fromLngLat);this.tileID=Le(At),this.minzoom=this.maxzoom=this.tileID.z;var Yt=At.map(function(tr){return We.tileID.getTilePoint(tr)._round()});return this._boundsArray=new l.StructArrayLayout4i8,this._boundsArray.emplaceBack(Yt[0].x,Yt[0].y,0,0),this._boundsArray.emplaceBack(Yt[1].x,Yt[1].y,l.EXTENT,0),this._boundsArray.emplaceBack(Yt[3].x,Yt[3].y,0,l.EXTENT),this._boundsArray.emplaceBack(Yt[2].x,Yt[2].y,l.EXTENT,l.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new l.Event("data",{dataType:"source",sourceDataType:"content"})),this},ne.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||!this.image)){var me=this.map.painter.context,We=me.gl;this.boundsBuffer||(this.boundsBuffer=me.createVertexBuffer(this._boundsArray,Oe.members)),this.boundsSegments||(this.boundsSegments=l.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new l.Texture(me,this.image,We.RGBA),this.texture.bind(We.LINEAR,We.CLAMP_TO_EDGE));for(var At in this.tiles){var Yt=this.tiles[At];Yt.state!=="loaded"&&(Yt.state="loaded",Yt.texture=this.texture)}}},ne.prototype.loadTile=function(me,We){this.tileID&&this.tileID.equals(me.tileID.canonical)?(this.tiles[String(me.tileID.wrap)]=me,me.buckets={},We(null)):(me.state="errored",We(null))},ne.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},ne.prototype.hasTransition=function(){return!1},ne})(l.Evented);function Le(Xe){for(var ne=1/0,Fe=1/0,me=-1/0,We=-1/0,At=0,Yt=Xe;At<Yt.length;At+=1){var tr=Yt[At];ne=Math.min(ne,tr.x),Fe=Math.min(Fe,tr.y),me=Math.max(me,tr.x),We=Math.max(We,tr.y)}var Pt=me-ne,jt=We-Fe,hr=Math.max(Pt,jt),qr=Math.max(0,Math.floor(-Math.log(hr)/Math.LN2)),zr=Math.pow(2,qr);return new l.CanonicalTileID(qr,Math.floor((ne+me)/2*zr),Math.floor((Fe+We)/2*zr))}var oe=(function(Xe){function ne(Fe,me,We,At){Xe.call(this,Fe,me,We,At),this.roundZoom=!0,this.type="video",this.options=me}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.load=function(){var me=this;this._loaded=!1;var We=this.options;this.urls=[];for(var At=0,Yt=We.urls;At<Yt.length;At+=1){var tr=Yt[At];this.urls.push(this.map._requestManager.transformRequest(tr,l.ResourceType.Source).url)}l.getVideo(this.urls,function(Pt,jt){me._loaded=!0,Pt?me.fire(new l.ErrorEvent(Pt)):jt&&(me.video=jt,me.video.loop=!0,me.video.addEventListener("playing",function(){me.map.triggerRepaint()}),me.map&&me.video.play(),me._finishLoading())})},ne.prototype.pause=function(){this.video&&this.video.pause()},ne.prototype.play=function(){this.video&&this.video.play()},ne.prototype.seek=function(me){if(this.video){var We=this.video.seekable;me<We.start(0)||me>We.end(0)?this.fire(new l.ErrorEvent(new l.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+We.start(0)+" and "+We.end(0)+"-second mark."))):this.video.currentTime=me}},ne.prototype.getVideo=function(){return this.video},ne.prototype.onAdd=function(me){this.map||(this.map=me,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},ne.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var me=this.map.painter.context,We=me.gl;this.boundsBuffer||(this.boundsBuffer=me.createVertexBuffer(this._boundsArray,Oe.members)),this.boundsSegments||(this.boundsSegments=l.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(We.LINEAR,We.CLAMP_TO_EDGE),We.texSubImage2D(We.TEXTURE_2D,0,0,0,We.RGBA,We.UNSIGNED_BYTE,this.video)):(this.texture=new l.Texture(me,this.video,We.RGBA),this.texture.bind(We.LINEAR,We.CLAMP_TO_EDGE));for(var At in this.tiles){var Yt=this.tiles[At];Yt.state!=="loaded"&&(Yt.state="loaded",Yt.texture=this.texture)}}},ne.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},ne.prototype.hasTransition=function(){return this.video&&!this.video.paused},ne})(ke),be=(function(Xe){function ne(Fe,me,We,At){Xe.call(this,Fe,me,We,At),me.coordinates?(!Array.isArray(me.coordinates)||me.coordinates.length!==4||me.coordinates.some(function(Yt){return!Array.isArray(Yt)||Yt.length!==2||Yt.some(function(tr){return typeof tr!="number"})}))&&this.fire(new l.ErrorEvent(new l.ValidationError("sources."+Fe,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new l.ErrorEvent(new l.ValidationError("sources."+Fe,null,'missing required property "coordinates"'))),me.animate&&typeof me.animate!="boolean"&&this.fire(new l.ErrorEvent(new l.ValidationError("sources."+Fe,null,'optional "animate" property must be a boolean value'))),me.canvas?typeof me.canvas!="string"&&!(me.canvas instanceof l.window.HTMLCanvasElement)&&this.fire(new l.ErrorEvent(new l.ValidationError("sources."+Fe,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 l.ErrorEvent(new l.ValidationError("sources."+Fe,null,'missing required property "canvas"'))),this.options=me,this.animate=me.animate!==void 0?me.animate:!0}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.load=function(){if(this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof l.window.HTMLCanvasElement?this.options.canvas:l.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()){this.fire(new l.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()},ne.prototype.getCanvas=function(){return this.canvas},ne.prototype.onAdd=function(me){this.map=me,this.load(),this.canvas&&this.animate&&this.play()},ne.prototype.onRemove=function(){this.pause()},ne.prototype.prepare=function(){var me=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,me=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,me=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var We=this.map.painter.context,At=We.gl;this.boundsBuffer||(this.boundsBuffer=We.createVertexBuffer(this._boundsArray,Oe.members)),this.boundsSegments||(this.boundsSegments=l.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(me||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new l.Texture(We,this.canvas,At.RGBA,{premultiply:!0});for(var Yt in this.tiles){var tr=this.tiles[Yt];tr.state!=="loaded"&&(tr.state="loaded",tr.texture=this.texture)}}},ne.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},ne.prototype.hasTransition=function(){return this._playing},ne.prototype._hasInvalidDimensions=function(){for(var me=0,We=[this.canvas.width,this.canvas.height];me<We.length;me+=1){var At=We[me];if(isNaN(At)||At<=0)return!0}return!1},ne})(ke),_e={vector:ee,raster:re,"raster-dem":fe,geojson:we,video:oe,image:ke,canvas:be},he=function(Xe,ne,Fe,me){var We=new _e[ne.type](Xe,ne,Fe,me);if(We.id!==Xe)throw new Error("Expected Source id to be "+Xe+" instead of "+We.id);return l.bindAll(["load","abort","unload","serialize","prepare"],We),We},De=function(Xe){return _e[Xe]},xe=function(Xe,ne){_e[Xe]=ne};function se(Xe,ne){var Fe=l.identity([]);return l.translate(Fe,Fe,[1,1,0]),l.scale(Fe,Fe,[Xe.width*.5,Xe.height*.5,1]),l.multiply(Fe,Fe,Xe.calculatePosMatrix(ne.toUnwrapped()))}function Ee(Xe,ne,Fe){if(Xe)for(var me=0,We=Xe;me<We.length;me+=1){var At=We[me],Yt=ne[At];if(Yt&&Yt.source===Fe&&Yt.type==="fill-extrusion")return!0}else for(var tr in ne){var Pt=ne[tr];if(Pt.source===Fe&&Pt.type==="fill-extrusion")return!0}return!1}function Te(Xe,ne,Fe,me,We,At){var Yt=Ee(We&&We.layers,ne,Xe.id),tr=At.maxPitchScaleFactor(),Pt=Xe.tilesIn(me,tr,Yt);Pt.sort(at);for(var jt=[],hr=0,qr=Pt;hr<qr.length;hr+=1){var zr=qr[hr];jt.push({wrappedTileID:zr.tileID.wrapped().key,queryResults:zr.tile.queryRenderedFeatures(ne,Fe,Xe._state,zr.queryGeometry,zr.cameraQueryGeometry,zr.scale,We,At,tr,se(Xe.transform,zr.tileID))})}var Gr=gt(jt);for(var en in Gr)Gr[en].forEach(function(Xr){var Rr=Xr.feature,jr=Xe.getFeatureState(Rr.layer["source-layer"],Rr.id);Rr.source=Rr.layer.source,Rr.layer["source-layer"]&&(Rr.sourceLayer=Rr.layer["source-layer"]),Rr.state=jr});return Gr}function Be(Xe,ne,Fe,me,We,At,Yt){for(var tr={},Pt=At.queryRenderedSymbols(me),jt=[],hr=0,qr=Object.keys(Pt).map(Number);hr<qr.length;hr+=1){var zr=qr[hr];jt.push(Yt[zr])}jt.sort(at);for(var Gr=function(){var Br=Xr[en],Bn=Br.featureIndex.lookupSymbolFeatures(Pt[Br.bucketInstanceId],ne,Br.bucketIndex,Br.sourceLayerIndex,We.filter,We.layers,We.availableImages,Xe);for(var ui in Bn){var Ii=tr[ui]=tr[ui]||[],Ga=Bn[ui];Ga.sort(function(Ja,wo){var Ya=Br.featureSortOrder;if(Ya){var Ro=Ya.indexOf(Ja.featureIndex),Xo=Ya.indexOf(wo.featureIndex);return Xo-Ro}else return wo.featureIndex-Ja.featureIndex});for(var ka=0,wa=Ga;ka<wa.length;ka+=1){var $a=wa[ka];Ii.push($a)}}},en=0,Xr=jt;en<Xr.length;en+=1)Gr();var Rr=function(Br){tr[Br].forEach(function(Bn){var ui=Bn.feature,Ii=Xe[Br],Ga=Fe[Ii.source],ka=Ga.getFeatureState(ui.layer["source-layer"],ui.id);ui.source=ui.layer.source,ui.layer["source-layer"]&&(ui.sourceLayer=ui.layer["source-layer"]),ui.state=ka})};for(var jr in tr)Rr(jr);return tr}function tt(Xe,ne){for(var Fe=Xe.getRenderableIds().map(function(Pt){return Xe.getTileByID(Pt)}),me=[],We={},At=0;At<Fe.length;At++){var Yt=Fe[At],tr=Yt.tileID.canonical.key;We[tr]||(We[tr]=!0,Yt.querySourceFeatures(me,ne))}return me}function at(Xe,ne){var Fe=Xe.tileID,me=ne.tileID;return Fe.overscaledZ-me.overscaledZ||Fe.canonical.y-me.canonical.y||Fe.wrap-me.wrap||Fe.canonical.x-me.canonical.x}function gt(Xe){for(var ne={},Fe={},me=0,We=Xe;me<We.length;me+=1){var At=We[me],Yt=At.queryResults,tr=At.wrappedTileID,Pt=Fe[tr]=Fe[tr]||{};for(var jt in Yt)for(var hr=Yt[jt],qr=Pt[jt]=Pt[jt]||{},zr=ne[jt]=ne[jt]||[],Gr=0,en=hr;Gr<en.length;Gr+=1){var Xr=en[Gr];qr[Xr.featureIndex]||(qr[Xr.featureIndex]=!0,zr.push(Xr))}}return ne}var pt=function(ne,Fe){this.max=ne,this.onRemove=Fe,this.reset()};pt.prototype.reset=function(){for(var ne in this.data)for(var Fe=0,me=this.data[ne];Fe<me.length;Fe+=1){var We=me[Fe];We.timeout&&clearTimeout(We.timeout),this.onRemove(We.value)}return this.data={},this.order=[],this},pt.prototype.add=function(ne,Fe,me){var We=this,At=ne.wrapped().key;this.data[At]===void 0&&(this.data[At]=[]);var Yt={value:Fe,timeout:void 0};if(me!==void 0&&(Yt.timeout=setTimeout(function(){We.remove(ne,Yt)},me)),this.data[At].push(Yt),this.order.push(At),this.order.length>this.max){var tr=this._getAndRemoveByKey(this.order[0]);tr&&this.onRemove(tr)}return this},pt.prototype.has=function(ne){return ne.wrapped().key in this.data},pt.prototype.getAndRemove=function(ne){return this.has(ne)?this._getAndRemoveByKey(ne.wrapped().key):null},pt.prototype._getAndRemoveByKey=function(ne){var Fe=this.data[ne].shift();return Fe.timeout&&clearTimeout(Fe.timeout),this.data[ne].length===0&&delete this.data[ne],this.order.splice(this.order.indexOf(ne),1),Fe.value},pt.prototype.getByKey=function(ne){var Fe=this.data[ne];return Fe?Fe[0].value:null},pt.prototype.get=function(ne){if(!this.has(ne))return null;var Fe=this.data[ne.wrapped().key][0];return Fe.value},pt.prototype.remove=function(ne,Fe){if(!this.has(ne))return this;var me=ne.wrapped().key,We=Fe===void 0?0:this.data[me].indexOf(Fe),At=this.data[me][We];return this.data[me].splice(We,1),At.timeout&&clearTimeout(At.timeout),this.data[me].length===0&&delete this.data[me],this.onRemove(At.value),this.order.splice(this.order.indexOf(me),1),this},pt.prototype.setMaxSize=function(ne){for(this.max=ne;this.order.length>this.max;){var Fe=this._getAndRemoveByKey(this.order[0]);Fe&&this.onRemove(Fe)}return this},pt.prototype.filter=function(ne){var Fe=[];for(var me in this.data)for(var We=0,At=this.data[me];We<At.length;We+=1){var Yt=At[We];ne(Yt.value)||Fe.push(Yt)}for(var tr=0,Pt=Fe;tr<Pt.length;tr+=1){var jt=Pt[tr];this.remove(jt.value.tileID,jt)}};var Rt=function(ne,Fe,me){this.context=ne;var We=ne.gl;this.buffer=We.createBuffer(),this.dynamicDraw=!!me,this.context.unbindVAO(),ne.bindElementBuffer.set(this.buffer),We.bufferData(We.ELEMENT_ARRAY_BUFFER,Fe.arrayBuffer,this.dynamicDraw?We.DYNAMIC_DRAW:We.STATIC_DRAW),this.dynamicDraw||delete Fe.arrayBuffer};Rt.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},Rt.prototype.updateData=function(ne){var Fe=this.context.gl;this.context.unbindVAO(),this.bind(),Fe.bufferSubData(Fe.ELEMENT_ARRAY_BUFFER,0,ne.arrayBuffer)},Rt.prototype.destroy=function(){var ne=this.context.gl;this.buffer&&(ne.deleteBuffer(this.buffer),delete this.buffer)};var $t={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},Wt=function(ne,Fe,me,We){this.length=Fe.length,this.attributes=me,this.itemSize=Fe.bytesPerElement,this.dynamicDraw=We,this.context=ne;var At=ne.gl;this.buffer=At.createBuffer(),ne.bindVertexBuffer.set(this.buffer),At.bufferData(At.ARRAY_BUFFER,Fe.arrayBuffer,this.dynamicDraw?At.DYNAMIC_DRAW:At.STATIC_DRAW),this.dynamicDraw||delete Fe.arrayBuffer};Wt.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},Wt.prototype.updateData=function(ne){var Fe=this.context.gl;this.bind(),Fe.bufferSubData(Fe.ARRAY_BUFFER,0,ne.arrayBuffer)},Wt.prototype.enableAttributes=function(ne,Fe){for(var me=0;me<this.attributes.length;me++){var We=this.attributes[me],At=Fe.attributes[We.name];At!==void 0&&ne.enableVertexAttribArray(At)}},Wt.prototype.setVertexAttribPointers=function(ne,Fe,me){for(var We=0;We<this.attributes.length;We++){var At=this.attributes[We],Yt=Fe.attributes[At.name];Yt!==void 0&&ne.vertexAttribPointer(Yt,At.components,ne[$t[At.type]],!1,this.itemSize,At.offset+this.itemSize*(me||0))}},Wt.prototype.destroy=function(){var ne=this.context.gl;this.buffer&&(ne.deleteBuffer(this.buffer),delete this.buffer)};var Ht=function(ne){this.gl=ne.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1};Ht.prototype.get=function(){return this.current},Ht.prototype.set=function(ne){},Ht.prototype.getDefault=function(){return this.default},Ht.prototype.setDefault=function(){this.set(this.default)};var Ft=(function(Xe){function ne(){Xe.apply(this,arguments)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.getDefault=function(){return l.Color.transparent},ne.prototype.set=function(me){var We=this.current;me.r===We.r&&me.g===We.g&&me.b===We.b&&me.a===We.a&&!this.dirty||(this.gl.clearColor(me.r,me.g,me.b,me.a),this.current=me,this.dirty=!1)},ne})(Ht),st=(function(Xe){function ne(){Xe.apply(this,arguments)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.getDefault=function(){return 1},ne.prototype.set=function(me){me===this.current&&!this.dirty||(this.gl.clearDepth(me),this.current=me,this.dirty=!1)},ne})(Ht),rt=(function(Xe){function ne(){Xe.apply(this,arguments)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.getDefault=function(){return 0},ne.prototype.set=function(me){me===this.current&&!this.dirty||(this.gl.clearStencil(me),this.current=me,this.dirty=!1)},ne})(Ht),Ue=(function(Xe){function ne(){Xe.apply(this,arguments)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.getDefault=function(){return[!0,!0,!0,!0]},ne.prototype.set=function(me){var We=this.current;me[0]===We[0]&&me[1]===We[1]&&me[2]===We[2]&&me[3]===We[3]&&!this.dirty||(this.gl.colorMask(me[0],me[1],me[2],me[3]),this.current=me,this.dirty=!1)},ne})(Ht),xt=(function(Xe){function ne(){Xe.apply(this,arguments)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.getDefault=function(){return!0},ne.prototype.set=function(me){me===this.current&&!this.dirty||(this.gl.depthMask(me),this.current=me,this.dirty=!1)},ne})(Ht),Gt=(function(Xe){function ne(){Xe.apply(this,arguments)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.getDefault=function(){return 255},ne.prototype.set=function(me){me===this.current&&!this.dirty||(this.gl.stencilMask(me),this.current=me,this.dirty=!1)},ne})(Ht),Jt=(function(Xe){function ne(){Xe.apply(this,arguments)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.getDefault=function(){return{func:this.gl.ALWAYS,ref:0,mask:255}},ne.prototype.set=function(me){var We=this.current;me.func===We.func&&me.ref===We.ref&&me.mask===We.mask&&!this.dirty||(this.gl.stencilFunc(me.func,me.ref,me.mask),this.current=me,this.dirty=!1)},ne})(Ht),Ut=(function(Xe){function ne(){Xe.apply(this,arguments)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.getDefault=function(){var me=this.gl;return[me.KEEP,me.KEEP,me.KEEP]},ne.prototype.set=function(me){var We=this.current;me[0]===We[0]&&me[1]===We[1]&&me[2]===We[2]&&!this.dirty||(this.gl.stencilOp(me[0],me[1],me[2]),this.current=me,this.dirty=!1)},ne})(Ht),kr=(function(Xe){function ne(){Xe.apply(this,arguments)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.getDefault=function(){return!1},ne.prototype.set=function(me){if(!(me===this.current&&!this.dirty)){var We=this.gl;me?We.enable(We.STENCIL_TEST):We.disable(We.STENCIL_TEST),this.current=me,this.dirty=!1}},ne})(Ht),Pr=(function(Xe){function ne(){Xe.apply(this,arguments)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.getDefault=function(){return[0,1]},ne.prototype.set=function(me){var We=this.current;me[0]===We[0]&&me[1]===We[1]&&!this.dirty||(this.gl.depthRange(me[0],me[1]),this.current=me,this.dirty=!1)},ne})(Ht),$r=(function(Xe){function ne(){Xe.apply(this,arguments)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.getDefault=function(){return!1},ne.prototype.set=function(me){if(!(me===this.current&&!this.dirty)){var We=this.gl;me?We.enable(We.DEPTH_TEST):We.disable(We.DEPTH_TEST),this.current=me,this.dirty=!1}},ne})(Ht),rn=(function(Xe){function ne(){Xe.apply(this,arguments)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.getDefault=function(){return this.gl.LESS},ne.prototype.set=function(me){me===this.current&&!this.dirty||(this.gl.depthFunc(me),this.current=me,this.dirty=!1)},ne})(Ht),kn=(function(Xe){function ne(){Xe.apply(this,arguments)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.getDefault=function(){return!1},ne.prototype.set=function(me){if(!(me===this.current&&!this.dirty)){var We=this.gl;me?We.enable(We.BLEND):We.disable(We.BLEND),this.current=me,this.dirty=!1}},ne})(Ht),Rn=(function(Xe){function ne(){Xe.apply(this,arguments)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.getDefault=function(){var me=this.gl;return[me.ONE,me.ZERO]},ne.prototype.set=function(me){var We=this.current;me[0]===We[0]&&me[1]===We[1]&&!this.dirty||(this.gl.blendFunc(me[0],me[1]),this.current=me,this.dirty=!1)},ne})(Ht),ci=(function(Xe){function ne(){Xe.apply(this,arguments)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.getDefault=function(){return l.Color.transparent},ne.prototype.set=function(me){var We=this.current;me.r===We.r&&me.g===We.g&&me.b===We.b&&me.a===We.a&&!this.dirty||(this.gl.blendColor(me.r,me.g,me.b,me.a),this.current=me,this.dirty=!1)},ne})(Ht),In=(function(Xe){function ne(){Xe.apply(this,arguments)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.getDefault=function(){return this.gl.FUNC_ADD},ne.prototype.set=function(me){me===this.current&&!this.dirty||(this.gl.blendEquation(me),this.current=me,this.dirty=!1)},ne})(Ht),Gn=(function(Xe){function ne(){Xe.apply(this,arguments)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.getDefault=function(){return!1},ne.prototype.set=function(me){if(!(me===this.current&&!this.dirty)){var We=this.gl;me?We.enable(We.CULL_FACE):We.disable(We.CULL_FACE),this.current=me,this.dirty=!1}},ne})(Ht),mr=(function(Xe){function ne(){Xe.apply(this,arguments)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.getDefault=function(){return this.gl.BACK},ne.prototype.set=function(me){me===this.current&&!this.dirty||(this.gl.cullFace(me),this.current=me,this.dirty=!1)},ne})(Ht),St=(function(Xe){function ne(){Xe.apply(this,arguments)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.getDefault=function(){return this.gl.CCW},ne.prototype.set=function(me){me===this.current&&!this.dirty||(this.gl.frontFace(me),this.current=me,this.dirty=!1)},ne})(Ht),Ot=(function(Xe){function ne(){Xe.apply(this,arguments)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.getDefault=function(){return null},ne.prototype.set=function(me){me===this.current&&!this.dirty||(this.gl.useProgram(me),this.current=me,this.dirty=!1)},ne})(Ht),Et=(function(Xe){function ne(){Xe.apply(this,arguments)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.getDefault=function(){return this.gl.TEXTURE0},ne.prototype.set=function(me){me===this.current&&!this.dirty||(this.gl.activeTexture(me),this.current=me,this.dirty=!1)},ne})(Ht),je=(function(Xe){function ne(){Xe.apply(this,arguments)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.getDefault=function(){var me=this.gl;return[0,0,me.drawingBufferWidth,me.drawingBufferHeight]},ne.prototype.set=function(me){var We=this.current;me[0]===We[0]&&me[1]===We[1]&&me[2]===We[2]&&me[3]===We[3]&&!this.dirty||(this.gl.viewport(me[0],me[1],me[2],me[3]),this.current=me,this.dirty=!1)},ne})(Ht),Ye=(function(Xe){function ne(){Xe.apply(this,arguments)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.getDefault=function(){return null},ne.prototype.set=function(me){if(!(me===this.current&&!this.dirty)){var We=this.gl;We.bindFramebuffer(We.FRAMEBUFFER,me),this.current=me,this.dirty=!1}},ne})(Ht),et=(function(Xe){function ne(){Xe.apply(this,arguments)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.getDefault=function(){return null},ne.prototype.set=function(me){if(!(me===this.current&&!this.dirty)){var We=this.gl;We.bindRenderbuffer(We.RENDERBUFFER,me),this.current=me,this.dirty=!1}},ne})(Ht),mt=(function(Xe){function ne(){Xe.apply(this,arguments)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.getDefault=function(){return null},ne.prototype.set=function(me){if(!(me===this.current&&!this.dirty)){var We=this.gl;We.bindTexture(We.TEXTURE_2D,me),this.current=me,this.dirty=!1}},ne})(Ht),Nt=(function(Xe){function ne(){Xe.apply(this,arguments)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.getDefault=function(){return null},ne.prototype.set=function(me){if(!(me===this.current&&!this.dirty)){var We=this.gl;We.bindBuffer(We.ARRAY_BUFFER,me),this.current=me,this.dirty=!1}},ne})(Ht),lr=(function(Xe){function ne(){Xe.apply(this,arguments)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.getDefault=function(){return null},ne.prototype.set=function(me){var We=this.gl;We.bindBuffer(We.ELEMENT_ARRAY_BUFFER,me),this.current=me,this.dirty=!1},ne})(Ht),br=(function(Xe){function ne(Fe){Xe.call(this,Fe),this.vao=Fe.extVertexArrayObject}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.getDefault=function(){return null},ne.prototype.set=function(me){!this.vao||me===this.current&&!this.dirty||(this.vao.bindVertexArrayOES(me),this.current=me,this.dirty=!1)},ne})(Ht),Or=(function(Xe){function ne(){Xe.apply(this,arguments)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.getDefault=function(){return 4},ne.prototype.set=function(me){if(!(me===this.current&&!this.dirty)){var We=this.gl;We.pixelStorei(We.UNPACK_ALIGNMENT,me),this.current=me,this.dirty=!1}},ne})(Ht),tn=(function(Xe){function ne(){Xe.apply(this,arguments)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.getDefault=function(){return!1},ne.prototype.set=function(me){if(!(me===this.current&&!this.dirty)){var We=this.gl;We.pixelStorei(We.UNPACK_PREMULTIPLY_ALPHA_WEBGL,me),this.current=me,this.dirty=!1}},ne})(Ht),Jr=(function(Xe){function ne(){Xe.apply(this,arguments)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.getDefault=function(){return!1},ne.prototype.set=function(me){if(!(me===this.current&&!this.dirty)){var We=this.gl;We.pixelStorei(We.UNPACK_FLIP_Y_WEBGL,me),this.current=me,this.dirty=!1}},ne})(Ht),dn=(function(Xe){function ne(Fe,me){Xe.call(this,Fe),this.context=Fe,this.parent=me}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.getDefault=function(){return null},ne})(Ht),on=(function(Xe){function ne(){Xe.apply(this,arguments)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.setDirty=function(){this.dirty=!0},ne.prototype.set=function(me){if(!(me===this.current&&!this.dirty)){this.context.bindFramebuffer.set(this.parent);var We=this.gl;We.framebufferTexture2D(We.FRAMEBUFFER,We.COLOR_ATTACHMENT0,We.TEXTURE_2D,me,0),this.current=me,this.dirty=!1}},ne})(dn),Nn=(function(Xe){function ne(){Xe.apply(this,arguments)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.set=function(me){if(!(me===this.current&&!this.dirty)){this.context.bindFramebuffer.set(this.parent);var We=this.gl;We.framebufferRenderbuffer(We.FRAMEBUFFER,We.DEPTH_ATTACHMENT,We.RENDERBUFFER,me),this.current=me,this.dirty=!1}},ne})(dn),Wi=function(ne,Fe,me,We){this.context=ne,this.width=Fe,this.height=me;var At=ne.gl,Yt=this.framebuffer=At.createFramebuffer();this.colorAttachment=new on(ne,Yt),We&&(this.depthAttachment=new Nn(ne,Yt))};Wi.prototype.destroy=function(){var ne=this.context.gl,Fe=this.colorAttachment.get();if(Fe&&ne.deleteTexture(Fe),this.depthAttachment){var me=this.depthAttachment.get();me&&ne.deleteRenderbuffer(me)}ne.deleteFramebuffer(this.framebuffer)};var Oa=519,Da=function(ne,Fe,me){this.func=ne,this.mask=Fe,this.range=me};Da.ReadOnly=!1,Da.ReadWrite=!0,Da.disabled=new Da(Oa,Da.ReadOnly,[0,1]);var Aa=519,Ka=7680,Sa=function(ne,Fe,me,We,At,Yt){this.test=ne,this.ref=Fe,this.mask=me,this.fail=We,this.depthFail=At,this.pass=Yt};Sa.disabled=new Sa({func:Aa,mask:0},0,0,Ka,Ka,Ka);var no=0,Fo=1,an=771,Hr=function(ne,Fe,me){this.blendFunction=ne,this.blendColor=Fe,this.mask=me};Hr.Replace=[Fo,no],Hr.disabled=new Hr(Hr.Replace,l.Color.transparent,[!1,!1,!1,!1]),Hr.unblended=new Hr(Hr.Replace,l.Color.transparent,[!0,!0,!0,!0]),Hr.alphaBlended=new Hr([Fo,an],l.Color.transparent,[!0,!0,!0,!0]);var nn=1029,Kr=2305,$n=function(ne,Fe,me){this.enable=ne,this.mode=Fe,this.frontFace=me};$n.disabled=new $n(!1,nn,Kr),$n.backCCW=new $n(!0,nn,Kr);var Ai=function(ne){this.gl=ne,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new Ft(this),this.clearDepth=new st(this),this.clearStencil=new rt(this),this.colorMask=new Ue(this),this.depthMask=new xt(this),this.stencilMask=new Gt(this),this.stencilFunc=new Jt(this),this.stencilOp=new Ut(this),this.stencilTest=new kr(this),this.depthRange=new Pr(this),this.depthTest=new $r(this),this.depthFunc=new rn(this),this.blend=new kn(this),this.blendFunc=new Rn(this),this.blendColor=new ci(this),this.blendEquation=new In(this),this.cullFace=new Gn(this),this.cullFaceSide=new mr(this),this.frontFace=new St(this),this.program=new Ot(this),this.activeTexture=new Et(this),this.viewport=new je(this),this.bindFramebuffer=new Ye(this),this.bindRenderbuffer=new et(this),this.bindTexture=new mt(this),this.bindVertexBuffer=new Nt(this),this.bindElementBuffer=new lr(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new br(this),this.pixelStoreUnpack=new Or(this),this.pixelStoreUnpackPremultiplyAlpha=new tn(this),this.pixelStoreUnpackFlipY=new Jr(this),this.extTextureFilterAnisotropic=ne.getExtension("EXT_texture_filter_anisotropic")||ne.getExtension("MOZ_EXT_texture_filter_anisotropic")||ne.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=ne.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=ne.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&(ne.getExtension("OES_texture_half_float_linear"),this.extRenderToTextureHalfFloat=ne.getExtension("EXT_color_buffer_half_float")),this.extTimerQuery=ne.getExtension("EXT_disjoint_timer_query"),this.maxTextureSize=ne.getParameter(ne.MAX_TEXTURE_SIZE)};Ai.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()},Ai.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},Ai.prototype.createIndexBuffer=function(ne,Fe){return new Rt(this,ne,Fe)},Ai.prototype.createVertexBuffer=function(ne,Fe,me){return new Wt(this,ne,Fe,me)},Ai.prototype.createRenderbuffer=function(ne,Fe,me){var We=this.gl,At=We.createRenderbuffer();return this.bindRenderbuffer.set(At),We.renderbufferStorage(We.RENDERBUFFER,ne,Fe,me),this.bindRenderbuffer.set(null),At},Ai.prototype.createFramebuffer=function(ne,Fe,me){return new Wi(this,ne,Fe,me)},Ai.prototype.clear=function(ne){var Fe=ne.color,me=ne.depth,We=this.gl,At=0;Fe&&(At|=We.COLOR_BUFFER_BIT,this.clearColor.set(Fe),this.colorMask.set([!0,!0,!0,!0])),typeof me<"u"&&(At|=We.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(me),this.depthMask.set(!0)),We.clear(At)},Ai.prototype.setCullFace=function(ne){ne.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(ne.mode),this.frontFace.set(ne.frontFace))},Ai.prototype.setDepthMode=function(ne){ne.func===this.gl.ALWAYS&&!ne.mask?this.depthTest.set(!1):(this.depthTest.set(!0),this.depthFunc.set(ne.func),this.depthMask.set(ne.mask),this.depthRange.set(ne.range))},Ai.prototype.setStencilMode=function(ne){ne.test.func===this.gl.ALWAYS&&!ne.mask?this.stencilTest.set(!1):(this.stencilTest.set(!0),this.stencilMask.set(ne.mask),this.stencilOp.set([ne.fail,ne.depthFail,ne.pass]),this.stencilFunc.set({func:ne.test.func,ref:ne.ref,mask:ne.test.mask}))},Ai.prototype.setColorMode=function(ne){l.deepEqual(ne.blendFunction,Hr.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(ne.blendFunction),this.blendColor.set(ne.blendColor)),this.colorMask.set(ne.mask)},Ai.prototype.unbindVAO=function(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)};var aa=(function(Xe){function ne(Fe,me,We){var At=this;Xe.call(this),this.id=Fe,this.dispatcher=We,this.on("data",function(Yt){Yt.dataType==="source"&&Yt.sourceDataType==="metadata"&&(At._sourceLoaded=!0),At._sourceLoaded&&!At._paused&&Yt.dataType==="source"&&Yt.sourceDataType==="content"&&(At.reload(),At.transform&&At.update(At.transform))}),this.on("error",function(){At._sourceErrored=!0}),this._source=he(Fe,me,We,this),this._tiles={},this._cache=new pt(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new l.SourceFeatureState}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.onAdd=function(me){this.map=me,this._maxTileCacheSize=me?me._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(me)},ne.prototype.onRemove=function(me){this._source&&this._source.onRemove&&this._source.onRemove(me)},ne.prototype.loaded=function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;for(var me in this._tiles){var We=this._tiles[me];if(We.state!=="loaded"&&We.state!=="errored")return!1}return!0},ne.prototype.getSource=function(){return this._source},ne.prototype.pause=function(){this._paused=!0},ne.prototype.resume=function(){if(this._paused){var me=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,me&&this.reload(),this.transform&&this.update(this.transform)}},ne.prototype._loadTile=function(me,We){return this._source.loadTile(me,We)},ne.prototype._unloadTile=function(me){if(this._source.unloadTile)return this._source.unloadTile(me,function(){})},ne.prototype._abortTile=function(me){if(this._source.abortTile)return this._source.abortTile(me,function(){})},ne.prototype.serialize=function(){return this._source.serialize()},ne.prototype.prepare=function(me){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(var We in this._tiles){var At=this._tiles[We];At.upload(me),At.prepare(this.map.style.imageManager)}},ne.prototype.getIds=function(){return l.values(this._tiles).map(function(me){return me.tileID}).sort(Ci).map(function(me){return me.key})},ne.prototype.getRenderableIds=function(me){var We=this,At=[];for(var Yt in this._tiles)this._isIdRenderable(Yt,me)&&At.push(this._tiles[Yt]);return me?At.sort(function(tr,Pt){var jt=tr.tileID,hr=Pt.tileID,qr=new l.Point(jt.canonical.x,jt.canonical.y)._rotate(We.transform.angle),zr=new l.Point(hr.canonical.x,hr.canonical.y)._rotate(We.transform.angle);return jt.overscaledZ-hr.overscaledZ||zr.y-qr.y||zr.x-qr.x}).map(function(tr){return tr.tileID.key}):At.map(function(tr){return tr.tileID}).sort(Ci).map(function(tr){return tr.key})},ne.prototype.hasRenderableParent=function(me){var We=this.findLoadedParent(me,0);return We?this._isIdRenderable(We.tileID.key):!1},ne.prototype._isIdRenderable=function(me,We){return this._tiles[me]&&this._tiles[me].hasData()&&!this._coveredTiles[me]&&(We||!this._tiles[me].holdingForFade())},ne.prototype.reload=function(){if(this._paused){this._shouldReloadOnResume=!0;return}this._cache.reset();for(var me in this._tiles)this._tiles[me].state!=="errored"&&this._reloadTile(me,"reloading")},ne.prototype._reloadTile=function(me,We){var At=this._tiles[me];At&&(At.state!=="loading"&&(At.state=We),this._loadTile(At,this._tileLoaded.bind(this,At,me,We)))},ne.prototype._tileLoaded=function(me,We,At,Yt){if(Yt){me.state="errored",Yt.status!==404?this._source.fire(new l.ErrorEvent(Yt,{tile:me})):this.update(this.transform);return}me.timeAdded=l.browser.now(),At==="expired"&&(me.refreshedUponExpiration=!0),this._setTileReloadTimer(We,me),this.getSource().type==="raster-dem"&&me.dem&&this._backfillDEM(me),this._state.initializeTileState(me,this.map?this.map.painter:null),this._source.fire(new l.Event("data",{dataType:"source",tile:me,coord:me.tileID}))},ne.prototype._backfillDEM=function(me){for(var We=this.getRenderableIds(),At=0;At<We.length;At++){var Yt=We[At];if(me.neighboringTiles&&me.neighboringTiles[Yt]){var tr=this.getTileByID(Yt);Pt(me,tr),Pt(tr,me)}}function Pt(jt,hr){jt.needsHillshadePrepare=!0;var qr=hr.tileID.canonical.x-jt.tileID.canonical.x,zr=hr.tileID.canonical.y-jt.tileID.canonical.y,Gr=Math.pow(2,jt.tileID.canonical.z),en=hr.tileID.key;qr===0&&zr===0||Math.abs(zr)>1||(Math.abs(qr)>1&&(Math.abs(qr+Gr)===1?qr+=Gr:Math.abs(qr-Gr)===1&&(qr-=Gr)),!(!hr.dem||!jt.dem)&&(jt.dem.backfillBorder(hr.dem,qr,zr),jt.neighboringTiles&&jt.neighboringTiles[en]&&(jt.neighboringTiles[en].backfilled=!0)))}},ne.prototype.getTile=function(me){return this.getTileByID(me.key)},ne.prototype.getTileByID=function(me){return this._tiles[me]},ne.prototype._retainLoadedChildren=function(me,We,At,Yt){for(var tr in this._tiles){var Pt=this._tiles[tr];if(!(Yt[tr]||!Pt.hasData()||Pt.tileID.overscaledZ<=We||Pt.tileID.overscaledZ>At)){for(var jt=Pt.tileID;Pt&&Pt.tileID.overscaledZ>We+1;){var hr=Pt.tileID.scaledTo(Pt.tileID.overscaledZ-1);Pt=this._tiles[hr.key],Pt&&Pt.hasData()&&(jt=hr)}for(var qr=jt;qr.overscaledZ>We;)if(qr=qr.scaledTo(qr.overscaledZ-1),me[qr.key]){Yt[jt.key]=jt;break}}}},ne.prototype.findLoadedParent=function(me,We){if(me.key in this._loadedParentTiles){var At=this._loadedParentTiles[me.key];return At&&At.tileID.overscaledZ>=We?At:null}for(var Yt=me.overscaledZ-1;Yt>=We;Yt--){var tr=me.scaledTo(Yt),Pt=this._getLoadedTile(tr);if(Pt)return Pt}},ne.prototype._getLoadedTile=function(me){var We=this._tiles[me.key];if(We&&We.hasData())return We;var At=this._cache.getByKey(me.wrapped().key);return At},ne.prototype.updateCacheSize=function(me){var We=Math.ceil(me.width/this._source.tileSize)+1,At=Math.ceil(me.height/this._source.tileSize)+1,Yt=We*At,tr=5,Pt=Math.floor(Yt*tr),jt=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,Pt):Pt;this._cache.setMaxSize(jt)},ne.prototype.handleWrapJump=function(me){var We=this._prevLng===void 0?me:this._prevLng,At=me-We,Yt=At/360,tr=Math.round(Yt);if(this._prevLng=me,tr){var Pt={};for(var jt in this._tiles){var hr=this._tiles[jt];hr.tileID=hr.tileID.unwrapTo(hr.tileID.wrap+tr),Pt[hr.tileID.key]=hr}this._tiles=Pt;for(var qr in this._timers)clearTimeout(this._timers[qr]),delete this._timers[qr];for(var zr in this._tiles){var Gr=this._tiles[zr];this._setTileReloadTimer(zr,Gr)}}},ne.prototype.update=function(me){var We=this;if(this.transform=me,!(!this._sourceLoaded||this._paused)){this.updateCacheSize(me),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={};var At;this.used?this._source.tileID?At=me.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(Ja){return new l.OverscaledTileID(Ja.canonical.z,Ja.wrap,Ja.canonical.z,Ja.canonical.x,Ja.canonical.y)}):(At=me.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(At=At.filter(function(Ja){return We._source.hasTile(Ja)}))):At=[];var Yt=me.coveringZoomLevel(this._source),tr=Math.max(Yt-ne.maxOverzooming,this._source.minzoom),Pt=Math.max(Yt+ne.maxUnderzooming,this._source.minzoom),jt=this._updateRetainedTiles(At,Yt);if(Ta(this._source.type)){for(var hr={},qr={},zr=Object.keys(jt),Gr=0,en=zr;Gr<en.length;Gr+=1){var Xr=en[Gr],Rr=jt[Xr],jr=this._tiles[Xr];if(!(!jr||jr.fadeEndTime&&jr.fadeEndTime<=l.browser.now())){var Br=this.findLoadedParent(Rr,tr);Br&&(this._addTile(Br.tileID),hr[Br.tileID.key]=Br.tileID),qr[Xr]=Rr}}this._retainLoadedChildren(qr,Yt,Pt,jt);for(var Bn in hr)jt[Bn]||(this._coveredTiles[Bn]=!0,jt[Bn]=hr[Bn])}for(var ui in jt)this._tiles[ui].clearFadeHold();for(var Ii=l.keysDifference(this._tiles,jt),Ga=0,ka=Ii;Ga<ka.length;Ga+=1){var wa=ka[Ga],$a=this._tiles[wa];$a.hasSymbolBuckets&&!$a.holdingForFade()?$a.setHoldDuration(this.map._fadeDuration):(!$a.hasSymbolBuckets||$a.symbolFadeFinished())&&this._removeTile(wa)}this._updateLoadedParentTileCache()}},ne.prototype.releaseSymbolFadeTiles=function(){for(var me in this._tiles)this._tiles[me].holdingForFade()&&this._removeTile(me)},ne.prototype._updateRetainedTiles=function(me,We){for(var At={},Yt={},tr=Math.max(We-ne.maxOverzooming,this._source.minzoom),Pt=Math.max(We+ne.maxUnderzooming,this._source.minzoom),jt={},hr=0,qr=me;hr<qr.length;hr+=1){var zr=qr[hr],Gr=this._addTile(zr);At[zr.key]=zr,!Gr.hasData()&&We<this._source.maxzoom&&(jt[zr.key]=zr)}this._retainLoadedChildren(jt,We,Pt,At);for(var en=0,Xr=me;en<Xr.length;en+=1){var Rr=Xr[en],jr=this._tiles[Rr.key];if(!jr.hasData()){if(We+1>this._source.maxzoom){var Br=Rr.children(this._source.maxzoom)[0],Bn=this.getTile(Br);if(Bn&&Bn.hasData()){At[Br.key]=Br;continue}}else{var ui=Rr.children(this._source.maxzoom);if(At[ui[0].key]&&At[ui[1].key]&&At[ui[2].key]&&At[ui[3].key])continue}for(var Ii=jr.wasRequested(),Ga=Rr.overscaledZ-1;Ga>=tr;--Ga){var ka=Rr.scaledTo(Ga);if(Yt[ka.key]||(Yt[ka.key]=!0,jr=this.getTile(ka),!jr&&Ii&&(jr=this._addTile(ka)),jr&&(At[ka.key]=ka,Ii=jr.wasRequested(),jr.hasData())))break}}}return At},ne.prototype._updateLoadedParentTileCache=function(){this._loadedParentTiles={};for(var me in this._tiles){for(var We=[],At=void 0,Yt=this._tiles[me].tileID;Yt.overscaledZ>0;){if(Yt.key in this._loadedParentTiles){At=this._loadedParentTiles[Yt.key];break}We.push(Yt.key);var tr=Yt.scaledTo(Yt.overscaledZ-1);if(At=this._getLoadedTile(tr),At)break;Yt=tr}for(var Pt=0,jt=We;Pt<jt.length;Pt+=1){var hr=jt[Pt];this._loadedParentTiles[hr]=At}}},ne.prototype._addTile=function(me){var We=this._tiles[me.key];if(We)return We;We=this._cache.getAndRemove(me),We&&(this._setTileReloadTimer(me.key,We),We.tileID=me,this._state.initializeTileState(We,this.map?this.map.painter:null),this._cacheTimers[me.key]&&(clearTimeout(this._cacheTimers[me.key]),delete this._cacheTimers[me.key],this._setTileReloadTimer(me.key,We)));var At=!!We;return At||(We=new l.Tile(me,this._source.tileSize*me.overscaleFactor()),this._loadTile(We,this._tileLoaded.bind(this,We,me.key,We.state))),We?(We.uses++,this._tiles[me.key]=We,At||this._source.fire(new l.Event("dataloading",{tile:We,coord:We.tileID,dataType:"source"})),We):null},ne.prototype._setTileReloadTimer=function(me,We){var At=this;me in this._timers&&(clearTimeout(this._timers[me]),delete this._timers[me]);var Yt=We.getExpiryTimeout();Yt&&(this._timers[me]=setTimeout(function(){At._reloadTile(me,"expired"),delete At._timers[me]},Yt))},ne.prototype._removeTile=function(me){var We=this._tiles[me];We&&(We.uses--,delete this._tiles[me],this._timers[me]&&(clearTimeout(this._timers[me]),delete this._timers[me]),!(We.uses>0)&&(We.hasData()&&We.state!=="reloading"?this._cache.add(We.tileID,We,We.getExpiryTimeout()):(We.aborted=!0,this._abortTile(We),this._unloadTile(We))))},ne.prototype.clearTiles=function(){this._shouldReloadOnResume=!1,this._paused=!1;for(var me in this._tiles)this._removeTile(me);this._cache.reset()},ne.prototype.tilesIn=function(me,We,At){var Yt=this,tr=[],Pt=this.transform;if(!Pt)return tr;for(var jt=At?Pt.getCameraQueryGeometry(me):me,hr=me.map(function(Ga){return Pt.pointCoordinate(Ga)}),qr=jt.map(function(Ga){return Pt.pointCoordinate(Ga)}),zr=this.getIds(),Gr=1/0,en=1/0,Xr=-1/0,Rr=-1/0,jr=0,Br=qr;jr<Br.length;jr+=1){var Bn=Br[jr];Gr=Math.min(Gr,Bn.x),en=Math.min(en,Bn.y),Xr=Math.max(Xr,Bn.x),Rr=Math.max(Rr,Bn.y)}for(var ui=function(Ga){var ka=Yt._tiles[zr[Ga]];if(!ka.holdingForFade()){var wa=ka.tileID,$a=Math.pow(2,Pt.zoom-ka.tileID.overscaledZ),Ja=We*ka.queryPadding*l.EXTENT/ka.tileSize/$a,wo=[wa.getTilePoint(new l.MercatorCoordinate(Gr,en)),wa.getTilePoint(new l.MercatorCoordinate(Xr,Rr))];if(wo[0].x-Ja<l.EXTENT&&wo[0].y-Ja<l.EXTENT&&wo[1].x+Ja>=0&&wo[1].y+Ja>=0){var Ya=hr.map(function(Xo){return wa.getTilePoint(Xo)}),Ro=qr.map(function(Xo){return wa.getTilePoint(Xo)});tr.push({tile:ka,tileID:wa,queryGeometry:Ya,cameraQueryGeometry:Ro,scale:$a})}}},Ii=0;Ii<zr.length;Ii++)ui(Ii);return tr},ne.prototype.getVisibleCoordinates=function(me){for(var We=this,At=this.getRenderableIds(me).map(function(jt){return We._tiles[jt].tileID}),Yt=0,tr=At;Yt<tr.length;Yt+=1){var Pt=tr[Yt];Pt.posMatrix=this.transform.calculatePosMatrix(Pt.toUnwrapped())}return At},ne.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(Ta(this._source.type))for(var me in this._tiles){var We=this._tiles[me];if(We.fadeEndTime!==void 0&&We.fadeEndTime>=l.browser.now())return!0}return!1},ne.prototype.setFeatureState=function(me,We,At){me=me||"_geojsonTileLayer",this._state.updateState(me,We,At)},ne.prototype.removeFeatureState=function(me,We,At){me=me||"_geojsonTileLayer",this._state.removeFeatureState(me,We,At)},ne.prototype.getFeatureState=function(me,We){return me=me||"_geojsonTileLayer",this._state.getState(me,We)},ne.prototype.setDependencies=function(me,We,At){var Yt=this._tiles[me];Yt&&Yt.setDependencies(We,At)},ne.prototype.reloadTilesForDependencies=function(me,We){for(var At in this._tiles){var Yt=this._tiles[At];Yt.hasDependency(me,We)&&this._reloadTile(At,"reloading")}this._cache.filter(function(tr){return!tr.hasDependency(me,We)})},ne})(l.Evented);aa.maxOverzooming=10,aa.maxUnderzooming=3;function Ci(Xe,ne){var Fe=Math.abs(Xe.wrap*2)-+(Xe.wrap<0),me=Math.abs(ne.wrap*2)-+(ne.wrap<0);return Xe.overscaledZ-ne.overscaledZ||me-Fe||ne.canonical.y-Xe.canonical.y||ne.canonical.x-Xe.canonical.x}function Ta(Xe){return Xe==="raster"||Xe==="image"||Xe==="video"}function Na(){return new l.window.Worker(uc.workerUrl)}var ro="mapboxgl_preloaded_worker_pool",oo=function(){this.active={}};oo.prototype.acquire=function(ne){if(!this.workers)for(this.workers=[];this.workers.length<oo.workerCount;)this.workers.push(new Na);return this.active[ne]=!0,this.workers.slice()},oo.prototype.release=function(ne){delete this.active[ne],this.numActive()===0&&(this.workers.forEach(function(Fe){Fe.terminate()}),this.workers=null)},oo.prototype.isPreloaded=function(){return!!this.active[ro]},oo.prototype.numActive=function(){return Object.keys(this.active).length};var xo=Math.floor(l.browser.hardwareConcurrency/2);oo.workerCount=Math.max(Math.min(xo,6),1);var vr;function er(){return vr||(vr=new oo),vr}function si(){var Xe=er();Xe.acquire(ro)}function ei(){var Xe=vr;Xe&&(Xe.isPreloaded()&&Xe.numActive()===1?(Xe.release(ro),vr=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 Kn(Xe,ne){var Fe={};for(var me in Xe)me!=="ref"&&(Fe[me]=Xe[me]);return l.refProperties.forEach(function(We){We in ne&&(Fe[We]=ne[We])}),Fe}function qn(Xe){Xe=Xe.slice();for(var ne=Object.create(null),Fe=0;Fe<Xe.length;Fe++)ne[Xe[Fe].id]=Xe[Fe];for(var me=0;me<Xe.length;me++)"ref"in Xe[me]&&(Xe[me]=Kn(Xe[me],ne[Xe[me].ref]));return Xe}function pi(){var Xe={},ne=l.styleSpec.$version;for(var Fe in l.styleSpec.$root){var me=l.styleSpec.$root[Fe];if(me.required){var We=null;Fe==="version"?We=ne:me.type==="array"?We=[]:We={},We!=null&&(Xe[Fe]=We)}}return Xe}var _i={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 fi(Xe,ne,Fe){Fe.push({command:_i.addSource,args:[Xe,ne[Xe]]})}function Ri(Xe,ne,Fe){ne.push({command:_i.removeSource,args:[Xe]}),Fe[Xe]=!0}function $i(Xe,ne,Fe,me){Ri(Xe,Fe,me),fi(Xe,ne,Fe)}function Hi(Xe,ne,Fe){var me;for(me in Xe[Fe])if(Xe[Fe].hasOwnProperty(me)&&me!=="data"&&!l.deepEqual(Xe[Fe][me],ne[Fe][me]))return!1;for(me in ne[Fe])if(ne[Fe].hasOwnProperty(me)&&me!=="data"&&!l.deepEqual(Xe[Fe][me],ne[Fe][me]))return!1;return!0}function wr(Xe,ne,Fe,me){Xe=Xe||{},ne=ne||{};var We;for(We in Xe)Xe.hasOwnProperty(We)&&(ne.hasOwnProperty(We)||Ri(We,Fe,me));for(We in ne)ne.hasOwnProperty(We)&&(Xe.hasOwnProperty(We)?l.deepEqual(Xe[We],ne[We])||(Xe[We].type==="geojson"&&ne[We].type==="geojson"&&Hi(Xe,ne,We)?Fe.push({command:_i.setGeoJSONSourceData,args:[We,ne[We].data]}):$i(We,ne,Fe,me)):fi(We,ne,Fe))}function gn(Xe,ne,Fe,me,We,At){Xe=Xe||{},ne=ne||{};var Yt;for(Yt in Xe)Xe.hasOwnProperty(Yt)&&(l.deepEqual(Xe[Yt],ne[Yt])||Fe.push({command:At,args:[me,Yt,ne[Yt],We]}));for(Yt in ne)!ne.hasOwnProperty(Yt)||Xe.hasOwnProperty(Yt)||l.deepEqual(Xe[Yt],ne[Yt])||Fe.push({command:At,args:[me,Yt,ne[Yt],We]})}function Xn(Xe){return Xe.id}function Yi(Xe,ne){return Xe[ne.id]=ne,Xe}function ha(Xe,ne,Fe){Xe=Xe||[],ne=ne||[];var me=Xe.map(Xn),We=ne.map(Xn),At=Xe.reduce(Yi,{}),Yt=ne.reduce(Yi,{}),tr=me.slice(),Pt=Object.create(null),jt,hr,qr,zr,Gr,en,Xr;for(jt=0,hr=0;jt<me.length;jt++)qr=me[jt],Yt.hasOwnProperty(qr)?hr++:(Fe.push({command:_i.removeLayer,args:[qr]}),tr.splice(tr.indexOf(qr,hr),1));for(jt=0,hr=0;jt<We.length;jt++)qr=We[We.length-1-jt],tr[tr.length-1-jt]!==qr&&(At.hasOwnProperty(qr)?(Fe.push({command:_i.removeLayer,args:[qr]}),tr.splice(tr.lastIndexOf(qr,tr.length-hr),1)):hr++,en=tr[tr.length-jt],Fe.push({command:_i.addLayer,args:[Yt[qr],en]}),tr.splice(tr.length-jt,0,qr),Pt[qr]=!0);for(jt=0;jt<We.length;jt++)if(qr=We[jt],zr=At[qr],Gr=Yt[qr],!(Pt[qr]||l.deepEqual(zr,Gr))){if(!l.deepEqual(zr.source,Gr.source)||!l.deepEqual(zr["source-layer"],Gr["source-layer"])||!l.deepEqual(zr.type,Gr.type)){Fe.push({command:_i.removeLayer,args:[qr]}),en=tr[tr.lastIndexOf(qr)+1],Fe.push({command:_i.addLayer,args:[Gr,en]});continue}gn(zr.layout,Gr.layout,Fe,qr,null,_i.setLayoutProperty),gn(zr.paint,Gr.paint,Fe,qr,null,_i.setPaintProperty),l.deepEqual(zr.filter,Gr.filter)||Fe.push({command:_i.setFilter,args:[qr,Gr.filter]}),(!l.deepEqual(zr.minzoom,Gr.minzoom)||!l.deepEqual(zr.maxzoom,Gr.maxzoom))&&Fe.push({command:_i.setLayerZoomRange,args:[qr,Gr.minzoom,Gr.maxzoom]});for(Xr in zr)zr.hasOwnProperty(Xr)&&(Xr==="layout"||Xr==="paint"||Xr==="filter"||Xr==="metadata"||Xr==="minzoom"||Xr==="maxzoom"||(Xr.indexOf("paint.")===0?gn(zr[Xr],Gr[Xr],Fe,qr,Xr.slice(6),_i.setPaintProperty):l.deepEqual(zr[Xr],Gr[Xr])||Fe.push({command:_i.setLayerProperty,args:[qr,Xr,Gr[Xr]]})));for(Xr in Gr)!Gr.hasOwnProperty(Xr)||zr.hasOwnProperty(Xr)||Xr==="layout"||Xr==="paint"||Xr==="filter"||Xr==="metadata"||Xr==="minzoom"||Xr==="maxzoom"||(Xr.indexOf("paint.")===0?gn(zr[Xr],Gr[Xr],Fe,qr,Xr.slice(6),_i.setPaintProperty):l.deepEqual(zr[Xr],Gr[Xr])||Fe.push({command:_i.setLayerProperty,args:[qr,Xr,Gr[Xr]]}))}}function Ca(Xe,ne){if(!Xe)return[{command:_i.setStyle,args:[ne]}];var Fe=[];try{if(!l.deepEqual(Xe.version,ne.version))return[{command:_i.setStyle,args:[ne]}];l.deepEqual(Xe.center,ne.center)||Fe.push({command:_i.setCenter,args:[ne.center]}),l.deepEqual(Xe.zoom,ne.zoom)||Fe.push({command:_i.setZoom,args:[ne.zoom]}),l.deepEqual(Xe.bearing,ne.bearing)||Fe.push({command:_i.setBearing,args:[ne.bearing]}),l.deepEqual(Xe.pitch,ne.pitch)||Fe.push({command:_i.setPitch,args:[ne.pitch]}),l.deepEqual(Xe.sprite,ne.sprite)||Fe.push({command:_i.setSprite,args:[ne.sprite]}),l.deepEqual(Xe.glyphs,ne.glyphs)||Fe.push({command:_i.setGlyphs,args:[ne.glyphs]}),l.deepEqual(Xe.transition,ne.transition)||Fe.push({command:_i.setTransition,args:[ne.transition]}),l.deepEqual(Xe.light,ne.light)||Fe.push({command:_i.setLight,args:[ne.light]});var me={},We=[];wr(Xe.sources,ne.sources,We,me);var At=[];Xe.layers&&Xe.layers.forEach(function(Yt){me[Yt.source]?Fe.push({command:_i.removeLayer,args:[Yt.id]}):At.push(Yt)}),Fe=Fe.concat(We),ha(At,ne.layers,Fe)}catch(Yt){console.warn("Unable to compute style diff:",Yt),Fe=[{command:_i.setStyle,args:[ne]}]}return Fe}var Ba=function(ne,Fe){this.reset(ne,Fe)};Ba.prototype.reset=function(ne,Fe){this.points=ne||[],this._distances=[0];for(var me=1;me<this.points.length;me++)this._distances[me]=this._distances[me-1]+this.points[me].dist(this.points[me-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(Fe||0,this.length*.5),this.paddedLength=this.length-this.padding*2},Ba.prototype.lerp=function(ne){if(this.points.length===1)return this.points[0];ne=l.clamp(ne,0,1);for(var Fe=1,me=this._distances[Fe],We=ne*this.paddedLength+this.padding;me<We&&Fe<this._distances.length;)me=this._distances[++Fe];var At=Fe-1,Yt=this._distances[At],tr=me-Yt,Pt=tr>0?(We-Yt)/tr:0;return this.points[At].mult(1-Pt).add(this.points[Fe].mult(Pt))};var ji=function(ne,Fe,me){var We=this.boxCells=[],At=this.circleCells=[];this.xCellCount=Math.ceil(ne/me),this.yCellCount=Math.ceil(Fe/me);for(var Yt=0;Yt<this.xCellCount*this.yCellCount;Yt++)We.push([]),At.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=ne,this.height=Fe,this.xScale=this.xCellCount/ne,this.yScale=this.yCellCount/Fe,this.boxUid=0,this.circleUid=0};ji.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},ji.prototype.insert=function(ne,Fe,me,We,At){this._forEachCell(Fe,me,We,At,this._insertBoxCell,this.boxUid++),this.boxKeys.push(ne),this.bboxes.push(Fe),this.bboxes.push(me),this.bboxes.push(We),this.bboxes.push(At)},ji.prototype.insertCircle=function(ne,Fe,me,We){this._forEachCell(Fe-We,me-We,Fe+We,me+We,this._insertCircleCell,this.circleUid++),this.circleKeys.push(ne),this.circles.push(Fe),this.circles.push(me),this.circles.push(We)},ji.prototype._insertBoxCell=function(ne,Fe,me,We,At,Yt){this.boxCells[At].push(Yt)},ji.prototype._insertCircleCell=function(ne,Fe,me,We,At,Yt){this.circleCells[At].push(Yt)},ji.prototype._query=function(ne,Fe,me,We,At,Yt){if(me<0||ne>this.width||We<0||Fe>this.height)return At?!1:[];var tr=[];if(ne<=0&&Fe<=0&&this.width<=me&&this.height<=We){if(At)return!0;for(var Pt=0;Pt<this.boxKeys.length;Pt++)tr.push({key:this.boxKeys[Pt],x1:this.bboxes[Pt*4],y1:this.bboxes[Pt*4+1],x2:this.bboxes[Pt*4+2],y2:this.bboxes[Pt*4+3]});for(var jt=0;jt<this.circleKeys.length;jt++){var hr=this.circles[jt*3],qr=this.circles[jt*3+1],zr=this.circles[jt*3+2];tr.push({key:this.circleKeys[jt],x1:hr-zr,y1:qr-zr,x2:hr+zr,y2:qr+zr})}return Yt?tr.filter(Yt):tr}else{var Gr={hitTest:At,seenUids:{box:{},circle:{}}};return this._forEachCell(ne,Fe,me,We,this._queryCell,tr,Gr,Yt),At?tr.length>0:tr}},ji.prototype._queryCircle=function(ne,Fe,me,We,At){var Yt=ne-me,tr=ne+me,Pt=Fe-me,jt=Fe+me;if(tr<0||Yt>this.width||jt<0||Pt>this.height)return We?!1:[];var hr=[],qr={hitTest:We,circle:{x:ne,y:Fe,radius:me},seenUids:{box:{},circle:{}}};return this._forEachCell(Yt,Pt,tr,jt,this._queryCellCircle,hr,qr,At),We?hr.length>0:hr},ji.prototype.query=function(ne,Fe,me,We,At){return this._query(ne,Fe,me,We,!1,At)},ji.prototype.hitTest=function(ne,Fe,me,We,At){return this._query(ne,Fe,me,We,!0,At)},ji.prototype.hitTestCircle=function(ne,Fe,me,We){return this._queryCircle(ne,Fe,me,!0,We)},ji.prototype._queryCell=function(ne,Fe,me,We,At,Yt,tr,Pt){var jt=tr.seenUids,hr=this.boxCells[At];if(hr!==null)for(var qr=this.bboxes,zr=0,Gr=hr;zr<Gr.length;zr+=1){var en=Gr[zr];if(!jt.box[en]){jt.box[en]=!0;var Xr=en*4;if(ne<=qr[Xr+2]&&Fe<=qr[Xr+3]&&me>=qr[Xr+0]&&We>=qr[Xr+1]&&(!Pt||Pt(this.boxKeys[en]))){if(tr.hitTest)return Yt.push(!0),!0;Yt.push({key:this.boxKeys[en],x1:qr[Xr],y1:qr[Xr+1],x2:qr[Xr+2],y2:qr[Xr+3]})}}}var Rr=this.circleCells[At];if(Rr!==null)for(var jr=this.circles,Br=0,Bn=Rr;Br<Bn.length;Br+=1){var ui=Bn[Br];if(!jt.circle[ui]){jt.circle[ui]=!0;var Ii=ui*3;if(this._circleAndRectCollide(jr[Ii],jr[Ii+1],jr[Ii+2],ne,Fe,me,We)&&(!Pt||Pt(this.circleKeys[ui]))){if(tr.hitTest)return Yt.push(!0),!0;var Ga=jr[Ii],ka=jr[Ii+1],wa=jr[Ii+2];Yt.push({key:this.circleKeys[ui],x1:Ga-wa,y1:ka-wa,x2:Ga+wa,y2:ka+wa})}}}},ji.prototype._queryCellCircle=function(ne,Fe,me,We,At,Yt,tr,Pt){var jt=tr.circle,hr=tr.seenUids,qr=this.boxCells[At];if(qr!==null)for(var zr=this.bboxes,Gr=0,en=qr;Gr<en.length;Gr+=1){var Xr=en[Gr];if(!hr.box[Xr]){hr.box[Xr]=!0;var Rr=Xr*4;if(this._circleAndRectCollide(jt.x,jt.y,jt.radius,zr[Rr+0],zr[Rr+1],zr[Rr+2],zr[Rr+3])&&(!Pt||Pt(this.boxKeys[Xr])))return Yt.push(!0),!0}}var jr=this.circleCells[At];if(jr!==null)for(var Br=this.circles,Bn=0,ui=jr;Bn<ui.length;Bn+=1){var Ii=ui[Bn];if(!hr.circle[Ii]){hr.circle[Ii]=!0;var Ga=Ii*3;if(this._circlesCollide(Br[Ga],Br[Ga+1],Br[Ga+2],jt.x,jt.y,jt.radius)&&(!Pt||Pt(this.circleKeys[Ii])))return Yt.push(!0),!0}}},ji.prototype._forEachCell=function(ne,Fe,me,We,At,Yt,tr,Pt){for(var jt=this._convertToXCellCoord(ne),hr=this._convertToYCellCoord(Fe),qr=this._convertToXCellCoord(me),zr=this._convertToYCellCoord(We),Gr=jt;Gr<=qr;Gr++)for(var en=hr;en<=zr;en++){var Xr=this.xCellCount*en+Gr;if(At.call(this,ne,Fe,me,We,Xr,Yt,tr,Pt))return}},ji.prototype._convertToXCellCoord=function(ne){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(ne*this.xScale)))},ji.prototype._convertToYCellCoord=function(ne){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(ne*this.yScale)))},ji.prototype._circlesCollide=function(ne,Fe,me,We,At,Yt){var tr=We-ne,Pt=At-Fe,jt=me+Yt;return jt*jt>tr*tr+Pt*Pt},ji.prototype._circleAndRectCollide=function(ne,Fe,me,We,At,Yt,tr){var Pt=(Yt-We)/2,jt=Math.abs(ne-(We+Pt));if(jt>Pt+me)return!1;var hr=(tr-At)/2,qr=Math.abs(Fe-(At+hr));if(qr>hr+me)return!1;if(jt<=Pt||qr<=hr)return!0;var zr=jt-Pt,Gr=qr-hr;return zr*zr+Gr*Gr<=me*me};function Ea(Xe,ne,Fe,me,We){var At=l.create();return ne?(l.scale(At,At,[1/We,1/We,1]),Fe||l.rotateZ(At,At,me.angle)):l.multiply(At,me.labelPlaneMatrix,Xe),At}function cs(Xe,ne,Fe,me,We){if(ne){var At=l.clone(Xe);return l.scale(At,At,[We,We,1]),Fe||l.rotateZ(At,At,-me.angle),At}else return me.glCoordMatrix}function No(Xe,ne){var Fe=[Xe.x,Xe.y,0,1];Pf(Fe,Fe,ne);var me=Fe[3];return{point:new l.Point(Fe[0]/me,Fe[1]/me),signedDistanceFromCamera:me}}function Vs(Xe,ne){return .5+.5*(Xe/ne)}function pl(Xe,ne){var Fe=Xe[0]/Xe[3],me=Xe[1]/Xe[3],We=Fe>=-ne[0]&&Fe<=ne[0]&&me>=-ne[1]&&me<=ne[1];return We}function kl(Xe,ne,Fe,me,We,At,Yt,tr){var Pt=me?Xe.textSizeData:Xe.iconSizeData,jt=l.evaluateSizeForZoom(Pt,Fe.transform.zoom),hr=[256/Fe.width*2+1,256/Fe.height*2+1],qr=me?Xe.text.dynamicLayoutVertexArray:Xe.icon.dynamicLayoutVertexArray;qr.clear();for(var zr=Xe.lineVertexArray,Gr=me?Xe.text.placedSymbolArray:Xe.icon.placedSymbolArray,en=Fe.transform.width/Fe.transform.height,Xr=!1,Rr=0;Rr<Gr.length;Rr++){var jr=Gr.get(Rr);if(jr.hidden||jr.writingMode===l.WritingMode.vertical&&!Xr){zc(jr.numGlyphs,qr);continue}Xr=!1;var Br=[jr.anchorX,jr.anchorY,0,1];if(l.transformMat4(Br,Br,ne),!pl(Br,hr)){zc(jr.numGlyphs,qr);continue}var Bn=Br[3],ui=Vs(Fe.transform.cameraToCenterDistance,Bn),Ii=l.evaluateSizeForFeature(Pt,jt,jr),Ga=Yt?Ii/ui:Ii*ui,ka=new l.Point(jr.anchorX,jr.anchorY),wa=No(ka,We).point,$a={},Ja=bu(jr,Ga,!1,tr,ne,We,At,Xe.glyphOffsetArray,zr,qr,wa,ka,$a,en);Xr=Ja.useVertical,(Ja.notEnoughRoom||Xr||Ja.needsFlipping&&bu(jr,Ga,!0,tr,ne,We,At,Xe.glyphOffsetArray,zr,qr,wa,ka,$a,en).notEnoughRoom)&&zc(jr.numGlyphs,qr)}me?Xe.text.dynamicLayoutVertexBuffer.updateData(qr):Xe.icon.dynamicLayoutVertexBuffer.updateData(qr)}function El(Xe,ne,Fe,me,We,At,Yt,tr,Pt,jt,hr){var qr=tr.glyphStartIndex+tr.numGlyphs,zr=tr.lineStartIndex,Gr=tr.lineStartIndex+tr.lineLength,en=ne.getoffsetX(tr.glyphStartIndex),Xr=ne.getoffsetX(qr-1),Rr=ql(Xe*en,Fe,me,We,At,Yt,tr.segment,zr,Gr,Pt,jt,hr);if(!Rr)return null;var jr=ql(Xe*Xr,Fe,me,We,At,Yt,tr.segment,zr,Gr,Pt,jt,hr);return jr?{first:Rr,last:jr}:null}function iu(Xe,ne,Fe,me){if(Xe===l.WritingMode.horizontal){var We=Math.abs(Fe.y-ne.y),At=Math.abs(Fe.x-ne.x)*me;if(We>At)return{useVertical:!0}}return(Xe===l.WritingMode.vertical?ne.y<Fe.y:ne.x>Fe.x)?{needsFlipping:!0}:null}function bu(Xe,ne,Fe,me,We,At,Yt,tr,Pt,jt,hr,qr,zr,Gr){var en=ne/24,Xr=Xe.lineOffsetX*en,Rr=Xe.lineOffsetY*en,jr;if(Xe.numGlyphs>1){var Br=Xe.glyphStartIndex+Xe.numGlyphs,Bn=Xe.lineStartIndex,ui=Xe.lineStartIndex+Xe.lineLength,Ii=El(en,tr,Xr,Rr,Fe,hr,qr,Xe,Pt,At,zr);if(!Ii)return{notEnoughRoom:!0};var Ga=No(Ii.first.point,Yt).point,ka=No(Ii.last.point,Yt).point;if(me&&!Fe){var wa=iu(Xe.writingMode,Ga,ka,Gr);if(wa)return wa}jr=[Ii.first];for(var $a=Xe.glyphStartIndex+1;$a<Br-1;$a++)jr.push(ql(en*tr.getoffsetX($a),Xr,Rr,Fe,hr,qr,Xe.segment,Bn,ui,Pt,At,zr));jr.push(Ii.last)}else{if(me&&!Fe){var Ja=No(qr,We).point,wo=Xe.lineStartIndex+Xe.segment+1,Ya=new l.Point(Pt.getx(wo),Pt.gety(wo)),Ro=No(Ya,We),Xo=Ro.signedDistanceFromCamera>0?Ro.point:yl(qr,Ya,Ja,1,We),Rs=iu(Xe.writingMode,Ja,Xo,Gr);if(Rs)return Rs}var Qs=ql(en*tr.getoffsetX(Xe.glyphStartIndex),Xr,Rr,Fe,hr,qr,Xe.segment,Xe.lineStartIndex,Xe.lineStartIndex+Xe.lineLength,Pt,At,zr);if(!Qs)return{notEnoughRoom:!0};jr=[Qs]}for(var cc=0,ac=jr;cc<ac.length;cc+=1){var yf=ac[cc];l.addDynamicAttributes(jt,yf.point,yf.angle)}return{}}function yl(Xe,ne,Fe,me,We){var At=No(Xe.add(Xe.sub(ne)._unit()),We).point,Yt=Fe.sub(At);return Fe.add(Yt._mult(me/Yt.mag()))}function ql(Xe,ne,Fe,me,We,At,Yt,tr,Pt,jt,hr,qr){var zr=me?Xe-ne:Xe+ne,Gr=zr>0?1:-1,en=0;me&&(Gr*=-1,en=Math.PI),Gr<0&&(en+=Math.PI);for(var Xr=Gr>0?tr+Yt:tr+Yt+1,Rr=We,jr=We,Br=0,Bn=0,ui=Math.abs(zr),Ii=[];Br+Bn<=ui;){if(Xr+=Gr,Xr<tr||Xr>=Pt)return null;if(jr=Rr,Ii.push(Rr),Rr=qr[Xr],Rr===void 0){var Ga=new l.Point(jt.getx(Xr),jt.gety(Xr)),ka=No(Ga,hr);if(ka.signedDistanceFromCamera>0)Rr=qr[Xr]=ka.point;else{var wa=Xr-Gr,$a=Br===0?At:new l.Point(jt.getx(wa),jt.gety(wa));Rr=yl($a,Ga,jr,ui-Br+1,hr)}}Br+=Bn,Bn=jr.dist(Rr)}var Ja=(ui-Br)/Bn,wo=Rr.sub(jr),Ya=wo.mult(Ja)._add(jr);Ya._add(wo._unit()._perp()._mult(Fe*Gr));var Ro=en+Math.atan2(Rr.y-jr.y,Rr.x-jr.x);return Ii.push(Ya),{point:Ya,angle:Ro,path:Ii}}var rc=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function zc(Xe,ne){for(var Fe=0;Fe<Xe;Fe++){var me=ne.length;ne.resize(me+4),ne.float32.set(rc,me*3)}}function Pf(Xe,ne,Fe){var me=ne[0],We=ne[1];return Xe[0]=Fe[0]*me+Fe[4]*We+Fe[12],Xe[1]=Fe[1]*me+Fe[5]*We+Fe[13],Xe[3]=Fe[3]*me+Fe[7]*We+Fe[15],Xe}var ju=100,Ql=function(ne,Fe,me){Fe===void 0&&(Fe=new ji(ne.width+2*ju,ne.height+2*ju,25)),me===void 0&&(me=new ji(ne.width+2*ju,ne.height+2*ju,25)),this.transform=ne,this.grid=Fe,this.ignoredGrid=me,this.pitchfactor=Math.cos(ne._pitch)*ne.cameraToCenterDistance,this.screenRightBoundary=ne.width+ju,this.screenBottomBoundary=ne.height+ju,this.gridRightBoundary=ne.width+2*ju,this.gridBottomBoundary=ne.height+2*ju};Ql.prototype.placeCollisionBox=function(ne,Fe,me,We,At){var Yt=this.projectAndGetPerspectiveRatio(We,ne.anchorPointX,ne.anchorPointY),tr=me*Yt.perspectiveRatio,Pt=ne.x1*tr+Yt.point.x,jt=ne.y1*tr+Yt.point.y,hr=ne.x2*tr+Yt.point.x,qr=ne.y2*tr+Yt.point.y;return!this.isInsideGrid(Pt,jt,hr,qr)||!Fe&&this.grid.hitTest(Pt,jt,hr,qr,At)?{box:[],offscreen:!1}:{box:[Pt,jt,hr,qr],offscreen:this.isOffscreen(Pt,jt,hr,qr)}},Ql.prototype.placeCollisionCircles=function(ne,Fe,me,We,At,Yt,tr,Pt,jt,hr,qr,zr,Gr){var en=[],Xr=new l.Point(Fe.anchorX,Fe.anchorY),Rr=No(Xr,Yt),jr=Vs(this.transform.cameraToCenterDistance,Rr.signedDistanceFromCamera),Br=hr?At/jr:At*jr,Bn=Br/l.ONE_EM,ui=No(Xr,tr).point,Ii={},Ga=Fe.lineOffsetX*Bn,ka=Fe.lineOffsetY*Bn,wa=El(Bn,We,Ga,ka,!1,ui,Xr,Fe,me,tr,Ii),$a=!1,Ja=!1,wo=!0;if(wa){for(var Ya=zr*.5*jr+Gr,Ro=new l.Point(-ju,-ju),Xo=new l.Point(this.screenRightBoundary,this.screenBottomBoundary),Rs=new Ba,Qs=wa.first,cc=wa.last,ac=[],yf=Qs.path.length-1;yf>=1;yf--)ac.push(Qs.path[yf]);for(var ff=1;ff<cc.path.length;ff++)ac.push(cc.path[ff]);var _f=Ya*2.5;if(Pt){var bf=ac.map(function(Cw){return No(Cw,Pt)});bf.some(function(Cw){return Cw.signedDistanceFromCamera<=0})?ac=[]:ac=bf.map(function(Cw){return Cw.point})}var hp=[];if(ac.length>0){for(var af=ac[0].clone(),ch=ac[0].clone(),Ig=1;Ig<ac.length;Ig++)af.x=Math.min(af.x,ac[Ig].x),af.y=Math.min(af.y,ac[Ig].y),ch.x=Math.max(ch.x,ac[Ig].x),ch.y=Math.max(ch.y,ac[Ig].y);af.x>=Ro.x&&ch.x<=Xo.x&&af.y>=Ro.y&&ch.y<=Xo.y?hp=[ac]:ch.x<Ro.x||af.x>Xo.x||ch.y<Ro.y||af.y>Xo.y?hp=[]:hp=l.clipLine([ac],Ro.x,Ro.y,Xo.x,Xo.y)}for(var R0=0,Tw=hp;R0<Tw.length;R0+=1){var Ew=Tw[R0];Rs.reset(Ew,Ya*.25);var ex=0;Rs.length<=.5*Ya?ex=1:ex=Math.ceil(Rs.paddedLength/_f)+1;for(var A2=0;A2<ex;A2++){var uC=A2/Math.max(ex-1,1),RS=Rs.lerp(uC),tx=RS.x+ju,kS=RS.y+ju;en.push(tx,kS,Ya,0);var zx=tx-Ya,rx=kS-Ya,Aw=tx+Ya,C2=kS+Ya;if(wo=wo&&this.isOffscreen(zx,rx,Aw,C2),Ja=Ja||this.isInsideGrid(zx,rx,Aw,C2),!ne&&this.grid.hitTestCircle(tx,kS,Ya,qr)&&($a=!0,!jt))return{circles:[],offscreen:!1,collisionDetected:$a}}}}return{circles:!jt&&$a||!Ja?[]:en,offscreen:wo,collisionDetected:$a}},Ql.prototype.queryRenderedSymbols=function(ne){if(ne.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};for(var Fe=[],me=1/0,We=1/0,At=-1/0,Yt=-1/0,tr=0,Pt=ne;tr<Pt.length;tr+=1){var jt=Pt[tr],hr=new l.Point(jt.x+ju,jt.y+ju);me=Math.min(me,hr.x),We=Math.min(We,hr.y),At=Math.max(At,hr.x),Yt=Math.max(Yt,hr.y),Fe.push(hr)}for(var qr=this.grid.query(me,We,At,Yt).concat(this.ignoredGrid.query(me,We,At,Yt)),zr={},Gr={},en=0,Xr=qr;en<Xr.length;en+=1){var Rr=Xr[en],jr=Rr.key;if(zr[jr.bucketInstanceId]===void 0&&(zr[jr.bucketInstanceId]={}),!zr[jr.bucketInstanceId][jr.featureIndex]){var Br=[new l.Point(Rr.x1,Rr.y1),new l.Point(Rr.x2,Rr.y1),new l.Point(Rr.x2,Rr.y2),new l.Point(Rr.x1,Rr.y2)];l.polygonIntersectsPolygon(Fe,Br)&&(zr[jr.bucketInstanceId][jr.featureIndex]=!0,Gr[jr.bucketInstanceId]===void 0&&(Gr[jr.bucketInstanceId]=[]),Gr[jr.bucketInstanceId].push(jr.featureIndex))}}return Gr},Ql.prototype.insertCollisionBox=function(ne,Fe,me,We,At){var Yt=Fe?this.ignoredGrid:this.grid,tr={bucketInstanceId:me,featureIndex:We,collisionGroupID:At};Yt.insert(tr,ne[0],ne[1],ne[2],ne[3])},Ql.prototype.insertCollisionCircles=function(ne,Fe,me,We,At){for(var Yt=Fe?this.ignoredGrid:this.grid,tr={bucketInstanceId:me,featureIndex:We,collisionGroupID:At},Pt=0;Pt<ne.length;Pt+=4)Yt.insertCircle(tr,ne[Pt],ne[Pt+1],ne[Pt+2])},Ql.prototype.projectAndGetPerspectiveRatio=function(ne,Fe,me){var We=[Fe,me,0,1];Pf(We,We,ne);var At=new l.Point((We[0]/We[3]+1)/2*this.transform.width+ju,(-We[1]/We[3]+1)/2*this.transform.height+ju);return{point:At,perspectiveRatio:.5+.5*(this.transform.cameraToCenterDistance/We[3])}},Ql.prototype.isOffscreen=function(ne,Fe,me,We){return me<ju||ne>=this.screenRightBoundary||We<ju||Fe>this.screenBottomBoundary},Ql.prototype.isInsideGrid=function(ne,Fe,me,We){return me>=0&&ne<this.gridRightBoundary&&We>=0&&Fe<this.gridBottomBoundary},Ql.prototype.getViewportMatrix=function(){var ne=l.identity([]);return l.translate(ne,ne,[-ju,-ju,0]),ne};function lu(Xe,ne,Fe){return ne*(l.EXTENT/(Xe.tileSize*Math.pow(2,Fe-Xe.tileID.overscaledZ)))}var dc=function(ne,Fe,me,We){ne?this.opacity=Math.max(0,Math.min(1,ne.opacity+(ne.placed?Fe:-Fe))):this.opacity=We&&me?1:0,this.placed=me};dc.prototype.isHidden=function(){return this.opacity===0&&!this.placed};var wc=function(ne,Fe,me,We,At){this.text=new dc(ne?ne.text:null,Fe,me,At),this.icon=new dc(ne?ne.icon:null,Fe,We,At)};wc.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};var mc=function(ne,Fe,me){this.text=ne,this.icon=Fe,this.skipFade=me},xu=function(){this.invProjMatrix=l.create(),this.viewportMatrix=l.create(),this.circles=[]},qu=function(ne,Fe,me,We,At){this.bucketInstanceId=ne,this.featureIndex=Fe,this.sourceLayerIndex=me,this.bucketIndex=We,this.tileID=At},xf=function(ne){this.crossSourceCollisions=ne,this.maxGroupID=0,this.collisionGroups={}};xf.prototype.get=function(ne){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[ne]){var Fe=++this.maxGroupID;this.collisionGroups[ne]={ID:Fe,predicate:function(me){return me.collisionGroupID===Fe}}}return this.collisionGroups[ne]};function ed(Xe,ne,Fe,me,We){var At=l.getAnchorAlignment(Xe),Yt=At.horizontalAlign,tr=At.verticalAlign,Pt=-(Yt-.5)*ne,jt=-(tr-.5)*Fe,hr=l.evaluateVariableOffset(Xe,me);return new l.Point(Pt+hr[0]*We,jt+hr[1]*We)}function Df(Xe,ne,Fe,me,We,At){var Yt=Xe.x1,tr=Xe.x2,Pt=Xe.y1,jt=Xe.y2,hr=Xe.anchorPointX,qr=Xe.anchorPointY,zr=new l.Point(ne,Fe);return me&&zr._rotate(We?At:-At),{x1:Yt+zr.x,y1:Pt+zr.y,x2:tr+zr.x,y2:jt+zr.y,anchorPointX:hr,anchorPointY:qr}}var Sc=function(ne,Fe,me,We){this.transform=ne.clone(),this.collisionIndex=new Ql(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=Fe,this.retainedQueryData={},this.collisionGroups=new xf(me),this.collisionCircleArrays={},this.prevPlacement=We,We&&(We.prevPlacement=void 0),this.placedOrientations={}};Sc.prototype.getBucketParts=function(ne,Fe,me,We){var At=me.getBucket(Fe),Yt=me.latestFeatureIndex;if(!(!At||!Yt||Fe.id!==At.layerIds[0])){var tr=me.collisionBoxArray,Pt=At.layers[0].layout,jt=Math.pow(2,this.transform.zoom-me.tileID.overscaledZ),hr=me.tileSize/l.EXTENT,qr=this.transform.calculatePosMatrix(me.tileID.toUnwrapped()),zr=Pt.get("text-pitch-alignment")==="map",Gr=Pt.get("text-rotation-alignment")==="map",en=lu(me,1,this.transform.zoom),Xr=Ea(qr,zr,Gr,this.transform,en),Rr=null;if(zr){var jr=cs(qr,zr,Gr,this.transform,en);Rr=l.multiply([],this.transform.labelPlaneMatrix,jr)}this.retainedQueryData[At.bucketInstanceId]=new qu(At.bucketInstanceId,Yt,At.sourceLayerIndex,At.index,me.tileID);var Br={bucket:At,layout:Pt,posMatrix:qr,textLabelPlaneMatrix:Xr,labelToScreenMatrix:Rr,scale:jt,textPixelRatio:hr,holdingForFade:me.holdingForFade(),collisionBoxArray:tr,partiallyEvaluatedTextSize:l.evaluateSizeForZoom(At.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(At.sourceID)};if(We)for(var Bn=0,ui=At.sortKeyRanges;Bn<ui.length;Bn+=1){var Ii=ui[Bn],Ga=Ii.sortKey,ka=Ii.symbolInstanceStart,wa=Ii.symbolInstanceEnd;ne.push({sortKey:Ga,symbolInstanceStart:ka,symbolInstanceEnd:wa,parameters:Br})}else ne.push({symbolInstanceStart:0,symbolInstanceEnd:At.symbolInstances.length,parameters:Br})}},Sc.prototype.attemptAnchorPlacement=function(ne,Fe,me,We,At,Yt,tr,Pt,jt,hr,qr,zr,Gr,en,Xr){var Rr=[zr.textOffset0,zr.textOffset1],jr=ed(ne,me,We,Rr,At),Br=this.collisionIndex.placeCollisionBox(Df(Fe,jr.x,jr.y,Yt,tr,this.transform.angle),qr,Pt,jt,hr.predicate);if(Xr){var Bn=this.collisionIndex.placeCollisionBox(Df(Xr,jr.x,jr.y,Yt,tr,this.transform.angle),qr,Pt,jt,hr.predicate);if(Bn.box.length===0)return}if(Br.box.length>0){var ui;return this.prevPlacement&&this.prevPlacement.variableOffsets[zr.crossTileID]&&this.prevPlacement.placements[zr.crossTileID]&&this.prevPlacement.placements[zr.crossTileID].text&&(ui=this.prevPlacement.variableOffsets[zr.crossTileID].anchor),this.variableOffsets[zr.crossTileID]={textOffset:Rr,width:me,height:We,anchor:ne,textBoxScale:At,prevAnchor:ui},this.markUsedJustification(Gr,ne,zr,en),Gr.allowVerticalPlacement&&(this.markUsedOrientation(Gr,en,zr),this.placedOrientations[zr.crossTileID]=en),{shift:jr,placedGlyphBoxes:Br}}},Sc.prototype.placeLayerBucketPart=function(ne,Fe,me){var We=this,At=ne.parameters,Yt=At.bucket,tr=At.layout,Pt=At.posMatrix,jt=At.textLabelPlaneMatrix,hr=At.labelToScreenMatrix,qr=At.textPixelRatio,zr=At.holdingForFade,Gr=At.collisionBoxArray,en=At.partiallyEvaluatedTextSize,Xr=At.collisionGroup,Rr=tr.get("text-optional"),jr=tr.get("icon-optional"),Br=tr.get("text-allow-overlap"),Bn=tr.get("icon-allow-overlap"),ui=tr.get("text-rotation-alignment")==="map",Ii=tr.get("text-pitch-alignment")==="map",Ga=tr.get("icon-text-fit")!=="none",ka=tr.get("symbol-z-order")==="viewport-y",wa=Br&&(Bn||!Yt.hasIconData()||jr),$a=Bn&&(Br||!Yt.hasTextData()||Rr);!Yt.collisionArrays&&Gr&&Yt.deserializeCollisionBoxes(Gr);var Ja=function(Qs,cc){if(!Fe[Qs.crossTileID]){if(zr){We.placements[Qs.crossTileID]=new mc(!1,!1,!1);return}var ac=!1,yf=!1,ff=!0,_f=null,bf={box:null,offscreen:null},hp={box:null},af=null,ch=null,Ig=null,R0=0,Tw=0,Ew=0;cc.textFeatureIndex?R0=cc.textFeatureIndex:Qs.useRuntimeCollisionCircles&&(R0=Qs.featureIndex),cc.verticalTextFeatureIndex&&(Tw=cc.verticalTextFeatureIndex);var ex=cc.textBox;if(ex){var A2=function(Cm){var Bp=l.WritingMode.horizontal;if(Yt.allowVerticalPlacement&&!Cm&&We.prevPlacement){var nx=We.prevPlacement.placedOrientations[Qs.crossTileID];nx&&(We.placedOrientations[Qs.crossTileID]=nx,Bp=nx,We.markUsedOrientation(Yt,Bp,Qs))}return Bp},uC=function(Cm,Bp){if(Yt.allowVerticalPlacement&&Qs.numVerticalGlyphVertices>0&&cc.verticalTextBox)for(var nx=0,HR=Yt.writingModes;nx<HR.length;nx+=1){var FI=HR[nx];if(FI===l.WritingMode.vertical?(bf=Bp(),hp=bf):bf=Cm(),bf&&bf.box&&bf.box.length)break}else bf=Cm()};if(tr.get("text-variable-anchor")){var zx=tr.get("text-variable-anchor");if(We.prevPlacement&&We.prevPlacement.variableOffsets[Qs.crossTileID]){var rx=We.prevPlacement.variableOffsets[Qs.crossTileID];zx.indexOf(rx.anchor)>0&&(zx=zx.filter(function(Cm){return Cm!==rx.anchor}),zx.unshift(rx.anchor))}var Aw=function(Cm,Bp,nx){for(var HR=Cm.x2-Cm.x1,FI=Cm.y2-Cm.y1,gv=Qs.textBoxScale,X4=Ga&&!Bn?Bp:null,ZM={box:[],offscreen:!1},P6=Br?zx.length*2:zx.length,Mw=0;Mw<P6;++Mw){var KM=zx[Mw%zx.length],D6=Mw>=zx.length,Z4=We.attemptAnchorPlacement(KM,Cm,HR,FI,gv,ui,Ii,qr,Pt,Xr,D6,Qs,Yt,nx,X4);if(Z4&&(ZM=Z4.placedGlyphBoxes,ZM&&ZM.box&&ZM.box.length)){ac=!0,_f=Z4.shift;break}}return ZM},C2=function(){return Aw(ex,cc.iconBox,l.WritingMode.horizontal)},Cw=function(){var Cm=cc.verticalTextBox,Bp=bf&&bf.box&&bf.box.length;return Yt.allowVerticalPlacement&&!Bp&&Qs.numVerticalGlyphVertices>0&&Cm?Aw(Cm,cc.verticalIconBox,l.WritingMode.vertical):{box:null,offscreen:null}};uC(C2,Cw),bf&&(ac=bf.box,ff=bf.offscreen);var zR=A2(bf&&bf.box);if(!ac&&We.prevPlacement){var cC=We.prevPlacement.variableOffsets[Qs.crossTileID];cC&&(We.variableOffsets[Qs.crossTileID]=cC,We.markUsedJustification(Yt,cC.anchor,Qs,zR))}}else{var RS=function(Cm,Bp){var nx=We.collisionIndex.placeCollisionBox(Cm,Br,qr,Pt,Xr.predicate);return nx&&nx.box&&nx.box.length&&(We.markUsedOrientation(Yt,Bp,Qs),We.placedOrientations[Qs.crossTileID]=Bp),nx},tx=function(){return RS(ex,l.WritingMode.horizontal)},kS=function(){var Cm=cc.verticalTextBox;return Yt.allowVerticalPlacement&&Qs.numVerticalGlyphVertices>0&&Cm?RS(Cm,l.WritingMode.vertical):{box:null,offscreen:null}};uC(tx,kS),A2(bf&&bf.box&&bf.box.length)}}if(af=bf,ac=af&&af.box&&af.box.length>0,ff=af&&af.offscreen,Qs.useRuntimeCollisionCircles){var Dy=Yt.text.placedSymbolArray.get(Qs.centerJustifiedTextSymbolIndex),fC=l.evaluateSizeForFeature(Yt.textSizeData,en,Dy),BR=tr.get("text-padding"),j1=Qs.collisionCircleDiameter;ch=We.collisionIndex.placeCollisionCircles(Br,Dy,Yt.lineVertexArray,Yt.glyphOffsetArray,fC,Pt,jt,hr,me,Ii,Xr.predicate,j1,BR),ac=Br||ch.circles.length>0&&!ch.collisionDetected,ff=ff&&ch.offscreen}if(cc.iconFeatureIndex&&(Ew=cc.iconFeatureIndex),cc.iconBox){var WM=function(Cm){var Bp=Ga&&_f?Df(Cm,_f.x,_f.y,ui,Ii,We.transform.angle):Cm;return We.collisionIndex.placeCollisionBox(Bp,Bn,qr,Pt,Xr.predicate)};hp&&hp.box&&hp.box.length&&cc.verticalIconBox?(Ig=WM(cc.verticalIconBox),yf=Ig.box.length>0):(Ig=WM(cc.iconBox),yf=Ig.box.length>0),ff=ff&&Ig.offscreen}var OI=Rr||Qs.numHorizontalGlyphVertices===0&&Qs.numVerticalGlyphVertices===0,NI=jr||Qs.numIconVertices===0;if(!OI&&!NI?yf=ac=yf&&ac:NI?OI||(yf=yf&&ac):ac=yf&&ac,ac&&af&&af.box&&(hp&&hp.box&&Tw?We.collisionIndex.insertCollisionBox(af.box,tr.get("text-ignore-placement"),Yt.bucketInstanceId,Tw,Xr.ID):We.collisionIndex.insertCollisionBox(af.box,tr.get("text-ignore-placement"),Yt.bucketInstanceId,R0,Xr.ID)),yf&&Ig&&We.collisionIndex.insertCollisionBox(Ig.box,tr.get("icon-ignore-placement"),Yt.bucketInstanceId,Ew,Xr.ID),ch&&(ac&&We.collisionIndex.insertCollisionCircles(ch.circles,tr.get("text-ignore-placement"),Yt.bucketInstanceId,R0,Xr.ID),me)){var UR=Yt.bucketInstanceId,YM=We.collisionCircleArrays[UR];YM===void 0&&(YM=We.collisionCircleArrays[UR]=new xu);for(var XM=0;XM<ch.circles.length;XM+=4)YM.circles.push(ch.circles[XM+0]),YM.circles.push(ch.circles[XM+1]),YM.circles.push(ch.circles[XM+2]),YM.circles.push(ch.collisionDetected?1:0)}We.placements[Qs.crossTileID]=new mc(ac||wa,yf||$a,ff||Yt.justReloaded),Fe[Qs.crossTileID]=!0}};if(ka)for(var wo=Yt.getSortedSymbolIndexes(this.transform.angle),Ya=wo.length-1;Ya>=0;--Ya){var Ro=wo[Ya];Ja(Yt.symbolInstances.get(Ro),Yt.collisionArrays[Ro])}else for(var Xo=ne.symbolInstanceStart;Xo<ne.symbolInstanceEnd;Xo++)Ja(Yt.symbolInstances.get(Xo),Yt.collisionArrays[Xo]);if(me&&Yt.bucketInstanceId in this.collisionCircleArrays){var Rs=this.collisionCircleArrays[Yt.bucketInstanceId];l.invert(Rs.invProjMatrix,Pt),Rs.viewportMatrix=this.collisionIndex.getViewportMatrix()}Yt.justReloaded=!1},Sc.prototype.markUsedJustification=function(ne,Fe,me,We){var At={left:me.leftJustifiedTextSymbolIndex,center:me.centerJustifiedTextSymbolIndex,right:me.rightJustifiedTextSymbolIndex},Yt;We===l.WritingMode.vertical?Yt=me.verticalPlacedTextSymbolIndex:Yt=At[l.getAnchorJustification(Fe)];for(var tr=[me.leftJustifiedTextSymbolIndex,me.centerJustifiedTextSymbolIndex,me.rightJustifiedTextSymbolIndex,me.verticalPlacedTextSymbolIndex],Pt=0,jt=tr;Pt<jt.length;Pt+=1){var hr=jt[Pt];hr>=0&&(Yt>=0&&hr!==Yt?ne.text.placedSymbolArray.get(hr).crossTileID=0:ne.text.placedSymbolArray.get(hr).crossTileID=me.crossTileID)}},Sc.prototype.markUsedOrientation=function(ne,Fe,me){for(var We=Fe===l.WritingMode.horizontal||Fe===l.WritingMode.horizontalOnly?Fe:0,At=Fe===l.WritingMode.vertical?Fe:0,Yt=[me.leftJustifiedTextSymbolIndex,me.centerJustifiedTextSymbolIndex,me.rightJustifiedTextSymbolIndex],tr=0,Pt=Yt;tr<Pt.length;tr+=1){var jt=Pt[tr];ne.text.placedSymbolArray.get(jt).placedOrientation=We}me.verticalPlacedTextSymbolIndex&&(ne.text.placedSymbolArray.get(me.verticalPlacedTextSymbolIndex).placedOrientation=At)},Sc.prototype.commit=function(ne){this.commitTime=ne,this.zoomAtLastRecencyCheck=this.transform.zoom;var Fe=this.prevPlacement,me=!1;this.prevZoomAdjustment=Fe?Fe.zoomAdjustment(this.transform.zoom):0;var We=Fe?Fe.symbolFadeChange(ne):1,At=Fe?Fe.opacities:{},Yt=Fe?Fe.variableOffsets:{},tr=Fe?Fe.placedOrientations:{};for(var Pt in this.placements){var jt=this.placements[Pt],hr=At[Pt];hr?(this.opacities[Pt]=new wc(hr,We,jt.text,jt.icon),me=me||jt.text!==hr.text.placed||jt.icon!==hr.icon.placed):(this.opacities[Pt]=new wc(null,We,jt.text,jt.icon,jt.skipFade),me=me||jt.text||jt.icon)}for(var qr in At){var zr=At[qr];if(!this.opacities[qr]){var Gr=new wc(zr,We,!1,!1);Gr.isHidden()||(this.opacities[qr]=Gr,me=me||zr.text.placed||zr.icon.placed)}}for(var en in Yt)!this.variableOffsets[en]&&this.opacities[en]&&!this.opacities[en].isHidden()&&(this.variableOffsets[en]=Yt[en]);for(var Xr in tr)!this.placedOrientations[Xr]&&this.opacities[Xr]&&!this.opacities[Xr].isHidden()&&(this.placedOrientations[Xr]=tr[Xr]);me?this.lastPlacementChangeTime=ne:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=Fe?Fe.lastPlacementChangeTime:ne)},Sc.prototype.updateLayerOpacities=function(ne,Fe){for(var me={},We=0,At=Fe;We<At.length;We+=1){var Yt=At[We],tr=Yt.getBucket(ne);tr&&Yt.latestFeatureIndex&&ne.id===tr.layerIds[0]&&this.updateBucketOpacities(tr,me,Yt.collisionBoxArray)}},Sc.prototype.updateBucketOpacities=function(ne,Fe,me){var We=this;ne.hasTextData()&&ne.text.opacityVertexArray.clear(),ne.hasIconData()&&ne.icon.opacityVertexArray.clear(),ne.hasIconCollisionBoxData()&&ne.iconCollisionBox.collisionVertexArray.clear(),ne.hasTextCollisionBoxData()&&ne.textCollisionBox.collisionVertexArray.clear();var At=ne.layers[0].layout,Yt=new wc(null,0,!1,!1,!0),tr=At.get("text-allow-overlap"),Pt=At.get("icon-allow-overlap"),jt=At.get("text-variable-anchor"),hr=At.get("text-rotation-alignment")==="map",qr=At.get("text-pitch-alignment")==="map",zr=At.get("icon-text-fit")!=="none",Gr=new wc(null,0,tr&&(Pt||!ne.hasIconData()||At.get("icon-optional")),Pt&&(tr||!ne.hasTextData()||At.get("text-optional")),!0);!ne.collisionArrays&&me&&(ne.hasIconCollisionBoxData()||ne.hasTextCollisionBoxData())&&ne.deserializeCollisionBoxes(me);for(var en=function(Br,Bn,ui){for(var Ii=0;Ii<Bn/4;Ii++)Br.opacityVertexArray.emplaceBack(ui)},Xr=function(Br){var Bn=ne.symbolInstances.get(Br),ui=Bn.numHorizontalGlyphVertices,Ii=Bn.numVerticalGlyphVertices,Ga=Bn.crossTileID,ka=Fe[Ga],wa=We.opacities[Ga];ka?wa=Yt:wa||(wa=Gr,We.opacities[Ga]=wa),Fe[Ga]=!0;var $a=ui>0||Ii>0,Ja=Bn.numIconVertices>0,wo=We.placedOrientations[Bn.crossTileID],Ya=wo===l.WritingMode.vertical,Ro=wo===l.WritingMode.horizontal||wo===l.WritingMode.horizontalOnly;if($a){var Xo=Cd(wa.text),Rs=Ya?Tl:Xo;en(ne.text,ui,Rs);var Qs=Ro?Tl:Xo;en(ne.text,Ii,Qs);var cc=wa.text.isHidden();[Bn.rightJustifiedTextSymbolIndex,Bn.centerJustifiedTextSymbolIndex,Bn.leftJustifiedTextSymbolIndex].forEach(function(Ew){Ew>=0&&(ne.text.placedSymbolArray.get(Ew).hidden=cc||Ya?1:0)}),Bn.verticalPlacedTextSymbolIndex>=0&&(ne.text.placedSymbolArray.get(Bn.verticalPlacedTextSymbolIndex).hidden=cc||Ro?1:0);var ac=We.variableOffsets[Bn.crossTileID];ac&&We.markUsedJustification(ne,ac.anchor,Bn,wo);var yf=We.placedOrientations[Bn.crossTileID];yf&&(We.markUsedJustification(ne,"left",Bn,yf),We.markUsedOrientation(ne,yf,Bn))}if(Ja){var ff=Cd(wa.icon),_f=!(zr&&Bn.verticalPlacedIconSymbolIndex&&Ya);if(Bn.placedIconSymbolIndex>=0){var bf=_f?ff:Tl;en(ne.icon,Bn.numIconVertices,bf),ne.icon.placedSymbolArray.get(Bn.placedIconSymbolIndex).hidden=wa.icon.isHidden()}if(Bn.verticalPlacedIconSymbolIndex>=0){var hp=_f?Tl:ff;en(ne.icon,Bn.numVerticalIconVertices,hp),ne.icon.placedSymbolArray.get(Bn.verticalPlacedIconSymbolIndex).hidden=wa.icon.isHidden()}}if(ne.hasIconCollisionBoxData()||ne.hasTextCollisionBoxData()){var af=ne.collisionArrays[Br];if(af){var ch=new l.Point(0,0);if(af.textBox||af.verticalTextBox){var Ig=!0;if(jt){var R0=We.variableOffsets[Ga];R0?(ch=ed(R0.anchor,R0.width,R0.height,R0.textOffset,R0.textBoxScale),hr&&ch._rotate(qr?We.transform.angle:-We.transform.angle)):Ig=!1}af.textBox&&Qo(ne.textCollisionBox.collisionVertexArray,wa.text.placed,!Ig||Ya,ch.x,ch.y),af.verticalTextBox&&Qo(ne.textCollisionBox.collisionVertexArray,wa.text.placed,!Ig||Ro,ch.x,ch.y)}var Tw=!!(!Ro&&af.verticalIconBox);af.iconBox&&Qo(ne.iconCollisionBox.collisionVertexArray,wa.icon.placed,Tw,zr?ch.x:0,zr?ch.y:0),af.verticalIconBox&&Qo(ne.iconCollisionBox.collisionVertexArray,wa.icon.placed,!Tw,zr?ch.x:0,zr?ch.y:0)}}},Rr=0;Rr<ne.symbolInstances.length;Rr++)Xr(Rr);if(ne.sortFeatures(this.transform.angle),this.retainedQueryData[ne.bucketInstanceId]&&(this.retainedQueryData[ne.bucketInstanceId].featureSortOrder=ne.featureSortOrder),ne.hasTextData()&&ne.text.opacityVertexBuffer&&ne.text.opacityVertexBuffer.updateData(ne.text.opacityVertexArray),ne.hasIconData()&&ne.icon.opacityVertexBuffer&&ne.icon.opacityVertexBuffer.updateData(ne.icon.opacityVertexArray),ne.hasIconCollisionBoxData()&&ne.iconCollisionBox.collisionVertexBuffer&&ne.iconCollisionBox.collisionVertexBuffer.updateData(ne.iconCollisionBox.collisionVertexArray),ne.hasTextCollisionBoxData()&&ne.textCollisionBox.collisionVertexBuffer&&ne.textCollisionBox.collisionVertexBuffer.updateData(ne.textCollisionBox.collisionVertexArray),ne.bucketInstanceId in this.collisionCircleArrays){var jr=this.collisionCircleArrays[ne.bucketInstanceId];ne.placementInvProjMatrix=jr.invProjMatrix,ne.placementViewportMatrix=jr.viewportMatrix,ne.collisionCircleArray=jr.circles,delete this.collisionCircleArrays[ne.bucketInstanceId]}},Sc.prototype.symbolFadeChange=function(ne){return this.fadeDuration===0?1:(ne-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment},Sc.prototype.zoomAdjustment=function(ne){return Math.max(0,(this.transform.zoom-ne)/1.5)},Sc.prototype.hasTransitions=function(ne){return this.stale||ne-this.lastPlacementChangeTime<this.fadeDuration},Sc.prototype.stillRecent=function(ne,Fe){var me=this.zoomAtLastRecencyCheck===Fe?1-this.zoomAdjustment(Fe):1;return this.zoomAtLastRecencyCheck=Fe,this.commitTime+this.fadeDuration*me>ne},Sc.prototype.setStale=function(){this.stale=!0};function Qo(Xe,ne,Fe,me,We){Xe.emplaceBack(ne?1:0,Fe?1:0,me||0,We||0),Xe.emplaceBack(ne?1:0,Fe?1:0,me||0,We||0),Xe.emplaceBack(ne?1:0,Fe?1:0,me||0,We||0),Xe.emplaceBack(ne?1:0,Fe?1:0,me||0,We||0)}var Sl=Math.pow(2,25),gd=Math.pow(2,24),$f=Math.pow(2,17),wu=Math.pow(2,16),Ad=Math.pow(2,9),Bc=Math.pow(2,8),uf=Math.pow(2,1);function Cd(Xe){if(Xe.opacity===0&&!Xe.placed)return 0;if(Xe.opacity===1&&Xe.placed)return 4294967295;var ne=Xe.placed?1:0,Fe=Math.floor(Xe.opacity*127);return Fe*Sl+ne*gd+Fe*$f+ne*wu+Fe*Ad+ne*Bc+Fe*uf+ne}var Tl=0,Xu=function(ne){this._sortAcrossTiles=ne.layout.get("symbol-z-order")!=="viewport-y"&&ne.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Xu.prototype.continuePlacement=function(ne,Fe,me,We,At){for(var Yt=this._bucketParts;this._currentTileIndex<ne.length;){var tr=ne[this._currentTileIndex];if(Fe.getBucketParts(Yt,We,tr,this._sortAcrossTiles),this._currentTileIndex++,At())return!0}for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,Yt.sort(function(jt,hr){return jt.sortKey-hr.sortKey}));this._currentPartIndex<Yt.length;){var Pt=Yt[this._currentPartIndex];if(Fe.placeLayerBucketPart(Pt,this._seenCrossTileIDs,me),this._currentPartIndex++,At())return!0}return!1};var pu=function(ne,Fe,me,We,At,Yt,tr){this.placement=new Sc(ne,At,Yt,tr),this._currentPlacementIndex=Fe.length-1,this._forceFullPlacement=me,this._showCollisionBoxes=We,this._done=!1};pu.prototype.isDone=function(){return this._done},pu.prototype.continuePlacement=function(ne,Fe,me){for(var We=this,At=l.browser.now(),Yt=function(){var qr=l.browser.now()-At;return We._forceFullPlacement?!1:qr>2};this._currentPlacementIndex>=0;){var tr=ne[this._currentPlacementIndex],Pt=Fe[tr],jt=this.placement.collisionIndex.transform.zoom;if(Pt.type==="symbol"&&(!Pt.minzoom||Pt.minzoom<=jt)&&(!Pt.maxzoom||Pt.maxzoom>jt)){this._inProgressLayer||(this._inProgressLayer=new Xu(Pt));var hr=this._inProgressLayer.continuePlacement(me[Pt.source],this.placement,this._showCollisionBoxes,Pt,Yt);if(hr)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},pu.prototype.commit=function(ne){return this.placement.commit(ne),this.placement};var Zc=512/l.EXTENT/2,Md=function(ne,Fe,me){this.tileID=ne,this.indexedSymbolInstances={},this.bucketInstanceId=me;for(var We=0;We<Fe.length;We++){var At=Fe.get(We),Yt=At.key;this.indexedSymbolInstances[Yt]||(this.indexedSymbolInstances[Yt]=[]),this.indexedSymbolInstances[Yt].push({crossTileID:At.crossTileID,coord:this.getScaledCoordinates(At,ne)})}};Md.prototype.getScaledCoordinates=function(ne,Fe){var me=Fe.canonical.z-this.tileID.canonical.z,We=Zc/Math.pow(2,me);return{x:Math.floor((Fe.canonical.x*l.EXTENT+ne.anchorX)*We),y:Math.floor((Fe.canonical.y*l.EXTENT+ne.anchorY)*We)}},Md.prototype.findMatches=function(ne,Fe,me){for(var We=this.tileID.canonical.z<Fe.canonical.z?1:Math.pow(2,this.tileID.canonical.z-Fe.canonical.z),At=0;At<ne.length;At++){var Yt=ne.get(At);if(!Yt.crossTileID){var tr=this.indexedSymbolInstances[Yt.key];if(tr)for(var Pt=this.getScaledCoordinates(Yt,Fe),jt=0,hr=tr;jt<hr.length;jt+=1){var qr=hr[jt];if(Math.abs(qr.coord.x-Pt.x)<=We&&Math.abs(qr.coord.y-Pt.y)<=We&&!me[qr.crossTileID]){me[qr.crossTileID]=!0,Yt.crossTileID=qr.crossTileID;break}}}}};var uu=function(){this.maxCrossTileID=0};uu.prototype.generate=function(){return++this.maxCrossTileID};var Lf=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0};Lf.prototype.handleWrapJump=function(ne){var Fe=Math.round((ne-this.lng)/360);if(Fe!==0)for(var me in this.indexes){var We=this.indexes[me],At={};for(var Yt in We){var tr=We[Yt];tr.tileID=tr.tileID.unwrapTo(tr.tileID.wrap+Fe),At[tr.tileID.key]=tr}this.indexes[me]=At}this.lng=ne},Lf.prototype.addBucket=function(ne,Fe,me){if(this.indexes[ne.overscaledZ]&&this.indexes[ne.overscaledZ][ne.key]){if(this.indexes[ne.overscaledZ][ne.key].bucketInstanceId===Fe.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(ne.overscaledZ,this.indexes[ne.overscaledZ][ne.key])}for(var We=0;We<Fe.symbolInstances.length;We++){var At=Fe.symbolInstances.get(We);At.crossTileID=0}this.usedCrossTileIDs[ne.overscaledZ]||(this.usedCrossTileIDs[ne.overscaledZ]={});var Yt=this.usedCrossTileIDs[ne.overscaledZ];for(var tr in this.indexes){var Pt=this.indexes[tr];if(Number(tr)>ne.overscaledZ)for(var jt in Pt){var hr=Pt[jt];hr.tileID.isChildOf(ne)&&hr.findMatches(Fe.symbolInstances,ne,Yt)}else{var qr=ne.scaledTo(Number(tr)),zr=Pt[qr.key];zr&&zr.findMatches(Fe.symbolInstances,ne,Yt)}}for(var Gr=0;Gr<Fe.symbolInstances.length;Gr++){var en=Fe.symbolInstances.get(Gr);en.crossTileID||(en.crossTileID=me.generate(),Yt[en.crossTileID]=!0)}return this.indexes[ne.overscaledZ]===void 0&&(this.indexes[ne.overscaledZ]={}),this.indexes[ne.overscaledZ][ne.key]=new Md(ne,Fe.symbolInstances,Fe.bucketInstanceId),!0},Lf.prototype.removeBucketCrossTileIDs=function(ne,Fe){for(var me in Fe.indexedSymbolInstances)for(var We=0,At=Fe.indexedSymbolInstances[me];We<At.length;We+=1){var Yt=At[We];delete this.usedCrossTileIDs[ne][Yt.crossTileID]}},Lf.prototype.removeStaleBuckets=function(ne){var Fe=!1;for(var me in this.indexes){var We=this.indexes[me];for(var At in We)ne[We[At].bucketInstanceId]||(this.removeBucketCrossTileIDs(me,We[At]),delete We[At],Fe=!0)}return Fe};var op=function(){this.layerIndexes={},this.crossTileIDs=new uu,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};op.prototype.addLayer=function(ne,Fe,me){var We=this.layerIndexes[ne.id];We===void 0&&(We=this.layerIndexes[ne.id]=new Lf);var At=!1,Yt={};We.handleWrapJump(me);for(var tr=0,Pt=Fe;tr<Pt.length;tr+=1){var jt=Pt[tr],hr=jt.getBucket(ne);!hr||ne.id!==hr.layerIds[0]||(hr.bucketInstanceId||(hr.bucketInstanceId=++this.maxBucketInstanceId),We.addBucket(jt.tileID,hr,this.crossTileIDs)&&(At=!0),Yt[hr.bucketInstanceId]=!0)}return We.removeStaleBuckets(Yt)&&(At=!0),At},op.prototype.pruneUnusedLayers=function(ne){var Fe={};ne.forEach(function(We){Fe[We]=!0});for(var me in this.layerIndexes)Fe[me]||delete this.layerIndexes[me]};var zd=function(Xe,ne){return l.emitValidationErrors(Xe,ne&&ne.filter(function(Fe){return Fe.identifier!=="source.canvas"}))},Qp=l.pick(_i,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),hh=l.pick(_i,["setCenter","setZoom","setBearing","setPitch"]),td=pi(),ev=(function(Xe){function ne(Fe,me){var We=this;me===void 0&&(me={}),Xe.call(this),this.map=Fe,this.dispatcher=new Q(er(),this),this.imageManager=new C,this.imageManager.setEventedParent(this),this.glyphManager=new S(Fe._requestManager,me.localIdeographFontFamily),this.lineAtlas=new K(256,512),this.crossTileSymbolIndex=new op,this._layers={},this._serializedLayers={},this._order=[],this.sourceCaches={},this.zoomHistory=new l.ZoomHistory,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("setReferrer",l.getReferrer());var At=this;this._rtlTextPluginCallback=ne.registerForPluginStateChange(function(Yt){var tr={pluginStatus:Yt.pluginStatus,pluginURL:Yt.pluginURL};At.dispatcher.broadcast("syncRTLPluginState",tr,function(Pt,jt){if(l.triggerPluginCompletionEvent(Pt),jt){var hr=jt.every(function(zr){return zr});if(hr)for(var qr in At.sourceCaches)At.sourceCaches[qr].reload()}})}),this.on("data",function(Yt){if(!(Yt.dataType!=="source"||Yt.sourceDataType!=="metadata")){var tr=We.sourceCaches[Yt.sourceId];if(tr){var Pt=tr.getSource();if(!(!Pt||!Pt.vectorLayerIds))for(var jt in We._layers){var hr=We._layers[jt];hr.source===Pt.id&&We._validateLayer(hr)}}}})}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.loadURL=function(me,We){var At=this;We===void 0&&(We={}),this.fire(new l.Event("dataloading",{dataType:"style"}));var Yt=typeof We.validate=="boolean"?We.validate:!l.isMapboxURL(me);me=this.map._requestManager.normalizeStyleURL(me,We.accessToken);var tr=this.map._requestManager.transformRequest(me,l.ResourceType.Style);this._request=l.getJSON(tr,function(Pt,jt){At._request=null,Pt?At.fire(new l.ErrorEvent(Pt)):jt&&At._load(jt,Yt)})},ne.prototype.loadJSON=function(me,We){var At=this;We===void 0&&(We={}),this.fire(new l.Event("dataloading",{dataType:"style"})),this._request=l.browser.frame(function(){At._request=null,At._load(me,We.validate!==!1)})},ne.prototype.loadEmpty=function(){this.fire(new l.Event("dataloading",{dataType:"style"})),this._load(td,!1)},ne.prototype._load=function(me,We){if(!(We&&zd(this,l.validateStyle(me)))){this._loaded=!0,this.stylesheet=me;for(var At in me.sources)this.addSource(At,me.sources[At],{validate:!1});me.sprite?this._loadSprite(me.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(me.glyphs);var Yt=qn(this.stylesheet.layers);this._order=Yt.map(function(hr){return hr.id}),this._layers={},this._serializedLayers={};for(var tr=0,Pt=Yt;tr<Pt.length;tr+=1){var jt=Pt[tr];jt=l.createStyleLayer(jt),jt.setEventedParent(this,{layer:{id:jt.id}}),this._layers[jt.id]=jt,this._serializedLayers[jt.id]=jt.serialize()}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new Z(this.stylesheet.light),this.fire(new l.Event("data",{dataType:"style"})),this.fire(new l.Event("style.load"))}},ne.prototype._loadSprite=function(me){var We=this;this._spriteRequest=E(me,this.map._requestManager,function(At,Yt){if(We._spriteRequest=null,At)We.fire(new l.ErrorEvent(At));else if(Yt)for(var tr in Yt)We.imageManager.addImage(tr,Yt[tr]);We.imageManager.setLoaded(!0),We._availableImages=We.imageManager.listImages(),We.dispatcher.broadcast("setImages",We._availableImages),We.fire(new l.Event("data",{dataType:"style"}))})},ne.prototype._validateLayer=function(me){var We=this.sourceCaches[me.source];if(We){var At=me.sourceLayer;if(At){var Yt=We.getSource();(Yt.type==="geojson"||Yt.vectorLayerIds&&Yt.vectorLayerIds.indexOf(At)===-1)&&this.fire(new l.ErrorEvent(new Error('Source layer "'+At+'" does not exist on source "'+Yt.id+'" as specified by style layer "'+me.id+'"')))}}},ne.prototype.loaded=function(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(var me in this.sourceCaches)if(!this.sourceCaches[me].loaded())return!1;return!!this.imageManager.isLoaded()},ne.prototype._serializeLayers=function(me){for(var We=[],At=0,Yt=me;At<Yt.length;At+=1){var tr=Yt[At],Pt=this._layers[tr];Pt.type!=="custom"&&We.push(Pt.serialize())}return We},ne.prototype.hasTransitions=function(){if(this.light&&this.light.hasTransition())return!0;for(var me in this.sourceCaches)if(this.sourceCaches[me].hasTransition())return!0;for(var We in this._layers)if(this._layers[We].hasTransition())return!0;return!1},ne.prototype._checkLoaded=function(){if(!this._loaded)throw new Error("Style is not done loading")},ne.prototype.update=function(me){if(this._loaded){var We=this._changed;if(this._changed){var At=Object.keys(this._updatedLayers),Yt=Object.keys(this._removedLayers);(At.length||Yt.length)&&this._updateWorkerLayers(At,Yt);for(var tr in this._updatedSources){var Pt=this._updatedSources[tr];Pt==="reload"?this._reloadSource(tr):Pt==="clear"&&this._clearSource(tr)}this._updateTilesForChangedImages();for(var jt in this._updatedPaintProps)this._layers[jt].updateTransitions(me);this.light.updateTransitions(me),this._resetUpdates()}var hr={};for(var qr in this.sourceCaches){var zr=this.sourceCaches[qr];hr[qr]=zr.used,zr.used=!1}for(var Gr=0,en=this._order;Gr<en.length;Gr+=1){var Xr=en[Gr],Rr=this._layers[Xr];Rr.recalculate(me,this._availableImages),!Rr.isHidden(me.zoom)&&Rr.source&&(this.sourceCaches[Rr.source].used=!0)}for(var jr in hr){var Br=this.sourceCaches[jr];hr[jr]!==Br.used&&Br.fire(new l.Event("data",{sourceDataType:"visibility",dataType:"source",sourceId:jr}))}this.light.recalculate(me),this.z=me.zoom,We&&this.fire(new l.Event("data",{dataType:"style"}))}},ne.prototype._updateTilesForChangedImages=function(){var me=Object.keys(this._changedImages);if(me.length){for(var We in this.sourceCaches)this.sourceCaches[We].reloadTilesForDependencies(["icons","patterns"],me);this._changedImages={}}},ne.prototype._updateWorkerLayers=function(me,We){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(me),removedIds:We})},ne.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}},ne.prototype.setState=function(me){var We=this;if(this._checkLoaded(),zd(this,l.validateStyle(me)))return!1;me=l.clone$1(me),me.layers=qn(me.layers);var At=Ca(this.serialize(),me).filter(function(tr){return!(tr.command in hh)});if(At.length===0)return!1;var Yt=At.filter(function(tr){return!(tr.command in Qp)});if(Yt.length>0)throw new Error("Unimplemented: "+Yt.map(function(tr){return tr.command}).join(", ")+".");return At.forEach(function(tr){tr.command!=="setTransition"&&We[tr.command].apply(We,tr.args)}),this.stylesheet=me,!0},ne.prototype.addImage=function(me,We){if(this.getImage(me))return this.fire(new l.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(me,We),this._afterImageUpdated(me)},ne.prototype.updateImage=function(me,We){this.imageManager.updateImage(me,We)},ne.prototype.getImage=function(me){return this.imageManager.getImage(me)},ne.prototype.removeImage=function(me){if(!this.getImage(me))return this.fire(new l.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(me),this._afterImageUpdated(me)},ne.prototype._afterImageUpdated=function(me){this._availableImages=this.imageManager.listImages(),this._changedImages[me]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new l.Event("data",{dataType:"style"}))},ne.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},ne.prototype.addSource=function(me,We,At){var Yt=this;if(At===void 0&&(At={}),this._checkLoaded(),this.sourceCaches[me]!==void 0)throw new Error("There is already a source with this ID");if(!We.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(We).join(", ")+".");var tr=["vector","raster","geojson","video","image"],Pt=tr.indexOf(We.type)>=0;if(!(Pt&&this._validate(l.validateStyle.source,"sources."+me,We,null,At))){this.map&&this.map._collectResourceTiming&&(We.collectResourceTiming=!0);var jt=this.sourceCaches[me]=new aa(me,We,this.dispatcher);jt.style=this,jt.setEventedParent(this,function(){return{isSourceLoaded:Yt.loaded(),source:jt.serialize(),sourceId:me}}),jt.onAdd(this.map),this._changed=!0}},ne.prototype.removeSource=function(me){if(this._checkLoaded(),this.sourceCaches[me]===void 0)throw new Error("There is no source with this ID");for(var We in this._layers)if(this._layers[We].source===me)return this.fire(new l.ErrorEvent(new Error('Source "'+me+'" cannot be removed while layer "'+We+'" is using it.')));var At=this.sourceCaches[me];delete this.sourceCaches[me],delete this._updatedSources[me],At.fire(new l.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:me})),At.setEventedParent(null),At.clearTiles(),At.onRemove&&At.onRemove(this.map),this._changed=!0},ne.prototype.setGeoJSONSourceData=function(me,We){this._checkLoaded();var At=this.sourceCaches[me].getSource();At.setData(We),this._changed=!0},ne.prototype.getSource=function(me){return this.sourceCaches[me]&&this.sourceCaches[me].getSource()},ne.prototype.addLayer=function(me,We,At){At===void 0&&(At={}),this._checkLoaded();var Yt=me.id;if(this.getLayer(Yt)){this.fire(new l.ErrorEvent(new Error('Layer with id "'+Yt+'" already exists on this map')));return}var tr;if(me.type==="custom"){if(zd(this,l.validateCustomStyleLayer(me)))return;tr=l.createStyleLayer(me)}else{if(typeof me.source=="object"&&(this.addSource(Yt,me.source),me=l.clone$1(me),me=l.extend(me,{source:Yt})),this._validate(l.validateStyle.layer,"layers."+Yt,me,{arrayIndex:-1},At))return;tr=l.createStyleLayer(me),this._validateLayer(tr),tr.setEventedParent(this,{layer:{id:Yt}}),this._serializedLayers[tr.id]=tr.serialize()}var Pt=We?this._order.indexOf(We):this._order.length;if(We&&Pt===-1){this.fire(new l.ErrorEvent(new Error('Layer with id "'+We+'" does not exist on this map.')));return}if(this._order.splice(Pt,0,Yt),this._layerOrderChanged=!0,this._layers[Yt]=tr,this._removedLayers[Yt]&&tr.source&&tr.type!=="custom"){var jt=this._removedLayers[Yt];delete this._removedLayers[Yt],jt.type!==tr.type?this._updatedSources[tr.source]="clear":(this._updatedSources[tr.source]="reload",this.sourceCaches[tr.source].pause())}this._updateLayer(tr),tr.onAdd&&tr.onAdd(this.map)},ne.prototype.moveLayer=function(me,We){this._checkLoaded(),this._changed=!0;var At=this._layers[me];if(!At){this.fire(new l.ErrorEvent(new Error("The layer '"+me+"' does not exist in the map's style and cannot be moved.")));return}if(me!==We){var Yt=this._order.indexOf(me);this._order.splice(Yt,1);var tr=We?this._order.indexOf(We):this._order.length;if(We&&tr===-1){this.fire(new l.ErrorEvent(new Error('Layer with id "'+We+'" does not exist on this map.')));return}this._order.splice(tr,0,me),this._layerOrderChanged=!0}},ne.prototype.removeLayer=function(me){this._checkLoaded();var We=this._layers[me];if(!We){this.fire(new l.ErrorEvent(new Error("The layer '"+me+"' does not exist in the map's style and cannot be removed.")));return}We.setEventedParent(null);var At=this._order.indexOf(me);this._order.splice(At,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[me]=We,delete this._layers[me],delete this._serializedLayers[me],delete this._updatedLayers[me],delete this._updatedPaintProps[me],We.onRemove&&We.onRemove(this.map)},ne.prototype.getLayer=function(me){return this._layers[me]},ne.prototype.hasLayer=function(me){return me in this._layers},ne.prototype.setLayerZoomRange=function(me,We,At){this._checkLoaded();var Yt=this.getLayer(me);if(!Yt){this.fire(new l.ErrorEvent(new Error("The layer '"+me+"' does not exist in the map's style and cannot have zoom extent.")));return}Yt.minzoom===We&&Yt.maxzoom===At||(We!=null&&(Yt.minzoom=We),At!=null&&(Yt.maxzoom=At),this._updateLayer(Yt))},ne.prototype.setFilter=function(me,We,At){At===void 0&&(At={}),this._checkLoaded();var Yt=this.getLayer(me);if(!Yt){this.fire(new l.ErrorEvent(new Error("The layer '"+me+"' does not exist in the map's style and cannot be filtered.")));return}if(!l.deepEqual(Yt.filter,We)){if(We==null){Yt.filter=void 0,this._updateLayer(Yt);return}this._validate(l.validateStyle.filter,"layers."+Yt.id+".filter",We,null,At)||(Yt.filter=l.clone$1(We),this._updateLayer(Yt))}},ne.prototype.getFilter=function(me){return l.clone$1(this.getLayer(me).filter)},ne.prototype.setLayoutProperty=function(me,We,At,Yt){Yt===void 0&&(Yt={}),this._checkLoaded();var tr=this.getLayer(me);if(!tr){this.fire(new l.ErrorEvent(new Error("The layer '"+me+"' does not exist in the map's style and cannot be styled.")));return}l.deepEqual(tr.getLayoutProperty(We),At)||(tr.setLayoutProperty(We,At,Yt),this._updateLayer(tr))},ne.prototype.getLayoutProperty=function(me,We){var At=this.getLayer(me);if(!At){this.fire(new l.ErrorEvent(new Error("The layer '"+me+"' does not exist in the map's style.")));return}return At.getLayoutProperty(We)},ne.prototype.setPaintProperty=function(me,We,At,Yt){Yt===void 0&&(Yt={}),this._checkLoaded();var tr=this.getLayer(me);if(!tr){this.fire(new l.ErrorEvent(new Error("The layer '"+me+"' does not exist in the map's style and cannot be styled.")));return}if(!l.deepEqual(tr.getPaintProperty(We),At)){var Pt=tr.setPaintProperty(We,At,Yt);Pt&&this._updateLayer(tr),this._changed=!0,this._updatedPaintProps[me]=!0}},ne.prototype.getPaintProperty=function(me,We){return this.getLayer(me).getPaintProperty(We)},ne.prototype.setFeatureState=function(me,We){this._checkLoaded();var At=me.source,Yt=me.sourceLayer,tr=this.sourceCaches[At];if(tr===void 0){this.fire(new l.ErrorEvent(new Error("The source '"+At+"' does not exist in the map's style.")));return}var Pt=tr.getSource().type;if(Pt==="geojson"&&Yt){this.fire(new l.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(Pt==="vector"&&!Yt){this.fire(new l.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}me.id===void 0&&this.fire(new l.ErrorEvent(new Error("The feature id parameter must be provided."))),tr.setFeatureState(Yt,me.id,We)},ne.prototype.removeFeatureState=function(me,We){this._checkLoaded();var At=me.source,Yt=this.sourceCaches[At];if(Yt===void 0){this.fire(new l.ErrorEvent(new Error("The source '"+At+"' does not exist in the map's style.")));return}var tr=Yt.getSource().type,Pt=tr==="vector"?me.sourceLayer:void 0;if(tr==="vector"&&!Pt){this.fire(new l.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}if(We&&typeof me.id!="string"&&typeof me.id!="number"){this.fire(new l.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));return}Yt.removeFeatureState(Pt,me.id,We)},ne.prototype.getFeatureState=function(me){this._checkLoaded();var We=me.source,At=me.sourceLayer,Yt=this.sourceCaches[We];if(Yt===void 0){this.fire(new l.ErrorEvent(new Error("The source '"+We+"' does not exist in the map's style.")));return}var tr=Yt.getSource().type;if(tr==="vector"&&!At){this.fire(new l.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}return me.id===void 0&&this.fire(new l.ErrorEvent(new Error("The feature id parameter must be provided."))),Yt.getFeatureState(At,me.id)},ne.prototype.getTransition=function(){return l.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},ne.prototype.serialize=function(){return l.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:l.mapObject(this.sourceCaches,function(me){return me.serialize()}),layers:this._serializeLayers(this._order)},function(me){return me!==void 0})},ne.prototype._updateLayer=function(me){this._updatedLayers[me.id]=!0,me.source&&!this._updatedSources[me.source]&&this.sourceCaches[me.source].getSource().type!=="raster"&&(this._updatedSources[me.source]="reload",this.sourceCaches[me.source].pause()),this._changed=!0},ne.prototype._flattenAndSortRenderedFeatures=function(me){for(var We=this,At=function(Ro){return We._layers[Ro].type==="fill-extrusion"},Yt={},tr=[],Pt=this._order.length-1;Pt>=0;Pt--){var jt=this._order[Pt];if(At(jt)){Yt[jt]=Pt;for(var hr=0,qr=me;hr<qr.length;hr+=1){var zr=qr[hr],Gr=zr[jt];if(Gr)for(var en=0,Xr=Gr;en<Xr.length;en+=1){var Rr=Xr[en];tr.push(Rr)}}}}tr.sort(function(Ro,Xo){return Xo.intersectionZ-Ro.intersectionZ});for(var jr=[],Br=this._order.length-1;Br>=0;Br--){var Bn=this._order[Br];if(At(Bn))for(var ui=tr.length-1;ui>=0;ui--){var Ii=tr[ui].feature;if(Yt[Ii.layer.id]<Br)break;jr.push(Ii),tr.pop()}else for(var Ga=0,ka=me;Ga<ka.length;Ga+=1){var wa=ka[Ga],$a=wa[Bn];if($a)for(var Ja=0,wo=$a;Ja<wo.length;Ja+=1){var Ya=wo[Ja];jr.push(Ya.feature)}}}return jr},ne.prototype.queryRenderedFeatures=function(me,We,At){We&&We.filter&&this._validate(l.validateStyle.filter,"queryRenderedFeatures.filter",We.filter,null,We);var Yt={};if(We&&We.layers){if(!Array.isArray(We.layers))return this.fire(new l.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(var tr=0,Pt=We.layers;tr<Pt.length;tr+=1){var jt=Pt[tr],hr=this._layers[jt];if(!hr)return this.fire(new l.ErrorEvent(new Error("The layer '"+jt+"' does not exist in the map's style and cannot be queried for features."))),[];Yt[hr.source]=!0}}var qr=[];We.availableImages=this._availableImages;for(var zr in this.sourceCaches)We.layers&&!Yt[zr]||qr.push(Te(this.sourceCaches[zr],this._layers,this._serializedLayers,me,We,At));return this.placement&&qr.push(Be(this._layers,this._serializedLayers,this.sourceCaches,me,We,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(qr)},ne.prototype.querySourceFeatures=function(me,We){We&&We.filter&&this._validate(l.validateStyle.filter,"querySourceFeatures.filter",We.filter,null,We);var At=this.sourceCaches[me];return At?tt(At,We):[]},ne.prototype.addSourceType=function(me,We,At){if(ne.getSourceType(me))return At(new Error('A source type called "'+me+'" already exists.'));if(ne.setSourceType(me,We),!We.workerSourceURL)return At(null,null);this.dispatcher.broadcast("loadWorkerSource",{name:me,url:We.workerSourceURL},At)},ne.prototype.getLight=function(){return this.light.getLight()},ne.prototype.setLight=function(me,We){We===void 0&&(We={}),this._checkLoaded();var At=this.light.getLight(),Yt=!1;for(var tr in me)if(!l.deepEqual(me[tr],At[tr])){Yt=!0;break}if(Yt){var Pt={now:l.browser.now(),transition:l.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(me,We),this.light.updateTransitions(Pt)}},ne.prototype._validate=function(me,We,At,Yt,tr){return tr===void 0&&(tr={}),tr&&tr.validate===!1?!1:zd(this,me.call(l.validateStyle,l.extend({key:We,style:this.serialize(),value:At,styleSpec:l.styleSpec},Yt)))},ne.prototype._remove=function(){this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),l.evented.off("pluginStateChange",this._rtlTextPluginCallback);for(var me in this._layers){var We=this._layers[me];We.setEventedParent(null)}for(var At in this.sourceCaches)this.sourceCaches[At].clearTiles(),this.sourceCaches[At].setEventedParent(null);this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()},ne.prototype._clearSource=function(me){this.sourceCaches[me].clearTiles()},ne.prototype._reloadSource=function(me){this.sourceCaches[me].resume(),this.sourceCaches[me].reload()},ne.prototype._updateSources=function(me){for(var We in this.sourceCaches)this.sourceCaches[We].update(me)},ne.prototype._generateCollisionBoxes=function(){for(var me in this.sourceCaches)this._reloadSource(me)},ne.prototype._updatePlacement=function(me,We,At,Yt,tr){tr===void 0&&(tr=!1);for(var Pt=!1,jt=!1,hr={},qr=0,zr=this._order;qr<zr.length;qr+=1){var Gr=zr[qr],en=this._layers[Gr];if(en.type==="symbol"){if(!hr[en.source]){var Xr=this.sourceCaches[en.source];hr[en.source]=Xr.getRenderableIds(!0).map(function(Ga){return Xr.getTileByID(Ga)}).sort(function(Ga,ka){return ka.tileID.overscaledZ-Ga.tileID.overscaledZ||(Ga.tileID.isLessThan(ka.tileID)?-1:1)})}var Rr=this.crossTileSymbolIndex.addLayer(en,hr[en.source],me.center.lng);Pt=Pt||Rr}}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),tr=tr||this._layerOrderChanged||At===0,(tr||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(l.browser.now(),me.zoom))&&(this.pauseablePlacement=new pu(me,this._order,tr,We,At,Yt,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,hr),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(l.browser.now()),jt=!0),Pt&&this.pauseablePlacement.placement.setStale()),jt||Pt)for(var jr=0,Br=this._order;jr<Br.length;jr+=1){var Bn=Br[jr],ui=this._layers[Bn];ui.type==="symbol"&&this.placement.updateLayerOpacities(ui,hr[ui.source])}var Ii=!this.pauseablePlacement.isDone()||this.placement.hasTransitions(l.browser.now());return Ii},ne.prototype._releaseSymbolFadeTiles=function(){for(var me in this.sourceCaches)this.sourceCaches[me].releaseSymbolFadeTiles()},ne.prototype.getImages=function(me,We,At){this.imageManager.getImages(We.icons,At),this._updateTilesForChangedImages();var Yt=this.sourceCaches[We.source];Yt&&Yt.setDependencies(We.tileID.key,We.type,We.icons)},ne.prototype.getGlyphs=function(me,We,At){this.glyphManager.getGlyphs(We.stacks,At)},ne.prototype.getResource=function(me,We,At){return l.makeRequest(We,At)},ne})(l.Evented);ev.getSourceType=De,ev.setSourceType=xe,ev.registerForPluginStateChange=l.registerForPluginStateChange;var Um=l.createLayout([{name:"a_pos",type:"Int16",components:2}]),Hm=`#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`,om=`#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;}`,K0=`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
}`,o1="attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}",Of=`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
}`,xm="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);}",J0=`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
}`,wp=`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);}`,sp="void main() {gl_FragColor=vec4(1.0);}",Sp="attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}",sm=`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
}`,yd=`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;}`,lp=`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
}`,Uc="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;}",zf="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;}}",jm="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;}",hv="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;}",og="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);}",Bd="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);}",z1="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);}",Oc=`#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
}`,pb=`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);}`,mf=`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
}`,mu=`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;}`,Wg=`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
}`,lm=`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;}`,Hh=`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
}`,Q0=`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);}`,sg=`varying vec4 v_color;void main() {gl_FragColor=v_color;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,a0=`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;}`,up=`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
}`,s1=`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;}`,Ay=`#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
}`,o0="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;}",lg=`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
}`,ey="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;}",ty=`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
}`,um=`
#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);}`,Cy=`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
}`,Vm=`
#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);}`,_m=`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
}`,cp=`
#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;}`,Rg=`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
}`,ry=`
#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);}`,Wf=`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
}`,E0="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;}",B1=`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
}`,My=`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));}`,s0=`#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
}`,Ry=`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);}`,Av=`#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
}`,ky=`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);}`,uh=Ld(Hm,om),Cv=Ld(K0,o1),ug=Ld(Of,xm),bd=Ld(J0,wp),qm=Ld(sp,Sp),tv=Ld(sm,yd),Mv=Ld(lp,Uc),Ud=Ld(zf,jm),Yg=Ld(hv,og),wm=Ld(Bd,z1),cg=Ld(Oc,pb),A0=Ld(mf,mu),U1=Ld(Wg,lm),Qb=Ld(Hh,Q0),Xg=Ld(sg,a0),C0=Ld(up,s1),Uv=Ld(Ay,o0),M0=Ld(lg,ey),Tp=Ld(ty,um),Zg=Ld(Cy,Vm),Iy=Ld(_m,cp),Kg=Ld(Rg,ry),Rd=Ld(Wf,E0),Rv=Ld(B1,My),cm=Ld(s0,Ry),ny=Ld(Av,ky);function Ld(Xe,ne){var Fe=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,me=ne.match(/attribute ([\w]+) ([\w]+)/g),We=Xe.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),At=ne.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Yt=At?At.concat(We):We,tr={};return Xe=Xe.replace(Fe,function(Pt,jt,hr,qr,zr){return tr[zr]=!0,jt==="define"?`
#ifndef HAS_UNIFORM_u_`+zr+`
varying `+hr+" "+qr+" "+zr+`;
#else
uniform `+hr+" "+qr+" u_"+zr+`;
#endif
`:`
#ifdef HAS_UNIFORM_u_`+zr+`
    `+hr+" "+qr+" "+zr+" = u_"+zr+`;
#endif
`}),ne=ne.replace(Fe,function(Pt,jt,hr,qr,zr){var Gr=qr==="float"?"vec2":"vec4",en=zr.match(/color/)?"color":Gr;return tr[zr]?jt==="define"?`
#ifndef HAS_UNIFORM_u_`+zr+`
uniform lowp float u_`+zr+`_t;
attribute `+hr+" "+Gr+" a_"+zr+`;
varying `+hr+" "+qr+" "+zr+`;
#else
uniform `+hr+" "+qr+" u_"+zr+`;
#endif
`:en==="vec4"?`
#ifndef HAS_UNIFORM_u_`+zr+`
    `+zr+" = a_"+zr+`;
#else
    `+hr+" "+qr+" "+zr+" = u_"+zr+`;
#endif
`:`
#ifndef HAS_UNIFORM_u_`+zr+`
    `+zr+" = unpack_mix_"+en+"(a_"+zr+", u_"+zr+`_t);
#else
    `+hr+" "+qr+" "+zr+" = u_"+zr+`;
#endif
`:jt==="define"?`
#ifndef HAS_UNIFORM_u_`+zr+`
uniform lowp float u_`+zr+`_t;
attribute `+hr+" "+Gr+" a_"+zr+`;
#else
uniform `+hr+" "+qr+" u_"+zr+`;
#endif
`:en==="vec4"?`
#ifndef HAS_UNIFORM_u_`+zr+`
    `+hr+" "+qr+" "+zr+" = a_"+zr+`;
#else
    `+hr+" "+qr+" "+zr+" = u_"+zr+`;
#endif
`:`
#ifndef HAS_UNIFORM_u_`+zr+`
    `+hr+" "+qr+" "+zr+" = unpack_mix_"+en+"(a_"+zr+", u_"+zr+`_t);
#else
    `+hr+" "+qr+" "+zr+" = u_"+zr+`;
#endif
`}),{fragmentSource:Xe,vertexSource:ne,staticAttributes:me,staticUniforms:Yt}}var l0=Object.freeze({__proto__:null,prelude:uh,background:Cv,backgroundPattern:ug,circle:bd,clippingMask:qm,heatmap:tv,heatmapTexture:Mv,collisionBox:Ud,collisionCircle:Yg,debug:wm,fill:cg,fillOutline:A0,fillOutlinePattern:U1,fillPattern:Qb,fillExtrusion:Xg,fillExtrusionPattern:C0,hillshadePrepare:Uv,hillshade:M0,line:Tp,lineGradient:Zg,linePattern:Iy,lineSDF:Kg,raster:Rd,symbolIcon:Rv,symbolSDF:cm,symbolTextAndIcon:ny}),fg=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};fg.prototype.bind=function(ne,Fe,me,We,At,Yt,tr,Pt){this.context=ne;for(var jt=this.boundPaintVertexBuffers.length!==We.length,hr=0;!jt&&hr<We.length;hr++)this.boundPaintVertexBuffers[hr]!==We[hr]&&(jt=!0);var qr=!this.vao||this.boundProgram!==Fe||this.boundLayoutVertexBuffer!==me||jt||this.boundIndexBuffer!==At||this.boundVertexOffset!==Yt||this.boundDynamicVertexBuffer!==tr||this.boundDynamicVertexBuffer2!==Pt;!ne.extVertexArrayObject||qr?this.freshBind(Fe,me,We,At,Yt,tr,Pt):(ne.bindVertexArrayOES.set(this.vao),tr&&tr.bind(),At&&At.dynamicDraw&&At.bind(),Pt&&Pt.bind())},fg.prototype.freshBind=function(ne,Fe,me,We,At,Yt,tr){var Pt,jt=ne.numAttributes,hr=this.context,qr=hr.gl;if(hr.extVertexArrayObject)this.vao&&this.destroy(),this.vao=hr.extVertexArrayObject.createVertexArrayOES(),hr.bindVertexArrayOES.set(this.vao),Pt=0,this.boundProgram=ne,this.boundLayoutVertexBuffer=Fe,this.boundPaintVertexBuffers=me,this.boundIndexBuffer=We,this.boundVertexOffset=At,this.boundDynamicVertexBuffer=Yt,this.boundDynamicVertexBuffer2=tr;else{Pt=hr.currentNumAttributes||0;for(var zr=jt;zr<Pt;zr++)qr.disableVertexAttribArray(zr)}Fe.enableAttributes(qr,ne);for(var Gr=0,en=me;Gr<en.length;Gr+=1){var Xr=en[Gr];Xr.enableAttributes(qr,ne)}Yt&&Yt.enableAttributes(qr,ne),tr&&tr.enableAttributes(qr,ne),Fe.bind(),Fe.setVertexAttribPointers(qr,ne,At);for(var Rr=0,jr=me;Rr<jr.length;Rr+=1){var Br=jr[Rr];Br.bind(),Br.setVertexAttribPointers(qr,ne,At)}Yt&&(Yt.bind(),Yt.setVertexAttribPointers(qr,ne,At)),We&&We.bind(),tr&&(tr.bind(),tr.setVertexAttribPointers(qr,ne,At)),hr.currentNumAttributes=jt},fg.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};function Hv(Xe){for(var ne=[],Fe=0;Fe<Xe.length;Fe++)if(Xe[Fe]!==null){var me=Xe[Fe].split(" ");ne.push(me.pop())}return ne}var u0=function(ne,Fe,me,We,At,Yt){var tr=ne.gl;this.program=tr.createProgram();for(var Pt=Hv(me.staticAttributes),jt=We?We.getBinderAttributes():[],hr=Pt.concat(jt),qr=me.staticUniforms?Hv(me.staticUniforms):[],zr=We?We.getBinderUniforms():[],Gr=qr.concat(zr),en=[],Xr=0,Rr=Gr;Xr<Rr.length;Xr+=1){var jr=Rr[Xr];en.indexOf(jr)<0&&en.push(jr)}var Br=We?We.defines():[];Yt&&Br.push("#define OVERDRAW_INSPECTOR;");var Bn=Br.concat(uh.fragmentSource,me.fragmentSource).join(`
`),ui=Br.concat(uh.vertexSource,me.vertexSource).join(`
`),Ii=tr.createShader(tr.FRAGMENT_SHADER);if(tr.isContextLost()){this.failedToCreate=!0;return}tr.shaderSource(Ii,Bn),tr.compileShader(Ii),tr.attachShader(this.program,Ii);var Ga=tr.createShader(tr.VERTEX_SHADER);if(tr.isContextLost()){this.failedToCreate=!0;return}tr.shaderSource(Ga,ui),tr.compileShader(Ga),tr.attachShader(this.program,Ga),this.attributes={};var ka={};this.numAttributes=hr.length;for(var wa=0;wa<this.numAttributes;wa++)hr[wa]&&(tr.bindAttribLocation(this.program,wa,hr[wa]),this.attributes[hr[wa]]=wa);tr.linkProgram(this.program),tr.deleteShader(Ga),tr.deleteShader(Ii);for(var $a=0;$a<en.length;$a++){var Ja=en[$a];if(Ja&&!ka[Ja]){var wo=tr.getUniformLocation(this.program,Ja);wo&&(ka[Ja]=wo)}}this.fixedUniforms=At(ne,ka),this.binderUniforms=We?We.getUniforms(ne,ka):[]};u0.prototype.draw=function(ne,Fe,me,We,At,Yt,tr,Pt,jt,hr,qr,zr,Gr,en,Xr,Rr){var jr,Br=ne.gl;if(!this.failedToCreate){ne.program.set(this.program),ne.setDepthMode(me),ne.setStencilMode(We),ne.setColorMode(At),ne.setCullFace(Yt);for(var Bn in this.fixedUniforms)this.fixedUniforms[Bn].set(tr[Bn]);en&&en.setUniforms(ne,this.binderUniforms,zr,{zoom:Gr});for(var ui=(jr={},jr[Br.LINES]=2,jr[Br.TRIANGLES]=3,jr[Br.LINE_STRIP]=1,jr)[Fe],Ii=0,Ga=qr.get();Ii<Ga.length;Ii+=1){var ka=Ga[Ii],wa=ka.vaos||(ka.vaos={}),$a=wa[Pt]||(wa[Pt]=new fg);$a.bind(ne,this,jt,en?en.getPaintVertexBuffers():[],hr,ka.vertexOffset,Xr,Rr),Br.drawElements(Fe,ka.primitiveLength*ui,Br.UNSIGNED_SHORT,ka.primitiveOffset*ui*2)}}};function Sm(Xe,ne,Fe){var me=1/lu(Fe,1,ne.transform.tileZoom),We=Math.pow(2,Fe.tileID.overscaledZ),At=Fe.tileSize*Math.pow(2,ne.transform.tileZoom)/We,Yt=At*(Fe.tileID.canonical.x+Fe.tileID.wrap*We),tr=At*Fe.tileID.canonical.y;return{u_image:0,u_texsize:Fe.imageAtlasTexture.size,u_scale:[me,Xe.fromScale,Xe.toScale],u_fade:Xe.t,u_pixel_coord_upper:[Yt>>16,tr>>16],u_pixel_coord_lower:[Yt&65535,tr&65535]}}function c0(Xe,ne,Fe,me){var We=Fe.imageManager.getPattern(Xe.from.toString()),At=Fe.imageManager.getPattern(Xe.to.toString()),Yt=Fe.imageManager.getPixelSize(),tr=Yt.width,Pt=Yt.height,jt=Math.pow(2,me.tileID.overscaledZ),hr=me.tileSize*Math.pow(2,Fe.transform.tileZoom)/jt,qr=hr*(me.tileID.canonical.x+me.tileID.wrap*jt),zr=hr*me.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:We.tl,u_pattern_br_a:We.br,u_pattern_tl_b:At.tl,u_pattern_br_b:At.br,u_texsize:[tr,Pt],u_mix:ne.t,u_pattern_size_a:We.displaySize,u_pattern_size_b:At.displaySize,u_scale_a:ne.fromScale,u_scale_b:ne.toScale,u_tile_units_to_pixels:1/lu(me,1,Fe.transform.tileZoom),u_pixel_coord_upper:[qr>>16,zr>>16],u_pixel_coord_lower:[qr&65535,zr&65535]}}var H1=function(Xe,ne){return{u_matrix:new l.UniformMatrix4f(Xe,ne.u_matrix),u_lightpos:new l.Uniform3f(Xe,ne.u_lightpos),u_lightintensity:new l.Uniform1f(Xe,ne.u_lightintensity),u_lightcolor:new l.Uniform3f(Xe,ne.u_lightcolor),u_vertical_gradient:new l.Uniform1f(Xe,ne.u_vertical_gradient),u_opacity:new l.Uniform1f(Xe,ne.u_opacity)}},Np=function(Xe,ne){return{u_matrix:new l.UniformMatrix4f(Xe,ne.u_matrix),u_lightpos:new l.Uniform3f(Xe,ne.u_lightpos),u_lightintensity:new l.Uniform1f(Xe,ne.u_lightintensity),u_lightcolor:new l.Uniform3f(Xe,ne.u_lightcolor),u_vertical_gradient:new l.Uniform1f(Xe,ne.u_vertical_gradient),u_height_factor:new l.Uniform1f(Xe,ne.u_height_factor),u_image:new l.Uniform1i(Xe,ne.u_image),u_texsize:new l.Uniform2f(Xe,ne.u_texsize),u_pixel_coord_upper:new l.Uniform2f(Xe,ne.u_pixel_coord_upper),u_pixel_coord_lower:new l.Uniform2f(Xe,ne.u_pixel_coord_lower),u_scale:new l.Uniform3f(Xe,ne.u_scale),u_fade:new l.Uniform1f(Xe,ne.u_fade),u_opacity:new l.Uniform1f(Xe,ne.u_opacity)}},Py=function(Xe,ne,Fe,me){var We=ne.style.light,At=We.properties.get("position"),Yt=[At.x,At.y,At.z],tr=l.create$1();We.properties.get("anchor")==="viewport"&&l.fromRotation(tr,-ne.transform.angle),l.transformMat3(Yt,Yt,tr);var Pt=We.properties.get("color");return{u_matrix:Xe,u_lightpos:Yt,u_lightintensity:We.properties.get("intensity"),u_lightcolor:[Pt.r,Pt.g,Pt.b],u_vertical_gradient:+Fe,u_opacity:me}},jv=function(Xe,ne,Fe,me,We,At,Yt){return l.extend(Py(Xe,ne,Fe,me),Sm(At,ne,Yt),{u_height_factor:-Math.pow(2,We.overscaledZ)/Yt.tileSize/8})},Gm=function(Xe,ne){return{u_matrix:new l.UniformMatrix4f(Xe,ne.u_matrix)}},Tm=function(Xe,ne){return{u_matrix:new l.UniformMatrix4f(Xe,ne.u_matrix),u_image:new l.Uniform1i(Xe,ne.u_image),u_texsize:new l.Uniform2f(Xe,ne.u_texsize),u_pixel_coord_upper:new l.Uniform2f(Xe,ne.u_pixel_coord_upper),u_pixel_coord_lower:new l.Uniform2f(Xe,ne.u_pixel_coord_lower),u_scale:new l.Uniform3f(Xe,ne.u_scale),u_fade:new l.Uniform1f(Xe,ne.u_fade)}},ph=function(Xe,ne){return{u_matrix:new l.UniformMatrix4f(Xe,ne.u_matrix),u_world:new l.Uniform2f(Xe,ne.u_world)}},pv=function(Xe,ne){return{u_matrix:new l.UniformMatrix4f(Xe,ne.u_matrix),u_world:new l.Uniform2f(Xe,ne.u_world),u_image:new l.Uniform1i(Xe,ne.u_image),u_texsize:new l.Uniform2f(Xe,ne.u_texsize),u_pixel_coord_upper:new l.Uniform2f(Xe,ne.u_pixel_coord_upper),u_pixel_coord_lower:new l.Uniform2f(Xe,ne.u_pixel_coord_lower),u_scale:new l.Uniform3f(Xe,ne.u_scale),u_fade:new l.Uniform1f(Xe,ne.u_fade)}},Yd=function(Xe){return{u_matrix:Xe}},dg=function(Xe,ne,Fe,me){return l.extend(Yd(Xe),Sm(Fe,ne,me))},Em=function(Xe,ne){return{u_matrix:Xe,u_world:ne}},iy=function(Xe,ne,Fe,me,We){return l.extend(dg(Xe,ne,Fe,me),{u_world:We})},sn=function(Xe,ne){return{u_camera_to_center_distance:new l.Uniform1f(Xe,ne.u_camera_to_center_distance),u_scale_with_map:new l.Uniform1i(Xe,ne.u_scale_with_map),u_pitch_with_map:new l.Uniform1i(Xe,ne.u_pitch_with_map),u_extrude_scale:new l.Uniform2f(Xe,ne.u_extrude_scale),u_device_pixel_ratio:new l.Uniform1f(Xe,ne.u_device_pixel_ratio),u_matrix:new l.UniformMatrix4f(Xe,ne.u_matrix)}},Fn=function(Xe,ne,Fe,me){var We=Xe.transform,At,Yt;if(me.paint.get("circle-pitch-alignment")==="map"){var tr=lu(Fe,1,We.zoom);At=!0,Yt=[tr,tr]}else At=!1,Yt=We.pixelsToGLUnits;return{u_camera_to_center_distance:We.cameraToCenterDistance,u_scale_with_map:+(me.paint.get("circle-pitch-scale")==="map"),u_matrix:Xe.translatePosMatrix(ne.posMatrix,Fe,me.paint.get("circle-translate"),me.paint.get("circle-translate-anchor")),u_pitch_with_map:+At,u_device_pixel_ratio:l.browser.devicePixelRatio,u_extrude_scale:Yt}},Li=function(Xe,ne){return{u_matrix:new l.UniformMatrix4f(Xe,ne.u_matrix),u_camera_to_center_distance:new l.Uniform1f(Xe,ne.u_camera_to_center_distance),u_pixels_to_tile_units:new l.Uniform1f(Xe,ne.u_pixels_to_tile_units),u_extrude_scale:new l.Uniform2f(Xe,ne.u_extrude_scale),u_overscale_factor:new l.Uniform1f(Xe,ne.u_overscale_factor)}},Si=function(Xe,ne){return{u_matrix:new l.UniformMatrix4f(Xe,ne.u_matrix),u_inv_matrix:new l.UniformMatrix4f(Xe,ne.u_inv_matrix),u_camera_to_center_distance:new l.Uniform1f(Xe,ne.u_camera_to_center_distance),u_viewport_size:new l.Uniform2f(Xe,ne.u_viewport_size)}},ma=function(Xe,ne,Fe){var me=lu(Fe,1,ne.zoom),We=Math.pow(2,ne.zoom-Fe.tileID.overscaledZ),At=Fe.tileID.overscaleFactor();return{u_matrix:Xe,u_camera_to_center_distance:ne.cameraToCenterDistance,u_pixels_to_tile_units:me,u_extrude_scale:[ne.pixelsToGLUnits[0]/(me*We),ne.pixelsToGLUnits[1]/(me*We)],u_overscale_factor:At}},yo=function(Xe,ne,Fe){return{u_matrix:Xe,u_inv_matrix:ne,u_camera_to_center_distance:Fe.cameraToCenterDistance,u_viewport_size:[Fe.width,Fe.height]}},uo=function(Xe,ne){return{u_color:new l.UniformColor(Xe,ne.u_color),u_matrix:new l.UniformMatrix4f(Xe,ne.u_matrix),u_overlay:new l.Uniform1i(Xe,ne.u_overlay),u_overlay_scale:new l.Uniform1f(Xe,ne.u_overlay_scale)}},rs=function(Xe,ne,Fe){return Fe===void 0&&(Fe=1),{u_matrix:Xe,u_color:ne,u_overlay:0,u_overlay_scale:Fe}},hs=function(Xe,ne){return{u_matrix:new l.UniformMatrix4f(Xe,ne.u_matrix)}},Ws=function(Xe){return{u_matrix:Xe}},Bo=function(Xe,ne){return{u_extrude_scale:new l.Uniform1f(Xe,ne.u_extrude_scale),u_intensity:new l.Uniform1f(Xe,ne.u_intensity),u_matrix:new l.UniformMatrix4f(Xe,ne.u_matrix)}},As=function(Xe,ne){return{u_matrix:new l.UniformMatrix4f(Xe,ne.u_matrix),u_world:new l.Uniform2f(Xe,ne.u_world),u_image:new l.Uniform1i(Xe,ne.u_image),u_color_ramp:new l.Uniform1i(Xe,ne.u_color_ramp),u_opacity:new l.Uniform1f(Xe,ne.u_opacity)}},Jo=function(Xe,ne,Fe,me){return{u_matrix:Xe,u_extrude_scale:lu(ne,1,Fe),u_intensity:me}},Io=function(Xe,ne,Fe,me){var We=l.create();l.ortho(We,0,Xe.width,Xe.height,0,0,1);var At=Xe.context.gl;return{u_matrix:We,u_world:[At.drawingBufferWidth,At.drawingBufferHeight],u_image:Fe,u_color_ramp:me,u_opacity:ne.paint.get("heatmap-opacity")}},ll=function(Xe,ne){return{u_matrix:new l.UniformMatrix4f(Xe,ne.u_matrix),u_image:new l.Uniform1i(Xe,ne.u_image),u_latrange:new l.Uniform2f(Xe,ne.u_latrange),u_light:new l.Uniform2f(Xe,ne.u_light),u_shadow:new l.UniformColor(Xe,ne.u_shadow),u_highlight:new l.UniformColor(Xe,ne.u_highlight),u_accent:new l.UniformColor(Xe,ne.u_accent)}},Tu=function(Xe,ne){return{u_matrix:new l.UniformMatrix4f(Xe,ne.u_matrix),u_image:new l.Uniform1i(Xe,ne.u_image),u_dimension:new l.Uniform2f(Xe,ne.u_dimension),u_zoom:new l.Uniform1f(Xe,ne.u_zoom),u_unpack:new l.Uniform4f(Xe,ne.u_unpack)}},du=function(Xe,ne,Fe){var me=Fe.paint.get("hillshade-shadow-color"),We=Fe.paint.get("hillshade-highlight-color"),At=Fe.paint.get("hillshade-accent-color"),Yt=Fe.paint.get("hillshade-illumination-direction")*(Math.PI/180);Fe.paint.get("hillshade-illumination-anchor")==="viewport"&&(Yt-=Xe.transform.angle);var tr=!Xe.options.moving;return{u_matrix:Xe.transform.calculatePosMatrix(ne.tileID.toUnwrapped(),tr),u_image:0,u_latrange:Au(Xe,ne.tileID),u_light:[Fe.paint.get("hillshade-exaggeration"),Yt],u_shadow:me,u_highlight:We,u_accent:At}},ku=function(Xe,ne){var Fe=ne.stride,me=l.create();return l.ortho(me,0,l.EXTENT,-l.EXTENT,0,0,1),l.translate(me,me,[0,-l.EXTENT,0]),{u_matrix:me,u_image:1,u_dimension:[Fe,Fe],u_zoom:Xe.overscaledZ,u_unpack:ne.getUnpackVector()}};function Au(Xe,ne){var Fe=Math.pow(2,ne.canonical.z),me=ne.canonical.y;return[new l.MercatorCoordinate(0,me/Fe).toLngLat().lat,new l.MercatorCoordinate(0,(me+1)/Fe).toLngLat().lat]}var cl=function(Xe,ne){return{u_matrix:new l.UniformMatrix4f(Xe,ne.u_matrix),u_ratio:new l.Uniform1f(Xe,ne.u_ratio),u_device_pixel_ratio:new l.Uniform1f(Xe,ne.u_device_pixel_ratio),u_units_to_pixels:new l.Uniform2f(Xe,ne.u_units_to_pixels)}},Os=function(Xe,ne){return{u_matrix:new l.UniformMatrix4f(Xe,ne.u_matrix),u_ratio:new l.Uniform1f(Xe,ne.u_ratio),u_device_pixel_ratio:new l.Uniform1f(Xe,ne.u_device_pixel_ratio),u_units_to_pixels:new l.Uniform2f(Xe,ne.u_units_to_pixels),u_image:new l.Uniform1i(Xe,ne.u_image),u_image_height:new l.Uniform1f(Xe,ne.u_image_height)}},Vu=function(Xe,ne){return{u_matrix:new l.UniformMatrix4f(Xe,ne.u_matrix),u_texsize:new l.Uniform2f(Xe,ne.u_texsize),u_ratio:new l.Uniform1f(Xe,ne.u_ratio),u_device_pixel_ratio:new l.Uniform1f(Xe,ne.u_device_pixel_ratio),u_image:new l.Uniform1i(Xe,ne.u_image),u_units_to_pixels:new l.Uniform2f(Xe,ne.u_units_to_pixels),u_scale:new l.Uniform3f(Xe,ne.u_scale),u_fade:new l.Uniform1f(Xe,ne.u_fade)}},Nc=function(Xe,ne){return{u_matrix:new l.UniformMatrix4f(Xe,ne.u_matrix),u_ratio:new l.Uniform1f(Xe,ne.u_ratio),u_device_pixel_ratio:new l.Uniform1f(Xe,ne.u_device_pixel_ratio),u_units_to_pixels:new l.Uniform2f(Xe,ne.u_units_to_pixels),u_patternscale_a:new l.Uniform2f(Xe,ne.u_patternscale_a),u_patternscale_b:new l.Uniform2f(Xe,ne.u_patternscale_b),u_sdfgamma:new l.Uniform1f(Xe,ne.u_sdfgamma),u_image:new l.Uniform1i(Xe,ne.u_image),u_tex_y_a:new l.Uniform1f(Xe,ne.u_tex_y_a),u_tex_y_b:new l.Uniform1f(Xe,ne.u_tex_y_b),u_mix:new l.Uniform1f(Xe,ne.u_mix)}},Sf=function(Xe,ne,Fe){var me=Xe.transform;return{u_matrix:wh(Xe,ne,Fe),u_ratio:1/lu(ne,1,me.zoom),u_device_pixel_ratio:l.browser.devicePixelRatio,u_units_to_pixels:[1/me.pixelsToGLUnits[0],1/me.pixelsToGLUnits[1]]}},sd=function(Xe,ne,Fe,me){return l.extend(Sf(Xe,ne,Fe),{u_image:0,u_image_height:me})},Cf=function(Xe,ne,Fe,me){var We=Xe.transform,At=Jc(ne,We);return{u_matrix:wh(Xe,ne,Fe),u_texsize:ne.imageAtlasTexture.size,u_ratio:1/lu(ne,1,We.zoom),u_device_pixel_ratio:l.browser.devicePixelRatio,u_image:0,u_scale:[At,me.fromScale,me.toScale],u_fade:me.t,u_units_to_pixels:[1/We.pixelsToGLUnits[0],1/We.pixelsToGLUnits[1]]}},ld=function(Xe,ne,Fe,me,We){var At=Xe.transform,Yt=Xe.lineAtlas,tr=Jc(ne,At),Pt=Fe.layout.get("line-cap")==="round",jt=Yt.getDash(me.from,Pt),hr=Yt.getDash(me.to,Pt),qr=jt.width*We.fromScale,zr=hr.width*We.toScale;return l.extend(Sf(Xe,ne,Fe),{u_patternscale_a:[tr/qr,-jt.height/2],u_patternscale_b:[tr/zr,-hr.height/2],u_sdfgamma:Yt.width/(Math.min(qr,zr)*256*l.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:jt.y,u_tex_y_b:hr.y,u_mix:We.t})};function Jc(Xe,ne){return 1/lu(Xe,1,ne.tileZoom)}function wh(Xe,ne,Fe){return Xe.translatePosMatrix(ne.tileID.posMatrix,ne,Fe.paint.get("line-translate"),Fe.paint.get("line-translate-anchor"))}var vh=function(Xe,ne){return{u_matrix:new l.UniformMatrix4f(Xe,ne.u_matrix),u_tl_parent:new l.Uniform2f(Xe,ne.u_tl_parent),u_scale_parent:new l.Uniform1f(Xe,ne.u_scale_parent),u_buffer_scale:new l.Uniform1f(Xe,ne.u_buffer_scale),u_fade_t:new l.Uniform1f(Xe,ne.u_fade_t),u_opacity:new l.Uniform1f(Xe,ne.u_opacity),u_image0:new l.Uniform1i(Xe,ne.u_image0),u_image1:new l.Uniform1i(Xe,ne.u_image1),u_brightness_low:new l.Uniform1f(Xe,ne.u_brightness_low),u_brightness_high:new l.Uniform1f(Xe,ne.u_brightness_high),u_saturation_factor:new l.Uniform1f(Xe,ne.u_saturation_factor),u_contrast_factor:new l.Uniform1f(Xe,ne.u_contrast_factor),u_spin_weights:new l.Uniform3f(Xe,ne.u_spin_weights)}},rd=function(Xe,ne,Fe,me,We){return{u_matrix:Xe,u_tl_parent:ne,u_scale_parent:Fe,u_buffer_scale:1,u_fade_t:me.mix,u_opacity:me.opacity*We.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:We.paint.get("raster-brightness-min"),u_brightness_high:We.paint.get("raster-brightness-max"),u_saturation_factor:Bf(We.paint.get("raster-saturation")),u_contrast_factor:lc(We.paint.get("raster-contrast")),u_spin_weights:Wl(We.paint.get("raster-hue-rotate"))}};function Wl(Xe){Xe*=Math.PI/180;var ne=Math.sin(Xe),Fe=Math.cos(Xe);return[(2*Fe+1)/3,(-Math.sqrt(3)*ne-Fe+1)/3,(Math.sqrt(3)*ne-Fe+1)/3]}function lc(Xe){return Xe>0?1/(1-Xe):1+Xe}function Bf(Xe){return Xe>0?1-1/(1.001-Xe):-Xe}var gf=function(Xe,ne){return{u_is_size_zoom_constant:new l.Uniform1i(Xe,ne.u_is_size_zoom_constant),u_is_size_feature_constant:new l.Uniform1i(Xe,ne.u_is_size_feature_constant),u_size_t:new l.Uniform1f(Xe,ne.u_size_t),u_size:new l.Uniform1f(Xe,ne.u_size),u_camera_to_center_distance:new l.Uniform1f(Xe,ne.u_camera_to_center_distance),u_pitch:new l.Uniform1f(Xe,ne.u_pitch),u_rotate_symbol:new l.Uniform1i(Xe,ne.u_rotate_symbol),u_aspect_ratio:new l.Uniform1f(Xe,ne.u_aspect_ratio),u_fade_change:new l.Uniform1f(Xe,ne.u_fade_change),u_matrix:new l.UniformMatrix4f(Xe,ne.u_matrix),u_label_plane_matrix:new l.UniformMatrix4f(Xe,ne.u_label_plane_matrix),u_coord_matrix:new l.UniformMatrix4f(Xe,ne.u_coord_matrix),u_is_text:new l.Uniform1i(Xe,ne.u_is_text),u_pitch_with_map:new l.Uniform1i(Xe,ne.u_pitch_with_map),u_texsize:new l.Uniform2f(Xe,ne.u_texsize),u_texture:new l.Uniform1i(Xe,ne.u_texture)}},rv=function(Xe,ne){return{u_is_size_zoom_constant:new l.Uniform1i(Xe,ne.u_is_size_zoom_constant),u_is_size_feature_constant:new l.Uniform1i(Xe,ne.u_is_size_feature_constant),u_size_t:new l.Uniform1f(Xe,ne.u_size_t),u_size:new l.Uniform1f(Xe,ne.u_size),u_camera_to_center_distance:new l.Uniform1f(Xe,ne.u_camera_to_center_distance),u_pitch:new l.Uniform1f(Xe,ne.u_pitch),u_rotate_symbol:new l.Uniform1i(Xe,ne.u_rotate_symbol),u_aspect_ratio:new l.Uniform1f(Xe,ne.u_aspect_ratio),u_fade_change:new l.Uniform1f(Xe,ne.u_fade_change),u_matrix:new l.UniformMatrix4f(Xe,ne.u_matrix),u_label_plane_matrix:new l.UniformMatrix4f(Xe,ne.u_label_plane_matrix),u_coord_matrix:new l.UniformMatrix4f(Xe,ne.u_coord_matrix),u_is_text:new l.Uniform1i(Xe,ne.u_is_text),u_pitch_with_map:new l.Uniform1i(Xe,ne.u_pitch_with_map),u_texsize:new l.Uniform2f(Xe,ne.u_texsize),u_texture:new l.Uniform1i(Xe,ne.u_texture),u_gamma_scale:new l.Uniform1f(Xe,ne.u_gamma_scale),u_device_pixel_ratio:new l.Uniform1f(Xe,ne.u_device_pixel_ratio),u_is_halo:new l.Uniform1i(Xe,ne.u_is_halo)}},nv=function(Xe,ne){return{u_is_size_zoom_constant:new l.Uniform1i(Xe,ne.u_is_size_zoom_constant),u_is_size_feature_constant:new l.Uniform1i(Xe,ne.u_is_size_feature_constant),u_size_t:new l.Uniform1f(Xe,ne.u_size_t),u_size:new l.Uniform1f(Xe,ne.u_size),u_camera_to_center_distance:new l.Uniform1f(Xe,ne.u_camera_to_center_distance),u_pitch:new l.Uniform1f(Xe,ne.u_pitch),u_rotate_symbol:new l.Uniform1i(Xe,ne.u_rotate_symbol),u_aspect_ratio:new l.Uniform1f(Xe,ne.u_aspect_ratio),u_fade_change:new l.Uniform1f(Xe,ne.u_fade_change),u_matrix:new l.UniformMatrix4f(Xe,ne.u_matrix),u_label_plane_matrix:new l.UniformMatrix4f(Xe,ne.u_label_plane_matrix),u_coord_matrix:new l.UniformMatrix4f(Xe,ne.u_coord_matrix),u_is_text:new l.Uniform1i(Xe,ne.u_is_text),u_pitch_with_map:new l.Uniform1i(Xe,ne.u_pitch_with_map),u_texsize:new l.Uniform2f(Xe,ne.u_texsize),u_texsize_icon:new l.Uniform2f(Xe,ne.u_texsize_icon),u_texture:new l.Uniform1i(Xe,ne.u_texture),u_texture_icon:new l.Uniform1i(Xe,ne.u_texture_icon),u_gamma_scale:new l.Uniform1f(Xe,ne.u_gamma_scale),u_device_pixel_ratio:new l.Uniform1f(Xe,ne.u_device_pixel_ratio),u_is_halo:new l.Uniform1i(Xe,ne.u_is_halo)}},vv=function(Xe,ne,Fe,me,We,At,Yt,tr,Pt,jt){var hr=We.transform;return{u_is_size_zoom_constant:+(Xe==="constant"||Xe==="source"),u_is_size_feature_constant:+(Xe==="constant"||Xe==="camera"),u_size_t:ne?ne.uSizeT:0,u_size:ne?ne.uSize:0,u_camera_to_center_distance:hr.cameraToCenterDistance,u_pitch:hr.pitch/360*2*Math.PI,u_rotate_symbol:+Fe,u_aspect_ratio:hr.width/hr.height,u_fade_change:We.options.fadeDuration?We.symbolFadeChange:1,u_matrix:At,u_label_plane_matrix:Yt,u_coord_matrix:tr,u_is_text:+Pt,u_pitch_with_map:+me,u_texsize:jt,u_texture:0}},kg=function(Xe,ne,Fe,me,We,At,Yt,tr,Pt,jt,hr){var qr=We.transform;return l.extend(vv(Xe,ne,Fe,me,We,At,Yt,tr,Pt,jt),{u_gamma_scale:me?Math.cos(qr._pitch)*qr.cameraToCenterDistance:1,u_device_pixel_ratio:l.browser.devicePixelRatio,u_is_halo:1})},iv=function(Xe,ne,Fe,me,We,At,Yt,tr,Pt,jt){return l.extend(kg(Xe,ne,Fe,me,We,At,Yt,tr,!0,Pt),{u_texsize_icon:jt,u_texture_icon:1})},$m=function(Xe,ne){return{u_matrix:new l.UniformMatrix4f(Xe,ne.u_matrix),u_opacity:new l.Uniform1f(Xe,ne.u_opacity),u_color:new l.UniformColor(Xe,ne.u_color)}},Sh=function(Xe,ne){return{u_matrix:new l.UniformMatrix4f(Xe,ne.u_matrix),u_opacity:new l.Uniform1f(Xe,ne.u_opacity),u_image:new l.Uniform1i(Xe,ne.u_image),u_pattern_tl_a:new l.Uniform2f(Xe,ne.u_pattern_tl_a),u_pattern_br_a:new l.Uniform2f(Xe,ne.u_pattern_br_a),u_pattern_tl_b:new l.Uniform2f(Xe,ne.u_pattern_tl_b),u_pattern_br_b:new l.Uniform2f(Xe,ne.u_pattern_br_b),u_texsize:new l.Uniform2f(Xe,ne.u_texsize),u_mix:new l.Uniform1f(Xe,ne.u_mix),u_pattern_size_a:new l.Uniform2f(Xe,ne.u_pattern_size_a),u_pattern_size_b:new l.Uniform2f(Xe,ne.u_pattern_size_b),u_scale_a:new l.Uniform1f(Xe,ne.u_scale_a),u_scale_b:new l.Uniform1f(Xe,ne.u_scale_b),u_pixel_coord_upper:new l.Uniform2f(Xe,ne.u_pixel_coord_upper),u_pixel_coord_lower:new l.Uniform2f(Xe,ne.u_pixel_coord_lower),u_tile_units_to_pixels:new l.Uniform1f(Xe,ne.u_tile_units_to_pixels)}},Wm=function(Xe,ne,Fe){return{u_matrix:Xe,u_opacity:ne,u_color:Fe}},Iu=function(Xe,ne,Fe,me,We,At){return l.extend(c0(me,At,Fe,We),{u_matrix:Xe,u_opacity:ne})},Gu={fillExtrusion:H1,fillExtrusionPattern:Np,fill:Gm,fillPattern:Tm,fillOutline:ph,fillOutlinePattern:pv,circle:sn,collisionBox:Li,collisionCircle:Si,debug:uo,clippingMask:hs,heatmap:Bo,heatmapTexture:As,hillshade:ll,hillshadePrepare:Tu,line:cl,lineGradient:Os,linePattern:Vu,lineSDF:Nc,raster:vh,symbolIcon:gf,symbolSDF:rv,symbolTextAndIcon:nv,background:$m,backgroundPattern:Sh},Ym;function Vv(Xe,ne,Fe,me,We,At,Yt){for(var tr=Xe.context,Pt=tr.gl,jt=Xe.useProgram("collisionBox"),hr=[],qr=0,zr=0,Gr=0;Gr<me.length;Gr++){var en=me[Gr],Xr=ne.getTile(en),Rr=Xr.getBucket(Fe);if(Rr){var jr=en.posMatrix;(We[0]!==0||We[1]!==0)&&(jr=Xe.translatePosMatrix(en.posMatrix,Xr,We,At));var Br=Yt?Rr.textCollisionBox:Rr.iconCollisionBox,Bn=Rr.collisionCircleArray;if(Bn.length>0){var ui=l.create(),Ii=jr;l.mul(ui,Rr.placementInvProjMatrix,Xe.transform.glCoordMatrix),l.mul(ui,ui,Rr.placementViewportMatrix),hr.push({circleArray:Bn,circleOffset:zr,transform:Ii,invTransform:ui}),qr+=Bn.length/4,zr=qr}Br&&jt.draw(tr,Pt.LINES,Da.disabled,Sa.disabled,Xe.colorModeForRenderPass(),$n.disabled,ma(jr,Xe.transform,Xr),Fe.id,Br.layoutVertexBuffer,Br.indexBuffer,Br.segments,null,Xe.transform.zoom,null,null,Br.collisionVertexBuffer)}}if(!(!Yt||!hr.length)){var Ga=Xe.useProgram("collisionCircle"),ka=new l.StructArrayLayout2f1f2i16;ka.resize(qr*4),ka._trim();for(var wa=0,$a=0,Ja=hr;$a<Ja.length;$a+=1)for(var wo=Ja[$a],Ya=0;Ya<wo.circleArray.length/4;Ya++){var Ro=Ya*4,Xo=wo.circleArray[Ro+0],Rs=wo.circleArray[Ro+1],Qs=wo.circleArray[Ro+2],cc=wo.circleArray[Ro+3];ka.emplace(wa++,Xo,Rs,Qs,cc,0),ka.emplace(wa++,Xo,Rs,Qs,cc,1),ka.emplace(wa++,Xo,Rs,Qs,cc,2),ka.emplace(wa++,Xo,Rs,Qs,cc,3)}(!Ym||Ym.length<qr*2)&&(Ym=kv(qr));for(var ac=tr.createIndexBuffer(Ym,!0),yf=tr.createVertexBuffer(ka,l.collisionCircleLayout.members,!0),ff=0,_f=hr;ff<_f.length;ff+=1){var bf=_f[ff],hp=yo(bf.transform,bf.invTransform,Xe.transform);Ga.draw(tr,Pt.TRIANGLES,Da.disabled,Sa.disabled,Xe.colorModeForRenderPass(),$n.disabled,hp,Fe.id,yf,ac,l.SegmentVector.simpleSegment(0,bf.circleOffset*2,bf.circleArray.length,bf.circleArray.length/2),null,Xe.transform.zoom,null,null,null)}yf.destroy(),ac.destroy()}}function kv(Xe){var ne=Xe*2,Fe=new l.StructArrayLayout3ui6;Fe.resize(ne),Fe._trim();for(var me=0;me<ne;me++){var We=me*6;Fe.uint16[We+0]=me*4+0,Fe.uint16[We+1]=me*4+1,Fe.uint16[We+2]=me*4+2,Fe.uint16[We+3]=me*4+2,Fe.uint16[We+4]=me*4+3,Fe.uint16[We+5]=me*4+0}return Fe}var wt=l.identity(new Float32Array(16));function q(Xe,ne,Fe,me,We){if(Xe.renderPass==="translucent"){var At=Sa.disabled,Yt=Xe.colorModeForRenderPass(),tr=Fe.layout.get("text-variable-anchor");tr&&it(me,Xe,Fe,ne,Fe.layout.get("text-rotation-alignment"),Fe.layout.get("text-pitch-alignment"),We),Fe.paint.get("icon-opacity").constantOr(1)!==0&&ar(Xe,ne,Fe,me,!1,Fe.paint.get("icon-translate"),Fe.paint.get("icon-translate-anchor"),Fe.layout.get("icon-rotation-alignment"),Fe.layout.get("icon-pitch-alignment"),Fe.layout.get("icon-keep-upright"),At,Yt),Fe.paint.get("text-opacity").constantOr(1)!==0&&ar(Xe,ne,Fe,me,!0,Fe.paint.get("text-translate"),Fe.paint.get("text-translate-anchor"),Fe.layout.get("text-rotation-alignment"),Fe.layout.get("text-pitch-alignment"),Fe.layout.get("text-keep-upright"),At,Yt),ne.map.showCollisionBoxes&&(Vv(Xe,ne,Fe,me,Fe.paint.get("text-translate"),Fe.paint.get("text-translate-anchor"),!0),Vv(Xe,ne,Fe,me,Fe.paint.get("icon-translate"),Fe.paint.get("icon-translate-anchor"),!1))}}function Ae(Xe,ne,Fe,me,We,At){var Yt=l.getAnchorAlignment(Xe),tr=Yt.horizontalAlign,Pt=Yt.verticalAlign,jt=-(tr-.5)*ne,hr=-(Pt-.5)*Fe,qr=l.evaluateVariableOffset(Xe,me);return new l.Point((jt/We+qr[0])*At,(hr/We+qr[1])*At)}function it(Xe,ne,Fe,me,We,At,Yt){for(var tr=ne.transform,Pt=We==="map",jt=At==="map",hr=0,qr=Xe;hr<qr.length;hr+=1){var zr=qr[hr],Gr=me.getTile(zr),en=Gr.getBucket(Fe);if(!(!en||!en.text||!en.text.segments.get().length)){var Xr=en.textSizeData,Rr=l.evaluateSizeForZoom(Xr,tr.zoom),jr=lu(Gr,1,ne.transform.zoom),Br=Ea(zr.posMatrix,jt,Pt,ne.transform,jr),Bn=Fe.layout.get("icon-text-fit")!=="none"&&en.hasIconData();if(Rr){var ui=Math.pow(2,tr.zoom-Gr.tileID.overscaledZ);ot(en,Pt,jt,Yt,l.symbolSize,tr,Br,zr.posMatrix,ui,Rr,Bn)}}}}function ot(Xe,ne,Fe,me,We,At,Yt,tr,Pt,jt,hr){var qr=Xe.text.placedSymbolArray,zr=Xe.text.dynamicLayoutVertexArray,Gr=Xe.icon.dynamicLayoutVertexArray,en={};zr.clear();for(var Xr=0;Xr<qr.length;Xr++){var Rr=qr.get(Xr),jr=Xe.allowVerticalPlacement&&!Rr.placedOrientation,Br=!Rr.hidden&&Rr.crossTileID&&!jr?me[Rr.crossTileID]:null;if(!Br)zc(Rr.numGlyphs,zr);else{var Bn=new l.Point(Rr.anchorX,Rr.anchorY),ui=No(Bn,Fe?tr:Yt),Ii=Vs(At.cameraToCenterDistance,ui.signedDistanceFromCamera),Ga=We.evaluateSizeForFeature(Xe.textSizeData,jt,Rr)*Ii/l.ONE_EM;Fe&&(Ga*=Xe.tilePixelRatio/Pt);for(var ka=Br.width,wa=Br.height,$a=Br.anchor,Ja=Br.textOffset,wo=Br.textBoxScale,Ya=Ae($a,ka,wa,Ja,wo,Ga),Ro=Fe?No(Bn.add(Ya),Yt).point:ui.point.add(ne?Ya.rotate(-At.angle):Ya),Xo=Xe.allowVerticalPlacement&&Rr.placedOrientation===l.WritingMode.vertical?Math.PI/2:0,Rs=0;Rs<Rr.numGlyphs;Rs++)l.addDynamicAttributes(zr,Ro,Xo);hr&&Rr.associatedIconIndex>=0&&(en[Rr.associatedIconIndex]={shiftedAnchor:Ro,angle:Xo})}}if(hr){Gr.clear();for(var Qs=Xe.icon.placedSymbolArray,cc=0;cc<Qs.length;cc++){var ac=Qs.get(cc);if(ac.hidden)zc(ac.numGlyphs,Gr);else{var yf=en[cc];if(!yf)zc(ac.numGlyphs,Gr);else for(var ff=0;ff<ac.numGlyphs;ff++)l.addDynamicAttributes(Gr,yf.shiftedAnchor,yf.angle)}}Xe.icon.dynamicLayoutVertexBuffer.updateData(Gr)}Xe.text.dynamicLayoutVertexBuffer.updateData(zr)}function bt(Xe,ne,Fe){return Fe.iconsInText&&ne?"symbolTextAndIcon":Xe?"symbolSDF":"symbolIcon"}function ar(Xe,ne,Fe,me,We,At,Yt,tr,Pt,jt,hr,qr){for(var zr=Xe.context,Gr=zr.gl,en=Xe.transform,Xr=tr==="map",Rr=Pt==="map",jr=Xr&&Fe.layout.get("symbol-placement")!=="point",Br=Xr&&!Rr&&!jr,Bn=Fe.layout.get("symbol-sort-key").constantOr(1)!==void 0,ui=!1,Ii=Xe.depthModeForSublayer(0,Da.ReadOnly),Ga=Fe.layout.get("text-variable-anchor"),ka=[],wa=0,$a=me;wa<$a.length;wa+=1){var Ja=$a[wa],wo=ne.getTile(Ja),Ya=wo.getBucket(Fe);if(Ya){var Ro=We?Ya.text:Ya.icon;if(!(!Ro||!Ro.segments.get().length)){var Xo=Ro.programConfigurations.get(Fe.id),Rs=We||Ya.sdfIcons,Qs=We?Ya.textSizeData:Ya.iconSizeData,cc=Rr||en.pitch!==0,ac=Xe.useProgram(bt(Rs,We,Ya),Xo),yf=l.evaluateSizeForZoom(Qs,en.zoom),ff=void 0,_f=[0,0],bf=void 0,hp=void 0,af=null,ch=void 0;if(We){if(bf=wo.glyphAtlasTexture,hp=Gr.LINEAR,ff=wo.glyphAtlasTexture.size,Ya.iconsInText){_f=wo.imageAtlasTexture.size,af=wo.imageAtlasTexture;var Ig=Qs.kind==="composite"||Qs.kind==="camera";ch=cc||Xe.options.rotating||Xe.options.zooming||Ig?Gr.LINEAR:Gr.NEAREST}}else{var R0=Fe.layout.get("icon-size").constantOr(0)!==1||Ya.iconsNeedLinear;bf=wo.imageAtlasTexture,hp=Rs||Xe.options.rotating||Xe.options.zooming||R0||cc?Gr.LINEAR:Gr.NEAREST,ff=wo.imageAtlasTexture.size}var Tw=lu(wo,1,Xe.transform.zoom),Ew=Ea(Ja.posMatrix,Rr,Xr,Xe.transform,Tw),ex=cs(Ja.posMatrix,Rr,Xr,Xe.transform,Tw),A2=Ga&&Ya.hasTextData(),uC=Fe.layout.get("icon-text-fit")!=="none"&&A2&&Ya.hasIconData();jr&&kl(Ya,Ja.posMatrix,Xe,We,Ew,ex,Rr,jt);var RS=Xe.translatePosMatrix(Ja.posMatrix,wo,At,Yt),tx=jr||We&&Ga||uC?wt:Ew,kS=Xe.translatePosMatrix(ex,wo,At,Yt,!0),zx=Rs&&Fe.paint.get(We?"text-halo-width":"icon-halo-width").constantOr(1)!==0,rx=void 0;Rs?Ya.iconsInText?rx=iv(Qs.kind,yf,Br,Rr,Xe,RS,tx,kS,ff,_f):rx=kg(Qs.kind,yf,Br,Rr,Xe,RS,tx,kS,We,ff):rx=vv(Qs.kind,yf,Br,Rr,Xe,RS,tx,kS,We,ff);var Aw={program:ac,buffers:Ro,uniformValues:rx,atlasTexture:bf,atlasTextureIcon:af,atlasInterpolation:hp,atlasInterpolationIcon:ch,isSDF:Rs,hasHalo:zx};if(Bn&&Ya.canOverlap){ui=!0;for(var C2=Ro.segments.get(),Cw=0,zR=C2;Cw<zR.length;Cw+=1){var cC=zR[Cw];ka.push({segments:new l.SegmentVector([cC]),sortKey:cC.sortKey,state:Aw})}}else ka.push({segments:Ro.segments,sortKey:0,state:Aw})}}}ui&&ka.sort(function(OI,NI){return OI.sortKey-NI.sortKey});for(var Dy=0,fC=ka;Dy<fC.length;Dy+=1){var BR=fC[Dy],j1=BR.state;if(zr.activeTexture.set(Gr.TEXTURE0),j1.atlasTexture.bind(j1.atlasInterpolation,Gr.CLAMP_TO_EDGE),j1.atlasTextureIcon&&(zr.activeTexture.set(Gr.TEXTURE1),j1.atlasTextureIcon&&j1.atlasTextureIcon.bind(j1.atlasInterpolationIcon,Gr.CLAMP_TO_EDGE)),j1.isSDF){var WM=j1.uniformValues;j1.hasHalo&&(WM.u_is_halo=1,yr(j1.buffers,BR.segments,Fe,Xe,j1.program,Ii,hr,qr,WM)),WM.u_is_halo=0}yr(j1.buffers,BR.segments,Fe,Xe,j1.program,Ii,hr,qr,j1.uniformValues)}}function yr(Xe,ne,Fe,me,We,At,Yt,tr,Pt){var jt=me.context,hr=jt.gl;We.draw(jt,hr.TRIANGLES,At,Yt,tr,$n.disabled,Pt,Fe.id,Xe.layoutVertexBuffer,Xe.indexBuffer,ne,Fe.paint,me.transform.zoom,Xe.programConfigurations.get(Fe.id),Xe.dynamicLayoutVertexBuffer,Xe.opacityVertexBuffer)}function Ur(Xe,ne,Fe,me){if(Xe.renderPass==="translucent"){var We=Fe.paint.get("circle-opacity"),At=Fe.paint.get("circle-stroke-width"),Yt=Fe.paint.get("circle-stroke-opacity"),tr=Fe.layout.get("circle-sort-key").constantOr(1)!==void 0;if(!(We.constantOr(1)===0&&(At.constantOr(1)===0||Yt.constantOr(1)===0))){for(var Pt=Xe.context,jt=Pt.gl,hr=Xe.depthModeForSublayer(0,Da.ReadOnly),qr=Sa.disabled,zr=Xe.colorModeForRenderPass(),Gr=[],en=0;en<me.length;en++){var Xr=me[en],Rr=ne.getTile(Xr),jr=Rr.getBucket(Fe);if(jr){var Br=jr.programConfigurations.get(Fe.id),Bn=Xe.useProgram("circle",Br),ui=jr.layoutVertexBuffer,Ii=jr.indexBuffer,Ga=Fn(Xe,Xr,Rr,Fe),ka={programConfiguration:Br,program:Bn,layoutVertexBuffer:ui,indexBuffer:Ii,uniformValues:Ga};if(tr)for(var wa=jr.segments.get(),$a=0,Ja=wa;$a<Ja.length;$a+=1){var wo=Ja[$a];Gr.push({segments:new l.SegmentVector([wo]),sortKey:wo.sortKey,state:ka})}else Gr.push({segments:jr.segments,sortKey:0,state:ka})}}tr&&Gr.sort(function(bf,hp){return bf.sortKey-hp.sortKey});for(var Ya=0,Ro=Gr;Ya<Ro.length;Ya+=1){var Xo=Ro[Ya],Rs=Xo.state,Qs=Rs.programConfiguration,cc=Rs.program,ac=Rs.layoutVertexBuffer,yf=Rs.indexBuffer,ff=Rs.uniformValues,_f=Xo.segments;cc.draw(Pt,jt.TRIANGLES,hr,qr,zr,$n.disabled,ff,Fe.id,ac,yf,_f,Fe.paint,Xe.transform.zoom,Qs)}}}}function ln(Xe,ne,Fe,me){if(Fe.paint.get("heatmap-opacity")!==0)if(Xe.renderPass==="offscreen"){var We=Xe.context,At=We.gl,Yt=Sa.disabled,tr=new Hr([At.ONE,At.ONE],l.Color.transparent,[!0,!0,!0,!0]);Cn(We,Xe,Fe),We.clear({color:l.Color.transparent});for(var Pt=0;Pt<me.length;Pt++){var jt=me[Pt];if(!ne.hasRenderableParent(jt)){var hr=ne.getTile(jt),qr=hr.getBucket(Fe);if(qr){var zr=qr.programConfigurations.get(Fe.id),Gr=Xe.useProgram("heatmap",zr),en=Xe.transform,Xr=en.zoom;Gr.draw(We,At.TRIANGLES,Da.disabled,Yt,tr,$n.disabled,Jo(jt.posMatrix,hr,Xr,Fe.paint.get("heatmap-intensity")),Fe.id,qr.layoutVertexBuffer,qr.indexBuffer,qr.segments,Fe.paint,Xe.transform.zoom,zr)}}}We.viewport.set([0,0,Xe.width,Xe.height])}else Xe.renderPass==="translucent"&&(Xe.context.setColorMode(Xe.colorModeForRenderPass()),vi(Xe,Fe))}function Cn(Xe,ne,Fe){var me=Xe.gl;Xe.activeTexture.set(me.TEXTURE1),Xe.viewport.set([0,0,ne.width/4,ne.height/4]);var We=Fe.heatmapFbo;if(We)me.bindTexture(me.TEXTURE_2D,We.colorAttachment.get()),Xe.bindFramebuffer.set(We.framebuffer);else{var At=me.createTexture();me.bindTexture(me.TEXTURE_2D,At),me.texParameteri(me.TEXTURE_2D,me.TEXTURE_WRAP_S,me.CLAMP_TO_EDGE),me.texParameteri(me.TEXTURE_2D,me.TEXTURE_WRAP_T,me.CLAMP_TO_EDGE),me.texParameteri(me.TEXTURE_2D,me.TEXTURE_MIN_FILTER,me.LINEAR),me.texParameteri(me.TEXTURE_2D,me.TEXTURE_MAG_FILTER,me.LINEAR),We=Fe.heatmapFbo=Xe.createFramebuffer(ne.width/4,ne.height/4,!1),Pn(Xe,ne,At,We)}}function Pn(Xe,ne,Fe,me){var We=Xe.gl,At=Xe.extRenderToTextureHalfFloat?Xe.extTextureHalfFloat.HALF_FLOAT_OES:We.UNSIGNED_BYTE;We.texImage2D(We.TEXTURE_2D,0,We.RGBA,ne.width/4,ne.height/4,0,We.RGBA,At,null),me.colorAttachment.set(Fe)}function vi(Xe,ne){var Fe=Xe.context,me=Fe.gl,We=ne.heatmapFbo;if(We){Fe.activeTexture.set(me.TEXTURE0),me.bindTexture(me.TEXTURE_2D,We.colorAttachment.get()),Fe.activeTexture.set(me.TEXTURE1);var At=ne.colorRampTexture;At||(At=ne.colorRampTexture=new l.Texture(Fe,ne.colorRamp,me.RGBA)),At.bind(me.LINEAR,me.CLAMP_TO_EDGE),Xe.useProgram("heatmapTexture").draw(Fe,me.TRIANGLES,Da.disabled,Sa.disabled,Xe.colorModeForRenderPass(),$n.disabled,Io(Xe,ne,0,1),ne.id,Xe.viewportBuffer,Xe.quadTriangleIndexBuffer,Xe.viewportSegments,ne.paint,Xe.transform.zoom)}}function Ui(Xe,ne,Fe,me){if(Xe.renderPass==="translucent"){var We=Fe.paint.get("line-opacity"),At=Fe.paint.get("line-width");if(!(We.constantOr(1)===0||At.constantOr(1)===0))for(var Yt=Xe.depthModeForSublayer(0,Da.ReadOnly),tr=Xe.colorModeForRenderPass(),Pt=Fe.paint.get("line-dasharray"),jt=Fe.paint.get("line-pattern"),hr=jt.constantOr(1),qr=Fe.paint.get("line-gradient"),zr=Fe.getCrossfadeParameters(),Gr=hr?"linePattern":Pt?"lineSDF":qr?"lineGradient":"line",en=Xe.context,Xr=en.gl,Rr=!0,jr=0,Br=me;jr<Br.length;jr+=1){var Bn=Br[jr],ui=ne.getTile(Bn);if(!(hr&&!ui.patternsLoaded())){var Ii=ui.getBucket(Fe);if(Ii){var Ga=Ii.programConfigurations.get(Fe.id),ka=Xe.context.program.get(),wa=Xe.useProgram(Gr,Ga),$a=Rr||wa.program!==ka,Ja=jt.constantOr(null);if(Ja&&ui.imageAtlas){var wo=ui.imageAtlas,Ya=wo.patternPositions[Ja.to.toString()],Ro=wo.patternPositions[Ja.from.toString()];Ya&&Ro&&Ga.setConstantPatternPositions(Ya,Ro)}var Xo=hr?Cf(Xe,ui,Fe,zr):Pt?ld(Xe,ui,Fe,Pt,zr):qr?sd(Xe,ui,Fe,Ii.lineClipsArray.length):Sf(Xe,ui,Fe);if(hr)en.activeTexture.set(Xr.TEXTURE0),ui.imageAtlasTexture.bind(Xr.LINEAR,Xr.CLAMP_TO_EDGE),Ga.updatePaintBuffers(zr);else if(Pt&&($a||Xe.lineAtlas.dirty))en.activeTexture.set(Xr.TEXTURE0),Xe.lineAtlas.bind(en);else if(qr){var Rs=Ii.gradients[Fe.id],Qs=Rs.texture;if(Fe.gradientVersion!==Rs.version){var cc=256;if(Fe.stepInterpolant){var ac=ne.getSource().maxzoom,yf=Bn.canonical.z===ac?Math.ceil(1<<Xe.transform.maxZoom-Bn.canonical.z):1,ff=Ii.maxLineLength/l.EXTENT,_f=1024,bf=ff*_f*yf;cc=l.clamp(l.nextPowerOfTwo(bf),256,en.maxTextureSize)}Rs.gradient=l.renderColorRamp({expression:Fe.gradientExpression(),evaluationKey:"lineProgress",resolution:cc,image:Rs.gradient||void 0,clips:Ii.lineClipsArray}),Rs.texture?Rs.texture.update(Rs.gradient):Rs.texture=new l.Texture(en,Rs.gradient,Xr.RGBA),Rs.version=Fe.gradientVersion,Qs=Rs.texture}en.activeTexture.set(Xr.TEXTURE0),Qs.bind(Fe.stepInterpolant?Xr.NEAREST:Xr.LINEAR,Xr.CLAMP_TO_EDGE)}wa.draw(en,Xr.TRIANGLES,Yt,Xe.stencilModeForClipping(Bn),tr,$n.disabled,Xo,Fe.id,Ii.layoutVertexBuffer,Ii.indexBuffer,Ii.segments,Fe.paint,Xe.transform.zoom,Ga,Ii.layoutVertexBuffer2),Rr=!1}}}}}function kt(Xe,ne,Fe,me){var We=Fe.paint.get("fill-color"),At=Fe.paint.get("fill-opacity");if(At.constantOr(1)!==0){var Yt=Xe.colorModeForRenderPass(),tr=Fe.paint.get("fill-pattern"),Pt=Xe.opaquePassEnabledForLayer()&&!tr.constantOr(1)&&We.constantOr(l.Color.transparent).a===1&&At.constantOr(0)===1?"opaque":"translucent";if(Xe.renderPass===Pt){var jt=Xe.depthModeForSublayer(1,Xe.renderPass==="opaque"?Da.ReadWrite:Da.ReadOnly);zt(Xe,ne,Fe,me,jt,Yt,!1)}if(Xe.renderPass==="translucent"&&Fe.paint.get("fill-antialias")){var hr=Xe.depthModeForSublayer(Fe.getPaintProperty("fill-outline-color")?2:0,Da.ReadOnly);zt(Xe,ne,Fe,me,hr,Yt,!0)}}}function zt(Xe,ne,Fe,me,We,At,Yt){var tr=Xe.context.gl,Pt=Fe.paint.get("fill-pattern"),jt=Pt&&Pt.constantOr(1),hr=Fe.getCrossfadeParameters(),qr,zr,Gr,en,Xr;Yt?(zr=jt&&!Fe.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",qr=tr.LINES):(zr=jt?"fillPattern":"fill",qr=tr.TRIANGLES);for(var Rr=0,jr=me;Rr<jr.length;Rr+=1){var Br=jr[Rr],Bn=ne.getTile(Br);if(!(jt&&!Bn.patternsLoaded())){var ui=Bn.getBucket(Fe);if(ui){var Ii=ui.programConfigurations.get(Fe.id),Ga=Xe.useProgram(zr,Ii);jt&&(Xe.context.activeTexture.set(tr.TEXTURE0),Bn.imageAtlasTexture.bind(tr.LINEAR,tr.CLAMP_TO_EDGE),Ii.updatePaintBuffers(hr));var ka=Pt.constantOr(null);if(ka&&Bn.imageAtlas){var wa=Bn.imageAtlas,$a=wa.patternPositions[ka.to.toString()],Ja=wa.patternPositions[ka.from.toString()];$a&&Ja&&Ii.setConstantPatternPositions($a,Ja)}var wo=Xe.translatePosMatrix(Br.posMatrix,Bn,Fe.paint.get("fill-translate"),Fe.paint.get("fill-translate-anchor"));if(!Yt)en=ui.indexBuffer,Xr=ui.segments,Gr=jt?dg(wo,Xe,hr,Bn):Yd(wo);else{en=ui.indexBuffer2,Xr=ui.segments2;var Ya=[tr.drawingBufferWidth,tr.drawingBufferHeight];Gr=zr==="fillOutlinePattern"&&jt?iy(wo,Xe,hr,Bn,Ya):Em(wo,Ya)}Ga.draw(Xe.context,qr,We,Xe.stencilModeForClipping(Br),At,$n.disabled,Gr,Fe.id,ui.layoutVertexBuffer,en,Xr,Fe.paint,Xe.transform.zoom,Ii)}}}}function Qt(Xe,ne,Fe,me){var We=Fe.paint.get("fill-extrusion-opacity");if(We!==0&&Xe.renderPass==="translucent"){var At=new Da(Xe.context.gl.LEQUAL,Da.ReadWrite,Xe.depthRangeFor3D);if(We===1&&!Fe.paint.get("fill-extrusion-pattern").constantOr(1)){var Yt=Xe.colorModeForRenderPass();cr(Xe,ne,Fe,me,At,Sa.disabled,Yt)}else cr(Xe,ne,Fe,me,At,Sa.disabled,Hr.disabled),cr(Xe,ne,Fe,me,At,Xe.stencilModeFor3D(),Xe.colorModeForRenderPass())}}function cr(Xe,ne,Fe,me,We,At,Yt){for(var tr=Xe.context,Pt=tr.gl,jt=Fe.paint.get("fill-extrusion-pattern"),hr=jt.constantOr(1),qr=Fe.getCrossfadeParameters(),zr=Fe.paint.get("fill-extrusion-opacity"),Gr=0,en=me;Gr<en.length;Gr+=1){var Xr=en[Gr],Rr=ne.getTile(Xr),jr=Rr.getBucket(Fe);if(jr){var Br=jr.programConfigurations.get(Fe.id),Bn=Xe.useProgram(hr?"fillExtrusionPattern":"fillExtrusion",Br);hr&&(Xe.context.activeTexture.set(Pt.TEXTURE0),Rr.imageAtlasTexture.bind(Pt.LINEAR,Pt.CLAMP_TO_EDGE),Br.updatePaintBuffers(qr));var ui=jt.constantOr(null);if(ui&&Rr.imageAtlas){var Ii=Rr.imageAtlas,Ga=Ii.patternPositions[ui.to.toString()],ka=Ii.patternPositions[ui.from.toString()];Ga&&ka&&Br.setConstantPatternPositions(Ga,ka)}var wa=Xe.translatePosMatrix(Xr.posMatrix,Rr,Fe.paint.get("fill-extrusion-translate"),Fe.paint.get("fill-extrusion-translate-anchor")),$a=Fe.paint.get("fill-extrusion-vertical-gradient"),Ja=hr?jv(wa,Xe,$a,zr,Xr,qr,Rr):Py(wa,Xe,$a,zr);Bn.draw(tr,tr.gl.TRIANGLES,We,At,Yt,$n.backCCW,Ja,Fe.id,jr.layoutVertexBuffer,jr.indexBuffer,jr.segments,Fe.paint,Xe.transform.zoom,Br)}}}function Sr(Xe,ne,Fe,me){if(!(Xe.renderPass!=="offscreen"&&Xe.renderPass!=="translucent")){for(var We=Xe.context,At=Xe.depthModeForSublayer(0,Da.ReadOnly),Yt=Xe.colorModeForRenderPass(),tr=Xe.renderPass==="translucent"?Xe.stencilConfigForOverlap(me):[{},me],Pt=tr[0],jt=tr[1],hr=0,qr=jt;hr<qr.length;hr+=1){var zr=qr[hr],Gr=ne.getTile(zr);Gr.needsHillshadePrepare&&Xe.renderPass==="offscreen"?Nr(Xe,Gr,Fe,At,Sa.disabled,Yt):Xe.renderPass==="translucent"&&gr(Xe,Gr,Fe,At,Pt[zr.overscaledZ],Yt)}We.viewport.set([0,0,Xe.width,Xe.height])}}function gr(Xe,ne,Fe,me,We,At){var Yt=Xe.context,tr=Yt.gl,Pt=ne.fbo;if(Pt){var jt=Xe.useProgram("hillshade");Yt.activeTexture.set(tr.TEXTURE0),tr.bindTexture(tr.TEXTURE_2D,Pt.colorAttachment.get());var hr=du(Xe,ne,Fe);jt.draw(Yt,tr.TRIANGLES,me,We,At,$n.disabled,hr,Fe.id,Xe.rasterBoundsBuffer,Xe.quadTriangleIndexBuffer,Xe.rasterBoundsSegments)}}function Nr(Xe,ne,Fe,me,We,At){var Yt=Xe.context,tr=Yt.gl,Pt=ne.dem;if(Pt&&Pt.data){var jt=Pt.dim,hr=Pt.stride,qr=Pt.getPixels();if(Yt.activeTexture.set(tr.TEXTURE1),Yt.pixelStoreUnpackPremultiplyAlpha.set(!1),ne.demTexture=ne.demTexture||Xe.getTileTexture(hr),ne.demTexture){var zr=ne.demTexture;zr.update(qr,{premultiply:!1}),zr.bind(tr.NEAREST,tr.CLAMP_TO_EDGE)}else ne.demTexture=new l.Texture(Yt,qr,tr.RGBA,{premultiply:!1}),ne.demTexture.bind(tr.NEAREST,tr.CLAMP_TO_EDGE);Yt.activeTexture.set(tr.TEXTURE0);var Gr=ne.fbo;if(!Gr){var en=new l.Texture(Yt,{width:jt,height:jt,data:null},tr.RGBA);en.bind(tr.LINEAR,tr.CLAMP_TO_EDGE),Gr=ne.fbo=Yt.createFramebuffer(jt,jt,!0),Gr.colorAttachment.set(en.texture)}Yt.bindFramebuffer.set(Gr.framebuffer),Yt.viewport.set([0,0,jt,jt]),Xe.useProgram("hillshadePrepare").draw(Yt,tr.TRIANGLES,me,We,At,$n.disabled,ku(ne.tileID,Pt),Fe.id,Xe.rasterBoundsBuffer,Xe.quadTriangleIndexBuffer,Xe.rasterBoundsSegments),ne.needsHillshadePrepare=!1}}function vn(Xe,ne,Fe,me){if(Xe.renderPass==="translucent"&&Fe.paint.get("raster-opacity")!==0&&me.length)for(var We=Xe.context,At=We.gl,Yt=ne.getSource(),tr=Xe.useProgram("raster"),Pt=Xe.colorModeForRenderPass(),jt=Yt instanceof ke?[{},me]:Xe.stencilConfigForOverlap(me),hr=jt[0],qr=jt[1],zr=qr[qr.length-1].overscaledZ,Gr=!Xe.options.moving,en=0,Xr=qr;en<Xr.length;en+=1){var Rr=Xr[en],jr=Xe.depthModeForSublayer(Rr.overscaledZ-zr,Fe.paint.get("raster-opacity")===1?Da.ReadWrite:Da.ReadOnly,At.LESS),Br=ne.getTile(Rr),Bn=Xe.transform.calculatePosMatrix(Rr.toUnwrapped(),Gr);Br.registerFadeDuration(Fe.paint.get("raster-fade-duration"));var ui=ne.findLoadedParent(Rr,0),Ii=An(Br,ui,ne,Fe,Xe.transform),Ga=void 0,ka=void 0,wa=Fe.paint.get("raster-resampling")==="nearest"?At.NEAREST:At.LINEAR;We.activeTexture.set(At.TEXTURE0),Br.texture.bind(wa,At.CLAMP_TO_EDGE,At.LINEAR_MIPMAP_NEAREST),We.activeTexture.set(At.TEXTURE1),ui?(ui.texture.bind(wa,At.CLAMP_TO_EDGE,At.LINEAR_MIPMAP_NEAREST),Ga=Math.pow(2,ui.tileID.overscaledZ-Br.tileID.overscaledZ),ka=[Br.tileID.canonical.x*Ga%1,Br.tileID.canonical.y*Ga%1]):Br.texture.bind(wa,At.CLAMP_TO_EDGE,At.LINEAR_MIPMAP_NEAREST);var $a=rd(Bn,ka||[0,0],Ga||1,Ii,Fe);Yt instanceof ke?tr.draw(We,At.TRIANGLES,jr,Sa.disabled,Pt,$n.disabled,$a,Fe.id,Yt.boundsBuffer,Xe.quadTriangleIndexBuffer,Yt.boundsSegments):tr.draw(We,At.TRIANGLES,jr,hr[Rr.overscaledZ],Pt,$n.disabled,$a,Fe.id,Xe.rasterBoundsBuffer,Xe.quadTriangleIndexBuffer,Xe.rasterBoundsSegments)}}function An(Xe,ne,Fe,me,We){var At=me.paint.get("raster-fade-duration");if(At>0){var Yt=l.browser.now(),tr=(Yt-Xe.timeAdded)/At,Pt=ne?(Yt-ne.timeAdded)/At:-1,jt=Fe.getSource(),hr=We.coveringZoomLevel({tileSize:jt.tileSize,roundZoom:jt.roundZoom}),qr=!ne||Math.abs(ne.tileID.overscaledZ-hr)>Math.abs(Xe.tileID.overscaledZ-hr),zr=qr&&Xe.refreshedUponExpiration?1:l.clamp(qr?tr:1-Pt,0,1);return Xe.refreshedUponExpiration&&tr>=1&&(Xe.refreshedUponExpiration=!1),ne?{opacity:1,mix:1-zr}:{opacity:zr,mix:0}}else return{opacity:1,mix:0}}function Ln(Xe,ne,Fe){var me=Fe.paint.get("background-color"),We=Fe.paint.get("background-opacity");if(We!==0){var At=Xe.context,Yt=At.gl,tr=Xe.transform,Pt=tr.tileSize,jt=Fe.paint.get("background-pattern");if(!Xe.isPatternMissing(jt)){var hr=!jt&&me.a===1&&We===1&&Xe.opaquePassEnabledForLayer()?"opaque":"translucent";if(Xe.renderPass===hr){var qr=Sa.disabled,zr=Xe.depthModeForSublayer(0,hr==="opaque"?Da.ReadWrite:Da.ReadOnly),Gr=Xe.colorModeForRenderPass(),en=Xe.useProgram(jt?"backgroundPattern":"background"),Xr=tr.coveringTiles({tileSize:Pt});jt&&(At.activeTexture.set(Yt.TEXTURE0),Xe.imageManager.bind(Xe.context));for(var Rr=Fe.getCrossfadeParameters(),jr=0,Br=Xr;jr<Br.length;jr+=1){var Bn=Br[jr],ui=Xe.transform.calculatePosMatrix(Bn.toUnwrapped()),Ii=jt?Iu(ui,We,Xe,jt,{tileID:Bn,tileSize:Pt},Rr):Wm(ui,We,me);en.draw(At,Yt.TRIANGLES,zr,qr,Gr,$n.disabled,Ii,Fe.id,Xe.tileExtentBuffer,Xe.quadTriangleIndexBuffer,Xe.tileExtentSegments)}}}}}var ai=new l.Color(1,0,0,1),ki=new l.Color(0,1,0,1),ra=new l.Color(0,0,1,1),oa=new l.Color(1,0,1,1),Ma=new l.Color(0,1,1,1);function mo(Xe){var ne=Xe.transform.padding,Fe=3;$o(Xe,Xe.transform.height-(ne.top||0),Fe,ai),$o(Xe,ne.bottom||0,Fe,ki),as(Xe,ne.left||0,Fe,ra),as(Xe,Xe.transform.width-(ne.right||0),Fe,oa);var me=Xe.transform.centerPoint;ns(Xe,me.x,Xe.transform.height-me.y,Ma)}function ns(Xe,ne,Fe,me){var We=20,At=2;fl(Xe,ne-At/2,Fe-We/2,At,We,me),fl(Xe,ne-We/2,Fe-At/2,We,At,me)}function $o(Xe,ne,Fe,me){fl(Xe,0,ne+Fe/2,Xe.transform.width,Fe,me)}function as(Xe,ne,Fe,me){fl(Xe,ne-Fe/2,0,Fe,Xe.transform.height,me)}function fl(Xe,ne,Fe,me,We,At){var Yt=Xe.context,tr=Yt.gl;tr.enable(tr.SCISSOR_TEST),tr.scissor(ne*l.browser.devicePixelRatio,Fe*l.browser.devicePixelRatio,me*l.browser.devicePixelRatio,We*l.browser.devicePixelRatio),Yt.clear({color:At}),tr.disable(tr.SCISSOR_TEST)}function Zl(Xe,ne,Fe){for(var me=0;me<Fe.length;me++)Fl(Xe,ne,Fe[me])}function Fl(Xe,ne,Fe){var me=Xe.context,We=me.gl,At=Fe.posMatrix,Yt=Xe.useProgram("debug"),tr=Da.disabled,Pt=Sa.disabled,jt=Xe.colorModeForRenderPass(),hr="$debug";me.activeTexture.set(We.TEXTURE0),Xe.emptyTexture.bind(We.LINEAR,We.CLAMP_TO_EDGE),Yt.draw(me,We.LINE_STRIP,tr,Pt,jt,$n.disabled,rs(At,l.Color.red),hr,Xe.debugBuffer,Xe.tileBorderIndexBuffer,Xe.debugSegments);var qr=ne.getTileByID(Fe.key).latestRawTileData,zr=qr&&qr.byteLength||0,Gr=Math.floor(zr/1024),en=ne.getTile(Fe).tileSize,Xr=512/Math.min(en,512)*(Fe.overscaledZ/Xe.transform.zoom)*.5,Rr=Fe.canonical.toString();Fe.overscaledZ!==Fe.canonical.z&&(Rr+=" => "+Fe.overscaledZ);var jr=Rr+" "+Gr+"kb";Du(Xe,jr),Yt.draw(me,We.TRIANGLES,tr,Pt,Hr.alphaBlended,$n.disabled,rs(At,l.Color.transparent,Xr),hr,Xe.debugBuffer,Xe.quadTriangleIndexBuffer,Xe.debugSegments)}function Du(Xe,ne){Xe.initDebugOverlayCanvas();var Fe=Xe.debugOverlayCanvas,me=Xe.context.gl,We=Xe.debugOverlayCanvas.getContext("2d");We.clearRect(0,0,Fe.width,Fe.height),We.shadowColor="white",We.shadowBlur=2,We.lineWidth=1.5,We.strokeStyle="white",We.textBaseline="top",We.font="bold 36px Open Sans, sans-serif",We.fillText(ne,5,5),We.strokeText(ne,5,5),Xe.debugOverlayTexture.update(Fe),Xe.debugOverlayTexture.bind(me.LINEAR,me.CLAMP_TO_EDGE)}function qc(Xe,ne,Fe){var me=Xe.context,We=Fe.implementation;if(Xe.renderPass==="offscreen"){var At=We.prerender;At&&(Xe.setCustomLayerDefaults(),me.setColorMode(Xe.colorModeForRenderPass()),At.call(We,me.gl,Xe.transform.customLayerMatrix()),me.setDirty(),Xe.setBaseState())}else if(Xe.renderPass==="translucent"){Xe.setCustomLayerDefaults(),me.setColorMode(Xe.colorModeForRenderPass()),me.setStencilMode(Sa.disabled);var Yt=We.renderingMode==="3d"?new Da(Xe.context.gl.LEQUAL,Da.ReadWrite,Xe.depthRangeFor3D):Xe.depthModeForSublayer(0,Da.ReadOnly);me.setDepthMode(Yt),We.render(me.gl,Xe.transform.customLayerMatrix()),me.setDirty(),Xe.setBaseState(),me.bindFramebuffer.set(null)}}var Gc={symbol:q,circle:Ur,heatmap:ln,line:Ui,fill:kt,"fill-extrusion":Qt,hillshade:Sr,raster:vn,background:Ln,debug:Zl,custom:qc},_c=function(ne,Fe){this.context=new Ai(ne),this.transform=Fe,this._tileTextures={},this.setup(),this.numSublayers=aa.maxUnderzooming+aa.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new op,this.gpuTimers={}};_c.prototype.resize=function(ne,Fe){if(this.width=ne*l.browser.devicePixelRatio,this.height=Fe*l.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var me=0,We=this.style._order;me<We.length;me+=1){var At=We[me];this.style._layers[At].resize()}},_c.prototype.setup=function(){var ne=this.context,Fe=new l.StructArrayLayout2i4;Fe.emplaceBack(0,0),Fe.emplaceBack(l.EXTENT,0),Fe.emplaceBack(0,l.EXTENT),Fe.emplaceBack(l.EXTENT,l.EXTENT),this.tileExtentBuffer=ne.createVertexBuffer(Fe,Um.members),this.tileExtentSegments=l.SegmentVector.simpleSegment(0,0,4,2);var me=new l.StructArrayLayout2i4;me.emplaceBack(0,0),me.emplaceBack(l.EXTENT,0),me.emplaceBack(0,l.EXTENT),me.emplaceBack(l.EXTENT,l.EXTENT),this.debugBuffer=ne.createVertexBuffer(me,Um.members),this.debugSegments=l.SegmentVector.simpleSegment(0,0,4,5);var We=new l.StructArrayLayout4i8;We.emplaceBack(0,0,0,0),We.emplaceBack(l.EXTENT,0,l.EXTENT,0),We.emplaceBack(0,l.EXTENT,0,l.EXTENT),We.emplaceBack(l.EXTENT,l.EXTENT,l.EXTENT,l.EXTENT),this.rasterBoundsBuffer=ne.createVertexBuffer(We,Oe.members),this.rasterBoundsSegments=l.SegmentVector.simpleSegment(0,0,4,2);var At=new l.StructArrayLayout2i4;At.emplaceBack(0,0),At.emplaceBack(1,0),At.emplaceBack(0,1),At.emplaceBack(1,1),this.viewportBuffer=ne.createVertexBuffer(At,Um.members),this.viewportSegments=l.SegmentVector.simpleSegment(0,0,4,2);var Yt=new l.StructArrayLayout1ui2;Yt.emplaceBack(0),Yt.emplaceBack(1),Yt.emplaceBack(3),Yt.emplaceBack(2),Yt.emplaceBack(0),this.tileBorderIndexBuffer=ne.createIndexBuffer(Yt);var tr=new l.StructArrayLayout3ui6;tr.emplaceBack(0,1,2),tr.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=ne.createIndexBuffer(tr),this.emptyTexture=new l.Texture(ne,{width:1,height:1,data:new Uint8Array([0,0,0,0])},ne.gl.RGBA);var Pt=this.context.gl;this.stencilClearMode=new Sa({func:Pt.ALWAYS,mask:0},0,255,Pt.ZERO,Pt.ZERO,Pt.ZERO)},_c.prototype.clearStencil=function(){var ne=this.context,Fe=ne.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var me=l.create();l.ortho(me,0,this.width,this.height,0,0,1),l.scale(me,me,[Fe.drawingBufferWidth,Fe.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(ne,Fe.TRIANGLES,Da.disabled,this.stencilClearMode,Hr.disabled,$n.disabled,Ws(me),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},_c.prototype._renderTileClippingMasks=function(ne,Fe){if(!(this.currentStencilSource===ne.source||!ne.isTileClipped()||!Fe||!Fe.length)){this.currentStencilSource=ne.source;var me=this.context,We=me.gl;this.nextStencilID+Fe.length>256&&this.clearStencil(),me.setColorMode(Hr.disabled),me.setDepthMode(Da.disabled);var At=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var Yt=0,tr=Fe;Yt<tr.length;Yt+=1){var Pt=tr[Yt],jt=this._tileClippingMaskIDs[Pt.key]=this.nextStencilID++;At.draw(me,We.TRIANGLES,Da.disabled,new Sa({func:We.ALWAYS,mask:0},jt,255,We.KEEP,We.KEEP,We.REPLACE),Hr.disabled,$n.disabled,Ws(Pt.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},_c.prototype.stencilModeFor3D=function(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();var ne=this.nextStencilID++,Fe=this.context.gl;return new Sa({func:Fe.NOTEQUAL,mask:255},ne,255,Fe.KEEP,Fe.KEEP,Fe.REPLACE)},_c.prototype.stencilModeForClipping=function(ne){var Fe=this.context.gl;return new Sa({func:Fe.EQUAL,mask:255},this._tileClippingMaskIDs[ne.key],0,Fe.KEEP,Fe.KEEP,Fe.REPLACE)},_c.prototype.stencilConfigForOverlap=function(ne){var Fe,me=this.context.gl,We=ne.sort(function(jt,hr){return hr.overscaledZ-jt.overscaledZ}),At=We[We.length-1].overscaledZ,Yt=We[0].overscaledZ-At+1;if(Yt>1){this.currentStencilSource=void 0,this.nextStencilID+Yt>256&&this.clearStencil();for(var tr={},Pt=0;Pt<Yt;Pt++)tr[Pt+At]=new Sa({func:me.GEQUAL,mask:255},Pt+this.nextStencilID,255,me.KEEP,me.KEEP,me.REPLACE);return this.nextStencilID+=Yt,[tr,We]}return[(Fe={},Fe[At]=Sa.disabled,Fe),We]},_c.prototype.colorModeForRenderPass=function(){var ne=this.context.gl;if(this._showOverdrawInspector){var Fe=8,me=1/Fe;return new Hr([ne.CONSTANT_COLOR,ne.ONE],new l.Color(me,me,me,0),[!0,!0,!0,!0])}else return this.renderPass==="opaque"?Hr.unblended:Hr.alphaBlended},_c.prototype.depthModeForSublayer=function(ne,Fe,me){if(!this.opaquePassEnabledForLayer())return Da.disabled;var We=1-((1+this.currentLayer)*this.numSublayers+ne)*this.depthEpsilon;return new Da(me||this.context.gl.LEQUAL,Fe,[We,We])},_c.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},_c.prototype.render=function(ne,Fe){var me=this;this.style=ne,this.options=Fe,this.lineAtlas=ne.lineAtlas,this.imageManager=ne.imageManager,this.glyphManager=ne.glyphManager,this.symbolFadeChange=ne.placement.symbolFadeChange(l.browser.now()),this.imageManager.beginFrame();var We=this.style._order,At=this.style.sourceCaches;for(var Yt in At){var tr=At[Yt];tr.used&&tr.prepare(this.context)}var Pt={},jt={},hr={};for(var qr in At){var zr=At[qr];Pt[qr]=zr.getVisibleCoordinates(),jt[qr]=Pt[qr].slice().reverse(),hr[qr]=zr.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(var Gr=0;Gr<We.length;Gr++){var en=We[Gr];if(this.style._layers[en].is3D()){this.opaquePassCutoff=Gr;break}}this.renderPass="offscreen";for(var Xr=0,Rr=We;Xr<Rr.length;Xr+=1){var jr=Rr[Xr],Br=this.style._layers[jr];if(!(!Br.hasOffscreenPass()||Br.isHidden(this.transform.zoom))){var Bn=jt[Br.source];Br.type!=="custom"&&!Bn.length||this.renderLayer(this,At[Br.source],Br,Bn)}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:Fe.showOverdrawInspector?l.Color.black:l.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=Fe.showOverdrawInspector,this.depthRangeFor3D=[0,1-(ne._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass="opaque",this.currentLayer=We.length-1;this.currentLayer>=0;this.currentLayer--){var ui=this.style._layers[We[this.currentLayer]],Ii=At[ui.source],Ga=Pt[ui.source];this._renderTileClippingMasks(ui,Ga),this.renderLayer(this,Ii,ui,Ga)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<We.length;this.currentLayer++){var ka=this.style._layers[We[this.currentLayer]],wa=At[ka.source],$a=(ka.type==="symbol"?hr:jt)[ka.source];this._renderTileClippingMasks(ka,Pt[ka.source]),this.renderLayer(this,wa,ka,$a)}if(this.options.showTileBoundaries){var Ja,wo,Ya=l.values(this.style._layers);Ya.forEach(function(Ro){Ro.source&&!Ro.isHidden(me.transform.zoom)&&(Ro.source!==(wo&&wo.id)&&(wo=me.style.sourceCaches[Ro.source]),(!Ja||Ja.getSource().maxzoom<wo.getSource().maxzoom)&&(Ja=wo))}),Ja&&Gc.debug(this,Ja,Ja.getVisibleCoordinates())}this.options.showPadding&&mo(this),this.context.setDefault()},_c.prototype.renderLayer=function(ne,Fe,me,We){me.isHidden(this.transform.zoom)||me.type!=="background"&&me.type!=="custom"&&!We.length||(this.id=me.id,this.gpuTimingStart(me),Gc[me.type](ne,Fe,me,We,this.style.placement.variableOffsets),this.gpuTimingEnd())},_c.prototype.gpuTimingStart=function(ne){if(this.options.gpuTiming){var Fe=this.context.extTimerQuery,me=this.gpuTimers[ne.id];me||(me=this.gpuTimers[ne.id]={calls:0,cpuTime:0,query:Fe.createQueryEXT()}),me.calls++,Fe.beginQueryEXT(Fe.TIME_ELAPSED_EXT,me.query)}},_c.prototype.gpuTimingEnd=function(){if(this.options.gpuTiming){var ne=this.context.extTimerQuery;ne.endQueryEXT(ne.TIME_ELAPSED_EXT)}},_c.prototype.collectGpuTimers=function(){var ne=this.gpuTimers;return this.gpuTimers={},ne},_c.prototype.queryGpuTimers=function(ne){var Fe={};for(var me in ne){var We=ne[me],At=this.context.extTimerQuery,Yt=At.getQueryObjectEXT(We.query,At.QUERY_RESULT_EXT)/(1e3*1e3);At.deleteQueryEXT(We.query),Fe[me]=Yt}return Fe},_c.prototype.translatePosMatrix=function(ne,Fe,me,We,At){if(!me[0]&&!me[1])return ne;var Yt=At?We==="map"?this.transform.angle:0:We==="viewport"?-this.transform.angle:0;if(Yt){var tr=Math.sin(Yt),Pt=Math.cos(Yt);me=[me[0]*Pt-me[1]*tr,me[0]*tr+me[1]*Pt]}var jt=[At?me[0]:lu(Fe,me[0],this.transform.zoom),At?me[1]:lu(Fe,me[1],this.transform.zoom),0],hr=new Float32Array(16);return l.translate(hr,ne,jt),hr},_c.prototype.saveTileTexture=function(ne){var Fe=this._tileTextures[ne.size[0]];Fe?Fe.push(ne):this._tileTextures[ne.size[0]]=[ne]},_c.prototype.getTileTexture=function(ne){var Fe=this._tileTextures[ne];return Fe&&Fe.length>0?Fe.pop():null},_c.prototype.isPatternMissing=function(ne){if(!ne)return!1;if(!ne.from||!ne.to)return!0;var Fe=this.imageManager.getPattern(ne.from.toString()),me=this.imageManager.getPattern(ne.to.toString());return!Fe||!me},_c.prototype.useProgram=function(ne,Fe){this.cache=this.cache||{};var me=""+ne+(Fe?Fe.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[me]||(this.cache[me]=new u0(this.context,ne,l0[ne],Fe,Gu[ne],this._showOverdrawInspector)),this.cache[me]},_c.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()},_c.prototype.setBaseState=function(){var ne=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(ne.FUNC_ADD)},_c.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=l.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var ne=this.context.gl;this.debugOverlayTexture=new l.Texture(this.context,this.debugOverlayCanvas,ne.RGBA)}},_c.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var ef=function(ne,Fe){this.points=ne,this.planes=Fe};ef.fromInvProjectionMatrix=function(ne,Fe,me){var 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]],At=Math.pow(2,me),Yt=We.map(function(jt){return l.transformMat4([],jt,ne)}).map(function(jt){return l.scale$1([],jt,1/jt[3]/Fe*At)}),tr=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],Pt=tr.map(function(jt){var hr=l.sub([],Yt[jt[0]],Yt[jt[1]]),qr=l.sub([],Yt[jt[2]],Yt[jt[1]]),zr=l.normalize([],l.cross([],hr,qr)),Gr=-l.dot(zr,Yt[jt[1]]);return zr.concat(Gr)});return new ef(Yt,Pt)};var Xd=function(ne,Fe){this.min=ne,this.max=Fe,this.center=l.scale$2([],l.add([],this.min,this.max),.5)};Xd.prototype.quadrant=function(ne){for(var Fe=[ne%2===0,ne<2],me=l.clone$2(this.min),We=l.clone$2(this.max),At=0;At<Fe.length;At++)me[At]=Fe[At]?this.min[At]:this.center[At],We[At]=Fe[At]?this.center[At]:this.max[At];return We[2]=this.max[2],new Xd(me,We)},Xd.prototype.distanceX=function(ne){var Fe=Math.max(Math.min(this.max[0],ne[0]),this.min[0]);return Fe-ne[0]},Xd.prototype.distanceY=function(ne){var Fe=Math.max(Math.min(this.max[1],ne[1]),this.min[1]);return Fe-ne[1]},Xd.prototype.intersects=function(ne){for(var Fe=[[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]],me=!0,We=0;We<ne.planes.length;We++){for(var At=ne.planes[We],Yt=0,tr=0;tr<Fe.length;tr++)Yt+=l.dot$1(At,Fe[tr])>=0;if(Yt===0)return 0;Yt!==Fe.length&&(me=!1)}if(me)return 2;for(var Pt=0;Pt<3;Pt++){for(var jt=Number.MAX_VALUE,hr=-Number.MAX_VALUE,qr=0;qr<ne.points.length;qr++){var zr=ne.points[qr][Pt]-this.min[Pt];jt=Math.min(jt,zr),hr=Math.max(hr,zr)}if(hr<0||jt>this.max[Pt]-this.min[Pt])return 0}return 1};var kd=function(ne,Fe,me,We){if(ne===void 0&&(ne=0),Fe===void 0&&(Fe=0),me===void 0&&(me=0),We===void 0&&(We=0),isNaN(ne)||ne<0||isNaN(Fe)||Fe<0||isNaN(me)||me<0||isNaN(We)||We<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=ne,this.bottom=Fe,this.left=me,this.right=We};kd.prototype.interpolate=function(ne,Fe,me){return Fe.top!=null&&ne.top!=null&&(this.top=l.number(ne.top,Fe.top,me)),Fe.bottom!=null&&ne.bottom!=null&&(this.bottom=l.number(ne.bottom,Fe.bottom,me)),Fe.left!=null&&ne.left!=null&&(this.left=l.number(ne.left,Fe.left,me)),Fe.right!=null&&ne.right!=null&&(this.right=l.number(ne.right,Fe.right,me)),this},kd.prototype.getCenter=function(ne,Fe){var me=l.clamp((this.left+ne-this.right)/2,0,ne),We=l.clamp((this.top+Fe-this.bottom)/2,0,Fe);return new l.Point(me,We)},kd.prototype.equals=function(ne){return this.top===ne.top&&this.bottom===ne.bottom&&this.left===ne.left&&this.right===ne.right},kd.prototype.clone=function(){return new kd(this.top,this.bottom,this.left,this.right)},kd.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var Ec=function(ne,Fe,me,We,At){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=At===void 0?!0:At,this._minZoom=ne||0,this._maxZoom=Fe||22,this._minPitch=me??0,this._maxPitch=We??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new l.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new kd,this._posMatrixCache={},this._alignedPosMatrixCache={}},Ac={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}};Ec.prototype.clone=function(){var ne=new Ec(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return ne.tileSize=this.tileSize,ne.latRange=this.latRange,ne.width=this.width,ne.height=this.height,ne._center=this._center,ne.zoom=this.zoom,ne.angle=this.angle,ne._fov=this._fov,ne._pitch=this._pitch,ne._unmodified=this._unmodified,ne._edgeInsets=this._edgeInsets.clone(),ne._calcMatrices(),ne},Ac.minZoom.get=function(){return this._minZoom},Ac.minZoom.set=function(Xe){this._minZoom!==Xe&&(this._minZoom=Xe,this.zoom=Math.max(this.zoom,Xe))},Ac.maxZoom.get=function(){return this._maxZoom},Ac.maxZoom.set=function(Xe){this._maxZoom!==Xe&&(this._maxZoom=Xe,this.zoom=Math.min(this.zoom,Xe))},Ac.minPitch.get=function(){return this._minPitch},Ac.minPitch.set=function(Xe){this._minPitch!==Xe&&(this._minPitch=Xe,this.pitch=Math.max(this.pitch,Xe))},Ac.maxPitch.get=function(){return this._maxPitch},Ac.maxPitch.set=function(Xe){this._maxPitch!==Xe&&(this._maxPitch=Xe,this.pitch=Math.min(this.pitch,Xe))},Ac.renderWorldCopies.get=function(){return this._renderWorldCopies},Ac.renderWorldCopies.set=function(Xe){Xe===void 0?Xe=!0:Xe===null&&(Xe=!1),this._renderWorldCopies=Xe},Ac.worldSize.get=function(){return this.tileSize*this.scale},Ac.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},Ac.size.get=function(){return new l.Point(this.width,this.height)},Ac.bearing.get=function(){return-this.angle/Math.PI*180},Ac.bearing.set=function(Xe){var ne=-l.wrap(Xe,-180,180)*Math.PI/180;this.angle!==ne&&(this._unmodified=!1,this.angle=ne,this._calcMatrices(),this.rotationMatrix=l.create$2(),l.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Ac.pitch.get=function(){return this._pitch/Math.PI*180},Ac.pitch.set=function(Xe){var ne=l.clamp(Xe,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==ne&&(this._unmodified=!1,this._pitch=ne,this._calcMatrices())},Ac.fov.get=function(){return this._fov/Math.PI*180},Ac.fov.set=function(Xe){Xe=Math.max(.01,Math.min(60,Xe)),this._fov!==Xe&&(this._unmodified=!1,this._fov=Xe/180*Math.PI,this._calcMatrices())},Ac.zoom.get=function(){return this._zoom},Ac.zoom.set=function(Xe){var ne=Math.min(Math.max(Xe,this.minZoom),this.maxZoom);this._zoom!==ne&&(this._unmodified=!1,this._zoom=ne,this.scale=this.zoomScale(ne),this.tileZoom=Math.floor(ne),this.zoomFraction=ne-this.tileZoom,this._constrain(),this._calcMatrices())},Ac.center.get=function(){return this._center},Ac.center.set=function(Xe){Xe.lat===this._center.lat&&Xe.lng===this._center.lng||(this._unmodified=!1,this._center=Xe,this._constrain(),this._calcMatrices())},Ac.padding.get=function(){return this._edgeInsets.toJSON()},Ac.padding.set=function(Xe){this._edgeInsets.equals(Xe)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,Xe,1),this._calcMatrices())},Ac.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},Ec.prototype.isPaddingEqual=function(ne){return this._edgeInsets.equals(ne)},Ec.prototype.interpolatePadding=function(ne,Fe,me){this._unmodified=!1,this._edgeInsets.interpolate(ne,Fe,me),this._constrain(),this._calcMatrices()},Ec.prototype.coveringZoomLevel=function(ne){var Fe=(ne.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/ne.tileSize));return Math.max(0,Fe)},Ec.prototype.getVisibleUnwrappedCoordinates=function(ne){var Fe=[new l.UnwrappedTileID(0,ne)];if(this._renderWorldCopies)for(var me=this.pointCoordinate(new l.Point(0,0)),We=this.pointCoordinate(new l.Point(this.width,0)),At=this.pointCoordinate(new l.Point(this.width,this.height)),Yt=this.pointCoordinate(new l.Point(0,this.height)),tr=Math.floor(Math.min(me.x,We.x,At.x,Yt.x)),Pt=Math.floor(Math.max(me.x,We.x,At.x,Yt.x)),jt=1,hr=tr-jt;hr<=Pt+jt;hr++)hr!==0&&Fe.push(new l.UnwrappedTileID(hr,ne));return Fe},Ec.prototype.coveringTiles=function(ne){var Fe=this.coveringZoomLevel(ne),me=Fe;if(ne.minzoom!==void 0&&Fe<ne.minzoom)return[];ne.maxzoom!==void 0&&Fe>ne.maxzoom&&(Fe=ne.maxzoom);var We=l.MercatorCoordinate.fromLngLat(this.center),At=Math.pow(2,Fe),Yt=[At*We.x,At*We.y,0],tr=ef.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,Fe),Pt=ne.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(Pt=Fe);var jt=3,hr=function(Ya){return{aabb:new Xd([Ya*At,0,0],[(Ya+1)*At,At,0]),zoom:0,x:0,y:0,wrap:Ya,fullyVisible:!1}},qr=[],zr=[],Gr=Fe,en=ne.reparseOverscaled?me:Fe;if(this._renderWorldCopies)for(var Xr=1;Xr<=3;Xr++)qr.push(hr(-Xr)),qr.push(hr(Xr));for(qr.push(hr(0));qr.length>0;){var Rr=qr.pop(),jr=Rr.x,Br=Rr.y,Bn=Rr.fullyVisible;if(!Bn){var ui=Rr.aabb.intersects(tr);if(ui===0)continue;Bn=ui===2}var Ii=Rr.aabb.distanceX(Yt),Ga=Rr.aabb.distanceY(Yt),ka=Math.max(Math.abs(Ii),Math.abs(Ga)),wa=jt+(1<<Gr-Rr.zoom)-2;if(Rr.zoom===Gr||ka>wa&&Rr.zoom>=Pt){zr.push({tileID:new l.OverscaledTileID(Rr.zoom===Gr?en:Rr.zoom,Rr.wrap,Rr.zoom,jr,Br),distanceSq:l.sqrLen([Yt[0]-.5-jr,Yt[1]-.5-Br])});continue}for(var $a=0;$a<4;$a++){var Ja=(jr<<1)+$a%2,wo=(Br<<1)+($a>>1);qr.push({aabb:Rr.aabb.quadrant($a),zoom:Rr.zoom+1,x:Ja,y:wo,wrap:Rr.wrap,fullyVisible:Bn})}}return zr.sort(function(Ya,Ro){return Ya.distanceSq-Ro.distanceSq}).map(function(Ya){return Ya.tileID})},Ec.prototype.resize=function(ne,Fe){this.width=ne,this.height=Fe,this.pixelsToGLUnits=[2/ne,-2/Fe],this._constrain(),this._calcMatrices()},Ac.unmodified.get=function(){return this._unmodified},Ec.prototype.zoomScale=function(ne){return Math.pow(2,ne)},Ec.prototype.scaleZoom=function(ne){return Math.log(ne)/Math.LN2},Ec.prototype.project=function(ne){var Fe=l.clamp(ne.lat,-this.maxValidLatitude,this.maxValidLatitude);return new l.Point(l.mercatorXfromLng(ne.lng)*this.worldSize,l.mercatorYfromLat(Fe)*this.worldSize)},Ec.prototype.unproject=function(ne){return new l.MercatorCoordinate(ne.x/this.worldSize,ne.y/this.worldSize).toLngLat()},Ac.point.get=function(){return this.project(this.center)},Ec.prototype.setLocationAtPoint=function(ne,Fe){var me=this.pointCoordinate(Fe),We=this.pointCoordinate(this.centerPoint),At=this.locationCoordinate(ne),Yt=new l.MercatorCoordinate(At.x-(me.x-We.x),At.y-(me.y-We.y));this.center=this.coordinateLocation(Yt),this._renderWorldCopies&&(this.center=this.center.wrap())},Ec.prototype.locationPoint=function(ne){return this.coordinatePoint(this.locationCoordinate(ne))},Ec.prototype.pointLocation=function(ne){return this.coordinateLocation(this.pointCoordinate(ne))},Ec.prototype.locationCoordinate=function(ne){return l.MercatorCoordinate.fromLngLat(ne)},Ec.prototype.coordinateLocation=function(ne){return ne.toLngLat()},Ec.prototype.pointCoordinate=function(ne){var Fe=0,me=[ne.x,ne.y,0,1],We=[ne.x,ne.y,1,1];l.transformMat4(me,me,this.pixelMatrixInverse),l.transformMat4(We,We,this.pixelMatrixInverse);var At=me[3],Yt=We[3],tr=me[0]/At,Pt=We[0]/Yt,jt=me[1]/At,hr=We[1]/Yt,qr=me[2]/At,zr=We[2]/Yt,Gr=qr===zr?0:(Fe-qr)/(zr-qr);return new l.MercatorCoordinate(l.number(tr,Pt,Gr)/this.worldSize,l.number(jt,hr,Gr)/this.worldSize)},Ec.prototype.coordinatePoint=function(ne){var Fe=[ne.x*this.worldSize,ne.y*this.worldSize,0,1];return l.transformMat4(Fe,Fe,this.pixelMatrix),new l.Point(Fe[0]/Fe[3],Fe[1]/Fe[3])},Ec.prototype.getBounds=function(){return new l.LngLatBounds().extend(this.pointLocation(new l.Point(0,0))).extend(this.pointLocation(new l.Point(this.width,0))).extend(this.pointLocation(new l.Point(this.width,this.height))).extend(this.pointLocation(new l.Point(0,this.height)))},Ec.prototype.getMaxBounds=function(){return!this.latRange||this.latRange.length!==2||!this.lngRange||this.lngRange.length!==2?null:new l.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]])},Ec.prototype.setMaxBounds=function(ne){ne?(this.lngRange=[ne.getWest(),ne.getEast()],this.latRange=[ne.getSouth(),ne.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},Ec.prototype.calculatePosMatrix=function(ne,Fe){Fe===void 0&&(Fe=!1);var me=ne.key,We=Fe?this._alignedPosMatrixCache:this._posMatrixCache;if(We[me])return We[me];var At=ne.canonical,Yt=this.worldSize/this.zoomScale(At.z),tr=At.x+Math.pow(2,At.z)*ne.wrap,Pt=l.identity(new Float64Array(16));return l.translate(Pt,Pt,[tr*Yt,At.y*Yt,0]),l.scale(Pt,Pt,[Yt/l.EXTENT,Yt/l.EXTENT,1]),l.multiply(Pt,Fe?this.alignedProjMatrix:this.projMatrix,Pt),We[me]=new Float32Array(Pt),We[me]},Ec.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},Ec.prototype._constrain=function(){if(!(!this.center||!this.width||!this.height||this._constraining)){this._constraining=!0;var ne=-90,Fe=90,me=-180,We=180,At,Yt,tr,Pt,jt=this.size,hr=this._unmodified;if(this.latRange){var qr=this.latRange;ne=l.mercatorYfromLat(qr[1])*this.worldSize,Fe=l.mercatorYfromLat(qr[0])*this.worldSize,At=Fe-ne<jt.y?jt.y/(Fe-ne):0}if(this.lngRange){var zr=this.lngRange;me=l.mercatorXfromLng(zr[0])*this.worldSize,We=l.mercatorXfromLng(zr[1])*this.worldSize,Yt=We-me<jt.x?jt.x/(We-me):0}var Gr=this.point,en=Math.max(Yt||0,At||0);if(en){this.center=this.unproject(new l.Point(Yt?(We+me)/2:Gr.x,At?(Fe+ne)/2:Gr.y)),this.zoom+=this.scaleZoom(en),this._unmodified=hr,this._constraining=!1;return}if(this.latRange){var Xr=Gr.y,Rr=jt.y/2;Xr-Rr<ne&&(Pt=ne+Rr),Xr+Rr>Fe&&(Pt=Fe-Rr)}if(this.lngRange){var jr=Gr.x,Br=jt.x/2;jr-Br<me&&(tr=me+Br),jr+Br>We&&(tr=We-Br)}(tr!==void 0||Pt!==void 0)&&(this.center=this.unproject(new l.Point(tr!==void 0?tr:Gr.x,Pt!==void 0?Pt:Gr.y))),this._unmodified=hr,this._constraining=!1}},Ec.prototype._calcMatrices=function(){if(this.height){var ne=this._fov/2,Fe=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(ne)*this.height;var me=Math.PI/2+this._pitch,We=this._fov*(.5+Fe.y/this.height),At=Math.sin(We)*this.cameraToCenterDistance/Math.sin(l.clamp(Math.PI-me-We,.01,Math.PI-.01)),Yt=this.point,tr=Yt.x,Pt=Yt.y,jt=Math.cos(Math.PI/2-this._pitch)*At+this.cameraToCenterDistance,hr=jt*1.01,qr=this.height/50,zr=new Float64Array(16);l.perspective(zr,this._fov,this.width/this.height,qr,hr),zr[8]=-Fe.x*2/this.width,zr[9]=Fe.y*2/this.height,l.scale(zr,zr,[1,-1,1]),l.translate(zr,zr,[0,0,-this.cameraToCenterDistance]),l.rotateX(zr,zr,this._pitch),l.rotateZ(zr,zr,this.angle),l.translate(zr,zr,[-tr,-Pt,0]),this.mercatorMatrix=l.scale([],zr,[this.worldSize,this.worldSize,this.worldSize]),l.scale(zr,zr,[1,1,l.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=zr,this.invProjMatrix=l.invert([],this.projMatrix);var Gr=this.width%2/2,en=this.height%2/2,Xr=Math.cos(this.angle),Rr=Math.sin(this.angle),jr=tr-Math.round(tr)+Xr*Gr+Rr*en,Br=Pt-Math.round(Pt)+Xr*en+Rr*Gr,Bn=new Float64Array(zr);if(l.translate(Bn,Bn,[jr>.5?jr-1:jr,Br>.5?Br-1:Br,0]),this.alignedProjMatrix=Bn,zr=l.create(),l.scale(zr,zr,[this.width/2,-this.height/2,1]),l.translate(zr,zr,[1,-1,0]),this.labelPlaneMatrix=zr,zr=l.create(),l.scale(zr,zr,[1,-1,1]),l.translate(zr,zr,[-1,-1,0]),l.scale(zr,zr,[2/this.width,2/this.height,1]),this.glCoordMatrix=zr,this.pixelMatrix=l.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),zr=l.invert(new Float64Array(16),this.pixelMatrix),!zr)throw new Error("failed to invert matrix");this.pixelMatrixInverse=zr,this._posMatrixCache={},this._alignedPosMatrixCache={}}},Ec.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var ne=this.pointCoordinate(new l.Point(0,0)),Fe=[ne.x*this.worldSize,ne.y*this.worldSize,0,1],me=l.transformMat4(Fe,Fe,this.pixelMatrix);return me[3]/this.cameraToCenterDistance},Ec.prototype.getCameraPoint=function(){var ne=this._pitch,Fe=Math.tan(ne)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new l.Point(0,Fe))},Ec.prototype.getCameraQueryGeometry=function(ne){var Fe=this.getCameraPoint();if(ne.length===1)return[ne[0],Fe];for(var me=Fe.x,We=Fe.y,At=Fe.x,Yt=Fe.y,tr=0,Pt=ne;tr<Pt.length;tr+=1){var jt=Pt[tr];me=Math.min(me,jt.x),We=Math.min(We,jt.y),At=Math.max(At,jt.x),Yt=Math.max(Yt,jt.y)}return[new l.Point(me,We),new l.Point(At,We),new l.Point(At,Yt),new l.Point(me,Yt),new l.Point(me,We)]},Object.defineProperties(Ec.prototype,Ac);function Ih(Xe,ne){var Fe=!1,me=null,We=function(){me=null,Fe&&(Xe(),me=setTimeout(We,ne),Fe=!1)};return function(){return Fe=!0,me||We(),me}}var Ep=function(ne){this._hashName=ne&&encodeURIComponent(ne),l.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=Ih(this._updateHashUnthrottled.bind(this),30*1e3/100)};Ep.prototype.addTo=function(ne){return this._map=ne,l.window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},Ep.prototype.remove=function(){return l.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},Ep.prototype.getHashString=function(ne){var Fe=this._map.getCenter(),me=Math.round(this._map.getZoom()*100)/100,We=Math.ceil((me*Math.LN2+Math.log(512/360/.5))/Math.LN10),At=Math.pow(10,We),Yt=Math.round(Fe.lng*At)/At,tr=Math.round(Fe.lat*At)/At,Pt=this._map.getBearing(),jt=this._map.getPitch(),hr="";if(ne?hr+="/"+Yt+"/"+tr+"/"+me:hr+=me+"/"+tr+"/"+Yt,(Pt||jt)&&(hr+="/"+Math.round(Pt*10)/10),jt&&(hr+="/"+Math.round(jt)),this._hashName){var qr=this._hashName,zr=!1,Gr=l.window.location.hash.slice(1).split("&").map(function(en){var Xr=en.split("=")[0];return Xr===qr?(zr=!0,Xr+"="+hr):en}).filter(function(en){return en});return zr||Gr.push(qr+"="+hr),"#"+Gr.join("&")}return"#"+hr},Ep.prototype._getCurrentHash=function(){var ne=this,Fe=l.window.location.hash.replace("#","");if(this._hashName){var me;return Fe.split("&").map(function(We){return We.split("=")}).forEach(function(We){We[0]===ne._hashName&&(me=We)}),(me&&me[1]||"").split("/")}return Fe.split("/")},Ep.prototype._onHashChange=function(){var ne=this._getCurrentHash();if(ne.length>=3&&!ne.some(function(me){return isNaN(me)})){var Fe=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(ne[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+ne[2],+ne[1]],zoom:+ne[0],bearing:Fe,pitch:+(ne[4]||0)}),!0}return!1},Ep.prototype._updateHashUnthrottled=function(){var ne=l.window.location.href.replace(/(#.+)?$/,this.getHashString());try{l.window.history.replaceState(l.window.history.state,null,ne)}catch{}};var Iv={linearity:.3,easing:l.bezier(0,0,.3,1)},$e=l.extend({deceleration:2500,maxSpeed:1400},Iv),vt=l.extend({deceleration:20,maxSpeed:1400},Iv),Bt=l.extend({deceleration:1e3,maxSpeed:360},Iv),fr=l.extend({deceleration:1e3,maxSpeed:90},Iv),pr=function(ne){this._map=ne,this.clear()};pr.prototype.clear=function(){this._inertiaBuffer=[]},pr.prototype.record=function(ne){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:l.browser.now(),settings:ne})},pr.prototype._drainInertiaBuffer=function(){for(var ne=this._inertiaBuffer,Fe=l.browser.now(),me=160;ne.length>0&&Fe-ne[0].time>me;)ne.shift()},pr.prototype._onMoveEnd=function(ne){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var Fe={zoom:0,bearing:0,pitch:0,pan:new l.Point(0,0),pinchAround:void 0,around:void 0},me=0,We=this._inertiaBuffer;me<We.length;me+=1){var At=We[me],Yt=At.settings;Fe.zoom+=Yt.zoomDelta||0,Fe.bearing+=Yt.bearingDelta||0,Fe.pitch+=Yt.pitchDelta||0,Yt.panDelta&&Fe.pan._add(Yt.panDelta),Yt.around&&(Fe.around=Yt.around),Yt.pinchAround&&(Fe.pinchAround=Yt.pinchAround)}var tr=this._inertiaBuffer[this._inertiaBuffer.length-1],Pt=tr.time-this._inertiaBuffer[0].time,jt={};if(Fe.pan.mag()){var hr=Yr(Fe.pan.mag(),Pt,l.extend({},$e,ne||{}));jt.offset=Fe.pan.mult(hr.amount/Fe.pan.mag()),jt.center=this._map.transform.center,_r(jt,hr)}if(Fe.zoom){var qr=Yr(Fe.zoom,Pt,vt);jt.zoom=this._map.transform.zoom+qr.amount,_r(jt,qr)}if(Fe.bearing){var zr=Yr(Fe.bearing,Pt,Bt);jt.bearing=this._map.transform.bearing+l.clamp(zr.amount,-179,179),_r(jt,zr)}if(Fe.pitch){var Gr=Yr(Fe.pitch,Pt,fr);jt.pitch=this._map.transform.pitch+Gr.amount,_r(jt,Gr)}if(jt.zoom||jt.bearing){var en=Fe.pinchAround===void 0?Fe.around:Fe.pinchAround;jt.around=en?this._map.unproject(en):this._map.getCenter()}return this.clear(),l.extend(jt,{noMoveStart:!0})}};function _r(Xe,ne){(!Xe.duration||Xe.duration<ne.duration)&&(Xe.duration=ne.duration,Xe.easing=ne.easing)}function Yr(Xe,ne,Fe){var me=Fe.maxSpeed,We=Fe.linearity,At=Fe.deceleration,Yt=l.clamp(Xe*We/(ne/1e3),-me,me),tr=Math.abs(Yt)/(At*We);return{easing:Fe.easing,duration:tr*1e3,amount:Yt*(tr/2)}}var Wr=(function(Xe){function ne(me,We,At,Yt){Yt===void 0&&(Yt={});var tr=c.mousePos(We.getCanvasContainer(),At),Pt=We.unproject(tr);Xe.call(this,me,l.extend({point:tr,lngLat:Pt,originalEvent:At},Yt)),this._defaultPrevented=!1,this.target=We}Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne;var Fe={defaultPrevented:{configurable:!0}};return ne.prototype.preventDefault=function(){this._defaultPrevented=!0},Fe.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(ne.prototype,Fe),ne})(l.Event),yn=(function(Xe){function ne(me,We,At){var Yt=me==="touchend"?At.changedTouches:At.touches,tr=c.touchPos(We.getCanvasContainer(),Yt),Pt=tr.map(function(qr){return We.unproject(qr)}),jt=tr.reduce(function(qr,zr,Gr,en){return qr.add(zr.div(en.length))},new l.Point(0,0)),hr=We.unproject(jt);Xe.call(this,me,{points:tr,point:jt,lngLats:Pt,lngLat:hr,originalEvent:At}),this._defaultPrevented=!1}Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne;var Fe={defaultPrevented:{configurable:!0}};return ne.prototype.preventDefault=function(){this._defaultPrevented=!0},Fe.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(ne.prototype,Fe),ne})(l.Event),li=(function(Xe){function ne(me,We,At){Xe.call(this,me,{originalEvent:At}),this._defaultPrevented=!1}Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne;var Fe={defaultPrevented:{configurable:!0}};return ne.prototype.preventDefault=function(){this._defaultPrevented=!0},Fe.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(ne.prototype,Fe),ne})(l.Event),ni=function(ne,Fe){this._map=ne,this._clickTolerance=Fe.clickTolerance};ni.prototype.reset=function(){delete this._mousedownPos},ni.prototype.wheel=function(ne){return this._firePreventable(new li(ne.type,this._map,ne))},ni.prototype.mousedown=function(ne,Fe){return this._mousedownPos=Fe,this._firePreventable(new Wr(ne.type,this._map,ne))},ni.prototype.mouseup=function(ne){this._map.fire(new Wr(ne.type,this._map,ne))},ni.prototype.click=function(ne,Fe){this._mousedownPos&&this._mousedownPos.dist(Fe)>=this._clickTolerance||this._map.fire(new Wr(ne.type,this._map,ne))},ni.prototype.dblclick=function(ne){return this._firePreventable(new Wr(ne.type,this._map,ne))},ni.prototype.mouseover=function(ne){this._map.fire(new Wr(ne.type,this._map,ne))},ni.prototype.mouseout=function(ne){this._map.fire(new Wr(ne.type,this._map,ne))},ni.prototype.touchstart=function(ne){return this._firePreventable(new yn(ne.type,this._map,ne))},ni.prototype.touchmove=function(ne){this._map.fire(new yn(ne.type,this._map,ne))},ni.prototype.touchend=function(ne){this._map.fire(new yn(ne.type,this._map,ne))},ni.prototype.touchcancel=function(ne){this._map.fire(new yn(ne.type,this._map,ne))},ni.prototype._firePreventable=function(ne){if(this._map.fire(ne),ne.defaultPrevented)return{}},ni.prototype.isEnabled=function(){return!0},ni.prototype.isActive=function(){return!1},ni.prototype.enable=function(){},ni.prototype.disable=function(){};var Pi=function(ne){this._map=ne};Pi.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Pi.prototype.mousemove=function(ne){this._map.fire(new Wr(ne.type,this._map,ne))},Pi.prototype.mousedown=function(){this._delayContextMenu=!0},Pi.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Wr("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Pi.prototype.contextmenu=function(ne){this._delayContextMenu?this._contextMenuEvent=ne:this._map.fire(new Wr(ne.type,this._map,ne)),this._map.listens("contextmenu")&&ne.preventDefault()},Pi.prototype.isEnabled=function(){return!0},Pi.prototype.isActive=function(){return!1},Pi.prototype.enable=function(){},Pi.prototype.disable=function(){};var Ji=function(ne,Fe){this._map=ne,this._el=ne.getCanvasContainer(),this._container=ne.getContainer(),this._clickTolerance=Fe.clickTolerance||1};Ji.prototype.isEnabled=function(){return!!this._enabled},Ji.prototype.isActive=function(){return!!this._active},Ji.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Ji.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Ji.prototype.mousedown=function(ne,Fe){this.isEnabled()&&ne.shiftKey&&ne.button===0&&(c.disableDrag(),this._startPos=this._lastPos=Fe,this._active=!0)},Ji.prototype.mousemoveWindow=function(ne,Fe){if(this._active){var me=Fe;if(!(this._lastPos.equals(me)||!this._box&&me.dist(this._startPos)<this._clickTolerance)){var We=this._startPos;this._lastPos=me,this._box||(this._box=c.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",ne));var At=Math.min(We.x,me.x),Yt=Math.max(We.x,me.x),tr=Math.min(We.y,me.y),Pt=Math.max(We.y,me.y);c.setTransform(this._box,"translate("+At+"px,"+tr+"px)"),this._box.style.width=Yt-At+"px",this._box.style.height=Pt-tr+"px"}}},Ji.prototype.mouseupWindow=function(ne,Fe){var me=this;if(this._active&&ne.button===0){var We=this._startPos,At=Fe;if(this.reset(),c.suppressClick(),We.x===At.x&&We.y===At.y)this._fireEvent("boxzoomcancel",ne);else return this._map.fire(new l.Event("boxzoomend",{originalEvent:ne})),{cameraAnimation:function(Yt){return Yt.fitScreenCoordinates(We,At,me._map.getBearing(),{linear:!0})}}}},Ji.prototype.keydown=function(ne){this._active&&ne.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",ne))},Ji.prototype.reset=function(){this._active=!1,this._container.classList.remove("mapboxgl-crosshair"),this._box&&(c.remove(this._box),this._box=null),c.enableDrag(),delete this._startPos,delete this._lastPos},Ji.prototype._fireEvent=function(ne,Fe){return this._map.fire(new l.Event(ne,{originalEvent:Fe}))};function na(Xe,ne){for(var Fe={},me=0;me<Xe.length;me++)Fe[Xe[me].identifier]=ne[me];return Fe}function _o(Xe){for(var ne=new l.Point(0,0),Fe=0,me=Xe;Fe<me.length;Fe+=1){var We=me[Fe];ne._add(We)}return ne.div(Xe.length)}var ca=500,La=500,qa=30,bo=function(ne){this.reset(),this.numTouches=ne.numTouches};bo.prototype.reset=function(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1},bo.prototype.touchstart=function(ne,Fe,me){(this.centroid||me.length>this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=ne.timeStamp),me.length===this.numTouches&&(this.centroid=_o(Fe),this.touches=na(me,Fe)))},bo.prototype.touchmove=function(ne,Fe,me){if(!(this.aborted||!this.centroid)){var We=na(me,Fe);for(var At in this.touches){var Yt=this.touches[At],tr=We[At];(!tr||tr.dist(Yt)>qa)&&(this.aborted=!0)}}},bo.prototype.touchend=function(ne,Fe,me){if((!this.centroid||ne.timeStamp-this.startTime>La)&&(this.aborted=!0),me.length===0){var We=!this.aborted&&this.centroid;if(this.reset(),We)return We}};var So=function(ne){this.singleTap=new bo(ne),this.numTaps=ne.numTaps,this.reset()};So.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},So.prototype.touchstart=function(ne,Fe,me){this.singleTap.touchstart(ne,Fe,me)},So.prototype.touchmove=function(ne,Fe,me){this.singleTap.touchmove(ne,Fe,me)},So.prototype.touchend=function(ne,Fe,me){var We=this.singleTap.touchend(ne,Fe,me);if(We){var At=ne.timeStamp-this.lastTime<ca,Yt=!this.lastTap||this.lastTap.dist(We)<qa;if((!At||!Yt)&&this.reset(),this.count++,this.lastTime=ne.timeStamp,this.lastTap=We,this.count===this.numTaps)return this.reset(),We}};var Va=function(){this._zoomIn=new So({numTouches:1,numTaps:2}),this._zoomOut=new So({numTouches:2,numTaps:1}),this.reset()};Va.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},Va.prototype.touchstart=function(ne,Fe,me){this._zoomIn.touchstart(ne,Fe,me),this._zoomOut.touchstart(ne,Fe,me)},Va.prototype.touchmove=function(ne,Fe,me){this._zoomIn.touchmove(ne,Fe,me),this._zoomOut.touchmove(ne,Fe,me)},Va.prototype.touchend=function(ne,Fe,me){var We=this,At=this._zoomIn.touchend(ne,Fe,me),Yt=this._zoomOut.touchend(ne,Fe,me);if(At)return this._active=!0,ne.preventDefault(),setTimeout(function(){return We.reset()},0),{cameraAnimation:function(tr){return tr.easeTo({duration:300,zoom:tr.getZoom()+1,around:tr.unproject(At)},{originalEvent:ne})}};if(Yt)return this._active=!0,ne.preventDefault(),setTimeout(function(){return We.reset()},0),{cameraAnimation:function(tr){return tr.easeTo({duration:300,zoom:tr.getZoom()-1,around:tr.unproject(Yt)},{originalEvent:ne})}}},Va.prototype.touchcancel=function(){this.reset()},Va.prototype.enable=function(){this._enabled=!0},Va.prototype.disable=function(){this._enabled=!1,this.reset()},Va.prototype.isEnabled=function(){return this._enabled},Va.prototype.isActive=function(){return this._active};var os=0,ul=2,Us={};Us[os]=1,Us[ul]=2;function rl(Xe,ne){var Fe=Us[ne];return Xe.buttons===void 0||(Xe.buttons&Fe)!==Fe}var Yl=function(ne){this.reset(),this._clickTolerance=ne.clickTolerance||1};Yl.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},Yl.prototype._correctButton=function(ne,Fe){return!1},Yl.prototype._move=function(ne,Fe){return{}},Yl.prototype.mousedown=function(ne,Fe){if(!this._lastPoint){var me=c.mouseButton(ne);this._correctButton(ne,me)&&(this._lastPoint=Fe,this._eventButton=me)}},Yl.prototype.mousemoveWindow=function(ne,Fe){var me=this._lastPoint;if(me){if(ne.preventDefault(),rl(ne,this._eventButton)){this.reset();return}if(!(!this._moved&&Fe.dist(me)<this._clickTolerance))return this._moved=!0,this._lastPoint=Fe,this._move(me,Fe)}},Yl.prototype.mouseupWindow=function(ne){if(this._lastPoint){var Fe=c.mouseButton(ne);Fe===this._eventButton&&(this._moved&&c.suppressClick(),this.reset())}},Yl.prototype.enable=function(){this._enabled=!0},Yl.prototype.disable=function(){this._enabled=!1,this.reset()},Yl.prototype.isEnabled=function(){return this._enabled},Yl.prototype.isActive=function(){return this._active};var eu=(function(Xe){function ne(){Xe.apply(this,arguments)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.mousedown=function(me,We){Xe.prototype.mousedown.call(this,me,We),this._lastPoint&&(this._active=!0)},ne.prototype._correctButton=function(me,We){return We===os&&!me.ctrlKey},ne.prototype._move=function(me,We){return{around:We,panDelta:We.sub(me)}},ne})(Yl),Vc=(function(Xe){function ne(){Xe.apply(this,arguments)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype._correctButton=function(me,We){return We===os&&me.ctrlKey||We===ul},ne.prototype._move=function(me,We){var At=.8,Yt=(We.x-me.x)*At;if(Yt)return this._active=!0,{bearingDelta:Yt}},ne.prototype.contextmenu=function(me){me.preventDefault()},ne})(Yl),ou=(function(Xe){function ne(){Xe.apply(this,arguments)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype._correctButton=function(me,We){return We===os&&me.ctrlKey||We===ul},ne.prototype._move=function(me,We){var At=-.5,Yt=(We.y-me.y)*At;if(Yt)return this._active=!0,{pitchDelta:Yt}},ne.prototype.contextmenu=function(me){me.preventDefault()},ne})(Yl),Zu=function(ne){this._minTouches=1,this._clickTolerance=ne.clickTolerance||1,this.reset()};Zu.prototype.reset=function(){this._active=!1,this._touches={},this._sum=new l.Point(0,0)},Zu.prototype.touchstart=function(ne,Fe,me){return this._calculateTransform(ne,Fe,me)},Zu.prototype.touchmove=function(ne,Fe,me){if(!(!this._active||me.length<this._minTouches))return ne.preventDefault(),this._calculateTransform(ne,Fe,me)},Zu.prototype.touchend=function(ne,Fe,me){this._calculateTransform(ne,Fe,me),this._active&&me.length<this._minTouches&&this.reset()},Zu.prototype.touchcancel=function(){this.reset()},Zu.prototype._calculateTransform=function(ne,Fe,me){me.length>0&&(this._active=!0);var We=na(me,Fe),At=new l.Point(0,0),Yt=new l.Point(0,0),tr=0;for(var Pt in We){var jt=We[Pt],hr=this._touches[Pt];hr&&(At._add(jt),Yt._add(jt.sub(hr)),tr++,We[Pt]=jt)}if(this._touches=We,!(tr<this._minTouches||!Yt.mag())){var qr=Yt.div(tr);if(this._sum._add(qr),!(this._sum.mag()<this._clickTolerance)){var zr=At.div(tr);return{around:zr,panDelta:qr}}}},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};var Qc=function(){this.reset()};Qc.prototype.reset=function(){this._active=!1,delete this._firstTwoTouches},Qc.prototype._start=function(ne){},Qc.prototype._move=function(ne,Fe,me){return{}},Qc.prototype.touchstart=function(ne,Fe,me){this._firstTwoTouches||me.length<2||(this._firstTwoTouches=[me[0].identifier,me[1].identifier],this._start([Fe[0],Fe[1]]))},Qc.prototype.touchmove=function(ne,Fe,me){if(this._firstTwoTouches){ne.preventDefault();var We=this._firstTwoTouches,At=We[0],Yt=We[1],tr=Ph(me,Fe,At),Pt=Ph(me,Fe,Yt);if(!(!tr||!Pt)){var jt=this._aroundCenter?null:tr.add(Pt).div(2);return this._move([tr,Pt],jt,ne)}}},Qc.prototype.touchend=function(ne,Fe,me){if(this._firstTwoTouches){var We=this._firstTwoTouches,At=We[0],Yt=We[1],tr=Ph(me,Fe,At),Pt=Ph(me,Fe,Yt);tr&&Pt||(this._active&&c.suppressClick(),this.reset())}},Qc.prototype.touchcancel=function(){this.reset()},Qc.prototype.enable=function(ne){this._enabled=!0,this._aroundCenter=!!ne&&ne.around==="center"},Qc.prototype.disable=function(){this._enabled=!1,this.reset()},Qc.prototype.isEnabled=function(){return this._enabled},Qc.prototype.isActive=function(){return this._active};function Ph(Xe,ne,Fe){for(var me=0;me<Xe.length;me++)if(Xe[me].identifier===Fe)return ne[me]}var xd=.1;function Rl(Xe,ne){return Math.log(Xe/ne)/Math.LN2}var Cc=(function(Xe){function ne(){Xe.apply(this,arguments)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.reset=function(){Xe.prototype.reset.call(this),delete this._distance,delete this._startDistance},ne.prototype._start=function(me){this._startDistance=this._distance=me[0].dist(me[1])},ne.prototype._move=function(me,We){var At=this._distance;if(this._distance=me[0].dist(me[1]),!(!this._active&&Math.abs(Rl(this._distance,this._startDistance))<xd))return this._active=!0,{zoomDelta:Rl(this._distance,At),pinchAround:We}},ne})(Qc),$c=25;function ud(Xe,ne){return Xe.angleWith(ne)*180/Math.PI}var Uf=(function(Xe){function ne(){Xe.apply(this,arguments)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.reset=function(){Xe.prototype.reset.call(this),delete this._minDiameter,delete this._startVector,delete this._vector},ne.prototype._start=function(me){this._startVector=this._vector=me[0].sub(me[1]),this._minDiameter=me[0].dist(me[1])},ne.prototype._move=function(me,We){var At=this._vector;if(this._vector=me[0].sub(me[1]),!(!this._active&&this._isBelowThreshold(this._vector)))return this._active=!0,{bearingDelta:ud(this._vector,At),pinchAround:We}},ne.prototype._isBelowThreshold=function(me){this._minDiameter=Math.min(this._minDiameter,me.mag());var We=Math.PI*this._minDiameter,At=$c/We*360,Yt=ud(me,this._startVector);return Math.abs(Yt)<At},ne})(Qc);function mv(Xe){return Math.abs(Xe.y)>Math.abs(Xe.x)}var Mf=100,cd=(function(Xe){function ne(){Xe.apply(this,arguments)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.reset=function(){Xe.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},ne.prototype._start=function(me){this._lastPoints=me,mv(me[0].sub(me[1]))&&(this._valid=!1)},ne.prototype._move=function(me,We,At){var Yt=me[0].sub(this._lastPoints[0]),tr=me[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(Yt,tr,At.timeStamp),!!this._valid){this._lastPoints=me,this._active=!0;var Pt=(Yt.y+tr.y)/2,jt=-.5;return{pitchDelta:Pt*jt}}},ne.prototype.gestureBeginsVertically=function(me,We,At){if(this._valid!==void 0)return this._valid;var Yt=2,tr=me.mag()>=Yt,Pt=We.mag()>=Yt;if(!(!tr&&!Pt)){if(!tr||!Pt)return this._firstMove===void 0&&(this._firstMove=At),At-this._firstMove<Mf?void 0:!1;var jt=me.y>0==We.y>0;return mv(me)&&mv(We)&&jt}},ne})(Qc),qv={panStep:100,bearingStep:15,pitchStep:10},Th=function(){var ne=qv;this._panStep=ne.panStep,this._bearingStep=ne.bearingStep,this._pitchStep=ne.pitchStep,this._rotationDisabled=!1};Th.prototype.reset=function(){this._active=!1},Th.prototype.keydown=function(ne){var Fe=this;if(!(ne.altKey||ne.ctrlKey||ne.metaKey)){var me=0,We=0,At=0,Yt=0,tr=0;switch(ne.keyCode){case 61:case 107:case 171:case 187:me=1;break;case 189:case 109:case 173:me=-1;break;case 37:ne.shiftKey?We=-1:(ne.preventDefault(),Yt=-1);break;case 39:ne.shiftKey?We=1:(ne.preventDefault(),Yt=1);break;case 38:ne.shiftKey?At=1:(ne.preventDefault(),tr=-1);break;case 40:ne.shiftKey?At=-1:(ne.preventDefault(),tr=1);break;default:return}return this._rotationDisabled&&(We=0,At=0),{cameraAnimation:function(Pt){var jt=Pt.getZoom();Pt.easeTo({duration:300,easeId:"keyboardHandler",easing:rr,zoom:me?Math.round(jt)+me*(ne.shiftKey?2:1):jt,bearing:Pt.getBearing()+We*Fe._bearingStep,pitch:Pt.getPitch()+At*Fe._pitchStep,offset:[-Yt*Fe._panStep,-tr*Fe._panStep],center:Pt.getCenter()},{originalEvent:ne})}}}},Th.prototype.enable=function(){this._enabled=!0},Th.prototype.disable=function(){this._enabled=!1,this.reset()},Th.prototype.isEnabled=function(){return this._enabled},Th.prototype.isActive=function(){return this._active},Th.prototype.disableRotation=function(){this._rotationDisabled=!0},Th.prototype.enableRotation=function(){this._rotationDisabled=!1};function rr(Xe){return Xe*(2-Xe)}var mn=4.000244140625,En=1/100,ia=1/450,Wa=2,zi=function(ne,Fe){this._map=ne,this._el=ne.getCanvasContainer(),this._handler=Fe,this._delta=0,this._defaultZoomRate=En,this._wheelZoomRate=ia,l.bindAll(["_onTimeout"],this)};zi.prototype.setZoomRate=function(ne){this._defaultZoomRate=ne},zi.prototype.setWheelZoomRate=function(ne){this._wheelZoomRate=ne},zi.prototype.isEnabled=function(){return!!this._enabled},zi.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},zi.prototype.isZooming=function(){return!!this._zooming},zi.prototype.enable=function(ne){this.isEnabled()||(this._enabled=!0,this._aroundCenter=ne&&ne.around==="center")},zi.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},zi.prototype.wheel=function(ne){if(this.isEnabled()){var Fe=ne.deltaMode===l.window.WheelEvent.DOM_DELTA_LINE?ne.deltaY*40:ne.deltaY,me=l.browser.now(),We=me-(this._lastWheelEventTime||0);this._lastWheelEventTime=me,Fe!==0&&Fe%mn===0?this._type="wheel":Fe!==0&&Math.abs(Fe)<4?this._type="trackpad":We>400?(this._type=null,this._lastValue=Fe,this._timeout=setTimeout(this._onTimeout,40,ne)):this._type||(this._type=Math.abs(We*Fe)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,Fe+=this._lastValue)),ne.shiftKey&&Fe&&(Fe=Fe/4),this._type&&(this._lastWheelEvent=ne,this._delta-=Fe,this._active||this._start(ne)),ne.preventDefault()}},zi.prototype._onTimeout=function(ne){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(ne)},zi.prototype._start=function(ne){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 Fe=c.mousePos(this._el,ne);this._around=l.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(Fe)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},zi.prototype.renderFrame=function(){var ne=this;if(this._frameId&&(this._frameId=null,!!this.isActive())){var Fe=this._map.transform;if(this._delta!==0){var me=this._type==="wheel"&&Math.abs(this._delta)>mn?this._wheelZoomRate:this._defaultZoomRate,We=Wa/(1+Math.exp(-Math.abs(this._delta*me)));this._delta<0&&We!==0&&(We=1/We);var At=typeof this._targetZoom=="number"?Fe.zoomScale(this._targetZoom):Fe.scale;this._targetZoom=Math.min(Fe.maxZoom,Math.max(Fe.minZoom,Fe.scaleZoom(At*We))),this._type==="wheel"&&(this._startZoom=Fe.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var Yt=typeof this._targetZoom=="number"?this._targetZoom:Fe.zoom,tr=this._startZoom,Pt=this._easing,jt=!1,hr;if(this._type==="wheel"&&tr&&Pt){var qr=Math.min((l.browser.now()-this._lastWheelEventTime)/200,1),zr=Pt(qr);hr=l.number(tr,Yt,zr),qr<1?this._frameId||(this._frameId=!0):jt=!0}else hr=Yt,jt=!0;return this._active=!0,jt&&(this._active=!1,this._finishTimeout=setTimeout(function(){ne._zooming=!1,ne._handler._triggerRenderFrame(),delete ne._targetZoom,delete ne._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!jt,zoomDelta:hr-Fe.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},zi.prototype._smoothOutEasing=function(ne){var Fe=l.ease;if(this._prevEase){var me=this._prevEase,We=(l.browser.now()-me.start)/me.duration,At=me.easing(We+.01)-me.easing(We),Yt=.27/Math.sqrt(At*At+1e-4)*.01,tr=Math.sqrt(.27*.27-Yt*Yt);Fe=l.bezier(Yt,tr,.25,1)}return this._prevEase={start:l.browser.now(),duration:ne,easing:Fe},Fe},zi.prototype.reset=function(){this._active=!1};var Fi=function(ne,Fe){this._clickZoom=ne,this._tapZoom=Fe};Fi.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},Fi.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},Fi.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},Fi.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var Ao=function(){this.reset()};Ao.prototype.reset=function(){this._active=!1},Ao.prototype.dblclick=function(ne,Fe){return ne.preventDefault(),{cameraAnimation:function(me){me.easeTo({duration:300,zoom:me.getZoom()+(ne.shiftKey?-1:1),around:me.unproject(Fe)},{originalEvent:ne})}}},Ao.prototype.enable=function(){this._enabled=!0},Ao.prototype.disable=function(){this._enabled=!1,this.reset()},Ao.prototype.isEnabled=function(){return this._enabled},Ao.prototype.isActive=function(){return this._active};var To=function(){this._tap=new So({numTouches:1,numTaps:1}),this.reset()};To.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},To.prototype.touchstart=function(ne,Fe,me){this._swipePoint||(this._tapTime&&ne.timeStamp-this._tapTime>ca&&this.reset(),this._tapTime?me.length>0&&(this._swipePoint=Fe[0],this._swipeTouch=me[0].identifier):this._tap.touchstart(ne,Fe,me))},To.prototype.touchmove=function(ne,Fe,me){if(!this._tapTime)this._tap.touchmove(ne,Fe,me);else if(this._swipePoint){if(me[0].identifier!==this._swipeTouch)return;var We=Fe[0],At=We.y-this._swipePoint.y;return this._swipePoint=We,ne.preventDefault(),this._active=!0,{zoomDelta:At/128}}},To.prototype.touchend=function(ne,Fe,me){if(this._tapTime)this._swipePoint&&me.length===0&&this.reset();else{var We=this._tap.touchend(ne,Fe,me);We&&(this._tapTime=ne.timeStamp)}},To.prototype.touchcancel=function(){this.reset()},To.prototype.enable=function(){this._enabled=!0},To.prototype.disable=function(){this._enabled=!1,this.reset()},To.prototype.isEnabled=function(){return this._enabled},To.prototype.isActive=function(){return this._active};var Eo=function(ne,Fe,me){this._el=ne,this._mousePan=Fe,this._touchPan=me};Eo.prototype.enable=function(ne){this._inertiaOptions=ne||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},Eo.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},Eo.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},Eo.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var qo=function(ne,Fe,me){this._pitchWithRotate=ne.pitchWithRotate,this._mouseRotate=Fe,this._mousePitch=me};qo.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},qo.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},qo.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},qo.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var qs=function(ne,Fe,me,We){this._el=ne,this._touchZoom=Fe,this._touchRotate=me,this._tapDragZoom=We,this._rotationDisabled=!1,this._enabled=!0};qs.prototype.enable=function(ne){this._touchZoom.enable(ne),this._rotationDisabled||this._touchRotate.enable(ne),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},qs.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},qs.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},qs.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},qs.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},qs.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var xs=function(Xe){return Xe.zoom||Xe.drag||Xe.pitch||Xe.rotate},Uo=(function(Xe){function ne(){Xe.apply(this,arguments)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne})(l.Event);function io(Xe){return Xe.panDelta&&Xe.panDelta.mag()||Xe.zoomDelta||Xe.bearingDelta||Xe.pitchDelta}var xi=function(ne,Fe){this._map=ne,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new pr(ne),this._bearingSnap=Fe.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(Fe),l.bindAll(["handleEvent","handleWindowEvent"],this);var me=this._el;this._listeners=[[me,"touchstart",{passive:!0}],[me,"touchmove",{passive:!1}],[me,"touchend",void 0],[me,"touchcancel",void 0],[me,"mousedown",void 0],[me,"mousemove",void 0],[me,"mouseup",void 0],[l.window.document,"mousemove",{capture:!0}],[l.window.document,"mouseup",void 0],[me,"mouseover",void 0],[me,"mouseout",void 0],[me,"dblclick",void 0],[me,"click",void 0],[me,"keydown",{capture:!1}],[me,"keyup",void 0],[me,"wheel",{passive:!1}],[me,"contextmenu",void 0],[l.window,"blur",void 0]];for(var We=0,At=this._listeners;We<At.length;We+=1){var Yt=At[We],tr=Yt[0],Pt=Yt[1],jt=Yt[2];c.addEventListener(tr,Pt,tr===l.window.document?this.handleWindowEvent:this.handleEvent,jt)}};xi.prototype.destroy=function(){for(var ne=0,Fe=this._listeners;ne<Fe.length;ne+=1){var me=Fe[ne],We=me[0],At=me[1],Yt=me[2];c.removeEventListener(We,At,We===l.window.document?this.handleWindowEvent:this.handleEvent,Yt)}},xi.prototype._addDefaultHandlers=function(ne){var Fe=this._map,me=Fe.getCanvasContainer();this._add("mapEvent",new ni(Fe,ne));var We=Fe.boxZoom=new Ji(Fe,ne);this._add("boxZoom",We);var At=new Va,Yt=new Ao;Fe.doubleClickZoom=new Fi(Yt,At),this._add("tapZoom",At),this._add("clickZoom",Yt);var tr=new To;this._add("tapDragZoom",tr);var Pt=Fe.touchPitch=new cd;this._add("touchPitch",Pt);var jt=new Vc(ne),hr=new ou(ne);Fe.dragRotate=new qo(ne,jt,hr),this._add("mouseRotate",jt,["mousePitch"]),this._add("mousePitch",hr,["mouseRotate"]);var qr=new eu(ne),zr=new Zu(ne);Fe.dragPan=new Eo(me,qr,zr),this._add("mousePan",qr),this._add("touchPan",zr,["touchZoom","touchRotate"]);var Gr=new Uf,en=new Cc;Fe.touchZoomRotate=new qs(me,en,Gr,tr),this._add("touchRotate",Gr,["touchPan","touchZoom"]),this._add("touchZoom",en,["touchPan","touchRotate"]);var Xr=Fe.scrollZoom=new zi(Fe,this);this._add("scrollZoom",Xr,["mousePan"]);var Rr=Fe.keyboard=new Th;this._add("keyboard",Rr),this._add("blockableMapEvent",new Pi(Fe));for(var jr=0,Br=["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"];jr<Br.length;jr+=1){var Bn=Br[jr];ne.interactive&&ne[Bn]&&Fe[Bn].enable(ne[Bn])}},xi.prototype._add=function(ne,Fe,me){this._handlers.push({handlerName:ne,handler:Fe,allowed:me}),this._handlersById[ne]=Fe},xi.prototype.stop=function(ne){if(!this._updatingCamera){for(var Fe=0,me=this._handlers;Fe<me.length;Fe+=1){var We=me[Fe],At=We.handler;At.reset()}this._inertia.clear(),this._fireEvents({},{},ne),this._changes=[]}},xi.prototype.isActive=function(){for(var ne=0,Fe=this._handlers;ne<Fe.length;ne+=1){var me=Fe[ne],We=me.handler;if(We.isActive())return!0}return!1},xi.prototype.isZooming=function(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()},xi.prototype.isRotating=function(){return!!this._eventsInProgress.rotate},xi.prototype.isMoving=function(){return!!xs(this._eventsInProgress)||this.isZooming()},xi.prototype._blockedByActive=function(ne,Fe,me){for(var We in ne)if(We!==me&&(!Fe||Fe.indexOf(We)<0))return!0;return!1},xi.prototype.handleWindowEvent=function(ne){this.handleEvent(ne,ne.type+"Window")},xi.prototype._getMapTouches=function(ne){for(var Fe=[],me=0,We=ne;me<We.length;me+=1){var At=We[me],Yt=At.target;this._el.contains(Yt)&&Fe.push(At)}return Fe},xi.prototype.handleEvent=function(ne,Fe){if(ne.type==="blur"){this.stop(!0);return}this._updatingCamera=!0;for(var me=ne.type==="renderFrame"?void 0:ne,We={needsRenderFrame:!1},At={},Yt={},tr=ne.touches?this._getMapTouches(ne.touches):void 0,Pt=tr?c.touchPos(this._el,tr):c.mousePos(this._el,ne),jt=0,hr=this._handlers;jt<hr.length;jt+=1){var qr=hr[jt],zr=qr.handlerName,Gr=qr.handler,en=qr.allowed;if(Gr.isEnabled()){var Xr=void 0;this._blockedByActive(Yt,en,zr)?Gr.reset():Gr[Fe||ne.type]&&(Xr=Gr[Fe||ne.type](ne,Pt,tr),this.mergeHandlerResult(We,At,Xr,zr,me),Xr&&Xr.needsRenderFrame&&this._triggerRenderFrame()),(Xr||Gr.isActive())&&(Yt[zr]=Gr)}}var Rr={};for(var jr in this._previousActiveHandlers)Yt[jr]||(Rr[jr]=me);this._previousActiveHandlers=Yt,(Object.keys(Rr).length||io(We))&&(this._changes.push([We,At,Rr]),this._triggerRenderFrame()),(Object.keys(Yt).length||io(We))&&this._map._stop(!0),this._updatingCamera=!1;var Br=We.cameraAnimation;Br&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],Br(this._map))},xi.prototype.mergeHandlerResult=function(ne,Fe,me,We,At){if(me){l.extend(ne,me);var Yt={handlerName:We,originalEvent:me.originalEvent||At};me.zoomDelta!==void 0&&(Fe.zoom=Yt),me.panDelta!==void 0&&(Fe.drag=Yt),me.pitchDelta!==void 0&&(Fe.pitch=Yt),me.bearingDelta!==void 0&&(Fe.rotate=Yt)}},xi.prototype._applyChanges=function(){for(var ne={},Fe={},me={},We=0,At=this._changes;We<At.length;We+=1){var Yt=At[We],tr=Yt[0],Pt=Yt[1],jt=Yt[2];tr.panDelta&&(ne.panDelta=(ne.panDelta||new l.Point(0,0))._add(tr.panDelta)),tr.zoomDelta&&(ne.zoomDelta=(ne.zoomDelta||0)+tr.zoomDelta),tr.bearingDelta&&(ne.bearingDelta=(ne.bearingDelta||0)+tr.bearingDelta),tr.pitchDelta&&(ne.pitchDelta=(ne.pitchDelta||0)+tr.pitchDelta),tr.around!==void 0&&(ne.around=tr.around),tr.pinchAround!==void 0&&(ne.pinchAround=tr.pinchAround),tr.noInertia&&(ne.noInertia=tr.noInertia),l.extend(Fe,Pt),l.extend(me,jt)}this._updateMapTransform(ne,Fe,me),this._changes=[]},xi.prototype._updateMapTransform=function(ne,Fe,me){var We=this._map,At=We.transform;if(!io(ne))return this._fireEvents(Fe,me,!0);var Yt=ne.panDelta,tr=ne.zoomDelta,Pt=ne.bearingDelta,jt=ne.pitchDelta,hr=ne.around,qr=ne.pinchAround;qr!==void 0&&(hr=qr),We._stop(!0),hr=hr||We.transform.centerPoint;var zr=At.pointLocation(Yt?hr.sub(Yt):hr);Pt&&(At.bearing+=Pt),jt&&(At.pitch+=jt),tr&&(At.zoom+=tr),At.setLocationAtPoint(zr,hr),this._map._update(),ne.noInertia||this._inertia.record(ne),this._fireEvents(Fe,me,!0)},xi.prototype._fireEvents=function(ne,Fe,me){var We=this,At=xs(this._eventsInProgress),Yt=xs(ne),tr={};for(var Pt in ne){var jt=ne[Pt],hr=jt.originalEvent;this._eventsInProgress[Pt]||(tr[Pt+"start"]=hr),this._eventsInProgress[Pt]=ne[Pt]}!At&&Yt&&this._fireEvent("movestart",Yt.originalEvent);for(var qr in tr)this._fireEvent(qr,tr[qr]);Yt&&this._fireEvent("move",Yt.originalEvent);for(var zr in ne){var Gr=ne[zr],en=Gr.originalEvent;this._fireEvent(zr,en)}var Xr={},Rr;for(var jr in this._eventsInProgress){var Br=this._eventsInProgress[jr],Bn=Br.handlerName,ui=Br.originalEvent;this._handlersById[Bn].isActive()||(delete this._eventsInProgress[jr],Rr=Fe[Bn]||ui,Xr[jr+"end"]=Rr)}for(var Ii in Xr)this._fireEvent(Ii,Xr[Ii]);var Ga=xs(this._eventsInProgress);if(me&&(At||Yt)&&!Ga){this._updatingCamera=!0;var ka=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),wa=function($a){return $a!==0&&-We._bearingSnap<$a&&$a<We._bearingSnap};ka?(wa(ka.bearing||this._map.getBearing())&&(ka.bearing=0),this._map.easeTo(ka,{originalEvent:Rr})):(this._map.fire(new l.Event("moveend",{originalEvent:Rr})),wa(this._map.getBearing())&&this._map.resetNorth()),this._updatingCamera=!1}},xi.prototype._fireEvent=function(ne,Fe){this._map.fire(new l.Event(ne,Fe?{originalEvent:Fe}:{}))},xi.prototype._requestFrame=function(){var ne=this;return this._map.triggerRepaint(),this._map._renderTaskQueue.add(function(Fe){delete ne._frameId,ne.handleEvent(new Uo("renderFrame",{timeStamp:Fe})),ne._applyChanges()})},xi.prototype._triggerRenderFrame=function(){this._frameId===void 0&&(this._frameId=this._requestFrame())};var ga=(function(Xe){function ne(Fe,me){Xe.call(this),this._moving=!1,this._zooming=!1,this.transform=Fe,this._bearingSnap=me.bearingSnap,l.bindAll(["_renderFrameCallback"],this)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.getCenter=function(){return new l.LngLat(this.transform.center.lng,this.transform.center.lat)},ne.prototype.setCenter=function(me,We){return this.jumpTo({center:me},We)},ne.prototype.panBy=function(me,We,At){return me=l.Point.convert(me).mult(-1),this.panTo(this.transform.center,l.extend({offset:me},We),At)},ne.prototype.panTo=function(me,We,At){return this.easeTo(l.extend({center:me},We),At)},ne.prototype.getZoom=function(){return this.transform.zoom},ne.prototype.setZoom=function(me,We){return this.jumpTo({zoom:me},We),this},ne.prototype.zoomTo=function(me,We,At){return this.easeTo(l.extend({zoom:me},We),At)},ne.prototype.zoomIn=function(me,We){return this.zoomTo(this.getZoom()+1,me,We),this},ne.prototype.zoomOut=function(me,We){return this.zoomTo(this.getZoom()-1,me,We),this},ne.prototype.getBearing=function(){return this.transform.bearing},ne.prototype.setBearing=function(me,We){return this.jumpTo({bearing:me},We),this},ne.prototype.getPadding=function(){return this.transform.padding},ne.prototype.setPadding=function(me,We){return this.jumpTo({padding:me},We),this},ne.prototype.rotateTo=function(me,We,At){return this.easeTo(l.extend({bearing:me},We),At)},ne.prototype.resetNorth=function(me,We){return this.rotateTo(0,l.extend({duration:1e3},me),We),this},ne.prototype.resetNorthPitch=function(me,We){return this.easeTo(l.extend({bearing:0,pitch:0,duration:1e3},me),We),this},ne.prototype.snapToNorth=function(me,We){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(me,We):this},ne.prototype.getPitch=function(){return this.transform.pitch},ne.prototype.setPitch=function(me,We){return this.jumpTo({pitch:me},We),this},ne.prototype.cameraForBounds=function(me,We){me=l.LngLatBounds.convert(me);var At=We&&We.bearing||0;return this._cameraForBoxAndBearing(me.getNorthWest(),me.getSouthEast(),At,We)},ne.prototype._cameraForBoxAndBearing=function(me,We,At,Yt){var tr={top:0,bottom:0,right:0,left:0};if(Yt=l.extend({padding:tr,offset:[0,0],maxZoom:this.transform.maxZoom},Yt),typeof Yt.padding=="number"){var Pt=Yt.padding;Yt.padding={top:Pt,bottom:Pt,right:Pt,left:Pt}}Yt.padding=l.extend(tr,Yt.padding);var jt=this.transform,hr=jt.padding,qr=jt.project(l.LngLat.convert(me)),zr=jt.project(l.LngLat.convert(We)),Gr=qr.rotate(-At*Math.PI/180),en=zr.rotate(-At*Math.PI/180),Xr=new l.Point(Math.max(Gr.x,en.x),Math.max(Gr.y,en.y)),Rr=new l.Point(Math.min(Gr.x,en.x),Math.min(Gr.y,en.y)),jr=Xr.sub(Rr),Br=(jt.width-(hr.left+hr.right+Yt.padding.left+Yt.padding.right))/jr.x,Bn=(jt.height-(hr.top+hr.bottom+Yt.padding.top+Yt.padding.bottom))/jr.y;if(Bn<0||Br<0){l.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.");return}var ui=Math.min(jt.scaleZoom(jt.scale*Math.min(Br,Bn)),Yt.maxZoom),Ii=typeof Yt.offset.x=="number"?new l.Point(Yt.offset.x,Yt.offset.y):l.Point.convert(Yt.offset),Ga=(Yt.padding.left-Yt.padding.right)/2,ka=(Yt.padding.top-Yt.padding.bottom)/2,wa=new l.Point(Ga,ka),$a=wa.rotate(At*Math.PI/180),Ja=Ii.add($a),wo=Ja.mult(jt.scale/jt.zoomScale(ui)),Ya=jt.unproject(qr.add(zr).div(2).sub(wo));return{center:Ya,zoom:ui,bearing:At}},ne.prototype.fitBounds=function(me,We,At){return this._fitInternal(this.cameraForBounds(me,We),We,At)},ne.prototype.fitScreenCoordinates=function(me,We,At,Yt,tr){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(l.Point.convert(me)),this.transform.pointLocation(l.Point.convert(We)),At,Yt),Yt,tr)},ne.prototype._fitInternal=function(me,We,At){return me?(We=l.extend(me,We),delete We.padding,We.linear?this.easeTo(We,At):this.flyTo(We,At)):this},ne.prototype.jumpTo=function(me,We){this.stop();var At=this.transform,Yt=!1,tr=!1,Pt=!1;return"zoom"in me&&At.zoom!==+me.zoom&&(Yt=!0,At.zoom=+me.zoom),me.center!==void 0&&(At.center=l.LngLat.convert(me.center)),"bearing"in me&&At.bearing!==+me.bearing&&(tr=!0,At.bearing=+me.bearing),"pitch"in me&&At.pitch!==+me.pitch&&(Pt=!0,At.pitch=+me.pitch),me.padding!=null&&!At.isPaddingEqual(me.padding)&&(At.padding=me.padding),this.fire(new l.Event("movestart",We)).fire(new l.Event("move",We)),Yt&&this.fire(new l.Event("zoomstart",We)).fire(new l.Event("zoom",We)).fire(new l.Event("zoomend",We)),tr&&this.fire(new l.Event("rotatestart",We)).fire(new l.Event("rotate",We)).fire(new l.Event("rotateend",We)),Pt&&this.fire(new l.Event("pitchstart",We)).fire(new l.Event("pitch",We)).fire(new l.Event("pitchend",We)),this.fire(new l.Event("moveend",We))},ne.prototype.easeTo=function(me,We){var At=this;this._stop(!1,me.easeId),me=l.extend({offset:[0,0],duration:500,easing:l.ease},me),(me.animate===!1||!me.essential&&l.browser.prefersReducedMotion)&&(me.duration=0);var Yt=this.transform,tr=this.getZoom(),Pt=this.getBearing(),jt=this.getPitch(),hr=this.getPadding(),qr="zoom"in me?+me.zoom:tr,zr="bearing"in me?this._normalizeBearing(me.bearing,Pt):Pt,Gr="pitch"in me?+me.pitch:jt,en="padding"in me?me.padding:Yt.padding,Xr=l.Point.convert(me.offset),Rr=Yt.centerPoint.add(Xr),jr=Yt.pointLocation(Rr),Br=l.LngLat.convert(me.center||jr);this._normalizeCenter(Br);var Bn=Yt.project(jr),ui=Yt.project(Br).sub(Bn),Ii=Yt.zoomScale(qr-tr),Ga,ka;me.around&&(Ga=l.LngLat.convert(me.around),ka=Yt.locationPoint(Ga));var wa={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||qr!==tr,this._rotating=this._rotating||Pt!==zr,this._pitching=this._pitching||Gr!==jt,this._padding=!Yt.isPaddingEqual(en),this._easeId=me.easeId,this._prepareEase(We,me.noMoveStart,wa),this._ease(function($a){if(At._zooming&&(Yt.zoom=l.number(tr,qr,$a)),At._rotating&&(Yt.bearing=l.number(Pt,zr,$a)),At._pitching&&(Yt.pitch=l.number(jt,Gr,$a)),At._padding&&(Yt.interpolatePadding(hr,en,$a),Rr=Yt.centerPoint.add(Xr)),Ga)Yt.setLocationAtPoint(Ga,ka);else{var Ja=Yt.zoomScale(Yt.zoom-tr),wo=qr>tr?Math.min(2,Ii):Math.max(.5,Ii),Ya=Math.pow(wo,1-$a),Ro=Yt.unproject(Bn.add(ui.mult($a*Ya)).mult(Ja));Yt.setLocationAtPoint(Yt.renderWorldCopies?Ro.wrap():Ro,Rr)}At._fireMoveEvents(We)},function($a){At._afterEase(We,$a)},me),this},ne.prototype._prepareEase=function(me,We,At){At===void 0&&(At={}),this._moving=!0,!We&&!At.moving&&this.fire(new l.Event("movestart",me)),this._zooming&&!At.zooming&&this.fire(new l.Event("zoomstart",me)),this._rotating&&!At.rotating&&this.fire(new l.Event("rotatestart",me)),this._pitching&&!At.pitching&&this.fire(new l.Event("pitchstart",me))},ne.prototype._fireMoveEvents=function(me){this.fire(new l.Event("move",me)),this._zooming&&this.fire(new l.Event("zoom",me)),this._rotating&&this.fire(new l.Event("rotate",me)),this._pitching&&this.fire(new l.Event("pitch",me))},ne.prototype._afterEase=function(me,We){if(!(this._easeId&&We&&this._easeId===We)){delete this._easeId;var At=this._zooming,Yt=this._rotating,tr=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,At&&this.fire(new l.Event("zoomend",me)),Yt&&this.fire(new l.Event("rotateend",me)),tr&&this.fire(new l.Event("pitchend",me)),this.fire(new l.Event("moveend",me))}},ne.prototype.flyTo=function(me,We){var At=this;if(!me.essential&&l.browser.prefersReducedMotion){var Yt=l.pick(me,["center","zoom","bearing","pitch","around"]);return this.jumpTo(Yt,We)}this.stop(),me=l.extend({offset:[0,0],speed:1.2,curve:1.42,easing:l.ease},me);var tr=this.transform,Pt=this.getZoom(),jt=this.getBearing(),hr=this.getPitch(),qr=this.getPadding(),zr="zoom"in me?l.clamp(+me.zoom,tr.minZoom,tr.maxZoom):Pt,Gr="bearing"in me?this._normalizeBearing(me.bearing,jt):jt,en="pitch"in me?+me.pitch:hr,Xr="padding"in me?me.padding:tr.padding,Rr=tr.zoomScale(zr-Pt),jr=l.Point.convert(me.offset),Br=tr.centerPoint.add(jr),Bn=tr.pointLocation(Br),ui=l.LngLat.convert(me.center||Bn);this._normalizeCenter(ui);var Ii=tr.project(Bn),Ga=tr.project(ui).sub(Ii),ka=me.curve,wa=Math.max(tr.width,tr.height),$a=wa/Rr,Ja=Ga.mag();if("minZoom"in me){var wo=l.clamp(Math.min(me.minZoom,Pt,zr),tr.minZoom,tr.maxZoom),Ya=wa/tr.zoomScale(wo-Pt);ka=Math.sqrt(Ya/Ja*2)}var Ro=ka*ka;function Xo(af){var ch=($a*$a-wa*wa+(af?-1:1)*Ro*Ro*Ja*Ja)/(2*(af?$a:wa)*Ro*Ja);return Math.log(Math.sqrt(ch*ch+1)-ch)}function Rs(af){return(Math.exp(af)-Math.exp(-af))/2}function Qs(af){return(Math.exp(af)+Math.exp(-af))/2}function cc(af){return Rs(af)/Qs(af)}var ac=Xo(0),yf=function(af){return Qs(ac)/Qs(ac+ka*af)},ff=function(af){return wa*((Qs(ac)*cc(ac+ka*af)-Rs(ac))/Ro)/Ja},_f=(Xo(1)-ac)/ka;if(Math.abs(Ja)<1e-6||!isFinite(_f)){if(Math.abs(wa-$a)<1e-6)return this.easeTo(me,We);var bf=$a<wa?-1:1;_f=Math.abs(Math.log($a/wa))/ka,ff=function(){return 0},yf=function(af){return Math.exp(bf*ka*af)}}if("duration"in me)me.duration=+me.duration;else{var hp="screenSpeed"in me?+me.screenSpeed/ka:+me.speed;me.duration=1e3*_f/hp}return me.maxDuration&&me.duration>me.maxDuration&&(me.duration=0),this._zooming=!0,this._rotating=jt!==Gr,this._pitching=en!==hr,this._padding=!tr.isPaddingEqual(Xr),this._prepareEase(We,!1),this._ease(function(af){var ch=af*_f,Ig=1/yf(ch);tr.zoom=af===1?zr:Pt+tr.scaleZoom(Ig),At._rotating&&(tr.bearing=l.number(jt,Gr,af)),At._pitching&&(tr.pitch=l.number(hr,en,af)),At._padding&&(tr.interpolatePadding(qr,Xr,af),Br=tr.centerPoint.add(jr));var R0=af===1?ui:tr.unproject(Ii.add(Ga.mult(ff(ch))).mult(Ig));tr.setLocationAtPoint(tr.renderWorldCopies?R0.wrap():R0,Br),At._fireMoveEvents(We)},function(){return At._afterEase(We)},me),this},ne.prototype.isEasing=function(){return!!this._easeFrameId},ne.prototype.stop=function(){return this._stop()},ne.prototype._stop=function(me,We){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var At=this._onEaseEnd;delete this._onEaseEnd,At.call(this,We)}if(!me){var Yt=this.handlers;Yt&&Yt.stop(!1)}return this},ne.prototype._ease=function(me,We,At){At.animate===!1||At.duration===0?(me(1),We()):(this._easeStart=l.browser.now(),this._easeOptions=At,this._onEaseFrame=me,this._onEaseEnd=We,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},ne.prototype._renderFrameCallback=function(){var me=Math.min((l.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(me)),me<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},ne.prototype._normalizeBearing=function(me,We){me=l.wrap(me,-180,180);var At=Math.abs(me-We);return Math.abs(me-360-We)<At&&(me-=360),Math.abs(me+360-We)<At&&(me+=360),me},ne.prototype._normalizeCenter=function(me){var We=this.transform;if(!(!We.renderWorldCopies||We.lngRange)){var At=me.lng-We.center.lng;me.lng+=At>180?-360:At<-180?360:0}},ne})(l.Evented),Fa=function(ne){ne===void 0&&(ne={}),this.options=ne,l.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};Fa.prototype.getDefaultPosition=function(){return"bottom-right"},Fa.prototype.onAdd=function(ne){var Fe=this.options&&this.options.compact;return this._map=ne,this._container=c.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=c.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=c.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),Fe&&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),Fe===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Fa.prototype.onRemove=function(){c.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},Fa.prototype._setElementTitle=function(ne,Fe){var me=this._map._getUIString("AttributionControl."+Fe);ne.title=me,ne.setAttribute("aria-label",me)},Fa.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"))},Fa.prototype._updateEditLink=function(){var ne=this._editLink;ne||(ne=this._editLink=this._container.querySelector(".mapbox-improve-map"));var Fe=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||l.config.ACCESS_TOKEN}];if(ne){var me=Fe.reduce(function(We,At,Yt){return At.value&&(We+=At.key+"="+At.value+(Yt<Fe.length-1?"&":"")),We},"?");ne.href=l.config.FEEDBACK_URL+"/"+me+(this._map._hash?this._map._hash.getHashString(!0):""),ne.rel="noopener nofollow",this._setElementTitle(ne,"MapFeedback")}},Fa.prototype._updateData=function(ne){ne&&(ne.sourceDataType==="metadata"||ne.sourceDataType==="visibility"||ne.dataType==="style")&&(this._updateAttributions(),this._updateEditLink())},Fa.prototype._updateAttributions=function(){if(this._map.style){var ne=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?ne=ne.concat(this.options.customAttribution.map(function(Pt){return typeof Pt!="string"?"":Pt})):typeof this.options.customAttribution=="string"&&ne.push(this.options.customAttribution)),this._map.style.stylesheet){var Fe=this._map.style.stylesheet;this.styleOwner=Fe.owner,this.styleId=Fe.id}var me=this._map.style.sourceCaches;for(var We in me){var At=me[We];if(At.used){var Yt=At.getSource();Yt.attribution&&ne.indexOf(Yt.attribution)<0&&ne.push(Yt.attribution)}}ne.sort(function(Pt,jt){return Pt.length-jt.length}),ne=ne.filter(function(Pt,jt){for(var hr=jt+1;hr<ne.length;hr++)if(ne[hr].indexOf(Pt)>=0)return!1;return!0});var tr=ne.join(" | ");tr!==this._attribHTML&&(this._attribHTML=tr,ne.length?(this._innerContainer.innerHTML=tr,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Fa.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var so=function(){l.bindAll(["_updateLogo"],this),l.bindAll(["_updateCompact"],this)};so.prototype.onAdd=function(ne){this._map=ne,this._container=c.create("div","mapboxgl-ctrl");var Fe=c.create("a","mapboxgl-ctrl-logo");return Fe.target="_blank",Fe.rel="noopener nofollow",Fe.href="https://www.mapbox.com/",Fe.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),Fe.setAttribute("rel","noopener nofollow"),this._container.appendChild(Fe),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},so.prototype.onRemove=function(){c.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},so.prototype.getDefaultPosition=function(){return"bottom-left"},so.prototype._updateLogo=function(ne){(!ne||ne.sourceDataType==="metadata")&&(this._container.style.display=this._logoRequired()?"block":"none")},so.prototype._logoRequired=function(){if(this._map.style){var ne=this._map.style.sourceCaches;for(var Fe in ne){var me=ne[Fe].getSource();if(me.mapbox_logo)return!0}return!1}},so.prototype._updateCompact=function(){var ne=this._container.children;if(ne.length){var Fe=ne[0];this._map.getCanvasContainer().offsetWidth<250?Fe.classList.add("mapboxgl-compact"):Fe.classList.remove("mapboxgl-compact")}};var Ua=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Ua.prototype.add=function(ne){var Fe=++this._id,me=this._queue;return me.push({callback:ne,id:Fe,cancelled:!1}),Fe},Ua.prototype.remove=function(ne){for(var Fe=this._currentlyRunning,me=Fe?this._queue.concat(Fe):this._queue,We=0,At=me;We<At.length;We+=1){var Yt=At[We];if(Yt.id===ne){Yt.cancelled=!0;return}}},Ua.prototype.run=function(ne){ne===void 0&&(ne=0);var Fe=this._currentlyRunning=this._queue;this._queue=[];for(var me=0,We=Fe;me<We.length;me+=1){var At=We[me];if(!At.cancelled&&(At.callback(ne),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},Ua.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var vs={"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"},Po=l.window.HTMLImageElement,zs=l.window.HTMLElement,Ha=l.window.ImageBitmap,Ra=-2,ls=22,ua=0,Wo=60,Mo={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:Ra,maxZoom:ls,minPitch:ua,maxPitch:Wo,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},Hs=(function(Xe){function ne(me){var We=this;if(me=l.extend({},Mo,me),me.minZoom!=null&&me.maxZoom!=null&&me.minZoom>me.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(me.minPitch!=null&&me.maxPitch!=null&&me.minPitch>me.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(me.minPitch!=null&&me.minPitch<ua)throw new Error("minPitch must be greater than or equal to "+ua);if(me.maxPitch!=null&&me.maxPitch>Wo)throw new Error("maxPitch must be less than or equal to "+Wo);var At=new Ec(me.minZoom,me.maxZoom,me.minPitch,me.maxPitch,me.renderWorldCopies);if(Xe.call(this,At,me),this._interactive=me.interactive,this._maxTileCacheSize=me.maxTileCacheSize,this._failIfMajorPerformanceCaveat=me.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=me.preserveDrawingBuffer,this._antialias=me.antialias,this._trackResize=me.trackResize,this._bearingSnap=me.bearingSnap,this._refreshExpiredTiles=me.refreshExpiredTiles,this._fadeDuration=me.fadeDuration,this._crossSourceCollisions=me.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=me.collectResourceTiming,this._renderTaskQueue=new Ua,this._controls=[],this._mapId=l.uniqueId(),this._locale=l.extend({},vs,me.locale),this._clickTolerance=me.clickTolerance,this._requestManager=new l.RequestManager(me.transformRequest,me.accessToken),typeof me.container=="string"){if(this._container=l.window.document.getElementById(me.container),!this._container)throw new Error("Container '"+me.container+"' not found.")}else if(me.container instanceof zs)this._container=me.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");if(me.maxBounds&&this.setMaxBounds(me.maxBounds),l.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 We._update(!1)}),this.on("moveend",function(){return We._update(!1)}),this.on("zoom",function(){return We._update(!0)}),typeof l.window<"u"&&(l.window.addEventListener("online",this._onWindowOnline,!1),l.window.addEventListener("resize",this._onWindowResize,!1),l.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new xi(this,me);var Yt=typeof me.hash=="string"&&me.hash||void 0;this._hash=me.hash&&new Ep(Yt).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:me.center,zoom:me.zoom,bearing:me.bearing,pitch:me.pitch}),me.bounds&&(this.resize(),this.fitBounds(me.bounds,l.extend({},me.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=me.localIdeographFontFamily,me.style&&this.setStyle(me.style,{localIdeographFontFamily:me.localIdeographFontFamily}),me.attributionControl&&this.addControl(new Fa({customAttribution:me.customAttribution})),this.addControl(new so,me.logoPosition),this.on("style.load",function(){We.transform.unmodified&&We.jumpTo(We.style.stylesheet)}),this.on("data",function(tr){We._update(tr.dataType==="style"),We.fire(new l.Event(tr.dataType+"data",tr))}),this.on("dataloading",function(tr){We.fire(new l.Event(tr.dataType+"dataloading",tr))})}Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne;var Fe={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return ne.prototype._getMapId=function(){return this._mapId},ne.prototype.addControl=function(We,At){if(At===void 0&&(We.getDefaultPosition?At=We.getDefaultPosition():At="top-right"),!We||!We.onAdd)return this.fire(new l.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var Yt=We.onAdd(this);this._controls.push(We);var tr=this._controlPositions[At];return At.indexOf("bottom")!==-1?tr.insertBefore(Yt,tr.firstChild):tr.appendChild(Yt),this},ne.prototype.removeControl=function(We){if(!We||!We.onRemove)return this.fire(new l.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var At=this._controls.indexOf(We);return At>-1&&this._controls.splice(At,1),We.onRemove(this),this},ne.prototype.hasControl=function(We){return this._controls.indexOf(We)>-1},ne.prototype.resize=function(We){var At=this._containerDimensions(),Yt=At[0],tr=At[1];this._resizeCanvas(Yt,tr),this.transform.resize(Yt,tr),this.painter.resize(Yt,tr);var Pt=!this._moving;return Pt&&(this.stop(),this.fire(new l.Event("movestart",We)).fire(new l.Event("move",We))),this.fire(new l.Event("resize",We)),Pt&&this.fire(new l.Event("moveend",We)),this},ne.prototype.getBounds=function(){return this.transform.getBounds()},ne.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},ne.prototype.setMaxBounds=function(We){return this.transform.setMaxBounds(l.LngLatBounds.convert(We)),this._update()},ne.prototype.setMinZoom=function(We){if(We=We??Ra,We>=Ra&&We<=this.transform.maxZoom)return this.transform.minZoom=We,this._update(),this.getZoom()<We&&this.setZoom(We),this;throw new Error("minZoom must be between "+Ra+" and the current maxZoom, inclusive")},ne.prototype.getMinZoom=function(){return this.transform.minZoom},ne.prototype.setMaxZoom=function(We){if(We=We??ls,We>=this.transform.minZoom)return this.transform.maxZoom=We,this._update(),this.getZoom()>We&&this.setZoom(We),this;throw new Error("maxZoom must be greater than the current minZoom")},ne.prototype.getMaxZoom=function(){return this.transform.maxZoom},ne.prototype.setMinPitch=function(We){if(We=We??ua,We<ua)throw new Error("minPitch must be greater than or equal to "+ua);if(We>=ua&&We<=this.transform.maxPitch)return this.transform.minPitch=We,this._update(),this.getPitch()<We&&this.setPitch(We),this;throw new Error("minPitch must be between "+ua+" and the current maxPitch, inclusive")},ne.prototype.getMinPitch=function(){return this.transform.minPitch},ne.prototype.setMaxPitch=function(We){if(We=We??Wo,We>Wo)throw new Error("maxPitch must be less than or equal to "+Wo);if(We>=this.transform.minPitch)return this.transform.maxPitch=We,this._update(),this.getPitch()>We&&this.setPitch(We),this;throw new Error("maxPitch must be greater than the current minPitch")},ne.prototype.getMaxPitch=function(){return this.transform.maxPitch},ne.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},ne.prototype.setRenderWorldCopies=function(We){return this.transform.renderWorldCopies=We,this._update()},ne.prototype.project=function(We){return this.transform.locationPoint(l.LngLat.convert(We))},ne.prototype.unproject=function(We){return this.transform.pointLocation(l.Point.convert(We))},ne.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},ne.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},ne.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},ne.prototype._createDelegatedListener=function(We,At,Yt){var tr=this,Pt;if(We==="mouseenter"||We==="mouseover"){var jt=!1,hr=function(Rr){var jr=tr.getLayer(At)?tr.queryRenderedFeatures(Rr.point,{layers:[At]}):[];jr.length?jt||(jt=!0,Yt.call(tr,new Wr(We,tr,Rr.originalEvent,{features:jr}))):jt=!1},qr=function(){jt=!1};return{layer:At,listener:Yt,delegates:{mousemove:hr,mouseout:qr}}}else if(We==="mouseleave"||We==="mouseout"){var zr=!1,Gr=function(Rr){var jr=tr.getLayer(At)?tr.queryRenderedFeatures(Rr.point,{layers:[At]}):[];jr.length?zr=!0:zr&&(zr=!1,Yt.call(tr,new Wr(We,tr,Rr.originalEvent)))},en=function(Rr){zr&&(zr=!1,Yt.call(tr,new Wr(We,tr,Rr.originalEvent)))};return{layer:At,listener:Yt,delegates:{mousemove:Gr,mouseout:en}}}else{var Xr=function(Rr){var jr=tr.getLayer(At)?tr.queryRenderedFeatures(Rr.point,{layers:[At]}):[];jr.length&&(Rr.features=jr,Yt.call(tr,Rr),delete Rr.features)};return{layer:At,listener:Yt,delegates:(Pt={},Pt[We]=Xr,Pt)}}},ne.prototype.on=function(We,At,Yt){if(Yt===void 0)return Xe.prototype.on.call(this,We,At);var tr=this._createDelegatedListener(We,At,Yt);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[We]=this._delegatedListeners[We]||[],this._delegatedListeners[We].push(tr);for(var Pt in tr.delegates)this.on(Pt,tr.delegates[Pt]);return this},ne.prototype.once=function(We,At,Yt){if(Yt===void 0)return Xe.prototype.once.call(this,We,At);var tr=this._createDelegatedListener(We,At,Yt);for(var Pt in tr.delegates)this.once(Pt,tr.delegates[Pt]);return this},ne.prototype.off=function(We,At,Yt){var tr=this;if(Yt===void 0)return Xe.prototype.off.call(this,We,At);var Pt=function(jt){for(var hr=jt[We],qr=0;qr<hr.length;qr++){var zr=hr[qr];if(zr.layer===At&&zr.listener===Yt){for(var Gr in zr.delegates)tr.off(Gr,zr.delegates[Gr]);return hr.splice(qr,1),tr}}};return this._delegatedListeners&&this._delegatedListeners[We]&&Pt(this._delegatedListeners),this},ne.prototype.queryRenderedFeatures=function(We,At){if(!this.style)return[];At===void 0&&We!==void 0&&!(We instanceof l.Point)&&!Array.isArray(We)&&(At=We,We=void 0),At=At||{},We=We||[[0,0],[this.transform.width,this.transform.height]];var Yt;if(We instanceof l.Point||typeof We[0]=="number")Yt=[l.Point.convert(We)];else{var tr=l.Point.convert(We[0]),Pt=l.Point.convert(We[1]);Yt=[tr,new l.Point(Pt.x,tr.y),Pt,new l.Point(tr.x,Pt.y),tr]}return this.style.queryRenderedFeatures(Yt,At,this.transform)},ne.prototype.querySourceFeatures=function(We,At){return this.style.querySourceFeatures(We,At)},ne.prototype.setStyle=function(We,At){return At=l.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},At),At.diff!==!1&&At.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&We?(this._diffStyle(We,At),this):(this._localIdeographFontFamily=At.localIdeographFontFamily,this._updateStyle(We,At))},ne.prototype._getUIString=function(We){var At=this._locale[We];if(At==null)throw new Error("Missing UI string '"+We+"'");return At},ne.prototype._updateStyle=function(We,At){if(this.style&&(this.style.setEventedParent(null),this.style._remove()),We)this.style=new ev(this,At||{});else return delete this.style,this;return this.style.setEventedParent(this,{style:this.style}),typeof We=="string"?this.style.loadURL(We):this.style.loadJSON(We),this},ne.prototype._lazyInitEmptyStyle=function(){this.style||(this.style=new ev(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())},ne.prototype._diffStyle=function(We,At){var Yt=this;if(typeof We=="string"){var tr=this._requestManager.normalizeStyleURL(We),Pt=this._requestManager.transformRequest(tr,l.ResourceType.Style);l.getJSON(Pt,function(jt,hr){jt?Yt.fire(new l.ErrorEvent(jt)):hr&&Yt._updateDiff(hr,At)})}else typeof We=="object"&&this._updateDiff(We,At)},ne.prototype._updateDiff=function(We,At){try{this.style.setState(We)&&this._update(!0)}catch(Yt){l.warnOnce("Unable to perform style diff: "+(Yt.message||Yt.error||Yt)+".  Rebuilding the style from scratch."),this._updateStyle(We,At)}},ne.prototype.getStyle=function(){if(this.style)return this.style.serialize()},ne.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():l.warnOnce("There is no style added to the map.")},ne.prototype.addSource=function(We,At){return this._lazyInitEmptyStyle(),this.style.addSource(We,At),this._update(!0)},ne.prototype.isSourceLoaded=function(We){var At=this.style&&this.style.sourceCaches[We];if(At===void 0){this.fire(new l.ErrorEvent(new Error("There is no source with ID '"+We+"'")));return}return At.loaded()},ne.prototype.areTilesLoaded=function(){var We=this.style&&this.style.sourceCaches;for(var At in We){var Yt=We[At],tr=Yt._tiles;for(var Pt in tr){var jt=tr[Pt];if(!(jt.state==="loaded"||jt.state==="errored"))return!1}}return!0},ne.prototype.addSourceType=function(We,At,Yt){return this._lazyInitEmptyStyle(),this.style.addSourceType(We,At,Yt)},ne.prototype.removeSource=function(We){return this.style.removeSource(We),this._update(!0)},ne.prototype.getSource=function(We){return this.style.getSource(We)},ne.prototype.addImage=function(We,At,Yt){Yt===void 0&&(Yt={});var tr=Yt.pixelRatio;tr===void 0&&(tr=1);var Pt=Yt.sdf;Pt===void 0&&(Pt=!1);var jt=Yt.stretchX,hr=Yt.stretchY,qr=Yt.content;this._lazyInitEmptyStyle();var zr=0;if(At instanceof Po||Ha&&At instanceof Ha){var Gr=l.browser.getImageData(At),en=Gr.width,Xr=Gr.height,Rr=Gr.data;this.style.addImage(We,{data:new l.RGBAImage({width:en,height:Xr},Rr),pixelRatio:tr,stretchX:jt,stretchY:hr,content:qr,sdf:Pt,version:zr})}else{if(At.width===void 0||At.height===void 0)return this.fire(new l.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 jr=At.width,Br=At.height,Bn=At.data,ui=At;this.style.addImage(We,{data:new l.RGBAImage({width:jr,height:Br},new Uint8Array(Bn)),pixelRatio:tr,stretchX:jt,stretchY:hr,content:qr,sdf:Pt,version:zr,userImage:ui}),ui.onAdd&&ui.onAdd(this,We)}},ne.prototype.updateImage=function(We,At){var Yt=this.style.getImage(We);if(!Yt)return this.fire(new l.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));var tr=At instanceof Po||Ha&&At instanceof Ha?l.browser.getImageData(At):At,Pt=tr.width,jt=tr.height,hr=tr.data;if(Pt===void 0||jt===void 0)return this.fire(new l.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(Pt!==Yt.data.width||jt!==Yt.data.height)return this.fire(new l.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image")));var qr=!(At instanceof Po||Ha&&At instanceof Ha);Yt.data.replace(hr,qr),this.style.updateImage(We,Yt)},ne.prototype.hasImage=function(We){return We?!!this.style.getImage(We):(this.fire(new l.ErrorEvent(new Error("Missing required image id"))),!1)},ne.prototype.removeImage=function(We){this.style.removeImage(We)},ne.prototype.loadImage=function(We,At){l.getImage(this._requestManager.transformRequest(We,l.ResourceType.Image),At)},ne.prototype.listImages=function(){return this.style.listImages()},ne.prototype.addLayer=function(We,At){return this._lazyInitEmptyStyle(),this.style.addLayer(We,At),this._update(!0)},ne.prototype.moveLayer=function(We,At){return this.style.moveLayer(We,At),this._update(!0)},ne.prototype.removeLayer=function(We){return this.style.removeLayer(We),this._update(!0)},ne.prototype.getLayer=function(We){return this.style.getLayer(We)},ne.prototype.setLayerZoomRange=function(We,At,Yt){return this.style.setLayerZoomRange(We,At,Yt),this._update(!0)},ne.prototype.setFilter=function(We,At,Yt){return Yt===void 0&&(Yt={}),this.style.setFilter(We,At,Yt),this._update(!0)},ne.prototype.getFilter=function(We){return this.style.getFilter(We)},ne.prototype.setPaintProperty=function(We,At,Yt,tr){return tr===void 0&&(tr={}),this.style.setPaintProperty(We,At,Yt,tr),this._update(!0)},ne.prototype.getPaintProperty=function(We,At){return this.style.getPaintProperty(We,At)},ne.prototype.setLayoutProperty=function(We,At,Yt,tr){return tr===void 0&&(tr={}),this.style.setLayoutProperty(We,At,Yt,tr),this._update(!0)},ne.prototype.getLayoutProperty=function(We,At){return this.style.getLayoutProperty(We,At)},ne.prototype.setLight=function(We,At){return At===void 0&&(At={}),this._lazyInitEmptyStyle(),this.style.setLight(We,At),this._update(!0)},ne.prototype.getLight=function(){return this.style.getLight()},ne.prototype.setFeatureState=function(We,At){return this.style.setFeatureState(We,At),this._update()},ne.prototype.removeFeatureState=function(We,At){return this.style.removeFeatureState(We,At),this._update()},ne.prototype.getFeatureState=function(We){return this.style.getFeatureState(We)},ne.prototype.getContainer=function(){return this._container},ne.prototype.getCanvasContainer=function(){return this._canvasContainer},ne.prototype.getCanvas=function(){return this._canvas},ne.prototype._containerDimensions=function(){var We=0,At=0;return this._container&&(We=this._container.clientWidth||400,At=this._container.clientHeight||300),[We,At]},ne.prototype._detectMissingCSS=function(){var We=l.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color");We!=="rgb(250, 128, 114)"&&l.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/.")},ne.prototype._setupContainer=function(){var We=this._container;We.classList.add("mapboxgl-map");var At=this._missingCSSCanary=c.create("div","mapboxgl-canary",We);At.style.visibility="hidden",this._detectMissingCSS();var Yt=this._canvasContainer=c.create("div","mapboxgl-canvas-container",We);this._interactive&&Yt.classList.add("mapboxgl-interactive"),this._canvas=c.create("canvas","mapboxgl-canvas",Yt),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 tr=this._containerDimensions();this._resizeCanvas(tr[0],tr[1]);var Pt=this._controlContainer=c.create("div","mapboxgl-control-container",We),jt=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(hr){jt[hr]=c.create("div","mapboxgl-ctrl-"+hr,Pt)}),this._container.addEventListener("scroll",this._onMapScroll,!1)},ne.prototype._resizeCanvas=function(We,At){var Yt=l.browser.devicePixelRatio||1;this._canvas.width=Yt*We,this._canvas.height=Yt*At,this._canvas.style.width=We+"px",this._canvas.style.height=At+"px"},ne.prototype._setupPainter=function(){var We=l.extend({},u.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),At=this._canvas.getContext("webgl",We)||this._canvas.getContext("experimental-webgl",We);if(!At){this.fire(new l.ErrorEvent(new Error("Failed to initialize WebGL")));return}this.painter=new _c(At,this.transform),l.webpSupported.testSupport(At)},ne.prototype._contextLost=function(We){We.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new l.Event("webglcontextlost",{originalEvent:We}))},ne.prototype._contextRestored=function(We){this._setupPainter(),this.resize(),this._update(),this.fire(new l.Event("webglcontextrestored",{originalEvent:We}))},ne.prototype._onMapScroll=function(We){if(We.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},ne.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()},ne.prototype._update=function(We){return this.style?(this._styleDirty=this._styleDirty||We,this._sourcesDirty=!0,this.triggerRepaint(),this):this},ne.prototype._requestRenderFrame=function(We){return this._update(),this._renderTaskQueue.add(We)},ne.prototype._cancelRenderFrame=function(We){this._renderTaskQueue.remove(We)},ne.prototype._render=function(We){var At=this,Yt,tr=0,Pt=this.painter.context.extTimerQuery;if(this.listens("gpu-timing-frame")&&(Yt=Pt.createQueryEXT(),Pt.beginQueryEXT(Pt.TIME_ELAPSED_EXT,Yt),tr=l.browser.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(We),!this._removed){var jt=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var hr=this.transform.zoom,qr=l.browser.now();this.style.zoomHistory.update(hr,qr);var zr=new l.EvaluationParameters(hr,{now:qr,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),Gr=zr.crossFadingFactor();(Gr!==1||Gr!==this._crossFadingFactor)&&(jt=!0,this._crossFadingFactor=Gr),this.style.update(zr)}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 l.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new l.Event("load"))),this.style&&(this.style.hasTransitions()||jt)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens("gpu-timing-frame")){var en=l.browser.now()-tr;Pt.endQueryEXT(Pt.TIME_ELAPSED_EXT,Yt),setTimeout(function(){var jr=Pt.getQueryObjectEXT(Yt,Pt.QUERY_RESULT_EXT)/1e6;Pt.deleteQueryEXT(Yt),At.fire(new l.Event("gpu-timing-frame",{cpuTime:en,gpuTime:jr}))},50)}if(this.listens("gpu-timing-layer")){var Xr=this.painter.collectGpuTimers();setTimeout(function(){var jr=At.painter.queryGpuTimers(Xr);At.fire(new l.Event("gpu-timing-layer",{layerTimes:jr}))},50)}var Rr=this._sourcesDirty||this._styleDirty||this._placementDirty;return Rr||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new l.Event("idle")),this._loaded&&!this._fullyLoaded&&!Rr&&(this._fullyLoaded=!0),this}},ne.prototype.remove=function(){this._hash&&this._hash.remove();for(var We=0,At=this._controls;We<At.length;We+=1){var Yt=At[We];Yt.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 l.window<"u"&&(l.window.removeEventListener("resize",this._onWindowResize,!1),l.window.removeEventListener("orientationchange",this._onWindowResize,!1),l.window.removeEventListener("online",this._onWindowOnline,!1));var tr=this.painter.context.gl.getExtension("WEBGL_lose_context");tr&&tr.loseContext&&tr.loseContext(),au(this._canvasContainer),au(this._controlContainer),au(this._missingCSSCanary),this._container.classList.remove("mapboxgl-map"),this._removed=!0,this.fire(new l.Event("remove"))},ne.prototype.triggerRepaint=function(){var We=this;this.style&&!this._frame&&(this._frame=l.browser.frame(function(At){We._frame=null,We._render(At)}))},ne.prototype._onWindowOnline=function(){this._update()},ne.prototype._onWindowResize=function(We){this._trackResize&&this.resize({originalEvent:We})._update()},Fe.showTileBoundaries.get=function(){return!!this._showTileBoundaries},Fe.showTileBoundaries.set=function(me){this._showTileBoundaries!==me&&(this._showTileBoundaries=me,this._update())},Fe.showPadding.get=function(){return!!this._showPadding},Fe.showPadding.set=function(me){this._showPadding!==me&&(this._showPadding=me,this._update())},Fe.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},Fe.showCollisionBoxes.set=function(me){this._showCollisionBoxes!==me&&(this._showCollisionBoxes=me,me?this.style._generateCollisionBoxes():this._update())},Fe.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},Fe.showOverdrawInspector.set=function(me){this._showOverdrawInspector!==me&&(this._showOverdrawInspector=me,this._update())},Fe.repaint.get=function(){return!!this._repaint},Fe.repaint.set=function(me){this._repaint!==me&&(this._repaint=me,this.triggerRepaint())},Fe.vertices.get=function(){return!!this._vertices},Fe.vertices.set=function(me){this._vertices=me,this._update()},ne.prototype._setCacheLimits=function(We,At){l.setCacheLimits(We,At)},Fe.version.get=function(){return l.version},Object.defineProperties(ne.prototype,Fe),ne})(ga);function au(Xe){Xe.parentNode&&Xe.parentNode.removeChild(Xe)}var ws={showCompass:!0,showZoom:!0,visualizePitch:!1},Xs=function(ne){var Fe=this;this.options=l.extend({},ws,ne),this._container=c.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",function(me){return me.preventDefault()}),this.options.showZoom&&(l.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",function(me){return Fe._map.zoomIn({},{originalEvent:me})}),c.create("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden",!0),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",function(me){return Fe._map.zoomOut({},{originalEvent:me})}),c.create("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden",!0)),this.options.showCompass&&(l.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",function(me){Fe.options.visualizePitch?Fe._map.resetNorthPitch({},{originalEvent:me}):Fe._map.resetNorth({},{originalEvent:me})}),this._compassIcon=c.create("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden",!0))};Xs.prototype._updateZoomButtons=function(){var ne=this._map.getZoom(),Fe=ne===this._map.getMaxZoom(),me=ne===this._map.getMinZoom();this._zoomInButton.disabled=Fe,this._zoomOutButton.disabled=me,this._zoomInButton.setAttribute("aria-disabled",Fe.toString()),this._zoomOutButton.setAttribute("aria-disabled",me.toString())},Xs.prototype._rotateCompassArrow=function(){var ne=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=ne},Xs.prototype.onAdd=function(ne){return this._map=ne,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 jo(this._map,this._compass,this.options.visualizePitch)),this._container},Xs.prototype.onRemove=function(){c.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},Xs.prototype._createButton=function(ne,Fe){var me=c.create("button",ne,this._container);return me.type="button",me.addEventListener("click",Fe),me},Xs.prototype._setButtonTitle=function(ne,Fe){var me=this._map._getUIString("NavigationControl."+Fe);ne.title=me,ne.setAttribute("aria-label",me)};var jo=function(ne,Fe,me){me===void 0&&(me=!1),this._clickTolerance=10,this.element=Fe,this.mouseRotate=new Vc({clickTolerance:ne.dragRotate._mouseRotate._clickTolerance}),this.map=ne,me&&(this.mousePitch=new ou({clickTolerance:ne.dragRotate._mousePitch._clickTolerance})),l.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),c.addEventListener(Fe,"mousedown",this.mousedown),c.addEventListener(Fe,"touchstart",this.touchstart,{passive:!1}),c.addEventListener(Fe,"touchmove",this.touchmove),c.addEventListener(Fe,"touchend",this.touchend),c.addEventListener(Fe,"touchcancel",this.reset)};jo.prototype.down=function(ne,Fe){this.mouseRotate.mousedown(ne,Fe),this.mousePitch&&this.mousePitch.mousedown(ne,Fe),c.disableDrag()},jo.prototype.move=function(ne,Fe){var me=this.map,We=this.mouseRotate.mousemoveWindow(ne,Fe);if(We&&We.bearingDelta&&me.setBearing(me.getBearing()+We.bearingDelta),this.mousePitch){var At=this.mousePitch.mousemoveWindow(ne,Fe);At&&At.pitchDelta&&me.setPitch(me.getPitch()+At.pitchDelta)}},jo.prototype.off=function(){var ne=this.element;c.removeEventListener(ne,"mousedown",this.mousedown),c.removeEventListener(ne,"touchstart",this.touchstart,{passive:!1}),c.removeEventListener(ne,"touchmove",this.touchmove),c.removeEventListener(ne,"touchend",this.touchend),c.removeEventListener(ne,"touchcancel",this.reset),this.offTemp()},jo.prototype.offTemp=function(){c.enableDrag(),c.removeEventListener(l.window,"mousemove",this.mousemove),c.removeEventListener(l.window,"mouseup",this.mouseup)},jo.prototype.mousedown=function(ne){this.down(l.extend({},ne,{ctrlKey:!0,preventDefault:function(){return ne.preventDefault()}}),c.mousePos(this.element,ne)),c.addEventListener(l.window,"mousemove",this.mousemove),c.addEventListener(l.window,"mouseup",this.mouseup)},jo.prototype.mousemove=function(ne){this.move(ne,c.mousePos(this.element,ne))},jo.prototype.mouseup=function(ne){this.mouseRotate.mouseupWindow(ne),this.mousePitch&&this.mousePitch.mouseupWindow(ne),this.offTemp()},jo.prototype.touchstart=function(ne){ne.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=c.touchPos(this.element,ne.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return ne.preventDefault()}},this._startPos))},jo.prototype.touchmove=function(ne){ne.targetTouches.length!==1?this.reset():(this._lastPos=c.touchPos(this.element,ne.targetTouches)[0],this.move({preventDefault:function(){return ne.preventDefault()}},this._lastPos))},jo.prototype.touchend=function(ne){ne.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()},jo.prototype.reset=function(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()};function Jl(Xe,ne,Fe){if(Xe=new l.LngLat(Xe.lng,Xe.lat),ne){var me=new l.LngLat(Xe.lng-360,Xe.lat),We=new l.LngLat(Xe.lng+360,Xe.lat),At=Fe.locationPoint(Xe).distSqr(ne);Fe.locationPoint(me).distSqr(ne)<At?Xe=me:Fe.locationPoint(We).distSqr(ne)<At&&(Xe=We)}for(;Math.abs(Xe.lng-Fe.center.lng)>180;){var Yt=Fe.locationPoint(Xe);if(Yt.x>=0&&Yt.y>=0&&Yt.x<=Fe.width&&Yt.y<=Fe.height)break;Xe.lng>Fe.center.lng?Xe.lng-=360:Xe.lng+=360}return Xe}var Mu={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 Fu(Xe,ne,Fe){var me=Xe.classList;for(var We in Mu)me.remove("mapboxgl-"+Fe+"-anchor-"+We);me.add("mapboxgl-"+Fe+"-anchor-"+ne)}var cf=(function(Xe){function ne(Fe,me){if(Xe.call(this),(Fe instanceof l.window.HTMLElement||me)&&(Fe=l.extend({element:Fe},me)),l.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=Fe&&Fe.anchor||"center",this._color=Fe&&Fe.color||"#3FB1CE",this._scale=Fe&&Fe.scale||1,this._draggable=Fe&&Fe.draggable||!1,this._clickTolerance=Fe&&Fe.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=Fe&&Fe.rotation||0,this._rotationAlignment=Fe&&Fe.rotationAlignment||"auto",this._pitchAlignment=Fe&&Fe.pitchAlignment&&Fe.pitchAlignment!=="auto"?Fe.pitchAlignment:this._rotationAlignment,!Fe||!Fe.element){this._defaultMarker=!0,this._element=c.create("div"),this._element.setAttribute("aria-label","Map marker");var We=c.createNS("http://www.w3.org/2000/svg","svg"),At=41,Yt=27;We.setAttributeNS(null,"display","block"),We.setAttributeNS(null,"height",At+"px"),We.setAttributeNS(null,"width",Yt+"px"),We.setAttributeNS(null,"viewBox","0 0 "+Yt+" "+At);var tr=c.createNS("http://www.w3.org/2000/svg","g");tr.setAttributeNS(null,"stroke","none"),tr.setAttributeNS(null,"stroke-width","1"),tr.setAttributeNS(null,"fill","none"),tr.setAttributeNS(null,"fill-rule","evenodd");var Pt=c.createNS("http://www.w3.org/2000/svg","g");Pt.setAttributeNS(null,"fill-rule","nonzero");var jt=c.createNS("http://www.w3.org/2000/svg","g");jt.setAttributeNS(null,"transform","translate(3.0, 29.0)"),jt.setAttributeNS(null,"fill","#000000");for(var hr=[{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"}],qr=0,zr=hr;qr<zr.length;qr+=1){var Gr=zr[qr],en=c.createNS("http://www.w3.org/2000/svg","ellipse");en.setAttributeNS(null,"opacity","0.04"),en.setAttributeNS(null,"cx","10.5"),en.setAttributeNS(null,"cy","5.80029008"),en.setAttributeNS(null,"rx",Gr.rx),en.setAttributeNS(null,"ry",Gr.ry),jt.appendChild(en)}var Xr=c.createNS("http://www.w3.org/2000/svg","g");Xr.setAttributeNS(null,"fill",this._color);var Rr=c.createNS("http://www.w3.org/2000/svg","path");Rr.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"),Xr.appendChild(Rr);var jr=c.createNS("http://www.w3.org/2000/svg","g");jr.setAttributeNS(null,"opacity","0.25"),jr.setAttributeNS(null,"fill","#000000");var Br=c.createNS("http://www.w3.org/2000/svg","path");Br.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"),jr.appendChild(Br);var Bn=c.createNS("http://www.w3.org/2000/svg","g");Bn.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Bn.setAttributeNS(null,"fill","#FFFFFF");var ui=c.createNS("http://www.w3.org/2000/svg","g");ui.setAttributeNS(null,"transform","translate(8.0, 8.0)");var Ii=c.createNS("http://www.w3.org/2000/svg","circle");Ii.setAttributeNS(null,"fill","#000000"),Ii.setAttributeNS(null,"opacity","0.25"),Ii.setAttributeNS(null,"cx","5.5"),Ii.setAttributeNS(null,"cy","5.5"),Ii.setAttributeNS(null,"r","5.4999962");var Ga=c.createNS("http://www.w3.org/2000/svg","circle");Ga.setAttributeNS(null,"fill","#FFFFFF"),Ga.setAttributeNS(null,"cx","5.5"),Ga.setAttributeNS(null,"cy","5.5"),Ga.setAttributeNS(null,"r","5.4999962"),ui.appendChild(Ii),ui.appendChild(Ga),Pt.appendChild(jt),Pt.appendChild(Xr),Pt.appendChild(jr),Pt.appendChild(Bn),Pt.appendChild(ui),We.appendChild(Pt),We.setAttributeNS(null,"height",At*this._scale+"px"),We.setAttributeNS(null,"width",Yt*this._scale+"px"),this._element.appendChild(We),this._offset=l.Point.convert(Fe&&Fe.offset||[0,-14])}else this._element=Fe.element,this._offset=l.Point.convert(Fe&&Fe.offset||[0,0]);this._element.classList.add("mapboxgl-marker"),this._element.addEventListener("dragstart",function(ka){ka.preventDefault()}),this._element.addEventListener("mousedown",function(ka){ka.preventDefault()}),Fu(this._element,this._anchor,"marker"),this._popup=null}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.addTo=function(me){return this.remove(),this._map=me,me.getCanvasContainer().appendChild(this._element),me.on("move",this._update),me.on("moveend",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this},ne.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),c.remove(this._element),this._popup&&this._popup.remove(),this},ne.prototype.getLngLat=function(){return this._lngLat},ne.prototype.setLngLat=function(me){return this._lngLat=l.LngLat.convert(me),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},ne.prototype.getElement=function(){return this._element},ne.prototype.setPopup=function(me){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),me){if(!("offset"in me.options)){var We=38.1,At=13.5,Yt=Math.sqrt(Math.pow(At,2)/2);me.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-We],"bottom-left":[Yt,(We-At+Yt)*-1],"bottom-right":[-Yt,(We-At+Yt)*-1],left:[At,(We-At)*-1],right:[-At,(We-At)*-1]}:this._offset}this._popup=me,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},ne.prototype._onKeyPress=function(me){var We=me.code,At=me.charCode||me.keyCode;(We==="Space"||We==="Enter"||At===32||At===13)&&this.togglePopup()},ne.prototype._onMapClick=function(me){var We=me.originalEvent.target,At=this._element;this._popup&&(We===At||At.contains(We))&&this.togglePopup()},ne.prototype.getPopup=function(){return this._popup},ne.prototype.togglePopup=function(){var me=this._popup;if(me)me.isOpen()?me.remove():me.addTo(this._map);else return this;return this},ne.prototype._update=function(me){if(this._map){this._map.transform.renderWorldCopies&&(this._lngLat=Jl(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);var We="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?We="rotateZ("+this._rotation+"deg)":this._rotationAlignment==="map"&&(We="rotateZ("+(this._rotation-this._map.getBearing())+"deg)");var At="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?At="rotateX(0deg)":this._pitchAlignment==="map"&&(At="rotateX("+this._map.getPitch()+"deg)"),(!me||me.type==="moveend")&&(this._pos=this._pos.round()),c.setTransform(this._element,Mu[this._anchor]+" translate("+this._pos.x+"px, "+this._pos.y+"px) "+At+" "+We)}},ne.prototype.getOffset=function(){return this._offset},ne.prototype.setOffset=function(me){return this._offset=l.Point.convert(me),this._update(),this},ne.prototype._onMove=function(me){if(!this._isDragging){var We=this._clickTolerance||this._map._clickTolerance;this._isDragging=me.point.dist(this._pointerdownPos)>=We}this._isDragging&&(this._pos=me.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 l.Event("dragstart"))),this.fire(new l.Event("drag")))},ne.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 l.Event("dragend")),this._state="inactive"},ne.prototype._addDragHandler=function(me){this._element.contains(me.originalEvent.target)&&(me.preventDefault(),this._positionDelta=me.point.sub(this._pos).add(this._offset),this._pointerdownPos=me.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))},ne.prototype.setDraggable=function(me){return this._draggable=!!me,this._map&&(me?(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},ne.prototype.isDraggable=function(){return this._draggable},ne.prototype.setRotation=function(me){return this._rotation=me||0,this._update(),this},ne.prototype.getRotation=function(){return this._rotation},ne.prototype.setRotationAlignment=function(me){return this._rotationAlignment=me||"auto",this._update(),this},ne.prototype.getRotationAlignment=function(){return this._rotationAlignment},ne.prototype.setPitchAlignment=function(me){return this._pitchAlignment=me&&me!=="auto"?me:this._rotationAlignment,this._update(),this},ne.prototype.getPitchAlignment=function(){return this._pitchAlignment},ne})(l.Evented),zu={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},mh;function Wc(Xe){mh!==void 0?Xe(mh):l.window.navigator.permissions!==void 0?l.window.navigator.permissions.query({name:"geolocation"}).then(function(ne){mh=ne.state!=="denied",Xe(mh)}):(mh=!!l.window.navigator.geolocation,Xe(mh))}var Zd=0,jh=!1,fp=(function(Xe){function ne(Fe){Xe.call(this),this.options=l.extend({},zu,Fe),l.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.onAdd=function(me){return this._map=me,this._container=c.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),Wc(this._setupUI),this._container},ne.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(l.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(),c.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Zd=0,jh=!1},ne.prototype._isOutOfMapMaxBounds=function(me){var We=this._map.getMaxBounds(),At=me.coords;return We&&(At.longitude<We.getWest()||At.longitude>We.getEast()||At.latitude<We.getSouth()||At.latitude>We.getNorth())},ne.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}},ne.prototype._onSuccess=function(me){if(this._map){if(this._isOutOfMapMaxBounds(me)){this._setErrorState(),this.fire(new l.Event("outofmaxbounds",me)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=me,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(me),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(me),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new l.Event("geolocate",me)),this._finish()}},ne.prototype._updateCamera=function(me){var We=new l.LngLat(me.coords.longitude,me.coords.latitude),At=me.coords.accuracy,Yt=this._map.getBearing(),tr=l.extend({bearing:Yt},this.options.fitBoundsOptions);this._map.fitBounds(We.toBounds(At),tr,{geolocateSource:!0})},ne.prototype._updateMarker=function(me){if(me){var We=new l.LngLat(me.coords.longitude,me.coords.latitude);this._accuracyCircleMarker.setLngLat(We).addTo(this._map),this._userLocationDotMarker.setLngLat(We).addTo(this._map),this._accuracy=me.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},ne.prototype._updateCircleRadius=function(){var me=this._map._container.clientHeight/2,We=this._map.unproject([0,me]),At=this._map.unproject([1,me]),Yt=We.distanceTo(At),tr=Math.ceil(2*this._accuracy/Yt);this._circleElement.style.width=tr+"px",this._circleElement.style.height=tr+"px"},ne.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},ne.prototype._onError=function(me){if(this._map){if(this.options.trackUserLocation)if(me.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 We=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=We,this._geolocateButton.setAttribute("aria-label",We),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(me.code===3&&jh)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new l.Event("error",me)),this._finish()}},ne.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},ne.prototype._setupUI=function(me){var We=this;if(this._container.addEventListener("contextmenu",function(tr){return tr.preventDefault()}),this._geolocateButton=c.create("button","mapboxgl-ctrl-geolocate",this._container),c.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",me===!1){l.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var At=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=At,this._geolocateButton.setAttribute("aria-label",At)}else{var Yt=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=Yt,this._geolocateButton.setAttribute("aria-label",Yt)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=c.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new cf(this._dotElement),this._circleElement=c.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new cf({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(tr){var Pt=tr.originalEvent&&tr.originalEvent.type==="resize";!tr.geolocateSource&&We._watchState==="ACTIVE_LOCK"&&!Pt&&(We._watchState="BACKGROUND",We._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),We._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),We.fire(new l.Event("trackuserlocationend")))})},ne.prototype.trigger=function(){if(!this._setup)return l.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 l.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Zd--,jh=!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 l.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 l.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"),Zd++;var me;Zd>1?(me={maximumAge:6e5,timeout:0},jh=!0):(me=this.options.positionOptions,jh=!1),this._geolocationWatchID=l.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,me)}}else l.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},ne.prototype._clearWatch=function(){l.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)},ne})(l.Evented),Am={maxWidth:100,unit:"metric"},_d=function(ne){this.options=l.extend({},Am,ne),l.bindAll(["_onMove","setUnit"],this)};_d.prototype.getDefaultPosition=function(){return"bottom-left"},_d.prototype._onMove=function(){Hd(this._map,this._container,this.options)},_d.prototype.onAdd=function(ne){return this._map=ne,this._container=c.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",ne.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},_d.prototype.onRemove=function(){c.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},_d.prototype.setUnit=function(ne){this.options.unit=ne,Hd(this._map,this._container,this.options)};function Hd(Xe,ne,Fe){var me=Fe&&Fe.maxWidth||100,We=Xe._container.clientHeight/2,At=Xe.unproject([0,We]),Yt=Xe.unproject([me,We]),tr=At.distanceTo(Yt);if(Fe&&Fe.unit==="imperial"){var Pt=3.2808*tr;if(Pt>5280){var jt=Pt/5280;Ol(ne,me,jt,Xe._getUIString("ScaleControl.Miles"))}else Ol(ne,me,Pt,Xe._getUIString("ScaleControl.Feet"))}else if(Fe&&Fe.unit==="nautical"){var hr=tr/1852;Ol(ne,me,hr,Xe._getUIString("ScaleControl.NauticalMiles"))}else tr>=1e3?Ol(ne,me,tr/1e3,Xe._getUIString("ScaleControl.Kilometers")):Ol(ne,me,tr,Xe._getUIString("ScaleControl.Meters"))}function Ol(Xe,ne,Fe,me){var We=Fc(Fe),At=We/Fe;Xe.style.width=ne*At+"px",Xe.innerHTML=We+"&nbsp;"+me}function dp(Xe){var ne=Math.pow(10,Math.ceil(-Math.log(Xe)/Math.LN10));return Math.round(Xe*ne)/ne}function Fc(Xe){var ne=Math.pow(10,(""+Math.floor(Xe)).length-1),Fe=Xe/ne;return Fe=Fe>=10?10:Fe>=5?5:Fe>=3?3:Fe>=2?2:Fe>=1?1:dp(Fe),ne*Fe}var Hf=function(ne){this._fullscreen=!1,ne&&ne.container&&(ne.container instanceof l.window.HTMLElement?this._container=ne.container:l.warnOnce("Full screen control 'container' must be a DOM element.")),l.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in l.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in l.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in l.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in l.window.document&&(this._fullscreenchange="MSFullscreenChange")};Hf.prototype.onAdd=function(ne){return this._map=ne,this._container||(this._container=this._map.getContainer()),this._controlContainer=c.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",l.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Hf.prototype.onRemove=function(){c.remove(this._controlContainer),this._map=null,l.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Hf.prototype._checkFullscreenSupport=function(){return!!(l.window.document.fullscreenEnabled||l.window.document.mozFullScreenEnabled||l.window.document.msFullscreenEnabled||l.window.document.webkitFullscreenEnabled)},Hf.prototype._setupUI=function(){var ne=this._fullscreenButton=c.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);c.create("span","mapboxgl-ctrl-icon",ne).setAttribute("aria-hidden",!0),ne.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),l.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Hf.prototype._updateTitle=function(){var ne=this._getTitle();this._fullscreenButton.setAttribute("aria-label",ne),this._fullscreenButton.title=ne},Hf.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},Hf.prototype._isFullscreen=function(){return this._fullscreen},Hf.prototype._changeIcon=function(){var ne=l.window.document.fullscreenElement||l.window.document.mozFullScreenElement||l.window.document.webkitFullscreenElement||l.window.document.msFullscreenElement;ne===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},Hf.prototype._onClickFullscreen=function(){this._isFullscreen()?l.window.document.exitFullscreen?l.window.document.exitFullscreen():l.window.document.mozCancelFullScreen?l.window.document.mozCancelFullScreen():l.window.document.msExitFullscreen?l.window.document.msExitFullscreen():l.window.document.webkitCancelFullScreen&&l.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 Fp={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},zp=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),tu=(function(Xe){function ne(Fe){Xe.call(this),this.options=l.extend(Object.create(Fp),Fe),l.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return Xe&&(ne.__proto__=Xe),ne.prototype=Object.create(Xe&&Xe.prototype),ne.prototype.constructor=ne,ne.prototype.addTo=function(me){return this._map&&this.remove(),this._map=me,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 l.Event("open")),this},ne.prototype.isOpen=function(){return!!this._map},ne.prototype.remove=function(){return this._content&&c.remove(this._content),this._container&&(c.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 l.Event("close")),this},ne.prototype.getLngLat=function(){return this._lngLat},ne.prototype.setLngLat=function(me){return this._lngLat=l.LngLat.convert(me),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},ne.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},ne.prototype.getElement=function(){return this._container},ne.prototype.setText=function(me){return this.setDOMContent(l.window.document.createTextNode(me))},ne.prototype.setHTML=function(me){var We=l.window.document.createDocumentFragment(),At=l.window.document.createElement("body"),Yt;for(At.innerHTML=me;Yt=At.firstChild,!!Yt;)We.appendChild(Yt);return this.setDOMContent(We)},ne.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},ne.prototype.setMaxWidth=function(me){return this.options.maxWidth=me,this._update(),this},ne.prototype.setDOMContent=function(me){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=c.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(me),this._createCloseButton(),this._update(),this._focusFirstElement(),this},ne.prototype.addClassName=function(me){this._container&&this._container.classList.add(me)},ne.prototype.removeClassName=function(me){this._container&&this._container.classList.remove(me)},ne.prototype.setOffset=function(me){return this.options.offset=me,this._update(),this},ne.prototype.toggleClassName=function(me){if(this._container)return this._container.classList.toggle(me)},ne.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=c.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))},ne.prototype._onMouseUp=function(me){this._update(me.point)},ne.prototype._onMouseMove=function(me){this._update(me.point)},ne.prototype._onDrag=function(me){this._update(me.point)},ne.prototype._update=function(me){var We=this,At=this._lngLat||this._trackPointer;if(!(!this._map||!At||!this._content)&&(this._container||(this._container=c.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=c.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(Gr){return We._container.classList.add(Gr)}),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=Jl(this._lngLat,this._pos,this._map.transform)),!(this._trackPointer&&!me))){var Yt=this._pos=this._trackPointer&&me?me:this._map.project(this._lngLat),tr=this.options.anchor,Pt=tc(this.options.offset);if(!tr){var jt=this._container.offsetWidth,hr=this._container.offsetHeight,qr;Yt.y+Pt.bottom.y<hr?qr=["top"]:Yt.y>this._map.transform.height-hr?qr=["bottom"]:qr=[],Yt.x<jt/2?qr.push("left"):Yt.x>this._map.transform.width-jt/2&&qr.push("right"),qr.length===0?tr="bottom":tr=qr.join("-")}var zr=Yt.add(Pt[tr]).round();c.setTransform(this._container,Mu[tr]+" translate("+zr.x+"px,"+zr.y+"px)"),Fu(this._container,tr,"popup")}},ne.prototype._focusFirstElement=function(){if(!(!this.options.focusAfterOpen||!this._container)){var me=this._container.querySelector(zp);me&&me.focus()}},ne.prototype._onClose=function(){this.remove()},ne})(l.Evented);function tc(Xe){if(Xe)if(typeof Xe=="number"){var ne=Math.round(Math.sqrt(.5*Math.pow(Xe,2)));return{center:new l.Point(0,0),top:new l.Point(0,Xe),"top-left":new l.Point(ne,ne),"top-right":new l.Point(-ne,ne),bottom:new l.Point(0,-Xe),"bottom-left":new l.Point(ne,-ne),"bottom-right":new l.Point(-ne,-ne),left:new l.Point(Xe,0),right:new l.Point(-Xe,0)}}else if(Xe instanceof l.Point||Array.isArray(Xe)){var Fe=l.Point.convert(Xe);return{center:Fe,top:Fe,"top-left":Fe,"top-right":Fe,bottom:Fe,"bottom-left":Fe,"bottom-right":Fe,left:Fe,right:Fe}}else return{center:l.Point.convert(Xe.center||[0,0]),top:l.Point.convert(Xe.top||[0,0]),"top-left":l.Point.convert(Xe["top-left"]||[0,0]),"top-right":l.Point.convert(Xe["top-right"]||[0,0]),bottom:l.Point.convert(Xe.bottom||[0,0]),"bottom-left":l.Point.convert(Xe["bottom-left"]||[0,0]),"bottom-right":l.Point.convert(Xe["bottom-right"]||[0,0]),left:l.Point.convert(Xe.left||[0,0]),right:l.Point.convert(Xe.right||[0,0])};else return tc(new l.Point(0,0))}var uc={version:l.version,supported:u,setRTLTextPlugin:l.setRTLTextPlugin,getRTLTextPluginStatus:l.getRTLTextPluginStatus,Map:Hs,NavigationControl:Xs,GeolocateControl:fp,AttributionControl:Fa,ScaleControl:_d,FullscreenControl:Hf,Popup:tu,Marker:cf,Style:ev,LngLat:l.LngLat,LngLatBounds:l.LngLatBounds,Point:l.Point,MercatorCoordinate:l.MercatorCoordinate,Evented:l.Evented,config:l.config,prewarm:si,clearPrewarmedResources:ei,get accessToken(){return l.config.ACCESS_TOKEN},set accessToken(Xe){l.config.ACCESS_TOKEN=Xe},get baseApiUrl(){return l.config.API_URL},set baseApiUrl(Xe){l.config.API_URL=Xe},get workerCount(){return oo.workerCount},set workerCount(Xe){oo.workerCount=Xe},get maxParallelImageRequests(){return l.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(Xe){l.config.MAX_PARALLEL_IMAGE_REQUESTS=Xe},clearStorage:function(ne){l.clearTileCache(ne)},workerUrl:""};return uc}),O})}}),Zet=U({"src/plots/mapbox/layers.js"(pe,le){var w=ii(),R=ah().sanitizeHTML,O=Mxe(),z=LI();function l(v,h){this.subplot=v,this.uid=v.uid+"-"+h,this.index=h,this.idSource="source-"+this.uid,this.idLayer=z.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var u=l.prototype;u.update=function(h){this.visible?this.needsNewImage(h)?this.updateImage(h):this.needsNewSource(h)?(this.removeLayer(),this.updateSource(h),this.updateLayer(h)):this.needsNewLayer(h)?this.updateLayer(h):this.updateStyle(h):(this.updateSource(h),this.updateLayer(h)),this.visible=c(h)},u.needsNewImage=function(v){var h=this.subplot.map;return h.getSource(this.idSource)&&this.sourceType==="image"&&v.sourcetype==="image"&&(this.source!==v.source||JSON.stringify(this.coordinates)!==JSON.stringify(v.coordinates))},u.needsNewSource=function(v){return this.sourceType!==v.sourcetype||JSON.stringify(this.source)!==JSON.stringify(v.source)||this.layerType!==v.type},u.needsNewLayer=function(v){return this.layerType!==v.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},u.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},u.updateImage=function(v){var h=this.subplot.map;h.getSource(this.idSource).updateImage({url:v.source,coordinates:v.coordinates});var m=this.findFollowingMapboxLayerId(this.lookupBelow());m!==null&&this.subplot.map.moveLayer(this.idLayer,m)},u.updateSource=function(v){var h=this.subplot.map;if(h.getSource(this.idSource)&&h.removeSource(this.idSource),this.sourceType=v.sourcetype,this.source=v.source,!!c(v)){var m=f(v);h.addSource(this.idSource,m)}},u.findFollowingMapboxLayerId=function(v){if(v==="traces")for(var h=this.subplot.getMapLayers(),m=0;m<h.length;m++){var _=h[m].id;if(typeof _=="string"&&_.indexOf(z.traceLayerPrefix)===0){v=_;break}}return v},u.updateLayer=function(v){var h=this.subplot,m=p(v),_=this.lookupBelow(),x=this.findFollowingMapboxLayerId(_);this.removeLayer(),c(v)&&h.addLayer({id:this.idLayer,source:this.idSource,"source-layer":v.sourcelayer||"",type:v.type,minzoom:v.minzoom,maxzoom:v.maxzoom,layout:m.layout,paint:m.paint},x),this.layerType=v.type,this.below=_},u.updateStyle=function(v){if(c(v)){var h=p(v);this.subplot.setOptions(this.idLayer,"setLayoutProperty",h.layout),this.subplot.setOptions(this.idLayer,"setPaintProperty",h.paint)}},u.removeLayer=function(){var v=this.subplot.map;v.getLayer(this.idLayer)&&v.removeLayer(this.idLayer)},u.dispose=function(){var v=this.subplot.map;v.getLayer(this.idLayer)&&v.removeLayer(this.idLayer),v.getSource(this.idSource)&&v.removeSource(this.idSource)};function c(v){if(!v.visible)return!1;var h=v.source;if(Array.isArray(h)&&h.length>0){for(var m=0;m<h.length;m++)if(typeof h[m]!="string"||h[m].length===0)return!1;return!0}return w.isPlainObject(h)||typeof h=="string"&&h.length>0}function p(v){var h={},m={};switch(v.type){case"circle":w.extendFlat(m,{"circle-radius":v.circle.radius,"circle-color":v.color,"circle-opacity":v.opacity});break;case"line":w.extendFlat(m,{"line-width":v.line.width,"line-color":v.color,"line-opacity":v.opacity,"line-dasharray":v.line.dash});break;case"fill":w.extendFlat(m,{"fill-color":v.color,"fill-outline-color":v.fill.outlinecolor,"fill-opacity":v.opacity});break;case"symbol":var _=v.symbol,x=O(_.textposition,_.iconsize);w.extendFlat(h,{"icon-image":_.icon+"-15","icon-size":_.iconsize/10,"text-field":_.text,"text-size":_.textfont.size,"text-anchor":x.anchor,"text-offset":x.offset,"symbol-placement":_.placement}),w.extendFlat(m,{"icon-color":v.color,"text-color":_.textfont.color,"text-opacity":v.opacity});break;case"raster":w.extendFlat(m,{"raster-fade-duration":0,"raster-opacity":v.opacity});break}return{layout:h,paint:m}}function f(v){var h=v.sourcetype,m=v.source,_={type:h},x;return h==="geojson"?x="data":h==="vector"?x=typeof m=="string"?"url":"tiles":h==="raster"?(x="tiles",_.tileSize=256):h==="image"&&(x="url",_.coordinates=v.coordinates),_[x]=m,v.sourceattribution&&(_.attribution=R(v.sourceattribution)),_}le.exports=function(h,m,_){var x=new l(h,m);return x.update(_),x}}}),Ket=U({"src/plots/mapbox/mapbox.js"(pe,le){var w=Rxe(),R=ii(),O=q4(),z=Mi(),l=Yu(),u=Vp(),c=Dp(),p=m0(),f=p.drawMode,v=p.selectMode,h=Vf().prepSelect,m=Vf().clearOutline,_=Vf().clearSelectionsCache,x=Vf().selectOnClick,A=LI(),E=Zet();function D(k,P){this.id=P,this.gd=k;var T=k._fullLayout,y=k._context;this.container=T._glcontainer.node(),this.isStatic=y.staticPlot,this.uid=T._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(T),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var g=D.prototype;g.plot=function(k,P,T){var y=this,S=P[y.id];y.map&&S.accesstoken!==y.accessToken&&(y.map.remove(),y.map=null,y.styleObj=null,y.traceHash={},y.layerList=[]);var M;y.map?M=new Promise(function(W,$){y.updateMap(k,P,W,$)}):M=new Promise(function(W,$){y.createMap(k,P,W,$)}),T.push(M)},g.createMap=function(k,P,T,y){var S=this,M=P[S.id],W=S.styleObj=I(M.style,P);S.accessToken=M.accesstoken;var $=M.bounds,Z=$?[[$.west,$.south],[$.east,$.north]]:null,K=S.map=new w.Map({container:S.div,style:W.style,center:F(M.center),zoom:M.zoom,bearing:M.bearing,pitch:M.pitch,maxBounds:Z,interactive:!S.isStatic,preserveDrawingBuffer:S.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new w.AttributionControl({compact:!0}));K._canvas.style.left="0px",K._canvas.style.top="0px",S.rejectOnError(y),S.isStatic||S.initFx(k,P);var Q=[];Q.push(new Promise(function(J){K.once("load",J)})),Q=Q.concat(O.fetchTraceGeoData(k)),Promise.all(Q).then(function(){S.fillBelowLookup(k,P),S.updateData(k),S.updateLayout(P),S.resolveOnRender(T)}).catch(y)},g.updateMap=function(k,P,T,y){var S=this,M=S.map,W=P[this.id];S.rejectOnError(y);var $=[],Z=I(W.style,P);JSON.stringify(S.styleObj)!==JSON.stringify(Z)&&(S.styleObj=Z,M.setStyle(Z.style),S.traceHash={},$.push(new Promise(function(K){M.once("styledata",K)}))),$=$.concat(O.fetchTraceGeoData(k)),Promise.all($).then(function(){S.fillBelowLookup(k,P),S.updateData(k),S.updateLayout(P),S.resolveOnRender(T)}).catch(y)},g.fillBelowLookup=function(k,P){var T=P[this.id],y=T.layers,S,M,W=this.belowLookup={},$=!1;for(S=0;S<k.length;S++){var Z=k[S][0].trace,K=Z._module;typeof Z.below=="string"?M=Z.below:K.getBelow&&(M=K.getBelow(Z,this)),M===""&&($=!0),W["trace-"+Z.uid]=M||""}for(S=0;S<y.length;S++){var Q=y[S];typeof Q.below=="string"?M=Q.below:$?M="traces":M="",W["layout-"+S]=M}var J={},G,ee;for(G in W)M=W[G],J[M]?J[M].push(G):J[M]=[G];for(M in J){var re=J[M];if(re.length>1)for(S=0;S<re.length;S++)G=re[S],G.indexOf("trace-")===0?(ee=G.split("trace-")[1],this.traceHash[ee]&&(this.traceHash[ee].below=null)):G.indexOf("layout-")===0&&(ee=G.split("layout-")[1],this.layerList[ee]&&(this.layerList[ee].below=null))}};var C={choroplethmapbox:0,densitymapbox:1,scattermapbox:2};g.updateData=function(k){var P=this.traceHash,T,y,S,M,W=k.slice().sort(function(J,G){return C[J[0].trace.type]-C[G[0].trace.type]});for(S=0;S<W.length;S++){var $=W[S];y=$[0].trace,T=P[y.uid];var Z=!1;T&&(T.type===y.type?(T.update($),Z=!0):T.dispose()),!Z&&y._module&&(P[y.uid]=y._module.plot(this,$))}var K=Object.keys(P);e:for(S=0;S<K.length;S++){var Q=K[S];for(M=0;M<k.length;M++)if(y=k[M][0].trace,Q===y.uid)continue e;T=P[Q],T.dispose(),delete P[Q]}},g.updateLayout=function(k){var P=this.map,T=k[this.id];!this.dragging&&!this.wheeling&&(P.setCenter(F(T.center)),P.setZoom(T.zoom),P.setBearing(T.bearing),P.setPitch(T.pitch)),this.updateLayers(k),this.updateFramework(k),this.updateFx(k),this.map.resize(),this.gd._context._scrollZoom.mapbox?P.scrollZoom.enable():P.scrollZoom.disable()},g.resolveOnRender=function(k){var P=this.map;P.on("render",function T(){P.loaded()&&(P.off("render",T),setTimeout(k,10))})},g.rejectOnError=function(k){var P=this.map;function T(){k(new Error(A.mapOnErrorMsg))}P.once("error",T),P.once("style.error",T),P.once("source.error",T),P.once("tile.error",T),P.once("layer.error",T)},g.createFramework=function(k){var P=this,T=P.div=document.createElement("div");T.id=P.uid,T.style.position="absolute",P.container.appendChild(T),P.xaxis={_id:"x",c2p:function(y){return P.project(y).x}},P.yaxis={_id:"y",c2p:function(y){return P.project(y).y}},P.updateFramework(k),P.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},l.setConvert(P.mockAxis,k)},g.initFx=function(k,P){var T=this,y=T.gd,S=T.map;S.on("moveend",function($){if(T.map){var Z=y._fullLayout;if($.originalEvent||T.wheeling){var K=Z[T.id];z.call("_storeDirectGUIEdit",y.layout,Z._preGUI,T.getViewEdits(K));var Q=T.getView();K._input.center=K.center=Q.center,K._input.zoom=K.zoom=Q.zoom,K._input.bearing=K.bearing=Q.bearing,K._input.pitch=K.pitch=Q.pitch,y.emit("plotly_relayout",T.getViewEditsWithDerived(Q))}$.originalEvent&&$.originalEvent.type==="mouseup"?T.dragging=!1:T.wheeling&&(T.wheeling=!1),Z._rehover&&Z._rehover()}}),S.on("wheel",function(){T.wheeling=!0}),S.on("mousemove",function($){var Z=T.div.getBoundingClientRect(),K=[$.originalEvent.offsetX,$.originalEvent.offsetY];$.target.getBoundingClientRect=function(){return Z},T.xaxis.p2c=function(){return S.unproject(K).lng},T.yaxis.p2c=function(){return S.unproject(K).lat},y._fullLayout._rehover=function(){y._fullLayout._hoversubplot===T.id&&y._fullLayout[T.id]&&c.hover(y,$,T.id)},c.hover(y,$,T.id),y._fullLayout._hoversubplot=T.id});function M(){c.loneUnhover(P._hoverlayer)}S.on("dragstart",function(){T.dragging=!0,M()}),S.on("zoomstart",M),S.on("mouseout",function(){y._fullLayout._hoversubplot=null});function W(){var $=T.getView();y.emit("plotly_relayouting",T.getViewEditsWithDerived($))}S.on("drag",W),S.on("zoom",W),S.on("dblclick",function(){var $=y._fullLayout[T.id];z.call("_storeDirectGUIEdit",y.layout,y._fullLayout._preGUI,T.getViewEdits($));var Z=T.viewInitial;S.setCenter(F(Z.center)),S.setZoom(Z.zoom),S.setBearing(Z.bearing),S.setPitch(Z.pitch);var K=T.getView();$._input.center=$.center=K.center,$._input.zoom=$.zoom=K.zoom,$._input.bearing=$.bearing=K.bearing,$._input.pitch=$.pitch=K.pitch,y.emit("plotly_doubleclick",null),y.emit("plotly_relayout",T.getViewEditsWithDerived(K))}),T.clearOutline=function(){_(T.dragOptions),m(T.dragOptions.gd)},T.onClickInPanFn=function($){return function(Z){var K=y._fullLayout.clickmode;K.indexOf("select")>-1&&x(Z.originalEvent,y,[T.xaxis],[T.yaxis],T.id,$),K.indexOf("event")>-1&&c.click(y,Z.originalEvent)}}},g.updateFx=function(k){var P=this,T=P.map,y=P.gd;if(P.isStatic)return;function S(Z){var K=P.map.unproject(Z);return[K.lng,K.lat]}var M=k.dragmode,W;W=function(Z,K){if(K.isRect){var Q=Z.range={};Q[P.id]=[S([K.xmin,K.ymin]),S([K.xmax,K.ymax])]}else{var J=Z.lassoPoints={};J[P.id]=K.map(S)}};var $=P.dragOptions;P.dragOptions=R.extendDeep($||{},{dragmode:k.dragmode,element:P.div,gd:y,plotinfo:{id:P.id,domain:k[P.id].domain,xaxis:P.xaxis,yaxis:P.yaxis,fillRangeItems:W},xaxes:[P.xaxis],yaxes:[P.yaxis],subplot:P.id}),T.off("click",P.onClickInPanHandler),v(M)||f(M)?(T.dragPan.disable(),T.on("zoomstart",P.clearOutline),P.dragOptions.prepFn=function(Z,K,Q){h(Z,K,Q,P.dragOptions,M)},u.init(P.dragOptions)):(T.dragPan.enable(),T.off("zoomstart",P.clearOutline),P.div.onmousedown=null,P.div.ontouchstart=null,P.div.removeEventListener("touchstart",P.div._ontouchstart),P.onClickInPanHandler=P.onClickInPanFn(P.dragOptions),T.on("click",P.onClickInPanHandler))},g.updateFramework=function(k){var P=k[this.id].domain,T=k._size,y=this.div.style;y.width=T.w*(P.x[1]-P.x[0])+"px",y.height=T.h*(P.y[1]-P.y[0])+"px",y.left=T.l+P.x[0]*T.w+"px",y.top=T.t+(1-P.y[1])*T.h+"px",this.xaxis._offset=T.l+P.x[0]*T.w,this.xaxis._length=T.w*(P.x[1]-P.x[0]),this.yaxis._offset=T.t+(1-P.y[1])*T.h,this.yaxis._length=T.h*(P.y[1]-P.y[0])},g.updateLayers=function(k){var P=k[this.id],T=P.layers,y=this.layerList,S;if(T.length!==y.length){for(S=0;S<y.length;S++)y[S].dispose();for(y=this.layerList=[],S=0;S<T.length;S++)y.push(E(this,S,T[S]))}else for(S=0;S<T.length;S++)y[S].update(T[S])},g.destroy=function(){this.map&&(this.map.remove(),this.map=null,this.container.removeChild(this.div))},g.toImage=function(){return this.map.stop(),this.map.getCanvas().toDataURL()},g.setOptions=function(k,P,T){for(var y in T)this.map[P](k,y,T[y])},g.getMapLayers=function(){return this.map.getStyle().layers},g.addLayer=function(k,P){var T=this.map;if(typeof P=="string"){if(P===""){T.addLayer(k,P);return}for(var y=this.getMapLayers(),S=0;S<y.length;S++)if(P===y[S].id){T.addLayer(k,P);return}R.warn(["Trying to add layer with *below* value",P,"referencing a layer that does not exist","or that does not yet exist."].join(" "))}T.addLayer(k)},g.project=function(k){return this.map.project(new w.LngLat(k[0],k[1]))},g.getView=function(){var k=this.map,P=k.getCenter(),T=P.lng,y=P.lat,S={lon:T,lat:y},M=k.getCanvas(),W=parseInt(M.style.width),$=parseInt(M.style.height);return{center:S,zoom:k.getZoom(),bearing:k.getBearing(),pitch:k.getPitch(),_derived:{coordinates:[k.unproject([0,0]).toArray(),k.unproject([W,0]).toArray(),k.unproject([W,$]).toArray(),k.unproject([0,$]).toArray()]}}},g.getViewEdits=function(k){for(var P=this.id,T=["center","zoom","bearing","pitch"],y={},S=0;S<T.length;S++){var M=T[S];y[P+"."+M]=k[M]}return y},g.getViewEditsWithDerived=function(k){var P=this.id,T=this.getViewEdits(k);return T[P+"._derived"]=k._derived,T};function I(k,P){var T={};if(R.isPlainObject(k))T.id=k.id,T.style=k;else if(typeof k=="string")if(T.id=k,A.styleValuesMapbox.indexOf(k)!==-1)T.style=N(k);else if(A.stylesNonMapbox[k]){T.style=A.stylesNonMapbox[k];var y=T.style.sources["plotly-"+k],S=y?y.tiles:void 0;S&&S[0]&&S[0].slice(-9)==="?api_key="&&(S[0]+=P._mapboxAccessToken)}else T.style=k;else T.id=A.styleValueDflt,T.style=N(A.styleValueDflt);return T.transition={duration:0,delay:0},T}function N(k){return A.styleUrlPrefix+k+"-"+A.styleUrlSuffix}function F(k){return[k.lon,k.lat]}le.exports=D}}),Jet=U({"src/plots/mapbox/layout_defaults.js"(pe,le){var w=ii(),R=cS(),O=_g(),z=YU();le.exports=function(p,f,v){R(p,f,v,{type:"mapbox",attributes:z,handleDefaults:l,partition:"y",accessToken:f._mapboxAccessToken})};function l(c,p,f,v){f("accesstoken",v.accessToken),f("style"),f("center.lon"),f("center.lat"),f("zoom"),f("bearing"),f("pitch");var h=f("bounds.west"),m=f("bounds.east"),_=f("bounds.south"),x=f("bounds.north");(h===void 0||m===void 0||_===void 0||x===void 0)&&delete p.bounds,O(c,p,{name:"layers",handleItemDefaults:u}),p._input=c}function u(c,p){function f(A,E){return w.coerce(c,p,z.layers,A,E)}var v=f("visible");if(v){var h=f("sourcetype"),m=h==="raster"||h==="image";f("source"),f("sourceattribution"),h==="vector"&&f("sourcelayer"),h==="image"&&f("coordinates");var _;m&&(_="raster");var x=f("type",_);m&&x!=="raster"&&(x=p.type="raster",w.log("Source types *raster* and *image* must drawn *raster* layer type.")),f("below"),f("color"),f("opacity"),f("minzoom"),f("maxzoom"),x==="circle"&&f("circle.radius"),x==="line"&&(f("line.width"),f("line.dash")),x==="fill"&&f("fill.outlinecolor"),x==="symbol"&&(f("symbol.icon"),f("symbol.iconsize"),f("symbol.text"),w.coerceFont(f,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),f("symbol.textposition"),f("symbol.placement"))}}}}),wK=U({"src/plots/mapbox/index.js"(pe){var le=Rxe(),w=ii(),R=w.strTranslate,O=w.strScale,z=Om().getSubplotCalcData,l=E1(),u=Ze(),c=ec(),p=ah(),f=Ket(),v="mapbox",h=pe.constants=LI();pe.name=v,pe.attr="subplot",pe.idRoot=v,pe.idRegex=pe.attrRegex=w.counterRegex(v);var m=["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(" ");pe.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},pe.layoutAttributes=YU(),pe.supplyLayoutDefaults=Jet();var _=!0;pe.plot=function(D){_&&(_=!1,w.warn(m));var g=D._fullLayout,C=D.calcdata,I=g._subplots[v];if(le.version!==h.requiredVersion)throw new Error(h.wrongVersionErrorMsg);var N=x(D,I);le.accessToken=N;for(var F=0;F<I.length;F++){var k=I[F],P=z(C,v,k),T=g[k],y=T._subplot;y||(y=new f(D,k),g[k]._subplot=y),y.viewInitial||(y.viewInitial={center:w.extendFlat({},T.center),zoom:T.zoom,bearing:T.bearing,pitch:T.pitch}),y.plot(P,g,D._promises)}},pe.clean=function(E,D,g,C){for(var I=C._subplots[v]||[],N=0;N<I.length;N++){var F=I[N];!D[F]&&C[F]._subplot&&C[F]._subplot.destroy()}},pe.toSVG=function(E){for(var D=E._fullLayout,g=D._subplots[v],C=D._size,I=0;I<g.length;I++){var N=D[g[I]],F=N.domain,k=N._subplot,P=k.toImage("png"),T=D._glimages.append("svg:image");T.attr({xmlns:l.svg,"xlink:href":P,x:C.l+C.w*F.x[0],y:C.t+C.h*(1-F.y[1]),width:C.w*(F.x[1]-F.x[0]),height:C.h*(F.y[1]-F.y[0]),preserveAspectRatio:"none"});var y=u.select(N._subplot.div),S=y.select(".mapboxgl-ctrl-logo").node().offsetParent===null;if(!S){var M=D._glimages.append("g");M.attr("transform",R(C.l+C.w*F.x[0]+10,C.t+C.h*(1-F.y[0])-31)),M.append("path").attr("d",h.mapboxLogo.path0).style({opacity:.9,fill:"#ffffff","enable-background":"new"}),M.append("path").attr("d",h.mapboxLogo.path1).style("opacity",.35).style("enable-background","new"),M.append("path").attr("d",h.mapboxLogo.path2).style("opacity",.35).style("enable-background","new"),M.append("polygon").attr("points",h.mapboxLogo.polygon).style({opacity:.9,fill:"#ffffff","enable-background":"new"})}var W=y.select(".mapboxgl-ctrl-attrib").text().replace("Improve this map",""),$=D._glimages.append("g"),Z=$.append("text");Z.text(W).classed("static-attribution",!0).attr({"font-size":12,"font-family":"Arial",color:"rgba(0, 0, 0, 0.75)","text-anchor":"end","data-unformatted":W});var K=c.bBox(Z.node()),Q=C.w*(F.x[1]-F.x[0]);if(K.width>Q/2){var J=W.split("|").join("<br>");Z.text(J).attr("data-unformatted",J).call(p.convertToTspans,E),K=c.bBox(Z.node())}Z.attr("transform",R(-3,-K.height+8)),$.insert("rect",".static-attribution").attr({x:-K.width-6,y:-K.height-3,width:K.width+6,height:K.height+3,fill:"rgba(255, 255, 255, 0.75)"});var G=1;K.width+6>Q&&(G=Q/(K.width+6));var ee=[C.l+C.w*F.x[1],C.t+C.h*(1-F.y[0])];$.attr("transform",R(ee[0],ee[1])+O(G))}};function x(E,D){var g=E._fullLayout,C=E._context;if(C.mapboxAccessToken==="")return"";for(var I=[],N=[],F=!1,k=!1,P=0;P<D.length;P++){var T=g[D[P]],y=T.accesstoken;A(T.style)&&(y?w.pushUnique(I,y):(A(T._input.style)&&(w.error("Uses Mapbox map style, but did not set an access token."),F=!0),k=!0)),y&&w.pushUnique(N,y)}if(k){var S=F?h.noAccessTokenErrorMsg:h.missingStyleErrorMsg;throw w.error(S),new Error(S)}return I.length?(I.length>1&&w.warn(h.multipleTokensErrorMsg),I[0]):(N.length&&w.log(["Listed mapbox access token(s)",N.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}function A(E){return typeof E=="string"&&(h.styleValuesMapbox.indexOf(E)!==-1||E.indexOf("mapbox://")===0||E.indexOf("stamen")===0)}pe.updateFx=function(E){for(var D=E._fullLayout,g=D._subplots[v],C=0;C<g.length;C++){var I=D[g[C]]._subplot;I.updateFx(D)}}}}),Qet=U({"src/traces/scattermapbox/index.js"(pe,le){le.exports={attributes:xK(),supplyDefaults:Get(),colorbar:qg(),formatLabels:Cxe(),calc:eK(),plot:Wet(),hoverPoints:_K().hoverPoints,eventData:Yet(),selectPoints:Xet(),styleOnSelect:function(w,R){if(R){var O=R[0].trace;O._glTrace.update(R)}},moduleType:"trace",name:"scattermapbox",basePlotModule:wK(),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}}}),ett=U({"lib/scattermapbox.js"(pe,le){le.exports=Qet()}}),kxe=U({"src/traces/choroplethmapbox/attributes.js"(pe,le){var w=zF(),R=Jd(),O=Js().hovertemplateAttrs,z=Jn(),l=Ar().extendFlat;le.exports=l({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:l({},w.featureidkey,{}),below:{valType:"string",editType:"plot"},text:w.text,hovertext:w.hovertext,marker:{line:{color:l({},w.marker.line.color,{editType:"plot"}),width:l({},w.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:l({},w.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:l({},w.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:l({},w.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:w.hoverinfo,hovertemplate:O({},{keys:["properties"]}),showlegend:l({},z.showlegend,{dflt:!1})},R("",{cLetter:"z",editTypeOverride:"calc"}))}}),ttt=U({"src/traces/choroplethmapbox/defaults.js"(pe,le){var w=ii(),R=wg(),O=kxe();le.exports=function(l,u,c,p){function f(x,A){return w.coerce(l,u,O,x,A)}var v=f("locations"),h=f("z"),m=f("geojson");if(!w.isArrayOrTypedArray(v)||!v.length||!w.isArrayOrTypedArray(h)||!h.length||!(typeof m=="string"&&m!==""||w.isPlainObject(m))){u.visible=!1;return}f("featureidkey"),u._length=Math.min(v.length,h.length),f("below"),f("text"),f("hovertext"),f("hovertemplate");var _=f("marker.line.width");_&&f("marker.line.color"),f("marker.opacity"),R(l,u,p,f,{prefix:"",cLetter:"z"}),w.coerceSelectionMarkerOpacity(u,f)}}}),Ixe=U({"src/traces/choroplethmapbox/convert.js"(pe,le){var w=_t(),R=ii(),O=vd(),z=ec(),l=V4().makeBlank,u=q4();function c(f){var v=f[0].trace,h=v.visible===!0&&v._length!==0,m={layout:{visibility:"none"},paint:{}},_={layout:{visibility:"none"},paint:{}},x=v._opts={fill:m,line:_,geojson:l()};if(!h)return x;var A=u.extractTraceFeature(f);if(!A)return x;var E=O.makeColorScaleFuncFromTrace(v),D=v.marker,g=D.line||{},C;R.isArrayOrTypedArray(D.opacity)&&(C=function(S){var M=S.mo;return w(M)?+R.constrain(M,0,1):0});var I;R.isArrayOrTypedArray(g.color)&&(I=function(S){return S.mlc});var N;R.isArrayOrTypedArray(g.width)&&(N=function(S){return S.mlw});for(var F=0;F<f.length;F++){var k=f[F],P=k.fOut;if(P){var T=P.properties;T.fc=E(k.z),C&&(T.mo=C(k)),I&&(T.mlc=I(k)),N&&(T.mlw=N(k)),k.ct=T.ct,k._polygons=u.feature2polygons(P)}}var y=C?{type:"identity",property:"mo"}:D.opacity;return R.extendFlat(m.paint,{"fill-color":{type:"identity",property:"fc"},"fill-opacity":y}),R.extendFlat(_.paint,{"line-color":I?{type:"identity",property:"mlc"}:g.color,"line-width":N?{type:"identity",property:"mlw"}:g.width,"line-opacity":y}),m.layout.visibility="visible",_.layout.visibility="visible",x.geojson={type:"FeatureCollection",features:A},p(f),x}function p(f){var v=f[0].trace,h=v._opts,m;if(v.selectedpoints){for(var _=z.makeSelectedPointStyleFns(v),x=0;x<f.length;x++){var A=f[x];A.fOut&&(A.fOut.properties.mo2=_.selectedOpacityFn(A))}m={type:"identity",property:"mo2"}}else m=R.isArrayOrTypedArray(v.marker.opacity)?{type:"identity",property:"mo"}:v.marker.opacity;return R.extendFlat(h.fill.paint,{"fill-opacity":m}),R.extendFlat(h.line.paint,{"line-opacity":m}),h}le.exports={convert:c,convertOnSelect:p}}}),rtt=U({"src/traces/choroplethmapbox/plot.js"(pe,le){var w=Ixe().convert,R=Ixe().convertOnSelect,O=LI().traceLayerPrefix;function z(u,c){this.type="choroplethmapbox",this.subplot=u,this.uid=c,this.sourceId="source-"+c,this.layerList=[["fill",O+c+"-fill"],["line",O+c+"-line"]],this.below=null}var l=z.prototype;l.update=function(u){this._update(w(u)),u[0].trace._glTrace=this},l.updateOnSelect=function(u){this._update(R(u))},l._update=function(u){var c=this.subplot,p=this.layerList,f=c.belowLookup["trace-"+this.uid];c.map.getSource(this.sourceId).setData(u.geojson),f!==this.below&&(this._removeLayers(),this._addLayers(u,f),this.below=f);for(var v=0;v<p.length;v++){var h=p[v],m=h[0],_=h[1],x=u[m];c.setOptions(_,"setLayoutProperty",x.layout),x.layout.visibility==="visible"&&c.setOptions(_,"setPaintProperty",x.paint)}},l._addLayers=function(u,c){for(var p=this.subplot,f=this.layerList,v=this.sourceId,h=0;h<f.length;h++){var m=f[h],_=m[0],x=u[_];p.addLayer({type:_,id:m[1],source:v,layout:x.layout,paint:x.paint},c)}},l._removeLayers=function(){for(var u=this.subplot.map,c=this.layerList,p=c.length-1;p>=0;p--)u.removeLayer(c[p][1])},l.dispose=function(){var u=this.subplot.map;this._removeLayers(),u.removeSource(this.sourceId)},le.exports=function(c,p){var f=p[0].trace,v=new z(c,f.uid),h=v.sourceId,m=w(p),_=v.below=c.belowLookup["trace-"+f.uid];return c.map.addSource(h,{type:"geojson",data:m.geojson}),v._addLayers(m,_),p[0].trace._glTrace=v,v}}}),ntt=U({"src/traces/choroplethmapbox/index.js"(pe,le){le.exports={attributes:kxe(),supplyDefaults:ttt(),colorbar:rw(),calc:iK(),plot:rtt(),hoverPoints:oK(),eventData:sK(),selectPoints:lK(),styleOnSelect:function(w,R){if(R){var O=R[0].trace;O._glTrace.updateOnSelect(R)}},getBelow:function(w,R){for(var O=R.getMapLayers(),z=O.length-2;z>=0;z--){var l=O[z].id;if(typeof l=="string"&&l.indexOf("water")===0){for(var u=z+1;u<O.length;u++)if(l=O[u].id,typeof l=="string"&&l.indexOf("plotly-")===-1)return l}}},moduleType:"trace",name:"choroplethmapbox",basePlotModule:wK(),categories:["mapbox","gl","noOpacity","showLegend"],meta:{hr_name:"choropleth_mapbox"}}}}),itt=U({"lib/choroplethmapbox.js"(pe,le){le.exports=ntt()}}),Pxe=U({"src/traces/densitymapbox/attributes.js"(pe,le){var w=Jd(),R=Js().hovertemplateAttrs,O=Jn(),z=xK(),l=Ar().extendFlat;le.exports=l({lon:z.lon,lat:z.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:z.text,hovertext:z.hovertext,hoverinfo:l({},O.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:R(),showlegend:l({},O.showlegend,{dflt:!1})},w("",{cLetter:"z",editTypeOverride:"calc"}))}}),att=U({"src/traces/densitymapbox/defaults.js"(pe,le){var w=ii(),R=wg(),O=Pxe();le.exports=function(l,u,c,p){function f(_,x){return w.coerce(l,u,O,_,x)}var v=f("lon")||[],h=f("lat")||[],m=Math.min(v.length,h.length);if(!m){u.visible=!1;return}u._length=m,f("z"),f("radius"),f("below"),f("text"),f("hovertext"),f("hovertemplate"),R(l,u,p,f,{prefix:"",cLetter:"z"})}}}),ott=U({"src/traces/densitymapbox/calc.js"(pe,le){var w=_t(),R=ii().isArrayOrTypedArray,O=Dt().BADNUM,z=t0(),l=ii()._;le.exports=function(c,p){for(var f=p._length,v=new Array(f),h=p.z,m=R(h)&&h.length,_=0;_<f;_++){var x=v[_]={},A=p.lon[_],E=p.lat[_];if(x.lonlat=w(A)&&w(E)?[+A,+E]:[O,O],m){var D=h[_];x.z=w(D)?D:O}}return z(c,p,{vals:m?h:[0,1],containerStr:"",cLetter:"z"}),f&&(v[0].t={labels:{lat:l(c,"lat:")+" ",lon:l(c,"lon:")+" "}}),v}}}),stt=U({"src/traces/densitymapbox/convert.js"(pe,le){var w=_t(),R=ii(),O=Lr(),z=vd(),l=Dt().BADNUM,u=V4().makeBlank;le.exports=function(p){var f=p[0].trace,v=f.visible===!0&&f._length!==0,h={layout:{visibility:"none"},paint:{}},m=f._opts={heatmap:h,geojson:u()};if(!v)return m;var _=[],x,A=f.z,E=f.radius,D=R.isArrayOrTypedArray(A)&&A.length,g=R.isArrayOrTypedArray(E);for(x=0;x<p.length;x++){var C=p[x],I=C.lonlat;if(I[0]!==l){var N={};if(D){var F=C.z;N.z=F!==l?F:0}g&&(N.r=w(E[x])&&E[x]>0?+E[x]:0),_.push({type:"Feature",geometry:{type:"Point",coordinates:I},properties:N})}}var k=z.extractOpts(f),P=k.reversescale?z.flipScale(k.colorscale):k.colorscale,T=P[0][1],y=O.opacity(T)<1?T:O.addOpacity(T,0),S=["interpolate",["linear"],["heatmap-density"],0,y];for(x=1;x<P.length;x++)S.push(P[x][0],P[x][1]);var M=["interpolate",["linear"],["get","z"],k.min,0,k.max,1];return R.extendFlat(m.heatmap.paint,{"heatmap-weight":D?M:1/(k.max-k.min),"heatmap-color":S,"heatmap-radius":g?{type:"identity",property:"r"}:f.radius,"heatmap-opacity":f.opacity}),m.geojson={type:"FeatureCollection",features:_},m.heatmap.layout.visibility="visible",m}}}),ltt=U({"src/traces/densitymapbox/plot.js"(pe,le){var w=stt(),R=LI().traceLayerPrefix;function O(l,u){this.type="densitymapbox",this.subplot=l,this.uid=u,this.sourceId="source-"+u,this.layerList=[["heatmap",R+u+"-heatmap"]],this.below=null}var z=O.prototype;z.update=function(l){var u=this.subplot,c=this.layerList,p=w(l),f=u.belowLookup["trace-"+this.uid];u.map.getSource(this.sourceId).setData(p.geojson),f!==this.below&&(this._removeLayers(),this._addLayers(p,f),this.below=f);for(var v=0;v<c.length;v++){var h=c[v],m=h[0],_=h[1],x=p[m];u.setOptions(_,"setLayoutProperty",x.layout),x.layout.visibility==="visible"&&u.setOptions(_,"setPaintProperty",x.paint)}},z._addLayers=function(l,u){for(var c=this.subplot,p=this.layerList,f=this.sourceId,v=0;v<p.length;v++){var h=p[v],m=h[0],_=l[m];c.addLayer({type:m,id:h[1],source:f,layout:_.layout,paint:_.paint},u)}},z._removeLayers=function(){for(var l=this.subplot.map,u=this.layerList,c=u.length-1;c>=0;c--)l.removeLayer(u[c][1])},z.dispose=function(){var l=this.subplot.map;this._removeLayers(),l.removeSource(this.sourceId)},le.exports=function(u,c){var p=c[0].trace,f=new O(u,p.uid),v=f.sourceId,h=w(c),m=f.below=u.belowLookup["trace-"+p.uid];return u.map.addSource(v,{type:"geojson",data:h.geojson}),f._addLayers(h,m),f}}}),utt=U({"src/traces/densitymapbox/hover.js"(pe,le){var w=Yu(),R=_K().hoverPoints,O=_K().getExtraText;le.exports=function(l,u,c){var p=R(l,u,c);if(p){var f=p[0],v=f.cd,h=v[0].trace,m=v[f.index];if(delete f.color,"z"in m){var _=f.subplot.mockAxis;f.z=m.z,f.zLabel=w.tickText(_,_.c2l(m.z),"hover").text}return f.extraText=O(h,m,v[0].t.labels),[f]}}}}),ctt=U({"src/traces/densitymapbox/event_data.js"(pe,le){le.exports=function(R,O){return R.lon=O.lon,R.lat=O.lat,R.z=O.z,R}}}),ftt=U({"src/traces/densitymapbox/index.js"(pe,le){le.exports={attributes:Pxe(),supplyDefaults:att(),colorbar:rw(),formatLabels:Cxe(),calc:ott(),plot:ltt(),hoverPoints:utt(),eventData:ctt(),getBelow:function(w,R){for(var O=R.getMapLayers(),z=0;z<O.length;z++){var l=O[z],u=l.id;if(l.type==="symbol"&&typeof u=="string"&&u.indexOf("plotly-")===-1)return u}},moduleType:"trace",name:"densitymapbox",basePlotModule:wK(),categories:["mapbox","gl","showLegend"],meta:{hr_name:"density_mapbox"}}}}),dtt=U({"lib/densitymapbox.js"(pe,le){le.exports=ftt()}}),htt=U({"src/plots/map/styles/arcgis-sat-hybrid.js"(pe,le){le.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"}}}),ptt=U({"src/plots/map/styles/arcgis-sat.js"(pe,le){le.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"}}]}}}),Y4=U({"src/plots/map/constants.js"(pe,le){var w=pa(),R=htt(),O=ptt(),z='© <a target="_blank" href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',l="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",u="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",c="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",p="https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",f="https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json",v="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",h={basic:c,streets:c,outdoors:c,light:l,dark:u,satellite:O,"satellite-streets":R,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:z,tiles:["https://tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":l,"carto-darkmatter":u,"carto-voyager":c,"carto-positron-nolabels":p,"carto-darkmatter-nolabels":f,"carto-voyager-nolabels":v},m=w(h);le.exports={styleValueDflt:"basic",stylesMap:h,styleValuesMap:m,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",m.join(", "),"or use a tile service."].join(`
`),mapOnErrorMsg:"Map error."}}}),XU=U({"src/plots/map/layout_attributes.js"(pe,le){var w=ii(),R=Lr().defaultLine,O=oh().attributes,z=Ir(),l=Kc().textposition,u=zl().overrideAll,c=Tc().templatedArray,p=Y4(),f=z({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});f.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var v=le.exports=u({_arrayAttrRegexps:[w.counterRegex("map",".layers",!0)],domain:O({name:"map"}),style:{valType:"any",values:p.styleValuesMap,dflt:p.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:c("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:R},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:R}},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:f,textposition:w.extendFlat({},l,{arrayOk:!1})}})},"plot","from-root");v.uirevision={valType:"any",editType:"none"}}}),SK=U({"src/traces/scattermap/attributes.js"(pe,le){var w=Js().hovertemplateAttrs,R=Js().texttemplateAttrs,O=Xc(),z=C6(),l=Kc(),u=XU(),c=Jn(),p=Jd(),f=Ar().extendFlat,v=zl().overrideAll,h=XU(),m=z.line,_=z.marker;le.exports=v({lon:z.lon,lat:z.lat,cluster:{enabled:{valType:"boolean"},maxzoom:f({},h.layers.maxzoom,{}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1},size:{valType:"number",arrayOk:!0,dflt:20,min:0},color:{valType:"color",arrayOk:!0},opacity:f({},_.opacity,{dflt:1})},mode:f({},l.mode,{dflt:"markers"}),text:f({},l.text,{}),texttemplate:R({editType:"plot"},{keys:["lat","lon","text"]}),hovertext:f({},l.hovertext,{}),line:{color:m.color,width:m.width},connectgaps:l.connectgaps,marker:f({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:_.opacity,size:_.size,sizeref:_.sizeref,sizemin:_.sizemin,sizemode:_.sizemode},p("marker")),fill:z.fill,fillcolor:O(),textfont:u.layers.symbol.textfont,textposition:u.layers.symbol.textposition,below:{valType:"string"},selected:{marker:l.selected.marker},unselected:{marker:l.unselected.marker},hoverinfo:f({},c.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:w()},"calc","nested")}}),Dxe=U({"src/traces/scattermap/constants.js"(pe,le){var w=["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"];le.exports={isSupportedFont:function(R){return w.indexOf(R)!==-1}}}}),vtt=U({"src/traces/scattermap/defaults.js"(pe,le){var w=ii(),R=Qd(),O=r0(),z=Xy(),l=y0(),u=Ch(),c=SK(),p=Dxe().isSupportedFont;le.exports=function(h,m,_,x){function A(S,M){return w.coerce(h,m,c,S,M)}function E(S,M){return w.coerce2(h,m,c,S,M)}var D=f(h,m,A);if(!D){m.visible=!1;return}if(A("text"),A("texttemplate"),A("hovertext"),A("hovertemplate"),A("mode"),A("below"),R.hasMarkers(m)){O(h,m,_,x,A,{noLine:!0,noAngle:!0}),A("marker.allowoverlap"),A("marker.angle");var g=m.marker;g.symbol!=="circle"&&(w.isArrayOrTypedArray(g.size)&&(g.size=g.size[0]),w.isArrayOrTypedArray(g.color)&&(g.color=g.color[0]))}R.hasLines(m)&&(z(h,m,_,x,A,{noDash:!0}),A("connectgaps"));var C=E("cluster.maxzoom"),I=E("cluster.step"),N=E("cluster.color",m.marker&&m.marker.color||_),F=E("cluster.size"),k=E("cluster.opacity"),P=C!==!1||I!==!1||N!==!1||F!==!1||k!==!1,T=A("cluster.enabled",P);if(T||R.hasText(m)){var y=x.font.family;l(h,m,x,A,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:p(y)?y:"Open Sans Regular",weight:x.font.weight,style:x.font.style,size:x.font.size,color:x.font.color}})}A("fill"),m.fill!=="none"&&u(h,m,_,A),w.coerceSelectionMarkerOpacity(m,A)};function f(v,h,m){var _=m("lon")||[],x=m("lat")||[],A=Math.min(_.length,x.length);return h._length=A,A}}}),Lxe=U({"src/traces/scattermap/format_labels.js"(pe,le){var w=Yu();le.exports=function(O,z,l){var u={},c=l[z.subplot]._subplot,p=c.mockAxis,f=O.lonlat;return u.lonLabel=w.tickText(p,p.c2l(f[0]),!0).text,u.latLabel=w.tickText(p,p.c2l(f[1]),!0).text,u}}}),Oxe=U({"src/plots/map/convert_text_opts.js"(pe,le){var w=ii();le.exports=function(O,z){var l=O.split(" "),u=l[0],c=l[1],p=w.isArrayOrTypedArray(z)?w.mean(z):z,f=.5+p/100,v=1.5+p/100,h=["",""],m=[0,0];switch(u){case"top":h[0]="top",m[1]=-v;break;case"bottom":h[0]="bottom",m[1]=v;break}switch(c){case"left":h[1]="right",m[0]=-f;break;case"right":h[1]="left",m[0]=f;break}var _;return h[0]&&h[1]?_=h.join("-"):h[0]?_=h[0]:h[1]?_=h[1]:_="center",{anchor:_,offset:m}}}}),mtt=U({"src/traces/scattermap/convert.js"(pe,le){var w=_t(),R=ii(),O=Dt().BADNUM,z=V4(),l=vd(),u=ec(),c=$_(),p=Qd(),f=Dxe().isSupportedFont,v=Oxe(),h=v0().appendArrayPointValue,m=ah().NEWLINES,_=ah().BR_TAG_ALL;le.exports=function(k,P){var T=P[0].trace,y=T.visible===!0&&T._length!==0,S=T.fill!=="none",M=p.hasLines(T),W=p.hasMarkers(T),$=p.hasText(T),Z=W&&T.marker.symbol==="circle",K=W&&T.marker.symbol!=="circle",Q=T.cluster&&T.cluster.enabled,J=x("fill"),G=x("line"),ee=x("circle"),re=x("symbol"),fe={fill:J,line:G,circle:ee,symbol:re};if(!y)return fe;var we;if((S||M)&&(we=z.calcTraceToLineCoords(P)),S&&(J.geojson=z.makePolygon(we),J.layout.visibility="visible",R.extendFlat(J.paint,{"fill-color":T.fillcolor})),M&&(G.geojson=z.makeLine(we),G.layout.visibility="visible",R.extendFlat(G.paint,{"line-width":T.line.width,"line-color":T.line.color,"line-opacity":T.opacity})),Z){var Oe=A(P);ee.geojson=Oe.geojson,ee.layout.visibility="visible",Q&&(ee.filter=["!",["has","point_count"]],fe.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":I(T.cluster.color,T.cluster.step),"circle-radius":I(T.cluster.size,T.cluster.step),"circle-opacity":I(T.cluster.opacity,T.cluster.step)}},fe.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":N(T),"text-size":12}}),R.extendFlat(ee.paint,{"circle-color":Oe.mcc,"circle-radius":Oe.mrc,"circle-opacity":Oe.mo})}if(Z&&Q&&(ee.filter=["!",["has","point_count"]]),(K||$)&&(re.geojson=E(P,k),R.extendFlat(re.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),K&&(R.extendFlat(re.layout,{"icon-size":T.marker.size/10}),"angle"in T.marker&&T.marker.angle!=="auto"&&R.extendFlat(re.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),re.layout["icon-allow-overlap"]=T.marker.allowoverlap,R.extendFlat(re.paint,{"icon-opacity":T.opacity*T.marker.opacity,"icon-color":T.marker.color})),$)){var ke=(T.marker||{}).size,Le=v(T.textposition,ke);R.extendFlat(re.layout,{"text-size":T.textfont.size,"text-anchor":Le.anchor,"text-offset":Le.offset,"text-font":N(T)}),R.extendFlat(re.paint,{"text-color":T.textfont.color,"text-opacity":T.opacity})}return fe};function x(F){return{type:F,geojson:z.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function A(F){var k=F[0].trace,P=k.marker,T=k.selectedpoints,y=R.isArrayOrTypedArray(P.color),S=R.isArrayOrTypedArray(P.size),M=R.isArrayOrTypedArray(P.opacity),W;function $(ke){return k.opacity*ke}function Z(ke){return ke/2}var K;y&&(l.hasColorscale(k,"marker")?K=l.makeColorScaleFuncFromTrace(P):K=R.identity);var Q;S&&(Q=c(k));var J;M&&(J=function(ke){var Le=w(ke)?+R.constrain(ke,0,1):0;return $(Le)});var G=[];for(W=0;W<F.length;W++){var ee=F[W],re=ee.lonlat;if(!C(re)){var fe={};K&&(fe.mcc=ee.mcc=K(ee.mc)),Q&&(fe.mrc=ee.mrc=Q(ee.ms)),J&&(fe.mo=J(ee.mo)),T&&(fe.selected=ee.selected||0),G.push({type:"Feature",id:W+1,geometry:{type:"Point",coordinates:re},properties:fe})}}var we;if(T)for(we=u.makeSelectedPointStyleFns(k),W=0;W<G.length;W++){var Oe=G[W].properties;we.selectedOpacityFn&&(Oe.mo=$(we.selectedOpacityFn(Oe))),we.selectedColorFn&&(Oe.mcc=we.selectedColorFn(Oe)),we.selectedSizeFn&&(Oe.mrc=we.selectedSizeFn(Oe))}return{geojson:{type:"FeatureCollection",features:G},mcc:y||we&&we.selectedColorFn?{type:"identity",property:"mcc"}:P.color,mrc:S||we&&we.selectedSizeFn?{type:"identity",property:"mrc"}:Z(P.size),mo:M||we&&we.selectedOpacityFn?{type:"identity",property:"mo"}:$(P.opacity)}}function E(F,k){for(var P=k._fullLayout,T=F[0].trace,y=T.marker||{},S=y.symbol,M=y.angle,W=S!=="circle"?D(S):g,$=M!=="auto"?D(M,!0):g,Z=p.hasText(T)?D(T.text):g,K=[],Q=0;Q<F.length;Q++){var J=F[Q];if(!C(J.lonlat)){var G=T.texttemplate,ee;if(G){var re=Array.isArray(G)?G[Q]||"":G,fe=T._module.formatLabels(J,T,P),we={};h(we,T,J.i);var Oe=T._meta||{};ee=R.texttemplateString(re,fe,P._d3locale,we,J,Oe)}else ee=Z(Q);ee&&(ee=ee.replace(m,"").replace(_,`
`)),K.push({type:"Feature",geometry:{type:"Point",coordinates:J.lonlat},properties:{symbol:W(Q),angle:$(Q),text:ee}})}}return{type:"FeatureCollection",features:K}}function D(F,k){return R.isArrayOrTypedArray(F)?k?function(P){return w(F[P])?+F[P]:0}:function(P){return F[P]}:F?function(){return F}:g}function g(){return""}function C(F){return F[0]===O}function I(F,k){var P;if(R.isArrayOrTypedArray(F)&&R.isArrayOrTypedArray(k)){P=["step",["get","point_count"],F[0]];for(var T=1;T<F.length;T++)P.push(k[T-1],F[T])}else P=F;return P}function N(F){var k=F.textfont,P=k.family,T=k.style,y=k.weight,S=P.split(" "),M=S[S.length-1]==="Italic";M&&S.pop(),M=M||T==="italic";var W=S.join(" ");y==="bold"&&S.indexOf("Bold")===-1?W+=" Bold":y<=1e3&&(S[0]==="Metropolis"?(W="Metropolis",y>850?W+=" Black":y>750?W+=" Extra Bold":y>650?W+=" Bold":y>550?W+=" Semi Bold":y>450?W+=" Medium":y>350?W+=" Regular":y>250?W+=" Light":y>150?W+=" Extra Light":W+=" Thin"):S.slice(0,2).join(" ")==="Open Sans"?(W="Open Sans",y>750?W+=" Extrabold":y>650?W+=" Bold":y>550?W+=" Semibold":y>350?W+=" Regular":W+=" Light"):S.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(W="Klokantech Noto Sans",S[3]==="CJK"&&(W+=" CJK"),W+=y>500?" Bold":" Regular")),M&&(W+=" Italic"),W==="Open Sans Regular Italic"?W="Open Sans Italic":W==="Open Sans Regular Bold"?W="Open Sans Bold":W==="Open Sans Regular Bold Italic"?W="Open Sans Bold Italic":W==="Klokantech Noto Sans Regular Italic"&&(W="Klokantech Noto Sans Italic"),f(W)||(W=P);var $=W.split(", ");return $}}}),gtt=U({"src/traces/scattermap/plot.js"(pe,le){var w=ii(),R=mtt(),O=Y4().traceLayerPrefix,z={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function l(c,p,f,v){this.type="scattermap",this.subplot=c,this.uid=p,this.clusterEnabled=f,this.isHidden=v,this.sourceIds={fill:"source-"+p+"-fill",line:"source-"+p+"-line",circle:"source-"+p+"-circle",symbol:"source-"+p+"-symbol",cluster:"source-"+p+"-circle",clusterCount:"source-"+p+"-circle"},this.layerIds={fill:O+p+"-fill",line:O+p+"-line",circle:O+p+"-circle",symbol:O+p+"-symbol",cluster:O+p+"-cluster",clusterCount:O+p+"-cluster-count"},this.below=null}var u=l.prototype;u.addSource=function(c,p,f){var v={type:"geojson",data:p.geojson};f&&f.enabled&&w.extendFlat(v,{cluster:!0,clusterMaxZoom:f.maxzoom});var h=this.subplot.map.getSource(this.sourceIds[c]);h?h.setData(p.geojson):this.subplot.map.addSource(this.sourceIds[c],v)},u.setSourceData=function(c,p){this.subplot.map.getSource(this.sourceIds[c]).setData(p.geojson)},u.addLayer=function(c,p,f){var v={type:p.type,id:this.layerIds[c],source:this.sourceIds[c],layout:p.layout,paint:p.paint};p.filter&&(v.filter=p.filter);for(var h=this.layerIds[c],m,_=this.subplot.getMapLayers(),x=0;x<_.length;x++)if(_[x].id===h){m=!0;break}m?(this.subplot.setOptions(h,"setLayoutProperty",v.layout),v.layout.visibility==="visible"&&this.subplot.setOptions(h,"setPaintProperty",v.paint)):this.subplot.addLayer(v,f)},u.update=function(p){var f=p[0].trace,v=this.subplot,h=v.map,m=R(v.gd,p),_=v.belowLookup["trace-"+this.uid],x=!!(f.cluster&&f.cluster.enabled),A=!!this.clusterEnabled,E=this;function D(y){y||E.addSource("circle",m.circle,f.cluster);for(var S=z.cluster,M=0;M<S.length;M++){var W=S[M],$=m[W];E.addLayer(W,$,_)}}function g(y){for(var S=z.cluster,M=S.length-1;M>=0;M--){var W=S[M];h.removeLayer(E.layerIds[W])}y||h.removeSource(E.sourceIds.circle)}function C(y){for(var S=z.nonCluster,M=0;M<S.length;M++){var W=S[M],$=m[W];y||E.addSource(W,$),E.addLayer(W,$,_)}}function I(y){for(var S=z.nonCluster,M=S.length-1;M>=0;M--){var W=S[M];h.removeLayer(E.layerIds[W]),y||h.removeSource(E.sourceIds[W])}}function N(y){A?g(y):I(y)}function F(y){x?D(y):C(y)}function k(){for(var y=x?z.cluster:z.nonCluster,S=0;S<y.length;S++){var M=y[S],W=m[M];W&&(v.setOptions(E.layerIds[M],"setLayoutProperty",W.layout),W.layout.visibility==="visible"&&(M!=="cluster"&&E.setSourceData(M,W),v.setOptions(E.layerIds[M],"setPaintProperty",W.paint)))}}var P=this.isHidden,T=f.visible!==!0;T?P||N():P?T||F():A!==x?(N(),F()):(this.below!==_&&(N(!0),F(!0)),k()),this.clusterEnabled=x,this.isHidden=T,this.below=_,p[0].trace._glTrace=this},u.dispose=function(){for(var p=this.subplot.map,f=this.clusterEnabled?z.cluster:z.nonCluster,v=f.length-1;v>=0;v--){var h=f[v];p.removeLayer(this.layerIds[h]),p.removeSource(this.sourceIds[h])}},le.exports=function(p,f){var v=f[0].trace,h=v.cluster&&v.cluster.enabled,m=v.visible!==!0,_=new l(p,v.uid,h,m),x=R(p.gd,f),A=_.below=p.belowLookup["trace-"+v.uid],E,D,g;if(h)for(_.addSource("circle",x.circle,v.cluster),E=0;E<z.cluster.length;E++)D=z.cluster[E],g=x[D],_.addLayer(D,g,A);else for(E=0;E<z.nonCluster.length;E++)D=z.nonCluster[E],g=x[D],_.addSource(D,g,v.cluster),_.addLayer(D,g,A);return f[0].trace._glTrace=_,_}}}),TK=U({"src/traces/scattermap/hover.js"(pe,le){var w=Dp(),R=ii(),O=ng(),z=R.fillText,l=Dt().BADNUM,u=Y4().traceLayerPrefix;function c(f,v,h){var m=f.cd,_=m[0].trace,x=f.xa,A=f.ya,E=f.subplot,D=[],g=u+_.uid+"-circle",C=_.cluster&&_.cluster.enabled;if(C){var I=E.map.queryRenderedFeatures(null,{layers:[g]});D=I.map(function(Q){return Q.id})}var N=v>=0?Math.floor((v+180)/360):Math.ceil((v-180)/360),F=N*360,k=v-F;function P(Q){var J=Q.lonlat;if(J[0]===l||C&&D.indexOf(Q.i+1)===-1)return 1/0;var G=R.modHalf(J[0],360),ee=J[1],re=E.project([G,ee]),fe=re.x-x.c2p([k,ee]),we=re.y-A.c2p([G,h]),Oe=Math.max(3,Q.mrc||0);return Math.max(Math.sqrt(fe*fe+we*we)-Oe,1-3/Oe)}if(w.getClosest(m,P,f),f.index!==!1){var T=m[f.index],y=T.lonlat,S=[R.modHalf(y[0],360)+F,y[1]],M=x.c2p(S),W=A.c2p(S),$=T.mrc||1;f.x0=M-$,f.x1=M+$,f.y0=W-$,f.y1=W+$;var Z={};Z[_.subplot]={_subplot:E};var K=_._module.formatLabels(T,_,Z);return f.lonLabel=K.lonLabel,f.latLabel=K.latLabel,f.color=O(_,T),f.extraText=p(_,T,m[0].t.labels),f.hovertemplate=_.hovertemplate,[f]}}function p(f,v,h){if(f.hovertemplate)return;var m=v.hi||f.hoverinfo,_=m.split("+"),x=_.indexOf("all")!==-1,A=_.indexOf("lon")!==-1,E=_.indexOf("lat")!==-1,D=v.lonlat,g=[];function C(I){return I+"°"}return x||A&&E?g.push("("+C(D[1])+", "+C(D[0])+")"):A?g.push(h.lon+C(D[0])):E&&g.push(h.lat+C(D[1])),(x||_.indexOf("text")!==-1)&&z(v,f,g),g.join("<br>")}le.exports={hoverPoints:c,getExtraText:p}}}),ytt=U({"src/traces/scattermap/event_data.js"(pe,le){le.exports=function(R,O){return R.lon=O.lon,R.lat=O.lat,R}}}),btt=U({"src/traces/scattermap/select.js"(pe,le){var w=ii(),R=Qd(),O=Dt().BADNUM;le.exports=function(l,u){var c=l.cd,p=l.xaxis,f=l.yaxis,v=[],h=c[0].trace,m;if(!R.hasMarkers(h))return[];if(u===!1)for(m=0;m<c.length;m++)c[m].selected=0;else for(m=0;m<c.length;m++){var _=c[m],x=_.lonlat;if(x[0]!==O){var A=[w.modHalf(x[0],360),x[1]],E=[p.c2p(A),f.c2p(A)];u.contains(E,null,m,l)?(v.push({pointNumber:m,lon:x[0],lat:x[1]}),_.selected=1):_.selected=0}}return v}}}),xtt=U({"node_modules/maplibre-gl/dist/maplibre-gl.js"(pe,le){(function(w,R){typeof pe=="object"&&typeof le<"u"?le.exports=R():(w=typeof globalThis<"u"?globalThis:w||self,w.maplibregl=R())})(pe,function(){var w={},R={};function O(l,u,c){if(R[l]=c,l==="index"){var p="var sharedModule = {}; ("+R.shared+")(sharedModule); ("+R.worker+")(sharedModule);",f={};return R.shared(f),R.index(w,f),typeof window<"u"&&w.setWorkerUrl(window.URL.createObjectURL(new Blob([p],{type:"text/javascript"}))),w}}O("shared",["exports"],function(l){function u(ce,Y,ye,He){return new(ye||(ye=Promise))(function(lt,Ct){function It(Vr){try{xr(He.next(Vr))}catch(hn){Ct(hn)}}function nr(Vr){try{xr(He.throw(Vr))}catch(hn){Ct(hn)}}function xr(Vr){var hn;Vr.done?lt(Vr.value):(hn=Vr.value,hn instanceof ye?hn:new ye(function(wn){wn(hn)})).then(It,nr)}xr((He=He.apply(ce,Y||[])).next())})}function c(ce){return ce&&ce.__esModule&&Object.prototype.hasOwnProperty.call(ce,"default")?ce.default:ce}typeof SuppressedError=="function"&&SuppressedError;var p=f;function f(ce,Y){this.x=ce,this.y=Y}f.prototype={clone:function(){return new f(this.x,this.y)},add:function(ce){return this.clone()._add(ce)},sub:function(ce){return this.clone()._sub(ce)},multByPoint:function(ce){return this.clone()._multByPoint(ce)},divByPoint:function(ce){return this.clone()._divByPoint(ce)},mult:function(ce){return this.clone()._mult(ce)},div:function(ce){return this.clone()._div(ce)},rotate:function(ce){return this.clone()._rotate(ce)},rotateAround:function(ce,Y){return this.clone()._rotateAround(ce,Y)},matMult:function(ce){return this.clone()._matMult(ce)},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(ce){return this.x===ce.x&&this.y===ce.y},dist:function(ce){return Math.sqrt(this.distSqr(ce))},distSqr:function(ce){var Y=ce.x-this.x,ye=ce.y-this.y;return Y*Y+ye*ye},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(ce){return Math.atan2(this.y-ce.y,this.x-ce.x)},angleWith:function(ce){return this.angleWithSep(ce.x,ce.y)},angleWithSep:function(ce,Y){return Math.atan2(this.x*Y-this.y*ce,this.x*ce+this.y*Y)},_matMult:function(ce){var Y=ce[2]*this.x+ce[3]*this.y;return this.x=ce[0]*this.x+ce[1]*this.y,this.y=Y,this},_add:function(ce){return this.x+=ce.x,this.y+=ce.y,this},_sub:function(ce){return this.x-=ce.x,this.y-=ce.y,this},_mult:function(ce){return this.x*=ce,this.y*=ce,this},_div:function(ce){return this.x/=ce,this.y/=ce,this},_multByPoint:function(ce){return this.x*=ce.x,this.y*=ce.y,this},_divByPoint:function(ce){return this.x/=ce.x,this.y/=ce.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var ce=this.y;return this.y=this.x,this.x=-ce,this},_rotate:function(ce){var Y=Math.cos(ce),ye=Math.sin(ce),He=ye*this.x+Y*this.y;return this.x=Y*this.x-ye*this.y,this.y=He,this},_rotateAround:function(ce,Y){var ye=Math.cos(ce),He=Math.sin(ce),lt=Y.y+He*(this.x-Y.x)+ye*(this.y-Y.y);return this.x=Y.x+ye*(this.x-Y.x)-He*(this.y-Y.y),this.y=lt,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},f.convert=function(ce){return ce instanceof f?ce:Array.isArray(ce)?new f(ce[0],ce[1]):ce};var v=c(p),h=m;function m(ce,Y,ye,He){this.cx=3*ce,this.bx=3*(ye-ce)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*Y,this.by=3*(He-Y)-this.cy,this.ay=1-this.cy-this.by,this.p1x=ce,this.p1y=Y,this.p2x=ye,this.p2y=He}m.prototype={sampleCurveX:function(ce){return((this.ax*ce+this.bx)*ce+this.cx)*ce},sampleCurveY:function(ce){return((this.ay*ce+this.by)*ce+this.cy)*ce},sampleCurveDerivativeX:function(ce){return(3*this.ax*ce+2*this.bx)*ce+this.cx},solveCurveX:function(ce,Y){if(Y===void 0&&(Y=1e-6),ce<0)return 0;if(ce>1)return 1;for(var ye=ce,He=0;He<8;He++){var lt=this.sampleCurveX(ye)-ce;if(Math.abs(lt)<Y)return ye;var Ct=this.sampleCurveDerivativeX(ye);if(Math.abs(Ct)<1e-6)break;ye-=lt/Ct}var It=0,nr=1;for(ye=ce,He=0;He<20&&(lt=this.sampleCurveX(ye),!(Math.abs(lt-ce)<Y));He++)ce>lt?It=ye:nr=ye,ye=.5*(nr-It)+It;return ye},solve:function(ce,Y){return this.sampleCurveY(this.solveCurveX(ce,Y))}};var _=c(h);let x,A;function E(){return x==null&&(x=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),x}function D(){if(A==null&&(A=!1,E())){const Y=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(Y){for(let He=0;He<25;He++){const lt=4*He;Y.fillStyle=`rgb(${lt},${lt+1},${lt+2})`,Y.fillRect(He%5,Math.floor(He/5),1,1)}const ye=Y.getImageData(0,0,5,5).data;for(let He=0;He<100;He++)if(He%4!=3&&ye[He]!==He){A=!0;break}}}return A||!1}function g(ce,Y,ye,He){const lt=new _(ce,Y,ye,He);return Ct=>lt.solve(Ct)}const C=g(.25,.1,.25,1);function I(ce,Y,ye){return Math.min(ye,Math.max(Y,ce))}function N(ce,Y,ye){const He=ye-Y,lt=((ce-Y)%He+He)%He+Y;return lt===Y?ye:lt}function F(ce,...Y){for(const ye of Y)for(const He in ye)ce[He]=ye[He];return ce}let k=1;function P(ce,Y,ye){const He={};for(const lt in ce)He[lt]=Y.call(this,ce[lt],lt,ce);return He}function T(ce,Y,ye){const He={};for(const lt in ce)Y.call(this,ce[lt],lt,ce)&&(He[lt]=ce[lt]);return He}function y(ce){return Array.isArray(ce)?ce.map(y):typeof ce=="object"&&ce?P(ce,y):ce}const S={};function M(ce){S[ce]||(typeof console<"u"&&console.warn(ce),S[ce]=!0)}function W(ce,Y,ye){return(ye.y-ce.y)*(Y.x-ce.x)>(Y.y-ce.y)*(ye.x-ce.x)}function $(ce){return typeof WorkerGlobalScope<"u"&&ce!==void 0&&ce instanceof WorkerGlobalScope}let Z=null;function K(ce){return typeof ImageBitmap<"u"&&ce instanceof ImageBitmap}const Q="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function J(ce,Y,ye,He,lt){return u(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");const Ct=new VideoFrame(ce,{timestamp:0});try{const It=Ct?.format;if(!It||!It.startsWith("BGR")&&!It.startsWith("RGB"))throw new Error(`Unrecognized format ${It}`);const nr=It.startsWith("BGR"),xr=new Uint8ClampedArray(He*lt*4);if(yield Ct.copyTo(xr,(function(Vr,hn,wn,Zn,hi){const Di=4*Math.max(-hn,0),Xi=(Math.max(0,wn)-wn)*Zn*4+Di,ya=4*Zn,eo=Math.max(0,hn),us=Math.max(0,wn);return{rect:{x:eo,y:us,width:Math.min(Vr.width,hn+Zn)-eo,height:Math.min(Vr.height,wn+hi)-us},layout:[{offset:Xi,stride:ya}]}})(ce,Y,ye,He,lt)),nr)for(let Vr=0;Vr<xr.length;Vr+=4){const hn=xr[Vr];xr[Vr]=xr[Vr+2],xr[Vr+2]=hn}return xr}finally{Ct.close()}})}let G,ee;const re="AbortError";function fe(){return new Error(re)}const we={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function Oe(ce){return we.REGISTERED_PROTOCOLS[ce.substring(0,ce.indexOf("://"))]}const ke="global-dispatcher";class Le extends Error{constructor(Y,ye,He,lt){super(`AJAXError: ${ye} (${Y}): ${He}`),this.status=Y,this.statusText=ye,this.url=He,this.body=lt}}const oe=()=>$(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,be=function(ce,Y){if(/:\/\//.test(ce.url)&&!/^https?:|^file:/.test(ce.url)){const He=Oe(ce.url);if(He)return He(ce,Y);if($(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:ce,targetMapId:ke},Y)}if(!(/^file:/.test(ye=ce.url)||/^file:/.test(oe())&&!/^\w+:/.test(ye))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return(function(He,lt){return u(this,void 0,void 0,function*(){const Ct=new Request(He.url,{method:He.method||"GET",body:He.body,credentials:He.credentials,headers:He.headers,cache:He.cache,referrer:oe(),signal:lt.signal});He.type!=="json"||Ct.headers.has("Accept")||Ct.headers.set("Accept","application/json");const It=yield fetch(Ct);if(!It.ok){const Vr=yield It.blob();throw new Le(It.status,It.statusText,He.url,Vr)}let nr;nr=He.type==="arrayBuffer"||He.type==="image"?It.arrayBuffer():He.type==="json"?It.json():It.text();const xr=yield nr;if(lt.signal.aborted)throw fe();return{data:xr,cacheControl:It.headers.get("Cache-Control"),expires:It.headers.get("Expires")}})})(ce,Y);if($(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:ce,mustQueue:!0,targetMapId:ke},Y)}var ye;return(function(He,lt){return new Promise((Ct,It)=>{var nr;const xr=new XMLHttpRequest;xr.open(He.method||"GET",He.url,!0),He.type!=="arrayBuffer"&&He.type!=="image"||(xr.responseType="arraybuffer");for(const Vr in He.headers)xr.setRequestHeader(Vr,He.headers[Vr]);He.type==="json"&&(xr.responseType="text",!((nr=He.headers)===null||nr===void 0)&&nr.Accept||xr.setRequestHeader("Accept","application/json")),xr.withCredentials=He.credentials==="include",xr.onerror=()=>{It(new Error(xr.statusText))},xr.onload=()=>{if(!lt.signal.aborted)if((xr.status>=200&&xr.status<300||xr.status===0)&&xr.response!==null){let Vr=xr.response;if(He.type==="json")try{Vr=JSON.parse(xr.response)}catch(hn){return void It(hn)}Ct({data:Vr,cacheControl:xr.getResponseHeader("Cache-Control"),expires:xr.getResponseHeader("Expires")})}else{const Vr=new Blob([xr.response],{type:xr.getResponseHeader("Content-Type")});It(new Le(xr.status,xr.statusText,He.url,Vr))}},lt.signal.addEventListener("abort",()=>{xr.abort(),It(fe())}),xr.send(He.body)})})(ce,Y)};function _e(ce){if(!ce||ce.indexOf("://")<=0||ce.indexOf("data:image/")===0||ce.indexOf("blob:")===0)return!0;const Y=new URL(ce),ye=window.location;return Y.protocol===ye.protocol&&Y.host===ye.host}function he(ce,Y,ye){ye[ce]&&ye[ce].indexOf(Y)!==-1||(ye[ce]=ye[ce]||[],ye[ce].push(Y))}function De(ce,Y,ye){if(ye&&ye[ce]){const He=ye[ce].indexOf(Y);He!==-1&&ye[ce].splice(He,1)}}class xe{constructor(Y,ye={}){F(this,ye),this.type=Y}}class se extends xe{constructor(Y,ye={}){super("error",F({error:Y},ye))}}class Ee{on(Y,ye){return this._listeners=this._listeners||{},he(Y,ye,this._listeners),this}off(Y,ye){return De(Y,ye,this._listeners),De(Y,ye,this._oneTimeListeners),this}once(Y,ye){return ye?(this._oneTimeListeners=this._oneTimeListeners||{},he(Y,ye,this._oneTimeListeners),this):new Promise(He=>this.once(Y,He))}fire(Y,ye){typeof Y=="string"&&(Y=new xe(Y,ye||{}));const He=Y.type;if(this.listens(He)){Y.target=this;const lt=this._listeners&&this._listeners[He]?this._listeners[He].slice():[];for(const nr of lt)nr.call(this,Y);const Ct=this._oneTimeListeners&&this._oneTimeListeners[He]?this._oneTimeListeners[He].slice():[];for(const nr of Ct)De(He,nr,this._oneTimeListeners),nr.call(this,Y);const It=this._eventedParent;It&&(F(Y,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),It.fire(Y))}else Y instanceof se&&console.error(Y.error);return this}listens(Y){return this._listeners&&this._listeners[Y]&&this._listeners[Y].length>0||this._oneTimeListeners&&this._oneTimeListeners[Y]&&this._oneTimeListeners[Y].length>0||this._eventedParent&&this._eventedParent.listens(Y)}setEventedParent(Y,ye){return this._eventedParent=Y,this._eventedParentData=ye,this}}var Te={$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 Be=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function tt(ce,Y){const ye={};for(const He in ce)He!=="ref"&&(ye[He]=ce[He]);return Be.forEach(He=>{He in Y&&(ye[He]=Y[He])}),ye}function at(ce,Y){if(Array.isArray(ce)){if(!Array.isArray(Y)||ce.length!==Y.length)return!1;for(let ye=0;ye<ce.length;ye++)if(!at(ce[ye],Y[ye]))return!1;return!0}if(typeof ce=="object"&&ce!==null&&Y!==null){if(typeof Y!="object"||Object.keys(ce).length!==Object.keys(Y).length)return!1;for(const ye in ce)if(!at(ce[ye],Y[ye]))return!1;return!0}return ce===Y}function gt(ce,Y){ce.push(Y)}function pt(ce,Y,ye){gt(ye,{command:"addSource",args:[ce,Y[ce]]})}function Rt(ce,Y,ye){gt(Y,{command:"removeSource",args:[ce]}),ye[ce]=!0}function $t(ce,Y,ye,He){Rt(ce,ye,He),pt(ce,Y,ye)}function Wt(ce,Y,ye){let He;for(He in ce[ye])if(Object.prototype.hasOwnProperty.call(ce[ye],He)&&He!=="data"&&!at(ce[ye][He],Y[ye][He]))return!1;for(He in Y[ye])if(Object.prototype.hasOwnProperty.call(Y[ye],He)&&He!=="data"&&!at(ce[ye][He],Y[ye][He]))return!1;return!0}function Ht(ce,Y,ye,He,lt,Ct){ce=ce||{},Y=Y||{};for(const It in ce)Object.prototype.hasOwnProperty.call(ce,It)&&(at(ce[It],Y[It])||ye.push({command:Ct,args:[He,It,Y[It],lt]}));for(const It in Y)Object.prototype.hasOwnProperty.call(Y,It)&&!Object.prototype.hasOwnProperty.call(ce,It)&&(at(ce[It],Y[It])||ye.push({command:Ct,args:[He,It,Y[It],lt]}))}function Ft(ce){return ce.id}function st(ce,Y){return ce[Y.id]=Y,ce}class rt{constructor(Y,ye,He,lt){this.message=(Y?`${Y}: `:"")+He,lt&&(this.identifier=lt),ye!=null&&ye.__line__&&(this.line=ye.__line__)}}function Ue(ce,...Y){for(const ye of Y)for(const He in ye)ce[He]=ye[He];return ce}class xt extends Error{constructor(Y,ye){super(ye),this.message=ye,this.key=Y}}class Gt{constructor(Y,ye=[]){this.parent=Y,this.bindings={};for(const[He,lt]of ye)this.bindings[He]=lt}concat(Y){return new Gt(this,Y)}get(Y){if(this.bindings[Y])return this.bindings[Y];if(this.parent)return this.parent.get(Y);throw new Error(`${Y} not found in scope.`)}has(Y){return!!this.bindings[Y]||!!this.parent&&this.parent.has(Y)}}const Jt={kind:"null"},Ut={kind:"number"},kr={kind:"string"},Pr={kind:"boolean"},$r={kind:"color"},rn={kind:"object"},kn={kind:"value"},Rn={kind:"collator"},ci={kind:"formatted"},In={kind:"padding"},Gn={kind:"resolvedImage"},mr={kind:"variableAnchorOffsetCollection"};function St(ce,Y){return{kind:"array",itemType:ce,N:Y}}function Ot(ce){if(ce.kind==="array"){const Y=Ot(ce.itemType);return typeof ce.N=="number"?`array<${Y}, ${ce.N}>`:ce.itemType.kind==="value"?"array":`array<${Y}>`}return ce.kind}const Et=[Jt,Ut,kr,Pr,$r,ci,rn,St(kn),In,Gn,mr];function je(ce,Y){if(Y.kind==="error")return null;if(ce.kind==="array"){if(Y.kind==="array"&&(Y.N===0&&Y.itemType.kind==="value"||!je(ce.itemType,Y.itemType))&&(typeof ce.N!="number"||ce.N===Y.N))return null}else{if(ce.kind===Y.kind)return null;if(ce.kind==="value"){for(const ye of Et)if(!je(ye,Y))return null}}return`Expected ${Ot(ce)} but found ${Ot(Y)} instead.`}function Ye(ce,Y){return Y.some(ye=>ye.kind===ce.kind)}function et(ce,Y){return Y.some(ye=>ye==="null"?ce===null:ye==="array"?Array.isArray(ce):ye==="object"?ce&&!Array.isArray(ce)&&typeof ce=="object":ye===typeof ce)}function mt(ce,Y){return ce.kind==="array"&&Y.kind==="array"?ce.itemType.kind===Y.itemType.kind&&typeof ce.N=="number":ce.kind===Y.kind}const Nt=.96422,lr=.82521,br=4/29,Or=6/29,tn=3*Or*Or,Jr=Or*Or*Or,dn=Math.PI/180,on=180/Math.PI;function Nn(ce){return(ce%=360)<0&&(ce+=360),ce}function Wi([ce,Y,ye,He]){let lt,Ct;const It=Da((.2225045*(ce=Oa(ce))+.7168786*(Y=Oa(Y))+.0606169*(ye=Oa(ye)))/1);ce===Y&&Y===ye?lt=Ct=It:(lt=Da((.4360747*ce+.3850649*Y+.1430804*ye)/Nt),Ct=Da((.0139322*ce+.0971045*Y+.7141733*ye)/lr));const nr=116*It-16;return[nr<0?0:nr,500*(lt-It),200*(It-Ct),He]}function Oa(ce){return ce<=.04045?ce/12.92:Math.pow((ce+.055)/1.055,2.4)}function Da(ce){return ce>Jr?Math.pow(ce,1/3):ce/tn+br}function Aa([ce,Y,ye,He]){let lt=(ce+16)/116,Ct=isNaN(Y)?lt:lt+Y/500,It=isNaN(ye)?lt:lt-ye/200;return lt=1*Sa(lt),Ct=Nt*Sa(Ct),It=lr*Sa(It),[Ka(3.1338561*Ct-1.6168667*lt-.4906146*It),Ka(-.9787684*Ct+1.9161415*lt+.033454*It),Ka(.0719453*Ct-.2289914*lt+1.4052427*It),He]}function Ka(ce){return(ce=ce<=.00304?12.92*ce:1.055*Math.pow(ce,1/2.4)-.055)<0?0:ce>1?1:ce}function Sa(ce){return ce>Or?ce*ce*ce:tn*(ce-br)}function no(ce){return parseInt(ce.padEnd(2,ce),16)/255}function Fo(ce,Y){return an(Y?ce/100:ce,0,1)}function an(ce,Y,ye){return Math.min(Math.max(Y,ce),ye)}function Hr(ce){return!ce.some(Number.isNaN)}const nn={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 Kr{constructor(Y,ye,He,lt=1,Ct=!0){this.r=Y,this.g=ye,this.b=He,this.a=lt,Ct||(this.r*=lt,this.g*=lt,this.b*=lt,lt||this.overwriteGetter("rgb",[Y,ye,He,lt]))}static parse(Y){if(Y instanceof Kr)return Y;if(typeof Y!="string")return;const ye=(function(He){if((He=He.toLowerCase().trim())==="transparent")return[0,0,0,0];const lt=nn[He];if(lt){const[It,nr,xr]=lt;return[It/255,nr/255,xr/255,1]}if(He.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(He)){const It=He.length<6?1:2;let nr=1;return[no(He.slice(nr,nr+=It)),no(He.slice(nr,nr+=It)),no(He.slice(nr,nr+=It)),no(He.slice(nr,nr+It)||"ff")]}if(He.startsWith("rgb")){const It=He.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(It){const[nr,xr,Vr,hn,wn,Zn,hi,Di,Xi,ya,eo,us]=It,ko=[hn||" ",hi||" ",ya].join("");if(ko==="  "||ko==="  /"||ko===",,"||ko===",,,"){const es=[Vr,Zn,Xi].join(""),js=es==="%%%"?100:es===""?255:0;if(js){const Pl=[an(+xr/js,0,1),an(+wn/js,0,1),an(+Di/js,0,1),eo?Fo(+eo,us):1];if(Hr(Pl))return Pl}}return}}const Ct=He.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(Ct){const[It,nr,xr,Vr,hn,wn,Zn,hi,Di]=Ct,Xi=[xr||" ",hn||" ",Zn].join("");if(Xi==="  "||Xi==="  /"||Xi===",,"||Xi===",,,"){const ya=[+nr,an(+Vr,0,100),an(+wn,0,100),hi?Fo(+hi,Di):1];if(Hr(ya))return(function([eo,us,ko,es]){function js(Pl){const Lu=(Pl+eo/30)%12,df=us*Math.min(ko,1-ko);return ko-df*Math.max(-1,Math.min(Lu-3,9-Lu,1))}return eo=Nn(eo),us/=100,ko/=100,[js(0),js(8),js(4),es]})(ya)}}})(Y);return ye?new Kr(...ye,!1):void 0}get rgb(){const{r:Y,g:ye,b:He,a:lt}=this,Ct=lt||1/0;return this.overwriteGetter("rgb",[Y/Ct,ye/Ct,He/Ct,lt])}get hcl(){return this.overwriteGetter("hcl",(function(Y){const[ye,He,lt,Ct]=Wi(Y),It=Math.sqrt(He*He+lt*lt);return[Math.round(1e4*It)?Nn(Math.atan2(lt,He)*on):NaN,It,ye,Ct]})(this.rgb))}get lab(){return this.overwriteGetter("lab",Wi(this.rgb))}overwriteGetter(Y,ye){return Object.defineProperty(this,Y,{value:ye}),ye}toString(){const[Y,ye,He,lt]=this.rgb;return`rgba(${[Y,ye,He].map(Ct=>Math.round(255*Ct)).join(",")},${lt})`}}Kr.black=new Kr(0,0,0,1),Kr.white=new Kr(1,1,1,1),Kr.transparent=new Kr(0,0,0,0),Kr.red=new Kr(1,0,0,1);class $n{constructor(Y,ye,He){this.sensitivity=Y?ye?"variant":"case":ye?"accent":"base",this.locale=He,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(Y,ye){return this.collator.compare(Y,ye)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Ai{constructor(Y,ye,He,lt,Ct){this.text=Y,this.image=ye,this.scale=He,this.fontStack=lt,this.textColor=Ct}}class aa{constructor(Y){this.sections=Y}static fromString(Y){return new aa([new Ai(Y,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(Y=>Y.text.length!==0||Y.image&&Y.image.name.length!==0)}static factory(Y){return Y instanceof aa?Y:aa.fromString(Y)}toString(){return this.sections.length===0?"":this.sections.map(Y=>Y.text).join("")}}class Ci{constructor(Y){this.values=Y.slice()}static parse(Y){if(Y instanceof Ci)return Y;if(typeof Y=="number")return new Ci([Y,Y,Y,Y]);if(Array.isArray(Y)&&!(Y.length<1||Y.length>4)){for(const ye of Y)if(typeof ye!="number")return;switch(Y.length){case 1:Y=[Y[0],Y[0],Y[0],Y[0]];break;case 2:Y=[Y[0],Y[1],Y[0],Y[1]];break;case 3:Y=[Y[0],Y[1],Y[2],Y[1]]}return new Ci(Y)}}toString(){return JSON.stringify(this.values)}}const Ta=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class Na{constructor(Y){this.values=Y.slice()}static parse(Y){if(Y instanceof Na)return Y;if(Array.isArray(Y)&&!(Y.length<1)&&Y.length%2==0){for(let ye=0;ye<Y.length;ye+=2){const He=Y[ye],lt=Y[ye+1];if(typeof He!="string"||!Ta.has(He)||!Array.isArray(lt)||lt.length!==2||typeof lt[0]!="number"||typeof lt[1]!="number")return}return new Na(Y)}}toString(){return JSON.stringify(this.values)}}class ro{constructor(Y){this.name=Y.name,this.available=Y.available}toString(){return this.name}static fromString(Y){return Y?new ro({name:Y,available:!1}):null}}function oo(ce,Y,ye,He){return typeof ce=="number"&&ce>=0&&ce<=255&&typeof Y=="number"&&Y>=0&&Y<=255&&typeof ye=="number"&&ye>=0&&ye<=255?He===void 0||typeof He=="number"&&He>=0&&He<=1?null:`Invalid rgba value [${[ce,Y,ye,He].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof He=="number"?[ce,Y,ye,He]:[ce,Y,ye]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function xo(ce){if(ce===null||typeof ce=="string"||typeof ce=="boolean"||typeof ce=="number"||ce instanceof Kr||ce instanceof $n||ce instanceof aa||ce instanceof Ci||ce instanceof Na||ce instanceof ro)return!0;if(Array.isArray(ce)){for(const Y of ce)if(!xo(Y))return!1;return!0}if(typeof ce=="object"){for(const Y in ce)if(!xo(ce[Y]))return!1;return!0}return!1}function vr(ce){if(ce===null)return Jt;if(typeof ce=="string")return kr;if(typeof ce=="boolean")return Pr;if(typeof ce=="number")return Ut;if(ce instanceof Kr)return $r;if(ce instanceof $n)return Rn;if(ce instanceof aa)return ci;if(ce instanceof Ci)return In;if(ce instanceof Na)return mr;if(ce instanceof ro)return Gn;if(Array.isArray(ce)){const Y=ce.length;let ye;for(const He of ce){const lt=vr(He);if(ye){if(ye===lt)continue;ye=kn;break}ye=lt}return St(ye||kn,Y)}return rn}function er(ce){const Y=typeof ce;return ce===null?"":Y==="string"||Y==="number"||Y==="boolean"?String(ce):ce instanceof Kr||ce instanceof aa||ce instanceof Ci||ce instanceof Na||ce instanceof ro?ce.toString():JSON.stringify(ce)}class si{constructor(Y,ye){this.type=Y,this.value=ye}static parse(Y,ye){if(Y.length!==2)return ye.error(`'literal' expression requires exactly one argument, but found ${Y.length-1} instead.`);if(!xo(Y[1]))return ye.error("invalid value");const He=Y[1];let lt=vr(He);const Ct=ye.expectedType;return lt.kind!=="array"||lt.N!==0||!Ct||Ct.kind!=="array"||typeof Ct.N=="number"&&Ct.N!==0||(lt=Ct),new si(lt,He)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class ei{constructor(Y){this.name="ExpressionEvaluationError",this.message=Y}toJSON(){return this.message}}const Kn={string:kr,number:Ut,boolean:Pr,object:rn};class qn{constructor(Y,ye){this.type=Y,this.args=ye}static parse(Y,ye){if(Y.length<2)return ye.error("Expected at least one argument.");let He,lt=1;const Ct=Y[0];if(Ct==="array"){let nr,xr;if(Y.length>2){const Vr=Y[1];if(typeof Vr!="string"||!(Vr in Kn)||Vr==="object")return ye.error('The item type argument of "array" must be one of string, number, boolean',1);nr=Kn[Vr],lt++}else nr=kn;if(Y.length>3){if(Y[2]!==null&&(typeof Y[2]!="number"||Y[2]<0||Y[2]!==Math.floor(Y[2])))return ye.error('The length argument to "array" must be a positive integer literal',2);xr=Y[2],lt++}He=St(nr,xr)}else{if(!Kn[Ct])throw new Error(`Types doesn't contain name = ${Ct}`);He=Kn[Ct]}const It=[];for(;lt<Y.length;lt++){const nr=ye.parse(Y[lt],lt,kn);if(!nr)return null;It.push(nr)}return new qn(He,It)}evaluate(Y){for(let ye=0;ye<this.args.length;ye++){const He=this.args[ye].evaluate(Y);if(!je(this.type,vr(He)))return He;if(ye===this.args.length-1)throw new ei(`Expected value to be of type ${Ot(this.type)}, but found ${Ot(vr(He))} instead.`)}throw new Error}eachChild(Y){this.args.forEach(Y)}outputDefined(){return this.args.every(Y=>Y.outputDefined())}}const pi={"to-boolean":Pr,"to-color":$r,"to-number":Ut,"to-string":kr};class _i{constructor(Y,ye){this.type=Y,this.args=ye}static parse(Y,ye){if(Y.length<2)return ye.error("Expected at least one argument.");const He=Y[0];if(!pi[He])throw new Error(`Can't parse ${He} as it is not part of the known types`);if((He==="to-boolean"||He==="to-string")&&Y.length!==2)return ye.error("Expected one argument.");const lt=pi[He],Ct=[];for(let It=1;It<Y.length;It++){const nr=ye.parse(Y[It],It,kn);if(!nr)return null;Ct.push(nr)}return new _i(lt,Ct)}evaluate(Y){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(Y);case"color":{let ye,He;for(const lt of this.args){if(ye=lt.evaluate(Y),He=null,ye instanceof Kr)return ye;if(typeof ye=="string"){const Ct=Y.parseColor(ye);if(Ct)return Ct}else if(Array.isArray(ye)&&(He=ye.length<3||ye.length>4?`Invalid rbga value ${JSON.stringify(ye)}: expected an array containing either three or four numeric values.`:oo(ye[0],ye[1],ye[2],ye[3]),!He))return new Kr(ye[0]/255,ye[1]/255,ye[2]/255,ye[3])}throw new ei(He||`Could not parse color from value '${typeof ye=="string"?ye:JSON.stringify(ye)}'`)}case"padding":{let ye;for(const He of this.args){ye=He.evaluate(Y);const lt=Ci.parse(ye);if(lt)return lt}throw new ei(`Could not parse padding from value '${typeof ye=="string"?ye:JSON.stringify(ye)}'`)}case"variableAnchorOffsetCollection":{let ye;for(const He of this.args){ye=He.evaluate(Y);const lt=Na.parse(ye);if(lt)return lt}throw new ei(`Could not parse variableAnchorOffsetCollection from value '${typeof ye=="string"?ye:JSON.stringify(ye)}'`)}case"number":{let ye=null;for(const He of this.args){if(ye=He.evaluate(Y),ye===null)return 0;const lt=Number(ye);if(!isNaN(lt))return lt}throw new ei(`Could not convert ${JSON.stringify(ye)} to number.`)}case"formatted":return aa.fromString(er(this.args[0].evaluate(Y)));case"resolvedImage":return ro.fromString(er(this.args[0].evaluate(Y)));default:return er(this.args[0].evaluate(Y))}}eachChild(Y){this.args.forEach(Y)}outputDefined(){return this.args.every(Y=>Y.outputDefined())}}const fi=["Unknown","Point","LineString","Polygon"];class Ri{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"?fi[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(Y){let ye=this._parseColorCache[Y];return ye||(ye=this._parseColorCache[Y]=Kr.parse(Y)),ye}}class $i{constructor(Y,ye,He=[],lt,Ct=new Gt,It=[]){this.registry=Y,this.path=He,this.key=He.map(nr=>`[${nr}]`).join(""),this.scope=Ct,this.errors=It,this.expectedType=lt,this._isConstant=ye}parse(Y,ye,He,lt,Ct={}){return ye?this.concat(ye,He,lt)._parse(Y,Ct):this._parse(Y,Ct)}_parse(Y,ye){function He(lt,Ct,It){return It==="assert"?new qn(Ct,[lt]):It==="coerce"?new _i(Ct,[lt]):lt}if(Y!==null&&typeof Y!="string"&&typeof Y!="boolean"&&typeof Y!="number"||(Y=["literal",Y]),Array.isArray(Y)){if(Y.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const lt=Y[0];if(typeof lt!="string")return this.error(`Expression name must be a string, but found ${typeof lt} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const Ct=this.registry[lt];if(Ct){let It=Ct.parse(Y,this);if(!It)return null;if(this.expectedType){const nr=this.expectedType,xr=It.type;if(nr.kind!=="string"&&nr.kind!=="number"&&nr.kind!=="boolean"&&nr.kind!=="object"&&nr.kind!=="array"||xr.kind!=="value")if(nr.kind!=="color"&&nr.kind!=="formatted"&&nr.kind!=="resolvedImage"||xr.kind!=="value"&&xr.kind!=="string")if(nr.kind!=="padding"||xr.kind!=="value"&&xr.kind!=="number"&&xr.kind!=="array")if(nr.kind!=="variableAnchorOffsetCollection"||xr.kind!=="value"&&xr.kind!=="array"){if(this.checkSubtype(nr,xr))return null}else It=He(It,nr,ye.typeAnnotation||"coerce");else It=He(It,nr,ye.typeAnnotation||"coerce");else It=He(It,nr,ye.typeAnnotation||"coerce");else It=He(It,nr,ye.typeAnnotation||"assert")}if(!(It instanceof si)&&It.type.kind!=="resolvedImage"&&this._isConstant(It)){const nr=new Ri;try{It=new si(It.type,It.evaluate(nr))}catch(xr){return this.error(xr.message),null}}return It}return this.error(`Unknown expression "${lt}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(Y===void 0?"'undefined' value invalid. Use null instead.":typeof Y=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof Y} instead.`)}concat(Y,ye,He){const lt=typeof Y=="number"?this.path.concat(Y):this.path,Ct=He?this.scope.concat(He):this.scope;return new $i(this.registry,this._isConstant,lt,ye||null,Ct,this.errors)}error(Y,...ye){const He=`${this.key}${ye.map(lt=>`[${lt}]`).join("")}`;this.errors.push(new xt(He,Y))}checkSubtype(Y,ye){const He=je(Y,ye);return He&&this.error(He),He}}class Hi{constructor(Y,ye){this.type=ye.type,this.bindings=[].concat(Y),this.result=ye}evaluate(Y){return this.result.evaluate(Y)}eachChild(Y){for(const ye of this.bindings)Y(ye[1]);Y(this.result)}static parse(Y,ye){if(Y.length<4)return ye.error(`Expected at least 3 arguments, but found ${Y.length-1} instead.`);const He=[];for(let Ct=1;Ct<Y.length-1;Ct+=2){const It=Y[Ct];if(typeof It!="string")return ye.error(`Expected string, but found ${typeof It} instead.`,Ct);if(/[^a-zA-Z0-9_]/.test(It))return ye.error("Variable names must contain only alphanumeric characters or '_'.",Ct);const nr=ye.parse(Y[Ct+1],Ct+1);if(!nr)return null;He.push([It,nr])}const lt=ye.parse(Y[Y.length-1],Y.length-1,ye.expectedType,He);return lt?new Hi(He,lt):null}outputDefined(){return this.result.outputDefined()}}class wr{constructor(Y,ye){this.type=ye.type,this.name=Y,this.boundExpression=ye}static parse(Y,ye){if(Y.length!==2||typeof Y[1]!="string")return ye.error("'var' expression requires exactly one string literal argument.");const He=Y[1];return ye.scope.has(He)?new wr(He,ye.scope.get(He)):ye.error(`Unknown variable "${He}". Make sure "${He}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(Y){return this.boundExpression.evaluate(Y)}eachChild(){}outputDefined(){return!1}}class gn{constructor(Y,ye,He){this.type=Y,this.index=ye,this.input=He}static parse(Y,ye){if(Y.length!==3)return ye.error(`Expected 2 arguments, but found ${Y.length-1} instead.`);const He=ye.parse(Y[1],1,Ut),lt=ye.parse(Y[2],2,St(ye.expectedType||kn));return He&&lt?new gn(lt.type.itemType,He,lt):null}evaluate(Y){const ye=this.index.evaluate(Y),He=this.input.evaluate(Y);if(ye<0)throw new ei(`Array index out of bounds: ${ye} < 0.`);if(ye>=He.length)throw new ei(`Array index out of bounds: ${ye} > ${He.length-1}.`);if(ye!==Math.floor(ye))throw new ei(`Array index must be an integer, but found ${ye} instead.`);return He[ye]}eachChild(Y){Y(this.index),Y(this.input)}outputDefined(){return!1}}class Xn{constructor(Y,ye){this.type=Pr,this.needle=Y,this.haystack=ye}static parse(Y,ye){if(Y.length!==3)return ye.error(`Expected 2 arguments, but found ${Y.length-1} instead.`);const He=ye.parse(Y[1],1,kn),lt=ye.parse(Y[2],2,kn);return He&&lt?Ye(He.type,[Pr,kr,Ut,Jt,kn])?new Xn(He,lt):ye.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ot(He.type)} instead`):null}evaluate(Y){const ye=this.needle.evaluate(Y),He=this.haystack.evaluate(Y);if(!He)return!1;if(!et(ye,["boolean","string","number","null"]))throw new ei(`Expected first argument to be of type boolean, string, number or null, but found ${Ot(vr(ye))} instead.`);if(!et(He,["string","array"]))throw new ei(`Expected second argument to be of type array or string, but found ${Ot(vr(He))} instead.`);return He.indexOf(ye)>=0}eachChild(Y){Y(this.needle),Y(this.haystack)}outputDefined(){return!0}}class Yi{constructor(Y,ye,He){this.type=Ut,this.needle=Y,this.haystack=ye,this.fromIndex=He}static parse(Y,ye){if(Y.length<=2||Y.length>=5)return ye.error(`Expected 3 or 4 arguments, but found ${Y.length-1} instead.`);const He=ye.parse(Y[1],1,kn),lt=ye.parse(Y[2],2,kn);if(!He||!lt)return null;if(!Ye(He.type,[Pr,kr,Ut,Jt,kn]))return ye.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ot(He.type)} instead`);if(Y.length===4){const Ct=ye.parse(Y[3],3,Ut);return Ct?new Yi(He,lt,Ct):null}return new Yi(He,lt)}evaluate(Y){const ye=this.needle.evaluate(Y),He=this.haystack.evaluate(Y);if(!et(ye,["boolean","string","number","null"]))throw new ei(`Expected first argument to be of type boolean, string, number or null, but found ${Ot(vr(ye))} instead.`);let lt;if(this.fromIndex&&(lt=this.fromIndex.evaluate(Y)),et(He,["string"])){const Ct=He.indexOf(ye,lt);return Ct===-1?-1:[...He.slice(0,Ct)].length}if(et(He,["array"]))return He.indexOf(ye,lt);throw new ei(`Expected second argument to be of type array or string, but found ${Ot(vr(He))} instead.`)}eachChild(Y){Y(this.needle),Y(this.haystack),this.fromIndex&&Y(this.fromIndex)}outputDefined(){return!1}}class ha{constructor(Y,ye,He,lt,Ct,It){this.inputType=Y,this.type=ye,this.input=He,this.cases=lt,this.outputs=Ct,this.otherwise=It}static parse(Y,ye){if(Y.length<5)return ye.error(`Expected at least 4 arguments, but found only ${Y.length-1}.`);if(Y.length%2!=1)return ye.error("Expected an even number of arguments.");let He,lt;ye.expectedType&&ye.expectedType.kind!=="value"&&(lt=ye.expectedType);const Ct={},It=[];for(let Vr=2;Vr<Y.length-1;Vr+=2){let hn=Y[Vr];const wn=Y[Vr+1];Array.isArray(hn)||(hn=[hn]);const Zn=ye.concat(Vr);if(hn.length===0)return Zn.error("Expected at least one branch label.");for(const Di of hn){if(typeof Di!="number"&&typeof Di!="string")return Zn.error("Branch labels must be numbers or strings.");if(typeof Di=="number"&&Math.abs(Di)>Number.MAX_SAFE_INTEGER)return Zn.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof Di=="number"&&Math.floor(Di)!==Di)return Zn.error("Numeric branch labels must be integer values.");if(He){if(Zn.checkSubtype(He,vr(Di)))return null}else He=vr(Di);if(Ct[String(Di)]!==void 0)return Zn.error("Branch labels must be unique.");Ct[String(Di)]=It.length}const hi=ye.parse(wn,Vr,lt);if(!hi)return null;lt=lt||hi.type,It.push(hi)}const nr=ye.parse(Y[1],1,kn);if(!nr)return null;const xr=ye.parse(Y[Y.length-1],Y.length-1,lt);return xr?nr.type.kind!=="value"&&ye.concat(1).checkSubtype(He,nr.type)?null:new ha(He,lt,nr,Ct,It,xr):null}evaluate(Y){const ye=this.input.evaluate(Y);return(vr(ye)===this.inputType&&this.outputs[this.cases[ye]]||this.otherwise).evaluate(Y)}eachChild(Y){Y(this.input),this.outputs.forEach(Y),Y(this.otherwise)}outputDefined(){return this.outputs.every(Y=>Y.outputDefined())&&this.otherwise.outputDefined()}}class Ca{constructor(Y,ye,He){this.type=Y,this.branches=ye,this.otherwise=He}static parse(Y,ye){if(Y.length<4)return ye.error(`Expected at least 3 arguments, but found only ${Y.length-1}.`);if(Y.length%2!=0)return ye.error("Expected an odd number of arguments.");let He;ye.expectedType&&ye.expectedType.kind!=="value"&&(He=ye.expectedType);const lt=[];for(let It=1;It<Y.length-1;It+=2){const nr=ye.parse(Y[It],It,Pr);if(!nr)return null;const xr=ye.parse(Y[It+1],It+1,He);if(!xr)return null;lt.push([nr,xr]),He=He||xr.type}const Ct=ye.parse(Y[Y.length-1],Y.length-1,He);if(!Ct)return null;if(!He)throw new Error("Can't infer output type");return new Ca(He,lt,Ct)}evaluate(Y){for(const[ye,He]of this.branches)if(ye.evaluate(Y))return He.evaluate(Y);return this.otherwise.evaluate(Y)}eachChild(Y){for(const[ye,He]of this.branches)Y(ye),Y(He);Y(this.otherwise)}outputDefined(){return this.branches.every(([Y,ye])=>ye.outputDefined())&&this.otherwise.outputDefined()}}class Ba{constructor(Y,ye,He,lt){this.type=Y,this.input=ye,this.beginIndex=He,this.endIndex=lt}static parse(Y,ye){if(Y.length<=2||Y.length>=5)return ye.error(`Expected 3 or 4 arguments, but found ${Y.length-1} instead.`);const He=ye.parse(Y[1],1,kn),lt=ye.parse(Y[2],2,Ut);if(!He||!lt)return null;if(!Ye(He.type,[St(kn),kr,kn]))return ye.error(`Expected first argument to be of type array or string, but found ${Ot(He.type)} instead`);if(Y.length===4){const Ct=ye.parse(Y[3],3,Ut);return Ct?new Ba(He.type,He,lt,Ct):null}return new Ba(He.type,He,lt)}evaluate(Y){const ye=this.input.evaluate(Y),He=this.beginIndex.evaluate(Y);let lt;if(this.endIndex&&(lt=this.endIndex.evaluate(Y)),et(ye,["string"]))return[...ye].slice(He,lt).join("");if(et(ye,["array"]))return ye.slice(He,lt);throw new ei(`Expected first argument to be of type array or string, but found ${Ot(vr(ye))} instead.`)}eachChild(Y){Y(this.input),Y(this.beginIndex),this.endIndex&&Y(this.endIndex)}outputDefined(){return!1}}function ji(ce,Y){const ye=ce.length-1;let He,lt,Ct=0,It=ye,nr=0;for(;Ct<=It;)if(nr=Math.floor((Ct+It)/2),He=ce[nr],lt=ce[nr+1],He<=Y){if(nr===ye||Y<lt)return nr;Ct=nr+1}else{if(!(He>Y))throw new ei("Input is not a number.");It=nr-1}return 0}class Ea{constructor(Y,ye,He){this.type=Y,this.input=ye,this.labels=[],this.outputs=[];for(const[lt,Ct]of He)this.labels.push(lt),this.outputs.push(Ct)}static parse(Y,ye){if(Y.length-1<4)return ye.error(`Expected at least 4 arguments, but found only ${Y.length-1}.`);if((Y.length-1)%2!=0)return ye.error("Expected an even number of arguments.");const He=ye.parse(Y[1],1,Ut);if(!He)return null;const lt=[];let Ct=null;ye.expectedType&&ye.expectedType.kind!=="value"&&(Ct=ye.expectedType);for(let It=1;It<Y.length;It+=2){const nr=It===1?-1/0:Y[It],xr=Y[It+1],Vr=It,hn=It+1;if(typeof nr!="number")return ye.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',Vr);if(lt.length&&lt[lt.length-1][0]>=nr)return ye.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Vr);const wn=ye.parse(xr,hn,Ct);if(!wn)return null;Ct=Ct||wn.type,lt.push([nr,wn])}return new Ea(Ct,He,lt)}evaluate(Y){const ye=this.labels,He=this.outputs;if(ye.length===1)return He[0].evaluate(Y);const lt=this.input.evaluate(Y);if(lt<=ye[0])return He[0].evaluate(Y);const Ct=ye.length;return lt>=ye[Ct-1]?He[Ct-1].evaluate(Y):He[ji(ye,lt)].evaluate(Y)}eachChild(Y){Y(this.input);for(const ye of this.outputs)Y(ye)}outputDefined(){return this.outputs.every(Y=>Y.outputDefined())}}function cs(ce){return ce&&ce.__esModule&&Object.prototype.hasOwnProperty.call(ce,"default")?ce.default:ce}var No=Vs;function Vs(ce,Y,ye,He){this.cx=3*ce,this.bx=3*(ye-ce)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*Y,this.by=3*(He-Y)-this.cy,this.ay=1-this.cy-this.by,this.p1x=ce,this.p1y=Y,this.p2x=ye,this.p2y=He}Vs.prototype={sampleCurveX:function(ce){return((this.ax*ce+this.bx)*ce+this.cx)*ce},sampleCurveY:function(ce){return((this.ay*ce+this.by)*ce+this.cy)*ce},sampleCurveDerivativeX:function(ce){return(3*this.ax*ce+2*this.bx)*ce+this.cx},solveCurveX:function(ce,Y){if(Y===void 0&&(Y=1e-6),ce<0)return 0;if(ce>1)return 1;for(var ye=ce,He=0;He<8;He++){var lt=this.sampleCurveX(ye)-ce;if(Math.abs(lt)<Y)return ye;var Ct=this.sampleCurveDerivativeX(ye);if(Math.abs(Ct)<1e-6)break;ye-=lt/Ct}var It=0,nr=1;for(ye=ce,He=0;He<20&&(lt=this.sampleCurveX(ye),!(Math.abs(lt-ce)<Y));He++)ce>lt?It=ye:nr=ye,ye=.5*(nr-It)+It;return ye},solve:function(ce,Y){return this.sampleCurveY(this.solveCurveX(ce,Y))}};var pl=cs(No);function kl(ce,Y,ye){return ce+ye*(Y-ce)}function El(ce,Y,ye){return ce.map((He,lt)=>kl(He,Y[lt],ye))}const iu={number:kl,color:function(ce,Y,ye,He="rgb"){switch(He){case"rgb":{const[lt,Ct,It,nr]=El(ce.rgb,Y.rgb,ye);return new Kr(lt,Ct,It,nr,!1)}case"hcl":{const[lt,Ct,It,nr]=ce.hcl,[xr,Vr,hn,wn]=Y.hcl;let Zn,hi;if(isNaN(lt)||isNaN(xr))isNaN(lt)?isNaN(xr)?Zn=NaN:(Zn=xr,It!==1&&It!==0||(hi=Vr)):(Zn=lt,hn!==1&&hn!==0||(hi=Ct));else{let us=xr-lt;xr>lt&&us>180?us-=360:xr<lt&&lt-xr>180&&(us+=360),Zn=lt+ye*us}const[Di,Xi,ya,eo]=(function([us,ko,es,js]){return us=isNaN(us)?0:us*dn,Aa([es,Math.cos(us)*ko,Math.sin(us)*ko,js])})([Zn,hi??kl(Ct,Vr,ye),kl(It,hn,ye),kl(nr,wn,ye)]);return new Kr(Di,Xi,ya,eo,!1)}case"lab":{const[lt,Ct,It,nr]=Aa(El(ce.lab,Y.lab,ye));return new Kr(lt,Ct,It,nr,!1)}}},array:El,padding:function(ce,Y,ye){return new Ci(El(ce.values,Y.values,ye))},variableAnchorOffsetCollection:function(ce,Y,ye){const He=ce.values,lt=Y.values;if(He.length!==lt.length)throw new ei(`Cannot interpolate values of different length. from: ${ce.toString()}, to: ${Y.toString()}`);const Ct=[];for(let It=0;It<He.length;It+=2){if(He[It]!==lt[It])throw new ei(`Cannot interpolate values containing mismatched anchors. from[${It}]: ${He[It]}, to[${It}]: ${lt[It]}`);Ct.push(He[It]);const[nr,xr]=He[It+1],[Vr,hn]=lt[It+1];Ct.push([kl(nr,Vr,ye),kl(xr,hn,ye)])}return new Na(Ct)}};class bu{constructor(Y,ye,He,lt,Ct){this.type=Y,this.operator=ye,this.interpolation=He,this.input=lt,this.labels=[],this.outputs=[];for(const[It,nr]of Ct)this.labels.push(It),this.outputs.push(nr)}static interpolationFactor(Y,ye,He,lt){let Ct=0;if(Y.name==="exponential")Ct=yl(ye,Y.base,He,lt);else if(Y.name==="linear")Ct=yl(ye,1,He,lt);else if(Y.name==="cubic-bezier"){const It=Y.controlPoints;Ct=new pl(It[0],It[1],It[2],It[3]).solve(yl(ye,1,He,lt))}return Ct}static parse(Y,ye){let[He,lt,Ct,...It]=Y;if(!Array.isArray(lt)||lt.length===0)return ye.error("Expected an interpolation type expression.",1);if(lt[0]==="linear")lt={name:"linear"};else if(lt[0]==="exponential"){const Vr=lt[1];if(typeof Vr!="number")return ye.error("Exponential interpolation requires a numeric base.",1,1);lt={name:"exponential",base:Vr}}else{if(lt[0]!=="cubic-bezier")return ye.error(`Unknown interpolation type ${String(lt[0])}`,1,0);{const Vr=lt.slice(1);if(Vr.length!==4||Vr.some(hn=>typeof hn!="number"||hn<0||hn>1))return ye.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);lt={name:"cubic-bezier",controlPoints:Vr}}}if(Y.length-1<4)return ye.error(`Expected at least 4 arguments, but found only ${Y.length-1}.`);if((Y.length-1)%2!=0)return ye.error("Expected an even number of arguments.");if(Ct=ye.parse(Ct,2,Ut),!Ct)return null;const nr=[];let xr=null;He==="interpolate-hcl"||He==="interpolate-lab"?xr=$r:ye.expectedType&&ye.expectedType.kind!=="value"&&(xr=ye.expectedType);for(let Vr=0;Vr<It.length;Vr+=2){const hn=It[Vr],wn=It[Vr+1],Zn=Vr+3,hi=Vr+4;if(typeof hn!="number")return ye.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',Zn);if(nr.length&&nr[nr.length-1][0]>=hn)return ye.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',Zn);const Di=ye.parse(wn,hi,xr);if(!Di)return null;xr=xr||Di.type,nr.push([hn,Di])}return mt(xr,Ut)||mt(xr,$r)||mt(xr,In)||mt(xr,mr)||mt(xr,St(Ut))?new bu(xr,He,lt,Ct,nr):ye.error(`Type ${Ot(xr)} is not interpolatable.`)}evaluate(Y){const ye=this.labels,He=this.outputs;if(ye.length===1)return He[0].evaluate(Y);const lt=this.input.evaluate(Y);if(lt<=ye[0])return He[0].evaluate(Y);const Ct=ye.length;if(lt>=ye[Ct-1])return He[Ct-1].evaluate(Y);const It=ji(ye,lt),nr=bu.interpolationFactor(this.interpolation,lt,ye[It],ye[It+1]),xr=He[It].evaluate(Y),Vr=He[It+1].evaluate(Y);switch(this.operator){case"interpolate":return iu[this.type.kind](xr,Vr,nr);case"interpolate-hcl":return iu.color(xr,Vr,nr,"hcl");case"interpolate-lab":return iu.color(xr,Vr,nr,"lab")}}eachChild(Y){Y(this.input);for(const ye of this.outputs)Y(ye)}outputDefined(){return this.outputs.every(Y=>Y.outputDefined())}}function yl(ce,Y,ye,He){const lt=He-ye,Ct=ce-ye;return lt===0?0:Y===1?Ct/lt:(Math.pow(Y,Ct)-1)/(Math.pow(Y,lt)-1)}class ql{constructor(Y,ye){this.type=Y,this.args=ye}static parse(Y,ye){if(Y.length<2)return ye.error("Expectected at least one argument.");let He=null;const lt=ye.expectedType;lt&&lt.kind!=="value"&&(He=lt);const Ct=[];for(const nr of Y.slice(1)){const xr=ye.parse(nr,1+Ct.length,He,void 0,{typeAnnotation:"omit"});if(!xr)return null;He=He||xr.type,Ct.push(xr)}if(!He)throw new Error("No output type");const It=lt&&Ct.some(nr=>je(lt,nr.type));return new ql(It?kn:He,Ct)}evaluate(Y){let ye,He=null,lt=0;for(const Ct of this.args)if(lt++,He=Ct.evaluate(Y),He&&He instanceof ro&&!He.available&&(ye||(ye=He.name),He=null,lt===this.args.length&&(He=ye)),He!==null)break;return He}eachChild(Y){this.args.forEach(Y)}outputDefined(){return this.args.every(Y=>Y.outputDefined())}}function rc(ce,Y){return ce==="=="||ce==="!="?Y.kind==="boolean"||Y.kind==="string"||Y.kind==="number"||Y.kind==="null"||Y.kind==="value":Y.kind==="string"||Y.kind==="number"||Y.kind==="value"}function zc(ce,Y,ye,He){return He.compare(Y,ye)===0}function Pf(ce,Y,ye){const He=ce!=="=="&&ce!=="!=";return class pKe{constructor(Ct,It,nr){this.type=Pr,this.lhs=Ct,this.rhs=It,this.collator=nr,this.hasUntypedArgument=Ct.type.kind==="value"||It.type.kind==="value"}static parse(Ct,It){if(Ct.length!==3&&Ct.length!==4)return It.error("Expected two or three arguments.");const nr=Ct[0];let xr=It.parse(Ct[1],1,kn);if(!xr)return null;if(!rc(nr,xr.type))return It.concat(1).error(`"${nr}" comparisons are not supported for type '${Ot(xr.type)}'.`);let Vr=It.parse(Ct[2],2,kn);if(!Vr)return null;if(!rc(nr,Vr.type))return It.concat(2).error(`"${nr}" comparisons are not supported for type '${Ot(Vr.type)}'.`);if(xr.type.kind!==Vr.type.kind&&xr.type.kind!=="value"&&Vr.type.kind!=="value")return It.error(`Cannot compare types '${Ot(xr.type)}' and '${Ot(Vr.type)}'.`);He&&(xr.type.kind==="value"&&Vr.type.kind!=="value"?xr=new qn(Vr.type,[xr]):xr.type.kind!=="value"&&Vr.type.kind==="value"&&(Vr=new qn(xr.type,[Vr])));let hn=null;if(Ct.length===4){if(xr.type.kind!=="string"&&Vr.type.kind!=="string"&&xr.type.kind!=="value"&&Vr.type.kind!=="value")return It.error("Cannot use collator to compare non-string types.");if(hn=It.parse(Ct[3],3,Rn),!hn)return null}return new pKe(xr,Vr,hn)}evaluate(Ct){const It=this.lhs.evaluate(Ct),nr=this.rhs.evaluate(Ct);if(He&&this.hasUntypedArgument){const xr=vr(It),Vr=vr(nr);if(xr.kind!==Vr.kind||xr.kind!=="string"&&xr.kind!=="number")throw new ei(`Expected arguments for "${ce}" to be (string, string) or (number, number), but found (${xr.kind}, ${Vr.kind}) instead.`)}if(this.collator&&!He&&this.hasUntypedArgument){const xr=vr(It),Vr=vr(nr);if(xr.kind!=="string"||Vr.kind!=="string")return Y(Ct,It,nr)}return this.collator?ye(Ct,It,nr,this.collator.evaluate(Ct)):Y(Ct,It,nr)}eachChild(Ct){Ct(this.lhs),Ct(this.rhs),this.collator&&Ct(this.collator)}outputDefined(){return!0}}}const ju=Pf("==",function(ce,Y,ye){return Y===ye},zc),Ql=Pf("!=",function(ce,Y,ye){return Y!==ye},function(ce,Y,ye,He){return!zc(0,Y,ye,He)}),lu=Pf("<",function(ce,Y,ye){return Y<ye},function(ce,Y,ye,He){return He.compare(Y,ye)<0}),dc=Pf(">",function(ce,Y,ye){return Y>ye},function(ce,Y,ye,He){return He.compare(Y,ye)>0}),wc=Pf("<=",function(ce,Y,ye){return Y<=ye},function(ce,Y,ye,He){return He.compare(Y,ye)<=0}),mc=Pf(">=",function(ce,Y,ye){return Y>=ye},function(ce,Y,ye,He){return He.compare(Y,ye)>=0});class xu{constructor(Y,ye,He){this.type=Rn,this.locale=He,this.caseSensitive=Y,this.diacriticSensitive=ye}static parse(Y,ye){if(Y.length!==2)return ye.error("Expected one argument.");const He=Y[1];if(typeof He!="object"||Array.isArray(He))return ye.error("Collator options argument must be an object.");const lt=ye.parse(He["case-sensitive"]!==void 0&&He["case-sensitive"],1,Pr);if(!lt)return null;const Ct=ye.parse(He["diacritic-sensitive"]!==void 0&&He["diacritic-sensitive"],1,Pr);if(!Ct)return null;let It=null;return He.locale&&(It=ye.parse(He.locale,1,kr),!It)?null:new xu(lt,Ct,It)}evaluate(Y){return new $n(this.caseSensitive.evaluate(Y),this.diacriticSensitive.evaluate(Y),this.locale?this.locale.evaluate(Y):null)}eachChild(Y){Y(this.caseSensitive),Y(this.diacriticSensitive),this.locale&&Y(this.locale)}outputDefined(){return!1}}class qu{constructor(Y,ye,He,lt,Ct){this.type=kr,this.number=Y,this.locale=ye,this.currency=He,this.minFractionDigits=lt,this.maxFractionDigits=Ct}static parse(Y,ye){if(Y.length!==3)return ye.error("Expected two arguments.");const He=ye.parse(Y[1],1,Ut);if(!He)return null;const lt=Y[2];if(typeof lt!="object"||Array.isArray(lt))return ye.error("NumberFormat options argument must be an object.");let Ct=null;if(lt.locale&&(Ct=ye.parse(lt.locale,1,kr),!Ct))return null;let It=null;if(lt.currency&&(It=ye.parse(lt.currency,1,kr),!It))return null;let nr=null;if(lt["min-fraction-digits"]&&(nr=ye.parse(lt["min-fraction-digits"],1,Ut),!nr))return null;let xr=null;return lt["max-fraction-digits"]&&(xr=ye.parse(lt["max-fraction-digits"],1,Ut),!xr)?null:new qu(He,Ct,It,nr,xr)}evaluate(Y){return new Intl.NumberFormat(this.locale?this.locale.evaluate(Y):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(Y):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(Y):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(Y):void 0}).format(this.number.evaluate(Y))}eachChild(Y){Y(this.number),this.locale&&Y(this.locale),this.currency&&Y(this.currency),this.minFractionDigits&&Y(this.minFractionDigits),this.maxFractionDigits&&Y(this.maxFractionDigits)}outputDefined(){return!1}}class xf{constructor(Y){this.type=ci,this.sections=Y}static parse(Y,ye){if(Y.length<2)return ye.error("Expected at least one argument.");const He=Y[1];if(!Array.isArray(He)&&typeof He=="object")return ye.error("First argument must be an image or text section.");const lt=[];let Ct=!1;for(let It=1;It<=Y.length-1;++It){const nr=Y[It];if(Ct&&typeof nr=="object"&&!Array.isArray(nr)){Ct=!1;let xr=null;if(nr["font-scale"]&&(xr=ye.parse(nr["font-scale"],1,Ut),!xr))return null;let Vr=null;if(nr["text-font"]&&(Vr=ye.parse(nr["text-font"],1,St(kr)),!Vr))return null;let hn=null;if(nr["text-color"]&&(hn=ye.parse(nr["text-color"],1,$r),!hn))return null;const wn=lt[lt.length-1];wn.scale=xr,wn.font=Vr,wn.textColor=hn}else{const xr=ye.parse(Y[It],1,kn);if(!xr)return null;const Vr=xr.type.kind;if(Vr!=="string"&&Vr!=="value"&&Vr!=="null"&&Vr!=="resolvedImage")return ye.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");Ct=!0,lt.push({content:xr,scale:null,font:null,textColor:null})}}return new xf(lt)}evaluate(Y){return new aa(this.sections.map(ye=>{const He=ye.content.evaluate(Y);return vr(He)===Gn?new Ai("",He,null,null,null):new Ai(er(He),null,ye.scale?ye.scale.evaluate(Y):null,ye.font?ye.font.evaluate(Y).join(","):null,ye.textColor?ye.textColor.evaluate(Y):null)}))}eachChild(Y){for(const ye of this.sections)Y(ye.content),ye.scale&&Y(ye.scale),ye.font&&Y(ye.font),ye.textColor&&Y(ye.textColor)}outputDefined(){return!1}}class ed{constructor(Y){this.type=Gn,this.input=Y}static parse(Y,ye){if(Y.length!==2)return ye.error("Expected two arguments.");const He=ye.parse(Y[1],1,kr);return He?new ed(He):ye.error("No image name provided.")}evaluate(Y){const ye=this.input.evaluate(Y),He=ro.fromString(ye);return He&&Y.availableImages&&(He.available=Y.availableImages.indexOf(ye)>-1),He}eachChild(Y){Y(this.input)}outputDefined(){return!1}}class Df{constructor(Y){this.type=Ut,this.input=Y}static parse(Y,ye){if(Y.length!==2)return ye.error(`Expected 1 argument, but found ${Y.length-1} instead.`);const He=ye.parse(Y[1],1);return He?He.type.kind!=="array"&&He.type.kind!=="string"&&He.type.kind!=="value"?ye.error(`Expected argument of type string or array, but found ${Ot(He.type)} instead.`):new Df(He):null}evaluate(Y){const ye=this.input.evaluate(Y);if(typeof ye=="string")return[...ye].length;if(Array.isArray(ye))return ye.length;throw new ei(`Expected value to be of type string or array, but found ${Ot(vr(ye))} instead.`)}eachChild(Y){Y(this.input)}outputDefined(){return!1}}const Sc=8192;function Qo(ce,Y){const ye=(180+ce[0])/360,He=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+ce[1]*Math.PI/360)))/360,lt=Math.pow(2,Y.z);return[Math.round(ye*lt*Sc),Math.round(He*lt*Sc)]}function Sl(ce,Y){const ye=Math.pow(2,Y.z);return[(lt=(ce[0]/Sc+Y.x)/ye,360*lt-180),(He=(ce[1]/Sc+Y.y)/ye,360/Math.PI*Math.atan(Math.exp((180-360*He)*Math.PI/180))-90)];var He,lt}function gd(ce,Y){ce[0]=Math.min(ce[0],Y[0]),ce[1]=Math.min(ce[1],Y[1]),ce[2]=Math.max(ce[2],Y[0]),ce[3]=Math.max(ce[3],Y[1])}function $f(ce,Y){return!(ce[0]<=Y[0]||ce[2]>=Y[2]||ce[1]<=Y[1]||ce[3]>=Y[3])}function wu(ce,Y,ye){const He=ce[0]-Y[0],lt=ce[1]-Y[1],Ct=ce[0]-ye[0],It=ce[1]-ye[1];return He*It-Ct*lt==0&&He*Ct<=0&&lt*It<=0}function Ad(ce,Y,ye,He){return(lt=[He[0]-ye[0],He[1]-ye[1]])[0]*(Ct=[Y[0]-ce[0],Y[1]-ce[1]])[1]-lt[1]*Ct[0]!=0&&!(!pu(ce,Y,ye,He)||!pu(ye,He,ce,Y));var lt,Ct}function Bc(ce,Y,ye){for(const He of ye)for(let lt=0;lt<He.length-1;++lt)if(Ad(ce,Y,He[lt],He[lt+1]))return!0;return!1}function uf(ce,Y,ye=!1){let He=!1;for(const nr of Y)for(let xr=0;xr<nr.length-1;xr++){if(wu(ce,nr[xr],nr[xr+1]))return ye;(Ct=nr[xr])[1]>(lt=ce)[1]!=(It=nr[xr+1])[1]>lt[1]&&lt[0]<(It[0]-Ct[0])*(lt[1]-Ct[1])/(It[1]-Ct[1])+Ct[0]&&(He=!He)}var lt,Ct,It;return He}function Cd(ce,Y){for(const ye of Y)if(uf(ce,ye))return!0;return!1}function Tl(ce,Y){for(const ye of ce)if(!uf(ye,Y))return!1;for(let ye=0;ye<ce.length-1;++ye)if(Bc(ce[ye],ce[ye+1],Y))return!1;return!0}function Xu(ce,Y){for(const ye of Y)if(Tl(ce,ye))return!0;return!1}function pu(ce,Y,ye,He){const lt=He[0]-ye[0],Ct=He[1]-ye[1],It=(ce[0]-ye[0])*Ct-lt*(ce[1]-ye[1]),nr=(Y[0]-ye[0])*Ct-lt*(Y[1]-ye[1]);return It>0&&nr<0||It<0&&nr>0}function Zc(ce,Y,ye){const He=[];for(let lt=0;lt<ce.length;lt++){const Ct=[];for(let It=0;It<ce[lt].length;It++){const nr=Qo(ce[lt][It],ye);gd(Y,nr),Ct.push(nr)}He.push(Ct)}return He}function Md(ce,Y,ye){const He=[];for(let lt=0;lt<ce.length;lt++){const Ct=Zc(ce[lt],Y,ye);He.push(Ct)}return He}function uu(ce,Y,ye,He){if(ce[0]<ye[0]||ce[0]>ye[2]){const lt=.5*He;let Ct=ce[0]-ye[0]>lt?-He:ye[0]-ce[0]>lt?He:0;Ct===0&&(Ct=ce[0]-ye[2]>lt?-He:ye[2]-ce[0]>lt?He:0),ce[0]+=Ct}gd(Y,ce)}function Lf(ce,Y,ye,He){const lt=Math.pow(2,He.z)*Sc,Ct=[He.x*Sc,He.y*Sc],It=[];for(const nr of ce)for(const xr of nr){const Vr=[xr.x+Ct[0],xr.y+Ct[1]];uu(Vr,Y,ye,lt),It.push(Vr)}return It}function op(ce,Y,ye,He){const lt=Math.pow(2,He.z)*Sc,Ct=[He.x*Sc,He.y*Sc],It=[];for(const xr of ce){const Vr=[];for(const hn of xr){const wn=[hn.x+Ct[0],hn.y+Ct[1]];gd(Y,wn),Vr.push(wn)}It.push(Vr)}if(Y[2]-Y[0]<=lt/2){(nr=Y)[0]=nr[1]=1/0,nr[2]=nr[3]=-1/0;for(const xr of It)for(const Vr of xr)uu(Vr,Y,ye,lt)}var nr;return It}class zd{constructor(Y,ye){this.type=Pr,this.geojson=Y,this.geometries=ye}static parse(Y,ye){if(Y.length!==2)return ye.error(`'within' expression requires exactly one argument, but found ${Y.length-1} instead.`);if(xo(Y[1])){const He=Y[1];if(He.type==="FeatureCollection"){const lt=[];for(const Ct of He.features){const{type:It,coordinates:nr}=Ct.geometry;It==="Polygon"&&lt.push(nr),It==="MultiPolygon"&&lt.push(...nr)}if(lt.length)return new zd(He,{type:"MultiPolygon",coordinates:lt})}else if(He.type==="Feature"){const lt=He.geometry.type;if(lt==="Polygon"||lt==="MultiPolygon")return new zd(He,He.geometry)}else if(He.type==="Polygon"||He.type==="MultiPolygon")return new zd(He,He)}return ye.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(Y){if(Y.geometry()!=null&&Y.canonicalID()!=null){if(Y.geometryType()==="Point")return(function(ye,He){const lt=[1/0,1/0,-1/0,-1/0],Ct=[1/0,1/0,-1/0,-1/0],It=ye.canonicalID();if(He.type==="Polygon"){const nr=Zc(He.coordinates,Ct,It),xr=Lf(ye.geometry(),lt,Ct,It);if(!$f(lt,Ct))return!1;for(const Vr of xr)if(!uf(Vr,nr))return!1}if(He.type==="MultiPolygon"){const nr=Md(He.coordinates,Ct,It),xr=Lf(ye.geometry(),lt,Ct,It);if(!$f(lt,Ct))return!1;for(const Vr of xr)if(!Cd(Vr,nr))return!1}return!0})(Y,this.geometries);if(Y.geometryType()==="LineString")return(function(ye,He){const lt=[1/0,1/0,-1/0,-1/0],Ct=[1/0,1/0,-1/0,-1/0],It=ye.canonicalID();if(He.type==="Polygon"){const nr=Zc(He.coordinates,Ct,It),xr=op(ye.geometry(),lt,Ct,It);if(!$f(lt,Ct))return!1;for(const Vr of xr)if(!Tl(Vr,nr))return!1}if(He.type==="MultiPolygon"){const nr=Md(He.coordinates,Ct,It),xr=op(ye.geometry(),lt,Ct,It);if(!$f(lt,Ct))return!1;for(const Vr of xr)if(!Xu(Vr,nr))return!1}return!0})(Y,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let Qp=class{constructor(ce=[],Y=(ye,He)=>ye<He?-1:ye>He?1:0){if(this.data=ce,this.length=this.data.length,this.compare=Y,this.length>0)for(let ye=(this.length>>1)-1;ye>=0;ye--)this._down(ye)}push(ce){this.data.push(ce),this._up(this.length++)}pop(){if(this.length===0)return;const ce=this.data[0],Y=this.data.pop();return--this.length>0&&(this.data[0]=Y,this._down(0)),ce}peek(){return this.data[0]}_up(ce){const{data:Y,compare:ye}=this,He=Y[ce];for(;ce>0;){const lt=ce-1>>1,Ct=Y[lt];if(ye(He,Ct)>=0)break;Y[ce]=Ct,ce=lt}Y[ce]=He}_down(ce){const{data:Y,compare:ye}=this,He=this.length>>1,lt=Y[ce];for(;ce<He;){let Ct=1+(ce<<1);const It=Ct+1;if(It<this.length&&ye(Y[It],Y[Ct])<0&&(Ct=It),ye(Y[Ct],lt)>=0)break;Y[ce]=Y[Ct],ce=Ct}Y[ce]=lt}};function hh(ce,Y,ye,He,lt){td(ce,Y,ye,He||ce.length-1,lt||Um)}function td(ce,Y,ye,He,lt){for(;He>ye;){if(He-ye>600){var Ct=He-ye+1,It=Y-ye+1,nr=Math.log(Ct),xr=.5*Math.exp(2*nr/3),Vr=.5*Math.sqrt(nr*xr*(Ct-xr)/Ct)*(It-Ct/2<0?-1:1);td(ce,Y,Math.max(ye,Math.floor(Y-It*xr/Ct+Vr)),Math.min(He,Math.floor(Y+(Ct-It)*xr/Ct+Vr)),lt)}var hn=ce[Y],wn=ye,Zn=He;for(ev(ce,ye,Y),lt(ce[He],hn)>0&&ev(ce,ye,He);wn<Zn;){for(ev(ce,wn,Zn),wn++,Zn--;lt(ce[wn],hn)<0;)wn++;for(;lt(ce[Zn],hn)>0;)Zn--}lt(ce[ye],hn)===0?ev(ce,ye,Zn):ev(ce,++Zn,He),Zn<=Y&&(ye=Zn+1),Y<=Zn&&(He=Zn-1)}}function ev(ce,Y,ye){var He=ce[Y];ce[Y]=ce[ye],ce[ye]=He}function Um(ce,Y){return ce<Y?-1:ce>Y?1:0}function Hm(ce,Y){if(ce.length<=1)return[ce];const ye=[];let He,lt;for(const Ct of ce){const It=K0(Ct);It!==0&&(Ct.area=Math.abs(It),lt===void 0&&(lt=It<0),lt===It<0?(He&&ye.push(He),He=[Ct]):He.push(Ct))}if(He&&ye.push(He),Y>1)for(let Ct=0;Ct<ye.length;Ct++)ye[Ct].length<=Y||(hh(ye[Ct],Y,1,ye[Ct].length-1,om),ye[Ct]=ye[Ct].slice(0,Y));return ye}function om(ce,Y){return Y.area-ce.area}function K0(ce){let Y=0;for(let ye,He,lt=0,Ct=ce.length,It=Ct-1;lt<Ct;It=lt++)ye=ce[lt],He=ce[It],Y+=(He.x-ye.x)*(ye.y+He.y);return Y}const o1=1/298.257223563,Of=o1*(2-o1),xm=Math.PI/180;class J0{constructor(Y){const ye=6378.137*xm*1e3,He=Math.cos(Y*xm),lt=1/(1-Of*(1-He*He)),Ct=Math.sqrt(lt);this.kx=ye*Ct*He,this.ky=ye*Ct*lt*(1-Of)}distance(Y,ye){const He=this.wrap(Y[0]-ye[0])*this.kx,lt=(Y[1]-ye[1])*this.ky;return Math.sqrt(He*He+lt*lt)}pointOnLine(Y,ye){let He,lt,Ct,It,nr=1/0;for(let xr=0;xr<Y.length-1;xr++){let Vr=Y[xr][0],hn=Y[xr][1],wn=this.wrap(Y[xr+1][0]-Vr)*this.kx,Zn=(Y[xr+1][1]-hn)*this.ky,hi=0;wn===0&&Zn===0||(hi=(this.wrap(ye[0]-Vr)*this.kx*wn+(ye[1]-hn)*this.ky*Zn)/(wn*wn+Zn*Zn),hi>1?(Vr=Y[xr+1][0],hn=Y[xr+1][1]):hi>0&&(Vr+=wn/this.kx*hi,hn+=Zn/this.ky*hi)),wn=this.wrap(ye[0]-Vr)*this.kx,Zn=(ye[1]-hn)*this.ky;const Di=wn*wn+Zn*Zn;Di<nr&&(nr=Di,He=Vr,lt=hn,Ct=xr,It=hi)}return{point:[He,lt],index:Ct,t:Math.max(0,Math.min(1,It))}}wrap(Y){for(;Y<-180;)Y+=360;for(;Y>180;)Y-=360;return Y}}function wp(ce,Y){return Y[0]-ce[0]}function sp(ce){return ce[1]-ce[0]+1}function Sp(ce,Y){return ce[1]>=ce[0]&&ce[1]<Y}function sm(ce,Y){if(ce[0]>ce[1])return[null,null];const ye=sp(ce);if(Y){if(ye===2)return[ce,null];const lt=Math.floor(ye/2);return[[ce[0],ce[0]+lt],[ce[0]+lt,ce[1]]]}if(ye===1)return[ce,null];const He=Math.floor(ye/2)-1;return[[ce[0],ce[0]+He],[ce[0]+He+1,ce[1]]]}function yd(ce,Y){if(!Sp(Y,ce.length))return[1/0,1/0,-1/0,-1/0];const ye=[1/0,1/0,-1/0,-1/0];for(let He=Y[0];He<=Y[1];++He)gd(ye,ce[He]);return ye}function lp(ce){const Y=[1/0,1/0,-1/0,-1/0];for(const ye of ce)for(const He of ye)gd(Y,He);return Y}function Uc(ce){return ce[0]!==-1/0&&ce[1]!==-1/0&&ce[2]!==1/0&&ce[3]!==1/0}function zf(ce,Y,ye){if(!Uc(ce)||!Uc(Y))return NaN;let He=0,lt=0;return ce[2]<Y[0]&&(He=Y[0]-ce[2]),ce[0]>Y[2]&&(He=ce[0]-Y[2]),ce[1]>Y[3]&&(lt=ce[1]-Y[3]),ce[3]<Y[1]&&(lt=Y[1]-ce[3]),ye.distance([0,0],[He,lt])}function jm(ce,Y,ye){const He=ye.pointOnLine(Y,ce);return ye.distance(ce,He.point)}function hv(ce,Y,ye,He,lt){const Ct=Math.min(jm(ce,[ye,He],lt),jm(Y,[ye,He],lt)),It=Math.min(jm(ye,[ce,Y],lt),jm(He,[ce,Y],lt));return Math.min(Ct,It)}function og(ce,Y,ye,He,lt){if(!Sp(Y,ce.length)||!Sp(He,ye.length))return 1/0;let Ct=1/0;for(let It=Y[0];It<Y[1];++It){const nr=ce[It],xr=ce[It+1];for(let Vr=He[0];Vr<He[1];++Vr){const hn=ye[Vr],wn=ye[Vr+1];if(Ad(nr,xr,hn,wn))return 0;Ct=Math.min(Ct,hv(nr,xr,hn,wn,lt))}}return Ct}function Bd(ce,Y,ye,He,lt){if(!Sp(Y,ce.length)||!Sp(He,ye.length))return NaN;let Ct=1/0;for(let It=Y[0];It<=Y[1];++It)for(let nr=He[0];nr<=He[1];++nr)if(Ct=Math.min(Ct,lt.distance(ce[It],ye[nr])),Ct===0)return Ct;return Ct}function z1(ce,Y,ye){if(uf(ce,Y,!0))return 0;let He=1/0;for(const lt of Y){const Ct=lt[0],It=lt[lt.length-1];if(Ct!==It&&(He=Math.min(He,jm(ce,[It,Ct],ye)),He===0))return He;const nr=ye.pointOnLine(lt,ce);if(He=Math.min(He,ye.distance(ce,nr.point)),He===0)return He}return He}function Oc(ce,Y,ye,He){if(!Sp(Y,ce.length))return NaN;for(let Ct=Y[0];Ct<=Y[1];++Ct)if(uf(ce[Ct],ye,!0))return 0;let lt=1/0;for(let Ct=Y[0];Ct<Y[1];++Ct){const It=ce[Ct],nr=ce[Ct+1];for(const xr of ye)for(let Vr=0,hn=xr.length,wn=hn-1;Vr<hn;wn=Vr++){const Zn=xr[wn],hi=xr[Vr];if(Ad(It,nr,Zn,hi))return 0;lt=Math.min(lt,hv(It,nr,Zn,hi,He))}}return lt}function pb(ce,Y){for(const ye of ce)for(const He of ye)if(uf(He,Y,!0))return!0;return!1}function mf(ce,Y,ye,He=1/0){const lt=lp(ce),Ct=lp(Y);if(He!==1/0&&zf(lt,Ct,ye)>=He)return He;if($f(lt,Ct)){if(pb(ce,Y))return 0}else if(pb(Y,ce))return 0;let It=1/0;for(const nr of ce)for(let xr=0,Vr=nr.length,hn=Vr-1;xr<Vr;hn=xr++){const wn=nr[hn],Zn=nr[xr];for(const hi of Y)for(let Di=0,Xi=hi.length,ya=Xi-1;Di<Xi;ya=Di++){const eo=hi[ya],us=hi[Di];if(Ad(wn,Zn,eo,us))return 0;It=Math.min(It,hv(wn,Zn,eo,us,ye))}}return It}function mu(ce,Y,ye,He,lt,Ct){if(!Ct)return;const It=zf(yd(He,Ct),lt,ye);It<Y&&ce.push([It,Ct,[0,0]])}function Wg(ce,Y,ye,He,lt,Ct,It){if(!Ct||!It)return;const nr=zf(yd(He,Ct),yd(lt,It),ye);nr<Y&&ce.push([nr,Ct,It])}function lm(ce,Y,ye,He,lt=1/0){let Ct=Math.min(He.distance(ce[0],ye[0][0]),lt);if(Ct===0)return Ct;const It=new Qp([[0,[0,ce.length-1],[0,0]]],wp),nr=lp(ye);for(;It.length>0;){const xr=It.pop();if(xr[0]>=Ct)continue;const Vr=xr[1],hn=Y?50:100;if(sp(Vr)<=hn){if(!Sp(Vr,ce.length))return NaN;if(Y){const wn=Oc(ce,Vr,ye,He);if(isNaN(wn)||wn===0)return wn;Ct=Math.min(Ct,wn)}else for(let wn=Vr[0];wn<=Vr[1];++wn){const Zn=z1(ce[wn],ye,He);if(Ct=Math.min(Ct,Zn),Ct===0)return 0}}else{const wn=sm(Vr,Y);mu(It,Ct,He,ce,nr,wn[0]),mu(It,Ct,He,ce,nr,wn[1])}}return Ct}function Hh(ce,Y,ye,He,lt,Ct=1/0){let It=Math.min(Ct,lt.distance(ce[0],ye[0]));if(It===0)return It;const nr=new Qp([[0,[0,ce.length-1],[0,ye.length-1]]],wp);for(;nr.length>0;){const xr=nr.pop();if(xr[0]>=It)continue;const Vr=xr[1],hn=xr[2],wn=Y?50:100,Zn=He?50:100;if(sp(Vr)<=wn&&sp(hn)<=Zn){if(!Sp(Vr,ce.length)&&Sp(hn,ye.length))return NaN;let hi;if(Y&&He)hi=og(ce,Vr,ye,hn,lt),It=Math.min(It,hi);else if(Y&&!He){const Di=ce.slice(Vr[0],Vr[1]+1);for(let Xi=hn[0];Xi<=hn[1];++Xi)if(hi=jm(ye[Xi],Di,lt),It=Math.min(It,hi),It===0)return It}else if(!Y&&He){const Di=ye.slice(hn[0],hn[1]+1);for(let Xi=Vr[0];Xi<=Vr[1];++Xi)if(hi=jm(ce[Xi],Di,lt),It=Math.min(It,hi),It===0)return It}else hi=Bd(ce,Vr,ye,hn,lt),It=Math.min(It,hi)}else{const hi=sm(Vr,Y),Di=sm(hn,He);Wg(nr,It,lt,ce,ye,hi[0],Di[0]),Wg(nr,It,lt,ce,ye,hi[0],Di[1]),Wg(nr,It,lt,ce,ye,hi[1],Di[0]),Wg(nr,It,lt,ce,ye,hi[1],Di[1])}}return It}function Q0(ce){return ce.type==="MultiPolygon"?ce.coordinates.map(Y=>({type:"Polygon",coordinates:Y})):ce.type==="MultiLineString"?ce.coordinates.map(Y=>({type:"LineString",coordinates:Y})):ce.type==="MultiPoint"?ce.coordinates.map(Y=>({type:"Point",coordinates:Y})):[ce]}class sg{constructor(Y,ye){this.type=Ut,this.geojson=Y,this.geometries=ye}static parse(Y,ye){if(Y.length!==2)return ye.error(`'distance' expression requires exactly one argument, but found ${Y.length-1} instead.`);if(xo(Y[1])){const He=Y[1];if(He.type==="FeatureCollection")return new sg(He,He.features.map(lt=>Q0(lt.geometry)).flat());if(He.type==="Feature")return new sg(He,Q0(He.geometry));if("type"in He&&"coordinates"in He)return new sg(He,Q0(He))}return ye.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(Y){if(Y.geometry()!=null&&Y.canonicalID()!=null){if(Y.geometryType()==="Point")return(function(ye,He){const lt=ye.geometry(),Ct=lt.flat().map(xr=>Sl([xr.x,xr.y],ye.canonical));if(lt.length===0)return NaN;const It=new J0(Ct[0][1]);let nr=1/0;for(const xr of He){switch(xr.type){case"Point":nr=Math.min(nr,Hh(Ct,!1,[xr.coordinates],!1,It,nr));break;case"LineString":nr=Math.min(nr,Hh(Ct,!1,xr.coordinates,!0,It,nr));break;case"Polygon":nr=Math.min(nr,lm(Ct,!1,xr.coordinates,It,nr))}if(nr===0)return nr}return nr})(Y,this.geometries);if(Y.geometryType()==="LineString")return(function(ye,He){const lt=ye.geometry(),Ct=lt.flat().map(xr=>Sl([xr.x,xr.y],ye.canonical));if(lt.length===0)return NaN;const It=new J0(Ct[0][1]);let nr=1/0;for(const xr of He){switch(xr.type){case"Point":nr=Math.min(nr,Hh(Ct,!0,[xr.coordinates],!1,It,nr));break;case"LineString":nr=Math.min(nr,Hh(Ct,!0,xr.coordinates,!0,It,nr));break;case"Polygon":nr=Math.min(nr,lm(Ct,!0,xr.coordinates,It,nr))}if(nr===0)return nr}return nr})(Y,this.geometries);if(Y.geometryType()==="Polygon")return(function(ye,He){const lt=ye.geometry();if(lt.length===0||lt[0].length===0)return NaN;const Ct=Hm(lt,0).map(xr=>xr.map(Vr=>Vr.map(hn=>Sl([hn.x,hn.y],ye.canonical)))),It=new J0(Ct[0][0][0][1]);let nr=1/0;for(const xr of He)for(const Vr of Ct){switch(xr.type){case"Point":nr=Math.min(nr,lm([xr.coordinates],!1,Vr,It,nr));break;case"LineString":nr=Math.min(nr,lm(xr.coordinates,!0,Vr,It,nr));break;case"Polygon":nr=Math.min(nr,mf(Vr,xr.coordinates,It,nr))}if(nr===0)return nr}return nr})(Y,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}const a0={"==":ju,"!=":Ql,">":dc,"<":lu,">=":mc,"<=":wc,array:qn,at:gn,boolean:qn,case:Ca,coalesce:ql,collator:xu,format:xf,image:ed,in:Xn,"index-of":Yi,interpolate:bu,"interpolate-hcl":bu,"interpolate-lab":bu,length:Df,let:Hi,literal:si,match:ha,number:qn,"number-format":qu,object:qn,slice:Ba,step:Ea,string:qn,"to-boolean":_i,"to-color":_i,"to-number":_i,"to-string":_i,var:wr,within:zd,distance:sg};class up{constructor(Y,ye,He,lt){this.name=Y,this.type=ye,this._evaluate=He,this.args=lt}evaluate(Y){return this._evaluate(Y,this.args)}eachChild(Y){this.args.forEach(Y)}outputDefined(){return!1}static parse(Y,ye){const He=Y[0],lt=up.definitions[He];if(!lt)return ye.error(`Unknown expression "${He}". If you wanted a literal array, use ["literal", [...]].`,0);const Ct=Array.isArray(lt)?lt[0]:lt.type,It=Array.isArray(lt)?[[lt[1],lt[2]]]:lt.overloads,nr=It.filter(([Vr])=>!Array.isArray(Vr)||Vr.length===Y.length-1);let xr=null;for(const[Vr,hn]of nr){xr=new $i(ye.registry,ey,ye.path,null,ye.scope);const wn=[];let Zn=!1;for(let hi=1;hi<Y.length;hi++){const Di=Y[hi],Xi=Array.isArray(Vr)?Vr[hi-1]:Vr.type,ya=xr.parse(Di,1+wn.length,Xi);if(!ya){Zn=!0;break}wn.push(ya)}if(!Zn)if(Array.isArray(Vr)&&Vr.length!==wn.length)xr.error(`Expected ${Vr.length} arguments, but found ${wn.length} instead.`);else{for(let hi=0;hi<wn.length;hi++){const Di=Array.isArray(Vr)?Vr[hi]:Vr.type,Xi=wn[hi];xr.concat(hi+1).checkSubtype(Di,Xi.type)}if(xr.errors.length===0)return new up(He,Ct,hn,wn)}}if(nr.length===1)ye.errors.push(...xr.errors);else{const Vr=(nr.length?nr:It).map(([wn])=>{return Zn=wn,Array.isArray(Zn)?`(${Zn.map(Ot).join(", ")})`:`(${Ot(Zn.type)}...)`;var Zn}).join(" | "),hn=[];for(let wn=1;wn<Y.length;wn++){const Zn=ye.parse(Y[wn],1+hn.length);if(!Zn)return null;hn.push(Ot(Zn.type))}ye.error(`Expected arguments of type ${Vr}, but found (${hn.join(", ")}) instead.`)}return null}static register(Y,ye){up.definitions=ye;for(const He in ye)Y[He]=up}}function s1(ce,[Y,ye,He,lt]){Y=Y.evaluate(ce),ye=ye.evaluate(ce),He=He.evaluate(ce);const Ct=lt?lt.evaluate(ce):1,It=oo(Y,ye,He,Ct);if(It)throw new ei(It);return new Kr(Y/255,ye/255,He/255,Ct,!1)}function Ay(ce,Y){return ce in Y}function o0(ce,Y){const ye=Y[ce];return ye===void 0?null:ye}function lg(ce){return{type:ce}}function ey(ce){if(ce instanceof wr)return ey(ce.boundExpression);if(ce instanceof up&&ce.name==="error"||ce instanceof xu||ce instanceof zd||ce instanceof sg)return!1;const Y=ce instanceof _i||ce instanceof qn;let ye=!0;return ce.eachChild(He=>{ye=Y?ye&&ey(He):ye&&He instanceof si}),!!ye&&ty(ce)&&Cy(ce,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function ty(ce){if(ce instanceof up&&(ce.name==="get"&&ce.args.length===1||ce.name==="feature-state"||ce.name==="has"&&ce.args.length===1||ce.name==="properties"||ce.name==="geometry-type"||ce.name==="id"||/^filter-/.test(ce.name))||ce instanceof zd||ce instanceof sg)return!1;let Y=!0;return ce.eachChild(ye=>{Y&&!ty(ye)&&(Y=!1)}),Y}function um(ce){if(ce instanceof up&&ce.name==="feature-state")return!1;let Y=!0;return ce.eachChild(ye=>{Y&&!um(ye)&&(Y=!1)}),Y}function Cy(ce,Y){if(ce instanceof up&&Y.indexOf(ce.name)>=0)return!1;let ye=!0;return ce.eachChild(He=>{ye&&!Cy(He,Y)&&(ye=!1)}),ye}function Vm(ce){return{result:"success",value:ce}}function _m(ce){return{result:"error",value:ce}}function cp(ce){return ce["property-type"]==="data-driven"||ce["property-type"]==="cross-faded-data-driven"}function Rg(ce){return!!ce.expression&&ce.expression.parameters.indexOf("zoom")>-1}function ry(ce){return!!ce.expression&&ce.expression.interpolated}function Wf(ce){return ce instanceof Number?"number":ce instanceof String?"string":ce instanceof Boolean?"boolean":Array.isArray(ce)?"array":ce===null?"null":typeof ce}function E0(ce){return typeof ce=="object"&&ce!==null&&!Array.isArray(ce)}function B1(ce){return ce}function My(ce,Y){const ye=Y.type==="color",He=ce.stops&&typeof ce.stops[0][0]=="object",lt=He||!(He||ce.property!==void 0),Ct=ce.type||(ry(Y)?"exponential":"interval");if(ye||Y.type==="padding"){const hn=ye?Kr.parse:Ci.parse;(ce=Ue({},ce)).stops&&(ce.stops=ce.stops.map(wn=>[wn[0],hn(wn[1])])),ce.default=hn(ce.default?ce.default:Y.default)}if(ce.colorSpace&&(It=ce.colorSpace)!=="rgb"&&It!=="hcl"&&It!=="lab")throw new Error(`Unknown color space: "${ce.colorSpace}"`);var It;let nr,xr,Vr;if(Ct==="exponential")nr=ky;else if(Ct==="interval")nr=Av;else if(Ct==="categorical"){nr=Ry,xr=Object.create(null);for(const hn of ce.stops)xr[hn[0]]=hn[1];Vr=typeof ce.stops[0][0]}else{if(Ct!=="identity")throw new Error(`Unknown function type "${Ct}"`);nr=uh}if(He){const hn={},wn=[];for(let Di=0;Di<ce.stops.length;Di++){const Xi=ce.stops[Di],ya=Xi[0].zoom;hn[ya]===void 0&&(hn[ya]={zoom:ya,type:ce.type,property:ce.property,default:ce.default,stops:[]},wn.push(ya)),hn[ya].stops.push([Xi[0].value,Xi[1]])}const Zn=[];for(const Di of wn)Zn.push([hn[Di].zoom,My(hn[Di],Y)]);const hi={name:"linear"};return{kind:"composite",interpolationType:hi,interpolationFactor:bu.interpolationFactor.bind(void 0,hi),zoomStops:Zn.map(Di=>Di[0]),evaluate:({zoom:Di},Xi)=>ky({stops:Zn,base:ce.base},Y,Di).evaluate(Di,Xi)}}if(lt){const hn=Ct==="exponential"?{name:"exponential",base:ce.base!==void 0?ce.base:1}:null;return{kind:"camera",interpolationType:hn,interpolationFactor:bu.interpolationFactor.bind(void 0,hn),zoomStops:ce.stops.map(wn=>wn[0]),evaluate:({zoom:wn})=>nr(ce,Y,wn,xr,Vr)}}return{kind:"source",evaluate(hn,wn){const Zn=wn&&wn.properties?wn.properties[ce.property]:void 0;return Zn===void 0?s0(ce.default,Y.default):nr(ce,Y,Zn,xr,Vr)}}}function s0(ce,Y,ye){return ce!==void 0?ce:Y!==void 0?Y:ye!==void 0?ye:void 0}function Ry(ce,Y,ye,He,lt){return s0(typeof ye===lt?He[ye]:void 0,ce.default,Y.default)}function Av(ce,Y,ye){if(Wf(ye)!=="number")return s0(ce.default,Y.default);const He=ce.stops.length;if(He===1||ye<=ce.stops[0][0])return ce.stops[0][1];if(ye>=ce.stops[He-1][0])return ce.stops[He-1][1];const lt=ji(ce.stops.map(Ct=>Ct[0]),ye);return ce.stops[lt][1]}function ky(ce,Y,ye){const He=ce.base!==void 0?ce.base:1;if(Wf(ye)!=="number")return s0(ce.default,Y.default);const lt=ce.stops.length;if(lt===1||ye<=ce.stops[0][0])return ce.stops[0][1];if(ye>=ce.stops[lt-1][0])return ce.stops[lt-1][1];const Ct=ji(ce.stops.map(hn=>hn[0]),ye),It=(function(hn,wn,Zn,hi){const Di=hi-Zn,Xi=hn-Zn;return Di===0?0:wn===1?Xi/Di:(Math.pow(wn,Xi)-1)/(Math.pow(wn,Di)-1)})(ye,He,ce.stops[Ct][0],ce.stops[Ct+1][0]),nr=ce.stops[Ct][1],xr=ce.stops[Ct+1][1],Vr=iu[Y.type]||B1;return typeof nr.evaluate=="function"?{evaluate(...hn){const wn=nr.evaluate.apply(void 0,hn),Zn=xr.evaluate.apply(void 0,hn);if(wn!==void 0&&Zn!==void 0)return Vr(wn,Zn,It,ce.colorSpace)}}:Vr(nr,xr,It,ce.colorSpace)}function uh(ce,Y,ye){switch(Y.type){case"color":ye=Kr.parse(ye);break;case"formatted":ye=aa.fromString(ye.toString());break;case"resolvedImage":ye=ro.fromString(ye.toString());break;case"padding":ye=Ci.parse(ye);break;default:Wf(ye)===Y.type||Y.type==="enum"&&Y.values[ye]||(ye=void 0)}return s0(ye,ce.default,Y.default)}up.register(a0,{error:[{kind:"error"},[kr],(ce,[Y])=>{throw new ei(Y.evaluate(ce))}],typeof:[kr,[kn],(ce,[Y])=>Ot(vr(Y.evaluate(ce)))],"to-rgba":[St(Ut,4),[$r],(ce,[Y])=>{const[ye,He,lt,Ct]=Y.evaluate(ce).rgb;return[255*ye,255*He,255*lt,Ct]}],rgb:[$r,[Ut,Ut,Ut],s1],rgba:[$r,[Ut,Ut,Ut,Ut],s1],has:{type:Pr,overloads:[[[kr],(ce,[Y])=>Ay(Y.evaluate(ce),ce.properties())],[[kr,rn],(ce,[Y,ye])=>Ay(Y.evaluate(ce),ye.evaluate(ce))]]},get:{type:kn,overloads:[[[kr],(ce,[Y])=>o0(Y.evaluate(ce),ce.properties())],[[kr,rn],(ce,[Y,ye])=>o0(Y.evaluate(ce),ye.evaluate(ce))]]},"feature-state":[kn,[kr],(ce,[Y])=>o0(Y.evaluate(ce),ce.featureState||{})],properties:[rn,[],ce=>ce.properties()],"geometry-type":[kr,[],ce=>ce.geometryType()],id:[kn,[],ce=>ce.id()],zoom:[Ut,[],ce=>ce.globals.zoom],"heatmap-density":[Ut,[],ce=>ce.globals.heatmapDensity||0],"line-progress":[Ut,[],ce=>ce.globals.lineProgress||0],accumulated:[kn,[],ce=>ce.globals.accumulated===void 0?null:ce.globals.accumulated],"+":[Ut,lg(Ut),(ce,Y)=>{let ye=0;for(const He of Y)ye+=He.evaluate(ce);return ye}],"*":[Ut,lg(Ut),(ce,Y)=>{let ye=1;for(const He of Y)ye*=He.evaluate(ce);return ye}],"-":{type:Ut,overloads:[[[Ut,Ut],(ce,[Y,ye])=>Y.evaluate(ce)-ye.evaluate(ce)],[[Ut],(ce,[Y])=>-Y.evaluate(ce)]]},"/":[Ut,[Ut,Ut],(ce,[Y,ye])=>Y.evaluate(ce)/ye.evaluate(ce)],"%":[Ut,[Ut,Ut],(ce,[Y,ye])=>Y.evaluate(ce)%ye.evaluate(ce)],ln2:[Ut,[],()=>Math.LN2],pi:[Ut,[],()=>Math.PI],e:[Ut,[],()=>Math.E],"^":[Ut,[Ut,Ut],(ce,[Y,ye])=>Math.pow(Y.evaluate(ce),ye.evaluate(ce))],sqrt:[Ut,[Ut],(ce,[Y])=>Math.sqrt(Y.evaluate(ce))],log10:[Ut,[Ut],(ce,[Y])=>Math.log(Y.evaluate(ce))/Math.LN10],ln:[Ut,[Ut],(ce,[Y])=>Math.log(Y.evaluate(ce))],log2:[Ut,[Ut],(ce,[Y])=>Math.log(Y.evaluate(ce))/Math.LN2],sin:[Ut,[Ut],(ce,[Y])=>Math.sin(Y.evaluate(ce))],cos:[Ut,[Ut],(ce,[Y])=>Math.cos(Y.evaluate(ce))],tan:[Ut,[Ut],(ce,[Y])=>Math.tan(Y.evaluate(ce))],asin:[Ut,[Ut],(ce,[Y])=>Math.asin(Y.evaluate(ce))],acos:[Ut,[Ut],(ce,[Y])=>Math.acos(Y.evaluate(ce))],atan:[Ut,[Ut],(ce,[Y])=>Math.atan(Y.evaluate(ce))],min:[Ut,lg(Ut),(ce,Y)=>Math.min(...Y.map(ye=>ye.evaluate(ce)))],max:[Ut,lg(Ut),(ce,Y)=>Math.max(...Y.map(ye=>ye.evaluate(ce)))],abs:[Ut,[Ut],(ce,[Y])=>Math.abs(Y.evaluate(ce))],round:[Ut,[Ut],(ce,[Y])=>{const ye=Y.evaluate(ce);return ye<0?-Math.round(-ye):Math.round(ye)}],floor:[Ut,[Ut],(ce,[Y])=>Math.floor(Y.evaluate(ce))],ceil:[Ut,[Ut],(ce,[Y])=>Math.ceil(Y.evaluate(ce))],"filter-==":[Pr,[kr,kn],(ce,[Y,ye])=>ce.properties()[Y.value]===ye.value],"filter-id-==":[Pr,[kn],(ce,[Y])=>ce.id()===Y.value],"filter-type-==":[Pr,[kr],(ce,[Y])=>ce.geometryType()===Y.value],"filter-<":[Pr,[kr,kn],(ce,[Y,ye])=>{const He=ce.properties()[Y.value],lt=ye.value;return typeof He==typeof lt&&He<lt}],"filter-id-<":[Pr,[kn],(ce,[Y])=>{const ye=ce.id(),He=Y.value;return typeof ye==typeof He&&ye<He}],"filter->":[Pr,[kr,kn],(ce,[Y,ye])=>{const He=ce.properties()[Y.value],lt=ye.value;return typeof He==typeof lt&&He>lt}],"filter-id->":[Pr,[kn],(ce,[Y])=>{const ye=ce.id(),He=Y.value;return typeof ye==typeof He&&ye>He}],"filter-<=":[Pr,[kr,kn],(ce,[Y,ye])=>{const He=ce.properties()[Y.value],lt=ye.value;return typeof He==typeof lt&&He<=lt}],"filter-id-<=":[Pr,[kn],(ce,[Y])=>{const ye=ce.id(),He=Y.value;return typeof ye==typeof He&&ye<=He}],"filter->=":[Pr,[kr,kn],(ce,[Y,ye])=>{const He=ce.properties()[Y.value],lt=ye.value;return typeof He==typeof lt&&He>=lt}],"filter-id->=":[Pr,[kn],(ce,[Y])=>{const ye=ce.id(),He=Y.value;return typeof ye==typeof He&&ye>=He}],"filter-has":[Pr,[kn],(ce,[Y])=>Y.value in ce.properties()],"filter-has-id":[Pr,[],ce=>ce.id()!==null&&ce.id()!==void 0],"filter-type-in":[Pr,[St(kr)],(ce,[Y])=>Y.value.indexOf(ce.geometryType())>=0],"filter-id-in":[Pr,[St(kn)],(ce,[Y])=>Y.value.indexOf(ce.id())>=0],"filter-in-small":[Pr,[kr,St(kn)],(ce,[Y,ye])=>ye.value.indexOf(ce.properties()[Y.value])>=0],"filter-in-large":[Pr,[kr,St(kn)],(ce,[Y,ye])=>(function(He,lt,Ct,It){for(;Ct<=It;){const nr=Ct+It>>1;if(lt[nr]===He)return!0;lt[nr]>He?It=nr-1:Ct=nr+1}return!1})(ce.properties()[Y.value],ye.value,0,ye.value.length-1)],all:{type:Pr,overloads:[[[Pr,Pr],(ce,[Y,ye])=>Y.evaluate(ce)&&ye.evaluate(ce)],[lg(Pr),(ce,Y)=>{for(const ye of Y)if(!ye.evaluate(ce))return!1;return!0}]]},any:{type:Pr,overloads:[[[Pr,Pr],(ce,[Y,ye])=>Y.evaluate(ce)||ye.evaluate(ce)],[lg(Pr),(ce,Y)=>{for(const ye of Y)if(ye.evaluate(ce))return!0;return!1}]]},"!":[Pr,[Pr],(ce,[Y])=>!Y.evaluate(ce)],"is-supported-script":[Pr,[kr],(ce,[Y])=>{const ye=ce.globals&&ce.globals.isSupportedScript;return!ye||ye(Y.evaluate(ce))}],upcase:[kr,[kr],(ce,[Y])=>Y.evaluate(ce).toUpperCase()],downcase:[kr,[kr],(ce,[Y])=>Y.evaluate(ce).toLowerCase()],concat:[kr,lg(kn),(ce,Y)=>Y.map(ye=>er(ye.evaluate(ce))).join("")],"resolved-locale":[kr,[Rn],(ce,[Y])=>Y.evaluate(ce).resolvedLocale()]});class Cv{constructor(Y,ye){var He;this.expression=Y,this._warningHistory={},this._evaluator=new Ri,this._defaultValue=ye?(He=ye).type==="color"&&E0(He.default)?new Kr(0,0,0,0):He.type==="color"?Kr.parse(He.default)||null:He.type==="padding"?Ci.parse(He.default)||null:He.type==="variableAnchorOffsetCollection"?Na.parse(He.default)||null:He.default===void 0?null:He.default:null,this._enumValues=ye&&ye.type==="enum"?ye.values:null}evaluateWithoutErrorHandling(Y,ye,He,lt,Ct,It){return this._evaluator.globals=Y,this._evaluator.feature=ye,this._evaluator.featureState=He,this._evaluator.canonical=lt,this._evaluator.availableImages=Ct||null,this._evaluator.formattedSection=It,this.expression.evaluate(this._evaluator)}evaluate(Y,ye,He,lt,Ct,It){this._evaluator.globals=Y,this._evaluator.feature=ye||null,this._evaluator.featureState=He||null,this._evaluator.canonical=lt,this._evaluator.availableImages=Ct||null,this._evaluator.formattedSection=It||null;try{const nr=this.expression.evaluate(this._evaluator);if(nr==null||typeof nr=="number"&&nr!=nr)return this._defaultValue;if(this._enumValues&&!(nr in this._enumValues))throw new ei(`Expected value to be one of ${Object.keys(this._enumValues).map(xr=>JSON.stringify(xr)).join(", ")}, but found ${JSON.stringify(nr)} instead.`);return nr}catch(nr){return this._warningHistory[nr.message]||(this._warningHistory[nr.message]=!0,typeof console<"u"&&console.warn(nr.message)),this._defaultValue}}}function ug(ce){return Array.isArray(ce)&&ce.length>0&&typeof ce[0]=="string"&&ce[0]in a0}function bd(ce,Y){const ye=new $i(a0,ey,[],Y?(function(lt){const Ct={color:$r,string:kr,number:Ut,enum:kr,boolean:Pr,formatted:ci,padding:In,resolvedImage:Gn,variableAnchorOffsetCollection:mr};return lt.type==="array"?St(Ct[lt.value]||kn,lt.length):Ct[lt.type]})(Y):void 0),He=ye.parse(ce,void 0,void 0,void 0,Y&&Y.type==="string"?{typeAnnotation:"coerce"}:void 0);return He?Vm(new Cv(He,Y)):_m(ye.errors)}class qm{constructor(Y,ye){this.kind=Y,this._styleExpression=ye,this.isStateDependent=Y!=="constant"&&!um(ye.expression)}evaluateWithoutErrorHandling(Y,ye,He,lt,Ct,It){return this._styleExpression.evaluateWithoutErrorHandling(Y,ye,He,lt,Ct,It)}evaluate(Y,ye,He,lt,Ct,It){return this._styleExpression.evaluate(Y,ye,He,lt,Ct,It)}}class tv{constructor(Y,ye,He,lt){this.kind=Y,this.zoomStops=He,this._styleExpression=ye,this.isStateDependent=Y!=="camera"&&!um(ye.expression),this.interpolationType=lt}evaluateWithoutErrorHandling(Y,ye,He,lt,Ct,It){return this._styleExpression.evaluateWithoutErrorHandling(Y,ye,He,lt,Ct,It)}evaluate(Y,ye,He,lt,Ct,It){return this._styleExpression.evaluate(Y,ye,He,lt,Ct,It)}interpolationFactor(Y,ye,He){return this.interpolationType?bu.interpolationFactor(this.interpolationType,Y,ye,He):0}}function Mv(ce,Y){const ye=bd(ce,Y);if(ye.result==="error")return ye;const He=ye.value.expression,lt=ty(He);if(!lt&&!cp(Y))return _m([new xt("","data expressions not supported")]);const Ct=Cy(He,["zoom"]);if(!Ct&&!Rg(Y))return _m([new xt("","zoom expressions not supported")]);const It=Yg(He);return It||Ct?It instanceof xt?_m([It]):It instanceof bu&&!ry(Y)?_m([new xt("",'"interpolate" expressions cannot be used with this property')]):Vm(It?new tv(lt?"camera":"composite",ye.value,It.labels,It instanceof bu?It.interpolation:void 0):new qm(lt?"constant":"source",ye.value)):_m([new xt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Ud{constructor(Y,ye){this._parameters=Y,this._specification=ye,Ue(this,My(this._parameters,this._specification))}static deserialize(Y){return new Ud(Y._parameters,Y._specification)}static serialize(Y){return{_parameters:Y._parameters,_specification:Y._specification}}}function Yg(ce){let Y=null;if(ce instanceof Hi)Y=Yg(ce.result);else if(ce instanceof ql){for(const ye of ce.args)if(Y=Yg(ye),Y)break}else(ce instanceof Ea||ce instanceof bu)&&ce.input instanceof up&&ce.input.name==="zoom"&&(Y=ce);return Y instanceof xt||ce.eachChild(ye=>{const He=Yg(ye);He instanceof xt?Y=He:!Y&&He?Y=new xt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):Y&&He&&Y!==He&&(Y=new xt("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),Y}function wm(ce){if(ce===!0||ce===!1)return!0;if(!Array.isArray(ce)||ce.length===0)return!1;switch(ce[0]){case"has":return ce.length>=2&&ce[1]!=="$id"&&ce[1]!=="$type";case"in":return ce.length>=3&&(typeof ce[1]!="string"||Array.isArray(ce[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return ce.length!==3||Array.isArray(ce[1])||Array.isArray(ce[2]);case"any":case"all":for(const Y of ce.slice(1))if(!wm(Y)&&typeof Y!="boolean")return!1;return!0;default:return!0}}const cg={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function A0(ce){if(ce==null)return{filter:()=>!0,needGeometry:!1};wm(ce)||(ce=Xg(ce));const Y=bd(ce,cg);if(Y.result==="error")throw new Error(Y.value.map(ye=>`${ye.key}: ${ye.message}`).join(", "));return{filter:(ye,He,lt)=>Y.value.evaluate(ye,He,{},lt),needGeometry:Qb(ce)}}function U1(ce,Y){return ce<Y?-1:ce>Y?1:0}function Qb(ce){if(!Array.isArray(ce))return!1;if(ce[0]==="within"||ce[0]==="distance")return!0;for(let Y=1;Y<ce.length;Y++)if(Qb(ce[Y]))return!0;return!1}function Xg(ce){if(!ce)return!0;const Y=ce[0];return ce.length<=1?Y!=="any":Y==="=="?C0(ce[1],ce[2],"=="):Y==="!="?Tp(C0(ce[1],ce[2],"==")):Y==="<"||Y===">"||Y==="<="||Y===">="?C0(ce[1],ce[2],Y):Y==="any"?(ye=ce.slice(1),["any"].concat(ye.map(Xg))):Y==="all"?["all"].concat(ce.slice(1).map(Xg)):Y==="none"?["all"].concat(ce.slice(1).map(Xg).map(Tp)):Y==="in"?Uv(ce[1],ce.slice(2)):Y==="!in"?Tp(Uv(ce[1],ce.slice(2))):Y==="has"?M0(ce[1]):Y!=="!has"||Tp(M0(ce[1]));var ye}function C0(ce,Y,ye){switch(ce){case"$type":return[`filter-type-${ye}`,Y];case"$id":return[`filter-id-${ye}`,Y];default:return[`filter-${ye}`,ce,Y]}}function Uv(ce,Y){if(Y.length===0)return!1;switch(ce){case"$type":return["filter-type-in",["literal",Y]];case"$id":return["filter-id-in",["literal",Y]];default:return Y.length>200&&!Y.some(ye=>typeof ye!=typeof Y[0])?["filter-in-large",ce,["literal",Y.sort(U1)]]:["filter-in-small",ce,["literal",Y]]}}function M0(ce){switch(ce){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",ce]}}function Tp(ce){return["!",ce]}function Zg(ce){const Y=typeof ce;if(Y==="number"||Y==="boolean"||Y==="string"||ce==null)return JSON.stringify(ce);if(Array.isArray(ce)){let lt="[";for(const Ct of ce)lt+=`${Zg(Ct)},`;return`${lt}]`}const ye=Object.keys(ce).sort();let He="{";for(let lt=0;lt<ye.length;lt++)He+=`${JSON.stringify(ye[lt])}:${Zg(ce[ye[lt]])},`;return`${He}}`}function Iy(ce){let Y="";for(const ye of Be)Y+=`/${Zg(ce[ye])}`;return Y}function Kg(ce){const Y=ce.value;return Y?[new rt(ce.key,Y,"constants have been deprecated as of v8")]:[]}function Rd(ce){return ce instanceof Number||ce instanceof String||ce instanceof Boolean?ce.valueOf():ce}function Rv(ce){if(Array.isArray(ce))return ce.map(Rv);if(ce instanceof Object&&!(ce instanceof Number||ce instanceof String||ce instanceof Boolean)){const Y={};for(const ye in ce)Y[ye]=Rv(ce[ye]);return Y}return Rd(ce)}function cm(ce){const Y=ce.key,ye=ce.value,He=ce.valueSpec||{},lt=ce.objectElementValidators||{},Ct=ce.style,It=ce.styleSpec,nr=ce.validateSpec;let xr=[];const Vr=Wf(ye);if(Vr!=="object")return[new rt(Y,ye,`object expected, ${Vr} found`)];for(const hn in ye){const wn=hn.split(".")[0],Zn=He[wn]||He["*"];let hi;if(lt[wn])hi=lt[wn];else if(He[wn])hi=nr;else if(lt["*"])hi=lt["*"];else{if(!He["*"]){xr.push(new rt(Y,ye[hn],`unknown property "${hn}"`));continue}hi=nr}xr=xr.concat(hi({key:(Y&&`${Y}.`)+hn,value:ye[hn],valueSpec:Zn,style:Ct,styleSpec:It,object:ye,objectKey:hn,validateSpec:nr},ye))}for(const hn in He)lt[hn]||He[hn].required&&He[hn].default===void 0&&ye[hn]===void 0&&xr.push(new rt(Y,ye,`missing required property "${hn}"`));return xr}function ny(ce){const Y=ce.value,ye=ce.valueSpec,He=ce.style,lt=ce.styleSpec,Ct=ce.key,It=ce.arrayElementValidator||ce.validateSpec;if(Wf(Y)!=="array")return[new rt(Ct,Y,`array expected, ${Wf(Y)} found`)];if(ye.length&&Y.length!==ye.length)return[new rt(Ct,Y,`array length ${ye.length} expected, length ${Y.length} found`)];if(ye["min-length"]&&Y.length<ye["min-length"])return[new rt(Ct,Y,`array length at least ${ye["min-length"]} expected, length ${Y.length} found`)];let nr={type:ye.value,values:ye.values};lt.$version<7&&(nr.function=ye.function),Wf(ye.value)==="object"&&(nr=ye.value);let xr=[];for(let Vr=0;Vr<Y.length;Vr++)xr=xr.concat(It({array:Y,arrayIndex:Vr,value:Y[Vr],valueSpec:nr,validateSpec:ce.validateSpec,style:He,styleSpec:lt,key:`${Ct}[${Vr}]`}));return xr}function Ld(ce){const Y=ce.key,ye=ce.value,He=ce.valueSpec;let lt=Wf(ye);return lt==="number"&&ye!=ye&&(lt="NaN"),lt!=="number"?[new rt(Y,ye,`number expected, ${lt} found`)]:"minimum"in He&&ye<He.minimum?[new rt(Y,ye,`${ye} is less than the minimum value ${He.minimum}`)]:"maximum"in He&&ye>He.maximum?[new rt(Y,ye,`${ye} is greater than the maximum value ${He.maximum}`)]:[]}function l0(ce){const Y=ce.valueSpec,ye=Rd(ce.value.type);let He,lt,Ct,It={};const nr=ye!=="categorical"&&ce.value.property===void 0,xr=!nr,Vr=Wf(ce.value.stops)==="array"&&Wf(ce.value.stops[0])==="array"&&Wf(ce.value.stops[0][0])==="object",hn=cm({key:ce.key,value:ce.value,valueSpec:ce.styleSpec.function,validateSpec:ce.validateSpec,style:ce.style,styleSpec:ce.styleSpec,objectElementValidators:{stops:function(hi){if(ye==="identity")return[new rt(hi.key,hi.value,'identity function may not have a "stops" property')];let Di=[];const Xi=hi.value;return Di=Di.concat(ny({key:hi.key,value:Xi,valueSpec:hi.valueSpec,validateSpec:hi.validateSpec,style:hi.style,styleSpec:hi.styleSpec,arrayElementValidator:wn})),Wf(Xi)==="array"&&Xi.length===0&&Di.push(new rt(hi.key,Xi,"array must have at least one stop")),Di},default:function(hi){return hi.validateSpec({key:hi.key,value:hi.value,valueSpec:Y,validateSpec:hi.validateSpec,style:hi.style,styleSpec:hi.styleSpec})}}});return ye==="identity"&&nr&&hn.push(new rt(ce.key,ce.value,'missing required property "property"')),ye==="identity"||ce.value.stops||hn.push(new rt(ce.key,ce.value,'missing required property "stops"')),ye==="exponential"&&ce.valueSpec.expression&&!ry(ce.valueSpec)&&hn.push(new rt(ce.key,ce.value,"exponential functions not supported")),ce.styleSpec.$version>=8&&(xr&&!cp(ce.valueSpec)?hn.push(new rt(ce.key,ce.value,"property functions not supported")):nr&&!Rg(ce.valueSpec)&&hn.push(new rt(ce.key,ce.value,"zoom functions not supported"))),ye!=="categorical"&&!Vr||ce.value.property!==void 0||hn.push(new rt(ce.key,ce.value,'"property" property is required')),hn;function wn(hi){let Di=[];const Xi=hi.value,ya=hi.key;if(Wf(Xi)!=="array")return[new rt(ya,Xi,`array expected, ${Wf(Xi)} found`)];if(Xi.length!==2)return[new rt(ya,Xi,`array length 2 expected, length ${Xi.length} found`)];if(Vr){if(Wf(Xi[0])!=="object")return[new rt(ya,Xi,`object expected, ${Wf(Xi[0])} found`)];if(Xi[0].zoom===void 0)return[new rt(ya,Xi,"object stop key must have zoom")];if(Xi[0].value===void 0)return[new rt(ya,Xi,"object stop key must have value")];if(Ct&&Ct>Rd(Xi[0].zoom))return[new rt(ya,Xi[0].zoom,"stop zoom values must appear in ascending order")];Rd(Xi[0].zoom)!==Ct&&(Ct=Rd(Xi[0].zoom),lt=void 0,It={}),Di=Di.concat(cm({key:`${ya}[0]`,value:Xi[0],valueSpec:{zoom:{}},validateSpec:hi.validateSpec,style:hi.style,styleSpec:hi.styleSpec,objectElementValidators:{zoom:Ld,value:Zn}}))}else Di=Di.concat(Zn({key:`${ya}[0]`,value:Xi[0],validateSpec:hi.validateSpec,style:hi.style,styleSpec:hi.styleSpec},Xi));return ug(Rv(Xi[1]))?Di.concat([new rt(`${ya}[1]`,Xi[1],"expressions are not allowed in function stops.")]):Di.concat(hi.validateSpec({key:`${ya}[1]`,value:Xi[1],valueSpec:Y,validateSpec:hi.validateSpec,style:hi.style,styleSpec:hi.styleSpec}))}function Zn(hi,Di){const Xi=Wf(hi.value),ya=Rd(hi.value),eo=hi.value!==null?hi.value:Di;if(He){if(Xi!==He)return[new rt(hi.key,eo,`${Xi} stop domain type must match previous stop domain type ${He}`)]}else He=Xi;if(Xi!=="number"&&Xi!=="string"&&Xi!=="boolean")return[new rt(hi.key,eo,"stop domain value must be a number, string, or boolean")];if(Xi!=="number"&&ye!=="categorical"){let us=`number expected, ${Xi} found`;return cp(Y)&&ye===void 0&&(us+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new rt(hi.key,eo,us)]}return ye!=="categorical"||Xi!=="number"||isFinite(ya)&&Math.floor(ya)===ya?ye!=="categorical"&&Xi==="number"&&lt!==void 0&&ya<lt?[new rt(hi.key,eo,"stop domain values must appear in ascending order")]:(lt=ya,ye==="categorical"&&ya in It?[new rt(hi.key,eo,"stop domain values must be unique")]:(It[ya]=!0,[])):[new rt(hi.key,eo,`integer expected, found ${ya}`)]}}function fg(ce){const Y=(ce.expressionContext==="property"?Mv:bd)(Rv(ce.value),ce.valueSpec);if(Y.result==="error")return Y.value.map(He=>new rt(`${ce.key}${He.key}`,ce.value,He.message));const ye=Y.value.expression||Y.value._styleExpression.expression;if(ce.expressionContext==="property"&&ce.propertyKey==="text-font"&&!ye.outputDefined())return[new rt(ce.key,ce.value,`Invalid data expression for "${ce.propertyKey}". Output values must be contained as literals within the expression.`)];if(ce.expressionContext==="property"&&ce.propertyType==="layout"&&!um(ye))return[new rt(ce.key,ce.value,'"feature-state" data expressions are not supported with layout properties.')];if(ce.expressionContext==="filter"&&!um(ye))return[new rt(ce.key,ce.value,'"feature-state" data expressions are not supported with filters.')];if(ce.expressionContext&&ce.expressionContext.indexOf("cluster")===0){if(!Cy(ye,["zoom","feature-state"]))return[new rt(ce.key,ce.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(ce.expressionContext==="cluster-initial"&&!ty(ye))return[new rt(ce.key,ce.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Hv(ce){const Y=ce.key,ye=ce.value,He=ce.valueSpec,lt=[];return Array.isArray(He.values)?He.values.indexOf(Rd(ye))===-1&&lt.push(new rt(Y,ye,`expected one of [${He.values.join(", ")}], ${JSON.stringify(ye)} found`)):Object.keys(He.values).indexOf(Rd(ye))===-1&&lt.push(new rt(Y,ye,`expected one of [${Object.keys(He.values).join(", ")}], ${JSON.stringify(ye)} found`)),lt}function u0(ce){return wm(Rv(ce.value))?fg(Ue({},ce,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Sm(ce)}function Sm(ce){const Y=ce.value,ye=ce.key;if(Wf(Y)!=="array")return[new rt(ye,Y,`array expected, ${Wf(Y)} found`)];const He=ce.styleSpec;let lt,Ct=[];if(Y.length<1)return[new rt(ye,Y,"filter array must have at least 1 element")];switch(Ct=Ct.concat(Hv({key:`${ye}[0]`,value:Y[0],valueSpec:He.filter_operator,style:ce.style,styleSpec:ce.styleSpec})),Rd(Y[0])){case"<":case"<=":case">":case">=":Y.length>=2&&Rd(Y[1])==="$type"&&Ct.push(new rt(ye,Y,`"$type" cannot be use with operator "${Y[0]}"`));case"==":case"!=":Y.length!==3&&Ct.push(new rt(ye,Y,`filter array for operator "${Y[0]}" must have 3 elements`));case"in":case"!in":Y.length>=2&&(lt=Wf(Y[1]),lt!=="string"&&Ct.push(new rt(`${ye}[1]`,Y[1],`string expected, ${lt} found`)));for(let It=2;It<Y.length;It++)lt=Wf(Y[It]),Rd(Y[1])==="$type"?Ct=Ct.concat(Hv({key:`${ye}[${It}]`,value:Y[It],valueSpec:He.geometry_type,style:ce.style,styleSpec:ce.styleSpec})):lt!=="string"&&lt!=="number"&&lt!=="boolean"&&Ct.push(new rt(`${ye}[${It}]`,Y[It],`string, number, or boolean expected, ${lt} found`));break;case"any":case"all":case"none":for(let It=1;It<Y.length;It++)Ct=Ct.concat(Sm({key:`${ye}[${It}]`,value:Y[It],style:ce.style,styleSpec:ce.styleSpec}));break;case"has":case"!has":lt=Wf(Y[1]),Y.length!==2?Ct.push(new rt(ye,Y,`filter array for "${Y[0]}" operator must have 2 elements`)):lt!=="string"&&Ct.push(new rt(`${ye}[1]`,Y[1],`string expected, ${lt} found`))}return Ct}function c0(ce,Y){const ye=ce.key,He=ce.validateSpec,lt=ce.style,Ct=ce.styleSpec,It=ce.value,nr=ce.objectKey,xr=Ct[`${Y}_${ce.layerType}`];if(!xr)return[];const Vr=nr.match(/^(.*)-transition$/);if(Y==="paint"&&Vr&&xr[Vr[1]]&&xr[Vr[1]].transition)return He({key:ye,value:It,valueSpec:Ct.transition,style:lt,styleSpec:Ct});const hn=ce.valueSpec||xr[nr];if(!hn)return[new rt(ye,It,`unknown property "${nr}"`)];let wn;if(Wf(It)==="string"&&cp(hn)&&!hn.tokens&&(wn=/^{([^}]+)}$/.exec(It)))return[new rt(ye,It,`"${nr}" does not support interpolation syntax
Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(wn[1])} }\`.`)];const Zn=[];return ce.layerType==="symbol"&&(nr==="text-field"&&lt&&!lt.glyphs&&Zn.push(new rt(ye,It,'use of "text-field" requires a style "glyphs" property')),nr==="text-font"&&E0(Rv(It))&&Rd(It.type)==="identity"&&Zn.push(new rt(ye,It,'"text-font" does not support identity functions'))),Zn.concat(He({key:ce.key,value:It,valueSpec:hn,style:lt,styleSpec:Ct,expressionContext:"property",propertyType:Y,propertyKey:nr}))}function H1(ce){return c0(ce,"paint")}function Np(ce){return c0(ce,"layout")}function Py(ce){let Y=[];const ye=ce.value,He=ce.key,lt=ce.style,Ct=ce.styleSpec;ye.type||ye.ref||Y.push(new rt(He,ye,'either "type" or "ref" is required'));let It=Rd(ye.type);const nr=Rd(ye.ref);if(ye.id){const xr=Rd(ye.id);for(let Vr=0;Vr<ce.arrayIndex;Vr++){const hn=lt.layers[Vr];Rd(hn.id)===xr&&Y.push(new rt(He,ye.id,`duplicate layer id "${ye.id}", previously used at line ${hn.id.__line__}`))}}if("ref"in ye){let xr;["type","source","source-layer","filter","layout"].forEach(Vr=>{Vr in ye&&Y.push(new rt(He,ye[Vr],`"${Vr}" is prohibited for ref layers`))}),lt.layers.forEach(Vr=>{Rd(Vr.id)===nr&&(xr=Vr)}),xr?xr.ref?Y.push(new rt(He,ye.ref,"ref cannot reference another ref layer")):It=Rd(xr.type):Y.push(new rt(He,ye.ref,`ref layer "${nr}" not found`))}else if(It!=="background")if(ye.source){const xr=lt.sources&&lt.sources[ye.source],Vr=xr&&Rd(xr.type);xr?Vr==="vector"&&It==="raster"?Y.push(new rt(He,ye.source,`layer "${ye.id}" requires a raster source`)):Vr!=="raster-dem"&&It==="hillshade"?Y.push(new rt(He,ye.source,`layer "${ye.id}" requires a raster-dem source`)):Vr==="raster"&&It!=="raster"?Y.push(new rt(He,ye.source,`layer "${ye.id}" requires a vector source`)):Vr!=="vector"||ye["source-layer"]?Vr==="raster-dem"&&It!=="hillshade"?Y.push(new rt(He,ye.source,"raster-dem source can only be used with layer type 'hillshade'.")):It!=="line"||!ye.paint||!ye.paint["line-gradient"]||Vr==="geojson"&&xr.lineMetrics||Y.push(new rt(He,ye,`layer "${ye.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):Y.push(new rt(He,ye,`layer "${ye.id}" must specify a "source-layer"`)):Y.push(new rt(He,ye.source,`source "${ye.source}" not found`))}else Y.push(new rt(He,ye,'missing required property "source"'));return Y=Y.concat(cm({key:He,value:ye,valueSpec:Ct.layer,style:ce.style,styleSpec:ce.styleSpec,validateSpec:ce.validateSpec,objectElementValidators:{"*":()=>[],type:()=>ce.validateSpec({key:`${He}.type`,value:ye.type,valueSpec:Ct.layer.type,style:ce.style,styleSpec:ce.styleSpec,validateSpec:ce.validateSpec,object:ye,objectKey:"type"}),filter:u0,layout:xr=>cm({layer:ye,key:xr.key,value:xr.value,style:xr.style,styleSpec:xr.styleSpec,validateSpec:xr.validateSpec,objectElementValidators:{"*":Vr=>Np(Ue({layerType:It},Vr))}}),paint:xr=>cm({layer:ye,key:xr.key,value:xr.value,style:xr.style,styleSpec:xr.styleSpec,validateSpec:xr.validateSpec,objectElementValidators:{"*":Vr=>H1(Ue({layerType:It},Vr))}})}})),Y}function jv(ce){const Y=ce.value,ye=ce.key,He=Wf(Y);return He!=="string"?[new rt(ye,Y,`string expected, ${He} found`)]:[]}const Gm={promoteId:function({key:ce,value:Y}){if(Wf(Y)==="string")return jv({key:ce,value:Y});{const ye=[];for(const He in Y)ye.push(...jv({key:`${ce}.${He}`,value:Y[He]}));return ye}}};function Tm(ce){const Y=ce.value,ye=ce.key,He=ce.styleSpec,lt=ce.style,Ct=ce.validateSpec;if(!Y.type)return[new rt(ye,Y,'"type" is required')];const It=Rd(Y.type);let nr;switch(It){case"vector":case"raster":return nr=cm({key:ye,value:Y,valueSpec:He[`source_${It.replace("-","_")}`],style:ce.style,styleSpec:He,objectElementValidators:Gm,validateSpec:Ct}),nr;case"raster-dem":return nr=(function(xr){var Vr;const hn=(Vr=xr.sourceName)!==null&&Vr!==void 0?Vr:"",wn=xr.value,Zn=xr.styleSpec,hi=Zn.source_raster_dem,Di=xr.style;let Xi=[];const ya=Wf(wn);if(wn===void 0)return Xi;if(ya!=="object")return Xi.push(new rt("source_raster_dem",wn,`object expected, ${ya} found`)),Xi;const eo=Rd(wn.encoding)==="custom",us=["redFactor","greenFactor","blueFactor","baseShift"],ko=xr.value.encoding?`"${xr.value.encoding}"`:"Default";for(const es in wn)!eo&&us.includes(es)?Xi.push(new rt(es,wn[es],`In "${hn}": "${es}" is only valid when "encoding" is set to "custom". ${ko} encoding found`)):hi[es]?Xi=Xi.concat(xr.validateSpec({key:es,value:wn[es],valueSpec:hi[es],validateSpec:xr.validateSpec,style:Di,styleSpec:Zn})):Xi.push(new rt(es,wn[es],`unknown property "${es}"`));return Xi})({sourceName:ye,value:Y,style:ce.style,styleSpec:He,validateSpec:Ct}),nr;case"geojson":if(nr=cm({key:ye,value:Y,valueSpec:He.source_geojson,style:lt,styleSpec:He,validateSpec:Ct,objectElementValidators:Gm}),Y.cluster)for(const xr in Y.clusterProperties){const[Vr,hn]=Y.clusterProperties[xr],wn=typeof Vr=="string"?[Vr,["accumulated"],["get",xr]]:Vr;nr.push(...fg({key:`${ye}.${xr}.map`,value:hn,expressionContext:"cluster-map"})),nr.push(...fg({key:`${ye}.${xr}.reduce`,value:wn,expressionContext:"cluster-reduce"}))}return nr;case"video":return cm({key:ye,value:Y,valueSpec:He.source_video,style:lt,validateSpec:Ct,styleSpec:He});case"image":return cm({key:ye,value:Y,valueSpec:He.source_image,style:lt,validateSpec:Ct,styleSpec:He});case"canvas":return[new rt(ye,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Hv({key:`${ye}.type`,value:Y.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function ph(ce){const Y=ce.value,ye=ce.styleSpec,He=ye.light,lt=ce.style;let Ct=[];const It=Wf(Y);if(Y===void 0)return Ct;if(It!=="object")return Ct=Ct.concat([new rt("light",Y,`object expected, ${It} found`)]),Ct;for(const nr in Y){const xr=nr.match(/^(.*)-transition$/);Ct=Ct.concat(xr&&He[xr[1]]&&He[xr[1]].transition?ce.validateSpec({key:nr,value:Y[nr],valueSpec:ye.transition,validateSpec:ce.validateSpec,style:lt,styleSpec:ye}):He[nr]?ce.validateSpec({key:nr,value:Y[nr],valueSpec:He[nr],validateSpec:ce.validateSpec,style:lt,styleSpec:ye}):[new rt(nr,Y[nr],`unknown property "${nr}"`)])}return Ct}function pv(ce){const Y=ce.value,ye=ce.styleSpec,He=ye.sky,lt=ce.style,Ct=Wf(Y);if(Y===void 0)return[];if(Ct!=="object")return[new rt("sky",Y,`object expected, ${Ct} found`)];let It=[];for(const nr in Y)It=It.concat(He[nr]?ce.validateSpec({key:nr,value:Y[nr],valueSpec:He[nr],style:lt,styleSpec:ye}):[new rt(nr,Y[nr],`unknown property "${nr}"`)]);return It}function Yd(ce){const Y=ce.value,ye=ce.styleSpec,He=ye.terrain,lt=ce.style;let Ct=[];const It=Wf(Y);if(Y===void 0)return Ct;if(It!=="object")return Ct=Ct.concat([new rt("terrain",Y,`object expected, ${It} found`)]),Ct;for(const nr in Y)Ct=Ct.concat(He[nr]?ce.validateSpec({key:nr,value:Y[nr],valueSpec:He[nr],validateSpec:ce.validateSpec,style:lt,styleSpec:ye}):[new rt(nr,Y[nr],`unknown property "${nr}"`)]);return Ct}function dg(ce){let Y=[];const ye=ce.value,He=ce.key;if(Array.isArray(ye)){const lt=[],Ct=[];for(const It in ye)ye[It].id&&lt.includes(ye[It].id)&&Y.push(new rt(He,ye,`all the sprites' ids must be unique, but ${ye[It].id} is duplicated`)),lt.push(ye[It].id),ye[It].url&&Ct.includes(ye[It].url)&&Y.push(new rt(He,ye,`all the sprites' URLs must be unique, but ${ye[It].url} is duplicated`)),Ct.push(ye[It].url),Y=Y.concat(cm({key:`${He}[${It}]`,value:ye[It],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:ce.validateSpec}));return Y}return jv({key:He,value:ye})}const Em={"*":()=>[],array:ny,boolean:function(ce){const Y=ce.value,ye=ce.key,He=Wf(Y);return He!=="boolean"?[new rt(ye,Y,`boolean expected, ${He} found`)]:[]},number:Ld,color:function(ce){const Y=ce.key,ye=ce.value,He=Wf(ye);return He!=="string"?[new rt(Y,ye,`color expected, ${He} found`)]:Kr.parse(String(ye))?[]:[new rt(Y,ye,`color expected, "${ye}" found`)]},constants:Kg,enum:Hv,filter:u0,function:l0,layer:Py,object:cm,source:Tm,light:ph,sky:pv,terrain:Yd,projection:function(ce){const Y=ce.value,ye=ce.styleSpec,He=ye.projection,lt=ce.style,Ct=Wf(Y);if(Y===void 0)return[];if(Ct!=="object")return[new rt("projection",Y,`object expected, ${Ct} found`)];let It=[];for(const nr in Y)It=It.concat(He[nr]?ce.validateSpec({key:nr,value:Y[nr],valueSpec:He[nr],style:lt,styleSpec:ye}):[new rt(nr,Y[nr],`unknown property "${nr}"`)]);return It},string:jv,formatted:function(ce){return jv(ce).length===0?[]:fg(ce)},resolvedImage:function(ce){return jv(ce).length===0?[]:fg(ce)},padding:function(ce){const Y=ce.key,ye=ce.value;if(Wf(ye)==="array"){if(ye.length<1||ye.length>4)return[new rt(Y,ye,`padding requires 1 to 4 values; ${ye.length} values found`)];const He={type:"number"};let lt=[];for(let Ct=0;Ct<ye.length;Ct++)lt=lt.concat(ce.validateSpec({key:`${Y}[${Ct}]`,value:ye[Ct],validateSpec:ce.validateSpec,valueSpec:He}));return lt}return Ld({key:Y,value:ye,valueSpec:{}})},variableAnchorOffsetCollection:function(ce){const Y=ce.key,ye=ce.value,He=Wf(ye),lt=ce.styleSpec;if(He!=="array"||ye.length<1||ye.length%2!=0)return[new rt(Y,ye,"variableAnchorOffsetCollection requires a non-empty array of even length")];let Ct=[];for(let It=0;It<ye.length;It+=2)Ct=Ct.concat(Hv({key:`${Y}[${It}]`,value:ye[It],valueSpec:lt.layout_symbol["text-anchor"]})),Ct=Ct.concat(ny({key:`${Y}[${It+1}]`,value:ye[It+1],valueSpec:{length:2,value:"number"},validateSpec:ce.validateSpec,style:ce.style,styleSpec:lt}));return Ct},sprite:dg};function iy(ce){const Y=ce.value,ye=ce.valueSpec,He=ce.styleSpec;return ce.validateSpec=iy,ye.expression&&E0(Rd(Y))?l0(ce):ye.expression&&ug(Rv(Y))?fg(ce):ye.type&&Em[ye.type]?Em[ye.type](ce):cm(Ue({},ce,{valueSpec:ye.type?He[ye.type]:ye}))}function sn(ce){const Y=ce.value,ye=ce.key,He=jv(ce);return He.length||(Y.indexOf("{fontstack}")===-1&&He.push(new rt(ye,Y,'"glyphs" url must include a "{fontstack}" token')),Y.indexOf("{range}")===-1&&He.push(new rt(ye,Y,'"glyphs" url must include a "{range}" token'))),He}function Fn(ce,Y=Te){let ye=[];return ye=ye.concat(iy({key:"",value:ce,valueSpec:Y.$root,styleSpec:Y,style:ce,validateSpec:iy,objectElementValidators:{glyphs:sn,"*":()=>[]}})),ce.constants&&(ye=ye.concat(Kg({key:"constants",value:ce.constants}))),Si(ye)}function Li(ce){return function(Y){return ce(de(ie({},Y),{validateSpec:iy}))}}function Si(ce){return[].concat(ce).sort((Y,ye)=>Y.line-ye.line)}function ma(ce){return function(...Y){return Si(ce.apply(this,Y))}}Fn.source=ma(Li(Tm)),Fn.sprite=ma(Li(dg)),Fn.glyphs=ma(Li(sn)),Fn.light=ma(Li(ph)),Fn.sky=ma(Li(pv)),Fn.terrain=ma(Li(Yd)),Fn.layer=ma(Li(Py)),Fn.filter=ma(Li(u0)),Fn.paintProperty=ma(Li(H1)),Fn.layoutProperty=ma(Li(Np));const yo=Fn,uo=yo.light,rs=yo.sky,hs=yo.paintProperty,Ws=yo.layoutProperty;function Bo(ce,Y){let ye=!1;if(Y&&Y.length)for(const He of Y)ce.fire(new se(new Error(He.message))),ye=!0;return ye}class As{constructor(Y,ye,He){const lt=this.cells=[];if(Y instanceof ArrayBuffer){this.arrayBuffer=Y;const It=new Int32Array(this.arrayBuffer);Y=It[0],this.d=(ye=It[1])+2*(He=It[2]);for(let xr=0;xr<this.d*this.d;xr++){const Vr=It[3+xr],hn=It[3+xr+1];lt.push(Vr===hn?null:It.subarray(Vr,hn))}const nr=It[3+lt.length+1];this.keys=It.subarray(It[3+lt.length],nr),this.bboxes=It.subarray(nr),this.insert=this._insertReadonly}else{this.d=ye+2*He;for(let It=0;It<this.d*this.d;It++)lt.push([]);this.keys=[],this.bboxes=[]}this.n=ye,this.extent=Y,this.padding=He,this.scale=ye/Y,this.uid=0;const Ct=He/ye*Y;this.min=-Ct,this.max=Y+Ct}insert(Y,ye,He,lt,Ct){this._forEachCell(ye,He,lt,Ct,this._insertCell,this.uid++,void 0,void 0),this.keys.push(Y),this.bboxes.push(ye),this.bboxes.push(He),this.bboxes.push(lt),this.bboxes.push(Ct)}_insertReadonly(){throw new Error("Cannot insert into a GridIndex created from an ArrayBuffer.")}_insertCell(Y,ye,He,lt,Ct,It){this.cells[Ct].push(It)}query(Y,ye,He,lt,Ct){const It=this.min,nr=this.max;if(Y<=It&&ye<=It&&nr<=He&&nr<=lt&&!Ct)return Array.prototype.slice.call(this.keys);{const xr=[];return this._forEachCell(Y,ye,He,lt,this._queryCell,xr,{},Ct),xr}}_queryCell(Y,ye,He,lt,Ct,It,nr,xr){const Vr=this.cells[Ct];if(Vr!==null){const hn=this.keys,wn=this.bboxes;for(let Zn=0;Zn<Vr.length;Zn++){const hi=Vr[Zn];if(nr[hi]===void 0){const Di=4*hi;(xr?xr(wn[Di+0],wn[Di+1],wn[Di+2],wn[Di+3]):Y<=wn[Di+2]&&ye<=wn[Di+3]&&He>=wn[Di+0]&&lt>=wn[Di+1])?(nr[hi]=!0,It.push(hn[hi])):nr[hi]=!1}}}}_forEachCell(Y,ye,He,lt,Ct,It,nr,xr){const Vr=this._convertToCellCoord(Y),hn=this._convertToCellCoord(ye),wn=this._convertToCellCoord(He),Zn=this._convertToCellCoord(lt);for(let hi=Vr;hi<=wn;hi++)for(let Di=hn;Di<=Zn;Di++){const Xi=this.d*Di+hi;if((!xr||xr(this._convertFromCellCoord(hi),this._convertFromCellCoord(Di),this._convertFromCellCoord(hi+1),this._convertFromCellCoord(Di+1)))&&Ct.call(this,Y,ye,He,lt,Xi,It,nr,xr))return}}_convertFromCellCoord(Y){return(Y-this.padding)/this.scale}_convertToCellCoord(Y){return Math.max(0,Math.min(this.d-1,Math.floor(Y*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;const Y=this.cells,ye=3+this.cells.length+1+1;let He=0;for(let It=0;It<this.cells.length;It++)He+=this.cells[It].length;const lt=new Int32Array(ye+He+this.keys.length+this.bboxes.length);lt[0]=this.extent,lt[1]=this.n,lt[2]=this.padding;let Ct=ye;for(let It=0;It<Y.length;It++){const nr=Y[It];lt[3+It]=Ct,lt.set(nr,Ct),Ct+=nr.length}return lt[3+Y.length]=Ct,lt.set(this.keys,Ct),Ct+=this.keys.length,lt[3+Y.length+1]=Ct,lt.set(this.bboxes,Ct),Ct+=this.bboxes.length,lt.buffer}static serialize(Y,ye){const He=Y.toArrayBuffer();return ye&&ye.push(He),{buffer:He}}static deserialize(Y){return new As(Y.buffer)}}const Jo={};function Io(ce,Y,ye={}){if(Jo[ce])throw new Error(`${ce} is already registered.`);Object.defineProperty(Y,"_classRegistryKey",{value:ce,writeable:!1}),Jo[ce]={klass:Y,omit:ye.omit||[],shallow:ye.shallow||[]}}Io("Object",Object),Io("TransferableGridIndex",As),Io("Color",Kr),Io("Error",Error),Io("AJAXError",Le),Io("ResolvedImage",ro),Io("StylePropertyFunction",Ud),Io("StyleExpression",Cv,{omit:["_evaluator"]}),Io("ZoomDependentExpression",tv),Io("ZoomConstantExpression",qm),Io("CompoundExpression",up,{omit:["_evaluate"]});for(const ce in a0)a0[ce]._classRegistryKey||Io(`Expression_${ce}`,a0[ce]);function ll(ce){return ce&&typeof ArrayBuffer<"u"&&(ce instanceof ArrayBuffer||ce.constructor&&ce.constructor.name==="ArrayBuffer")}function Tu(ce){return ce.$name||ce.constructor._classRegistryKey}function du(ce){return!(function(Y){if(Y===null||typeof Y!="object")return!1;const ye=Tu(Y);return!(!ye||ye==="Object")})(ce)&&(ce==null||typeof ce=="boolean"||typeof ce=="number"||typeof ce=="string"||ce instanceof Boolean||ce instanceof Number||ce instanceof String||ce instanceof Date||ce instanceof RegExp||ce instanceof Blob||ce instanceof Error||ll(ce)||K(ce)||ArrayBuffer.isView(ce)||ce instanceof ImageData)}function ku(ce,Y){if(du(ce))return(ll(ce)||K(ce))&&Y&&Y.push(ce),ArrayBuffer.isView(ce)&&Y&&Y.push(ce.buffer),ce instanceof ImageData&&Y&&Y.push(ce.data.buffer),ce;if(Array.isArray(ce)){const Ct=[];for(const It of ce)Ct.push(ku(It,Y));return Ct}if(typeof ce!="object")throw new Error("can't serialize object of type "+typeof ce);const ye=Tu(ce);if(!ye)throw new Error(`can't serialize object of unregistered class ${ce.constructor.name}`);if(!Jo[ye])throw new Error(`${ye} is not registered.`);const{klass:He}=Jo[ye],lt=He.serialize?He.serialize(ce,Y):{};if(He.serialize){if(Y&&lt===Y[Y.length-1])throw new Error("statically serialized object won't survive transfer of $name property")}else{for(const Ct in ce){if(!ce.hasOwnProperty(Ct)||Jo[ye].omit.indexOf(Ct)>=0)continue;const It=ce[Ct];lt[Ct]=Jo[ye].shallow.indexOf(Ct)>=0?It:ku(It,Y)}ce instanceof Error&&(lt.message=ce.message)}if(lt.$name)throw new Error("$name property is reserved for worker serialization logic.");return ye!=="Object"&&(lt.$name=ye),lt}function Au(ce){if(du(ce))return ce;if(Array.isArray(ce))return ce.map(Au);if(typeof ce!="object")throw new Error("can't deserialize object of type "+typeof ce);const Y=Tu(ce)||"Object";if(!Jo[Y])throw new Error(`can't deserialize unregistered class ${Y}`);const{klass:ye}=Jo[Y];if(!ye)throw new Error(`can't deserialize unregistered class ${Y}`);if(ye.deserialize)return ye.deserialize(ce);const He=Object.create(ye.prototype);for(const lt of Object.keys(ce)){if(lt==="$name")continue;const Ct=ce[lt];He[lt]=Jo[Y].shallow.indexOf(lt)>=0?Ct:Au(Ct)}return He}class cl{constructor(){this.first=!0}update(Y,ye){const He=Math.floor(Y);return this.first?(this.first=!1,this.lastIntegerZoom=He,this.lastIntegerZoomTime=0,this.lastZoom=Y,this.lastFloorZoom=He,!0):(this.lastFloorZoom>He?(this.lastIntegerZoom=He+1,this.lastIntegerZoomTime=ye):this.lastFloorZoom<He&&(this.lastIntegerZoom=He,this.lastIntegerZoomTime=ye),Y!==this.lastZoom&&(this.lastZoom=Y,this.lastFloorZoom=He,!0))}}const Os={"Latin-1 Supplement":ce=>ce>=128&&ce<=255,"Hangul Jamo":ce=>ce>=4352&&ce<=4607,Khmer:ce=>ce>=6016&&ce<=6143,"General Punctuation":ce=>ce>=8192&&ce<=8303,"Letterlike Symbols":ce=>ce>=8448&&ce<=8527,"Number Forms":ce=>ce>=8528&&ce<=8591,"Miscellaneous Technical":ce=>ce>=8960&&ce<=9215,"Control Pictures":ce=>ce>=9216&&ce<=9279,"Optical Character Recognition":ce=>ce>=9280&&ce<=9311,"Enclosed Alphanumerics":ce=>ce>=9312&&ce<=9471,"Geometric Shapes":ce=>ce>=9632&&ce<=9727,"Miscellaneous Symbols":ce=>ce>=9728&&ce<=9983,"Miscellaneous Symbols and Arrows":ce=>ce>=11008&&ce<=11263,"Ideographic Description Characters":ce=>ce>=12272&&ce<=12287,"CJK Symbols and Punctuation":ce=>ce>=12288&&ce<=12351,Katakana:ce=>ce>=12448&&ce<=12543,Kanbun:ce=>ce>=12688&&ce<=12703,"CJK Strokes":ce=>ce>=12736&&ce<=12783,"Enclosed CJK Letters and Months":ce=>ce>=12800&&ce<=13055,"CJK Compatibility":ce=>ce>=13056&&ce<=13311,"Yijing Hexagram Symbols":ce=>ce>=19904&&ce<=19967,"Private Use Area":ce=>ce>=57344&&ce<=63743,"Vertical Forms":ce=>ce>=65040&&ce<=65055,"CJK Compatibility Forms":ce=>ce>=65072&&ce<=65103,"Small Form Variants":ce=>ce>=65104&&ce<=65135,"Halfwidth and Fullwidth Forms":ce=>ce>=65280&&ce<=65519};function Vu(ce){for(const Y of ce)if(Jc(Y.charCodeAt(0)))return!0;return!1}function Nc(ce){for(const Y of ce)if(!Cf(Y.charCodeAt(0)))return!1;return!0}function Sf(ce){const Y=ce.map(ye=>{try{return new RegExp(`\\p{sc=${ye}}`,"u").source}catch{return null}}).filter(ye=>ye);return new RegExp(Y.join("|"),"u")}const sd=Sf(["Arab","Dupl","Mong","Ougr","Syrc"]);function Cf(ce){return!sd.test(String.fromCodePoint(ce))}const ld=Sf(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function Jc(ce){return!(ce!==746&&ce!==747&&(ce<4352||!(Os["CJK Compatibility Forms"](ce)&&!(ce>=65097&&ce<=65103)||Os["CJK Compatibility"](ce)||Os["CJK Strokes"](ce)||!(!Os["CJK Symbols and Punctuation"](ce)||ce>=12296&&ce<=12305||ce>=12308&&ce<=12319||ce===12336)||Os["Enclosed CJK Letters and Months"](ce)||Os["Ideographic Description Characters"](ce)||Os.Kanbun(ce)||Os.Katakana(ce)&&ce!==12540||!(!Os["Halfwidth and Fullwidth Forms"](ce)||ce===65288||ce===65289||ce===65293||ce>=65306&&ce<=65310||ce===65339||ce===65341||ce===65343||ce>=65371&&ce<=65503||ce===65507||ce>=65512&&ce<=65519)||!(!Os["Small Form Variants"](ce)||ce>=65112&&ce<=65118||ce>=65123&&ce<=65126)||Os["Vertical Forms"](ce)||Os["Yijing Hexagram Symbols"](ce)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(ce))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(ce))||ld.test(String.fromCodePoint(ce)))))}function wh(ce){return!(Jc(ce)||(function(Y){return!!(Os["Latin-1 Supplement"](Y)&&(Y===167||Y===169||Y===174||Y===177||Y===188||Y===189||Y===190||Y===215||Y===247)||Os["General Punctuation"](Y)&&(Y===8214||Y===8224||Y===8225||Y===8240||Y===8241||Y===8251||Y===8252||Y===8258||Y===8263||Y===8264||Y===8265||Y===8273)||Os["Letterlike Symbols"](Y)||Os["Number Forms"](Y)||Os["Miscellaneous Technical"](Y)&&(Y>=8960&&Y<=8967||Y>=8972&&Y<=8991||Y>=8996&&Y<=9e3||Y===9003||Y>=9085&&Y<=9114||Y>=9150&&Y<=9165||Y===9167||Y>=9169&&Y<=9179||Y>=9186&&Y<=9215)||Os["Control Pictures"](Y)&&Y!==9251||Os["Optical Character Recognition"](Y)||Os["Enclosed Alphanumerics"](Y)||Os["Geometric Shapes"](Y)||Os["Miscellaneous Symbols"](Y)&&!(Y>=9754&&Y<=9759)||Os["Miscellaneous Symbols and Arrows"](Y)&&(Y>=11026&&Y<=11055||Y>=11088&&Y<=11097||Y>=11192&&Y<=11243)||Os["CJK Symbols and Punctuation"](Y)||Os.Katakana(Y)||Os["Private Use Area"](Y)||Os["CJK Compatibility Forms"](Y)||Os["Small Form Variants"](Y)||Os["Halfwidth and Fullwidth Forms"](Y)||Y===8734||Y===8756||Y===8757||Y>=9984&&Y<=10087||Y>=10102&&Y<=10131||Y===65532||Y===65533)})(ce))}const vh=Sf(["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 rd(ce){return vh.test(String.fromCodePoint(ce))}function Wl(ce,Y){return!(!Y&&rd(ce)||ce>=2304&&ce<=3583||ce>=3840&&ce<=4255||Os.Khmer(ce))}function lc(ce){for(const Y of ce)if(rd(Y.charCodeAt(0)))return!0;return!1}const Bf=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(ce){this.pluginStatus=ce.pluginStatus,this.pluginURL=ce.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(ce){this.applyArabicShaping=ce.applyArabicShaping,this.processBidirectionalText=ce.processBidirectionalText,this.processStyledBidirectionalText=ce.processStyledBidirectionalText}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class gf{constructor(Y,ye){this.zoom=Y,ye?(this.now=ye.now,this.fadeDuration=ye.fadeDuration,this.zoomHistory=ye.zoomHistory,this.transition=ye.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new cl,this.transition={})}isSupportedScript(Y){return(function(ye,He){for(const lt of ye)if(!Wl(lt.charCodeAt(0),He))return!1;return!0})(Y,Bf.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const Y=this.zoom,ye=Y-Math.floor(Y),He=this.crossFadingFactor();return Y>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:ye+(1-ye)*He}:{fromScale:.5,toScale:1,t:1-(1-He)*ye}}}class rv{constructor(Y,ye){this.property=Y,this.value=ye,this.expression=(function(He,lt){if(E0(He))return new Ud(He,lt);if(ug(He)){const Ct=Mv(He,lt);if(Ct.result==="error")throw new Error(Ct.value.map(It=>`${It.key}: ${It.message}`).join(", "));return Ct.value}{let Ct=He;return lt.type==="color"&&typeof He=="string"?Ct=Kr.parse(He):lt.type!=="padding"||typeof He!="number"&&!Array.isArray(He)?lt.type==="variableAnchorOffsetCollection"&&Array.isArray(He)&&(Ct=Na.parse(He)):Ct=Ci.parse(He),{kind:"constant",evaluate:()=>Ct}}})(ye===void 0?Y.specification.default:ye,Y.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(Y,ye,He){return this.property.possiblyEvaluate(this,Y,ye,He)}}class nv{constructor(Y){this.property=Y,this.value=new rv(Y,void 0)}transitioned(Y,ye){return new kg(this.property,this.value,ye,F({},Y.transition,this.transition),Y.now)}untransitioned(){return new kg(this.property,this.value,null,{},0)}}class vv{constructor(Y){this._properties=Y,this._values=Object.create(Y.defaultTransitionablePropertyValues)}getValue(Y){return y(this._values[Y].value.value)}setValue(Y,ye){Object.prototype.hasOwnProperty.call(this._values,Y)||(this._values[Y]=new nv(this._values[Y].property)),this._values[Y].value=new rv(this._values[Y].property,ye===null?void 0:y(ye))}getTransition(Y){return y(this._values[Y].transition)}setTransition(Y,ye){Object.prototype.hasOwnProperty.call(this._values,Y)||(this._values[Y]=new nv(this._values[Y].property)),this._values[Y].transition=y(ye)||void 0}serialize(){const Y={};for(const ye of Object.keys(this._values)){const He=this.getValue(ye);He!==void 0&&(Y[ye]=He);const lt=this.getTransition(ye);lt!==void 0&&(Y[`${ye}-transition`]=lt)}return Y}transitioned(Y,ye){const He=new iv(this._properties);for(const lt of Object.keys(this._values))He._values[lt]=this._values[lt].transitioned(Y,ye._values[lt]);return He}untransitioned(){const Y=new iv(this._properties);for(const ye of Object.keys(this._values))Y._values[ye]=this._values[ye].untransitioned();return Y}}class kg{constructor(Y,ye,He,lt,Ct){this.property=Y,this.value=ye,this.begin=Ct+lt.delay||0,this.end=this.begin+lt.duration||0,Y.specification.transition&&(lt.delay||lt.duration)&&(this.prior=He)}possiblyEvaluate(Y,ye,He){const lt=Y.now||0,Ct=this.value.possiblyEvaluate(Y,ye,He),It=this.prior;if(It){if(lt>this.end)return this.prior=null,Ct;if(this.value.isDataDriven())return this.prior=null,Ct;if(lt<this.begin)return It.possiblyEvaluate(Y,ye,He);{const nr=(lt-this.begin)/(this.end-this.begin);return this.property.interpolate(It.possiblyEvaluate(Y,ye,He),Ct,(function(xr){if(xr<=0)return 0;if(xr>=1)return 1;const Vr=xr*xr,hn=Vr*xr;return 4*(xr<.5?hn:3*(xr-Vr)+hn-.75)})(nr))}}return Ct}}class iv{constructor(Y){this._properties=Y,this._values=Object.create(Y.defaultTransitioningPropertyValues)}possiblyEvaluate(Y,ye,He){const lt=new Wm(this._properties);for(const Ct of Object.keys(this._values))lt._values[Ct]=this._values[Ct].possiblyEvaluate(Y,ye,He);return lt}hasTransition(){for(const Y of Object.keys(this._values))if(this._values[Y].prior)return!0;return!1}}class $m{constructor(Y){this._properties=Y,this._values=Object.create(Y.defaultPropertyValues)}hasValue(Y){return this._values[Y].value!==void 0}getValue(Y){return y(this._values[Y].value)}setValue(Y,ye){this._values[Y]=new rv(this._values[Y].property,ye===null?void 0:y(ye))}serialize(){const Y={};for(const ye of Object.keys(this._values)){const He=this.getValue(ye);He!==void 0&&(Y[ye]=He)}return Y}possiblyEvaluate(Y,ye,He){const lt=new Wm(this._properties);for(const Ct of Object.keys(this._values))lt._values[Ct]=this._values[Ct].possiblyEvaluate(Y,ye,He);return lt}}class Sh{constructor(Y,ye,He){this.property=Y,this.value=ye,this.parameters=He}isConstant(){return this.value.kind==="constant"}constantOr(Y){return this.value.kind==="constant"?this.value.value:Y}evaluate(Y,ye,He,lt){return this.property.evaluate(this.value,this.parameters,Y,ye,He,lt)}}class Wm{constructor(Y){this._properties=Y,this._values=Object.create(Y.defaultPossiblyEvaluatedValues)}get(Y){return this._values[Y]}}class Iu{constructor(Y){this.specification=Y}possiblyEvaluate(Y,ye){if(Y.isDataDriven())throw new Error("Value should not be data driven");return Y.expression.evaluate(ye)}interpolate(Y,ye,He){const lt=iu[this.specification.type];return lt?lt(Y,ye,He):Y}}class Gu{constructor(Y,ye){this.specification=Y,this.overrides=ye}possiblyEvaluate(Y,ye,He,lt){return new Sh(this,Y.expression.kind==="constant"||Y.expression.kind==="camera"?{kind:"constant",value:Y.expression.evaluate(ye,null,{},He,lt)}:Y.expression,ye)}interpolate(Y,ye,He){if(Y.value.kind!=="constant"||ye.value.kind!=="constant")return Y;if(Y.value.value===void 0||ye.value.value===void 0)return new Sh(this,{kind:"constant",value:void 0},Y.parameters);const lt=iu[this.specification.type];if(lt){const Ct=lt(Y.value.value,ye.value.value,He);return new Sh(this,{kind:"constant",value:Ct},Y.parameters)}return Y}evaluate(Y,ye,He,lt,Ct,It){return Y.kind==="constant"?Y.value:Y.evaluate(ye,He,lt,Ct,It)}}class Ym extends Gu{possiblyEvaluate(Y,ye,He,lt){if(Y.value===void 0)return new Sh(this,{kind:"constant",value:void 0},ye);if(Y.expression.kind==="constant"){const Ct=Y.expression.evaluate(ye,null,{},He,lt),It=Y.property.specification.type==="resolvedImage"&&typeof Ct!="string"?Ct.name:Ct,nr=this._calculate(It,It,It,ye);return new Sh(this,{kind:"constant",value:nr},ye)}if(Y.expression.kind==="camera"){const Ct=this._calculate(Y.expression.evaluate({zoom:ye.zoom-1}),Y.expression.evaluate({zoom:ye.zoom}),Y.expression.evaluate({zoom:ye.zoom+1}),ye);return new Sh(this,{kind:"constant",value:Ct},ye)}return new Sh(this,Y.expression,ye)}evaluate(Y,ye,He,lt,Ct,It){if(Y.kind==="source"){const nr=Y.evaluate(ye,He,lt,Ct,It);return this._calculate(nr,nr,nr,ye)}return Y.kind==="composite"?this._calculate(Y.evaluate({zoom:Math.floor(ye.zoom)-1},He,lt),Y.evaluate({zoom:Math.floor(ye.zoom)},He,lt),Y.evaluate({zoom:Math.floor(ye.zoom)+1},He,lt),ye):Y.value}_calculate(Y,ye,He,lt){return lt.zoom>lt.zoomHistory.lastIntegerZoom?{from:Y,to:ye}:{from:He,to:ye}}interpolate(Y){return Y}}class Vv{constructor(Y){this.specification=Y}possiblyEvaluate(Y,ye,He,lt){if(Y.value!==void 0){if(Y.expression.kind==="constant"){const Ct=Y.expression.evaluate(ye,null,{},He,lt);return this._calculate(Ct,Ct,Ct,ye)}return this._calculate(Y.expression.evaluate(new gf(Math.floor(ye.zoom-1),ye)),Y.expression.evaluate(new gf(Math.floor(ye.zoom),ye)),Y.expression.evaluate(new gf(Math.floor(ye.zoom+1),ye)),ye)}}_calculate(Y,ye,He,lt){return lt.zoom>lt.zoomHistory.lastIntegerZoom?{from:Y,to:ye}:{from:He,to:ye}}interpolate(Y){return Y}}class kv{constructor(Y){this.specification=Y}possiblyEvaluate(Y,ye,He,lt){return!!Y.expression.evaluate(ye,null,{},He,lt)}interpolate(){return!1}}class wt{constructor(Y){this.properties=Y,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const ye in Y){const He=Y[ye];He.specification.overridable&&this.overridableProperties.push(ye);const lt=this.defaultPropertyValues[ye]=new rv(He,void 0),Ct=this.defaultTransitionablePropertyValues[ye]=new nv(He);this.defaultTransitioningPropertyValues[ye]=Ct.untransitioned(),this.defaultPossiblyEvaluatedValues[ye]=lt.possiblyEvaluate({})}}}Io("DataDrivenProperty",Gu),Io("DataConstantProperty",Iu),Io("CrossFadedDataDrivenProperty",Ym),Io("CrossFadedProperty",Vv),Io("ColorRampProperty",kv);const q="-transition";class Ae extends Ee{constructor(Y,ye){if(super(),this.id=Y.id,this.type=Y.type,this._featureFilter={filter:()=>!0,needGeometry:!1},Y.type!=="custom"&&(this.metadata=Y.metadata,this.minzoom=Y.minzoom,this.maxzoom=Y.maxzoom,Y.type!=="background"&&(this.source=Y.source,this.sourceLayer=Y["source-layer"],this.filter=Y.filter),ye.layout&&(this._unevaluatedLayout=new $m(ye.layout)),ye.paint)){this._transitionablePaint=new vv(ye.paint);for(const He in Y.paint)this.setPaintProperty(He,Y.paint[He],{validate:!1});for(const He in Y.layout)this.setLayoutProperty(He,Y.layout[He],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Wm(ye.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(Y){return Y==="visibility"?this.visibility:this._unevaluatedLayout.getValue(Y)}setLayoutProperty(Y,ye,He={}){ye!=null&&this._validate(Ws,`layers.${this.id}.layout.${Y}`,Y,ye,He)||(Y!=="visibility"?this._unevaluatedLayout.setValue(Y,ye):this.visibility=ye)}getPaintProperty(Y){return Y.endsWith(q)?this._transitionablePaint.getTransition(Y.slice(0,-11)):this._transitionablePaint.getValue(Y)}setPaintProperty(Y,ye,He={}){if(ye!=null&&this._validate(hs,`layers.${this.id}.paint.${Y}`,Y,ye,He))return!1;if(Y.endsWith(q))return this._transitionablePaint.setTransition(Y.slice(0,-11),ye||void 0),!1;{const lt=this._transitionablePaint._values[Y],Ct=lt.property.specification["property-type"]==="cross-faded-data-driven",It=lt.value.isDataDriven(),nr=lt.value;this._transitionablePaint.setValue(Y,ye),this._handleSpecialPaintPropertyUpdate(Y);const xr=this._transitionablePaint._values[Y].value;return xr.isDataDriven()||It||Ct||this._handleOverridablePaintPropertyUpdate(Y,nr,xr)}}_handleSpecialPaintPropertyUpdate(Y){}_handleOverridablePaintPropertyUpdate(Y,ye,He){return!1}isHidden(Y){return!!(this.minzoom&&Y<this.minzoom)||!!(this.maxzoom&&Y>=this.maxzoom)||this.visibility==="none"}updateTransitions(Y){this._transitioningPaint=this._transitionablePaint.transitioned(Y,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(Y,ye){Y.getCrossfadeParameters&&(this._crossfadeParameters=Y.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(Y,void 0,ye)),this.paint=this._transitioningPaint.possiblyEvaluate(Y,void 0,ye)}serialize(){const Y={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(Y.layout=Y.layout||{},Y.layout.visibility=this.visibility),T(Y,(ye,He)=>!(ye===void 0||He==="layout"&&!Object.keys(ye).length||He==="paint"&&!Object.keys(ye).length))}_validate(Y,ye,He,lt,Ct={}){return(!Ct||Ct.validate!==!1)&&Bo(this,Y.call(yo,{key:ye,layerType:this.type,objectKey:He,value:lt,styleSpec:Te,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const Y in this.paint._values){const ye=this.paint.get(Y);if(ye instanceof Sh&&cp(ye.property.specification)&&(ye.value.kind==="source"||ye.value.kind==="composite")&&ye.value.isStateDependent)return!0}return!1}}const it={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class ot{constructor(Y,ye){this._structArray=Y,this._pos1=ye*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class bt{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(Y,ye){return Y._trim(),ye&&(Y.isTransferred=!0,ye.push(Y.arrayBuffer)),{length:Y.length,arrayBuffer:Y.arrayBuffer}}static deserialize(Y){const ye=Object.create(this.prototype);return ye.arrayBuffer=Y.arrayBuffer,ye.length=Y.length,ye.capacity=Y.arrayBuffer.byteLength/ye.bytesPerElement,ye._refreshViews(),ye}_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(Y){this.reserve(Y),this.length=Y}reserve(Y){if(Y>this.capacity){this.capacity=Math.max(Y,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const ye=this.uint8;this._refreshViews(),ye&&this.uint8.set(ye)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function ar(ce,Y=1){let ye=0,He=0;return{members:ce.map(lt=>{const Ct=it[lt.type].BYTES_PER_ELEMENT,It=ye=yr(ye,Math.max(Y,Ct)),nr=lt.components||1;return He=Math.max(He,Ct),ye+=Ct*nr,{name:lt.name,type:lt.type,components:nr,offset:It}}),size:yr(ye,Math.max(He,Y)),alignment:Y}}function yr(ce,Y){return Math.ceil(ce/Y)*Y}class Ur extends bt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(Y,ye){const He=this.length;return this.resize(He+1),this.emplace(He,Y,ye)}emplace(Y,ye,He){const lt=2*Y;return this.int16[lt+0]=ye,this.int16[lt+1]=He,Y}}Ur.prototype.bytesPerElement=4,Io("StructArrayLayout2i4",Ur);class ln extends bt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(Y,ye,He){const lt=this.length;return this.resize(lt+1),this.emplace(lt,Y,ye,He)}emplace(Y,ye,He,lt){const Ct=3*Y;return this.int16[Ct+0]=ye,this.int16[Ct+1]=He,this.int16[Ct+2]=lt,Y}}ln.prototype.bytesPerElement=6,Io("StructArrayLayout3i6",ln);class Cn extends bt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(Y,ye,He,lt){const Ct=this.length;return this.resize(Ct+1),this.emplace(Ct,Y,ye,He,lt)}emplace(Y,ye,He,lt,Ct){const It=4*Y;return this.int16[It+0]=ye,this.int16[It+1]=He,this.int16[It+2]=lt,this.int16[It+3]=Ct,Y}}Cn.prototype.bytesPerElement=8,Io("StructArrayLayout4i8",Cn);class Pn extends bt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(Y,ye,He,lt,Ct,It){const nr=this.length;return this.resize(nr+1),this.emplace(nr,Y,ye,He,lt,Ct,It)}emplace(Y,ye,He,lt,Ct,It,nr){const xr=6*Y;return this.int16[xr+0]=ye,this.int16[xr+1]=He,this.int16[xr+2]=lt,this.int16[xr+3]=Ct,this.int16[xr+4]=It,this.int16[xr+5]=nr,Y}}Pn.prototype.bytesPerElement=12,Io("StructArrayLayout2i4i12",Pn);class vi extends bt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(Y,ye,He,lt,Ct,It){const nr=this.length;return this.resize(nr+1),this.emplace(nr,Y,ye,He,lt,Ct,It)}emplace(Y,ye,He,lt,Ct,It,nr){const xr=4*Y,Vr=8*Y;return this.int16[xr+0]=ye,this.int16[xr+1]=He,this.uint8[Vr+4]=lt,this.uint8[Vr+5]=Ct,this.uint8[Vr+6]=It,this.uint8[Vr+7]=nr,Y}}vi.prototype.bytesPerElement=8,Io("StructArrayLayout2i4ub8",vi);class Ui extends bt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(Y,ye){const He=this.length;return this.resize(He+1),this.emplace(He,Y,ye)}emplace(Y,ye,He){const lt=2*Y;return this.float32[lt+0]=ye,this.float32[lt+1]=He,Y}}Ui.prototype.bytesPerElement=8,Io("StructArrayLayout2f8",Ui);class kt extends bt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(Y,ye,He,lt,Ct,It,nr,xr,Vr,hn){const wn=this.length;return this.resize(wn+1),this.emplace(wn,Y,ye,He,lt,Ct,It,nr,xr,Vr,hn)}emplace(Y,ye,He,lt,Ct,It,nr,xr,Vr,hn,wn){const Zn=10*Y;return this.uint16[Zn+0]=ye,this.uint16[Zn+1]=He,this.uint16[Zn+2]=lt,this.uint16[Zn+3]=Ct,this.uint16[Zn+4]=It,this.uint16[Zn+5]=nr,this.uint16[Zn+6]=xr,this.uint16[Zn+7]=Vr,this.uint16[Zn+8]=hn,this.uint16[Zn+9]=wn,Y}}kt.prototype.bytesPerElement=20,Io("StructArrayLayout10ui20",kt);class zt extends bt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(Y,ye,He,lt,Ct,It,nr,xr,Vr,hn,wn,Zn){const hi=this.length;return this.resize(hi+1),this.emplace(hi,Y,ye,He,lt,Ct,It,nr,xr,Vr,hn,wn,Zn)}emplace(Y,ye,He,lt,Ct,It,nr,xr,Vr,hn,wn,Zn,hi){const Di=12*Y;return this.int16[Di+0]=ye,this.int16[Di+1]=He,this.int16[Di+2]=lt,this.int16[Di+3]=Ct,this.uint16[Di+4]=It,this.uint16[Di+5]=nr,this.uint16[Di+6]=xr,this.uint16[Di+7]=Vr,this.int16[Di+8]=hn,this.int16[Di+9]=wn,this.int16[Di+10]=Zn,this.int16[Di+11]=hi,Y}}zt.prototype.bytesPerElement=24,Io("StructArrayLayout4i4ui4i24",zt);class Qt extends bt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(Y,ye,He){const lt=this.length;return this.resize(lt+1),this.emplace(lt,Y,ye,He)}emplace(Y,ye,He,lt){const Ct=3*Y;return this.float32[Ct+0]=ye,this.float32[Ct+1]=He,this.float32[Ct+2]=lt,Y}}Qt.prototype.bytesPerElement=12,Io("StructArrayLayout3f12",Qt);class cr extends bt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(Y){const ye=this.length;return this.resize(ye+1),this.emplace(ye,Y)}emplace(Y,ye){return this.uint32[1*Y+0]=ye,Y}}cr.prototype.bytesPerElement=4,Io("StructArrayLayout1ul4",cr);class Sr extends bt{_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(Y,ye,He,lt,Ct,It,nr,xr,Vr){const hn=this.length;return this.resize(hn+1),this.emplace(hn,Y,ye,He,lt,Ct,It,nr,xr,Vr)}emplace(Y,ye,He,lt,Ct,It,nr,xr,Vr,hn){const wn=10*Y,Zn=5*Y;return this.int16[wn+0]=ye,this.int16[wn+1]=He,this.int16[wn+2]=lt,this.int16[wn+3]=Ct,this.int16[wn+4]=It,this.int16[wn+5]=nr,this.uint32[Zn+3]=xr,this.uint16[wn+8]=Vr,this.uint16[wn+9]=hn,Y}}Sr.prototype.bytesPerElement=20,Io("StructArrayLayout6i1ul2ui20",Sr);class gr extends bt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(Y,ye,He,lt,Ct,It){const nr=this.length;return this.resize(nr+1),this.emplace(nr,Y,ye,He,lt,Ct,It)}emplace(Y,ye,He,lt,Ct,It,nr){const xr=6*Y;return this.int16[xr+0]=ye,this.int16[xr+1]=He,this.int16[xr+2]=lt,this.int16[xr+3]=Ct,this.int16[xr+4]=It,this.int16[xr+5]=nr,Y}}gr.prototype.bytesPerElement=12,Io("StructArrayLayout2i2i2i12",gr);class Nr extends bt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(Y,ye,He,lt,Ct){const It=this.length;return this.resize(It+1),this.emplace(It,Y,ye,He,lt,Ct)}emplace(Y,ye,He,lt,Ct,It){const nr=4*Y,xr=8*Y;return this.float32[nr+0]=ye,this.float32[nr+1]=He,this.float32[nr+2]=lt,this.int16[xr+6]=Ct,this.int16[xr+7]=It,Y}}Nr.prototype.bytesPerElement=16,Io("StructArrayLayout2f1f2i16",Nr);class vn extends bt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(Y,ye,He,lt,Ct,It){const nr=this.length;return this.resize(nr+1),this.emplace(nr,Y,ye,He,lt,Ct,It)}emplace(Y,ye,He,lt,Ct,It,nr){const xr=16*Y,Vr=4*Y,hn=8*Y;return this.uint8[xr+0]=ye,this.uint8[xr+1]=He,this.float32[Vr+1]=lt,this.float32[Vr+2]=Ct,this.int16[hn+6]=It,this.int16[hn+7]=nr,Y}}vn.prototype.bytesPerElement=16,Io("StructArrayLayout2ub2f2i16",vn);class An extends bt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(Y,ye,He){const lt=this.length;return this.resize(lt+1),this.emplace(lt,Y,ye,He)}emplace(Y,ye,He,lt){const Ct=3*Y;return this.uint16[Ct+0]=ye,this.uint16[Ct+1]=He,this.uint16[Ct+2]=lt,Y}}An.prototype.bytesPerElement=6,Io("StructArrayLayout3ui6",An);class Ln extends bt{_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(Y,ye,He,lt,Ct,It,nr,xr,Vr,hn,wn,Zn,hi,Di,Xi,ya,eo){const us=this.length;return this.resize(us+1),this.emplace(us,Y,ye,He,lt,Ct,It,nr,xr,Vr,hn,wn,Zn,hi,Di,Xi,ya,eo)}emplace(Y,ye,He,lt,Ct,It,nr,xr,Vr,hn,wn,Zn,hi,Di,Xi,ya,eo,us){const ko=24*Y,es=12*Y,js=48*Y;return this.int16[ko+0]=ye,this.int16[ko+1]=He,this.uint16[ko+2]=lt,this.uint16[ko+3]=Ct,this.uint32[es+2]=It,this.uint32[es+3]=nr,this.uint32[es+4]=xr,this.uint16[ko+10]=Vr,this.uint16[ko+11]=hn,this.uint16[ko+12]=wn,this.float32[es+7]=Zn,this.float32[es+8]=hi,this.uint8[js+36]=Di,this.uint8[js+37]=Xi,this.uint8[js+38]=ya,this.uint32[es+10]=eo,this.int16[ko+22]=us,Y}}Ln.prototype.bytesPerElement=48,Io("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Ln);class ai extends bt{_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(Y,ye,He,lt,Ct,It,nr,xr,Vr,hn,wn,Zn,hi,Di,Xi,ya,eo,us,ko,es,js,Pl,Lu,df,$u,Pu,Ic,xc){const fc=this.length;return this.resize(fc+1),this.emplace(fc,Y,ye,He,lt,Ct,It,nr,xr,Vr,hn,wn,Zn,hi,Di,Xi,ya,eo,us,ko,es,js,Pl,Lu,df,$u,Pu,Ic,xc)}emplace(Y,ye,He,lt,Ct,It,nr,xr,Vr,hn,wn,Zn,hi,Di,Xi,ya,eo,us,ko,es,js,Pl,Lu,df,$u,Pu,Ic,xc,fc){const hl=32*Y,Hc=16*Y;return this.int16[hl+0]=ye,this.int16[hl+1]=He,this.int16[hl+2]=lt,this.int16[hl+3]=Ct,this.int16[hl+4]=It,this.int16[hl+5]=nr,this.int16[hl+6]=xr,this.int16[hl+7]=Vr,this.uint16[hl+8]=hn,this.uint16[hl+9]=wn,this.uint16[hl+10]=Zn,this.uint16[hl+11]=hi,this.uint16[hl+12]=Di,this.uint16[hl+13]=Xi,this.uint16[hl+14]=ya,this.uint16[hl+15]=eo,this.uint16[hl+16]=us,this.uint16[hl+17]=ko,this.uint16[hl+18]=es,this.uint16[hl+19]=js,this.uint16[hl+20]=Pl,this.uint16[hl+21]=Lu,this.uint16[hl+22]=df,this.uint32[Hc+12]=$u,this.float32[Hc+13]=Pu,this.float32[Hc+14]=Ic,this.uint16[hl+30]=xc,this.uint16[hl+31]=fc,Y}}ai.prototype.bytesPerElement=64,Io("StructArrayLayout8i15ui1ul2f2ui64",ai);class ki extends bt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(Y){const ye=this.length;return this.resize(ye+1),this.emplace(ye,Y)}emplace(Y,ye){return this.float32[1*Y+0]=ye,Y}}ki.prototype.bytesPerElement=4,Io("StructArrayLayout1f4",ki);class ra extends bt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(Y,ye,He){const lt=this.length;return this.resize(lt+1),this.emplace(lt,Y,ye,He)}emplace(Y,ye,He,lt){const Ct=3*Y;return this.uint16[6*Y+0]=ye,this.float32[Ct+1]=He,this.float32[Ct+2]=lt,Y}}ra.prototype.bytesPerElement=12,Io("StructArrayLayout1ui2f12",ra);class oa extends bt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(Y,ye,He){const lt=this.length;return this.resize(lt+1),this.emplace(lt,Y,ye,He)}emplace(Y,ye,He,lt){const Ct=4*Y;return this.uint32[2*Y+0]=ye,this.uint16[Ct+2]=He,this.uint16[Ct+3]=lt,Y}}oa.prototype.bytesPerElement=8,Io("StructArrayLayout1ul2ui8",oa);class Ma extends bt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(Y,ye){const He=this.length;return this.resize(He+1),this.emplace(He,Y,ye)}emplace(Y,ye,He){const lt=2*Y;return this.uint16[lt+0]=ye,this.uint16[lt+1]=He,Y}}Ma.prototype.bytesPerElement=4,Io("StructArrayLayout2ui4",Ma);class mo extends bt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(Y){const ye=this.length;return this.resize(ye+1),this.emplace(ye,Y)}emplace(Y,ye){return this.uint16[1*Y+0]=ye,Y}}mo.prototype.bytesPerElement=2,Io("StructArrayLayout1ui2",mo);class ns extends bt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(Y,ye,He,lt){const Ct=this.length;return this.resize(Ct+1),this.emplace(Ct,Y,ye,He,lt)}emplace(Y,ye,He,lt,Ct){const It=4*Y;return this.float32[It+0]=ye,this.float32[It+1]=He,this.float32[It+2]=lt,this.float32[It+3]=Ct,Y}}ns.prototype.bytesPerElement=16,Io("StructArrayLayout4f16",ns);class $o extends ot{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 v(this.anchorPointX,this.anchorPointY)}}$o.prototype.size=20;class as extends Sr{get(Y){return new $o(this,Y)}}Io("CollisionBoxArray",as);class fl extends ot{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(Y){this._structArray.uint8[this._pos1+37]=Y}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(Y){this._structArray.uint8[this._pos1+38]=Y}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(Y){this._structArray.uint32[this._pos4+10]=Y}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}fl.prototype.size=48;class Zl extends Ln{get(Y){return new fl(this,Y)}}Io("PlacedSymbolArray",Zl);class Fl extends ot{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(Y){this._structArray.uint32[this._pos4+12]=Y}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]}}Fl.prototype.size=64;class Du extends ai{get(Y){return new Fl(this,Y)}}Io("SymbolInstanceArray",Du);class qc extends ki{getoffsetX(Y){return this.float32[1*Y+0]}}Io("GlyphOffsetArray",qc);class Gc extends ln{getx(Y){return this.int16[3*Y+0]}gety(Y){return this.int16[3*Y+1]}gettileUnitDistanceFromAnchor(Y){return this.int16[3*Y+2]}}Io("SymbolLineVertexArray",Gc);class _c extends ot{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]}}_c.prototype.size=12;class ef extends ra{get(Y){return new _c(this,Y)}}Io("TextAnchorOffsetArray",ef);class Xd extends ot{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]}}Xd.prototype.size=8;class kd extends oa{get(Y){return new Xd(this,Y)}}Io("FeatureIndexArray",kd);class Ec extends Ur{}class Ac extends Ur{}class Ih extends Ur{}class Ep extends Pn{}class Iv extends vi{}class $e extends Ui{}class vt extends kt{}class Bt extends zt{}class fr extends Qt{}class pr extends cr{}class _r extends gr{}class Yr extends vn{}class Wr extends An{}class yn extends Ma{}const li=ar([{name:"a_pos",components:2,type:"Int16"}],4),{members:ni}=li;class Pi{constructor(Y=[]){this.segments=Y}prepareSegment(Y,ye,He,lt){let Ct=this.segments[this.segments.length-1];return Y>Pi.MAX_VERTEX_ARRAY_LENGTH&&M(`Max vertices per segment is ${Pi.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${Y}`),(!Ct||Ct.vertexLength+Y>Pi.MAX_VERTEX_ARRAY_LENGTH||Ct.sortKey!==lt)&&(Ct={vertexOffset:ye.length,primitiveOffset:He.length,vertexLength:0,primitiveLength:0},lt!==void 0&&(Ct.sortKey=lt),this.segments.push(Ct)),Ct}get(){return this.segments}destroy(){for(const Y of this.segments)for(const ye in Y.vaos)Y.vaos[ye].destroy()}static simpleSegment(Y,ye,He,lt){return new Pi([{vertexOffset:Y,primitiveOffset:ye,vertexLength:He,primitiveLength:lt,vaos:{},sortKey:0}])}}function Ji(ce,Y){return 256*(ce=I(Math.floor(ce),0,255))+I(Math.floor(Y),0,255)}Pi.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Io("SegmentVector",Pi);const na=ar([{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 _o={exports:{}},ca={exports:{}};ca.exports=function(ce,Y){var ye,He,lt,Ct,It,nr,xr,Vr;for(He=ce.length-(ye=3&ce.length),lt=Y,It=3432918353,nr=461845907,Vr=0;Vr<He;)xr=255&ce.charCodeAt(Vr)|(255&ce.charCodeAt(++Vr))<<8|(255&ce.charCodeAt(++Vr))<<16|(255&ce.charCodeAt(++Vr))<<24,++Vr,lt=27492+(65535&(Ct=5*(65535&(lt=(lt^=xr=(65535&(xr=(xr=(65535&xr)*It+(((xr>>>16)*It&65535)<<16)&4294967295)<<15|xr>>>17))*nr+(((xr>>>16)*nr&65535)<<16)&4294967295)<<13|lt>>>19))+((5*(lt>>>16)&65535)<<16)&4294967295))+((58964+(Ct>>>16)&65535)<<16);switch(xr=0,ye){case 3:xr^=(255&ce.charCodeAt(Vr+2))<<16;case 2:xr^=(255&ce.charCodeAt(Vr+1))<<8;case 1:lt^=xr=(65535&(xr=(xr=(65535&(xr^=255&ce.charCodeAt(Vr)))*It+(((xr>>>16)*It&65535)<<16)&4294967295)<<15|xr>>>17))*nr+(((xr>>>16)*nr&65535)<<16)&4294967295}return lt^=ce.length,lt=2246822507*(65535&(lt^=lt>>>16))+((2246822507*(lt>>>16)&65535)<<16)&4294967295,lt=3266489909*(65535&(lt^=lt>>>13))+((3266489909*(lt>>>16)&65535)<<16)&4294967295,(lt^=lt>>>16)>>>0};var La=ca.exports,qa={exports:{}};qa.exports=function(ce,Y){for(var ye,He=ce.length,lt=Y^He,Ct=0;He>=4;)ye=1540483477*(65535&(ye=255&ce.charCodeAt(Ct)|(255&ce.charCodeAt(++Ct))<<8|(255&ce.charCodeAt(++Ct))<<16|(255&ce.charCodeAt(++Ct))<<24))+((1540483477*(ye>>>16)&65535)<<16),lt=1540483477*(65535&lt)+((1540483477*(lt>>>16)&65535)<<16)^(ye=1540483477*(65535&(ye^=ye>>>24))+((1540483477*(ye>>>16)&65535)<<16)),He-=4,++Ct;switch(He){case 3:lt^=(255&ce.charCodeAt(Ct+2))<<16;case 2:lt^=(255&ce.charCodeAt(Ct+1))<<8;case 1:lt=1540483477*(65535&(lt^=255&ce.charCodeAt(Ct)))+((1540483477*(lt>>>16)&65535)<<16)}return lt=1540483477*(65535&(lt^=lt>>>13))+((1540483477*(lt>>>16)&65535)<<16),(lt^=lt>>>15)>>>0};var bo=La,So=qa.exports;_o.exports=bo,_o.exports.murmur3=bo,_o.exports.murmur2=So;var Va=c(_o.exports);class os{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(Y,ye,He,lt){this.ids.push(ul(Y)),this.positions.push(ye,He,lt)}getPositions(Y){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const ye=ul(Y);let He=0,lt=this.ids.length-1;for(;He<lt;){const It=He+lt>>1;this.ids[It]>=ye?lt=It:He=It+1}const Ct=[];for(;this.ids[He]===ye;)Ct.push({index:this.positions[3*He],start:this.positions[3*He+1],end:this.positions[3*He+2]}),He++;return Ct}static serialize(Y,ye){const He=new Float64Array(Y.ids),lt=new Uint32Array(Y.positions);return Us(He,lt,0,He.length-1),ye&&ye.push(He.buffer,lt.buffer),{ids:He,positions:lt}}static deserialize(Y){const ye=new os;return ye.ids=Y.ids,ye.positions=Y.positions,ye.indexed=!0,ye}}function ul(ce){const Y=+ce;return!isNaN(Y)&&Y<=Number.MAX_SAFE_INTEGER?Y:Va(String(ce))}function Us(ce,Y,ye,He){for(;ye<He;){const lt=ce[ye+He>>1];let Ct=ye-1,It=He+1;for(;;){do Ct++;while(ce[Ct]<lt);do It--;while(ce[It]>lt);if(Ct>=It)break;rl(ce,Ct,It),rl(Y,3*Ct,3*It),rl(Y,3*Ct+1,3*It+1),rl(Y,3*Ct+2,3*It+2)}It-ye<He-It?(Us(ce,Y,ye,It),ye=It+1):(Us(ce,Y,It+1,He),He=It)}}function rl(ce,Y,ye){const He=ce[Y];ce[Y]=ce[ye],ce[ye]=He}Io("FeaturePositionMap",os);class Yl{constructor(Y,ye){this.gl=Y.gl,this.location=ye}}class eu extends Yl{constructor(Y,ye){super(Y,ye),this.current=0}set(Y){this.current!==Y&&(this.current=Y,this.gl.uniform1f(this.location,Y))}}class Vc extends Yl{constructor(Y,ye){super(Y,ye),this.current=[0,0,0,0]}set(Y){Y[0]===this.current[0]&&Y[1]===this.current[1]&&Y[2]===this.current[2]&&Y[3]===this.current[3]||(this.current=Y,this.gl.uniform4f(this.location,Y[0],Y[1],Y[2],Y[3]))}}class ou extends Yl{constructor(Y,ye){super(Y,ye),this.current=Kr.transparent}set(Y){Y.r===this.current.r&&Y.g===this.current.g&&Y.b===this.current.b&&Y.a===this.current.a||(this.current=Y,this.gl.uniform4f(this.location,Y.r,Y.g,Y.b,Y.a))}}const Zu=new Float32Array(16);function Qc(ce){return[Ji(255*ce.r,255*ce.g),Ji(255*ce.b,255*ce.a)]}class Ph{constructor(Y,ye,He){this.value=Y,this.uniformNames=ye.map(lt=>`u_${lt}`),this.type=He}setUniform(Y,ye,He){Y.set(He.constantOr(this.value))}getBinding(Y,ye,He){return this.type==="color"?new ou(Y,ye):new eu(Y,ye)}}class xd{constructor(Y,ye){this.uniformNames=ye.map(He=>`u_${He}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(Y,ye){this.pixelRatioFrom=ye.pixelRatio,this.pixelRatioTo=Y.pixelRatio,this.patternFrom=ye.tlbr,this.patternTo=Y.tlbr}setUniform(Y,ye,He,lt){const Ct=lt==="u_pattern_to"?this.patternTo:lt==="u_pattern_from"?this.patternFrom:lt==="u_pixel_ratio_to"?this.pixelRatioTo:lt==="u_pixel_ratio_from"?this.pixelRatioFrom:null;Ct&&Y.set(Ct)}getBinding(Y,ye,He){return He.substr(0,9)==="u_pattern"?new Vc(Y,ye):new eu(Y,ye)}}class Rl{constructor(Y,ye,He,lt){this.expression=Y,this.type=He,this.maxValue=0,this.paintVertexAttributes=ye.map(Ct=>({name:`a_${Ct}`,type:"Float32",components:He==="color"?2:1,offset:0})),this.paintVertexArray=new lt}populatePaintArray(Y,ye,He,lt,Ct){const It=this.paintVertexArray.length,nr=this.expression.evaluate(new gf(0),ye,{},lt,[],Ct);this.paintVertexArray.resize(Y),this._setPaintValue(It,Y,nr)}updatePaintArray(Y,ye,He,lt){const Ct=this.expression.evaluate({zoom:0},He,lt);this._setPaintValue(Y,ye,Ct)}_setPaintValue(Y,ye,He){if(this.type==="color"){const lt=Qc(He);for(let Ct=Y;Ct<ye;Ct++)this.paintVertexArray.emplace(Ct,lt[0],lt[1])}else{for(let lt=Y;lt<ye;lt++)this.paintVertexArray.emplace(lt,He);this.maxValue=Math.max(this.maxValue,Math.abs(He))}}upload(Y){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=Y.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}}class Cc{constructor(Y,ye,He,lt,Ct,It){this.expression=Y,this.uniformNames=ye.map(nr=>`u_${nr}_t`),this.type=He,this.useIntegerZoom=lt,this.zoom=Ct,this.maxValue=0,this.paintVertexAttributes=ye.map(nr=>({name:`a_${nr}`,type:"Float32",components:He==="color"?4:2,offset:0})),this.paintVertexArray=new It}populatePaintArray(Y,ye,He,lt,Ct){const It=this.expression.evaluate(new gf(this.zoom),ye,{},lt,[],Ct),nr=this.expression.evaluate(new gf(this.zoom+1),ye,{},lt,[],Ct),xr=this.paintVertexArray.length;this.paintVertexArray.resize(Y),this._setPaintValue(xr,Y,It,nr)}updatePaintArray(Y,ye,He,lt){const Ct=this.expression.evaluate({zoom:this.zoom},He,lt),It=this.expression.evaluate({zoom:this.zoom+1},He,lt);this._setPaintValue(Y,ye,Ct,It)}_setPaintValue(Y,ye,He,lt){if(this.type==="color"){const Ct=Qc(He),It=Qc(lt);for(let nr=Y;nr<ye;nr++)this.paintVertexArray.emplace(nr,Ct[0],Ct[1],It[0],It[1])}else{for(let Ct=Y;Ct<ye;Ct++)this.paintVertexArray.emplace(Ct,He,lt);this.maxValue=Math.max(this.maxValue,Math.abs(He),Math.abs(lt))}}upload(Y){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=Y.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}setUniform(Y,ye){const He=this.useIntegerZoom?Math.floor(ye.zoom):ye.zoom,lt=I(this.expression.interpolationFactor(He,this.zoom,this.zoom+1),0,1);Y.set(lt)}getBinding(Y,ye,He){return new eu(Y,ye)}}class $c{constructor(Y,ye,He,lt,Ct,It){this.expression=Y,this.type=ye,this.useIntegerZoom=He,this.zoom=lt,this.layerId=It,this.zoomInPaintVertexArray=new Ct,this.zoomOutPaintVertexArray=new Ct}populatePaintArray(Y,ye,He){const lt=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(Y),this.zoomOutPaintVertexArray.resize(Y),this._setPaintValues(lt,Y,ye.patterns&&ye.patterns[this.layerId],He)}updatePaintArray(Y,ye,He,lt,Ct){this._setPaintValues(Y,ye,He.patterns&&He.patterns[this.layerId],Ct)}_setPaintValues(Y,ye,He,lt){if(!lt||!He)return;const{min:Ct,mid:It,max:nr}=He,xr=lt[Ct],Vr=lt[It],hn=lt[nr];if(xr&&Vr&&hn)for(let wn=Y;wn<ye;wn++)this.zoomInPaintVertexArray.emplace(wn,Vr.tl[0],Vr.tl[1],Vr.br[0],Vr.br[1],xr.tl[0],xr.tl[1],xr.br[0],xr.br[1],Vr.pixelRatio,xr.pixelRatio),this.zoomOutPaintVertexArray.emplace(wn,Vr.tl[0],Vr.tl[1],Vr.br[0],Vr.br[1],hn.tl[0],hn.tl[1],hn.br[0],hn.br[1],Vr.pixelRatio,hn.pixelRatio)}upload(Y){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=Y.createVertexBuffer(this.zoomInPaintVertexArray,na.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=Y.createVertexBuffer(this.zoomOutPaintVertexArray,na.members,this.expression.isStateDependent))}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}}class ud{constructor(Y,ye,He){this.binders={},this._buffers=[];const lt=[];for(const Ct in Y.paint._values){if(!He(Ct))continue;const It=Y.paint.get(Ct);if(!(It instanceof Sh&&cp(It.property.specification)))continue;const nr=mv(Ct,Y.type),xr=It.value,Vr=It.property.specification.type,hn=It.property.useIntegerZoom,wn=It.property.specification["property-type"],Zn=wn==="cross-faded"||wn==="cross-faded-data-driven";if(xr.kind==="constant")this.binders[Ct]=Zn?new xd(xr.value,nr):new Ph(xr.value,nr,Vr),lt.push(`/u_${Ct}`);else if(xr.kind==="source"||Zn){const hi=Mf(Ct,Vr,"source");this.binders[Ct]=Zn?new $c(xr,Vr,hn,ye,hi,Y.id):new Rl(xr,nr,Vr,hi),lt.push(`/a_${Ct}`)}else{const hi=Mf(Ct,Vr,"composite");this.binders[Ct]=new Cc(xr,nr,Vr,hn,ye,hi),lt.push(`/z_${Ct}`)}}this.cacheKey=lt.sort().join("")}getMaxValue(Y){const ye=this.binders[Y];return ye instanceof Rl||ye instanceof Cc?ye.maxValue:0}populatePaintArrays(Y,ye,He,lt,Ct){for(const It in this.binders){const nr=this.binders[It];(nr instanceof Rl||nr instanceof Cc||nr instanceof $c)&&nr.populatePaintArray(Y,ye,He,lt,Ct)}}setConstantPatternPositions(Y,ye){for(const He in this.binders){const lt=this.binders[He];lt instanceof xd&&lt.setConstantPatternPositions(Y,ye)}}updatePaintArrays(Y,ye,He,lt,Ct){let It=!1;for(const nr in Y){const xr=ye.getPositions(nr);for(const Vr of xr){const hn=He.feature(Vr.index);for(const wn in this.binders){const Zn=this.binders[wn];if((Zn instanceof Rl||Zn instanceof Cc||Zn instanceof $c)&&Zn.expression.isStateDependent===!0){const hi=lt.paint.get(wn);Zn.expression=hi.value,Zn.updatePaintArray(Vr.start,Vr.end,hn,Y[nr],Ct),It=!0}}}}return It}defines(){const Y=[];for(const ye in this.binders){const He=this.binders[ye];(He instanceof Ph||He instanceof xd)&&Y.push(...He.uniformNames.map(lt=>`#define HAS_UNIFORM_${lt}`))}return Y}getBinderAttributes(){const Y=[];for(const ye in this.binders){const He=this.binders[ye];if(He instanceof Rl||He instanceof Cc)for(let lt=0;lt<He.paintVertexAttributes.length;lt++)Y.push(He.paintVertexAttributes[lt].name);else if(He instanceof $c)for(let lt=0;lt<na.members.length;lt++)Y.push(na.members[lt].name)}return Y}getBinderUniforms(){const Y=[];for(const ye in this.binders){const He=this.binders[ye];if(He instanceof Ph||He instanceof xd||He instanceof Cc)for(const lt of He.uniformNames)Y.push(lt)}return Y}getPaintVertexBuffers(){return this._buffers}getUniforms(Y,ye){const He=[];for(const lt in this.binders){const Ct=this.binders[lt];if(Ct instanceof Ph||Ct instanceof xd||Ct instanceof Cc){for(const It of Ct.uniformNames)if(ye[It]){const nr=Ct.getBinding(Y,ye[It],It);He.push({name:It,property:lt,binding:nr})}}}return He}setUniforms(Y,ye,He,lt){for(const{name:Ct,property:It,binding:nr}of ye)this.binders[It].setUniform(nr,lt,He.get(It),Ct)}updatePaintBuffers(Y){this._buffers=[];for(const ye in this.binders){const He=this.binders[ye];if(Y&&He instanceof $c){const lt=Y.fromScale===2?He.zoomInPaintVertexBuffer:He.zoomOutPaintVertexBuffer;lt&&this._buffers.push(lt)}else(He instanceof Rl||He instanceof Cc)&&He.paintVertexBuffer&&this._buffers.push(He.paintVertexBuffer)}}upload(Y){for(const ye in this.binders){const He=this.binders[ye];(He instanceof Rl||He instanceof Cc||He instanceof $c)&&He.upload(Y)}this.updatePaintBuffers()}destroy(){for(const Y in this.binders){const ye=this.binders[Y];(ye instanceof Rl||ye instanceof Cc||ye instanceof $c)&&ye.destroy()}}}class Uf{constructor(Y,ye,He=()=>!0){this.programConfigurations={};for(const lt of Y)this.programConfigurations[lt.id]=new ud(lt,ye,He);this.needsUpload=!1,this._featureMap=new os,this._bufferOffset=0}populatePaintArrays(Y,ye,He,lt,Ct,It){for(const nr in this.programConfigurations)this.programConfigurations[nr].populatePaintArrays(Y,ye,lt,Ct,It);ye.id!==void 0&&this._featureMap.add(ye.id,He,this._bufferOffset,Y),this._bufferOffset=Y,this.needsUpload=!0}updatePaintArrays(Y,ye,He,lt){for(const Ct of He)this.needsUpload=this.programConfigurations[Ct.id].updatePaintArrays(Y,this._featureMap,ye,Ct,lt)||this.needsUpload}get(Y){return this.programConfigurations[Y]}upload(Y){if(this.needsUpload){for(const ye in this.programConfigurations)this.programConfigurations[ye].upload(Y);this.needsUpload=!1}}destroy(){for(const Y in this.programConfigurations)this.programConfigurations[Y].destroy()}}function mv(ce,Y){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"]}[ce]||[ce.replace(`${Y}-`,"").replace(/-/g,"_")]}function Mf(ce,Y,ye){const He={color:{source:Ui,composite:ns},number:{source:ki,composite:Ui}},lt=(function(Ct){return{"line-pattern":{source:vt,composite:vt},"fill-pattern":{source:vt,composite:vt},"fill-extrusion-pattern":{source:vt,composite:vt}}[Ct]})(ce);return lt&&lt[ye]||He[Y][ye]}Io("ConstantBinder",Ph),Io("CrossFadedConstantBinder",xd),Io("SourceExpressionBinder",Rl),Io("CrossFadedCompositeBinder",$c),Io("CompositeExpressionBinder",Cc),Io("ProgramConfiguration",ud,{omit:["_buffers"]}),Io("ProgramConfigurationSet",Uf);const cd=8192,qv=Math.pow(2,14)-1,Th=-qv-1;function rr(ce){const Y=cd/ce.extent,ye=ce.loadGeometry();for(let He=0;He<ye.length;He++){const lt=ye[He];for(let Ct=0;Ct<lt.length;Ct++){const It=lt[Ct],nr=Math.round(It.x*Y),xr=Math.round(It.y*Y);It.x=I(nr,Th,qv),It.y=I(xr,Th,qv),(nr<It.x||nr>It.x+1||xr<It.y||xr>It.y+1)&&M("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return ye}function mn(ce,Y){return{type:ce.type,id:ce.id,properties:ce.properties,geometry:Y?rr(ce):[]}}function En(ce,Y,ye,He,lt){ce.emplaceBack(2*Y+(He+1)/2,2*ye+(lt+1)/2)}class ia{constructor(Y){this.zoom=Y.zoom,this.overscaling=Y.overscaling,this.layers=Y.layers,this.layerIds=this.layers.map(ye=>ye.id),this.index=Y.index,this.hasPattern=!1,this.layoutVertexArray=new Ac,this.indexArray=new Wr,this.segments=new Pi,this.programConfigurations=new Uf(Y.layers,Y.zoom),this.stateDependentLayerIds=this.layers.filter(ye=>ye.isStateDependent()).map(ye=>ye.id)}populate(Y,ye,He){const lt=this.layers[0],Ct=[];let It=null,nr=!1;lt.type==="circle"&&(It=lt.layout.get("circle-sort-key"),nr=!It.isConstant());for(const{feature:xr,id:Vr,index:hn,sourceLayerIndex:wn}of Y){const Zn=this.layers[0]._featureFilter.needGeometry,hi=mn(xr,Zn);if(!this.layers[0]._featureFilter.filter(new gf(this.zoom),hi,He))continue;const Di=nr?It.evaluate(hi,{},He):void 0,Xi={id:Vr,properties:xr.properties,type:xr.type,sourceLayerIndex:wn,index:hn,geometry:Zn?hi.geometry:rr(xr),patterns:{},sortKey:Di};Ct.push(Xi)}nr&&Ct.sort((xr,Vr)=>xr.sortKey-Vr.sortKey);for(const xr of Ct){const{geometry:Vr,index:hn,sourceLayerIndex:wn}=xr,Zn=Y[hn].feature;this.addFeature(xr,Vr,hn,He),ye.featureIndex.insert(Zn,Vr,hn,wn,this.index)}}update(Y,ye,He){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(Y,ye,this.stateDependentLayers,He)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(Y){this.uploaded||(this.layoutVertexBuffer=Y.createVertexBuffer(this.layoutVertexArray,ni),this.indexBuffer=Y.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(Y),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(Y,ye,He,lt){for(const Ct of ye)for(const It of Ct){const nr=It.x,xr=It.y;if(nr<0||nr>=cd||xr<0||xr>=cd)continue;const Vr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,Y.sortKey),hn=Vr.vertexLength;En(this.layoutVertexArray,nr,xr,-1,-1),En(this.layoutVertexArray,nr,xr,1,-1),En(this.layoutVertexArray,nr,xr,1,1),En(this.layoutVertexArray,nr,xr,-1,1),this.indexArray.emplaceBack(hn,hn+1,hn+2),this.indexArray.emplaceBack(hn,hn+3,hn+2),Vr.vertexLength+=4,Vr.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,Y,He,{},lt)}}function Wa(ce,Y){for(let ye=0;ye<ce.length;ye++)if(Uo(Y,ce[ye]))return!0;for(let ye=0;ye<Y.length;ye++)if(Uo(ce,Y[ye]))return!0;return!!To(ce,Y)}function zi(ce,Y,ye){return!!Uo(ce,Y)||!!qo(Y,ce,ye)}function Fi(ce,Y){if(ce.length===1)return xs(Y,ce[0]);for(let ye=0;ye<Y.length;ye++){const He=Y[ye];for(let lt=0;lt<He.length;lt++)if(Uo(ce,He[lt]))return!0}for(let ye=0;ye<ce.length;ye++)if(xs(Y,ce[ye]))return!0;for(let ye=0;ye<Y.length;ye++)if(To(ce,Y[ye]))return!0;return!1}function Ao(ce,Y,ye){if(ce.length>1){if(To(ce,Y))return!0;for(let He=0;He<Y.length;He++)if(qo(Y[He],ce,ye))return!0}for(let He=0;He<ce.length;He++)if(qo(ce[He],Y,ye))return!0;return!1}function To(ce,Y){if(ce.length===0||Y.length===0)return!1;for(let ye=0;ye<ce.length-1;ye++){const He=ce[ye],lt=ce[ye+1];for(let Ct=0;Ct<Y.length-1;Ct++)if(Eo(He,lt,Y[Ct],Y[Ct+1]))return!0}return!1}function Eo(ce,Y,ye,He){return W(ce,ye,He)!==W(Y,ye,He)&&W(ce,Y,ye)!==W(ce,Y,He)}function qo(ce,Y,ye){const He=ye*ye;if(Y.length===1)return ce.distSqr(Y[0])<He;for(let lt=1;lt<Y.length;lt++)if(qs(ce,Y[lt-1],Y[lt])<He)return!0;return!1}function qs(ce,Y,ye){const He=Y.distSqr(ye);if(He===0)return ce.distSqr(Y);const lt=((ce.x-Y.x)*(ye.x-Y.x)+(ce.y-Y.y)*(ye.y-Y.y))/He;return ce.distSqr(lt<0?Y:lt>1?ye:ye.sub(Y)._mult(lt)._add(Y))}function xs(ce,Y){let ye,He,lt,Ct=!1;for(let It=0;It<ce.length;It++){ye=ce[It];for(let nr=0,xr=ye.length-1;nr<ye.length;xr=nr++)He=ye[nr],lt=ye[xr],He.y>Y.y!=lt.y>Y.y&&Y.x<(lt.x-He.x)*(Y.y-He.y)/(lt.y-He.y)+He.x&&(Ct=!Ct)}return Ct}function Uo(ce,Y){let ye=!1;for(let He=0,lt=ce.length-1;He<ce.length;lt=He++){const Ct=ce[He],It=ce[lt];Ct.y>Y.y!=It.y>Y.y&&Y.x<(It.x-Ct.x)*(Y.y-Ct.y)/(It.y-Ct.y)+Ct.x&&(ye=!ye)}return ye}function io(ce,Y,ye){const He=ye[0],lt=ye[2];if(ce.x<He.x&&Y.x<He.x||ce.x>lt.x&&Y.x>lt.x||ce.y<He.y&&Y.y<He.y||ce.y>lt.y&&Y.y>lt.y)return!1;const Ct=W(ce,Y,ye[0]);return Ct!==W(ce,Y,ye[1])||Ct!==W(ce,Y,ye[2])||Ct!==W(ce,Y,ye[3])}function xi(ce,Y,ye){const He=Y.paint.get(ce).value;return He.kind==="constant"?He.value:ye.programConfigurations.get(Y.id).getMaxValue(ce)}function ga(ce){return Math.sqrt(ce[0]*ce[0]+ce[1]*ce[1])}function Fa(ce,Y,ye,He,lt){if(!Y[0]&&!Y[1])return ce;const Ct=v.convert(Y)._mult(lt);ye==="viewport"&&Ct._rotate(-He);const It=[];for(let nr=0;nr<ce.length;nr++)It.push(ce[nr].sub(Ct));return It}let so,Ua;Io("CircleBucket",ia,{omit:["layers"]});var vs={get paint(){return Ua=Ua||new wt({"circle-radius":new Gu(Te.paint_circle["circle-radius"]),"circle-color":new Gu(Te.paint_circle["circle-color"]),"circle-blur":new Gu(Te.paint_circle["circle-blur"]),"circle-opacity":new Gu(Te.paint_circle["circle-opacity"]),"circle-translate":new Iu(Te.paint_circle["circle-translate"]),"circle-translate-anchor":new Iu(Te.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Iu(Te.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Iu(Te.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Gu(Te.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Gu(Te.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Gu(Te.paint_circle["circle-stroke-opacity"])})},get layout(){return so=so||new wt({"circle-sort-key":new Gu(Te.layout_circle["circle-sort-key"])})}},Po=1e-6,zs=typeof Float32Array<"u"?Float32Array:Array;function Ha(ce){return ce[0]=1,ce[1]=0,ce[2]=0,ce[3]=0,ce[4]=0,ce[5]=1,ce[6]=0,ce[7]=0,ce[8]=0,ce[9]=0,ce[10]=1,ce[11]=0,ce[12]=0,ce[13]=0,ce[14]=0,ce[15]=1,ce}function Ra(ce,Y,ye){var He=Y[0],lt=Y[1],Ct=Y[2],It=Y[3],nr=Y[4],xr=Y[5],Vr=Y[6],hn=Y[7],wn=Y[8],Zn=Y[9],hi=Y[10],Di=Y[11],Xi=Y[12],ya=Y[13],eo=Y[14],us=Y[15],ko=ye[0],es=ye[1],js=ye[2],Pl=ye[3];return ce[0]=ko*He+es*nr+js*wn+Pl*Xi,ce[1]=ko*lt+es*xr+js*Zn+Pl*ya,ce[2]=ko*Ct+es*Vr+js*hi+Pl*eo,ce[3]=ko*It+es*hn+js*Di+Pl*us,ce[4]=(ko=ye[4])*He+(es=ye[5])*nr+(js=ye[6])*wn+(Pl=ye[7])*Xi,ce[5]=ko*lt+es*xr+js*Zn+Pl*ya,ce[6]=ko*Ct+es*Vr+js*hi+Pl*eo,ce[7]=ko*It+es*hn+js*Di+Pl*us,ce[8]=(ko=ye[8])*He+(es=ye[9])*nr+(js=ye[10])*wn+(Pl=ye[11])*Xi,ce[9]=ko*lt+es*xr+js*Zn+Pl*ya,ce[10]=ko*Ct+es*Vr+js*hi+Pl*eo,ce[11]=ko*It+es*hn+js*Di+Pl*us,ce[12]=(ko=ye[12])*He+(es=ye[13])*nr+(js=ye[14])*wn+(Pl=ye[15])*Xi,ce[13]=ko*lt+es*xr+js*Zn+Pl*ya,ce[14]=ko*Ct+es*Vr+js*hi+Pl*eo,ce[15]=ko*It+es*hn+js*Di+Pl*us,ce}Math.hypot||(Math.hypot=function(){for(var ce=0,Y=arguments.length;Y--;)ce+=arguments[Y]*arguments[Y];return Math.sqrt(ce)});var ls,ua=Ra;function Wo(ce,Y,ye){var He=Y[0],lt=Y[1],Ct=Y[2],It=Y[3];return ce[0]=ye[0]*He+ye[4]*lt+ye[8]*Ct+ye[12]*It,ce[1]=ye[1]*He+ye[5]*lt+ye[9]*Ct+ye[13]*It,ce[2]=ye[2]*He+ye[6]*lt+ye[10]*Ct+ye[14]*It,ce[3]=ye[3]*He+ye[7]*lt+ye[11]*Ct+ye[15]*It,ce}ls=new zs(4),zs!=Float32Array&&(ls[0]=0,ls[1]=0,ls[2]=0,ls[3]=0);class Mo extends Ae{constructor(Y){super(Y,vs)}createBucket(Y){return new ia(Y)}queryRadius(Y){const ye=Y;return xi("circle-radius",this,ye)+xi("circle-stroke-width",this,ye)+ga(this.paint.get("circle-translate"))}queryIntersectsFeature(Y,ye,He,lt,Ct,It,nr,xr){const Vr=Fa(Y,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),It.angle,nr),hn=this.paint.get("circle-radius").evaluate(ye,He)+this.paint.get("circle-stroke-width").evaluate(ye,He),wn=this.paint.get("circle-pitch-alignment")==="map",Zn=wn?Vr:(function(Di,Xi){return Di.map(ya=>Hs(ya,Xi))})(Vr,xr),hi=wn?hn*nr:hn;for(const Di of lt)for(const Xi of Di){const ya=wn?Xi:Hs(Xi,xr);let eo=hi;const us=Wo([],[Xi.x,Xi.y,0,1],xr);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?eo*=us[3]/It.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(eo*=It.cameraToCenterDistance/us[3]),zi(Zn,ya,eo))return!0}return!1}}function Hs(ce,Y){const ye=Wo([],[ce.x,ce.y,0,1],Y);return new v(ye[0]/ye[3],ye[1]/ye[3])}class au extends ia{}let ws;Io("HeatmapBucket",au,{omit:["layers"]});var Xs={get paint(){return ws=ws||new wt({"heatmap-radius":new Gu(Te.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Gu(Te.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Iu(Te.paint_heatmap["heatmap-intensity"]),"heatmap-color":new kv(Te.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Iu(Te.paint_heatmap["heatmap-opacity"])})}};function jo(ce,{width:Y,height:ye},He,lt){if(lt){if(lt instanceof Uint8ClampedArray)lt=new Uint8Array(lt.buffer);else if(lt.length!==Y*ye*He)throw new RangeError(`mismatched image size. expected: ${lt.length} but got: ${Y*ye*He}`)}else lt=new Uint8Array(Y*ye*He);return ce.width=Y,ce.height=ye,ce.data=lt,ce}function Jl(ce,{width:Y,height:ye},He){if(Y===ce.width&&ye===ce.height)return;const lt=jo({},{width:Y,height:ye},He);Mu(ce,lt,{x:0,y:0},{x:0,y:0},{width:Math.min(ce.width,Y),height:Math.min(ce.height,ye)},He),ce.width=Y,ce.height=ye,ce.data=lt.data}function Mu(ce,Y,ye,He,lt,Ct){if(lt.width===0||lt.height===0)return Y;if(lt.width>ce.width||lt.height>ce.height||ye.x>ce.width-lt.width||ye.y>ce.height-lt.height)throw new RangeError("out of range source coordinates for image copy");if(lt.width>Y.width||lt.height>Y.height||He.x>Y.width-lt.width||He.y>Y.height-lt.height)throw new RangeError("out of range destination coordinates for image copy");const It=ce.data,nr=Y.data;if(It===nr)throw new Error("srcData equals dstData, so image is already copied");for(let xr=0;xr<lt.height;xr++){const Vr=((ye.y+xr)*ce.width+ye.x)*Ct,hn=((He.y+xr)*Y.width+He.x)*Ct;for(let wn=0;wn<lt.width*Ct;wn++)nr[hn+wn]=It[Vr+wn]}return Y}class Fu{constructor(Y,ye){jo(this,Y,1,ye)}resize(Y){Jl(this,Y,1)}clone(){return new Fu({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(Y,ye,He,lt,Ct){Mu(Y,ye,He,lt,Ct,1)}}class cf{constructor(Y,ye){jo(this,Y,4,ye)}resize(Y){Jl(this,Y,4)}replace(Y,ye){ye?this.data.set(Y):this.data=Y instanceof Uint8ClampedArray?new Uint8Array(Y.buffer):Y}clone(){return new cf({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(Y,ye,He,lt,Ct){Mu(Y,ye,He,lt,Ct,4)}}function zu(ce){const Y={},ye=ce.resolution||256,He=ce.clips?ce.clips.length:1,lt=ce.image||new cf({width:ye,height:He});if(Math.log(ye)/Math.LN2%1!=0)throw new Error(`width is not a power of 2 - ${ye}`);const Ct=(It,nr,xr)=>{Y[ce.evaluationKey]=xr;const Vr=ce.expression.evaluate(Y);lt.data[It+nr+0]=Math.floor(255*Vr.r/Vr.a),lt.data[It+nr+1]=Math.floor(255*Vr.g/Vr.a),lt.data[It+nr+2]=Math.floor(255*Vr.b/Vr.a),lt.data[It+nr+3]=Math.floor(255*Vr.a)};if(ce.clips)for(let It=0,nr=0;It<He;++It,nr+=4*ye)for(let xr=0,Vr=0;xr<ye;xr++,Vr+=4){const hn=xr/(ye-1),{start:wn,end:Zn}=ce.clips[It];Ct(nr,Vr,wn*(1-hn)+Zn*hn)}else for(let It=0,nr=0;It<ye;It++,nr+=4)Ct(0,nr,It/(ye-1));return lt}Io("AlphaImage",Fu),Io("RGBAImage",cf);const mh="big-fb";class Wc extends Ae{createBucket(Y){return new au(Y)}constructor(Y){super(Y,Xs),this.heatmapFbos=new Map,this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(Y){Y==="heatmap-color"&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=zu({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbos.has(mh)&&this.heatmapFbos.delete(mh)}queryRadius(){return 0}queryIntersectsFeature(){return!1}hasOffscreenPass(){return this.paint.get("heatmap-opacity")!==0&&this.visibility!=="none"}}let Zd;var jh={get paint(){return Zd=Zd||new wt({"hillshade-illumination-direction":new Iu(Te.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new Iu(Te.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new Iu(Te.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new Iu(Te.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new Iu(Te.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new Iu(Te.paint_hillshade["hillshade-accent-color"])})}};class fp extends Ae{constructor(Y){super(Y,jh)}hasOffscreenPass(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"}}const Am=ar([{name:"a_pos",components:2,type:"Int16"}],4),{members:_d}=Am;function Hd(ce,Y,ye=2){const He=Y&&Y.length,lt=He?Y[0]*ye:ce.length;let Ct=Ol(ce,0,lt,ye,!0);const It=[];if(!Ct||Ct.next===Ct.prev)return It;let nr,xr,Vr;if(He&&(Ct=(function(hn,wn,Zn,hi){const Di=[];for(let Xi=0,ya=wn.length;Xi<ya;Xi++){const eo=Ol(hn,wn[Xi]*hi,Xi<ya-1?wn[Xi+1]*hi:hn.length,hi,!1);eo===eo.next&&(eo.steiner=!0),Di.push(Fe(eo))}Di.sort(tc);for(let Xi=0;Xi<Di.length;Xi++)Zn=uc(Di[Xi],Zn);return Zn})(ce,Y,Ct,ye)),ce.length>80*ye){nr=1/0,xr=1/0;let hn=-1/0,wn=-1/0;for(let Zn=ye;Zn<lt;Zn+=ye){const hi=ce[Zn],Di=ce[Zn+1];hi<nr&&(nr=hi),Di<xr&&(xr=Di),hi>hn&&(hn=hi),Di>wn&&(wn=Di)}Vr=Math.max(hn-nr,wn-xr),Vr=Vr!==0?32767/Vr:0}return Fc(Ct,It,ye,nr,xr,Vr,0),It}function Ol(ce,Y,ye,He,lt){let Ct;if(lt===(function(It,nr,xr,Vr){let hn=0;for(let wn=nr,Zn=xr-Vr;wn<xr;wn+=Vr)hn+=(It[Zn]-It[wn])*(It[wn+1]+It[Zn+1]),Zn=wn;return hn})(ce,Y,ye,He)>0)for(let It=Y;It<ye;It+=He)Ct=zr(It/He|0,ce[It],ce[It+1],Ct);else for(let It=ye-He;It>=Y;It-=He)Ct=zr(It/He|0,ce[It],ce[It+1],Ct);return Ct&&Yt(Ct,Ct.next)&&(Gr(Ct),Ct=Ct.next),Ct}function dp(ce,Y){if(!ce)return ce;Y||(Y=ce);let ye,He=ce;do if(ye=!1,He.steiner||!Yt(He,He.next)&&At(He.prev,He,He.next)!==0)He=He.next;else{if(Gr(He),He=Y=He.prev,He===He.next)break;ye=!0}while(ye||He!==Y);return Y}function Fc(ce,Y,ye,He,lt,Ct,It){if(!ce)return;!It&&Ct&&(function(xr,Vr,hn,wn){let Zn=xr;do Zn.z===0&&(Zn.z=ne(Zn.x,Zn.y,Vr,hn,wn)),Zn.prevZ=Zn.prev,Zn.nextZ=Zn.next,Zn=Zn.next;while(Zn!==xr);Zn.prevZ.nextZ=null,Zn.prevZ=null,(function(hi){let Di,Xi=1;do{let ya,eo=hi;hi=null;let us=null;for(Di=0;eo;){Di++;let ko=eo,es=0;for(let Pl=0;Pl<Xi&&(es++,ko=ko.nextZ,ko);Pl++);let js=Xi;for(;es>0||js>0&&ko;)es!==0&&(js===0||!ko||eo.z<=ko.z)?(ya=eo,eo=eo.nextZ,es--):(ya=ko,ko=ko.nextZ,js--),us?us.nextZ=ya:hi=ya,ya.prevZ=us,us=ya;eo=ko}us.nextZ=null,Xi*=2}while(Di>1)})(Zn)})(ce,He,lt,Ct);let nr=ce;for(;ce.prev!==ce.next;){const xr=ce.prev,Vr=ce.next;if(Ct?Fp(ce,He,lt,Ct):Hf(ce))Y.push(xr.i,ce.i,Vr.i),Gr(ce),ce=Vr.next,nr=Vr.next;else if((ce=Vr)===nr){It?It===1?Fc(ce=zp(dp(ce),Y),Y,ye,He,lt,Ct,2):It===2&&tu(ce,Y,ye,He,lt,Ct):Fc(dp(ce),Y,ye,He,lt,Ct,1);break}}}function Hf(ce){const Y=ce.prev,ye=ce,He=ce.next;if(At(Y,ye,He)>=0)return!1;const lt=Y.x,Ct=ye.x,It=He.x,nr=Y.y,xr=ye.y,Vr=He.y,hn=lt<Ct?lt<It?lt:It:Ct<It?Ct:It,wn=nr<xr?nr<Vr?nr:Vr:xr<Vr?xr:Vr,Zn=lt>Ct?lt>It?lt:It:Ct>It?Ct:It,hi=nr>xr?nr>Vr?nr:Vr:xr>Vr?xr:Vr;let Di=He.next;for(;Di!==Y;){if(Di.x>=hn&&Di.x<=Zn&&Di.y>=wn&&Di.y<=hi&&me(lt,nr,Ct,xr,It,Vr,Di.x,Di.y)&&At(Di.prev,Di,Di.next)>=0)return!1;Di=Di.next}return!0}function Fp(ce,Y,ye,He){const lt=ce.prev,Ct=ce,It=ce.next;if(At(lt,Ct,It)>=0)return!1;const nr=lt.x,xr=Ct.x,Vr=It.x,hn=lt.y,wn=Ct.y,Zn=It.y,hi=nr<xr?nr<Vr?nr:Vr:xr<Vr?xr:Vr,Di=hn<wn?hn<Zn?hn:Zn:wn<Zn?wn:Zn,Xi=nr>xr?nr>Vr?nr:Vr:xr>Vr?xr:Vr,ya=hn>wn?hn>Zn?hn:Zn:wn>Zn?wn:Zn,eo=ne(hi,Di,Y,ye,He),us=ne(Xi,ya,Y,ye,He);let ko=ce.prevZ,es=ce.nextZ;for(;ko&&ko.z>=eo&&es&&es.z<=us;){if(ko.x>=hi&&ko.x<=Xi&&ko.y>=Di&&ko.y<=ya&&ko!==lt&&ko!==It&&me(nr,hn,xr,wn,Vr,Zn,ko.x,ko.y)&&At(ko.prev,ko,ko.next)>=0||(ko=ko.prevZ,es.x>=hi&&es.x<=Xi&&es.y>=Di&&es.y<=ya&&es!==lt&&es!==It&&me(nr,hn,xr,wn,Vr,Zn,es.x,es.y)&&At(es.prev,es,es.next)>=0))return!1;es=es.nextZ}for(;ko&&ko.z>=eo;){if(ko.x>=hi&&ko.x<=Xi&&ko.y>=Di&&ko.y<=ya&&ko!==lt&&ko!==It&&me(nr,hn,xr,wn,Vr,Zn,ko.x,ko.y)&&At(ko.prev,ko,ko.next)>=0)return!1;ko=ko.prevZ}for(;es&&es.z<=us;){if(es.x>=hi&&es.x<=Xi&&es.y>=Di&&es.y<=ya&&es!==lt&&es!==It&&me(nr,hn,xr,wn,Vr,Zn,es.x,es.y)&&At(es.prev,es,es.next)>=0)return!1;es=es.nextZ}return!0}function zp(ce,Y){let ye=ce;do{const He=ye.prev,lt=ye.next.next;!Yt(He,lt)&&tr(He,ye,ye.next,lt)&&hr(He,lt)&&hr(lt,He)&&(Y.push(He.i,ye.i,lt.i),Gr(ye),Gr(ye.next),ye=ce=lt),ye=ye.next}while(ye!==ce);return dp(ye)}function tu(ce,Y,ye,He,lt,Ct){let It=ce;do{let nr=It.next.next;for(;nr!==It.prev;){if(It.i!==nr.i&&We(It,nr)){let xr=qr(It,nr);return It=dp(It,It.next),xr=dp(xr,xr.next),Fc(It,Y,ye,He,lt,Ct,0),void Fc(xr,Y,ye,He,lt,Ct,0)}nr=nr.next}It=It.next}while(It!==ce)}function tc(ce,Y){return ce.x-Y.x}function uc(ce,Y){const ye=(function(lt,Ct){let It=Ct;const nr=lt.x,xr=lt.y;let Vr,hn=-1/0;do{if(xr<=It.y&&xr>=It.next.y&&It.next.y!==It.y){const Xi=It.x+(xr-It.y)*(It.next.x-It.x)/(It.next.y-It.y);if(Xi<=nr&&Xi>hn&&(hn=Xi,Vr=It.x<It.next.x?It:It.next,Xi===nr))return Vr}It=It.next}while(It!==Ct);if(!Vr)return null;const wn=Vr,Zn=Vr.x,hi=Vr.y;let Di=1/0;It=Vr;do{if(nr>=It.x&&It.x>=Zn&&nr!==It.x&&me(xr<hi?nr:hn,xr,Zn,hi,xr<hi?hn:nr,xr,It.x,It.y)){const Xi=Math.abs(xr-It.y)/(nr-It.x);hr(It,lt)&&(Xi<Di||Xi===Di&&(It.x>Vr.x||It.x===Vr.x&&Xe(Vr,It)))&&(Vr=It,Di=Xi)}It=It.next}while(It!==wn);return Vr})(ce,Y);if(!ye)return Y;const He=qr(ye,ce);return dp(He,He.next),dp(ye,ye.next)}function Xe(ce,Y){return At(ce.prev,ce,Y.prev)<0&&At(Y.next,ce,ce.next)<0}function ne(ce,Y,ye,He,lt){return(ce=1431655765&((ce=858993459&((ce=252645135&((ce=16711935&((ce=(ce-ye)*lt|0)|ce<<8))|ce<<4))|ce<<2))|ce<<1))|(Y=1431655765&((Y=858993459&((Y=252645135&((Y=16711935&((Y=(Y-He)*lt|0)|Y<<8))|Y<<4))|Y<<2))|Y<<1))<<1}function Fe(ce){let Y=ce,ye=ce;do(Y.x<ye.x||Y.x===ye.x&&Y.y<ye.y)&&(ye=Y),Y=Y.next;while(Y!==ce);return ye}function me(ce,Y,ye,He,lt,Ct,It,nr){return(lt-It)*(Y-nr)>=(ce-It)*(Ct-nr)&&(ce-It)*(He-nr)>=(ye-It)*(Y-nr)&&(ye-It)*(Ct-nr)>=(lt-It)*(He-nr)}function We(ce,Y){return ce.next.i!==Y.i&&ce.prev.i!==Y.i&&!(function(ye,He){let lt=ye;do{if(lt.i!==ye.i&&lt.next.i!==ye.i&&lt.i!==He.i&&lt.next.i!==He.i&&tr(lt,lt.next,ye,He))return!0;lt=lt.next}while(lt!==ye);return!1})(ce,Y)&&(hr(ce,Y)&&hr(Y,ce)&&(function(ye,He){let lt=ye,Ct=!1;const It=(ye.x+He.x)/2,nr=(ye.y+He.y)/2;do lt.y>nr!=lt.next.y>nr&&lt.next.y!==lt.y&&It<(lt.next.x-lt.x)*(nr-lt.y)/(lt.next.y-lt.y)+lt.x&&(Ct=!Ct),lt=lt.next;while(lt!==ye);return Ct})(ce,Y)&&(At(ce.prev,ce,Y.prev)||At(ce,Y.prev,Y))||Yt(ce,Y)&&At(ce.prev,ce,ce.next)>0&&At(Y.prev,Y,Y.next)>0)}function At(ce,Y,ye){return(Y.y-ce.y)*(ye.x-Y.x)-(Y.x-ce.x)*(ye.y-Y.y)}function Yt(ce,Y){return ce.x===Y.x&&ce.y===Y.y}function tr(ce,Y,ye,He){const lt=jt(At(ce,Y,ye)),Ct=jt(At(ce,Y,He)),It=jt(At(ye,He,ce)),nr=jt(At(ye,He,Y));return lt!==Ct&&It!==nr||!(lt!==0||!Pt(ce,ye,Y))||!(Ct!==0||!Pt(ce,He,Y))||!(It!==0||!Pt(ye,ce,He))||!(nr!==0||!Pt(ye,Y,He))}function Pt(ce,Y,ye){return Y.x<=Math.max(ce.x,ye.x)&&Y.x>=Math.min(ce.x,ye.x)&&Y.y<=Math.max(ce.y,ye.y)&&Y.y>=Math.min(ce.y,ye.y)}function jt(ce){return ce>0?1:ce<0?-1:0}function hr(ce,Y){return At(ce.prev,ce,ce.next)<0?At(ce,Y,ce.next)>=0&&At(ce,ce.prev,Y)>=0:At(ce,Y,ce.prev)<0||At(ce,ce.next,Y)<0}function qr(ce,Y){const ye=en(ce.i,ce.x,ce.y),He=en(Y.i,Y.x,Y.y),lt=ce.next,Ct=Y.prev;return ce.next=Y,Y.prev=ce,ye.next=lt,lt.prev=ye,He.next=ye,ye.prev=He,Ct.next=He,He.prev=Ct,He}function zr(ce,Y,ye,He){const lt=en(ce,Y,ye);return He?(lt.next=He.next,lt.prev=He,He.next.prev=lt,He.next=lt):(lt.prev=lt,lt.next=lt),lt}function Gr(ce){ce.next.prev=ce.prev,ce.prev.next=ce.next,ce.prevZ&&(ce.prevZ.nextZ=ce.nextZ),ce.nextZ&&(ce.nextZ.prevZ=ce.prevZ)}function en(ce,Y,ye){return{i:ce,x:Y,y:ye,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function Xr(ce,Y,ye){const He=ye.patternDependencies;let lt=!1;for(const Ct of Y){const It=Ct.paint.get(`${ce}-pattern`);It.isConstant()||(lt=!0);const nr=It.constantOr(null);nr&&(lt=!0,He[nr.to]=!0,He[nr.from]=!0)}return lt}function Rr(ce,Y,ye,He,lt){const Ct=lt.patternDependencies;for(const It of Y){const nr=It.paint.get(`${ce}-pattern`).value;if(nr.kind!=="constant"){let xr=nr.evaluate({zoom:He-1},ye,{},lt.availableImages),Vr=nr.evaluate({zoom:He},ye,{},lt.availableImages),hn=nr.evaluate({zoom:He+1},ye,{},lt.availableImages);xr=xr&&xr.name?xr.name:xr,Vr=Vr&&Vr.name?Vr.name:Vr,hn=hn&&hn.name?hn.name:hn,Ct[xr]=!0,Ct[Vr]=!0,Ct[hn]=!0,ye.patterns[It.id]={min:xr,mid:Vr,max:hn}}}return ye}class jr{constructor(Y){this.zoom=Y.zoom,this.overscaling=Y.overscaling,this.layers=Y.layers,this.layerIds=this.layers.map(ye=>ye.id),this.index=Y.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Ih,this.indexArray=new Wr,this.indexArray2=new yn,this.programConfigurations=new Uf(Y.layers,Y.zoom),this.segments=new Pi,this.segments2=new Pi,this.stateDependentLayerIds=this.layers.filter(ye=>ye.isStateDependent()).map(ye=>ye.id)}populate(Y,ye,He){this.hasPattern=Xr("fill",this.layers,ye);const lt=this.layers[0].layout.get("fill-sort-key"),Ct=!lt.isConstant(),It=[];for(const{feature:nr,id:xr,index:Vr,sourceLayerIndex:hn}of Y){const wn=this.layers[0]._featureFilter.needGeometry,Zn=mn(nr,wn);if(!this.layers[0]._featureFilter.filter(new gf(this.zoom),Zn,He))continue;const hi=Ct?lt.evaluate(Zn,{},He,ye.availableImages):void 0,Di={id:xr,properties:nr.properties,type:nr.type,sourceLayerIndex:hn,index:Vr,geometry:wn?Zn.geometry:rr(nr),patterns:{},sortKey:hi};It.push(Di)}Ct&&It.sort((nr,xr)=>nr.sortKey-xr.sortKey);for(const nr of It){const{geometry:xr,index:Vr,sourceLayerIndex:hn}=nr;if(this.hasPattern){const wn=Rr("fill",this.layers,nr,this.zoom,ye);this.patternFeatures.push(wn)}else this.addFeature(nr,xr,Vr,He,{});ye.featureIndex.insert(Y[Vr].feature,xr,Vr,hn,this.index)}}update(Y,ye,He){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(Y,ye,this.stateDependentLayers,He)}addFeatures(Y,ye,He){for(const lt of this.patternFeatures)this.addFeature(lt,lt.geometry,lt.index,ye,He)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(Y){this.uploaded||(this.layoutVertexBuffer=Y.createVertexBuffer(this.layoutVertexArray,_d),this.indexBuffer=Y.createIndexBuffer(this.indexArray),this.indexBuffer2=Y.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(Y),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(Y,ye,He,lt,Ct){for(const It of Hm(ye,500)){let nr=0;for(const hi of It)nr+=hi.length;const xr=this.segments.prepareSegment(nr,this.layoutVertexArray,this.indexArray),Vr=xr.vertexLength,hn=[],wn=[];for(const hi of It){if(hi.length===0)continue;hi!==It[0]&&wn.push(hn.length/2);const Di=this.segments2.prepareSegment(hi.length,this.layoutVertexArray,this.indexArray2),Xi=Di.vertexLength;this.layoutVertexArray.emplaceBack(hi[0].x,hi[0].y),this.indexArray2.emplaceBack(Xi+hi.length-1,Xi),hn.push(hi[0].x),hn.push(hi[0].y);for(let ya=1;ya<hi.length;ya++)this.layoutVertexArray.emplaceBack(hi[ya].x,hi[ya].y),this.indexArray2.emplaceBack(Xi+ya-1,Xi+ya),hn.push(hi[ya].x),hn.push(hi[ya].y);Di.vertexLength+=hi.length,Di.primitiveLength+=hi.length}const Zn=Hd(hn,wn);for(let hi=0;hi<Zn.length;hi+=3)this.indexArray.emplaceBack(Vr+Zn[hi],Vr+Zn[hi+1],Vr+Zn[hi+2]);xr.vertexLength+=nr,xr.primitiveLength+=Zn.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,Y,He,Ct,lt)}}let Br,Bn;Io("FillBucket",jr,{omit:["layers","patternFeatures"]});var ui={get paint(){return Bn=Bn||new wt({"fill-antialias":new Iu(Te.paint_fill["fill-antialias"]),"fill-opacity":new Gu(Te.paint_fill["fill-opacity"]),"fill-color":new Gu(Te.paint_fill["fill-color"]),"fill-outline-color":new Gu(Te.paint_fill["fill-outline-color"]),"fill-translate":new Iu(Te.paint_fill["fill-translate"]),"fill-translate-anchor":new Iu(Te.paint_fill["fill-translate-anchor"]),"fill-pattern":new Ym(Te.paint_fill["fill-pattern"])})},get layout(){return Br=Br||new wt({"fill-sort-key":new Gu(Te.layout_fill["fill-sort-key"])})}};class Ii extends Ae{constructor(Y){super(Y,ui)}recalculate(Y,ye){super.recalculate(Y,ye);const He=this.paint._values["fill-outline-color"];He.value.kind==="constant"&&He.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(Y){return new jr(Y)}queryRadius(){return ga(this.paint.get("fill-translate"))}queryIntersectsFeature(Y,ye,He,lt,Ct,It,nr){return Fi(Fa(Y,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),It.angle,nr),lt)}isTileClipped(){return!0}}const Ga=ar([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),ka=ar([{name:"a_centroid",components:2,type:"Int16"}],4),{members:wa}=Ga;var $a={},Ja=p,wo=Ya;function Ya(ce,Y,ye,He,lt){this.properties={},this.extent=ye,this.type=0,this._pbf=ce,this._geometry=-1,this._keys=He,this._values=lt,ce.readFields(Ro,this,Y)}function Ro(ce,Y,ye){ce==1?Y.id=ye.readVarint():ce==2?(function(He,lt){for(var Ct=He.readVarint()+He.pos;He.pos<Ct;){var It=lt._keys[He.readVarint()],nr=lt._values[He.readVarint()];lt.properties[It]=nr}})(ye,Y):ce==3?Y.type=ye.readVarint():ce==4&&(Y._geometry=ye.pos)}function Xo(ce){for(var Y,ye,He=0,lt=0,Ct=ce.length,It=Ct-1;lt<Ct;It=lt++)He+=((ye=ce[It]).x-(Y=ce[lt]).x)*(Y.y+ye.y);return He}Ya.types=["Unknown","Point","LineString","Polygon"],Ya.prototype.loadGeometry=function(){var ce=this._pbf;ce.pos=this._geometry;for(var Y,ye=ce.readVarint()+ce.pos,He=1,lt=0,Ct=0,It=0,nr=[];ce.pos<ye;){if(lt<=0){var xr=ce.readVarint();He=7&xr,lt=xr>>3}if(lt--,He===1||He===2)Ct+=ce.readSVarint(),It+=ce.readSVarint(),He===1&&(Y&&nr.push(Y),Y=[]),Y.push(new Ja(Ct,It));else{if(He!==7)throw new Error("unknown command "+He);Y&&Y.push(Y[0].clone())}}return Y&&nr.push(Y),nr},Ya.prototype.bbox=function(){var ce=this._pbf;ce.pos=this._geometry;for(var Y=ce.readVarint()+ce.pos,ye=1,He=0,lt=0,Ct=0,It=1/0,nr=-1/0,xr=1/0,Vr=-1/0;ce.pos<Y;){if(He<=0){var hn=ce.readVarint();ye=7&hn,He=hn>>3}if(He--,ye===1||ye===2)(lt+=ce.readSVarint())<It&&(It=lt),lt>nr&&(nr=lt),(Ct+=ce.readSVarint())<xr&&(xr=Ct),Ct>Vr&&(Vr=Ct);else if(ye!==7)throw new Error("unknown command "+ye)}return[It,xr,nr,Vr]},Ya.prototype.toGeoJSON=function(ce,Y,ye){var He,lt,Ct=this.extent*Math.pow(2,ye),It=this.extent*ce,nr=this.extent*Y,xr=this.loadGeometry(),Vr=Ya.types[this.type];function hn(hi){for(var Di=0;Di<hi.length;Di++){var Xi=hi[Di];hi[Di]=[360*(Xi.x+It)/Ct-180,360/Math.PI*Math.atan(Math.exp((180-360*(Xi.y+nr)/Ct)*Math.PI/180))-90]}}switch(this.type){case 1:var wn=[];for(He=0;He<xr.length;He++)wn[He]=xr[He][0];hn(xr=wn);break;case 2:for(He=0;He<xr.length;He++)hn(xr[He]);break;case 3:for(xr=(function(hi){var Di=hi.length;if(Di<=1)return[hi];for(var Xi,ya,eo=[],us=0;us<Di;us++){var ko=Xo(hi[us]);ko!==0&&(ya===void 0&&(ya=ko<0),ya===ko<0?(Xi&&eo.push(Xi),Xi=[hi[us]]):Xi.push(hi[us]))}return Xi&&eo.push(Xi),eo})(xr),He=0;He<xr.length;He++)for(lt=0;lt<xr[He].length;lt++)hn(xr[He][lt])}xr.length===1?xr=xr[0]:Vr="Multi"+Vr;var Zn={type:"Feature",geometry:{type:Vr,coordinates:xr},properties:this.properties};return"id"in this&&(Zn.id=this.id),Zn};var Rs=wo,Qs=cc;function cc(ce,Y){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=ce,this._keys=[],this._values=[],this._features=[],ce.readFields(ac,this,Y),this.length=this._features.length}function ac(ce,Y,ye){ce===15?Y.version=ye.readVarint():ce===1?Y.name=ye.readString():ce===5?Y.extent=ye.readVarint():ce===2?Y._features.push(ye.pos):ce===3?Y._keys.push(ye.readString()):ce===4&&Y._values.push((function(He){for(var lt=null,Ct=He.readVarint()+He.pos;He.pos<Ct;){var It=He.readVarint()>>3;lt=It===1?He.readString():It===2?He.readFloat():It===3?He.readDouble():It===4?He.readVarint64():It===5?He.readVarint():It===6?He.readSVarint():It===7?He.readBoolean():null}return lt})(ye))}cc.prototype.feature=function(ce){if(ce<0||ce>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[ce];var Y=this._pbf.readVarint()+this._pbf.pos;return new Rs(this._pbf,Y,this.extent,this._keys,this._values)};var yf=Qs;function ff(ce,Y,ye){if(ce===3){var He=new yf(ye,ye.readVarint()+ye.pos);He.length&&(Y[He.name]=He)}}$a.VectorTile=function(ce,Y){this.layers=ce.readFields(ff,{},Y)},$a.VectorTileFeature=wo,$a.VectorTileLayer=Qs;const _f=$a.VectorTileFeature.types,bf=Math.pow(2,13);function hp(ce,Y,ye,He,lt,Ct,It,nr){ce.emplaceBack(Y,ye,2*Math.floor(He*bf)+It,lt*bf*2,Ct*bf*2,Math.round(nr))}class af{constructor(Y){this.zoom=Y.zoom,this.overscaling=Y.overscaling,this.layers=Y.layers,this.layerIds=this.layers.map(ye=>ye.id),this.index=Y.index,this.hasPattern=!1,this.layoutVertexArray=new Ep,this.centroidVertexArray=new Ec,this.indexArray=new Wr,this.programConfigurations=new Uf(Y.layers,Y.zoom),this.segments=new Pi,this.stateDependentLayerIds=this.layers.filter(ye=>ye.isStateDependent()).map(ye=>ye.id)}populate(Y,ye,He){this.features=[],this.hasPattern=Xr("fill-extrusion",this.layers,ye);for(const{feature:lt,id:Ct,index:It,sourceLayerIndex:nr}of Y){const xr=this.layers[0]._featureFilter.needGeometry,Vr=mn(lt,xr);if(!this.layers[0]._featureFilter.filter(new gf(this.zoom),Vr,He))continue;const hn={id:Ct,sourceLayerIndex:nr,index:It,geometry:xr?Vr.geometry:rr(lt),properties:lt.properties,type:lt.type,patterns:{}};this.hasPattern?this.features.push(Rr("fill-extrusion",this.layers,hn,this.zoom,ye)):this.addFeature(hn,hn.geometry,It,He,{}),ye.featureIndex.insert(lt,hn.geometry,It,nr,this.index,!0)}}addFeatures(Y,ye,He){for(const lt of this.features){const{geometry:Ct}=lt;this.addFeature(lt,Ct,lt.index,ye,He)}}update(Y,ye,He){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(Y,ye,this.stateDependentLayers,He)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(Y){this.uploaded||(this.layoutVertexBuffer=Y.createVertexBuffer(this.layoutVertexArray,wa),this.centroidVertexBuffer=Y.createVertexBuffer(this.centroidVertexArray,ka.members,!0),this.indexBuffer=Y.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(Y),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(Y,ye,He,lt,Ct){for(const It of Hm(ye,500)){const nr={x:0,y:0,vertexCount:0};let xr=0;for(const Di of It)xr+=Di.length;let Vr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(const Di of It){if(Di.length===0||Ig(Di))continue;let Xi=0;for(let ya=0;ya<Di.length;ya++){const eo=Di[ya];if(ya>=1){const us=Di[ya-1];if(!ch(eo,us)){Vr.vertexLength+4>Pi.MAX_VERTEX_ARRAY_LENGTH&&(Vr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const ko=eo.sub(us)._perp()._unit(),es=us.dist(eo);Xi+es>32768&&(Xi=0),hp(this.layoutVertexArray,eo.x,eo.y,ko.x,ko.y,0,0,Xi),hp(this.layoutVertexArray,eo.x,eo.y,ko.x,ko.y,0,1,Xi),nr.x+=2*eo.x,nr.y+=2*eo.y,nr.vertexCount+=2,Xi+=es,hp(this.layoutVertexArray,us.x,us.y,ko.x,ko.y,0,0,Xi),hp(this.layoutVertexArray,us.x,us.y,ko.x,ko.y,0,1,Xi),nr.x+=2*us.x,nr.y+=2*us.y,nr.vertexCount+=2;const js=Vr.vertexLength;this.indexArray.emplaceBack(js,js+2,js+1),this.indexArray.emplaceBack(js+1,js+2,js+3),Vr.vertexLength+=4,Vr.primitiveLength+=2}}}}if(Vr.vertexLength+xr>Pi.MAX_VERTEX_ARRAY_LENGTH&&(Vr=this.segments.prepareSegment(xr,this.layoutVertexArray,this.indexArray)),_f[Y.type]!=="Polygon")continue;const hn=[],wn=[],Zn=Vr.vertexLength;for(const Di of It)if(Di.length!==0){Di!==It[0]&&wn.push(hn.length/2);for(let Xi=0;Xi<Di.length;Xi++){const ya=Di[Xi];hp(this.layoutVertexArray,ya.x,ya.y,0,0,1,1,0),nr.x+=ya.x,nr.y+=ya.y,nr.vertexCount+=1,hn.push(ya.x),hn.push(ya.y)}}const hi=Hd(hn,wn);for(let Di=0;Di<hi.length;Di+=3)this.indexArray.emplaceBack(Zn+hi[Di],Zn+hi[Di+2],Zn+hi[Di+1]);Vr.primitiveLength+=hi.length/3,Vr.vertexLength+=xr;for(let Di=0;Di<nr.vertexCount;Di++){const Xi=Math.floor(nr.x/nr.vertexCount),ya=Math.floor(nr.y/nr.vertexCount);this.centroidVertexArray.emplaceBack(Xi,ya)}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,Y,He,Ct,lt)}}function ch(ce,Y){return ce.x===Y.x&&(ce.x<0||ce.x>cd)||ce.y===Y.y&&(ce.y<0||ce.y>cd)}function Ig(ce){return ce.every(Y=>Y.x<0)||ce.every(Y=>Y.x>cd)||ce.every(Y=>Y.y<0)||ce.every(Y=>Y.y>cd)}let R0;Io("FillExtrusionBucket",af,{omit:["layers","features"]});var Tw={get paint(){return R0=R0||new wt({"fill-extrusion-opacity":new Iu(Te["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Gu(Te["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Iu(Te["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Iu(Te["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Ym(Te["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Gu(Te["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Gu(Te["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Iu(Te["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class Ew extends Ae{constructor(Y){super(Y,Tw)}createBucket(Y){return new af(Y)}queryRadius(){return ga(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(Y,ye,He,lt,Ct,It,nr,xr){const Vr=Fa(Y,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),It.angle,nr),hn=this.paint.get("fill-extrusion-height").evaluate(ye,He),wn=this.paint.get("fill-extrusion-base").evaluate(ye,He),Zn=(function(Di,Xi,ya,eo){const us=[];for(const ko of Di){const es=[ko.x,ko.y,0,1];Wo(es,es,Xi),us.push(new v(es[0]/es[3],es[1]/es[3]))}return us})(Vr,xr),hi=(function(Di,Xi,ya,eo){const us=[],ko=[],es=eo[8]*Xi,js=eo[9]*Xi,Pl=eo[10]*Xi,Lu=eo[11]*Xi,df=eo[8]*ya,$u=eo[9]*ya,Pu=eo[10]*ya,Ic=eo[11]*ya;for(const xc of Di){const fc=[],hl=[];for(const Hc of xc){const Pc=Hc.x,Nf=Hc.y,fm=eo[0]*Pc+eo[4]*Nf+eo[12],Gv=eo[1]*Pc+eo[5]*Nf+eo[13],l1=eo[2]*Pc+eo[6]*Nf+eo[14],k_=eo[3]*Pc+eo[7]*Nf+eo[15],k0=l1+Pl,Oy=k_+Lu,Bx=fm+df,Ux=Gv+$u,Hx=l1+Pu,Pg=k_+Ic,u1=new v((fm+es)/Oy,(Gv+js)/Oy);u1.z=k0/Oy,fc.push(u1);const ix=new v(Bx/Pg,Ux/Pg);ix.z=Hx/Pg,hl.push(ix)}us.push(fc),ko.push(hl)}return[us,ko]})(lt,wn,hn,xr);return(function(Di,Xi,ya){let eo=1/0;Fi(ya,Xi)&&(eo=A2(ya,Xi[0]));for(let us=0;us<Xi.length;us++){const ko=Xi[us],es=Di[us];for(let js=0;js<ko.length-1;js++){const Pl=ko[js],Lu=[Pl,ko[js+1],es[js+1],es[js],Pl];Wa(ya,Lu)&&(eo=Math.min(eo,A2(ya,Lu)))}}return eo!==1/0&&eo})(hi[0],hi[1],Zn)}}function ex(ce,Y){return ce.x*Y.x+ce.y*Y.y}function A2(ce,Y){if(ce.length===1){let ye=0;const He=Y[ye++];let lt;for(;!lt||He.equals(lt);)if(lt=Y[ye++],!lt)return 1/0;for(;ye<Y.length;ye++){const Ct=Y[ye],It=ce[0],nr=lt.sub(He),xr=Ct.sub(He),Vr=It.sub(He),hn=ex(nr,nr),wn=ex(nr,xr),Zn=ex(xr,xr),hi=ex(Vr,nr),Di=ex(Vr,xr),Xi=hn*Zn-wn*wn,ya=(Zn*hi-wn*Di)/Xi,eo=(hn*Di-wn*hi)/Xi,us=He.z*(1-ya-eo)+lt.z*ya+Ct.z*eo;if(isFinite(us))return us}return 1/0}{let ye=1/0;for(const He of Y)ye=Math.min(ye,He.z);return ye}}const uC=ar([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),{members:RS}=uC,tx=ar([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),{members:kS}=tx,zx=$a.VectorTileFeature.types,rx=Math.cos(Math.PI/180*37.5),Aw=Math.pow(2,14)/.5;class C2{constructor(Y){this.zoom=Y.zoom,this.overscaling=Y.overscaling,this.layers=Y.layers,this.layerIds=this.layers.map(ye=>ye.id),this.index=Y.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(ye=>{this.gradients[ye.id]={}}),this.layoutVertexArray=new Iv,this.layoutVertexArray2=new $e,this.indexArray=new Wr,this.programConfigurations=new Uf(Y.layers,Y.zoom),this.segments=new Pi,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(ye=>ye.isStateDependent()).map(ye=>ye.id)}populate(Y,ye,He){this.hasPattern=Xr("line",this.layers,ye);const lt=this.layers[0].layout.get("line-sort-key"),Ct=!lt.isConstant(),It=[];for(const{feature:nr,id:xr,index:Vr,sourceLayerIndex:hn}of Y){const wn=this.layers[0]._featureFilter.needGeometry,Zn=mn(nr,wn);if(!this.layers[0]._featureFilter.filter(new gf(this.zoom),Zn,He))continue;const hi=Ct?lt.evaluate(Zn,{},He):void 0,Di={id:xr,properties:nr.properties,type:nr.type,sourceLayerIndex:hn,index:Vr,geometry:wn?Zn.geometry:rr(nr),patterns:{},sortKey:hi};It.push(Di)}Ct&&It.sort((nr,xr)=>nr.sortKey-xr.sortKey);for(const nr of It){const{geometry:xr,index:Vr,sourceLayerIndex:hn}=nr;if(this.hasPattern){const wn=Rr("line",this.layers,nr,this.zoom,ye);this.patternFeatures.push(wn)}else this.addFeature(nr,xr,Vr,He,{});ye.featureIndex.insert(Y[Vr].feature,xr,Vr,hn,this.index)}}update(Y,ye,He){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(Y,ye,this.stateDependentLayers,He)}addFeatures(Y,ye,He){for(const lt of this.patternFeatures)this.addFeature(lt,lt.geometry,lt.index,ye,He)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(Y){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=Y.createVertexBuffer(this.layoutVertexArray2,kS)),this.layoutVertexBuffer=Y.createVertexBuffer(this.layoutVertexArray,RS),this.indexBuffer=Y.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(Y),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(Y){if(Y.properties&&Object.prototype.hasOwnProperty.call(Y.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(Y.properties,"mapbox_clip_end"))return{start:+Y.properties.mapbox_clip_start,end:+Y.properties.mapbox_clip_end}}addFeature(Y,ye,He,lt,Ct){const It=this.layers[0].layout,nr=It.get("line-join").evaluate(Y,{}),xr=It.get("line-cap"),Vr=It.get("line-miter-limit"),hn=It.get("line-round-limit");this.lineClips=this.lineFeatureClips(Y);for(const wn of ye)this.addLine(wn,Y,nr,xr,Vr,hn);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,Y,He,Ct,lt)}addLine(Y,ye,He,lt,Ct,It){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let eo=0;eo<Y.length-1;eo++)this.totalDistance+=Y[eo].dist(Y[eo+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}const nr=zx[ye.type]==="Polygon";let xr=Y.length;for(;xr>=2&&Y[xr-1].equals(Y[xr-2]);)xr--;let Vr=0;for(;Vr<xr-1&&Y[Vr].equals(Y[Vr+1]);)Vr++;if(xr<(nr?3:2))return;He==="bevel"&&(Ct=1.05);const hn=this.overscaling<=16?15*cd/(512*this.overscaling):0,wn=this.segments.prepareSegment(10*xr,this.layoutVertexArray,this.indexArray);let Zn,hi,Di,Xi,ya;this.e1=this.e2=-1,nr&&(Zn=Y[xr-2],ya=Y[Vr].sub(Zn)._unit()._perp());for(let eo=Vr;eo<xr;eo++){if(Di=eo===xr-1?nr?Y[Vr+1]:void 0:Y[eo+1],Di&&Y[eo].equals(Di))continue;ya&&(Xi=ya),Zn&&(hi=Zn),Zn=Y[eo],ya=Di?Di.sub(Zn)._unit()._perp():Xi,Xi=Xi||ya;let us=Xi.add(ya);us.x===0&&us.y===0||us._unit();const ko=Xi.x*ya.x+Xi.y*ya.y,es=us.x*ya.x+us.y*ya.y,js=es!==0?1/es:1/0,Pl=2*Math.sqrt(2-2*es),Lu=es<rx&&hi&&Di,df=Xi.x*ya.y-Xi.y*ya.x>0;if(Lu&&eo>Vr){const Ic=Zn.dist(hi);if(Ic>2*hn){const xc=Zn.sub(Zn.sub(hi)._mult(hn/Ic)._round());this.updateDistance(hi,xc),this.addCurrentVertex(xc,Xi,0,0,wn),hi=xc}}const $u=hi&&Di;let Pu=$u?He:nr?"butt":lt;if($u&&Pu==="round"&&(js<It?Pu="miter":js<=2&&(Pu="fakeround")),Pu==="miter"&&js>Ct&&(Pu="bevel"),Pu==="bevel"&&(js>2&&(Pu="flipbevel"),js<Ct&&(Pu="miter")),hi&&this.updateDistance(hi,Zn),Pu==="miter")us._mult(js),this.addCurrentVertex(Zn,us,0,0,wn);else if(Pu==="flipbevel"){if(js>100)us=ya.mult(-1);else{const Ic=js*Xi.add(ya).mag()/Xi.sub(ya).mag();us._perp()._mult(Ic*(df?-1:1))}this.addCurrentVertex(Zn,us,0,0,wn),this.addCurrentVertex(Zn,us.mult(-1),0,0,wn)}else if(Pu==="bevel"||Pu==="fakeround"){const Ic=-Math.sqrt(js*js-1),xc=df?Ic:0,fc=df?0:Ic;if(hi&&this.addCurrentVertex(Zn,Xi,xc,fc,wn),Pu==="fakeround"){const hl=Math.round(180*Pl/Math.PI/20);for(let Hc=1;Hc<hl;Hc++){let Pc=Hc/hl;if(Pc!==.5){const fm=Pc-.5;Pc+=Pc*fm*(Pc-1)*((1.0904+ko*(ko*(3.55645-1.43519*ko)-3.2452))*fm*fm+(.848013+ko*(.215638*ko-1.06021)))}const Nf=ya.sub(Xi)._mult(Pc)._add(Xi)._unit()._mult(df?-1:1);this.addHalfVertex(Zn,Nf.x,Nf.y,!1,df,0,wn)}}Di&&this.addCurrentVertex(Zn,ya,-xc,-fc,wn)}else if(Pu==="butt")this.addCurrentVertex(Zn,us,0,0,wn);else if(Pu==="square"){const Ic=hi?1:-1;this.addCurrentVertex(Zn,us,Ic,Ic,wn)}else Pu==="round"&&(hi&&(this.addCurrentVertex(Zn,Xi,0,0,wn),this.addCurrentVertex(Zn,Xi,1,1,wn,!0)),Di&&(this.addCurrentVertex(Zn,ya,-1,-1,wn,!0),this.addCurrentVertex(Zn,ya,0,0,wn)));if(Lu&&eo<xr-1){const Ic=Zn.dist(Di);if(Ic>2*hn){const xc=Zn.add(Di.sub(Zn)._mult(hn/Ic)._round());this.updateDistance(Zn,xc),this.addCurrentVertex(xc,ya,0,0,wn),Zn=xc}}}}addCurrentVertex(Y,ye,He,lt,Ct,It=!1){const nr=ye.y*lt-ye.x,xr=-ye.y-ye.x*lt;this.addHalfVertex(Y,ye.x+ye.y*He,ye.y-ye.x*He,It,!1,He,Ct),this.addHalfVertex(Y,nr,xr,It,!0,-lt,Ct),this.distance>Aw/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(Y,ye,He,lt,Ct,It))}addHalfVertex({x:Y,y:ye},He,lt,Ct,It,nr,xr){const Vr=.5*(this.lineClips?this.scaledDistance*(Aw-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((Y<<1)+(Ct?1:0),(ye<<1)+(It?1:0),Math.round(63*He)+128,Math.round(63*lt)+128,1+(nr===0?0:nr<0?-1:1)|(63&Vr)<<2,Vr>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const hn=xr.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,hn),xr.primitiveLength++),It?this.e2=hn:this.e1=hn}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(Y,ye){this.distance+=Y.dist(ye),this.updateScaledDistance()}}let Cw,zR;Io("LineBucket",C2,{omit:["layers","patternFeatures"]});var cC={get paint(){return zR=zR||new wt({"line-opacity":new Gu(Te.paint_line["line-opacity"]),"line-color":new Gu(Te.paint_line["line-color"]),"line-translate":new Iu(Te.paint_line["line-translate"]),"line-translate-anchor":new Iu(Te.paint_line["line-translate-anchor"]),"line-width":new Gu(Te.paint_line["line-width"]),"line-gap-width":new Gu(Te.paint_line["line-gap-width"]),"line-offset":new Gu(Te.paint_line["line-offset"]),"line-blur":new Gu(Te.paint_line["line-blur"]),"line-dasharray":new Vv(Te.paint_line["line-dasharray"]),"line-pattern":new Ym(Te.paint_line["line-pattern"]),"line-gradient":new kv(Te.paint_line["line-gradient"])})},get layout(){return Cw=Cw||new wt({"line-cap":new Iu(Te.layout_line["line-cap"]),"line-join":new Gu(Te.layout_line["line-join"]),"line-miter-limit":new Iu(Te.layout_line["line-miter-limit"]),"line-round-limit":new Iu(Te.layout_line["line-round-limit"]),"line-sort-key":new Gu(Te.layout_line["line-sort-key"])})}};class Dy extends Gu{possiblyEvaluate(Y,ye){return ye=new gf(Math.floor(ye.zoom),{now:ye.now,fadeDuration:ye.fadeDuration,zoomHistory:ye.zoomHistory,transition:ye.transition}),super.possiblyEvaluate(Y,ye)}evaluate(Y,ye,He,lt){return ye=F({},ye,{zoom:Math.floor(ye.zoom)}),super.evaluate(Y,ye,He,lt)}}let fC;class BR extends Ae{constructor(Y){super(Y,cC),this.gradientVersion=0,fC||(fC=new Dy(cC.paint.properties["line-width"].specification),fC.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(Y){if(Y==="line-gradient"){const ye=this.gradientExpression();this.stepInterpolant=!!(function(He){return He._styleExpression!==void 0})(ye)&&ye._styleExpression.expression instanceof Ea,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(Y,ye){super.recalculate(Y,ye),this.paint._values["line-floorwidth"]=fC.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,Y)}createBucket(Y){return new C2(Y)}queryRadius(Y){const ye=Y,He=j1(xi("line-width",this,ye),xi("line-gap-width",this,ye)),lt=xi("line-offset",this,ye);return He/2+Math.abs(lt)+ga(this.paint.get("line-translate"))}queryIntersectsFeature(Y,ye,He,lt,Ct,It,nr){const xr=Fa(Y,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),It.angle,nr),Vr=nr/2*j1(this.paint.get("line-width").evaluate(ye,He),this.paint.get("line-gap-width").evaluate(ye,He)),hn=this.paint.get("line-offset").evaluate(ye,He);return hn&&(lt=(function(wn,Zn){const hi=[];for(let Di=0;Di<wn.length;Di++){const Xi=wn[Di],ya=[];for(let eo=0;eo<Xi.length;eo++){const us=Xi[eo-1],ko=Xi[eo],es=Xi[eo+1],js=eo===0?new v(0,0):ko.sub(us)._unit()._perp(),Pl=eo===Xi.length-1?new v(0,0):es.sub(ko)._unit()._perp(),Lu=js._add(Pl)._unit(),df=Lu.x*Pl.x+Lu.y*Pl.y;df!==0&&Lu._mult(1/df),ya.push(Lu._mult(Zn)._add(ko))}hi.push(ya)}return hi})(lt,hn*nr)),(function(wn,Zn,hi){for(let Di=0;Di<Zn.length;Di++){const Xi=Zn[Di];if(wn.length>=3){for(let ya=0;ya<Xi.length;ya++)if(Uo(wn,Xi[ya]))return!0}if(Ao(wn,Xi,hi))return!0}return!1})(xr,lt,Vr)}isTileClipped(){return!0}}function j1(ce,Y){return Y>0?Y+2*ce:ce}const WM=ar([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),OI=ar([{name:"a_projected_pos",components:3,type:"Float32"}],4);ar([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const NI=ar([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);ar([{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 UR=ar([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),YM=ar([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function XM(ce,Y,ye){return ce.sections.forEach(He=>{He.text=(function(lt,Ct,It){const nr=Ct.layout.get("text-transform").evaluate(It,{});return nr==="uppercase"?lt=lt.toLocaleUpperCase():nr==="lowercase"&&(lt=lt.toLocaleLowerCase()),Bf.applyArabicShaping&&(lt=Bf.applyArabicShaping(lt)),lt})(He.text,Y,ye)}),ce}ar([{name:"triangle",components:3,type:"Uint16"}]),ar([{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"}]),ar([{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"}]),ar([{type:"Float32",name:"offsetX"}]),ar([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),ar([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);const Cm={"!":"︕","#":"＃",$:"＄","%":"％","&":"＆","(":"︵",")":"︶","*":"＊","+":"＋",",":"︐","-":"︲",".":"・","/":"／",":":"︓",";":"︔","<":"︿","=":"＝",">":"﹀","?":"︖","@":"＠","[":"﹇","\\":"＼","]":"﹈","^":"＾",_:"︳","`":"｀","{":"︷","|":"―","}":"︸","~":"～","¢":"￠","£":"￡","¥":"￥","¦":"￤","¬":"￢","¯":"￣","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"￦","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","！":"︕","（":"︵","）":"︶","，":"︐","－":"︲","．":"・","：":"︓","；":"︔","＜":"︿","＞":"﹀","？":"︖","［":"﹇","］":"﹈","＿":"︳","｛":"︷","｜":"―","｝":"︸","｟":"︵","｠":"︶","｡":"︒","｢":"﹁","｣":"﹂"};var Bp=24,nx=gv,HR=function(ce,Y,ye,He,lt){var Ct,It,nr=8*lt-He-1,xr=(1<<nr)-1,Vr=xr>>1,hn=-7,wn=lt-1,Zn=-1,hi=ce[Y+wn];for(wn+=Zn,Ct=hi&(1<<-hn)-1,hi>>=-hn,hn+=nr;hn>0;Ct=256*Ct+ce[Y+wn],wn+=Zn,hn-=8);for(It=Ct&(1<<-hn)-1,Ct>>=-hn,hn+=He;hn>0;It=256*It+ce[Y+wn],wn+=Zn,hn-=8);if(Ct===0)Ct=1-Vr;else{if(Ct===xr)return It?NaN:1/0*(hi?-1:1);It+=Math.pow(2,He),Ct-=Vr}return(hi?-1:1)*It*Math.pow(2,Ct-He)},FI=function(ce,Y,ye,He,lt,Ct){var It,nr,xr,Vr=8*Ct-lt-1,hn=(1<<Vr)-1,wn=hn>>1,Zn=lt===23?Math.pow(2,-24)-Math.pow(2,-77):0,hi=0,Di=1,Xi=Y<0||Y===0&&1/Y<0?1:0;for(Y=Math.abs(Y),isNaN(Y)||Y===1/0?(nr=isNaN(Y)?1:0,It=hn):(It=Math.floor(Math.log(Y)/Math.LN2),Y*(xr=Math.pow(2,-It))<1&&(It--,xr*=2),(Y+=It+wn>=1?Zn/xr:Zn*Math.pow(2,1-wn))*xr>=2&&(It++,xr/=2),It+wn>=hn?(nr=0,It=hn):It+wn>=1?(nr=(Y*xr-1)*Math.pow(2,lt),It+=wn):(nr=Y*Math.pow(2,wn-1)*Math.pow(2,lt),It=0));lt>=8;ce[ye+hi]=255&nr,hi+=Di,nr/=256,lt-=8);for(It=It<<lt|nr,Vr+=lt;Vr>0;ce[ye+hi]=255&It,hi+=Di,It/=256,Vr-=8);ce[ye+hi-Di]|=128*Xi};function gv(ce){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(ce)?ce:new Uint8Array(ce||0),this.pos=0,this.type=0,this.length=this.buf.length}gv.Varint=0,gv.Fixed64=1,gv.Bytes=2,gv.Fixed32=5;var X4=4294967296,ZM=1/X4,P6=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");function Mw(ce){return ce.type===gv.Bytes?ce.readVarint()+ce.pos:ce.pos+1}function KM(ce,Y,ye){return ye?4294967296*Y+(ce>>>0):4294967296*(Y>>>0)+(ce>>>0)}function D6(ce,Y,ye){var He=Y<=16383?1:Y<=2097151?2:Y<=268435455?3:Math.floor(Math.log(Y)/(7*Math.LN2));ye.realloc(He);for(var lt=ye.pos-1;lt>=ce;lt--)ye.buf[lt+He]=ye.buf[lt]}function Z4(ce,Y){for(var ye=0;ye<ce.length;ye++)Y.writeVarint(ce[ye])}function NK(ce,Y){for(var ye=0;ye<ce.length;ye++)Y.writeSVarint(ce[ye])}function FK(ce,Y){for(var ye=0;ye<ce.length;ye++)Y.writeFloat(ce[ye])}function zK(ce,Y){for(var ye=0;ye<ce.length;ye++)Y.writeDouble(ce[ye])}function BK(ce,Y){for(var ye=0;ye<ce.length;ye++)Y.writeBoolean(ce[ye])}function UK(ce,Y){for(var ye=0;ye<ce.length;ye++)Y.writeFixed32(ce[ye])}function HK(ce,Y){for(var ye=0;ye<ce.length;ye++)Y.writeSFixed32(ce[ye])}function jK(ce,Y){for(var ye=0;ye<ce.length;ye++)Y.writeFixed64(ce[ye])}function L6(ce,Y){for(var ye=0;ye<ce.length;ye++)Y.writeSFixed64(ce[ye])}function O6(ce,Y){return(ce[Y]|ce[Y+1]<<8|ce[Y+2]<<16)+16777216*ce[Y+3]}function zI(ce,Y,ye){ce[ye]=Y,ce[ye+1]=Y>>>8,ce[ye+2]=Y>>>16,ce[ye+3]=Y>>>24}function KU(ce,Y){return(ce[Y]|ce[Y+1]<<8|ce[Y+2]<<16)+(ce[Y+3]<<24)}gv.prototype={destroy:function(){this.buf=null},readFields:function(ce,Y,ye){for(ye=ye||this.length;this.pos<ye;){var He=this.readVarint(),lt=He>>3,Ct=this.pos;this.type=7&He,ce(lt,Y,this),this.pos===Ct&&this.skip(He)}return Y},readMessage:function(ce,Y){return this.readFields(ce,Y,this.readVarint()+this.pos)},readFixed32:function(){var ce=O6(this.buf,this.pos);return this.pos+=4,ce},readSFixed32:function(){var ce=KU(this.buf,this.pos);return this.pos+=4,ce},readFixed64:function(){var ce=O6(this.buf,this.pos)+O6(this.buf,this.pos+4)*X4;return this.pos+=8,ce},readSFixed64:function(){var ce=O6(this.buf,this.pos)+KU(this.buf,this.pos+4)*X4;return this.pos+=8,ce},readFloat:function(){var ce=HR(this.buf,this.pos,!0,23,4);return this.pos+=4,ce},readDouble:function(){var ce=HR(this.buf,this.pos,!0,52,8);return this.pos+=8,ce},readVarint:function(ce){var Y,ye,He=this.buf;return Y=127&(ye=He[this.pos++]),ye<128?Y:(Y|=(127&(ye=He[this.pos++]))<<7,ye<128?Y:(Y|=(127&(ye=He[this.pos++]))<<14,ye<128?Y:(Y|=(127&(ye=He[this.pos++]))<<21,ye<128?Y:(function(lt,Ct,It){var nr,xr,Vr=It.buf;if(nr=(112&(xr=Vr[It.pos++]))>>4,xr<128||(nr|=(127&(xr=Vr[It.pos++]))<<3,xr<128)||(nr|=(127&(xr=Vr[It.pos++]))<<10,xr<128)||(nr|=(127&(xr=Vr[It.pos++]))<<17,xr<128)||(nr|=(127&(xr=Vr[It.pos++]))<<24,xr<128)||(nr|=(1&(xr=Vr[It.pos++]))<<31,xr<128))return KM(lt,nr,Ct);throw new Error("Expected varint not more than 10 bytes")})(Y|=(15&(ye=He[this.pos]))<<28,ce,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var ce=this.readVarint();return ce%2==1?(ce+1)/-2:ce/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var ce=this.readVarint()+this.pos,Y=this.pos;return this.pos=ce,ce-Y>=12&&P6?(function(ye,He,lt){return P6.decode(ye.subarray(He,lt))})(this.buf,Y,ce):(function(ye,He,lt){for(var Ct="",It=He;It<lt;){var nr,xr,Vr,hn=ye[It],wn=null,Zn=hn>239?4:hn>223?3:hn>191?2:1;if(It+Zn>lt)break;Zn===1?hn<128&&(wn=hn):Zn===2?(192&(nr=ye[It+1]))==128&&(wn=(31&hn)<<6|63&nr)<=127&&(wn=null):Zn===3?(xr=ye[It+2],(192&(nr=ye[It+1]))==128&&(192&xr)==128&&((wn=(15&hn)<<12|(63&nr)<<6|63&xr)<=2047||wn>=55296&&wn<=57343)&&(wn=null)):Zn===4&&(xr=ye[It+2],Vr=ye[It+3],(192&(nr=ye[It+1]))==128&&(192&xr)==128&&(192&Vr)==128&&((wn=(15&hn)<<18|(63&nr)<<12|(63&xr)<<6|63&Vr)<=65535||wn>=1114112)&&(wn=null)),wn===null?(wn=65533,Zn=1):wn>65535&&(wn-=65536,Ct+=String.fromCharCode(wn>>>10&1023|55296),wn=56320|1023&wn),Ct+=String.fromCharCode(wn),It+=Zn}return Ct})(this.buf,Y,ce)},readBytes:function(){var ce=this.readVarint()+this.pos,Y=this.buf.subarray(this.pos,ce);return this.pos=ce,Y},readPackedVarint:function(ce,Y){if(this.type!==gv.Bytes)return ce.push(this.readVarint(Y));var ye=Mw(this);for(ce=ce||[];this.pos<ye;)ce.push(this.readVarint(Y));return ce},readPackedSVarint:function(ce){if(this.type!==gv.Bytes)return ce.push(this.readSVarint());var Y=Mw(this);for(ce=ce||[];this.pos<Y;)ce.push(this.readSVarint());return ce},readPackedBoolean:function(ce){if(this.type!==gv.Bytes)return ce.push(this.readBoolean());var Y=Mw(this);for(ce=ce||[];this.pos<Y;)ce.push(this.readBoolean());return ce},readPackedFloat:function(ce){if(this.type!==gv.Bytes)return ce.push(this.readFloat());var Y=Mw(this);for(ce=ce||[];this.pos<Y;)ce.push(this.readFloat());return ce},readPackedDouble:function(ce){if(this.type!==gv.Bytes)return ce.push(this.readDouble());var Y=Mw(this);for(ce=ce||[];this.pos<Y;)ce.push(this.readDouble());return ce},readPackedFixed32:function(ce){if(this.type!==gv.Bytes)return ce.push(this.readFixed32());var Y=Mw(this);for(ce=ce||[];this.pos<Y;)ce.push(this.readFixed32());return ce},readPackedSFixed32:function(ce){if(this.type!==gv.Bytes)return ce.push(this.readSFixed32());var Y=Mw(this);for(ce=ce||[];this.pos<Y;)ce.push(this.readSFixed32());return ce},readPackedFixed64:function(ce){if(this.type!==gv.Bytes)return ce.push(this.readFixed64());var Y=Mw(this);for(ce=ce||[];this.pos<Y;)ce.push(this.readFixed64());return ce},readPackedSFixed64:function(ce){if(this.type!==gv.Bytes)return ce.push(this.readSFixed64());var Y=Mw(this);for(ce=ce||[];this.pos<Y;)ce.push(this.readSFixed64());return ce},skip:function(ce){var Y=7&ce;if(Y===gv.Varint)for(;this.buf[this.pos++]>127;);else if(Y===gv.Bytes)this.pos=this.readVarint()+this.pos;else if(Y===gv.Fixed32)this.pos+=4;else{if(Y!==gv.Fixed64)throw new Error("Unimplemented type: "+Y);this.pos+=8}},writeTag:function(ce,Y){this.writeVarint(ce<<3|Y)},realloc:function(ce){for(var Y=this.length||16;Y<this.pos+ce;)Y*=2;if(Y!==this.length){var ye=new Uint8Array(Y);ye.set(this.buf),this.buf=ye,this.length=Y}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(ce){this.realloc(4),zI(this.buf,ce,this.pos),this.pos+=4},writeSFixed32:function(ce){this.realloc(4),zI(this.buf,ce,this.pos),this.pos+=4},writeFixed64:function(ce){this.realloc(8),zI(this.buf,-1&ce,this.pos),zI(this.buf,Math.floor(ce*ZM),this.pos+4),this.pos+=8},writeSFixed64:function(ce){this.realloc(8),zI(this.buf,-1&ce,this.pos),zI(this.buf,Math.floor(ce*ZM),this.pos+4),this.pos+=8},writeVarint:function(ce){(ce=+ce||0)>268435455||ce<0?(function(Y,ye){var He,lt;if(Y>=0?(He=Y%4294967296|0,lt=Y/4294967296|0):(lt=~(-Y/4294967296),4294967295^(He=~(-Y%4294967296))?He=He+1|0:(He=0,lt=lt+1|0)),Y>=18446744073709552e3||Y<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");ye.realloc(10),(function(Ct,It,nr){nr.buf[nr.pos++]=127&Ct|128,Ct>>>=7,nr.buf[nr.pos++]=127&Ct|128,Ct>>>=7,nr.buf[nr.pos++]=127&Ct|128,Ct>>>=7,nr.buf[nr.pos++]=127&Ct|128,nr.buf[nr.pos]=127&(Ct>>>=7)})(He,0,ye),(function(Ct,It){var nr=(7&Ct)<<4;It.buf[It.pos++]|=nr|((Ct>>>=3)?128:0),Ct&&(It.buf[It.pos++]=127&Ct|((Ct>>>=7)?128:0),Ct&&(It.buf[It.pos++]=127&Ct|((Ct>>>=7)?128:0),Ct&&(It.buf[It.pos++]=127&Ct|((Ct>>>=7)?128:0),Ct&&(It.buf[It.pos++]=127&Ct|((Ct>>>=7)?128:0),Ct&&(It.buf[It.pos++]=127&Ct)))))})(lt,ye)})(ce,this):(this.realloc(4),this.buf[this.pos++]=127&ce|(ce>127?128:0),ce<=127||(this.buf[this.pos++]=127&(ce>>>=7)|(ce>127?128:0),ce<=127||(this.buf[this.pos++]=127&(ce>>>=7)|(ce>127?128:0),ce<=127||(this.buf[this.pos++]=ce>>>7&127))))},writeSVarint:function(ce){this.writeVarint(ce<0?2*-ce-1:2*ce)},writeBoolean:function(ce){this.writeVarint(!!ce)},writeString:function(ce){ce=String(ce),this.realloc(4*ce.length),this.pos++;var Y=this.pos;this.pos=(function(He,lt,Ct){for(var It,nr,xr=0;xr<lt.length;xr++){if((It=lt.charCodeAt(xr))>55295&&It<57344){if(!nr){It>56319||xr+1===lt.length?(He[Ct++]=239,He[Ct++]=191,He[Ct++]=189):nr=It;continue}if(It<56320){He[Ct++]=239,He[Ct++]=191,He[Ct++]=189,nr=It;continue}It=nr-55296<<10|It-56320|65536,nr=null}else nr&&(He[Ct++]=239,He[Ct++]=191,He[Ct++]=189,nr=null);It<128?He[Ct++]=It:(It<2048?He[Ct++]=It>>6|192:(It<65536?He[Ct++]=It>>12|224:(He[Ct++]=It>>18|240,He[Ct++]=It>>12&63|128),He[Ct++]=It>>6&63|128),He[Ct++]=63&It|128)}return Ct})(this.buf,ce,this.pos);var ye=this.pos-Y;ye>=128&&D6(Y,ye,this),this.pos=Y-1,this.writeVarint(ye),this.pos+=ye},writeFloat:function(ce){this.realloc(4),FI(this.buf,ce,this.pos,!0,23,4),this.pos+=4},writeDouble:function(ce){this.realloc(8),FI(this.buf,ce,this.pos,!0,52,8),this.pos+=8},writeBytes:function(ce){var Y=ce.length;this.writeVarint(Y),this.realloc(Y);for(var ye=0;ye<Y;ye++)this.buf[this.pos++]=ce[ye]},writeRawMessage:function(ce,Y){this.pos++;var ye=this.pos;ce(Y,this);var He=this.pos-ye;He>=128&&D6(ye,He,this),this.pos=ye-1,this.writeVarint(He),this.pos+=He},writeMessage:function(ce,Y,ye){this.writeTag(ce,gv.Bytes),this.writeRawMessage(Y,ye)},writePackedVarint:function(ce,Y){Y.length&&this.writeMessage(ce,Z4,Y)},writePackedSVarint:function(ce,Y){Y.length&&this.writeMessage(ce,NK,Y)},writePackedBoolean:function(ce,Y){Y.length&&this.writeMessage(ce,BK,Y)},writePackedFloat:function(ce,Y){Y.length&&this.writeMessage(ce,FK,Y)},writePackedDouble:function(ce,Y){Y.length&&this.writeMessage(ce,zK,Y)},writePackedFixed32:function(ce,Y){Y.length&&this.writeMessage(ce,UK,Y)},writePackedSFixed32:function(ce,Y){Y.length&&this.writeMessage(ce,HK,Y)},writePackedFixed64:function(ce,Y){Y.length&&this.writeMessage(ce,jK,Y)},writePackedSFixed64:function(ce,Y){Y.length&&this.writeMessage(ce,L6,Y)},writeBytesField:function(ce,Y){this.writeTag(ce,gv.Bytes),this.writeBytes(Y)},writeFixed32Field:function(ce,Y){this.writeTag(ce,gv.Fixed32),this.writeFixed32(Y)},writeSFixed32Field:function(ce,Y){this.writeTag(ce,gv.Fixed32),this.writeSFixed32(Y)},writeFixed64Field:function(ce,Y){this.writeTag(ce,gv.Fixed64),this.writeFixed64(Y)},writeSFixed64Field:function(ce,Y){this.writeTag(ce,gv.Fixed64),this.writeSFixed64(Y)},writeVarintField:function(ce,Y){this.writeTag(ce,gv.Varint),this.writeVarint(Y)},writeSVarintField:function(ce,Y){this.writeTag(ce,gv.Varint),this.writeSVarint(Y)},writeStringField:function(ce,Y){this.writeTag(ce,gv.Bytes),this.writeString(Y)},writeFloatField:function(ce,Y){this.writeTag(ce,gv.Fixed32),this.writeFloat(Y)},writeDoubleField:function(ce,Y){this.writeTag(ce,gv.Fixed64),this.writeDouble(Y)},writeBooleanField:function(ce,Y){this.writeVarintField(ce,!!Y)}};var HF=c(nx);const N6=3;function VK(ce,Y,ye){ce===1&&ye.readMessage(JU,Y)}function JU(ce,Y,ye){if(ce===3){const{id:He,bitmap:lt,width:Ct,height:It,left:nr,top:xr,advance:Vr}=ye.readMessage(jF,{});Y.push({id:He,bitmap:new Fu({width:Ct+2*N6,height:It+2*N6},lt),metrics:{width:Ct,height:It,left:nr,top:xr,advance:Vr}})}}function jF(ce,Y,ye){ce===1?Y.id=ye.readVarint():ce===2?Y.bitmap=ye.readBytes():ce===3?Y.width=ye.readVarint():ce===4?Y.height=ye.readVarint():ce===5?Y.left=ye.readSVarint():ce===6?Y.top=ye.readSVarint():ce===7&&(Y.advance=ye.readVarint())}const VF=N6;function F6(ce){let Y=0,ye=0;for(const It of ce)Y+=It.w*It.h,ye=Math.max(ye,It.w);ce.sort((It,nr)=>nr.h-It.h);const He=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(Y/.95)),ye),h:1/0}];let lt=0,Ct=0;for(const It of ce)for(let nr=He.length-1;nr>=0;nr--){const xr=He[nr];if(!(It.w>xr.w||It.h>xr.h)){if(It.x=xr.x,It.y=xr.y,Ct=Math.max(Ct,It.y+It.h),lt=Math.max(lt,It.x+It.w),It.w===xr.w&&It.h===xr.h){const Vr=He.pop();nr<He.length&&(He[nr]=Vr)}else It.h===xr.h?(xr.x+=It.w,xr.w-=It.w):It.w===xr.w?(xr.y+=It.h,xr.h-=It.h):(He.push({x:xr.x+It.w,y:xr.y,w:xr.w-It.w,h:It.h}),xr.y+=It.h,xr.h-=It.h);break}}return{w:lt,h:Ct,fill:Y/(lt*Ct)||0}}const Ly=1;class vb{constructor(Y,{pixelRatio:ye,version:He,stretchX:lt,stretchY:Ct,content:It,textFitWidth:nr,textFitHeight:xr}){this.paddedRect=Y,this.pixelRatio=ye,this.stretchX=lt,this.stretchY=Ct,this.content=It,this.version=He,this.textFitWidth=nr,this.textFitHeight=xr}get tl(){return[this.paddedRect.x+Ly,this.paddedRect.y+Ly]}get br(){return[this.paddedRect.x+this.paddedRect.w-Ly,this.paddedRect.y+this.paddedRect.h-Ly]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2*Ly)/this.pixelRatio,(this.paddedRect.h-2*Ly)/this.pixelRatio]}}class QU{constructor(Y,ye){const He={},lt={};this.haveRenderCallbacks=[];const Ct=[];this.addImages(Y,He,Ct),this.addImages(ye,lt,Ct);const{w:It,h:nr}=F6(Ct),xr=new cf({width:It||1,height:nr||1});for(const Vr in Y){const hn=Y[Vr],wn=He[Vr].paddedRect;cf.copy(hn.data,xr,{x:0,y:0},{x:wn.x+Ly,y:wn.y+Ly},hn.data)}for(const Vr in ye){const hn=ye[Vr],wn=lt[Vr].paddedRect,Zn=wn.x+Ly,hi=wn.y+Ly,Di=hn.data.width,Xi=hn.data.height;cf.copy(hn.data,xr,{x:0,y:0},{x:Zn,y:hi},hn.data),cf.copy(hn.data,xr,{x:0,y:Xi-1},{x:Zn,y:hi-1},{width:Di,height:1}),cf.copy(hn.data,xr,{x:0,y:0},{x:Zn,y:hi+Xi},{width:Di,height:1}),cf.copy(hn.data,xr,{x:Di-1,y:0},{x:Zn-1,y:hi},{width:1,height:Xi}),cf.copy(hn.data,xr,{x:0,y:0},{x:Zn+Di,y:hi},{width:1,height:Xi})}this.image=xr,this.iconPositions=He,this.patternPositions=lt}addImages(Y,ye,He){for(const lt in Y){const Ct=Y[lt],It={x:0,y:0,w:Ct.data.width+2*Ly,h:Ct.data.height+2*Ly};He.push(It),ye[lt]=new vb(It,Ct),Ct.hasRenderCallback&&this.haveRenderCallbacks.push(lt)}}patchUpdatedImages(Y,ye){Y.dispatchRenderCallbacks(this.haveRenderCallbacks);for(const He in Y.updatedImages)this.patchUpdatedImage(this.iconPositions[He],Y.getImage(He),ye),this.patchUpdatedImage(this.patternPositions[He],Y.getImage(He),ye)}patchUpdatedImage(Y,ye,He){if(!Y||!ye||Y.version===ye.version)return;Y.version=ye.version;const[lt,Ct]=Y.tl;He.update(ye.data,void 0,{x:lt,y:Ct})}}var JM;Io("ImagePosition",vb),Io("ImageAtlas",QU),l.ah=void 0,(JM=l.ah||(l.ah={}))[JM.none=0]="none",JM[JM.horizontal=1]="horizontal",JM[JM.vertical=2]="vertical",JM[JM.horizontalOnly=3]="horizontalOnly";const BI=-17;class K4{constructor(){this.scale=1,this.fontStack="",this.imageName=null}static forText(Y,ye){const He=new K4;return He.scale=Y||1,He.fontStack=ye,He}static forImage(Y){const ye=new K4;return ye.imageName=Y,ye}}class UI{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(Y,ye){const He=new UI;for(let lt=0;lt<Y.sections.length;lt++){const Ct=Y.sections[lt];Ct.image?He.addImageSection(Ct):He.addTextSection(Ct,ye)}return He}length(){return this.text.length}getSection(Y){return this.sections[this.sectionIndex[Y]]}getSectionIndex(Y){return this.sectionIndex[Y]}getCharCode(Y){return this.text.charCodeAt(Y)}verticalizePunctuation(){this.text=(function(Y){let ye="";for(let He=0;He<Y.length;He++){const lt=Y.charCodeAt(He+1)||null,Ct=Y.charCodeAt(He-1)||null;ye+=lt&&wh(lt)&&!Cm[Y[He+1]]||Ct&&wh(Ct)&&!Cm[Y[He-1]]||!Cm[Y[He]]?Y[He]:Cm[Y[He]]}return ye})(this.text)}trim(){let Y=0;for(let He=0;He<this.text.length&&B6[this.text.charCodeAt(He)];He++)Y++;let ye=this.text.length;for(let He=this.text.length-1;He>=0&&He>=Y&&B6[this.text.charCodeAt(He)];He--)ye--;this.text=this.text.substring(Y,ye),this.sectionIndex=this.sectionIndex.slice(Y,ye)}substring(Y,ye){const He=new UI;return He.text=this.text.substring(Y,ye),He.sectionIndex=this.sectionIndex.slice(Y,ye),He.sections=this.sections,He}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((Y,ye)=>Math.max(Y,this.sections[ye].scale),0)}addTextSection(Y,ye){this.text+=Y.text,this.sections.push(K4.forText(Y.scale,Y.fontStack||ye));const He=this.sections.length-1;for(let lt=0;lt<Y.text.length;++lt)this.sectionIndex.push(He)}addImageSection(Y){const ye=Y.image?Y.image.name:"";if(ye.length===0)return void M("Can't add FormattedSection with an empty image.");const He=this.getNextImageSectionCharCode();He?(this.text+=String.fromCharCode(He),this.sections.push(K4.forImage(ye)),this.sectionIndex.push(this.sections.length-1)):M("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function z6(ce,Y,ye,He,lt,Ct,It,nr,xr,Vr,hn,wn,Zn,hi,Di){const Xi=UI.fromFeature(ce,lt);let ya;wn===l.ah.vertical&&Xi.verticalizePunctuation();const{processBidirectionalText:eo,processStyledBidirectionalText:us}=Bf;if(eo&&Xi.sections.length===1){ya=[];const js=eo(Xi.toString(),jR(Xi,Vr,Ct,Y,He,hi));for(const Pl of js){const Lu=new UI;Lu.text=Pl,Lu.sections=Xi.sections;for(let df=0;df<Pl.length;df++)Lu.sectionIndex.push(0);ya.push(Lu)}}else if(us){ya=[];const js=us(Xi.text,Xi.sectionIndex,jR(Xi,Vr,Ct,Y,He,hi));for(const Pl of js){const Lu=new UI;Lu.text=Pl[0],Lu.sectionIndex=Pl[1],Lu.sections=Xi.sections,ya.push(Lu)}}else ya=(function(js,Pl){const Lu=[],df=js.text;let $u=0;for(const Pu of Pl)Lu.push(js.substring($u,Pu)),$u=Pu;return $u<df.length&&Lu.push(js.substring($u,df.length)),Lu})(Xi,jR(Xi,Vr,Ct,Y,He,hi));const ko=[],es={positionedLines:ko,text:Xi.toString(),top:hn[1],bottom:hn[1],left:hn[0],right:hn[0],writingMode:wn,iconsInText:!1,verticalizable:!1};return(function(js,Pl,Lu,df,$u,Pu,Ic,xc,fc,hl,Hc,Pc){let Nf=0,fm=BI,Gv=0,l1=0;const k_=xc==="right"?1:xc==="left"?0:.5;let k0=0;for(const Pg of $u){Pg.trim();const u1=Pg.getMaxScale(),ix=(u1-1)*Bp,gb={positionedGlyphs:[],lineOffset:0};js.positionedLines[k0]=gb;const jx=gb.positionedGlyphs;let q1=0;if(!Pg.length()){fm+=Pu,++k0;continue}for(let Mm=0;Mm<Pg.length();Mm++){const Vh=Pg.getSection(Mm),yv=Pg.getSectionIndex(Mm),Pv=Pg.getCharCode(Mm);let hg=0,Rm=null,XI=null,BT=null,UT=Bp;const ax=!(fc===l.ah.horizontal||!Hc&&!Jc(Pv)||Hc&&(B6[Pv]||(Oy=Pv,new RegExp("\\p{sc=Arab}","u").test(String.fromCodePoint(Oy)))));if(Vh.imageName){const dm=df[Vh.imageName];if(!dm)continue;BT=Vh.imageName,js.iconsInText=js.iconsInText||!0,XI=dm.paddedRect;const G1=dm.displaySize;Vh.scale=Vh.scale*Bp/Pc,Rm={width:G1[0],height:G1[1],left:Ly,top:-VF,advance:ax?G1[1]:G1[0]},hg=ix+(Bp-G1[1]*Vh.scale),UT=Rm.advance;const PS=ax?G1[0]*Vh.scale-Bp*u1:G1[1]*Vh.scale-Bp*u1;PS>0&&PS>q1&&(q1=PS)}else{const dm=Lu[Vh.fontStack],G1=dm&&dm[Pv];if(G1&&G1.rect)XI=G1.rect,Rm=G1.metrics;else{const PS=Pl[Vh.fontStack],Iw=PS&&PS[Pv];if(!Iw)continue;Rm=Iw.metrics}hg=(u1-Vh.scale)*Bp}ax?(js.verticalizable=!0,jx.push({glyph:Pv,imageName:BT,x:Nf,y:fm+hg,vertical:ax,scale:Vh.scale,fontStack:Vh.fontStack,sectionIndex:yv,metrics:Rm,rect:XI}),Nf+=UT*Vh.scale+hl):(jx.push({glyph:Pv,imageName:BT,x:Nf,y:fm+hg,vertical:ax,scale:Vh.scale,fontStack:Vh.fontStack,sectionIndex:yv,metrics:Rm,rect:XI}),Nf+=Rm.advance*Vh.scale+hl)}jx.length!==0&&(Gv=Math.max(Nf-hl,Gv),$K(jx,0,jx.length-1,k_,q1)),Nf=0;const kw=Pu*u1+q1;gb.lineOffset=Math.max(q1,ix),fm+=kw,l1=Math.max(kw,l1),++k0}var Oy;const Bx=fm-BI,{horizontalAlign:Ux,verticalAlign:Hx}=GF(Ic);(function(Pg,u1,ix,gb,jx,q1,kw,Mm,Vh){const yv=(u1-ix)*jx;let Pv=0;Pv=q1!==kw?-Mm*gb-BI:(-gb*Vh+.5)*kw;for(const hg of Pg)for(const Rm of hg.positionedGlyphs)Rm.x+=yv,Rm.y+=Pv})(js.positionedLines,k_,Ux,Hx,Gv,l1,Pu,Bx,$u.length),js.top+=-Hx*Bx,js.bottom=js.top+Bx,js.left+=-Ux*Gv,js.right=js.left+Gv})(es,Y,ye,He,ya,It,nr,xr,wn,Vr,Zn,Di),!(function(js){for(const Pl of js)if(Pl.positionedGlyphs.length!==0)return!1;return!0})(ko)&&es}const B6={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},qK={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},GK={40:!0};function U6(ce,Y,ye,He,lt,Ct){if(Y.imageName){const It=He[Y.imageName];return It?It.displaySize[0]*Y.scale*Bp/Ct+lt:0}{const It=ye[Y.fontStack],nr=It&&It[ce];return nr?nr.metrics.advance*Y.scale+lt:0}}function eH(ce,Y,ye,He){const lt=Math.pow(ce-Y,2);return He?ce<Y?lt/2:2*lt:lt+Math.abs(ye)*ye}function H6(ce,Y,ye){let He=0;return ce===10&&(He-=1e4),ye&&(He+=150),ce!==40&&ce!==65288||(He+=50),Y!==41&&Y!==65289||(He+=50),He}function qF(ce,Y,ye,He,lt,Ct){let It=null,nr=eH(Y,ye,lt,Ct);for(const xr of He){const Vr=eH(Y-xr.x,ye,lt,Ct)+xr.badness;Vr<=nr&&(It=xr,nr=Vr)}return{index:ce,x:Y,priorBreak:It,badness:nr}}function dC(ce){return ce?dC(ce.priorBreak).concat(ce.index):[]}function jR(ce,Y,ye,He,lt,Ct){if(!ce)return[];const It=[],nr=(function(wn,Zn,hi,Di,Xi,ya){let eo=0;for(let us=0;us<wn.length();us++){const ko=wn.getSection(us);eo+=U6(wn.getCharCode(us),ko,Di,Xi,Zn,ya)}return eo/Math.max(1,Math.ceil(eo/hi))})(ce,Y,ye,He,lt,Ct),xr=ce.text.indexOf("​")>=0;let Vr=0;for(let wn=0;wn<ce.length();wn++){const Zn=ce.getSection(wn),hi=ce.getCharCode(wn);if(B6[hi]||(Vr+=U6(hi,Zn,He,lt,Y,Ct)),wn<ce.length()-1){const Di=!((hn=hi)<11904)&&(!!Os["CJK Compatibility Forms"](hn)||!!Os["CJK Compatibility"](hn)||!!Os["CJK Strokes"](hn)||!!Os["CJK Symbols and Punctuation"](hn)||!!Os["Enclosed CJK Letters and Months"](hn)||!!Os["Halfwidth and Fullwidth Forms"](hn)||!!Os["Ideographic Description Characters"](hn)||!!Os["Vertical Forms"](hn)||ld.test(String.fromCodePoint(hn)));(qK[hi]||Di||Zn.imageName||wn!==ce.length()-2&&GK[ce.getCharCode(wn+1)])&&It.push(qF(wn+1,Vr,nr,It,H6(hi,ce.getCharCode(wn+1),Di&&xr),!1))}}var hn;return dC(qF(ce.length(),Vr,nr,It,0,!0))}function GF(ce){let Y=.5,ye=.5;switch(ce){case"right":case"top-right":case"bottom-right":Y=1;break;case"left":case"top-left":case"bottom-left":Y=0}switch(ce){case"bottom":case"bottom-right":case"bottom-left":ye=1;break;case"top":case"top-right":case"top-left":ye=0}return{horizontalAlign:Y,verticalAlign:ye}}function $K(ce,Y,ye,He,lt){if(!He&&!lt)return;const Ct=ce[ye],It=(ce[ye].x+Ct.metrics.advance*Ct.scale)*He;for(let nr=Y;nr<=ye;nr++)ce[nr].x-=It,ce[nr].y+=lt}function WK(ce,Y,ye){const{horizontalAlign:He,verticalAlign:lt}=GF(ye),Ct=Y[0]-ce.displaySize[0]*He,It=Y[1]-ce.displaySize[1]*lt;return{image:ce,top:It,bottom:It+ce.displaySize[1],left:Ct,right:Ct+ce.displaySize[0]}}function tH(ce){var Y,ye;let He=ce.left,lt=ce.top,Ct=ce.right-He,It=ce.bottom-lt;const nr=(Y=ce.image.textFitWidth)!==null&&Y!==void 0?Y:"stretchOrShrink",xr=(ye=ce.image.textFitHeight)!==null&&ye!==void 0?ye:"stretchOrShrink",Vr=(ce.image.content[2]-ce.image.content[0])/(ce.image.content[3]-ce.image.content[1]);if(xr==="proportional"){if(nr==="stretchOnly"&&Ct/It<Vr||nr==="proportional"){const hn=Math.ceil(It*Vr);He*=hn/Ct,Ct=hn}}else if(nr==="proportional"&&xr==="stretchOnly"&&Vr!==0&&Ct/It>Vr){const hn=Math.ceil(Ct/Vr);lt*=hn/It,It=hn}return{x1:He,y1:lt,x2:He+Ct,y2:lt+It}}function rH(ce,Y,ye,He,lt,Ct){const It=ce.image;let nr;if(It.content){const ya=It.content,eo=It.pixelRatio||1;nr=[ya[0]/eo,ya[1]/eo,It.displaySize[0]-ya[2]/eo,It.displaySize[1]-ya[3]/eo]}const xr=Y.left*Ct,Vr=Y.right*Ct;let hn,wn,Zn,hi;ye==="width"||ye==="both"?(hi=lt[0]+xr-He[3],wn=lt[0]+Vr+He[1]):(hi=lt[0]+(xr+Vr-It.displaySize[0])/2,wn=hi+It.displaySize[0]);const Di=Y.top*Ct,Xi=Y.bottom*Ct;return ye==="height"||ye==="both"?(hn=lt[1]+Di-He[0],Zn=lt[1]+Xi+He[2]):(hn=lt[1]+(Di+Xi-It.displaySize[1])/2,Zn=hn+It.displaySize[1]),{image:It,top:hn,right:wn,bottom:Zn,left:hi,collisionPadding:nr}}const J4=255,S3=128,QM=J4*S3;function nH(ce,Y){const{expression:ye}=Y;if(ye.kind==="constant")return{kind:"constant",layoutSize:ye.evaluate(new gf(ce+1))};if(ye.kind==="source")return{kind:"source"};{const{zoomStops:He,interpolationType:lt}=ye;let Ct=0;for(;Ct<He.length&&He[Ct]<=ce;)Ct++;Ct=Math.max(0,Ct-1);let It=Ct;for(;It<He.length&&He[It]<ce+1;)It++;It=Math.min(He.length-1,It);const nr=He[Ct],xr=He[It];return ye.kind==="composite"?{kind:"composite",minZoom:nr,maxZoom:xr,interpolationType:lt}:{kind:"camera",minZoom:nr,maxZoom:xr,minSize:ye.evaluate(new gf(nr)),maxSize:ye.evaluate(new gf(xr)),interpolationType:lt}}}function $F(ce,Y,ye){let He="never";const lt=ce.get(Y);return lt?He=lt:ce.get(ye)&&(He="always"),He}const YK=$a.VectorTileFeature.types,WF=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function j6(ce,Y,ye,He,lt,Ct,It,nr,xr,Vr,hn,wn,Zn){const hi=nr?Math.min(QM,Math.round(nr[0])):0,Di=nr?Math.min(QM,Math.round(nr[1])):0;ce.emplaceBack(Y,ye,Math.round(32*He),Math.round(32*lt),Ct,It,(hi<<1)+(xr?1:0),Di,16*Vr,16*hn,256*wn,256*Zn)}function e5(ce,Y,ye){ce.emplaceBack(Y.x,Y.y,ye),ce.emplaceBack(Y.x,Y.y,ye),ce.emplaceBack(Y.x,Y.y,ye),ce.emplaceBack(Y.x,Y.y,ye)}function XK(ce){for(const Y of ce.sections)if(lc(Y.text))return!0;return!1}class Jg{constructor(Y){this.layoutVertexArray=new Bt,this.indexArray=new Wr,this.programConfigurations=Y,this.segments=new Pi,this.dynamicLayoutVertexArray=new fr,this.opacityVertexArray=new pr,this.hasVisibleVertices=!1,this.placedSymbolArray=new Zl}isEmpty(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0}upload(Y,ye,He,lt){this.isEmpty()||(He&&(this.layoutVertexBuffer=Y.createVertexBuffer(this.layoutVertexArray,WM.members),this.indexBuffer=Y.createIndexBuffer(this.indexArray,ye),this.dynamicLayoutVertexBuffer=Y.createVertexBuffer(this.dynamicLayoutVertexArray,OI.members,!0),this.opacityVertexBuffer=Y.createVertexBuffer(this.opacityVertexArray,WF,!0),this.opacityVertexBuffer.itemSize=1),(He||lt)&&this.programConfigurations.upload(Y))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}}Io("SymbolBuffers",Jg);class HI{constructor(Y,ye,He){this.layoutVertexArray=new Y,this.layoutAttributes=ye,this.indexArray=new He,this.segments=new Pi,this.collisionVertexArray=new Yr}upload(Y){this.layoutVertexBuffer=Y.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=Y.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=Y.createVertexBuffer(this.collisionVertexArray,NI.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}}Io("CollisionBuffers",HI);class VR{constructor(Y){this.collisionBoxArray=Y.collisionBoxArray,this.zoom=Y.zoom,this.overscaling=Y.overscaling,this.layers=Y.layers,this.layerIds=this.layers.map(It=>It.id),this.index=Y.index,this.pixelRatio=Y.pixelRatio,this.sourceLayerIndex=Y.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=Ha([]),this.placementViewportMatrix=Ha([]);const ye=this.layers[0]._unevaluatedLayout._values;this.textSizeData=nH(this.zoom,ye["text-size"]),this.iconSizeData=nH(this.zoom,ye["icon-size"]);const He=this.layers[0].layout,lt=He.get("symbol-sort-key"),Ct=He.get("symbol-z-order");this.canOverlap=$F(He,"text-overlap","text-allow-overlap")!=="never"||$F(He,"icon-overlap","icon-allow-overlap")!=="never"||He.get("text-ignore-placement")||He.get("icon-ignore-placement"),this.sortFeaturesByKey=Ct!=="viewport-y"&&!lt.isConstant(),this.sortFeaturesByY=(Ct==="viewport-y"||Ct==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,He.get("symbol-placement")==="point"&&(this.writingModes=He.get("text-writing-mode").map(It=>l.ah[It])),this.stateDependentLayerIds=this.layers.filter(It=>It.isStateDependent()).map(It=>It.id),this.sourceID=Y.sourceID}createArrays(){this.text=new Jg(new Uf(this.layers,this.zoom,Y=>/^text/.test(Y))),this.icon=new Jg(new Uf(this.layers,this.zoom,Y=>/^icon/.test(Y))),this.glyphOffsetArray=new qc,this.lineVertexArray=new Gc,this.symbolInstances=new Du,this.textAnchorOffsets=new ef}calculateGlyphDependencies(Y,ye,He,lt,Ct){for(let It=0;It<Y.length;It++)if(ye[Y.charCodeAt(It)]=!0,(He||lt)&&Ct){const nr=Cm[Y.charAt(It)];nr&&(ye[nr.charCodeAt(0)]=!0)}}populate(Y,ye,He){const lt=this.layers[0],Ct=lt.layout,It=Ct.get("text-font"),nr=Ct.get("text-field"),xr=Ct.get("icon-image"),Vr=(nr.value.kind!=="constant"||nr.value.value instanceof aa&&!nr.value.value.isEmpty()||nr.value.value.toString().length>0)&&(It.value.kind!=="constant"||It.value.value.length>0),hn=xr.value.kind!=="constant"||!!xr.value.value||Object.keys(xr.parameters).length>0,wn=Ct.get("symbol-sort-key");if(this.features=[],!Vr&&!hn)return;const Zn=ye.iconDependencies,hi=ye.glyphDependencies,Di=ye.availableImages,Xi=new gf(this.zoom);for(const{feature:ya,id:eo,index:us,sourceLayerIndex:ko}of Y){const es=lt._featureFilter.needGeometry,js=mn(ya,es);if(!lt._featureFilter.filter(Xi,js,He))continue;let Pl,Lu;if(es||(js.geometry=rr(ya)),Vr){const $u=lt.getValueAndResolveTokens("text-field",js,He,Di),Pu=aa.factory($u),Ic=this.hasRTLText=this.hasRTLText||XK(Pu);(!Ic||Bf.getRTLTextPluginStatus()==="unavailable"||Ic&&Bf.isParsed())&&(Pl=XM(Pu,lt,js))}if(hn){const $u=lt.getValueAndResolveTokens("icon-image",js,He,Di);Lu=$u instanceof ro?$u:ro.fromString($u)}if(!Pl&&!Lu)continue;const df=this.sortFeaturesByKey?wn.evaluate(js,{},He):void 0;if(this.features.push({id:eo,text:Pl,icon:Lu,index:us,sourceLayerIndex:ko,geometry:js.geometry,properties:ya.properties,type:YK[ya.type],sortKey:df}),Lu&&(Zn[Lu.name]=!0),Pl){const $u=It.evaluate(js,{},He).join(","),Pu=Ct.get("text-rotation-alignment")!=="viewport"&&Ct.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(l.ah.vertical)>=0;for(const Ic of Pl.sections)if(Ic.image)Zn[Ic.image.name]=!0;else{const xc=Vu(Pl.toString()),fc=Ic.fontStack||$u,hl=hi[fc]=hi[fc]||{};this.calculateGlyphDependencies(Ic.text,hl,Pu,this.allowVerticalPlacement,xc)}}}Ct.get("symbol-placement")==="line"&&(this.features=(function(ya){const eo={},us={},ko=[];let es=0;function js($u){ko.push(ya[$u]),es++}function Pl($u,Pu,Ic){const xc=us[$u];return delete us[$u],us[Pu]=xc,ko[xc].geometry[0].pop(),ko[xc].geometry[0]=ko[xc].geometry[0].concat(Ic[0]),xc}function Lu($u,Pu,Ic){const xc=eo[Pu];return delete eo[Pu],eo[$u]=xc,ko[xc].geometry[0].shift(),ko[xc].geometry[0]=Ic[0].concat(ko[xc].geometry[0]),xc}function df($u,Pu,Ic){const xc=Ic?Pu[0][Pu[0].length-1]:Pu[0][0];return`${$u}:${xc.x}:${xc.y}`}for(let $u=0;$u<ya.length;$u++){const Pu=ya[$u],Ic=Pu.geometry,xc=Pu.text?Pu.text.toString():null;if(!xc){js($u);continue}const fc=df(xc,Ic),hl=df(xc,Ic,!0);if(fc in us&&hl in eo&&us[fc]!==eo[hl]){const Hc=Lu(fc,hl,Ic),Pc=Pl(fc,hl,ko[Hc].geometry);delete eo[fc],delete us[hl],us[df(xc,ko[Pc].geometry,!0)]=Pc,ko[Hc].geometry=null}else fc in us?Pl(fc,hl,Ic):hl in eo?Lu(fc,hl,Ic):(js($u),eo[fc]=es-1,us[hl]=es-1)}return ko.filter($u=>$u.geometry)})(this.features)),this.sortFeaturesByKey&&this.features.sort((ya,eo)=>ya.sortKey-eo.sortKey)}update(Y,ye,He){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(Y,ye,this.layers,He),this.icon.programConfigurations.updatePaintArrays(Y,ye,this.layers,He))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(Y){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(Y),this.iconCollisionBox.upload(Y)),this.text.upload(Y,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(Y,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(Y,ye){const He=this.lineVertexArray.length;if(Y.segment!==void 0){let lt=Y.dist(ye[Y.segment+1]),Ct=Y.dist(ye[Y.segment]);const It={};for(let nr=Y.segment+1;nr<ye.length;nr++)It[nr]={x:ye[nr].x,y:ye[nr].y,tileUnitDistanceFromAnchor:lt},nr<ye.length-1&&(lt+=ye[nr+1].dist(ye[nr]));for(let nr=Y.segment||0;nr>=0;nr--)It[nr]={x:ye[nr].x,y:ye[nr].y,tileUnitDistanceFromAnchor:Ct},nr>0&&(Ct+=ye[nr-1].dist(ye[nr]));for(let nr=0;nr<ye.length;nr++){const xr=It[nr];this.lineVertexArray.emplaceBack(xr.x,xr.y,xr.tileUnitDistanceFromAnchor)}}return{lineStartIndex:He,lineLength:this.lineVertexArray.length-He}}addSymbols(Y,ye,He,lt,Ct,It,nr,xr,Vr,hn,wn,Zn){const hi=Y.indexArray,Di=Y.layoutVertexArray,Xi=Y.segments.prepareSegment(4*ye.length,Di,hi,this.canOverlap?It.sortKey:void 0),ya=this.glyphOffsetArray.length,eo=Xi.vertexLength,us=this.allowVerticalPlacement&&nr===l.ah.vertical?Math.PI/2:0,ko=It.text&&It.text.sections;for(let es=0;es<ye.length;es++){const{tl:js,tr:Pl,bl:Lu,br:df,tex:$u,pixelOffsetTL:Pu,pixelOffsetBR:Ic,minFontScaleX:xc,minFontScaleY:fc,glyphOffset:hl,isSDF:Hc,sectionIndex:Pc}=ye[es],Nf=Xi.vertexLength,fm=hl[1];j6(Di,xr.x,xr.y,js.x,fm+js.y,$u.x,$u.y,He,Hc,Pu.x,Pu.y,xc,fc),j6(Di,xr.x,xr.y,Pl.x,fm+Pl.y,$u.x+$u.w,$u.y,He,Hc,Ic.x,Pu.y,xc,fc),j6(Di,xr.x,xr.y,Lu.x,fm+Lu.y,$u.x,$u.y+$u.h,He,Hc,Pu.x,Ic.y,xc,fc),j6(Di,xr.x,xr.y,df.x,fm+df.y,$u.x+$u.w,$u.y+$u.h,He,Hc,Ic.x,Ic.y,xc,fc),e5(Y.dynamicLayoutVertexArray,xr,us),hi.emplaceBack(Nf,Nf+1,Nf+2),hi.emplaceBack(Nf+1,Nf+2,Nf+3),Xi.vertexLength+=4,Xi.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(hl[0]),es!==ye.length-1&&Pc===ye[es+1].sectionIndex||Y.programConfigurations.populatePaintArrays(Di.length,It,It.index,{},Zn,ko&&ko[Pc])}Y.placedSymbolArray.emplaceBack(xr.x,xr.y,ya,this.glyphOffsetArray.length-ya,eo,Vr,hn,xr.segment,He?He[0]:0,He?He[1]:0,lt[0],lt[1],nr,0,!1,0,wn)}_addCollisionDebugVertex(Y,ye,He,lt,Ct,It){return ye.emplaceBack(0,0),Y.emplaceBack(He.x,He.y,lt,Ct,Math.round(It.x),Math.round(It.y))}addCollisionDebugVertices(Y,ye,He,lt,Ct,It,nr){const xr=Ct.segments.prepareSegment(4,Ct.layoutVertexArray,Ct.indexArray),Vr=xr.vertexLength,hn=Ct.layoutVertexArray,wn=Ct.collisionVertexArray,Zn=nr.anchorX,hi=nr.anchorY;this._addCollisionDebugVertex(hn,wn,It,Zn,hi,new v(Y,ye)),this._addCollisionDebugVertex(hn,wn,It,Zn,hi,new v(He,ye)),this._addCollisionDebugVertex(hn,wn,It,Zn,hi,new v(He,lt)),this._addCollisionDebugVertex(hn,wn,It,Zn,hi,new v(Y,lt)),xr.vertexLength+=4;const Di=Ct.indexArray;Di.emplaceBack(Vr,Vr+1),Di.emplaceBack(Vr+1,Vr+2),Di.emplaceBack(Vr+2,Vr+3),Di.emplaceBack(Vr+3,Vr),xr.primitiveLength+=4}addDebugCollisionBoxes(Y,ye,He,lt){for(let Ct=Y;Ct<ye;Ct++){const It=this.collisionBoxArray.get(Ct);this.addCollisionDebugVertices(It.x1,It.y1,It.x2,It.y2,lt?this.textCollisionBox:this.iconCollisionBox,It.anchorPoint,He)}}generateCollisionDebugBuffers(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new HI(_r,UR.members,yn),this.iconCollisionBox=new HI(_r,UR.members,yn);for(let Y=0;Y<this.symbolInstances.length;Y++){const ye=this.symbolInstances.get(Y);this.addDebugCollisionBoxes(ye.textBoxStartIndex,ye.textBoxEndIndex,ye,!0),this.addDebugCollisionBoxes(ye.verticalTextBoxStartIndex,ye.verticalTextBoxEndIndex,ye,!0),this.addDebugCollisionBoxes(ye.iconBoxStartIndex,ye.iconBoxEndIndex,ye,!1),this.addDebugCollisionBoxes(ye.verticalIconBoxStartIndex,ye.verticalIconBoxEndIndex,ye,!1)}}_deserializeCollisionBoxesForSymbol(Y,ye,He,lt,Ct,It,nr,xr,Vr){const hn={};for(let wn=ye;wn<He;wn++){const Zn=Y.get(wn);hn.textBox={x1:Zn.x1,y1:Zn.y1,x2:Zn.x2,y2:Zn.y2,anchorPointX:Zn.anchorPointX,anchorPointY:Zn.anchorPointY},hn.textFeatureIndex=Zn.featureIndex;break}for(let wn=lt;wn<Ct;wn++){const Zn=Y.get(wn);hn.verticalTextBox={x1:Zn.x1,y1:Zn.y1,x2:Zn.x2,y2:Zn.y2,anchorPointX:Zn.anchorPointX,anchorPointY:Zn.anchorPointY},hn.verticalTextFeatureIndex=Zn.featureIndex;break}for(let wn=It;wn<nr;wn++){const Zn=Y.get(wn);hn.iconBox={x1:Zn.x1,y1:Zn.y1,x2:Zn.x2,y2:Zn.y2,anchorPointX:Zn.anchorPointX,anchorPointY:Zn.anchorPointY},hn.iconFeatureIndex=Zn.featureIndex;break}for(let wn=xr;wn<Vr;wn++){const Zn=Y.get(wn);hn.verticalIconBox={x1:Zn.x1,y1:Zn.y1,x2:Zn.x2,y2:Zn.y2,anchorPointX:Zn.anchorPointX,anchorPointY:Zn.anchorPointY},hn.verticalIconFeatureIndex=Zn.featureIndex;break}return hn}deserializeCollisionBoxes(Y){this.collisionArrays=[];for(let ye=0;ye<this.symbolInstances.length;ye++){const He=this.symbolInstances.get(ye);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(Y,He.textBoxStartIndex,He.textBoxEndIndex,He.verticalTextBoxStartIndex,He.verticalTextBoxEndIndex,He.iconBoxStartIndex,He.iconBoxEndIndex,He.verticalIconBoxStartIndex,He.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(Y,ye){const He=Y.placedSymbolArray.get(ye),lt=He.vertexStartIndex+4*He.numGlyphs;for(let Ct=He.vertexStartIndex;Ct<lt;Ct+=4)Y.indexArray.emplaceBack(Ct,Ct+1,Ct+2),Y.indexArray.emplaceBack(Ct+1,Ct+2,Ct+3)}getSortedSymbolIndexes(Y){if(this.sortedAngle===Y&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;const ye=Math.sin(Y),He=Math.cos(Y),lt=[],Ct=[],It=[];for(let nr=0;nr<this.symbolInstances.length;++nr){It.push(nr);const xr=this.symbolInstances.get(nr);lt.push(0|Math.round(ye*xr.anchorX+He*xr.anchorY)),Ct.push(xr.featureIndex)}return It.sort((nr,xr)=>lt[nr]-lt[xr]||Ct[xr]-Ct[nr]),It}addToSortKeyRanges(Y,ye){const He=this.sortKeyRanges[this.sortKeyRanges.length-1];He&&He.sortKey===ye?He.symbolInstanceEnd=Y+1:this.sortKeyRanges.push({sortKey:ye,symbolInstanceStart:Y,symbolInstanceEnd:Y+1})}sortFeatures(Y){if(this.sortFeaturesByY&&this.sortedAngle!==Y&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(Y),this.sortedAngle=Y,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const ye of this.symbolInstanceIndexes){const He=this.symbolInstances.get(ye);this.featureSortOrder.push(He.featureIndex),[He.rightJustifiedTextSymbolIndex,He.centerJustifiedTextSymbolIndex,He.leftJustifiedTextSymbolIndex].forEach((lt,Ct,It)=>{lt>=0&&It.indexOf(lt)===Ct&&this.addIndicesForPlacedSymbol(this.text,lt)}),He.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,He.verticalPlacedTextSymbolIndex),He.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,He.placedIconSymbolIndex),He.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,He.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let Q4,eD;Io("SymbolBucket",VR,{omit:["layers","collisionBoxArray","features","compareText"]}),VR.MAX_GLYPHS=65535,VR.addDynamicAttributes=e5;var YF={get paint(){return eD=eD||new wt({"icon-opacity":new Gu(Te.paint_symbol["icon-opacity"]),"icon-color":new Gu(Te.paint_symbol["icon-color"]),"icon-halo-color":new Gu(Te.paint_symbol["icon-halo-color"]),"icon-halo-width":new Gu(Te.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Gu(Te.paint_symbol["icon-halo-blur"]),"icon-translate":new Iu(Te.paint_symbol["icon-translate"]),"icon-translate-anchor":new Iu(Te.paint_symbol["icon-translate-anchor"]),"text-opacity":new Gu(Te.paint_symbol["text-opacity"]),"text-color":new Gu(Te.paint_symbol["text-color"],{runtimeType:$r,getOverride:ce=>ce.textColor,hasOverride:ce=>!!ce.textColor}),"text-halo-color":new Gu(Te.paint_symbol["text-halo-color"]),"text-halo-width":new Gu(Te.paint_symbol["text-halo-width"]),"text-halo-blur":new Gu(Te.paint_symbol["text-halo-blur"]),"text-translate":new Iu(Te.paint_symbol["text-translate"]),"text-translate-anchor":new Iu(Te.paint_symbol["text-translate-anchor"])})},get layout(){return Q4=Q4||new wt({"symbol-placement":new Iu(Te.layout_symbol["symbol-placement"]),"symbol-spacing":new Iu(Te.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Iu(Te.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Gu(Te.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Iu(Te.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Iu(Te.layout_symbol["icon-allow-overlap"]),"icon-overlap":new Iu(Te.layout_symbol["icon-overlap"]),"icon-ignore-placement":new Iu(Te.layout_symbol["icon-ignore-placement"]),"icon-optional":new Iu(Te.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Iu(Te.layout_symbol["icon-rotation-alignment"]),"icon-size":new Gu(Te.layout_symbol["icon-size"]),"icon-text-fit":new Iu(Te.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Iu(Te.layout_symbol["icon-text-fit-padding"]),"icon-image":new Gu(Te.layout_symbol["icon-image"]),"icon-rotate":new Gu(Te.layout_symbol["icon-rotate"]),"icon-padding":new Gu(Te.layout_symbol["icon-padding"]),"icon-keep-upright":new Iu(Te.layout_symbol["icon-keep-upright"]),"icon-offset":new Gu(Te.layout_symbol["icon-offset"]),"icon-anchor":new Gu(Te.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Iu(Te.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Iu(Te.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Iu(Te.layout_symbol["text-rotation-alignment"]),"text-field":new Gu(Te.layout_symbol["text-field"]),"text-font":new Gu(Te.layout_symbol["text-font"]),"text-size":new Gu(Te.layout_symbol["text-size"]),"text-max-width":new Gu(Te.layout_symbol["text-max-width"]),"text-line-height":new Iu(Te.layout_symbol["text-line-height"]),"text-letter-spacing":new Gu(Te.layout_symbol["text-letter-spacing"]),"text-justify":new Gu(Te.layout_symbol["text-justify"]),"text-radial-offset":new Gu(Te.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Iu(Te.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new Gu(Te.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new Gu(Te.layout_symbol["text-anchor"]),"text-max-angle":new Iu(Te.layout_symbol["text-max-angle"]),"text-writing-mode":new Iu(Te.layout_symbol["text-writing-mode"]),"text-rotate":new Gu(Te.layout_symbol["text-rotate"]),"text-padding":new Iu(Te.layout_symbol["text-padding"]),"text-keep-upright":new Iu(Te.layout_symbol["text-keep-upright"]),"text-transform":new Gu(Te.layout_symbol["text-transform"]),"text-offset":new Gu(Te.layout_symbol["text-offset"]),"text-allow-overlap":new Iu(Te.layout_symbol["text-allow-overlap"]),"text-overlap":new Iu(Te.layout_symbol["text-overlap"]),"text-ignore-placement":new Iu(Te.layout_symbol["text-ignore-placement"]),"text-optional":new Iu(Te.layout_symbol["text-optional"])})}};class jI{constructor(Y){if(Y.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=Y.property.overrides?Y.property.overrides.runtimeType:Jt,this.defaultValue=Y}evaluate(Y){if(Y.formattedSection){const ye=this.defaultValue.property.overrides;if(ye&&ye.hasOverride(Y.formattedSection))return ye.getOverride(Y.formattedSection)}return Y.feature&&Y.featureState?this.defaultValue.evaluate(Y.feature,Y.featureState):this.defaultValue.property.specification.default}eachChild(Y){this.defaultValue.isConstant()||Y(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Io("FormatSectionOverride",jI,{omit:["defaultValue"]});class V6 extends Ae{constructor(Y){super(Y,YF)}recalculate(Y,ye){if(super.recalculate(Y,ye),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 He=this.layout.get("text-writing-mode");if(He){const lt=[];for(const Ct of He)lt.indexOf(Ct)<0&&lt.push(Ct);this.layout._values["text-writing-mode"]=lt}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(Y,ye,He,lt){const Ct=this.layout.get(Y).evaluate(ye,{},He,lt),It=this._unevaluatedLayout._values[Y];return It.isDataDriven()||ug(It.value)||!Ct?Ct:(function(nr,xr){return xr.replace(/{([^{}]+)}/g,(Vr,hn)=>nr&&hn in nr?String(nr[hn]):"")})(ye.properties,Ct)}createBucket(Y){return new VR(Y)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const Y of YF.paint.overridableProperties){if(!V6.hasPaintOverride(this.layout,Y))continue;const ye=this.paint.get(Y),He=new jI(ye),lt=new Cv(He,ye.property.specification);let Ct=null;Ct=ye.value.kind==="constant"||ye.value.kind==="source"?new qm("source",lt):new tv("composite",lt,ye.value.zoomStops),this.paint._values[Y]=new Sh(ye.property,Ct,ye.parameters)}}_handleOverridablePaintPropertyUpdate(Y,ye,He){return!(!this.layout||ye.isDataDriven()||He.isDataDriven())&&V6.hasPaintOverride(this.layout,Y)}static hasPaintOverride(Y,ye){const He=Y.get("text-field"),lt=YF.paint.properties[ye];let Ct=!1;const It=nr=>{for(const xr of nr)if(lt.overrides&&lt.overrides.hasOverride(xr))return void(Ct=!0)};if(He.value.kind==="constant"&&He.value.value instanceof aa)It(He.value.value.sections);else if(He.value.kind==="source"){const nr=Vr=>{Ct||(Vr instanceof si&&vr(Vr.value)===ci?It(Vr.value.sections):Vr instanceof xf?It(Vr.sections):Vr.eachChild(nr))},xr=He.value;xr._styleExpression&&nr(xr._styleExpression.expression)}return Ct}}let XF;var iH={get paint(){return XF=XF||new wt({"background-color":new Iu(Te.paint_background["background-color"]),"background-pattern":new Vv(Te.paint_background["background-pattern"]),"background-opacity":new Iu(Te.paint_background["background-opacity"])})}};class tD extends Ae{constructor(Y){super(Y,iH)}}let q6;var ZF={get paint(){return q6=q6||new wt({"raster-opacity":new Iu(Te.paint_raster["raster-opacity"]),"raster-hue-rotate":new Iu(Te.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Iu(Te.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Iu(Te.paint_raster["raster-brightness-max"]),"raster-saturation":new Iu(Te.paint_raster["raster-saturation"]),"raster-contrast":new Iu(Te.paint_raster["raster-contrast"]),"raster-resampling":new Iu(Te.paint_raster["raster-resampling"]),"raster-fade-duration":new Iu(Te.paint_raster["raster-fade-duration"])})}};class ZK extends Ae{constructor(Y){super(Y,ZF)}}class aH extends Ae{constructor(Y){super(Y,{}),this.onAdd=ye=>{this.implementation.onAdd&&this.implementation.onAdd(ye,ye.painter.context.gl)},this.onRemove=ye=>{this.implementation.onRemove&&this.implementation.onRemove(ye,ye.painter.context.gl)},this.implementation=Y}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 rD{constructor(Y){this._methodToThrottle=Y,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 KF=63710088e-1;class T3{constructor(Y,ye){if(isNaN(Y)||isNaN(ye))throw new Error(`Invalid LngLat object: (${Y}, ${ye})`);if(this.lng=+Y,this.lat=+ye,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new T3(N(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(Y){const ye=Math.PI/180,He=this.lat*ye,lt=Y.lat*ye,Ct=Math.sin(He)*Math.sin(lt)+Math.cos(He)*Math.cos(lt)*Math.cos((Y.lng-this.lng)*ye);return KF*Math.acos(Math.min(Ct,1))}static convert(Y){if(Y instanceof T3)return Y;if(Array.isArray(Y)&&(Y.length===2||Y.length===3))return new T3(Number(Y[0]),Number(Y[1]));if(!Array.isArray(Y)&&typeof Y=="object"&&Y!==null)return new T3(Number("lng"in Y?Y.lng:Y.lon),Number(Y.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 oH=2*Math.PI*KF;function G6(ce){return oH*Math.cos(ce*Math.PI/180)}function $6(ce){return(180+ce)/360}function sH(ce){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+ce*Math.PI/360)))/360}function IS(ce,Y){return ce/G6(Y)}function JF(ce){return 360/Math.PI*Math.atan(Math.exp((180-360*ce)*Math.PI/180))-90}class nD{constructor(Y,ye,He=0){this.x=+Y,this.y=+ye,this.z=+He}static fromLngLat(Y,ye=0){const He=T3.convert(Y);return new nD($6(He.lng),sH(He.lat),IS(ye,He.lat))}toLngLat(){return new T3(360*this.x-180,JF(this.y))}toAltitude(){return this.z*G6(JF(this.y))}meterInMercatorCoordinateUnits(){return 1/oH*(Y=JF(this.y),1/Math.cos(Y*Math.PI/180));var Y}}function lH(ce,Y,ye){var He=2*Math.PI*6378137/256/Math.pow(2,ye);return[ce*He-2*Math.PI*6378137/2,Y*He-2*Math.PI*6378137/2]}class QF{constructor(Y,ye,He){if(!(function(lt,Ct,It){return!(lt<0||lt>25||It<0||It>=Math.pow(2,lt)||Ct<0||Ct>=Math.pow(2,lt))})(Y,ye,He))throw new Error(`x=${ye}, y=${He}, z=${Y} outside of bounds. 0<=x<${Math.pow(2,Y)}, 0<=y<${Math.pow(2,Y)} 0<=z<=25 `);this.z=Y,this.x=ye,this.y=He,this.key=VI(0,Y,Y,ye,He)}equals(Y){return this.z===Y.z&&this.x===Y.x&&this.y===Y.y}url(Y,ye,He){const lt=(It=this.y,nr=this.z,xr=lH(256*(Ct=this.x),256*(It=Math.pow(2,nr)-It-1),nr),Vr=lH(256*(Ct+1),256*(It+1),nr),xr[0]+","+xr[1]+","+Vr[0]+","+Vr[1]);var Ct,It,nr,xr,Vr;const hn=(function(wn,Zn,hi){let Di,Xi="";for(let ya=wn;ya>0;ya--)Di=1<<ya-1,Xi+=(Zn&Di?1:0)+(hi&Di?2:0);return Xi})(this.z,this.x,this.y);return Y[(this.x+this.y)%Y.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(He==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace(/{ratio}/g,ye>1?"@2x":"").replace(/{quadkey}/g,hn).replace(/{bbox-epsg-3857}/g,lt)}isChildOf(Y){const ye=this.z-Y.z;return ye>0&&Y.x===this.x>>ye&&Y.y===this.y>>ye}getTilePoint(Y){const ye=Math.pow(2,this.z);return new v((Y.x*ye-this.x)*cd,(Y.y*ye-this.y)*cd)}toString(){return`${this.z}/${this.x}/${this.y}`}}class uH{constructor(Y,ye){this.wrap=Y,this.canonical=ye,this.key=VI(Y,ye.z,ye.z,ye.x,ye.y)}}class M2{constructor(Y,ye,He,lt,Ct){if(Y<He)throw new Error(`overscaledZ should be >= z; overscaledZ = ${Y}; z = ${He}`);this.overscaledZ=Y,this.wrap=ye,this.canonical=new QF(He,+lt,+Ct),this.key=VI(ye,Y,He,lt,Ct)}clone(){return new M2(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(Y){return this.overscaledZ===Y.overscaledZ&&this.wrap===Y.wrap&&this.canonical.equals(Y.canonical)}scaledTo(Y){if(Y>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${Y}; overscaledZ = ${this.overscaledZ}`);const ye=this.canonical.z-Y;return Y>this.canonical.z?new M2(Y,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new M2(Y,this.wrap,Y,this.canonical.x>>ye,this.canonical.y>>ye)}calculateScaledKey(Y,ye){if(Y>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${Y}; overscaledZ = ${this.overscaledZ}`);const He=this.canonical.z-Y;return Y>this.canonical.z?VI(this.wrap*+ye,Y,this.canonical.z,this.canonical.x,this.canonical.y):VI(this.wrap*+ye,Y,Y,this.canonical.x>>He,this.canonical.y>>He)}isChildOf(Y){if(Y.wrap!==this.wrap)return!1;const ye=this.canonical.z-Y.canonical.z;return Y.overscaledZ===0||Y.overscaledZ<this.overscaledZ&&Y.canonical.x===this.canonical.x>>ye&&Y.canonical.y===this.canonical.y>>ye}children(Y){if(this.overscaledZ>=Y)return[new M2(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const ye=this.canonical.z+1,He=2*this.canonical.x,lt=2*this.canonical.y;return[new M2(ye,this.wrap,ye,He,lt),new M2(ye,this.wrap,ye,He+1,lt),new M2(ye,this.wrap,ye,He,lt+1),new M2(ye,this.wrap,ye,He+1,lt+1)]}isLessThan(Y){return this.wrap<Y.wrap||!(this.wrap>Y.wrap)&&(this.overscaledZ<Y.overscaledZ||!(this.overscaledZ>Y.overscaledZ)&&(this.canonical.x<Y.canonical.x||!(this.canonical.x>Y.canonical.x)&&this.canonical.y<Y.canonical.y))}wrapped(){return new M2(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(Y){return new M2(this.overscaledZ,Y,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return Math.pow(2,this.overscaledZ-this.canonical.z)}toUnwrapped(){return new uH(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}getTilePoint(Y){return this.canonical.getTilePoint(new nD(Y.x-this.wrap,Y.y))}}function VI(ce,Y,ye,He,lt){(ce*=2)<0&&(ce=-1*ce-1);const Ct=1<<ye;return(Ct*Ct*ce+Ct*lt+He).toString(36)+ye.toString(36)+Y.toString(36)}Io("CanonicalTileID",QF),Io("OverscaledTileID",M2,{omit:["posMatrix"]});class qR{constructor(Y,ye,He,lt=1,Ct=1,It=1,nr=0){if(this.uid=Y,ye.height!==ye.width)throw new RangeError("DEM tiles must be square");if(He&&!["mapbox","terrarium","custom"].includes(He))return void M(`"${He}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);this.stride=ye.height;const xr=this.dim=ye.height-2;switch(this.data=new Uint32Array(ye.data.buffer),He){case"terrarium":this.redFactor=256,this.greenFactor=1,this.blueFactor=1/256,this.baseShift=32768;break;case"custom":this.redFactor=lt,this.greenFactor=Ct,this.blueFactor=It,this.baseShift=nr;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let Vr=0;Vr<xr;Vr++)this.data[this._idx(-1,Vr)]=this.data[this._idx(0,Vr)],this.data[this._idx(xr,Vr)]=this.data[this._idx(xr-1,Vr)],this.data[this._idx(Vr,-1)]=this.data[this._idx(Vr,0)],this.data[this._idx(Vr,xr)]=this.data[this._idx(Vr,xr-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(xr,-1)]=this.data[this._idx(xr-1,0)],this.data[this._idx(-1,xr)]=this.data[this._idx(0,xr-1)],this.data[this._idx(xr,xr)]=this.data[this._idx(xr-1,xr-1)],this.min=Number.MAX_SAFE_INTEGER,this.max=Number.MIN_SAFE_INTEGER;for(let Vr=0;Vr<xr;Vr++)for(let hn=0;hn<xr;hn++){const wn=this.get(Vr,hn);wn>this.max&&(this.max=wn),wn<this.min&&(this.min=wn)}}get(Y,ye){const He=new Uint8Array(this.data.buffer),lt=4*this._idx(Y,ye);return this.unpack(He[lt],He[lt+1],He[lt+2])}getUnpackVector(){return[this.redFactor,this.greenFactor,this.blueFactor,this.baseShift]}_idx(Y,ye){if(Y<-1||Y>=this.dim+1||ye<-1||ye>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(ye+1)*this.stride+(Y+1)}unpack(Y,ye,He){return Y*this.redFactor+ye*this.greenFactor+He*this.blueFactor-this.baseShift}getPixels(){return new cf({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(Y,ye,He){if(this.dim!==Y.dim)throw new Error("dem dimension mismatch");let lt=ye*this.dim,Ct=ye*this.dim+this.dim,It=He*this.dim,nr=He*this.dim+this.dim;switch(ye){case-1:lt=Ct-1;break;case 1:Ct=lt+1}switch(He){case-1:It=nr-1;break;case 1:nr=It+1}const xr=-ye*this.dim,Vr=-He*this.dim;for(let hn=It;hn<nr;hn++)for(let wn=lt;wn<Ct;wn++)this.data[this._idx(wn,hn)]=Y.data[this._idx(wn+xr,hn+Vr)]}}Io("DEMData",qR);class cH{constructor(Y){this._stringToNumber={},this._numberToString=[];for(let ye=0;ye<Y.length;ye++){const He=Y[ye];this._stringToNumber[He]=ye,this._numberToString[ye]=He}}encode(Y){return this._stringToNumber[Y]}decode(Y){if(Y>=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${Y} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[Y]}}class fH{constructor(Y,ye,He,lt,Ct){this.type="Feature",this._vectorTileFeature=Y,Y._z=ye,Y._x=He,Y._y=lt,this.properties=Y.properties,this.id=Ct}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(Y){this._geometry=Y}toJSON(){const Y={geometry:this.geometry};for(const ye in this)ye!=="_geometry"&&ye!=="_vectorTileFeature"&&(Y[ye]=this[ye]);return Y}}class dH{constructor(Y,ye){this.tileID=Y,this.x=Y.canonical.x,this.y=Y.canonical.y,this.z=Y.canonical.z,this.grid=new As(cd,16,0),this.grid3D=new As(cd,16,0),this.featureIndexArray=new kd,this.promoteId=ye}insert(Y,ye,He,lt,Ct,It){const nr=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(He,lt,Ct);const xr=It?this.grid3D:this.grid;for(let Vr=0;Vr<ye.length;Vr++){const hn=ye[Vr],wn=[1/0,1/0,-1/0,-1/0];for(let Zn=0;Zn<hn.length;Zn++){const hi=hn[Zn];wn[0]=Math.min(wn[0],hi.x),wn[1]=Math.min(wn[1],hi.y),wn[2]=Math.max(wn[2],hi.x),wn[3]=Math.max(wn[3],hi.y)}wn[0]<cd&&wn[1]<cd&&wn[2]>=0&&wn[3]>=0&&xr.insert(nr,wn[0],wn[1],wn[2],wn[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new $a.VectorTile(new HF(this.rawTileData)).layers,this.sourceLayerCoder=new cH(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(Y,ye,He,lt){this.loadVTLayers();const Ct=Y.params||{},It=cd/Y.tileSize/Y.scale,nr=A0(Ct.filter),xr=Y.queryGeometry,Vr=Y.queryPadding*It,hn=e7(xr),wn=this.grid.query(hn.minX-Vr,hn.minY-Vr,hn.maxX+Vr,hn.maxY+Vr),Zn=e7(Y.cameraQueryGeometry),hi=this.grid3D.query(Zn.minX-Vr,Zn.minY-Vr,Zn.maxX+Vr,Zn.maxY+Vr,(ya,eo,us,ko)=>(function(es,js,Pl,Lu,df){for(const Pu of es)if(js<=Pu.x&&Pl<=Pu.y&&Lu>=Pu.x&&df>=Pu.y)return!0;const $u=[new v(js,Pl),new v(js,df),new v(Lu,df),new v(Lu,Pl)];if(es.length>2){for(const Pu of $u)if(Uo(es,Pu))return!0}for(let Pu=0;Pu<es.length-1;Pu++)if(io(es[Pu],es[Pu+1],$u))return!0;return!1})(Y.cameraQueryGeometry,ya-Vr,eo-Vr,us+Vr,ko+Vr));for(const ya of hi)wn.push(ya);wn.sort(pH);const Di={};let Xi;for(let ya=0;ya<wn.length;ya++){const eo=wn[ya];if(eo===Xi)continue;Xi=eo;const us=this.featureIndexArray.get(eo);let ko=null;this.loadMatchingFeature(Di,us.bucketIndex,us.sourceLayerIndex,us.featureIndex,nr,Ct.layers,Ct.availableImages,ye,He,lt,(es,js,Pl)=>(ko||(ko=rr(es)),js.queryIntersectsFeature(xr,es,Pl,ko,this.z,Y.transform,It,Y.pixelPosMatrix)))}return Di}loadMatchingFeature(Y,ye,He,lt,Ct,It,nr,xr,Vr,hn,wn){const Zn=this.bucketLayerIDs[ye];if(It&&!(function(ya,eo){for(let us=0;us<ya.length;us++)if(eo.indexOf(ya[us])>=0)return!0;return!1})(It,Zn))return;const hi=this.sourceLayerCoder.decode(He),Di=this.vtLayers[hi].feature(lt);if(Ct.needGeometry){const ya=mn(Di,!0);if(!Ct.filter(new gf(this.tileID.overscaledZ),ya,this.tileID.canonical))return}else if(!Ct.filter(new gf(this.tileID.overscaledZ),Di))return;const Xi=this.getId(Di,hi);for(let ya=0;ya<Zn.length;ya++){const eo=Zn[ya];if(It&&It.indexOf(eo)<0)continue;const us=xr[eo];if(!us)continue;let ko={};Xi&&hn&&(ko=hn.getState(us.sourceLayer||"_geojsonTileLayer",Xi));const es=F({},Vr[eo]);es.paint=hH(es.paint,us.paint,Di,ko,nr),es.layout=hH(es.layout,us.layout,Di,ko,nr);const js=!wn||wn(Di,us,ko);if(!js)continue;const Pl=new fH(Di,this.z,this.x,this.y,Xi);Pl.layer=es;let Lu=Y[eo];Lu===void 0&&(Lu=Y[eo]=[]),Lu.push({featureIndex:lt,feature:Pl,intersectionZ:js})}}lookupSymbolFeatures(Y,ye,He,lt,Ct,It,nr,xr){const Vr={};this.loadVTLayers();const hn=A0(Ct);for(const wn of Y)this.loadMatchingFeature(Vr,He,lt,wn,hn,It,nr,xr,ye);return Vr}hasLayer(Y){for(const ye of this.bucketLayerIDs)for(const He of ye)if(Y===He)return!0;return!1}getId(Y,ye){let He=Y.id;return this.promoteId&&(He=Y.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[ye]],typeof He=="boolean"&&(He=Number(He))),He}}function hH(ce,Y,ye,He,lt){return P(ce,(Ct,It)=>{const nr=Y instanceof Wm?Y.get(It):null;return nr&&nr.evaluate?nr.evaluate(ye,He,lt):nr})}function e7(ce){let Y=1/0,ye=1/0,He=-1/0,lt=-1/0;for(const Ct of ce)Y=Math.min(Y,Ct.x),ye=Math.min(ye,Ct.y),He=Math.max(He,Ct.x),lt=Math.max(lt,Ct.y);return{minX:Y,minY:ye,maxX:He,maxY:lt}}function pH(ce,Y){return Y-ce}function vH(ce,Y,ye,He,lt){const Ct=[];for(let It=0;It<ce.length;It++){const nr=ce[It];let xr;for(let Vr=0;Vr<nr.length-1;Vr++){let hn=nr[Vr],wn=nr[Vr+1];hn.x<Y&&wn.x<Y||(hn.x<Y?hn=new v(Y,hn.y+(Y-hn.x)/(wn.x-hn.x)*(wn.y-hn.y))._round():wn.x<Y&&(wn=new v(Y,hn.y+(Y-hn.x)/(wn.x-hn.x)*(wn.y-hn.y))._round()),hn.y<ye&&wn.y<ye||(hn.y<ye?hn=new v(hn.x+(ye-hn.y)/(wn.y-hn.y)*(wn.x-hn.x),ye)._round():wn.y<ye&&(wn=new v(hn.x+(ye-hn.y)/(wn.y-hn.y)*(wn.x-hn.x),ye)._round()),hn.x>=He&&wn.x>=He||(hn.x>=He?hn=new v(He,hn.y+(He-hn.x)/(wn.x-hn.x)*(wn.y-hn.y))._round():wn.x>=He&&(wn=new v(He,hn.y+(He-hn.x)/(wn.x-hn.x)*(wn.y-hn.y))._round()),hn.y>=lt&&wn.y>=lt||(hn.y>=lt?hn=new v(hn.x+(lt-hn.y)/(wn.y-hn.y)*(wn.x-hn.x),lt)._round():wn.y>=lt&&(wn=new v(hn.x+(lt-hn.y)/(wn.y-hn.y)*(wn.x-hn.x),lt)._round()),xr&&hn.equals(xr[xr.length-1])||(xr=[hn],Ct.push(xr)),xr.push(wn)))))}}return Ct}Io("FeatureIndex",dH,{omit:["rawTileData","sourceLayerCoder"]});class t5 extends v{constructor(Y,ye,He,lt){super(Y,ye),this.angle=He,lt!==void 0&&(this.segment=lt)}clone(){return new t5(this.x,this.y,this.angle,this.segment)}}function mH(ce,Y,ye,He,lt){if(Y.segment===void 0||ye===0)return!0;let Ct=Y,It=Y.segment+1,nr=0;for(;nr>-ye/2;){if(It--,It<0)return!1;nr-=ce[It].dist(Ct),Ct=ce[It]}nr+=ce[It].dist(ce[It+1]),It++;const xr=[];let Vr=0;for(;nr<ye/2;){const hn=ce[It],wn=ce[It+1];if(!wn)return!1;let Zn=ce[It-1].angleTo(hn)-hn.angleTo(wn);for(Zn=Math.abs((Zn+3*Math.PI)%(2*Math.PI)-Math.PI),xr.push({distance:nr,angleDelta:Zn}),Vr+=Zn;nr-xr[0].distance>He;)Vr-=xr.shift().angleDelta;if(Vr>lt)return!1;It++,nr+=hn.dist(wn)}return!0}function gH(ce){let Y=0;for(let ye=0;ye<ce.length-1;ye++)Y+=ce[ye].dist(ce[ye+1]);return Y}function yH(ce,Y,ye){return ce?.6*Y*ye:0}function bH(ce,Y){return Math.max(ce?ce.right-ce.left:0,Y?Y.right-Y.left:0)}function KK(ce,Y,ye,He,lt,Ct){const It=yH(ye,lt,Ct),nr=bH(ye,He)*Ct;let xr=0;const Vr=gH(ce)/2;for(let hn=0;hn<ce.length-1;hn++){const wn=ce[hn],Zn=ce[hn+1],hi=wn.dist(Zn);if(xr+hi>Vr){const Di=(Vr-xr)/hi,Xi=iu.number(wn.x,Zn.x,Di),ya=iu.number(wn.y,Zn.y,Di),eo=new t5(Xi,ya,Zn.angleTo(wn),hn);return eo._round(),!It||mH(ce,eo,nr,It,Y)?eo:void 0}xr+=hi}}function JK(ce,Y,ye,He,lt,Ct,It,nr,xr){const Vr=yH(He,Ct,It),hn=bH(He,lt),wn=hn*It,Zn=ce[0].x===0||ce[0].x===xr||ce[0].y===0||ce[0].y===xr;return Y-wn<Y/4&&(Y=wn+Y/4),GR(ce,Zn?Y/2*nr%Y:(hn/2+2*Ct)*It*nr%Y,Y,Vr,ye,wn,Zn,!1,xr)}function GR(ce,Y,ye,He,lt,Ct,It,nr,xr){const Vr=Ct/2,hn=gH(ce);let wn=0,Zn=Y-ye,hi=[];for(let Di=0;Di<ce.length-1;Di++){const Xi=ce[Di],ya=ce[Di+1],eo=Xi.dist(ya),us=ya.angleTo(Xi);for(;Zn+ye<wn+eo;){Zn+=ye;const ko=(Zn-wn)/eo,es=iu.number(Xi.x,ya.x,ko),js=iu.number(Xi.y,ya.y,ko);if(es>=0&&es<xr&&js>=0&&js<xr&&Zn-Vr>=0&&Zn+Vr<=hn){const Pl=new t5(es,js,us,Di);Pl._round(),He&&!mH(ce,Pl,Ct,He,lt)||hi.push(Pl)}}wn+=eo}return nr||hi.length||It||(hi=GR(ce,wn/2,ye,He,lt,Ct,It,!0,xr)),hi}Io("Anchor",t5);const qI=Ly;function xH(ce,Y,ye,He){const lt=[],Ct=ce.image,It=Ct.pixelRatio,nr=Ct.paddedRect.w-2*qI,xr=Ct.paddedRect.h-2*qI;let Vr={x1:ce.left,y1:ce.top,x2:ce.right,y2:ce.bottom};const hn=Ct.stretchX||[[0,nr]],wn=Ct.stretchY||[[0,xr]],Zn=(hl,Hc)=>hl+Hc[1]-Hc[0],hi=hn.reduce(Zn,0),Di=wn.reduce(Zn,0),Xi=nr-hi,ya=xr-Di;let eo=0,us=hi,ko=0,es=Di,js=0,Pl=Xi,Lu=0,df=ya;if(Ct.content&&He){const hl=Ct.content,Hc=hl[2]-hl[0],Pc=hl[3]-hl[1];(Ct.textFitWidth||Ct.textFitHeight)&&(Vr=tH(ce)),eo=GI(hn,0,hl[0]),ko=GI(wn,0,hl[1]),us=GI(hn,hl[0],hl[2]),es=GI(wn,hl[1],hl[3]),js=hl[0]-eo,Lu=hl[1]-ko,Pl=Hc-us,df=Pc-es}const $u=Vr.x1,Pu=Vr.y1,Ic=Vr.x2-$u,xc=Vr.y2-Pu,fc=(hl,Hc,Pc,Nf)=>{const fm=Rw(hl.stretch-eo,us,Ic,$u),Gv=W6(hl.fixed-js,Pl,hl.stretch,hi),l1=Rw(Hc.stretch-ko,es,xc,Pu),k_=W6(Hc.fixed-Lu,df,Hc.stretch,Di),k0=Rw(Pc.stretch-eo,us,Ic,$u),Oy=W6(Pc.fixed-js,Pl,Pc.stretch,hi),Bx=Rw(Nf.stretch-ko,es,xc,Pu),Ux=W6(Nf.fixed-Lu,df,Nf.stretch,Di),Hx=new v(fm,l1),Pg=new v(k0,l1),u1=new v(k0,Bx),ix=new v(fm,Bx),gb=new v(Gv/It,k_/It),jx=new v(Oy/It,Ux/It),q1=Y*Math.PI/180;if(q1){const Vh=Math.sin(q1),yv=Math.cos(q1),Pv=[yv,-Vh,Vh,yv];Hx._matMult(Pv),Pg._matMult(Pv),ix._matMult(Pv),u1._matMult(Pv)}const kw=hl.stretch+hl.fixed,Mm=Hc.stretch+Hc.fixed;return{tl:Hx,tr:Pg,bl:ix,br:u1,tex:{x:Ct.paddedRect.x+qI+kw,y:Ct.paddedRect.y+qI+Mm,w:Pc.stretch+Pc.fixed-kw,h:Nf.stretch+Nf.fixed-Mm},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:gb,pixelOffsetBR:jx,minFontScaleX:Pl/It/Ic,minFontScaleY:df/It/xc,isSDF:ye}};if(He&&(Ct.stretchX||Ct.stretchY)){const hl=$I(hn,Xi,hi),Hc=$I(wn,ya,Di);for(let Pc=0;Pc<hl.length-1;Pc++){const Nf=hl[Pc],fm=hl[Pc+1];for(let Gv=0;Gv<Hc.length-1;Gv++)lt.push(fc(Nf,Hc[Gv],fm,Hc[Gv+1]))}}else lt.push(fc({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:nr+1},{fixed:0,stretch:xr+1}));return lt}function GI(ce,Y,ye){let He=0;for(const lt of ce)He+=Math.max(Y,Math.min(ye,lt[1]))-Math.max(Y,Math.min(ye,lt[0]));return He}function $I(ce,Y,ye){const He=[{fixed:-qI,stretch:0}];for(const[lt,Ct]of ce){const It=He[He.length-1];He.push({fixed:lt-It.stretch,stretch:It.stretch}),He.push({fixed:lt-It.stretch,stretch:It.stretch+(Ct-lt)})}return He.push({fixed:Y+qI,stretch:ye}),He}function Rw(ce,Y,ye,He){return ce/Y*ye+He}function W6(ce,Y,ye,He){return ce-Y*ye/He}class Y6{constructor(Y,ye,He,lt,Ct,It,nr,xr,Vr,hn){var wn;if(this.boxStartIndex=Y.length,Vr){let Zn=It.top,hi=It.bottom;const Di=It.collisionPadding;Di&&(Zn-=Di[1],hi+=Di[3]);let Xi=hi-Zn;Xi>0&&(Xi=Math.max(10,Xi),this.circleDiameter=Xi)}else{const Zn=!((wn=It.image)===null||wn===void 0)&&wn.content&&(It.image.textFitWidth||It.image.textFitHeight)?tH(It):{x1:It.left,y1:It.top,x2:It.right,y2:It.bottom};Zn.y1=Zn.y1*nr-xr[0],Zn.y2=Zn.y2*nr+xr[2],Zn.x1=Zn.x1*nr-xr[3],Zn.x2=Zn.x2*nr+xr[1];const hi=It.collisionPadding;if(hi&&(Zn.x1-=hi[0]*nr,Zn.y1-=hi[1]*nr,Zn.x2+=hi[2]*nr,Zn.y2+=hi[3]*nr),hn){const Di=new v(Zn.x1,Zn.y1),Xi=new v(Zn.x2,Zn.y1),ya=new v(Zn.x1,Zn.y2),eo=new v(Zn.x2,Zn.y2),us=hn*Math.PI/180;Di._rotate(us),Xi._rotate(us),ya._rotate(us),eo._rotate(us),Zn.x1=Math.min(Di.x,Xi.x,ya.x,eo.x),Zn.x2=Math.max(Di.x,Xi.x,ya.x,eo.x),Zn.y1=Math.min(Di.y,Xi.y,ya.y,eo.y),Zn.y2=Math.max(Di.y,Xi.y,ya.y,eo.y)}Y.emplaceBack(ye.x,ye.y,Zn.x1,Zn.y1,Zn.x2,Zn.y2,He,lt,Ct)}this.boxEndIndex=Y.length}}class QK{constructor(Y=[],ye=(He,lt)=>He<lt?-1:He>lt?1:0){if(this.data=Y,this.length=this.data.length,this.compare=ye,this.length>0)for(let He=(this.length>>1)-1;He>=0;He--)this._down(He)}push(Y){this.data.push(Y),this._up(this.length++)}pop(){if(this.length===0)return;const Y=this.data[0],ye=this.data.pop();return--this.length>0&&(this.data[0]=ye,this._down(0)),Y}peek(){return this.data[0]}_up(Y){const{data:ye,compare:He}=this,lt=ye[Y];for(;Y>0;){const Ct=Y-1>>1,It=ye[Ct];if(He(lt,It)>=0)break;ye[Y]=It,Y=Ct}ye[Y]=lt}_down(Y){const{data:ye,compare:He}=this,lt=this.length>>1,Ct=ye[Y];for(;Y<lt;){let It=1+(Y<<1);const nr=It+1;if(nr<this.length&&He(ye[nr],ye[It])<0&&(It=nr),He(ye[It],Ct)>=0)break;ye[Y]=ye[It],Y=It}ye[Y]=Ct}}function eJ(ce,Y=1,ye=!1){let He=1/0,lt=1/0,Ct=-1/0,It=-1/0;const nr=ce[0];for(let hi=0;hi<nr.length;hi++){const Di=nr[hi];(!hi||Di.x<He)&&(He=Di.x),(!hi||Di.y<lt)&&(lt=Di.y),(!hi||Di.x>Ct)&&(Ct=Di.x),(!hi||Di.y>It)&&(It=Di.y)}const xr=Math.min(Ct-He,It-lt);let Vr=xr/2;const hn=new QK([],tJ);if(xr===0)return new v(He,lt);for(let hi=He;hi<Ct;hi+=xr)for(let Di=lt;Di<It;Di+=xr)hn.push(new E3(hi+Vr,Di+Vr,Vr,ce));let wn=(function(hi){let Di=0,Xi=0,ya=0;const eo=hi[0];for(let us=0,ko=eo.length,es=ko-1;us<ko;es=us++){const js=eo[us],Pl=eo[es],Lu=js.x*Pl.y-Pl.x*js.y;Xi+=(js.x+Pl.x)*Lu,ya+=(js.y+Pl.y)*Lu,Di+=3*Lu}return new E3(Xi/Di,ya/Di,0,hi)})(ce),Zn=hn.length;for(;hn.length;){const hi=hn.pop();(hi.d>wn.d||!wn.d)&&(wn=hi,ye&&console.log("found best %d after %d probes",Math.round(1e4*hi.d)/1e4,Zn)),hi.max-wn.d<=Y||(Vr=hi.h/2,hn.push(new E3(hi.p.x-Vr,hi.p.y-Vr,Vr,ce)),hn.push(new E3(hi.p.x+Vr,hi.p.y-Vr,Vr,ce)),hn.push(new E3(hi.p.x-Vr,hi.p.y+Vr,Vr,ce)),hn.push(new E3(hi.p.x+Vr,hi.p.y+Vr,Vr,ce)),Zn+=4)}return ye&&(console.log(`num probes: ${Zn}`),console.log(`best distance: ${wn.d}`)),wn.p}function tJ(ce,Y){return Y.max-ce.max}function E3(ce,Y,ye,He){this.p=new v(ce,Y),this.h=ye,this.d=(function(lt,Ct){let It=!1,nr=1/0;for(let xr=0;xr<Ct.length;xr++){const Vr=Ct[xr];for(let hn=0,wn=Vr.length,Zn=wn-1;hn<wn;Zn=hn++){const hi=Vr[hn],Di=Vr[Zn];hi.y>lt.y!=Di.y>lt.y&&lt.x<(Di.x-hi.x)*(lt.y-hi.y)/(Di.y-hi.y)+hi.x&&(It=!It),nr=Math.min(nr,qs(lt,hi,Di))}}return(It?1:-1)*Math.sqrt(nr)})(this.p,He),this.max=this.d+this.h*Math.SQRT2}var V1;l.aq=void 0,(V1=l.aq||(l.aq={}))[V1.center=1]="center",V1[V1.left=2]="left",V1[V1.right=3]="right",V1[V1.top=4]="top",V1[V1.bottom=5]="bottom",V1[V1["top-left"]=6]="top-left",V1[V1["top-right"]=7]="top-right",V1[V1["bottom-left"]=8]="bottom-left",V1[V1["bottom-right"]=9]="bottom-right";const r5=7,t7=Number.POSITIVE_INFINITY;function _H(ce,Y){return Y[1]!==t7?(function(ye,He,lt){let Ct=0,It=0;switch(He=Math.abs(He),lt=Math.abs(lt),ye){case"top-right":case"top-left":case"top":It=lt-r5;break;case"bottom-right":case"bottom-left":case"bottom":It=-lt+r5}switch(ye){case"top-right":case"bottom-right":case"right":Ct=-He;break;case"top-left":case"bottom-left":case"left":Ct=He}return[Ct,It]})(ce,Y[0],Y[1]):(function(ye,He){let lt=0,Ct=0;He<0&&(He=0);const It=He/Math.SQRT2;switch(ye){case"top-right":case"top-left":Ct=It-r5;break;case"bottom-right":case"bottom-left":Ct=-It+r5;break;case"bottom":Ct=-He+r5;break;case"top":Ct=He-r5}switch(ye){case"top-right":case"bottom-right":lt=-It;break;case"top-left":case"bottom-left":lt=It;break;case"left":lt=He;break;case"right":lt=-He}return[lt,Ct]})(ce,Y[0])}function wH(ce,Y,ye){var He;const lt=ce.layout,Ct=(He=lt.get("text-variable-anchor-offset"))===null||He===void 0?void 0:He.evaluate(Y,{},ye);if(Ct){const nr=Ct.values,xr=[];for(let Vr=0;Vr<nr.length;Vr+=2){const hn=xr[Vr]=nr[Vr],wn=nr[Vr+1].map(Zn=>Zn*Bp);hn.startsWith("top")?wn[1]-=r5:hn.startsWith("bottom")&&(wn[1]+=r5),xr[Vr+1]=wn}return new Na(xr)}const It=lt.get("text-variable-anchor");if(It){let nr;nr=ce._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[lt.get("text-radial-offset").evaluate(Y,{},ye)*Bp,t7]:lt.get("text-offset").evaluate(Y,{},ye).map(Vr=>Vr*Bp);const xr=[];for(const Vr of It)xr.push(Vr,_H(Vr,nr));return new Na(xr)}return null}function r7(ce){switch(ce){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function rJ(ce,Y,ye,He,lt,Ct,It,nr,xr,Vr,hn){let wn=Ct.textMaxSize.evaluate(Y,{});wn===void 0&&(wn=It);const Zn=ce.layers[0].layout,hi=Zn.get("icon-offset").evaluate(Y,{},hn),Di=TH(ye.horizontal),Xi=It/24,ya=ce.tilePixelRatio*Xi,eo=ce.tilePixelRatio*wn/24,us=ce.tilePixelRatio*nr,ko=ce.tilePixelRatio*Zn.get("symbol-spacing"),es=Zn.get("text-padding")*ce.tilePixelRatio,js=(function(hl,Hc,Pc,Nf=1){const fm=hl.get("icon-padding").evaluate(Hc,{},Pc),Gv=fm&&fm.values;return[Gv[0]*Nf,Gv[1]*Nf,Gv[2]*Nf,Gv[3]*Nf]})(Zn,Y,hn,ce.tilePixelRatio),Pl=Zn.get("text-max-angle")/180*Math.PI,Lu=Zn.get("text-rotation-alignment")!=="viewport"&&Zn.get("symbol-placement")!=="point",df=Zn.get("icon-rotation-alignment")==="map"&&Zn.get("symbol-placement")!=="point",$u=Zn.get("symbol-placement"),Pu=ko/2,Ic=Zn.get("icon-text-fit");let xc;He&&Ic!=="none"&&(ce.allowVerticalPlacement&&ye.vertical&&(xc=rH(He,ye.vertical,Ic,Zn.get("icon-text-fit-padding"),hi,Xi)),Di&&(He=rH(He,Di,Ic,Zn.get("icon-text-fit-padding"),hi,Xi)));const fc=(hl,Hc)=>{Hc.x<0||Hc.x>=cd||Hc.y<0||Hc.y>=cd||(function(Pc,Nf,fm,Gv,l1,k_,k0,Oy,Bx,Ux,Hx,Pg,u1,ix,gb,jx,q1,kw,Mm,Vh,yv,Pv,hg,Rm,XI){const BT=Pc.addToLineVertexArray(Nf,fm);let UT,ax,dm,G1,PS=0,Iw=0,Vx=0,l7=0,u7=-1,J6=-1;const hC={};let c7=Va("");if(Pc.allowVerticalPlacement&&Gv.vertical){const yb=Oy.layout.get("text-rotate").evaluate(yv,{},Rm)+90;dm=new Y6(Bx,Nf,Ux,Hx,Pg,Gv.vertical,u1,ix,gb,yb),k0&&(G1=new Y6(Bx,Nf,Ux,Hx,Pg,k0,q1,kw,gb,yb))}if(l1){const yb=Oy.layout.get("icon-rotate").evaluate(yv,{}),Pw=Oy.layout.get("icon-text-fit")!=="none",n5=xH(l1,yb,hg,Pw),HT=k0?xH(k0,yb,hg,Pw):void 0;ax=new Y6(Bx,Nf,Ux,Hx,Pg,l1,q1,kw,!1,yb),PS=4*n5.length;const $R=Pc.iconSizeData;let jT=null;$R.kind==="source"?(jT=[S3*Oy.layout.get("icon-size").evaluate(yv,{})],jT[0]>QM&&M(`${Pc.layerIds[0]}: Value for "icon-size" is >= ${J4}. Reduce your "icon-size".`)):$R.kind==="composite"&&(jT=[S3*Pv.compositeIconSizes[0].evaluate(yv,{},Rm),S3*Pv.compositeIconSizes[1].evaluate(yv,{},Rm)],(jT[0]>QM||jT[1]>QM)&&M(`${Pc.layerIds[0]}: Value for "icon-size" is >= ${J4}. Reduce your "icon-size".`)),Pc.addSymbols(Pc.icon,n5,jT,Vh,Mm,yv,l.ah.none,Nf,BT.lineStartIndex,BT.lineLength,-1,Rm),u7=Pc.icon.placedSymbolArray.length-1,HT&&(Iw=4*HT.length,Pc.addSymbols(Pc.icon,HT,jT,Vh,Mm,yv,l.ah.vertical,Nf,BT.lineStartIndex,BT.lineLength,-1,Rm),J6=Pc.icon.placedSymbolArray.length-1)}const f7=Object.keys(Gv.horizontal);for(const yb of f7){const Pw=Gv.horizontal[yb];if(!UT){c7=Va(Pw.text);const HT=Oy.layout.get("text-rotate").evaluate(yv,{},Rm);UT=new Y6(Bx,Nf,Ux,Hx,Pg,Pw,u1,ix,gb,HT)}const n5=Pw.positionedLines.length===1;if(Vx+=SH(Pc,Nf,Pw,k_,Oy,gb,yv,jx,BT,Gv.vertical?l.ah.horizontal:l.ah.horizontalOnly,n5?f7:[yb],hC,u7,Pv,Rm),n5)break}Gv.vertical&&(l7+=SH(Pc,Nf,Gv.vertical,k_,Oy,gb,yv,jx,BT,l.ah.vertical,["vertical"],hC,J6,Pv,Rm));const d7=UT?UT.boxStartIndex:Pc.collisionBoxArray.length,h7=UT?UT.boxEndIndex:Pc.collisionBoxArray.length,nJ=dm?dm.boxStartIndex:Pc.collisionBoxArray.length,iJ=dm?dm.boxEndIndex:Pc.collisionBoxArray.length,aJ=ax?ax.boxStartIndex:Pc.collisionBoxArray.length,oJ=ax?ax.boxEndIndex:Pc.collisionBoxArray.length,RH=G1?G1.boxStartIndex:Pc.collisionBoxArray.length,ZI=G1?G1.boxEndIndex:Pc.collisionBoxArray.length;let Ny=-1;const KI=(yb,Pw)=>yb&&yb.circleDiameter?Math.max(yb.circleDiameter,Pw):Pw;Ny=KI(UT,Ny),Ny=KI(dm,Ny),Ny=KI(ax,Ny),Ny=KI(G1,Ny);const p7=Ny>-1?1:0;p7&&(Ny*=XI/Bp),Pc.glyphOffsetArray.length>=VR.MAX_GLYPHS&&M("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),yv.sortKey!==void 0&&Pc.addToSortKeyRanges(Pc.symbolInstances.length,yv.sortKey);const kH=wH(Oy,yv,Rm),[sJ,IH]=(function(yb,Pw){const n5=yb.length,HT=Pw?.values;if(HT?.length>0)for(let $R=0;$R<HT.length;$R+=2){const jT=HT[$R+1];yb.emplaceBack(l.aq[HT[$R]],jT[0],jT[1])}return[n5,yb.length]})(Pc.textAnchorOffsets,kH);Pc.symbolInstances.emplaceBack(Nf.x,Nf.y,hC.right>=0?hC.right:-1,hC.center>=0?hC.center:-1,hC.left>=0?hC.left:-1,hC.vertical||-1,u7,J6,c7,d7,h7,nJ,iJ,aJ,oJ,RH,ZI,Ux,Vx,l7,PS,Iw,p7,0,u1,Ny,sJ,IH)})(ce,Hc,hl,ye,He,lt,xc,ce.layers[0],ce.collisionBoxArray,Y.index,Y.sourceLayerIndex,ce.index,ya,[es,es,es,es],Lu,xr,us,js,df,hi,Y,Ct,Vr,hn,It)};if($u==="line")for(const hl of vH(Y.geometry,0,0,cd,cd)){const Hc=JK(hl,ko,Pl,ye.vertical||Di,He,24,eo,ce.overscaling,cd);for(const Pc of Hc)Di&&EH(ce,Di.text,Pu,Pc)||fc(hl,Pc)}else if($u==="line-center"){for(const hl of Y.geometry)if(hl.length>1){const Hc=KK(hl,Pl,ye.vertical||Di,He,24,eo);Hc&&fc(hl,Hc)}}else if(Y.type==="Polygon")for(const hl of Hm(Y.geometry,0)){const Hc=eJ(hl,16);fc(hl[0],new t5(Hc.x,Hc.y,0))}else if(Y.type==="LineString")for(const hl of Y.geometry)fc(hl,new t5(hl[0].x,hl[0].y,0));else if(Y.type==="Point")for(const hl of Y.geometry)for(const Hc of hl)fc([Hc],new t5(Hc.x,Hc.y,0))}function SH(ce,Y,ye,He,lt,Ct,It,nr,xr,Vr,hn,wn,Zn,hi,Di){const Xi=(function(us,ko,es,js,Pl,Lu,df,$u){const Pu=js.layout.get("text-rotate").evaluate(Lu,{})*Math.PI/180,Ic=[];for(const xc of ko.positionedLines)for(const fc of xc.positionedGlyphs){if(!fc.rect)continue;const hl=fc.rect||{};let Hc=VF+1,Pc=!0,Nf=1,fm=0;const Gv=(Pl||$u)&&fc.vertical,l1=fc.metrics.advance*fc.scale/2;if($u&&ko.verticalizable&&(fm=xc.lineOffset/2-(fc.imageName?-(Bp-fc.metrics.width*fc.scale)/2:(fc.scale-1)*Bp)),fc.imageName){const Vh=df[fc.imageName];Pc=Vh.sdf,Nf=Vh.pixelRatio,Hc=Ly/Nf}const k_=Pl?[fc.x+l1,fc.y]:[0,0];let k0=Pl?[0,0]:[fc.x+l1+es[0],fc.y+es[1]-fm],Oy=[0,0];Gv&&(Oy=k0,k0=[0,0]);const Bx=fc.metrics.isDoubleResolution?2:1,Ux=(fc.metrics.left-Hc)*fc.scale-l1+k0[0],Hx=(-fc.metrics.top-Hc)*fc.scale+k0[1],Pg=Ux+hl.w/Bx*fc.scale/Nf,u1=Hx+hl.h/Bx*fc.scale/Nf,ix=new v(Ux,Hx),gb=new v(Pg,Hx),jx=new v(Ux,u1),q1=new v(Pg,u1);if(Gv){const Vh=new v(-l1,l1-BI),yv=-Math.PI/2,Pv=Bp/2-l1,hg=new v(5-BI-Pv,-(fc.imageName?Pv:0)),Rm=new v(...Oy);ix._rotateAround(yv,Vh)._add(hg)._add(Rm),gb._rotateAround(yv,Vh)._add(hg)._add(Rm),jx._rotateAround(yv,Vh)._add(hg)._add(Rm),q1._rotateAround(yv,Vh)._add(hg)._add(Rm)}if(Pu){const Vh=Math.sin(Pu),yv=Math.cos(Pu),Pv=[yv,-Vh,Vh,yv];ix._matMult(Pv),gb._matMult(Pv),jx._matMult(Pv),q1._matMult(Pv)}const kw=new v(0,0),Mm=new v(0,0);Ic.push({tl:ix,tr:gb,bl:jx,br:q1,tex:hl,writingMode:ko.writingMode,glyphOffset:k_,sectionIndex:fc.sectionIndex,isSDF:Pc,pixelOffsetTL:kw,pixelOffsetBR:Mm,minFontScaleX:0,minFontScaleY:0})}return Ic})(0,ye,nr,lt,Ct,It,He,ce.allowVerticalPlacement),ya=ce.textSizeData;let eo=null;ya.kind==="source"?(eo=[S3*lt.layout.get("text-size").evaluate(It,{})],eo[0]>QM&&M(`${ce.layerIds[0]}: Value for "text-size" is >= ${J4}. Reduce your "text-size".`)):ya.kind==="composite"&&(eo=[S3*hi.compositeTextSizes[0].evaluate(It,{},Di),S3*hi.compositeTextSizes[1].evaluate(It,{},Di)],(eo[0]>QM||eo[1]>QM)&&M(`${ce.layerIds[0]}: Value for "text-size" is >= ${J4}. Reduce your "text-size".`)),ce.addSymbols(ce.text,Xi,eo,nr,Ct,It,Vr,Y,xr.lineStartIndex,xr.lineLength,Zn,Di);for(const us of hn)wn[us]=ce.text.placedSymbolArray.length-1;return 4*Xi.length}function TH(ce){for(const Y in ce)return ce[Y];return null}function EH(ce,Y,ye,He){const lt=ce.compareText;if(Y in lt){const Ct=lt[Y];for(let It=Ct.length-1;It>=0;It--)if(He.dist(Ct[It])<ye)return!0}else lt[Y]=[];return lt[Y].push(He),!1}const AH=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class n7{static from(Y){if(!(Y instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[ye,He]=new Uint8Array(Y,0,2);if(ye!==219)throw new Error("Data does not appear to be in a KDBush format.");const lt=He>>4;if(lt!==1)throw new Error(`Got v${lt} data when expected v1.`);const Ct=AH[15&He];if(!Ct)throw new Error("Unrecognized array type.");const[It]=new Uint16Array(Y,2,1),[nr]=new Uint32Array(Y,4,1);return new n7(nr,It,Ct,Y)}constructor(Y,ye=64,He=Float64Array,lt){if(isNaN(Y)||Y<0)throw new Error(`Unpexpected numItems value: ${Y}.`);this.numItems=+Y,this.nodeSize=Math.min(Math.max(+ye,2),65535),this.ArrayType=He,this.IndexArrayType=Y<65536?Uint16Array:Uint32Array;const Ct=AH.indexOf(this.ArrayType),It=2*Y*this.ArrayType.BYTES_PER_ELEMENT,nr=Y*this.IndexArrayType.BYTES_PER_ELEMENT,xr=(8-nr%8)%8;if(Ct<0)throw new Error(`Unexpected typed array class: ${He}.`);lt&&lt instanceof ArrayBuffer?(this.data=lt,this.ids=new this.IndexArrayType(this.data,8,Y),this.coords=new this.ArrayType(this.data,8+nr+xr,2*Y),this._pos=2*Y,this._finished=!0):(this.data=new ArrayBuffer(8+It+nr+xr),this.ids=new this.IndexArrayType(this.data,8,Y),this.coords=new this.ArrayType(this.data,8+nr+xr,2*Y),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+Ct]),new Uint16Array(this.data,2,1)[0]=ye,new Uint32Array(this.data,4,1)[0]=Y)}add(Y,ye){const He=this._pos>>1;return this.ids[He]=He,this.coords[this._pos++]=Y,this.coords[this._pos++]=ye,He}finish(){const Y=this._pos>>1;if(Y!==this.numItems)throw new Error(`Added ${Y} items when expected ${this.numItems}.`);return i7(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(Y,ye,He,lt){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:Ct,coords:It,nodeSize:nr}=this,xr=[0,Ct.length-1,0],Vr=[];for(;xr.length;){const hn=xr.pop()||0,wn=xr.pop()||0,Zn=xr.pop()||0;if(wn-Zn<=nr){for(let ya=Zn;ya<=wn;ya++){const eo=It[2*ya],us=It[2*ya+1];eo>=Y&&eo<=He&&us>=ye&&us<=lt&&Vr.push(Ct[ya])}continue}const hi=Zn+wn>>1,Di=It[2*hi],Xi=It[2*hi+1];Di>=Y&&Di<=He&&Xi>=ye&&Xi<=lt&&Vr.push(Ct[hi]),(hn===0?Y<=Di:ye<=Xi)&&(xr.push(Zn),xr.push(hi-1),xr.push(1-hn)),(hn===0?He>=Di:lt>=Xi)&&(xr.push(hi+1),xr.push(wn),xr.push(1-hn))}return Vr}within(Y,ye,He){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:lt,coords:Ct,nodeSize:It}=this,nr=[0,lt.length-1,0],xr=[],Vr=He*He;for(;nr.length;){const hn=nr.pop()||0,wn=nr.pop()||0,Zn=nr.pop()||0;if(wn-Zn<=It){for(let ya=Zn;ya<=wn;ya++)mb(Ct[2*ya],Ct[2*ya+1],Y,ye)<=Vr&&xr.push(lt[ya]);continue}const hi=Zn+wn>>1,Di=Ct[2*hi],Xi=Ct[2*hi+1];mb(Di,Xi,Y,ye)<=Vr&&xr.push(lt[hi]),(hn===0?Y-He<=Di:ye-He<=Xi)&&(nr.push(Zn),nr.push(hi-1),nr.push(1-hn)),(hn===0?Y+He>=Di:ye+He>=Xi)&&(nr.push(hi+1),nr.push(wn),nr.push(1-hn))}return xr}}function i7(ce,Y,ye,He,lt,Ct){if(lt-He<=ye)return;const It=He+lt>>1;CH(ce,Y,It,He,lt,Ct),i7(ce,Y,ye,He,It-1,1-Ct),i7(ce,Y,ye,It+1,lt,1-Ct)}function CH(ce,Y,ye,He,lt,Ct){for(;lt>He;){if(lt-He>600){const Vr=lt-He+1,hn=ye-He+1,wn=Math.log(Vr),Zn=.5*Math.exp(2*wn/3),hi=.5*Math.sqrt(wn*Zn*(Vr-Zn)/Vr)*(hn-Vr/2<0?-1:1);CH(ce,Y,ye,Math.max(He,Math.floor(ye-hn*Zn/Vr+hi)),Math.min(lt,Math.floor(ye+(Vr-hn)*Zn/Vr+hi)),Ct)}const It=Y[2*ye+Ct];let nr=He,xr=lt;for(WI(ce,Y,He,ye),Y[2*lt+Ct]>It&&WI(ce,Y,He,lt);nr<xr;){for(WI(ce,Y,nr,xr),nr++,xr--;Y[2*nr+Ct]<It;)nr++;for(;Y[2*xr+Ct]>It;)xr--}Y[2*He+Ct]===It?WI(ce,Y,He,xr):(xr++,WI(ce,Y,xr,lt)),xr<=ye&&(He=xr+1),ye<=xr&&(lt=xr-1)}}function WI(ce,Y,ye,He){X6(ce,ye,He),X6(Y,2*ye,2*He),X6(Y,2*ye+1,2*He+1)}function X6(ce,Y,ye){const He=ce[Y];ce[Y]=ce[ye],ce[ye]=He}function mb(ce,Y,ye,He){const lt=ce-ye,Ct=Y-He;return lt*lt+Ct*Ct}var a7;l.bg=void 0,(a7=l.bg||(l.bg={})).create="create",a7.load="load",a7.fullLoad="fullLoad";let Z6=null,YI=[];const o7=1e3/60,K6="loadTime",s7="fullLoadTime",MH={mark(ce){performance.mark(ce)},frame(ce){const Y=ce;Z6!=null&&YI.push(Y-Z6),Z6=Y},clearMetrics(){Z6=null,YI=[],performance.clearMeasures(K6),performance.clearMeasures(s7);for(const ce in l.bg)performance.clearMarks(l.bg[ce])},getPerformanceMetrics(){performance.measure(K6,l.bg.create,l.bg.load),performance.measure(s7,l.bg.create,l.bg.fullLoad);const ce=performance.getEntriesByName(K6)[0].duration,Y=performance.getEntriesByName(s7)[0].duration,ye=YI.length,He=1/(YI.reduce((Ct,It)=>Ct+It,0)/ye/1e3),lt=YI.filter(Ct=>Ct>o7).reduce((Ct,It)=>Ct+(It-o7)/o7,0);return{loadTime:ce,fullLoadTime:Y,fps:He,percentDroppedFrames:lt/(ye+lt)*100,totalFrames:ye}}};l.$=class extends Cn{},l.A=zs,l.B=rs,l.C=function(ce){if(Z==null){const Y=ce.navigator?ce.navigator.userAgent:null;Z=!!ce.safari||!(!Y||!(/\b(iPad|iPhone|iPod)\b/.test(Y)||Y.match("Safari")&&!Y.match("Chrome")))}return Z},l.D=Iu,l.E=Ee,l.F=class{constructor(ce,Y){this.target=ce,this.mapId=Y,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new rD(()=>this.process()),this.subscription=(function(ye,He,lt,Ct){return ye.addEventListener(He,lt,!1),{unsubscribe:()=>{ye.removeEventListener(He,lt,!1)}}})(this.target,"message",ye=>this.receive(ye)),this.globalScope=$(self)?ce:window}registerMessageHandler(ce,Y){this.messageHandlers[ce]=Y}sendAsync(ce,Y){return new Promise((ye,He)=>{const lt=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[lt]={resolve:ye,reject:He},Y&&Y.signal.addEventListener("abort",()=>{delete this.resolveRejects[lt];const nr={id:lt,type:"<cancel>",origin:location.origin,targetMapId:ce.targetMapId,sourceMapId:this.mapId};this.target.postMessage(nr)},{once:!0});const Ct=[],It=Object.assign(Object.assign({},ce),{id:lt,sourceMapId:this.mapId,origin:location.origin,data:ku(ce.data,Ct)});this.target.postMessage(It,{transfer:Ct})})}receive(ce){const Y=ce.data,ye=Y.id;if(!(Y.origin!=="file://"&&location.origin!=="file://"&&Y.origin!=="resource://android"&&location.origin!=="resource://android"&&Y.origin!==location.origin||Y.targetMapId&&this.mapId!==Y.targetMapId)){if(Y.type==="<cancel>"){delete this.tasks[ye];const He=this.abortControllers[ye];return delete this.abortControllers[ye],void(He&&He.abort())}if($(self)||Y.mustQueue)return this.tasks[ye]=Y,this.taskQueue.push(ye),void this.invoker.trigger();this.processTask(ye,Y)}}process(){if(this.taskQueue.length===0)return;const ce=this.taskQueue.shift(),Y=this.tasks[ce];delete this.tasks[ce],this.taskQueue.length>0&&this.invoker.trigger(),Y&&this.processTask(ce,Y)}processTask(ce,Y){return u(this,void 0,void 0,function*(){if(Y.type==="<response>"){const lt=this.resolveRejects[ce];return delete this.resolveRejects[ce],lt?void(Y.error?lt.reject(Au(Y.error)):lt.resolve(Au(Y.data))):void 0}if(!this.messageHandlers[Y.type])return void this.completeTask(ce,new Error(`Could not find a registered handler for ${Y.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));const ye=Au(Y.data),He=new AbortController;this.abortControllers[ce]=He;try{const lt=yield this.messageHandlers[Y.type](Y.sourceMapId,ye,He);this.completeTask(ce,null,lt)}catch(lt){this.completeTask(ce,lt)}})}completeTask(ce,Y,ye){const He=[];delete this.abortControllers[ce];const lt={id:ce,type:"<response>",sourceMapId:this.mapId,origin:location.origin,error:Y?ku(Y):null,data:ku(ye,He)};this.target.postMessage(lt,{transfer:He})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},l.G=ke,l.H=function(){var ce=new zs(16);return zs!=Float32Array&&(ce[1]=0,ce[2]=0,ce[3]=0,ce[4]=0,ce[6]=0,ce[7]=0,ce[8]=0,ce[9]=0,ce[11]=0,ce[12]=0,ce[13]=0,ce[14]=0),ce[0]=1,ce[5]=1,ce[10]=1,ce[15]=1,ce},l.I=vb,l.J=function(ce,Y,ye){var He,lt,Ct,It,nr,xr,Vr,hn,wn,Zn,hi,Di,Xi=ye[0],ya=ye[1],eo=ye[2];return Y===ce?(ce[12]=Y[0]*Xi+Y[4]*ya+Y[8]*eo+Y[12],ce[13]=Y[1]*Xi+Y[5]*ya+Y[9]*eo+Y[13],ce[14]=Y[2]*Xi+Y[6]*ya+Y[10]*eo+Y[14],ce[15]=Y[3]*Xi+Y[7]*ya+Y[11]*eo+Y[15]):(lt=Y[1],Ct=Y[2],It=Y[3],nr=Y[4],xr=Y[5],Vr=Y[6],hn=Y[7],wn=Y[8],Zn=Y[9],hi=Y[10],Di=Y[11],ce[0]=He=Y[0],ce[1]=lt,ce[2]=Ct,ce[3]=It,ce[4]=nr,ce[5]=xr,ce[6]=Vr,ce[7]=hn,ce[8]=wn,ce[9]=Zn,ce[10]=hi,ce[11]=Di,ce[12]=He*Xi+nr*ya+wn*eo+Y[12],ce[13]=lt*Xi+xr*ya+Zn*eo+Y[13],ce[14]=Ct*Xi+Vr*ya+hi*eo+Y[14],ce[15]=It*Xi+hn*ya+Di*eo+Y[15]),ce},l.K=function(ce,Y,ye){var He=ye[0],lt=ye[1],Ct=ye[2];return ce[0]=Y[0]*He,ce[1]=Y[1]*He,ce[2]=Y[2]*He,ce[3]=Y[3]*He,ce[4]=Y[4]*lt,ce[5]=Y[5]*lt,ce[6]=Y[6]*lt,ce[7]=Y[7]*lt,ce[8]=Y[8]*Ct,ce[9]=Y[9]*Ct,ce[10]=Y[10]*Ct,ce[11]=Y[11]*Ct,ce[12]=Y[12],ce[13]=Y[13],ce[14]=Y[14],ce[15]=Y[15],ce},l.L=Ra,l.M=function(ce,Y){const ye={};for(let He=0;He<Y.length;He++){const lt=Y[He];lt in ce&&(ye[lt]=ce[lt])}return ye},l.N=T3,l.O=$6,l.P=v,l.Q=sH,l.R=cf,l.S=M2,l.T=vv,l.U=E,l.V=D,l.W=J,l.X=cd,l.Y=ar,l.Z=nD,l._=u,l.a=we,l.a$=function(ce,Y){var ye=ce[0],He=ce[1],lt=ce[2],Ct=ce[3],It=ce[4],nr=ce[5],xr=ce[6],Vr=ce[7],hn=ce[8],wn=ce[9],Zn=ce[10],hi=ce[11],Di=ce[12],Xi=ce[13],ya=ce[14],eo=ce[15],us=Y[0],ko=Y[1],es=Y[2],js=Y[3],Pl=Y[4],Lu=Y[5],df=Y[6],$u=Y[7],Pu=Y[8],Ic=Y[9],xc=Y[10],fc=Y[11],hl=Y[12],Hc=Y[13],Pc=Y[14],Nf=Y[15];return Math.abs(ye-us)<=Po*Math.max(1,Math.abs(ye),Math.abs(us))&&Math.abs(He-ko)<=Po*Math.max(1,Math.abs(He),Math.abs(ko))&&Math.abs(lt-es)<=Po*Math.max(1,Math.abs(lt),Math.abs(es))&&Math.abs(Ct-js)<=Po*Math.max(1,Math.abs(Ct),Math.abs(js))&&Math.abs(It-Pl)<=Po*Math.max(1,Math.abs(It),Math.abs(Pl))&&Math.abs(nr-Lu)<=Po*Math.max(1,Math.abs(nr),Math.abs(Lu))&&Math.abs(xr-df)<=Po*Math.max(1,Math.abs(xr),Math.abs(df))&&Math.abs(Vr-$u)<=Po*Math.max(1,Math.abs(Vr),Math.abs($u))&&Math.abs(hn-Pu)<=Po*Math.max(1,Math.abs(hn),Math.abs(Pu))&&Math.abs(wn-Ic)<=Po*Math.max(1,Math.abs(wn),Math.abs(Ic))&&Math.abs(Zn-xc)<=Po*Math.max(1,Math.abs(Zn),Math.abs(xc))&&Math.abs(hi-fc)<=Po*Math.max(1,Math.abs(hi),Math.abs(fc))&&Math.abs(Di-hl)<=Po*Math.max(1,Math.abs(Di),Math.abs(hl))&&Math.abs(Xi-Hc)<=Po*Math.max(1,Math.abs(Xi),Math.abs(Hc))&&Math.abs(ya-Pc)<=Po*Math.max(1,Math.abs(ya),Math.abs(Pc))&&Math.abs(eo-Nf)<=Po*Math.max(1,Math.abs(eo),Math.abs(Nf))},l.a0=Pi,l.a1=QF,l.a2=rt,l.a3=ce=>{const Y=window.document.createElement("video");return Y.muted=!0,new Promise(ye=>{Y.onloadstart=()=>{ye(Y)};for(const He of ce){const lt=window.document.createElement("source");_e(He)||(Y.crossOrigin="Anonymous"),lt.src=He,Y.appendChild(lt)}})},l.a4=function(){return k++},l.a5=as,l.a6=VR,l.a7=A0,l.a8=mn,l.a9=fH,l.aA=function(ce){if(ce.type==="custom")return new aH(ce);switch(ce.type){case"background":return new tD(ce);case"circle":return new Mo(ce);case"fill":return new Ii(ce);case"fill-extrusion":return new Ew(ce);case"heatmap":return new Wc(ce);case"hillshade":return new fp(ce);case"line":return new BR(ce);case"raster":return new ZK(ce);case"symbol":return new V6(ce)}},l.aB=y,l.aC=function(ce,Y){if(!ce)return[{command:"setStyle",args:[Y]}];let ye=[];try{if(!at(ce.version,Y.version))return[{command:"setStyle",args:[Y]}];at(ce.center,Y.center)||ye.push({command:"setCenter",args:[Y.center]}),at(ce.zoom,Y.zoom)||ye.push({command:"setZoom",args:[Y.zoom]}),at(ce.bearing,Y.bearing)||ye.push({command:"setBearing",args:[Y.bearing]}),at(ce.pitch,Y.pitch)||ye.push({command:"setPitch",args:[Y.pitch]}),at(ce.sprite,Y.sprite)||ye.push({command:"setSprite",args:[Y.sprite]}),at(ce.glyphs,Y.glyphs)||ye.push({command:"setGlyphs",args:[Y.glyphs]}),at(ce.transition,Y.transition)||ye.push({command:"setTransition",args:[Y.transition]}),at(ce.light,Y.light)||ye.push({command:"setLight",args:[Y.light]}),at(ce.terrain,Y.terrain)||ye.push({command:"setTerrain",args:[Y.terrain]}),at(ce.sky,Y.sky)||ye.push({command:"setSky",args:[Y.sky]}),at(ce.projection,Y.projection)||ye.push({command:"setProjection",args:[Y.projection]});const He={},lt=[];(function(It,nr,xr,Vr){let hn;for(hn in nr=nr||{},It=It||{})Object.prototype.hasOwnProperty.call(It,hn)&&(Object.prototype.hasOwnProperty.call(nr,hn)||Rt(hn,xr,Vr));for(hn in nr)Object.prototype.hasOwnProperty.call(nr,hn)&&(Object.prototype.hasOwnProperty.call(It,hn)?at(It[hn],nr[hn])||(It[hn].type==="geojson"&&nr[hn].type==="geojson"&&Wt(It,nr,hn)?gt(xr,{command:"setGeoJSONSourceData",args:[hn,nr[hn].data]}):$t(hn,nr,xr,Vr)):pt(hn,nr,xr))})(ce.sources,Y.sources,lt,He);const Ct=[];ce.layers&&ce.layers.forEach(It=>{"source"in It&&He[It.source]?ye.push({command:"removeLayer",args:[It.id]}):Ct.push(It)}),ye=ye.concat(lt),(function(It,nr,xr){nr=nr||[];const Vr=(It=It||[]).map(Ft),hn=nr.map(Ft),wn=It.reduce(st,{}),Zn=nr.reduce(st,{}),hi=Vr.slice(),Di=Object.create(null);let Xi,ya,eo,us,ko;for(let es=0,js=0;es<Vr.length;es++)Xi=Vr[es],Object.prototype.hasOwnProperty.call(Zn,Xi)?js++:(gt(xr,{command:"removeLayer",args:[Xi]}),hi.splice(hi.indexOf(Xi,js),1));for(let es=0,js=0;es<hn.length;es++)Xi=hn[hn.length-1-es],hi[hi.length-1-es]!==Xi&&(Object.prototype.hasOwnProperty.call(wn,Xi)?(gt(xr,{command:"removeLayer",args:[Xi]}),hi.splice(hi.lastIndexOf(Xi,hi.length-js),1)):js++,us=hi[hi.length-es],gt(xr,{command:"addLayer",args:[Zn[Xi],us]}),hi.splice(hi.length-es,0,Xi),Di[Xi]=!0);for(let es=0;es<hn.length;es++)if(Xi=hn[es],ya=wn[Xi],eo=Zn[Xi],!Di[Xi]&&!at(ya,eo))if(at(ya.source,eo.source)&&at(ya["source-layer"],eo["source-layer"])&&at(ya.type,eo.type)){for(ko in Ht(ya.layout,eo.layout,xr,Xi,null,"setLayoutProperty"),Ht(ya.paint,eo.paint,xr,Xi,null,"setPaintProperty"),at(ya.filter,eo.filter)||gt(xr,{command:"setFilter",args:[Xi,eo.filter]}),at(ya.minzoom,eo.minzoom)&&at(ya.maxzoom,eo.maxzoom)||gt(xr,{command:"setLayerZoomRange",args:[Xi,eo.minzoom,eo.maxzoom]}),ya)Object.prototype.hasOwnProperty.call(ya,ko)&&ko!=="layout"&&ko!=="paint"&&ko!=="filter"&&ko!=="metadata"&&ko!=="minzoom"&&ko!=="maxzoom"&&(ko.indexOf("paint.")===0?Ht(ya[ko],eo[ko],xr,Xi,ko.slice(6),"setPaintProperty"):at(ya[ko],eo[ko])||gt(xr,{command:"setLayerProperty",args:[Xi,ko,eo[ko]]}));for(ko in eo)Object.prototype.hasOwnProperty.call(eo,ko)&&!Object.prototype.hasOwnProperty.call(ya,ko)&&ko!=="layout"&&ko!=="paint"&&ko!=="filter"&&ko!=="metadata"&&ko!=="minzoom"&&ko!=="maxzoom"&&(ko.indexOf("paint.")===0?Ht(ya[ko],eo[ko],xr,Xi,ko.slice(6),"setPaintProperty"):at(ya[ko],eo[ko])||gt(xr,{command:"setLayerProperty",args:[Xi,ko,eo[ko]]}))}else gt(xr,{command:"removeLayer",args:[Xi]}),us=hi[hi.lastIndexOf(Xi)+1],gt(xr,{command:"addLayer",args:[eo,us]})})(Ct,Y.layers,ye)}catch(He){console.warn("Unable to compute style diff:",He),ye=[{command:"setStyle",args:[Y]}]}return ye},l.aD=function(ce){const Y=[],ye=ce.id;return ye===void 0&&Y.push({message:`layers.${ye}: missing required property "id"`}),ce.render===void 0&&Y.push({message:`layers.${ye}: missing required method "render"`}),ce.renderingMode&&ce.renderingMode!=="2d"&&ce.renderingMode!=="3d"&&Y.push({message:`layers.${ye}: property "renderingMode" must be either "2d" or "3d"`}),Y},l.aE=function ce(Y,ye){if(Array.isArray(Y)){if(!Array.isArray(ye)||Y.length!==ye.length)return!1;for(let He=0;He<Y.length;He++)if(!ce(Y[He],ye[He]))return!1;return!0}if(typeof Y=="object"&&Y!==null&&ye!==null){if(typeof ye!="object"||Object.keys(Y).length!==Object.keys(ye).length)return!1;for(const He in Y)if(!ce(Y[He],ye[He]))return!1;return!0}return Y===ye},l.aF=P,l.aG=T,l.aH=class extends Yl{constructor(ce,Y){super(ce,Y),this.current=0}set(ce){this.current!==ce&&(this.current=ce,this.gl.uniform1i(this.location,ce))}},l.aI=eu,l.aJ=class extends Yl{constructor(ce,Y){super(ce,Y),this.current=Zu}set(ce){if(ce[12]!==this.current[12]||ce[0]!==this.current[0])return this.current=ce,void this.gl.uniformMatrix4fv(this.location,!1,ce);for(let Y=1;Y<16;Y++)if(ce[Y]!==this.current[Y]){this.current=ce,this.gl.uniformMatrix4fv(this.location,!1,ce);break}}},l.aK=Vc,l.aL=ou,l.aM=Kr,l.aN=class extends Yl{constructor(ce,Y){super(ce,Y),this.current=[0,0,0]}set(ce){ce[0]===this.current[0]&&ce[1]===this.current[1]&&ce[2]===this.current[2]||(this.current=ce,this.gl.uniform3f(this.location,ce[0],ce[1],ce[2]))}},l.aO=class extends Yl{constructor(ce,Y){super(ce,Y),this.current=[0,0]}set(ce){ce[0]===this.current[0]&&ce[1]===this.current[1]||(this.current=ce,this.gl.uniform2f(this.location,ce[0],ce[1]))}},l.aP=function(ce,Y,ye,He,lt,Ct,It){var nr=1/(Y-ye),xr=1/(He-lt),Vr=1/(Ct-It);return ce[0]=-2*nr,ce[1]=0,ce[2]=0,ce[3]=0,ce[4]=0,ce[5]=-2*xr,ce[6]=0,ce[7]=0,ce[8]=0,ce[9]=0,ce[10]=2*Vr,ce[11]=0,ce[12]=(Y+ye)*nr,ce[13]=(lt+He)*xr,ce[14]=(It+Ct)*Vr,ce[15]=1,ce},l.aQ=ua,l.aR=class extends Nr{},l.aS=YM,l.aT=class extends An{},l.aU=mh,l.aV=function(ce){return ce<=1?1:Math.pow(2,Math.ceil(Math.log(ce)/Math.LN2))},l.aW=zu,l.aX=Ec,l.aY=Wr,l.aZ=class extends mo{},l.a_=function(ce,Y){return ce[0]===Y[0]&&ce[1]===Y[1]&&ce[2]===Y[2]&&ce[3]===Y[3]&&ce[4]===Y[4]&&ce[5]===Y[5]&&ce[6]===Y[6]&&ce[7]===Y[7]&&ce[8]===Y[8]&&ce[9]===Y[9]&&ce[10]===Y[10]&&ce[11]===Y[11]&&ce[12]===Y[12]&&ce[13]===Y[13]&&ce[14]===Y[14]&&ce[15]===Y[15]},l.aa=function(ce){const Y={};if(ce.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(ye,He,lt,Ct)=>{const It=lt||Ct;return Y[He]=!It||It.toLowerCase(),""}),Y["max-age"]){const ye=parseInt(Y["max-age"],10);isNaN(ye)?delete Y["max-age"]:Y["max-age"]=ye}return Y},l.ab=function(ce,Y){const ye=[];for(const He in ce)He in Y||ye.push(He);return ye},l.ac=I,l.ad=function(ce,Y,ye){var He=Math.sin(ye),lt=Math.cos(ye),Ct=Y[0],It=Y[1],nr=Y[2],xr=Y[3],Vr=Y[4],hn=Y[5],wn=Y[6],Zn=Y[7];return Y!==ce&&(ce[8]=Y[8],ce[9]=Y[9],ce[10]=Y[10],ce[11]=Y[11],ce[12]=Y[12],ce[13]=Y[13],ce[14]=Y[14],ce[15]=Y[15]),ce[0]=Ct*lt+Vr*He,ce[1]=It*lt+hn*He,ce[2]=nr*lt+wn*He,ce[3]=xr*lt+Zn*He,ce[4]=Vr*lt-Ct*He,ce[5]=hn*lt-It*He,ce[6]=wn*lt-nr*He,ce[7]=Zn*lt-xr*He,ce},l.ae=function(ce){var Y=new zs(16);return Y[0]=ce[0],Y[1]=ce[1],Y[2]=ce[2],Y[3]=ce[3],Y[4]=ce[4],Y[5]=ce[5],Y[6]=ce[6],Y[7]=ce[7],Y[8]=ce[8],Y[9]=ce[9],Y[10]=ce[10],Y[11]=ce[11],Y[12]=ce[12],Y[13]=ce[13],Y[14]=ce[14],Y[15]=ce[15],Y},l.af=Wo,l.ag=function(ce,Y){let ye=0,He=0;if(ce.kind==="constant")He=ce.layoutSize;else if(ce.kind!=="source"){const{interpolationType:lt,minZoom:Ct,maxZoom:It}=ce,nr=lt?I(bu.interpolationFactor(lt,Y,Ct,It),0,1):0;ce.kind==="camera"?He=iu.number(ce.minSize,ce.maxSize,nr):ye=nr}return{uSizeT:ye,uSize:He}},l.ai=function(ce,{uSize:Y,uSizeT:ye},{lowerSize:He,upperSize:lt}){return ce.kind==="source"?He/S3:ce.kind==="composite"?iu.number(He/S3,lt/S3,ye):Y},l.aj=e5,l.ak=function(ce,Y,ye,He){const lt=Y.y-ce.y,Ct=Y.x-ce.x,It=He.y-ye.y,nr=He.x-ye.x,xr=It*Ct-nr*lt;if(xr===0)return null;const Vr=(nr*(ce.y-ye.y)-It*(ce.x-ye.x))/xr;return new v(ce.x+Vr*Ct,ce.y+Vr*lt)},l.al=vH,l.am=Wa,l.an=Ha,l.ao=function(ce){let Y=1/0,ye=1/0,He=-1/0,lt=-1/0;for(const Ct of ce)Y=Math.min(Y,Ct.x),ye=Math.min(ye,Ct.y),He=Math.max(He,Ct.x),lt=Math.max(lt,Ct.y);return[Y,ye,He,lt]},l.ap=Bp,l.ar=$F,l.as=function(ce,Y){var ye=Y[0],He=Y[1],lt=Y[2],Ct=Y[3],It=Y[4],nr=Y[5],xr=Y[6],Vr=Y[7],hn=Y[8],wn=Y[9],Zn=Y[10],hi=Y[11],Di=Y[12],Xi=Y[13],ya=Y[14],eo=Y[15],us=ye*nr-He*It,ko=ye*xr-lt*It,es=ye*Vr-Ct*It,js=He*xr-lt*nr,Pl=He*Vr-Ct*nr,Lu=lt*Vr-Ct*xr,df=hn*Xi-wn*Di,$u=hn*ya-Zn*Di,Pu=hn*eo-hi*Di,Ic=wn*ya-Zn*Xi,xc=wn*eo-hi*Xi,fc=Zn*eo-hi*ya,hl=us*fc-ko*xc+es*Ic+js*Pu-Pl*$u+Lu*df;return hl?(ce[0]=(nr*fc-xr*xc+Vr*Ic)*(hl=1/hl),ce[1]=(lt*xc-He*fc-Ct*Ic)*hl,ce[2]=(Xi*Lu-ya*Pl+eo*js)*hl,ce[3]=(Zn*Pl-wn*Lu-hi*js)*hl,ce[4]=(xr*Pu-It*fc-Vr*$u)*hl,ce[5]=(ye*fc-lt*Pu+Ct*$u)*hl,ce[6]=(ya*es-Di*Lu-eo*ko)*hl,ce[7]=(hn*Lu-Zn*es+hi*ko)*hl,ce[8]=(It*xc-nr*Pu+Vr*df)*hl,ce[9]=(He*Pu-ye*xc-Ct*df)*hl,ce[10]=(Di*Pl-Xi*es+eo*us)*hl,ce[11]=(wn*es-hn*Pl-hi*us)*hl,ce[12]=(nr*$u-It*Ic-xr*df)*hl,ce[13]=(ye*Ic-He*$u+lt*df)*hl,ce[14]=(Xi*ko-Di*js-ya*us)*hl,ce[15]=(hn*js-wn*ko+Zn*us)*hl,ce):null},l.at=r7,l.au=GF,l.av=n7,l.aw=function(){const ce={},Y=Te.$version;for(const ye in Te.$root){const He=Te.$root[ye];if(He.required){let lt=null;lt=ye==="version"?Y:He.type==="array"?[]:{},lt!=null&&(ce[ye]=lt)}}return ce},l.ax=cl,l.ay=oe,l.az=function(ce){ce=ce.slice();const Y=Object.create(null);for(let ye=0;ye<ce.length;ye++)Y[ce[ye].id]=ce[ye];for(let ye=0;ye<ce.length;ye++)"ref"in ce[ye]&&(ce[ye]=tt(ce[ye],Y[ce[ye].ref]));return ce},l.b=K,l.b0=function(ce,Y){return ce[0]=Y[0],ce[1]=Y[1],ce[2]=Y[2],ce[3]=Y[3],ce[4]=Y[4],ce[5]=Y[5],ce[6]=Y[6],ce[7]=Y[7],ce[8]=Y[8],ce[9]=Y[9],ce[10]=Y[10],ce[11]=Y[11],ce[12]=Y[12],ce[13]=Y[13],ce[14]=Y[14],ce[15]=Y[15],ce},l.b1=function(ce,Y,ye){return ce[0]=Y[0]*ye[0],ce[1]=Y[1]*ye[1],ce[2]=Y[2]*ye[2],ce[3]=Y[3]*ye[3],ce},l.b2=function(ce,Y){return ce[0]*Y[0]+ce[1]*Y[1]+ce[2]*Y[2]+ce[3]*Y[3]},l.b3=N,l.b4=uH,l.b5=IS,l.b6=function(ce,Y,ye,He,lt){var Ct,It=1/Math.tan(Y/2);return ce[0]=It/ye,ce[1]=0,ce[2]=0,ce[3]=0,ce[4]=0,ce[5]=It,ce[6]=0,ce[7]=0,ce[8]=0,ce[9]=0,ce[11]=-1,ce[12]=0,ce[13]=0,ce[15]=0,lt!=null&&lt!==1/0?(ce[10]=(lt+He)*(Ct=1/(He-lt)),ce[14]=2*lt*He*Ct):(ce[10]=-1,ce[14]=-2*He),ce},l.b7=function(ce,Y,ye){var He=Math.sin(ye),lt=Math.cos(ye),Ct=Y[4],It=Y[5],nr=Y[6],xr=Y[7],Vr=Y[8],hn=Y[9],wn=Y[10],Zn=Y[11];return Y!==ce&&(ce[0]=Y[0],ce[1]=Y[1],ce[2]=Y[2],ce[3]=Y[3],ce[12]=Y[12],ce[13]=Y[13],ce[14]=Y[14],ce[15]=Y[15]),ce[4]=Ct*lt+Vr*He,ce[5]=It*lt+hn*He,ce[6]=nr*lt+wn*He,ce[7]=xr*lt+Zn*He,ce[8]=Vr*lt-Ct*He,ce[9]=hn*lt-It*He,ce[10]=wn*lt-nr*He,ce[11]=Zn*lt-xr*He,ce},l.b8=g,l.b9=C,l.bA=nx,l.bB=function(ce){return ce.message===re},l.bC=bd,l.bD=Bf,l.ba=function(ce){return ce*Math.PI/180},l.bb=function(ce,Y){const{x:ye,y:He}=nD.fromLngLat(Y);return!(ce<0||ce>25||He<0||He>=1||ye<0||ye>=1)},l.bc=function(ce,Y){return ce[0]=Y[0],ce[1]=0,ce[2]=0,ce[3]=0,ce[4]=0,ce[5]=Y[1],ce[6]=0,ce[7]=0,ce[8]=0,ce[9]=0,ce[10]=Y[2],ce[11]=0,ce[12]=0,ce[13]=0,ce[14]=0,ce[15]=1,ce},l.bd=class extends ln{},l.be=KF,l.bf=MH,l.bh=Le,l.bi=function(ce,Y){we.REGISTERED_PROTOCOLS[ce]=Y},l.bj=function(ce){delete we.REGISTERED_PROTOCOLS[ce]},l.bk=function(ce,Y){const ye={};for(let lt=0;lt<ce.length;lt++){const Ct=Y&&Y[ce[lt].id]||Iy(ce[lt]);Y&&(Y[ce[lt].id]=Ct);let It=ye[Ct];It||(It=ye[Ct]=[]),It.push(ce[lt])}const He=[];for(const lt in ye)He.push(ye[lt]);return He},l.bl=Io,l.bm=cH,l.bn=dH,l.bo=QU,l.bp=function(ce){ce.bucket.createArrays(),ce.bucket.tilePixelRatio=cd/(512*ce.bucket.overscaling),ce.bucket.compareText={},ce.bucket.iconsNeedLinear=!1;const Y=ce.bucket.layers[0],ye=Y.layout,He=Y._unevaluatedLayout._values,lt={layoutIconSize:He["icon-size"].possiblyEvaluate(new gf(ce.bucket.zoom+1),ce.canonical),layoutTextSize:He["text-size"].possiblyEvaluate(new gf(ce.bucket.zoom+1),ce.canonical),textMaxSize:He["text-size"].possiblyEvaluate(new gf(18))};if(ce.bucket.textSizeData.kind==="composite"){const{minZoom:Vr,maxZoom:hn}=ce.bucket.textSizeData;lt.compositeTextSizes=[He["text-size"].possiblyEvaluate(new gf(Vr),ce.canonical),He["text-size"].possiblyEvaluate(new gf(hn),ce.canonical)]}if(ce.bucket.iconSizeData.kind==="composite"){const{minZoom:Vr,maxZoom:hn}=ce.bucket.iconSizeData;lt.compositeIconSizes=[He["icon-size"].possiblyEvaluate(new gf(Vr),ce.canonical),He["icon-size"].possiblyEvaluate(new gf(hn),ce.canonical)]}const Ct=ye.get("text-line-height")*Bp,It=ye.get("text-rotation-alignment")!=="viewport"&&ye.get("symbol-placement")!=="point",nr=ye.get("text-keep-upright"),xr=ye.get("text-size");for(const Vr of ce.bucket.features){const hn=ye.get("text-font").evaluate(Vr,{},ce.canonical).join(","),wn=xr.evaluate(Vr,{},ce.canonical),Zn=lt.layoutTextSize.evaluate(Vr,{},ce.canonical),hi=lt.layoutIconSize.evaluate(Vr,{},ce.canonical),Di={horizontal:{},vertical:void 0},Xi=Vr.text;let ya,eo=[0,0];if(Xi){const es=Xi.toString(),js=ye.get("text-letter-spacing").evaluate(Vr,{},ce.canonical)*Bp,Pl=Nc(es)?js:0,Lu=ye.get("text-anchor").evaluate(Vr,{},ce.canonical),df=wH(Y,Vr,ce.canonical);if(!df){const xc=ye.get("text-radial-offset").evaluate(Vr,{},ce.canonical);eo=xc?_H(Lu,[xc*Bp,t7]):ye.get("text-offset").evaluate(Vr,{},ce.canonical).map(fc=>fc*Bp)}let $u=It?"center":ye.get("text-justify").evaluate(Vr,{},ce.canonical);const Pu=ye.get("symbol-placement")==="point"?ye.get("text-max-width").evaluate(Vr,{},ce.canonical)*Bp:1/0,Ic=()=>{ce.bucket.allowVerticalPlacement&&Vu(es)&&(Di.vertical=z6(Xi,ce.glyphMap,ce.glyphPositions,ce.imagePositions,hn,Pu,Ct,Lu,"left",Pl,eo,l.ah.vertical,!0,Zn,wn))};if(!It&&df){const xc=new Set;if($u==="auto")for(let hl=0;hl<df.values.length;hl+=2)xc.add(r7(df.values[hl]));else xc.add($u);let fc=!1;for(const hl of xc)if(!Di.horizontal[hl])if(fc)Di.horizontal[hl]=Di.horizontal[0];else{const Hc=z6(Xi,ce.glyphMap,ce.glyphPositions,ce.imagePositions,hn,Pu,Ct,"center",hl,Pl,eo,l.ah.horizontal,!1,Zn,wn);Hc&&(Di.horizontal[hl]=Hc,fc=Hc.positionedLines.length===1)}Ic()}else{$u==="auto"&&($u=r7(Lu));const xc=z6(Xi,ce.glyphMap,ce.glyphPositions,ce.imagePositions,hn,Pu,Ct,Lu,$u,Pl,eo,l.ah.horizontal,!1,Zn,wn);xc&&(Di.horizontal[$u]=xc),Ic(),Vu(es)&&It&&nr&&(Di.vertical=z6(Xi,ce.glyphMap,ce.glyphPositions,ce.imagePositions,hn,Pu,Ct,Lu,$u,Pl,eo,l.ah.vertical,!1,Zn,wn))}}let us=!1;if(Vr.icon&&Vr.icon.name){const es=ce.imageMap[Vr.icon.name];es&&(ya=WK(ce.imagePositions[Vr.icon.name],ye.get("icon-offset").evaluate(Vr,{},ce.canonical),ye.get("icon-anchor").evaluate(Vr,{},ce.canonical)),us=!!es.sdf,ce.bucket.sdfIcons===void 0?ce.bucket.sdfIcons=us:ce.bucket.sdfIcons!==us&&M("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(es.pixelRatio!==ce.bucket.pixelRatio||ye.get("icon-rotate").constantOr(1)!==0)&&(ce.bucket.iconsNeedLinear=!0))}const ko=TH(Di.horizontal)||Di.vertical;ce.bucket.iconsInText=!!ko&&ko.iconsInText,(ko||ya)&&rJ(ce.bucket,Vr,Di,ya,ce.imageMap,lt,Zn,hi,eo,us,ce.canonical)}ce.showCollisionBoxes&&ce.bucket.generateCollisionDebugBuffers()},l.bq=C2,l.br=jr,l.bs=af,l.bt=$a,l.bu=HF,l.bv=class{constructor(ce){this._marks={start:[ce.url,"start"].join("#"),end:[ce.url,"end"].join("#"),measure:ce.url.toString()},performance.mark(this._marks.start)}finish(){performance.mark(this._marks.end);let ce=performance.getEntriesByName(this._marks.measure);return ce.length===0&&(performance.measure(this._marks.measure,this._marks.start,this._marks.end),ce=performance.getEntriesByName(this._marks.measure),performance.clearMarks(this._marks.start),performance.clearMarks(this._marks.end),performance.clearMeasures(this._marks.measure)),ce}},l.bw=function(ce,Y,ye,He,lt){return u(this,void 0,void 0,function*(){if(D())try{return yield J(ce,Y,ye,He,lt)}catch{}return(function(Ct,It,nr,xr,Vr){const hn=Ct.width,wn=Ct.height;G&&ee||(G=new OffscreenCanvas(hn,wn),ee=G.getContext("2d",{willReadFrequently:!0})),G.width=hn,G.height=wn,ee.drawImage(Ct,0,0,hn,wn);const Zn=ee.getImageData(It,nr,xr,Vr);return ee.clearRect(0,0,hn,wn),Zn.data})(ce,Y,ye,He,lt)})},l.bx=qR,l.by=c,l.bz=p,l.c=fe,l.d=ce=>u(void 0,void 0,void 0,function*(){if(ce.byteLength===0)return createImageBitmap(new ImageData(1,1));const Y=new Blob([new Uint8Array(ce)],{type:"image/png"});try{return createImageBitmap(Y)}catch(ye){throw new Error(`Could not load image because of ${ye.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),l.e=F,l.f=ce=>new Promise((Y,ye)=>{const He=new Image;He.onload=()=>{Y(He),URL.revokeObjectURL(He.src),He.onload=null,window.requestAnimationFrame(()=>{He.src=Q})},He.onerror=()=>ye(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));const lt=new Blob([new Uint8Array(ce)],{type:"image/png"});He.src=ce.byteLength?URL.createObjectURL(lt):Q}),l.g=Oe,l.h=(ce,Y)=>be(F(ce,{type:"json"}),Y),l.i=$,l.j=se,l.k=xe,l.l=(ce,Y)=>be(F(ce,{type:"arrayBuffer"}),Y),l.m=be,l.n=function(ce){return new HF(ce).readFields(VK,[])},l.o=Fu,l.p=F6,l.q=wt,l.r=uo,l.s=_e,l.t=Bo,l.u=yo,l.v=Te,l.w=M,l.x=function([ce,Y,ye]){return Y+=90,Y*=Math.PI/180,ye*=Math.PI/180,{x:ce*Math.cos(Y)*Math.sin(ye),y:ce*Math.sin(Y)*Math.sin(ye),z:ce*Math.cos(ye)}},l.y=iu,l.z=gf}),O("worker",["./shared"],function(l){class u{constructor(St){this.keyCache={},St&&this.replace(St)}replace(St){this._layerConfigs={},this._layers={},this.update(St,[])}update(St,Ot){for(const je of St){this._layerConfigs[je.id]=je;const Ye=this._layers[je.id]=l.aA(je);Ye._featureFilter=l.a7(Ye.filter),this.keyCache[je.id]&&delete this.keyCache[je.id]}for(const je of Ot)delete this.keyCache[je],delete this._layerConfigs[je],delete this._layers[je];this.familiesBySource={};const Et=l.bk(Object.values(this._layerConfigs),this.keyCache);for(const je of Et){const Ye=je.map(Or=>this._layers[Or.id]),et=Ye[0];if(et.visibility==="none")continue;const mt=et.source||"";let Nt=this.familiesBySource[mt];Nt||(Nt=this.familiesBySource[mt]={});const lr=et.sourceLayer||"_geojsonTileLayer";let br=Nt[lr];br||(br=Nt[lr]=[]),br.push(Ye)}}}class c{constructor(St){const Ot={},Et=[];for(const mt in St){const Nt=St[mt],lr=Ot[mt]={};for(const br in Nt){const Or=Nt[+br];if(!Or||Or.bitmap.width===0||Or.bitmap.height===0)continue;const tn={x:0,y:0,w:Or.bitmap.width+2,h:Or.bitmap.height+2};Et.push(tn),lr[br]={rect:tn,metrics:Or.metrics}}}const{w:je,h:Ye}=l.p(Et),et=new l.o({width:je||1,height:Ye||1});for(const mt in St){const Nt=St[mt];for(const lr in Nt){const br=Nt[+lr];if(!br||br.bitmap.width===0||br.bitmap.height===0)continue;const Or=Ot[mt][lr].rect;l.o.copy(br.bitmap,et,{x:0,y:0},{x:Or.x+1,y:Or.y+1},br.bitmap)}}this.image=et,this.positions=Ot}}l.bl("GlyphAtlas",c);class p{constructor(St){this.tileID=new l.S(St.tileID.overscaledZ,St.tileID.wrap,St.tileID.canonical.z,St.tileID.canonical.x,St.tileID.canonical.y),this.uid=St.uid,this.zoom=St.zoom,this.pixelRatio=St.pixelRatio,this.tileSize=St.tileSize,this.source=St.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=St.showCollisionBoxes,this.collectResourceTiming=!!St.collectResourceTiming,this.returnDependencies=!!St.returnDependencies,this.promoteId=St.promoteId,this.inFlightDependencies=[]}parse(St,Ot,Et,je){return l._(this,void 0,void 0,function*(){this.status="parsing",this.data=St,this.collisionBoxArray=new l.a5;const Ye=new l.bm(Object.keys(St.layers).sort()),et=new l.bn(this.tileID,this.promoteId);et.bucketLayerIDs=[];const mt={},Nt={featureIndex:et,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:Et},lr=Ot.familiesBySource[this.source];for(const Ka in lr){const Sa=St.layers[Ka];if(!Sa)continue;Sa.version===1&&l.w(`Vector tile source "${this.source}" layer "${Ka}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const no=Ye.encode(Ka),Fo=[];for(let an=0;an<Sa.length;an++){const Hr=Sa.feature(an),nn=et.getId(Hr,Ka);Fo.push({feature:Hr,id:nn,index:an,sourceLayerIndex:no})}for(const an of lr[Ka]){const Hr=an[0];Hr.source!==this.source&&l.w(`layer.source = ${Hr.source} does not equal this.source = ${this.source}`),Hr.minzoom&&this.zoom<Math.floor(Hr.minzoom)||Hr.maxzoom&&this.zoom>=Hr.maxzoom||Hr.visibility!=="none"&&(f(an,this.zoom,Et),(mt[Hr.id]=Hr.createBucket({index:et.bucketLayerIDs.length,layers:an,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:no,sourceID:this.source})).populate(Fo,Nt,this.tileID.canonical),et.bucketLayerIDs.push(an.map(nn=>nn.id)))}}const br=l.aF(Nt.glyphDependencies,Ka=>Object.keys(Ka).map(Number));this.inFlightDependencies.forEach(Ka=>Ka?.abort()),this.inFlightDependencies=[];let Or=Promise.resolve({});if(Object.keys(br).length){const Ka=new AbortController;this.inFlightDependencies.push(Ka),Or=je.sendAsync({type:"GG",data:{stacks:br,source:this.source,tileID:this.tileID,type:"glyphs"}},Ka)}const tn=Object.keys(Nt.iconDependencies);let Jr=Promise.resolve({});if(tn.length){const Ka=new AbortController;this.inFlightDependencies.push(Ka),Jr=je.sendAsync({type:"GI",data:{icons:tn,source:this.source,tileID:this.tileID,type:"icons"}},Ka)}const dn=Object.keys(Nt.patternDependencies);let on=Promise.resolve({});if(dn.length){const Ka=new AbortController;this.inFlightDependencies.push(Ka),on=je.sendAsync({type:"GI",data:{icons:dn,source:this.source,tileID:this.tileID,type:"patterns"}},Ka)}const[Nn,Wi,Oa]=yield Promise.all([Or,Jr,on]),Da=new c(Nn),Aa=new l.bo(Wi,Oa);for(const Ka in mt){const Sa=mt[Ka];Sa instanceof l.a6?(f(Sa.layers,this.zoom,Et),l.bp({bucket:Sa,glyphMap:Nn,glyphPositions:Da.positions,imageMap:Wi,imagePositions:Aa.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):Sa.hasPattern&&(Sa instanceof l.bq||Sa instanceof l.br||Sa instanceof l.bs)&&(f(Sa.layers,this.zoom,Et),Sa.addFeatures(Nt,this.tileID.canonical,Aa.patternPositions))}return this.status="done",{buckets:Object.values(mt).filter(Ka=>!Ka.isEmpty()),featureIndex:et,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Da.image,imageAtlas:Aa,glyphMap:this.returnDependencies?Nn:null,iconMap:this.returnDependencies?Wi:null,glyphPositions:this.returnDependencies?Da.positions:null}})}}function f(mr,St,Ot){const Et=new l.z(St);for(const je of mr)je.recalculate(Et,Ot)}class v{constructor(St,Ot,Et){this.actor=St,this.layerIndex=Ot,this.availableImages=Et,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(St,Ot){return l._(this,void 0,void 0,function*(){const Et=yield l.l(St.request,Ot);try{return{vectorTile:new l.bt.VectorTile(new l.bu(Et.data)),rawData:Et.data,cacheControl:Et.cacheControl,expires:Et.expires}}catch(je){const Ye=new Uint8Array(Et.data);let et=`Unable to parse the tile at ${St.request.url}, `;throw et+=Ye[0]===31&&Ye[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${je.message}`,new Error(et)}})}loadTile(St){return l._(this,void 0,void 0,function*(){const Ot=St.uid,Et=!!(St&&St.request&&St.request.collectResourceTiming)&&new l.bv(St.request),je=new p(St);this.loading[Ot]=je;const Ye=new AbortController;je.abort=Ye;try{const et=yield this.loadVectorTile(St,Ye);if(delete this.loading[Ot],!et)return null;const mt=et.rawData,Nt={};et.expires&&(Nt.expires=et.expires),et.cacheControl&&(Nt.cacheControl=et.cacheControl);const lr={};if(Et){const Or=Et.finish();Or&&(lr.resourceTiming=JSON.parse(JSON.stringify(Or)))}je.vectorTile=et.vectorTile;const br=je.parse(et.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[Ot]=je,this.fetching[Ot]={rawTileData:mt,cacheControl:Nt,resourceTiming:lr};try{const Or=yield br;return l.e({rawTileData:mt.slice(0)},Or,Nt,lr)}finally{delete this.fetching[Ot]}}catch(et){throw delete this.loading[Ot],je.status="done",this.loaded[Ot]=je,et}})}reloadTile(St){return l._(this,void 0,void 0,function*(){const Ot=St.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 Et=this.loaded[Ot];if(Et.showCollisionBoxes=St.showCollisionBoxes,Et.status==="parsing"){const je=yield Et.parse(Et.vectorTile,this.layerIndex,this.availableImages,this.actor);let Ye;if(this.fetching[Ot]){const{rawTileData:et,cacheControl:mt,resourceTiming:Nt}=this.fetching[Ot];delete this.fetching[Ot],Ye=l.e({rawTileData:et.slice(0)},je,mt,Nt)}else Ye=je;return Ye}if(Et.status==="done"&&Et.vectorTile)return Et.parse(Et.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile(St){return l._(this,void 0,void 0,function*(){const Ot=this.loading,Et=St.uid;Ot&&Ot[Et]&&Ot[Et].abort&&(Ot[Et].abort.abort(),delete Ot[Et])})}removeTile(St){return l._(this,void 0,void 0,function*(){this.loaded&&this.loaded[St.uid]&&delete this.loaded[St.uid]})}}class h{constructor(){this.loaded={}}loadTile(St){return l._(this,void 0,void 0,function*(){const{uid:Ot,encoding:Et,rawImageData:je,redFactor:Ye,greenFactor:et,blueFactor:mt,baseShift:Nt}=St,lr=je.width+2,br=je.height+2,Or=l.b(je)?new l.R({width:lr,height:br},yield l.bw(je,-1,-1,lr,br)):je,tn=new l.bx(Ot,Or,Et,Ye,et,mt,Nt);return this.loaded=this.loaded||{},this.loaded[Ot]=tn,tn})}removeTile(St){const Ot=this.loaded,Et=St.uid;Ot&&Ot[Et]&&delete Ot[Et]}}function m(mr,St){if(mr.length!==0){_(mr[0],St);for(var Ot=1;Ot<mr.length;Ot++)_(mr[Ot],!St)}}function _(mr,St){for(var Ot=0,Et=0,je=0,Ye=mr.length,et=Ye-1;je<Ye;et=je++){var mt=(mr[je][0]-mr[et][0])*(mr[et][1]+mr[je][1]),Nt=Ot+mt;Et+=Math.abs(Ot)>=Math.abs(mt)?Ot-Nt+mt:mt-Nt+Ot,Ot=Nt}Ot+Et>=0!=!!St&&mr.reverse()}var x=l.by(function mr(St,Ot){var Et,je=St&&St.type;if(je==="FeatureCollection")for(Et=0;Et<St.features.length;Et++)mr(St.features[Et],Ot);else if(je==="GeometryCollection")for(Et=0;Et<St.geometries.length;Et++)mr(St.geometries[Et],Ot);else if(je==="Feature")mr(St.geometry,Ot);else if(je==="Polygon")m(St.coordinates,Ot);else if(je==="MultiPolygon")for(Et=0;Et<St.coordinates.length;Et++)m(St.coordinates[Et],Ot);return St});const A=l.bt.VectorTileFeature.prototype.toGeoJSON;var E={exports:{}},D=l.bz,g=l.bt.VectorTileFeature,C=I;function I(mr,St){this.options=St||{},this.features=mr,this.length=mr.length}function N(mr,St){this.id=typeof mr.id=="number"?mr.id:void 0,this.type=mr.type,this.rawGeometry=mr.type===1?[mr.geometry]:mr.geometry,this.properties=mr.tags,this.extent=St||4096}I.prototype.feature=function(mr){return new N(this.features[mr],this.options.extent)},N.prototype.loadGeometry=function(){var mr=this.rawGeometry;this.geometry=[];for(var St=0;St<mr.length;St++){for(var Ot=mr[St],Et=[],je=0;je<Ot.length;je++)Et.push(new D(Ot[je][0],Ot[je][1]));this.geometry.push(Et)}return this.geometry},N.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var mr=this.geometry,St=1/0,Ot=-1/0,Et=1/0,je=-1/0,Ye=0;Ye<mr.length;Ye++)for(var et=mr[Ye],mt=0;mt<et.length;mt++){var Nt=et[mt];St=Math.min(St,Nt.x),Ot=Math.max(Ot,Nt.x),Et=Math.min(Et,Nt.y),je=Math.max(je,Nt.y)}return[St,Et,Ot,je]},N.prototype.toGeoJSON=g.prototype.toGeoJSON;var F=l.bA,k=C;function P(mr){var St=new F;return(function(Ot,Et){for(var je in Ot.layers)Et.writeMessage(3,T,Ot.layers[je])})(mr,St),St.finish()}function T(mr,St){var Ot;St.writeVarintField(15,mr.version||1),St.writeStringField(1,mr.name||""),St.writeVarintField(5,mr.extent||4096);var Et={keys:[],values:[],keycache:{},valuecache:{}};for(Ot=0;Ot<mr.length;Ot++)Et.feature=mr.feature(Ot),St.writeMessage(2,y,Et);var je=Et.keys;for(Ot=0;Ot<je.length;Ot++)St.writeStringField(3,je[Ot]);var Ye=Et.values;for(Ot=0;Ot<Ye.length;Ot++)St.writeMessage(4,Z,Ye[Ot])}function y(mr,St){var Ot=mr.feature;Ot.id!==void 0&&St.writeVarintField(1,Ot.id),St.writeMessage(2,S,mr),St.writeVarintField(3,Ot.type),St.writeMessage(4,$,Ot)}function S(mr,St){var Ot=mr.feature,Et=mr.keys,je=mr.values,Ye=mr.keycache,et=mr.valuecache;for(var mt in Ot.properties){var Nt=Ot.properties[mt],lr=Ye[mt];if(Nt!==null){lr===void 0&&(Et.push(mt),Ye[mt]=lr=Et.length-1),St.writeVarint(lr);var br=typeof Nt;br!=="string"&&br!=="boolean"&&br!=="number"&&(Nt=JSON.stringify(Nt));var Or=br+":"+Nt,tn=et[Or];tn===void 0&&(je.push(Nt),et[Or]=tn=je.length-1),St.writeVarint(tn)}}}function M(mr,St){return(St<<3)+(7&mr)}function W(mr){return mr<<1^mr>>31}function $(mr,St){for(var Ot=mr.loadGeometry(),Et=mr.type,je=0,Ye=0,et=Ot.length,mt=0;mt<et;mt++){var Nt=Ot[mt],lr=1;Et===1&&(lr=Nt.length),St.writeVarint(M(1,lr));for(var br=Et===3?Nt.length-1:Nt.length,Or=0;Or<br;Or++){Or===1&&Et!==1&&St.writeVarint(M(2,br-1));var tn=Nt[Or].x-je,Jr=Nt[Or].y-Ye;St.writeVarint(W(tn)),St.writeVarint(W(Jr)),je+=tn,Ye+=Jr}Et===3&&St.writeVarint(M(7,1))}}function Z(mr,St){var Ot=typeof mr;Ot==="string"?St.writeStringField(1,mr):Ot==="boolean"?St.writeBooleanField(7,mr):Ot==="number"&&(mr%1!=0?St.writeDoubleField(3,mr):mr<0?St.writeSVarintField(6,mr):St.writeVarintField(5,mr))}E.exports=P,E.exports.fromVectorTileJs=P,E.exports.fromGeojsonVt=function(mr,St){St=St||{};var Ot={};for(var Et in mr)Ot[Et]=new k(mr[Et].features,St),Ot[Et].name=Et,Ot[Et].version=St.version,Ot[Et].extent=St.extent;return P({layers:Ot})},E.exports.GeoJSONWrapper=k;var K=l.by(E.exports);const Q={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:mr=>mr},J=Math.fround||(G=new Float32Array(1),mr=>(G[0]=+mr,G[0]));var G;const ee=3,re=5,fe=6;class we{constructor(St){this.options=Object.assign(Object.create(Q),St),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(St){const{log:Ot,minZoom:Et,maxZoom:je}=this.options;Ot&&console.time("total time");const Ye=`prepare ${St.length} points`;Ot&&console.time(Ye),this.points=St;const et=[];for(let Nt=0;Nt<St.length;Nt++){const lr=St[Nt];if(!lr.geometry)continue;const[br,Or]=lr.geometry.coordinates,tn=J(Le(br)),Jr=J(oe(Or));et.push(tn,Jr,1/0,Nt,-1,1),this.options.reduce&&et.push(0)}let mt=this.trees[je+1]=this._createTree(et);Ot&&console.timeEnd(Ye);for(let Nt=je;Nt>=Et;Nt--){const lr=+Date.now();mt=this.trees[Nt]=this._createTree(this._cluster(mt,Nt)),Ot&&console.log("z%d: %d clusters in %dms",Nt,mt.numItems,+Date.now()-lr)}return Ot&&console.timeEnd("total time"),this}getClusters(St,Ot){let Et=((St[0]+180)%360+360)%360-180;const je=Math.max(-90,Math.min(90,St[1]));let Ye=St[2]===180?180:((St[2]+180)%360+360)%360-180;const et=Math.max(-90,Math.min(90,St[3]));if(St[2]-St[0]>=360)Et=-180,Ye=180;else if(Et>Ye){const Or=this.getClusters([Et,je,180,et],Ot),tn=this.getClusters([-180,je,Ye,et],Ot);return Or.concat(tn)}const mt=this.trees[this._limitZoom(Ot)],Nt=mt.range(Le(Et),oe(et),Le(Ye),oe(je)),lr=mt.data,br=[];for(const Or of Nt){const tn=this.stride*Or;br.push(lr[tn+re]>1?Oe(lr,tn,this.clusterProps):this.points[lr[tn+ee]])}return br}getChildren(St){const Ot=this._getOriginId(St),Et=this._getOriginZoom(St),je="No cluster with the specified id.",Ye=this.trees[Et];if(!Ye)throw new Error(je);const et=Ye.data;if(Ot*this.stride>=et.length)throw new Error(je);const mt=this.options.radius/(this.options.extent*Math.pow(2,Et-1)),Nt=Ye.within(et[Ot*this.stride],et[Ot*this.stride+1],mt),lr=[];for(const br of Nt){const Or=br*this.stride;et[Or+4]===St&&lr.push(et[Or+re]>1?Oe(et,Or,this.clusterProps):this.points[et[Or+ee]])}if(lr.length===0)throw new Error(je);return lr}getLeaves(St,Ot,Et){const je=[];return this._appendLeaves(je,St,Ot=Ot||10,Et=Et||0,0),je}getTile(St,Ot,Et){const je=this.trees[this._limitZoom(St)],Ye=Math.pow(2,St),{extent:et,radius:mt}=this.options,Nt=mt/et,lr=(Et-Nt)/Ye,br=(Et+1+Nt)/Ye,Or={features:[]};return this._addTileFeatures(je.range((Ot-Nt)/Ye,lr,(Ot+1+Nt)/Ye,br),je.data,Ot,Et,Ye,Or),Ot===0&&this._addTileFeatures(je.range(1-Nt/Ye,lr,1,br),je.data,Ye,Et,Ye,Or),Ot===Ye-1&&this._addTileFeatures(je.range(0,lr,Nt/Ye,br),je.data,-1,Et,Ye,Or),Or.features.length?Or:null}getClusterExpansionZoom(St){let Ot=this._getOriginZoom(St)-1;for(;Ot<=this.options.maxZoom;){const Et=this.getChildren(St);if(Ot++,Et.length!==1)break;St=Et[0].properties.cluster_id}return Ot}_appendLeaves(St,Ot,Et,je,Ye){const et=this.getChildren(Ot);for(const mt of et){const Nt=mt.properties;if(Nt&&Nt.cluster?Ye+Nt.point_count<=je?Ye+=Nt.point_count:Ye=this._appendLeaves(St,Nt.cluster_id,Et,je,Ye):Ye<je?Ye++:St.push(mt),St.length===Et)break}return Ye}_createTree(St){const Ot=new l.av(St.length/this.stride|0,this.options.nodeSize,Float32Array);for(let Et=0;Et<St.length;Et+=this.stride)Ot.add(St[Et],St[Et+1]);return Ot.finish(),Ot.data=St,Ot}_addTileFeatures(St,Ot,Et,je,Ye,et){for(const mt of St){const Nt=mt*this.stride,lr=Ot[Nt+re]>1;let br,Or,tn;if(lr)br=ke(Ot,Nt,this.clusterProps),Or=Ot[Nt],tn=Ot[Nt+1];else{const on=this.points[Ot[Nt+ee]];br=on.properties;const[Nn,Wi]=on.geometry.coordinates;Or=Le(Nn),tn=oe(Wi)}const Jr={type:1,geometry:[[Math.round(this.options.extent*(Or*Ye-Et)),Math.round(this.options.extent*(tn*Ye-je))]],tags:br};let dn;dn=lr||this.options.generateId?Ot[Nt+ee]:this.points[Ot[Nt+ee]].id,dn!==void 0&&(Jr.id=dn),et.features.push(Jr)}}_limitZoom(St){return Math.max(this.options.minZoom,Math.min(Math.floor(+St),this.options.maxZoom+1))}_cluster(St,Ot){const{radius:Et,extent:je,reduce:Ye,minPoints:et}=this.options,mt=Et/(je*Math.pow(2,Ot)),Nt=St.data,lr=[],br=this.stride;for(let Or=0;Or<Nt.length;Or+=br){if(Nt[Or+2]<=Ot)continue;Nt[Or+2]=Ot;const tn=Nt[Or],Jr=Nt[Or+1],dn=St.within(Nt[Or],Nt[Or+1],mt),on=Nt[Or+re];let Nn=on;for(const Wi of dn){const Oa=Wi*br;Nt[Oa+2]>Ot&&(Nn+=Nt[Oa+re])}if(Nn>on&&Nn>=et){let Wi,Oa=tn*on,Da=Jr*on,Aa=-1;const Ka=((Or/br|0)<<5)+(Ot+1)+this.points.length;for(const Sa of dn){const no=Sa*br;if(Nt[no+2]<=Ot)continue;Nt[no+2]=Ot;const Fo=Nt[no+re];Oa+=Nt[no]*Fo,Da+=Nt[no+1]*Fo,Nt[no+4]=Ka,Ye&&(Wi||(Wi=this._map(Nt,Or,!0),Aa=this.clusterProps.length,this.clusterProps.push(Wi)),Ye(Wi,this._map(Nt,no)))}Nt[Or+4]=Ka,lr.push(Oa/Nn,Da/Nn,1/0,Ka,-1,Nn),Ye&&lr.push(Aa)}else{for(let Wi=0;Wi<br;Wi++)lr.push(Nt[Or+Wi]);if(Nn>1)for(const Wi of dn){const Oa=Wi*br;if(!(Nt[Oa+2]<=Ot)){Nt[Oa+2]=Ot;for(let Da=0;Da<br;Da++)lr.push(Nt[Oa+Da])}}}}return lr}_getOriginId(St){return St-this.points.length>>5}_getOriginZoom(St){return(St-this.points.length)%32}_map(St,Ot,Et){if(St[Ot+re]>1){const et=this.clusterProps[St[Ot+fe]];return Et?Object.assign({},et):et}const je=this.points[St[Ot+ee]].properties,Ye=this.options.map(je);return Et&&Ye===je?Object.assign({},Ye):Ye}}function Oe(mr,St,Ot){return{type:"Feature",id:mr[St+ee],properties:ke(mr,St,Ot),geometry:{type:"Point",coordinates:[(Et=mr[St],360*(Et-.5)),be(mr[St+1])]}};var Et}function ke(mr,St,Ot){const Et=mr[St+re],je=Et>=1e4?`${Math.round(Et/1e3)}k`:Et>=1e3?Math.round(Et/100)/10+"k":Et,Ye=mr[St+fe],et=Ye===-1?{}:Object.assign({},Ot[Ye]);return Object.assign(et,{cluster:!0,cluster_id:mr[St+ee],point_count:Et,point_count_abbreviated:je})}function Le(mr){return mr/360+.5}function oe(mr){const St=Math.sin(mr*Math.PI/180),Ot=.5-.25*Math.log((1+St)/(1-St))/Math.PI;return Ot<0?0:Ot>1?1:Ot}function be(mr){const St=(180-360*mr)*Math.PI/180;return 360*Math.atan(Math.exp(St))/Math.PI-90}function _e(mr,St,Ot,Et){let je=Et;const Ye=St+(Ot-St>>1);let et,mt=Ot-St;const Nt=mr[St],lr=mr[St+1],br=mr[Ot],Or=mr[Ot+1];for(let tn=St+3;tn<Ot;tn+=3){const Jr=he(mr[tn],mr[tn+1],Nt,lr,br,Or);if(Jr>je)et=tn,je=Jr;else if(Jr===je){const dn=Math.abs(tn-Ye);dn<mt&&(et=tn,mt=dn)}}je>Et&&(et-St>3&&_e(mr,St,et,Et),mr[et+2]=je,Ot-et>3&&_e(mr,et,Ot,Et))}function he(mr,St,Ot,Et,je,Ye){let et=je-Ot,mt=Ye-Et;if(et!==0||mt!==0){const Nt=((mr-Ot)*et+(St-Et)*mt)/(et*et+mt*mt);Nt>1?(Ot=je,Et=Ye):Nt>0&&(Ot+=et*Nt,Et+=mt*Nt)}return et=mr-Ot,mt=St-Et,et*et+mt*mt}function De(mr,St,Ot,Et){const je={id:mr??null,type:St,geometry:Ot,tags:Et,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(St==="Point"||St==="MultiPoint"||St==="LineString")xe(je,Ot);else if(St==="Polygon")xe(je,Ot[0]);else if(St==="MultiLineString")for(const Ye of Ot)xe(je,Ye);else if(St==="MultiPolygon")for(const Ye of Ot)xe(je,Ye[0]);return je}function xe(mr,St){for(let Ot=0;Ot<St.length;Ot+=3)mr.minX=Math.min(mr.minX,St[Ot]),mr.minY=Math.min(mr.minY,St[Ot+1]),mr.maxX=Math.max(mr.maxX,St[Ot]),mr.maxY=Math.max(mr.maxY,St[Ot+1])}function se(mr,St,Ot,Et){if(!St.geometry)return;const je=St.geometry.coordinates;if(je&&je.length===0)return;const Ye=St.geometry.type,et=Math.pow(Ot.tolerance/((1<<Ot.maxZoom)*Ot.extent),2);let mt=[],Nt=St.id;if(Ot.promoteId?Nt=St.properties[Ot.promoteId]:Ot.generateId&&(Nt=Et||0),Ye==="Point")Ee(je,mt);else if(Ye==="MultiPoint")for(const lr of je)Ee(lr,mt);else if(Ye==="LineString")Te(je,mt,et,!1);else if(Ye==="MultiLineString"){if(Ot.lineMetrics){for(const lr of je)mt=[],Te(lr,mt,et,!1),mr.push(De(Nt,"LineString",mt,St.properties));return}Be(je,mt,et,!1)}else if(Ye==="Polygon")Be(je,mt,et,!0);else{if(Ye!=="MultiPolygon"){if(Ye==="GeometryCollection"){for(const lr of St.geometry.geometries)se(mr,{id:Nt,geometry:lr,properties:St.properties},Ot,Et);return}throw new Error("Input data is not a valid GeoJSON object.")}for(const lr of je){const br=[];Be(lr,br,et,!0),mt.push(br)}}mr.push(De(Nt,Ye,mt,St.properties))}function Ee(mr,St){St.push(tt(mr[0]),at(mr[1]),0)}function Te(mr,St,Ot,Et){let je,Ye,et=0;for(let Nt=0;Nt<mr.length;Nt++){const lr=tt(mr[Nt][0]),br=at(mr[Nt][1]);St.push(lr,br,0),Nt>0&&(et+=Et?(je*br-lr*Ye)/2:Math.sqrt(Math.pow(lr-je,2)+Math.pow(br-Ye,2))),je=lr,Ye=br}const mt=St.length-3;St[2]=1,_e(St,0,mt,Ot),St[mt+2]=1,St.size=Math.abs(et),St.start=0,St.end=St.size}function Be(mr,St,Ot,Et){for(let je=0;je<mr.length;je++){const Ye=[];Te(mr[je],Ye,Ot,Et),St.push(Ye)}}function tt(mr){return mr/360+.5}function at(mr){const St=Math.sin(mr*Math.PI/180),Ot=.5-.25*Math.log((1+St)/(1-St))/Math.PI;return Ot<0?0:Ot>1?1:Ot}function gt(mr,St,Ot,Et,je,Ye,et,mt){if(Et/=St,Ye>=(Ot/=St)&&et<Et)return mr;if(et<Ot||Ye>=Et)return null;const Nt=[];for(const lr of mr){const br=lr.geometry;let Or=lr.type;const tn=je===0?lr.minX:lr.minY,Jr=je===0?lr.maxX:lr.maxY;if(tn>=Ot&&Jr<Et){Nt.push(lr);continue}if(Jr<Ot||tn>=Et)continue;let dn=[];if(Or==="Point"||Or==="MultiPoint")pt(br,dn,Ot,Et,je);else if(Or==="LineString")Rt(br,dn,Ot,Et,je,!1,mt.lineMetrics);else if(Or==="MultiLineString")Wt(br,dn,Ot,Et,je,!1);else if(Or==="Polygon")Wt(br,dn,Ot,Et,je,!0);else if(Or==="MultiPolygon")for(const on of br){const Nn=[];Wt(on,Nn,Ot,Et,je,!0),Nn.length&&dn.push(Nn)}if(dn.length){if(mt.lineMetrics&&Or==="LineString"){for(const on of dn)Nt.push(De(lr.id,Or,on,lr.tags));continue}Or!=="LineString"&&Or!=="MultiLineString"||(dn.length===1?(Or="LineString",dn=dn[0]):Or="MultiLineString"),Or!=="Point"&&Or!=="MultiPoint"||(Or=dn.length===3?"Point":"MultiPoint"),Nt.push(De(lr.id,Or,dn,lr.tags))}}return Nt.length?Nt:null}function pt(mr,St,Ot,Et,je){for(let Ye=0;Ye<mr.length;Ye+=3){const et=mr[Ye+je];et>=Ot&&et<=Et&&Ht(St,mr[Ye],mr[Ye+1],mr[Ye+2])}}function Rt(mr,St,Ot,Et,je,Ye,et){let mt=$t(mr);const Nt=je===0?Ft:st;let lr,br,Or=mr.start;for(let Nn=0;Nn<mr.length-3;Nn+=3){const Wi=mr[Nn],Oa=mr[Nn+1],Da=mr[Nn+2],Aa=mr[Nn+3],Ka=mr[Nn+4],Sa=je===0?Wi:Oa,no=je===0?Aa:Ka;let Fo=!1;et&&(lr=Math.sqrt(Math.pow(Wi-Aa,2)+Math.pow(Oa-Ka,2))),Sa<Ot?no>Ot&&(br=Nt(mt,Wi,Oa,Aa,Ka,Ot),et&&(mt.start=Or+lr*br)):Sa>Et?no<Et&&(br=Nt(mt,Wi,Oa,Aa,Ka,Et),et&&(mt.start=Or+lr*br)):Ht(mt,Wi,Oa,Da),no<Ot&&Sa>=Ot&&(br=Nt(mt,Wi,Oa,Aa,Ka,Ot),Fo=!0),no>Et&&Sa<=Et&&(br=Nt(mt,Wi,Oa,Aa,Ka,Et),Fo=!0),!Ye&&Fo&&(et&&(mt.end=Or+lr*br),St.push(mt),mt=$t(mr)),et&&(Or+=lr)}let tn=mr.length-3;const Jr=mr[tn],dn=mr[tn+1],on=je===0?Jr:dn;on>=Ot&&on<=Et&&Ht(mt,Jr,dn,mr[tn+2]),tn=mt.length-3,Ye&&tn>=3&&(mt[tn]!==mt[0]||mt[tn+1]!==mt[1])&&Ht(mt,mt[0],mt[1],mt[2]),mt.length&&St.push(mt)}function $t(mr){const St=[];return St.size=mr.size,St.start=mr.start,St.end=mr.end,St}function Wt(mr,St,Ot,Et,je,Ye){for(const et of mr)Rt(et,St,Ot,Et,je,Ye,!1)}function Ht(mr,St,Ot,Et){mr.push(St,Ot,Et)}function Ft(mr,St,Ot,Et,je,Ye){const et=(Ye-St)/(Et-St);return Ht(mr,Ye,Ot+(je-Ot)*et,1),et}function st(mr,St,Ot,Et,je,Ye){const et=(Ye-Ot)/(je-Ot);return Ht(mr,St+(Et-St)*et,Ye,1),et}function rt(mr,St){const Ot=[];for(let Et=0;Et<mr.length;Et++){const je=mr[Et],Ye=je.type;let et;if(Ye==="Point"||Ye==="MultiPoint"||Ye==="LineString")et=Ue(je.geometry,St);else if(Ye==="MultiLineString"||Ye==="Polygon"){et=[];for(const mt of je.geometry)et.push(Ue(mt,St))}else if(Ye==="MultiPolygon"){et=[];for(const mt of je.geometry){const Nt=[];for(const lr of mt)Nt.push(Ue(lr,St));et.push(Nt)}}Ot.push(De(je.id,Ye,et,je.tags))}return Ot}function Ue(mr,St){const Ot=[];Ot.size=mr.size,mr.start!==void 0&&(Ot.start=mr.start,Ot.end=mr.end);for(let Et=0;Et<mr.length;Et+=3)Ot.push(mr[Et]+St,mr[Et+1],mr[Et+2]);return Ot}function xt(mr,St){if(mr.transformed)return mr;const Ot=1<<mr.z,Et=mr.x,je=mr.y;for(const Ye of mr.features){const et=Ye.geometry,mt=Ye.type;if(Ye.geometry=[],mt===1)for(let Nt=0;Nt<et.length;Nt+=2)Ye.geometry.push(Gt(et[Nt],et[Nt+1],St,Ot,Et,je));else for(let Nt=0;Nt<et.length;Nt++){const lr=[];for(let br=0;br<et[Nt].length;br+=2)lr.push(Gt(et[Nt][br],et[Nt][br+1],St,Ot,Et,je));Ye.geometry.push(lr)}}return mr.transformed=!0,mr}function Gt(mr,St,Ot,Et,je,Ye){return[Math.round(Ot*(mr*Et-je)),Math.round(Ot*(St*Et-Ye))]}function Jt(mr,St,Ot,Et,je){const Ye=St===je.maxZoom?0:je.tolerance/((1<<St)*je.extent),et={features:[],numPoints:0,numSimplified:0,numFeatures:mr.length,source:null,x:Ot,y:Et,z:St,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0};for(const mt of mr)Ut(et,mt,Ye,je);return et}function Ut(mr,St,Ot,Et){const je=St.geometry,Ye=St.type,et=[];if(mr.minX=Math.min(mr.minX,St.minX),mr.minY=Math.min(mr.minY,St.minY),mr.maxX=Math.max(mr.maxX,St.maxX),mr.maxY=Math.max(mr.maxY,St.maxY),Ye==="Point"||Ye==="MultiPoint")for(let mt=0;mt<je.length;mt+=3)et.push(je[mt],je[mt+1]),mr.numPoints++,mr.numSimplified++;else if(Ye==="LineString")kr(et,je,mr,Ot,!1,!1);else if(Ye==="MultiLineString"||Ye==="Polygon")for(let mt=0;mt<je.length;mt++)kr(et,je[mt],mr,Ot,Ye==="Polygon",mt===0);else if(Ye==="MultiPolygon")for(let mt=0;mt<je.length;mt++){const Nt=je[mt];for(let lr=0;lr<Nt.length;lr++)kr(et,Nt[lr],mr,Ot,!0,lr===0)}if(et.length){let mt=St.tags||null;if(Ye==="LineString"&&Et.lineMetrics){mt={};for(const lr in St.tags)mt[lr]=St.tags[lr];mt.mapbox_clip_start=je.start/je.size,mt.mapbox_clip_end=je.end/je.size}const Nt={geometry:et,type:Ye==="Polygon"||Ye==="MultiPolygon"?3:Ye==="LineString"||Ye==="MultiLineString"?2:1,tags:mt};St.id!==null&&(Nt.id=St.id),mr.features.push(Nt)}}function kr(mr,St,Ot,Et,je,Ye){const et=Et*Et;if(Et>0&&St.size<(je?et:Et))return void(Ot.numPoints+=St.length/3);const mt=[];for(let Nt=0;Nt<St.length;Nt+=3)(Et===0||St[Nt+2]>et)&&(Ot.numSimplified++,mt.push(St[Nt],St[Nt+1])),Ot.numPoints++;je&&(function(Nt,lr){let br=0;for(let Or=0,tn=Nt.length,Jr=tn-2;Or<tn;Jr=Or,Or+=2)br+=(Nt[Or]-Nt[Jr])*(Nt[Or+1]+Nt[Jr+1]);if(br>0===lr)for(let Or=0,tn=Nt.length;Or<tn/2;Or+=2){const Jr=Nt[Or],dn=Nt[Or+1];Nt[Or]=Nt[tn-2-Or],Nt[Or+1]=Nt[tn-1-Or],Nt[tn-2-Or]=Jr,Nt[tn-1-Or]=dn}})(mt,Ye),mr.push(mt)}const Pr={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0};class $r{constructor(St,Ot){const Et=(Ot=this.options=(function(Ye,et){for(const mt in et)Ye[mt]=et[mt];return Ye})(Object.create(Pr),Ot)).debug;if(Et&&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 je=(function(Ye,et){const mt=[];if(Ye.type==="FeatureCollection")for(let Nt=0;Nt<Ye.features.length;Nt++)se(mt,Ye.features[Nt],et,Nt);else se(mt,Ye.type==="Feature"?Ye:{geometry:Ye},et);return mt})(St,Ot);this.tiles={},this.tileCoords=[],Et&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",Ot.indexMaxZoom,Ot.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),je=(function(Ye,et){const mt=et.buffer/et.extent;let Nt=Ye;const lr=gt(Ye,1,-1-mt,mt,0,-1,2,et),br=gt(Ye,1,1-mt,2+mt,0,-1,2,et);return(lr||br)&&(Nt=gt(Ye,1,-mt,1+mt,0,-1,2,et)||[],lr&&(Nt=rt(lr,1).concat(Nt)),br&&(Nt=Nt.concat(rt(br,-1)))),Nt})(je,Ot),je.length&&this.splitTile(je,0,0,0),Et&&(je.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(St,Ot,Et,je,Ye,et,mt){const Nt=[St,Ot,Et,je],lr=this.options,br=lr.debug;for(;Nt.length;){je=Nt.pop(),Et=Nt.pop(),Ot=Nt.pop(),St=Nt.pop();const Or=1<<Ot,tn=rn(Ot,Et,je);let Jr=this.tiles[tn];if(!Jr&&(br>1&&console.time("creation"),Jr=this.tiles[tn]=Jt(St,Ot,Et,je,lr),this.tileCoords.push({z:Ot,x:Et,y:je}),br)){br>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Ot,Et,je,Jr.numFeatures,Jr.numPoints,Jr.numSimplified),console.timeEnd("creation"));const Fo=`z${Ot}`;this.stats[Fo]=(this.stats[Fo]||0)+1,this.total++}if(Jr.source=St,Ye==null){if(Ot===lr.indexMaxZoom||Jr.numPoints<=lr.indexMaxPoints)continue}else{if(Ot===lr.maxZoom||Ot===Ye)continue;if(Ye!=null){const Fo=Ye-Ot;if(Et!==et>>Fo||je!==mt>>Fo)continue}}if(Jr.source=null,St.length===0)continue;br>1&&console.time("clipping");const dn=.5*lr.buffer/lr.extent,on=.5-dn,Nn=.5+dn,Wi=1+dn;let Oa=null,Da=null,Aa=null,Ka=null,Sa=gt(St,Or,Et-dn,Et+Nn,0,Jr.minX,Jr.maxX,lr),no=gt(St,Or,Et+on,Et+Wi,0,Jr.minX,Jr.maxX,lr);St=null,Sa&&(Oa=gt(Sa,Or,je-dn,je+Nn,1,Jr.minY,Jr.maxY,lr),Da=gt(Sa,Or,je+on,je+Wi,1,Jr.minY,Jr.maxY,lr),Sa=null),no&&(Aa=gt(no,Or,je-dn,je+Nn,1,Jr.minY,Jr.maxY,lr),Ka=gt(no,Or,je+on,je+Wi,1,Jr.minY,Jr.maxY,lr),no=null),br>1&&console.timeEnd("clipping"),Nt.push(Oa||[],Ot+1,2*Et,2*je),Nt.push(Da||[],Ot+1,2*Et,2*je+1),Nt.push(Aa||[],Ot+1,2*Et+1,2*je),Nt.push(Ka||[],Ot+1,2*Et+1,2*je+1)}}getTile(St,Ot,Et){St=+St,Ot=+Ot,Et=+Et;const je=this.options,{extent:Ye,debug:et}=je;if(St<0||St>24)return null;const mt=1<<St,Nt=rn(St,Ot=Ot+mt&mt-1,Et);if(this.tiles[Nt])return xt(this.tiles[Nt],Ye);et>1&&console.log("drilling down to z%d-%d-%d",St,Ot,Et);let lr,br=St,Or=Ot,tn=Et;for(;!lr&&br>0;)br--,Or>>=1,tn>>=1,lr=this.tiles[rn(br,Or,tn)];return lr&&lr.source?(et>1&&(console.log("found parent tile z%d-%d-%d",br,Or,tn),console.time("drilling down")),this.splitTile(lr.source,br,Or,tn,St,Ot,Et),et>1&&console.timeEnd("drilling down"),this.tiles[Nt]?xt(this.tiles[Nt],Ye):null):null}}function rn(mr,St,Ot){return 32*((1<<mr)*Ot+St)+mr}function kn(mr,St){return St?mr.properties[St]:mr.id}function Rn(mr,St){if(mr==null)return!0;if(mr.type==="Feature")return kn(mr,St)!=null;if(mr.type==="FeatureCollection"){const Ot=new Set;for(const Et of mr.features){const je=kn(Et,St);if(je==null||Ot.has(je))return!1;Ot.add(je)}return!0}return!1}function ci(mr,St){const Ot=new Map;if(mr!=null)if(mr.type==="Feature")Ot.set(kn(mr,St),mr);else for(const Et of mr.features)Ot.set(kn(Et,St),Et);return Ot}class In extends v{constructor(){super(...arguments),this._dataUpdateable=new Map}loadVectorTile(St,Ot){return l._(this,void 0,void 0,function*(){const Et=St.tileID.canonical;if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");const je=this._geoJSONIndex.getTile(Et.z,Et.x,Et.y);if(!je)return null;const Ye=new class{constructor(mt){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=l.X,this.length=mt.length,this._features=mt}feature(mt){return new class{constructor(Nt){this._feature=Nt,this.extent=l.X,this.type=Nt.type,this.properties=Nt.tags,"id"in Nt&&!isNaN(Nt.id)&&(this.id=parseInt(Nt.id,10))}loadGeometry(){if(this._feature.type===1){const Nt=[];for(const lr of this._feature.geometry)Nt.push([new l.P(lr[0],lr[1])]);return Nt}{const Nt=[];for(const lr of this._feature.geometry){const br=[];for(const Or of lr)br.push(new l.P(Or[0],Or[1]));Nt.push(br)}return Nt}}toGeoJSON(Nt,lr,br){return A.call(this,Nt,lr,br)}}(this._features[mt])}}(je.features);let et=K(Ye);return et.byteOffset===0&&et.byteLength===et.buffer.byteLength||(et=new Uint8Array(et)),{vectorTile:Ye,rawData:et.buffer}})}loadData(St){return l._(this,void 0,void 0,function*(){var Ot;(Ot=this._pendingRequest)===null||Ot===void 0||Ot.abort();const Et=!!(St&&St.request&&St.request.collectResourceTiming)&&new l.bv(St.request);this._pendingRequest=new AbortController;try{this._pendingData=this.loadAndProcessGeoJSON(St,this._pendingRequest),this._geoJSONIndex=St.cluster?new we((function({superclusterOptions:et,clusterProperties:mt}){if(!mt||!et)return et;const Nt={},lr={},br={accumulated:null,zoom:0},Or={properties:null},tn=Object.keys(mt);for(const Jr of tn){const[dn,on]=mt[Jr],Nn=l.bC(on),Wi=l.bC(typeof dn=="string"?[dn,["accumulated"],["get",Jr]]:dn);Nt[Jr]=Nn.value,lr[Jr]=Wi.value}return et.map=Jr=>{Or.properties=Jr;const dn={};for(const on of tn)dn[on]=Nt[on].evaluate(br,Or);return dn},et.reduce=(Jr,dn)=>{Or.properties=dn;for(const on of tn)br.accumulated=Jr[on],Jr[on]=lr[on].evaluate(br,Or)},et})(St)).load((yield this._pendingData).features):(je=yield this._pendingData,new $r(je,St.geojsonVtOptions)),this.loaded={};const Ye={};if(Et){const et=Et.finish();et&&(Ye.resourceTiming={},Ye.resourceTiming[St.source]=JSON.parse(JSON.stringify(et)))}return Ye}catch(Ye){if(delete this._pendingRequest,l.bB(Ye))return{abandoned:!0};throw Ye}var je})}getData(){return l._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(St){const Ot=this.loaded;return Ot&&Ot[St.uid]?super.reloadTile(St):this.loadTile(St)}loadAndProcessGeoJSON(St,Ot){return l._(this,void 0,void 0,function*(){let Et=yield this.loadGeoJSON(St,Ot);if(delete this._pendingRequest,typeof Et!="object")throw new Error(`Input data given to '${St.source}' is not a valid GeoJSON object.`);if(x(Et,!0),St.filter){const je=l.bC(St.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(je.result==="error")throw new Error(je.value.map(et=>`${et.key}: ${et.message}`).join(", "));Et={type:"FeatureCollection",features:Et.features.filter(et=>je.value.evaluate({zoom:0},et))}}return Et})}loadGeoJSON(St,Ot){return l._(this,void 0,void 0,function*(){const{promoteId:Et}=St;if(St.request){const je=yield l.h(St.request,Ot);return this._dataUpdateable=Rn(je.data,Et)?ci(je.data,Et):void 0,je.data}if(typeof St.data=="string")try{const je=JSON.parse(St.data);return this._dataUpdateable=Rn(je,Et)?ci(je,Et):void 0,je}catch{throw new Error(`Input data given to '${St.source}' is not a valid GeoJSON object.`)}if(!St.dataDiff)throw new Error(`Input data given to '${St.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${St.source}`);return(function(je,Ye,et){var mt,Nt,lr,br;if(Ye.removeAll&&je.clear(),Ye.remove)for(const Or of Ye.remove)je.delete(Or);if(Ye.add)for(const Or of Ye.add){const tn=kn(Or,et);tn!=null&&je.set(tn,Or)}if(Ye.update)for(const Or of Ye.update){let tn=je.get(Or.id);if(tn==null)continue;const Jr=!Or.removeAllProperties&&(((mt=Or.removeProperties)===null||mt===void 0?void 0:mt.length)>0||((Nt=Or.addOrUpdateProperties)===null||Nt===void 0?void 0:Nt.length)>0);if((Or.newGeometry||Or.removeAllProperties||Jr)&&(tn=Object.assign({},tn),je.set(Or.id,tn),Jr&&(tn.properties=Object.assign({},tn.properties))),Or.newGeometry&&(tn.geometry=Or.newGeometry),Or.removeAllProperties)tn.properties={};else if(((lr=Or.removeProperties)===null||lr===void 0?void 0:lr.length)>0)for(const dn of Or.removeProperties)Object.prototype.hasOwnProperty.call(tn.properties,dn)&&delete tn.properties[dn];if(((br=Or.addOrUpdateProperties)===null||br===void 0?void 0:br.length)>0)for(const{key:dn,value:on}of Or.addOrUpdateProperties)tn.properties[dn]=on}})(this._dataUpdateable,St.dataDiff,Et),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(St){return l._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(St){return this._geoJSONIndex.getClusterExpansionZoom(St.clusterId)}getClusterChildren(St){return this._geoJSONIndex.getChildren(St.clusterId)}getClusterLeaves(St){return this._geoJSONIndex.getLeaves(St.clusterId,St.limit,St.offset)}}class Gn{constructor(St){this.self=St,this.actor=new l.F(St),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(Ot,Et)=>{if(this.externalWorkerSourceTypes[Ot])throw new Error(`Worker source with name "${Ot}" already registered.`);this.externalWorkerSourceTypes[Ot]=Et},this.self.addProtocol=l.bi,this.self.removeProtocol=l.bj,this.self.registerRTLTextPlugin=Ot=>{if(l.bD.isParsed())throw new Error("RTL text plugin already registered.");l.bD.setMethods(Ot)},this.actor.registerMessageHandler("LDT",(Ot,Et)=>this._getDEMWorkerSource(Ot,Et.source).loadTile(Et)),this.actor.registerMessageHandler("RDT",(Ot,Et)=>l._(this,void 0,void 0,function*(){this._getDEMWorkerSource(Ot,Et.source).removeTile(Et)})),this.actor.registerMessageHandler("GCEZ",(Ot,Et)=>l._(this,void 0,void 0,function*(){return this._getWorkerSource(Ot,Et.type,Et.source).getClusterExpansionZoom(Et)})),this.actor.registerMessageHandler("GCC",(Ot,Et)=>l._(this,void 0,void 0,function*(){return this._getWorkerSource(Ot,Et.type,Et.source).getClusterChildren(Et)})),this.actor.registerMessageHandler("GCL",(Ot,Et)=>l._(this,void 0,void 0,function*(){return this._getWorkerSource(Ot,Et.type,Et.source).getClusterLeaves(Et)})),this.actor.registerMessageHandler("LD",(Ot,Et)=>this._getWorkerSource(Ot,Et.type,Et.source).loadData(Et)),this.actor.registerMessageHandler("GD",(Ot,Et)=>this._getWorkerSource(Ot,Et.type,Et.source).getData()),this.actor.registerMessageHandler("LT",(Ot,Et)=>this._getWorkerSource(Ot,Et.type,Et.source).loadTile(Et)),this.actor.registerMessageHandler("RT",(Ot,Et)=>this._getWorkerSource(Ot,Et.type,Et.source).reloadTile(Et)),this.actor.registerMessageHandler("AT",(Ot,Et)=>this._getWorkerSource(Ot,Et.type,Et.source).abortTile(Et)),this.actor.registerMessageHandler("RMT",(Ot,Et)=>this._getWorkerSource(Ot,Et.type,Et.source).removeTile(Et)),this.actor.registerMessageHandler("RS",(Ot,Et)=>l._(this,void 0,void 0,function*(){if(!this.workerSources[Ot]||!this.workerSources[Ot][Et.type]||!this.workerSources[Ot][Et.type][Et.source])return;const je=this.workerSources[Ot][Et.type][Et.source];delete this.workerSources[Ot][Et.type][Et.source],je.removeSource!==void 0&&je.removeSource(Et)})),this.actor.registerMessageHandler("RM",Ot=>l._(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,Et)=>l._(this,void 0,void 0,function*(){this.referrer=Et})),this.actor.registerMessageHandler("SRPS",(Ot,Et)=>this._syncRTLPluginState(Ot,Et)),this.actor.registerMessageHandler("IS",(Ot,Et)=>l._(this,void 0,void 0,function*(){this.self.importScripts(Et)})),this.actor.registerMessageHandler("SI",(Ot,Et)=>this._setImages(Ot,Et)),this.actor.registerMessageHandler("UL",(Ot,Et)=>l._(this,void 0,void 0,function*(){this._getLayerIndex(Ot).update(Et.layers,Et.removedIds)})),this.actor.registerMessageHandler("SL",(Ot,Et)=>l._(this,void 0,void 0,function*(){this._getLayerIndex(Ot).replace(Et)}))}_setImages(St,Ot){return l._(this,void 0,void 0,function*(){this.availableImages[St]=Ot;for(const Et in this.workerSources[St]){const je=this.workerSources[St][Et];for(const Ye in je)je[Ye].availableImages=Ot}})}_syncRTLPluginState(St,Ot){return l._(this,void 0,void 0,function*(){if(l.bD.isParsed())return l.bD.getState();if(Ot.pluginStatus!=="loading")return l.bD.setState(Ot),Ot;const Et=Ot.pluginURL;if(this.self.importScripts(Et),l.bD.isParsed()){const je={pluginStatus:"loaded",pluginURL:Et};return l.bD.setState(je),je}throw l.bD.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${Et}`)})}_getAvailableImages(St){let Ot=this.availableImages[St];return Ot||(Ot=[]),Ot}_getLayerIndex(St){let Ot=this.layerIndexes[St];return Ot||(Ot=this.layerIndexes[St]=new u),Ot}_getWorkerSource(St,Ot,Et){if(this.workerSources[St]||(this.workerSources[St]={}),this.workerSources[St][Ot]||(this.workerSources[St][Ot]={}),!this.workerSources[St][Ot][Et]){const je={sendAsync:(Ye,et)=>(Ye.targetMapId=St,this.actor.sendAsync(Ye,et))};switch(Ot){case"vector":this.workerSources[St][Ot][Et]=new v(je,this._getLayerIndex(St),this._getAvailableImages(St));break;case"geojson":this.workerSources[St][Ot][Et]=new In(je,this._getLayerIndex(St),this._getAvailableImages(St));break;default:this.workerSources[St][Ot][Et]=new this.externalWorkerSourceTypes[Ot](je,this._getLayerIndex(St),this._getAvailableImages(St))}}return this.workerSources[St][Ot][Et]}_getDEMWorkerSource(St,Ot){return this.demWorkerSources[St]||(this.demWorkerSources[St]={}),this.demWorkerSources[St][Ot]||(this.demWorkerSources[St][Ot]=new h),this.demWorkerSources[St][Ot]}}return l.i(self)&&(self.worker=new Gn(self)),Gn}),O("index",["exports","./shared"],function(l,u){var c="4.7.1";let p,f;const v={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:wt=>new Promise((q,Ae)=>{const it=requestAnimationFrame(q);wt.signal.addEventListener("abort",()=>{cancelAnimationFrame(it),Ae(u.c())})}),getImageData(wt,q=0){return this.getImageCanvasContext(wt).getImageData(-q,-q,wt.width+2*q,wt.height+2*q)},getImageCanvasContext(wt){const q=window.document.createElement("canvas"),Ae=q.getContext("2d",{willReadFrequently:!0});if(!Ae)throw new Error("failed to create canvas 2d context");return q.width=wt.width,q.height=wt.height,Ae.drawImage(wt,0,0,wt.width,wt.height),Ae},resolveURL:wt=>(p||(p=document.createElement("a")),p.href=wt,p.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(f==null&&(f=matchMedia("(prefers-reduced-motion: reduce)")),f.matches)}};class h{static testProp(q){if(!h.docStyle)return q[0];for(let Ae=0;Ae<q.length;Ae++)if(q[Ae]in h.docStyle)return q[Ae];return q[0]}static create(q,Ae,it){const ot=window.document.createElement(q);return Ae!==void 0&&(ot.className=Ae),it&&it.appendChild(ot),ot}static createNS(q,Ae){return window.document.createElementNS(q,Ae)}static disableDrag(){h.docStyle&&h.selectProp&&(h.userSelect=h.docStyle[h.selectProp],h.docStyle[h.selectProp]="none")}static enableDrag(){h.docStyle&&h.selectProp&&(h.docStyle[h.selectProp]=h.userSelect)}static setTransform(q,Ae){q.style[h.transformProp]=Ae}static addEventListener(q,Ae,it,ot={}){q.addEventListener(Ae,it,"passive"in ot?ot:ot.capture)}static removeEventListener(q,Ae,it,ot={}){q.removeEventListener(Ae,it,"passive"in ot?ot:ot.capture)}static suppressClickInternal(q){q.preventDefault(),q.stopPropagation(),window.removeEventListener("click",h.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",h.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",h.suppressClickInternal,!0)},0)}static getScale(q){const Ae=q.getBoundingClientRect();return{x:Ae.width/q.offsetWidth||1,y:Ae.height/q.offsetHeight||1,boundingClientRect:Ae}}static getPoint(q,Ae,it){const ot=Ae.boundingClientRect;return new u.P((it.clientX-ot.left)/Ae.x-q.clientLeft,(it.clientY-ot.top)/Ae.y-q.clientTop)}static mousePos(q,Ae){const it=h.getScale(q);return h.getPoint(q,it,Ae)}static touchPos(q,Ae){const it=[],ot=h.getScale(q);for(let bt=0;bt<Ae.length;bt++)it.push(h.getPoint(q,ot,Ae[bt]));return it}static mouseButton(q){return q.button}static remove(q){q.parentNode&&q.parentNode.removeChild(q)}}h.docStyle=typeof window<"u"&&window.document&&window.document.documentElement.style,h.selectProp=h.testProp(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]),h.transformProp=h.testProp(["transform","WebkitTransform"]);const m={supported:!1,testSupport:function(wt){!A&&x&&(E?D(wt):_=wt)}};let _,x,A=!1,E=!1;function D(wt){const q=wt.createTexture();wt.bindTexture(wt.TEXTURE_2D,q);try{if(wt.texImage2D(wt.TEXTURE_2D,0,wt.RGBA,wt.RGBA,wt.UNSIGNED_BYTE,x),wt.isContextLost())return;m.supported=!0}catch{}wt.deleteTexture(q),A=!0}var g;typeof document<"u"&&(x=document.createElement("img"),x.onload=()=>{_&&D(_),_=null,E=!0},x.onerror=()=>{A=!0,_=null},x.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),(function(wt){let q,Ae,it,ot;wt.resetRequestQueue=()=>{q=[],Ae=0,it=0,ot={}},wt.addThrottleControl=Ur=>{const ln=it++;return ot[ln]=Ur,ln},wt.removeThrottleControl=Ur=>{delete ot[Ur],ar()},wt.getImage=(Ur,ln,Cn=!0)=>new Promise((Pn,vi)=>{m.supported&&(Ur.headers||(Ur.headers={}),Ur.headers.accept="image/webp,*/*"),u.e(Ur,{type:"image"}),q.push({abortController:ln,requestParameters:Ur,supportImageRefresh:Cn,state:"queued",onError:Ui=>{vi(Ui)},onSuccess:Ui=>{Pn(Ui)}}),ar()});const bt=Ur=>u._(this,void 0,void 0,function*(){Ur.state="running";const{requestParameters:ln,supportImageRefresh:Cn,onError:Pn,onSuccess:vi,abortController:Ui}=Ur,kt=Cn===!1&&!u.i(self)&&!u.g(ln.url)&&(!ln.headers||Object.keys(ln.headers).reduce((cr,Sr)=>cr&&Sr==="accept",!0));Ae++;const zt=kt?yr(ln,Ui):u.m(ln,Ui);try{const cr=yield zt;delete Ur.abortController,Ur.state="completed",cr.data instanceof HTMLImageElement||u.b(cr.data)?vi(cr):cr.data&&vi({data:yield(Qt=cr.data,typeof createImageBitmap=="function"?u.d(Qt):u.f(Qt)),cacheControl:cr.cacheControl,expires:cr.expires})}catch(cr){delete Ur.abortController,Pn(cr)}finally{Ae--,ar()}var Qt}),ar=()=>{const Ur=(()=>{for(const ln of Object.keys(ot))if(ot[ln]())return!0;return!1})()?u.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:u.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let ln=Ae;ln<Ur&&q.length>0;ln++){const Cn=q.shift();Cn.abortController.signal.aborted?ln--:bt(Cn)}},yr=(Ur,ln)=>new Promise((Cn,Pn)=>{const vi=new Image,Ui=Ur.url,kt=Ur.credentials;kt&&kt==="include"?vi.crossOrigin="use-credentials":(kt&&kt==="same-origin"||!u.s(Ui))&&(vi.crossOrigin="anonymous"),ln.signal.addEventListener("abort",()=>{vi.src="",Pn(u.c())}),vi.fetchPriority="high",vi.onload=()=>{vi.onerror=vi.onload=null,Cn({data:vi})},vi.onerror=()=>{vi.onerror=vi.onload=null,ln.signal.aborted||Pn(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."))},vi.src=Ui})})(g||(g={})),g.resetRequestQueue();class C{constructor(q){this._transformRequestFn=q}transformRequest(q,Ae){return this._transformRequestFn&&this._transformRequestFn(q,Ae)||{url:q}}setTransformRequest(q){this._transformRequestFn=q}}function I(wt){var q=new u.A(3);return q[0]=wt[0],q[1]=wt[1],q[2]=wt[2],q}var N,F=function(wt,q,Ae){return wt[0]=q[0]-Ae[0],wt[1]=q[1]-Ae[1],wt[2]=q[2]-Ae[2],wt};N=new u.A(3),u.A!=Float32Array&&(N[0]=0,N[1]=0,N[2]=0);var k=function(wt){var q=wt[0],Ae=wt[1];return q*q+Ae*Ae};function P(wt){const q=[];if(typeof wt=="string")q.push({id:"default",url:wt});else if(wt&&wt.length>0){const Ae=[];for(const{id:it,url:ot}of wt){const bt=`${it}${ot}`;Ae.indexOf(bt)===-1&&(Ae.push(bt),q.push({id:it,url:ot}))}}return q}function T(wt,q,Ae){const it=wt.split("?");return it[0]+=`${q}${Ae}`,it.join("?")}(function(){var wt=new u.A(2);u.A!=Float32Array&&(wt[0]=0,wt[1]=0)})();class y{constructor(q,Ae,it,ot){this.context=q,this.format=it,this.texture=q.gl.createTexture(),this.update(Ae,ot)}update(q,Ae,it){const{width:ot,height:bt}=q,ar=!(this.size&&this.size[0]===ot&&this.size[1]===bt||it),{context:yr}=this,{gl:Ur}=yr;if(this.useMipmap=!!(Ae&&Ae.useMipmap),Ur.bindTexture(Ur.TEXTURE_2D,this.texture),yr.pixelStoreUnpackFlipY.set(!1),yr.pixelStoreUnpack.set(1),yr.pixelStoreUnpackPremultiplyAlpha.set(this.format===Ur.RGBA&&(!Ae||Ae.premultiply!==!1)),ar)this.size=[ot,bt],q instanceof HTMLImageElement||q instanceof HTMLCanvasElement||q instanceof HTMLVideoElement||q instanceof ImageData||u.b(q)?Ur.texImage2D(Ur.TEXTURE_2D,0,this.format,this.format,Ur.UNSIGNED_BYTE,q):Ur.texImage2D(Ur.TEXTURE_2D,0,this.format,ot,bt,0,this.format,Ur.UNSIGNED_BYTE,q.data);else{const{x:ln,y:Cn}=it||{x:0,y:0};q instanceof HTMLImageElement||q instanceof HTMLCanvasElement||q instanceof HTMLVideoElement||q instanceof ImageData||u.b(q)?Ur.texSubImage2D(Ur.TEXTURE_2D,0,ln,Cn,Ur.RGBA,Ur.UNSIGNED_BYTE,q):Ur.texSubImage2D(Ur.TEXTURE_2D,0,ln,Cn,ot,bt,Ur.RGBA,Ur.UNSIGNED_BYTE,q.data)}this.useMipmap&&this.isSizePowerOfTwo()&&Ur.generateMipmap(Ur.TEXTURE_2D)}bind(q,Ae,it){const{context:ot}=this,{gl:bt}=ot;bt.bindTexture(bt.TEXTURE_2D,this.texture),it!==bt.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(it=bt.LINEAR),q!==this.filter&&(bt.texParameteri(bt.TEXTURE_2D,bt.TEXTURE_MAG_FILTER,q),bt.texParameteri(bt.TEXTURE_2D,bt.TEXTURE_MIN_FILTER,it||q),this.filter=q),Ae!==this.wrap&&(bt.texParameteri(bt.TEXTURE_2D,bt.TEXTURE_WRAP_S,Ae),bt.texParameteri(bt.TEXTURE_2D,bt.TEXTURE_WRAP_T,Ae),this.wrap=Ae)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:q}=this.context;q.deleteTexture(this.texture),this.texture=null}}function S(wt){const{userImage:q}=wt;return!!(q&&q.render&&q.render())&&(wt.data.replace(new Uint8Array(q.data.buffer)),!0)}class M extends u.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new u.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(q){if(this.loaded!==q&&(this.loaded=q,q)){for(const{ids:Ae,promiseResolve:it}of this.requestors)it(this._getImagesForIds(Ae));this.requestors=[]}}getImage(q){const Ae=this.images[q];if(Ae&&!Ae.data&&Ae.spriteData){const it=Ae.spriteData;Ae.data=new u.R({width:it.width,height:it.height},it.context.getImageData(it.x,it.y,it.width,it.height).data),Ae.spriteData=null}return Ae}addImage(q,Ae){if(this.images[q])throw new Error(`Image id ${q} already exist, use updateImage instead`);this._validate(q,Ae)&&(this.images[q]=Ae)}_validate(q,Ae){let it=!0;const ot=Ae.data||Ae.spriteData;return this._validateStretch(Ae.stretchX,ot&&ot.width)||(this.fire(new u.j(new Error(`Image "${q}" has invalid "stretchX" value`))),it=!1),this._validateStretch(Ae.stretchY,ot&&ot.height)||(this.fire(new u.j(new Error(`Image "${q}" has invalid "stretchY" value`))),it=!1),this._validateContent(Ae.content,Ae)||(this.fire(new u.j(new Error(`Image "${q}" has invalid "content" value`))),it=!1),it}_validateStretch(q,Ae){if(!q)return!0;let it=0;for(const ot of q){if(ot[0]<it||ot[1]<ot[0]||Ae<ot[1])return!1;it=ot[1]}return!0}_validateContent(q,Ae){if(!q)return!0;if(q.length!==4)return!1;const it=Ae.spriteData,ot=it&&it.width||Ae.data.width,bt=it&&it.height||Ae.data.height;return!(q[0]<0||ot<q[0]||q[1]<0||bt<q[1]||q[2]<0||ot<q[2]||q[3]<0||bt<q[3]||q[2]<q[0]||q[3]<q[1])}updateImage(q,Ae,it=!0){const ot=this.getImage(q);if(it&&(ot.data.width!==Ae.data.width||ot.data.height!==Ae.data.height))throw new Error(`size mismatch between old image (${ot.data.width}x${ot.data.height}) and new image (${Ae.data.width}x${Ae.data.height}).`);Ae.version=ot.version+1,this.images[q]=Ae,this.updatedImages[q]=!0}removeImage(q){const Ae=this.images[q];delete this.images[q],delete this.patterns[q],Ae.userImage&&Ae.userImage.onRemove&&Ae.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(q){return new Promise((Ae,it)=>{let ot=!0;if(!this.isLoaded())for(const bt of q)this.images[bt]||(ot=!1);this.isLoaded()||ot?Ae(this._getImagesForIds(q)):this.requestors.push({ids:q,promiseResolve:Ae})})}_getImagesForIds(q){const Ae={};for(const it of q){let ot=this.getImage(it);ot||(this.fire(new u.k("styleimagemissing",{id:it})),ot=this.getImage(it)),ot?Ae[it]={data:ot.data.clone(),pixelRatio:ot.pixelRatio,sdf:ot.sdf,version:ot.version,stretchX:ot.stretchX,stretchY:ot.stretchY,content:ot.content,textFitWidth:ot.textFitWidth,textFitHeight:ot.textFitHeight,hasRenderCallback:!!(ot.userImage&&ot.userImage.render)}:u.w(`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.`)}return Ae}getPixelSize(){const{width:q,height:Ae}=this.atlasImage;return{width:q,height:Ae}}getPattern(q){const Ae=this.patterns[q],it=this.getImage(q);if(!it)return null;if(Ae&&Ae.position.version===it.version)return Ae.position;if(Ae)Ae.position.version=it.version;else{const ot={w:it.data.width+2,h:it.data.height+2,x:0,y:0},bt=new u.I(ot,it);this.patterns[q]={bin:ot,position:bt}}return this._updatePatternAtlas(),this.patterns[q].position}bind(q){const Ae=q.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new y(q,this.atlasImage,Ae.RGBA),this.atlasTexture.bind(Ae.LINEAR,Ae.CLAMP_TO_EDGE)}_updatePatternAtlas(){const q=[];for(const bt in this.patterns)q.push(this.patterns[bt].bin);const{w:Ae,h:it}=u.p(q),ot=this.atlasImage;ot.resize({width:Ae||1,height:it||1});for(const bt in this.patterns){const{bin:ar}=this.patterns[bt],yr=ar.x+1,Ur=ar.y+1,ln=this.getImage(bt).data,Cn=ln.width,Pn=ln.height;u.R.copy(ln,ot,{x:0,y:0},{x:yr,y:Ur},{width:Cn,height:Pn}),u.R.copy(ln,ot,{x:0,y:Pn-1},{x:yr,y:Ur-1},{width:Cn,height:1}),u.R.copy(ln,ot,{x:0,y:0},{x:yr,y:Ur+Pn},{width:Cn,height:1}),u.R.copy(ln,ot,{x:Cn-1,y:0},{x:yr-1,y:Ur},{width:1,height:Pn}),u.R.copy(ln,ot,{x:0,y:0},{x:yr+Cn,y:Ur},{width:1,height:Pn})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(q){for(const Ae of q){if(this.callbackDispatchedThisFrame[Ae])continue;this.callbackDispatchedThisFrame[Ae]=!0;const it=this.getImage(Ae);it||u.w(`Image with ID: "${Ae}" was not found`),S(it)&&this.updateImage(Ae,it)}}}const W=1e20;function $(wt,q,Ae,it,ot,bt,ar,yr,Ur){for(let ln=q;ln<q+it;ln++)Z(wt,Ae*bt+ln,bt,ot,ar,yr,Ur);for(let ln=Ae;ln<Ae+ot;ln++)Z(wt,ln*bt+q,1,it,ar,yr,Ur)}function Z(wt,q,Ae,it,ot,bt,ar){bt[0]=0,ar[0]=-W,ar[1]=W,ot[0]=wt[q];for(let yr=1,Ur=0,ln=0;yr<it;yr++){ot[yr]=wt[q+yr*Ae];const Cn=yr*yr;do{const Pn=bt[Ur];ln=(ot[yr]-ot[Pn]+Cn-Pn*Pn)/(yr-Pn)/2}while(ln<=ar[Ur]&&--Ur>-1);Ur++,bt[Ur]=yr,ar[Ur]=ln,ar[Ur+1]=W}for(let yr=0,Ur=0;yr<it;yr++){for(;ar[Ur+1]<yr;)Ur++;const ln=bt[Ur],Cn=yr-ln;wt[q+yr*Ae]=ot[ln]+Cn*Cn}}class K{constructor(q,Ae){this.requestManager=q,this.localIdeographFontFamily=Ae,this.entries={}}setURL(q){this.url=q}getGlyphs(q){return u._(this,void 0,void 0,function*(){const Ae=[];for(const bt in q)for(const ar of q[bt])Ae.push(this._getAndCacheGlyphsPromise(bt,ar));const it=yield Promise.all(Ae),ot={};for(const{stack:bt,id:ar,glyph:yr}of it)ot[bt]||(ot[bt]={}),ot[bt][ar]=yr&&{id:yr.id,bitmap:yr.bitmap.clone(),metrics:yr.metrics};return ot})}_getAndCacheGlyphsPromise(q,Ae){return u._(this,void 0,void 0,function*(){let it=this.entries[q];it||(it=this.entries[q]={glyphs:{},requests:{},ranges:{}});let ot=it.glyphs[Ae];if(ot!==void 0)return{stack:q,id:Ae,glyph:ot};if(ot=this._tinySDF(it,q,Ae),ot)return it.glyphs[Ae]=ot,{stack:q,id:Ae,glyph:ot};const bt=Math.floor(Ae/256);if(256*bt>65535)throw new Error("glyphs > 65535 not supported");if(it.ranges[bt])return{stack:q,id:Ae,glyph:ot};if(!this.url)throw new Error("glyphsUrl is not set");if(!it.requests[bt]){const yr=K.loadGlyphRange(q,bt,this.url,this.requestManager);it.requests[bt]=yr}const ar=yield it.requests[bt];for(const yr in ar)this._doesCharSupportLocalGlyph(+yr)||(it.glyphs[+yr]=ar[+yr]);return it.ranges[bt]=!0,{stack:q,id:Ae,glyph:ar[Ae]||null}})}_doesCharSupportLocalGlyph(q){return!!this.localIdeographFontFamily&&new RegExp("\\p{Ideo}|\\p{sc=Hang}|\\p{sc=Hira}|\\p{sc=Kana}","u").test(String.fromCodePoint(q))}_tinySDF(q,Ae,it){const ot=this.localIdeographFontFamily;if(!ot||!this._doesCharSupportLocalGlyph(it))return;let bt=q.tinySDF;if(!bt){let yr="400";/bold/i.test(Ae)?yr="900":/medium/i.test(Ae)?yr="500":/light/i.test(Ae)&&(yr="200"),bt=q.tinySDF=new K.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:ot,fontWeight:yr})}const ar=bt.draw(String.fromCharCode(it));return{id:it,bitmap:new u.o({width:ar.width||60,height:ar.height||60},ar.data),metrics:{width:ar.glyphWidth/2||24,height:ar.glyphHeight/2||24,left:ar.glyphLeft/2+.5||0,top:ar.glyphTop/2-27.5||-8,advance:ar.glyphAdvance/2||24,isDoubleResolution:!0}}}}K.loadGlyphRange=function(wt,q,Ae,it){return u._(this,void 0,void 0,function*(){const ot=256*q,bt=ot+255,ar=it.transformRequest(Ae.replace("{fontstack}",wt).replace("{range}",`${ot}-${bt}`),"Glyphs"),yr=yield u.l(ar,new AbortController);if(!yr||!yr.data)throw new Error(`Could not load glyph range. range: ${q}, ${ot}-${bt}`);const Ur={};for(const ln of u.n(yr.data))Ur[ln.id]=ln;return Ur})},K.TinySDF=class{constructor({fontSize:wt=24,buffer:q=3,radius:Ae=8,cutoff:it=.25,fontFamily:ot="sans-serif",fontWeight:bt="normal",fontStyle:ar="normal"}={}){this.buffer=q,this.cutoff=it,this.radius=Ae;const yr=this.size=wt+4*q,Ur=this._createCanvas(yr),ln=this.ctx=Ur.getContext("2d",{willReadFrequently:!0});ln.font=`${ar} ${bt} ${wt}px ${ot}`,ln.textBaseline="alphabetic",ln.textAlign="left",ln.fillStyle="black",this.gridOuter=new Float64Array(yr*yr),this.gridInner=new Float64Array(yr*yr),this.f=new Float64Array(yr),this.z=new Float64Array(yr+1),this.v=new Uint16Array(yr)}_createCanvas(wt){const q=document.createElement("canvas");return q.width=q.height=wt,q}draw(wt){const{width:q,actualBoundingBoxAscent:Ae,actualBoundingBoxDescent:it,actualBoundingBoxLeft:ot,actualBoundingBoxRight:bt}=this.ctx.measureText(wt),ar=Math.ceil(Ae),yr=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(bt-ot))),Ur=Math.min(this.size-this.buffer,ar+Math.ceil(it)),ln=yr+2*this.buffer,Cn=Ur+2*this.buffer,Pn=Math.max(ln*Cn,0),vi=new Uint8ClampedArray(Pn),Ui={data:vi,width:ln,height:Cn,glyphWidth:yr,glyphHeight:Ur,glyphTop:ar,glyphLeft:0,glyphAdvance:q};if(yr===0||Ur===0)return Ui;const{ctx:kt,buffer:zt,gridInner:Qt,gridOuter:cr}=this;kt.clearRect(zt,zt,yr,Ur),kt.fillText(wt,zt,zt+ar);const Sr=kt.getImageData(zt,zt,yr,Ur);cr.fill(W,0,Pn),Qt.fill(0,0,Pn);for(let gr=0;gr<Ur;gr++)for(let Nr=0;Nr<yr;Nr++){const vn=Sr.data[4*(gr*yr+Nr)+3]/255;if(vn===0)continue;const An=(gr+zt)*ln+Nr+zt;if(vn===1)cr[An]=0,Qt[An]=W;else{const Ln=.5-vn;cr[An]=Ln>0?Ln*Ln:0,Qt[An]=Ln<0?Ln*Ln:0}}$(cr,0,0,ln,Cn,ln,this.f,this.v,this.z),$(Qt,zt,zt,yr,Ur,ln,this.f,this.v,this.z);for(let gr=0;gr<Pn;gr++){const Nr=Math.sqrt(cr[gr])-Math.sqrt(Qt[gr]);vi[gr]=Math.round(255-255*(Nr/this.radius+this.cutoff))}return Ui}};class Q{constructor(){this.specification=u.v.light.position}possiblyEvaluate(q,Ae){return u.x(q.expression.evaluate(Ae))}interpolate(q,Ae,it){return{x:u.y.number(q.x,Ae.x,it),y:u.y.number(q.y,Ae.y,it),z:u.y.number(q.z,Ae.z,it)}}}let J;class G extends u.E{constructor(q){super(),J=J||new u.q({anchor:new u.D(u.v.light.anchor),position:new Q,color:new u.D(u.v.light.color),intensity:new u.D(u.v.light.intensity)}),this._transitionable=new u.T(J),this.setLight(q),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(q,Ae={}){if(!this._validate(u.r,q,Ae))for(const it in q){const ot=q[it];it.endsWith("-transition")?this._transitionable.setTransition(it.slice(0,-11),ot):this._transitionable.setValue(it,ot)}}updateTransitions(q){this._transitioning=this._transitionable.transitioned(q,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(q){this.properties=this._transitioning.possiblyEvaluate(q)}_validate(q,Ae,it){return(!it||it.validate!==!1)&&u.t(this,q.call(u.u,{value:Ae,style:{glyphs:!0,sprite:!0},styleSpec:u.v}))}}const ee=new u.q({"sky-color":new u.D(u.v.sky["sky-color"]),"horizon-color":new u.D(u.v.sky["horizon-color"]),"fog-color":new u.D(u.v.sky["fog-color"]),"fog-ground-blend":new u.D(u.v.sky["fog-ground-blend"]),"horizon-fog-blend":new u.D(u.v.sky["horizon-fog-blend"]),"sky-horizon-blend":new u.D(u.v.sky["sky-horizon-blend"]),"atmosphere-blend":new u.D(u.v.sky["atmosphere-blend"])});class re extends u.E{constructor(q){super(),this._transitionable=new u.T(ee),this.setSky(q),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new u.z(0))}setSky(q,Ae={}){if(!this._validate(u.B,q,Ae)){q||(q={"sky-color":"transparent","horizon-color":"transparent","fog-color":"transparent","fog-ground-blend":1,"atmosphere-blend":0});for(const it in q){const ot=q[it];it.endsWith("-transition")?this._transitionable.setTransition(it.slice(0,-11),ot):this._transitionable.setValue(it,ot)}}}getSky(){return this._transitionable.serialize()}updateTransitions(q){this._transitioning=this._transitionable.transitioned(q,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(q){this.properties=this._transitioning.possiblyEvaluate(q)}_validate(q,Ae,it={}){return it?.validate!==!1&&u.t(this,q.call(u.u,u.e({value:Ae,style:{glyphs:!0,sprite:!0},styleSpec:u.v})))}calculateFogBlendOpacity(q){return q<60?0:q<70?(q-60)/10:1}}class fe{constructor(q,Ae){this.width=q,this.height=Ae,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}getDash(q,Ae){const it=q.join(",")+String(Ae);return this.dashEntry[it]||(this.dashEntry[it]=this.addDash(q,Ae)),this.dashEntry[it]}getDashRanges(q,Ae,it){const ot=[];let bt=q.length%2==1?-q[q.length-1]*it:0,ar=q[0]*it,yr=!0;ot.push({left:bt,right:ar,isDash:yr,zeroLength:q[0]===0});let Ur=q[0];for(let ln=1;ln<q.length;ln++){yr=!yr;const Cn=q[ln];bt=Ur*it,Ur+=Cn,ar=Ur*it,ot.push({left:bt,right:ar,isDash:yr,zeroLength:Cn===0})}return ot}addRoundDash(q,Ae,it){const ot=Ae/2;for(let bt=-it;bt<=it;bt++){const ar=this.width*(this.nextRow+it+bt);let yr=0,Ur=q[yr];for(let ln=0;ln<this.width;ln++){ln/Ur.right>1&&(Ur=q[++yr]);const Cn=Math.abs(ln-Ur.left),Pn=Math.abs(ln-Ur.right),vi=Math.min(Cn,Pn);let Ui;const kt=bt/it*(ot+1);if(Ur.isDash){const zt=ot-Math.abs(kt);Ui=Math.sqrt(vi*vi+zt*zt)}else Ui=ot-Math.sqrt(vi*vi+kt*kt);this.data[ar+ln]=Math.max(0,Math.min(255,Ui+128))}}}addRegularDash(q){for(let yr=q.length-1;yr>=0;--yr){const Ur=q[yr],ln=q[yr+1];Ur.zeroLength?q.splice(yr,1):ln&&ln.isDash===Ur.isDash&&(ln.left=Ur.left,q.splice(yr,1))}const Ae=q[0],it=q[q.length-1];Ae.isDash===it.isDash&&(Ae.left=it.left-this.width,it.right=Ae.right+this.width);const ot=this.width*this.nextRow;let bt=0,ar=q[bt];for(let yr=0;yr<this.width;yr++){yr/ar.right>1&&(ar=q[++bt]);const Ur=Math.abs(yr-ar.left),ln=Math.abs(yr-ar.right),Cn=Math.min(Ur,ln);this.data[ot+yr]=Math.max(0,Math.min(255,(ar.isDash?Cn:-Cn)+128))}}addDash(q,Ae){const it=Ae?7:0,ot=2*it+1;if(this.nextRow+ot>this.height)return u.w("LineAtlas out of space"),null;let bt=0;for(let yr=0;yr<q.length;yr++)bt+=q[yr];if(bt!==0){const yr=this.width/bt,Ur=this.getDashRanges(q,this.width,yr);Ae?this.addRoundDash(Ur,yr,it):this.addRegularDash(Ur)}const ar={y:(this.nextRow+it+.5)/this.height,height:2*it/this.height,width:bt};return this.nextRow+=ot,this.dirty=!0,ar}bind(q){const Ae=q.gl;this.texture?(Ae.bindTexture(Ae.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,Ae.texSubImage2D(Ae.TEXTURE_2D,0,0,0,this.width,this.height,Ae.ALPHA,Ae.UNSIGNED_BYTE,this.data))):(this.texture=Ae.createTexture(),Ae.bindTexture(Ae.TEXTURE_2D,this.texture),Ae.texParameteri(Ae.TEXTURE_2D,Ae.TEXTURE_WRAP_S,Ae.REPEAT),Ae.texParameteri(Ae.TEXTURE_2D,Ae.TEXTURE_WRAP_T,Ae.REPEAT),Ae.texParameteri(Ae.TEXTURE_2D,Ae.TEXTURE_MIN_FILTER,Ae.LINEAR),Ae.texParameteri(Ae.TEXTURE_2D,Ae.TEXTURE_MAG_FILTER,Ae.LINEAR),Ae.texImage2D(Ae.TEXTURE_2D,0,Ae.ALPHA,this.width,this.height,0,Ae.ALPHA,Ae.UNSIGNED_BYTE,this.data))}}const we="maplibre_preloaded_worker_pool";class Oe{constructor(){this.active={}}acquire(q){if(!this.workers)for(this.workers=[];this.workers.length<Oe.workerCount;)this.workers.push(new Worker(u.a.WORKER_URL));return this.active[q]=!0,this.workers.slice()}release(q){delete this.active[q],this.numActive()===0&&(this.workers.forEach(Ae=>{Ae.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[we]}numActive(){return Object.keys(this.active).length}}const ke=Math.floor(v.hardwareConcurrency/2);let Le,oe;function be(){return Le||(Le=new Oe),Le}Oe.workerCount=u.C(globalThis)?Math.max(Math.min(ke,3),1):1;class _e{constructor(q,Ae){this.workerPool=q,this.actors=[],this.currentActor=0,this.id=Ae;const it=this.workerPool.acquire(Ae);for(let ot=0;ot<it.length;ot++){const bt=new u.F(it[ot],Ae);bt.name=`Worker ${ot}`,this.actors.push(bt)}if(!this.actors.length)throw new Error("No actors found")}broadcast(q,Ae){const it=[];for(const ot of this.actors)it.push(ot.sendAsync({type:q,data:Ae}));return Promise.all(it)}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(q=!0){this.actors.forEach(Ae=>{Ae.remove()}),this.actors=[],q&&this.workerPool.release(this.id)}registerMessageHandler(q,Ae){for(const it of this.actors)it.registerMessageHandler(q,Ae)}}function he(){return oe||(oe=new _e(be(),u.G),oe.registerMessageHandler("GR",(wt,q,Ae)=>u.m(q,Ae))),oe}function De(wt,q){const Ae=u.H();return u.J(Ae,Ae,[1,1,0]),u.K(Ae,Ae,[.5*wt.width,.5*wt.height,1]),u.L(Ae,Ae,wt.calculatePosMatrix(q.toUnwrapped()))}function xe(wt,q,Ae,it,ot,bt){const ar=(function(Pn,vi,Ui){if(Pn)for(const kt of Pn){const zt=vi[kt];if(zt&&zt.source===Ui&&zt.type==="fill-extrusion")return!0}else for(const kt in vi){const zt=vi[kt];if(zt.source===Ui&&zt.type==="fill-extrusion")return!0}return!1})(ot&&ot.layers,q,wt.id),yr=bt.maxPitchScaleFactor(),Ur=wt.tilesIn(it,yr,ar);Ur.sort(se);const ln=[];for(const Pn of Ur)ln.push({wrappedTileID:Pn.tileID.wrapped().key,queryResults:Pn.tile.queryRenderedFeatures(q,Ae,wt._state,Pn.queryGeometry,Pn.cameraQueryGeometry,Pn.scale,ot,bt,yr,De(wt.transform,Pn.tileID))});const Cn=(function(Pn){const vi={},Ui={};for(const kt of Pn){const zt=kt.queryResults,Qt=kt.wrappedTileID,cr=Ui[Qt]=Ui[Qt]||{};for(const Sr in zt){const gr=zt[Sr],Nr=cr[Sr]=cr[Sr]||{},vn=vi[Sr]=vi[Sr]||[];for(const An of gr)Nr[An.featureIndex]||(Nr[An.featureIndex]=!0,vn.push(An))}}return vi})(ln);for(const Pn in Cn)Cn[Pn].forEach(vi=>{const Ui=vi.feature,kt=wt.getFeatureState(Ui.layer["source-layer"],Ui.id);Ui.source=Ui.layer.source,Ui.layer["source-layer"]&&(Ui.sourceLayer=Ui.layer["source-layer"]),Ui.state=kt});return Cn}function se(wt,q){const Ae=wt.tileID,it=q.tileID;return Ae.overscaledZ-it.overscaledZ||Ae.canonical.y-it.canonical.y||Ae.wrap-it.wrap||Ae.canonical.x-it.canonical.x}function Ee(wt,q,Ae){return u._(this,void 0,void 0,function*(){let it=wt;if(wt.url?it=(yield u.h(q.transformRequest(wt.url,"Source"),Ae)).data:yield v.frameAsync(Ae),!it)return null;const ot=u.M(u.e(it,wt),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in it&&it.vector_layers&&(ot.vectorLayerIds=it.vector_layers.map(bt=>bt.id)),ot})}class Te{constructor(q,Ae){q&&(Ae?this.setSouthWest(q).setNorthEast(Ae):Array.isArray(q)&&(q.length===4?this.setSouthWest([q[0],q[1]]).setNorthEast([q[2],q[3]]):this.setSouthWest(q[0]).setNorthEast(q[1])))}setNorthEast(q){return this._ne=q instanceof u.N?new u.N(q.lng,q.lat):u.N.convert(q),this}setSouthWest(q){return this._sw=q instanceof u.N?new u.N(q.lng,q.lat):u.N.convert(q),this}extend(q){const Ae=this._sw,it=this._ne;let ot,bt;if(q instanceof u.N)ot=q,bt=q;else{if(!(q instanceof Te))return Array.isArray(q)?q.length===4||q.every(Array.isArray)?this.extend(Te.convert(q)):this.extend(u.N.convert(q)):q&&("lng"in q||"lon"in q)&&"lat"in q?this.extend(u.N.convert(q)):this;if(ot=q._sw,bt=q._ne,!ot||!bt)return this}return Ae||it?(Ae.lng=Math.min(ot.lng,Ae.lng),Ae.lat=Math.min(ot.lat,Ae.lat),it.lng=Math.max(bt.lng,it.lng),it.lat=Math.max(bt.lat,it.lat)):(this._sw=new u.N(ot.lng,ot.lat),this._ne=new u.N(bt.lng,bt.lat)),this}getCenter(){return new u.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 u.N(this.getWest(),this.getNorth())}getSouthEast(){return new u.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(q){const{lng:Ae,lat:it}=u.N.convert(q);let ot=this._sw.lng<=Ae&&Ae<=this._ne.lng;return this._sw.lng>this._ne.lng&&(ot=this._sw.lng>=Ae&&Ae>=this._ne.lng),this._sw.lat<=it&&it<=this._ne.lat&&ot}static convert(q){return q instanceof Te?q:q&&new Te(q)}static fromLngLat(q,Ae=0){const it=360*Ae/40075017,ot=it/Math.cos(Math.PI/180*q.lat);return new Te(new u.N(q.lng-ot,q.lat-it),new u.N(q.lng+ot,q.lat+it))}adjustAntiMeridian(){const q=new u.N(this._sw.lng,this._sw.lat),Ae=new u.N(this._ne.lng,this._ne.lat);return new Te(q,q.lng>Ae.lng?new u.N(Ae.lng+360,Ae.lat):Ae)}}class Be{constructor(q,Ae,it){this.bounds=Te.convert(this.validateBounds(q)),this.minzoom=Ae||0,this.maxzoom=it||24}validateBounds(q){return Array.isArray(q)&&q.length===4?[Math.max(-180,q[0]),Math.max(-90,q[1]),Math.min(180,q[2]),Math.min(90,q[3])]:[-180,-90,180,90]}contains(q){const Ae=Math.pow(2,q.z),it=Math.floor(u.O(this.bounds.getWest())*Ae),ot=Math.floor(u.Q(this.bounds.getNorth())*Ae),bt=Math.ceil(u.O(this.bounds.getEast())*Ae),ar=Math.ceil(u.Q(this.bounds.getSouth())*Ae);return q.x>=it&&q.x<bt&&q.y>=ot&&q.y<ar}}class tt extends u.E{constructor(q,Ae,it,ot){if(super(),this.id=q,this.dispatcher=it,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,u.e(this,u.M(Ae,["url","scheme","tileSize","promoteId"])),this._options=u.e({type:"vector"},Ae),this._collectResourceTiming=Ae.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(ot)}load(){return u._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new u.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const q=yield Ee(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,this.map.style.sourceCaches[this.id].clearTiles(),q&&(u.e(this,q),q.bounds&&(this.tileBounds=new Be(q.bounds,this.minzoom,this.maxzoom)),this.fire(new u.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new u.k("data",{dataType:"source",sourceDataType:"content"})))}catch(q){this._tileJSONRequest=null,this.fire(new u.j(q))}})}loaded(){return this._loaded}hasTile(q){return!this.tileBounds||this.tileBounds.contains(q.canonical)}onAdd(q){this.map=q,this.load()}setSourceProperty(q){this._tileJSONRequest&&this._tileJSONRequest.abort(),q(),this.load()}setTiles(q){return this.setSourceProperty(()=>{this._options.tiles=q}),this}setUrl(q){return this.setSourceProperty(()=>{this.url=q,this._options.url=q}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return u.e({},this._options)}loadTile(q){return u._(this,void 0,void 0,function*(){const Ae=q.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),it={request:this.map._requestManager.transformRequest(Ae,"Tile"),uid:q.uid,tileID:q.tileID,zoom:q.tileID.overscaledZ,tileSize:this.tileSize*q.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};it.request.collectResourceTiming=this._collectResourceTiming;let ot="RT";if(q.actor&&q.state!=="expired"){if(q.state==="loading")return new Promise((bt,ar)=>{q.reloadPromise={resolve:bt,reject:ar}})}else q.actor=this.dispatcher.getActor(),ot="LT";q.abortController=new AbortController;try{const bt=yield q.actor.sendAsync({type:ot,data:it},q.abortController);if(delete q.abortController,q.aborted)return;this._afterTileLoadWorkerResponse(q,bt)}catch(bt){if(delete q.abortController,q.aborted)return;if(bt&&bt.status!==404)throw bt;this._afterTileLoadWorkerResponse(q,null)}})}_afterTileLoadWorkerResponse(q,Ae){if(Ae&&Ae.resourceTiming&&(q.resourceTiming=Ae.resourceTiming),Ae&&this.map._refreshExpiredTiles&&q.setExpiryData(Ae),q.loadVectorData(Ae,this.map.painter),q.reloadPromise){const it=q.reloadPromise;q.reloadPromise=null,this.loadTile(q).then(it.resolve).catch(it.reject)}}abortTile(q){return u._(this,void 0,void 0,function*(){q.abortController&&(q.abortController.abort(),delete q.abortController),q.actor&&(yield q.actor.sendAsync({type:"AT",data:{uid:q.uid,type:this.type,source:this.id}}))})}unloadTile(q){return u._(this,void 0,void 0,function*(){q.unloadVectorData(),q.actor&&(yield q.actor.sendAsync({type:"RMT",data:{uid:q.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class at extends u.E{constructor(q,Ae,it,ot){super(),this.id=q,this.dispatcher=it,this.setEventedParent(ot),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=u.e({type:"raster"},Ae),u.e(this,u.M(Ae,["url","scheme","tileSize"]))}load(){return u._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new u.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const q=yield Ee(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,q&&(u.e(this,q),q.bounds&&(this.tileBounds=new Be(q.bounds,this.minzoom,this.maxzoom)),this.fire(new u.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new u.k("data",{dataType:"source",sourceDataType:"content"})))}catch(q){this._tileJSONRequest=null,this.fire(new u.j(q))}})}loaded(){return this._loaded}onAdd(q){this.map=q,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(q){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),q(),this.load()}setTiles(q){return this.setSourceProperty(()=>{this._options.tiles=q}),this}setUrl(q){return this.setSourceProperty(()=>{this.url=q,this._options.url=q}),this}serialize(){return u.e({},this._options)}hasTile(q){return!this.tileBounds||this.tileBounds.contains(q.canonical)}loadTile(q){return u._(this,void 0,void 0,function*(){const Ae=q.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);q.abortController=new AbortController;try{const it=yield g.getImage(this.map._requestManager.transformRequest(Ae,"Tile"),q.abortController,this.map._refreshExpiredTiles);if(delete q.abortController,q.aborted)return void(q.state="unloaded");if(it&&it.data){this.map._refreshExpiredTiles&&it.cacheControl&&it.expires&&q.setExpiryData({cacheControl:it.cacheControl,expires:it.expires});const ot=this.map.painter.context,bt=ot.gl,ar=it.data;q.texture=this.map.painter.getTileTexture(ar.width),q.texture?q.texture.update(ar,{useMipmap:!0}):(q.texture=new y(ot,ar,bt.RGBA,{useMipmap:!0}),q.texture.bind(bt.LINEAR,bt.CLAMP_TO_EDGE,bt.LINEAR_MIPMAP_NEAREST)),q.state="loaded"}}catch(it){if(delete q.abortController,q.aborted)q.state="unloaded";else if(it)throw q.state="errored",it}})}abortTile(q){return u._(this,void 0,void 0,function*(){q.abortController&&(q.abortController.abort(),delete q.abortController)})}unloadTile(q){return u._(this,void 0,void 0,function*(){q.texture&&this.map.painter.saveTileTexture(q.texture)})}hasTransition(){return!1}}class gt extends at{constructor(q,Ae,it,ot){super(q,Ae,it,ot),this.type="raster-dem",this.maxzoom=22,this._options=u.e({type:"raster-dem"},Ae),this.encoding=Ae.encoding||"mapbox",this.redFactor=Ae.redFactor,this.greenFactor=Ae.greenFactor,this.blueFactor=Ae.blueFactor,this.baseShift=Ae.baseShift}loadTile(q){return u._(this,void 0,void 0,function*(){const Ae=q.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),it=this.map._requestManager.transformRequest(Ae,"Tile");q.neighboringTiles=this._getNeighboringTiles(q.tileID),q.abortController=new AbortController;try{const ot=yield g.getImage(it,q.abortController,this.map._refreshExpiredTiles);if(delete q.abortController,q.aborted)return void(q.state="unloaded");if(ot&&ot.data){const bt=ot.data;this.map._refreshExpiredTiles&&ot.cacheControl&&ot.expires&&q.setExpiryData({cacheControl:ot.cacheControl,expires:ot.expires});const ar=u.b(bt)&&u.U()?bt:yield this.readImageNow(bt),yr={type:this.type,uid:q.uid,source:this.id,rawImageData:ar,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!q.actor||q.state==="expired"){q.actor=this.dispatcher.getActor();const Ur=yield q.actor.sendAsync({type:"LDT",data:yr});q.dem=Ur,q.needsHillshadePrepare=!0,q.needsTerrainPrepare=!0,q.state="loaded"}}}catch(ot){if(delete q.abortController,q.aborted)q.state="unloaded";else if(ot)throw q.state="errored",ot}})}readImageNow(q){return u._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&u.V()){const Ae=q.width+2,it=q.height+2;try{return new u.R({width:Ae,height:it},yield u.W(q,-1,-1,Ae,it))}catch{}}return v.getImageData(q,1)})}_getNeighboringTiles(q){const Ae=q.canonical,it=Math.pow(2,Ae.z),ot=(Ae.x-1+it)%it,bt=Ae.x===0?q.wrap-1:q.wrap,ar=(Ae.x+1+it)%it,yr=Ae.x+1===it?q.wrap+1:q.wrap,Ur={};return Ur[new u.S(q.overscaledZ,bt,Ae.z,ot,Ae.y).key]={backfilled:!1},Ur[new u.S(q.overscaledZ,yr,Ae.z,ar,Ae.y).key]={backfilled:!1},Ae.y>0&&(Ur[new u.S(q.overscaledZ,bt,Ae.z,ot,Ae.y-1).key]={backfilled:!1},Ur[new u.S(q.overscaledZ,q.wrap,Ae.z,Ae.x,Ae.y-1).key]={backfilled:!1},Ur[new u.S(q.overscaledZ,yr,Ae.z,ar,Ae.y-1).key]={backfilled:!1}),Ae.y+1<it&&(Ur[new u.S(q.overscaledZ,bt,Ae.z,ot,Ae.y+1).key]={backfilled:!1},Ur[new u.S(q.overscaledZ,q.wrap,Ae.z,Ae.x,Ae.y+1).key]={backfilled:!1},Ur[new u.S(q.overscaledZ,yr,Ae.z,ar,Ae.y+1).key]={backfilled:!1}),Ur}unloadTile(q){return u._(this,void 0,void 0,function*(){q.demTexture&&this.map.painter.saveTileTexture(q.demTexture),q.fbo&&(q.fbo.destroy(),delete q.fbo),q.dem&&delete q.dem,delete q.neighboringTiles,q.state="unloaded",q.actor&&(yield q.actor.sendAsync({type:"RDT",data:{type:this.type,uid:q.uid,source:this.id}}))})}}class pt extends u.E{constructor(q,Ae,it,ot){super(),this.id=q,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=it.getActor(),this.setEventedParent(ot),this._data=Ae.data,this._options=u.e({},Ae),this._collectResourceTiming=Ae.collectResourceTiming,Ae.maxzoom!==void 0&&(this.maxzoom=Ae.maxzoom),Ae.type&&(this.type=Ae.type),Ae.attribution&&(this.attribution=Ae.attribution),this.promoteId=Ae.promoteId;const bt=u.X/this.tileSize;Ae.clusterMaxZoom!==void 0&&this.maxzoom<=Ae.clusterMaxZoom&&u.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${Ae.clusterMaxZoom}".`),this.workerOptions=u.e({source:this.id,cluster:Ae.cluster||!1,geojsonVtOptions:{buffer:(Ae.buffer!==void 0?Ae.buffer:128)*bt,tolerance:(Ae.tolerance!==void 0?Ae.tolerance:.375)*bt,extent:u.X,maxZoom:this.maxzoom,lineMetrics:Ae.lineMetrics||!1,generateId:Ae.generateId||!1},superclusterOptions:{maxZoom:Ae.clusterMaxZoom!==void 0?Ae.clusterMaxZoom:this.maxzoom-1,minPoints:Math.max(2,Ae.clusterMinPoints||2),extent:u.X,radius:(Ae.clusterRadius||50)*bt,log:!1,generateId:Ae.generateId||!1},clusterProperties:Ae.clusterProperties,filter:Ae.filter},Ae.workerOptions),typeof this.promoteId=="string"&&(this.workerOptions.promoteId=this.promoteId)}load(){return u._(this,void 0,void 0,function*(){yield this._updateWorkerData()})}onAdd(q){this.map=q,this.load()}setData(q){return this._data=q,this._updateWorkerData(),this}updateData(q){return this._updateWorkerData(q),this}getData(){return u._(this,void 0,void 0,function*(){const q=u.e({type:this.type},this.workerOptions);return this.actor.sendAsync({type:"GD",data:q})})}setClusterOptions(q){return this.workerOptions.cluster=q.cluster,q&&(q.clusterRadius!==void 0&&(this.workerOptions.superclusterOptions.radius=q.clusterRadius),q.clusterMaxZoom!==void 0&&(this.workerOptions.superclusterOptions.maxZoom=q.clusterMaxZoom)),this._updateWorkerData(),this}getClusterExpansionZoom(q){return this.actor.sendAsync({type:"GCEZ",data:{type:this.type,clusterId:q,source:this.id}})}getClusterChildren(q){return this.actor.sendAsync({type:"GCC",data:{type:this.type,clusterId:q,source:this.id}})}getClusterLeaves(q,Ae,it){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:q,limit:Ae,offset:it}})}_updateWorkerData(q){return u._(this,void 0,void 0,function*(){const Ae=u.e({type:this.type},this.workerOptions);q?Ae.dataDiff=q:typeof this._data=="string"?(Ae.request=this.map._requestManager.transformRequest(v.resolveURL(this._data),"Source"),Ae.request.collectResourceTiming=this._collectResourceTiming):Ae.data=JSON.stringify(this._data),this._pendingLoads++,this.fire(new u.k("dataloading",{dataType:"source"}));try{const it=yield this.actor.sendAsync({type:"LD",data:Ae});if(this._pendingLoads--,this._removed||it.abandoned)return void this.fire(new u.k("dataabort",{dataType:"source"}));let ot=null;it.resourceTiming&&it.resourceTiming[this.id]&&(ot=it.resourceTiming[this.id].slice(0));const bt={dataType:"source"};this._collectResourceTiming&&ot&&ot.length>0&&u.e(bt,{resourceTiming:ot}),this.fire(new u.k("data",Object.assign(Object.assign({},bt),{sourceDataType:"metadata"}))),this.fire(new u.k("data",Object.assign(Object.assign({},bt),{sourceDataType:"content"})))}catch(it){if(this._pendingLoads--,this._removed)return void this.fire(new u.k("dataabort",{dataType:"source"}));this.fire(new u.j(it))}})}loaded(){return this._pendingLoads===0}loadTile(q){return u._(this,void 0,void 0,function*(){const Ae=q.actor?"RT":"LT";q.actor=this.actor;const it={type:this.type,uid:q.uid,tileID:q.tileID,zoom:q.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};q.abortController=new AbortController;const ot=yield this.actor.sendAsync({type:Ae,data:it},q.abortController);delete q.abortController,q.unloadVectorData(),q.aborted||q.loadVectorData(ot,this.map.painter,Ae==="RT")})}abortTile(q){return u._(this,void 0,void 0,function*(){q.abortController&&(q.abortController.abort(),delete q.abortController),q.aborted=!0})}unloadTile(q){return u._(this,void 0,void 0,function*(){q.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:q.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 u.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var Rt=u.Y([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class $t extends u.E{constructor(q,Ae,it,ot){super(),this.id=q,this.dispatcher=it,this.coordinates=Ae.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(ot),this.options=Ae}load(q){return u._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new u.k("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{const Ae=yield g.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,Ae&&Ae.data&&(this.image=Ae.data,q&&(this.coordinates=q),this._finishLoading())}catch(Ae){this._request=null,this._loaded=!0,this.fire(new u.j(Ae))}})}loaded(){return this._loaded}updateImage(q){return q.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=q.url,this.load(q.coordinates).finally(()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new u.k("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(q){this.map=q,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(q){this.coordinates=q;const Ae=q.map(u.Z.fromLngLat);this.tileID=(function(ot){let bt=1/0,ar=1/0,yr=-1/0,Ur=-1/0;for(const vi of ot)bt=Math.min(bt,vi.x),ar=Math.min(ar,vi.y),yr=Math.max(yr,vi.x),Ur=Math.max(Ur,vi.y);const ln=Math.max(yr-bt,Ur-ar),Cn=Math.max(0,Math.floor(-Math.log(ln)/Math.LN2)),Pn=Math.pow(2,Cn);return new u.a1(Cn,Math.floor((bt+yr)/2*Pn),Math.floor((ar+Ur)/2*Pn))})(Ae),this.minzoom=this.maxzoom=this.tileID.z;const it=Ae.map(ot=>this.tileID.getTilePoint(ot)._round());return this._boundsArray=new u.$,this._boundsArray.emplaceBack(it[0].x,it[0].y,0,0),this._boundsArray.emplaceBack(it[1].x,it[1].y,u.X,0),this._boundsArray.emplaceBack(it[3].x,it[3].y,0,u.X),this._boundsArray.emplaceBack(it[2].x,it[2].y,u.X,u.X),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new u.k("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;const q=this.map.painter.context,Ae=q.gl;this.boundsBuffer||(this.boundsBuffer=q.createVertexBuffer(this._boundsArray,Rt.members)),this.boundsSegments||(this.boundsSegments=u.a0.simpleSegment(0,0,4,2)),this.texture||(this.texture=new y(q,this.image,Ae.RGBA),this.texture.bind(Ae.LINEAR,Ae.CLAMP_TO_EDGE));let it=!1;for(const ot in this.tiles){const bt=this.tiles[ot];bt.state!=="loaded"&&(bt.state="loaded",bt.texture=this.texture,it=!0)}it&&this.fire(new u.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(q){return u._(this,void 0,void 0,function*(){this.tileID&&this.tileID.equals(q.tileID.canonical)?(this.tiles[String(q.tileID.wrap)]=q,q.buckets={}):q.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class Wt extends $t{constructor(q,Ae,it,ot){super(q,Ae,it,ot),this.roundZoom=!0,this.type="video",this.options=Ae}load(){return u._(this,void 0,void 0,function*(){this._loaded=!1;const q=this.options;this.urls=[];for(const Ae of q.urls)this.urls.push(this.map._requestManager.transformRequest(Ae,"Source").url);try{const Ae=yield u.a3(this.urls);if(this._loaded=!0,!Ae)return;this.video=Ae,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading()}catch(Ae){this.fire(new u.j(Ae))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(q){if(this.video){const Ae=this.video.seekable;q<Ae.start(0)||q>Ae.end(0)?this.fire(new u.j(new u.a2(`sources.${this.id}`,null,`Playback for this video can be set only between the ${Ae.start(0)} and ${Ae.end(0)}-second mark.`))):this.video.currentTime=q}}getVideo(){return this.video}onAdd(q){this.map||(this.map=q,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 q=this.map.painter.context,Ae=q.gl;this.boundsBuffer||(this.boundsBuffer=q.createVertexBuffer(this._boundsArray,Rt.members)),this.boundsSegments||(this.boundsSegments=u.a0.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(Ae.LINEAR,Ae.CLAMP_TO_EDGE),Ae.texSubImage2D(Ae.TEXTURE_2D,0,0,0,Ae.RGBA,Ae.UNSIGNED_BYTE,this.video)):(this.texture=new y(q,this.video,Ae.RGBA),this.texture.bind(Ae.LINEAR,Ae.CLAMP_TO_EDGE));let it=!1;for(const ot in this.tiles){const bt=this.tiles[ot];bt.state!=="loaded"&&(bt.state="loaded",bt.texture=this.texture,it=!0)}it&&this.fire(new u.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 $t{constructor(q,Ae,it,ot){super(q,Ae,it,ot),Ae.coordinates?Array.isArray(Ae.coordinates)&&Ae.coordinates.length===4&&!Ae.coordinates.some(bt=>!Array.isArray(bt)||bt.length!==2||bt.some(ar=>typeof ar!="number"))||this.fire(new u.j(new u.a2(`sources.${q}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new u.j(new u.a2(`sources.${q}`,null,'missing required property "coordinates"'))),Ae.animate&&typeof Ae.animate!="boolean"&&this.fire(new u.j(new u.a2(`sources.${q}`,null,'optional "animate" property must be a boolean value'))),Ae.canvas?typeof Ae.canvas=="string"||Ae.canvas instanceof HTMLCanvasElement||this.fire(new u.j(new u.a2(`sources.${q}`,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 u.j(new u.a2(`sources.${q}`,null,'missing required property "canvas"'))),this.options=Ae,this.animate=Ae.animate===void 0||Ae.animate}load(){return u._(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 u.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(q){this.map=q,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let q=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,q=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,q=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;const Ae=this.map.painter.context,it=Ae.gl;this.boundsBuffer||(this.boundsBuffer=Ae.createVertexBuffer(this._boundsArray,Rt.members)),this.boundsSegments||(this.boundsSegments=u.a0.simpleSegment(0,0,4,2)),this.texture?(q||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new y(Ae,this.canvas,it.RGBA,{premultiply:!0});let ot=!1;for(const bt in this.tiles){const ar=this.tiles[bt];ar.state!=="loaded"&&(ar.state="loaded",ar.texture=this.texture,ot=!0)}ot&&this.fire(new u.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const q of[this.canvas.width,this.canvas.height])if(isNaN(q)||q<=0)return!0;return!1}}const Ft={},st=wt=>{switch(wt){case"geojson":return pt;case"image":return $t;case"raster":return at;case"raster-dem":return gt;case"vector":return tt;case"video":return Wt;case"canvas":return Ht}return Ft[wt]},rt="RTLPluginLoaded";class Ue extends u.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=he()}_syncState(q){return this.status=q,this.dispatcher.broadcast("SRPS",{pluginStatus:q,pluginURL:this.url}).catch(Ae=>{throw this.status="error",Ae})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(q){return u._(this,arguments,void 0,function*(Ae,it=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=v.resolveURL(Ae),!this.url)throw new Error(`requested url ${Ae} is invalid`);if(this.status==="unavailable"){if(!it)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return u._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new u.k(rt))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let xt=null;function Gt(){return xt||(xt=new Ue),xt}class Jt{constructor(q,Ae){this.timeAdded=0,this.fadeEndTime=0,this.tileID=q,this.uid=u.a4(),this.uses=0,this.tileSize=Ae,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(q){const Ae=q+this.timeAdded;Ae<this.fadeEndTime||(this.fadeEndTime=Ae)}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}clearTextures(q){this.demTexture&&q.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(q,Ae,it){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",q){q.featureIndex&&(this.latestFeatureIndex=q.featureIndex,q.rawTileData?(this.latestRawTileData=q.rawTileData,this.latestFeatureIndex.rawTileData=q.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=q.collisionBoxArray,this.buckets=(function(ot,bt){const ar={};if(!bt)return ar;for(const yr of ot){const Ur=yr.layerIds.map(ln=>bt.getLayer(ln)).filter(Boolean);if(Ur.length!==0){yr.layers=Ur,yr.stateDependentLayerIds&&(yr.stateDependentLayers=yr.stateDependentLayerIds.map(ln=>Ur.filter(Cn=>Cn.id===ln)[0]));for(const ln of Ur)ar[ln.id]=yr}}return ar})(q.buckets,Ae.style),this.hasSymbolBuckets=!1;for(const ot in this.buckets){const bt=this.buckets[ot];if(bt instanceof u.a6){if(this.hasSymbolBuckets=!0,!it)break;bt.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const ot in this.buckets){const bt=this.buckets[ot];if(bt instanceof u.a6&&bt.hasRTLText){this.hasRTLText=!0,Gt().lazyLoad();break}}this.queryPadding=0;for(const ot in this.buckets){const bt=this.buckets[ot];this.queryPadding=Math.max(this.queryPadding,Ae.style.getLayer(ot).queryRadius(bt))}q.imageAtlas&&(this.imageAtlas=q.imageAtlas),q.glyphAtlasImage&&(this.glyphAtlasImage=q.glyphAtlasImage)}else this.collisionBoxArray=new u.a5}unloadVectorData(){for(const q in this.buckets)this.buckets[q].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(q){return this.buckets[q.id]}upload(q){for(const it in this.buckets){const ot=this.buckets[it];ot.uploadPending()&&ot.upload(q)}const Ae=q.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new y(q,this.imageAtlas.image,Ae.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new y(q,this.glyphAtlasImage,Ae.ALPHA),this.glyphAtlasImage=null)}prepare(q){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(q,this.imageAtlasTexture)}queryRenderedFeatures(q,Ae,it,ot,bt,ar,yr,Ur,ln,Cn){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:ot,cameraQueryGeometry:bt,scale:ar,tileSize:this.tileSize,pixelPosMatrix:Cn,transform:Ur,params:yr,queryPadding:this.queryPadding*ln},q,Ae,it):{}}querySourceFeatures(q,Ae){const it=this.latestFeatureIndex;if(!it||!it.rawTileData)return;const ot=it.loadVTLayers(),bt=Ae&&Ae.sourceLayer?Ae.sourceLayer:"",ar=ot._geojsonTileLayer||ot[bt];if(!ar)return;const yr=u.a7(Ae&&Ae.filter),{z:Ur,x:ln,y:Cn}=this.tileID.canonical,Pn={z:Ur,x:ln,y:Cn};for(let vi=0;vi<ar.length;vi++){const Ui=ar.feature(vi);if(yr.needGeometry){const Qt=u.a8(Ui,!0);if(!yr.filter(new u.z(this.tileID.overscaledZ),Qt,this.tileID.canonical))continue}else if(!yr.filter(new u.z(this.tileID.overscaledZ),Ui))continue;const kt=it.getId(Ui,bt),zt=new u.a9(Ui,Ur,ln,Cn,kt);zt.tile=Pn,q.push(zt)}}hasData(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"}patternsLoaded(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length}setExpiryData(q){const Ae=this.expirationTime;if(q.cacheControl){const it=u.aa(q.cacheControl);it["max-age"]&&(this.expirationTime=Date.now()+1e3*it["max-age"])}else q.expires&&(this.expirationTime=new Date(q.expires).getTime());if(this.expirationTime){const it=Date.now();let ot=!1;if(this.expirationTime>it)ot=!1;else if(Ae)if(this.expirationTime<Ae)ot=!0;else{const bt=this.expirationTime-Ae;bt?this.expirationTime=it+Math.max(bt,3e4):ot=!0}else ot=!0;ot?(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(q,Ae){if(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||Object.keys(q).length===0)return;const it=this.latestFeatureIndex.loadVTLayers();for(const ot in this.buckets){if(!Ae.style.hasLayer(ot))continue;const bt=this.buckets[ot],ar=bt.layers[0].sourceLayer||"_geojsonTileLayer",yr=it[ar],Ur=q[ar];if(!yr||!Ur||Object.keys(Ur).length===0)continue;bt.update(Ur,yr,this.imageAtlas&&this.imageAtlas.patternPositions||{});const ln=Ae&&Ae.style&&Ae.style.getLayer(ot);ln&&(this.queryPadding=Math.max(this.queryPadding,ln.queryRadius(bt)))}}holdingForFade(){return this.symbolFadeHoldUntil!==void 0}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<v.now()}clearFadeHold(){this.symbolFadeHoldUntil=void 0}setHoldDuration(q){this.symbolFadeHoldUntil=v.now()+q}setDependencies(q,Ae){const it={};for(const ot of Ae)it[ot]=!0;this.dependencies[q]=it}hasDependency(q,Ae){for(const it of q){const ot=this.dependencies[it];if(ot){for(const bt of Ae)if(ot[bt])return!0}}return!1}}class Ut{constructor(q,Ae){this.max=q,this.onRemove=Ae,this.reset()}reset(){for(const q in this.data)for(const Ae of this.data[q])Ae.timeout&&clearTimeout(Ae.timeout),this.onRemove(Ae.value);return this.data={},this.order=[],this}add(q,Ae,it){const ot=q.wrapped().key;this.data[ot]===void 0&&(this.data[ot]=[]);const bt={value:Ae,timeout:void 0};if(it!==void 0&&(bt.timeout=setTimeout(()=>{this.remove(q,bt)},it)),this.data[ot].push(bt),this.order.push(ot),this.order.length>this.max){const ar=this._getAndRemoveByKey(this.order[0]);ar&&this.onRemove(ar)}return this}has(q){return q.wrapped().key in this.data}getAndRemove(q){return this.has(q)?this._getAndRemoveByKey(q.wrapped().key):null}_getAndRemoveByKey(q){const Ae=this.data[q].shift();return Ae.timeout&&clearTimeout(Ae.timeout),this.data[q].length===0&&delete this.data[q],this.order.splice(this.order.indexOf(q),1),Ae.value}getByKey(q){const Ae=this.data[q];return Ae?Ae[0].value:null}get(q){return this.has(q)?this.data[q.wrapped().key][0].value:null}remove(q,Ae){if(!this.has(q))return this;const it=q.wrapped().key,ot=Ae===void 0?0:this.data[it].indexOf(Ae),bt=this.data[it][ot];return this.data[it].splice(ot,1),bt.timeout&&clearTimeout(bt.timeout),this.data[it].length===0&&delete this.data[it],this.onRemove(bt.value),this.order.splice(this.order.indexOf(it),1),this}setMaxSize(q){for(this.max=q;this.order.length>this.max;){const Ae=this._getAndRemoveByKey(this.order[0]);Ae&&this.onRemove(Ae)}return this}filter(q){const Ae=[];for(const it in this.data)for(const ot of this.data[it])q(ot.value)||Ae.push(ot);for(const it of Ae)this.remove(it.value.tileID,it)}}class kr{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(q,Ae,it){const ot=String(Ae);if(this.stateChanges[q]=this.stateChanges[q]||{},this.stateChanges[q][ot]=this.stateChanges[q][ot]||{},u.e(this.stateChanges[q][ot],it),this.deletedStates[q]===null){this.deletedStates[q]={};for(const bt in this.state[q])bt!==ot&&(this.deletedStates[q][bt]=null)}else if(this.deletedStates[q]&&this.deletedStates[q][ot]===null){this.deletedStates[q][ot]={};for(const bt in this.state[q][ot])it[bt]||(this.deletedStates[q][ot][bt]=null)}else for(const bt in it)this.deletedStates[q]&&this.deletedStates[q][ot]&&this.deletedStates[q][ot][bt]===null&&delete this.deletedStates[q][ot][bt]}removeFeatureState(q,Ae,it){if(this.deletedStates[q]===null)return;const ot=String(Ae);if(this.deletedStates[q]=this.deletedStates[q]||{},it&&Ae!==void 0)this.deletedStates[q][ot]!==null&&(this.deletedStates[q][ot]=this.deletedStates[q][ot]||{},this.deletedStates[q][ot][it]=null);else if(Ae!==void 0)if(this.stateChanges[q]&&this.stateChanges[q][ot])for(it in this.deletedStates[q][ot]={},this.stateChanges[q][ot])this.deletedStates[q][ot][it]=null;else this.deletedStates[q][ot]=null;else this.deletedStates[q]=null}getState(q,Ae){const it=String(Ae),ot=u.e({},(this.state[q]||{})[it],(this.stateChanges[q]||{})[it]);if(this.deletedStates[q]===null)return{};if(this.deletedStates[q]){const bt=this.deletedStates[q][Ae];if(bt===null)return{};for(const ar in bt)delete ot[ar]}return ot}initializeTileState(q,Ae){q.setFeatureState(this.state,Ae)}coalesceChanges(q,Ae){const it={};for(const ot in this.stateChanges){this.state[ot]=this.state[ot]||{};const bt={};for(const ar in this.stateChanges[ot])this.state[ot][ar]||(this.state[ot][ar]={}),u.e(this.state[ot][ar],this.stateChanges[ot][ar]),bt[ar]=this.state[ot][ar];it[ot]=bt}for(const ot in this.deletedStates){this.state[ot]=this.state[ot]||{};const bt={};if(this.deletedStates[ot]===null)for(const ar in this.state[ot])bt[ar]={},this.state[ot][ar]={};else for(const ar in this.deletedStates[ot]){if(this.deletedStates[ot][ar]===null)this.state[ot][ar]={};else for(const yr of Object.keys(this.deletedStates[ot][ar]))delete this.state[ot][ar][yr];bt[ar]=this.state[ot][ar]}it[ot]=it[ot]||{},u.e(it[ot],bt)}if(this.stateChanges={},this.deletedStates={},Object.keys(it).length!==0)for(const ot in q)q[ot].setFeatureState(it,Ae)}}class Pr extends u.E{constructor(q,Ae,it){super(),this.id=q,this.dispatcher=it,this.on("data",ot=>this._dataHandler(ot)),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((ot,bt,ar,yr)=>{const Ur=new(st(bt.type))(ot,bt,ar,yr);if(Ur.id!==ot)throw new Error(`Expected Source id to be ${ot} instead of ${Ur.id}`);return Ur})(q,Ae,it,this),this._tiles={},this._cache=new Ut(0,ot=>this._unloadTile(ot)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new kr,this._didEmitContent=!1,this._updated=!1}onAdd(q){this.map=q,this._maxTileCacheSize=q?q._maxTileCacheSize:null,this._maxTileCacheZoomLevels=q?q._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(q)}onRemove(q){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(q)}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 q in this._tiles){const Ae=this._tiles[q];if(Ae.state!=="loaded"&&Ae.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const q=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,q&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(q,Ae,it){return u._(this,void 0,void 0,function*(){try{yield this._source.loadTile(q),this._tileLoaded(q,Ae,it)}catch(ot){q.state="errored",ot.status!==404?this._source.fire(new u.j(ot,{tile:q})):this.update(this.transform,this.terrain)}})}_unloadTile(q){this._source.unloadTile&&this._source.unloadTile(q)}_abortTile(q){this._source.abortTile&&this._source.abortTile(q),this._source.fire(new u.k("dataabort",{tile:q,coord:q.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(q){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const Ae in this._tiles){const it=this._tiles[Ae];it.upload(q),it.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(q=>q.tileID).sort($r).map(q=>q.key)}getRenderableIds(q){const Ae=[];for(const it in this._tiles)this._isIdRenderable(it,q)&&Ae.push(this._tiles[it]);return q?Ae.sort((it,ot)=>{const bt=it.tileID,ar=ot.tileID,yr=new u.P(bt.canonical.x,bt.canonical.y)._rotate(this.transform.angle),Ur=new u.P(ar.canonical.x,ar.canonical.y)._rotate(this.transform.angle);return bt.overscaledZ-ar.overscaledZ||Ur.y-yr.y||Ur.x-yr.x}).map(it=>it.tileID.key):Ae.map(it=>it.tileID).sort($r).map(it=>it.key)}hasRenderableParent(q){const Ae=this.findLoadedParent(q,0);return!!Ae&&this._isIdRenderable(Ae.tileID.key)}_isIdRenderable(q,Ae){return this._tiles[q]&&this._tiles[q].hasData()&&!this._coveredTiles[q]&&(Ae||!this._tiles[q].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const q in this._tiles)this._tiles[q].state!=="errored"&&this._reloadTile(q,"reloading")}}_reloadTile(q,Ae){return u._(this,void 0,void 0,function*(){const it=this._tiles[q];it&&(it.state!=="loading"&&(it.state=Ae),yield this._loadTile(it,q,Ae))})}_tileLoaded(q,Ae,it){q.timeAdded=v.now(),it==="expired"&&(q.refreshedUponExpiration=!0),this._setTileReloadTimer(Ae,q),this.getSource().type==="raster-dem"&&q.dem&&this._backfillDEM(q),this._state.initializeTileState(q,this.map?this.map.painter:null),q.aborted||this._source.fire(new u.k("data",{dataType:"source",tile:q,coord:q.tileID}))}_backfillDEM(q){const Ae=this.getRenderableIds();for(let ot=0;ot<Ae.length;ot++){const bt=Ae[ot];if(q.neighboringTiles&&q.neighboringTiles[bt]){const ar=this.getTileByID(bt);it(q,ar),it(ar,q)}}function it(ot,bt){ot.needsHillshadePrepare=!0,ot.needsTerrainPrepare=!0;let ar=bt.tileID.canonical.x-ot.tileID.canonical.x;const yr=bt.tileID.canonical.y-ot.tileID.canonical.y,Ur=Math.pow(2,ot.tileID.canonical.z),ln=bt.tileID.key;ar===0&&yr===0||Math.abs(yr)>1||(Math.abs(ar)>1&&(Math.abs(ar+Ur)===1?ar+=Ur:Math.abs(ar-Ur)===1&&(ar-=Ur)),bt.dem&&ot.dem&&(ot.dem.backfillBorder(bt.dem,ar,yr),ot.neighboringTiles&&ot.neighboringTiles[ln]&&(ot.neighboringTiles[ln].backfilled=!0)))}}getTile(q){return this.getTileByID(q.key)}getTileByID(q){return this._tiles[q]}_retainLoadedChildren(q,Ae,it,ot){for(const bt in this._tiles){let ar=this._tiles[bt];if(ot[bt]||!ar.hasData()||ar.tileID.overscaledZ<=Ae||ar.tileID.overscaledZ>it)continue;let yr=ar.tileID;for(;ar&&ar.tileID.overscaledZ>Ae+1;){const ln=ar.tileID.scaledTo(ar.tileID.overscaledZ-1);ar=this._tiles[ln.key],ar&&ar.hasData()&&(yr=ln)}let Ur=yr;for(;Ur.overscaledZ>Ae;)if(Ur=Ur.scaledTo(Ur.overscaledZ-1),q[Ur.key]){ot[yr.key]=yr;break}}}findLoadedParent(q,Ae){if(q.key in this._loadedParentTiles){const it=this._loadedParentTiles[q.key];return it&&it.tileID.overscaledZ>=Ae?it:null}for(let it=q.overscaledZ-1;it>=Ae;it--){const ot=q.scaledTo(it),bt=this._getLoadedTile(ot);if(bt)return bt}}findLoadedSibling(q){return this._getLoadedTile(q)}_getLoadedTile(q){const Ae=this._tiles[q.key];return Ae&&Ae.hasData()?Ae:this._cache.getByKey(q.wrapped().key)}updateCacheSize(q){const Ae=Math.ceil(q.width/this._source.tileSize)+1,it=Math.ceil(q.height/this._source.tileSize)+1,ot=Math.floor(Ae*it*(this._maxTileCacheZoomLevels===null?u.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),bt=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,ot):ot;this._cache.setMaxSize(bt)}handleWrapJump(q){const Ae=Math.round((q-(this._prevLng===void 0?q:this._prevLng))/360);if(this._prevLng=q,Ae){const it={};for(const ot in this._tiles){const bt=this._tiles[ot];bt.tileID=bt.tileID.unwrapTo(bt.tileID.wrap+Ae),it[bt.tileID.key]=bt}this._tiles=it;for(const ot in this._timers)clearTimeout(this._timers[ot]),delete this._timers[ot];for(const ot in this._tiles)this._setTileReloadTimer(ot,this._tiles[ot])}}_updateCoveredAndRetainedTiles(q,Ae,it,ot,bt,ar){const yr={},Ur={},ln=Object.keys(q),Cn=v.now();for(const Pn of ln){const vi=q[Pn],Ui=this._tiles[Pn];if(!Ui||Ui.fadeEndTime!==0&&Ui.fadeEndTime<=Cn)continue;const kt=this.findLoadedParent(vi,Ae),zt=this.findLoadedSibling(vi),Qt=kt||zt||null;Qt&&(this._addTile(Qt.tileID),yr[Qt.tileID.key]=Qt.tileID),Ur[Pn]=vi}this._retainLoadedChildren(Ur,ot,it,q);for(const Pn in yr)q[Pn]||(this._coveredTiles[Pn]=!0,q[Pn]=yr[Pn]);if(ar){const Pn={},vi={};for(const Ui of bt)this._tiles[Ui.key].hasData()?Pn[Ui.key]=Ui:vi[Ui.key]=Ui;for(const Ui in vi){const kt=vi[Ui].children(this._source.maxzoom);this._tiles[kt[0].key]&&this._tiles[kt[1].key]&&this._tiles[kt[2].key]&&this._tiles[kt[3].key]&&(Pn[kt[0].key]=q[kt[0].key]=kt[0],Pn[kt[1].key]=q[kt[1].key]=kt[1],Pn[kt[2].key]=q[kt[2].key]=kt[2],Pn[kt[3].key]=q[kt[3].key]=kt[3],delete vi[Ui])}for(const Ui in vi){const kt=vi[Ui],zt=this.findLoadedParent(kt,this._source.minzoom),Qt=this.findLoadedSibling(kt),cr=zt||Qt||null;if(cr){Pn[cr.tileID.key]=q[cr.tileID.key]=cr.tileID;for(const Sr in Pn)Pn[Sr].isChildOf(cr.tileID)&&delete Pn[Sr]}}for(const Ui in this._tiles)Pn[Ui]||(this._coveredTiles[Ui]=!0)}}update(q,Ae){if(!this._sourceLoaded||this._paused)return;let it;this.transform=q,this.terrain=Ae,this.updateCacheSize(q),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?it=q.getVisibleUnwrappedCoordinates(this._source.tileID).map(Cn=>new u.S(Cn.canonical.z,Cn.wrap,Cn.canonical.z,Cn.canonical.x,Cn.canonical.y)):(it=q.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:Ae}),this._source.hasTile&&(it=it.filter(Cn=>this._source.hasTile(Cn)))):it=[];const ot=q.coveringZoomLevel(this._source),bt=Math.max(ot-Pr.maxOverzooming,this._source.minzoom),ar=Math.max(ot+Pr.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){const Cn={};for(const Pn of it)if(Pn.canonical.z>this._source.minzoom){const vi=Pn.scaledTo(Pn.canonical.z-1);Cn[vi.key]=vi;const Ui=Pn.scaledTo(Math.max(this._source.minzoom,Math.min(Pn.canonical.z,5)));Cn[Ui.key]=Ui}it=it.concat(Object.values(Cn))}const yr=it.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,yr&&this.fire(new u.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));const Ur=this._updateRetainedTiles(it,ot);rn(this._source.type)&&this._updateCoveredAndRetainedTiles(Ur,bt,ar,ot,it,Ae);for(const Cn in Ur)this._tiles[Cn].clearFadeHold();const ln=u.ab(this._tiles,Ur);for(const Cn of ln){const Pn=this._tiles[Cn];Pn.hasSymbolBuckets&&!Pn.holdingForFade()?Pn.setHoldDuration(this.map._fadeDuration):Pn.hasSymbolBuckets&&!Pn.symbolFadeFinished()||this._removeTile(Cn)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(const q in this._tiles)this._tiles[q].holdingForFade()&&this._removeTile(q)}_updateRetainedTiles(q,Ae){var it;const ot={},bt={},ar=Math.max(Ae-Pr.maxOverzooming,this._source.minzoom),yr=Math.max(Ae+Pr.maxUnderzooming,this._source.minzoom),Ur={};for(const ln of q){const Cn=this._addTile(ln);ot[ln.key]=ln,Cn.hasData()||Ae<this._source.maxzoom&&(Ur[ln.key]=ln)}this._retainLoadedChildren(Ur,Ae,yr,ot);for(const ln of q){let Cn=this._tiles[ln.key];if(Cn.hasData())continue;if(Ae+1>this._source.maxzoom){const vi=ln.children(this._source.maxzoom)[0],Ui=this.getTile(vi);if(Ui&&Ui.hasData()){ot[vi.key]=vi;continue}}else{const vi=ln.children(this._source.maxzoom);if(ot[vi[0].key]&&ot[vi[1].key]&&ot[vi[2].key]&&ot[vi[3].key])continue}let Pn=Cn.wasRequested();for(let vi=ln.overscaledZ-1;vi>=ar;--vi){const Ui=ln.scaledTo(vi);if(bt[Ui.key])break;if(bt[Ui.key]=!0,Cn=this.getTile(Ui),!Cn&&Pn&&(Cn=this._addTile(Ui)),Cn){const kt=Cn.hasData();if((kt||!(!((it=this.map)===null||it===void 0)&&it.cancelPendingTileRequestsWhileZooming)||Pn)&&(ot[Ui.key]=Ui),Pn=Cn.wasRequested(),kt)break}}}return ot}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const q in this._tiles){const Ae=[];let it,ot=this._tiles[q].tileID;for(;ot.overscaledZ>0;){if(ot.key in this._loadedParentTiles){it=this._loadedParentTiles[ot.key];break}Ae.push(ot.key);const bt=ot.scaledTo(ot.overscaledZ-1);if(it=this._getLoadedTile(bt),it)break;ot=bt}for(const bt of Ae)this._loadedParentTiles[bt]=it}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(const q in this._tiles){const Ae=this._tiles[q].tileID,it=this._getLoadedTile(Ae);this._loadedSiblingTiles[Ae.key]=it}}_addTile(q){let Ae=this._tiles[q.key];if(Ae)return Ae;Ae=this._cache.getAndRemove(q),Ae&&(this._setTileReloadTimer(q.key,Ae),Ae.tileID=q,this._state.initializeTileState(Ae,this.map?this.map.painter:null),this._cacheTimers[q.key]&&(clearTimeout(this._cacheTimers[q.key]),delete this._cacheTimers[q.key],this._setTileReloadTimer(q.key,Ae)));const it=Ae;return Ae||(Ae=new Jt(q,this._source.tileSize*q.overscaleFactor()),this._loadTile(Ae,q.key,Ae.state)),Ae.uses++,this._tiles[q.key]=Ae,it||this._source.fire(new u.k("dataloading",{tile:Ae,coord:Ae.tileID,dataType:"source"})),Ae}_setTileReloadTimer(q,Ae){q in this._timers&&(clearTimeout(this._timers[q]),delete this._timers[q]);const it=Ae.getExpiryTimeout();it&&(this._timers[q]=setTimeout(()=>{this._reloadTile(q,"expired"),delete this._timers[q]},it))}_removeTile(q){const Ae=this._tiles[q];Ae&&(Ae.uses--,delete this._tiles[q],this._timers[q]&&(clearTimeout(this._timers[q]),delete this._timers[q]),Ae.uses>0||(Ae.hasData()&&Ae.state!=="reloading"?this._cache.add(Ae.tileID,Ae,Ae.getExpiryTimeout()):(Ae.aborted=!0,this._abortTile(Ae),this._unloadTile(Ae))))}_dataHandler(q){const Ae=q.sourceDataType;q.dataType==="source"&&Ae==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&q.dataType==="source"&&Ae==="content"&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const q in this._tiles)this._removeTile(q);this._cache.reset()}tilesIn(q,Ae,it){const ot=[],bt=this.transform;if(!bt)return ot;const ar=it?bt.getCameraQueryGeometry(q):q,yr=q.map(kt=>bt.pointCoordinate(kt,this.terrain)),Ur=ar.map(kt=>bt.pointCoordinate(kt,this.terrain)),ln=this.getIds();let Cn=1/0,Pn=1/0,vi=-1/0,Ui=-1/0;for(const kt of Ur)Cn=Math.min(Cn,kt.x),Pn=Math.min(Pn,kt.y),vi=Math.max(vi,kt.x),Ui=Math.max(Ui,kt.y);for(let kt=0;kt<ln.length;kt++){const zt=this._tiles[ln[kt]];if(zt.holdingForFade())continue;const Qt=zt.tileID,cr=Math.pow(2,bt.zoom-zt.tileID.overscaledZ),Sr=Ae*zt.queryPadding*u.X/zt.tileSize/cr,gr=[Qt.getTilePoint(new u.Z(Cn,Pn)),Qt.getTilePoint(new u.Z(vi,Ui))];if(gr[0].x-Sr<u.X&&gr[0].y-Sr<u.X&&gr[1].x+Sr>=0&&gr[1].y+Sr>=0){const Nr=yr.map(An=>Qt.getTilePoint(An)),vn=Ur.map(An=>Qt.getTilePoint(An));ot.push({tile:zt,tileID:Qt,queryGeometry:Nr,cameraQueryGeometry:vn,scale:cr})}}return ot}getVisibleCoordinates(q){const Ae=this.getRenderableIds(q).map(it=>this._tiles[it].tileID);for(const it of Ae)it.posMatrix=this.transform.calculatePosMatrix(it.toUnwrapped());return Ae}hasTransition(){if(this._source.hasTransition())return!0;if(rn(this._source.type)){const q=v.now();for(const Ae in this._tiles)if(this._tiles[Ae].fadeEndTime>=q)return!0}return!1}setFeatureState(q,Ae,it){this._state.updateState(q=q||"_geojsonTileLayer",Ae,it)}removeFeatureState(q,Ae,it){this._state.removeFeatureState(q=q||"_geojsonTileLayer",Ae,it)}getFeatureState(q,Ae){return this._state.getState(q=q||"_geojsonTileLayer",Ae)}setDependencies(q,Ae,it){const ot=this._tiles[q];ot&&ot.setDependencies(Ae,it)}reloadTilesForDependencies(q,Ae){for(const it in this._tiles)this._tiles[it].hasDependency(q,Ae)&&this._reloadTile(it,"reloading");this._cache.filter(it=>!it.hasDependency(q,Ae))}}function $r(wt,q){const Ae=Math.abs(2*wt.wrap)-+(wt.wrap<0),it=Math.abs(2*q.wrap)-+(q.wrap<0);return wt.overscaledZ-q.overscaledZ||it-Ae||q.canonical.y-wt.canonical.y||q.canonical.x-wt.canonical.x}function rn(wt){return wt==="raster"||wt==="image"||wt==="video"}Pr.maxOverzooming=10,Pr.maxUnderzooming=3;class kn{constructor(q,Ae){this.reset(q,Ae)}reset(q,Ae){this.points=q||[],this._distances=[0];for(let it=1;it<this.points.length;it++)this._distances[it]=this._distances[it-1]+this.points[it].dist(this.points[it-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(Ae||0,.5*this.length),this.paddedLength=this.length-2*this.padding}lerp(q){if(this.points.length===1)return this.points[0];q=u.ac(q,0,1);let Ae=1,it=this._distances[Ae];const ot=q*this.paddedLength+this.padding;for(;it<ot&&Ae<this._distances.length;)it=this._distances[++Ae];const bt=Ae-1,ar=this._distances[bt],yr=it-ar,Ur=yr>0?(ot-ar)/yr:0;return this.points[bt].mult(1-Ur).add(this.points[Ae].mult(Ur))}}function Rn(wt,q){let Ae=!0;return wt==="always"||wt!=="never"&&q!=="never"||(Ae=!1),Ae}class ci{constructor(q,Ae,it){const ot=this.boxCells=[],bt=this.circleCells=[];this.xCellCount=Math.ceil(q/it),this.yCellCount=Math.ceil(Ae/it);for(let ar=0;ar<this.xCellCount*this.yCellCount;ar++)ot.push([]),bt.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=q,this.height=Ae,this.xScale=this.xCellCount/q,this.yScale=this.yCellCount/Ae,this.boxUid=0,this.circleUid=0}keysLength(){return this.boxKeys.length+this.circleKeys.length}insert(q,Ae,it,ot,bt){this._forEachCell(Ae,it,ot,bt,this._insertBoxCell,this.boxUid++),this.boxKeys.push(q),this.bboxes.push(Ae),this.bboxes.push(it),this.bboxes.push(ot),this.bboxes.push(bt)}insertCircle(q,Ae,it,ot){this._forEachCell(Ae-ot,it-ot,Ae+ot,it+ot,this._insertCircleCell,this.circleUid++),this.circleKeys.push(q),this.circles.push(Ae),this.circles.push(it),this.circles.push(ot)}_insertBoxCell(q,Ae,it,ot,bt,ar){this.boxCells[bt].push(ar)}_insertCircleCell(q,Ae,it,ot,bt,ar){this.circleCells[bt].push(ar)}_query(q,Ae,it,ot,bt,ar,yr){if(it<0||q>this.width||ot<0||Ae>this.height)return[];const Ur=[];if(q<=0&&Ae<=0&&this.width<=it&&this.height<=ot){if(bt)return[{key:null,x1:q,y1:Ae,x2:it,y2:ot}];for(let ln=0;ln<this.boxKeys.length;ln++)Ur.push({key:this.boxKeys[ln],x1:this.bboxes[4*ln],y1:this.bboxes[4*ln+1],x2:this.bboxes[4*ln+2],y2:this.bboxes[4*ln+3]});for(let ln=0;ln<this.circleKeys.length;ln++){const Cn=this.circles[3*ln],Pn=this.circles[3*ln+1],vi=this.circles[3*ln+2];Ur.push({key:this.circleKeys[ln],x1:Cn-vi,y1:Pn-vi,x2:Cn+vi,y2:Pn+vi})}}else this._forEachCell(q,Ae,it,ot,this._queryCell,Ur,{hitTest:bt,overlapMode:ar,seenUids:{box:{},circle:{}}},yr);return Ur}query(q,Ae,it,ot){return this._query(q,Ae,it,ot,!1,null)}hitTest(q,Ae,it,ot,bt,ar){return this._query(q,Ae,it,ot,!0,bt,ar).length>0}hitTestCircle(q,Ae,it,ot,bt){const ar=q-it,yr=q+it,Ur=Ae-it,ln=Ae+it;if(yr<0||ar>this.width||ln<0||Ur>this.height)return!1;const Cn=[];return this._forEachCell(ar,Ur,yr,ln,this._queryCellCircle,Cn,{hitTest:!0,overlapMode:ot,circle:{x:q,y:Ae,radius:it},seenUids:{box:{},circle:{}}},bt),Cn.length>0}_queryCell(q,Ae,it,ot,bt,ar,yr,Ur){const{seenUids:ln,hitTest:Cn,overlapMode:Pn}=yr,vi=this.boxCells[bt];if(vi!==null){const kt=this.bboxes;for(const zt of vi)if(!ln.box[zt]){ln.box[zt]=!0;const Qt=4*zt,cr=this.boxKeys[zt];if(q<=kt[Qt+2]&&Ae<=kt[Qt+3]&&it>=kt[Qt+0]&&ot>=kt[Qt+1]&&(!Ur||Ur(cr))&&(!Cn||!Rn(Pn,cr.overlapMode))&&(ar.push({key:cr,x1:kt[Qt],y1:kt[Qt+1],x2:kt[Qt+2],y2:kt[Qt+3]}),Cn))return!0}}const Ui=this.circleCells[bt];if(Ui!==null){const kt=this.circles;for(const zt of Ui)if(!ln.circle[zt]){ln.circle[zt]=!0;const Qt=3*zt,cr=this.circleKeys[zt];if(this._circleAndRectCollide(kt[Qt],kt[Qt+1],kt[Qt+2],q,Ae,it,ot)&&(!Ur||Ur(cr))&&(!Cn||!Rn(Pn,cr.overlapMode))){const Sr=kt[Qt],gr=kt[Qt+1],Nr=kt[Qt+2];if(ar.push({key:cr,x1:Sr-Nr,y1:gr-Nr,x2:Sr+Nr,y2:gr+Nr}),Cn)return!0}}}return!1}_queryCellCircle(q,Ae,it,ot,bt,ar,yr,Ur){const{circle:ln,seenUids:Cn,overlapMode:Pn}=yr,vi=this.boxCells[bt];if(vi!==null){const kt=this.bboxes;for(const zt of vi)if(!Cn.box[zt]){Cn.box[zt]=!0;const Qt=4*zt,cr=this.boxKeys[zt];if(this._circleAndRectCollide(ln.x,ln.y,ln.radius,kt[Qt+0],kt[Qt+1],kt[Qt+2],kt[Qt+3])&&(!Ur||Ur(cr))&&!Rn(Pn,cr.overlapMode))return ar.push(!0),!0}}const Ui=this.circleCells[bt];if(Ui!==null){const kt=this.circles;for(const zt of Ui)if(!Cn.circle[zt]){Cn.circle[zt]=!0;const Qt=3*zt,cr=this.circleKeys[zt];if(this._circlesCollide(kt[Qt],kt[Qt+1],kt[Qt+2],ln.x,ln.y,ln.radius)&&(!Ur||Ur(cr))&&!Rn(Pn,cr.overlapMode))return ar.push(!0),!0}}}_forEachCell(q,Ae,it,ot,bt,ar,yr,Ur){const ln=this._convertToXCellCoord(q),Cn=this._convertToYCellCoord(Ae),Pn=this._convertToXCellCoord(it),vi=this._convertToYCellCoord(ot);for(let Ui=ln;Ui<=Pn;Ui++)for(let kt=Cn;kt<=vi;kt++)if(bt.call(this,q,Ae,it,ot,this.xCellCount*kt+Ui,ar,yr,Ur))return}_convertToXCellCoord(q){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(q*this.xScale)))}_convertToYCellCoord(q){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(q*this.yScale)))}_circlesCollide(q,Ae,it,ot,bt,ar){const yr=ot-q,Ur=bt-Ae,ln=it+ar;return ln*ln>yr*yr+Ur*Ur}_circleAndRectCollide(q,Ae,it,ot,bt,ar,yr){const Ur=(ar-ot)/2,ln=Math.abs(q-(ot+Ur));if(ln>Ur+it)return!1;const Cn=(yr-bt)/2,Pn=Math.abs(Ae-(bt+Cn));if(Pn>Cn+it)return!1;if(ln<=Ur||Pn<=Cn)return!0;const vi=ln-Ur,Ui=Pn-Cn;return vi*vi+Ui*Ui<=it*it}}function In(wt,q,Ae,it,ot){const bt=u.H();return q?(u.K(bt,bt,[1/ot,1/ot,1]),Ae||u.ad(bt,bt,it.angle)):u.L(bt,it.labelPlaneMatrix,wt),bt}function Gn(wt,q,Ae,it,ot){if(q){const bt=u.ae(wt);return u.K(bt,bt,[ot,ot,1]),Ae||u.ad(bt,bt,-it.angle),bt}return it.glCoordMatrix}function mr(wt,q,Ae,it){let ot;it?(ot=[wt,q,it(wt,q),1],u.af(ot,ot,Ae)):(ot=[wt,q,0,1],on(ot,ot,Ae));const bt=ot[3];return{point:new u.P(ot[0]/bt,ot[1]/bt),signedDistanceFromCamera:bt,isOccluded:!1}}function St(wt,q){return .5+wt/q*.5}function Ot(wt,q){return wt.x>=-q[0]&&wt.x<=q[0]&&wt.y>=-q[1]&&wt.y<=q[1]}function Et(wt,q,Ae,it,ot,bt,ar,yr,Ur,ln,Cn,Pn,vi,Ui,kt){const zt=it?wt.textSizeData:wt.iconSizeData,Qt=u.ag(zt,Ae.transform.zoom),cr=[256/Ae.width*2+1,256/Ae.height*2+1],Sr=it?wt.text.dynamicLayoutVertexArray:wt.icon.dynamicLayoutVertexArray;Sr.clear();const gr=wt.lineVertexArray,Nr=it?wt.text.placedSymbolArray:wt.icon.placedSymbolArray,vn=Ae.transform.width/Ae.transform.height;let An=!1;for(let Ln=0;Ln<Nr.length;Ln++){const ai=Nr.get(Ln);if(ai.hidden||ai.writingMode===u.ah.vertical&&!An){dn(ai.numGlyphs,Sr);continue}An=!1;const ki=mr(ai.anchorX,ai.anchorY,q,kt);if(!Ot(ki.point,cr)){dn(ai.numGlyphs,Sr);continue}const ra=St(Ae.transform.cameraToCenterDistance,ki.signedDistanceFromCamera),oa=u.ai(zt,Qt,ai),Ma=ar?oa/ra:oa*ra,mo={getElevation:kt,labelPlaneMatrix:ot,lineVertexArray:gr,pitchWithMap:ar,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},projection:ln,tileAnchorPoint:new u.P(ai.anchorX,ai.anchorY),unwrappedTileID:Cn,width:Pn,height:vi,translation:Ui},ns=et(mo,ai,Ma,!1,yr,q,bt,wt.glyphOffsetArray,Sr,vn,Ur);An=ns.useVertical,(ns.notEnoughRoom||An||ns.needsFlipping&&et(mo,ai,Ma,!0,yr,q,bt,wt.glyphOffsetArray,Sr,vn,Ur).notEnoughRoom)&&dn(ai.numGlyphs,Sr)}it?wt.text.dynamicLayoutVertexBuffer.updateData(Sr):wt.icon.dynamicLayoutVertexBuffer.updateData(Sr)}function je(wt,q,Ae,it,ot,bt,ar,yr){const Ur=bt.glyphStartIndex+bt.numGlyphs,ln=bt.lineStartIndex,Cn=bt.lineStartIndex+bt.lineLength,Pn=q.getoffsetX(bt.glyphStartIndex),vi=q.getoffsetX(Ur-1),Ui=tn(wt*Pn,Ae,it,ot,bt.segment,ln,Cn,yr,ar);if(!Ui)return null;const kt=tn(wt*vi,Ae,it,ot,bt.segment,ln,Cn,yr,ar);return kt?yr.projectionCache.anyProjectionOccluded?null:{first:Ui,last:kt}:null}function Ye(wt,q,Ae,it){return wt===u.ah.horizontal&&Math.abs(Ae.y-q.y)>Math.abs(Ae.x-q.x)*it?{useVertical:!0}:(wt===u.ah.vertical?q.y<Ae.y:q.x>Ae.x)?{needsFlipping:!0}:null}function et(wt,q,Ae,it,ot,bt,ar,yr,Ur,ln,Cn){const Pn=Ae/24,vi=q.lineOffsetX*Pn,Ui=q.lineOffsetY*Pn;let kt;if(q.numGlyphs>1){const zt=q.glyphStartIndex+q.numGlyphs,Qt=q.lineStartIndex,cr=q.lineStartIndex+q.lineLength,Sr=je(Pn,yr,vi,Ui,it,q,Cn,wt);if(!Sr)return{notEnoughRoom:!0};const gr=mr(Sr.first.point.x,Sr.first.point.y,ar,wt.getElevation).point,Nr=mr(Sr.last.point.x,Sr.last.point.y,ar,wt.getElevation).point;if(ot&&!it){const vn=Ye(q.writingMode,gr,Nr,ln);if(vn)return vn}kt=[Sr.first];for(let vn=q.glyphStartIndex+1;vn<zt-1;vn++)kt.push(tn(Pn*yr.getoffsetX(vn),vi,Ui,it,q.segment,Qt,cr,wt,Cn));kt.push(Sr.last)}else{if(ot&&!it){const Qt=mr(wt.tileAnchorPoint.x,wt.tileAnchorPoint.y,bt,wt.getElevation).point,cr=q.lineStartIndex+q.segment+1,Sr=new u.P(wt.lineVertexArray.getx(cr),wt.lineVertexArray.gety(cr)),gr=mr(Sr.x,Sr.y,bt,wt.getElevation),Nr=gr.signedDistanceFromCamera>0?gr.point:(function(An,Ln,ai,ki,ra,oa){return mt(An,Ln,ai,1,ra,oa)})(wt.tileAnchorPoint,Sr,Qt,0,bt,wt),vn=Ye(q.writingMode,Qt,Nr,ln);if(vn)return vn}const zt=tn(Pn*yr.getoffsetX(q.glyphStartIndex),vi,Ui,it,q.segment,q.lineStartIndex,q.lineStartIndex+q.lineLength,wt,Cn);if(!zt||wt.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};kt=[zt]}for(const zt of kt)u.aj(Ur,zt.point,zt.angle);return{}}function mt(wt,q,Ae,it,ot,bt){const ar=wt.add(wt.sub(q)._unit()),yr=ot!==void 0?mr(ar.x,ar.y,ot,bt.getElevation).point:lr(ar.x,ar.y,bt).point,Ur=Ae.sub(yr);return Ae.add(Ur._mult(it/Ur.mag()))}function Nt(wt,q,Ae){const it=q.projectionCache;if(it.projections[wt])return it.projections[wt];const ot=new u.P(q.lineVertexArray.getx(wt),q.lineVertexArray.gety(wt)),bt=lr(ot.x,ot.y,q);if(bt.signedDistanceFromCamera>0)return it.projections[wt]=bt.point,it.anyProjectionOccluded=it.anyProjectionOccluded||bt.isOccluded,bt.point;const ar=wt-Ae.direction;return(function(yr,Ur,ln,Cn,Pn){return mt(yr,Ur,ln,Cn,void 0,Pn)})(Ae.distanceFromAnchor===0?q.tileAnchorPoint:new u.P(q.lineVertexArray.getx(ar),q.lineVertexArray.gety(ar)),ot,Ae.previousVertex,Ae.absOffsetX-Ae.distanceFromAnchor+1,q)}function lr(wt,q,Ae){const it=wt+Ae.translation[0],ot=q+Ae.translation[1];let bt;return!Ae.pitchWithMap&&Ae.projection.useSpecialProjectionForSymbols?(bt=Ae.projection.projectTileCoordinates(it,ot,Ae.unwrappedTileID,Ae.getElevation),bt.point.x=(.5*bt.point.x+.5)*Ae.width,bt.point.y=(.5*-bt.point.y+.5)*Ae.height):(bt=mr(it,ot,Ae.labelPlaneMatrix,Ae.getElevation),bt.isOccluded=!1),bt}function br(wt,q,Ae){return wt._unit()._perp()._mult(q*Ae)}function Or(wt,q,Ae,it,ot,bt,ar,yr,Ur){if(yr.projectionCache.offsets[wt])return yr.projectionCache.offsets[wt];const ln=Ae.add(q);if(wt+Ur.direction<it||wt+Ur.direction>=ot)return yr.projectionCache.offsets[wt]=ln,ln;const Cn=Nt(wt+Ur.direction,yr,Ur),Pn=br(Cn.sub(Ae),ar,Ur.direction),vi=Ae.add(Pn),Ui=Cn.add(Pn);return yr.projectionCache.offsets[wt]=u.ak(bt,ln,vi,Ui)||ln,yr.projectionCache.offsets[wt]}function tn(wt,q,Ae,it,ot,bt,ar,yr,Ur){const ln=it?wt-q:wt+q;let Cn=ln>0?1:-1,Pn=0;it&&(Cn*=-1,Pn=Math.PI),Cn<0&&(Pn+=Math.PI);let vi,Ui=Cn>0?bt+ot:bt+ot+1;yr.projectionCache.cachedAnchorPoint?vi=yr.projectionCache.cachedAnchorPoint:(vi=lr(yr.tileAnchorPoint.x,yr.tileAnchorPoint.y,yr).point,yr.projectionCache.cachedAnchorPoint=vi);let kt,zt,Qt=vi,cr=vi,Sr=0,gr=0;const Nr=Math.abs(ln),vn=[];let An;for(;Sr+gr<=Nr;){if(Ui+=Cn,Ui<bt||Ui>=ar)return null;Sr+=gr,cr=Qt,zt=kt;const ki={absOffsetX:Nr,direction:Cn,distanceFromAnchor:Sr,previousVertex:cr};if(Qt=Nt(Ui,yr,ki),Ae===0)vn.push(cr),An=Qt.sub(cr);else{let ra;const oa=Qt.sub(cr);ra=oa.mag()===0?br(Nt(Ui+Cn,yr,ki).sub(Qt),Ae,Cn):br(oa,Ae,Cn),zt||(zt=cr.add(ra)),kt=Or(Ui,ra,Qt,bt,ar,zt,Ae,yr,ki),vn.push(zt),An=kt.sub(zt)}gr=An.mag()}const Ln=An._mult((Nr-Sr)/gr)._add(zt||cr),ai=Pn+Math.atan2(Qt.y-cr.y,Qt.x-cr.x);return vn.push(Ln),{point:Ln,angle:Ur?ai:0,path:vn}}const Jr=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function dn(wt,q){for(let Ae=0;Ae<wt;Ae++){const it=q.length;q.resize(it+4),q.float32.set(Jr,3*it)}}function on(wt,q,Ae){const it=q[0],ot=q[1];return wt[0]=Ae[0]*it+Ae[4]*ot+Ae[12],wt[1]=Ae[1]*it+Ae[5]*ot+Ae[13],wt[3]=Ae[3]*it+Ae[7]*ot+Ae[15],wt}const Nn=100;class Wi{constructor(q,Ae,it=new ci(q.width+200,q.height+200,25),ot=new ci(q.width+200,q.height+200,25)){this.transform=q,this.mapProjection=Ae,this.grid=it,this.ignoredGrid=ot,this.pitchFactor=Math.cos(q._pitch)*q.cameraToCenterDistance,this.screenRightBoundary=q.width+Nn,this.screenBottomBoundary=q.height+Nn,this.gridRightBoundary=q.width+200,this.gridBottomBoundary=q.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(q,Ae,it,ot,bt,ar,yr,Ur,ln,Cn,Pn){const vi=q.anchorPointX+Ur[0],Ui=q.anchorPointY+Ur[1],kt=this.projectAndGetPerspectiveRatio(ot,vi,Ui,bt,Cn),zt=it*kt.perspectiveRatio;let Qt;if(ar||yr)Qt=this._projectCollisionBox(q,zt,ot,bt,ar,yr,Ur,kt,Cn,Pn);else{const vn=kt.point.x+(Pn?Pn.x*zt:0),An=kt.point.y+(Pn?Pn.y*zt:0);Qt={allPointsOccluded:!1,box:[vn+q.x1*zt,An+q.y1*zt,vn+q.x2*zt,An+q.y2*zt]}}const[cr,Sr,gr,Nr]=Qt.box;return this.mapProjection.useSpecialProjectionForSymbols&&(ar?Qt.allPointsOccluded:this.mapProjection.isOccluded(vi,Ui,bt))||kt.perspectiveRatio<this.perspectiveRatioCutoff||!this.isInsideGrid(cr,Sr,gr,Nr)||Ae!=="always"&&this.grid.hitTest(cr,Sr,gr,Nr,Ae,ln)?{box:[cr,Sr,gr,Nr],placeable:!1,offscreen:!1}:{box:[cr,Sr,gr,Nr],placeable:!0,offscreen:this.isOffscreen(cr,Sr,gr,Nr)}}placeCollisionCircles(q,Ae,it,ot,bt,ar,yr,Ur,ln,Cn,Pn,vi,Ui,kt,zt,Qt){const cr=[],Sr=new u.P(Ae.anchorX,Ae.anchorY),gr=this.getPerspectiveRatio(ar,Sr.x,Sr.y,yr,Qt),Nr=(Pn?bt/gr:bt*gr)/u.ap,vn={getElevation:Qt,labelPlaneMatrix:Ur,lineVertexArray:it,pitchWithMap:Pn,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},projection:this.mapProjection,tileAnchorPoint:Sr,unwrappedTileID:yr,width:this.transform.width,height:this.transform.height,translation:zt},An=je(Nr,ot,Ae.lineOffsetX*Nr,Ae.lineOffsetY*Nr,!1,Ae,!1,vn);let Ln=!1,ai=!1,ki=!0;if(An){const ra=.5*Ui*gr+kt,oa=new u.P(-100,-100),Ma=new u.P(this.screenRightBoundary,this.screenBottomBoundary),mo=new kn,ns=An.first,$o=An.last;let as=[];for(let Fl=ns.path.length-1;Fl>=1;Fl--)as.push(ns.path[Fl]);for(let Fl=1;Fl<$o.path.length;Fl++)as.push($o.path[Fl]);const fl=2.5*ra;if(ln){const Fl=this.projectPathToScreenSpace(as,vn,ln);as=Fl.some(Du=>Du.signedDistanceFromCamera<=0)?[]:Fl.map(Du=>Du.point)}let Zl=[];if(as.length>0){const Fl=as[0].clone(),Du=as[0].clone();for(let qc=1;qc<as.length;qc++)Fl.x=Math.min(Fl.x,as[qc].x),Fl.y=Math.min(Fl.y,as[qc].y),Du.x=Math.max(Du.x,as[qc].x),Du.y=Math.max(Du.y,as[qc].y);Zl=Fl.x>=oa.x&&Du.x<=Ma.x&&Fl.y>=oa.y&&Du.y<=Ma.y?[as]:Du.x<oa.x||Fl.x>Ma.x||Du.y<oa.y||Fl.y>Ma.y?[]:u.al([as],oa.x,oa.y,Ma.x,Ma.y)}for(const Fl of Zl){mo.reset(Fl,.25*ra);let Du=0;Du=mo.length<=.5*ra?1:Math.ceil(mo.paddedLength/fl)+1;for(let qc=0;qc<Du;qc++){const Gc=qc/Math.max(Du-1,1),_c=mo.lerp(Gc),ef=_c.x+Nn,Xd=_c.y+Nn;cr.push(ef,Xd,ra,0);const kd=ef-ra,Ec=Xd-ra,Ac=ef+ra,Ih=Xd+ra;if(ki=ki&&this.isOffscreen(kd,Ec,Ac,Ih),ai=ai||this.isInsideGrid(kd,Ec,Ac,Ih),q!=="always"&&this.grid.hitTestCircle(ef,Xd,ra,q,vi)&&(Ln=!0,!Cn))return{circles:[],offscreen:!1,collisionDetected:Ln}}}}return{circles:!Cn&&Ln||!ai||gr<this.perspectiveRatioCutoff?[]:cr,offscreen:ki,collisionDetected:Ln}}projectPathToScreenSpace(q,Ae,it){return q.map(ot=>mr(ot.x,ot.y,it,Ae.getElevation))}queryRenderedSymbols(q){if(q.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};const Ae=[];let it=1/0,ot=1/0,bt=-1/0,ar=-1/0;for(const Cn of q){const Pn=new u.P(Cn.x+Nn,Cn.y+Nn);it=Math.min(it,Pn.x),ot=Math.min(ot,Pn.y),bt=Math.max(bt,Pn.x),ar=Math.max(ar,Pn.y),Ae.push(Pn)}const yr=this.grid.query(it,ot,bt,ar).concat(this.ignoredGrid.query(it,ot,bt,ar)),Ur={},ln={};for(const Cn of yr){const Pn=Cn.key;if(Ur[Pn.bucketInstanceId]===void 0&&(Ur[Pn.bucketInstanceId]={}),Ur[Pn.bucketInstanceId][Pn.featureIndex])continue;const vi=[new u.P(Cn.x1,Cn.y1),new u.P(Cn.x2,Cn.y1),new u.P(Cn.x2,Cn.y2),new u.P(Cn.x1,Cn.y2)];u.am(Ae,vi)&&(Ur[Pn.bucketInstanceId][Pn.featureIndex]=!0,ln[Pn.bucketInstanceId]===void 0&&(ln[Pn.bucketInstanceId]=[]),ln[Pn.bucketInstanceId].push(Pn.featureIndex))}return ln}insertCollisionBox(q,Ae,it,ot,bt,ar){(it?this.ignoredGrid:this.grid).insert({bucketInstanceId:ot,featureIndex:bt,collisionGroupID:ar,overlapMode:Ae},q[0],q[1],q[2],q[3])}insertCollisionCircles(q,Ae,it,ot,bt,ar){const yr=it?this.ignoredGrid:this.grid,Ur={bucketInstanceId:ot,featureIndex:bt,collisionGroupID:ar,overlapMode:Ae};for(let ln=0;ln<q.length;ln+=4)yr.insertCircle(Ur,q[ln],q[ln+1],q[ln+2])}projectAndGetPerspectiveRatio(q,Ae,it,ot,bt){let ar;bt?(ar=[Ae,it,bt(Ae,it),1],u.af(ar,ar,q)):(ar=[Ae,it,0,1],on(ar,ar,q));const yr=ar[3];return{point:new u.P((ar[0]/yr+1)/2*this.transform.width+Nn,(-ar[1]/yr+1)/2*this.transform.height+Nn),perspectiveRatio:.5+this.transform.cameraToCenterDistance/yr*.5,isOccluded:!1,signedDistanceFromCamera:yr}}getPerspectiveRatio(q,Ae,it,ot,bt){const ar=this.mapProjection.useSpecialProjectionForSymbols?this.mapProjection.projectTileCoordinates(Ae,it,ot,bt):mr(Ae,it,q,bt);return .5+this.transform.cameraToCenterDistance/ar.signedDistanceFromCamera*.5}isOffscreen(q,Ae,it,ot){return it<Nn||q>=this.screenRightBoundary||ot<Nn||Ae>this.screenBottomBoundary}isInsideGrid(q,Ae,it,ot){return it>=0&&q<this.gridRightBoundary&&ot>=0&&Ae<this.gridBottomBoundary}getViewportMatrix(){const q=u.an([]);return u.J(q,q,[-100,-100,0]),q}_projectCollisionBox(q,Ae,it,ot,bt,ar,yr,Ur,ln,Cn){let Pn=new u.P(1,0),vi=new u.P(0,1);const Ui=new u.P(q.anchorPointX+yr[0],q.anchorPointY+yr[1]);if(ar&&!bt){const ki=this.projectAndGetPerspectiveRatio(it,Ui.x+1,Ui.y,ot,ln).point.sub(Ur.point).unit(),ra=Math.atan(ki.y/ki.x)+(ki.x<0?Math.PI:0),oa=Math.sin(ra),Ma=Math.cos(ra);Pn=new u.P(Ma,oa),vi=new u.P(-oa,Ma)}else if(!ar&&bt){const ki=-this.transform.angle,ra=Math.sin(ki),oa=Math.cos(ki);Pn=new u.P(oa,ra),vi=new u.P(-ra,oa)}let kt=Ur.point,zt=Ae;if(bt){kt=Ui;const ki=this.transform.zoom-Math.floor(this.transform.zoom);zt=Math.pow(2,-ki),zt*=this.mapProjection.getPitchedTextCorrection(this.transform,Ui,ot),Cn||(zt*=u.ac(.5+Ur.signedDistanceFromCamera/this.transform.cameraToCenterDistance*.5,0,4))}Cn&&(kt=kt.add(Pn.mult(Cn.x*zt)).add(vi.mult(Cn.y*zt)));const Qt=q.x1*zt,cr=q.x2*zt,Sr=(Qt+cr)/2,gr=q.y1*zt,Nr=q.y2*zt,vn=(gr+Nr)/2,An=[{offsetX:Qt,offsetY:gr},{offsetX:Sr,offsetY:gr},{offsetX:cr,offsetY:gr},{offsetX:cr,offsetY:vn},{offsetX:cr,offsetY:Nr},{offsetX:Sr,offsetY:Nr},{offsetX:Qt,offsetY:Nr},{offsetX:Qt,offsetY:vn}];let Ln=[];for(const{offsetX:ki,offsetY:ra}of An)Ln.push(new u.P(kt.x+Pn.x*ki+vi.x*ra,kt.y+Pn.y*ki+vi.y*ra));let ai=!1;if(bt){const ki=Ln.map(ra=>this.projectAndGetPerspectiveRatio(it,ra.x,ra.y,ot,ln));ai=ki.some(ra=>!ra.isOccluded),Ln=ki.map(ra=>ra.point)}else ai=!0;return{box:u.ao(Ln),allPointsOccluded:!ai}}}function Oa(wt,q,Ae){return q*(u.X/(wt.tileSize*Math.pow(2,Ae-wt.tileID.overscaledZ)))}class Da{constructor(q,Ae,it,ot){this.opacity=q?Math.max(0,Math.min(1,q.opacity+(q.placed?Ae:-Ae))):ot&&it?1:0,this.placed=it}isHidden(){return this.opacity===0&&!this.placed}}class Aa{constructor(q,Ae,it,ot,bt){this.text=new Da(q?q.text:null,Ae,it,bt),this.icon=new Da(q?q.icon:null,Ae,ot,bt)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Ka{constructor(q,Ae,it){this.text=q,this.icon=Ae,this.skipFade=it}}class Sa{constructor(){this.invProjMatrix=u.H(),this.viewportMatrix=u.H(),this.circles=[]}}class no{constructor(q,Ae,it,ot,bt){this.bucketInstanceId=q,this.featureIndex=Ae,this.sourceLayerIndex=it,this.bucketIndex=ot,this.tileID=bt}}class Fo{constructor(q){this.crossSourceCollisions=q,this.maxGroupID=0,this.collisionGroups={}}get(q){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[q]){const Ae=++this.maxGroupID;this.collisionGroups[q]={ID:Ae,predicate:it=>it.collisionGroupID===Ae}}return this.collisionGroups[q]}}function an(wt,q,Ae,it,ot){const{horizontalAlign:bt,verticalAlign:ar}=u.au(wt);return new u.P(-(bt-.5)*q+it[0]*ot,-(ar-.5)*Ae+it[1]*ot)}class Hr{constructor(q,Ae,it,ot,bt,ar){this.transform=q.clone(),this.terrain=it,this.collisionIndex=new Wi(this.transform,Ae),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=ot,this.retainedQueryData={},this.collisionGroups=new Fo(bt),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=ar,ar&&(ar.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(q){const Ae=this.terrain;return Ae?(it,ot)=>Ae.getElevation(q,it,ot):null}getBucketParts(q,Ae,it,ot){const bt=it.getBucket(Ae),ar=it.latestFeatureIndex;if(!bt||!ar||Ae.id!==bt.layerIds[0])return;const yr=it.collisionBoxArray,Ur=bt.layers[0].layout,ln=bt.layers[0].paint,Cn=Math.pow(2,this.transform.zoom-it.tileID.overscaledZ),Pn=it.tileSize/u.X,vi=it.tileID.toUnwrapped(),Ui=this.transform.calculatePosMatrix(vi),kt=Ur.get("text-pitch-alignment")==="map",zt=Ur.get("text-rotation-alignment")==="map",Qt=Oa(it,1,this.transform.zoom),cr=this.collisionIndex.mapProjection.translatePosition(this.transform,it,ln.get("text-translate"),ln.get("text-translate-anchor")),Sr=this.collisionIndex.mapProjection.translatePosition(this.transform,it,ln.get("icon-translate"),ln.get("icon-translate-anchor")),gr=In(Ui,kt,zt,this.transform,Qt);let Nr=null;if(kt){const An=Gn(Ui,kt,zt,this.transform,Qt);Nr=u.L([],this.transform.labelPlaneMatrix,An)}this.retainedQueryData[bt.bucketInstanceId]=new no(bt.bucketInstanceId,ar,bt.sourceLayerIndex,bt.index,it.tileID);const vn={bucket:bt,layout:Ur,translationText:cr,translationIcon:Sr,posMatrix:Ui,unwrappedTileID:vi,textLabelPlaneMatrix:gr,labelToScreenMatrix:Nr,scale:Cn,textPixelRatio:Pn,holdingForFade:it.holdingForFade(),collisionBoxArray:yr,partiallyEvaluatedTextSize:u.ag(bt.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(bt.sourceID)};if(ot)for(const An of bt.sortKeyRanges){const{sortKey:Ln,symbolInstanceStart:ai,symbolInstanceEnd:ki}=An;q.push({sortKey:Ln,symbolInstanceStart:ai,symbolInstanceEnd:ki,parameters:vn})}else q.push({symbolInstanceStart:0,symbolInstanceEnd:bt.symbolInstances.length,parameters:vn})}attemptAnchorPlacement(q,Ae,it,ot,bt,ar,yr,Ur,ln,Cn,Pn,vi,Ui,kt,zt,Qt,cr,Sr,gr){const Nr=u.aq[q.textAnchor],vn=[q.textOffset0,q.textOffset1],An=an(Nr,it,ot,vn,bt),Ln=this.collisionIndex.placeCollisionBox(Ae,vi,Ur,ln,Cn,yr,ar,Qt,Pn.predicate,gr,An);if((!Sr||this.collisionIndex.placeCollisionBox(Sr,vi,Ur,ln,Cn,yr,ar,cr,Pn.predicate,gr,An).placeable)&&Ln.placeable){let ai;if(this.prevPlacement&&this.prevPlacement.variableOffsets[Ui.crossTileID]&&this.prevPlacement.placements[Ui.crossTileID]&&this.prevPlacement.placements[Ui.crossTileID].text&&(ai=this.prevPlacement.variableOffsets[Ui.crossTileID].anchor),Ui.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[Ui.crossTileID]={textOffset:vn,width:it,height:ot,anchor:Nr,textBoxScale:bt,prevAnchor:ai},this.markUsedJustification(kt,Nr,Ui,zt),kt.allowVerticalPlacement&&(this.markUsedOrientation(kt,zt,Ui),this.placedOrientations[Ui.crossTileID]=zt),{shift:An,placedGlyphBoxes:Ln}}}placeLayerBucketPart(q,Ae,it){const{bucket:ot,layout:bt,translationText:ar,translationIcon:yr,posMatrix:Ur,unwrappedTileID:ln,textLabelPlaneMatrix:Cn,labelToScreenMatrix:Pn,textPixelRatio:vi,holdingForFade:Ui,collisionBoxArray:kt,partiallyEvaluatedTextSize:zt,collisionGroup:Qt}=q.parameters,cr=bt.get("text-optional"),Sr=bt.get("icon-optional"),gr=u.ar(bt,"text-overlap","text-allow-overlap"),Nr=gr==="always",vn=u.ar(bt,"icon-overlap","icon-allow-overlap"),An=vn==="always",Ln=bt.get("text-rotation-alignment")==="map",ai=bt.get("text-pitch-alignment")==="map",ki=bt.get("icon-text-fit")!=="none",ra=bt.get("symbol-z-order")==="viewport-y",oa=Nr&&(An||!ot.hasIconData()||Sr),Ma=An&&(Nr||!ot.hasTextData()||cr);!ot.collisionArrays&&kt&&ot.deserializeCollisionBoxes(kt);const mo=this._getTerrainElevationFunc(this.retainedQueryData[ot.bucketInstanceId].tileID),ns=($o,as,fl)=>{var Zl,Fl;if(Ae[$o.crossTileID])return;if(Ui)return void(this.placements[$o.crossTileID]=new Ka(!1,!1,!1));let Du=!1,qc=!1,Gc=!0,_c=null,ef={box:null,placeable:!1,offscreen:null},Xd={placeable:!1},kd=null,Ec=null,Ac=null,Ih=0,Ep=0,Iv=0;as.textFeatureIndex?Ih=as.textFeatureIndex:$o.useRuntimeCollisionCircles&&(Ih=$o.featureIndex),as.verticalTextFeatureIndex&&(Ep=as.verticalTextFeatureIndex);const $e=as.textBox;if($e){const pr=yn=>{let li=u.ah.horizontal;if(ot.allowVerticalPlacement&&!yn&&this.prevPlacement){const ni=this.prevPlacement.placedOrientations[$o.crossTileID];ni&&(this.placedOrientations[$o.crossTileID]=ni,li=ni,this.markUsedOrientation(ot,li,$o))}return li},_r=(yn,li)=>{if(ot.allowVerticalPlacement&&$o.numVerticalGlyphVertices>0&&as.verticalTextBox){for(const ni of ot.writingModes)if(ni===u.ah.vertical?(ef=li(),Xd=ef):ef=yn(),ef&&ef.placeable)break}else ef=yn()},Yr=$o.textAnchorOffsetStartIndex,Wr=$o.textAnchorOffsetEndIndex;if(Wr===Yr){const yn=(li,ni)=>{const Pi=this.collisionIndex.placeCollisionBox(li,gr,vi,Ur,ln,ai,Ln,ar,Qt.predicate,mo);return Pi&&Pi.placeable&&(this.markUsedOrientation(ot,ni,$o),this.placedOrientations[$o.crossTileID]=ni),Pi};_r(()=>yn($e,u.ah.horizontal),()=>{const li=as.verticalTextBox;return ot.allowVerticalPlacement&&$o.numVerticalGlyphVertices>0&&li?yn(li,u.ah.vertical):{box:null,offscreen:null}}),pr(ef&&ef.placeable)}else{let yn=u.aq[(Fl=(Zl=this.prevPlacement)===null||Zl===void 0?void 0:Zl.variableOffsets[$o.crossTileID])===null||Fl===void 0?void 0:Fl.anchor];const li=(Pi,Ji,na)=>{const _o=Pi.x2-Pi.x1,ca=Pi.y2-Pi.y1,La=$o.textBoxScale,qa=ki&&vn==="never"?Ji:null;let bo=null,So=gr==="never"?1:2,Va="never";yn&&So++;for(let os=0;os<So;os++){for(let ul=Yr;ul<Wr;ul++){const Us=ot.textAnchorOffsets.get(ul);if(yn&&Us.textAnchor!==yn)continue;const rl=this.attemptAnchorPlacement(Us,Pi,_o,ca,La,Ln,ai,vi,Ur,ln,Qt,Va,$o,ot,na,ar,yr,qa,mo);if(rl&&(bo=rl.placedGlyphBoxes,bo&&bo.placeable))return Du=!0,_c=rl.shift,bo}yn?yn=null:Va=gr}return it&&!bo&&(bo={box:this.collisionIndex.placeCollisionBox($e,"always",vi,Ur,ln,ai,Ln,ar,Qt.predicate,mo,new u.P(0,0)).box,offscreen:!1,placeable:!1}),bo};_r(()=>li($e,as.iconBox,u.ah.horizontal),()=>{const Pi=as.verticalTextBox;return ot.allowVerticalPlacement&&(!ef||!ef.placeable)&&$o.numVerticalGlyphVertices>0&&Pi?li(Pi,as.verticalIconBox,u.ah.vertical):{box:null,occluded:!0,offscreen:null}}),ef&&(Du=ef.placeable,Gc=ef.offscreen);const ni=pr(ef&&ef.placeable);if(!Du&&this.prevPlacement){const Pi=this.prevPlacement.variableOffsets[$o.crossTileID];Pi&&(this.variableOffsets[$o.crossTileID]=Pi,this.markUsedJustification(ot,Pi.anchor,$o,ni))}}}if(kd=ef,Du=kd&&kd.placeable,Gc=kd&&kd.offscreen,$o.useRuntimeCollisionCircles){const pr=ot.text.placedSymbolArray.get($o.centerJustifiedTextSymbolIndex),_r=u.ai(ot.textSizeData,zt,pr),Yr=bt.get("text-padding");Ec=this.collisionIndex.placeCollisionCircles(gr,pr,ot.lineVertexArray,ot.glyphOffsetArray,_r,Ur,ln,Cn,Pn,it,ai,Qt.predicate,$o.collisionCircleDiameter,Yr,ar,mo),Ec.circles.length&&Ec.collisionDetected&&!it&&u.w("Collisions detected, but collision boxes are not shown"),Du=Nr||Ec.circles.length>0&&!Ec.collisionDetected,Gc=Gc&&Ec.offscreen}if(as.iconFeatureIndex&&(Iv=as.iconFeatureIndex),as.iconBox){const pr=_r=>this.collisionIndex.placeCollisionBox(_r,vn,vi,Ur,ln,ai,Ln,yr,Qt.predicate,mo,ki&&_c?_c:void 0);Xd&&Xd.placeable&&as.verticalIconBox?(Ac=pr(as.verticalIconBox),qc=Ac.placeable):(Ac=pr(as.iconBox),qc=Ac.placeable),Gc=Gc&&Ac.offscreen}const vt=cr||$o.numHorizontalGlyphVertices===0&&$o.numVerticalGlyphVertices===0,Bt=Sr||$o.numIconVertices===0;vt||Bt?Bt?vt||(qc=qc&&Du):Du=qc&&Du:qc=Du=qc&&Du;const fr=qc&&Ac.placeable;if(Du&&kd.placeable&&this.collisionIndex.insertCollisionBox(kd.box,gr,bt.get("text-ignore-placement"),ot.bucketInstanceId,Xd&&Xd.placeable&&Ep?Ep:Ih,Qt.ID),fr&&this.collisionIndex.insertCollisionBox(Ac.box,vn,bt.get("icon-ignore-placement"),ot.bucketInstanceId,Iv,Qt.ID),Ec&&Du&&this.collisionIndex.insertCollisionCircles(Ec.circles,gr,bt.get("text-ignore-placement"),ot.bucketInstanceId,Ih,Qt.ID),it&&this.storeCollisionData(ot.bucketInstanceId,fl,as,kd,Ac,Ec),$o.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(ot.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[$o.crossTileID]=new Ka(Du||oa,qc||Ma,Gc||ot.justReloaded),Ae[$o.crossTileID]=!0};if(ra){if(q.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");const $o=ot.getSortedSymbolIndexes(this.transform.angle);for(let as=$o.length-1;as>=0;--as){const fl=$o[as];ns(ot.symbolInstances.get(fl),ot.collisionArrays[fl],fl)}}else for(let $o=q.symbolInstanceStart;$o<q.symbolInstanceEnd;$o++)ns(ot.symbolInstances.get($o),ot.collisionArrays[$o],$o);if(it&&ot.bucketInstanceId in this.collisionCircleArrays){const $o=this.collisionCircleArrays[ot.bucketInstanceId];u.as($o.invProjMatrix,Ur),$o.viewportMatrix=this.collisionIndex.getViewportMatrix()}ot.justReloaded=!1}storeCollisionData(q,Ae,it,ot,bt,ar){if(it.textBox||it.iconBox){let yr,Ur;this.collisionBoxArrays.has(q)?yr=this.collisionBoxArrays.get(q):(yr=new Map,this.collisionBoxArrays.set(q,yr)),yr.has(Ae)?Ur=yr.get(Ae):(Ur={text:null,icon:null},yr.set(Ae,Ur)),it.textBox&&(Ur.text=ot.box),it.iconBox&&(Ur.icon=bt.box)}if(ar){let yr=this.collisionCircleArrays[q];yr===void 0&&(yr=this.collisionCircleArrays[q]=new Sa);for(let Ur=0;Ur<ar.circles.length;Ur+=4)yr.circles.push(ar.circles[Ur+0]),yr.circles.push(ar.circles[Ur+1]),yr.circles.push(ar.circles[Ur+2]),yr.circles.push(ar.collisionDetected?1:0)}}markUsedJustification(q,Ae,it,ot){let bt;bt=ot===u.ah.vertical?it.verticalPlacedTextSymbolIndex:{left:it.leftJustifiedTextSymbolIndex,center:it.centerJustifiedTextSymbolIndex,right:it.rightJustifiedTextSymbolIndex}[u.at(Ae)];const ar=[it.leftJustifiedTextSymbolIndex,it.centerJustifiedTextSymbolIndex,it.rightJustifiedTextSymbolIndex,it.verticalPlacedTextSymbolIndex];for(const yr of ar)yr>=0&&(q.text.placedSymbolArray.get(yr).crossTileID=bt>=0&&yr!==bt?0:it.crossTileID)}markUsedOrientation(q,Ae,it){const ot=Ae===u.ah.horizontal||Ae===u.ah.horizontalOnly?Ae:0,bt=Ae===u.ah.vertical?Ae:0,ar=[it.leftJustifiedTextSymbolIndex,it.centerJustifiedTextSymbolIndex,it.rightJustifiedTextSymbolIndex];for(const yr of ar)q.text.placedSymbolArray.get(yr).placedOrientation=ot;it.verticalPlacedTextSymbolIndex&&(q.text.placedSymbolArray.get(it.verticalPlacedTextSymbolIndex).placedOrientation=bt)}commit(q){this.commitTime=q,this.zoomAtLastRecencyCheck=this.transform.zoom;const Ae=this.prevPlacement;let it=!1;this.prevZoomAdjustment=Ae?Ae.zoomAdjustment(this.transform.zoom):0;const ot=Ae?Ae.symbolFadeChange(q):1,bt=Ae?Ae.opacities:{},ar=Ae?Ae.variableOffsets:{},yr=Ae?Ae.placedOrientations:{};for(const Ur in this.placements){const ln=this.placements[Ur],Cn=bt[Ur];Cn?(this.opacities[Ur]=new Aa(Cn,ot,ln.text,ln.icon),it=it||ln.text!==Cn.text.placed||ln.icon!==Cn.icon.placed):(this.opacities[Ur]=new Aa(null,ot,ln.text,ln.icon,ln.skipFade),it=it||ln.text||ln.icon)}for(const Ur in bt){const ln=bt[Ur];if(!this.opacities[Ur]){const Cn=new Aa(ln,ot,!1,!1);Cn.isHidden()||(this.opacities[Ur]=Cn,it=it||ln.text.placed||ln.icon.placed)}}for(const Ur in ar)this.variableOffsets[Ur]||!this.opacities[Ur]||this.opacities[Ur].isHidden()||(this.variableOffsets[Ur]=ar[Ur]);for(const Ur in yr)this.placedOrientations[Ur]||!this.opacities[Ur]||this.opacities[Ur].isHidden()||(this.placedOrientations[Ur]=yr[Ur]);if(Ae&&Ae.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");it?this.lastPlacementChangeTime=q:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=Ae?Ae.lastPlacementChangeTime:q)}updateLayerOpacities(q,Ae){const it={};for(const ot of Ae){const bt=ot.getBucket(q);bt&&ot.latestFeatureIndex&&q.id===bt.layerIds[0]&&this.updateBucketOpacities(bt,ot.tileID,it,ot.collisionBoxArray)}}updateBucketOpacities(q,Ae,it,ot){q.hasTextData()&&(q.text.opacityVertexArray.clear(),q.text.hasVisibleVertices=!1),q.hasIconData()&&(q.icon.opacityVertexArray.clear(),q.icon.hasVisibleVertices=!1),q.hasIconCollisionBoxData()&&q.iconCollisionBox.collisionVertexArray.clear(),q.hasTextCollisionBoxData()&&q.textCollisionBox.collisionVertexArray.clear();const bt=q.layers[0],ar=bt.layout,yr=new Aa(null,0,!1,!1,!0),Ur=ar.get("text-allow-overlap"),ln=ar.get("icon-allow-overlap"),Cn=bt._unevaluatedLayout.hasValue("text-variable-anchor")||bt._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Pn=ar.get("text-rotation-alignment")==="map",vi=ar.get("text-pitch-alignment")==="map",Ui=ar.get("icon-text-fit")!=="none",kt=new Aa(null,0,Ur&&(ln||!q.hasIconData()||ar.get("icon-optional")),ln&&(Ur||!q.hasTextData()||ar.get("text-optional")),!0);!q.collisionArrays&&ot&&(q.hasIconCollisionBoxData()||q.hasTextCollisionBoxData())&&q.deserializeCollisionBoxes(ot);const zt=(cr,Sr,gr)=>{for(let Nr=0;Nr<Sr/4;Nr++)cr.opacityVertexArray.emplaceBack(gr);cr.hasVisibleVertices=cr.hasVisibleVertices||gr!==oo},Qt=this.collisionBoxArrays.get(q.bucketInstanceId);for(let cr=0;cr<q.symbolInstances.length;cr++){const Sr=q.symbolInstances.get(cr),{numHorizontalGlyphVertices:gr,numVerticalGlyphVertices:Nr,crossTileID:vn}=Sr;let An=this.opacities[vn];it[vn]?An=yr:An||(An=kt,this.opacities[vn]=An),it[vn]=!0;const Ln=Sr.numIconVertices>0,ai=this.placedOrientations[Sr.crossTileID],ki=ai===u.ah.vertical,ra=ai===u.ah.horizontal||ai===u.ah.horizontalOnly;if(gr>0||Nr>0){const Ma=ro(An.text);zt(q.text,gr,ki?oo:Ma),zt(q.text,Nr,ra?oo:Ma);const mo=An.text.isHidden();[Sr.rightJustifiedTextSymbolIndex,Sr.centerJustifiedTextSymbolIndex,Sr.leftJustifiedTextSymbolIndex].forEach(as=>{as>=0&&(q.text.placedSymbolArray.get(as).hidden=mo||ki?1:0)}),Sr.verticalPlacedTextSymbolIndex>=0&&(q.text.placedSymbolArray.get(Sr.verticalPlacedTextSymbolIndex).hidden=mo||ra?1:0);const ns=this.variableOffsets[Sr.crossTileID];ns&&this.markUsedJustification(q,ns.anchor,Sr,ai);const $o=this.placedOrientations[Sr.crossTileID];$o&&(this.markUsedJustification(q,"left",Sr,$o),this.markUsedOrientation(q,$o,Sr))}if(Ln){const Ma=ro(An.icon),mo=!(Ui&&Sr.verticalPlacedIconSymbolIndex&&ki);Sr.placedIconSymbolIndex>=0&&(zt(q.icon,Sr.numIconVertices,mo?Ma:oo),q.icon.placedSymbolArray.get(Sr.placedIconSymbolIndex).hidden=An.icon.isHidden()),Sr.verticalPlacedIconSymbolIndex>=0&&(zt(q.icon,Sr.numVerticalIconVertices,mo?oo:Ma),q.icon.placedSymbolArray.get(Sr.verticalPlacedIconSymbolIndex).hidden=An.icon.isHidden())}const oa=Qt&&Qt.has(cr)?Qt.get(cr):{text:null,icon:null};if(q.hasIconCollisionBoxData()||q.hasTextCollisionBoxData()){const Ma=q.collisionArrays[cr];if(Ma){let mo=new u.P(0,0);if(Ma.textBox||Ma.verticalTextBox){let ns=!0;if(Cn){const $o=this.variableOffsets[vn];$o?(mo=an($o.anchor,$o.width,$o.height,$o.textOffset,$o.textBoxScale),Pn&&mo._rotate(vi?this.transform.angle:-this.transform.angle)):ns=!1}if(Ma.textBox||Ma.verticalTextBox){let $o;Ma.textBox&&($o=ki),Ma.verticalTextBox&&($o=ra),nn(q.textCollisionBox.collisionVertexArray,An.text.placed,!ns||$o,oa.text,mo.x,mo.y)}}if(Ma.iconBox||Ma.verticalIconBox){const ns=!!(!ra&&Ma.verticalIconBox);let $o;Ma.iconBox&&($o=ns),Ma.verticalIconBox&&($o=!ns),nn(q.iconCollisionBox.collisionVertexArray,An.icon.placed,$o,oa.icon,Ui?mo.x:0,Ui?mo.y:0)}}}}if(q.sortFeatures(this.transform.angle),this.retainedQueryData[q.bucketInstanceId]&&(this.retainedQueryData[q.bucketInstanceId].featureSortOrder=q.featureSortOrder),q.hasTextData()&&q.text.opacityVertexBuffer&&q.text.opacityVertexBuffer.updateData(q.text.opacityVertexArray),q.hasIconData()&&q.icon.opacityVertexBuffer&&q.icon.opacityVertexBuffer.updateData(q.icon.opacityVertexArray),q.hasIconCollisionBoxData()&&q.iconCollisionBox.collisionVertexBuffer&&q.iconCollisionBox.collisionVertexBuffer.updateData(q.iconCollisionBox.collisionVertexArray),q.hasTextCollisionBoxData()&&q.textCollisionBox.collisionVertexBuffer&&q.textCollisionBox.collisionVertexBuffer.updateData(q.textCollisionBox.collisionVertexArray),q.text.opacityVertexArray.length!==q.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${q.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${q.text.layoutVertexArray.length}) / 4`);if(q.icon.opacityVertexArray.length!==q.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${q.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${q.icon.layoutVertexArray.length}) / 4`);if(q.bucketInstanceId in this.collisionCircleArrays){const cr=this.collisionCircleArrays[q.bucketInstanceId];q.placementInvProjMatrix=cr.invProjMatrix,q.placementViewportMatrix=cr.viewportMatrix,q.collisionCircleArray=cr.circles,delete this.collisionCircleArrays[q.bucketInstanceId]}}symbolFadeChange(q){return this.fadeDuration===0?1:(q-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(q){return Math.max(0,(this.transform.zoom-q)/1.5)}hasTransitions(q){return this.stale||q-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(q,Ae){const it=this.zoomAtLastRecencyCheck===Ae?1-this.zoomAdjustment(Ae):1;return this.zoomAtLastRecencyCheck=Ae,this.commitTime+this.fadeDuration*it>q}setStale(){this.stale=!0}}function nn(wt,q,Ae,it,ot,bt){it&&it.length!==0||(it=[0,0,0,0]);const ar=it[0]-Nn,yr=it[1]-Nn,Ur=it[2]-Nn,ln=it[3]-Nn;wt.emplaceBack(q?1:0,Ae?1:0,ot||0,bt||0,ar,yr),wt.emplaceBack(q?1:0,Ae?1:0,ot||0,bt||0,Ur,yr),wt.emplaceBack(q?1:0,Ae?1:0,ot||0,bt||0,Ur,ln),wt.emplaceBack(q?1:0,Ae?1:0,ot||0,bt||0,ar,ln)}const Kr=Math.pow(2,25),$n=Math.pow(2,24),Ai=Math.pow(2,17),aa=Math.pow(2,16),Ci=Math.pow(2,9),Ta=Math.pow(2,8),Na=Math.pow(2,1);function ro(wt){if(wt.opacity===0&&!wt.placed)return 0;if(wt.opacity===1&&wt.placed)return 4294967295;const q=wt.placed?1:0,Ae=Math.floor(127*wt.opacity);return Ae*Kr+q*$n+Ae*Ai+q*aa+Ae*Ci+q*Ta+Ae*Na+q}const oo=0;function xo(){return{isOccluded:(wt,q,Ae)=>!1,getPitchedTextCorrection:(wt,q,Ae)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates(wt,q,Ae,it){throw new Error("Not implemented.")},translatePosition:(wt,q,Ae,it)=>(function(ot,bt,ar,yr,Ur=!1){if(!ar[0]&&!ar[1])return[0,0];const ln=Ur?yr==="map"?ot.angle:0:yr==="viewport"?-ot.angle:0;if(ln){const Cn=Math.sin(ln),Pn=Math.cos(ln);ar=[ar[0]*Pn-ar[1]*Cn,ar[0]*Cn+ar[1]*Pn]}return[Ur?ar[0]:Oa(bt,ar[0],ot.zoom),Ur?ar[1]:Oa(bt,ar[1],ot.zoom)]})(wt,q,Ae,it),getCircleRadiusCorrection:wt=>1}}class vr{constructor(q){this._sortAcrossTiles=q.layout.get("symbol-z-order")!=="viewport-y"&&!q.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(q,Ae,it,ot,bt){const ar=this._bucketParts;for(;this._currentTileIndex<q.length;)if(Ae.getBucketParts(ar,ot,q[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,bt())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,ar.sort((yr,Ur)=>yr.sortKey-Ur.sortKey));this._currentPartIndex<ar.length;)if(Ae.placeLayerBucketPart(ar[this._currentPartIndex],this._seenCrossTileIDs,it),this._currentPartIndex++,bt())return!0;return!1}}class er{constructor(q,Ae,it,ot,bt,ar,yr,Ur){this.placement=new Hr(q,xo(),Ae,ar,yr,Ur),this._currentPlacementIndex=it.length-1,this._forceFullPlacement=ot,this._showCollisionBoxes=bt,this._done=!1}isDone(){return this._done}continuePlacement(q,Ae,it){const ot=v.now(),bt=()=>!this._forceFullPlacement&&v.now()-ot>2;for(;this._currentPlacementIndex>=0;){const ar=Ae[q[this._currentPlacementIndex]],yr=this.placement.collisionIndex.transform.zoom;if(ar.type==="symbol"&&(!ar.minzoom||ar.minzoom<=yr)&&(!ar.maxzoom||ar.maxzoom>yr)){if(this._inProgressLayer||(this._inProgressLayer=new vr(ar)),this._inProgressLayer.continuePlacement(it[ar.source],this.placement,this._showCollisionBoxes,ar,bt))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(q){return this.placement.commit(q),this.placement}}const si=512/u.X/2;class ei{constructor(q,Ae,it){this.tileID=q,this.bucketInstanceId=it,this._symbolsByKey={};const ot=new Map;for(let bt=0;bt<Ae.length;bt++){const ar=Ae.get(bt),yr=ar.key,Ur=ot.get(yr);Ur?Ur.push(ar):ot.set(yr,[ar])}for(const[bt,ar]of ot){const yr={positions:ar.map(Ur=>({x:Math.floor(Ur.anchorX*si),y:Math.floor(Ur.anchorY*si)})),crossTileIDs:ar.map(Ur=>Ur.crossTileID)};if(yr.positions.length>128){const Ur=new u.av(yr.positions.length,16,Uint16Array);for(const{x:ln,y:Cn}of yr.positions)Ur.add(ln,Cn);Ur.finish(),delete yr.positions,yr.index=Ur}this._symbolsByKey[bt]=yr}}getScaledCoordinates(q,Ae){const{x:it,y:ot,z:bt}=this.tileID.canonical,{x:ar,y:yr,z:Ur}=Ae.canonical,ln=si/Math.pow(2,Ur-bt),Cn=(yr*u.X+q.anchorY)*ln,Pn=ot*u.X*si;return{x:Math.floor((ar*u.X+q.anchorX)*ln-it*u.X*si),y:Math.floor(Cn-Pn)}}findMatches(q,Ae,it){const ot=this.tileID.canonical.z<Ae.canonical.z?1:Math.pow(2,this.tileID.canonical.z-Ae.canonical.z);for(let bt=0;bt<q.length;bt++){const ar=q.get(bt);if(ar.crossTileID)continue;const yr=this._symbolsByKey[ar.key];if(!yr)continue;const Ur=this.getScaledCoordinates(ar,Ae);if(yr.index){const ln=yr.index.range(Ur.x-ot,Ur.y-ot,Ur.x+ot,Ur.y+ot).sort();for(const Cn of ln){const Pn=yr.crossTileIDs[Cn];if(!it[Pn]){it[Pn]=!0,ar.crossTileID=Pn;break}}}else if(yr.positions)for(let ln=0;ln<yr.positions.length;ln++){const Cn=yr.positions[ln],Pn=yr.crossTileIDs[ln];if(Math.abs(Cn.x-Ur.x)<=ot&&Math.abs(Cn.y-Ur.y)<=ot&&!it[Pn]){it[Pn]=!0,ar.crossTileID=Pn;break}}}}getCrossTileIDsLists(){return Object.values(this._symbolsByKey).map(({crossTileIDs:q})=>q)}}class Kn{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class qn{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(q){const Ae=Math.round((q-this.lng)/360);if(Ae!==0)for(const it in this.indexes){const ot=this.indexes[it],bt={};for(const ar in ot){const yr=ot[ar];yr.tileID=yr.tileID.unwrapTo(yr.tileID.wrap+Ae),bt[yr.tileID.key]=yr}this.indexes[it]=bt}this.lng=q}addBucket(q,Ae,it){if(this.indexes[q.overscaledZ]&&this.indexes[q.overscaledZ][q.key]){if(this.indexes[q.overscaledZ][q.key].bucketInstanceId===Ae.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(q.overscaledZ,this.indexes[q.overscaledZ][q.key])}for(let bt=0;bt<Ae.symbolInstances.length;bt++)Ae.symbolInstances.get(bt).crossTileID=0;this.usedCrossTileIDs[q.overscaledZ]||(this.usedCrossTileIDs[q.overscaledZ]={});const ot=this.usedCrossTileIDs[q.overscaledZ];for(const bt in this.indexes){const ar=this.indexes[bt];if(Number(bt)>q.overscaledZ)for(const yr in ar){const Ur=ar[yr];Ur.tileID.isChildOf(q)&&Ur.findMatches(Ae.symbolInstances,q,ot)}else{const yr=ar[q.scaledTo(Number(bt)).key];yr&&yr.findMatches(Ae.symbolInstances,q,ot)}}for(let bt=0;bt<Ae.symbolInstances.length;bt++){const ar=Ae.symbolInstances.get(bt);ar.crossTileID||(ar.crossTileID=it.generate(),ot[ar.crossTileID]=!0)}return this.indexes[q.overscaledZ]===void 0&&(this.indexes[q.overscaledZ]={}),this.indexes[q.overscaledZ][q.key]=new ei(q,Ae.symbolInstances,Ae.bucketInstanceId),!0}removeBucketCrossTileIDs(q,Ae){for(const it of Ae.getCrossTileIDsLists())for(const ot of it)delete this.usedCrossTileIDs[q][ot]}removeStaleBuckets(q){let Ae=!1;for(const it in this.indexes){const ot=this.indexes[it];for(const bt in ot)q[ot[bt].bucketInstanceId]||(this.removeBucketCrossTileIDs(it,ot[bt]),delete ot[bt],Ae=!0)}return Ae}}class pi{constructor(){this.layerIndexes={},this.crossTileIDs=new Kn,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(q,Ae,it){let ot=this.layerIndexes[q.id];ot===void 0&&(ot=this.layerIndexes[q.id]=new qn);let bt=!1;const ar={};ot.handleWrapJump(it);for(const yr of Ae){const Ur=yr.getBucket(q);Ur&&q.id===Ur.layerIds[0]&&(Ur.bucketInstanceId||(Ur.bucketInstanceId=++this.maxBucketInstanceId),ot.addBucket(yr.tileID,Ur,this.crossTileIDs)&&(bt=!0),ar[Ur.bucketInstanceId]=!0)}return ot.removeStaleBuckets(ar)&&(bt=!0),bt}pruneUnusedLayers(q){const Ae={};q.forEach(it=>{Ae[it]=!0});for(const it in this.layerIndexes)Ae[it]||delete this.layerIndexes[it]}}const _i=(wt,q)=>u.t(wt,q&&q.filter(Ae=>Ae.identifier!=="source.canvas")),fi=u.aw();class Ri extends u.E{constructor(q,Ae={}){super(),this._rtlPluginLoaded=()=>{for(const it in this.sourceCaches){const ot=this.sourceCaches[it].getSource().type;ot!=="vector"&&ot!=="geojson"||this.sourceCaches[it].reload()}},this.map=q,this.dispatcher=new _e(be(),q._getMapId()),this.dispatcher.registerMessageHandler("GG",(it,ot)=>this.getGlyphs(it,ot)),this.dispatcher.registerMessageHandler("GI",(it,ot)=>this.getImages(it,ot)),this.imageManager=new M,this.imageManager.setEventedParent(this),this.glyphManager=new K(q._requestManager,Ae.localIdeographFontFamily),this.lineAtlas=new fe(256,512),this.crossTileSymbolIndex=new pi,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new u.ax,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",u.ay()),Gt().on(rt,this._rtlPluginLoaded),this.on("data",it=>{if(it.dataType!=="source"||it.sourceDataType!=="metadata")return;const ot=this.sourceCaches[it.sourceId];if(!ot)return;const bt=ot.getSource();if(bt&&bt.vectorLayerIds)for(const ar in this._layers){const yr=this._layers[ar];yr.source===bt.id&&this._validateLayer(yr)}})}loadURL(q,Ae={},it){this.fire(new u.k("dataloading",{dataType:"style"})),Ae.validate=typeof Ae.validate!="boolean"||Ae.validate;const ot=this.map._requestManager.transformRequest(q,"Style");this._loadStyleRequest=new AbortController;const bt=this._loadStyleRequest;u.h(ot,this._loadStyleRequest).then(ar=>{this._loadStyleRequest=null,this._load(ar.data,Ae,it)}).catch(ar=>{this._loadStyleRequest=null,ar&&!bt.signal.aborted&&this.fire(new u.j(ar))})}loadJSON(q,Ae={},it){this.fire(new u.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,v.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,Ae.validate=Ae.validate!==!1,this._load(q,Ae,it)}).catch(()=>{})}loadEmpty(){this.fire(new u.k("dataloading",{dataType:"style"})),this._load(fi,{validate:!1})}_load(q,Ae,it){var ot;const bt=Ae.transformStyle?Ae.transformStyle(it,q):q;if(!Ae.validate||!_i(this,u.u(bt))){this._loaded=!0,this.stylesheet=bt;for(const ar in bt.sources)this.addSource(ar,bt.sources[ar],{validate:!1});bt.sprite?this._loadSprite(bt.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(bt.glyphs),this._createLayers(),this.light=new G(this.stylesheet.light),this.sky=new re(this.stylesheet.sky),this.map.setTerrain((ot=this.stylesheet.terrain)!==null&&ot!==void 0?ot:null),this.fire(new u.k("data",{dataType:"style"})),this.fire(new u.k("style.load"))}}_createLayers(){const q=u.az(this.stylesheet.layers);this.dispatcher.broadcast("SL",q),this._order=q.map(Ae=>Ae.id),this._layers={},this._serializedLayers=null;for(const Ae of q){const it=u.aA(Ae);it.setEventedParent(this,{layer:{id:Ae.id}}),this._layers[Ae.id]=it}}_loadSprite(q,Ae=!1,it=void 0){let ot;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,(function(bt,ar,yr,Ur){return u._(this,void 0,void 0,function*(){const ln=P(bt),Cn=yr>1?"@2x":"",Pn={},vi={};for(const{id:Ui,url:kt}of ln){const zt=ar.transformRequest(T(kt,Cn,".json"),"SpriteJSON");Pn[Ui]=u.h(zt,Ur);const Qt=ar.transformRequest(T(kt,Cn,".png"),"SpriteImage");vi[Ui]=g.getImage(Qt,Ur)}return yield Promise.all([...Object.values(Pn),...Object.values(vi)]),(function(Ui,kt){return u._(this,void 0,void 0,function*(){const zt={};for(const Qt in Ui){zt[Qt]={};const cr=v.getImageCanvasContext((yield kt[Qt]).data),Sr=(yield Ui[Qt]).data;for(const gr in Sr){const{width:Nr,height:vn,x:An,y:Ln,sdf:ai,pixelRatio:ki,stretchX:ra,stretchY:oa,content:Ma,textFitWidth:mo,textFitHeight:ns}=Sr[gr];zt[Qt][gr]={data:null,pixelRatio:ki,sdf:ai,stretchX:ra,stretchY:oa,content:Ma,textFitWidth:mo,textFitHeight:ns,spriteData:{width:Nr,height:vn,x:An,y:Ln,context:cr}}}}return zt})})(Pn,vi)})})(q,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(bt=>{if(this._spriteRequest=null,bt)for(const ar in bt){this._spritesImagesIds[ar]=[];const yr=this._spritesImagesIds[ar]?this._spritesImagesIds[ar].filter(Ur=>!(Ur in bt)):[];for(const Ur of yr)this.imageManager.removeImage(Ur),this._changedImages[Ur]=!0;for(const Ur in bt[ar]){const ln=ar==="default"?Ur:`${ar}:${Ur}`;this._spritesImagesIds[ar].push(ln),ln in this.imageManager.images?this.imageManager.updateImage(ln,bt[ar][Ur],!1):this.imageManager.addImage(ln,bt[ar][Ur]),Ae&&(this._changedImages[ln]=!0)}}}).catch(bt=>{this._spriteRequest=null,ot=bt,this.fire(new u.j(ot))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),Ae&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new u.k("data",{dataType:"style"})),it&&it(ot)})}_unloadSprite(){for(const q of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(q),this._changedImages[q]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new u.k("data",{dataType:"style"}))}_validateLayer(q){const Ae=this.sourceCaches[q.source];if(!Ae)return;const it=q.sourceLayer;if(!it)return;const ot=Ae.getSource();(ot.type==="geojson"||ot.vectorLayerIds&&ot.vectorLayerIds.indexOf(it)===-1)&&this.fire(new u.j(new Error(`Source layer "${it}" does not exist on source "${ot.id}" as specified by style layer "${q.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(const q in this.sourceCaches)if(!this.sourceCaches[q].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(q,Ae=!1){const it=this._serializedAllLayers();if(!q||q.length===0)return Object.values(Ae?u.aB(it):it);const ot=[];for(const bt of q)if(it[bt]){const ar=Ae?u.aB(it[bt]):it[bt];ot.push(ar)}return ot}_serializedAllLayers(){let q=this._serializedLayers;if(q)return q;q=this._serializedLayers={};const Ae=Object.keys(this._layers);for(const it of Ae){const ot=this._layers[it];ot.type!=="custom"&&(q[it]=ot.serialize())}return q}hasTransitions(){if(this.light&&this.light.hasTransition()||this.sky&&this.sky.hasTransition())return!0;for(const q in this.sourceCaches)if(this.sourceCaches[q].hasTransition())return!0;for(const q in this._layers)if(this._layers[q].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(q){if(!this._loaded)return;const Ae=this._changed;if(Ae){const ot=Object.keys(this._updatedLayers),bt=Object.keys(this._removedLayers);(ot.length||bt.length)&&this._updateWorkerLayers(ot,bt);for(const ar in this._updatedSources){const yr=this._updatedSources[ar];if(yr==="reload")this._reloadSource(ar);else{if(yr!=="clear")throw new Error(`Invalid action ${yr}`);this._clearSource(ar)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(const ar in this._updatedPaintProps)this._layers[ar].updateTransitions(q);this.light.updateTransitions(q),this.sky.updateTransitions(q),this._resetUpdates()}const it={};for(const ot in this.sourceCaches){const bt=this.sourceCaches[ot];it[ot]=bt.used,bt.used=!1}for(const ot of this._order){const bt=this._layers[ot];bt.recalculate(q,this._availableImages),!bt.isHidden(q.zoom)&&bt.source&&(this.sourceCaches[bt.source].used=!0)}for(const ot in it){const bt=this.sourceCaches[ot];!!it[ot]!=!!bt.used&&bt.fire(new u.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:ot}))}this.light.recalculate(q),this.sky.recalculate(q),this.z=q.zoom,Ae&&this.fire(new u.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){const q=Object.keys(this._changedImages);if(q.length){for(const Ae in this.sourceCaches)this.sourceCaches[Ae].reloadTilesForDependencies(["icons","patterns"],q);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(const q in this.sourceCaches)this.sourceCaches[q].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(q,Ae){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(q,!1),removedIds:Ae})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(q,Ae={}){var it;this._checkLoaded();const ot=this.serialize();if(q=Ae.transformStyle?Ae.transformStyle(ot,q):q,((it=Ae.validate)===null||it===void 0||it)&&_i(this,u.u(q)))return!1;(q=u.aB(q)).layers=u.az(q.layers);const bt=u.aC(ot,q),ar=this._getOperationsToPerform(bt);if(ar.unimplemented.length>0)throw new Error(`Unimplemented: ${ar.unimplemented.join(", ")}.`);if(ar.operations.length===0)return!1;for(const yr of ar.operations)yr();return this.stylesheet=q,this._serializedLayers=null,!0}_getOperationsToPerform(q){const Ae=[],it=[];for(const ot of q)switch(ot.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":continue;case"addLayer":Ae.push(()=>this.addLayer.apply(this,ot.args));break;case"removeLayer":Ae.push(()=>this.removeLayer.apply(this,ot.args));break;case"setPaintProperty":Ae.push(()=>this.setPaintProperty.apply(this,ot.args));break;case"setLayoutProperty":Ae.push(()=>this.setLayoutProperty.apply(this,ot.args));break;case"setFilter":Ae.push(()=>this.setFilter.apply(this,ot.args));break;case"addSource":Ae.push(()=>this.addSource.apply(this,ot.args));break;case"removeSource":Ae.push(()=>this.removeSource.apply(this,ot.args));break;case"setLayerZoomRange":Ae.push(()=>this.setLayerZoomRange.apply(this,ot.args));break;case"setLight":Ae.push(()=>this.setLight.apply(this,ot.args));break;case"setGeoJSONSourceData":Ae.push(()=>this.setGeoJSONSourceData.apply(this,ot.args));break;case"setGlyphs":Ae.push(()=>this.setGlyphs.apply(this,ot.args));break;case"setSprite":Ae.push(()=>this.setSprite.apply(this,ot.args));break;case"setSky":Ae.push(()=>this.setSky.apply(this,ot.args));break;case"setTerrain":Ae.push(()=>this.map.setTerrain.apply(this,ot.args));break;case"setTransition":Ae.push(()=>{});break;default:it.push(ot.command)}return{operations:Ae,unimplemented:it}}addImage(q,Ae){if(this.getImage(q))return this.fire(new u.j(new Error(`An image named "${q}" already exists.`)));this.imageManager.addImage(q,Ae),this._afterImageUpdated(q)}updateImage(q,Ae){this.imageManager.updateImage(q,Ae)}getImage(q){return this.imageManager.getImage(q)}removeImage(q){if(!this.getImage(q))return this.fire(new u.j(new Error(`An image named "${q}" does not exist.`)));this.imageManager.removeImage(q),this._afterImageUpdated(q)}_afterImageUpdated(q){this._availableImages=this.imageManager.listImages(),this._changedImages[q]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new u.k("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(q,Ae,it={}){if(this._checkLoaded(),this.sourceCaches[q]!==void 0)throw new Error(`Source "${q}" already exists.`);if(!Ae.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(Ae).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(Ae.type)>=0&&this._validate(u.u.source,`sources.${q}`,Ae,null,it))return;this.map&&this.map._collectResourceTiming&&(Ae.collectResourceTiming=!0);const ot=this.sourceCaches[q]=new Pr(q,Ae,this.dispatcher);ot.style=this,ot.setEventedParent(this,()=>({isSourceLoaded:ot.loaded(),source:ot.serialize(),sourceId:q})),ot.onAdd(this.map),this._changed=!0}removeSource(q){if(this._checkLoaded(),this.sourceCaches[q]===void 0)throw new Error("There is no source with this ID");for(const it in this._layers)if(this._layers[it].source===q)return this.fire(new u.j(new Error(`Source "${q}" cannot be removed while layer "${it}" is using it.`)));const Ae=this.sourceCaches[q];delete this.sourceCaches[q],delete this._updatedSources[q],Ae.fire(new u.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:q})),Ae.setEventedParent(null),Ae.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(q,Ae){if(this._checkLoaded(),this.sourceCaches[q]===void 0)throw new Error(`There is no source with this ID=${q}`);const it=this.sourceCaches[q].getSource();if(it.type!=="geojson")throw new Error(`geojsonSource.type is ${it.type}, which is !== 'geojson`);it.setData(Ae),this._changed=!0}getSource(q){return this.sourceCaches[q]&&this.sourceCaches[q].getSource()}addLayer(q,Ae,it={}){this._checkLoaded();const ot=q.id;if(this.getLayer(ot))return void this.fire(new u.j(new Error(`Layer "${ot}" already exists on this map.`)));let bt;if(q.type==="custom"){if(_i(this,u.aD(q)))return;bt=u.aA(q)}else{if("source"in q&&typeof q.source=="object"&&(this.addSource(ot,q.source),q=u.aB(q),q=u.e(q,{source:ot})),this._validate(u.u.layer,`layers.${ot}`,q,{arrayIndex:-1},it))return;bt=u.aA(q),this._validateLayer(bt),bt.setEventedParent(this,{layer:{id:ot}})}const ar=Ae?this._order.indexOf(Ae):this._order.length;if(Ae&&ar===-1)this.fire(new u.j(new Error(`Cannot add layer "${ot}" before non-existing layer "${Ae}".`)));else{if(this._order.splice(ar,0,ot),this._layerOrderChanged=!0,this._layers[ot]=bt,this._removedLayers[ot]&&bt.source&&bt.type!=="custom"){const yr=this._removedLayers[ot];delete this._removedLayers[ot],yr.type!==bt.type?this._updatedSources[bt.source]="clear":(this._updatedSources[bt.source]="reload",this.sourceCaches[bt.source].pause())}this._updateLayer(bt),bt.onAdd&&bt.onAdd(this.map)}}moveLayer(q,Ae){if(this._checkLoaded(),this._changed=!0,!this._layers[q])return void this.fire(new u.j(new Error(`The layer '${q}' does not exist in the map's style and cannot be moved.`)));if(q===Ae)return;const it=this._order.indexOf(q);this._order.splice(it,1);const ot=Ae?this._order.indexOf(Ae):this._order.length;Ae&&ot===-1?this.fire(new u.j(new Error(`Cannot move layer "${q}" before non-existing layer "${Ae}".`))):(this._order.splice(ot,0,q),this._layerOrderChanged=!0)}removeLayer(q){this._checkLoaded();const Ae=this._layers[q];if(!Ae)return void this.fire(new u.j(new Error(`Cannot remove non-existing layer "${q}".`)));Ae.setEventedParent(null);const it=this._order.indexOf(q);this._order.splice(it,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[q]=Ae,delete this._layers[q],this._serializedLayers&&delete this._serializedLayers[q],delete this._updatedLayers[q],delete this._updatedPaintProps[q],Ae.onRemove&&Ae.onRemove(this.map)}getLayer(q){return this._layers[q]}getLayersOrder(){return[...this._order]}hasLayer(q){return q in this._layers}setLayerZoomRange(q,Ae,it){this._checkLoaded();const ot=this.getLayer(q);ot?ot.minzoom===Ae&&ot.maxzoom===it||(Ae!=null&&(ot.minzoom=Ae),it!=null&&(ot.maxzoom=it),this._updateLayer(ot)):this.fire(new u.j(new Error(`Cannot set the zoom range of non-existing layer "${q}".`)))}setFilter(q,Ae,it={}){this._checkLoaded();const ot=this.getLayer(q);if(ot){if(!u.aE(ot.filter,Ae))return Ae==null?(ot.filter=void 0,void this._updateLayer(ot)):void(this._validate(u.u.filter,`layers.${ot.id}.filter`,Ae,null,it)||(ot.filter=u.aB(Ae),this._updateLayer(ot)))}else this.fire(new u.j(new Error(`Cannot filter non-existing layer "${q}".`)))}getFilter(q){return u.aB(this.getLayer(q).filter)}setLayoutProperty(q,Ae,it,ot={}){this._checkLoaded();const bt=this.getLayer(q);bt?u.aE(bt.getLayoutProperty(Ae),it)||(bt.setLayoutProperty(Ae,it,ot),this._updateLayer(bt)):this.fire(new u.j(new Error(`Cannot style non-existing layer "${q}".`)))}getLayoutProperty(q,Ae){const it=this.getLayer(q);if(it)return it.getLayoutProperty(Ae);this.fire(new u.j(new Error(`Cannot get style of non-existing layer "${q}".`)))}setPaintProperty(q,Ae,it,ot={}){this._checkLoaded();const bt=this.getLayer(q);bt?u.aE(bt.getPaintProperty(Ae),it)||(bt.setPaintProperty(Ae,it,ot)&&this._updateLayer(bt),this._changed=!0,this._updatedPaintProps[q]=!0,this._serializedLayers=null):this.fire(new u.j(new Error(`Cannot style non-existing layer "${q}".`)))}getPaintProperty(q,Ae){return this.getLayer(q).getPaintProperty(Ae)}setFeatureState(q,Ae){this._checkLoaded();const it=q.source,ot=q.sourceLayer,bt=this.sourceCaches[it];if(bt===void 0)return void this.fire(new u.j(new Error(`The source '${it}' does not exist in the map's style.`)));const ar=bt.getSource().type;ar==="geojson"&&ot?this.fire(new u.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):ar!=="vector"||ot?(q.id===void 0&&this.fire(new u.j(new Error("The feature id parameter must be provided."))),bt.setFeatureState(ot,q.id,Ae)):this.fire(new u.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(q,Ae){this._checkLoaded();const it=q.source,ot=this.sourceCaches[it];if(ot===void 0)return void this.fire(new u.j(new Error(`The source '${it}' does not exist in the map's style.`)));const bt=ot.getSource().type,ar=bt==="vector"?q.sourceLayer:void 0;bt!=="vector"||ar?Ae&&typeof q.id!="string"&&typeof q.id!="number"?this.fire(new u.j(new Error("A feature id is required to remove its specific state property."))):ot.removeFeatureState(ar,q.id,Ae):this.fire(new u.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(q){this._checkLoaded();const Ae=q.source,it=q.sourceLayer,ot=this.sourceCaches[Ae];if(ot!==void 0)return ot.getSource().type!=="vector"||it?(q.id===void 0&&this.fire(new u.j(new Error("The feature id parameter must be provided."))),ot.getFeatureState(it,q.id)):void this.fire(new u.j(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new u.j(new Error(`The source '${Ae}' does not exist in the map's style.`)))}getTransition(){return u.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;const q=u.aF(this.sourceCaches,bt=>bt.serialize()),Ae=this._serializeByIds(this._order,!0),it=this.map.getTerrain()||void 0,ot=this.stylesheet;return u.aG({version:ot.version,name:ot.name,metadata:ot.metadata,light:ot.light,sky:ot.sky,center:ot.center,zoom:ot.zoom,bearing:ot.bearing,pitch:ot.pitch,sprite:ot.sprite,glyphs:ot.glyphs,transition:ot.transition,sources:q,layers:Ae,terrain:it},bt=>bt!==void 0)}_updateLayer(q){this._updatedLayers[q.id]=!0,q.source&&!this._updatedSources[q.source]&&this.sourceCaches[q.source].getSource().type!=="raster"&&(this._updatedSources[q.source]="reload",this.sourceCaches[q.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(q){const Ae=ar=>this._layers[ar].type==="fill-extrusion",it={},ot=[];for(let ar=this._order.length-1;ar>=0;ar--){const yr=this._order[ar];if(Ae(yr)){it[yr]=ar;for(const Ur of q){const ln=Ur[yr];if(ln)for(const Cn of ln)ot.push(Cn)}}}ot.sort((ar,yr)=>yr.intersectionZ-ar.intersectionZ);const bt=[];for(let ar=this._order.length-1;ar>=0;ar--){const yr=this._order[ar];if(Ae(yr))for(let Ur=ot.length-1;Ur>=0;Ur--){const ln=ot[Ur].feature;if(it[ln.layer.id]<ar)break;bt.push(ln),ot.pop()}else for(const Ur of q){const ln=Ur[yr];if(ln)for(const Cn of ln)bt.push(Cn.feature)}}return bt}queryRenderedFeatures(q,Ae,it){Ae&&Ae.filter&&this._validate(u.u.filter,"queryRenderedFeatures.filter",Ae.filter,null,Ae);const ot={};if(Ae&&Ae.layers){if(!Array.isArray(Ae.layers))return this.fire(new u.j(new Error("parameters.layers must be an Array."))),[];for(const yr of Ae.layers){const Ur=this._layers[yr];if(!Ur)return this.fire(new u.j(new Error(`The layer '${yr}' does not exist in the map's style and cannot be queried for features.`))),[];ot[Ur.source]=!0}}const bt=[];Ae.availableImages=this._availableImages;const ar=this._serializedAllLayers();for(const yr in this.sourceCaches)Ae.layers&&!ot[yr]||bt.push(xe(this.sourceCaches[yr],this._layers,ar,q,Ae,it));return this.placement&&bt.push((function(yr,Ur,ln,Cn,Pn,vi,Ui){const kt={},zt=vi.queryRenderedSymbols(Cn),Qt=[];for(const cr of Object.keys(zt).map(Number))Qt.push(Ui[cr]);Qt.sort(se);for(const cr of Qt){const Sr=cr.featureIndex.lookupSymbolFeatures(zt[cr.bucketInstanceId],Ur,cr.bucketIndex,cr.sourceLayerIndex,Pn.filter,Pn.layers,Pn.availableImages,yr);for(const gr in Sr){const Nr=kt[gr]=kt[gr]||[],vn=Sr[gr];vn.sort((An,Ln)=>{const ai=cr.featureSortOrder;if(ai){const ki=ai.indexOf(An.featureIndex);return ai.indexOf(Ln.featureIndex)-ki}return Ln.featureIndex-An.featureIndex});for(const An of vn)Nr.push(An)}}for(const cr in kt)kt[cr].forEach(Sr=>{const gr=Sr.feature,Nr=ln[yr[cr].source].getFeatureState(gr.layer["source-layer"],gr.id);gr.source=gr.layer.source,gr.layer["source-layer"]&&(gr.sourceLayer=gr.layer["source-layer"]),gr.state=Nr});return kt})(this._layers,ar,this.sourceCaches,q,Ae,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(bt)}querySourceFeatures(q,Ae){Ae&&Ae.filter&&this._validate(u.u.filter,"querySourceFeatures.filter",Ae.filter,null,Ae);const it=this.sourceCaches[q];return it?(function(ot,bt){const ar=ot.getRenderableIds().map(ln=>ot.getTileByID(ln)),yr=[],Ur={};for(let ln=0;ln<ar.length;ln++){const Cn=ar[ln],Pn=Cn.tileID.canonical.key;Ur[Pn]||(Ur[Pn]=!0,Cn.querySourceFeatures(yr,bt))}return yr})(it,Ae):[]}getLight(){return this.light.getLight()}setLight(q,Ae={}){this._checkLoaded();const it=this.light.getLight();let ot=!1;for(const ar in q)if(!u.aE(q[ar],it[ar])){ot=!0;break}if(!ot)return;const bt={now:v.now(),transition:u.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(q,Ae),this.light.updateTransitions(bt)}getSky(){var q;return(q=this.stylesheet)===null||q===void 0?void 0:q.sky}setSky(q,Ae={}){const it=this.getSky();let ot=!1;if(!q&&!it)return;if(q&&!it)ot=!0;else if(!q&&it)ot=!0;else for(const ar in q)if(!u.aE(q[ar],it[ar])){ot=!0;break}if(!ot)return;const bt={now:v.now(),transition:u.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=q,this.sky.setSky(q,Ae),this.sky.updateTransitions(bt)}_validate(q,Ae,it,ot,bt={}){return(!bt||bt.validate!==!1)&&_i(this,q.call(u.u,u.e({key:Ae,style:this.serialize(),value:it,styleSpec:u.v},ot)))}_remove(q=!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),Gt().off(rt,this._rtlPluginLoaded);for(const Ae in this._layers)this._layers[Ae].setEventedParent(null);for(const Ae in this.sourceCaches){const it=this.sourceCaches[Ae];it.setEventedParent(null),it.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),q&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(q)}_clearSource(q){this.sourceCaches[q].clearTiles()}_reloadSource(q){this.sourceCaches[q].resume(),this.sourceCaches[q].reload()}_updateSources(q){for(const Ae in this.sourceCaches)this.sourceCaches[Ae].update(q,this.map.terrain)}_generateCollisionBoxes(){for(const q in this.sourceCaches)this._reloadSource(q)}_updatePlacement(q,Ae,it,ot,bt=!1){let ar=!1,yr=!1;const Ur={};for(const ln of this._order){const Cn=this._layers[ln];if(Cn.type!=="symbol")continue;if(!Ur[Cn.source]){const vi=this.sourceCaches[Cn.source];Ur[Cn.source]=vi.getRenderableIds(!0).map(Ui=>vi.getTileByID(Ui)).sort((Ui,kt)=>kt.tileID.overscaledZ-Ui.tileID.overscaledZ||(Ui.tileID.isLessThan(kt.tileID)?-1:1))}const Pn=this.crossTileSymbolIndex.addLayer(Cn,Ur[Cn.source],q.center.lng);ar=ar||Pn}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((bt=bt||this._layerOrderChanged||it===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(v.now(),q.zoom))&&(this.pauseablePlacement=new er(q,this.map.terrain,this._order,bt,Ae,it,ot,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,Ur),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(v.now()),yr=!0),ar&&this.pauseablePlacement.placement.setStale()),yr||ar)for(const ln of this._order){const Cn=this._layers[ln];Cn.type==="symbol"&&this.placement.updateLayerOpacities(Cn,Ur[Cn.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(v.now())}_releaseSymbolFadeTiles(){for(const q in this.sourceCaches)this.sourceCaches[q].releaseSymbolFadeTiles()}getImages(q,Ae){return u._(this,void 0,void 0,function*(){const it=yield this.imageManager.getImages(Ae.icons);this._updateTilesForChangedImages();const ot=this.sourceCaches[Ae.source];return ot&&ot.setDependencies(Ae.tileID.key,Ae.type,Ae.icons),it})}getGlyphs(q,Ae){return u._(this,void 0,void 0,function*(){const it=yield this.glyphManager.getGlyphs(Ae.stacks),ot=this.sourceCaches[Ae.source];return ot&&ot.setDependencies(Ae.tileID.key,Ae.type,[""]),it})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(q,Ae={}){this._checkLoaded(),q&&this._validate(u.u.glyphs,"glyphs",q,null,Ae)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=q,this.glyphManager.entries={},this.glyphManager.setURL(q))}addSprite(q,Ae,it={},ot){this._checkLoaded();const bt=[{id:q,url:Ae}],ar=[...P(this.stylesheet.sprite),...bt];this._validate(u.u.sprite,"sprite",ar,null,it)||(this.stylesheet.sprite=ar,this._loadSprite(bt,!0,ot))}removeSprite(q){this._checkLoaded();const Ae=P(this.stylesheet.sprite);if(Ae.find(it=>it.id===q)){if(this._spritesImagesIds[q])for(const it of this._spritesImagesIds[q])this.imageManager.removeImage(it),this._changedImages[it]=!0;Ae.splice(Ae.findIndex(it=>it.id===q),1),this.stylesheet.sprite=Ae.length>0?Ae:void 0,delete this._spritesImagesIds[q],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new u.k("data",{dataType:"style"}))}else this.fire(new u.j(new Error(`Sprite "${q}" doesn't exists on this map.`)))}getSprite(){return P(this.stylesheet.sprite)}setSprite(q,Ae={},it){this._checkLoaded(),q&&this._validate(u.u.sprite,"sprite",q,null,Ae)||(this.stylesheet.sprite=q,q?this._loadSprite(q,!0,it):(this._unloadSprite(),it&&it(null)))}}var $i=u.Y([{name:"a_pos",type:"Int16",components:2}]);const Hi={prelude:wr(`#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:wr(`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:wr(`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:wr(`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:wr("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:wr(`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:wr(`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:wr("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:wr("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:wr("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:wr(`#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:wr(`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:wr(`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:wr(`#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:wr(`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:wr(`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:wr(`#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:wr(`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:wr(`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:wr(`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:wr(`#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:wr(`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:wr(`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:wr(`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:wr(`#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:wr(`#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:wr("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:wr("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:wr("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:wr("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 wr(wt,q){const Ae=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,it=q.match(/attribute ([\w]+) ([\w]+)/g),ot=wt.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),bt=q.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),ar=bt?bt.concat(ot):ot,yr={};return{fragmentSource:wt=wt.replace(Ae,(Ur,ln,Cn,Pn,vi)=>(yr[vi]=!0,ln==="define"?`
#ifndef HAS_UNIFORM_u_${vi}
varying ${Cn} ${Pn} ${vi};
#else
uniform ${Cn} ${Pn} u_${vi};
#endif
`:`
#ifdef HAS_UNIFORM_u_${vi}
    ${Cn} ${Pn} ${vi} = u_${vi};
#endif
`)),vertexSource:q=q.replace(Ae,(Ur,ln,Cn,Pn,vi)=>{const Ui=Pn==="float"?"vec2":"vec4",kt=vi.match(/color/)?"color":Ui;return yr[vi]?ln==="define"?`
#ifndef HAS_UNIFORM_u_${vi}
uniform lowp float u_${vi}_t;
attribute ${Cn} ${Ui} a_${vi};
varying ${Cn} ${Pn} ${vi};
#else
uniform ${Cn} ${Pn} u_${vi};
#endif
`:kt==="vec4"?`
#ifndef HAS_UNIFORM_u_${vi}
    ${vi} = a_${vi};
#else
    ${Cn} ${Pn} ${vi} = u_${vi};
#endif
`:`
#ifndef HAS_UNIFORM_u_${vi}
    ${vi} = unpack_mix_${kt}(a_${vi}, u_${vi}_t);
#else
    ${Cn} ${Pn} ${vi} = u_${vi};
#endif
`:ln==="define"?`
#ifndef HAS_UNIFORM_u_${vi}
uniform lowp float u_${vi}_t;
attribute ${Cn} ${Ui} a_${vi};
#else
uniform ${Cn} ${Pn} u_${vi};
#endif
`:kt==="vec4"?`
#ifndef HAS_UNIFORM_u_${vi}
    ${Cn} ${Pn} ${vi} = a_${vi};
#else
    ${Cn} ${Pn} ${vi} = u_${vi};
#endif
`:`
#ifndef HAS_UNIFORM_u_${vi}
    ${Cn} ${Pn} ${vi} = unpack_mix_${kt}(a_${vi}, u_${vi}_t);
#else
    ${Cn} ${Pn} ${vi} = u_${vi};
#endif
`}),staticAttributes:it,staticUniforms:ar}}class gn{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(q,Ae,it,ot,bt,ar,yr,Ur,ln){this.context=q;let Cn=this.boundPaintVertexBuffers.length!==ot.length;for(let Pn=0;!Cn&&Pn<ot.length;Pn++)this.boundPaintVertexBuffers[Pn]!==ot[Pn]&&(Cn=!0);!this.vao||this.boundProgram!==Ae||this.boundLayoutVertexBuffer!==it||Cn||this.boundIndexBuffer!==bt||this.boundVertexOffset!==ar||this.boundDynamicVertexBuffer!==yr||this.boundDynamicVertexBuffer2!==Ur||this.boundDynamicVertexBuffer3!==ln?this.freshBind(Ae,it,ot,bt,ar,yr,Ur,ln):(q.bindVertexArray.set(this.vao),yr&&yr.bind(),bt&&bt.dynamicDraw&&bt.bind(),Ur&&Ur.bind(),ln&&ln.bind())}freshBind(q,Ae,it,ot,bt,ar,yr,Ur){const ln=q.numAttributes,Cn=this.context,Pn=Cn.gl;this.vao&&this.destroy(),this.vao=Cn.createVertexArray(),Cn.bindVertexArray.set(this.vao),this.boundProgram=q,this.boundLayoutVertexBuffer=Ae,this.boundPaintVertexBuffers=it,this.boundIndexBuffer=ot,this.boundVertexOffset=bt,this.boundDynamicVertexBuffer=ar,this.boundDynamicVertexBuffer2=yr,this.boundDynamicVertexBuffer3=Ur,Ae.enableAttributes(Pn,q);for(const vi of it)vi.enableAttributes(Pn,q);ar&&ar.enableAttributes(Pn,q),yr&&yr.enableAttributes(Pn,q),Ur&&Ur.enableAttributes(Pn,q),Ae.bind(),Ae.setVertexAttribPointers(Pn,q,bt);for(const vi of it)vi.bind(),vi.setVertexAttribPointers(Pn,q,bt);ar&&(ar.bind(),ar.setVertexAttribPointers(Pn,q,bt)),ot&&ot.bind(),yr&&(yr.bind(),yr.setVertexAttribPointers(Pn,q,bt)),Ur&&(Ur.bind(),Ur.setVertexAttribPointers(Pn,q,bt)),Cn.currentNumAttributes=ln}destroy(){this.vao&&(this.context.deleteVertexArray(this.vao),this.vao=null)}}const Xn=(wt,q,Ae,it,ot)=>({u_matrix:wt,u_texture:0,u_ele_delta:q,u_fog_matrix:Ae,u_fog_color:it?it.properties.get("fog-color"):u.aM.white,u_fog_ground_blend:it?it.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:it?it.calculateFogBlendOpacity(ot):0,u_horizon_color:it?it.properties.get("horizon-color"):u.aM.white,u_horizon_fog_blend:it?it.properties.get("horizon-fog-blend"):1});function Yi(wt){const q=[];for(let Ae=0;Ae<wt.length;Ae++){if(wt[Ae]===null)continue;const it=wt[Ae].split(" ");q.push(it.pop())}return q}class ha{constructor(q,Ae,it,ot,bt,ar){const yr=q.gl;this.program=yr.createProgram();const Ur=Yi(Ae.staticAttributes),ln=it?it.getBinderAttributes():[],Cn=Ur.concat(ln),Pn=Hi.prelude.staticUniforms?Yi(Hi.prelude.staticUniforms):[],vi=Ae.staticUniforms?Yi(Ae.staticUniforms):[],Ui=it?it.getBinderUniforms():[],kt=Pn.concat(vi).concat(Ui),zt=[];for(const An of kt)zt.indexOf(An)<0&&zt.push(An);const Qt=it?it.defines():[];bt&&Qt.push("#define OVERDRAW_INSPECTOR;"),ar&&Qt.push("#define TERRAIN3D;");const cr=Qt.concat(Hi.prelude.fragmentSource,Ae.fragmentSource).join(`
`),Sr=Qt.concat(Hi.prelude.vertexSource,Ae.vertexSource).join(`
`),gr=yr.createShader(yr.FRAGMENT_SHADER);if(yr.isContextLost())return void(this.failedToCreate=!0);if(yr.shaderSource(gr,cr),yr.compileShader(gr),!yr.getShaderParameter(gr,yr.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${yr.getShaderInfoLog(gr)}`);yr.attachShader(this.program,gr);const Nr=yr.createShader(yr.VERTEX_SHADER);if(yr.isContextLost())return void(this.failedToCreate=!0);if(yr.shaderSource(Nr,Sr),yr.compileShader(Nr),!yr.getShaderParameter(Nr,yr.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${yr.getShaderInfoLog(Nr)}`);yr.attachShader(this.program,Nr),this.attributes={};const vn={};this.numAttributes=Cn.length;for(let An=0;An<this.numAttributes;An++)Cn[An]&&(yr.bindAttribLocation(this.program,An,Cn[An]),this.attributes[Cn[An]]=An);if(yr.linkProgram(this.program),!yr.getProgramParameter(this.program,yr.LINK_STATUS))throw new Error(`Program failed to link: ${yr.getProgramInfoLog(this.program)}`);yr.deleteShader(Nr),yr.deleteShader(gr);for(let An=0;An<zt.length;An++){const Ln=zt[An];if(Ln&&!vn[Ln]){const ai=yr.getUniformLocation(this.program,Ln);ai&&(vn[Ln]=ai)}}this.fixedUniforms=ot(q,vn),this.terrainUniforms=((An,Ln)=>({u_depth:new u.aH(An,Ln.u_depth),u_terrain:new u.aH(An,Ln.u_terrain),u_terrain_dim:new u.aI(An,Ln.u_terrain_dim),u_terrain_matrix:new u.aJ(An,Ln.u_terrain_matrix),u_terrain_unpack:new u.aK(An,Ln.u_terrain_unpack),u_terrain_exaggeration:new u.aI(An,Ln.u_terrain_exaggeration)}))(q,vn),this.binderUniforms=it?it.getUniforms(q,vn):[]}draw(q,Ae,it,ot,bt,ar,yr,Ur,ln,Cn,Pn,vi,Ui,kt,zt,Qt,cr,Sr){const gr=q.gl;if(this.failedToCreate)return;if(q.program.set(this.program),q.setDepthMode(it),q.setStencilMode(ot),q.setColorMode(bt),q.setCullFace(ar),Ur){q.activeTexture.set(gr.TEXTURE2),gr.bindTexture(gr.TEXTURE_2D,Ur.depthTexture),q.activeTexture.set(gr.TEXTURE3),gr.bindTexture(gr.TEXTURE_2D,Ur.texture);for(const vn in this.terrainUniforms)this.terrainUniforms[vn].set(Ur[vn])}for(const vn in this.fixedUniforms)this.fixedUniforms[vn].set(yr[vn]);zt&&zt.setUniforms(q,this.binderUniforms,Ui,{zoom:kt});let Nr=0;switch(Ae){case gr.LINES:Nr=2;break;case gr.TRIANGLES:Nr=3;break;case gr.LINE_STRIP:Nr=1}for(const vn of vi.get()){const An=vn.vaos||(vn.vaos={});(An[ln]||(An[ln]=new gn)).bind(q,this,Cn,zt?zt.getPaintVertexBuffers():[],Pn,vn.vertexOffset,Qt,cr,Sr),gr.drawElements(Ae,vn.primitiveLength*Nr,gr.UNSIGNED_SHORT,vn.primitiveOffset*Nr*2)}}}function Ca(wt,q,Ae){const it=1/Oa(Ae,1,q.transform.tileZoom),ot=Math.pow(2,Ae.tileID.overscaledZ),bt=Ae.tileSize*Math.pow(2,q.transform.tileZoom)/ot,ar=bt*(Ae.tileID.canonical.x+Ae.tileID.wrap*ot),yr=bt*Ae.tileID.canonical.y;return{u_image:0,u_texsize:Ae.imageAtlasTexture.size,u_scale:[it,wt.fromScale,wt.toScale],u_fade:wt.t,u_pixel_coord_upper:[ar>>16,yr>>16],u_pixel_coord_lower:[65535&ar,65535&yr]}}const Ba=(wt,q,Ae,it)=>{const ot=q.style.light,bt=ot.properties.get("position"),ar=[bt.x,bt.y,bt.z],yr=(function(){var ln=new u.A(9);return u.A!=Float32Array&&(ln[1]=0,ln[2]=0,ln[3]=0,ln[5]=0,ln[6]=0,ln[7]=0),ln[0]=1,ln[4]=1,ln[8]=1,ln})();ot.properties.get("anchor")==="viewport"&&(function(ln,Cn){var Pn=Math.sin(Cn),vi=Math.cos(Cn);ln[0]=vi,ln[1]=Pn,ln[2]=0,ln[3]=-Pn,ln[4]=vi,ln[5]=0,ln[6]=0,ln[7]=0,ln[8]=1})(yr,-q.transform.angle),(function(ln,Cn,Pn){var vi=Cn[0],Ui=Cn[1],kt=Cn[2];ln[0]=vi*Pn[0]+Ui*Pn[3]+kt*Pn[6],ln[1]=vi*Pn[1]+Ui*Pn[4]+kt*Pn[7],ln[2]=vi*Pn[2]+Ui*Pn[5]+kt*Pn[8]})(ar,ar,yr);const Ur=ot.properties.get("color");return{u_matrix:wt,u_lightpos:ar,u_lightintensity:ot.properties.get("intensity"),u_lightcolor:[Ur.r,Ur.g,Ur.b],u_vertical_gradient:+Ae,u_opacity:it}},ji=(wt,q,Ae,it,ot,bt,ar)=>u.e(Ba(wt,q,Ae,it),Ca(bt,q,ar),{u_height_factor:-Math.pow(2,ot.overscaledZ)/ar.tileSize/8}),Ea=wt=>({u_matrix:wt}),cs=(wt,q,Ae,it)=>u.e(Ea(wt),Ca(Ae,q,it)),No=(wt,q)=>({u_matrix:wt,u_world:q}),Vs=(wt,q,Ae,it,ot)=>u.e(cs(wt,q,Ae,it),{u_world:ot}),pl=(wt,q,Ae,it)=>{const ot=wt.transform;let bt,ar;if(it.paint.get("circle-pitch-alignment")==="map"){const yr=Oa(Ae,1,ot.zoom);bt=!0,ar=[yr,yr]}else bt=!1,ar=ot.pixelsToGLUnits;return{u_camera_to_center_distance:ot.cameraToCenterDistance,u_scale_with_map:+(it.paint.get("circle-pitch-scale")==="map"),u_matrix:wt.translatePosMatrix(q.posMatrix,Ae,it.paint.get("circle-translate"),it.paint.get("circle-translate-anchor")),u_pitch_with_map:+bt,u_device_pixel_ratio:wt.pixelRatio,u_extrude_scale:ar}},kl=(wt,q,Ae)=>({u_matrix:wt,u_inv_matrix:q,u_camera_to_center_distance:Ae.cameraToCenterDistance,u_viewport_size:[Ae.width,Ae.height]}),El=(wt,q,Ae=1)=>({u_matrix:wt,u_color:q,u_overlay:0,u_overlay_scale:Ae}),iu=wt=>({u_matrix:wt}),bu=(wt,q,Ae,it)=>({u_matrix:wt,u_extrude_scale:Oa(q,1,Ae),u_intensity:it}),yl=(wt,q,Ae,it)=>{const ot=u.H();u.aP(ot,0,wt.width,wt.height,0,0,1);const bt=wt.context.gl;return{u_matrix:ot,u_world:[bt.drawingBufferWidth,bt.drawingBufferHeight],u_image:Ae,u_color_ramp:it,u_opacity:q.paint.get("heatmap-opacity")}};function ql(wt,q){const Ae=Math.pow(2,q.canonical.z),it=q.canonical.y;return[new u.Z(0,it/Ae).toLngLat().lat,new u.Z(0,(it+1)/Ae).toLngLat().lat]}const rc=(wt,q,Ae,it)=>{const ot=wt.transform;return{u_matrix:lu(wt,q,Ae,it),u_ratio:1/Oa(q,1,ot.zoom),u_device_pixel_ratio:wt.pixelRatio,u_units_to_pixels:[1/ot.pixelsToGLUnits[0],1/ot.pixelsToGLUnits[1]]}},zc=(wt,q,Ae,it,ot)=>u.e(rc(wt,q,Ae,ot),{u_image:0,u_image_height:it}),Pf=(wt,q,Ae,it,ot)=>{const bt=wt.transform,ar=Ql(q,bt);return{u_matrix:lu(wt,q,Ae,ot),u_texsize:q.imageAtlasTexture.size,u_ratio:1/Oa(q,1,bt.zoom),u_device_pixel_ratio:wt.pixelRatio,u_image:0,u_scale:[ar,it.fromScale,it.toScale],u_fade:it.t,u_units_to_pixels:[1/bt.pixelsToGLUnits[0],1/bt.pixelsToGLUnits[1]]}},ju=(wt,q,Ae,it,ot,bt)=>{const ar=wt.lineAtlas,yr=Ql(q,wt.transform),Ur=Ae.layout.get("line-cap")==="round",ln=ar.getDash(it.from,Ur),Cn=ar.getDash(it.to,Ur),Pn=ln.width*ot.fromScale,vi=Cn.width*ot.toScale;return u.e(rc(wt,q,Ae,bt),{u_patternscale_a:[yr/Pn,-ln.height/2],u_patternscale_b:[yr/vi,-Cn.height/2],u_sdfgamma:ar.width/(256*Math.min(Pn,vi)*wt.pixelRatio)/2,u_image:0,u_tex_y_a:ln.y,u_tex_y_b:Cn.y,u_mix:ot.t})};function Ql(wt,q){return 1/Oa(wt,1,q.tileZoom)}function lu(wt,q,Ae,it){return wt.translatePosMatrix(it?it.posMatrix:q.tileID.posMatrix,q,Ae.paint.get("line-translate"),Ae.paint.get("line-translate-anchor"))}const dc=(wt,q,Ae,it,ot)=>{return{u_matrix:wt,u_tl_parent:q,u_scale_parent:Ae,u_buffer_scale:1,u_fade_t:it.mix,u_opacity:it.opacity*ot.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:ot.paint.get("raster-brightness-min"),u_brightness_high:ot.paint.get("raster-brightness-max"),u_saturation_factor:(ar=ot.paint.get("raster-saturation"),ar>0?1-1/(1.001-ar):-ar),u_contrast_factor:(bt=ot.paint.get("raster-contrast"),bt>0?1/(1-bt):1+bt),u_spin_weights:wc(ot.paint.get("raster-hue-rotate"))};var bt,ar};function wc(wt){wt*=Math.PI/180;const q=Math.sin(wt),Ae=Math.cos(wt);return[(2*Ae+1)/3,(-Math.sqrt(3)*q-Ae+1)/3,(Math.sqrt(3)*q-Ae+1)/3]}const mc=(wt,q,Ae,it,ot,bt,ar,yr,Ur,ln,Cn,Pn,vi,Ui)=>{const kt=ar.transform;return{u_is_size_zoom_constant:+(wt==="constant"||wt==="source"),u_is_size_feature_constant:+(wt==="constant"||wt==="camera"),u_size_t:q?q.uSizeT:0,u_size:q?q.uSize:0,u_camera_to_center_distance:kt.cameraToCenterDistance,u_pitch:kt.pitch/360*2*Math.PI,u_rotate_symbol:+Ae,u_aspect_ratio:kt.width/kt.height,u_fade_change:ar.options.fadeDuration?ar.symbolFadeChange:1,u_matrix:yr,u_label_plane_matrix:Ur,u_coord_matrix:ln,u_is_text:+Pn,u_pitch_with_map:+it,u_is_along_line:ot,u_is_variable_anchor:bt,u_texsize:vi,u_texture:0,u_translation:Cn,u_pitched_scale:Ui}},xu=(wt,q,Ae,it,ot,bt,ar,yr,Ur,ln,Cn,Pn,vi,Ui,kt)=>{const zt=ar.transform;return u.e(mc(wt,q,Ae,it,ot,bt,ar,yr,Ur,ln,Cn,Pn,vi,kt),{u_gamma_scale:it?Math.cos(zt._pitch)*zt.cameraToCenterDistance:1,u_device_pixel_ratio:ar.pixelRatio,u_is_halo:1})},qu=(wt,q,Ae,it,ot,bt,ar,yr,Ur,ln,Cn,Pn,vi,Ui)=>u.e(xu(wt,q,Ae,it,ot,bt,ar,yr,Ur,ln,Cn,!0,Pn,!0,Ui),{u_texsize_icon:vi,u_texture_icon:1}),xf=(wt,q,Ae)=>({u_matrix:wt,u_opacity:q,u_color:Ae}),ed=(wt,q,Ae,it,ot,bt)=>u.e((function(ar,yr,Ur,ln){const Cn=Ur.imageManager.getPattern(ar.from.toString()),Pn=Ur.imageManager.getPattern(ar.to.toString()),{width:vi,height:Ui}=Ur.imageManager.getPixelSize(),kt=Math.pow(2,ln.tileID.overscaledZ),zt=ln.tileSize*Math.pow(2,Ur.transform.tileZoom)/kt,Qt=zt*(ln.tileID.canonical.x+ln.tileID.wrap*kt),cr=zt*ln.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Cn.tl,u_pattern_br_a:Cn.br,u_pattern_tl_b:Pn.tl,u_pattern_br_b:Pn.br,u_texsize:[vi,Ui],u_mix:yr.t,u_pattern_size_a:Cn.displaySize,u_pattern_size_b:Pn.displaySize,u_scale_a:yr.fromScale,u_scale_b:yr.toScale,u_tile_units_to_pixels:1/Oa(ln,1,Ur.transform.tileZoom),u_pixel_coord_upper:[Qt>>16,cr>>16],u_pixel_coord_lower:[65535&Qt,65535&cr]}})(it,bt,Ae,ot),{u_matrix:wt,u_opacity:q}),Df={fillExtrusion:(wt,q)=>({u_matrix:new u.aJ(wt,q.u_matrix),u_lightpos:new u.aN(wt,q.u_lightpos),u_lightintensity:new u.aI(wt,q.u_lightintensity),u_lightcolor:new u.aN(wt,q.u_lightcolor),u_vertical_gradient:new u.aI(wt,q.u_vertical_gradient),u_opacity:new u.aI(wt,q.u_opacity)}),fillExtrusionPattern:(wt,q)=>({u_matrix:new u.aJ(wt,q.u_matrix),u_lightpos:new u.aN(wt,q.u_lightpos),u_lightintensity:new u.aI(wt,q.u_lightintensity),u_lightcolor:new u.aN(wt,q.u_lightcolor),u_vertical_gradient:new u.aI(wt,q.u_vertical_gradient),u_height_factor:new u.aI(wt,q.u_height_factor),u_image:new u.aH(wt,q.u_image),u_texsize:new u.aO(wt,q.u_texsize),u_pixel_coord_upper:new u.aO(wt,q.u_pixel_coord_upper),u_pixel_coord_lower:new u.aO(wt,q.u_pixel_coord_lower),u_scale:new u.aN(wt,q.u_scale),u_fade:new u.aI(wt,q.u_fade),u_opacity:new u.aI(wt,q.u_opacity)}),fill:(wt,q)=>({u_matrix:new u.aJ(wt,q.u_matrix)}),fillPattern:(wt,q)=>({u_matrix:new u.aJ(wt,q.u_matrix),u_image:new u.aH(wt,q.u_image),u_texsize:new u.aO(wt,q.u_texsize),u_pixel_coord_upper:new u.aO(wt,q.u_pixel_coord_upper),u_pixel_coord_lower:new u.aO(wt,q.u_pixel_coord_lower),u_scale:new u.aN(wt,q.u_scale),u_fade:new u.aI(wt,q.u_fade)}),fillOutline:(wt,q)=>({u_matrix:new u.aJ(wt,q.u_matrix),u_world:new u.aO(wt,q.u_world)}),fillOutlinePattern:(wt,q)=>({u_matrix:new u.aJ(wt,q.u_matrix),u_world:new u.aO(wt,q.u_world),u_image:new u.aH(wt,q.u_image),u_texsize:new u.aO(wt,q.u_texsize),u_pixel_coord_upper:new u.aO(wt,q.u_pixel_coord_upper),u_pixel_coord_lower:new u.aO(wt,q.u_pixel_coord_lower),u_scale:new u.aN(wt,q.u_scale),u_fade:new u.aI(wt,q.u_fade)}),circle:(wt,q)=>({u_camera_to_center_distance:new u.aI(wt,q.u_camera_to_center_distance),u_scale_with_map:new u.aH(wt,q.u_scale_with_map),u_pitch_with_map:new u.aH(wt,q.u_pitch_with_map),u_extrude_scale:new u.aO(wt,q.u_extrude_scale),u_device_pixel_ratio:new u.aI(wt,q.u_device_pixel_ratio),u_matrix:new u.aJ(wt,q.u_matrix)}),collisionBox:(wt,q)=>({u_matrix:new u.aJ(wt,q.u_matrix),u_pixel_extrude_scale:new u.aO(wt,q.u_pixel_extrude_scale)}),collisionCircle:(wt,q)=>({u_matrix:new u.aJ(wt,q.u_matrix),u_inv_matrix:new u.aJ(wt,q.u_inv_matrix),u_camera_to_center_distance:new u.aI(wt,q.u_camera_to_center_distance),u_viewport_size:new u.aO(wt,q.u_viewport_size)}),debug:(wt,q)=>({u_color:new u.aL(wt,q.u_color),u_matrix:new u.aJ(wt,q.u_matrix),u_overlay:new u.aH(wt,q.u_overlay),u_overlay_scale:new u.aI(wt,q.u_overlay_scale)}),clippingMask:(wt,q)=>({u_matrix:new u.aJ(wt,q.u_matrix)}),heatmap:(wt,q)=>({u_extrude_scale:new u.aI(wt,q.u_extrude_scale),u_intensity:new u.aI(wt,q.u_intensity),u_matrix:new u.aJ(wt,q.u_matrix)}),heatmapTexture:(wt,q)=>({u_matrix:new u.aJ(wt,q.u_matrix),u_world:new u.aO(wt,q.u_world),u_image:new u.aH(wt,q.u_image),u_color_ramp:new u.aH(wt,q.u_color_ramp),u_opacity:new u.aI(wt,q.u_opacity)}),hillshade:(wt,q)=>({u_matrix:new u.aJ(wt,q.u_matrix),u_image:new u.aH(wt,q.u_image),u_latrange:new u.aO(wt,q.u_latrange),u_light:new u.aO(wt,q.u_light),u_shadow:new u.aL(wt,q.u_shadow),u_highlight:new u.aL(wt,q.u_highlight),u_accent:new u.aL(wt,q.u_accent)}),hillshadePrepare:(wt,q)=>({u_matrix:new u.aJ(wt,q.u_matrix),u_image:new u.aH(wt,q.u_image),u_dimension:new u.aO(wt,q.u_dimension),u_zoom:new u.aI(wt,q.u_zoom),u_unpack:new u.aK(wt,q.u_unpack)}),line:(wt,q)=>({u_matrix:new u.aJ(wt,q.u_matrix),u_ratio:new u.aI(wt,q.u_ratio),u_device_pixel_ratio:new u.aI(wt,q.u_device_pixel_ratio),u_units_to_pixels:new u.aO(wt,q.u_units_to_pixels)}),lineGradient:(wt,q)=>({u_matrix:new u.aJ(wt,q.u_matrix),u_ratio:new u.aI(wt,q.u_ratio),u_device_pixel_ratio:new u.aI(wt,q.u_device_pixel_ratio),u_units_to_pixels:new u.aO(wt,q.u_units_to_pixels),u_image:new u.aH(wt,q.u_image),u_image_height:new u.aI(wt,q.u_image_height)}),linePattern:(wt,q)=>({u_matrix:new u.aJ(wt,q.u_matrix),u_texsize:new u.aO(wt,q.u_texsize),u_ratio:new u.aI(wt,q.u_ratio),u_device_pixel_ratio:new u.aI(wt,q.u_device_pixel_ratio),u_image:new u.aH(wt,q.u_image),u_units_to_pixels:new u.aO(wt,q.u_units_to_pixels),u_scale:new u.aN(wt,q.u_scale),u_fade:new u.aI(wt,q.u_fade)}),lineSDF:(wt,q)=>({u_matrix:new u.aJ(wt,q.u_matrix),u_ratio:new u.aI(wt,q.u_ratio),u_device_pixel_ratio:new u.aI(wt,q.u_device_pixel_ratio),u_units_to_pixels:new u.aO(wt,q.u_units_to_pixels),u_patternscale_a:new u.aO(wt,q.u_patternscale_a),u_patternscale_b:new u.aO(wt,q.u_patternscale_b),u_sdfgamma:new u.aI(wt,q.u_sdfgamma),u_image:new u.aH(wt,q.u_image),u_tex_y_a:new u.aI(wt,q.u_tex_y_a),u_tex_y_b:new u.aI(wt,q.u_tex_y_b),u_mix:new u.aI(wt,q.u_mix)}),raster:(wt,q)=>({u_matrix:new u.aJ(wt,q.u_matrix),u_tl_parent:new u.aO(wt,q.u_tl_parent),u_scale_parent:new u.aI(wt,q.u_scale_parent),u_buffer_scale:new u.aI(wt,q.u_buffer_scale),u_fade_t:new u.aI(wt,q.u_fade_t),u_opacity:new u.aI(wt,q.u_opacity),u_image0:new u.aH(wt,q.u_image0),u_image1:new u.aH(wt,q.u_image1),u_brightness_low:new u.aI(wt,q.u_brightness_low),u_brightness_high:new u.aI(wt,q.u_brightness_high),u_saturation_factor:new u.aI(wt,q.u_saturation_factor),u_contrast_factor:new u.aI(wt,q.u_contrast_factor),u_spin_weights:new u.aN(wt,q.u_spin_weights)}),symbolIcon:(wt,q)=>({u_is_size_zoom_constant:new u.aH(wt,q.u_is_size_zoom_constant),u_is_size_feature_constant:new u.aH(wt,q.u_is_size_feature_constant),u_size_t:new u.aI(wt,q.u_size_t),u_size:new u.aI(wt,q.u_size),u_camera_to_center_distance:new u.aI(wt,q.u_camera_to_center_distance),u_pitch:new u.aI(wt,q.u_pitch),u_rotate_symbol:new u.aH(wt,q.u_rotate_symbol),u_aspect_ratio:new u.aI(wt,q.u_aspect_ratio),u_fade_change:new u.aI(wt,q.u_fade_change),u_matrix:new u.aJ(wt,q.u_matrix),u_label_plane_matrix:new u.aJ(wt,q.u_label_plane_matrix),u_coord_matrix:new u.aJ(wt,q.u_coord_matrix),u_is_text:new u.aH(wt,q.u_is_text),u_pitch_with_map:new u.aH(wt,q.u_pitch_with_map),u_is_along_line:new u.aH(wt,q.u_is_along_line),u_is_variable_anchor:new u.aH(wt,q.u_is_variable_anchor),u_texsize:new u.aO(wt,q.u_texsize),u_texture:new u.aH(wt,q.u_texture),u_translation:new u.aO(wt,q.u_translation),u_pitched_scale:new u.aI(wt,q.u_pitched_scale)}),symbolSDF:(wt,q)=>({u_is_size_zoom_constant:new u.aH(wt,q.u_is_size_zoom_constant),u_is_size_feature_constant:new u.aH(wt,q.u_is_size_feature_constant),u_size_t:new u.aI(wt,q.u_size_t),u_size:new u.aI(wt,q.u_size),u_camera_to_center_distance:new u.aI(wt,q.u_camera_to_center_distance),u_pitch:new u.aI(wt,q.u_pitch),u_rotate_symbol:new u.aH(wt,q.u_rotate_symbol),u_aspect_ratio:new u.aI(wt,q.u_aspect_ratio),u_fade_change:new u.aI(wt,q.u_fade_change),u_matrix:new u.aJ(wt,q.u_matrix),u_label_plane_matrix:new u.aJ(wt,q.u_label_plane_matrix),u_coord_matrix:new u.aJ(wt,q.u_coord_matrix),u_is_text:new u.aH(wt,q.u_is_text),u_pitch_with_map:new u.aH(wt,q.u_pitch_with_map),u_is_along_line:new u.aH(wt,q.u_is_along_line),u_is_variable_anchor:new u.aH(wt,q.u_is_variable_anchor),u_texsize:new u.aO(wt,q.u_texsize),u_texture:new u.aH(wt,q.u_texture),u_gamma_scale:new u.aI(wt,q.u_gamma_scale),u_device_pixel_ratio:new u.aI(wt,q.u_device_pixel_ratio),u_is_halo:new u.aH(wt,q.u_is_halo),u_translation:new u.aO(wt,q.u_translation),u_pitched_scale:new u.aI(wt,q.u_pitched_scale)}),symbolTextAndIcon:(wt,q)=>({u_is_size_zoom_constant:new u.aH(wt,q.u_is_size_zoom_constant),u_is_size_feature_constant:new u.aH(wt,q.u_is_size_feature_constant),u_size_t:new u.aI(wt,q.u_size_t),u_size:new u.aI(wt,q.u_size),u_camera_to_center_distance:new u.aI(wt,q.u_camera_to_center_distance),u_pitch:new u.aI(wt,q.u_pitch),u_rotate_symbol:new u.aH(wt,q.u_rotate_symbol),u_aspect_ratio:new u.aI(wt,q.u_aspect_ratio),u_fade_change:new u.aI(wt,q.u_fade_change),u_matrix:new u.aJ(wt,q.u_matrix),u_label_plane_matrix:new u.aJ(wt,q.u_label_plane_matrix),u_coord_matrix:new u.aJ(wt,q.u_coord_matrix),u_is_text:new u.aH(wt,q.u_is_text),u_pitch_with_map:new u.aH(wt,q.u_pitch_with_map),u_is_along_line:new u.aH(wt,q.u_is_along_line),u_is_variable_anchor:new u.aH(wt,q.u_is_variable_anchor),u_texsize:new u.aO(wt,q.u_texsize),u_texsize_icon:new u.aO(wt,q.u_texsize_icon),u_texture:new u.aH(wt,q.u_texture),u_texture_icon:new u.aH(wt,q.u_texture_icon),u_gamma_scale:new u.aI(wt,q.u_gamma_scale),u_device_pixel_ratio:new u.aI(wt,q.u_device_pixel_ratio),u_is_halo:new u.aH(wt,q.u_is_halo),u_translation:new u.aO(wt,q.u_translation),u_pitched_scale:new u.aI(wt,q.u_pitched_scale)}),background:(wt,q)=>({u_matrix:new u.aJ(wt,q.u_matrix),u_opacity:new u.aI(wt,q.u_opacity),u_color:new u.aL(wt,q.u_color)}),backgroundPattern:(wt,q)=>({u_matrix:new u.aJ(wt,q.u_matrix),u_opacity:new u.aI(wt,q.u_opacity),u_image:new u.aH(wt,q.u_image),u_pattern_tl_a:new u.aO(wt,q.u_pattern_tl_a),u_pattern_br_a:new u.aO(wt,q.u_pattern_br_a),u_pattern_tl_b:new u.aO(wt,q.u_pattern_tl_b),u_pattern_br_b:new u.aO(wt,q.u_pattern_br_b),u_texsize:new u.aO(wt,q.u_texsize),u_mix:new u.aI(wt,q.u_mix),u_pattern_size_a:new u.aO(wt,q.u_pattern_size_a),u_pattern_size_b:new u.aO(wt,q.u_pattern_size_b),u_scale_a:new u.aI(wt,q.u_scale_a),u_scale_b:new u.aI(wt,q.u_scale_b),u_pixel_coord_upper:new u.aO(wt,q.u_pixel_coord_upper),u_pixel_coord_lower:new u.aO(wt,q.u_pixel_coord_lower),u_tile_units_to_pixels:new u.aI(wt,q.u_tile_units_to_pixels)}),terrain:(wt,q)=>({u_matrix:new u.aJ(wt,q.u_matrix),u_texture:new u.aH(wt,q.u_texture),u_ele_delta:new u.aI(wt,q.u_ele_delta),u_fog_matrix:new u.aJ(wt,q.u_fog_matrix),u_fog_color:new u.aL(wt,q.u_fog_color),u_fog_ground_blend:new u.aI(wt,q.u_fog_ground_blend),u_fog_ground_blend_opacity:new u.aI(wt,q.u_fog_ground_blend_opacity),u_horizon_color:new u.aL(wt,q.u_horizon_color),u_horizon_fog_blend:new u.aI(wt,q.u_horizon_fog_blend)}),terrainDepth:(wt,q)=>({u_matrix:new u.aJ(wt,q.u_matrix),u_ele_delta:new u.aI(wt,q.u_ele_delta)}),terrainCoords:(wt,q)=>({u_matrix:new u.aJ(wt,q.u_matrix),u_texture:new u.aH(wt,q.u_texture),u_terrain_coords_id:new u.aI(wt,q.u_terrain_coords_id),u_ele_delta:new u.aI(wt,q.u_ele_delta)}),sky:(wt,q)=>({u_sky_color:new u.aL(wt,q.u_sky_color),u_horizon_color:new u.aL(wt,q.u_horizon_color),u_horizon:new u.aI(wt,q.u_horizon),u_sky_horizon_blend:new u.aI(wt,q.u_sky_horizon_blend)})};class Sc{constructor(q,Ae,it){this.context=q;const ot=q.gl;this.buffer=ot.createBuffer(),this.dynamicDraw=!!it,this.context.unbindVAO(),q.bindElementBuffer.set(this.buffer),ot.bufferData(ot.ELEMENT_ARRAY_BUFFER,Ae.arrayBuffer,this.dynamicDraw?ot.DYNAMIC_DRAW:ot.STATIC_DRAW),this.dynamicDraw||delete Ae.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(q){const Ae=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),Ae.bufferSubData(Ae.ELEMENT_ARRAY_BUFFER,0,q.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const Qo={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class Sl{constructor(q,Ae,it,ot){this.length=Ae.length,this.attributes=it,this.itemSize=Ae.bytesPerElement,this.dynamicDraw=ot,this.context=q;const bt=q.gl;this.buffer=bt.createBuffer(),q.bindVertexBuffer.set(this.buffer),bt.bufferData(bt.ARRAY_BUFFER,Ae.arrayBuffer,this.dynamicDraw?bt.DYNAMIC_DRAW:bt.STATIC_DRAW),this.dynamicDraw||delete Ae.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(q){if(q.length!==this.length)throw new Error(`Length of new data is ${q.length}, which doesn't match current length of ${this.length}`);const Ae=this.context.gl;this.bind(),Ae.bufferSubData(Ae.ARRAY_BUFFER,0,q.arrayBuffer)}enableAttributes(q,Ae){for(let it=0;it<this.attributes.length;it++){const ot=Ae.attributes[this.attributes[it].name];ot!==void 0&&q.enableVertexAttribArray(ot)}}setVertexAttribPointers(q,Ae,it){for(let ot=0;ot<this.attributes.length;ot++){const bt=this.attributes[ot],ar=Ae.attributes[bt.name];ar!==void 0&&q.vertexAttribPointer(ar,bt.components,q[Qo[bt.type]],!1,this.itemSize,bt.offset+this.itemSize*(it||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const gd=new WeakMap;function $f(wt){var q;if(gd.has(wt))return gd.get(wt);{const Ae=(q=wt.getParameter(wt.VERSION))===null||q===void 0?void 0:q.startsWith("WebGL 2.0");return gd.set(wt,Ae),Ae}}class wu{constructor(q){this.gl=q.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(q){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class Ad extends wu{getDefault(){return u.aM.transparent}set(q){const Ae=this.current;(q.r!==Ae.r||q.g!==Ae.g||q.b!==Ae.b||q.a!==Ae.a||this.dirty)&&(this.gl.clearColor(q.r,q.g,q.b,q.a),this.current=q,this.dirty=!1)}}class Bc extends wu{getDefault(){return 1}set(q){(q!==this.current||this.dirty)&&(this.gl.clearDepth(q),this.current=q,this.dirty=!1)}}class uf extends wu{getDefault(){return 0}set(q){(q!==this.current||this.dirty)&&(this.gl.clearStencil(q),this.current=q,this.dirty=!1)}}class Cd extends wu{getDefault(){return[!0,!0,!0,!0]}set(q){const Ae=this.current;(q[0]!==Ae[0]||q[1]!==Ae[1]||q[2]!==Ae[2]||q[3]!==Ae[3]||this.dirty)&&(this.gl.colorMask(q[0],q[1],q[2],q[3]),this.current=q,this.dirty=!1)}}class Tl extends wu{getDefault(){return!0}set(q){(q!==this.current||this.dirty)&&(this.gl.depthMask(q),this.current=q,this.dirty=!1)}}class Xu extends wu{getDefault(){return 255}set(q){(q!==this.current||this.dirty)&&(this.gl.stencilMask(q),this.current=q,this.dirty=!1)}}class pu extends wu{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(q){const Ae=this.current;(q.func!==Ae.func||q.ref!==Ae.ref||q.mask!==Ae.mask||this.dirty)&&(this.gl.stencilFunc(q.func,q.ref,q.mask),this.current=q,this.dirty=!1)}}class Zc extends wu{getDefault(){const q=this.gl;return[q.KEEP,q.KEEP,q.KEEP]}set(q){const Ae=this.current;(q[0]!==Ae[0]||q[1]!==Ae[1]||q[2]!==Ae[2]||this.dirty)&&(this.gl.stencilOp(q[0],q[1],q[2]),this.current=q,this.dirty=!1)}}class Md extends wu{getDefault(){return!1}set(q){if(q===this.current&&!this.dirty)return;const Ae=this.gl;q?Ae.enable(Ae.STENCIL_TEST):Ae.disable(Ae.STENCIL_TEST),this.current=q,this.dirty=!1}}class uu extends wu{getDefault(){return[0,1]}set(q){const Ae=this.current;(q[0]!==Ae[0]||q[1]!==Ae[1]||this.dirty)&&(this.gl.depthRange(q[0],q[1]),this.current=q,this.dirty=!1)}}class Lf extends wu{getDefault(){return!1}set(q){if(q===this.current&&!this.dirty)return;const Ae=this.gl;q?Ae.enable(Ae.DEPTH_TEST):Ae.disable(Ae.DEPTH_TEST),this.current=q,this.dirty=!1}}class op extends wu{getDefault(){return this.gl.LESS}set(q){(q!==this.current||this.dirty)&&(this.gl.depthFunc(q),this.current=q,this.dirty=!1)}}class zd extends wu{getDefault(){return!1}set(q){if(q===this.current&&!this.dirty)return;const Ae=this.gl;q?Ae.enable(Ae.BLEND):Ae.disable(Ae.BLEND),this.current=q,this.dirty=!1}}class Qp extends wu{getDefault(){const q=this.gl;return[q.ONE,q.ZERO]}set(q){const Ae=this.current;(q[0]!==Ae[0]||q[1]!==Ae[1]||this.dirty)&&(this.gl.blendFunc(q[0],q[1]),this.current=q,this.dirty=!1)}}class hh extends wu{getDefault(){return u.aM.transparent}set(q){const Ae=this.current;(q.r!==Ae.r||q.g!==Ae.g||q.b!==Ae.b||q.a!==Ae.a||this.dirty)&&(this.gl.blendColor(q.r,q.g,q.b,q.a),this.current=q,this.dirty=!1)}}class td extends wu{getDefault(){return this.gl.FUNC_ADD}set(q){(q!==this.current||this.dirty)&&(this.gl.blendEquation(q),this.current=q,this.dirty=!1)}}class ev extends wu{getDefault(){return!1}set(q){if(q===this.current&&!this.dirty)return;const Ae=this.gl;q?Ae.enable(Ae.CULL_FACE):Ae.disable(Ae.CULL_FACE),this.current=q,this.dirty=!1}}class Um extends wu{getDefault(){return this.gl.BACK}set(q){(q!==this.current||this.dirty)&&(this.gl.cullFace(q),this.current=q,this.dirty=!1)}}class Hm extends wu{getDefault(){return this.gl.CCW}set(q){(q!==this.current||this.dirty)&&(this.gl.frontFace(q),this.current=q,this.dirty=!1)}}class om extends wu{getDefault(){return null}set(q){(q!==this.current||this.dirty)&&(this.gl.useProgram(q),this.current=q,this.dirty=!1)}}class K0 extends wu{getDefault(){return this.gl.TEXTURE0}set(q){(q!==this.current||this.dirty)&&(this.gl.activeTexture(q),this.current=q,this.dirty=!1)}}class o1 extends wu{getDefault(){const q=this.gl;return[0,0,q.drawingBufferWidth,q.drawingBufferHeight]}set(q){const Ae=this.current;(q[0]!==Ae[0]||q[1]!==Ae[1]||q[2]!==Ae[2]||q[3]!==Ae[3]||this.dirty)&&(this.gl.viewport(q[0],q[1],q[2],q[3]),this.current=q,this.dirty=!1)}}class Of extends wu{getDefault(){return null}set(q){if(q===this.current&&!this.dirty)return;const Ae=this.gl;Ae.bindFramebuffer(Ae.FRAMEBUFFER,q),this.current=q,this.dirty=!1}}class xm extends wu{getDefault(){return null}set(q){if(q===this.current&&!this.dirty)return;const Ae=this.gl;Ae.bindRenderbuffer(Ae.RENDERBUFFER,q),this.current=q,this.dirty=!1}}class J0 extends wu{getDefault(){return null}set(q){if(q===this.current&&!this.dirty)return;const Ae=this.gl;Ae.bindTexture(Ae.TEXTURE_2D,q),this.current=q,this.dirty=!1}}class wp extends wu{getDefault(){return null}set(q){if(q===this.current&&!this.dirty)return;const Ae=this.gl;Ae.bindBuffer(Ae.ARRAY_BUFFER,q),this.current=q,this.dirty=!1}}class sp extends wu{getDefault(){return null}set(q){const Ae=this.gl;Ae.bindBuffer(Ae.ELEMENT_ARRAY_BUFFER,q),this.current=q,this.dirty=!1}}class Sp extends wu{getDefault(){return null}set(q){var Ae;if(q===this.current&&!this.dirty)return;const it=this.gl;$f(it)?it.bindVertexArray(q):(Ae=it.getExtension("OES_vertex_array_object"))===null||Ae===void 0||Ae.bindVertexArrayOES(q),this.current=q,this.dirty=!1}}class sm extends wu{getDefault(){return 4}set(q){if(q===this.current&&!this.dirty)return;const Ae=this.gl;Ae.pixelStorei(Ae.UNPACK_ALIGNMENT,q),this.current=q,this.dirty=!1}}class yd extends wu{getDefault(){return!1}set(q){if(q===this.current&&!this.dirty)return;const Ae=this.gl;Ae.pixelStorei(Ae.UNPACK_PREMULTIPLY_ALPHA_WEBGL,q),this.current=q,this.dirty=!1}}class lp extends wu{getDefault(){return!1}set(q){if(q===this.current&&!this.dirty)return;const Ae=this.gl;Ae.pixelStorei(Ae.UNPACK_FLIP_Y_WEBGL,q),this.current=q,this.dirty=!1}}class Uc extends wu{constructor(q,Ae){super(q),this.context=q,this.parent=Ae}getDefault(){return null}}class zf extends Uc{setDirty(){this.dirty=!0}set(q){if(q===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const Ae=this.gl;Ae.framebufferTexture2D(Ae.FRAMEBUFFER,Ae.COLOR_ATTACHMENT0,Ae.TEXTURE_2D,q,0),this.current=q,this.dirty=!1}}class jm extends Uc{set(q){if(q===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const Ae=this.gl;Ae.framebufferRenderbuffer(Ae.FRAMEBUFFER,Ae.DEPTH_ATTACHMENT,Ae.RENDERBUFFER,q),this.current=q,this.dirty=!1}}class hv extends Uc{set(q){if(q===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const Ae=this.gl;Ae.framebufferRenderbuffer(Ae.FRAMEBUFFER,Ae.DEPTH_STENCIL_ATTACHMENT,Ae.RENDERBUFFER,q),this.current=q,this.dirty=!1}}class og{constructor(q,Ae,it,ot,bt){this.context=q,this.width=Ae,this.height=it;const ar=q.gl,yr=this.framebuffer=ar.createFramebuffer();if(this.colorAttachment=new zf(q,yr),ot)this.depthAttachment=bt?new hv(q,yr):new jm(q,yr);else if(bt)throw new Error("Stencil cannot be set without depth");if(ar.checkFramebufferStatus(ar.FRAMEBUFFER)!==ar.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer is not complete")}destroy(){const q=this.context.gl,Ae=this.colorAttachment.get();if(Ae&&q.deleteTexture(Ae),this.depthAttachment){const it=this.depthAttachment.get();it&&q.deleteRenderbuffer(it)}q.deleteFramebuffer(this.framebuffer)}}class Bd{constructor(q,Ae,it){this.blendFunction=q,this.blendColor=Ae,this.mask=it}}Bd.Replace=[1,0],Bd.disabled=new Bd(Bd.Replace,u.aM.transparent,[!1,!1,!1,!1]),Bd.unblended=new Bd(Bd.Replace,u.aM.transparent,[!0,!0,!0,!0]),Bd.alphaBlended=new Bd([1,771],u.aM.transparent,[!0,!0,!0,!0]);class z1{constructor(q){var Ae,it;if(this.gl=q,this.clearColor=new Ad(this),this.clearDepth=new Bc(this),this.clearStencil=new uf(this),this.colorMask=new Cd(this),this.depthMask=new Tl(this),this.stencilMask=new Xu(this),this.stencilFunc=new pu(this),this.stencilOp=new Zc(this),this.stencilTest=new Md(this),this.depthRange=new uu(this),this.depthTest=new Lf(this),this.depthFunc=new op(this),this.blend=new zd(this),this.blendFunc=new Qp(this),this.blendColor=new hh(this),this.blendEquation=new td(this),this.cullFace=new ev(this),this.cullFaceSide=new Um(this),this.frontFace=new Hm(this),this.program=new om(this),this.activeTexture=new K0(this),this.viewport=new o1(this),this.bindFramebuffer=new Of(this),this.bindRenderbuffer=new xm(this),this.bindTexture=new J0(this),this.bindVertexBuffer=new wp(this),this.bindElementBuffer=new sp(this),this.bindVertexArray=new Sp(this),this.pixelStoreUnpack=new sm(this),this.pixelStoreUnpackPremultiplyAlpha=new yd(this),this.pixelStoreUnpackFlipY=new lp(this),this.extTextureFilterAnisotropic=q.getExtension("EXT_texture_filter_anisotropic")||q.getExtension("MOZ_EXT_texture_filter_anisotropic")||q.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=q.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=q.getParameter(q.MAX_TEXTURE_SIZE),$f(q)){this.HALF_FLOAT=q.HALF_FLOAT;const ot=q.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(Ae=q.RGBA16F)!==null&&Ae!==void 0?Ae:ot?.RGBA16F_EXT,this.RGB16F=(it=q.RGB16F)!==null&&it!==void 0?it:ot?.RGB16F_EXT,q.getExtension("EXT_color_buffer_float")}else{q.getExtension("EXT_color_buffer_half_float"),q.getExtension("OES_texture_half_float_linear");const ot=q.getExtension("OES_texture_half_float");this.HALF_FLOAT=ot?.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(q,Ae){return new Sc(this,q,Ae)}createVertexBuffer(q,Ae,it){return new Sl(this,q,Ae,it)}createRenderbuffer(q,Ae,it){const ot=this.gl,bt=ot.createRenderbuffer();return this.bindRenderbuffer.set(bt),ot.renderbufferStorage(ot.RENDERBUFFER,q,Ae,it),this.bindRenderbuffer.set(null),bt}createFramebuffer(q,Ae,it,ot){return new og(this,q,Ae,it,ot)}clear({color:q,depth:Ae,stencil:it}){const ot=this.gl;let bt=0;q&&(bt|=ot.COLOR_BUFFER_BIT,this.clearColor.set(q),this.colorMask.set([!0,!0,!0,!0])),Ae!==void 0&&(bt|=ot.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(Ae),this.depthMask.set(!0)),it!==void 0&&(bt|=ot.STENCIL_BUFFER_BIT,this.clearStencil.set(it),this.stencilMask.set(255)),ot.clear(bt)}setCullFace(q){q.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(q.mode),this.frontFace.set(q.frontFace))}setDepthMode(q){q.func!==this.gl.ALWAYS||q.mask?(this.depthTest.set(!0),this.depthFunc.set(q.func),this.depthMask.set(q.mask),this.depthRange.set(q.range)):this.depthTest.set(!1)}setStencilMode(q){q.test.func!==this.gl.ALWAYS||q.mask?(this.stencilTest.set(!0),this.stencilMask.set(q.mask),this.stencilOp.set([q.fail,q.depthFail,q.pass]),this.stencilFunc.set({func:q.test.func,ref:q.ref,mask:q.test.mask})):this.stencilTest.set(!1)}setColorMode(q){u.aE(q.blendFunction,Bd.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(q.blendFunction),this.blendColor.set(q.blendColor)),this.colorMask.set(q.mask)}createVertexArray(){var q;return $f(this.gl)?this.gl.createVertexArray():(q=this.gl.getExtension("OES_vertex_array_object"))===null||q===void 0?void 0:q.createVertexArrayOES()}deleteVertexArray(q){var Ae;return $f(this.gl)?this.gl.deleteVertexArray(q):(Ae=this.gl.getExtension("OES_vertex_array_object"))===null||Ae===void 0?void 0:Ae.deleteVertexArrayOES(q)}unbindVAO(){this.bindVertexArray.set(null)}}class Oc{constructor(q,Ae,it){this.func=q,this.mask=Ae,this.range=it}}Oc.ReadOnly=!1,Oc.ReadWrite=!0,Oc.disabled=new Oc(519,Oc.ReadOnly,[0,1]);const pb=7680;class mf{constructor(q,Ae,it,ot,bt,ar){this.test=q,this.ref=Ae,this.mask=it,this.fail=ot,this.depthFail=bt,this.pass=ar}}mf.disabled=new mf({func:519,mask:0},0,0,pb,pb,pb);class mu{constructor(q,Ae,it){this.enable=q,this.mode=Ae,this.frontFace=it}}let Wg;function lm(wt,q,Ae,it,ot){const bt=wt.context,ar=bt.gl,yr=wt.useProgram("collisionBox"),Ur=[];let ln=0,Cn=0;for(let cr=0;cr<it.length;cr++){const Sr=it[cr],gr=q.getTile(Sr).getBucket(Ae);if(!gr)continue;const Nr=ot?gr.textCollisionBox:gr.iconCollisionBox,vn=gr.collisionCircleArray;if(vn.length>0){const An=u.H();u.aQ(An,gr.placementInvProjMatrix,wt.transform.glCoordMatrix),u.aQ(An,An,gr.placementViewportMatrix),Ur.push({circleArray:vn,circleOffset:Cn,transform:Sr.posMatrix,invTransform:An,coord:Sr}),ln+=vn.length/4,Cn=ln}Nr&&yr.draw(bt,ar.LINES,Oc.disabled,mf.disabled,wt.colorModeForRenderPass(),mu.disabled,{u_matrix:Sr.posMatrix,u_pixel_extrude_scale:[1/(Pn=wt.transform).width,1/Pn.height]},wt.style.map.terrain&&wt.style.map.terrain.getTerrainData(Sr),Ae.id,Nr.layoutVertexBuffer,Nr.indexBuffer,Nr.segments,null,wt.transform.zoom,null,null,Nr.collisionVertexBuffer)}var Pn;if(!ot||!Ur.length)return;const vi=wt.useProgram("collisionCircle"),Ui=new u.aR;Ui.resize(4*ln),Ui._trim();let kt=0;for(const cr of Ur)for(let Sr=0;Sr<cr.circleArray.length/4;Sr++){const gr=4*Sr,Nr=cr.circleArray[gr+0],vn=cr.circleArray[gr+1],An=cr.circleArray[gr+2],Ln=cr.circleArray[gr+3];Ui.emplace(kt++,Nr,vn,An,Ln,0),Ui.emplace(kt++,Nr,vn,An,Ln,1),Ui.emplace(kt++,Nr,vn,An,Ln,2),Ui.emplace(kt++,Nr,vn,An,Ln,3)}(!Wg||Wg.length<2*ln)&&(Wg=(function(cr){const Sr=2*cr,gr=new u.aT;gr.resize(Sr),gr._trim();for(let Nr=0;Nr<Sr;Nr++){const vn=6*Nr;gr.uint16[vn+0]=4*Nr+0,gr.uint16[vn+1]=4*Nr+1,gr.uint16[vn+2]=4*Nr+2,gr.uint16[vn+3]=4*Nr+2,gr.uint16[vn+4]=4*Nr+3,gr.uint16[vn+5]=4*Nr+0}return gr})(ln));const zt=bt.createIndexBuffer(Wg,!0),Qt=bt.createVertexBuffer(Ui,u.aS.members,!0);for(const cr of Ur){const Sr=kl(cr.transform,cr.invTransform,wt.transform);vi.draw(bt,ar.TRIANGLES,Oc.disabled,mf.disabled,wt.colorModeForRenderPass(),mu.disabled,Sr,wt.style.map.terrain&&wt.style.map.terrain.getTerrainData(cr.coord),Ae.id,Qt,zt,u.a0.simpleSegment(0,2*cr.circleOffset,cr.circleArray.length,cr.circleArray.length/2),null,wt.transform.zoom,null,null,null)}Qt.destroy(),zt.destroy()}mu.disabled=new mu(!1,1029,2305),mu.backCCW=new mu(!0,1029,2305);const Hh=u.an(new Float32Array(16));function Q0(wt,q,Ae,it,ot,bt){const{horizontalAlign:ar,verticalAlign:yr}=u.au(wt);return new u.P((-(ar-.5)*q/ot+it[0])*bt,(-(yr-.5)*Ae/ot+it[1])*bt)}function sg(wt,q,Ae,it,ot,bt){const ar=q.tileAnchorPoint.add(new u.P(q.translation[0],q.translation[1]));if(q.pitchWithMap){let yr=it.mult(bt);Ae||(yr=yr.rotate(-ot));const Ur=ar.add(yr);return mr(Ur.x,Ur.y,q.labelPlaneMatrix,q.getElevation).point}if(Ae){const yr=lr(q.tileAnchorPoint.x+1,q.tileAnchorPoint.y,q).point.sub(wt),Ur=Math.atan(yr.y/yr.x)+(yr.x<0?Math.PI:0);return wt.add(it.rotate(Ur))}return wt.add(it)}function a0(wt,q,Ae,it,ot,bt,ar,yr,Ur,ln,Cn,Pn,vi,Ui){const kt=wt.text.placedSymbolArray,zt=wt.text.dynamicLayoutVertexArray,Qt=wt.icon.dynamicLayoutVertexArray,cr={};zt.clear();for(let Sr=0;Sr<kt.length;Sr++){const gr=kt.get(Sr),Nr=gr.hidden||!gr.crossTileID||wt.allowVerticalPlacement&&!gr.placedOrientation?null:it[gr.crossTileID];if(Nr){const vn=new u.P(gr.anchorX,gr.anchorY),An={getElevation:Ui,width:ot.width,height:ot.height,labelPlaneMatrix:bt,pitchWithMap:Ae,projection:Cn,tileAnchorPoint:vn,translation:Pn,unwrappedTileID:vi},Ln=Ae?mr(vn.x,vn.y,ar,Ui):lr(vn.x,vn.y,An),ai=St(ot.cameraToCenterDistance,Ln.signedDistanceFromCamera);let ki=u.ai(wt.textSizeData,Ur,gr)*ai/u.ap;Ae&&(ki*=wt.tilePixelRatio/yr);const{width:ra,height:oa,anchor:Ma,textOffset:mo,textBoxScale:ns}=Nr,$o=Q0(Ma,ra,oa,mo,ns,ki),as=Cn.getPitchedTextCorrection(ot,vn.add(new u.P(Pn[0],Pn[1])),vi),fl=sg(Ln.point,An,q,$o,ot.angle,as),Zl=wt.allowVerticalPlacement&&gr.placedOrientation===u.ah.vertical?Math.PI/2:0;for(let Fl=0;Fl<gr.numGlyphs;Fl++)u.aj(zt,fl,Zl);ln&&gr.associatedIconIndex>=0&&(cr[gr.associatedIconIndex]={shiftedAnchor:fl,angle:Zl})}else dn(gr.numGlyphs,zt)}if(ln){Qt.clear();const Sr=wt.icon.placedSymbolArray;for(let gr=0;gr<Sr.length;gr++){const Nr=Sr.get(gr);if(Nr.hidden)dn(Nr.numGlyphs,Qt);else{const vn=cr[gr];if(vn)for(let An=0;An<Nr.numGlyphs;An++)u.aj(Qt,vn.shiftedAnchor,vn.angle);else dn(Nr.numGlyphs,Qt)}}wt.icon.dynamicLayoutVertexBuffer.updateData(Qt)}wt.text.dynamicLayoutVertexBuffer.updateData(zt)}function up(wt,q,Ae){return Ae.iconsInText&&q?"symbolTextAndIcon":wt?"symbolSDF":"symbolIcon"}function s1(wt,q,Ae,it,ot,bt,ar,yr,Ur,ln,Cn,Pn){const vi=wt.context,Ui=vi.gl,kt=wt.transform,zt=xo(),Qt=yr==="map",cr=Ur==="map",Sr=yr!=="viewport"&&Ae.layout.get("symbol-placement")!=="point",gr=Qt&&!cr&&!Sr,Nr=!cr&&Sr,vn=!Ae.layout.get("symbol-sort-key").isConstant();let An=!1;const Ln=wt.depthModeForSublayer(0,Oc.ReadOnly),ai=Ae._unevaluatedLayout.hasValue("text-variable-anchor")||Ae._unevaluatedLayout.hasValue("text-variable-anchor-offset"),ki=[],ra=zt.getCircleRadiusCorrection(kt);for(const oa of it){const Ma=q.getTile(oa),mo=Ma.getBucket(Ae);if(!mo)continue;const ns=ot?mo.text:mo.icon;if(!ns||!ns.segments.get().length||!ns.hasVisibleVertices)continue;const $o=ns.programConfigurations.get(Ae.id),as=ot||mo.sdfIcons,fl=ot?mo.textSizeData:mo.iconSizeData,Zl=cr||kt.pitch!==0,Fl=wt.useProgram(up(as,ot,mo),$o),Du=u.ag(fl,kt.zoom),qc=wt.style.map.terrain&&wt.style.map.terrain.getTerrainData(oa);let Gc,_c,ef,Xd,kd=[0,0],Ec=null;if(ot)_c=Ma.glyphAtlasTexture,ef=Ui.LINEAR,Gc=Ma.glyphAtlasTexture.size,mo.iconsInText&&(kd=Ma.imageAtlasTexture.size,Ec=Ma.imageAtlasTexture,Xd=Zl||wt.options.rotating||wt.options.zooming||fl.kind==="composite"||fl.kind==="camera"?Ui.LINEAR:Ui.NEAREST);else{const Pi=Ae.layout.get("icon-size").constantOr(0)!==1||mo.iconsNeedLinear;_c=Ma.imageAtlasTexture,ef=as||wt.options.rotating||wt.options.zooming||Pi||Zl?Ui.LINEAR:Ui.NEAREST,Gc=Ma.imageAtlasTexture.size}const Ac=Oa(Ma,1,wt.transform.zoom),Ih=Nr?oa.posMatrix:Hh,Ep=In(Ih,cr,Qt,wt.transform,Ac),Iv=Gn(Ih,cr,Qt,wt.transform,Ac),$e=Gn(oa.posMatrix,cr,Qt,wt.transform,Ac),vt=zt.translatePosition(wt.transform,Ma,bt,ar),Bt=ai&&mo.hasTextData(),fr=Ae.layout.get("icon-text-fit")!=="none"&&Bt&&mo.hasIconData();if(Sr){const Pi=wt.style.map.terrain?(na,_o)=>wt.style.map.terrain.getElevation(oa,na,_o):null,Ji=Ae.layout.get("text-rotation-alignment")==="map";Et(mo,oa.posMatrix,wt,ot,Ep,$e,cr,ln,Ji,zt,oa.toUnwrapped(),kt.width,kt.height,vt,Pi)}const pr=oa.posMatrix,_r=ot&&ai||fr,Yr=Sr||_r?Hh:Ep,Wr=Iv,yn=as&&Ae.paint.get(ot?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let li;li=as?mo.iconsInText?qu(fl.kind,Du,gr,cr,Sr,_r,wt,pr,Yr,Wr,vt,Gc,kd,ra):xu(fl.kind,Du,gr,cr,Sr,_r,wt,pr,Yr,Wr,vt,ot,Gc,!0,ra):mc(fl.kind,Du,gr,cr,Sr,_r,wt,pr,Yr,Wr,vt,ot,Gc,ra);const ni={program:Fl,buffers:ns,uniformValues:li,atlasTexture:_c,atlasTextureIcon:Ec,atlasInterpolation:ef,atlasInterpolationIcon:Xd,isSDF:as,hasHalo:yn};if(vn&&mo.canOverlap){An=!0;const Pi=ns.segments.get();for(const Ji of Pi)ki.push({segments:new u.a0([Ji]),sortKey:Ji.sortKey,state:ni,terrainData:qc})}else ki.push({segments:ns.segments,sortKey:0,state:ni,terrainData:qc})}An&&ki.sort((oa,Ma)=>oa.sortKey-Ma.sortKey);for(const oa of ki){const Ma=oa.state;if(vi.activeTexture.set(Ui.TEXTURE0),Ma.atlasTexture.bind(Ma.atlasInterpolation,Ui.CLAMP_TO_EDGE),Ma.atlasTextureIcon&&(vi.activeTexture.set(Ui.TEXTURE1),Ma.atlasTextureIcon&&Ma.atlasTextureIcon.bind(Ma.atlasInterpolationIcon,Ui.CLAMP_TO_EDGE)),Ma.isSDF){const mo=Ma.uniformValues;Ma.hasHalo&&(mo.u_is_halo=1,Ay(Ma.buffers,oa.segments,Ae,wt,Ma.program,Ln,Cn,Pn,mo,oa.terrainData)),mo.u_is_halo=0}Ay(Ma.buffers,oa.segments,Ae,wt,Ma.program,Ln,Cn,Pn,Ma.uniformValues,oa.terrainData)}}function Ay(wt,q,Ae,it,ot,bt,ar,yr,Ur,ln){const Cn=it.context;ot.draw(Cn,Cn.gl.TRIANGLES,bt,ar,yr,mu.disabled,Ur,ln,Ae.id,wt.layoutVertexBuffer,wt.indexBuffer,q,Ae.paint,it.transform.zoom,wt.programConfigurations.get(Ae.id),wt.dynamicLayoutVertexBuffer,wt.opacityVertexBuffer)}function o0(wt,q,Ae,it){const ot=wt.context,bt=ot.gl,ar=mf.disabled,yr=new Bd([bt.ONE,bt.ONE],u.aM.transparent,[!0,!0,!0,!0]),Ur=q.getBucket(Ae);if(!Ur)return;const ln=it.key;let Cn=Ae.heatmapFbos.get(ln);Cn||(Cn=ey(ot,q.tileSize,q.tileSize),Ae.heatmapFbos.set(ln,Cn)),ot.bindFramebuffer.set(Cn.framebuffer),ot.viewport.set([0,0,q.tileSize,q.tileSize]),ot.clear({color:u.aM.transparent});const Pn=Ur.programConfigurations.get(Ae.id),vi=wt.useProgram("heatmap",Pn),Ui=wt.style.map.terrain.getTerrainData(it);vi.draw(ot,bt.TRIANGLES,Oc.disabled,ar,yr,mu.disabled,bu(it.posMatrix,q,wt.transform.zoom,Ae.paint.get("heatmap-intensity")),Ui,Ae.id,Ur.layoutVertexBuffer,Ur.indexBuffer,Ur.segments,Ae.paint,wt.transform.zoom,Pn)}function lg(wt,q,Ae){const it=wt.context,ot=it.gl;it.setColorMode(wt.colorModeForRenderPass());const bt=ty(it,q),ar=Ae.key,yr=q.heatmapFbos.get(ar);yr&&(it.activeTexture.set(ot.TEXTURE0),ot.bindTexture(ot.TEXTURE_2D,yr.colorAttachment.get()),it.activeTexture.set(ot.TEXTURE1),bt.bind(ot.LINEAR,ot.CLAMP_TO_EDGE),wt.useProgram("heatmapTexture").draw(it,ot.TRIANGLES,Oc.disabled,mf.disabled,wt.colorModeForRenderPass(),mu.disabled,yl(wt,q,0,1),null,q.id,wt.rasterBoundsBuffer,wt.quadTriangleIndexBuffer,wt.rasterBoundsSegments,q.paint,wt.transform.zoom),yr.destroy(),q.heatmapFbos.delete(ar))}function ey(wt,q,Ae){var it,ot;const bt=wt.gl,ar=bt.createTexture();bt.bindTexture(bt.TEXTURE_2D,ar),bt.texParameteri(bt.TEXTURE_2D,bt.TEXTURE_WRAP_S,bt.CLAMP_TO_EDGE),bt.texParameteri(bt.TEXTURE_2D,bt.TEXTURE_WRAP_T,bt.CLAMP_TO_EDGE),bt.texParameteri(bt.TEXTURE_2D,bt.TEXTURE_MIN_FILTER,bt.LINEAR),bt.texParameteri(bt.TEXTURE_2D,bt.TEXTURE_MAG_FILTER,bt.LINEAR);const yr=(it=wt.HALF_FLOAT)!==null&&it!==void 0?it:bt.UNSIGNED_BYTE,Ur=(ot=wt.RGBA16F)!==null&&ot!==void 0?ot:bt.RGBA;bt.texImage2D(bt.TEXTURE_2D,0,Ur,q,Ae,0,bt.RGBA,yr,null);const ln=wt.createFramebuffer(q,Ae,!1,!1);return ln.colorAttachment.set(ar),ln}function ty(wt,q){return q.colorRampTexture||(q.colorRampTexture=new y(wt,q.colorRamp,wt.gl.RGBA)),q.colorRampTexture}function um(wt,q,Ae,it,ot){if(!Ae||!it||!it.imageAtlas)return;const bt=it.imageAtlas.patternPositions;let ar=bt[Ae.to.toString()],yr=bt[Ae.from.toString()];if(!ar&&yr&&(ar=yr),!yr&&ar&&(yr=ar),!ar||!yr){const Ur=ot.getPaintProperty(q);ar=bt[Ur],yr=bt[Ur]}ar&&yr&&wt.setConstantPatternPositions(ar,yr)}function Cy(wt,q,Ae,it,ot,bt,ar){const yr=wt.context.gl,Ur="fill-pattern",ln=Ae.paint.get(Ur),Cn=ln&&ln.constantOr(1),Pn=Ae.getCrossfadeParameters();let vi,Ui,kt,zt,Qt;ar?(Ui=Cn&&!Ae.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",vi=yr.LINES):(Ui=Cn?"fillPattern":"fill",vi=yr.TRIANGLES);const cr=ln.constantOr(null);for(const Sr of it){const gr=q.getTile(Sr);if(Cn&&!gr.patternsLoaded())continue;const Nr=gr.getBucket(Ae);if(!Nr)continue;const vn=Nr.programConfigurations.get(Ae.id),An=wt.useProgram(Ui,vn),Ln=wt.style.map.terrain&&wt.style.map.terrain.getTerrainData(Sr);Cn&&(wt.context.activeTexture.set(yr.TEXTURE0),gr.imageAtlasTexture.bind(yr.LINEAR,yr.CLAMP_TO_EDGE),vn.updatePaintBuffers(Pn)),um(vn,Ur,cr,gr,Ae);const ai=Ln?Sr:null,ki=wt.translatePosMatrix(ai?ai.posMatrix:Sr.posMatrix,gr,Ae.paint.get("fill-translate"),Ae.paint.get("fill-translate-anchor"));if(ar){zt=Nr.indexBuffer2,Qt=Nr.segments2;const ra=[yr.drawingBufferWidth,yr.drawingBufferHeight];kt=Ui==="fillOutlinePattern"&&Cn?Vs(ki,wt,Pn,gr,ra):No(ki,ra)}else zt=Nr.indexBuffer,Qt=Nr.segments,kt=Cn?cs(ki,wt,Pn,gr):Ea(ki);An.draw(wt.context,vi,ot,wt.stencilModeForClipping(Sr),bt,mu.disabled,kt,Ln,Ae.id,Nr.layoutVertexBuffer,zt,Qt,Ae.paint,wt.transform.zoom,vn)}}function Vm(wt,q,Ae,it,ot,bt,ar){const yr=wt.context,Ur=yr.gl,ln="fill-extrusion-pattern",Cn=Ae.paint.get(ln),Pn=Cn.constantOr(1),vi=Ae.getCrossfadeParameters(),Ui=Ae.paint.get("fill-extrusion-opacity"),kt=Cn.constantOr(null);for(const zt of it){const Qt=q.getTile(zt),cr=Qt.getBucket(Ae);if(!cr)continue;const Sr=wt.style.map.terrain&&wt.style.map.terrain.getTerrainData(zt),gr=cr.programConfigurations.get(Ae.id),Nr=wt.useProgram(Pn?"fillExtrusionPattern":"fillExtrusion",gr);Pn&&(wt.context.activeTexture.set(Ur.TEXTURE0),Qt.imageAtlasTexture.bind(Ur.LINEAR,Ur.CLAMP_TO_EDGE),gr.updatePaintBuffers(vi)),um(gr,ln,kt,Qt,Ae);const vn=wt.translatePosMatrix(zt.posMatrix,Qt,Ae.paint.get("fill-extrusion-translate"),Ae.paint.get("fill-extrusion-translate-anchor")),An=Ae.paint.get("fill-extrusion-vertical-gradient"),Ln=Pn?ji(vn,wt,An,Ui,zt,vi,Qt):Ba(vn,wt,An,Ui);Nr.draw(yr,yr.gl.TRIANGLES,ot,bt,ar,mu.backCCW,Ln,Sr,Ae.id,cr.layoutVertexBuffer,cr.indexBuffer,cr.segments,Ae.paint,wt.transform.zoom,gr,wt.style.map.terrain&&cr.centroidVertexBuffer)}}function _m(wt,q,Ae,it,ot,bt,ar){const yr=wt.context,Ur=yr.gl,ln=Ae.fbo;if(!ln)return;const Cn=wt.useProgram("hillshade"),Pn=wt.style.map.terrain&&wt.style.map.terrain.getTerrainData(q);yr.activeTexture.set(Ur.TEXTURE0),Ur.bindTexture(Ur.TEXTURE_2D,ln.colorAttachment.get()),Cn.draw(yr,Ur.TRIANGLES,ot,bt,ar,mu.disabled,((vi,Ui,kt,zt)=>{const Qt=kt.paint.get("hillshade-shadow-color"),cr=kt.paint.get("hillshade-highlight-color"),Sr=kt.paint.get("hillshade-accent-color");let gr=kt.paint.get("hillshade-illumination-direction")*(Math.PI/180);kt.paint.get("hillshade-illumination-anchor")==="viewport"&&(gr-=vi.transform.angle);const Nr=!vi.options.moving;return{u_matrix:zt?zt.posMatrix:vi.transform.calculatePosMatrix(Ui.tileID.toUnwrapped(),Nr),u_image:0,u_latrange:ql(0,Ui.tileID),u_light:[kt.paint.get("hillshade-exaggeration"),gr],u_shadow:Qt,u_highlight:cr,u_accent:Sr}})(wt,Ae,it,Pn?q:null),Pn,it.id,wt.rasterBoundsBuffer,wt.quadTriangleIndexBuffer,wt.rasterBoundsSegments)}function cp(wt,q,Ae,it,ot,bt){const ar=wt.context,yr=ar.gl,Ur=q.dem;if(Ur&&Ur.data){const ln=Ur.dim,Cn=Ur.stride,Pn=Ur.getPixels();if(ar.activeTexture.set(yr.TEXTURE1),ar.pixelStoreUnpackPremultiplyAlpha.set(!1),q.demTexture=q.demTexture||wt.getTileTexture(Cn),q.demTexture){const Ui=q.demTexture;Ui.update(Pn,{premultiply:!1}),Ui.bind(yr.NEAREST,yr.CLAMP_TO_EDGE)}else q.demTexture=new y(ar,Pn,yr.RGBA,{premultiply:!1}),q.demTexture.bind(yr.NEAREST,yr.CLAMP_TO_EDGE);ar.activeTexture.set(yr.TEXTURE0);let vi=q.fbo;if(!vi){const Ui=new y(ar,{width:ln,height:ln,data:null},yr.RGBA);Ui.bind(yr.LINEAR,yr.CLAMP_TO_EDGE),vi=q.fbo=ar.createFramebuffer(ln,ln,!0,!1),vi.colorAttachment.set(Ui.texture)}ar.bindFramebuffer.set(vi.framebuffer),ar.viewport.set([0,0,ln,ln]),wt.useProgram("hillshadePrepare").draw(ar,yr.TRIANGLES,it,ot,bt,mu.disabled,((Ui,kt)=>{const zt=kt.stride,Qt=u.H();return u.aP(Qt,0,u.X,-u.X,0,0,1),u.J(Qt,Qt,[0,-u.X,0]),{u_matrix:Qt,u_image:1,u_dimension:[zt,zt],u_zoom:Ui.overscaledZ,u_unpack:kt.getUnpackVector()}})(q.tileID,Ur),null,Ae.id,wt.rasterBoundsBuffer,wt.quadTriangleIndexBuffer,wt.rasterBoundsSegments),q.needsHillshadePrepare=!1}}function Rg(wt,q,Ae,it,ot,bt){const ar=it.paint.get("raster-fade-duration");if(!bt&&ar>0){const yr=v.now(),Ur=(yr-wt.timeAdded)/ar,ln=q?(yr-q.timeAdded)/ar:-1,Cn=Ae.getSource(),Pn=ot.coveringZoomLevel({tileSize:Cn.tileSize,roundZoom:Cn.roundZoom}),vi=!q||Math.abs(q.tileID.overscaledZ-Pn)>Math.abs(wt.tileID.overscaledZ-Pn),Ui=vi&&wt.refreshedUponExpiration?1:u.ac(vi?Ur:1-ln,0,1);return wt.refreshedUponExpiration&&Ur>=1&&(wt.refreshedUponExpiration=!1),q?{opacity:1,mix:1-Ui}:{opacity:Ui,mix:0}}return{opacity:1,mix:0}}const ry=new u.aM(1,0,0,1),Wf=new u.aM(0,1,0,1),E0=new u.aM(0,0,1,1),B1=new u.aM(1,0,1,1),My=new u.aM(0,1,1,1);function s0(wt,q,Ae,it){Av(wt,0,q+Ae/2,wt.transform.width,Ae,it)}function Ry(wt,q,Ae,it){Av(wt,q-Ae/2,0,Ae,wt.transform.height,it)}function Av(wt,q,Ae,it,ot,bt){const ar=wt.context,yr=ar.gl;yr.enable(yr.SCISSOR_TEST),yr.scissor(q*wt.pixelRatio,Ae*wt.pixelRatio,it*wt.pixelRatio,ot*wt.pixelRatio),ar.clear({color:bt}),yr.disable(yr.SCISSOR_TEST)}function ky(wt,q,Ae){const it=wt.context,ot=it.gl,bt=Ae.posMatrix,ar=wt.useProgram("debug"),yr=Oc.disabled,Ur=mf.disabled,ln=wt.colorModeForRenderPass(),Cn="$debug",Pn=wt.style.map.terrain&&wt.style.map.terrain.getTerrainData(Ae);it.activeTexture.set(ot.TEXTURE0);const vi=q.getTileByID(Ae.key).latestRawTileData,Ui=Math.floor((vi&&vi.byteLength||0)/1024),kt=q.getTile(Ae).tileSize,zt=512/Math.min(kt,512)*(Ae.overscaledZ/wt.transform.zoom)*.5;let Qt=Ae.canonical.toString();Ae.overscaledZ!==Ae.canonical.z&&(Qt+=` => ${Ae.overscaledZ}`),(function(cr,Sr){cr.initDebugOverlayCanvas();const gr=cr.debugOverlayCanvas,Nr=cr.context.gl,vn=cr.debugOverlayCanvas.getContext("2d");vn.clearRect(0,0,gr.width,gr.height),vn.shadowColor="white",vn.shadowBlur=2,vn.lineWidth=1.5,vn.strokeStyle="white",vn.textBaseline="top",vn.font="bold 36px Open Sans, sans-serif",vn.fillText(Sr,5,5),vn.strokeText(Sr,5,5),cr.debugOverlayTexture.update(gr),cr.debugOverlayTexture.bind(Nr.LINEAR,Nr.CLAMP_TO_EDGE)})(wt,`${Qt} ${Ui}kB`),ar.draw(it,ot.TRIANGLES,yr,Ur,Bd.alphaBlended,mu.disabled,El(bt,u.aM.transparent,zt),null,Cn,wt.debugBuffer,wt.quadTriangleIndexBuffer,wt.debugSegments),ar.draw(it,ot.LINE_STRIP,yr,Ur,ln,mu.disabled,El(bt,u.aM.red),Pn,Cn,wt.debugBuffer,wt.tileBorderIndexBuffer,wt.debugSegments)}function uh(wt,q,Ae){const it=wt.context,ot=it.gl,bt=wt.colorModeForRenderPass(),ar=new Oc(ot.LEQUAL,Oc.ReadWrite,wt.depthRangeFor3D),yr=wt.useProgram("terrain"),Ur=q.getTerrainMesh();it.bindFramebuffer.set(null),it.viewport.set([0,0,wt.width,wt.height]);for(const ln of Ae){const Cn=wt.renderToTexture.getTexture(ln),Pn=q.getTerrainData(ln.tileID);it.activeTexture.set(ot.TEXTURE0),ot.bindTexture(ot.TEXTURE_2D,Cn.texture);const vi=wt.transform.calculatePosMatrix(ln.tileID.toUnwrapped()),Ui=q.getMeshFrameDelta(wt.transform.zoom),kt=wt.transform.calculateFogMatrix(ln.tileID.toUnwrapped()),zt=Xn(vi,Ui,kt,wt.style.sky,wt.transform.pitch);yr.draw(it,ot.TRIANGLES,ar,mf.disabled,bt,mu.backCCW,zt,Pn,"terrain",Ur.vertexBuffer,Ur.indexBuffer,Ur.segments)}}class Cv{constructor(q,Ae,it){this.vertexBuffer=q,this.indexBuffer=Ae,this.segments=it}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class ug{constructor(q,Ae){this.context=new z1(q),this.transform=Ae,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:u.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=Pr.maxUnderzooming+Pr.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new pi}resize(q,Ae,it){if(this.width=Math.floor(q*it),this.height=Math.floor(Ae*it),this.pixelRatio=it,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const ot of this.style._order)this.style._layers[ot].resize()}setup(){const q=this.context,Ae=new u.aX;Ae.emplaceBack(0,0),Ae.emplaceBack(u.X,0),Ae.emplaceBack(0,u.X),Ae.emplaceBack(u.X,u.X),this.tileExtentBuffer=q.createVertexBuffer(Ae,$i.members),this.tileExtentSegments=u.a0.simpleSegment(0,0,4,2);const it=new u.aX;it.emplaceBack(0,0),it.emplaceBack(u.X,0),it.emplaceBack(0,u.X),it.emplaceBack(u.X,u.X),this.debugBuffer=q.createVertexBuffer(it,$i.members),this.debugSegments=u.a0.simpleSegment(0,0,4,5);const ot=new u.$;ot.emplaceBack(0,0,0,0),ot.emplaceBack(u.X,0,u.X,0),ot.emplaceBack(0,u.X,0,u.X),ot.emplaceBack(u.X,u.X,u.X,u.X),this.rasterBoundsBuffer=q.createVertexBuffer(ot,Rt.members),this.rasterBoundsSegments=u.a0.simpleSegment(0,0,4,2);const bt=new u.aX;bt.emplaceBack(0,0),bt.emplaceBack(1,0),bt.emplaceBack(0,1),bt.emplaceBack(1,1),this.viewportBuffer=q.createVertexBuffer(bt,$i.members),this.viewportSegments=u.a0.simpleSegment(0,0,4,2);const ar=new u.aZ;ar.emplaceBack(0),ar.emplaceBack(1),ar.emplaceBack(3),ar.emplaceBack(2),ar.emplaceBack(0),this.tileBorderIndexBuffer=q.createIndexBuffer(ar);const yr=new u.aY;yr.emplaceBack(0,1,2),yr.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=q.createIndexBuffer(yr);const Ur=this.context.gl;this.stencilClearMode=new mf({func:Ur.ALWAYS,mask:0},0,255,Ur.ZERO,Ur.ZERO,Ur.ZERO)}clearStencil(){const q=this.context,Ae=q.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const it=u.H();u.aP(it,0,this.width,this.height,0,0,1),u.K(it,it,[Ae.drawingBufferWidth,Ae.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(q,Ae.TRIANGLES,Oc.disabled,this.stencilClearMode,Bd.disabled,mu.disabled,iu(it),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(q,Ae){if(this.currentStencilSource===q.source||!q.isTileClipped()||!Ae||!Ae.length)return;this.currentStencilSource=q.source;const it=this.context,ot=it.gl;this.nextStencilID+Ae.length>256&&this.clearStencil(),it.setColorMode(Bd.disabled),it.setDepthMode(Oc.disabled);const bt=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const ar of Ae){const yr=this._tileClippingMaskIDs[ar.key]=this.nextStencilID++,Ur=this.style.map.terrain&&this.style.map.terrain.getTerrainData(ar);bt.draw(it,ot.TRIANGLES,Oc.disabled,new mf({func:ot.ALWAYS,mask:0},yr,255,ot.KEEP,ot.KEEP,ot.REPLACE),Bd.disabled,mu.disabled,iu(ar.posMatrix),Ur,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const q=this.nextStencilID++,Ae=this.context.gl;return new mf({func:Ae.NOTEQUAL,mask:255},q,255,Ae.KEEP,Ae.KEEP,Ae.REPLACE)}stencilModeForClipping(q){const Ae=this.context.gl;return new mf({func:Ae.EQUAL,mask:255},this._tileClippingMaskIDs[q.key],0,Ae.KEEP,Ae.KEEP,Ae.REPLACE)}stencilConfigForOverlap(q){const Ae=this.context.gl,it=q.sort((ar,yr)=>yr.overscaledZ-ar.overscaledZ),ot=it[it.length-1].overscaledZ,bt=it[0].overscaledZ-ot+1;if(bt>1){this.currentStencilSource=void 0,this.nextStencilID+bt>256&&this.clearStencil();const ar={};for(let yr=0;yr<bt;yr++)ar[yr+ot]=new mf({func:Ae.GEQUAL,mask:255},yr+this.nextStencilID,255,Ae.KEEP,Ae.KEEP,Ae.REPLACE);return this.nextStencilID+=bt,[ar,it]}return[{[ot]:mf.disabled},it]}colorModeForRenderPass(){const q=this.context.gl;return this._showOverdrawInspector?new Bd([q.CONSTANT_COLOR,q.ONE],new u.aM(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?Bd.unblended:Bd.alphaBlended}depthModeForSublayer(q,Ae,it){if(!this.opaquePassEnabledForLayer())return Oc.disabled;const ot=1-((1+this.currentLayer)*this.numSublayers+q)*this.depthEpsilon;return new Oc(it||this.context.gl.LEQUAL,Ae,[ot,ot])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(q,Ae){this.style=q,this.options=Ae,this.lineAtlas=q.lineAtlas,this.imageManager=q.imageManager,this.glyphManager=q.glyphManager,this.symbolFadeChange=q.placement.symbolFadeChange(v.now()),this.imageManager.beginFrame();const it=this.style._order,ot=this.style.sourceCaches,bt={},ar={},yr={};for(const Ur in ot){const ln=ot[Ur];ln.used&&ln.prepare(this.context),bt[Ur]=ln.getVisibleCoordinates(),ar[Ur]=bt[Ur].slice().reverse(),yr[Ur]=ln.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let Ur=0;Ur<it.length;Ur++)if(this.style._layers[it[Ur]].is3D()){this.opaquePassCutoff=Ur;break}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(const Ur of it){const ln=this.style._layers[Ur];if(!ln.hasOffscreenPass()||ln.isHidden(this.transform.zoom))continue;const Cn=ar[ln.source];(ln.type==="custom"||Cn.length)&&this.renderLayer(this,ot[ln.source],ln,Cn)}if(this.context.bindFramebuffer.set(null),this.context.clear({color:Ae.showOverdrawInspector?u.aM.black:u.aM.transparent,depth:1}),this.clearStencil(),this.style.sky&&(function(Ur,ln){const Cn=Ur.context,Pn=Cn.gl,vi=((cr,Sr,gr)=>({u_sky_color:cr.properties.get("sky-color"),u_horizon_color:cr.properties.get("horizon-color"),u_horizon:(Sr.height/2+Sr.getHorizon())*gr,u_sky_horizon_blend:cr.properties.get("sky-horizon-blend")*Sr.height/2*gr}))(ln,Ur.style.map.transform,Ur.pixelRatio),Ui=new Oc(Pn.LEQUAL,Oc.ReadWrite,[0,1]),kt=mf.disabled,zt=Ur.colorModeForRenderPass(),Qt=Ur.useProgram("sky");if(!ln.mesh){const cr=new u.aX;cr.emplaceBack(-1,-1),cr.emplaceBack(1,-1),cr.emplaceBack(1,1),cr.emplaceBack(-1,1);const Sr=new u.aY;Sr.emplaceBack(0,1,2),Sr.emplaceBack(0,2,3),ln.mesh=new Cv(Cn.createVertexBuffer(cr,$i.members),Cn.createIndexBuffer(Sr),u.a0.simpleSegment(0,0,cr.length,Sr.length))}Qt.draw(Cn,Pn.TRIANGLES,Ui,kt,zt,mu.disabled,vi,void 0,"sky",ln.mesh.vertexBuffer,ln.mesh.indexBuffer,ln.mesh.segments)})(this,this.style.sky),this._showOverdrawInspector=Ae.showOverdrawInspector,this.depthRangeFor3D=[0,1-(q._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=it.length-1;this.currentLayer>=0;this.currentLayer--){const Ur=this.style._layers[it[this.currentLayer]],ln=ot[Ur.source],Cn=bt[Ur.source];this._renderTileClippingMasks(Ur,Cn),this.renderLayer(this,ln,Ur,Cn)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<it.length;this.currentLayer++){const Ur=this.style._layers[it[this.currentLayer]],ln=ot[Ur.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(Ur))continue;const Cn=(Ur.type==="symbol"?yr:ar)[Ur.source];this._renderTileClippingMasks(Ur,bt[Ur.source]),this.renderLayer(this,ln,Ur,Cn)}if(this.options.showTileBoundaries){const Ur=(function(ln,Cn){let Pn=null;const vi=Object.values(ln._layers).flatMap(Qt=>Qt.source&&!Qt.isHidden(Cn)?[ln.sourceCaches[Qt.source]]:[]),Ui=vi.filter(Qt=>Qt.getSource().type==="vector"),kt=vi.filter(Qt=>Qt.getSource().type!=="vector"),zt=Qt=>{(!Pn||Pn.getSource().maxzoom<Qt.getSource().maxzoom)&&(Pn=Qt)};return Ui.forEach(Qt=>zt(Qt)),Pn||kt.forEach(Qt=>zt(Qt)),Pn})(this.style,this.transform.zoom);Ur&&(function(ln,Cn,Pn){for(let vi=0;vi<Pn.length;vi++)ky(ln,Cn,Pn[vi])})(this,Ur,Ur.getVisibleCoordinates())}this.options.showPadding&&(function(Ur){const ln=Ur.transform.padding;s0(Ur,Ur.transform.height-(ln.top||0),3,ry),s0(Ur,ln.bottom||0,3,Wf),Ry(Ur,ln.left||0,3,E0),Ry(Ur,Ur.transform.width-(ln.right||0),3,B1);const Cn=Ur.transform.centerPoint;(function(Pn,vi,Ui,kt){Av(Pn,vi-1,Ui-10,2,20,kt),Av(Pn,vi-10,Ui-1,20,2,kt)})(Ur,Cn.x,Ur.transform.height-Cn.y,My)})(this),this.context.setDefault()}maybeDrawDepthAndCoords(q){if(!this.style||!this.style.map||!this.style.map.terrain)return;const Ae=this.terrainFacilitator.matrix,it=this.transform.modelViewProjectionMatrix;let ot=this.terrainFacilitator.dirty;ot||(ot=q?!u.a_(Ae,it):!u.a$(Ae,it)),ot||(ot=this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length>0),ot&&(u.b0(Ae,it),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,(function(bt,ar){const yr=bt.context,Ur=yr.gl,ln=Bd.unblended,Cn=new Oc(Ur.LEQUAL,Oc.ReadWrite,[0,1]),Pn=ar.getTerrainMesh(),vi=ar.sourceCache.getRenderableTiles(),Ui=bt.useProgram("terrainDepth");yr.bindFramebuffer.set(ar.getFramebuffer("depth").framebuffer),yr.viewport.set([0,0,bt.width/devicePixelRatio,bt.height/devicePixelRatio]),yr.clear({color:u.aM.transparent,depth:1});for(const kt of vi){const zt=ar.getTerrainData(kt.tileID),Qt={u_matrix:bt.transform.calculatePosMatrix(kt.tileID.toUnwrapped()),u_ele_delta:ar.getMeshFrameDelta(bt.transform.zoom)};Ui.draw(yr,Ur.TRIANGLES,Cn,mf.disabled,ln,mu.backCCW,Qt,zt,"terrain",Pn.vertexBuffer,Pn.indexBuffer,Pn.segments)}yr.bindFramebuffer.set(null),yr.viewport.set([0,0,bt.width,bt.height])})(this,this.style.map.terrain),(function(bt,ar){const yr=bt.context,Ur=yr.gl,ln=Bd.unblended,Cn=new Oc(Ur.LEQUAL,Oc.ReadWrite,[0,1]),Pn=ar.getTerrainMesh(),vi=ar.getCoordsTexture(),Ui=ar.sourceCache.getRenderableTiles(),kt=bt.useProgram("terrainCoords");yr.bindFramebuffer.set(ar.getFramebuffer("coords").framebuffer),yr.viewport.set([0,0,bt.width/devicePixelRatio,bt.height/devicePixelRatio]),yr.clear({color:u.aM.transparent,depth:1}),ar.coordsIndex=[];for(const zt of Ui){const Qt=ar.getTerrainData(zt.tileID);yr.activeTexture.set(Ur.TEXTURE0),Ur.bindTexture(Ur.TEXTURE_2D,vi.texture);const cr={u_matrix:bt.transform.calculatePosMatrix(zt.tileID.toUnwrapped()),u_terrain_coords_id:(255-ar.coordsIndex.length)/255,u_texture:0,u_ele_delta:ar.getMeshFrameDelta(bt.transform.zoom)};kt.draw(yr,Ur.TRIANGLES,Cn,mf.disabled,ln,mu.backCCW,cr,Qt,"terrain",Pn.vertexBuffer,Pn.indexBuffer,Pn.segments),ar.coordsIndex.push(zt.tileID.key)}yr.bindFramebuffer.set(null),yr.viewport.set([0,0,bt.width,bt.height])})(this,this.style.map.terrain))}renderLayer(q,Ae,it,ot){if(!it.isHidden(this.transform.zoom)&&(it.type==="background"||it.type==="custom"||(ot||[]).length))switch(this.id=it.id,it.type){case"symbol":(function(bt,ar,yr,Ur,ln){if(bt.renderPass!=="translucent")return;const Cn=mf.disabled,Pn=bt.colorModeForRenderPass();(yr._unevaluatedLayout.hasValue("text-variable-anchor")||yr._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&(function(vi,Ui,kt,zt,Qt,cr,Sr,gr,Nr){const vn=Ui.transform,An=xo(),Ln=Qt==="map",ai=cr==="map";for(const ki of vi){const ra=zt.getTile(ki),oa=ra.getBucket(kt);if(!oa||!oa.text||!oa.text.segments.get().length)continue;const Ma=u.ag(oa.textSizeData,vn.zoom),mo=Oa(ra,1,Ui.transform.zoom),ns=In(ki.posMatrix,ai,Ln,Ui.transform,mo),$o=kt.layout.get("icon-text-fit")!=="none"&&oa.hasIconData();if(Ma){const as=Math.pow(2,vn.zoom-ra.tileID.overscaledZ),fl=Ui.style.map.terrain?(Fl,Du)=>Ui.style.map.terrain.getElevation(ki,Fl,Du):null,Zl=An.translatePosition(vn,ra,Sr,gr);a0(oa,Ln,ai,Nr,vn,ns,ki.posMatrix,as,Ma,$o,An,Zl,ki.toUnwrapped(),fl)}}})(Ur,bt,yr,ar,yr.layout.get("text-rotation-alignment"),yr.layout.get("text-pitch-alignment"),yr.paint.get("text-translate"),yr.paint.get("text-translate-anchor"),ln),yr.paint.get("icon-opacity").constantOr(1)!==0&&s1(bt,ar,yr,Ur,!1,yr.paint.get("icon-translate"),yr.paint.get("icon-translate-anchor"),yr.layout.get("icon-rotation-alignment"),yr.layout.get("icon-pitch-alignment"),yr.layout.get("icon-keep-upright"),Cn,Pn),yr.paint.get("text-opacity").constantOr(1)!==0&&s1(bt,ar,yr,Ur,!0,yr.paint.get("text-translate"),yr.paint.get("text-translate-anchor"),yr.layout.get("text-rotation-alignment"),yr.layout.get("text-pitch-alignment"),yr.layout.get("text-keep-upright"),Cn,Pn),ar.map.showCollisionBoxes&&(lm(bt,ar,yr,Ur,!0),lm(bt,ar,yr,Ur,!1))})(q,Ae,it,ot,this.style.placement.variableOffsets);break;case"circle":(function(bt,ar,yr,Ur){if(bt.renderPass!=="translucent")return;const ln=yr.paint.get("circle-opacity"),Cn=yr.paint.get("circle-stroke-width"),Pn=yr.paint.get("circle-stroke-opacity"),vi=!yr.layout.get("circle-sort-key").isConstant();if(ln.constantOr(1)===0&&(Cn.constantOr(1)===0||Pn.constantOr(1)===0))return;const Ui=bt.context,kt=Ui.gl,zt=bt.depthModeForSublayer(0,Oc.ReadOnly),Qt=mf.disabled,cr=bt.colorModeForRenderPass(),Sr=[];for(let gr=0;gr<Ur.length;gr++){const Nr=Ur[gr],vn=ar.getTile(Nr),An=vn.getBucket(yr);if(!An)continue;const Ln=An.programConfigurations.get(yr.id),ai=bt.useProgram("circle",Ln),ki=An.layoutVertexBuffer,ra=An.indexBuffer,oa=bt.style.map.terrain&&bt.style.map.terrain.getTerrainData(Nr),Ma={programConfiguration:Ln,program:ai,layoutVertexBuffer:ki,indexBuffer:ra,uniformValues:pl(bt,Nr,vn,yr),terrainData:oa};if(vi){const mo=An.segments.get();for(const ns of mo)Sr.push({segments:new u.a0([ns]),sortKey:ns.sortKey,state:Ma})}else Sr.push({segments:An.segments,sortKey:0,state:Ma})}vi&&Sr.sort((gr,Nr)=>gr.sortKey-Nr.sortKey);for(const gr of Sr){const{programConfiguration:Nr,program:vn,layoutVertexBuffer:An,indexBuffer:Ln,uniformValues:ai,terrainData:ki}=gr.state;vn.draw(Ui,kt.TRIANGLES,zt,Qt,cr,mu.disabled,ai,ki,yr.id,An,Ln,gr.segments,yr.paint,bt.transform.zoom,Nr)}})(q,Ae,it,ot);break;case"heatmap":(function(bt,ar,yr,Ur){if(yr.paint.get("heatmap-opacity")===0)return;const ln=bt.context;if(bt.style.map.terrain){for(const Cn of Ur){const Pn=ar.getTile(Cn);ar.hasRenderableParent(Cn)||(bt.renderPass==="offscreen"?o0(bt,Pn,yr,Cn):bt.renderPass==="translucent"&&lg(bt,yr,Cn))}ln.viewport.set([0,0,bt.width,bt.height])}else bt.renderPass==="offscreen"?(function(Cn,Pn,vi,Ui){const kt=Cn.context,zt=kt.gl,Qt=mf.disabled,cr=new Bd([zt.ONE,zt.ONE],u.aM.transparent,[!0,!0,!0,!0]);(function(Sr,gr,Nr){const vn=Sr.gl;Sr.activeTexture.set(vn.TEXTURE1),Sr.viewport.set([0,0,gr.width/4,gr.height/4]);let An=Nr.heatmapFbos.get(u.aU);An?(vn.bindTexture(vn.TEXTURE_2D,An.colorAttachment.get()),Sr.bindFramebuffer.set(An.framebuffer)):(An=ey(Sr,gr.width/4,gr.height/4),Nr.heatmapFbos.set(u.aU,An))})(kt,Cn,vi),kt.clear({color:u.aM.transparent});for(let Sr=0;Sr<Ui.length;Sr++){const gr=Ui[Sr];if(Pn.hasRenderableParent(gr))continue;const Nr=Pn.getTile(gr),vn=Nr.getBucket(vi);if(!vn)continue;const An=vn.programConfigurations.get(vi.id),Ln=Cn.useProgram("heatmap",An),{zoom:ai}=Cn.transform;Ln.draw(kt,zt.TRIANGLES,Oc.disabled,Qt,cr,mu.disabled,bu(gr.posMatrix,Nr,ai,vi.paint.get("heatmap-intensity")),null,vi.id,vn.layoutVertexBuffer,vn.indexBuffer,vn.segments,vi.paint,Cn.transform.zoom,An)}kt.viewport.set([0,0,Cn.width,Cn.height])})(bt,ar,yr,Ur):bt.renderPass==="translucent"&&(function(Cn,Pn){const vi=Cn.context,Ui=vi.gl;vi.setColorMode(Cn.colorModeForRenderPass());const kt=Pn.heatmapFbos.get(u.aU);kt&&(vi.activeTexture.set(Ui.TEXTURE0),Ui.bindTexture(Ui.TEXTURE_2D,kt.colorAttachment.get()),vi.activeTexture.set(Ui.TEXTURE1),ty(vi,Pn).bind(Ui.LINEAR,Ui.CLAMP_TO_EDGE),Cn.useProgram("heatmapTexture").draw(vi,Ui.TRIANGLES,Oc.disabled,mf.disabled,Cn.colorModeForRenderPass(),mu.disabled,yl(Cn,Pn,0,1),null,Pn.id,Cn.viewportBuffer,Cn.quadTriangleIndexBuffer,Cn.viewportSegments,Pn.paint,Cn.transform.zoom))})(bt,yr)})(q,Ae,it,ot);break;case"line":(function(bt,ar,yr,Ur){if(bt.renderPass!=="translucent")return;const ln=yr.paint.get("line-opacity"),Cn=yr.paint.get("line-width");if(ln.constantOr(1)===0||Cn.constantOr(1)===0)return;const Pn=bt.depthModeForSublayer(0,Oc.ReadOnly),vi=bt.colorModeForRenderPass(),Ui=yr.paint.get("line-dasharray"),kt=yr.paint.get("line-pattern"),zt=kt.constantOr(1),Qt=yr.paint.get("line-gradient"),cr=yr.getCrossfadeParameters(),Sr=zt?"linePattern":Ui?"lineSDF":Qt?"lineGradient":"line",gr=bt.context,Nr=gr.gl;let vn=!0;for(const An of Ur){const Ln=ar.getTile(An);if(zt&&!Ln.patternsLoaded())continue;const ai=Ln.getBucket(yr);if(!ai)continue;const ki=ai.programConfigurations.get(yr.id),ra=bt.context.program.get(),oa=bt.useProgram(Sr,ki),Ma=vn||oa.program!==ra,mo=bt.style.map.terrain&&bt.style.map.terrain.getTerrainData(An),ns=kt.constantOr(null);if(ns&&Ln.imageAtlas){const fl=Ln.imageAtlas,Zl=fl.patternPositions[ns.to.toString()],Fl=fl.patternPositions[ns.from.toString()];Zl&&Fl&&ki.setConstantPatternPositions(Zl,Fl)}const $o=mo?An:null,as=zt?Pf(bt,Ln,yr,cr,$o):Ui?ju(bt,Ln,yr,Ui,cr,$o):Qt?zc(bt,Ln,yr,ai.lineClipsArray.length,$o):rc(bt,Ln,yr,$o);if(zt)gr.activeTexture.set(Nr.TEXTURE0),Ln.imageAtlasTexture.bind(Nr.LINEAR,Nr.CLAMP_TO_EDGE),ki.updatePaintBuffers(cr);else if(Ui&&(Ma||bt.lineAtlas.dirty))gr.activeTexture.set(Nr.TEXTURE0),bt.lineAtlas.bind(gr);else if(Qt){const fl=ai.gradients[yr.id];let Zl=fl.texture;if(yr.gradientVersion!==fl.version){let Fl=256;if(yr.stepInterpolant){const Du=ar.getSource().maxzoom,qc=An.canonical.z===Du?Math.ceil(1<<bt.transform.maxZoom-An.canonical.z):1;Fl=u.ac(u.aV(ai.maxLineLength/u.X*1024*qc),256,gr.maxTextureSize)}fl.gradient=u.aW({expression:yr.gradientExpression(),evaluationKey:"lineProgress",resolution:Fl,image:fl.gradient||void 0,clips:ai.lineClipsArray}),fl.texture?fl.texture.update(fl.gradient):fl.texture=new y(gr,fl.gradient,Nr.RGBA),fl.version=yr.gradientVersion,Zl=fl.texture}gr.activeTexture.set(Nr.TEXTURE0),Zl.bind(yr.stepInterpolant?Nr.NEAREST:Nr.LINEAR,Nr.CLAMP_TO_EDGE)}oa.draw(gr,Nr.TRIANGLES,Pn,bt.stencilModeForClipping(An),vi,mu.disabled,as,mo,yr.id,ai.layoutVertexBuffer,ai.indexBuffer,ai.segments,yr.paint,bt.transform.zoom,ki,ai.layoutVertexBuffer2),vn=!1}})(q,Ae,it,ot);break;case"fill":(function(bt,ar,yr,Ur){const ln=yr.paint.get("fill-color"),Cn=yr.paint.get("fill-opacity");if(Cn.constantOr(1)===0)return;const Pn=bt.colorModeForRenderPass(),vi=yr.paint.get("fill-pattern"),Ui=bt.opaquePassEnabledForLayer()&&!vi.constantOr(1)&&ln.constantOr(u.aM.transparent).a===1&&Cn.constantOr(0)===1?"opaque":"translucent";if(bt.renderPass===Ui){const kt=bt.depthModeForSublayer(1,bt.renderPass==="opaque"?Oc.ReadWrite:Oc.ReadOnly);Cy(bt,ar,yr,Ur,kt,Pn,!1)}if(bt.renderPass==="translucent"&&yr.paint.get("fill-antialias")){const kt=bt.depthModeForSublayer(yr.getPaintProperty("fill-outline-color")?2:0,Oc.ReadOnly);Cy(bt,ar,yr,Ur,kt,Pn,!0)}})(q,Ae,it,ot);break;case"fill-extrusion":(function(bt,ar,yr,Ur){const ln=yr.paint.get("fill-extrusion-opacity");if(ln!==0&&bt.renderPass==="translucent"){const Cn=new Oc(bt.context.gl.LEQUAL,Oc.ReadWrite,bt.depthRangeFor3D);if(ln!==1||yr.paint.get("fill-extrusion-pattern").constantOr(1))Vm(bt,ar,yr,Ur,Cn,mf.disabled,Bd.disabled),Vm(bt,ar,yr,Ur,Cn,bt.stencilModeFor3D(),bt.colorModeForRenderPass());else{const Pn=bt.colorModeForRenderPass();Vm(bt,ar,yr,Ur,Cn,mf.disabled,Pn)}}})(q,Ae,it,ot);break;case"hillshade":(function(bt,ar,yr,Ur){if(bt.renderPass!=="offscreen"&&bt.renderPass!=="translucent")return;const ln=bt.context,Cn=bt.depthModeForSublayer(0,Oc.ReadOnly),Pn=bt.colorModeForRenderPass(),[vi,Ui]=bt.renderPass==="translucent"?bt.stencilConfigForOverlap(Ur):[{},Ur];for(const kt of Ui){const zt=ar.getTile(kt);zt.needsHillshadePrepare!==void 0&&zt.needsHillshadePrepare&&bt.renderPass==="offscreen"?cp(bt,zt,yr,Cn,mf.disabled,Pn):bt.renderPass==="translucent"&&_m(bt,kt,zt,yr,Cn,vi[kt.overscaledZ],Pn)}ln.viewport.set([0,0,bt.width,bt.height])})(q,Ae,it,ot);break;case"raster":(function(bt,ar,yr,Ur){if(bt.renderPass!=="translucent"||yr.paint.get("raster-opacity")===0||!Ur.length)return;const ln=bt.context,Cn=ln.gl,Pn=ar.getSource(),vi=bt.useProgram("raster"),Ui=bt.colorModeForRenderPass(),[kt,zt]=Pn instanceof $t?[{},Ur]:bt.stencilConfigForOverlap(Ur),Qt=zt[zt.length-1].overscaledZ,cr=!bt.options.moving;for(const Sr of zt){const gr=bt.depthModeForSublayer(Sr.overscaledZ-Qt,yr.paint.get("raster-opacity")===1?Oc.ReadWrite:Oc.ReadOnly,Cn.LESS),Nr=ar.getTile(Sr);Nr.registerFadeDuration(yr.paint.get("raster-fade-duration"));const vn=ar.findLoadedParent(Sr,0),An=ar.findLoadedSibling(Sr),Ln=Rg(Nr,vn||An||null,ar,yr,bt.transform,bt.style.map.terrain);let ai,ki;const ra=yr.paint.get("raster-resampling")==="nearest"?Cn.NEAREST:Cn.LINEAR;ln.activeTexture.set(Cn.TEXTURE0),Nr.texture.bind(ra,Cn.CLAMP_TO_EDGE,Cn.LINEAR_MIPMAP_NEAREST),ln.activeTexture.set(Cn.TEXTURE1),vn?(vn.texture.bind(ra,Cn.CLAMP_TO_EDGE,Cn.LINEAR_MIPMAP_NEAREST),ai=Math.pow(2,vn.tileID.overscaledZ-Nr.tileID.overscaledZ),ki=[Nr.tileID.canonical.x*ai%1,Nr.tileID.canonical.y*ai%1]):Nr.texture.bind(ra,Cn.CLAMP_TO_EDGE,Cn.LINEAR_MIPMAP_NEAREST),Nr.texture.useMipmap&&ln.extTextureFilterAnisotropic&&bt.transform.pitch>20&&Cn.texParameterf(Cn.TEXTURE_2D,ln.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,ln.extTextureFilterAnisotropicMax);const oa=bt.style.map.terrain&&bt.style.map.terrain.getTerrainData(Sr),Ma=oa?Sr:null,mo=Ma?Ma.posMatrix:bt.transform.calculatePosMatrix(Sr.toUnwrapped(),cr),ns=dc(mo,ki||[0,0],ai||1,Ln,yr);Pn instanceof $t?vi.draw(ln,Cn.TRIANGLES,gr,mf.disabled,Ui,mu.disabled,ns,oa,yr.id,Pn.boundsBuffer,bt.quadTriangleIndexBuffer,Pn.boundsSegments):vi.draw(ln,Cn.TRIANGLES,gr,kt[Sr.overscaledZ],Ui,mu.disabled,ns,oa,yr.id,bt.rasterBoundsBuffer,bt.quadTriangleIndexBuffer,bt.rasterBoundsSegments)}})(q,Ae,it,ot);break;case"background":(function(bt,ar,yr,Ur){const ln=yr.paint.get("background-color"),Cn=yr.paint.get("background-opacity");if(Cn===0)return;const Pn=bt.context,vi=Pn.gl,Ui=bt.transform,kt=Ui.tileSize,zt=yr.paint.get("background-pattern");if(bt.isPatternMissing(zt))return;const Qt=!zt&&ln.a===1&&Cn===1&&bt.opaquePassEnabledForLayer()?"opaque":"translucent";if(bt.renderPass!==Qt)return;const cr=mf.disabled,Sr=bt.depthModeForSublayer(0,Qt==="opaque"?Oc.ReadWrite:Oc.ReadOnly),gr=bt.colorModeForRenderPass(),Nr=bt.useProgram(zt?"backgroundPattern":"background"),vn=Ur||Ui.coveringTiles({tileSize:kt,terrain:bt.style.map.terrain});zt&&(Pn.activeTexture.set(vi.TEXTURE0),bt.imageManager.bind(bt.context));const An=yr.getCrossfadeParameters();for(const Ln of vn){const ai=Ur?Ln.posMatrix:bt.transform.calculatePosMatrix(Ln.toUnwrapped()),ki=zt?ed(ai,Cn,bt,zt,{tileID:Ln,tileSize:kt},An):xf(ai,Cn,ln),ra=bt.style.map.terrain&&bt.style.map.terrain.getTerrainData(Ln);Nr.draw(Pn,vi.TRIANGLES,Sr,cr,gr,mu.disabled,ki,ra,yr.id,bt.tileExtentBuffer,bt.quadTriangleIndexBuffer,bt.tileExtentSegments)}})(q,0,it,ot);break;case"custom":(function(bt,ar,yr){const Ur=bt.context,ln=yr.implementation;if(bt.renderPass==="offscreen"){const Cn=ln.prerender;Cn&&(bt.setCustomLayerDefaults(),Ur.setColorMode(bt.colorModeForRenderPass()),Cn.call(ln,Ur.gl,bt.transform.customLayerMatrix()),Ur.setDirty(),bt.setBaseState())}else if(bt.renderPass==="translucent"){bt.setCustomLayerDefaults(),Ur.setColorMode(bt.colorModeForRenderPass()),Ur.setStencilMode(mf.disabled);const Cn=ln.renderingMode==="3d"?new Oc(bt.context.gl.LEQUAL,Oc.ReadWrite,bt.depthRangeFor3D):bt.depthModeForSublayer(0,Oc.ReadOnly);Ur.setDepthMode(Cn),ln.render(Ur.gl,bt.transform.customLayerMatrix(),{farZ:bt.transform.farZ,nearZ:bt.transform.nearZ,fov:bt.transform._fov,modelViewProjectionMatrix:bt.transform.modelViewProjectionMatrix,projectionMatrix:bt.transform.projectionMatrix}),Ur.setDirty(),bt.setBaseState(),Ur.bindFramebuffer.set(null)}})(q,0,it)}}translatePosMatrix(q,Ae,it,ot,bt){if(!it[0]&&!it[1])return q;const ar=bt?ot==="map"?this.transform.angle:0:ot==="viewport"?-this.transform.angle:0;if(ar){const ln=Math.sin(ar),Cn=Math.cos(ar);it=[it[0]*Cn-it[1]*ln,it[0]*ln+it[1]*Cn]}const yr=[bt?it[0]:Oa(Ae,it[0],this.transform.zoom),bt?it[1]:Oa(Ae,it[1],this.transform.zoom),0],Ur=new Float32Array(16);return u.J(Ur,q,yr),Ur}saveTileTexture(q){const Ae=this._tileTextures[q.size[0]];Ae?Ae.push(q):this._tileTextures[q.size[0]]=[q]}getTileTexture(q){const Ae=this._tileTextures[q];return Ae&&Ae.length>0?Ae.pop():null}isPatternMissing(q){if(!q)return!1;if(!q.from||!q.to)return!0;const Ae=this.imageManager.getPattern(q.from.toString()),it=this.imageManager.getPattern(q.to.toString());return!Ae||!it}useProgram(q,Ae){this.cache=this.cache||{};const it=q+(Ae?Ae.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[it]||(this.cache[it]=new ha(this.context,Hi[q],Ae,Df[q],this._showOverdrawInspector,this.style.map.terrain)),this.cache[it]}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 q=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(q.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new y(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:q,drawingBufferHeight:Ae}=this.context.gl;return this.width!==q||this.height!==Ae}}class bd{constructor(q,Ae){this.points=q,this.planes=Ae}static fromInvProjectionMatrix(q,Ae,it){const ot=Math.pow(2,it),bt=[[-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(yr=>{const Ur=1/(yr=u.af([],yr,q))[3]/Ae*ot;return u.b1(yr,yr,[Ur,Ur,1/yr[3],Ur])}),ar=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(yr=>{const Ur=(function(vi,Ui){var kt=Ui[0],zt=Ui[1],Qt=Ui[2],cr=kt*kt+zt*zt+Qt*Qt;return cr>0&&(cr=1/Math.sqrt(cr)),vi[0]=Ui[0]*cr,vi[1]=Ui[1]*cr,vi[2]=Ui[2]*cr,vi})([],(function(vi,Ui,kt){var zt=Ui[0],Qt=Ui[1],cr=Ui[2],Sr=kt[0],gr=kt[1],Nr=kt[2];return vi[0]=Qt*Nr-cr*gr,vi[1]=cr*Sr-zt*Nr,vi[2]=zt*gr-Qt*Sr,vi})([],F([],bt[yr[0]],bt[yr[1]]),F([],bt[yr[2]],bt[yr[1]]))),ln=-((Cn=Ur)[0]*(Pn=bt[yr[1]])[0]+Cn[1]*Pn[1]+Cn[2]*Pn[2]);var Cn,Pn;return Ur.concat(ln)});return new bd(bt,ar)}}class qm{constructor(q,Ae){this.min=q,this.max=Ae,this.center=(function(it,ot,bt){return it[0]=.5*ot[0],it[1]=.5*ot[1],it[2]=.5*ot[2],it})([],(function(it,ot,bt){return it[0]=ot[0]+bt[0],it[1]=ot[1]+bt[1],it[2]=ot[2]+bt[2],it})([],this.min,this.max))}quadrant(q){const Ae=[q%2==0,q<2],it=I(this.min),ot=I(this.max);for(let bt=0;bt<Ae.length;bt++)it[bt]=Ae[bt]?this.min[bt]:this.center[bt],ot[bt]=Ae[bt]?this.center[bt]:this.max[bt];return ot[2]=this.max[2],new qm(it,ot)}distanceX(q){return Math.max(Math.min(this.max[0],q[0]),this.min[0])-q[0]}distanceY(q){return Math.max(Math.min(this.max[1],q[1]),this.min[1])-q[1]}intersects(q){const Ae=[[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 it=!0;for(let ot=0;ot<q.planes.length;ot++){const bt=q.planes[ot];let ar=0;for(let yr=0;yr<Ae.length;yr++)u.b2(bt,Ae[yr])>=0&&ar++;if(ar===0)return 0;ar!==Ae.length&&(it=!1)}if(it)return 2;for(let ot=0;ot<3;ot++){let bt=Number.MAX_VALUE,ar=-Number.MAX_VALUE;for(let yr=0;yr<q.points.length;yr++){const Ur=q.points[yr][ot]-this.min[ot];bt=Math.min(bt,Ur),ar=Math.max(ar,Ur)}if(ar<0||bt>this.max[ot]-this.min[ot])return 0}return 1}}class tv{constructor(q=0,Ae=0,it=0,ot=0){if(isNaN(q)||q<0||isNaN(Ae)||Ae<0||isNaN(it)||it<0||isNaN(ot)||ot<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=q,this.bottom=Ae,this.left=it,this.right=ot}interpolate(q,Ae,it){return Ae.top!=null&&q.top!=null&&(this.top=u.y.number(q.top,Ae.top,it)),Ae.bottom!=null&&q.bottom!=null&&(this.bottom=u.y.number(q.bottom,Ae.bottom,it)),Ae.left!=null&&q.left!=null&&(this.left=u.y.number(q.left,Ae.left,it)),Ae.right!=null&&q.right!=null&&(this.right=u.y.number(q.right,Ae.right,it)),this}getCenter(q,Ae){const it=u.ac((this.left+q-this.right)/2,0,q),ot=u.ac((this.top+Ae-this.bottom)/2,0,Ae);return new u.P(it,ot)}equals(q){return this.top===q.top&&this.bottom===q.bottom&&this.left===q.left&&this.right===q.right}clone(){return new tv(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}const Mv=85.051129;class Ud{constructor(q,Ae,it,ot,bt){this.tileSize=512,this._renderWorldCopies=bt===void 0||!!bt,this._minZoom=q||0,this._maxZoom=Ae||22,this._minPitch=it??0,this._maxPitch=ot??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new u.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new tv,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){const q=new Ud(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return q.apply(this),q}apply(q){this.tileSize=q.tileSize,this.latRange=q.latRange,this.lngRange=q.lngRange,this.width=q.width,this.height=q.height,this._center=q._center,this._elevation=q._elevation,this.minElevationForCurrentTile=q.minElevationForCurrentTile,this.zoom=q.zoom,this.angle=q.angle,this._fov=q._fov,this._pitch=q._pitch,this._unmodified=q._unmodified,this._edgeInsets=q._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(q){this._minZoom!==q&&(this._minZoom=q,this.zoom=Math.max(this.zoom,q))}get maxZoom(){return this._maxZoom}set maxZoom(q){this._maxZoom!==q&&(this._maxZoom=q,this.zoom=Math.min(this.zoom,q))}get minPitch(){return this._minPitch}set minPitch(q){this._minPitch!==q&&(this._minPitch=q,this.pitch=Math.max(this.pitch,q))}get maxPitch(){return this._maxPitch}set maxPitch(q){this._maxPitch!==q&&(this._maxPitch=q,this.pitch=Math.min(this.pitch,q))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(q){q===void 0?q=!0:q===null&&(q=!1),this._renderWorldCopies=q}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new u.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(q){const Ae=-u.b3(q,-180,180)*Math.PI/180;this.angle!==Ae&&(this._unmodified=!1,this.angle=Ae,this._calcMatrices(),this.rotationMatrix=(function(){var it=new u.A(4);return u.A!=Float32Array&&(it[1]=0,it[2]=0),it[0]=1,it[3]=1,it})(),(function(it,ot,bt){var ar=ot[0],yr=ot[1],Ur=ot[2],ln=ot[3],Cn=Math.sin(bt),Pn=Math.cos(bt);it[0]=ar*Pn+Ur*Cn,it[1]=yr*Pn+ln*Cn,it[2]=ar*-Cn+Ur*Pn,it[3]=yr*-Cn+ln*Pn})(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(q){const Ae=u.ac(q,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==Ae&&(this._unmodified=!1,this._pitch=Ae,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(q){q=Math.max(.01,Math.min(60,q)),this._fov!==q&&(this._unmodified=!1,this._fov=q/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(q){const Ae=Math.min(Math.max(q,this.minZoom),this.maxZoom);this._zoom!==Ae&&(this._unmodified=!1,this._zoom=Ae,this.tileZoom=Math.max(0,Math.floor(Ae)),this.scale=this.zoomScale(Ae),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(q){q.lat===this._center.lat&&q.lng===this._center.lng||(this._unmodified=!1,this._center=q,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(q){q!==this._elevation&&(this._elevation=q,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(q){this._edgeInsets.equals(q)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,q,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(q){return this._edgeInsets.equals(q)}interpolatePadding(q,Ae,it){this._unmodified=!1,this._edgeInsets.interpolate(q,Ae,it),this._constrain(),this._calcMatrices()}coveringZoomLevel(q){const Ae=(q.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/q.tileSize));return Math.max(0,Ae)}getVisibleUnwrappedCoordinates(q){const Ae=[new u.b4(0,q)];if(this._renderWorldCopies){const it=this.pointCoordinate(new u.P(0,0)),ot=this.pointCoordinate(new u.P(this.width,0)),bt=this.pointCoordinate(new u.P(this.width,this.height)),ar=this.pointCoordinate(new u.P(0,this.height)),yr=Math.floor(Math.min(it.x,ot.x,bt.x,ar.x)),Ur=Math.floor(Math.max(it.x,ot.x,bt.x,ar.x)),ln=1;for(let Cn=yr-ln;Cn<=Ur+ln;Cn++)Cn!==0&&Ae.push(new u.b4(Cn,q))}return Ae}coveringTiles(q){var Ae,it;let ot=this.coveringZoomLevel(q);const bt=ot;if(q.minzoom!==void 0&&ot<q.minzoom)return[];q.maxzoom!==void 0&&ot>q.maxzoom&&(ot=q.maxzoom);const ar=this.pointCoordinate(this.getCameraPoint()),yr=u.Z.fromLngLat(this.center),Ur=Math.pow(2,ot),ln=[Ur*ar.x,Ur*ar.y,0],Cn=[Ur*yr.x,Ur*yr.y,0],Pn=bd.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,ot);let vi=q.minzoom||0;!q.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(vi=ot);const Ui=q.terrain?2/Math.min(this.tileSize,q.tileSize)*this.tileSize:3,kt=gr=>({aabb:new qm([gr*Ur,0,0],[(gr+1)*Ur,Ur,0]),zoom:0,x:0,y:0,wrap:gr,fullyVisible:!1}),zt=[],Qt=[],cr=ot,Sr=q.reparseOverscaled?bt:ot;if(this._renderWorldCopies)for(let gr=1;gr<=3;gr++)zt.push(kt(-gr)),zt.push(kt(gr));for(zt.push(kt(0));zt.length>0;){const gr=zt.pop(),Nr=gr.x,vn=gr.y;let An=gr.fullyVisible;if(!An){const oa=gr.aabb.intersects(Pn);if(oa===0)continue;An=oa===2}const Ln=q.terrain?ln:Cn,ai=gr.aabb.distanceX(Ln),ki=gr.aabb.distanceY(Ln),ra=Math.max(Math.abs(ai),Math.abs(ki));if(gr.zoom===cr||ra>Ui+(1<<cr-gr.zoom)-2&&gr.zoom>=vi){const oa=cr-gr.zoom,Ma=ln[0]-.5-(Nr<<oa),mo=ln[1]-.5-(vn<<oa);Qt.push({tileID:new u.S(gr.zoom===cr?Sr:gr.zoom,gr.wrap,gr.zoom,Nr,vn),distanceSq:k([Cn[0]-.5-Nr,Cn[1]-.5-vn]),tileDistanceToCamera:Math.sqrt(Ma*Ma+mo*mo)})}else for(let oa=0;oa<4;oa++){const Ma=(Nr<<1)+oa%2,mo=(vn<<1)+(oa>>1),ns=gr.zoom+1;let $o=gr.aabb.quadrant(oa);if(q.terrain){const as=new u.S(ns,gr.wrap,ns,Ma,mo),fl=q.terrain.getMinMaxElevation(as),Zl=(Ae=fl.minElevation)!==null&&Ae!==void 0?Ae:this.elevation,Fl=(it=fl.maxElevation)!==null&&it!==void 0?it:this.elevation;$o=new qm([$o.min[0],$o.min[1],Zl],[$o.max[0],$o.max[1],Fl])}zt.push({aabb:$o,zoom:ns,x:Ma,y:mo,wrap:gr.wrap,fullyVisible:An})}}return Qt.sort((gr,Nr)=>gr.distanceSq-Nr.distanceSq).map(gr=>gr.tileID)}resize(q,Ae){this.width=q,this.height=Ae,this.pixelsToGLUnits=[2/q,-2/Ae],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(q){return Math.pow(2,q)}scaleZoom(q){return Math.log(q)/Math.LN2}project(q){const Ae=u.ac(q.lat,-85.051129,Mv);return new u.P(u.O(q.lng)*this.worldSize,u.Q(Ae)*this.worldSize)}unproject(q){return new u.Z(q.x/this.worldSize,q.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(q){const Ae=this.elevation,it=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,ot=this.pointLocation(this.centerPoint,q),bt=q.getElevationForLngLatZoom(ot,this.tileZoom);if(!(this.elevation-bt))return;const ar=it+Ae-bt,yr=Math.cos(this._pitch)*this.cameraToCenterDistance/ar/u.b5(1,ot.lat),Ur=this.scaleZoom(yr/this.tileSize);this._elevation=bt,this._center=ot,this.zoom=Ur}setLocationAtPoint(q,Ae){const it=this.pointCoordinate(Ae),ot=this.pointCoordinate(this.centerPoint),bt=this.locationCoordinate(q),ar=new u.Z(bt.x-(it.x-ot.x),bt.y-(it.y-ot.y));this.center=this.coordinateLocation(ar),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(q,Ae){return Ae?this.coordinatePoint(this.locationCoordinate(q),Ae.getElevationForLngLatZoom(q,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(q))}pointLocation(q,Ae){return this.coordinateLocation(this.pointCoordinate(q,Ae))}locationCoordinate(q){return u.Z.fromLngLat(q)}coordinateLocation(q){return q&&q.toLngLat()}pointCoordinate(q,Ae){if(Ae){const vi=Ae.pointCoordinate(q);if(vi!=null)return vi}const it=[q.x,q.y,0,1],ot=[q.x,q.y,1,1];u.af(it,it,this.pixelMatrixInverse),u.af(ot,ot,this.pixelMatrixInverse);const bt=it[3],ar=ot[3],yr=it[1]/bt,Ur=ot[1]/ar,ln=it[2]/bt,Cn=ot[2]/ar,Pn=ln===Cn?0:(0-ln)/(Cn-ln);return new u.Z(u.y.number(it[0]/bt,ot[0]/ar,Pn)/this.worldSize,u.y.number(yr,Ur,Pn)/this.worldSize)}coordinatePoint(q,Ae=0,it=this.pixelMatrix){const ot=[q.x*this.worldSize,q.y*this.worldSize,Ae,1];return u.af(ot,ot,it),new u.P(ot[0]/ot[3],ot[1]/ot[3])}getBounds(){const q=Math.max(0,this.height/2-this.getHorizon());return new Te().extend(this.pointLocation(new u.P(0,q))).extend(this.pointLocation(new u.P(this.width,q))).extend(this.pointLocation(new u.P(this.width,this.height))).extend(this.pointLocation(new u.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new Te([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(q){q?(this.lngRange=[q.getWest(),q.getEast()],this.latRange=[q.getSouth(),q.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,Mv])}calculateTileMatrix(q){const Ae=q.canonical,it=this.worldSize/this.zoomScale(Ae.z),ot=Ae.x+Math.pow(2,Ae.z)*q.wrap,bt=u.an(new Float64Array(16));return u.J(bt,bt,[ot*it,Ae.y*it,0]),u.K(bt,bt,[it/u.X,it/u.X,1]),bt}calculatePosMatrix(q,Ae=!1){const it=q.key,ot=Ae?this._alignedPosMatrixCache:this._posMatrixCache;if(ot[it])return ot[it];const bt=this.calculateTileMatrix(q);return u.L(bt,Ae?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,bt),ot[it]=new Float32Array(bt),ot[it]}calculateFogMatrix(q){const Ae=q.key,it=this._fogMatrixCache;if(it[Ae])return it[Ae];const ot=this.calculateTileMatrix(q);return u.L(ot,this.fogMatrix,ot),it[Ae]=new Float32Array(ot),it[Ae]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(q,Ae){Ae=u.ac(+Ae,this.minZoom,this.maxZoom);const it={center:new u.N(q.lng,q.lat),zoom:Ae};let ot=this.lngRange;if(!this._renderWorldCopies&&ot===null){const gr=179.9999999999;ot=[-gr,gr]}const bt=this.tileSize*this.zoomScale(it.zoom);let ar=0,yr=bt,Ur=0,ln=bt,Cn=0,Pn=0;const{x:vi,y:Ui}=this.size;if(this.latRange){const gr=this.latRange;ar=u.Q(gr[1])*bt,yr=u.Q(gr[0])*bt,yr-ar<Ui&&(Cn=Ui/(yr-ar))}ot&&(Ur=u.b3(u.O(ot[0])*bt,0,bt),ln=u.b3(u.O(ot[1])*bt,0,bt),ln<Ur&&(ln+=bt),ln-Ur<vi&&(Pn=vi/(ln-Ur)));const{x:kt,y:zt}=this.project.call({worldSize:bt},q);let Qt,cr;const Sr=Math.max(Pn||0,Cn||0);if(Sr){const gr=new u.P(Pn?(ln+Ur)/2:kt,Cn?(yr+ar)/2:zt);return it.center=this.unproject.call({worldSize:bt},gr).wrap(),it.zoom+=this.scaleZoom(Sr),it}if(this.latRange){const gr=Ui/2;zt-gr<ar&&(cr=ar+gr),zt+gr>yr&&(cr=yr-gr)}if(ot){const gr=(Ur+ln)/2;let Nr=kt;this._renderWorldCopies&&(Nr=u.b3(kt,gr-bt/2,gr+bt/2));const vn=vi/2;Nr-vn<Ur&&(Qt=Ur+vn),Nr+vn>ln&&(Qt=ln-vn)}if(Qt!==void 0||cr!==void 0){const gr=new u.P(Qt??kt,cr??zt);it.center=this.unproject.call({worldSize:bt},gr).wrap()}return it}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;const q=this._unmodified,{center:Ae,zoom:it}=this.getConstrained(this.center,this.zoom);this.center=Ae,this.zoom=it,this._unmodified=q,this._constraining=!1}_calcMatrices(){if(!this.height)return;const q=this.centerOffset,Ae=this.point.x,it=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=u.b5(1,this.center.lat)*this.worldSize;let ot=u.an(new Float64Array(16));u.K(ot,ot,[this.width/2,-this.height/2,1]),u.J(ot,ot,[1,-1,0]),this.labelPlaneMatrix=ot,ot=u.an(new Float64Array(16)),u.K(ot,ot,[1,-1,1]),u.J(ot,ot,[-1,-1,0]),u.K(ot,ot,[2/this.width,2/this.height,1]),this.glCoordMatrix=ot;const bt=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),ar=Math.min(this.elevation,this.minElevationForCurrentTile),yr=bt-ar*this._pixelPerMeter/Math.cos(this._pitch),Ur=ar<0?yr:bt,ln=Math.PI/2+this._pitch,Cn=this._fov*(.5+q.y/this.height),Pn=Math.sin(Cn)*Ur/Math.sin(u.ac(Math.PI-ln-Cn,.01,Math.PI-.01)),vi=this.getHorizon(),Ui=2*Math.atan(vi/this.cameraToCenterDistance)*(.5+q.y/(2*vi)),kt=Math.sin(Ui)*Ur/Math.sin(u.ac(Math.PI-ln-Ui,.01,Math.PI-.01)),zt=Math.min(Pn,kt);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*zt+Ur),this.nearZ=this.height/50,ot=new Float64Array(16),u.b6(ot,this._fov,this.width/this.height,this.nearZ,this.farZ),ot[8]=2*-q.x/this.width,ot[9]=2*q.y/this.height,this.projectionMatrix=u.ae(ot),u.K(ot,ot,[1,-1,1]),u.J(ot,ot,[0,0,-this.cameraToCenterDistance]),u.b7(ot,ot,this._pitch),u.ad(ot,ot,this.angle),u.J(ot,ot,[-Ae,-it,0]),this.mercatorMatrix=u.K([],ot,[this.worldSize,this.worldSize,this.worldSize]),u.K(ot,ot,[1,1,this._pixelPerMeter]),this.pixelMatrix=u.L(new Float64Array(16),this.labelPlaneMatrix,ot),u.J(ot,ot,[0,0,-this.elevation]),this.modelViewProjectionMatrix=ot,this.invModelViewProjectionMatrix=u.as([],ot),this.fogMatrix=new Float64Array(16),u.b6(this.fogMatrix,this._fov,this.width/this.height,bt,this.farZ),this.fogMatrix[8]=2*-q.x/this.width,this.fogMatrix[9]=2*q.y/this.height,u.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),u.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),u.b7(this.fogMatrix,this.fogMatrix,this._pitch),u.ad(this.fogMatrix,this.fogMatrix,this.angle),u.J(this.fogMatrix,this.fogMatrix,[-Ae,-it,0]),u.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),u.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=u.L(new Float64Array(16),this.labelPlaneMatrix,ot);const Qt=this.width%2/2,cr=this.height%2/2,Sr=Math.cos(this.angle),gr=Math.sin(this.angle),Nr=Ae-Math.round(Ae)+Sr*Qt+gr*cr,vn=it-Math.round(it)+Sr*cr+gr*Qt,An=new Float64Array(ot);if(u.J(An,An,[Nr>.5?Nr-1:Nr,vn>.5?vn-1:vn,0]),this.alignedModelViewProjectionMatrix=An,ot=u.as(new Float64Array(16),this.pixelMatrix),!ot)throw new Error("failed to invert matrix");this.pixelMatrixInverse=ot,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const q=this.pointCoordinate(new u.P(0,0)),Ae=[q.x*this.worldSize,q.y*this.worldSize,0,1];return u.af(Ae,Ae,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const q=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new u.P(0,q))}getCameraQueryGeometry(q){const Ae=this.getCameraPoint();if(q.length===1)return[q[0],Ae];{let it=Ae.x,ot=Ae.y,bt=Ae.x,ar=Ae.y;for(const yr of q)it=Math.min(it,yr.x),ot=Math.min(ot,yr.y),bt=Math.max(bt,yr.x),ar=Math.max(ar,yr.y);return[new u.P(it,ot),new u.P(bt,ot),new u.P(bt,ar),new u.P(it,ar),new u.P(it,ot)]}}lngLatToCameraDepth(q,Ae){const it=this.locationCoordinate(q),ot=[it.x*this.worldSize,it.y*this.worldSize,Ae,1];return u.af(ot,ot,this.modelViewProjectionMatrix),ot[2]/ot[3]}}function Yg(wt,q){let Ae,it=!1,ot=null,bt=null;const ar=()=>{ot=null,it&&(wt.apply(bt,Ae),ot=setTimeout(ar,q),it=!1)};return(...yr)=>(it=!0,bt=this,Ae=yr,ot||ar(),ot)}class wm{constructor(q){this._getCurrentHash=()=>{const Ae=window.location.hash.replace("#","");if(this._hashName){let it;return Ae.split("&").map(ot=>ot.split("=")).forEach(ot=>{ot[0]===this._hashName&&(it=ot)}),(it&&it[1]||"").split("/")}return Ae.split("/")},this._onHashChange=()=>{const Ae=this._getCurrentHash();if(Ae.length>=3&&!Ae.some(it=>isNaN(it))){const it=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(Ae[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+Ae[2],+Ae[1]],zoom:+Ae[0],bearing:it,pitch:+(Ae[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{const Ae=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,Ae)},this._removeHash=()=>{const Ae=this._getCurrentHash();if(Ae.length===0)return;const it=Ae.join("/");let ot=it;ot.split("&").length>0&&(ot=ot.split("&")[0]),this._hashName&&(ot=`${this._hashName}=${it}`);let bt=window.location.hash.replace(ot,"");bt.startsWith("#&")?bt=bt.slice(0,1)+bt.slice(2):bt==="#"&&(bt="");let ar=window.location.href.replace(/(#.+)?$/,bt);ar=ar.replace("&&","&"),window.history.replaceState(window.history.state,null,ar)},this._updateHash=Yg(this._updateHashUnthrottled,300),this._hashName=q&&encodeURIComponent(q)}addTo(q){return this._map=q,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(q){const Ae=this._map.getCenter(),it=Math.round(100*this._map.getZoom())/100,ot=Math.ceil((it*Math.LN2+Math.log(512/360/.5))/Math.LN10),bt=Math.pow(10,ot),ar=Math.round(Ae.lng*bt)/bt,yr=Math.round(Ae.lat*bt)/bt,Ur=this._map.getBearing(),ln=this._map.getPitch();let Cn="";if(Cn+=q?`/${ar}/${yr}/${it}`:`${it}/${yr}/${ar}`,(Ur||ln)&&(Cn+="/"+Math.round(10*Ur)/10),ln&&(Cn+=`/${Math.round(ln)}`),this._hashName){const Pn=this._hashName;let vi=!1;const Ui=window.location.hash.slice(1).split("&").map(kt=>{const zt=kt.split("=")[0];return zt===Pn?(vi=!0,`${zt}=${Cn}`):kt}).filter(kt=>kt);return vi||Ui.push(`${Pn}=${Cn}`),`#${Ui.join("&")}`}return`#${Cn}`}}const cg={linearity:.3,easing:u.b8(0,0,.3,1)},A0=u.e({deceleration:2500,maxSpeed:1400},cg),U1=u.e({deceleration:20,maxSpeed:1400},cg),Qb=u.e({deceleration:1e3,maxSpeed:360},cg),Xg=u.e({deceleration:1e3,maxSpeed:90},cg);class C0{constructor(q){this._map=q,this.clear()}clear(){this._inertiaBuffer=[]}record(q){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:v.now(),settings:q})}_drainInertiaBuffer(){const q=this._inertiaBuffer,Ae=v.now();for(;q.length>0&&Ae-q[0].time>160;)q.shift()}_onMoveEnd(q){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const Ae={zoom:0,bearing:0,pitch:0,pan:new u.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:bt}of this._inertiaBuffer)Ae.zoom+=bt.zoomDelta||0,Ae.bearing+=bt.bearingDelta||0,Ae.pitch+=bt.pitchDelta||0,bt.panDelta&&Ae.pan._add(bt.panDelta),bt.around&&(Ae.around=bt.around),bt.pinchAround&&(Ae.pinchAround=bt.pinchAround);const it=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,ot={};if(Ae.pan.mag()){const bt=M0(Ae.pan.mag(),it,u.e({},A0,q||{}));ot.offset=Ae.pan.mult(bt.amount/Ae.pan.mag()),ot.center=this._map.transform.center,Uv(ot,bt)}if(Ae.zoom){const bt=M0(Ae.zoom,it,U1);ot.zoom=this._map.transform.zoom+bt.amount,Uv(ot,bt)}if(Ae.bearing){const bt=M0(Ae.bearing,it,Qb);ot.bearing=this._map.transform.bearing+u.ac(bt.amount,-179,179),Uv(ot,bt)}if(Ae.pitch){const bt=M0(Ae.pitch,it,Xg);ot.pitch=this._map.transform.pitch+bt.amount,Uv(ot,bt)}if(ot.zoom||ot.bearing){const bt=Ae.pinchAround===void 0?Ae.around:Ae.pinchAround;ot.around=bt?this._map.unproject(bt):this._map.getCenter()}return this.clear(),u.e(ot,{noMoveStart:!0})}}function Uv(wt,q){(!wt.duration||wt.duration<q.duration)&&(wt.duration=q.duration,wt.easing=q.easing)}function M0(wt,q,Ae){const{maxSpeed:it,linearity:ot,deceleration:bt}=Ae,ar=u.ac(wt*ot/(q/1e3),-it,it),yr=Math.abs(ar)/(bt*ot);return{easing:Ae.easing,duration:1e3*yr,amount:ar*(yr/2)}}class Tp extends u.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(q,Ae,it,ot={}){const bt=h.mousePos(Ae.getCanvas(),it),ar=Ae.unproject(bt);super(q,u.e({point:bt,lngLat:ar,originalEvent:it},ot)),this._defaultPrevented=!1,this.target=Ae}}class Zg extends u.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(q,Ae,it){const ot=q==="touchend"?it.changedTouches:it.touches,bt=h.touchPos(Ae.getCanvasContainer(),ot),ar=bt.map(Ur=>Ae.unproject(Ur)),yr=bt.reduce((Ur,ln,Cn,Pn)=>Ur.add(ln.div(Pn.length)),new u.P(0,0));super(q,{points:bt,point:yr,lngLats:ar,lngLat:Ae.unproject(yr),originalEvent:it}),this._defaultPrevented=!1}}class Iy extends u.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(q,Ae,it){super(q,{originalEvent:it}),this._defaultPrevented=!1}}class Kg{constructor(q,Ae){this._map=q,this._clickTolerance=Ae.clickTolerance}reset(){delete this._mousedownPos}wheel(q){return this._firePreventable(new Iy(q.type,this._map,q))}mousedown(q,Ae){return this._mousedownPos=Ae,this._firePreventable(new Tp(q.type,this._map,q))}mouseup(q){this._map.fire(new Tp(q.type,this._map,q))}click(q,Ae){this._mousedownPos&&this._mousedownPos.dist(Ae)>=this._clickTolerance||this._map.fire(new Tp(q.type,this._map,q))}dblclick(q){return this._firePreventable(new Tp(q.type,this._map,q))}mouseover(q){this._map.fire(new Tp(q.type,this._map,q))}mouseout(q){this._map.fire(new Tp(q.type,this._map,q))}touchstart(q){return this._firePreventable(new Zg(q.type,this._map,q))}touchmove(q){this._map.fire(new Zg(q.type,this._map,q))}touchend(q){this._map.fire(new Zg(q.type,this._map,q))}touchcancel(q){this._map.fire(new Zg(q.type,this._map,q))}_firePreventable(q){if(this._map.fire(q),q.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Rd{constructor(q){this._map=q}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(q){this._map.fire(new Tp(q.type,this._map,q))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Tp("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(q){this._delayContextMenu?this._contextMenuEvent=q:this._ignoreContextMenu||this._map.fire(new Tp(q.type,this._map,q)),this._map.listens("contextmenu")&&q.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Rv{constructor(q){this._map=q}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(q){return this.transform.pointLocation(u.P.convert(q),this._map.terrain)}}class cm{constructor(q,Ae){this._map=q,this._tr=new Rv(q),this._el=q.getCanvasContainer(),this._container=q.getContainer(),this._clickTolerance=Ae.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(q,Ae){this.isEnabled()&&q.shiftKey&&q.button===0&&(h.disableDrag(),this._startPos=this._lastPos=Ae,this._active=!0)}mousemoveWindow(q,Ae){if(!this._active)return;const it=Ae;if(this._lastPos.equals(it)||!this._box&&it.dist(this._startPos)<this._clickTolerance)return;const ot=this._startPos;this._lastPos=it,this._box||(this._box=h.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",q));const bt=Math.min(ot.x,it.x),ar=Math.max(ot.x,it.x),yr=Math.min(ot.y,it.y),Ur=Math.max(ot.y,it.y);h.setTransform(this._box,`translate(${bt}px,${yr}px)`),this._box.style.width=ar-bt+"px",this._box.style.height=Ur-yr+"px"}mouseupWindow(q,Ae){if(!this._active||q.button!==0)return;const it=this._startPos,ot=Ae;if(this.reset(),h.suppressClick(),it.x!==ot.x||it.y!==ot.y)return this._map.fire(new u.k("boxzoomend",{originalEvent:q})),{cameraAnimation:bt=>bt.fitScreenCoordinates(it,ot,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",q)}keydown(q){this._active&&q.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",q))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(h.remove(this._box),this._box=null),h.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(q,Ae){return this._map.fire(new u.k(q,{originalEvent:Ae}))}}function ny(wt,q){if(wt.length!==q.length)throw new Error(`The number of touches and points are not equal - touches ${wt.length}, points ${q.length}`);const Ae={};for(let it=0;it<wt.length;it++)Ae[wt[it].identifier]=q[it];return Ae}class Ld{constructor(q){this.reset(),this.numTouches=q.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(q,Ae,it){(this.centroid||it.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=q.timeStamp),it.length===this.numTouches&&(this.centroid=(function(ot){const bt=new u.P(0,0);for(const ar of ot)bt._add(ar);return bt.div(ot.length)})(Ae),this.touches=ny(it,Ae)))}touchmove(q,Ae,it){if(this.aborted||!this.centroid)return;const ot=ny(it,Ae);for(const bt in this.touches){const ar=ot[bt];(!ar||ar.dist(this.touches[bt])>30)&&(this.aborted=!0)}}touchend(q,Ae,it){if((!this.centroid||q.timeStamp-this.startTime>500)&&(this.aborted=!0),it.length===0){const ot=!this.aborted&&this.centroid;if(this.reset(),ot)return ot}}}class l0{constructor(q){this.singleTap=new Ld(q),this.numTaps=q.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(q,Ae,it){this.singleTap.touchstart(q,Ae,it)}touchmove(q,Ae,it){this.singleTap.touchmove(q,Ae,it)}touchend(q,Ae,it){const ot=this.singleTap.touchend(q,Ae,it);if(ot){const bt=q.timeStamp-this.lastTime<500,ar=!this.lastTap||this.lastTap.dist(ot)<30;if(bt&&ar||this.reset(),this.count++,this.lastTime=q.timeStamp,this.lastTap=ot,this.count===this.numTaps)return this.reset(),ot}}}class fg{constructor(q){this._tr=new Rv(q),this._zoomIn=new l0({numTouches:1,numTaps:2}),this._zoomOut=new l0({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(q,Ae,it){this._zoomIn.touchstart(q,Ae,it),this._zoomOut.touchstart(q,Ae,it)}touchmove(q,Ae,it){this._zoomIn.touchmove(q,Ae,it),this._zoomOut.touchmove(q,Ae,it)}touchend(q,Ae,it){const ot=this._zoomIn.touchend(q,Ae,it),bt=this._zoomOut.touchend(q,Ae,it),ar=this._tr;return ot?(this._active=!0,q.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:yr=>yr.easeTo({duration:300,zoom:ar.zoom+1,around:ar.unproject(ot)},{originalEvent:q})}):bt?(this._active=!0,q.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:yr=>yr.easeTo({duration:300,zoom:ar.zoom-1,around:ar.unproject(bt)},{originalEvent:q})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Hv{constructor(q){this._enabled=!!q.enable,this._moveStateManager=q.moveStateManager,this._clickTolerance=q.clickTolerance||1,this._moveFunction=q.move,this._activateOnStart=!!q.activateOnStart,q.assignEvents(this),this.reset()}reset(q){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(q)}_move(...q){const Ae=this._moveFunction(...q);if(Ae.bearingDelta||Ae.pitchDelta||Ae.around||Ae.panDelta)return this._active=!0,Ae}dragStart(q,Ae){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(q)&&(this._moveStateManager.startMove(q),this._lastPoint=Ae.length?Ae[0]:Ae,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(q,Ae){if(!this.isEnabled())return;const it=this._lastPoint;if(!it)return;if(q.preventDefault(),!this._moveStateManager.isValidMoveEvent(q))return void this.reset(q);const ot=Ae.length?Ae[0]:Ae;return!this._moved&&ot.dist(it)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=ot,this._move(it,ot))}dragEnd(q){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(q)&&(this._moved&&h.suppressClick(),this.reset(q))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}const u0={0:1,2:2};class Sm{constructor(q){this._correctEvent=q.checkCorrectEvent}startMove(q){const Ae=h.mouseButton(q);this._eventButton=Ae}endMove(q){delete this._eventButton}isValidStartEvent(q){return this._correctEvent(q)}isValidMoveEvent(q){return!(function(Ae,it){const ot=u0[it];return Ae.buttons===void 0||(Ae.buttons&ot)!==ot})(q,this._eventButton)}isValidEndEvent(q){return h.mouseButton(q)===this._eventButton}}class c0{constructor(){this._firstTouch=void 0}_isOneFingerTouch(q){return q.targetTouches.length===1}_isSameTouchEvent(q){return q.targetTouches[0].identifier===this._firstTouch}startMove(q){this._firstTouch=q.targetTouches[0].identifier}endMove(q){delete this._firstTouch}isValidStartEvent(q){return this._isOneFingerTouch(q)}isValidMoveEvent(q){return this._isOneFingerTouch(q)&&this._isSameTouchEvent(q)}isValidEndEvent(q){return this._isOneFingerTouch(q)&&this._isSameTouchEvent(q)}}const H1=wt=>{wt.mousedown=wt.dragStart,wt.mousemoveWindow=wt.dragMove,wt.mouseup=wt.dragEnd,wt.contextmenu=q=>{q.preventDefault()}},Np=({enable:wt,clickTolerance:q,bearingDegreesPerPixelMoved:Ae=.8})=>{const it=new Sm({checkCorrectEvent:ot=>h.mouseButton(ot)===0&&ot.ctrlKey||h.mouseButton(ot)===2});return new Hv({clickTolerance:q,move:(ot,bt)=>({bearingDelta:(bt.x-ot.x)*Ae}),moveStateManager:it,enable:wt,assignEvents:H1})},Py=({enable:wt,clickTolerance:q,pitchDegreesPerPixelMoved:Ae=-.5})=>{const it=new Sm({checkCorrectEvent:ot=>h.mouseButton(ot)===0&&ot.ctrlKey||h.mouseButton(ot)===2});return new Hv({clickTolerance:q,move:(ot,bt)=>({pitchDelta:(bt.y-ot.y)*Ae}),moveStateManager:it,enable:wt,assignEvents:H1})};class jv{constructor(q,Ae){this._clickTolerance=q.clickTolerance||1,this._map=Ae,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new u.P(0,0)}_shouldBePrevented(q){return q<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(q,Ae,it){return this._calculateTransform(q,Ae,it)}touchmove(q,Ae,it){if(this._active){if(!this._shouldBePrevented(it.length))return q.preventDefault(),this._calculateTransform(q,Ae,it);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",q)}}touchend(q,Ae,it){this._calculateTransform(q,Ae,it),this._active&&this._shouldBePrevented(it.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(q,Ae,it){it.length>0&&(this._active=!0);const ot=ny(it,Ae),bt=new u.P(0,0),ar=new u.P(0,0);let yr=0;for(const ln in ot){const Cn=ot[ln],Pn=this._touches[ln];Pn&&(bt._add(Cn),ar._add(Cn.sub(Pn)),yr++,ot[ln]=Cn)}if(this._touches=ot,this._shouldBePrevented(yr)||!ar.mag())return;const Ur=ar.div(yr);return this._sum._add(Ur),this._sum.mag()<this._clickTolerance?void 0:{around:bt.div(yr),panDelta:Ur}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Gm{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(q,Ae,it){this._firstTwoTouches||it.length<2||(this._firstTwoTouches=[it[0].identifier,it[1].identifier],this._start([Ae[0],Ae[1]]))}touchmove(q,Ae,it){if(!this._firstTwoTouches)return;q.preventDefault();const[ot,bt]=this._firstTwoTouches,ar=Tm(it,Ae,ot),yr=Tm(it,Ae,bt);if(!ar||!yr)return;const Ur=this._aroundCenter?null:ar.add(yr).div(2);return this._move([ar,yr],Ur,q)}touchend(q,Ae,it){if(!this._firstTwoTouches)return;const[ot,bt]=this._firstTwoTouches,ar=Tm(it,Ae,ot),yr=Tm(it,Ae,bt);ar&&yr||(this._active&&h.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(q){this._enabled=!0,this._aroundCenter=!!q&&q.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function Tm(wt,q,Ae){for(let it=0;it<wt.length;it++)if(wt[it].identifier===Ae)return q[it]}function ph(wt,q){return Math.log(wt/q)/Math.LN2}class pv extends Gm{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(q){this._startDistance=this._distance=q[0].dist(q[1])}_move(q,Ae){const it=this._distance;if(this._distance=q[0].dist(q[1]),this._active||!(Math.abs(ph(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:ph(this._distance,it),pinchAround:Ae}}}function Yd(wt,q){return 180*wt.angleWith(q)/Math.PI}class dg extends Gm{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(q){this._startVector=this._vector=q[0].sub(q[1]),this._minDiameter=q[0].dist(q[1])}_move(q,Ae,it){const ot=this._vector;if(this._vector=q[0].sub(q[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:Yd(this._vector,ot),pinchAround:Ae}}_isBelowThreshold(q){this._minDiameter=Math.min(this._minDiameter,q.mag());const Ae=25/(Math.PI*this._minDiameter)*360,it=Yd(q,this._startVector);return Math.abs(it)<Ae}}function Em(wt){return Math.abs(wt.y)>Math.abs(wt.x)}class iy extends Gm{constructor(q){super(),this._currentTouchCount=0,this._map=q}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(q,Ae,it){super.touchstart(q,Ae,it),this._currentTouchCount=it.length}_start(q){this._lastPoints=q,Em(q[0].sub(q[1]))&&(this._valid=!1)}_move(q,Ae,it){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const ot=q[0].sub(this._lastPoints[0]),bt=q[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(ot,bt,it.timeStamp),this._valid?(this._lastPoints=q,this._active=!0,{pitchDelta:(ot.y+bt.y)/2*-.5}):void 0}gestureBeginsVertically(q,Ae,it){if(this._valid!==void 0)return this._valid;const ot=q.mag()>=2,bt=Ae.mag()>=2;if(!ot&&!bt)return;if(!ot||!bt)return this._firstMove===void 0&&(this._firstMove=it),it-this._firstMove<100&&void 0;const ar=q.y>0==Ae.y>0;return Em(q)&&Em(Ae)&&ar}}const sn={panStep:100,bearingStep:15,pitchStep:10};class Fn{constructor(q){this._tr=new Rv(q);const Ae=sn;this._panStep=Ae.panStep,this._bearingStep=Ae.bearingStep,this._pitchStep=Ae.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(q){if(q.altKey||q.ctrlKey||q.metaKey)return;let Ae=0,it=0,ot=0,bt=0,ar=0;switch(q.keyCode){case 61:case 107:case 171:case 187:Ae=1;break;case 189:case 109:case 173:Ae=-1;break;case 37:q.shiftKey?it=-1:(q.preventDefault(),bt=-1);break;case 39:q.shiftKey?it=1:(q.preventDefault(),bt=1);break;case 38:q.shiftKey?ot=1:(q.preventDefault(),ar=-1);break;case 40:q.shiftKey?ot=-1:(q.preventDefault(),ar=1);break;default:return}return this._rotationDisabled&&(it=0,ot=0),{cameraAnimation:yr=>{const Ur=this._tr;yr.easeTo({duration:300,easeId:"keyboardHandler",easing:Li,zoom:Ae?Math.round(Ur.zoom)+Ae*(q.shiftKey?2:1):Ur.zoom,bearing:Ur.bearing+it*this._bearingStep,pitch:Ur.pitch+ot*this._pitchStep,offset:[-bt*this._panStep,-ar*this._panStep],center:Ur.center},{originalEvent:q})}}}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 Li(wt){return wt*(2-wt)}const Si=4.000244140625;class ma{constructor(q,Ae){this._onTimeout=it=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(it)},this._map=q,this._tr=new Rv(q),this._triggerRenderFrame=Ae,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(q){this._defaultZoomRate=q}setWheelZoomRate(q){this._wheelZoomRate=q}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(q){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!q&&q.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(q){return!!this._map.cooperativeGestures.isEnabled()&&!(q.ctrlKey||this._map.cooperativeGestures.isBypassed(q))}wheel(q){if(!this.isEnabled())return;if(this._shouldBePrevented(q))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",q);let Ae=q.deltaMode===WheelEvent.DOM_DELTA_LINE?40*q.deltaY:q.deltaY;const it=v.now(),ot=it-(this._lastWheelEventTime||0);this._lastWheelEventTime=it,Ae!==0&&Ae%Si==0?this._type="wheel":Ae!==0&&Math.abs(Ae)<4?this._type="trackpad":ot>400?(this._type=null,this._lastValue=Ae,this._timeout=setTimeout(this._onTimeout,40,q)):this._type||(this._type=Math.abs(ot*Ae)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,Ae+=this._lastValue)),q.shiftKey&&Ae&&(Ae/=4),this._type&&(this._lastWheelEvent=q,this._delta-=Ae,this._active||this._start(q)),q.preventDefault()}_start(q){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 Ae=h.mousePos(this._map.getCanvas(),q),it=this._tr;this._around=Ae.y>it.transform.height/2-it.transform.getHorizon()?u.N.convert(this._aroundCenter?it.center:it.unproject(Ae)):u.N.convert(it.center),this._aroundPoint=it.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const q=this._tr.transform;if(this._delta!==0){const Ur=this._type==="wheel"&&Math.abs(this._delta)>Si?this._wheelZoomRate:this._defaultZoomRate;let ln=2/(1+Math.exp(-Math.abs(this._delta*Ur)));this._delta<0&&ln!==0&&(ln=1/ln);const Cn=typeof this._targetZoom=="number"?q.zoomScale(this._targetZoom):q.scale;this._targetZoom=Math.min(q.maxZoom,Math.max(q.minZoom,q.scaleZoom(Cn*ln))),this._type==="wheel"&&(this._startZoom=q.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const Ae=typeof this._targetZoom=="number"?this._targetZoom:q.zoom,it=this._startZoom,ot=this._easing;let bt,ar=!1;const yr=v.now()-this._lastWheelEventTime;if(this._type==="wheel"&&it&&ot&&yr){const Ur=Math.min(yr/200,1),ln=ot(Ur);bt=u.y.number(it,Ae,ln),Ur<1?this._frameId||(this._frameId=!0):ar=!0}else bt=Ae,ar=!0;return this._active=!0,ar&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!ar,zoomDelta:bt-q.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(q){let Ae=u.b9;if(this._prevEase){const it=this._prevEase,ot=(v.now()-it.start)/it.duration,bt=it.easing(ot+.01)-it.easing(ot),ar=.27/Math.sqrt(bt*bt+1e-4)*.01,yr=Math.sqrt(.0729-ar*ar);Ae=u.b8(ar,yr,.25,1)}return this._prevEase={start:v.now(),duration:q,easing:Ae},Ae}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class yo{constructor(q,Ae){this._clickZoom=q,this._tapZoom=Ae}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 uo{constructor(q){this._tr=new Rv(q),this.reset()}reset(){this._active=!1}dblclick(q,Ae){return q.preventDefault(),{cameraAnimation:it=>{it.easeTo({duration:300,zoom:this._tr.zoom+(q.shiftKey?-1:1),around:this._tr.unproject(Ae)},{originalEvent:q})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class rs{constructor(){this._tap=new l0({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(q,Ae,it){if(!this._swipePoint)if(this._tapTime){const ot=Ae[0],bt=q.timeStamp-this._tapTime<500,ar=this._tapPoint.dist(ot)<30;bt&&ar?it.length>0&&(this._swipePoint=ot,this._swipeTouch=it[0].identifier):this.reset()}else this._tap.touchstart(q,Ae,it)}touchmove(q,Ae,it){if(this._tapTime){if(this._swipePoint){if(it[0].identifier!==this._swipeTouch)return;const ot=Ae[0],bt=ot.y-this._swipePoint.y;return this._swipePoint=ot,q.preventDefault(),this._active=!0,{zoomDelta:bt/128}}}else this._tap.touchmove(q,Ae,it)}touchend(q,Ae,it){if(this._tapTime)this._swipePoint&&it.length===0&&this.reset();else{const ot=this._tap.touchend(q,Ae,it);ot&&(this._tapTime=q.timeStamp,this._tapPoint=ot)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class hs{constructor(q,Ae,it){this._el=q,this._mousePan=Ae,this._touchPan=it}enable(q){this._inertiaOptions=q||{},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 Ws{constructor(q,Ae,it){this._pitchWithRotate=q.pitchWithRotate,this._mouseRotate=Ae,this._mousePitch=it}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 Bo{constructor(q,Ae,it,ot){this._el=q,this._touchZoom=Ae,this._touchRotate=it,this._tapDragZoom=ot,this._rotationDisabled=!1,this._enabled=!0}enable(q){this._touchZoom.enable(q),this._rotationDisabled||this._touchRotate.enable(q),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 As{constructor(q,Ae){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=q,this._options=Ae,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const q=this._map.getCanvasContainer();q.classList.add("maplibregl-cooperative-gestures"),this._container=h.create("div","maplibregl-cooperative-gesture-screen",q);let Ae=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(Ae=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const it=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),ot=document.createElement("div");ot.className="maplibregl-desktop-message",ot.textContent=Ae,this._container.appendChild(ot);const bt=document.createElement("div");bt.className="maplibregl-mobile-message",bt.textContent=it,this._container.appendChild(bt),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(h.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(q){return q[this._bypassKey]}notifyGestureBlocked(q,Ae){this._enabled&&(this._map.fire(new u.k("cooperativegestureprevented",{gestureType:q,originalEvent:Ae})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}const Jo=wt=>wt.zoom||wt.drag||wt.pitch||wt.rotate;class Io extends u.k{}function ll(wt){return wt.panDelta&&wt.panDelta.mag()||wt.zoomDelta||wt.bearingDelta||wt.pitchDelta}class Tu{constructor(q,Ae){this.handleWindowEvent=ot=>{this.handleEvent(ot,`${ot.type}Window`)},this.handleEvent=(ot,bt)=>{if(ot.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const ar=ot.type==="renderFrame"?void 0:ot,yr={needsRenderFrame:!1},Ur={},ln={},Cn=ot.touches,Pn=Cn?this._getMapTouches(Cn):void 0,vi=Pn?h.touchPos(this._map.getCanvas(),Pn):h.mousePos(this._map.getCanvas(),ot);for(const{handlerName:zt,handler:Qt,allowed:cr}of this._handlers){if(!Qt.isEnabled())continue;let Sr;this._blockedByActive(ln,cr,zt)?Qt.reset():Qt[bt||ot.type]&&(Sr=Qt[bt||ot.type](ot,vi,Pn),this.mergeHandlerResult(yr,Ur,Sr,zt,ar),Sr&&Sr.needsRenderFrame&&this._triggerRenderFrame()),(Sr||Qt.isActive())&&(ln[zt]=Qt)}const Ui={};for(const zt in this._previousActiveHandlers)ln[zt]||(Ui[zt]=ar);this._previousActiveHandlers=ln,(Object.keys(Ui).length||ll(yr))&&(this._changes.push([yr,Ur,Ui]),this._triggerRenderFrame()),(Object.keys(ln).length||ll(yr))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:kt}=yr;kt&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],kt(this._map))},this._map=q,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new C0(q),this._bearingSnap=Ae.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(Ae);const it=this._el;this._listeners=[[it,"touchstart",{passive:!0}],[it,"touchmove",{passive:!1}],[it,"touchend",void 0],[it,"touchcancel",void 0],[it,"mousedown",void 0],[it,"mousemove",void 0],[it,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[it,"mouseover",void 0],[it,"mouseout",void 0],[it,"dblclick",void 0],[it,"click",void 0],[it,"keydown",{capture:!1}],[it,"keyup",void 0],[it,"wheel",{passive:!1}],[it,"contextmenu",void 0],[window,"blur",void 0]];for(const[ot,bt,ar]of this._listeners)h.addEventListener(ot,bt,ot===document?this.handleWindowEvent:this.handleEvent,ar)}destroy(){for(const[q,Ae,it]of this._listeners)h.removeEventListener(q,Ae,q===document?this.handleWindowEvent:this.handleEvent,it)}_addDefaultHandlers(q){const Ae=this._map,it=Ae.getCanvasContainer();this._add("mapEvent",new Kg(Ae,q));const ot=Ae.boxZoom=new cm(Ae,q);this._add("boxZoom",ot),q.interactive&&q.boxZoom&&ot.enable();const bt=Ae.cooperativeGestures=new As(Ae,q.cooperativeGestures);this._add("cooperativeGestures",bt),q.cooperativeGestures&&bt.enable();const ar=new fg(Ae),yr=new uo(Ae);Ae.doubleClickZoom=new yo(yr,ar),this._add("tapZoom",ar),this._add("clickZoom",yr),q.interactive&&q.doubleClickZoom&&Ae.doubleClickZoom.enable();const Ur=new rs;this._add("tapDragZoom",Ur);const ln=Ae.touchPitch=new iy(Ae);this._add("touchPitch",ln),q.interactive&&q.touchPitch&&Ae.touchPitch.enable(q.touchPitch);const Cn=Np(q),Pn=Py(q);Ae.dragRotate=new Ws(q,Cn,Pn),this._add("mouseRotate",Cn,["mousePitch"]),this._add("mousePitch",Pn,["mouseRotate"]),q.interactive&&q.dragRotate&&Ae.dragRotate.enable();const vi=(({enable:Sr,clickTolerance:gr})=>{const Nr=new Sm({checkCorrectEvent:vn=>h.mouseButton(vn)===0&&!vn.ctrlKey});return new Hv({clickTolerance:gr,move:(vn,An)=>({around:An,panDelta:An.sub(vn)}),activateOnStart:!0,moveStateManager:Nr,enable:Sr,assignEvents:H1})})(q),Ui=new jv(q,Ae);Ae.dragPan=new hs(it,vi,Ui),this._add("mousePan",vi),this._add("touchPan",Ui,["touchZoom","touchRotate"]),q.interactive&&q.dragPan&&Ae.dragPan.enable(q.dragPan);const kt=new dg,zt=new pv;Ae.touchZoomRotate=new Bo(it,zt,kt,Ur),this._add("touchRotate",kt,["touchPan","touchZoom"]),this._add("touchZoom",zt,["touchPan","touchRotate"]),q.interactive&&q.touchZoomRotate&&Ae.touchZoomRotate.enable(q.touchZoomRotate);const Qt=Ae.scrollZoom=new ma(Ae,()=>this._triggerRenderFrame());this._add("scrollZoom",Qt,["mousePan"]),q.interactive&&q.scrollZoom&&Ae.scrollZoom.enable(q.scrollZoom);const cr=Ae.keyboard=new Fn(Ae);this._add("keyboard",cr),q.interactive&&q.keyboard&&Ae.keyboard.enable(),this._add("blockableMapEvent",new Rd(Ae))}_add(q,Ae,it){this._handlers.push({handlerName:q,handler:Ae,allowed:it}),this._handlersById[q]=Ae}stop(q){if(!this._updatingCamera){for(const{handler:Ae}of this._handlers)Ae.reset();this._inertia.clear(),this._fireEvents({},{},q),this._changes=[]}}isActive(){for(const{handler:q}of this._handlers)if(q.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Jo(this._eventsInProgress)||this.isZooming()}_blockedByActive(q,Ae,it){for(const ot in q)if(ot!==it&&(!Ae||Ae.indexOf(ot)<0))return!0;return!1}_getMapTouches(q){const Ae=[];for(const it of q)this._el.contains(it.target)&&Ae.push(it);return Ae}mergeHandlerResult(q,Ae,it,ot,bt){if(!it)return;u.e(q,it);const ar={handlerName:ot,originalEvent:it.originalEvent||bt};it.zoomDelta!==void 0&&(Ae.zoom=ar),it.panDelta!==void 0&&(Ae.drag=ar),it.pitchDelta!==void 0&&(Ae.pitch=ar),it.bearingDelta!==void 0&&(Ae.rotate=ar)}_applyChanges(){const q={},Ae={},it={};for(const[ot,bt,ar]of this._changes)ot.panDelta&&(q.panDelta=(q.panDelta||new u.P(0,0))._add(ot.panDelta)),ot.zoomDelta&&(q.zoomDelta=(q.zoomDelta||0)+ot.zoomDelta),ot.bearingDelta&&(q.bearingDelta=(q.bearingDelta||0)+ot.bearingDelta),ot.pitchDelta&&(q.pitchDelta=(q.pitchDelta||0)+ot.pitchDelta),ot.around!==void 0&&(q.around=ot.around),ot.pinchAround!==void 0&&(q.pinchAround=ot.pinchAround),ot.noInertia&&(q.noInertia=ot.noInertia),u.e(Ae,bt),u.e(it,ar);this._updateMapTransform(q,Ae,it),this._changes=[]}_updateMapTransform(q,Ae,it){const ot=this._map,bt=ot._getTransformForUpdate(),ar=ot.terrain;if(!(ll(q)||ar&&this._terrainMovement))return this._fireEvents(Ae,it,!0);let{panDelta:yr,zoomDelta:Ur,bearingDelta:ln,pitchDelta:Cn,around:Pn,pinchAround:vi}=q;vi!==void 0&&(Pn=vi),ot._stop(!0),Pn=Pn||ot.transform.centerPoint;const Ui=bt.pointLocation(yr?Pn.sub(yr):Pn);ln&&(bt.bearing+=ln),Cn&&(bt.pitch+=Cn),Ur&&(bt.zoom+=Ur),ar?this._terrainMovement||!Ae.drag&&!Ae.zoom?Ae.drag&&this._terrainMovement?bt.center=bt.pointLocation(bt.centerPoint.sub(yr)):bt.setLocationAtPoint(Ui,Pn):(this._terrainMovement=!0,this._map._elevationFreeze=!0,bt.setLocationAtPoint(Ui,Pn)):bt.setLocationAtPoint(Ui,Pn),ot._applyUpdatedTransform(bt),this._map._update(),q.noInertia||this._inertia.record(q),this._fireEvents(Ae,it,!0)}_fireEvents(q,Ae,it){const ot=Jo(this._eventsInProgress),bt=Jo(q),ar={};for(const Pn in q){const{originalEvent:vi}=q[Pn];this._eventsInProgress[Pn]||(ar[`${Pn}start`]=vi),this._eventsInProgress[Pn]=q[Pn]}!ot&&bt&&this._fireEvent("movestart",bt.originalEvent);for(const Pn in ar)this._fireEvent(Pn,ar[Pn]);bt&&this._fireEvent("move",bt.originalEvent);for(const Pn in q){const{originalEvent:vi}=q[Pn];this._fireEvent(Pn,vi)}const yr={};let Ur;for(const Pn in this._eventsInProgress){const{handlerName:vi,originalEvent:Ui}=this._eventsInProgress[Pn];this._handlersById[vi].isActive()||(delete this._eventsInProgress[Pn],Ur=Ae[vi]||Ui,yr[`${Pn}end`]=Ur)}for(const Pn in yr)this._fireEvent(Pn,yr[Pn]);const ln=Jo(this._eventsInProgress),Cn=(ot||bt)&&!ln;if(Cn&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const Pn=this._map._getTransformForUpdate();Pn.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(Pn)}if(it&&Cn){this._updatingCamera=!0;const Pn=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),vi=Ui=>Ui!==0&&-this._bearingSnap<Ui&&Ui<this._bearingSnap;!Pn||!Pn.essential&&v.prefersReducedMotion?(this._map.fire(new u.k("moveend",{originalEvent:Ur})),vi(this._map.getBearing())&&this._map.resetNorth()):(vi(Pn.bearing||this._map.getBearing())&&(Pn.bearing=0),Pn.freezeElevation=!0,this._map.easeTo(Pn,{originalEvent:Ur})),this._updatingCamera=!1}}_fireEvent(q,Ae){this._map.fire(new u.k(q,Ae?{originalEvent:Ae}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(q=>{delete this._frameId,this.handleEvent(new Io("renderFrame",{timeStamp:q})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class du extends u.E{constructor(q,Ae){super(),this._renderFrameCallback=()=>{const it=Math.min((v.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(it)),it<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=q,this._bearingSnap=Ae.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new u.N(this.transform.center.lng,this.transform.center.lat)}setCenter(q,Ae){return this.jumpTo({center:q},Ae)}panBy(q,Ae,it){return q=u.P.convert(q).mult(-1),this.panTo(this.transform.center,u.e({offset:q},Ae),it)}panTo(q,Ae,it){return this.easeTo(u.e({center:q},Ae),it)}getZoom(){return this.transform.zoom}setZoom(q,Ae){return this.jumpTo({zoom:q},Ae),this}zoomTo(q,Ae,it){return this.easeTo(u.e({zoom:q},Ae),it)}zoomIn(q,Ae){return this.zoomTo(this.getZoom()+1,q,Ae),this}zoomOut(q,Ae){return this.zoomTo(this.getZoom()-1,q,Ae),this}getBearing(){return this.transform.bearing}setBearing(q,Ae){return this.jumpTo({bearing:q},Ae),this}getPadding(){return this.transform.padding}setPadding(q,Ae){return this.jumpTo({padding:q},Ae),this}rotateTo(q,Ae,it){return this.easeTo(u.e({bearing:q},Ae),it)}resetNorth(q,Ae){return this.rotateTo(0,u.e({duration:1e3},q),Ae),this}resetNorthPitch(q,Ae){return this.easeTo(u.e({bearing:0,pitch:0,duration:1e3},q),Ae),this}snapToNorth(q,Ae){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(q,Ae):this}getPitch(){return this.transform.pitch}setPitch(q,Ae){return this.jumpTo({pitch:q},Ae),this}cameraForBounds(q,Ae){q=Te.convert(q).adjustAntiMeridian();const it=Ae&&Ae.bearing||0;return this._cameraForBoxAndBearing(q.getNorthWest(),q.getSouthEast(),it,Ae)}_cameraForBoxAndBearing(q,Ae,it,ot){const bt={top:0,bottom:0,right:0,left:0};if(typeof(ot=u.e({padding:bt,offset:[0,0],maxZoom:this.transform.maxZoom},ot)).padding=="number"){const oa=ot.padding;ot.padding={top:oa,bottom:oa,right:oa,left:oa}}ot.padding=u.e(bt,ot.padding);const ar=this.transform,yr=ar.padding,Ur=new Te(q,Ae),ln=ar.project(Ur.getNorthWest()),Cn=ar.project(Ur.getNorthEast()),Pn=ar.project(Ur.getSouthEast()),vi=ar.project(Ur.getSouthWest()),Ui=u.ba(-it),kt=ln.rotate(Ui),zt=Cn.rotate(Ui),Qt=Pn.rotate(Ui),cr=vi.rotate(Ui),Sr=new u.P(Math.max(kt.x,zt.x,cr.x,Qt.x),Math.max(kt.y,zt.y,cr.y,Qt.y)),gr=new u.P(Math.min(kt.x,zt.x,cr.x,Qt.x),Math.min(kt.y,zt.y,cr.y,Qt.y)),Nr=Sr.sub(gr),vn=(ar.width-(yr.left+yr.right+ot.padding.left+ot.padding.right))/Nr.x,An=(ar.height-(yr.top+yr.bottom+ot.padding.top+ot.padding.bottom))/Nr.y;if(An<0||vn<0)return void u.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");const Ln=Math.min(ar.scaleZoom(ar.scale*Math.min(vn,An)),ot.maxZoom),ai=u.P.convert(ot.offset),ki=new u.P((ot.padding.left-ot.padding.right)/2,(ot.padding.top-ot.padding.bottom)/2).rotate(u.ba(it)),ra=ai.add(ki).mult(ar.scale/ar.zoomScale(Ln));return{center:ar.unproject(ln.add(Pn).div(2).sub(ra)),zoom:Ln,bearing:it}}fitBounds(q,Ae,it){return this._fitInternal(this.cameraForBounds(q,Ae),Ae,it)}fitScreenCoordinates(q,Ae,it,ot,bt){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(u.P.convert(q)),this.transform.pointLocation(u.P.convert(Ae)),it,ot),ot,bt)}_fitInternal(q,Ae,it){return q?(delete(Ae=u.e(q,Ae)).padding,Ae.linear?this.easeTo(Ae,it):this.flyTo(Ae,it)):this}jumpTo(q,Ae){this.stop();const it=this._getTransformForUpdate();let ot=!1,bt=!1,ar=!1;return"zoom"in q&&it.zoom!==+q.zoom&&(ot=!0,it.zoom=+q.zoom),q.center!==void 0&&(it.center=u.N.convert(q.center)),"bearing"in q&&it.bearing!==+q.bearing&&(bt=!0,it.bearing=+q.bearing),"pitch"in q&&it.pitch!==+q.pitch&&(ar=!0,it.pitch=+q.pitch),q.padding==null||it.isPaddingEqual(q.padding)||(it.padding=q.padding),this._applyUpdatedTransform(it),this.fire(new u.k("movestart",Ae)).fire(new u.k("move",Ae)),ot&&this.fire(new u.k("zoomstart",Ae)).fire(new u.k("zoom",Ae)).fire(new u.k("zoomend",Ae)),bt&&this.fire(new u.k("rotatestart",Ae)).fire(new u.k("rotate",Ae)).fire(new u.k("rotateend",Ae)),ar&&this.fire(new u.k("pitchstart",Ae)).fire(new u.k("pitch",Ae)).fire(new u.k("pitchend",Ae)),this.fire(new u.k("moveend",Ae))}calculateCameraOptionsFromTo(q,Ae,it,ot=0){const bt=u.Z.fromLngLat(q,Ae),ar=u.Z.fromLngLat(it,ot),yr=ar.x-bt.x,Ur=ar.y-bt.y,ln=ar.z-bt.z,Cn=Math.hypot(yr,Ur,ln);if(Cn===0)throw new Error("Can't calculate camera options with same From and To");const Pn=Math.hypot(yr,Ur),vi=this.transform.scaleZoom(this.transform.cameraToCenterDistance/Cn/this.transform.tileSize),Ui=180*Math.atan2(yr,-Ur)/Math.PI;let kt=180*Math.acos(Pn/Cn)/Math.PI;return kt=ln<0?90-kt:90+kt,{center:ar.toLngLat(),zoom:vi,pitch:kt,bearing:Ui}}easeTo(q,Ae){var it;this._stop(!1,q.easeId),((q=u.e({offset:[0,0],duration:500,easing:u.b9},q)).animate===!1||!q.essential&&v.prefersReducedMotion)&&(q.duration=0);const ot=this._getTransformForUpdate(),bt=ot.zoom,ar=ot.bearing,yr=ot.pitch,Ur=ot.padding,ln="bearing"in q?this._normalizeBearing(q.bearing,ar):ar,Cn="pitch"in q?+q.pitch:yr,Pn="padding"in q?q.padding:ot.padding,vi=u.P.convert(q.offset);let Ui=ot.centerPoint.add(vi);const kt=ot.pointLocation(Ui),{center:zt,zoom:Qt}=ot.getConstrained(u.N.convert(q.center||kt),(it=q.zoom)!==null&&it!==void 0?it:bt);this._normalizeCenter(zt,ot);const cr=ot.project(kt),Sr=ot.project(zt).sub(cr),gr=ot.zoomScale(Qt-bt);let Nr,vn;q.around&&(Nr=u.N.convert(q.around),vn=ot.locationPoint(Nr));const An={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||Qt!==bt,this._rotating=this._rotating||ar!==ln,this._pitching=this._pitching||Cn!==yr,this._padding=!ot.isPaddingEqual(Pn),this._easeId=q.easeId,this._prepareEase(Ae,q.noMoveStart,An),this.terrain&&this._prepareElevation(zt),this._ease(Ln=>{if(this._zooming&&(ot.zoom=u.y.number(bt,Qt,Ln)),this._rotating&&(ot.bearing=u.y.number(ar,ln,Ln)),this._pitching&&(ot.pitch=u.y.number(yr,Cn,Ln)),this._padding&&(ot.interpolatePadding(Ur,Pn,Ln),Ui=ot.centerPoint.add(vi)),this.terrain&&!q.freezeElevation&&this._updateElevation(Ln),Nr)ot.setLocationAtPoint(Nr,vn);else{const ai=ot.zoomScale(ot.zoom-bt),ki=Qt>bt?Math.min(2,gr):Math.max(.5,gr),ra=Math.pow(ki,1-Ln),oa=ot.unproject(cr.add(Sr.mult(Ln*ra)).mult(ai));ot.setLocationAtPoint(ot.renderWorldCopies?oa.wrap():oa,Ui)}this._applyUpdatedTransform(ot),this._fireMoveEvents(Ae)},Ln=>{this.terrain&&q.freezeElevation&&this._finalizeElevation(),this._afterEase(Ae,Ln)},q),this}_prepareEase(q,Ae,it={}){this._moving=!0,Ae||it.moving||this.fire(new u.k("movestart",q)),this._zooming&&!it.zooming&&this.fire(new u.k("zoomstart",q)),this._rotating&&!it.rotating&&this.fire(new u.k("rotatestart",q)),this._pitching&&!it.pitching&&this.fire(new u.k("pitchstart",q))}_prepareElevation(q){this._elevationCenter=q,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(q,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(q){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);const Ae=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(q<1&&Ae!==this._elevationTarget){const it=this._elevationTarget-this._elevationStart;this._elevationStart+=q*(it-(Ae-(it*q+this._elevationStart))/(1-q)),this._elevationTarget=Ae}this.transform.elevation=u.y.number(this._elevationStart,this._elevationTarget,q)}_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(q){const Ae=q.getCameraPosition(),it=this.terrain.getElevationForLngLatZoom(Ae.lngLat,q.zoom);if(Ae.altitude<it){const ot=this.calculateCameraOptionsFromTo(Ae.lngLat,it,q.center,q.elevation);return{pitch:ot.pitch,zoom:ot.zoom}}return{}}_applyUpdatedTransform(q){const Ae=[];if(this.terrain&&Ae.push(ot=>this._elevateCameraIfInsideTerrain(ot)),this.transformCameraUpdate&&Ae.push(ot=>this.transformCameraUpdate(ot)),!Ae.length)return;const it=q.clone();for(const ot of Ae){const bt=it.clone(),{center:ar,zoom:yr,pitch:Ur,bearing:ln,elevation:Cn}=ot(bt);ar&&(bt.center=ar),yr!==void 0&&(bt.zoom=yr),Ur!==void 0&&(bt.pitch=Ur),ln!==void 0&&(bt.bearing=ln),Cn!==void 0&&(bt.elevation=Cn),it.apply(bt)}this.transform.apply(it)}_fireMoveEvents(q){this.fire(new u.k("move",q)),this._zooming&&this.fire(new u.k("zoom",q)),this._rotating&&this.fire(new u.k("rotate",q)),this._pitching&&this.fire(new u.k("pitch",q))}_afterEase(q,Ae){if(this._easeId&&Ae&&this._easeId===Ae)return;delete this._easeId;const it=this._zooming,ot=this._rotating,bt=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,it&&this.fire(new u.k("zoomend",q)),ot&&this.fire(new u.k("rotateend",q)),bt&&this.fire(new u.k("pitchend",q)),this.fire(new u.k("moveend",q))}flyTo(q,Ae){var it;if(!q.essential&&v.prefersReducedMotion){const as=u.M(q,["center","zoom","bearing","pitch","around"]);return this.jumpTo(as,Ae)}this.stop(),q=u.e({offset:[0,0],speed:1.2,curve:1.42,easing:u.b9},q);const ot=this._getTransformForUpdate(),bt=ot.zoom,ar=ot.bearing,yr=ot.pitch,Ur=ot.padding,ln="bearing"in q?this._normalizeBearing(q.bearing,ar):ar,Cn="pitch"in q?+q.pitch:yr,Pn="padding"in q?q.padding:ot.padding,vi=u.P.convert(q.offset);let Ui=ot.centerPoint.add(vi);const kt=ot.pointLocation(Ui),{center:zt,zoom:Qt}=ot.getConstrained(u.N.convert(q.center||kt),(it=q.zoom)!==null&&it!==void 0?it:bt);this._normalizeCenter(zt,ot);const cr=ot.zoomScale(Qt-bt),Sr=ot.project(kt),gr=ot.project(zt).sub(Sr);let Nr=q.curve;const vn=Math.max(ot.width,ot.height),An=vn/cr,Ln=gr.mag();if("minZoom"in q){const as=u.ac(Math.min(q.minZoom,bt,Qt),ot.minZoom,ot.maxZoom),fl=vn/ot.zoomScale(as-bt);Nr=Math.sqrt(fl/Ln*2)}const ai=Nr*Nr;function ki(as){const fl=(An*An-vn*vn+(as?-1:1)*ai*ai*Ln*Ln)/(2*(as?An:vn)*ai*Ln);return Math.log(Math.sqrt(fl*fl+1)-fl)}function ra(as){return(Math.exp(as)-Math.exp(-as))/2}function oa(as){return(Math.exp(as)+Math.exp(-as))/2}const Ma=ki(!1);let mo=function(as){return oa(Ma)/oa(Ma+Nr*as)},ns=function(as){return vn*((oa(Ma)*(ra(fl=Ma+Nr*as)/oa(fl))-ra(Ma))/ai)/Ln;var fl},$o=(ki(!0)-Ma)/Nr;if(Math.abs(Ln)<1e-6||!isFinite($o)){if(Math.abs(vn-An)<1e-6)return this.easeTo(q,Ae);const as=An<vn?-1:1;$o=Math.abs(Math.log(An/vn))/Nr,ns=()=>0,mo=fl=>Math.exp(as*Nr*fl)}return q.duration="duration"in q?+q.duration:1e3*$o/("screenSpeed"in q?+q.screenSpeed/Nr:+q.speed),q.maxDuration&&q.duration>q.maxDuration&&(q.duration=0),this._zooming=!0,this._rotating=ar!==ln,this._pitching=Cn!==yr,this._padding=!ot.isPaddingEqual(Pn),this._prepareEase(Ae,!1),this.terrain&&this._prepareElevation(zt),this._ease(as=>{const fl=as*$o,Zl=1/mo(fl);ot.zoom=as===1?Qt:bt+ot.scaleZoom(Zl),this._rotating&&(ot.bearing=u.y.number(ar,ln,as)),this._pitching&&(ot.pitch=u.y.number(yr,Cn,as)),this._padding&&(ot.interpolatePadding(Ur,Pn,as),Ui=ot.centerPoint.add(vi)),this.terrain&&!q.freezeElevation&&this._updateElevation(as);const Fl=as===1?zt:ot.unproject(Sr.add(gr.mult(ns(fl))).mult(Zl));ot.setLocationAtPoint(ot.renderWorldCopies?Fl.wrap():Fl,Ui),this._applyUpdatedTransform(ot),this._fireMoveEvents(Ae)},()=>{this.terrain&&q.freezeElevation&&this._finalizeElevation(),this._afterEase(Ae)},q),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(q,Ae){var it;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const ot=this._onEaseEnd;delete this._onEaseEnd,ot.call(this,Ae)}return q||(it=this.handlers)===null||it===void 0||it.stop(!1),this}_ease(q,Ae,it){it.animate===!1||it.duration===0?(q(1),Ae()):(this._easeStart=v.now(),this._easeOptions=it,this._onEaseFrame=q,this._onEaseEnd=Ae,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(q,Ae){q=u.b3(q,-180,180);const it=Math.abs(q-Ae);return Math.abs(q-360-Ae)<it&&(q-=360),Math.abs(q+360-Ae)<it&&(q+=360),q}_normalizeCenter(q,Ae){if(!Ae.renderWorldCopies||Ae.lngRange)return;const it=q.lng-Ae.center.lng;q.lng+=it>180?-360:it<-180?360:0}queryTerrainElevation(q){return this.terrain?this.terrain.getElevationForLngLatZoom(u.N.convert(q),this.transform.tileZoom)-this.transform.elevation:null}}const ku={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class Au{constructor(q=ku){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=Ae=>{!Ae||Ae.sourceDataType!=="metadata"&&Ae.sourceDataType!=="visibility"&&Ae.dataType!=="style"&&Ae.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=q}getDefaultPosition(){return"bottom-right"}onAdd(q){return this._map=q,this._compact=this.options.compact,this._container=h.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=h.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=h.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(){h.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(q,Ae){const it=this._map._getUIString(`AttributionControl.${Ae}`);q.title=it,q.setAttribute("aria-label",it)}_updateAttributions(){if(!this._map.style)return;let q=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?q=q.concat(this.options.customAttribution.map(ot=>typeof ot!="string"?"":ot)):typeof this.options.customAttribution=="string"&&q.push(this.options.customAttribution)),this._map.style.stylesheet){const ot=this._map.style.stylesheet;this.styleOwner=ot.owner,this.styleId=ot.id}const Ae=this._map.style.sourceCaches;for(const ot in Ae){const bt=Ae[ot];if(bt.used||bt.usedForTerrain){const ar=bt.getSource();ar.attribution&&q.indexOf(ar.attribution)<0&&q.push(ar.attribution)}}q=q.filter(ot=>String(ot).trim()),q.sort((ot,bt)=>ot.length-bt.length),q=q.filter((ot,bt)=>{for(let ar=bt+1;ar<q.length;ar++)if(q[ar].indexOf(ot)>=0)return!1;return!0});const it=q.join(" | ");it!==this._attribHTML&&(this._attribHTML=it,q.length?(this._innerContainer.innerHTML=it,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class cl{constructor(q={}){this._updateCompact=()=>{const Ae=this._container.children;if(Ae.length){const it=Ae[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&it.classList.add("maplibregl-compact"):it.classList.remove("maplibregl-compact")}},this.options=q}getDefaultPosition(){return"bottom-left"}onAdd(q){this._map=q,this._compact=this.options&&this.options.compact,this._container=h.create("div","maplibregl-ctrl");const Ae=h.create("a","maplibregl-ctrl-logo");return Ae.target="_blank",Ae.rel="noopener nofollow",Ae.href="https://maplibre.org/",Ae.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),Ae.setAttribute("rel","noopener nofollow"),this._container.appendChild(Ae),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){h.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class Os{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(q){const Ae=++this._id;return this._queue.push({callback:q,id:Ae,cancelled:!1}),Ae}remove(q){const Ae=this._currentlyRunning,it=Ae?this._queue.concat(Ae):this._queue;for(const ot of it)if(ot.id===q)return void(ot.cancelled=!0)}run(q=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const Ae=this._currentlyRunning=this._queue;this._queue=[];for(const it of Ae)if(!it.cancelled&&(it.callback(q),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var Vu=u.Y([{name:"a_pos3d",type:"Int16",components:3}]);class Nc extends u.E{constructor(q){super(),this.sourceCache=q,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,q.usedForTerrain=!0,q.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(q,Ae){this.sourceCache.update(q,Ae),this._renderableTilesKeys=[];const it={};for(const ot of q.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:Ae}))it[ot.key]=!0,this._renderableTilesKeys.push(ot.key),this._tiles[ot.key]||(ot.posMatrix=new Float64Array(16),u.aP(ot.posMatrix,0,u.X,0,u.X,0,1),this._tiles[ot.key]=new Jt(ot,this.tileSize));for(const ot in this._tiles)it[ot]||delete this._tiles[ot]}freeRtt(q){for(const Ae in this._tiles){const it=this._tiles[Ae];(!q||it.tileID.equals(q)||it.tileID.isChildOf(q)||q.isChildOf(it.tileID))&&(it.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(q=>this.getTileByID(q))}getTileByID(q){return this._tiles[q]}getTerrainCoords(q){const Ae={};for(const it of this._renderableTilesKeys){const ot=this._tiles[it].tileID;if(ot.canonical.equals(q.canonical)){const bt=q.clone();bt.posMatrix=new Float64Array(16),u.aP(bt.posMatrix,0,u.X,0,u.X,0,1),Ae[it]=bt}else if(ot.canonical.isChildOf(q.canonical)){const bt=q.clone();bt.posMatrix=new Float64Array(16);const ar=ot.canonical.z-q.canonical.z,yr=ot.canonical.x-(ot.canonical.x>>ar<<ar),Ur=ot.canonical.y-(ot.canonical.y>>ar<<ar),ln=u.X>>ar;u.aP(bt.posMatrix,0,ln,0,ln,0,1),u.J(bt.posMatrix,bt.posMatrix,[-yr*ln,-Ur*ln,0]),Ae[it]=bt}else if(q.canonical.isChildOf(ot.canonical)){const bt=q.clone();bt.posMatrix=new Float64Array(16);const ar=q.canonical.z-ot.canonical.z,yr=q.canonical.x-(q.canonical.x>>ar<<ar),Ur=q.canonical.y-(q.canonical.y>>ar<<ar),ln=u.X>>ar;u.aP(bt.posMatrix,0,u.X,0,u.X,0,1),u.J(bt.posMatrix,bt.posMatrix,[yr*ln,Ur*ln,0]),u.K(bt.posMatrix,bt.posMatrix,[1/2**ar,1/2**ar,0]),Ae[it]=bt}}return Ae}getSourceTile(q,Ae){const it=this.sourceCache._source;let ot=q.overscaledZ-this.deltaZoom;if(ot>it.maxzoom&&(ot=it.maxzoom),ot<it.minzoom)return null;this._sourceTileCache[q.key]||(this._sourceTileCache[q.key]=q.scaledTo(ot).key);let bt=this.sourceCache.getTileByID(this._sourceTileCache[q.key]);if((!bt||!bt.dem)&&Ae)for(;ot>=it.minzoom&&(!bt||!bt.dem);)bt=this.sourceCache.getTileByID(q.scaledTo(ot--).key);return bt}tilesAfterTime(q=Date.now()){return Object.values(this._tiles).filter(Ae=>Ae.timeAdded>=q)}}class Sf{constructor(q,Ae,it){this.painter=q,this.sourceCache=new Nc(Ae),this.options=it,this.exaggeration=typeof it.exaggeration=="number"?it.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(q,Ae,it,ot=u.X){var bt;if(!(Ae>=0&&Ae<ot&&it>=0&&it<ot))return 0;const ar=this.getTerrainData(q),yr=(bt=ar.tile)===null||bt===void 0?void 0:bt.dem;if(!yr)return 0;const Ur=(function(kt,zt,Qt){var cr=zt[0],Sr=zt[1];return kt[0]=Qt[0]*cr+Qt[4]*Sr+Qt[12],kt[1]=Qt[1]*cr+Qt[5]*Sr+Qt[13],kt})([],[Ae/ot*u.X,it/ot*u.X],ar.u_terrain_matrix),ln=[Ur[0]*yr.dim,Ur[1]*yr.dim],Cn=Math.floor(ln[0]),Pn=Math.floor(ln[1]),vi=ln[0]-Cn,Ui=ln[1]-Pn;return yr.get(Cn,Pn)*(1-vi)*(1-Ui)+yr.get(Cn+1,Pn)*vi*(1-Ui)+yr.get(Cn,Pn+1)*(1-vi)*Ui+yr.get(Cn+1,Pn+1)*vi*Ui}getElevationForLngLatZoom(q,Ae){if(!u.bb(Ae,q.wrap()))return 0;const{tileID:it,mercatorX:ot,mercatorY:bt}=this._getOverscaledTileIDFromLngLatZoom(q,Ae);return this.getElevation(it,ot%u.X,bt%u.X,u.X)}getElevation(q,Ae,it,ot=u.X){return this.getDEMElevation(q,Ae,it,ot)*this.exaggeration}getTerrainData(q){if(!this._emptyDemTexture){const ot=this.painter.context,bt=new u.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new y(ot,bt,ot.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new y(ot,new u.R({width:1,height:1}),ot.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(ot.gl.NEAREST,ot.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=u.an([])}const Ae=this.sourceCache.getSourceTile(q,!0);if(Ae&&Ae.dem&&(!Ae.demTexture||Ae.needsTerrainPrepare)){const ot=this.painter.context;Ae.demTexture=this.painter.getTileTexture(Ae.dem.stride),Ae.demTexture?Ae.demTexture.update(Ae.dem.getPixels(),{premultiply:!1}):Ae.demTexture=new y(ot,Ae.dem.getPixels(),ot.gl.RGBA,{premultiply:!1}),Ae.demTexture.bind(ot.gl.NEAREST,ot.gl.CLAMP_TO_EDGE),Ae.needsTerrainPrepare=!1}const it=Ae&&Ae+Ae.tileID.key+q.key;if(it&&!this._demMatrixCache[it]){const ot=this.sourceCache.sourceCache._source.maxzoom;let bt=q.canonical.z-Ae.tileID.canonical.z;q.overscaledZ>q.canonical.z&&(q.canonical.z>=ot?bt=q.canonical.z-ot:u.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const ar=q.canonical.x-(q.canonical.x>>bt<<bt),yr=q.canonical.y-(q.canonical.y>>bt<<bt),Ur=u.bc(new Float64Array(16),[1/(u.X<<bt),1/(u.X<<bt),0]);u.J(Ur,Ur,[ar*u.X,yr*u.X,0]),this._demMatrixCache[q.key]={matrix:Ur,coord:q}}return{u_depth:2,u_terrain:3,u_terrain_dim:Ae&&Ae.dem&&Ae.dem.dim||1,u_terrain_matrix:it?this._demMatrixCache[q.key].matrix:this._emptyDemMatrix,u_terrain_unpack:Ae&&Ae.dem&&Ae.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(Ae&&Ae.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:Ae}}getFramebuffer(q){const Ae=this.painter,it=Ae.width/devicePixelRatio,ot=Ae.height/devicePixelRatio;return!this._fbo||this._fbo.width===it&&this._fbo.height===ot||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new y(Ae.context,{width:it,height:ot,data:null},Ae.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(Ae.context.gl.NEAREST,Ae.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new y(Ae.context,{width:it,height:ot,data:null},Ae.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(Ae.context.gl.NEAREST,Ae.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=Ae.context.createFramebuffer(it,ot,!0,!1),this._fbo.depthAttachment.set(Ae.context.createRenderbuffer(Ae.context.gl.DEPTH_COMPONENT16,it,ot))),this._fbo.colorAttachment.set(q==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const q=this.painter.context;if(this._coordsTexture)return this._coordsTexture;const Ae=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let bt=0,ar=0;bt<this._coordsTextureSize;bt++)for(let yr=0;yr<this._coordsTextureSize;yr++,ar+=4)Ae[ar+0]=255&yr,Ae[ar+1]=255&bt,Ae[ar+2]=yr>>8<<4|bt>>8,Ae[ar+3]=0;const it=new u.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(Ae.buffer)),ot=new y(q,it,q.gl.RGBA,{premultiply:!1});return ot.bind(q.gl.NEAREST,q.gl.CLAMP_TO_EDGE),this._coordsTexture=ot,ot}pointCoordinate(q){this.painter.maybeDrawDepthAndCoords(!0);const Ae=new Uint8Array(4),it=this.painter.context,ot=it.gl,bt=Math.round(q.x*this.painter.pixelRatio/devicePixelRatio),ar=Math.round(q.y*this.painter.pixelRatio/devicePixelRatio),yr=Math.round(this.painter.height/devicePixelRatio);it.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),ot.readPixels(bt,yr-ar-1,1,1,ot.RGBA,ot.UNSIGNED_BYTE,Ae),it.bindFramebuffer.set(null);const Ur=Ae[0]+(Ae[2]>>4<<8),ln=Ae[1]+((15&Ae[2])<<8),Cn=this.coordsIndex[255-Ae[3]],Pn=Cn&&this.sourceCache.getTileByID(Cn);if(!Pn)return null;const vi=this._coordsTextureSize,Ui=(1<<Pn.tileID.canonical.z)*vi;return new u.Z((Pn.tileID.canonical.x*vi+Ur)/Ui+Pn.tileID.wrap,(Pn.tileID.canonical.y*vi+ln)/Ui,this.getElevation(Pn.tileID,Ur,ln,vi))}depthAtPoint(q){const Ae=new Uint8Array(4),it=this.painter.context,ot=it.gl;return it.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),ot.readPixels(q.x,this.painter.height/devicePixelRatio-q.y-1,1,1,ot.RGBA,ot.UNSIGNED_BYTE,Ae),it.bindFramebuffer.set(null),(Ae[0]/16777216+Ae[1]/65536+Ae[2]/256+Ae[3])/256}getTerrainMesh(){if(this._mesh)return this._mesh;const q=this.painter.context,Ae=new u.bd,it=new u.aY,ot=this.meshSize,bt=u.X/ot,ar=ot*ot;for(let Pn=0;Pn<=ot;Pn++)for(let vi=0;vi<=ot;vi++)Ae.emplaceBack(vi*bt,Pn*bt,0);for(let Pn=0;Pn<ar;Pn+=ot+1)for(let vi=0;vi<ot;vi++)it.emplaceBack(vi+Pn,ot+vi+Pn+1,ot+vi+Pn+2),it.emplaceBack(vi+Pn,ot+vi+Pn+2,vi+Pn+1);const yr=Ae.length,Ur=yr+2*(ot+1);for(const Pn of[0,1])for(let vi=0;vi<=ot;vi++)for(const Ui of[0,1])Ae.emplaceBack(vi*bt,Pn*u.X,Ui);for(let Pn=0;Pn<2*ot;Pn+=2)it.emplaceBack(Ur+Pn,Ur+Pn+1,Ur+Pn+3),it.emplaceBack(Ur+Pn,Ur+Pn+3,Ur+Pn+2),it.emplaceBack(yr+Pn,yr+Pn+3,yr+Pn+1),it.emplaceBack(yr+Pn,yr+Pn+2,yr+Pn+3);const ln=Ae.length,Cn=ln+2*(ot+1);for(const Pn of[0,1])for(let vi=0;vi<=ot;vi++)for(const Ui of[0,1])Ae.emplaceBack(Pn*u.X,vi*bt,Ui);for(let Pn=0;Pn<2*ot;Pn+=2)it.emplaceBack(ln+Pn,ln+Pn+1,ln+Pn+3),it.emplaceBack(ln+Pn,ln+Pn+3,ln+Pn+2),it.emplaceBack(Cn+Pn,Cn+Pn+3,Cn+Pn+1),it.emplaceBack(Cn+Pn,Cn+Pn+2,Cn+Pn+3);return this._mesh=new Cv(q.createVertexBuffer(Ae,Vu.members),q.createIndexBuffer(it),u.a0.simpleSegment(0,0,Ae.length,it.length)),this._mesh}getMeshFrameDelta(q){return 2*Math.PI*u.be/Math.pow(2,q)/5}getMinTileElevationForLngLatZoom(q,Ae){var it;const{tileID:ot}=this._getOverscaledTileIDFromLngLatZoom(q,Ae);return(it=this.getMinMaxElevation(ot).minElevation)!==null&&it!==void 0?it:0}getMinMaxElevation(q){const Ae=this.getTerrainData(q).tile,it={minElevation:null,maxElevation:null};return Ae&&Ae.dem&&(it.minElevation=Ae.dem.min*this.exaggeration,it.maxElevation=Ae.dem.max*this.exaggeration),it}_getOverscaledTileIDFromLngLatZoom(q,Ae){const it=u.Z.fromLngLat(q.wrap()),ot=(1<<Ae)*u.X,bt=it.x*ot,ar=it.y*ot,yr=Math.floor(bt/u.X),Ur=Math.floor(ar/u.X);return{tileID:new u.S(Ae,0,Ae,yr,Ur),mercatorX:bt,mercatorY:ar}}}class sd{constructor(q,Ae,it){this._context=q,this._size=Ae,this._tileSize=it,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(const q of this._objects)q.texture.destroy(),q.fbo.destroy()}_createObject(q){const Ae=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),it=new y(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return it.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),Ae.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),Ae.colorAttachment.set(it.texture),{id:q,fbo:Ae,texture:it,stamp:-1,inUse:!1}}getObjectForId(q){return this._objects[q]}useObject(q){q.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(Ae=>q.id!==Ae),this._recentlyUsed.push(q.id)}stampObject(q){q.stamp=++this._stamp}getOrCreateFreeObject(){for(const Ae of this._recentlyUsed)if(!this._objects[Ae].inUse)return this._objects[Ae];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const q=this._createObject(this._objects.length);return this._objects.push(q),q}freeObject(q){q.inUse=!1}freeAllObjects(){for(const q of this._objects)this.freeObject(q)}isFull(){return!(this._objects.length<this._size)&&this._objects.some(q=>!q.inUse)===!1}}const Cf={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class ld{constructor(q,Ae){this.painter=q,this.terrain=Ae,this.pool=new sd(q.context,30,Ae.sourceCache.tileSize*Ae.qualityFactor)}destruct(){this.pool.destruct()}getTexture(q){return this.pool.getObjectForId(q.rtt[this._stacks.length-1].id).texture}prepareForRender(q,Ae){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=q._order.filter(it=>!q._layers[it].isHidden(Ae)),this._coordsDescendingInv={};for(const it in q.sourceCaches){this._coordsDescendingInv[it]={};const ot=q.sourceCaches[it].getVisibleCoordinates();for(const bt of ot){const ar=this.terrain.sourceCache.getTerrainCoords(bt);for(const yr in ar)this._coordsDescendingInv[it][yr]||(this._coordsDescendingInv[it][yr]=[]),this._coordsDescendingInv[it][yr].push(ar[yr])}}this._coordsDescendingInvStr={};for(const it of q._order){const ot=q._layers[it],bt=ot.source;if(Cf[ot.type]&&!this._coordsDescendingInvStr[bt]){this._coordsDescendingInvStr[bt]={};for(const ar in this._coordsDescendingInv[bt])this._coordsDescendingInvStr[bt][ar]=this._coordsDescendingInv[bt][ar].map(yr=>yr.key).sort().join()}}for(const it of this._renderableTiles)for(const ot in this._coordsDescendingInvStr){const bt=this._coordsDescendingInvStr[ot][it.tileID.key];bt&&bt!==it.rttCoords[ot]&&(it.rtt=[])}}renderLayer(q){if(q.isHidden(this.painter.transform.zoom))return!1;const Ae=q.type,it=this.painter,ot=this._renderableLayerIds[this._renderableLayerIds.length-1]===q.id;if(Cf[Ae]&&(this._prevType&&Cf[this._prevType]||this._stacks.push([]),this._prevType=Ae,this._stacks[this._stacks.length-1].push(q.id),!ot))return!0;if(Cf[this._prevType]||Cf[Ae]&&ot){this._prevType=Ae;const bt=this._stacks.length-1,ar=this._stacks[bt]||[];for(const yr of this._renderableTiles){if(this.pool.isFull()&&(uh(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(yr),yr.rtt[bt]){const ln=this.pool.getObjectForId(yr.rtt[bt].id);if(ln.stamp===yr.rtt[bt].stamp){this.pool.useObject(ln);continue}}const Ur=this.pool.getOrCreateFreeObject();this.pool.useObject(Ur),this.pool.stampObject(Ur),yr.rtt[bt]={id:Ur.id,stamp:Ur.stamp},it.context.bindFramebuffer.set(Ur.fbo.framebuffer),it.context.clear({color:u.aM.transparent,stencil:0}),it.currentStencilSource=void 0;for(let ln=0;ln<ar.length;ln++){const Cn=it.style._layers[ar[ln]],Pn=Cn.source?this._coordsDescendingInv[Cn.source][yr.tileID.key]:[yr.tileID];it.context.viewport.set([0,0,Ur.fbo.width,Ur.fbo.height]),it._renderTileClippingMasks(Cn,Pn),it.renderLayer(it,it.style.sourceCaches[Cn.source],Cn,Pn),Cn.source&&(yr.rttCoords[Cn.source]=this._coordsDescendingInvStr[Cn.source][yr.tileID.key])}}return uh(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects(),Cf[Ae]}return!1}}const Jc={"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"},wh=c,vh={hash:!1,interactive:!0,bearingSnap:7,attributionControl:ku,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:u.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},rd=wt=>{wt.touchstart=wt.dragStart,wt.touchmoveWindow=wt.dragMove,wt.touchend=wt.dragEnd},Wl={showCompass:!0,showZoom:!0,visualizePitch:!1};class lc{constructor(q,Ae,it=!1){this.mousedown=ar=>{this.startMouse(u.e({},ar,{ctrlKey:!0,preventDefault:()=>ar.preventDefault()}),h.mousePos(this.element,ar)),h.addEventListener(window,"mousemove",this.mousemove),h.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=ar=>{this.moveMouse(ar,h.mousePos(this.element,ar))},this.mouseup=ar=>{this.mouseRotate.dragEnd(ar),this.mousePitch&&this.mousePitch.dragEnd(ar),this.offTemp()},this.touchstart=ar=>{ar.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=h.touchPos(this.element,ar.targetTouches)[0],this.startTouch(ar,this._startPos),h.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),h.addEventListener(window,"touchend",this.touchend))},this.touchmove=ar=>{ar.targetTouches.length!==1?this.reset():(this._lastPos=h.touchPos(this.element,ar.targetTouches)[0],this.moveTouch(ar,this._lastPos))},this.touchend=ar=>{ar.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 ot=q.dragRotate._mouseRotate.getClickTolerance(),bt=q.dragRotate._mousePitch.getClickTolerance();this.element=Ae,this.mouseRotate=Np({clickTolerance:ot,enable:!0}),this.touchRotate=(({enable:ar,clickTolerance:yr,bearingDegreesPerPixelMoved:Ur=.8})=>{const ln=new c0;return new Hv({clickTolerance:yr,move:(Cn,Pn)=>({bearingDelta:(Pn.x-Cn.x)*Ur}),moveStateManager:ln,enable:ar,assignEvents:rd})})({clickTolerance:ot,enable:!0}),this.map=q,it&&(this.mousePitch=Py({clickTolerance:bt,enable:!0}),this.touchPitch=(({enable:ar,clickTolerance:yr,pitchDegreesPerPixelMoved:Ur=-.5})=>{const ln=new c0;return new Hv({clickTolerance:yr,move:(Cn,Pn)=>({pitchDelta:(Pn.y-Cn.y)*Ur}),moveStateManager:ln,enable:ar,assignEvents:rd})})({clickTolerance:bt,enable:!0})),h.addEventListener(Ae,"mousedown",this.mousedown),h.addEventListener(Ae,"touchstart",this.touchstart,{passive:!1}),h.addEventListener(Ae,"touchcancel",this.reset)}startMouse(q,Ae){this.mouseRotate.dragStart(q,Ae),this.mousePitch&&this.mousePitch.dragStart(q,Ae),h.disableDrag()}startTouch(q,Ae){this.touchRotate.dragStart(q,Ae),this.touchPitch&&this.touchPitch.dragStart(q,Ae),h.disableDrag()}moveMouse(q,Ae){const it=this.map,{bearingDelta:ot}=this.mouseRotate.dragMove(q,Ae)||{};if(ot&&it.setBearing(it.getBearing()+ot),this.mousePitch){const{pitchDelta:bt}=this.mousePitch.dragMove(q,Ae)||{};bt&&it.setPitch(it.getPitch()+bt)}}moveTouch(q,Ae){const it=this.map,{bearingDelta:ot}=this.touchRotate.dragMove(q,Ae)||{};if(ot&&it.setBearing(it.getBearing()+ot),this.touchPitch){const{pitchDelta:bt}=this.touchPitch.dragMove(q,Ae)||{};bt&&it.setPitch(it.getPitch()+bt)}}off(){const q=this.element;h.removeEventListener(q,"mousedown",this.mousedown),h.removeEventListener(q,"touchstart",this.touchstart,{passive:!1}),h.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),h.removeEventListener(window,"touchend",this.touchend),h.removeEventListener(q,"touchcancel",this.reset),this.offTemp()}offTemp(){h.enableDrag(),h.removeEventListener(window,"mousemove",this.mousemove),h.removeEventListener(window,"mouseup",this.mouseup),h.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),h.removeEventListener(window,"touchend",this.touchend)}}let Bf;function gf(wt,q,Ae){const it=new u.N(wt.lng,wt.lat);if(wt=new u.N(wt.lng,wt.lat),q){const ot=new u.N(wt.lng-360,wt.lat),bt=new u.N(wt.lng+360,wt.lat),ar=Ae.locationPoint(wt).distSqr(q);Ae.locationPoint(ot).distSqr(q)<ar?wt=ot:Ae.locationPoint(bt).distSqr(q)<ar&&(wt=bt)}for(;Math.abs(wt.lng-Ae.center.lng)>180;){const ot=Ae.locationPoint(wt);if(ot.x>=0&&ot.y>=0&&ot.x<=Ae.width&&ot.y<=Ae.height)break;wt.lng>Ae.center.lng?wt.lng-=360:wt.lng+=360}return wt.lng!==it.lng&&Ae.locationPoint(wt).y>Ae.height/2-Ae.getHorizon()?wt:it}const rv={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 nv(wt,q,Ae){const it=wt.classList;for(const ot in rv)it.remove(`maplibregl-${Ae}-anchor-${ot}`);it.add(`maplibregl-${Ae}-anchor-${q}`)}class vv extends u.E{constructor(q){if(super(),this._onKeyPress=Ae=>{const it=Ae.code,ot=Ae.charCode||Ae.keyCode;it!=="Space"&&it!=="Enter"&&ot!==32&&ot!==13||this.togglePopup()},this._onMapClick=Ae=>{const it=Ae.originalEvent.target,ot=this._element;this._popup&&(it===ot||ot.contains(it))&&this.togglePopup()},this._update=Ae=>{var it;if(!this._map)return;const ot=this._map.loaded()&&!this._map.isMoving();(Ae?.type==="terrain"||Ae?.type==="render"&&!ot)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?gf(this._lngLat,this._flatPos,this._map.transform):(it=this._lngLat)===null||it===void 0?void 0:it.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 bt="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?bt=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(bt=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let ar="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?ar="rotateX(0deg)":this._pitchAlignment==="map"&&(ar=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||Ae&&Ae.type!=="moveend"||(this._pos=this._pos.round()),h.setTransform(this._element,`${rv[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${ar} ${bt}`),v.frameAsync(new AbortController).then(()=>{this._updateOpacity(Ae&&Ae.type==="moveend")}).catch(()=>{})},this._onMove=Ae=>{if(!this._isDragging){const it=this._clickTolerance||this._map._clickTolerance;this._isDragging=Ae.point.dist(this._pointerdownPos)>=it}this._isDragging&&(this._pos=Ae.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 u.k("dragstart"))),this.fire(new u.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 u.k("dragend")),this._state="inactive"},this._addDragHandler=Ae=>{this._element.contains(Ae.originalEvent.target)&&(Ae.preventDefault(),this._positionDelta=Ae.point.sub(this._pos).add(this._offset),this._pointerdownPos=Ae.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=q&&q.anchor||"center",this._color=q&&q.color||"#3FB1CE",this._scale=q&&q.scale||1,this._draggable=q&&q.draggable||!1,this._clickTolerance=q&&q.clickTolerance||0,this._subpixelPositioning=q&&q.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=q&&q.rotation||0,this._rotationAlignment=q&&q.rotationAlignment||"auto",this._pitchAlignment=q&&q.pitchAlignment&&q.pitchAlignment!=="auto"?q.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(q?.opacity,q?.opacityWhenCovered),q&&q.element)this._element=q.element,this._offset=u.P.convert(q&&q.offset||[0,0]);else{this._defaultMarker=!0,this._element=h.create("div");const Ae=h.createNS("http://www.w3.org/2000/svg","svg"),it=41,ot=27;Ae.setAttributeNS(null,"display","block"),Ae.setAttributeNS(null,"height",`${it}px`),Ae.setAttributeNS(null,"width",`${ot}px`),Ae.setAttributeNS(null,"viewBox",`0 0 ${ot} ${it}`);const bt=h.createNS("http://www.w3.org/2000/svg","g");bt.setAttributeNS(null,"stroke","none"),bt.setAttributeNS(null,"stroke-width","1"),bt.setAttributeNS(null,"fill","none"),bt.setAttributeNS(null,"fill-rule","evenodd");const ar=h.createNS("http://www.w3.org/2000/svg","g");ar.setAttributeNS(null,"fill-rule","nonzero");const yr=h.createNS("http://www.w3.org/2000/svg","g");yr.setAttributeNS(null,"transform","translate(3.0, 29.0)"),yr.setAttributeNS(null,"fill","#000000");const Ur=[{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 cr of Ur){const Sr=h.createNS("http://www.w3.org/2000/svg","ellipse");Sr.setAttributeNS(null,"opacity","0.04"),Sr.setAttributeNS(null,"cx","10.5"),Sr.setAttributeNS(null,"cy","5.80029008"),Sr.setAttributeNS(null,"rx",cr.rx),Sr.setAttributeNS(null,"ry",cr.ry),yr.appendChild(Sr)}const ln=h.createNS("http://www.w3.org/2000/svg","g");ln.setAttributeNS(null,"fill",this._color);const Cn=h.createNS("http://www.w3.org/2000/svg","path");Cn.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"),ln.appendChild(Cn);const Pn=h.createNS("http://www.w3.org/2000/svg","g");Pn.setAttributeNS(null,"opacity","0.25"),Pn.setAttributeNS(null,"fill","#000000");const vi=h.createNS("http://www.w3.org/2000/svg","path");vi.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"),Pn.appendChild(vi);const Ui=h.createNS("http://www.w3.org/2000/svg","g");Ui.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Ui.setAttributeNS(null,"fill","#FFFFFF");const kt=h.createNS("http://www.w3.org/2000/svg","g");kt.setAttributeNS(null,"transform","translate(8.0, 8.0)");const zt=h.createNS("http://www.w3.org/2000/svg","circle");zt.setAttributeNS(null,"fill","#000000"),zt.setAttributeNS(null,"opacity","0.25"),zt.setAttributeNS(null,"cx","5.5"),zt.setAttributeNS(null,"cy","5.5"),zt.setAttributeNS(null,"r","5.4999962");const Qt=h.createNS("http://www.w3.org/2000/svg","circle");Qt.setAttributeNS(null,"fill","#FFFFFF"),Qt.setAttributeNS(null,"cx","5.5"),Qt.setAttributeNS(null,"cy","5.5"),Qt.setAttributeNS(null,"r","5.4999962"),kt.appendChild(zt),kt.appendChild(Qt),ar.appendChild(yr),ar.appendChild(ln),ar.appendChild(Pn),ar.appendChild(Ui),ar.appendChild(kt),Ae.appendChild(ar),Ae.setAttributeNS(null,"height",it*this._scale+"px"),Ae.setAttributeNS(null,"width",ot*this._scale+"px"),this._element.appendChild(Ae),this._offset=u.P.convert(q&&q.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",Ae=>{Ae.preventDefault()}),this._element.addEventListener("mousedown",Ae=>{Ae.preventDefault()}),nv(this._element,this._anchor,"marker"),q&&q.className)for(const Ae of q.className.split(" "))this._element.classList.add(Ae);this._popup=null}addTo(q){return this.remove(),this._map=q,this._element.setAttribute("aria-label",q._getUIString("Marker.Title")),q.getCanvasContainer().appendChild(this._element),q.on("move",this._update),q.on("moveend",this._update),q.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),h.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(q){return this._lngLat=u.N.convert(q),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(q){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),q){if(!("offset"in q.options)){const ot=Math.abs(13.5)/Math.SQRT2;q.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[ot,-1*(38.1-13.5+ot)],"bottom-right":[-ot,-1*(38.1-13.5+ot)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=q,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(q){return this._subpixelPositioning=q,this}getPopup(){return this._popup}togglePopup(){const q=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:q?(q.isOpen()?q.remove():(q.setLngLat(this._lngLat),q.addTo(this._map)),this):this}_updateOpacity(q=!1){var Ae,it;if(!(!((Ae=this._map)===null||Ae===void 0)&&Ae.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(q)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}const ot=this._map,bt=ot.terrain.depthAtPoint(this._pos),ar=ot.terrain.getElevationForLngLatZoom(this._lngLat,ot.transform.tileZoom);if(ot.transform.lngLatToCameraDepth(this._lngLat,ar)-bt<.006)return void(this._element.style.opacity=this._opacity);const yr=-this._offset.y/ot.transform._pixelPerMeter,Ur=Math.sin(ot.getPitch()*Math.PI/180)*yr,ln=ot.terrain.depthAtPoint(new u.P(this._pos.x,this._pos.y-this._offset.y)),Cn=ot.transform.lngLatToCameraDepth(this._lngLat,ar+Ur)-ln>.006;!((it=this._popup)===null||it===void 0)&&it.isOpen()&&Cn&&this._popup.remove(),this._element.style.opacity=Cn?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(q){return this._offset=u.P.convert(q),this._update(),this}addClassName(q){this._element.classList.add(q)}removeClassName(q){this._element.classList.remove(q)}toggleClassName(q){return this._element.classList.toggle(q)}setDraggable(q){return this._draggable=!!q,this._map&&(q?(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(q){return this._rotation=q||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(q){return this._rotationAlignment=q||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(q){return this._pitchAlignment=q&&q!=="auto"?q:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(q,Ae){return q===void 0&&Ae===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),q!==void 0&&(this._opacity=q),Ae!==void 0&&(this._opacityWhenCovered=Ae),this._map&&this._updateOpacity(!0),this}}const kg={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let iv=0,$m=!1;const Sh={maxWidth:100,unit:"metric"};function Wm(wt,q,Ae){const it=Ae&&Ae.maxWidth||100,ot=wt._container.clientHeight/2,bt=wt.unproject([0,ot]),ar=wt.unproject([it,ot]),yr=bt.distanceTo(ar);if(Ae&&Ae.unit==="imperial"){const Ur=3.2808*yr;Ur>5280?Iu(q,it,Ur/5280,wt._getUIString("ScaleControl.Miles")):Iu(q,it,Ur,wt._getUIString("ScaleControl.Feet"))}else Ae&&Ae.unit==="nautical"?Iu(q,it,yr/1852,wt._getUIString("ScaleControl.NauticalMiles")):yr>=1e3?Iu(q,it,yr/1e3,wt._getUIString("ScaleControl.Kilometers")):Iu(q,it,yr,wt._getUIString("ScaleControl.Meters"))}function Iu(wt,q,Ae,it){const ot=(function(bt){const ar=Math.pow(10,`${Math.floor(bt)}`.length-1);let yr=bt/ar;return yr=yr>=10?10:yr>=5?5:yr>=3?3:yr>=2?2:yr>=1?1:(function(Ur){const ln=Math.pow(10,Math.ceil(-Math.log(Ur)/Math.LN10));return Math.round(Ur*ln)/ln})(yr),ar*yr})(Ae);wt.style.width=q*(ot/Ae)+"px",wt.innerHTML=`${ot}&nbsp;${it}`}const Gu={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},Ym=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Vv(wt){if(wt){if(typeof wt=="number"){const q=Math.round(Math.abs(wt)/Math.SQRT2);return{center:new u.P(0,0),top:new u.P(0,wt),"top-left":new u.P(q,q),"top-right":new u.P(-q,q),bottom:new u.P(0,-wt),"bottom-left":new u.P(q,-q),"bottom-right":new u.P(-q,-q),left:new u.P(wt,0),right:new u.P(-wt,0)}}if(wt instanceof u.P||Array.isArray(wt)){const q=u.P.convert(wt);return{center:q,top:q,"top-left":q,"top-right":q,bottom:q,"bottom-left":q,"bottom-right":q,left:q,right:q}}return{center:u.P.convert(wt.center||[0,0]),top:u.P.convert(wt.top||[0,0]),"top-left":u.P.convert(wt["top-left"]||[0,0]),"top-right":u.P.convert(wt["top-right"]||[0,0]),bottom:u.P.convert(wt.bottom||[0,0]),"bottom-left":u.P.convert(wt["bottom-left"]||[0,0]),"bottom-right":u.P.convert(wt["bottom-right"]||[0,0]),left:u.P.convert(wt.left||[0,0]),right:u.P.convert(wt.right||[0,0])}}return Vv(new u.P(0,0))}const kv=c;l.AJAXError=u.bh,l.Evented=u.E,l.LngLat=u.N,l.MercatorCoordinate=u.Z,l.Point=u.P,l.addProtocol=u.bi,l.config=u.a,l.removeProtocol=u.bj,l.AttributionControl=Au,l.BoxZoomHandler=cm,l.CanvasSource=Ht,l.CooperativeGesturesHandler=As,l.DoubleClickZoomHandler=yo,l.DragPanHandler=hs,l.DragRotateHandler=Ws,l.EdgeInsets=tv,l.FullscreenControl=class extends u.E{constructor(wt={}){super(),this._onFullscreenChange=()=>{var q;let Ae=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((q=Ae?.shadowRoot)===null||q===void 0)&&q.fullscreenElement;)Ae=Ae.shadowRoot.fullscreenElement;Ae===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,wt&&wt.container&&(wt.container instanceof HTMLElement?this._container=wt.container:u.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(wt){return this._map=wt,this._container||(this._container=this._map.getContainer()),this._controlContainer=h.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){h.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const wt=this._fullscreenButton=h.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);h.create("span","maplibregl-ctrl-icon",wt).setAttribute("aria-hidden","true"),wt.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const wt=this._getTitle();this._fullscreenButton.setAttribute("aria-label",wt),this._fullscreenButton.title=wt}_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 u.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new u.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()}},l.GeoJSONSource=pt,l.GeolocateControl=class extends u.E{constructor(wt){super(),this._onSuccess=q=>{if(this._map){if(this._isOutOfMapMaxBounds(q))return this._setErrorState(),this.fire(new u.k("outofmaxbounds",q)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=q,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(q),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(q),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new u.k("geolocate",q)),this._finish()}},this._updateCamera=q=>{const Ae=new u.N(q.coords.longitude,q.coords.latitude),it=q.coords.accuracy,ot=this._map.getBearing(),bt=u.e({bearing:ot},this.options.fitBoundsOptions),ar=Te.fromLngLat(Ae,it);this._map.fitBounds(ar,bt,{geolocateSource:!0})},this._updateMarker=q=>{if(q){const Ae=new u.N(q.coords.longitude,q.coords.latitude);this._accuracyCircleMarker.setLngLat(Ae).addTo(this._map),this._userLocationDotMarker.setLngLat(Ae).addTo(this._map),this._accuracy=q.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=q=>{if(this._map){if(this.options.trackUserLocation)if(q.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 Ae=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=Ae,this._geolocateButton.setAttribute("aria-label",Ae),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(q.code===3&&$m)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new u.k("error",q)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",q=>q.preventDefault()),this._geolocateButton=h.create("button","maplibregl-ctrl-geolocate",this._container),h.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=q=>{if(this._map){if(q===!1){u.w("Geolocation support is not available so the GeolocateControl will be disabled.");const Ae=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=Ae,this._geolocateButton.setAttribute("aria-label",Ae)}else{const Ae=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=Ae,this._geolocateButton.setAttribute("aria-label",Ae)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=h.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new vv({element:this._dotElement}),this._circleElement=h.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new vv({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",Ae=>{Ae.geolocateSource||this._watchState!=="ACTIVE_LOCK"||Ae.originalEvent&&Ae.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 u.k("trackuserlocationend")),this.fire(new u.k("userlocationlostfocus")))})}},this.options=u.e({},kg,wt)}onAdd(wt){return this._map=wt,this._container=h.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),(function(){return u._(this,arguments,void 0,function*(q=!1){if(Bf!==void 0&&!q)return Bf;if(window.navigator.permissions===void 0)return Bf=!!window.navigator.geolocation,Bf;try{Bf=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{Bf=!!window.navigator.geolocation}return Bf})})().then(q=>this._finishSetupUI(q)),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(),h.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,iv=0,$m=!1}_isOutOfMapMaxBounds(wt){const q=this._map.getMaxBounds(),Ae=wt.coords;return q&&(Ae.longitude<q.getWest()||Ae.longitude>q.getEast()||Ae.latitude<q.getSouth()||Ae.latitude>q.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 wt=this._map.getBounds(),q=wt.getSouthEast(),Ae=wt.getNorthEast(),it=q.distanceTo(Ae),ot=Math.ceil(this._accuracy/(it/this._map._container.clientHeight)*2);this._circleElement.style.width=`${ot}px`,this._circleElement.style.height=`${ot}px`}trigger(){if(!this._setup)return u.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 u.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":iv--,$m=!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 u.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 u.k("trackuserlocationstart")),this.fire(new u.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 wt;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),iv++,iv>1?(wt={maximumAge:6e5,timeout:0},$m=!0):(wt=this.options.positionOptions,$m=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,wt)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},l.Hash=wm,l.ImageSource=$t,l.KeyboardHandler=Fn,l.LngLatBounds=Te,l.LogoControl=cl,l.Map=class extends du{constructor(wt){u.bf.mark(u.bg.create);const q=Object.assign(Object.assign({},vh),wt);if(q.minZoom!=null&&q.maxZoom!=null&&q.minZoom>q.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(q.minPitch!=null&&q.maxPitch!=null&&q.minPitch>q.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(q.minPitch!=null&&q.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(q.maxPitch!=null&&q.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new Ud(q.minZoom,q.maxZoom,q.minPitch,q.maxPitch,q.renderWorldCopies),{bearingSnap:q.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new Os,this._controls=[],this._mapId=u.a4(),this._contextLost=Ae=>{Ae.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new u.k("webglcontextlost",{originalEvent:Ae}))},this._contextRestored=Ae=>{this._setupPainter(),this.resize(),this._update(),this.fire(new u.k("webglcontextrestored",{originalEvent:Ae}))},this._onMapScroll=Ae=>{if(Ae.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=q.interactive,this._maxTileCacheSize=q.maxTileCacheSize,this._maxTileCacheZoomLevels=q.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=q.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=q.preserveDrawingBuffer===!0,this._antialias=q.antialias===!0,this._trackResize=q.trackResize===!0,this._bearingSnap=q.bearingSnap,this._refreshExpiredTiles=q.refreshExpiredTiles===!0,this._fadeDuration=q.fadeDuration,this._crossSourceCollisions=q.crossSourceCollisions===!0,this._collectResourceTiming=q.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},Jc),q.locale),this._clickTolerance=q.clickTolerance,this._overridePixelRatio=q.pixelRatio,this._maxCanvasSize=q.maxCanvasSize,this.transformCameraUpdate=q.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=q.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=g.addThrottleControl(()=>this.isMoving()),this._requestManager=new C(q.transformRequest),typeof q.container=="string"){if(this._container=document.getElementById(q.container),!this._container)throw new Error(`Container '${q.container}' not found.`)}else{if(!(q.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=q.container}if(q.maxBounds&&this.setMaxBounds(q.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 Ae=!1;const it=Yg(ot=>{this._trackResize&&!this._removed&&(this.resize(ot),this.redraw())},50);this._resizeObserver=new ResizeObserver(ot=>{Ae?it(ot):Ae=!0}),this._resizeObserver.observe(this._container)}this.handlers=new Tu(this,q),this._hash=q.hash&&new wm(typeof q.hash=="string"&&q.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:q.center,zoom:q.zoom,bearing:q.bearing,pitch:q.pitch}),q.bounds&&(this.resize(),this.fitBounds(q.bounds,u.e({},q.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=q.localIdeographFontFamily,this._validateStyle=q.validateStyle,q.style&&this.setStyle(q.style,{localIdeographFontFamily:q.localIdeographFontFamily}),q.attributionControl&&this.addControl(new Au(typeof q.attributionControl=="boolean"?void 0:q.attributionControl)),q.maplibreLogo&&this.addControl(new cl,q.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",Ae=>{this._update(Ae.dataType==="style"),this.fire(new u.k(`${Ae.dataType}data`,Ae))}),this.on("dataloading",Ae=>{this.fire(new u.k(`${Ae.dataType}dataloading`,Ae))}),this.on("dataabort",Ae=>{this.fire(new u.k("sourcedataabort",Ae))})}_getMapId(){return this._mapId}addControl(wt,q){if(q===void 0&&(q=wt.getDefaultPosition?wt.getDefaultPosition():"top-right"),!wt||!wt.onAdd)return this.fire(new u.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const Ae=wt.onAdd(this);this._controls.push(wt);const it=this._controlPositions[q];return q.indexOf("bottom")!==-1?it.insertBefore(Ae,it.firstChild):it.appendChild(Ae),this}removeControl(wt){if(!wt||!wt.onRemove)return this.fire(new u.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const q=this._controls.indexOf(wt);return q>-1&&this._controls.splice(q,1),wt.onRemove(this),this}hasControl(wt){return this._controls.indexOf(wt)>-1}calculateCameraOptionsFromTo(wt,q,Ae,it){return it==null&&this.terrain&&(it=this.terrain.getElevationForLngLatZoom(Ae,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(wt,q,Ae,it)}resize(wt){var q;const Ae=this._containerDimensions(),it=Ae[0],ot=Ae[1],bt=this._getClampedPixelRatio(it,ot);if(this._resizeCanvas(it,ot,bt),this.painter.resize(it,ot,bt),this.painter.overLimit()){const yr=this.painter.context.gl;this._maxCanvasSize=[yr.drawingBufferWidth,yr.drawingBufferHeight];const Ur=this._getClampedPixelRatio(it,ot);this._resizeCanvas(it,ot,Ur),this.painter.resize(it,ot,Ur)}this.transform.resize(it,ot),(q=this._requestedCameraState)===null||q===void 0||q.resize(it,ot);const ar=!this._moving;return ar&&(this.stop(),this.fire(new u.k("movestart",wt)).fire(new u.k("move",wt))),this.fire(new u.k("resize",wt)),ar&&this.fire(new u.k("moveend",wt)),this}_getClampedPixelRatio(wt,q){const{0:Ae,1:it}=this._maxCanvasSize,ot=this.getPixelRatio(),bt=wt*ot,ar=q*ot;return Math.min(bt>Ae?Ae/bt:1,ar>it?it/ar:1)*ot}getPixelRatio(){var wt;return(wt=this._overridePixelRatio)!==null&&wt!==void 0?wt:devicePixelRatio}setPixelRatio(wt){this._overridePixelRatio=wt,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(wt){return this.transform.setMaxBounds(Te.convert(wt)),this._update()}setMinZoom(wt){if((wt=wt??-2)>=-2&&wt<=this.transform.maxZoom)return this.transform.minZoom=wt,this._update(),this.getZoom()<wt&&this.setZoom(wt),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(wt){if((wt=wt??22)>=this.transform.minZoom)return this.transform.maxZoom=wt,this._update(),this.getZoom()>wt&&this.setZoom(wt),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(wt){if((wt=wt??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(wt>=0&&wt<=this.transform.maxPitch)return this.transform.minPitch=wt,this._update(),this.getPitch()<wt&&this.setPitch(wt),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(wt){if((wt=wt??60)>85)throw new Error("maxPitch must be less than or equal to 85");if(wt>=this.transform.minPitch)return this.transform.maxPitch=wt,this._update(),this.getPitch()>wt&&this.setPitch(wt),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(wt){return this.transform.renderWorldCopies=wt,this._update()}project(wt){return this.transform.locationPoint(u.N.convert(wt),this.style&&this.terrain)}unproject(wt){return this.transform.pointLocation(u.P.convert(wt),this.terrain)}isMoving(){var wt;return this._moving||((wt=this.handlers)===null||wt===void 0?void 0:wt.isMoving())}isZooming(){var wt;return this._zooming||((wt=this.handlers)===null||wt===void 0?void 0:wt.isZooming())}isRotating(){var wt;return this._rotating||((wt=this.handlers)===null||wt===void 0?void 0:wt.isRotating())}_createDelegatedListener(wt,q,Ae){if(wt==="mouseenter"||wt==="mouseover"){let it=!1;return{layers:q,listener:Ae,delegates:{mousemove:bt=>{const ar=q.filter(Ur=>this.getLayer(Ur)),yr=ar.length!==0?this.queryRenderedFeatures(bt.point,{layers:ar}):[];yr.length?it||(it=!0,Ae.call(this,new Tp(wt,this,bt.originalEvent,{features:yr}))):it=!1},mouseout:()=>{it=!1}}}}if(wt==="mouseleave"||wt==="mouseout"){let it=!1;return{layers:q,listener:Ae,delegates:{mousemove:ar=>{const yr=q.filter(Ur=>this.getLayer(Ur));(yr.length!==0?this.queryRenderedFeatures(ar.point,{layers:yr}):[]).length?it=!0:it&&(it=!1,Ae.call(this,new Tp(wt,this,ar.originalEvent)))},mouseout:ar=>{it&&(it=!1,Ae.call(this,new Tp(wt,this,ar.originalEvent)))}}}}{const it=ot=>{const bt=q.filter(yr=>this.getLayer(yr)),ar=bt.length!==0?this.queryRenderedFeatures(ot.point,{layers:bt}):[];ar.length&&(ot.features=ar,Ae.call(this,ot),delete ot.features)};return{layers:q,listener:Ae,delegates:{[wt]:it}}}}_saveDelegatedListener(wt,q){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[wt]=this._delegatedListeners[wt]||[],this._delegatedListeners[wt].push(q)}_removeDelegatedListener(wt,q,Ae){if(!this._delegatedListeners||!this._delegatedListeners[wt])return;const it=this._delegatedListeners[wt];for(let ot=0;ot<it.length;ot++){const bt=it[ot];if(bt.listener===Ae&&bt.layers.length===q.length&&bt.layers.every(ar=>q.includes(ar))){for(const ar in bt.delegates)this.off(ar,bt.delegates[ar]);return void it.splice(ot,1)}}}on(wt,q,Ae){if(Ae===void 0)return super.on(wt,q);const it=this._createDelegatedListener(wt,typeof q=="string"?[q]:q,Ae);this._saveDelegatedListener(wt,it);for(const ot in it.delegates)this.on(ot,it.delegates[ot]);return this}once(wt,q,Ae){if(Ae===void 0)return super.once(wt,q);const it=typeof q=="string"?[q]:q,ot=this._createDelegatedListener(wt,it,Ae);for(const bt in ot.delegates){const ar=ot.delegates[bt];ot.delegates[bt]=(...yr)=>{this._removeDelegatedListener(wt,it,Ae),ar(...yr)}}this._saveDelegatedListener(wt,ot);for(const bt in ot.delegates)this.once(bt,ot.delegates[bt]);return this}off(wt,q,Ae){return Ae===void 0?super.off(wt,q):(this._removeDelegatedListener(wt,typeof q=="string"?[q]:q,Ae),this)}queryRenderedFeatures(wt,q){if(!this.style)return[];let Ae;const it=wt instanceof u.P||Array.isArray(wt),ot=it?wt:[[0,0],[this.transform.width,this.transform.height]];if(q=q||(it?{}:wt)||{},ot instanceof u.P||typeof ot[0]=="number")Ae=[u.P.convert(ot)];else{const bt=u.P.convert(ot[0]),ar=u.P.convert(ot[1]);Ae=[bt,new u.P(ar.x,bt.y),ar,new u.P(bt.x,ar.y),bt]}return this.style.queryRenderedFeatures(Ae,q,this.transform)}querySourceFeatures(wt,q){return this.style.querySourceFeatures(wt,q)}setStyle(wt,q){return(q=u.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},q)).diff!==!1&&q.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&wt?(this._diffStyle(wt,q),this):(this._localIdeographFontFamily=q.localIdeographFontFamily,this._updateStyle(wt,q))}setTransformRequest(wt){return this._requestManager.setTransformRequest(wt),this}_getUIString(wt){const q=this._locale[wt];if(q==null)throw new Error(`Missing UI string '${wt}'`);return q}_updateStyle(wt,q){if(q.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(wt,q));const Ae=this.style&&q.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!wt)),wt?(this.style=new Ri(this,q||{}),this.style.setEventedParent(this,{style:this.style}),typeof wt=="string"?this.style.loadURL(wt,q,Ae):this.style.loadJSON(wt,q,Ae),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Ri(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(wt,q){if(typeof wt=="string"){const Ae=this._requestManager.transformRequest(wt,"Style");u.h(Ae,new AbortController).then(it=>{this._updateDiff(it.data,q)}).catch(it=>{it&&this.fire(new u.j(it))})}else typeof wt=="object"&&this._updateDiff(wt,q)}_updateDiff(wt,q){try{this.style.setState(wt,q)&&this._update(!0)}catch(Ae){u.w(`Unable to perform style diff: ${Ae.message||Ae.error||Ae}.  Rebuilding the style from scratch.`),this._updateStyle(wt,q)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():u.w("There is no style added to the map.")}addSource(wt,q){return this._lazyInitEmptyStyle(),this.style.addSource(wt,q),this._update(!0)}isSourceLoaded(wt){const q=this.style&&this.style.sourceCaches[wt];if(q!==void 0)return q.loaded();this.fire(new u.j(new Error(`There is no source with ID '${wt}'`)))}setTerrain(wt){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),wt){const q=this.style.sourceCaches[wt.source];if(!q)throw new Error(`cannot load terrain, because there exists no source with ID: ${wt.source}`);this.terrain===null&&q.reload();for(const Ae in this.style._layers){const it=this.style._layers[Ae];it.type==="hillshade"&&it.source===wt.source&&u.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 Sf(this.painter,q,wt),this.painter.renderToTexture=new ld(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=Ae=>{Ae.dataType==="style"?this.terrain.sourceCache.freeRtt():Ae.dataType==="source"&&Ae.tile&&(Ae.sourceId!==wt.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(Ae.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 u.k("terrain",{terrain:wt})),this}getTerrain(){var wt,q;return(q=(wt=this.terrain)===null||wt===void 0?void 0:wt.options)!==null&&q!==void 0?q:null}areTilesLoaded(){const wt=this.style&&this.style.sourceCaches;for(const q in wt){const Ae=wt[q]._tiles;for(const it in Ae){const ot=Ae[it];if(ot.state!=="loaded"&&ot.state!=="errored")return!1}}return!0}removeSource(wt){return this.style.removeSource(wt),this._update(!0)}getSource(wt){return this.style.getSource(wt)}addImage(wt,q,Ae={}){const{pixelRatio:it=1,sdf:ot=!1,stretchX:bt,stretchY:ar,content:yr,textFitWidth:Ur,textFitHeight:ln}=Ae;if(this._lazyInitEmptyStyle(),!(q instanceof HTMLImageElement||u.b(q))){if(q.width===void 0||q.height===void 0)return this.fire(new u.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:Cn,height:Pn,data:vi}=q,Ui=q;return this.style.addImage(wt,{data:new u.R({width:Cn,height:Pn},new Uint8Array(vi)),pixelRatio:it,stretchX:bt,stretchY:ar,content:yr,textFitWidth:Ur,textFitHeight:ln,sdf:ot,version:0,userImage:Ui}),Ui.onAdd&&Ui.onAdd(this,wt),this}}{const{width:Cn,height:Pn,data:vi}=v.getImageData(q);this.style.addImage(wt,{data:new u.R({width:Cn,height:Pn},vi),pixelRatio:it,stretchX:bt,stretchY:ar,content:yr,textFitWidth:Ur,textFitHeight:ln,sdf:ot,version:0})}}updateImage(wt,q){const Ae=this.style.getImage(wt);if(!Ae)return this.fire(new u.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const it=q instanceof HTMLImageElement||u.b(q)?v.getImageData(q):q,{width:ot,height:bt,data:ar}=it;if(ot===void 0||bt===void 0)return this.fire(new u.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(ot!==Ae.data.width||bt!==Ae.data.height)return this.fire(new u.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));const yr=!(q instanceof HTMLImageElement||u.b(q));return Ae.data.replace(ar,yr),this.style.updateImage(wt,Ae),this}getImage(wt){return this.style.getImage(wt)}hasImage(wt){return wt?!!this.style.getImage(wt):(this.fire(new u.j(new Error("Missing required image id"))),!1)}removeImage(wt){this.style.removeImage(wt)}loadImage(wt){return g.getImage(this._requestManager.transformRequest(wt,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(wt,q){return this._lazyInitEmptyStyle(),this.style.addLayer(wt,q),this._update(!0)}moveLayer(wt,q){return this.style.moveLayer(wt,q),this._update(!0)}removeLayer(wt){return this.style.removeLayer(wt),this._update(!0)}getLayer(wt){return this.style.getLayer(wt)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(wt,q,Ae){return this.style.setLayerZoomRange(wt,q,Ae),this._update(!0)}setFilter(wt,q,Ae={}){return this.style.setFilter(wt,q,Ae),this._update(!0)}getFilter(wt){return this.style.getFilter(wt)}setPaintProperty(wt,q,Ae,it={}){return this.style.setPaintProperty(wt,q,Ae,it),this._update(!0)}getPaintProperty(wt,q){return this.style.getPaintProperty(wt,q)}setLayoutProperty(wt,q,Ae,it={}){return this.style.setLayoutProperty(wt,q,Ae,it),this._update(!0)}getLayoutProperty(wt,q){return this.style.getLayoutProperty(wt,q)}setGlyphs(wt,q={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(wt,q),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(wt,q,Ae={}){return this._lazyInitEmptyStyle(),this.style.addSprite(wt,q,Ae,it=>{it||this._update(!0)}),this}removeSprite(wt){return this._lazyInitEmptyStyle(),this.style.removeSprite(wt),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(wt,q={}){return this._lazyInitEmptyStyle(),this.style.setSprite(wt,q,Ae=>{Ae||this._update(!0)}),this}setLight(wt,q={}){return this._lazyInitEmptyStyle(),this.style.setLight(wt,q),this._update(!0)}getLight(){return this.style.getLight()}setSky(wt){return this._lazyInitEmptyStyle(),this.style.setSky(wt),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(wt,q){return this.style.setFeatureState(wt,q),this._update()}removeFeatureState(wt,q){return this.style.removeFeatureState(wt,q),this._update()}getFeatureState(wt){return this.style.getFeatureState(wt)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let wt=0,q=0;return this._container&&(wt=this._container.clientWidth||400,q=this._container.clientHeight||300),[wt,q]}_setupContainer(){const wt=this._container;wt.classList.add("maplibregl-map");const q=this._canvasContainer=h.create("div","maplibregl-canvas-container",wt);this._interactive&&q.classList.add("maplibregl-interactive"),this._canvas=h.create("canvas","maplibregl-canvas",q),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 Ae=this._containerDimensions(),it=this._getClampedPixelRatio(Ae[0],Ae[1]);this._resizeCanvas(Ae[0],Ae[1],it);const ot=this._controlContainer=h.create("div","maplibregl-control-container",wt),bt=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(ar=>{bt[ar]=h.create("div",`maplibregl-ctrl-${ar} `,ot)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(wt,q,Ae){this._canvas.width=Math.floor(Ae*wt),this._canvas.height=Math.floor(Ae*q),this._canvas.style.width=`${wt}px`,this._canvas.style.height=`${q}px`}_setupPainter(){const wt={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let q=null;this._canvas.addEventListener("webglcontextcreationerror",it=>{q={requestedAttributes:wt},it&&(q.statusMessage=it.statusMessage,q.type=it.type)},{once:!0});const Ae=this._canvas.getContext("webgl2",wt)||this._canvas.getContext("webgl",wt);if(!Ae){const it="Failed to initialize WebGL";throw q?(q.message=it,new Error(JSON.stringify(q))):new Error(it)}this.painter=new ug(Ae,this.transform),m.testSupport(Ae)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(wt){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||wt,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(wt){return this._update(),this._renderTaskQueue.add(wt)}_cancelRenderFrame(wt){this._renderTaskQueue.remove(wt)}_render(wt){const q=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(wt),this._removed)return;let Ae=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const ot=this.transform.zoom,bt=v.now();this.style.zoomHistory.update(ot,bt);const ar=new u.z(ot,{now:bt,fadeDuration:q,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),yr=ar.crossFadingFactor();yr===1&&yr===this._crossFadingFactor||(Ae=!0,this._crossFadingFactor=yr),this.style.update(ar)}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,q,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:q,showPadding:this.showPadding}),this.fire(new u.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,u.bf.mark(u.bg.load),this.fire(new u.k("load"))),this.style&&(this.style.hasTransitions()||Ae)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const it=this._sourcesDirty||this._styleDirty||this._placementDirty;return it||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new u.k("idle")),!this._loaded||this._fullyLoaded||it||(this._fullyLoaded=!0,u.bf.mark(u.bg.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var wt;this._hash&&this._hash.remove();for(const Ae of this._controls)Ae.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),g.removeThrottleControl(this._imageQueueHandle),(wt=this._resizeObserver)===null||wt===void 0||wt.disconnect();const q=this.painter.context.gl.getExtension("WEBGL_lose_context");q?.loseContext&&q.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),h.remove(this._canvasContainer),h.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),u.bf.clearMetrics(),this._removed=!0,this.fire(new u.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,v.frameAsync(this._frameRequest).then(wt=>{u.bf.frame(wt),this._frameRequest=null,this._render(wt)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(wt){this._showTileBoundaries!==wt&&(this._showTileBoundaries=wt,this._update())}get showPadding(){return!!this._showPadding}set showPadding(wt){this._showPadding!==wt&&(this._showPadding=wt,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(wt){this._showCollisionBoxes!==wt&&(this._showCollisionBoxes=wt,wt?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(wt){this._showOverdrawInspector!==wt&&(this._showOverdrawInspector=wt,this._update())}get repaint(){return!!this._repaint}set repaint(wt){this._repaint!==wt&&(this._repaint=wt,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(wt){this._vertices=wt,this._update()}get version(){return wh}getCameraTargetElevation(){return this.transform.elevation}},l.MapMouseEvent=Tp,l.MapTouchEvent=Zg,l.MapWheelEvent=Iy,l.Marker=vv,l.NavigationControl=class{constructor(wt){this._updateZoomButtons=()=>{const q=this._map.getZoom(),Ae=q===this._map.getMaxZoom(),it=q===this._map.getMinZoom();this._zoomInButton.disabled=Ae,this._zoomOutButton.disabled=it,this._zoomInButton.setAttribute("aria-disabled",Ae.toString()),this._zoomOutButton.setAttribute("aria-disabled",it.toString())},this._rotateCompassArrow=()=>{const q=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=q},this._setButtonTitle=(q,Ae)=>{const it=this._map._getUIString(`NavigationControl.${Ae}`);q.title=it,q.setAttribute("aria-label",it)},this.options=u.e({},Wl,wt),this._container=h.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",q=>q.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",q=>this._map.zoomIn({},{originalEvent:q})),h.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",q=>this._map.zoomOut({},{originalEvent:q})),h.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",q=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:q}):this._map.resetNorth({},{originalEvent:q})}),this._compassIcon=h.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(wt){return this._map=wt,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 lc(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){h.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(wt,q){const Ae=h.create("button",wt,this._container);return Ae.type="button",Ae.addEventListener("click",q),Ae}},l.Popup=class extends u.E{constructor(wt){super(),this.remove=()=>(this._content&&h.remove(this._content),this._container&&(h.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 u.k("close"))),this),this._onMouseUp=q=>{this._update(q.point)},this._onMouseMove=q=>{this._update(q.point)},this._onDrag=q=>{this._update(q.point)},this._update=q=>{var Ae;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=h.create("div","maplibregl-popup",this._map.getContainer()),this._tip=h.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const yr of this.options.className.split(" "))this._container.classList.add(yr);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?gf(this._lngLat,this._flatPos,this._map.transform):(Ae=this._lngLat)===null||Ae===void 0?void 0:Ae.wrap(),this._trackPointer&&!q)return;const it=this._flatPos=this._pos=this._trackPointer&&q?q:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&q?q:this._map.transform.locationPoint(this._lngLat));let ot=this.options.anchor;const bt=Vv(this.options.offset);if(!ot){const yr=this._container.offsetWidth,Ur=this._container.offsetHeight;let ln;ln=it.y+bt.bottom.y<Ur?["top"]:it.y>this._map.transform.height-Ur?["bottom"]:[],it.x<yr/2?ln.push("left"):it.x>this._map.transform.width-yr/2&&ln.push("right"),ot=ln.length===0?"bottom":ln.join("-")}let ar=it.add(bt[ot]);this.options.subpixelPositioning||(ar=ar.round()),h.setTransform(this._container,`${rv[ot]} translate(${ar.x}px,${ar.y}px)`),nv(this._container,ot,"popup")},this._onClose=()=>{this.remove()},this.options=u.e(Object.create(Gu),wt)}addTo(wt){return this._map&&this.remove(),this._map=wt,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 u.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(wt){return this._lngLat=u.N.convert(wt),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(wt){return this.setDOMContent(document.createTextNode(wt))}setHTML(wt){const q=document.createDocumentFragment(),Ae=document.createElement("body");let it;for(Ae.innerHTML=wt;it=Ae.firstChild,it;)q.appendChild(it);return this.setDOMContent(q)}getMaxWidth(){var wt;return(wt=this._container)===null||wt===void 0?void 0:wt.style.maxWidth}setMaxWidth(wt){return this.options.maxWidth=wt,this._update(),this}setDOMContent(wt){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=h.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(wt),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(wt){return this._container&&this._container.classList.add(wt),this}removeClassName(wt){return this._container&&this._container.classList.remove(wt),this}setOffset(wt){return this.options.offset=wt,this._update(),this}toggleClassName(wt){if(this._container)return this._container.classList.toggle(wt)}setSubpixelPositioning(wt){this.options.subpixelPositioning=wt}_createCloseButton(){this.options.closeButton&&(this._closeButton=h.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 wt=this._container.querySelector(Ym);wt&&wt.focus()}},l.RasterDEMTileSource=gt,l.RasterTileSource=at,l.ScaleControl=class{constructor(wt){this._onMove=()=>{Wm(this._map,this._container,this.options)},this.setUnit=q=>{this.options.unit=q,Wm(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},Sh),wt)}getDefaultPosition(){return"bottom-left"}onAdd(wt){return this._map=wt,this._container=h.create("div","maplibregl-ctrl maplibregl-ctrl-scale",wt.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){h.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},l.ScrollZoomHandler=ma,l.Style=Ri,l.TerrainControl=class{constructor(wt){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=wt}onAdd(wt){return this._map=wt,this._container=h.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=h.create("button","maplibregl-ctrl-terrain",this._container),h.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(){h.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},l.TwoFingersTouchPitchHandler=iy,l.TwoFingersTouchRotateHandler=dg,l.TwoFingersTouchZoomHandler=pv,l.TwoFingersTouchZoomRotateHandler=Bo,l.VectorTileSource=tt,l.VideoSource=Wt,l.addSourceType=(wt,q)=>u._(void 0,void 0,void 0,function*(){if(st(wt))throw new Error(`A source type called "${wt}" already exists.`);((Ae,it)=>{Ft[Ae]=it})(wt,q)}),l.clearPrewarmedResources=function(){const wt=Le;wt&&(wt.isPreloaded()&&wt.numActive()===1?(wt.release(we),Le=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},l.getMaxParallelImageRequests=function(){return u.a.MAX_PARALLEL_IMAGE_REQUESTS},l.getRTLTextPluginStatus=function(){return Gt().getRTLTextPluginStatus()},l.getVersion=function(){return kv},l.getWorkerCount=function(){return Oe.workerCount},l.getWorkerUrl=function(){return u.a.WORKER_URL},l.importScriptInWorkers=function(wt){return he().broadcast("IS",wt)},l.prewarm=function(){be().acquire(we)},l.setMaxParallelImageRequests=function(wt){u.a.MAX_PARALLEL_IMAGE_REQUESTS=wt},l.setRTLTextPlugin=function(wt,q){return Gt().setRTLTextPlugin(wt,q)},l.setWorkerCount=function(wt){Oe.workerCount=wt},l.setWorkerUrl=function(wt){u.a.WORKER_URL=wt}});var z=w;return z})}}),_tt=U({"src/plots/map/layers.js"(pe,le){var w=ii(),R=ah().sanitizeHTML,O=Oxe(),z=Y4();function l(v,h){this.subplot=v,this.uid=v.uid+"-"+h,this.index=h,this.idSource="source-"+this.uid,this.idLayer=z.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var u=l.prototype;u.update=function(h){this.visible?this.needsNewImage(h)?this.updateImage(h):this.needsNewSource(h)?(this.removeLayer(),this.updateSource(h),this.updateLayer(h)):this.needsNewLayer(h)?this.updateLayer(h):this.updateStyle(h):(this.updateSource(h),this.updateLayer(h)),this.visible=c(h)},u.needsNewImage=function(v){var h=this.subplot.map;return h.getSource(this.idSource)&&this.sourceType==="image"&&v.sourcetype==="image"&&(this.source!==v.source||JSON.stringify(this.coordinates)!==JSON.stringify(v.coordinates))},u.needsNewSource=function(v){return this.sourceType!==v.sourcetype||JSON.stringify(this.source)!==JSON.stringify(v.source)||this.layerType!==v.type},u.needsNewLayer=function(v){return this.layerType!==v.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},u.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},u.updateImage=function(v){var h=this.subplot.map;h.getSource(this.idSource).updateImage({url:v.source,coordinates:v.coordinates});var m=this.findFollowingMapLayerId(this.lookupBelow());m!==null&&this.subplot.map.moveLayer(this.idLayer,m)},u.updateSource=function(v){var h=this.subplot.map;if(h.getSource(this.idSource)&&h.removeSource(this.idSource),this.sourceType=v.sourcetype,this.source=v.source,!!c(v)){var m=f(v);h.addSource(this.idSource,m)}},u.findFollowingMapLayerId=function(v){if(v==="traces")for(var h=this.subplot.getMapLayers(),m=0;m<h.length;m++){var _=h[m].id;if(typeof _=="string"&&_.indexOf(z.traceLayerPrefix)===0){v=_;break}}return v},u.updateLayer=function(v){var h=this.subplot,m=p(v),_=this.lookupBelow(),x=this.findFollowingMapLayerId(_);this.removeLayer(),c(v)&&h.addLayer({id:this.idLayer,source:this.idSource,"source-layer":v.sourcelayer||"",type:v.type,minzoom:v.minzoom,maxzoom:v.maxzoom,layout:m.layout,paint:m.paint},x),this.layerType=v.type,this.below=_},u.updateStyle=function(v){if(c(v)){var h=p(v);this.subplot.setOptions(this.idLayer,"setLayoutProperty",h.layout),this.subplot.setOptions(this.idLayer,"setPaintProperty",h.paint)}},u.removeLayer=function(){var v=this.subplot.map;v.getLayer(this.idLayer)&&v.removeLayer(this.idLayer)},u.dispose=function(){var v=this.subplot.map;v.getLayer(this.idLayer)&&v.removeLayer(this.idLayer),v.getSource(this.idSource)&&v.removeSource(this.idSource)};function c(v){if(!v.visible)return!1;var h=v.source;if(Array.isArray(h)&&h.length>0){for(var m=0;m<h.length;m++)if(typeof h[m]!="string"||h[m].length===0)return!1;return!0}return w.isPlainObject(h)||typeof h=="string"&&h.length>0}function p(v){var h={},m={};switch(v.type){case"circle":w.extendFlat(m,{"circle-radius":v.circle.radius,"circle-color":v.color,"circle-opacity":v.opacity});break;case"line":w.extendFlat(m,{"line-width":v.line.width,"line-color":v.color,"line-opacity":v.opacity,"line-dasharray":v.line.dash});break;case"fill":w.extendFlat(m,{"fill-color":v.color,"fill-outline-color":v.fill.outlinecolor,"fill-opacity":v.opacity});break;case"symbol":var _=v.symbol,x=O(_.textposition,_.iconsize);w.extendFlat(h,{"icon-image":_.icon+"-15","icon-size":_.iconsize/10,"text-field":_.text,"text-size":_.textfont.size,"text-anchor":x.anchor,"text-offset":x.offset,"symbol-placement":_.placement}),w.extendFlat(m,{"icon-color":v.color,"text-color":_.textfont.color,"text-opacity":v.opacity});break;case"raster":w.extendFlat(m,{"raster-fade-duration":0,"raster-opacity":v.opacity});break}return{layout:h,paint:m}}function f(v){var h=v.sourcetype,m=v.source,_={type:h},x;return h==="geojson"?x="data":h==="vector"?x=typeof m=="string"?"url":"tiles":h==="raster"?(x="tiles",_.tileSize=256):h==="image"&&(x="url",_.coordinates=v.coordinates),_[x]=m,v.sourceattribution&&(_.attribution=R(v.sourceattribution)),_}le.exports=function(h,m,_){var x=new l(h,m);return x.update(_),x}}}),wtt=U({"src/plots/map/map.js"(pe,le){var w=xtt(),R=ii(),O=q4(),z=Mi(),l=Yu(),u=Vp(),c=Dp(),p=m0(),f=p.drawMode,v=p.selectMode,h=Vf().prepSelect,m=Vf().clearOutline,_=Vf().clearSelectionsCache,x=Vf().selectOnClick,A=Y4(),E=_tt();function D(k,P){this.id=P,this.gd=k;var T=k._fullLayout,y=k._context;this.container=T._glcontainer.node(),this.isStatic=y.staticPlot,this.uid=T._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(T),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var g=D.prototype;g.plot=function(k,P,T){var y=this,S;y.map?S=new Promise(function(M,W){y.updateMap(k,P,M,W)}):S=new Promise(function(M,W){y.createMap(k,P,M,W)}),T.push(S)},g.createMap=function(k,P,T,y){var S=this,M=P[S.id],W=S.styleObj=I(M.style),$=M.bounds,Z=$?[[$.west,$.south],[$.east,$.north]]:null,K=S.map=new w.Map({container:S.div,style:W.style,center:F(M.center),zoom:M.zoom,bearing:M.bearing,pitch:M.pitch,maxBounds:Z,interactive:!S.isStatic,preserveDrawingBuffer:S.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new w.AttributionControl({compact:!0})),Q={};K.on("styleimagemissing",function(G){var ee=G.id;if(!Q[ee]&&ee.includes("-15")){Q[ee]=!0;var re=new Image(15,15);re.onload=function(){K.addImage(ee,re)},re.crossOrigin="Anonymous",re.src="https://unpkg.com/maki@2.1.0/icons/"+ee+".svg"}}),K.setTransformRequest(function(G){return G=G.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),G=G.replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),G=G.replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular"),{url:G}}),K._canvas.style.left="0px",K._canvas.style.top="0px",S.rejectOnError(y),S.isStatic||S.initFx(k,P);var J=[];J.push(new Promise(function(G){K.once("load",G)})),J=J.concat(O.fetchTraceGeoData(k)),Promise.all(J).then(function(){S.fillBelowLookup(k,P),S.updateData(k),S.updateLayout(P),S.resolveOnRender(T)}).catch(y)},g.updateMap=function(k,P,T,y){var S=this,M=S.map,W=P[this.id];S.rejectOnError(y);var $=[],Z=I(W.style);JSON.stringify(S.styleObj)!==JSON.stringify(Z)&&(S.styleObj=Z,M.setStyle(Z.style),S.traceHash={},$.push(new Promise(function(K){M.once("styledata",K)}))),$=$.concat(O.fetchTraceGeoData(k)),Promise.all($).then(function(){S.fillBelowLookup(k,P),S.updateData(k),S.updateLayout(P),S.resolveOnRender(T)}).catch(y)},g.fillBelowLookup=function(k,P){var T=P[this.id],y=T.layers,S,M,W=this.belowLookup={},$=!1;for(S=0;S<k.length;S++){var Z=k[S][0].trace,K=Z._module;typeof Z.below=="string"?M=Z.below:K.getBelow&&(M=K.getBelow(Z,this)),M===""&&($=!0),W["trace-"+Z.uid]=M||""}for(S=0;S<y.length;S++){var Q=y[S];typeof Q.below=="string"?M=Q.below:$?M="traces":M="",W["layout-"+S]=M}var J={},G,ee;for(G in W)M=W[G],J[M]?J[M].push(G):J[M]=[G];for(M in J){var re=J[M];if(re.length>1)for(S=0;S<re.length;S++)G=re[S],G.indexOf("trace-")===0?(ee=G.split("trace-")[1],this.traceHash[ee]&&(this.traceHash[ee].below=null)):G.indexOf("layout-")===0&&(ee=G.split("layout-")[1],this.layerList[ee]&&(this.layerList[ee].below=null))}};var C={choroplethmap:0,densitymap:1,scattermap:2};g.updateData=function(k){var P=this.traceHash,T,y,S,M,W=k.slice().sort(function(J,G){return C[J[0].trace.type]-C[G[0].trace.type]});for(S=0;S<W.length;S++){var $=W[S];y=$[0].trace,T=P[y.uid];var Z=!1;T&&(T.type===y.type?(T.update($),Z=!0):T.dispose()),!Z&&y._module&&(P[y.uid]=y._module.plot(this,$))}var K=Object.keys(P);e:for(S=0;S<K.length;S++){var Q=K[S];for(M=0;M<k.length;M++)if(y=k[M][0].trace,Q===y.uid)continue e;T=P[Q],T.dispose(),delete P[Q]}},g.updateLayout=function(k){var P=this.map,T=k[this.id];!this.dragging&&!this.wheeling&&(P.setCenter(F(T.center)),P.setZoom(T.zoom),P.setBearing(T.bearing),P.setPitch(T.pitch)),this.updateLayers(k),this.updateFramework(k),this.updateFx(k),this.map.resize(),this.gd._context._scrollZoom.map?P.scrollZoom.enable():P.scrollZoom.disable()},g.resolveOnRender=function(k){var P=this.map;P.on("render",function T(){P.loaded()&&(P.off("render",T),setTimeout(k,10))})},g.rejectOnError=function(k){var P=this.map;function T(){k(new Error(A.mapOnErrorMsg))}P.once("error",T),P.once("style.error",T),P.once("source.error",T),P.once("tile.error",T),P.once("layer.error",T)},g.createFramework=function(k){var P=this,T=P.div=document.createElement("div");T.id=P.uid,T.style.position="absolute",P.container.appendChild(T),P.xaxis={_id:"x",c2p:function(y){return P.project(y).x}},P.yaxis={_id:"y",c2p:function(y){return P.project(y).y}},P.updateFramework(k),P.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},l.setConvert(P.mockAxis,k)},g.initFx=function(k,P){var T=this,y=T.gd,S=T.map;S.on("moveend",function($){if(T.map){var Z=y._fullLayout;if($.originalEvent||T.wheeling){var K=Z[T.id];z.call("_storeDirectGUIEdit",y.layout,Z._preGUI,T.getViewEdits(K));var Q=T.getView();K._input.center=K.center=Q.center,K._input.zoom=K.zoom=Q.zoom,K._input.bearing=K.bearing=Q.bearing,K._input.pitch=K.pitch=Q.pitch,y.emit("plotly_relayout",T.getViewEditsWithDerived(Q))}$.originalEvent&&$.originalEvent.type==="mouseup"?T.dragging=!1:T.wheeling&&(T.wheeling=!1),Z&&Z._rehover&&Z._rehover()}}),S.on("wheel",function(){T.wheeling=!0}),S.on("mousemove",function($){var Z=T.div.getBoundingClientRect(),K=[$.originalEvent.offsetX,$.originalEvent.offsetY];$.target.getBoundingClientRect=function(){return Z},T.xaxis.p2c=function(){return S.unproject(K).lng},T.yaxis.p2c=function(){return S.unproject(K).lat},y._fullLayout._rehover=function(){y._fullLayout._hoversubplot===T.id&&y._fullLayout[T.id]&&c.hover(y,$,T.id)},c.hover(y,$,T.id),y._fullLayout._hoversubplot=T.id});function M(){c.loneUnhover(P._hoverlayer)}S.on("dragstart",function(){T.dragging=!0,M()}),S.on("zoomstart",M),S.on("mouseout",function(){y._fullLayout._hoversubplot=null});function W(){var $=T.getView();y.emit("plotly_relayouting",T.getViewEditsWithDerived($))}S.on("drag",W),S.on("zoom",W),S.on("dblclick",function(){var $=y._fullLayout[T.id];z.call("_storeDirectGUIEdit",y.layout,y._fullLayout._preGUI,T.getViewEdits($));var Z=T.viewInitial;S.setCenter(F(Z.center)),S.setZoom(Z.zoom),S.setBearing(Z.bearing),S.setPitch(Z.pitch);var K=T.getView();$._input.center=$.center=K.center,$._input.zoom=$.zoom=K.zoom,$._input.bearing=$.bearing=K.bearing,$._input.pitch=$.pitch=K.pitch,y.emit("plotly_doubleclick",null),y.emit("plotly_relayout",T.getViewEditsWithDerived(K))}),T.clearOutline=function(){_(T.dragOptions),m(T.dragOptions.gd)},T.onClickInPanFn=function($){return function(Z){var K=y._fullLayout.clickmode;K.indexOf("select")>-1&&x(Z.originalEvent,y,[T.xaxis],[T.yaxis],T.id,$),K.indexOf("event")>-1&&c.click(y,Z.originalEvent)}}},g.updateFx=function(k){var P=this,T=P.map,y=P.gd;if(P.isStatic)return;function S(Z){var K=P.map.unproject(Z);return[K.lng,K.lat]}var M=k.dragmode,W;W=function(Z,K){if(K.isRect){var Q=Z.range={};Q[P.id]=[S([K.xmin,K.ymin]),S([K.xmax,K.ymax])]}else{var J=Z.lassoPoints={};J[P.id]=K.map(S)}};var $=P.dragOptions;P.dragOptions=R.extendDeep($||{},{dragmode:k.dragmode,element:P.div,gd:y,plotinfo:{id:P.id,domain:k[P.id].domain,xaxis:P.xaxis,yaxis:P.yaxis,fillRangeItems:W},xaxes:[P.xaxis],yaxes:[P.yaxis],subplot:P.id}),T.off("click",P.onClickInPanHandler),v(M)||f(M)?(T.dragPan.disable(),T.on("zoomstart",P.clearOutline),P.dragOptions.prepFn=function(Z,K,Q){h(Z,K,Q,P.dragOptions,M)},u.init(P.dragOptions)):(T.dragPan.enable(),T.off("zoomstart",P.clearOutline),P.div.onmousedown=null,P.div.ontouchstart=null,P.div.removeEventListener("touchstart",P.div._ontouchstart),P.onClickInPanHandler=P.onClickInPanFn(P.dragOptions),T.on("click",P.onClickInPanHandler))},g.updateFramework=function(k){var P=k[this.id].domain,T=k._size,y=this.div.style;y.width=T.w*(P.x[1]-P.x[0])+"px",y.height=T.h*(P.y[1]-P.y[0])+"px",y.left=T.l+P.x[0]*T.w+"px",y.top=T.t+(1-P.y[1])*T.h+"px",this.xaxis._offset=T.l+P.x[0]*T.w,this.xaxis._length=T.w*(P.x[1]-P.x[0]),this.yaxis._offset=T.t+(1-P.y[1])*T.h,this.yaxis._length=T.h*(P.y[1]-P.y[0])},g.updateLayers=function(k){var P=k[this.id],T=P.layers,y=this.layerList,S;if(T.length!==y.length){for(S=0;S<y.length;S++)y[S].dispose();for(y=this.layerList=[],S=0;S<T.length;S++)y.push(E(this,S,T[S]))}else for(S=0;S<T.length;S++)y[S].update(T[S])},g.destroy=function(){this.map&&(this.map.remove(),this.map=null,this.container.removeChild(this.div))},g.toImage=function(){return this.map.stop(),this.map.getCanvas().toDataURL()},g.setOptions=function(k,P,T){for(var y in T)this.map[P](k,y,T[y])},g.getMapLayers=function(){return this.map.getStyle().layers},g.addLayer=function(k,P){var T=this.map;if(typeof P=="string"){if(P===""){T.addLayer(k,P);return}for(var y=this.getMapLayers(),S=0;S<y.length;S++)if(P===y[S].id){T.addLayer(k,P);return}R.warn(["Trying to add layer with *below* value",P,"referencing a layer that does not exist","or that does not yet exist."].join(" "))}T.addLayer(k)},g.project=function(k){return this.map.project(new w.LngLat(k[0],k[1]))},g.getView=function(){var k=this.map,P=k.getCenter(),T=P.lng,y=P.lat,S={lon:T,lat:y},M=k.getCanvas(),W=parseInt(M.style.width),$=parseInt(M.style.height);return{center:S,zoom:k.getZoom(),bearing:k.getBearing(),pitch:k.getPitch(),_derived:{coordinates:[k.unproject([0,0]).toArray(),k.unproject([W,0]).toArray(),k.unproject([W,$]).toArray(),k.unproject([0,$]).toArray()]}}},g.getViewEdits=function(k){for(var P=this.id,T=["center","zoom","bearing","pitch"],y={},S=0;S<T.length;S++){var M=T[S];y[P+"."+M]=k[M]}return y},g.getViewEditsWithDerived=function(k){var P=this.id,T=this.getViewEdits(k);return T[P+"._derived"]=k._derived,T};function I(k){var P={};return R.isPlainObject(k)?(P.id=k.id,P.style=k):typeof k=="string"?(P.id=k,A.stylesMap[k]?P.style=A.stylesMap[k]:P.style=k):(P.id=A.styleValueDflt,P.style=N(A.styleValueDflt)),P.transition={duration:0,delay:0},P}function N(k){return A.styleUrlPrefix+k+"-"+A.styleUrlSuffix}function F(k){return[k.lon,k.lat]}le.exports=D}}),Stt=U({"src/plots/map/layout_defaults.js"(pe,le){var w=ii(),R=cS(),O=_g(),z=XU();le.exports=function(p,f,v){R(p,f,v,{type:"map",attributes:z,handleDefaults:l,partition:"y"})};function l(c,p,f){f("style"),f("center.lon"),f("center.lat"),f("zoom"),f("bearing"),f("pitch");var v=f("bounds.west"),h=f("bounds.east"),m=f("bounds.south"),_=f("bounds.north");(v===void 0||h===void 0||m===void 0||_===void 0)&&delete p.bounds,O(c,p,{name:"layers",handleItemDefaults:u}),p._input=c}function u(c,p){function f(A,E){return w.coerce(c,p,z.layers,A,E)}var v=f("visible");if(v){var h=f("sourcetype"),m=h==="raster"||h==="image";f("source"),f("sourceattribution"),h==="vector"&&f("sourcelayer"),h==="image"&&f("coordinates");var _;m&&(_="raster");var x=f("type",_);m&&x!=="raster"&&(x=p.type="raster",w.log("Source types *raster* and *image* must drawn *raster* layer type.")),f("below"),f("color"),f("opacity"),f("minzoom"),f("maxzoom"),x==="circle"&&f("circle.radius"),x==="line"&&(f("line.width"),f("line.dash")),x==="fill"&&f("fill.outlinecolor"),x==="symbol"&&(f("symbol.icon"),f("symbol.iconsize"),f("symbol.text"),w.coerceFont(f,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),f("symbol.textposition"),f("symbol.placement"))}}}}),EK=U({"src/plots/map/index.js"(pe){var le=ii(),w=le.strTranslate,R=le.strScale,O=Om().getSubplotCalcData,z=E1(),l=Ze(),u=ec(),c=ah(),p=wtt(),f="map";pe.name=f,pe.attr="subplot",pe.idRoot=f,pe.idRegex=pe.attrRegex=le.counterRegex(f),pe.attributes={subplot:{valType:"subplotid",dflt:"map",editType:"calc"}},pe.layoutAttributes=XU(),pe.supplyLayoutDefaults=Stt(),pe.plot=function(h){for(var m=h._fullLayout,_=h.calcdata,x=m._subplots[f],A=0;A<x.length;A++){var E=x[A],D=O(_,f,E),g=m[E],C=g._subplot;C||(C=new p(h,E),m[E]._subplot=C),C.viewInitial||(C.viewInitial={center:le.extendFlat({},g.center),zoom:g.zoom,bearing:g.bearing,pitch:g.pitch}),C.plot(D,m,h._promises)}},pe.clean=function(v,h,m,_){for(var x=_._subplots[f]||[],A=0;A<x.length;A++){var E=x[A];!h[E]&&_[E]._subplot&&_[E]._subplot.destroy()}},pe.toSVG=function(v){for(var h=v._fullLayout,m=h._subplots[f],_=h._size,x=0;x<m.length;x++){var A=h[m[x]],E=A.domain,D=A._subplot,g=D.toImage("png"),C=h._glimages.append("svg:image");C.attr({xmlns:z.svg,"xlink:href":g,x:_.l+_.w*E.x[0],y:_.t+_.h*(1-E.y[1]),width:_.w*(E.x[1]-E.x[0]),height:_.h*(E.y[1]-E.y[0]),preserveAspectRatio:"none"});var I=l.select(A._subplot.div),N=I.select(".maplibregl-ctrl-attrib").text().replace("Improve this map",""),F=h._glimages.append("g"),k=F.append("text");k.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 P=u.bBox(k.node()),T=_.w*(E.x[1]-E.x[0]);if(P.width>T/2){var y=N.split("|").join("<br>");k.text(y).attr("data-unformatted",y).call(c.convertToTspans,v),P=u.bBox(k.node())}k.attr("transform",w(-3,-P.height+8)),F.insert("rect",".static-attribution").attr({x:-P.width-6,y:-P.height-3,width:P.width+6,height:P.height+3,fill:"rgba(255, 255, 255, 0.75)"});var S=1;P.width+6>T&&(S=T/(P.width+6));var M=[_.l+_.w*E.x[1],_.t+_.h*(1-E.y[0])];F.attr("transform",w(M[0],M[1])+R(S))}},pe.updateFx=function(v){for(var h=v._fullLayout,m=h._subplots[f],_=0;_<m.length;_++){var x=h[m[_]]._subplot;x.updateFx(h)}}}}),Ttt=U({"src/traces/scattermap/index.js"(pe,le){le.exports={attributes:SK(),supplyDefaults:vtt(),colorbar:qg(),formatLabels:Lxe(),calc:eK(),plot:gtt(),hoverPoints:TK().hoverPoints,eventData:ytt(),selectPoints:btt(),styleOnSelect:function(w,R){if(R){var O=R[0].trace;O._glTrace.update(R)}},moduleType:"trace",name:"scattermap",basePlotModule:EK(),categories:["map","gl","symbols","showLegend","scatter-like"],meta:{}}}}),Ett=U({"lib/scattermap.js"(pe,le){le.exports=Ttt()}}),Nxe=U({"src/traces/choroplethmap/attributes.js"(pe,le){var w=zF(),R=Jd(),O=Js().hovertemplateAttrs,z=Jn(),l=Ar().extendFlat;le.exports=l({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:l({},w.featureidkey,{}),below:{valType:"string",editType:"plot"},text:w.text,hovertext:w.hovertext,marker:{line:{color:l({},w.marker.line.color,{editType:"plot"}),width:l({},w.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:l({},w.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:l({},w.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:l({},w.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:w.hoverinfo,hovertemplate:O({},{keys:["properties"]}),showlegend:l({},z.showlegend,{dflt:!1})},R("",{cLetter:"z",editTypeOverride:"calc"}))}}),Att=U({"src/traces/choroplethmap/defaults.js"(pe,le){var w=ii(),R=wg(),O=Nxe();le.exports=function(l,u,c,p){function f(x,A){return w.coerce(l,u,O,x,A)}var v=f("locations"),h=f("z"),m=f("geojson");if(!w.isArrayOrTypedArray(v)||!v.length||!w.isArrayOrTypedArray(h)||!h.length||!(typeof m=="string"&&m!==""||w.isPlainObject(m))){u.visible=!1;return}f("featureidkey"),u._length=Math.min(v.length,h.length),f("below"),f("text"),f("hovertext"),f("hovertemplate");var _=f("marker.line.width");_&&f("marker.line.color"),f("marker.opacity"),R(l,u,p,f,{prefix:"",cLetter:"z"}),w.coerceSelectionMarkerOpacity(u,f)}}}),Fxe=U({"src/traces/choroplethmap/convert.js"(pe,le){var w=_t(),R=ii(),O=vd(),z=ec(),l=V4().makeBlank,u=q4();function c(f){var v=f[0].trace,h=v.visible===!0&&v._length!==0,m={layout:{visibility:"none"},paint:{}},_={layout:{visibility:"none"},paint:{}},x=v._opts={fill:m,line:_,geojson:l()};if(!h)return x;var A=u.extractTraceFeature(f);if(!A)return x;var E=O.makeColorScaleFuncFromTrace(v),D=v.marker,g=D.line||{},C;R.isArrayOrTypedArray(D.opacity)&&(C=function(S){var M=S.mo;return w(M)?+R.constrain(M,0,1):0});var I;R.isArrayOrTypedArray(g.color)&&(I=function(S){return S.mlc});var N;R.isArrayOrTypedArray(g.width)&&(N=function(S){return S.mlw});for(var F=0;F<f.length;F++){var k=f[F],P=k.fOut;if(P){var T=P.properties;T.fc=E(k.z),C&&(T.mo=C(k)),I&&(T.mlc=I(k)),N&&(T.mlw=N(k)),k.ct=T.ct,k._polygons=u.feature2polygons(P)}}var y=C?{type:"identity",property:"mo"}:D.opacity;return R.extendFlat(m.paint,{"fill-color":{type:"identity",property:"fc"},"fill-opacity":y}),R.extendFlat(_.paint,{"line-color":I?{type:"identity",property:"mlc"}:g.color,"line-width":N?{type:"identity",property:"mlw"}:g.width,"line-opacity":y}),m.layout.visibility="visible",_.layout.visibility="visible",x.geojson={type:"FeatureCollection",features:A},p(f),x}function p(f){var v=f[0].trace,h=v._opts,m;if(v.selectedpoints){for(var _=z.makeSelectedPointStyleFns(v),x=0;x<f.length;x++){var A=f[x];A.fOut&&(A.fOut.properties.mo2=_.selectedOpacityFn(A))}m={type:"identity",property:"mo2"}}else m=R.isArrayOrTypedArray(v.marker.opacity)?{type:"identity",property:"mo"}:v.marker.opacity;return R.extendFlat(h.fill.paint,{"fill-opacity":m}),R.extendFlat(h.line.paint,{"line-opacity":m}),h}le.exports={convert:c,convertOnSelect:p}}}),Ctt=U({"src/traces/choroplethmap/plot.js"(pe,le){var w=Fxe().convert,R=Fxe().convertOnSelect,O=Y4().traceLayerPrefix;function z(u,c){this.type="choroplethmap",this.subplot=u,this.uid=c,this.sourceId="source-"+c,this.layerList=[["fill",O+c+"-fill"],["line",O+c+"-line"]],this.below=null}var l=z.prototype;l.update=function(u){this._update(w(u)),u[0].trace._glTrace=this},l.updateOnSelect=function(u){this._update(R(u))},l._update=function(u){var c=this.subplot,p=this.layerList,f=c.belowLookup["trace-"+this.uid];c.map.getSource(this.sourceId).setData(u.geojson),f!==this.below&&(this._removeLayers(),this._addLayers(u,f),this.below=f);for(var v=0;v<p.length;v++){var h=p[v],m=h[0],_=h[1],x=u[m];c.setOptions(_,"setLayoutProperty",x.layout),x.layout.visibility==="visible"&&c.setOptions(_,"setPaintProperty",x.paint)}},l._addLayers=function(u,c){for(var p=this.subplot,f=this.layerList,v=this.sourceId,h=0;h<f.length;h++){var m=f[h],_=m[0],x=u[_];p.addLayer({type:_,id:m[1],source:v,layout:x.layout,paint:x.paint},c)}},l._removeLayers=function(){for(var u=this.subplot.map,c=this.layerList,p=c.length-1;p>=0;p--)u.removeLayer(c[p][1])},l.dispose=function(){var u=this.subplot.map;this._removeLayers(),u.removeSource(this.sourceId)},le.exports=function(c,p){var f=p[0].trace,v=new z(c,f.uid),h=v.sourceId,m=w(p),_=v.below=c.belowLookup["trace-"+f.uid];return c.map.addSource(h,{type:"geojson",data:m.geojson}),v._addLayers(m,_),p[0].trace._glTrace=v,v}}}),Mtt=U({"src/traces/choroplethmap/index.js"(pe,le){le.exports={attributes:Nxe(),supplyDefaults:Att(),colorbar:rw(),calc:iK(),plot:Ctt(),hoverPoints:oK(),eventData:sK(),selectPoints:lK(),styleOnSelect:function(w,R){if(R){var O=R[0].trace;O._glTrace.updateOnSelect(R)}},getBelow:function(w,R){for(var O=R.getMapLayers(),z=O.length-2;z>=0;z--){var l=O[z].id;if(typeof l=="string"&&l.indexOf("water")===0){for(var u=z+1;u<O.length;u++)if(l=O[u].id,typeof l=="string"&&l.indexOf("plotly-")===-1)return l}}},moduleType:"trace",name:"choroplethmap",basePlotModule:EK(),categories:["map","gl","noOpacity","showLegend"],meta:{hr_name:"choropleth_map"}}}}),Rtt=U({"lib/choroplethmap.js"(pe,le){le.exports=Mtt()}}),zxe=U({"src/traces/densitymap/attributes.js"(pe,le){var w=Jd(),R=Js().hovertemplateAttrs,O=Jn(),z=SK(),l=Ar().extendFlat;le.exports=l({lon:z.lon,lat:z.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:z.text,hovertext:z.hovertext,hoverinfo:l({},O.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:R(),showlegend:l({},O.showlegend,{dflt:!1})},w("",{cLetter:"z",editTypeOverride:"calc"}))}}),ktt=U({"src/traces/densitymap/defaults.js"(pe,le){var w=ii(),R=wg(),O=zxe();le.exports=function(l,u,c,p){function f(_,x){return w.coerce(l,u,O,_,x)}var v=f("lon")||[],h=f("lat")||[],m=Math.min(v.length,h.length);if(!m){u.visible=!1;return}u._length=m,f("z"),f("radius"),f("below"),f("text"),f("hovertext"),f("hovertemplate"),R(l,u,p,f,{prefix:"",cLetter:"z"})}}}),Itt=U({"src/traces/densitymap/calc.js"(pe,le){var w=_t(),R=ii().isArrayOrTypedArray,O=Dt().BADNUM,z=t0(),l=ii()._;le.exports=function(c,p){for(var f=p._length,v=new Array(f),h=p.z,m=R(h)&&h.length,_=0;_<f;_++){var x=v[_]={},A=p.lon[_],E=p.lat[_];if(x.lonlat=w(A)&&w(E)?[+A,+E]:[O,O],m){var D=h[_];x.z=w(D)?D:O}}return z(c,p,{vals:m?h:[0,1],containerStr:"",cLetter:"z"}),f&&(v[0].t={labels:{lat:l(c,"lat:")+" ",lon:l(c,"lon:")+" "}}),v}}}),Ptt=U({"src/traces/densitymap/convert.js"(pe,le){var w=_t(),R=ii(),O=Lr(),z=vd(),l=Dt().BADNUM,u=V4().makeBlank;le.exports=function(p){var f=p[0].trace,v=f.visible===!0&&f._length!==0,h={layout:{visibility:"none"},paint:{}},m=f._opts={heatmap:h,geojson:u()};if(!v)return m;var _=[],x,A=f.z,E=f.radius,D=R.isArrayOrTypedArray(A)&&A.length,g=R.isArrayOrTypedArray(E);for(x=0;x<p.length;x++){var C=p[x],I=C.lonlat;if(I[0]!==l){var N={};if(D){var F=C.z;N.z=F!==l?F:0}g&&(N.r=w(E[x])&&E[x]>0?+E[x]:0),_.push({type:"Feature",geometry:{type:"Point",coordinates:I},properties:N})}}var k=z.extractOpts(f),P=k.reversescale?z.flipScale(k.colorscale):k.colorscale,T=P[0][1],y=O.opacity(T)<1?T:O.addOpacity(T,0),S=["interpolate",["linear"],["heatmap-density"],0,y];for(x=1;x<P.length;x++)S.push(P[x][0],P[x][1]);var M=["interpolate",["linear"],["get","z"],k.min,0,k.max,1];return R.extendFlat(m.heatmap.paint,{"heatmap-weight":D?M:1/(k.max-k.min),"heatmap-color":S,"heatmap-radius":g?{type:"identity",property:"r"}:f.radius,"heatmap-opacity":f.opacity}),m.geojson={type:"FeatureCollection",features:_},m.heatmap.layout.visibility="visible",m}}}),Dtt=U({"src/traces/densitymap/plot.js"(pe,le){var w=Ptt(),R=Y4().traceLayerPrefix;function O(l,u){this.type="densitymap",this.subplot=l,this.uid=u,this.sourceId="source-"+u,this.layerList=[["heatmap",R+u+"-heatmap"]],this.below=null}var z=O.prototype;z.update=function(l){var u=this.subplot,c=this.layerList,p=w(l),f=u.belowLookup["trace-"+this.uid];u.map.getSource(this.sourceId).setData(p.geojson),f!==this.below&&(this._removeLayers(),this._addLayers(p,f),this.below=f);for(var v=0;v<c.length;v++){var h=c[v],m=h[0],_=h[1],x=p[m];u.setOptions(_,"setLayoutProperty",x.layout),x.layout.visibility==="visible"&&u.setOptions(_,"setPaintProperty",x.paint)}},z._addLayers=function(l,u){for(var c=this.subplot,p=this.layerList,f=this.sourceId,v=0;v<p.length;v++){var h=p[v],m=h[0],_=l[m];c.addLayer({type:m,id:h[1],source:f,layout:_.layout,paint:_.paint},u)}},z._removeLayers=function(){for(var l=this.subplot.map,u=this.layerList,c=u.length-1;c>=0;c--)l.removeLayer(u[c][1])},z.dispose=function(){var l=this.subplot.map;this._removeLayers(),l.removeSource(this.sourceId)},le.exports=function(u,c){var p=c[0].trace,f=new O(u,p.uid),v=f.sourceId,h=w(c),m=f.below=u.belowLookup["trace-"+p.uid];return u.map.addSource(v,{type:"geojson",data:h.geojson}),f._addLayers(h,m),f}}}),Ltt=U({"src/traces/densitymap/hover.js"(pe,le){var w=Yu(),R=TK().hoverPoints,O=TK().getExtraText;le.exports=function(l,u,c){var p=R(l,u,c);if(p){var f=p[0],v=f.cd,h=v[0].trace,m=v[f.index];if(delete f.color,"z"in m){var _=f.subplot.mockAxis;f.z=m.z,f.zLabel=w.tickText(_,_.c2l(m.z),"hover").text}return f.extraText=O(h,m,v[0].t.labels),[f]}}}}),Ott=U({"src/traces/densitymap/event_data.js"(pe,le){le.exports=function(R,O){return R.lon=O.lon,R.lat=O.lat,R.z=O.z,R}}}),Ntt=U({"src/traces/densitymap/index.js"(pe,le){le.exports={attributes:zxe(),supplyDefaults:ktt(),colorbar:rw(),formatLabels:Lxe(),calc:Itt(),plot:Dtt(),hoverPoints:Ltt(),eventData:Ott(),getBelow:function(w,R){for(var O=R.getMapLayers(),z=0;z<O.length;z++){var l=O[z],u=l.id;if(l.type==="symbol"&&typeof u=="string"&&u.indexOf("plotly-")===-1)return u}},moduleType:"trace",name:"densitymap",basePlotModule:EK(),categories:["map","gl","showLegend"],meta:{hr_name:"density_map"}}}}),Ftt=U({"lib/densitymap.js"(pe,le){le.exports=Ntt()}}),Bxe=U({"src/traces/sankey/attributes.js"(pe,le){var w=Ir(),R=Jn(),O=jn(),z=Qn(),l=oh().attributes,u=Js().hovertemplateAttrs,c=Jd(),p=Tc().templatedArray,f=Wp().descriptionOnlyNumbers,v=Ar().extendFlat,h=zl().overrideAll;le.exports=h({hoverinfo:v({},R.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:z.hoverlabel,domain:l({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s",description:f("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:w({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:O.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:z.hoverlabel,hovertemplate:u({},{keys:["value","label"]}),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:O.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:z.hoverlabel,hovertemplate:u({},{keys:["value","label"]}),colorscales:p("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:v(c().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")}}),ztt=U({"src/traces/sankey/defaults.js"(pe,le){var w=ii(),R=Bxe(),O=Lr(),z=or(),l=oh().defaults,u=fM(),c=Tc(),p=_g();le.exports=function(h,m,_,x){function A($,Z){return w.coerce(h,m,R,$,Z)}var E=w.extendDeep(x.hoverlabel,h.hoverlabel),D=h.node,g=c.newContainer(m,"node");function C($,Z){return w.coerce(D,g,R.node,$,Z)}C("label"),C("groups"),C("x"),C("y"),C("pad"),C("thickness"),C("line.color"),C("line.width"),C("hoverinfo",h.hoverinfo),u(D,g,C,E),C("hovertemplate"),C("align");var I=x.colorway,N=function($){return I[$%I.length]};C("color",g.label.map(function($,Z){return O.addOpacity(N(Z),.8)})),C("customdata");var F=h.link||{},k=c.newContainer(m,"link");function P($,Z){return w.coerce(F,k,R.link,$,Z)}P("label"),P("arrowlen"),P("source"),P("target"),P("value"),P("line.color"),P("line.width"),P("hoverinfo",h.hoverinfo),u(F,k,P,E),P("hovertemplate");var T=z(x.paper_bgcolor).getLuminance()<.333,y=T?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",S=P("color",y);function M($){var Z=z($);if(!Z.isValid())return $;var K=Z.getAlpha();return K<=.8?Z.setAlpha(K+.2):Z=T?Z.brighten():Z.darken(),Z.toRgbString()}P("hovercolor",Array.isArray(S)?S.map(M):M(S)),P("customdata"),p(F,k,{name:"colorscales",handleItemDefaults:f}),l(m,x,A),A("orientation"),A("valueformat"),A("valuesuffix");var W;g.x.length&&g.y.length&&(W="freeform"),A("arrangement",W),w.coerceFont(A,"textfont",x.font,{autoShadowDflt:!0}),m._length=null};function f(v,h){function m(_,x){return w.coerce(v,h,R.link.colorscales,_,x)}m("label"),m("cmin"),m("cmax"),m("colorscale")}}}),Uxe=U({"node_modules/strongly-connected-components/scc.js"(pe,le){le.exports=w;function w(R){for(var O=R.length,z=new Array(O),l=new Array(O),u=new Array(O),c=new Array(O),p=new Array(O),f=new Array(O),v=0;v<O;++v)z[v]=-1,l[v]=0,u[v]=!1,c[v]=0,p[v]=-1,f[v]=[];var h=0,m=[],_=[];function x(g){var C=[g],I=[g];for(z[g]=l[g]=h,u[g]=!0,h+=1;I.length>0;){g=I[I.length-1];var N=R[g];if(c[g]<N.length){for(var F=c[g];F<N.length;++F){var k=N[F];if(z[k]<0){z[k]=l[k]=h,u[k]=!0,h+=1,C.push(k),I.push(k);break}else u[k]&&(l[g]=Math.min(l[g],l[k])|0);p[k]>=0&&f[g].push(p[k])}c[g]=F}else{if(l[g]===z[g]){for(var P=[],T=[],y=0,F=C.length-1;F>=0;--F){var S=C[F];if(u[S]=!1,P.push(S),T.push(f[S]),y+=f[S].length,p[S]=m.length,S===g){C.length=F;break}}m.push(P);for(var M=new Array(y),F=0;F<T.length;F++)for(var W=0;W<T[F].length;W++)M[--y]=T[F][W];_.push(M)}I.pop()}}}for(var v=0;v<O;++v)z[v]<0&&x(v);for(var A,v=0;v<_.length;v++){var E=_[v];if(E.length!==0){E.sort(function(C,I){return C-I}),A=[E[0]];for(var D=1;D<E.length;D++)E[D]!==E[D-1]&&A.push(E[D]);_[v]=A}}return{components:m,adjacencyList:_}}}}),Btt=U({"src/traces/sankey/calc.js"(pe,le){var w=Uxe(),R=ii(),O=FR().wrap,z=R.isArrayOrTypedArray,l=R.isIndex,u=vd();function c(f){var v=f.node,h=f.link,m=[],_=z(h.color),x=z(h.hovercolor),A=z(h.customdata),E={},D={},g=h.colorscales.length,C;for(C=0;C<g;C++){var I=h.colorscales[C],N=u.extractScale(I,{cLetter:"c"}),F=u.makeColorScaleFunc(N);D[I.label]=F}var k=0;for(C=0;C<h.value.length;C++)h.source[C]>k&&(k=h.source[C]),h.target[C]>k&&(k=h.target[C]);var P=k+1;f.node._count=P;var T,y=f.node.groups,S={};for(C=0;C<y.length;C++){var M=y[C];for(T=0;T<M.length;T++){var W=M[T],$=P+C;S.hasOwnProperty(W)?R.warn("Node "+W+" is already part of a group."):S[W]=$}}var Z={source:[],target:[]};for(C=0;C<h.value.length;C++){var K=h.value[C],Q=h.source[C],J=h.target[C];if(K>0&&l(Q,P)&&l(J,P)&&!(S.hasOwnProperty(Q)&&S.hasOwnProperty(J)&&S[Q]===S[J])){S.hasOwnProperty(J)&&(J=S[J]),S.hasOwnProperty(Q)&&(Q=S[Q]),Q=+Q,J=+J,E[Q]=E[J]=!0;var G="";h.label&&h.label[C]&&(G=h.label[C]);var ee=null;G&&D.hasOwnProperty(G)&&(ee=D[G]),m.push({pointNumber:C,label:G,color:_?h.color[C]:h.color,hovercolor:x?h.hovercolor[C]:h.hovercolor,customdata:A?h.customdata[C]:h.customdata,concentrationscale:ee,source:Q,target:J,value:+K}),Z.source.push(Q),Z.target.push(J)}}var re=P+y.length,fe=z(v.color),we=z(v.customdata),Oe=[];for(C=0;C<re;C++)if(E[C]){var ke=v.label[C];Oe.push({group:C>P-1,childrenNodes:[],pointNumber:C,label:ke,color:fe?v.color[C]:v.color,customdata:we?v.customdata[C]:v.customdata})}var Le=!1;return p(re,Z.source,Z.target)&&(Le=!0),{circular:Le,links:m,nodes:Oe,groups:y,groupLookup:S}}function p(f,v,h){for(var m=R.init2dArray(f,0),_=0;_<Math.min(v.length,h.length);_++)if(R.isIndex(v[_],f)&&R.isIndex(h[_],f)){if(v[_]===h[_])return!0;m[v[_]].push(h[_])}var x=w(m);return x.components.some(function(A){return A.length>1})}le.exports=function(v,h){var m=c(h);return O({circular:m.circular,_nodes:m.nodes,_links:m.links,_groups:m.groups,_groupLookup:m.groupLookup})}}}),Utt=U({"node_modules/d3-quadtree/dist/d3-quadtree.js"(pe,le){(function(w,R){typeof pe=="object"&&typeof le<"u"?R(pe):(w=w||self,R(w.d3=w.d3||{}))})(pe,function(w){function R(P){var T=+this._x.call(null,P),y=+this._y.call(null,P);return O(this.cover(T,y),T,y,P)}function O(P,T,y,S){if(isNaN(T)||isNaN(y))return P;var M,W=P._root,$={data:S},Z=P._x0,K=P._y0,Q=P._x1,J=P._y1,G,ee,re,fe,we,Oe,ke,Le;if(!W)return P._root=$,P;for(;W.length;)if((we=T>=(G=(Z+Q)/2))?Z=G:Q=G,(Oe=y>=(ee=(K+J)/2))?K=ee:J=ee,M=W,!(W=W[ke=Oe<<1|we]))return M[ke]=$,P;if(re=+P._x.call(null,W.data),fe=+P._y.call(null,W.data),T===re&&y===fe)return $.next=W,M?M[ke]=$:P._root=$,P;do M=M?M[ke]=new Array(4):P._root=new Array(4),(we=T>=(G=(Z+Q)/2))?Z=G:Q=G,(Oe=y>=(ee=(K+J)/2))?K=ee:J=ee;while((ke=Oe<<1|we)===(Le=(fe>=ee)<<1|re>=G));return M[Le]=W,M[ke]=$,P}function z(P){var T,y,S=P.length,M,W,$=new Array(S),Z=new Array(S),K=1/0,Q=1/0,J=-1/0,G=-1/0;for(y=0;y<S;++y)isNaN(M=+this._x.call(null,T=P[y]))||isNaN(W=+this._y.call(null,T))||($[y]=M,Z[y]=W,M<K&&(K=M),M>J&&(J=M),W<Q&&(Q=W),W>G&&(G=W));if(K>J||Q>G)return this;for(this.cover(K,Q).cover(J,G),y=0;y<S;++y)O(this,$[y],Z[y],P[y]);return this}function l(P,T){if(isNaN(P=+P)||isNaN(T=+T))return this;var y=this._x0,S=this._y0,M=this._x1,W=this._y1;if(isNaN(y))M=(y=Math.floor(P))+1,W=(S=Math.floor(T))+1;else{for(var $=M-y,Z=this._root,K,Q;y>P||P>=M||S>T||T>=W;)switch(Q=(T<S)<<1|P<y,K=new Array(4),K[Q]=Z,Z=K,$*=2,Q){case 0:M=y+$,W=S+$;break;case 1:y=M-$,W=S+$;break;case 2:M=y+$,S=W-$;break;case 3:y=M-$,S=W-$;break}this._root&&this._root.length&&(this._root=Z)}return this._x0=y,this._y0=S,this._x1=M,this._y1=W,this}function u(){var P=[];return this.visit(function(T){if(!T.length)do P.push(T.data);while(T=T.next)}),P}function c(P){return arguments.length?this.cover(+P[0][0],+P[0][1]).cover(+P[1][0],+P[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function p(P,T,y,S,M){this.node=P,this.x0=T,this.y0=y,this.x1=S,this.y1=M}function f(P,T,y){var S,M=this._x0,W=this._y0,$,Z,K,Q,J=this._x1,G=this._y1,ee=[],re=this._root,fe,we;for(re&&ee.push(new p(re,M,W,J,G)),y==null?y=1/0:(M=P-y,W=T-y,J=P+y,G=T+y,y*=y);fe=ee.pop();)if(!(!(re=fe.node)||($=fe.x0)>J||(Z=fe.y0)>G||(K=fe.x1)<M||(Q=fe.y1)<W))if(re.length){var Oe=($+K)/2,ke=(Z+Q)/2;ee.push(new p(re[3],Oe,ke,K,Q),new p(re[2],$,ke,Oe,Q),new p(re[1],Oe,Z,K,ke),new p(re[0],$,Z,Oe,ke)),(we=(T>=ke)<<1|P>=Oe)&&(fe=ee[ee.length-1],ee[ee.length-1]=ee[ee.length-1-we],ee[ee.length-1-we]=fe)}else{var Le=P-+this._x.call(null,re.data),oe=T-+this._y.call(null,re.data),be=Le*Le+oe*oe;if(be<y){var _e=Math.sqrt(y=be);M=P-_e,W=T-_e,J=P+_e,G=T+_e,S=re.data}}return S}function v(P){if(isNaN(J=+this._x.call(null,P))||isNaN(G=+this._y.call(null,P)))return this;var T,y=this._root,S,M,W,$=this._x0,Z=this._y0,K=this._x1,Q=this._y1,J,G,ee,re,fe,we,Oe,ke;if(!y)return this;if(y.length)for(;;){if((fe=J>=(ee=($+K)/2))?$=ee:K=ee,(we=G>=(re=(Z+Q)/2))?Z=re:Q=re,T=y,!(y=y[Oe=we<<1|fe]))return this;if(!y.length)break;(T[Oe+1&3]||T[Oe+2&3]||T[Oe+3&3])&&(S=T,ke=Oe)}for(;y.data!==P;)if(M=y,!(y=y.next))return this;return(W=y.next)&&delete y.next,M?(W?M.next=W:delete M.next,this):T?(W?T[Oe]=W:delete T[Oe],(y=T[0]||T[1]||T[2]||T[3])&&y===(T[3]||T[2]||T[1]||T[0])&&!y.length&&(S?S[ke]=y:this._root=y),this):(this._root=W,this)}function h(P){for(var T=0,y=P.length;T<y;++T)this.remove(P[T]);return this}function m(){return this._root}function _(){var P=0;return this.visit(function(T){if(!T.length)do++P;while(T=T.next)}),P}function x(P){var T=[],y,S=this._root,M,W,$,Z,K;for(S&&T.push(new p(S,this._x0,this._y0,this._x1,this._y1));y=T.pop();)if(!P(S=y.node,W=y.x0,$=y.y0,Z=y.x1,K=y.y1)&&S.length){var Q=(W+Z)/2,J=($+K)/2;(M=S[3])&&T.push(new p(M,Q,J,Z,K)),(M=S[2])&&T.push(new p(M,W,J,Q,K)),(M=S[1])&&T.push(new p(M,Q,$,Z,J)),(M=S[0])&&T.push(new p(M,W,$,Q,J))}return this}function A(P){var T=[],y=[],S;for(this._root&&T.push(new p(this._root,this._x0,this._y0,this._x1,this._y1));S=T.pop();){var M=S.node;if(M.length){var W,$=S.x0,Z=S.y0,K=S.x1,Q=S.y1,J=($+K)/2,G=(Z+Q)/2;(W=M[0])&&T.push(new p(W,$,Z,J,G)),(W=M[1])&&T.push(new p(W,J,Z,K,G)),(W=M[2])&&T.push(new p(W,$,G,J,Q)),(W=M[3])&&T.push(new p(W,J,G,K,Q))}y.push(S)}for(;S=y.pop();)P(S.node,S.x0,S.y0,S.x1,S.y1);return this}function E(P){return P[0]}function D(P){return arguments.length?(this._x=P,this):this._x}function g(P){return P[1]}function C(P){return arguments.length?(this._y=P,this):this._y}function I(P,T,y){var S=new N(T??E,y??g,NaN,NaN,NaN,NaN);return P==null?S:S.addAll(P)}function N(P,T,y,S,M,W){this._x=P,this._y=T,this._x0=y,this._y0=S,this._x1=M,this._y1=W,this._root=void 0}function F(P){for(var T={data:P.data},y=T;P=P.next;)y=y.next={data:P.data};return T}var k=I.prototype=N.prototype;k.copy=function(){var P=new N(this._x,this._y,this._x0,this._y0,this._x1,this._y1),T=this._root,y,S;if(!T)return P;if(!T.length)return P._root=F(T),P;for(y=[{source:T,target:P._root=new Array(4)}];T=y.pop();)for(var M=0;M<4;++M)(S=T.source[M])&&(S.length?y.push({source:S,target:T.target[M]=new Array(4)}):T.target[M]=F(S));return P},k.add=R,k.addAll=z,k.cover=l,k.data=u,k.extent=c,k.find=f,k.remove=v,k.removeAll=h,k.root=m,k.size=_,k.visit=x,k.visitAfter=A,k.x=D,k.y=C,w.quadtree=I,Object.defineProperty(w,"__esModule",{value:!0})})}}),AK=U({"node_modules/d3-collection/dist/d3-collection.js"(pe,le){(function(w,R){R(typeof pe=="object"&&typeof le<"u"?pe:w.d3=w.d3||{})})(pe,function(w){var R="$";function O(){}O.prototype=z.prototype={constructor:O,has:function(E){return R+E in this},get:function(E){return this[R+E]},set:function(E,D){return this[R+E]=D,this},remove:function(E){var D=R+E;return D in this&&delete this[D]},clear:function(){for(var E in this)E[0]===R&&delete this[E]},keys:function(){var E=[];for(var D in this)D[0]===R&&E.push(D.slice(1));return E},values:function(){var E=[];for(var D in this)D[0]===R&&E.push(this[D]);return E},entries:function(){var E=[];for(var D in this)D[0]===R&&E.push({key:D.slice(1),value:this[D]});return E},size:function(){var E=0;for(var D in this)D[0]===R&&++E;return E},empty:function(){for(var E in this)if(E[0]===R)return!1;return!0},each:function(E){for(var D in this)D[0]===R&&E(this[D],D.slice(1),this)}};function z(E,D){var g=new O;if(E instanceof O)E.each(function(k,P){g.set(P,k)});else if(Array.isArray(E)){var C=-1,I=E.length,N;if(D==null)for(;++C<I;)g.set(C,E[C]);else for(;++C<I;)g.set(D(N=E[C],C,E),N)}else if(E)for(var F in E)g.set(F,E[F]);return g}function l(){var E=[],D=[],g,C,I;function N(k,P,T,y){if(P>=E.length)return g!=null&&k.sort(g),C!=null?C(k):k;for(var S=-1,M=k.length,W=E[P++],$,Z,K=z(),Q,J=T();++S<M;)(Q=K.get($=W(Z=k[S])+""))?Q.push(Z):K.set($,[Z]);return K.each(function(G,ee){y(J,ee,N(G,P,T,y))}),J}function F(k,P){if(++P>E.length)return k;var T,y=D[P-1];return C!=null&&P>=E.length?T=k.entries():(T=[],k.each(function(S,M){T.push({key:M,values:F(S,P)})})),y!=null?T.sort(function(S,M){return y(S.key,M.key)}):T}return I={object:function(k){return N(k,0,u,c)},map:function(k){return N(k,0,p,f)},entries:function(k){return F(N(k,0,p,f),0)},key:function(k){return E.push(k),I},sortKeys:function(k){return D[E.length-1]=k,I},sortValues:function(k){return g=k,I},rollup:function(k){return C=k,I}}}function u(){return{}}function c(E,D,g){E[D]=g}function p(){return z()}function f(E,D,g){E.set(D,g)}function v(){}var h=z.prototype;v.prototype=m.prototype={constructor:v,has:h.has,add:function(E){return E+="",this[R+E]=E,this},remove:h.remove,clear:h.clear,values:h.keys,size:h.size,empty:h.empty,each:h.each};function m(E,D){var g=new v;if(E instanceof v)E.each(function(N){g.add(N)});else if(E){var C=-1,I=E.length;if(D==null)for(;++C<I;)g.add(E[C]);else for(;++C<I;)g.add(D(E[C],C,E))}return g}function _(E){var D=[];for(var g in E)D.push(g);return D}function x(E){var D=[];for(var g in E)D.push(E[g]);return D}function A(E){var D=[];for(var g in E)D.push({key:g,value:E[g]});return D}w.nest=l,w.set=m,w.map=z,w.keys=_,w.values=x,w.entries=A,Object.defineProperty(w,"__esModule",{value:!0})})}}),Htt=U({"node_modules/d3-dispatch/dist/d3-dispatch.js"(pe,le){(function(w,R){typeof pe=="object"&&typeof le<"u"?R(pe):(w=w||self,R(w.d3=w.d3||{}))})(pe,function(w){var R={value:function(){}};function O(){for(var p=0,f=arguments.length,v={},h;p<f;++p){if(!(h=arguments[p]+"")||h in v||/[\s.]/.test(h))throw new Error("illegal type: "+h);v[h]=[]}return new z(v)}function z(p){this._=p}function l(p,f){return p.trim().split(/^|\s+/).map(function(v){var h="",m=v.indexOf(".");if(m>=0&&(h=v.slice(m+1),v=v.slice(0,m)),v&&!f.hasOwnProperty(v))throw new Error("unknown type: "+v);return{type:v,name:h}})}z.prototype=O.prototype={constructor:z,on:function(p,f){var v=this._,h=l(p+"",v),m,_=-1,x=h.length;if(arguments.length<2){for(;++_<x;)if((m=(p=h[_]).type)&&(m=u(v[m],p.name)))return m;return}if(f!=null&&typeof f!="function")throw new Error("invalid callback: "+f);for(;++_<x;)if(m=(p=h[_]).type)v[m]=c(v[m],p.name,f);else if(f==null)for(m in v)v[m]=c(v[m],p.name,null);return this},copy:function(){var p={},f=this._;for(var v in f)p[v]=f[v].slice();return new z(p)},call:function(p,f){if((m=arguments.length-2)>0)for(var v=new Array(m),h=0,m,_;h<m;++h)v[h]=arguments[h+2];if(!this._.hasOwnProperty(p))throw new Error("unknown type: "+p);for(_=this._[p],h=0,m=_.length;h<m;++h)_[h].value.apply(f,v)},apply:function(p,f,v){if(!this._.hasOwnProperty(p))throw new Error("unknown type: "+p);for(var h=this._[p],m=0,_=h.length;m<_;++m)h[m].value.apply(f,v)}};function u(p,f){for(var v=0,h=p.length,m;v<h;++v)if((m=p[v]).name===f)return m.value}function c(p,f,v){for(var h=0,m=p.length;h<m;++h)if(p[h].name===f){p[h]=R,p=p.slice(0,h).concat(p.slice(h+1));break}return v!=null&&p.push({name:f,value:v}),p}w.dispatch=O,Object.defineProperty(w,"__esModule",{value:!0})})}}),jtt=U({"node_modules/d3-timer/dist/d3-timer.js"(pe,le){(function(w,R){typeof pe=="object"&&typeof le<"u"?R(pe):(w=w||self,R(w.d3=w.d3||{}))})(pe,function(w){var R=0,O=0,z=0,l=1e3,u,c,p=0,f=0,v=0,h=typeof performance=="object"&&performance.now?performance:Date,m=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(P){setTimeout(P,17)};function _(){return f||(m(x),f=h.now()+v)}function x(){f=0}function A(){this._call=this._time=this._next=null}A.prototype=E.prototype={constructor:A,restart:function(P,T,y){if(typeof P!="function")throw new TypeError("callback is not a function");y=(y==null?_():+y)+(T==null?0:+T),!this._next&&c!==this&&(c?c._next=this:u=this,c=this),this._call=P,this._time=y,N()},stop:function(){this._call&&(this._call=null,this._time=1/0,N())}};function E(P,T,y){var S=new A;return S.restart(P,T,y),S}function D(){_(),++R;for(var P=u,T;P;)(T=f-P._time)>=0&&P._call.call(null,T),P=P._next;--R}function g(){f=(p=h.now())+v,R=O=0;try{D()}finally{R=0,I(),f=0}}function C(){var P=h.now(),T=P-p;T>l&&(v-=T,p=P)}function I(){for(var P,T=u,y,S=1/0;T;)T._call?(S>T._time&&(S=T._time),P=T,T=T._next):(y=T._next,T._next=null,T=P?P._next=y:u=y);c=P,N(S)}function N(P){if(!R){O&&(O=clearTimeout(O));var T=P-f;T>24?(P<1/0&&(O=setTimeout(g,P-h.now()-v)),z&&(z=clearInterval(z))):(z||(p=h.now(),z=setInterval(C,l)),R=1,m(g))}}function F(P,T,y){var S=new A;return T=T==null?0:+T,S.restart(function(M){S.stop(),P(M+T)},T,y),S}function k(P,T,y){var S=new A,M=T;return T==null?(S.restart(P,T,y),S):(T=+T,y=y==null?_():+y,S.restart(function W($){$+=M,S.restart(W,M+=T,y),P($)},T,y),S)}w.interval=k,w.now=_,w.timeout=F,w.timer=E,w.timerFlush=D,Object.defineProperty(w,"__esModule",{value:!0})})}}),Vtt=U({"node_modules/d3-force/dist/d3-force.js"(pe,le){(function(w,R){typeof pe=="object"&&typeof le<"u"?R(pe,Utt(),AK(),Htt(),jtt()):R(w.d3=w.d3||{},w.d3,w.d3,w.d3,w.d3)})(pe,function(w,R,O,z,l){function u(P,T){var y;P==null&&(P=0),T==null&&(T=0);function S(){var M,W=y.length,$,Z=0,K=0;for(M=0;M<W;++M)$=y[M],Z+=$.x,K+=$.y;for(Z=Z/W-P,K=K/W-T,M=0;M<W;++M)$=y[M],$.x-=Z,$.y-=K}return S.initialize=function(M){y=M},S.x=function(M){return arguments.length?(P=+M,S):P},S.y=function(M){return arguments.length?(T=+M,S):T},S}function c(P){return function(){return P}}function p(){return(Math.random()-.5)*1e-6}function f(P){return P.x+P.vx}function v(P){return P.y+P.vy}function h(P){var T,y,S=1,M=1;typeof P!="function"&&(P=c(P==null?1:+P));function W(){for(var K,Q=T.length,J,G,ee,re,fe,we,Oe=0;Oe<M;++Oe)for(J=R.quadtree(T,f,v).visitAfter($),K=0;K<Q;++K)G=T[K],fe=y[G.index],we=fe*fe,ee=G.x+G.vx,re=G.y+G.vy,J.visit(ke);function ke(Le,oe,be,_e,he){var De=Le.data,xe=Le.r,se=fe+xe;if(De){if(De.index>G.index){var Ee=ee-De.x-De.vx,Te=re-De.y-De.vy,Be=Ee*Ee+Te*Te;Be<se*se&&(Ee===0&&(Ee=p(),Be+=Ee*Ee),Te===0&&(Te=p(),Be+=Te*Te),Be=(se-(Be=Math.sqrt(Be)))/Be*S,G.vx+=(Ee*=Be)*(se=(xe*=xe)/(we+xe)),G.vy+=(Te*=Be)*se,De.vx-=Ee*(se=1-se),De.vy-=Te*se)}return}return oe>ee+se||_e<ee-se||be>re+se||he<re-se}}function $(K){if(K.data)return K.r=y[K.data.index];for(var Q=K.r=0;Q<4;++Q)K[Q]&&K[Q].r>K.r&&(K.r=K[Q].r)}function Z(){if(T){var K,Q=T.length,J;for(y=new Array(Q),K=0;K<Q;++K)J=T[K],y[J.index]=+P(J,K,T)}}return W.initialize=function(K){T=K,Z()},W.iterations=function(K){return arguments.length?(M=+K,W):M},W.strength=function(K){return arguments.length?(S=+K,W):S},W.radius=function(K){return arguments.length?(P=typeof K=="function"?K:c(+K),Z(),W):P},W}function m(P){return P.index}function _(P,T){var y=P.get(T);if(!y)throw new Error("missing: "+T);return y}function x(P){var T=m,y=J,S,M=c(30),W,$,Z,K,Q=1;P==null&&(P=[]);function J(we){return 1/Math.min(Z[we.source.index],Z[we.target.index])}function G(we){for(var Oe=0,ke=P.length;Oe<Q;++Oe)for(var Le=0,oe,be,_e,he,De,xe,se;Le<ke;++Le)oe=P[Le],be=oe.source,_e=oe.target,he=_e.x+_e.vx-be.x-be.vx||p(),De=_e.y+_e.vy-be.y-be.vy||p(),xe=Math.sqrt(he*he+De*De),xe=(xe-W[Le])/xe*we*S[Le],he*=xe,De*=xe,_e.vx-=he*(se=K[Le]),_e.vy-=De*se,be.vx+=he*(se=1-se),be.vy+=De*se}function ee(){if($){var we,Oe=$.length,ke=P.length,Le=O.map($,T),oe;for(we=0,Z=new Array(Oe);we<ke;++we)oe=P[we],oe.index=we,typeof oe.source!="object"&&(oe.source=_(Le,oe.source)),typeof oe.target!="object"&&(oe.target=_(Le,oe.target)),Z[oe.source.index]=(Z[oe.source.index]||0)+1,Z[oe.target.index]=(Z[oe.target.index]||0)+1;for(we=0,K=new Array(ke);we<ke;++we)oe=P[we],K[we]=Z[oe.source.index]/(Z[oe.source.index]+Z[oe.target.index]);S=new Array(ke),re(),W=new Array(ke),fe()}}function re(){if($)for(var we=0,Oe=P.length;we<Oe;++we)S[we]=+y(P[we],we,P)}function fe(){if($)for(var we=0,Oe=P.length;we<Oe;++we)W[we]=+M(P[we],we,P)}return G.initialize=function(we){$=we,ee()},G.links=function(we){return arguments.length?(P=we,ee(),G):P},G.id=function(we){return arguments.length?(T=we,G):T},G.iterations=function(we){return arguments.length?(Q=+we,G):Q},G.strength=function(we){return arguments.length?(y=typeof we=="function"?we:c(+we),re(),G):y},G.distance=function(we){return arguments.length?(M=typeof we=="function"?we:c(+we),fe(),G):M},G}function A(P){return P.x}function E(P){return P.y}var D=10,g=Math.PI*(3-Math.sqrt(5));function C(P){var T,y=1,S=.001,M=1-Math.pow(S,1/300),W=0,$=.6,Z=O.map(),K=l.timer(J),Q=z.dispatch("tick","end");P==null&&(P=[]);function J(){G(),Q.call("tick",T),y<S&&(K.stop(),Q.call("end",T))}function G(fe){var we,Oe=P.length,ke;fe===void 0&&(fe=1);for(var Le=0;Le<fe;++Le)for(y+=(W-y)*M,Z.each(function(oe){oe(y)}),we=0;we<Oe;++we)ke=P[we],ke.fx==null?ke.x+=ke.vx*=$:(ke.x=ke.fx,ke.vx=0),ke.fy==null?ke.y+=ke.vy*=$:(ke.y=ke.fy,ke.vy=0);return T}function ee(){for(var fe=0,we=P.length,Oe;fe<we;++fe){if(Oe=P[fe],Oe.index=fe,Oe.fx!=null&&(Oe.x=Oe.fx),Oe.fy!=null&&(Oe.y=Oe.fy),isNaN(Oe.x)||isNaN(Oe.y)){var ke=D*Math.sqrt(fe),Le=fe*g;Oe.x=ke*Math.cos(Le),Oe.y=ke*Math.sin(Le)}(isNaN(Oe.vx)||isNaN(Oe.vy))&&(Oe.vx=Oe.vy=0)}}function re(fe){return fe.initialize&&fe.initialize(P),fe}return ee(),T={tick:G,restart:function(){return K.restart(J),T},stop:function(){return K.stop(),T},nodes:function(fe){return arguments.length?(P=fe,ee(),Z.each(re),T):P},alpha:function(fe){return arguments.length?(y=+fe,T):y},alphaMin:function(fe){return arguments.length?(S=+fe,T):S},alphaDecay:function(fe){return arguments.length?(M=+fe,T):+M},alphaTarget:function(fe){return arguments.length?(W=+fe,T):W},velocityDecay:function(fe){return arguments.length?($=1-fe,T):1-$},force:function(fe,we){return arguments.length>1?(we==null?Z.remove(fe):Z.set(fe,re(we)),T):Z.get(fe)},find:function(fe,we,Oe){var ke=0,Le=P.length,oe,be,_e,he,De;for(Oe==null?Oe=1/0:Oe*=Oe,ke=0;ke<Le;++ke)he=P[ke],oe=fe-he.x,be=we-he.y,_e=oe*oe+be*be,_e<Oe&&(De=he,Oe=_e);return De},on:function(fe,we){return arguments.length>1?(Q.on(fe,we),T):Q.on(fe)}}}function I(){var P,T,y,S=c(-30),M,W=1,$=1/0,Z=.81;function K(ee){var re,fe=P.length,we=R.quadtree(P,A,E).visitAfter(J);for(y=ee,re=0;re<fe;++re)T=P[re],we.visit(G)}function Q(){if(P){var ee,re=P.length,fe;for(M=new Array(re),ee=0;ee<re;++ee)fe=P[ee],M[fe.index]=+S(fe,ee,P)}}function J(ee){var re=0,fe,we,Oe=0,ke,Le,oe;if(ee.length){for(ke=Le=oe=0;oe<4;++oe)(fe=ee[oe])&&(we=Math.abs(fe.value))&&(re+=fe.value,Oe+=we,ke+=we*fe.x,Le+=we*fe.y);ee.x=ke/Oe,ee.y=Le/Oe}else{fe=ee,fe.x=fe.data.x,fe.y=fe.data.y;do re+=M[fe.data.index];while(fe=fe.next)}ee.value=re}function G(ee,re,fe,we){if(!ee.value)return!0;var Oe=ee.x-T.x,ke=ee.y-T.y,Le=we-re,oe=Oe*Oe+ke*ke;if(Le*Le/Z<oe)return oe<$&&(Oe===0&&(Oe=p(),oe+=Oe*Oe),ke===0&&(ke=p(),oe+=ke*ke),oe<W&&(oe=Math.sqrt(W*oe)),T.vx+=Oe*ee.value*y/oe,T.vy+=ke*ee.value*y/oe),!0;if(ee.length||oe>=$)return;(ee.data!==T||ee.next)&&(Oe===0&&(Oe=p(),oe+=Oe*Oe),ke===0&&(ke=p(),oe+=ke*ke),oe<W&&(oe=Math.sqrt(W*oe)));do ee.data!==T&&(Le=M[ee.data.index]*y/oe,T.vx+=Oe*Le,T.vy+=ke*Le);while(ee=ee.next)}return K.initialize=function(ee){P=ee,Q()},K.strength=function(ee){return arguments.length?(S=typeof ee=="function"?ee:c(+ee),Q(),K):S},K.distanceMin=function(ee){return arguments.length?(W=ee*ee,K):Math.sqrt(W)},K.distanceMax=function(ee){return arguments.length?($=ee*ee,K):Math.sqrt($)},K.theta=function(ee){return arguments.length?(Z=ee*ee,K):Math.sqrt(Z)},K}function N(P,T,y){var S,M=c(.1),W,$;typeof P!="function"&&(P=c(+P)),T==null&&(T=0),y==null&&(y=0);function Z(Q){for(var J=0,G=S.length;J<G;++J){var ee=S[J],re=ee.x-T||1e-6,fe=ee.y-y||1e-6,we=Math.sqrt(re*re+fe*fe),Oe=($[J]-we)*W[J]*Q/we;ee.vx+=re*Oe,ee.vy+=fe*Oe}}function K(){if(S){var Q,J=S.length;for(W=new Array(J),$=new Array(J),Q=0;Q<J;++Q)$[Q]=+P(S[Q],Q,S),W[Q]=isNaN($[Q])?0:+M(S[Q],Q,S)}}return Z.initialize=function(Q){S=Q,K()},Z.strength=function(Q){return arguments.length?(M=typeof Q=="function"?Q:c(+Q),K(),Z):M},Z.radius=function(Q){return arguments.length?(P=typeof Q=="function"?Q:c(+Q),K(),Z):P},Z.x=function(Q){return arguments.length?(T=+Q,Z):T},Z.y=function(Q){return arguments.length?(y=+Q,Z):y},Z}function F(P){var T=c(.1),y,S,M;typeof P!="function"&&(P=c(P==null?0:+P));function W(Z){for(var K=0,Q=y.length,J;K<Q;++K)J=y[K],J.vx+=(M[K]-J.x)*S[K]*Z}function $(){if(y){var Z,K=y.length;for(S=new Array(K),M=new Array(K),Z=0;Z<K;++Z)S[Z]=isNaN(M[Z]=+P(y[Z],Z,y))?0:+T(y[Z],Z,y)}}return W.initialize=function(Z){y=Z,$()},W.strength=function(Z){return arguments.length?(T=typeof Z=="function"?Z:c(+Z),$(),W):T},W.x=function(Z){return arguments.length?(P=typeof Z=="function"?Z:c(+Z),$(),W):P},W}function k(P){var T=c(.1),y,S,M;typeof P!="function"&&(P=c(P==null?0:+P));function W(Z){for(var K=0,Q=y.length,J;K<Q;++K)J=y[K],J.vy+=(M[K]-J.y)*S[K]*Z}function $(){if(y){var Z,K=y.length;for(S=new Array(K),M=new Array(K),Z=0;Z<K;++Z)S[Z]=isNaN(M[Z]=+P(y[Z],Z,y))?0:+T(y[Z],Z,y)}}return W.initialize=function(Z){y=Z,$()},W.strength=function(Z){return arguments.length?(T=typeof Z=="function"?Z:c(+Z),$(),W):T},W.y=function(Z){return arguments.length?(P=typeof Z=="function"?Z:c(+Z),$(),W):P},W}w.forceCenter=u,w.forceCollide=h,w.forceLink=x,w.forceManyBody=I,w.forceRadial=N,w.forceSimulation=C,w.forceX=F,w.forceY=k,Object.defineProperty(w,"__esModule",{value:!0})})}}),qtt=U({"node_modules/d3-path/dist/d3-path.js"(pe,le){(function(w,R){typeof pe=="object"&&typeof le<"u"?R(pe):(w=w||self,R(w.d3=w.d3||{}))})(pe,function(w){var R=Math.PI,O=2*R,z=1e-6,l=O-z;function u(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function c(){return new u}u.prototype=c.prototype={constructor:u,moveTo:function(p,f){this._+="M"+(this._x0=this._x1=+p)+","+(this._y0=this._y1=+f)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(p,f){this._+="L"+(this._x1=+p)+","+(this._y1=+f)},quadraticCurveTo:function(p,f,v,h){this._+="Q"+ +p+","+ +f+","+(this._x1=+v)+","+(this._y1=+h)},bezierCurveTo:function(p,f,v,h,m,_){this._+="C"+ +p+","+ +f+","+ +v+","+ +h+","+(this._x1=+m)+","+(this._y1=+_)},arcTo:function(p,f,v,h,m){p=+p,f=+f,v=+v,h=+h,m=+m;var _=this._x1,x=this._y1,A=v-p,E=h-f,D=_-p,g=x-f,C=D*D+g*g;if(m<0)throw new Error("negative radius: "+m);if(this._x1===null)this._+="M"+(this._x1=p)+","+(this._y1=f);else if(C>z)if(!(Math.abs(g*A-E*D)>z)||!m)this._+="L"+(this._x1=p)+","+(this._y1=f);else{var I=v-_,N=h-x,F=A*A+E*E,k=I*I+N*N,P=Math.sqrt(F),T=Math.sqrt(C),y=m*Math.tan((R-Math.acos((F+C-k)/(2*P*T)))/2),S=y/T,M=y/P;Math.abs(S-1)>z&&(this._+="L"+(p+S*D)+","+(f+S*g)),this._+="A"+m+","+m+",0,0,"+ +(g*I>D*N)+","+(this._x1=p+M*A)+","+(this._y1=f+M*E)}},arc:function(p,f,v,h,m,_){p=+p,f=+f,v=+v,_=!!_;var x=v*Math.cos(h),A=v*Math.sin(h),E=p+x,D=f+A,g=1^_,C=_?h-m:m-h;if(v<0)throw new Error("negative radius: "+v);this._x1===null?this._+="M"+E+","+D:(Math.abs(this._x1-E)>z||Math.abs(this._y1-D)>z)&&(this._+="L"+E+","+D),v&&(C<0&&(C=C%O+O),C>l?this._+="A"+v+","+v+",0,1,"+g+","+(p-x)+","+(f-A)+"A"+v+","+v+",0,1,"+g+","+(this._x1=E)+","+(this._y1=D):C>z&&(this._+="A"+v+","+v+",0,"+ +(C>=R)+","+g+","+(this._x1=p+v*Math.cos(m))+","+(this._y1=f+v*Math.sin(m))))},rect:function(p,f,v,h){this._+="M"+(this._x0=this._x1=+p)+","+(this._y0=this._y1=+f)+"h"+ +v+"v"+ +h+"h"+-v+"Z"},toString:function(){return this._}},w.path=c,Object.defineProperty(w,"__esModule",{value:!0})})}}),Hxe=U({"node_modules/d3-shape/dist/d3-shape.js"(pe,le){(function(w,R){typeof pe=="object"&&typeof le<"u"?R(pe,qtt()):(w=w||self,R(w.d3=w.d3||{},w.d3))})(pe,function(w,R){function O(wr){return function(){return wr}}var z=Math.abs,l=Math.atan2,u=Math.cos,c=Math.max,p=Math.min,f=Math.sin,v=Math.sqrt,h=1e-12,m=Math.PI,_=m/2,x=2*m;function A(wr){return wr>1?0:wr<-1?m:Math.acos(wr)}function E(wr){return wr>=1?_:wr<=-1?-_:Math.asin(wr)}function D(wr){return wr.innerRadius}function g(wr){return wr.outerRadius}function C(wr){return wr.startAngle}function I(wr){return wr.endAngle}function N(wr){return wr&&wr.padAngle}function F(wr,gn,Xn,Yi,ha,Ca,Ba,ji){var Ea=Xn-wr,cs=Yi-gn,No=Ba-ha,Vs=ji-Ca,pl=Vs*Ea-No*cs;if(!(pl*pl<h))return pl=(No*(gn-Ca)-Vs*(wr-ha))/pl,[wr+pl*Ea,gn+pl*cs]}function k(wr,gn,Xn,Yi,ha,Ca,Ba){var ji=wr-Xn,Ea=gn-Yi,cs=(Ba?Ca:-Ca)/v(ji*ji+Ea*Ea),No=cs*Ea,Vs=-cs*ji,pl=wr+No,kl=gn+Vs,El=Xn+No,iu=Yi+Vs,bu=(pl+El)/2,yl=(kl+iu)/2,ql=El-pl,rc=iu-kl,zc=ql*ql+rc*rc,Pf=ha-Ca,ju=pl*iu-El*kl,Ql=(rc<0?-1:1)*v(c(0,Pf*Pf*zc-ju*ju)),lu=(ju*rc-ql*Ql)/zc,dc=(-ju*ql-rc*Ql)/zc,wc=(ju*rc+ql*Ql)/zc,mc=(-ju*ql+rc*Ql)/zc,xu=lu-bu,qu=dc-yl,xf=wc-bu,ed=mc-yl;return xu*xu+qu*qu>xf*xf+ed*ed&&(lu=wc,dc=mc),{cx:lu,cy:dc,x01:-No,y01:-Vs,x11:lu*(ha/Pf-1),y11:dc*(ha/Pf-1)}}function P(){var wr=D,gn=g,Xn=O(0),Yi=null,ha=C,Ca=I,Ba=N,ji=null;function Ea(){var cs,No,Vs=+wr.apply(this,arguments),pl=+gn.apply(this,arguments),kl=ha.apply(this,arguments)-_,El=Ca.apply(this,arguments)-_,iu=z(El-kl),bu=El>kl;if(ji||(ji=cs=R.path()),pl<Vs&&(No=pl,pl=Vs,Vs=No),!(pl>h))ji.moveTo(0,0);else if(iu>x-h)ji.moveTo(pl*u(kl),pl*f(kl)),ji.arc(0,0,pl,kl,El,!bu),Vs>h&&(ji.moveTo(Vs*u(El),Vs*f(El)),ji.arc(0,0,Vs,El,kl,bu));else{var yl=kl,ql=El,rc=kl,zc=El,Pf=iu,ju=iu,Ql=Ba.apply(this,arguments)/2,lu=Ql>h&&(Yi?+Yi.apply(this,arguments):v(Vs*Vs+pl*pl)),dc=p(z(pl-Vs)/2,+Xn.apply(this,arguments)),wc=dc,mc=dc,xu,qu;if(lu>h){var xf=E(lu/Vs*f(Ql)),ed=E(lu/pl*f(Ql));(Pf-=xf*2)>h?(xf*=bu?1:-1,rc+=xf,zc-=xf):(Pf=0,rc=zc=(kl+El)/2),(ju-=ed*2)>h?(ed*=bu?1:-1,yl+=ed,ql-=ed):(ju=0,yl=ql=(kl+El)/2)}var Df=pl*u(yl),Sc=pl*f(yl),Qo=Vs*u(zc),Sl=Vs*f(zc);if(dc>h){var gd=pl*u(ql),$f=pl*f(ql),wu=Vs*u(rc),Ad=Vs*f(rc),Bc;if(iu<m&&(Bc=F(Df,Sc,wu,Ad,gd,$f,Qo,Sl))){var uf=Df-Bc[0],Cd=Sc-Bc[1],Tl=gd-Bc[0],Xu=$f-Bc[1],pu=1/f(A((uf*Tl+Cd*Xu)/(v(uf*uf+Cd*Cd)*v(Tl*Tl+Xu*Xu)))/2),Zc=v(Bc[0]*Bc[0]+Bc[1]*Bc[1]);wc=p(dc,(Vs-Zc)/(pu-1)),mc=p(dc,(pl-Zc)/(pu+1))}}ju>h?mc>h?(xu=k(wu,Ad,Df,Sc,pl,mc,bu),qu=k(gd,$f,Qo,Sl,pl,mc,bu),ji.moveTo(xu.cx+xu.x01,xu.cy+xu.y01),mc<dc?ji.arc(xu.cx,xu.cy,mc,l(xu.y01,xu.x01),l(qu.y01,qu.x01),!bu):(ji.arc(xu.cx,xu.cy,mc,l(xu.y01,xu.x01),l(xu.y11,xu.x11),!bu),ji.arc(0,0,pl,l(xu.cy+xu.y11,xu.cx+xu.x11),l(qu.cy+qu.y11,qu.cx+qu.x11),!bu),ji.arc(qu.cx,qu.cy,mc,l(qu.y11,qu.x11),l(qu.y01,qu.x01),!bu))):(ji.moveTo(Df,Sc),ji.arc(0,0,pl,yl,ql,!bu)):ji.moveTo(Df,Sc),!(Vs>h)||!(Pf>h)?ji.lineTo(Qo,Sl):wc>h?(xu=k(Qo,Sl,gd,$f,Vs,-wc,bu),qu=k(Df,Sc,wu,Ad,Vs,-wc,bu),ji.lineTo(xu.cx+xu.x01,xu.cy+xu.y01),wc<dc?ji.arc(xu.cx,xu.cy,wc,l(xu.y01,xu.x01),l(qu.y01,qu.x01),!bu):(ji.arc(xu.cx,xu.cy,wc,l(xu.y01,xu.x01),l(xu.y11,xu.x11),!bu),ji.arc(0,0,Vs,l(xu.cy+xu.y11,xu.cx+xu.x11),l(qu.cy+qu.y11,qu.cx+qu.x11),bu),ji.arc(qu.cx,qu.cy,wc,l(qu.y11,qu.x11),l(qu.y01,qu.x01),!bu))):ji.arc(0,0,Vs,zc,rc,bu)}if(ji.closePath(),cs)return ji=null,cs+""||null}return Ea.centroid=function(){var cs=(+wr.apply(this,arguments)+ +gn.apply(this,arguments))/2,No=(+ha.apply(this,arguments)+ +Ca.apply(this,arguments))/2-m/2;return[u(No)*cs,f(No)*cs]},Ea.innerRadius=function(cs){return arguments.length?(wr=typeof cs=="function"?cs:O(+cs),Ea):wr},Ea.outerRadius=function(cs){return arguments.length?(gn=typeof cs=="function"?cs:O(+cs),Ea):gn},Ea.cornerRadius=function(cs){return arguments.length?(Xn=typeof cs=="function"?cs:O(+cs),Ea):Xn},Ea.padRadius=function(cs){return arguments.length?(Yi=cs==null?null:typeof cs=="function"?cs:O(+cs),Ea):Yi},Ea.startAngle=function(cs){return arguments.length?(ha=typeof cs=="function"?cs:O(+cs),Ea):ha},Ea.endAngle=function(cs){return arguments.length?(Ca=typeof cs=="function"?cs:O(+cs),Ea):Ca},Ea.padAngle=function(cs){return arguments.length?(Ba=typeof cs=="function"?cs:O(+cs),Ea):Ba},Ea.context=function(cs){return arguments.length?(ji=cs??null,Ea):ji},Ea}function T(wr){this._context=wr}T.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(wr,gn){switch(wr=+wr,gn=+gn,this._point){case 0:this._point=1,this._line?this._context.lineTo(wr,gn):this._context.moveTo(wr,gn);break;case 1:this._point=2;default:this._context.lineTo(wr,gn);break}}};function y(wr){return new T(wr)}function S(wr){return wr[0]}function M(wr){return wr[1]}function W(){var wr=S,gn=M,Xn=O(!0),Yi=null,ha=y,Ca=null;function Ba(ji){var Ea,cs=ji.length,No,Vs=!1,pl;for(Yi==null&&(Ca=ha(pl=R.path())),Ea=0;Ea<=cs;++Ea)!(Ea<cs&&Xn(No=ji[Ea],Ea,ji))===Vs&&((Vs=!Vs)?Ca.lineStart():Ca.lineEnd()),Vs&&Ca.point(+wr(No,Ea,ji),+gn(No,Ea,ji));if(pl)return Ca=null,pl+""||null}return Ba.x=function(ji){return arguments.length?(wr=typeof ji=="function"?ji:O(+ji),Ba):wr},Ba.y=function(ji){return arguments.length?(gn=typeof ji=="function"?ji:O(+ji),Ba):gn},Ba.defined=function(ji){return arguments.length?(Xn=typeof ji=="function"?ji:O(!!ji),Ba):Xn},Ba.curve=function(ji){return arguments.length?(ha=ji,Yi!=null&&(Ca=ha(Yi)),Ba):ha},Ba.context=function(ji){return arguments.length?(ji==null?Yi=Ca=null:Ca=ha(Yi=ji),Ba):Yi},Ba}function $(){var wr=S,gn=null,Xn=O(0),Yi=M,ha=O(!0),Ca=null,Ba=y,ji=null;function Ea(No){var Vs,pl,kl,El=No.length,iu,bu=!1,yl,ql=new Array(El),rc=new Array(El);for(Ca==null&&(ji=Ba(yl=R.path())),Vs=0;Vs<=El;++Vs){if(!(Vs<El&&ha(iu=No[Vs],Vs,No))===bu)if(bu=!bu)pl=Vs,ji.areaStart(),ji.lineStart();else{for(ji.lineEnd(),ji.lineStart(),kl=Vs-1;kl>=pl;--kl)ji.point(ql[kl],rc[kl]);ji.lineEnd(),ji.areaEnd()}bu&&(ql[Vs]=+wr(iu,Vs,No),rc[Vs]=+Xn(iu,Vs,No),ji.point(gn?+gn(iu,Vs,No):ql[Vs],Yi?+Yi(iu,Vs,No):rc[Vs]))}if(yl)return ji=null,yl+""||null}function cs(){return W().defined(ha).curve(Ba).context(Ca)}return Ea.x=function(No){return arguments.length?(wr=typeof No=="function"?No:O(+No),gn=null,Ea):wr},Ea.x0=function(No){return arguments.length?(wr=typeof No=="function"?No:O(+No),Ea):wr},Ea.x1=function(No){return arguments.length?(gn=No==null?null:typeof No=="function"?No:O(+No),Ea):gn},Ea.y=function(No){return arguments.length?(Xn=typeof No=="function"?No:O(+No),Yi=null,Ea):Xn},Ea.y0=function(No){return arguments.length?(Xn=typeof No=="function"?No:O(+No),Ea):Xn},Ea.y1=function(No){return arguments.length?(Yi=No==null?null:typeof No=="function"?No:O(+No),Ea):Yi},Ea.lineX0=Ea.lineY0=function(){return cs().x(wr).y(Xn)},Ea.lineY1=function(){return cs().x(wr).y(Yi)},Ea.lineX1=function(){return cs().x(gn).y(Xn)},Ea.defined=function(No){return arguments.length?(ha=typeof No=="function"?No:O(!!No),Ea):ha},Ea.curve=function(No){return arguments.length?(Ba=No,Ca!=null&&(ji=Ba(Ca)),Ea):Ba},Ea.context=function(No){return arguments.length?(No==null?Ca=ji=null:ji=Ba(Ca=No),Ea):Ca},Ea}function Z(wr,gn){return gn<wr?-1:gn>wr?1:gn>=wr?0:NaN}function K(wr){return wr}function Q(){var wr=K,gn=Z,Xn=null,Yi=O(0),ha=O(x),Ca=O(0);function Ba(ji){var Ea,cs=ji.length,No,Vs,pl=0,kl=new Array(cs),El=new Array(cs),iu=+Yi.apply(this,arguments),bu=Math.min(x,Math.max(-x,ha.apply(this,arguments)-iu)),yl,ql=Math.min(Math.abs(bu)/cs,Ca.apply(this,arguments)),rc=ql*(bu<0?-1:1),zc;for(Ea=0;Ea<cs;++Ea)(zc=El[kl[Ea]=Ea]=+wr(ji[Ea],Ea,ji))>0&&(pl+=zc);for(gn!=null?kl.sort(function(Pf,ju){return gn(El[Pf],El[ju])}):Xn!=null&&kl.sort(function(Pf,ju){return Xn(ji[Pf],ji[ju])}),Ea=0,Vs=pl?(bu-cs*rc)/pl:0;Ea<cs;++Ea,iu=yl)No=kl[Ea],zc=El[No],yl=iu+(zc>0?zc*Vs:0)+rc,El[No]={data:ji[No],index:Ea,value:zc,startAngle:iu,endAngle:yl,padAngle:ql};return El}return Ba.value=function(ji){return arguments.length?(wr=typeof ji=="function"?ji:O(+ji),Ba):wr},Ba.sortValues=function(ji){return arguments.length?(gn=ji,Xn=null,Ba):gn},Ba.sort=function(ji){return arguments.length?(Xn=ji,gn=null,Ba):Xn},Ba.startAngle=function(ji){return arguments.length?(Yi=typeof ji=="function"?ji:O(+ji),Ba):Yi},Ba.endAngle=function(ji){return arguments.length?(ha=typeof ji=="function"?ji:O(+ji),Ba):ha},Ba.padAngle=function(ji){return arguments.length?(Ca=typeof ji=="function"?ji:O(+ji),Ba):Ca},Ba}var J=ee(y);function G(wr){this._curve=wr}G.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(wr,gn){this._curve.point(gn*Math.sin(wr),gn*-Math.cos(wr))}};function ee(wr){function gn(Xn){return new G(wr(Xn))}return gn._curve=wr,gn}function re(wr){var gn=wr.curve;return wr.angle=wr.x,delete wr.x,wr.radius=wr.y,delete wr.y,wr.curve=function(Xn){return arguments.length?gn(ee(Xn)):gn()._curve},wr}function fe(){return re(W().curve(J))}function we(){var wr=$().curve(J),gn=wr.curve,Xn=wr.lineX0,Yi=wr.lineX1,ha=wr.lineY0,Ca=wr.lineY1;return wr.angle=wr.x,delete wr.x,wr.startAngle=wr.x0,delete wr.x0,wr.endAngle=wr.x1,delete wr.x1,wr.radius=wr.y,delete wr.y,wr.innerRadius=wr.y0,delete wr.y0,wr.outerRadius=wr.y1,delete wr.y1,wr.lineStartAngle=function(){return re(Xn())},delete wr.lineX0,wr.lineEndAngle=function(){return re(Yi())},delete wr.lineX1,wr.lineInnerRadius=function(){return re(ha())},delete wr.lineY0,wr.lineOuterRadius=function(){return re(Ca())},delete wr.lineY1,wr.curve=function(Ba){return arguments.length?gn(ee(Ba)):gn()._curve},wr}function Oe(wr,gn){return[(gn=+gn)*Math.cos(wr-=Math.PI/2),gn*Math.sin(wr)]}var ke=Array.prototype.slice;function Le(wr){return wr.source}function oe(wr){return wr.target}function be(wr){var gn=Le,Xn=oe,Yi=S,ha=M,Ca=null;function Ba(){var ji,Ea=ke.call(arguments),cs=gn.apply(this,Ea),No=Xn.apply(this,Ea);if(Ca||(Ca=ji=R.path()),wr(Ca,+Yi.apply(this,(Ea[0]=cs,Ea)),+ha.apply(this,Ea),+Yi.apply(this,(Ea[0]=No,Ea)),+ha.apply(this,Ea)),ji)return Ca=null,ji+""||null}return Ba.source=function(ji){return arguments.length?(gn=ji,Ba):gn},Ba.target=function(ji){return arguments.length?(Xn=ji,Ba):Xn},Ba.x=function(ji){return arguments.length?(Yi=typeof ji=="function"?ji:O(+ji),Ba):Yi},Ba.y=function(ji){return arguments.length?(ha=typeof ji=="function"?ji:O(+ji),Ba):ha},Ba.context=function(ji){return arguments.length?(Ca=ji??null,Ba):Ca},Ba}function _e(wr,gn,Xn,Yi,ha){wr.moveTo(gn,Xn),wr.bezierCurveTo(gn=(gn+Yi)/2,Xn,gn,ha,Yi,ha)}function he(wr,gn,Xn,Yi,ha){wr.moveTo(gn,Xn),wr.bezierCurveTo(gn,Xn=(Xn+ha)/2,Yi,Xn,Yi,ha)}function De(wr,gn,Xn,Yi,ha){var Ca=Oe(gn,Xn),Ba=Oe(gn,Xn=(Xn+ha)/2),ji=Oe(Yi,Xn),Ea=Oe(Yi,ha);wr.moveTo(Ca[0],Ca[1]),wr.bezierCurveTo(Ba[0],Ba[1],ji[0],ji[1],Ea[0],Ea[1])}function xe(){return be(_e)}function se(){return be(he)}function Ee(){var wr=be(De);return wr.angle=wr.x,delete wr.x,wr.radius=wr.y,delete wr.y,wr}var Te={draw:function(wr,gn){var Xn=Math.sqrt(gn/m);wr.moveTo(Xn,0),wr.arc(0,0,Xn,0,x)}},Be={draw:function(wr,gn){var Xn=Math.sqrt(gn/5)/2;wr.moveTo(-3*Xn,-Xn),wr.lineTo(-Xn,-Xn),wr.lineTo(-Xn,-3*Xn),wr.lineTo(Xn,-3*Xn),wr.lineTo(Xn,-Xn),wr.lineTo(3*Xn,-Xn),wr.lineTo(3*Xn,Xn),wr.lineTo(Xn,Xn),wr.lineTo(Xn,3*Xn),wr.lineTo(-Xn,3*Xn),wr.lineTo(-Xn,Xn),wr.lineTo(-3*Xn,Xn),wr.closePath()}},tt=Math.sqrt(1/3),at=tt*2,gt={draw:function(wr,gn){var Xn=Math.sqrt(gn/at),Yi=Xn*tt;wr.moveTo(0,-Xn),wr.lineTo(Yi,0),wr.lineTo(0,Xn),wr.lineTo(-Yi,0),wr.closePath()}},pt=.8908130915292852,Rt=Math.sin(m/10)/Math.sin(7*m/10),$t=Math.sin(x/10)*Rt,Wt=-Math.cos(x/10)*Rt,Ht={draw:function(wr,gn){var Xn=Math.sqrt(gn*pt),Yi=$t*Xn,ha=Wt*Xn;wr.moveTo(0,-Xn),wr.lineTo(Yi,ha);for(var Ca=1;Ca<5;++Ca){var Ba=x*Ca/5,ji=Math.cos(Ba),Ea=Math.sin(Ba);wr.lineTo(Ea*Xn,-ji*Xn),wr.lineTo(ji*Yi-Ea*ha,Ea*Yi+ji*ha)}wr.closePath()}},Ft={draw:function(wr,gn){var Xn=Math.sqrt(gn),Yi=-Xn/2;wr.rect(Yi,Yi,Xn,Xn)}},st=Math.sqrt(3),rt={draw:function(wr,gn){var Xn=-Math.sqrt(gn/(st*3));wr.moveTo(0,Xn*2),wr.lineTo(-st*Xn,-Xn),wr.lineTo(st*Xn,-Xn),wr.closePath()}},Ue=-.5,xt=Math.sqrt(3)/2,Gt=1/Math.sqrt(12),Jt=(Gt/2+1)*3,Ut={draw:function(wr,gn){var Xn=Math.sqrt(gn/Jt),Yi=Xn/2,ha=Xn*Gt,Ca=Yi,Ba=Xn*Gt+Xn,ji=-Ca,Ea=Ba;wr.moveTo(Yi,ha),wr.lineTo(Ca,Ba),wr.lineTo(ji,Ea),wr.lineTo(Ue*Yi-xt*ha,xt*Yi+Ue*ha),wr.lineTo(Ue*Ca-xt*Ba,xt*Ca+Ue*Ba),wr.lineTo(Ue*ji-xt*Ea,xt*ji+Ue*Ea),wr.lineTo(Ue*Yi+xt*ha,Ue*ha-xt*Yi),wr.lineTo(Ue*Ca+xt*Ba,Ue*Ba-xt*Ca),wr.lineTo(Ue*ji+xt*Ea,Ue*Ea-xt*ji),wr.closePath()}},kr=[Te,Be,gt,Ft,Ht,rt,Ut];function Pr(){var wr=O(Te),gn=O(64),Xn=null;function Yi(){var ha;if(Xn||(Xn=ha=R.path()),wr.apply(this,arguments).draw(Xn,+gn.apply(this,arguments)),ha)return Xn=null,ha+""||null}return Yi.type=function(ha){return arguments.length?(wr=typeof ha=="function"?ha:O(ha),Yi):wr},Yi.size=function(ha){return arguments.length?(gn=typeof ha=="function"?ha:O(+ha),Yi):gn},Yi.context=function(ha){return arguments.length?(Xn=ha??null,Yi):Xn},Yi}function $r(){}function rn(wr,gn,Xn){wr._context.bezierCurveTo((2*wr._x0+wr._x1)/3,(2*wr._y0+wr._y1)/3,(wr._x0+2*wr._x1)/3,(wr._y0+2*wr._y1)/3,(wr._x0+4*wr._x1+gn)/6,(wr._y0+4*wr._y1+Xn)/6)}function kn(wr){this._context=wr}kn.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:rn(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(wr,gn){switch(wr=+wr,gn=+gn,this._point){case 0:this._point=1,this._line?this._context.lineTo(wr,gn):this._context.moveTo(wr,gn);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:rn(this,wr,gn);break}this._x0=this._x1,this._x1=wr,this._y0=this._y1,this._y1=gn}};function Rn(wr){return new kn(wr)}function ci(wr){this._context=wr}ci.prototype={areaStart:$r,areaEnd:$r,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(wr,gn){switch(wr=+wr,gn=+gn,this._point){case 0:this._point=1,this._x2=wr,this._y2=gn;break;case 1:this._point=2,this._x3=wr,this._y3=gn;break;case 2:this._point=3,this._x4=wr,this._y4=gn,this._context.moveTo((this._x0+4*this._x1+wr)/6,(this._y0+4*this._y1+gn)/6);break;default:rn(this,wr,gn);break}this._x0=this._x1,this._x1=wr,this._y0=this._y1,this._y1=gn}};function In(wr){return new ci(wr)}function Gn(wr){this._context=wr}Gn.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(wr,gn){switch(wr=+wr,gn=+gn,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var Xn=(this._x0+4*this._x1+wr)/6,Yi=(this._y0+4*this._y1+gn)/6;this._line?this._context.lineTo(Xn,Yi):this._context.moveTo(Xn,Yi);break;case 3:this._point=4;default:rn(this,wr,gn);break}this._x0=this._x1,this._x1=wr,this._y0=this._y1,this._y1=gn}};function mr(wr){return new Gn(wr)}function St(wr,gn){this._basis=new kn(wr),this._beta=gn}St.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var wr=this._x,gn=this._y,Xn=wr.length-1;if(Xn>0)for(var Yi=wr[0],ha=gn[0],Ca=wr[Xn]-Yi,Ba=gn[Xn]-ha,ji=-1,Ea;++ji<=Xn;)Ea=ji/Xn,this._basis.point(this._beta*wr[ji]+(1-this._beta)*(Yi+Ea*Ca),this._beta*gn[ji]+(1-this._beta)*(ha+Ea*Ba));this._x=this._y=null,this._basis.lineEnd()},point:function(wr,gn){this._x.push(+wr),this._y.push(+gn)}};var Ot=(function wr(gn){function Xn(Yi){return gn===1?new kn(Yi):new St(Yi,gn)}return Xn.beta=function(Yi){return wr(+Yi)},Xn})(.85);function Et(wr,gn,Xn){wr._context.bezierCurveTo(wr._x1+wr._k*(wr._x2-wr._x0),wr._y1+wr._k*(wr._y2-wr._y0),wr._x2+wr._k*(wr._x1-gn),wr._y2+wr._k*(wr._y1-Xn),wr._x2,wr._y2)}function je(wr,gn){this._context=wr,this._k=(1-gn)/6}je.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Et(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(wr,gn){switch(wr=+wr,gn=+gn,this._point){case 0:this._point=1,this._line?this._context.lineTo(wr,gn):this._context.moveTo(wr,gn);break;case 1:this._point=2,this._x1=wr,this._y1=gn;break;case 2:this._point=3;default:Et(this,wr,gn);break}this._x0=this._x1,this._x1=this._x2,this._x2=wr,this._y0=this._y1,this._y1=this._y2,this._y2=gn}};var Ye=(function wr(gn){function Xn(Yi){return new je(Yi,gn)}return Xn.tension=function(Yi){return wr(+Yi)},Xn})(0);function et(wr,gn){this._context=wr,this._k=(1-gn)/6}et.prototype={areaStart:$r,areaEnd:$r,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(wr,gn){switch(wr=+wr,gn=+gn,this._point){case 0:this._point=1,this._x3=wr,this._y3=gn;break;case 1:this._point=2,this._context.moveTo(this._x4=wr,this._y4=gn);break;case 2:this._point=3,this._x5=wr,this._y5=gn;break;default:Et(this,wr,gn);break}this._x0=this._x1,this._x1=this._x2,this._x2=wr,this._y0=this._y1,this._y1=this._y2,this._y2=gn}};var mt=(function wr(gn){function Xn(Yi){return new et(Yi,gn)}return Xn.tension=function(Yi){return wr(+Yi)},Xn})(0);function Nt(wr,gn){this._context=wr,this._k=(1-gn)/6}Nt.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(wr,gn){switch(wr=+wr,gn=+gn,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:Et(this,wr,gn);break}this._x0=this._x1,this._x1=this._x2,this._x2=wr,this._y0=this._y1,this._y1=this._y2,this._y2=gn}};var lr=(function wr(gn){function Xn(Yi){return new Nt(Yi,gn)}return Xn.tension=function(Yi){return wr(+Yi)},Xn})(0);function br(wr,gn,Xn){var Yi=wr._x1,ha=wr._y1,Ca=wr._x2,Ba=wr._y2;if(wr._l01_a>h){var ji=2*wr._l01_2a+3*wr._l01_a*wr._l12_a+wr._l12_2a,Ea=3*wr._l01_a*(wr._l01_a+wr._l12_a);Yi=(Yi*ji-wr._x0*wr._l12_2a+wr._x2*wr._l01_2a)/Ea,ha=(ha*ji-wr._y0*wr._l12_2a+wr._y2*wr._l01_2a)/Ea}if(wr._l23_a>h){var cs=2*wr._l23_2a+3*wr._l23_a*wr._l12_a+wr._l12_2a,No=3*wr._l23_a*(wr._l23_a+wr._l12_a);Ca=(Ca*cs+wr._x1*wr._l23_2a-gn*wr._l12_2a)/No,Ba=(Ba*cs+wr._y1*wr._l23_2a-Xn*wr._l12_2a)/No}wr._context.bezierCurveTo(Yi,ha,Ca,Ba,wr._x2,wr._y2)}function Or(wr,gn){this._context=wr,this._alpha=gn}Or.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(wr,gn){if(wr=+wr,gn=+gn,this._point){var Xn=this._x2-wr,Yi=this._y2-gn;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Xn*Xn+Yi*Yi,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(wr,gn):this._context.moveTo(wr,gn);break;case 1:this._point=2;break;case 2:this._point=3;default:br(this,wr,gn);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=wr,this._y0=this._y1,this._y1=this._y2,this._y2=gn}};var tn=(function wr(gn){function Xn(Yi){return gn?new Or(Yi,gn):new je(Yi,0)}return Xn.alpha=function(Yi){return wr(+Yi)},Xn})(.5);function Jr(wr,gn){this._context=wr,this._alpha=gn}Jr.prototype={areaStart:$r,areaEnd:$r,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(wr,gn){if(wr=+wr,gn=+gn,this._point){var Xn=this._x2-wr,Yi=this._y2-gn;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Xn*Xn+Yi*Yi,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=wr,this._y3=gn;break;case 1:this._point=2,this._context.moveTo(this._x4=wr,this._y4=gn);break;case 2:this._point=3,this._x5=wr,this._y5=gn;break;default:br(this,wr,gn);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=wr,this._y0=this._y1,this._y1=this._y2,this._y2=gn}};var dn=(function wr(gn){function Xn(Yi){return gn?new Jr(Yi,gn):new et(Yi,0)}return Xn.alpha=function(Yi){return wr(+Yi)},Xn})(.5);function on(wr,gn){this._context=wr,this._alpha=gn}on.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(wr,gn){if(wr=+wr,gn=+gn,this._point){var Xn=this._x2-wr,Yi=this._y2-gn;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Xn*Xn+Yi*Yi,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:br(this,wr,gn);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=wr,this._y0=this._y1,this._y1=this._y2,this._y2=gn}};var Nn=(function wr(gn){function Xn(Yi){return gn?new on(Yi,gn):new Nt(Yi,0)}return Xn.alpha=function(Yi){return wr(+Yi)},Xn})(.5);function Wi(wr){this._context=wr}Wi.prototype={areaStart:$r,areaEnd:$r,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(wr,gn){wr=+wr,gn=+gn,this._point?this._context.lineTo(wr,gn):(this._point=1,this._context.moveTo(wr,gn))}};function Oa(wr){return new Wi(wr)}function Da(wr){return wr<0?-1:1}function Aa(wr,gn,Xn){var Yi=wr._x1-wr._x0,ha=gn-wr._x1,Ca=(wr._y1-wr._y0)/(Yi||ha<0&&-0),Ba=(Xn-wr._y1)/(ha||Yi<0&&-0),ji=(Ca*ha+Ba*Yi)/(Yi+ha);return(Da(Ca)+Da(Ba))*Math.min(Math.abs(Ca),Math.abs(Ba),.5*Math.abs(ji))||0}function Ka(wr,gn){var Xn=wr._x1-wr._x0;return Xn?(3*(wr._y1-wr._y0)/Xn-gn)/2:gn}function Sa(wr,gn,Xn){var Yi=wr._x0,ha=wr._y0,Ca=wr._x1,Ba=wr._y1,ji=(Ca-Yi)/3;wr._context.bezierCurveTo(Yi+ji,ha+ji*gn,Ca-ji,Ba-ji*Xn,Ca,Ba)}function no(wr){this._context=wr}no.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:Sa(this,this._t0,Ka(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(wr,gn){var Xn=NaN;if(wr=+wr,gn=+gn,!(wr===this._x1&&gn===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(wr,gn):this._context.moveTo(wr,gn);break;case 1:this._point=2;break;case 2:this._point=3,Sa(this,Ka(this,Xn=Aa(this,wr,gn)),Xn);break;default:Sa(this,this._t0,Xn=Aa(this,wr,gn));break}this._x0=this._x1,this._x1=wr,this._y0=this._y1,this._y1=gn,this._t0=Xn}}};function Fo(wr){this._context=new an(wr)}(Fo.prototype=Object.create(no.prototype)).point=function(wr,gn){no.prototype.point.call(this,gn,wr)};function an(wr){this._context=wr}an.prototype={moveTo:function(wr,gn){this._context.moveTo(gn,wr)},closePath:function(){this._context.closePath()},lineTo:function(wr,gn){this._context.lineTo(gn,wr)},bezierCurveTo:function(wr,gn,Xn,Yi,ha,Ca){this._context.bezierCurveTo(gn,wr,Yi,Xn,Ca,ha)}};function Hr(wr){return new no(wr)}function nn(wr){return new Fo(wr)}function Kr(wr){this._context=wr}Kr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var wr=this._x,gn=this._y,Xn=wr.length;if(Xn)if(this._line?this._context.lineTo(wr[0],gn[0]):this._context.moveTo(wr[0],gn[0]),Xn===2)this._context.lineTo(wr[1],gn[1]);else for(var Yi=$n(wr),ha=$n(gn),Ca=0,Ba=1;Ba<Xn;++Ca,++Ba)this._context.bezierCurveTo(Yi[0][Ca],ha[0][Ca],Yi[1][Ca],ha[1][Ca],wr[Ba],gn[Ba]);(this._line||this._line!==0&&Xn===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(wr,gn){this._x.push(+wr),this._y.push(+gn)}};function $n(wr){var gn,Xn=wr.length-1,Yi,ha=new Array(Xn),Ca=new Array(Xn),Ba=new Array(Xn);for(ha[0]=0,Ca[0]=2,Ba[0]=wr[0]+2*wr[1],gn=1;gn<Xn-1;++gn)ha[gn]=1,Ca[gn]=4,Ba[gn]=4*wr[gn]+2*wr[gn+1];for(ha[Xn-1]=2,Ca[Xn-1]=7,Ba[Xn-1]=8*wr[Xn-1]+wr[Xn],gn=1;gn<Xn;++gn)Yi=ha[gn]/Ca[gn-1],Ca[gn]-=Yi,Ba[gn]-=Yi*Ba[gn-1];for(ha[Xn-1]=Ba[Xn-1]/Ca[Xn-1],gn=Xn-2;gn>=0;--gn)ha[gn]=(Ba[gn]-ha[gn+1])/Ca[gn];for(Ca[Xn-1]=(wr[Xn]+ha[Xn-1])/2,gn=0;gn<Xn-1;++gn)Ca[gn]=2*wr[gn+1]-ha[gn+1];return[ha,Ca]}function Ai(wr){return new Kr(wr)}function aa(wr,gn){this._context=wr,this._t=gn}aa.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(wr,gn){switch(wr=+wr,gn=+gn,this._point){case 0:this._point=1,this._line?this._context.lineTo(wr,gn):this._context.moveTo(wr,gn);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,gn),this._context.lineTo(wr,gn);else{var Xn=this._x*(1-this._t)+wr*this._t;this._context.lineTo(Xn,this._y),this._context.lineTo(Xn,gn)}break}}this._x=wr,this._y=gn}};function Ci(wr){return new aa(wr,.5)}function Ta(wr){return new aa(wr,0)}function Na(wr){return new aa(wr,1)}function ro(wr,gn){if((Ba=wr.length)>1)for(var Xn=1,Yi,ha,Ca=wr[gn[0]],Ba,ji=Ca.length;Xn<Ba;++Xn)for(ha=Ca,Ca=wr[gn[Xn]],Yi=0;Yi<ji;++Yi)Ca[Yi][1]+=Ca[Yi][0]=isNaN(ha[Yi][1])?ha[Yi][0]:ha[Yi][1]}function oo(wr){for(var gn=wr.length,Xn=new Array(gn);--gn>=0;)Xn[gn]=gn;return Xn}function xo(wr,gn){return wr[gn]}function vr(){var wr=O([]),gn=oo,Xn=ro,Yi=xo;function ha(Ca){var Ba=wr.apply(this,arguments),ji,Ea=Ca.length,cs=Ba.length,No=new Array(cs),Vs;for(ji=0;ji<cs;++ji){for(var pl=Ba[ji],kl=No[ji]=new Array(Ea),El=0,iu;El<Ea;++El)kl[El]=iu=[0,+Yi(Ca[El],pl,El,Ca)],iu.data=Ca[El];kl.key=pl}for(ji=0,Vs=gn(No);ji<cs;++ji)No[Vs[ji]].index=ji;return Xn(No,Vs),No}return ha.keys=function(Ca){return arguments.length?(wr=typeof Ca=="function"?Ca:O(ke.call(Ca)),ha):wr},ha.value=function(Ca){return arguments.length?(Yi=typeof Ca=="function"?Ca:O(+Ca),ha):Yi},ha.order=function(Ca){return arguments.length?(gn=Ca==null?oo:typeof Ca=="function"?Ca:O(ke.call(Ca)),ha):gn},ha.offset=function(Ca){return arguments.length?(Xn=Ca??ro,ha):Xn},ha}function er(wr,gn){if((Yi=wr.length)>0){for(var Xn,Yi,ha=0,Ca=wr[0].length,Ba;ha<Ca;++ha){for(Ba=Xn=0;Xn<Yi;++Xn)Ba+=wr[Xn][ha][1]||0;if(Ba)for(Xn=0;Xn<Yi;++Xn)wr[Xn][ha][1]/=Ba}ro(wr,gn)}}function si(wr,gn){if((Ea=wr.length)>0)for(var Xn,Yi=0,ha,Ca,Ba,ji,Ea,cs=wr[gn[0]].length;Yi<cs;++Yi)for(Ba=ji=0,Xn=0;Xn<Ea;++Xn)(Ca=(ha=wr[gn[Xn]][Yi])[1]-ha[0])>0?(ha[0]=Ba,ha[1]=Ba+=Ca):Ca<0?(ha[1]=ji,ha[0]=ji+=Ca):(ha[0]=0,ha[1]=Ca)}function ei(wr,gn){if((ha=wr.length)>0){for(var Xn=0,Yi=wr[gn[0]],ha,Ca=Yi.length;Xn<Ca;++Xn){for(var Ba=0,ji=0;Ba<ha;++Ba)ji+=wr[Ba][Xn][1]||0;Yi[Xn][1]+=Yi[Xn][0]=-ji/2}ro(wr,gn)}}function Kn(wr,gn){if(!(!((Ba=wr.length)>0)||!((Ca=(ha=wr[gn[0]]).length)>0))){for(var Xn=0,Yi=1,ha,Ca,Ba;Yi<Ca;++Yi){for(var ji=0,Ea=0,cs=0;ji<Ba;++ji){for(var No=wr[gn[ji]],Vs=No[Yi][1]||0,pl=No[Yi-1][1]||0,kl=(Vs-pl)/2,El=0;El<ji;++El){var iu=wr[gn[El]],bu=iu[Yi][1]||0,yl=iu[Yi-1][1]||0;kl+=bu-yl}Ea+=Vs,cs+=kl*Vs}ha[Yi-1][1]+=ha[Yi-1][0]=Xn,Ea&&(Xn-=cs/Ea)}ha[Yi-1][1]+=ha[Yi-1][0]=Xn,ro(wr,gn)}}function qn(wr){var gn=wr.map(pi);return oo(wr).sort(function(Xn,Yi){return gn[Xn]-gn[Yi]})}function pi(wr){for(var gn=-1,Xn=0,Yi=wr.length,ha,Ca=-1/0;++gn<Yi;)(ha=+wr[gn][1])>Ca&&(Ca=ha,Xn=gn);return Xn}function _i(wr){var gn=wr.map(fi);return oo(wr).sort(function(Xn,Yi){return gn[Xn]-gn[Yi]})}function fi(wr){for(var gn=0,Xn=-1,Yi=wr.length,ha;++Xn<Yi;)(ha=+wr[Xn][1])&&(gn+=ha);return gn}function Ri(wr){return _i(wr).reverse()}function $i(wr){var gn=wr.length,Xn,Yi,ha=wr.map(fi),Ca=qn(wr),Ba=0,ji=0,Ea=[],cs=[];for(Xn=0;Xn<gn;++Xn)Yi=Ca[Xn],Ba<ji?(Ba+=ha[Yi],Ea.push(Yi)):(ji+=ha[Yi],cs.push(Yi));return cs.reverse().concat(Ea)}function Hi(wr){return oo(wr).reverse()}w.arc=P,w.area=$,w.areaRadial=we,w.curveBasis=Rn,w.curveBasisClosed=In,w.curveBasisOpen=mr,w.curveBundle=Ot,w.curveCardinal=Ye,w.curveCardinalClosed=mt,w.curveCardinalOpen=lr,w.curveCatmullRom=tn,w.curveCatmullRomClosed=dn,w.curveCatmullRomOpen=Nn,w.curveLinear=y,w.curveLinearClosed=Oa,w.curveMonotoneX=Hr,w.curveMonotoneY=nn,w.curveNatural=Ai,w.curveStep=Ci,w.curveStepAfter=Na,w.curveStepBefore=Ta,w.line=W,w.lineRadial=fe,w.linkHorizontal=xe,w.linkRadial=Ee,w.linkVertical=se,w.pie=Q,w.pointRadial=Oe,w.radialArea=we,w.radialLine=fe,w.stack=vr,w.stackOffsetDiverging=si,w.stackOffsetExpand=er,w.stackOffsetNone=ro,w.stackOffsetSilhouette=ei,w.stackOffsetWiggle=Kn,w.stackOrderAppearance=qn,w.stackOrderAscending=_i,w.stackOrderDescending=Ri,w.stackOrderInsideOut=$i,w.stackOrderNone=oo,w.stackOrderReverse=Hi,w.symbol=Pr,w.symbolCircle=Te,w.symbolCross=Be,w.symbolDiamond=gt,w.symbolSquare=Ft,w.symbolStar=Ht,w.symbolTriangle=rt,w.symbolWye=Ut,w.symbols=kr,Object.defineProperty(w,"__esModule",{value:!0})})}}),Gtt=U({"node_modules/@plotly/d3-sankey/build/d3-sankey.js"(pe,le){(function(w,R){typeof pe=="object"&&typeof le<"u"?R(pe,UU(),AK(),Hxe()):R(w.d3=w.d3||{},w.d3,w.d3,w.d3)})(pe,function(w,R,O,z){function l(y){return y.target.depth}function u(y){return y.depth}function c(y,S){return S-1-y.height}function p(y,S){return y.sourceLinks.length?y.depth:S-1}function f(y){return y.targetLinks.length?y.depth:y.sourceLinks.length?R.min(y.sourceLinks,l)-1:0}function v(y){return function(){return y}}function h(y,S){return _(y.source,S.source)||y.index-S.index}function m(y,S){return _(y.target,S.target)||y.index-S.index}function _(y,S){return y.y0-S.y0}function x(y){return y.value}function A(y){return(y.y0+y.y1)/2}function E(y){return A(y.source)*y.value}function D(y){return A(y.target)*y.value}function g(y){return y.index}function C(y){return y.nodes}function I(y){return y.links}function N(y,S){var M=y.get(S);if(!M)throw new Error("missing: "+S);return M}var F=function(){var y=0,S=0,M=1,W=1,$=24,Z=8,K=g,Q=p,J=C,G=I,ee=32,re=2/3;function fe(){var be={nodes:J.apply(null,arguments),links:G.apply(null,arguments)};return we(be),Oe(be),ke(be),Le(be),oe(be),be}fe.update=function(be){return oe(be),be},fe.nodeId=function(be){return arguments.length?(K=typeof be=="function"?be:v(be),fe):K},fe.nodeAlign=function(be){return arguments.length?(Q=typeof be=="function"?be:v(be),fe):Q},fe.nodeWidth=function(be){return arguments.length?($=+be,fe):$},fe.nodePadding=function(be){return arguments.length?(Z=+be,fe):Z},fe.nodes=function(be){return arguments.length?(J=typeof be=="function"?be:v(be),fe):J},fe.links=function(be){return arguments.length?(G=typeof be=="function"?be:v(be),fe):G},fe.size=function(be){return arguments.length?(y=S=0,M=+be[0],W=+be[1],fe):[M-y,W-S]},fe.extent=function(be){return arguments.length?(y=+be[0][0],M=+be[1][0],S=+be[0][1],W=+be[1][1],fe):[[y,S],[M,W]]},fe.iterations=function(be){return arguments.length?(ee=+be,fe):ee};function we(be){be.nodes.forEach(function(he,De){he.index=De,he.sourceLinks=[],he.targetLinks=[]});var _e=O.map(be.nodes,K);be.links.forEach(function(he,De){he.index=De;var xe=he.source,se=he.target;typeof xe!="object"&&(xe=he.source=N(_e,xe)),typeof se!="object"&&(se=he.target=N(_e,se)),xe.sourceLinks.push(he),se.targetLinks.push(he)})}function Oe(be){be.nodes.forEach(function(_e){_e.value=Math.max(R.sum(_e.sourceLinks,x),R.sum(_e.targetLinks,x))})}function ke(be){var _e,he,De;for(_e=be.nodes,he=[],De=0;_e.length;++De,_e=he,he=[])_e.forEach(function(se){se.depth=De,se.sourceLinks.forEach(function(Ee){he.indexOf(Ee.target)<0&&he.push(Ee.target)})});for(_e=be.nodes,he=[],De=0;_e.length;++De,_e=he,he=[])_e.forEach(function(se){se.height=De,se.targetLinks.forEach(function(Ee){he.indexOf(Ee.source)<0&&he.push(Ee.source)})});var xe=(M-y-$)/(De-1);be.nodes.forEach(function(se){se.x1=(se.x0=y+Math.max(0,Math.min(De-1,Math.floor(Q.call(null,se,De))))*xe)+$})}function Le(be){var _e=O.nest().key(function(Be){return Be.x0}).sortKeys(R.ascending).entries(be.nodes).map(function(Be){return Be.values});xe(),Te();for(var he=1,De=ee;De>0;--De)Ee(he*=.99),Te(),se(he),Te();function xe(){var Be=R.max(_e,function(gt){return gt.length}),tt=re*(W-S)/(Be-1);Z>tt&&(Z=tt);var at=R.min(_e,function(gt){return(W-S-(gt.length-1)*Z)/R.sum(gt,x)});_e.forEach(function(gt){gt.forEach(function(pt,Rt){pt.y1=(pt.y0=Rt)+pt.value*at})}),be.links.forEach(function(gt){gt.width=gt.value*at})}function se(Be){_e.forEach(function(tt){tt.forEach(function(at){if(at.targetLinks.length){var gt=(R.sum(at.targetLinks,E)/R.sum(at.targetLinks,x)-A(at))*Be;at.y0+=gt,at.y1+=gt}})})}function Ee(Be){_e.slice().reverse().forEach(function(tt){tt.forEach(function(at){if(at.sourceLinks.length){var gt=(R.sum(at.sourceLinks,D)/R.sum(at.sourceLinks,x)-A(at))*Be;at.y0+=gt,at.y1+=gt}})})}function Te(){_e.forEach(function(Be){var tt,at,gt=S,pt=Be.length,Rt;for(Be.sort(_),Rt=0;Rt<pt;++Rt)tt=Be[Rt],at=gt-tt.y0,at>0&&(tt.y0+=at,tt.y1+=at),gt=tt.y1+Z;if(at=gt-Z-W,at>0)for(gt=tt.y0-=at,tt.y1-=at,Rt=pt-2;Rt>=0;--Rt)tt=Be[Rt],at=tt.y1+Z-gt,at>0&&(tt.y0-=at,tt.y1-=at),gt=tt.y0})}}function oe(be){be.nodes.forEach(function(_e){_e.sourceLinks.sort(m),_e.targetLinks.sort(h)}),be.nodes.forEach(function(_e){var he=_e.y0,De=he;_e.sourceLinks.forEach(function(xe){xe.y0=he+xe.width/2,he+=xe.width}),_e.targetLinks.forEach(function(xe){xe.y1=De+xe.width/2,De+=xe.width})})}return fe};function k(y){return[y.source.x1,y.y0]}function P(y){return[y.target.x0,y.y1]}var T=function(){return z.linkHorizontal().source(k).target(P)};w.sankey=F,w.sankeyCenter=f,w.sankeyLeft=u,w.sankeyRight=c,w.sankeyJustify=p,w.sankeyLinkHorizontal=T,Object.defineProperty(w,"__esModule",{value:!0})})}}),$tt=U({"node_modules/elementary-circuits-directed-graph/johnson.js"(pe,le){var w=Uxe();le.exports=function(O,z){var l=[],u=[],c=[],p={},f=[],v;function h(N){c[N]=!1,p.hasOwnProperty(N)&&Object.keys(p[N]).forEach(function(F){delete p[N][F],c[F]&&h(F)})}function m(N){var F=!1;u.push(N),c[N]=!0;var k,P;for(k=0;k<f[N].length;k++)P=f[N][k],P===v?(_(v,u),F=!0):c[P]||(F=m(P));if(F)h(N);else for(k=0;k<f[N].length;k++){P=f[N][k];var T=p[P];T||(T={},p[P]=T),T[P]=!0}return u.pop(),F}function _(N,F){var k=[].concat(F).concat(N);z?z(m):l.push(k)}function x(N){for(var F=0;F<O.length;F++)F<N&&(O[F]=[]),O[F]=O[F].filter(function(k){return k>=N})}function A(N){x(N);for(var F=O,k=w(F),P=k.components.filter(function(Z){return Z.length>1}),T=1/0,y,S=0;S<P.length;S++)for(var M=0;M<P[S].length;M++)P[S][M]<T&&(T=P[S][M],y=S);var W=P[y];if(!W)return!1;var $=O.map(function(Z,K){return W.indexOf(K)===-1?[]:Z.filter(function(Q){return W.indexOf(Q)!==-1})});return{leastVertex:T,adjList:$}}v=0;for(var E=O.length;v<E;){var D=A(v);if(v=D.leastVertex,f=D.adjList,f){for(var g=0;g<f.length;g++)for(var C=0;C<f[g].length;C++){var I=f[g][C];c[+I]=!1,p[I]={}}m(v),v=v+1}else v=E}if(!z)return l}}}),Wtt=U({"node_modules/@plotly/d3-sankey-circular/dist/d3-sankey-circular.js"(pe,le){(function(w,R){typeof pe=="object"&&typeof le<"u"?R(pe,UU(),AK(),Hxe(),$tt()):R(w.d3=w.d3||{},w.d3,w.d3,w.d3,null)})(pe,function(w,R,O,z,l){l=l&&l.hasOwnProperty("default")?l.default:l;function u(pt){return pt.target.depth}function c(pt){return pt.depth}function p(pt,Rt){return Rt-1-pt.height}function f(pt,Rt){return pt.sourceLinks.length?pt.depth:Rt-1}function v(pt){return pt.targetLinks.length?pt.depth:pt.sourceLinks.length?R.min(pt.sourceLinks,u)-1:0}function h(pt){return function(){return pt}}var m=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(pt){return typeof pt}:function(pt){return pt&&typeof Symbol=="function"&&pt.constructor===Symbol&&pt!==Symbol.prototype?"symbol":typeof pt};function _(pt,Rt){return A(pt.source,Rt.source)||pt.index-Rt.index}function x(pt,Rt){return A(pt.target,Rt.target)||pt.index-Rt.index}function A(pt,Rt){return pt.partOfCycle===Rt.partOfCycle?pt.y0-Rt.y0:pt.circularLinkType==="top"||Rt.circularLinkType==="bottom"?-1:1}function E(pt){return pt.value}function D(pt){return(pt.y0+pt.y1)/2}function g(pt){return D(pt.source)}function C(pt){return D(pt.target)}function I(pt){return pt.index}function N(pt){return pt.nodes}function F(pt){return pt.links}function k(pt,Rt){var $t=pt.get(Rt);if(!$t)throw new Error("missing: "+Rt);return $t}function P(pt,Rt){return Rt(pt)}var T=25,y=10,S=.3;function M(){var pt=0,Rt=0,$t=1,Wt=1,Ht=24,Ft,st=I,rt=f,Ue=N,xt=F,Gt=32,Jt=2,Ut,kr=null;function Pr(){var mr={nodes:Ue.apply(null,arguments),links:xt.apply(null,arguments)};$r(mr),W(mr,st,kr),rn(mr),ci(mr),$(mr,st),In(mr,Gt,st),Gn(mr);for(var St=4,Ot=0;Ot<St;Ot++)Ee(mr,Wt,st),Te(mr,Wt,st),De(mr,Rt,Wt,st),Ee(mr,Wt,st),Te(mr,Wt,st);return gt(mr,Rt,Wt),ee(mr,Jt,Wt,st),mr}Pr.nodeId=function(mr){return arguments.length?(st=typeof mr=="function"?mr:h(mr),Pr):st},Pr.nodeAlign=function(mr){return arguments.length?(rt=typeof mr=="function"?mr:h(mr),Pr):rt},Pr.nodeWidth=function(mr){return arguments.length?(Ht=+mr,Pr):Ht},Pr.nodePadding=function(mr){return arguments.length?(Ft=+mr,Pr):Ft},Pr.nodes=function(mr){return arguments.length?(Ue=typeof mr=="function"?mr:h(mr),Pr):Ue},Pr.links=function(mr){return arguments.length?(xt=typeof mr=="function"?mr:h(mr),Pr):xt},Pr.size=function(mr){return arguments.length?(pt=Rt=0,$t=+mr[0],Wt=+mr[1],Pr):[$t-pt,Wt-Rt]},Pr.extent=function(mr){return arguments.length?(pt=+mr[0][0],$t=+mr[1][0],Rt=+mr[0][1],Wt=+mr[1][1],Pr):[[pt,Rt],[$t,Wt]]},Pr.iterations=function(mr){return arguments.length?(Gt=+mr,Pr):Gt},Pr.circularLinkGap=function(mr){return arguments.length?(Jt=+mr,Pr):Jt},Pr.nodePaddingRatio=function(mr){return arguments.length?(Ut=+mr,Pr):Ut},Pr.sortNodes=function(mr){return arguments.length?(kr=mr,Pr):kr},Pr.update=function(mr){return $(mr,st),Gn(mr),mr.links.forEach(function(St){St.circular&&(St.circularLinkType=St.y0+St.y1<Wt?"top":"bottom",St.source.circularLinkType=St.circularLinkType,St.target.circularLinkType=St.circularLinkType)}),Ee(mr,Wt,st,!1),Te(mr,Wt,st),ee(mr,Jt,Wt,st),mr};function $r(mr){mr.nodes.forEach(function(Ot,Et){Ot.index=Et,Ot.sourceLinks=[],Ot.targetLinks=[]});var St=O.map(mr.nodes,st);return mr.links.forEach(function(Ot,Et){Ot.index=Et;var je=Ot.source,Ye=Ot.target;(typeof je>"u"?"undefined":m(je))!=="object"&&(je=Ot.source=k(St,je)),(typeof Ye>"u"?"undefined":m(Ye))!=="object"&&(Ye=Ot.target=k(St,Ye)),je.sourceLinks.push(Ot),Ye.targetLinks.push(Ot)}),mr}function rn(mr){mr.nodes.forEach(function(St){St.partOfCycle=!1,St.value=Math.max(R.sum(St.sourceLinks,E),R.sum(St.targetLinks,E)),St.sourceLinks.forEach(function(Ot){Ot.circular&&(St.partOfCycle=!0,St.circularLinkType=Ot.circularLinkType)}),St.targetLinks.forEach(function(Ot){Ot.circular&&(St.partOfCycle=!0,St.circularLinkType=Ot.circularLinkType)})})}function kn(mr){var St=0,Ot=0,Et=0,je=0,Ye=R.max(mr.nodes,function(et){return et.column});return mr.links.forEach(function(et){et.circular&&(et.circularLinkType=="top"?St=St+et.width:Ot=Ot+et.width,et.target.column==0&&(je=je+et.width),et.source.column==Ye&&(Et=Et+et.width))}),St=St>0?St+T+y:St,Ot=Ot>0?Ot+T+y:Ot,Et=Et>0?Et+T+y:Et,je=je>0?je+T+y:je,{top:St,bottom:Ot,left:je,right:Et}}function Rn(mr,St){var Ot=R.max(mr.nodes,function(lr){return lr.column}),Et=$t-pt,je=Wt-Rt,Ye=Et+St.right+St.left,et=je+St.top+St.bottom,mt=Et/Ye,Nt=je/et;return pt=pt*mt+St.left,$t=St.right==0?$t:$t*mt,Rt=Rt*Nt+St.top,Wt=Wt*Nt,mr.nodes.forEach(function(lr){lr.x0=pt+lr.column*(($t-pt-Ht)/Ot),lr.x1=lr.x0+Ht}),Nt}function ci(mr){var St,Ot,Et;for(St=mr.nodes,Ot=[],Et=0;St.length;++Et,St=Ot,Ot=[])St.forEach(function(je){je.depth=Et,je.sourceLinks.forEach(function(Ye){Ot.indexOf(Ye.target)<0&&!Ye.circular&&Ot.push(Ye.target)})});for(St=mr.nodes,Ot=[],Et=0;St.length;++Et,St=Ot,Ot=[])St.forEach(function(je){je.height=Et,je.targetLinks.forEach(function(Ye){Ot.indexOf(Ye.source)<0&&!Ye.circular&&Ot.push(Ye.source)})});mr.nodes.forEach(function(je){je.column=Math.floor(rt.call(null,je,Et))})}function In(mr,St,Ot){var Et=O.nest().key(function(lr){return lr.column}).sortKeys(R.ascending).entries(mr.nodes).map(function(lr){return lr.values});et(Ot),Nt();for(var je=1,Ye=St;Ye>0;--Ye)mt(je*=.99,Ot),Nt();function et(lr){if(Ut){var br=1/0;Et.forEach(function(dn){var on=Wt*Ut/(dn.length+1);br=on<br?on:br}),Ft=br}var Or=R.min(Et,function(dn){return(Wt-Rt-(dn.length-1)*Ft)/R.sum(dn,E)});Or=Or*S,mr.links.forEach(function(dn){dn.width=dn.value*Or});var tn=kn(mr),Jr=Rn(mr,tn);Or=Or*Jr,mr.links.forEach(function(dn){dn.width=dn.value*Or}),Et.forEach(function(dn){var on=dn.length;dn.forEach(function(Nn,Wi){Nn.depth==Et.length-1&&on==1||Nn.depth==0&&on==1?(Nn.y0=Wt/2-Nn.value*Or,Nn.y1=Nn.y0+Nn.value*Or):Nn.partOfCycle?Q(Nn,lr)==0?(Nn.y0=Wt/2+Wi,Nn.y1=Nn.y0+Nn.value*Or):Nn.circularLinkType=="top"?(Nn.y0=Rt+Wi,Nn.y1=Nn.y0+Nn.value*Or):(Nn.y0=Wt-Nn.value*Or-Wi,Nn.y1=Nn.y0+Nn.value*Or):tn.top==0||tn.bottom==0?(Nn.y0=(Wt-Rt)/on*Wi,Nn.y1=Nn.y0+Nn.value*Or):(Nn.y0=(Wt-Rt)/2-on/2+Wi,Nn.y1=Nn.y0+Nn.value*Or)})})}function mt(lr,br){var Or=Et.length;Et.forEach(function(tn){var Jr=tn.length,dn=tn[0].depth;tn.forEach(function(on){var Nn;if((on.sourceLinks.length||on.targetLinks.length)&&!(on.partOfCycle&&Q(on,br)>0))if(dn==0&&Jr==1)Nn=on.y1-on.y0,on.y0=Wt/2-Nn/2,on.y1=Wt/2+Nn/2;else if(dn==Or-1&&Jr==1)Nn=on.y1-on.y0,on.y0=Wt/2-Nn/2,on.y1=Wt/2+Nn/2;else{var Wi=0,Oa=R.mean(on.sourceLinks,C),Da=R.mean(on.targetLinks,g);Oa&&Da?Wi=(Oa+Da)/2:Wi=Oa||Da;var Aa=(Wi-D(on))*lr;on.y0+=Aa,on.y1+=Aa}})})}function Nt(){Et.forEach(function(lr){var br,Or,tn=Rt,Jr=lr.length,dn;for(lr.sort(A),dn=0;dn<Jr;++dn)br=lr[dn],Or=tn-br.y0,Or>0&&(br.y0+=Or,br.y1+=Or),tn=br.y1+Ft;if(Or=tn-Ft-Wt,Or>0)for(tn=br.y0-=Or,br.y1-=Or,dn=Jr-2;dn>=0;--dn)br=lr[dn],Or=br.y1+Ft-tn,Or>0&&(br.y0-=Or,br.y1-=Or),tn=br.y0})}}function Gn(mr){mr.nodes.forEach(function(St){St.sourceLinks.sort(x),St.targetLinks.sort(_)}),mr.nodes.forEach(function(St){var Ot=St.y0,Et=Ot,je=St.y1,Ye=je;St.sourceLinks.forEach(function(et){et.circular?(et.y0=je-et.width/2,je=je-et.width):(et.y0=Ot+et.width/2,Ot+=et.width)}),St.targetLinks.forEach(function(et){et.circular?(et.y1=Ye-et.width/2,Ye=Ye-et.width):(et.y1=Et+et.width/2,Et+=et.width)})})}return Pr}function W(pt,Rt,$t){var Wt=0;if($t===null){for(var Ht=[],Ft=0;Ft<pt.links.length;Ft++){var st=pt.links[Ft],rt=st.source.index,Ue=st.target.index;Ht[rt]||(Ht[rt]=[]),Ht[Ue]||(Ht[Ue]=[]),Ht[rt].indexOf(Ue)===-1&&Ht[rt].push(Ue)}var xt=l(Ht);xt.sort(function(kr,Pr){return kr.length-Pr.length});var Gt={};for(Ft=0;Ft<xt.length;Ft++){var Jt=xt[Ft],Ut=Jt.slice(-2);Gt[Ut[0]]||(Gt[Ut[0]]={}),Gt[Ut[0]][Ut[1]]=!0}pt.links.forEach(function(kr){var Pr=kr.target.index,$r=kr.source.index;Pr===$r||Gt[$r]&&Gt[$r][Pr]?(kr.circular=!0,kr.circularLinkID=Wt,Wt=Wt+1):kr.circular=!1})}else pt.links.forEach(function(kr){kr.source[$t]<kr.target[$t]?kr.circular=!1:(kr.circular=!0,kr.circularLinkID=Wt,Wt=Wt+1)})}function $(pt,Rt){var $t=0,Wt=0;pt.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=$t<Wt?"top":"bottom",Ht.circularLinkType=="top"?$t=$t+1:Wt=Wt+1,pt.nodes.forEach(function(Ft){(P(Ft,Rt)==P(Ht.source,Rt)||P(Ft,Rt)==P(Ht.target,Rt))&&(Ft.circularLinkType=Ht.circularLinkType)}))}),pt.links.forEach(function(Ht){Ht.circular&&(Ht.source.circularLinkType==Ht.target.circularLinkType&&(Ht.circularLinkType=Ht.source.circularLinkType),at(Ht,Rt)&&(Ht.circularLinkType=Ht.source.circularLinkType))})}function Z(pt){var Rt=Math.abs(pt.y1-pt.y0),$t=Math.abs(pt.target.x0-pt.source.x1);return Math.atan($t/Rt)}function K(pt,Rt){return pt.source.column<Rt.target.column?!1:!(pt.target.column>Rt.source.column)}function Q(pt,Rt){var $t=0;pt.sourceLinks.forEach(function(Ht){$t=Ht.circular&&!at(Ht,Rt)?$t+1:$t});var Wt=0;return pt.targetLinks.forEach(function(Ht){Wt=Ht.circular&&!at(Ht,Rt)?Wt+1:Wt}),$t+Wt}function J(pt){var Rt=pt.source.sourceLinks,$t=0;Rt.forEach(function(Ft){$t=Ft.circular?$t+1:$t});var Wt=pt.target.targetLinks,Ht=0;return Wt.forEach(function(Ft){Ht=Ft.circular?Ht+1:Ht}),!($t>1||Ht>1)}function G(pt,Rt,$t){return pt.sort(fe),pt.forEach(function(Wt,Ht){var Ft=0;if(at(Wt,$t)&&J(Wt))Wt.circularPathData.verticalBuffer=Ft+Wt.width/2;else{var st=0;for(st;st<Ht;st++)if(K(pt[Ht],pt[st])){var rt=pt[st].circularPathData.verticalBuffer+pt[st].width/2+Rt;Ft=rt>Ft?rt:Ft}Wt.circularPathData.verticalBuffer=Ft+Wt.width/2}}),pt}function ee(pt,Rt,$t,Wt){var Ht=5,Ft=R.min(pt.links,function(Ue){return Ue.source.y0});pt.links.forEach(function(Ue){Ue.circular&&(Ue.circularPathData={})});var st=pt.links.filter(function(Ue){return Ue.circularLinkType=="top"});G(st,Rt,Wt);var rt=pt.links.filter(function(Ue){return Ue.circularLinkType=="bottom"});G(rt,Rt,Wt),pt.links.forEach(function(Ue){if(Ue.circular){if(Ue.circularPathData.arcRadius=Ue.width+y,Ue.circularPathData.leftNodeBuffer=Ht,Ue.circularPathData.rightNodeBuffer=Ht,Ue.circularPathData.sourceWidth=Ue.source.x1-Ue.source.x0,Ue.circularPathData.sourceX=Ue.source.x0+Ue.circularPathData.sourceWidth,Ue.circularPathData.targetX=Ue.target.x0,Ue.circularPathData.sourceY=Ue.y0,Ue.circularPathData.targetY=Ue.y1,at(Ue,Wt)&&J(Ue))Ue.circularPathData.leftSmallArcRadius=y+Ue.width/2,Ue.circularPathData.leftLargeArcRadius=y+Ue.width/2,Ue.circularPathData.rightSmallArcRadius=y+Ue.width/2,Ue.circularPathData.rightLargeArcRadius=y+Ue.width/2,Ue.circularLinkType=="bottom"?(Ue.circularPathData.verticalFullExtent=Ue.source.y1+T+Ue.circularPathData.verticalBuffer,Ue.circularPathData.verticalLeftInnerExtent=Ue.circularPathData.verticalFullExtent-Ue.circularPathData.leftLargeArcRadius,Ue.circularPathData.verticalRightInnerExtent=Ue.circularPathData.verticalFullExtent-Ue.circularPathData.rightLargeArcRadius):(Ue.circularPathData.verticalFullExtent=Ue.source.y0-T-Ue.circularPathData.verticalBuffer,Ue.circularPathData.verticalLeftInnerExtent=Ue.circularPathData.verticalFullExtent+Ue.circularPathData.leftLargeArcRadius,Ue.circularPathData.verticalRightInnerExtent=Ue.circularPathData.verticalFullExtent+Ue.circularPathData.rightLargeArcRadius);else{var xt=Ue.source.column,Gt=Ue.circularLinkType,Jt=pt.links.filter(function(Pr){return Pr.source.column==xt&&Pr.circularLinkType==Gt});Ue.circularLinkType=="bottom"?Jt.sort(Oe):Jt.sort(we);var Ut=0;Jt.forEach(function(Pr,$r){Pr.circularLinkID==Ue.circularLinkID&&(Ue.circularPathData.leftSmallArcRadius=y+Ue.width/2+Ut,Ue.circularPathData.leftLargeArcRadius=y+Ue.width/2+$r*Rt+Ut),Ut=Ut+Pr.width}),xt=Ue.target.column,Jt=pt.links.filter(function(Pr){return Pr.target.column==xt&&Pr.circularLinkType==Gt}),Ue.circularLinkType=="bottom"?Jt.sort(Le):Jt.sort(ke),Ut=0,Jt.forEach(function(Pr,$r){Pr.circularLinkID==Ue.circularLinkID&&(Ue.circularPathData.rightSmallArcRadius=y+Ue.width/2+Ut,Ue.circularPathData.rightLargeArcRadius=y+Ue.width/2+$r*Rt+Ut),Ut=Ut+Pr.width}),Ue.circularLinkType=="bottom"?(Ue.circularPathData.verticalFullExtent=Math.max($t,Ue.source.y1,Ue.target.y1)+T+Ue.circularPathData.verticalBuffer,Ue.circularPathData.verticalLeftInnerExtent=Ue.circularPathData.verticalFullExtent-Ue.circularPathData.leftLargeArcRadius,Ue.circularPathData.verticalRightInnerExtent=Ue.circularPathData.verticalFullExtent-Ue.circularPathData.rightLargeArcRadius):(Ue.circularPathData.verticalFullExtent=Ft-T-Ue.circularPathData.verticalBuffer,Ue.circularPathData.verticalLeftInnerExtent=Ue.circularPathData.verticalFullExtent+Ue.circularPathData.leftLargeArcRadius,Ue.circularPathData.verticalRightInnerExtent=Ue.circularPathData.verticalFullExtent+Ue.circularPathData.rightLargeArcRadius)}Ue.circularPathData.leftInnerExtent=Ue.circularPathData.sourceX+Ue.circularPathData.leftNodeBuffer,Ue.circularPathData.rightInnerExtent=Ue.circularPathData.targetX-Ue.circularPathData.rightNodeBuffer,Ue.circularPathData.leftFullExtent=Ue.circularPathData.sourceX+Ue.circularPathData.leftLargeArcRadius+Ue.circularPathData.leftNodeBuffer,Ue.circularPathData.rightFullExtent=Ue.circularPathData.targetX-Ue.circularPathData.rightLargeArcRadius-Ue.circularPathData.rightNodeBuffer}if(Ue.circular)Ue.path=re(Ue);else{var kr=z.linkHorizontal().source(function(Pr){var $r=Pr.source.x0+(Pr.source.x1-Pr.source.x0),rn=Pr.y0;return[$r,rn]}).target(function(Pr){var $r=Pr.target.x0,rn=Pr.y1;return[$r,rn]});Ue.path=kr(Ue)}})}function re(pt){var Rt="";return pt.circularLinkType=="top"?Rt="M"+pt.circularPathData.sourceX+" "+pt.circularPathData.sourceY+" L"+pt.circularPathData.leftInnerExtent+" "+pt.circularPathData.sourceY+" A"+pt.circularPathData.leftLargeArcRadius+" "+pt.circularPathData.leftSmallArcRadius+" 0 0 0 "+pt.circularPathData.leftFullExtent+" "+(pt.circularPathData.sourceY-pt.circularPathData.leftSmallArcRadius)+" L"+pt.circularPathData.leftFullExtent+" "+pt.circularPathData.verticalLeftInnerExtent+" A"+pt.circularPathData.leftLargeArcRadius+" "+pt.circularPathData.leftLargeArcRadius+" 0 0 0 "+pt.circularPathData.leftInnerExtent+" "+pt.circularPathData.verticalFullExtent+" L"+pt.circularPathData.rightInnerExtent+" "+pt.circularPathData.verticalFullExtent+" A"+pt.circularPathData.rightLargeArcRadius+" "+pt.circularPathData.rightLargeArcRadius+" 0 0 0 "+pt.circularPathData.rightFullExtent+" "+pt.circularPathData.verticalRightInnerExtent+" L"+pt.circularPathData.rightFullExtent+" "+(pt.circularPathData.targetY-pt.circularPathData.rightSmallArcRadius)+" A"+pt.circularPathData.rightLargeArcRadius+" "+pt.circularPathData.rightSmallArcRadius+" 0 0 0 "+pt.circularPathData.rightInnerExtent+" "+pt.circularPathData.targetY+" L"+pt.circularPathData.targetX+" "+pt.circularPathData.targetY:Rt="M"+pt.circularPathData.sourceX+" "+pt.circularPathData.sourceY+" L"+pt.circularPathData.leftInnerExtent+" "+pt.circularPathData.sourceY+" A"+pt.circularPathData.leftLargeArcRadius+" "+pt.circularPathData.leftSmallArcRadius+" 0 0 1 "+pt.circularPathData.leftFullExtent+" "+(pt.circularPathData.sourceY+pt.circularPathData.leftSmallArcRadius)+" L"+pt.circularPathData.leftFullExtent+" "+pt.circularPathData.verticalLeftInnerExtent+" A"+pt.circularPathData.leftLargeArcRadius+" "+pt.circularPathData.leftLargeArcRadius+" 0 0 1 "+pt.circularPathData.leftInnerExtent+" "+pt.circularPathData.verticalFullExtent+" L"+pt.circularPathData.rightInnerExtent+" "+pt.circularPathData.verticalFullExtent+" A"+pt.circularPathData.rightLargeArcRadius+" "+pt.circularPathData.rightLargeArcRadius+" 0 0 1 "+pt.circularPathData.rightFullExtent+" "+pt.circularPathData.verticalRightInnerExtent+" L"+pt.circularPathData.rightFullExtent+" "+(pt.circularPathData.targetY+pt.circularPathData.rightSmallArcRadius)+" A"+pt.circularPathData.rightLargeArcRadius+" "+pt.circularPathData.rightSmallArcRadius+" 0 0 1 "+pt.circularPathData.rightInnerExtent+" "+pt.circularPathData.targetY+" L"+pt.circularPathData.targetX+" "+pt.circularPathData.targetY,Rt}function fe(pt,Rt){return oe(pt)==oe(Rt)?pt.circularLinkType=="bottom"?Oe(pt,Rt):we(pt,Rt):oe(Rt)-oe(pt)}function we(pt,Rt){return pt.y0-Rt.y0}function Oe(pt,Rt){return Rt.y0-pt.y0}function ke(pt,Rt){return pt.y1-Rt.y1}function Le(pt,Rt){return Rt.y1-pt.y1}function oe(pt){return pt.target.column-pt.source.column}function be(pt){return pt.target.x0-pt.source.x1}function _e(pt,Rt){var $t=Z(pt),Wt=be(Rt)/Math.tan($t),Ht=tt(pt)=="up"?pt.y1+Wt:pt.y1-Wt;return Ht}function he(pt,Rt){var $t=Z(pt),Wt=be(Rt)/Math.tan($t),Ht=tt(pt)=="up"?pt.y1-Wt:pt.y1+Wt;return Ht}function De(pt,Rt,$t,Wt){pt.links.forEach(function(Ht){if(!Ht.circular&&Ht.target.column-Ht.source.column>1){var Ft=Ht.source.column+1,st=Ht.target.column-1,rt=1,Ue=st-Ft+1;for(rt=1;Ft<=st;Ft++,rt++)pt.nodes.forEach(function(xt){if(xt.column==Ft){var Gt=rt/(Ue+1),Jt=Math.pow(1-Gt,3),Ut=3*Gt*Math.pow(1-Gt,2),kr=3*Math.pow(Gt,2)*(1-Gt),Pr=Math.pow(Gt,3),$r=Jt*Ht.y0+Ut*Ht.y0+kr*Ht.y1+Pr*Ht.y1,rn=$r-Ht.width/2,kn=$r+Ht.width/2,Rn;rn>xt.y0&&rn<xt.y1?(Rn=xt.y1-rn+10,Rn=xt.circularLinkType=="bottom"?Rn:-Rn,xt=se(xt,Rn,Rt,$t),pt.nodes.forEach(function(ci){P(ci,Wt)==P(xt,Wt)||ci.column!=xt.column||xe(xt,ci)&&se(ci,Rn,Rt,$t)})):kn>xt.y0&&kn<xt.y1?(Rn=kn-xt.y0+10,xt=se(xt,Rn,Rt,$t),pt.nodes.forEach(function(ci){P(ci,Wt)==P(xt,Wt)||ci.column!=xt.column||ci.y0<xt.y1&&ci.y1>xt.y1&&se(ci,Rn,Rt,$t)})):rn<xt.y0&&kn>xt.y1&&(Rn=kn-xt.y0+10,xt=se(xt,Rn,Rt,$t),pt.nodes.forEach(function(ci){P(ci,Wt)==P(xt,Wt)||ci.column!=xt.column||ci.y0<xt.y1&&ci.y1>xt.y1&&se(ci,Rn,Rt,$t)}))}})}})}function xe(pt,Rt){return pt.y0>Rt.y0&&pt.y0<Rt.y1||pt.y1>Rt.y0&&pt.y1<Rt.y1?!0:pt.y0<Rt.y0&&pt.y1>Rt.y1}function se(pt,Rt,$t,Wt){return pt.y0+Rt>=$t&&pt.y1+Rt<=Wt&&(pt.y0=pt.y0+Rt,pt.y1=pt.y1+Rt,pt.targetLinks.forEach(function(Ht){Ht.y1=Ht.y1+Rt}),pt.sourceLinks.forEach(function(Ht){Ht.y0=Ht.y0+Rt})),pt}function Ee(pt,Rt,$t,Wt){pt.nodes.forEach(function(Ht){Wt&&Ht.y+(Ht.y1-Ht.y0)>Rt&&(Ht.y=Ht.y-(Ht.y+(Ht.y1-Ht.y0)-Rt));var Ft=pt.links.filter(function(Ue){return P(Ue.source,$t)==P(Ht,$t)}),st=Ft.length;st>1&&Ft.sort(function(Ue,xt){if(!Ue.circular&&!xt.circular){if(Ue.target.column==xt.target.column)return Ue.y1-xt.y1;if(Be(Ue,xt)){if(Ue.target.column>xt.target.column){var Gt=he(xt,Ue);return Ue.y1-Gt}if(xt.target.column>Ue.target.column){var Jt=he(Ue,xt);return Jt-xt.y1}}else return Ue.y1-xt.y1}if(Ue.circular&&!xt.circular)return Ue.circularLinkType=="top"?-1:1;if(xt.circular&&!Ue.circular)return xt.circularLinkType=="top"?1:-1;if(Ue.circular&&xt.circular)return Ue.circularLinkType===xt.circularLinkType&&Ue.circularLinkType=="top"?Ue.target.column===xt.target.column?Ue.target.y1-xt.target.y1:xt.target.column-Ue.target.column:Ue.circularLinkType===xt.circularLinkType&&Ue.circularLinkType=="bottom"?Ue.target.column===xt.target.column?xt.target.y1-Ue.target.y1:Ue.target.column-xt.target.column:Ue.circularLinkType=="top"?-1:1});var rt=Ht.y0;Ft.forEach(function(Ue){Ue.y0=rt+Ue.width/2,rt=rt+Ue.width}),Ft.forEach(function(Ue,xt){if(Ue.circularLinkType=="bottom"){var Gt=xt+1,Jt=0;for(Gt;Gt<st;Gt++)Jt=Jt+Ft[Gt].width;Ue.y0=Ht.y1-Jt-Ue.width/2}})})}function Te(pt,Rt,$t){pt.nodes.forEach(function(Wt){var Ht=pt.links.filter(function(rt){return P(rt.target,$t)==P(Wt,$t)}),Ft=Ht.length;Ft>1&&Ht.sort(function(rt,Ue){if(!rt.circular&&!Ue.circular){if(rt.source.column==Ue.source.column)return rt.y0-Ue.y0;if(Be(rt,Ue)){if(Ue.source.column<rt.source.column){var xt=_e(Ue,rt);return rt.y0-xt}if(rt.source.column<Ue.source.column){var Gt=_e(rt,Ue);return Gt-Ue.y0}}else return rt.y0-Ue.y0}if(rt.circular&&!Ue.circular)return rt.circularLinkType=="top"?-1:1;if(Ue.circular&&!rt.circular)return Ue.circularLinkType=="top"?1:-1;if(rt.circular&&Ue.circular)return rt.circularLinkType===Ue.circularLinkType&&rt.circularLinkType=="top"?rt.source.column===Ue.source.column?rt.source.y1-Ue.source.y1:rt.source.column-Ue.source.column:rt.circularLinkType===Ue.circularLinkType&&rt.circularLinkType=="bottom"?rt.source.column===Ue.source.column?rt.source.y1-Ue.source.y1:Ue.source.column-rt.source.column:rt.circularLinkType=="top"?-1:1});var st=Wt.y0;Ht.forEach(function(rt){rt.y1=st+rt.width/2,st=st+rt.width}),Ht.forEach(function(rt,Ue){if(rt.circularLinkType=="bottom"){var xt=Ue+1,Gt=0;for(xt;xt<Ft;xt++)Gt=Gt+Ht[xt].width;rt.y1=Wt.y1-Gt-rt.width/2}})})}function Be(pt,Rt){return tt(pt)==tt(Rt)}function tt(pt){return pt.y0-pt.y1>0?"up":"down"}function at(pt,Rt){return P(pt.source,Rt)==P(pt.target,Rt)}function gt(pt,Rt,$t){var Wt=pt.nodes,Ht=pt.links,Ft=!1,st=!1;if(Ht.forEach(function(Ut){Ut.circularLinkType=="top"?Ft=!0:Ut.circularLinkType=="bottom"&&(st=!0)}),Ft==!1||st==!1){var rt=R.min(Wt,function(Ut){return Ut.y0}),Ue=R.max(Wt,function(Ut){return Ut.y1}),xt=Ue-rt,Gt=$t-Rt,Jt=Gt/xt;Wt.forEach(function(Ut){var kr=(Ut.y1-Ut.y0)*Jt;Ut.y0=(Ut.y0-rt)*Jt,Ut.y1=Ut.y0+kr}),Ht.forEach(function(Ut){Ut.y0=(Ut.y0-rt)*Jt,Ut.y1=(Ut.y1-rt)*Jt,Ut.width=Ut.width*Jt})}}w.sankeyCircular=M,w.sankeyCenter=v,w.sankeyLeft=c,w.sankeyRight=p,w.sankeyJustify=f,Object.defineProperty(w,"__esModule",{value:!0})})}}),jxe=U({"src/traces/sankey/constants.js"(pe,le){le.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"}}}}),Ytt=U({"src/traces/sankey/render.js"(pe,le){var w=Vtt(),R=(MI(),Me(OR)).interpolateNumber,O=Ze(),z=Gtt(),l=Wtt(),u=jxe(),c=or(),p=Lr(),f=ec(),v=ii(),h=v.strTranslate,m=v.strRotate,_=FR(),x=_.keyFun,A=_.repeat,E=_.unwrap,D=ah(),g=Mi(),C=tg(),I=C.CAP_SHIFT,N=C.LINE_SPACING,F=3;function k(_e,he,De){var xe=E(he),se=xe.trace,Ee=se.domain,Te=se.orientation==="h",Be=se.node.pad,tt=se.node.thickness,at={justify:z.sankeyJustify,left:z.sankeyLeft,right:z.sankeyRight,center:z.sankeyCenter}[se.node.align],gt=_e.width*(Ee.x[1]-Ee.x[0]),pt=_e.height*(Ee.y[1]-Ee.y[0]),Rt=xe._nodes,$t=xe._links,Wt=xe.circular,Ht;Wt?Ht=l.sankeyCircular().circularLinkGap(0):Ht=z.sankey(),Ht.iterations(u.sankeyIterations).size(Te?[gt,pt]:[pt,gt]).nodeWidth(tt).nodePadding(Be).nodeId(function(ci){return ci.pointNumber}).nodeAlign(at).nodes(Rt).links($t);var Ft=Ht();Ht.nodePadding()<Be&&v.warn("node.pad was reduced to ",Ht.nodePadding()," to fit within the figure.");var st,rt,Ue;for(var xt in xe._groupLookup){var Gt=parseInt(xe._groupLookup[xt]),Jt;for(st=0;st<Ft.nodes.length;st++)if(Ft.nodes[st].pointNumber===Gt){Jt=Ft.nodes[st];break}if(Jt){var Ut={pointNumber:parseInt(xt),x0:Jt.x0,x1:Jt.x1,y0:Jt.y0,y1:Jt.y1,partOfGroup:!0,sourceLinks:[],targetLinks:[]};Ft.nodes.unshift(Ut),Jt.childrenNodes.unshift(Ut)}}function kr(){for(st=0;st<Ft.nodes.length;st++){var ci=Ft.nodes[st],In={},Gn,mr;for(rt=0;rt<ci.targetLinks.length;rt++)mr=ci.targetLinks[rt],Gn=mr.source.pointNumber+":"+mr.target.pointNumber,In.hasOwnProperty(Gn)||(In[Gn]=[]),In[Gn].push(mr);var St=Object.keys(In);for(rt=0;rt<St.length;rt++){Gn=St[rt];var Ot=In[Gn],Et=0,je={};for(Ue=0;Ue<Ot.length;Ue++)mr=Ot[Ue],je[mr.label]||(je[mr.label]=0),je[mr.label]+=mr.value,Et+=mr.value;for(Ue=0;Ue<Ot.length;Ue++)mr=Ot[Ue],mr.flow={value:Et,labelConcentration:je[mr.label]/Et,concentration:mr.value/Et,links:Ot},mr.concentrationscale&&(mr.color=c(mr.concentrationscale(mr.flow.labelConcentration)))}var Ye=0;for(rt=0;rt<ci.sourceLinks.length;rt++)Ye+=ci.sourceLinks[rt].value;for(rt=0;rt<ci.sourceLinks.length;rt++)mr=ci.sourceLinks[rt],mr.concentrationOut=mr.value/Ye;var et=0;for(rt=0;rt<ci.targetLinks.length;rt++)et+=ci.targetLinks[rt].value;for(rt=0;rt<ci.targetLinks.length;rt++)mr=ci.targetLinks[rt],mr.concenrationIn=mr.value/et}}kr();function Pr(ci){ci.forEach(function(In){var Gn,mr,St=0,Ot=In.length,Et;for(In.sort(function(je,Ye){return je.y0-Ye.y0}),Et=0;Et<Ot;++Et)Gn=In[Et],Gn.y0>=St||(mr=St-Gn.y0,mr>1e-6&&(Gn.y0+=mr,Gn.y1+=mr)),St=Gn.y1+Be})}function $r(ci){var In=ci.map(function(Ye,et){return{x0:Ye.x0,index:et}}).sort(function(Ye,et){return Ye.x0-et.x0}),Gn=[],mr=-1,St,Ot=-1/0,Et;for(st=0;st<In.length;st++){var je=ci[In[st].index];je.x0>Ot+tt&&(mr+=1,St=je.x0),Ot=je.x0,Gn[mr]||(Gn[mr]=[]),Gn[mr].push(je),Et=St-je.x0,je.x0+=Et,je.x1+=Et}return Gn}if(se.node.x.length&&se.node.y.length){for(st=0;st<Math.min(se.node.x.length,se.node.y.length,Ft.nodes.length);st++)if(se.node.x[st]&&se.node.y[st]){var rn=[se.node.x[st]*gt,se.node.y[st]*pt];Ft.nodes[st].x0=rn[0]-tt/2,Ft.nodes[st].x1=rn[0]+tt/2;var kn=Ft.nodes[st].y1-Ft.nodes[st].y0;Ft.nodes[st].y0=rn[1]-kn/2,Ft.nodes[st].y1=rn[1]+kn/2}if(se.arrangement==="snap"){Rt=Ft.nodes;var Rn=$r(Rt);Pr(Rn)}Ht.update(Ft)}return{circular:Wt,key:De,trace:se,guid:v.randstr(),horizontal:Te,width:gt,height:pt,nodePad:se.node.pad,nodeLineColor:se.node.line.color,nodeLineWidth:se.node.line.width,linkLineColor:se.link.line.color,linkLineWidth:se.link.line.width,linkArrowLength:se.link.arrowlen,valueFormat:se.valueformat,valueSuffix:se.valuesuffix,textFont:se.textfont,translateX:Ee.x[0]*_e.width+_e.margin.l,translateY:_e.height-Ee.y[1]*_e.height+_e.margin.t,dragParallel:Te?pt:gt,dragPerpendicular:Te?gt:pt,arrangement:se.arrangement,sankey:Ht,graph:Ft,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function P(_e,he,De){var xe=c(he.color),se=c(he.hovercolor),Ee=he.source.label+"|"+he.target.label,Te=Ee+"__"+De;return he.trace=_e.trace,he.curveNumber=_e.trace.index,{circular:_e.circular,key:Te,traceId:_e.key,pointNumber:he.pointNumber,link:he,tinyColorHue:p.tinyRGB(xe),tinyColorAlpha:xe.getAlpha(),tinyColorHoverHue:p.tinyRGB(se),tinyColorHoverAlpha:se.getAlpha(),linkPath:y,linkLineColor:_e.linkLineColor,linkLineWidth:_e.linkLineWidth,linkArrowLength:_e.linkArrowLength,valueFormat:_e.valueFormat,valueSuffix:_e.valueSuffix,sankey:_e.sankey,parent:_e,interactionState:_e.interactionState,flow:he.flow}}function T(_e,he){var De="",xe=_e.width/2,se=_e.circularPathData,Ee=se.sourceX+se.verticalBuffer<se.targetX,Te=se.rightFullExtent-se.rightLargeArcRadius-he<=se.leftFullExtent-xe;return Math.abs(se.rightFullExtent-se.leftFullExtent-xe)<xe,_e.circularLinkType==="top"?(De="M "+(se.targetX-he)+" "+(se.targetY+xe)+" L "+(se.rightInnerExtent-he)+" "+(se.targetY+xe)+"A "+(se.rightLargeArcRadius+xe)+" "+(se.rightSmallArcRadius+xe)+" 0 0 1 "+(se.rightFullExtent-xe-he)+" "+(se.targetY-se.rightSmallArcRadius)+"L "+(se.rightFullExtent-xe-he)+" "+se.verticalRightInnerExtent,Ee&&Te?De+=" A "+(se.rightLargeArcRadius+xe)+" "+(se.rightLargeArcRadius+xe)+" 0 0 1 "+(se.rightFullExtent+xe-he-(se.rightLargeArcRadius-xe))+" "+(se.verticalRightInnerExtent-(se.rightLargeArcRadius+xe))+" L "+(se.rightFullExtent+xe-(se.rightLargeArcRadius-xe)-he)+" "+(se.verticalRightInnerExtent-(se.rightLargeArcRadius+xe))+" A "+(se.leftLargeArcRadius+xe)+" "+(se.leftLargeArcRadius+xe)+" 0 0 1 "+(se.leftFullExtent+xe)+" "+se.verticalRightInnerExtent:Ee?De+=" A "+(se.rightLargeArcRadius-xe)+" "+(se.rightLargeArcRadius-xe)+" 0 0 0 "+(se.rightFullExtent-xe-he-(se.rightLargeArcRadius-xe))+" "+(se.verticalRightInnerExtent-(se.rightLargeArcRadius-xe))+" L "+(se.leftFullExtent+xe+(se.rightLargeArcRadius-xe))+" "+(se.verticalRightInnerExtent-(se.rightLargeArcRadius-xe))+" A "+(se.leftLargeArcRadius-xe)+" "+(se.leftLargeArcRadius-xe)+" 0 0 0 "+(se.leftFullExtent+xe)+" "+se.verticalLeftInnerExtent:De+=" A "+(se.rightLargeArcRadius+xe)+" "+(se.rightLargeArcRadius+xe)+" 0 0 1 "+(se.rightInnerExtent-he)+" "+(se.verticalFullExtent-xe)+" L "+se.leftInnerExtent+" "+(se.verticalFullExtent-xe)+" A "+(se.leftLargeArcRadius+xe)+" "+(se.leftLargeArcRadius+xe)+" 0 0 1 "+(se.leftFullExtent+xe)+" "+se.verticalLeftInnerExtent,De+=" L "+(se.leftFullExtent+xe)+" "+(se.sourceY-se.leftSmallArcRadius)+" A "+(se.leftLargeArcRadius+xe)+" "+(se.leftSmallArcRadius+xe)+" 0 0 1 "+se.leftInnerExtent+" "+(se.sourceY+xe)+" L "+se.sourceX+" "+(se.sourceY+xe)+" L "+se.sourceX+" "+(se.sourceY-xe)+" L "+se.leftInnerExtent+" "+(se.sourceY-xe)+" A "+(se.leftLargeArcRadius-xe)+" "+(se.leftSmallArcRadius-xe)+" 0 0 0 "+(se.leftFullExtent-xe)+" "+(se.sourceY-se.leftSmallArcRadius)+" L "+(se.leftFullExtent-xe)+" "+se.verticalLeftInnerExtent,Ee&&Te?De+=" A "+(se.leftLargeArcRadius+xe)+" "+(se.leftSmallArcRadius+xe)+" 0 0 0 "+(se.leftFullExtent-xe)+" "+(se.verticalFullExtent+xe)+"L"+(se.rightFullExtent+xe-he)+" "+(se.verticalFullExtent+xe)+" A "+(se.leftLargeArcRadius+xe)+" "+(se.leftSmallArcRadius+xe)+" 0 0 0 "+(se.rightFullExtent+xe-he)+" "+se.verticalRightInnerExtent:Ee?De+=" A "+(se.leftLargeArcRadius+xe)+" "+(se.leftSmallArcRadius+xe)+" 0 0 1 "+(se.leftFullExtent+xe)+" "+(se.verticalFullExtent-xe)+" L "+(se.rightFullExtent-xe-he)+" "+(se.verticalFullExtent-xe)+" A "+(se.leftLargeArcRadius+xe)+" "+(se.leftSmallArcRadius+xe)+" 0 0 1 "+(se.rightFullExtent+xe-he)+" "+se.verticalRightInnerExtent:De+=" A "+(se.leftLargeArcRadius-xe)+" "+(se.leftLargeArcRadius-xe)+" 0 0 0 "+se.leftInnerExtent+" "+(se.verticalFullExtent+xe)+" L "+(se.rightInnerExtent-he)+" "+(se.verticalFullExtent+xe)+" A "+(se.rightLargeArcRadius-xe)+" "+(se.rightLargeArcRadius-xe)+" 0 0 0 "+(se.rightFullExtent+xe-he)+" "+se.verticalRightInnerExtent,De+=" L "+(se.rightFullExtent+xe-he)+" "+(se.targetY-se.rightSmallArcRadius)+" A "+(se.rightLargeArcRadius-xe)+" "+(se.rightSmallArcRadius-xe)+" 0 0 0 "+(se.rightInnerExtent-he)+" "+(se.targetY-xe)+" L "+(se.targetX-he)+" "+(se.targetY-xe)+(he>0?" L "+se.targetX+" "+se.targetY:"")+"Z"):(De="M "+(se.targetX-he)+" "+(se.targetY-xe)+"  L "+(se.rightInnerExtent-he)+" "+(se.targetY-xe)+" A "+(se.rightLargeArcRadius+xe)+" "+(se.rightSmallArcRadius+xe)+" 0 0 0 "+(se.rightFullExtent-xe-he)+" "+(se.targetY+se.rightSmallArcRadius)+" L "+(se.rightFullExtent-xe-he)+" "+se.verticalRightInnerExtent,Ee&&Te?De+=" A "+(se.rightLargeArcRadius+xe)+" "+(se.rightLargeArcRadius+xe)+" 0 0 0 "+(se.rightInnerExtent-xe-he)+" "+(se.verticalFullExtent+xe)+" L "+(se.rightFullExtent+xe-he-(se.rightLargeArcRadius-xe))+" "+(se.verticalFullExtent+xe)+" A "+(se.rightLargeArcRadius+xe)+" "+(se.rightLargeArcRadius+xe)+" 0 0 0 "+(se.leftFullExtent+xe)+" "+se.verticalLeftInnerExtent:Ee?De+=" A "+(se.rightLargeArcRadius-xe)+" "+(se.rightSmallArcRadius-xe)+" 0 0 1 "+(se.rightFullExtent-he-xe-(se.rightLargeArcRadius-xe))+" "+(se.verticalFullExtent-xe)+" L "+(se.leftFullExtent+xe+(se.rightLargeArcRadius-xe))+" "+(se.verticalFullExtent-xe)+" A "+(se.rightLargeArcRadius-xe)+" "+(se.rightSmallArcRadius-xe)+" 0 0 1 "+(se.leftFullExtent+xe)+" "+se.verticalLeftInnerExtent:De+=" A "+(se.rightLargeArcRadius+xe)+" "+(se.rightLargeArcRadius+xe)+" 0 0 0 "+(se.rightInnerExtent-he)+" "+(se.verticalFullExtent+xe)+" L "+se.leftInnerExtent+" "+(se.verticalFullExtent+xe)+" A "+(se.leftLargeArcRadius+xe)+" "+(se.leftLargeArcRadius+xe)+" 0 0 0 "+(se.leftFullExtent+xe)+" "+se.verticalLeftInnerExtent,De+=" L "+(se.leftFullExtent+xe)+" "+(se.sourceY+se.leftSmallArcRadius)+" A "+(se.leftLargeArcRadius+xe)+" "+(se.leftSmallArcRadius+xe)+" 0 0 0 "+se.leftInnerExtent+" "+(se.sourceY-xe)+" L "+se.sourceX+" "+(se.sourceY-xe)+" L "+se.sourceX+" "+(se.sourceY+xe)+" L "+se.leftInnerExtent+" "+(se.sourceY+xe)+" A "+(se.leftLargeArcRadius-xe)+" "+(se.leftSmallArcRadius-xe)+" 0 0 1 "+(se.leftFullExtent-xe)+" "+(se.sourceY+se.leftSmallArcRadius)+" L "+(se.leftFullExtent-xe)+" "+se.verticalLeftInnerExtent,Ee&&Te?De+=" A "+(se.rightLargeArcRadius-xe)+" "+(se.rightSmallArcRadius-xe)+" 0 0 1 "+(se.leftFullExtent-xe-(se.rightLargeArcRadius-xe))+" "+(se.verticalFullExtent-xe)+" L "+(se.rightFullExtent+xe-he+(se.rightLargeArcRadius-xe))+" "+(se.verticalFullExtent-xe)+" A "+(se.rightLargeArcRadius-xe)+" "+(se.rightSmallArcRadius-xe)+" 0 0 1 "+(se.rightFullExtent+xe-he)+" "+se.verticalRightInnerExtent:Ee?De+=" A "+(se.rightLargeArcRadius+xe)+" "+(se.rightLargeArcRadius+xe)+" 0 0 0 "+(se.leftFullExtent+xe)+" "+(se.verticalFullExtent+xe)+" L "+(se.rightFullExtent-he-xe)+" "+(se.verticalFullExtent+xe)+" A "+(se.rightLargeArcRadius+xe)+" "+(se.rightLargeArcRadius+xe)+" 0 0 0 "+(se.rightFullExtent+xe-he)+" "+se.verticalRightInnerExtent:De+=" A "+(se.leftLargeArcRadius-xe)+" "+(se.leftLargeArcRadius-xe)+" 0 0 1 "+se.leftInnerExtent+" "+(se.verticalFullExtent-xe)+" L "+(se.rightInnerExtent-he)+" "+(se.verticalFullExtent-xe)+" A "+(se.rightLargeArcRadius-xe)+" "+(se.rightLargeArcRadius-xe)+" 0 0 1 "+(se.rightFullExtent+xe-he)+" "+se.verticalRightInnerExtent,De+=" L "+(se.rightFullExtent+xe-he)+" "+(se.targetY+se.rightSmallArcRadius)+" A "+(se.rightLargeArcRadius-xe)+" "+(se.rightSmallArcRadius-xe)+" 0 0 1 "+(se.rightInnerExtent-he)+" "+(se.targetY+xe)+" L "+(se.targetX-he)+" "+(se.targetY+xe)+(he>0?" L "+se.targetX+" "+se.targetY:"")+"Z"),De}function y(){var _e=.5;function he(De){var xe=De.linkArrowLength;if(De.link.circular)return T(De.link,xe);var se=Math.abs((De.link.target.x0-De.link.source.x1)/2);xe>se&&(xe=se);var Ee=De.link.source.x1,Te=De.link.target.x0-xe,Be=R(Ee,Te),tt=Be(_e),at=Be(1-_e),gt=De.link.y0-De.link.width/2,pt=De.link.y0+De.link.width/2,Rt=De.link.y1-De.link.width/2,$t=De.link.y1+De.link.width/2,Wt="M"+Ee+","+gt,Ht="C"+tt+","+gt+" "+at+","+Rt+" "+Te+","+Rt,Ft="C"+at+","+$t+" "+tt+","+pt+" "+Ee+","+pt,st=xe>0?"L"+(Te+xe)+","+(Rt+De.link.width/2):"";return st+="L"+Te+","+$t,Wt+Ht+st+Ft+"Z"}return he}function S(_e,he){var De=c(he.color),xe=u.nodePadAcross,se=_e.nodePad/2;he.dx=he.x1-he.x0,he.dy=he.y1-he.y0;var Ee=he.dx,Te=Math.max(.5,he.dy),Be="node_"+he.pointNumber;return he.group&&(Be=v.randstr()),he.trace=_e.trace,he.curveNumber=_e.trace.index,{index:he.pointNumber,key:Be,partOfGroup:he.partOfGroup||!1,group:he.group,traceId:_e.key,trace:_e.trace,node:he,nodePad:_e.nodePad,nodeLineColor:_e.nodeLineColor,nodeLineWidth:_e.nodeLineWidth,textFont:_e.textFont,size:_e.horizontal?_e.height:_e.width,visibleWidth:Math.ceil(Ee),visibleHeight:Te,zoneX:-xe,zoneY:-se,zoneWidth:Ee+2*xe,zoneHeight:Te+2*se,labelY:_e.horizontal?he.dy/2+1:he.dx/2+1,left:he.originalLayer===1,sizeAcross:_e.width,forceLayouts:_e.forceLayouts,horizontal:_e.horizontal,darkBackground:De.getBrightness()<=128,tinyColorHue:p.tinyRGB(De),tinyColorAlpha:De.getAlpha(),valueFormat:_e.valueFormat,valueSuffix:_e.valueSuffix,sankey:_e.sankey,graph:_e.graph,arrangement:_e.arrangement,uniqueNodeLabelPathId:[_e.guid,_e.key,Be].join("_"),interactionState:_e.interactionState,figure:_e}}function M(_e){_e.attr("transform",function(he){return h(he.node.x0.toFixed(3),he.node.y0.toFixed(3))})}function W(_e){_e.call(M)}function $(_e,he){_e.call(W),he.attr("d",y())}function Z(_e){_e.attr("width",function(he){return he.node.x1-he.node.x0}).attr("height",function(he){return he.visibleHeight})}function K(_e){return _e.link.width>1||_e.linkLineWidth>0}function Q(_e){var he=h(_e.translateX,_e.translateY);return he+(_e.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function J(_e,he,De){_e.on(".basic",null).on("mouseover.basic",function(xe){!xe.interactionState.dragInProgress&&!xe.partOfGroup&&(De.hover(this,xe,he),xe.interactionState.hovered=[this,xe])}).on("mousemove.basic",function(xe){!xe.interactionState.dragInProgress&&!xe.partOfGroup&&(De.follow(this,xe),xe.interactionState.hovered=[this,xe])}).on("mouseout.basic",function(xe){!xe.interactionState.dragInProgress&&!xe.partOfGroup&&(De.unhover(this,xe,he),xe.interactionState.hovered=!1)}).on("click.basic",function(xe){xe.interactionState.hovered&&(De.unhover(this,xe,he),xe.interactionState.hovered=!1),!xe.interactionState.dragInProgress&&!xe.partOfGroup&&De.select(this,xe,he)})}function G(_e,he,De,xe){var se=O.behavior.drag().origin(function(Ee){return{x:Ee.node.x0+Ee.visibleWidth/2,y:Ee.node.y0+Ee.visibleHeight/2}}).on("dragstart",function(Ee){if(Ee.arrangement!=="fixed"&&(v.ensureSingle(xe._fullLayout._infolayer,"g","dragcover",function(Be){xe._fullLayout._dragCover=Be}),v.raiseToTop(this),Ee.interactionState.dragInProgress=Ee.node,ke(Ee.node),Ee.interactionState.hovered&&(De.nodeEvents.unhover.apply(0,Ee.interactionState.hovered),Ee.interactionState.hovered=!1),Ee.arrangement==="snap")){var Te=Ee.traceId+"|"+Ee.key;Ee.forceLayouts[Te]?Ee.forceLayouts[Te].alpha(1):ee(_e,Te,Ee),re(_e,he,Ee,Te,xe)}}).on("drag",function(Ee){if(Ee.arrangement!=="fixed"){var Te=O.event.x,Be=O.event.y;Ee.arrangement==="snap"?(Ee.node.x0=Te-Ee.visibleWidth/2,Ee.node.x1=Te+Ee.visibleWidth/2,Ee.node.y0=Be-Ee.visibleHeight/2,Ee.node.y1=Be+Ee.visibleHeight/2):(Ee.arrangement==="freeform"&&(Ee.node.x0=Te-Ee.visibleWidth/2,Ee.node.x1=Te+Ee.visibleWidth/2),Be=Math.max(0,Math.min(Ee.size-Ee.visibleHeight/2,Be)),Ee.node.y0=Be-Ee.visibleHeight/2,Ee.node.y1=Be+Ee.visibleHeight/2),ke(Ee.node),Ee.arrangement!=="snap"&&(Ee.sankey.update(Ee.graph),$(_e.filter(Le(Ee)),he))}}).on("dragend",function(Ee){if(Ee.arrangement!=="fixed"){Ee.interactionState.dragInProgress=!1;for(var Te=0;Te<Ee.node.childrenNodes.length;Te++)Ee.node.childrenNodes[Te].x=Ee.node.x,Ee.node.childrenNodes[Te].y=Ee.node.y;Ee.arrangement!=="snap"&&we(Ee,xe)}});_e.on(".drag",null).call(se)}function ee(_e,he,De,xe){oe(De.graph.nodes);var se=De.graph.nodes.filter(function(Ee){return Ee.originalX===De.node.originalX}).filter(function(Ee){return!Ee.partOfGroup});De.forceLayouts[he]=w.forceSimulation(se).alphaDecay(0).force("collide",w.forceCollide().radius(function(Ee){return Ee.dy/2+De.nodePad/2}).strength(1).iterations(u.forceIterations)).force("constrain",fe(_e,he,se,De)).stop()}function re(_e,he,De,xe,se){window.requestAnimationFrame(function Ee(){var Te;for(Te=0;Te<u.forceTicksPerFrame;Te++)De.forceLayouts[xe].tick();var Be=De.graph.nodes;if(be(Be),De.sankey.update(De.graph),$(_e.filter(Le(De)),he),De.forceLayouts[xe].alpha()>0)window.requestAnimationFrame(Ee);else{var tt=De.node.originalX;De.node.x0=tt-De.visibleWidth/2,De.node.x1=tt+De.visibleWidth/2,we(De,se)}})}function fe(_e,he,De,xe){return function(){for(var Ee=0,Te=0;Te<De.length;Te++){var Be=De[Te];Be===xe.interactionState.dragInProgress?(Be.x=Be.lastDraggedX,Be.y=Be.lastDraggedY):(Be.vx=(Be.originalX-Be.x)/u.forceTicksPerFrame,Be.y=Math.min(xe.size-Be.dy/2,Math.max(Be.dy/2,Be.y))),Ee=Math.max(Ee,Math.abs(Be.vx),Math.abs(Be.vy))}!xe.interactionState.dragInProgress&&Ee<.1&&xe.forceLayouts[he].alpha()>0&&xe.forceLayouts[he].alpha(0)}}function we(_e,he){for(var De=[],xe=[],se=0;se<_e.graph.nodes.length;se++){var Ee=(_e.graph.nodes[se].x0+_e.graph.nodes[se].x1)/2,Te=(_e.graph.nodes[se].y0+_e.graph.nodes[se].y1)/2;De.push(Ee/_e.figure.width),xe.push(Te/_e.figure.height)}g.call("_guiRestyle",he,{"node.x":[De],"node.y":[xe]},_e.trace.index).then(function(){he._fullLayout._dragCover&&he._fullLayout._dragCover.remove()})}function Oe(_e){var he=[],De;for(De=0;De<_e.length;De++)_e[De].originalX=(_e[De].x0+_e[De].x1)/2,_e[De].originalY=(_e[De].y0+_e[De].y1)/2,he.indexOf(_e[De].originalX)===-1&&he.push(_e[De].originalX);for(he.sort(function(xe,se){return xe-se}),De=0;De<_e.length;De++)_e[De].originalLayerIndex=he.indexOf(_e[De].originalX),_e[De].originalLayer=_e[De].originalLayerIndex/(he.length-1)}function ke(_e){_e.lastDraggedX=_e.x0+_e.dx/2,_e.lastDraggedY=_e.y0+_e.dy/2}function Le(_e){return function(he){return he.node.originalX===_e.node.originalX}}function oe(_e){for(var he=0;he<_e.length;he++)_e[he].y=(_e[he].y0+_e[he].y1)/2,_e[he].x=(_e[he].x0+_e[he].x1)/2}function be(_e){for(var he=0;he<_e.length;he++)_e[he].y0=_e[he].y-_e[he].dy/2,_e[he].y1=_e[he].y0+_e[he].dy,_e[he].x0=_e[he].x-_e[he].dx/2,_e[he].x1=_e[he].x0+_e[he].dx}le.exports=function(_e,he,De,xe,se){var Ee=_e._context.staticPlot,Te=!1;v.ensureSingle(_e._fullLayout._infolayer,"g","first-render",function(){Te=!0});var Be=_e._fullLayout._dragCover,tt=De.filter(function(Ft){return E(Ft).trace.visible}).map(k.bind(null,xe)),at=he.selectAll("."+u.cn.sankey).data(tt,x);at.exit().remove(),at.enter().append("g").classed(u.cn.sankey,!0).style("box-sizing","content-box").style("position","absolute").style("left",0).style("shape-rendering","geometricPrecision").style("pointer-events",Ee?"none":"auto").attr("transform",Q),at.each(function(Ft,st){_e._fullData[st]._sankey=Ft;var rt="bgsankey-"+Ft.trace.uid+"-"+st;v.ensureSingle(_e._fullLayout._draggers,"rect",rt),_e._fullData[st]._bgRect=O.select("."+rt),_e._fullData[st]._bgRect.style("pointer-events",Ee?"none":"all").attr("width",Ft.width).attr("height",Ft.height).attr("x",Ft.translateX).attr("y",Ft.translateY).classed("bgsankey",!0).style({fill:"transparent","stroke-width":0})}),at.transition().ease(u.ease).duration(u.duration).attr("transform",Q);var gt=at.selectAll("."+u.cn.sankeyLinks).data(A,x);gt.enter().append("g").classed(u.cn.sankeyLinks,!0).style("fill","none");var pt=gt.selectAll("."+u.cn.sankeyLink).data(function(Ft){var st=Ft.graph.links;return st.filter(function(rt){return rt.value}).map(P.bind(null,Ft))},x);pt.enter().append("path").classed(u.cn.sankeyLink,!0).call(J,at,se.linkEvents),pt.style("stroke",function(Ft){return K(Ft)?p.tinyRGB(c(Ft.linkLineColor)):Ft.tinyColorHue}).style("stroke-opacity",function(Ft){return K(Ft)?p.opacity(Ft.linkLineColor):Ft.tinyColorAlpha}).style("fill",function(Ft){return Ft.tinyColorHue}).style("fill-opacity",function(Ft){return Ft.tinyColorAlpha}).style("stroke-width",function(Ft){return K(Ft)?Ft.linkLineWidth:1}).attr("d",y()),pt.style("opacity",function(){return _e._context.staticPlot||Te||Be?1:0}).transition().ease(u.ease).duration(u.duration).style("opacity",1),pt.exit().transition().ease(u.ease).duration(u.duration).style("opacity",0).remove();var Rt=at.selectAll("."+u.cn.sankeyNodeSet).data(A,x);Rt.enter().append("g").classed(u.cn.sankeyNodeSet,!0),Rt.style("cursor",function(Ft){switch(Ft.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var $t=Rt.selectAll("."+u.cn.sankeyNode).data(function(Ft){var st=Ft.graph.nodes;return Oe(st),st.map(S.bind(null,Ft))},x);$t.enter().append("g").classed(u.cn.sankeyNode,!0).call(M).style("opacity",function(Ft){return(_e._context.staticPlot||Te)&&!Ft.partOfGroup?1:0}),$t.call(J,at,se.nodeEvents).call(G,pt,se,_e),$t.transition().ease(u.ease).duration(u.duration).call(M).style("opacity",function(Ft){return Ft.partOfGroup?0:1}),$t.exit().transition().ease(u.ease).duration(u.duration).style("opacity",0).remove();var Wt=$t.selectAll("."+u.cn.nodeRect).data(A);Wt.enter().append("rect").classed(u.cn.nodeRect,!0).call(Z),Wt.style("stroke-width",function(Ft){return Ft.nodeLineWidth}).style("stroke",function(Ft){return p.tinyRGB(c(Ft.nodeLineColor))}).style("stroke-opacity",function(Ft){return p.opacity(Ft.nodeLineColor)}).style("fill",function(Ft){return Ft.tinyColorHue}).style("fill-opacity",function(Ft){return Ft.tinyColorAlpha}),Wt.transition().ease(u.ease).duration(u.duration).call(Z);var Ht=$t.selectAll("."+u.cn.nodeLabel).data(A);Ht.enter().append("text").classed(u.cn.nodeLabel,!0).style("cursor","default"),Ht.attr("data-notex",1).text(function(Ft){return Ft.node.label}).each(function(Ft){var st=O.select(this);f.font(st,Ft.textFont),D.convertToTspans(st,_e)}).attr("text-anchor",function(Ft){return Ft.horizontal&&Ft.left?"end":"start"}).attr("transform",function(Ft){var st=O.select(this),rt=D.lineCount(st),Ue=Ft.textFont.size*((rt-1)*N-I),xt=Ft.nodeLineWidth/2+F,Gt=((Ft.horizontal?Ft.visibleHeight:Ft.visibleWidth)-Ue)/2;Ft.horizontal&&(Ft.left?xt=-xt:xt+=Ft.visibleWidth);var Jt=Ft.horizontal?"":"scale(-1,1)"+m(90);return h(Ft.horizontal?xt:Gt,Ft.horizontal?Gt:xt)+Jt}),Ht.transition().ease(u.ease).duration(u.duration)}}}),Vxe=U({"src/traces/sankey/plot.js"(pe,le){var w=Ze(),R=ii(),O=R.numberFormat,z=Ytt(),l=Dp(),u=Lr(),c=jxe().cn,p=R._;function f(I){return I!==""}function v(I,N){return I.filter(function(F){return F.key===N.traceId})}function h(I,N){w.select(I).select("path").style("fill-opacity",N),w.select(I).select("rect").style("fill-opacity",N)}function m(I){w.select(I).select("text.name").style("fill","black")}function _(I){return function(N){return I.node.sourceLinks.indexOf(N.link)!==-1||I.node.targetLinks.indexOf(N.link)!==-1}}function x(I){return function(N){return N.node.sourceLinks.indexOf(I.link)!==-1||N.node.targetLinks.indexOf(I.link)!==-1}}function A(I,N,F){N&&F&&v(F,N).selectAll("."+c.sankeyLink).filter(_(N)).call(D.bind(0,N,F,!1))}function E(I,N,F){N&&F&&v(F,N).selectAll("."+c.sankeyLink).filter(_(N)).call(g.bind(0,N,F,!1))}function D(I,N,F,k){k.style("fill",function(P){if(!P.link.concentrationscale)return P.tinyColorHoverHue}).style("fill-opacity",function(P){if(!P.link.concentrationscale)return P.tinyColorHoverAlpha}),k.each(function(P){var T=P.link.label;T!==""&&v(N,I).selectAll("."+c.sankeyLink).filter(function(y){return y.link.label===T}).style("fill",function(y){if(!y.link.concentrationscale)return y.tinyColorHoverHue}).style("fill-opacity",function(y){if(!y.link.concentrationscale)return y.tinyColorHoverAlpha})}),F&&v(N,I).selectAll("."+c.sankeyNode).filter(x(I)).call(A)}function g(I,N,F,k){k.style("fill",function(P){return P.tinyColorHue}).style("fill-opacity",function(P){return P.tinyColorAlpha}),k.each(function(P){var T=P.link.label;T!==""&&v(N,I).selectAll("."+c.sankeyLink).filter(function(y){return y.link.label===T}).style("fill",function(y){return y.tinyColorHue}).style("fill-opacity",function(y){return y.tinyColorAlpha})}),F&&v(N,I).selectAll(c.sankeyNode).filter(x(I)).call(E)}function C(I,N){var F=I.hoverlabel||{},k=R.nestedProperty(F,N).get();return Array.isArray(k)?!1:k}le.exports=function(N,F){for(var k=N._fullLayout,P=k._paper,T=k._size,y=0;y<N._fullData.length;y++)if(N._fullData[y].visible&&N._fullData[y].type===c.sankey&&!N._fullData[y]._viewInitial){var S=N._fullData[y].node;N._fullData[y]._viewInitial={node:{groups:S.groups.slice(),x:S.x.slice(),y:S.y.slice()}}}var M=function(ke,Le){var oe=Le.link;oe.originalEvent=w.event,N._hoverdata=[oe],l.click(N,{target:!0})},W=function(ke,Le,oe){N._fullLayout.hovermode!==!1&&(w.select(ke).call(D.bind(0,Le,oe,!0)),Le.link.trace.link.hoverinfo!=="skip"&&(Le.link.fullData=Le.link.trace,N.emit("plotly_hover",{event:w.event,points:[Le.link]})))},$=p(N,"source:")+" ",Z=p(N,"target:")+" ",K=p(N,"concentration:")+" ",Q=p(N,"incoming flow count:")+" ",J=p(N,"outgoing flow count:")+" ",G=function(ke,Le){if(N._fullLayout.hovermode===!1)return;var oe=Le.link.trace.link;if(oe.hoverinfo==="none"||oe.hoverinfo==="skip")return;var be=[];function _e(Be){var tt,at;Be.circular?(tt=(Be.circularPathData.leftInnerExtent+Be.circularPathData.rightInnerExtent)/2,at=Be.circularPathData.verticalFullExtent):(tt=(Be.source.x1+Be.target.x0)/2,at=(Be.y0+Be.y1)/2);var gt=[tt,at];return Be.trace.orientation==="v"&&gt.reverse(),gt[0]+=Le.parent.translateX,gt[1]+=Le.parent.translateY,gt}for(var he=0,De=0;De<Le.flow.links.length;De++){var xe=Le.flow.links[De];if(!(N._fullLayout.hovermode==="closest"&&Le.link.pointNumber!==xe.pointNumber)){Le.link.pointNumber===xe.pointNumber&&(he=De),xe.fullData=xe.trace,oe=Le.link.trace.link;var se=_e(xe),Ee={valueLabel:O(Le.valueFormat)(xe.value)+Le.valueSuffix};be.push({x:se[0],y:se[1],name:Ee.valueLabel,text:[xe.label||"",$+xe.source.label,Z+xe.target.label,xe.concentrationscale?K+O("%0.2f")(xe.flow.labelConcentration):""].filter(f).join("<br>"),color:C(oe,"bgcolor")||u.addOpacity(xe.color,1),borderColor:C(oe,"bordercolor"),fontFamily:C(oe,"font.family"),fontSize:C(oe,"font.size"),fontColor:C(oe,"font.color"),fontWeight:C(oe,"font.weight"),fontStyle:C(oe,"font.style"),fontVariant:C(oe,"font.variant"),fontTextcase:C(oe,"font.textcase"),fontLineposition:C(oe,"font.lineposition"),fontShadow:C(oe,"font.shadow"),nameLength:C(oe,"namelength"),textAlign:C(oe,"align"),idealAlign:w.event.x<se[0]?"right":"left",hovertemplate:oe.hovertemplate,hovertemplateLabels:Ee,eventData:[xe]})}}var Te=l.loneHover(be,{container:k._hoverlayer.node(),outerContainer:k._paper.node(),gd:N,anchorIndex:he});Te.each(function(){var Be=this;Le.link.concentrationscale||h(Be,.65),m(Be)})},ee=function(ke,Le,oe){N._fullLayout.hovermode!==!1&&(w.select(ke).call(g.bind(0,Le,oe,!0)),Le.link.trace.link.hoverinfo!=="skip"&&(Le.link.fullData=Le.link.trace,N.emit("plotly_unhover",{event:w.event,points:[Le.link]})),l.loneUnhover(k._hoverlayer.node()))},re=function(ke,Le,oe){var be=Le.node;be.originalEvent=w.event,N._hoverdata=[be],w.select(ke).call(E,Le,oe),l.click(N,{target:!0})},fe=function(ke,Le,oe){N._fullLayout.hovermode!==!1&&(w.select(ke).call(A,Le,oe),Le.node.trace.node.hoverinfo!=="skip"&&(Le.node.fullData=Le.node.trace,N.emit("plotly_hover",{event:w.event,points:[Le.node]})))},we=function(ke,Le){if(N._fullLayout.hovermode!==!1){var oe=Le.node.trace.node;if(!(oe.hoverinfo==="none"||oe.hoverinfo==="skip")){var be=w.select(ke).select("."+c.nodeRect),_e=N._fullLayout._paperdiv.node().getBoundingClientRect(),he=be.node().getBoundingClientRect(),De=he.left-2-_e.left,xe=he.right+2-_e.left,se=he.top+he.height/4-_e.top,Ee={valueLabel:O(Le.valueFormat)(Le.node.value)+Le.valueSuffix};Le.node.fullData=Le.node.trace,N._fullLayout._calcInverseTransform(N);var Te=N._fullLayout._invScaleX,Be=N._fullLayout._invScaleY,tt=l.loneHover({x0:Te*De,x1:Te*xe,y:Be*se,name:O(Le.valueFormat)(Le.node.value)+Le.valueSuffix,text:[Le.node.label,Q+Le.node.targetLinks.length,J+Le.node.sourceLinks.length].filter(f).join("<br>"),color:C(oe,"bgcolor")||Le.tinyColorHue,borderColor:C(oe,"bordercolor"),fontFamily:C(oe,"font.family"),fontSize:C(oe,"font.size"),fontColor:C(oe,"font.color"),fontWeight:C(oe,"font.weight"),fontStyle:C(oe,"font.style"),fontVariant:C(oe,"font.variant"),fontTextcase:C(oe,"font.textcase"),fontLineposition:C(oe,"font.lineposition"),fontShadow:C(oe,"font.shadow"),nameLength:C(oe,"namelength"),textAlign:C(oe,"align"),idealAlign:"left",hovertemplate:oe.hovertemplate,hovertemplateLabels:Ee,eventData:[Le.node]},{container:k._hoverlayer.node(),outerContainer:k._paper.node(),gd:N});h(tt,.85),m(tt)}}},Oe=function(ke,Le,oe){N._fullLayout.hovermode!==!1&&(w.select(ke).call(E,Le,oe),Le.node.trace.node.hoverinfo!=="skip"&&(Le.node.fullData=Le.node.trace,N.emit("plotly_unhover",{event:w.event,points:[Le.node]})),l.loneUnhover(k._hoverlayer.node()))};z(N,P,F,{width:T.w,height:T.h,margin:{t:T.t,r:T.r,b:T.b,l:T.l}},{linkEvents:{hover:W,follow:G,unhover:ee,select:M},nodeEvents:{hover:fe,follow:we,unhover:Oe,select:re}})}}}),Xtt=U({"src/traces/sankey/base_plot.js"(pe){var le=zl().overrideAll,w=Om().getModuleCalcData,R=Vxe(),O=Un(),z=i_(),l=Vp(),u=Vf().prepSelect,c=ii(),p=Mi(),f="sankey";pe.name=f,pe.baseLayoutAttrOverrides=le({hoverlabel:O.hoverlabel},"plot","nested"),pe.plot=function(h){var m=w(h.calcdata,f)[0];R(h,m),pe.updateFx(h)},pe.clean=function(h,m,_,x){var A=x._has&&x._has(f),E=m._has&&m._has(f);A&&!E&&(x._paperdiv.selectAll(".sankey").remove(),x._paperdiv.selectAll(".bgsankey").remove())},pe.updateFx=function(h){for(var m=0;m<h._fullData.length;m++)v(h,m)};function v(h,m){var _=h._fullData[m],x=h._fullLayout,A=x.dragmode,E=x.dragmode==="pan"?"move":"crosshair",D=_._bgRect;if(D&&!(A==="pan"||A==="zoom")){z(D,E);var g={_id:"x",c2p:c.identity,_offset:_._sankey.translateX,_length:_._sankey.width},C={_id:"y",c2p:c.identity,_offset:_._sankey.translateY,_length:_._sankey.height},I={gd:h,element:D.node(),plotinfo:{id:m,xaxis:g,yaxis:C,fillRangeItems:c.noop},subplot:m,xaxes:[g],yaxes:[C],doneFnCompleted:function(N){var F=h._fullData[m],k,P=F.node.groups.slice(),T=[];function y($){for(var Z=F._sankey.graph.nodes,K=0;K<Z.length;K++)if(Z[K].pointNumber===$)return Z[K]}for(var S=0;S<N.length;S++){var M=y(N[S].pointNumber);if(M)if(M.group){for(var W=0;W<M.childrenNodes.length;W++)T.push(M.childrenNodes[W].pointNumber);P[M.pointNumber-F.node._count]=!1}else T.push(M.pointNumber)}k=P.filter(Boolean).concat([T]),p.call("_guiRestyle",h,{"node.groups":[k]},m)}};I.prepFn=function(N,F,k){u(N,F,k,I,A)},l.init(I)}}}}),Ztt=U({"src/traces/sankey/select.js"(pe,le){le.exports=function(R,O){for(var z=R.cd,l=[],u=z[0].trace,c=u._sankey.graph.nodes,p=0;p<c.length;p++){var f=c[p];if(!f.partOfGroup){var v=[(f.x0+f.x1)/2,(f.y0+f.y1)/2];u.orientation==="v"&&v.reverse(),O&&O.contains(v,!1,p,R)&&l.push({pointNumber:f.pointNumber})}}return l}}}),Ktt=U({"src/traces/sankey/index.js"(pe,le){le.exports={attributes:Bxe(),supplyDefaults:ztt(),calc:Btt(),plot:Vxe(),moduleType:"trace",name:"sankey",basePlotModule:Xtt(),selectPoints:Ztt(),categories:["noOpacity"],meta:{}}}}),Jtt=U({"lib/sankey.js"(pe,le){le.exports=Ktt()}}),Qtt=U({"src/traces/indicator/base_plot.js"(pe){var le=tp();pe.name="indicator",pe.plot=function(w,R,O,z){le.plotBasePlot(pe.name,w,R,O,z)},pe.clean=function(w,R,O,z){le.cleanBasePlot(pe.name,w,R,O,z)}}}),qxe=U({"src/traces/indicator/attributes.js"(pe,le){var w=Ar().extendFlat,R=Ar().extendDeep,O=zl().overrideAll,z=Ir(),l=jn(),u=oh().attributes,c=Hg(),p=Tc().templatedArray,f=lw(),v=Wp().descriptionOnlyNumbers,h=z({editType:"plot",colorEditType:"plot"}),m={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:l.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"},_={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},x=p("step",R({},m,{range:_}));le.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:u({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:w({},h,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:v("value")},font:w({},h,{}),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:v("value")},increasing:{symbol:{valType:"string",dflt:f.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:f.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:f.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:f.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:w({},h,{}),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:R({},m,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:l.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:O({range:_,visible:w({},c.visible,{dflt:!0}),tickmode:c.minor.tickmode,nticks:c.nticks,tick0:c.tick0,dtick:c.dtick,tickvals:c.tickvals,ticktext:c.ticktext,ticks:w({},c.ticks,{dflt:"outside"}),ticklen:c.ticklen,tickwidth:c.tickwidth,tickcolor:c.tickcolor,ticklabelstep:c.ticklabelstep,showticklabels:c.showticklabels,labelalias:c.labelalias,tickfont:z({}),tickangle:c.tickangle,tickformat:c.tickformat,tickformatstops:c.tickformatstops,tickprefix:c.tickprefix,showtickprefix:c.showtickprefix,ticksuffix:c.ticksuffix,showticksuffix:c.showticksuffix,separatethousands:c.separatethousands,exponentformat:c.exponentformat,minexponent:c.minexponent,showexponent:c.showexponent,editType:"plot"},"plot"),steps:x,threshold:{line:{color:w({},m.line.color,{}),width:w({},m.line.width,{dflt:1}),editType:"plot"},thickness:w({},m.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}}}),Gxe=U({"src/traces/indicator/constants.js"(pe,le){le.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}}}),ert=U({"src/traces/indicator/defaults.js"(pe,le){var w=ii(),R=qxe(),O=oh().defaults,z=Tc(),l=_g(),u=Gxe(),c=n_(),p=rb(),f=A1(),v=Xw();function h(_,x,A,E){function D(G,ee){return w.coerce(_,x,R,G,ee)}O(x,E,D),D("mode"),x._hasNumber=x.mode.indexOf("number")!==-1,x._hasDelta=x.mode.indexOf("delta")!==-1,x._hasGauge=x.mode.indexOf("gauge")!==-1;var g=D("value");x._range=[0,typeof g=="number"?1.5*g:1];var C=new Array(2),I;if(x._hasNumber){D("number.valueformat");var N=w.extendFlat({},E.font);N.size=void 0,w.coerceFont(D,"number.font",N),x.number.font.size===void 0&&(x.number.font.size=u.defaultNumberFontSize,C[0]=!0),D("number.prefix"),D("number.suffix"),I=x.number.font.size}var F;if(x._hasDelta){var k=w.extendFlat({},E.font);k.size=void 0,w.coerceFont(D,"delta.font",k),x.delta.font.size===void 0&&(x.delta.font.size=(x._hasNumber?.5:1)*(I||u.defaultNumberFontSize),C[1]=!0),D("delta.reference",x.value),D("delta.relative"),D("delta.valueformat",x.delta.relative?"2%":""),D("delta.increasing.symbol"),D("delta.increasing.color"),D("delta.decreasing.symbol"),D("delta.decreasing.color"),D("delta.position"),D("delta.prefix"),D("delta.suffix"),F=x.delta.font.size}x._scaleNumbers=(!x._hasNumber||C[0])&&(!x._hasDelta||C[1])||!1;var P=w.extendFlat({},E.font);P.size=.25*(I||F||u.defaultNumberFontSize),w.coerceFont(D,"title.font",P),D("title.text");var T,y,S,M;function W(G,ee){return w.coerce(T,y,R.gauge,G,ee)}function $(G,ee){return w.coerce(S,M,R.gauge.axis,G,ee)}if(x._hasGauge){T=_.gauge,T||(T={}),y=z.newContainer(x,"gauge"),W("shape");var Z=x._isBullet=x.gauge.shape==="bullet";Z||D("title.align","center");var K=x._isAngular=x.gauge.shape==="angular";K||D("align","center"),W("bgcolor",E.paper_bgcolor),W("borderwidth"),W("bordercolor"),W("bar.color"),W("bar.line.color"),W("bar.line.width");var Q=u.valueThickness*(x.gauge.shape==="bullet"?.5:1);W("bar.thickness",Q),l(T,y,{name:"steps",handleItemDefaults:m}),W("threshold.value"),W("threshold.thickness"),W("threshold.line.width"),W("threshold.line.color"),S={},T&&(S=T.axis||{}),M=z.newContainer(y,"axis"),$("visible"),x._range=$("range",x._range);var J={font:E.font,noAutotickangles:!0,outerTicks:!0,noTicklabelshift:!0,noTicklabelstandoff:!0};c(S,M,$,"linear"),v(S,M,$,"linear",J),f(S,M,$,"linear",J),p(S,M,$,J)}else D("title.align","center"),D("align","center"),x._isAngular=x._isBullet=!1;x._length=null}function m(_,x){function A(E,D){return w.coerce(_,x,R.gauge.steps,E,D)}A("color"),A("line.color"),A("line.width"),A("range"),A("thickness")}le.exports={supplyDefaults:h}}}),trt=U({"src/traces/indicator/calc.js"(pe,le){function w(R,O){var z=[],l=O.value;typeof O._lastValue!="number"&&(O._lastValue=O.value);var u=O._lastValue,c=u;return O._hasDelta&&typeof O.delta.reference=="number"&&(c=O.delta.reference),z[0]={y:l,lastY:u,delta:l-c,relativeDelta:(l-c)/c},z}le.exports={calc:w}}}),rrt=U({"src/traces/indicator/plot.js"(pe,le){var w=Ze(),R=(MI(),Me(OR)).interpolate,O=(MI(),Me(OR)).interpolateNumber,z=ii(),l=z.strScale,u=z.strTranslate,c=z.rad2deg,p=tg().MID_SHIFT,f=ec(),v=Gxe(),h=ah(),m=Yu(),_=CA(),x=MA(),A=Hg(),E=Lr(),D={left:"start",center:"middle",right:"end"},g={left:0,center:.5,right:1},C=/[yzafpnµmkMGTPEZY]/;function I(Z){return Z&&Z.duration>0}le.exports=function(K,Q,J,G){var ee=K._fullLayout,re;I(J)&&G&&(re=G()),z.makeTraceGroups(ee._indicatorlayer,Q,"trace").each(function(fe){var we=fe[0],Oe=we.trace,ke=w.select(this),Le=Oe._hasGauge,oe=Oe._isAngular,be=Oe._isBullet,_e=Oe.domain,he={w:ee._size.w*(_e.x[1]-_e.x[0]),h:ee._size.h*(_e.y[1]-_e.y[0]),l:ee._size.l+ee._size.w*_e.x[0],r:ee._size.r+ee._size.w*(1-_e.x[1]),t:ee._size.t+ee._size.h*(1-_e.y[1]),b:ee._size.b+ee._size.h*_e.y[0]},De=he.l+he.w/2,xe=he.t+he.h/2,se=Math.min(he.w/2,he.h),Ee=v.innerRadius*se,Te,Be,tt,at=Oe.align||"center";if(Be=xe,!Le)Te=he.l+g[at]*he.w,tt=function(Ue){return S(Ue,he.w,he.h)};else if(oe&&(Te=De,Be=xe+se/2,tt=function(Ue){return M(Ue,.9*Ee)}),be){var gt=v.bulletPadding,pt=1-v.bulletNumberDomainSize+gt;Te=he.l+(pt+(1-pt)*g[at])*he.w,tt=function(Ue){return S(Ue,(v.bulletNumberDomainSize-gt)*he.w,he.h)}}k(K,ke,fe,{numbersX:Te,numbersY:Be,numbersScaler:tt,transitionOpts:J,onComplete:re});var Rt,$t;Le&&(Rt={range:Oe.gauge.axis.range,color:Oe.gauge.bgcolor,line:{color:Oe.gauge.bordercolor,width:0},thickness:1},$t={range:Oe.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:Oe.gauge.bordercolor,width:Oe.gauge.borderwidth},thickness:1});var Wt=ke.selectAll("g.angular").data(oe?fe:[]);Wt.exit().remove();var Ht=ke.selectAll("g.angularaxis").data(oe?fe:[]);Ht.exit().remove(),oe&&F(K,ke,fe,{radius:se,innerRadius:Ee,gauge:Wt,layer:Ht,size:he,gaugeBg:Rt,gaugeOutline:$t,transitionOpts:J,onComplete:re});var Ft=ke.selectAll("g.bullet").data(be?fe:[]);Ft.exit().remove();var st=ke.selectAll("g.bulletaxis").data(be?fe:[]);st.exit().remove(),be&&N(K,ke,fe,{gauge:Ft,layer:st,size:he,gaugeBg:Rt,gaugeOutline:$t,transitionOpts:J,onComplete:re});var rt=ke.selectAll("text.title").data(fe);rt.exit().remove(),rt.enter().append("text").classed("title",!0),rt.attr("text-anchor",function(){return be?D.right:D[Oe.title.align]}).text(Oe.title.text).call(f.font,Oe.title.font).call(h.convertToTspans,K),rt.attr("transform",function(){var Ue=he.l+he.w*g[Oe.title.align],xt,Gt=v.titlePadding,Jt=f.bBox(rt.node());if(Le){if(oe)if(Oe.gauge.axis.visible){var Ut=f.bBox(Ht.node());xt=Ut.top-Gt-Jt.bottom}else xt=he.t+he.h/2-se/2-Jt.bottom-Gt;be&&(xt=Be-(Jt.top+Jt.bottom)/2,Ue=he.l-v.bulletPadding*he.w)}else xt=Oe._numbersTop-Gt-Jt.bottom;return u(Ue,xt)})})};function N(Z,K,Q,J){var G=Q[0].trace,ee=J.gauge,re=J.layer,fe=J.gaugeBg,we=J.gaugeOutline,Oe=J.size,ke=G.domain,Le=J.transitionOpts,oe=J.onComplete,be,_e,he,De,xe;ee.enter().append("g").classed("bullet",!0),ee.attr("transform",u(Oe.l,Oe.t)),re.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),re.selectAll("g.xbulletaxistick,path,text").remove();var se=Oe.h,Ee=G.gauge.bar.thickness*se,Te=ke.x[0],Be=ke.x[0]+(ke.x[1]-ke.x[0])*(G._hasNumber||G._hasDelta?1-v.bulletNumberDomainSize:1);be=y(Z,G.gauge.axis),be._id="xbulletaxis",be.domain=[Te,Be],be.setScale(),_e=m.calcTicks(be),he=m.makeTransTickFn(be),De=m.getTickSigns(be)[2],xe=Oe.t+Oe.h,be.visible&&(m.drawTicks(Z,be,{vals:be.ticks==="inside"?m.clipEnds(be,_e):_e,layer:re,path:m.makeTickPath(be,xe,De),transFn:he}),m.drawLabels(Z,be,{vals:_e,layer:re,transFn:he,labelFns:m.makeLabelFns(be,xe)}));function tt(Ht){Ht.attr("width",function(Ft){return Math.max(0,be.c2p(Ft.range[1])-be.c2p(Ft.range[0]))}).attr("x",function(Ft){return be.c2p(Ft.range[0])}).attr("y",function(Ft){return .5*(1-Ft.thickness)*se}).attr("height",function(Ft){return Ft.thickness*se})}var at=[fe].concat(G.gauge.steps),gt=ee.selectAll("g.bg-bullet").data(at);gt.enter().append("g").classed("bg-bullet",!0).append("rect"),gt.select("rect").call(tt).call(P),gt.exit().remove();var pt=ee.selectAll("g.value-bullet").data([G.gauge.bar]);pt.enter().append("g").classed("value-bullet",!0).append("rect"),pt.select("rect").attr("height",Ee).attr("y",(se-Ee)/2).call(P),I(Le)?pt.select("rect").transition().duration(Le.duration).ease(Le.easing).each("end",function(){oe&&oe()}).each("interrupt",function(){oe&&oe()}).attr("width",Math.max(0,be.c2p(Math.min(G.gauge.axis.range[1],Q[0].y)))):pt.select("rect").attr("width",typeof Q[0].y=="number"?Math.max(0,be.c2p(Math.min(G.gauge.axis.range[1],Q[0].y))):0),pt.exit().remove();var Rt=Q.filter(function(){return G.gauge.threshold.value||G.gauge.threshold.value===0}),$t=ee.selectAll("g.threshold-bullet").data(Rt);$t.enter().append("g").classed("threshold-bullet",!0).append("line"),$t.select("line").attr("x1",be.c2p(G.gauge.threshold.value)).attr("x2",be.c2p(G.gauge.threshold.value)).attr("y1",(1-G.gauge.threshold.thickness)/2*se).attr("y2",(1-(1-G.gauge.threshold.thickness)/2)*se).call(E.stroke,G.gauge.threshold.line.color).style("stroke-width",G.gauge.threshold.line.width),$t.exit().remove();var Wt=ee.selectAll("g.gauge-outline").data([we]);Wt.enter().append("g").classed("gauge-outline",!0).append("rect"),Wt.select("rect").call(tt).call(P),Wt.exit().remove()}function F(Z,K,Q,J){var G=Q[0].trace,ee=J.size,re=J.radius,fe=J.innerRadius,we=J.gaugeBg,Oe=J.gaugeOutline,ke=[ee.l+ee.w/2,ee.t+ee.h/2+re/2],Le=J.gauge,oe=J.layer,be=J.transitionOpts,_e=J.onComplete,he=Math.PI/2;function De(kr){var Pr=G.gauge.axis.range[0],$r=G.gauge.axis.range[1],rn=(kr-Pr)/($r-Pr)*Math.PI-he;return rn<-he?-he:rn>he?he:rn}function xe(kr){return w.svg.arc().innerRadius((fe+re)/2-kr/2*(re-fe)).outerRadius((fe+re)/2+kr/2*(re-fe)).startAngle(-he)}function se(kr){kr.attr("d",function(Pr){return xe(Pr.thickness).startAngle(De(Pr.range[0])).endAngle(De(Pr.range[1]))()})}var Ee,Te,Be,tt;Le.enter().append("g").classed("angular",!0),Le.attr("transform",u(ke[0],ke[1])),oe.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),oe.selectAll("g.xangularaxistick,path,text").remove(),Ee=y(Z,G.gauge.axis),Ee.type="linear",Ee.range=G.gauge.axis.range,Ee._id="xangularaxis",Ee.ticklabeloverflow="allow",Ee.setScale();var at=function(kr){return(Ee.range[0]-kr.x)/(Ee.range[1]-Ee.range[0])*Math.PI+Math.PI},gt={},pt=m.makeLabelFns(Ee,0),Rt=pt.labelStandoff;gt.xFn=function(kr){var Pr=at(kr);return Math.cos(Pr)*Rt},gt.yFn=function(kr){var Pr=at(kr),$r=Math.sin(Pr)>0?.2:1;return-Math.sin(Pr)*(Rt+kr.fontSize*$r)+Math.abs(Math.cos(Pr))*(kr.fontSize*p)},gt.anchorFn=function(kr){var Pr=at(kr),$r=Math.cos(Pr);return Math.abs($r)<.1?"middle":$r>0?"start":"end"},gt.heightFn=function(kr,Pr,$r){var rn=at(kr);return-.5*(1+Math.sin(rn))*$r};var $t=function(kr){return u(ke[0]+re*Math.cos(kr),ke[1]-re*Math.sin(kr))};Be=function(kr){return $t(at(kr))};var Wt=function(kr){var Pr=at(kr);return $t(Pr)+"rotate("+-c(Pr)+")"};if(Te=m.calcTicks(Ee),tt=m.getTickSigns(Ee)[2],Ee.visible){tt=Ee.ticks==="inside"?-1:1;var Ht=(Ee.linewidth||1)/2;m.drawTicks(Z,Ee,{vals:Te,layer:oe,path:"M"+tt*Ht+",0h"+tt*Ee.ticklen,transFn:Wt}),m.drawLabels(Z,Ee,{vals:Te,layer:oe,transFn:Be,labelFns:gt})}var Ft=[we].concat(G.gauge.steps),st=Le.selectAll("g.bg-arc").data(Ft);st.enter().append("g").classed("bg-arc",!0).append("path"),st.select("path").call(se).call(P),st.exit().remove();var rt=xe(G.gauge.bar.thickness),Ue=Le.selectAll("g.value-arc").data([G.gauge.bar]);Ue.enter().append("g").classed("value-arc",!0).append("path");var xt=Ue.select("path");I(be)?(xt.transition().duration(be.duration).ease(be.easing).each("end",function(){_e&&_e()}).each("interrupt",function(){_e&&_e()}).attrTween("d",T(rt,De(Q[0].lastY),De(Q[0].y))),G._lastValue=Q[0].y):xt.attr("d",typeof Q[0].y=="number"?rt.endAngle(De(Q[0].y)):"M0,0Z"),xt.call(P),Ue.exit().remove(),Ft=[];var Gt=G.gauge.threshold.value;(Gt||Gt===0)&&Ft.push({range:[Gt,Gt],color:G.gauge.threshold.color,line:{color:G.gauge.threshold.line.color,width:G.gauge.threshold.line.width},thickness:G.gauge.threshold.thickness});var Jt=Le.selectAll("g.threshold-arc").data(Ft);Jt.enter().append("g").classed("threshold-arc",!0).append("path"),Jt.select("path").call(se).call(P),Jt.exit().remove();var Ut=Le.selectAll("g.gauge-outline").data([Oe]);Ut.enter().append("g").classed("gauge-outline",!0).append("path"),Ut.select("path").call(se).call(P),Ut.exit().remove()}function k(Z,K,Q,J){var G=Q[0].trace,ee=J.numbersX,re=J.numbersY,fe=G.align||"center",we=D[fe],Oe=J.transitionOpts,ke=J.onComplete,Le=z.ensureSingle(K,"g","numbers"),oe,be,_e,he=[];G._hasNumber&&he.push("number"),G._hasDelta&&(he.push("delta"),G.delta.position==="left"&&he.reverse());var De=Le.selectAll("text").data(he);De.enter().append("text"),De.attr("text-anchor",function(){return we}).attr("class",function($t){return $t}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),De.exit().remove();function xe($t,Wt,Ht,Ft){if($t.match("s")&&Ht>=0!=Ft>=0&&!Wt(Ht).slice(-1).match(C)&&!Wt(Ft).slice(-1).match(C)){var st=$t.slice().replace("s","f").replace(/\d+/,function(Ue){return parseInt(Ue)-1}),rt=y(Z,{tickformat:st});return function(Ue){return Math.abs(Ue)<1?m.tickText(rt,Ue).text:Wt(Ue)}}else return Wt}function se(){var $t=y(Z,{tickformat:G.number.valueformat},G._range);$t.setScale(),m.prepTicks($t);var Wt=function(Ue){return m.tickText($t,Ue).text},Ht=G.number.suffix,Ft=G.number.prefix,st=Le.select("text.number");function rt(){var Ue=typeof Q[0].y=="number"?Ft+Wt(Q[0].y)+Ht:"-";st.text(Ue).call(f.font,G.number.font).call(h.convertToTspans,Z)}return I(Oe)?st.transition().duration(Oe.duration).ease(Oe.easing).each("end",function(){rt(),ke&&ke()}).each("interrupt",function(){rt(),ke&&ke()}).attrTween("text",function(){var Ue=w.select(this),xt=O(Q[0].lastY,Q[0].y);G._lastValue=Q[0].y;var Gt=xe(G.number.valueformat,Wt,Q[0].lastY,Q[0].y);return function(Jt){Ue.text(Ft+Gt(xt(Jt))+Ht)}}):rt(),oe=W(Ft+Wt(Q[0].y)+Ht,G.number.font,we,Z),st}function Ee(){var $t=y(Z,{tickformat:G.delta.valueformat},G._range);$t.setScale(),m.prepTicks($t);var Wt=function(Jt){return m.tickText($t,Jt).text},Ht=G.delta.suffix,Ft=G.delta.prefix,st=function(Jt){var Ut=G.delta.relative?Jt.relativeDelta:Jt.delta;return Ut},rt=function(Jt,Ut){return Jt===0||typeof Jt!="number"||isNaN(Jt)?"-":(Jt>0?G.delta.increasing.symbol:G.delta.decreasing.symbol)+Ft+Ut(Jt)+Ht},Ue=function(Jt){return Jt.delta>=0?G.delta.increasing.color:G.delta.decreasing.color};G._deltaLastValue===void 0&&(G._deltaLastValue=st(Q[0]));var xt=Le.select("text.delta");xt.call(f.font,G.delta.font).call(E.fill,Ue({delta:G._deltaLastValue}));function Gt(){xt.text(rt(st(Q[0]),Wt)).call(E.fill,Ue(Q[0])).call(h.convertToTspans,Z)}return I(Oe)?xt.transition().duration(Oe.duration).ease(Oe.easing).tween("text",function(){var Jt=w.select(this),Ut=st(Q[0]),kr=G._deltaLastValue,Pr=xe(G.delta.valueformat,Wt,kr,Ut),$r=O(kr,Ut);return G._deltaLastValue=Ut,function(rn){Jt.text(rt($r(rn),Pr)),Jt.call(E.fill,Ue({delta:$r(rn)}))}}).each("end",function(){Gt(),ke&&ke()}).each("interrupt",function(){Gt(),ke&&ke()}):Gt(),be=W(rt(st(Q[0]),Wt),G.delta.font,we,Z),xt}var Te=G.mode+G.align,Be;if(G._hasDelta&&(Be=Ee(),Te+=G.delta.position+G.delta.font.size+G.delta.font.family+G.delta.valueformat,Te+=G.delta.increasing.symbol+G.delta.decreasing.symbol,_e=be),G._hasNumber&&(se(),Te+=G.number.font.size+G.number.font.family+G.number.valueformat+G.number.suffix+G.number.prefix,_e=oe),G._hasDelta&&G._hasNumber){var tt=[(oe.left+oe.right)/2,(oe.top+oe.bottom)/2],at=[(be.left+be.right)/2,(be.top+be.bottom)/2],gt,pt,Rt=.75*G.delta.font.size;G.delta.position==="left"&&(gt=$(G,"deltaPos",0,-1*(oe.width*g[G.align]+be.width*(1-g[G.align])+Rt),Te,Math.min),pt=tt[1]-at[1],_e={width:oe.width+be.width+Rt,height:Math.max(oe.height,be.height),left:be.left+gt,right:oe.right,top:Math.min(oe.top,be.top+pt),bottom:Math.max(oe.bottom,be.bottom+pt)}),G.delta.position==="right"&&(gt=$(G,"deltaPos",0,oe.width*(1-g[G.align])+be.width*g[G.align]+Rt,Te,Math.max),pt=tt[1]-at[1],_e={width:oe.width+be.width+Rt,height:Math.max(oe.height,be.height),left:oe.left,right:be.right+gt,top:Math.min(oe.top,be.top+pt),bottom:Math.max(oe.bottom,be.bottom+pt)}),G.delta.position==="bottom"&&(gt=null,pt=be.height,_e={width:Math.max(oe.width,be.width),height:oe.height+be.height,left:Math.min(oe.left,be.left),right:Math.max(oe.right,be.right),top:oe.bottom-oe.height,bottom:oe.bottom+be.height}),G.delta.position==="top"&&(gt=null,pt=oe.top,_e={width:Math.max(oe.width,be.width),height:oe.height+be.height,left:Math.min(oe.left,be.left),right:Math.max(oe.right,be.right),top:oe.bottom-oe.height-be.height,bottom:oe.bottom}),Be.attr({dx:gt,dy:pt})}(G._hasNumber||G._hasDelta)&&Le.attr("transform",function(){var $t=J.numbersScaler(_e);Te+=$t[2];var Wt=$(G,"numbersScale",1,$t[0],Te,Math.min),Ht;G._scaleNumbers||(Wt=1),G._isAngular?Ht=re-Wt*_e.bottom:Ht=re-Wt*(_e.top+_e.bottom)/2,G._numbersTop=Wt*_e.top+Ht;var Ft=_e[fe];fe==="center"&&(Ft=(_e.left+_e.right)/2);var st=ee-Wt*Ft;return st=$(G,"numbersTranslate",0,st,Te,Math.max),u(st,Ht)+l(Wt)})}function P(Z){Z.each(function(K){E.stroke(w.select(this),K.line.color)}).each(function(K){E.fill(w.select(this),K.color)}).style("stroke-width",function(K){return K.line.width})}function T(Z,K,Q){return function(){var J=R(K,Q);return function(G){return Z.endAngle(J(G))()}}}function y(Z,K,Q){var J=Z._fullLayout,G=z.extendFlat({type:"linear",ticks:"outside",range:Q,showline:!0},K),ee={type:"linear",_id:"x"+K._id},re={letter:"x",font:J.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function fe(we,Oe){return z.coerce(G,ee,A,we,Oe)}return _(G,ee,fe,re,J),x(G,ee,fe,re),ee}function S(Z,K,Q){var J=Math.min(K/Z.width,Q/Z.height);return[J,Z,K+"x"+Q]}function M(Z,K){var Q=Math.sqrt(Z.width/2*(Z.width/2)+Z.height*Z.height),J=K/Q;return[J,Z,K]}function W(Z,K,Q,J){var G=document.createElementNS("http://www.w3.org/2000/svg","text"),ee=w.select(G);return ee.text(Z).attr("x",0).attr("y",0).attr("text-anchor",Q).attr("data-unformatted",Z).call(h.convertToTspans,J).call(f.font,K),f.bBox(ee.node())}function $(Z,K,Q,J,G,ee){var re="_cache"+K;Z[re]&&Z[re].key===G||(Z[re]={key:G,value:Q});var fe=z.aggNums(ee,null,[Z[re].value,J],2);return Z[re].value=fe,fe}}}),nrt=U({"src/traces/indicator/index.js"(pe,le){le.exports={moduleType:"trace",name:"indicator",basePlotModule:Qtt(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:qxe(),supplyDefaults:ert().supplyDefaults,calc:trt().calc,plot:rrt(),meta:{}}}}),irt=U({"lib/indicator.js"(pe,le){le.exports=nrt()}}),$xe=U({"src/traces/table/attributes.js"(pe,le){var w=Fs(),R=Ar().extendFlat,O=zl().overrideAll,z=Ir(),l=oh().attributes,u=Wp().descriptionOnlyNumbers;le.exports=O({domain:l({name:"table",trace:!0}),columnwidth:{valType:"number",arrayOk:!0,dflt:null},columnorder:{valType:"data_array"},header:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:u("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:R({},w.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:R({},z({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:u("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:R({},w.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:R({},z({arrayOk:!0}))}},"calc","from-root")}}),art=U({"src/traces/table/defaults.js"(pe,le){var w=ii(),R=$xe(),O=oh().defaults;function z(l,u){for(var c=l.columnorder||[],p=l.header.values.length,f=c.slice(0,p),v=f.slice().sort(function(_,x){return _-x}),h=f.map(function(_){return v.indexOf(_)}),m=h.length;m<p;m++)h.push(m);u("columnorder",h)}le.exports=function(u,c,p,f){function v(h,m){return w.coerce(u,c,R,h,m)}O(c,f,v),v("columnwidth"),v("header.values"),v("header.format"),v("header.align"),v("header.prefix"),v("header.suffix"),v("header.height"),v("header.line.width"),v("header.line.color"),v("header.fill.color"),w.coerceFont(v,"header.font",f.font),z(c,v),v("cells.values"),v("cells.format"),v("cells.align"),v("cells.prefix"),v("cells.suffix"),v("cells.height"),v("cells.line.width"),v("cells.line.color"),v("cells.fill.color"),w.coerceFont(v,"cells.font",f.font),c._length=null}}}),ort=U({"src/traces/table/calc.js"(pe,le){var w=FR().wrap;le.exports=function(){return w({})}}}),Wxe=U({"src/traces/table/constants.js"(pe,le){le.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"}}}}),srt=U({"src/traces/table/data_preparation_helper.js"(pe,le){var w=Wxe(),R=Ar().extendFlat,O=_t(),z=dr().isTypedArray,l=dr().isArrayOrTypedArray;le.exports=function(A,E){var D=p(E.cells.values),g=function(we){return we.slice(E.header.values.length,we.length)},C=p(E.header.values);C.length&&!C[0].length&&(C[0]=[""],C=p(C));var I=C.concat(g(D).map(function(){return f((C[0]||[""]).length)})),N=E.domain,F=Math.floor(A._fullLayout._size.w*(N.x[1]-N.x[0])),k=Math.floor(A._fullLayout._size.h*(N.y[1]-N.y[0])),P=E.header.values.length?I[0].map(function(){return E.header.height}):[w.emptyHeaderHeight],T=D.length?D[0].map(function(){return E.cells.height}):[],y=P.reduce(c,0),S=k-y,M=S+w.uplift,W=m(T,M),$=m(P,y),Z=h($,[]),K=h(W,Z),Q={},J=E._fullInput.columnorder;l(J)&&(J=Array.from(J)),J=J.concat(g(D.map(function(we,Oe){return Oe})));var G=I.map(function(we,Oe){var ke=l(E.columnwidth)?E.columnwidth[Math.min(Oe,E.columnwidth.length-1)]:E.columnwidth;return O(ke)?Number(ke):1}),ee=G.reduce(c,0);G=G.map(function(we){return we/ee*F});var re=Math.max(u(E.header.line.width),u(E.cells.line.width)),fe={key:E.uid+A._context.staticPlot,translateX:N.x[0]*A._fullLayout._size.w,translateY:A._fullLayout._size.h*(1-N.y[1]),size:A._fullLayout._size,width:F,maxLineWidth:re,height:k,columnOrder:J,groupHeight:k,rowBlocks:K,headerRowBlocks:Z,scrollY:0,cells:R({},E.cells,{values:D}),headerCells:R({},E.header,{values:I}),gdColumns:I.map(function(we){return we[0]}),gdColumnsOriginalOrder:I.map(function(we){return we[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:I.map(function(we,Oe){var ke=Q[we];Q[we]=(ke||0)+1;var Le=we+"__"+Q[we];return{key:Le,label:we,specIndex:Oe,xIndex:J[Oe],xScale:v,x:void 0,calcdata:void 0,columnWidth:G[Oe]}})};return fe.columns.forEach(function(we){we.calcdata=fe,we.x=v(we)}),fe};function u(x){if(l(x)){for(var A=0,E=0;E<x.length;E++)A=Math.max(A,u(x[E]));return A}return x}function c(x,A){return x+A}function p(x){var A=x.slice(),E=1/0,D=0,g;for(g=0;g<A.length;g++)z(A[g])?A[g]=Array.from(A[g]):l(A[g])||(A[g]=[A[g]]),E=Math.min(E,A[g].length),D=Math.max(D,A[g].length);if(E!==D)for(g=0;g<A.length;g++){var C=D-A[g].length;C&&(A[g]=A[g].concat(f(C)))}return A}function f(x){for(var A=new Array(x),E=0;E<x;E++)A[E]="";return A}function v(x){return x.calcdata.columns.reduce(function(A,E){return E.xIndex<x.xIndex?A+E.columnWidth:A},0)}function h(x,A){var E=Object.keys(x);return E.map(function(D){return R({},x[D],{auxiliaryBlocks:A})})}function m(x,A){for(var E={},D,g=0,C=0,I=_(),N=0,F=0,k=0;k<x.length;k++)D=x[k],I.rows.push({rowIndex:k,rowHeight:D}),C+=D,(C>=A||k===x.length-1)&&(E[g]=I,I.key=F++,I.firstRowIndex=N,I.lastRowIndex=k,I=_(),g+=C,N=k+1,C=0);return E}function _(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}}}),lrt=U({"src/traces/table/data_split_helpers.js"(pe){var le=Ar().extendFlat;pe.splitToPanels=function(R){var O=[0,0],z=le({},R,{key:"header",type:"header",page:0,prevPages:O,currentRepaint:[null,null],dragHandle:!0,values:R.calcdata.headerCells.values[R.specIndex],rowBlocks:R.calcdata.headerRowBlocks,calcdata:le({},R.calcdata,{cells:R.calcdata.headerCells})}),l=le({},R,{key:"cells1",type:"cells",page:0,prevPages:O,currentRepaint:[null,null],dragHandle:!1,values:R.calcdata.cells.values[R.specIndex],rowBlocks:R.calcdata.rowBlocks}),u=le({},R,{key:"cells2",type:"cells",page:1,prevPages:O,currentRepaint:[null,null],dragHandle:!1,values:R.calcdata.cells.values[R.specIndex],rowBlocks:R.calcdata.rowBlocks});return[l,u,z]},pe.splitToCells=function(R){var O=w(R);return(R.values||[]).slice(O[0],O[1]).map(function(z,l){var u=typeof z=="string"&&z.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:l+u,key:O[0]+l,column:R,calcdata:R.calcdata,page:R.page,rowBlocks:R.rowBlocks,value:z}})};function w(R){var O=R.rowBlocks[R.page],z=O?O.rows[0].rowIndex:0,l=O?z+O.rows.length:0;return[z,l]}}}),Yxe=U({"src/traces/table/plot.js"(pe,le){var w=Wxe(),R=Ze(),O=ii(),z=O.numberFormat,l=FR(),u=ec(),c=ah(),p=ii().raiseToTop,f=ii().strTranslate,v=ii().cancelTransition,h=srt(),m=lrt(),_=Lr();le.exports=function(Te,Be){var tt=!Te._context.staticPlot,at=Te._fullLayout._paper.selectAll("."+w.cn.table).data(Be.map(function(Ut){var kr=l.unwrap(Ut),Pr=kr.trace;return h(Te,Pr)}),l.keyFun);at.exit().remove(),at.enter().append("g").classed(w.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"),at.attr("width",function(Ut){return Ut.width+Ut.size.l+Ut.size.r}).attr("height",function(Ut){return Ut.height+Ut.size.t+Ut.size.b}).attr("transform",function(Ut){return f(Ut.translateX,Ut.translateY)});var gt=at.selectAll("."+w.cn.tableControlView).data(l.repeat,l.keyFun),pt=gt.enter().append("g").classed(w.cn.tableControlView,!0).style("box-sizing","content-box");if(tt){var Rt="onwheel"in document?"wheel":"mousewheel";pt.on("mousemove",function(Ut){gt.filter(function(kr){return Ut===kr}).call(g,Te)}).on(Rt,function(Ut){if(!Ut.scrollbarState.wheeling){Ut.scrollbarState.wheeling=!0;var kr=Ut.scrollY+R.event.deltaY,Pr=we(Te,gt,null,kr)(Ut);Pr||(R.event.stopPropagation(),R.event.preventDefault()),Ut.scrollbarState.wheeling=!1}}).call(g,Te,!0)}gt.attr("transform",function(Ut){return f(Ut.size.l,Ut.size.t)});var $t=gt.selectAll("."+w.cn.scrollBackground).data(l.repeat,l.keyFun);$t.enter().append("rect").classed(w.cn.scrollBackground,!0).attr("fill","none"),$t.attr("width",function(Ut){return Ut.width}).attr("height",function(Ut){return Ut.height}),gt.each(function(Ut){u.setClipUrl(R.select(this),A(Te,Ut),Te)});var Wt=gt.selectAll("."+w.cn.yColumn).data(function(Ut){return Ut.columns},l.keyFun);Wt.enter().append("g").classed(w.cn.yColumn,!0),Wt.exit().remove(),Wt.attr("transform",function(Ut){return f(Ut.x,0)}),tt&&Wt.call(R.behavior.drag().origin(function(Ut){var kr=R.select(this);return Q(kr,Ut,-w.uplift),p(this),Ut.calcdata.columnDragInProgress=!0,g(gt.filter(function(Pr){return Ut.calcdata.key===Pr.key}),Te),Ut}).on("drag",function(Ut){var kr=R.select(this),Pr=function(kn){return(Ut===kn?R.event.x:kn.x)+kn.columnWidth/2};Ut.x=Math.max(-w.overdrag,Math.min(Ut.calcdata.width+w.overdrag-Ut.columnWidth,R.event.x));var $r=D(Wt).filter(function(kn){return kn.calcdata.key===Ut.calcdata.key}),rn=$r.sort(function(kn,Rn){return Pr(kn)-Pr(Rn)});rn.forEach(function(kn,Rn){kn.xIndex=Rn,kn.x=Ut===kn?kn.x:kn.xScale(kn)}),Wt.filter(function(kn){return Ut!==kn}).transition().ease(w.transitionEase).duration(w.transitionDuration).attr("transform",function(kn){return f(kn.x,0)}),kr.call(v).attr("transform",f(Ut.x,-w.uplift))}).on("dragend",function(Ut){var kr=R.select(this),Pr=Ut.calcdata;Ut.x=Ut.xScale(Ut),Ut.calcdata.columnDragInProgress=!1,Q(kr,Ut,0),Z(Te,Pr,Pr.columns.map(function($r){return $r.xIndex}))})),Wt.each(function(Ut){u.setClipUrl(R.select(this),E(Te,Ut),Te)});var Ht=Wt.selectAll("."+w.cn.columnBlock).data(m.splitToPanels,l.keyFun);Ht.enter().append("g").classed(w.cn.columnBlock,!0).attr("id",function(Ut){return Ut.key}),Ht.style("cursor",function(Ut){return Ut.dragHandle?"ew-resize":Ut.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var Ft=Ht.filter(G),st=Ht.filter(J);tt&&st.call(R.behavior.drag().origin(function(Ut){return R.event.stopPropagation(),Ut}).on("drag",we(Te,gt,-1)).on("dragend",function(){})),C(Te,gt,Ft,Ht),C(Te,gt,st,Ht);var rt=gt.selectAll("."+w.cn.scrollAreaClip).data(l.repeat,l.keyFun);rt.enter().append("clipPath").classed(w.cn.scrollAreaClip,!0).attr("id",function(Ut){return A(Te,Ut)});var Ue=rt.selectAll("."+w.cn.scrollAreaClipRect).data(l.repeat,l.keyFun);Ue.enter().append("rect").classed(w.cn.scrollAreaClipRect,!0).attr("x",-w.overdrag).attr("y",-w.uplift).attr("fill","none"),Ue.attr("width",function(Ut){return Ut.width+2*w.overdrag}).attr("height",function(Ut){return Ut.height+w.uplift});var xt=Wt.selectAll("."+w.cn.columnBoundary).data(l.repeat,l.keyFun);xt.enter().append("g").classed(w.cn.columnBoundary,!0);var Gt=Wt.selectAll("."+w.cn.columnBoundaryClippath).data(l.repeat,l.keyFun);Gt.enter().append("clipPath").classed(w.cn.columnBoundaryClippath,!0),Gt.attr("id",function(Ut){return E(Te,Ut)});var Jt=Gt.selectAll("."+w.cn.columnBoundaryRect).data(l.repeat,l.keyFun);Jt.enter().append("rect").classed(w.cn.columnBoundaryRect,!0).attr("fill","none"),Jt.attr("width",function(Ut){return Ut.columnWidth+2*x(Ut)}).attr("height",function(Ut){return Ut.calcdata.height+2*x(Ut)+w.uplift}).attr("x",function(Ut){return-x(Ut)}).attr("y",function(Ut){return-x(Ut)}),fe(null,st,gt)};function x(Ee){return Math.ceil(Ee.calcdata.maxLineWidth/2)}function A(Ee,Te){return"clip"+Ee._fullLayout._uid+"_scrollAreaBottomClip_"+Te.key}function E(Ee,Te){return"clip"+Ee._fullLayout._uid+"_columnBoundaryClippath_"+Te.calcdata.key+"_"+Te.specIndex}function D(Ee){return[].concat.apply([],Ee.map(function(Te){return Te})).map(function(Te){return Te.__data__})}function g(Ee,Te,Be){function tt(Wt){var Ht=Wt.rowBlocks;return _e(Ht,Ht.length-1)+(Ht.length?he(Ht[Ht.length-1],1/0):1)}var at=Ee.selectAll("."+w.cn.scrollbarKit).data(l.repeat,l.keyFun);at.enter().append("g").classed(w.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),at.each(function(Wt){var Ht=Wt.scrollbarState;Ht.totalHeight=tt(Wt),Ht.scrollableAreaHeight=Wt.groupHeight-ee(Wt),Ht.currentlyVisibleHeight=Math.min(Ht.totalHeight,Ht.scrollableAreaHeight),Ht.ratio=Ht.currentlyVisibleHeight/Ht.totalHeight,Ht.barLength=Math.max(Ht.ratio*Ht.currentlyVisibleHeight,w.goldenRatio*w.scrollbarWidth),Ht.barWiggleRoom=Ht.currentlyVisibleHeight-Ht.barLength,Ht.wiggleRoom=Math.max(0,Ht.totalHeight-Ht.scrollableAreaHeight),Ht.topY=Ht.barWiggleRoom===0?0:Wt.scrollY/Ht.wiggleRoom*Ht.barWiggleRoom,Ht.bottomY=Ht.topY+Ht.barLength,Ht.dragMultiplier=Ht.wiggleRoom/Ht.barWiggleRoom}).attr("transform",function(Wt){var Ht=Wt.width+w.scrollbarWidth/2+w.scrollbarOffset;return f(Ht,ee(Wt))});var gt=at.selectAll("."+w.cn.scrollbar).data(l.repeat,l.keyFun);gt.enter().append("g").classed(w.cn.scrollbar,!0);var pt=gt.selectAll("."+w.cn.scrollbarSlider).data(l.repeat,l.keyFun);pt.enter().append("g").classed(w.cn.scrollbarSlider,!0),pt.attr("transform",function(Wt){return f(0,Wt.scrollbarState.topY||0)});var Rt=pt.selectAll("."+w.cn.scrollbarGlyph).data(l.repeat,l.keyFun);Rt.enter().append("line").classed(w.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",w.scrollbarWidth).attr("stroke-linecap","round").attr("y1",w.scrollbarWidth/2),Rt.attr("y2",function(Wt){return Wt.scrollbarState.barLength-w.scrollbarWidth/2}).attr("stroke-opacity",function(Wt){return Wt.columnDragInProgress||!Wt.scrollbarState.barWiggleRoom||Be?0:.4}),Rt.transition().delay(0).duration(0),Rt.transition().delay(w.scrollbarHideDelay).duration(w.scrollbarHideDuration).attr("stroke-opacity",0);var $t=gt.selectAll("."+w.cn.scrollbarCaptureZone).data(l.repeat,l.keyFun);$t.enter().append("line").classed(w.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",w.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(Wt){var Ht=R.event.y,Ft=this.getBoundingClientRect(),st=Wt.scrollbarState,rt=Ht-Ft.top,Ue=R.scale.linear().domain([0,st.scrollableAreaHeight]).range([0,st.totalHeight]).clamp(!0);st.topY<=rt&&rt<=st.bottomY||we(Te,Ee,null,Ue(rt-st.barLength/2))(Wt)}).call(R.behavior.drag().origin(function(Wt){return R.event.stopPropagation(),Wt.scrollbarState.scrollbarScrollInProgress=!0,Wt}).on("drag",we(Te,Ee)).on("dragend",function(){})),$t.attr("y2",function(Wt){return Wt.scrollbarState.scrollableAreaHeight}),Te._context.staticPlot&&(Rt.remove(),$t.remove())}function C(Ee,Te,Be,tt){var at=I(Be),gt=N(at);T(gt);var pt=F(gt);S(pt);var Rt=P(gt),$t=k(Rt);y($t),M($t,Te,tt,Ee),be(gt)}function I(Ee){var Te=Ee.selectAll("."+w.cn.columnCells).data(l.repeat,l.keyFun);return Te.enter().append("g").classed(w.cn.columnCells,!0),Te.exit().remove(),Te}function N(Ee){var Te=Ee.selectAll("."+w.cn.columnCell).data(m.splitToCells,function(Be){return Be.keyWithinBlock});return Te.enter().append("g").classed(w.cn.columnCell,!0),Te.exit().remove(),Te}function F(Ee){var Te=Ee.selectAll("."+w.cn.cellRect).data(l.repeat,function(Be){return Be.keyWithinBlock});return Te.enter().append("rect").classed(w.cn.cellRect,!0),Te}function k(Ee){var Te=Ee.selectAll("."+w.cn.cellText).data(l.repeat,function(Be){return Be.keyWithinBlock});return Te.enter().append("text").classed(w.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){R.event.stopPropagation()}),Te}function P(Ee){var Te=Ee.selectAll("."+w.cn.cellTextHolder).data(l.repeat,function(Be){return Be.keyWithinBlock});return Te.enter().append("g").classed(w.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),Te}function T(Ee){Ee.each(function(Te,Be){var tt=Te.calcdata.cells.font,at=Te.column.specIndex,gt={size:K(tt.size,at,Be),color:K(tt.color,at,Be),family:K(tt.family,at,Be),weight:K(tt.weight,at,Be),style:K(tt.style,at,Be),variant:K(tt.variant,at,Be),textcase:K(tt.textcase,at,Be),lineposition:K(tt.lineposition,at,Be),shadow:K(tt.shadow,at,Be)};Te.rowNumber=Te.key,Te.align=K(Te.calcdata.cells.align,at,Be),Te.cellBorderWidth=K(Te.calcdata.cells.line.width,at,Be),Te.font=gt})}function y(Ee){Ee.each(function(Te){u.font(R.select(this),Te.font)})}function S(Ee){Ee.attr("width",function(Te){return Te.column.columnWidth}).attr("stroke-width",function(Te){return Te.cellBorderWidth}).each(function(Te){var Be=R.select(this);_.stroke(Be,K(Te.calcdata.cells.line.color,Te.column.specIndex,Te.rowNumber)),_.fill(Be,K(Te.calcdata.cells.fill.color,Te.column.specIndex,Te.rowNumber))})}function M(Ee,Te,Be,tt){Ee.text(function(at){var gt=at.column.specIndex,pt=at.rowNumber,Rt=at.value,$t=typeof Rt=="string",Wt=$t&&Rt.match(/<br>/i),Ht=!$t||Wt;at.mayHaveMarkup=$t&&Rt.match(/[<&>]/);var Ft=W(Rt);at.latex=Ft;var st=Ft?"":K(at.calcdata.cells.prefix,gt,pt)||"",rt=Ft?"":K(at.calcdata.cells.suffix,gt,pt)||"",Ue=Ft?null:K(at.calcdata.cells.format,gt,pt)||null,xt=st+(Ue?z(Ue)(at.value):at.value)+rt,Gt;at.wrappingNeeded=!at.wrapped&&!Ht&&!Ft&&(Gt=$(xt)),at.cellHeightMayIncrease=Wt||Ft||at.mayHaveMarkup||(Gt===void 0?$(xt):Gt),at.needsConvertToTspans=at.mayHaveMarkup||at.wrappingNeeded||at.latex;var Jt;if(at.wrappingNeeded){var Ut=w.wrapSplitCharacter===" "?xt.replace(/<a href=/ig,"<a_href="):xt,kr=Ut.split(w.wrapSplitCharacter),Pr=w.wrapSplitCharacter===" "?kr.map(function($r){return $r.replace(/<a_href=/ig,"<a href=")}):kr;at.fragments=Pr.map(function($r){return{text:$r,width:null}}),at.fragments.push({fragment:w.wrapSpacer,width:null}),Jt=Pr.join(w.lineBreaker)+w.lineBreaker+w.wrapSpacer}else delete at.fragments,Jt=xt;return Jt}).attr("dy",function(at){return at.needsConvertToTspans?0:"0.75em"}).each(function(at){var gt=this,pt=R.select(gt),Rt=at.wrappingNeeded?ke:Le;at.needsConvertToTspans?c.convertToTspans(pt,tt,Rt(Be,gt,Te,tt,at)):R.select(gt.parentNode).attr("transform",function($t){return f(oe($t),w.cellPad)}).attr("text-anchor",function($t){return{left:"start",center:"middle",right:"end"}[$t.align]})})}function W(Ee){return typeof Ee=="string"&&Ee.match(w.latexCheck)}function $(Ee){return Ee.indexOf(w.wrapSplitCharacter)!==-1}function Z(Ee,Te,Be){var tt=Te.gdColumnsOriginalOrder;Te.gdColumns.sort(function(at,gt){return Be[tt.indexOf(at)]-Be[tt.indexOf(gt)]}),Te.columnorder=Be,Ee.emit("plotly_restyle")}function K(Ee,Te,Be){if(O.isArrayOrTypedArray(Ee)){var tt=Ee[Math.min(Te,Ee.length-1)];return O.isArrayOrTypedArray(tt)?tt[Math.min(Be,tt.length-1)]:tt}else return Ee}function Q(Ee,Te,Be){Ee.transition().ease(w.releaseTransitionEase).duration(w.releaseTransitionDuration).attr("transform",f(Te.x,Be))}function J(Ee){return Ee.type==="cells"}function G(Ee){return Ee.type==="header"}function ee(Ee){var Te=Ee.rowBlocks.length?Ee.rowBlocks[0].auxiliaryBlocks:[];return Te.reduce(function(Be,tt){return Be+he(tt,1/0)},0)}function re(Ee,Te,Be){for(var tt=[],at=0,gt=0;gt<Ee.length;gt++){for(var pt=Ee[gt],Rt=pt.rows,$t=0,Wt=0;Wt<Rt.length;Wt++)$t+=Rt[Wt].rowHeight;pt.allRowsHeight=$t;var Ht=at+$t,Ft=Te,st=Ft+Be;Ft<Ht&&st>at&&tt.push(gt),at+=$t}return tt}function fe(Ee,Te,Be){var tt=D(Te)[0];if(tt!==void 0){var at=tt.rowBlocks,gt=tt.calcdata,pt=_e(at,at.length),Rt=tt.calcdata.groupHeight-ee(tt),$t=gt.scrollY=Math.max(0,Math.min(pt-Rt,gt.scrollY)),Wt=re(at,$t,Rt);Wt.length===1&&(Wt[0]===at.length-1?Wt.unshift(Wt[0]-1):Wt.push(Wt[0]+1)),Wt[0]%2&&Wt.reverse(),Te.each(function(Ht,Ft){Ht.page=Wt[Ft],Ht.scrollY=$t}),Te.attr("transform",function(Ht){var Ft=_e(Ht.rowBlocks,Ht.page)-Ht.scrollY;return f(0,Ft)}),Ee&&(Oe(Ee,Be,Te,Wt,tt.prevPages,tt,0),Oe(Ee,Be,Te,Wt,tt.prevPages,tt,1),g(Be,Ee))}}function we(Ee,Te,Be,tt){return function(gt){var pt=gt.calcdata?gt.calcdata:gt,Rt=Te.filter(function(Ft){return pt.key===Ft.key}),$t=Be||pt.scrollbarState.dragMultiplier,Wt=pt.scrollY;pt.scrollY=tt===void 0?pt.scrollY+$t*R.event.dy:tt;var Ht=Rt.selectAll("."+w.cn.yColumn).selectAll("."+w.cn.columnBlock).filter(J);return fe(Ee,Ht,Rt),pt.scrollY===Wt}}function Oe(Ee,Te,Be,tt,at,gt,pt){var Rt=tt[pt]!==at[pt];Rt&&(clearTimeout(gt.currentRepaint[pt]),gt.currentRepaint[pt]=setTimeout(function(){var $t=Be.filter(function(Wt,Ht){return Ht===pt&&tt[Ht]!==at[Ht]});C(Ee,Te,$t,Be),at[pt]=tt[pt]}))}function ke(Ee,Te,Be,tt){return function(){var gt=R.select(Te.parentNode);gt.each(function(pt){var Rt=pt.fragments;gt.selectAll("tspan.line").each(function(xt,Gt){Rt[Gt].width=this.getComputedTextLength()});var $t=Rt[Rt.length-1].width,Wt=Rt.slice(0,-1),Ht=[],Ft,st,rt=0,Ue=pt.column.columnWidth-2*w.cellPad;for(pt.value="";Wt.length;)Ft=Wt.shift(),st=Ft.width+$t,rt+st>Ue&&(pt.value+=Ht.join(w.wrapSpacer)+w.lineBreaker,Ht=[],rt=0),Ht.push(Ft.text),rt+=st;rt&&(pt.value+=Ht.join(w.wrapSpacer)),pt.wrapped=!0}),gt.selectAll("tspan.line").remove(),M(gt.select("."+w.cn.cellText),Be,Ee,tt),R.select(Te.parentNode.parentNode).call(be)}}function Le(Ee,Te,Be,tt,at){return function(){if(!at.settledY){var pt=R.select(Te.parentNode),Rt=xe(at),$t=at.key-Rt.firstRowIndex,Wt=Rt.rows[$t].rowHeight,Ht=at.cellHeightMayIncrease?Te.parentNode.getBoundingClientRect().height+2*w.cellPad:Wt,Ft=Math.max(Ht,Wt),st=Ft-Rt.rows[$t].rowHeight;st&&(Rt.rows[$t].rowHeight=Ft,Ee.selectAll("."+w.cn.columnCell).call(be),fe(null,Ee.filter(J),0),g(Be,tt,!0)),pt.attr("transform",function(){var rt=this,Ue=rt.parentNode,xt=Ue.getBoundingClientRect(),Gt=R.select(rt.parentNode).select("."+w.cn.cellRect).node().getBoundingClientRect(),Jt=rt.transform.baseVal.consolidate(),Ut=Gt.top-xt.top+(Jt?Jt.matrix.f:w.cellPad);return f(oe(at,R.select(rt.parentNode).select("."+w.cn.cellTextHolder).node().getBoundingClientRect().width),Ut)}),at.settledY=!0}}}function oe(Ee,Te){switch(Ee.align){case"left":return w.cellPad;case"right":return Ee.column.columnWidth-(Te||0)-w.cellPad;case"center":return(Ee.column.columnWidth-(Te||0))/2;default:return w.cellPad}}function be(Ee){Ee.attr("transform",function(Te){var Be=Te.rowBlocks[0].auxiliaryBlocks.reduce(function(pt,Rt){return pt+he(Rt,1/0)},0),tt=xe(Te),at=he(tt,Te.key),gt=at+Be;return f(0,gt)}).selectAll("."+w.cn.cellRect).attr("height",function(Te){return se(xe(Te),Te.key).rowHeight})}function _e(Ee,Te){for(var Be=0,tt=Te-1;tt>=0;tt--)Be+=De(Ee[tt]);return Be}function he(Ee,Te){for(var Be=0,tt=0;tt<Ee.rows.length&&Ee.rows[tt].rowIndex<Te;tt++)Be+=Ee.rows[tt].rowHeight;return Be}function De(Ee){var Te=Ee.allRowsHeight;if(Te!==void 0)return Te;for(var Be=0,tt=0;tt<Ee.rows.length;tt++)Be+=Ee.rows[tt].rowHeight;return Ee.allRowsHeight=Be,Be}function xe(Ee){return Ee.rowBlocks[Ee.page]}function se(Ee,Te){return Ee.rows[Te-Ee.firstRowIndex]}}}),urt=U({"src/traces/table/base_plot.js"(pe){var le=Om().getModuleCalcData,w=Yxe(),R="table";pe.name=R,pe.plot=function(O){var z=le(O.calcdata,R)[0];z.length&&w(O,z)},pe.clean=function(O,z,l,u){var c=u._has&&u._has(R),p=z._has&&z._has(R);c&&!p&&u._paperdiv.selectAll(".table").remove()}}}),crt=U({"src/traces/table/index.js"(pe,le){le.exports={attributes:$xe(),supplyDefaults:art(),calc:ort(),plot:Yxe(),moduleType:"trace",name:"table",basePlotModule:urt(),categories:["noOpacity"],meta:{}}}}),frt=U({"lib/table.js"(pe,le){le.exports=crt()}}),drt=U({"src/traces/carpet/axis_attributes.js"(pe,le){var w=Ir(),R=jn(),O=Hg(),z=Wp().descriptionWithDates,l=zl().overrideAll,u=jl().dash,c=Ar().extendFlat;le.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:w({editType:"calc"}),offset:{valType:"number",dflt:10,editType:"calc"},editType:"calc"},type:{valType:"enumerated",values:["-","linear","date","category"],dflt:"-",editType:"calc"},autotypenumbers:O.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:c({},O.labelalias,{editType:"calc"}),tickfont:w({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"],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:z("tick label")},tickformatstops:l(O.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:R.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:c({},u,{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:c({},u,{editType:"calc"}),minorgridcolor:{valType:"color",dflt:R.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"}}}),CK=U({"src/traces/carpet/attributes.js"(pe,le){var w=Ir(),R=drt(),O=jn(),z=w({editType:"calc"}),l=Kc().zorder;z.family.dflt='"Open Sans", verdana, arial, sans-serif',z.size.dflt=12,z.color.dflt=O.defaultLine,le.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:R,baxis:R,font:z,color:{valType:"color",dflt:O.defaultLine,editType:"plot"},zorder:l}}}),hrt=U({"src/traces/carpet/xy_defaults.js"(pe,le){var w=ii().isArray1D;le.exports=function(O,z,l){var u=l("x"),c=u&&u.length,p=l("y"),f=p&&p.length;if(!c&&!f)return!1;if(z._cheater=!u,(!c||w(u))&&(!f||w(p))){var v=c?u.length:1/0;f&&(v=Math.min(v,p.length)),z.a&&z.a.length&&(v=Math.min(v,z.a.length)),z.b&&z.b.length&&(v=Math.min(v,z.b.length)),z._length=v}else z._length=null;return!0}}}),prt=U({"src/traces/carpet/axis_defaults.js"(pe,le){var w=CK(),R=Lr().addOpacity,O=Mi(),z=ii(),l=n_(),u=A1(),c=Xw(),p=t2(),f=Wy(),v=Pb();le.exports=function(_,x,A){var E=A.letter,D=A.font||{},g=w[E+"axis"];function C(re,fe){return z.coerce(_,x,g,re,fe)}function I(re,fe){return z.coerce2(_,x,g,re,fe)}A.name&&(x._name=A.name,x._id=A.name),C("autotypenumbers",A.autotypenumbersDflt);var N=C("type");if(N==="-"&&(A.data&&h(x,A.data),x.type==="-"?x.type="linear":N=_.type=x.type),C("smoothing"),C("cheatertype"),C("showticklabels"),C("labelprefix",E+" = "),C("labelsuffix"),C("showtickprefix"),C("showticksuffix"),C("separatethousands"),C("tickformat"),C("exponentformat"),C("minexponent"),C("showexponent"),C("categoryorder"),C("tickmode"),C("tickvals"),C("ticktext"),C("tick0"),C("dtick"),x.tickmode==="array"&&(C("arraytick0"),C("arraydtick")),C("labelpadding"),x._hovertitle=E,N==="date"){var F=O.getComponentMethod("calendars","handleDefaults");F(_,x,"calendar",A.calendar)}f(x,A.fullLayout),x.c2p=z.identity;var k=C("color",A.dfltColor),P=k===_.color?k:D.color,T=C("title.text");T&&(z.coerceFont(C,"title.font",D,{overrideDflt:{size:z.bigFont(D.size),color:P}}),C("title.offset")),C("tickangle");var y=C("autorange",!x.isValidRange(_.range));y&&C("rangemode"),C("range"),x.cleanRange(),C("fixedrange"),l(_,x,C,N),c(_,x,C,N,A),u(_,x,C,N,A),p(_,x,C,{data:A.data,dataAttr:E});var S=I("gridcolor",R(k,.3)),M=I("gridwidth"),W=I("griddash"),$=C("showgrid");$||(delete x.gridcolor,delete x.gridwidth,delete x.griddash);var Z=I("startlinecolor",k),K=I("startlinewidth",M),Q=C("startline",x.showgrid||!!Z||!!K);Q||(delete x.startlinecolor,delete x.startlinewidth);var J=I("endlinecolor",k),G=I("endlinewidth",M),ee=C("endline",x.showgrid||!!J||!!G);return ee||(delete x.endlinecolor,delete x.endlinewidth),$?(C("minorgridcount"),C("minorgridwidth",M),C("minorgriddash",W),C("minorgridcolor",R(S,.06)),x.minorgridcount||(delete x.minorgridwidth,delete x.minorgriddash,delete x.minorgridcolor)):(delete x.gridcolor,delete x.gridwidth,delete x.griddash),x.showticklabels==="none"&&(delete x.tickfont,delete x.tickangle,delete x.showexponent,delete x.exponentformat,delete x.minexponent,delete x.tickformat,delete x.showticksuffix,delete x.showtickprefix),x.showticksuffix||delete x.ticksuffix,x.showtickprefix||delete x.tickprefix,C("tickmode"),x};function h(m,_){if(m.type==="-"){var x=m._id,A=x.charAt(0),E=A+"calendar",D=m[E];m.type=v(_,D,{autotypenumbers:m.autotypenumbers})}}}}),vrt=U({"src/traces/carpet/ab_defaults.js"(pe,le){var w=prt(),R=Tc();le.exports=function(l,u,c,p,f){var v=p("a");v||(p("da"),p("a0"));var h=p("b");h||(p("db"),p("b0")),O(l,u,c,f)};function O(z,l,u,c){var p=["aaxis","baxis"];p.forEach(function(f){var v=f.charAt(0),h=z[f]||{},m=R.newContainer(l,f),_={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,tickfont:"x",id:v+"axis",letter:v,font:l.font,name:f,data:z[v],calendar:l.calendar,dfltColor:c,bgColor:u.paper_bgcolor,autotypenumbersDflt:u.autotypenumbers,fullLayout:u};w(h,m,_),m._categories=m._categories||[],!z[f]&&h.type!=="-"&&(z[f]={type:h.type})})}}}),mrt=U({"src/traces/carpet/defaults.js"(pe,le){var w=ii(),R=hrt(),O=vrt(),z=CK(),l=jn();le.exports=function(c,p,f,v){function h(x,A){return w.coerce(c,p,z,x,A)}p._clipPathId="clip"+p.uid+"carpet";var m=h("color",l.defaultLine);if(w.coerceFont(h,"font",v.font),h("carpet"),O(c,p,v,h,m),!p.a||!p.b){p.visible=!1;return}p.a.length<3&&(p.aaxis.smoothing=0),p.b.length<3&&(p.baxis.smoothing=0);var _=R(c,p,h);_||(p.visible=!1),p._cheater&&h("cheaterslope"),h("zorder")}}}),Xxe=U({"src/traces/carpet/map_1d_array.js"(pe,le){var w=ii().isArrayOrTypedArray;le.exports=function(O,z,l){var u;for(w(O)?O.length>z.length&&(O=O.slice(0,z.length)):O=[],u=0;u<z.length;u++)O[u]=l(z[u]);return O}}}),Zxe=U({"src/traces/carpet/makepath.js"(pe,le){le.exports=function(R,O,z){if(R.length===0)return"";var l,u=[],c=z?3:1;for(l=0;l<R.length;l+=c)u.push(R[l]+","+O[l]),z&&l<R.length-c&&(u.push("C"),u.push([R[l+1]+","+O[l+1],R[l+2]+","+O[l+2]+" "].join(" ")));return u.join(z?"":"L")}}}),grt=U({"src/traces/carpet/orient_text.js"(pe,le){le.exports=function(R,O,z,l,u,c){var p=u[0]*R.dpdx(O),f=u[1]*R.dpdy(z),v=1,h=1;if(c){var m=Math.sqrt(u[0]*u[0]+u[1]*u[1]),_=Math.sqrt(c[0]*c[0]+c[1]*c[1]),x=(u[0]*c[0]+u[1]*c[1])/m/_;h=Math.max(0,x)}var A=Math.atan2(f,p)*180/Math.PI;return A<-90?(A+=180,v=-v):A>90&&(A-=180,v=-v),{angle:A,flip:v,p:R.c2p(l,O,z),offsetMultplier:h}}}}),yrt=U({"src/traces/carpet/plot.js"(pe,le){var w=Ze(),R=ec(),O=Xxe(),z=Zxe(),l=grt(),u=ah(),c=ii(),p=c.strRotate,f=c.strTranslate,v=tg();le.exports=function(C,I,N,F){var k=C._context.staticPlot,P=I.xaxis,T=I.yaxis,y=C._fullLayout,S=y._clips;c.makeTraceGroups(F,N,"trace").each(function(M){var W=w.select(this),$=M[0],Z=$.trace,K=Z.aaxis,Q=Z.baxis,J=c.ensureSingle(W,"g","minorlayer"),G=c.ensureSingle(W,"g","majorlayer"),ee=c.ensureSingle(W,"g","boundarylayer"),re=c.ensureSingle(W,"g","labellayer");W.style("opacity",Z.opacity),m(P,T,G,K,"a",K._gridlines,!0),m(P,T,G,Q,"b",Q._gridlines,!0),m(P,T,J,K,"a",K._minorgridlines,!0),m(P,T,J,Q,"b",Q._minorgridlines,!0),m(P,T,ee,K,"a-boundary",K._boundarylines,k),m(P,T,ee,Q,"b-boundary",Q._boundarylines,k);var fe=_(C,P,T,Z,$,re,K._labels,"a-label"),we=_(C,P,T,Z,$,re,Q._labels,"b-label");x(C,re,Z,$,P,T,fe,we),h(Z,$,S,P,T)})};function h(g,C,I,N,F){var k,P,T,y,S=I.select("#"+g._clipPathId);S.size()||(S=I.append("clipPath").classed("carpetclip",!0));var M=c.ensureSingle(S,"path","carpetboundary"),W=C.clipsegments,$=[];for(y=0;y<W.length;y++)k=W[y],P=O([],k.x,N.c2p),T=O([],k.y,F.c2p),$.push(z(P,T,k.bicubic));var Z="M"+$.join("L")+"Z";S.attr("id",g._clipPathId),M.attr("d",Z)}function m(g,C,I,N,F,k,P){var T="const-"+F+"-lines",y=I.selectAll("."+T).data(k);y.enter().append("path").classed(T,!0).style("vector-effect",P?"none":"non-scaling-stroke"),y.each(function(S){var M=S,W=M.x,$=M.y,Z=O([],W,g.c2p),K=O([],$,C.c2p),Q="M"+z(Z,K,M.smoothing),J=w.select(this);J.attr("d",Q).style("stroke-width",M.width).style("stroke",M.color).style("stroke-dasharray",R.dashStyle(M.dash,M.width)).style("fill","none")}),y.exit().remove()}function _(g,C,I,N,F,k,P,T){var y=k.selectAll("text."+T).data(P);y.enter().append("text").classed(T,!0);var S=0,M={};return y.each(function(W,$){var Z;if(W.axis.tickangle==="auto")Z=l(N,C,I,W.xy,W.dxy);else{var K=(W.axis.tickangle+180)*Math.PI/180;Z=l(N,C,I,W.xy,[Math.cos(K),Math.sin(K)])}$||(M={angle:Z.angle,flip:Z.flip});var Q=(W.endAnchor?-1:1)*Z.flip,J=w.select(this).attr({"text-anchor":Q>0?"start":"end","data-notex":1}).call(R.font,W.font).text(W.text).call(u.convertToTspans,g),G=R.bBox(this);J.attr("transform",f(Z.p[0],Z.p[1])+p(Z.angle)+f(W.axis.labelpadding*Q,G.height*.3)),S=Math.max(S,G.width+W.axis.labelpadding)}),y.exit().remove(),M.maxExtent=S,M}function x(g,C,I,N,F,k,P,T){var y,S,M,W,$=c.aggNums(Math.min,null,I.a),Z=c.aggNums(Math.max,null,I.a),K=c.aggNums(Math.min,null,I.b),Q=c.aggNums(Math.max,null,I.b);y=.5*($+Z),S=K,M=I.ab2xy(y,S,!0),W=I.dxyda_rough(y,S),P.angle===void 0&&c.extendFlat(P,l(I,F,k,M,I.dxydb_rough(y,S))),D(g,C,I,N,M,W,I.aaxis,F,k,P,"a-title"),y=$,S=.5*(K+Q),M=I.ab2xy(y,S,!0),W=I.dxydb_rough(y,S),T.angle===void 0&&c.extendFlat(T,l(I,F,k,M,I.dxyda_rough(y,S))),D(g,C,I,N,M,W,I.baxis,F,k,T,"b-title")}var A=v.LINE_SPACING,E=(1-v.MID_SHIFT)/A+1;function D(g,C,I,N,F,k,P,T,y,S,M){var W=[];P.title.text&&W.push(P.title.text);var $=C.selectAll("text."+M).data(W),Z=S.maxExtent;$.enter().append("text").classed(M,!0),$.each(function(){var K=l(I,T,y,F,k);["start","both"].indexOf(P.showticklabels)===-1&&(Z=0);var Q=P.title.font.size;Z+=Q+P.title.offset;var J=S.angle+(S.flip<0?180:0),G=(J-K.angle+450)%360,ee=G>90&&G<270,re=w.select(this);re.text(P.title.text).call(u.convertToTspans,g),ee&&(Z=(-u.lineCount(re)+E)*A*Q-Z),re.attr("transform",f(K.p[0],K.p[1])+p(K.angle)+f(0,Z)).attr("text-anchor","middle").call(R.font,P.title.font)}),$.exit().remove()}}}),brt=U({"src/traces/carpet/cheater_basis.js"(pe,le){var w=ii().isArrayOrTypedArray;le.exports=function(R,O,z){var l,u,c,p,f,v,h=[],m=w(R)?R.length:R,_=w(O)?O.length:O,x=w(R)?R:null,A=w(O)?O:null;x&&(c=(x.length-1)/(x[x.length-1]-x[0])/(m-1)),A&&(p=(A.length-1)/(A[A.length-1]-A[0])/(_-1));var E,D=1/0,g=-1/0;for(u=0;u<_;u++)for(h[u]=[],v=A?(A[u]-A[0])*p:u/(_-1),l=0;l<m;l++)f=x?(x[l]-x[0])*c:l/(m-1),E=f-v*z,D=Math.min(E,D),g=Math.max(E,g),h[u][l]=E;var C=1/(g-D),I=-D*C;for(u=0;u<_;u++)for(l=0;l<m;l++)h[u][l]=C*h[u][l]+I;return h}}}),xrt=U({"src/traces/carpet/array_minmax.js"(pe,le){var w=ii().isArrayOrTypedArray;le.exports=function(O){return R(O,0)};function R(O,z){if(!w(O)||z>=10)return null;for(var l=1/0,u=-1/0,c=O.length,p=0;p<c;p++){var f=O[p];if(w(f)){var v=R(f,z+1);v&&(l=Math.min(v[0],l),u=Math.max(v[1],u))}else l=Math.min(f,l),u=Math.max(f,u)}return[l,u]}}}),_rt=U({"src/traces/carpet/calc_gridlines.js"(pe,le){var w=Yu(),R=Ar().extendFlat;le.exports=function(z,l,u){var c,p,f,v,h,m,_,x,A,E,D,g,C,I,N=z["_"+l],F=z[l+"axis"],k=F._gridlines=[],P=F._minorgridlines=[],T=F._boundarylines=[],y=z["_"+u],S=z[u+"axis"];F.tickmode==="array"&&(F.tickvals=N.slice());var M=z._xctrl,W=z._yctrl,$=M[0].length,Z=M.length,K=z._a.length,Q=z._b.length;w.prepTicks(F),F.tickmode==="array"&&delete F.tickvals;var J=F.smoothing?3:1;function G(re){var fe,we,Oe,ke,Le,oe,be,_e,he,De,xe,se,Ee=[],Te=[],Be={};if(l==="b")for(we=z.b2j(re),Oe=Math.floor(Math.max(0,Math.min(Q-2,we))),ke=we-Oe,Be.length=Q,Be.crossLength=K,Be.xy=function(tt){return z.evalxy([],tt,we)},Be.dxy=function(tt,at){return z.dxydi([],tt,Oe,at,ke)},fe=0;fe<K;fe++)oe=Math.min(K-2,fe),be=fe-oe,_e=z.evalxy([],fe,we),S.smoothing&&fe>0&&(he=z.dxydi([],fe-1,Oe,0,ke),Ee.push(Le[0]+he[0]/3),Te.push(Le[1]+he[1]/3),De=z.dxydi([],fe-1,Oe,1,ke),Ee.push(_e[0]-De[0]/3),Te.push(_e[1]-De[1]/3)),Ee.push(_e[0]),Te.push(_e[1]),Le=_e;else for(fe=z.a2i(re),oe=Math.floor(Math.max(0,Math.min(K-2,fe))),be=fe-oe,Be.length=K,Be.crossLength=Q,Be.xy=function(tt){return z.evalxy([],fe,tt)},Be.dxy=function(tt,at){return z.dxydj([],oe,tt,be,at)},we=0;we<Q;we++)Oe=Math.min(Q-2,we),ke=we-Oe,_e=z.evalxy([],fe,we),S.smoothing&&we>0&&(xe=z.dxydj([],oe,we-1,be,0),Ee.push(Le[0]+xe[0]/3),Te.push(Le[1]+xe[1]/3),se=z.dxydj([],oe,we-1,be,1),Ee.push(_e[0]-se[0]/3),Te.push(_e[1]-se[1]/3)),Ee.push(_e[0]),Te.push(_e[1]),Le=_e;return Be.axisLetter=l,Be.axis=F,Be.crossAxis=S,Be.value=re,Be.constvar=u,Be.index=x,Be.x=Ee,Be.y=Te,Be.smoothing=S.smoothing,Be}function ee(re){var fe,we,Oe,ke,Le,oe=[],be=[],_e={};if(_e.length=N.length,_e.crossLength=y.length,l==="b")for(Oe=Math.max(0,Math.min(Q-2,re)),Le=Math.min(1,Math.max(0,re-Oe)),_e.xy=function(he){return z.evalxy([],he,re)},_e.dxy=function(he,De){return z.dxydi([],he,Oe,De,Le)},fe=0;fe<$;fe++)oe[fe]=M[re*J][fe],be[fe]=W[re*J][fe];else for(we=Math.max(0,Math.min(K-2,re)),ke=Math.min(1,Math.max(0,re-we)),_e.xy=function(he){return z.evalxy([],re,he)},_e.dxy=function(he,De){return z.dxydj([],we,he,ke,De)},fe=0;fe<Z;fe++)oe[fe]=M[fe][re*J],be[fe]=W[fe][re*J];return _e.axisLetter=l,_e.axis=F,_e.crossAxis=S,_e.value=N[re],_e.constvar=u,_e.index=re,_e.x=oe,_e.y=be,_e.smoothing=S.smoothing,_e}if(F.tickmode==="array"){for(v=5e-15,h=[Math.floor((N.length-1-F.arraytick0)/F.arraydtick*(1+v)),Math.ceil(-F.arraytick0/F.arraydtick/(1+v))].sort(function(re,fe){return re-fe}),m=h[0]-1,_=h[1]+1,x=m;x<_;x++)p=F.arraytick0+F.arraydtick*x,!(p<0||p>N.length-1)&&k.push(R(ee(p),{color:F.gridcolor,width:F.gridwidth,dash:F.griddash}));for(x=m;x<_;x++)if(f=F.arraytick0+F.arraydtick*x,D=Math.min(f+F.arraydtick,N.length-1),!(f<0||f>N.length-1)&&!(D<0||D>N.length-1))for(g=N[f],C=N[D],c=0;c<F.minorgridcount;c++)I=D-f,!(I<=0)&&(E=g+(C-g)*(c+1)/(F.minorgridcount+1)*(F.arraydtick/I),!(E<N[0]||E>N[N.length-1])&&P.push(R(G(E),{color:F.minorgridcolor,width:F.minorgridwidth,dash:F.minorgriddash})));F.startline&&T.push(R(ee(0),{color:F.startlinecolor,width:F.startlinewidth})),F.endline&&T.push(R(ee(N.length-1),{color:F.endlinecolor,width:F.endlinewidth}))}else{for(v=5e-15,h=[Math.floor((N[N.length-1]-F.tick0)/F.dtick*(1+v)),Math.ceil((N[0]-F.tick0)/F.dtick/(1+v))].sort(function(re,fe){return re-fe}),m=h[0],_=h[1],x=m;x<=_;x++)A=F.tick0+F.dtick*x,k.push(R(G(A),{color:F.gridcolor,width:F.gridwidth,dash:F.griddash}));for(x=m-1;x<_+1;x++)for(A=F.tick0+F.dtick*x,c=0;c<F.minorgridcount;c++)E=A+F.dtick*(c+1)/(F.minorgridcount+1),!(E<N[0]||E>N[N.length-1])&&P.push(R(G(E),{color:F.minorgridcolor,width:F.minorgridwidth,dash:F.minorgriddash}));F.startline&&T.push(R(G(N[0]),{color:F.startlinecolor,width:F.startlinewidth})),F.endline&&T.push(R(G(N[N.length-1]),{color:F.endlinecolor,width:F.endlinewidth}))}}}}),wrt=U({"src/traces/carpet/calc_labels.js"(pe,le){var w=Yu(),R=Ar().extendFlat;le.exports=function(z,l){var u,c,p,f,v,h=l._labels=[],m=l._gridlines;for(u=0;u<m.length;u++)v=m[u],["start","both"].indexOf(l.showticklabels)!==-1&&(c=w.tickText(l,v.value),R(c,{prefix:p,suffix:f,endAnchor:!0,xy:v.xy(0),dxy:v.dxy(0,0),axis:v.axis,length:v.crossAxis.length,font:v.axis.tickfont,isFirst:u===0,isLast:u===m.length-1}),h.push(c)),["end","both"].indexOf(l.showticklabels)!==-1&&(c=w.tickText(l,v.value),R(c,{endAnchor:!1,xy:v.xy(v.crossLength-1),dxy:v.dxy(v.crossLength-2,1),axis:v.axis,length:v.crossAxis.length,font:v.axis.tickfont,isFirst:u===0,isLast:u===m.length-1}),h.push(c))}}}),Srt=U({"src/traces/carpet/calc_clippath.js"(pe,le){le.exports=function(R,O,z,l){var u,c,p,f=[],v=!!z.smoothing,h=!!l.smoothing,m=R[0].length-1,_=R.length-1;for(u=0,c=[],p=[];u<=m;u++)c[u]=R[0][u],p[u]=O[0][u];for(f.push({x:c,y:p,bicubic:v}),u=0,c=[],p=[];u<=_;u++)c[u]=R[u][m],p[u]=O[u][m];for(f.push({x:c,y:p,bicubic:h}),u=m,c=[],p=[];u>=0;u--)c[m-u]=R[_][u],p[m-u]=O[_][u];for(f.push({x:c,y:p,bicubic:v}),u=_,c=[],p=[];u>=0;u--)c[_-u]=R[u][0],p[_-u]=O[u][0];return f.push({x:c,y:p,bicubic:h}),f}}}),Trt=U({"src/traces/carpet/smooth_fill_2d_array.js"(pe,le){var w=ii();le.exports=function(O,z,l){var u,c,p,f=[],v=[],h=O[0].length,m=O.length;function _(we,Oe){var ke=0,Le,oe=0;return we>0&&(Le=O[Oe][we-1])!==void 0&&(oe++,ke+=Le),we<h-1&&(Le=O[Oe][we+1])!==void 0&&(oe++,ke+=Le),Oe>0&&(Le=O[Oe-1][we])!==void 0&&(oe++,ke+=Le),Oe<m-1&&(Le=O[Oe+1][we])!==void 0&&(oe++,ke+=Le),ke/Math.max(1,oe)}var x=0;for(u=0;u<h;u++)for(c=0;c<m;c++)O[c][u]===void 0&&(f.push(u),v.push(c),O[c][u]=_(u,c)),x=Math.max(x,Math.abs(O[c][u]));if(!f.length)return O;var A,E,D,g,C,I,N,F,k,P,T,y=1e-5,S=0,M=100,W=0,$=f.length;do{for(S=0,p=0;p<$;p++){u=f[p],c=v[p];var Z=0,K=0,Q,J,G,ee,re,fe;u===0?(re=Math.min(h-1,2),G=z[re],ee=z[1],Q=O[c][re],J=O[c][1],K+=J+(J-Q)*(z[0]-ee)/(ee-G),Z++):u===h-1&&(re=Math.max(0,h-3),G=z[re],ee=z[h-2],Q=O[c][re],J=O[c][h-2],K+=J+(J-Q)*(z[h-1]-ee)/(ee-G),Z++),(u===0||u===h-1)&&c>0&&c<m-1&&(A=l[c+1]-l[c],E=l[c]-l[c-1],K+=(E*O[c+1][u]+A*O[c-1][u])/(E+A),Z++),c===0?(fe=Math.min(m-1,2),G=l[fe],ee=l[1],Q=O[fe][u],J=O[1][u],K+=J+(J-Q)*(l[0]-ee)/(ee-G),Z++):c===m-1&&(fe=Math.max(0,m-3),G=l[fe],ee=l[m-2],Q=O[fe][u],J=O[m-2][u],K+=J+(J-Q)*(l[m-1]-ee)/(ee-G),Z++),(c===0||c===m-1)&&u>0&&u<h-1&&(A=z[u+1]-z[u],E=z[u]-z[u-1],K+=(E*O[c][u+1]+A*O[c][u-1])/(E+A),Z++),Z?K/=Z:(D=z[u+1]-z[u],g=z[u]-z[u-1],C=l[c+1]-l[c],I=l[c]-l[c-1],N=D*g*(D+g),F=C*I*(C+I),K=(N*(I*O[c+1][u]+C*O[c-1][u])+F*(g*O[c][u+1]+D*O[c][u-1]))/(F*(g+D)+N*(I+C))),k=K-O[c][u],P=k/x,S+=P*P,T=Z?0:.85,O[c][u]+=k*(1+T)}S=Math.sqrt(S)}while(W++<M&&S>y);return w.log("Smoother converged to",S,"after",W,"iterations"),O}}}),Ert=U({"src/traces/carpet/constants.js"(pe,le){le.exports={RELATIVE_CULL_TOLERANCE:1e-6}}}),Art=U({"src/traces/carpet/catmull_rom.js"(pe,le){var w=.5;le.exports=function(O,z,l,u){var c=O[0]-z[0],p=O[1]-z[1],f=l[0]-z[0],v=l[1]-z[1],h=Math.pow(c*c+p*p,w/2),m=Math.pow(f*f+v*v,w/2),_=(m*m*c-h*h*f)*u,x=(m*m*p-h*h*v)*u,A=m*(h+m)*3,E=h*(h+m)*3;return[[z[0]+(A&&_/A),z[1]+(A&&x/A)],[z[0]-(E&&_/E),z[1]-(E&&x/E)]]}}}),Crt=U({"src/traces/carpet/compute_control_points.js"(pe,le){var w=Art(),R=ii().ensureArray;function O(z,l,u){var c=-.5*u[0]+1.5*l[0],p=-.5*u[1]+1.5*l[1];return[(2*c+z[0])/3,(2*p+z[1])/3]}le.exports=function(l,u,c,p,f,v){var h,m,_,x,A,E,D,g,C,I,N=c[0].length,F=c.length,k=f?3*N-2:N,P=v?3*F-2:F;for(l=R(l,P),u=R(u,P),_=0;_<P;_++)l[_]=R(l[_],k),u[_]=R(u[_],k);for(m=0,x=0;m<F;m++,x+=v?3:1)for(A=l[x],E=u[x],D=c[m],g=p[m],h=0,_=0;h<N;h++,_+=f?3:1)A[_]=D[h],E[_]=g[h];if(f)for(m=0,x=0;m<F;m++,x+=v?3:1){for(h=1,_=3;h<N-1;h++,_+=3)C=w([c[m][h-1],p[m][h-1]],[c[m][h],p[m][h]],[c[m][h+1],p[m][h+1]],f),l[x][_-1]=C[0][0],u[x][_-1]=C[0][1],l[x][_+1]=C[1][0],u[x][_+1]=C[1][1];I=O([l[x][0],u[x][0]],[l[x][2],u[x][2]],[l[x][3],u[x][3]]),l[x][1]=I[0],u[x][1]=I[1],I=O([l[x][k-1],u[x][k-1]],[l[x][k-3],u[x][k-3]],[l[x][k-4],u[x][k-4]]),l[x][k-2]=I[0],u[x][k-2]=I[1]}if(v)for(_=0;_<k;_++){for(x=3;x<P-3;x+=3)C=w([l[x-3][_],u[x-3][_]],[l[x][_],u[x][_]],[l[x+3][_],u[x+3][_]],v),l[x-1][_]=C[0][0],u[x-1][_]=C[0][1],l[x+1][_]=C[1][0],u[x+1][_]=C[1][1];I=O([l[0][_],u[0][_]],[l[2][_],u[2][_]],[l[3][_],u[3][_]]),l[1][_]=I[0],u[1][_]=I[1],I=O([l[P-1][_],u[P-1][_]],[l[P-3][_],u[P-3][_]],[l[P-4][_],u[P-4][_]]),l[P-2][_]=I[0],u[P-2][_]=I[1]}if(f&&v)for(x=1;x<P;x+=(x+1)%3===0?2:1){for(_=3;_<k-3;_+=3)C=w([l[x][_-3],u[x][_-3]],[l[x][_],u[x][_]],[l[x][_+3],u[x][_+3]],f),l[x][_-1]=.5*(l[x][_-1]+C[0][0]),u[x][_-1]=.5*(u[x][_-1]+C[0][1]),l[x][_+1]=.5*(l[x][_+1]+C[1][0]),u[x][_+1]=.5*(u[x][_+1]+C[1][1]);I=O([l[x][0],u[x][0]],[l[x][2],u[x][2]],[l[x][3],u[x][3]]),l[x][1]=.5*(l[x][1]+I[0]),u[x][1]=.5*(u[x][1]+I[1]),I=O([l[x][k-1],u[x][k-1]],[l[x][k-3],u[x][k-3]],[l[x][k-4],u[x][k-4]]),l[x][k-2]=.5*(l[x][k-2]+I[0]),u[x][k-2]=.5*(u[x][k-2]+I[1])}return[l,u]}}}),Mrt=U({"src/traces/carpet/create_spline_evaluator.js"(pe,le){le.exports=function(w,R,O,z,l){var u=R-2,c=O-2;return z&&l?function(p,f,v){p||(p=[]);var h,m,_,x,A,E,D=Math.max(0,Math.min(Math.floor(f),u)),g=Math.max(0,Math.min(Math.floor(v),c)),C=Math.max(0,Math.min(1,f-D)),I=Math.max(0,Math.min(1,v-g));D*=3,g*=3;var N=C*C,F=N*C,k=1-C,P=k*k,T=P*k,y=I*I,S=y*I,M=1-I,W=M*M,$=W*M;for(E=0;E<w.length;E++)A=w[E],h=T*A[g][D]+3*(P*C*A[g][D+1]+k*N*A[g][D+2])+F*A[g][D+3],m=T*A[g+1][D]+3*(P*C*A[g+1][D+1]+k*N*A[g+1][D+2])+F*A[g+1][D+3],_=T*A[g+2][D]+3*(P*C*A[g+2][D+1]+k*N*A[g+2][D+2])+F*A[g+2][D+3],x=T*A[g+3][D]+3*(P*C*A[g+3][D+1]+k*N*A[g+3][D+2])+F*A[g+3][D+3],p[E]=$*h+3*(W*I*m+M*y*_)+S*x;return p}:z?function(p,f,v){p||(p=[]);var h=Math.max(0,Math.min(Math.floor(f),u)),m=Math.max(0,Math.min(Math.floor(v),c)),_=Math.max(0,Math.min(1,f-h)),x=Math.max(0,Math.min(1,v-m)),A,E,D,g,C,I;h*=3;var N=_*_,F=N*_,k=1-_,P=k*k,T=P*k,y=1-x;for(C=0;C<w.length;C++)I=w[C],A=y*I[m][h]+x*I[m+1][h],E=y*I[m][h+1]+x*I[m+1][h+1],D=y*I[m][h+2]+x*I[m+1][h+1],g=y*I[m][h+3]+x*I[m+1][h+1],p[C]=T*A+3*(P*_*E+k*N*D)+F*g;return p}:l?function(p,f,v){p||(p=[]);var h=Math.max(0,Math.min(Math.floor(f),u)),m=Math.max(0,Math.min(Math.floor(v),c)),_=Math.max(0,Math.min(1,f-h)),x=Math.max(0,Math.min(1,v-m)),A,E,D,g,C,I;m*=3;var N=x*x,F=N*x,k=1-x,P=k*k,T=P*k,y=1-_;for(C=0;C<w.length;C++)I=w[C],A=y*I[m][h]+_*I[m][h+1],E=y*I[m+1][h]+_*I[m+1][h+1],D=y*I[m+2][h]+_*I[m+2][h+1],g=y*I[m+3][h]+_*I[m+3][h+1],p[C]=T*A+3*(P*x*E+k*N*D)+F*g;return p}:function(p,f,v){p||(p=[]);var h=Math.max(0,Math.min(Math.floor(f),u)),m=Math.max(0,Math.min(Math.floor(v),c)),_=Math.max(0,Math.min(1,f-h)),x=Math.max(0,Math.min(1,v-m)),A,E,D,g,C=1-x,I=1-_;for(D=0;D<w.length;D++)g=w[D],A=I*g[m][h]+_*g[m][h+1],E=I*g[m+1][h]+_*g[m+1][h+1],p[D]=C*A+x*E;return p}}}}),Rrt=U({"src/traces/carpet/create_i_derivative_evaluator.js"(pe,le){le.exports=function(w,R,O){return R&&O?function(z,l,u,c,p){z||(z=[]);var f,v,h,m,_,x;l*=3,u*=3;var A=c*c,E=1-c,D=E*E,g=E*c*2,C=-3*D,I=3*(D-g),N=3*(g-A),F=3*A,k=p*p,P=k*p,T=1-p,y=T*T,S=y*T;for(x=0;x<w.length;x++)_=w[x],f=C*_[u][l]+I*_[u][l+1]+N*_[u][l+2]+F*_[u][l+3],v=C*_[u+1][l]+I*_[u+1][l+1]+N*_[u+1][l+2]+F*_[u+1][l+3],h=C*_[u+2][l]+I*_[u+2][l+1]+N*_[u+2][l+2]+F*_[u+2][l+3],m=C*_[u+3][l]+I*_[u+3][l+1]+N*_[u+3][l+2]+F*_[u+3][l+3],z[x]=S*f+3*(y*p*v+T*k*h)+P*m;return z}:R?function(z,l,u,c,p){z||(z=[]);var f,v,h,m;l*=3;var _=c*c,x=1-c,A=x*x,E=x*c*2,D=-3*A,g=3*(A-E),C=3*(E-_),I=3*_,N=1-p;for(h=0;h<w.length;h++)m=w[h],f=D*m[u][l]+g*m[u][l+1]+C*m[u][l+2]+I*m[u][l+3],v=D*m[u+1][l]+g*m[u+1][l+1]+C*m[u+1][l+2]+I*m[u+1][l+3],z[h]=N*f+p*v;return z}:O?function(z,l,u,c,p){z||(z=[]);var f,v,h,m,_,x;u*=3;var A=p*p,E=A*p,D=1-p,g=D*D,C=g*D;for(_=0;_<w.length;_++)x=w[_],f=x[u][l+1]-x[u][l],v=x[u+1][l+1]-x[u+1][l],h=x[u+2][l+1]-x[u+2][l],m=x[u+3][l+1]-x[u+3][l],z[_]=C*f+3*(g*p*v+D*A*h)+E*m;return z}:function(z,l,u,c,p){z||(z=[]);var f,v,h,m,_=1-p;for(h=0;h<w.length;h++)m=w[h],f=m[u][l+1]-m[u][l],v=m[u+1][l+1]-m[u+1][l],z[h]=_*f+p*v;return z}}}}),krt=U({"src/traces/carpet/create_j_derivative_evaluator.js"(pe,le){le.exports=function(w,R,O){return R&&O?function(z,l,u,c,p){z||(z=[]);var f,v,h,m,_,x;l*=3,u*=3;var A=c*c,E=A*c,D=1-c,g=D*D,C=g*D,I=p*p,N=1-p,F=N*N,k=N*p*2,P=-3*F,T=3*(F-k),y=3*(k-I),S=3*I;for(x=0;x<w.length;x++)_=w[x],f=P*_[u][l]+T*_[u+1][l]+y*_[u+2][l]+S*_[u+3][l],v=P*_[u][l+1]+T*_[u+1][l+1]+y*_[u+2][l+1]+S*_[u+3][l+1],h=P*_[u][l+2]+T*_[u+1][l+2]+y*_[u+2][l+2]+S*_[u+3][l+2],m=P*_[u][l+3]+T*_[u+1][l+3]+y*_[u+2][l+3]+S*_[u+3][l+3],z[x]=C*f+3*(g*c*v+D*A*h)+E*m;return z}:R?function(z,l,u,c,p){z||(z=[]);var f,v,h,m,_,x;l*=3;var A=p*p,E=A*p,D=1-p,g=D*D,C=g*D;for(_=0;_<w.length;_++)x=w[_],f=x[u+1][l]-x[u][l],v=x[u+1][l+1]-x[u][l+1],h=x[u+1][l+2]-x[u][l+2],m=x[u+1][l+3]-x[u][l+3],z[_]=C*f+3*(g*p*v+D*A*h)+E*m;return z}:O?function(z,l,u,c,p){z||(z=[]);var f,v,h,m;u*=3;var _=1-c,x=p*p,A=1-p,E=A*A,D=A*p*2,g=-3*E,C=3*(E-D),I=3*(D-x),N=3*x;for(h=0;h<w.length;h++)m=w[h],f=g*m[u][l]+C*m[u+1][l]+I*m[u+2][l]+N*m[u+3][l],v=g*m[u][l+1]+C*m[u+1][l+1]+I*m[u+2][l+1]+N*m[u+3][l+1],z[h]=_*f+c*v;return z}:function(z,l,u,c,p){z||(z=[]);var f,v,h,m,_=1-c;for(h=0;h<w.length;h++)m=w[h],f=m[u+1][l]-m[u][l],v=m[u+1][l+1]-m[u][l+1],z[h]=_*f+c*v;return z}}}}),Irt=U({"src/traces/carpet/set_convert.js"(pe,le){var w=Ert(),R=ea().findBin,O=Crt(),z=Mrt(),l=Rrt(),u=krt();le.exports=function(p){var f=p._a,v=p._b,h=f.length,m=v.length,_=p.aaxis,x=p.baxis,A=f[0],E=f[h-1],D=v[0],g=v[m-1],C=f[f.length-1]-f[0],I=v[v.length-1]-v[0],N=C*w.RELATIVE_CULL_TOLERANCE,F=I*w.RELATIVE_CULL_TOLERANCE;A-=N,E+=N,D-=F,g+=F,p.isVisible=function(k,P){return k>A&&k<E&&P>D&&P<g},p.isOccluded=function(k,P){return k<A||k>E||P<D||P>g},p.setScale=function(){var k=p._x,P=p._y,T=O(p._xctrl,p._yctrl,k,P,_.smoothing,x.smoothing);p._xctrl=T[0],p._yctrl=T[1],p.evalxy=z([p._xctrl,p._yctrl],h,m,_.smoothing,x.smoothing),p.dxydi=l([p._xctrl,p._yctrl],_.smoothing,x.smoothing),p.dxydj=u([p._xctrl,p._yctrl],_.smoothing,x.smoothing)},p.i2a=function(k){var P=Math.max(0,Math.floor(k[0]),h-2),T=k[0]-P;return(1-T)*f[P]+T*f[P+1]},p.j2b=function(k){var P=Math.max(0,Math.floor(k[1]),h-2),T=k[1]-P;return(1-T)*v[P]+T*v[P+1]},p.ij2ab=function(k){return[p.i2a(k[0]),p.j2b(k[1])]},p.a2i=function(k){var P=Math.max(0,Math.min(R(k,f),h-2)),T=f[P],y=f[P+1];return Math.max(0,Math.min(h-1,P+(k-T)/(y-T)))},p.b2j=function(k){var P=Math.max(0,Math.min(R(k,v),m-2)),T=v[P],y=v[P+1];return Math.max(0,Math.min(m-1,P+(k-T)/(y-T)))},p.ab2ij=function(k){return[p.a2i(k[0]),p.b2j(k[1])]},p.i2c=function(k,P){return p.evalxy([],k,P)},p.ab2xy=function(k,P,T){if(!T&&(k<f[0]||k>f[h-1]|P<v[0]||P>v[m-1]))return[!1,!1];var y=p.a2i(k),S=p.b2j(P),M=p.evalxy([],y,S);if(T){var W=0,$=0,Z=[],K,Q,J,G;k<f[0]?(K=0,Q=0,W=(k-f[0])/(f[1]-f[0])):k>f[h-1]?(K=h-2,Q=1,W=(k-f[h-1])/(f[h-1]-f[h-2])):(K=Math.max(0,Math.min(h-2,Math.floor(y))),Q=y-K),P<v[0]?(J=0,G=0,$=(P-v[0])/(v[1]-v[0])):P>v[m-1]?(J=m-2,G=1,$=(P-v[m-1])/(v[m-1]-v[m-2])):(J=Math.max(0,Math.min(m-2,Math.floor(S))),G=S-J),W&&(p.dxydi(Z,K,J,Q,G),M[0]+=Z[0]*W,M[1]+=Z[1]*W),$&&(p.dxydj(Z,K,J,Q,G),M[0]+=Z[0]*$,M[1]+=Z[1]*$)}return M},p.c2p=function(k,P,T){return[P.c2p(k[0]),T.c2p(k[1])]},p.p2x=function(k,P,T){return[P.p2c(k[0]),T.p2c(k[1])]},p.dadi=function(k){var P=Math.max(0,Math.min(f.length-2,k));return f[P+1]-f[P]},p.dbdj=function(k){var P=Math.max(0,Math.min(v.length-2,k));return v[P+1]-v[P]},p.dxyda=function(k,P,T,y){var S=p.dxydi(null,k,P,T,y),M=p.dadi(k,T);return[S[0]/M,S[1]/M]},p.dxydb=function(k,P,T,y){var S=p.dxydj(null,k,P,T,y),M=p.dbdj(P,y);return[S[0]/M,S[1]/M]},p.dxyda_rough=function(k,P,T){var y=C*(T||.1),S=p.ab2xy(k+y,P,!0),M=p.ab2xy(k-y,P,!0);return[(S[0]-M[0])*.5/y,(S[1]-M[1])*.5/y]},p.dxydb_rough=function(k,P,T){var y=I*(T||.1),S=p.ab2xy(k,P+y,!0),M=p.ab2xy(k,P-y,!0);return[(S[0]-M[0])*.5/y,(S[1]-M[1])*.5/y]},p.dpdx=function(k){return k._m},p.dpdy=function(k){return k._m}}}}),Prt=U({"src/traces/carpet/calc.js"(pe,le){var w=Yu(),R=ii().isArray1D,O=brt(),z=xrt(),l=_rt(),u=wrt(),c=Srt(),p=wT(),f=Trt(),v=a2(),h=Irt();le.exports=function(_,x){var A=w.getFromId(_,x.xaxis),E=w.getFromId(_,x.yaxis),D=x.aaxis,g=x.baxis,C=x.x,I=x.y,N=[];C&&R(C)&&N.push("x"),I&&R(I)&&N.push("y"),N.length&&v(x,D,g,"a","b",N);var F=x._a=x._a||x.a,k=x._b=x._b||x.b;C=x._x||x.x,I=x._y||x.y;var P={};if(x._cheater){var T=D.cheatertype==="index"?F.length:F,y=g.cheatertype==="index"?k.length:k;C=O(T,y,x.cheaterslope)}x._x=C=p(C),x._y=I=p(I),f(C,F,k),f(I,F,k),h(x),x.setScale();var S=z(C),M=z(I),W=.5*(S[1]-S[0]),$=.5*(S[1]+S[0]),Z=.5*(M[1]-M[0]),K=.5*(M[1]+M[0]),Q=1.3;return S=[$-W*Q,$+W*Q],M=[K-Z*Q,K+Z*Q],x._extremes[A._id]=w.findExtremes(A,S,{padded:!0}),x._extremes[E._id]=w.findExtremes(E,M,{padded:!0}),l(x,"a","b"),l(x,"b","a"),u(x,D),u(x,g),P.clipsegments=c(x._xctrl,x._yctrl,D,g),P.x=C,P.y=I,P.a=F,P.b=k,[P]}}}),Drt=U({"src/traces/carpet/index.js"(pe,le){le.exports={attributes:CK(),supplyDefaults:mrt(),plot:yrt(),calc:Prt(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:Rf(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}}}),Lrt=U({"lib/carpet.js"(pe,le){le.exports=Drt()}}),Kxe=U({"src/traces/scattercarpet/attributes.js"(pe,le){var w=Xc(),R=Kc(),O=Jn(),z=Js().hovertemplateAttrs,l=Js().texttemplateAttrs,u=Jd(),c=Ar().extendFlat,p=R.marker,f=R.line,v=p.line;le.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:c({},R.mode,{dflt:"markers"}),text:c({},R.text,{}),texttemplate:l({editType:"plot"},{keys:["a","b","text"]}),hovertext:c({},R.hovertext,{}),line:{color:f.color,width:f.width,dash:f.dash,backoff:f.backoff,shape:c({},f.shape,{values:["linear","spline"]}),smoothing:f.smoothing,editType:"calc"},connectgaps:R.connectgaps,fill:c({},R.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:w(),marker:c({symbol:p.symbol,opacity:p.opacity,maxdisplayed:p.maxdisplayed,angle:p.angle,angleref:p.angleref,standoff:p.standoff,size:p.size,sizeref:p.sizeref,sizemin:p.sizemin,sizemode:p.sizemode,line:c({width:v.width,editType:"calc"},u("marker.line")),gradient:p.gradient,editType:"calc"},u("marker")),textfont:R.textfont,textposition:R.textposition,selected:R.selected,unselected:R.unselected,hoverinfo:c({},O.hoverinfo,{flags:["a","b","text","name"]}),hoveron:R.hoveron,hovertemplate:z(),zorder:R.zorder}}}),Ort=U({"src/traces/scattercarpet/defaults.js"(pe,le){var w=ii(),R=hu(),O=Qd(),z=r0(),l=Xy(),u=g0(),c=y0(),p=Ch(),f=Kxe();le.exports=function(h,m,_,x){function A(F,k){return w.coerce(h,m,f,F,k)}A("carpet"),m.xaxis="x",m.yaxis="y";var E=A("a"),D=A("b"),g=Math.min(E.length,D.length);if(!g){m.visible=!1;return}m._length=g,A("text"),A("texttemplate"),A("hovertext");var C=g<R.PTS_LINESONLY?"lines+markers":"lines";A("mode",C),O.hasMarkers(m)&&z(h,m,_,x,A,{gradient:!0}),O.hasLines(m)&&(l(h,m,_,x,A,{backoff:!0}),u(h,m,A),A("connectgaps")),O.hasText(m)&&c(h,m,x,A);var I=[];(O.hasMarkers(m)||O.hasText(m))&&(A("marker.maxdisplayed"),I.push("points")),A("fill"),m.fill!=="none"&&(p(h,m,_,A),O.hasLines(m)||u(h,m,A)),(m.fill==="tonext"||m.fill==="toself")&&I.push("fills");var N=A("hoveron",I.join("+")||"points");N!=="fills"&&A("hovertemplate"),A("zorder"),w.coerceSelectionMarkerOpacity(m,A)}}}),Nrt=U({"src/traces/scattercarpet/format_labels.js"(pe,le){le.exports=function(R,O){var z={},l=O._carpet,u=l.ab2ij([R.a,R.b]),c=Math.floor(u[0]),p=u[0]-c,f=Math.floor(u[1]),v=u[1]-f,h=l.evalxy([],c,f,p,v);return z.yLabel=h[1].toFixed(3),z}}}),MK=U({"src/traces/carpet/lookup_carpetid.js"(pe,le){le.exports=function(w,R){for(var O=w._fullData.length,z,l=0;l<O;l++){var u=w._fullData[l];if(u.index!==R.index&&u.type==="carpet"&&(z||(z=u),u.carpet===R.carpet))return u}return z}}}),Frt=U({"src/traces/scattercarpet/calc.js"(pe,le){var w=_t(),R=b0(),O=zm(),z=k1(),l=my().calcMarkerSize,u=MK();le.exports=function(p,f){var v=f._carpetTrace=u(p,f);if(!(!v||!v.visible||v.visible==="legendonly")){var h;f.xaxis=v.xaxis,f.yaxis=v.yaxis;var m=f._length,_=new Array(m),x,A,E=!1;for(h=0;h<m;h++)if(x=f.a[h],A=f.b[h],w(x)&&w(A)){var D=v.ab2xy(+x,+A,!0),g=v.isVisible(+x,+A);g||(E=!0),_[h]={x:D[0],y:D[1],a:x,b:A,vis:g}}else _[h]={x:!1,y:!1};return f._needsCull=E,_[0].carpet=v,_[0].trace=f,l(f,m),R(p,f),O(_,f),z(_,f),_}}}}),zrt=U({"src/traces/scattercarpet/plot.js"(pe,le){var w=Ob(),R=Yu(),O=ec();le.exports=function(l,u,c,p){var f,v,h,m=c[0][0].carpet,_=R.getFromId(l,m.xaxis||"x"),x=R.getFromId(l,m.yaxis||"y"),A={xaxis:_,yaxis:x,plot:u.plot};for(f=0;f<c.length;f++)v=c[f][0].trace,v._xA=_,v._yA=x;for(w(l,A,c,p),f=0;f<c.length;f++)v=c[f][0].trace,h=p.selectAll("g.trace"+v.uid+" .js-line"),O.setClipUrl(h,c[f][0].carpet._clipPathId,l)}}}),Brt=U({"src/traces/scattercarpet/hover.js"(pe,le){var w=sv(),R=ii().fillText;le.exports=function(z,l,u,c){var p=w(z,l,u,c);if(!p||p[0].index===!1)return;var f=p[0];if(f.index===void 0){var v=1-f.y0/z.ya._length,h=z.xa._length,m=h*v/2,_=h-m;return f.x0=Math.max(Math.min(f.x0,_),m),f.x1=Math.max(Math.min(f.x1,_),m),p}var x=f.cd[f.index];f.a=x.a,f.b=x.b,f.xLabelVal=void 0,f.yLabelVal=void 0;var A=f.trace,E=A._carpet,D=A._module.formatLabels(x,A);f.yLabel=D.yLabel,delete f.text;var g=[];function C(F,k){var P;F.labelprefix&&F.labelprefix.length>0?P=F.labelprefix.replace(/ = $/,""):P=F._hovertitle,g.push(P+": "+k.toFixed(3)+F.labelsuffix)}if(!A.hovertemplate){var I=x.hi||A.hoverinfo,N=I.split("+");N.indexOf("all")!==-1&&(N=["a","b","text"]),N.indexOf("a")!==-1&&C(E.aaxis,x.a),N.indexOf("b")!==-1&&C(E.baxis,x.b),g.push("y: "+f.yLabel),N.indexOf("text")!==-1&&R(x,A,g),f.extraText=g.join("<br>")}return p}}}),Urt=U({"src/traces/scattercarpet/event_data.js"(pe,le){le.exports=function(R,O,z,l,u){var c=l[u];return R.a=c.a,R.b=c.b,R.y=c.y,R}}}),Hrt=U({"src/traces/scattercarpet/index.js"(pe,le){le.exports={attributes:Kxe(),supplyDefaults:Ort(),colorbar:qg(),formatLabels:Nrt(),calc:Frt(),plot:zrt(),style:z0().style,styleOnSelect:z0().styleOnSelect,hoverPoints:Brt(),selectPoints:qd(),eventData:Urt(),moduleType:"trace",name:"scattercarpet",basePlotModule:Rf(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}}}),jrt=U({"lib/scattercarpet.js"(pe,le){le.exports=Hrt()}}),Jxe=U({"src/traces/contourcarpet/attributes.js"(pe,le){var w=GE(),R=s2(),O=Jd(),z=Ar().extendFlat,l=R.contours;le.exports=z({carpet:{valType:"string",editType:"calc"},z:w.z,a:w.x,a0:w.x0,da:w.dx,b:w.y,b0:w.y0,db:w.dy,text:w.text,hovertext:w.hovertext,transpose:w.transpose,atype:w.xtype,btype:w.ytype,fillcolor:R.fillcolor,autocontour:R.autocontour,ncontours:R.ncontours,contours:{type:l.type,start:l.start,end:l.end,size:l.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:l.showlines,showlabels:l.showlabels,labelfont:l.labelfont,labelformat:l.labelformat,operation:l.operation,value:l.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:R.line.color,width:R.line.width,dash:R.line.dash,smoothing:R.line.smoothing,editType:"plot"},zorder:R.zorder},O("",{cLetter:"z",autoColorDflt:!1}))}}),Qxe=U({"src/traces/contourcarpet/defaults.js"(pe,le){var w=ii(),R=$E(),O=Jxe(),z=e3(),l=JE(),u=Tg();le.exports=function(p,f,v,h){function m(E,D){return w.coerce(p,f,O,E,D)}function _(E){return w.coerce2(p,f,O,E)}if(m("carpet"),p.a&&p.b){var x=R(p,f,m,h,"a","b");if(!x){f.visible=!1;return}m("text");var A=m("contours.type")==="constraint";A?z(p,f,m,h,v,{hasHover:!1}):(l(p,f,m,_),u(p,f,m,h,{hasHover:!1}))}else f._defaultColor=v,f._length=null;m("zorder")}}}),Vrt=U({"src/traces/contourcarpet/calc.js"(pe,le){var w=t0(),R=ii(),O=a2(),z=wT(),l=sS(),u=jA(),c=D1(),p=Qxe(),f=MK(),v=QE();le.exports=function(_,x){var A=x._carpetTrace=f(_,x);if(!(!A||!A.visible||A.visible==="legendonly")){if(!x.a||!x.b){var E=_.data[A.index],D=_.data[x.index];D.a||(D.a=E.a),D.b||(D.b=E.b),p(D,x,x._defaultColor,_._fullLayout)}var g=h(_,x);return v(x,x._z),g}};function h(m,_){var x=_._carpetTrace,A=x.aaxis,E=x.baxis,D,g,C,I,N,F,k;A._minDtick=0,E._minDtick=0,R.isArray1D(_.z)&&O(_,A,E,"a","b",["z"]),D=_._a=_._a||_.a,I=_._b=_._b||_.b,D=D?A.makeCalcdata(_,"_a"):[],I=I?E.makeCalcdata(_,"_b"):[],g=_.a0||0,C=_.da||1,N=_.b0||0,F=_.db||1,k=_._z=z(_._z||_.z,_.transpose),_._emptypoints=u(k),l(k,_._emptypoints);var P=R.maxRowLength(k),T=_.xtype==="scaled"?"":D,y=c(_,T,g,C,P,A),S=_.ytype==="scaled"?"":I,M=c(_,S,N,F,k.length,E),W={a:y,b:M,z:k};return _.contours.type==="levels"&&_.contours.coloring!=="none"&&w(m,_,{vals:k,containerStr:"",cLetter:"z"}),[W]}}}),qrt=U({"src/traces/carpet/axis_aligned_line.js"(pe,le){var w=ii().isArrayOrTypedArray;le.exports=function(R,O,z,l){var u,c,p,f,v,h,m,_,x,A,E,D,g,C=w(z)?"a":"b",I=C==="a"?R.aaxis:R.baxis,N=I.smoothing,F=C==="a"?R.a2i:R.b2j,k=C==="a"?z:l,P=C==="a"?l:z,T=C==="a"?O.a.length:O.b.length,y=C==="a"?O.b.length:O.a.length,S=Math.floor(C==="a"?R.b2j(P):R.a2i(P)),M=C==="a"?function(Oe){return R.evalxy([],Oe,S)}:function(Oe){return R.evalxy([],S,Oe)};N&&(p=Math.max(0,Math.min(y-2,S)),f=S-p,c=C==="a"?function(Oe,ke){return R.dxydi([],Oe,p,ke,f)}:function(Oe,ke){return R.dxydj([],p,Oe,f,ke)});var W=F(k[0]),$=F(k[1]),Z=W<$?1:-1,K=($-W)*1e-8,Q=Z>0?Math.floor:Math.ceil,J=Z>0?Math.ceil:Math.floor,G=Z>0?Math.min:Math.max,ee=Z>0?Math.max:Math.min,re=Q(W+K),fe=J($-K);m=M(W);var we=[[m]];for(u=re;u*Z<fe*Z;u+=Z)v=[],E=ee(W,u),D=G($,u+Z),g=D-E,h=Math.max(0,Math.min(T-2,Math.floor(.5*(E+D)))),_=M(D),N&&(x=c(h,E-h),A=c(h,D-h),v.push([m[0]+x[0]/3*g,m[1]+x[1]/3*g]),v.push([_[0]-A[0]/3*g,_[1]-A[1]/3*g])),v.push(_),we.push(v),m=_;return we}}}),Grt=U({"src/traces/contourcarpet/plot.js"(pe,le){var w=Ze(),R=Xxe(),O=Zxe(),z=ec(),l=ii(),u=MM(),c=u2(),p=RM(),f=iw(),v=xy(),h=lv(),m=Bb(),_=MK(),x=qrt();le.exports=function(T,y,S,M){var W=y.xaxis,$=y.yaxis;l.makeTraceGroups(M,S,"contour").each(function(Z){var K=w.select(this),Q=Z[0],J=Q.trace,G=J._carpetTrace=_(T,J),ee=T.calcdata[G.index][0];if(!G.visible||G.visible==="legendonly")return;var re=Q.a,fe=Q.b,we=J.contours,Oe=h(we,y,Q),ke=we.type==="constraint",Le=we._operation,oe=ke?Le==="="?"lines":"fill":we.coloring;function be(gt){var pt=G.ab2xy(gt[0],gt[1],!0);return[W.c2p(pt[0]),$.c2p(pt[1])]}var _e=[[re[0],fe[fe.length-1]],[re[re.length-1],fe[fe.length-1]],[re[re.length-1],fe[0]],[re[0],fe[0]]];u(Oe);var he=(re[re.length-1]-re[0])*1e-8,De=(fe[fe.length-1]-fe[0])*1e-8;c(Oe,he,De);var xe=Oe;we.type==="constraint"&&(xe=v(Oe,Le)),A(Oe,be);var se,Ee,Te,Be,tt=[];for(Be=ee.clipsegments.length-1;Be>=0;Be--)se=ee.clipsegments[Be],Ee=R([],se.x,W.c2p),Te=R([],se.y,$.c2p),Ee.reverse(),Te.reverse(),tt.push(O(Ee,Te,se.bicubic));var at="M"+tt.join("L")+"Z";N(K,ee.clipsegments,W,$,ke,oe),F(J,K,W,$,xe,_e,be,G,ee,oe,at),E(K,Oe,T,Q,we,y,G),z.setClipUrl(K,G._clipPathId,T)})};function A(P,T){var y,S,M,W,$,Z,K,Q,J;for(y=0;y<P.length;y++){for(W=P[y],$=W.pedgepaths=[],Z=W.ppaths=[],S=0;S<W.edgepaths.length;S++){for(J=W.edgepaths[S],K=[],M=0;M<J.length;M++)K[M]=T(J[M]);$.push(K)}for(S=0;S<W.paths.length;S++){for(J=W.paths[S],Q=[],M=0;M<J.length;M++)Q[M]=T(J[M]);Z.push(Q)}}}function E(P,T,y,S,M,W,$){var Z=y._context.staticPlot,K=l.ensureSingle(P,"g","contourlines"),Q=M.showlines!==!1,J=M.showlabels,G=Q&&J,ee=p.createLines(K,Q||J,T,Z),re=p.createLineClip(K,G,y,S.trace.uid),fe=P.selectAll("g.contourlabels").data(J?[0]:[]);if(fe.exit().remove(),fe.enter().append("g").classed("contourlabels",!0),J){var we=W.xaxis,Oe=W.yaxis,ke=we._length,Le=Oe._length,oe=[[[0,0],[ke,0],[ke,Le],[0,Le]]],be=[];l.clearLocationCache();var _e=p.labelFormatter(y,S),he=z.tester.append("text").attr("data-notex",1).call(z.font,M.labelfont),De={left:0,right:ke,center:ke/2,top:0,bottom:Le,middle:Le/2},xe=Math.sqrt(ke*ke+Le*Le),se=f.LABELDISTANCE*xe/Math.max(1,T.length/f.LABELINCREASE);ee.each(function(Ee){var Te=p.calcTextOpts(Ee.level,_e,he,y);w.select(this).selectAll("path").each(function(Be){var tt=this,at=l.getVisibleSegment(tt,De,Te.height/2);if(at&&(D(tt,Be,Ee,at,$,Te.height),!(at.len<(Te.width+Te.height)*f.LABELMIN)))for(var gt=Math.min(Math.ceil(at.len/se),f.LABELMAX),pt=0;pt<gt;pt++){var Rt=p.findBestTextLocation(tt,at,Te,be,De);if(!Rt)break;p.addLabelData(Rt,Te,be,oe)}})}),he.remove(),p.drawLabels(fe,be,y,re,G?oe:null)}J&&!Q&&ee.remove()}function D(P,T,y,S,M,W){for(var $,Z=0;Z<y.pedgepaths.length;Z++)T===y.pedgepaths[Z]&&($=y.edgepaths[Z]);if(!$)return;var K=M.a[0],Q=M.a[M.a.length-1],J=M.b[0],G=M.b[M.b.length-1];function ee(ke,Le){var oe=0,be,_e=.1;return(Math.abs(ke[0]-K)<_e||Math.abs(ke[0]-Q)<_e)&&(be=C(M.dxydb_rough(ke[0],ke[1],_e)),oe=Math.max(oe,W*I(Le,be)/2)),(Math.abs(ke[1]-J)<_e||Math.abs(ke[1]-G)<_e)&&(be=C(M.dxyda_rough(ke[0],ke[1],_e)),oe=Math.max(oe,W*I(Le,be)/2)),oe}var re=g(P,0,1),fe=g(P,S.total,S.total-1),we=ee($[0],re),Oe=S.total-ee($[$.length-1],fe);S.min<we&&(S.min=we),S.max>Oe&&(S.max=Oe),S.len=S.max-S.min}function g(P,T,y){var S=P.getPointAtLength(T),M=P.getPointAtLength(y),W=M.x-S.x,$=M.y-S.y,Z=Math.sqrt(W*W+$*$);return[W/Z,$/Z]}function C(P){var T=Math.sqrt(P[0]*P[0]+P[1]*P[1]);return[P[0]/T,P[1]/T]}function I(P,T){var y=Math.abs(P[0]*T[0]+P[1]*T[1]),S=Math.sqrt(1-y*y);return S/y}function N(P,T,y,S,M,W){var $,Z,K,Q,J=l.ensureSingle(P,"g","contourbg"),G=J.selectAll("path").data(W==="fill"&&!M?[0]:[]);G.enter().append("path"),G.exit().remove();var ee=[];for(Q=0;Q<T.length;Q++)$=T[Q],Z=R([],$.x,y.c2p),K=R([],$.y,S.c2p),ee.push(O(Z,K,$.bicubic));G.attr("d","M"+ee.join("L")+"Z").style("stroke","none")}function F(P,T,y,S,M,W,$,Z,K,Q,J){var G=Q==="fill";G&&m(M,P.contours);var ee=l.ensureSingle(T,"g","contourfill"),re=ee.selectAll("path").data(G?M:[]);re.enter().append("path"),re.exit().remove(),re.each(function(fe){var we=(fe.prefixBoundary?J:"")+k(P,fe,W,$,Z,K,y,S);we?w.select(this).attr("d",we).style("stroke","none"):w.select(this).remove()})}function k(P,T,y,S,M,W,$,Z){var K,Q="",J=T.edgepaths.map(function(Te,Be){return Be}),G=!0,ee,re,fe,we,Oe,ke,Le=Math.abs(y[0][0]-y[2][0])*1e-4,oe=Math.abs(y[0][1]-y[2][1])*1e-4;function be(Te){return Math.abs(Te[1]-y[0][1])<oe}function _e(Te){return Math.abs(Te[1]-y[2][1])<oe}function he(Te){return Math.abs(Te[0]-y[0][0])<Le}function De(Te){return Math.abs(Te[0]-y[2][0])<Le}function xe(Te,Be){var tt,at,gt,pt,Rt="";for(be(Te)&&!De(Te)||_e(Te)&&!he(Te)?(pt=M.aaxis,gt=x(M,W,[Te[0],Be[0]],.5*(Te[1]+Be[1]))):(pt=M.baxis,gt=x(M,W,.5*(Te[0]+Be[0]),[Te[1],Be[1]])),tt=1;tt<gt.length;tt++)for(Rt+=pt.smoothing?"C":"L",at=0;at<gt[tt].length;at++){var $t=gt[tt][at];Rt+=[$.c2p($t[0]),Z.c2p($t[1])]+" "}return Rt}for(K=0,ee=null;J.length;){var se=T.edgepaths[K][0];for(ee&&(Q+=xe(ee,se)),ke=z.smoothopen(T.edgepaths[K].map(S),T.smoothing),Q+=G?ke:ke.replace(/^M/,"L"),J.splice(J.indexOf(K),1),ee=T.edgepaths[K][T.edgepaths[K].length-1],we=-1,fe=0;fe<4;fe++){if(!ee){l.log("Missing end?",K,T);break}for(be(ee)&&!De(ee)?re=y[1]:he(ee)?re=y[0]:_e(ee)?re=y[3]:De(ee)&&(re=y[2]),Oe=0;Oe<T.edgepaths.length;Oe++){var Ee=T.edgepaths[Oe][0];Math.abs(ee[0]-re[0])<Le?Math.abs(ee[0]-Ee[0])<Le&&(Ee[1]-ee[1])*(re[1]-Ee[1])>=0&&(re=Ee,we=Oe):Math.abs(ee[1]-re[1])<oe?Math.abs(ee[1]-Ee[1])<oe&&(Ee[0]-ee[0])*(re[0]-Ee[0])>=0&&(re=Ee,we=Oe):l.log("endpt to newendpt is not vert. or horz.",ee,re,Ee)}if(we>=0)break;Q+=xe(ee,re),ee=re}if(we===T.edgepaths.length){l.log("unclosed perimeter path");break}K=we,G=J.indexOf(K)===-1,G&&(K=J[0],Q+=xe(ee,re)+"Z",ee=null)}for(K=0;K<T.paths.length;K++)Q+=z.smoothclosed(T.paths[K].map(S),T.smoothing);return Q}}}),$rt=U({"src/traces/contourcarpet/index.js"(pe,le){le.exports={attributes:Jxe(),supplyDefaults:Qxe(),colorbar:nm(),calc:Vrt(),plot:Grt(),style:Ub(),moduleType:"trace",name:"contourcarpet",basePlotModule:Rf(),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}}}),Wrt=U({"lib/contourcarpet.js"(pe,le){le.exports=$rt()}}),RK=U({"src/traces/ohlc/attributes.js"(pe,le){var w=ii().extendFlat,R=Kc(),O=Wp().axisHoverFormat,z=jl().dash,l=Qn(),u=lw(),c=u.INCREASING.COLOR,p=u.DECREASING.COLOR,f=R.line;function v(h){return{line:{color:w({},f.color,{dflt:h}),width:f.width,dash:z,editType:"style"},editType:"style"}}le.exports={xperiod:R.xperiod,xperiod0:R.xperiod0,xperiodalignment:R.xperiodalignment,xhoverformat:O("x"),yhoverformat:O("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:w({},f.width,{}),dash:w({},z,{}),editType:"style"},increasing:v(c),decreasing:v(p),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:w({},l.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}}),zorder:R.zorder}}}),e_e=U({"src/traces/ohlc/ohlc_defaults.js"(pe,le){var w=Mi(),R=ii();le.exports=function(z,l,u,c){var p=u("x"),f=u("open"),v=u("high"),h=u("low"),m=u("close");u("hoverlabel.split");var _=w.getComponentMethod("calendars","handleTraceDefaults");if(_(z,l,["x"],c),!!(f&&v&&h&&m)){var x=Math.min(f.length,v.length,h.length,m.length);return p&&(x=Math.min(x,R.minRowLength(p))),l._length=x,x}}}}),Yrt=U({"src/traces/ohlc/defaults.js"(pe,le){var w=ii(),R=e_e(),O=R1(),z=RK();le.exports=function(c,p,f,v){function h(_,x){return w.coerce(c,p,z,_,x)}var m=R(c,p,h,v);if(!m){p.visible=!1;return}O(c,p,v,h,{x:!0}),h("xhoverformat"),h("yhoverformat"),h("line.width"),h("line.dash"),l(c,p,h,"increasing"),l(c,p,h,"decreasing"),h("text"),h("hovertext"),h("tickwidth"),v._requestRangeslider[p.xaxis]=!0,h("zorder")};function l(u,c,p,f){p(f+".line.color"),p(f+".line.width",c.line.width),p(f+".line.dash",c.line.dash)}}}),t_e=U({"src/traces/ohlc/calc.js"(pe,le){var w=ii(),R=w._,O=Yu(),z=Zy(),l=Dt().BADNUM;function u(v,h){var m=O.getFromId(v,h.xaxis),_=O.getFromId(v,h.yaxis),x=f(v,m,h),A=h._minDiff;h._minDiff=null;var E=h._origX;h._origX=null;var D=h._xcalc;h._xcalc=null;var g=p(v,h,E,D,_,c);return h._extremes[m._id]=O.findExtremes(m,D,{vpad:A/2}),g.length?(w.extendFlat(g[0].t,{wHover:A/2,tickLen:x}),g):[{t:{empty:!0}}]}function c(v,h,m,_){return{o:v,h,l:m,c:_}}function p(v,h,m,_,x,A){for(var E=x.makeCalcdata(h,"open"),D=x.makeCalcdata(h,"high"),g=x.makeCalcdata(h,"low"),C=x.makeCalcdata(h,"close"),I=w.isArrayOrTypedArray(h.text),N=w.isArrayOrTypedArray(h.hovertext),F=!0,k=null,P=!!h.xperiodalignment,T=[],y=0;y<_.length;y++){var S=_[y],M=E[y],W=D[y],$=g[y],Z=C[y];if(S!==l&&M!==l&&W!==l&&$!==l&&Z!==l){Z===M?k!==null&&Z!==k&&(F=Z>k):F=Z>M,k=Z;var K=A(M,W,$,Z);K.pos=S,K.yc=(M+Z)/2,K.i=y,K.dir=F?"increasing":"decreasing",K.x=K.pos,K.y=[$,W],P&&(K.orig_p=m[y]),I&&(K.tx=h.text[y]),N&&(K.htx=h.hovertext[y]),T.push(K)}else T.push({pos:S,empty:!0})}return h._extremes[x._id]=O.findExtremes(x,w.concat(g,D),{padded:!0}),T.length&&(T[0].t={labels:{open:R(v,"open:")+" ",high:R(v,"high:")+" ",low:R(v,"low:")+" ",close:R(v,"close:")+" "}}),T}function f(v,h,m){var _=m._minDiff;if(!_){var x=v._fullData,A=[];_=1/0;var E;for(E=0;E<x.length;E++){var D=x[E];if(D.type==="ohlc"&&D.visible===!0&&D.xaxis===h._id){A.push(D);var g=h.makeCalcdata(D,"x");D._origX=g;var C=z(m,h,"x",g).vals;D._xcalc=C;var I=w.distinctVals(C).minDiff;I&&isFinite(I)&&(_=Math.min(_,I))}}for(_===1/0&&(_=1),E=0;E<A.length;E++)A[E]._minDiff=_}return _*m.tickwidth}le.exports={calc:u,calcCommon:p}}}),Xrt=U({"src/traces/ohlc/plot.js"(pe,le){var w=Ze(),R=ii();le.exports=function(z,l,u,c){var p=l.yaxis,f=l.xaxis,v=!!f.rangebreaks;R.makeTraceGroups(c,u,"trace ohlc").each(function(h){var m=w.select(this),_=h[0],x=_.t,A=_.trace;if(A.visible!==!0||x.empty){m.remove();return}var E=x.tickLen,D=m.selectAll("path").data(R.identity);D.enter().append("path"),D.exit().remove(),D.attr("d",function(g){if(g.empty)return"M0,0Z";var C=f.c2p(g.pos-E,!0),I=f.c2p(g.pos+E,!0),N=v?(C+I)/2:f.c2p(g.pos,!0),F=p.c2p(g.o,!0),k=p.c2p(g.h,!0),P=p.c2p(g.l,!0),T=p.c2p(g.c,!0);return"M"+C+","+F+"H"+N+"M"+N+","+k+"V"+P+"M"+I+","+T+"H"+N})})}}}),Zrt=U({"src/traces/ohlc/style.js"(pe,le){var w=Ze(),R=ec(),O=Lr();le.exports=function(l,u,c){var p=c||w.select(l).selectAll("g.ohlclayer").selectAll("g.trace");p.style("opacity",function(f){return f[0].trace.opacity}),p.each(function(f){var v=f[0].trace;w.select(this).selectAll("path").each(function(h){if(!h.empty){var m=v[h.dir].line;w.select(this).style("fill","none").call(O.stroke,m.color).call(R.dashLine,m.dash,m.width).style("opacity",v.selectedpoints&&!h.selected?.3:1)}})})}}}),r_e=U({"src/traces/ohlc/hover.js"(pe,le){var w=Yu(),R=ii(),O=Dp(),z=Lr(),l=ii().fillText,u=lw(),c={increasing:u.INCREASING.SYMBOL,decreasing:u.DECREASING.SYMBOL};function p(m,_,x,A){var E=m.cd,D=E[0].trace;return D.hoverlabel.split?v(m,_,x,A):h(m,_,x,A)}function f(m,_,x,A){var E=m.cd,D=m.xa,g=E[0].trace,C=E[0].t,I=g.type,N=I==="ohlc"?"l":"min",F=I==="ohlc"?"h":"max",k,P,T=C.bPos||0,y=function(fe){return fe.pos+T-_},S=C.bdPos||C.tickLen,M=C.wHover,W=Math.min(1,S/Math.abs(D.r2c(D.range[1])-D.r2c(D.range[0])));k=m.maxHoverDistance-W,P=m.maxSpikeDistance-W;function $(fe){var we=y(fe);return O.inbox(we-M,we+M,k)}function Z(fe){var we=fe[N],Oe=fe[F];return we===Oe||O.inbox(we-x,Oe-x,k)}function K(fe){return($(fe)+Z(fe))/2}var Q=O.getDistanceFunction(A,$,Z,K);if(O.getClosest(E,Q,m),m.index===!1)return null;var J=E[m.index];if(J.empty)return null;var G=J.dir,ee=g[G],re=ee.line.color;return z.opacity(re)&&ee.line.width?m.color=re:m.color=ee.fillcolor,m.x0=D.c2p(J.pos+T-S,!0),m.x1=D.c2p(J.pos+T+S,!0),m.xLabelVal=J.orig_p!==void 0?J.orig_p:J.pos,m.spikeDistance=K(J)*P/k,m.xSpike=D.c2p(J.pos,!0),m}function v(m,_,x,A){var E=m.cd,D=m.ya,g=E[0].trace,C=E[0].t,I=[],N=f(m,_,x,A);if(!N)return[];var F=N.index,k=E[F],P=k.hi||g.hoverinfo,T=P.split("+"),y=P==="all",S=y||T.indexOf("y")!==-1;if(!S)return[];for(var M=["high","open","close","low"],W={},$=0;$<M.length;$++){var Z=M[$],K=g[Z][N.index],Q=D.c2p(K,!0),J;K in W?(J=W[K],J.yLabel+="<br>"+C.labels[Z]+w.hoverLabelText(D,K,g.yhoverformat)):(J=R.extendFlat({},N),J.y0=J.y1=Q,J.yLabelVal=K,J.yLabel=C.labels[Z]+w.hoverLabelText(D,K,g.yhoverformat),J.name="",I.push(J),W[K]=J)}return I}function h(m,_,x,A){var E=m.cd,D=m.ya,g=E[0].trace,C=E[0].t,I=f(m,_,x,A);if(!I)return[];var N=I.index,F=E[N],k=I.index=F.i,P=F.dir;function T(K){return C.labels[K]+w.hoverLabelText(D,g[K][k],g.yhoverformat)}var y=F.hi||g.hoverinfo,S=y.split("+"),M=y==="all",W=M||S.indexOf("y")!==-1,$=M||S.indexOf("text")!==-1,Z=W?[T("open"),T("high"),T("low"),T("close")+"  "+c[P]]:[];return $&&l(F,g,Z),I.extraText=Z.join("<br>"),I.y0=I.y1=D.c2p(F.yc,!0),[I]}le.exports={hoverPoints:p,hoverSplit:v,hoverOnPoints:h}}}),n_e=U({"src/traces/ohlc/select.js"(pe,le){le.exports=function(R,O){var z=R.cd,l=R.xaxis,u=R.yaxis,c=[],p,f=z[0].t.bPos||0;if(O===!1)for(p=0;p<z.length;p++)z[p].selected=0;else for(p=0;p<z.length;p++){var v=z[p];O.contains([l.c2p(v.pos+f),u.c2p(v.yc)],null,v.i,R)?(c.push({pointNumber:v.i,x:l.c2d(v.pos),y:u.c2d(v.yc)}),v.selected=1):v.selected=0}return c}}}),Krt=U({"src/traces/ohlc/index.js"(pe,le){le.exports={moduleType:"trace",name:"ohlc",basePlotModule:Rf(),categories:["cartesian","svg","showLegend"],meta:{},attributes:RK(),supplyDefaults:Yrt(),calc:t_e().calc,plot:Xrt(),style:Zrt(),hoverPoints:r_e().hoverPoints,selectPoints:n_e()}}}),Jrt=U({"lib/ohlc.js"(pe,le){le.exports=Krt()}}),i_e=U({"src/traces/candlestick/attributes.js"(pe,le){var w=ii().extendFlat,R=Wp().axisHoverFormat,O=RK(),z=HE();function l(u){return{line:{color:w({},z.line.color,{dflt:u}),width:z.line.width,editType:"style"},fillcolor:z.fillcolor,editType:"style"}}le.exports={xperiod:O.xperiod,xperiod0:O.xperiod0,xperiodalignment:O.xperiodalignment,xhoverformat:R("x"),yhoverformat:R("y"),x:O.x,open:O.open,high:O.high,low:O.low,close:O.close,line:{width:w({},z.line.width,{}),editType:"style"},increasing:l(O.increasing.line.color.dflt),decreasing:l(O.decreasing.line.color.dflt),text:O.text,hovertext:O.hovertext,whiskerwidth:w({},z.whiskerwidth,{dflt:0}),hoverlabel:O.hoverlabel,zorder:z.zorder}}}),Qrt=U({"src/traces/candlestick/defaults.js"(pe,le){var w=ii(),R=Lr(),O=e_e(),z=R1(),l=i_e();le.exports=function(p,f,v,h){function m(x,A){return w.coerce(p,f,l,x,A)}var _=O(p,f,m,h);if(!_){f.visible=!1;return}z(p,f,h,m,{x:!0}),m("xhoverformat"),m("yhoverformat"),m("line.width"),u(p,f,m,"increasing"),u(p,f,m,"decreasing"),m("text"),m("hovertext"),m("whiskerwidth"),h._requestRangeslider[f.xaxis]=!0,m("zorder")};function u(c,p,f,v){var h=f(v+".line.color");f(v+".line.width",p.line.width),f(v+".fillcolor",R.addOpacity(h,.5))}}}),ent=U({"src/traces/candlestick/calc.js"(pe,le){var w=ii(),R=Yu(),O=Zy(),z=t_e().calcCommon;le.exports=function(u,c){var p=u._fullLayout,f=R.getFromId(u,c.xaxis),v=R.getFromId(u,c.yaxis),h=f.makeCalcdata(c,"x"),m=O(c,f,"x",h).vals,_=z(u,c,h,m,v,l);return _.length?(w.extendFlat(_[0].t,{num:p._numBoxes,dPos:w.distinctVals(m).minDiff/2,posLetter:"x",valLetter:"y"}),p._numBoxes++,_):[{t:{empty:!0}}]};function l(u,c,p,f){return{min:p,q1:Math.min(u,f),med:f,q3:Math.max(u,f),max:c}}}}),tnt=U({"src/traces/candlestick/index.js"(pe,le){le.exports={moduleType:"trace",name:"candlestick",basePlotModule:Rf(),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:i_e(),layoutAttributes:jE(),supplyLayoutDefaults:tw().supplyLayoutDefaults,crossTraceCalc:qE().crossTraceCalc,supplyDefaults:Qrt(),calc:ent(),plot:OA().plot,layerName:"boxlayer",style:NA().style,hoverPoints:r_e().hoverPoints,selectPoints:n_e()}}}),rnt=U({"lib/candlestick.js"(pe,le){le.exports=tnt()}}),a_e=U({"src/plots/polar/set_convert.js"(pe,le){var w=ii(),R=Wy(),O=w.deg2rad,z=w.rad2deg;le.exports=function(v,h,m){switch(R(v,m),v._id){case"x":case"radialaxis":l(v,h);break;case"angularaxis":p(v,h);break}};function l(f,v){var h=v._subplot;f.setGeometry=function(){var m=f._rl[0],_=f._rl[1],x=h.innerRadius,A=(h.radius-x)/(_-m),E=x/A,D=m>_?function(g){return g<=0}:function(g){return g>=0};f.c2g=function(g){var C=f.c2l(g)-m;return(D(C)?C:0)+E},f.g2c=function(g){return f.l2c(g+m-E)},f.g2p=function(g){return g*A},f.c2p=function(g){return f.g2p(f.c2g(g))}}}function u(f,v){return v==="degrees"?O(f):f}function c(f,v){return v==="degrees"?z(f):f}function p(f,v){var h=f.type;if(h==="linear"){var m=f.d2c,_=f.c2d;f.d2c=function(x,A){return u(m(x),A)},f.c2d=function(x,A){return _(c(x,A))}}f.makeCalcdata=function(x,A){var E=x[A],D=x._length,g,C,I=function(T){return f.d2c(T,x.thetaunit)};if(E)for(g=new Array(D),C=0;C<D;C++)g[C]=I(E[C]);else{var N=A+"0",F="d"+A,k=N in x?I(x[N]):0,P=x[F]?I(x[F]):(f.period||2*Math.PI)/D;for(g=new Array(D),C=0;C<D;C++)g[C]=k+C*P}return g},f.setGeometry=function(){var x=v.sector,A=x.map(O),E={clockwise:-1,counterclockwise:1}[f.direction],D=O(f.rotation),g=function(y){return E*y+D},C=function(y){return(y-D)/E},I,N,F,k;switch(h){case"linear":N=I=w.identity,k=O,F=z,f.range=w.isFullCircle(A)?[x[0],x[0]+360]:A.map(C).map(z);break;case"category":var P=f._categories.length,T=f.period?Math.max(f.period,P):P;T===0&&(T=1),N=k=function(y){return y*2*Math.PI/T},I=F=function(y){return y*T/Math.PI/2},f.range=[0,T];break}f.c2g=function(y){return g(N(y))},f.g2c=function(y){return I(C(y))},f.t2g=function(y){return g(k(y))},f.g2t=function(y){return F(C(y))}}}}}),kK=U({"src/plots/polar/constants.js"(pe,le){le.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}}}),IK=U({"src/plots/polar/helpers.js"(pe,le){var w=ii(),R=RE().tester,O=w.findIndexOfMin,z=w.isAngleInsideSector,l=w.angleDelta,u=w.angleDist;function c(C,I,N,F,k){if(!z(I,F))return!1;var P,T;N[0]<N[1]?(P=N[0],T=N[1]):(P=N[1],T=N[0]);var y=R(m(P,F[0],F[1],k)),S=R(m(T,F[0],F[1],k)),M=[C*Math.cos(I),C*Math.sin(I)];return S.contains(M)&&!y.contains(M)}function p(C,I,N,F){var k,P,T=F[0],y=F[1],S=A(Math.sin(I)-Math.sin(C)),M=A(Math.cos(I)-Math.cos(C)),W=Math.tan(N),$=A(1/W),Z=S/M,K=y-Z*T;return $?S&&M?(k=K/(W-Z),P=W*k):M?(k=y*$,P=y):(k=T,P=T*W):S&&M?(k=0,P=K):M?(k=0,P=y):k=P=NaN,[k,P]}function f(C,I,N,F){var k=-I*N,P=I*I+1,T=2*(I*k-N),y=k*k+N*N-C*C,S=Math.sqrt(T*T-4*P*y),M=(-T+S)/(2*P),W=(-T-S)/(2*P);return[[M,I*M+k+F],[W,I*W+k+F]]}function v(C,I){var N=I.length,F=new Array(N+1),k;for(k=0;k<N;k++){var P=I[k];F[k]=[C*Math.cos(P),C*Math.sin(P)]}return F[k]=F[0].slice(),F}function h(C,I,N,F){var k=F.length,P=[],T,y;function S(ee){return[C*Math.cos(ee),C*Math.sin(ee)]}function M(ee,re,fe){return p(ee,re,fe,S(ee))}function W(ee){return w.mod(ee,k)}function $(ee){return z(ee,[I,N])}var Z=O(F,function(ee){return $(ee)?u(ee,I):1/0}),K=M(F[Z],F[W(Z-1)],I);for(P.push(K),T=Z,y=0;y<k;T++,y++){var Q=F[W(T)];if(!$(Q))break;P.push(S(Q))}var J=O(F,function(ee){return $(ee)?u(ee,N):1/0}),G=M(F[J],F[W(J+1)],N);return P.push(G),P.push([0,0]),P.push(P[0].slice()),P}function m(C,I,N,F){return w.isFullCircle([I,N])?v(C,F):h(C,I,N,F)}function _(C,I,N,F){for(var k=1/0,P=1/0,T=m(C,I,N,F),y=0;y<T.length;y++){var S=T[y];k=Math.min(k,S[0]),P=Math.min(P,-S[1])}return[k,P]}function x(C,I){var N=function(P){var T=l(P,C);return T>0?T:1/0},F=O(I,N),k=w.mod(F+1,I.length);return[I[F],I[k]]}function A(C){return Math.abs(C)>1e-10?C:0}function E(C,I,N){I=I||0,N=N||0;for(var F=C.length,k=new Array(F),P=0;P<F;P++){var T=C[P];k[P]=[I+T[0],N-T[1]]}return k}function D(C,I,N,F,k,P){var T=m(C,I,N,F);return"M"+E(T,k,P).join("L")}function g(C,I,N,F,k,P,T){var y,S;C<I?(y=C,S=I):(y=I,S=C);var M=E(m(y,N,F,k),P,T),W=E(m(S,N,F,k),P,T);return"M"+W.reverse().join("L")+"M"+M.join("L")}le.exports={isPtInsidePolygon:c,findPolygonOffset:_,findEnclosingVertexAngles:x,findIntersectionXY:p,findXYatLength:f,clampTiny:A,pathPolygon:D,pathPolygonAnnulus:g}}}),o_e=U({"src/plots/smith/helpers.js"(pe,le){function w(c){return c<0?-1:c>0?1:0}function R(c){var p=c[0],f=c[1];if(!isFinite(p)||!isFinite(f))return[1,0];var v=(p+1)*(p+1)+f*f;return[(p*p+f*f-1)/v,2*f/v]}function O(c,p){var f=p[0],v=p[1];return[f*c.radius+c.cx,-v*c.radius+c.cy]}function z(c,p){return p*c.radius}function l(c,p,f,v){var h=O(c,R([f,p])),m=h[0],_=h[1],x=O(c,R([v,p])),A=x[0],E=x[1];if(p===0)return["M"+m+","+_,"L"+A+","+E].join(" ");var D=z(c,1/Math.abs(p));return["M"+m+","+_,"A"+D+","+D+" 0 0,"+(p<0?1:0)+" "+A+","+E].join(" ")}function u(c,p,f,v){var h=z(c,1/(p+1)),m=O(c,R([p,f])),_=m[0],x=m[1],A=O(c,R([p,v])),E=A[0],D=A[1];if(w(f)!==w(v)){var g=O(c,R([p,0])),C=g[0],I=g[1];return["M"+_+","+x,"A"+h+","+h+" 0 0,"+(0<f?0:1)+" "+C+","+I,"A"+h+","+h+" 0 0,"+(v<0?0:1)+E+","+D].join(" ")}return["M"+_+","+x,"A"+h+","+h+" 0 0,"+(v<f?0:1)+" "+E+","+D].join(" ")}le.exports={smith:R,reactanceArc:l,resistanceArc:u,smithTransform:O}}}),s_e=U({"src/plots/polar/polar.js"(pe,le){var w=Ze(),R=or(),O=Mi(),z=ii(),l=z.strRotate,u=z.strTranslate,c=Lr(),p=ec(),f=tp(),v=Yu(),h=Wy(),m=a_e(),_=gx().doAutoRange,x=IE(),A=Vp(),E=Dp(),D=Nv(),g=Vf().prepSelect,C=Vf().selectOnClick,I=Vf().clearOutline,N=i_(),F=jg(),k=bx().redrawReglTraces,P=tg().MID_SHIFT,T=kK(),y=IK(),S=o_e(),M=S.smith,W=S.reactanceArc,$=S.resistanceArc,Z=S.smithTransform,K=z._,Q=z.mod,J=z.deg2rad,G=z.rad2deg;function ee(Le,oe,be){this.isSmith=be||!1,this.id=oe,this.gd=Le,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var _e=Le._fullLayout,he="clip"+_e._uid+oe;this.clipIds.forTraces=he+"-for-traces",this.clipPaths.forTraces=_e._clips.append("clipPath").attr("id",this.clipIds.forTraces),this.clipPaths.forTraces.append("path"),this.framework=_e["_"+(be?"smith":"polar")+"layer"].append("g").attr("class",oe),this.getHole=function(De){return this.isSmith?0:De.hole},this.getSector=function(De){return this.isSmith?[0,360]:De.sector},this.getRadial=function(De){return this.isSmith?De.realaxis:De.radialaxis},this.getAngular=function(De){return this.isSmith?De.imaginaryaxis:De.angularaxis},be||(this.radialTickLayout=null,this.angularTickLayout=null)}var re=ee.prototype;le.exports=function(oe,be,_e){return new ee(oe,be,_e)},re.plot=function(Le,oe){for(var be=this,_e=oe[be.id],he=!1,De=0;De<Le.length;De++){var xe=Le[De][0].trace;if(xe.cliponaxis===!1){he=!0;break}}be._hasClipOnAxisFalse=he,be.updateLayers(oe,_e),be.updateLayout(oe,_e),f.generalUpdatePerTraceModule(be.gd,be,Le,_e),be.updateFx(oe,_e),be.isSmith&&(delete _e.realaxis.range,delete _e.imaginaryaxis.range)},re.updateLayers=function(Le,oe){var be=this,_e=be.isSmith,he=be.layers,De=be.getRadial(oe),xe=be.getAngular(oe),se=T.layerNames,Ee=se.indexOf("frontplot"),Te=se.slice(0,Ee),Be=xe.layer==="below traces",tt=De.layer==="below traces";Be&&Te.push("angular-line"),tt&&Te.push("radial-line"),Be&&Te.push("angular-axis"),tt&&Te.push("radial-axis"),Te.push("frontplot"),Be||Te.push("angular-line"),tt||Te.push("radial-line"),Be||Te.push("angular-axis"),tt||Te.push("radial-axis");var at=(_e?"smith":"polar")+"sublayer",gt=be.framework.selectAll("."+at).data(Te,String);gt.enter().append("g").attr("class",function(pt){return at+" "+pt}).each(function(pt){var Rt=he[pt]=w.select(this);switch(pt){case"frontplot":_e||Rt.append("g").classed("barlayer",!0),Rt.append("g").classed("scatterlayer",!0);break;case"backplot":Rt.append("g").classed("maplayer",!0);break;case"plotbg":he.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}}),gt.order()},re.updateLayout=function(Le,oe){var be=this,_e=be.layers,he=Le._size,De=be.getRadial(oe),xe=be.getAngular(oe),se=oe.domain.x,Ee=oe.domain.y;be.xOffset=he.l+he.w*se[0],be.yOffset=he.t+he.h*(1-Ee[1]);var Te=be.xLength=he.w*(se[1]-se[0]),Be=be.yLength=he.h*(Ee[1]-Ee[0]),tt=be.getSector(oe);be.sectorInRad=tt.map(J);var at=be.sectorBBox=we(tt),gt=at[2]-at[0],pt=at[3]-at[1],Rt=Be/Te,$t=Math.abs(pt/gt),Wt,Ht,Ft,st,rt;Rt>$t?(Wt=Te,Ht=Te*$t,rt=(Be-Ht)/he.h/2,Ft=[se[0],se[1]],st=[Ee[0]+rt,Ee[1]-rt]):(Wt=Be/$t,Ht=Be,rt=(Te-Wt)/he.w/2,Ft=[se[0]+rt,se[1]-rt],st=[Ee[0],Ee[1]]),be.xLength2=Wt,be.yLength2=Ht,be.xDomain2=Ft,be.yDomain2=st;var Ue=be.xOffset2=he.l+he.w*Ft[0],xt=be.yOffset2=he.t+he.h*(1-st[1]),Gt=be.radius=Wt/gt,Jt=be.innerRadius=be.getHole(oe)*Gt,Ut=be.cx=Ue-Gt*at[0],kr=be.cy=xt+Gt*at[3],Pr=be.cxx=Ut-Ue,$r=be.cyy=kr-xt,rn=De.side,kn;rn==="counterclockwise"?(kn=rn,rn="top"):rn==="clockwise"&&(kn=rn,rn="bottom"),be.radialAxis=be.mockAxis(Le,oe,De,{_id:"x",side:rn,_trueSide:kn,domain:[Jt/he.w,Gt/he.w]}),be.angularAxis=be.mockAxis(Le,oe,xe,{side:"right",domain:[0,Math.PI],autorange:!1}),be.doAutoRange(Le,oe),be.updateAngularAxis(Le,oe),be.updateRadialAxis(Le,oe),be.updateRadialAxisTitle(Le,oe),be.xaxis=be.mockCartesianAxis(Le,oe,{_id:"x",domain:Ft}),be.yaxis=be.mockCartesianAxis(Le,oe,{_id:"y",domain:st});var Rn=be.pathSubplot();be.clipPaths.forTraces.select("path").attr("d",Rn).attr("transform",u(Pr,$r)),_e.frontplot.attr("transform",u(Ue,xt)).call(p.setClipUrl,be._hasClipOnAxisFalse?null:be.clipIds.forTraces,be.gd),_e.bg.attr("d",Rn).attr("transform",u(Ut,kr)).call(c.fill,oe.bgcolor)},re.mockAxis=function(Le,oe,be,_e){var he=z.extendFlat({},be,_e);return m(he,oe,Le),he},re.mockCartesianAxis=function(Le,oe,be){var _e=this,he=_e.isSmith,De=be._id,xe=z.extendFlat({type:"linear"},be);h(xe,Le);var se={x:[0,2],y:[1,3]};return xe.setRange=function(){var Ee=_e.sectorBBox,Te=se[De],Be=_e.radialAxis._rl,tt=(Be[1]-Be[0])/(1-_e.getHole(oe));xe.range=[Ee[Te[0]]*tt,Ee[Te[1]]*tt]},xe.isPtWithinRange=De==="x"&&!he?function(Ee){return _e.isPtInside(Ee)}:function(){return!0},xe.setRange(),xe.setScale(),xe},re.doAutoRange=function(Le,oe){var be=this,_e=be.gd,he=be.radialAxis,De=be.getRadial(oe);_(_e,he);var xe=he.range;if(De.range=xe.slice(),De._input.range=xe.slice(),he._rl=[he.r2l(xe[0],null,"gregorian"),he.r2l(xe[1],null,"gregorian")],he.minallowed!==void 0){var se=he.r2l(he.minallowed);he._rl[0]>he._rl[1]?he._rl[1]=Math.max(he._rl[1],se):he._rl[0]=Math.max(he._rl[0],se)}if(he.maxallowed!==void 0){var Ee=he.r2l(he.maxallowed);he._rl[0]<he._rl[1]?he._rl[1]=Math.min(he._rl[1],Ee):he._rl[0]=Math.min(he._rl[0],Ee)}},re.updateRadialAxis=function(Le,oe){var be=this,_e=be.gd,he=be.layers,De=be.radius,xe=be.innerRadius,se=be.cx,Ee=be.cy,Te=be.getRadial(oe),Be=Q(be.getSector(oe)[0],360),tt=be.radialAxis,at=xe<De,gt=be.isSmith;gt||(be.fillViewInitialKey("radialaxis.angle",Te.angle),be.fillViewInitialKey("radialaxis.range",tt.range.slice()),tt.setGeometry()),tt.tickangle==="auto"&&Be>90&&Be<=270&&(tt.tickangle=180);var pt=gt?function(Gt){var Jt=Z(be,M([Gt.x,0]));return u(Jt[0]-se,Jt[1]-Ee)}:function(Gt){return u(tt.l2p(Gt.x)+xe,0)},Rt=gt?function(Gt){return $(be,Gt.x,-1/0,1/0)}:function(Gt){return be.pathArc(tt.r2p(Gt.x)+xe)},$t=fe(Te);if(be.radialTickLayout!==$t&&(he["radial-axis"].selectAll(".xtick").remove(),be.radialTickLayout=$t),at){tt.setScale();var Wt=0,Ht=gt?(tt.tickvals||[]).filter(function(Gt){return Gt>=0}).map(function(Gt){return v.tickText(tt,Gt,!0,!1)}):v.calcTicks(tt),Ft=gt?Ht:v.clipEnds(tt,Ht),st=v.getTickSigns(tt)[2];gt&&((tt.ticks==="top"&&tt.side==="bottom"||tt.ticks==="bottom"&&tt.side==="top")&&(st=-st),tt.ticks==="top"&&tt.side==="top"&&(Wt=-tt.ticklen),tt.ticks==="bottom"&&tt.side==="bottom"&&(Wt=tt.ticklen)),v.drawTicks(_e,tt,{vals:Ht,layer:he["radial-axis"],path:v.makeTickPath(tt,0,st),transFn:pt,crisp:!1}),v.drawGrid(_e,tt,{vals:Ft,layer:he["radial-grid"],path:Rt,transFn:z.noop,crisp:!1}),v.drawLabels(_e,tt,{vals:Ht,layer:he["radial-axis"],transFn:pt,labelFns:v.makeLabelFns(tt,Wt)})}var rt=be.radialAxisAngle=be.vangles?G(Oe(J(Te.angle),be.vangles)):Te.angle,Ue=u(se,Ee),xt=Ue+l(-rt);ke(he["radial-axis"],at&&(Te.showticklabels||Te.ticks),{transform:xt}),ke(he["radial-grid"],at&&Te.showgrid,{transform:gt?"":Ue}),ke(he["radial-line"].select("line"),at&&Te.showline,{x1:gt?-De:xe,y1:0,x2:De,y2:0,transform:xt}).attr("stroke-width",Te.linewidth).call(c.stroke,Te.linecolor)},re.updateRadialAxisTitle=function(Le,oe,be){if(!this.isSmith){var _e=this,he=_e.gd,De=_e.radius,xe=_e.cx,se=_e.cy,Ee=_e.getRadial(oe),Te=_e.id+"title",Be=0;if(Ee.title){var tt=p.bBox(_e.layers["radial-axis"].node()).height,at=Ee.title.font.size,gt=Ee.side;Be=gt==="top"?at:gt==="counterclockwise"?-(tt+at*.4):tt+at*.8}var pt=be!==void 0?be:_e.radialAxisAngle,Rt=J(pt),$t=Math.cos(Rt),Wt=Math.sin(Rt),Ht=xe+De/2*$t+Be*Wt,Ft=se-De/2*Wt+Be*$t;_e.layers["radial-axis-title"]=D.draw(he,Te,{propContainer:Ee,propName:_e.id+".radialaxis.title",placeholder:K(he,"Click to enter radial axis title"),attributes:{x:Ht,y:Ft,"text-anchor":"middle"},transform:{rotate:-pt}})}},re.updateAngularAxis=function(Le,oe){var be=this,_e=be.gd,he=be.layers,De=be.radius,xe=be.innerRadius,se=be.cx,Ee=be.cy,Te=be.getAngular(oe),Be=be.angularAxis,tt=be.isSmith;tt||(be.fillViewInitialKey("angularaxis.rotation",Te.rotation),Be.setGeometry(),Be.setScale());var at=tt?function(Jt){var Ut=Z(be,M([0,Jt.x]));return Math.atan2(Ut[0]-se,Ut[1]-Ee)-Math.PI/2}:function(Jt){return Be.t2g(Jt.x)};Be.type==="linear"&&Be.thetaunit==="radians"&&(Be.tick0=G(Be.tick0),Be.dtick=G(Be.dtick));var gt=function(Jt){return u(se+De*Math.cos(Jt),Ee-De*Math.sin(Jt))},pt=tt?function(Jt){var Ut=Z(be,M([0,Jt.x]));return u(Ut[0],Ut[1])}:function(Jt){return gt(at(Jt))},Rt=tt?function(Jt){var Ut=Z(be,M([0,Jt.x])),kr=Math.atan2(Ut[0]-se,Ut[1]-Ee)-Math.PI/2;return u(Ut[0],Ut[1])+l(-G(kr))}:function(Jt){var Ut=at(Jt);return gt(Ut)+l(-G(Ut))},$t=tt?function(Jt){return W(be,Jt.x,0,1/0)}:function(Jt){var Ut=at(Jt),kr=Math.cos(Ut),Pr=Math.sin(Ut);return"M"+[se+xe*kr,Ee-xe*Pr]+"L"+[se+De*kr,Ee-De*Pr]},Wt=v.makeLabelFns(Be,0),Ht=Wt.labelStandoff,Ft={};Ft.xFn=function(Jt){var Ut=at(Jt);return Math.cos(Ut)*Ht},Ft.yFn=function(Jt){var Ut=at(Jt),kr=Math.sin(Ut)>0?.2:1;return-Math.sin(Ut)*(Ht+Jt.fontSize*kr)+Math.abs(Math.cos(Ut))*(Jt.fontSize*P)},Ft.anchorFn=function(Jt){var Ut=at(Jt),kr=Math.cos(Ut);return Math.abs(kr)<.1?"middle":kr>0?"start":"end"},Ft.heightFn=function(Jt,Ut,kr){var Pr=at(Jt);return-.5*(1+Math.sin(Pr))*kr};var st=fe(Te);be.angularTickLayout!==st&&(he["angular-axis"].selectAll("."+Be._id+"tick").remove(),be.angularTickLayout=st);var rt=tt?[1/0].concat(Be.tickvals||[]).map(function(Jt){return v.tickText(Be,Jt,!0,!1)}):v.calcTicks(Be);tt&&(rt[0].text="∞",rt[0].fontSize*=1.75);var Ue;if(oe.gridshape==="linear"?(Ue=rt.map(at),z.angleDelta(Ue[0],Ue[1])<0&&(Ue=Ue.slice().reverse())):Ue=null,be.vangles=Ue,Be.type==="category"&&(rt=rt.filter(function(Jt){return z.isAngleInsideSector(at(Jt),be.sectorInRad)})),Be.visible){var xt=Be.ticks==="inside"?-1:1,Gt=(Be.linewidth||1)/2;v.drawTicks(_e,Be,{vals:rt,layer:he["angular-axis"],path:"M"+xt*Gt+",0h"+xt*Be.ticklen,transFn:Rt,crisp:!1}),v.drawGrid(_e,Be,{vals:rt,layer:he["angular-grid"],path:$t,transFn:z.noop,crisp:!1}),v.drawLabels(_e,Be,{vals:rt,layer:he["angular-axis"],repositionOnUpdate:!0,transFn:pt,labelFns:Ft})}ke(he["angular-line"].select("path"),Te.showline,{d:be.pathSubplot(),transform:u(se,Ee)}).attr("stroke-width",Te.linewidth).call(c.stroke,Te.linecolor)},re.updateFx=function(Le,oe){if(!this.gd._context.staticPlot){var be=!this.isSmith;be&&(this.updateAngularDrag(Le),this.updateRadialDrag(Le,oe,0),this.updateRadialDrag(Le,oe,1)),this.updateHoverAndMainDrag(Le)}},re.updateHoverAndMainDrag=function(Le){var oe=this,be=oe.isSmith,_e=oe.gd,he=oe.layers,De=Le._zoomlayer,xe=T.MINZOOM,se=T.OFFEDGE,Ee=oe.radius,Te=oe.innerRadius,Be=oe.cx,tt=oe.cy,at=oe.cxx,gt=oe.cyy,pt=oe.sectorInRad,Rt=oe.vangles,$t=oe.radialAxis,Wt=y.clampTiny,Ht=y.findXYatLength,Ft=y.findEnclosingVertexAngles,st=T.cornerHalfWidth,rt=T.cornerLen/2,Ue,xt,Gt=x.makeDragger(he,"path","maindrag",Le.dragmode===!1?"none":"crosshair");w.select(Gt).attr("d",oe.pathSubplot()).attr("transform",u(Be,tt)),Gt.onmousemove=function(dn){E.hover(_e,dn,oe.id),_e._fullLayout._lasthover=Gt,_e._fullLayout._hoversubplot=oe.id},Gt.onmouseout=function(dn){_e._dragging||A.unhover(_e,dn)};var Jt={element:Gt,gd:_e,subplot:oe.id,plotinfo:{id:oe.id,xaxis:oe.xaxis,yaxis:oe.yaxis},xaxes:[oe.xaxis],yaxes:[oe.yaxis]},Ut,kr,Pr,$r,rn,kn,Rn,ci,In;function Gn(dn,on){return Math.sqrt(dn*dn+on*on)}function mr(dn,on){return Gn(dn-at,on-gt)}function St(dn,on){return Math.atan2(gt-on,dn-at)}function Ot(dn,on){return[dn*Math.cos(on),dn*Math.sin(-on)]}function Et(dn,on){if(dn===0)return oe.pathSector(2*st);var Nn=rt/dn,Wi=on-Nn,Oa=on+Nn,Da=Math.max(0,Math.min(dn,Ee)),Aa=Da-st,Ka=Da+st;return"M"+Ot(Aa,Wi)+"A"+[Aa,Aa]+" 0,0,0 "+Ot(Aa,Oa)+"L"+Ot(Ka,Oa)+"A"+[Ka,Ka]+" 0,0,1 "+Ot(Ka,Wi)+"Z"}function je(dn,on,Nn){if(dn===0)return oe.pathSector(2*st);var Wi=Ot(dn,on),Oa=Ot(dn,Nn),Da=Wt((Wi[0]+Oa[0])/2),Aa=Wt((Wi[1]+Oa[1])/2),Ka,Sa;if(Da&&Aa){var no=Aa/Da,Fo=-1/no,an=Ht(st,no,Da,Aa);Ka=Ht(rt,Fo,an[0][0],an[0][1]),Sa=Ht(rt,Fo,an[1][0],an[1][1])}else{var Hr,nn;Aa?(Hr=rt,nn=st):(Hr=st,nn=rt),Ka=[[Da-Hr,Aa-nn],[Da+Hr,Aa-nn]],Sa=[[Da-Hr,Aa+nn],[Da+Hr,Aa+nn]]}return"M"+Ka.join("L")+"L"+Sa.reverse().join("L")+"Z"}function Ye(){Pr=null,$r=null,rn=oe.pathSubplot(),kn=!1;var dn=_e._fullLayout[oe.id];Rn=R(dn.bgcolor).getLuminance(),ci=x.makeZoombox(De,Rn,Be,tt,rn),ci.attr("fill-rule","evenodd"),In=x.makeCorners(De,Be,tt),I(_e)}function et(dn,on){return on=Math.max(Math.min(on,Ee),Te),dn<se?dn=0:Ee-dn<se?dn=Ee:on<se?on=0:Ee-on<se&&(on=Ee),Math.abs(on-dn)>xe?(dn<on?(Pr=dn,$r=on):(Pr=on,$r=dn),!0):(Pr=null,$r=null,!1)}function mt(dn,on){dn=dn||rn,on=on||"M0,0Z",ci.attr("d",dn),In.attr("d",on),x.transitionZoombox(ci,In,kn,Rn),kn=!0;var Nn={};tn(Nn),_e.emit("plotly_relayouting",Nn)}function Nt(dn,on){dn=dn*Ue,on=on*xt;var Nn=Ut+dn,Wi=kr+on,Oa=mr(Ut,kr),Da=Math.min(mr(Nn,Wi),Ee),Aa=St(Ut,kr),Ka,Sa;et(Oa,Da)&&(Ka=rn+oe.pathSector($r),Pr&&(Ka+=oe.pathSector(Pr)),Sa=Et(Pr,Aa)+Et($r,Aa)),mt(Ka,Sa)}function lr(dn,on,Nn,Wi){var Oa=y.findIntersectionXY(Nn,Wi,Nn,[dn-at,gt-on]);return Gn(Oa[0],Oa[1])}function br(dn,on){var Nn=Ut+dn,Wi=kr+on,Oa=St(Ut,kr),Da=St(Nn,Wi),Aa=Ft(Oa,Rt),Ka=Ft(Da,Rt),Sa=lr(Ut,kr,Aa[0],Aa[1]),no=Math.min(lr(Nn,Wi,Ka[0],Ka[1]),Ee),Fo,an;et(Sa,no)&&(Fo=rn+oe.pathSector($r),Pr&&(Fo+=oe.pathSector(Pr)),an=[je(Pr,Aa[0],Aa[1]),je($r,Aa[0],Aa[1])].join(" ")),mt(Fo,an)}function Or(){if(x.removeZoombox(_e),!(Pr===null||$r===null)){var dn={};tn(dn),x.showDoubleClickNotifier(_e),O.call("_guiRelayout",_e,dn)}}function tn(dn){var on=$t._rl,Nn=(on[1]-on[0])/(1-Te/Ee)/Ee,Wi=[on[0]+(Pr-Te)*Nn,on[0]+($r-Te)*Nn];dn[oe.id+".radialaxis.range"]=Wi}function Jr(dn,on){var Nn=_e._fullLayout.clickmode;if(x.removeZoombox(_e),dn===2){var Wi={};for(var Oa in oe.viewInitial)Wi[oe.id+"."+Oa]=oe.viewInitial[Oa];_e.emit("plotly_doubleclick",null),O.call("_guiRelayout",_e,Wi)}Nn.indexOf("select")>-1&&dn===1&&C(on,_e,[oe.xaxis],[oe.yaxis],oe.id,Jt),Nn.indexOf("event")>-1&&E.click(_e,on,oe.id)}Jt.prepFn=function(dn,on,Nn){var Wi=_e._fullLayout.dragmode,Oa=Gt.getBoundingClientRect();_e._fullLayout._calcInverseTransform(_e);var Da=_e._fullLayout._invTransform;Ue=_e._fullLayout._invScaleX,xt=_e._fullLayout._invScaleY;var Aa=z.apply3DTransform(Da)(on-Oa.left,Nn-Oa.top);if(Ut=Aa[0],kr=Aa[1],Rt){var Ka=y.findPolygonOffset(Ee,pt[0],pt[1],Rt);Ut+=at+Ka[0],kr+=gt+Ka[1]}switch(Wi){case"zoom":Jt.clickFn=Jr,be||(Rt?Jt.moveFn=br:Jt.moveFn=Nt,Jt.doneFn=Or,Ye());break;case"select":case"lasso":g(dn,on,Nn,Jt,Wi);break}},A.init(Jt)},re.updateRadialDrag=function(Le,oe,be){var _e=this,he=_e.gd,De=_e.layers,xe=_e.radius,se=_e.innerRadius,Ee=_e.cx,Te=_e.cy,Be=_e.radialAxis,tt=T.radialDragBoxSize,at=tt/2;if(!Be.visible)return;var gt=J(_e.radialAxisAngle),pt=Be._rl,Rt=pt[0],$t=pt[1],Wt=pt[be],Ht=.75*(pt[1]-pt[0])/(1-_e.getHole(oe))/xe,Ft,st,rt;be?(Ft=Ee+(xe+at)*Math.cos(gt),st=Te-(xe+at)*Math.sin(gt),rt="radialdrag"):(Ft=Ee+(se-at)*Math.cos(gt),st=Te-(se-at)*Math.sin(gt),rt="radialdrag-inner");var Ue=x.makeRectDragger(De,rt,"crosshair",-at,-at,tt,tt),xt={element:Ue,gd:he};Le.dragmode===!1&&(xt.dragmode=!1),ke(w.select(Ue),Be.visible&&se<xe,{transform:u(Ft,st)});var Gt,Jt,Ut;function kr(Rn,ci){if(Gt)Gt(Rn,ci);else{var In=[Rn,-ci],Gn=[Math.cos(gt),Math.sin(gt)],mr=Math.abs(z.dot(In,Gn)/Math.sqrt(z.dot(In,In)));isNaN(mr)||(Gt=mr<.5?rn:kn)}var St={};Pr(St),he.emit("plotly_relayouting",St)}function Pr(Rn){Jt!==null?Rn[_e.id+".radialaxis.angle"]=Jt:Ut!==null&&(Rn[_e.id+".radialaxis.range["+be+"]"]=Ut)}function $r(){Jt!==null?O.call("_guiRelayout",he,_e.id+".radialaxis.angle",Jt):Ut!==null&&O.call("_guiRelayout",he,_e.id+".radialaxis.range["+be+"]",Ut)}function rn(Rn,ci){if(be!==0){var In=Ft+Rn,Gn=st+ci;Jt=Math.atan2(Te-Gn,In-Ee),_e.vangles&&(Jt=Oe(Jt,_e.vangles)),Jt=G(Jt);var mr=u(Ee,Te)+l(-Jt);De["radial-axis"].attr("transform",mr),De["radial-line"].select("line").attr("transform",mr);var St=_e.gd._fullLayout,Ot=St[_e.id];_e.updateRadialAxisTitle(St,Ot,Jt)}}function kn(Rn,ci){var In=z.dot([Rn,-ci],[Math.cos(gt),Math.sin(gt)]);if(Ut=Wt-Ht*In,Ht>0!=(be?Ut>Rt:Ut<$t)){Ut=null;return}var Gn=he._fullLayout,mr=Gn[_e.id];Be.range[be]=Ut,Be._rl[be]=Ut,_e.updateRadialAxis(Gn,mr),_e.xaxis.setRange(),_e.xaxis.setScale(),_e.yaxis.setRange(),_e.yaxis.setScale();var St=!1;for(var Ot in _e.traceHash){var Et=_e.traceHash[Ot],je=z.filterVisible(Et),Ye=Et[0][0].trace._module;Ye.plot(he,_e,je,mr),O.traceIs(Ot,"gl")&&je.length&&(St=!0)}St&&(F(he),k(he))}xt.prepFn=function(){Gt=null,Jt=null,Ut=null,xt.moveFn=kr,xt.doneFn=$r,I(he)},xt.clampFn=function(Rn,ci){return Math.sqrt(Rn*Rn+ci*ci)<T.MINDRAG&&(Rn=0,ci=0),[Rn,ci]},A.init(xt)},re.updateAngularDrag=function(Le){var oe=this,be=oe.gd,_e=oe.layers,he=oe.radius,De=oe.angularAxis,xe=oe.cx,se=oe.cy,Ee=oe.cxx,Te=oe.cyy,Be=T.angularDragBoxSize,tt=x.makeDragger(_e,"path","angulardrag",Le.dragmode===!1?"none":"move"),at={element:tt,gd:be};Le.dragmode===!1?at.dragmode=!1:w.select(tt).attr("d",oe.pathAnnulus(he,he+Be)).attr("transform",u(xe,se)).call(N,"move");function gt(Ut,kr){return Math.atan2(Te+Be-kr,Ut-Ee-Be)}var pt=_e.frontplot.select(".scatterlayer").selectAll(".trace"),Rt=pt.selectAll(".point"),$t=pt.selectAll(".textpoint"),Wt,Ht,Ft,st,rt,Ue;function xt(Ut,kr){var Pr=oe.gd._fullLayout,$r=Pr[oe.id],rn=Wt+Ut*Le._invScaleX,kn=Ht+kr*Le._invScaleY,Rn=gt(rn,kn),ci=G(Rn-Ue);if(st=Ft+ci,_e.frontplot.attr("transform",u(oe.xOffset2,oe.yOffset2)+l([-ci,Ee,Te])),oe.vangles){rt=oe.radialAxisAngle+ci;var In=u(xe,se)+l(-ci),Gn=u(xe,se)+l(-rt);_e.bg.attr("transform",In),_e["radial-grid"].attr("transform",In),_e["radial-axis"].attr("transform",Gn),_e["radial-line"].select("line").attr("transform",Gn),oe.updateRadialAxisTitle(Pr,$r,rt)}else oe.clipPaths.forTraces.select("path").attr("transform",u(Ee,Te)+l(ci));Rt.each(function(){var et=w.select(this),mt=p.getTranslate(et);et.attr("transform",u(mt.x,mt.y)+l([ci]))}),$t.each(function(){var et=w.select(this),mt=et.select("text"),Nt=p.getTranslate(et);et.attr("transform",l([ci,mt.attr("x"),mt.attr("y")])+u(Nt.x,Nt.y))}),De.rotation=z.modHalf(st,360),oe.updateAngularAxis(Pr,$r),oe._hasClipOnAxisFalse&&!z.isFullCircle(oe.sectorInRad)&&pt.call(p.hideOutsideRangePoints,oe);var mr=!1;for(var St in oe.traceHash)if(O.traceIs(St,"gl")){var Ot=oe.traceHash[St],Et=z.filterVisible(Ot),je=Ot[0][0].trace._module;je.plot(be,oe,Et,$r),Et.length&&(mr=!0)}mr&&(F(be),k(be));var Ye={};Gt(Ye),be.emit("plotly_relayouting",Ye)}function Gt(Ut){Ut[oe.id+".angularaxis.rotation"]=st,oe.vangles&&(Ut[oe.id+".radialaxis.angle"]=rt)}function Jt(){$t.select("text").attr("transform",null);var Ut={};Gt(Ut),O.call("_guiRelayout",be,Ut)}at.prepFn=function(Ut,kr,Pr){var $r=Le[oe.id];Ft=$r.angularaxis.rotation;var rn=tt.getBoundingClientRect();Wt=kr-rn.left,Ht=Pr-rn.top,be._fullLayout._calcInverseTransform(be);var kn=z.apply3DTransform(Le._invTransform)(Wt,Ht);Wt=kn[0],Ht=kn[1],Ue=gt(Wt,Ht),at.moveFn=xt,at.doneFn=Jt,I(be)},oe.vangles&&!z.isFullCircle(oe.sectorInRad)&&(at.prepFn=z.noop,N(w.select(tt),null)),A.init(at)},re.isPtInside=function(Le){if(this.isSmith)return!0;var oe=this.sectorInRad,be=this.vangles,_e=this.angularAxis.c2g(Le.theta),he=this.radialAxis,De=he.c2l(Le.r),xe=he._rl,se=be?y.isPtInsidePolygon:z.isPtInsideSector;return se(De,_e,xe,oe,be)},re.pathArc=function(Le){var oe=this.sectorInRad,be=this.vangles,_e=be?y.pathPolygon:z.pathArc;return _e(Le,oe[0],oe[1],be)},re.pathSector=function(Le){var oe=this.sectorInRad,be=this.vangles,_e=be?y.pathPolygon:z.pathSector;return _e(Le,oe[0],oe[1],be)},re.pathAnnulus=function(Le,oe){var be=this.sectorInRad,_e=this.vangles,he=_e?y.pathPolygonAnnulus:z.pathAnnulus;return he(Le,oe,be[0],be[1],_e)},re.pathSubplot=function(){var Le=this.innerRadius,oe=this.radius;return Le?this.pathAnnulus(Le,oe):this.pathSector(oe)},re.fillViewInitialKey=function(Le,oe){Le in this.viewInitial||(this.viewInitial[Le]=oe)};function fe(Le){var oe=Le.ticks+String(Le.ticklen)+String(Le.showticklabels);return"side"in Le&&(oe+=Le.side),oe}function we(Le){var oe=Le[0],be=Le[1],_e=be-oe,he=Q(oe,360),De=he+_e,xe=Math.cos(J(he)),se=Math.sin(J(he)),Ee=Math.cos(J(De)),Te=Math.sin(J(De)),Be,tt,at,gt;return he<=90&&De>=90||he>90&&De>=450?gt=1:se<=0&&Te<=0?gt=0:gt=Math.max(se,Te),he<=180&&De>=180||he>180&&De>=540?Be=-1:xe>=0&&Ee>=0?Be=0:Be=Math.min(xe,Ee),he<=270&&De>=270||he>270&&De>=630?tt=-1:se>=0&&Te>=0?tt=0:tt=Math.min(se,Te),De>=360?at=1:xe<=0&&Ee<=0?at=0:at=Math.max(xe,Ee),[Be,tt,at,gt]}function Oe(Le,oe){var be=function(he){return z.angleDist(Le,he)},_e=z.findIndexOfMin(oe,be);return oe[_e]}function ke(Le,oe,be){return oe?(Le.attr("display",null),Le.attr(be)):Le&&Le.attr("display","none"),Le}}}),l_e=U({"src/plots/polar/layout_attributes.js"(pe,le){var w=jn(),R=Hg(),O=oh().attributes,z=ii().extendFlat,l=zl().overrideAll,u=l({color:R.color,showline:z({},R.showline,{dflt:!0}),linecolor:R.linecolor,linewidth:R.linewidth,showgrid:z({},R.showgrid,{dflt:!0}),gridcolor:R.gridcolor,gridwidth:R.gridwidth,griddash:R.griddash},"plot","from-root"),c=l({tickmode:R.minor.tickmode,nticks:R.nticks,tick0:R.tick0,dtick:R.dtick,tickvals:R.tickvals,ticktext:R.ticktext,ticks:R.ticks,ticklen:R.ticklen,tickwidth:R.tickwidth,tickcolor:R.tickcolor,ticklabelstep:R.ticklabelstep,showticklabels:R.showticklabels,labelalias:R.labelalias,minorloglabels:R.minorloglabels,showtickprefix:R.showtickprefix,tickprefix:R.tickprefix,showticksuffix:R.showticksuffix,ticksuffix:R.ticksuffix,showexponent:R.showexponent,exponentformat:R.exponentformat,minexponent:R.minexponent,separatethousands:R.separatethousands,tickfont:R.tickfont,tickangle:R.tickangle,tickformat:R.tickformat,tickformatstops:R.tickformatstops,layer:R.layer},"plot","from-root"),p={visible:z({},R.visible,{dflt:!0}),type:z({},R.type,{values:["-","linear","log","date","category"]}),autotypenumbers:R.autotypenumbers,autorangeoptions:{minallowed:R.autorangeoptions.minallowed,maxallowed:R.autorangeoptions.maxallowed,clipmin:R.autorangeoptions.clipmin,clipmax:R.autorangeoptions.clipmax,include:R.autorangeoptions.include,editType:"plot"},autorange:z({},R.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:z({},R.minallowed,{editType:"plot"}),maxallowed:z({},R.maxallowed,{editType:"plot"}),range:z({},R.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:R.categoryorder,categoryarray:R.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:R.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:z({},R.title.text,{editType:"plot",dflt:""}),font:z({},R.title.font,{editType:"plot"}),editType:"plot"},hoverformat:R.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};z(p,u,c);var f={visible:z({},R.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:R.autotypenumbers,categoryorder:R.categoryorder,categoryarray:R.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:R.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};z(f,u,c),le.exports={domain:O({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:w.background},radialaxis:p,angularaxis:f,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}}}),nnt=U({"src/plots/polar/layout_defaults.js"(pe,le){var w=ii(),R=Lr(),O=Tc(),z=cS(),l=Om().getSubplotData,u=n_(),c=rb(),p=A1(),f=Xw(),v=t2(),h=Jy(),m=ov(),_=Pb(),x=l_e(),A=a_e(),E=kK(),D=E.axisNames;function g(I,N,F,k){var P=F("bgcolor");k.bgColor=R.combine(P,k.paper_bgcolor);var T=F("sector");F("hole");var y=l(k.fullData,E.name,k.id),S=k.layoutOut,M;function W(tt,at){return F(M+"."+tt,at)}for(var $=0;$<D.length;$++){M=D[$],w.isPlainObject(I[M])||(I[M]={});var Z=I[M],K=O.newContainer(N,M);K._id=K._name=M,K._attr=k.id+"."+M,K._traceIndices=y.map(function(tt){return tt.index});var Q=E.axisName2dataArray[M],J=C(Z,K,W,y,Q,k);v(Z,K,W,{axData:y,dataAttr:Q});var G=W("visible");switch(A(K,N,S),W("uirevision",N.uirevision),K._m=1,M){case"radialaxis":W("minallowed"),W("maxallowed");var ee=W("range"),re=K.getAutorangeDflt(ee),fe=W("autorange",re),we;ee&&(ee[0]===null&&ee[1]===null||(ee[0]===null||ee[1]===null)&&(fe==="reversed"||fe===!0)||ee[0]!==null&&(fe==="min"||fe==="max reversed")||ee[1]!==null&&(fe==="max"||fe==="min reversed"))&&(ee=void 0,delete K.range,K.autorange=!0,we=!0),we||(re=K.getAutorangeDflt(ee),fe=W("autorange",re)),Z.autorange=fe,fe&&(m(W,fe,ee),(J==="linear"||J==="-")&&W("rangemode"),K.isReversed()&&(K._m=-1)),K.cleanRange("range",{dfltRange:[0,1]});break;case"angularaxis":if(J==="date"){w.log("Polar plots do not support date angular axes yet.");for(var Oe=0;Oe<y.length;Oe++)y[Oe].visible=!1;J=Z.type=K.type="linear"}W(J==="linear"?"thetaunit":"period");var ke=W("direction");W("rotation",{counterclockwise:0,clockwise:90}[ke]);break}if(f(Z,K,W,K.type,{tickSuffixDflt:K.thetaunit==="degrees"?"°":void 0}),G){var Le,oe,be,_e,he,De,xe,se,Ee,Te,Be=k.font||{};Le=W("color"),oe=Le===Z.color?Le:Be.color,be=Be.size,_e=Be.family,he=Be.weight,De=Be.style,xe=Be.variant,se=Be.textcase,Ee=Be.lineposition,Te=Be.shadow,u(Z,K,W,K.type),p(Z,K,W,K.type,{font:{weight:he,style:De,variant:xe,textcase:se,lineposition:Ee,shadow:Te,color:oe,size:be,family:_e},noAutotickangles:M==="angularaxis",noTicklabelshift:!0,noTicklabelstandoff:!0}),c(Z,K,W,{outerTicks:!0}),h(Z,K,W,{dfltColor:Le,bgColor:k.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:x[M]}),W("layer"),M==="radialaxis"&&(W("side"),W("angle",T[0]),W("title.text"),w.coerceFont(W,"title.font",{weight:he,style:De,variant:xe,textcase:se,lineposition:Ee,shadow:Te,color:oe,size:w.bigFont(be),family:_e}))}J!=="category"&&W("hoverformat"),K._input=Z}N.angularaxis.type==="category"&&F("gridshape")}function C(I,N,F,k,P,T){var y=F("autotypenumbers",T.autotypenumbersDflt),S=F("type");if(S==="-"){for(var M,W=0;W<k.length;W++)if(k[W].visible){M=k[W];break}M&&M[P]&&(N.type=_(M[P],"gregorian",{noMultiCategory:!0,autotypenumbers:y})),N.type==="-"?N.type="linear":I.type=N.type}return N.type}le.exports=function(N,F,k){z(N,F,k,{type:E.name,attributes:x,handleDefaults:g,font:F.font,autotypenumbersDflt:F.autotypenumbers,paper_bgcolor:F.paper_bgcolor,fullData:k,layoutOut:F})}}}),PK=U({"src/plots/polar/index.js"(pe,le){var w=Om().getSubplotCalcData,R=ii().counterRegex,O=s_e(),z=kK(),l=z.attr,u=z.name,c=R(u),p={};p[l]={valType:"subplotid",dflt:u,editType:"calc"};function f(h){for(var m=h._fullLayout,_=h.calcdata,x=m._subplots[u],A=0;A<x.length;A++){var E=x[A],D=w(_,u,E),g=m[E]._subplot;g||(g=O(h,E),m[E]._subplot=g),g.plot(D,m,h._promises)}}function v(h,m,_,x){for(var A=x._subplots[u]||[],E=x._has&&x._has("gl"),D=m._has&&m._has("gl"),g=E&&!D,C=0;C<A.length;C++){var I=A[C],N=x[I]._subplot;if(!m[I]&&N){N.framework.remove(),N.layers["radial-axis-title"].remove();for(var F in N.clipPaths)N.clipPaths[F].remove()}g&&N._scene&&(N._scene.destroy(),N._scene=null)}}le.exports={attr:l,name:u,idRoot:u,idRegex:c,attrRegex:c,attributes:p,layoutAttributes:l_e(),supplyLayoutDefaults:nnt(),plot:f,clean:v,toSVG:Rf().toSVG}}}),ZU=U({"src/traces/scatterpolar/attributes.js"(pe,le){var w=Js().hovertemplateAttrs,R=Js().texttemplateAttrs,O=Ar().extendFlat,z=Xc(),l=Kc(),u=Jn(),c=l.line;le.exports={mode:l.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:l.text,texttemplate:R({editType:"plot"},{keys:["r","theta","text"]}),hovertext:l.hovertext,line:{color:c.color,width:c.width,dash:c.dash,backoff:c.backoff,shape:O({},c.shape,{values:["linear","spline"]}),smoothing:c.smoothing,editType:"calc"},connectgaps:l.connectgaps,marker:l.marker,cliponaxis:O({},l.cliponaxis,{dflt:!1}),textposition:l.textposition,textfont:l.textfont,fill:O({},l.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:z(),hoverinfo:O({},u.hoverinfo,{flags:["r","theta","text","name"]}),hoveron:l.hoveron,hovertemplate:w(),selected:l.selected,unselected:l.unselected}}}),DK=U({"src/traces/scatterpolar/defaults.js"(pe,le){var w=ii(),R=Qd(),O=r0(),z=Xy(),l=g0(),u=y0(),c=Ch(),p=hu().PTS_LINESONLY,f=ZU();function v(m,_,x,A){function E(C,I){return w.coerce(m,_,f,C,I)}var D=h(m,_,A,E);if(!D){_.visible=!1;return}E("thetaunit"),E("mode",D<p?"lines+markers":"lines"),E("text"),E("hovertext"),_.hoveron!=="fills"&&E("hovertemplate"),R.hasMarkers(_)&&O(m,_,x,A,E,{gradient:!0}),R.hasLines(_)&&(z(m,_,x,A,E,{backoff:!0}),l(m,_,E),E("connectgaps")),R.hasText(_)&&(E("texttemplate"),u(m,_,A,E));var g=[];(R.hasMarkers(_)||R.hasText(_))&&(E("cliponaxis"),E("marker.maxdisplayed"),g.push("points")),E("fill"),_.fill!=="none"&&(c(m,_,x,E),R.hasLines(_)||l(m,_,E)),(_.fill==="tonext"||_.fill==="toself")&&g.push("fills"),E("hoveron",g.join("+")||"points"),w.coerceSelectionMarkerOpacity(_,E)}function h(m,_,x,A){var E=A("r"),D=A("theta");w.isTypedArray(E)&&(_.r=E=Array.from(E)),w.isTypedArray(D)&&(_.theta=D=Array.from(D));var g;if(E)D?g=Math.min(E.length,D.length):(g=E.length,A("theta0"),A("dtheta"));else{if(!D)return 0;g=_.theta.length,A("r0"),A("dr")}return _._length=g,g}le.exports={handleRThetaDefaults:h,supplyDefaults:v}}}),LK=U({"src/traces/scatterpolar/format_labels.js"(pe,le){var w=ii(),R=Yu();le.exports=function(z,l,u){var c={},p=u[l.subplot]._subplot,f,v;p?(f=p.radialAxis,v=p.angularAxis):(p=u[l.subplot],f=p.radialaxis,v=p.angularaxis);var h=f.c2l(z.r);c.rLabel=R.tickText(f,h,!0).text;var m=v.thetaunit==="degrees"?w.rad2deg(z.theta):z.theta;return c.thetaLabel=R.tickText(v,m,!0).text,c}}}),int=U({"src/traces/scatterpolar/calc.js"(pe,le){var w=_t(),R=Dt().BADNUM,O=Yu(),z=b0(),l=zm(),u=k1(),c=my().calcMarkerSize;le.exports=function(f,v){for(var h=f._fullLayout,m=v.subplot,_=h[m].radialaxis,x=h[m].angularaxis,A=_.makeCalcdata(v,"r"),E=x.makeCalcdata(v,"theta"),D=v._length,g=new Array(D),C=0;C<D;C++){var I=A[C],N=E[C],F=g[C]={};w(I)&&w(N)?(F.r=I,F.theta=N):F.r=R}var k=c(v,D);return v._extremes.x=O.findExtremes(_,A,{ppad:k}),z(f,v),l(g,v),u(g,v),g}}}),ant=U({"src/traces/scatterpolar/plot.js"(pe,le){var w=Ob(),R=Dt().BADNUM;le.exports=function(z,l,u){for(var c=l.layers.frontplot.select("g.scatterlayer"),p=l.xaxis,f=l.yaxis,v={xaxis:p,yaxis:f,plot:l.framework,layerClipId:l._hasClipOnAxisFalse?l.clipIds.forTraces:null},h=l.radialAxis,m=l.angularAxis,_=0;_<u.length;_++)for(var x=u[_],A=0;A<x.length;A++){A===0&&(x[0].trace._xA=p,x[0].trace._yA=f);var E=x[A],D=E.r;if(D===R)E.x=E.y=R;else{var g=h.c2g(D),C=m.c2g(E.theta);E.x=g*Math.cos(C),E.y=g*Math.sin(C)}}w(z,v,u,c)}}}),OK=U({"src/traces/scatterpolar/hover.js"(pe,le){var w=sv();function R(z,l,u,c){var p=w(z,l,u,c);if(!(!p||p[0].index===!1)){var f=p[0];if(f.index===void 0)return p;var v=z.subplot,h=f.cd[f.index],m=f.trace;if(v.isPtInside(h))return f.xLabelVal=void 0,f.yLabelVal=void 0,O(h,m,v,f),f.hovertemplate=m.hovertemplate,p}}function O(z,l,u,c){var p=u.radialAxis,f=u.angularAxis;p._hovertitle="r",f._hovertitle="θ";var v={};v[l.subplot]={_subplot:u};var h=l._module.formatLabels(z,l,v);c.rLabel=h.rLabel,c.thetaLabel=h.thetaLabel;var m=z.hi||l.hoverinfo,_=[];function x(E,D){_.push(E._hovertitle+": "+D)}if(!l.hovertemplate){var A=m.split("+");A.indexOf("all")!==-1&&(A=["r","theta","text"]),A.indexOf("r")!==-1&&x(p,c.rLabel),A.indexOf("theta")!==-1&&x(f,c.thetaLabel),A.indexOf("text")!==-1&&c.text&&(_.push(c.text),delete c.text),c.extraText=_.join("<br>")}}le.exports={hoverPoints:R,makeHoverPointText:O}}}),ont=U({"src/traces/scatterpolar/index.js"(pe,le){le.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:PK(),categories:["polar","symbols","showLegend","scatter-like"],attributes:ZU(),supplyDefaults:DK().supplyDefaults,colorbar:qg(),formatLabels:LK(),calc:int(),plot:ant(),style:z0().style,styleOnSelect:z0().styleOnSelect,hoverPoints:OK().hoverPoints,selectPoints:qd(),meta:{}}}}),snt=U({"lib/scatterpolar.js"(pe,le){le.exports=ont()}}),u_e=U({"src/traces/scatterpolargl/attributes.js"(pe,le){var w=ZU(),R=HU(),O=Js().texttemplateAttrs;le.exports={mode:w.mode,r:w.r,theta:w.theta,r0:w.r0,dr:w.dr,theta0:w.theta0,dtheta:w.dtheta,thetaunit:w.thetaunit,text:w.text,texttemplate:O({editType:"plot"},{keys:["r","theta","text"]}),hovertext:w.hovertext,hovertemplate:w.hovertemplate,line:{color:R.line.color,width:R.line.width,dash:R.line.dash,editType:"calc"},connectgaps:R.connectgaps,marker:R.marker,fill:R.fill,fillcolor:R.fillcolor,textposition:R.textposition,textfont:R.textfont,hoverinfo:w.hoverinfo,selected:w.selected,unselected:w.unselected}}}),lnt=U({"src/traces/scatterpolargl/defaults.js"(pe,le){var w=ii(),R=Qd(),O=DK().handleRThetaDefaults,z=r0(),l=Xy(),u=y0(),c=Ch(),p=hu().PTS_LINESONLY,f=u_e();le.exports=function(h,m,_,x){function A(D,g){return w.coerce(h,m,f,D,g)}var E=O(h,m,x,A);if(!E){m.visible=!1;return}A("thetaunit"),A("mode",E<p?"lines+markers":"lines"),A("text"),A("hovertext"),m.hoveron!=="fills"&&A("hovertemplate"),R.hasMarkers(m)&&z(h,m,_,x,A,{noAngleRef:!0,noStandOff:!0}),R.hasLines(m)&&(l(h,m,_,x,A),A("connectgaps")),R.hasText(m)&&(A("texttemplate"),u(h,m,x,A,{noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0})),A("fill"),m.fill!=="none"&&c(h,m,_,A),w.coerceSelectionMarkerOpacity(m,A)}}}),unt=U({"src/traces/scatterpolargl/format_labels.js"(pe,le){var w=LK();le.exports=function(O,z,l){var u=O.i;return"r"in O||(O.r=z._r[u]),"theta"in O||(O.theta=z._theta[u]),w(O,z,l)}}}),cnt=U({"src/traces/scatterpolargl/calc.js"(pe,le){var w=b0(),R=my().calcMarkerSize,O=k6(),z=Yu(),l=G4().TOO_MANY_POINTS;le.exports=function(c,p){var f=c._fullLayout,v=p.subplot,h=f[v].radialaxis,m=f[v].angularaxis,_=p._r=h.makeCalcdata(p,"r"),x=p._theta=m.makeCalcdata(p,"theta"),A=p._length,E={};A<_.length&&(_=_.slice(0,A)),A<x.length&&(x=x.slice(0,A)),E.r=_,E.theta=x,w(c,p);var D=E.opts=O.style(c,p),g;return A<l?g=R(p,A):D.marker&&(g=2*(D.marker.sizeAvg||Math.max(D.marker.size,3))),p._extremes.x=z.findExtremes(h,_,{ppad:g}),[{x:!1,y:!1,t:E,trace:p}]}}}),fnt=U({"src/traces/scatterpolargl/hover.js"(pe,le){var w=uK(),R=OK().makeHoverPointText;function O(z,l,u,c){var p=z.cd,f=p[0].t,v=f.r,h=f.theta,m=w.hoverPoints(z,l,u,c);if(!(!m||m[0].index===!1)){var _=m[0];if(_.index===void 0)return m;var x=z.subplot,A=_.cd[_.index],E=_.trace;if(A.r=v[_.index],A.theta=h[_.index],!!x.isPtInside(A))return _.xLabelVal=void 0,_.yLabelVal=void 0,R(A,E,x,_),m}}le.exports={hoverPoints:O}}}),dnt=U({"src/traces/scatterpolargl/base_index.js"(pe,le){le.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:PK(),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:u_e(),supplyDefaults:lnt(),colorbar:qg(),formatLabels:unt(),calc:cnt(),hoverPoints:fnt().hoverPoints,selectPoints:qbe(),meta:{}}}}),hnt=U({"src/traces/scatterpolargl/plot.js"(pe,le){var w=fK(),R=_t(),O=pxe(),z=jbe(),l=k6(),u=ii(),c=G4().TOO_MANY_POINTS,p={};le.exports=function(v,h,m){if(m.length){var _=h.radialAxis,x=h.angularAxis,A=z(v,h);return m.forEach(function(E){if(!(!E||!E[0]||!E[0].trace)){var D=E[0],g=D.trace,C=D.t,I=g._length,N=C.r,F=C.theta,k=C.opts,P,T=N.slice(),y=F.slice();for(P=0;P<N.length;P++)h.isPtInside({r:N[P],theta:F[P]})||(T[P]=NaN,y[P]=NaN);var S=new Array(I*2),M=Array(I),W=Array(I);for(P=0;P<I;P++){var $=T[P],Z,K;if(R($)){var Q=_.c2g($),J=x.c2g(y[P],g.thetaunit);Z=Q*Math.cos(J),K=Q*Math.sin(J)}else Z=K=NaN;M[P]=S[P*2]=Z,W[P]=S[P*2+1]=K}C.tree=w(S),k.marker&&I>=c&&(k.marker.cluster=C.tree),k.marker&&(k.markerSel.positions=k.markerUnsel.positions=k.marker.positions=S),k.line&&S.length>1&&u.extendFlat(k.line,l.linePositions(v,g,S)),k.text&&(u.extendFlat(k.text,{positions:S},l.textPosition(v,g,k.text,k.marker)),u.extendFlat(k.textSel,{positions:S},l.textPosition(v,g,k.text,k.markerSel)),u.extendFlat(k.textUnsel,{positions:S},l.textPosition(v,g,k.text,k.markerUnsel))),k.fill&&!A.fill2d&&(A.fill2d=!0),k.marker&&!A.scatter2d&&(A.scatter2d=!0),k.line&&!A.line2d&&(A.line2d=!0),k.text&&!A.glText&&(A.glText=!0),A.lineOptions.push(k.line),A.fillOptions.push(k.fill),A.markerOptions.push(k.marker),A.markerSelectedOptions.push(k.markerSel),A.markerUnselectedOptions.push(k.markerUnsel),A.textOptions.push(k.text),A.textSelectedOptions.push(k.textSel),A.textUnselectedOptions.push(k.textUnsel),A.selectBatch.push([]),A.unselectBatch.push([]),C.x=M,C.y=W,C.rawx=M,C.rawy=W,C.r=N,C.theta=F,C.positions=S,C._scene=A,C.index=A.count,A.count++}}),O(v,h,m)}},le.exports.reglPrecompiled=p}}),pnt=U({"src/traces/scatterpolargl/index.js"(pe,le){var w=dnt();w.plot=hnt(),le.exports=w}}),vnt=U({"lib/scatterpolargl.js"(pe,le){le.exports=pnt()}}),c_e=U({"src/traces/barpolar/attributes.js"(pe,le){var w=Js().hovertemplateAttrs,R=Ar().extendFlat,O=ZU(),z=rm();le.exports={r:O.r,theta:O.theta,r0:O.r0,dr:O.dr,theta0:O.theta0,dtheta:O.dtheta,thetaunit:O.thetaunit,base:R({},z.base,{}),offset:R({},z.offset,{}),width:R({},z.width,{}),text:R({},z.text,{}),hovertext:R({},z.hovertext,{}),marker:l(),hoverinfo:O.hoverinfo,hovertemplate:w(),selected:z.selected,unselected:z.unselected};function l(){var u=R({},z.marker);return delete u.cornerradius,u}}}),f_e=U({"src/traces/barpolar/layout_attributes.js"(pe,le){le.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}}}),mnt=U({"src/traces/barpolar/defaults.js"(pe,le){var w=ii(),R=DK().handleRThetaDefaults,O=bM(),z=c_e();le.exports=function(u,c,p,f){function v(m,_){return w.coerce(u,c,z,m,_)}var h=R(u,c,f,v);if(!h){c.visible=!1;return}v("thetaunit"),v("base"),v("offset"),v("width"),v("text"),v("hovertext"),v("hovertemplate"),O(u,c,v,p,f),w.coerceSelectionMarkerOpacity(c,v)}}}),gnt=U({"src/traces/barpolar/layout_defaults.js"(pe,le){var w=ii(),R=f_e();le.exports=function(O,z,l){var u={},c;function p(h,m){return w.coerce(O[c]||{},z[c],R,h,m)}for(var f=0;f<l.length;f++){var v=l[f];v.type==="barpolar"&&v.visible===!0&&(c=v.subplot,u[c]||(p("barmode"),p("bargap"),u[c]=1))}}}}),d_e=U({"src/traces/barpolar/calc.js"(pe,le){var w=Ug().hasColorscale,R=t0(),O=ii().isArrayOrTypedArray,z=UE(),l=F0().setGroupPositions,u=k1(),c=Mi().traceIs,p=ii().extendFlat;function f(h,m){for(var _=h._fullLayout,x=m.subplot,A=_[x].radialaxis,E=_[x].angularaxis,D=A.makeCalcdata(m,"r"),g=E.makeCalcdata(m,"theta"),C=m._length,I=new Array(C),N=D,F=g,k=0;k<C;k++)I[k]={p:F[k],s:N[k]};function P(T){var y=m[T];y!==void 0&&(m["_"+T]=O(y)?E.makeCalcdata(m,T):E.d2c(y,m.thetaunit))}return E.type==="linear"&&(P("width"),P("offset")),w(m,"marker")&&R(h,m,{vals:m.marker.color,containerStr:"marker",cLetter:"c"}),w(m,"marker.line")&&R(h,m,{vals:m.marker.line.color,containerStr:"marker.line",cLetter:"c"}),z(I,m),u(I,m),I}function v(h,m,_){for(var x=h.calcdata,A=[],E=0;E<x.length;E++){var D=x[E],g=D[0].trace;g.visible===!0&&c(g,"bar")&&g.subplot===_&&A.push(D)}var C=p({},m.radialaxis,{_id:"x"}),I=m.angularaxis;l(h,I,C,A,{mode:m.barmode,norm:m.barnorm,gap:m.bargap,groupgap:m.bargroupgap})}le.exports={calc:f,crossTraceCalc:v}}}),ynt=U({"src/traces/barpolar/plot.js"(pe,le){var w=Ze(),R=_t(),O=ii(),z=ec(),l=IK();le.exports=function(p,f,v){var h=p._context.staticPlot,m=f.xaxis,_=f.yaxis,x=f.radialAxis,A=f.angularAxis,E=u(f),D=f.layers.frontplot.select("g.barlayer");O.makeTraceGroups(D,v,"trace bars").each(function(){var g=w.select(this),C=O.ensureSingle(g,"g","points"),I=C.selectAll("g.point").data(O.identity);I.enter().append("g").style("vector-effect",h?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),I.exit().remove(),I.each(function(N){var F=w.select(this),k=N.rp0=x.c2p(N.s0),P=N.rp1=x.c2p(N.s1),T=N.thetag0=A.c2g(N.p0),y=N.thetag1=A.c2g(N.p1),S;if(!R(k)||!R(P)||!R(T)||!R(y)||k===P||T===y)S="M0,0Z";else{var M=x.c2g(N.s1),W=(T+y)/2;N.ct=[m.c2p(M*Math.cos(W)),_.c2p(M*Math.sin(W))],S=E(k,P,T,y)}O.ensureSingle(F,"path").attr("d",S)}),z.setClipUrl(g,f._hasClipOnAxisFalse?f.clipIds.forTraces:null,p)})};function u(c){var p=c.cxx,f=c.cyy;return c.vangles?function(v,h,m,_){var x,A;O.angleDelta(m,_)>0?(x=m,A=_):(x=_,A=m);var E=l.findEnclosingVertexAngles(x,c.vangles)[0],D=l.findEnclosingVertexAngles(A,c.vangles)[1],g=[E,(x+A)/2,D];return l.pathPolygonAnnulus(v,h,x,A,g,p,f)}:function(v,h,m,_){return O.pathAnnulus(v,h,m,_,p,f)}}}}),bnt=U({"src/traces/barpolar/hover.js"(pe,le){var w=Dp(),R=ii(),O=P1().getTraceColor,z=R.fillText,l=OK().makeHoverPointText,u=IK().isPtInsidePolygon;le.exports=function(p,f,v){var h=p.cd,m=h[0].trace,_=p.subplot,x=_.radialAxis,A=_.angularAxis,E=_.vangles,D=E?u:R.isPtInsideSector,g=p.maxHoverDistance,C=A._period||2*Math.PI,I=Math.abs(x.g2p(Math.sqrt(f*f+v*v))),N=Math.atan2(v,f);x.range[0]>x.range[1]&&(N+=Math.PI);var F=function(y){return D(I,N,[y.rp0,y.rp1],[y.thetag0,y.thetag1],E)?g+Math.min(1,Math.abs(y.thetag1-y.thetag0)/C)-1+(y.rp1-I)/(y.rp1-y.rp0)-1:1/0};if(w.getClosest(h,F,p),p.index!==!1){var k=p.index,P=h[k];p.x0=p.x1=P.ct[0],p.y0=p.y1=P.ct[1];var T=R.extendFlat({},P,{r:P.s,theta:P.p});return z(P,m,p),l(T,m,_,p),p.hovertemplate=m.hovertemplate,p.color=O(m,P),p.xLabelVal=p.yLabelVal=void 0,P.s<0&&(p.idealAlign="left"),[p]}}}}),xnt=U({"src/traces/barpolar/index.js"(pe,le){le.exports={moduleType:"trace",name:"barpolar",basePlotModule:PK(),categories:["polar","bar","showLegend"],attributes:c_e(),layoutAttributes:f_e(),supplyDefaults:mnt(),supplyLayoutDefaults:gnt(),calc:d_e().calc,crossTraceCalc:d_e().crossTraceCalc,plot:ynt(),colorbar:qg(),formatLabels:LK(),style:Xp().style,styleOnSelect:Xp().styleOnSelect,hoverPoints:bnt(),selectPoints:i2(),meta:{}}}}),_nt=U({"lib/barpolar.js"(pe,le){le.exports=xnt()}}),h_e=U({"src/plots/smith/constants.js"(pe,le){le.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}}}),p_e=U({"src/plots/smith/layout_attributes.js"(pe,le){var w=jn(),R=Hg(),O=oh().attributes,z=ii().extendFlat,l=zl().overrideAll,u=l({color:R.color,showline:z({},R.showline,{dflt:!0}),linecolor:R.linecolor,linewidth:R.linewidth,showgrid:z({},R.showgrid,{dflt:!0}),gridcolor:R.gridcolor,gridwidth:R.gridwidth,griddash:R.griddash},"plot","from-root"),c=l({ticklen:R.ticklen,tickwidth:z({},R.tickwidth,{dflt:2}),tickcolor:R.tickcolor,showticklabels:R.showticklabels,labelalias:R.labelalias,showtickprefix:R.showtickprefix,tickprefix:R.tickprefix,showticksuffix:R.showticksuffix,ticksuffix:R.ticksuffix,tickfont:R.tickfont,tickformat:R.tickformat,hoverformat:R.hoverformat,layer:R.layer},"plot","from-root"),p=z({visible:z({},R.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:z({},R.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},u,c),f=z({visible:z({},R.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:R.ticks,editType:"calc"},u,c);le.exports={domain:O({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:w.background},realaxis:p,imaginaryaxis:f,editType:"calc"}}}),wnt=U({"src/plots/smith/layout_defaults.js"(pe,le){var w=ii(),R=Lr(),O=Tc(),z=cS(),l=Om().getSubplotData,u=Xw(),c=A1(),p=Jy(),f=Wy(),v=p_e(),h=h_e(),m=h.axisNames,_=A(function(E){return w.isTypedArray(E)&&(E=Array.from(E)),E.slice().reverse().map(function(D){return-D}).concat([0]).concat(E)},String);function x(E,D,g,C){var I=g("bgcolor");C.bgColor=R.combine(I,C.paper_bgcolor);var N=l(C.fullData,h.name,C.id),F=C.layoutOut,k;function P(re,fe){return g(k+"."+re,fe)}for(var T=0;T<m.length;T++){k=m[T],w.isPlainObject(E[k])||(E[k]={});var y=E[k],S=O.newContainer(D,k);S._id=S._name=k,S._attr=C.id+"."+k,S._traceIndices=N.map(function(re){return re.index});var M=P("visible");if(S.type="linear",f(S,F),u(y,S,P,S.type),M){var W=k==="realaxis";if(W&&P("side"),W)P("tickvals");else{var $=_(D.realaxis.tickvals||v.realaxis.tickvals.dflt);P("tickvals",$)}w.isTypedArray(S.tickvals)&&(S.tickvals=Array.from(S.tickvals));var Z,K,Q,J,G=C.font||{};M&&(Z=P("color"),K=Z===y.color?Z:G.color,Q=G.size,J=G.family),c(y,S,P,S.type,{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,noAng:!W,noExp:!0,font:{color:K,size:Q,family:J}}),w.coerce2(E,D,v,k+".ticklen"),w.coerce2(E,D,v,k+".tickwidth"),w.coerce2(E,D,v,k+".tickcolor",D.color);var ee=P("ticks");ee||(delete D[k].ticklen,delete D[k].tickwidth,delete D[k].tickcolor),p(y,S,P,{dfltColor:Z,bgColor:C.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:v[k]}),P("layer")}P("hoverformat"),delete S.type,S._input=y}}le.exports=function(D,g,C){z(D,g,C,{noUirevision:!0,type:h.name,attributes:v,handleDefaults:x,font:g.font,paper_bgcolor:g.paper_bgcolor,fullData:C,layoutOut:g})};function A(E,D){var g={};return function(C){var I=D?D(C):C;if(I in g)return g[I];var N=E(C);return g[I]=N,N}}}}),Snt=U({"src/plots/smith/index.js"(pe,le){var w=Om().getSubplotCalcData,R=ii().counterRegex,O=s_e(),z=h_e(),l=z.attr,u=z.name,c=R(u),p={};p[l]={valType:"subplotid",dflt:u,editType:"calc"};function f(h){for(var m=h._fullLayout,_=h.calcdata,x=m._subplots[u],A=0;A<x.length;A++){var E=x[A],D=w(_,u,E),g=m[E]._subplot;g||(g=O(h,E,!0),m[E]._subplot=g),g.plot(D,m,h._promises)}}function v(h,m,_,x){for(var A=x._subplots[u]||[],E=0;E<A.length;E++){var D=A[E],g=x[D]._subplot;if(!m[D]&&g){g.framework.remove();for(var C in g.clipPaths)g.clipPaths[C].remove()}}}le.exports={attr:l,name:u,idRoot:u,idRegex:c,attrRegex:c,attributes:p,layoutAttributes:p_e(),supplyLayoutDefaults:wnt(),plot:f,clean:v,toSVG:Rf().toSVG}}}),v_e=U({"src/traces/scattersmith/attributes.js"(pe,le){var w=Js().hovertemplateAttrs,R=Js().texttemplateAttrs,O=Ar().extendFlat,z=Xc(),l=Kc(),u=Jn(),c=l.line;le.exports={mode:l.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:l.text,texttemplate:R({editType:"plot"},{keys:["real","imag","text"]}),hovertext:l.hovertext,line:{color:c.color,width:c.width,dash:c.dash,backoff:c.backoff,shape:O({},c.shape,{values:["linear","spline"]}),smoothing:c.smoothing,editType:"calc"},connectgaps:l.connectgaps,marker:l.marker,cliponaxis:O({},l.cliponaxis,{dflt:!1}),textposition:l.textposition,textfont:l.textfont,fill:O({},l.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:z(),hoverinfo:O({},u.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:l.hoveron,hovertemplate:w(),selected:l.selected,unselected:l.unselected}}}),Tnt=U({"src/traces/scattersmith/defaults.js"(pe,le){var w=ii(),R=Qd(),O=r0(),z=Xy(),l=g0(),u=y0(),c=Ch(),p=hu().PTS_LINESONLY,f=v_e();le.exports=function(m,_,x,A){function E(C,I){return w.coerce(m,_,f,C,I)}var D=v(m,_,A,E);if(!D){_.visible=!1;return}E("mode",D<p?"lines+markers":"lines"),E("text"),E("hovertext"),_.hoveron!=="fills"&&E("hovertemplate"),R.hasMarkers(_)&&O(m,_,x,A,E,{gradient:!0}),R.hasLines(_)&&(z(m,_,x,A,E,{backoff:!0}),l(m,_,E),E("connectgaps")),R.hasText(_)&&(E("texttemplate"),u(m,_,A,E));var g=[];(R.hasMarkers(_)||R.hasText(_))&&(E("cliponaxis"),E("marker.maxdisplayed"),g.push("points")),E("fill"),_.fill!=="none"&&(c(m,_,x,E),R.hasLines(_)||l(m,_,E)),(_.fill==="tonext"||_.fill==="toself")&&g.push("fills"),E("hoveron",g.join("+")||"points"),w.coerceSelectionMarkerOpacity(_,E)};function v(h,m,_,x){var A=x("real"),E=x("imag"),D;return A&&E&&(D=Math.min(A.length,E.length)),w.isTypedArray(A)&&(m.real=A=Array.from(A)),w.isTypedArray(E)&&(m.imag=E=Array.from(E)),m._length=D,D}}}),Ent=U({"src/traces/scattersmith/format_labels.js"(pe,le){var w=Yu();le.exports=function(O,z,l){var u={},c=l[z.subplot]._subplot;return u.realLabel=w.tickText(c.radialAxis,O.real,!0).text,u.imagLabel=w.tickText(c.angularAxis,O.imag,!0).text,u}}}),Ant=U({"src/traces/scattersmith/calc.js"(pe,le){var w=_t(),R=Dt().BADNUM,O=b0(),z=zm(),l=k1(),u=my().calcMarkerSize;le.exports=function(p,f){for(var v=p._fullLayout,h=f.subplot,m=v[h].realaxis,_=v[h].imaginaryaxis,x=m.makeCalcdata(f,"real"),A=_.makeCalcdata(f,"imag"),E=f._length,D=new Array(E),g=0;g<E;g++){var C=x[g],I=A[g],N=D[g]={};w(C)&&w(I)?(N.real=C,N.imag=I):N.real=R}return u(f,E),O(p,f),z(D,f),l(D,f),D}}}),Cnt=U({"src/traces/scattersmith/plot.js"(pe,le){var w=Ob(),R=Dt().BADNUM,O=o_e(),z=O.smith;le.exports=function(u,c,p){for(var f=c.layers.frontplot.select("g.scatterlayer"),v=c.xaxis,h=c.yaxis,m={xaxis:v,yaxis:h,plot:c.framework,layerClipId:c._hasClipOnAxisFalse?c.clipIds.forTraces:null},_=0;_<p.length;_++)for(var x=p[_],A=0;A<x.length;A++){A===0&&(x[0].trace._xA=v,x[0].trace._yA=h);var E=x[A],D=E.real;if(D===R)E.x=E.y=R;else{var g=z([D,E.imag]);E.x=g[0],E.y=g[1]}}w(u,m,p,f)}}}),Mnt=U({"src/traces/scattersmith/hover.js"(pe,le){var w=sv();function R(z,l,u,c){var p=w(z,l,u,c);if(!(!p||p[0].index===!1)){var f=p[0];if(f.index===void 0)return p;var v=z.subplot,h=f.cd[f.index],m=f.trace;if(v.isPtInside(h))return f.xLabelVal=void 0,f.yLabelVal=void 0,O(h,m,v,f),f.hovertemplate=m.hovertemplate,p}}function O(z,l,u,c){var p=u.radialAxis,f=u.angularAxis;p._hovertitle="real",f._hovertitle="imag";var v={};v[l.subplot]={_subplot:u};var h=l._module.formatLabels(z,l,v);c.realLabel=h.realLabel,c.imagLabel=h.imagLabel;var m=z.hi||l.hoverinfo,_=[];function x(E,D){_.push(E._hovertitle+": "+D)}if(!l.hovertemplate){var A=m.split("+");A.indexOf("all")!==-1&&(A=["real","imag","text"]),A.indexOf("real")!==-1&&x(p,c.realLabel),A.indexOf("imag")!==-1&&x(f,c.imagLabel),A.indexOf("text")!==-1&&c.text&&(_.push(c.text),delete c.text),c.extraText=_.join("<br>")}}le.exports={hoverPoints:R,makeHoverPointText:O}}}),Rnt=U({"src/traces/scattersmith/index.js"(pe,le){le.exports={moduleType:"trace",name:"scattersmith",basePlotModule:Snt(),categories:["smith","symbols","showLegend","scatter-like"],attributes:v_e(),supplyDefaults:Tnt(),colorbar:qg(),formatLabels:Ent(),calc:Ant(),plot:Cnt(),style:z0().style,styleOnSelect:z0().styleOnSelect,hoverPoints:Mnt().hoverPoints,selectPoints:qd(),meta:{}}}}),knt=U({"lib/scattersmith.js"(pe,le){le.exports=Rnt()}}),Sw=U({"node_modules/world-calendars/dist/main.js"(pe,le){var w=F1();function R(){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={}}w(R.prototype,{instance:function(p,f){p=(p||"gregorian").toLowerCase(),f=f||"";var v=this._localCals[p+"-"+f];if(!v&&this.calendars[p]&&(v=new this.calendars[p](f),this._localCals[p+"-"+f]=v),!v)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,p);return v},newDate:function(p,f,v,h,m){return h=(p!=null&&p.year?p.calendar():typeof h=="string"?this.instance(h,m):h)||this.instance(),h.newDate(p,f,v)},substituteDigits:function(p){return function(f){return(f+"").replace(/[0-9]/g,function(v){return p[v]})}},substituteChineseDigits:function(p,f){return function(v){for(var h="",m=0;v>0;){var _=v%10;h=(_===0?"":p[_]+f[m])+h,m++,v=Math.floor(v/10)}return h.indexOf(p[1]+f[1])===0&&(h=h.substr(1)),h||p[0]}}});function O(p,f,v,h){if(this._calendar=p,this._year=f,this._month=v,this._day=h,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(c.local.invalidDate||c.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function z(p,f){return p=""+p,"000000".substring(0,f-p.length)+p}w(O.prototype,{newDate:function(p,f,v){return this._calendar.newDate(p??this,f,v)},year:function(p){return arguments.length===0?this._year:this.set(p,"y")},month:function(p){return arguments.length===0?this._month:this.set(p,"m")},day:function(p){return arguments.length===0?this._day:this.set(p,"d")},date:function(p,f,v){if(!this._calendar.isValid(p,f,v))throw(c.local.invalidDate||c.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=p,this._month=f,this._day=v,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(p,f){return this._calendar.add(this,p,f)},set:function(p,f){return this._calendar.set(this,p,f)},compareTo:function(p){if(this._calendar.name!==p._calendar.name)throw(c.local.differentCalendars||c.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,p._calendar.local.name);var f=this._year!==p._year?this._year-p._year:this._month!==p._month?this.monthOfYear()-p.monthOfYear():this._day-p._day;return f===0?0:f<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(p){return this._calendar.fromJD(p)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(p){return this._calendar.fromJSDate(p)},toString:function(){return(this.year()<0?"-":"")+z(Math.abs(this.year()),4)+"-"+z(this.month(),2)+"-"+z(this.day(),2)}});function l(){this.shortYearCutoff="+10"}w(l.prototype,{_validateLevel:0,newDate:function(p,f,v){return p==null?this.today():(p.year&&(this._validate(p,f,v,c.local.invalidDate||c.regionalOptions[""].invalidDate),v=p.day(),f=p.month(),p=p.year()),new O(this,p,f,v))},today:function(){return this.fromJSDate(new Date)},epoch:function(p){var f=this._validate(p,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear);return f.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(p){var f=this._validate(p,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear);return(f.year()<0?"-":"")+z(Math.abs(f.year()),4)},monthsInYear:function(p){return this._validate(p,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear),12},monthOfYear:function(p,f){var v=this._validate(p,f,this.minDay,c.local.invalidMonth||c.regionalOptions[""].invalidMonth);return(v.month()+this.monthsInYear(v)-this.firstMonth)%this.monthsInYear(v)+this.minMonth},fromMonthOfYear:function(p,f){var v=(f+this.firstMonth-2*this.minMonth)%this.monthsInYear(p)+this.minMonth;return this._validate(p,v,this.minDay,c.local.invalidMonth||c.regionalOptions[""].invalidMonth),v},daysInYear:function(p){var f=this._validate(p,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear);return this.leapYear(f)?366:365},dayOfYear:function(p,f,v){var h=this._validate(p,f,v,c.local.invalidDate||c.regionalOptions[""].invalidDate);return h.toJD()-this.newDate(h.year(),this.fromMonthOfYear(h.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(p,f,v){var h=this._validate(p,f,v,c.local.invalidDate||c.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(h))+2)%this.daysInWeek()},extraInfo:function(p,f,v){return this._validate(p,f,v,c.local.invalidDate||c.regionalOptions[""].invalidDate),{}},add:function(p,f,v){return this._validate(p,this.minMonth,this.minDay,c.local.invalidDate||c.regionalOptions[""].invalidDate),this._correctAdd(p,this._add(p,f,v),f,v)},_add:function(p,f,v){if(this._validateLevel++,v==="d"||v==="w"){var h=p.toJD()+f*(v==="w"?this.daysInWeek():1),m=p.calendar().fromJD(h);return this._validateLevel--,[m.year(),m.month(),m.day()]}try{var _=p.year()+(v==="y"?f:0),x=p.monthOfYear()+(v==="m"?f:0),m=p.day(),A=function(g){for(;x<g.minMonth;)_--,x+=g.monthsInYear(_);for(var C=g.monthsInYear(_);x>C-1+g.minMonth;)_++,x-=C,C=g.monthsInYear(_)};v==="y"?(p.month()!==this.fromMonthOfYear(_,x)&&(x=this.newDate(_,p.month(),this.minDay).monthOfYear()),x=Math.min(x,this.monthsInYear(_)),m=Math.min(m,this.daysInMonth(_,this.fromMonthOfYear(_,x)))):v==="m"&&(A(this),m=Math.min(m,this.daysInMonth(_,this.fromMonthOfYear(_,x))));var E=[_,this.fromMonthOfYear(_,x),m];return this._validateLevel--,E}catch(D){throw this._validateLevel--,D}},_correctAdd:function(p,f,v,h){if(!this.hasYearZero&&(h==="y"||h==="m")&&(f[0]===0||p.year()>0!=f[0]>0)){var m={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[h],_=v<0?-1:1;f=this._add(p,v*m[0]+_*m[1],m[2])}return p.date(f[0],f[1],f[2])},set:function(p,f,v){this._validate(p,this.minMonth,this.minDay,c.local.invalidDate||c.regionalOptions[""].invalidDate);var h=v==="y"?f:p.year(),m=v==="m"?f:p.month(),_=v==="d"?f:p.day();return(v==="y"||v==="m")&&(_=Math.min(_,this.daysInMonth(h,m))),p.date(h,m,_)},isValid:function(p,f,v){this._validateLevel++;var h=this.hasYearZero||p!==0;if(h){var m=this.newDate(p,f,this.minDay);h=f>=this.minMonth&&f-this.minMonth<this.monthsInYear(m)&&v>=this.minDay&&v-this.minDay<this.daysInMonth(m)}return this._validateLevel--,h},toJSDate:function(p,f,v){var h=this._validate(p,f,v,c.local.invalidDate||c.regionalOptions[""].invalidDate);return c.instance().fromJD(this.toJD(h)).toJSDate()},fromJSDate:function(p){return this.fromJD(c.instance().fromJSDate(p).toJD())},_validate:function(p,f,v,h){if(p.year){if(this._validateLevel===0&&this.name!==p.calendar().name)throw(c.local.differentCalendars||c.regionalOptions[""].differentCalendars).replace(/\{0\}/,this.local.name).replace(/\{1\}/,p.calendar().local.name);return p}try{if(this._validateLevel++,this._validateLevel===1&&!this.isValid(p,f,v))throw h.replace(/\{0\}/,this.local.name);var m=this.newDate(p,f,v);return this._validateLevel--,m}catch(_){throw this._validateLevel--,_}}});function u(p){this.local=this.regionalOptions[p]||this.regionalOptions[""]}u.prototype=new l,w(u.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(v){var f=this._validate(v,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear),v=f.year()+(f.year()<0?1:0);return v%4===0&&(v%100!==0||v%400===0)},weekOfYear:function(p,f,v){var h=this.newDate(p,f,v);return h.add(4-(h.dayOfWeek()||7),"d"),Math.floor((h.dayOfYear()-1)/7)+1},daysInMonth:function(p,f){var v=this._validate(p,f,this.minDay,c.local.invalidMonth||c.regionalOptions[""].invalidMonth);return this.daysPerMonth[v.month()-1]+(v.month()===2&&this.leapYear(v.year())?1:0)},weekDay:function(p,f,v){return(this.dayOfWeek(p,f,v)||7)<6},toJD:function(p,f,v){var h=this._validate(p,f,v,c.local.invalidDate||c.regionalOptions[""].invalidDate);p=h.year(),f=h.month(),v=h.day(),p<0&&p++,f<3&&(f+=12,p--);var m=Math.floor(p/100),_=2-m+Math.floor(m/4);return Math.floor(365.25*(p+4716))+Math.floor(30.6001*(f+1))+v+_-1524.5},fromJD:function(p){var f=Math.floor(p+.5),v=Math.floor((f-186721625e-2)/36524.25);v=f+1+v-Math.floor(v/4);var h=v+1524,m=Math.floor((h-122.1)/365.25),_=Math.floor(365.25*m),x=Math.floor((h-_)/30.6001),A=h-_-Math.floor(x*30.6001),E=x-(x>13.5?13:1),D=m-(E>2.5?4716:4715);return D<=0&&D--,this.newDate(D,E,A)},toJSDate:function(p,f,v){var h=this._validate(p,f,v,c.local.invalidDate||c.regionalOptions[""].invalidDate),m=new Date(h.year(),h.month()-1,h.day());return m.setHours(0),m.setMinutes(0),m.setSeconds(0),m.setMilliseconds(0),m.setHours(m.getHours()>12?m.getHours()+2:0),m},fromJSDate:function(p){return this.newDate(p.getFullYear(),p.getMonth()+1,p.getDate())}});var c=le.exports=new R;c.cdate=O,c.baseCalendar=l,c.calendars.gregorian=u}}),Int=U({"node_modules/world-calendars/dist/plus.js"(){var pe=F1(),le=Sw();pe(le.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"}),le.local=le.regionalOptions[""],pe(le.cdate.prototype,{formatDate:function(w,R){return typeof w!="string"&&(R=w,w=""),this._calendar.formatDate(w||"",this,R)}}),pe(le.baseCalendar.prototype,{UNIX_EPOCH:le.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:1440*60,TICKS_EPOCH:le.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(w,R,O){if(typeof w!="string"&&(O=R,R=w,w=""),!R)return"";if(R.calendar()!==this)throw le.local.invalidFormat||le.regionalOptions[""].invalidFormat;w=w||this.local.dateFormat,O=O||{};var z=O.dayNamesShort||this.local.dayNamesShort,l=O.dayNames||this.local.dayNames,u=O.monthNumbers||this.local.monthNumbers,c=O.monthNamesShort||this.local.monthNamesShort,p=O.monthNames||this.local.monthNames;O.calculateWeek||this.local.calculateWeek;for(var f=function(I,N){for(var F=1;C+F<w.length&&w.charAt(C+F)===I;)F++;return C+=F-1,Math.floor(F/(N||1))>1},v=function(I,N,F,k){var P=""+N;if(f(I,k))for(;P.length<F;)P="0"+P;return P},h=function(I,N,F,k){return f(I)?k[N]:F[N]},m=this,_=function(I){return typeof u=="function"?u.call(m,I,f("m")):E(v("m",I.month(),2))},x=function(I,N){return N?typeof p=="function"?p.call(m,I):p[I.month()-m.minMonth]:typeof c=="function"?c.call(m,I):c[I.month()-m.minMonth]},A=this.local.digits,E=function(I){return O.localNumbers&&A?A(I):I},D="",g=!1,C=0;C<w.length;C++)if(g)w.charAt(C)==="'"&&!f("'")?g=!1:D+=w.charAt(C);else switch(w.charAt(C)){case"d":D+=E(v("d",R.day(),2));break;case"D":D+=h("D",R.dayOfWeek(),z,l);break;case"o":D+=v("o",R.dayOfYear(),3);break;case"w":D+=v("w",R.weekOfYear(),2);break;case"m":D+=_(R);break;case"M":D+=x(R,f("M"));break;case"y":D+=f("y",2)?R.year():(R.year()%100<10?"0":"")+R.year()%100;break;case"Y":f("Y",2),D+=R.formatYear();break;case"J":D+=R.toJD();break;case"@":D+=(R.toJD()-this.UNIX_EPOCH)*this.SECS_PER_DAY;break;case"!":D+=(R.toJD()-this.TICKS_EPOCH)*this.TICKS_PER_DAY;break;case"'":f("'")?D+="'":g=!0;break;default:D+=w.charAt(C)}return D},parseDate:function(w,R,O){if(R==null)throw le.local.invalidArguments||le.regionalOptions[""].invalidArguments;if(R=typeof R=="object"?R.toString():R+"",R==="")return null;w=w||this.local.dateFormat,O=O||{};var z=O.shortYearCutoff||this.shortYearCutoff;z=typeof z!="string"?z:this.today().year()%100+parseInt(z,10);for(var l=O.dayNamesShort||this.local.dayNamesShort,u=O.dayNames||this.local.dayNames,c=O.parseMonth||this.local.parseMonth,p=O.monthNumbers||this.local.monthNumbers,f=O.monthNamesShort||this.local.monthNamesShort,v=O.monthNames||this.local.monthNames,h=-1,m=-1,_=-1,x=-1,A=-1,E=!1,D=!1,g=function(W,$){for(var Z=1;y+Z<w.length&&w.charAt(y+Z)===W;)Z++;return y+=Z-1,Math.floor(Z/($||1))>1},C=function(W,$){var Z=g(W,$),K=[2,3,Z?4:2,Z?4:2,10,11,20]["oyYJ@!".indexOf(W)+1],Q=new RegExp("^-?\\d{1,"+K+"}"),J=R.substring(T).match(Q);if(!J)throw(le.local.missingNumberAt||le.regionalOptions[""].missingNumberAt).replace(/\{0\}/,T);return T+=J[0].length,parseInt(J[0],10)},I=this,N=function(){if(typeof p=="function"){g("m");var W=p.call(I,R.substring(T));return T+=W.length,W}return C("m")},F=function(W,$,Z,K){for(var Q=g(W,K)?Z:$,J=0;J<Q.length;J++)if(R.substr(T,Q[J].length).toLowerCase()===Q[J].toLowerCase())return T+=Q[J].length,J+I.minMonth;throw(le.local.unknownNameAt||le.regionalOptions[""].unknownNameAt).replace(/\{0\}/,T)},k=function(){if(typeof v=="function"){var W=g("M")?v.call(I,R.substring(T)):f.call(I,R.substring(T));return T+=W.length,W}return F("M",f,v)},P=function(){if(R.charAt(T)!==w.charAt(y))throw(le.local.unexpectedLiteralAt||le.regionalOptions[""].unexpectedLiteralAt).replace(/\{0\}/,T);T++},T=0,y=0;y<w.length;y++)if(D)w.charAt(y)==="'"&&!g("'")?D=!1:P();else switch(w.charAt(y)){case"d":x=C("d");break;case"D":F("D",l,u);break;case"o":A=C("o");break;case"w":C("w");break;case"m":_=N();break;case"M":_=k();break;case"y":var S=y;E=!g("y",2),y=S,m=C("y",2);break;case"Y":m=C("Y",2);break;case"J":h=C("J")+.5,R.charAt(T)==="."&&(T++,C("J"));break;case"@":h=C("@")/this.SECS_PER_DAY+this.UNIX_EPOCH;break;case"!":h=C("!")/this.TICKS_PER_DAY+this.TICKS_EPOCH;break;case"*":T=R.length;break;case"'":g("'")?P():D=!0;break;default:P()}if(T<R.length)throw le.local.unexpectedText||le.regionalOptions[""].unexpectedText;if(m===-1?m=this.today().year():m<100&&E&&(m+=z===-1?1900:this.today().year()-this.today().year()%100-(m<=z?0:100)),typeof _=="string"&&(_=c.call(this,m,_)),A>-1){_=1,x=A;for(var M=this.daysInMonth(m,_);x>M;M=this.daysInMonth(m,_))_++,x-=M}return h>-1?this.fromJD(h):this.newDate(m,_,x)},determineDate:function(w,R,O,z,l){O&&typeof O!="object"&&(l=z,z=O,O=null),typeof z!="string"&&(l=z,z="");var u=this,c=function(p){try{return u.parseDate(z,p,l)}catch{}p=p.toLowerCase();for(var f=(p.match(/^c/)&&O?O.newDate():null)||u.today(),v=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,h=v.exec(p);h;)f.add(parseInt(h[1],10),h[2]||"d"),h=v.exec(p);return f};return R=R?R.newDate():null,w=w==null?R:typeof w=="string"?c(w):typeof w=="number"?isNaN(w)||w===1/0||w===-1/0?R:u.today().add(w,"d"):u.newDate(w),w}})}}),Pnt=U({"node_modules/world-calendars/dist/calendars/chinese.js"(){var pe=Sw(),le=F1(),w=pe.instance();function R(h){this.local=this.regionalOptions[h||""]||this.regionalOptions[""]}R.prototype=new pe.baseCalendar,le(R.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(h,m){if(typeof h=="string"){var _=h.match(z);return _?_[0]:""}var x=this._validateYear(h),A=h.month(),E=""+this.toChineseMonth(x,A);return m&&E.length<2&&(E="0"+E),this.isIntercalaryMonth(x,A)&&(E+="i"),E},monthNames:function(h){if(typeof h=="string"){var m=h.match(l);return m?m[0]:""}var _=this._validateYear(h),x=h.month(),A=this.toChineseMonth(_,x),E=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][A-1];return this.isIntercalaryMonth(_,x)&&(E="闰"+E),E},monthNamesShort:function(h){if(typeof h=="string"){var m=h.match(u);return m?m[0]:""}var _=this._validateYear(h),x=h.month(),A=this.toChineseMonth(_,x),E=["一","二","三","四","五","六","七","八","九","十","十一","十二"][A-1];return this.isIntercalaryMonth(_,x)&&(E="闰"+E),E},parseMonth:function(h,m){h=this._validateYear(h);var _=parseInt(m),x;if(isNaN(_))m[0]==="闰"&&(x=!0,m=m.substring(1)),m[m.length-1]==="月"&&(m=m.substring(0,m.length-1)),_=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(m);else{var A=m[m.length-1];x=A==="i"||A==="I"}var E=this.toMonthIndex(h,_,x);return E},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(h,m){if(h.year&&(h=h.year()),typeof h!="number"||h<1888||h>2111)throw m.replace(/\{0\}/,this.local.name);return h},toMonthIndex:function(h,m,_){var x=this.intercalaryMonth(h),A=_&&m!==x;if(A||m<1||m>12)throw pe.local.invalidMonth.replace(/\{0\}/,this.local.name);var E;return x?!_&&m<=x?E=m-1:E=m:E=m-1,E},toChineseMonth:function(h,m){h.year&&(h=h.year(),m=h.month());var _=this.intercalaryMonth(h),x=_?12:11;if(m<0||m>x)throw pe.local.invalidMonth.replace(/\{0\}/,this.local.name);var A;return _?m<_?A=m+1:A=m:A=m+1,A},intercalaryMonth:function(h){h=this._validateYear(h);var m=c[h-c[0]],_=m>>13;return _},isIntercalaryMonth:function(h,m){h.year&&(h=h.year(),m=h.month());var _=this.intercalaryMonth(h);return!!_&&_===m},leapYear:function(h){return this.intercalaryMonth(h)!==0},weekOfYear:function(h,m,_){var x=this._validateYear(h,pe.local.invalidyear),A=p[x-p[0]],E=A>>9&4095,D=A>>5&15,g=A&31,C;C=w.newDate(E,D,g),C.add(4-(C.dayOfWeek()||7),"d");var I=this.toJD(h,m,_)-C.toJD();return 1+Math.floor(I/7)},monthsInYear:function(h){return this.leapYear(h)?13:12},daysInMonth:function(h,m){h.year&&(m=h.month(),h=h.year()),h=this._validateYear(h);var _=c[h-c[0]],x=_>>13,A=x?12:11;if(m>A)throw pe.local.invalidMonth.replace(/\{0\}/,this.local.name);var E=_&1<<12-m?30:29;return E},weekDay:function(h,m,_){return(this.dayOfWeek(h,m,_)||7)<6},toJD:function(h,m,_){var x=this._validate(h,E,_,pe.local.invalidDate);h=this._validateYear(x.year()),m=x.month(),_=x.day();var A=this.isIntercalaryMonth(h,m),E=this.toChineseMonth(h,m),D=v(h,E,_,A);return w.toJD(D.year,D.month,D.day)},fromJD:function(h){var m=w.fromJD(h),_=f(m.year(),m.month(),m.day()),x=this.toMonthIndex(_.year,_.month,_.isIntercalary);return this.newDate(_.year,x,_.day)},fromString:function(h){var m=h.match(O),_=this._validateYear(+m[1]),x=+m[2],A=!!m[3],E=this.toMonthIndex(_,x,A),D=+m[4];return this.newDate(_,E,D)},add:function(h,m,_){var x=h.year(),A=h.month(),E=this.isIntercalaryMonth(x,A),D=this.toChineseMonth(x,A),g=Object.getPrototypeOf(R.prototype).add.call(this,h,m,_);if(_==="y"){var C=g.year(),I=g.month(),N=this.isIntercalaryMonth(C,D),F=E&&N?this.toMonthIndex(C,D,!0):this.toMonthIndex(C,D,!1);F!==I&&g.month(F)}return g}});var O=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,z=/^\d?\d[iI]?/m,l=/^闰?十?[一二三四五六七八九]?月/m,u=/^闰?十?[一二三四五六七八九]?/m;pe.calendars.chinese=R;var c=[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],p=[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 f(h,m,_,x){var A,E;if(typeof h=="object")A=h,E=m||{};else{var D=typeof h=="number"&&h>=1888&&h<=2111;if(!D)throw new Error("Solar year outside range 1888-2111");var g=typeof m=="number"&&m>=1&&m<=12;if(!g)throw new Error("Solar month outside range 1 - 12");var C=typeof _=="number"&&_>=1&&_<=31;if(!C)throw new Error("Solar day outside range 1 - 31");A={year:h,month:m,day:_},E={}}var I=p[A.year-p[0]],N=A.year<<9|A.month<<5|A.day;E.year=N>=I?A.year:A.year-1,I=p[E.year-p[0]];var F=I>>9&4095,k=I>>5&15,P=I&31,T,y=new Date(F,k-1,P),S=new Date(A.year,A.month-1,A.day);T=Math.round((S-y)/(24*3600*1e3));var M=c[E.year-c[0]],W;for(W=0;W<13;W++){var $=M&1<<12-W?30:29;if(T<$)break;T-=$}var Z=M>>13;return!Z||W<Z?(E.isIntercalary=!1,E.month=1+W):W===Z?(E.isIntercalary=!0,E.month=W):(E.isIntercalary=!1,E.month=W),E.day=1+T,E}function v(h,m,_,x,A){var E,D;if(typeof h=="object")D=h,E=m||{};else{var g=typeof h=="number"&&h>=1888&&h<=2111;if(!g)throw new Error("Lunar year outside range 1888-2111");var C=typeof m=="number"&&m>=1&&m<=12;if(!C)throw new Error("Lunar month outside range 1 - 12");var I=typeof _=="number"&&_>=1&&_<=30;if(!I)throw new Error("Lunar day outside range 1 - 30");var N;typeof x=="object"?(N=!1,E=x):(N=!!x,E={}),D={year:h,month:m,day:_,isIntercalary:N}}var F;F=D.day-1;var k=c[D.year-c[0]],P=k>>13,T;P&&(D.month>P||D.isIntercalary)?T=D.month:T=D.month-1;for(var y=0;y<T;y++){var S=k&1<<12-y?30:29;F+=S}var M=p[D.year-p[0]],W=M>>9&4095,$=M>>5&15,Z=M&31,K=new Date(W,$-1,Z+F);return E.year=K.getFullYear(),E.month=1+K.getMonth(),E.day=K.getDate(),E}}}),Dnt=U({"node_modules/world-calendars/dist/calendars/coptic.js"(){var pe=Sw(),le=F1();function w(R){this.local=this.regionalOptions[R||""]||this.regionalOptions[""]}w.prototype=new pe.baseCalendar,le(w.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(z){var O=this._validate(z,this.minMonth,this.minDay,pe.local.invalidYear),z=O.year()+(O.year()<0?1:0);return z%4===3||z%4===-1},monthsInYear:function(R){return this._validate(R,this.minMonth,this.minDay,pe.local.invalidYear||pe.regionalOptions[""].invalidYear),13},weekOfYear:function(R,O,z){var l=this.newDate(R,O,z);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(R,O){var z=this._validate(R,O,this.minDay,pe.local.invalidMonth);return this.daysPerMonth[z.month()-1]+(z.month()===13&&this.leapYear(z.year())?1:0)},weekDay:function(R,O,z){return(this.dayOfWeek(R,O,z)||7)<6},toJD:function(R,O,z){var l=this._validate(R,O,z,pe.local.invalidDate);return R=l.year(),R<0&&R++,l.day()+(l.month()-1)*30+(R-1)*365+Math.floor(R/4)+this.jdEpoch-1},fromJD:function(R){var O=Math.floor(R)+.5-this.jdEpoch,z=Math.floor((O-Math.floor((O+366)/1461))/365)+1;z<=0&&z--,O=Math.floor(R)+.5-this.newDate(z,1,1).toJD();var l=Math.floor(O/30)+1,u=O-(l-1)*30+1;return this.newDate(z,l,u)}}),pe.calendars.coptic=w}}),Lnt=U({"node_modules/world-calendars/dist/calendars/discworld.js"(){var pe=Sw(),le=F1();function w(O){this.local=this.regionalOptions[O||""]||this.regionalOptions[""]}w.prototype=new pe.baseCalendar,le(w.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(O){return this._validate(O,this.minMonth,this.minDay,pe.local.invalidYear),!1},monthsInYear:function(O){return this._validate(O,this.minMonth,this.minDay,pe.local.invalidYear),13},daysInYear:function(O){return this._validate(O,this.minMonth,this.minDay,pe.local.invalidYear),400},weekOfYear:function(O,z,l){var u=this.newDate(O,z,l);return u.add(-u.dayOfWeek(),"d"),Math.floor((u.dayOfYear()-1)/8)+1},daysInMonth:function(O,z){var l=this._validate(O,z,this.minDay,pe.local.invalidMonth);return this.daysPerMonth[l.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(O,z,l){var u=this._validate(O,z,l,pe.local.invalidDate);return(u.day()+1)%8},weekDay:function(O,z,l){var u=this.dayOfWeek(O,z,l);return u>=2&&u<=6},extraInfo:function(O,z,l){var u=this._validate(O,z,l,pe.local.invalidDate);return{century:R[Math.floor((u.year()-1)/100)+1]||""}},toJD:function(O,z,l){var u=this._validate(O,z,l,pe.local.invalidDate);return O=u.year()+(u.year()<0?1:0),z=u.month(),l=u.day(),l+(z>1?16:0)+(z>2?(z-2)*32:0)+(O-1)*400+this.jdEpoch-1},fromJD:function(O){O=Math.floor(O+.5)-Math.floor(this.jdEpoch)-1;var z=Math.floor(O/400)+1;O-=(z-1)*400,O+=O>15?16:0;var l=Math.floor(O/32)+1,u=O-(l-1)*32+1;return this.newDate(z<=0?z-1:z,l,u)}});var R={20:"Fruitbat",21:"Anchovy"};pe.calendars.discworld=w}}),Ont=U({"node_modules/world-calendars/dist/calendars/ethiopian.js"(){var pe=Sw(),le=F1();function w(R){this.local=this.regionalOptions[R||""]||this.regionalOptions[""]}w.prototype=new pe.baseCalendar,le(w.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(z){var O=this._validate(z,this.minMonth,this.minDay,pe.local.invalidYear),z=O.year()+(O.year()<0?1:0);return z%4===3||z%4===-1},monthsInYear:function(R){return this._validate(R,this.minMonth,this.minDay,pe.local.invalidYear||pe.regionalOptions[""].invalidYear),13},weekOfYear:function(R,O,z){var l=this.newDate(R,O,z);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(R,O){var z=this._validate(R,O,this.minDay,pe.local.invalidMonth);return this.daysPerMonth[z.month()-1]+(z.month()===13&&this.leapYear(z.year())?1:0)},weekDay:function(R,O,z){return(this.dayOfWeek(R,O,z)||7)<6},toJD:function(R,O,z){var l=this._validate(R,O,z,pe.local.invalidDate);return R=l.year(),R<0&&R++,l.day()+(l.month()-1)*30+(R-1)*365+Math.floor(R/4)+this.jdEpoch-1},fromJD:function(R){var O=Math.floor(R)+.5-this.jdEpoch,z=Math.floor((O-Math.floor((O+366)/1461))/365)+1;z<=0&&z--,O=Math.floor(R)+.5-this.newDate(z,1,1).toJD();var l=Math.floor(O/30)+1,u=O-(l-1)*30+1;return this.newDate(z,l,u)}}),pe.calendars.ethiopian=w}}),Nnt=U({"node_modules/world-calendars/dist/calendars/hebrew.js"(){var pe=Sw(),le=F1();function w(O){this.local=this.regionalOptions[O||""]||this.regionalOptions[""]}w.prototype=new pe.baseCalendar,le(w.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(O){var z=this._validate(O,this.minMonth,this.minDay,pe.local.invalidYear);return this._leapYear(z.year())},_leapYear:function(O){return O=O<0?O+1:O,R(O*7+1,19)<7},monthsInYear:function(O){return this._validate(O,this.minMonth,this.minDay,pe.local.invalidYear),this._leapYear(O.year?O.year():O)?13:12},weekOfYear:function(O,z,l){var u=this.newDate(O,z,l);return u.add(-u.dayOfWeek(),"d"),Math.floor((u.dayOfYear()-1)/7)+1},daysInYear:function(O){var z=this._validate(O,this.minMonth,this.minDay,pe.local.invalidYear);return O=z.year(),this.toJD(O===-1?1:O+1,7,1)-this.toJD(O,7,1)},daysInMonth:function(O,z){return O.year&&(z=O.month(),O=O.year()),this._validate(O,z,this.minDay,pe.local.invalidMonth),z===12&&this.leapYear(O)||z===8&&R(this.daysInYear(O),10)===5?30:z===9&&R(this.daysInYear(O),10)===3?29:this.daysPerMonth[z-1]},weekDay:function(O,z,l){return this.dayOfWeek(O,z,l)!==6},extraInfo:function(O,z,l){var u=this._validate(O,z,l,pe.local.invalidDate);return{yearType:(this.leapYear(u)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(u)%10-3]}},toJD:function(O,z,l){var u=this._validate(O,z,l,pe.local.invalidDate);O=u.year(),z=u.month(),l=u.day();var c=O<=0?O+1:O,p=this.jdEpoch+this._delay1(c)+this._delay2(c)+l+1;if(z<7){for(var f=7;f<=this.monthsInYear(O);f++)p+=this.daysInMonth(O,f);for(var f=1;f<z;f++)p+=this.daysInMonth(O,f)}else for(var f=7;f<z;f++)p+=this.daysInMonth(O,f);return p},_delay1:function(O){var z=Math.floor((235*O-234)/19),l=12084+13753*z,u=z*29+Math.floor(l/25920);return R(3*(u+1),7)<3&&u++,u},_delay2:function(O){var z=this._delay1(O-1),l=this._delay1(O),u=this._delay1(O+1);return u-l===356?2:l-z===382?1:0},fromJD:function(O){O=Math.floor(O)+.5;for(var z=Math.floor((O-this.jdEpoch)*98496/35975351)-1;O>=this.toJD(z===-1?1:z+1,7,1);)z++;for(var l=O<this.toJD(z,1,1)?7:1;O>this.toJD(z,l,this.daysInMonth(z,l));)l++;var u=O-this.toJD(z,l,1)+1;return this.newDate(z,l,u)}});function R(O,z){return O-z*Math.floor(O/z)}pe.calendars.hebrew=w}}),Fnt=U({"node_modules/world-calendars/dist/calendars/islamic.js"(){var pe=Sw(),le=F1();function w(R){this.local=this.regionalOptions[R||""]||this.regionalOptions[""]}w.prototype=new pe.baseCalendar,le(w.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(R){var O=this._validate(R,this.minMonth,this.minDay,pe.local.invalidYear);return(O.year()*11+14)%30<11},weekOfYear:function(R,O,z){var l=this.newDate(R,O,z);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInYear:function(R){return this.leapYear(R)?355:354},daysInMonth:function(R,O){var z=this._validate(R,O,this.minDay,pe.local.invalidMonth);return this.daysPerMonth[z.month()-1]+(z.month()===12&&this.leapYear(z.year())?1:0)},weekDay:function(R,O,z){return this.dayOfWeek(R,O,z)!==5},toJD:function(R,O,z){var l=this._validate(R,O,z,pe.local.invalidDate);return R=l.year(),O=l.month(),z=l.day(),R=R<=0?R+1:R,z+Math.ceil(29.5*(O-1))+(R-1)*354+Math.floor((3+11*R)/30)+this.jdEpoch-1},fromJD:function(R){R=Math.floor(R)+.5;var O=Math.floor((30*(R-this.jdEpoch)+10646)/10631);O=O<=0?O-1:O;var z=Math.min(12,Math.ceil((R-29-this.toJD(O,1,1))/29.5)+1),l=R-this.toJD(O,z,1)+1;return this.newDate(O,z,l)}}),pe.calendars.islamic=w}}),znt=U({"node_modules/world-calendars/dist/calendars/julian.js"(){var pe=Sw(),le=F1();function w(R){this.local=this.regionalOptions[R||""]||this.regionalOptions[""]}w.prototype=new pe.baseCalendar,le(w.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(z){var O=this._validate(z,this.minMonth,this.minDay,pe.local.invalidYear),z=O.year()<0?O.year()+1:O.year();return z%4===0},weekOfYear:function(R,O,z){var l=this.newDate(R,O,z);return l.add(4-(l.dayOfWeek()||7),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(R,O){var z=this._validate(R,O,this.minDay,pe.local.invalidMonth);return this.daysPerMonth[z.month()-1]+(z.month()===2&&this.leapYear(z.year())?1:0)},weekDay:function(R,O,z){return(this.dayOfWeek(R,O,z)||7)<6},toJD:function(R,O,z){var l=this._validate(R,O,z,pe.local.invalidDate);return R=l.year(),O=l.month(),z=l.day(),R<0&&R++,O<=2&&(R--,O+=12),Math.floor(365.25*(R+4716))+Math.floor(30.6001*(O+1))+z-1524.5},fromJD:function(R){var O=Math.floor(R+.5),z=O+1524,l=Math.floor((z-122.1)/365.25),u=Math.floor(365.25*l),c=Math.floor((z-u)/30.6001),p=c-Math.floor(c<14?1:13),f=l-Math.floor(p>2?4716:4715),v=z-u-Math.floor(30.6001*c);return f<=0&&f--,this.newDate(f,p,v)}}),pe.calendars.julian=w}}),Bnt=U({"node_modules/world-calendars/dist/calendars/mayan.js"(){var pe=Sw(),le=F1();function w(z){this.local=this.regionalOptions[z||""]||this.regionalOptions[""]}w.prototype=new pe.baseCalendar,le(w.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(z){return this._validate(z,this.minMonth,this.minDay,pe.local.invalidYear),!1},formatYear:function(z){var l=this._validate(z,this.minMonth,this.minDay,pe.local.invalidYear);z=l.year();var u=Math.floor(z/400);z=z%400,z+=z<0?400:0;var c=Math.floor(z/20);return u+"."+c+"."+z%20},forYear:function(z){if(z=z.split("."),z.length<3)throw"Invalid Mayan year";for(var l=0,u=0;u<z.length;u++){var c=parseInt(z[u],10);if(Math.abs(c)>19||u>0&&c<0)throw"Invalid Mayan year";l=l*20+c}return l},monthsInYear:function(z){return this._validate(z,this.minMonth,this.minDay,pe.local.invalidYear),18},weekOfYear:function(z,l,u){return this._validate(z,l,u,pe.local.invalidDate),0},daysInYear:function(z){return this._validate(z,this.minMonth,this.minDay,pe.local.invalidYear),360},daysInMonth:function(z,l){return this._validate(z,l,this.minDay,pe.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(z,l,u){var c=this._validate(z,l,u,pe.local.invalidDate);return c.day()},weekDay:function(z,l,u){return this._validate(z,l,u,pe.local.invalidDate),!0},extraInfo:function(z,l,u){var c=this._validate(z,l,u,pe.local.invalidDate),p=c.toJD(),f=this._toHaab(p),v=this._toTzolkin(p);return{haabMonthName:this.local.haabMonths[f[0]-1],haabMonth:f[0],haabDay:f[1],tzolkinDayName:this.local.tzolkinMonths[v[0]-1],tzolkinDay:v[0],tzolkinTrecena:v[1]}},_toHaab:function(z){z-=this.jdEpoch;var l=R(z+8+340,365);return[Math.floor(l/20)+1,R(l,20)]},_toTzolkin:function(z){return z-=this.jdEpoch,[O(z+20,20),O(z+4,13)]},toJD:function(z,l,u){var c=this._validate(z,l,u,pe.local.invalidDate);return c.day()+c.month()*20+c.year()*360+this.jdEpoch},fromJD:function(z){z=Math.floor(z)+.5-this.jdEpoch;var l=Math.floor(z/360);z=z%360,z+=z<0?360:0;var u=Math.floor(z/20),c=z%20;return this.newDate(l,u,c)}});function R(z,l){return z-l*Math.floor(z/l)}function O(z,l){return R(z-1,l)+1}pe.calendars.mayan=w}}),Unt=U({"node_modules/world-calendars/dist/calendars/nanakshahi.js"(){var pe=Sw(),le=F1();function w(O){this.local=this.regionalOptions[O||""]||this.regionalOptions[""]}w.prototype=new pe.baseCalendar;var R=pe.instance("gregorian");le(w.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(O){var z=this._validate(O,this.minMonth,this.minDay,pe.local.invalidYear||pe.regionalOptions[""].invalidYear);return R.leapYear(z.year()+(z.year()<1?1:0)+1469)},weekOfYear:function(O,z,l){var u=this.newDate(O,z,l);return u.add(1-(u.dayOfWeek()||7),"d"),Math.floor((u.dayOfYear()-1)/7)+1},daysInMonth:function(O,z){var l=this._validate(O,z,this.minDay,pe.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===12&&this.leapYear(l.year())?1:0)},weekDay:function(O,z,l){return(this.dayOfWeek(O,z,l)||7)<6},toJD:function(c,z,l){var u=this._validate(c,z,l,pe.local.invalidMonth),c=u.year();c<0&&c++;for(var p=u.day(),f=1;f<u.month();f++)p+=this.daysPerMonth[f-1];return p+R.toJD(c+1468,3,13)},fromJD:function(O){O=Math.floor(O+.5);for(var z=Math.floor((O-(this.jdEpoch-1))/366);O>=this.toJD(z+1,1,1);)z++;for(var l=O-Math.floor(this.toJD(z,1,1)+.5)+1,u=1;l>this.daysInMonth(z,u);)l-=this.daysInMonth(z,u),u++;return this.newDate(z,u,l)}}),pe.calendars.nanakshahi=w}}),Hnt=U({"node_modules/world-calendars/dist/calendars/nepali.js"(){var pe=Sw(),le=F1();function w(R){this.local=this.regionalOptions[R||""]||this.regionalOptions[""]}w.prototype=new pe.baseCalendar,le(w.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(R){return this.daysInYear(R)!==this.daysPerYear},weekOfYear:function(R,O,z){var l=this.newDate(R,O,z);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInYear:function(R){var O=this._validate(R,this.minMonth,this.minDay,pe.local.invalidYear);if(R=O.year(),typeof this.NEPALI_CALENDAR_DATA[R]>"u")return this.daysPerYear;for(var z=0,l=this.minMonth;l<=12;l++)z+=this.NEPALI_CALENDAR_DATA[R][l];return z},daysInMonth:function(R,O){return R.year&&(O=R.month(),R=R.year()),this._validate(R,O,this.minDay,pe.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[R]>"u"?this.daysPerMonth[O-1]:this.NEPALI_CALENDAR_DATA[R][O]},weekDay:function(R,O,z){return this.dayOfWeek(R,O,z)!==6},toJD:function(R,O,z){var l=this._validate(R,O,z,pe.local.invalidDate);R=l.year(),O=l.month(),z=l.day();var u=pe.instance(),c=0,p=O,f=R;this._createMissingCalendarData(R);var v=R-(p>9||p===9&&z>=this.NEPALI_CALENDAR_DATA[f][0]?56:57);for(O!==9&&(c=z,p--);p!==9;)p<=0&&(p=12,f--),c+=this.NEPALI_CALENDAR_DATA[f][p],p--;return O===9?(c+=z-this.NEPALI_CALENDAR_DATA[f][0],c<0&&(c+=u.daysInYear(v))):c+=this.NEPALI_CALENDAR_DATA[f][9]-this.NEPALI_CALENDAR_DATA[f][0],u.newDate(v,1,1).add(c,"d").toJD()},fromJD:function(R){var O=pe.instance(),z=O.fromJD(R),l=z.year(),u=z.dayOfYear(),c=l+56;this._createMissingCalendarData(c);for(var p=9,f=this.NEPALI_CALENDAR_DATA[c][0],v=this.NEPALI_CALENDAR_DATA[c][p]-f+1;u>v;)p++,p>12&&(p=1,c++),v+=this.NEPALI_CALENDAR_DATA[c][p];var h=this.NEPALI_CALENDAR_DATA[c][p]-(v-u);return this.newDate(c,p,h)},_createMissingCalendarData:function(R){var O=this.daysPerMonth.slice(0);O.unshift(17);for(var z=R-1;z<R+2;z++)typeof this.NEPALI_CALENDAR_DATA[z]>"u"&&(this.NEPALI_CALENDAR_DATA[z]=O)},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]}}),pe.calendars.nepali=w}}),jnt=U({"node_modules/world-calendars/dist/calendars/persian.js"(){var pe=Sw(),le=F1();function w(O){this.local=this.regionalOptions[O||""]||this.regionalOptions[""]}function R(O){var z=O-475;O<0&&z++;var l=.242197,u=l*z,c=l*(z+1),p=u-Math.floor(u),f=c-Math.floor(c);return p>f}w.prototype=new pe.baseCalendar,le(w.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(O){var z=this._validate(O,this.minMonth,this.minDay,pe.local.invalidYear);return R(z.year())},weekOfYear:function(O,z,l){var u=this.newDate(O,z,l);return u.add(-((u.dayOfWeek()+1)%7),"d"),Math.floor((u.dayOfYear()-1)/7)+1},daysInMonth:function(O,z){var l=this._validate(O,z,this.minDay,pe.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===12&&this.leapYear(l.year())?1:0)},weekDay:function(O,z,l){return this.dayOfWeek(O,z,l)!==5},toJD:function(O,z,l){var u=this._validate(O,z,l,pe.local.invalidDate);O=u.year(),z=u.month(),l=u.day();var c=0;if(O>0)for(var p=1;p<O;p++)R(p)&&c++;else if(O<0)for(var p=O;p<0;p++)R(p)&&c--;return l+(z<=7?(z-1)*31:(z-1)*30+6)+(O>0?O-1:O)*365+c+this.jdEpoch-1},fromJD:function(O){O=Math.floor(O)+.5;var z=475+(O-this.toJD(475,1,1))/365.242197,l=Math.floor(z);l<=0&&l--,O>this.toJD(l,12,R(l)?30:29)&&(l++,l===0&&l++);var u=O-this.toJD(l,1,1)+1,c=u<=186?Math.ceil(u/31):Math.ceil((u-6)/30),p=O-this.toJD(l,c,1)+1;return this.newDate(l,c,p)}}),pe.calendars.persian=w,pe.calendars.jalali=w}}),Vnt=U({"node_modules/world-calendars/dist/calendars/taiwan.js"(){var pe=Sw(),le=F1(),w=pe.instance();function R(O){this.local=this.regionalOptions[O||""]||this.regionalOptions[""]}R.prototype=new pe.baseCalendar,le(R.prototype,{name:"Taiwan",jdEpoch:24194025e-1,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(l){var z=this._validate(l,this.minMonth,this.minDay,pe.local.invalidYear),l=this._t2gYear(z.year());return w.leapYear(l)},weekOfYear:function(c,z,l){var u=this._validate(c,this.minMonth,this.minDay,pe.local.invalidYear),c=this._t2gYear(u.year());return w.weekOfYear(c,u.month(),u.day())},daysInMonth:function(O,z){var l=this._validate(O,z,this.minDay,pe.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===2&&this.leapYear(l.year())?1:0)},weekDay:function(O,z,l){return(this.dayOfWeek(O,z,l)||7)<6},toJD:function(c,z,l){var u=this._validate(c,z,l,pe.local.invalidDate),c=this._t2gYear(u.year());return w.toJD(c,u.month(),u.day())},fromJD:function(O){var z=w.fromJD(O),l=this._g2tYear(z.year());return this.newDate(l,z.month(),z.day())},_t2gYear:function(O){return O+this.yearsOffset+(O>=-this.yearsOffset&&O<=-1?1:0)},_g2tYear:function(O){return O-this.yearsOffset-(O>=1&&O<=this.yearsOffset?1:0)}}),pe.calendars.taiwan=R}}),qnt=U({"node_modules/world-calendars/dist/calendars/thai.js"(){var pe=Sw(),le=F1(),w=pe.instance();function R(O){this.local=this.regionalOptions[O||""]||this.regionalOptions[""]}R.prototype=new pe.baseCalendar,le(R.prototype,{name:"Thai",jdEpoch:15230985e-1,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(l){var z=this._validate(l,this.minMonth,this.minDay,pe.local.invalidYear),l=this._t2gYear(z.year());return w.leapYear(l)},weekOfYear:function(c,z,l){var u=this._validate(c,this.minMonth,this.minDay,pe.local.invalidYear),c=this._t2gYear(u.year());return w.weekOfYear(c,u.month(),u.day())},daysInMonth:function(O,z){var l=this._validate(O,z,this.minDay,pe.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===2&&this.leapYear(l.year())?1:0)},weekDay:function(O,z,l){return(this.dayOfWeek(O,z,l)||7)<6},toJD:function(c,z,l){var u=this._validate(c,z,l,pe.local.invalidDate),c=this._t2gYear(u.year());return w.toJD(c,u.month(),u.day())},fromJD:function(O){var z=w.fromJD(O),l=this._g2tYear(z.year());return this.newDate(l,z.month(),z.day())},_t2gYear:function(O){return O-this.yearsOffset-(O>=1&&O<=this.yearsOffset?1:0)},_g2tYear:function(O){return O+this.yearsOffset+(O>=-this.yearsOffset&&O<=-1?1:0)}}),pe.calendars.thai=R}}),Gnt=U({"node_modules/world-calendars/dist/calendars/ummalqura.js"(){var pe=Sw(),le=F1();function w(O){this.local=this.regionalOptions[O||""]||this.regionalOptions[""]}w.prototype=new pe.baseCalendar,le(w.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(O){var z=this._validate(O,this.minMonth,this.minDay,pe.local.invalidYear);return this.daysInYear(z.year())===355},weekOfYear:function(O,z,l){var u=this.newDate(O,z,l);return u.add(-u.dayOfWeek(),"d"),Math.floor((u.dayOfYear()-1)/7)+1},daysInYear:function(O){for(var z=0,l=1;l<=12;l++)z+=this.daysInMonth(O,l);return z},daysInMonth:function(O,z){for(var l=this._validate(O,z,this.minDay,pe.local.invalidMonth),u=l.toJD()-24e5+.5,c=0,p=0;p<R.length;p++){if(R[p]>u)return R[c]-R[c-1];c++}return 30},weekDay:function(O,z,l){return this.dayOfWeek(O,z,l)!==5},toJD:function(O,z,l){var u=this._validate(O,z,l,pe.local.invalidDate),c=12*(u.year()-1)+u.month()-15292,p=u.day()+R[c-1]-1;return p+24e5-.5},fromJD:function(O){for(var z=O-24e5+.5,l=0,u=0;u<R.length&&!(R[u]>z);u++)l++;var c=l+15292,p=Math.floor((c-1)/12),f=p+1,v=c-12*p,h=z-R[l-1]+1;return this.newDate(f,v,h)},isValid:function(O,z,l){var u=pe.baseCalendar.prototype.isValid.apply(this,arguments);return u&&(O=O.year!=null?O.year:O,u=O>=1276&&O<=1500),u},_validate:function(O,z,l,u){var c=pe.baseCalendar.prototype._validate.apply(this,arguments);if(c.year<1276||c.year>1500)throw u.replace(/\{0\}/,this.local.name);return c}}),pe.calendars.ummalqura=w;var R=[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]}}),$nt=U({"src/components/calendars/calendars.js"(pe,le){le.exports=Sw(),Int(),Pnt(),Dnt(),Lnt(),Ont(),Nnt(),Fnt(),znt(),Bnt(),Unt(),Hnt(),jnt(),Vnt(),qnt(),Gnt()}}),Wnt=U({"src/components/calendars/index.js"(pe,le){var w=$nt(),R=ii(),O=Dt(),z=O.EPOCHJD,l=O.ONEDAY,u={valType:"enumerated",values:R.sortObjectKeys(w.calendars),editType:"calc",dflt:"gregorian"},c=function(k,P,T,y){var S={};return S[T]=u,R.coerce(k,P,S,T,y)},p=function(k,P,T,y){for(var S=0;S<T.length;S++)c(k,P,T[S]+"calendar",y.calendar)},f={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"},v={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"},h={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"]},m="##",_={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:m,w:m,c:{0:"D M d %X yyyy","-":"D M d %X yyyy"},x:{0:"mm/dd/yyyy","-":"mm/dd/yyyy"}};function x(k,P,T){for(var y=Math.floor((P+.05)/l)+z,S=E(T).fromJD(y),M=0,W,$,Z,K,Q;(M=k.indexOf("%",M))!==-1;)W=k.charAt(M+1),W==="0"||W==="-"||W==="_"?(Z=3,$=k.charAt(M+2),W==="_"&&(W="-")):($=W,W="0",Z=2),K=_[$],K?(K===m?Q=m:Q=S.formatDate(K[W]),k=k.substr(0,M)+Q+k.substr(M+Z),M+=Q.length):M+=Z;return k}var A={};function E(k){var P=A[k];return P||(P=A[k]=w.instance(k),P)}function D(k){return R.extendFlat({},u,{description:k})}function g(k){return"Sets the calendar system to use with `"+k+"` date data."}var C={xcalendar:D(g("x"))},I=R.extendFlat({},C,{ycalendar:D(g("y"))}),N=R.extendFlat({},I,{zcalendar:D(g("z"))}),F=D(["Sets the calendar system to use for `range` and `tick0`","if this is a date axis. This does not set the calendar for","interpreting data on this axis, that's specified in the trace","or via the global `layout.calendar`"].join(" "));le.exports={moduleType:"component",name:"calendars",schema:{traces:{scatter:I,bar:I,box:I,heatmap:I,contour:I,histogram:I,histogram2d:I,histogram2dcontour:I,scatter3d:N,surface:N,mesh3d:N,scattergl:I,ohlc:C,candlestick:C},layout:{calendar:D(["Sets the default calendar system to use for interpreting and","displaying dates throughout the plot."].join(" "))},subplots:{xaxis:{calendar:F},yaxis:{calendar:F},scene:{xaxis:{calendar:F},yaxis:{calendar:F},zaxis:{calendar:F}},polar:{radialaxis:{calendar:F}}}},layoutAttributes:u,handleDefaults:c,handleTraceDefaults:p,CANONICAL_SUNDAY:v,CANONICAL_TICK:f,DFLTRANGE:h,getCal:E,worldCalFmt:x}}}),Ynt=U({"lib/calendars.js"(pe,le){le.exports=Wnt()}}),Xnt=U({"lib/index.js"(pe,le){var w=sR();w.register([oS(),cR(),hR(),lS(),rI(),_y(),ow(),n1(),n3(),CT(),fw(),AF(),C4(),GZ(),Ll(),E2(),xKe(),FKe(),HKe(),VKe(),WKe(),JKe(),nJe(),sJe(),wJe(),EJe(),uet(),Eet(),zet(),qet(),ett(),itt(),dtt(),Ett(),Rtt(),Ftt(),Jtt(),irt(),frt(),Lrt(),jrt(),Wrt(),Jrt(),rnt(),snt(),vnt(),_nt(),knt(),Ynt()]),le.exports=w}});return Xnt()})();/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 *//*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *//*!
 * Determine if an object is a Buffer
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 *//*!
 * 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.
 *//*! 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=r,r})})(jG)),jG.exports}var z7e;function Rwr(){return z7e||(z7e=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=n(Awr()),r=n(Mwr());function n(o){return o&&o.__esModule?o:{default:o}}var i=(0,e.default)(r.default),a=i;t.default=a})(qde)),qde}var kwr=Rwr();const Iwr=Qh(kwr),VW={all:t=>["figures",t],list:t=>[...VW.all(t),"list"],detail:(t,e)=>[...VW.all(t),"detail",e]},vKe=()=>{const{roomId:t}=rh();return _v({queryKey:VW.list(t),queryFn:()=>nwt(t),enabled:!!t})},Pwr=(t,e)=>{const{roomId:r}=rh();return _v({queryKey:VW.detail(r,t),queryFn:()=>iwt(r,t),enabled:(e?.enabled!==void 0?e.enabled:!0)&&!!r&&!!t})};function Dwr({windowId:t}){const e=_k(Se=>Se.openWindows[t]),{updateWindowState:r,closeWindow:n,bringToFront:i,changeFigureInWindow:a}=_k(),{data:o,isLoading:s,isError:d,error:b}=Pwr(e?.figureKey,{enabled:!!e}),{data:L}=vKe(),{setSelection:B,setFrameSelection:V}=rh(),X=UY();if(!e)return null;const ie=({points:Se})=>{!Se||Se.length===0||(Se[0]?.customdata&&Se[0].customdata[0]!=null&&X(Se[0].customdata[0]),Se[0]?.customdata&&Se[0].customdata[1]!=null&&B([Se[0].customdata[1]]))},de=Se=>{if(!Se||!Se.points||Se.points.length===0)return;const Pe=Se.points.map(Ie=>Ie.customdata?Ie.customdata[0]:Ie.pointIndex),Me=new Set(Se.points.filter(Ie=>Ie.customdata?.[1]).map(Ie=>Ie.customdata[1]));Me.size>0&&B(Array.from(Me)),V(Pe)},ae=()=>{V([])},U=(Se,Pe)=>{Pe&&a(t,Pe)},ve=()=>{if(s)return Ke.jsx(Ul,{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",children:Ke.jsx(_1,{})});if(d)return Ke.jsxs(Ul,{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",height:"100%",color:"error.main",textAlign:"center",children:[Ke.jsx(JHe,{sx:{fontSize:40,mb:1}}),Ke.jsx(Su,{variant:"body1",children:"Error loading figure."}),Ke.jsx(Su,{variant:"caption",children:b?.message})]});if(o?.figure){const Se=o.figure;if(Se.type==="plotly"&&Se.data)try{const Pe=JSON.parse(Se.data);return Ke.jsx(Iwr,{data:Pe.data,layout:{...Pe.layout,autosize:!0},useResizeHandler:!0,style:{width:"100%",height:"100%"},onClick:ie,onSelected:de,onDeselect:ae})}catch{return Ke.jsx(Su,{color:"error",children:"Invalid Plotly JSON format."})}return Ke.jsx("pre",{style:{margin:0},children:JSON.stringify(Se,null,2)})}return null};return Ke.jsx(_1e,{size:{width:e.width,height:e.height},position:{x:e.x,y:e.y},minWidth:350,minHeight:300,style:{zIndex:e.zIndex},dragHandleClassName:"drag-handle",onDragStart:()=>i(t),onDragStop:(Se,Pe)=>{r(t,{x:Pe.x,y:Pe.y})},onResizeStop:(Se,Pe,Me,Ie,Ve)=>{r(t,{width:parseInt(Me.style.width,10),height:parseInt(Me.style.height,10),...Ve})},bounds:".drag-boundary-container",children:Ke.jsxs(Gy,{elevation:4,sx:{width:"100%",height:"100%",display:"flex",flexDirection:"column",overflow:"hidden"},children:[Ke.jsxs(Ul,{className:"drag-handle",onMouseDown:()=>i(t),sx:{p:1,display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:1,borderColor:"divider",cursor:"move"},children:[Ke.jsx(N8,{options:L?.figures||[],value:e.figureKey,onChange:U,disableClearable:!0,size:"small",onMouseDown:Se=>Se.stopPropagation(),disablePortal:!0,sx:{flexGrow:1,minWidth:150,mr:2},renderInput:Se=>Ke.jsx(zg,{...Se,label:"Figure",variant:"outlined",size:"small"})}),Ke.jsx(Zf,{onClick:()=>n(t),size:"small",children:Ke.jsx(Xge,{})})]}),Ke.jsx(Ul,{sx:{flexGrow:1,p:1,overflow:"auto",position:"relative",backgroundColor:"background.paper"},children:ve()})]})})}function Lwr(){const t=_k(AYe(e=>Object.keys(e.openWindows)));return Ke.jsx(Ke.Fragment,{children:t.map(e=>Ke.jsx(Dwr,{windowId:e},e))})}function Owr(){const{data:t}=vKe(),e=t?.figures||[],r=_k(AYe(o=>Object.values(o.openWindows).map(s=>s.figureKey))),n=ze.useMemo(()=>{const o=new Set(r);return e.find(s=>!o.has(s))},[e,r]),{openWindow:i}=_k(),a=()=>{n&&i(n)};return Ke.jsx(Zh,{title:"Add a new plot window",children:Ke.jsx(Zf,{color:"inherit","aria-label":"add plot",onClick:a,disabled:!n,children:Ke.jsx(aWt,{})})})}function B7e(){WWt(),XWt(),Ewr();const{chatOpen:t,setChatOpen:e,isDrawing:r,toggleDrawingMode:n}=rh(),[i,a]=ze.useState(!1),{mode:o,setMode:s}=HL(),d=iM(),b=()=>{s(o==="light"?"dark":"light")};return Ke.jsxs(Ke.Fragment,{children:[Ke.jsxs(Ul,{sx:{display:"flex",flexDirection:"column",height:"100vh",width:"100vw",overflow:"hidden"},children:[Ke.jsx(i9e,{}),Ke.jsx(eme,{position:"static",sx:{zIndex:L=>L.zIndex.drawer+1},children:Ke.jsxs(CB,{children:[Ke.jsx(Su,{variant:"h6",noWrap:!0,component:"div",sx:{flexGrow:1},children:"ZnDraw"}),Ke.jsx(Zh,{title:r?"Disable drawing mode":"Enable drawing mode",children:Ke.jsx(Zf,{color:"inherit","aria-label":"toggle drawing mode",onClick:()=>n(d),sx:{backgroundColor:r?"rgba(255, 255, 255, 0.2)":"transparent"},children:Ke.jsx(y9e,{})})}),Ke.jsx(Zh,{title:o==="light"?"Switch to dark mode":"Switch to light mode",children:Ke.jsx(Zf,{color:"inherit","aria-label":"toggle color mode",onClick:b,children:o==="light"?Ke.jsx(Lht,{}):Ke.jsx(Dht,{})})}),Ke.jsx(Zh,{title:"Python code connection info",children:Ke.jsx(Zf,{color:"inherit","aria-label":"show connection info",onClick:()=>a(!0),children:Ke.jsx(Pht,{})})}),Ke.jsx(Zh,{title:"Toggle chat window",children:Ke.jsx(Zf,{color:"inherit","aria-label":"toggle chat",onClick:()=>e(!t),children:Ke.jsx(Iht,{})})}),Ke.jsx(Owr,{}),Ke.jsx($Wt,{})]})}),Ke.jsxs(Ul,{sx:{display:"flex",flexGrow:1,minHeight:0},children:[Ke.jsx(jWt,{}),Ke.jsx(Ul,{component:"main",sx:{flexGrow:1,display:"flex",flexDirection:"column",minWidth:0},children:Ke.jsxs(Ul,{className:"drag-boundary-container",sx:{flexGrow:1,position:"relative",overflow:"hidden",display:"flex",flexDirection:"column"},children:[Ke.jsx(alr,{}),Ke.jsx(Lwr,{})]})})]}),Ke.jsx(T2t,{}),Ke.jsx(Swr,{open:t,onClose:()=>e(!1)})]}),Ke.jsx(Twr,{open:i,onClose:()=>a(!1)})]})}function Nwr(){const[t,e]=ze.useState(!0),[r,n]=ze.useState(null),i=c4();return ze.useEffect(()=>{(async()=>{try{const o=await kme();if(o.length===0){const s=crypto.randomUUID(),d=crypto.randomUUID();i(`/rooms/${s}/${d}?template=empty`)}else if(o.length===1){const s=crypto.randomUUID();i(`/rooms/${o[0].id}/${s}`)}else{const{roomId:s}=await SBe();if(s){const d=crypto.randomUUID();i(`/rooms/${s}/${d}`)}else i("/rooms")}}catch(o){n(o instanceof Error?o.message:"Unknown error")}finally{e(!1)}})()},[i]),t?Ke.jsx(jP,{maxWidth:"md",children:Ke.jsxs(Ul,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"100vh"},children:[Ke.jsx(_1,{}),Ke.jsx(Su,{variant:"body1",sx:{ml:2},children:"Loading rooms..."})]})}):r?Ke.jsx(jP,{maxWidth:"md",children:Ke.jsx(Ul,{sx:{mt:4},children:Ke.jsxs(qw,{severity:"error",children:["Failed to load rooms: ",r]})})}):Ke.jsx(jP,{maxWidth:"md",children:Ke.jsx(Ul,{sx:{mt:4},children:Ke.jsx(qw,{severity:"warning",children:"Navigation logic did not redirect properly. Please refresh the page."})})})}function Fwr(){const t=iM(),[e,r]=ze.useState(""),[n,i]=ze.useState({open:!1,message:"",severity:"success"}),[a,o]=ze.useState({open:!1,roomId:"",roomDescription:""}),[s,d]=ze.useState({newRoomId:"",description:"",error:null}),[b,L]=ze.useState(!1),B=c4();ze.useEffect(()=>{(async()=>{const ut=await EBe();L(ut.enabled)})()},[]);const{data:V=[],isLoading:X,error:ie,isError:de}=_v({queryKey:["rooms",e],queryFn:()=>kme(e||void 0),refetchInterval:5e3,placeholderData:nt=>nt}),ae=async(nt,ut)=>{try{await sG(nt,{description:ut||null}),await t.invalidateQueries({queryKey:["rooms"]}),i({open:!0,message:"Description updated",severity:"success"})}catch{i({open:!0,message:"Failed to update description",severity:"error"})}},U=async(nt,ut)=>{try{await sG(nt,{locked:!ut}),await t.invalidateQueries({queryKey:["rooms"]}),i({open:!0,message:ut?"Room unlocked":"Room locked",severity:"success"})}catch{i({open:!0,message:"Failed to update lock status",severity:"error"})}},ve=async(nt,ut)=>{try{await sG(nt,{hidden:!ut}),await t.invalidateQueries({queryKey:["rooms"]}),i({open:!0,message:ut?"Room shown":"Room hidden",severity:"success"})}catch{i({open:!0,message:"Failed to update visibility",severity:"error"})}},Se=async(nt,ut)=>{try{await TBe(ut?null:nt),await t.invalidateQueries({queryKey:["rooms"]}),i({open:!0,message:ut?"Default room cleared":"Default room set",severity:"success"})}catch{i({open:!0,message:"Failed to update default room",severity:"error"})}},Pe=(nt,ut)=>{o({open:!0,roomId:nt,roomDescription:ut}),d({newRoomId:"",description:`Copy of ${ut||nt}`,error:null})},Me=()=>{o({open:!1,roomId:"",roomDescription:""}),d({newRoomId:"",description:"",error:null})},Ie=nt=>nt?V.some(ut=>ut.id===nt)?"A room with this ID already exists":/^[a-zA-Z0-9_-]+$/.test(nt)?null:"Room ID can only contain letters, numbers, hyphens, and underscores":null,Ve=async()=>{const nt=Ie(s.newRoomId);if(nt){d({...s,error:nt});return}try{const ut=await wBe(a.roomId,{newRoomId:s.newRoomId||void 0,description:s.description});Me();const ht=crypto.randomUUID();B(`/rooms/${ut.roomId}/${ht}`)}catch(ut){const ht=ut instanceof Error?ut.message:"Failed to duplicate room";d({...s,error:ht})}},Ze=nt=>{const ut=crypto.randomUUID();B(`/rooms/${nt}/${ut}`)},Je=[{field:"isDefault",headerName:"",width:50,sortable:!0,renderCell:nt=>Ke.jsx(Zh,{title:nt.value?"Default room":"Set as default",children:Ke.jsx(Zf,{size:"small",onClick:()=>Se(nt.row.id,nt.value),children:nt.value?Ke.jsx(Epe,{color:"primary"}):Ke.jsx(XGe,{})})})},{field:"id",headerName:"Room ID",width:250,sortable:!0,renderCell:nt=>Ke.jsx(Ul,{sx:{cursor:"pointer",color:"primary.main",textDecoration:"underline","&:hover":{color:"primary.dark"}},onClick:()=>Ze(nt.value),children:nt.value})},{field:"description",headerName:"Description",width:300,editable:!0,sortable:!0},{field:"frameCount",headerName:"Frames",width:100,type:"number",sortable:!0},{field:"locked",headerName:"Lock",width:80,renderCell:nt=>{const ut=nt.value,ht=nt.row.metadataLocked;return ut?Ke.jsx(Zh,{title:"Locked (immutable)",children:Ke.jsx(Zf,{size:"small",onClick:()=>U(nt.row.id,ut),children:Ke.jsx(n9,{color:"error"})})}):ht?Ke.jsx(Zh,{title:"Uploading...",children:Ke.jsx(n9,{sx:{color:"warning.main",fontSize:24}})}):Ke.jsx(Zh,{title:"Unlocked (editable)",children:Ke.jsx(Zf,{size:"small",onClick:()=>U(nt.row.id,ut),children:Ke.jsx(GGe,{color:"success"})})})}},{field:"hidden",headerName:"Visible",width:80,renderCell:nt=>Ke.jsx(Zh,{title:nt.value?"Hidden":"Visible",children:Ke.jsx(Zf,{size:"small",onClick:()=>ve(nt.row.id,nt.value),children:nt.value?Ke.jsx(wWt,{color:"disabled"}):Ke.jsx(_Wt,{color:"action"})})})},{field:"actions",headerName:"Actions",width:80,sortable:!1,renderCell:nt=>Ke.jsx(Zh,{title:"Duplicate room",children:Ke.jsx(Zf,{size:"small",onClick:()=>Pe(nt.row.id,nt.row.description||""),children:Ke.jsx(lye,{})})})}];return X?Ke.jsx(jP,{maxWidth:"lg",children:Ke.jsx(Ul,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"100vh"},children:Ke.jsx(_1,{})})}):de?Ke.jsx(jP,{maxWidth:"lg",children:Ke.jsx(Ul,{sx:{mt:4},children:Ke.jsx(qw,{severity:"error",children:ie instanceof Error?ie.message:"Unknown error"})})}):Ke.jsxs(jP,{maxWidth:"lg",children:[Ke.jsxs(Ul,{sx:{mt:4,mb:4},children:[Ke.jsx(Su,{variant:"h3",component:"h1",gutterBottom:!0,children:"Room Management"}),Ke.jsx(Su,{variant:"subtitle1",color:"text.secondary",gutterBottom:!0,children:"Manage your rooms: lock, hide, set default, or duplicate"}),Ke.jsx(Ul,{sx:{mt:3,mb:2},children:Ke.jsx(zg,{fullWidth:!0,size:"small",label:"Search rooms",placeholder:"Search by metadata (file path, etc.) - supports regex",value:e,onChange:nt=>r(nt.target.value),variant:"outlined"})}),Ke.jsx(Ul,{sx:{height:600,width:"100%",mt:3},children:Ke.jsx(zX,{rows:V,columns:Je,initialState:{pagination:{paginationModel:{page:0,pageSize:10}},sorting:{sortModel:[{field:"isDefault",sort:"desc"}]}},pageSizeOptions:[5,10,25],processRowUpdate:async(nt,ut)=>(nt.description!==ut.description&&await ae(nt.id,nt.description),nt),onProcessRowUpdateError:nt=>{i({open:!0,message:"Failed to update row",severity:"error"})}})}),Ke.jsxs(Ul,{sx:{mt:2,display:"flex",gap:2},children:[Ke.jsx(Id,{variant:"outlined",onClick:()=>{const nt=crypto.randomUUID(),ut=crypto.randomUUID();B(`/rooms/${nt}/${ut}?template=empty`)},children:"Create New Empty Room"}),b&&Ke.jsx(Id,{variant:"outlined",startIcon:Ke.jsx(qGe,{}),onClick:()=>B("/file-browser"),children:"Open File Browser"})]})]}),Ke.jsxs(iA,{open:a.open,onClose:Me,maxWidth:"sm",fullWidth:!0,children:[Ke.jsx(YC,{children:"Duplicate Room"}),Ke.jsxs(aA,{children:[Ke.jsxs(Su,{variant:"body2",color:"text.secondary",sx:{mb:3},children:["Duplicating: ",a.roomDescription||a.roomId]}),Ke.jsx(zg,{margin:"dense",label:"New Room ID (optional)",type:"text",fullWidth:!0,variant:"outlined",value:s.newRoomId,onChange:nt=>{const ut=nt.target.value;d({...s,newRoomId:ut,error:Ie(ut)})},helperText:s.error||"Leave empty to auto-generate a unique ID",error:!!s.error,sx:{mb:2}}),Ke.jsx(zg,{autoFocus:!0,margin:"dense",label:"Description for new room",type:"text",fullWidth:!0,variant:"outlined",value:s.description,onChange:nt=>d({...s,description:nt.target.value})})]}),Ke.jsxs(WC,{children:[Ke.jsx(Id,{onClick:Me,children:"Cancel"}),Ke.jsx(Id,{onClick:Ve,variant:"contained",disabled:!!s.error,children:"Duplicate"})]})]}),Ke.jsx(CY,{open:n.open,autoHideDuration:4e3,onClose:()=>i({...n,open:!1}),anchorOrigin:{vertical:"top",horizontal:"center"},children:Ke.jsx(qw,{onClose:()=>i({...n,open:!1}),severity:n.severity,sx:{width:"100%"},children:n.message})})]})}const U7e=500,H7e=6e4;function zwr(){const{roomId:t}=R8(),e=c4(),[r,n]=ze.useState("waiting"),[i,a]=ze.useState(""),[o,s]=ze.useState(0);return ze.useEffect(()=>{if(!t){n("error"),a("No room ID provided");return}let d,b,L=!0;const B=Date.now(),V=async()=>{try{if((await fwt(t)).frameCount>0){L&&(n("ready"),setTimeout(()=>{const ie=crypto.randomUUID();e(`/rooms/${t}/${ie}`,{replace:!0})},500));return}L&&(Date.now()-B>=H7e?n("timeout"):d=setTimeout(V,U7e))}catch(X){X?.response?.status===404?L&&(Date.now()-B>=H7e?n("timeout"):d=setTimeout(V,U7e)):L&&(n("error"),a(X?.response?.data?.message||X?.message||"Failed to check room status"))}};return V(),b=setInterval(()=>{s(Math.floor((Date.now()-B)/1e3))},1e3),()=>{L=!1,clearTimeout(d),clearInterval(b)}},[t,e]),t?Ke.jsxs(Ul,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100vh",width:"100vw",padding:4,gap:3},children:[r==="waiting"&&Ke.jsxs(Ke.Fragment,{children:[Ke.jsx(_1,{size:60}),Ke.jsx(Su,{variant:"h5",align:"center",children:"Loading file into room..."}),Ke.jsxs(Su,{variant:"body1",color:"text.secondary",align:"center",children:["Room: ",Ke.jsx("strong",{children:t})]}),Ke.jsxs(Su,{variant:"body2",color:"text.secondary",children:["Elapsed: ",o,"s"]}),Ke.jsx(Su,{variant:"caption",color:"text.secondary",align:"center",children:"This usually takes a few seconds. Large files may take longer."})]}),r==="ready"&&Ke.jsxs(Ke.Fragment,{children:[Ke.jsx(_1,{size:60,color:"success"}),Ke.jsx(Su,{variant:"h5",color:"success.main",align:"center",children:"Room ready! Redirecting..."})]}),r==="timeout"&&Ke.jsxs(Ke.Fragment,{children:[Ke.jsxs(qw,{severity:"warning",sx:{maxWidth:600},children:[Ke.jsx(Su,{variant:"h6",gutterBottom:!0,children:"Timeout"}),Ke.jsxs(Su,{variant:"body2",paragraph:!0,children:["The room ",Ke.jsx("strong",{children:t})," is taking longer than expected to load. This could mean:"]}),Ke.jsxs("ul",{style:{marginTop:8,marginBottom:8},children:[Ke.jsx("li",{children:"The file is very large and still loading"}),Ke.jsx("li",{children:"There was an issue with the file upload"}),Ke.jsx("li",{children:"The Celery worker may not be running"})]}),Ke.jsx(Su,{variant:"body2",children:"You can try waiting longer or check the server logs."})]}),Ke.jsxs(Ul,{sx:{display:"flex",gap:2},children:[Ke.jsx(Id,{variant:"contained",onClick:()=>{const d=crypto.randomUUID();e(`/rooms/${t}/${d}`,{replace:!0})},children:"Try to Join Anyway"}),Ke.jsx(Id,{variant:"outlined",onClick:()=>e("/rooms",{replace:!0}),children:"Back to Room List"})]})]}),r==="error"&&Ke.jsxs(Ke.Fragment,{children:[Ke.jsxs(qw,{severity:"error",sx:{maxWidth:600},children:[Ke.jsx(Su,{variant:"h6",gutterBottom:!0,children:"Error"}),Ke.jsx(Su,{variant:"body2",children:i||"An unexpected error occurred"})]}),Ke.jsx(Id,{variant:"contained",onClick:()=>e("/rooms",{replace:!0}),children:"Back to Room List"})]})]}):Ke.jsx(sze,{to:"/rooms",replace:!0})}function Bwr(){const t=c4(),[e,r]=ze.useState(""),[n,i]=ze.useState(""),[a,o]=ze.useState({open:!1,file:null}),[s,d]=ze.useState({open:!1,data:null,filePath:""}),[b,L]=ze.useState(""),[B,V]=ze.useState({open:!1,message:"",severity:"success"}),{data:X,isLoading:ie,error:de,refetch:ae}=_v({queryKey:["directory",e,n],queryFn:()=>mwt(e||void 0,n||void 0),retry:!1}),U=RL({mutationFn:_t=>gwt(_t),onSuccess:_t=>{if(_t.status==="file_already_loaded"){const Dt=e?`${e}/${a.file?.name}`:a.file?.name||"";d({open:!0,data:_t,filePath:Dt}),o({open:!1,file:null})}else{V({open:!0,message:`File loading queued in room: ${_t.room}`,severity:"success"}),o({open:!1,file:null});const Dt=crypto.randomUUID();t(`/rooms/${_t.room}/${Dt}?waitForCreation=true`)}},onError:_t=>{V({open:!0,message:_t?.response?.data?.error||"Failed to load file",severity:"error"})}}),ve=RL({mutationFn:ywt,onSuccess:_t=>{V({open:!0,message:`New room '${_t.roomId}' created from existing file (no re-upload!)`,severity:"success"}),d({open:!1,data:null,filePath:""});const Dt=crypto.randomUUID();t(`/rooms/${_t.roomId}/${Dt}`)},onError:_t=>{V({open:!0,message:_t?.response?.data?.error||"Failed to create room from file",severity:"error"})}}),Se=_t=>{if(_t.type==="directory"){const Dt=e?`${e}/${_t.name}`:_t.name;r(Dt)}else _t.supported&&(o({open:!0,file:_t}),L(""))},Pe=_t=>{const qt=e.split("/").filter(Boolean).slice(0,_t+1).join("/");r(qt)},Me=()=>{r("")},Ie=()=>{X?.parent!==null&&r(X?.parent||"")},Ve=()=>{if(!a.file)return;const Dt={path:e?`${e}/${a.file.name}`:a.file.name,room:b||void 0};U.mutate(Dt)},Ze=()=>{if(!s.data)return;const _t=crypto.randomUUID();t(`/rooms/${s.data.existingRoom}/${_t}`),d({open:!1,data:null,filePath:""})},Je=()=>{s.data&&ve.mutate({sourceRoom:s.data.existingRoom})},nt=()=>{if(!s.data)return;const _t={path:s.filePath,force_upload:!0};d({open:!1,data:null,filePath:""}),U.mutate(_t)},ut=()=>{t("/")},ht=e?e.split("/").filter(Boolean):[];return de?Ke.jsxs(jP,{maxWidth:"lg",sx:{mt:4},children:[Ke.jsx(qw,{severity:"error",children:de?.response?.data?.error||"Failed to load directory"}),Ke.jsx(Id,{onClick:()=>t("/"),sx:{mt:2},children:"Back to Home"})]}):Ke.jsxs(Ul,{sx:{flexGrow:1},children:[Ke.jsx(eme,{position:"static",children:Ke.jsxs(CB,{children:[Ke.jsx(Zf,{edge:"start",color:"inherit",onClick:ut,sx:{mr:2},children:Ke.jsx(VGe,{})}),Ke.jsx(Su,{variant:"h6",component:"div",sx:{flexGrow:1},children:"File Browser"})]})}),Ke.jsx(jP,{maxWidth:"lg",sx:{mt:4,mb:4},children:Ke.jsxs(Gy,{sx:{p:3},children:[Ke.jsxs(Ul,{sx:{mb:3,display:"flex",alignItems:"center",gap:1},children:[Ke.jsx(Zh,{title:"Go to root",children:Ke.jsx(Zf,{size:"small",onClick:Me,children:Ke.jsx(hWt,{})})}),Ke.jsxs(gvt,{children:[Ke.jsx(B2e,{component:"button",variant:"body1",onClick:Me,sx:{cursor:"pointer"},children:"Root"}),ht.map((_t,Dt)=>Ke.jsx(B2e,{component:"button",variant:"body1",onClick:()=>Pe(Dt),sx:{cursor:"pointer"},children:_t},Dt))]})]}),Ke.jsx(Ul,{sx:{mb:2},children:Ke.jsx(zg,{fullWidth:!0,size:"small",label:"Search files and folders",placeholder:"Filter by name (supports regex)",value:n,onChange:_t=>i(_t.target.value),variant:"outlined"})}),Ke.jsx(oA,{sx:{mb:2}}),ie&&Ke.jsx(Ul,{sx:{display:"flex",justifyContent:"center",p:4},children:Ke.jsx(_1,{})}),!ie&&X&&Ke.jsxs(B8,{children:[X.parent!==null&&Ke.jsxs(Ke.Fragment,{children:[Ke.jsx(xk,{disablePadding:!0,children:Ke.jsxs(DP,{onClick:Ie,children:[Ke.jsx(jS,{children:Ke.jsx(Jke,{})}),Ke.jsx(Uw,{primary:"..",secondary:"Parent directory"})]})}),Ke.jsx(oA,{})]}),X.items.length===0&&Ke.jsx(xk,{children:Ke.jsx(Uw,{primary:"Empty directory",secondary:"No files or folders to display"})}),X.items.map((_t,Dt)=>Ke.jsx(xk,{disablePadding:!0,secondaryAction:_t.type==="file"&&_t.supported?_t.alreadyLoaded?Ke.jsx(Zh,{title:`Already loaded in room: ${_t.alreadyLoaded.room}`,children:Ke.jsx(Zke,{color:"primary"})}):Ke.jsx(Zh,{title:"Supported file type",children:Ke.jsx(Zke,{color:"success"})}):null,children:Ke.jsxs(DP,{onClick:()=>Se(_t),disabled:_t.type==="file"&&!_t.supported,children:[Ke.jsx(jS,{children:_t.type==="directory"?Ke.jsx(Jke,{color:"primary"}):Ke.jsx(pWt,{color:_t.supported?"action":"disabled"})}),Ke.jsx(Uw,{primary:_t.name,secondary:_t.type==="file"?_t.alreadyLoaded?`${(_t.size||0)/1024>1024?`${((_t.size||0)/1024/1024).toFixed(2)} MB`:`${((_t.size||0)/1024).toFixed(2)} KB`} • Already loaded in '${_t.alreadyLoaded.room}'`:`${(_t.size||0)/1024>1024?`${((_t.size||0)/1024/1024).toFixed(2)} MB`:`${((_t.size||0)/1024).toFixed(2)} KB`}`:"Directory"})]})},Dt))]})]})}),Ke.jsxs(iA,{open:a.open,onClose:()=>o({open:!1,file:null}),maxWidth:"sm",fullWidth:!0,children:[Ke.jsx(YC,{children:"Load File into ZnDraw"}),Ke.jsxs(aA,{children:[Ke.jsxs(Su,{variant:"body2",color:"text.secondary",sx:{mb:2},children:["File: ",a.file?.name]}),Ke.jsx(zg,{autoFocus:!0,margin:"dense",label:"Room Name (optional)",type:"text",fullWidth:!0,variant:"outlined",value:b,onChange:_t=>L(_t.target.value),helperText:"Leave empty to auto-generate a room name from the filename"})]}),Ke.jsxs(WC,{children:[Ke.jsx(Id,{onClick:()=>o({open:!1,file:null}),children:"Cancel"}),Ke.jsx(Id,{onClick:Ve,variant:"contained",disabled:U.isPending,children:U.isPending?"Loading...":"Load"})]})]}),Ke.jsxs(iA,{open:s.open,onClose:()=>d({open:!1,data:null,filePath:""}),maxWidth:"sm",fullWidth:!0,children:[Ke.jsx(YC,{children:"File Already Loaded"}),Ke.jsxs(aA,{children:[Ke.jsx(Su,{variant:"body1",sx:{mb:2},children:s.data?.message}),Ke.jsxs(Su,{variant:"body2",color:"text.secondary",sx:{mb:2},children:["This exact file (same size and modification time) is already loaded in room"," ",Ke.jsx("strong",{children:s.data?.existingRoom}),"."]}),Ke.jsx(Su,{variant:"body2",color:"text.secondary",children:"What would you like to do?"})]}),Ke.jsxs(WC,{sx:{flexDirection:"column",gap:1,alignItems:"stretch",p:2},children:[Ke.jsx(Id,{onClick:Ze,variant:"contained",color:"primary",fullWidth:!0,children:"Open Existing Room"}),Ke.jsx(Id,{onClick:Je,variant:"contained",color:"success",fullWidth:!0,disabled:ve.isPending,children:ve.isPending?"Creating...":"Create New Room (Reuse Storage - Fast!)"}),Ke.jsx(Id,{onClick:nt,variant:"outlined",color:"warning",fullWidth:!0,disabled:U.isPending,children:U.isPending?"Uploading...":"Upload Anyway (Ignore Existing)"}),Ke.jsx(Id,{onClick:()=>d({open:!1,data:null,filePath:""}),variant:"text",fullWidth:!0,children:"Cancel"})]})]}),Ke.jsx(CY,{open:B.open,autoHideDuration:4e3,onClose:()=>V({...B,open:!1}),anchorOrigin:{vertical:"top",horizontal:"center"},children:Ke.jsx(qw,{onClose:()=>V({...B,open:!1}),severity:B.severity,sx:{width:"100%"},children:B.message})})]})}const Uwr=new CNt,Hwr=fY({colorSchemes:{dark:!0},defaultColorScheme:"light"}),jwr=()=>{const{roomId:t}=R8(),[e]=pze();if(e.get("waitForCreation")==="true")return Ke.jsx(zwr,{});const n=crypto.randomUUID();return Ke.jsx(sze,{to:`/rooms/${t}/${n}`,replace:!0})},Vwr=Uot([{path:"/",element:Ke.jsx(Nwr,{})},{path:"/rooms",element:Ke.jsx(Fwr,{})},{path:"/file-browser",element:Ke.jsx(Bwr,{})},{path:"/rooms/:roomId",element:Ke.jsx(jwr,{})},{path:"/rooms/:roomId/:userId",element:Ke.jsx(B7e,{})},{path:"/room/:roomId/:userId",element:Ke.jsx(B7e,{})}]);function qwr(){return Ke.jsxs(Jct,{theme:Hwr,children:[Ke.jsx(i9e,{}),Ke.jsx(MNt,{client:Uwr,children:Ke.jsx(Jot,{router:Vwr})})]})}const Gwr=document.getElementById("root"),$wr=Ke.jsx(ze.StrictMode,{children:Ke.jsx(qwr,{})});jit.createRoot(Gwr).render($wr);
